[cut: only the first 33554432 bytes of this file were read]

LOGFONTW struc ; (sizeof=0x5C, standard	type)
lfHeight dd ?
lfWidth	dd ?
lfEscapement dd	?
lfOrientation dd ?
lfWeight dd ?
lfItalic db ?
lfUnderline db ?
lfStrikeOut db ?
lfCharSet db ?
lfOutPrecision db ?
lfClipPrecision	db ?
lfQuality db ?
lfPitchAndFamily db ?
lfFaceName dw 32 dup(?)
LOGFONTW ends


WNDCLASSEXW struc ; (sizeof=0x30, standard type)
cbSize dd ?
style dd ?
lpfnWndProc dd ?	; offset
cbClsExtra dd ?
cbWndExtra dd ?
hInstance dd ?		; offset
hIcon dd ?		; offset
hCursor	dd ?		; offset
hbrBackground dd ?	; offset
lpszMenuName dd	?	; offset
lpszClassName dd ?	; offset
hIconSm	dd ?		; offset
WNDCLASSEXW ends


UUID struc ; (sizeof=0x10, standard type)
Data1 dd ?
Data2 dw ?
Data3 dw ?
Data4 db 8 dup(?)
UUID ends


timeval	struc ;	(sizeof=0x8, standard type)
tv_sec dd ?
tv_usec	dd ?
timeval	ends


fd_set struc ; (sizeof=0x104, standard type)
fd_count dd ?
fd_array dd 64 dup(?)
fd_set ends


RGBQUAD	struc ;	(sizeof=0x4, standard type)
rgbBlue	db ?
rgbGreen db ?
rgbRed db ?
rgbReserved db ?
RGBQUAD	ends


BITMAPINFOHEADER struc ; (sizeof=0x28, standard	type)
biSize dd ?
biWidth	dd ?
biHeight dd ?
biPlanes dw ?
biBitCount dw ?
biCompression dd ?
biSizeImage dd ?
biXPelsPerMeter	dd ?
biYPelsPerMeter	dd ?
biClrUsed dd ?
biClrImportant dd ?
BITMAPINFOHEADER ends


BITMAPINFO struc ; (sizeof=0x2C, standard type)
bmiHeader BITMAPINFOHEADER ?
bmiColors RGBQUAD ?
BITMAPINFO ends


LOGFONTA struc ; (sizeof=0x3C, standard	type)
lfHeight dd ?
lfWidth	dd ?
lfEscapement dd	?
lfOrientation dd ?
lfWeight dd ?
lfItalic db ?
lfUnderline db ?
lfStrikeOut db ?
lfCharSet db ?
lfOutPrecision db ?
lfClipPrecision	db ?
lfQuality db ?
lfPitchAndFamily db ?
lfFaceName db 32 dup(?)
LOGFONTA ends


PIXELFORMATDESCRIPTOR struc ; (sizeof=0x28, standard type)
nSize dw ?
nVersion dw ?
dwFlags	dd ?
iPixelType db ?
cColorBits db ?
cRedBits db ?
cRedShift db ?
cGreenBits db ?
cGreenShift db ?
cBlueBits db ?
cBlueShift db ?
cAlphaBits db ?
cAlphaShift db ?
cAccumBits db ?
cAccumRedBits db ?
cAccumGreenBits	db ?
cAccumBlueBits db ?
cAccumAlphaBits	db ?
cDepthBits db ?
cStencilBits db	?
cAuxBuffers db ?
iLayerType db ?
bReserved db ?
dwLayerMask dd ?
dwVisibleMask dd ?
dwDamageMask dd	?
PIXELFORMATDESCRIPTOR ends


tagPIXELFORMATDESCRIPTOR struc ; (sizeof=0x28, standard	type)
nSize dw ?
nVersion dw ?
dwFlags	dd ?
iPixelType db ?
cColorBits db ?
cRedBits db ?
cRedShift db ?
cGreenBits db ?
cGreenShift db ?
cBlueBits db ?
cBlueShift db ?
cAlphaBits db ?
cAlphaShift db ?
cAccumBits db ?
cAccumRedBits db ?
cAccumGreenBits	db ?
cAccumBlueBits db ?
cAccumAlphaBits	db ?
cDepthBits db ?
cStencilBits db	?
cAuxBuffers db ?
iLayerType db ?
bReserved db ?
dwLayerMask dd ?
dwVisibleMask dd ?
dwDamageMask dd	?
tagPIXELFORMATDESCRIPTOR ends


WNDCLASSEXA struc ; (sizeof=0x30, standard type)
cbSize dd ?
style dd ?
lpfnWndProc dd ?	; offset
cbClsExtra dd ?
cbWndExtra dd ?
hInstance dd ?		; offset
hIcon dd ?		; offset
hCursor	dd ?		; offset
hbrBackground dd ?	; offset
lpszMenuName dd	?	; offset
lpszClassName dd ?	; offset
hIconSm	dd ?		; offset
WNDCLASSEXA ends


_BY_HANDLE_FILE_INFORMATION struc ; (sizeof=0x34, standard type)
dwFileAttributes dd ?
ftCreationTime FILETIME	?
ftLastAccessTime FILETIME ?
ftLastWriteTime	FILETIME ?
dwVolumeSerialNumber dd	?
nFileSizeHigh dd ?
nFileSizeLow dd	?
nNumberOfLinks dd ?
nFileIndexHigh dd ?
nFileIndexLow dd ?
_BY_HANDLE_FILE_INFORMATION ends


FILE struc ; (sizeof=0x20, standard type)
_ptr dd	?		; offset
_cnt dd	?
_base dd ?		; offset
_flag dd ?
_file dd ?
_charbuf dd ?
_bufsiz	dd ?
_tmpfname dd ?		; offset
FILE ends


tm struc ; (sizeof=0x24, standard type)
tm_sec dd ?
tm_min dd ?
tm_hour	dd ?
tm_mday	dd ?
tm_mon dd ?
tm_year	dd ?
tm_wday	dd ?
tm_yday	dd ?
tm_isdst dd ?
tm ends


localeinfo_struct struc	; (sizeof=0x8, standard	type)
locinfo	dd ?		; offset
mbcinfo	dd ?		; offset
localeinfo_struct ends


_MEMORY_BASIC_INFORMATION struc	; (sizeof=0x1C,	standard type)
BaseAddress dd ?	; offset
AllocationBase dd ?	; offset
AllocationProtect dd ?
RegionSize dd ?
State dd ?
Protect	dd ?
Type dd	?
_MEMORY_BASIC_INFORMATION ends


_WIN32_FIND_DATAA struc	; (sizeof=0x140, standard type)
dwFileAttributes dd ?
ftCreationTime FILETIME	?
ftLastAccessTime FILETIME ?
ftLastWriteTime	FILETIME ?
nFileSizeHigh dd ?
nFileSizeLow dd	?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName db 260 dup(?)
cAlternateFileName db 14 dup(?)
_padding db 2 dup(?)
_WIN32_FIND_DATAA ends


WNDCLASSW struc	; (sizeof=0x28,	standard type)
style dd ?
lpfnWndProc dd ?	; offset
cbClsExtra dd ?
cbWndExtra dd ?
hInstance dd ?		; offset
hIcon dd ?		; offset
hCursor	dd ?		; offset
hbrBackground dd ?	; offset
lpszMenuName dd	?	; offset
lpszClassName dd ?	; offset
WNDCLASSW ends


tagTRACKMOUSEEVENT struc ; (sizeof=0x10, standard type)
cbSize dd ?
dwFlags	dd ?
hwndTrack dd ?		; offset
dwHoverTime dd ?
tagTRACKMOUSEEVENT ends


_WSABUF	struc ;	(sizeof=0x8, standard type)
len dd ?
buf dd ?		; offset
_WSABUF	ends


_SHFILEOPSTRUCTW struc ; (sizeof=0x1E, standard	type)
hwnd dd	?		; offset
wFunc dd ?
pFrom dd ?		; offset
pTo dd ?		; offset
fFlags dw ?
fAnyOperationsAborted dd ?
hNameMappings dd ?	; offset
lpszProgressTitle dd ?	; offset
_SHFILEOPSTRUCTW ends


_SERVICE_STATUS	struc ;	(sizeof=0x1C, standard type)
dwServiceType dd ?
dwCurrentState dd ?
dwControlsAccepted dd ?
dwWin32ExitCode	dd ?
dwServiceSpecificExitCode dd ?
dwCheckPoint dd	?
dwWaitHint dd ?
_SERVICE_STATUS	ends


_ULARGE_INTEGER::$0354AA9C204208F00D0965D07BBE7FAC struc ; (sizeof=0x8,	standard type)
LowPart	dd ?
HighPart dd ?
_ULARGE_INTEGER::$0354AA9C204208F00D0965D07BBE7FAC ends


ULARGE_INTEGER union ; (sizeof=0x8, standard type)
anonymous_0 _ULARGE_INTEGER::$0354AA9C204208F00D0965D07BBE7FAC ?
u _ULARGE_INTEGER::$0354AA9C204208F00D0965D07BBE7FAC ?
QuadPart dq ?
ULARGE_INTEGER ends


_WIN32_FIND_DATAW struc	; (sizeof=0x250, standard type)
dwFileAttributes dd ?
ftCreationTime FILETIME	?
ftLastAccessTime FILETIME ?
ftLastWriteTime	FILETIME ?
nFileSizeHigh dd ?
nFileSizeLow dd	?
dwReserved0 dd ?
dwReserved1 dd ?
cFileName dw 260 dup(?)
cAlternateFileName dw 14 dup(?)
_WIN32_FIND_DATAW ends


_MINIDUMP_CALLBACK_INFORMATION struc ; (sizeof=0x8, standard type)
CallbackRoutine	dd ?	; offset
CallbackParam dd ?	; offset
_MINIDUMP_CALLBACK_INFORMATION ends


_MINIDUMP_USER_STREAM_INFORMATION struc	; (sizeof=0x8, standard	type)
UserStreamCount	dd ?
UserStreamArray	dd ?	; offset
_MINIDUMP_USER_STREAM_INFORMATION ends


_MINIDUMP_EXCEPTION_INFORMATION	struc ;	(sizeof=0xC, standard type)
ThreadId dd ?
ExceptionPointers dd ?	; offset
ClientPointers dd ?
_MINIDUMP_EXCEPTION_INFORMATION	ends


_MEMORYSTATUSEX	struc ;	(sizeof=0x40, standard type)
dwLength dd ?
dwMemoryLoad dd	?
ullTotalPhys dq	?
ullAvailPhys dq	?
ullTotalPageFile dq ?
ullAvailPageFile dq ?
ullTotalVirtual	dq ?
ullAvailVirtual	dq ?
ullAvailExtendedVirtual	dq ?
_MEMORYSTATUSEX	ends


PROCESS_MEMORY_COUNTERS	struc ;	(sizeof=0x28, standard type)
cb dd ?
PageFaultCount dd ?
PeakWorkingSetSize dd ?
WorkingSetSize dd ?
QuotaPeakPagedPoolUsage	dd ?
QuotaPagedPoolUsage dd ?
QuotaPeakNonPagedPoolUsage dd ?
QuotaNonPagedPoolUsage dd ?
PagefileUsage dd ?
PeakPagefileUsage dd ?
PROCESS_MEMORY_COUNTERS	ends


tagPOINT struc ; (sizeof=0x8, standard type)
x dd ?
y dd ?
tagPOINT ends


tagRECT	struc ;	(sizeof=0x10, standard type)
left dd	?
top dd ?
right dd ?
bottom dd ?
tagRECT	ends


FILETIME struc ; (sizeof=0x8, standard type)
dwLowDateTime dd ?
dwHighDateTime dd ?
FILETIME ends


tagOFNW	struc ;	(sizeof=0x4C, standard type)
lStructSize dd ?
hwndOwner dd ?		; offset
hInstance dd ?		; offset
lpstrFilter dd ?	; offset
lpstrCustomFilter dd ?	; offset
nMaxCustFilter dd ?
nFilterIndex dd	?
lpstrFile dd ?		; offset
nMaxFile dd ?
lpstrFileTitle dd ?	; offset
nMaxFileTitle dd ?
lpstrInitialDir	dd ?	; offset
lpstrTitle dd ?		; offset
Flags dd ?
nFileOffset dw ?
nFileExtension dw ?
lpstrDefExt dd ?	; offset
lCustData dd ?
lpfnHook dd ?		; offset
lpTemplateName dd ?	; offset
tagOFNW	ends


_OSVERSIONINFOW	struc ;	(sizeof=0x114, standard	type)
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd	?
szCSDVersion dw	128 dup(?)
_OSVERSIONINFOW	ends


in_addr::$A797B59EF72B8B62EA9140E23E05EF83::$4DE764E669F663DACA3CBFDE73714CB5 struc ; (sizeof=0x4, standard type)
s_w1 dw	?
s_w2 dw	?
in_addr::$A797B59EF72B8B62EA9140E23E05EF83::$4DE764E669F663DACA3CBFDE73714CB5 ends


in_addr::$A797B59EF72B8B62EA9140E23E05EF83::$01C175C1F0716DCA00314EDD79DBC0A0 struc ; (sizeof=0x4, standard type)
s_b1 db	?
s_b2 db	?
s_b3 db	?
s_b4 db	?
in_addr::$A797B59EF72B8B62EA9140E23E05EF83::$01C175C1F0716DCA00314EDD79DBC0A0 ends


in_addr::$A797B59EF72B8B62EA9140E23E05EF83 union ; (sizeof=0x4,	standard type)
S_un_b in_addr::$A797B59EF72B8B62EA9140E23E05EF83::$01C175C1F0716DCA00314EDD79DBC0A0 ?
S_un_w in_addr::$A797B59EF72B8B62EA9140E23E05EF83::$4DE764E669F663DACA3CBFDE73714CB5 ?
S_addr dd ?
in_addr::$A797B59EF72B8B62EA9140E23E05EF83 ends


in_addr	struc ;	(sizeof=0x4, standard type)
S_un in_addr::$A797B59EF72B8B62EA9140E23E05EF83	?
in_addr	ends


sockaddr struc ; (sizeof=0x10, standard	type)
sa_family dw ?
sa_data	db 14 dup(?)
sockaddr ends


WSAData	struc ;	(sizeof=0x190, standard	type)
wVersion dw ?
wHighVersion dw	?
szDescription db 257 dup(?)
szSystemStatus db 129 dup(?)
iMaxSockets dw ?
iMaxUdpDg dw ?
db ? ; undefined
db ? ; undefined
lpVendorInfo dd	?	; offset
WSAData	ends


_PROCESS_INFORMATION struc ; (sizeof=0x10, standard type)
hProcess dd ?		; offset
hThread	dd ?		; offset
dwProcessId dd ?
dwThreadId dd ?
_PROCESS_INFORMATION ends


_STARTUPINFOW struc ; (sizeof=0x44, standard type)
cb dd ?
lpReserved dd ?		; offset
lpDesktop dd ?		; offset
lpTitle	dd ?		; offset
dwX dd ?
dwY dd ?
dwXSize	dd ?
dwYSize	dd ?
dwXCountChars dd ?
dwYCountChars dd ?
dwFillAttribute	dd ?
dwFlags	dd ?
wShowWindow dw ?
cbReserved2 dw ?
lpReserved2 dd ?	; offset
hStdInput dd ?		; offset
hStdOutput dd ?		; offset
hStdError dd ?		; offset
_STARTUPINFOW ends


_OSVERSIONINFOA	struc ;	(sizeof=0x94, standard type)
dwOSVersionInfoSize dd ?
dwMajorVersion dd ?
dwMinorVersion dd ?
dwBuildNumber dd ?
dwPlatformId dd	?
szCSDVersion db	128 dup(?)
_OSVERSIONINFOA	ends


_SYSTEM_INFO::$1593C2ABA4C275C0FBEC2498FA3B0937::$AA04DEB0C6383F89F13D312A174572A9 struc ; (sizeof=0x4,	standard type)
wProcessorArchitecture dw ?
wReserved dw ?
_SYSTEM_INFO::$1593C2ABA4C275C0FBEC2498FA3B0937::$AA04DEB0C6383F89F13D312A174572A9 ends


_SYSTEM_INFO::$1593C2ABA4C275C0FBEC2498FA3B0937	union ;	(sizeof=0x4, standard type)
dwOemId	dd ?
anonymous_0 _SYSTEM_INFO::$1593C2ABA4C275C0FBEC2498FA3B0937::$AA04DEB0C6383F89F13D312A174572A9 ?
_SYSTEM_INFO::$1593C2ABA4C275C0FBEC2498FA3B0937	ends


_SYSTEM_INFO struc ; (sizeof=0x24, standard type)
anonymous_0 _SYSTEM_INFO::$1593C2ABA4C275C0FBEC2498FA3B0937 ?
dwPageSize dd ?
lpMinimumApplicationAddress dd ? ; offset
lpMaximumApplicationAddress dd ? ; offset
dwActiveProcessorMask dd ?
dwNumberOfProcessors dd	?
dwProcessorType	dd ?
dwAllocationGranularity	dd ?
wProcessorLevel	dw ?
wProcessorRevision dw ?
_SYSTEM_INFO ends


POINT struc ; (sizeof=0x8, standard type)
x dd ?
y dd ?
POINT ends


tagMSG struc ; (sizeof=0x1C, standard type)
hwnd dd	?		; offset
message	dd ?
wParam dd ?
lParam dd ?
time dd	?
pt POINT ?
tagMSG ends


_SECURITY_ATTRIBUTES struc ; (sizeof=0xC, standard type)
nLength	dd ?
lpSecurityDescriptor dd	? ; offset
bInheritHandle dd ?
_SECURITY_ATTRIBUTES ends


_LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E struc	; (sizeof=0x8, standard	type)
LowPart	dd ?
HighPart dd ?
_LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E ends


LARGE_INTEGER union ; (sizeof=0x8, standard type)
anonymous_0 _LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E ?
u _LARGE_INTEGER::$837407842DC9087486FDFA5FEB63B74E ?
QuadPart dq ?
LARGE_INTEGER ends


_cpinfo	struc ;	(sizeof=0x14, standard type)
MaxCharSize dd ?
DefaultChar db 2 dup(?)
LeadByte db 12 dup(?)
_padding db 2 dup(?)
_cpinfo	ends


_EXCEPTION_POINTERS struc ; (sizeof=0x8, standard type)
ExceptionRecord	dd ?	; offset
ContextRecord dd ?	; offset
_EXCEPTION_POINTERS ends


_SYSTEMTIME struc ; (sizeof=0x10, standard type)
wYear dw ?
wMonth dw ?
wDayOfWeek dw ?
wDay dw	?
wHour dw ?
wMinute	dw ?
wSecond	dw ?
wMilliseconds dw ?
_SYSTEMTIME ends


_FILETIME struc	; (sizeof=0x8, standard	type)
dwLowDateTime dd ?
dwHighDateTime dd ?
_FILETIME ends


HINSTANCE__ struc ; (sizeof=0x4, standard type)
unused dd ?
HINSTANCE__ ends


_STARTUPINFOA struc ; (sizeof=0x44, standard type)
cb dd ?
lpReserved dd ?		; offset
lpDesktop dd ?		; offset
lpTitle	dd ?		; offset
dwX dd ?
dwY dd ?
dwXSize	dd ?
dwYSize	dd ?
dwXCountChars dd ?
dwYCountChars dd ?
dwFillAttribute	dd ?
dwFlags	dd ?
wShowWindow dw ?
cbReserved2 dw ?
lpReserved2 dd ?	; offset
hStdInput dd ?		; offset
hStdOutput dd ?		; offset
hStdError dd ?		; offset
_STARTUPINFOA ends


SYSTEMTIME struc ; (sizeof=0x10, standard type)
wYear dw ?
wMonth dw ?
wDayOfWeek dw ?
wDay dw	?
wHour dw ?
wMinute	dw ?
wSecond	dw ?
wMilliseconds dw ?
SYSTEMTIME ends


_TIME_ZONE_INFORMATION struc ; (sizeof=0xAC, standard type)
Bias dd	?
StandardName dw	32 dup(?)
StandardDate SYSTEMTIME	?
StandardBias dd	?
DaylightName dw	32 dup(?)
DaylightDate SYSTEMTIME	?
DaylightBias dd	?
_TIME_ZONE_INFORMATION ends


_RTL_CRITICAL_SECTION struc ; (sizeof=0x18, standard type)
DebugInfo dd ?		; offset
LockCount dd ?
RecursionCount dd ?
OwningThread dd	?	; offset
LockSemaphore dd ?	; offset
SpinCount dd ?
_RTL_CRITICAL_SECTION ends


CPPEH_RECORD struc ; (sizeof=0x18, standard type)
old_esp	dd ?
exc_ptr	dd ?		; offset
prev_er	dd ?		; offset
handler	dd ?		; offset
msEH_ptr dd ?		; offset
disabled dd ?
CPPEH_RECORD ends


_msEH struc ; (sizeof=0xC)
_unk dd	?		; base 16
FilterProc dd ?		; offset
ExitProc dd ?		; offset
_msEH ends


; enum MINIDUMP_TYPE (standard)
MiniDumpNormal	= 0
MiniDumpWithDataSegs  =	1
MiniDumpWithFullMemory	= 2
MiniDumpWithHandleData	= 4
MiniDumpFilterMemory  =	8
MiniDumpScanMemory  = 10h
MiniDumpWithUnloadedModules  = 20h
MiniDumpWithIndirectlyReferencedMemory	= 40h
MiniDumpFilterModulePaths  = 80h
MiniDumpWithProcessThreadData  = 100h
MiniDumpWithPrivateReadWriteMemory  = 200h
MiniDumpWithoutOptionalData  = 400h
MiniDumpWithFullMemoryInfo  = 800h
MiniDumpWithThreadInfo	= 1000h
MiniDumpWithCodeSegs  =	2000h
MiniDumpWithoutAuxiliaryState  = 4000h
MiniDumpWithFullAuxiliaryState	= 8000h
MiniDumpValidTypeFlags	= 0FFFFh

;
; +-------------------------------------------------------------------------+
; |   This file	has been generated by The Interactive Disassembler (IDA)    |
; |	   Copyright (c) 2009 by Hex-Rays, <support@hex-rays.com>	    |
; |			 License info: 26-F1D8-8733-6E			    |
; |			       TimTech Software				    |
; +-------------------------------------------------------------------------+
;
; Input	MD5   :	29D6870C6E9229CAFD58D0E613D10F89

; File Name   :	C:\LEGO\nexus2\client\legouniverse.exe
; Format      :	Portable executable for	80386 (PE)
; Imagebase   :	400000
; Section 1. (virtual address 00001000)
; Virtual size			: 010190AA (16879786.)
; Section size in file		: 01019200 (16880128.)
; Offset to raw	data for section: 00000400
; Flags	60000020: Text Executable Readable
; Alignment	: default
; OS type	  :  MS	Windows
; Application type:  Executable	32bit

include	uni.inc	; see unicode subdir of	ida for	info on	unicode

.686p
.mmx
.model flat


; Segment type:	Pure code
; Segment permissions: Read/Execute
_text segment para public 'CODE' use32
assume cs:_text
;org 401000h
assume es:nothing, ss:nothing, ds:_data, fs:nothing, gs:nothing



sub_401000 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401000
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	ecx, esi
call	sub_110D9C0
xor	eax, eax
mov	[esp+10h+var_4], eax
mov	dword ptr [esi], offset	off_1547750
mov	[esi+25h], al
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_401000 endp

align 10h



sub_401050 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4010A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	dword ptr [ecx], offset	off_1547750
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_110DE00
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_401050 endp

align 10h



sub_401090 proc	near
mov	byte ptr [ecx+25h], 1
retn
sub_401090 endp

align 10h



sub_4010A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4010A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_1547750
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_110DE00
test	[esp+14h+arg_0], 1
jz	short loc_4010EA
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	esi
call	eax

loc_4010EA:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_4010A0 endp

align 10h



sub_401100 proc	near
mov	dword ptr [eax], offset	off_154774C
mov	[eax+4], ecx
retn
sub_401100 endp

align 10h



sub_401110 proc	near
mov	dword ptr [ecx], offset	off_154774C
retn
sub_401110 endp

align 10h



sub_401120 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154774C
jz	short loc_401143
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8
push	3
push	esi
call	eax

loc_401143:
mov	eax, esi
pop	esi
retn	4
sub_401120 endp

align 10h



sub_401150 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_401150
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	eax, ecx
xor	edx, edx
xor	ecx, ecx
mov	[eax], ecx
mov	cl, [esp+18h+var_15]
push	ebx
mov	[esp+1Ch+var_14], eax
mov	[eax], dl
mov	[eax+4], edx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], edx
mov	[eax+14h], cl
mov	[esp+1Ch+var_4], 1
movzx	ebx, [esp+1Ch+var_15]
lea	ecx, [eax+18h]
mov	[ecx], edx
mov	[esp+1Ch+var_10], ecx
mov	[ecx], dl
mov	[ecx+4], edx
mov	[ecx+8], ecx
mov	[ecx+0Ch], ecx
mov	[ecx+10h], edx
mov	[ecx+14h], bl
mov	byte ptr [esp+1Ch+var_4], 3
movzx	ebx, [esp+1Ch+var_15]
lea	ecx, [eax+30h]
mov	[ecx], edx
mov	[esp+1Ch+var_10], ecx
mov	[ecx], dl
mov	[ecx+4], edx
mov	[ecx+8], ecx
mov	[ecx+0Ch], ecx
mov	[ecx+10h], edx
mov	[ecx+14h], bl
mov	byte ptr [esp+1Ch+var_4], 5
mov	dword ptr [eax+48h], 1
mov	dword ptr [eax+4Ch], 0Ah
mov	dword ptr [eax+50h], 40h
mov	[eax+54h], dl
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+1Ch+var_C]
pop	ebx
mov	large fs:0, ecx
add	esp, 18h
retn
sub_401150 endp

align 10h



sub_401210 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401210
push	eax
mov	eax, 1
mov	large fs:0, esp
test	byte ptr dword_185EF14,	al
jnz	short loc_40125F
or	dword_185EF14, eax
mov	[esp+0Ch+var_4], 0
mov	ecx, offset unk_185EF18
call	sub_401150
push	offset sub_1411A80 ; void (__cdecl *)()
call	_atexit
add	esp, 4
mov	[esp+0Ch+var_4], 0FFFFFFFFh

loc_40125F:
mov	ecx, [esp+0Ch+var_C]
mov	eax, offset unk_185EF18
mov	large fs:0, ecx
add	esp, 0Ch
retn
sub_401210 endp

align 10h



sub_401280 proc	near
mov	[eax+54h], cl
retn
sub_401280 endp

align 10h



sub_401290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_401290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0FFFFFFFFh
cmp	dword ptr [esi+10h], 0
jz	short loc_4012D8
mov	eax, [esi+4]
push	eax
call	sub_403670
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_4012D8:
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_401290 endp

align 10h



sub_4012F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4012F0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0FFFFFFFFh
cmp	dword ptr [esi+10h], 0
jz	short loc_401337
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_4037E0
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_401337:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_4012F0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1411A80

loc_401350:
push	0FFFFFFFFh
push	offset loc_1304B60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 1
lea	eax, [esi+30h]
push	eax
call	sub_4012F0
mov	byte ptr [esp+14h+var_4], 0
lea	ecx, [esi+18h]
call	sub_401290
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, esi
call	sub_401290
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
; END OF FUNCTION CHUNK	FOR sub_1411A80
align 10h



sub_4013B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401D80
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	dword ptr [esi], offset	off_154774C
mov	dword ptr [esi+4], 0FA0h
mov	[esp+10h+var_4], 0
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15477DC
call	sub_10FB830
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_4013B0 endp

align 10h



sub_401410 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401D80
push	eax
mov	large fs:0, esp
push	ebx
push	esi
mov	esi, [esp+14h+arg_0]
mov	dword ptr [esi], offset	off_154774C
mov	dword ptr [esi+4], 0FA1h
xor	ebx, ebx
mov	[esp+14h+var_4], ebx
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15477C0
call	sub_10FB830
mov	byte ptr [esp+14h+var_4], 1
mov	[esi+24h], bl
mov	[esi+25h], bl
mov	[esi+26h], bl
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_401410 endp

align 10h



sub_401480 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_401D30
test	[esp+4+arg_0], 1
jz	short loc_4014A7
test	esi, esi
jz	short loc_4014A7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	esi
call	eax

loc_4014A7:
mov	eax, esi
pop	esi
retn	4
sub_401480 endp

align 10h



sub_4014B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 0FA2h
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_15477C4
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_4014B0 endp




sub_401500 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154774C
jz	short loc_401545
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_401545:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_401500 endp

align 10h



sub_401560 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_401560
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 0FA5h
mov	[esp+10h+var_4], 0
lea	ecx, [eax+8]
mov	dword ptr [eax], offset	off_15477C8
mov	[ecx+20h], ecx
mov	[esp+10h+var_10], ecx
mov	[ecx+24h], ecx
mov	byte ptr [esp+10h+var_4], 1
mov	ecx, [ecx+20h]
xor	edx, edx
mov	[ecx], dx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_401560 endp

align 10h



sub_4015D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_401600
test	[esp+4+arg_0], 1
jz	short loc_4015F7
test	esi, esi
jz	short loc_4015F7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_4015F7:
mov	eax, esi
pop	esi
retn	4
sub_4015D0 endp

align 10h



sub_401600 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401600
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
lea	ecx, [esi+8]
call	sub_407E50
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	dword ptr [esi], offset	off_154774C
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_401600 endp

align 10h



sub_401650 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 0FAAh
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_401650 endp

align 10h



sub_4016A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 0FABh
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_4016A0 endp

align 10h



sub_4016F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 0FACh
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_4016F0 endp

align 10h



sub_401740 proc	near
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
retn
sub_401740 endp

align 10h



sub_401750 proc	near
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+30h]
jmp	eax
sub_401750 endp

align 10h



sub_401760 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_401760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_64A3F0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_401760 endp

align 10h



sub_4017A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4017A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_64A3F0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_4017A0 endp

align 10h



sub_4017E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_401820
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	dword ptr [ecx], offset	off_15477D0
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_64A3F0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_4017E0 endp

align 10h



sub_401820 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_401820
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_15477D0
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_64A3F0
test	[esp+14h+arg_0], 1
jz	short loc_401865
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_401865:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_401820 endp

align 10h



sub_401880 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_401880
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_64A3F0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_401880 endp

align 10h



sub_4018C0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4018C0
push	eax
mov	large fs:0, esp
mov	ecx, [esp+0Ch+arg_0]
or	eax, 0FFFFFFFFh
mov	[esp+0Ch+var_4], eax
mov	dword ptr [ecx], offset	off_15477D0
mov	[esp+0Ch+var_4], eax
call	sub_64A3F0
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_4018C0 endp

align 10h



sub_401900 proc	near
mov	eax, [esi]
mov	edx, [eax+14h]
push	ecx
mov	ecx, esi
call	edx
mov	eax, esi
retn
sub_401900 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_401910(double)
sub_401910 proc	near

var_8= qword ptr -8
arg_0= qword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
mov	eax, [esi]
fld	[ebp+arg_0]
mov	edx, [eax+18h]
sub	esp, 8
mov	ecx, esi
fstp	[esp+8+var_8]
call	edx
mov	eax, esi
mov	esp, ebp
pop	ebp
retn	8
sub_401910 endp



; Attributes: bp-based frame

sub_401930 proc	near

var_8= qword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
mov	eax, [esi]
fild	[ebp+arg_0]
mov	edx, [eax+18h]
sub	esp, 8
mov	ecx, esi
fstp	[esp+8+var_8]
call	edx
mov	eax, esi
mov	esp, ebp
pop	ebp
retn	4
sub_401930 endp



; Attributes: bp-based frame

sub_401950 proc	near

var_48=	qword ptr -48h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 40h
mov	eax, [esi]
mov	[esp+40h+var_4], ecx
fild	[esp+40h+var_4]
test	ecx, ecx
jge	short loc_40196D
fadd	ds:dbl_15FCE08

loc_40196D:
mov	edx, [eax+18h]
sub	esp, 8
mov	ecx, esi
fstp	[esp+48h+var_48]
call	edx
mov	eax, esi
mov	esp, ebp
pop	ebp
retn
sub_401950 endp



; Attributes: bp-based frame

; int __stdcall	sub_401980(__int64 Val)
sub_401980 proc	near

DstBuf=	byte ptr -20h
Val= qword ptr	8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	ecx, dword ptr [ebp+Val+4]
mov	edx, dword ptr [ebp+Val]
sub	esp, 20h
push	0Ah		; Radix
push	20h		; Size
lea	eax, [esp+28h+DstBuf]
push	eax		; DstBuf
push	ecx
push	edx		; Val
call	__i64toa_s
mov	eax, [esi]
mov	edx, [eax+1Ch]
add	esp, 14h
lea	ecx, [esp+20h+DstBuf]
push	ecx
mov	ecx, esi
call	edx
mov	eax, esi
mov	esp, ebp
pop	ebp
retn	8
sub_401980 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4019C0(unsigned __int64 Val)
sub_4019C0 proc	near

DstBuf=	byte ptr -20h
Val= qword ptr	8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	ecx, dword ptr [ebp+Val+4]
mov	edx, dword ptr [ebp+Val]
sub	esp, 20h
push	0Ah		; Radix
push	20h		; Size
lea	eax, [esp+28h+DstBuf]
push	eax		; DstBuf
push	ecx
push	edx		; Val
call	__ui64toa_s
mov	eax, [esi]
mov	edx, [eax+1Ch]
add	esp, 14h
lea	ecx, [esp+20h+DstBuf]
push	ecx
mov	ecx, esi
call	edx
mov	eax, esi
mov	esp, ebp
pop	ebp
retn	8
sub_4019C0 endp

align 10h



sub_401A00 proc	near
mov	eax, [esi]
mov	edx, [eax+1Ch]
push	ecx
mov	ecx, esi
call	edx
mov	eax, esi
retn
sub_401A00 endp

align 10h



sub_401A10 proc	near
mov	eax, [esi]
mov	edx, [eax+20h]
push	ecx
mov	ecx, esi
call	edx
mov	eax, esi
retn
sub_401A10 endp

align 10h



sub_401A20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_401B10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 372Eh
xor	edx, edx
mov	[esp+10h+var_4], edx
lea	ecx, [eax+8]
mov	dword ptr [eax], offset	off_15477D4
mov	[ecx+10h], ecx
mov	[esp+10h+var_10], ecx
mov	[ecx+14h], ecx
mov	byte ptr [esp+10h+var_4], 1
mov	ecx, [ecx+10h]
mov	[ecx], dl
mov	byte ptr [esp+10h+var_4], 2
mov	[eax+20h], edx
mov	[eax+24h], edx
mov	[eax+28h], dl
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_401A20 endp




sub_401A90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_401AC0
test	[esp+4+arg_0], 1
jz	short loc_401AB7
test	esi, esi
jz	short loc_401AB7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_401AB7:
mov	eax, esi
pop	esi
retn	4
sub_401A90 endp

align 10h



sub_401AC0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401AC0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
lea	ecx, [esi+8]
call	sub_407910
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	dword ptr [esi], offset	off_154774C
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_401AC0 endp

align 10h



sub_401B10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_401B10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 372Fh
xor	edx, edx
mov	[esp+10h+var_4], edx
lea	ecx, [eax+8]
mov	dword ptr [eax], offset	off_15477D4
mov	[ecx+10h], ecx
mov	[esp+10h+var_10], ecx
mov	[ecx+14h], ecx
mov	byte ptr [esp+10h+var_4], 1
mov	ecx, [ecx+10h]
mov	[ecx], dl
mov	byte ptr [esp+10h+var_4], 2
mov	[eax+20h], edx
mov	[eax+24h], edx
mov	[eax+28h], dl
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_401B10 endp




sub_401B80 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401D80
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	dword ptr [esi], offset	off_154774C
mov	dword ptr [esi+4], 1795h
mov	[esp+10h+var_4], 0
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15477DC
call	sub_10FB830
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_401B80 endp

align 10h



sub_401BE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154774C
jz	short loc_401C25
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_401C25:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_401BE0 endp

align 10h



sub_401C40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154774C
jz	short loc_401C85
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_401C85:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_401C40 endp

align 10h



sub_401CA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401D80
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	dword ptr [esi], offset	off_154774C
mov	dword ptr [esi+4], 2758h
mov	[esp+10h+var_4], 0
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15477DC

loc_401CD8:
call	sub_10FB830
sub_401CA0 endp	; sp-analysis failed


loc_401CDD:
mov	dword ptr [esp+0Ch], 0FFFFFFFFh
mov	ecx, [esp+4]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
align 10h



sub_401D00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_401D30
test	[esp+4+arg_0], 1
jz	short loc_401D27
test	esi, esi
jz	short loc_401D27
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_401D27:
mov	eax, esi
pop	esi
retn	4
sub_401D00 endp

align 10h



sub_401D30 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401D80
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
lea	ecx, [esi+8]
call	sub_10FB7C0
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	dword ptr [esi], offset	off_154774C
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_401D30 endp

align 10h



sub_401D80 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401D80
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	dword ptr [esi], offset	off_154774C
mov	dword ptr [esi+4], 1C64h
mov	[esp+10h+var_4], 0
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15477DC
call	sub_10FB830
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_401D80 endp

align 10h



sub_401DE0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 32CBh
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CB9C
mov	[eax+8], cl
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_401DE0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12FFCD8

loc_401E30:
mov	eax, [eax]
cmp	eax, offset unk_1889308
jz	short locret_401E40
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
pop	ecx

locret_401E40:
retn
; END OF FUNCTION CHUNK	FOR sub_12FFCD8
align 10h



sub_401E50 proc	near
push	esi
mov	esi, [eax+28h]
test	esi, esi
jz	short loc_401E6C

loc_401E58:
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
test	eax, eax
jnz	short loc_401E70
mov	esi, [esi+28h]
test	esi, esi
jnz	short loc_401E58

loc_401E6C:
xor	eax, eax
pop	esi
retn

loc_401E70:
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
pop	esi
jmp	eax
sub_401E50 endp

align 10h


; Attributes: thunk

sub_401E80 proc	near
jmp	sub_40BA50
sub_401E80 endp

align 10h
; [0000005D BYTES: COLLAPSED FUNCTION filebuf::~filebuf(void). PRESS KEYPAD "+"	TO EXPAND]
align 10h



sub_401EF0 proc	near
mov	eax, ecx
retn
sub_401EF0 endp

align 10h
; [0000001E BYTES: COLLAPSED FUNCTION filebuf::`scalar deleting	destructor'(uint). PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_401F20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401F20
push	eax
mov	eax, 1
mov	large fs:0, esp
test	byte ptr dword_185EF70,	al
jnz	short loc_401F6F
or	dword_185EF70, eax
mov	[esp+0Ch+var_4], 0
mov	ecx, offset unk_185EF78
call	sub_10DEF90
push	offset sub_1411B70 ; void (__cdecl *)()
call	_atexit
add	esp, 4
mov	[esp+0Ch+var_4], 0FFFFFFFFh

loc_401F6F:
mov	ecx, [esp+0Ch+var_C]
mov	eax, offset unk_185EF78
mov	large fs:0, ecx
add	esp, 0Ch
retn
sub_401F20 endp

align 10h



sub_401F90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_401F90
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 2
push	offset sub_407E50
push	0Ah
push	28h
lea	eax, [esi+0F0h]
push	eax
call	$LN21_0
mov	byte ptr [esp+10h+var_4], 1
lea	ecx, [esi+0C4h]
call	sub_407E50
mov	byte ptr [esp+10h+var_4], 0
push	offset sub_407E50
push	4
push	28h
lea	ecx, [esi+24h]
push	ecx
call	$LN21_0
mov	[esp+10h+var_4], 0FFFFFFFFh
push	esi
call	sub_402010
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_401F90 endp

align 10h



sub_402010 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_402010
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, [esp+14h+arg_0]
xor	ecx, ecx
mov	[esp+14h+var_4], ecx
lea	eax, [esi+10h]
mov	[esp+14h+var_10], eax
mov	byte ptr [esp+14h+var_4], cl
add	eax, 4
push	eax
call	sub_4027A0
or	eax, 0FFFFFFFFh
mov	[esp+14h+var_4], eax
mov	dword ptr [esi], offset	off_15477D0
mov	[esp+14h+var_4], eax
mov	ecx, esi
call	sub_64A3F0
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_402010 endp

align 10h



sub_402070 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_402070
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+0Ch+arg_0]
add	eax, 4
push	eax
call	sub_4027A0
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_402070 endp

align 10h



sub_4020B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4020B0
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_4]
push	esi
mov	esi, [esp+10h+arg_0]
mov	dword ptr [esi], offset	off_15477F8
mov	[esi+4], eax
mov	[esi+8], ecx
mov	[esp+10h+var_4], 0
lea	eax, [esi+0Ch]
push	eax
mov	dword ptr [esi], offset	off_15477E0
mov	[esp+14h+arg_4], eax
call	sub_402F00
mov	byte ptr [esp+10h+var_4], 2
mov	dl, [esp+10h+arg_8]
mov	[esi+28h], dl
call	ds:GetCurrentThreadId
mov	[esi+2Ch], eax
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	0Ch
sub_4020B0 endp

align 10h



sub_402130 proc	near
xor	al, al
retn	0Ch
sub_402130 endp

align 10h



; int __thiscall sub_402140(void *, char)
sub_402140 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_4021A0
test	[esp+4+arg_0], 1
jz	short loc_402159
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_402159:
mov	eax, esi
pop	esi
retn	4
sub_402140 endp

align 10h



sub_402160 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_402160
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+0Ch+arg_0]
push	eax
call	sub_402840
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_402160 endp

align 10h



sub_4021A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_4021A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, [esp+14h+arg_0]
xor	ecx, ecx
mov	[esp+14h+var_4], ecx
lea	eax, [esi+0Ch]
mov	[esp+14h+var_10], eax
mov	byte ptr [esp+14h+var_4], cl
push	eax
call	sub_402840
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	dword ptr [esi], offset	off_15477F8
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_4021A0 endp

align 10h



sub_402200 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11D6DD0
test	[esp+4+arg_0], 1
jz	short loc_402229
test	esi, esi
jz	short loc_402229
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	688h
push	3
push	esi
call	eax

loc_402229:
mov	eax, esi
pop	esi
retn	4
sub_402200 endp

align 10h



sub_402230 proc	near

arg_0= byte ptr	 4

mov	ecx, esi
call	sub_10FB7C0
test	[esp+arg_0], 1
jz	short loc_402247
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_402247:
mov	eax, esi
retn	4
sub_402230 endp

align 10h



sub_402250 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
lea	esi, [ecx+0A0h]
mov	ecx, esi
call	sub_402AA0
mov	ecx, esi
mov	[esp+14h+var_10], ecx
mov	dword ptr [ecx], offset	off_144627C
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_77EEB0
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_402250 endp

align 10h



sub_4022A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_63CCE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, ecx
mov	[eax+10h], eax
mov	[esp+10h+var_10], eax
mov	[eax+14h], eax
mov	[esp+10h+var_4], 0
mov	ecx, [eax+10h]
mov	byte ptr [ecx],	0
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_4022A0 endp

align 10h



sub_4022F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, esi
jz	short loc_40230A
mov	ecx, [eax+10h]
mov	edx, [eax+14h]
push	ecx
push	edx
mov	ecx, esi
call	sub_403980

loc_40230A:
mov	eax, esi
pop	esi
retn	4
sub_4022F0 endp




sub_402310 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, esi
push	edi
lea	edi, [eax+1]
jmp	short loc_402320
align 10h

loc_402320:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_402320
sub	eax, edi
add	eax, esi
push	eax
push	esi
call	sub_403980
pop	edi
pop	esi
retn	4
sub_402310 endp

align 10h



sub_402340 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_4038B0
retn	4
sub_402340 endp

align 10h



sub_402360 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, esi
push	edi
lea	edi, [eax+1]
jmp	short loc_402370
align 10h

loc_402370:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_402370
sub	eax, edi
add	eax, esi
push	eax
push	esi
call	sub_4038B0
pop	edi
pop	esi
retn	4
sub_402360 endp

align 10h



sub_402390 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_407E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, ecx
mov	[eax+20h], eax
mov	[esp+10h+var_10], eax
mov	[eax+24h], eax
mov	[esp+10h+var_4], 0
mov	ecx, [eax+20h]
xor	edx, edx
mov	[ecx], dx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_402390 endp

align 10h



sub_4023E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, esi
jz	short loc_4023FA
mov	ecx, [eax+20h]
mov	edx, [eax+24h]
push	ecx
push	edx
mov	ecx, esi
call	sub_403580

loc_4023FA:
mov	eax, esi
pop	esi
retn	4
sub_4023E0 endp




sub_402400 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, esi
push	edi
lea	edi, [eax+2]
jmp	short loc_402410
align 10h

loc_402410:
mov	dx, [eax]
add	eax, 2
test	dx, dx
jnz	short loc_402410
sub	eax, edi
sar	eax, 1
lea	eax, [esi+eax*2]
push	eax
push	esi
call	sub_403580
pop	edi
pop	esi
retn	4
sub_402400 endp

align 10h



sub_402430 proc	near
mov	eax, [ecx+20h]
sub	eax, [ecx+24h]
sar	eax, 1
retn
sub_402430 endp

align 10h



sub_402440 proc	near
mov	ecx, [eax+24h]
cmp	ecx, [eax+20h]
jz	short locret_402453
xor	edx, edx
mov	[ecx], dx
mov	ecx, [eax+24h]
mov	[eax+20h], ecx

locret_402453:
retn
sub_402440 endp

align 10h



sub_402460 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+20h]
mov	eax, [eax+24h]
push	edx
push	eax
call	sub_403490
retn	4
sub_402460 endp

align 10h



sub_402480 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, edx
push	esi
lea	esi, [eax+2]

loc_402486:
mov	cx, [eax]
add	eax, 2
test	cx, cx
jnz	short loc_402486
sub	eax, esi
sar	eax, 1
push	eax
mov	eax, [esp+8+arg_0]
push	eax
mov	eax, [esp+0Ch+arg_4]
call	sub_403610
pop	esi
retn	8
sub_402480 endp

align 10h



sub_4024B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_4024B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
mov	[esp+1Ch+var_10], esi
mov	[esp+1Ch+var_14], edi
cmp	[esp+1Ch+arg_0], edi
jz	short loc_4024F9
lea	ecx, [esi+98h]
mov	dword ptr [esi], offset	unk_155DFA4
call	sub_403170
mov	[esp+1Ch+var_4], edi
mov	[esp+1Ch+var_14], 1

loc_4024F9:
mov	eax, [esi]
mov	ecx, [eax+4]
mov	dword ptr [esi+ecx], offset off_1446328
mov	edx, [esi]
mov	ecx, [edx+4]
push	edi
add	ecx, esi
call	sub_4031E0
mov	[esp+1Ch+var_4], 2
mov	eax, [esi]
mov	ecx, [eax+4]
mov	dword ptr [esi+ecx], offset off_14463D0
lea	edi, [esi+8]
mov	ecx, edi
call	sub_403330
mov	byte ptr [esp+1Ch+var_4], 3
mov	edx, [esi]
mov	ecx, [edx+4]
push	edi
add	ecx, esi
call	sub_4031E0
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 14h
retn	4
sub_4024B0 endp

align 10h



sub_402560 proc	near
xor	eax, eax
cmp	[ecx+30h], al
setnz	al
retn
sub_402560 endp

align 10h



; int __stdcall	sub_402570(LPCSTR lpFileName, int)
sub_402570 proc	near

lpFileName= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+8+lpFileName]
or	eax, 10h
push	eax		; int
lea	edi, [esi+8]
push	ecx		; lpFileName
lea	ecx, [edi+20h]
call	sub_77F4E0
movzx	edx, al
neg	edx
sbb	edx, edx
test	edi, edx
jnz	short loc_4025BB
mov	eax, [esi]
mov	ecx, [eax+4]
mov	eax, [ecx+esi+0Ch]
add	ecx, esi
or	eax, 4
cmp	dword ptr [ecx+58h], 0
jnz	short loc_4025AE
or	eax, 1

loc_4025AE:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_4025BB
call	sub_77F030

loc_4025BB:
pop	edi
pop	esi
retn	8
sub_402570 endp




sub_4025C0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+8]
call	sub_407340
test	eax, eax
jnz	short loc_4025F3
mov	eax, [esi]
mov	ecx, [eax+4]
mov	eax, [ecx+esi+0Ch]
add	ecx, esi
or	eax, 4
cmp	dword ptr [ecx+58h], 0
jnz	short loc_4025E6
or	eax, 1

loc_4025E6:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_4025F3
call	sub_77F030

loc_4025F3:
pop	esi
retn
sub_4025C0 endp

align 10h



sub_402600 proc	near

arg_0= dword ptr  4

cmp	dword ptr [ecx+58h], 0
mov	eax, [esp+arg_0]
jnz	short loc_40260D
or	eax, 1

loc_40260D:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short locret_40261A
call	sub_77F030

locret_40261A:
retn	4
sub_402600 endp

align 10h



sub_402620 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_402620
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], cl
mov	[eax+4], ecx
mov	[eax+10h], ecx
mov	ecx, [esp+0Ch+arg_4]
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	dl, [ecx]
mov	[eax+14h], dl
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	8
sub_402620 endp

align 10h



sub_402670 proc	near
push	eax
push	esi
push	ecx
call	sub_4036B0
mov	eax, esi
retn
sub_402670 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1303150

loc_402680:
cmp	dword ptr [esi+10h], 0
jz	short locret_4026A5
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_403670
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

locret_4026A5:
retn
; END OF FUNCTION CHUNK	FOR sub_1303150
align 10h
; START	OF FUNCTION CHUNK FOR sub_13031D0

loc_4026B0:
cmp	dword ptr [esi+10h], 0
jz	short locret_4026D5
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_4037E0
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

locret_4026D5:
retn
; END OF FUNCTION CHUNK	FOR sub_13031D0
align 10h



sub_4026E0 proc	near

arg_0= dword ptr  4

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
retn
sub_4026E0 endp

align 10h



sub_402700 proc	near
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax]
mov	[ecx], eax
retn
sub_402700 endp

align 10h



sub_402710 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_402710
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
push	ecx
mov	[eax], eax
mov	[eax+4], eax
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_402710 endp

align 10h



sub_402750 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_402750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
push	ecx
call	sub_403A10
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_402750 endp

align 10h



sub_402790 proc	near
mov	eax, [ecx-10h]
mov	edx, [eax+4]
mov	dword ptr [edx+ecx-10h], offset	off_1446298
retn
sub_402790 endp

align 10h



sub_4027A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4027A0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
mov	ecx, [esi+4]
mov	eax, [esi]
push	ecx
mov	edx, esp
mov	[edx], eax
push	ecx
mov	eax, esp
mov	[eax], ecx
call	sub_405620
add	esp, 8
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_40282C
mov	esi, [esi+8]
sub	esi, ecx
mov	eax, 2E8BA2E9h
imul	esi
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 58h
cmp	eax, 80h
jbe	short loc_402822
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4

loc_402822:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_40282C:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_4027A0 endp

align 10h



sub_402840 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_402840
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebp
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	[esp+1Ch+var_4], 1
lea	ebp, [edi+4]
push	ebp
call	sub_403D80
mov	eax, [edi+0Ch]
sub	eax, [edi+8]
lea	esi, [edi+8]
lea	ecx, [esp+1Ch+var_10]
push	ecx
sar	eax, 2
push	eax
mov	ecx, esi
mov	[esp+24h+var_10], 0
call	sub_403AD0
mov	dword ptr [edi+14h], 0
mov	byte ptr [esp+1Ch+var_4], 0
mov	ecx, esi
call	sub_402DB0
or	eax, 0FFFFFFFFh
mov	[esp+1Ch+var_4], eax
mov	[esp+1Ch+arg_0], ebp
mov	[esp+1Ch+var_4], eax
push	ebp
call	sub_403D80
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_402840 endp

align 10h



sub_4028D0 proc	near
mov	eax, [eax]
add	eax, 8
retn
sub_4028D0 endp

align 10h



sub_4028E0 proc	near
mov	ecx, [eax+4]
sub	ecx, [eax]
mov	eax, 30C30C31h
imul	ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
retn
sub_4028E0 endp

align 10h



sub_402900 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_402940
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_402900 endp

align 10h



sub_402940 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_402940
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
mov	ecx, [esi+4]
mov	eax, [esi]
push	ecx
mov	edx, esp
mov	[edx], eax
push	ecx
mov	eax, esp
mov	[eax], ecx
call	sub_4056F0
add	esp, 8
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_4029CC
mov	esi, [esi+8]
sub	esi, ecx
mov	eax, 30C30C31h
imul	esi
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 54h
cmp	eax, 80h
jbe	short loc_4029C2
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4

loc_4029C2:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_4029CC:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_402940 endp

align 10h



sub_4029E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_4029E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
mov	[esp+20h+var_10], esi
mov	[esp+20h+var_14], edi
cmp	[esp+20h+arg_0], edi
jz	short loc_402A29
lea	ecx, [esi+0A0h]
mov	dword ptr [esi], offset	unk_1573BF8
call	sub_403170
mov	[esp+20h+var_4], edi
mov	[esp+20h+var_14], 1

loc_402A29:
mov	eax, [esi]
mov	ecx, [eax+4]
mov	dword ptr [esi+ecx], offset off_1446298
mov	edx, [esi]
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	ecx, [edx+4]
push	edi
add	ecx, esi
call	sub_4031E0
mov	[esp+20h+var_4], 2
mov	eax, [esi]
mov	ecx, [eax+4]
mov	dword ptr [esi+ecx], offset off_14463C8
lea	edi, [esi+10h]
mov	ecx, edi
call	sub_403330
mov	byte ptr [esp+20h+var_4], 3
mov	edx, [esi]
mov	ecx, [edx+4]
push	edi
add	ecx, esi
call	sub_4031E0
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	ecx, [esp+20h+var_C]
pop	edi
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 18h
retn	4
sub_4029E0 endp

align 10h



sub_402AA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_402AA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [ecx-0A0h]
mov	edx, [eax+4]
push	esi
mov	[esp+14h+var_10], ecx
mov	dword ptr [edx+ecx-0A0h], offset off_14463C8
mov	[esp+14h+var_4], 0
lea	esi, [ecx-90h]
mov	ecx, esi
call	sub_4073F0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, [esi-10h]
mov	ecx, [eax+4]
mov	dword ptr [ecx+esi-10h], offset	off_1446298
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_402AA0 endp

align 10h



; int __stdcall	sub_402B10(LPCSTR lpFileName, int)
sub_402B10 proc	near

lpFileName= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+8+lpFileName]
or	eax, 8
push	eax		; int
lea	edi, [esi+10h]
push	ecx		; lpFileName
lea	ecx, [edi+20h]
call	sub_77F4E0
movzx	edx, al
neg	edx
sbb	edx, edx
test	edi, edx
jnz	short loc_402B5B
mov	eax, [esi]
mov	ecx, [eax+4]
mov	eax, [ecx+esi+0Ch]
add	ecx, esi
or	eax, 4
cmp	dword ptr [ecx+58h], 0
jnz	short loc_402B4E
or	eax, 1

loc_402B4E:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_402B5B
call	sub_77F030

loc_402B5B:
pop	edi
pop	esi
retn	8
sub_402B10 endp




sub_402B60 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_407340
test	eax, eax
jnz	short loc_402B93
mov	eax, [esi]
mov	ecx, [eax+4]
mov	eax, [ecx+esi+0Ch]
add	ecx, esi
or	eax, 4
cmp	dword ptr [ecx+58h], 0
jnz	short loc_402B86
or	eax, 1

loc_402B86:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_402B93
call	sub_77F030

loc_402B93:
pop	esi
retn
sub_402B60 endp

align 10h



sub_402BA0 proc	near

arg_0= byte ptr	 4

push	esi
lea	esi, [ecx-10h]
mov	ecx, esi
call	sub_402C00
test	[esp+4+arg_0], 1
jz	short loc_402BBB
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_402BBB:
mov	eax, esi
pop	esi
retn	4
sub_402BA0 endp

align 10h



sub_402BD0 proc	near

arg_0= byte ptr	 4

push	esi
lea	esi, [ecx-0A0h]
mov	ecx, esi
call	sub_402250
test	[esp+4+arg_0], 1
jz	short loc_402BEE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_402BEE:
mov	eax, esi
pop	esi
retn	4
sub_402BD0 endp

align 10h



sub_402C00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
lea	eax, [ecx+10h]
mov	ecx, [eax-10h]
mov	edx, [ecx+4]
mov	dword ptr [edx+eax-10h], offset	off_1446298
mov	[esp+10h+var_10], eax
mov	dword ptr [eax], offset	off_144627C
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, eax
call	sub_77EEB0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_402C00 endp

align 10h



; int __stdcall	sub_402C50(int,	size_t)
sub_402C50 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+14h]
mov	[esi+10h], esi
mov	[edi], esi
mov	[esp+8+arg_4], eax
cmp	eax, 0FFFFFFFFh
ja	short loc_402C93
test	eax, eax
jbe	short loc_402C93
cmp	eax, 10h
jbe	short loc_402C8C
lea	ecx, [esp+8+arg_4]
push	ecx		; int
push	eax		; size_t
mov	ecx, edi
call	sub_407BD0
mov	edx, [esp+8+arg_4]
mov	[edi], eax
mov	[esi+10h], eax
add	eax, edx
mov	[esi], eax

loc_402C8C:
pop	edi
mov	eax, esi
pop	esi
retn	8

loc_402C93:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_402C50 endp

align 10h



sub_402CA0 proc	near
mov	eax, [ecx+24h]
xor	edx, edx
cmp	eax, [ecx+20h]
setz	dl
mov	al, dl
retn
sub_402CA0 endp

align 10h



sub_402CB0 proc	near

arg_0= dword ptr  4

mov	eax, edx
push	esi
lea	esi, [eax+2]

loc_402CB6:
mov	cx, [eax]
add	eax, 2
test	cx, cx
jnz	short loc_402CB6
mov	ecx, [esp+4+arg_0]
sub	eax, esi
sar	eax, 1
lea	eax, [edx+eax*2]
push	eax
push	edx
call	sub_403490
pop	esi
retn	4
sub_402CB0 endp

align 10h



sub_402CE0 proc	near
mov	eax, [ecx+20h]
retn
sub_402CE0 endp

align 10h



sub_402CF0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	[esi+20h], esi
push	eax
mov	[esi+24h], esi
call	sub_407750
mov	eax, esi
pop	esi
retn	8
sub_402CF0 endp

align 10h



sub_402D10 proc	near
mov	eax, [ecx+58h]
retn
sub_402D10 endp

align 10h



sub_402D20 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
or	eax, [esp+arg_0]
cmp	dword ptr [ecx+58h], 0
jnz	short loc_402D30
or	eax, 1

loc_402D30:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short locret_402D3D
call	sub_77F030

locret_402D3D:
retn	4
sub_402D20 endp




; int __stdcall	sub_402D40(LPCSTR lpFileName, int)
sub_402D40 proc	near

lpFileName= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+lpFileName]
push	eax		; int
push	ecx		; lpFileName
lea	ecx, [esi+20h]
call	sub_77F4E0
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
pop	esi
retn	8
sub_402D40 endp

align 10h



sub_402D70 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 0
jz	short loc_402D96
mov	eax, [esi+4]
push	eax
call	sub_403670
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_402D96:
pop	esi
retn
sub_402D70 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12FEC23

loc_402DA0:
push	eax
call	sub_403A10
retn
; END OF FUNCTION CHUNK	FOR sub_12FEC23
align 10h



sub_402DB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4045A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	edx, [ecx]
test	edx, edx
jz	short loc_402E0C
mov	eax, [ecx+8]
sub	eax, edx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_402E02
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn

loc_402E02:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

loc_402E0C:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_402DB0 endp

align 10h



sub_402E20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_402E20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
mov	[esp+1Ch+var_10], esi
mov	[esp+1Ch+var_14], edi
cmp	[esp+1Ch+arg_4], edi
jz	short loc_402E66
lea	ecx, [esi+10h]
mov	dword ptr [esi], offset	unk_1547744
call	sub_403170
mov	[esp+1Ch+var_4], edi
mov	[esp+1Ch+var_14], 1

loc_402E66:
mov	eax, [esi]
mov	ecx, [eax+4]
mov	edx, [esp+1Ch+arg_0]
mov	dword ptr [esi+ecx], offset off_1446298
mov	eax, [esi]
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	ecx, [eax+4]
push	edx
add	ecx, esi
call	sub_4031E0
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 14h
retn	8
sub_402E20 endp

align 10h



sub_402EB0 proc	near
mov	edx, [ecx]
mov	[eax], edx
retn
sub_402EB0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1305FF0

loc_402EC0:
push	esi
mov	esi, [eax]
test	esi, esi
jz	short loc_402EFC
mov	ecx, [eax+8]
sub	ecx, esi
mov	eax, 2E8BA2E9h
imul	ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 58h
cmp	eax, 80h
jbe	short loc_402EF2
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi
retn

loc_402EF2:
push	eax
push	esi
call	sub_77E0D0
add	esp, 8

loc_402EFC:
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_1305FF0
align 10h



sub_402F00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_402F00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
lea	eax, [esi+4]
xor	ebp, ebp
push	edi
mov	[esp+20h+var_10], eax
mov	[eax], ebp
mov	[esp+20h+var_4], 1
lea	ebx, [esi+8]
mov	eax, ebx
mov	[eax], ebp
mov	[eax+4], ebp
mov	[esp+20h+var_10], eax
mov	[eax+8], ebp
mov	byte ptr [esp+20h+var_4], 3
movss	xmm0, ds:dword_1479C54
push	ebp
mov	[esi+14h], ebp
movss	dword ptr [esi+18h], xmm0
call	sub_77EAA0
mov	edi, eax
add	esp, 4
inc	edi
push	edi
mov	ecx, ebx
call	sub_403A50
lea	eax, [esp+20h+var_10]
push	eax
push	edi
mov	ecx, ebx
mov	[esp+28h+var_10], ebp
call	sub_403AD0
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	ecx, [esp+20h+var_C]
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_402F00 endp

align 10h



sub_402FA0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_402FA0
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+0Ch+arg_0]
push	eax
call	sub_403D80
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_402FA0 endp

align 10h



sub_402FE0 proc	near
mov	edx, [ecx+4]
mov	[eax], edx
retn
sub_402FE0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12FFE20

loc_402FF0:
push	esi
mov	esi, [eax]
test	esi, esi
jz	short loc_40302C
mov	ecx, [eax+8]
sub	ecx, esi
mov	eax, 30C30C31h
imul	ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 54h
cmp	eax, 80h
jbe	short loc_403022
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi
retn

loc_403022:
push	eax
push	esi
call	sub_77E0D0
add	esp, 8

loc_40302C:
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_12FFE20
align 10h



sub_403030 proc	near
add	eax, 4
retn
sub_403030 endp

align 10h



sub_403040 proc	near
add	eax, 0Ch
retn
sub_403040 endp

align 10h



sub_403050 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4045A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[esp+10h+var_10], eax
mov	[eax+8], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_403050 endp

align 10h



sub_403090 proc	near
mov	edx, [ecx]
test	edx, edx
jz	short locret_4030BD
mov	eax, [ecx+8]
sub	eax, edx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_4030B3
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_4030B3:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

locret_4030BD:
retn
sub_403090 endp

align 10h



; int __fastcall sub_4030C0(void *)
sub_4030C0 proc	near
test	ecx, ecx
jz	short locret_4030E2
imul	eax, 58h
cmp	eax, 80h
jbe	short loc_4030D8
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_4030D8:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_4030E2:
retn
sub_4030C0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1305F90

loc_4030F0:
push	eax
call	sub_403D80
retn
; END OF FUNCTION CHUNK	FOR sub_1305F90
align 10h



; int __fastcall sub_403100(void *)
sub_403100 proc	near
test	ecx, ecx
jz	short locret_403122
imul	eax, 54h
cmp	eax, 80h
jbe	short loc_403118
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_403118:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_403122:
retn
sub_403100 endp

align 10h


; Attributes: thunk

sub_403130 proc	near
jmp	sub_403AD0
sub_403130 endp

align 10h



; int __stdcall	sub_403140(void	*, int)
sub_403140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
test	ecx, ecx
jz	short locret_40316D
mov	eax, [esp+arg_4]
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_403163
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn	8

loc_403163:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_40316D:
retn	8
sub_403140 endp




sub_403170 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
call	sub_77EE60
xor	eax, eax
mov	[esp+14h+var_4], eax
xor	ecx, ecx
mov	dword ptr [esi], offset	off_144627C
mov	[esi+54h], cx
mov	[esi+58h], eax
mov	[esi+5Ch], eax
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_403170 endp

align 10h



sub_4031D0 proc	near
mov	ecx, [ecx+50h]
mov	eax, [ecx]
mov	eax, [eax+28h]
jmp	eax
sub_4031D0 endp

align 10h


; Attributes: bp-based frame

sub_4031E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, large fs:0
push	0FFFFFFFFh
push	offset sub_13012B8
push	eax
mov	large fs:0, esp
sub	esp, 10h
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
xor	eax, eax
push	edi
xor	edi, edi
cmp	ebx, edi
setz	al
mov	esi, ecx
mov	[esi+58h], ebx
mov	[esi+0Ch], eax
test	[esi+18h], eax
jz	short loc_40321F
call	sub_77F030

loc_40321F:
lea	ecx, [esp+28h+var_14]
call	sub_77FEE0
mov	[esp+28h+var_4], edi
push	eax
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, esi
call	sub_404870
lea	ecx, [esp+28h+var_18]
call	sub_77FF40
mov	[esp+28h+var_4], 0FFFFFFFFh
lea	ecx, [esp+28h+var_14]
call	sub_77FF40
xor	ecx, ecx
cmp	ebx, edi
setz	cl
mov	[esi+5Ch], edi
mov	[esi+18h], edi
mov	dword ptr [esi+8], 1008h
mov	[esi+28h], edi
mov	[esi+2Ch], edi
mov	dword ptr [esi+20h], 6
mov	[esi+0Ch], ecx
mov	ecx, [esi+50h]
mov	[esi+24h], edi
mov	edx, [ecx]
mov	eax, [edx+28h]
push	20h
call	eax
mov	ecx, [esp+0Ch+arg_8]
pop	edi
mov	[esi+54h], ax
pop	esi
mov	large fs:0, ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4031E0 endp

align 10h



sub_4032A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_4032A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
cmp	[esp+14h+arg_4], 0
push	esi
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_14], 0
jz	short loc_4032EC
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	unk_155DF44
call	sub_403170
mov	[esp+18h+var_4], 0
mov	[esp+18h+var_14], 1

loc_4032EC:
mov	eax, [esi]
mov	ecx, [eax+4]
mov	edx, [esp+18h+arg_0]
mov	dword ptr [esi+ecx], offset off_1446328
mov	eax, [esi]
mov	ecx, [eax+4]
push	edx
add	ecx, esi
call	sub_4031E0
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, [esp+18h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 14h
retn	8
sub_4032A0 endp

align 10h



sub_403330 proc	near

var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_403330
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
mov	[esp+1Ch+var_10], esi
call	sub_404940
xor	ebx, ebx
mov	[esp+1Ch+var_4], ebx
lea	ecx, [esi+20h]
mov	dword ptr [esi], offset	off_1446374
call	sub_77F1B0
mov	eax, 1
lea	ecx, [esp+1Ch+var_14]
mov	[esi+30h], bl
mov	[esi+31h], bl
mov	[esi+32h], bl
mov	[esi+33h], bl
mov	[esi+34h], bl
mov	[esi+35h], bl
mov	[esi+36h], bl
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
mov	[esi+58h], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ebx
mov	[esi+68h], ebx
mov	[esi+6Ch], ebx
mov	[esi+70h], ebx
mov	[esi+74h], ebx
mov	[esi+78h], eax
mov	[esi+7Ch], eax
call	sub_77FEE0
mov	byte ptr [esp+1Ch+var_4], 1
push	ebx
push	eax
mov	ecx, esi
call	sub_406970
mov	byte ptr [esp+1Ch+var_4], bl
lea	ecx, [esp+1Ch+var_14]
call	sub_77FF40
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+1Ch+var_C]
mov	eax, esi
pop	esi
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_403330 endp

align 10h



sub_403400 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_407E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	[esi+20h], esi
push	edi
mov	[esp+20h+var_10], esi
mov	[esi+24h], esi
mov	[esp+20h+var_4], 0
mov	eax, [esp+20h+arg_0]
mov	ebp, [eax+20h]
mov	ebx, [eax+24h]
mov	edi, ebp
sub	edi, ebx
mov	eax, edi
sar	eax, 1
inc	eax
push	eax
call	sub_407750
mov	eax, [esi+24h]
cmp	ebp, ebx
jz	short loc_40345B
push	edi
push	ebx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi

loc_40345B:
mov	[esi+20h], eax
xor	ecx, ecx
mov	[eax], cx
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	ecx, [esp+20h+var_C]
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_403400 endp

align 10h



sub_403490 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, ecx
cmp	ebp, edx
jz	loc_403570
mov	ecx, [esi+20h]
push	ebx
push	edi
mov	edi, edx
sub	edi, ebp
lea	ebx, [esi+24h]
sar	edi, 1
cmp	[ebx], esi
jnz	short loc_4034C9
mov	edx, ecx
sub	edx, esi
sar	edx, 1
mov	eax, 10h
sub	eax, edx
mov	edx, [esp+10h+arg_4]
jmp	short loc_4034CF

loc_4034C9:
mov	eax, [esi]
sub	eax, ecx
sar	eax, 1

loc_4034CF:
cmp	edi, eax
jb	short loc_40353E
push	edi
mov	ecx, esi
call	sub_404390
lea	ecx, [esp+10h+arg_0]
push	ecx
push	eax
mov	ecx, ebx
mov	[esp+18h+arg_0], eax
call	sub_4076B0
mov	ecx, [ebx]
push	0
lea	edx, [esp+14h+arg_4]
push	edx
mov	edi, eax
mov	eax, [esi+20h]
push	edi
push	eax
push	ecx
call	sub_405400
mov	edx, [esp+24h+arg_4]
push	0
lea	ecx, [esp+28h+arg_4]
push	ecx
push	eax
push	edx
push	ebp
call	sub_405400
mov	ebp, eax
xor	eax, eax
add	esp, 28h
mov	ecx, esi
mov	[ebp+0], ax
call	sub_407E10
mov	ecx, [esp+10h+arg_0]
lea	edx, [edi+ecx*2]
mov	[ebx], edi
pop	edi
pop	ebx
mov	[esi+20h], ebp
mov	[esi], edx
mov	eax, esi
pop	esi
pop	ebp
retn	8

loc_40353E:
push	0
lea	eax, [esp+14h+arg_4]
push	eax
add	ecx, 2
push	ecx
push	edx
lea	ecx, [ebp+2]
push	ecx
call	sub_405400
mov	edx, [esi+20h]
add	edi, edi
xor	eax, eax
mov	[edi+edx], ax
mov	ecx, [esi+20h]
mov	dx, [ebp+0]
add	esp, 14h
mov	[ecx], dx
add	[esi+20h], edi
pop	edi
pop	ebx

loc_403570:
mov	eax, esi
pop	esi
pop	ebp
retn	8
sub_403490 endp

align 10h



sub_403580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, ecx
mov	edx, [esi+24h]
mov	ecx, [esi+20h]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, ebx
sub	eax, edi
sub	ecx, edx
sar	eax, 1
sar	ecx, 1
cmp	eax, ecx
ja	short loc_4035E5
push	ebp
lea	ebp, [eax+eax]
push	ebp
push	edi
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ebx, [esi+24h]
mov	edi, [esi+20h]
add	ebx, ebp
add	esp, 0Ch
pop	ebp
cmp	ebx, edi
jz	short loc_403607
mov	eax, edi
sub	eax, edi
sar	eax, 1
lea	ecx, [eax+eax+2]
push	ecx
push	edi
push	ebx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
sub	edi, ebx
sar	edi, 1
neg	edi
add	esp, 0Ch
add	edi, edi
add	[esi+20h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8

loc_4035E5:
lea	eax, [ecx+ecx]
push	eax
push	edi
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esi+20h]
sub	ecx, [esi+24h]
add	esp, 0Ch
sar	ecx, 1
lea	edx, [edi+ecx*2]
push	ebx
push	edx
mov	ecx, esi
call	sub_403490

loc_403607:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_403580 endp

align 10h



sub_403610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [ecx+20h]
push	edi
mov	edi, [ecx+24h]
mov	ecx, esi
sub	ecx, edi
sar	ecx, 1
cmp	eax, ecx
jnb	short loc_403657
push	ebp
lea	ebp, [eax+ebx]
cmp	ebp, ecx
pop	ebp
ja	short loc_403657
mov	ecx, [esp+0Ch+arg_4]
push	ecx
lea	ecx, [edx+ebx*2]
push	ecx
push	edx
lea	eax, [edi+eax*2]
call	sub_4049E0
add	esp, 0Ch
cmp	eax, esi
jz	short loc_40365F
sub	eax, edi
pop	edi
pop	esi
sar	eax, 1
pop	ebx
retn	8

loc_403657:
test	ebx, ebx
jnz	short loc_40365F
cmp	eax, ecx
jbe	short loc_403662

loc_40365F:
or	eax, 0FFFFFFFFh

loc_403662:
pop	edi
pop	esi
pop	ebx
retn	8
sub_403610 endp

align 10h



sub_403670 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, ecx
test	esi, esi
jz	short loc_4036A8
push	edi
lea	ecx, [ecx+0]

loc_403680:
mov	eax, [esi+0Ch]
push	eax
mov	ecx, ebx
call	sub_403670
mov	edi, [esi+8]
lea	ecx, [esi+10h]
call	sub_407910
push	28h
push	esi
call	sub_77E0D0
add	esp, 8
mov	esi, edi
test	edi, edi
jnz	short loc_403680
pop	edi

loc_4036A8:
pop	esi
pop	ebx
retn	4
sub_403670 endp

align 10h



sub_4036B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	ebp
mov	ebp, [ecx+4]
push	esi
push	edi
mov	edi, ecx
mov	al, 1
test	ebp, ebp
jz	short loc_403742
mov	eax, [esp+18h+arg_8]
mov	edx, [eax+14h]
mov	ecx, [eax+10h]
sub	ecx, edx
mov	[esp+18h+var_8], edx
mov	[esp+18h+arg_4], ecx
jmp	short loc_4036E8

loc_4036E0:
mov	edx, [esp+18h+var_8]
mov	ecx, [esp+18h+arg_4]

loc_4036E8:
mov	eax, [ebp+24h]
mov	esi, [ebp+20h]
sub	esi, eax
cmp	esi, ecx
mov	edi, ebp
mov	[esp+18h+var_4], esi
lea	ecx, [esp+18h+var_4]
jl	short loc_403702
lea	ecx, [esp+18h+arg_4]

loc_403702:
mov	ecx, [ecx]
push	ecx
push	eax
push	edx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_40372B
mov	eax, [esp+18h+arg_4]
cmp	eax, esi
jge	short loc_403720
or	eax, 0FFFFFFFFh
jmp	short loc_403729

loc_403720:
xor	edx, edx
cmp	eax, esi
setnle	dl
mov	eax, edx

loc_403729:
test	eax, eax

loc_40372B:
setl	al
test	al, al
jz	short loc_403737
mov	ebp, [ebp+8]
jmp	short loc_40373A

loc_403737:
mov	ebp, [ebp+0Ch]

loc_40373A:
test	ebp, ebp
jnz	short loc_4036E0
mov	ecx, [esp+18h+arg_0]

loc_403742:
mov	esi, edi
test	al, al
jz	short loc_40377B
push	edi
cmp	edi, [ecx+8]
jnz	short loc_403771
lea	eax, [esp+1Ch+arg_8]
push	eax
mov	eax, [esp+20h+arg_8]
push	ecx
call	sub_404A70
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch

loc_403771:
call	sub_77E330
add	esp, 4
mov	esi, eax

loc_40377B:
mov	eax, [esp+18h+arg_8]
mov	edx, [eax+10h]
mov	eax, [eax+14h]
mov	ecx, [esi+20h]
push	edx
mov	edx, [esi+24h]
push	eax
push	ecx
push	edx
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_4037C3
mov	ecx, [esp+18h+arg_0]
push	ebp
lea	eax, [esp+1Ch+arg_8]
push	eax
mov	eax, [esp+20h+arg_8]
push	ecx
call	sub_404A70
mov	edx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], edx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch

loc_4037C3:
pop	edi
mov	[ebx], esi
pop	esi
pop	ebp
mov	byte ptr [ebx+4], 0
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch
sub_4036B0 endp

align 10h



sub_4037E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4037E0
push	eax
mov	large fs:0, esp
push	ebx
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	ebx, ecx
test	esi, esi
jz	short loc_403835

loc_403802:
mov	eax, [esi+0Ch]
push	eax
mov	ecx, ebx
call	sub_4037E0
mov	edi, [esi+8]
lea	ecx, [esi+10h]
mov	[esp+18h+arg_0], ecx
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_407910
push	34h
push	esi
call	sub_77E0D0
add	esp, 8
mov	esi, edi
test	edi, edi
jnz	short loc_403802

loc_403835:
mov	ecx, [esp+18h+var_C]
pop	edi
pop	esi
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_4037E0 endp

align 10h



sub_403850 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_63CCE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esi+10h], esi
mov	[esp+14h+var_10], esi
mov	[esi+14h], esi
mov	[esp+14h+var_4], 0
mov	eax, [esp+14h+arg_0]
mov	ecx, [eax+10h]
mov	eax, [eax+14h]
push	ecx
push	eax
mov	ecx, esi
call	sub_407CA0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_403850 endp

align 10h



sub_4038B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, ecx
cmp	ebp, edx
jz	loc_403978
mov	ecx, [esi+10h]
push	ebx
push	edi
mov	edi, edx
lea	ebx, [esi+14h]
sub	edi, ebp
cmp	[ebx], esi
jnz	short loc_4038DD
mov	eax, esi
sub	eax, ecx
add	eax, 10h
jmp	short loc_4038E1

loc_4038DD:
mov	eax, [esi]
sub	eax, ecx

loc_4038E1:
cmp	edi, eax
jb	short loc_40394E
push	edi
mov	ecx, esi
call	sub_404250
lea	ecx, [esp+10h+arg_0]
push	ecx		; int
push	eax		; size_t
mov	ecx, ebx
mov	[esp+18h+arg_0], eax
call	sub_407BD0
mov	ecx, [ebx]
push	0
lea	edx, [esp+14h+arg_4]
push	edx
mov	edi, eax
mov	eax, [esi+10h]
push	edi
push	eax
push	ecx
call	sub_405470
mov	edx, [esp+24h+arg_4]
push	0
lea	ecx, [esp+28h+arg_4]
push	ecx
push	eax
push	edx
push	ebp
call	sub_405470
mov	ebp, eax
add	esp, 28h
mov	ecx, esi
mov	byte ptr [ebp+0], 0
call	sub_4079F0
mov	eax, [esp+10h+arg_0]
lea	ecx, [edi+eax]
mov	[ebx], edi
pop	edi
pop	ebx
mov	[esi+10h], ebp
mov	[esi], ecx
mov	eax, esi
pop	esi
pop	ebp
retn	8

loc_40394E:
push	0
lea	eax, [esp+14h+arg_4]
push	eax
inc	ecx
push	ecx
push	edx
lea	ecx, [ebp+1]
push	ecx
call	sub_405470
mov	edx, [esi+10h]
mov	byte ptr [edi+edx], 0
mov	eax, [esi+10h]
mov	cl, [ebp+0]
add	esp, 14h
mov	[eax], cl
add	[esi+10h], edi
pop	edi
pop	ebx

loc_403978:
mov	eax, esi
pop	esi
pop	ebp
retn	8
sub_4038B0 endp

align 10h



sub_403980 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
mov	eax, [esi+10h]
push	edi
mov	edi, ebp
sub	edi, ebx
sub	eax, ecx
cmp	edi, eax
ja	short loc_4039DB
test	edi, edi
jz	short loc_4039AD
push	edi
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_4039AD:
mov	ebx, [esi+14h]
mov	ebp, [esi+10h]
add	ebx, edi
cmp	ebx, ebp
jz	short loc_4039F9
mov	eax, ebp
sub	eax, ebp
add	eax, 1
jz	short loc_4039CD
push	eax
push	ebp
push	ebx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_4039CD:
sub	ebx, ebp
add	[esi+10h], ebx
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_4039DB:
test	eax, eax
jz	short loc_4039EA
push	eax
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_4039EA:
sub	ebx, [esi+14h]
push	ebp
add	ebx, [esi+10h]
mov	ecx, esi
push	ebx
call	sub_4038B0

loc_4039F9:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_403980 endp

align 10h



sub_403A10 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx]
cmp	esi, ebx
jz	short loc_403A3C
push	edi
lea	ecx, [ecx+0]

loc_403A20:
mov	edi, esi
mov	esi, [esi]
lea	ecx, [edi+8]
call	sub_407910
push	20h
push	edi
call	sub_77E0D0
add	esp, 8
cmp	esi, ebx
jnz	short loc_403A20
pop	edi

loc_403A3C:
pop	esi
mov	[ebx+4], ebx
mov	[ebx], ebx
pop	ebx
retn	4
sub_403A10 endp

align 10h



sub_403A50 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [esi+8]
lea	ebp, [esi+8]
sub	ecx, eax
sar	ecx, 2
cmp	ecx, edx
jnb	short loc_403AC7
cmp	edx, 3FFFFFFFh
jbe	short loc_403A7B
push	offset aVector	; "vector"
call	sub_77EC70

loc_403A7B:
mov	ecx, [esi+4]
push	ebx
mov	ebx, ecx
sub	ebx, eax
sar	ebx, 2
push	edi
test	eax, eax
jz	short loc_403AA4
push	ecx
push	eax
lea	edx, [esp+18h+arg_0]
push	edx
mov	ecx, esi
call	sub_404B60
mov	ecx, esi
mov	edi, eax
call	sub_403090
jmp	short loc_403AB3

loc_403AA4:
lea	eax, [esp+10h+arg_0]
push	eax
push	edx
mov	ecx, ebp
call	sub_4047F0
mov	edi, eax

loc_403AB3:
mov	edx, [esp+10h+arg_0]
lea	ecx, [edi+ebx*4]
lea	eax, [edi+edx*4]
mov	[esi], edi
pop	edi
mov	[esi+4], ecx
mov	[ebp+0], eax
pop	ebx

loc_403AC7:
pop	esi
pop	ebp
retn	4
sub_403A50 endp

align 10h



sub_403AD0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_403AD0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [esi+8]
sub	ecx, eax
push	edi
mov	edi, [esp+20h+arg_0]
sar	ecx, 2
cmp	edi, ecx
jbe	short loc_403B6E
lea	edx, [esp+20h+arg_4]
push	edx
mov	ecx, esi
call	sub_604B20
push	eax
mov	eax, [esp+24h+arg_4]
push	eax
push	edi
lea	ecx, [esp+2Ch+var_18]
call	sub_4045A0
mov	[esp+20h+var_4], 0
mov	ecx, [esi]
mov	eax, [esp+20h+var_18]
mov	[esi], eax
mov	eax, [esp+20h+var_14]
mov	edx, [esi+4]
mov	[esi+4], eax
mov	eax, [esp+20h+var_10]
mov	[esp+20h+var_18], ecx
mov	ecx, [esi+8]
mov	[esp+20h+var_14], edx
mov	[esp+20h+var_10], ecx
mov	[esi+8], eax
mov	[esp+20h+var_4], 0FFFFFFFFh
lea	ecx, [esp+20h+var_18]
call	sub_402DB0
pop	edi
pop	esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
add	esp, 18h
retn	8

loc_403B6E:
push	ebp
mov	ebp, [esi+4]
mov	edx, ebp
sub	edx, eax
sar	edx, 2
cmp	edi, edx
jbe	short loc_403BC3
push	ebx
mov	ebx, [esp+28h+arg_4]
push	ebx
push	ebp
push	eax
call	sub_404BF0
mov	eax, [esi+4]
mov	ecx, eax
sub	ecx, [esi]
push	0
sar	ecx, 2
lea	edx, [esp+38h+arg_4]
push	edx
sub	edi, ecx
lea	edi, [eax+edi*4]
push	ebx
push	edi
push	eax
call	sub_4054F0
add	esp, 20h
pop	ebx
pop	ebp
mov	[esi+4], edi
pop	edi
pop	esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
add	esp, 18h
retn	8

loc_403BC3:
mov	ecx, edi
test	edi, edi
jbe	short loc_403BDC
mov	edx, [esp+24h+arg_4]
lea	ecx, [ecx+0]

loc_403BD0:
mov	edi, [edx]
mov	[eax], edi
dec	ecx
add	eax, 4
test	ecx, ecx
ja	short loc_403BD0

loc_403BDC:
push	ebp
push	eax
mov	ecx, esi
call	sub_404670
mov	ecx, [esp+24h+var_C]
pop	ebp
pop	edi
pop	esi
mov	large fs:0, ecx
add	esp, 18h
retn	8
sub_403AD0 endp

align 10h



sub_403C00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_0]
xor	ebx, ebx
push	esi
mov	[esp+14h+var_4], ebx
call	sub_4050F0
add	esp, 4
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
test	al, al
jz	short loc_403C8C
mov	eax, [esi]
mov	ecx, [eax+4]
mov	eax, [ecx+esi+58h]
mov	edx, [eax+0Ch]
push	edi
cmp	edx, [eax+8]
jz	short loc_403C4F
push	edi
push	ebp
mov	ebx, 1
push	eax
mov	[esp+20h+var_4], ebx
push	esi
mov	[esp+24h+var_4], ebx
call	sub_404C70
add	esp, 14h
jmp	short loc_403C6E

loc_403C4F:
push	ebp
push	0
push	0FFFh
mov	ebx, 2
push	eax
mov	[esp+24h+var_4], ebx
push	esi
mov	[esp+28h+var_4], ebx
call	sub_404EC0
add	esp, 18h

loc_403C6E:
mov	[esi+8], eax
mov	[esi+0Ch], edx
test	bl, 2
jz	short loc_403C80
and	ebx, 0FFFFFFFDh
mov	[esp+10h+var_4], ebx

loc_403C80:
test	bl, 1
jz	short loc_403C8C
and	ebx, 0FFFFFFFEh
mov	[esp+10h+var_4], ebx

loc_403C8C:
mov	eax, [esi+8]
or	eax, [esi+0Ch]
jnz	short loc_403CB8
mov	ecx, [esi]
mov	ecx, [ecx+4]
mov	eax, [ecx+esi+0Ch]
add	ecx, esi
or	eax, 4
cmp	dword ptr [ecx+58h], 0
jnz	short loc_403CAB
or	eax, 1

loc_403CAB:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_403CB8
call	sub_77F030

loc_403CB8:
pop	ebp
mov	eax, esi
pop	ebx
add	esp, 8
retn	4
sub_403C00 endp	; sp-analysis failed

align 10h



sub_403CD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset SEH_404090
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
push	esi
xor	eax, eax
push	edi
mov	[esp+24h+var_4], eax
mov	ebp, [esp+24h+arg_8]
mov	[esp+24h+var_10], eax
mov	edi, [esp+24h+arg_4]
mov	ebx, [edi+10h]
mov	esi, [ebp+10h]
mov	byte ptr [esp+24h+var_14], al
lea	eax, [esp+24h+arg_4]
push	eax
mov	ecx, edi
call	sub_604B20
sub	esi, [ebp+14h]
mov	ecx, [esp+24h+var_14]
sub	esi, [edi+14h]
push	eax
add	esi, ebx
push	esi
mov	esi, [esp+2Ch+arg_0]
push	ecx
mov	ecx, esi
call	sub_4041F0
mov	[esp+24h+var_4], 0
mov	eax, [edi+10h]
mov	edi, [edi+14h]
push	eax
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], 1
call	sub_4038B0
mov	eax, [ebp+10h]
mov	ebp, [ebp+14h]
push	eax
push	ebp
mov	ecx, esi
call	sub_4038B0
mov	ecx, [esp+24h+var_C]
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_403CD0 endp

align 10h



sub_403D80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx]
test	esi, esi
jz	short loc_403DAC
push	edi
lea	ecx, [ecx+0]

loc_403D90:
mov	edi, esi
mov	esi, [esi]
lea	ecx, [edi+4]
call	sub_407E50
push	2Ch
push	edi
call	sub_77E0D0
add	esp, 8
test	esi, esi
jnz	short loc_403D90
pop	edi

loc_403DAC:
xor	eax, eax
pop	esi
mov	[ebx], eax
pop	ebx
retn	4
sub_403D80 endp

align 10h



sub_403DC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_409DD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
mov	ebx, [esp+14h+arg_4]
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
xor	ebp, ebp
mov	esi, ecx
mov	[esp+20h+var_4], ebp
mov	eax, ebx
mov	[esp+20h+var_10], ebp
lea	edx, [eax+2]

loc_403DF3:
mov	cx, [eax]
add	eax, 2
cmp	cx, bp
jnz	short loc_403DF3
sub	eax, edx
sar	eax, 1
mov	ebp, eax
mov	eax, [esi+20h]
sub	eax, [esi+24h]
mov	byte ptr [esp+20h+arg_4], 0
sar	eax, 1
add	eax, ebp
push	eax
mov	eax, [esp+24h+arg_4]
push	eax
push	edi
call	sub_404330
mov	[esp+20h+var_4], 0
mov	eax, [esi+20h]
mov	esi, [esi+24h]
push	eax
push	esi
mov	ecx, edi
mov	[esp+28h+var_10], 1
call	sub_403490
lea	ecx, [esp+20h+arg_4]
push	ecx
lea	edx, [ebx+ebp*2]
push	edx
push	ebx
mov	ecx, edi
call	sub_405800
mov	ecx, [esp+20h+var_C]
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn
sub_403DC0 endp

align 10h


; Attributes: bp-based frame

sub_403E70 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset SEH_403E70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[esp+3Ch+var_18], edi
call	sub_405170
add	esp, 4
mov	[esp+38h+var_14], al
xor	ebx, ebx
mov	[esp+38h+var_4], ebx
test	al, al
jz	loc_403F74
mov	ecx, [ebp+arg_0]
mov	eax, [ecx+20h]
sub	eax, [ecx+24h]
sar	eax, 1
mov	esi, eax
mov	eax, [edi]
mov	ecx, [eax+4]
mov	edx, [ecx+edi+28h]
lea	eax, [ecx+edi]
mov	ecx, [eax+8]
and	cl, 1
mov	[esp+38h+var_29], cl
mov	ecx, [eax+2Ch]
cmp	ebx, ecx
mov	[eax+28h], ebx
mov	[eax+2Ch], ebx
mov	eax, [edi]
mov	eax, [eax+4]
mov	eax, [eax+edi+58h]
mov	[esp+38h+var_24], esi
mov	[esp+38h+var_28], eax
jg	short loc_403F00
jl	short loc_403EF6
cmp	esi, edx
jnb	short loc_403F00

loc_403EF6:
sub	edx, esi
sbb	ecx, ebx
mov	dword ptr [esp+38h+var_20], edx
jmp	short loc_403F06

loc_403F00:
xor	ecx, ecx
mov	dword ptr [esp+38h+var_20], ecx

loc_403F06:
mov	dword ptr [esp+38h+var_20+4], ecx
cmp	[esp+38h+var_29], bl
jnz	short loc_403F2E
mov	edx, dword ptr [esp+38h+var_20]
push	ecx
mov	esi, eax
push	edx
mov	eax, edi
call	sub_405030
add	esp, 8
test	al, al
jz	short loc_403F4C
mov	esi, [esp+38h+var_24]
mov	eax, [esp+38h+var_28]

loc_403F2E:
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx+24h]
mov	edx, [eax]
push	ebx
push	esi
push	ecx
mov	ecx, eax
mov	eax, [edx+28h]
call	eax
cmp	eax, esi
jnz	short loc_403F4C
cmp	edx, ebx
jnz	short loc_403F4C
mov	al, 1
jmp	short loc_403F4E

loc_403F4C:
xor	al, al

loc_403F4E:
cmp	[esp+38h+var_29], bl
jz	short loc_403F70
test	al, al
jz	short loc_403F74
mov	ecx, dword ptr [esp+38h+var_20+4]
mov	edx, dword ptr [esp+38h+var_20]
mov	esi, [esp+38h+var_28]
push	ecx
push	edx
mov	eax, edi
call	sub_405030
add	esp, 8

loc_403F70:
test	al, al
jnz	short loc_403F98

loc_403F74:
mov	eax, [edi]
mov	ecx, [eax+4]
mov	eax, [ecx+edi+0Ch]
add	ecx, edi
or	eax, 4
cmp	dword ptr [ecx+58h], 0
jnz	short loc_403F8B
or	eax, 1

loc_403F8B:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_403F98
call	sub_77F030

loc_403F98:
mov	[esp+38h+var_4], 0FFFFFFFFh
mov	ecx, [edi]
mov	edx, [ecx+4]
test	dword ptr [edx+edi+8], 2000h
jz	short loc_403FBF
call	j_?__uncaught_exception@@YA_NXZ	; __uncaught_exception(void)
test	al, al
jnz	short loc_403FBF
mov	ecx, edi
call	sub_4047A0

loc_403FBF:
mov	ecx, [esp+38h+var_C]
pop	esi
mov	eax, edi
mov	large fs:0, ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_403E70 endp	; sp-analysis failed

align 10h



sub_403FE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_409DD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
mov	ebx, [esp+14h+arg_4]
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
xor	ebp, ebp
mov	esi, ecx
mov	[esp+20h+var_4], ebp
mov	eax, ebx
mov	[esp+20h+var_10], ebp
lea	edx, [eax+2]

loc_404013:
mov	cx, [eax]
add	eax, 2
cmp	cx, bp
jnz	short loc_404013
sub	eax, edx
sar	eax, 1
mov	ebp, eax
mov	eax, [esi+20h]
sub	eax, [esi+24h]
mov	byte ptr [esp+20h+arg_4], 0
sar	eax, 1
add	eax, ebp
push	eax
mov	eax, [esp+24h+arg_4]
push	eax
push	edi
call	sub_404330
mov	[esp+20h+var_4], 0
lea	ecx, [esp+20h+arg_4]
push	ecx
lea	edx, [ebx+ebp*2]
push	edx
push	ebx
mov	ecx, edi
mov	[esp+2Ch+var_10], 1
call	sub_405800
mov	eax, [esi+20h]
mov	esi, [esi+24h]
push	eax
push	esi
mov	ecx, edi
call	sub_403490
mov	ecx, [esp+20h+var_C]
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn
sub_403FE0 endp

align 10h



sub_404090 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_404090
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
push	esi
push	edi
xor	eax, eax
mov	edi, ecx
mov	[esp+28h+var_4], eax
mov	[esp+28h+var_10], eax
mov	eax, [esp+28h+arg_4]
lea	ecx, [eax+1]

loc_4040C3:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_4040C3
mov	esi, [edi+10h]
sub	eax, ecx
mov	ebx, eax
lea	eax, [esp+28h+var_15]
push	eax
mov	ecx, edi
mov	byte ptr [esp+2Ch+var_14], dl
call	sub_604B20
sub	esi, [edi+14h]
mov	ecx, [esp+28h+var_14]
push	eax
add	esi, ebx
push	esi
push	ecx
mov	ecx, ebp
call	sub_4041F0
mov	[esp+28h+var_4], 0
mov	eax, [esp+28h+arg_4]
lea	edx, [esp+28h+arg_4]
push	edx
add	ebx, eax
push	ebx
push	eax
mov	ecx, ebp
mov	[esp+34h+var_10], 1
call	sub_405900
mov	eax, [edi+10h]
mov	edi, [edi+14h]
push	eax
push	edi
mov	ecx, ebp
call	sub_4038B0
mov	ecx, [esp+28h+var_C]
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 18h
retn
sub_404090 endp

align 10h



sub_404140 proc	near
mov	eax, edi
push	esi
lea	esi, [eax+1]

loc_404146:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_404146
mov	ecx, [edx+14h]
mov	edx, [edx+10h]
sub	eax, esi
sub	edx, ecx
pop	esi
cmp	eax, edx
jnz	short loc_404171
push	eax
push	ecx
push	edi
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_404171
mov	eax, 1
retn

loc_404171:
xor	eax, eax
retn
sub_404140 endp

align 10h



sub_404180 proc	near
mov	eax, edi
push	esi
lea	esi, [eax+1]

loc_404186:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_404186
mov	ecx, [edx+14h]
mov	edx, [edx+10h]
sub	eax, esi
sub	edx, ecx
pop	esi
cmp	eax, edx
jnz	short loc_4041BA
push	eax
push	ecx
push	edi
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_4041BA
mov	eax, 1
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn

loc_4041BA:
xor	eax, eax
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_404180 endp

align 10h



sub_4041D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, [esp+arg_0]
push	ecx
mov	ecx, esp
mov	[ecx], edx
push	ecx
mov	ecx, esp
mov	[ecx], eax
call	sub_405620
add	esp, 8
retn
sub_4041D0 endp

align 10h



sub_4041F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset SEH_63CCE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+14h+arg_8]
inc	eax
push	eax		; size_t
push	ecx		; int
mov	ecx, esi
mov	[esp+1Ch+var_10], esi
call	sub_402C50
mov	[esp+14h+var_4], 0
mov	eax, [esi+10h]
mov	byte ptr [eax],	0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	0Ch
sub_4041F0 endp

align 10h



sub_404250 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [ecx+10h]
sub	edx, [ecx+14h]
mov	eax, [esp+4+arg_0]
mov	ecx, 0FFFFFFFEh
sub	ecx, edx
mov	[esp+4+var_4], edx
cmp	eax, ecx
jbe	short loc_404273
push	offset aBasic_string ; "basic_string"
call	sub_77EC70

loc_404273:
cmp	eax, edx
lea	eax, [esp+4+var_4]
jb	short loc_40427E
lea	eax, [esp+4+arg_0]

loc_40427E:
mov	eax, [eax]
lea	eax, [eax+edx+1]
cmp	eax, 0FFFFFFFEh
ja	short loc_40428D
cmp	eax, edx
jnb	short loc_404292

loc_40428D:
mov	eax, 0FFFFFFFEh

loc_404292:
pop	ecx
retn	4
sub_404250 endp

align 10h



sub_4042A0 proc	near
mov	eax, [ecx+10h]
sub	eax, [ecx+14h]
retn
sub_4042A0 endp

align 10h



sub_4042B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
cmp	edi, esi
jz	short loc_4042DD
mov	eax, [ebx+10h]
sub	eax, esi
add	eax, 1
jz	short loc_4042D6
push	eax
push	esi
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_4042D6:
mov	eax, edi
sub	eax, esi
add	[ebx+10h], eax

loc_4042DD:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_4042B0 endp

align 10h



sub_4042F0 proc	near
cmp	[ecx+14h], ecx
jnz	short loc_4042FE
mov	eax, ecx
sub	eax, [ecx+10h]
add	eax, 10h
retn

loc_4042FE:
mov	eax, [ecx]
sub	eax, [ecx+10h]
retn
sub_4042F0 endp

align 10h



sub_404310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
mov	[ecx], eax
mov	eax, [esp+arg_0]
mov	[ecx+10h], edx
mov	[ecx+14h], eax
retn	0Ch
sub_404310 endp

align 10h



sub_404330 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_404330
push	eax
mov	eax, [esp+0Ch+arg_8]
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
inc	eax
mov	[esi+20h], esi
push	eax
mov	ecx, esi
mov	[esi+24h], esi
call	sub_407750
mov	[esp+10h+var_4], 0
mov	eax, [esi+20h]
xor	ecx, ecx
mov	[eax], cx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	0Ch
sub_404330 endp

align 10h



sub_404390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [ecx+20h]
sub	edx, [ecx+24h]
mov	eax, [esp+4+arg_0]
sar	edx, 1
mov	ecx, 7FFFFFFEh
sub	ecx, edx
mov	[esp+4+var_4], edx
cmp	eax, ecx
jbe	short loc_4043B5
push	offset aBasic_string ; "basic_string"
call	sub_77EC70

loc_4043B5:
cmp	eax, edx
lea	eax, [esp+4+var_4]
jb	short loc_4043C0
lea	eax, [esp+4+arg_0]

loc_4043C0:
mov	eax, [eax]
lea	eax, [eax+edx+1]
cmp	eax, 7FFFFFFEh
ja	short loc_4043D1
cmp	eax, edx
jnb	short loc_4043D6

loc_4043D1:
mov	eax, 7FFFFFFEh

loc_4043D6:
pop	ecx
retn	4
sub_404390 endp

align 10h



sub_4043E0 proc	near
mov	eax, 7FFFFFFEh
retn
sub_4043E0 endp

align 10h



sub_4043F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
cmp	edi, esi
jz	short loc_404422
mov	eax, [ebx+20h]
sub	eax, esi
sar	eax, 1
lea	ecx, [eax+eax+2]
push	ecx
push	esi
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
sub	esi, edi
sar	esi, 1
neg	esi
add	esi, esi
add	esp, 0Ch
add	[ebx+20h], esi

loc_404422:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_4043F0 endp

align 10h



sub_404430 proc	near
mov	eax, [ecx+24h]
retn
sub_404430 endp

align 10h



sub_404440 proc	near
cmp	[ecx+24h], ecx
jnz	short loc_404454
mov	edx, [ecx+20h]
sub	edx, ecx
sar	edx, 1
mov	eax, 10h
sub	eax, edx
retn

loc_404454:
mov	eax, [ecx]
sub	eax, [ecx+20h]
sar	eax, 1
retn
sub_404440 endp

align 10h



sub_404460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
mov	[ecx], eax
mov	eax, [esp+arg_0]
mov	[ecx+20h], edx
mov	[ecx+24h], eax
retn	0Ch
sub_404460 endp

align 10h



sub_404480 proc	near

arg_0= word ptr	 4

mov	dx, [esp+arg_0]
movzx	eax, word ptr [ecx+54h]
mov	[ecx+54h], dx
retn	4
sub_404480 endp




sub_404490 proc	near
mov	eax, [ecx+50h]
retn
sub_404490 endp

align 10h


; Attributes: bp-based frame

sub_4044A0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
mov	eax, [eax+28h]
push	edx
mov	edx, [ebp+arg_4]
push	edx
mov	edx, [ebp+arg_0]
push	edx
call	eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4044A0 endp

align 10h



sub_4044C0 proc	near
add	eax, 8
retn
sub_4044C0 endp

align 10h



sub_4044D0 proc	near
mov	edx, [ecx+8]
mov	[eax], edx
retn
sub_4044D0 endp

align 10h



; int __fastcall sub_4044E0(void *)
sub_4044E0 proc	near
test	ecx, ecx
jz	short locret_404508
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_4044FE
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_4044FE:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_404508:
retn
sub_4044E0 endp

align 10h



sub_404510 proc	near
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
mov	edx, [ecx+10h]
push	eax
mov	eax, [ecx+14h]
push	edx
push	eax
call	sub_4051D0
xor	ecx, ecx
add	esp, 10h
test	eax, eax
setl	cl
mov	al, cl
retn
sub_404510 endp

align 10h



sub_404540 proc	near
add	eax, 10h
retn
sub_404540 endp

align 10h



; int __fastcall sub_404550(void *)
sub_404550 proc	near
test	ecx, ecx
jz	short locret_404572
shl	eax, 5
cmp	eax, 80h
jbe	short loc_404568
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_404568:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_404572:
retn
sub_404550 endp

align 10h



sub_404580 proc	near
mov	eax, [ecx+4]
sub	eax, [ecx]
sar	eax, 2
retn
sub_404580 endp

align 10h



sub_404590 proc	near
mov	eax, 3FFFFFFFh
retn
sub_404590 endp

align 10h



sub_4045A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_4045A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
mov	ebx, [esp+14h+arg_0]
push	esi
mov	esi, ecx
push	edi
lea	eax, [esp+1Ch+arg_0]
lea	edi, [esi+8]
push	eax
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
push	ebx
mov	ecx, edi
mov	[esp+24h+var_10], esi
mov	[esp+24h+arg_0], ebx
mov	dword ptr [edi], 0
call	sub_4047F0
mov	ecx, [esp+1Ch+arg_0]
lea	edx, [eax+ecx*4]
mov	[esi], eax
mov	[esi+4], eax
mov	[edi], edx
mov	[esp+1Ch+var_4], 0
mov	eax, [esi]
mov	edx, [esp+1Ch+arg_4]
push	0
lea	ecx, [esp+20h+arg_0]
push	ecx
push	edx
lea	edi, [eax+ebx*4]
push	edi
push	eax
call	sub_4054F0
add	esp, 14h
mov	[esi+4], edi
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	0Ch
sub_4045A0 endp

align 10h



sub_404640 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [ecx]
push	esi
mov	esi, [eax]
mov	[ecx], esi
mov	[eax], edx
mov	esi, [eax+4]
mov	edx, [ecx+4]
mov	[ecx+4], esi
mov	[eax+4], edx
mov	esi, [eax+8]
mov	edx, [ecx+8]
mov	[ecx+8], esi
mov	[eax+8], edx
pop	esi
retn	4
sub_404640 endp

align 10h



sub_404670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	edi
mov	edi, [esp+8+arg_0]
mov	ebx, ecx
cmp	edi, eax
jz	short loc_4046A6
push	esi
mov	esi, [ebx+4]
sub	esi, eax
jz	short loc_4046A0
push	esi
push	eax
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, esi
mov	[ebx+4], eax
pop	esi
mov	eax, edi
pop	edi
pop	ebx
retn	8

loc_4046A0:
mov	eax, edi
mov	[ebx+4], eax
pop	esi

loc_4046A6:
mov	eax, edi
pop	edi
pop	ebx
retn	8
sub_404670 endp

align 10h



sub_4046B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx], eax
mov	eax, [esp+arg_8]
mov	[ecx+4], edx
mov	[ecx+8], eax
retn	0Ch
sub_4046B0 endp

align 10h


; Attributes: thunk

sub_4046D0 proc	near
jmp	sub_4047F0
sub_4046D0 endp

align 10h



sub_4046E0 proc	near
mov	[eax], ecx
retn
sub_4046E0 endp

align 10h



sub_4046F0 proc	near
mov	al, [eax]
retn
sub_4046F0 endp

align 10h



sub_404700 proc	near
mov	[eax], cx
retn
sub_404700 endp

align 10h



sub_404710 proc	near
push	eax
mov	[esi], eax
call	sub_405170
mov	[esi+4], al
add	esp, 4
mov	eax, esi
retn
sub_404710 endp

align 10h



sub_404730 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [eax]
mov	edx, [ecx+4]
test	dword ptr [edx+eax+8], 2000h
jz	short loc_404755
call	j_?__uncaught_exception@@YA_NXZ	; __uncaught_exception(void)
test	al, al
jnz	short loc_404755
mov	ecx, [esi]
pop	esi
jmp	sub_4047A0

loc_404755:
pop	esi
retn
sub_404730 endp

align 10h



sub_404760 proc	near
mov	al, [eax+4]
retn
sub_404760 endp

align 10h



sub_404770 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
test	eax, eax
jnz	short loc_40477D
mov	eax, [esp+arg_0]
retn

loc_40477D:
mov	[esp+arg_8], eax
jmp	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
sub_404770 endp

align 10h



sub_404790 proc	near
mov	eax, 0FFFFFFFEh
retn
sub_404790 endp

align 10h



sub_4047A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [eax+4]
mov	ecx, [ecx+esi+58h]
test	ecx, ecx
jz	short loc_4047E0
mov	edx, [ecx]
mov	eax, [edx+10h]
call	eax
cmp	eax, 0FFFFFFFFh
jnz	short loc_4047E0
mov	ecx, [esi]
mov	ecx, [ecx+4]
mov	eax, [ecx+esi+0Ch]
add	ecx, esi
or	eax, 1
cmp	dword ptr [ecx+58h], 0
jnz	short loc_4047D3
or	eax, 1

loc_4047D3:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_4047E0
call	sub_77F030

loc_4047E0:
mov	eax, esi
pop	esi
retn
sub_4047A0 endp

align 10h



sub_4047F0 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 0Ch
cmp	eax, 3FFFFFFFh
jbe	short loc_404815
lea	ecx, [esp+0Ch+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+10h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_404815:
test	eax, eax
jz	short loc_404864
add	eax, eax
add	eax, eax
mov	[esp+0Ch+arg_0], eax
cmp	eax, 80h
jbe	short loc_404844
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+10h+arg_0]
mov	ecx, [esp+10h+arg_4]
add	esp, 4
shr	edx, 2
mov	[ecx], edx
add	esp, 0Ch
retn	8

loc_404844:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
call	sub_77E150
mov	edx, [esp+10h+arg_0]
mov	ecx, [esp+10h+arg_4]
add	esp, 4
shr	edx, 2
mov	[ecx], edx
add	esp, 0Ch
retn	8

loc_404864:
xor	eax, eax
add	esp, 0Ch
retn	8
sub_4047F0 endp

align 10h


; Attributes: bp-based frame

sub_404870 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_404870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	esi, ecx
mov	[ebp+var_18], esi
xor	ebx, ebx
mov	[ebp+var_4], ebx
mov	[ebp+var_14], ebx
mov	edi, [ebp+arg_4]
push	edi
mov	eax, [ebp+arg_0]
push	eax
call	sub_77EF60
mov	[ebp+var_4], ebx
mov	eax, 1
mov	[ebp+var_14], eax
mov	[ebp+var_4], eax
mov	ecx, [esi+58h]
cmp	ecx, ebx
jz	short loc_4048D2
push	edi
lea	edx, [ebp+arg_4]
push	edx
call	sub_405380
lea	ecx, [ebp+arg_4]
call	sub_77FF40

loc_4048D2:
push	edi
call	sub_405D60
add	esp, 4
mov	[esi+50h], eax
mov	[ebp+var_4], ebx

loc_4048E1:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_404870 endp




sub_4048F7 proc	near
mov	esi, [ebp+8]
push	esi
lea	eax, [ebp+0Ch]
push	eax
mov	edi, [ebp-18h]
mov	ecx, edi
call	sub_77EF60
mov	byte ptr [ebp-4], 3
push	eax
mov	ecx, esi
call	sub_77FF50
mov	byte ptr [ebp-4], 2
lea	ecx, [ebp+0Ch]
call	sub_77FF40
push	4
mov	ecx, edi
call	sub_405360
mov	dword ptr [ebp-4], 0
mov	eax, offset loc_4048E1
retn
sub_4048F7 endp

align 10h



sub_404940 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_406A50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
push	esi
mov	esi, ecx
lea	ecx, [esi+1Ch]
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_14462EC
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
call	sub_77FEE0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_404940 endp

align 10h



sub_4049A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [eax]
mov	ecx, [esp+arg_4]
cmp	edx, [ecx]
jnb	short locret_4049B0
mov	eax, ecx

locret_4049B0:
retn
sub_4049A0 endp

align 10h



sub_4049C0 proc	near

var_2= byte ptr	-2
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	0
lea	eax, [esp+7]
push	eax
mov	eax, [esp+0Ch+arg_0]
push	ecx
push	edx
push	eax
call	sub_405400
add	esp, 18h
retn
sub_4049C0 endp




sub_4049E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [esp+4+arg_4]
mov	ecx, [esp+4+arg_0]
cmp	eax, esi
jz	short loc_404A29
cmp	ecx, edx
jz	short loc_404A29
push	ebx
lea	ebx, [ecx+2]
mov	[esp+8+var_4], ebx
cmp	ebx, edx
jnz	short loc_404A0F
movzx	ecx, word ptr [ecx]

loc_404A00:
cmp	[eax], cx
jz	short loc_404A28
add	eax, 2
cmp	eax, esi
jnz	short loc_404A00
pop	ebx
pop	ecx
retn

loc_404A0F:
push	ebp
push	edi

loc_404A11:
cmp	eax, esi
jz	short loc_404A24
movzx	ecx, word ptr [ecx]

loc_404A18:
cmp	[eax], cx
jz	short loc_404A2B
add	eax, 2
cmp	eax, esi
jnz	short loc_404A18

loc_404A24:
mov	eax, esi

loc_404A26:
pop	edi
pop	ebp

loc_404A28:
pop	ebx

loc_404A29:
pop	ecx
retn

loc_404A2B:
cmp	eax, esi
jz	short loc_404A24
lea	edi, [eax+2]
mov	ecx, edi
mov	edx, ebx
cmp	ecx, esi
jz	short loc_404A24
mov	bp, [ecx]
cmp	bp, [ebx]
jnz	short loc_404A60
mov	ebx, [esp+10h+arg_4]

loc_404A46:
add	edx, 2
cmp	edx, ebx
jz	short loc_404A26
add	ecx, 2
cmp	ecx, esi
jz	short loc_404A24
mov	bp, [ecx]
cmp	bp, [edx]
jz	short loc_404A46
mov	ebx, [esp+10h+var_4]

loc_404A60:
mov	ecx, [esp+10h+arg_0]
mov	eax, edi
jmp	short loc_404A11
sub_4049E0 endp

align 10h



sub_404A70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
xor	ebx, ebx
push	esi
mov	esi, eax
mov	[esp+10h+var_4], ebx
cmp	edi, ebp
jnz	short loc_404A94
push	esi
call	sub_4052C0
mov	esi, eax
mov	[edi+8], esi
mov	[ebp+4], esi
jmp	short loc_404AFD

loc_404A94:
cmp	[esp+10h+arg_8], ebx
jnz	short loc_404AC3
mov	eax, [edi+20h]
mov	ecx, [edi+24h]
mov	edx, [esi+10h]
push	eax
mov	eax, [esi+14h]
push	ecx
mov	ebx, 1
push	edx
mov	[esp+1Ch+var_4], ebx
push	eax
mov	[esp+20h+var_4], ebx
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_404AC7

loc_404AC3:
mov	al, 1
jmp	short loc_404AC9

loc_404AC7:
xor	al, al

loc_404AC9:
test	bl, 1
jz	short loc_404AD5
and	ebx, 0FFFFFFFEh
mov	[esp+10h+var_4], ebx

loc_404AD5:
push	esi
test	al, al
jz	short loc_404AEE
call	sub_4052C0
mov	esi, eax
mov	[edi+8], esi
cmp	edi, [ebp+8]
jnz	short loc_404B00
mov	[ebp+8], esi
jmp	short loc_404B00

loc_404AEE:
call	sub_4052C0
mov	esi, eax
mov	[edi+0Ch], esi
cmp	edi, [ebp+0Ch]
jnz	short loc_404B00

loc_404AFD:
mov	[ebp+0Ch], esi

loc_404B00:
lea	ecx, [ebp+4]
push	ecx
push	esi
mov	[esi+4], edi
call	sub_77E4A0
mov	eax, [esp+18h+arg_4]
add	esp, 8
inc	dword ptr [ebp+10h]
mov	[eax], esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_404A70 endp




sub_404B20 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
jmp	sub_407910
sub_404B20 endp

align 10h



sub_404B30 proc	near

var_2= byte ptr	-2
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	0
lea	eax, [esp+7]
push	eax
mov	eax, [esp+0Ch+arg_0]
push	ecx
push	edx
push	eax
call	sub_405470
add	esp, 18h
retn
sub_404B30 endp



; Attributes: noreturn

sub_404B50 proc	near
push	offset aVector	; "vector"
call	sub_77EC70
sub_404B50 endp

align 10h


; Attributes: bp-based frame

sub_404B60 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_404B60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	edx, [eax]
push	eax
push	edx
add	ecx, 8
call	sub_4047F0
mov	esi, eax
mov	[ebp+var_14], esi
mov	[ebp+var_4], 0
push	esi
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_404B60 endp



; Attributes: noreturn

sub_404BC5 proc	near
mov	edx, [ebp+8]
mov	eax, [edx]
push	eax		; int
mov	ecx, [ebp-14h]
push	ecx		; void *
mov	ecx, [ebp-18h]
add	ecx, 8
call	sub_403140
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_404BC5 endp

align 10h



sub_404BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_4]
sub	eax, ecx
sar	eax, 2
test	eax, eax
jle	short locret_404C13
mov	edx, [esp+arg_8]
push	esi

loc_404C06:
mov	esi, [edx]
mov	[ecx], esi
dec	eax
add	ecx, 4
test	eax, eax
jg	short loc_404C06
pop	esi

locret_404C13:
retn
sub_404BF0 endp

align 10h



sub_404C20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
push	esi
push	0
lea	esi, [eax+ecx*4]
mov	ecx, [esp+8+arg_8]
lea	edx, [esp+8+arg_0]
push	edx
push	ecx
push	esi
push	eax
call	sub_4054F0
add	esp, 14h
mov	eax, esi
pop	esi
retn
sub_404C20 endp

align 10h



sub_404C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_0]
test	ecx, ecx
jbe	short locret_404C6E
mov	edx, [esp+arg_8]
push	esi

loc_404C61:
mov	esi, [edx]
mov	[eax], esi
dec	ecx
add	eax, 4
test	ecx, ecx
ja	short loc_404C61
pop	esi

locret_404C6E:
retn
sub_404C50 endp

align 10h


; Attributes: bp-based frame

sub_404C70 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	qword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_404C70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	ebx, [ebp+arg_4]
mov	[ebp+var_18], 1
mov	eax, 0FFFh
mov	[ebp+var_48], eax
xor	esi, esi
mov	[ebp+var_44], esi
mov	dword ptr [ebp+var_40],	esi
xor	edi, edi
mov	dword ptr [ebp+var_40+4], edi
mov	[ebp+var_1C], esi
mov	[ebp+var_11], 0
mov	[ebp+var_4], esi

loc_404CB7:
mov	ecx, [ebx+0Ch]
mov	[ebp+var_24], ecx
mov	edx, [ebx+8]
mov	[ebp+var_20], edx
cmp	ecx, edx
jz	loc_404DFF
cmp	[ebp+var_11], 0
jnz	loc_404DFF
sub	eax, dword ptr [ebp+var_40]
sbb	esi, edi
mov	dword ptr [ebp+var_50],	eax
mov	dword ptr [ebp+var_50+4], esi
mov	[ebp+var_58], 7FFFFFFFh
mov	[ebp+var_54], 0
lea	eax, [ebp+var_50]
push	eax
lea	ecx, [ebp+var_58]
push	ecx
call	sub_405570
add	esp, 8
mov	edi, [eax]
mov	[ebp+var_28], edi
mov	edx, [ebp+arg_10]
push	edx
mov	esi, [ebp+var_24]
mov	eax, [ebp+var_20]
call	sub_405A50
add	esp, 4
mov	[ebp+var_30], eax
sub	eax, [ebp+var_20]
sar	eax, 1
mov	[ebp+var_34], eax
mov	[ebp+var_2C], eax
cmp	edi, eax
lea	eax, [ebp+var_28]
jl	short loc_404D2D
lea	eax, [ebp+var_2C]

loc_404D2D:
mov	esi, [eax]
lea	edi, [esi+esi]
push	edi
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	[ebp+arg_8], edi
mov	eax, esi
cdq
add	dword ptr [ebp+var_40],	eax
adc	dword ptr [ebp+var_40+4], edx
add	[ebx+8], edi
mov	eax, [ebx+8]
mov	ecx, [ebp+var_24]
cmp	[ebp+var_30], ecx
jz	short loc_404D8A
mov	edx, [ebp+var_34]
cmp	edx, [ebp+var_28]
jg	short loc_404D8A
mov	cl, 1
test	cl, cl
jz	short loc_404D79
add	dword ptr [ebp+var_40],	1
adc	dword ptr [ebp+var_40+4], 0
add	eax, 2
mov	[ebx+8], eax

loc_404D79:
mov	[ebp+var_11], cl
mov	eax, [ebp+var_48]
mov	esi, [ebp+var_44]
mov	edi, dword ptr [ebp+var_40+4]
jmp	loc_404CB7

loc_404D8A:
mov	eax, dword ptr [ebp+var_40]
cmp	eax, [ebp+var_48]
jnz	short loc_404DD5
mov	edx, dword ptr [ebp+var_40+4]
cmp	edx, [ebp+var_44]
jnz	short loc_404DD5
mov	al, 1
test	al, al
jz	short loc_404DED
sub	ecx, [ebp+var_20]
sar	ecx, 1
cmp	esi, ecx
jnz	short loc_404DBF
mov	ecx, ebx
call	sub_4052A0
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
jnz	short loc_404DED
jmp	short loc_404DE9

loc_404DBF:
or	[ebp+var_1C], 4
mov	[ebp+var_11], 1
mov	eax, [ebp+var_48]
mov	esi, [ebp+var_44]
mov	edi, dword ptr [ebp+var_40+4]
jmp	loc_404CB7

loc_404DD5:
mov	ecx, ebx
call	sub_4052A0
movzx	eax, ax
mov	edx, 0FFFFh
cmp	ax, dx
jnz	short loc_404DF1

loc_404DE9:
or	[ebp+var_1C], 2

loc_404DED:
mov	[ebp+var_11], 1

loc_404DF1:
mov	eax, [ebp+var_48]
mov	esi, [ebp+var_44]
mov	edi, dword ptr [ebp+var_40+4]
jmp	loc_404CB7

loc_404DFF:
mov	[ebp+var_4], 0FFFFFFFFh
cmp	[ebp+var_11], 0
jnz	short loc_404E63
mov	edx, [ebp+arg_C]
push	edx
mov	ecx, [ebp+arg_8]
push	ecx
sub	eax, dword ptr [ebp+var_40]
sbb	esi, edi
push	esi
push	eax
push	ebx
mov	edx, [ebp+arg_0]
push	edx
call	sub_404EC0
add	esp, 18h
add	eax, dword ptr [ebp+var_40]
adc	edx, edi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_404E3E:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	ecx, [ecx+4]
add	ecx, eax
call	sub_405360
mov	[ebp+var_11], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_404E60
retn

loc_404E60:
mov	edi, dword ptr [ebp+var_40+4]

loc_404E63:
cmp	[ebp+var_18], 0
jz	short loc_404E71
xor	edx, edx
mov	eax, [ebp+arg_8]
mov	[eax], dx

loc_404E71:
mov	edx, [ebp+var_1C]
test	edx, edx
jz	short loc_404E9D
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	ecx, [ecx+4]
add	ecx, eax
mov	eax, [ecx+0Ch]
or	eax, edx
cmp	dword ptr [ecx+58h], 0
jnz	short loc_404E90
or	eax, 1

loc_404E90:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_404E9D
call	sub_77F030

loc_404E9D:
mov	eax, dword ptr [ebp+var_40]
mov	edx, edi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_404C70 endp

align 10h


; Attributes: bp-based frame

sub_404EC0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	word ptr  1Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_404EC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	ebx, [ebp+arg_10]
xor	esi, esi
mov	[ebp+var_20], esi
xor	edi, edi
mov	[ebp+var_1C], edi
mov	[ebp+var_14], esi
mov	[ebp+var_4], esi

loc_404EF4:
cmp	esi, [ebp+arg_8]
jnz	short loc_404F06
cmp	edi, [ebp+arg_C]
jnz	short loc_404F06
mov	al, 1
test	al, al
jz	short loc_404F61
jmp	short loc_404F5D

loc_404F06:
mov	ecx, [ebp+arg_4]
call	sub_406B30
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
jnz	short loc_404F33
cmp	edi, [ebp+arg_C]
jl	short loc_404F2D
jg	short loc_404F27
cmp	esi, [ebp+arg_8]
jb	short loc_404F2D

loc_404F27:
mov	al, 1
test	al, al
jz	short loc_404F61

loc_404F2D:
or	[ebp+var_14], 2
jmp	short loc_404F61

loc_404F33:
cmp	ax, [ebp+arg_14]
jnz	short loc_404FB4
mov	cl, 1
test	cl, cl
jz	short loc_404F4D
add	esi, 1
mov	[ebp+var_20], esi
adc	edi, 0
mov	[ebp+var_1C], edi
jmp	short loc_404F61

loc_404F4D:
push	eax
mov	ecx, [ebp+arg_4]
call	sub_405590
add	esp, 4
test	al, al
jnz	short loc_404F61

loc_404F5D:
or	[ebp+var_14], 4

loc_404F61:
mov	[ebp+var_4], 0FFFFFFFFh
mov	al, 1
test	al, al
jz	short loc_404F73
xor	edx, edx
mov	[ebx], dx

loc_404F73:
mov	edx, [ebp+var_14]
test	edx, edx
jz	short loc_404F9F
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	ecx, [ecx+4]
add	ecx, eax
mov	eax, [ecx+0Ch]
or	eax, edx
cmp	dword ptr [ecx+58h], 0
jnz	short loc_404F92
or	eax, 1

loc_404F92:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_404F9F
call	sub_77F030

loc_404F9F:
mov	eax, esi
mov	edx, edi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_404FB4:
mov	[ebx], ax
add	ebx, 2
mov	[ebp+arg_10], ebx
add	esi, 1
mov	[ebp+var_20], esi
adc	edi, 0
mov	[ebp+var_1C], edi
jmp	loc_404EF4
sub_404EC0 endp




sub_404FCE proc	near
push	1
mov	eax, [ebp+8]
mov	edx, [eax]
mov	ecx, [edx+4]
add	ecx, eax
call	sub_405360
xor	eax, eax
mov	ecx, [ebp+18h]
mov	[ecx], ax
mov	dword ptr [ebp-4], 0FFFFFFFFh
mov	eax, offset loc_404FF4
retn

loc_404FF4:
mov	eax, [ebp-20h]
mov	edx, [ebp-1Ch]
mov	ecx, [ebp-0Ch]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_404FCE endp

align 10h



sub_405010 proc	near

arg_0= dword ptr  4

lea	eax, [esp+arg_0]
push	eax
push	ecx
mov	ecx, [esp+8+arg_0]
push	edx
call	sub_405800
retn	4
sub_405010 endp

align 10h



sub_405030 proc	near

arg_0= qword ptr  4

mov	ecx, [eax]
mov	edx, [ecx+4]
push	ebx
movzx	ebx, word ptr [edx+eax+54h]
push	ebp
push	edi
xor	edi, edi
xor	ebp, ebp
cmp	dword ptr [esp+0Ch+arg_0+4], edi
jl	short loc_40508F
jg	short loc_405050
cmp	dword ptr [esp+0Ch+arg_0], edi
jbe	short loc_40508F
nop

loc_405050:
mov	eax, [esi+14h]
cmp	eax, [esi+18h]
jnb	short loc_405064
mov	[eax], bx
add	dword ptr [esi+14h], 2
movzx	eax, word ptr [eax]
jmp	short loc_405071

loc_405064:
mov	eax, [esi]
mov	edx, [eax+30h]
push	ebx
mov	ecx, esi
call	edx
movzx	eax, ax

loc_405071:
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_405095
add	ebp, 1
adc	edi, 0
cmp	edi, dword ptr [esp+0Ch+arg_0+4]
jl	short loc_405050
jg	short loc_40508F
cmp	ebp, dword ptr [esp+0Ch+arg_0]
jb	short loc_405050

loc_40508F:
mov	al, 1
pop	edi
pop	ebp
pop	ebx
retn

loc_405095:
pop	edi
pop	ebp
xor	al, al
pop	ebx
retn
sub_405030 endp

align 10h



sub_4050A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
lea	eax, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_405900
retn	8
sub_4050A0 endp

align 10h



sub_4050C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [eax+10h]
mov	edx, [eax+14h]
mov	eax, [esp+arg_0]
push	ecx
mov	ecx, [eax+10h]
push	edx
mov	edx, [eax+14h]
push	ecx
push	edx
call	sub_4051D0
xor	ecx, ecx
add	esp, 10h
test	eax, eax
setl	cl
mov	al, cl
retn
sub_4050C0 endp

align 10h



sub_4050F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	ecx, [eax+4]
add	ecx, esi
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_405139
mov	ecx, [ecx+5Ch]
test	ecx, ecx
jz	short loc_40510E
call	sub_4047A0

loc_40510E:
mov	edx, [esi]
mov	eax, [edx+4]
cmp	dword ptr [eax+esi+58h], 0
lea	ecx, [eax+esi]
jnz	short loc_405155
mov	eax, [ecx+0Ch]
or	eax, 1
cmp	dword ptr [ecx+58h], 0
jnz	short loc_40512C
or	eax, 1

loc_40512C:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_405155
call	sub_77F030

loc_405139:
mov	eax, [ecx+0Ch]
or	eax, 4
cmp	dword ptr [ecx+58h], 0
jnz	short loc_405148
or	eax, 1

loc_405148:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_405155
call	sub_77F030

loc_405155:
mov	ecx, [esi]
mov	edx, [ecx+4]
xor	eax, eax
cmp	[edx+esi+0Ch], eax
pop	esi
setz	al
retn
sub_4050F0 endp

align 10h



sub_405170 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	ecx, [eax+4]
add	ecx, esi
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4051C6
cmp	dword ptr [ecx+58h], 0
jnz	short loc_4051A4
mov	eax, [ecx+0Ch]
or	eax, 1
cmp	dword ptr [ecx+58h], 0
jnz	short loc_405197
or	eax, 1

loc_405197:
mov	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short loc_4051A4
call	sub_77F030

loc_4051A4:
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, [eax+esi+5Ch]
test	ecx, ecx
jz	short loc_4051B6
call	sub_4047A0

loc_4051B6:
mov	ecx, [esi]
mov	edx, [ecx+4]
xor	eax, eax
cmp	[edx+esi+0Ch], eax
pop	esi
setz	al
retn

loc_4051C6:
xor	al, al
pop	esi
retn
sub_405170 endp

align 10h



sub_4051D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_8]
push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_C]
sub	esi, eax
sub	edi, ecx
cmp	edi, esi
mov	[esp+8+arg_0], esi
mov	[esp+8+arg_4], edi
lea	edx, [esp+8+arg_4]
jl	short loc_4051FA
lea	edx, [esp+8+arg_0]

loc_4051FA:
mov	edx, [edx]
push	edx
push	ecx
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_40521C
cmp	esi, edi
jge	short loc_405215
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn

loc_405215:
xor	eax, eax
cmp	esi, edi
setnle	al

loc_40521C:
pop	edi
pop	esi
retn
sub_4051D0 endp

align 10h



sub_405220 proc	near
mov	eax, [ecx+5Ch]
retn
sub_405220 endp

align 10h



sub_405230 proc	near
mov	ax, [ecx+54h]
retn
sub_405230 endp

align 10h



sub_405240 proc	near

arg_0= word ptr	 4

mov	eax, 0FFFFh
xor	ecx, ecx
cmp	[esp+arg_0], ax
setz	cl
mov	al, cl
retn
sub_405240 endp

align 10h



sub_405260 proc	near
lea	edx, [ecx+ecx]
add	[eax+8], edx
retn
sub_405260 endp

align 10h



sub_405270 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+14h]
cmp	eax, [ecx+18h]
jnb	short loc_40528A
mov	dx, word ptr [esp+arg_0]
mov	[eax], dx
add	dword ptr [ecx+14h], 2
movzx	eax, word ptr [eax]
retn	4

loc_40528A:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
movzx	eax, ax
retn	4
sub_405270 endp

align 10h



sub_4052A0 proc	near
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_4052AC
movzx	eax, word ptr [eax]
retn

loc_4052AC:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax
retn
sub_4052A0 endp

align 10h


; Attributes: bp-based frame

sub_4052C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4052C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_14], 28h
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	esi, eax
mov	[ebp+var_18], esi
xor	edi, edi
mov	[ebp+var_4], edi
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [esi+10h]
push	edx
call	sub_405A00
add	esp, 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4052C0 endp



; Attributes: noreturn

sub_405330 proc	near
mov	eax, 1
mov	ecx, [ebp-18h]	; void *
call	sub_4044E0
xor	edi, edi
push	edi
push	edi
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_405330 endp

align 10h



sub_405350 proc	near
mov	cx, [eax]
xor	eax, eax
cmp	cx, [edx]
setz	al
retn
sub_405350 endp

align 10h



sub_405360 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
or	[ecx+0Ch], eax
test	[ecx+18h], eax
jz	short locret_405375
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

locret_405375:
retn	4
sub_405360 endp

align 10h



sub_405380 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_405380
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
push	esi
push	edi
mov	esi, ecx
mov	[esp+1Ch+var_4], 0
mov	edi, [esp+1Ch+arg_4]
mov	[esp+1Ch+var_10], 0
mov	eax, [esi]
mov	edx, [eax+34h]
push	edi
call	edx
mov	ebx, [esp+1Ch+arg_0]
add	esi, 1Ch
push	esi
mov	ecx, ebx
call	sub_77FF00
mov	[esp+1Ch+var_4], 0
push	edi
mov	ecx, esi
mov	[esp+20h+var_10], 1
call	sub_77FF50
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	eax, ebx
pop	esi
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	8
sub_405380 endp

align 10h


; Attributes: bp-based frame

sub_405400 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_405400
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
sub	ecx, edx
sar	ecx, 1

loc_405435:
mov	[ebp+var_14], ecx
test	ecx, ecx
jle	short loc_40545A
mov	si, [edx]
mov	[eax], si
add	edx, 2
mov	[ebp+arg_0], edx
add	eax, 2
mov	[ebp+var_18], eax
dec	ecx
jmp	short loc_405435

loc_405451:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_40545A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_405400 endp

align 10h


; Attributes: bp-based frame

sub_405470 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_405470
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	esi, [ebp+arg_8]
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
sub	ecx, edx

loc_4054A3:
mov	[ebp+var_14], ecx
test	ecx, ecx
jle	short loc_4054B9
mov	al, [edx]
mov	[esi], al
inc	edx
mov	[ebp+arg_0], edx
inc	esi
mov	[ebp+var_18], esi
dec	ecx
jmp	short loc_4054A3

loc_4054B9:
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_405470 endp



; Attributes: noreturn

sub_4054CC proc	near
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_4054CC endp

align 10h


; Attributes: thunk

sub_4054E0 proc	near
jmp	sub_407E50
sub_4054E0 endp

align 10h


; Attributes: bp-based frame

sub_4054F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4054F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, ecx
sar	eax, 2
mov	[ebp+var_14], eax
mov	edx, [ebp+arg_8]
lea	esp, [esp+0]

loc_405530:
test	eax, eax
jle	short loc_405544
mov	esi, [edx]
mov	[ecx], esi
dec	eax
mov	[ebp+var_14], eax
add	ecx, 4
mov	[ebp+var_18], ecx
jmp	short loc_405530

loc_405544:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4054F0 endp



; Attributes: noreturn

sub_40555C proc	near
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_40555C endp

align 10h



sub_405570 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [eax+4]
mov	ecx, [esp+arg_0]
cmp	edx, [ecx+4]
jg	short loc_405588
jl	short locret_40558A
mov	edx, [eax]
cmp	edx, [ecx]
jb	short locret_40558A

loc_405588:
mov	eax, ecx

locret_40558A:
retn
sub_405570 endp

align 10h


; Attributes: bp-based frame

sub_405590 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_405590
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
call	sub_4057D0
movzx	ecx, ax
mov	edx, 0FFFFh
xor	eax, eax
cmp	cx, dx
setnz	al
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_405590 endp




sub_4055EC proc	near
mov	byte ptr [ebp-11h], 0
mov	dword ptr [ebp-4], 0FFFFFFFFh
mov	eax, offset loc_4055FD
retn

loc_4055FD:
mov	al, [ebp-11h]
mov	ecx, [ebp-0Ch]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4055EC endp

align 10h



sub_405620 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_405620
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
sub	esp, 8
cmp	eax, [esp+14h+arg_4]
jz	loc_4056D9
push	ebx
push	esi
push	edi
xor	ebx, ebx
jmp	short loc_405650
align 10h

loc_405650:
lea	edi, [eax-58h]
mov	[esp+20h+var_14], edi
mov	[esp+20h+var_4], 1
lea	esi, [edi+40h]
mov	[esp+20h+var_10], esi
mov	byte ptr [esp+20h+var_4], 1
cmp	[esi+10h], ebx
jz	short loc_405687
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_405C20
mov	[esi+8], esi
mov	[esi+4], ebx
mov	[esi+0Ch], esi
mov	[esi+10h], ebx

loc_405687:
mov	byte ptr [esp+20h+var_4], bl
lea	esi, [edi+28h]
mov	[esp+20h+var_10], esi
mov	byte ptr [esp+20h+var_4], bl
cmp	[esi+10h], ebx
jz	short loc_4056B2
mov	ecx, [esi+4]
push	ecx
mov	ecx, esi
call	sub_405C20
mov	[esi+8], esi
mov	[esi+4], ebx
mov	[esi+0Ch], esi
mov	[esi+10h], ebx

loc_4056B2:
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	ecx, edi
call	sub_407E50
mov	eax, [esp+20h+arg_0]
sub	eax, 58h
mov	[esp+20h+arg_0], eax
cmp	eax, [esp+20h+arg_4]
jnz	loc_405650
pop	edi
pop	esi
pop	ebx

loc_4056D9:
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
add	esp, 14h
retn
sub_405620 endp

align 10h



sub_4056F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_4056F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
cmp	eax, [esp+10h+arg_4]
jz	short loc_40574A
push	esi

loc_405711:
lea	esi, [eax-54h]
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0
lea	ecx, [esi+2Ch]
call	sub_407E50
mov	[esp+14h+var_4], 0FFFFFFFFh
lea	ecx, [esi+4]
call	sub_407E50
mov	eax, [esp+14h+arg_0]
sub	eax, 54h
mov	[esp+14h+arg_0], eax
cmp	eax, [esp+14h+arg_4]
jnz	short loc_405711
pop	esi

loc_40574A:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_4056F0 endp

align 10h



sub_405760 proc	near
push	eax
push	ecx
call	sub_405A00
add	esp, 8
retn
sub_405760 endp

align 10h



sub_405770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
call	sub_405A50
add	esp, 4
retn
sub_405770 endp

align 10h



sub_405790 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4037E0
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+arg_0]
call	sub_407910
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_405790 endp

align 10h



sub_4057D0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
mov	edx, [esp+arg_0]
cmp	[ecx+4], eax
jnb	short loc_4057ED
add	eax, 0FFFFFFFEh
cmp	dx, [eax]
jnz	short loc_4057ED
mov	[ecx+8], eax
movzx	eax, word ptr [eax]
retn	4

loc_4057ED:
mov	eax, [ecx]
push	edx
mov	edx, [eax+24h]
call	edx
movzx	eax, ax
retn	4
sub_4057D0 endp

align 10h



sub_405800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
cmp	edi, ecx
jz	loc_4058EF
mov	edx, [esi+20h]
push	ebx
mov	ebx, ecx
sub	ebx, edi
push	ebp
mov	[esp+14h+arg_0], ebx
lea	ebp, [esi+24h]
sar	ebx, 1
cmp	[ebp+0], esi
jnz	short loc_405839
sub	edx, esi
sar	edx, 1
mov	eax, 10h
sub	eax, edx
jmp	short loc_40583F

loc_405839:
mov	eax, [esi]
sub	eax, edx
sar	eax, 1

loc_40583F:
cmp	ebx, eax
jb	short loc_4058BB
push	ebx
mov	ecx, esi
call	sub_404390
lea	ecx, [esp+14h+arg_4]
push	ecx
push	eax
mov	ecx, ebp
mov	[esp+1Ch+arg_4], eax
call	sub_4076B0
mov	ecx, [esi+20h]
mov	ebx, eax
mov	eax, [ebp+0]
cmp	ecx, eax
jnz	short loc_40586C
mov	eax, ebx
jmp	short loc_405881

loc_40586C:
sub	ecx, eax
push	ecx
push	eax
push	ebx
mov	[esp+20h+var_4], ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, [esp+14h+var_4]

loc_405881:
mov	edx, [esp+14h+arg_0]
push	edx
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
add	edi, [esp+20h+arg_0]
xor	eax, eax
add	esp, 0Ch
mov	ecx, esi
mov	[edi], ax
call	sub_407E10
mov	ecx, [esp+14h+arg_4]
mov	[ebp+0], ebx
pop	ebp
lea	edx, [ebx+ecx*2]
pop	ebx
mov	[esi+20h], edi
pop	edi
mov	[esi], edx
mov	eax, esi
pop	esi
pop	ecx
retn	0Ch

loc_4058BB:
mov	dx, [edi]
mov	eax, [esi+20h]
add	edi, 2
mov	[eax], dx
cmp	ecx, edi
jz	short loc_4058DE
mov	eax, [esi+20h]
sub	ecx, edi
push	ecx
add	eax, 2
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_4058DE:
mov	ecx, [esi+20h]
lea	eax, [ebx+ebx]
xor	edx, edx
pop	ebp
mov	[eax+ecx], dx
add	[esi+20h], eax
pop	ebx

loc_4058EF:
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	0Ch
sub_405800 endp

align 10h



sub_405900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
cmp	edi, ecx
jz	loc_4059CA
mov	edx, [esi+10h]
push	ebx
push	ebp
mov	ebp, ecx
lea	ebx, [esi+14h]
sub	ebp, edi
cmp	[ebx], esi
jnz	short loc_40592D
mov	eax, esi
sub	eax, edx
add	eax, 10h
jmp	short loc_405931

loc_40592D:
mov	eax, [esi]
sub	eax, edx

loc_405931:
cmp	ebp, eax
jb	short loc_4059A4
push	ebp
mov	ecx, esi
call	sub_404250
lea	ecx, [esp+10h+arg_0]
push	ecx		; int
push	eax		; size_t
mov	ecx, ebx
mov	[esp+18h+arg_0], eax
call	sub_407BD0
mov	ecx, [esi+10h]
mov	ebx, eax
mov	eax, [esi+14h]
cmp	ecx, eax
jnz	short loc_40595E
mov	eax, ebx
jmp	short loc_405973

loc_40595E:
sub	ecx, eax
push	ecx
push	eax
push	ebx
mov	[esp+1Ch+arg_4], ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, [esp+10h+arg_4]

loc_405973:
push	ebp
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
add	edi, ebp
add	esp, 0Ch
mov	ecx, esi
mov	byte ptr [edi],	0
call	sub_4079F0
mov	edx, [esp+10h+arg_0]
pop	ebp
lea	eax, [ebx+edx]
mov	[esi+14h], ebx
pop	ebx
mov	[esi+10h], edi
mov	[esi], eax
pop	edi
mov	eax, esi
pop	esi
retn	0Ch

loc_4059A4:
mov	al, [edi]
inc	edi
mov	[edx], al
cmp	ecx, edi
jz	short loc_4059BE
sub	ecx, edi
push	ecx
mov	ecx, [esi+10h]
inc	ecx
push	edi
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_4059BE:
mov	edx, [esi+10h]
mov	byte ptr [edx+ebp], 0
add	[esi+10h], ebp
pop	ebp
pop	ebx

loc_4059CA:
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_405900 endp

align 10h



sub_4059E0 proc	near
push	eax
call	sub_405AC0
retn
sub_4059E0 endp

align 10h



sub_4059F0 proc	near
push	eax
call	sub_405B20
retn
sub_4059F0 endp

align 10h



sub_405A00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_40A1E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	ecx, [esp+10h+arg_0]
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0
test	ecx, ecx
jz	short loc_405A33
mov	eax, [esp+10h+arg_4]
push	eax
call	sub_403850

loc_405A33:
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_405A00 endp

align 10h



sub_405A50 proc	near

arg_0= word ptr	 4

mov	dx, [esp+arg_0]
mov	ecx, esi
sub	ecx, eax
sar	ecx, 3
test	ecx, ecx
jle	short loc_405A85

loc_405A60:
cmp	[eax], dx
jz	short locret_405AB1
add	eax, 2
cmp	[eax], dx
jz	short locret_405AB1
add	eax, 2
cmp	[eax], dx
jz	short locret_405AB1
add	eax, 2
cmp	[eax], dx
jz	short locret_405AB1
dec	ecx
add	eax, 2
test	ecx, ecx
jg	short loc_405A60

loc_405A85:
mov	ecx, esi
sub	ecx, eax
sar	ecx, 1
sub	ecx, 1
jz	short loc_405AAA
sub	ecx, 1
jz	short loc_405AA2
sub	ecx, 1
jnz	short loc_405AAF
cmp	[eax], dx
jz	short locret_405AB1
add	eax, 2

loc_405AA2:
cmp	[eax], dx
jz	short locret_405AB1
add	eax, 2

loc_405AAA:
cmp	[eax], dx
jz	short locret_405AB1

loc_405AAF:
mov	eax, esi

locret_405AB1:
retn
sub_405A50 endp

align 10h



sub_405AC0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_405AC0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 1
lea	eax, [esi+40h]
push	eax
call	sub_405B70
mov	byte ptr [esp+10h+var_4], 0
lea	ecx, [esi+28h]
push	ecx
call	sub_405B70
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, esi
call	sub_407E50
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_405AC0 endp

align 10h



sub_405B20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_405B20
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
lea	ecx, [esi+2Ch]
call	sub_407E50
mov	[esp+10h+var_4], 0FFFFFFFFh
lea	ecx, [esi+4]
call	sub_407E50
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_405B20 endp

align 10h



sub_405B70 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_405B70
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0FFFFFFFFh
cmp	dword ptr [esi+10h], 0
jz	short loc_405BB7
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_405C20
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_405BB7:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_405B70 endp

align 10h



sub_405BD0 proc	near
cmp	dword ptr [esi+10h], 0
jz	short locret_405BF5
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_405C20
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

locret_405BF5:
retn
sub_405BD0 endp

align 10h



sub_405C00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
sub	eax, [esp+arg_0]
sar	eax, 1
retn
sub_405C00 endp

align 10h



sub_405C10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
sub	eax, [esp+arg_0]
retn
sub_405C10 endp

align 10h



sub_405C20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_405CD0
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
push	esi
mov	esi, [esp+18h+arg_0]
push	edi
mov	ebp, ecx
test	esi, esi
jz	short loc_405C88

loc_405C43:
mov	eax, [esi+0Ch]
push	eax
mov	ecx, ebp
call	sub_405C20
mov	edi, [esi+8]
lea	ebx, [esi+10h]
mov	[esp+1Ch+arg_0], ebx
mov	[esp+1Ch+var_4], 0
lea	ecx, [ebx+28h]
call	sub_407E50
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, ebx
call	sub_407E50
push	60h
push	esi
call	sub_77E0D0
add	esp, 8
mov	esi, edi
test	edi, edi
jnz	short loc_405C43

loc_405C88:
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_405C20 endp

align 10h



; int __fastcall sub_405CA0(void *)
sub_405CA0 proc	near
test	ecx, ecx
jz	short locret_405CC5
lea	eax, [eax+eax*2]
shl	eax, 5
cmp	eax, 80h
jbe	short loc_405CBB
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_405CBB:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_405CC5:
retn
sub_405CA0 endp

align 10h



sub_405CD0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_405CD0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
lea	ecx, [esi+28h]
call	sub_407E50
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, esi
call	sub_407E50
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_405CD0 endp

align 10h



sub_405D20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
or	[ecx+0Ch], eax
retn	4
sub_405D20 endp

align 10h



sub_405D30 proc	near
xor	eax, eax
cmp	[ecx+0Ch], eax
setz	al
retn
sub_405D30 endp

align 10h



sub_405D40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [eax]
mov	ecx, [esp+arg_0]
cmp	edx, [ecx]
jl	short locret_405D50
mov	eax, ecx

locret_405D50:
retn
sub_405D40 endp

align 10h



sub_405D60 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	offset unk_167EFB8
call	sub_77FFD0
retn
sub_405D60 endp

align 10h



sub_405D70 proc	near

arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
lea	ecx, [eax+eax]
mov	[esp+arg_8], ecx
jmp	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
sub_405D70 endp




sub_405D80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_8]
push	edi
cmp	esi, 4
jb	short loc_405DA7

loc_405D93:
mov	eax, [edx]
cmp	eax, [ecx]
jnz	short loc_405DAB
sub	esi, 4
add	ecx, 4
add	edx, 4
cmp	esi, 4
jnb	short loc_405D93

loc_405DA7:
test	esi, esi
jz	short loc_405DEF

loc_405DAB:
movzx	eax, byte ptr [edx]
movzx	edi, byte ptr [ecx]
sub	eax, edi
jnz	short loc_405DE6
cmp	esi, 1
jbe	short loc_405DEF
movzx	eax, byte ptr [edx+1]
movzx	edi, byte ptr [ecx+1]
sub	eax, edi
jnz	short loc_405DE6
cmp	esi, 2
jbe	short loc_405DEF
movzx	eax, byte ptr [edx+2]
movzx	edi, byte ptr [ecx+2]
sub	eax, edi
jnz	short loc_405DE6
cmp	esi, 3
jbe	short loc_405DEF
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_405DE6:
sar	eax, 1Fh
pop	edi
or	eax, 1
pop	esi
retn

loc_405DEF:
pop	edi
xor	eax, eax
pop	esi
retn
sub_405D80 endp

align 10h



sub_405E00 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
test	eax, eax
jnz	short loc_405E0D
mov	eax, [esp+arg_0]
retn

loc_405E0D:
mov	[esp+arg_8], eax
jmp	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
sub_405E00 endp

align 10h



sub_405E20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+20h]
mov	edx, [ecx+24h]
push	esi
mov	esi, [esp+4+arg_0]
mov	[ecx+20h], esi
mov	esi, [esp+4+arg_4]
mov	[ecx+24h], esi
pop	esi
retn	8
sub_405E20 endp

align 10h



sub_405E40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+28h]
mov	edx, [ecx+2Ch]
push	esi
mov	esi, [esp+4+arg_0]
mov	[ecx+28h], esi
mov	esi, [esp+4+arg_4]
mov	[ecx+2Ch], esi
pop	esi
retn	8
sub_405E40 endp

align 10h



sub_405E60 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, [ecx+8]
mov	[ecx+8], edx
retn	4
sub_405E60 endp

align 10h



sub_405E70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+18h], eax
retn	4
sub_405E70 endp

align 10h
; [00000005 BYTES: COLLAPSED FUNCTION operator new(uint,void *). PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_405E90 proc	near
mov	ecx, [eax]
mov	edx, [ecx]
mov	[eax], edx
retn
sub_405E90 endp

align 10h



sub_405EA0 proc	near
mov	eax, [ecx+18h]
test	[ecx+0Ch], eax
jz	short locret_405EAD
jmp	sub_77F030

locret_405EAD:
retn
sub_405EA0 endp

align 10h



sub_405EB0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+0Ch], eax
retn	4
sub_405EB0 endp

align 10h



sub_405EC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	cx, [eax]
mov	edx, [esp+arg_0]
mov	[edx], cx
retn
sub_405EC0 endp

align 10h



sub_405ED0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	cl, [eax]
mov	edx, [esp+arg_0]
mov	[edx], cl
retn
sub_405ED0 endp

align 10h



sub_405EE0 proc	near

arg_0= byte ptr	 4

push	esi
lea	esi, [ecx-98h]
mov	ecx, esi
call	sub_4074F0
test	[esp+4+arg_0], 1
jz	short loc_405EFE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_405EFE:
mov	eax, esi
pop	esi
retn	4
sub_405EE0 endp

align 10h



sub_405F10 proc	near

arg_0= byte ptr	 4

push	esi
lea	esi, [ecx-8]
mov	ecx, esi
call	sub_405F40
test	[esp+4+arg_0], 1
jz	short loc_405F2B
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_405F2B:
mov	eax, esi
pop	esi
retn	4
sub_405F10 endp

align 10h



sub_405F40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
lea	eax, [ecx+8]
mov	ecx, [eax-8]
mov	edx, [ecx+4]
mov	dword ptr [edx+eax-8], offset off_1446328
mov	[esp+10h+var_10], eax
mov	dword ptr [eax], offset	off_144627C
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, eax
call	sub_77EEB0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_405F40 endp

align 10h



sub_405F90 proc	near
mov	eax, [ecx-8]
mov	edx, [eax+4]
mov	dword ptr [edx+ecx-8], offset off_1446328
retn
sub_405F90 endp

align 10h



; int __thiscall sub_405FA0(void *, char)
sub_405FA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_4073F0
test	[esp+4+arg_0], 1
jz	short loc_405FB8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_405FB8:
mov	eax, esi
pop	esi
retn	4
sub_405FA0 endp

align 10h


; Attributes: bp-based frame

sub_405FC0 proc	near

arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	esi
mov	esi, ecx
cmp	byte ptr [esi+33h], 0
jnz	short loc_40601D
cmp	byte ptr [esi+34h], 0
jnz	short loc_40601D
cmp	byte ptr [esi+35h], 0
jnz	short loc_40601D
cmp	dword ptr [esi+38h], 0
jnz	short loc_40601D
mov	edx, [ebp+arg_0]
test	edx, edx
jnz	short loc_406003
mov	eax, dword ptr [ebp+arg_4]
or	eax, dword ptr [ebp+arg_4+4]
jnz	short loc_40601D
push	eax
push	1
push	eax
call	sub_406EF0
mov	eax, esi
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch

loc_406003:
mov	ecx, dword ptr [ebp+arg_4+4]
test	ecx, ecx
jl	short loc_40601D
mov	eax, dword ptr [ebp+arg_4]
jg	short loc_406013
test	eax, eax
jbe	short loc_40601D

loc_406013:
push	ecx
push	eax
push	edx
mov	ecx, esi
call	sub_406EF0

loc_40601D:
mov	eax, esi
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_405FC0 endp

align 10h



sub_406030 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+4], 4
jz	short loc_406042
mov	eax, [esp+arg_4]
sub	eax, [esp+arg_0]
cdq
retn	8

loc_406042:
mov	edx, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
xor	eax, eax
mov	ecx, esi
cmp	esi, edx
jz	short loc_40605E

loc_406053:
cmp	byte ptr [ecx],	0Ah
jnz	short loc_406059
inc	eax

loc_406059:
inc	ecx
cmp	ecx, edx
jnz	short loc_406053

loc_40605E:
sub	eax, esi
add	eax, edx
pop	esi
cdq
retn	8
sub_406030 endp

align 10h


; Attributes: bp-based frame

sub_406070 proc	near

var_20=	dword ptr -20h
var_10=	qword ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 24h
push	ebx
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
push	edi
jz	short loc_406096
cmp	byte ptr [esi+30h], 0
mov	edi, dword ptr [ebp+arg_4]
mov	ebx, dword ptr [ebp+arg_4+4]
jnz	short loc_4060B6
mov	eax, edi
or	eax, ebx
jz	short loc_4060BE

loc_406096:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0FFFFFFFFh
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	dword ptr [eax+8], 0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_4060B6:
mov	ecx, dword ptr [ebp+arg_4]
or	ecx, dword ptr [ebp+arg_4+4]
jnz	short loc_4060C8

loc_4060BE:
cmp	[ebp+arg_C], 2
jnz	short loc_4060C8
xor	al, al
jmp	short loc_4060CD

loc_4060C8:
mov	eax, 1

loc_4060CD:
push	eax
mov	ecx, esi
call	sub_406380
test	al, al
jz	short loc_406096
mov	eax, [ebp+arg_C]
cmp	eax, 1
jz	loc_40634A
cmp	eax, 4
jz	loc_40634A
cmp	byte ptr [esi+33h], 0
jz	loc_40634A
mov	ecx, [esi+58h]
mov	eax, [esi+8]
test	ecx, ecx
jz	loc_406191
sub	eax, ecx
mov	ecx, [esi+60h]
sar	eax, 1
cdq
sub	ecx, eax
mov	eax, [esi+64h]
sbb	eax, edx
mov	edx, edi
or	edx, ebx
mov	dword ptr [esp+30h+var_10], ecx
mov	dword ptr [esp+30h+var_10+4], eax
jnz	short loc_40614D
push	2		; int
push	edx		; DistanceToMoveHigh
push	edx		; lDistanceToMove
lea	ecx, [esi+20h]
call	sub_77F610
sub	eax, dword ptr [esp+30h+var_10]
mov	[esp+30h+var_8], 0
sbb	edx, dword ptr [esp+30h+var_10+4]
mov	dword ptr [esp+30h+var_10], eax
mov	dword ptr [esp+30h+var_10+4], edx
lea	eax, [esp+30h+var_10]
jmp	short loc_40616D

loc_40614D:
push	0
sub	edi, ecx
push	2		; int
sbb	ebx, eax
push	ebx		; DistanceToMoveHigh
push	edi		; lDistanceToMove
lea	ecx, [esi+20h]
call	sub_77F610
push	edx
push	eax
lea	eax, [esp+3Ch+var_20]
push	eax
mov	ecx, esi
call	sub_406410

loc_40616D:
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_406191:
cmp	byte ptr [esi+30h], 0
jz	loc_406269
sub	eax, [esi+4]
mov	ecx, [esi+4Ch]
sar	eax, 1
imul	eax, [esi+78h]
cdq
mov	dword ptr [esp+30h+var_10], eax
mov	dword ptr [esp+30h+var_10+4], edx
mov	edx, [esi+40h]
mov	eax, ecx
sub	eax, edx
cdq
cmp	dword ptr [esp+30h+var_10+4], edx
mov	[esp+30h+var_20], eax
jg	loc_406096
jl	short loc_4061D4
mov	edx, dword ptr [esp+30h+var_10]
cmp	edx, eax
ja	loc_406096

loc_4061D4:
mov	edx, dword ptr [esp+30h+var_10]
push	ecx
mov	ecx, [esi+40h]
add	ecx, edx
lea	eax, [esi+20h]
push	ecx
mov	ecx, eax
mov	[esp+38h+var_20], eax
call	sub_406030
mov	ecx, edi
or	ecx, ebx
mov	ecx, [esp+30h+var_20]
mov	dword ptr [esp+30h+var_10], eax
mov	dword ptr [esp+30h+var_10+4], edx
jnz	short loc_406228
push	2		; int
push	0		; DistanceToMoveHigh
push	0		; lDistanceToMove
call	sub_77F610
sub	eax, dword ptr [esp+30h+var_10]
mov	[esp+30h+var_8], 0
sbb	edx, dword ptr [esp+30h+var_10+4]
mov	dword ptr [esp+30h+var_10], eax
mov	dword ptr [esp+30h+var_10+4], edx
lea	eax, [esp+30h+var_10]
jmp	short loc_406245

loc_406228:
push	0
sub	edi, eax
push	2		; int
sbb	ebx, edx
push	ebx		; DistanceToMoveHigh
push	edi		; lDistanceToMove
call	sub_77F610
push	edx
push	eax
lea	edx, [esp+3Ch+var_20]
push	edx
mov	ecx, esi
call	sub_406410

loc_406245:
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_406269:
mov	edx, [esi+4]
mov	ecx, [esi+50h]
mov	edi, [esi+48h]
sub	eax, edx
sar	eax, 1
push	eax
mov	eax, [esi+40h]
mov	[esp+34h+var_20], ecx
mov	ecx, [esi+74h]
mov	ebx, [ecx]
push	edi
push	eax
mov	eax, [ebx+18h]
lea	edx, [esp+3Ch+var_20]
push	edx
call	eax
push	2		; int
push	0		; DistanceToMoveHigh
lea	edi, [esi+20h]
push	0		; lDistanceToMove
mov	ecx, edi
mov	ebx, eax
call	sub_77F610
mov	dword ptr [esp+30h+var_10], eax
mov	eax, [esi+40h]
lea	ecx, [eax+ebx]
push	ecx
push	eax
mov	ecx, edi
mov	dword ptr [esp+38h+var_10+4], edx
call	sub_406030
mov	ebx, edx
mov	edx, [esi+4Ch]
mov	edi, eax
mov	eax, [esi+40h]
push	edx
push	eax
lea	ecx, [esi+20h]
call	sub_406030
mov	ecx, dword ptr [esp+30h+var_10+4]
sub	edi, eax
mov	eax, dword ptr [esp+30h+var_10]
sbb	ebx, edx
mov	edx, eax
and	edx, ecx
cmp	edx, 0FFFFFFFFh
jz	loc_406096
add	edi, eax
adc	ebx, ecx
js	loc_406096
jg	short loc_4062F9
test	edi, edi
jb	loc_406096

loc_4062F9:
mov	eax, dword ptr [ebp+arg_4]
or	eax, dword ptr [ebp+arg_4+4]
jnz	short loc_406313
mov	[esp+30h+var_8], eax
mov	dword ptr [esp+30h+var_10], edi
mov	dword ptr [esp+30h+var_10+4], ebx
lea	eax, [esp+30h+var_10]
jmp	short loc_406326

loc_406313:
mov	eax, [esp+30h+var_20]
push	eax
push	ebx
push	edi
lea	ecx, [esp+3Ch+var_10]
push	ecx
mov	ecx, esi
call	sub_406410

loc_406326:
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_40634A:
push	0
push	eax		; int
mov	eax, [esi+78h]
push	ebx
cdq
push	edi
push	edx
push	eax
call	__allmul
push	edx		; DistanceToMoveHigh
push	eax		; lDistanceToMove
lea	ecx, [esi+20h]
call	sub_77F610
mov	edi, [ebp+arg_0]
push	edx
push	eax
push	edi
mov	ecx, esi
call	sub_406410
mov	eax, edi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_406070 endp

align 10h



sub_406380 proc	near

arg_0= byte ptr	 4

push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
mov	[esi+35h], bl
cmp	[esi+34h], bl
jz	short loc_4063D5
mov	eax, [esi]
mov	edx, [eax+30h]
push	0FFFFh
call	edx
mov	ecx, 0FFFFh
cmp	ax, cx
setnz	al
cmp	[esp+8+arg_0], bl
jz	short loc_4063BA
cmp	al, bl
jz	short loc_4063BE
mov	ecx, esi
call	sub_407240
test	al, al
jmp	short loc_4063BC

loc_4063BA:
cmp	al, bl

loc_4063BC:
jnz	short loc_4063D5

loc_4063BE:
mov	[esi+34h], bl
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	byte ptr [esi+35h], 1
pop	esi
xor	al, al
pop	ebx
retn	4

loc_4063D5:
cmp	[esi+33h], bl
jz	short loc_4063F4
cmp	[esi+36h], bl
jz	short loc_4063F4
mov	edx, [esi+68h]
mov	eax, [esi+6Ch]
mov	ecx, [esi+70h]
mov	[esi+4], edx
mov	[esi+8], eax
mov	[esi+0Ch], ecx
mov	[esi+36h], bl

loc_4063F4:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_406380 endp

align 10h



sub_406400 proc	near
mov	eax, [ecx]
mov	edx, [ecx+4]
retn
sub_406400 endp

align 10h


; Attributes: bp-based frame

sub_406410 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_4]
mov	eax, edi
and	eax, [ebp+arg_8]
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_406453
xor	ebx, ebx
cmp	[esi+33h], bl
jz	short loc_406435
call	sub_4072C0

loc_406435:
mov	[esi+33h], bl
mov	[esi+34h], bl
mov	[esi+36h], bl
mov	[esi+35h], bl
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx

loc_406453:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_C]
mov	[eax], edi
pop	edi
pop	esi
mov	[eax+4], ecx
mov	[eax+8], edx
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_406410 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_406470(int,	LONG lDistanceToMove, LONG DistanceToMoveHigh, int, int, int)
sub_406470 proc	near

arg_0= dword ptr  8
lDistanceToMove= dword ptr  0Ch
DistanceToMoveHigh= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
push	edi
jz	short loc_4064D2
push	1
call	sub_406380
test	al, al
jz	short loc_4064D2
mov	eax, [ebp+lDistanceToMove]
mov	ecx, [ebp+DistanceToMoveHigh]
mov	edx, eax
and	edx, ecx
mov	edi, eax
mov	ebx, ecx
cmp	edx, 0FFFFFFFFh
jz	short loc_4064D2
push	1		; int
push	ecx		; DistanceToMoveHigh
push	eax		; lDistanceToMove
lea	ecx, [esi+20h]
call	sub_77F610
and	eax, edx
cmp	eax, 0FFFFFFFFh
jz	short loc_4064D2
mov	eax, [ebp+arg_C]
push	eax
push	ebx
push	edi
mov	edi, [ebp+arg_0]
push	edi
mov	ecx, esi
mov	[esi+50h], eax
call	sub_406410
mov	eax, edi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h

loc_4064D2:
mov	eax, [ebp+arg_0]
pop	edi
pop	esi
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	dword ptr [eax], 0FFFFFFFFh
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h
sub_406470 endp

align 10h



sub_406500 proc	near
cmp	byte ptr [ecx+34h], 0
jz	short loc_406523
mov	eax, [ecx]
mov	edx, [eax+30h]
push	0FFFFh
call	edx
xor	edx, edx
mov	ecx, 0FFFFh
cmp	ax, cx
setnz	dl
dec	edx
mov	eax, edx
retn

loc_406523:
xor	eax, eax
retn
sub_406500 endp

align 10h


; Attributes: bp-based frame

sub_406530 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
cmp	byte ptr [ecx+28h], 0
push	ebx
push	esi
push	edi
jz	short loc_4065AD
cmp	byte ptr [ecx+34h], 0
jnz	short loc_4065AD
cmp	byte ptr [ecx+35h], 0
jnz	short loc_4065AD
cmp	byte ptr [ecx+36h], 0
jz	short loc_406562
mov	eax, [ecx+0Ch]
sub	eax, [ecx+8]
sar	eax, 1
cdq
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_406562:
cmp	byte ptr [ecx+30h], 0
jz	short loc_4065A2
push	2		; int
lea	esi, [ecx+20h]
push	0		; DistanceToMoveHigh
push	0		; lDistanceToMove
mov	ecx, esi
call	sub_77F610
mov	ecx, esi
mov	ebx, eax
mov	edi, edx
call	sub_77F1F0
test	edi, edi
jl	short loc_4065A2
jg	short loc_40658D
test	ebx, ebx
jb	short loc_4065A2

loc_40658D:
cmp	edx, edi
jl	short loc_4065A2
jg	short loc_406597
cmp	eax, ebx
jbe	short loc_4065A2

loc_406597:
sub	eax, ebx
sbb	edx, edi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_4065A2:
xor	eax, eax
xor	edx, edx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_4065AD:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
or	edx, eax
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_406530 endp

align 10h



sub_4065C0 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	short loc_406600
test	byte ptr [esi+24h], 8
jz	short loc_406600
cmp	byte ptr [esi+34h], 0
jnz	short loc_406600
cmp	byte ptr [esi+35h], 0
jnz	short loc_406600
cmp	dword ptr [esi+38h], 0
jnz	short loc_4065EA
call	sub_407010
test	al, al
jz	short loc_406600

loc_4065EA:
mov	eax, [esi+40h]
mov	[esi+48h], eax
mov	[esi+4Ch], eax
mov	eax, [esi+50h]
mov	[esi+54h], eax
mov	al, 1
mov	[esi+33h], al
pop	esi
retn

loc_406600:
xor	al, al
pop	esi
retn
sub_4065C0 endp

align 10h



sub_406610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
sub	esi, eax
jz	short loc_406630
push	esi
push	eax
mov	eax, [esp+0Ch+arg_8]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, esi
pop	esi
retn

loc_406630:
mov	eax, [esp+4+arg_8]
pop	esi
retn
sub_406610 endp

align 10h



sub_406640 proc	near
xor	al, al
retn
sub_406640 endp

align 10h


; Attributes: bp-based frame

sub_406650 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_40667D
mov	ecx, [esi+64h]
mov	edx, [esi+60h]
push	ecx		; int
push	edx		; int
push	eax		; lpBaseAddress
lea	ecx, [esi+20h]
call	sub_77F6E0
mov	[esi+58h], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ebx

loc_40667D:
mov	[esi+33h], bl
mov	[esi+34h], bl
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	byte ptr [esi+35h], 1
pop	esi
mov	eax, 0FFFFh
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_406650 endp

align 10h



sub_4066A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+54h]
mov	ecx, [esi+48h]
mov	[esi+50h], eax
mov	eax, [esi+4Ch]
push	edi
cmp	eax, ecx
jbe	short loc_4066DB
mov	edx, [esi+40h]
sub	eax, ecx
mov	edi, eax
jz	short loc_4066D4
push	edi
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi
mov	[esi+4Ch], eax
jmp	short loc_4066E1

loc_4066D4:
mov	eax, edx
mov	[esi+4Ch], eax
jmp	short loc_4066E1

loc_4066DB:
mov	ecx, [esi+40h]
mov	[esi+4Ch], ecx

loc_4066E1:
mov	eax, [esi+4Ch]
mov	edx, [esi+44h]
sub	edx, eax
push	edx
lea	ecx, [esi+20h]
push	eax
call	sub_77F760
xor	ebx, ebx
cmp	eax, ebx
mov	[esp+1Ch+var_C], eax
jl	loc_4067A7

loc_406701:
add	[esi+4Ch], eax
mov	edi, [esi+4Ch]
cmp	[esi+40h], edi
jz	loc_4067A7
mov	eax, [esi+3Ch]
mov	edx, [esi+38h]
mov	ecx, [esi+74h]
mov	ebx, [ecx]
lea	ebp, [esp+1Ch+var_8]
push	ebp
push	eax
push	edx
mov	edx, [ebx+8]
lea	eax, [esp+28h+var_4]
push	eax
mov	eax, [esi+40h]
push	edi
push	eax
lea	eax, [esi+54h]
push	eax
call	edx
cmp	eax, 3
jz	short loc_4067B0
cmp	eax, 2
jz	loc_4067D4
mov	eax, [esi+38h]
mov	ecx, [esp+1Ch+var_8]
mov	edx, [esp+1Ch+var_4]
cmp	ecx, eax
jz	short loc_406757
cmp	edx, [esi+40h]
jz	short loc_4067D4

loc_406757:
xor	ebx, ebx
cmp	[esi+30h], bl
jz	short loc_406771
mov	edi, ecx
sub	edi, eax
sar	edi, 1
imul	edi, [esi+78h]
mov	ebp, edx
sub	ebp, [esi+40h]
cmp	edi, ebp
jnz	short loc_4067D4

loc_406771:
cmp	ecx, eax
jnz	short loc_4067BD
mov	edi, edx
sub	edi, [esi+40h]
cmp	edi, [esi+7Ch]
jge	short loc_4067D4
cmp	ecx, eax
jnz	short loc_4067BD
cmp	[esp+1Ch+var_C], ebx
jle	short loc_4067A7
mov	eax, [esi+4Ch]
mov	ecx, [esi+44h]
sub	ecx, eax
push	ecx
push	eax
lea	ecx, [esi+20h]
call	sub_77F760
cmp	eax, ebx
mov	[esp+1Ch+var_C], eax
jge	loc_406701

loc_4067A7:
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx

loc_4067B0:
pop	edi
pop	esi
pop	ebp
mov	eax, 0FFFFh
pop	ebx
add	esp, 0Ch
retn

loc_4067BD:
pop	edi
mov	[esi+48h], edx
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], ecx
mov	ax, [eax]
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_4067D4:
mov	ecx, esi
call	sub_406650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_4066A0 endp

align 10h



sub_4067F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	byte ptr [esi+33h], 0
jnz	short loc_40680D
mov	ecx, esi
call	sub_4065C0
test	al, al
jnz	short loc_406832
mov	eax, 0FFFFh
pop	esi
retn

loc_40680D:
cmp	byte ptr [esi+36h], 0
jz	short loc_406832
mov	eax, [esi+68h]
mov	ecx, [esi+70h]
mov	[esi+4], eax
mov	eax, [esi+6Ch]
mov	[esi+8], eax
mov	[esi+0Ch], ecx
mov	byte ptr [esi+36h], 0
cmp	eax, ecx
jz	short loc_406832
mov	ax, [eax]
pop	esi
retn

loc_406832:
mov	ecx, esi
pop	esi
jmp	sub_4066A0
sub_4067F0 endp

align 10h



sub_406840 proc	near
push	ecx
call	sub_4067F0
add	esp, 4
retn
sub_406840 endp

align 10h



sub_406850 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	edx, [eax+eax]
add	[ecx+8], edx
retn	4
sub_406850 endp

align 10h



sub_406860 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	cx, [eax]
mov	edx, [esp+arg_4]
xor	eax, eax
cmp	cx, [edx]
setz	al
retn
sub_406860 endp

align 10h



sub_406880 proc	near
mov	eax, [ecx+8]
retn
sub_406880 endp

align 10h



sub_406890 proc	near

arg_0= word ptr	 4

cmp	byte ptr [ecx+33h], 0
jnz	short loc_40689E
mov	eax, 0FFFFh
retn	4

loc_40689E:
mov	edx, [ecx+8]
mov	ax, [esp+arg_0]
push	esi
push	edi
mov	edi, [ecx+4]
cmp	edx, edi
jz	short loc_4068DD
mov	esi, 0FFFFh
cmp	ax, si
jz	short loc_4068C5
cmp	ax, [edx-2]
jz	short loc_4068C5
cmp	dword ptr [ecx+58h], 0
jnz	short loc_4068DD

loc_4068C5:
add	edx, 0FFFFFFFEh
mov	[ecx+8], edx
cmp	ax, si
jz	short loc_4068D5
cmp	ax, [edx]
jnz	short loc_40693C

loc_4068D5:
mov	ax, [edx]
pop	edi
pop	esi
retn	4

loc_4068DD:
mov	esi, 0FFFFh
cmp	ax, si
jz	short loc_406947
cmp	byte ptr [ecx+36h], 0
lea	esi, [ecx+90h]
jz	short loc_406920
lea	edx, [ecx+80h]
cmp	edi, edx
jz	short loc_406916
mov	edx, [ecx+0Ch]
add	edx, 0FFFFFFFEh
mov	[ecx+0Ch], esi
mov	[ecx+8], edx
mov	[ecx+4], edx
mov	ecx, edx
pop	edi
mov	[ecx], ax
pop	esi
retn	4

loc_406916:
pop	edi
mov	eax, 0FFFFh
pop	esi
retn	4

loc_406920:
mov	[ecx+6Ch], edx
mov	edx, [ecx+0Ch]
mov	[ecx+70h], edx
lea	edx, [esi-2]
mov	[ecx+68h], edi
mov	byte ptr [ecx+36h], 1
mov	[ecx+0Ch], esi
mov	[ecx+8], edx
mov	[ecx+4], edx

loc_40693C:
mov	ecx, [ecx+8]
pop	edi
mov	[ecx], ax
pop	esi
retn	4

loc_406947:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_406890 endp

align 10h



sub_406950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [eax]
mov	ecx, [esp+arg_4]
cmp	edx, [ecx]
jge	short locret_406960
mov	eax, ecx

locret_406960:
retn
sub_406950 endp

align 10h



sub_406970 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
push	offset unk_167EFBC
mov	ecx, edi
call	sub_77FFA0
test	eax, eax
jz	short loc_4069E7
push	offset unk_167EFBC
mov	ecx, edi
call	sub_77FFD0
mov	[esi+74h], eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+10h]
call	eax
mov	edi, eax
mov	eax, 1
mov	[esp+8+arg_4], eax
cmp	edi, eax
mov	[esp+8+arg_0], edi
lea	eax, [esp+8+arg_4]
jl	short loc_4069BB
lea	eax, [esp+8+arg_0]

loc_4069BB:
mov	ecx, [eax]
mov	[esi+78h], ecx
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
test	edi, edi
setnle	cl
mov	[esi+30h], cl
mov	ecx, [esi+74h]
mov	[esi+7Ch], eax
mov	edx, [ecx]
mov	eax, [edx+14h]
call	eax
pop	edi
mov	[esi+31h], al
pop	esi
retn	8

loc_4069E7:
xor	ecx, ecx
mov	eax, 1
mov	[esi+74h], ecx
mov	[esi+7Ch], eax
mov	[esi+78h], eax
mov	[esi+31h], cl
mov	[esi+30h], cl
cmp	byte ptr [esp+8+arg_4],	cl
jz	short loc_406A0F
push	offset unk_167EFBC
mov	ecx, edi
call	sub_77FFD0

loc_406A0F:
pop	edi
pop	esi
retn	8
sub_406970 endp

align 10h



sub_406A20 proc	near

arg_0= dword ptr  4

cmp	byte ptr [ecx+33h], 0
jnz	short locret_406A3E
cmp	byte ptr [ecx+34h], 0
jnz	short locret_406A3E
cmp	byte ptr [ecx+35h], 0
jnz	short locret_406A3E
mov	eax, [esp+arg_0]
push	1
push	eax
call	sub_406970

locret_406A3E:
retn	4
sub_406A20 endp

align 10h



; int __thiscall sub_406A50(void *, char)
sub_406A50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_406A50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_14462EC
mov	[esp+14h+var_4], 0FFFFFFFFh
lea	ecx, [esi+1Ch]
call	sub_77FF40
test	[esp+14h+arg_0], 1
jz	short loc_406A93
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_406A93:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_406A50 endp

align 10h



sub_406AB0 proc	near
mov	eax, ecx
retn	0Ch
sub_406AB0 endp

align 10h



sub_406AC0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	dword ptr [eax], 0FFFFFFFFh
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	dword ptr [eax+8], 0
retn	14h
sub_406AC0 endp

align 10h



sub_406AE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	[eax+4], edx
mov	dword ptr [eax+8], 0
retn	8
sub_406AE0 endp

align 10h



sub_406B00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	dword ptr [eax], 0FFFFFFFFh
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	dword ptr [eax+8], 0
retn	18h
sub_406B00 endp

align 10h



sub_406B20 proc	near
xor	eax, eax
xor	edx, edx
retn
sub_406B20 endp

align 10h



sub_406B30 proc	near
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_406B42
lea	edx, [eax+2]
mov	[ecx+8], edx
movzx	eax, word ptr [eax]
retn

loc_406B42:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx
movzx	eax, ax
retn
sub_406B30 endp

align 10h


; Attributes: bp-based frame

sub_406B50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
push	esi
xor	esi, esi
cmp	dword ptr [ebp+arg_4+4], esi
push	edi
mov	edi, ecx
mov	[esp+20h+var_14], edi
mov	dword ptr [esp+20h+var_8], esi
mov	dword ptr [esp+20h+var_8+4], esi
jl	loc_406C14
jg	short loc_406B80
cmp	dword ptr [ebp+arg_4], esi
jbe	loc_406C14

loc_406B80:
mov	ebx, [ebp+arg_0]

loc_406B83:
mov	edx, [edi+8]
mov	eax, [edi+0Ch]
cmp	edx, eax
jnb	short loc_406BD4
mov	ecx, dword ptr [ebp+arg_4]
sub	eax, edx
sar	eax, 1
sub	ecx, esi
mov	[esp+20h+var_C], eax
cmp	ecx, eax
mov	[esp+20h+var_10], ecx
lea	eax, [esp+20h+var_10]
jb	short loc_406BAA
lea	eax, [esp+20h+var_C]

loc_406BAA:
mov	edi, [eax]
lea	esi, [edi+edi]
push	esi
push	edx
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+2Ch+var_14]
add	esp, 0Ch
add	dword ptr [esp+20h+var_8], edi
mov	edi, eax
adc	dword ptr [esp+20h+var_8+4], 0
add	ebx, esi
add	[eax+8], esi
mov	esi, dword ptr [esp+20h+var_8]
jmp	short loc_406BFC

loc_406BD4:
mov	eax, [edi]
mov	edx, [eax+20h]
mov	ecx, edi
call	edx
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_406C14
add	esi, 1
adc	dword ptr [esp+20h+var_8+4], 0
mov	[ebx], ax
mov	dword ptr [esp+20h+var_8], esi
add	ebx, 2

loc_406BFC:
mov	edx, dword ptr [esp+20h+var_8+4]
cmp	edx, dword ptr [ebp+arg_4+4]
jl	loc_406B83
jg	short loc_406C14
cmp	esi, dword ptr [ebp+arg_4]
jb	loc_406B83

loc_406C14:
mov	edx, dword ptr [esp+20h+var_8+4]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_406B50 endp

align 10h



sub_406C30 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+1Ch]
call	edx
mov	ecx, 0FFFFh
cmp	ax, cx
jnz	short loc_406C48
mov	eax, ecx
pop	esi
retn

loc_406C48:
mov	eax, [esi+8]
lea	edx, [eax+2]
mov	[esi+8], edx
movzx	eax, word ptr [eax]
pop	esi
retn
sub_406C30 endp

align 10h



sub_406C60 proc	near

arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
lea	ecx, [eax+eax]
mov	[esp+arg_8], ecx
jmp	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
sub_406C60 endp



; Attributes: bp-based frame

sub_406C70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
push	esi
xor	esi, esi
push	edi
xor	edi, edi
cmp	dword ptr [ebp+arg_4+4], esi
mov	ebx, ecx
mov	dword ptr [esp+20h+var_8], esi
mov	dword ptr [esp+20h+var_8+4], edi
jl	loc_406D31
jg	short loc_406C9E
cmp	dword ptr [ebp+arg_4], esi
jbe	loc_406D31

loc_406C9E:
mov	edx, [ebx+14h]
mov	eax, [ebx+18h]
cmp	edx, eax
jnb	short loc_406CF1
mov	ecx, dword ptr [ebp+arg_4]
sub	eax, edx
sar	eax, 1
sub	ecx, esi
mov	[esp+20h+var_C], eax
cmp	ecx, eax
mov	[esp+20h+var_10], ecx
lea	eax, [esp+20h+var_10]
jb	short loc_406CC5
lea	eax, [esp+20h+var_C]

loc_406CC5:
mov	edi, [eax]
mov	eax, [ebp+arg_0]
lea	esi, [edi+edi]
push	esi
push	eax
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	dword ptr [esp+20h+var_8], edi
adc	dword ptr [esp+20h+var_8+4], 0
add	[ebp+arg_0], esi
add	[ebx+14h], esi
mov	esi, dword ptr [esp+20h+var_8]
mov	edi, dword ptr [esp+20h+var_8+4]
jmp	short loc_406D1D

loc_406CF1:
mov	ecx, [ebp+arg_0]
movzx	eax, word ptr [ecx]
mov	edx, [ebx]
push	eax
mov	eax, [edx+30h]
mov	ecx, ebx
call	eax
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_406D31
add	esi, 1
adc	edi, 0
add	[ebp+arg_0], 2
mov	dword ptr [esp+20h+var_8], esi
mov	dword ptr [esp+20h+var_8+4], edi

loc_406D1D:
cmp	edi, dword ptr [ebp+arg_4+4]
jl	loc_406C9E
jg	short loc_406D31
cmp	esi, dword ptr [ebp+arg_4]
jb	loc_406C9E

loc_406D31:
mov	edx, edi
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_406C70 endp

align 10h



sub_406D40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
test	ecx, ecx
jbe	short loc_406D6C
mov	eax, [esp+arg_8]
mov	edx, [esp+arg_0]
push	esi
movzx	esi, ax
mov	eax, esi
shl	esi, 10h
push	edi
or	eax, esi
shr	ecx, 1
mov	edi, edx
rep stosd
adc	ecx, ecx
rep stosw
pop	edi
mov	eax, edx
pop	esi
retn

loc_406D6C:
mov	eax, [esp+arg_0]
retn
sub_406D40 endp

align 10h


; Attributes: bp-based frame

sub_406D80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
xor	ebx, ebx
cmp	dword ptr [ebp+arg_4+4], ebx
push	esi
push	edi
mov	esi, ecx
mov	[esp+20h+var_8], ebx
mov	[esp+20h+var_4], ebx
jl	loc_406E3F
jg	short loc_406DAC
cmp	dword ptr [ebp+arg_4], ebx
jbe	loc_406E3F

loc_406DAC:
mov	eax, [esi+18h]
mov	edi, [esi+14h]
cmp	edi, eax
jnb	short loc_406E04
mov	ecx, dword ptr [ebp+arg_4]
sub	eax, edi
sar	eax, 1
sub	ecx, ebx
mov	[esp+20h+var_C], eax
cmp	ecx, eax
mov	[esp+20h+var_10], ecx
lea	eax, [esp+20h+var_10]
jb	short loc_406DD3
lea	eax, [esp+20h+var_C]

loc_406DD3:
mov	edx, [eax]
test	edx, edx
jbe	short loc_406DF5
mov	eax, [ebp+arg_0]
movzx	ebx, ax
mov	eax, ebx
shl	ebx, 10h
or	eax, ebx
mov	ebx, [esp+20h+var_8]
mov	ecx, edx
shr	ecx, 1
rep stosd
adc	ecx, ecx
rep stosw

loc_406DF5:
add	ebx, edx
adc	[esp+20h+var_4], 0
lea	eax, [edx+edx]
add	[esi+14h], eax
jmp	short loc_406E23

loc_406E04:
mov	edx, [esi]
mov	eax, [ebp+arg_0]
mov	edx, [edx+30h]
push	eax
mov	ecx, esi
call	edx
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_406E3F
add	ebx, 1
adc	[esp+20h+var_4], 0

loc_406E23:
mov	edx, [esp+20h+var_4]
cmp	edx, dword ptr [ebp+arg_4+4]
mov	[esp+20h+var_8], ebx
jl	loc_406DAC
jg	short loc_406E3F
cmp	ebx, dword ptr [ebp+arg_4]
jb	loc_406DAC

loc_406E3F:
mov	edx, [esp+20h+var_4]
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_406D80 endp

align 10h



sub_406E50 proc	near
mov	eax, 0FFFFh
retn	4
sub_406E50 endp

align 10h



sub_406E60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_406A50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	dword ptr [ecx], offset	off_14462EC
mov	[esp+10h+var_4], 0FFFFFFFFh
add	ecx, 1Ch
call	sub_77FF40
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_406E60 endp

align 10h



sub_406EA0 proc	near
xor	eax, eax
cmp	[ecx+8], al
setnz	al
retn
sub_406EA0 endp

align 10h



sub_406EB0 proc	near
mov	eax, dword_167EB00
retn
sub_406EB0 endp

align 10h



sub_406EC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [eax+4]
mov	ecx, [esp+arg_4]
cmp	edx, [ecx+4]
jg	short locret_406EDA
jl	short loc_406ED8
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short locret_406EDA

loc_406ED8:
mov	eax, ecx

locret_406EDA:
retn
sub_406EC0 endp

align 10h



sub_406EE0 proc	near
or	eax, 0FFFFFFFFh
retn
sub_406EE0 endp

align 10h



sub_406EF0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= qword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 8
push	ebx
mov	ebx, dword ptr [esp+0Ch+arg_4+4]
push	ebp
push	esi
push	edi
mov	esi, ecx
test	eax, eax
jnz	short loc_406F41
mov	eax, dword ptr [esp+18h+arg_4]
push	0
push	2
push	ebx
push	eax
call	__allmul
test	edx, edx
jl	short loc_406F27
jg	loc_406FDE
cmp	eax, 0FFFFFFFFh
ja	loc_406FDE

loc_406F27:		; size_t
push	eax
call	_malloc
add	esp, 4
mov	[esi+38h], eax
test	eax, eax
jz	loc_406FDE
mov	byte ptr [esi+32h], 1
jmp	short loc_406F48

loc_406F41:
mov	[esi+38h], eax
mov	byte ptr [esi+32h], 0

loc_406F48:
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
cdq
mov	ebp, eax
mov	eax, [esi+78h]
push	ebx
mov	ebx, dword ptr [esp+1Ch+arg_4]
mov	edi, edx
cdq
push	ebx
push	edx
push	eax
mov	dword ptr [esp+28h+var_8], ebp
mov	dword ptr [esp+28h+var_8+4], edi
call	__allmul
cmp	edx, edi
mov	dword ptr [esp+18h+arg_4], eax
mov	dword ptr [esp+18h+arg_4+4], edx
jg	short loc_406F88
jl	short loc_406F82
cmp	eax, ebp
jnb	short loc_406F88

loc_406F82:
lea	eax, [esp+18h+var_8]
jmp	short loc_406F8C

loc_406F88:
lea	eax, [esp+18h+arg_4]

loc_406F8C:
mov	edi, [eax]
mov	eax, [eax+4]
xor	ebp, ebp
cmp	eax, ebp
mov	[esi+40h], ebp
jg	short loc_406FAD
jl	short loc_406FA1
cmp	edi, 0FFFFFFFFh
ja	short loc_406FAD

loc_406FA1:		; size_t
push	edi
call	_malloc
add	esp, 4
mov	[esi+40h], eax

loc_406FAD:
mov	eax, [esi+40h]
cmp	eax, ebp
jnz	short loc_406FEA
cmp	byte ptr [esi+32h], 0
jz	short loc_406FC6
mov	ecx, [esi+38h]
push	ecx		; void *
call	_free
add	esp, 4

loc_406FC6:
mov	edx, [esi+40h]
push	edx		; void *
call	_free
add	esp, 4
mov	[esi+38h], ebp
mov	[esi+3Ch], ebp
mov	[esi+40h], ebp
mov	[esi+44h], ebp

loc_406FDE:
xor	al, al
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_406FEA:
mov	ecx, [esi+38h]
add	eax, edi
lea	edx, [ecx+ebx*2]
pop	edi
mov	[esi+44h], eax
mov	[esi+3Ch], edx
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch
sub_406EF0 endp

align 10h


; Attributes: bp-based frame

sub_407010 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	esi
mov	esi, dword_167EB00
xor	edx, edx
lea	eax, [esi+0FFFh]
div	esi
xor	edx, edx
push	edx
imul	eax, esi
push	eax
push	edx
call	sub_406EF0
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_407010 endp

align 10h



sub_407040 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	short loc_40708F
test	byte ptr [esi+24h], 10h
jz	short loc_40708F
cmp	byte ptr [esi+33h], 0
jnz	short loc_40708F
cmp	byte ptr [esi+35h], 0
jnz	short loc_40708F
cmp	dword ptr [esi+38h], 0
jnz	short loc_40706A
call	sub_407010
test	al, al
jz	short loc_40708F

loc_40706A:
mov	al, 1
test	[esi+24h], al
jz	short loc_407078
mov	dword ptr [esi+50h], 0

loc_407078:
mov	ecx, [esi+38h]
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	ecx, [esi+3Ch]
sub	ecx, 2
mov	[esi+18h], ecx
mov	[esi+34h], al
pop	esi
retn

loc_40708F:
xor	al, al
pop	esi
retn
sub_407040 endp

align 10h



sub_4070A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ax, [eax]
retn
sub_4070A0 endp

align 10h



sub_4070B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
movzx	eax, word ptr [eax]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_4070C5
movzx	eax, ax
retn

loc_4070C5:
xor	eax, eax
retn
sub_4070B0 endp

align 10h



sub_4070D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= word ptr	 4

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	[esi+34h], bl
jnz	short loc_4070F4
call	sub_407040
test	al, al
jnz	short loc_4070F4
pop	esi
mov	eax, 0FFFFh
pop	ebx
add	esp, 8
retn	4

loc_4070F4:
mov	eax, [esi+3Ch]
sub	eax, 2
push	ebp
mov	ebp, [esi+14h]
mov	[esi+18h], eax
mov	ax, [esp+14h+arg_0]
push	edi
mov	edi, [esi+38h]
mov	ecx, 0FFFFh
mov	[esi+10h], edi
mov	[esi+14h], edi
cmp	ax, cx
jz	short loc_407121
mov	[ebp+0], ax
add	ebp, 2

loc_407121:
cmp	edi, ebp
jz	loc_4071C1
lea	esp, [esp+0]

loc_407130:
mov	eax, [esi+40h]
mov	ecx, [esi+74h]
lea	edx, [esp+18h+var_4]
push	edx
mov	edx, [esi+44h]
push	edx
push	eax
mov	[esp+24h+var_4], eax
lea	eax, [esp+24h+var_8]
push	eax
push	ebp
mov	[esp+2Ch+var_8], edi
mov	ebx, [ecx]
mov	edx, [ebx+4]
push	edi
lea	eax, [esi+50h]
push	eax
call	edx
cmp	eax, 3
jz	short loc_4071D8
cmp	eax, 2
jz	loc_4071FC
mov	ecx, [esp+18h+var_8]
mov	eax, [esp+18h+var_4]
cmp	ecx, ebp
jnz	short loc_407187
mov	edx, ebp
sub	edx, edi
sar	edx, 1
imul	edx, [esi+78h]
mov	ebx, eax
sub	ebx, [esi+40h]
cmp	ebx, edx
jz	short loc_407194

loc_407187:
xor	ebx, ebx
cmp	[esi+30h], bl
jnz	short loc_4071FE
cmp	ecx, edi
jz	short loc_4071FE
jmp	short loc_407196

loc_407194:
xor	ebx, ebx

loc_407196:
mov	ecx, [esi+40h]
sub	eax, ecx
push	eax		; int
push	ecx		; void *
lea	ecx, [esi+20h]
call	sub_77F8A0
test	al, al
jz	short loc_4071FE
mov	eax, [esp+18h+var_8]
sub	eax, edi
sar	eax, 1
lea	edi, [edi+eax*2]
cmp	edi, ebp
jnz	loc_407130
mov	ax, [esp+18h+arg_0]

loc_4071C1:
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_407220
pop	edi
pop	ebp
pop	esi
movzx	eax, ax
pop	ebx
add	esp, 8
retn	4

loc_4071D8:
xor	eax, eax
pop	edi
pop	ebp
mov	[esi+34h], al
mov	[esi+33h], al
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
mov	byte ptr [esi+35h], 1
pop	esi
mov	eax, 0FFFFh
pop	ebx
add	esp, 8
retn	4

loc_4071FC:
xor	ebx, ebx

loc_4071FE:
pop	edi
pop	ebp
mov	[esi+34h], bl
mov	[esi+33h], bl
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	byte ptr [esi+35h], 1
pop	esi
mov	eax, 0FFFFh
pop	ebx
add	esp, 8
retn	4

loc_407220:
pop	edi
pop	ebp
pop	esi
xor	eax, eax
pop	ebx
add	esp, 8
retn	4
sub_4070D0 endp

align 10h



sub_407230 proc	near
mov	eax, 0FFFFh
retn
sub_407230 endp

align 10h



sub_407240 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
cmp	byte ptr [esi+34h], 0
push	edi
jz	short loc_4072A3
cmp	byte ptr [esi+30h], 0
jnz	short loc_4072A3
lea	ebx, [esi+50h]

loc_407256:
mov	eax, [esi+40h]
mov	edx, [esi+44h]
mov	ecx, [esi+74h]
lea	ebp, [esp+14h+var_4]
push	ebp
push	edx
mov	[esp+1Ch+var_4], eax
mov	edi, [ecx]
push	eax
mov	eax, [edi+0Ch]
push	ebx
call	eax
mov	edi, eax
cmp	edi, 3
jz	short loc_4072A3
mov	ecx, [esp+14h+var_4]
cmp	ecx, [esi+40h]
jnz	short loc_407286
test	edi, edi
jz	short loc_4072A3

loc_407286:
cmp	edi, 2
jz	short loc_4072AB
mov	eax, [esi+40h]
sub	ecx, eax
push	ecx		; int
push	eax		; void *
lea	ecx, [esi+20h]
call	sub_77F8A0
test	al, al
jz	short loc_4072AB
cmp	edi, 1
jz	short loc_407256

loc_4072A3:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn

loc_4072AB:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn
sub_407240 endp

align 10h


; Attributes: bp-based frame

sub_4072C0 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_4072ED
mov	ecx, [esi+64h]
mov	edx, [esi+60h]
push	ecx		; int
push	edx		; int
push	eax		; lpBaseAddress
lea	ecx, [esi+20h]
call	sub_77F6E0
mov	[esi+58h], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ebx

loc_4072ED:
mov	[esi+33h], bl
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4072C0 endp

align 10h



sub_407300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx+4], eax
mov	eax, [esp+arg_8]
mov	[ecx+8], edx
mov	[ecx+0Ch], eax
retn	0Ch
sub_407300 endp

align 10h



sub_407320 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	eax, [esp+arg_4]
mov	[ecx+18h], eax
retn	8
sub_407320 endp

align 10h



sub_407340 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	[esi+28h], bl
setnz	al
mov	[esp+0Ch+var_1], al
cmp	[esi+34h], bl
jz	short loc_407382
cmp	al, bl
jz	short loc_407375
mov	eax, [esi]
mov	edx, [eax+30h]
push	0FFFFh
call	edx
mov	ecx, 0FFFFh
mov	[esp+0Ch+var_1], 1
cmp	ax, cx
jnz	short loc_407379

loc_407375:
mov	[esp+0Ch+var_1], bl

loc_407379:
mov	ecx, esi
call	sub_407240
jmp	short loc_40738C

loc_407382:
cmp	[esi+33h], bl
jz	short loc_40738C
call	sub_4072C0

loc_40738C:
lea	ecx, [esi+20h]
call	sub_77F5B0
test	al, al
jz	short loc_4073A2
cmp	[esp+0Ch+var_1], bl
jz	short loc_4073A2
mov	al, 1
jmp	short loc_4073A4

loc_4073A2:
xor	al, al

loc_4073A4:
movzx	eax, al
neg	eax
sbb	eax, eax
mov	[esi+54h], ebx
mov	[esi+50h], ebx
mov	[esi+4Ch], ebx
mov	[esi+48h], ebx
mov	[esi+58h], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ebx
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+70h], ebx
mov	[esi+6Ch], ebx
mov	[esi+68h], ebx
mov	[esi+36h], bl
mov	[esi+35h], bl
mov	[esi+34h], bl
mov	[esi+33h], bl
and	eax, esi
pop	esi
pop	ebx
pop	ecx
retn
sub_407340 endp

align 10h



sub_4073F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4073F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
mov	[esp+1Ch+var_10], esi
mov	dword ptr [esi], offset	off_1446374
xor	ebx, ebx
mov	[esp+1Ch+var_4], ebx
call	sub_407340
cmp	[esi+32h], bl
jz	short loc_407432
mov	eax, [esi+38h]
push	eax		; void *
call	_free
add	esp, 4

loc_407432:
mov	ecx, [esi+40h]
push	ecx		; void *
call	_free
or	eax, 0FFFFFFFFh
add	esp, 4
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esp+1Ch+var_4], eax
mov	dword ptr [esi], offset	off_14462EC
mov	[esp+1Ch+var_4], eax
lea	ecx, [esi+1Ch]
call	sub_77FF40
mov	ecx, [esp+1Ch+var_C]
pop	esi
mov	large fs:0, ecx
pop	ebx
add	esp, 14h
retn
sub_4073F0 endp

align 10h



sub_407480 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_407480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [ecx-98h]
mov	edx, [eax+4]
push	esi
mov	[esp+14h+var_10], ecx
mov	dword ptr [edx+ecx-98h], offset	off_14463D0
mov	[esp+14h+var_4], 0
lea	esi, [ecx-90h]
mov	ecx, esi
call	sub_4073F0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, [esi-8]
mov	ecx, [eax+4]
mov	dword ptr [ecx+esi-8], offset off_1446328
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_407480 endp

align 10h



sub_4074F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
lea	esi, [ecx+98h]
mov	ecx, esi
call	sub_407480
mov	ecx, esi
mov	[esp+14h+var_10], ecx
mov	dword ptr [ecx], offset	off_144627C
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_77EEB0
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_4074F0 endp

align 10h



; int __thiscall sub_407540(void *, char)
sub_407540 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_144627C
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_77EEB0
test	[esp+14h+arg_0], 1
jz	short loc_407580
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_407580:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_407540 endp

align 10h



sub_4075A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	dword ptr [ecx], offset	off_144627C
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_77EEB0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_4075A0 endp

align 10h



sub_4075E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4075E0
push	eax
mov	eax, 1
mov	large fs:0, esp
test	byte ptr dword_185EF10,	al
jnz	short loc_407622
or	dword_185EF10, eax
mov	[esp+0Ch+var_4], 0
mov	dword_185EF0C, offset nullsub_1
mov	[esp+0Ch+var_4], 0FFFFFFFFh

loc_407622:
mov	ecx, [esp+0Ch+var_C]
mov	eax, offset dword_185EF0C
mov	large fs:0, ecx
add	esp, 0Ch
retn
sub_4075E0 endp

align 10h



sub_407640 proc	near
mov	dword ptr [ecx], offset	off_15477F8
retn
sub_407640 endp

align 10h



; int __thiscall sub_407650(void *, char)
sub_407650 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15477F8
jz	short loc_407669
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_407669:
mov	eax, esi
pop	esi
retn	4
sub_407650 endp

align 10h



sub_407670 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	dword ptr [eax], offset	off_15477F8
mov	[eax+4], ecx
mov	[eax+8], edx
retn	4
sub_407670 endp

align 10h



sub_407690 proc	near
mov	eax, ecx
mov	[eax+20h], eax
mov	[eax+24h], eax
retn	4
sub_407690 endp

align 10h



sub_4076A0 proc	near
mov	eax, 7FFFFFFFh
retn
sub_4076A0 endp

align 10h



sub_4076B0 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 0Ch
cmp	eax, 7FFFFFFFh
jbe	short loc_4076D5
lea	ecx, [esp+0Ch+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+10h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4076D5:
test	eax, eax
jz	short loc_407720
add	eax, eax
mov	[esp+0Ch+arg_0], eax
cmp	eax, 80h
jbe	short loc_407701
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+10h+arg_0]
mov	ecx, [esp+10h+arg_4]
add	esp, 4
shr	edx, 1
mov	[ecx], edx
add	esp, 0Ch
retn	8

loc_407701:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
call	sub_77E150
mov	edx, [esp+10h+arg_0]
mov	ecx, [esp+10h+arg_4]
add	esp, 4
shr	edx, 1
mov	[ecx], edx
add	esp, 0Ch
retn	8

loc_407720:
xor	eax, eax
add	esp, 0Ch
retn	8
sub_4076B0 endp

align 10h


; Attributes: thunk

sub_407730 proc	near
jmp	sub_4076B0
sub_407730 endp

align 10h

loc_407740:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
align 10h



sub_407750 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, 7FFFFFFFh
ja	short loc_40778B
test	eax, eax
jbe	short loc_40778B
cmp	eax, 10h
jbe	short loc_407787
push	edi
lea	ecx, [esp+8+arg_0]
push	ecx
lea	edi, [esi+24h]
push	eax
mov	ecx, edi
call	sub_4076B0
mov	edx, [esp+8+arg_0]
mov	[edi], eax
mov	[esi+20h], eax
lea	eax, [eax+edx*2]
mov	[esi], eax
pop	edi

loc_407787:
pop	esi
retn	4

loc_40778B:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_407750 endp

align 10h



sub_4077A0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
xor	eax, eax
mov	[ecx], ax
retn	4
sub_4077A0 endp

align 10h



sub_4077B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, ebp
sub	esi, ebx
mov	eax, esi
sar	eax, 1
push	edi
inc	eax
push	eax
mov	edi, ecx
call	sub_407750
mov	eax, [edi+24h]
cmp	ebp, ebx
jz	short loc_4077E1
push	esi
push	ebx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, esi

loc_4077E1:
mov	[edi+20h], eax
pop	edi
pop	esi
xor	ecx, ecx
pop	ebp
mov	[eax], cx
pop	ebx
retn	8
sub_4077B0 endp




sub_4077F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	edx, [eax+2]

loc_4077F7:
mov	cx, [eax]
add	eax, 2
test	cx, cx
jnz	short loc_4077F7
sub	eax, edx
sar	eax, 1
retn
sub_4077F0 endp

align 10h



sub_407810 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_407E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	[esi+20h], esi
push	edi
mov	[esp+1Ch+var_10], esi
mov	[esi+24h], esi
mov	[esp+1Ch+var_4], 0
mov	ebx, [esp+1Ch+arg_0]
mov	eax, ebx
lea	edx, [eax+2]

loc_407846:
mov	cx, [eax]
add	eax, 2
test	cx, cx
jnz	short loc_407846
sub	eax, edx
sar	eax, 1
push	ebp
lea	ebp, [ebx+eax*2]
mov	edi, ebp
sub	edi, ebx
mov	eax, edi
sar	eax, 1
inc	eax
push	eax
mov	ecx, esi
call	sub_407750
mov	eax, [esi+24h]
cmp	ebp, ebx
pop	ebp
jz	short loc_40787F
push	edi
push	ebx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi

loc_40787F:
mov	[esi+20h], eax
xor	ecx, ecx
mov	[eax], cx
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	8
sub_407810 endp

align 10h



sub_4078B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	edi
mov	edi, [esp+4+arg_8]
sub	edi, 1
js	short loc_4078DE
push	ebx
mov	ebx, [esp+8+arg_C]
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
mov	esi, [esp+10h+arg_0]
lea	esp, [esp+0]

loc_4078D0:
mov	ecx, esi
call	ebx
add	esi, ebp
sub	edi, 1
jns	short loc_4078D0
pop	esi
pop	ebp
pop	ebx

loc_4078DE:
pop	edi
retn	10h
sub_4078B0 endp

align 10h



sub_4078F0 proc	near
mov	dword ptr [eax+4], 0
cmp	ecx, 0FFh
ja	short loc_407902
mov	[eax], ecx
retn

loc_407902:
mov	dword ptr [eax], 0FFFFFFFFh
retn
sub_4078F0 endp

align 10h



sub_407910 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_63CCE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	eax, [ecx+14h]
cmp	eax, ecx
jz	short loc_40796F
test	eax, eax
jz	short loc_40796F
mov	edx, eax
mov	eax, [ecx]
sub	eax, edx
test	edx, edx
jz	short loc_40796F
cmp	eax, 80h
jbe	short loc_407965
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn

loc_407965:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

loc_40796F:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_407910 endp

align 10h



sub_407980 proc	near
mov	eax, ecx
retn	4
sub_407980 endp

align 10h



sub_407990 proc	near

arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_4]
mov	[eax], ecx
retn	8
sub_407990 endp

align 10h



sub_4079A0 proc	near
mov	eax, ecx
mov	[eax+10h], eax
mov	[eax+14h], eax
retn	4
sub_4079A0 endp

align 10h



sub_4079B0 proc	near
xor	eax, eax
cmp	[ecx+14h], ecx
setz	al
retn
sub_4079B0 endp

align 10h



; int __stdcall	sub_4079C0(void	*, int)
sub_4079C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
test	eax, eax
jz	short locret_4079EA
mov	ecx, [esp+arg_4]
cmp	ecx, 80h
jbe	short loc_4079E0
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn	8

loc_4079E0:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

locret_4079EA:
retn	8
sub_4079C0 endp

align 10h



sub_4079F0 proc	near
mov	eax, [ecx+14h]
cmp	eax, ecx
jz	short locret_407A20
test	eax, eax
jz	short locret_407A20
mov	edx, eax
mov	eax, [ecx]
sub	eax, edx
test	edx, edx
jz	short locret_407A20
cmp	eax, 80h
jbe	short loc_407A16
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_407A16:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

locret_407A20:
retn
sub_4079F0 endp

align 10h



sub_407A30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [eax]
mov	ecx, [esp+arg_0]
cmp	edx, [ecx]
jb	short locret_407A40
mov	eax, ecx

locret_407A40:
retn
sub_407A30 endp

align 10h



sub_407A50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_455580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
push	1
mov	esi, ecx
push	offset off_17EDB94
mov	[esp+1Ch+var_10], esi
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
mov	[esp+14h+var_4], 0
mov	dword ptr [esi], offset	off_1446194
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_407A50 endp

align 10h



sub_407AB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_455580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	dword ptr [ecx], offset	off_1446194
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_7966CA
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_407AB0 endp

align 10h



; int __thiscall sub_407AF0(void *, char)
sub_407AF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_455580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_1446194
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_7966CA
test	[esp+14h+arg_0], 1
jz	short loc_407B30
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_407B30:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_407AF0 endp

align 10h



sub_407B50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_455580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
push	esi
mov	esi, ecx
push	eax
mov	[esp+18h+var_10], esi
call	??0exception@std@@QAE@ABV01@@Z ; std::exception::exception(exception::exception	const &)
mov	[esp+14h+var_4], 0
mov	dword ptr [esi], offset	off_1446194
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_407B50 endp

align 10h



sub_407BB0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx]
cmp	eax, 80h
jbe	short loc_407BC6
mov	[esp+arg_0], eax
jmp	??2@YAPAXI@Z	; operator new(uint)

loc_407BC6:
mov	[esp+arg_0], ecx
jmp	sub_77E150
sub_407BB0 endp

align 10h



; int __stdcall	sub_407BD0(size_t, int)
sub_407BD0 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 0Ch
cmp	eax, 0FFFFFFFFh
jbe	short loc_407BF3
lea	ecx, [esp+0Ch+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+10h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_407BF3:
test	eax, eax
jz	short loc_407C38
mov	[esp+0Ch+arg_0], eax
cmp	eax, 80h
jbe	short loc_407C1B
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
add	esp, 4
mov	[edx], ecx
add	esp, 0Ch
retn	8

loc_407C1B:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
call	sub_77E150
mov	edx, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
add	esp, 4
mov	[edx], ecx
add	esp, 0Ch
retn	8

loc_407C38:
xor	eax, eax
add	esp, 0Ch
retn	8
sub_407BD0 endp



; Attributes: thunk

sub_407C40 proc	near
jmp	sub_407BD0
sub_407C40 endp

align 10h



sub_407C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
cmp	esi, eax
jnz	short loc_407C63
mov	eax, [esp+4+arg_8]
pop	esi
retn

loc_407C63:
sub	esi, eax
push	esi
push	eax
mov	eax, [esp+0Ch+arg_8]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, esi
pop	esi
retn
sub_407C50 endp

align 10h



sub_407C80 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	byte ptr [eax],	0
retn	4
sub_407C80 endp

align 10h



sub_407C90 proc	near
mov	eax, [ecx+10h]
mov	byte ptr [eax],	0
retn
sub_407C90 endp

align 10h



sub_407CA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
sub	edi, ebp
lea	eax, [edi+1]
mov	esi, ecx
mov	[esp+0Ch+arg_0], eax
cmp	eax, 0FFFFFFFFh
ja	short loc_407D05
test	eax, eax
jbe	short loc_407D05
cmp	eax, 10h
jbe	short loc_407CE3
push	ebx
lea	ecx, [esp+10h+arg_0]
push	ecx		; int
lea	ebx, [esi+14h]
push	eax		; size_t
mov	ecx, ebx
call	sub_407BD0
mov	edx, [esp+10h+arg_0]
mov	[ebx], eax
mov	[esi+10h], eax
add	eax, edx
mov	[esi], eax
pop	ebx

loc_407CE3:
mov	eax, [esi+14h]
cmp	[esp+0Ch+arg_4], ebp
jz	short loc_407CF9
push	edi
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi

loc_407CF9:
pop	edi
mov	[esi+10h], eax
pop	esi
mov	byte ptr [eax],	0
pop	ebp
retn	8

loc_407D05:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_407CA0 endp

align 10h



sub_407D10 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	edx, [eax+1]

loc_407D17:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_407D17
sub	eax, edx
retn
sub_407D10 endp

align 10h



sub_407D30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_63CCE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esi+10h], esi
push	edi
mov	[esp+18h+var_10], esi
mov	[esi+14h], esi
mov	[esp+18h+var_4], 0
mov	edx, [esp+18h+arg_0]
mov	eax, edx
lea	edi, [eax+1]

loc_407D65:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_407D65
sub	eax, edi
add	eax, edx
push	eax
push	edx
mov	ecx, esi
call	sub_407CA0
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, [esp+18h+var_C]
pop	edi
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	8
sub_407D30 endp

align 10h



sub_407DA0 proc	near
xor	eax, eax
cmp	[ecx+24h], ecx
setz	al
retn
sub_407DA0 endp

align 10h



; int __cdecl sub_407DB0(void *, int)
sub_407DB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	eax, 80h
jbe	short loc_407DC9
mov	eax, [esp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_407DC9:
mov	[esp+arg_4], eax
jmp	sub_77E0D0
sub_407DB0 endp

align 10h



; int __stdcall	sub_407DE0(void	*, int)
sub_407DE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
test	ecx, ecx
jz	short locret_407E0B
mov	eax, [esp+arg_4]
add	eax, eax
cmp	eax, 80h
jbe	short loc_407E01
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn	8

loc_407E01:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_407E0B:
retn	8
sub_407DE0 endp

align 10h



sub_407E10 proc	near
mov	eax, [ecx+24h]
cmp	eax, ecx
jz	short locret_407E44
test	eax, eax
jz	short locret_407E44
mov	edx, eax
test	edx, edx
jz	short locret_407E44
mov	eax, [ecx]
sub	eax, edx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_407E3A
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_407E3A:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

locret_407E44:
retn
sub_407E10 endp

align 10h



sub_407E50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_407E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	eax, [ecx+24h]
cmp	eax, ecx
jz	short loc_407EB3
test	eax, eax
jz	short loc_407EB3
mov	edx, eax
test	edx, edx
jz	short loc_407EB3
mov	eax, [ecx]
sub	eax, edx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_407EA9
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn

loc_407EA9:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

loc_407EB3:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_407E50 endp

align 10h



sub_407ED0 proc	near
mov	eax, hWnd
retn
sub_407ED0 endp

align 10h



sub_407EE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_407EE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
lea	ecx, [eax+4]
mov	dword ptr [eax], offset	off_154CA98
mov	[esp+10h+var_10], ecx
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_407EE0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12EA6EE

loc_407F30:
push	0FFFFFFFFh
push	offset unknown_libname_485 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	dword ptr [ecx], offset	off_154CA98
mov	[esp+10h+var_4], 0FFFFFFFFh
add	ecx, 4
call	sub_409540
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
; END OF FUNCTION CHUNK	FOR sub_12EA6EE
align 10h



sub_407F70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, [ecx+4]
lea	eax, [esp+4+arg_0]
push	eax
call	sub_409AD0
mov	ecx, [esi+4]
mov	[eax], esi
mov	[eax+4], ecx
mov	[ecx], eax
mov	[esi+4], eax
pop	esi
retn	4
sub_407F70 endp

align 10h



sub_407F90 proc	near
mov	eax, [ecx+4]
add	ecx, 4
xor	edx, edx
cmp	eax, ecx
jz	short locret_407FC2
lea	esp, [esp+0]

loc_407FA0:
mov	eax, [eax]
inc	edx
cmp	eax, ecx
jnz	short loc_407FA0
test	edx, edx
jbe	short locret_407FC2
mov	ecx, [ecx]
mov	eax, [ecx]
mov	edx, [ecx+4]
push	0Ch
mov	[edx], eax
push	ecx
mov	[eax+4], edx
call	sub_77E0D0
add	esp, 8

locret_407FC2:
retn
sub_407F90 endp

align 10h



sub_407FD0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_407FD0
push	eax
mov	large fs:0, esp
sub	esp, 18h
test	byte ptr dword_185F22C,	1
jnz	short loc_40806F
or	dword_185F22C, 1
mov	[esp+24h+var_4], 0
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+38h+var_24]
push	eax
mov	[esp+3Ch+var_24], 4
mov	[esp+3Ch+var_20], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+3Ch+var_20]
push	eax
call	edx
test	eax, eax
jnz	short loc_40804E
lea	ecx, [esp+24h+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+28h+var_18]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_40804E:
mov	[esp+24h+var_1C], eax
mov	byte ptr [esp+24h+var_4], 1
push	eax
call	sub_407EE0
mov	byte ptr [esp+24h+var_4], 0
mov	dword_185F230, eax
mov	[esp+24h+var_4], 0FFFFFFFFh

loc_40806F:
mov	ecx, [esp+24h+var_C]
mov	eax, offset dword_185F230
mov	large fs:0, ecx
add	esp, 24h
retn
sub_407FD0 endp

align 10h


; Attributes: bp-based frame

sub_408090 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 10h
push	esi
mov	esi, ecx
push	edi
lea	ecx, [ebp+arg_0]
lea	eax, [esp+18h+var_8]
call	sub_409B50
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
push	ecx
mov	[esp+24h+var_C], esp
mov	eax, esp
lea	edi, [esi+4]
push	ecx
mov	[eax], edi
mov	ecx, [edi]
mov	eax, esp
lea	esi, [esp+28h+var_C]
mov	[esp+28h+var_C], esp
mov	[eax], ecx
call	sub_409B60
mov	edx, [esp+28h+var_C]
add	esp, 0Ch
mov	eax, esp
mov	[esp+1Ch+var_8], esp
push	ecx
mov	[eax], edi
mov	eax, esp
lea	esi, [esp+20h+var_8]
mov	[esp+20h+var_8], esp
mov	[eax], edx
call	sub_409600
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_408090 endp

align 10h



sub_408100 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+4]
add	ecx, 4
cmp	eax, ecx
setnz	dl
test	dl, dl
jz	short locret_40813E
push	esi
mov	esi, [esp+4+arg_0]

loc_408114:
cmp	[eax+8], esi
jz	short loc_408128
mov	eax, [eax]
cmp	eax, ecx
setnz	dl
test	dl, dl
jnz	short loc_408114
pop	esi
retn	4

loc_408128:
mov	ecx, [eax]
mov	edx, [eax+4]
push	0Ch
mov	[edx], ecx
push	eax
mov	[ecx+4], edx
call	sub_77E0D0
add	esp, 8
pop	esi

locret_40813E:
retn	4
sub_408100 endp

align 10h



sub_408150 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset unknown_libname_485 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_154CA98
mov	[esp+14h+var_4], 0FFFFFFFFh
lea	ecx, [esi+4]
call	sub_409540
test	[esp+14h+arg_0], 1
jz	short loc_40819D
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_40819D:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_408150 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12FFDD0

loc_4081C0:
mov	dword ptr [ecx], offset	off_154CAE8
retn
; END OF FUNCTION CHUNK	FOR sub_12FFDD0
align 10h



sub_4081D0 proc	near
xor	al, al
retn	4
sub_4081D0 endp

align 10h



; int __thiscall sub_4081E0(void *, char)
sub_4081E0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154CAE8
jz	short loc_4081F9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4081F9:
mov	eax, esi
pop	esi
retn	4
sub_4081E0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_13011B8

loc_408200:
push	0FFFFFFFFh
push	offset SEH_408240
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	dword ptr [ecx], offset	off_154CAF4
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	dword ptr [ecx], offset	off_154CAE8
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
; END OF FUNCTION CHUNK	FOR sub_13011B8
align 10h



; int __thiscall sub_408240(void *, char)
sub_408240 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_408240
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_154CAF4
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154CAE8
jz	short loc_408281
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_408281:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_408240 endp

align 10h



sub_4082A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_8]
mov	[eax+4], edx
mov	edx, [esp+arg_C]
mov	[eax+8], ecx
mov	ecx, [esp+arg_10]
mov	[eax+0Ch], edx
mov	edx, [esp+arg_14]
mov	[eax+10h], ecx
mov	ecx, [esp+arg_18]
mov	[eax+14h], edx
mov	edx, [esp+arg_1C]
mov	[eax+18h], ecx
mov	[eax+1Ch], edx
retn	20h
sub_4082A0 endp

align 10h



sub_4082E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4082E0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
push	esi
call	sub_409660
mov	[esp+10h+var_4], 0
mov	dword ptr [esi], offset	off_154CB0C
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_4082E0 endp

align 10h



; int __stdcall	sub_408330(size_t Size,	size_t Alignment)
sub_408330 proc	near

Size= dword ptr	 4
Alignment= dword ptr  8

mov	eax, [esp+Alignment]
mov	ecx, [esp+Size]
push	eax		; Alignment
push	ecx		; Size
call	__aligned_malloc
add	esp, 8
retn	8
sub_408330 endp

align 10h



; int __stdcall	sub_408350(void	*Memory, int, int)
sub_408350 proc	near

Memory=	dword ptr  4

mov	eax, [esp+Memory]
push	eax		; Memory
call	__aligned_free
pop	ecx
retn	0Ch
sub_408350 endp

align 10h



; int __stdcall	sub_408360(void	*Memory, int, size_t NewSize, size_t Alignment)
sub_408360 proc	near

Memory=	dword ptr  4
NewSize= dword ptr  0Ch
Alignment= dword ptr  10h

mov	eax, [esp+Alignment]
mov	ecx, [esp+NewSize]
mov	edx, [esp+Memory]
push	eax		; Alignment
push	ecx		; NewSize
push	edx		; Memory
call	__aligned_realloc
add	esp, 0Ch
retn	10h
sub_408360 endp

align 10h



; int __thiscall sub_408380(void *, char)
sub_408380 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_408380
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_154CB0C
or	eax, 0FFFFFFFFh
mov	[esp+14h+var_4], eax
mov	dword ptr [esi], offset	off_154CAF4
mov	[esp+14h+var_4], eax
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154CAE8
jz	short loc_4083CA
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4083CA:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_408380 endp

align 10h



sub_4083E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4083E0
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
or	ecx, 0FFFFFFFFh
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CAF4
mov	[esp+0Ch+var_4], ecx
mov	ecx, [esp+0Ch+var_C]
mov	dword ptr [eax], offset	off_154CAE8
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_4083E0 endp



; Attributes: thunk

sub_408420 proc	near
jmp	sub_64A580
sub_408420 endp

align 10h



sub_408430 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
xor	eax, eax
mov	ecx, 4000h
mov	[esp+20h+var_20], eax
mov	[esp+20h+var_C], eax
mov	[esp+20h+var_4], eax
mov	eax, [esp+20h+arg_0]
mov	[esp+20h+var_18], ecx
mov	[esp+20h+var_14], ecx
push	eax
lea	ecx, [esp+24h+var_20]
push	ecx
mov	[esp+28h+var_1C], 10h
mov	[esp+28h+var_10], 40000h
mov	[esp+28h+var_8], 1
call	sub_64A550
add	esp, 28h
retn
sub_408430 endp

align 10h



sub_408480 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_12F4CC1
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
call	sub_64A580
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn
sub_408480 endp




sub_4084B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4084B0
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_15569CC
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CB3C
mov	[eax+4], edx
mov	[eax+8], cl
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_4084B0 endp

align 10h



sub_408500 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_408500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_154CB3C
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_15569CC
jz	short loc_40854B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_40854B:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_408500 endp

align 10h



sub_408560 proc	near
mov	ecx, 4
mov	[eax], cx
mov	byte ptr [eax+6], 0
retn
sub_408560 endp

align 10h



sub_408570 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_408570
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
push	esi
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1F46h
mov	[esp+14h+var_4], 0
lea	ecx, [eax+0Ch]
mov	dword ptr [eax], offset	off_154CB44
mov	[ecx+20h], ecx
mov	[esp+14h+var_10], ecx
mov	[ecx+24h], ecx
mov	dl, 1
mov	byte ptr [esp+14h+var_4], dl
mov	ecx, [ecx+20h]
xor	esi, esi
mov	[ecx], si
mov	byte ptr [esp+14h+var_4], 2
mov	[eax+8], dl
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_408570 endp

align 10h



sub_4085F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_408620
test	[esp+4+arg_0], 1
jz	short loc_408617
test	esi, esi
jz	short loc_408617
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_408617:
mov	eax, esi
pop	esi
retn	4
sub_4085F0 endp

align 10h



sub_408620 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_408620
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
lea	ecx, [esi+0Ch]
call	sub_407E50
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	dword ptr [esi], offset	off_154774C
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_408620 endp

align 10h



sub_408670 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1F7Ah
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], offset	off_154CB48
mov	[eax+14h], ecx
mov	[eax+10h], ecx
mov	[esp+0Ch+var_4], ecx
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408670 endp

align 10h



sub_4086D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154774C
jz	short loc_408715
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_408715:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_4086D0 endp

align 10h



sub_408730 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1388h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408730 endp

align 10h



sub_408780 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 138Ch
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_15477C4
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408780 endp




sub_4087D0 proc	near
mov	dword ptr [ecx], offset	off_154CB4C
retn
sub_4087D0 endp

align 10h



; int __thiscall sub_4087E0(void *, char)
sub_4087E0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154CB4C
jz	short loc_4087F9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4087F9:
mov	eax, esi
pop	esi
retn	4
sub_4087E0 endp

align 10h



sub_408800 proc	near
movss	xmm0, ds:dword_14EF16C
movss	dword ptr [eax], xmm0
movss	xmm0, ds:dword_15FCCC0
movss	dword ptr [eax+4], xmm0
movss	xmm0, ds:dword_1577A70
movss	dword ptr [eax+8], xmm0
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+0Ch], xmm0
retn
sub_408800 endp

align 10h



sub_408840 proc	near
movss	xmm0, ds:dword_15FCE04
movss	dword ptr [eax], xmm0
movss	xmm0, ds:dword_15FCE00
movss	dword ptr [eax+4], xmm0
movss	xmm0, ds:dword_15FCDFC
movss	dword ptr [eax+8], xmm0
movss	xmm0, ds:dword_15FCDF8
movss	dword ptr [eax+0Ch], xmm0
movss	xmm0, ds:dword_15FCDF4
movss	dword ptr [eax+10h], xmm0
movss	xmm0, ds:flt_15FCDF0
movss	dword ptr [eax+14h], xmm0
movss	xmm0, ds:dword_15FCDEC
movss	dword ptr [eax+18h], xmm0
movss	xmm0, ds:dword_15FCDE8
movss	dword ptr [eax+1Ch], xmm0
retn
sub_408840 endp

align 10h



sub_4088B0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
shr	eax, 6
mov	dword ptr [esi], offset	off_154CB6C
test	al, 1
jz	short loc_4088D7
mov	ecx, [esi+10h]
push	ecx
mov	ecx, [esi+8]
push	esi
call	sub_64B5D0
mov	dword ptr [esi+8], 0

loc_4088D7:
pop	esi
retn
sub_4088B0 endp

align 10h



sub_4088E0 proc	near
mov	eax, [ecx+0Ch]
and	eax, 8Fh
retn
sub_4088E0 endp

align 10h



sub_4088F0 proc	near
fld	qword ptr [ecx+10h]
retn
sub_4088F0 endp

align 10h



sub_408900 proc	near
mov	eax, [ecx+0Ch]
shr	eax, 6
test	al, 1
jz	short loc_408910
mov	ecx, [ecx+10h]
mov	eax, [ecx]
retn

loc_408910:
mov	eax, [ecx+10h]
retn
sub_408900 endp

align 10h



sub_408920 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+24h]
push	2
call	edx
mov	al, [esp+4+arg_0]
mov	[esi+10h], al
pop	esi
retn	4
sub_408920 endp

align 10h



sub_408940 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+24h]
push	3
call	edx
fld	qword ptr [esp+8]
fstp	qword ptr [esi+10h]
pop	esi
retn	8
sub_408940 endp

align 10h



sub_408960 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+24h]
push	4
call	edx
mov	eax, [esp+4+arg_0]
mov	[esi+10h], eax
pop	esi
retn	4
sub_408960 endp

align 10h



sub_408980 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+24h]
push	5
call	edx
mov	eax, [esp+4+arg_0]
mov	[esi+10h], eax
pop	esi
retn	4
sub_408980 endp

align 10h



sub_4089A0 proc	near
mov	eax, [ecx+0Ch]
shr	eax, 6
and	eax, 1
retn
sub_4089A0 endp

align 10h



sub_4089B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
shr	eax, 6
test	al, 1
jz	short loc_4089DC
mov	ecx, [esi+10h]
push	ecx
mov	ecx, [esi+8]
push	esi
call	sub_64B5D0
mov	edx, [esp+4+arg_0]
mov	dword ptr [esi+8], 0
mov	[esi+0Ch], edx
pop	esi
retn	4

loc_4089DC:
mov	eax, [esp+4+arg_0]
mov	[esi+0Ch], eax
pop	esi
retn	4
sub_4089B0 endp

align 10h



sub_4089F0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	ecx, [esi+8]
push	eax
push	esi
call	sub_64B5D0
mov	dword ptr [esi+8], 0
pop	esi
retn
sub_4089F0 endp

align 10h



; int __thiscall sub_408A10(void *, char)
sub_408A10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
shr	eax, 6
mov	dword ptr [esi], offset	off_154CB6C
test	al, 1
jz	short loc_408A37
mov	ecx, [esi+10h]
push	ecx
mov	ecx, [esi+8]
push	esi
call	sub_64B5D0
mov	dword ptr [esi+8], 0

loc_408A37:
test	[esp+4+arg_0], 1
jz	short loc_408A47
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_408A47:
mov	eax, esi
pop	esi
retn	4
sub_408A10 endp

align 10h


; Attributes: thunk

sub_408A50 proc	near
jmp	sub_F9AC20
sub_408A50 endp

align 10h


; Attributes: thunk

sub_408A60 proc	near
jmp	sub_F8E9B0
sub_408A60 endp

align 10h


; Attributes: thunk

sub_408A70 proc	near
jmp	sub_F5AF70
sub_408A70 endp

align 10h


; Attributes: thunk

sub_408A80 proc	near
jmp	sub_F72150
sub_408A80 endp

align 10h



sub_408A90 proc	near
mov	eax, [ecx+0Ch]
cmp	eax, 2
jnz	short loc_408A9C
mov	al, [ecx+10h]
retn

loc_408A9C:
cmp	eax, 3
jnz	short loc_408AB2
fldz
fld	qword ptr [ecx+10h]
fcomip	st, st(1)
fstp	st
jbe	short loc_408AB2
mov	eax, 1
retn

loc_408AB2:
xor	eax, eax
retn
sub_408A90 endp

align 10h



sub_408AC0 proc	near
cmp	dword ptr [ecx+0Ch], 3
jnz	short loc_408ACA
fld	qword ptr [ecx+10h]
retn

loc_408ACA:
fldz
retn
sub_408AC0 endp

align 10h



sub_408AD0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+4]
call	edx
cmp	eax, 4
jnz	short loc_408AF5
mov	eax, [esi+0Ch]
shr	eax, 6
test	al, 1
jz	short loc_408AF0
mov	ecx, [esi+10h]
mov	eax, [ecx]
pop	esi
retn

loc_408AF0:
mov	eax, [esi+10h]
pop	esi
retn

loc_408AF5:
mov	eax, offset byte_146D660
pop	esi
retn
sub_408AD0 endp

align 10h



sub_408B00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_408B00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_154CAB0
mov	[esp+14h+var_4], 0
push	0
call	sub_F66FB0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, [esi+0Ch]
shr	eax, 6
mov	dword ptr [esi], offset	off_154CB6C
test	al, 1
jz	short loc_408B5E
mov	ecx, [esi+10h]
push	ecx
mov	ecx, [esi+8]
push	esi
call	sub_64B5D0
mov	dword ptr [esi+8], 0

loc_408B5E:
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_408B00 endp

align 10h



; int __thiscall sub_408B70(void *, char)
sub_408B70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_408B00
test	[esp+4+arg_0], 1
jz	short loc_408B88
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_408B88:
mov	eax, esi
pop	esi
retn	4
sub_408B70 endp

align 10h



sub_408B90 proc	near
xor	ecx, ecx
mov	dword ptr [eax], 0Eh
mov	[eax+5], cl
mov	[eax+6], cl
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
retn
sub_408B90 endp

align 10h



sub_408BB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1770h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408BB0 endp

align 10h



sub_408C00 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1772h
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CB98
mov	dword ptr [eax+8], 0Eh
mov	[eax+0Dh], cl
mov	[eax+0Eh], cl
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], cl
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408C00 endp

align 10h



sub_408C70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154774C
jz	short loc_408CB5
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_408CB5:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_408C70 endp

align 10h



sub_408CD0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1774h
xor	edx, edx
mov	[esp+0Ch+var_4], edx
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], offset	off_15477C4
mov	[eax+8], ecx
mov	[eax+0Ch], dl
mov	[esp+0Ch+var_4], ecx
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408CD0 endp

align 10h



sub_408D20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1776h
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_15477C4
mov	[eax+8], cl
mov	[eax+0Ch], ecx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408D20 endp




sub_408D70 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1771h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_154CB9C
mov	byte ptr [eax+8], 1
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408D70 endp




sub_408DC0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1782h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_154CB9C
mov	byte ptr [eax+8], 1
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408DC0 endp




sub_408E10 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1786h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408E10 endp

align 10h



sub_408E60 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1787h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408E60 endp

align 10h



sub_408EB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 2720h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408EB0 endp

align 10h



sub_408F00 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 2731h
mov	[esp+0Ch+var_4], 0
mov	ecx, 64h
mov	edx, ecx
mov	dword ptr [eax], offset	off_154CB9C
mov	[eax+0Ah], cx
mov	[eax+8], dx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408F00 endp

align 10h



sub_408F60 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 2738h
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CB9C
mov	[eax+8], ecx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408F60 endp

align 10h



sub_408FB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 1B7Fh
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CB9C
mov	[eax+8], cl
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_408FB0 endp

align 10h



sub_409000 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [esp+0Ch+var_C]
mov	dword ptr [eax], offset	off_154774C
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_409000 endp

align 10h



sub_409040 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_409040
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 32EAh
xor	edx, edx
mov	[esp+10h+var_4], edx
lea	ecx, [eax+0Ch]
mov	dword ptr [eax], offset	off_154CBA0
mov	[ecx+10h], ecx
mov	[esp+10h+var_10], ecx
mov	[ecx+14h], ecx
mov	byte ptr [esp+10h+var_4], 1
mov	ecx, [ecx+10h]
mov	[ecx], dl
mov	byte ptr [esp+10h+var_4], 2
mov	[eax+8], dl
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_409040 endp

align 10h



sub_4090B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_4090E0
test	[esp+4+arg_0], 1
jz	short loc_4090D7
test	esi, esi
jz	short loc_4090D7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_4090D7:
mov	eax, esi
pop	esi
retn	4
sub_4090B0 endp

align 10h



sub_4090E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4090E0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0
lea	ecx, [esi+0Ch]
call	sub_407910
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	dword ptr [esi], offset	off_154774C
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_4090E0 endp

align 10h



sub_409130 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 3707h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_154CB9C
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_409130 endp

align 10h



sub_409180 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 371Eh
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CB9C
mov	[eax+8], ecx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_409180 endp

align 10h



sub_4091D0 proc	near

var_A= word ptr	-0Ah
var_8= qword ptr -8

sub	esp, 0Ch
fld	dword ptr [eax+170h]
fmul	ds:dbl_15FCD88
fnstcw	[esp+0Ch+var_A]
movzx	eax, [esp+0Ch+var_A]
or	eax, 0C00h
mov	dword ptr [esp+0Ch+var_8], eax
fldcw	word ptr [esp+0Ch+var_8]
fistp	[esp+0Ch+var_8]
mov	eax, dword ptr [esp+0Ch+var_8]
fldcw	[esp+0Ch+var_A]
add	esp, 0Ch
retn
sub_4091D0 endp

align 10h



sub_409210 proc	near
movss	xmm0, dword ptr	[eax+ecx*4+40h]
retn
sub_409210 endp

align 10h



sub_409220 proc	near
mov	al, byte_1692CFF
retn
sub_409220 endp

align 10h



sub_409230 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 2B17h
mov	[esp+0Ch+var_4], 0
xorps	xmm0, xmm0
mov	dword ptr [eax], offset	off_154CB9C
movss	dword ptr [eax+8], xmm0
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_409230 endp

align 10h



; int __stdcall	sub_409290(double)
sub_409290 proc	near

var_14=	dword ptr -14h
var_C= qword ptr -0Ch
arg_0= qword ptr  4

sub	esp, 14h
mov	ecx, [esi+18h]
fld	[esp+14h+arg_0]
mov	[esp+14h+var_14], eax
fstp	[esp+14h+var_C]
mov	eax, [esi+10h]
sub	ecx, 10h
cmp	eax, ecx
jz	short loc_4092C2
push	eax
lea	ecx, [esp+18h+var_14]
call	sub_40A1E0
add	esp, 4
add	dword ptr [esi+10h], 10h
add	esp, 14h
retn	8

loc_4092C2:
lea	edx, [esp+14h+var_14]
push	edx
push	esi
call	sub_409D10
add	esp, 14h
retn	8
sub_409290 endp

align 10h



sub_4092E0 proc	near

var_10=	dword ptr -10h

sub	esp, 18h
fldz
push	ebx
push	ebp
fstp	qword ptr [edi+8]
push	esi
mov	esi, eax
mov	eax, [esi+4]
mov	edx, [esi+0Ch]
mov	ebx, [esi+10h]
sub	ebx, [esi+14h]
mov	ebp, [esi+1Ch]
mov	ecx, [esi]
mov	[esp+24h+var_10], eax
mov	eax, [esi+8]
sub	ebp, edx
sar	ebx, 4
sar	ebp, 2
sub	eax, ecx
lea	edx, [ebx+ebp*8-8]
sar	eax, 4
add	edx, eax
mov	dword ptr [edi], 0
jz	short loc_40933D
mov	eax, ecx
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[edi], ecx
mov	ecx, [eax+8]
mov	[edi+4], edx
mov	edx, [eax+0Ch]
mov	[edi+8], ecx
mov	[edi+0Ch], edx
call	sub_409780

loc_40933D:
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
add	esp, 18h
retn
sub_4092E0 endp

align 10h



sub_409350 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_409350
push	eax
mov	eax, 1
mov	large fs:0, esp
test	byte ptr dword_185F200,	al
jnz	short loc_40939F
or	dword_185F200, eax
mov	[esp+0Ch+var_4], 0
call	sub_409A60
mov	byte ptr [esp+0Ch+var_4], 0
push	offset sub_1411D40 ; void (__cdecl *)()
call	_atexit
add	esp, 4
mov	[esp+0Ch+var_4], 0FFFFFFFFh

loc_40939F:
mov	ecx, [esp+0Ch+var_C]
mov	eax, offset dword_185F204
mov	large fs:0, ecx
add	esp, 0Ch
retn
sub_409350 endp

align 10h



sub_4093C0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_130CF30
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
call	sub_4097D0
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn
sub_4093C0 endp




sub_4093F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4093F0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	[esp+10h+var_4], 2
lea	ecx, [esi+28h]
call	sub_408B00
mov	byte ptr [esp+10h+var_4], 1
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_40942B
call	sub_64A430

loc_40942B:
mov	byte ptr [esp+10h+var_4], 0
lea	ecx, [esi+8]
call	sub_407910
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	dword ptr [esi], offset	off_154774C
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_4093F0 endp

align 10h



sub_409460 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_409460
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
xor	edx, edx
mov	[esp+10h+var_4], edx
lea	ecx, [eax+10h]
mov	[esp+10h+var_10], ecx
mov	byte ptr [esp+10h+var_4], dl
mov	dword ptr [ecx], offset	off_154CB4C
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	dword ptr [eax], offset	off_154774C
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_409460 endp

align 10h



sub_4094B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4094B0
push	eax
mov	large fs:0, esp
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [esp+0Ch+var_C]
mov	dword ptr [eax], offset	off_154CB4C
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_4094B0 endp

align 10h
; [00000001 BYTES: COLLAPSED FUNCTION nullsub_1. PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_409500 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_409500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
push	ecx
mov	[eax], eax
mov	[eax+4], eax
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_409500 endp

align 10h



sub_409540 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_409540
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
push	edi
mov	edi, ecx
mov	[esp+18h+var_10], edi
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	esi, [edi]
cmp	esi, edi
jz	short loc_409583
lea	esp, [esp+0]

loc_409570:
mov	eax, esi
mov	esi, [esi]
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8
cmp	esi, edi
jnz	short loc_409570

loc_409583:
mov	ecx, [esp+18h+var_C]
mov	[edi+4], edi
mov	[edi], edi
pop	edi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_409540 endp

align 10h



sub_4095A0 proc	near
mov	ecx, [edx]
xor	eax, eax
cmp	ecx, edx
jz	short locret_4095AF

loc_4095A8:
mov	ecx, [ecx]
inc	eax
cmp	ecx, edx
jnz	short loc_4095A8

locret_4095AF:
retn
sub_4095A0 endp




sub_4095B0 proc	near
push	esi
mov	esi, [eax]
push	ecx
call	sub_409AD0
mov	ecx, [esi+4]
mov	[eax], esi
mov	[eax+4], ecx
mov	[ecx], eax
mov	[esi+4], eax
pop	esi
retn
sub_4095B0 endp

align 10h



sub_4095D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+4]
push	esi
mov	esi, [eax]
mov	[ecx], esi
mov	[esi+4], ecx
test	eax, eax
jz	short loc_4095EE
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8

loc_4095EE:
mov	[edi], esi
mov	eax, edi
pop	esi
retn	4
sub_4095D0 endp

align 10h



sub_409600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
cmp	eax, edx
setnz	cl
test	cl, cl
jz	short loc_40963D

loc_409611:
mov	ecx, [eax]
mov	[esp+arg_0], ecx
mov	ecx, [eax]
mov	edx, [eax+4]
push	0Ch
mov	[edx], ecx
push	eax
mov	[ecx+4], edx
call	sub_77E0D0
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
add	esp, 8
cmp	eax, edx
setnz	cl
test	cl, cl
jnz	short loc_409611

loc_40963D:
mov	eax, esi
mov	[esi], edx
retn	8
sub_409600 endp

align 10h



sub_409650 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
xor	eax, eax
cmp	edx, [esp+arg_0]
setnz	al
retn	4
sub_409650 endp

align 10h



sub_409660 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_409660
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154CAE8
xor	ecx, ecx
mov	[esp+0Ch+var_4], ecx
mov	dword ptr [eax], offset	off_154CAF4
mov	[esp+0Ch+var_4], 1
mov	dword ptr [eax], offset	off_154CB24
mov	[eax+4], ecx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_409660 endp

align 10h



sub_4096C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_4096C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
mov	ebx, 1
test	byte ptr dword_196DB50,	bl
jnz	short loc_4096FD
or	dword_196DB50, ebx
xor	eax, eax
mov	[esp+14h+var_4], eax
mov	byte_196DB4C, al
mov	[esp+14h+var_4], 0FFFFFFFFh

loc_4096FD:
mov	[esp+14h+var_10], offset unk_196DB44
mov	[esp+14h+var_4], ebx
push	offset unk_196DB44
call	sub_4082E0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	dword ptr [eax+4], offset unk_196DB44
mov	byte_196DB4C, bl
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn
sub_4096C0 endp

align 10h



sub_409740 proc	near
push	esi
mov	esi, ecx
call	sub_64D070
mov	eax, [esi+4]
test	eax, eax
jz	short loc_409764
mov	byte ptr [eax+8], 0
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
mov	dword ptr [esi+4], 0

loc_409764:
pop	esi
retn
sub_409740 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1304A73

loc_409770:
mov	ecx, [eax]
test	ecx, ecx
jz	short locret_40977B
jmp	sub_64A430

locret_40977B:
retn
; END OF FUNCTION CHUNK	FOR sub_1304A73
align 10h



sub_409780 proc	near
mov	ecx, [esi+8]
mov	eax, [esi]
sub	ecx, 10h
cmp	eax, ecx
jz	short loc_409792
add	eax, 10h
mov	[esi], eax
retn

loc_409792:
mov	eax, [esi+4]
test	eax, eax
jz	short loc_4097A7
push	80h
push	eax
call	sub_77E0D0
add	esp, 8

loc_4097A7:
mov	eax, [esi+0Ch]
add	eax, 4
mov	[esi+0Ch], eax
mov	eax, [eax]
mov	[esi+4], eax
mov	edx, [esi+4]
sub	eax, 0FFFFFF80h
mov	[esi+8], eax
mov	[esi], edx
retn
sub_409780 endp

align 10h



sub_4097D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_130CF35
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_4], 0
mov	ecx, dword_185F214
sub	esp, 10h
mov	eax, esp
mov	[eax], ecx
mov	edx, dword_185F218
mov	[eax+4], edx
mov	ecx, dword_185F21C
mov	[eax+8], ecx
mov	edx, dword_185F220
mov	[eax+0Ch], edx
mov	ecx, dword_185F204
mov	[esp+20h+var_10], esp
sub	esp, 10h
mov	eax, esp
mov	[eax], ecx
mov	edx, dword_185F208
mov	[eax+4], edx
mov	ecx, dword_185F20C
mov	[eax+8], ecx
mov	edx, dword_185F210
mov	[esp+30h+var_10], esp
mov	[eax+0Ch], edx
call	sub_409E70
add	esp, 20h
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_409BE0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_4097D0 endp

align 10h



sub_409870 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4098E0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	dword ptr [esi], offset	off_154774C
mov	dword ptr [esi+4], 138Bh
mov	[esp+10h+var_4], 0
mov	ecx, [esp+10h+arg_8]
mov	eax, [esp+10h+arg_4]
mov	[esi+0Ch], ecx
lea	ecx, [esi+10h]
mov	dword ptr [esi], offset	off_154CB94
mov	[esi+8], eax
call	sub_DD6070
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	0Ch
sub_409870 endp

align 10h



sub_4098E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_4098E0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
mov	dword ptr [esi], offset	off_154774C
mov	dword ptr [esi+4], 138Bh
mov	[esp+10h+var_4], 0
mov	ecx, [esp+10h+arg_8]
mov	eax, [esp+10h+arg_4]
mov	[esi+0Ch], ecx
lea	ecx, [esi+10h]
mov	dword ptr [esi], offset	off_154CB94
mov	[esi+8], eax
call	sub_D844D0
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	eax, esi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	0Ch
sub_4098E0 endp

align 10h



; int __thiscall sub_409950(void *, char)
sub_409950 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_409950
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
or	eax, 0FFFFFFFFh
mov	[esp+14h+var_4], eax
mov	dword ptr [esi], offset	off_154CAF4
mov	[esp+14h+var_4], eax
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154CAE8
jz	short loc_409994
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_409994:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_409950 endp

align 10h



sub_4099B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_409460
test	[esp+4+arg_0], 1
jz	short loc_4099D7
test	esi, esi
jz	short loc_4099D7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_4099D7:
mov	eax, esi
pop	esi
retn	4
sub_4099B0 endp

align 10h



sub_4099E0 proc	near

arg_0= dword ptr  4

push	edi
push	eax
call	sub_409AD0
mov	edi, [esp+4+arg_0]
mov	edx, [edi+4]
lea	ecx, [edi+4]
mov	[eax], edi
mov	[eax+4], edx
mov	[edx], eax
mov	[ecx], eax
mov	[esi], eax
mov	eax, esi
pop	edi
retn	4
sub_4099E0 endp

align 10h



sub_409A10 proc	near
mov	[eax], eax
mov	[eax+4], eax
retn
sub_409A10 endp

align 10h



sub_409A20 proc	near
push	esi
mov	esi, [edi]
cmp	esi, edi
jz	short loc_409A3A

loc_409A27:
mov	eax, esi
mov	esi, [esi]
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8
cmp	esi, edi
jnz	short loc_409A27

loc_409A3A:
mov	[edi+4], edi
mov	[edi], edi
pop	esi
retn
sub_409A20 endp

align 10h



sub_409A50 proc	near
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [ecx]
mov	[edx], ecx
retn
sub_409A50 endp

align 10h



sub_409A60 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_130CF35
push	eax
xor	eax, eax
mov	large fs:0, esp
mov	dword_185F204, eax
mov	dword_185F208, eax
mov	dword_185F20C, eax
mov	dword_185F210, eax
mov	dword_185F214, eax
mov	dword_185F218, eax
mov	dword_185F21C, eax
mov	dword_185F220, eax
mov	dword_185F224, eax
mov	dword_185F228, eax
call	sub_409C30
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	eax, offset dword_185F204
mov	large fs:0, ecx
add	esp, 0Ch
retn
sub_409A60 endp

align 10h


; Attributes: bp-based frame

sub_409AD0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_409AD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_14], 0Ch
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_409AD0 endp



; Attributes: noreturn

sub_409B30 proc	near
mov	eax, [ebp-18h]
test	eax, eax
jz	short loc_409B42
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8

loc_409B42:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_409B30 endp

align 10h



sub_409B50 proc	near
mov	edx, [ecx]
mov	[eax+4], edx
retn
sub_409B50 endp

align 10h



sub_409B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
sub	esp, 8
cmp	eax, edx
setnz	cl
push	edi
mov	edi, [esp+0Ch+arg_C]
test	cl, cl
jz	short loc_409B90
lea	esp, [esp+0]

loc_409B80:
cmp	[eax+8], edi
jz	short loc_409B90
mov	eax, [eax]
cmp	eax, edx
setnz	cl
test	cl, cl
jnz	short loc_409B80

loc_409B90:
mov	[esp+0Ch+arg_0], eax
cmp	eax, edx
jnz	short loc_409BA1
mov	[esi], eax
mov	eax, esi
pop	edi
add	esp, 8
retn

loc_409BA1:
mov	ecx, [esp+0Ch+arg_8]
push	edi
push	ecx
push	ecx
mov	ecx, esp
mov	[ecx], eax
mov	edx, [esp+18h+arg_4]
mov	[esp+18h+var_4], esp
push	ecx
mov	ecx, esp
mov	[esp+1Ch+var_4], esp
mov	[ecx], edx
mov	eax, [eax]
push	ecx
mov	ecx, esp
mov	[ecx], eax
mov	eax, esi
mov	[esp+20h+var_4], esp
call	sub_409F70
add	esp, 14h
mov	eax, esi
pop	edi
add	esp, 8
retn
sub_409B60 endp

align 10h



sub_409BE0 proc	near
cmp	dword_185F224, 0
jz	short locret_409C2C
mov	eax, dword_185F210
push	edi
mov	edi, dword_185F220
add	edi, 4
call	sub_40A050
mov	ecx, dword_185F224
pop	edi
test	ecx, ecx
jz	short locret_409C2C
mov	eax, dword_185F228
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_409C22
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_409C22:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_409C2C:
retn
sub_409BE0 endp

align 10h


; Attributes: bp-based frame

sub_409C30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_409C30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, 8
mov	dword_185F228, eax
call	sub_409F10
mov	dword_185F224, eax
mov	ecx, dword_185F228
dec	ecx
shr	ecx, 1
lea	esi, [eax+ecx*4]
lea	edi, [esi+4]
mov	[ebp+var_4], 0
push	edi
push	esi
call	sub_409FC0
mov	[ebp+var_4], 0FFFFFFFFh
mov	dword_185F210, esi
mov	esi, [esi]
mov	dword_185F208, esi
lea	edx, [esi+80h]
mov	dword_185F20C, edx
lea	eax, [edi-4]
mov	dword_185F220, eax
mov	eax, [eax]
mov	dword_185F218, eax
lea	ecx, [eax+80h]
mov	dword_185F21C, ecx
mov	dword_185F204, esi
mov	dword_185F214, eax
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_409C30 endp



; Attributes: noreturn

sub_409CD8 proc	near
mov	ecx, dword_185F224 ; void *
xor	esi, esi
cmp	ecx, esi
jz	short loc_409CEE
mov	eax, dword_185F228
call	sub_409EF0

loc_409CEE:
mov	dword_185F224, esi
mov	dword_185F228, esi
push	esi
push	esi
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_409CD8 endp

align 10h


; Attributes: bp-based frame

sub_409D10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_409D10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	esi, [ebp+arg_0]
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
sar	eax, 2
mov	ecx, [esi+24h]
sub	ecx, eax
cmp	ecx, 2
jnb	short loc_409D4C
call	sub_40A080

loc_409D4C:
mov	[ebp+var_14], 80h
lea	edx, [ebp+var_14]
push	edx
call	sub_77E150
add	esp, 4
mov	ecx, [esi+1Ch]
mov	[ecx+4], eax
mov	[ebp+var_4], 0
mov	eax, [esi+10h]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_40A1E0
add	esp, 4
mov	eax, [esi+1Ch]
add	eax, 4
mov	[esi+1Ch], eax
mov	eax, [eax]
mov	[esi+14h], eax
sub	eax, 0FFFFFF80h
mov	[esi+18h], eax
mov	edx, [esi+14h]
mov	[esi+10h], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_409D10 endp



; Attributes: noreturn

sub_409DAF proc	near
mov	eax, [ebp+8]
mov	ecx, [eax+1Ch]
mov	ecx, [ecx+4]	; void *
test	ecx, ecx
jz	short loc_409DC6
mov	eax, 8
call	sub_409ED0

loc_409DC6:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_409DAF endp

align 10h



sub_409DD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_409DD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esp+1Ch+arg_0]
push	esi
push	edi
xor	ebx, ebx
mov	esi, ecx
mov	edi, edx
mov	[esp+24h+var_4], ebx
mov	[esp+24h+var_10], ebx
mov	eax, [esi+20h]
sub	eax, [esi+24h]
mov	ecx, [edi+20h]
mov	edx, [edi+24h]
sub	ecx, edx
sar	eax, 1
sar	ecx, 1
add	eax, ecx
push	eax
mov	byte ptr [esp+28h+var_14], bl
mov	eax, [esp+28h+var_14]
push	eax
push	ebp
call	sub_404330
mov	[esp+24h+var_4], ebx
mov	eax, [edi+20h]
mov	edi, [edi+24h]
push	eax
push	edi
mov	ecx, ebp
mov	[esp+2Ch+var_10], 1
call	sub_403490
mov	eax, [esi+20h]
mov	esi, [esi+24h]
push	eax
push	esi
mov	ecx, ebp
call	sub_403490
mov	ecx, [esp+24h+var_C]
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_409DD0 endp

align 10h



sub_409E70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	ecx, [esp+arg_10]
sub	esp, 10h
mov	eax, esp
mov	[eax], ecx
mov	edx, [esp+10h+arg_14]
mov	[eax+4], edx
mov	ecx, [esp+10h+arg_18]
mov	[eax+8], ecx
mov	edx, [esp+10h+arg_1C]
mov	[eax+0Ch], edx
mov	ecx, [esp+10h+arg_0]
sub	esp, 10h
mov	eax, esp
mov	[eax], ecx
mov	edx, [esp+20h+arg_4]
mov	[eax+4], edx
mov	ecx, [esp+20h+arg_8]
mov	[eax+8], ecx
mov	edx, [esp+20h+arg_C]
mov	[eax+0Ch], edx
call	sub_40A190
add	esp, 20h
retn
sub_409E70 endp

align 10h



sub_409EC0 proc	near
mov	ecx, [eax]
mov	[edx], ecx
retn
sub_409EC0 endp

align 10h



; int __fastcall sub_409ED0(void *)
sub_409ED0 proc	near
shl	eax, 4
cmp	eax, 80h
jbe	short loc_409EE4
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_409EE4:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8
retn
sub_409ED0 endp

align 10h



; int __fastcall sub_409EF0(void *)
sub_409EF0 proc	near
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_409F05
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_409F05:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8
retn
sub_409EF0 endp




sub_409F10 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 10h
cmp	eax, 3FFFFFFFh
jbe	short loc_409F32
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_409F32:
test	eax, eax
jz	short loc_409F61
add	eax, eax
add	eax, eax
mov	[esp+10h+var_10], eax
cmp	eax, 80h
jbe	short loc_409F51
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
add	esp, 10h
retn

loc_409F51:
lea	ecx, [esp+10h+var_10]
push	ecx
call	sub_77E150
add	esp, 4
add	esp, 10h
retn

loc_409F61:
xor	eax, eax
add	esp, 10h
retn
sub_409F10 endp

align 10h



sub_409F70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h

mov	ecx, [esp+arg_0]
cmp	ecx, [esp+arg_4]
setnz	dl
test	dl, dl
jz	short loc_409FB3
push	esi
mov	esi, [esp+4+arg_8]

loc_409F84:
mov	edx, [ecx+8]
cmp	edx, [esp+4+arg_10]
jz	short loc_409F9E
mov	[esi+8], edx
mov	ecx, [esp+4+arg_8]
mov	esi, [ecx]
mov	ecx, [esp+4+arg_0]
mov	[esp+4+arg_8], esi

loc_409F9E:
mov	ecx, [ecx]
cmp	ecx, [esp+4+arg_4]
mov	[esp+4+arg_0], ecx
setnz	dl
test	dl, dl
jnz	short loc_409F84
mov	[eax], esi
pop	esi
retn

loc_409FB3:
mov	edx, [esp+arg_8]
mov	[eax], edx
retn
sub_409F70 endp

align 10h


; Attributes: bp-based frame

sub_409FC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_409FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	ebx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[ebp+var_14], esi
mov	[ebp+var_4], 0
mov	edi, 80h

loc_409FF6:
cmp	esi, ebx
jnb	short loc_40A013
mov	[ebp+arg_4], edi
lea	eax, [ebp+arg_4]
push	eax
call	sub_77E150
add	esp, 4
mov	[esi], eax
add	esi, 4
mov	[ebp+var_14], esi
jmp	short loc_409FF6

loc_40A013:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_409FC0 endp



; Attributes: noreturn

sub_40A02D proc	near
mov	edi, [ebp-14h]
mov	eax, [ebp+8]
call	sub_40A050
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_40A02D endp

align 10h



sub_40A050 proc	near
push	esi
mov	esi, eax
cmp	esi, edi
jnb	short loc_40A072

loc_40A057:
mov	eax, [esi]
test	eax, eax
jz	short loc_40A06B
push	80h
push	eax
call	sub_77E0D0
add	esp, 8

loc_40A06B:
add	esi, 4
cmp	esi, edi
jb	short loc_40A057

loc_40A072:
pop	esi
retn
sub_40A050 endp

align 10h



sub_40A080 proc	near

var_4= dword ptr -4

push	ecx
mov	ecx, [esi+1Ch]
mov	edx, [esi+0Ch]
mov	eax, [esi+24h]
push	ebx
mov	ebx, ecx
sub	ebx, edx
sar	ebx, 2
push	ebp
inc	ebx
push	edi
lea	edi, [ebx+1]
lea	ebp, [edi+edi]
mov	[esp+10h+var_4], 1
cmp	eax, ebp
jbe	short loc_40A0F3
sub	eax, edi
mov	edi, [esi+20h]
shr	eax, 1
lea	edi, [edi+eax*4]
sub	ecx, edx
cmp	edi, edx
jnb	short loc_40A0D0
add	ecx, 4
jz	loc_40A166
push	ecx
push	edx
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
jmp	loc_40A166

loc_40A0D0:
add	ecx, 4
test	ecx, ecx
jle	loc_40A166
push	ecx
lea	eax, ds:0[ebx*4]
sub	eax, ecx
push	edx
add	eax, edi
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
jmp	short loc_40A166

loc_40A0F3:
cmp	dword ptr [esi+24h], 1
lea	ecx, [esi+24h]
jnb	short loc_40A100
lea	ecx, [esp+10h+var_4]

loc_40A100:
mov	ecx, [ecx]
lea	ebp, [eax+ecx+2]
mov	eax, ebp
call	sub_409F10
mov	ecx, [esi+0Ch]
mov	edx, ebp
sub	edx, edi
shr	edx, 1
mov	[esp+10h+var_4], eax
lea	edi, [eax+edx*4]
mov	eax, [esi+1Ch]
sub	eax, ecx
add	eax, 4
jz	short loc_40A132
push	eax
push	ecx
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_40A132:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_40A15C
mov	eax, [esi+24h]
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_40A152
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_40A15C

loc_40A152:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_40A15C:
mov	eax, [esp+10h+var_4]
mov	[esi+20h], eax
mov	[esi+24h], ebp

loc_40A166:
mov	[esi+0Ch], edi
mov	eax, [edi]
mov	[esi+4], eax
sub	eax, 0FFFFFF80h
mov	[esi+8], eax
lea	eax, [edi+ebx*4-4]
mov	[esi+1Ch], eax
mov	eax, [eax]
pop	edi
mov	[esi+14h], eax
sub	eax, 0FFFFFF80h
pop	ebp
mov	[esi+18h], eax
pop	ebx
pop	ecx
retn
sub_40A080 endp

align 10h



sub_40A190 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	ecx, [esp+arg_10]
sub	esp, 10h
mov	eax, esp
mov	[eax], ecx
mov	edx, [esp+10h+arg_14]
mov	[eax+4], edx
mov	ecx, [esp+10h+arg_18]
mov	[eax+8], ecx
mov	edx, [esp+10h+arg_1C]
mov	[eax+0Ch], edx
mov	ecx, [esp+10h+arg_0]
sub	esp, 10h
mov	eax, esp
mov	[eax], ecx
mov	edx, [esp+20h+arg_4]
mov	[eax+4], edx
mov	ecx, [esp+20h+arg_8]
mov	[eax+8], ecx
mov	edx, [esp+20h+arg_C]
mov	[eax+0Ch], edx
call	sub_40A250
add	esp, 20h
retn
sub_40A190 endp

align 10h



sub_40A1E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_40A1E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+var_10], eax
mov	[esp+10h+var_4], 0
test	eax, eax
jz	short loc_40A213
mov	edx, [ecx]
mov	[eax], edx
fld	qword ptr [ecx+8]
fstp	qword ptr [eax+8]

loc_40A213:
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40A1E0 endp

align 10h



sub_40A230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	edx, [esp+arg_4]
xor	eax, eax
cmp	ecx, [edx]
setz	al
retn	8
sub_40A230 endp

align 10h



sub_40A250 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_10]
cmp	eax, esi
jz	short loc_40A28D
mov	ecx, [esp+4+arg_C]
mov	edx, [esp+4+arg_8]

loc_40A265:
add	eax, 10h
mov	[esp+4+arg_0], eax
cmp	eax, edx
jnz	short loc_40A289
lea	eax, [ecx+4]
mov	ecx, eax
mov	[esp+4+arg_C], ecx
mov	eax, [eax]
lea	edx, [eax+80h]
mov	[esp+4+arg_4], eax
mov	[esp+4+arg_8], edx

loc_40A289:
cmp	eax, esi
jnz	short loc_40A265

loc_40A28D:
pop	esi
retn
sub_40A250 endp

align 10h



sub_40A290 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
sub	eax, ecx
test	eax, eax
jle	short loc_40A2B0
push	eax
push	ecx
mov	ecx, [esp+8+arg_8]
sub	ecx, eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
retn

loc_40A2B0:
mov	eax, [esp+arg_8]
retn
sub_40A290 endp

align 10h



sub_40A2C0 proc	near
add	dword ptr [eax+1Ch], 0FFFFFFFFh
jnz	short loc_40A2CD
mov	dword ptr [eax+18h], 0

loc_40A2CD:		; lpCriticalSection
push	eax
call	ds:LeaveCriticalSection
retn
sub_40A2C0 endp

align 10h



sub_40A2E0 proc	near
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
inc	dword ptr [esi+1Ch]
mov	[esi+18h], eax
retn
sub_40A2E0 endp

align 10h



; int __cdecl sub_40A300(char *Dst, rsize_t SizeInBytes, char *Src)
sub_40A300 proc	near

Dst= dword ptr	4
SizeInBytes= dword ptr	8
Src= dword ptr	0Ch

mov	eax, [esp+Src]
mov	ecx, [esp+SizeInBytes]
push	esi
mov	esi, [esp+4+Dst]
push	eax		; Src
push	ecx		; SizeInBytes
push	esi		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	eax, esi
pop	esi
retn
sub_40A300 endp

align 10h


; Attributes: bp-based frame

; int __thiscall sub_40A320(char *Src, int)
sub_40A320 proc	near

Arguments= dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset stru_1664708
push	offset __except_handler3
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_18], esp
mov	edi, ecx
mov	ebx, [ebp+arg_0]
mov	eax, [ebx+28h]
test	eax, eax
jz	short loc_40A366
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_40A366:
test	edi, edi
jz	short loc_40A3D0
cmp	byte ptr [edi],	0
jz	short loc_40A3D0
mov	eax, edi
lea	edx, [eax+1]

loc_40A374:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40A374
sub	eax, edx
lea	esi, [eax+1]
push	esi
call	sub_1227DA0
mov	[ebx+28h], eax
push	edi		; Src
push	esi		; SizeInBytes
push	eax		; Dst
call	_strcpy_s
add	esp, 10h
mov	[ebp+Arguments], 1000h
mov	[ebp+var_28], edi
mov	ecx, [ebx+24h]
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_20], eax
mov	[ebp+var_4], eax
lea	edx, [ebp+Arguments]
push	edx		; lpArguments
push	4		; nNumberOfArguments
push	eax		; dwExceptionFlags
push	406D1388h	; dwExceptionCode
call	ds:RaiseException
jmp	short loc_40A3C9

loc_40A3C0:
mov	eax, 1
retn

loc_40A3C6:
mov	esp, [ebp+var_18]

loc_40A3C9:
mov	[ebp+var_4], 0FFFFFFFFh

loc_40A3D0:
mov	ecx, [ebp+var_10]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_40A320 endp

align 10h



sub_40A3F0 proc	near
xor	eax, eax
push	esi		; lpCriticalSection
mov	[esi+18h], eax
mov	[esi+1Ch], eax
call	ds:InitializeCriticalSection
mov	eax, esi
retn
sub_40A3F0 endp

align 10h



sub_40A410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

movss	xmm0, [esp+arg_0]
mov	eax, ecx
movss	dword ptr [eax], xmm0
movss	xmm0, [esp+arg_4]
movss	dword ptr [eax+4], xmm0
movss	xmm0, [esp+arg_8]
movss	dword ptr [eax+8], xmm0
movss	xmm0, [esp+arg_C]
movss	dword ptr [eax+0Ch], xmm0
retn	10h
sub_40A410 endp




sub_40A440 proc	near
mov	eax, [ecx+4]
add	ecx, 4
xor	edx, edx
cmp	eax, ecx
jz	short loc_40A461
lea	esp, [esp+0]

loc_40A450:
mov	eax, [eax]
inc	edx
cmp	eax, ecx
jnz	short loc_40A450
test	edx, edx
jbe	short loc_40A461
mov	eax, [ecx]
mov	eax, [eax+8]
retn

loc_40A461:
or	eax, 0FFFFFFFFh
retn
sub_40A440 endp

align 10h



sub_40A470 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 371Ah
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_40A470 endp

align 10h



sub_40A4C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4

push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	[esp+14h+var_4], 0FFFFFFFFh
test	[esp+14h+arg_0], 1
mov	dword ptr [esi], offset	off_154774C
jz	short loc_40A505
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8
push	3
push	esi
call	eax

loc_40A505:
mov	ecx, [esp+14h+var_C]
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_40A4C0 endp

align 10h



sub_40A520 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 36FFh
mov	[esp+0Ch+var_4], 0
xor	ecx, ecx
mov	dword ptr [eax], offset	off_154CB9C
mov	[eax+8], cx
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_40A520 endp

align 10h



sub_40A580 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40A580
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [eax], offset	off_154774C
mov	dword ptr [eax+4], 3701h
mov	[esp+0Ch+var_4], 0
mov	dword ptr [eax], offset	off_15477CC
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [esp+0Ch+var_C]
mov	large fs:0, ecx
add	esp, 0Ch
retn	4
sub_40A580 endp

align 10h



sub_40A5D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_1278370
test	[esp+4+arg_0], 1
jz	short loc_40A5F7
test	esi, esi
jz	short loc_40A5F7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_40A5F7:
mov	eax, esi
pop	esi
retn	4
sub_40A5D0 endp

align 10h


; Attributes: bp-based frame

sub_40A600 proc	near

var_9C=	byte ptr -9Ch
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_7C=	byte ptr -7Ch
var_74=	byte ptr -74h
var_70=	word ptr -70h
var_68=	byte ptr -68h
var_60=	byte ptr -60h
var_40=	dword ptr -40h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, large fs:0
push	0FFFFFFFFh
push	offset sub_1309CB1
push	eax
mov	large fs:0, esp
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	ecx, [edi+4]
lea	eax, [edi+4]
xor	edx, edx
cmp	ecx, eax
jz	short loc_40A645

loc_40A633:
mov	ecx, [ecx]
inc	edx
cmp	ecx, eax
jnz	short loc_40A633
test	edx, edx
jbe	short loc_40A645
mov	eax, [eax]
mov	esi, [eax+8]
jmp	short loc_40A648

loc_40A645:
or	esi, 0FFFFFFFFh

loc_40A648:
lea	ecx, [esp+0A8h+var_68]
call	sub_110E1D0
mov	[esp+0A8h+var_4], 0
lea	eax, [esp+0A8h+var_9C]
mov	ecx, eax
mov	[esp+0A8h+var_8C], eax
mov	[esp+0A8h+var_88], ecx
mov	byte ptr [esp+0A8h+var_4], 1
mov	edx, [esp+0A8h+var_8C]
mov	byte ptr [edx],	0
mov	byte ptr [esp+0A8h+var_4], 2
lea	eax, [esi+1]	; switch 12 cases
cmp	eax, 0Bh
ja	loc_40A813	; default
			; jumptable 0040A68D cases 1,4
jmp	ds:off_40A95C[eax*4] ; switch jump

loc_40A694:		; jumptable 0040A68D case -1
push	offset aLoading
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
lea	eax, [esp+0A8h+var_74]
push	eax
call	sub_40A520
mov	byte ptr [esp+0A8h+var_4], 3
lea	ecx, [esp+0A8h+var_74]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	edx, [esp+0A8h+var_40]
mov	eax, [edx+30h]
push	offset aContext	; "context"
lea	ecx, [esp+0ACh+var_40]
call	eax
movzx	ecx, [esp+0ACh+var_70]
mov	edx, [eax]
push	ecx
mov	ecx, eax
mov	eax, [edx+30h]
push	offset aWhichscreen ; "whichscreen"
call	eax
mov	esi, eax
call	sub_401930
lea	ecx, [esp+0A8h+var_84]
push	ecx
call	sub_40A580
mov	bl, 4
mov	byte ptr [esp+0A8h+var_4], bl
lea	edx, [esp+0A8h+var_84]
push	edx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
cmp	al, 1
jnz	short loc_40A754
lea	eax, [esp+0A8h+var_7C]
push	eax
call	sub_40A470
mov	byte ptr [esp+0A8h+var_4], 5
lea	ecx, [esp+0A8h+var_7C]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	byte ptr [esp+0A8h+var_4], bl
lea	edx, [esp+0A8h+var_7C]
push	edx
call	sub_409000

loc_40A754:
mov	byte ptr [esp+0A8h+var_4], 3
lea	eax, [esp+0A8h+var_84]
push	eax
call	sub_409000
mov	byte ptr [esp+0A8h+var_4], 2
lea	ecx, [esp+0A8h+var_74]
push	ecx
call	sub_409000
jmp	loc_40A826

loc_40A77D:		; jumptable 0040A68D case 2
push	offset aBuilding
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	loc_40A826

loc_40A790:		; jumptable 0040A68D case 0
push	offset aGameplay
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	loc_40A826

loc_40A7A3:		; jumptable 0040A68D case 3
push	offset aHappyflower
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	short loc_40A826

loc_40A7B3:		; jumptable 0040A68D case 7
push	offset aShooting_galle
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	short loc_40A826

loc_40A7C3:		; jumptable 0040A68D case 9
push	offset aProperty_editi
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	short loc_40A826

loc_40A7D3:		; jumptable 0040A68D case 6
push	offset aRebuild
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	short loc_40A826

loc_40A7E3:		; jumptable 0040A68D case 8
push	offset aMission
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	short loc_40A826

loc_40A7F3:		; jumptable 0040A68D case 5
push	offset aFront_end
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	short loc_40A826

loc_40A803:		; jumptable 0040A68D case 10
push	offset aModular_buildi
lea	ecx, [esp+0ACh+var_9C]
call	sub_402310
jmp	short loc_40A826

loc_40A813:		; default
push	(offset	aUnknown+7) ; jumptable	0040A68D cases 1,4
push	offset aUnknown	; "unknown"
lea	ecx, [esp+0B0h+var_9C]
call	sub_403980

loc_40A826:
mov	eax, [edi+1Ch]
mov	ecx, [edi+20h]
mov	edx, [esp+0A8h+var_88]
lea	esi, [edi+0Ch]
mov	edi, [esp+0A8h+var_8C]
mov	ebx, eax
sub	edi, edx
sub	ebx, ecx
cmp	ebx, edi
jnz	short loc_40A856
sub	eax, ecx
push	eax
push	edx
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jz	loc_40A91F

loc_40A856:		; "unknown"
mov	edi, offset aUnknown
mov	edx, esi
call	sub_40AA20
test	al, al
jz	short loc_40A8AE
push	(offset	aPopgamestate+0Ch)
push	offset aPopgamestate ; "popGameState"
lea	ecx, [esp+0B0h+var_60]
call	sub_403980
mov	eax, [ebp+arg_0]
mov	edx, [esp+0A8h+var_40]
mov	edi, [eax+20h]
mov	eax, [edx+30h]
push	offset aState	; "state"
lea	ecx, [esp+0ACh+var_40]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+1Ch]
push	edi
call	eax
lea	ecx, [esp+0A8h+var_68]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_40A8AE:		; "unknown"
mov	edi, offset aUnknown
lea	edx, [esp+0A8h+var_9C]
call	sub_40AA20
test	al, al
jz	short loc_40A906
push	(offset	aPushgamestate+0Dh)
push	offset aPushgamestate ;	"pushGameState"
lea	ecx, [esp+0B0h+var_60]
call	sub_403980
mov	edx, [esp+0A8h+var_40]
mov	eax, [edx+30h]
mov	edi, [esp+0A8h+var_88]
push	offset aState	; "state"
lea	ecx, [esp+0ACh+var_40]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+1Ch]
push	edi
call	eax
lea	ecx, [esp+0A8h+var_68]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_40A906:
lea	edx, [esp+0A8h+var_9C]
cmp	edx, esi
jz	short loc_40A91F
mov	eax, [esp+0A8h+var_8C]
mov	ecx, [esp+0A8h+var_88]
push	eax
push	ecx
mov	ecx, esi
call	sub_403980

loc_40A91F:
mov	byte ptr [esp+0A8h+var_4], 0
lea	ecx, [esp+0A8h+var_9C]
call	sub_407910
mov	[esp+0A8h+var_4], 0FFFFFFFFh
lea	edx, [esp+0A8h+var_68]
push	edx
call	sub_4093F0
mov	ecx, [esp+0A8h+var_C]
pop	edi
pop	esi
mov	large fs:0, ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_40A600 endp

off_40A95C dd offset loc_40A694	; jump table for switch	statement
dd offset loc_40A790
dd offset loc_40A813
dd offset loc_40A77D
dd offset loc_40A7A3
dd offset loc_40A813
dd offset loc_40A7F3
dd offset loc_40A7D3
dd offset loc_40A7B3
dd offset loc_40A7E3
dd offset loc_40A7C3
dd offset loc_40A803
align 10h



sub_40A990 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
mov	eax, esi
lea	edx, [eax+1]
lea	ebx, [ebx+0]

loc_40A9A0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40A9A0
sub	eax, edx
mov	edx, [esp+4+arg_0]
mov	ecx, [edx+14h]
mov	edx, [edx+10h]
sub	edx, ecx
cmp	edx, eax
jnz	short loc_40A9CF
push	eax
push	esi
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_40A9CF
mov	eax, 1
pop	esi
retn

loc_40A9CF:
xor	eax, eax
pop	esi
retn
sub_40A990 endp

align 10h



sub_40A9E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [ecx+10h]
push	esi
mov	esi, [esp+4+arg_4]
mov	edx, [esi+14h]
mov	esi, [esi+10h]
push	edi
mov	edi, eax
sub	edi, [ecx+14h]
sub	esi, edx
cmp	edi, esi
pop	edi
pop	esi
jnz	short loc_40AA1A
mov	ecx, [ecx+14h]
sub	eax, ecx
push	eax
push	edx
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_40AA1A
mov	eax, 1
retn

loc_40AA1A:
xor	eax, eax
retn
sub_40A9E0 endp

align 10h



sub_40AA20 proc	near
mov	eax, edi
push	esi
lea	esi, [eax+1]

loc_40AA26:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40AA26
mov	ecx, [edx+14h]
mov	edx, [edx+10h]
sub	eax, esi
sub	edx, ecx
pop	esi
cmp	edx, eax
jnz	short loc_40AA5A
push	eax
push	edi
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_40AA5A
mov	eax, 1
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn

loc_40AA5A:
xor	eax, eax
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_40AA20 endp

align 10h



; int __cdecl sub_40AA70(volatile LONG *lpAddend)
sub_40AA70 proc	near

lpAddend= dword	ptr  4

mov	eax, [esp+lpAddend]
push	eax		; lpAddend
call	ds:InterlockedIncrement
retn
sub_40AA70 endp

align 10h



sub_40AA80 proc	near
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedIncrement
retn
sub_40AA80 endp

align 10h



sub_40AA90 proc	near
push	esi
mov	esi, ecx
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_40AAAB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
pop	esi
jmp	eax

loc_40AAAB:
pop	esi
retn
sub_40AA90 endp

align 10h



sub_40AAB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40AAB0
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	[esp+1Ch+var_4], 1
mov	esi, [edi+0Ch]
mov	ebx, ds:InterlockedDecrement
test	esi, esi
jz	short loc_40AAFC
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_40AAF5
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_40AAF5:
mov	dword ptr [edi+0Ch], 0

loc_40AAFC:
mov	byte ptr [esp+1Ch+var_4], 0
mov	eax, [edi+10h]
lea	esi, [edi+10h]
test	eax, eax
jz	short loc_40AB22
movzx	ebp, word ptr [eax-2]
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_40AB22
push	esi
mov	eax, ebp
call	sub_1171F60

loc_40AB22:
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_40AB44
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_40AB44
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_40AB44:
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_40AAB0 endp

align 10h



sub_40AB60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_40AB60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	[esp+14h+var_10], ecx
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	esi, [ecx]
test	esi, esi
jz	short loc_40ABA0
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_40ABA0
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_40ABA0:
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40AB60 endp




sub_40ABB0 proc	near
push	esi
mov	esi, [eax]
test	esi, esi
jz	short loc_40ABCF
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_40ABCF
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
pop	esi
jmp	eax

loc_40ABCF:
pop	esi
retn
sub_40ABB0 endp

align 10h



sub_40ABE0 proc	near
push	edi
mov	edi, [ecx]
test	edi, edi
jz	short loc_40ABF2
add	dword ptr [edi+60h], 0FFFFFFFFh
jnz	short loc_40ABF2
call	sub_11A3470

loc_40ABF2:
pop	edi
retn
sub_40ABE0 endp

align 10h



sub_40AC00 proc	near
mov	ecx, [ecx]
test	ecx, ecx
jz	short locret_40AC0D
mov	eax, [ecx]
mov	edx, [eax+4]
jmp	edx

locret_40AC0D:
retn
sub_40AC00 endp

align 10h



sub_40AC10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_40AC10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[esp+10h+var_10], ecx
mov	[esp+10h+var_4], 0FFFFFFFFh
add	ecx, 8
push	ecx
call	sub_40AAB0
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40AC10 endp

align 10h



sub_40AC50 proc	near
mov	eax, [eax]
push	ebx
mov	ebx, [eax]
push	ebp
lea	ebp, [eax+8]
mov	eax, [edi]
push	esi
mov	esi, [eax]
add	esi, ebx
cmp	esi, [eax+4]
jbe	short loc_40AC70
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40AC70:
mov	eax, [edi]
mov	ecx, [eax]
push	ebx
lea	edx, [ecx+eax+8]
push	ebp
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi]
mov	[eax], esi
mov	ecx, [edi]
add	esp, 0Ch
mov	byte ptr [ecx+esi+8], 0
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
retn
sub_40AC50 endp

align 10h



sub_40ACA0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
test	edi, edi
jz	short loc_40ACDC
xor	ecx, ecx
lea	eax, [edi+0Fh]
shr	eax, 2
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi], eax
mov	[eax], ebp
mov	eax, [esi]
mov	byte ptr [eax+ebp+8], 0
mov	ecx, [esi]
add	esp, 4
mov	[ecx+4], edi
pop	ebp
retn	4

loc_40ACDC:
mov	dword ptr [esi], offset	unk_1889308
pop	ebp
retn	4
sub_40ACA0 endp

align 10h



sub_40ACF0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40AD80
push	eax
mov	large fs:0, esp
push	ebx
mov	ebx, [esp+10h+arg_0]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, ecx
cmp	edi, [eax+4]
jbe	short loc_40AD6C
mov	[esp+18h+arg_0], offset	unk_1889308
mov	[esp+18h+var_4], 0
mov	ecx, [ebx]
mov	eax, [ecx]
push	eax
lea	esi, [esp+1Ch+arg_0]
call	sub_40ACA0
mov	eax, [ebx]
mov	ecx, [eax]
mov	esi, [esp+18h+arg_0]
push	ecx
add	eax, 8
push	eax
lea	edx, [esi+8]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [ebx]
add	esp, 0Ch
mov	[ebx], esi
mov	[esp+18h+arg_0], eax
mov	[esp+18h+var_4], 0FFFFFFFFh
cmp	eax, offset unk_1889308
jz	short loc_40AD6C
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40AD6C:
mov	ecx, [esp+18h+var_C]
pop	edi
pop	esi
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_40ACF0 endp




sub_40AD80 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40AD80
push	eax
mov	large fs:0, esp
mov	eax, [edi]
mov	ecx, [eax+4]
push	ebx
mov	ebx, [esp+10h+arg_0]
push	ebp
cmp	esi, ecx
ja	short loc_40ADDA
lea	edx, [esi+esi*2+18h]
cmp	ecx, edx
ja	short loc_40ADDA
push	esi
add	eax, 8
push	ebx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi]
mov	[eax], esi
mov	ecx, [edi]
add	esp, 0Ch
mov	byte ptr [ecx+esi+8], 0
mov	eax, edi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4

loc_40ADDA:
mov	ebp, offset unk_1889308
mov	[esp+14h+arg_0], ebp
mov	[esp+14h+var_4], 0
test	esi, esi
jz	short loc_40AE20
xor	ecx, ecx
lea	eax, [esi+0Fh]
shr	eax, 2
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebp, eax
mov	[esp+18h+arg_0], ebp
mov	[eax], esi
mov	byte ptr [eax+esi+8], 0
add	esp, 4
mov	[eax+4], esi
jmp	short loc_40AE24

loc_40AE20:
mov	[esp+14h+arg_0], ebp

loc_40AE24:
push	esi
lea	eax, [ebp+8]
push	ebx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi]
add	esp, 0Ch
mov	[edi], ebp
mov	[esp+14h+arg_0], eax
mov	[esp+14h+var_4], 0FFFFFFFFh
cmp	eax, offset unk_1889308
jz	short loc_40AE52
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40AE52:
mov	ecx, [esp+14h+var_C]
pop	ebp
mov	eax, edi
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_40AD80 endp

align 10h



sub_40AE70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [edi]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [eax]
add	esi, ebx
cmp	esi, [eax+4]
jbe	short loc_40AE8C
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40AE8C:
mov	eax, [edi]
mov	ecx, [esp+8+arg_0]
mov	edx, [eax]
push	ebx
push	ecx
lea	eax, [edx+eax+8]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [edi]
mov	[ecx], esi
mov	edx, [edi]
add	esp, 0Ch
mov	byte ptr [edx+esi+8], 0
pop	esi
mov	eax, edi
pop	ebx
retn	8
sub_40AE70 endp

align 10h



sub_40AEC0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
mov	eax, ebp
push	edi
mov	dword ptr [esi], 0
lea	edx, [eax+1]

loc_40AED1:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40AED1
sub	eax, edx
mov	edi, eax
jz	short loc_40AF0F
xor	ecx, ecx
lea	eax, [edi+0Fh]
shr	eax, 2
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi], eax
mov	[eax], edi
mov	eax, [esi]
mov	byte ptr [eax+edi+8], 0
mov	ecx, [esi]
add	esp, 4
mov	[ecx+4], edi
jmp	short loc_40AF15

loc_40AF0F:
mov	dword ptr [esi], offset	unk_1889308

loc_40AF15:
mov	eax, [esi]
mov	edx, [eax]
push	edx
add	eax, 8
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
mov	eax, esi
pop	ebp
retn	4
sub_40AEC0 endp

align 10h



sub_40AF30 proc	near

arg_0= dword ptr  4

push	esi
mov	eax, edx
push	edi
lea	esi, [eax+1]

loc_40AF37:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40AF37
mov	edi, [esp+8+arg_0]
sub	eax, esi
push	edx
mov	esi, eax
call	sub_40AD80
pop	edi
pop	esi
retn	4
sub_40AF30 endp

align 10h



sub_40AF60 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, ebp
push	esi
lea	edx, [eax+1]
lea	esp, [esp+0]

loc_40AF70:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40AF70
sub	eax, edx
mov	ebx, eax
mov	eax, [edi]
mov	esi, [eax]
add	esi, ebx
cmp	esi, [eax+4]
jbe	short loc_40AF91
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40AF91:
mov	eax, [edi]
mov	ecx, [eax]
push	ebx
lea	edx, [ecx+eax+8]
push	ebp
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi]
mov	[eax], esi
mov	ecx, [edi]
add	esp, 0Ch
mov	byte ptr [ecx+esi+8], 0
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
retn	4
sub_40AF60 endp

align 10h



sub_40AFC0 proc	near

arg_0= byte ptr	 4

mov	eax, [edi]
push	esi
mov	esi, [eax]
inc	esi
cmp	esi, [eax+4]
jbe	short loc_40AFD6
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40AFD6:
mov	eax, [edi]
mov	edx, [eax]
push	1
lea	ecx, [esp+8+arg_0]
push	ecx
lea	eax, [edx+eax+8]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [edi]
mov	[ecx], esi
mov	edx, [edi]
add	esp, 0Ch
mov	byte ptr [edx+esi+8], 0
mov	eax, edi
pop	esi
retn	4
sub_40AFC0 endp

align 10h



sub_40B000 proc	near
mov	eax, [eax]
add	eax, 8
retn
sub_40B000 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12FFCD0

loc_40B010:
mov	dword ptr [ecx], offset	off_1437D84
retn
; END OF FUNCTION CHUNK	FOR sub_12FFCD0
align 10h



sub_40B020 proc	near
mov	eax, [eax+20h]
add	eax, 8
retn
sub_40B020 endp

align 10h


; Attributes: thunk

sub_40B030 proc	near
jmp	sub_40BAC0
sub_40B030 endp

align 10h



sub_40B040 proc	near
push	esi
mov	esi, [eax+18h]
test	esi, esi
jz	short loc_40B05C

loc_40B048:
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
test	eax, eax
jnz	short loc_40B060
mov	esi, [esi+28h]
test	esi, esi
jnz	short loc_40B048

loc_40B05C:
xor	eax, eax
pop	esi
retn

loc_40B060:
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
pop	esi
jmp	eax
sub_40B040 endp

align 10h



sub_40B070 proc	near
push	esi
mov	esi, eax
test	esi, esi
jz	short loc_40B08B

loc_40B077:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_40B08F
mov	esi, [esi+10h]
test	esi, esi
jnz	short loc_40B077

loc_40B08B:
xor	eax, eax
pop	esi
retn

loc_40B08F:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
pop	esi
jmp	edx
sub_40B070 endp

align 10h



sub_40B0A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
mov	eax, large fs:0
push	offset loc_1302E2E
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
or	eax, 0FFFFFFFFh
mov	[ebp+8], eax
mov	[ebp+4], eax
push	esi
xor	eax, eax
push	edi
mov	esi, ecx
mov	[ebp+0Ch], eax
mov	[esp+1Ch+var_4], eax
lea	edi, [ebp+14h]
mov	dword ptr [ebp+0], offset off_154DA34
mov	dword ptr [edi], offset	unk_1889308
lea	ebx, [ebp+18h]
mov	dword ptr [ebx], offset	unk_1889308
mov	eax, esi
mov	byte ptr [esp+1Ch+var_4], 2
lea	ecx, [eax+1]

loc_40B0F4:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_40B0F4
sub	eax, ecx
push	esi
mov	esi, eax
call	sub_40AD80
mov	esi, [esp+1Ch+arg_4]
mov	eax, esi
lea	edx, [eax+1]
mov	edi, edi

loc_40B110:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40B110
sub	eax, edx
push	esi
mov	esi, eax
mov	edi, ebx
call	sub_40AD80
mov	ecx, [esp+1Ch+var_C]
xor	eax, eax
pop	edi
mov	[ebp+10h], eax
mov	[ebp+20h], eax
mov	[ebp+1Ch], eax
pop	esi
mov	eax, ebp
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	8
sub_40B0A0 endp

align 10h



sub_40B150 proc	near
mov	eax, [eax+14h]
add	eax, 8
retn
sub_40B150 endp

align 10h



sub_40B160 proc	near
mov	eax, [eax+18h]
add	eax, 8
retn
sub_40B160 endp

align 10h



sub_40B170 proc	near

arg_0= dword ptr  4

push	esi
mov	eax, edx
push	edi
lea	esi, [eax+1]

loc_40B177:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40B177
mov	edi, [esp+8+arg_0]
sub	eax, esi
push	edx
add	edi, 18h
mov	esi, eax
call	sub_40AD80
pop	edi
pop	esi
retn	4
sub_40B170 endp

align 10h



; int __stdcall	sub_40B1A0(FILE	*, int)
sub_40B1A0 proc	near

arg_0= dword ptr  4

mov	edx, ecx
mov	ecx, [esp+arg_0] ; FILE	*
push	0		; int
call	sub_40CB00
retn	8
sub_40B1A0 endp




; int __thiscall sub_40B1B0(void *, char)
sub_40B1B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+18h]
cmp	eax, offset unk_1889308
jz	short loc_40B1C6
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40B1C6:
mov	eax, [esi+14h]
cmp	eax, offset unk_1889308
jz	short loc_40B1D9
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40B1D9:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1437D84
jz	short loc_40B1EF
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_40B1EF:
mov	eax, esi
pop	esi
retn	4
sub_40B1B0 endp

align 10h



sub_40B200 proc	near
mov	ecx, [edx+20h]
mov	eax, ecx
sub	eax, edx
neg	eax
sbb	eax, eax
and	eax, ecx
retn
sub_40B200 endp

align 10h



sub_40B210 proc	near
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
mov	[eax+4], ecx
xor	ecx, ecx
mov	[eax+0Ch], ecx
mov	dword ptr [eax+20h], offset unk_1889308
mov	[eax+10h], ecx
mov	dword ptr [eax+14h], 2
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	dword ptr [eax], offset	off_154D9A8
retn
sub_40B210 endp

align 10h



; int __thiscall sub_40B250(void *, char)
sub_40B250 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154D9A8
call	??1_Locimp@locale@std@@UAE@XZ ;	std::locale::_Locimp::~_Locimp(void)
test	[esp+4+arg_0], 1
jz	short loc_40B26E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_40B26E:
mov	eax, esi
pop	esi
retn	4
sub_40B250 endp

align 10h



sub_40B280 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40B280
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
or	eax, 0FFFFFFFFh
mov	[ebp+8], eax
mov	[ebp+4], eax
xor	ebx, ebx
push	esi
push	edi
lea	edi, [ebp+20h]
mov	[ebp+0Ch], ebx
mov	dword ptr [edi], offset	unk_1889308
mov	[ebp+10h], ebx
mov	dword ptr [ebp+14h], 4
mov	[ebp+18h], ebx
mov	[ebp+1Ch], ebx
mov	[ebp+24h], ebx
mov	[ebp+28h], ebx
mov	eax, edx
mov	[esp+1Ch+var_4], ebx
mov	dword ptr [ebp+0], offset off_154DA40
lea	esi, [eax+1]
lea	ebx, [ebx+0]

loc_40B2E0:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40B2E0
sub	eax, esi
push	edx
mov	esi, eax
call	sub_40AD80
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	[ebp+2Ch], bl
pop	esi
mov	eax, ebp
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_40B280 endp

align 10h



sub_40B310 proc	near
mov	dword ptr [ecx], offset	off_154DA40
jmp	??1_Locimp@locale@std@@UAE@XZ ;	std::locale::_Locimp::~_Locimp(void)
sub_40B310 endp

align 10h



sub_40B320 proc	near
mov	eax, ecx
retn
sub_40B320 endp

align 10h



; int __thiscall sub_40B330(void *, char)
sub_40B330 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154DA40
call	??1_Locimp@locale@std@@UAE@XZ ;	std::locale::_Locimp::~_Locimp(void)
test	[esp+4+arg_0], 1
jz	short loc_40B34E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_40B34E:
mov	eax, esi
pop	esi
retn	4
sub_40B330 endp

align 10h



sub_40B360 proc	near
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
mov	[eax+4], ecx
xor	ecx, ecx
mov	edx, offset unk_1889308
mov	[eax+0Ch], ecx
mov	[eax+20h], edx
mov	[eax+10h], ecx
mov	dword ptr [eax+14h], 5
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	dword ptr [eax], offset	off_154DA88
mov	[eax+2Ch], edx
mov	[eax+30h], edx
mov	[eax+34h], edx
retn
sub_40B360 endp

align 10h



sub_40B3A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_40B3A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_154DA88
mov	[esp+14h+var_4], 2
mov	eax, [esi+34h]
cmp	eax, offset unk_1889308
jz	short loc_40B3DE
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40B3DE:
mov	byte ptr [esp+14h+var_4], 1
mov	eax, [esi+30h]
cmp	eax, offset unk_1889308
jz	short loc_40B3F6
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40B3F6:
mov	byte ptr [esp+14h+var_4], 0
mov	eax, [esi+2Ch]
cmp	eax, offset unk_1889308
jz	short loc_40B40E
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40B40E:
mov	ecx, esi
mov	[esp+14h+var_4], 0FFFFFFFFh
call	??1_Locimp@locale@std@@UAE@XZ ;	std::locale::_Locimp::~_Locimp(void)
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40B3A0 endp

align 10h



sub_40B430 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, [ecx]
mov	eax, [eax+44h]
push	0
push	edx
mov	edx, [esp+8+arg_0]
push	edx
call	eax
retn	8
sub_40B430 endp

align 10h



; int __thiscall sub_40B450(void *, char)
sub_40B450 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_40B3A0
test	[esp+4+arg_0], 1
jz	short loc_40B468
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_40B468:
mov	eax, esi
pop	esi
retn	4
sub_40B450 endp

align 10h



sub_40B470 proc	near
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
mov	[eax+4], ecx
xor	ecx, ecx
mov	[eax+0Ch], ecx
mov	dword ptr [eax+20h], offset unk_1889308
mov	[eax+10h], ecx
mov	dword ptr [eax+14h], 3
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	dword ptr [eax], offset	off_154D9F0
retn
sub_40B470 endp

align 10h



; int __thiscall sub_40B4B0(void *, char)
sub_40B4B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154D9F0
call	??1_Locimp@locale@std@@UAE@XZ ;	std::locale::_Locimp::~_Locimp(void)
test	[esp+4+arg_0], 1
jz	short loc_40B4CE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_40B4CE:
mov	eax, esi
pop	esi
retn	4
sub_40B4B0 endp

align 10h



sub_40B4E0 proc	near
mov	al, [eax+2Ch]
retn
sub_40B4E0 endp

align 10h



sub_40B4F0 proc	near
mov	[eax], ecx
retn
sub_40B4F0 endp

align 10h



sub_40B500 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
arg_0= dword ptr  4

sub	esp, 28h
push	ebp
push	edi
mov	edi, eax
mov	eax, [esp+30h+arg_0]
mov	ecx, [eax]
mov	edx, [ecx]
xor	ebp, ebp
test	edx, edx
jle	loc_40B723
push	ebx
push	esi
jmp	short loc_40B520
align 10h

loc_40B520:
mov	al, [ecx+ebp+8]
lea	ebx, [ecx+ebp+8]
mov	byte ptr [esp+38h+var_24], al
cmp	al, 26h
jnz	loc_40B5F3
lea	eax, [edx-2]
cmp	ebp, eax
jge	short loc_40B5A6
cmp	byte ptr [ecx+ebp+9], 23h
jnz	short loc_40B5A6
cmp	byte ptr [ecx+ebp+0Ah],	78h
jnz	short loc_40B5A6
dec	edx
cmp	ebp, edx
jge	loc_40B711

loc_40B552:
mov	eax, [edi]
mov	esi, [eax]
inc	esi
cmp	esi, [eax+4]
jbe	short loc_40B567
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40B567:
mov	eax, [edi]
mov	ecx, [eax]
push	1
lea	edx, [ecx+eax+8]
push	ebx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi]
mov	edx, [esp+44h+arg_0]
mov	[eax], esi
mov	ecx, [edi]
mov	byte ptr [ecx+esi+8], 0
mov	eax, [edx]
inc	ebp
lea	ebx, [eax+ebp+8]
add	esp, 0Ch
cmp	byte ptr [ebx],	3Bh
jz	loc_40B711
mov	eax, [eax]
dec	eax
cmp	ebp, eax
jl	short loc_40B552
jmp	loc_40B711

loc_40B5A6:
mov	eax, [edi]
mov	ebx, dword_17ED390
mov	esi, [eax]
mov	ecx, off_17ED38C
add	esi, ebx
mov	[esp+38h+var_28], ecx
cmp	esi, [eax+4]
jbe	short loc_40B5CC
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40B5CC:
mov	eax, [edi]
mov	edx, [esp+38h+var_28]
mov	ecx, [eax]
push	ebx
push	edx
lea	edx, [ecx+eax+8]
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi]
mov	[eax], esi
mov	ecx, [edi]
add	esp, 0Ch
mov	byte ptr [ecx+esi+8], 0
jmp	loc_40B710

loc_40B5F3:
cmp	al, 3Ch
jnz	short loc_40B644
mov	eax, [edi]
mov	ebx, dword_17ED39C
mov	esi, [eax]
mov	edx, off_17ED398
add	esi, ebx
mov	[esp+38h+var_28], edx
cmp	esi, [eax+4]
jbe	short loc_40B61D
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40B61D:
mov	eax, [edi]
mov	ecx, [esp+38h+var_28]
mov	edx, [eax]
push	ebx
push	ecx
lea	eax, [edx+eax+8]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [edi]
mov	[ecx], esi
mov	edx, [edi]
add	esp, 0Ch
mov	byte ptr [edx+esi+8], 0
jmp	loc_40B710

loc_40B644:
cmp	al, 3Eh
jnz	short loc_40B694
mov	eax, off_17ED3A4
mov	ebx, dword_17ED3A8
mov	[esp+38h+var_28], eax
mov	eax, [edi]
mov	esi, [eax]
add	esi, ebx
cmp	esi, [eax+4]
jbe	short loc_40B66D
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40B66D:
mov	eax, [edi]
mov	ecx, [esp+38h+var_28]
mov	edx, [eax]
push	ebx
push	ecx
lea	eax, [edx+eax+8]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [edi]
mov	[ecx], esi
mov	edx, [edi]
add	esp, 0Ch
mov	byte ptr [edx+esi+8], 0
jmp	loc_40B710

loc_40B694:
cmp	al, 22h
jnz	short loc_40B6AC
mov	eax, dword_17ED3B4
mov	ecx, off_17ED3B0
push	eax
push	ecx
call	sub_40AE70
jmp	short loc_40B710

loc_40B6AC:
cmp	al, 27h
jnz	short loc_40B6C4
mov	edx, dword_17ED3C0
mov	eax, off_17ED3BC
push	edx
push	eax
call	sub_40AE70
jmp	short loc_40B710

loc_40B6C4:
cmp	al, 20h
jnb	short loc_40B706
movzx	ecx, al
push	ecx
lea	edx, [esp+3Ch+var_20]
push	offset aX02x	; "&#x%02X;"
push	edx
mov	edx, 20h
call	sub_40D3B0
lea	eax, [esp+44h+var_20]
add	esp, 0Ch
lea	edx, [eax+1]
lea	ebx, [ebx+0]

loc_40B6F0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40B6F0
sub	eax, edx
push	eax
lea	eax, [esp+3Ch+var_20]
push	eax
call	sub_40AE70
jmp	short loc_40B710

loc_40B706:
mov	ecx, [esp+38h+var_24]
push	ecx
call	sub_40AFC0

loc_40B710:
inc	ebp

loc_40B711:
mov	edx, [esp+38h+arg_0]
mov	ecx, [edx]
mov	edx, [ecx]
cmp	ebp, edx
jl	loc_40B520
pop	esi
pop	ebx

loc_40B723:
pop	edi
pop	ebp
add	esp, 28h
retn
sub_40B500 endp

align 10h



; int __thiscall sub_40B730(void *, char)
sub_40B730 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	??1_Locimp@locale@std@@UAE@XZ ;	std::locale::_Locimp::~_Locimp(void)
test	[esp+4+arg_0], 1
jz	short loc_40B748
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_40B748:
mov	eax, esi
pop	esi
retn	4
sub_40B730 endp

align 10h
; [0000007B BYTES: COLLAPSED FUNCTION std::locale::_Locimp::~_Locimp(void). PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [0000002A BYTES: COLLAPSED FUNCTION sub_40B7D0. PRESS	KEYPAD "+" TO EXPAND]
align 10h
; [000000BA BYTES: COLLAPSED FUNCTION sub_40B800. PRESS	KEYPAD "+" TO EXPAND]
align 10h



sub_40B8C0 proc	near
cmp	dword ptr [ecx+14h], 0
push	edi
mov	edi, eax
jnz	short loc_40B943
push	esi
mov	esi, edi
test	edi, edi
jz	short loc_40B93E

loc_40B8D0:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_40B8E7
mov	esi, [esi+10h]
test	esi, esi
jnz	short loc_40B8D0
pop	esi
pop	edi
retn

loc_40B8E7:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_40B93E
push	ebx
mov	eax, edi
call	sub_40B070
mov	ebx, eax
cmp	byte ptr [ebx+2Ch], 0
jnz	short loc_40B93D
mov	byte ptr [ebx+2Ch], 1
mov	dword ptr [ebx+30h], 10h
mov	edx, off_17ED408
mov	eax, edx
lea	esi, [eax+1]
lea	ebx, [ebx+0]

loc_40B920:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40B920
sub	eax, esi
push	edx
lea	edi, [ebx+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebx+40h], eax
mov	[ebx+3Ch], eax

loc_40B93D:
pop	ebx

loc_40B93E:
pop	esi
xor	eax, eax
pop	edi
retn

loc_40B943:
mov	eax, [ecx]
mov	edx, [eax+3Ch]
call	edx
test	eax, eax
jnz	short loc_40B950
pop	edi
retn

loc_40B950:
mov	ecx, edi
pop	edi
jmp	sub_40B800
sub_40B8C0 endp

align 10h



sub_40B960 proc	near
cmp	[ecx+10h], edx
jz	short loc_40B968
xor	al, al
retn

loc_40B968:
mov	eax, [ecx+28h]
test	eax, eax
jz	short loc_40B979
push	esi
mov	esi, [ecx+24h]
mov	[eax+24h], esi
pop	esi
jmp	short loc_40B97F

loc_40B979:
mov	eax, [ecx+24h]
mov	[edx+1Ch], eax

loc_40B97F:
mov	eax, [ecx+24h]
test	eax, eax
jz	short loc_40B997
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax
mov	al, 1
retn

loc_40B997:
mov	eax, [ecx+28h]
mov	[edx+18h], eax
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax
mov	al, 1
retn
sub_40B960 endp

align 10h



sub_40B9B0 proc	near
mov	eax, [eax+18h]
push	ebx
test	eax, eax
jz	short loc_40B9F0

loc_40B9B8:
mov	ecx, [eax+20h]
mov	edx, esi
add	ecx, 8

loc_40B9C0:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_40B9E0
test	bl, bl
jz	short loc_40B9DC
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_40B9E0
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_40B9C0

loc_40B9DC:
xor	ecx, ecx
jmp	short loc_40B9E5

loc_40B9E0:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_40B9E5:
test	ecx, ecx
jz	short loc_40B9F2
mov	eax, [eax+28h]
test	eax, eax
jnz	short loc_40B9B8

loc_40B9F0:
xor	eax, eax

loc_40B9F2:
pop	ebx
retn
sub_40B9B0 endp

align 10h



sub_40BA00 proc	near
mov	eax, [eax+28h]
push	ebx
test	eax, eax
jz	short loc_40BA40

loc_40BA08:
mov	ecx, [eax+20h]
mov	edx, esi
add	ecx, 8

loc_40BA10:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_40BA30
test	bl, bl
jz	short loc_40BA2C
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_40BA30
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_40BA10

loc_40BA2C:
xor	ecx, ecx
jmp	short loc_40BA35

loc_40BA30:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_40BA35:
test	ecx, ecx
jz	short loc_40BA42
mov	eax, [eax+28h]
test	eax, eax
jnz	short loc_40BA08

loc_40BA40:
xor	eax, eax

loc_40BA42:
pop	ebx
retn
sub_40BA00 endp

align 10h



sub_40BA50 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_40B9B0
mov	edi, eax
test	edi, edi
jz	short loc_40BA7A
nop

loc_40BA60:
mov	eax, [edi]
mov	edx, [eax+18h]
mov	ecx, edi
call	edx
test	eax, eax
jnz	short loc_40BA7F
mov	eax, edi
call	sub_40BA00
mov	edi, eax
test	edi, edi
jnz	short loc_40BA60

loc_40BA7A:
pop	edi
xor	eax, eax
pop	esi
retn

loc_40BA7F:
mov	eax, [edi]
mov	edx, [eax+18h]
mov	ecx, edi
pop	edi
pop	esi
jmp	edx
sub_40BA50 endp

align 10h



sub_40BA90 proc	near
push	esi
mov	esi, [eax+28h]
test	esi, esi
jz	short loc_40BAAC

loc_40BA98:
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
test	eax, eax
jnz	short loc_40BAB0
mov	esi, [esi+28h]
test	esi, esi
jnz	short loc_40BA98

loc_40BAAC:
xor	eax, eax
pop	esi
retn

loc_40BAB0:
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
pop	esi
jmp	eax
sub_40BA90 endp

align 10h



sub_40BAC0 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_40BA00
mov	edi, eax
test	edi, edi
jz	short loc_40BAEA
nop

loc_40BAD0:
mov	eax, [edi]
mov	edx, [eax+18h]
mov	ecx, edi
call	edx
test	eax, eax
jnz	short loc_40BAEF
mov	eax, edi
call	sub_40BA00
mov	edi, eax
test	edi, edi
jnz	short loc_40BAD0

loc_40BAEA:
pop	edi
xor	eax, eax
pop	esi
retn

loc_40BAEF:
mov	eax, [edi]
mov	edx, [eax+18h]
mov	ecx, edi
pop	edi
pop	esi
jmp	edx
sub_40BAC0 endp

align 10h



sub_40BB00 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
mov	eax, large fs:0
push	offset loc_1302E03
push	eax
mov	large fs:0, esp
push	ebx
mov	ebx, [esp+10h+arg_0]
push	ebp
mov	ebp, [esp+14h+arg_4]
push	esi
or	esi, 0FFFFFFFFh
mov	[ebx+8], esi
mov	[ebx+4], esi
xor	ecx, ecx
push	edi
lea	edi, [ebx+20h]
mov	[ebx+0Ch], ecx
mov	dword ptr [edi], offset	unk_1889308
mov	edx, 1
mov	[ebx+10h], ecx
mov	[ebx+14h], edx
mov	[ebx+24h], ecx
mov	[ebx+28h], ecx
mov	[esp+1Ch+var_4], ecx
lea	eax, [ebx+2Ch]
mov	dword ptr [ebx], offset	off_154D960
mov	[eax+8], esi
mov	[eax+4], esi
mov	esi, offset unk_1889308
mov	[eax+0Ch], ecx
mov	dword ptr [eax], offset	off_154DA34
mov	[eax+14h], esi
mov	[eax+18h], esi
mov	[eax+10h], ecx
mov	[eax+20h], eax
mov	[eax+1Ch], eax
mov	byte ptr [esp+1Ch+var_4], dl
mov	eax, ebp
mov	[ebx+1Ch], ecx
mov	[ebx+18h], ecx
lea	esi, [eax+1]

loc_40BB88:
mov	dl, [eax]
inc	eax
cmp	dl, cl
jnz	short loc_40BB88
sub	eax, esi
push	ebp
mov	esi, eax
call	sub_40AD80
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	8
sub_40BB00 endp




; int __thiscall sub_40BBB0(void *, char)
sub_40BBB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_40BBD0
test	[esp+4+arg_0], 1
jz	short loc_40BBC8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_40BBC8:
mov	eax, esi
pop	esi
retn	4
sub_40BBB0 endp

align 10h



sub_40BBD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_40BBD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
mov	dword ptr [esi], offset	off_154D960
mov	eax, esi
mov	[esp+14h+var_4], 1
call	sub_40BC60
mov	byte ptr [esp+14h+var_4], 0
mov	eax, [esi+44h]
cmp	eax, offset unk_1889308
jz	short loc_40BC1A
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40BC1A:
mov	eax, [esi+40h]
cmp	eax, offset unk_1889308
jz	short loc_40BC2D
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40BC2D:
mov	dword ptr [esi+2Ch], offset off_1437D84
mov	ecx, esi
mov	[esp+14h+var_4], 0FFFFFFFFh
call	??1_Locimp@locale@std@@UAE@XZ ;	std::locale::_Locimp::~_Locimp(void)
mov	ecx, [esp+14h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40BBD0 endp

align 10h



sub_40BC60 proc	near
push	ebx
push	esi
push	edi
mov	edi, eax
mov	esi, [edi+18h]
xor	ebx, ebx
cmp	esi, ebx
jz	short loc_40BC81
mov	edi, edi

loc_40BC70:
mov	ecx, esi
mov	eax, [ecx]
mov	edx, [eax]
mov	esi, [esi+28h]
push	1
call	edx
cmp	esi, ebx
jnz	short loc_40BC70

loc_40BC81:
mov	[edi+18h], ebx
mov	[edi+1Ch], ebx
lea	esi, [edi+2Ch]
lea	ebx, [ebx+0]

loc_40BC90:
mov	eax, [esi+20h]
cmp	eax, esi
jz	short loc_40BCE3
cmp	eax, ebx
jz	short loc_40BCE3
mov	ecx, eax
sub	ecx, esi
neg	ecx
sbb	ecx, ecx
and	ecx, eax
cmp	eax, esi
jz	short loc_40BCD5
lea	esp, [esp+0]

loc_40BCB0:
cmp	eax, ecx
jz	short loc_40BCBD
mov	eax, [eax+20h]
cmp	eax, esi
jnz	short loc_40BCB0
jmp	short loc_40BCD5

loc_40BCBD:
mov	edx, [eax+1Ch]
mov	edi, [eax+20h]
mov	[edx+20h], edi
mov	edx, [eax+20h]
mov	edi, [eax+1Ch]
mov	[edx+1Ch], edi
mov	[eax+20h], ebx
mov	[eax+1Ch], ebx

loc_40BCD5:
cmp	ecx, ebx
jz	short loc_40BC90
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
jmp	short loc_40BC90

loc_40BCE3:
pop	edi
pop	esi
pop	ebx
retn
sub_40BC60 endp

align 10h



sub_40BCF0 proc	near
push	edi
mov	edi, eax
add	edi, 2Ch
call	sub_40D340
pop	edi
test	eax, eax
jz	short loc_40BD07
mov	eax, [eax+18h]
add	eax, 8
retn

loc_40BD07:
xor	eax, eax
retn
sub_40BCF0 endp

align 10h



sub_40BD10 proc	near
push	ebx
push	edi
mov	edi, eax
add	edi, 2Ch
xor	ebx, ebx
call	sub_40D340
test	eax, eax
jz	short loc_40BD36
mov	eax, [eax+18h]
add	eax, 8
jz	short loc_40BD36
push	eax		; char *
call	_atoi
add	esp, 4
pop	edi
pop	ebx
retn

loc_40BD36:
pop	edi
mov	eax, ebx
pop	ebx
retn
sub_40BD10 endp

align 10h



sub_40BD40 proc	near
push	ebx
push	edi
mov	edi, eax
add	edi, 2Ch
xor	ebx, ebx
call	sub_40D340
test	eax, eax
jz	short loc_40BD69
mov	eax, [eax+18h]
add	eax, 8
jz	short loc_40BD69
push	0Ah		; int
push	ebx		; char **
push	eax		; char *
call	_strtoul
add	esp, 0Ch
pop	edi
pop	ebx
retn

loc_40BD69:
pop	edi
mov	eax, ebx
pop	ebx
retn
sub_40BD40 endp

align 10h



sub_40BD70 proc	near

var_4= dword ptr -4

push	ecx
xorps	xmm0, xmm0
push	edi
mov	edi, eax
add	edi, 2Ch
call	sub_40D340
pop	edi
test	eax, eax
jz	short loc_40BD9F
mov	eax, [eax+18h]
add	eax, 8
jz	short loc_40BD9F
push	eax		; char *
call	_atof
fstp	[esp+8+var_4]
movss	xmm0, [esp+8+var_4]
add	esp, 4

loc_40BD9F:
pop	ecx
retn
sub_40BD70 endp

align 10h


; Attributes: bp-based frame

sub_40BDB0 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ebx
push	edi
mov	edi, eax
add	edi, 2Ch
xor	ebx, ebx
call	sub_40D340
test	eax, eax
jz	short loc_40BDDF
mov	eax, [eax+18h]
add	eax, 8
jz	short loc_40BDDF
push	eax		; char *
call	__atoi64
add	esp, 4
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_40BDDF:
pop	edi
mov	eax, ebx
xor	edx, edx
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_40BDB0 endp

align 10h


; Attributes: bp-based frame

sub_40BDF0 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ebx
push	edi
mov	edi, eax
add	edi, 2Ch
xor	ebx, ebx
call	sub_40D340
test	eax, eax
jz	short loc_40BE22
mov	eax, [eax+18h]
add	eax, 8
jz	short loc_40BE22
push	0Ah		; Radix
push	ebx		; EndPtr
push	eax		; String
call	__strtoui64
add	esp, 0Ch
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_40BE22:
pop	edi
mov	eax, ebx
xor	edx, edx
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_40BDF0 endp

align 10h



sub_40BE30 proc	near
push	ebx
push	esi
push	edi
mov	edi, eax
add	edi, 2Ch
mov	esi, ecx
xor	bl, bl
call	sub_40D340
test	eax, eax
jz	short loc_40BE78
mov	esi, [eax+18h]
add	esi, 8
jz	short loc_40BE78
push	esi		; char *
call	_atoi
add	esp, 4
test	eax, eax
jnz	short loc_40BE72
push	offset aTrue	; "true"
push	esi		; char *
call	__stricmp
add	esp, 8
test	eax, eax
jz	short loc_40BE72
pop	edi
pop	esi
xor	al, al
pop	ebx
retn

loc_40BE72:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn

loc_40BE78:
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn
sub_40BE30 endp

align 10h



sub_40BE80 proc	near
push	edi
mov	edi, eax
add	edi, 2Ch
call	sub_40D340
pop	edi
test	eax, eax
jz	short loc_40BE98
mov	eax, [eax+18h]
add	eax, 8
jnz	short locret_40BE9D

loc_40BE98:
mov	eax, offset byte_146D660

locret_40BE9D:
retn
sub_40BE80 endp

align 10h



sub_40BEA0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
add	edi, 2Ch
call	sub_40D340
pop	edi
test	eax, eax
jnz	short loc_40BEB8
mov	eax, 1
retn	4

loc_40BEB8:
mov	ecx, [esp+arg_0]
mov	eax, [eax+18h]
push	ecx
add	eax, 8
push	offset aD_4	; "%d"
push	eax		; Src
call	_sscanf_s
dec	eax
add	esp, 0Ch
neg	eax
sbb	eax, eax
and	eax, 2
retn	4
sub_40BEA0 endp

align 10h



sub_40BEE0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
add	edi, 2Ch
call	sub_40D340
pop	edi
test	eax, eax
jnz	short loc_40BEF8
mov	eax, 1
retn	4

loc_40BEF8:
mov	ecx, [esp+arg_0]
mov	eax, [eax+18h]
push	ecx
add	eax, 8
push	offset aLf	; "%lf"
push	eax		; Src
call	_sscanf_s
dec	eax
add	esp, 0Ch
neg	eax
sbb	eax, eax
and	eax, 2
retn	4
sub_40BEE0 endp

align 10h



sub_40BF20 proc	near

var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 40h
push	eax
lea	ecx, [esp+44h+var_40]
push	offset aD_4	; "%d"
push	ecx
mov	edx, 40h
call	sub_40D3D0
mov	eax, [esp+4Ch+arg_0]
mov	ecx, [esp+4Ch+arg_4]
add	esp, 0Ch
lea	edx, [esp+40h+var_40]
push	edx
push	eax
call	sub_40BF60
add	esp, 40h
retn	8
sub_40BF20 endp

align 10h



sub_40BF60 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_40E6D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ebx
mov	ebx, [esp+10h+arg_4]
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
push	edi
mov	esi, ecx
lea	edi, [ebp+2Ch]
call	sub_40D340
test	eax, eax
jz	short loc_40BFBD
mov	ecx, ebx
lea	esi, [ecx+1]

loc_40BF94:
mov	dl, [ecx]
inc	ecx
test	dl, dl
jnz	short loc_40BF94
sub	ecx, esi
push	ebx
lea	edi, [eax+18h]
mov	esi, ecx
call	sub_40AD80
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40BFBD:		; size_t
push	24h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+1Ch+arg_4], eax
mov	[esp+1Ch+var_4], 0
test	eax, eax
jz	short loc_40BFE2
push	ebx
push	eax
mov	ecx, esi
call	sub_40B0A0
jmp	short loc_40BFE4

loc_40BFE2:
xor	eax, eax

loc_40BFE4:
mov	[esp+1Ch+var_4], 0FFFFFFFFh
test	eax, eax
jz	short loc_40C017
mov	[eax+20h], edi
mov	ecx, [edi+1Ch]
mov	[eax+1Ch], ecx
mov	edx, [edi+1Ch]
mov	[edx+20h], eax
mov	[edi+1Ch], eax
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40C017:
mov	eax, ebp
call	sub_40B070
mov	ebx, eax
test	ebx, ebx
jz	short loc_40C05D
cmp	byte ptr [ebx+2Ch], 0
jnz	short loc_40C05D
mov	byte ptr [ebx+2Ch], 1
mov	dword ptr [ebx+30h], 3
mov	edx, off_17ED3D4
mov	eax, edx
lea	esi, [eax+1]

loc_40C040:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40C040
sub	eax, esi
push	edx
lea	edi, [ebx+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebx+40h], eax
mov	[ebx+3Ch], eax

loc_40C05D:
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	8
sub_40BF60 endp

align 10h



; int __stdcall	sub_40C080(FILE	*, int)
sub_40C080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	ebx, ecx
test	ebp, ebp
jle	short loc_40C0A7
mov	edi, ebp

loc_40C094:		; "    "
push	offset asc_154D834
push	esi		; FILE *
call	_fprintf
add	esp, 8
sub	edi, 1
jnz	short loc_40C094

loc_40C0A7:
mov	eax, [ebx+20h]
add	eax, 8
push	eax
push	offset aS_13	; "<%s"
push	esi		; FILE *
call	_fprintf
mov	edi, [ebx+4Ch]
lea	eax, [ebx+2Ch]
add	esp, 0Ch
cmp	edi, eax
jz	short loc_40C100
test	edi, edi
jz	short loc_40C100
lea	ebx, [ebx+0]

loc_40C0D0:		; " "
push	offset asc_154D868
push	esi		; FILE *
call	_fprintf
mov	edx, [edi]
mov	eax, [edx+4]
add	esp, 8
push	ebp
push	esi
mov	ecx, edi
call	eax
mov	edi, [edi+20h]
mov	ecx, [edi+18h]
cmp	dword ptr [ecx], 0
jnz	short loc_40C0FC
mov	edx, [edi+14h]
cmp	dword ptr [edx], 0
jz	short loc_40C100

loc_40C0FC:
test	edi, edi
jnz	short loc_40C0D0

loc_40C100:
mov	eax, [ebx+18h]
test	eax, eax
jnz	short loc_40C11C
push	offset asc_154D86C ; " />"
push	esi		; FILE *
call	_fprintf
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_40C11C:
cmp	eax, [ebx+1Ch]
jnz	short loc_40C152
mov	ecx, eax
mov	eax, [ecx]
mov	edx, [eax+2Ch]
call	edx
test	eax, eax
jz	short loc_40C152
push	offset asc_154D870 ; ">"
push	esi		; FILE *
call	_fprintf
mov	ecx, [ebx+18h]
mov	eax, [ecx]
mov	edx, [eax+4]
add	esp, 8
inc	ebp
push	ebp
push	esi
call	edx
mov	eax, [ebx+20h]
add	eax, 8
push	eax
jmp	short loc_40C1CA

loc_40C152:		; ">"
push	offset asc_154D870
push	esi		; FILE *
call	_fprintf
mov	edi, [ebx+18h]
add	esp, 8
test	edi, edi
jz	short loc_40C199
inc	ebp

loc_40C168:
mov	edx, [edi]
mov	eax, [edx+2Ch]
mov	ecx, edi
call	eax
test	eax, eax
jnz	short loc_40C183
push	offset asc_154D83C ; "\n"
push	esi		; FILE *
call	_fprintf
add	esp, 8

loc_40C183:
mov	edx, [edi]
mov	eax, [edx+4]
push	ebp
push	esi
mov	ecx, edi
call	eax
mov	edi, [edi+28h]
test	edi, edi
jnz	short loc_40C168
mov	ebp, [esp+10h+arg_4]

loc_40C199:		; "\n"
push	offset asc_154D83C
push	esi		; FILE *
call	_fprintf
add	esp, 8
test	ebp, ebp
jle	short loc_40C1C3
mov	edi, ebp
lea	ecx, [ecx+0]

loc_40C1B0:		; "    "
push	offset asc_154D834
push	esi		; FILE *
call	_fprintf
add	esp, 8
sub	edi, 1
jnz	short loc_40C1B0

loc_40C1C3:
mov	ecx, [ebx+20h]
add	ecx, 8
push	ecx

loc_40C1CA:		; "</%s>"
push	offset aS_14
push	esi		; FILE *
call	_fprintf
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_40C080 endp

align 10h



sub_40C1E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	ecx, [ebx+20h]
push	ebp
mov	ebp, [esp+8+arg_4]
add	ecx, 8
mov	eax, ecx
push	esi
lea	esi, [eax+1]

loc_40C1F6:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_40C1F6
push	edi
sub	eax, esi
push	ecx
lea	edi, [ebp+20h]
mov	esi, eax
call	sub_40AD80
mov	eax, [ebx+0Ch]
mov	[ebp+0Ch], eax
mov	esi, [ebx+4Ch]
lea	eax, [ebx+2Ch]
pop	edi
cmp	esi, eax
jz	short loc_40C24A
test	esi, esi
jz	short loc_40C24A

loc_40C220:
mov	ecx, [esi+18h]
add	ecx, 8
push	ecx
mov	ecx, [esi+14h]
add	ecx, 8
push	ebp
call	sub_40BF60
mov	esi, [esi+20h]
mov	edx, [esi+18h]
cmp	dword ptr [edx], 0
jnz	short loc_40C246
mov	eax, [esi+14h]
cmp	dword ptr [eax], 0
jz	short loc_40C24A

loc_40C246:
test	esi, esi
jnz	short loc_40C220

loc_40C24A:
mov	esi, [ebx+18h]
test	esi, esi
jz	short loc_40C268

loc_40C251:
mov	edx, [esi]
mov	eax, [edx+3Ch]
mov	ecx, esi
call	eax
mov	ecx, ebp
call	sub_40B800
mov	esi, [esi+28h]
test	esi, esi
jnz	short loc_40C251

loc_40C268:
pop	esi
pop	ebp
pop	ebx
retn	8
sub_40C1E0 endp

align 10h



sub_40C270 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	edx, [edi+4Ch]
lea	ecx, [edi+2Ch]
mov	eax, edx
sub	eax, ecx
neg	eax
sbb	eax, eax
and	eax, edx
mov	edx, [ebx]
push	eax
mov	eax, [edx+4]
push	edi
mov	ecx, ebx
call	eax
test	al, al
jz	short loc_40C2B6
push	esi
mov	esi, [edi+18h]
test	esi, esi
jz	short loc_40C2B5
nop

loc_40C2A0:
mov	edx, [esi]
mov	eax, [edx+40h]
push	ebx
mov	ecx, esi
call	eax
test	al, al
jz	short loc_40C2B5
mov	esi, [esi+28h]
test	esi, esi
jnz	short loc_40C2A0

loc_40C2B5:
pop	esi

loc_40C2B6:
mov	edx, [ebx]
mov	eax, [edx+0Ch]
push	edi
mov	ecx, ebx
call	eax
pop	edi
pop	ebx
retn	4
sub_40C270 endp

align 10h



sub_40C2D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_40CEA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
push	edi
push	50h		; size_t
mov	edi, ecx
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_4], 0
test	eax, eax
jz	short loc_40C315
mov	ecx, [edi+20h]
add	ecx, 8
push	ecx
push	eax
call	sub_40BB00
mov	esi, eax
jmp	short loc_40C317

loc_40C315:
xor	esi, esi

loc_40C317:
mov	[esp+18h+var_4], 0FFFFFFFFh
test	esi, esi
jnz	short loc_40C336
pop	edi
xor	eax, eax
pop	esi
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn

loc_40C336:
push	esi
push	edi
call	sub_40C1E0
mov	ecx, [esp+18h+var_C]
pop	edi
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40C2D0 endp




sub_40C350 proc	near
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_40C369
mov	edx, [ecx]
mov	eax, [edx+30h]
call	eax
test	eax, eax
jz	short loc_40C369
mov	eax, [eax+20h]
add	eax, 8
retn

loc_40C369:
xor	eax, eax
retn
sub_40C350 endp

align 10h



sub_40C370 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40C370
push	eax
mov	large fs:0, esp
push	ebx
xor	ebx, ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
or	eax, 0FFFFFFFFh
mov	[ebp+8], eax
mov	[ebp+4], eax
push	esi
mov	[ebp+0Ch], ebx
mov	dword ptr [ebp+20h], offset unk_1889308
push	edi
mov	[ebp+10h], ebx
mov	[ebp+14h], ebx
mov	[ebp+18h], ebx
mov	[ebp+1Ch], ebx
mov	[ebp+24h], ebx
mov	[ebp+28h], ebx
mov	[esp+1Ch+var_4], ebx
lea	edi, [ebp+34h]
mov	dword ptr [ebp+0], offset off_1547700
mov	dword ptr [edi], offset	unk_1889308
mov	byte ptr [esp+1Ch+var_4], 1
mov	[ebp+40h], eax
mov	[ebp+3Ch], eax
push	offset byte_146D660
xor	esi, esi
mov	dword ptr [ebp+38h], 4
mov	[ebp+44h], bl
mov	[ebp+2Ch], bl
mov	[ebp+30h], ebx
call	sub_40AD80
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	[ebp+40h], ebx
mov	[ebp+3Ch], ebx
pop	esi
mov	eax, ebp
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_40C370 endp

align 10h



sub_40C410 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
mov	eax, large fs:0
push	offset SEH_40C370
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
or	eax, 0FFFFFFFFh
mov	[ebp+8], eax
mov	[ebp+4], eax
xor	ebx, ebx
push	edi
lea	edi, [ebp+20h]
mov	[ebp+0Ch], ebx
mov	dword ptr [edi], offset	unk_1889308
mov	esi, ecx
mov	[ebp+10h], ebx
mov	[ebp+14h], ebx
mov	[ebp+18h], ebx
mov	[ebp+1Ch], ebx
mov	[ebp+24h], ebx
mov	[ebp+28h], ebx
mov	[esp+1Ch+var_4], ebx
mov	dword ptr [ebp+0], offset off_1547700
mov	dword ptr [ebp+34h], offset unk_1889308
mov	byte ptr [esp+1Ch+var_4], 1
mov	[ebp+40h], eax
mov	[ebp+3Ch], eax
mov	eax, esi
mov	dword ptr [ebp+38h], 4
mov	[ebp+44h], bl
lea	ecx, [eax+1]

loc_40C484:
mov	dl, [eax]
inc	eax
cmp	dl, bl
jnz	short loc_40C484
sub	eax, ecx
push	esi
mov	esi, eax
call	sub_40AD80
push	offset byte_146D660
xor	esi, esi
lea	edi, [ebp+34h]
mov	[ebp+2Ch], bl
mov	[ebp+30h], ebx
call	sub_40AD80
mov	ecx, [esp+1Ch+var_C]
pop	edi
mov	[ebp+40h], ebx
mov	[ebp+3Ch], ebx
pop	esi
mov	eax, ebp
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_40C410 endp

align 10h



; int __fastcall sub_40C4D0(void *, int)
sub_40C4D0 proc	near
mov	eax, [ecx+20h]
push	edx		; int
add	eax, 8
push	eax		; File
push	ecx		; void *
call	sub_40C4E0
retn
sub_40C4D0 endp

align 10h



; int __stdcall	sub_40C4E0(void	*, FILE	*File, int)
sub_40C4E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
File= dword ptr	 8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset SEH_40C4E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esp+10h+File]
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
push	edi
push	eax
lea	esi, [esp+24h+var_10]
call	sub_40AEC0
mov	[esp+20h+var_4], 0
mov	ebx, [esp+20h+var_10]
mov	esi, [ebx]
lea	eax, [ebx+8]
lea	edi, [ebp+20h]
push	eax
call	sub_40AD80
mov	ecx, [edi]	; FILE *
push	offset Mode	; "rb"
add	ecx, 8
push	ecx		; Filename
lea	edx, [esp+28h+File]
push	edx		; File
mov	[esp+2Ch+File],	0
call	_fopen_s
mov	ecx, [esp+2Ch+File]
add	esp, 0Ch
test	ecx, ecx
jz	short loc_40C59C
mov	eax, [esp+20h+arg_8]
push	eax		; int
push	ebp		; void *
call	sub_40C610
mov	ecx, [esp+20h+File]
push	ecx		; FILE *
mov	byte ptr [esp+24h+arg_0], al
call	_fclose
add	esp, 4
mov	[esp+20h+var_4], 0FFFFFFFFh
cmp	ebx, offset unk_1889308
jz	short loc_40C583
push	ebx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40C583:
mov	al, byte ptr [esp+20h+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	0Ch

loc_40C59C:
cmp	byte ptr [ebp+2Ch], 0
jnz	short loc_40C5D7
mov	byte ptr [ebp+2Ch], 1
mov	dword ptr [ebp+30h], 2
mov	edx, off_17ED3D0
mov	eax, edx
lea	esi, [eax+1]

loc_40C5B8:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40C5B8
sub	eax, esi
push	edx
lea	edi, [ebp+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebp+40h], eax
mov	[ebp+3Ch], eax
jmp	short loc_40C5DA

loc_40C5D7:
or	eax, 0FFFFFFFFh

loc_40C5DA:
mov	[esp+20h+var_4], eax
cmp	ebx, offset unk_1889308
jz	short loc_40C5EF
push	ebx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40C5EF:
mov	ecx, [esp+20h+var_C]
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	0Ch
sub_40C4E0 endp

align 10h



; int __thiscall sub_40C610(FILE *, void *, int)
sub_40C610 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
mov	eax, large fs:0
push	offset SEH_40AD80
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
mov	esi, ecx
push	edi
test	esi, esi
jnz	short loc_40C684
cmp	[ebp+2Ch], cl
jnz	short loc_40C66D
mov	byte ptr [ebp+2Ch], 1
mov	dword ptr [ebp+30h], 2
mov	edx, off_17ED3D0
mov	eax, edx
lea	esi, [eax+1]
mov	edi, edi

loc_40C650:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40C650
sub	eax, esi
push	edx
lea	edi, [ebp+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebp+40h], eax
mov	[ebp+3Ch], eax

loc_40C66D:
xor	al, al
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40C684:
mov	edi, ebp
call	sub_40B7D0
push	2		; int
or	ebx, 0FFFFFFFFh
push	0		; __int32
push	esi		; FILE *
mov	[ebp+8], ebx
mov	[ebp+4], ebx
call	_fseek
push	esi		; FILE *
call	_ftell
push	0		; int
push	0		; __int32
push	esi		; FILE *
mov	edi, eax
call	_fseek
add	esp, 1Ch
test	edi, edi
jnz	short loc_40C704
cmp	byte ptr [ebp+2Ch], 0
jnz	short loc_40C6ED
mov	byte ptr [ebp+2Ch], 1
mov	dword ptr [ebp+30h], 0Dh
mov	edx, off_17ED3FC
mov	eax, edx
lea	esi, [eax+1]

loc_40C6D3:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40C6D3
sub	eax, esi
push	edx
lea	edi, [ebp+34h]
mov	esi, eax
call	sub_40AD80
mov	[ebp+40h], ebx
mov	[ebp+3Ch], ebx

loc_40C6ED:
xor	al, al
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40C704:
mov	[esp+1Ch+arg_0], offset	unk_1889308
lea	eax, [esp+1Ch+arg_0]
push	eax
mov	ecx, edi
mov	[esp+20h+var_4], 0
call	sub_40ACF0
lea	ecx, [edi+1]
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
push	esi		; FILE *
push	1		; size_t
mov	ebx, eax
push	edi		; size_t
push	ebx		; void *
mov	byte ptr [ebx],	0
call	_fread
add	esp, 14h
cmp	eax, 1
jz	short loc_40C7B6
push	ebx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
cmp	byte ptr [ebp+2Ch], 0
jnz	short loc_40C784
mov	byte ptr [ebp+2Ch], 1
mov	dword ptr [ebp+30h], 2
mov	edx, off_17ED3D0
mov	eax, edx
lea	esi, [eax+1]

loc_40C765:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40C765
sub	eax, esi
push	edx
lea	edi, [ebp+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebp+40h], eax
mov	[ebp+3Ch], eax
jmp	short loc_40C787

loc_40C784:
or	eax, 0FFFFFFFFh

loc_40C787:
mov	[esp+1Ch+var_4], eax
mov	eax, [esp+1Ch+arg_0]
cmp	eax, offset unk_1889308
jz	short loc_40C79F
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40C79F:
xor	al, al
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40C7B6:
mov	byte ptr [ebx+edi], 0
cmp	byte ptr [ebx],	0
mov	eax, ebx
mov	esi, ebx
jz	short loc_40C815

loc_40C7C3:
mov	cl, [esi]
cmp	cl, 0Ah
jnz	short loc_40C7DF
mov	edx, esi
sub	edx, eax
inc	edx
push	edx
push	eax
lea	edi, [esp+24h+arg_0]
call	sub_40AE70

loc_40C7DA:
inc	esi
mov	eax, esi
jmp	short loc_40C810

loc_40C7DF:
cmp	cl, 0Dh
jnz	short loc_40C80F
mov	ecx, esi
sub	ecx, eax
test	ecx, ecx
jle	short loc_40C7F7
push	ecx
push	eax
lea	edi, [esp+24h+arg_0]
call	sub_40AE70

loc_40C7F7:
push	0Ah
lea	edi, [esp+20h+arg_0]
call	sub_40AFC0
cmp	byte ptr [esi+1], 0Ah
jnz	short loc_40C7DA
add	esi, 2
mov	eax, esi
jmp	short loc_40C810

loc_40C80F:
inc	esi

loc_40C810:
cmp	byte ptr [esi],	0
jnz	short loc_40C7C3

loc_40C815:
sub	esi, eax
jz	short loc_40C824
push	esi
push	eax
lea	edi, [esp+24h+arg_0]
call	sub_40AE70

loc_40C824:		; void *
push	ebx
call	??3@YAXPAX@Z	; operator delete(void *)
mov	ecx, [esp+20h+arg_4]
mov	esi, [esp+20h+arg_0]
mov	eax, [ebp+0]
mov	eax, [eax+8]
add	esp, 4
push	ecx
push	0
lea	edx, [esi+8]
push	edx
mov	ecx, ebp
call	eax
cmp	byte ptr [ebp+2Ch], 0
mov	[esp+1Ch+var_4], 0FFFFFFFFh
jz	short loc_40C880
cmp	esi, offset unk_1889308
jz	loc_40C79F
push	esi		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
xor	al, al
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40C880:
cmp	esi, offset unk_1889308
jz	short loc_40C891
push	esi		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40C891:
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
mov	al, 1
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	8
sub_40C610 endp

align 10h



sub_40C8B0 proc	near

File= dword ptr	-4

push	ecx
push	esi
push	offset aW_1	; "w"
push	eax		; Filename
lea	ecx, [esp+10h+File]
push	ecx		; File
mov	[esp+14h+File],	0
call	_fopen_s
mov	esi, [esp+14h+File]
add	esp, 0Ch
test	esi, esi
jz	short loc_40C8F0
push	ebx
call	sub_40C900
mov	edx, [esp+0Ch+File]
push	edx		; FILE *
mov	bl, al
call	_fclose
add	esp, 4
mov	al, bl
pop	ebx
pop	esi
pop	ecx
retn

loc_40C8F0:
xor	al, al
pop	esi
pop	ecx
retn
sub_40C8B0 endp

align 10h



sub_40C900 proc	near
cmp	byte ptr [edi+44h], 0
jz	short loc_40C92A
push	esi		; FILE *
push	0EFh		; int
call	sub_798126
push	esi		; FILE *
push	0BBh		; int
call	sub_798126
push	esi		; FILE *
push	0BFh		; int
call	sub_798126
add	esp, 18h

loc_40C92A:
mov	eax, [edi]
mov	edx, [eax+4]
push	0
push	esi
mov	ecx, edi
call	edx
push	esi		; FILE *
call	_ferror
add	esp, 4
neg	eax
sbb	eax, eax
inc	eax
retn
sub_40C900 endp

align 10h



sub_40C950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [ebx+20h]
add	edi, 8
mov	eax, edi
lea	esi, [eax+1]

loc_40C967:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40C967
sub	eax, esi
push	edi
lea	edi, [ebp+20h]
mov	esi, eax
call	sub_40AD80
mov	eax, [ebx+0Ch]
mov	[ebp+0Ch], eax
mov	cl, [ebx+2Ch]
mov	[ebp+2Ch], cl
mov	ecx, [ebx+34h]
add	ecx, 8
mov	eax, ecx
lea	esi, [eax+1]

loc_40C992:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_40C992
sub	eax, esi
push	ecx
lea	edi, [ebp+34h]
mov	esi, eax
call	sub_40AD80
mov	esi, [ebx+18h]
test	esi, esi
jz	short loc_40C9C7
lea	ecx, [ecx+0]

loc_40C9B0:
mov	edx, [esi]
mov	eax, [edx+3Ch]
mov	ecx, esi
call	eax
mov	ecx, ebp
call	sub_40B800
mov	esi, [esi+28h]
test	esi, esi
jnz	short loc_40C9B0

loc_40C9C7:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_40C950 endp

align 10h



sub_40C9D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_40CEA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
push	edi
push	48h		; size_t
mov	edi, ecx
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_4], 0
test	eax, eax
jz	short loc_40CA0E
push	eax
call	sub_40C370
mov	esi, eax
jmp	short loc_40CA10

loc_40CA0E:
xor	esi, esi

loc_40CA10:
mov	[esp+18h+var_4], 0FFFFFFFFh
test	esi, esi
jnz	short loc_40CA2F
pop	edi
xor	eax, eax
pop	esi
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn

loc_40CA2F:
push	esi
push	edi
call	sub_40C950
mov	ecx, [esp+18h+var_C]
pop	edi
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40C9D0 endp

align 10h



; int __stdcall	sub_40CA50(FILE	*, int)
sub_40CA50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [ecx+18h]
test	esi, esi
jz	short loc_40CA84
push	ebx
mov	ebx, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]

loc_40CA62:
mov	eax, [esi]
mov	edx, [eax+4]
push	ebx
push	edi
mov	ecx, esi
call	edx
push	offset asc_154D83C ; "\n"
push	edi		; FILE *
call	_fprintf
mov	esi, [esi+28h]
add	esp, 8
test	esi, esi
jnz	short loc_40CA62
pop	edi
pop	ebx

loc_40CA84:
pop	esi
retn	8
sub_40CA50 endp

align 10h



sub_40CA90 proc	near

arg_0= dword ptr  4

push	ebx
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	edx, [eax+8]
mov	ebx, ecx
push	ebx
mov	ecx, edi
call	edx
test	al, al
jz	short loc_40CAC6
push	esi
mov	esi, [ebx+18h]
test	esi, esi
jz	short loc_40CAC5
mov	edi, edi

loc_40CAB0:
mov	eax, [esi]
mov	edx, [eax+40h]
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_40CAC5
mov	esi, [esi+28h]
test	esi, esi
jnz	short loc_40CAB0

loc_40CAC5:
pop	esi

loc_40CAC6:
mov	eax, [edi]
mov	edx, [eax+10h]
push	ebx
mov	ecx, edi
call	edx
pop	edi
pop	ebx
retn	4
sub_40CA90 endp

align 10h



sub_40CAE0 proc	near
mov	eax, [eax+20h]
mov	ecx, [eax+18h]
cmp	dword ptr [ecx], 0
jnz	short locret_40CAF5
mov	edx, [eax+14h]
cmp	dword ptr [edx], 0
jnz	short locret_40CAF5
xor	eax, eax

locret_40CAF5:
retn
sub_40CAE0 endp

align 10h



; int __thiscall sub_40CB00(FILE *, int)
sub_40CB00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_40CB00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebp
push	esi
mov	eax, offset unk_1889308
push	edi
mov	edi, ecx
mov	esi, edx
mov	[esp+20h+var_14], eax
mov	[esp+20h+var_4], 0
mov	[esp+20h+var_10], eax
lea	eax, [esi+14h]
push	eax
lea	eax, [esp+24h+var_14]
mov	byte ptr [esp+24h+var_4], 1
call	sub_40B500
add	esi, 18h
push	esi
lea	eax, [esp+28h+var_10]
call	sub_40B500
mov	esi, [esi]
mov	eax, [esi]
add	esp, 8
test	eax, eax
jbe	short loc_40CB81
mov	cl, [esi+8]
lea	eax, [esi+8]
test	cl, cl
jz	short loc_40CB81

loc_40CB68:
cmp	cl, 22h
jz	short loc_40CB77
mov	cl, [eax+1]
inc	eax
test	cl, cl
jnz	short loc_40CB68
jmp	short loc_40CB81

loc_40CB77:
sub	eax, esi
sub	eax, 8
cmp	eax, 0FFFFFFFFh
jnz	short loc_40CBCE

loc_40CB81:
mov	ebp, [esp+20h+var_14]
mov	esi, [esp+20h+var_10]
test	edi, edi
jz	short loc_40CBA3
lea	ecx, [esi+8]
push	ecx
lea	edx, [ebp+8]
push	edx
push	offset aSS_10	; "%s=\"%s\""
push	edi		; FILE *
call	_fprintf
add	esp, 10h

loc_40CBA3:
mov	edi, [esp+20h+arg_0]
test	edi, edi
jz	short loc_40CC1E
lea	eax, [esp+20h+var_14]
call	sub_40AC50
push	offset asc_154D88C ; "=\""
call	sub_40AF60
lea	eax, [esp+20h+var_10]
call	sub_40AC50
push	offset asc_154D890 ; "\""
jmp	short loc_40CC19

loc_40CBCE:
mov	ebp, [esp+20h+var_14]
mov	esi, [esp+20h+var_10]
test	edi, edi
jz	short loc_40CBF0
lea	eax, [esi+8]
push	eax
lea	ecx, [ebp+8]
push	ecx
push	offset aSS_11	; "%s='%s'"
push	edi		; FILE *
call	_fprintf
add	esp, 10h

loc_40CBF0:
mov	edi, [esp+20h+arg_0]
test	edi, edi
jz	short loc_40CC1E
lea	eax, [esp+20h+var_14]
call	sub_40AC50
push	offset asc_154D89C ; "='"
call	sub_40AF60
lea	eax, [esp+20h+var_10]
call	sub_40AC50
push	offset asc_154D8A0 ; "'"

loc_40CC19:
call	sub_40AF60

loc_40CC1E:
mov	byte ptr [esp+20h+var_4], 0
cmp	esi, offset unk_1889308
jz	short loc_40CC34
push	esi		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40CC34:
mov	[esp+20h+var_4], 0FFFFFFFFh
cmp	ebp, offset unk_1889308
jz	short loc_40CC4D
push	ebp		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40CC4D:
mov	ecx, [esp+20h+var_C]
pop	edi
pop	esi
pop	ebp
mov	large fs:0, ecx
add	esp, 14h
retn	4
sub_40CB00 endp

align 10h



; int __stdcall	sub_40CC70(FILE	*, int)
sub_40CC70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
test	esi, esi
jle	short loc_40CC94

loc_40CC81:		; "    "
push	offset asc_154D834
push	edi		; FILE *
call	_fprintf
add	esp, 8
sub	esi, 1
jnz	short loc_40CC81

loc_40CC94:
mov	eax, [ebx+20h]
add	eax, 8
push	eax
push	offset aS_15	; "<!--%s-->"
push	edi		; FILE *
call	_fprintf
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	8
sub_40CC70 endp

align 10h



sub_40CCB0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[esp+arg_0], eax
mov	eax, [edx+18h]
jmp	eax
sub_40CCB0 endp

align 10h



sub_40CCD0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	2Ch		; size_t
mov	ebp, ecx
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebx, eax
xor	edx, edx
add	esp, 4
cmp	ebx, edx
jz	short loc_40CD51
push	esi
or	eax, 0FFFFFFFFh
mov	[ebx+8], eax
mov	[ebx+4], eax
push	edi
mov	[ebx+0Ch], edx
mov	dword ptr [ebx+20h], offset unk_1889308
lea	edi, [ebx+20h]
mov	[ebx+10h], edx
mov	dword ptr [ebx+14h], 2
mov	[ebx+18h], edx
mov	[ebx+1Ch], edx
mov	[ebx+24h], edx
mov	[ebx+28h], edx
mov	dword ptr [ebx], offset	off_154D9A8
mov	esi, [ebp+20h]
add	esi, 8
mov	eax, esi
lea	ecx, [eax+1]
mov	[esp+14h+var_4], ecx
lea	ebx, [ebx+0]

loc_40CD30:
mov	cl, [eax]
inc	eax
cmp	cl, dl
jnz	short loc_40CD30
sub	eax, [esp+14h+var_4]
push	esi
mov	esi, eax
call	sub_40AD80
mov	edx, [ebp+0Ch]
pop	edi
pop	esi
pop	ebp
mov	[ebx+0Ch], edx
mov	eax, ebx
pop	ebx
pop	ecx
retn

loc_40CD51:
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn
sub_40CCD0 endp

align 10h



; int __stdcall	sub_40CD60(FILE	*, void	*)
sub_40CD60 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40ECC0
push	eax
mov	large fs:0, esp
push	ebx
mov	ebx, ecx
cmp	byte ptr [ebx+2Ch], 0
push	esi
push	edi
jz	short loc_40CDDC
mov	esi, [esp+18h+arg_0]
push	offset asc_154D83C ; "\n"
push	esi		; FILE *
call	_fprintf
mov	edi, [esp+20h+arg_4]
add	esp, 8
test	edi, edi
jle	short loc_40CDB3
lea	ebx, [ebx+0]

loc_40CDA0:		; "    "
push	offset asc_154D834
push	esi		; FILE *
call	_fprintf
add	esp, 8
sub	edi, 1
jnz	short loc_40CDA0

loc_40CDB3:
mov	eax, [ebx+20h]
add	eax, 8
push	eax
push	offset aCdataS	; "<![CDATA[%s]]>\n"
push	esi		; FILE *
call	_fprintf
add	esp, 0Ch
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	8

loc_40CDDC:
mov	[esp+18h+arg_4], offset	unk_1889308
add	ebx, 20h
push	ebx
lea	eax, [esp+1Ch+arg_4]
mov	[esp+1Ch+var_4], 0
call	sub_40B500
mov	esi, [esp+1Ch+arg_4]
mov	edx, [esp+1Ch+arg_0]
lea	ecx, [esi+8]
push	ecx
push	offset aS_11	; "%s"
push	edx		; FILE *
call	_fprintf
add	esp, 10h
mov	[esp+18h+var_4], 0FFFFFFFFh
cmp	esi, offset unk_1889308
jz	short loc_40CE2C
push	esi		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40CE2C:
mov	ecx, [esp+18h+var_C]
pop	edi
pop	esi
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	8
sub_40CD60 endp




sub_40CE40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	ecx, [ebx+20h]
push	ebp
mov	ebp, [esp+8+arg_4]
add	ecx, 8
push	esi
mov	eax, ecx
push	edi
lea	esi, [eax+1]

loc_40CE57:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_40CE57
sub	eax, esi
push	ecx
lea	edi, [ebp+20h]
mov	esi, eax
call	sub_40AD80
mov	eax, [ebx+0Ch]
pop	edi
mov	[ebp+0Ch], eax
mov	cl, [ebx+2Ch]
pop	esi
mov	[ebp+2Ch], cl
pop	ebp
pop	ebx
retn	8
sub_40CE40 endp

align 10h



sub_40CE80 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[esp+arg_0], eax
mov	eax, [edx+1Ch]
jmp	eax
sub_40CE80 endp

align 10h



sub_40CEA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_40CEA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
push	edi
push	30h		; size_t
mov	edi, ecx
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_4], 0
test	eax, eax
jz	short loc_40CEE3
push	eax
mov	edx, offset byte_146D660
call	sub_40B280
mov	esi, eax
jmp	short loc_40CEE5

loc_40CEE3:
xor	esi, esi

loc_40CEE5:
mov	[esp+18h+var_4], 0FFFFFFFFh
test	esi, esi
jnz	short loc_40CF04
pop	edi
xor	eax, eax
pop	esi
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn

loc_40CF04:
push	esi
push	edi
call	sub_40CE40
mov	ecx, [esp+18h+var_C]
pop	edi
mov	eax, esi
pop	esi
mov	large fs:0, ecx
add	esp, 10h
retn
sub_40CEA0 endp

align 10h



sub_40CF20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40CF20
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
or	eax, 0FFFFFFFFh
mov	[ebp+8], eax
mov	[ebp+4], eax
xor	ebx, ebx
push	esi
mov	[ebp+0Ch], ebx
mov	dword ptr [ebp+20h], offset unk_1889308
push	edi
mov	[ebp+10h], ebx
mov	dword ptr [ebp+14h], 5
mov	[ebp+18h], ebx
mov	[ebp+1Ch], ebx
mov	[ebp+24h], ebx
mov	[ebp+28h], ebx
mov	[esp+1Ch+var_4], ebx
lea	edi, [ebp+2Ch]
mov	dword ptr [ebp+0], offset off_154DA88
mov	dword ptr [edi], offset	unk_1889308
mov	dword ptr [ebp+30h], offset unk_1889308
mov	dword ptr [ebp+34h], offset unk_1889308
mov	eax, offset unk_150FF80
mov	byte ptr [esp+1Ch+var_4], 3
lea	esi, [eax+1]

loc_40CF97:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40CF97
sub	eax, esi
push	offset unk_150FF80
mov	esi, eax
call	sub_40AD80
mov	eax, offset unk_1479B95
lea	esi, [eax+1]

loc_40CFB4:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40CFB4
sub	eax, esi
push	offset unk_1479B95
mov	esi, eax
lea	edi, [ebp+30h]
call	sub_40AD80
mov	eax, offset unk_1479B83
lea	edx, [eax+1]

loc_40CFD4:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40CFD4
sub	eax, edx
push	offset unk_1479B83
mov	esi, eax
lea	edi, [ebp+34h]
call	sub_40AD80
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_40CF20 endp

align 10h



; int __stdcall	sub_40D010(FILE	*, int,	int)
sub_40D010 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	edi
mov	ebp, ecx
test	ebx, ebx
jz	short loc_40D02B
push	offset a?xml_0	; "<?xml "
push	ebx		; FILE *
call	_fprintf
add	esp, 8

loc_40D02B:
mov	edi, [esp+0Ch+arg_8]
test	edi, edi
jz	short loc_40D03D
push	offset a?xml_0	; "<?xml "
call	sub_40AF60

loc_40D03D:
mov	eax, [ebp+2Ch]
cmp	dword ptr [eax], 0
push	esi
lea	esi, [ebp+2Ch]
jz	short loc_40D07E
test	ebx, ebx
jz	short loc_40D05F
add	eax, 8
push	eax
push	offset aVersionS ; "version=\"%s\" "
push	ebx		; FILE *
call	_fprintf
add	esp, 0Ch

loc_40D05F:
test	edi, edi
jz	short loc_40D07E
push	offset aVersion_2 ; "version=\""
call	sub_40AF60
mov	eax, esi
call	sub_40AC50
push	offset asc_154D8EC ; "\" "
call	sub_40AF60

loc_40D07E:
mov	eax, [ebp+30h]
cmp	dword ptr [eax], 0
lea	esi, [ebp+30h]
jz	short loc_40D0BE
test	ebx, ebx
jz	short loc_40D09F
add	eax, 8
push	eax
push	offset aEncodingS ; "encoding=\"%s\" "
push	ebx		; FILE *
call	_fprintf
add	esp, 0Ch

loc_40D09F:
test	edi, edi
jz	short loc_40D0BE
push	offset aEncoding_0 ; "encoding=\""
call	sub_40AF60
mov	eax, esi
call	sub_40AC50
push	offset asc_154D8EC ; "\" "
call	sub_40AF60

loc_40D0BE:
mov	eax, [ebp+34h]
cmp	dword ptr [eax], 0
lea	esi, [ebp+34h]
jz	short loc_40D0FE
test	ebx, ebx
jz	short loc_40D0DF
add	eax, 8
push	eax
push	offset aStandaloneS ; "standalone=\"%s\" "
push	ebx		; FILE *
call	_fprintf
add	esp, 0Ch

loc_40D0DF:
test	edi, edi
jz	short loc_40D0FE
push	offset aStandalone_0 ; "standalone=\""
call	sub_40AF60
mov	eax, esi
call	sub_40AC50
push	offset asc_154D8EC ; "\" "
call	sub_40AF60

loc_40D0FE:
pop	esi
test	ebx, ebx
jz	short loc_40D111
push	offset a?_6	; "?>"
push	ebx		; FILE *
call	_fprintf
add	esp, 8

loc_40D111:
test	edi, edi
jz	short loc_40D11F
push	offset a?_6	; "?>"
call	sub_40AF60

loc_40D11F:
pop	edi
pop	ebp
pop	ebx
retn	0Ch
sub_40D010 endp

align 10h



sub_40D130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [ebp+20h]
add	edi, 8
mov	eax, edi
lea	edx, [eax+1]

loc_40D147:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40D147
sub	eax, edx
push	edi
lea	edi, [ebx+20h]
mov	esi, eax
call	sub_40AD80
mov	eax, [ebp+0Ch]
mov	[ebx+0Ch], eax
mov	eax, [ebp+2Ch]
mov	esi, [eax]
lea	ecx, [eax+8]
push	ecx
lea	edi, [ebx+2Ch]
call	sub_40AD80
mov	eax, [ebp+30h]
mov	esi, [eax]
lea	edx, [eax+8]
push	edx
lea	edi, [ebx+30h]
call	sub_40AD80
mov	ebp, [ebp+34h]
mov	esi, [ebp+0]
lea	eax, [ebp+8]
push	eax
lea	edi, [ebx+34h]
call	sub_40AD80
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_40D130 endp

align 10h



sub_40D1A0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[esp+arg_0], eax
mov	eax, [edx+20h]
jmp	eax
sub_40D1A0 endp

align 10h



sub_40D1C0 proc	near
push	esi
push	edi
push	38h		; size_t
mov	edi, ecx
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
xor	eax, eax
add	esp, 4
cmp	esi, eax
jz	short loc_40D21B
or	ecx, 0FFFFFFFFh
mov	[esi+8], ecx
mov	[esi+4], ecx
mov	ecx, offset unk_1889308
mov	[esi+0Ch], eax
mov	[esi+20h], ecx
mov	[esi+10h], eax
mov	dword ptr [esi+14h], 5
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+24h], eax
mov	[esi+28h], eax
mov	dword ptr [esi], offset	off_154DA88
mov	[esi+2Ch], ecx
push	esi
mov	[esi+30h], ecx
push	edi
mov	[esi+34h], ecx
call	sub_40D130
pop	edi
mov	eax, esi
pop	esi
retn

loc_40D21B:
pop	edi
xor	eax, eax
pop	esi
retn
sub_40D1C0 endp




; int __stdcall	sub_40D220(FILE	*, int)
sub_40D220 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
test	esi, esi
jle	short loc_40D244

loc_40D231:		; "    "
push	offset asc_154D834
push	edi		; FILE *
call	_fprintf
add	esp, 8
sub	esi, 1
jnz	short loc_40D231

loc_40D244:
mov	eax, [ebx+20h]
add	eax, 8
push	eax
push	offset aS_16	; "<%s>"
push	edi		; FILE *
call	_fprintf
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	8
sub_40D220 endp

align 10h



sub_40D260 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[esp+arg_0], eax
mov	eax, [edx+14h]
jmp	eax
sub_40D260 endp

align 10h



sub_40D280 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	2Ch		; size_t
mov	ebp, ecx
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebx, eax
xor	edx, edx
add	esp, 4
cmp	ebx, edx
jz	short loc_40D301
push	esi
or	eax, 0FFFFFFFFh
mov	[ebx+8], eax
mov	[ebx+4], eax
push	edi
mov	[ebx+0Ch], edx
mov	dword ptr [ebx+20h], offset unk_1889308
lea	edi, [ebx+20h]
mov	[ebx+10h], edx
mov	dword ptr [ebx+14h], 3
mov	[ebx+18h], edx
mov	[ebx+1Ch], edx
mov	[ebx+24h], edx
mov	[ebx+28h], edx
mov	dword ptr [ebx], offset	off_154D9F0
mov	esi, [ebp+20h]
add	esi, 8
mov	eax, esi
lea	ecx, [eax+1]
mov	[esp+14h+var_4], ecx
lea	ebx, [ebx+0]

loc_40D2E0:
mov	cl, [eax]
inc	eax
cmp	cl, dl
jnz	short loc_40D2E0
sub	eax, [esp+14h+var_4]
push	esi
mov	esi, eax
call	sub_40AD80
mov	edx, [ebp+0Ch]
pop	edi
pop	esi
pop	ebp
mov	[ebx+0Ch], edx
mov	eax, ebx
pop	ebx
pop	ecx
retn

loc_40D301:
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn
sub_40D280 endp

align 10h



sub_40D310 proc	near
mov	eax, [esi+18h]
cmp	eax, offset unk_1889308
jz	short loc_40D323
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40D323:
mov	eax, [esi+14h]
cmp	eax, offset unk_1889308
jz	short loc_40D336
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40D336:
mov	dword ptr [esi], offset	off_1437D84
retn
sub_40D310 endp

align 10h



sub_40D340 proc	near
mov	eax, [edi+20h]
push	ebx
cmp	eax, edi
jz	short loc_40D380

loc_40D348:
mov	ecx, [eax+14h]
mov	edx, esi
add	ecx, 8

loc_40D350:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_40D370
test	bl, bl
jz	short loc_40D36C
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_40D370
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_40D350

loc_40D36C:
xor	ecx, ecx
jmp	short loc_40D375

loc_40D370:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_40D375:
test	ecx, ecx
jz	short loc_40D382
mov	eax, [eax+20h]
cmp	eax, edi
jnz	short loc_40D348

loc_40D380:
xor	eax, eax

loc_40D382:
pop	ebx
retn
sub_40D340 endp

align 10h



sub_40D390 proc	near
mov	eax, [eax]
test	eax, eax
jz	short loc_40D3A4
call	sub_40B9B0
test	eax, eax
jz	short loc_40D3A4
mov	[edi], eax
mov	eax, edi
retn

loc_40D3A4:
mov	dword ptr [edi], 0
mov	eax, edi
retn
sub_40D390 endp

align 10h



sub_40D3B0 proc	near

DstBuf=	dword ptr  4
Format=	dword ptr  8
ArgList= byte ptr  0Ch

mov	ecx, [esp+Format]
lea	eax, [esp+ArgList]
push	eax		; ArgList
mov	eax, [esp+4+DstBuf]
push	ecx		; Format
push	edx		; MaxCount
push	20h		; SizeInBytes
push	eax		; DstBuf
call	__vsnprintf_s
add	esp, 14h
retn
sub_40D3B0 endp

align 10h



sub_40D3D0 proc	near

DstBuf=	dword ptr  4
Format=	dword ptr  8
ArgList= byte ptr  0Ch

mov	ecx, [esp+Format]
lea	eax, [esp+ArgList]
push	eax		; ArgList
mov	eax, [esp+4+DstBuf]
push	ecx		; Format
push	edx		; MaxCount
push	40h		; SizeInBytes
push	eax		; DstBuf
call	__vsnprintf_s
add	esp, 14h
retn
sub_40D3D0 endp

align 10h



sub_40D3F0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
movzx	eax, bl
push	eax		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_40D411
cmp	bl, 0Ah
jz	short loc_40D411
cmp	bl, 0Dh
jz	short loc_40D411
pop	ebx
retn

loc_40D411:
mov	eax, 1
pop	ebx
retn
sub_40D3F0 endp

align 10h



; int __fastcall sub_40D420(int, int)
sub_40D420 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, eax
cmp	esi, 1
jnz	short loc_40D455
mov	dl, [edi]
movzx	eax, dl
mov	eax, ds:dword_15455D0[eax*4]
mov	[ebp+0], eax
cmp	eax, esi
jnz	short loc_40D466

loc_40D440:
mov	al, [edi]
cmp	al, 26h
jnz	short loc_40D45E
push	esi		; int
push	ebp		; int
push	ecx		; int
push	edi		; char *
call	sub_40D8E0
add	esp, 10h
pop	esi
pop	ebp
retn

loc_40D455:
mov	dword ptr [ebp+0], 1
jmp	short loc_40D440

loc_40D45E:
pop	esi
mov	[ecx], al
lea	eax, [edi+1]
pop	ebp
retn

loc_40D466:
test	eax, eax
jz	short loc_40D48D
xor	esi, esi
test	dl, dl
jz	short loc_40D485
mov	eax, edi
sub	ecx, edi

loc_40D474:
cmp	esi, [ebp+0]
jge	short loc_40D485
mov	dl, [eax]
mov	[ecx+eax], dl
inc	eax
inc	esi
cmp	byte ptr [eax],	0
jnz	short loc_40D474

loc_40D485:
mov	eax, [ebp+0]
pop	esi
add	eax, edi
pop	ebp
retn

loc_40D48D:
pop	esi
xor	eax, eax
pop	ebp
retn
sub_40D420 endp

align 10h



sub_40D4A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, [esp+1Ch+arg_0]
push	esi
xor	esi, esi
mov	[esp+20h+var_1C], esi
mov	[esp+20h+var_18], esi
mov	[esp+20h+var_14], 0C0h
mov	[esp+20h+var_10], 0E0h
mov	[esp+20h+var_C], 0F0h
mov	[esp+20h+var_8], 0F8h
mov	[esp+20h+var_4], 0FCh
cmp	eax, 80h
jnb	short loc_40D4E9
mov	dword ptr [edx], 1
jmp	short loc_40D514

loc_40D4E9:
cmp	eax, 800h
jnb	short loc_40D4F8
mov	dword ptr [edx], 2
jmp	short loc_40D514

loc_40D4F8:
cmp	eax, 10000h
jnb	short loc_40D507
mov	dword ptr [edx], 3
jmp	short loc_40D514

loc_40D507:
cmp	eax, 200000h
jnb	short loc_40D55F
mov	dword ptr [edx], 4

loc_40D514:
mov	esi, [edx]
lea	edx, [esi-1]
add	ecx, esi
cmp	edx, 3		; switch 4 cases
ja	short loc_40D561 ; default
jmp	ds:off_40D568[edx*4] ; switch jump

loc_40D527:		; jumptable 0040D520 case 3
mov	dl, al
and	dl, 3Fh
dec	ecx
or	dl, 80h
mov	[ecx], dl
shr	eax, 6

loc_40D535:		; jumptable 0040D520 case 2
mov	dl, al
and	dl, 3Fh
dec	ecx
or	dl, 80h
mov	[ecx], dl
shr	eax, 6

loc_40D543:		; jumptable 0040D520 case 1
mov	dl, al
and	dl, 3Fh
dec	ecx
or	dl, 80h
mov	[ecx], dl
shr	eax, 6

loc_40D551:		; jumptable 0040D520 case 0
mov	dl, byte ptr [esp+esi*4+20h+var_1C]
or	dl, al
mov	[ecx-1], dl
pop	esi
add	esp, 1Ch
retn

loc_40D55F:
mov	[edx], esi

loc_40D561:		; default
pop	esi
add	esp, 1Ch
retn
sub_40D4A0 endp

align 4
off_40D568 dd offset loc_40D551	; jump table for switch	statement
dd offset loc_40D543
dd offset loc_40D535
dd offset loc_40D527
align 10h



sub_40D580 proc	near
cmp	al, 7Fh
jnb	short loc_40D591
movzx	eax, al
push	eax		; int
call	_isalpha
add	esp, 4
retn

loc_40D591:
mov	eax, 1
retn
sub_40D580 endp

align 10h



sub_40D5A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [edi+0Ch]
cmp	ebp, 1
jl	loc_40D679
mov	ecx, [edi+8]
mov	eax, [edi+4]
push	esi
mov	esi, [edi]
cmp	ecx, [esp+0Ch+arg_0]
jnb	loc_40D670

loc_40D5C1:
movzx	edx, byte ptr [ecx]
cmp	edx, 0EFh	; switch 240 cases
ja	short loc_40D649 ; default
			; jumptable 0040D5D3 cases 1-8,11,12,14-238
movzx	ebx, ds:byte_40D698[edx]
jmp	ds:off_40D680[ebx*4] ; switch jump

loc_40D5DA:		; jumptable 0040D5D3 case 13
inc	ecx
inc	esi
xor	eax, eax
cmp	byte ptr [ecx],	0Ah
jnz	loc_40D666
inc	ecx
jmp	loc_40D666

loc_40D5ED:		; jumptable 0040D5D3 case 10
inc	ecx
inc	esi
xor	eax, eax
cmp	byte ptr [ecx],	0Dh
jnz	short loc_40D666
inc	ecx
jmp	short loc_40D666

loc_40D5F9:		; jumptable 0040D5D3 case 9
cdq
idiv	ebp
inc	ecx
inc	eax
imul	eax, ebp
jmp	short loc_40D666

loc_40D603:		; jumptable 0040D5D3 case 239
cmp	[esp+0Ch+arg_4], 1
jnz	short loc_40D664
mov	bl, [ecx+1]
test	bl, bl
jz	short loc_40D666
mov	dl, [ecx+2]
test	dl, dl
jz	short loc_40D666
cmp	bl, 0BBh
jnz	short loc_40D627
cmp	dl, 0BFh
jnz	short loc_40D627
add	ecx, 3
jmp	short loc_40D666

loc_40D627:
cmp	bl, 0BFh
jnz	short loc_40D644
cmp	dl, 0BEh
jnz	short loc_40D636
add	ecx, 3
jmp	short loc_40D666

loc_40D636:
cmp	bl, 0BFh
jnz	short loc_40D644
cmp	dl, bl
jnz	short loc_40D644
add	ecx, 3
jmp	short loc_40D666

loc_40D644:
add	ecx, 3
jmp	short loc_40D665

loc_40D649:		; default
cmp	[esp+0Ch+arg_4], 1 ; jumptable 0040D5D3	cases 1-8,11,12,14-238
jnz	short loc_40D664
mov	edx, ds:dword_15455D0[edx*4]
test	edx, edx
jnz	short loc_40D660
mov	edx, 1

loc_40D660:
add	ecx, edx
jmp	short loc_40D665

loc_40D664:
inc	ecx

loc_40D665:
inc	eax

loc_40D666:
cmp	ecx, [esp+0Ch+arg_0]
jb	loc_40D5C1

loc_40D670:
mov	[edi], esi
mov	[edi+4], eax
mov	[edi+8], ecx

loc_40D678:		; jumptable 0040D5D3 case 0
pop	esi

loc_40D679:
pop	ebp
pop	ebx
retn	8
sub_40D5A0 endp

align 10h
off_40D680 dd offset loc_40D678, offset	loc_40D5F9 ; jump table	for switch statement
dd offset loc_40D5ED, offset loc_40D5DA
dd offset loc_40D603, offset loc_40D649
byte_40D698 db 0, 5, 5,	5, 5, 5, 5, 5, 5, 1, 2,	5, 5 ; indirect	table for switch statement
db 3, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 5, 5,	5, 5, 5, 5, 5, 5
db 5, 5, 5, 5, 5, 4
align 10h



sub_40D790 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, eax
test	esi, esi
jz	loc_40D841
mov	bl, [esi]
test	bl, bl
jz	loc_40D841
cmp	[esp+8+arg_0], 1
jnz	short loc_40D814
lea	ecx, [ecx+0]

loc_40D7B0:
cmp	bl, 0EFh
jnz	short loc_40D7E4
mov	al, [esi+1]
cmp	al, 0BBh
jnz	short loc_40D7C7
cmp	byte ptr [esi+2], 0BFh
jnz	short loc_40D7C7
add	esi, 3
jmp	short loc_40D809

loc_40D7C7:
cmp	al, 0BFh
jnz	short loc_40D7E4
cmp	byte ptr [esi+2], 0BEh
jnz	short loc_40D7D6
add	esi, 3
jmp	short loc_40D809

loc_40D7D6:
cmp	al, 0BFh
jnz	short loc_40D7E4
cmp	[esi+2], al
jnz	short loc_40D7E4
add	esi, 3
jmp	short loc_40D809

loc_40D7E4:
movzx	eax, bl
push	eax		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_40D808
cmp	bl, 0Ah
jz	short loc_40D808
cmp	bl, 0Dh
jz	short loc_40D808
mov	al, [esi]
cmp	al, 0Ah
jz	short loc_40D808
cmp	al, 0Dh
jnz	short loc_40D80F

loc_40D808:
inc	esi

loc_40D809:
mov	bl, [esi]
test	bl, bl
jnz	short loc_40D7B0

loc_40D80F:
mov	eax, esi
pop	esi
pop	ebx
retn

loc_40D814:
mov	bl, [esi]
test	bl, bl
jz	short loc_40D834
movzx	ecx, bl
push	ecx		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_40D83E
cmp	bl, 0Ah
jz	short loc_40D83E
cmp	bl, 0Dh
jz	short loc_40D83E

loc_40D834:
mov	al, [esi]
cmp	al, 0Ah
jz	short loc_40D83E
cmp	al, 0Dh
jnz	short loc_40D80F

loc_40D83E:
inc	esi
jmp	short loc_40D814

loc_40D841:
pop	esi
xor	eax, eax
pop	ebx
retn
sub_40D790 endp

align 10h



sub_40D850 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, eax
push	offset byte_146D660
xor	esi, esi
call	sub_40AD80
test	ebx, ebx
jz	short loc_40D8D6
mov	al, [ebx]
test	al, al
jz	short loc_40D8D6
cmp	al, 7Fh
jnb	short loc_40D888
movzx	eax, al
push	eax		; int
call	_isalpha
add	esp, 4
test	eax, eax
jnz	short loc_40D888
cmp	byte ptr [ebx],	5Fh
jnz	short loc_40D8D6

loc_40D888:
push	ebp
mov	ebp, ebx
jmp	short loc_40D890
align 10h

loc_40D890:
mov	al, [ebx]
test	al, al
jz	short loc_40D8C1
cmp	al, 7Fh
jnb	short loc_40D8BC
movzx	ecx, al
push	ecx		; int
call	_isalnum
add	esp, 4
test	eax, eax
jnz	short loc_40D8BC
mov	al, [ebx]
cmp	al, 5Fh
jz	short loc_40D8BC
cmp	al, 2Dh
jz	short loc_40D8BC
cmp	al, 2Eh
jz	short loc_40D8BC
cmp	al, 3Ah
jnz	short loc_40D8C1

loc_40D8BC:
add	ebx, 1
jnz	short loc_40D890

loc_40D8C1:
mov	esi, ebx
sub	esi, ebp
test	esi, esi
jle	short loc_40D8CF
push	ebp
call	sub_40AD80

loc_40D8CF:
pop	ebp
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn

loc_40D8D6:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn
sub_40D850 endp

align 10h



; int __cdecl sub_40D8E0(char *, int, int, int)
sub_40D8E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
lea	ebx, [ebp+1]
mov	dword ptr [eax], 0
mov	al, [ebx]
push	esi
push	edi
test	al, al
jz	loc_40DA2A
cmp	al, 23h
jnz	loc_40DA2A
mov	al, [ebp+2]
lea	ecx, [ebp+2]
test	al, al
jz	loc_40DA2A
xor	ebx, ebx
lea	esi, [ebx+1]
cmp	al, 78h
jnz	short loc_40D99D
cmp	[ebp+3], bl
lea	eax, [ebp+3]
jnz	short loc_40D92D

loc_40D926:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_40D92D:		; int
push	3Bh
push	eax		; char *
call	_strchr
add	esp, 8
test	eax, eax
jz	short loc_40D926
cmp	[eax], bl
jz	short loc_40D926
mov	cl, [eax-1]
mov	edi, eax
dec	eax
sub	edi, ebp
cmp	cl, 78h
jz	loc_40D9F0

loc_40D951:
cmp	cl, 30h
jb	short loc_40D963
cmp	cl, 39h
ja	short loc_40D963
movzx	ecx, cl
sub	ecx, 30h
jmp	short loc_40D98A

loc_40D963:
cmp	cl, 61h
jb	short loc_40D97A
cmp	cl, 66h
ja	short loc_40D97A
movzx	edx, cl
sub	edx, 57h
imul	edx, esi
add	ebx, edx
jmp	short loc_40D98F

loc_40D97A:
cmp	cl, 41h
jb	short loc_40D926
cmp	cl, 46h
ja	short loc_40D926
movzx	ecx, cl
sub	ecx, 37h

loc_40D98A:
imul	ecx, esi
add	ebx, ecx

loc_40D98F:
mov	cl, [eax-1]
dec	eax
shl	esi, 4
cmp	cl, 78h
jnz	short loc_40D951
jmp	short loc_40D9F0

loc_40D99D:		; int
push	3Bh
push	ecx		; char *
call	_strchr
add	esp, 8
test	eax, eax
jz	loc_40D926
cmp	[eax], bl
jz	loc_40D926
mov	cl, [eax-1]
mov	edi, eax
dec	eax
sub	edi, ebp
cmp	cl, 23h
jz	short loc_40D9F0

loc_40D9C5:
cmp	cl, 30h
jb	loc_40D926
cmp	cl, 39h
ja	loc_40D926
movzx	edx, cl
mov	cl, [eax-1]
sub	edx, 30h
imul	edx, esi
dec	eax
lea	esi, [esi+esi*4]
add	ebx, edx
add	esi, esi
cmp	cl, 23h
jnz	short loc_40D9C5

loc_40D9F0:
cmp	[esp+10h+arg_C], 1
jnz	short loc_40DA11
mov	edx, [esp+10h+arg_8]
mov	ecx, [esp+10h+arg_4]
push	ebx
call	sub_40D4A0
add	esp, 4
lea	eax, [edi+ebp+1]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_40DA11:
mov	eax, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_8]
mov	[eax], bl
lea	eax, [edi+ebp+1]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ecx], 1
pop	ebx
retn

loc_40DA2A:
xor	edi, edi
mov	esi, offset off_17ED38C

loc_40DA31:
mov	edx, [esi+4]
mov	eax, [esi]
push	edx		; size_t
push	ebp		; char *
push	eax		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	short loc_40DA61
add	esi, 0Ch
inc	edi
cmp	esi, offset off_17ED3C8
jl	short loc_40DA31
mov	dl, [ebp+0]
mov	eax, [esp+10h+arg_4]
pop	edi
pop	esi
mov	[eax], dl
pop	ebp
mov	eax, ebx
pop	ebx
retn

loc_40DA61:
mov	edx, [esp+10h+arg_4]
lea	eax, [edi+edi*2]
add	eax, eax
mov	cl, byte_17ED394[eax+eax]
add	eax, eax
pop	edi
mov	[edx], cl
mov	eax, dword_17ED390[eax]
mov	ecx, [esp+0Ch+arg_8]
pop	esi
add	eax, ebp
pop	ebp
mov	dword ptr [ecx], 1
pop	ebx
retn
sub_40D8E0 endp

align 10h



sub_40DA90 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, ecx
push	edi
mov	edi, eax
test	esi, esi
jz	short loc_40DB1A
cmp	byte ptr [esi],	0
jz	short loc_40DB1A
cmp	[esp+0Ch+arg_0], 0
push	ebx
jz	short loc_40DB00
lea	esp, [esp+0]

loc_40DAB0:
cmp	byte ptr [edi],	0
jz	short loc_40DAF7
movzx	eax, byte ptr [esi]
cmp	ebp, 1
jnz	short loc_40DAC4
cmp	eax, 80h
jge	short loc_40DACD

loc_40DAC4:		; int
push	eax
call	_tolower
add	esp, 4

loc_40DACD:
mov	ebx, eax
movzx	eax, byte ptr [edi]
cmp	ebp, 1
jnz	short loc_40DADE
cmp	eax, 80h
jge	short loc_40DAE7

loc_40DADE:		; int
push	eax
call	_tolower
add	esp, 4

loc_40DAE7:
cmp	ebx, eax
jnz	short loc_40DAF2
inc	esi
inc	edi
cmp	byte ptr [esi],	0
jnz	short loc_40DAB0

loc_40DAF2:
cmp	byte ptr [edi],	0
jnz	short loc_40DB13

loc_40DAF7:
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
retn
align 10h

loc_40DB00:
mov	al, [edi]
test	al, al
jz	short loc_40DAF7
cmp	[esi], al
jnz	short loc_40DAF2
inc	esi
inc	edi
cmp	byte ptr [esi],	0
jnz	short loc_40DB00
jmp	short loc_40DAF2

loc_40DB13:
pop	ebx
pop	edi
pop	esi
xor	al, al
pop	ebp
retn

loc_40DB1A:
pop	edi
pop	esi
xor	al, al
pop	ebp
retn
sub_40DA90 endp




sub_40DB20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
push	edi
push	offset byte_146D660
xor	esi, esi
mov	edi, ebx
call	sub_40AD80
cmp	byte ptr [esp+18h+arg_8], 0
jz	loc_40DC38
mov	esi, [esp+18h+arg_10]
push	esi
mov	eax, ebp
mov	byte ptr [esp+1Ch+arg_8], 0
call	sub_40D790
mov	ebp, eax
add	esp, 4
test	ebp, ebp
jz	loc_40DCED

loc_40DB66:
cmp	byte ptr [ebp+0], 0
jz	loc_40DCD8
mov	eax, [esp+18h+arg_C]
push	esi
push	0
mov	ecx, ebp
call	sub_40DA90
add	esp, 8
test	al, al
jnz	loc_40DCD8
mov	al, [ebp+0]
mov	byte ptr [esp+18h+arg_0], al
cmp	al, 0Dh
jz	loc_40DC20
cmp	al, 0Ah
jz	loc_40DC20
movzx	eax, al
push	eax		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_40DC20
mov	al, byte ptr [esp+18h+arg_0]
cmp	al, 0Ah
jz	short loc_40DC20
cmp	al, 0Dh
jz	short loc_40DC20
cmp	byte ptr [esp+18h+arg_8], 0
jz	short loc_40DBD1
push	20h
mov	edi, ebx
call	sub_40AFC0
mov	byte ptr [esp+18h+arg_8], 0

loc_40DBD1:
lea	ecx, [esp+18h+var_4]
push	ecx
mov	eax, esi
lea	ecx, [esp+1Ch+var_8] ; int
mov	edi, ebp
mov	byte ptr [esp+1Ch+var_8], 0
mov	byte ptr [esp+1Ch+var_8+1], 0
mov	byte ptr [esp+1Ch+var_8+2], 0
mov	byte ptr [esp+1Ch+var_8+3], 0
call	sub_40D420
mov	ebp, eax
mov	eax, [esp+1Ch+var_4]
add	esp, 4
mov	edi, ebx
cmp	eax, 1
jnz	short loc_40DC13
mov	edx, [esp+18h+var_8]
push	edx
call	sub_40AFC0
jmp	short loc_40DC26

loc_40DC13:
push	eax
lea	eax, [esp+1Ch+var_8]
push	eax
call	sub_40AE70
jmp	short loc_40DC26

loc_40DC20:
inc	ebp
mov	byte ptr [esp+18h+arg_8], 1

loc_40DC26:
test	ebp, ebp
jnz	loc_40DB66
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 8
retn

loc_40DC38:
test	ebp, ebp
jz	loc_40DCEB

loc_40DC40:
cmp	byte ptr [ebp+0], 0
jz	loc_40DCD8
mov	esi, [esp+18h+arg_10]
mov	eax, [esp+18h+arg_C]
push	esi
push	0
mov	ecx, ebp
call	sub_40DA90
add	esp, 8
test	al, al
jnz	short loc_40DCD8
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_8], al
mov	byte ptr [esp+18h+arg_8+1], al
mov	byte ptr [esp+18h+arg_8+2], al
mov	byte ptr [esp+18h+arg_8+3], al
push	ecx
mov	eax, esi
lea	ecx, [esp+1Ch+arg_8] ; int
mov	edi, ebp
call	sub_40D420
mov	edi, [esp+1Ch+arg_0]
mov	ebp, eax
mov	eax, [ebx]
mov	esi, [eax]
add	esi, edi
add	esp, 4
cmp	esi, [eax+4]
jbe	short loc_40DCA4
mov	ecx, [eax+4]
add	ecx, esi
push	ebx
call	sub_40ACF0

loc_40DCA4:
mov	eax, [ebx]
mov	ecx, [eax]
push	edi
lea	edx, [esp+1Ch+arg_8]
push	edx
lea	edx, [ecx+eax+8]
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, [ebx]
mov	[eax], esi
mov	ecx, [ebx]
add	esp, 0Ch
mov	byte ptr [ecx+esi+8], 0
test	ebp, ebp
jnz	loc_40DC40
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 8
retn

loc_40DCD8:
mov	eax, [esp+18h+arg_C]
lea	edx, [eax+1]
nop

loc_40DCE0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40DCE0
sub	eax, edx
add	ebp, eax

loc_40DCEB:
mov	eax, ebp

loc_40DCED:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_40DB20 endp

align 10h


; Attributes: bp-based frame

sub_40DD00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 1Ch
push	ebx
push	esi
mov	ebx, ecx
push	edi
lea	edi, [ebx+34h]
push	offset byte_146D660
xor	esi, esi
mov	byte ptr [ebx+2Ch], 0
mov	dword ptr [ebx+30h], 0
call	sub_40AD80
mov	eax, [ebp+arg_0]
mov	[ebx+40h], esi
mov	[ebx+3Ch], esi
cmp	eax, esi
jz	loc_40DF49
cmp	byte ptr [eax],	0
jz	loc_40DF49
or	ecx, 0FFFFFFFFh
mov	[ebx+8], ecx
mov	[ebx+4], ecx
mov	ecx, [ebp+arg_4]
cmp	ecx, esi
jz	short loc_40DD5F
mov	edx, [ecx]
mov	[ebx+4], edx
mov	ecx, [ecx+4]
mov	[ebx+8], ecx
jmp	short loc_40DD65

loc_40DD5F:
mov	[ebx+4], esi
mov	[ebx+8], esi

loc_40DD65:
mov	edx, [ebx+38h]
mov	ecx, [ebx+4]
mov	edi, [ebp+arg_8]
mov	[esp+28h+var_4], edx
mov	edx, [ebx+8]
mov	[esp+28h+var_8], eax
mov	[esp+28h+var_10], ecx
mov	[esp+28h+var_C], edx
mov	[ebx+4], ecx
mov	[ebx+8], edx
cmp	edi, esi
jnz	short loc_40DDB7
mov	cl, [eax]
test	cl, cl
jz	short loc_40DDB7
cmp	cl, 0EFh
jnz	short loc_40DDB7
mov	cl, [eax+1]
test	cl, cl
jz	short loc_40DDB7
cmp	cl, 0BBh
jnz	short loc_40DDB7
mov	cl, [eax+2]
test	cl, cl
jz	short loc_40DDB7
cmp	cl, 0BFh
jnz	short loc_40DDB7
mov	edi, 1
mov	byte ptr [ebx+44h], 1

loc_40DDB7:
push	edi
call	sub_40D790
add	esp, 4
mov	[ebp+arg_0], eax
cmp	eax, esi
jnz	short loc_40DDF6
cmp	byte ptr [ebx+2Ch], 0
jnz	loc_40DF82
mov	byte ptr [ebx+2Ch], 1
mov	dword ptr [ebx+30h], 0Dh
mov	edx, off_17ED3FC
mov	eax, edx
lea	esi, [eax+1]

loc_40DDE7:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40DDE7
jmp	loc_40DF6C

loc_40DDF3:
mov	eax, [ebp+arg_0]

loc_40DDF6:
cmp	byte ptr [eax],	0
jz	loc_40DF17
push	eax
push	ebx
call	sub_40E000
mov	esi, eax
test	esi, esi
jz	loc_40DF14
mov	eax, [esi]
mov	edx, [ebp+arg_0]
mov	eax, [eax+8]
push	edi
lea	ecx, [esp+2Ch+var_10]
push	ecx
push	edx
mov	ecx, esi
call	eax
mov	[ebp+arg_0], eax
mov	eax, esi
mov	ecx, ebx
call	sub_40B800
test	edi, edi
jnz	loc_40DEFD
mov	edx, [esi]
mov	eax, [edx+34h]
mov	ecx, esi
call	eax
test	eax, eax
jz	loc_40DEFD
mov	edx, [esi]
mov	eax, [edx+34h]
mov	ecx, esi
call	eax
mov	edi, [eax+30h]
add	edi, 8
cmp	byte ptr [edi],	0
mov	[esp+28h+var_14], edi
jnz	short loc_40DE6A
mov	edi, 1
jmp	loc_40DEFD

loc_40DE6A:		; "UTF-8"
mov	esi, offset aUtf8
sub	edi, esi

loc_40DE71:
cmp	byte ptr [esi],	0
jz	short loc_40DEA2
movzx	eax, byte ptr [edi+esi]
push	eax		; int
call	_tolower
mov	[esp+2Ch+var_18], eax
movzx	eax, byte ptr [esi]
push	eax		; int
call	_tolower
add	esp, 8
cmp	[esp+28h+var_18], eax
jnz	short loc_40DE9D
inc	esi
cmp	byte ptr [edi+esi], 0
jnz	short loc_40DE71

loc_40DE9D:
cmp	byte ptr [esi],	0
jnz	short loc_40DEA9

loc_40DEA2:
mov	edi, 1
jmp	short loc_40DEFD

loc_40DEA9:
mov	edi, [esp+28h+var_14]
cmp	byte ptr [edi],	0
mov	esi, offset aUtf8_0 ; "UTF8"
jz	short loc_40DEF8
sub	edi, esi
lea	esp, [esp+0]

loc_40DEC0:
cmp	byte ptr [esi],	0
jz	short loc_40DEF1
movzx	eax, byte ptr [edi+esi]
push	eax		; int
call	_tolower
mov	[esp+2Ch+var_14], eax
movzx	eax, byte ptr [esi]
push	eax		; int
call	_tolower
add	esp, 8
cmp	[esp+28h+var_14], eax
jnz	short loc_40DEEC
inc	esi
cmp	byte ptr [edi+esi], 0
jnz	short loc_40DEC0

loc_40DEEC:
cmp	byte ptr [esi],	0
jnz	short loc_40DEF8

loc_40DEF1:
mov	edi, 1
jmp	short loc_40DEFD

loc_40DEF8:
mov	edi, 2

loc_40DEFD:
mov	eax, [ebp+arg_0]
push	edi
call	sub_40D790
add	esp, 4
mov	[ebp+arg_0], eax
test	eax, eax
jnz	loc_40DDF3

loc_40DF14:
mov	eax, [ebp+arg_0]

loc_40DF17:
cmp	dword ptr [ebx+18h], 0
jnz	short loc_40DF84
cmp	byte ptr [ebx+2Ch], 0
jnz	short loc_40DF82
mov	byte ptr [ebx+2Ch], 1
mov	dword ptr [ebx+30h], 0Dh
mov	edx, off_17ED3FC
mov	eax, edx
lea	esi, [eax+1]
lea	esp, [esp+0]

loc_40DF40:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40DF40
jmp	short loc_40DF6C

loc_40DF49:
cmp	byte ptr [ebx+2Ch], 0
jnz	short loc_40DF82
mov	byte ptr [ebx+2Ch], 1
mov	dword ptr [ebx+30h], 0Dh
mov	edx, off_17ED3FC
mov	eax, edx
lea	esi, [eax+1]

loc_40DF65:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40DF65

loc_40DF6C:
sub	eax, esi
push	edx
mov	esi, eax
lea	edi, [ebx+34h]
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebx+40h], eax
mov	[ebx+3Ch], eax

loc_40DF82:
xor	eax, eax

loc_40DF84:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_40DD00 endp

align 10h



sub_40DF90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	byte ptr [ebx+2Ch], 0
push	ebp
mov	ebp, [esp+8+arg_4]
jnz	short loc_40DFF6
push	esi
mov	[ebx+30h], eax
mov	byte ptr [ebx+2Ch], 1
mov	esi, off_17ED3C8[eax*4]
mov	eax, esi
push	edi
lea	edx, [eax+1]

loc_40DFB5:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40DFB5
sub	eax, edx
push	esi
lea	edi, [ebx+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebx+40h], eax
mov	[ebx+3Ch], eax
test	ebp, ebp
jz	short loc_40DFF4
mov	edi, [esp+10h+arg_8]
test	edi, edi
jz	short loc_40DFF4
mov	eax, [esp+10h+arg_C]
push	eax
push	ebp
call	sub_40D5A0
mov	ecx, [edi]
mov	[ebx+3Ch], ecx
mov	edx, [edi+4]
mov	[ebx+40h], edx

loc_40DFF4:
pop	edi
pop	esi

loc_40DFF6:
pop	ebp
pop	ebx
retn	10h
sub_40DF90 endp

align 10h



sub_40E000 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40E000
push	eax
mov	large fs:0, esp
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	ebp
push	esi
push	edi
call	sub_40D790
mov	esi, eax
add	esp, 4
test	esi, esi
jz	loc_40E221
mov	al, [esi]
test	al, al
jz	loc_40E221
cmp	al, 3Ch
jnz	loc_40E221
mov	eax, [esp+18h+arg_0]
call	sub_40B070
mov	ebp, eax
push	edi
mov	eax, esi
call	sub_40D790
mov	esi, eax
add	esp, 4
test	esi, esi
jz	loc_40E221
cmp	byte ptr [esi],	0
jz	loc_40E221
push	edi
push	1
mov	eax, offset a?xml ; "<?xml"
mov	ecx, esi
call	sub_40DA90
add	esp, 8
test	al, al
jz	short loc_40E09F
push	38h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_40E098
call	sub_40B360
jmp	loc_40E1D3

loc_40E098:
xor	eax, eax
jmp	loc_40E1D3

loc_40E09F:
mov	bl, [esi]
mov	eax, offset asc_154D954	; "<!--"
test	bl, bl
jz	short loc_40E0DF
mov	edx, esi
sub	edx, eax
mov	edi, edi

loc_40E0B0:
mov	cl, [eax]
test	cl, cl
jz	short loc_40E0C7
cmp	[edx+eax], cl
jnz	short loc_40E0C2
inc	eax
cmp	byte ptr [edx+eax], 0
jnz	short loc_40E0B0

loc_40E0C2:
cmp	byte ptr [eax],	0
jnz	short loc_40E0DF

loc_40E0C7:		; size_t
push	2Ch
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_40E098
call	sub_40B210
jmp	loc_40E1D3

loc_40E0DF:		; "<![CDATA["
mov	eax, offset aCdata
test	bl, bl
jz	short loc_40E150
mov	edx, esi
sub	edx, eax
lea	esp, [esp+0]

loc_40E0F0:
mov	cl, [eax]
test	cl, cl
jz	short loc_40E107
cmp	[edx+eax], cl
jnz	short loc_40E102
inc	eax
cmp	byte ptr [edx+eax], 0
jnz	short loc_40E0F0

loc_40E102:
cmp	byte ptr [eax],	0
jnz	short loc_40E150

loc_40E107:		; size_t
push	30h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+arg_4], eax
mov	[esp+18h+var_4], 0
test	eax, eax
jz	short loc_40E13D
push	eax
mov	edx, offset byte_146D660
call	sub_40B280
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	byte ptr [eax+2Ch], 1
jmp	loc_40E1D3

loc_40E13D:
xor	eax, eax
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	byte ptr [eax+2Ch], 1
jmp	loc_40E1D3

loc_40E150:		; "<!"
mov	eax, offset asc_154DB54
test	bl, bl
jz	short loc_40E190
mov	edx, esi
sub	edx, eax
lea	ecx, [ecx+0]

loc_40E160:
mov	cl, [eax]
test	cl, cl
jz	short loc_40E177
cmp	[edx+eax], cl
jnz	short loc_40E172
inc	eax
cmp	byte ptr [edx+eax], 0
jnz	short loc_40E160

loc_40E172:
cmp	byte ptr [eax],	0
jnz	short loc_40E190

loc_40E177:		; size_t
push	2Ch
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	loc_40E098
call	sub_40B470
jmp	short loc_40E1D3

loc_40E190:
mov	al, [esi+1]
call	sub_40D580
test	eax, eax
jnz	short loc_40E1A2
cmp	byte ptr [esi+1], 5Fh
jnz	short loc_40E177

loc_40E1A2:		; size_t
push	50h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+arg_4], eax
mov	[esp+18h+var_4], 1
test	eax, eax
jz	short loc_40E1C9
push	offset byte_146D660
push	eax
call	sub_40BB00
jmp	short loc_40E1CB

loc_40E1C9:
xor	eax, eax

loc_40E1CB:
mov	[esp+18h+var_4], 0FFFFFFFFh

loc_40E1D3:
mov	esi, eax
test	esi, esi
jz	short loc_40E1F6
mov	eax, [esp+18h+arg_0]
mov	[esi+10h], eax
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40E1F6:
test	ebp, ebp
jz	short loc_40E20B
push	0
push	0
push	0
push	ebp
mov	eax, 3
call	sub_40DF90

loc_40E20B:
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_40E221:
mov	ecx, [esp+18h+var_C]
pop	esi
pop	ebp
xor	eax, eax
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	8
sub_40E000 endp

align 10h



; int __stdcall	sub_40E240(void	*, int,	int)
sub_40E240 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset SEH_40E240
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	eax, [esp+1Ch+arg_8]
push	ebx
push	ebp
push	esi
push	edi
mov	ebx, ecx
push	eax
mov	eax, [esp+30h+arg_0]
mov	[esp+30h+var_18], ebx
call	sub_40D790
add	esp, 4
mov	esi, eax
mov	edi, ebx
test	ebx, ebx
jz	short loc_40E294
jmp	short loc_40E280
align 10h

loc_40E280:
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
test	eax, eax
jnz	short loc_40E2F5
mov	edi, [edi+10h]
test	edi, edi
jnz	short loc_40E280

loc_40E294:
mov	[esp+2Ch+var_1C], 0
mov	ebp, [esp+2Ch+var_1C]

loc_40E2A0:
test	esi, esi
jz	loc_40E66D
cmp	byte ptr [esi],	0
jz	loc_40E66D
mov	edi, [esp+2Ch+arg_4]
test	edi, edi
jz	short loc_40E2D1
mov	ecx, [esp+2Ch+arg_8]
push	ecx
push	esi
call	sub_40D5A0
mov	eax, edi
mov	edx, [eax]
mov	[ebx+4], edx
mov	eax, [eax+4]
mov	[ebx+8], eax

loc_40E2D1:
cmp	byte ptr [esi],	3Ch
jz	short loc_40E306
test	ebp, ebp
jz	loc_40E6AD
mov	ecx, [esp+2Ch+arg_8]
push	ecx
push	edi
push	esi
push	ebp
mov	eax, 4
call	sub_40DF90
jmp	loc_40E6AD

loc_40E2F5:
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
mov	ebp, eax
mov	[esp+2Ch+var_1C], ebp
jmp	short loc_40E2A0

loc_40E306:
mov	edx, [esp+2Ch+arg_8]
push	edx
lea	eax, [esi+1]
call	sub_40D790
mov	esi, eax
lea	edi, [ebx+20h]
push	eax
mov	eax, edi
call	sub_40D850
mov	ebx, eax
add	esp, 8
test	ebx, ebx
jz	loc_40E651
cmp	byte ptr [ebx],	0
jz	loc_40E651
push	offset asc_154D940 ; "</"
lea	esi, [esp+30h+arg_0]
call	sub_40AEC0
mov	eax, edi
mov	edi, esi
mov	[esp+2Ch+var_4], 0
call	sub_40AC50
push	offset asc_154D870 ; ">"
call	sub_40AF60
nop

loc_40E360:
cmp	byte ptr [ebx],	0
jz	loc_40E61E
mov	edi, [esp+2Ch+arg_8]
push	edi
mov	eax, ebx
mov	[esp+30h+var_14], ebx
call	sub_40D790
mov	esi, eax
xor	ebx, ebx
add	esp, 4
cmp	esi, ebx
jz	loc_40E601
mov	al, [esi]
test	al, al
jz	loc_40E601
cmp	al, 2Fh
jz	loc_40E459
cmp	al, 3Eh
jz	loc_40E4CE
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+2Ch+var_10], eax
mov	byte ptr [esp+2Ch+var_4], 1
cmp	eax, ebx
jz	short loc_40E3E3
or	edi, 0FFFFFFFFh
mov	[eax+8], edi
mov	[eax+4], edi
mov	ecx, offset unk_1889308
mov	[eax+0Ch], ebx
mov	dword ptr [eax], offset	off_154DA34
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+10h], ebx
mov	[eax+20h], ebx
mov	[eax+1Ch], ebx
mov	ebp, eax
jmp	short loc_40E3E8

loc_40E3E3:
xor	ebp, ebp
or	edi, 0FFFFFFFFh

loc_40E3E8:
mov	byte ptr [esp+2Ch+var_4], 0
test	ebp, ebp
jz	loc_40E578
mov	ecx, [esp+2Ch+arg_8]
mov	edx, [esp+2Ch+arg_4]
mov	eax, [ebp+0]
mov	edi, [esp+2Ch+var_1C]
mov	eax, [eax+8]
push	ecx
push	edx
push	esi
mov	ecx, ebp
mov	[ebp+10h], edi
call	eax
mov	ebx, eax
test	ebx, ebx
jz	loc_40E5D7
cmp	byte ptr [ebx],	0
jz	loc_40E5D7
mov	edi, [esp+2Ch+var_18]
mov	esi, [ebp+14h]
add	edi, 2Ch
add	esi, 8
call	sub_40D340
test	eax, eax
jnz	loc_40E5BB
mov	[ebp+20h], edi
mov	ecx, [edi+1Ch]
mov	[ebp+1Ch], ecx
mov	edx, [edi+1Ch]
mov	[edx+20h], ebp
mov	[edi+1Ch], ebp
mov	ebp, [esp+2Ch+var_1C]
jmp	loc_40E360

loc_40E459:
inc	esi
cmp	byte ptr [esi],	3Eh
jz	short loc_40E49A
cmp	ebp, ebx
jz	short loc_40E475
mov	eax, [esp+2Ch+arg_4]
push	edi
push	eax
push	esi
mov	eax, 8

loc_40E46F:
push	ebp
call	sub_40DF90

loc_40E475:
mov	[esp+2Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+2Ch+arg_0]
cmp	eax, offset unk_1889308
jz	loc_40E6AD
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
jmp	loc_40E6AD

loc_40E49A:
mov	[esp+2Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+2Ch+arg_0]
inc	esi
cmp	eax, offset unk_1889308
jz	short loc_40E4B7
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40E4B7:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
add	esp, 1Ch
retn	0Ch

loc_40E4CE:
mov	ecx, [esp+2Ch+arg_4]
mov	edx, [esp+2Ch+var_18]
push	edi
push	ecx
inc	esi
push	esi
push	edx
call	sub_40E6D0
cmp	eax, ebx
jz	short loc_40E475
cmp	byte ptr [eax],	0
jz	short loc_40E475
mov	esi, [esp+2Ch+arg_0]
lea	ecx, [esi+8]
mov	edx, eax
sub	edx, ecx

loc_40E4F4:
mov	bl, [ecx]
test	bl, bl
jz	short loc_40E50B
cmp	[edx+ecx], bl
jnz	short loc_40E506
inc	ecx
cmp	byte ptr [edx+ecx], 0
jnz	short loc_40E4F4

loc_40E506:
cmp	byte ptr [ecx],	0
jnz	short loc_40E540

loc_40E50B:
mov	ecx, [esi]
lea	edi, [ecx+eax]
mov	[esp+2Ch+var_4], 0FFFFFFFFh
cmp	esi, offset unk_1889308
jz	short loc_40E529
push	esi		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40E529:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
add	esp, 1Ch
retn	0Ch

loc_40E540:
test	ebp, ebp
jz	short loc_40E556
mov	ecx, [esp+2Ch+arg_4]
push	edi
push	ecx
push	eax
push	ebp
mov	eax, 9
call	sub_40DF90

loc_40E556:
mov	[esp+2Ch+var_4], 0FFFFFFFFh
cmp	esi, offset unk_1889308
jz	loc_40E6AD
push	esi		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
jmp	loc_40E6AD

loc_40E578:
mov	eax, [esp+2Ch+var_1C]
test	eax, eax
jz	short loc_40E59A
mov	edx, [esp+2Ch+arg_8]
mov	ecx, [esp+2Ch+arg_4]
push	edx
mov	edx, [esp+30h+var_14]
push	ecx
push	edx
push	eax
mov	eax, 3
call	sub_40DF90

loc_40E59A:
mov	[esp+2Ch+var_4], edi
mov	eax, [esp+2Ch+arg_0]
cmp	eax, offset unk_1889308
jz	loc_40E6AD
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
jmp	loc_40E6AD

loc_40E5BB:
mov	edx, [ebp+18h]
add	edx, 8
push	eax
call	sub_40B170
mov	eax, [ebp+0]
mov	edx, [eax]
push	1
mov	ecx, ebp
call	edx
jmp	loc_40E475

loc_40E5D7:
test	edi, edi
jz	short loc_40E5F1
mov	eax, [esp+2Ch+arg_8]
mov	ecx, [esp+2Ch+arg_4]
push	eax
push	ecx
push	esi
push	edi
mov	eax, 4
call	sub_40DF90

loc_40E5F1:
mov	edx, [ebp+0]
mov	eax, [edx]
push	1
mov	ecx, ebp
call	eax
jmp	loc_40E475

loc_40E601:
cmp	ebp, ebx
jz	loc_40E475
mov	ecx, [esp+2Ch+arg_4]
mov	edx, [esp+2Ch+var_14]
push	edi
push	ecx
push	edx
mov	eax, 7
jmp	loc_40E46F

loc_40E61E:
mov	[esp+2Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+2Ch+arg_0]
cmp	eax, offset unk_1889308
jz	short loc_40E63A
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40E63A:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
add	esp, 1Ch
retn	0Ch

loc_40E651:
test	ebp, ebp
jz	short loc_40E6AD
mov	eax, [esp+2Ch+arg_8]
mov	ecx, [esp+2Ch+arg_4]
push	eax
push	ecx
push	esi
push	ebp
mov	eax, 5
call	sub_40DF90
jmp	short loc_40E6AD

loc_40E66D:
test	ebp, ebp
jz	short loc_40E6AD
cmp	byte ptr [ebp+2Ch], 0
jnz	short loc_40E6AD
mov	byte ptr [ebp+2Ch], 1
mov	dword ptr [ebp+30h], 4
mov	edx, off_17ED3D8
mov	eax, edx
lea	esi, [eax+1]
lea	ecx, [ecx+0]

loc_40E690:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40E690
sub	eax, esi
push	edx
lea	edi, [ebp+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebp+40h], eax
mov	[ebp+3Ch], eax

loc_40E6AD:
mov	ecx, [esp+2Ch+var_C]
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
mov	large fs:0, ecx
add	esp, 1Ch
retn	0Ch
sub_40E240 endp

align 10h



sub_40E6D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_40E6D0
push	eax
mov	large fs:0, esp
push	ebx
mov	ebx, [esp+10h+arg_C]
push	ebp
push	esi
mov	esi, [esp+18h+arg_0]
push	edi
test	esi, esi
jz	short loc_40E70D

loc_40E6F5:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	eax, eax
jnz	loc_40E793
mov	esi, [esi+10h]
test	esi, esi
jnz	short loc_40E6F5

loc_40E70D:
mov	[esp+1Ch+arg_C], 0
mov	edi, [esp+1Ch+arg_C]

loc_40E719:
mov	eax, [esp+1Ch+arg_4]
push	ebx
call	sub_40D790
mov	ebp, eax
add	esp, 4
test	ebp, ebp
jz	loc_40E82C

loc_40E730:
mov	al, [ebp+0]
test	al, al
jz	loc_40E871
cmp	al, 3Ch
jz	short loc_40E7B3
push	30h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+1Ch+arg_4], eax
xor	edi, edi
mov	[esp+1Ch+var_4], edi
cmp	eax, edi
jz	short loc_40E764
push	eax
mov	edx, offset byte_146D660
call	sub_40B280
mov	edi, eax

loc_40E764:
mov	[esp+1Ch+var_4], 0FFFFFFFFh
test	edi, edi
jz	loc_40E888
mov	ecx, [esp+1Ch+arg_8]
mov	eax, [edi]
mov	edx, [eax+8]
push	ebx
push	ecx
push	ebp
mov	ecx, edi
call	edx
mov	ebp, eax
call	sub_40F340
test	al, al
jnz	short loc_40E7A7
mov	eax, edi
jmp	short loc_40E80A

loc_40E793:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
mov	edi, eax
mov	[esp+1Ch+arg_C], edi
jmp	loc_40E719

loc_40E7A7:
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx
jmp	short loc_40E813

loc_40E7B3:		; "</"
mov	eax, offset asc_154D940
mov	ecx, ebp
sub	ecx, eax
lea	esp, [esp+0]

loc_40E7C0:
mov	dl, [eax]
test	dl, dl
jz	loc_40E871
cmp	[ecx+eax], dl
jnz	short loc_40E7D6
inc	eax
cmp	byte ptr [ecx+eax], 0
jnz	short loc_40E7C0

loc_40E7D6:
cmp	byte ptr [eax],	0
jz	loc_40E871
mov	eax, [esp+1Ch+arg_0]
push	ebp
push	eax
mov	edi, ebx
call	sub_40E000
mov	esi, eax
test	esi, esi
jz	loc_40E8CD
mov	eax, [esp+1Ch+arg_8]
mov	edx, [esi]
mov	edx, [edx+8]
push	ebx
push	eax
push	ebp
mov	ecx, esi
call	edx
mov	ebp, eax
mov	eax, esi

loc_40E80A:
mov	ecx, [esp+1Ch+arg_0]
call	sub_40B800

loc_40E813:
push	ebx
mov	eax, ebp
call	sub_40D790
mov	ebp, eax
add	esp, 4
test	ebp, ebp
jnz	loc_40E730
mov	edi, [esp+1Ch+arg_C]

loc_40E82C:
test	edi, edi
jz	short loc_40E871
cmp	byte ptr [edi+2Ch], 0
jnz	short loc_40E871
mov	byte ptr [edi+2Ch], 1
mov	dword ptr [edi+30h], 6
mov	edx, off_17ED3E0
mov	eax, edx
lea	esi, [eax+1]
lea	esp, [esp+0]

loc_40E850:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40E850
sub	eax, esi
push	edx
add	edi, 34h
mov	esi, eax
call	sub_40AD80
mov	eax, [esp+1Ch+arg_C]
or	ecx, 0FFFFFFFFh
mov	[eax+40h], ecx
mov	[eax+3Ch], ecx

loc_40E871:
mov	eax, ebp
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	10h

loc_40E888:
mov	ebx, [esp+1Ch+arg_C]
test	ebx, ebx
jz	short loc_40E8CD
cmp	byte ptr [ebx+2Ch], 0
jnz	short loc_40E8CD
mov	byte ptr [ebx+2Ch], 1
mov	dword ptr [ebx+30h], 3
mov	edx, off_17ED3D4
mov	eax, edx
lea	esi, [eax+1]
lea	esp, [esp+0]

loc_40E8B0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40E8B0
sub	eax, esi
push	edx
lea	edi, [ebx+34h]
mov	esi, eax
call	sub_40AD80
or	eax, 0FFFFFFFFh
mov	[ebx+40h], eax
mov	[ebx+3Ch], eax

loc_40E8CD:
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
xor	eax, eax
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	10h
sub_40E6D0 endp

align 10h



sub_40E8F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebx, ecx
push	esi
push	edi
mov	esi, ebx
test	ebx, ebx
jz	short loc_40E918
lea	ecx, [ecx+0]

loc_40E900:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	eax, eax
jnz	loc_40E9F9
mov	esi, [esi+10h]
test	esi, esi
jnz	short loc_40E900

loc_40E918:
mov	[esp+14h+var_4], 0

loc_40E920:
mov	esi, [esp+14h+arg_8]
mov	eax, [esp+14h+arg_0]
push	esi
call	sub_40D790
mov	edi, [esp+18h+arg_4]
add	esp, 4
mov	ebp, eax
test	edi, edi
jz	short loc_40E94D
push	esi
push	ebp
call	sub_40D5A0
mov	eax, [edi]
mov	[ebx+4], eax
mov	ecx, [edi+4]
mov	[ebx+8], ecx

loc_40E94D:
test	ebp, ebp
jz	loc_40EA15
mov	al, [ebp+0]
test	al, al
jz	loc_40EA15
cmp	al, 3Ch
jnz	loc_40EA15
lea	edi, [ebx+20h]
push	offset byte_146D660
xor	esi, esi
inc	ebp
call	sub_40AD80
test	ebp, ebp
jz	short loc_40E9CC
lea	esp, [esp+0]

loc_40E980:
mov	al, [ebp+0]
test	al, al
jz	short loc_40E9E8
cmp	al, 3Eh
jz	short loc_40E9EE
mov	byte ptr [esp+14h+arg_0], al
mov	eax, [edi]
mov	esi, [eax]
inc	esi
cmp	esi, [eax+4]
jbe	short loc_40E9A4
mov	ecx, [eax+4]
add	ecx, esi
push	edi
call	sub_40ACF0

loc_40E9A4:
mov	eax, [edi]
mov	ecx, [eax]
push	1
lea	edx, [esp+18h+arg_0]
push	edx
lea	edx, [ecx+eax+8]
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi]
mov	[eax], esi
mov	ecx, [edi]
add	esp, 0Ch
add	ebp, 1
mov	byte ptr [ecx+esi+8], 0
jnz	short loc_40E980

loc_40E9CC:
mov	eax, [esp+14h+var_4]
test	eax, eax
jz	short loc_40E9E8
mov	edx, [esp+14h+arg_8]
push	edx
push	0
push	0
push	eax
mov	eax, 0Ah
call	sub_40DF90

loc_40E9E8:
cmp	byte ptr [ebp+0], 3Eh
jnz	short loc_40EA0B

loc_40E9EE:
pop	edi
pop	esi
lea	eax, [ebp+1]
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_40E9F9:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
mov	[esp+14h+var_4], eax
jmp	loc_40E920

loc_40EA0B:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_40EA15:
mov	eax, [esp+14h+var_4]
test	eax, eax
jz	short loc_40EA2B
push	esi
push	edi
push	ebp
push	eax
mov	eax, 0Ah
call	sub_40DF90

loc_40EA2B:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	0Ch
sub_40E8F0 endp

align 10h



sub_40EA40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
push	ebp
mov	ebx, ecx
push	esi
push	edi
mov	esi, ebx
test	ebx, ebx
jz	short loc_40EA68
nop

loc_40EA50:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	eax, eax
jnz	loc_40EAF7
mov	esi, [esi+10h]
test	esi, esi
jnz	short loc_40EA50

loc_40EA68:
mov	[esp+18h+var_8], 0

loc_40EA70:
lea	edi, [ebx+20h]
push	offset byte_146D660
xor	esi, esi
mov	[esp+1Ch+var_4], edi
call	sub_40AD80
mov	ebp, [esp+18h+arg_8]
mov	eax, [esp+18h+arg_0]
push	ebp
call	sub_40D790
mov	edi, [esp+1Ch+arg_4]
add	esp, 4
mov	esi, eax
test	edi, edi
jz	short loc_40EAB0
push	ebp
push	esi
call	sub_40D5A0
mov	eax, [edi]
mov	[ebx+4], eax
mov	ecx, [edi+4]
mov	[ebx+8], ecx

loc_40EAB0:		; "<!--"
mov	eax, offset asc_154D954
test	esi, esi
jz	short loc_40EAD9
cmp	byte ptr [esi],	0
jz	short loc_40EAD9
mov	edx, esi
sub	edx, eax

loc_40EAC2:
mov	cl, [eax]
test	cl, cl
jz	short loc_40EB09
cmp	[edx+eax], cl
jnz	short loc_40EAD4
inc	eax
cmp	byte ptr [edx+eax], 0
jnz	short loc_40EAC2

loc_40EAD4:
cmp	byte ptr [eax],	0
jz	short loc_40EB09

loc_40EAD9:
mov	edx, [esp+18h+var_8]
push	ebp
push	edi
push	esi
push	edx
mov	eax, 0Bh
call	sub_40DF90
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 8
retn	0Ch

loc_40EAF7:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
mov	[esp+18h+var_8], eax
jmp	loc_40EA70

loc_40EB09:		; "<!--"
mov	eax, offset asc_154D954
lea	edx, [eax+1]

loc_40EB11:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40EB11
mov	ecx, [esp+18h+var_4]
push	ebp
push	offset asc_154D95C ; "-->"
sub	eax, edx
push	0
push	ecx
add	eax, esi
push	eax
call	sub_40DB20
add	esp, 14h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_40EA40 endp

align 10h



sub_40EB40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
push	ebp
mov	ebx, ecx
call	sub_40D790
mov	esi, eax
add	esp, 4
test	esi, esi
jz	loc_40ECA9
cmp	byte ptr [esi],	0
jz	loc_40ECA9
push	edi
mov	edi, [esp+10h+arg_4]
test	edi, edi
jz	short loc_40EB86
push	ebp
push	esi
call	sub_40D5A0
mov	eax, edi
mov	ecx, [eax]
mov	[ebx+4], ecx
mov	edx, [eax+4]
mov	[ebx+8], edx

loc_40EB86:
lea	eax, [ebx+14h]
push	esi
call	sub_40D850
add	esp, 4
test	eax, eax
jz	loc_40EC8B
cmp	byte ptr [eax],	0
jz	loc_40EC8B
push	ebp
call	sub_40D790
add	esp, 4
test	eax, eax
jz	loc_40EC6D
mov	cl, [eax]
test	cl, cl
jz	loc_40EC6D
cmp	cl, 3Dh
jnz	loc_40EC6D
push	ebp
inc	eax
call	sub_40D790
mov	esi, eax
add	esp, 4
test	esi, esi
jz	loc_40EC8B
mov	al, [esi]
test	al, al
jz	loc_40EC8B
cmp	al, 27h
jnz	short loc_40EBF1
push	ebp
push	offset asc_154D8A0 ; "'"
jmp	short loc_40EBFB

loc_40EBF1:
cmp	al, 22h
jnz	short loc_40EC14
push	ebp
push	offset asc_154D890 ; "\""

loc_40EBFB:
push	0
add	ebx, 18h
push	ebx
inc	esi
push	esi
call	sub_40DB20
add	esp, 14h
pop	edi
mov	esi, eax
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_40EC14:
lea	eax, [ebx+18h]
push	eax
mov	edx, offset byte_146D660
call	sub_40AF30
jmp	short loc_40EC28

loc_40EC24:
mov	edi, [esp+10h+arg_4]

loc_40EC28:
movzx	eax, byte ptr [esi]
test	al, al
jz	short loc_40EC64
push	eax
call	sub_40D3F0
add	esp, 4
test	al, al
jnz	short loc_40EC64
mov	al, [esi]
cmp	al, 0Ah
jz	short loc_40EC64
cmp	al, 0Dh
jz	short loc_40EC64
cmp	al, 2Fh
jz	short loc_40EC64
cmp	al, 3Eh
jz	short loc_40EC64
cmp	al, 27h
jz	short loc_40EC8B
cmp	al, 22h
jz	short loc_40EC8B
push	eax
lea	edi, [ebx+18h]
call	sub_40AFC0
add	esi, 1
jnz	short loc_40EC24

loc_40EC64:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_40EC6D:
mov	ecx, [ebx+10h]
test	ecx, ecx
jz	short loc_40EC82
push	ebp
push	edi
push	eax
push	ecx
mov	eax, 7
call	sub_40DF90

loc_40EC82:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	0Ch

loc_40EC8B:
mov	eax, [ebx+10h]
test	eax, eax
jz	short loc_40EC82
push	ebp
push	edi
push	esi
push	eax
mov	eax, 7
call	sub_40DF90
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	0Ch

loc_40ECA9:
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	0Ch
sub_40EB40 endp

align 10h



; int __stdcall	sub_40ECC0(int,	void *,	int)
sub_40ECC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset SEH_40ECC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	ebx, ecx
lea	edi, [ebx+20h]
push	offset byte_146D660
xor	esi, esi
mov	[esp+24h+var_10], edi
call	sub_40AD80
mov	esi, ebx
test	ebx, ebx
jz	short loc_40ED0D

loc_40ECF5:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	eax, eax
jnz	loc_40ED9B
mov	esi, [esi+10h]
test	esi, esi
jnz	short loc_40ECF5

loc_40ED0D:
xor	esi, esi

loc_40ED0F:
mov	edi, [esp+20h+arg_4]
mov	ebp, [esp+20h+arg_0]
test	edi, edi
jz	short loc_40ED31
mov	eax, [esp+20h+arg_8]
push	eax
push	ebp
call	sub_40D5A0
mov	ecx, [edi]
mov	[ebx+4], ecx
mov	edx, [edi+4]
mov	[ebx+8], edx

loc_40ED31:
cmp	byte ptr [ebx+2Ch], 0
jnz	short loc_40EDAB
mov	eax, offset aCdata ; "<![CDATA["
test	ebp, ebp
jz	short loc_40ED67
cmp	byte ptr [ebp+0], 0
jz	short loc_40ED67
mov	edx, ebp
sub	edx, eax
lea	ebx, [ebx+0]

loc_40ED50:
mov	cl, [eax]
test	cl, cl
jz	short loc_40EDAB
cmp	[edx+eax], cl
jnz	short loc_40ED62
inc	eax
cmp	byte ptr [edx+eax], 0
jnz	short loc_40ED50

loc_40ED62:
cmp	byte ptr [eax],	0
jz	short loc_40EDAB

loc_40ED67:
mov	eax, [esp+20h+arg_8]
mov	ecx, [esp+20h+var_10]
push	eax
push	offset asc_154D93C ; "<"
push	1
push	ecx
push	ebp
call	sub_40DB20
add	esp, 14h
test	eax, eax
jz	short loc_40EDEB
pop	edi
pop	esi
pop	ebp
dec	eax
pop	ebx
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	0Ch

loc_40ED9B:
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
mov	esi, eax
jmp	loc_40ED0F

loc_40EDAB:
mov	byte ptr [ebx+2Ch], 1
mov	eax, offset aCdata ; "<![CDATA["
test	ebp, ebp
jz	short loc_40EDD9
cmp	byte ptr [ebp+0], 0
jz	short loc_40EDD9
mov	edx, ebp
sub	edx, eax

loc_40EDC2:
mov	cl, [eax]
test	cl, cl
jz	short loc_40EE02
cmp	[edx+eax], cl
jnz	short loc_40EDD4
inc	eax
cmp	byte ptr [edx+eax], 0
jnz	short loc_40EDC2

loc_40EDD4:
cmp	byte ptr [eax],	0
jz	short loc_40EE02

loc_40EDD9:
mov	edx, [esp+20h+arg_8]
push	edx
push	edi
push	ebp
push	esi
mov	eax, 0Fh
call	sub_40DF90

loc_40EDEB:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
add	esp, 10h
retn	0Ch

loc_40EE02:		; "<![CDATA["
mov	eax, offset aCdata
lea	edx, [eax+1]
lea	ebx, [ebx+0]

loc_40EE10:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_40EE10
sub	eax, edx
add	ebp, eax
jz	short loc_40EE91
mov	edi, ebp
sub	edi, offset asc_154D950	; "]]>"

loc_40EE25:
mov	dl, [ebp+0]
test	dl, dl
jz	short loc_40EE91
mov	eax, offset asc_154D950	; "]]>"

loc_40EE31:
mov	cl, [eax]
test	cl, cl
jz	short loc_40EE91
cmp	[edi+eax], cl
jnz	short loc_40EE43
inc	eax
cmp	byte ptr [edi+eax], 0
jnz	short loc_40EE31

loc_40EE43:
cmp	byte ptr [eax],	0
jz	short loc_40EE91
mov	ebx, [esp+20h+var_10]
mov	eax, [ebx]
mov	byte ptr [esp+20h+arg_4], dl
mov	ecx, [eax]
lea	esi, [ecx+1]
cmp	esi, [eax+4]
jbe	short loc_40EE68
mov	eax, [eax+4]
lea	ecx, [eax+esi]
push	ebx
call	sub_40ACF0

loc_40EE68:
mov	eax, [ebx]
mov	edx, [eax]
push	1
lea	ecx, [esp+24h+arg_4]
push	ecx
lea	eax, [eax+edx+8]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [ebx]
mov	[ecx], esi
mov	edx, [ebx]
inc	ebp
add	esp, 0Ch
inc	edi
mov	byte ptr [esi+edx+8], 0
test	ebp, ebp
jnz	short loc_40EE25

loc_40EE91:
mov	[esp+20h+arg_4], offset	unk_1889308
mov	eax, [esp+20h+arg_8]
push	eax
push	offset asc_154D950 ; "]]>"
push	0
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	ebp
mov	[esp+34h+var_4], 0
call	sub_40DB20
mov	esi, eax
mov	[esp+34h+var_4], 0FFFFFFFFh
mov	eax, [esp+34h+arg_4]
add	esp, 14h
cmp	eax, offset unk_1889308
jz	short loc_40EED9
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40EED9:
mov	ecx, [esp+20h+var_C]
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	0Ch
sub_40ECC0 endp




sub_40EEF0 proc	near

var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset SEH_40EEF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
mov	eax, [esp+88h+arg_8]
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
push	eax
mov	eax, [esp+9Ch+arg_0]
mov	[esp+9Ch+var_80], esi
call	sub_40D790
xor	ebx, ebx
add	esp, 4
mov	ebp, eax
mov	edi, esi
cmp	esi, ebx
jz	short loc_40EF4B

loc_40EF33:
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
test	eax, eax
jnz	loc_40F0ED
mov	edi, [edi+10h]
cmp	edi, ebx
jnz	short loc_40EF33

loc_40EF4B:
mov	[esp+98h+var_84], ebx
mov	edi, ebx

loc_40EF51:
cmp	ebp, ebx
jz	loc_40F2E1
cmp	[ebp+0], bl
jz	loc_40F2E1
mov	ecx, [esp+98h+arg_8]
push	ecx
push	1
mov	eax, offset a?xml ; "<?xml"
mov	ecx, ebp
call	sub_40DA90
add	esp, 8
test	al, al
jz	loc_40F2E1
mov	edi, [esp+98h+arg_4]
cmp	edi, ebx
jz	short loc_40EFA7
mov	edx, [esp+98h+arg_8]
push	edx
push	ebp
call	sub_40D5A0
mov	eax, [edi]
mov	[esi+4], eax
mov	ecx, [edi+4]
mov	[esi+8], ecx

loc_40EFA7:
lea	edi, [esi+2Ch]
push	offset byte_146D660
xor	esi, esi
add	ebp, 5
mov	[esp+9Ch+var_84], edi
call	sub_40AD80
mov	edi, [esp+98h+var_80]
add	edi, 30h
push	offset byte_146D660
mov	[esp+9Ch+var_7C], edi
call	sub_40AD80
mov	edi, [esp+98h+var_80]
add	edi, 34h
push	offset byte_146D660
mov	[esp+9Ch+var_80], edi
call	sub_40AD80
cmp	ebp, ebx
jz	loc_40F321
nop

loc_40EFF0:
mov	al, [ebp+0]
cmp	al, bl
jz	loc_40F321
cmp	al, 3Eh
jz	loc_40F2DC
mov	esi, [esp+98h+arg_8]
push	esi
mov	eax, ebp
call	sub_40D790
mov	ebp, eax
push	esi
push	1
mov	eax, offset aVersion_0 ; "version"
mov	ecx, ebp
call	sub_40DA90
add	esp, 0Ch
test	al, al
jz	loc_40F101
or	eax, 0FFFFFFFFh
mov	[esp+98h+var_70], eax
mov	[esp+98h+var_74], eax
mov	eax, offset unk_1889308
mov	[esp+98h+var_78], offset off_1437D84
mov	[esp+98h+var_6C], ebx
mov	[esp+98h+var_78], offset off_154DA34
mov	[esp+98h+var_64], eax
mov	[esp+98h+var_60], eax
mov	[esp+98h+var_68], ebx
mov	[esp+98h+var_58], ebx
mov	[esp+98h+var_5C], ebx
mov	edx, [esp+98h+arg_4]
push	esi
push	edx
push	ebp
lea	ecx, [esp+0A4h+var_78]
mov	[esp+0A4h+var_4], ebx
call	sub_40EB40
mov	edi, [esp+98h+var_60]
add	edi, 8
mov	ebp, eax
mov	eax, edi
lea	esi, [eax+1]
mov	edi, edi

loc_40F090:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40F090
sub	eax, esi
push	edi
mov	edi, [esp+9Ch+var_84]
mov	esi, eax
call	sub_40AD80
mov	[esp+98h+var_4], 0FFFFFFFFh
mov	eax, [esp+98h+var_60]
cmp	eax, offset unk_1889308
jz	short loc_40F0C4
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40F0C4:
mov	eax, [esp+98h+var_64]
cmp	eax, offset unk_1889308
jz	short loc_40F0D8
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40F0D8:
mov	[esp+98h+var_78], offset off_1437D84

loc_40F0E0:
cmp	ebp, ebx
jnz	loc_40EFF0
jmp	loc_40F321

loc_40F0ED:
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
mov	edi, eax
mov	[esp+98h+var_84], edi
jmp	loc_40EF51

loc_40F101:
push	esi
push	1
mov	eax, offset aEncoding_1	; "encoding"
mov	ecx, ebp
call	sub_40DA90
add	esp, 8
test	al, al
jz	loc_40F1D5
or	eax, 0FFFFFFFFh
mov	[esp+98h+var_4C], eax
mov	[esp+98h+var_50], eax
mov	eax, offset unk_1889308
mov	[esp+98h+var_54], offset off_1437D84
mov	[esp+98h+var_48], ebx
mov	[esp+98h+var_54], offset off_154DA34
mov	[esp+98h+var_40], eax
mov	[esp+98h+var_3C], eax
mov	[esp+98h+var_44], ebx
mov	[esp+98h+var_34], ebx
mov	[esp+98h+var_38], ebx
mov	eax, [esp+98h+arg_4]
push	esi
push	eax
push	ebp
lea	ecx, [esp+0A4h+var_54]
mov	[esp+0A4h+var_4], 1
call	sub_40EB40
mov	edi, [esp+98h+var_3C]
add	edi, 8
mov	ebp, eax
mov	eax, edi
lea	esi, [eax+1]
nop

loc_40F180:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40F180
sub	eax, esi
push	edi
mov	edi, [esp+9Ch+var_7C]
mov	esi, eax
call	sub_40AD80
mov	[esp+98h+var_4], 0FFFFFFFFh
mov	eax, [esp+98h+var_3C]
cmp	eax, offset unk_1889308
jz	short loc_40F1B4
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40F1B4:
mov	eax, [esp+98h+var_40]
cmp	eax, offset unk_1889308
jz	short loc_40F1C8
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_40F1C8:
mov	[esp+98h+var_54], offset off_1437D84
jmp	loc_40F0E0

loc_40F1D5:
push	esi
push	1
mov	eax, offset aStandalone_1 ; "standalone"
mov	ecx, ebp
call	sub_40DA90
add	esp, 8
test	al, al
jz	loc_40F28E
or	eax, 0FFFFFFFFh
mov	[esp+98h+var_28], eax
mov	[esp+98h+var_2C], eax
mov	eax, offset unk_1889308
mov	[esp+98h+var_30], offset off_1437D84
mov	[esp+98h+var_24], ebx
mov	[esp+98h+var_30], offset off_154DA34
mov	[esp+98h+var_1C], eax
mov	[esp+98h+var_18], eax
mov	[esp+98h+var_20], ebx
mov	[esp+98h+var_10], ebx
mov	[esp+98h+var_14], ebx
mov	ecx, [esp+98h+arg_4]
push	esi
push	ecx
push	ebp
lea	ecx, [esp+0A4h+var_30]
mov	[esp+0A4h+var_4], 2
call	sub_40EB40
mov	edi, [esp+98h+var_18]
add	edi, 8
mov	ebp, eax
mov	eax, edi
lea	esi, [eax+1]
nop

loc_40F260:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40F260
sub	eax, esi
push	edi
mov	edi, [esp+9Ch+var_80]
mov	esi, eax
call	sub_40AD80
lea	esi, [esp+98h+var_30]
mov	[esp+98h+var_4], 0FFFFFFFFh
call	sub_40D310
jmp	loc_40F0E0

loc_40F28E:
cmp	ebp, ebx
jz	loc_40F321

loc_40F296:
mov	al, [ebp+0]
mov	[esp+98h+var_85], al
cmp	al, bl
jz	loc_40F0E0
cmp	al, 3Eh
jz	loc_40F0E0
movzx	edx, al
push	edx		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	loc_40F0E0
mov	al, [esp+98h+var_85]
cmp	al, 0Ah
jz	loc_40F0E0
cmp	al, 0Dh
jz	loc_40F0E0
add	ebp, 1
jnz	short loc_40F296
jmp	short loc_40F321

loc_40F2DC:
lea	eax, [ebp+1]
jmp	short loc_40F323

loc_40F2E1:
cmp	edi, ebx
jz	short loc_40F321
cmp	[edi+2Ch], bl
jnz	short loc_40F321
mov	byte ptr [edi+2Ch], 1
mov	dword ptr [edi+30h], 0Ch
mov	edx, off_17ED3F8
mov	eax, edx
lea	esi, [eax+1]

loc_40F300:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_40F300
sub	eax, esi
push	edx
add	edi, 34h
mov	esi, eax
call	sub_40AD80
mov	eax, [esp+98h+var_84]
or	ecx, 0FFFFFFFFh
mov	[eax+40h], ecx
mov	[eax+3Ch], ecx

loc_40F321:
xor	eax, eax

loc_40F323:
mov	ecx, [esp+98h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 88h
retn	0Ch
sub_40EEF0 endp

align 10h



sub_40F340 proc	near
mov	eax, [edi+20h]
push	ebx
push	esi
xor	esi, esi
cmp	[eax], esi
jbe	short loc_40F376
jmp	short loc_40F350
align 10h

loc_40F350:
mov	bl, [eax+esi+8]
movzx	eax, bl
push	eax		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_40F36E
cmp	bl, 0Ah
jz	short loc_40F36E
cmp	bl, 0Dh
jnz	short loc_40F37B

loc_40F36E:
mov	eax, [edi+20h]
inc	esi
cmp	esi, [eax]
jb	short loc_40F350

loc_40F376:
pop	esi
mov	al, 1
pop	ebx
retn

loc_40F37B:
pop	esi
xor	al, al
pop	ebx
retn
sub_40F340 endp




sub_40F380 proc	near
mov	eax, dword_1968D2C
push	ebx
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_40F3C6
push	esi
push	edi
mov	edi, edi

loc_40F390:
mov	ecx, [eax-4]
mov	edi, [eax]
lea	esi, [eax-4]
push	offset sub_40AC10
push	ecx
push	1Ch
push	eax
call	$LN21_0
cmp	esi, ebx
jz	short loc_40F3BE
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_40F3BE:
mov	eax, edi
cmp	edi, ebx
jnz	short loc_40F390
pop	edi
pop	esi

loc_40F3C6:
mov	dword_1968D30, ebx
mov	dword_1968D2C, ebx
pop	ebx
retn
sub_40F380 endp

align 10h



sub_40F3E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_8]
mov	eax, ebx
imul	eax, edi
add	esi, eax
sub	edi, 1
js	short loc_40F40C
push	ebp
mov	ebp, [esp+10h+arg_C]

loc_40F400:
sub	esi, ebx
mov	ecx, esi
call	ebp
sub	edi, 1
jns	short loc_40F400
pop	ebp

loc_40F40C:
pop	edi
pop	esi
pop	ebx
retn	10h
sub_40F3E0 endp

align 10h



sub_40F420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ecx
fld	dword ptr [esi+4]
push	ecx		; float
fld	dword ptr [esi]
fld	dword ptr [esi+8]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fstp	[esp+8+var_8]
call	sub_40F5B0
fstp	[esp+8+var_4]
add	esp, 4
fld	flt_17EC798
fld	[esp+4+var_4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_40F48B
fld	st
fld1
fdivrp	st(1), st
fstp	[esp+4+var_4]
fld	dword ptr [esi]
fld	[esp+4+var_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fld	st
fmul	dword ptr [esi+4]
fstp	dword ptr [esi+4]
fmul	dword ptr [esi+8]
fstp	dword ptr [esi+8]
pop	ecx
retn

loc_40F48B:
fstp	st
fldz
fst	dword ptr [esi]
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_40F420 endp

align 10h



sub_40F4A0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [edx]
fsub	dword ptr [ecx]
fstp	dword ptr [eax]
fld	dword ptr [edx+4]
fsub	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [edx+8]
fsub	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
retn	4
sub_40F4A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_40F4C0(float)
sub_40F4C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_40F4C0 endp

align 10h



; int __cdecl sub_40F4E0(float)
sub_40F4E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_40F4C0
add	esp, 4
retn
sub_40F4E0 endp

align 10h



sub_40F500 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ecx
fld	dword ptr [eax+4]
push	ecx		; float
fld	dword ptr [eax]
fld	dword ptr [eax+8]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fstp	[esp+8+var_8]
call	sub_40F5B0
add	esp, 8
retn
sub_40F500 endp

align 10h



sub_40F530 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [ecx+8]
fmul	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fmul	dword ptr [edx+8]
fsubp	st(1), st
fstp	dword ptr [eax]
fld	dword ptr [edx+8]
fmul	dword ptr [ecx]
fld	dword ptr [edx]
fmul	dword ptr [ecx+8]
fsubp	st(1), st
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+4]
fmul	dword ptr [edx]
fld	dword ptr [ecx]
fmul	dword ptr [edx+4]
fsubp	st(1), st
fstp	dword ptr [eax+8]
retn	4
sub_40F530 endp

align 10h



; int __stdcall	sub_40F570(float, float, float)
sub_40F570 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fld	[esp+arg_0]
mov	eax, ecx
fstp	dword ptr [eax]
fld	[esp+arg_4]
fstp	dword ptr [eax+4]
fld	[esp+arg_8]
fstp	dword ptr [eax+8]
retn	0Ch
sub_40F570 endp

align 10h



; int __cdecl sub_40F590(float)
sub_40F590 proc	near

arg_0= dword ptr  4

fld	dword ptr [ecx]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fmul	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
retn
sub_40F590 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_40F5B0(float)
sub_40F5B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
call	__CIsqrt
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_40F5B0 endp

align 10h



; int __cdecl sub_40F5D0(float)
sub_40F5D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_40F5B0
add	esp, 4
retn
sub_40F5D0 endp

align 10h



sub_40F5F0 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [eax+4]
fld	dword ptr [eax]
fld	dword ptr [eax+8]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_40F5F0 endp

align 10h



sub_40F620 proc	near
fld	dword ptr [edx]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40F651
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40F651
fld	dword ptr [edx+8]
fld	dword ptr [ecx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40F651
mov	eax, 1
retn

loc_40F651:
xor	eax, eax
retn
sub_40F620 endp

align 10h



sub_40F660 proc	near

arg_C= dword ptr  10h

mov	ecx, dword_1889A64
mov	eax, [esp+arg_C]
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
retn
sub_40F660 endp

align 10h

loc_40F680:
fldz
retn
align 10h



sub_40F690 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, [eax+188h]
mov	eax, [esi+8]
push	1
lea	ecx, [esp+0Ch+var_4]
push	ecx
push	4
push	edx
push	esi
mov	[esp+1Ch+var_4], 4
call	eax
add	esp, 14h
add	[esi+4], eax
pop	esi
pop	ecx
retn
sub_40F690 endp

align 10h



sub_40F6C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [eax+188h]
mov	eax, [esi+8]
push	1
lea	ecx, [esp+10h+var_8]
push	ecx
push	4
lea	edx, [esp+18h+var_4]
push	edx
push	esi
mov	[esp+20h+var_8], 4
call	eax
mov	ecx, [esp+20h+var_4]
mov	edx, [esp+20h+arg_0]
add	esp, 14h
add	[esi+4], eax
mov	[edx], ecx
pop	esi
add	esp, 8
retn
sub_40F6C0 endp

align 10h



sub_40F700 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+4]
xor	ecx, ecx
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]
fstp	dword ptr [eax+10h]
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	[eax+2Ch], cl
mov	[eax+2Dh], cl
mov	[eax+2Eh], cl
retn
sub_40F700 endp




; int __cdecl sub_40F740(float)
sub_40F740 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fsincos
fstp	[esp+8+var_4]
fstp	[esp+8+var_8]
fld	[esp+8+var_8]
fstp	dword ptr [eax]
fld	[esp+8+var_4]
fstp	dword ptr [ecx]
add	esp, 8
retn
sub_40F740 endp

align 10h



; int __stdcall	sub_40F760(float)
sub_40F760 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fstp	dword ptr [eax]
retn	4
sub_40F760 endp

align 10h



sub_40F770 proc	near
fld	dword ptr [eax]
retn
sub_40F770 endp

align 10h



sub_40F780 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [ecx+4]
fmul	dword ptr [eax+4]
fld	dword ptr [ecx]
fmul	dword ptr [eax]
faddp	st(1), st
fld	dword ptr [ecx+8]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [ecx+0Ch]
fmul	dword ptr [eax+0Ch]
faddp	st(1), st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_40F780 endp

align 10h



; int __fastcall sub_40F7B0(void *Src, void *Dst)
sub_40F7B0 proc	near

Dst= dword ptr	4

mov	edx, [esp+Dst]
push	eax		; MaxCount
push	ecx		; Src
push	eax		; DstSize
push	edx		; Dst
call	_memcpy_s
add	esp, 10h
retn
sub_40F7B0 endp

align 10h



; int __fastcall sub_40F7D0(void *Src, void *Dst, rsize_t DstSize)
sub_40F7D0 proc	near

Dst= dword ptr	4
DstSize= dword ptr  8

mov	edx, [esp+DstSize]
push	eax		; MaxCount
mov	eax, [esp+4+Dst]
push	ecx		; Src
push	edx		; DstSize
push	eax		; Dst
call	_memcpy_s
add	esp, 10h
retn
sub_40F7D0 endp

align 10h



sub_40F7F0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [ecx]
fadd	dword ptr [edx]
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fadd	dword ptr [edx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fadd	dword ptr [edx+8]
fstp	dword ptr [eax+8]
retn	4
sub_40F7F0 endp

align 10h


; Attributes: thunk

sub_40F810 proc	near
jmp	sub_11CE380
sub_40F810 endp

align 10h



; int __stdcall	sub_40F820(float)
sub_40F820 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	ecx, [ecx+0Ch]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
fld	dword ptr [eax]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	st
fmul	dword ptr [eax+4]
fstp	dword ptr [eax+4]
fld	dword ptr [eax+8]
fmul	st, st(1)
fstp	dword ptr [eax+8]
fmul	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_40F820 endp

align 10h



sub_40F860 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, [edx]
mov	[eax], esi
mov	esi, [edx+4]
mov	[eax+4], esi
mov	esi, [edx+8]
mov	edx, [edx+0Ch]
mov	[eax+8], esi
mov	[eax+0Ch], edx
fld	dword ptr [eax]
fadd	dword ptr [ecx]
pop	esi
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fadd	dword ptr [eax+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fadd	dword ptr [eax+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fadd	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_40F860 endp




sub_40F8A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
fld	dword ptr [ecx]
mov	edx, [esp+arg_4]
fld	dword ptr [edx]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_40F8B8
xor	al, al
retn

loc_40F8B8:
add	edx, 4
push	edx
add	ecx, 4
call	sub_40F9A0
retn
sub_40F8A0 endp

align 10h



sub_40F8D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
fld	dword ptr [ecx]
mov	edx, [esp+arg_4]
fld	dword ptr [edx]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_40F8E8
xor	al, al
retn

loc_40F8E8:
mov	al, [ecx+4]
cmp	al, [edx+4]
setz	al
retn
sub_40F8D0 endp

align 10h



; int __stdcall	sub_40F900(float)
sub_40F900 proc	near

arg_0= dword ptr  4

fld	dword ptr [eax]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [eax+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
retn	4
sub_40F900 endp

align 10h



; int __stdcall	sub_40F920(float)
sub_40F920 proc	near

arg_0= dword ptr  4

fld	dword ptr [ecx]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fmul	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
retn	4
sub_40F920 endp

align 10h



sub_40F940 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]
fstp	dword ptr [eax+10h]
retn
sub_40F940 endp

align 10h



sub_40F960 proc	near

arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	cl, byte_18892FF
mov	[eax], cl
retn
sub_40F960 endp

align 10h



sub_40F970 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
fld	dword ptr [edx]
mov	ecx, [esp+arg_4]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_40F988
xor	al, al
retn

loc_40F988:
add	ecx, 4
add	edx, 4
jmp	sub_421530
sub_40F970 endp

align 10h



sub_40F9A0 proc	near

arg_0= dword ptr  4

fld	dword ptr [ecx]
mov	edx, [esp+arg_0]
fld	dword ptr [edx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40F9E6
fld	dword ptr [ecx+4]
fld	dword ptr [edx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40F9E6
fld	dword ptr [ecx+8]
fld	dword ptr [edx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40F9E6
fld	dword ptr [ecx+0Ch]
fld	dword ptr [edx+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40F9E6
mov	eax, 1
retn	4

loc_40F9E6:
xor	eax, eax
retn	4
sub_40F9A0 endp

align 10h



sub_40F9F0 proc	near

arg_C= dword ptr  10h

mov	ecx, dword_17EE148
mov	eax, [esp+arg_C]
mov	[eax], ecx
mov	edx, dword_17EE14C
mov	[eax+4], edx
mov	ecx, dword_17EE150
mov	[eax+8], ecx
mov	edx, dword_17EE154
mov	[eax+0Ch], edx
retn
sub_40F9F0 endp

align 10h



sub_40FA20 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, [edi+34h]
test	esi, esi
jz	short loc_40FA42
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_40FA42
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_40FA42:
mov	dword ptr [edi], offset	off_1551878
mov	esi, [edi+30h]
test	esi, esi
jz	short loc_40FA62
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_40FA62
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_40FA62:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	esi
pop	ebx
retn
sub_40FA20 endp

align 10h



sub_40FA80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
movzx	eax, word ptr [esi+8]
push	edi
movzx	edi, word ptr [esi+0Ah]
cmp	edi, eax
jb	short loc_40FA9E
movzx	ecx, word ptr [esi+0Eh]
add	ecx, edi
push	ecx
mov	ecx, esi
call	sub_40FAC0

loc_40FA9E:
mov	edx, [esp+8+arg_0]
push	edx
push	edi
mov	ecx, esi
call	sub_40FBD0
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_40FA80 endp

align 10h



sub_40FAC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [esp+4+arg_0]
push	esi
mov	esi, ecx
movzx	eax, word ptr [esi+8]
cmp	edx, eax
jz	loc_40FBCA
movzx	eax, word ptr [esi+0Ah]
movzx	ecx, ax
push	edi
cmp	edx, ecx
jnb	short loc_40FB19
movzx	ecx, dx
cmp	dx, ax
jnb	short loc_40FB15
jmp	short loc_40FAF0
align 10h

loc_40FAF0:
mov	edi, [esi+4]
movzx	eax, cx
cmp	dword ptr [edi+eax*4], 0
lea	eax, [edi+eax*4]
jz	short loc_40FB0E
mov	dword ptr [eax], 0
mov	eax, 0FFFFh
add	[esi+0Ch], ax

loc_40FB0E:
inc	ecx
cmp	cx, [esi+0Ah]
jb	short loc_40FAF0

loc_40FB15:
mov	[esi+0Ah], dx

loc_40FB19:
mov	edi, [esi+4]
mov	[esi+8], dx
test	edx, edx
jbe	loc_40FBAB
movzx	eax, dx
add	eax, eax
add	eax, eax
jnz	short loc_40FB36
mov	eax, 1

loc_40FB36:
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	0
push	0FFFFFFFFh
push	0
push	0
mov	[esp+1Ch+var_4], eax
push	5
lea	eax, [esp+20h+arg_0]
push	eax
mov	[esp+24h+arg_0], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+24h+var_4]
push	eax
call	edx
mov	[esi+4], eax
xor	eax, eax
xor	ecx, ecx
cmp	ax, [esi+0Ah]
jnb	short loc_40FB8B
push	ebx

loc_40FB73:
mov	edx, [esi+4]
movzx	eax, cx
add	eax, eax
add	eax, eax
mov	ebx, [eax+edi]
inc	ecx
mov	[eax+edx], ebx
cmp	cx, [esi+0Ah]
jb	short loc_40FB73
pop	ebx

loc_40FB8B:
movzx	eax, word ptr [esi+0Ah]
cmp	ax, [esi+8]
jnb	short loc_40FBB2

loc_40FB95:
mov	edx, [esi+4]
movzx	ecx, ax
inc	eax
mov	dword ptr [edx+ecx*4], 0
cmp	ax, [esi+8]
jb	short loc_40FB95
jmp	short loc_40FBB2

loc_40FBAB:
mov	dword ptr [esi+4], 0

loc_40FBB2:
test	edi, edi
jz	short loc_40FBC9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	edi
call	eax

loc_40FBC9:
pop	edi

loc_40FBCA:
pop	esi
pop	ecx
retn	4
sub_40FAC0 endp

align 10h



sub_40FBD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

movzx	edx, word ptr [ecx+0Ah]
mov	eax, [esp+arg_0]
cmp	eax, edx
jb	short loc_40FBFB
lea	edx, [eax+1]
mov	[ecx+0Ah], dx
mov	edx, [esp+arg_4]
cmp	dword ptr [edx], 0
jz	short loc_40FC2E
inc	word ptr [ecx+0Ch]
mov	ecx, [ecx+4]
mov	edx, [edx]
mov	[ecx+eax*4], edx
retn	8

loc_40FBFB:
mov	edx, [esp+arg_4]
cmp	dword ptr [edx], 0
push	esi
mov	esi, [ecx+4]
jz	short loc_40FC1E
cmp	dword ptr [esi+eax*4], 0
jnz	short loc_40FC2D
inc	word ptr [ecx+0Ch]
mov	ecx, [ecx+4]
mov	edx, [edx]
pop	esi
mov	[ecx+eax*4], edx
retn	8

loc_40FC1E:
cmp	dword ptr [esi+eax*4], 0
jz	short loc_40FC2D
mov	esi, 0FFFFh
add	[ecx+0Ch], si

loc_40FC2D:
pop	esi

loc_40FC2E:
mov	ecx, [ecx+4]
mov	edx, [edx]
mov	[ecx+eax*4], edx
retn	8
sub_40FBD0 endp

align 10h



sub_40FC40 proc	near
mov	eax, offset off_17EDD28
retn
sub_40FC40 endp

align 10h



; int __stdcall	sub_40FC50(float)
sub_40FC50 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
inc	dword ptr [eax+54h]
fstp	dword ptr [eax+50h]
retn	4
sub_40FC50 endp

align 10h



; int __stdcall	sub_40FC60(float)
sub_40FC60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

movzx	ecx, word ptr [esi+8]
mov	al, cl
shr	al, 3
test	al, 1
jz	short loc_40FCE5
fld	dword ptr [esi+20h]
fld	[esp+arg_0]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_40FC8B
mov	dl, cl
shr	dl, 7
test	dl, 1
jz	short loc_40FCE3

loc_40FC8B:
shr	cl, 6
test	cl, 1
jz	short loc_40FCD3
mov	eax, [esi]
mov	edx, [eax+60h]
push	ecx
mov	ecx, esi
fstp	[esp+4+var_4]
call	edx
fstp	[esp+arg_0]
fld	dword ptr [esi+28h]
fld	[esp+arg_0]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_40FCC2
mov	al, [esi+8]
shr	al, 7
test	al, 1
jz	short loc_40FCE3

loc_40FCC2:
mov	ecx, 0FF7Fh
fstp	dword ptr [esi+28h]
and	[esi+8], cx
xor	al, al
retn	4

loc_40FCD3:
mov	ecx, 0FF7Fh
fstp	st
and	[esi+8], cx
xor	al, al
retn	4

loc_40FCE3:
fstp	st

loc_40FCE5:
mov	al, 1
retn	4
sub_40FC60 endp

align 10h



sub_40FCF0 proc	near
fld	dword ptr [eax+50h]
retn
sub_40FCF0 endp

align 10h



sub_40FD00 proc	near
test	ecx, ecx
jz	short loc_40FD1B
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
test	eax, eax
jz	short loc_40FD1B
nop

loc_40FD10:
cmp	eax, esi
jz	short loc_40FD1E
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_40FD10

loc_40FD1B:
xor	al, al
retn

loc_40FD1E:
mov	al, 1
retn
sub_40FD00 endp

align 10h



sub_40FD30 proc	near
fld	dword ptr [edi]
fld	dword ptr [esi]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40FD7F
fld	dword ptr [edi+4]
fld	dword ptr [esi+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40FD7F
fld	dword ptr [edi+8]
fld	dword ptr [esi+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40FD7F
lea	ecx, [esi+0Ch]
lea	edx, [edi+0Ch]
call	sub_421530
test	al, al
jz	short loc_40FD7F
fld	dword ptr [edi+1Ch]
fld	dword ptr [esi+1Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_40FD7F
mov	eax, 1
retn

loc_40FD7F:
xor	eax, eax
retn
sub_40FD30 endp

align 10h



sub_40FD90 proc	near
push	esi
mov	esi, eax
call	sub_11A7B70
fld	ds:flt_1543C88
mov	dword ptr [esi], offset	off_154DE10
mov	eax, dword_17EDF44
mov	[esi+30h], eax
mov	ecx, dword_17EDF48
mov	[esi+34h], ecx
mov	edx, dword_17EDF4C
mov	[esi+38h], edx
mov	eax, dword_17EDF50
mov	[esi+3Ch], eax
mov	ecx, dword_17EDF54
mov	[esi+40h], ecx
mov	edx, dword_17EDF58
mov	[esi+44h], edx
mov	eax, dword_17EDF5C
fstp	dword ptr [esi+4Ch]
mov	[esi+48h], eax
xor	eax, eax
mov	[esi+50h], eax
mov	[esi+54h], al
mov	eax, esi
pop	esi
retn
sub_40FD90 endp

align 10h



sub_40FDF0 proc	near
mov	eax, ecx
fld	ds:flt_1543C88
mov	ecx, dword_17EDF44
mov	[eax+4], ecx
mov	edx, dword_17EDF48
mov	[eax+8], edx
mov	ecx, dword_17EDF4C
mov	[eax+0Ch], ecx
mov	edx, dword_17EDF50
mov	[eax+10h], edx
mov	ecx, dword_17EDF54
mov	[eax+14h], ecx
mov	edx, dword_17EDF58
mov	[eax+18h], edx
mov	ecx, dword_17EDF5C
fst	dword ptr [eax+20h]
mov	[eax+1Ch], ecx
mov	edx, dword_17EDF44
mov	[eax+24h], edx
mov	ecx, dword_17EDF48
mov	[eax+28h], ecx
mov	edx, dword_17EDF4C
mov	[eax+2Ch], edx
mov	ecx, dword_17EDF50
mov	[eax+30h], ecx
mov	edx, dword_17EDF54
mov	[eax+34h], edx
mov	ecx, dword_17EDF58
mov	[eax+38h], ecx
mov	edx, dword_17EDF5C
fst	dword ptr [eax+40h]
mov	[eax+3Ch], edx
fst	dword ptr [eax]
fst	dword ptr [eax+4]
push	esi
fst	dword ptr [eax+14h]
push	edi
fst	dword ptr [eax+20h]
lea	edi, [eax+44h]
fst	dword ptr [eax+24h]
mov	ecx, 9
fst	dword ptr [eax+34h]
mov	esi, offset unk_17EE184
fstp	dword ptr [eax+40h]
rep movsd
pop	edi
pop	esi
retn
sub_40FDF0 endp

align 10h



sub_40FEB0 proc	near
fld	dword ptr [eax+8]
retn
sub_40FEB0 endp

align 10h



sub_40FEC0 proc	near
fld	dword ptr [eax+0Ch]
retn
sub_40FEC0 endp

align 10h



sub_40FED0 proc	near
fld	dword ptr [ecx]
fadd	dword ptr [eax]
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fadd	dword ptr [eax+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fadd	dword ptr [eax+8]
fstp	dword ptr [eax+8]
retn
sub_40FED0 endp

align 10h



sub_40FEF0 proc	near
mov	ecx, dword_17EDF44
fld	ds:flt_1543C88
mov	[eax], ecx
mov	edx, dword_17EDF48
mov	[eax+4], edx
mov	ecx, dword_17EDF4C
mov	[eax+8], ecx
mov	edx, dword_17EDF50
mov	[eax+0Ch], edx
mov	ecx, dword_17EDF54
mov	[eax+10h], ecx
mov	edx, dword_17EDF58
mov	[eax+14h], edx
mov	ecx, dword_17EDF5C
fstp	dword ptr [eax+1Ch]
mov	[eax+18h], ecx
retn
sub_40FEF0 endp

align 10h



sub_40FF40 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 24h
fld	dword ptr [eax+4]
fld	ds:dbl_15FCD70
fmul	st(1), st
fxch	st(1)
fstp	[esp+24h+var_24]
fld	dword ptr [eax+8]
fmul	st, st(1)
fstp	[esp+24h+var_20]
fmul	dword ptr [eax+0Ch]
fstp	[esp+24h+var_1C]
fld	dword ptr [eax]
fld	[esp+24h+var_24]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+24h+var_4]
fld	dword ptr [eax]
fld	[esp+24h+var_20]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+24h+var_24]
fld	dword ptr [eax]
fld	[esp+24h+var_1C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+24h+var_14]
fld	dword ptr [eax+4]
fmulp	st(3), st
fxch	st(2)
fstp	[esp+24h+var_C]
fld	st
fmul	dword ptr [eax+4]
fstp	[esp+24h+var_18]
fld	st(1)
fmul	dword ptr [eax+4]
fstp	[esp+24h+var_10]
fmul	dword ptr [eax+8]
fstp	[esp+24h+var_20]
fld	dword ptr [eax+8]
fmul	st, st(1)
fstp	[esp+24h+var_8]
fmul	dword ptr [eax+0Ch]
fstp	[esp+24h+var_1C]
fld	[esp+24h+var_1C]
fld	st
fld	[esp+24h+var_20]
fld	st
faddp	st(2), st
fld1
fld	st
fsubrp	st(3), st
fxch	st(2)
fstp	dword ptr [ecx]
fld	[esp+24h+var_18]
fld	st
fld	[esp+24h+var_14]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [ecx+0Ch]
fld	[esp+24h+var_10]
fld	st
fsub	[esp+24h+var_24]
fstp	dword ptr [ecx+18h]
fxch	st(2)
fsubrp	st(1), st
fstp	dword ptr [ecx+4]
fld	[esp+24h+var_C]
fld	st
faddp	st(5), st
fld	st(3)
fsubrp	st(5), st
fxch	st(4)
fstp	dword ptr [ecx+10h]
fld	[esp+24h+var_8]
fld	st
fld	[esp+24h+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [ecx+1Ch]
fld	[esp+24h+var_24]
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [ecx+8]
fsubrp	st(1), st
fstp	dword ptr [ecx+14h]
faddp	st(2), st
fsubrp	st(1), st
fstp	dword ptr [ecx+20h]
add	esp, 24h
retn
sub_40FF40 endp

align 10h



sub_410050 proc	near
fld	dword ptr [eax+4]
retn
sub_410050 endp

align 10h



sub_410060 proc	near
fld	dword ptr [eax+10h]
fcomp	ds:dbl_15FCDD0
fnstsw	ax
test	ah, 44h
jnp	short loc_410076
mov	eax, 1
retn

loc_410076:
xor	eax, eax
retn
sub_410060 endp

align 10h



sub_410080 proc	near
fld	dword ptr [ecx+1Ch]
fld	ds:dbl_15FCDD0
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_4100B1
fld	dword ptr [ecx+10h]
fucomp	st(1)
fnstsw	ax
test	ah, 44h
jp	short loc_4100B1
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4100B3
mov	eax, 1
retn

loc_4100B1:
fstp	st

loc_4100B3:
xor	eax, eax
retn
sub_410080 endp

align 10h



; int __stdcall	sub_4100C0(float)
sub_4100C0 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fstp	dword ptr [eax+4]
retn	4
sub_4100C0 endp

align 10h



sub_4100D0 proc	near
fld	ds:flt_1543C88
push	esi
fst	dword ptr [eax]
push	edi
fst	dword ptr [eax+4]
lea	edi, [eax+44h]
fst	dword ptr [eax+14h]
mov	ecx, 9
fst	dword ptr [eax+20h]
mov	esi, offset unk_17EE184
fst	dword ptr [eax+24h]
fst	dword ptr [eax+34h]
fstp	dword ptr [eax+40h]
rep movsd
pop	edi
pop	esi
retn
sub_4100D0 endp

align 10h



sub_410100 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+50h]
mov	dword ptr [esi], offset	off_154DE10
test	eax, eax
jz	short loc_410124
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_410124:
mov	ecx, esi
call	sub_11A8A50
test	[esp+4+arg_0], 1
jz	short loc_410146
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	58h
push	3
push	esi
call	eax

loc_410146:
mov	eax, esi
pop	esi
retn	4
sub_410100 endp

align 10h



sub_410150 proc	near
mov	eax, offset off_17EDD30
retn
sub_410150 endp

align 10h



sub_410160 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A8A50
test	[esp+4+arg_0], 1
jz	short loc_410186
test	esi, esi
jz	short loc_410186
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_410186:
mov	eax, esi
pop	esi
retn	4
sub_410160 endp

align 10h



sub_410190 proc	near
mov	eax, offset off_17EDD38
retn
sub_410190 endp

align 10h



sub_4101A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A8A50
test	[esp+4+arg_0], 1
jz	short loc_4101C6
test	esi, esi
jz	short loc_4101C6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_4101C6:
mov	eax, esi
pop	esi
retn	4
sub_4101A0 endp

align 10h



sub_4101D0 proc	near
mov	eax, offset off_17EDD40
retn
sub_4101D0 endp

align 10h



sub_4101E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax
call	sub_40F9A0
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn	4
sub_4101E0 endp

align 10h



sub_410200 proc	near
mov	eax, offset off_17EDD48
retn
sub_410200 endp

align 10h



sub_410210 proc	near
mov	eax, offset off_17EDD50
retn
sub_410210 endp

align 10h



sub_410220 proc	near
fld	dword ptr [edx]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41025A
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41025A
fld	dword ptr [edx+8]
fld	dword ptr [ecx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41025A
mov	eax, 1
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn

loc_41025A:
xor	eax, eax
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_410220 endp

align 10h



; int __stdcall	sub_410270(float)
sub_410270 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fld1
fdivrp	st(1), st
fstp	[esp+arg_0]
fld	dword ptr [eax]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [eax+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
retn	4
sub_410270 endp

align 10h



sub_4102A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A8A50
test	[esp+4+arg_0], 1
jz	short loc_4102C6
test	esi, esi
jz	short loc_4102C6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_4102C6:
mov	eax, esi
pop	esi
retn	4
sub_4102A0 endp

align 10h



sub_4102D0 proc	near
mov	eax, offset off_17EDD58
retn
sub_4102D0 endp

align 10h



sub_4102E0 proc	near
fld	dword ptr [edx]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41031D
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41031D
fld	dword ptr [edx+8]
fld	dword ptr [ecx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41031D
fld	dword ptr [edx+0Ch]
fld	dword ptr [ecx+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41031D
xor	eax, eax
retn

loc_41031D:
mov	eax, 1
retn
sub_4102E0 endp

align 10h


; Attributes: thunk

sub_410330 proc	near
jmp	sub_11A8A50
sub_410330 endp

align 10h



sub_410340 proc	near
mov	eax, offset off_17EDD60
retn
sub_410340 endp

align 10h



sub_410350 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
movzx	esi, word ptr [eax+0Ah]
cmp	ecx, esi
jb	short loc_410379
lea	esi, [ecx+1]
mov	[eax+0Ah], si
cmp	dword ptr [edx], 0
jz	short loc_4103A5
inc	word ptr [eax+0Ch]
mov	eax, [eax+4]
mov	edx, [edx]
mov	[eax+ecx*4], edx
pop	esi
retn	4

loc_410379:
cmp	dword ptr [edx], 0
mov	esi, [eax+4]
jz	short loc_410396
cmp	dword ptr [esi+ecx*4], 0
jnz	short loc_4103A5
inc	word ptr [eax+0Ch]
mov	edx, [edx]
mov	eax, esi
mov	[eax+ecx*4], edx
pop	esi
retn	4

loc_410396:
cmp	dword ptr [esi+ecx*4], 0
jz	short loc_4103A5
mov	esi, 0FFFFh
add	[eax+0Ch], si

loc_4103A5:
mov	eax, [eax+4]
mov	edx, [edx]
mov	[eax+ecx*4], edx
pop	esi
retn	4
sub_410350 endp

align 10h



sub_4103C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_4103DE
test	eax, eax
jbe	short loc_4103D3
add	eax, eax
jmp	short loc_4103D8

loc_4103D3:
mov	eax, 1

loc_4103D8:
push	eax
call	sub_410400

loc_4103DE:
mov	eax, [esi+8]
mov	edx, [esp+4+arg_0]
mov	ecx, [esi]
mov	edx, [edx]
mov	[ecx+eax*4], edx
inc	dword ptr [esi+8]
pop	esi
retn	4
sub_4103C0 endp

align 10h



sub_410400 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	ebx, [esi+4]
jz	short loc_410452
push	edi
test	ebx, ebx
jbe	short loc_410430
mov	eax, ebx
call	sub_5F46E0
mov	edi, eax
xor	eax, eax
cmp	[esi+8], eax
jbe	short loc_410432
nop

loc_410420:
mov	ecx, [esi]
mov	edx, [ecx+eax*4]
mov	[edi+eax*4], edx
inc	eax
cmp	eax, [esi+8]
jb	short loc_410420
jmp	short loc_410432

loc_410430:
xor	edi, edi

loc_410432:
mov	eax, [esi]
test	eax, eax
jz	short loc_41044C
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41044C:
mov	[esi], edi
mov	[esi+4], ebx
pop	edi

loc_410452:
pop	ebx
retn	4
sub_410400 endp

align 10h



sub_410460 proc	near
push	offset stru_19714EC ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	edx, dword_1968D3C
mov	dword_1971504, eax
mov	ecx, 1
add	dword_1971508, ecx
xor	eax, eax
mov	[esi+4], eax
mov	[esi], edx
sub	dword_1971508, ecx
mov	dword_1968D3C, esi
jnz	short loc_4104A1
mov	dword_1971504, eax

loc_4104A1:		; lpCriticalSection
push	offset stru_19714EC
call	ds:LeaveCriticalSection
retn
sub_410460 endp

align 10h



sub_4104B0 proc	near
xor	ecx, ecx
mov	eax, 800h
mov	edx, 0Ch
mul	edx
seto	cl
push	esi
push	edi
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
lea	edi, [eax+0Ch]
add	esp, 4
mov	dword ptr [eax+5FF4h], 0
mov	ecx, edi
mov	esi, 7FEh

loc_4104E4:
sub	esi, 1
lea	edx, [ecx+0Ch]
mov	[ecx], edx
mov	ecx, edx
jnz	short loc_4104E4
mov	ecx, dword_1968D38
mov	dword_1968D38, eax
mov	dword_1968D3C, edi
test	ecx, ecx
jz	short loc_41050A
pop	edi
mov	[eax], ecx
pop	esi
retn

loc_41050A:
pop	edi
mov	dword ptr [eax], 0
pop	esi
retn
sub_4104B0 endp

align 10h



sub_410520 proc	near
push	esi
push	offset stru_19714EC ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	esi, dword_1968D3C
inc	dword_1971508
mov	dword_1971504, eax
test	esi, esi
jnz	short loc_410552
call	sub_4104B0
mov	esi, dword_1968D3C

loc_410552:
mov	eax, [esi]
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
sub	dword_1971508, 1
mov	dword_1968D3C, eax
jnz	short loc_410580
mov	dword_1971504, 0

loc_410580:		; lpCriticalSection
push	offset stru_19714EC
call	ds:LeaveCriticalSection
mov	eax, esi
pop	esi
retn
sub_410520 endp

align 10h



sub_410590 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12979A0
test	[esp+4+arg_0], 1
jz	short loc_4105B6
test	esi, esi
jz	short loc_4105B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_4105B6:
mov	eax, esi
pop	esi
retn	4
sub_410590 endp

align 10h



sub_4105C0 proc	near
mov	eax, offset off_17EE1D0
retn
sub_4105C0 endp

align 10h



sub_4105D0 proc	near
mov	eax, [eax+20h]
retn
sub_4105D0 endp

align 10h



sub_4105E0 proc	near
mov	ecx, [eax+0B4h]
mov	eax, [ecx+20h]
retn
sub_4105E0 endp

align 10h



sub_4105F0 proc	near
movzx	edx, word ptr [ecx+0B6h]
cmp	edx, eax
ja	short loc_4105FE
xor	eax, eax
retn

loc_4105FE:
mov	ecx, [ecx+0B0h]
mov	eax, [ecx+eax*4]
retn
sub_4105F0 endp

align 10h



sub_410610 proc	near
movzx	eax, word ptr [eax+0B6h]
retn
sub_410610 endp

align 10h



sub_410620 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_410650
test	[esp+4+arg_0], 1
jz	short loc_410646
test	esi, esi
jz	short loc_410646
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	68h
push	3
push	esi
call	eax

loc_410646:
mov	eax, esi
pop	esi
retn	4
sub_410620 endp

align 10h



sub_410650 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
push	esi
mov	dword ptr [esi], offset	off_154E2F0
call	sub_1248BB0
mov	eax, [esi+5Ch]
test	eax, eax
jz	short loc_41067C
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41067C:
mov	eax, [esi+50h]
mov	dword ptr [esi+4Ch], offset off_1554C5C
test	eax, eax
jz	short loc_41069E
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41069E:
mov	eax, [esi+40h]
mov	dword ptr [esi+3Ch], offset off_1554C5C
test	eax, eax
jz	short loc_4106C0
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4106C0:
mov	ebx, ds:InterlockedDecrement
mov	dword ptr [esi], offset	off_1551878
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_4106E6
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4106E6
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_4106E6:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	edi
pop	esi
pop	ebx
retn
sub_410650 endp

align 10h



sub_410700 proc	near
mov	eax, offset off_17EDD68
retn
sub_410700 endp

align 10h



sub_410710 proc	near
mov	ecx, [ecx+2Ch]
test	ecx, ecx
jz	short loc_410730
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
test	eax, eax
jz	short loc_410730

loc_410722:
cmp	eax, offset off_17EE1A8
jz	short loc_410733
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_410722

loc_410730:
xor	al, al
retn

loc_410733:
mov	al, 1
retn
sub_410710 endp

align 10h



sub_410740 proc	near
push	esi
mov	esi, eax
call	sub_116E800
mov	dword ptr [esi], offset	off_154E2F0
mov	dword ptr [esi+34h], 0FFFFFFFFh
xor	eax, eax
mov	[esi+38h], eax
mov	[esi+40h], eax
mov	dword ptr [esi+3Ch], offset off_1554C5C
mov	edx, 1
mov	[esi+4Ah], dx
xor	edx, edx
mov	[esi+48h], dx
xor	ecx, ecx
mov	[esi+44h], cx
mov	[esi+46h], cx
mov	edx, 1
mov	[esi+5Ah], dx
mov	[esi+50h], eax
mov	[esi+54h], cx
mov	[esi+56h], cx
mov	dword ptr [esi+4Ch], offset off_1554C5C
xor	edx, edx
mov	[esi+58h], dx
mov	[esi+5Ch], eax
mov	[esi+60h], eax
mov	[esi+64h], eax
mov	eax, esi
pop	esi
retn
sub_410740 endp

align 10h



; int __fastcall sub_4107B0(size_t SizeInBytes,	char *Format, char ArgList)
sub_4107B0 proc	near

Format=	byte ptr  4
ArgList= byte ptr  8

test	ecx, ecx
jnz	short loc_4107B7
xor	eax, eax
retn

loc_4107B7:
lea	edx, [esp+ArgList]
push	edx		; ArgList
mov	edx, dword ptr [esp+4+Format]
push	edx		; Format
push	0FFFFFFFFh	; MaxCount
push	ecx		; SizeInBytes
push	eax		; DstBuf
mov	byte ptr [eax],	0
call	__vsnprintf_s
add	esp, 14h
retn
sub_4107B0 endp

align 10h



sub_4107E0 proc	near
mov	eax, [eax+18h]
retn
sub_4107E0 endp

align 10h



sub_4107F0 proc	near
mov	eax, [eax+0B8h]
retn
sub_4107F0 endp

align 10h



sub_410800 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_410812
or	word ptr [eax+0A8h], 1
retn	4

loc_410812:
mov	ecx, 0FFFEh
and	[eax+0A8h], cx
retn	4
sub_410800 endp

align 10h



sub_410830 proc	near
push	ebx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], bl
mov	dword ptr [esi], offset	off_154E360
mov	eax, esi
pop	ebx
retn
sub_410830 endp

align 10h



sub_410860 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_154E360
test	eax, eax
jz	short loc_410889
add	eax, 0FFFFFFFCh
jz	short loc_410889
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_410889:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_4108B5
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_4108B5:
mov	eax, esi
pop	esi
retn	4
sub_410860 endp

align 10h



sub_4108C0 proc	near
mov	eax, offset off_17EDD70
retn
sub_4108C0 endp

align 10h



sub_4108D0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_4108F5
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4108F5
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_4108F5:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_41091D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41091D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_4108D0 endp

align 10h



sub_410930 proc	near
mov	eax, offset off_17EDD78
retn
sub_410930 endp

align 10h



sub_410940 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+10h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41097C
test	esi, esi
jz	short loc_41096B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41096B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41096B:
mov	[ebx+10h], edi
test	edi, edi
jz	short loc_41097C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41097C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_410940 endp

align 10h



sub_410990 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_4109B5
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4109B5
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_4109B5:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_4109DD
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_4109DD:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_410990 endp

align 10h



sub_4109F0 proc	near
mov	eax, offset off_17EDD80
retn
sub_4109F0 endp

align 10h



sub_410A00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_410A2E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	esi
call	eax

loc_410A2E:
mov	eax, esi
pop	esi
retn	4
sub_410A00 endp

align 10h



sub_410A40 proc	near
mov	eax, offset off_17EDD88
retn
sub_410A40 endp

align 10h



sub_410A50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11C1CB0
test	[esp+4+arg_0], 1
jz	short loc_410A76
test	esi, esi
jz	short loc_410A76
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_410A76:
mov	eax, esi
pop	esi
retn	4
sub_410A50 endp

align 10h



sub_410A80 proc	near
mov	eax, offset off_17EDD90
retn
sub_410A80 endp

align 10h



; int __stdcall	sub_410A90(float, int, int)
sub_410A90 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
fld	[esp+24h+arg_0]
push	ebx
mov	ebx, [esp+28h+arg_8]
fld	st
fld	dword ptr [esi+14h]
push	ebp
mov	ebp, [esp+2Ch+arg_4]
fucompp
push	edi
mov	edi, [esi]
lea	edx, [edi-3]
fnstsw	ax
mov	[esp+30h+arg_8], edx
test	ah, 44h
jp	short loc_410ACF
mov	eax, [esi+18h]
fstp	st
mov	ecx, [esi+1Ch]
pop	edi
mov	[ebp+0], eax
pop	ebp
mov	[ebx], ecx
pop	ebx
add	esp, 24h
retn	0Ch

loc_410ACF:
fst	dword ptr [esi+14h]
fld1
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_410AF1
fild	[esp+30h+arg_8]
fmul	st, st(2)
call	__ftol2_sse
mov	edx, [esp+30h+arg_8]
add	eax, 3
jmp	short loc_410AF4

loc_410AF1:
lea	eax, [edi-1]

loc_410AF4:
cmp	edi, 7
fild	[esp+30h+arg_8]
lea	ecx, [eax-3]
mov	[esp+30h+arg_4], eax
fstp	[esp+30h+arg_8]
mov	[esp+30h+var_C], ecx
fld	[esp+30h+arg_8]
mov	[ebp+0], ecx
fld	st
mov	[esi+18h], ecx
fmulp	st(3), st
mov	[ebx], eax
fxch	st(2)
mov	[esi+1Ch], eax
fstp	[esp+30h+arg_8]
jl	loc_410D18
cmp	eax, 5
fldz
lea	ecx, [edx+1]
lea	edi, [ecx+1]
jle	short loc_410B47
lea	ebx, [eax-5]
mov	[esp+30h+arg_0], ebx
fild	[esp+30h+arg_0]
fstp	[esp+30h+var_10]
jmp	short loc_410B4B

loc_410B47:
fst	[esp+30h+var_10]

loc_410B4B:
cmp	eax, 4
jle	short loc_410B5D
lea	ebx, [eax-4]
fstp	st
mov	[esp+30h+arg_0], ebx
fild	[esp+30h+arg_0]

loc_410B5D:
cmp	eax, ecx
fstp	[esp+30h+var_24]
fild	[esp+30h+var_C]
lea	ebx, [eax-2]
mov	[esp+30h+arg_0], ebx
fstp	[esp+30h+var_8]
fild	[esp+30h+arg_0]
fstp	[esp+30h+var_4]
jge	short loc_410B8D
lea	ebx, [eax-1]
mov	[esp+30h+arg_0], ebx
fild	[esp+30h+arg_0]
fstp	[esp+30h+var_20]
jmp	short loc_410B95

loc_410B8D:
fxch	st(1)
fst	[esp+30h+var_20]
fxch	st(1)

loc_410B95:
cmp	eax, edx
jge	short loc_410BA1
fstp	st(1)
fild	[esp+30h+arg_4]
jmp	short loc_410BA3

loc_410BA1:
fxch	st(1)

loc_410BA3:
fstp	[esp+30h+var_C]
fld	ds:dword_1479C58
cmp	eax, 3
jnz	short loc_410BBA
fxch	st(1)
fst	[esp+30h+var_1C]
jmp	short loc_410BC0

loc_410BBA:
fst	[esp+30h+var_1C]
fxch	st(1)

loc_410BC0:
cmp	eax, edi
jnz	short loc_410BCA
fst	[esp+30h+var_18]
jmp	short loc_410BD2

loc_410BCA:
fxch	st(1)
fst	[esp+30h+var_18]
fxch	st(1)

loc_410BD2:
fld	flt_184DCA8
cmp	eax, 3
jnz	short loc_410BEB
fxch	st(1)
fst	[esp+30h+arg_4]
fxch	st(2)
fst	[esp+30h+var_14]
jmp	short loc_410C0C

loc_410BEB:
cmp	eax, 4
jnz	short loc_410BF8
fxch	st(2)
fst	[esp+30h+arg_4]
jmp	short loc_410BFE

loc_410BF8:
fst	[esp+30h+arg_4]
fxch	st(2)

loc_410BFE:
fxch	st(2)
cmp	eax, edi
jz	short loc_410C16
fst	[esp+30h+var_14]
fxch	st(1)
fxch	st(2)

loc_410C0C:
cmp	eax, edi
jnz	short loc_410C20
fstp	st

loc_410C12:
fstp	st
jmp	short loc_410C28

loc_410C16:
fxch	st(1)
fxch	st(2)
fst	[esp+30h+var_14]
jmp	short loc_410C0C

loc_410C20:
fstp	st(2)
cmp	eax, ecx
jz	short loc_410C12
fstp	st(1)

loc_410C28:
fstp	[esp+30h+arg_0]
pop	edi
fld	[esp+2Ch+arg_8]
pop	ebp
fld	st
pop	ebx
fsub	[esp+24h+var_24]
fstp	[esp+24h+arg_8]
fld	st
fsub	[esp+24h+var_8]
fstp	[esp+24h+var_8]
fld	[esp+24h+var_4]
fsub	st, st(1)
fstp	[esp+24h+var_4]
fld	[esp+24h+var_20]
fsub	st, st(1)
fstp	[esp+24h+var_20]
fld	[esp+24h+var_4]
fld	st
fmul	[esp+24h+var_1C]
fstp	[esp+24h+var_4]
fld	[esp+24h+var_8]
fld	st
fmul	[esp+24h+var_18]
fstp	[esp+24h+var_8]
fld	st(1)
fmul	[esp+24h+arg_4]
fld	[esp+24h+var_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+24h+arg_4]
fld	[esp+24h+var_8]
fld	st
fld	[esp+24h+var_20]
fld	st
fmulp	st(2), st
fld	[esp+24h+arg_8]
fmulp	st(4), st
fxch	st(1)
faddp	st(3), st
fld	[esp+24h+var_14]
fmulp	st(3), st
fxch	st(2)
fstp	[esp+24h+var_4]
fld	st(2)
fmul	[esp+24h+arg_0]
fmulp	st(1), st
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_4]
fld	st
fmulp	st(4), st
fxch	st(3)
fstp	dword ptr [esi+4]
fld	st(3)
fsub	[esp+24h+var_10]
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_4]
fmulp	st(3), st
fld	[esp+24h+var_4]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fstp	dword ptr [esi+8]
fld	[esp+24h+var_C]
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_4]
fld	[esp+24h+arg_0]
fld	st
fmulp	st(2), st
fld	[esp+24h+arg_8]
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0Ch]
fmulp	st(1), st
fstp	dword ptr [esi+10h]
add	esp, 24h
retn	0Ch

loc_410D18:
fstp	st(1)
fstp	st
cmp	edi, 6
jnz	loc_410F6A
fld	[esp+30h+arg_8]
cmp	eax, 3
jnz	loc_410DE3
fld	st
pop	edi
fld1
pop	ebp
fsubrp	st(1), st
pop	ebx
fstp	[esp+24h+arg_8]
fld	st
fsubr	ds:dbl_15FCD70
fstp	[esp+24h+arg_0]
fld	st
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_8]
fld	st
fmul	st, st
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_4]
fld	st
fld	[esp+24h+arg_0]
fld	st
fmulp	st(2), st
fld	st(3)
fmul	st, st(6)
faddp	st(2), st
fxch	st(1)
fmulp	st(4), st
fxch	st(3)
fstp	[esp+24h+arg_4]
fld	st(3)
fmul	ds:dbl_15FCDE0
fmulp	st(1), st
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fld	[esp+24h+arg_4]
fld	st
fmulp	st(3), st
fld	st(3)
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	dword ptr [esi+8]
fld	st(1)
fsubr	ds:dbl_15FCD78
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_8]
fld	[esp+24h+arg_0]
fld	st
fmulp	st(2), st
fld	st(3)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0Ch]
fmulp	st(1), st
fstp	dword ptr [esi+10h]
add	esp, 24h
retn	0Ch

loc_410DE3:
cmp	eax, 4
jnz	loc_410EB5
fld	st
pop	edi
fld1
pop	ebp
fsub	st(1), st
pop	ebx
fxch	st(1)
fstp	[esp+24h+arg_4]
fld	st(1)
fsubr	ds:dbl_15FCD78
fstp	[esp+24h+arg_0]
fld	st(1)
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_8]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_8]
fld	st
fmul	st, st
fstp	[esp+24h+var_4]
fld	[esp+24h+arg_4]
fld	st
fld	[esp+24h+arg_0]
fld	st
fmulp	st(2), st
fld	st(5)
fmulp	st(4), st
fxch	st(1)
faddp	st(3), st
fxch	st(2)
fmul	ds:dbl_15FCDE0
fstp	[esp+24h+arg_4]
fmul	st, st
fstp	[esp+24h+arg_0]
fld	st(2)
fsubr	ds:dbl_15FCD70
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_8]
fld	[esp+24h+var_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fld	[esp+24h+arg_4]
fld	st
fmul	st, st(3)
fld	st(5)
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+8]
fld	[esp+24h+arg_0]
fld	st
fmulp	st(3), st
fxch	st(1)
fmulp	st(4), st
fxch	st(1)
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+0Ch]
fmulp	st(1), st
fstp	dword ptr [esi+10h]
add	esp, 24h
retn	0Ch

loc_410EB5:
fld	ds:dbl_15FCC40
pop	edi
fsubr	st, st(1)
pop	ebp
pop	ebx
fstp	[esp+24h+arg_0]
fld	ds:dbl_15FCD70
fsubr	st, st(1)
fstp	[esp+24h+arg_4]
fld	st
fsubr	ds:dbl_15FCD78
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_8]
fld	st
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_4]
fld	st
fmul	st, st
fstp	[esp+24h+var_4]
fld	st(2)
fmul	ds:dbl_15FCDE0
fld	[esp+24h+arg_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+24h+arg_8]
fld	st(3)
fmul	st, st(2)
fld	[esp+24h+arg_0]
fld	st
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fmulp	st(3), st
fxch	st(2)
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_8]
fld	st
fmul	st, st(4)
fstp	dword ptr [esi+4]
fld	[esp+24h+arg_4]
fld	st
fmul	st, st(5)
fxch	st(2)
fmulp	st(6), st
fxch	st(1)
faddp	st(5), st
fxch	st(4)
fstp	dword ptr [esi+8]
fld	[esp+24h+var_4]
fld	st
fmulp	st(4), st
fxch	st(4)
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	dword ptr [esi+0Ch]
fmulp	st(1), st
fstp	dword ptr [esi+10h]
add	esp, 24h
retn	0Ch

loc_410F6A:
cmp	edi, 5
jnz	loc_4110B0
fld	[esp+30h+arg_8]
fld	st
fld1
cmp	eax, 3
jnz	loc_411017
fsubrp	st(1), st
pop	edi
pop	ebp
pop	ebx
fstp	[esp+24h+arg_8]
fld	st
fsubr	ds:dbl_15FCD70
fstp	[esp+24h+arg_0]
fld	st
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_8]
fld	st
fmul	st, st
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_4]
fld	st
fld	[esp+24h+arg_0]
fld	st
fmulp	st(2), st
fld	st(3)
fmul	st, st(6)
faddp	st(2), st
fxch	st(1)
fmulp	st(4), st
fxch	st(3)
fstp	[esp+24h+arg_4]
fmul	st, st
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fld	[esp+24h+arg_4]
fld	st
fmul	st, st(3)
fld	st(4)
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+8]
fld	[esp+24h+arg_0]
fld	st
fmulp	st(3), st
fld	st(3)
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	dword ptr [esi+0Ch]
fmulp	st(1), st
fstp	dword ptr [esi+10h]
add	esp, 24h
retn	0Ch

loc_411017:
fsub	st(1), st
pop	edi
fxch	st(1)
pop	ebp
pop	ebx
fstp	[esp+24h+arg_8]
fld	st(1)
fsubr	ds:dbl_15FCD70
fstp	[esp+24h+arg_0]
fld	st(1)
fmul	ds:dbl_15FCC48
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_8]
fld	st
fmul	st, st
fstp	[esp+24h+var_4]
fld	[esp+24h+arg_4]
fld	st
fsubp	st(3), st
fxch	st(2)
fstp	[esp+24h+arg_8]
fld	[esp+24h+arg_8]
fld	st
fmul	st, st
fstp	[esp+24h+arg_8]
fld	st(1)
faddp	st(3), st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_8]
fld	st
fld	[esp+24h+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fld	[esp+24h+arg_4]
fld	st
fmul	st, st(2)
fld	st(5)
fmulp	st(4), st
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+8]
fld	[esp+24h+var_4]
fld	st
fmulp	st(2), st
fxch	st(2)
fmulp	st(4), st
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+0Ch]
fmulp	st(1), st
fstp	dword ptr [esi+10h]
add	esp, 24h
retn	0Ch

loc_4110B0:
cmp	edi, 4
jnz	short loc_41110B
fld	[esp+30h+arg_8]
fld	st
fld1
fsubrp	st(1), st
fstp	[esp+30h+arg_8]
fld	st
fmul	st, st
fstp	[esp+30h+arg_4]
fld	[esp+30h+arg_8]
fld	st
fmul	st, st
fstp	[esp+30h+arg_8]
fld	[esp+30h+arg_8]
fld	st
fmul	st, st(2)
fstp	dword ptr [esi+4]
fld	st(2)
fld	ds:dbl_15FCD78
fmul	st(1), st
fxch	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+8]
fld	[esp+30h+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0Ch]
fmulp	st(1), st
fstp	dword ptr [esi+10h]

loc_41110B:
pop	edi
pop	ebp
pop	ebx
add	esp, 24h
retn	0Ch
sub_410A90 endp

align 10h



sub_411120 proc	near
mov	eax, offset off_17EDD98
retn
sub_411120 endp

align 10h



sub_411130 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A6E70
test	[esp+4+arg_0], 1
jz	short loc_411156
test	esi, esi
jz	short loc_411156
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_411156:
mov	eax, esi
pop	esi
retn	4
sub_411130 endp

align 10h



sub_411160 proc	near
mov	eax, offset off_17EDDA0
retn
sub_411160 endp

align 10h



sub_411170 proc	near
mov	eax, offset off_17EDDA8
retn
sub_411170 endp

align 10h



sub_411180 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A6E70
test	[esp+4+arg_0], 1
jz	short loc_4111A6
test	esi, esi
jz	short loc_4111A6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_4111A6:
mov	eax, esi
pop	esi
retn	4
sub_411180 endp

align 10h



sub_4111B0 proc	near
mov	eax, offset off_17EDDB0
retn
sub_4111B0 endp

align 10h



sub_4111C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A6E70
test	[esp+4+arg_0], 1
jz	short loc_4111E6
test	esi, esi
jz	short loc_4111E6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	60h
push	3
push	esi
call	eax

loc_4111E6:
mov	eax, esi
pop	esi
retn	4
sub_4111C0 endp

align 10h



sub_4111F0 proc	near
mov	eax, offset off_17EDDB8
retn
sub_4111F0 endp

align 10h



sub_411200 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A6E70
test	[esp+4+arg_0], 1
jz	short loc_411226
test	esi, esi
jz	short loc_411226
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_411226:
mov	eax, esi
pop	esi
retn	4
sub_411200 endp

align 10h



sub_411230 proc	near
mov	eax, offset off_17EDDC0
retn
sub_411230 endp

align 10h



sub_411240 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A6E70
test	[esp+4+arg_0], 1
jz	short loc_411266
test	esi, esi
jz	short loc_411266
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_411266:
mov	eax, esi
pop	esi
retn	4
sub_411240 endp

align 10h



sub_411270 proc	near
mov	eax, offset off_17EDDC8
retn
sub_411270 endp

align 10h



sub_411280 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A6E70
test	[esp+4+arg_0], 1
jz	short loc_4112A6
test	esi, esi
jz	short loc_4112A6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_4112A6:
mov	eax, esi
pop	esi
retn	4
sub_411280 endp

align 10h



sub_4112B0 proc	near
mov	eax, offset off_17EDDD0
retn
sub_4112B0 endp

align 10h



sub_4112C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_154EB58
test	eax, eax
jz	short loc_4112E0
mov	ecx, [esi+10h]
mov	edx, dword_185F3E8[ecx*4]
push	eax
call	edx ; dword_185F3E8
add	esp, 4

loc_4112E0:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41130B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41130B:
mov	eax, esi
pop	esi
retn	4
sub_4112C0 endp

align 10h



sub_411320 proc	near
mov	eax, offset off_17EDDD8
retn
sub_411320 endp

align 10h



sub_411330 proc	near
mov	eax, offset off_17EDDE0
retn
sub_411330 endp

align 10h



sub_411340 proc	near
mov	edx, [ecx+0Ch]
mov	[eax], edx
mov	edx, [ecx+10h]
mov	[eax+4], edx
mov	edx, [ecx+14h]
mov	ecx, [ecx+18h]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
retn
sub_411340 endp

align 10h



sub_411360 proc	near
mov	eax, offset off_17EDDE8
retn
sub_411360 endp

align 10h



sub_411370 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1248770
test	[esp+4+arg_0], 1
jz	short loc_411396
test	esi, esi
jz	short loc_411396
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	6Ch
push	3
push	esi
call	eax

loc_411396:
mov	eax, esi
pop	esi
retn	4
sub_411370 endp

align 10h



sub_4113A0 proc	near
mov	dword ptr [eax], offset	off_1556034
mov	eax, [eax+4]
test	eax, eax
jz	short locret_4113DB
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4113DA
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4113DA:
pop	esi

locret_4113DB:
retn
sub_4113A0 endp

align 10h



sub_4113E0 proc	near

arg_0= word ptr	 4

mov	cx, [esp+arg_0]
mov	[esi+0Eh], cx
xor	edx, edx
xor	ecx, ecx
mov	dword ptr [esi], offset	off_1556034
mov	[esi+8], ax
mov	[esi+0Ah], dx
mov	[esi+0Ch], cx
test	ax, ax
jbe	short loc_41141C
push	edi
movzx	edi, ax
call	sub_5FB570
mov	[esi+4], eax
pop	edi
mov	eax, esi
mov	dword ptr [esi], offset	off_155386C
retn	4

loc_41141C:
mov	[esi+4], ecx
mov	eax, esi
mov	dword ptr [esi], offset	off_155386C
retn	4
sub_4113E0 endp

align 10h



sub_411430 proc	near
mov	eax, offset off_17EDDF0
retn
sub_411430 endp

align 10h



sub_411440 proc	near
mov	eax, [eax+44h]
retn
sub_411440 endp

align 10h



sub_411450 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
add	esi, 8
cmp	[esi], edi
jz	short loc_411490
test	edi, edi
jz	short loc_41146B
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41146B:
mov	eax, [esi]
test	eax, eax
jz	short loc_41148E
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41148D
push	esi
mov	eax, ebx
call	sub_1171F60

loc_41148D:
pop	ebx

loc_41148E:
mov	[esi], edi

loc_411490:
pop	edi
pop	esi
retn
sub_411450 endp

align 10h



sub_4114A0 proc	near
push	edi
mov	edi, [eax]
cmp	[esi], edi
jz	short loc_4114DA
test	edi, edi
jz	short loc_4114B5
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_4114B5:
mov	eax, [esi]
test	eax, eax
jz	short loc_4114D8
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4114D7
push	esi
mov	eax, ebx
call	sub_1171F60

loc_4114D7:
pop	ebx

loc_4114D8:
mov	[esi], edi

loc_4114DA:
mov	eax, esi
pop	edi
retn
sub_4114A0 endp

align 10h



sub_4114E0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
add	esi, 70h
cmp	[esi], edi
jz	short loc_411520
test	edi, edi
jz	short loc_4114FB
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_4114FB:
mov	eax, [esi]
test	eax, eax
jz	short loc_41151E
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41151D
push	esi
mov	eax, ebx
call	sub_1171F60

loc_41151D:
pop	ebx

loc_41151E:
mov	[esi], edi

loc_411520:
pop	edi
pop	esi
retn
sub_4114E0 endp

align 10h
; [00000008 BYTES: COLLAPSED FUNCTION std::_Iterator_base_secure::_Has_container(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_411540 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_154ED70
call	sub_411760
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41157C
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_41157C:
mov	eax, esi
pop	esi
retn	4
sub_411540 endp

align 10h



sub_411590 proc	near
mov	eax, offset off_17EE1E0
retn
sub_411590 endp

align 10h



sub_4115A0 proc	near
test	eax, eax
jnz	short loc_4115A9
mov	[esi], eax
mov	eax, esi
retn

loc_4115A9:
push	eax
call	sub_1172180
mov	[esi], eax
add	esp, 4
mov	eax, esi
retn
sub_4115A0 endp

align 10h



sub_4115C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
mov	ebx, ecx
lea	eax, [esp+14h+var_4]
push	eax
lea	esi, [ebx+8]
mov	edi, ebp
mov	[esp+18h+var_4], 0
call	sub_5F8F60
test	al, al
jz	short loc_4115F2
mov	eax, [esp+14h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_4115F2:
cmp	dword ptr [ebx+1Ch], 0
jz	short loc_411660
test	ebp, ebp
jnz	short loc_411602
mov	[esp+14h+arg_0], ebp
jmp	short loc_41160F

loc_411602:
push	ebp
call	sub_1172180
add	esp, 4
mov	[esp+14h+arg_0], eax

loc_41160F:
mov	ecx, [ebx+1Ch]
mov	edx, [ecx]
mov	edx, [edx+5Ch]
lea	eax, [esp+14h+arg_0]
push	eax
call	edx
mov	esi, eax
mov	eax, [esp+14h+arg_0]
test	eax, eax
jz	short loc_411647
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411647
lea	eax, [esp+14h+arg_0]
push	eax
mov	eax, edi
call	sub_1171F60

loc_411647:
test	esi, esi
jz	short loc_411656
mov	edx, [ebx]
mov	eax, [edx+4Ch]
push	esi
push	ebp
mov	ecx, ebx
call	eax

loc_411656:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_411660:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	4
sub_4115C0 endp

align 10h



sub_411670 proc	near

arg_0= dword ptr  4

mov	cl, [edx]
xor	eax, eax
test	cl, cl
jz	short loc_411695
push	esi
lea	esp, [esp+0]

loc_411680:
mov	esi, eax
shl	esi, 5
add	esi, eax
movsx	eax, cl
mov	cl, [edx+1]
inc	edx
add	eax, esi
test	cl, cl
jnz	short loc_411680
pop	esi

loc_411695:
xor	edx, edx
div	[esp+arg_0]
mov	eax, edx
retn
sub_411670 endp

align 10h



sub_4116A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
lea	edi, [ecx+8]
test	eax, eax
jnz	short loc_4116BA
mov	eax, [esp+4+arg_0]
push	eax
call	sub_5F94E0
pop	edi
retn	8

loc_4116BA:
mov	edx, [esp+4+arg_0]
push	eax
push	edx
call	sub_5F8EC0
pop	edi
retn	8
sub_4116A0 endp

align 10h



sub_4116D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_411760
test	[esp+4+arg_0], 1
jz	short loc_4116F6
test	esi, esi
jz	short loc_4116F6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_4116F6:
mov	eax, esi
pop	esi
retn	4
sub_4116D0 endp

align 10h



; int __stdcall	sub_411700(int,	char *Src, int)
sub_411700 proc	near

arg_0= dword ptr  4
Src= dword ptr	8
arg_8= dword ptr  0Ch

cmp	byte ptr [ecx+10h], 0
jz	short loc_411743
push	ebx
mov	ebx, [esp+4+Src]
push	esi
mov	eax, ebx
push	edi
lea	edx, [eax+1]

loc_411712:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_411712
sub	eax, edx
lea	esi, [eax+1]
push	esi
call	sub_1227DA0
mov	edi, [esp+10h+arg_0]
push	ebx		; Src
push	esi		; SizeInBytes
push	eax		; Dst
mov	[edi+4], eax
call	_strcpy_s
mov	eax, [esp+1Ch+arg_8]
add	esp, 10h
mov	[edi+8], eax
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_411743:
mov	eax, [esp+arg_0]
mov	ecx, [esp+Src]
mov	edx, [esp+arg_8]
mov	[eax+4], ecx
mov	[eax+8], edx
retn	0Ch
sub_411700 endp

align 10h



sub_411760 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_15C9290
jz	short loc_4117AD
push	ebx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_4117AC
push	edi

loc_411778:
mov	eax, [esi+8]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_4117A5

loc_411782:
mov	eax, edi
mov	eax, [eax+4]
mov	edi, [edi]
test	eax, eax
jz	short loc_4117A1
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4117A1:
test	edi, edi
jnz	short loc_411782

loc_4117A5:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_411778
pop	edi

loc_4117AC:
pop	ebx

loc_4117AD:
mov	dword ptr [esi], offset	off_1550858
call	sub_418AE0
mov	dword ptr [esi], offset	off_15C9924
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_4117DE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_4117DE:
pop	esi
retn
sub_411760 endp




sub_4117E0 proc	near

arg_0= dword ptr  4

push	esi
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
mov	dword ptr [edi+4], 0
call	ds:InterlockedIncrement
lea	esi, [edi+8]
mov	dword ptr [edi], offset	off_154ED70
call	sub_5F9860
mov	eax, [esp+4+arg_0]
mov	byte ptr [esi+10h], 1
mov	dword ptr [esi], offset	off_15C9290
mov	[edi+1Ch], eax
mov	eax, edi
pop	esi
retn	4
sub_4117E0 endp

align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_45. PRESS	KEYPAD "+" TO EXPAND]
align 10h



sub_411830 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11BBF60
test	[esp+4+arg_0], 1
jz	short loc_411859
test	esi, esi
jz	short loc_411859
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	80h
push	3
push	esi
call	eax

loc_411859:
mov	eax, esi
pop	esi
retn	4
sub_411830 endp

align 10h



sub_411860 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 14h
xor	eax, eax
push	esi
mov	[esp+18h+var_14], eax
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_C], eax
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], eax
lea	eax, [esp+18h+var_14]
push	eax
lea	edx, [esp+1Ch+var_10]
push	edx
lea	eax, [esp+20h+var_C]
push	eax
lea	edx, [esp+24h+var_8]
push	edx
lea	eax, [esp+28h+var_4]
push	eax
mov	esi, ecx
call	sub_4121D0
pop	esi
add	esp, 14h
retn
sub_411860 endp

align 10h



sub_4118A0 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
test	esi, esi
jz	short loc_4118C5
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4118C5
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4118C5:
mov	esi, [edi]
test	esi, esi
jz	short loc_4118E1
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4118E1
mov	edx, [esi]
mov	eax, [edx+4]
pop	edi
mov	ecx, esi
pop	esi
pop	ebx
jmp	eax

loc_4118E1:
pop	edi
pop	esi
pop	ebx
retn
sub_4118A0 endp

align 10h



sub_4118F0 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ds:InterlockedDecrement
push	edi
mov	edi, ecx
mov	eax, [edi+10h]
lea	ebx, [edi+10h]
test	eax, eax
jz	short loc_41191D
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41191D
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_41191D:
mov	eax, [edi+0Ch]
lea	ebx, [edi+0Ch]
test	eax, eax
jz	short loc_41193E
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41193E
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_41193E:
mov	eax, [edi+8]
lea	ebx, [edi+8]
test	eax, eax
jz	short loc_41195F
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41195F
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_41195F:
mov	eax, [edi+4]
lea	ebx, [edi+4]
test	eax, eax
jz	short loc_411980
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_411980
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_411980:
mov	eax, [edi]
test	eax, eax
jz	short loc_41199D
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41199D
push	edi
mov	eax, ebx
call	sub_1171F60

loc_41199D:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_4118F0 endp

align 10h



sub_4119B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, [edi]
cmp	esi, [ebx]
jz	short loc_4119EC
test	esi, esi
jz	short loc_4119DA
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_4119DA
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4119DA:
mov	eax, [ebx]
mov	[edi], eax
test	eax, eax
jz	short loc_4119EC
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4119EC:
mov	esi, [edi+4]
cmp	esi, [ebx+4]
jz	short loc_411A1F
test	esi, esi
jz	short loc_411A0B
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_411A0B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_411A0B:
mov	eax, [ebx+4]
mov	[edi+4], eax
test	eax, eax
jz	short loc_411A1F
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_411A1F:
mov	ecx, [ebx+8]
pop	esi
mov	[edi+8], ecx
mov	dl, [ebx+0Ch]
pop	ebp
mov	[edi+0Ch], dl
mov	eax, edi
pop	ebx
retn	4
sub_4119B0 endp

align 10h



; int __thiscall sub_411A40(void *, char)
sub_411A40 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154EE10
jz	short loc_411A59
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_411A59:
mov	eax, esi
pop	esi
retn	4
sub_411A40 endp

align 10h



sub_411A60 proc	near

arg_0= dword ptr  4

movzx	eax, word ptr [edi+8]
push	esi
movzx	esi, word ptr [edi+0Ah]
cmp	esi, eax
jb	short loc_411A7A
movzx	ecx, word ptr [edi+0Eh]
add	ecx, esi
push	ecx
push	edi
call	sub_428E40

loc_411A7A:
mov	edx, [esp+4+arg_0]
push	edx
mov	ecx, esi
mov	eax, edi
call	sub_426E10
mov	eax, esi
pop	esi
retn	4
sub_411A60 endp

align 10h



sub_411A90 proc	near
mov	eax, offset off_17EDDF8
retn
sub_411A90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_411AA0(float,	float)
sub_411AA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
fld	[ebp+arg_4]
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_411AA0 endp




; int __cdecl sub_411AC0(float,	float)
sub_411AC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
fld	[esp+4+arg_4]
sub	esp, 8
fstp	[esp+0Ch+var_8]
fld	[esp+0Ch+arg_0]
fstp	[esp+0Ch+var_C]
call	sub_411AA0
add	esp, 8
pop	ecx
retn
sub_411AC0 endp

align 10h



; int __fastcall sub_411AE0(char *)
sub_411AE0 proc	near
push	eax		; int
push	ecx		; char *
call	_strchr
add	esp, 8
retn
sub_411AE0 endp

align 10h



; int __stdcall	sub_411AF0(float)
sub_411AF0 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fstp	dword ptr [eax+28h]
retn	4
sub_411AF0 endp

align 10h



sub_411B00 proc	near
fld	ds:flt_1543C88
fst	dword ptr [eax+58h]
fst	dword ptr [eax+34h]
fst	dword ptr [eax+38h]
fstp	dword ptr [eax+3Ch]
retn
sub_411B00 endp

align 10h



sub_411B20 proc	near
movzx	ecx, word ptr [edx+3Ch]
push	edi
xor	edi, edi
xor	eax, eax
cmp	di, cx
jnb	short loc_411B40
mov	edx, [edx+38h]

loc_411B31:
movzx	edi, ax
cmp	dword ptr [edx+edi*4], 0
jz	short loc_411B47
inc	eax
cmp	ax, cx
jb	short loc_411B31

loc_411B40:
mov	eax, 0FFFFh
pop	edi
retn

loc_411B47:
movzx	ecx, ax
mov	[edx+ecx*4], esi
mov	edx, 80h
or	[esi+0A8h], dx
pop	edi
retn
sub_411B20 endp

align 10h



sub_411B60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11B2DD0
test	[esp+4+arg_0], 1
jz	short loc_411B86
test	esi, esi
jz	short loc_411B86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_411B86:
mov	eax, esi
pop	esi
retn	4
sub_411B60 endp

align 10h



sub_411B90 proc	near
mov	eax, offset off_17EDE78
retn
sub_411B90 endp

align 10h



sub_411BA0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+30h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_411BDC
test	esi, esi
jz	short loc_411BCB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_411BCB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_411BCB:
mov	[ebx+30h], edi
test	edi, edi
jz	short loc_411BDC
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_411BDC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_411BA0 endp

align 10h



sub_411BF0 proc	near
mov	eax, [eax+30h]
retn
sub_411BF0 endp

align 10h



sub_411C00 proc	near
mov	ecx, [edx]
lea	eax, [ecx+8]
mov	ecx, [ecx]
mov	[edx], ecx
retn
sub_411C00 endp

align 10h



sub_411C10 proc	near
add	eax, 94h
retn
sub_411C10 endp

align 10h



sub_411C20 proc	near
fld	dword ptr [eax+34h]
retn
sub_411C20 endp

align 10h



sub_411C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	ecx, [esp+4+arg_0]
xor	eax, eax
push	ebx
mov	[esi], eax
mov	[esi+4], eax
push	ebp
lea	ebx, [esi+4]
mov	[esi+8], eax
lea	ebp, [esi+8]
mov	[esi+0Ch], eax
mov	[esi+10h], eax
push	edi
mov	edi, [ecx]
cmp	[esi], edi
jz	short loc_411C8B
cmp	edi, eax
jz	short loc_411C62
lea	edx, [edi-8]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_411C62:
mov	eax, [esi]
test	eax, eax
jz	short loc_411C89
lea	ecx, [eax-8]
movzx	eax, word ptr [eax-2]
push	ecx		; lpAddend
mov	[esp+14h+var_4], eax
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411C89
mov	eax, [esp+10h+var_4]
push	esi
call	sub_1171F60

loc_411C89:
mov	[esi], edi

loc_411C8B:
mov	ecx, [esp+10h+arg_0]
mov	edi, [ecx+4]
mov	[esp+10h+var_4], edi
cmp	[ebx], edi
jz	short loc_411CCF
test	edi, edi
jz	short loc_411CA8
lea	edx, [edi-8]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_411CA8:
mov	eax, [ebx]
test	eax, eax
jz	short loc_411CCD
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411CC9
push	ebx
mov	eax, edi
call	sub_1171F60

loc_411CC9:
mov	edi, [esp+10h+var_4]

loc_411CCD:
mov	[ebx], edi

loc_411CCF:
mov	eax, [esp+10h+arg_0]
mov	edi, [eax+8]
cmp	[ebp+0], edi
jz	short loc_411D0E
test	edi, edi
jz	short loc_411CE9
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_411CE9:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_411D0B
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411D0B
push	ebp
mov	eax, ebx
call	sub_1171F60

loc_411D0B:
mov	[ebp+0], edi

loc_411D0E:
mov	edx, [esp+10h+arg_0]
mov	ebp, [edx+0Ch]
cmp	[esi+0Ch], ebp
jz	short loc_411D50
test	ebp, ebp
jz	short loc_411D28
lea	eax, [ebp-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_411D28:
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_411D4D
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411D4D
lea	eax, [esi+0Ch]
push	eax
mov	eax, ebx
call	sub_1171F60

loc_411D4D:
mov	[esi+0Ch], ebp

loc_411D50:
mov	ecx, [esp+10h+arg_0]
mov	ebx, [ecx+10h]
cmp	[esi+10h], ebx
jz	short loc_411D92
test	ebx, ebx
jz	short loc_411D6A
lea	edx, [ebx-8]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_411D6A:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_411D8F
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411D8F
lea	eax, [esi+10h]
push	eax
mov	eax, ebp
call	sub_1171F60

loc_411D8F:
mov	[esi+10h], ebx

loc_411D92:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
pop	ecx
retn	4
sub_411C30 endp

align 10h



sub_411DA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebx]
push	edi
cmp	[ebp+0], esi
jz	short loc_411DE6
test	esi, esi
jz	short loc_411DC1
lea	eax, [esi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_411DC1:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_411DE3
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411DE3
push	ebp
mov	eax, edi
call	sub_1171F60

loc_411DE3:
mov	[ebp+0], esi

loc_411DE6:
mov	edi, [ebx+4]
cmp	[ebp+4], edi
lea	esi, [ebp+4]
jz	short loc_411E26
test	edi, edi
jz	short loc_411DFF
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_411DFF:
mov	eax, [esi]
test	eax, eax
jz	short loc_411E20
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411E20
push	esi
mov	eax, ebx
call	sub_1171F60

loc_411E20:
mov	ebx, [esp+10h+arg_4]
mov	[esi], edi

loc_411E26:
mov	edi, [ebx+8]
cmp	[ebp+8], edi
lea	esi, [ebp+8]
jz	short loc_411E66
test	edi, edi
jz	short loc_411E3F
lea	edx, [edi-8]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_411E3F:
mov	eax, [esi]
test	eax, eax
jz	short loc_411E60
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411E60
push	esi
mov	eax, ebx
call	sub_1171F60

loc_411E60:
mov	ebx, [esp+10h+arg_4]
mov	[esi], edi

loc_411E66:
mov	edi, [ebx+0Ch]
cmp	[ebp+0Ch], edi
lea	esi, [ebp+0Ch]
jz	short loc_411EA6
test	edi, edi
jz	short loc_411E7F
lea	eax, [edi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_411E7F:
mov	eax, [esi]
test	eax, eax
jz	short loc_411EA0
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411EA0
push	esi
mov	eax, ebx
call	sub_1171F60

loc_411EA0:
mov	ebx, [esp+10h+arg_4]
mov	[esi], edi

loc_411EA6:
mov	edi, [ebx+10h]
cmp	[ebp+10h], edi
lea	esi, [ebp+10h]
jz	short loc_411EE2
test	edi, edi
jz	short loc_411EBF
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_411EBF:
mov	eax, [esi]
test	eax, eax
jz	short loc_411EE0
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_411EE0
push	esi
mov	eax, ebx
call	sub_1171F60

loc_411EE0:
mov	[esi], edi

loc_411EE2:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	8
sub_411DA0 endp

align 10h



sub_411EF0 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+0Ch]
mov	dword ptr [esi], offset	off_154EE20
mov	eax, [edi]
test	eax, eax
jz	short loc_411F22
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_411F22
push	edi
mov	eax, ebp
call	sub_1171F60

loc_411F22:
mov	eax, [esi+8]
lea	edi, [esi+8]
test	eax, eax
jz	short loc_411F43
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_411F43
push	edi
mov	eax, ebp
call	sub_1171F60

loc_411F43:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_411EF0 endp

align 10h



sub_411F60 proc	near
push	esi
mov	esi, ecx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	dword ptr [esi+4], 0
call	ds:InterlockedIncrement
mov	eax, esi
pop	esi
retn
sub_411F60 endp

align 10h



sub_411F80 proc	near
mov	ecx, [eax]
xor	eax, eax
cmp	ecx, [edx]
setz	al
retn
sub_411F80 endp

align 10h



sub_411F90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx+0Ch]
jnz	short loc_411FA5
call	sub_411450
mov	al, 1
retn	4

loc_411FA5:
xor	al, al
retn	4
sub_411F90 endp

db 16h dup(0CCh)



sub_411FC0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, ds:InterlockedIncrement
push	edi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ebp ; InterlockedIncrement
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [esi], offset	off_154EE20
mov	[esi+8], ebx
lea	edi, [esi+0Ch]
mov	[edi], ebx
mov	ebx, [eax]
cmp	[edi], ebx
jz	short loc_412020
test	ebx, ebx
jz	short loc_411FFD
lea	ecx, [ebx-8]
push	ecx		; lpAddend
call	ebp ; InterlockedIncrement

loc_411FFD:
mov	eax, [edi]
test	eax, eax
jz	short loc_41201E
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41201E
push	edi
mov	eax, ebp
call	sub_1171F60

loc_41201E:
mov	[edi], ebx

loc_412020:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
retn	4
sub_411FC0 endp

align 10h



sub_412030 proc	near
mov	ecx, [eax+15Ch]
mov	eax, [ecx+edx*4]
retn
sub_412030 endp

align 10h



sub_412040 proc	near
mov	eax, [eax+164h]
retn
sub_412040 endp

align 10h



sub_412050 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, [edi]
cmp	esi, eax
jz	short loc_412091
push	eax
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	[edi], eax
test	esi, esi
jz	short loc_412091
push	ebx
movzx	ebx, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41208B
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, ebx
call	sub_1171F60

loc_41208B:
pop	ebx
mov	eax, edi
pop	esi
pop	ecx
retn

loc_412091:
mov	eax, edi
pop	esi
pop	ecx
retn
sub_412050 endp

align 10h



sub_4120A0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, eax
push	edi
mov	edi, [esi]
test	edi, edi
jz	short loc_4120E2
push	0
mov	[esp+18h+var_4], edi
call	sub_1172180
add	esp, 4
mov	[esi], eax
test	edi, edi
jz	short loc_4120E2
movzx	ebx, word ptr [edi-2]
add	edi, 0FFFFFFF8h
push	edi		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_4120E2
lea	eax, [esp+14h+var_4]
push	eax
mov	eax, ebx
call	sub_1171F60

loc_4120E2:
mov	edi, [esi+4]
test	edi, edi
jz	short loc_412119
push	0
mov	[esp+18h+var_4], edi
call	sub_1172180
add	esp, 4
mov	[esi+4], eax
test	edi, edi
jz	short loc_412119
movzx	ebx, word ptr [edi-2]
add	edi, 0FFFFFFF8h
push	edi		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_412119
lea	ecx, [esp+14h+var_4]
push	ecx
mov	eax, ebx
call	sub_1171F60

loc_412119:
mov	edi, [esi+8]
test	edi, edi
jz	short loc_412150
push	0
mov	[esp+18h+var_4], edi
call	sub_1172180
add	esp, 4
mov	[esi+8], eax
test	edi, edi
jz	short loc_412150
movzx	ebx, word ptr [edi-2]
add	edi, 0FFFFFFF8h
push	edi		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_412150
lea	edx, [esp+14h+var_4]
push	edx
mov	eax, ebx
call	sub_1171F60

loc_412150:
mov	edi, [esi+0Ch]
test	edi, edi
jz	short loc_412187
push	0
mov	[esp+18h+var_4], edi
call	sub_1172180
add	esp, 4
mov	[esi+0Ch], eax
test	edi, edi
jz	short loc_412187
movzx	ebx, word ptr [edi-2]
add	edi, 0FFFFFFF8h
push	edi		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_412187
lea	eax, [esp+14h+var_4]
push	eax
mov	eax, ebx
call	sub_1171F60

loc_412187:
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_4121BE
push	0
mov	[esp+18h+var_4], edi
call	sub_1172180
add	esp, 4
mov	[esi+10h], eax
test	edi, edi
jz	short loc_4121BE
movzx	esi, word ptr [edi-2]
add	edi, 0FFFFFFF8h
push	edi		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_4121BE
lea	ecx, [esp+14h+var_4]
push	ecx
mov	eax, esi
call	sub_1171F60

loc_4121BE:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_4120A0 endp

align 10h



sub_4121D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	dword ptr [esi], 0
push	ebp
mov	dword ptr [esi+4], 0
lea	ebx, [esi+4]
lea	ebp, [esi+8]
mov	dword ptr [ebp+0], 0
mov	dword ptr [esi+0Ch], 0
push	edi
mov	eax, esi
mov	dword ptr [esi+10h], 0
call	sub_4120A0
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax]
cmp	[esi], edi
jz	short loc_412243
test	edi, edi
jz	short loc_41221A
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41221A:
mov	eax, [esi]
test	eax, eax
jz	short loc_412241
movzx	edx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
mov	[esp+10h+arg_0], edx
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_412241
mov	eax, [esp+0Ch+arg_0]
push	esi
call	sub_1171F60

loc_412241:
mov	[esi], edi

loc_412243:
mov	eax, [esp+0Ch+arg_4]
mov	edi, [eax]
mov	[esp+0Ch+arg_0], edi
cmp	[ebx], edi
jz	short loc_412286
test	edi, edi
jz	short loc_41225F
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41225F:
mov	eax, [ebx]
test	eax, eax
jz	short loc_412284
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_412280
push	ebx
mov	eax, edi
call	sub_1171F60

loc_412280:
mov	edi, [esp+0Ch+arg_0]

loc_412284:
mov	[ebx], edi

loc_412286:
mov	edx, [esp+0Ch+arg_8]
mov	ebx, [edx]
cmp	[ebp+0], ebx
jz	short loc_4122C4
test	ebx, ebx
jz	short loc_41229F
lea	eax, [ebx-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41229F:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_4122C1
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4122C1
push	ebp
mov	eax, edi
call	sub_1171F60

loc_4122C1:
mov	[ebp+0], ebx

loc_4122C4:
mov	ecx, [esp+0Ch+arg_C]
mov	edi, [ecx]
cmp	[esi+0Ch], edi
lea	ebx, [esi+0Ch]
jz	short loc_412303
test	edi, edi
jz	short loc_4122E0
lea	edx, [edi-8]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_4122E0:
mov	eax, [ebx]
test	eax, eax
jz	short loc_412301
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_412301
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_412301:
mov	[ebx], edi

loc_412303:
mov	eax, [esp+0Ch+arg_10]
mov	ebp, [eax]
cmp	[esi+10h], ebp
lea	ebx, [esi+10h]
jz	short loc_412342
test	ebp, ebp
jz	short loc_41231F
lea	ecx, [ebp-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41231F:
mov	eax, [ebx]
test	eax, eax
jz	short loc_412340
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_412340
push	ebx
mov	eax, edi
call	sub_1171F60

loc_412340:
mov	[ebx], ebp

loc_412342:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
retn	14h
sub_4121D0 endp

align 10h



sub_412350 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	byte ptr [eax+0Ch], 0FFh
retn
sub_412350 endp

align 10h



sub_412370 proc	near
mov	eax, ecx
mov	dword ptr [eax], 0
retn
sub_412370 endp

align 10h



sub_412380 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_11B9D60
test	[esp+4+arg_0], 1
jz	short loc_4123A8
test	esi, esi
jz	short loc_4123A8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_4123A8:
mov	eax, esi
pop	esi
retn	4
sub_412380 endp

align 10h



sub_4123B0 proc	near
mov	eax, offset off_17EDE00
retn
sub_4123B0 endp

align 10h



sub_4123C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_154EF78
test	eax, eax
jz	short loc_4123E0
mov	ecx, [esi+10h]
mov	edx, dword_185F3A0[ecx*4]
push	eax
call	edx ; dword_185F3A0
add	esp, 4

loc_4123E0:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41240B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41240B:
mov	eax, esi
pop	esi
retn	4
sub_4123C0 endp

align 10h



sub_412420 proc	near
mov	eax, offset off_17EDE08
retn
sub_412420 endp

align 10h



sub_412430 proc	near
push	ebx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], bl
mov	dword ptr [esi], offset	off_154EF78
mov	eax, esi
pop	ebx
retn
sub_412430 endp

align 10h



sub_412460 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
cmp	edi, ebx
jz	short loc_41249A
test	edi, edi
jz	short loc_41248A
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41248A
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41248A:
mov	[esi], ebx
test	ebx, ebx
jz	short loc_41249A
add	ebx, 4
push	ebx		; lpAddend
call	ds:InterlockedIncrement

loc_41249A:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_412460 endp

align 10h



sub_4124B0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	ebx, ecx
mov	esi, [ebx+8]
push	edi
mov	edi, [esp+0Ch+arg_0]
cmp	esi, edi
jz	short loc_4124EC
test	esi, esi
jz	short loc_4124DB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4124DB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4124DB:
mov	[ebx+8], edi
test	edi, edi
jz	short loc_4124EC
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_4124EC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4124B0 endp

align 10h



sub_412500 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+4]
mov	ecx, [esp+arg_0]
lea	eax, [eax+ecx*4]
retn	4
sub_412500 endp

align 10h



sub_412510 proc	near
movzx	eax, word ptr [eax+0Ah]
retn
sub_412510 endp

align 10h



sub_412520 proc	near
add	eax, 1Ch
retn
sub_412520 endp

align 10h



sub_412530 proc	near
mov	eax, offset off_17EDE10
retn
sub_412530 endp

align 10h



; int __stdcall	sub_412540(float)
sub_412540 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fstp	dword ptr [eax+0Ch]
retn	4
sub_412540 endp

align 10h



sub_412550 proc	near
mov	eax, offset off_17EDE18
retn
sub_412550 endp

align 10h



sub_412560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax+10h]
push	esi
mov	esi, [esp+4+arg_4]
test	eax, eax
jz	short loc_412588
push	edi
mov	edi, [eax+8]
mov	[esi], edi
mov	esi, [eax+10h]
mov	[edx], esi
mov	dl, [eax+14h]
mov	eax, [eax+0Ch]
pop	edi
mov	[ecx], dl
pop	esi
retn	8

loc_412588:
mov	dword ptr [esi], 0
mov	dword ptr [edx], 0
mov	byte ptr [ecx],	0
xor	eax, eax
pop	esi
retn	8
sub_412560 endp

align 10h



sub_4125A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+44h]
mov	dword ptr [esi], offset	off_154F118
mov	eax, [edi]
test	eax, eax
jz	short loc_4125D0
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4125CF
push	edi
mov	eax, ebx
call	sub_1171F60

loc_4125CF:
pop	ebx

loc_4125D0:
mov	ecx, esi
call	sub_12769B0
test	[esp+8+arg_0], 1
jz	short loc_4125F1
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_4125F1:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_4125A0 endp

align 10h



sub_412600 proc	near
mov	eax, offset off_17EDE20
retn
sub_412600 endp

align 10h



sub_412610 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+44h]
mov	dword ptr [esi], offset	off_154F1C0
mov	eax, [edi]
test	eax, eax
jz	short loc_412640
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41263F
push	edi
mov	eax, ebx
call	sub_1171F60

loc_41263F:
pop	ebx

loc_412640:
mov	ecx, esi
call	sub_12769B0
test	[esp+8+arg_0], 1
jz	short loc_412661
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_412661:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_412610 endp

align 10h



sub_412670 proc	near
mov	eax, offset off_17EDE28
retn
sub_412670 endp

align 10h



sub_412680 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11B6DF0
test	[esp+4+arg_0], 1
jz	short loc_4126A6
test	esi, esi
jz	short loc_4126A6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_4126A6:
mov	eax, esi
pop	esi
retn	4
sub_412680 endp

align 10h



sub_4126B0 proc	near
mov	ecx, [ecx+2Ch]
test	ecx, ecx
jz	short loc_4126D0
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
test	eax, eax
jz	short loc_4126D0

loc_4126C2:
cmp	eax, offset off_17EE218
jz	short loc_4126D3
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_4126C2

loc_4126D0:
xor	al, al
retn

loc_4126D3:
mov	al, 1
retn
sub_4126B0 endp

align 10h



sub_4126E0 proc	near
mov	eax, offset off_17EDE30
retn
sub_4126E0 endp

align 10h



sub_4126F0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [edi+38h]
cmp	esi, ebx
jz	short loc_412729
test	esi, esi
jz	short loc_412718
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_412718
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_412718:
mov	[edi+38h], ebx
test	ebx, ebx
jz	short loc_412729
add	ebx, 4
push	ebx		; lpAddend
call	ds:InterlockedIncrement

loc_412729:
push	edi
call	sub_412800
cmp	[esp+8+arg_4], 0
pop	esi
pop	ebx
jz	short locret_412744
mov	edx, [edi]
mov	eax, [edx+0A4h]
mov	ecx, edi
call	eax

locret_412744:
retn	8
sub_4126F0 endp

align 10h



; int __stdcall	sub_412750(float)
sub_412750 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
fld	[esp+arg_0]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
fstp	dword ptr [eax+0Ch]
mov	[eax+8], ecx
retn	4
sub_412750 endp

align 10h



sub_412770 proc	near
mov	eax, [eax+24h]
retn
sub_412770 endp

align 10h



sub_412780 proc	near
and	eax, 0FFFh
or	[ecx+34h], ax
retn
sub_412780 endp

align 10h



sub_412790 proc	near
mov	ax, [eax+0Ch]
retn
sub_412790 endp

align 10h



sub_4127A0 proc	near
mov	ecx, [eax+0B4h]
mov	ax, [ecx+0Ch]
retn
sub_4127A0 endp

align 10h



sub_4127B0 proc	near
mov	eax, [ecx+2Ch]
test	eax, eax
jz	short loc_4127C1
mov	eax, [eax+0B4h]
mov	eax, [eax+20h]
retn

loc_4127C1:
xor	eax, eax
retn
sub_4127B0 endp

align 10h



sub_4127D0 proc	near
mov	eax, [eax+0B4h]
retn
sub_4127D0 endp

align 10h



sub_4127E0 proc	near
mov	eax, [eax+38h]
test	eax, eax
jz	short loc_4127EB
mov	eax, [eax+8]
retn

loc_4127EB:
xor	eax, eax
retn
sub_4127E0 endp

align 10h



sub_4127F0 proc	near
fldz
mov	eax, ecx
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 0
retn
sub_4127F0 endp

align 10h



sub_412800 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
mov	eax, [ebp+3Ch]
push	esi
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_41283C
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_40AB60
push	ecx
push	8
push	eax
call	$LN21_0
cmp	esi, edi
jz	short loc_41283C
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_41283C:
mov	eax, [ebp+38h]
mov	[ebp+3Ch], edi
cmp	eax, edi
jz	short loc_41288E
mov	esi, [eax+8]
cmp	esi, edi
jbe	short loc_41288E
xor	ecx, ecx
mov	eax, esi
mov	edx, 8
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
cmp	eax, edi
jz	short loc_41288B
push	offset sub_4127F0
push	esi
lea	edi, [eax+4]
push	8
push	edi
mov	[eax], esi
call	sub_4078B0

loc_41288B:
mov	[ebp+3Ch], edi

loc_41288E:
pop	edi
pop	esi
pop	ebp
retn	4
sub_412800 endp

align 10h



sub_4128A0 proc	near
mov	eax, offset off_17EDE38
retn
sub_4128A0 endp

align 10h



; int __stdcall	sub_4128B0(int,	float)
sub_4128B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_40F4C0
mov	eax, [esp+4+arg_0]
fstp	dword ptr [eax+5Ch]
add	esp, 4
retn	8
sub_4128B0 endp

align 10h



sub_4128D0 proc	near
add	ecx, 2Ch
jmp	sub_40FF40
sub_4128D0 endp

align 10h



sub_4128E0 proc	near
mov	edx, [eax]
mov	[ecx+50h], edx
mov	edx, [eax+4]
mov	[ecx+54h], edx
mov	eax, [eax+8]
mov	[ecx+58h], eax
retn
sub_4128E0 endp

align 10h



; int __thiscall sub_412900(char, int, float)
sub_412900 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
push	eax		; char
push	ecx		; float
fstp	[esp+0Ch+var_C]
push	ecx		; char
call	sub_11A8AB0
fld	ds:flt_1543C88
mov	dword ptr [esi], offset	off_154DE10
mov	edx, dword_17EDF44
mov	[esi+30h], edx
mov	eax, dword_17EDF48
mov	[esi+34h], eax
mov	ecx, dword_17EDF4C
mov	[esi+38h], ecx
mov	edx, dword_17EDF50
mov	[esi+3Ch], edx
mov	eax, dword_17EDF54
mov	[esi+40h], eax
mov	ecx, dword_17EDF58
mov	[esi+44h], ecx
mov	edx, dword_17EDF5C
fstp	dword ptr [esi+4Ch]
mov	[esi+48h], edx
mov	al, [esi+0Dh]
mov	dword ptr [esi+50h], 0
mov	byte ptr [esi+54h], 0
test	al, al
jbe	short loc_4129B8
push	ebp
movzx	ebp, al
xor	ecx, ecx
mov	eax, ebp
mov	edx, 68h
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
mov	edi, eax
add	esp, 4
test	edi, edi
jz	short loc_4129B1
push	offset sub_40FDF0
push	ebp
push	68h
push	edi
call	sub_4078B0
mov	[esi+50h], edi
pop	edi
pop	ebp
mov	eax, esi
pop	esi
retn	8

loc_4129B1:
xor	edi, edi
mov	[esi+50h], edi
pop	edi
pop	ebp

loc_4129B8:
mov	eax, esi
pop	esi
retn	8
sub_412900 endp

align 10h



sub_4129C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[eax+18h], ecx
mov	ecx, [esp+arg_8]
mov	[eax+1Ch], edx
mov	edx, [esp+arg_C]
push	ebx
mov	[eax+20h], ecx
push	esi
mov	[eax+24h], edx
mov	esi, [eax+2Ch]
xor	ebx, ebx
cmp	esi, ebx
jz	short loc_412A19
push	edi
mov	edi, [esi+0Ch]
cmp	edi, ebx
jz	short loc_412A0C
cmp	dword ptr [esi+10h], 4
jnz	short loc_4129FC
mov	eax, edi
call	sub_124A1E0

loc_4129FC:
mov	eax, [esi+10h]
mov	ecx, dword_185F3D0[eax*4]
push	edi
call	ecx ; dword_185F3D0
add	esp, 4

loc_412A0C:
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], bl
pop	edi

loc_412A19:
pop	esi
pop	ebx
retn	10h
sub_4129C0 endp

align 10h



sub_412A20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[eax+0Ch], ecx
mov	ecx, [esp+arg_8]
push	ebx
mov	[eax+10h], edx
push	esi
mov	[eax+14h], ecx
mov	esi, [eax+2Ch]
xor	ebx, ebx
cmp	esi, ebx
jz	short loc_412A63
mov	eax, [esi+1Ch]
cmp	eax, ebx
jz	short loc_412A57
mov	edx, [esi+20h]
push	eax
mov	eax, dword_185F3B8[edx*4]
call	eax ; dword_185F3B8
add	esp, 4

loc_412A57:
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], bl

loc_412A63:
pop	esi
pop	ebx
retn	0Ch
sub_412A20 endp

align 10h



; int __stdcall	sub_412A70(float, int, int, int, float,	int, int, float)
sub_412A70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

fld	[esp+arg_10]
push	ebx
fcomp	ds:dbl_15FCDD0
push	esi
fnstsw	ax
test	ah, 44h
jnp	short loc_412AAA
mov	ecx, [esp+8+arg_C]
mov	edx, [esp+8+arg_10]
sub	esp, 10h
mov	eax, esp
mov	[eax], ecx
mov	ecx, [esp+18h+arg_14]
mov	[eax+4], edx
mov	edx, [esp+18h+arg_18]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	eax, edi
call	sub_4129C0

loc_412AAA:
fld	[esp+8+arg_1C]
fcom	ds:dbl_15FCDD0
fnstsw	ax
test	ah, 44h
jnp	short loc_412AEC
fstp	dword ptr [edi+28h]
mov	esi, [edi+2Ch]
xor	ebx, ebx
cmp	esi, ebx
jz	short loc_412AEE
mov	eax, [esi+2Ch]
cmp	eax, ebx
jz	short loc_412ADE
mov	ecx, [esi+30h]
mov	edx, dword_185F3A0[ecx*4]
push	eax
call	edx ; dword_185F3A0
add	esp, 4

loc_412ADE:
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+34h], bl
mov	[esi+30h], ebx
jmp	short loc_412AEE

loc_412AEC:
fstp	st

loc_412AEE:
fld	[esp+8+arg_0]
fcomp	ds:dbl_15FCDD0
fnstsw	ax
test	ah, 44h
jnp	short loc_412B1F
mov	ecx, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
sub	esp, 0Ch
mov	eax, esp
mov	[eax], ecx
mov	ecx, [esp+14h+arg_8]
mov	[eax+4], edx
mov	[eax+8], ecx
mov	eax, edi
call	sub_412A20

loc_412B1F:
pop	esi
pop	ebx
retn	20h
sub_412A70 endp

align 10h



sub_412B30 proc	near
add	eax, 50h
retn
sub_412B30 endp

align 10h



sub_412B40 proc	near
fld	dword ptr [eax+5Ch]
retn
sub_412B40 endp

align 10h



sub_412B50 proc	near
push	esi
mov	esi, ecx
add	esi, 2Ch
push	eax
call	sub_116EE30
pop	esi
retn
sub_412B50 endp

align 10h



sub_412B60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11B56A0
test	[esp+4+arg_0], 1
jz	short loc_412B86
test	esi, esi
jz	short loc_412B86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_412B86:
mov	eax, esi
pop	esi
retn	4
sub_412B60 endp

align 10h



sub_412B90 proc	near
mov	eax, offset off_17EDE40
retn
sub_412B90 endp

align 10h



sub_412BA0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_154F400
call	sub_40FA20
test	[esp+4+arg_0], 1
jz	short loc_412BC8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	edi
call	eax

loc_412BC8:
mov	eax, edi
pop	edi
retn	4
sub_412BA0 endp

align 10h



sub_412BD0 proc	near
mov	eax, offset off_17EDE48
retn
sub_412BD0 endp

align 10h



sub_412BE0 proc	near
add	eax, 0F0h
retn
sub_412BE0 endp

align 10h



sub_412BF0 proc	near
add	eax, 0E4h
retn
sub_412BF0 endp

align 10h



sub_412C00 proc	near
mov	edx, [ecx]
mov	[eax+0F0h], edx
mov	edx, [ecx+4]
mov	[eax+0F4h], edx
mov	ecx, [ecx+8]
inc	dword ptr [eax+0B8h]
mov	[eax+0F8h], ecx
retn
sub_412C00 endp

align 10h



sub_412C30 proc	near
mov	edx, [ecx]
mov	[eax+0E4h], edx
mov	edx, [ecx+4]
mov	[eax+0E8h], edx
mov	ecx, [ecx+8]
inc	dword ptr [eax+0B8h]
mov	[eax+0ECh], ecx
retn
sub_412C30 endp

align 10h



; int __stdcall	sub_412C60(float, float, float)
sub_412C60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fld	[esp+arg_0]
fstp	dword ptr [eax]
fld	[esp+arg_4]
fstp	dword ptr [eax+4]
fld	[esp+arg_8]
fstp	dword ptr [eax+8]
retn	0Ch
sub_412C60 endp

align 10h



sub_412C80 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_154F4A8
call	sub_40FA20
test	[esp+4+arg_0], 1
jz	short loc_412CA8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	edi
call	eax

loc_412CA8:
mov	eax, edi
pop	edi
retn	4
sub_412C80 endp

align 10h



sub_412CB0 proc	near
mov	eax, offset off_17EDE50
retn
sub_412CB0 endp

align 10h



sub_412CC0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1551878
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_412CEB
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_412CEB
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_412CEB:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_412D13
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_412D13:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_412CC0 endp

align 10h



sub_412D20 proc	near
mov	eax, offset off_17EDE58
retn
sub_412D20 endp

align 10h



sub_412D30 proc	near
mov	ecx, [ecx+2Ch]
test	ecx, ecx
jz	short loc_412D50
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
test	eax, eax
jz	short loc_412D50

loc_412D42:
cmp	eax, offset off_17EE1F0
jz	short loc_412D53
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_412D42

loc_412D50:
xor	al, al
retn

loc_412D53:
mov	al, 1
retn
sub_412D30 endp

align 10h



sub_412D60 proc	near
push	esi
push	edi
mov	edi, eax
add	edi, 2Ch
mov	ecx, 9
mov	esi, edx
rep movsd
pop	edi
pop	esi
retn
sub_412D60 endp

align 10h



sub_412D80 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [edx+ecx*4]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+ecx*4+0Ch]
fld	dword ptr [eax+8]
fstp	dword ptr [edx+ecx*4+18h]
retn	4
sub_412D80 endp

align 10h



sub_412DA0 proc	near

arg_0= dword ptr  4

fld	dword ptr [ecx]
mov	eax, [esp+arg_0]
fchs
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fchs
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fchs
fstp	dword ptr [eax+8]
retn	4
sub_412DA0 endp

align 10h



sub_412DC0 proc	near
fld	dword ptr [eax]
fsub	dword ptr [ecx]
fstp	dword ptr [eax]
fld	dword ptr [eax+4]
fsub	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [eax+8]
fsub	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
retn
sub_412DC0 endp

align 10h



sub_412DE0 proc	near
fld	dword ptr [eax+90h]
retn
sub_412DE0 endp

align 10h



sub_412DF0 proc	near
add	eax, 60h
retn
sub_412DF0 endp

align 10h



sub_412E00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_11B4930
test	[esp+4+arg_0], 1
jz	short loc_412E27
test	esi, esi
jz	short loc_412E27
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_412E27:
mov	eax, esi
pop	esi
retn	4
sub_412E00 endp

align 10h



sub_412E30 proc	near
mov	eax, offset off_17EDE60
retn
sub_412E30 endp

align 10h



sub_412E40 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_154F658
call	sub_40FA20
test	[esp+4+arg_0], 1
jz	short loc_412E68
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	edi
call	eax

loc_412E68:
mov	eax, edi
pop	edi
retn	4
sub_412E40 endp

align 10h



sub_412E70 proc	near
mov	eax, offset off_17EDE68
retn
sub_412E70 endp

align 10h



sub_412E80 proc	near
mov	edx, [ecx]
mov	[eax+40h], edx
mov	edx, [ecx+4]
mov	[eax+44h], edx
mov	ecx, [ecx+8]
inc	dword ptr [eax+54h]
mov	[eax+48h], ecx
retn
sub_412E80 endp

align 10h



sub_412EA0 proc	near
mov	edx, [ecx]
mov	[eax+34h], edx
mov	edx, [ecx+4]
mov	[eax+38h], edx
mov	ecx, [ecx+8]
inc	dword ptr [eax+54h]
mov	[eax+3Ch], ecx
retn
sub_412EA0 endp

align 10h



sub_412EC0 proc	near
mov	edx, [ecx]
mov	[eax+28h], edx
mov	edx, [ecx+4]
mov	[eax+2Ch], edx
mov	ecx, [ecx+8]
inc	dword ptr [eax+54h]
mov	[eax+30h], ecx
retn
sub_412EC0 endp

align 10h



sub_412EE0 proc	near
mov	edx, [ecx]
mov	[eax+1Ch], edx
mov	edx, [ecx+4]
mov	[eax+20h], edx
mov	ecx, [ecx+8]
inc	dword ptr [eax+54h]
mov	[eax+24h], ecx
retn
sub_412EE0 endp

align 10h



sub_412F00 proc	near
add	eax, 28h
retn
sub_412F00 endp

align 10h



sub_412F10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11B3EF0
test	[esp+4+arg_0], 1
jz	short loc_412F36
test	esi, esi
jz	short loc_412F36
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_412F36:
mov	eax, esi
pop	esi
retn	4
sub_412F10 endp

align 10h



sub_412F40 proc	near
mov	eax, offset off_17EDE70
retn
sub_412F40 endp

align 10h



sub_412F50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, eax
xor	ecx, ecx
cmp	edi, ecx
jbe	short loc_412FA7
cmp	[ebx+10h], ecx
push	ebp
lea	ebp, [ebx+10h]
jnz	short loc_412F87
push	18h
call	sub_11110D0
add	esp, 4
test	eax, eax
jz	short loc_412F7F
mov	esi, eax
call	sub_412430
jmp	short loc_412F81

loc_412F7F:
xor	eax, eax

loc_412F81:
push	ebp
call	sub_420330

loc_412F87:
mov	eax, [esp+10h+arg_4]
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+14h+arg_8]
push	eax
call	sub_11B9040
pop	ebp
pop	edi
pop	esi
mov	dword ptr [ebx+14h], 0
pop	ebx
retn	0Ch

loc_412FA7:
mov	esi, [ebx+10h]
cmp	esi, ecx
jz	short loc_412FD4
mov	eax, [esi+0Ch]
cmp	eax, ecx
jz	short loc_412FC7
mov	ecx, [esi+10h]
mov	edx, dword_185F3A0[ecx*4]
push	eax
call	edx ; dword_185F3A0
add	esp, 4
xor	ecx, ecx

loc_412FC7:
mov	[esi+8], ecx
mov	[esi+0Ch], ecx
mov	byte ptr [esi+14h], 0
mov	[esi+10h], ecx

loc_412FD4:
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_412F50 endp

align 10h



sub_412FE0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, 2
jz	short loc_413027
mov	eax, [esi-4]
push	edi
push	offset sub_410330
lea	edi, [esi-4]
push	eax
push	30h
push	esi
call	sub_40F3E0
test	bl, 1
jz	short loc_41301F
test	edi, edi
jz	short loc_41301F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	edi
call	eax

loc_41301F:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_413027:
call	sub_11A8A50
test	bl, 1
jz	short loc_413049
test	esi, esi
jz	short loc_413049
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_413049:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_412FE0 endp




sub_413050 proc	near
movzx	eax, word ptr [eax+0A8h]
shr	eax, 1
and	eax, 1
retn
sub_413050 endp

align 10h



sub_413060 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1245EC0
test	[esp+4+arg_0], 1
jz	short loc_413086
test	esi, esi
jz	short loc_413086
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	64h
push	3
push	esi
call	eax

loc_413086:
mov	eax, esi
pop	esi
retn	4
sub_413060 endp

align 10h



sub_413090 proc	near
mov	eax, offset off_17EDE80
retn
sub_413090 endp

align 10h



sub_4130A0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+44h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_4130DC
test	esi, esi
jz	short loc_4130CB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4130CB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4130CB:
mov	[ebx+44h], edi
test	edi, edi
jz	short loc_4130DC
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_4130DC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4130A0 endp

align 10h



sub_4130F0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+40h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41312C
test	esi, esi
jz	short loc_41311B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41311B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41311B:
mov	[ebx+40h], edi
test	edi, edi
jz	short loc_41312C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41312C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4130F0 endp

align 10h



; int __stdcall	sub_413140(float)
sub_413140 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

fld	dword ptr [eax+8]
sub	esp, 10h
fstp	[esp+10h+var_4]
fld	dword ptr [eax+4]
fstp	[esp+10h+var_8]
fld	dword ptr [eax]
fstp	[esp+10h+var_C]
fld	[esp+10h+arg_0]
fstp	[esp+10h+var_10]
call	sub_116BED0
retn	4
sub_413140 endp

align 10h



; int __cdecl sub_413170(float)
sub_413170 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
call	__CIatan
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn
sub_413170 endp

align 10h



sub_413190 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [edx+ecx*4]
fstp	dword ptr [eax]
fld	dword ptr [edx+ecx*4+0Ch]
fstp	dword ptr [eax+4]
fld	dword ptr [edx+ecx*4+18h]
fstp	dword ptr [eax+8]
retn	4
sub_413190 endp

align 10h



; int __stdcall	sub_4131B0(float)
sub_4131B0 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fld1
fdivrp	st(1), st
fstp	[esp+arg_0]
fld	dword ptr [ecx]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fmul	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
retn	4
sub_4131B0 endp

align 10h



sub_4131E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
fld	dword ptr [eax+8]
push	ecx		; float
fmul	dword ptr [ecx+4]
fld	dword ptr [eax+4]
fmul	dword ptr [ecx+8]
fsubp	st(1), st
fstp	[esp+14h+var_C]
fld	dword ptr [ecx+8]
fmul	dword ptr [eax]
fld	dword ptr [ecx]
fmul	dword ptr [eax+8]
fsubp	st(1), st
fstp	[esp+14h+var_8]
fld	dword ptr [eax+4]
fmul	dword ptr [ecx]
fld	dword ptr [eax]
fmul	dword ptr [ecx+4]
fsubp	st(1), st
fstp	[esp+14h+var_4]
fld	[esp+14h+var_8]
fld	[esp+14h+var_C]
fld	[esp+14h+var_4]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+14h+var_10]
fld	[esp+14h+var_10]
fstp	[esp+14h+var_14]
call	sub_40F5B0
fstp	[esp+14h+var_10]
add	esp, 4
fld	flt_17EC798
fld	[esp+10h+var_10]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
mov	eax, esi
jnz	short loc_413285
fld1
fdivrp	st(1), st
fstp	[esp+10h+var_10]
fld	[esp+10h+var_10]
fld	st
fmul	[esp+10h+var_C]
fstp	dword ptr [esi]
fld	st
fmul	[esp+10h+var_8]
fstp	dword ptr [esi+4]
fmul	[esp+10h+var_4]
fstp	dword ptr [esi+8]
add	esp, 10h
retn

loc_413285:
fstp	st
fldz
fst	dword ptr [esi]
fst	dword ptr [esi+4]
fstp	dword ptr [esi+8]
add	esp, 10h
retn
sub_4131E0 endp

align 10h



sub_4132A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax+40h]
push	esi
mov	esi, [esp+4+arg_4]
test	eax, eax
jz	short loc_4132CA
push	ebx
mov	ebx, [eax+8]
mov	[esi], ebx
mov	esi, [eax+10h]
mov	[edx], esi
mov	dl, [eax+14h]
mov	eax, [eax+0Ch]
pop	ebx
mov	[ecx], dl
mov	[edi], eax
pop	esi
retn	8

loc_4132CA:
mov	dword ptr [esi], 0
mov	dword ptr [edx], 0
mov	dword ptr [edi], 0
mov	byte ptr [ecx],	0
pop	esi
retn	8
sub_4132A0 endp

align 10h



sub_4132F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_154F7B8
test	eax, eax
jz	short loc_413310
mov	ecx, [esi+10h]
mov	edx, dword_185F3B8[ecx*4]
push	eax
call	edx ; dword_185F3B8
add	esp, 4

loc_413310:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41333B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41333B:
mov	eax, esi
pop	esi
retn	4
sub_4132F0 endp

align 10h



sub_413350 proc	near
mov	eax, offset off_17EDE98
retn
sub_413350 endp

align 10h



sub_413360 proc	near
push	ebx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], bl
mov	dword ptr [esi], offset	off_154F7B8
mov	eax, esi
pop	ebx
retn
sub_413360 endp

align 10h



sub_413390 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11B1340
test	[esp+4+arg_0], 1
jz	short loc_4133B6
test	esi, esi
jz	short loc_4133B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	5Ch
push	3
push	esi
call	eax

loc_4133B6:
mov	eax, esi
pop	esi
retn	4
sub_413390 endp

align 10h



sub_4133C0 proc	near
mov	eax, offset off_17EDE88
retn
sub_4133C0 endp

align 10h



sub_4133D0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+1Ch]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41340C
test	esi, esi
jz	short loc_4133FB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4133FB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4133FB:
mov	[ebx+1Ch], edi
test	edi, edi
jz	short loc_41340C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41340C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4133D0 endp

align 10h



sub_413420 proc	near
mov	ecx, [ecx+18h]
xor	eax, eax
test	ecx, ecx
jz	short loc_41343C
mov	eax, [ecx+8]
mov	[edi], eax
mov	eax, [ecx+10h]
mov	[esi], eax
mov	al, [ecx+14h]
mov	[edx], al
mov	eax, [ecx+0Ch]
retn

loc_41343C:
mov	[edi], eax
mov	[esi], eax
mov	[edx], al
retn
sub_413420 endp

align 10h



sub_413450 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+18h]
test	edi, edi
jz	short loc_413475
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_413475
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_413475:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_41349D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_41349D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_413450 endp

align 10h



sub_4134B0 proc	near
mov	eax, offset off_17EDE90
retn
sub_4134B0 endp

align 10h



sub_4134C0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+18h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_4134FC
test	esi, esi
jz	short loc_4134EB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4134EB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4134EB:
mov	[ebx+18h], edi
test	edi, edi
jz	short loc_4134FC
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_4134FC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4134C0 endp

align 10h



sub_413510 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+1Ch]
test	edi, edi
jz	short loc_413535
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_413535
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_413535:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_41355D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_41355D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_413510 endp

align 10h



sub_413570 proc	near
mov	eax, offset off_17EDEA0
retn
sub_413570 endp

align 10h



sub_413580 proc	near
mov	eax, offset off_17EDF80
retn
sub_413580 endp

align 10h



sub_413590 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1243850
test	[esp+4+arg_0], 1
jz	short loc_4135B6
test	esi, esi
jz	short loc_4135B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_4135B6:
mov	eax, esi
pop	esi
retn	4
sub_413590 endp

align 10h



sub_4135C0 proc	near
mov	eax, offset off_17EDEA8
retn
sub_4135C0 endp

align 10h



sub_4135D0 proc	near
add	eax, 2Ch
retn
sub_4135D0 endp

align 10h



sub_4135E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_154FAF0
test	eax, eax
jz	short loc_413600
mov	ecx, [esi+10h]
mov	edx, dword_185F3D0[ecx*4]
push	eax
call	edx ; dword_185F3D0
add	esp, 4

loc_413600:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41362B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41362B:
mov	eax, esi
pop	esi
retn	4
sub_4135E0 endp

align 10h



sub_413640 proc	near
mov	eax, offset off_17EDEB0
retn
sub_413640 endp

align 10h



sub_413650 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_154FB38
test	eax, eax
jz	short loc_413674
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_413674:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_4136A0
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_4136A0:
mov	eax, esi
pop	esi
retn	4
sub_413650 endp

align 10h



sub_4136B0 proc	near
mov	eax, offset off_17EDEB8
retn
sub_4136B0 endp

align 10h



sub_4136C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
fld	dword ptr [eax]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
fstp	dword ptr [ebx]
push	edi
mov	edi, [eax+4]
cmp	[ebx+4], edi
lea	esi, [ebx+4]
jz	short loc_413711
test	edi, edi
jz	short loc_4136E8
lea	eax, [edi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4136E8:
mov	eax, [esi]
test	eax, eax
jz	short loc_41370B
push	ebp
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41370A
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41370A:
pop	ebp

loc_41370B:
mov	eax, [esp+0Ch+arg_4]
mov	[esi], edi

loc_413711:
mov	cl, [eax+8]
pop	edi
pop	esi
mov	[ebx+8], cl
mov	eax, ebx
pop	ebx
retn	8
sub_4136C0 endp

align 10h



sub_413720 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+4], ecx
mov	[eax+8], cl
retn
sub_413720 endp

align 10h



sub_413730 proc	near

arg_0= dword ptr  4

test	ecx, ecx
jnz	short loc_413737
xor	al, al
retn

loc_413737:
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
xor	ecx, ecx
cmp	eax, [esp+arg_0]
setz	cl
mov	al, cl
retn
sub_413730 endp

align 10h



sub_413750 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_413780
test	[esp+4+arg_0], 1
jz	short loc_413776
test	esi, esi
jz	short loc_413776
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_413776:
mov	eax, esi
pop	esi
retn	4
sub_413750 endp

align 10h



sub_413780 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi+10h]
mov	dword ptr [edi], offset	off_154FB80
test	eax, eax
jz	short loc_4137BE
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_11A6720
push	ecx
push	0Ch
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4137BD
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4137BD:
pop	esi

loc_4137BE:
mov	ecx, edi
pop	edi
jmp	sub_1160E70
sub_413780 endp

align 10h



sub_4137D0 proc	near
mov	eax, offset off_17EDEC0
retn
sub_4137D0 endp

align 10h



sub_4137E0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4Ch]
mov	dword ptr [edi], offset	off_154FBD0
test	eax, eax
jz	short loc_413804
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_413804:
mov	dword ptr [edi+4Ch], 0
call	sub_40FA20
test	[esp+4+arg_0], 1
jz	short loc_41382B
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	50h
push	3
push	edi
call	eax

loc_41382B:
mov	eax, edi
pop	edi
retn	4
sub_4137E0 endp

align 10h



sub_413840 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
test	ecx, ecx
jz	short loc_413861
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
test	eax, eax
jz	short loc_413861

loc_413853:
cmp	eax, offset off_17EE1F8
jz	short loc_413866
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_413853

loc_413861:
xor	al, al
retn	4

loc_413866:
mov	al, 1
retn	4
sub_413840 endp

align 10h



sub_413870 proc	near
mov	eax, offset off_17EDEC8
retn
sub_413870 endp

align 10h



sub_413880 proc	near
cmp	byte ptr [ecx+1Ch], 0
jnz	short loc_4138B4
fld	dword ptr [ecx+0Ch]
fld	dword ptr [edx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4138B4
fld	dword ptr [ecx+10h]
fld	dword ptr [edx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4138B4
xor	eax, eax
mov	[ecx+1Ch], al
mov	eax, [edx]
mov	[ecx+0Ch], eax
mov	edx, [edx+4]
mov	[ecx+10h], edx
retn

loc_4138B4:
mov	eax, 1
mov	[ecx+1Ch], al
mov	eax, [edx]
mov	[ecx+0Ch], eax
mov	edx, [edx+4]
mov	[ecx+10h], edx
retn
sub_413880 endp

align 10h



; int __stdcall	sub_4138D0(float)
sub_4138D0 proc	near

arg_0= dword ptr  4

cmp	byte ptr [ecx+1Ch], 0
fld	[esp+arg_0]
jnz	short loc_4138F3
fld	dword ptr [ecx+8]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4138F3
xor	eax, eax
fstp	dword ptr [ecx+8]
mov	[ecx+1Ch], al
retn	4

loc_4138F3:
mov	eax, 1
fstp	dword ptr [ecx+8]
mov	[ecx+1Ch], al
retn	4
sub_4138D0 endp

align 10h



sub_413910 proc	near
fld	dword ptr [edx]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41393B
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41393B
mov	eax, 1
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn

loc_41393B:
xor	eax, eax
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_413910 endp

align 10h



sub_413950 proc	near
cmp	byte ptr [ecx+1Ch], 0
jnz	short loc_413982
fld	dword ptr [ecx]
fld	dword ptr [edx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_413982
fld	dword ptr [ecx+4]
fld	dword ptr [edx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_413982
xor	eax, eax
mov	[ecx+1Ch], al
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
retn

loc_413982:
mov	eax, 1
mov	[ecx+1Ch], al
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
retn
sub_413950 endp

align 10h



; int __stdcall	sub_4139A0(float, float)
sub_4139A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_0]
fstp	dword ptr [eax]
fld	[esp+arg_4]
fstp	dword ptr [eax+4]
retn	8
sub_4139A0 endp




sub_4139B0 proc	near
cmp	dword ptr [eax+3Ch], 0
jz	short loc_4139B9
mov	al, 1
retn

loc_4139B9:
mov	ecx, [eax+2Ch]
test	ecx, ecx
jnz	short loc_4139C3
xor	al, al
retn

loc_4139C3:
cmp	byte ptr [eax+40h], 0
mov	edx, [eax+44h]
jz	short loc_4139F7
mov	ecx, [ecx+30h]
test	ecx, ecx
jz	short loc_4139EC
push	esi
movzx	esi, word ptr [ecx+0Ah]
cmp	edx, esi
pop	esi
jnb	short loc_4139EC
mov	ecx, [ecx+4]
mov	edx, [ecx+edx*4]
test	edx, edx
mov	[eax+3Ch], edx
setnz	al
retn

loc_4139EC:
xor	edx, edx
test	edx, edx
mov	[eax+3Ch], edx
setnz	al
retn

loc_4139F7:
mov	ecx, [ecx+20h]
mov	edx, [ecx+edx*4]
test	edx, edx
mov	[eax+3Ch], edx
setnz	al
retn
sub_4139B0 endp

align 10h



sub_413A10 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+2Ch]
test	edi, edi
jz	short loc_413A35
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_413A35
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_413A35:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_413A5D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_413A5D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_413A10 endp

align 10h



sub_413A70 proc	near
mov	eax, offset off_17EDED0
retn
sub_413A70 endp

align 10h



sub_413A80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [edi+2Ch]
cmp	esi, ebx
jz	short loc_413AB9
test	esi, esi
jz	short loc_413AA8
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_413AA8
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_413AA8:
mov	[edi+2Ch], ebx
test	ebx, ebx
jz	short loc_413AB9
add	ebx, 4
push	ebx		; lpAddend
call	ds:InterlockedIncrement

loc_413AB9:
pop	esi
mov	dword ptr [edi+34h], 0
mov	dword ptr [edi+38h], 0
mov	dword ptr [edi+30h], 0
pop	ebx
retn	4
sub_413A80 endp

align 10h



sub_413AE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax+2Ch]
push	esi
mov	esi, [esp+4+arg_4]
test	eax, eax
jz	short loc_413B08
push	edi
mov	edi, [eax+28h]
mov	[esi], edi
mov	esi, [eax+30h]
mov	[edx], esi
mov	dl, [eax+34h]
mov	eax, [eax+2Ch]
pop	edi
mov	[ecx], dl
pop	esi
retn	8

loc_413B08:
mov	dword ptr [esi], 0
mov	dword ptr [edx], 0
mov	byte ptr [ecx],	0
xor	eax, eax
pop	esi
retn	8
sub_413AE0 endp

align 10h



sub_413B20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax+2Ch]
push	esi
mov	esi, [esp+4+arg_4]
test	eax, eax
jz	short loc_413B48
push	edi
mov	edi, [eax+18h]
mov	[esi], edi
mov	esi, [eax+20h]
mov	[edx], esi
mov	dl, [eax+24h]
mov	eax, [eax+1Ch]
pop	edi
mov	[ecx], dl
pop	esi
retn	8

loc_413B48:
mov	dword ptr [esi], 0
mov	dword ptr [edx], 0
mov	byte ptr [ecx],	0
xor	eax, eax
pop	esi
retn	8
sub_413B20 endp

align 10h



sub_413B60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_40FA20
test	[esp+4+arg_0], 1
jz	short loc_413B86
test	edi, edi
jz	short loc_413B86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	edi
call	eax

loc_413B86:
mov	eax, edi
pop	edi
retn	4
sub_413B60 endp

align 10h



sub_413B90 proc	near
mov	eax, offset off_17EDED8
retn
sub_413B90 endp

align 10h



sub_413BA0 proc	near
movzx	eax, word ptr [eax+0A8h]
and	eax, 1
retn
sub_413BA0 endp

align 10h



sub_413BB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154FDD0
call	sub_413780
test	[esp+4+arg_0], 1
jz	short loc_413BD8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_413BD8:
mov	eax, esi
pop	esi
retn	4
sub_413BB0 endp

align 10h



sub_413BE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_411EF0
test	[esp+4+arg_0], 1
jz	short loc_413C06
test	esi, esi
jz	short loc_413C06
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_413C06:
mov	eax, esi
pop	esi
retn	4
sub_413BE0 endp

align 10h



sub_413C10 proc	near
mov	eax, offset off_17EDEE0
retn
sub_413C10 endp

align 10h



sub_413C20 proc	near
push	edi
mov	edi, ecx
test	eax, eax
jz	short loc_413C32
add	edi, 3Ch
push	edi
call	sub_420330
pop	edi
retn

loc_413C32:
push	esi
mov	esi, [edi+3Ch]
test	esi, esi
jz	short loc_413C58
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_413C51
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_413C51:
mov	dword ptr [edi+3Ch], 0

loc_413C58:
pop	esi
pop	edi
retn
sub_413C20 endp

align 10h



sub_413C60 proc	near
push	edi
mov	edi, ecx
test	eax, eax
jz	short loc_413C72
add	edi, 40h
push	edi
call	sub_420330
pop	edi
retn

loc_413C72:
push	esi
mov	esi, [edi+40h]
test	esi, esi
jz	short loc_413C98
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_413C91
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_413C91:
mov	dword ptr [edi+40h], 0

loc_413C98:
pop	esi
pop	edi
retn
sub_413C60 endp

align 10h



sub_413CA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
xor	ebx, ebx
push	ebp
mov	ebp, [esp+8+arg_C]
cmp	[esp+8+arg_8], ebx
jbe	short loc_413D26
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
add	edi, 10h
cmp	[edi], ebx
jnz	short loc_413CDA
push	18h
call	sub_11110D0
add	esp, 4
cmp	eax, ebx
jz	short loc_413CD2
mov	esi, eax
call	sub_412430
jmp	short loc_413CD4

loc_413CD2:
xor	eax, eax

loc_413CD4:
push	edi
call	sub_420330

loc_413CDA:
mov	esi, [esp+10h+arg_4]
mov	eax, [edi]
cmp	esi, ebx
jz	short loc_413D0C
cmp	ebp, ebx
jz	short loc_413D0C
mov	cl, ss:byte_185F25C[ebp]
mov	edx, [esp+10h+arg_8]
pop	edi
mov	[eax+0Ch], esi
mov	[eax+10h], ebp
mov	[eax+14h], cl
mov	[eax+8], edx
mov	eax, [esp+0Ch+arg_0]
pop	esi
pop	ebp
mov	[eax+14h], ebx
pop	ebx
retn	10h

loc_413D0C:
pop	edi
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+14h], bl
mov	[eax+10h], ebx
mov	eax, [esp+0Ch+arg_0]
pop	esi
pop	ebp
mov	[eax+14h], ebx
pop	ebx
retn	10h

loc_413D26:
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx+10h]
cmp	eax, ebx
jz	short loc_413D3D
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+14h], bl
mov	[eax+10h], ebx

loc_413D3D:
pop	ebp
pop	ebx
retn	10h
sub_413CA0 endp

align 10h



sub_413D50 proc	near
push	edi
mov	edi, ecx
test	eax, eax
jz	short loc_413D62
add	edi, 38h
push	edi
call	sub_420330
pop	edi
retn

loc_413D62:
push	esi
mov	esi, [edi+38h]
test	esi, esi
jz	short loc_413D88
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_413D81
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_413D81:
mov	dword ptr [edi+38h], 0

loc_413D88:
pop	esi
pop	edi
retn
sub_413D50 endp

align 10h



sub_413D90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
xor	ebx, ebx
push	ebp
mov	ebp, [esp+8+arg_4]
cmp	[esp+8+arg_8], ebx
jbe	short loc_413E12
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
add	edi, 18h
cmp	[edi], ebx
jnz	short loc_413DCA
push	18h
call	sub_11110D0
add	esp, 4
cmp	eax, ebx
jz	short loc_413DC2
mov	esi, eax
call	sub_413360
jmp	short loc_413DC4

loc_413DC2:
xor	eax, eax

loc_413DC4:
push	edi
call	sub_420330

loc_413DCA:
mov	eax, [edi]
cmp	ebp, ebx
jz	short loc_413DF8
mov	esi, [esp+10h+arg_C]
mov	cl, byte_185F262[esi]
mov	edx, [esp+10h+arg_8]
pop	edi
mov	[eax+10h], esi
mov	[eax+0Ch], ebp
mov	[eax+14h], cl
mov	[eax+8], edx
mov	eax, [esp+0Ch+arg_0]
pop	esi
pop	ebp
mov	[eax+1Ch], ebx
pop	ebx
retn	10h

loc_413DF8:
pop	edi
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], bl
mov	eax, [esp+0Ch+arg_0]
pop	esi
pop	ebp
mov	[eax+1Ch], ebx
pop	ebx
retn	10h

loc_413E12:
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx+18h]
cmp	eax, ebx
jz	short loc_413E29
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], bl

loc_413E29:
pop	ebp
pop	ebx
retn	10h
sub_413D90 endp

align 10h



sub_413E30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_11ABD10
test	[esp+4+arg_0], 1
jz	short loc_413E5A
test	esi, esi
jz	short loc_413E5A
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0B4h
push	3
push	esi
call	eax

loc_413E5A:
mov	eax, esi
pop	esi
retn	4
sub_413E30 endp




sub_413E60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_154FE68
call	sub_41C620
test	[esp+4+arg_0], 1
mov	dword ptr [edi], offset	off_15CA734
jz	short loc_413E8E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_413E8E:
mov	eax, edi
pop	edi
retn	4
sub_413E60 endp

align 10h



sub_413EA0 proc	near

arg_0= byte ptr	 4

mov	ecx, [esi]
test	ecx, ecx
jz	short loc_413EAE
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_413EAE:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_413EBD
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_413EBD:
test	[esp+arg_0], 1
jz	short loc_413ED7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_413ED7:
mov	eax, esi
retn	4
sub_413EA0 endp

align 10h



sub_413EE0 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_154FE48
mov	[esi+1Ch], edi
mov	[esi+20h], edi
mov	[esi+24h], edi
mov	eax, esi
pop	edi
retn
sub_413EE0 endp

align 10h



sub_413F10 proc	near
mov	eax, [edi+1Ch]
test	eax, eax
jz	short loc_413F45
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_413F44
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_413F44:
pop	esi

loc_413F45:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ds:InterlockedDecrement
retn
sub_413F10 endp

align 10h



sub_413F60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_413F10
test	[esp+4+arg_0], 1
jz	short loc_413F86
test	edi, edi
jz	short loc_413F86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	edi
call	eax

loc_413F86:
mov	eax, edi
pop	edi
retn	4
sub_413F60 endp

align 10h



; int __thiscall sub_413F90(void *, char)
sub_413F90 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_154FE34
jz	short loc_413FA9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_413FA9:
mov	eax, esi
pop	esi
retn	4
sub_413F90 endp

align 10h



sub_413FB0 proc	near

arg_0= dword ptr  4

mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
mov	ecx, [esp+arg_0]
fld	dword ptr [ecx]
mov	dword ptr [eax], 0
fstp	dword ptr [eax+8]
mov	edx, [esi+8]
mov	[eax+4], edx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_413FE0
mov	[ecx], eax
inc	dword ptr [esi+0Ch]
mov	[esi+8], eax
retn	4

loc_413FE0:
inc	dword ptr [esi+0Ch]
mov	[esi+4], eax
mov	[esi+8], eax
retn	4
sub_413FB0 endp

align 10h



sub_413FF0 proc	near

var_4= dword ptr -4

push	ecx
mov	ecx, [esi+4]
mov	eax, [ecx]
xor	edx, edx
mov	[esi+4], eax
cmp	eax, edx
jz	short loc_414004
mov	[eax+4], edx
jmp	short loc_414007

loc_414004:
mov	[esi+8], edx

loc_414007:
fld	dword ptr [ecx+8]
mov	eax, [esi]
mov	edx, [eax+8]
fstp	[esp+4+var_4]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+4+var_4]
dec	dword ptr [esi+0Ch]
pop	ecx
retn
sub_413FF0 endp

align 10h



sub_414020 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
mov	eax, [edi]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	ecx, [eax+8]
mov	edx, [esp+4+arg_0]
mov	[edx], ecx
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_41403F
mov	[edi], ecx
pop	esi
retn	4

loc_41403F:
mov	ecx, [esi+4]
mov	eax, [eax+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_414062
mov	eax, [esi+8]
lea	eax, [eax+edx*4]

loc_414054:
mov	esi, [eax]
test	esi, esi
jnz	short loc_41406C
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_414054

loc_414062:
mov	dword ptr [edi], 0
pop	esi
retn	4

loc_41406C:
mov	[edi], esi
pop	esi
retn	4
sub_414020 endp

align 10h



sub_414080 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx]
test	edx, edx
setz	al
test	al, al
jz	short loc_414099
mov	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_414099:
push	ebp
push	edi
movzx	edi, word ptr [esi+0Ah]
xor	ecx, ecx
xor	eax, eax
cmp	cx, di
jnb	short loc_4140C6
mov	ebp, [esi+4]
jmp	short loc_4140B0
align 10h

loc_4140B0:
movzx	ecx, ax
cmp	dword ptr [ebp+ecx*4+0], 0
setz	cl
test	cl, cl
jnz	short loc_4140F0
inc	eax
cmp	ax, [esi+0Ah]
jb	short loc_4140B0

loc_4140C6:
movzx	ecx, word ptr [esi+8]
movzx	edi, di
cmp	edi, ecx
jb	short loc_4140DE
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
push	edx
push	esi
call	sub_428E40

loc_4140DE:
push	ebx
mov	ecx, edi
mov	eax, esi
call	sub_426E10
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn	4

loc_4140F0:
movzx	edi, ax
mov	ebx, [ebp+edi*4+0]
cmp	ebx, edx
jz	short loc_41412E
test	ebx, ebx
jz	short loc_414116
lea	edx, [ebx+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_414116
mov	eax, [ebx]
mov	edx, [eax+4]
mov	ecx, ebx
call	edx

loc_414116:
mov	eax, [esp+0Ch+arg_0]
mov	eax, [eax]
mov	[ebp+edi*4+0], eax
test	eax, eax
jz	short loc_41412E
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41412E:
inc	word ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn	4
sub_414080 endp

align 10h



sub_414140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_0]
movzx	ecx, word ptr [ebx+0Ah]
cmp	eax, ecx
jb	short loc_41415F
mov	eax, [esp+4+arg_4]
mov	dword ptr [eax], 0
pop	ebx
retn	0Ch

loc_41415F:
mov	edx, [ebx+4]
push	ebp
push	esi
mov	esi, [edx+eax*4]
lea	ebp, ds:0[eax*4]
push	edi
test	esi, esi
jz	short loc_41417D
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41417D:
mov	edi, [ebx+4]
lea	ecx, [esp+10h+arg_0]
push	ecx
add	edi, ebp
mov	[esp+14h+arg_0], 0
call	sub_418760
test	esi, esi
setnz	al
test	al, al
jz	short loc_4141A6
mov	edx, 0FFFFh
add	[ebx+0Ch], dx

loc_4141A6:
mov	ax, [ebx+0Ah]
dec	ax
movzx	ecx, ax
cmp	[esp+10h+arg_8], ecx
jnz	short loc_4141B9
mov	[ebx+0Ah], ax

loc_4141B9:
mov	ebx, [esp+10h+arg_4]
mov	[ebx], esi
test	esi, esi
jz	short loc_4141E1
lea	edi, [esi+4]
push	edi		; lpAddend
call	ds:InterlockedIncrement
push	edi		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4141E1
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4141E1:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn	0Ch
sub_414140 endp

align 10h



sub_4141F0 proc	near
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
mov	dword ptr [eax], 0
mov	ecx, [esi+8]
mov	[eax+4], ecx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_414218
mov	[ecx], eax
inc	dword ptr [esi+0Ch]
mov	[esi+8], eax
add	eax, 8
retn

loc_414218:
inc	dword ptr [esi+0Ch]
mov	[esi+4], eax
mov	[esi+8], eax
add	eax, 8
retn
sub_4141F0 endp

align 10h



sub_414230 proc	near
push	esi
mov	esi, eax
mov	eax, [edx]
mov	ecx, [esi+4]
cmp	eax, ecx
jnz	short loc_414275
mov	eax, [eax]
mov	[edx], eax
mov	eax, [ecx]
mov	[esi+4], eax
test	eax, eax
jz	short loc_41425F
mov	dword ptr [eax+4], 0
mov	edx, [esi]
mov	eax, [edx+8]
push	ecx
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
pop	esi
retn

loc_41425F:
mov	edx, [esi]
mov	eax, [edx+8]
push	ecx
mov	ecx, esi
mov	dword ptr [esi+8], 0
call	eax
dec	dword ptr [esi+0Ch]
pop	esi
retn

loc_414275:
cmp	eax, [esi+8]
jnz	short loc_414287
mov	dword ptr [edx], 0
call	sub_414340
pop	esi
retn

loc_414287:
mov	ecx, [eax]
push	edi
mov	edi, [eax+4]
mov	[edx], ecx
test	edi, edi
jz	short loc_414295
mov	[edi], ecx

loc_414295:
test	ecx, ecx
jz	short loc_41429C
mov	[ecx+4], edi

loc_41429C:
mov	edx, [esi]
push	eax
mov	eax, [edx+8]
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
pop	edi
pop	esi
retn
sub_414230 endp

align 10h



sub_4142B0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+8]
xor	eax, eax
push	esi
test	edx, edx
jbe	short loc_4142CE
mov	esi, [esp+4+arg_0]
mov	esi, [esi]
mov	ecx, [ecx]

loc_4142C2:
cmp	[ecx], esi
jz	short loc_4142D1
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_4142C2

loc_4142CE:
or	eax, 0FFFFFFFFh

loc_4142D1:
pop	esi
retn	4
sub_4142B0 endp

align 10h



sub_4142E0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	eax, eax
xor	ebx, ebx
cmp	ax, [ebp+0Ah]
jnb	short loc_414328
push	esi
push	edi

loc_4142F2:
mov	edx, [ebp+4]
movzx	ecx, bx
mov	esi, [edx+ecx*4]
lea	edi, [edx+ecx*4]
test	esi, esi
jz	short loc_41431F
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_414319
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_414319:
mov	dword ptr [edi], 0

loc_41431F:
inc	ebx
cmp	bx, [ebp+0Ah]
jb	short loc_4142F2
pop	edi
pop	esi

loc_414328:
xor	ecx, ecx
xor	edx, edx
mov	[ebp+0Ah], cx
mov	[ebp+0Ch], dx
pop	ebp
pop	ebx
retn	4
sub_4142E0 endp

align 10h



sub_414340 proc	near
mov	ecx, [esi+8]
mov	eax, [ecx+4]
mov	[esi+8], eax
test	eax, eax
jz	short loc_414361
mov	dword ptr [eax], 0
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
mov	ecx, esi
call	edx
dec	dword ptr [esi+0Ch]
retn

loc_414361:
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
mov	ecx, esi
mov	dword ptr [esi+4], 0
call	edx
dec	dword ptr [esi+0Ch]
retn
sub_414340 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_414380(float)
sub_414380 proc	near

var_48=	qword ptr -48h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 40h
fld	[ebp+arg_0]
sub	esp, 8
fstp	[esp+48h+var_48]
call	_floor
fstp	[esp+48h+var_4]
add	esp, 8
fld	[esp+40h+var_4]
mov	esp, ebp
pop	ebp
retn
sub_414380 endp

align 10h



sub_4143B0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_4143E0
test	[esp+4+arg_0], 1
jz	short loc_4143D6
test	edi, edi
jz	short loc_4143D6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	edi
call	eax

loc_4143D6:
mov	eax, edi
pop	edi
retn	4
sub_4143B0 endp

align 10h



sub_4143E0 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	ebp
push	esi
lea	esi, [edi+1Ch]
mov	dword ptr [edi], offset	off_154FE58
mov	eax, [esi]
test	eax, eax
jz	short loc_41440F
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41440F
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41440F:
mov	eax, [edi+18h]
lea	esi, [edi+18h]
test	eax, eax
jz	short loc_414430
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_414430
push	esi
mov	eax, ebp
call	sub_1171F60

loc_414430:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	esi
pop	ebp
pop	ebx
retn
sub_4143E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_414450(float)
sub_414450 proc	near

var_48=	qword ptr -48h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 40h
fld	[ebp+arg_0]
sub	esp, 8
fstp	[esp+48h+var_48]
call	_ceil
fstp	[esp+48h+var_4]
add	esp, 8
fld	[esp+40h+var_4]
mov	esp, ebp
pop	ebp
retn
sub_414450 endp

align 10h



sub_414480 proc	near
fld	dword ptr [eax+2Ch]
retn
sub_414480 endp

align 10h



sub_414490 proc	near
fld	dword ptr [eax+30h]
retn
sub_414490 endp

align 10h



sub_4144A0 proc	near
add	eax, 14h
retn
sub_4144A0 endp

align 10h



; int __stdcall	sub_4144B0(int,	float, int, int)
sub_4144B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	[esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, ds:InterlockedIncrement
push	esi
mov	esi, [esp+0Ch+arg_0]
fstp	dword ptr [esi]
push	edi
mov	[esi+4], eax
mov	[esi+8], ecx
mov	edi, [esi+0Ch]
cmp	edi, ebx
jz	short loc_4144FD
test	edi, edi
jz	short loc_4144F0
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4144F0
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_4144F0:
mov	[esi+0Ch], ebx
test	ebx, ebx
jz	short loc_4144FD
add	ebx, 4
push	ebx		; lpAddend
call	ebp ; InterlockedIncrement

loc_4144FD:
mov	eax, [esp+10h+arg_C]
mov	edi, [eax]
add	esi, 10h
cmp	[esi], edi
jz	short loc_414537
test	edi, edi
jz	short loc_414514
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ebp ; InterlockedIncrement

loc_414514:
mov	eax, [esi]
test	eax, eax
jz	short loc_414535
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_414535
push	esi
mov	eax, ebx
call	sub_1171F60

loc_414535:
mov	[esi], edi

loc_414537:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_4144B0 endp

align 10h



sub_414540 proc	near

var_14=	byte ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	esi
push	offset dword_188A778
lea	esi, [esp+20h+var_14]
call	sub_411FC0
mov	ecx, [esp+1Ch+arg_4]
mov	edx, [esp+1Ch+arg_0]
mov	eax, esi
push	eax
push	ecx
push	edx
call	sub_11AAED0
fstp	[esp+1Ch+arg_4]
mov	ecx, esi
call	sub_411EF0
fld	[esp+1Ch+arg_4]
pop	esi
add	esp, 18h
retn	8
sub_414540 endp

align 10h



sub_414580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	ecx
cmp	edx, 3		; switch 4 cases
ja	short loc_4145C2 ; default
jmp	ds:off_4145CC[edx*4] ; switch jump

loc_414591:		; jumptable 0041458A case 0
push	eax
push	ecx
call	sub_11AB600
pop	ecx
retn	8

loc_41459C:		; jumptable 0041458A case 1
push	eax
push	ecx
call	sub_11AB2C0
pop	ecx
retn	8

loc_4145A7:		; jumptable 0041458A case 2
mov	edx, [esp+4+arg_4]
push	edx
push	eax
push	ecx
call	sub_11AAED0
pop	ecx
retn	8

loc_4145B7:		; jumptable 0041458A case 3
push	eax
push	ecx
call	sub_414540
pop	ecx
retn	8

loc_4145C2:		; default
fld	ds:flt_1543C88
pop	ecx
retn	8
sub_414580 endp

off_4145CC dd offset loc_414591	; jump table for switch	statement
dd offset loc_41459C
dd offset loc_4145A7
dd offset loc_4145B7
align 10h



sub_4145E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_414610
test	[esp+4+arg_0], 1
jz	short loc_414606
test	esi, esi
jz	short loc_414606
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_414606:
mov	eax, esi
pop	esi
retn	4
sub_4145E0 endp

align 10h



sub_414610 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	edi
mov	dword ptr [esi], offset	off_154FE60
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_41463F
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_414638
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_414638:
mov	dword ptr [esi+10h], 0

loc_41463F:
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_414659
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_414659
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_414659:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	edi
pop	ebx
retn
sub_414610 endp

align 10h



sub_414670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, ds:InterlockedIncrement
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ebp ; InterlockedIncrement
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [esi], offset	off_154FE60
mov	[esi+8], eax
mov	dword ptr [esi+0Ch], 0FFFFFFFFh
mov	[esi+10h], edi
cmp	edi, ebx
jz	short loc_4146D2
test	edi, edi
jz	short loc_4146C5
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4146C5
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_4146C5:
mov	[esi+10h], ebx
test	ebx, ebx
jz	short loc_4146D2
add	ebx, 4
push	ebx		; lpAddend
call	ebp ; InterlockedIncrement

loc_4146D2:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
retn	8
sub_414670 endp

align 10h



sub_4146E0 proc	near
xor	edx, edx
mov	eax, esi
div	dword ptr [ecx+1Ch]
mov	eax, [ecx+20h]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_4146FC

loc_4146F1:
cmp	esi, [edx+4]
jz	short loc_4146FF
mov	edx, [edx]
test	edx, edx
jnz	short loc_4146F1

loc_4146FC:
xor	eax, eax
retn

loc_4146FF:
mov	ecx, [edx+8]
test	ecx, ecx
jz	short loc_4146FC
xor	edx, edx
mov	eax, edi
div	dword ptr [ecx+10h]
mov	ecx, [ecx+14h]
mov	edx, [ecx+edx*4]
test	edx, edx
jz	short loc_4146FC

loc_414717:
cmp	edi, [edx+4]
jz	short loc_414725
mov	edx, [edx]
test	edx, edx
jnz	short loc_414717
xor	eax, eax
retn

loc_414725:
mov	eax, [edx+8]
retn
sub_4146E0 endp

align 10h



sub_414730 proc	near

arg_0= dword ptr  4

xor	edx, edx
mov	eax, esi
div	dword ptr [ecx+1Ch]
mov	eax, [ecx+20h]
push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_41475F

loc_414746:
cmp	esi, [edx+4]
jz	short loc_414758
mov	edx, [edx]
test	edx, edx
jnz	short loc_414746
lea	eax, [edx+2]
pop	ebx
retn	4

loc_414758:
mov	ecx, [edx+8]
test	ecx, ecx
jnz	short loc_414768

loc_41475F:
mov	eax, 2
pop	ebx
retn	4

loc_414768:
xor	edx, edx
mov	eax, edi
div	dword ptr [ecx+10h]
mov	ecx, [ecx+14h]
mov	edx, [ecx+edx*4]
test	edx, edx
jz	short loc_41478B
lea	esp, [esp+0]

loc_414780:
cmp	edi, [edx+4]
jz	short loc_414794
mov	edx, [edx]
test	edx, edx
jnz	short loc_414780

loc_41478B:
mov	byte ptr [ebx],	0
xor	eax, eax
pop	ebx
retn	4

loc_414794:
cmp	dword ptr [edx+8], 0
jz	short loc_41478B
mov	byte ptr [ebx],	1
xor	eax, eax
pop	ebx
retn	4
sub_414730 endp

align 10h



sub_4147B0 proc	near

arg_0= dword ptr  4

xor	edx, edx
mov	eax, esi
div	dword ptr [ecx+4]
mov	eax, [ecx+8]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_4147CC

loc_4147C1:
cmp	esi, [edx+4]
jz	short loc_4147D1
mov	edx, [edx]
test	edx, edx
jnz	short loc_4147C1

loc_4147CC:
xor	al, al
retn	4

loc_4147D1:
mov	ecx, [edx+8]
mov	edx, [esp+arg_0]
mov	[edx], ecx
mov	al, 1
retn	4
sub_4147B0 endp

align 10h



sub_4147E0 proc	near
xor	edx, edx
mov	eax, esi
div	dword ptr [ecx+7Ch]
mov	eax, [ecx+80h]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_4147FF

loc_4147F4:
cmp	esi, [edx+4]
jz	short loc_414802
mov	edx, [edx]
test	edx, edx
jnz	short loc_4147F4

loc_4147FF:
xor	eax, eax
retn

loc_414802:
mov	eax, [edx+8]
retn
sub_4147E0 endp

align 10h



sub_414810 proc	near
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_41481E
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_41481E:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short locret_41482D
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

locret_41482D:
retn
sub_414810 endp

align 10h



sub_414830 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ecx]
lea	eax, [esp+0Ch+arg_0]
push	eax
lea	esi, [ebx+44h]
call	sub_5F8F60
test	al, al
jz	short loc_41485A
mov	edx, [ebx+38h]
mov	eax, [esp+0Ch+arg_0]
mov	eax, [edx+eax*4]
pop	edi
pop	esi
pop	ebx
retn	4

loc_41485A:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_414830 endp

align 10h



sub_414870 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	[esi+4], eax
add	eax, eax
sub	esp, 8
add	eax, eax
mov	dword ptr [esi], offset	off_15C9924
mov	dword ptr [esi+0Ch], 0
jnz	short loc_41488E
mov	eax, 1

loc_41488E:
push	0
push	0FFFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_414870 endp

align 10h



sub_4148E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	[esi+4], eax
add	eax, eax
sub	esp, 8
add	eax, eax
mov	dword ptr [esi], offset	off_15CA5CC
mov	dword ptr [esi+0Ch], 0
jnz	short loc_4148FE
mov	eax, 1

loc_4148FE:
push	0
push	0FFFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_4148E0 endp

align 10h



sub_414950 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 18h
mov	ecx, dword_1889574
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	esi
push	0
push	0FFFFFFFFh
mov	eax, 1
push	0
push	eax
mov	[edi+0Ch], eax
mov	[edi+10h], eax
mov	ecx, [ecx]
push	eax
lea	eax, [esp+34h+arg_0]
push	eax
mov	[esp+38h+arg_0], 4
mov	[esp+38h+var_18], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_18]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_4149B3
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4149B3:
mov	eax, ebx
call	sub_414870
mov	ecx, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	1
mov	dword ptr [esi], offset	off_1550858
mov	[edi], esi
mov	ecx, [ecx]
push	1
lea	eax, [esp+34h+var_14]
push	eax
mov	[esp+38h+var_14], 4
mov	[esp+38h+var_10], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_10]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_414A13
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_414A13:
mov	eax, ebx
call	sub_4148E0
mov	ecx, dword_1889404
mov	dword ptr [esi], offset	off_15CA5B8
mov	[edi+4], esi
pop	esi
mov	[edi+8], ecx
mov	byte ptr [edi+14h], 24h
mov	eax, edi
pop	ebx
add	esp, 18h
retn	4
sub_414950 endp

align 10h



sub_414A40 proc	near
xor	edx, edx
mov	eax, esi
div	dword ptr [ecx+1Ch]
mov	eax, [ecx+20h]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_414A5C

loc_414A51:
cmp	esi, [edx+4]
jz	short loc_414A5F
mov	edx, [edx]
test	edx, edx
jnz	short loc_414A51

loc_414A5C:
xor	eax, eax
retn

loc_414A5F:
mov	eax, [edx+8]
retn
sub_414A40 endp

align 10h



sub_414A70 proc	near
add	eax, 100h
retn
sub_414A70 endp

align 10h



sub_414A80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_414D10
test	[esp+4+arg_0], 1
jz	short loc_414AA7
test	esi, esi
jz	short loc_414AA7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_414AA7:
mov	eax, esi
pop	esi
retn	4
sub_414A80 endp

align 10h



sub_414AB0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+10h]
lea	ebx, [ebp+0Ch]
push	esi
xor	eax, eax
push	edi
test	ecx, ecx
jbe	short loc_414ADD
mov	esi, [ebx+8]
mov	edx, esi
lea	esp, [esp+0]

loc_414AD0:
cmp	dword ptr [edx], 0
jnz	short loc_414AF2
inc	eax
add	edx, 4
cmp	eax, ecx
jb	short loc_414AD0

loc_414ADD:
xor	eax, eax

loc_414ADF:
mov	edi, eax
test	eax, eax
jz	short loc_414B46

loc_414AE5:
mov	eax, [edi]
mov	esi, [edi+8]
test	eax, eax
jz	short loc_414AF7
mov	edi, eax
jmp	short loc_414B20

loc_414AF2:
mov	eax, [esi+eax*4]
jmp	short loc_414ADF

loc_414AF7:
mov	ecx, [ebx+4]
mov	eax, [edi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_414B1E
mov	eax, [ebx+8]
lea	eax, [eax+edx*4]
lea	esp, [esp+0]

loc_414B10:
mov	edi, [eax]
test	edi, edi
jnz	short loc_414B20
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_414B10

loc_414B1E:
xor	edi, edi

loc_414B20:
mov	eax, [esi+20h]
mov	ecx, eax
cmp	eax, 6
jnz	short loc_414B2C
mov	ecx, [esi]

loc_414B2C:
cmp	ecx, 4
jz	short loc_414B42
cmp	eax, 6
jnz	short loc_414B38
mov	eax, [esi]

loc_414B38:
cmp	eax, 5
jz	short loc_414B42
call	sub_414CB0

loc_414B42:
test	edi, edi
jnz	short loc_414AE5

loc_414B46:
mov	esi, ebx
mov	dword ptr [ebx], offset	off_1550858
call	sub_418AE0
mov	dword ptr [ebx], offset	off_15C9924
call	sub_418AE0
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_414B79
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_414B79:
mov	eax, [ebp+4]
lea	esi, [ebp+4]
test	eax, eax
jz	short loc_414B9E
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_414B9E
push	esi
mov	eax, edi
call	sub_1171F60

loc_414B9E:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_414AB0 endp

align 10h



sub_414BB0 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+8]
test	eax, eax
jz	short loc_414BCE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_414BCE:
mov	eax, [esi+4]
add	esi, 4
test	eax, eax
jz	short loc_414BF5
push	edi
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_414BF4
push	esi
mov	eax, edi
call	sub_1171F60

loc_414BF4:
pop	edi

loc_414BF5:
pop	esi
retn
sub_414BB0 endp

align 10h



sub_414C00 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
mov	eax, [ebp+4]
push	esi
lea	esi, [ebp+4]
push	edi
mov	edi, ds:InterlockedDecrement
test	eax, eax
jz	short loc_414C30
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	edi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_414C2F
push	esi
mov	eax, ebx
call	sub_1171F60

loc_414C2F:
pop	ebx

loc_414C30:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_414C4E
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	edi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_414C4E
push	ebp
mov	eax, esi
call	sub_1171F60

loc_414C4E:
pop	edi
pop	esi
pop	ebp
retn	4
sub_414C00 endp

align 10h



sub_414C60 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
xor	edi, edi
cmp	[ebx+10h], edi
jbe	short loc_414CA7
push	esi
mov	edi, edi

loc_414C70:
mov	eax, [ebx+8]
mov	esi, [eax+edi*4]
test	esi, esi
jz	short loc_414C94
push	esi
call	sub_414C00
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8
push	3
push	esi
call	eax

loc_414C94:
inc	edi
cmp	edi, [ebx+10h]
jb	short loc_414C70
pop	esi
pop	edi
mov	dword ptr [ebx+10h], 0
pop	ebx
retn	4

loc_414CA7:
mov	[ebx+10h], edi
pop	edi
pop	ebx
retn	4
sub_414C60 endp

align 10h



sub_414CB0 proc	near
push	esi
call	sub_414C60
mov	eax, [esi+14h]
test	eax, eax
jz	short loc_414CD1
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_414CD1:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_414CEC
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_414CEC:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax
mov	eax, esi
retn
sub_414CB0 endp

align 10h



sub_414D10 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	dword ptr [ebx], offset	off_154FE50
mov	ecx, [ebx+1Ch]
push	esi
xor	eax, eax
push	edi
test	ecx, ecx
jbe	short loc_414D3D
mov	esi, [ebx+20h]
mov	edx, esi
lea	esp, [esp+0]

loc_414D30:
cmp	dword ptr [edx], 0
jnz	short loc_414D52
inc	eax
add	edx, 4
cmp	eax, ecx
jb	short loc_414D30

loc_414D3D:
xor	eax, eax

loc_414D3F:
mov	esi, eax
test	eax, eax
jz	short loc_414DA2

loc_414D45:
mov	eax, [esi]
mov	edi, [esi+8]
test	eax, eax
jz	short loc_414D57
mov	esi, eax
jmp	short loc_414D80

loc_414D52:
mov	eax, [esi+eax*4]
jmp	short loc_414D3F

loc_414D57:
mov	ecx, [ebx+1Ch]
mov	eax, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_414D7E
mov	eax, [ebx+20h]
lea	eax, [eax+edx*4]
lea	esp, [esp+0]

loc_414D70:
mov	esi, [eax]
test	esi, esi
jnz	short loc_414D80
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_414D70

loc_414D7E:
xor	esi, esi

loc_414D80:
test	edi, edi
jz	short loc_414D9E
push	edi
call	sub_414AB0
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	edi
call	eax

loc_414D9E:
test	esi, esi
jnz	short loc_414D45

loc_414DA2:
mov	edx, [ebx+2Ch]
xor	eax, eax
test	edx, edx
jbe	short loc_414DBD
mov	esi, [ebx+30h]
mov	ecx, esi

loc_414DB0:
cmp	dword ptr [ecx], 0
jnz	short loc_414DDD
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_414DB0

loc_414DBD:
xor	eax, eax

loc_414DBF:
mov	esi, eax
test	eax, eax
jz	loc_414E6B
lea	esp, [esp+0]

loc_414DD0:
mov	eax, [esi]
mov	ebp, [esi+8]
test	eax, eax
jz	short loc_414DE2
mov	esi, eax
jmp	short loc_414E07

loc_414DDD:
mov	eax, [esi+eax*4]
jmp	short loc_414DBF

loc_414DE2:
mov	ecx, [ebx+2Ch]
mov	eax, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_414E05
mov	eax, [ebx+30h]
lea	eax, [eax+edx*4]

loc_414DF7:
mov	esi, [eax]
test	esi, esi
jnz	short loc_414E07
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_414DF7

loc_414E05:
xor	esi, esi

loc_414E07:
test	ebp, ebp
jz	short loc_414E63
mov	eax, [ebp+8]
test	eax, eax
jz	short loc_414E26
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_414E26:
mov	eax, [ebp+4]
lea	edi, [ebp+4]
test	eax, eax
jz	short loc_414E4F
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_414E4B
push	edi
mov	eax, ebx
call	sub_1171F60

loc_414E4B:
mov	ebx, [esp+10h+arg_0]

loc_414E4F:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	ebp
call	eax

loc_414E63:
test	esi, esi
jnz	loc_414DD0

loc_414E6B:
mov	esi, [ebx+38h]
test	esi, esi
jz	short loc_414E77
call	sub_414CB0

loc_414E77:
mov	esi, [ebx+3Ch]
test	esi, esi
jz	short loc_414E83
call	sub_414CB0

loc_414E83:
lea	esi, [ebx+28h]
mov	dword ptr [esi], offset	off_1550858
call	sub_418AE0
mov	dword ptr [esi], offset	off_15C9924
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_414EB7
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_414EB7:
lea	esi, [ebx+18h]
mov	dword ptr [esi], offset	off_1550858
call	sub_418AE0
mov	dword ptr [esi], offset	off_15C9924
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_414EEB
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_414EEB:
mov	eax, [ebx+14h]
mov	ebp, ds:InterlockedDecrement
lea	esi, [ebx+14h]
test	eax, eax
jz	short loc_414F12
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_414F12
push	esi
mov	eax, edi
call	sub_1171F60

loc_414F12:
mov	eax, [ebx+10h]
lea	esi, [ebx+10h]
test	eax, eax
jz	short loc_414F33
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_414F33
push	esi
mov	eax, edi
call	sub_1171F60

loc_414F33:
mov	eax, [ebx+0Ch]
lea	esi, [ebx+0Ch]
test	eax, eax
jz	short loc_414F54
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_414F54
push	esi
mov	eax, edi
call	sub_1171F60

loc_414F54:
mov	eax, [ebx+8]
lea	esi, [ebx+8]
test	eax, eax
jz	short loc_414F75
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_414F75
push	esi
mov	eax, edi
call	sub_1171F60

loc_414F75:		; lpAddend
push	offset Addend
mov	dword ptr [ebx], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_414D10 endp

align 10h



sub_414F90 proc	near
mov	eax, [esi]
test	eax, eax
jz	short loc_414FA0
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_414FA0:
mov	eax, [esi]
mov	[edi], eax
mov	eax, edi
retn
sub_414F90 endp

align 10h



sub_414FB0 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 8
mul	edx
seto	cl
push	esi
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
mov	esi, eax
add	esp, 4
test	esi, esi
jz	short loc_414FE4
push	offset sub_4127F0
push	edi
push	8
push	esi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_414FE4:
xor	eax, eax
pop	esi
retn
sub_414FB0 endp

align 10h



; int __stdcall	sub_414FF0(float)
sub_414FF0 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
mov	[eax], ecx
xor	ecx, ecx
fstp	dword ptr [eax+4]
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	dword ptr [eax+20h], 6
retn	4
sub_414FF0 endp

align 10h



sub_415020 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 1Ch
push	ebx
push	ebp
mov	ebp, ds:InterlockedIncrement
push	esi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	esi, eax
mov	dword ptr [edi], offset	off_154EE18
mov	[edi+4], ebx
call	ebp ; InterlockedIncrement
mov	dword ptr [edi], offset	off_154FE50
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_415052
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebp ; InterlockedIncrement

loc_415052:
mov	eax, [esi]
mov	[edi+8], eax
mov	[edi+0Ch], ebx
mov	[edi+10h], ebx
lea	esi, [edi+18h]
mov	[edi+14h], ebx
call	sub_5F9860
mov	dword ptr [esi], offset	off_1550858
lea	esi, [edi+28h]
call	sub_5F9860
mov	ecx, dword_1889574
push	ebx
push	0FFFFFFFFh
push	ebx
push	1
mov	dword ptr [esi], offset	off_1550858
mov	ecx, [ecx]
push	1
lea	eax, [esp+3Ch+var_1C]
mov	esi, 4
mov	ebp, 24h
push	eax
mov	[esp+40h+var_1C], esi
mov	[esp+40h+var_18], ebp
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+40h+var_18]
push	eax
call	edx
cmp	eax, ebx
jnz	short loc_4150CB
lea	ecx, [esp+28h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+2Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4150CB:
fld	ds:dword_15FCCC0
mov	ecx, dword_1889574
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 1
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
push	ebx
mov	[eax+14h], ebx
mov	[eax+18h], ebx
mov	[eax+1Ch], ebx
push	0FFFFFFFFh
mov	dword ptr [eax+20h], 6
push	ebx
mov	[edi+38h], eax
mov	[eax+20h], esi
mov	ecx, [ecx]
push	1
push	1
lea	eax, [esp+3Ch+var_14]
push	eax
mov	[esp+40h+var_14], esi
mov	[esp+40h+var_10], ebp
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+40h+var_10]
push	eax
call	edx
cmp	eax, ebx
jnz	short loc_41513E
lea	ecx, [esp+28h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+2Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_41513E:
fld	ds:dword_15FCCC0
mov	dword ptr [eax], 2
fstp	dword ptr [eax+4]
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	[eax+18h], ebx
mov	[eax+1Ch], ebx
mov	dword ptr [eax+20h], 6
pop	esi
mov	[edi+3Ch], eax
pop	ebp
mov	dword ptr [eax+20h], 5
mov	eax, edi
pop	ebx
add	esp, 1Ch
retn
sub_415020 endp

align 10h



; int __stdcall	sub_415180(float)
sub_415180 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
xor	eax, eax
xor	esi, esi
cmp	ax, [edi+3Eh]
jnb	short loc_4151B2
jmp	short loc_415190
align 10h

loc_415190:
mov	ecx, [edi+38h]
mov	eax, [ecx+esi*4]
test	eax, eax
jz	short loc_4151A9
fld	[esp+4+arg_0]
push	0		; char
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_11BB2A0

loc_4151A9:
movzx	edx, word ptr [edi+3Eh]
inc	esi
cmp	esi, edx
jb	short loc_415190

loc_4151B2:
pop	esi
retn	4
sub_415180 endp

align 10h



sub_4151C0 proc	near

var_C= dword ptr -0Ch

push	ebx
push	edi
mov	edi, [esi+10h]
xor	ebx, ebx
cmp	edi, ebx
jz	short loc_4151D6
fldz
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_415180

loc_4151D6:
fld	ds:flt_1543C88
mov	eax, 0FFFFFFFEh
fst	dword ptr [esi+20h]
lea	edi, [esi+54h]
fld	ds:flt_1543C18
mov	[esi+1Ch], eax
fst	dword ptr [esi+24h]
mov	[esi+28h], bl
fstp	dword ptr [esi+30h]
mov	[esi+2Ch], ebx
mov	[esi+29h], bl
fst	dword ptr [esi+34h]
mov	[esi+3Ch], ebx
fst	dword ptr [esi+38h]
mov	[esi+40h], eax
fstp	dword ptr [esi+50h]
mov	[esi+44h], ebx
mov	[esi+48h], eax
mov	[esi+4Ch], ebx
mov	[esi+74h], bl
call	sub_41C620
lea	edi, [esi+64h]
call	sub_41C620
lea	edi, [esi+98h]
mov	[esi+0B0h], ebx
call	sub_41C620
pop	edi
pop	ebx
retn
sub_4151C0 endp

align 10h



sub_415240 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_154FE74
call	sub_41C620
test	[esp+4+arg_0], 1
mov	dword ptr [edi], offset	off_15CA734
jz	short loc_41526E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_41526E:
mov	eax, edi
pop	edi
retn	4
sub_415240 endp

align 10h



sub_415280 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
retn
sub_415280 endp

align 10h



sub_415290 proc	near
xor	ecx, ecx
mov	eax, 100h
mov	edx, 1Ch
mul	edx
seto	cl
push	esi
push	edi
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_4152DF
push	offset sub_415280
push	100h
lea	esi, [eax+4]
push	1Ch
push	esi
mov	dword ptr [eax], 100h
call	sub_4078B0
mov	edx, esi
jmp	short loc_4152E1

loc_4152DF:
xor	edx, edx

loc_4152E1:
lea	edi, [edx+1Ch]
mov	dword ptr [edx+1BE4h], 0
mov	eax, edi
mov	esi, 0FEh

loc_4152F5:
sub	esi, 1
lea	ecx, [eax+1Ch]
mov	[eax], ecx
mov	eax, ecx
jnz	short loc_4152F5
mov	eax, dword_1968D2C
mov	dword_1968D2C, edx
mov	dword_1968D30, edi
test	eax, eax
jz	short loc_41531B
pop	edi
mov	[edx], eax
pop	esi
retn

loc_41531B:
pop	edi
mov	dword ptr [edx], 0
pop	esi
retn
sub_415290 endp

align 10h



sub_415330 proc	near
push	esi
push	offset stru_19714CC ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	esi, dword_1968D30
inc	dword_19714E8
mov	dword_19714E4, eax
test	esi, esi
jnz	short loc_415362
call	sub_415290
mov	esi, dword_1968D30

loc_415362:
mov	eax, [esi]
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
sub	dword_19714E8, 1
mov	dword_1968D30, eax
jnz	short loc_415389
mov	dword_19714E4, 0

loc_415389:		; lpCriticalSection
push	offset stru_19714CC
call	ds:LeaveCriticalSection
mov	eax, esi
pop	esi
retn
sub_415330 endp

align 10h


; Attributes: thunk

sub_4153A0 proc	near
jmp	sub_415330
sub_4153A0 endp

align 10h



sub_4153B0 proc	near
push	offset stru_19714CC ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	ecx, dword_1968D30
mov	dword_19714E4, eax
mov	eax, 1
add	dword_19714E8, eax
mov	[esi], ecx
sub	dword_19714E8, eax
mov	dword_1968D30, esi
jnz	short loc_4153F1
mov	dword_19714E4, 0

loc_4153F1:		; lpCriticalSection
push	offset stru_19714CC
call	ds:LeaveCriticalSection
retn
sub_4153B0 endp

align 10h



sub_415400 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
call	sub_4153B0
pop	esi
retn	4
sub_415400 endp

align 10h



sub_415410 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+10h]
test	esi, esi
jz	short loc_415435
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_415435
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_415435:
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_41544F
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_41544F
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41544F:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	edi
pop	esi
pop	ebx
retn
sub_415410 endp




sub_415460 proc	near
push	esi
mov	esi, [edi+0Ch]
mov	dword ptr [edi+8], 0
test	esi, esi
jz	short loc_4154B2
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_415491
cmp	dword ptr [ecx-4], 0
lea	eax, [ecx-4]
jz	short loc_415488
mov	eax, [ecx]
mov	edx, [eax]
push	3
call	edx
jmp	short loc_415491

loc_415488:		; void *
push	eax
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_415491:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_41549F
push	1
call	sub_42AC80

loc_41549F:
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_4154B2:
mov	eax, [edi]
pop	esi
test	eax, eax
jz	short locret_4154CD
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_4154CD:
retn
sub_415460 endp

align 10h



sub_4154D0 proc	near
push	esi
push	edi
mov	edi, dword_185F258
mov	esi, [edi+0Ch]
mov	dword ptr [edi+8], 0
test	esi, esi
jz	short loc_415529
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_415508
cmp	dword ptr [ecx-4], 0
lea	eax, [ecx-4]
jz	short loc_4154FF
mov	eax, [ecx]
mov	edx, [eax]
push	3
call	edx
jmp	short loc_415508

loc_4154FF:		; void *
push	eax
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_415508:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_415516
push	1
call	sub_42AC80

loc_415516:
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_415529:
mov	ecx, [edi+14h]
mov	dword ptr [edi+0Ch], 0
mov	[edi+10h], ecx
pop	edi
pop	esi
retn
sub_4154D0 endp

align 10h



sub_415540 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, dword_1889574
mov	ecx, [eax]
push	ebx
push	ebp
xor	ebp, ebp
push	ebp
push	0FFFFFFFFh
push	ebp
push	1
push	1
lea	eax, [esp+38h+var_14]
push	eax
mov	[esp+3Ch+var_14], 4
mov	[esp+3Ch+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+3Ch+var_10]
push	eax
call	edx
mov	ebx, eax
mov	[esp+24h+var_18], ebx
cmp	ebx, ebp
jnz	short loc_415599
lea	ecx, [esp+24h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+28h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_415599:
push	esi
mov	esi, [esp+28h+arg_0]
mov	[ebx+4], esi
mov	[ebx+8], ebp
cmp	esi, ebp
jbe	short loc_4155B1
call	sub_415620
mov	[ebx], eax
jmp	short loc_4155B3

loc_4155B1:
mov	[ebx], ebp

loc_4155B3:
test	esi, esi
jbe	short loc_415607
mov	[esp+28h+var_1C], ebp
jmp	short loc_4155C0
align 10h

loc_4155C0:
cmp	ebp, [ebx+4]
jb	short loc_4155C9
xor	ebx, ebx
jmp	short loc_4155CF

loc_4155C9:
mov	ebx, [ebx]
add	ebx, [esp+28h+var_1C]

loc_4155CF:
mov	eax, [edi+4]
cmp	[edi+8], eax
jnz	short loc_4155EC
test	eax, eax
jbe	short loc_4155DF
add	eax, eax
jmp	short loc_4155E4

loc_4155DF:
mov	eax, 1

loc_4155E4:
push	eax
mov	esi, edi
call	sub_410400

loc_4155EC:
mov	ecx, [edi+8]
mov	edx, [edi]
add	[esp+28h+var_1C], 14h
mov	[edx+ecx*4], ebx
inc	dword ptr [edi+8]
mov	ebx, [esp+28h+var_18]
inc	ebp
cmp	ebp, [esp+28h+arg_0]
jb	short loc_4155C0

loc_415607:
mov	eax, [edi+0Ch]
pop	esi
mov	[ebx+8], eax
pop	ebp
mov	[edi+0Ch], ebx
pop	ebx
add	esp, 1Ch
retn	4
sub_415540 endp

align 10h



sub_415620 proc	near
test	esi, esi
jnz	short loc_41562D
push	4		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
jmp	short loc_415651

loc_41562D:
xor	ecx, ecx
mov	eax, esi
mov	edx, 14h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070

loc_415651:
add	esp, 4
test	eax, eax
jz	short loc_415670
push	edi
push	offset sub_1243D00
push	esi
lea	edi, [eax+4]
push	14h
push	edi
mov	[eax], esi
call	sub_4078B0
mov	eax, edi
pop	edi
retn

loc_415670:
xor	eax, eax
retn
sub_415620 endp

align 10h



sub_415680 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, 2
jz	short loc_4156C7
mov	eax, [esi-4]
push	edi
push	offset sub_415410
lea	edi, [esi-4]
push	eax
push	14h
push	esi
call	sub_40F3E0
test	bl, 1
jz	short loc_4156BF
test	edi, edi
jz	short loc_4156BF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	edi
call	eax

loc_4156BF:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_4156C7:
call	sub_415410
test	bl, 1
jz	short loc_4156E9
test	esi, esi
jz	short loc_4156E9
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_4156E9:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_415680 endp




sub_4156F0 proc	near
mov	eax, offset off_17EDEE8
retn
sub_4156F0 endp

align 10h



sub_415700 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	ebx
push	esi
push	edi
mov	esi, eax
call	sub_124A1E0
mov	eax, [esp+0Ch+arg_4]
mov	edx, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_0]
mov	[esi+14h], eax
lea	eax, [esi+20h]
mov	[eax], edx
mov	edx, [esp+0Ch+arg_C]
mov	[esi+30h], ecx
mov	ecx, [esp+0Ch+arg_10]
mov	[esi+34h], edx
mov	edx, [esp+0Ch+arg_1C]
mov	[esi+18h], ecx
mov	ecx, [esp+0Ch+arg_14]
mov	[esi+1Ch], edx
mov	edx, [esp+0Ch+arg_20]
mov	[esi+24h], ecx
mov	ecx, [esp+0Ch+arg_18]
mov	[esi+28h], edx
xor	edx, edx
mov	[esi+38h], ecx
mov	[esi+3Ch], edx
mov	[esi+40h], edx
mov	[esi+44h], edx
lea	ecx, [esi+2Ch]
lea	esi, [edx+3]
lea	esp, [esp+0]

loc_415760:
cmp	[eax-0Ch], edx
jz	short loc_415771
mov	edi, [eax]
mov	bl, byte_185F25C[edi]
mov	[ecx], bl
jmp	short loc_415773

loc_415771:
mov	[ecx], dl

loc_415773:
add	eax, 4
inc	ecx
sub	esi, 1
jnz	short loc_415760
pop	edi
pop	esi
pop	ebx
retn	24h
sub_415700 endp

align 10h



sub_415790 proc	near
mov	eax, offset off_17EDEF0
retn
sub_415790 endp

align 10h



sub_4157A0 proc	near
mov	eax, offset off_17EDEF8
retn
sub_4157A0 endp

align 10h



sub_4157B0 proc	near
mov	eax, offset off_17EDF00
retn
sub_4157B0 endp

align 10h



sub_4157C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A8A50
test	[esp+4+arg_0], 1
jz	short loc_4157E6
test	esi, esi
jz	short loc_4157E6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_4157E6:
mov	eax, esi
pop	esi
retn	4
sub_4157C0 endp

align 10h



sub_4157F0 proc	near
push	ebx
mov	ebx, [esi]
cmp	ebx, [edi]
jz	short loc_415824
test	ebx, ebx
jz	short loc_415812
lea	eax, [ebx+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_415812
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_415812:
mov	eax, [edi]
mov	[esi], eax
test	eax, eax
jz	short loc_415824
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_415824:
fld	dword ptr [edi+4]
mov	eax, esi
fstp	dword ptr [esi+4]
pop	ebx
fld	dword ptr [edi+8]
fstp	dword ptr [esi+8]
mov	cl, [edi+0Ch]
mov	[esi+0Ch], cl
fld	dword ptr [edi+10h]
fstp	dword ptr [esi+10h]
fld	dword ptr [edi+14h]
fstp	dword ptr [esi+14h]
retn
sub_4157F0 endp

align 10h



sub_415850 proc	near
mov	eax, offset off_17EDF08
retn
sub_415850 endp

align 10h



sub_415860 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+4]
mov	dword ptr [eax], 0
fst	dword ptr [eax+8]
mov	byte ptr [eax+0Ch], 0
fstp	dword ptr [eax+10h]
fld	ds:flt_1543C88
fstp	dword ptr [eax+14h]
retn
sub_415860 endp

align 10h



sub_415890 proc	near
mov	eax, offset off_17EDF10
retn
sub_415890 endp

align 10h



sub_4158A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_4158CE
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_4158CE:
mov	eax, esi
pop	esi
retn	4
sub_4158A0 endp

align 10h



sub_4158E0 proc	near
mov	eax, offset off_17EDF60
retn
sub_4158E0 endp

align 10h



sub_4158F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A6E70
test	[esp+4+arg_0], 1
jz	short loc_415916
test	esi, esi
jz	short loc_415916
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_415916:
mov	eax, esi
pop	esi
retn	4
sub_4158F0 endp

align 10h



sub_415920 proc	near
mov	eax, offset off_17EDF68
retn
sub_415920 endp

align 10h



sub_415930 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12769B0
test	[esp+4+arg_0], 1
jz	short loc_415956
test	esi, esi
jz	short loc_415956
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_415956:
mov	eax, esi
pop	esi
retn	4
sub_415930 endp

align 10h



sub_415960 proc	near
mov	eax, offset off_17EDF70
retn
sub_415960 endp

align 10h



sub_415970 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+2Ch]
push	esi
push	edi
lea	ecx, [ebx+38h]
call	sub_123E340
mov	edi, [ebx+3Ch]
mov	esi, eax
cmp	edi, esi
jz	short loc_4159B7
test	edi, edi
jz	short loc_4159A6
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4159A6
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_4159A6:
mov	[ebx+3Ch], esi
test	esi, esi
jz	short loc_4159B7
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_4159B7:
pop	edi
pop	esi
pop	ebx
retn	4
sub_415970 endp

align 10h



sub_4159C0 proc	near
mov	eax, offset off_17EDF78
retn
sub_4159C0 endp

align 10h



sub_4159D0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+38h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_415A0C
test	esi, esi
jz	short loc_4159FB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4159FB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4159FB:
mov	[ebx+38h], edi
test	edi, edi
jz	short loc_415A0C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_415A0C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4159D0 endp

align 10h



sub_415A20 proc	near
mov	eax, offset off_17EDF88
retn
sub_415A20 endp

align 10h



sub_415A30 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_415A4D
test	eax, eax
jbe	short loc_415A43
add	eax, eax
jmp	short loc_415A48

loc_415A43:
mov	eax, 1

loc_415A48:
call	sub_415B10

loc_415A4D:
mov	ecx, [esi+8]
mov	edx, [edi]
mov	eax, [esi]
mov	[eax+ecx*8], edx
mov	edx, [edi+4]
mov	[eax+ecx*8+4], edx
inc	dword ptr [esi+8]
pop	esi
retn
sub_415A30 endp

align 10h



sub_415A70 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_415A8E
test	eax, eax
jbe	short loc_415A83
add	eax, eax
jmp	short loc_415A88

loc_415A83:
mov	eax, 1

loc_415A88:
push	eax
call	sub_415B70

loc_415A8E:
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [edi]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
mov	[eax], edx
mov	ecx, [edi+4]
mov	[eax+4], ecx
mov	edx, [edi+8]
mov	[eax+8], edx
mov	ecx, [edi+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [edi+10h]
mov	[eax+10h], edx
mov	ecx, [edi+14h]
mov	[eax+14h], ecx
inc	dword ptr [esi+8]
pop	esi
retn
sub_415A70 endp




sub_415AC0 proc	near

var_4= dword ptr -4

push	ecx
mov	edx, [esi+8]
push	1
lea	eax, [esp+8+var_4]
push	eax
push	1
push	ecx
push	esi
mov	[esp+18h+var_4], 1
call	edx
add	[esi+4], eax
add	esp, 18h
retn
sub_415AC0 endp




sub_415AE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
mov	edx, [esi+8]
push	1
lea	eax, [esp+0Ch+var_4]
push	eax
push	4
push	ecx
push	esi
mov	[esp+1Ch+var_4], 4
call	edx
add	esp, 14h
add	[esi+4], eax
pop	esi
pop	ecx
retn
sub_415AE0 endp

align 10h



sub_415B10 proc	near
push	edi
mov	edi, eax
cmp	edi, [esi+4]
jz	short loc_415B6A
push	ebx
test	edi, edi
jbe	short loc_415B48
call	sub_414FB0
mov	ebx, eax
xor	eax, eax
cmp	[esi+8], eax
jbe	short loc_415B4A
jmp	short loc_415B30
align 10h

loc_415B30:
mov	ecx, [esi]
mov	edx, [ecx+eax*8]
mov	[ebx+eax*8], edx
mov	ecx, [ecx+eax*8+4]
mov	[ebx+eax*8+4], ecx
inc	eax
cmp	eax, [esi+8]
jb	short loc_415B30
jmp	short loc_415B4A

loc_415B48:
xor	ebx, ebx

loc_415B4A:
mov	eax, [esi]
test	eax, eax
jz	short loc_415B64
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_415B64:
mov	[esi], ebx
mov	[esi+4], edi
pop	ebx

loc_415B6A:
pop	edi
retn
sub_415B10 endp

align 10h



sub_415B70 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
cmp	edi, [esi+4]
jz	short loc_415BEE
push	ebx
test	edi, edi
jbe	short loc_415BCC
call	sub_415D50
xor	edx, edx
mov	ebx, eax
cmp	[esi+8], edx
jbe	short loc_415BCE
xor	ecx, ecx
nop

loc_415B90:
mov	eax, [esi]
mov	edi, [eax+ecx]
add	eax, ecx
mov	[ecx+ebx], edi
mov	edi, [eax+4]
mov	[ecx+ebx+4], edi
mov	edi, [eax+8]
mov	[ecx+ebx+8], edi
mov	edi, [eax+0Ch]
mov	[ecx+ebx+0Ch], edi
mov	edi, [eax+10h]
mov	[ecx+ebx+10h], edi
mov	eax, [eax+14h]
mov	[ecx+ebx+14h], eax
inc	edx
add	ecx, 18h
cmp	edx, [esi+8]
jb	short loc_415B90
mov	edi, [esp+8+arg_0]
jmp	short loc_415BCE

loc_415BCC:
xor	ebx, ebx

loc_415BCE:
mov	eax, [esi]
test	eax, eax
jz	short loc_415BE8
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_415BE8:
mov	[esi], ebx
mov	[esi+4], edi
pop	ebx

loc_415BEE:
pop	edi
retn	4
sub_415B70 endp

align 10h



sub_415C00 proc	near

var_4= dword ptr -4

push	ecx
push	1
lea	eax, [esp+8+var_4]
push	eax
mov	eax, [esi+8]
push	ecx
push	edx
push	esi
mov	[esp+18h+var_4], 1
call	eax
add	[esi+4], eax
add	esp, 18h
retn
sub_415C00 endp

align 10h



sub_415C20 proc	near
mov	eax, [eax]
test	eax, eax
jnz	short loc_415C27
retn

loc_415C27:
movzx	eax, word ptr [eax-4]
retn
sub_415C20 endp

align 10h



sub_415C30 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
add	esi, 14h
cmp	[esi], edi
jz	short loc_415C70
test	edi, edi
jz	short loc_415C4B
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_415C4B:
mov	eax, [esi]
test	eax, eax
jz	short loc_415C6E
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_415C6D
push	esi
mov	eax, ebx
call	sub_1171F60

loc_415C6D:
pop	ebx

loc_415C6E:
mov	[esi], edi

loc_415C70:
pop	edi
pop	esi
retn
sub_415C30 endp

align 10h



; int __fastcall sub_415C80(rsize_t SizeInBytes)
sub_415C80 proc	near
push	eax		; Src
push	ecx		; SizeInBytes
push	esi		; Dst
call	_strcat_s
add	esp, 0Ch
mov	eax, esi
retn
sub_415C80 endp

align 10h



sub_415C90 proc	near

var_10C= dword ptr -10Ch
Dst= byte ptr -108h
var_4= dword ptr -4

sub	esp, 10Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10Ch+var_4], eax
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
push	eax		; Src
lea	ecx, [esp+118h+Dst]
push	104h		; SizeInBytes
push	ecx		; Dst
call	_strcpy_s
lea	edx, [esp+120h+Dst]
push	edx
call	sub_110FDF0
mov	edi, [esi]
lea	eax, [esp+124h+Dst]
add	esp, 10h
cmp	edi, eax
jz	short loc_415D05
mov	ecx, eax
push	ecx
mov	[esp+118h+var_10C], edi
call	sub_1172180
add	esp, 4
mov	[esi], eax
test	edi, edi
jz	short loc_415D05
movzx	esi, word ptr [edi-2]
add	edi, 0FFFFFFF8h
push	edi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_415D05
lea	edx, [esp+114h+var_10C]
push	edx
mov	eax, esi
call	sub_1171F60

loc_415D05:
mov	ecx, [esp+114h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10Ch
retn
sub_415C90 endp

align 10h



sub_415D20 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+8]
mov	dword ptr [eax], 0
fst	dword ptr [eax+0Ch]
mov	dword ptr [eax+4], 0
fstp	dword ptr [eax+10h]
mov	dword ptr [eax+14h], 0FFFFFFFEh
retn
sub_415D20 endp

align 10h



sub_415D50 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 18h
mul	edx
seto	cl
push	esi
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
mov	esi, eax
add	esp, 4
test	esi, esi
jz	short loc_415D84
push	offset sub_415D20
push	edi
push	18h
push	esi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_415D84:
xor	eax, eax
pop	esi
retn
sub_415D50 endp

align 10h



sub_415D90 proc	near
push	ebx
push	ebp
mov	[esi], eax
xor	ebp, ebp
mov	[esi+4], ebp
push	edi
lea	edi, [esi+4]
mov	[esi+8], ebp
mov	[esi+0Ch], ebp
mov	[esi+10h], ebp
mov	ebx, [ecx]
cmp	[edi], ebx
jz	short loc_415DDD
cmp	ebx, ebp
jz	short loc_415DBA
lea	edx, [ebx-8]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_415DBA:
mov	eax, [edi]
cmp	eax, ebp
jz	short loc_415DDB
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_415DDB
push	edi
mov	eax, ebp
call	sub_1171F60

loc_415DDB:
mov	[edi], ebx

loc_415DDD:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
retn
sub_415D90 endp

align 10h



sub_415DF0 proc	near

arg_0= dword ptr  4

push	ebx
mov	dword ptr [esi], 0
push	ebp
lea	ebx, [esi+4]
mov	dword ptr [ebx], 0
push	edi
mov	edi, [eax]
cmp	[esi], edi
jz	short loc_415E39
test	edi, edi
jz	short loc_415E16
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_415E16:
mov	eax, [esi]
test	eax, eax
jz	short loc_415E37
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_415E37
push	esi
mov	eax, ebp
call	sub_1171F60

loc_415E37:
mov	[esi], edi

loc_415E39:
mov	edx, [esp+0Ch+arg_0]
mov	edi, [edx]
cmp	[ebx], edi
jz	short loc_415E74
test	edi, edi
jz	short loc_415E51
lea	eax, [edi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_415E51:
mov	eax, [ebx]
test	eax, eax
jz	short loc_415E72
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_415E72
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_415E72:
mov	[ebx], edi

loc_415E74:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
retn	4
sub_415DF0 endp

align 10h



sub_415E80 proc	near

arg_0= dword ptr  4

movzx	edx, word ptr [eax+0Ah]
push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
cmp	ecx, edx
jb	short loc_415EA7
lea	edx, [ecx+1]
mov	[eax+0Ah], dx
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
jz	short loc_415EDA
inc	word ptr [eax+0Ch]
jmp	short loc_415EDA

loc_415EA7:
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
mov	edx, [eax+4]
jz	short loc_415EC6
cmp	dword ptr [edx+ecx*4], 0
setz	dl
test	dl, dl
jz	short loc_415EDA
inc	word ptr [eax+0Ch]
jmp	short loc_415EDA

loc_415EC6:
cmp	dword ptr [edx+ecx*4], 0
setnz	dl
test	dl, dl
jz	short loc_415EDA
mov	edx, 0FFFFh
add	[eax+0Ch], dx

loc_415EDA:
mov	eax, [eax+4]
mov	edi, [eax+ecx*4]
lea	esi, [eax+ecx*4]
cmp	edi, [ebp+0]
jz	short loc_415F03
test	edi, edi
jz	short loc_415EF7
add	dword ptr [edi+5Ch], 0FFFFFFFFh
jnz	short loc_415EF7
call	sub_11A2BF0

loc_415EF7:
mov	eax, [ebp+0]
mov	[esi], eax
test	eax, eax
jz	short loc_415F03
inc	dword ptr [eax+5Ch]

loc_415F03:
pop	edi
pop	esi
pop	ebp
retn	4
sub_415E80 endp

align 10h



sub_415F10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	eax, eax
xor	ebx, ebx
cmp	ax, [ebp+0Ah]
jnb	short loc_415F4C
push	esi
push	edi

loc_415F22:
mov	edx, [ebp+4]
movzx	ecx, bx
mov	edi, [edx+ecx*4]
lea	esi, [edx+ecx*4]
test	edi, edi
jz	short loc_415F43
add	dword ptr [edi+5Ch], 0FFFFFFFFh
jnz	short loc_415F3D
call	sub_11A2BF0

loc_415F3D:
mov	dword ptr [esi], 0

loc_415F43:
inc	ebx
cmp	bx, [ebp+0Ah]
jb	short loc_415F22
pop	edi
pop	esi

loc_415F4C:
xor	eax, eax
xor	ecx, ecx
mov	[ebp+0Ah], ax
mov	[ebp+0Ch], cx
pop	ebp
pop	ebx
retn	4
sub_415F10 endp

align 10h



sub_415F60 proc	near
mov	ax, word ptr dword_17ED2A4
mov	[esi+8], ax
xor	eax, eax
mov	[esi+0Ch], ax
movzx	eax, word ptr [esi+8]
xor	edx, edx
mov	ecx, 4
mov	dword ptr [esi], offset	off_1550578
mov	[esi+0Eh], cx
mov	[esi+0Ah], dx
test	ax, ax
jbe	short loc_415FA4
push	edi
movzx	edi, ax
call	sub_5FB570
mov	[esi+4], eax
pop	edi
mov	eax, esi
mov	dword ptr [esi], offset	off_1550578
retn

loc_415FA4:
mov	[esi+4], edx
mov	eax, esi
mov	dword ptr [esi], offset	off_1550578
retn
sub_415F60 endp




sub_415FB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
movzx	eax, word ptr [ebx+8]
cmp	ecx, eax
jz	loc_41612C
movzx	eax, word ptr [ebx+0Ah]
push	ebp
movzx	edx, ax
push	esi
push	edi
cmp	ecx, edx
jnb	short loc_416023
movzx	ebp, cx
cmp	cx, ax
jnb	short loc_41601F
jmp	short loc_415FE0
align 10h

loc_415FE0:
mov	ecx, [ebx+4]
movzx	eax, bp
cmp	dword ptr [ecx+eax*4], 0
lea	esi, [ecx+eax*4]
setnz	al
test	al, al
jz	short loc_416014
mov	edi, [esi]
test	edi, edi
jz	short loc_41600B
add	dword ptr [edi+5Ch], 0FFFFFFFFh
jnz	short loc_416005
call	sub_11A2BF0

loc_416005:
mov	dword ptr [esi], 0

loc_41600B:
mov	edx, 0FFFFh
add	[ebx+0Ch], dx

loc_416014:
inc	ebp
cmp	bp, [ebx+0Ah]
jb	short loc_415FE0
mov	ecx, [esp+10h+arg_4]

loc_41601F:
mov	[ebx+0Ah], cx

loc_416023:
mov	ebp, [ebx+4]
mov	[esp+10h+arg_4], ebp
mov	[ebx+8], cx
test	ecx, ecx
jbe	loc_4160D5
movzx	edi, cx
call	sub_5FB570
mov	[ebx+4], eax
xor	eax, eax
xor	ecx, ecx
mov	[esp+10h+arg_0], eax
cmp	cx, [ebx+0Ah]
jnb	short loc_41609C
nop

loc_416050:
mov	ebp, [ebx+4]
mov	edx, [esp+10h+arg_4]
movzx	esi, ax
add	esi, esi
add	esi, esi
mov	edi, [ebp+esi+0]
add	ebp, esi
cmp	edi, [esi+edx]
jz	short loc_41608D
test	edi, edi
jz	short loc_41607C
add	dword ptr [edi+5Ch], 0FFFFFFFFh
jnz	short loc_41607C
call	sub_11A2BF0
mov	eax, [esp+10h+arg_0]

loc_41607C:
mov	ecx, [esp+10h+arg_4]
mov	esi, [esi+ecx]
mov	[ebp+0], esi
test	esi, esi
jz	short loc_41608D
inc	dword ptr [esi+5Ch]

loc_41608D:
inc	eax
mov	[esp+10h+arg_0], eax
cmp	ax, [ebx+0Ah]
jb	short loc_416050
mov	ebp, [esp+10h+arg_4]

loc_41609C:
movzx	esi, word ptr [ebx+0Ah]
cmp	si, [ebx+8]
jnb	short loc_4160DC

loc_4160A6:
mov	eax, [ebx+4]
movzx	edx, si
mov	edi, [eax+edx*4]
lea	ebp, [eax+edx*4]
test	edi, edi
jz	short loc_4160C8
add	dword ptr [edi+5Ch], 0FFFFFFFFh
jnz	short loc_4160C1
call	sub_11A2BF0

loc_4160C1:
mov	dword ptr [ebp+0], 0

loc_4160C8:
inc	esi
cmp	si, [ebx+8]
jb	short loc_4160A6
mov	ebp, [esp+10h+arg_4]
jmp	short loc_4160DC

loc_4160D5:
mov	dword ptr [ebx+4], 0

loc_4160DC:
test	ebp, ebp
jz	short loc_416129
mov	ebx, [ebp-4]
lea	eax, [ebp-4]
lea	esi, [ebp+ebx*4+0]
sub	ebx, 1
mov	[esp+10h+arg_4], eax
js	short loc_416111

loc_4160F3:
mov	edi, [esi-4]
sub	esi, 4
test	edi, edi
jz	short loc_41610C
add	dword ptr [edi+5Ch], 0FFFFFFFFh
jnz	short loc_41610C
call	sub_11A2BF0
mov	eax, [esp+10h+arg_4]

loc_41610C:
sub	ebx, 1
jns	short loc_4160F3

loc_416111:
test	eax, eax
jz	short loc_416129
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_416129:
pop	edi
pop	esi
pop	ebp

loc_41612C:
pop	ebx
retn	8
sub_415FB0 endp




sub_416130 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, dword_1889574
mov	ecx, [eax]
push	ebx
push	ebp
xor	ebp, ebp
push	ebp
push	0FFFFFFFFh
push	ebp
push	1
push	1
lea	eax, [esp+38h+var_14]
push	eax
mov	[esp+3Ch+var_14], 4
mov	[esp+3Ch+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+3Ch+var_10]
push	eax
call	edx
mov	ebx, eax
mov	[esp+24h+var_18], ebx
cmp	ebx, ebp
jnz	short loc_416189
lea	ecx, [esp+24h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+28h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_416189:
push	esi
mov	esi, [esp+28h+arg_0]
mov	[ebx+4], esi
mov	[ebx+8], ebp
cmp	esi, ebp
jbe	short loc_4161A1
call	sub_416270
mov	[ebx], eax
jmp	short loc_4161A3

loc_4161A1:
mov	[ebx], ebp

loc_4161A3:
test	esi, esi
jbe	short loc_4161F7
mov	[esp+28h+var_1C], ebp
jmp	short loc_4161B0
align 10h

loc_4161B0:
cmp	ebp, [ebx+4]
jb	short loc_4161B9
xor	ebx, ebx
jmp	short loc_4161BF

loc_4161B9:
mov	ebx, [ebx]
add	ebx, [esp+28h+var_1C]

loc_4161BF:
mov	eax, [edi+4]
cmp	[edi+8], eax
jnz	short loc_4161DC
test	eax, eax
jbe	short loc_4161CF
add	eax, eax
jmp	short loc_4161D4

loc_4161CF:
mov	eax, 1

loc_4161D4:
push	eax
mov	esi, edi
call	sub_410400

loc_4161DC:
mov	ecx, [edi+8]
mov	edx, [edi]
add	[esp+28h+var_1C], 64h
mov	[edx+ecx*4], ebx
inc	dword ptr [edi+8]
mov	ebx, [esp+28h+var_18]
inc	ebp
cmp	ebp, [esp+28h+arg_0]
jb	short loc_4161B0

loc_4161F7:
mov	eax, [edi+0Ch]
pop	esi
mov	[ebx+8], eax
pop	ebp
mov	[edi+0Ch], ebx
pop	ebx
add	esp, 1Ch
retn	4
sub_416130 endp

align 10h



sub_416210 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	edx, [esi+8]
xor	eax, eax
push	edi
test	edx, edx
jbe	short loc_416239
mov	edi, [ebx]
mov	ecx, [esi]

loc_416226:
cmp	[ecx], edi
jz	short loc_416234
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_416226
jmp	short loc_416239

loc_416234:
cmp	eax, 0FFFFFFFFh
jnz	short loc_416260

loc_416239:
mov	eax, [esi+4]
cmp	edx, eax
jnz	short loc_416253
test	eax, eax
jbe	short loc_416248
add	eax, eax
jmp	short loc_41624D

loc_416248:
mov	eax, 1

loc_41624D:
push	eax
call	sub_410400

loc_416253:
mov	eax, [esi+8]
mov	edx, [ebx]
mov	ecx, [esi]
mov	[ecx+eax*4], edx
inc	dword ptr [esi+8]

loc_416260:
pop	edi
pop	esi
pop	ebx
retn	4
sub_416210 endp

align 10h



sub_416270 proc	near
test	esi, esi
jnz	short loc_41627D
push	4		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
jmp	short loc_4162A1

loc_41627D:
xor	ecx, ecx
mov	eax, esi
mov	edx, 64h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070

loc_4162A1:
add	esp, 4
test	eax, eax
jz	short loc_4162C0
push	edi
push	offset sub_11A3700
push	esi
lea	edi, [eax+4]
push	64h
push	edi
mov	[eax], esi
call	sub_4078B0
mov	eax, edi
pop	edi
retn

loc_4162C0:
xor	eax, eax
retn
sub_416270 endp

align 10h



sub_4162D0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, 2
jz	short loc_416317
mov	eax, [esi-4]
push	edi
push	offset sub_11A3800
lea	edi, [esi-4]
push	eax
push	64h
push	esi
call	sub_40F3E0
test	bl, 1
jz	short loc_41630F
test	edi, edi
jz	short loc_41630F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	edi
call	eax

loc_41630F:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_416317:
call	sub_11A3800
test	bl, 1
jz	short loc_416339
test	esi, esi
jz	short loc_416339
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	64h
push	3
push	esi
call	eax

loc_416339:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_4162D0 endp




sub_416340 proc	near
test	ecx, ecx
jz	short locret_416374
cmp	byte ptr [eax+20F7h], 0
jz	short loc_416355
cmp	[eax+2100h], ecx
jz	short locret_416374

loc_416355:
mov	byte ptr [eax+20F7h], 1
mov	[eax+2100h], ecx
mov	eax, [eax+2238h]
mov	edx, [eax]
push	ecx
push	eax
mov	eax, [edx+15Ch]
call	eax

locret_416374:
retn
sub_416340 endp

align 10h



sub_416380 proc	near
test	ecx, ecx
jz	short locret_4163B4
cmp	byte ptr [eax+20F7h], 0
jnz	short loc_416395
cmp	[eax+20F8h], ecx
jz	short locret_4163B4

loc_416395:
mov	byte ptr [eax+20F7h], 0
mov	[eax+20F8h], ecx
mov	eax, [eax+2238h]
mov	edx, [eax]
push	ecx
push	eax
mov	eax, [edx+164h]
call	eax

locret_4163B4:
retn
sub_416380 endp

align 10h



sub_4163C0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1550578
test	eax, eax
jz	short loc_4163FE
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_416420
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4163FD
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4163FD:
pop	esi

loc_4163FE:
test	[esp+4+arg_0], 1
jz	short loc_416418
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_416418:
mov	eax, edi
pop	edi
retn	4
sub_4163C0 endp

align 10h



sub_416420 proc	near
push	edi
mov	edi, [ecx]
test	edi, edi
jz	short loc_416432
add	dword ptr [edi+5Ch], 0FFFFFFFFh
jnz	short loc_416432
call	sub_11A2BF0

loc_416432:
pop	edi
retn
sub_416420 endp

align 10h



sub_416440 proc	near
mov	eax, [eax+0A4h]
retn
sub_416440 endp

align 10h



sub_416450 proc	near
push	edi
mov	edi, [esi+0Ch]
mov	dword ptr [esi+8], 0
test	edi, edi
jz	short loc_416477
call	sub_4165B0
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax

loc_416477:
mov	eax, [esi]
pop	edi
test	eax, eax
jz	short locret_416492
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_416492:
retn
sub_416450 endp

align 10h



sub_4164A0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_4165B0
test	[esp+4+arg_0], 1
jz	short loc_4164C6
test	edi, edi
jz	short loc_4164C6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax

loc_4164C6:
mov	eax, edi
pop	edi
retn	4
sub_4164A0 endp

align 10h



sub_4164D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 18h
push	ebp
push	esi
push	0
push	0FFFFFFFFh
push	0
mov	esi, eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	1
push	1
lea	eax, [esp+34h+var_14]
push	eax
mov	[esp+38h+var_14], 4
mov	[esp+38h+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_10]
push	eax
call	edx
mov	ebp, eax
test	ebp, ebp
jnz	short loc_416527
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_416527:
push	ebx
mov	ebx, [esp+24h+arg_0]
push	edi
mov	[ebp+4], ebx
mov	dword ptr [ebp+8], 0
test	ebx, ebx
jbe	short loc_416547
mov	edi, ebx
call	sub_416600
mov	[ebp+0], eax
jmp	short loc_41654E

loc_416547:
mov	dword ptr [ebp+0], 0

loc_41654E:
xor	edi, edi
test	ebx, ebx
jbe	short loc_41659A
mov	[esp+28h+var_18], edi

loc_416558:
cmp	edi, [ebp+4]
jb	short loc_416561
xor	ebx, ebx
jmp	short loc_416568

loc_416561:
mov	ebx, [ebp+0]
add	ebx, [esp+28h+var_18]

loc_416568:
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_416583
test	eax, eax
jbe	short loc_416578
add	eax, eax
jmp	short loc_41657D

loc_416578:
mov	eax, 1

loc_41657D:
push	eax
call	sub_410400

loc_416583:
mov	ecx, [esi+8]
mov	edx, [esi]
add	[esp+28h+var_18], 60h
mov	[edx+ecx*4], ebx
inc	dword ptr [esi+8]
inc	edi
cmp	edi, [esp+28h+arg_0]
jb	short loc_416558

loc_41659A:
mov	eax, [esi+0Ch]
pop	edi
mov	[ebp+8], eax
pop	ebx
mov	[esi+0Ch], ebp
pop	esi
pop	ebp
add	esp, 18h
retn	4
sub_4164D0 endp

align 10h



sub_4165B0 proc	near
mov	eax, [edi]
test	eax, eax
jz	short loc_4165E4
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_11A2B90
push	ecx
push	60h
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4165E3
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4165E3:
pop	esi

loc_4165E4:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short locret_4165F2
push	1
call	sub_4164A0

locret_4165F2:
retn
sub_4165B0 endp

align 10h



sub_416600 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 60h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_416643
push	esi
push	offset sub_11A29C0
push	edi
lea	esi, [eax+4]
push	60h
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_416643:
xor	eax, eax
retn
sub_416600 endp

align 10h



sub_416650 proc	near
mov	eax, [ecx+0Ch]
cmp	byte ptr [eax+14Bh], 0
jz	short loc_416663
mov	eax, [eax+0E8h]
retn

loc_416663:
cmp	byte ptr [eax+9Bh], 0
jz	short loc_416670
mov	eax, [eax+38h]
retn

loc_416670:
mov	eax, [ecx]
retn
sub_416650 endp

align 10h



sub_416680 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	[ebx+edi*8+120h], esi
jz	short loc_4166A8
mov	eax, [ebx+2238h]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	esi
push	edi
push	eax
call	edx
mov	[ebx+edi*8+120h], esi

loc_4166A8:
pop	ebx
retn	4
sub_416680 endp

align 10h



sub_4166B0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	edx, dword_17ED270[edx*4]
push	edi
lea	edi, ds:0[ecx*8]
sub	edi, ecx
lea	edi, [edx+edi*2]
cmp	[eax+edi*8+19A0h], esi
lea	edi, [eax+edi*8+19A0h]
jz	short loc_4166F0
mov	eax, [eax+2238h]
push	ebx
mov	ebx, [eax]
push	esi
push	edx
push	ecx
push	eax
mov	eax, [ebx+114h]
call	eax
mov	[edi], esi
pop	ebx

loc_4166F0:
pop	edi
retn	4
sub_4166B0 endp

align 10h



sub_416700 proc	near
push	edi
mov	edi, [esi+0Ch]
mov	dword ptr [esi+8], 0
test	edi, edi
jz	short loc_416727
call	sub_416920
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax

loc_416727:
mov	eax, [esi]
pop	edi
test	eax, eax
jz	short locret_416742
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_416742:
retn
sub_416700 endp

align 10h



sub_416750 proc	near
push	esi
mov	esi, [edi+0Ch]
mov	dword ptr [edi+8], 0
test	esi, esi
jz	short loc_41679B
mov	eax, [esi]
test	eax, eax
jz	short loc_416779
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_416779:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_416787
push	1
call	sub_4167F0

loc_416787:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_41679B:
mov	eax, [edi]
pop	esi
test	eax, eax
jz	short locret_4167B6
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_4167B6:
retn
sub_416750 endp

align 10h



sub_4167C0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_416920
test	[esp+4+arg_0], 1
jz	short loc_4167E6
test	edi, edi
jz	short loc_4167E6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax

loc_4167E6:
mov	eax, edi
pop	edi
retn	4
sub_4167C0 endp

align 10h



sub_4167F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_41680D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_41680D:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_41681B
push	1
call	sub_4167F0

loc_41681B:
test	[esp+4+arg_0], 1
jz	short loc_416836
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_416836:
mov	eax, esi
pop	esi
retn	4
sub_4167F0 endp

align 10h



sub_416840 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 18h
push	ebp
push	esi
push	0
push	0FFFFFFFFh
push	0
mov	esi, eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	1
push	1
lea	eax, [esp+34h+var_14]
push	eax
mov	[esp+38h+var_14], 4
mov	[esp+38h+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_10]
push	eax
call	edx
mov	ebp, eax
test	ebp, ebp
jnz	short loc_416897
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_416897:
push	ebx
mov	ebx, [esp+24h+arg_0]
push	edi
mov	[ebp+4], ebx
mov	dword ptr [ebp+8], 0
test	ebx, ebx
jbe	short loc_4168B7
mov	edi, ebx
call	sub_416AB0
mov	[ebp+0], eax
jmp	short loc_4168BE

loc_4168B7:
mov	dword ptr [ebp+0], 0

loc_4168BE:
xor	edi, edi
test	ebx, ebx
jbe	short loc_41690A
mov	[esp+28h+var_18], edi

loc_4168C8:
cmp	edi, [ebp+4]
jb	short loc_4168D1
xor	ebx, ebx
jmp	short loc_4168D8

loc_4168D1:
mov	ebx, [ebp+0]
add	ebx, [esp+28h+var_18]

loc_4168D8:
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_4168F3
test	eax, eax
jbe	short loc_4168E8
add	eax, eax
jmp	short loc_4168ED

loc_4168E8:
mov	eax, 1

loc_4168ED:
push	eax
call	sub_410400

loc_4168F3:
mov	ecx, [esi+8]
mov	edx, [esi]
add	[esp+28h+var_18], 14h
mov	[edx+ecx*4], ebx
inc	dword ptr [esi+8]
inc	edi
cmp	edi, [esp+28h+arg_0]
jb	short loc_4168C8

loc_41690A:
mov	eax, [esi+0Ch]
pop	edi
mov	[ebp+8], eax
pop	ebx
mov	[esi+0Ch], ebp
pop	esi
pop	ebp
add	esp, 18h
retn	4
sub_416840 endp

align 10h



sub_416920 proc	near
mov	eax, [edi]
test	eax, eax
jz	short loc_416954
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_11A1A30
push	ecx
push	14h
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_416953
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_416953:
pop	esi

loc_416954:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short locret_416962
push	1
call	sub_4167C0

locret_416962:
retn
sub_416920 endp

align 10h



sub_416970 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 14h
push	esi
push	0
push	0FFFFFFFFh
push	0
mov	esi, eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_4169C4
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4169C4:
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	edi
push	eax
mov	edi, ebx
call	sub_416A40
mov	ecx, eax
xor	edi, edi
mov	[esp+20h+var_10], ecx
test	ebx, ebx
jbe	short loc_416A23
push	ebp
xor	ebp, ebp

loc_4169E1:
cmp	edi, [ecx+4]
jb	short loc_4169EA
xor	ebx, ebx
jmp	short loc_4169EE

loc_4169EA:
mov	ebx, [ecx]
add	ebx, ebp

loc_4169EE:
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_416A0D
test	eax, eax
jbe	short loc_4169FE
add	eax, eax
jmp	short loc_416A03

loc_4169FE:
mov	eax, 1

loc_416A03:
push	eax
call	sub_410400
mov	ecx, [esp+24h+var_10]

loc_416A0D:
mov	edx, [esi+8]
mov	eax, [esi]
mov	[eax+edx*4], ebx
inc	dword ptr [esi+8]
inc	edi
add	ebp, 10h
cmp	edi, [esp+24h+arg_0]
jb	short loc_4169E1
pop	ebp

loc_416A23:
mov	edx, [esi+0Ch]
pop	edi
mov	[ecx+8], edx
pop	ebx
mov	[esi+0Ch], ecx
pop	esi
add	esp, 14h
retn	4
sub_416970 endp

align 10h



sub_416A40 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
mov	[ebp+4], edi
mov	dword ptr [ebp+8], 0
test	edi, edi
jbe	short loc_416A99
xor	ecx, ecx
mov	eax, edi
mov	edx, 10h
mul	edx
seto	cl
push	esi
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
mov	esi, eax
add	esp, 4
test	esi, esi
jz	short loc_416A8D
push	offset sub_416B00
push	edi
push	10h
push	esi
call	sub_4078B0
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
retn	4

loc_416A8D:
xor	esi, esi
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
retn	4

loc_416A99:
mov	dword ptr [ebp+0], 0
mov	eax, ebp
pop	ebp
retn	4
sub_416A40 endp

align 10h



sub_416AB0 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 14h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_416AF3
push	esi
push	offset sub_416B10
push	edi
lea	esi, [eax+4]
push	14h
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_416AF3:
xor	eax, eax
retn
sub_416AB0 endp

align 10h



sub_416B00 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
retn
sub_416B00 endp




sub_416B10 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], cl
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
retn
sub_416B10 endp

align 10h



sub_416B30 proc	near
push	esi
mov	esi, [edi+0Ch]
mov	dword ptr [edi+8], 0
test	esi, esi
jz	short loc_416B80
mov	eax, [esi]
test	eax, eax
jz	short loc_416B5E
add	eax, 0FFFFFFFCh
jz	short loc_416B5E
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_416B5E:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_416B6C
push	1
call	sub_416BA0

loc_416B6C:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_416B80:
mov	eax, [edi]
pop	esi
test	eax, eax
jz	short locret_416B9B
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_416B9B:
retn
sub_416B30 endp

align 10h



sub_416BA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_416BC2
add	eax, 0FFFFFFFCh
jz	short loc_416BC2
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_416BC2:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_416BD0
push	1
call	sub_416BA0

loc_416BD0:
test	[esp+4+arg_0], 1
jz	short loc_416BEB
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_416BEB:
mov	eax, esi
pop	esi
retn	4
sub_416BA0 endp

align 10h



sub_416C00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 18h
push	ebp
push	esi
push	0
push	0FFFFFFFFh
push	0
mov	esi, eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	1
push	1
lea	eax, [esp+34h+var_14]
push	eax
mov	[esp+38h+var_14], 4
mov	[esp+38h+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_10]
push	eax
call	edx
mov	ebp, eax
test	ebp, ebp
jnz	short loc_416C57
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_416C57:
push	ebx
mov	ebx, [esp+24h+arg_0]
push	edi
mov	[ebp+4], ebx
mov	dword ptr [ebp+8], 0
test	ebx, ebx
jbe	short loc_416C77
mov	edi, ebx
call	sub_416CE0
mov	[ebp+0], eax
jmp	short loc_416C7E

loc_416C77:
mov	dword ptr [ebp+0], 0

loc_416C7E:
xor	edi, edi
test	ebx, ebx
jbe	short loc_416CCD
mov	[esp+28h+var_18], edi

loc_416C88:
cmp	edi, [ebp+4]
jb	short loc_416C91
xor	ebx, ebx
jmp	short loc_416C98

loc_416C91:
mov	ebx, [ebp+0]
add	ebx, [esp+28h+var_18]

loc_416C98:
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_416CB3
test	eax, eax
jbe	short loc_416CA8
add	eax, eax
jmp	short loc_416CAD

loc_416CA8:
mov	eax, 1

loc_416CAD:
push	eax
call	sub_410400

loc_416CB3:
mov	ecx, [esi+8]
mov	edx, [esi]
add	[esp+28h+var_18], 218h
mov	[edx+ecx*4], ebx
inc	dword ptr [esi+8]
inc	edi
cmp	edi, [esp+28h+arg_0]
jb	short loc_416C88

loc_416CCD:
mov	eax, [esi+0Ch]
pop	edi
mov	[ebp+8], eax
pop	ebx
mov	[esi+0Ch], ebp
pop	esi
pop	ebp
add	esp, 18h
retn	4
sub_416C00 endp




sub_416CE0 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 218h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_416D26
push	esi
push	offset sub_11A1110
push	edi
lea	esi, [eax+4]
push	218h
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_416D26:
xor	eax, eax
retn
sub_416CE0 endp

align 10h



sub_416D30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11A08E0
test	[esp+4+arg_0], 1
jz	short loc_416D59
test	esi, esi
jz	short loc_416D59
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2240h
push	3
push	esi
call	eax

loc_416D59:
mov	eax, esi
pop	esi
retn	4
sub_416D30 endp

align 10h



sub_416D60 proc	near
cmp	[esi+20E0h], edi
jnz	short loc_416D85
mov	eax, [esi+2238h]
mov	dword ptr [esi+20E0h], 0
mov	ecx, [eax]
mov	edx, [ecx+170h]
push	0
push	eax
call	edx

loc_416D85:
cmp	[esi+20E4h], edi
jnz	short locret_416D97
mov	dword ptr [esi+20E4h], 0

locret_416D97:
retn
sub_416D60 endp

align 10h



sub_416DA0 proc	near
xor	eax, eax
mov	[ecx+20A0h], eax
mov	[ecx+20A4h], eax
mov	[ecx+20A8h], eax
mov	[ecx+20ACh], eax
mov	[ecx+20B0h], eax
mov	[ecx+20B4h], eax
mov	[ecx+20B8h], eax
mov	[ecx+20BCh], eax
mov	[ecx+20C0h], eax
mov	[ecx+20C4h], eax
mov	[ecx+20C8h], eax
mov	[ecx+20CCh], eax
mov	[ecx+20D0h], eax
mov	[ecx+20D4h], eax
mov	[ecx+20D8h], eax
mov	[ecx+20DCh], eax
retn
sub_416DA0 endp

align 10h



sub_416E10 proc	near
movzx	eax, word ptr [eax+18h]
and	eax, 1
retn
sub_416E10 endp

align 10h



sub_416E20 proc	near
movzx	eax, word ptr [eax+18h]
shr	eax, 9
and	eax, 1
retn
sub_416E20 endp

align 10h



sub_416E30 proc	near
mov	eax, offset off_17EE288
retn
sub_416E30 endp

align 10h



sub_416E40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	edx, [eax+eax]
mov	ax, [ecx+18h]
push	esi
mov	esi, 0FFE1h
and	ax, si
or	dx, ax
mov	[ecx+18h], dx
pop	esi
retn	4
sub_416E40 endp

align 10h



sub_416E60 proc	near

arg_0= dword ptr  4

mov	ax, [ecx+18h]
mov	edx, 0FE1Fh
and	ax, dx
mov	edx, [esp+arg_0]
shl	edx, 5
or	ax, dx
mov	[ecx+18h], ax
retn	4
sub_416E60 endp

align 10h



sub_416E80 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_416E93
mov	eax, 200h
or	[ecx+18h], ax
retn	4

loc_416E93:
mov	edx, 0FDFFh
and	[ecx+18h], dx
retn	4
sub_416E80 endp

align 10h



sub_416EA0 proc	near

arg_0= dword ptr  4

mov	ax, [ecx+18h]
mov	edx, 0E3FFh
and	ax, dx
mov	edx, [esp+arg_0]
shl	edx, 0Ah
or	ax, dx
mov	[ecx+18h], ax
retn	4
sub_416EA0 endp

align 10h



sub_416EC0 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	[ecx+1Ah], al
retn	4
sub_416EC0 endp

align 10h



sub_416ED0 proc	near
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
xor	eax, eax
mov	[esi+14h], ax
xor	ecx, ecx
mov	edx, 0ECh
mov	[esi+10h], ebx
mov	[esi+1Ah], bl
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_15FBDA4
mov	[esi+18h], dx
mov	eax, esi
pop	esi
pop	ebx
retn
sub_416ED0 endp

align 10h
off_416F20 dd offset loc_C7C186+5
dword_416F24 dd	7FFFFFFFh, 0FF0440C7h, 0C37FFFFFh, 0E8F18B56h
dd 0D888D8h, 82444F6h, 85177401h, 0A11374F6h
dd offset dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax
mov	eax, esi
pop	esi
retn	4
align 10h



sub_416F60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_15507C4
call	sub_41C620
test	[esp+4+arg_0], 1
mov	dword ptr [edi], offset	off_15CA734
jz	short loc_416F8E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_416F8E:
mov	eax, edi
pop	edi
retn	4
sub_416F60 endp

align 10h



sub_416FA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, eax
mov	eax, [edi+4]
push	eax
mov	edx, ebx
call	sub_411670
mov	ecx, [edi+8]
mov	ebp, eax
mov	esi, [ecx+ebp*4]
add	esp, 4
test	esi, esi
jz	short loc_416FFF

loc_416FC4:
mov	ecx, [esi+4]
mov	eax, ebx
lea	esp, [esp+0]

loc_416FD0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_416FF0
test	dl, dl
jz	short loc_416FEC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_416FF0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_416FD0

loc_416FEC:
xor	eax, eax
jmp	short loc_416FF5

loc_416FF0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_416FF5:
test	eax, eax
jz	short loc_417069
mov	esi, [esi]
test	esi, esi
jnz	short loc_416FC4

loc_416FFF:
mov	eax, [edi]
mov	edx, [eax+0Ch]
mov	ecx, edi
call	edx
push	ecx
mov	ecx, [esp+10h+arg_8]
mov	esi, eax
mov	eax, esp
mov	[eax], ecx
mov	eax, [esp+10h+arg_8]
test	eax, eax
jz	short loc_417025
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_417025:
mov	edx, [edi]
mov	eax, [edx+4]
push	ebx
push	esi
mov	ecx, edi
call	eax
mov	ecx, [edi+8]
mov	edx, [ecx+ebp*4]
mov	[esi], edx
mov	eax, [edi+8]
mov	[eax+ebp*4], esi
mov	eax, [esp+10h+arg_4]
inc	dword ptr [edi+0Ch]
test	eax, eax
jz	short loc_417062
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_417062
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_417062:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_417069:
lea	edx, [esp+10h+arg_4]
push	edx
lea	edi, [esi+8]
call	sub_418760
mov	eax, [esp+10h+arg_4]
test	eax, eax
jz	short loc_417062
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_417062
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_416FA0 endp

align 10h



sub_4170A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [eax]
mov	ecx, [esi+4]
push	edi
mov	edi, [ebx]
mov	[edx], ecx
cmp	edi, [esi+8]
jz	short loc_4170EC
test	edi, edi
jz	short loc_4170D9
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4170D9
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_4170D9:
mov	eax, [esi+8]
mov	[ebx], eax
test	eax, eax
jz	short loc_4170EC
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4170EC:
mov	eax, [esi]
test	eax, eax
jz	short loc_4170FF
mov	ecx, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	[ecx], eax
pop	ebx
retn	0Ch

loc_4170FF:
mov	edi, [ebp+4]
mov	edx, [esi+4]
push	edi
call	sub_411670
inc	eax
add	esp, 4
cmp	eax, edi
jnb	short loc_41712E
mov	edx, [ebp+8]
lea	ecx, [edx+eax*4]
lea	esp, [esp+0]

loc_417120:
mov	edx, [ecx]
test	edx, edx
jnz	short loc_41713F
inc	eax
add	ecx, 4
cmp	eax, edi
jb	short loc_417120

loc_41712E:
mov	ecx, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ecx], 0
pop	ebx
retn	0Ch

loc_41713F:
mov	eax, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	[eax], edx
pop	ebx
retn	0Ch
sub_4170A0 endp

align 10h



sub_417150 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_155061C
jz	short loc_41719D
push	ebx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_41719C
push	edi

loc_417168:
mov	eax, [esi+8]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_417195

loc_417172:
mov	eax, edi
mov	eax, [eax+4]
mov	edi, [edi]
test	eax, eax
jz	short loc_417191
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_417191:
test	edi, edi
jnz	short loc_417172

loc_417195:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_417168
pop	edi

loc_41719C:
pop	ebx

loc_41719D:
mov	dword ptr [esi], offset	off_155086C
call	sub_418AE0
mov	dword ptr [esi], offset	off_1550880
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_4171CE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_4171CE:
pop	esi
retn
sub_417150 endp




sub_4171D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_417150
test	[esp+4+arg_0], 1
jz	short loc_4171F6
test	esi, esi
jz	short loc_4171F6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_4171F6:
mov	eax, esi
pop	esi
retn	4
sub_4171D0 endp

align 10h



sub_417200 proc	near
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_41721E
lea	ecx, [ecx+0]

loc_417210:
cmp	eax, offset off_17EDFB0
jz	short loc_41722A
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_417210

loc_41721E:
xor	al, al
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn

loc_41722A:
mov	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn
sub_417200 endp

align 10h



sub_417240 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_119D150
test	[esp+4+arg_0], 1
jz	short loc_417269
test	esi, esi
jz	short loc_417269
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	930h
push	3
push	esi
call	eax

loc_417269:
mov	eax, esi
pop	esi
retn	4
sub_417240 endp

align 10h



sub_417270 proc	near
fldz
fst	dword ptr [ecx]
fst	dword ptr [ecx+4]
fst	dword ptr [ecx+8]
fstp	dword ptr [ecx+0Ch]
retn
sub_417270 endp

align 10h



sub_417280 proc	near
xor	edx, edx
mov	eax, ecx
div	dword ptr [edi+4]
mov	eax, [edi+8]
push	esi
mov	esi, [eax+edx*4]
lea	eax, [eax+edx*4]
test	esi, esi
jz	short loc_4172CE
cmp	ecx, [esi+4]
jnz	short loc_4172B9

loc_41729A:
mov	ecx, [esi]
mov	[eax], ecx
mov	edx, [edi]
mov	eax, [edx+8]
push	esi
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	eax, [edx+10h]
push	esi
mov	ecx, edi
call	eax
dec	dword ptr [edi+0Ch]
mov	al, 1
pop	esi
retn

loc_4172B9:
mov	eax, esi
mov	esi, [esi]
test	esi, esi
jz	short loc_4172CE

loc_4172C1:
cmp	ecx, [esi+4]
jz	short loc_41729A
mov	eax, esi
mov	esi, [esi]
test	esi, esi
jnz	short loc_4172C1

loc_4172CE:
xor	al, al
pop	esi
retn
sub_417280 endp

align 10h



sub_4172E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_1550880
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_4172E0 endp

align 10h



sub_417350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
xor	edx, edx
mov	eax, ebp
div	dword ptr [esi+4]
mov	eax, [esi+8]
push	edi
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_41737B
lea	ecx, [ecx+0]

loc_417370:
cmp	ebp, [eax+4]
jz	short loc_4173E5
mov	eax, [eax]
test	eax, eax
jnz	short loc_417370

loc_41737B:
mov	edx, [esi]
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
push	ecx
mov	ecx, [esp+10h+arg_8]
mov	edi, eax
mov	eax, esp
mov	[eax], ecx
mov	eax, [esp+10h+arg_8]
test	eax, eax
jz	short loc_4173A1
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4173A1:
mov	edx, [esi]
mov	eax, [edx+4]
push	ebp
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esi+8]
mov	edx, [ecx+ebx*4]
mov	[edi], edx
mov	eax, [esi+8]
mov	[eax+ebx*4], edi
inc	dword ptr [esi+0Ch]

loc_4173BD:
mov	eax, [esp+10h+arg_4]
test	eax, eax
jz	short loc_4173DE
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4173DE
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4173DE:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_4173E5:
lea	ecx, [esp+10h+arg_4]
push	ecx
lea	edi, [eax+8]
call	sub_418760
jmp	short loc_4173BD
sub_417350 endp

align 10h



sub_417400 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [eax]
mov	ecx, [esi+4]
push	edi
mov	edi, [ebx]
mov	[edx], ecx
cmp	edi, [esi+8]
jz	short loc_41744C
test	edi, edi
jz	short loc_417439
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_417439
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_417439:
mov	eax, [esi+8]
mov	[ebx], eax
test	eax, eax
jz	short loc_41744C
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41744C:
mov	eax, [esi]
test	eax, eax
jz	short loc_41745F
mov	ecx, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	[ecx], eax
pop	ebx
retn	0Ch

loc_41745F:
mov	ecx, [ebp+4]
mov	eax, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_417482
mov	eax, [ebp+8]
lea	eax, [eax+edx*4]

loc_417474:
mov	esi, [eax]
test	esi, esi
jnz	short loc_417493
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_417474

loc_417482:
mov	edx, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [edx], 0
pop	ebx
retn	0Ch

loc_417493:
mov	ecx, [esp+10h+arg_4]
pop	edi
mov	[ecx], esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_417400 endp




sub_4174A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	edx, edx
mov	eax, ebp
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_4174CB
lea	esp, [esp+0]

loc_4174C0:
cmp	ebp, [eax+4]
jz	short loc_4174FE
mov	eax, [eax]
test	eax, eax
jnz	short loc_4174C0

loc_4174CB:
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	edi
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	edx, [edx+4]
mov	edi, eax
mov	eax, [esp+0Ch+arg_4]
push	eax
push	ebp
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi+8]
mov	ecx, [eax+ebx*4]
mov	[edi], ecx
mov	edx, [esi+8]
mov	[edx+ebx*4], edi
inc	dword ptr [esi+0Ch]
pop	edi
pop	ebp
pop	ebx
retn	8

loc_4174FE:
mov	ecx, [esp+8+arg_4]
pop	ebp
mov	[eax+8], ecx
pop	ebx
retn	8
sub_4174A0 endp

align 10h



sub_417510 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_15C9924
mov	dword ptr [esi+4], 7
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 1Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_417510 endp

align 10h



sub_417580 proc	near
mov	ecx, [esi+8]
mov	eax, [ecx+4]
mov	[esi+8], eax
test	eax, eax
jz	short loc_417595
mov	dword ptr [eax], 0
jmp	short loc_41759C

loc_417595:
mov	dword ptr [esi+4], 0

loc_41759C:
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	edi, [ecx+8]
push	ecx
mov	ecx, esi
call	edx
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
retn
sub_417580 endp

align 10h



sub_4175C0 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	byte_17EC70A, al
retn	4
sub_4175C0 endp

align 10h



sub_4175D0 proc	near
mov	al, 1
retn	4
sub_4175D0 endp

align 10h



; int __stdcall	sub_4175E0(float)
sub_4175E0 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
mov	ecx, [ecx+6B4h]
fst	[esp+arg_0]
fldz
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_417603
fld	ds:flt_1479B68
fstp	[esp+arg_0]

loc_417603:
fld	[esp+arg_0]
fst	dword ptr [ecx+88h]
fld1
fld	st
fdivrp	st(2), st
fsubp	st(1), st
fstp	dword ptr [ecx+84h]
retn	4
sub_4175E0 endp

align 10h



sub_417620 proc	near
mov	eax, [ecx+6B4h]
fld	dword ptr [eax+88h]
retn
sub_417620 endp

align 10h



sub_417630 proc	near

arg_0= byte ptr	 4

mov	ecx, [ecx+6B4h]
xor	eax, eax
cmp	[esp+arg_0], al
setnz	al
mov	[ecx+0F4h], eax
mov	al, 1
retn	4
sub_417630 endp

align 10h



sub_417650 proc	near
mov	eax, [ecx+6B4h]
cmp	dword ptr [eax+0F4h], 0
setnz	al
retn
sub_417650 endp

align 10h



sub_417670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	edi
mov	edi, [esp+4+arg_4]
push	eax
push	ecx
call	sub_1186A60
add	esp, 8
pop	edi
retn	8
sub_417670 endp

align 10h



sub_417690 proc	near
mov	eax, [ecx+684h]
retn
sub_417690 endp

align 10h



sub_4176A0 proc	near
mov	eax, [ecx+404h]
retn
sub_4176A0 endp

align 10h



sub_4176B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+404h], eax
retn	4
sub_4176B0 endp

align 10h



sub_4176C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
movzx	eax, byte ptr [ecx+3FFh]
mov	[esp+4+var_4], eax
mov	eax, [esp+4+arg_0]
fild	[esp+4+var_4]
fld	ds:dbl_15FCDC0
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [eax+0Ch]
movzx	edx, byte ptr [ecx+3FEh]
mov	[esp+4+arg_0], edx
fild	[esp+4+arg_0]
fmul	st, st(1)
fstp	dword ptr [eax]
movzx	edx, byte ptr [ecx+3FDh]
mov	[esp+4+arg_0], edx
fild	[esp+4+arg_0]
fmul	st, st(1)
fstp	dword ptr [eax+4]
movzx	ecx, byte ptr [ecx+3FCh]
mov	[esp+4+arg_0], ecx
fimul	[esp+4+arg_0]
fstp	dword ptr [eax+8]
pop	ecx
retn	4
sub_4176C0 endp

align 10h



sub_417720 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [esp+4+arg_0]
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
fld	dword ptr [edx]
fld	ds:dbl_15FCCF8
or	eax, 0C00h
mov	[esp+4+var_4], eax
fmul	st(1), st
fxch	st(1)
push	esi
fldcw	word ptr [esp+8+var_4]
fistp	[esp+8+var_4]
movzx	eax, byte ptr [esp+8+var_4]
movzx	esi, al
fldcw	word ptr [esp+8+arg_0]
or	esi, 0FFFFFF00h
shl	esi, 8
fld	dword ptr [edx+4]
fnstcw	word ptr [esp+8+arg_0]
fmul	st, st(1)
movzx	eax, word ptr [esp+8+arg_0]
or	eax, 0C00h
mov	[esp+8+var_4], eax
fldcw	word ptr [esp+8+var_4]
fistp	[esp+8+var_4]
movzx	eax, byte ptr [esp+8+var_4]
or	esi, eax
shl	esi, 8
fldcw	word ptr [esp+8+arg_0]
fmul	dword ptr [edx+8]
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
or	eax, 0C00h
mov	[esp+8+var_4], eax
fldcw	word ptr [esp+8+var_4]
fistp	[esp+8+var_4]
mov	dl, byte ptr [esp+8+var_4]
movzx	eax, dl
or	esi, eax
fldcw	word ptr [esp+8+arg_0]
mov	[ecx+3FCh], esi
pop	esi
pop	ecx
retn	4
sub_417720 endp

align 10h



sub_4177D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [esp+4+arg_0]
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
fld	dword ptr [edx+0Ch]
fld	ds:dbl_15FCCF8
or	eax, 0C00h
mov	[esp+4+var_4], eax
fmul	st(1), st
fxch	st(1)
push	esi
fldcw	word ptr [esp+8+var_4]
fistp	[esp+8+var_4]
movzx	eax, byte ptr [esp+8+var_4]
movzx	esi, al
fldcw	word ptr [esp+8+arg_0]
shl	esi, 8
fld	dword ptr [edx]
fnstcw	word ptr [esp+8+arg_0]
fmul	st, st(1)
movzx	eax, word ptr [esp+8+arg_0]
or	eax, 0C00h
mov	[esp+8+var_4], eax
fldcw	word ptr [esp+8+var_4]
fistp	[esp+8+var_4]
movzx	eax, byte ptr [esp+8+var_4]
or	esi, eax
shl	esi, 8
fldcw	word ptr [esp+8+arg_0]
fld	dword ptr [edx+4]
fnstcw	word ptr [esp+8+arg_0]
fmul	st, st(1)
movzx	eax, word ptr [esp+8+arg_0]
or	eax, 0C00h
mov	[esp+8+var_4], eax
fldcw	word ptr [esp+8+var_4]
fistp	[esp+8+var_4]
movzx	eax, byte ptr [esp+8+var_4]
or	esi, eax
shl	esi, 8
fldcw	word ptr [esp+8+arg_0]
fmul	dword ptr [edx+8]
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
or	eax, 0C00h
mov	[esp+8+var_4], eax
fldcw	word ptr [esp+8+var_4]
fistp	[esp+8+var_4]
mov	dl, byte ptr [esp+8+var_4]
movzx	eax, dl
or	esi, eax
fldcw	word ptr [esp+8+arg_0]
mov	[ecx+3FCh], esi
pop	esi
pop	ecx
retn	4
sub_4177D0 endp

align 10h



sub_4178A0 proc	near
fld	dword ptr [ecx+400h]
retn
sub_4178A0 endp

align 10h



; int __stdcall	sub_4178B0(float)
sub_4178B0 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fstp	dword ptr [ecx+400h]
retn	4
sub_4178B0 endp

align 10h



sub_4178C0 proc	near
mov	eax, offset off_17EDF98
retn
sub_4178C0 endp

align 10h



sub_4178D0 proc	near
mov	eax, [eax+5Ch]
retn
sub_4178D0 endp

align 10h



sub_4178E0 proc	near
mov	eax, [eax+8]
retn
sub_4178E0 endp

align 10h



sub_4178F0 proc	near
mov	ecx, [eax+20h]
mov	eax, [ecx]
test	eax, eax
jz	short loc_4178FD
mov	eax, [eax+8]
retn

loc_4178FD:
xor	eax, eax
retn
sub_4178F0 endp




sub_417900 proc	near
mov	ecx, [eax+4]
lea	eax, [ecx+edx*4]
retn
sub_417900 endp

align 10h



sub_417910 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+0B0h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_417952
test	esi, esi
jz	short loc_41793E
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41793E
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41793E:
mov	[ebx+0B0h], edi
test	edi, edi
jz	short loc_417952
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_417952:
pop	edi
pop	esi
pop	ebx
retn	4
sub_417910 endp

align 10h



sub_417960 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+0ACh]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_4179A2
test	esi, esi
jz	short loc_41798E
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41798E
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41798E:
mov	[ebx+0ACh], edi
test	edi, edi
jz	short loc_4179A2
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_4179A2:
pop	edi
pop	esi
pop	ebx
retn	4
sub_417960 endp

align 10h



sub_4179B0 proc	near
mov	eax, [eax+0B0h]
mov	[esi], eax
test	eax, eax
jz	short loc_4179C6
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4179C6:
mov	eax, esi
retn
sub_4179B0 endp

align 10h



sub_4179D0 proc	near
mov	eax, [eax+0ACh]
mov	[esi], eax
test	eax, eax
jz	short loc_4179E6
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4179E6:
mov	eax, esi
retn
sub_4179D0 endp

align 10h


; Attributes: thunk

sub_4179F0 proc	near
jmp	sub_123E740
sub_4179F0 endp

align 10h



sub_417A00 proc	near
mov	eax, offset off_17EE320
retn
sub_417A00 endp

align 10h



sub_417A10 proc	near
mov	eax, 0Bh
retn
sub_417A10 endp

align 10h



sub_417A20 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_417A2F
or	word ptr [ecx+18h], 1
retn	4

loc_417A2F:
mov	eax, 0FFFEh
and	[ecx+18h], ax
retn	4
sub_417A20 endp

align 10h



sub_417A40 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_417A4F
or	word ptr [ecx+18h], 2
retn	4

loc_417A4F:
mov	eax, 0FFFDh
and	[ecx+18h], ax
retn	4
sub_417A40 endp

align 10h



sub_417A60 proc	near

arg_0= dword ptr  4

mov	ax, [ecx+18h]
mov	edx, 0FFC3h
and	ax, dx
mov	edx, [esp+arg_0]
add	edx, edx
add	edx, edx
or	ax, dx
mov	[ecx+18h], ax
retn	4
sub_417A60 endp

align 10h



sub_417A80 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
xor	eax, eax
mov	[esi+10h], edi
mov	[esi+14h], ax
xor	ecx, ecx
mov	edx, 0Fh
pop	edi
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_1550808
mov	[esi+18h], dx
mov	eax, esi
pop	esi
retn
sub_417A80 endp

align 10h



sub_417AD0 proc	near

arg_0= dword ptr  4

test	esi, esi
jz	short locret_417AF0
mov	eax, [esi]
mov	edx, [eax+48h]
mov	ecx, esi
call	edx
mov	ecx, [esp+arg_0]
lea	edx, [ecx+eax*4+8]
mov	[esp+arg_0], edx
mov	eax, esi
jmp	sub_420330

locret_417AF0:
retn	4
sub_417AD0 endp

align 10h



sub_417B00 proc	near
mov	eax, offset off_17EE318
retn
sub_417B00 endp

align 10h



sub_417B10 proc	near
mov	eax, 9
retn
sub_417B10 endp

align 10h



sub_417B20 proc	near

arg_0= dword ptr  4

mov	ax, [ecx+18h]
mov	edx, 0FFCFh
and	ax, dx
mov	edx, [esp+arg_0]
shl	edx, 4
or	ax, dx
mov	[ecx+18h], ax
retn	4
sub_417B20 endp

align 10h



sub_417B40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	edx, ds:0[eax*8]
mov	ax, [ecx+18h]
push	esi
mov	esi, 0FFF7h
and	ax, si
or	dx, ax
mov	[ecx+18h], dx
pop	esi
retn	4
sub_417B40 endp

align 10h



sub_417B70 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
xor	eax, eax
mov	[esi+10h], edi
mov	[esi+14h], ax
xor	ecx, ecx
mov	edx, 8
pop	edi
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_15FBE54
mov	[esi+18h], dx
mov	eax, esi
pop	esi
retn
sub_417B70 endp

align 10h



sub_417BC0 proc	near
movzx	eax, ax
push	edi
mov	edi, [esi+eax*4+0Ch]
cmp	[esi+5D8h], edi
jz	short loc_417BED
mov	eax, [esi+2238h]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	97h
push	eax
call	edx
mov	[esi+5D8h], edi

loc_417BED:
pop	edi
retn
sub_417BC0 endp

align 10h



sub_417BF0 proc	near
mov	ax, [eax+30h]
retn
sub_417BF0 endp

align 10h



; int __cdecl sub_417C00(int, float)
sub_417C00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	dword ptr [ecx]
mov	eax, [esp+arg_0]
fld	[esp+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fmul	st, st(1)
fstp	dword ptr [eax+8]
fld	dword ptr [edx]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+0Ch]
fmul	st, st(1)
fstp	dword ptr [eax+10h]
fld	dword ptr [ecx+10h]
fmul	st, st(1)
fstp	dword ptr [eax+14h]
fld	dword ptr [ecx+14h]
fmul	st, st(1)
fstp	dword ptr [eax+18h]
fld	dword ptr [edx+4]
fstp	dword ptr [eax+1Ch]
fld	dword ptr [ecx+18h]
fmul	st, st(1)
fstp	dword ptr [eax+20h]
fld	dword ptr [ecx+1Ch]
fmul	st, st(1)
fstp	dword ptr [eax+24h]
fmul	dword ptr [ecx+20h]
fstp	dword ptr [eax+28h]
fld	dword ptr [edx+8]
fstp	dword ptr [eax+2Ch]
fldz
fst	dword ptr [eax+30h]
fst	dword ptr [eax+34h]
fstp	dword ptr [eax+38h]
fld1
fstp	dword ptr [eax+3Ch]
retn
sub_417C00 endp

align 10h



sub_417C80 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 3Ch
push	ebx
mov	ebx, [esp+40h+arg_0]
push	ebp
mov	ebp, [esp+44h+arg_8]
fld	dword ptr [ebp+30h]
push	esi
fmul	dword ptr [ebx+30h]
push	edi
mov	edi, [esp+4Ch+arg_4]
push	ebx
mov	ecx, ebp
fstp	dword ptr [edi+30h]
lea	eax, [esp+50h+var_24]
call	sub_116BDE0
mov	esi, eax
mov	ecx, 9
rep movsd
fld	dword ptr [ebx+4]
fmul	dword ptr [ebp+28h]
fld	dword ptr [ebp+24h]
fmul	dword ptr [ebx]
faddp	st(1), st
fld	dword ptr [ebx+8]
fmul	dword ptr [ebp+2Ch]
faddp	st(1), st
mov	eax, [esp+4Ch+arg_4]
pop	edi
pop	esi
fstp	[esp+44h+var_3C]
fld	dword ptr [ebx+0Ch]
fmul	dword ptr [ebp+24h]
fld	dword ptr [ebx+10h]
fmul	dword ptr [ebp+28h]
faddp	st(1), st
fld	dword ptr [ebx+14h]
fmul	dword ptr [ebp+2Ch]
faddp	st(1), st
fstp	[esp+44h+var_38]
fld	dword ptr [ebx+18h]
fmul	dword ptr [ebp+24h]
fld	dword ptr [ebx+1Ch]
fmul	dword ptr [ebp+28h]
faddp	st(1), st
fld	dword ptr [ebx+20h]
fmul	dword ptr [ebp+2Ch]
pop	ebp
faddp	st(1), st
fstp	[esp+40h+var_34]
fld	dword ptr [ebx+30h]
fstp	[esp+40h+arg_8]
fld	[esp+40h+var_3C]
fld	[esp+40h+arg_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+40h+var_30]
fld	[esp+40h+var_38]
fmul	st, st(1)
fstp	[esp+40h+var_2C]
fmul	[esp+40h+var_34]
fstp	[esp+40h+var_28]
fld	[esp+40h+var_30]
fadd	dword ptr [ebx+24h]
fstp	[esp+40h+var_3C]
mov	ecx, [esp+40h+var_3C]
fld	dword ptr [ebx+28h]
fadd	[esp+40h+var_2C]
fstp	[esp+40h+var_38]
mov	edx, [esp+40h+var_38]
fld	dword ptr [ebx+2Ch]
mov	[eax+24h], ecx
fadd	[esp+40h+var_28]
mov	[eax+28h], edx
pop	ebx
fstp	[esp+3Ch+var_34]
mov	ecx, [esp+3Ch+var_34]
mov	[eax+2Ch], ecx
add	esp, 3Ch
retn	0Ch
sub_417C80 endp

align 10h



sub_417D70 proc	near

arg_0= dword ptr  4

lea	edx, [ecx+eax*2]
add	edx, eax
mov	eax, [esp+arg_0]
fld	dword ptr [eax+edx*4]
retn	4
sub_417D70 endp

align 10h



; int __cdecl sub_417D80(int, float)
sub_417D80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	dword ptr [ecx]
mov	eax, [esp+arg_0]
fld	[esp+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [ecx+0Ch]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+18h]
fmul	st, st(1)
fstp	dword ptr [eax+8]
fldz
fst	dword ptr [eax+0Ch]
fld	dword ptr [ecx+4]
fmul	st, st(2)
fstp	dword ptr [eax+10h]
fld	dword ptr [ecx+10h]
fmul	st, st(2)
fstp	dword ptr [eax+14h]
fld	dword ptr [ecx+1Ch]
fmul	st, st(2)
fstp	dword ptr [eax+18h]
fst	dword ptr [eax+1Ch]
fld	dword ptr [ecx+8]
fmul	st, st(2)
fstp	dword ptr [eax+20h]
fld	dword ptr [ecx+14h]
fmul	st, st(2)
fstp	dword ptr [eax+24h]
fld	dword ptr [ecx+20h]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+28h]
fstp	dword ptr [eax+2Ch]
fld	dword ptr [edx]
fstp	dword ptr [eax+30h]
fld	dword ptr [edx+4]
fstp	dword ptr [eax+34h]
fld	dword ptr [edx+8]
fstp	dword ptr [eax+38h]
fld1
fstp	dword ptr [eax+3Ch]
retn
sub_417D80 endp

align 10h



sub_417E00 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [eax+4]
fmul	dword ptr [ecx+4]
fld	dword ptr [eax]
fmul	dword ptr [ecx]
faddp	st(1), st
fld	dword ptr [eax+8]
fmul	dword ptr [ecx+8]
faddp	st(1), st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_417E00 endp

align 10h



sub_417E20 proc	near
cmp	dword ptr [esi+4Ch], 1
jnz	short loc_417E32
mov	eax, [esi]
mov	edx, [eax+13Ch]
mov	ecx, esi
call	edx

loc_417E32:
add	dword ptr [esi+4Ch], 0FFFFFFFFh
lea	eax, [esi+30h]
jnz	short loc_417E42
mov	dword ptr [eax+18h], 0

loc_417E42:		; lpCriticalSection
push	eax
call	ds:LeaveCriticalSection
retn
sub_417E20 endp

align 10h



sub_417E50 proc	near
add	dword ptr [esi+6Ch], 0FFFFFFFFh
lea	eax, [esi+50h]
jnz	short loc_417E60
mov	dword ptr [eax+18h], 0

loc_417E60:
push	edi
mov	edi, ds:LeaveCriticalSection
push	eax		; lpCriticalSection
call	edi ; LeaveCriticalSection
cmp	dword ptr [esi+4Ch], 1
jnz	short loc_417E7C
mov	eax, [esi]
mov	edx, [eax+13Ch]
mov	ecx, esi
call	edx

loc_417E7C:
add	dword ptr [esi+4Ch], 0FFFFFFFFh
lea	eax, [esi+30h]
jnz	short loc_417E8C
mov	dword ptr [eax+18h], 0

loc_417E8C:		; lpCriticalSection
push	eax
call	edi ; LeaveCriticalSection
pop	edi
retn
sub_417E50 endp

align 10h



sub_417EA0 proc	near
mov	eax, [eax+48h]
retn
sub_417EA0 endp

align 10h



sub_417EB0 proc	near
push	esi
lea	esi, [edi+30h]
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	[esi+18h], eax
mov	eax, 1
add	[esi+1Ch], eax
pop	esi
cmp	[edi+4Ch], eax
jnz	short locret_417EDE
mov	eax, [edi]
mov	edx, [eax+138h]
mov	ecx, edi
jmp	edx

locret_417EDE:
retn
sub_417EB0 endp

align 10h



sub_417EE0 proc	near
push	ebx
mov	ebx, ds:EnterCriticalSection
push	ebp
push	esi
lea	esi, [edi+30h]
push	esi		; lpCriticalSection
call	ebx ; EnterCriticalSection
mov	ebp, ds:GetCurrentThreadId
call	ebp ; GetCurrentThreadId
mov	[esi+18h], eax
mov	eax, 1
add	[esi+1Ch], eax
cmp	[edi+4Ch], eax
jnz	short loc_417F13
mov	eax, [edi]
mov	edx, [eax+138h]
mov	ecx, edi
call	edx

loc_417F13:
lea	esi, [edi+50h]
push	esi		; lpCriticalSection
call	ebx ; EnterCriticalSection
call	ebp ; GetCurrentThreadId
inc	dword ptr [esi+1Ch]
mov	[esi+18h], eax
pop	esi
pop	ebp
pop	ebx
retn
sub_417EE0 endp

align 10h



sub_417F30 proc	near

arg_0= word ptr	 4

mov	cx, [eax+34h]
mov	edx, 0FFFh
and	cx, dx
or	cx, [esp+arg_0]
mov	[eax+34h], cx
retn	4
sub_417F30 endp

align 10h



sub_417F50 proc	near
mov	edx, [esi+0C4h]
xor	eax, eax
test	edx, edx
jbe	short loc_417F71
mov	ecx, [esi+0BCh]
add	ecx, 4

loc_417F65:
cmp	[ecx], edi
jz	short loc_417F7E
inc	eax
add	ecx, 10h
cmp	eax, edx
jb	short loc_417F65

loc_417F71:
mov	dword ptr [esi+0C8h], 0FFFFFFFFh
xor	al, al
retn

loc_417F7E:
mov	[esi+0C8h], eax
mov	al, 1
retn
sub_417F50 endp

align 10h



sub_417F90 proc	near
mov	eax, [ecx+0C8h]
cmp	eax, [ecx+0C4h]
jb	short loc_417FA1
xor	eax, eax
retn

loc_417FA1:
mov	ecx, [ecx+0BCh]
shl	eax, 4
mov	eax, [eax+ecx+4]
retn
sub_417F90 endp

align 10h



sub_417FB0 proc	near
mov	ax, [eax+40h]
retn
sub_417FB0 endp

align 10h



sub_417FC0 proc	near
mov	eax, [eax+2Ch]
retn
sub_417FC0 endp

align 10h



sub_417FD0 proc	near
mov	eax, [eax+28h]
retn
sub_417FD0 endp

align 10h



sub_417FE0 proc	near
mov	eax, [edx+4]
cmp	eax, [esi+4]
jnz	short loc_418012
mov	cl, [edx]
cmp	cl, [esi]
jnz	short loc_418012
mov	eax, [edx+8]
cmp	eax, [esi+8]
jnz	short loc_418012
mov	cl, [edx+1]
cmp	cl, [esi+1]
jnz	short loc_418012
mov	ecx, [edx+0Ch]
mov	eax, [esi+0Ch]
cmp	ecx, eax
jz	short loc_418015
cmp	eax, 0FFFFFFFFh
jz	short loc_418015
cmp	ecx, 0FFFFFFFFh
jz	short loc_418015

loc_418012:
mov	al, 1
retn

loc_418015:
push	ebp
push	edi
mov	ebp, edx
xor	edi, edi
lea	ecx, [edx+1Ch]
lea	eax, [esi+14h]
sub	ebp, esi

loc_418023:
mov	edx, [eax+ebp]
cmp	edx, [eax]
jnz	short loc_418052
mov	edx, [ecx-4]
cmp	edx, [eax+4]
jnz	short loc_418052
mov	dl, [ecx]
cmp	dl, [eax+8]
jnz	short loc_418052
mov	dl, [ecx+1]
cmp	dl, [eax+9]
jnz	short loc_418052
inc	edi
add	ecx, 0Ch
add	eax, 0Ch
cmp	edi, 4
jl	short loc_418023
pop	edi
xor	al, al
pop	ebp
retn

loc_418052:
pop	edi
mov	al, 1
pop	ebp
retn
sub_417FE0 endp

align 10h



sub_418060 proc	near
mov	ecx, [eax+54h]
mov	eax, [ecx+edx*4]
retn
sub_418060 endp

align 10h



sub_418070 proc	near
mov	eax, [eax+3E0h]
retn
sub_418070 endp

align 10h



sub_418080 proc	near
mov	eax, [eax+3E4h]
retn
sub_418080 endp

align 10h



sub_418090 proc	near
mov	eax, [eax+14h]
retn
sub_418090 endp

align 10h



sub_4180A0 proc	near
test	byte ptr [edi+3E8h], 10h
push	esi
lea	esi, [edi+40Ch]
mov	byte ptr [esi],	0
jz	short loc_4180C3
push	offset aPure	; "PURE"
push	20h		; SizeInBytes
push	esi		; Dst
call	_strcat_s
add	esp, 0Ch

loc_4180C3:
test	byte ptr [edi+3E8h], 4
jz	short loc_4180DC
push	offset aMt_0	; " MT"
push	20h		; SizeInBytes
push	esi		; Dst
call	_strcat_s
add	esp, 0Ch

loc_4180DC:
test	byte ptr [edi+3E8h], 40h
jz	short loc_4180F5
push	offset aHwvp	; " HWVP"
push	20h		; SizeInBytes
push	esi		; Dst
call	_strcat_s
add	esp, 0Ch

loc_4180F5:
test	byte ptr [edi+3E8h], 80h
jz	short loc_41810E
push	offset aMixvp	; " MIXVP"
push	20h		; SizeInBytes
push	esi		; Dst
call	_strcat_s
add	esp, 0Ch

loc_41810E:
test	byte ptr [edi+3E8h], 20h
jz	short loc_418127
push	offset aSwvp	; " SWVP"
push	20h		; SizeInBytes
push	esi		; Dst
call	_strcat_s
add	esp, 0Ch

loc_418127:
mov	eax, esi
pop	esi
retn
sub_4180A0 endp

align 10h



sub_418130 proc	near
mov	dword ptr [eax], 6
mov	dword ptr [eax+4], 3
mov	dword ptr [eax+8], 2
retn
sub_418130 endp

align 10h



sub_418150 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+5Ch]
mov	eax, [ecx+60h]
mov	eax, [edx+eax*4]
imul	eax, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
add	eax, [edx+esi*4]
pop	esi
add	eax, [ecx+50h]
retn	8
sub_418150 endp

align 10h



sub_418170 proc	near
cmp	eax, 4		; switch 5 cases
ja	short loc_41819A ; default
jmp	ds:off_4181A0[eax*4] ; switch jump

loc_41817C:		; jumptable 00418175 case 0
mov	eax, 80000000h
retn

loc_418182:		; jumptable 00418175 case 1
mov	eax, 1
retn

loc_418188:		; jumptable 00418175 case 2
mov	eax, 2
retn

loc_41818E:		; jumptable 00418175 case 3
mov	eax, 4
retn

loc_418194:		; jumptable 00418175 case 4
mov	eax, 8
retn

loc_41819A:		; default
xor	eax, eax
retn
sub_418170 endp

align 10h
off_4181A0 dd offset loc_41817C	; jump table for switch	statement
dd offset loc_418182
dd offset loc_418188
dd offset loc_41818E
dd offset loc_418194
align 10h



sub_4181C0 proc	near
test	eax, eax
jz	loc_4182B6
cmp	eax, 1
jz	loc_4182B6
and	eax, 0FFFF0000h
cmp	eax, 90000h
ja	short loc_418259
jz	short loc_418253
cmp	eax, 50000h
ja	short loc_41822C
jz	short loc_418226
cmp	eax, 30000h
ja	short loc_418215
jz	short loc_41820F
cmp	eax, 10000h
jz	short loc_418209
cmp	eax, 20000h
jnz	loc_4182B6
mov	eax, 3
retn

loc_418209:
mov	eax, 2
retn

loc_41820F:
mov	eax, 4
retn

loc_418215:
cmp	eax, 40000h
jnz	loc_4182B6
mov	eax, 5
retn

loc_418226:
mov	eax, 6
retn

loc_41822C:
cmp	eax, 60000h
jz	short loc_41824D
cmp	eax, 70000h
jz	short loc_418247
cmp	eax, 80000h
jnz	short loc_4182B6
mov	eax, 9
retn

loc_418247:
mov	eax, 8
retn

loc_41824D:
mov	eax, 7
retn

loc_418253:
mov	eax, 0Ah
retn

loc_418259:
cmp	eax, 0D0000h
ja	short loc_41828F
jz	short loc_418289
cmp	eax, 0A0000h
jz	short loc_418283
cmp	eax, 0B0000h
jz	short loc_41827D
cmp	eax, 0C0000h
jnz	short loc_4182B6
mov	eax, 0Dh
retn

loc_41827D:
mov	eax, 0Ch
retn

loc_418283:
mov	eax, 0Bh
retn

loc_418289:
mov	eax, 0Eh
retn

loc_41828F:
cmp	eax, 0E0000h
jz	short loc_4182B0
cmp	eax, 0F0000h
jz	short loc_4182AA
cmp	eax, 80000000h
jnz	short loc_4182B6
mov	eax, 1
retn

loc_4182AA:
mov	eax, 10h
retn

loc_4182B0:
mov	eax, 0Fh
retn

loc_4182B6:
xor	eax, eax
retn
sub_4181C0 endp

align 10h



sub_4182C0 proc	near
cmp	eax, 11h	; switch 18 cases
ja	short loc_418332 ; default
			; jumptable 004182C5 case 0
jmp	ds:off_418338[eax*4] ; switch jump

loc_4182CC:		; jumptable 004182C5 case 1
mov	eax, 14h
retn

loc_4182D2:		; jumptable 004182C5 case 2
mov	eax, 15h
retn

loc_4182D8:		; jumptable 004182C5 case 3
mov	eax, 16h
retn

loc_4182DE:		; jumptable 004182C5 case 4
mov	eax, 17h
retn

loc_4182E4:		; jumptable 004182C5 case 5
mov	eax, 18h
retn

loc_4182EA:		; jumptable 004182C5 case 6
mov	eax, 19h
retn

loc_4182F0:		; jumptable 004182C5 case 7
mov	eax, 1Ah
retn

loc_4182F6:		; jumptable 004182C5 case 8
mov	eax, 1Bh
retn

loc_4182FC:		; jumptable 004182C5 case 9
mov	eax, 1Ch
retn

loc_418302:		; jumptable 004182C5 case 10
mov	eax, 1Dh
retn

loc_418308:		; jumptable 004182C5 case 11
mov	eax, 1Eh
retn

loc_41830E:		; jumptable 004182C5 case 12
mov	eax, 6Fh
retn

loc_418314:		; jumptable 004182C5 case 13
mov	eax, 70h
retn

loc_41831A:		; jumptable 004182C5 case 14
mov	eax, 71h
retn

loc_418320:		; jumptable 004182C5 case 15
mov	eax, 72h
retn

loc_418326:		; jumptable 004182C5 case 16
mov	eax, 73h
retn

loc_41832C:		; jumptable 004182C5 case 17
mov	eax, 74h
retn

loc_418332:		; default
xor	eax, eax	; jumptable 004182C5 case 0
retn
sub_4182C0 endp

align 4
off_418338 dd offset loc_418332	; jump table for switch	statement
dd offset loc_4182CC
dd offset loc_4182D2
dd offset loc_4182D8
dd offset loc_4182DE
dd offset loc_4182E4
dd offset loc_4182EA
dd offset loc_4182F0
dd offset loc_4182F6
dd offset loc_4182FC
dd offset loc_418302
dd offset loc_418308
dd offset loc_41830E
dd offset loc_418314
dd offset loc_41831A
dd offset loc_418320
dd offset loc_418326
dd offset loc_41832C



sub_418380 proc	near
mov	eax, [eax+10h]
retn
sub_418380 endp

align 10h



sub_418390 proc	near
push	esi
mov	esi, eax
test	esi, esi
jnz	short loc_418399
pop	esi
retn

loc_418399:
call	sub_41FF90
pop	esi
retn
sub_418390 endp




sub_4183A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jz	short locret_4183B4
add	ecx, 1Ch
mov	[esp+arg_0], ecx
jmp	sub_420330

locret_4183B4:
retn	4
sub_4183A0 endp

align 10h



sub_4183C0 proc	near
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_4183DE
lea	ecx, [ecx+0]

loc_4183D0:
cmp	eax, offset off_17EE2C8
jz	short loc_4183EA
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_4183D0

loc_4183DE:
xor	al, al
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn

loc_4183EA:
mov	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn
sub_4183C0 endp

align 10h



sub_418400 proc	near
add	eax, 18h
retn
sub_418400 endp

align 10h



sub_418410 proc	near
mov	eax, [ecx+408h]
retn
sub_418410 endp

align 10h



sub_418420 proc	near
cmp	eax, 74h	; switch 117 cases
ja	short loc_418499 ; default
			; jumptable 0041842C cases 0-19,31-110
movzx	eax, ds:byte_4184E8[eax]
jmp	ds:off_41849C[eax*4] ; switch jump

loc_418433:		; jumptable 0041842C case 20
mov	eax, 1
retn

loc_418439:		; jumptable 0041842C case 21
mov	eax, 2
retn

loc_41843F:		; jumptable 0041842C case 22
mov	eax, 3
retn

loc_418445:		; jumptable 0041842C case 23
mov	eax, 4
retn

loc_41844B:		; jumptable 0041842C case 24
mov	eax, 5
retn

loc_418451:		; jumptable 0041842C case 25
mov	eax, 6
retn

loc_418457:		; jumptable 0041842C case 26
mov	eax, 7
retn

loc_41845D:		; jumptable 0041842C case 27
mov	eax, 8
retn

loc_418463:		; jumptable 0041842C case 28
mov	eax, 9
retn

loc_418469:		; jumptable 0041842C case 29
mov	eax, 0Ah
retn

loc_41846F:		; jumptable 0041842C case 30
mov	eax, 0Bh
retn

loc_418475:		; jumptable 0041842C case 111
mov	eax, 0Ch
retn

loc_41847B:		; jumptable 0041842C case 112
mov	eax, 0Dh
retn

loc_418481:		; jumptable 0041842C case 113
mov	eax, 0Eh
retn

loc_418487:		; jumptable 0041842C case 114
mov	eax, 0Fh
retn

loc_41848D:		; jumptable 0041842C case 115
mov	eax, 10h
retn

loc_418493:		; jumptable 0041842C case 116
mov	eax, 11h
retn

loc_418499:		; default
xor	eax, eax	; jumptable 0041842C cases 0-19,31-110
retn
sub_418420 endp

off_41849C dd offset loc_418499, offset	loc_418433 ; jump table	for switch statement
dd offset loc_418439, offset loc_41843F
dd offset loc_418445, offset loc_41844B
dd offset loc_418451, offset loc_418457
dd offset loc_41845D, offset loc_418463
dd offset loc_418469, offset loc_41846F
dd offset loc_418475, offset loc_41847B
dd offset loc_418481, offset loc_418487
dd offset loc_41848D, offset loc_418493
dd offset loc_418499
byte_4184E8 db	    0,	 12h,	12h,   12h ; indirect table for	switch statement
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db	1,     2,     3,     4
db	5,     6,     7,     8
db	9,   0Ah,   0Bh,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   12h
db    12h,   12h,   12h,   0Ch
db    0Dh,   0Eh,   0Fh,   10h
db    11h
align 10h



sub_418560 proc	near
cmp	eax, 0Bh	; switch 12 cases
ja	short loc_418590 ; default
			; jumptable 00418565 cases 0,9,10
jmp	ds:off_418594[eax*4] ; switch jump

loc_41856C:		; jumptable 00418565 case 1
mov	eax, 14h
retn

loc_418572:		; jumptable 00418565 cases 2,3
mov	eax, 16h
retn

loc_418578:		; jumptable 00418565 case 4
mov	eax, 17h
retn

loc_41857E:		; jumptable 00418565 cases 5,6
mov	eax, 18h
retn

loc_418584:		; jumptable 00418565 cases 7,11
mov	eax, 1Eh
retn

loc_41858A:		; jumptable 00418565 case 8
mov	eax, 1Bh
retn

loc_418590:		; default
xor	eax, eax	; jumptable 00418565 cases 0,9,10
retn
sub_418560 endp

align 4
off_418594 dd offset loc_418590	; jump table for switch	statement
dd offset loc_41856C
dd offset loc_418572
dd offset loc_418572
dd offset loc_418578
dd offset loc_41857E
dd offset loc_41857E
dd offset loc_418584
dd offset loc_41858A
dd offset loc_418590
dd offset loc_418590
dd offset loc_418584
align 10h



sub_4185D0 proc	near
movzx	edx, word ptr [ecx+0Eh]
cmp	eax, edx
jnb	short loc_4185DF
mov	ecx, [ecx+8]
mov	eax, [ecx+eax*4]
retn

loc_4185DF:
xor	eax, eax
retn
sub_4185D0 endp

align 10h



sub_4185F0 proc	near
test	eax, eax
jz	short loc_41860D
push	0FFh		; MaxCount
push	eax		; Src
push	100h		; SizeInBytes
push	offset byte_1889418 ; Dst
call	_strncpy_s
add	esp, 10h
retn

loc_41860D:
mov	byte_1889418, 0
retn
sub_4185F0 endp

align 10h



sub_418620 proc	near
test	ecx, ecx
jz	short loc_41863E
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
test	eax, eax
jz	short loc_41863E
nop

loc_418630:
cmp	eax, offset off_17EE2B0
jz	short loc_418641
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_418630

loc_41863E:
xor	al, al
retn

loc_418641:
mov	al, 1
retn
sub_418620 endp

align 10h



sub_418650 proc	near
test	eax, eax
jz	short locret_418668
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_418668:
retn
sub_418650 endp

align 10h



sub_418670 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	[esi], eax
test	eax, eax
jz	short loc_418687
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_418687:
mov	eax, esi
pop	esi
retn	4
sub_418670 endp

align 10h



; int __stdcall	sub_418690(float, float, float,	float)
sub_418690 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	[esp+arg_0]
fstp	dword ptr [eax]
fld	[esp+arg_4]
fstp	dword ptr [eax+4]
fld	[esp+arg_8]
fstp	dword ptr [eax+8]
fld	[esp+arg_C]
fstp	dword ptr [eax+0Ch]
retn	10h
sub_418690 endp

align 10h



sub_4186B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155086C
call	sub_418AE0
mov	dword ptr [esi], offset	off_1550880
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_4186E4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4186E4:
test	[esp+4+arg_0], 1
jz	short loc_4186FF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_4186FF:
mov	eax, esi
pop	esi
retn	4
sub_4186B0 endp

align 10h



sub_418710 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1550880
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_418739
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_418739:
test	[esp+4+arg_0], 1
jz	short loc_418754
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_418754:
mov	eax, esi
pop	esi
retn	4
sub_418710 endp

align 10h



sub_418760 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [edi]
cmp	esi, [ebx]
jz	short loc_418799
test	esi, esi
jz	short loc_418787
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_418787
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_418787:
mov	eax, [ebx]
mov	[edi], eax
test	eax, eax
jz	short loc_418799
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_418799:
pop	esi
mov	eax, edi
pop	ebx
retn	4
sub_418760 endp




sub_4187A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1550858
call	sub_418AE0
mov	dword ptr [esi], offset	off_15C9924
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_4187D4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4187D4:
test	[esp+4+arg_0], 1
jz	short loc_4187EF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_4187EF:
mov	eax, esi
pop	esi
retn	4
sub_4187A0 endp

align 10h



sub_418800 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1242FB0
test	[esp+4+arg_0], 1
jz	short loc_418829
test	esi, esi
jz	short loc_418829
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8Ch
push	3
push	esi
call	eax

loc_418829:
mov	eax, esi
pop	esi
retn	4
sub_418800 endp

align 10h



sub_418830 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+14h]
mov	dword ptr [esi], offset	off_15508A0
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+1Ch], 0
test	eax, eax
jz	short loc_418856
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_418856:
mov	ecx, esi
mov	dword ptr [esi+14h], 0
call	sub_1160070
test	[esp+4+arg_0], 1
jz	short loc_41887E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_41887E:
mov	eax, esi
pop	esi
retn	4
sub_418830 endp

align 10h



sub_418890 proc	near
mov	eax, offset off_17EDFB0
retn
sub_418890 endp

align 10h



sub_4188A0 proc	near
mov	eax, dword_1889414
retn
sub_4188A0 endp

align 10h



sub_4188B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

mov	eax, dword_1889370
sub	esp, 14h
test	eax, eax
jnz	short loc_418918
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 20h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_41890A
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_41890A:
push	edi
mov	edi, eax
call	sub_1193B40
mov	dword_1889370, eax
pop	edi

loc_418918:
add	esp, 14h
retn
sub_4188B0 endp

align 10h



sub_418920 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1193780
test	[esp+4+arg_0], 1
jz	short loc_418946
test	esi, esi
jz	short loc_418946
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_418946:
mov	eax, esi
pop	esi
retn	4
sub_418920 endp

align 10h



sub_418950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, dword_1889374
mov	eax, [edi+4]
push	eax
mov	edx, ebx
call	sub_411670
mov	ecx, [edi+8]
mov	ebp, eax
mov	esi, [ecx+ebp*4]
add	esp, 4
test	esi, esi
jz	short loc_4189AF

loc_418978:
mov	ecx, [esi+4]
mov	eax, ebx
lea	ecx, [ecx+0]

loc_418980:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_4189A0
test	dl, dl
jz	short loc_41899C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_4189A0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_418980

loc_41899C:
xor	eax, eax
jmp	short loc_4189A5

loc_4189A0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_4189A5:
test	eax, eax
jz	short loc_4189E2
mov	esi, [esi]
test	esi, esi
jnz	short loc_418978

loc_4189AF:
mov	eax, [edi]
mov	edx, [eax+0Ch]
mov	ecx, edi
call	edx
mov	ecx, [esp+10h+arg_4]
push	ecx
mov	esi, eax
mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
push	esi
mov	ecx, edi
call	edx
mov	eax, [edi+8]
mov	ecx, [eax+ebp*4]
mov	[esi], ecx
mov	edx, [edi+8]
mov	[edx+ebp*4], esi
inc	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_4189E2:
mov	edx, [esp+10h+arg_4]
pop	edi
mov	[esi+8], edx
pop	esi
pop	ebp
pop	ebx
retn	8
sub_418950 endp




sub_4189F0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, dword_1889374
mov	eax, [edi+4]
push	eax
mov	edx, ebp
call	sub_411670
mov	ecx, [edi+8]
mov	esi, [ecx+eax*4]
lea	ebx, [ecx+eax*4]
add	esp, 4
test	esi, esi
jz	loc_418AB1
mov	ecx, [esi+4]
mov	eax, ebp

loc_418A22:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_418A42
test	dl, dl
jz	short loc_418A3E
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_418A42
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_418A22

loc_418A3E:
xor	eax, eax
jmp	short loc_418A47

loc_418A42:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_418A47:
test	eax, eax
jnz	short loc_418A6F
mov	edx, [esi]
mov	[ebx], edx
mov	eax, [edi]
mov	edx, [eax+8]
push	esi
mov	ecx, edi
call	edx
mov	eax, [edi]
mov	edx, [eax+10h]
push	esi
mov	ecx, edi
call	edx
dec	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4

loc_418A6F:
mov	ebx, esi
mov	esi, [esi]
test	esi, esi
jz	short loc_418AB1

loc_418A77:
mov	ecx, [esi+4]
mov	eax, ebp
lea	esp, [esp+0]

loc_418A80:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_418AA0
test	dl, dl
jz	short loc_418A9C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_418AA0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_418A80

loc_418A9C:
xor	eax, eax
jmp	short loc_418AA5

loc_418AA0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_418AA5:
test	eax, eax
jz	short loc_418ABA
mov	ebx, esi
mov	esi, [esi]
test	esi, esi
jnz	short loc_418A77

loc_418AB1:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	4

loc_418ABA:
mov	eax, [esi]
mov	[ebx], eax
mov	edx, [edi]
mov	eax, [edx+8]
push	esi
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	eax, [edx+10h]
push	esi
mov	ecx, edi
call	eax
dec	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4
sub_4189F0 endp

align 10h



sub_418AE0 proc	near
push	ebx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_418B3A
push	edi
lea	esp, [esp+0]

loc_418AF0:
mov	eax, [esi+8]
cmp	dword ptr [eax+ebx*4], 0
jz	short loc_418B2A
lea	esp, [esp+0]

loc_418B00:
mov	ecx, [esi+8]
mov	edi, [ecx+ebx*4]
mov	edx, [edi]
lea	eax, [ecx+ebx*4]
mov	[eax], edx
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+10h]
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi+8]
cmp	dword ptr [eax+ebx*4], 0
jnz	short loc_418B00

loc_418B2A:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_418AF0
pop	edi
mov	dword ptr [esi+0Ch], 0
pop	ebx
retn

loc_418B3A:
mov	[esi+0Ch], ebx
pop	ebx
retn
sub_418AE0 endp

align 10h



sub_418B40 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, dword_1889374
mov	eax, [esi+4]
push	eax
mov	edx, edi
call	sub_411670
mov	ecx, [esi+8]
mov	eax, [ecx+eax*4]
add	esp, 4
test	eax, eax
jz	short loc_418B94

loc_418B60:
mov	edx, [eax+4]
mov	ecx, edi

loc_418B65:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_418B85
test	bl, bl
jz	short loc_418B81
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_418B85
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_418B65

loc_418B81:
xor	ecx, ecx
jmp	short loc_418B8A

loc_418B85:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_418B8A:
test	ecx, ecx
jz	short loc_418B9B
mov	eax, [eax]
test	eax, eax
jnz	short loc_418B60

loc_418B94:
pop	esi
xor	al, al
pop	ebx
retn	4

loc_418B9B:
mov	edx, [eax+8]
mov	eax, [esp+8+arg_0]
pop	esi
mov	[eax], edx
mov	al, 1
pop	ebx
retn	4
sub_418B40 endp

align 10h



sub_418BB0 proc	near
mov	ecx, dword_1889374
mov	edx, [ecx+4]
xor	eax, eax
push	esi
test	edx, edx
jbe	short loc_418BD2
mov	esi, [ecx+8]
mov	ecx, esi

loc_418BC5:
cmp	dword ptr [ecx], 0
jnz	short loc_418BD6
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_418BC5

loc_418BD2:
xor	eax, eax
pop	esi
retn

loc_418BD6:
mov	eax, [esi+eax*4]
pop	esi
retn
sub_418BB0 endp

align 10h



sub_418BE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_411760
test	[esp+4+arg_0], 1
jz	short loc_418C06
test	esi, esi
jz	short loc_418C06
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_418C06:
mov	eax, esi
pop	esi
retn	4
sub_418BE0 endp

align 10h



sub_418C10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_15509BC
test	eax, eax
jz	short loc_418C34
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_418C34:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_155096C
jz	short loc_418C55
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_418C55:
mov	eax, esi
pop	esi
retn	4
sub_418C10 endp

align 10h



sub_418C60 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155096C
jz	short loc_418C83
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8
push	3
push	esi
call	eax

loc_418C83:
mov	eax, esi
pop	esi
retn	4
sub_418C60 endp

align 10h



sub_418C90 proc	near
mov	eax, [ecx+4]
retn
sub_418C90 endp

align 10h



sub_418CA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 8
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_418CF1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_418CF1:
push	eax
mov	ecx, offset aHlsl ; "hlsl"
mov	dword ptr [eax], offset	off_1550990
mov	dword ptr [eax+4], 0
mov	dword_18893B4, eax
call	sub_1193A90
add	esp, 4
add	esp, 14h
retn
sub_418CA0 endp

align 10h



sub_418D20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_418D71
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_418D71:
push	eax
mov	ecx, offset aVso ; "vso"
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	dword ptr [eax], offset	off_15509E8
mov	dword_18893B0, eax
call	sub_1193A90
mov	ecx, dword_18893B0
push	ecx
mov	ecx, offset aPso ; "pso"
call	sub_1193A90
add	esp, 8
add	esp, 14h
retn
sub_418D20 endp

align 10h



sub_418DC0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155096C
jz	short loc_418DE3
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4
push	3
push	esi
call	eax

loc_418DE3:
mov	eax, esi
pop	esi
retn	4
sub_418DC0 endp

align 10h



sub_418DF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_418E41
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_418E41:
push	eax
mov	ecx, offset aVsh ; "vsh"
mov	dword ptr [eax], offset	off_15509BC
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	dword_18893AC, eax
call	sub_1193A90
mov	ecx, dword_18893AC
push	ecx
mov	ecx, offset aPsh ; "psh"
call	sub_1193A90
add	esp, 8
add	esp, 14h
retn
sub_418DF0 endp

align 10h



sub_418E90 proc	near
mov	eax, dword_17EDFA4
test	eax, eax
jz	short loc_418EB5
lea	esp, [esp+0]

loc_418EA0:
lea	ecx, [eax+8]
mov	edx, eax
mov	eax, [eax]
cmp	esi, [ecx]
jz	short loc_418EB1
test	eax, eax
jnz	short loc_418EA0
jmp	short loc_418EB5

loc_418EB1:
test	edx, edx
jnz	short locret_418EFE

loc_418EB5:
mov	eax, off_17EDFA0
mov	edx, [eax+4]
mov	ecx, offset off_17EDFA0
call	edx
mov	[eax+8], esi
mov	dword ptr [eax], 0
mov	ecx, dword_17EDFA8
mov	[eax+4], ecx
mov	ecx, dword_17EDFA8
test	ecx, ecx
jz	short loc_418EEE
mov	[ecx], eax
inc	dword_17EDFAC
mov	dword_17EDFA8, eax
retn

loc_418EEE:
inc	dword_17EDFAC
mov	dword_17EDFA4, eax
mov	dword_17EDFA8, eax

locret_418EFE:
retn
sub_418E90 endp

align 10h



sub_418F00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
test	ebx, ebx
jnz	short loc_418F0F
xor	eax, eax
pop	ebx
retn	8

loc_418F0F:
mov	eax, [esp+4+arg_0]
mov	eax, [eax+14h]
mov	ecx, [eax]
lea	edx, [eax+8]
mov	eax, [edx]
sub	eax, ebx
push	ebp
cdq
push	esi
mov	esi, eax
xor	esi, edx
sub	esi, edx
xor	ebp, ebp
test	ecx, ecx
jz	short loc_418F4E
push	edi
nop

loc_418F30:
mov	edi, [ecx+8]
lea	eax, [ecx+8]
mov	ecx, [ecx]
mov	eax, edi
sub	eax, ebx
cdq
xor	eax, edx
sub	eax, edx
cmp	eax, esi
jnb	short loc_418F49
mov	esi, eax
mov	ebp, edi

loc_418F49:
test	ecx, ecx
jnz	short loc_418F30
pop	edi

loc_418F4E:
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	8
sub_418F00 endp

align 10h



sub_418F60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11910E0
test	[esp+4+arg_0], 1
jz	short loc_418F86
test	esi, esi
jz	short loc_418F86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_418F86:
mov	eax, esi
pop	esi
retn	4
sub_418F60 endp

align 10h



sub_418F90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+18h]
mov	dword ptr [esi], offset	off_1550A3C
test	eax, eax
jz	short loc_418FAF
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi+18h], 0

loc_418FAF:
mov	ecx, esi
call	sub_11910E0
test	[esp+4+arg_0], 1
jz	short loc_418FD0
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_418FD0:
mov	eax, esi
pop	esi
retn	4
sub_418F90 endp

align 10h



sub_418FE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11911C0
test	[esp+4+arg_0], 1
jz	short loc_419006
test	esi, esi
jz	short loc_419006
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_419006:
mov	eax, esi
pop	esi
retn	4
sub_418FE0 endp

align 10h



sub_419010 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1191480
test	[esp+4+arg_0], 1
jz	short loc_419036
test	esi, esi
jz	short loc_419036
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_419036:
mov	eax, esi
pop	esi
retn	4
sub_419010 endp

align 10h



sub_419040 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+50h]
mov	dword ptr [esi], offset	off_1550ADC
test	eax, eax
jz	short loc_41905F
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi+50h], 0

loc_41905F:
mov	ecx, esi
call	sub_11910E0
test	[esp+4+arg_0], 1
jz	short loc_419080
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_419080:
mov	eax, esi
pop	esi
retn	4
sub_419040 endp

align 10h



sub_419090 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+50h]
mov	dword ptr [esi], offset	off_1550B04
test	eax, eax
jz	short loc_4190AF
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi+50h], 0

loc_4190AF:
mov	ecx, esi
call	sub_11910E0
test	[esp+4+arg_0], 1
jz	short loc_4190D0
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_4190D0:
mov	eax, esi
pop	esi
retn	4
sub_419090 endp

align 10h



sub_4190E0 proc	near

arg_0= dword ptr  4

mov	eax, off_17EDFF0
mov	edx, [eax+4]
mov	ecx, offset off_17EDFF0
call	edx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax+8], edx
mov	dword ptr [eax+4], 0
mov	ecx, dword_17EDFF4
mov	[eax], ecx
mov	ecx, dword_17EDFF4
test	ecx, ecx
jz	short loc_419122
mov	[ecx+4], eax
inc	dword_17EDFFC
mov	dword_17EDFF4, eax
retn	4

loc_419122:
inc	dword_17EDFFC
mov	dword_17EDFF8, eax
mov	dword_17EDFF4, eax
retn	4
sub_4190E0 endp

align 10h



sub_419140 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, dword_17EDFF4
push	esi
test	eax, eax
jz	short loc_41915F
mov	esi, [edi]
lea	ecx, [ecx+0]

loc_419150:
lea	ecx, [eax+8]
mov	edx, eax
mov	eax, [eax]
cmp	esi, [ecx]
jz	short loc_419161
test	eax, eax
jnz	short loc_419150

loc_41915F:
xor	edx, edx

loc_419161:
mov	[esp+8+var_4], edx
pop	esi
test	edx, edx
jz	short loc_419174
lea	eax, [esp+4+var_4]
call	sub_419180
pop	ecx
retn

loc_419174:
mov	eax, [edi]
pop	ecx
retn
sub_419140 endp

align 10h



sub_419180 proc	near
push	esi
mov	esi, eax
mov	eax, [esi]
cmp	eax, dword_17EDFF4
jnz	short loc_419197
mov	eax, [eax]
mov	[esi], eax
pop	esi
jmp	loc_4191E0

loc_419197:
cmp	eax, dword_17EDFF8
jnz	short loc_4191AB
mov	dword ptr [esi], 0
pop	esi
jmp	loc_419220

loc_4191AB:
mov	edx, [eax+4]
mov	ecx, [eax]
mov	[esi], ecx
test	edx, edx
jz	short loc_4191B8
mov	[edx], ecx

loc_4191B8:
test	ecx, ecx
jz	short loc_4191BF
mov	[ecx+4], edx

loc_4191BF:
mov	edx, off_17EDFF0
mov	esi, [eax+8]
push	eax
mov	eax, [edx+8]
mov	ecx, offset off_17EDFF0
call	eax
dec	dword_17EDFFC
mov	eax, esi
pop	esi
retn
align 10h

loc_4191E0:
mov	ecx, dword_17EDFF4
mov	eax, [ecx]
xor	edx, edx
mov	dword_17EDFF4, eax
cmp	eax, edx
jz	short loc_4191F8
mov	[eax+4], edx
jmp	short loc_4191FE

loc_4191F8:
mov	dword_17EDFF8, edx

loc_4191FE:
mov	eax, off_17EDFF0
mov	edx, [eax+8]
push	esi
mov	esi, [ecx+8]
push	ecx
mov	ecx, offset off_17EDFF0
call	edx
dec	dword_17EDFFC
mov	eax, esi
pop	esi
retn
align 10h

loc_419220:
mov	ecx, dword_17EDFF8
mov	eax, [ecx+4]
mov	dword_17EDFF8, eax
test	eax, eax
jz	short loc_41923A
mov	dword ptr [eax], 0
jmp	short loc_419244

loc_41923A:
mov	dword_17EDFF4, 0

loc_419244:
mov	eax, off_17EDFF0
mov	edx, [eax+8]
push	esi
mov	esi, [ecx+8]
push	ecx
mov	ecx, offset off_17EDFF0
call	edx
dec	dword_17EDFFC
mov	eax, esi
pop	esi
retn
sub_419180 endp	; sp-analysis failed

align 10h



sub_419270 proc	near
mov	eax, offset off_17EE010
retn
sub_419270 endp

align 10h



sub_419280 proc	near
mov	eax, offset off_17EE008
retn
sub_419280 endp

align 10h



sub_419290 proc	near
mov	eax, offset off_17EDFE8
retn
sub_419290 endp

align 10h



sub_4192A0 proc	near
mov	eax, offset off_17EDFD8
retn
sub_4192A0 endp

align 10h



sub_4192B0 proc	near
mov	eax, offset off_17EDFD0
retn
sub_4192B0 endp

align 10h



sub_4192C0 proc	near
mov	eax, offset off_17EDFC0
retn
sub_4192C0 endp

align 10h



sub_4192D0 proc	near
mov	eax, offset off_17EDFB8
retn
sub_4192D0 endp

align 10h



sub_4192E0 proc	near
mov	eax, [eax+3ECh]
retn
sub_4192E0 endp

align 10h



sub_4192F0 proc	near
mov	eax, dword_188935C
retn
sub_4192F0 endp

align 10h



sub_419300 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_15C92DC
call	sub_41C620
test	[esp+4+arg_0], 1
mov	dword ptr [edi], offset	off_15CA734
jz	short loc_41932E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_41932E:
mov	eax, edi
pop	edi
retn	4
sub_419300 endp

align 10h



sub_419340 proc	near
xor	eax, eax
lea	ecx, [esi+14h]

loc_419345:
cmp	[ecx], edx
jz	short loc_419355
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_419345
xor	al, al
retn

loc_419355:
lea	eax, [eax+eax*2]
mov	al, [esi+eax*4+1Ch]
retn
sub_419340 endp

align 10h



sub_419360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
cmp	eax, ecx
jg	short locret_41936E
mov	eax, ecx

locret_41936E:
retn
sub_419360 endp

align 10h



sub_419370 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11906E0
test	[esp+4+arg_0], 1
jz	short loc_419396
test	esi, esi
jz	short loc_419396
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	64h
push	3
push	esi
call	eax

loc_419396:
mov	eax, esi
pop	esi
retn	4
sub_419370 endp

align 10h



sub_4193A0 proc	near
xor	eax, eax
add	ecx, 14h

loc_4193A5:
cmp	dword ptr [ecx], 13h
jz	short locret_4193B8
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_4193A5

__RTC_NumErrors:
mov	eax, 4

locret_4193B8:
retn
sub_4193A0 endp

align 10h



sub_4193C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

lea	ecx, [eax+eax*2]
movzx	edx, byte ptr [esi+ecx*4+1Dh]
lea	ecx, [esi+ecx*4]
push	edi
mov	edi, [esp+4+arg_C]
mov	[edi], dl
movzx	edx, byte ptr [ecx+1Ch]
mov	edi, [esp+4+arg_8]
mov	ecx, [ecx+14h]
lea	eax, [eax+eax*2+6]
mov	[edi], dl
mov	edx, [esi+eax*4]
mov	eax, [esp+4+arg_4]
mov	[eax], edx
mov	edx, [esp+4+arg_0]
cmp	ecx, 13h
mov	[edx], ecx
setnz	al
pop	edi
retn	10h
sub_4193C0 endp

align 10h



sub_419400 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
test	ebp, ebp
jz	short loc_419441
push	esi
push	edi
xor	esi, esi
lea	edi, [ebx+20A0h]

loc_419418:
cmp	[edi], ebp
jnz	short loc_419436
mov	dword ptr [edi], 0
mov	eax, [ebx+2238h]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	0
push	esi
push	eax
call	edx

loc_419436:
inc	esi
add	edi, 4
cmp	esi, 10h
jb	short loc_419418
pop	edi
pop	esi

loc_419441:
pop	ebp
pop	ebx
retn	8
sub_419400 endp

align 10h



sub_419450 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41947E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	58h
push	3
push	esi
call	eax

loc_41947E:
mov	eax, esi
pop	esi
retn	4
sub_419450 endp

align 10h



sub_419490 proc	near
mov	eax, offset off_17EE178
retn
sub_419490 endp

align 10h



sub_4194A0 proc	near

arg_0= dword ptr  4

mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax+8], edx
mov	dword ptr [eax+4], 0
mov	ecx, [esi+4]
mov	[eax], ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_4194D1
mov	[ecx+4], eax
inc	dword ptr [esi+0Ch]
mov	[esi+4], eax
retn	4

loc_4194D1:
inc	dword ptr [esi+0Ch]
mov	[esi+8], eax
mov	[esi+4], eax
retn	4
sub_4194A0 endp

align 10h



; int __stdcall	sub_4194E0(float)
sub_4194E0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	ecx, [ecx+8]
mov	[eax+4], edx
mov	[eax+8], ecx
fld	dword ptr [eax]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	st
fmul	dword ptr [eax+4]
fstp	dword ptr [eax+4]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
retn	4
sub_4194E0 endp

align 10h



sub_419510 proc	near
add	eax, 10Ch
retn
sub_419510 endp

align 10h



sub_419520 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1550BC8
call	sub_123C300
test	[esp+4+arg_0], 1
jz	short loc_41954B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8Ch
push	3
push	esi
call	eax

loc_41954B:
mov	eax, esi
pop	esi
retn	4
sub_419520 endp

align 10h



sub_419560 proc	near
mov	eax, offset off_17EE020
retn
sub_419560 endp

align 10h



sub_419570 proc	near
mov	eax, offset off_17EE2B8
retn
sub_419570 endp

align 10h



sub_419580 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_118E8A0
test	[esp+4+arg_0], 1
jz	short loc_4195A9
test	esi, esi
jz	short loc_4195A9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0E0h
push	3
push	esi
call	eax

loc_4195A9:
mov	eax, esi
pop	esi
retn	4
sub_419580 endp

align 10h



sub_4195B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
movzx	eax, word ptr [esi+8]
push	edi
movzx	edi, word ptr [esi+0Ah]
cmp	edi, eax
jb	short loc_4195CB
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_4195CB:
mov	edx, [esp+8+arg_0]
push	esi
mov	ecx, edi
call	sub_410350
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_4195B0 endp

align 10h



sub_4195E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
movzx	eax, word ptr [ebx+8]
cmp	ecx, eax
jz	loc_41973F
movzx	eax, word ptr [ebx+0Ah]
push	ebp
movzx	edx, ax
push	esi
push	edi
cmp	ecx, edx
jnb	short loc_419653
movzx	ebp, cx
cmp	cx, ax
jnb	short loc_41964F
jmp	short loc_419610
align 10h

loc_419610:
mov	ecx, [ebx+4]
movzx	eax, bp
cmp	dword ptr [ecx+eax*4], 0
lea	esi, [ecx+eax*4]
setnz	al
test	al, al
jz	short loc_419644
mov	edi, [esi]
test	edi, edi
jz	short loc_41963B
add	dword ptr [edi+60h], 0FFFFFFFFh
jnz	short loc_419635
call	sub_11A3470

loc_419635:
mov	dword ptr [esi], 0

loc_41963B:
mov	edx, 0FFFFh
add	[ebx+0Ch], dx

loc_419644:
inc	ebp
cmp	bp, [ebx+0Ah]
jb	short loc_419610
mov	ecx, [esp+10h+arg_4]

loc_41964F:
mov	[ebx+0Ah], cx

loc_419653:
mov	ebp, [ebx+4]
mov	[esp+10h+arg_4], ebp
mov	[ebx+8], cx
test	ecx, ecx
jbe	loc_419705
movzx	edi, cx
call	sub_5FB570
mov	[ebx+4], eax
xor	eax, eax
xor	ecx, ecx
mov	[esp+10h+arg_0], eax
cmp	cx, [ebx+0Ah]
jnb	short loc_4196CC
nop

loc_419680:
mov	ebp, [ebx+4]
mov	edx, [esp+10h+arg_4]
movzx	esi, ax
add	esi, esi
add	esi, esi
mov	edi, [ebp+esi+0]
add	ebp, esi
cmp	edi, [esi+edx]
jz	short loc_4196BD
test	edi, edi
jz	short loc_4196AC
add	dword ptr [edi+60h], 0FFFFFFFFh
jnz	short loc_4196AC
call	sub_11A3470
mov	eax, [esp+10h+arg_0]

loc_4196AC:
mov	ecx, [esp+10h+arg_4]
mov	esi, [esi+ecx]
mov	[ebp+0], esi
test	esi, esi
jz	short loc_4196BD
inc	dword ptr [esi+60h]

loc_4196BD:
inc	eax
mov	[esp+10h+arg_0], eax
cmp	ax, [ebx+0Ah]
jb	short loc_419680
mov	ebp, [esp+10h+arg_4]

loc_4196CC:
movzx	esi, word ptr [ebx+0Ah]
cmp	si, [ebx+8]
jnb	short loc_41970C

loc_4196D6:
mov	eax, [ebx+4]
movzx	edx, si
mov	edi, [eax+edx*4]
lea	ebp, [eax+edx*4]
test	edi, edi
jz	short loc_4196F8
add	dword ptr [edi+60h], 0FFFFFFFFh
jnz	short loc_4196F1
call	sub_11A3470

loc_4196F1:
mov	dword ptr [ebp+0], 0

loc_4196F8:
inc	esi
cmp	si, [ebx+8]
jb	short loc_4196D6
mov	ebp, [esp+10h+arg_4]
jmp	short loc_41970C

loc_419705:
mov	dword ptr [ebx+4], 0

loc_41970C:
test	ebp, ebp
jz	short loc_41973C
mov	ecx, [ebp-4]
push	offset sub_40ABE0
lea	esi, [ebp-4]
push	ecx
push	4
push	ebp
call	$LN21_0
test	esi, esi
jz	short loc_41973C
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_41973C:
pop	edi
pop	esi
pop	ebp

loc_41973F:
pop	ebx
retn	8
sub_4195E0 endp

align 10h



sub_419750 proc	near

arg_0= dword ptr  4

movzx	edx, word ptr [eax+0Ah]
push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
cmp	ecx, edx
jb	short loc_419777
lea	edx, [ecx+1]
mov	[eax+0Ah], dx
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
jz	short loc_4197AA
inc	word ptr [eax+0Ch]
jmp	short loc_4197AA

loc_419777:
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
mov	edx, [eax+4]
jz	short loc_419796
cmp	dword ptr [edx+ecx*4], 0
setz	dl
test	dl, dl
jz	short loc_4197AA
inc	word ptr [eax+0Ch]
jmp	short loc_4197AA

loc_419796:
cmp	dword ptr [edx+ecx*4], 0
setnz	dl
test	dl, dl
jz	short loc_4197AA
mov	edx, 0FFFFh
add	[eax+0Ch], dx

loc_4197AA:
mov	eax, [eax+4]
mov	edi, [eax+ecx*4]
lea	esi, [eax+ecx*4]
cmp	edi, [ebp+0]
jz	short loc_4197D3
test	edi, edi
jz	short loc_4197C7
add	dword ptr [edi+60h], 0FFFFFFFFh
jnz	short loc_4197C7
call	sub_11A3470

loc_4197C7:
mov	eax, [ebp+0]
mov	[esi], eax
test	eax, eax
jz	short loc_4197D3
inc	dword ptr [eax+60h]

loc_4197D3:
pop	edi
pop	esi
pop	ebp
retn	4
sub_419750 endp

align 10h



sub_4197E0 proc	near
mov	eax, offset off_17EE028
retn
sub_4197E0 endp

align 10h



sub_4197F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [eax+150h]
push	edx
mov	edx, [esp+4+arg_4]
push	edx
mov	edx, [esp+8+arg_0]
push	edx
lea	edx, [eax+134h]
add	eax, 110h
push	edx
push	eax
mov	eax, dword_185F944[ecx*4]
call	eax ; dword_185F944
add	esp, 14h
retn
sub_4197F0 endp

align 10h



sub_419820 proc	near
movzx	eax, word ptr [eax+4]
shr	eax, 0Ch
and	eax, 3
retn
sub_419820 endp

align 10h



sub_419830 proc	near
movzx	eax, word ptr [eax+4]
shr	eax, 8
and	eax, 0Fh
retn
sub_419830 endp

align 10h



sub_419840 proc	near
movzx	eax, word ptr [eax+4]
and	eax, 0FFh
retn
sub_419840 endp

align 10h



sub_419850 proc	near
mov	ecx, [eax+0B4h]
movzx	eax, word ptr [ecx+32h]
and	eax, 3Fh
retn
sub_419850 endp

align 10h



sub_419860 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1184260
test	[esp+4+arg_0], 1
jz	short loc_419886
test	esi, esi
jz	short loc_419886
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_419886:
mov	eax, esi
pop	esi
retn	4
sub_419860 endp

align 10h



sub_419890 proc	near
mov	eax, offset off_17EE050
retn
sub_419890 endp

align 10h



sub_4198A0 proc	near
mov	al, [ecx+10h]
retn
sub_4198A0 endp

align 10h



sub_4198B0 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	[ecx+24h], al
mov	al, 1
retn	4
sub_4198B0 endp

align 10h



sub_4198C0 proc	near
mov	al, [ecx+20h]
retn
sub_4198C0 endp

align 10h



sub_4198D0 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	[ecx+20h], al
retn	4
sub_4198D0 endp

align 10h



sub_4198E0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1550D54
test	eax, eax
jz	short loc_41991E
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_40ABE0
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_41991D
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_41991D:
pop	esi

loc_41991E:
test	[esp+4+arg_0], 1
jz	short loc_419938
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_419938:
mov	eax, edi
pop	edi
retn	4
sub_4198E0 endp

align 10h



sub_419940 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	eax, eax
xor	ebx, ebx
cmp	ax, [ebp+0Ah]
jnb	short loc_41997C
push	esi
push	edi

loc_419952:
mov	edx, [ebp+4]
movzx	ecx, bx
mov	edi, [edx+ecx*4]
lea	esi, [edx+ecx*4]
test	edi, edi
jz	short loc_419973
add	dword ptr [edi+60h], 0FFFFFFFFh
jnz	short loc_41996D
call	sub_11A3470

loc_41996D:
mov	dword ptr [esi], 0

loc_419973:
inc	ebx
cmp	bx, [ebp+0Ah]
jb	short loc_419952
pop	edi
pop	esi

loc_41997C:
xor	eax, eax
xor	ecx, ecx
mov	[ebp+0Ah], ax
mov	[ebp+0Ch], cx
pop	ebp
pop	ebx
retn	4
sub_419940 endp

align 10h



sub_419990 proc	near
push	ebx
push	edi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], bl
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], bl
mov	[esi+24h], bl
mov	[esi+25h], bl
mov	dword ptr [esi], offset	off_1550CB8
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
mov	[esi+40h], ebx
lea	ebx, [esi+44h]
mov	eax, 2
mov	ecx, eax
mov	[ebx+8], ax
xor	edx, edx
xor	eax, eax
mov	edi, ecx
mov	dword ptr [ebx], offset	off_1550D54
mov	[ebx+0Eh], cx
mov	[ebx+0Ah], dx
mov	[ebx+0Ch], ax
call	sub_5FB570
push	ebx
mov	[ebx+4], eax
mov	dword ptr [ebx], offset	off_1550D54
call	sub_419940
pop	edi
mov	eax, esi
pop	ebx
retn
sub_419990 endp

align 10h



sub_419A20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_118A030
test	[esp+4+arg_0], 1
jz	short loc_419A47
test	esi, esi
jz	short loc_419A47
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	70h
push	3
push	esi
call	eax

loc_419A47:
mov	eax, esi
pop	esi
retn	4
sub_419A20 endp

align 10h



; int __thiscall sub_419A50(int, int, void *, void *, void *, void *)
sub_419A50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	edx, [esp+arg_10]
push	ecx		; int
mov	ecx, [esp+4+arg_C]
push	edx		; void *
mov	edx, [esp+8+arg_8]
push	ecx		; void *
mov	ecx, [esp+0Ch+arg_4]
push	edx		; void *
movzx	edx, word ptr [eax+0Ch]
push	ecx		; void *
mov	ecx, [eax+24h]
push	edx		; int
mov	edx, [eax+20h]
mov	eax, [esp+18h+arg_0]
push	ecx		; int
push	edx		; int
push	eax		; int
call	sub_1296CE0
retn	14h
sub_419A50 endp

align 10h


; Attributes: thunk

sub_419A80 proc	near
jmp	sub_410520
sub_419A80 endp

align 10h



sub_419A90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_1189750
test	[esp+4+arg_0], 1
jz	short loc_419AB7
test	esi, esi
jz	short loc_419AB7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4Ch
push	3
push	esi
call	eax

loc_419AB7:
mov	eax, esi
pop	esi
retn	4
sub_419A90 endp

align 10h



sub_419AC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_1550D68
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
push	offset Addend	; lpAddend
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_419B06
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_419B06:
mov	eax, esi
pop	esi
retn	4
sub_419AC0 endp

align 10h



sub_419B10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1188E50
test	[esp+4+arg_0], 1
jz	short loc_419B36
test	esi, esi
jz	short loc_419B36
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_419B36:
mov	eax, esi
pop	esi
retn	4
sub_419B10 endp

align 10h



sub_419B40 proc	near
mov	eax, offset off_17EE030
retn
sub_419B40 endp

align 10h



sub_419B50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+44h]
push	eax
mov	dword ptr [esi], offset	off_1550DA0
call	sub_419940
mov	ecx, esi
call	sub_1184260
test	[esp+4+arg_0], 1
jz	short loc_419B84
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	58h
push	3
push	esi
call	eax

loc_419B84:
mov	eax, esi
pop	esi
retn	4
sub_419B50 endp

align 10h



sub_419B90 proc	near

var_4= dword ptr -4

push	ecx
call	_rand
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fadd	st, st
fdiv	ds:dbl_15FCC18
fsub	ds:dbl_15FCC40
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_419B90 endp

align 10h



sub_419BC0 proc	near

var_4= dword ptr -4

push	ecx
call	_rand
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fdiv	ds:dbl_15FCC18
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_419BC0 endp

align 10h



sub_419BE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+54h]
push	edi
lea	edi, [esi+54h]
test	eax, eax
jz	short loc_419C0B
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_419C0A
push	edi
mov	eax, ebx
call	sub_1171F60

loc_419C0A:
pop	ebx

loc_419C0B:
mov	ecx, esi
call	sub_1147940
test	[esp+8+arg_0], 1
jz	short loc_419C30
test	esi, esi
jz	short loc_419C30
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	58h
push	3
push	esi
call	eax

loc_419C30:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_419BE0 endp

align 10h



sub_419C40 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_1550E3C
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	eax, esi
pop	edi
retn
sub_419C40 endp

align 10h



sub_419C70 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_419CE0
test	[esp+4+arg_0], 1
jz	short loc_419C96
test	edi, edi
jz	short loc_419C96
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	edi
call	eax

loc_419C96:
mov	eax, edi
pop	edi
retn	4
sub_419C70 endp

align 10h



sub_419CA0 proc	near
push	esi
mov	esi, ecx
push	esi
call	sub_426DB0
mov	eax, [esi]
test	eax, eax
jz	short loc_419CDB
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_419CDB
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_419CDB:
pop	esi
retn
sub_419CA0 endp

align 10h



sub_419CE0 proc	near
push	ebx
push	esi
lea	esi, [edi+0Ch]
push	esi
call	sub_426DB0
mov	eax, [esi]
test	eax, eax
jz	short loc_419D1D
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_419D1D
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_419D1D:
mov	esi, [edi+8]
mov	ebx, ds:InterlockedDecrement
test	esi, esi
jz	short loc_419D3D
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_419D3D
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_419D3D:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	esi
pop	ebx
retn
sub_419CE0 endp

align 10h



sub_419D50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+0]
push	esi
mov	esi, eax
xor	edx, edx
mov	eax, ecx
div	dword ptr [esi+4]
mov	eax, [esi+8]
push	edi
mov	ebx, edx
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_419D7B

loc_419D70:
cmp	ecx, [edi+4]
jz	short loc_419DE2
mov	edi, [edi]
test	edi, edi
jnz	short loc_419D70

loc_419D7B:
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	edi, eax
mov	eax, esp
mov	[eax], ecx
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_419DA1
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_419DA1:
push	edi
mov	eax, ebp
call	sub_419E80
mov	edx, [esi+8]
mov	eax, [edx+ebx*4]
mov	[edi], eax
mov	ecx, [esi+8]
mov	[ecx+ebx*4], edi
inc	dword ptr [esi+0Ch]

loc_419DBA:
mov	eax, [esp+10h+arg_4]
test	eax, eax
jz	short loc_419DDB
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_419DDB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_419DDB:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_419DE2:
push	ecx
mov	eax, esp
mov	ecx, [esp+14h+arg_4]
mov	[eax], ecx
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_419DFD
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_419DFD:
push	edi
mov	eax, ebp
call	sub_419E80
jmp	short loc_419DBA
sub_419D50 endp

align 10h



sub_419E10 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
mov	eax, [esi+4]
push	edi
cmp	[esi+8], eax
jnz	short loc_419E30
test	eax, eax
jbe	short loc_419E24
add	eax, eax
jmp	short loc_419E29

loc_419E24:
mov	eax, 1

loc_419E29:
push	eax
push	esi
call	sub_419F30

loc_419E30:
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [esp+8+arg_0]
lea	edi, [ecx+eax*4]
inc	eax
mov	[esi+8], eax
mov	esi, [edx]
cmp	[edi], esi
jz	short loc_419E79
test	esi, esi
jz	short loc_419E54
lea	eax, [esi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_419E54:
mov	eax, [edi]
test	eax, eax
jz	short loc_419E77
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_419E76
push	edi
mov	eax, ebx
call	sub_1171F60

loc_419E76:
pop	ebx

loc_419E77:
mov	[edi], esi

loc_419E79:
pop	edi
pop	esi
retn	4
sub_419E10 endp

align 10h



sub_419E80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [eax]
cmp	[ebp+4], edi
lea	esi, [ebp+4]
jz	short loc_419EC4
test	edi, edi
jz	short loc_419E9F
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_419E9F:
mov	eax, [esi]
test	eax, eax
jz	short loc_419EC2
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_419EC1
push	esi
mov	eax, ebx
call	sub_1171F60

loc_419EC1:
pop	ebx

loc_419EC2:
mov	[esi], edi

loc_419EC4:
mov	esi, [ebp+8]
mov	eax, [esp+0Ch+arg_4]
cmp	esi, eax
jz	short loc_419F03
test	esi, esi
jz	short loc_419EEE
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_419EEA
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_419EEA:
mov	eax, [esp+0Ch+arg_4]

loc_419EEE:
mov	[ebp+8], eax
test	eax, eax
jz	short loc_419F20
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement
mov	eax, [esp+0Ch+arg_4]

loc_419F03:
test	eax, eax
jz	short loc_419F20
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_419F20
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_419F20:
pop	edi
pop	esi
pop	ebp
retn	8
sub_419E80 endp

align 10h



sub_419F30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_4]
push	ebp
mov	ebp, [esp+0Ch+arg_0]
cmp	ebx, [ebp+4]
jz	loc_419FF7
push	esi
push	edi
test	ebx, ebx
jbe	short loc_419FB1
mov	edi, ebx
call	sub_41A000
xor	edi, edi
mov	[esp+14h+var_4], eax
cmp	[ebp+8], edi
jbe	short loc_419FB9
mov	esi, eax
mov	edi, edi

loc_419F60:
mov	eax, [ebp+0]
mov	ebx, [eax+edi*4]
lea	eax, [eax+edi*4]
cmp	[esi], ebx
jz	short loc_419FA2
test	ebx, ebx
jz	short loc_419F7B
lea	ecx, [ebx-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_419F7B:
mov	eax, [esi]
test	eax, eax
jz	short loc_419FA0
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_419F9C
push	esi
mov	eax, ebp
call	sub_1171F60

loc_419F9C:
mov	ebp, [esp+14h+arg_0]

loc_419FA0:
mov	[esi], ebx

loc_419FA2:
inc	edi
add	esi, 4
cmp	edi, [ebp+8]
jb	short loc_419F60
mov	ebx, [esp+14h+arg_4]
jmp	short loc_419FB9

loc_419FB1:
mov	[esp+14h+var_4], 0

loc_419FB9:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_419FEB
mov	edx, [eax-4]
lea	esi, [eax-4]
push	offset sub_41A470
push	edx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_419FEB
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	esi
call	eax

loc_419FEB:
mov	ecx, [esp+14h+var_4]
pop	edi
mov	[ebp+0], ecx
mov	[ebp+4], ebx
pop	esi

loc_419FF7:
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_419F30 endp

align 10h



sub_41A000 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_41A043
push	esi
push	offset sub_412370
push	edi
lea	esi, [eax+4]
push	4
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_41A043:
xor	eax, eax
retn
sub_41A000 endp

align 10h



sub_41A050 proc	near
mov	eax, offset off_17EF77C
retn
sub_41A050 endp

align 10h



; int __fastcall sub_41A060(char *)
sub_41A060 proc	near
mov	eax, [eax]
cmp	eax, ecx
jnz	short loc_41A069
mov	al, 1
retn

loc_41A069:
test	ecx, ecx
jz	short loc_41A081
test	eax, eax
jz	short loc_41A081
push	ecx		; char *
push	eax		; char *
call	__stricmp
add	esp, 8
neg	eax
sbb	eax, eax
inc	eax
retn

loc_41A081:
xor	al, al
retn
sub_41A060 endp

align 10h



sub_41A090 proc	near
mov	eax, [eax+4]
cmp	eax, 2
jz	short loc_41A0A0
cmp	eax, 3
jz	short loc_41A0A0
xor	eax, eax
retn

loc_41A0A0:
mov	eax, 1
retn
sub_41A090 endp

align 10h



sub_41A0B0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
xor	esi, esi
xor	eax, eax
lea	ecx, [edi+1Ch]
lea	ebx, [ebx+0]

loc_41A0C0:
cmp	[ecx-8], edx
jz	short loc_41A0D9
movzx	ebx, byte ptr [ecx]
inc	eax
add	esi, ebx
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41A0C0

loc_41A0D3:
xor	eax, eax

loc_41A0D5:
pop	esi
pop	ebx
pop	ecx
retn

loc_41A0D9:
lea	eax, [eax+eax*2]
mov	cl, [edi+eax*4+1Ch]
mov	al, cl
xor	edx, edx
dec	al
test	cl, cl
jz	short loc_41A0D3
test	al, al
jz	short loc_41A101
movzx	ecx, al

loc_41A0F1:
mov	ebx, 1
shl	ebx, cl
dec	al
dec	ecx
add	edx, ebx
test	al, al
jnz	short loc_41A0F1

loc_41A101:
lea	eax, [edx+1]
mov	ecx, esi
shl	eax, cl
test	byte ptr [edi],	1
mov	[esp+0Ch+var_4], eax
jnz	short loc_41A0D5
mov	cl, byte ptr [esp+0Ch+var_4+3]
mov	dl, byte ptr [esp+0Ch+var_4+2]
mov	byte ptr [esp+0Ch+var_4+3], al
mov	al, byte ptr [esp+0Ch+var_4+1]
mov	byte ptr [esp+0Ch+var_4+2], al
movzx	eax, byte ptr [edi+1]
mov	byte ptr [esp+0Ch+var_4], cl
mov	ecx, 20h
sub	ecx, eax
mov	byte ptr [esp+0Ch+var_4+1], dl
mov	eax, [esp+0Ch+var_4]
pop	esi
shr	eax, cl
pop	ebx
pop	ecx
retn
sub_41A0B0 endp

align 10h



sub_41A150 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1550EB8
mov	edi, [esi+6Ch]
test	edi, edi
jz	short loc_41A178
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41A178
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41A178:
mov	ecx, esi
call	sub_11906E0
test	[esp+8+arg_0], 1
jz	short loc_41A19A
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	7Ch
push	3
push	esi
call	eax

loc_41A19A:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_41A150 endp

align 10h



sub_41A1B0 proc	near
mov	eax, [ecx+6Ch]
retn
sub_41A1B0 endp

align 10h



sub_41A1C0 proc	near
mov	ecx, [eax+5Ch]
mov	eax, [ecx+edx*4+4]
sub	eax, [ecx+edx*4]
lea	ecx, [ecx+edx*4]
retn
sub_41A1C0 endp

align 10h



sub_41A1D0 proc	near
mov	eax, [eax+4]
cmp	eax, 4
jl	short loc_41A1E3
cmp	eax, 6
jg	short loc_41A1E3
mov	eax, 1
retn

loc_41A1E3:
xor	eax, eax
retn
sub_41A1D0 endp

align 10h



sub_41A1F0 proc	near
mov	ecx, [eax+58h]
mov	eax, [ecx+edx*4]
retn
sub_41A1F0 endp

align 10h



sub_41A200 proc	near
add	eax, 34h
retn
sub_41A200 endp

align 10h



sub_41A210 proc	near
mov	eax, [eax+3Ch]
retn
sub_41A210 endp

align 10h



sub_41A220 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1550F0C
jz	short loc_41A243
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4
push	3
push	esi
call	eax

loc_41A243:
mov	eax, esi
pop	esi
retn	4
sub_41A220 endp

align 10h



sub_41A250 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1187960
test	[esp+4+arg_0], 1
jz	short loc_41A276
test	esi, esi
jz	short loc_41A276
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_41A276:
mov	eax, esi
pop	esi
retn	4
sub_41A250 endp

align 10h



sub_41A280 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+58h]
mov	edx, [esi+8]
mov	dword ptr [esi], offset	off_1550F20
mov	eax, [ecx]
mov	eax, [eax+18Ch]
push	edx
call	eax
mov	ecx, esi
call	sub_11906E0
test	[esp+4+arg_0], 1
jz	short loc_41A2BC
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	64h
push	3
push	esi
call	eax

loc_41A2BC:
mov	eax, esi
pop	esi
retn	4
sub_41A280 endp

align 10h



sub_41A2D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1550EB8
mov	edi, [esi+6Ch]
test	edi, edi
jz	short loc_41A2F8
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41A2F8
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41A2F8:
mov	ecx, esi
call	sub_11906E0
test	[esp+8+arg_0], 1
jz	short loc_41A31D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	80h
push	3
push	esi
call	eax

loc_41A31D:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_41A2D0 endp

align 10h



sub_41A330 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+58h]
mov	edx, [esi+8]
mov	dword ptr [esi], offset	off_1550FC8
mov	eax, [ecx]
mov	eax, [eax+188h]
push	edx
call	eax
mov	ecx, [esi+58h]
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_1550F20
mov	edx, [ecx]
mov	edx, [edx+18Ch]
push	eax
call	edx
mov	ecx, esi
call	sub_11906E0
test	[esp+4+arg_0], 1
jz	short loc_41A382
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	64h
push	3
push	esi
call	eax

loc_41A382:
mov	eax, esi
pop	esi
retn	4
sub_41A330 endp

align 10h



sub_41A390 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+58h]
mov	edx, [esi+8]
mov	dword ptr [esi], offset	off_1551018
mov	eax, [ecx]
mov	eax, [eax+190h]
push	edx
call	eax
mov	ecx, esi
call	sub_11906E0
test	[esp+4+arg_0], 1
jz	short loc_41A3CC
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	6Ch
push	3
push	esi
call	eax

loc_41A3CC:
mov	eax, esi
pop	esi
retn	4
sub_41A390 endp

align 10h



sub_41A3E0 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	[ecx+68h], al
retn	4
sub_41A3E0 endp

align 10h



sub_41A3F0 proc	near
mov	al, [ecx+68h]
retn
sub_41A3F0 endp

align 10h



sub_41A400 proc	near
mov	eax, [ecx+64h]
retn
sub_41A400 endp

align 10h



sub_41A410 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
lea	edi, [esi+4]
test	eax, eax
jz	short loc_41A43B
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41A43A
push	edi
mov	eax, ebx
call	sub_1171F60

loc_41A43A:
pop	ebx

loc_41A43B:
test	[esp+8+arg_0], 1
mov	dword ptr [esi], offset	off_155113C
jz	short loc_41A45B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41A45B:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_41A410 endp

align 10h



sub_41A470 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_41A496
push	esi
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41A495
push	edi
mov	eax, esi
call	sub_1171F60

loc_41A495:
pop	esi

loc_41A496:
pop	edi
retn
sub_41A470 endp

align 10h



sub_41A4A0 proc	near
mov	eax, offset off_17EE038
retn
sub_41A4A0 endp

align 10h



sub_41A4B0 proc	near
mov	eax, offset off_17EF794
retn
sub_41A4B0 endp

align 10h



sub_41A4C0 proc	near
mov	eax, [eax+0Ch]
cmp	byte ptr [eax+14Bh], 0
jnz	short loc_41A4D8
cmp	byte ptr [eax+9Bh], 0
jz	short loc_41A4D8
mov	al, 1
retn

loc_41A4D8:
xor	al, al
retn
sub_41A4C0 endp

align 10h



sub_41A4E0 proc	near
mov	eax, [eax+30h]
test	eax, eax
jz	short loc_41A4F6
movzx	edx, word ptr [eax+0Ah]
cmp	ecx, edx
jnb	short loc_41A4F6
mov	eax, [eax+4]
mov	eax, [eax+ecx*4]
retn

loc_41A4F6:
xor	eax, eax
retn
sub_41A4E0 endp

align 10h



sub_41A500 proc	near
mov	eax, [eax]
cmp	eax, dword_188A9C4
jnz	short loc_41A513
mov	dword ptr [ecx], 2
mov	al, 1
retn

loc_41A513:
cmp	eax, dword_188A9C0
jnz	short loc_41A524
mov	dword ptr [ecx], 1
mov	al, 1
retn

loc_41A524:
cmp	eax, dword_188A9BC
jnz	short loc_41A535
mov	dword ptr [ecx], 0
mov	al, 1
retn

loc_41A535:
xor	al, al
retn
sub_41A500 endp

align 10h



sub_41A540 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+34h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41A57C
test	esi, esi
jz	short loc_41A56B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41A56B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41A56B:
mov	[ebx+34h], edi
test	edi, edi
jz	short loc_41A57C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41A57C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_41A540 endp

align 10h



sub_41A590 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+48h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41A5CC
test	esi, esi
jz	short loc_41A5BB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41A5BB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41A5BB:
mov	[ebx+48h], edi
test	edi, edi
jz	short loc_41A5CC
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41A5CC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_41A590 endp

align 10h



sub_41A5E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_117E1E0
test	[esp+4+arg_0], 1
jz	short loc_41A606
test	esi, esi
jz	short loc_41A606
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_41A606:
mov	eax, esi
pop	esi
retn	4
sub_41A5E0 endp

align 10h



sub_41A610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	esi, eax
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	eax, [esp+0Ch+arg_4]
mov	[esi+8], eax
mov	dword ptr [esi], offset	off_1551148
mov	[esi+10h], ebx
mov	dword ptr [esi+0Ch], offset off_1554C5C
xor	eax, eax
mov	[esi+16h], ax
lea	edi, [esi+1Ch]
xor	ecx, ecx
mov	[esi+14h], cx
mov	[esi+18h], cx
mov	edx, 1
mov	[esi+1Ah], dx
mov	[edi+0Ah], cx
mov	[edi+4], ebx
mov	dword ptr [edi], offset	off_1553B08
xor	edx, edx
mov	[edi+8], dx
mov	[edi+0Ch], dx
mov	eax, 1
mov	[edi+0Eh], ax
mov	[esi+2Ch], al
mov	eax, [esp+0Ch+arg_0]
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
mov	[esi+40h], ebx
call	sub_1179BA0
push	edi
call	sub_4142E0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_41A610 endp

align 10h



sub_41A6B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+58h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41A6EC
test	esi, esi
jz	short loc_41A6DB
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41A6DB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41A6DB:
mov	[ebx+58h], edi
test	edi, edi
jz	short loc_41A6EC
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41A6EC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_41A6B0 endp

align 10h



sub_41A700 proc	near
mov	eax, offset off_17EE2A0
retn
sub_41A700 endp

align 10h



sub_41A710 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155113C
jz	short loc_41A733
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4
push	3
push	esi
call	eax

loc_41A733:
mov	eax, esi
pop	esi
retn	4
sub_41A710 endp

align 10h



sub_41A740 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+58h]
mov	dword ptr [esi], offset	off_1551078
mov	eax, [edi]
test	eax, eax
jz	short loc_41A770
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41A76F
push	edi
mov	eax, ebx
call	sub_1171F60

loc_41A76F:
pop	ebx

loc_41A770:
mov	ecx, esi
mov	dword ptr [esi+54h], offset off_155113C
call	sub_1184260
test	[esp+8+arg_0], 1
jz	short loc_41A798
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	6Ch
push	3
push	esi
call	eax

loc_41A798:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_41A740 endp

align 10h



sub_41A7A0 proc	near
mov	eax, offset off_17EE040
retn
sub_41A7A0 endp

align 10h



sub_41A7B0 proc	near
push	offset CriticalSection ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	edx, 1
add	dword_188A990, edx
xor	ecx, ecx
mov	dword_188A98C, eax
cmp	dword_18893E0, ecx
jnz	short loc_41A7E1
mov	dword_18893E0, esi

loc_41A7E1:
mov	eax, dword_18893E4
cmp	eax, ecx
jz	short loc_41A7F2
mov	[eax+2Ch], esi
mov	[esi+28h], eax
jmp	short loc_41A7F5

loc_41A7F2:
mov	[esi+28h], ecx

loc_41A7F5:
mov	[esi+2Ch], ecx
sub	dword_188A990, edx
mov	dword_18893E4, esi
jnz	short loc_41A80C
mov	dword_188A98C, ecx

loc_41A80C:		; lpCriticalSection
push	offset CriticalSection
call	ds:LeaveCriticalSection
retn
sub_41A7B0 endp

align 10h



sub_41A820 proc	near
push	esi
push	edi
mov	esi, eax
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
xor	eax, eax
mov	[esi+14h], ax
xor	ecx, ecx
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_1551248
mov	dword ptr [esi+18h], 6
mov	dword ptr [esi+1Ch], 3
mov	dword ptr [esi+20h], 2
mov	[esi+24h], edi
call	sub_41A7B0
pop	edi
mov	eax, esi
pop	esi
retn
sub_41A820 endp

align 10h



sub_41A880 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+24h]
mov	dword ptr [esi], offset	off_1551248
test	ecx, ecx
jz	short loc_41A898
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_41A898:
call	sub_41A8E0
mov	ecx, esi
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_41A8BE
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_41A8BE:
mov	eax, esi
pop	esi
retn	4
sub_41A880 endp

align 10h



sub_41A8D0 proc	near
mov	eax, offset off_17EE094
retn
sub_41A8D0 endp

align 10h



sub_41A8E0 proc	near
push	offset CriticalSection ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	ecx, 1
add	dword_188A990, ecx
mov	dword_188A98C, eax
cmp	dword_18893E0, esi
jnz	short loc_41A911
mov	eax, [esi+2Ch]
mov	dword_18893E0, eax

loc_41A911:
cmp	dword_18893E4, esi
jnz	short loc_41A922
mov	edx, [esi+28h]
mov	dword_18893E4, edx

loc_41A922:
mov	eax, [esi+28h]
test	eax, eax
jz	short loc_41A92F
mov	edx, [esi+2Ch]
mov	[eax+2Ch], edx

loc_41A92F:
mov	eax, [esi+2Ch]
test	eax, eax
jz	short loc_41A93C
mov	edx, [esi+28h]
mov	[eax+28h], edx

loc_41A93C:
sub	dword_188A990, ecx
jnz	short loc_41A94E
mov	dword_188A98C, 0

loc_41A94E:		; lpCriticalSection
push	offset CriticalSection
call	ds:LeaveCriticalSection
retn
sub_41A8E0 endp

align 10h



sub_41A960 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551298
call	sub_11906E0
test	[esp+4+arg_0], 1
jz	short loc_41A988
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	64h
push	3
push	esi
call	eax

loc_41A988:
mov	eax, esi
pop	esi
retn	4
sub_41A960 endp

align 10h



sub_41A990 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11869B0
test	[esp+4+arg_0], 1
jz	short loc_41A9B6
test	esi, esi
jz	short loc_41A9B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_41A9B6:
mov	eax, esi
pop	esi
retn	4
sub_41A990 endp

align 10h



sub_41A9C0 proc	near
mov	eax, offset off_17EE300
retn
sub_41A9C0 endp

align 10h



sub_41A9D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	1
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, [esi+8]
push	ecx
push	edx
push	esi
mov	[esp+1Ch+var_4], 1
call	eax
add	esp, 14h
add	[esi+4], eax
pop	esi
pop	ecx
retn
sub_41A9D0 endp

align 10h



sub_41AA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

cmp	[esp+arg_C], 0
mov	ecx, [esp+arg_0]
jz	short loc_41AA10
mov	edx, 0FFh

loc_41AA10:
push	esi
mov	esi, [ecx+eax*4+18h]
push	edi
mov	edi, [ecx+eax*4+24h]
shl	edx, 10h
or	edx, [esp+8+arg_4]
mov	[edi+esi*8], edx
mov	edx, [ecx+eax*4+18h]
mov	esi, [ecx+eax*4+24h]
mov	edi, [esp+8+arg_8]
mov	[esi+edx*8+4], edi
inc	dword ptr [ecx+eax*4+18h]
pop	edi
pop	esi
retn	10h
sub_41AA00 endp

align 10h



sub_41AA40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+20h]
mov	dword ptr [esi], offset	off_1551360
mov	dword ptr [esi+18h], 0
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	ecx, esi
mov	dword ptr [esi+20h], 0
call	sub_1149A00
test	[esp+4+arg_0], 1
jz	short loc_41AA83
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_41AA83:
mov	eax, esi
pop	esi
retn	4
sub_41AA40 endp

align 10h



sub_41AA90 proc	near
mov	eax, [ecx+0Ch]
push	esi
lea	esi, [ecx+0Ch]
test	eax, eax
jz	short loc_41AAB8
push	edi
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41AAB7
push	esi
mov	eax, edi
call	sub_1171F60

loc_41AAB7:
pop	edi

loc_41AAB8:
pop	esi
retn
sub_41AA90 endp

align 10h



sub_41AAC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	eax, 26h
sub	esp, 8
cmp	ax, [esi+8]
jz	loc_41ABBE
movzx	eax, word ptr [esi+0Ah]
mov	ecx, 26h
cmp	cx, ax
jnb	short loc_41AB1E
mov	edx, ecx
cmp	dx, ax
jnb	short loc_41AB15
jmp	short loc_41AAF0
align 10h

loc_41AAF0:
mov	edx, [esi+4]
movzx	eax, cx
cmp	dword ptr [edx+eax*4], 0
lea	eax, [edx+eax*4]
jz	short loc_41AB0E
mov	dword ptr [eax], 0
mov	eax, 0FFFFh
add	[esi+0Ch], ax

loc_41AB0E:
inc	ecx
cmp	cx, [esi+0Ah]
jb	short loc_41AAF0

loc_41AB15:
mov	ecx, 26h
mov	[esi+0Ah], cx

loc_41AB1E:
mov	eax, dword_1889574
push	edi
mov	edi, [esi+4]
push	0
push	0FFFFFFFFh
push	0
mov	edx, 26h
mov	[esi+8], dx
mov	ecx, [eax]
push	0
push	5
lea	eax, [esp+20h+var_8]
push	eax
mov	[esp+24h+var_8], 4
mov	[esp+24h+var_4], 98h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+24h+var_4]
push	eax
call	edx
mov	[esi+4], eax
xor	eax, eax
xor	ecx, ecx
cmp	ax, [esi+0Ah]
jnb	short loc_41AB88
push	ebx
jmp	short loc_41AB70
align 10h

loc_41AB70:
mov	edx, [esi+4]
movzx	eax, cx
add	eax, eax
add	eax, eax
mov	ebx, [eax+edi]
inc	ecx
mov	[eax+edx], ebx
cmp	cx, [esi+0Ah]
jb	short loc_41AB70
pop	ebx

loc_41AB88:
movzx	eax, word ptr [esi+0Ah]
cmp	ax, [esi+8]
jnb	short loc_41ABA6

loc_41AB92:
mov	edx, [esi+4]
movzx	ecx, ax
inc	eax
mov	dword ptr [edx+ecx*4], 0
cmp	ax, [esi+8]
jb	short loc_41AB92

loc_41ABA6:
test	edi, edi
jz	short loc_41ABBD
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	edi
call	eax

loc_41ABBD:
pop	edi

loc_41ABBE:
add	esp, 8
retn
sub_41AAC0 endp

align 10h



sub_41ABD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [edx]
push	esi
movzx	esi, word ptr [eax+0Ah]
cmp	ecx, esi
jb	short loc_41ABF8
lea	esi, [ecx+1]
mov	[eax+0Ah], si
test	edx, edx
jz	short loc_41AC21
inc	word ptr [eax+0Ch]
mov	eax, [eax+4]
mov	[eax+ecx*4], edx
pop	esi
retn	4

loc_41ABF8:
mov	esi, [eax+4]
test	edx, edx
jz	short loc_41AC12
cmp	dword ptr [esi+ecx*4], 0
jnz	short loc_41AC21
inc	word ptr [eax+0Ch]
mov	eax, esi
mov	[eax+ecx*4], edx
pop	esi
retn	4

loc_41AC12:
cmp	dword ptr [esi+ecx*4], 0
jz	short loc_41AC21
mov	esi, 0FFFFh
add	[eax+0Ch], si

loc_41AC21:
mov	eax, [eax+4]
mov	[eax+ecx*4], edx
pop	esi
retn	4
sub_41ABD0 endp

align 10h



sub_41AC30 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], cl
mov	[eax+0Dh], cl
retn
sub_41AC30 endp

align 10h



sub_41AC50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12400C0
test	[esp+4+arg_0], 1
jz	short loc_41AC76
test	esi, esi
jz	short loc_41AC76
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_41AC76:
mov	eax, esi
pop	esi
retn	4
sub_41AC50 endp

align 10h



sub_41AC80 proc	near
mov	eax, offset off_17EE078
retn
sub_41AC80 endp

align 10h



sub_41AC90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+2Ch], eax
retn	4
sub_41AC90 endp

align 10h



sub_41ACA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1240170
test	[esp+4+arg_0], 1
jz	short loc_41ACC6
test	esi, esi
jz	short loc_41ACC6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_41ACC6:
mov	eax, esi
pop	esi
retn	4
sub_41ACA0 endp

align 10h



sub_41ACD0 proc	near
mov	eax, offset off_17EE068
retn
sub_41ACD0 endp

align 10h



sub_41ACE0 proc	near
mov	eax, [ecx+0Ch]
retn
sub_41ACE0 endp

align 10h



; int __stdcall	sub_41ACF0(char	*Src)
sub_41ACF0 proc	near

Src= dword ptr	4

push	ebp
push	edi
mov	edi, [esp+8+Src]
mov	ebp, ecx
test	edi, edi
jz	loc_41AD97
mov	ecx, offset byte_146D660
mov	eax, edi

loc_41AD07:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_41AD27
test	dl, dl
jz	short loc_41AD23
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_41AD27
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_41AD07

loc_41AD23:
xor	eax, eax
jmp	short loc_41AD2C

loc_41AD27:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_41AD2C:
test	eax, eax
jz	short loc_41AD97
mov	eax, edi
lea	edx, [eax+1]

loc_41AD35:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_41AD35
mov	ecx, [ebp+0Ch]
sub	eax, edx
push	esi
lea	esi, [eax+1]
test	ecx, ecx
jz	short loc_41AD71
mov	eax, ecx
lea	edi, [eax+1]
mov	edi, edi

loc_41AD50:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_41AD50
sub	eax, edi
cmp	eax, esi
jnb	short loc_41AD6D
push	ecx
call	sub_1227D40
add	esp, 4
mov	dword ptr [ebp+0Ch], 0

loc_41AD6D:
mov	edi, [esp+0Ch+Src]

loc_41AD71:
cmp	dword ptr [ebp+0Ch], 0
jnz	short loc_41AD83
push	esi
call	sub_1227DA0
add	esp, 4
mov	[ebp+0Ch], eax

loc_41AD83:
mov	eax, [ebp+0Ch]
push	edi		; Src
push	esi		; SizeInBytes
push	eax		; Dst
call	_strcpy_s
add	esp, 0Ch
pop	esi
pop	edi
pop	ebp
retn	4

loc_41AD97:
mov	eax, [ebp+0Ch]
test	eax, eax
jz	short loc_41ADB2
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41ADB2:
pop	edi
mov	dword ptr [ebp+0Ch], 0
pop	ebp
retn	4
sub_41ACF0 endp

align 10h



; int __stdcall	sub_41ADC0(char	*Src)
sub_41ADC0 proc	near

Src= dword ptr	4

push	ebp
push	edi
mov	edi, [esp+8+Src]
mov	ebp, ecx
test	edi, edi
jz	loc_41AE67
mov	ecx, offset byte_146D660
mov	eax, edi

loc_41ADD7:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_41ADF7
test	dl, dl
jz	short loc_41ADF3
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_41ADF7
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_41ADD7

loc_41ADF3:
xor	eax, eax
jmp	short loc_41ADFC

loc_41ADF7:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_41ADFC:
test	eax, eax
jz	short loc_41AE67
mov	eax, edi
lea	edx, [eax+1]

loc_41AE05:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_41AE05
mov	ecx, [ebp+10h]
sub	eax, edx
push	esi
lea	esi, [eax+1]
test	ecx, ecx
jz	short loc_41AE41
mov	eax, ecx
lea	edi, [eax+1]
mov	edi, edi

loc_41AE20:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_41AE20
sub	eax, edi
cmp	eax, esi
jnb	short loc_41AE3D
push	ecx
call	sub_1227D40
add	esp, 4
mov	dword ptr [ebp+10h], 0

loc_41AE3D:
mov	edi, [esp+0Ch+Src]

loc_41AE41:
cmp	dword ptr [ebp+10h], 0
jnz	short loc_41AE53
push	esi
call	sub_1227DA0
add	esp, 4
mov	[ebp+10h], eax

loc_41AE53:
mov	eax, [ebp+10h]
push	edi		; Src
push	esi		; SizeInBytes
push	eax		; Dst
call	_strcpy_s
add	esp, 0Ch
pop	esi
pop	edi
pop	ebp
retn	4

loc_41AE67:
mov	eax, [ebp+10h]
test	eax, eax
jz	short loc_41AE82
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41AE82:
pop	edi
mov	dword ptr [ebp+10h], 0
pop	ebp
retn	4
sub_41ADC0 endp

align 10h



sub_41AE90 proc	near
mov	eax, [ecx+18h]
retn
sub_41AE90 endp

align 10h



sub_41AEA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx+14h], eax
mov	[ecx+18h], edx
retn	8
sub_41AEA0 endp

align 10h



sub_41AEC0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+1Ch], eax
retn	4
sub_41AEC0 endp

align 10h



sub_41AED0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+30h], eax
retn	4
sub_41AED0 endp

align 10h



sub_41AEE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+34h], eax
retn	4
sub_41AEE0 endp

align 10h



sub_41AEF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+38h], eax
retn	4
sub_41AEF0 endp

align 10h



sub_41AF00 proc	near
mov	al, [ecx+2Ch]
retn
sub_41AF00 endp

align 10h



sub_41AF10 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	[ecx+2Ch], al
retn	4
sub_41AF10 endp

align 10h



sub_41AF20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_117E7A0
test	[esp+4+arg_0], 1
jz	short loc_41AF46
test	esi, esi
jz	short loc_41AF46
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_41AF46:
mov	eax, esi
pop	esi
retn	4
sub_41AF20 endp

align 10h



sub_41AF50 proc	near
mov	eax, offset off_17EE060
retn
sub_41AF50 endp

align 10h



sub_41AF60 proc	near
mov	eax, [ecx+30h]
retn
sub_41AF60 endp

align 10h



; int __stdcall	sub_41AF70(char	*Src)
sub_41AF70 proc	near

Src= dword ptr	4

push	ebx
mov	ebx, [esp+4+Src]
push	ebp
mov	ebp, ecx
mov	eax, [ebp+30h]
cmp	eax, ebx
jz	short loc_41AFD7
test	eax, eax
jz	short loc_41AF97
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41AF97:
test	ebx, ebx
jz	short loc_41AFD0
cmp	byte ptr [ebx],	0
jz	short loc_41AFD0
mov	eax, ebx
lea	edx, [eax+1]

loc_41AFA5:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_41AFA5
push	esi
sub	eax, edx
lea	esi, [eax+1]
push	edi
push	esi
call	sub_1227DA0
push	ebx		; Src
mov	edi, eax
push	esi		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 10h
mov	[ebp+30h], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_41AFD0:
mov	dword ptr [ebp+30h], 0

loc_41AFD7:
pop	ebp
pop	ebx
retn	4
sub_41AF70 endp

align 10h



sub_41AFE0 proc	near
mov	eax, [ecx+34h]
retn
sub_41AFE0 endp

align 10h



; int __stdcall	sub_41AFF0(char	*Src)
sub_41AFF0 proc	near

Src= dword ptr	4

push	ebx
mov	ebx, [esp+4+Src]
push	ebp
mov	ebp, ecx
mov	eax, [ebp+34h]
cmp	eax, ebx
jz	short loc_41B04B
test	eax, eax
jz	short loc_41B017
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41B017:
test	ebx, ebx
jz	short loc_41B04B
cmp	byte ptr [ebx],	0
jz	short loc_41B04B
mov	eax, ebx
lea	edx, [eax+1]

loc_41B025:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_41B025
push	esi
sub	eax, edx
lea	esi, [eax+1]
push	edi
push	esi
call	sub_1227DA0
push	ebx		; Src
mov	edi, eax
push	esi		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 10h
mov	[ebp+34h], edi
pop	edi
pop	esi

loc_41B04B:
pop	ebp
pop	ebx
retn	4
sub_41AFF0 endp




sub_41B050 proc	near
mov	eax, [ecx+38h]
retn
sub_41B050 endp

align 10h



sub_41B060 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	eax, [edi+38h]
cmp	eax, esi
jz	short loc_41B08A
test	eax, eax
jz	short loc_41B07B
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_41B07B:
mov	[edi+38h], esi
test	esi, esi
jz	short loc_41B08A
mov	eax, [esi]
mov	ecx, [eax+4]
push	esi
call	ecx

loc_41B08A:
pop	edi
pop	esi
retn	4
sub_41B060 endp

align 10h



sub_41B090 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_117ECB0
test	[esp+4+arg_0], 1
jz	short loc_41B0B6
test	esi, esi
jz	short loc_41B0B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_41B0B6:
mov	eax, esi
pop	esi
retn	4
sub_41B090 endp

align 10h



sub_41B0C0 proc	near
mov	eax, offset off_17EE058
retn
sub_41B0C0 endp

align 10h



sub_41B0D0 proc	near
mov	eax, [ecx+3Ch]
retn
sub_41B0D0 endp

align 10h



; int __stdcall	sub_41B0E0(char	*Src)
sub_41B0E0 proc	near

Src= dword ptr	4

push	ebx
mov	ebx, [esp+4+Src]
push	ebp
mov	ebp, ecx
mov	eax, [ebp+3Ch]
cmp	eax, ebx
jz	short loc_41B147
test	eax, eax
jz	short loc_41B107
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41B107:
test	ebx, ebx
jz	short loc_41B140
cmp	byte ptr [ebx],	0
jz	short loc_41B140
mov	eax, ebx
lea	edx, [eax+1]

loc_41B115:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_41B115
push	esi
sub	eax, edx
lea	esi, [eax+1]
push	edi
push	esi
call	sub_1227DA0
push	ebx		; Src
mov	edi, eax
push	esi		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 10h
mov	[ebp+3Ch], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_41B140:
mov	dword ptr [ebp+3Ch], 0

loc_41B147:
pop	ebp
pop	ebx
retn	4
sub_41B0E0 endp

align 10h



sub_41B150 proc	near
mov	eax, [ecx+40h]
retn
sub_41B150 endp

align 10h



; int __stdcall	sub_41B160(char	*Src)
sub_41B160 proc	near

Src= dword ptr	4

push	ebx
mov	ebx, [esp+4+Src]
push	ebp
mov	ebp, ecx
mov	eax, [ebp+40h]
cmp	eax, ebx
jz	short loc_41B1BB
test	eax, eax
jz	short loc_41B187
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41B187:
test	ebx, ebx
jz	short loc_41B1BB
cmp	byte ptr [ebx],	0
jz	short loc_41B1BB
mov	eax, ebx
lea	edx, [eax+1]

loc_41B195:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_41B195
push	esi
sub	eax, edx
lea	esi, [eax+1]
push	edi
push	esi
call	sub_1227DA0
push	ebx		; Src
mov	edi, eax
push	esi		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 10h
mov	[ebp+40h], edi
pop	edi
pop	esi

loc_41B1BB:
pop	ebp
pop	ebx
retn	4
sub_41B160 endp




sub_41B1C0 proc	near
mov	eax, [ecx+44h]
retn
sub_41B1C0 endp

align 10h



sub_41B1D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	eax, [edi+44h]
cmp	eax, esi
jz	short loc_41B1FA
test	eax, eax
jz	short loc_41B1EB
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_41B1EB:
mov	[edi+44h], esi
test	esi, esi
jz	short loc_41B1FA
mov	eax, [esi]
mov	ecx, [eax+4]
push	esi
call	ecx

loc_41B1FA:
pop	edi
pop	esi
retn	4
sub_41B1D0 endp

align 10h



sub_41B200 proc	near
add	eax, 0A8h
retn
sub_41B200 endp

align 10h



sub_41B210 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx]
push	esi
mov	esi, eax
test	edx, edx
jnz	short loc_41B226
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_41B226:
push	ebp
push	edi
movzx	edi, word ptr [esi+0Ah]
xor	ecx, ecx
xor	eax, eax
cmp	cx, di
jnb	short loc_41B250
mov	ecx, [esi+4]
jmp	short loc_41B240
align 10h

loc_41B240:
movzx	ebp, ax
cmp	dword ptr [ecx+ebp*4], 0
jz	short loc_41B279
inc	eax
cmp	ax, [esi+0Ah]
jb	short loc_41B240

loc_41B250:
movzx	edx, word ptr [esi+8]
movzx	edi, di
cmp	edi, edx
jb	short loc_41B266
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_41B266:
push	esi
mov	edx, ebx
mov	ecx, edi
call	sub_41ABD0
mov	eax, edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	4

loc_41B279:
movzx	eax, ax
pop	edi
pop	ebp
mov	[ecx+eax*4], edx
inc	word ptr [esi+0Ch]
pop	esi
pop	ebx
retn	4
sub_41B210 endp

align 10h



sub_41B290 proc	near
movzx	eax, word ptr [edx+0Ah]
cmp	esi, eax
jb	short loc_41B29B
xor	eax, eax
retn

loc_41B29B:
mov	ecx, [edx+4]
mov	eax, [ecx+esi*4]
lea	ecx, [ecx+esi*4]
mov	dword ptr [ecx], 0
test	eax, eax
jz	short loc_41B2B7
mov	ecx, 0FFFFh
add	[edx+0Ch], cx

loc_41B2B7:
mov	cx, [edx+0Ah]
dec	cx
push	edi
movzx	edi, cx
cmp	esi, edi
pop	edi
jnz	short locret_41B2CA
mov	[edx+0Ah], cx

locret_41B2CA:
retn
sub_41B290 endp

align 10h



sub_41B2D0 proc	near
lea	ecx, [esi+2Ch]
mov	dword ptr [ecx], offset	off_1554C5C
mov	edx, 1
mov	[ecx+0Eh], dx
push	edi
xor	edi, edi
mov	[ecx+4], edi
xor	eax, eax
mov	[ecx+8], ax
mov	[ecx+0Ah], ax
xor	edx, edx
mov	[ecx+0Ch], dx
mov	[esi], edi
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+4], edi
mov	[esi+18h], edi
mov	[esi+1Ch], edi
mov	[esi+20h], edi
mov	[esi+24h], edi
mov	[esi+28h], edi
call	sub_41B360
mov	[esi+3Ch], edi
mov	[esi+40h], edi
mov	eax, esi
pop	edi
retn
sub_41B2D0 endp

align 10h



sub_41B330 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1180250
test	[esp+4+arg_0], 1
jz	short loc_41B356
test	esi, esi
jz	short loc_41B356
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_41B356:
mov	eax, esi
pop	esi
retn	4
sub_41B330 endp

align 10h



sub_41B360 proc	near
xor	edx, edx
xor	eax, eax
cmp	dx, [ecx+0Ah]
jnb	short loc_41B385
push	esi
jmp	short loc_41B370
align 10h

loc_41B370:
mov	esi, [ecx+4]
movzx	edx, ax
inc	eax
mov	dword ptr [esi+edx*4], 0
cmp	ax, [ecx+0Ah]
jb	short loc_41B370
pop	esi

loc_41B385:
xor	eax, eax
xor	edx, edx
mov	[ecx+0Ah], ax
mov	[ecx+0Ch], dx
retn
sub_41B360 endp

align 10h



sub_41B3A0 proc	near
lea	ecx, [esi+1Ch]
mov	dword ptr [ecx], offset	off_1554C5C
mov	edx, 1
mov	[ecx+0Eh], dx
push	edi
xor	edi, edi
mov	[ecx+4], edi
xor	eax, eax
mov	[ecx+8], ax
mov	[ecx+0Ah], ax
xor	edx, edx
mov	[ecx+0Ch], dx
mov	dword ptr [esi+0Ch], 10000h
mov	[esi+4], edi
mov	[esi+8], edi
mov	[esi], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
call	sub_41B360
mov	[esi+2Ch], edi
mov	dword ptr [esi+30h], 80h
mov	eax, esi
pop	edi
retn
sub_41B3A0 endp

align 10h



sub_41B400 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	ebx
mov	ebx, [esp+18h+arg_4]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 34h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_41B456
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_41B456:
push	esi
mov	esi, eax
call	sub_41B3A0
mov	esi, eax
test	esi, esi
jz	short loc_41B4BB
mov	dword ptr [esi+0Ch], 10000h
test	edi, edi
jz	short loc_41B47C
mov	[esi+10h], edi
mov	ecx, [edi]
mov	edx, [ecx+4]
push	edi
call	edx
jmp	short loc_41B492

loc_41B47C:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_41B48B
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_41B48B:
mov	dword ptr [esi+10h], 0

loc_41B492:
mov	eax, [esp+1Ch+arg_0]
mov	[esi+4], eax
mov	[esi+8], ebx
mov	dword ptr [esi], 0
mov	dword ptr [esi+14h], 8
test	ebx, ebx
jns	short loc_41B4B4
mov	dword ptr [esi+14h], 18h

loc_41B4B4:
mov	dword ptr [esi+18h], 1

loc_41B4BB:
mov	eax, esi
pop	esi
pop	ebx
add	esp, 14h
retn
sub_41B400 endp

align 10h



sub_41B4D0 proc	near
xor	ecx, ecx
mov	dword ptr [eax], offset	off_1550F14
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], cl
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	dword ptr [eax+3Ch], 4
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
retn
sub_41B4D0 endp

align 10h



sub_41B520 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15515A0
cmp	esi, dword_18893BC
jnz	short loc_41B53B
mov	dword_18893BC, 0

loc_41B53B:
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_1551638
test	eax, eax
jz	short loc_41B550
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_41B550:
test	[esp+4+arg_0], 1
jz	short loc_41B56A
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_41B56A:
mov	eax, esi
pop	esi
retn	4
sub_41B520 endp




sub_41B570 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	esi
xor	esi, esi
push	esi
push	0FFFFFFFFh
push	esi
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 20h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
cmp	eax, esi
jnz	short loc_41B5C2
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_41B5C2:
mov	ecx, [esp+18h+arg_0]
mov	edx, [esp+18h+arg_4]
mov	[eax+18h], esi
mov	[eax+1Ch], esi
mov	[eax+8], ecx
mov	ecx, [esp+18h+arg_8]
mov	[eax], esi
mov	[eax+4], esi
mov	[eax+10h], esi
mov	[eax+0Ch], edx
mov	[eax+14h], ecx
pop	esi
add	esp, 14h
retn
sub_41B570 endp

align 10h



sub_41B5F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_117F4E0
test	[esp+4+arg_0], 1
jz	short loc_41B616
test	esi, esi
jz	short loc_41B616
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	50h
push	3
push	esi
call	eax

loc_41B616:
mov	eax, esi
pop	esi
retn	4
sub_41B5F0 endp

align 10h



sub_41B620 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	ebx
push	esi
xor	ebx, ebx
push	ebx
push	0FFFFFFFFh
push	ebx
push	1
push	1
lea	eax, [esp+30h+var_14]
push	eax
mov	[esp+34h+var_14], 4
mov	[esp+34h+var_10], 18h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+34h+var_10]
push	eax
call	edx
mov	esi, eax
cmp	esi, ebx
jnz	short loc_41B675
lea	ecx, [esp+1Ch+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+20h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_41B675:
mov	[esi], ebx
mov	[esi+4], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	eax, [esi+0Ch]
mov	dword ptr [esi+8], 800h
cmp	eax, ebx
jz	short loc_41B696
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_41B696:
cmp	edi, ebx
jz	short loc_41B6B6
mov	[esi+0Ch], edi
mov	eax, [edi]
mov	ecx, [eax+4]
push	edi
call	ecx
mov	edx, [esp+1Ch+arg_0]
mov	[esi], ebx
mov	[esi+4], edx
mov	eax, esi
pop	esi
pop	ebx
add	esp, 14h
retn

loc_41B6B6:
mov	edx, [esp+1Ch+arg_0]
mov	[esi+0Ch], ebx
mov	[esi], ebx
mov	[esi+4], edx
mov	eax, esi
pop	esi
pop	ebx
add	esp, 14h
retn
sub_41B620 endp

align 10h



; int __stdcall	sub_41B6D0(void	*Src)
sub_41B6D0 proc	near

Src= dword ptr	4

push	ebx
push	esi
mov	esi, [ecx+20F0h]
lea	ebx, [edi+eax]
cmp	ebx, [esi+78h]
jbe	short loc_41B6E7
pop	esi
xor	al, al
pop	ebx
retn	4

loc_41B6E7:
mov	edx, [esp+8+Src]
add	eax, eax
add	eax, eax
push	eax		; MaxCount
push	edx		; Src
push	eax		; DstSize
mov	eax, [esi+58h]
lea	ecx, [eax+edi*4]
push	ecx		; Dst
call	_memcpy_s
add	esp, 10h
cmp	[esi+68h], edi
jbe	short loc_41B709
mov	[esi+68h], edi

loc_41B709:
cmp	[esi+6Ch], ebx
jnb	short loc_41B711
mov	[esi+6Ch], ebx

loc_41B711:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_41B6D0 endp

align 10h



; int __stdcall	sub_41B720(void	*Src)
sub_41B720 proc	near

Src= dword ptr	4

push	ebx
push	esi
mov	esi, [ecx+20F0h]
lea	ebx, [edi+eax]
cmp	ebx, [esi+50h]
jbe	short loc_41B737
pop	esi
xor	al, al
pop	ebx
retn	4

loc_41B737:
mov	edx, [esp+8+Src]
shl	eax, 4
push	eax		; MaxCount
push	edx		; Src
push	eax		; DstSize
mov	eax, edi
shl	eax, 4
add	eax, [esi+30h]
push	eax		; Dst
call	_memcpy_s
add	esp, 10h
cmp	[esi+40h], edi
jbe	short loc_41B75A
mov	[esi+40h], edi

loc_41B75A:
cmp	[esi+44h], ebx
jnb	short loc_41B762
mov	[esi+44h], ebx

loc_41B762:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_41B720 endp

align 10h



; int __stdcall	sub_41B770(void	*Src)
sub_41B770 proc	near

Src= dword ptr	4

push	ebx
push	esi
mov	esi, [ecx+20F0h]
lea	ebx, [edi+eax]
cmp	ebx, [esi+28h]
jbe	short loc_41B787
pop	esi
xor	al, al
pop	ebx
retn	4

loc_41B787:
mov	edx, [esp+8+Src]
shl	eax, 4
push	eax		; MaxCount
push	edx		; Src
push	eax		; DstSize
mov	eax, edi
shl	eax, 4
add	eax, [esi+8]
push	eax		; Dst
call	_memcpy_s
add	esp, 10h
cmp	[esi+18h], edi
jbe	short loc_41B7AA
mov	[esi+18h], edi

loc_41B7AA:
cmp	[esi+1Ch], ebx
jnb	short loc_41B7B2
mov	[esi+1Ch], ebx

loc_41B7B2:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_41B770 endp

align 10h



sub_41B7C0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
add	esi, 20h
cmp	[esi], edi
jz	short loc_41B800
test	edi, edi
jz	short loc_41B7DB
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41B7DB:
mov	eax, [esi]
test	eax, eax
jz	short loc_41B7FE
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41B7FD
push	esi
mov	eax, ebx
call	sub_1171F60

loc_41B7FD:
pop	ebx

loc_41B7FE:
mov	[esi], edi

loc_41B800:
pop	edi
pop	esi
retn
sub_41B7C0 endp

align 10h



; int __stdcall	sub_41B810(void	*Src)
sub_41B810 proc	near

Src= dword ptr	4

push	ebx
push	esi
mov	esi, [ecx+20F0h]
lea	ebx, [edi+eax]
cmp	ebx, [esi+7Ch]
jbe	short loc_41B827
pop	esi
xor	al, al
pop	ebx
retn	4

loc_41B827:
mov	edx, [esp+8+Src]
add	eax, eax
add	eax, eax
push	eax		; MaxCount
push	edx		; Src
push	eax		; DstSize
mov	eax, [esi+60h]
lea	ecx, [eax+edi*4]
push	ecx		; Dst
call	_memcpy_s
add	esp, 10h
cmp	[esi+70h], edi
jbe	short loc_41B849
mov	[esi+70h], edi

loc_41B849:
cmp	[esi+74h], ebx
jnb	short loc_41B851
mov	[esi+74h], ebx

loc_41B851:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_41B810 endp

align 10h



; int __stdcall	sub_41B860(void	*Src)
sub_41B860 proc	near

Src= dword ptr	4

push	ebx
push	esi
mov	esi, [ecx+20F0h]
lea	ebx, [edi+eax]
cmp	ebx, [esi+54h]
jbe	short loc_41B877
pop	esi
xor	al, al
pop	ebx
retn	4

loc_41B877:
mov	edx, [esp+8+Src]
shl	eax, 4
push	eax		; MaxCount
push	edx		; Src
push	eax		; DstSize
mov	eax, edi
shl	eax, 4
add	eax, [esi+38h]
push	eax		; Dst
call	_memcpy_s
add	esp, 10h
cmp	[esi+48h], edi
jbe	short loc_41B89A
mov	[esi+48h], edi

loc_41B89A:
cmp	[esi+4Ch], ebx
jnb	short loc_41B8A2
mov	[esi+4Ch], ebx

loc_41B8A2:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_41B860 endp

align 10h



; int __stdcall	sub_41B8B0(void	*Src)
sub_41B8B0 proc	near

Src= dword ptr	4

push	ebx
push	esi
mov	esi, [ecx+20F0h]
lea	ebx, [edi+eax]
cmp	ebx, [esi+2Ch]
jbe	short loc_41B8C7
pop	esi
xor	al, al
pop	ebx
retn	4

loc_41B8C7:
mov	edx, [esp+8+Src]
shl	eax, 4
push	eax		; MaxCount
push	edx		; Src
push	eax		; DstSize
mov	eax, edi
shl	eax, 4
add	eax, [esi+10h]
push	eax		; Dst
call	_memcpy_s
add	esp, 10h
cmp	[esi+20h], edi
jbe	short loc_41B8EA
mov	[esi+20h], edi

loc_41B8EA:
cmp	[esi+24h], ebx
jnb	short loc_41B8F2
mov	[esi+24h], ebx

loc_41B8F2:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_41B8B0 endp

align 10h



sub_41B900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

movzx	eax, word ptr [esi+8]
sub	esp, 8
cmp	edi, eax
jz	loc_41BA06
movzx	eax, word ptr [esi+0Ah]
fldz
movzx	ecx, ax
cmp	edi, ecx
jnb	short loc_41B94D
movzx	edx, di
cmp	di, ax
jnb	short loc_41B949

loc_41B924:
mov	ecx, [esi+4]
movzx	eax, dx
fcom	dword ptr [ecx+eax*4]
lea	ecx, [ecx+eax*4]
fnstsw	ax
test	ah, 44h
jnp	short loc_41B942
mov	eax, 0FFFFh
fst	dword ptr [ecx]
add	[esi+0Ch], ax

loc_41B942:
inc	edx
cmp	dx, [esi+0Ah]
jb	short loc_41B924

loc_41B949:
mov	[esi+0Ah], di

loc_41B94D:
push	ebx
fstp	st
mov	ebx, [esi+4]
mov	[esi+8], di
test	edi, edi
jbe	loc_41B9E7
movzx	eax, di
add	eax, eax
add	eax, eax
jnz	short loc_41B96D
mov	eax, 1

loc_41B96D:
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	0
push	0FFFFFFFFh
push	0
push	0
mov	[esp+1Ch+var_4], eax
push	5
lea	eax, [esp+20h+var_8]
push	eax
mov	[esp+24h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+24h+var_4]
push	eax
call	edx
mov	[esi+4], eax
xor	eax, eax
xor	ecx, ecx
cmp	ax, [esi+0Ah]
jnb	short loc_41B9C7
lea	esp, [esp+0]

loc_41B9B0:
mov	edx, [esi+4]
movzx	eax, cx
add	eax, eax
add	eax, eax
inc	ecx
fld	dword ptr [eax+ebx]
fstp	dword ptr [eax+edx]
cmp	cx, [esi+0Ah]
jb	short loc_41B9B0

loc_41B9C7:
movzx	eax, word ptr [esi+0Ah]
cmp	ax, [esi+8]
jnb	short loc_41B9EE
fldz

loc_41B9D3:
mov	edx, [esi+4]
movzx	ecx, ax
inc	eax
fst	dword ptr [edx+ecx*4]
cmp	ax, [esi+8]
jb	short loc_41B9D3
fstp	st
jmp	short loc_41B9EE

loc_41B9E7:
mov	dword ptr [esi+4], 0

loc_41B9EE:
test	ebx, ebx
jz	short loc_41BA05
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	ebx
call	eax

loc_41BA05:
pop	ebx

loc_41BA06:
add	esp, 8
retn
sub_41B900 endp

align 10h



sub_41BA10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
mov	ecx, [esp+18h+arg_0]
fld	dword ptr [ecx+4]
fmul	dword ptr [edx+4]
fld	dword ptr [edx]
fmul	dword ptr [ecx]
faddp	st(1), st
fld	dword ptr [ecx+8]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[esp+18h+var_18]
fld	dword ptr [ecx+0Ch]
fmul	dword ptr [edx]
fld	dword ptr [ecx+10h]
fmul	dword ptr [edx+4]
faddp	st(1), st
fld	dword ptr [ecx+14h]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[esp+18h+var_14]
fld	dword ptr [ecx+18h]
fmul	dword ptr [edx]
fld	dword ptr [ecx+1Ch]
fmul	dword ptr [edx+4]
faddp	st(1), st
fld	dword ptr [ecx+20h]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[esp+18h+var_10]
fld	dword ptr [ecx+30h]
fstp	[esp+18h+arg_0]
fld	[esp+18h+var_18]
fld	[esp+18h+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+18h+var_C]
fld	[esp+18h+var_14]
fmul	st, st(1)
fstp	[esp+18h+var_8]
fmul	[esp+18h+var_10]
fstp	[esp+18h+var_4]
fld	dword ptr [ecx+24h]
fadd	[esp+18h+var_C]
fstp	dword ptr [eax]
fld	dword ptr [ecx+28h]
fadd	[esp+18h+var_8]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+2Ch]
fadd	[esp+18h+var_4]
fstp	dword ptr [eax+8]
add	esp, 18h
retn	4
sub_41BA10 endp

align 10h



sub_41BAB0 proc	near
cmp	ecx, eax
jge	short locret_41BAB6
mov	eax, ecx

locret_41BAB6:
retn
sub_41BAB0 endp

align 10h



sub_41BAC0 proc	near
mov	ecx, [eax+20h]
mov	eax, [ecx+14h]
retn
sub_41BAC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_41BAD0(float)
sub_41BAD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
call	__CItan
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_41BAD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_41BAF0(float)
sub_41BAF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
call	__CIcos
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_41BAF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_41BB10(float)
sub_41BB10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
call	__CIsin
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_41BB10 endp

align 10h



sub_41BB30 proc	near
fld	dword ptr [eax+18h]
retn
sub_41BB30 endp

align 10h



sub_41BB40 proc	near

arg_0= dword ptr  4

mov	ecx, [eax+0Ch]
mov	[edx], ecx
mov	eax, [eax+10h]
mov	ecx, [esp+arg_0]
mov	[ecx], eax
retn	4
sub_41BB40 endp

align 10h



sub_41BB60 proc	near
mov	eax, [eax]
cmp	eax, ecx
jnz	short loc_41BB69
mov	al, 1
retn

loc_41BB69:
test	ecx, ecx
jz	short loc_41BBA8
test	eax, eax
jz	short loc_41BBA8

loc_41BB71:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_41BB99
test	dl, dl
jz	short loc_41BB8D
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_41BB99
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_41BB71

loc_41BB8D:
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setz	cl
mov	al, cl
retn

loc_41BB99:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
xor	ecx, ecx
test	eax, eax
setz	cl
mov	al, cl
retn

loc_41BBA8:
xor	al, al
retn
sub_41BB60 endp

align 10h


; Attributes: thunk

sub_41BBB0 proc	near
jmp	sub_41BB60
sub_41BBB0 endp

align 10h



sub_41BBC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
Src= dword ptr	4

mov	eax, [edi+2Ch]
sub	esp, 8
mov	byte ptr [edi+30h], 1
test	eax, eax
jz	short loc_41BBE2
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41BBE2:
mov	eax, esi
test	esi, esi
jnz	short loc_41BBED
mov	eax, 1

loc_41BBED:
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	0
push	0FFFFFFFFh
push	0
push	0
mov	[esp+18h+var_4], eax
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esp+8+Src]
push	esi		; MaxCount
push	ecx		; Src
push	esi		; DstSize
push	eax		; Dst
mov	[edi+2Ch], eax
call	_memcpy_s
add	esp, 18h
retn	4
sub_41BBC0 endp

align 10h



sub_41BC40 proc	near
cmp	byte ptr [edi+30h], 0
mov	dword ptr [edi], offset	off_15515F0
jz	short loc_41BC67
mov	eax, [edi+2Ch]
test	eax, eax
jz	short loc_41BC67
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41BC67:
mov	eax, [edi+20h]
push	ebx
mov	ebx, ds:InterlockedDecrement
push	ebp
push	esi
lea	esi, [edi+20h]
test	eax, eax
jz	short loc_41BC91
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41BC91
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41BC91:
mov	eax, [edi+8]
lea	esi, [edi+8]
test	eax, eax
jz	short loc_41BCB2
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41BCB2
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41BCB2:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	esi
pop	ebp
pop	ebx
retn
sub_41BC40 endp

align 10h



sub_41BCD0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_41BC40
test	[esp+4+arg_0], 1
jz	short loc_41BCF6
test	edi, edi
jz	short loc_41BCF6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	edi
call	eax

loc_41BCF6:
mov	eax, edi
pop	edi
retn	4
sub_41BCD0 endp

align 10h



sub_41BD00 proc	near
push	ebx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_15515F0
mov	[esi+8], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], bl
mov	[esi+31h], bl
mov	[esi+32h], bl
mov	eax, esi
pop	ebx
retn
sub_41BD00 endp

align 10h



sub_41BD50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11783B0
test	[esp+4+arg_0], 1
jz	short loc_41BD76
test	esi, esi
jz	short loc_41BD76
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_41BD76:
mov	eax, esi
pop	esi
retn	4
sub_41BD50 endp

align 10h



sub_41BD80 proc	near
mov	eax, offset off_17EE070
retn
sub_41BD80 endp

align 10h



sub_41BD90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx]
push	esi
mov	esi, eax
test	edx, edx
jnz	short loc_41BDA6
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_41BDA6:
push	ebp
push	edi
movzx	edi, word ptr [esi+0Ah]
xor	ecx, ecx
xor	eax, eax
cmp	cx, di
jnb	short loc_41BDD0
mov	ecx, [esi+4]
jmp	short loc_41BDC0
align 10h

loc_41BDC0:
movzx	ebp, ax
cmp	dword ptr [ecx+ebp*4], 0
jz	short loc_41BDF9
inc	eax
cmp	ax, [esi+0Ah]
jb	short loc_41BDC0

loc_41BDD0:
movzx	edx, word ptr [esi+8]
movzx	edi, di
cmp	edi, edx
jb	short loc_41BDE6
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_41BDE6:
push	esi
mov	edx, ebx
mov	ecx, edi
call	sub_410350
mov	eax, edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	4

loc_41BDF9:
movzx	eax, ax
pop	edi
pop	ebp
mov	[ecx+eax*4], edx
inc	word ptr [esi+0Ch]
pop	esi
pop	ebx
retn	4
sub_41BD90 endp

align 10h



sub_41BE10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_1551638
test	eax, eax
jz	short loc_41BE28
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_41BE28:
test	[esp+4+arg_0], 1
jz	short loc_41BE42
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_41BE42:
mov	eax, esi
pop	esi
retn	4
sub_41BE10 endp

align 10h



sub_41BE50 proc	near
push	ebx
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1551660
mov	edi, [esi+3Ch]
xor	ebx, ebx
cmp	edi, ebx
jz	short loc_41BE81
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41BE7E
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41BE7E:
mov	[esi+3Ch], ebx

loc_41BE81:
mov	edi, [esi+38h]
cmp	edi, ebx
jz	short loc_41BE9E
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41BE9B
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41BE9B:
mov	[esi+38h], ebx

loc_41BE9E:
mov	edi, [esi+3Ch]
cmp	edi, ebx
jz	short loc_41BEB8
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41BEB8
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41BEB8:
mov	edi, [esi+38h]
cmp	edi, ebx
jz	short loc_41BED2
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41BED2
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41BED2:
mov	eax, [esi+34h]
lea	edi, [esi+34h]
cmp	eax, ebx
jz	short loc_41BEF3
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41BEF3
push	edi
mov	eax, ebx
call	sub_1171F60

loc_41BEF3:
mov	eax, [esi+30h]
lea	edi, [esi+30h]
test	eax, eax
jz	short loc_41BF14
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41BF14
push	edi
mov	eax, ebx
call	sub_1171F60

loc_41BF14:
mov	ecx, [esi+24h]
mov	dword ptr [esi], offset	off_1551248
test	ecx, ecx
jz	short loc_41BF29
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_41BF29:
call	sub_41A8E0
pop	edi
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
jmp	sub_123E740
sub_41BE50 endp

align 10h



sub_41BF40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_41BE50
test	[esp+4+arg_0], 1
jz	short loc_41BF66
test	esi, esi
jz	short loc_41BF66
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_41BF66:
mov	eax, esi
pop	esi
retn	4
sub_41BF40 endp

align 10h



sub_41BF70 proc	near
mov	eax, offset off_17EE080
retn
sub_41BF70 endp

align 10h



sub_41BF80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1178000
test	[esp+4+arg_0], 1
jz	short loc_41BFA9
test	esi, esi
jz	short loc_41BFA9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	438h
push	3
push	esi
call	eax

loc_41BFA9:
mov	eax, esi
pop	esi
retn	4
sub_41BF80 endp

align 10h



sub_41BFB0 proc	near
push	esi
mov	esi, eax
mov	eax, dword_188A970
cmp	eax, esi
jz	short loc_41BFEF
test	eax, eax
jz	short loc_41BFDB
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41BFDA
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_41BFDA:
pop	edi

loc_41BFDB:
mov	dword_188A970, esi
test	esi, esi
jz	short loc_41BFEF
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_41BFEF:
mov	eax, offset dword_188A970
pop	esi
retn
sub_41BFB0 endp

align 10h



sub_41C000 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+4Ch]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41C03C
test	esi, esi
jz	short loc_41C02B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41C02B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41C02B:
mov	[ebx+4Ch], edi
test	edi, edi
jz	short loc_41C03C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41C03C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_41C000 endp

align 10h



sub_41C050 proc	near
mov	eax, [edx+4]
cmp	eax, [esi+4]
jnz	short loc_41C082
mov	cl, [edx]
cmp	cl, [esi]
jnz	short loc_41C082
mov	eax, [edx+8]
cmp	eax, [esi+8]
jnz	short loc_41C082
mov	cl, [edx+1]
cmp	cl, [esi+1]
jnz	short loc_41C082
mov	ecx, [edx+0Ch]
mov	eax, [esi+0Ch]
cmp	ecx, eax
jz	short loc_41C085
cmp	eax, 0FFFFFFFFh
jz	short loc_41C085
cmp	ecx, 0FFFFFFFFh
jz	short loc_41C085

loc_41C082:
xor	al, al
retn

loc_41C085:
push	ebp
push	edi
mov	ebp, edx
xor	edi, edi
lea	ecx, [edx+1Ch]
lea	eax, [esi+14h]
sub	ebp, esi

loc_41C093:
mov	edx, [eax+ebp]
cmp	edx, [eax]
jnz	short loc_41C0C2
mov	edx, [ecx-4]
cmp	edx, [eax+4]
jnz	short loc_41C0C2
mov	dl, [ecx]
cmp	dl, [eax+8]
jnz	short loc_41C0C2
mov	dl, [ecx+1]
cmp	dl, [eax+9]
jnz	short loc_41C0C2
inc	edi
add	ecx, 0Ch
add	eax, 0Ch
cmp	edi, 4
jl	short loc_41C093
pop	edi
mov	al, 1
pop	ebp
retn

loc_41C0C2:
pop	edi
xor	al, al
pop	ebp
retn
sub_41C050 endp

align 10h



sub_41C0D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_1177730
test	[esp+4+arg_0], 1
jz	short loc_41C0FA
test	esi, esi
jz	short loc_41C0FA
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	658h
push	3
push	esi
call	eax

loc_41C0FA:
mov	eax, esi
pop	esi
retn	4
sub_41C0D0 endp




sub_41C100 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_15C92DC
call	sub_41C620
test	[esp+4+arg_0], 1
mov	dword ptr [edi], offset	off_15CA734
jz	short loc_41C12E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_41C12E:
mov	eax, edi
pop	edi
retn	4
sub_41C100 endp

align 10h



sub_41C140 proc	near
lea	eax, [ecx+648h]
retn
sub_41C140 endp

align 10h



sub_41C150 proc	near
push	ebx
push	ebp
push	edi
mov	edi, eax
xor	edx, edx
call	sub_41A0B0
lea	ebx, [edi+1Ch]
mov	[esi], eax
xor	dl, dl
xor	eax, eax
mov	ecx, ebx
jmp	short loc_41C170
align 10h

loc_41C170:
cmp	dword ptr [ecx-8], 0
jz	loc_41C2A0
add	dl, [ecx]
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C170
xor	al, al

loc_41C187:
mov	[esi+10h], al
xor	eax, eax
lea	ecx, [edi+14h]
nop

loc_41C190:
cmp	dword ptr [ecx], 0
jz	loc_41C2BD
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C190
xor	al, al

loc_41C1A4:
mov	cl, 8
sub	cl, al
mov	ebp, 1
mov	edx, ebp
mov	[esi+14h], cl
call	sub_41A0B0
mov	[esi+4], eax
xor	dl, dl
xor	eax, eax
mov	ecx, ebx

loc_41C1C0:
cmp	[ecx-8], ebp
jz	loc_41C2C9
add	dl, [ecx]
add	eax, ebp
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C1C0
xor	al, al

loc_41C1D7:
mov	[esi+11h], al
xor	eax, eax
lea	ecx, [edi+14h]
nop

loc_41C1E0:
cmp	[ecx], ebp
jz	loc_41C2E6
add	eax, ebp
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C1E0
xor	al, al

loc_41C1F4:
mov	cl, 8
sub	cl, al
mov	ebp, 2
mov	edx, ebp
mov	[esi+15h], cl
call	sub_41A0B0
mov	[esi+8], eax
xor	dl, dl
xor	eax, eax
mov	ecx, ebx

loc_41C210:
cmp	[ecx-8], ebp
jz	loc_41C2F2
add	dl, [ecx]
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C210
xor	al, al

loc_41C226:
mov	[esi+12h], al
xor	eax, eax
lea	ecx, [edi+14h]
mov	edi, edi

loc_41C230:
cmp	[ecx], ebp
jz	loc_41C30F
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C230
xor	al, al

loc_41C243:
mov	cl, 8
sub	cl, al
mov	ebp, 3
mov	edx, ebp
mov	[esi+16h], cl
call	sub_41A0B0
mov	[esi+0Ch], eax
xor	dl, dl
xor	eax, eax
mov	ecx, ebx
nop

loc_41C260:
cmp	[ecx-8], ebp
jz	loc_41C31B
add	dl, [ecx]
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C260
xor	al, al

loc_41C276:
mov	[esi+13h], al
xor	eax, eax
lea	ecx, [edi+14h]
mov	edi, edi

loc_41C280:
cmp	[ecx], ebp
jz	loc_41C338
inc	eax
add	ecx, 0Ch
cmp	eax, 4
jb	short loc_41C280
xor	al, al
pop	edi
mov	cl, 8
sub	cl, al
pop	ebp
mov	[esi+17h], cl
mov	eax, esi
pop	ebx
retn

loc_41C2A0:
test	byte ptr [edi],	1
jnz	short loc_41C2B6
lea	ecx, [eax+eax*2]
mov	al, [edi+1]
sub	al, [edi+ecx*4+1Ch]
sub	al, dl
jmp	loc_41C187

loc_41C2B6:
mov	al, dl
jmp	loc_41C187

loc_41C2BD:
lea	edx, [eax+eax*2]
mov	al, [edi+edx*4+1Ch]
jmp	loc_41C1A4

loc_41C2C9:
test	byte ptr [edi],	1
jnz	short loc_41C2DF
lea	ecx, [eax+eax*2]
mov	al, [edi+1]
sub	al, [edi+ecx*4+1Ch]
sub	al, dl
jmp	loc_41C1D7

loc_41C2DF:
mov	al, dl
jmp	loc_41C1D7

loc_41C2E6:
lea	edx, [eax+eax*2]
mov	al, [edi+edx*4+1Ch]
jmp	loc_41C1F4

loc_41C2F2:
test	byte ptr [edi],	1
jnz	short loc_41C308
lea	ecx, [eax+eax*2]
mov	al, [edi+1]
sub	al, [edi+ecx*4+1Ch]
sub	al, dl
jmp	loc_41C226

loc_41C308:
mov	al, dl
jmp	loc_41C226

loc_41C30F:
lea	edx, [eax+eax*2]
mov	al, [edi+edx*4+1Ch]
jmp	loc_41C243

loc_41C31B:
test	byte ptr [edi],	1
jnz	short loc_41C331
lea	ecx, [eax+eax*2]
mov	al, [edi+1]
sub	al, [edi+ecx*4+1Ch]
sub	al, dl
jmp	loc_41C276

loc_41C331:
mov	al, dl
jmp	loc_41C276

loc_41C338:
lea	edx, [eax+eax*2]
mov	al, [edi+edx*4+1Ch]
pop	edi
mov	cl, 8
sub	cl, al
pop	ebp
mov	[esi+17h], cl
mov	eax, esi
pop	ebx
retn
sub_41C150 endp

align 10h



sub_41C350 proc	near
mov	edx, 1
xor	eax, eax
mov	[ecx+0Eh], dx
xor	edx, edx
mov	[ecx+8], ax
mov	[ecx+0Ah], ax
mov	[ecx+0Ch], dx
mov	[ecx+4], eax
mov	dword ptr [ecx], offset	off_1554C5C
retn
sub_41C350 endp

align 10h



sub_41C380 proc	near
push	esi
mov	esi, eax
push	edi
add	esi, 2010h
push	esi		; lpCriticalSection
call	ds:DeleteCriticalSection
mov	edi, 200h
jmp	short loc_41C3A0
align 10h

loc_41C3A0:
mov	eax, [esi-0Ch]
sub	esi, 10h
mov	dword ptr [esi], offset	off_1554C5C
test	eax, eax
jz	short loc_41C3C4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41C3C4:
sub	edi, 1
jns	short loc_41C3A0
pop	edi
pop	esi
retn
sub_41C380 endp

align 10h



sub_41C3D0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx]
test	edx, edx
jnz	short loc_41C3E2
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_41C3E2:
push	ebp
push	edi
movzx	edi, word ptr [esi+0Ah]
xor	ecx, ecx
xor	eax, eax
cmp	cx, di
jnb	short loc_41C404
mov	ecx, [esi+4]

loc_41C3F4:
movzx	ebp, ax
cmp	dword ptr [ecx+ebp*4], 0
jz	short loc_41C42E
inc	eax
cmp	ax, [esi+0Ah]
jb	short loc_41C3F4

loc_41C404:
movzx	edx, word ptr [esi+8]
movzx	edi, di
cmp	edi, edx
jb	short loc_41C41D
movzx	eax, word ptr [esi+0Eh]
add	eax, edi
push	eax
mov	ecx, esi
call	sub_40FAC0

loc_41C41D:
push	ebx
push	edi
mov	ecx, esi
call	sub_40FBD0
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn	4

loc_41C42E:
movzx	eax, ax
pop	edi
pop	ebp
mov	[ecx+eax*4], edx
inc	word ptr [esi+0Ch]
pop	ebx
retn	4
sub_41C3D0 endp

align 10h



sub_41C440 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_41C510
test	[esp+4+arg_0], 1
jz	short loc_41C467
test	esi, esi
jz	short loc_41C467
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_41C467:
mov	eax, esi
pop	esi
retn	4
sub_41C440 endp

align 10h



sub_41C470 proc	near
mov	eax, offset off_17EF808
retn
sub_41C470 endp

align 10h



sub_41C480 proc	near
push	ebx
mov	ebx, ds:InterlockedIncrement
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	dword ptr [esi+4], 0
call	ebx ; InterlockedIncrement
mov	dword ptr [esi], offset	off_1551738
mov	eax, 10h
push	40h
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
mov	[esi+14h], eax
mov	[esi+10h], eax
call	sub_1227DA0
mov	ecx, [esi+0Ch]
add	esp, 4
mov	[esi+8], eax
test	ecx, ecx
jz	short loc_41C4DF
add	ecx, ecx
add	ecx, ecx
push	ecx		; MaxCount
push	0		; Src
push	ecx		; DstSize
push	eax		; Dst
call	_memcpy_s
add	esp, 10h

loc_41C4DF:
mov	dword ptr [esi+18h], 0FFFFFFFFh
mov	eax, dword_188AAE4
test	eax, eax
jz	short loc_41C4FA
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedIncrement
mov	eax, dword_188AAE4

loc_41C4FA:
mov	[esi+1Ch], eax
mov	eax, esi
pop	ebx
retn
sub_41C480 endp

align 10h



sub_41C510 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+1Ch]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
lea	esi, [ebx+1Ch]
test	eax, eax
jz	short loc_41C540
push	edi
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41C53F
push	esi
mov	eax, edi
call	sub_1171F60

loc_41C53F:
pop	edi

loc_41C540:
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_41C55B
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41C55B:		; lpAddend
push	offset Addend
mov	dword ptr [ebx], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
pop	ebx
retn	4
sub_41C510 endp

align 10h



sub_41C570 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_41C5A0
test	[esp+4+arg_0], 1
jz	short loc_41C597
test	esi, esi
jz	short loc_41C597
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_41C597:
mov	eax, esi
pop	esi
retn	4
sub_41C570 endp

align 10h



sub_41C5A0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
lea	edi, [ebx+28h]
mov	dword ptr [edi], offset	off_15507C4
call	sub_41C620
mov	dword ptr [edi], offset	off_15CA734
mov	esi, [ebx+24h]
mov	edi, ds:InterlockedDecrement
test	esi, esi
jz	short loc_41C5DB
lea	eax, [esi+4]
push	eax		; lpAddend
call	edi ; InterlockedDecrement
test	eax, eax
jnz	short loc_41C5DB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41C5DB:
mov	esi, [ebx+20h]
test	esi, esi
jz	short loc_41C5F5
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	edi ; InterlockedDecrement
test	eax, eax
jnz	short loc_41C5F5
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41C5F5:
push	ebx
call	sub_41C510
pop	edi
pop	esi
pop	ebx
retn	4
sub_41C5A0 endp

align 10h



sub_41C610 proc	near
mov	eax, offset off_17EF800
retn
sub_41C610 endp

align 10h



sub_41C620 proc	near
push	esi
mov	esi, [edi+4]
test	esi, esi
jz	short loc_41C63A

loc_41C628:
mov	edx, [edi]
mov	eax, esi
mov	esi, [esi]
push	eax
mov	eax, [edx+8]
mov	ecx, edi
call	eax
test	esi, esi
jnz	short loc_41C628

loc_41C63A:
mov	dword ptr [edi+0Ch], 0
mov	dword ptr [edi+4], 0
mov	dword ptr [edi+8], 0
pop	esi
retn
sub_41C620 endp

align 10h



sub_41C660 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	edi, eax
call	sub_41C480
mov	ebp, ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_155174C
mov	[esi+20h], edi
test	edi, edi
jz	short loc_41C68A
add	edi, 4
push	edi		; lpAddend
call	ebp ; InterlockedIncrement

loc_41C68A:
mov	[esi+24h], ebx
test	ebx, ebx
jz	short loc_41C697
add	ebx, 4
push	ebx		; lpAddend
call	ebp ; InterlockedIncrement

loc_41C697:
xor	eax, eax
mov	[esi+34h], eax
mov	[esi+2Ch], eax
mov	[esi+30h], eax
pop	edi
mov	dword ptr [esi+28h], offset off_15507C4
mov	byte ptr [esi+38h], 1
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_41C660 endp

align 10h



sub_41C6C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	[esp+4+var_4], esi
test	esi, esi
jz	short loc_41C6D2
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41C6D2:
push	edi
mov	edi, [esp+8+arg_0]
lea	ecx, [esp+8+var_4]
push	ecx
add	edi, 4Ch
call	sub_4296B0
pop	edi
test	esi, esi
jz	short loc_41C700
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41C700
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_41C700:
pop	ecx
retn	4
sub_41C6C0 endp

align 10h



sub_41C710 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+0Ch]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_41C74C
test	esi, esi
jz	short loc_41C73B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41C73B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41C73B:
mov	[ebx+0Ch], edi
test	edi, edi
jz	short loc_41C74C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_41C74C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_41C710 endp

align 10h



sub_41C760 proc	near
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, 7
mov	[ecx+34h], eax
retn
sub_41C760 endp

align 10h



sub_41C770 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_41C900
test	[esp+4+arg_0], 1
jz	short loc_41C796
test	edi, edi
jz	short loc_41C796
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4Ch
push	3
push	edi
call	eax

loc_41C796:
mov	eax, edi
pop	edi
retn	4
sub_41C770 endp

align 10h



sub_41C7A0 proc	near
mov	eax, offset off_17EF7F8
retn
sub_41C7A0 endp

align 10h



sub_41C7B0 proc	near
push	ebx
mov	ebx, ds:InterlockedIncrement
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ebx ; InterlockedIncrement
fldz
mov	dword ptr [esi], offset	off_1551760
mov	[esi+0Ch], edi
mov	[esi+10h], edi
fst	dword ptr [esi+14h]
fld1
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+1Ch]
fst	dword ptr [esi+20h]
mov	[esi+24h], edi
mov	[esi+28h], edi
mov	[esi+2Ch], edi
mov	[esi+30h], edi
mov	[esi+34h], edi
fst	dword ptr [esi+38h]
fst	dword ptr [esi+3Ch]
fst	dword ptr [esi+40h]
fstp	dword ptr [esi+44h]
mov	eax, dword_188AAE0
cmp	eax, edi
jz	short loc_41C815
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedIncrement
mov	eax, dword_188AAE0

loc_41C815:
mov	[esi+48h], eax
mov	ax, [esi+8]
mov	ecx, 0FFFBh
and	ax, cx
or	ax, 3
pop	edi
mov	[esi+8], ax
mov	eax, esi
pop	ebx
retn
sub_41C7B0 endp

align 10h



sub_41C840 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_41C990
test	[esp+4+arg_0], 1
jz	short loc_41C86A
test	esi, esi
jz	short loc_41C86A
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	80h
push	3
push	esi
call	eax

loc_41C86A:
mov	eax, esi
pop	esi
retn	4
sub_41C840 endp




sub_41C870 proc	near
mov	eax, offset off_17EF7F0
retn
sub_41C870 endp

align 10h



sub_41C880 proc	near

arg_0= dword ptr  4

xor	ecx, ecx
mov	[esi], ecx
mov	[esi+4], ecx
mov	[esi+8], ecx
mov	[esi+0Ch], eax
cmp	eax, ecx
jnz	short loc_41C898
mov	dword ptr [esi+0Ch], 1

loc_41C898:
mov	eax, [esp+arg_0]
mov	ecx, esi
call	sub_12398C0
mov	eax, esi
retn	4
sub_41C880 endp

align 10h



sub_41C8B0 proc	near
push	esi
mov	esi, eax
call	sub_41C7B0
fldz
xor	eax, eax
mov	dword ptr [esi], offset	off_155177C
mov	[esi+58h], eax
mov	[esi+50h], eax
mov	[esi+54h], eax
mov	dword ptr [esi+4Ch], offset off_15507C4
mov	[esi+5Ch], eax
mov	[esi+60h], eax
mov	[esi+64h], eax
mov	[esi+68h], eax
mov	[esi+6Ch], eax
mov	dword ptr [esi+70h], 4
fst	dword ptr [esi+78h]
mov	[esi+74h], eax
fstp	dword ptr [esi+7Ch]
mov	eax, esi
pop	esi
retn
sub_41C8B0 endp

align 10h



sub_41C900 proc	near
mov	eax, [edi+48h]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
lea	esi, [edi+48h]
test	eax, eax
jz	short loc_41C92B
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41C92A
push	esi
mov	eax, ebx
call	sub_1171F60

loc_41C92A:
pop	ebx

loc_41C92B:
mov	esi, [edi+10h]
test	esi, esi
jz	short loc_41C945
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41C945
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41C945:
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_41C95F
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41C95F
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41C95F:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
retn
sub_41C900 endp

align 10h



sub_41C970 proc	near
mov	eax, [eax]
test	eax, eax
jz	short locret_41C98A
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_41C98A:
retn
sub_41C970 endp

align 10h



sub_41C990 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+64h]
push	esi
push	edi
test	eax, eax
jz	short loc_41C9B2
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41C9B2:
mov	esi, [ebx+5Ch]
test	esi, esi
jz	short loc_41C9D0
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41C9D0
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41C9D0:
lea	edi, [ebx+4Ch]
mov	dword ptr [edi], offset	off_15507C4
call	sub_41C620
mov	dword ptr [edi], offset	off_15CA734
mov	edi, ebx
call	sub_41C900
pop	edi
pop	esi
pop	ebx
retn	4
sub_41C990 endp

align 10h



sub_41CA00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
mov	dword ptr [esi], offset	off_1551798
call	sub_41C990
test	[esp+4+arg_0], 1
jz	short loc_41CA2C
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	88h
push	3
push	esi
call	eax

loc_41CA2C:
mov	eax, esi
pop	esi
retn	4
sub_41CA00 endp

align 10h



sub_41CA40 proc	near
mov	eax, offset off_17EF7E8
retn
sub_41CA40 endp

align 10h



sub_41CA50 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_41CA5F
or	word ptr [eax+8], 2
retn	4

loc_41CA5F:
mov	ecx, 0FFFDh
and	[eax+8], cx
retn	4
sub_41CA50 endp

align 10h



sub_41CA70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
mov	eax, esi
call	sub_41C8B0
fld1
fst	[esp+10h+var_10]
mov	dword ptr [esi], offset	off_1551798
mov	eax, [esp+10h+var_10]
fst	[esp+10h+var_C]
mov	ecx, [esp+10h+var_C]
fst	[esp+10h+var_8]
mov	edx, [esp+10h+var_8]
fstp	[esp+10h+var_4]
mov	[esi+38h], eax
mov	eax, [esp+10h+var_4]
mov	[esi+3Ch], ecx
mov	[esi+40h], edx
mov	ecx, 0FFFDh
and	[esi+8], cx
mov	[esi+44h], eax
mov	dword ptr [esi+80h], 0
mov	byte ptr [esi+84h], 10h
mov	eax, esi
add	esp, 10h
retn
sub_41CA70 endp

align 10h



sub_41CAD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1171CB0
test	[esp+4+arg_0], 1
jz	short loc_41CAF9
test	esi, esi
jz	short loc_41CAF9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40Ch
push	3
push	esi
call	eax

loc_41CAF9:
mov	eax, esi
pop	esi
retn	4
sub_41CAD0 endp

align 10h



sub_41CB00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

movzx	eax, word ptr [esi+8]
sub	esp, 8
cmp	edx, eax
jz	loc_41CBFD
movzx	eax, word ptr [esi+0Ah]
movzx	ecx, ax
push	edi
cmp	edx, ecx
jnb	short loc_41CB4C
movzx	ecx, dx
cmp	dx, ax
jnb	short loc_41CB48

loc_41CB23:
mov	edi, [esi+4]
movzx	eax, cx
cmp	dword ptr [edi+eax*4], 0
lea	eax, [edi+eax*4]
jz	short loc_41CB41
mov	dword ptr [eax], 0
mov	eax, 0FFFFh
add	[esi+0Ch], ax

loc_41CB41:
inc	ecx
cmp	cx, [esi+0Ah]
jb	short loc_41CB23

loc_41CB48:
mov	[esi+0Ah], dx

loc_41CB4C:
mov	edi, [esi+4]
mov	[esi+8], dx
test	edx, edx
jbe	loc_41CBDE
movzx	eax, dx
add	eax, eax
add	eax, eax
jnz	short loc_41CB69
mov	eax, 1

loc_41CB69:
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	0
push	0FFFFFFFFh
push	0
push	0
mov	[esp+1Ch+var_4], eax
push	5
lea	eax, [esp+20h+var_8]
push	eax
mov	[esp+24h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+24h+var_4]
push	eax
call	edx
mov	[esi+4], eax
xor	eax, eax
xor	ecx, ecx
cmp	ax, [esi+0Ah]
jnb	short loc_41CBBE
push	ebx

loc_41CBA6:
mov	edx, [esi+4]
movzx	eax, cx
add	eax, eax
add	eax, eax
mov	ebx, [eax+edi]
inc	ecx
mov	[eax+edx], ebx
cmp	cx, [esi+0Ah]
jb	short loc_41CBA6
pop	ebx

loc_41CBBE:
movzx	eax, word ptr [esi+0Ah]
cmp	ax, [esi+8]
jnb	short loc_41CBE5

loc_41CBC8:
mov	edx, [esi+4]
movzx	ecx, ax
inc	eax
mov	dword ptr [edx+ecx*4], 0
cmp	ax, [esi+8]
jb	short loc_41CBC8
jmp	short loc_41CBE5

loc_41CBDE:
mov	dword ptr [esi+4], 0

loc_41CBE5:
test	edi, edi
jz	short loc_41CBFC
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	edi
call	eax

loc_41CBFC:
pop	edi

loc_41CBFD:
add	esp, 8
retn
sub_41CB00 endp

align 10h



sub_41CC10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	ecx, [esp+4+arg_0]
push	esi
mov	esi, eax
cmp	ecx, [esi+8]
jz	loc_41CDA5
push	ebx
push	ebp
push	edi
cmp	ecx, [esi+0Ch]
jnb	short loc_41CC75
mov	edi, ecx
jmp	short loc_41CC30
align 10h

loc_41CC30:
mov	eax, [esi+4]
cmp	dword ptr [eax+edi*4], 0
lea	ebx, [eax+edi*4]
setnz	al
test	al, al
jz	short loc_41CC6C
mov	ebp, [ebx]
test	ebp, ebp
jz	short loc_41CC69
lea	ecx, [ebp+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41CC5F
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax

loc_41CC5F:
mov	ecx, [esp+14h+arg_0]
mov	dword ptr [ebx], 0

loc_41CC69:
dec	dword ptr [esi+10h]

loc_41CC6C:
inc	edi
cmp	edi, [esi+0Ch]
jb	short loc_41CC30
mov	[esi+0Ch], ecx

loc_41CC75:
mov	ebp, [esi+4]
mov	[esp+14h+arg_0], ebp
mov	[esi+8], ecx
test	ecx, ecx
jbe	loc_41CD3C
mov	edi, ecx
call	sub_5FB570
mov	[esi+4], eax
xor	eax, eax
mov	[esp+14h+var_4], eax
cmp	[esi+0Ch], eax
jbe	short loc_41CCFD
lea	esp, [esp+0]

loc_41CCA0:
mov	edi, [esi+4]
mov	ecx, [esp+14h+arg_0]
lea	ebx, ds:0[eax*4]
mov	ebp, [edi+ebx]
add	edi, ebx
cmp	ebp, [ebx+ecx]
jz	short loc_41CCEB
test	ebp, ebp
jz	short loc_41CCD4
lea	edx, [ebp+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41CCD4
mov	eax, [ebp+0]
mov	edx, [eax+4]
mov	ecx, ebp
call	edx

loc_41CCD4:
mov	eax, [esp+14h+arg_0]
mov	ebx, [ebx+eax]
mov	[edi], ebx
test	ebx, ebx
jz	short loc_41CCEB
add	ebx, 4
push	ebx		; lpAddend
call	ds:InterlockedIncrement

loc_41CCEB:
mov	eax, [esp+14h+var_4]
inc	eax
mov	[esp+14h+var_4], eax
cmp	eax, [esi+0Ch]
jb	short loc_41CCA0
mov	ebp, [esp+14h+arg_0]

loc_41CCFD:
mov	ebx, [esi+0Ch]
cmp	ebx, [esi+8]
jnb	short loc_41CD43

loc_41CD05:
mov	ecx, [esi+4]
mov	edi, [ecx+ebx*4]
lea	ebp, [ecx+ebx*4]
test	edi, edi
jz	short loc_41CD30
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41CD29
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_41CD29:
mov	dword ptr [ebp+0], 0

loc_41CD30:
inc	ebx
cmp	ebx, [esi+8]
jb	short loc_41CD05
mov	ebp, [esp+14h+arg_0]
jmp	short loc_41CD43

loc_41CD3C:
mov	dword ptr [esi+4], 0

loc_41CD43:
test	ebp, ebp
jz	short loc_41CDA2
mov	ebx, [ebp-4]
lea	eax, [ebp-4]
lea	edi, [ebp+ebx*4+0]
sub	ebx, 1
mov	[esp+14h+arg_0], eax
js	short loc_41CD8A
lea	ebx, [ebx+0]

loc_41CD60:
mov	esi, [edi-4]
sub	edi, 4
test	esi, esi
jz	short loc_41CD81
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41CD81
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41CD81:
sub	ebx, 1
jns	short loc_41CD60
mov	eax, [esp+14h+arg_0]

loc_41CD8A:
test	eax, eax
jz	short loc_41CDA2
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_41CDA2:
pop	edi
pop	ebp
pop	ebx

loc_41CDA5:
pop	esi
pop	ecx
retn	4
sub_41CC10 endp

align 10h



sub_41CDB0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
cmp	ecx, [eax+0Ch]
jb	short loc_41CDD2
lea	edx, [ecx+1]
mov	[eax+0Ch], edx
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
jz	short loc_41CDFE
inc	dword ptr [eax+10h]
jmp	short loc_41CDFE

loc_41CDD2:
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
mov	edx, [eax+4]
jz	short loc_41CDF0
cmp	dword ptr [edx+ecx*4], 0
setz	dl
test	dl, dl
jz	short loc_41CDFE
inc	dword ptr [eax+10h]
jmp	short loc_41CDFE

loc_41CDF0:
cmp	dword ptr [edx+ecx*4], 0
setnz	dl
test	dl, dl
jz	short loc_41CDFE
dec	dword ptr [eax+10h]

loc_41CDFE:
mov	eax, [eax+4]
mov	esi, [eax+ecx*4]
lea	edi, [eax+ecx*4]
cmp	esi, [ebp+0]
jz	short loc_41CE40
test	esi, esi
jz	short loc_41CE27
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41CE27
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41CE27:
mov	eax, [ebp+0]
mov	[edi], eax
test	eax, eax
jz	short loc_41CE40
pop	edi
pop	esi
add	eax, 4
pop	ebp
mov	[esp+arg_0], eax
jmp	ds:InterlockedIncrement

loc_41CE40:
pop	edi
pop	esi
pop	ebp
retn	4
sub_41CDB0 endp

align 10h



sub_41CE50 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
xor	eax, eax
xor	ebp, ebp
cmp	[ebx+0Ch], eax
jbe	short loc_41CE95
push	esi
push	edi

loc_41CE61:
mov	ecx, [ebx+4]
mov	esi, [ecx+ebp*4]
lea	edi, [ecx+ebp*4]
cmp	esi, eax
jz	short loc_41CE8D
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41CE85
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_41CE85:
mov	dword ptr [edi], 0
xor	eax, eax

loc_41CE8D:
inc	ebp
cmp	ebp, [ebx+0Ch]
jb	short loc_41CE61
pop	edi
pop	esi

loc_41CE95:
pop	ebp
mov	[ebx+10h], eax
mov	[ebx+0Ch], eax
pop	ebx
retn	4
sub_41CE50 endp




sub_41CEA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
cmp	edx, [esi+8]
jz	loc_41CF72
cmp	edx, [esi+0Ch]
jnb	short loc_41CED1
mov	ecx, edx

loc_41CEB3:
mov	eax, [esi+4]
cmp	dword ptr [eax+ecx*4], 0
lea	eax, [eax+ecx*4]
jz	short loc_41CEC8
mov	dword ptr [eax], 0
dec	dword ptr [esi+10h]

loc_41CEC8:
inc	ecx
cmp	ecx, [esi+0Ch]
jb	short loc_41CEB3
mov	[esi+0Ch], edx

loc_41CED1:
push	edi
mov	edi, [esi+4]
mov	[esi+8], edx
test	edx, edx
jbe	short loc_41CF52
lea	eax, ds:0[edx*4]
test	eax, eax
jnz	short loc_41CEEC
mov	eax, 1

loc_41CEEC:
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	0
push	0FFFFFFFFh
push	0
push	0
mov	[esp+1Ch+var_4], eax
push	5
lea	eax, [esp+20h+var_8]
push	eax
mov	[esp+24h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+24h+var_4]
push	eax
call	edx
mov	[esi+4], eax
xor	eax, eax
cmp	[esi+0Ch], eax
jbe	short loc_41CF34

loc_41CF25:
mov	edx, [edi+eax*4]
mov	ecx, [esi+4]
mov	[ecx+eax*4], edx
inc	eax
cmp	eax, [esi+0Ch]
jb	short loc_41CF25

loc_41CF34:
mov	eax, [esi+0Ch]
cmp	eax, [esi+8]
jnb	short loc_41CF59
lea	esp, [esp+0]

loc_41CF40:
mov	ecx, [esi+4]
mov	dword ptr [ecx+eax*4], 0
inc	eax
cmp	eax, [esi+8]
jb	short loc_41CF40
jmp	short loc_41CF59

loc_41CF52:
mov	dword ptr [esi+4], 0

loc_41CF59:
test	edi, edi
jz	short loc_41CF71
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	9
push	edi
call	edx

loc_41CF71:
pop	edi

loc_41CF72:
add	esp, 8
retn
sub_41CEA0 endp

align 10h



sub_41CF80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
cmp	ecx, [ebx+8]
jz	loc_41D10C
push	ebp
push	esi
push	edi
cmp	ecx, [ebx+0Ch]
jnb	short loc_41CFE8
mov	edi, ecx
lea	esp, [esp+0]

loc_41CFA0:
mov	eax, [ebx+4]
cmp	dword ptr [eax+edi*4], 0
lea	esi, [eax+edi*4]
setnz	al
test	al, al
jz	short loc_41CFDF
mov	eax, [esi]
test	eax, eax
jz	short loc_41CFDC
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41CFD2
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41CFD2:
mov	ecx, [esp+10h+arg_4]
mov	dword ptr [esi], 0

loc_41CFDC:
dec	dword ptr [ebx+10h]

loc_41CFDF:
inc	edi
cmp	edi, [ebx+0Ch]
jb	short loc_41CFA0
mov	[ebx+0Ch], ecx

loc_41CFE8:
mov	ebp, [ebx+4]
mov	[esp+10h+arg_4], ebp
mov	[ebx+8], ecx
test	ecx, ecx
jbe	loc_41D0AA
mov	edi, ecx
call	sub_41A000
xor	ecx, ecx
mov	[ebx+4], eax
mov	[esp+10h+arg_0], ecx
cmp	[ebx+0Ch], ecx
jbe	short loc_41D066
nop

loc_41D010:
mov	esi, [ebx+4]
lea	eax, ds:0[ecx*4]
mov	edi, [eax+ebp]
add	esi, eax
cmp	[esi], edi
jz	short loc_41D05C
test	edi, edi
jz	short loc_41D031
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41D031:
mov	eax, [esi]
test	eax, eax
jz	short loc_41D052
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41D052
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41D052:
mov	ecx, [esp+10h+arg_0]
mov	ebp, [esp+10h+arg_4]
mov	[esi], edi

loc_41D05C:
inc	ecx
mov	[esp+10h+arg_0], ecx
cmp	ecx, [ebx+0Ch]
jb	short loc_41D010

loc_41D066:
mov	edi, [ebx+0Ch]
cmp	edi, [ebx+8]
jnb	short loc_41D0B1
mov	edi, edi

loc_41D070:
mov	edx, [ebx+4]
mov	eax, [edx+edi*4]
lea	esi, [edx+edi*4]
test	eax, eax
jz	short loc_41D09E
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41D098
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41D098:
mov	dword ptr [esi], 0

loc_41D09E:
inc	edi
cmp	edi, [ebx+8]
jb	short loc_41D070
mov	ebp, [esp+10h+arg_4]
jmp	short loc_41D0B1

loc_41D0AA:
mov	dword ptr [ebx+4], 0

loc_41D0B1:
test	ebp, ebp
jz	short loc_41D109
mov	ebx, [ebp-4]
mov	eax, [esp+10h+arg_4]
add	ebp, 0FFFFFFFCh
lea	esi, [eax+ebx*4]
sub	ebx, 1
js	short loc_41D0F1

loc_41D0C7:
mov	eax, [esi-4]
sub	esi, 4
test	eax, eax
jz	short loc_41D0EC
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41D0EC
push	esi
mov	eax, edi
call	sub_1171F60

loc_41D0EC:
sub	ebx, 1
jns	short loc_41D0C7

loc_41D0F1:
test	ebp, ebp
jz	short loc_41D109
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	ebp
call	eax

loc_41D109:
pop	edi
pop	esi
pop	ebp

loc_41D10C:
pop	ebx
retn	8
sub_41CF80 endp




sub_41D110 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
cmp	ecx, [eax+0Ch]
jb	short loc_41D130
lea	edx, [ecx+1]
mov	[eax+0Ch], edx
cmp	dword ptr [edi], 0
setnz	dl
test	dl, dl
jz	short loc_41D15B
inc	dword ptr [eax+10h]
jmp	short loc_41D15B

loc_41D130:
cmp	dword ptr [edi], 0
setnz	dl
test	dl, dl
mov	edx, [eax+4]
jz	short loc_41D14D
cmp	dword ptr [edx+ecx*4], 0
setz	dl
test	dl, dl
jz	short loc_41D15B
inc	dword ptr [eax+10h]
jmp	short loc_41D15B

loc_41D14D:
cmp	dword ptr [edx+ecx*4], 0
setnz	dl
test	dl, dl
jz	short loc_41D15B
dec	dword ptr [eax+10h]

loc_41D15B:
mov	eax, [eax+4]
mov	edi, [edi]
cmp	[eax+ecx*4], edi
lea	esi, [eax+ecx*4]
jz	short loc_41D19B
test	edi, edi
jz	short loc_41D176
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41D176:
mov	eax, [esi]
test	eax, eax
jz	short loc_41D199
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41D198
push	esi
mov	eax, ebx
call	sub_1171F60

loc_41D198:
pop	ebx

loc_41D199:
mov	[esi], edi

loc_41D19B:
pop	edi
pop	esi
retn	4
sub_41D110 endp




sub_41D1A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
push	ebp
mov	ebp, [eax]
test	ebp, ebp
setz	al
mov	[esp+8+var_4], ebp
test	al, al
jz	short loc_41D1BF
mov	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	4

loc_41D1BF:
push	ebx
mov	ebx, [esi+0Ch]
push	edi
xor	edi, edi
test	ebx, ebx
jbe	short loc_41D1E2
mov	edx, [esi+4]
mov	eax, edx
nop

loc_41D1D0:
cmp	dword ptr [eax], 0
setz	cl
test	cl, cl
jnz	short loc_41D20A
inc	edi
add	eax, 4
cmp	edi, ebx
jb	short loc_41D1D0

loc_41D1E2:
cmp	ebx, [esi+8]
jb	short loc_41D1F3
mov	edx, [esi+14h]
add	edx, ebx
push	edx
push	esi
call	sub_41CF80

loc_41D1F3:
mov	eax, [esp+10h+arg_0]
push	eax
mov	ecx, ebx
mov	eax, esi
call	sub_41D110
pop	edi
mov	eax, ebx
pop	ebx
pop	ebp
pop	ecx
retn	4

loc_41D20A:
cmp	[edx+edi*4], ebp
lea	ebx, [edx+edi*4]
jz	short loc_41D247
test	ebp, ebp
jz	short loc_41D220
lea	ecx, [ebp-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41D220:
mov	eax, [ebx]
test	eax, eax
jz	short loc_41D245
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41D241
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_41D241:
mov	ebp, [esp+10h+var_4]

loc_41D245:
mov	[ebx], ebp

loc_41D247:
inc	dword ptr [esi+10h]
mov	eax, edi
pop	edi
pop	ebx
pop	ebp
pop	ecx
retn	4
sub_41D1A0 endp

align 10h



sub_41D260 proc	near
push	ebx
xor	ecx, ecx
xor	ebx, ebx
cmp	[edi+0Ch], ecx
jbe	short loc_41D2A7
push	ebp
push	esi
lea	esp, [esp+0]

loc_41D270:
mov	eax, [edi+4]
lea	esi, [eax+ebx*4]
mov	eax, [esi]
cmp	eax, ecx
jz	short loc_41D29F
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41D297
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41D297:
mov	dword ptr [esi], 0
xor	ecx, ecx

loc_41D29F:
inc	ebx
cmp	ebx, [edi+0Ch]
jb	short loc_41D270
pop	esi
pop	ebp

loc_41D2A7:
mov	[edi+10h], ecx
mov	[edi+0Ch], ecx
pop	ebx
retn
sub_41D260 endp

align 10h



sub_41D2B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, dword_18893F8
mov	eax, [edi+4]
push	eax
mov	edx, ebx
call	sub_411670
mov	ecx, [edi+8]
mov	ebp, eax
mov	esi, [ecx+ebp*4]
add	esp, 4
test	esi, esi
jz	short loc_41D30F

loc_41D2D8:
mov	ecx, [esi+4]
mov	eax, ebx
lea	ecx, [ecx+0]

loc_41D2E0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_41D300
test	dl, dl
jz	short loc_41D2FC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_41D300
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_41D2E0

loc_41D2FC:
xor	eax, eax
jmp	short loc_41D305

loc_41D300:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_41D305:
test	eax, eax
jz	short loc_41D342
mov	esi, [esi]
test	esi, esi
jnz	short loc_41D2D8

loc_41D30F:
mov	eax, [edi]
mov	edx, [eax+0Ch]
mov	ecx, edi
call	edx
mov	ecx, [esp+10h+arg_4]
push	ecx
mov	esi, eax
mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
push	esi
mov	ecx, edi
call	edx
mov	eax, [edi+8]
mov	ecx, [eax+ebp*4]
mov	[esi], ecx
mov	edx, [edi+8]
mov	[edx+ebp*4], esi
inc	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_41D342:
mov	edx, [esp+10h+arg_4]
pop	edi
mov	[esi+8], edx
pop	esi
pop	ebp
pop	ebx
retn	8
sub_41D2B0 endp




sub_41D350 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, dword_18893F8
mov	eax, [edi+4]
push	eax
mov	edx, ebp
call	sub_411670
mov	ecx, [edi+8]
mov	esi, [ecx+eax*4]
lea	ebx, [ecx+eax*4]
add	esp, 4
test	esi, esi
jz	loc_41D411
mov	ecx, [esi+4]
mov	eax, ebp

loc_41D382:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_41D3A2
test	dl, dl
jz	short loc_41D39E
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_41D3A2
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_41D382

loc_41D39E:
xor	eax, eax
jmp	short loc_41D3A7

loc_41D3A2:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_41D3A7:
test	eax, eax
jnz	short loc_41D3CF
mov	edx, [esi]
mov	[ebx], edx
mov	eax, [edi]
mov	edx, [eax+8]
push	esi
mov	ecx, edi
call	edx
mov	eax, [edi]
mov	edx, [eax+10h]
push	esi
mov	ecx, edi
call	edx
dec	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4

loc_41D3CF:
mov	ebx, esi
mov	esi, [esi]
test	esi, esi
jz	short loc_41D411

loc_41D3D7:
mov	ecx, [esi+4]
mov	eax, ebp
lea	esp, [esp+0]

loc_41D3E0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_41D400
test	dl, dl
jz	short loc_41D3FC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_41D400
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_41D3E0

loc_41D3FC:
xor	eax, eax
jmp	short loc_41D405

loc_41D400:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_41D405:
test	eax, eax
jz	short loc_41D41A
mov	ebx, esi
mov	esi, [esi]
test	esi, esi
jnz	short loc_41D3D7

loc_41D411:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	4

loc_41D41A:
mov	eax, [esi]
mov	[ebx], eax
mov	edx, [edi]
mov	eax, [edx+8]
push	esi
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	eax, [edx+10h]
push	esi
mov	ecx, edi
call	eax
dec	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4
sub_41D350 endp

align 10h



sub_41D440 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, dword_18893F8
mov	eax, [esi+4]
push	eax
mov	edx, edi
call	sub_411670
mov	ecx, [esi+8]
mov	eax, [ecx+eax*4]
add	esp, 4
test	eax, eax
jz	short loc_41D494

loc_41D460:
mov	edx, [eax+4]
mov	ecx, edi

loc_41D465:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_41D485
test	bl, bl
jz	short loc_41D481
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_41D485
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_41D465

loc_41D481:
xor	ecx, ecx
jmp	short loc_41D48A

loc_41D485:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_41D48A:
test	ecx, ecx
jz	short loc_41D49B
mov	eax, [eax]
test	eax, eax
jnz	short loc_41D460

loc_41D494:
pop	esi
xor	al, al
pop	ebx
retn	4

loc_41D49B:
mov	edx, [eax+8]
mov	eax, [esp+8+arg_0]
pop	esi
mov	[eax], edx
mov	al, 1
pop	ebx
retn	4
sub_41D440 endp

align 10h



sub_41D4B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx]
push	esi
mov	esi, dword_18893FC
test	edx, edx
jnz	short loc_41D4CA
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_41D4CA:
push	ebp
push	edi
movzx	edi, word ptr [esi+0Ah]
xor	ecx, ecx
xor	eax, eax
cmp	cx, di
jnb	short loc_41D4F0
mov	ecx, [esi+4]
lea	esp, [esp+0]

loc_41D4E0:
movzx	ebp, ax
cmp	dword ptr [ecx+ebp*4], 0
jz	short loc_41D519
inc	eax
cmp	ax, [esi+0Ah]
jb	short loc_41D4E0

loc_41D4F0:
movzx	edx, word ptr [esi+8]
movzx	edi, di
cmp	edi, edx
jb	short loc_41D506
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_41D506:
push	esi
mov	edx, ebx
mov	ecx, edi
call	sub_410350
mov	eax, edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	4

loc_41D519:
movzx	eax, ax
pop	edi
pop	ebp
mov	[ecx+eax*4], edx
inc	word ptr [esi+0Ch]
pop	esi
pop	ebx
retn	4
sub_41D4B0 endp

align 10h



sub_41D530 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [edi+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	eax
mov	edx, ebx
call	sub_411670
mov	ecx, [edi+8]
mov	ebp, eax
mov	esi, [ecx+ebp*4]
add	esp, 4
test	esi, esi
jz	short loc_41D585

loc_41D551:
mov	ecx, [esi+4]
mov	eax, ebx

loc_41D556:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_41D576
test	dl, dl
jz	short loc_41D572
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_41D576
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_41D556

loc_41D572:
xor	eax, eax
jmp	short loc_41D57B

loc_41D576:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_41D57B:
test	eax, eax
jz	short loc_41D5B7
mov	esi, [esi]
test	esi, esi
jnz	short loc_41D551

loc_41D585:
mov	eax, [edi]
mov	edx, [eax+0Ch]
mov	ecx, edi
call	edx
mov	ecx, [esp+0Ch+arg_4]
push	ecx
mov	esi, eax
mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
push	esi
mov	ecx, edi
call	edx
mov	eax, [edi+8]
mov	ecx, [eax+ebp*4]
mov	[esi], ecx
mov	edx, [edi+8]
mov	[edx+ebp*4], esi
inc	dword ptr [edi+0Ch]
pop	esi
pop	ebp
pop	ebx
retn	8

loc_41D5B7:
mov	dx, word ptr [esp+0Ch+arg_4]
mov	[esi+8], dx
pop	esi
pop	ebp
pop	ebx
retn	8
sub_41D530 endp

align 10h



sub_41D5D0 proc	near

arg_0= dword ptr  4

mov	eax, [esi+4]
push	ebx
push	eax
mov	edx, edi
call	sub_411670
mov	ecx, [esi+8]
mov	eax, [ecx+eax*4]
add	esp, 4
test	eax, eax
jz	short loc_41D624
lea	esp, [esp+0]

loc_41D5F0:
mov	edx, [eax+4]
mov	ecx, edi

loc_41D5F5:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_41D615
test	bl, bl
jz	short loc_41D611
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_41D615
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_41D5F5

loc_41D611:
xor	ecx, ecx
jmp	short loc_41D61A

loc_41D615:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_41D61A:
test	ecx, ecx
jz	short loc_41D62A
mov	eax, [eax]
test	eax, eax
jnz	short loc_41D5F0

loc_41D624:
xor	al, al
pop	ebx
retn	4

loc_41D62A:
mov	dx, [eax+8]
mov	eax, [esp+4+arg_0]
mov	[eax], dx
mov	al, 1
pop	ebx
retn	4
sub_41D5D0 endp

align 10h



sub_41D640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= word ptr	 0Ch

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
mov	dx, [esp+arg_8]
mov	[eax+4], ecx
mov	[eax+8], dx
retn	0Ch
sub_41D640 endp

align 10h



sub_41D660 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
xor	eax, eax
mov	[esi+8], ax
call	sub_410460
pop	esi
retn	4
sub_41D660 endp

align 10h



sub_41D680 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_155181C
jz	short loc_41D6CD
push	ebx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_41D6CC
push	edi

loc_41D698:
mov	eax, [esi+8]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_41D6C5

loc_41D6A2:
mov	eax, edi
mov	eax, [eax+4]
mov	edi, [edi]
test	eax, eax
jz	short loc_41D6C1
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41D6C1:
test	edi, edi
jnz	short loc_41D6A2

loc_41D6C5:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_41D698
pop	edi

loc_41D6CC:
pop	ebx

loc_41D6CD:
mov	dword ptr [esi], offset	off_1551830
call	sub_418AE0
mov	dword ptr [esi], offset	off_1551844
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_41D6FE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_41D6FE:
pop	esi
retn
sub_41D680 endp




; int __stdcall	sub_41D700(int,	char *Src, __int16)
sub_41D700 proc	near

arg_0= dword ptr  4
Src= dword ptr	8
arg_8= word ptr	 0Ch

cmp	byte ptr [ecx+10h], 0
jz	short loc_41D745
push	ebx
mov	ebx, [esp+4+Src]
push	esi
mov	eax, ebx
push	edi
lea	edx, [eax+1]

loc_41D712:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_41D712
sub	eax, edx
lea	esi, [eax+1]
push	esi
call	sub_1227DA0
mov	edi, [esp+10h+arg_0]
push	ebx		; Src
push	esi		; SizeInBytes
push	eax		; Dst
mov	[edi+4], eax
call	_strcpy_s
mov	ax, [esp+1Ch+arg_8]
add	esp, 10h
mov	[edi+8], ax
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_41D745:
mov	eax, [esp+arg_0]
mov	ecx, [esp+Src]
mov	dx, [esp+arg_8]
mov	[eax+4], ecx
mov	[eax+8], dx
retn	0Ch
sub_41D700 endp

align 10h



sub_41D760 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1551858
test	eax, eax
jz	short loc_41D79E
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_41D79D
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_41D79D:
pop	esi

loc_41D79E:
test	[esp+4+arg_0], 1
jz	short loc_41D7B8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	edi
call	eax

loc_41D7B8:
mov	eax, edi
pop	edi
retn	4
sub_41D760 endp

align 10h



sub_41D7C0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1551818
test	eax, eax
jz	short loc_41D7FE
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_41A470
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_41D7FD
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_41D7FD:
pop	esi

loc_41D7FE:
test	[esp+4+arg_0], 1
jz	short loc_41D818
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	edi
call	eax

loc_41D818:
mov	eax, edi
pop	edi
retn	4
sub_41D7C0 endp

align 10h



sub_41D820 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551844
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_41D849
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41D849:
test	[esp+4+arg_0], 1
jz	short loc_41D864
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_41D864:
mov	eax, esi
pop	esi
retn	4
sub_41D820 endp

align 10h



sub_41D870 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551830
call	sub_418AE0
mov	dword ptr [esi], offset	off_1551844
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_41D8A4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41D8A4:
test	[esp+4+arg_0], 1
jz	short loc_41D8BF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_41D8BF:
mov	eax, esi
pop	esi
retn	4
sub_41D870 endp

align 10h



sub_41D8D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_41D680
test	[esp+4+arg_0], 1
jz	short loc_41D8F6
test	esi, esi
jz	short loc_41D8F6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_41D8F6:
mov	eax, esi
pop	esi
retn	4
sub_41D8D0 endp

align 10h



sub_41D900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_15C9924
mov	dword ptr [esi+4], 3Bh
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 0ECh
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_41D900 endp

align 10h



sub_41D970 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_1551844
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_41D970 endp

align 10h



sub_41D9E0 proc	near
mov	eax, [esi+8]
push	0FFFFFFFFh	; dwMilliseconds
push	eax		; hHandle
call	ds:WaitForSingleObject
push	esi		; lpAddend
call	ds:InterlockedDecrement
retn
sub_41D9E0 endp

align 10h



sub_41DA00 proc	near
mov	eax, [esi+8]
push	0		; lpPreviousCount
push	1		; lReleaseCount
push	eax		; hSemaphore
call	ds:ReleaseSemaphore
push	esi		; lpAddend
call	ds:InterlockedIncrement
retn
sub_41DA00 endp

align 10h



sub_41DA20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
mov	eax, [esi]
mov	edx, [eax+2Ch]
push	ecx
mov	ecx, esi
call	edx
mov	esi, [esi+18Ch]
mov	[esp+8+var_4], eax
mov	edx, [esi+0Ch]
push	1
lea	eax, [esp+0Ch+arg_0]
push	eax
push	4
lea	ecx, [esp+14h+var_4]
push	ecx
push	esi
mov	[esp+1Ch+arg_0], 4
call	edx
add	esp, 14h
add	[esi+4], eax
pop	esi
pop	ecx
retn	4
sub_41DA20 endp

align 10h



; int __fastcall sub_41DA70(char *)
sub_41DA70 proc	near
push	eax		; char *
push	ecx		; char *
call	_strstr
add	esp, 8
retn
sub_41DA70 endp

align 10h



sub_41DA80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	dword ptr [esi], offset	off_155185C
test	eax, eax
jz	short loc_41DAA4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41DAA4:
test	[esp+4+arg_0], 1
jz	short loc_41DABF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41DABF:
mov	eax, esi
pop	esi
retn	4
sub_41DA80 endp

align 10h



sub_41DAD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_1551860
call	sub_417150
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41DB0C
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_41DB0C:
mov	eax, esi
pop	esi
retn	4
sub_41DAD0 endp

align 10h



sub_41DB20 proc	near
add	eax, 30h
retn
sub_41DB20 endp

align 10h



; int __stdcall	sub_41DB30(char	*, int)
sub_41DB30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
lea	eax, [esp+10h+var_4]
mov	edi, ecx
push	eax
lea	esi, [edi+8]
mov	eax, ebp
mov	[esp+14h+var_4], 0
call	sub_5F8E50
test	al, al
jz	short loc_41DB7D
mov	esi, [esp+10h+var_4]
test	esi, esi
jz	short loc_41DB74
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41DB74
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41DB74:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_41DB7D:
cmp	byte ptr [edi+1Ch], 0
jz	loc_41DC10
push	offset CriticalSection ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	esi, dword_18893E0
inc	dword_188A990
mov	dword_188A98C, eax
test	esi, esi
jz	short loc_41DBF2
mov	edi, [esp+10h+arg_4]

loc_41DBB1:
cmp	esi, edi
jz	short loc_41DBEB
test	esi, esi
jz	short loc_41DBEB
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_41DBEB

loc_41DBC6:
cmp	eax, offset off_17EE080
jz	short loc_41DBD6
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_41DBC6
jmp	short loc_41DBEB

loc_41DBD6:
mov	eax, [esi+30h]
test	eax, eax
jz	short loc_41DBEB
push	ebp		; char *
push	eax		; char *
call	__stricmp
add	esp, 8
test	eax, eax
jz	short loc_41DC38

loc_41DBEB:
mov	esi, [esi+2Ch]
test	esi, esi
jnz	short loc_41DBB1

loc_41DBF2:
sub	dword_188A990, 1
jnz	short loc_41DC05
mov	dword_188A98C, 0

loc_41DC05:		; lpCriticalSection
push	offset CriticalSection
call	ds:LeaveCriticalSection

loc_41DC10:
mov	esi, [esp+10h+var_4]
test	esi, esi
jz	short loc_41DC2F
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41DC2F
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41DC2F:
pop	edi
pop	esi
xor	eax, eax
pop	ebp
pop	ecx
retn	8

loc_41DC38:
sub	dword_188A990, 1
jnz	short loc_41DC4B
mov	dword_188A98C, 0

loc_41DC4B:		; lpCriticalSection
push	offset CriticalSection
call	ds:LeaveCriticalSection
mov	edi, [esp+10h+var_4]
test	edi, edi
jz	short loc_41DC75
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41DC75
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41DC75:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ecx
retn	8
sub_41DB30 endp

align 10h



sub_41DC80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	ecx
mov	esi, ecx
mov	ecx, esp
mov	[ecx], eax
test	eax, eax
jz	short loc_41DC9A
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41DC9A:
mov	eax, [esp+8+arg_0]
push	eax
lea	eax, [esi+8]
call	sub_416FA0
pop	esi
retn	8
sub_41DC80 endp

align 10h



sub_41DCB0 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	[ecx+1Ch], al
retn	4
sub_41DCB0 endp

align 10h



sub_41DCC0 proc	near
mov	al, [ecx+1Ch]
retn
sub_41DCC0 endp

align 10h



sub_41DCD0 proc	near
mov	ecx, [eax+8]
push	ecx		; hObject
call	ds:CloseHandle
retn
sub_41DCD0 endp

align 10h



sub_41DCE0 proc	near
push	0		; lpName
push	1		; lMaximumCount
push	0		; lInitialCount
push	0		; lpSemaphoreAttributes
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 1
call	ds:CreateSemaphoreA
mov	[esi+8], eax
mov	eax, esi
retn
sub_41DCE0 endp

align 10h



; int __cdecl sub_41DD10(float)
sub_41DD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_41BB10
add	esp, 4
retn
sub_41DD10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_41DD30(float)
sub_41DD30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
call	__CIacos
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_41DD30 endp

align 10h



; int __cdecl sub_41DD50(float)
sub_41DD50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_41DD30
add	esp, 4
retn
sub_41DD50 endp

align 10h



; int __cdecl sub_41DD70(float)
sub_41DD70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
fcom	ds:dbl_15FCD60
fnstsw	ax
test	ah, 41h
jnz	short loc_41DD9E
fld1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_41DD99
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_41DD30
add	esp, 4
retn

loc_41DD99:
fstp	st
fldz
retn

loc_41DD9E:
fstp	st
fld	ds:dword_1541BC8
retn
sub_41DD70 endp

align 10h



sub_41DDB0 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [ecx+8]
fld	dword ptr [ecx+4]
fld	dword ptr [ecx+0Ch]
fld	dword ptr [ecx]
fld	st(2)
fmulp	st(3), st
fld	st(3)
fmulp	st(4), st
fxch	st(2)
faddp	st(3), st
fmul	st, st
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fld	st
fld	ds:dbl_15FCDA8
fsub	st(1), st
fld	flt_188A9F8
fld	st
fmulp	st(3), st
fld	flt_188A9F4
fld	st
faddp	st(4), st
fxch	st(3)
fstp	[esp+4+var_4]
fxch	st(3)
fcom	ds:dbl_15FD1F8
fnstsw	ax
test	ah, 41h
jp	short loc_41DE5B
fld	[esp+4+var_4]
fld	st
fmul	st, st
fmul	st, st(2)
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fsub	st, st(3)
fmul	st, st(5)
fadd	st, st(4)
fstp	[esp+4+var_4]
fmul	[esp+4+var_4]
fstp	[esp+4+var_4]
fld	ds:flt_15FD1F0
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_41DE5B
fld	[esp+4+var_4]
fld	st
fmul	st, st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fsubrp	st(2), st
fxch	st(1)
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+4+var_4]
fmul	[esp+4+var_4]
fstp	[esp+4+var_4]
jmp	short loc_41DE63

loc_41DE5B:
fstp	st
fstp	st
fstp	st(1)
fstp	st

loc_41DE63:
fld	dword ptr [ecx+4]
fld	[esp+4+var_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [ecx+4]
fld	st
fmul	dword ptr [ecx+8]
fstp	dword ptr [ecx+8]
fld	dword ptr [ecx+0Ch]
fmul	st, st(1)
fstp	dword ptr [ecx+0Ch]
fmul	dword ptr [ecx]
fstp	dword ptr [ecx]
pop	ecx
retn
sub_41DDB0 endp

align 10h



; int __cdecl sub_41DE90(float,	float)
sub_41DE90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
fmul	ds:dbl_15FCDA0
fld1
fld	st
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+arg_4]
fld	[esp+arg_4]
fmul	st, st
fstp	[esp+arg_4]
fld	[esp+arg_4]
fmul	ds:dbl_15FCD98
fstp	[esp+arg_4]
fld	[esp+arg_4]
fld	st
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fld	st
fadd	st, st(1)
fsub	ds:dbl_15FCD78
fmulp	st(2), st
fxch	st(1)
faddp	st(3), st
fxch	st(2)
faddp	st(1), st
fmulp	st(1), st
fstp	[esp+arg_4]
fld	[esp+arg_4]
retn
sub_41DE90 endp

align 10h



sub_41DEF0 proc	near
mov	eax, offset off_17EE168
retn
sub_41DEF0 endp

align 10h



sub_41DF00 proc	near
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
retn
sub_41DF00 endp

align 10h



sub_41DF10 proc	near
push	eax		; lpCriticalSection
call	ds:EnterCriticalSection
retn
sub_41DF10 endp

align 10h



sub_41DF20 proc	near
push	eax		; lpCriticalSection
call	ds:DeleteCriticalSection
retn
sub_41DF20 endp

align 10h



sub_41DF30 proc	near
push	esi		; lpCriticalSection
call	ds:InitializeCriticalSection
mov	eax, esi
retn
sub_41DF30 endp

align 10h



sub_41DF40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15518E8
mov	ecx, dword_1889414
test	ecx, ecx
jz	short loc_41DF5E
mov	eax, [ecx]
mov	edx, [eax+0B8h]
push	esi
call	edx

loc_41DF5E:
mov	ecx, esi
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_41DF7F
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	5Ch
push	3
push	esi
call	eax

loc_41DF7F:
mov	eax, esi
pop	esi
retn	4
sub_41DF40 endp

align 10h



sub_41DF90 proc	near
mov	[esi], eax
test	eax, eax
jz	short loc_41DFA0
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41DFA0:
mov	eax, esi
retn
sub_41DF90 endp

align 10h



sub_41DFB0 proc	near
mov	eax, 3
retn
sub_41DFB0 endp

align 10h



sub_41DFC0 proc	near
mov	eax, offset off_17EE170
retn
sub_41DFC0 endp

align 10h



sub_41DFD0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	edx, edx
mov	eax, ebp
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_41DFFB
lea	esp, [esp+0]

loc_41DFF0:
cmp	ebp, [eax+4]
jz	short loc_41E02B
mov	eax, [eax]
test	eax, eax
jnz	short loc_41DFF0

loc_41DFFB:
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	edi
mov	ecx, esi
call	eax
mov	edx, [esi]
push	1
mov	edi, eax
mov	eax, [edx+4]
push	ebp
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esi+8]
mov	edx, [ecx+ebx*4]
mov	[edi], edx
mov	eax, [esi+8]
mov	[eax+ebx*4], edi
inc	dword ptr [esi+0Ch]
pop	edi
pop	ebp
pop	ebx
retn	4

loc_41E02B:
pop	ebp
mov	byte ptr [eax+8], 1
pop	ebx
retn	4
sub_41DFD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_41E040(float)
sub_41E040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
call	__CIasin
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_41E040 endp

align 10h



sub_41E060 proc	near
fldz
fst	dword ptr [eax]
fst	dword ptr [eax+0Ch]
fst	dword ptr [eax+18h]
fst	dword ptr [eax+4]
fst	dword ptr [eax+10h]
fst	dword ptr [eax+1Ch]
fst	dword ptr [eax+8]
fst	dword ptr [eax+14h]
fstp	dword ptr [eax+20h]
retn
sub_41E060 endp

align 10h



sub_41E080 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_116B520
test	[esp+4+arg_0], 1
jz	short loc_41E0A9
test	esi, esi
jz	short loc_41E0A9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0E8h
push	3
push	esi
call	eax

loc_41E0A9:
mov	eax, esi
pop	esi
retn	4
sub_41E080 endp

align 10h



sub_41E0B0 proc	near

arg_0= dword ptr  4

movzx	eax, word ptr [edi+8]
push	esi
movzx	esi, word ptr [edi+0Ah]
cmp	esi, eax
jb	short loc_41E0CA
movzx	ecx, word ptr [edi+0Eh]
add	ecx, esi
push	ecx
push	edi
call	sub_41E210

loc_41E0CA:
mov	edx, [esp+4+arg_0]
push	edx
mov	ecx, esi
mov	eax, edi
call	sub_426E10
mov	eax, esi
pop	esi
retn	4
sub_41E0B0 endp

align 10h



sub_41E0E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx]
test	edx, edx
setz	al
test	al, al
jz	short loc_41E0F9
mov	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_41E0F9:
push	ebp
push	edi
movzx	edi, word ptr [esi+0Ah]
xor	ecx, ecx
xor	eax, eax
cmp	cx, di
jnb	short loc_41E126
mov	ebp, [esi+4]
jmp	short loc_41E110
align 10h

loc_41E110:
movzx	ecx, ax
cmp	dword ptr [ebp+ecx*4+0], 0
setz	cl
test	cl, cl
jnz	short loc_41E150
inc	eax
cmp	ax, [esi+0Ah]
jb	short loc_41E110

loc_41E126:
movzx	ecx, word ptr [esi+8]
movzx	edi, di
cmp	edi, ecx
jb	short loc_41E13E
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
push	edx
push	esi
call	sub_41E210

loc_41E13E:
push	ebx
mov	ecx, edi
mov	eax, esi
call	sub_426E10
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn	4

loc_41E150:
movzx	edi, ax
mov	ebx, [ebp+edi*4+0]
cmp	ebx, edx
jz	short loc_41E18E
test	ebx, ebx
jz	short loc_41E176
lea	edx, [ebx+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41E176
mov	eax, [ebx]
mov	edx, [eax+4]
mov	ecx, ebx
call	edx

loc_41E176:
mov	eax, [esp+0Ch+arg_0]
mov	eax, [eax]
mov	[ebp+edi*4+0], eax
test	eax, eax
jz	short loc_41E18E
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41E18E:
inc	word ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn	4
sub_41E0E0 endp

align 10h



sub_41E1A0 proc	near
mov	ecx, 1
mov	[esi+0Eh], cx
xor	edx, edx
xor	ecx, ecx
mov	dword ptr [esi], offset	off_1551A28
mov	[esi+8], ax
mov	[esi+0Ah], dx
mov	[esi+0Ch], cx
test	ax, ax
jbe	short loc_41E1DA
push	edi
movzx	edi, ax
call	sub_5FB570
mov	[esi+4], eax
pop	edi
mov	eax, esi
mov	dword ptr [esi], offset	off_1551A28
retn

loc_41E1DA:
mov	[esi+4], ecx
mov	eax, esi
mov	dword ptr [esi], offset	off_1551A28
retn
sub_41E1A0 endp

align 10h



sub_41E1F0 proc	near
mov	eax, offset off_17EE1A8
retn
sub_41E1F0 endp

align 10h



sub_41E200 proc	near
mov	dword ptr [ecx], 0
retn
sub_41E200 endp

align 10h



sub_41E210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
movzx	eax, word ptr [ebx+8]
cmp	ecx, eax
jz	loc_41E3A5
movzx	eax, word ptr [ebx+0Ah]
push	ebp
movzx	edx, ax
push	esi
push	edi
cmp	ecx, edx
jnb	short loc_41E28F
movzx	ebp, cx
cmp	cx, ax
jnb	short loc_41E28B
jmp	short loc_41E240
align 10h

loc_41E240:
mov	ecx, [ebx+4]
movzx	eax, bp
cmp	dword ptr [ecx+eax*4], 0
lea	esi, [ecx+eax*4]
setnz	al
test	al, al
jz	short loc_41E280
mov	edi, [esi]
test	edi, edi
jz	short loc_41E277
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41E271
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_41E271:
mov	dword ptr [esi], 0

loc_41E277:
mov	eax, 0FFFFh
add	[ebx+0Ch], ax

loc_41E280:
inc	ebp
cmp	bp, [ebx+0Ah]
jb	short loc_41E240
mov	ecx, [esp+10h+arg_4]

loc_41E28B:
mov	[ebx+0Ah], cx

loc_41E28F:
mov	ebp, [ebx+4]
mov	[esp+10h+arg_4], ebp
mov	[ebx+8], cx
test	ecx, ecx
jbe	loc_41E36B
movzx	edi, cx
call	sub_5FB570
mov	[ebx+4], eax
xor	eax, eax
xor	ecx, ecx
mov	[esp+10h+arg_0], eax
cmp	cx, [ebx+0Ah]
jnb	short loc_41E31E
jmp	short loc_41E2C0
align 10h

loc_41E2C0:
mov	edi, [ebx+4]
mov	edx, [esp+10h+arg_4]
movzx	esi, ax
add	esi, esi
add	esi, esi
mov	ebp, [edi+esi]
add	edi, esi
cmp	ebp, [esi+edx]
jz	short loc_41E30B
test	ebp, ebp
jz	short loc_41E2F4
lea	eax, [ebp+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41E2F4
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax

loc_41E2F4:
mov	ecx, [esp+10h+arg_4]
mov	esi, [esi+ecx]
mov	[edi], esi
test	esi, esi
jz	short loc_41E30B
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_41E30B:
mov	eax, [esp+10h+arg_0]
inc	eax
mov	[esp+10h+arg_0], eax
cmp	ax, [ebx+0Ah]
jb	short loc_41E2C0
mov	ebp, [esp+10h+arg_4]

loc_41E31E:
movzx	edi, word ptr [ebx+0Ah]
cmp	di, [ebx+8]
jnb	short loc_41E372
jmp	short loc_41E330
align 10h

loc_41E330:
mov	eax, [ebx+4]
movzx	edx, di
mov	esi, [eax+edx*4]
lea	ebp, [eax+edx*4]
test	esi, esi
jz	short loc_41E35E
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41E357
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41E357:
mov	dword ptr [ebp+0], 0

loc_41E35E:
inc	edi
cmp	di, [ebx+8]
jb	short loc_41E330
mov	ebp, [esp+10h+arg_4]
jmp	short loc_41E372

loc_41E36B:
mov	dword ptr [ebx+4], 0

loc_41E372:
test	ebp, ebp
jz	short loc_41E3A2
mov	ecx, [ebp-4]
push	offset sub_429100
lea	esi, [ebp-4]
push	ecx
push	4
push	ebp
call	$LN21_0
test	esi, esi
jz	short loc_41E3A2
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_41E3A2:
pop	edi
pop	esi
pop	ebp

loc_41E3A5:
pop	ebx
retn	8
sub_41E210 endp

align 10h



sub_41E3B0 proc	near
mov	al, [eax+0DCh]
retn
sub_41E3B0 endp

align 10h



sub_41E3C0 proc	near
movzx	eax, word ptr [eax+0A8h]
shr	eax, 8
and	eax, 1
retn
sub_41E3C0 endp

align 10h



sub_41E3D0 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+0Ch]
mov	dword ptr [edi], offset	off_1551A2C
call	sub_422550
lea	esi, [edi+10h]
call	sub_422550
lea	esi, [edi+14h]
call	sub_422550
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+8+arg_0], 1
jz	short loc_41E41D
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	edi
call	eax

loc_41E41D:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_41E3D0 endp

align 10h



sub_41E430 proc	near
push	ebx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	[esi+8], bl
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	dword ptr [esi], offset	off_1551A2C
mov	eax, esi
pop	ebx
retn
sub_41E430 endp

align 10h



; int __stdcall	sub_41E470(float)
sub_41E470 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

movzx	eax, word ptr [ecx+0A8h]
mov	dl, al
shr	dl, 1
test	dl, 1
jz	short locret_41E49E
fld	[esp+arg_0]
shr	al, 4
push	ecx
test	al, 1
fstp	[esp+4+var_4]
mov	eax, [ecx]
jz	short loc_41E499
mov	edx, [eax+6Ch]
call	edx
retn	4

loc_41E499:
mov	edx, [eax+68h]
call	edx

locret_41E49E:
retn	4
sub_41E470 endp

align 10h



; int __stdcall	sub_41E4B0(float, char)
sub_41E4B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= byte ptr	 8

cmp	[esp+arg_4], 0
push	esi
jz	short loc_41E4E7
mov	esi, [edi+98h]
test	esi, esi
jz	short loc_41E4E7

loc_41E4C2:
mov	ecx, [esi+8]
lea	eax, [esi+8]
mov	esi, [esi]
test	ecx, ecx
jz	short loc_41E4E3
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_41E4E3
mov	eax, [ecx]
fld	[esp+4+arg_0]
mov	edx, [eax+4Ch]
push	ecx
fstp	[esp+8+var_8]
call	edx

loc_41E4E3:
test	esi, esi
jnz	short loc_41E4C2

loc_41E4E7:
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_41E508
mov	edi, edi

loc_41E4F0:
mov	eax, [esi]
fld	[esp+4+arg_0]
mov	edx, [eax+50h]
push	ecx
mov	ecx, esi
fstp	[esp+8+var_8]
call	edx
mov	esi, [esi+30h]
test	esi, esi
jnz	short loc_41E4F0

loc_41E508:
pop	esi
retn	8
sub_41E4B0 endp

align 10h



sub_41E510 proc	near
mov	eax, [eax]
mov	[esi], eax
test	eax, eax
jz	short loc_41E522
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41E522:
mov	eax, esi
retn
sub_41E510 endp

align 10h



sub_41E530 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1551A28
test	eax, eax
jz	short loc_41E56E
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_41E56D
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_41E56D:
pop	esi

loc_41E56E:
test	[esp+4+arg_0], 1
jz	short loc_41E588
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_41E588:
mov	eax, edi
pop	edi
retn	4
sub_41E530 endp

align 10h



sub_41E590 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_41E5B6
test	esi, esi
jz	short loc_41E5B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41E5B6:
mov	eax, esi
pop	esi
retn	4
sub_41E590 endp

align 10h



sub_41E5C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
add	eax, eax
jnz	short loc_41E5CC
mov	eax, 1

loc_41E5CC:
push	0
push	0FFFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
add	esp, 8
retn
sub_41E5C0 endp

align 10h



sub_41E600 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

movzx	eax, word ptr [esi+8]
sub	esp, 8
cmp	edx, eax
jz	loc_41E6FA
movzx	eax, word ptr [esi+0Ah]
movzx	ecx, ax
push	edi
cmp	edx, ecx
jnb	short loc_41E64C
movzx	ecx, dx
cmp	dx, ax
jnb	short loc_41E648

loc_41E623:
mov	edi, [esi+4]
movzx	eax, cx
cmp	word ptr [edi+eax*2], 0
lea	eax, [edi+eax*2]
jz	short loc_41E641
xor	edi, edi
mov	[eax], di
mov	eax, 0FFFFh
add	[esi+0Ch], ax

loc_41E641:
inc	ecx
cmp	cx, [esi+0Ah]
jb	short loc_41E623

loc_41E648:
mov	[esi+0Ah], dx

loc_41E64C:
mov	edi, [esi+4]
push	ebx
mov	[esi+8], dx
test	edx, edx
jbe	loc_41E6DA
movzx	eax, dx
add	eax, eax
jnz	short loc_41E668
mov	eax, 1

loc_41E668:
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	0
push	0FFFFFFFFh
push	0
push	0
mov	[esp+20h+var_4], eax
push	5
lea	eax, [esp+24h+var_8]
push	eax
mov	[esp+28h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+28h+var_4]
push	eax
call	edx
mov	[esi+4], eax
xor	eax, eax
xor	ecx, ecx
cmp	ax, [esi+0Ah]
jnb	short loc_41E6BB

loc_41E6A4:
mov	edx, [esi+4]
movzx	eax, cx
add	eax, eax
mov	bx, [eax+edi]
inc	ecx
mov	[eax+edx], bx
cmp	cx, [esi+0Ah]
jb	short loc_41E6A4

loc_41E6BB:
movzx	eax, word ptr [esi+0Ah]
cmp	ax, [esi+8]
jnb	short loc_41E6E1

loc_41E6C5:
mov	edx, [esi+4]
movzx	ecx, ax
xor	ebx, ebx
inc	eax
mov	[edx+ecx*2], bx
cmp	ax, [esi+8]
jb	short loc_41E6C5
jmp	short loc_41E6E1

loc_41E6DA:
mov	dword ptr [esi+4], 0

loc_41E6E1:
pop	ebx
test	edi, edi
jz	short loc_41E6F9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	edi
call	eax

loc_41E6F9:
pop	edi

loc_41E6FA:
add	esp, 8
retn
sub_41E600 endp

align 10h



sub_41E700 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
movzx	edx, word ptr [edx]
push	esi
movzx	esi, word ptr [eax+0Ah]
cmp	ecx, esi
jb	short loc_41E72B
lea	esi, [ecx+1]
mov	[eax+0Ah], si
test	dx, dx
jz	short loc_41E758
inc	word ptr [eax+0Ch]
mov	eax, [eax+4]
mov	[eax+ecx*2], dx
pop	esi
retn	4

loc_41E72B:
mov	esi, [eax+4]
test	dx, dx
jz	short loc_41E748
cmp	word ptr [esi+ecx*2], 0
jnz	short loc_41E758
inc	word ptr [eax+0Ch]
mov	eax, esi
mov	[eax+ecx*2], dx
pop	esi
retn	4

loc_41E748:
cmp	word ptr [esi+ecx*2], 0
jz	short loc_41E758
mov	esi, 0FFFFh
add	[eax+0Ch], si

loc_41E758:
mov	eax, [eax+4]
mov	[eax+ecx*2], dx
pop	esi
retn	4
sub_41E700 endp

align 10h



sub_41E770 proc	near
mov	eax, offset off_17EE1B0
retn
sub_41E770 endp

align 10h



sub_41E780 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+0Ch]
mov	dword ptr [esi], offset	off_1551A80
mov	eax, [edi]
test	eax, eax
jz	short loc_41E7B0
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41E7AF
push	edi
mov	eax, ebx
call	sub_1171F60

loc_41E7AF:
pop	ebx

loc_41E7B0:
mov	ecx, esi
call	sub_1160E70
test	[esp+8+arg_0], 1
jz	short loc_41E7D1
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_41E7D1:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_41E780 endp

align 10h



sub_41E7E0 proc	near
mov	eax, offset off_17EE1B8
retn
sub_41E7E0 endp

align 10h



sub_41E7F0 proc	near
mov	eax, offset off_17EE1C0
retn
sub_41E7F0 endp

align 10h



sub_41E800 proc	near
fld	dword ptr [edx+0Ch]
fld	dword ptr [ecx+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41E849
fld	dword ptr [edx]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41E849
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41E849
fld	dword ptr [edx+8]
fld	dword ptr [ecx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_41E849
mov	eax, 1
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn

loc_41E849:
xor	eax, eax
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_41E800 endp

align 10h



sub_41E860 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1169240
test	[esp+4+arg_0], 1
jz	short loc_41E886
test	esi, esi
jz	short loc_41E886
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_41E886:
mov	eax, esi
pop	esi
retn	4
sub_41E860 endp

align 10h



sub_41E890 proc	near
mov	eax, offset off_17EE1C8
retn
sub_41E890 endp

align 10h



sub_41E8A0 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_154E2A8
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+1Ch], edi
mov	[esi+20h], edi
mov	[esi+24h], edi
mov	[esi+28h], edi
mov	[esi+2Ch], edi
mov	dword ptr [esi+18h], 0FFFFFFFFh
mov	eax, esi
pop	edi
retn
sub_41E8A0 endp

align 10h



sub_41E8F0 proc	near
mov	eax, dword_1968D38
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_41E91D
push	esi
lea	ecx, [ecx+0]

loc_41E900:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	esi, [eax]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax
mov	eax, esi
cmp	esi, edi
jnz	short loc_41E900
pop	esi

loc_41E91D:
mov	dword_1968D3C, edi
mov	dword_1968D38, edi
pop	edi
retn
sub_41E8F0 endp

align 10h



sub_41E930 proc	near
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	dword ptr [esi+4], 0
call	ds:InterlockedIncrement
fldz
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], offset	off_1551BC0
fst	dword ptr [esi+0Ch]
fst	dword ptr [esi+10h]
fst	dword ptr [esi+14h]
fstp	dword ptr [esi+18h]
mov	eax, dword_17EE148
mov	[esi+0Ch], eax
mov	ecx, dword_17EE14C
mov	[esi+10h], ecx
mov	edx, dword_17EE150
mov	[esi+14h], edx
mov	eax, dword_17EE154
mov	[esi+18h], eax
mov	eax, esi
retn
sub_41E930 endp

align 10h



sub_41E990 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551BC0
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_41E9B8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_41E9B8:
mov	eax, esi
pop	esi
retn	4
sub_41E990 endp

align 10h



sub_41E9C0 proc	near
mov	dword ptr [ecx], offset	off_1551BC0
jmp	sub_1160E70
sub_41E9C0 endp

align 10h



sub_41E9D0 proc	near
mov	eax, offset off_17EE1D8
retn
sub_41E9D0 endp

align 10h



sub_41E9E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11674D0
test	[esp+4+arg_0], 1
jz	short loc_41EA09
test	esi, esi
jz	short loc_41EA09
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0ACh
push	3
push	esi
call	eax

loc_41EA09:
mov	eax, esi
pop	esi
retn	4
sub_41E9E0 endp

align 10h



sub_41EA10 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+0Ch], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	dword ptr [eax], offset	off_15507C4
retn
sub_41EA10 endp

align 10h



sub_41EA30 proc	near
push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_15507C4
call	sub_41C620
mov	dword ptr [edi], offset	off_15CA734
pop	edi
retn
sub_41EA30 endp

align 10h



sub_41EA50 proc	near
mov	eax, offset off_17EE1F0
retn
sub_41EA50 endp

align 10h



sub_41EA60 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [edi+0A4h]
cmp	esi, ebx
jz	short loc_41EA9F
test	esi, esi
jz	short loc_41EA8B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41EA8B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41EA8B:
mov	[edi+0A4h], ebx
test	ebx, ebx
jz	short loc_41EA9F
add	ebx, 4
push	ebx		; lpAddend
call	ds:InterlockedIncrement

loc_41EA9F:
mov	ecx, [edi+0A4h]
pop	esi
pop	ebx
test	ecx, ecx
jz	short locret_41EABB
cmp	[ecx+8], edi
jz	short locret_41EABB
mov	edx, [ecx]
mov	eax, [edx+48h]
mov	[esp+arg_0], edi
jmp	eax

locret_41EABB:
retn	4
sub_41EA60 endp

align 10h



sub_41EAC0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
cmp	edi, [ebx]
jz	short loc_41EAFC
test	edi, edi
jz	short loc_41EAEA
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41EAEA
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_41EAEA:
mov	eax, [ebx]
mov	[esi], eax
test	eax, eax
jz	short loc_41EAFC
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41EAFC:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_41EAC0 endp

align 10h



sub_41EB10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+4]
push	edi
call	edx
mov	ebp, [esp+10h+arg_0]
mov	edi, eax
mov	ebx, [edi+8]
cmp	ebx, [ebp+0]
jz	short loc_41EB5A
test	ebx, ebx
jz	short loc_41EB46
lea	eax, [ebx+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41EB46
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_41EB46:
mov	eax, [ebp+0]
mov	[edi+8], eax
test	eax, eax
jz	short loc_41EB5A
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41EB5A:
mov	dword ptr [edi+4], 0
mov	ecx, [esi+4]
mov	[edi], ecx
mov	eax, [esi+4]
test	eax, eax
jz	short loc_41EB7D
mov	[eax+4], edi
inc	dword ptr [esi+0Ch]
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_41EB7D:
inc	dword ptr [esi+0Ch]
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_41EB10 endp

align 10h



sub_41EB90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	[esp+8+arg_0], esi
test	esi, esi
jz	short loc_41EBAA
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41EBAA:
lea	ecx, [esp+8+arg_0]
push	ecx
lea	ecx, [edi+94h]
call	sub_41EB10
test	esi, esi
jz	short loc_41EBD5
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41EBD5
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_41EBD5:
pop	edi
pop	esi
retn	4
sub_41EB90 endp

align 10h



sub_41EBE0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, [esi+8]
mov	eax, [edi+4]
mov	[esi+8], eax
test	eax, eax
jz	short loc_41EBFB
mov	dword ptr [eax], 0
jmp	short loc_41EC02

loc_41EBFB:
mov	dword ptr [esi+4], 0

loc_41EC02:
mov	eax, [edi+8]
mov	[ebx], eax
test	eax, eax
jz	short loc_41EC15
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41EC15:
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	ecx, esi
call	edx
dec	dword ptr [esi+0Ch]
pop	edi
mov	eax, ebx
pop	ebx
retn	4
sub_41EBE0 endp

align 10h



sub_41EC30 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ecx]
mov	esi, eax
cmp	edi, [esi+4]
jnz	short loc_41EC52
mov	eax, [edi]
push	ebp
mov	[ecx], eax
call	sub_41FF40
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
retn	4

loc_41EC52:
cmp	edi, [esi+8]
jnz	short loc_41EC6B
push	ebp
mov	dword ptr [ecx], 0
call	sub_41EBE0
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
retn	4

loc_41EC6B:
mov	edx, [edi+4]
mov	eax, [edi]
mov	[ecx], eax
test	edx, edx
jz	short loc_41EC78
mov	[edx], eax

loc_41EC78:
test	eax, eax
jz	short loc_41EC7F
mov	[eax+4], edx

loc_41EC7F:
push	ebx
mov	ebx, [edi+8]
test	ebx, ebx
jz	short loc_41EC91
lea	ecx, [ebx+4]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41EC91:
mov	edx, [esi]
mov	eax, [edx+8]
push	edi
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	[ebp+0], ebx
test	ebx, ebx
jz	short loc_41ECC3
lea	esi, [ebx+4]
push	esi		; lpAddend
call	ds:InterlockedIncrement
push	esi		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41ECC3
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_41ECC3:
pop	ebx
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
retn	4
sub_41EC30 endp

align 10h



sub_41ECD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
xor	ebx, ebx
mov	[esp+0Ch+arg_4], ebx
mov	ecx, [eax+4]
push	esi
push	edi
test	ecx, ecx
jz	short loc_41ECFF
mov	edi, [ebp+0]
lea	esp, [esp+0]

loc_41ECF0:
lea	edx, [ecx+8]
mov	esi, ecx
mov	ecx, [ecx]
cmp	edi, [edx]
jz	short loc_41ED1E
test	ecx, ecx
jnz	short loc_41ECF0

loc_41ECFF:
xor	ecx, ecx

loc_41ED01:
mov	[esp+14h+arg_4], ecx
test	ecx, ecx
jz	short loc_41ED22
lea	ecx, [esp+14h+var_4]
push	ecx
lea	ecx, [esp+18h+arg_4]
mov	ebx, 1
call	sub_41EC30
jmp	short loc_41ED24

loc_41ED1E:
mov	ecx, esi
jmp	short loc_41ED01

loc_41ED22:
mov	eax, ebp

loc_41ED24:
mov	eax, [eax]
mov	edi, [esp+14h+arg_0]
mov	[edi], eax
test	eax, eax
jz	short loc_41ED3A
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41ED3A:
test	bl, 1
jz	short loc_41ED5E
mov	esi, [esp+14h+var_4]
test	esi, esi
jz	short loc_41ED5E
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_41ED5E
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_41ED5E:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_41ECD0 endp

align 10h



sub_41ED70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1164BD0
test	[esp+4+arg_0], 1
jz	short loc_41ED96
test	esi, esi
jz	short loc_41ED96
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_41ED96:
mov	eax, esi
pop	esi
retn	4
sub_41ED70 endp

align 10h



sub_41EDA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11641A0
test	[esp+4+arg_0], 1
jz	short loc_41EDC6
test	esi, esi
jz	short loc_41EDC6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_41EDC6:
mov	eax, esi
pop	esi
retn	4
sub_41EDA0 endp

align 10h



sub_41EDD0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
xor	eax, eax
cmp	edx, [esp+arg_0]
setz	al
retn	4
sub_41EDD0 endp

align 10h



sub_41EDE0 proc	near
mov	eax, 8
retn
sub_41EDE0 endp

align 10h



sub_41EDF0 proc	near
mov	eax, offset off_17EE1F8
retn
sub_41EDF0 endp

align 10h



sub_41EE00 proc	near
mov	ecx, dword_1889AA0
fldz
mov	[eax], ecx
mov	edx, dword_1889AA4
fstp	dword ptr [eax+8]
fld1
mov	[eax+4], edx
fst	dword ptr [eax+0Ch]
fstp	dword ptr [eax+10h]
fld	ds:dword_1479C58
fst	dword ptr [eax+14h]
fstp	dword ptr [eax+18h]
mov	byte ptr [eax+1Ch], 1
mov	dword ptr [eax+44h], 2
retn
sub_41EE00 endp

align 10h



sub_41EE40 proc	near

arg_0= word ptr	 4

mov	cx, [eax+4]
mov	edx, 0FF00h
and	cx, dx
or	cx, [esp+arg_0]
mov	[eax+4], cx
retn	4
sub_41EE40 endp

align 10h



sub_41EE60 proc	near
mov	dx, [ecx+4]
push	esi
mov	esi, 0F0FFh
and	dx, si
shl	eax, 8
or	dx, ax
mov	[ecx+4], dx
pop	esi
retn
sub_41EE60 endp

align 10h



sub_41EE80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551D20
call	sub_11641A0
test	[esp+4+arg_0], 1
jz	short loc_41EEA8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_41EEA8:
mov	eax, esi
pop	esi
retn	4
sub_41EE80 endp

align 10h



sub_41EEB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551D00
call	sub_11641A0
test	[esp+4+arg_0], 1
jz	short loc_41EED8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	esi
call	eax

loc_41EED8:
mov	eax, esi
pop	esi
retn	4
sub_41EEB0 endp

align 10h



sub_41EEE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551D10
call	sub_11641A0
test	[esp+4+arg_0], 1
jz	short loc_41EF08
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_41EF08:
mov	eax, esi
pop	esi
retn	4
sub_41EEE0 endp

align 10h



sub_41EF10 proc	near
lea	edx, [ecx+ecx]
mov	cx, [eax+18h]
push	esi
mov	esi, 0FFF1h
and	cx, si
or	dx, cx
mov	[eax+18h], dx
pop	esi
retn
sub_41EF10 endp

align 10h



sub_41EF30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_1551D30
test	eax, eax
jz	short loc_41EF54
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41EF54:
mov	ecx, esi
mov	dword ptr [esi+10h], 0
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_41EF7D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_41EF7D:
mov	eax, esi
pop	esi
retn	4
sub_41EF30 endp

align 10h



sub_41EF90 proc	near
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_1551D30
test	eax, eax
jz	short loc_41EFB1
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41EFB1:
mov	dword ptr [esi+10h], 0
mov	ecx, esi
jmp	sub_1160E70
sub_41EF90 endp

align 10h



sub_41EFC0 proc	near
mov	eax, offset off_17EE200
retn
sub_41EFC0 endp

align 10h



sub_41EFD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1163280
test	[esp+4+arg_0], 1
jz	short loc_41EFF9
test	esi, esi
jz	short loc_41EFF9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0A0h
push	3
push	esi
call	eax

loc_41EFF9:
mov	eax, esi
pop	esi
retn	4
sub_41EFD0 endp

align 10h



sub_41F000 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15569CC
jz	short loc_41F023
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_41F023:
mov	eax, esi
pop	esi
retn	4
sub_41F000 endp

align 10h



sub_41F030 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+8]
cmp	eax, 0FFFFFFFFh
jnz	short loc_41F04F
mov	eax, [esi]
mov	dword ptr [esi+8], 0
mov	[eax], edi
mov	dword ptr [esi+0Ch], 1
jmp	short loc_41F06A

loc_41F04F:
cmp	eax, [esi+0Ch]
jnz	short loc_41F05F
mov	ecx, [esi+4]
add	ecx, ecx
push	ecx
call	sub_41F0D0

loc_41F05F:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	[eax+edx*4], edi
inc	dword ptr [esi+0Ch]

loc_41F06A:
mov	ecx, [esi+0Ch]
cmp	ecx, [esi+4]
jnz	short loc_41F079
mov	dword ptr [esi+0Ch], 0

loc_41F079:
pop	esi
retn
sub_41F030 endp

align 10h



sub_41F080 proc	near
mov	eax, [ecx+8]
cmp	eax, 0FFFFFFFFh
jnz	short loc_41F08B
xor	eax, eax
retn

loc_41F08B:
mov	edx, [ecx]
lea	edx, [edx+eax*4]
mov	eax, [edx]
mov	dword ptr [edx], 0
inc	dword ptr [ecx+8]
mov	edx, [ecx+8]
cmp	edx, [ecx+4]
jnz	short loc_41F0AA
mov	dword ptr [ecx+8], 0

loc_41F0AA:
mov	edx, [ecx+8]
cmp	edx, [ecx+0Ch]
jnz	short locret_41F0C0
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	dword ptr [ecx+0Ch], 0

locret_41F0C0:
retn
sub_41F080 endp

align 10h



sub_41F0D0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
test	ebx, ebx
jz	loc_41F15A
push	edi
mov	eax, ebx
call	sub_5F46E0
mov	ecx, [esi+8]
mov	edi, eax
xor	eax, eax
cmp	ecx, [esi+0Ch]
jb	short loc_41F121
cmp	ecx, [esi+4]
jnb	short loc_41F105

loc_41F0F6:
mov	edx, [esi]
mov	edx, [edx+ecx*4]
mov	[edi+eax*4], edx
inc	ecx
inc	eax
cmp	ecx, [esi+4]
jb	short loc_41F0F6

loc_41F105:
xor	ecx, ecx
cmp	[esi+0Ch], ecx
jbe	short loc_41F130
lea	esp, [esp+0]

loc_41F110:
mov	edx, [esi]
mov	edx, [edx+ecx*4]
mov	[edi+eax*4], edx
inc	ecx
inc	eax
cmp	ecx, [esi+0Ch]
jb	short loc_41F110
jmp	short loc_41F130

loc_41F121:
mov	edx, [esi]
mov	edx, [edx+ecx*4]
mov	[edi+eax*4], edx
inc	ecx
inc	eax
cmp	ecx, [esi+0Ch]
jb	short loc_41F121

loc_41F130:
mov	[esi+0Ch], eax
mov	eax, [esi]
mov	dword ptr [esi+8], 0
mov	[esi+4], ebx
test	eax, eax
jz	short loc_41F157
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41F157:
mov	[esi], edi
pop	edi

loc_41F15A:
pop	ebx
retn	4
sub_41F0D0 endp

align 10h



sub_41F160 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, [ecx]
mov	eax, [eax+5Ch]
push	edx
mov	edx, [esp+4+arg_0]
push	edx
push	0
call	eax
retn	8
sub_41F160 endp

align 10h



sub_41F180 proc	near
mov	eax, offset off_17EE208
retn
sub_41F180 endp

align 10h



sub_41F190 proc	near
push	0		; lpName
mov	[esi], ecx
mov	edx, [esi]
push	eax		; lMaximumCount
push	edx		; lInitialCount
push	0		; lpSemaphoreAttributes
mov	[esi+4], eax
call	ds:CreateSemaphoreA
mov	[esi+8], eax
mov	eax, esi
retn
sub_41F190 endp

align 10h



sub_41F1B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, [edi]
cmp	esi, [ebx]
jz	short loc_41F1EC
test	esi, esi
jz	short loc_41F1DA
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41F1DA
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41F1DA:
mov	eax, [ebx]
mov	[edi], eax
test	eax, eax
jz	short loc_41F1EC
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41F1EC:
mov	esi, [edi+4]
cmp	esi, [ebx+4]
jz	short loc_41F21F
test	esi, esi
jz	short loc_41F20B
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_41F20B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_41F20B:
mov	eax, [ebx+4]
mov	[edi+4], eax
test	eax, eax
jz	short loc_41F21F
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41F21F:
mov	ecx, [ebx+8]
pop	esi
mov	[edi+8], ecx
mov	edx, [ebx+0Ch]
pop	ebp
mov	[edi+0Ch], edx
mov	eax, edi
pop	ebx
retn	4
sub_41F1B0 endp

align 10h



sub_41F240 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, [ebx+4]
jz	short loc_41F2C7
push	ebp
push	esi
xor	esi, esi
cmp	edi, esi
jbe	short loc_41F287
call	sub_41F2D0
xor	ebp, ebp
mov	[esp+10h+arg_0], eax
cmp	[ebx+8], esi
jbe	short loc_41F28B

loc_41F267:
mov	eax, [ebx]
mov	ecx, [esp+10h+arg_0]
add	eax, esi
push	eax
lea	edi, [esi+ecx]
call	sub_41F1B0
inc	ebp
add	esi, 10h
cmp	ebp, [ebx+8]
jb	short loc_41F267
mov	edi, [esp+10h+arg_4]
jmp	short loc_41F28B

loc_41F287:
mov	[esp+10h+arg_0], esi

loc_41F28B:
mov	eax, [ebx]
test	eax, eax
jz	short loc_41F2BC
mov	edx, [eax-4]
lea	esi, [eax-4]
push	offset sub_4118A0
push	edx
push	10h
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_41F2BC
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	esi
call	eax

loc_41F2BC:
mov	ecx, [esp+10h+arg_0]
pop	esi
mov	[ebx], ecx
mov	[ebx+4], edi
pop	ebp

loc_41F2C7:
pop	edi
pop	ebx
retn	8
sub_41F240 endp

align 10h



sub_41F2D0 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 10h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_41F313
push	esi
push	offset off_41F330
push	edi
lea	esi, [eax+4]
push	10h
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_41F313:
xor	eax, eax
retn
sub_41F2D0 endp

align 10h



sub_41F320 proc	near
mov	eax, offset off_17EE218
retn
sub_41F320 endp

align 10h
off_41F330 dd offset loc_C7C186+5
align 8
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 0FFFFFFFFh
mov	dword ptr [eax+0Ch], 1
retn
align 10h



sub_41F350 proc	near

arg_0= dword ptr  4

mov	ecx, dword_1889518
push	esi
mov	esi, [eax]
xor	edx, edx
mov	eax, esi
div	dword ptr [ecx+4]
mov	ecx, [ecx+8]
mov	edx, [ecx+edx*4]
test	edx, edx
jz	short loc_41F37B
lea	ebx, [ebx+0]

loc_41F370:
cmp	esi, [edx+4]
jz	short loc_41F381
mov	edx, [edx]
test	edx, edx
jnz	short loc_41F370

loc_41F37B:
xor	al, al
pop	esi
retn	4

loc_41F381:
mov	eax, [esp+4+arg_0]
mov	edx, [edx+8]
mov	[eax], edx
mov	al, 1
pop	esi
retn	4
sub_41F350 endp




sub_41F390 proc	near

arg_0= dword ptr  4

mov	ecx, [esi+8]
cmp	[esi+4], ecx
jnz	short loc_41F3A4
mov	eax, [esi+0Ch]
add	eax, ecx
mov	ecx, esi
call	sub_12398C0

loc_41F3A4:
mov	eax, [esi+4]
mov	ecx, [esi]
mov	edx, [esp+arg_0]
mov	[ecx+eax*4], edx
inc	dword ptr [esi+4]
retn	4
sub_41F390 endp

align 10h



sub_41F3C0 proc	near
mov	eax, offset off_17EE220
retn
sub_41F3C0 endp

align 10h



sub_41F3D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_41F3F6
test	esi, esi
jz	short loc_41F3F6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_41F3F6:
mov	eax, esi
pop	esi
retn	4
sub_41F3D0 endp

align 10h



sub_41F400 proc	near
mov	eax, offset off_17EE228
retn
sub_41F400 endp

align 10h



sub_41F410 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1160BA0
test	[esp+4+arg_0], 1
jz	short loc_41F436
test	esi, esi
jz	short loc_41F436
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_41F436:
mov	eax, esi
pop	esi
retn	4
sub_41F410 endp

align 10h



sub_41F440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_1551FF8
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_41F440 endp

align 10h



sub_41F4B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+0]
xor	edx, edx
mov	eax, ecx
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_41F4DB
lea	esp, [esp+0]

loc_41F4D0:
cmp	ecx, [eax+4]
jz	short loc_41F50B
mov	eax, [eax]
test	eax, eax
jnz	short loc_41F4D0

loc_41F4DB:
mov	edx, [esi]
mov	eax, [edx+4]
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esp+0Ch+arg_4]
mov	edi, eax
push	ecx
push	edi
mov	eax, ebp
call	sub_41F630
mov	edx, [esi+8]
mov	eax, [edx+ebx*4]
mov	[edi], eax
mov	ecx, [esi+8]
mov	[ecx+ebx*4], edi
inc	dword ptr [esi+0Ch]
pop	edi
pop	ebp
pop	ebx
retn	8

loc_41F50B:
mov	ecx, [esp+8+arg_4]
push	ecx
push	eax
mov	eax, ebp
call	sub_41F630
pop	ebp
pop	ebx
retn	8
sub_41F4B0 endp

align 10h



sub_41F520 proc	near
push	edi
mov	edi, [eax]
xor	edx, edx
mov	eax, edi
div	dword ptr [esi+4]
mov	ecx, [esi+8]
mov	eax, [ecx+edx*4]
lea	ecx, [ecx+edx*4]
test	eax, eax
jz	short loc_41F56D
cmp	edi, [eax+4]
jnz	short loc_41F551

loc_41F53C:
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [esi]
push	eax
mov	eax, [edx+8]
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	al, 1
pop	edi
retn

loc_41F551:
mov	ecx, eax
mov	eax, [eax]
test	eax, eax
jz	short loc_41F56D
lea	esp, [esp+0]

loc_41F560:
cmp	edi, [eax+4]
jz	short loc_41F53C
mov	ecx, eax
mov	eax, [eax]
test	eax, eax
jnz	short loc_41F560

loc_41F56D:
xor	al, al
pop	edi
retn
sub_41F520 endp

align 10h



sub_41F580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esi+4]
cmp	[ebx], edi
jz	short loc_41F5CB
test	edi, edi
jz	short loc_41F5A4
lea	eax, [edi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41F5A4:
mov	eax, [ebx]
test	eax, eax
jz	short loc_41F5C9
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41F5C5
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_41F5C5:
mov	ebp, [esp+10h+arg_4]

loc_41F5C9:
mov	[ebx], edi

loc_41F5CB:
mov	eax, [esi]
mov	ecx, [esi+8]
mov	edx, [esp+10h+arg_C]
mov	[edx], ecx
test	eax, eax
jz	short loc_41F5E4
pop	edi
pop	esi
mov	[ebp+0], eax
pop	ebp
pop	ebx
retn	10h

loc_41F5E4:
mov	edi, [esp+10h+arg_0]
mov	ecx, [edi+4]
mov	eax, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_41F60E
mov	eax, [edi+8]
lea	eax, [eax+edx*4]
lea	ecx, [ecx+0]

loc_41F600:
mov	esi, [eax]
test	esi, esi
jnz	short loc_41F61C
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_41F600

loc_41F60E:
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebp
pop	ebx
retn	10h

loc_41F61C:
pop	edi
mov	[ebp+0], esi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_41F580 endp

align 10h



sub_41F630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [eax]
cmp	[ebx+4], edi
lea	esi, [ebx+4]
jz	short loc_41F681
test	edi, edi
jz	short loc_41F64F
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41F64F:
mov	eax, [esi]
test	eax, eax
jz	short loc_41F672
push	ebp
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41F671
push	esi
mov	eax, ebp
call	sub_1171F60

loc_41F671:
pop	ebp

loc_41F672:
mov	edx, [esp+0Ch+arg_4]
mov	[esi], edi
pop	edi
pop	esi
mov	[ebx+8], edx
pop	ebx
retn	8

loc_41F681:
mov	eax, [esp+0Ch+arg_4]
pop	edi
pop	esi
mov	[ebx+8], eax
pop	ebx
retn	8
sub_41F630 endp

align 10h



sub_41F690 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_41F6C0
test	[esp+4+arg_0], 1
jz	short loc_41F6B6
test	edi, edi
jz	short loc_41F6B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	edi
call	eax

loc_41F6B6:
mov	eax, edi
pop	edi
retn	4
sub_41F690 endp

align 10h



sub_41F6C0 proc	near
mov	eax, [edi+14h]
mov	dword ptr [edi], offset	off_1551FF0
test	eax, eax
jz	short loc_41F6E1
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41F6E1:
mov	eax, [edi+8]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
lea	esi, [edi+8]
test	eax, eax
jz	short loc_41F70C
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_41F70B
push	esi
mov	eax, ebx
call	sub_1171F60

loc_41F70B:
pop	ebx

loc_41F70C:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
retn
sub_41F6C0 endp

align 10h



sub_41F720 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
push	edi
mov	esi, eax
xor	ebp, ebp
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebp
call	ds:InterlockedIncrement
lea	edi, [esi+8]
mov	dword ptr [esi], offset	off_1551FF0
mov	[edi], ebp
mov	[esi+0Ch], ebp
mov	[esi+10h], ebp
mov	[esi+14h], ebp
cmp	ebx, ebp
jnz	short loc_41F75D
xor	ebx, ebx
jmp	short loc_41F768

loc_41F75D:
push	ebx
call	sub_1172180
add	esp, 4
mov	ebx, eax

loc_41F768:
mov	[esp+14h+arg_0], ebx
cmp	[edi], ebx
jz	short loc_41F7A7
cmp	ebx, ebp
jz	short loc_41F77E
lea	eax, [ebx-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41F77E:
mov	eax, [edi]
cmp	eax, ebp
jz	short loc_41F7A5
movzx	edx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
mov	[esp+18h+var_4], edx
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41F7A5
mov	eax, [esp+14h+var_4]
push	edi
call	sub_1171F60

loc_41F7A5:
mov	[edi], ebx

loc_41F7A7:
cmp	ebx, ebp
jz	short loc_41F7CA
movzx	edi, word ptr [ebx-2]
add	ebx, 0FFFFFFF8h
push	ebx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41F7CA
lea	eax, [esp+14h+arg_0]
push	eax
mov	eax, edi
call	sub_1171F60

loc_41F7CA:
mov	edx, [esp+14h+arg_C]
mov	ecx, [esp+14h+arg_4]
mov	edi, [esp+14h+arg_8]
push	edx
mov	[esi+0Ch], ecx
call	sub_1239520
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_41F720 endp

align 10h



sub_41F7F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_41F841
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_41F841:
mov	dword ptr [eax+8], 0
add	esp, 14h
retn
sub_41F7F0 endp

align 10h



sub_41F850 proc	near
call	sub_41F7F0
mov	dword ptr [eax+4], 0
retn
sub_41F850 endp

align 10h



sub_41F860 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551FF8
call	sub_421300
mov	eax, [esi+8]
test	eax, eax
jz	short loc_41F889
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41F889:
test	[esp+4+arg_0], 1
jz	short loc_41F8A4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_41F8A4:
mov	eax, esi
pop	esi
retn	4
sub_41F860 endp

align 10h



sub_41F8B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11603D0
test	[esp+4+arg_0], 1
jz	short loc_41F8D9
test	esi, esi
jz	short loc_41F8D9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0A4h
push	3
push	esi
call	eax

loc_41F8D9:
mov	eax, esi
pop	esi
retn	4
sub_41F8B0 endp

align 10h



sub_41F8E0 proc	near
mov	eax, offset off_17EE290
retn
sub_41F8E0 endp

align 10h



sub_41F8F0 proc	near

arg_0= dword ptr  4

mov	ecx, [eax+94h]
cmp	ecx, [esp+arg_0]
setz	al
retn	4
sub_41F8F0 endp




sub_41F900 proc	near
mov	eax, [eax+0B4h]
movzx	ecx, word ptr [eax+0Ch]
mov	byte ptr [eax+6Eh], 0
test	cx, cx
jbe	short locret_41F925
mov	edx, [eax+20h]
push	edi
movzx	ecx, cx
push	edx
push	ecx
lea	edi, [eax+10h]
call	sub_123D2B0
pop	edi

locret_41F925:
retn
sub_41F900 endp

align 10h



; int __stdcall	sub_41F930(int,	int, float, float, float, float)
sub_41F930 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

fld	[esp+arg_14]
mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
mov	ecx, [ecx+0B4h]
sub	esp, 10h
fstp	[esp+10h+var_4]
fld	[esp+10h+arg_10]
fstp	[esp+10h+var_8]
fld	[esp+10h+arg_C]
fstp	[esp+10h+var_C]
fld	[esp+10h+arg_8]
fstp	[esp+10h+var_10]
push	eax		; int
push	edx		; int
call	sub_11354F0
retn	18h
sub_41F930 endp

align 10h



; int __stdcall	sub_41F970(int,	float, float, float, float)
sub_41F970 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

fld	[esp+arg_10]
mov	eax, [esp+arg_0]
mov	ecx, [ecx+0B4h]
sub	esp, 10h
fstp	[esp+10h+var_4]
fld	[esp+10h+arg_C]
fstp	[esp+10h+var_8]
fld	[esp+10h+arg_8]
fstp	[esp+10h+var_C]
fld	[esp+10h+arg_4]
fstp	[esp+10h+var_10]
push	eax		; int
call	sub_1135390
retn	14h
sub_41F970 endp

align 10h



sub_41F9B0 proc	near
mov	eax, [ecx+0B4h]
retn
sub_41F9B0 endp

align 10h



sub_41F9C0 proc	near
mov	ecx, [ecx+0B4h]
jmp	sub_1135610
sub_41F9C0 endp

align 10h



sub_41F9D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_4]
mov	[eax+4], edx
mov	edx, [esp+arg_8]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
retn	0Ch
sub_41F9D0 endp

align 10h



sub_41F9F0 proc	near
mov	edx, [eax]
mov	[ecx+110h], edx
mov	edx, [eax+4]
mov	[ecx+114h], edx
mov	edx, [eax+8]
mov	[ecx+118h], edx
mov	eax, [eax+0Ch]
mov	[ecx+11Ch], eax
retn
sub_41F9F0 endp

align 10h



sub_41FA20 proc	near
add	eax, 84h
retn
sub_41FA20 endp

align 10h



sub_41FA30 proc	near
fld	dword ptr [ecx+60h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+6Ch]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+78h]
fstp	dword ptr [eax+8]
retn
sub_41FA30 endp

align 10h



sub_41FA50 proc	near
fld	dword ptr [ecx+64h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+70h]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+7Ch]
fstp	dword ptr [eax+8]
retn
sub_41FA50 endp

align 10h



sub_41FA70 proc	near
fld	dword ptr [ecx+68h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+74h]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+80h]
fstp	dword ptr [eax+8]
retn
sub_41FA70 endp

align 10h



sub_41FA90 proc	near
add	eax, 0ECh
retn
sub_41FA90 endp

align 10h



sub_41FAA0 proc	near
add	eax, 110h
retn
sub_41FAA0 endp

align 10h



sub_41FAB0 proc	near

arg_0= byte ptr	 4

mov	eax, [ecx+94h]
cmp	eax, 1
jz	short loc_41FACA
cmp	eax, 2
jz	short loc_41FACA
cmp	eax, 4
jz	short loc_41FACA

loc_41FAC5:
xor	al, al
retn	4

loc_41FACA:
mov	cl, [ecx+90h]
cmp	cl, [esp+arg_0]
jz	short loc_41FADB
cmp	eax, 4
jnz	short loc_41FAC5

loc_41FADB:
mov	al, 1
retn	4
sub_41FAB0 endp




sub_41FAE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1160070
test	[esp+4+arg_0], 1
jz	short loc_41FB06
test	esi, esi
jz	short loc_41FB06
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_41FB06:
mov	eax, esi
pop	esi
retn	4
sub_41FAE0 endp

align 10h



sub_41FB10 proc	near
mov	eax, offset off_17EE298
retn
sub_41FB10 endp

align 10h



sub_41FB20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_15521F8
test	eax, eax
jz	short loc_41FB44
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41FB44:		; lpAddend
push	offset Addend
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_41FB77
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_41FB77:
mov	eax, esi
pop	esi
retn	4
sub_41FB20 endp

align 10h



sub_41FB80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_115FB80
test	[esp+4+arg_0], 1
jz	short loc_41FBA6
test	esi, esi
jz	short loc_41FBA6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_41FBA6:
mov	eax, esi
pop	esi
retn	4
sub_41FB80 endp

align 10h



sub_41FBB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+0]
push	esi
mov	esi, dword_1889518
xor	edx, edx
mov	eax, ecx
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_41FBDE

loc_41FBD3:
cmp	ecx, [eax+4]
jz	short loc_41FC0F
mov	eax, [eax]
test	eax, eax
jnz	short loc_41FBD3

loc_41FBDE:
mov	edx, [esi]
mov	eax, [edx+4]
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esp+10h+arg_4]
mov	edi, eax
push	ecx
push	edi
mov	eax, ebp
call	sub_41F630
mov	edx, [esi+8]
mov	eax, [edx+ebx*4]
mov	[edi], eax
mov	ecx, [esi+8]
mov	[ecx+ebx*4], edi
inc	dword ptr [esi+0Ch]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_41FC0F:
mov	ecx, [esp+0Ch+arg_4]
push	ecx
push	eax
mov	eax, ebp
call	sub_41F630
pop	esi
pop	ebp
pop	ebx
retn	8
sub_41FBB0 endp

align 10h



sub_41FC30 proc	near
push	esi
mov	esi, dword_1889518
push	edi
mov	edi, [eax]
xor	edx, edx
mov	eax, edi
div	dword ptr [esi+4]
mov	ecx, [esi+8]
mov	eax, [ecx+edx*4]
lea	ecx, [ecx+edx*4]
test	eax, eax
jz	short loc_41FC7E
cmp	edi, [eax+4]
jnz	short loc_41FC69

loc_41FC53:
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [esi]
push	eax
mov	eax, [edx+8]
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
pop	edi
mov	al, 1
pop	esi
retn

loc_41FC69:
mov	ecx, eax
mov	eax, [eax]
test	eax, eax
jz	short loc_41FC7E

loc_41FC71:
cmp	edi, [eax+4]
jz	short loc_41FC53
mov	ecx, eax
mov	eax, [eax]
test	eax, eax
jnz	short loc_41FC71

loc_41FC7E:
pop	edi
xor	al, al
pop	esi
retn
sub_41FC30 endp

align 10h



sub_41FC90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, dword_1889518
push	esi
mov	esi, [eax]
push	edi
mov	edi, [esi+4]
cmp	[ebx], edi
jz	short loc_41FCE2
test	edi, edi
jz	short loc_41FCB9
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_41FCB9:
mov	eax, [ebx]
test	eax, eax
jz	short loc_41FCE0
movzx	edx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
mov	[esp+14h+arg_4], edx
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41FCE0
mov	eax, [esp+10h+arg_4]
push	ebx
call	sub_1171F60

loc_41FCE0:
mov	[ebx], edi

loc_41FCE2:
mov	eax, [esi+8]
mov	ecx, [esp+10h+arg_8]
mov	[ecx], eax
mov	eax, [esi]
test	eax, eax
jz	short loc_41FCFE
mov	edx, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	[edx], eax
pop	ebx
retn	0Ch

loc_41FCFE:
mov	ecx, [ebp+4]
mov	eax, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_41FD21
mov	eax, [ebp+8]
lea	eax, [eax+edx*4]

loc_41FD13:
mov	esi, [eax]
test	esi, esi
jnz	short loc_41FD32
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_41FD13

loc_41FD21:
mov	edx, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [edx], 0
pop	ebx
retn	0Ch

loc_41FD32:
mov	ecx, [esp+10h+arg_0]
pop	edi
mov	[ecx], esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_41FC90 endp

align 10h



sub_41FD40 proc	near
mov	eax, offset off_17EE2A8
retn
sub_41FD40 endp

align 10h



sub_41FD50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1552234
call	sub_421300
mov	dword ptr [esi], offset	off_1551FF8
call	sub_421300
mov	eax, [esi+8]
test	eax, eax
jz	short loc_41FD84
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_41FD84:
test	[esp+4+arg_0], 1
jz	short loc_41FD9F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_41FD9F:
mov	eax, esi
pop	esi
retn	4
sub_41FD50 endp

align 10h



sub_41FDB0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+4]
test	esi, esi
jz	short loc_41FDF3
push	0
mov	[esp+0Ch+arg_0], esi
call	sub_1172180
add	esp, 4
mov	[edi+4], eax
test	esi, esi
jz	short loc_41FDF3
push	ebx
movzx	ebx, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_41FDF2
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, ebx
call	sub_1171F60

loc_41FDF2:
pop	ebx

loc_41FDF3:
mov	ecx, dword_1889574
mov	dword ptr [edi+8], 0
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax
pop	edi
pop	esi
retn	4
sub_41FDB0 endp

align 10h



sub_41FE20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_123C940
test	[esp+4+arg_0], 1
jz	short loc_41FE46
test	esi, esi
jz	short loc_41FE46
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_41FE46:
mov	eax, esi
pop	esi
retn	4
sub_41FE20 endp

align 10h



sub_41FE50 proc	near
mov	eax, offset off_17EE2B0
retn
sub_41FE50 endp

align 10h



sub_41FE60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_123C300
test	[esp+4+arg_0], 1
jz	short loc_41FE89
test	esi, esi
jz	short loc_41FE89
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8Ch
push	3
push	esi
call	eax

loc_41FE89:
mov	eax, esi
pop	esi
retn	4
sub_41FE60 endp

align 10h



sub_41FE90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_115F780
test	[esp+4+arg_0], 1
jz	short loc_41FEB6
test	esi, esi
jz	short loc_41FEB6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_41FEB6:
mov	eax, esi
pop	esi
retn	4
sub_41FE90 endp

align 10h



sub_41FEC0 proc	near
mov	eax, offset off_17EE2C0
retn
sub_41FEC0 endp

align 10h



sub_41FED0 proc	near

var_4= dword ptr -4

push	ecx
mov	ecx, [eax+4]
push	esi
test	ecx, ecx
jz	short loc_41FEF7
lea	esp, [esp+0]

loc_41FEE0:
mov	esi, ecx
test	ecx, ecx
jnz	short loc_41FEEA
xor	edx, edx
jmp	short loc_41FEEF

loc_41FEEA:
lea	edx, [ecx+8]
mov	ecx, [ecx]

loc_41FEEF:
cmp	edi, edx
jz	short loc_41FF0C
test	ecx, ecx
jnz	short loc_41FEE0

loc_41FEF7:
xor	ecx, ecx

loc_41FEF9:
mov	[esp+8+var_4], ecx
pop	esi
test	ecx, ecx
jz	short loc_41FF0A
lea	edx, [esp+4+var_4]
call	sub_414230

loc_41FF0A:
pop	ecx
retn

loc_41FF0C:
mov	ecx, esi
jmp	short loc_41FEF9
sub_41FED0 endp




sub_41FF10 proc	near
mov	ecx, [eax+4]
push	esi
test	ecx, ecx
jz	short loc_41FF2F
mov	esi, [edx]
lea	ebx, [ebx+0]

loc_41FF20:
lea	edx, [ecx+8]
mov	eax, ecx
mov	ecx, [ecx]
cmp	esi, [edx]
jz	short loc_41FF31
test	ecx, ecx
jnz	short loc_41FF20

loc_41FF2F:
xor	eax, eax

loc_41FF31:
pop	esi
retn
sub_41FF10 endp

align 10h



sub_41FF40 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	eax, [edi]
xor	ecx, ecx
mov	[esi+4], eax
cmp	eax, ecx
jz	short loc_41FF59
mov	[eax+4], ecx
jmp	short loc_41FF5C

loc_41FF59:
mov	[esi+8], ecx

loc_41FF5C:
mov	eax, [edi+8]
mov	[ebx], eax
cmp	eax, ecx
jz	short loc_41FF6F
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_41FF6F:
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	ecx, esi
call	edx
dec	dword ptr [esi+0Ch]
pop	edi
mov	eax, ebx
pop	ebx
retn	4
sub_41FF40 endp

align 10h



sub_41FF90 proc	near
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_41FFAB
lea	ecx, [ecx+0]

loc_41FFA0:
cmp	eax, edi
jz	short loc_41FFB7
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_41FFA0

loc_41FFAB:
xor	al, al
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn

loc_41FFB7:
mov	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn
sub_41FF90 endp

align 10h



sub_41FFD0 proc	near
push	esi
mov	esi, eax
mov	eax, [edx]
push	edi
cmp	eax, [esi+4]
jnz	short loc_420023
mov	eax, [eax]
mov	[edx], eax
mov	ecx, [esi+4]
mov	eax, [ecx]
mov	[esi+4], eax
test	eax, eax
jz	short loc_420007
mov	dword ptr [eax+4], 0
mov	edx, [esi]
mov	edi, [ecx+8]
mov	eax, [edx+8]
push	ecx
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	esi
retn

loc_420007:
mov	edx, [esi]
mov	eax, [edx+8]
mov	dword ptr [esi+8], 0
mov	edi, [ecx+8]
push	ecx
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	esi
retn

loc_420023:
cmp	eax, [esi+8]
jnz	short loc_420036
mov	dword ptr [edx], 0
call	sub_417580
pop	edi
pop	esi
retn

loc_420036:
mov	edi, [eax+4]
mov	ecx, [eax]
mov	[edx], ecx
test	edi, edi
jz	short loc_420043
mov	[edi], ecx

loc_420043:
test	ecx, ecx
jz	short loc_42004A
mov	[ecx+4], edi

loc_42004A:
mov	edx, [esi]
mov	edi, [eax+8]
push	eax
mov	eax, [edx+8]
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	esi
retn
sub_41FFD0 endp

align 10h



sub_420060 proc	near

arg_0= dword ptr  4

mov	ecx, [eax+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
test	ecx, ecx
jz	short loc_42007F
mov	edi, [ebx]

loc_420070:
lea	edx, [ecx+8]
mov	esi, ecx
mov	ecx, [ecx]
cmp	edi, [edx]
jz	short loc_420081
test	ecx, ecx
jnz	short loc_420070

loc_42007F:
xor	esi, esi

loc_420081:
mov	[esp+0Ch+arg_0], esi
test	esi, esi
jz	short loc_420098
lea	edx, [esp+0Ch+arg_0]
call	sub_41FFD0
pop	edi
pop	esi
pop	ebx
retn	4

loc_420098:
mov	eax, [ebx]
pop	edi
pop	esi
pop	ebx
retn	4
sub_420060 endp




sub_4200A0 proc	near
mov	eax, offset off_17EF884
retn
sub_4200A0 endp

align 10h



sub_4200B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+3B8h]
push	edi
lea	edi, [esi+3B8h]
test	eax, eax
jz	short loc_4200E1
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4200E0
push	edi
mov	eax, ebx
call	sub_1171F60

loc_4200E0:
pop	ebx

loc_4200E1:
push	esi
call	sub_420110
test	[esp+8+arg_0], 1
jz	short loc_420108
test	esi, esi
jz	short loc_420108
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3C0h
push	3
push	esi
call	eax

loc_420108:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_4200B0 endp

align 10h



sub_420110 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+3A0h]
push	esi
lea	esi, [ebp+39Ch]
push	edi
mov	dword ptr [esi], offset	off_1554C5C
test	eax, eax
jz	short loc_420142
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_420142:
mov	edi, esi
mov	ebx, 24h
lea	esp, [esp+0]

loc_420150:
mov	eax, [edi-0Ch]
sub	edi, 0Ch
test	eax, eax
jz	short loc_420186
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_41A470
push	ecx
push	14h
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_420186
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_420186:
sub	ebx, 1
jns	short loc_420150
lea	edi, [ebp+1E0h]
mov	ebx, 24h

loc_420196:
sub	edi, 0Ch
push	edi
call	sub_426DB0
mov	eax, [edi]
test	eax, eax
jz	short loc_4201D1
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4201D1
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4201D1:
sub	ebx, 1
jns	short loc_420196
lea	edi, [ebp+24h]
mov	ebp, ds:InterlockedDecrement
mov	ebx, 2

loc_4201E4:
mov	esi, [edi-4]
sub	edi, 4
test	esi, esi
jz	short loc_420201
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_420201
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_420201:
sub	ebx, 1
jns	short loc_4201E4
mov	edi, [esp+10h+arg_0]
lea	esi, [edi+0Ch]
push	esi
call	sub_426DB0
mov	eax, [esi]
test	eax, eax
jz	short loc_420245
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_420245
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_420245:
mov	ecx, edi
call	sub_115FB80
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_420110 endp

align 10h



sub_420260 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, [edi+10h]
test	esi, esi
jz	short loc_420282
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_420282
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_420282:
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_42029C
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_42029C
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_42029C:
mov	esi, [edi+8]
test	esi, esi
jz	short loc_4202B6
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4202B6
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4202B6:
mov	esi, [edi+4]
test	esi, esi
jz	short loc_4202D0
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4202D0
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_4202D0:
mov	esi, [edi]
test	esi, esi
jz	short loc_4202EB
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_4202EB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
pop	esi
pop	ebx
jmp	eax

loc_4202EB:
pop	esi
pop	ebx
retn
sub_420260 endp

align 10h



sub_4202F0 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_42030E
test	eax, eax
jbe	short loc_420303
add	eax, eax
jmp	short loc_420308

loc_420303:
mov	eax, 1

loc_420308:
push	eax
call	sub_420380

loc_42030E:
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [edi]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	[eax], edx
mov	ecx, [edi+4]
mov	[eax+4], ecx
mov	edx, [edi+8]
mov	[eax+8], edx
inc	dword ptr [esi+8]
pop	esi
retn
sub_4202F0 endp

align 10h



sub_420330 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_42036A
test	esi, esi
jz	short loc_42035A
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42035A
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_42035A:
mov	[ebx], edi
test	edi, edi
jz	short loc_42036A
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_42036A:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	4
sub_420330 endp

align 10h



sub_420380 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
cmp	edi, [esi+4]
jz	short loc_4203E9
push	ebx
test	edi, edi
jbe	short loc_4203C7
call	sub_4203F0
xor	edx, edx
mov	ebx, eax
cmp	[esi+8], edx
jbe	short loc_4203C9
xor	ecx, ecx
nop

loc_4203A0:
mov	eax, [esi]
mov	edi, [eax+ecx]
add	eax, ecx
mov	[ecx+ebx], edi
mov	edi, [eax+4]
mov	[ecx+ebx+4], edi
mov	eax, [eax+8]
mov	[ecx+ebx+8], eax
inc	edx
add	ecx, 0Ch
cmp	edx, [esi+8]
jb	short loc_4203A0
mov	edi, [esp+8+arg_0]
jmp	short loc_4203C9

loc_4203C7:
xor	ebx, ebx

loc_4203C9:
mov	eax, [esi]
test	eax, eax
jz	short loc_4203E3
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_4203E3:
mov	[esi], ebx
mov	[esi+4], edi
pop	ebx

loc_4203E9:
pop	edi
retn	4
sub_420380 endp

align 10h



sub_4203F0 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 0Ch
mul	edx
seto	cl
push	esi
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
mov	esi, eax
add	esp, 4
test	esi, esi
jz	short loc_420424
push	offset sub_114DA10
push	edi
push	0Ch
push	esi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_420424:
xor	eax, eax
pop	esi
retn
sub_4203F0 endp

align 10h



sub_420430 proc	near
mov	eax, offset off_17EE2C8
retn
sub_420430 endp

align 10h



sub_420440 proc	near
mov	ecx, [eax+20h]
mov	eax, [ecx+10h]
retn
sub_420440 endp

align 10h



sub_420450 proc	near
mov	ecx, [eax+20h]
mov	eax, [ecx]
retn
sub_420450 endp

align 10h



sub_420460 proc	near
mov	ecx, [esi+0B4h]
mov	eax, [ecx]
mov	edx, [eax+4Ch]
push	edi
call	edx
test	al, al
jz	short loc_420475
mov	al, 1
retn

loc_420475:
mov	ecx, [esi+0B8h]
test	ecx, ecx
jz	short loc_420486
mov	edx, edi
jmp	sub_1168450

loc_420486:
xor	al, al
retn
sub_420460 endp

align 10h



sub_420490 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_420110
test	[esp+4+arg_0], 1
jz	short loc_4204BA
test	esi, esi
jz	short loc_4204BA
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3B8h
push	3
push	esi
call	eax

loc_4204BA:
mov	eax, esi
pop	esi
retn	4
sub_420490 endp




sub_4204C0 proc	near
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_420500
push	ecx
push	58h
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4204ED
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4204ED:
mov	eax, esi
pop	esi
retn
sub_4204C0 endp

align 10h



sub_420500 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+40h]
test	eax, eax
jz	short loc_420521
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_420521:
mov	eax, [edi+28h]
mov	ebx, ds:InterlockedDecrement
lea	esi, [edi+28h]
test	eax, eax
jz	short loc_420548
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_420548
push	esi
mov	eax, ebp
call	sub_1171F60

loc_420548:
mov	eax, [edi+14h]
lea	esi, [edi+14h]
test	eax, eax
jz	short loc_420569
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_420569
push	esi
mov	eax, ebp
call	sub_1171F60

loc_420569:
mov	eax, [edi]
test	eax, eax
jz	short loc_420586
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_420586
push	edi
mov	eax, esi
call	sub_1171F60

loc_420586:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_420500 endp

align 10h



sub_420590 proc	near
xor	eax, eax
mov	[ecx], eax
mov	[ecx+4], eax
mov	[ecx+8], eax
retn
sub_420590 endp

align 10h



sub_4205A0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	eax, [esi+4]
push	edi
cmp	[esi+8], eax
jnz	short loc_4205C5
test	eax, eax
jbe	short loc_4205B9
add	eax, eax
jmp	short loc_4205BE

loc_4205B9:
mov	eax, 1

loc_4205BE:
push	eax
push	esi
call	sub_4206B0

loc_4205C5:
mov	eax, [esi+8]
mov	ecx, [esi]
lea	edi, [ecx+eax*4]
inc	eax
mov	[esi+8], eax
mov	esi, [edi]
cmp	esi, [ebx]
jz	short loc_42060A
test	esi, esi
jz	short loc_4205F2
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4205F2
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_4205F2:
mov	eax, [ebx]
mov	[edi], eax
test	eax, eax
jz	short loc_42060A
pop	edi
pop	esi
add	eax, 4
pop	ebx
mov	[esp+arg_0], eax
jmp	ds:InterlockedIncrement

loc_42060A:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4205A0 endp




sub_420610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
cmp	ebx, [ebp+4]
jz	loc_4206A7
push	esi
push	edi
test	ebx, ebx
jbe	short loc_420661
mov	edi, ebx
call	sub_420780
xor	edi, edi
mov	[esp+10h+arg_0], eax
cmp	[ebp+8], edi
jbe	short loc_420669
xor	ebx, ebx
lea	ecx, [ecx+0]

loc_420640:
mov	eax, [ebp+0]
mov	ecx, [esp+10h+arg_0]
add	eax, ebx
push	eax
lea	esi, [ebx+ecx]
call	sub_123A480
inc	edi
add	ebx, 14h
cmp	edi, [ebp+8]
jb	short loc_420640
mov	ebx, [esp+10h+arg_4]
jmp	short loc_420669

loc_420661:
mov	[esp+10h+arg_0], 0

loc_420669:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_42069B
mov	edx, [eax-4]
lea	esi, [eax-4]
push	offset sub_41A470
push	edx
push	14h
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_42069B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	esi
call	eax

loc_42069B:
mov	ecx, [esp+10h+arg_0]
pop	edi
mov	[ebp+0], ecx
mov	[ebp+4], ebx
pop	esi

loc_4206A7:
pop	ebp
pop	ebx
retn	8
sub_420610 endp

align 10h



sub_4206B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
cmp	edi, [esi+4]
jz	loc_420774
push	ebx
push	ebp
test	edi, edi
jbe	short loc_42073A
call	sub_5FB570
mov	ebp, eax
xor	eax, eax
mov	[esp+14h+var_4], eax
cmp	[esi+8], eax
jbe	short loc_42073C
lea	esp, [esp+0]

loc_4206E0:
mov	esi, [esi]
lea	ebx, ds:0[eax*4]
mov	edi, [ebx+ebp]
add	esi, ebx
cmp	edi, [esi]
jz	short loc_420720
test	edi, edi
jz	short loc_42070D
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42070D
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42070D:
mov	esi, [esi]
mov	[ebx+ebp], esi
test	esi, esi
jz	short loc_420720
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_420720:
mov	eax, [esp+14h+var_4]
mov	ecx, [esp+14h+arg_0]
inc	eax
mov	[esp+14h+var_4], eax
mov	esi, ecx
cmp	eax, [ecx+8]
jb	short loc_4206E0
mov	edi, [esp+14h+arg_4]
jmp	short loc_42073C

loc_42073A:
xor	ebp, ebp

loc_42073C:
mov	eax, [esi]
test	eax, eax
jz	short loc_42076D
mov	edx, [eax-4]
lea	ebx, [eax-4]
push	offset sub_429100
push	edx
push	4
push	eax
call	sub_40F3E0
test	ebx, ebx
jz	short loc_42076D
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	ebx
call	eax

loc_42076D:
mov	[esi], ebp
pop	ebp
mov	[esi+4], edi
pop	ebx

loc_420774:
pop	edi
pop	esi
pop	ecx
retn	8
sub_4206B0 endp

align 10h



sub_420780 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 14h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_4207C3
push	esi
push	offset sub_123A4E0
push	edi
lea	esi, [eax+4]
push	14h
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_4207C3:
xor	eax, eax
retn
sub_420780 endp

align 10h



sub_4207D0 proc	near
mov	eax, offset off_17EE2D0
retn
sub_4207D0 endp

align 10h



sub_4207E0 proc	near
mov	eax, [esi]
mov	edx, [eax]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_4207FE
lea	esp, [esp+0]

loc_4207F0:
cmp	eax, offset off_17EF794
jz	short loc_42080A
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_4207F0

loc_4207FE:
xor	al, al
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn

loc_42080A:
mov	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn
sub_4207E0 endp

align 10h



sub_420820 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_114D0D0
test	[esp+4+arg_0], 1
jz	short loc_420846
test	esi, esi
jz	short loc_420846
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	70h
push	3
push	esi
call	eax

loc_420846:
mov	eax, esi
pop	esi
retn	4
sub_420820 endp

align 10h



sub_420850 proc	near
mov	eax, offset off_17EE2D8
retn
sub_420850 endp

align 10h



sub_420860 proc	near
push	esi
mov	esi, ecx
test	esi, esi
jbe	short loc_4208A1

loc_420867:
movzx	edx, byte ptr [eax+7]
mov	cl, [eax]
mov	[eax], dl
mov	[eax+7], cl
movzx	edx, byte ptr [eax+6]
mov	cl, [eax+1]
mov	[eax+1], dl
mov	[eax+6], cl
movzx	edx, byte ptr [eax+5]
mov	cl, [eax+2]
mov	[eax+2], dl
mov	[eax+5], cl
movzx	edx, byte ptr [eax+4]
mov	cl, [eax+3]
mov	[eax+3], dl
mov	[eax+4], cl
add	eax, 8
sub	esi, 1
jnz	short loc_420867

loc_4208A1:
pop	esi
retn
sub_420860 endp

align 10h



sub_4208B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_4208E0
test	[esp+4+arg_0], 1
jz	short loc_4208D7
test	esi, esi
jz	short loc_4208D7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	50h
push	3
push	esi
call	eax

loc_4208D7:
mov	eax, esi
pop	esi
retn	4
sub_4208B0 endp

align 10h



sub_4208E0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
add	edi, 50h
mov	ebx, 5

loc_4208F6:
mov	esi, [edi-4]
sub	edi, 4
test	esi, esi
jz	short loc_420913
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_420913
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_420913:
sub	ebx, 1
jns	short loc_4208F6
mov	eax, [esp+10h+arg_0]
call	sub_420940
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_4208E0 endp

align 10h



sub_420930 proc	near
mov	eax, offset off_17EE2E0
retn
sub_420930 endp

align 10h



sub_420940 proc	near
push	esi
mov	esi, eax
push	edi
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_420962
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_420962
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_420962:
mov	ecx, [esi+24h]
mov	dword ptr [esi], offset	off_1551248
test	ecx, ecx
jz	short loc_420977
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_420977:
call	sub_41A8E0
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_123E740
sub_420940 endp

align 10h



sub_420990 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_420940
test	[esp+4+arg_0], 1
jz	short loc_4209B8
test	esi, esi
jz	short loc_4209B8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_4209B8:
mov	eax, esi
pop	esi
retn	4
sub_420990 endp

align 10h



sub_4209C0 proc	near
mov	eax, offset off_17EF7D4
retn
sub_4209C0 endp

align 10h



sub_4209D0 proc	near
mov	eax, [ecx+30h]
test	eax, eax
jz	short loc_4209DB
mov	eax, [eax+8]
retn

loc_4209DB:
xor	eax, eax
retn
sub_4209D0 endp

align 10h



sub_4209E0 proc	near
mov	eax, [ecx+30h]
test	eax, eax
jz	short loc_4209EB
mov	eax, [eax+0Ch]
retn

loc_4209EB:
xor	eax, eax
retn
sub_4209E0 endp

align 10h



sub_4209F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_114BA50
test	[esp+4+arg_0], 1
jz	short loc_420A16
test	esi, esi
jz	short loc_420A16
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_420A16:
mov	eax, esi
pop	esi
retn	4
sub_4209F0 endp

align 10h



sub_420A20 proc	near
mov	eax, offset off_17EE2E8
retn
sub_420A20 endp

align 10h



sub_420A30 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	[ecx+0Ch], ax
mov	[ecx+30h], ax
retn	4
sub_420A30 endp




sub_420A40 proc	near
mov	eax, [esi+4]
test	eax, eax
jz	short loc_420A5B
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_420A5B:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax
mov	eax, esi
retn
sub_420A40 endp

align 10h



sub_420A80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_114A870
test	[esp+4+arg_0], 1
jz	short loc_420AA6
test	esi, esi
jz	short loc_420AA6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	58h
push	3
push	esi
call	eax

loc_420AA6:
mov	eax, esi
pop	esi
retn	4
sub_420A80 endp

align 10h



sub_420AB0 proc	near
mov	eax, offset off_17EE2F0
retn
sub_420AB0 endp

align 10h



sub_420AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

lea	eax, [edi+edi]
sub	esp, 8
test	eax, eax
jnz	short loc_420ACF
mov	eax, 1

loc_420ACF:
push	0
push	0FFFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	dword ptr [esi+10h], 0
mov	eax, esi
add	esp, 8
retn
sub_420AC0 endp

align 10h



sub_420B20 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], cx
mov	[eax+4], ecx
retn
sub_420B20 endp

align 10h



sub_420B30 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	[ecx+40h], ax
mov	[ecx+42h], ax
retn	4
sub_420B30 endp




sub_420B40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_420B5D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_420B5D:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_420B6B
push	1
call	sub_420B40

loc_420B6B:
test	[esp+4+arg_0], 1
jz	short loc_420B86
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_420B86:
mov	eax, esi
pop	esi
retn	4
sub_420B40 endp

align 10h



sub_420B90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_114A1B0
test	[esp+4+arg_0], 1
jz	short loc_420BB6
test	esi, esi
jz	short loc_420BB6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	50h
push	3
push	esi
call	eax

loc_420BB6:
mov	eax, esi
pop	esi
retn	4
sub_420B90 endp

align 10h



sub_420BC0 proc	near
mov	eax, offset off_17EE2F8
retn
sub_420BC0 endp

align 10h



sub_420BD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx+4Ch]
push	ebx
mov	ebx, [ecx+48h]
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
movzx	esi, word ptr [ebx]
lea	ecx, [esi-2]
movzx	ecx, cx
push	edi
xor	edi, edi
cmp	dx, cx
jb	short loc_420C0C
movzx	esi, si

loc_420BF1:
sub	edx, ecx
movzx	ecx, si
lea	eax, [eax+ecx*2]
inc	edi
movzx	ecx, di
movzx	esi, word ptr [ebx+ecx*2]
lea	ecx, [esi-2]
movzx	ecx, cx
cmp	dx, cx
jnb	short loc_420BF1

loc_420C0C:
mov	esi, [esp+10h+arg_0]
movzx	ecx, dx
test	dl, 1
jz	short loc_420C26
movzx	edx, word ptr [eax+ecx*2+2]
mov	[esi], dx
movzx	edx, word ptr [eax+ecx*2]
jmp	short loc_420C32

loc_420C26:
movzx	edx, word ptr [eax+ecx*2]
mov	[esi], dx
movzx	edx, word ptr [eax+ecx*2+2]

loc_420C32:
mov	esi, [esp+10h+arg_4]
mov	[esi], dx
mov	ax, [eax+ecx*2+4]
pop	edi
pop	esi
mov	[ebp+0], ax
pop	ebp
pop	ebx
retn	0Ch
sub_420BD0 endp

align 10h



sub_420C50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1149A00
test	[esp+4+arg_0], 1
jz	short loc_420C76
test	esi, esi
jz	short loc_420C76
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_420C76:
mov	eax, esi
pop	esi
retn	4
sub_420C50 endp

align 10h



sub_420C80 proc	near

var_4= dword ptr -4

mov	dword ptr [ecx], offset	off_1551AD0
jmp	sub_1162120
sub_420C80 endp

align 10h



sub_420C90 proc	near
mov	eax, offset off_17EE308
retn
sub_420C90 endp

align 10h



sub_420CA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551AD0
call	sub_1162120
test	[esp+4+arg_0], 1
jz	short loc_420CCB
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0D4h
push	3
push	esi
call	eax

loc_420CCB:
mov	eax, esi
pop	esi
retn	4
sub_420CA0 endp

align 10h



sub_420CE0 proc	near
mov	eax, offset off_17EE310
retn
sub_420CE0 endp

align 10h



sub_420CF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_1295EA0
test	[esp+4+arg_0], 1
jz	short loc_420D17
test	esi, esi
jz	short loc_420D17
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_420D17:
mov	eax, esi
pop	esi
retn	4
sub_420CF0 endp

align 10h



sub_420D20 proc	near
mov	eax, [eax]
retn
sub_420D20 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12734D0

loc_420D30:
push	esi
mov	esi, eax
mov	eax, dword_188AAA4
cmp	eax, esi
jz	short loc_420D6F
test	eax, eax
jz	short loc_420D5B
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_420D5A
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_420D5A:
pop	edi

loc_420D5B:
mov	dword_188AAA4, esi
test	esi, esi
jz	short loc_420D6F
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_420D6F:
mov	eax, offset dword_188AAA4
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_12734D0
align 10h



sub_420D80 proc	near
mov	eax, offset off_17EE328
retn
sub_420D80 endp

align 10h



sub_420D90 proc	near
mov	eax, offset off_17EF76C
retn
sub_420D90 endp

align 10h



sub_420DA0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1552968
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_420DCB
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_420DCB
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_420DCB:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_420DF3
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_420DF3:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_420DA0 endp

align 10h



sub_420E00 proc	near
mov	eax, offset off_17EF774
retn
sub_420E00 endp

align 10h



sub_420E10 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1552A14
mov	dword_1889520, 0
jz	short loc_420E3D
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4
push	3
push	esi
call	eax

loc_420E3D:
mov	eax, esi
pop	esi
retn	4
sub_420E10 endp

align 10h



sub_420E50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1147940
test	[esp+4+arg_0], 1
jz	short loc_420E76
test	esi, esi
jz	short loc_420E76
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4Ch
push	3
push	esi
call	eax

loc_420E76:
mov	eax, esi
pop	esi
retn	4
sub_420E50 endp

align 10h



sub_420E80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esi+4]
cmp	[ebx], edi
jz	short loc_420ECB
test	edi, edi
jz	short loc_420EA4
lea	eax, [edi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_420EA4:
mov	eax, [ebx]
test	eax, eax
jz	short loc_420EC9
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_420EC5
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_420EC5:
mov	ebp, [esp+10h+arg_4]

loc_420EC9:
mov	[ebx], edi

loc_420ECB:
mov	ebx, [esp+10h+arg_C]
mov	edi, [ebx]
cmp	edi, [esi+8]
jz	short loc_420F04
test	edi, edi
jz	short loc_420EF1
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_420EF1
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_420EF1:
mov	eax, [esi+8]
mov	[ebx], eax
test	eax, eax
jz	short loc_420F04
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_420F04:
mov	eax, [esi]
test	eax, eax
jz	short loc_420F14
pop	edi
pop	esi
mov	[ebp+0], eax
pop	ebp
pop	ebx
retn	10h

loc_420F14:
mov	edi, [esp+10h+arg_0]
mov	ecx, [edi+4]
mov	eax, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_420F3E
mov	eax, [edi+8]
lea	eax, [eax+edx*4]
lea	ecx, [ecx+0]

loc_420F30:
mov	esi, [eax]
test	esi, esi
jnz	short loc_420F4C
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_420F30

loc_420F3E:
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebp
pop	ebx
retn	10h

loc_420F4C:
pop	edi
mov	[ebp+0], esi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_420E80 endp

align 10h



sub_420F60 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+0]
xor	edx, edx
mov	eax, ecx
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_420F8B
lea	esp, [esp+0]

loc_420F80:
cmp	ecx, [eax+4]
jz	short loc_420FB6
mov	eax, [eax]
test	eax, eax
jnz	short loc_420F80

loc_420F8B:
mov	edx, [esi]
mov	eax, [edx+4]
push	edi
mov	ecx, esi
call	eax
mov	edi, eax
push	edi
mov	eax, ebp
call	sub_421110
mov	ecx, [esi+8]
mov	edx, [ecx+ebx*4]
mov	[edi], edx
mov	eax, [esi+8]
mov	[eax+ebx*4], edi
inc	dword ptr [esi+0Ch]
pop	edi
pop	ebp
pop	ebx
retn	4

loc_420FB6:
push	eax
mov	eax, ebp
call	sub_421110
pop	ebp
pop	ebx
retn	4
sub_420F60 endp

align 10h



sub_420FD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esi+4]
cmp	[ebx], edi
jz	short loc_42101B
test	edi, edi
jz	short loc_420FF4
lea	eax, [edi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_420FF4:
mov	eax, [ebx]
test	eax, eax
jz	short loc_421019
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_421015
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_421015:
mov	ebp, [esp+10h+arg_4]

loc_421019:
mov	[ebx], edi

loc_42101B:
mov	eax, [esi]
mov	cl, [esi+8]
mov	edx, [esp+10h+arg_C]
mov	[edx], cl
test	eax, eax
jz	short loc_421034
pop	edi
pop	esi
mov	[ebp+0], eax
pop	ebp
pop	ebx
retn	10h

loc_421034:
mov	edi, [esp+10h+arg_0]
mov	ecx, [edi+4]
mov	eax, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_42105E
mov	eax, [edi+8]
lea	eax, [eax+edx*4]
lea	ecx, [ecx+0]

loc_421050:
mov	esi, [eax]
test	esi, esi
jnz	short loc_42106C
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_421050

loc_42105E:
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebp
pop	ebx
retn	10h

loc_42106C:
pop	edi
mov	[ebp+0], esi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_420FD0 endp

align 10h



sub_421080 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, eax
mov	eax, [edi+8]
dec	eax
cmp	ebp, eax
jnb	short loc_4210D8
push	ebx

loc_421092:
mov	ecx, [edi]
mov	ebx, [ecx+ebp*4]
cmp	ebx, [ecx+ebp*4+4]
lea	esi, [ecx+ebp*4]
jz	short loc_4210CE
test	ebx, ebx
jz	short loc_4210BB
lea	edx, [ebx+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4210BB
mov	eax, [ebx]
mov	edx, [eax+4]
mov	ecx, ebx
call	edx

loc_4210BB:
mov	eax, [esi+4]
mov	[esi], eax
test	eax, eax
jz	short loc_4210CE
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4210CE:
mov	eax, [edi+8]
inc	ebp
dec	eax
cmp	ebp, eax
jb	short loc_421092
pop	ebx

loc_4210D8:
dec	dword ptr [edi+8]
mov	eax, [edi+8]
mov	ecx, [edi]
mov	esi, [ecx+eax*4]
lea	edi, [ecx+eax*4]
test	esi, esi
jz	short loc_421107
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_421101
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_421101:
mov	dword ptr [edi], 0

loc_421107:
pop	edi
pop	esi
pop	ebp
retn	4
sub_421080 endp

align 10h



sub_421110 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [eax]
cmp	[ebp+4], edi
lea	esi, [ebp+4]
jz	short loc_421154
test	edi, edi
jz	short loc_42112F
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_42112F:
mov	eax, [esi]
test	eax, eax
jz	short loc_421152
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_421151
push	esi
mov	eax, ebx
call	sub_1171F60

loc_421151:
pop	ebx

loc_421152:
mov	[esi], edi

loc_421154:
pop	edi
pop	esi
mov	byte ptr [ebp+8], 1
pop	ebp
retn	4
sub_421110 endp

align 10h



sub_421160 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	ebx, ebx
cmp	[ebp+4], ebx
jbe	short loc_4211C4
push	esi
push	edi
nop

loc_421170:
mov	eax, [ebp+0]
mov	esi, [eax+ebx*4]
lea	edi, [eax+ebx*4]
test	esi, esi
jz	short loc_4211B0
push	0
mov	[esp+14h+arg_0], esi
call	sub_1172180
add	esp, 4
mov	[edi], eax
test	esi, esi
jz	short loc_4211B0
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4211B0
lea	ecx, [esp+10h+arg_0]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_4211B0:
inc	ebx
cmp	ebx, [ebp+4]
jb	short loc_421170
pop	edi
pop	esi
mov	dword ptr [ebp+8], 0
pop	ebp
pop	ebx
retn	4

loc_4211C4:
mov	[ebp+8], ebx
pop	ebp
pop	ebx
retn	4
sub_421160 endp

align 10h



sub_4211D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1552AB0
call	sub_421300
mov	dword ptr [esi], offset	off_1551FF8
call	sub_421300
mov	eax, [esi+8]
test	eax, eax
jz	short loc_421204
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_421204:
test	[esp+4+arg_0], 1
jz	short loc_42121F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_42121F:
mov	eax, esi
pop	esi
retn	4
sub_4211D0 endp

align 10h



sub_421230 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_421281
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_421281:
mov	byte ptr [eax+8], 0
add	esp, 14h
retn
sub_421230 endp

align 10h



sub_421290 proc	near
call	sub_421230
mov	dword ptr [eax+4], 0
retn
sub_421290 endp

align 10h



sub_4212A0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+4]
test	esi, esi
jz	short loc_4212E3
push	0
mov	[esp+0Ch+arg_0], esi
call	sub_1172180
add	esp, 4
mov	[edi+4], eax
test	esi, esi
jz	short loc_4212E3
push	ebx
movzx	ebx, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4212E2
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, ebx
call	sub_1171F60

loc_4212E2:
pop	ebx

loc_4212E3:
mov	ecx, dword_1889574
mov	byte ptr [edi+8], 0
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax
pop	edi
pop	esi
retn	4
sub_4212A0 endp




sub_421300 proc	near
push	edi
xor	edi, edi
cmp	[esi+4], edi
jbe	short loc_42134E
jmp	short loc_421310
align 10h

loc_421310:
mov	eax, [esi+8]
cmp	dword ptr [eax+edi*4], 0
jz	short loc_42133F
lea	esp, [esp+0]

loc_421320:
mov	ecx, [esi+8]
lea	eax, [ecx+edi*4]
mov	ecx, [eax]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
mov	ecx, esi
call	edx
mov	eax, [esi+8]
cmp	dword ptr [eax+edi*4], 0
jnz	short loc_421320

loc_42133F:
inc	edi
cmp	edi, [esi+4]
jb	short loc_421310
mov	dword ptr [esi+0Ch], 0
pop	edi
retn

loc_42134E:
mov	[esi+0Ch], edi
pop	edi
retn
sub_421300 endp

align 10h



sub_421360 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1552AA4
call	sub_421300
mov	dword ptr [esi], offset	off_1551FF8
call	sub_421300
mov	eax, [esi+8]
test	eax, eax
jz	short loc_421394
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_421394:
test	[esp+4+arg_0], 1
jz	short loc_4213AF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_4213AF:
mov	eax, esi
pop	esi
retn	4
sub_421360 endp

align 10h



sub_4213C0 proc	near
call	sub_5F9180
mov	dword ptr [eax+4], 0
retn
sub_4213C0 endp

align 10h



sub_4213D0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
test	edi, edi
jz	short loc_421416
push	0
mov	[esp+10h+arg_0], edi
call	sub_1172180
add	esp, 4
mov	[esi+4], eax
test	edi, edi
jz	short loc_421416
push	ebx
movzx	ebx, word ptr [edi-2]
add	edi, 0FFFFFFF8h
push	edi		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_421415
lea	eax, [esp+10h+arg_0]
push	eax
mov	eax, ebx
call	sub_1171F60

loc_421415:
pop	ebx

loc_421416:
mov	edi, [esi+8]
test	edi, edi
jz	short loc_421437
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_421430
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_421430:
mov	dword ptr [esi+8], 0

loc_421437:
test	esi, esi
jz	short loc_421440
call	sub_5F9220

loc_421440:
pop	edi
pop	esi
pop	ebp
retn	4
sub_4213D0 endp

align 10h



sub_421450 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1552AC0
mov	edi, [esi+3Ch]
test	edi, edi
jz	short loc_42147F
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_421478
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_421478:
mov	dword ptr [esi+3Ch], 0

loc_42147F:
mov	ecx, esi
call	sub_41BE50
test	[esp+8+arg_0], 1
jz	short loc_4214A1
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_4214A1:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_421450 endp

align 10h



sub_4214B0 proc	near
mov	eax, offset off_17EF784
retn
sub_4214B0 endp

align 10h



sub_4214C0 proc	near
mov	eax, [ecx+4]
push	esi
lea	esi, [ecx+4]
test	eax, eax
jz	short loc_4214E8
push	edi
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4214E7
push	esi
mov	eax, edi
call	sub_1171F60

loc_4214E7:
pop	edi

loc_4214E8:
pop	esi
retn
sub_4214C0 endp

align 10h



sub_4214F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1141260
test	[esp+4+arg_0], 1
jz	short loc_421519
test	esi, esi
jz	short loc_421519
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	178h
push	3
push	esi
call	eax

loc_421519:
mov	eax, esi
pop	esi
retn	4
sub_4214F0 endp

align 10h



sub_421520 proc	near
mov	eax, offset off_17EF78C
retn
sub_421520 endp

align 10h



sub_421530 proc	near
fld	dword ptr [edx]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_421570
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_421570
fld	dword ptr [edx+8]
fld	dword ptr [ecx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_421570
fld	dword ptr [edx+0Ch]
fld	dword ptr [ecx+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_421570
mov	eax, 1
retn

loc_421570:
xor	eax, eax
retn
sub_421530 endp

align 10h



sub_421580 proc	near
fld	dword ptr [edx]
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4215C9
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4215C9
fld	dword ptr [edx+8]
fld	dword ptr [ecx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4215C9
fld	dword ptr [edx+0Ch]
fld	dword ptr [ecx+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4215C9
mov	eax, 1
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn

loc_4215C9:
xor	eax, eax
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_421580 endp

align 10h



sub_4215E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11408F0
test	[esp+4+arg_0], 1
jz	short loc_421606
test	esi, esi
jz	short loc_421606
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_421606:
mov	eax, esi
pop	esi
retn	4
sub_4215E0 endp

align 10h



sub_421610 proc	near
mov	eax, offset off_17EF79C
retn
sub_421610 endp

align 10h



sub_421620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
xor	ebp, ebp
xor	ecx, ecx
xor	edx, edx
xor	eax, eax
cmp	ebx, 2
mov	[esp+8+arg_8], ebp
jl	short loc_421652
lea	ebp, [ebx-1]
lea	ebx, [ebx+0]

loc_421640:
add	ecx, [esi+eax*4]
add	edx, [esi+eax*4+4]
add	eax, 2
cmp	eax, ebp
jb	short loc_421640
mov	ebp, [esp+8+arg_8]

loc_421652:
cmp	eax, ebx
jnb	short loc_421659
mov	ebp, [esi+eax*4]

loc_421659:
mov	eax, [esp+8+arg_0]
add	edx, ecx
mov	ecx, [edi+8]
add	edx, ebp
imul	edx, [esp+8+arg_4]
push	ebx
push	esi
push	edx
push	eax
push	edi
call	ecx
add	[edi+4], eax
add	esp, 14h
pop	ebp
pop	ebx
retn
sub_421620 endp

align 10h



sub_421680 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
lea	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_1552C00
mov	edx, 1
mov	[ecx+0Eh], dx
xor	eax, eax
mov	[ecx+8], ax
mov	[ecx+0Ah], ax
mov	[ecx+4], edi
mov	dword ptr [ecx], offset	off_1554C5C
xor	edx, edx
mov	[ecx+0Ch], dx
mov	[esi+8], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+0Ch], ax
call	sub_41B360
mov	eax, esi
pop	edi
retn
sub_421680 endp

align 10h



sub_4216E0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	byte ptr [eax],	2
retn
sub_4216E0 endp

align 10h



sub_421700 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_113F960
test	[esp+4+arg_0], 1
jz	short loc_421728
test	esi, esi
jz	short loc_421728
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	esi
call	eax

loc_421728:
mov	eax, esi
pop	esi
retn	4
sub_421700 endp

align 10h



sub_421730 proc	near
mov	eax, offset off_17EF7A4
retn
sub_421730 endp

align 10h



sub_421740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
xor	ebp, ebp
xor	ecx, ecx
xor	edx, edx
xor	eax, eax
cmp	ebx, 2
mov	[esp+8+arg_8], ebp
jl	short loc_421772
lea	ebp, [ebx-1]
lea	ebx, [ebx+0]

loc_421760:
add	ecx, [esi+eax*4]
add	edx, [esi+eax*4+4]
add	eax, 2
cmp	eax, ebp
jb	short loc_421760
mov	ebp, [esp+8+arg_8]

loc_421772:
cmp	eax, ebx
jnb	short loc_421779
mov	ebp, [esi+eax*4]

loc_421779:
mov	eax, [esp+8+arg_0]
add	edx, ecx
mov	ecx, [edi+0Ch]
add	edx, ebp
imul	edx, [esp+8+arg_4]
push	ebx
push	esi
push	edx
push	eax
push	edi
call	ecx
add	[edi+4], eax
add	esp, 14h
pop	ebp
pop	ebx
retn
sub_421740 endp

align 10h



sub_4217A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_1552C48
test	eax, eax
jz	short loc_4217C4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4217C4:
mov	ecx, esi
mov	dword ptr [esi+10h], 0
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_4217ED
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_4217ED:
mov	eax, esi
pop	esi
retn	4
sub_4217A0 endp

align 10h



sub_421800 proc	near
mov	eax, offset off_17EF7AC
retn
sub_421800 endp

align 10h



sub_421810 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551E88
mov	ecx, dword_1889414
test	ecx, ecx
jz	short loc_42182E
mov	eax, [ecx]
mov	edx, [eax+0BCh]
push	esi
call	edx

loc_42182E:
mov	ecx, esi
call	sub_1138D30
test	[esp+4+arg_0], 1
jz	short loc_421852
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10Ch
push	3
push	esi
call	eax

loc_421852:
mov	eax, esi
pop	esi
retn	4
sub_421810 endp

align 10h



sub_421860 proc	near
mov	eax, offset off_17EF7B4
retn
sub_421860 endp

align 10h



sub_421870 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+24h]
mov	dword ptr [esi], offset	off_1552D28
call	sub_1171CB0
lea	eax, [esi+4]
push	eax		; lpCriticalSection
mov	dword ptr [esi], offset	off_1552D38
call	ds:DeleteCriticalSection
test	[esp+4+arg_0], 1
jz	short loc_4218AF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	430h
push	3
push	esi
call	eax

loc_4218AF:
mov	eax, esi
pop	esi
retn	4
sub_421870 endp

align 10h



sub_4218C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+4]
push	eax		; lpCriticalSection
mov	dword ptr [esi], offset	off_1552D38
call	ds:DeleteCriticalSection
test	[esp+4+arg_0], 1
jz	short loc_4218EE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_4218EE:
mov	eax, esi
pop	esi
retn	4
sub_4218C0 endp

align 10h



sub_421900 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1239DB0
test	[esp+4+arg_0], 1
jz	short loc_421926
test	esi, esi
jz	short loc_421926
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_421926:
mov	eax, esi
pop	esi
retn	4
sub_421900 endp

align 10h



sub_421930 proc	near
mov	eax, offset off_17EF7CC
retn
sub_421930 endp

align 10h



sub_421940 proc	near
push	offset stru_188AABC ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	ecx, 1
add	dword_188AAD8, ecx
mov	dword_188AAD4, eax
cmp	dword_1889538, esi
jnz	short loc_421971
mov	eax, [esi+20h]
mov	dword_1889538, eax

loc_421971:
cmp	dword_188953C, esi
jnz	short loc_421982
mov	edx, [esi+1Ch]
mov	dword_188953C, edx

loc_421982:
mov	eax, [esi+1Ch]
test	eax, eax
jz	short loc_42198F
mov	edx, [esi+20h]
mov	[eax+20h], edx

loc_42198F:
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_42199C
mov	edx, [esi+1Ch]
mov	[eax+1Ch], edx

loc_42199C:
sub	dword_188AAD8, ecx
jnz	short loc_4219AE
mov	dword_188AAD4, 0

loc_4219AE:		; lpCriticalSection
push	offset stru_188AABC
call	ds:LeaveCriticalSection
retn
sub_421940 endp

align 10h



sub_4219C0 proc	near
push	offset stru_188AABC ; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
mov	edx, 1
add	dword_188AAD8, edx
xor	ecx, ecx
mov	dword_188AAD4, eax
cmp	dword_1889538, ecx
jnz	short loc_4219F1
mov	dword_1889538, esi

loc_4219F1:
mov	eax, dword_188953C
cmp	eax, ecx
jz	short loc_421A02
mov	[eax+20h], esi
mov	[esi+1Ch], eax
jmp	short loc_421A05

loc_421A02:
mov	[esi+1Ch], ecx

loc_421A05:
mov	[esi+20h], ecx
sub	dword_188AAD8, edx
mov	dword_188953C, esi
jnz	short loc_421A1C
mov	dword_188AAD4, ecx

loc_421A1C:		; lpCriticalSection
push	offset stru_188AABC
call	ds:LeaveCriticalSection
retn
sub_4219C0 endp

align 10h



sub_421A30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+4]
push	eax		; lpCriticalSection
mov	dword ptr [esi], offset	off_1552D38
call	ds:DeleteCriticalSection
test	[esp+4+arg_0], 1
jz	short loc_421A61
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	80h
push	3
push	esi
call	eax

loc_421A61:
mov	eax, esi
pop	esi
retn	4
sub_421A30 endp

align 10h



sub_421A70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
mov	edx, [esi+8]
push	1
lea	eax, [esp+0Ch+var_4]
push	eax
push	2
push	ecx
push	esi
mov	[esp+1Ch+var_4], 2
call	edx
add	esp, 14h
add	[esi+4], eax
pop	esi
pop	ecx
retn
sub_421A70 endp

align 10h



sub_421AA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+4]
push	eax		; lpCriticalSection
mov	dword ptr [esi], offset	off_1552D38
call	ds:DeleteCriticalSection
test	[esp+4+arg_0], 1
jz	short loc_421ACE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	74h
push	3
push	esi
call	eax

loc_421ACE:
mov	eax, esi
pop	esi
retn	4
sub_421AA0 endp

align 10h



sub_421AE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+4]
push	eax		; lpCriticalSection
mov	dword ptr [esi], offset	off_1552D38
call	ds:DeleteCriticalSection
test	[esp+4+arg_0], 1
jz	short loc_421B0E
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	70h
push	3
push	esi
call	eax

loc_421B0E:
mov	eax, esi
pop	esi
retn	4
sub_421AE0 endp

align 10h



sub_421B20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_113ACC0
test	[esp+4+arg_0], 1
jz	short loc_421B4B
test	esi, esi
jz	short loc_421B4B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0B0h
push	3
push	esi
call	eax

loc_421B4B:
mov	eax, esi
pop	esi
retn	4
sub_421B20 endp

align 10h



sub_421B60 proc	near
mov	dword ptr [eax+4], 0
retn
sub_421B60 endp

align 10h



sub_421B70 proc	near
mov	ecx, [eax]
mov	eax, [ecx+edx*4]
retn
sub_421B70 endp

align 10h



sub_421B80 proc	near
mov	eax, [eax+4]
retn
sub_421B80 endp

align 10h



sub_421B90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	eax, [esi+94h]
cmp	eax, 1
jz	short loc_421BAD
cmp	eax, 2
jz	short loc_421BAD
cmp	eax, 4
jnz	short loc_421BC4

loc_421BAD:
cmp	byte ptr [esi+90h], 0
jz	short loc_421BBB
cmp	eax, 4
jnz	short loc_421BC4

loc_421BBB:
test	ebx, ebx
jnz	short loc_421BCB
call	nullsub_22

loc_421BC4:
pop	esi
xor	al, al
pop	ebx
retn	8

loc_421BCB:
push	edi
lea	edi, [esi+30h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
inc	dword ptr [edi+1Ch]
mov	[edi+18h], eax
cmp	dword ptr [esi+4Ch], 1
pop	edi
jnz	short loc_421BF5
mov	eax, [esi]
mov	edx, [eax+138h]
mov	ecx, esi
call	edx

loc_421BF5:
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+15Ch]
push	ecx
push	ebx
mov	ecx, esi
call	edx
mov	bl, al
test	bl, bl
jz	short loc_421C19
mov	byte ptr [esi+90h], 1
pop	esi
pop	ebx
retn	8

loc_421C19:
call	sub_417E20
pop	esi
mov	al, bl
pop	ebx
retn	8
sub_421B90 endp

align 10h



sub_421C30 proc	near
mov	eax, [esi+94h]
cmp	eax, 1
jz	short loc_421C45
cmp	eax, 2
jz	short loc_421C45
cmp	eax, 4
jnz	short loc_421C53

loc_421C45:
cmp	byte ptr [esi+90h], 1
jz	short loc_421C56
cmp	eax, 4
jz	short loc_421C56

loc_421C53:
xor	al, al
retn

loc_421C56:
mov	eax, [esi]
mov	edx, [eax+160h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_421C53
cmp	dword ptr [esi+4Ch], 1
jnz	short loc_421C78
mov	eax, [esi]
mov	edx, [eax+13Ch]
mov	ecx, esi
call	edx

loc_421C78:
add	dword ptr [esi+4Ch], 0FFFFFFFFh
lea	eax, [esi+30h]
jnz	short loc_421C88
mov	dword ptr [eax+18h], 0

loc_421C88:		; lpCriticalSection
push	eax
call	ds:LeaveCriticalSection
mov	byte ptr [esi+90h], 0
mov	al, 1
retn
sub_421C30 endp

align 10h



sub_421CA0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+94h]
cmp	eax, 1
jz	short loc_421CB5
cmp	eax, 2
jz	short loc_421CB5
cmp	eax, 4
jnz	short locret_421CD3

loc_421CB5:
cmp	byte ptr [ecx+90h], 1
jz	short loc_421CC3
cmp	eax, 4
jnz	short locret_421CD3

loc_421CC3:
mov	eax, [ecx]
mov	eax, [eax+14Ch]
push	edx
mov	edx, [esp+4+arg_0]
push	edx
call	eax

locret_421CD3:
retn	4
sub_421CA0 endp

align 10h



sub_421CE0 proc	near
mov	eax, [ecx+94h]
cmp	eax, 1
jz	short loc_421CF5
cmp	eax, 2
jz	short loc_421CF5
cmp	eax, 4
jnz	short locret_421D0E

loc_421CF5:
cmp	byte ptr [ecx+90h], 1
jz	short loc_421D03
cmp	eax, 4
jnz	short locret_421D0E

loc_421D03:
mov	eax, [ecx]
mov	eax, [eax+154h]
push	edx
call	eax

locret_421D0E:
retn
sub_421CE0 endp

align 10h



sub_421D10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1552DF0
call	sub_11674D0
test	[esp+4+arg_0], 1
jz	short loc_421D3B
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	124h
push	3
push	esi
call	eax

loc_421D3B:
mov	eax, esi
pop	esi
retn	4
sub_421D10 endp

align 10h



sub_421D50 proc	near

var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
mov	eax, offset aM_kport ; "m_kPort"
push	edi
lea	edx, [eax+1]	; Format

loc_421D60:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_421D60
sub	eax, edx
lea	esi, [eax+40h]
mov	eax, esi
test	esi, esi
jnz	short loc_421D77
mov	eax, 1

loc_421D77:
push	0
push	0FFFFFFFFh
mov	[esp+18h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+24h+arg_0]
push	eax
mov	[esp+28h+arg_0], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+28h+var_4]
push	eax
call	edx
fld	dword ptr [ebx+0Ch]
sub	esp, 20h
fstp	[esp+30h+var_18]
mov	ecx, esi	; SizeInBytes
fld	dword ptr [ebx+8]
mov	edi, eax
fstp	[esp+30h+var_20]
fld	dword ptr [ebx+4]
fstp	[esp+30h+var_28]
fld	dword ptr [ebx]
fstp	[esp+30h+var_30]
push	offset aM_kport	; "m_kPort"
push	offset aSLGRGTGBG ; "%s	= (L=%g,R=%g,T=%g,B=%g)"
call	sub_4107B0
add	esp, 28h
mov	eax, edi
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_421D50 endp

align 10h



sub_421DF0 proc	near
mov	eax, offset off_17EF810
retn
sub_421DF0 endp

align 10h



sub_421E00 proc	near
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
retn
sub_421E00 endp

align 10h



; int __cdecl sub_421E20(float,	float)
sub_421E20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_0]
fld	[esp+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_421E3C
fstp	st
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn

loc_421E3C:
fstp	st(1)
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn
sub_421E20 endp

align 10h



sub_421E50 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188A9C8
test	esi, esi
jz	short loc_421E94
push	0
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9C8, eax
test	esi, esi
jz	short loc_421E94
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_421E93
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_421E93:
pop	edi

loc_421E94:
pop	esi
pop	ecx
retn
sub_421E50 endp

align 10h



sub_421EA0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, dword_188A9BC
push	edi
test	esi, esi
jz	short loc_421EE6
push	0
mov	[esp+14h+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9BC, eax
test	esi, esi
jz	short loc_421EE6
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_421EE6
lea	eax, [esp+10h+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_421EE6:
mov	esi, dword_188A9C0
test	esi, esi
jz	short loc_421F22
push	0
mov	[esp+14h+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9C0, eax
test	esi, esi
jz	short loc_421F22
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_421F22
lea	ecx, [esp+10h+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_421F22:
mov	esi, dword_188A9C4
test	esi, esi
jz	short loc_421F5E
push	0
mov	[esp+14h+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9C4, eax
test	esi, esi
jz	short loc_421F5E
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_421F5E
lea	edx, [esp+10h+var_4]
push	edx
mov	eax, edi
call	sub_1171F60

loc_421F5E:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_421EA0 endp

align 10h



sub_421F70 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AAE4
test	esi, esi
jz	short loc_421FB4
push	0
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AAE4, eax
test	esi, esi
jz	short loc_421FB4
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_421FB3
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_421FB3:
pop	edi

loc_421FB4:
pop	esi
pop	ecx
retn
sub_421F70 endp

align 10h



sub_421FC0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AB2C
test	esi, esi
jz	short loc_422004
push	0
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AB2C, eax
test	esi, esi
jz	short loc_422004
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_422003
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_422003:
pop	edi

loc_422004:
pop	esi
pop	ecx
retn
sub_421FC0 endp

align 10h



sub_422010 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AB28
test	esi, esi
jz	short loc_422054
push	0
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AB28, eax
test	esi, esi
jz	short loc_422054
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_422053
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_422053:
pop	edi

loc_422054:
pop	esi
pop	ecx
retn
sub_422010 endp

align 10h



sub_422060 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AAE0
test	esi, esi
jz	short loc_4220A4
push	0
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AAE0, eax
test	esi, esi
jz	short loc_4220A4
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4220A3
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_4220A3:
pop	edi

loc_4220A4:
pop	esi
pop	ecx
retn
sub_422060 endp

align 10h



sub_4220B0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188A9C8
cmp	esi, offset aShadowcubema_0 ; "ShadowCubeMap"
jz	short loc_4220FB
push	offset aShadowcubema_0 ; "ShadowCubeMap"
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9C8, eax
test	esi, esi
jz	short loc_4220FB
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4220FA
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_4220FA:
pop	edi

loc_4220FB:
pop	esi
pop	ecx
retn
sub_4220B0 endp

align 10h



sub_422100 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, dword_188A9BC
push	edi
cmp	esi, offset aDirshadow ; "DirShadow"
jz	short loc_42214D
push	offset aDirshadow ; "DirShadow"
mov	[esp+14h+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9BC, eax
test	esi, esi
jz	short loc_42214D
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_42214D
lea	eax, [esp+10h+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_42214D:
mov	esi, dword_188A9C0
cmp	esi, offset aPointshadow ; "PointShadow"
jz	short loc_422190
push	offset aPointshadow ; "PointShadow"
mov	[esp+14h+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9C0, eax
test	esi, esi
jz	short loc_422190
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_422190
lea	ecx, [esp+10h+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_422190:
mov	esi, dword_188A9C4
cmp	esi, offset aSpotshadow	; "SpotShadow"
jz	short loc_4221D3
push	offset aSpotshadow ; "SpotShadow"
mov	[esp+14h+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188A9C4, eax
test	esi, esi
jz	short loc_4221D3
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_4221D3
lea	edx, [esp+10h+var_4]
push	edx
mov	eax, edi
call	sub_1171F60

loc_4221D3:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_422100 endp

align 10h



sub_4221E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	esi
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 8
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_422234
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_422234:
push	ebx
mov	ebx, ds:InterlockedIncrement
push	edi
lea	edi, [esi+4]
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	dword ptr [edi], 0
call	ebx ; InterlockedIncrement
mov	dword ptr [esi], offset	off_1552334
mov	eax, dword_188AADC
cmp	eax, esi
jz	short loc_42228A
test	eax, eax
jz	short loc_422281
push	ebp
mov	ebp, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_422280
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax

loc_422280:
pop	ebp

loc_422281:		; lpAddend
push	edi
mov	dword_188AADC, esi
call	ebx ; InterlockedIncrement

loc_42228A:
pop	edi
pop	ebx
pop	esi
add	esp, 14h
retn
sub_4221E0 endp

align 10h



sub_4222A0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AAE4
cmp	esi, offset aRenderView	; "Render View"
jz	short loc_4222EB
push	offset aRenderView ; "Render View"
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AAE4, eax
test	esi, esi
jz	short loc_4222EB
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4222EA
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_4222EA:
pop	edi

loc_4222EB:
pop	esi
pop	ecx
retn
sub_4222A0 endp

align 10h



sub_4222F0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AB2C
cmp	esi, offset aRenderStep	; "Render Step"
jz	short loc_42233B
push	offset aRenderStep ; "Render Step"
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AB2C, eax
test	esi, esi
jz	short loc_42233B
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_42233A
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_42233A:
pop	edi

loc_42233B:
pop	esi
pop	ecx
retn
sub_4222F0 endp

align 10h



sub_422340 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AB28
cmp	esi, offset aRenderFrame ; "Render Frame"
jz	short loc_42238B
push	offset aRenderFrame ; "Render Frame"
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AB28, eax
test	esi, esi
jz	short loc_42238B
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_42238A
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_42238A:
pop	edi

loc_42238B:
pop	esi
pop	ecx
retn
sub_422340 endp

align 10h



sub_422390 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, dword_188AAE0
cmp	esi, offset aRenderClick ; "Render Click"
jz	short loc_4223DB
push	offset aRenderClick ; "Render Click"
mov	[esp+0Ch+var_4], esi
call	sub_1172180
add	esp, 4
mov	dword_188AAE0, eax
test	esi, esi
jz	short loc_4223DB
push	edi
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_4223DA
lea	eax, [esp+0Ch+var_4]
push	eax
mov	eax, edi
call	sub_1171F60

loc_4223DA:
pop	edi

loc_4223DB:
pop	esi
pop	ecx
retn
sub_422390 endp

align 10h



sub_4223E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1138D30
test	[esp+4+arg_0], 1
jz	short loc_422409
test	esi, esi
jz	short loc_422409
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0E0h
push	3
push	esi
call	eax

loc_422409:
mov	eax, esi
pop	esi
retn	4
sub_4223E0 endp

align 10h



sub_422410 proc	near
mov	eax, offset off_17EF81C
retn
sub_422410 endp

align 10h



sub_422420 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12FFCA8
mov	eax, large fs:0
push	eax
sub	esp, 1Ch
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	esi, edx
test	esi, esi
jz	loc_4224FC
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+48h+var_28]
push	eax
mov	[esp+4Ch+var_28], 4
mov	[esp+4Ch+var_24], 8
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+4Ch+var_24]
push	eax
call	edx
test	eax, eax
jnz	short loc_42249F
lea	ecx, [esp+34h+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+38h+var_18]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_42249F:
mov	[edi], eax
mov	ecx, [esi+4]
mov	[eax+4], ecx
cmp	dword ptr [esi], 0
mov	edi, [edi]
jz	short loc_4224F6

loc_4224AE:
mov	edx, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	1
mov	[esp+44h+var_20], 4
mov	[esp+44h+var_1C], 8
mov	ecx, [edx]
mov	eax, [ecx]
mov	eax, [eax+4]
push	1
lea	edx, [esp+48h+var_20]
push	edx
lea	edx, [esp+4Ch+var_1C]
push	edx
call	eax
test	eax, eax
jz	short loc_42250E
mov	[edi], eax
mov	esi, [esi]
mov	ecx, [esi+4]
mov	[eax+4], ecx
cmp	dword ptr [esi], 0
mov	edi, eax
jnz	short loc_4224AE

loc_4224F6:
mov	dword ptr [edi], 0

loc_4224FC:
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 28h
retn

loc_42250E:
push	1
push	offset off_17EDB94
lea	ecx, [esp+3Ch+var_18]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
mov	[esp+34h+var_4], 0
mov	[esp+34h+var_18], offset off_1446194
mov	[esp+34h+var_4], 0FFFFFFFFh
push	offset unk_1641FD8
lea	edx, [esp+38h+var_18]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_422420 endp

align 10h



sub_422550 proc	near
cmp	dword ptr [esi], 0
jz	short locret_422578

loc_422555:
mov	eax, [esi]
mov	ecx, [eax]
mov	[esi], ecx
test	eax, eax
jz	short loc_422573
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	8
push	3
push	eax
mov	eax, [edx+8]
call	eax

loc_422573:
cmp	dword ptr [esi], 0
jnz	short loc_422555

locret_422578:
retn
sub_422550 endp

align 10h



sub_422580 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1137FC0
test	[esp+4+arg_0], 1
jz	short loc_4225A6
test	esi, esi
jz	short loc_4225A6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	68h
push	3
push	esi
call	eax

loc_4225A6:
mov	eax, esi
pop	esi
retn	4
sub_422580 endp

align 10h



sub_4225B0 proc	near
xor	ecx, ecx
mov	[eax+0Ch], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	dword ptr [eax], offset	off_15C92DC
retn
sub_4225B0 endp

align 10h



sub_4225D0 proc	near
push	edi
mov	edi, eax
mov	dword ptr [edi], offset	off_15C92DC
call	sub_41C620
mov	dword ptr [edi], offset	off_15CA734
pop	edi
retn
sub_4225D0 endp

align 10h



sub_4225F0 proc	near

arg_0= dword ptr  4

mov	ecx, [eax+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
test	ecx, ecx
jz	short loc_42260F
mov	edi, [ebx]

loc_422600:
lea	edx, [ecx+8]
mov	esi, ecx
mov	ecx, [ecx]
cmp	edi, [edx]
jz	short loc_422611
test	ecx, ecx
jnz	short loc_422600

loc_42260F:
xor	esi, esi

loc_422611:
mov	[esp+0Ch+arg_0], esi
test	esi, esi
jz	short loc_422628
lea	edx, [esp+0Ch+arg_0]
call	sub_5F55F0
pop	edi
pop	esi
pop	ebx
retn	4

loc_422628:
mov	eax, [ebx]
pop	edi
pop	esi
pop	ebx
retn	4
sub_4225F0 endp




sub_422630 proc	near
mov	ecx, [esi+4]
mov	eax, [ecx]
xor	edx, edx
mov	[esi+4], eax
cmp	eax, edx
jz	short loc_422643
mov	[eax+4], edx
jmp	short loc_422646

loc_422643:
mov	[esi+8], edx

loc_422646:
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	edi, [ecx+8]
push	ecx
mov	ecx, esi
call	edx
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
retn
sub_422630 endp

align 10h



sub_422660 proc	near
mov	eax, offset off_17EF824
retn
sub_422660 endp

align 10h



sub_422670 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_422695
lea	ebx, [ebx+0]

loc_422680:
lea	ecx, [eax+8]
mov	edx, eax
mov	eax, [eax]
cmp	edi, [ecx]
jz	short loc_422691
test	eax, eax
jnz	short loc_422680
jmp	short loc_422695

loc_422691:
test	edx, edx
jnz	short loc_4226CC

loc_422695:
mov	eax, [esi+20h]
mov	edx, [eax+4]
add	esi, 20h
mov	ecx, esi
call	edx
mov	[eax+8], edi
mov	dword ptr [eax+4], 0
mov	ecx, [esi+4]
mov	[eax], ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_4226C3
mov	[ecx+4], eax
inc	dword ptr [esi+0Ch]
mov	[esi+4], eax
pop	esi
retn

loc_4226C3:
inc	dword ptr [esi+0Ch]
mov	[esi+8], eax
mov	[esi+4], eax

loc_4226CC:
pop	esi
retn
sub_422670 endp

align 10h



sub_4226D0 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+14h]
test	eax, eax
jz	short loc_4226F5
lea	ebx, [ebx+0]

loc_4226E0:
lea	ecx, [eax+8]
mov	edx, eax
mov	eax, [eax]
cmp	edi, [ecx]
jz	short loc_4226F1
test	eax, eax
jnz	short loc_4226E0
jmp	short loc_4226F5

loc_4226F1:
test	edx, edx
jnz	short loc_42272C

loc_4226F5:
mov	eax, [esi+10h]
mov	edx, [eax+4]
add	esi, 10h
mov	ecx, esi
call	edx
mov	[eax+8], edi
mov	dword ptr [eax+4], 0
mov	ecx, [esi+4]
mov	[eax], ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_422723
mov	[ecx+4], eax
inc	dword ptr [esi+0Ch]
mov	[esi+4], eax
pop	esi
retn

loc_422723:
inc	dword ptr [esi+0Ch]
mov	[esi+8], eax
mov	[esi+4], eax

loc_42272C:
pop	esi
retn
sub_4226D0 endp

align 10h



sub_422730 proc	near
add	eax, 0FFFFFFFEh	; switch 6 cases
cmp	eax, 5
ja	short loc_42274E ; default
jmp	ds:off_422754[eax*4] ; switch jump

loc_42273F:		; jumptable 00422738 cases 4,7
mov	eax, 2
retn

loc_422745:		; jumptable 00422738 cases 3,6
xor	eax, eax
retn

loc_422748:		; jumptable 00422738 cases 2,5
mov	eax, 1
retn

loc_42274E:		; default
mov	eax, 3
retn
sub_422730 endp

off_422754 dd offset loc_422748	; jump table for switch	statement
dd offset loc_422745
dd offset loc_42273F
dd offset loc_422748
dd offset loc_422745
dd offset loc_42273F
align 10h



sub_422770 proc	near
push	edi
mov	edi, [esi+0Ch]
test	edi, edi
jz	short loc_4227BA
mov	eax, [esi+4Ch]
test	eax, eax
jz	short loc_4227BA
mov	al, [eax+0ADh]
test	al, al
jz	short loc_4227BA
movzx	eax, al
call	sub_422730
mov	cl, [esi+8]
shr	cl, 4
test	cl, 1
jnz	short loc_42279F
add	eax, 3

loc_42279F:
fld	dword ptr [edi+eax*4+20h]
fld	dword ptr [esi+54h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_4227B6
mov	eax, 1
pop	edi
retn

loc_4227B6:
xor	eax, eax
pop	edi
retn

loc_4227BA:
xor	al, al
pop	edi
retn
sub_422770 endp

align 10h



sub_4227C0 proc	near
mov	eax, [esi]
mov	edx, [eax]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_4227DE
lea	esp, [esp+0]

loc_4227D0:
cmp	eax, offset off_17EE0EC
jz	short loc_4227EA
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_4227D0

loc_4227DE:
xor	al, al
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn

loc_4227EA:
mov	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn
sub_4227C0 endp

align 10h



sub_422800 proc	near
add	ecx, 10h
mov	edx, 6

loc_422808:
mov	eax, [ecx]
test	eax, eax
jz	short loc_422814
mov	[eax+80h], esi

loc_422814:
add	ecx, 4
sub	edx, 1
jnz	short loc_422808
retn
sub_422800 endp

align 10h



sub_422820 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1552FC8
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_422848
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_422848:
mov	eax, esi
pop	esi
retn	4
sub_422820 endp

align 10h



sub_422850 proc	near
mov	eax, offset off_17EF82C
retn
sub_422850 endp

align 10h



sub_422860 proc	near
mov	eax, offset off_17EF834
retn
sub_422860 endp

align 10h



sub_422870 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12397E0
test	[esp+4+arg_0], 1
jz	short loc_422896
test	esi, esi
jz	short loc_422896
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	6Ch
push	3
push	esi
call	eax

loc_422896:
mov	eax, esi
pop	esi
retn	4
sub_422870 endp

align 10h



sub_4228A0 proc	near
push	esi
or	esi, 0FFFFFFFFh
xor	edx, edx
cmp	[eax+8], esi
jz	short loc_4228DE
push	ebx
lea	esp, [esp+0]

loc_4228B0:
mov	ecx, [eax+8]
cmp	ecx, esi
jz	short loc_4228D8
mov	ebx, [eax]
mov	[ebx+ecx*4], edx
inc	dword ptr [eax+8]
mov	ecx, [eax+8]
cmp	ecx, [eax+4]
jnz	short loc_4228CA
mov	[eax+8], edx

loc_4228CA:
mov	ecx, [eax+8]
cmp	ecx, [eax+0Ch]
jnz	short loc_4228D8
mov	[eax+8], esi
mov	[eax+0Ch], edx

loc_4228D8:
cmp	[eax+8], esi
jnz	short loc_4228B0
pop	ebx

loc_4228DE:
mov	eax, [eax]
cmp	eax, edx
jz	short loc_4228F7
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	esi
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4228F7:
pop	esi
retn
sub_4228A0 endp

align 10h



sub_422900 proc	near
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+48h]
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
call	ds:GetCurrentThreadId
inc	dword ptr [esi+1Ch]
mov	[esi+18h], eax
xor	eax, eax
mov	[edi+68h], eax
add	dword ptr [esi+1Ch], 0FFFFFFFFh
jnz	short loc_422928
mov	[esi+18h], eax

loc_422928:		; lpCriticalSection
push	esi
call	ds:LeaveCriticalSection
mov	eax, [edi+68h]
pop	edi
pop	esi
retn
sub_422900 endp

align 10h



sub_422940 proc	near
mov	eax, offset off_17EF84C
retn
sub_422940 endp

align 10h



sub_422950 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1136BA0
test	[esp+4+arg_0], 1
jz	short loc_422976
test	esi, esi
jz	short loc_422976
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_422976:
mov	eax, esi
pop	esi
retn	4
sub_422950 endp

align 10h



sub_422980 proc	near
cmp	edi, dword_188AAEC
jz	short locret_4229E3
push	esi
test	edi, edi
jbe	short loc_4229B7
mov	eax, edi
call	sub_5F46E0
mov	esi, eax
xor	eax, eax
cmp	dword_188AAF0, eax
jbe	short loc_4229B9

loc_4229A0:
mov	ecx, dword_188AAE8
mov	edx, [ecx+eax*4]
mov	[esi+eax*4], edx
inc	eax
cmp	eax, dword_188AAF0
jb	short loc_4229A0
jmp	short loc_4229B9

loc_4229B7:
xor	esi, esi

loc_4229B9:
mov	eax, dword_188AAE8
test	eax, eax
jz	short loc_4229D6
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4229D6:
mov	dword_188AAE8, esi
mov	dword_188AAEC, edi
pop	esi

locret_4229E3:
retn
sub_422980 endp

align 10h



sub_4229F0 proc	near
mov	eax, offset off_17EFA1C
retn
sub_4229F0 endp

align 10h



sub_422A00 proc	near
push	edi
mov	edi, ecx
lea	ecx, [edi+40h]
mov	dword ptr [edi], offset	off_15530F0
call	sub_11288C0
mov	eax, [edi+34h]
mov	dword ptr [edi+30h], offset off_1556034
test	eax, eax
jz	short loc_422A4D
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_422A4C
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_422A4C:
pop	esi

loc_422A4D:
mov	ecx, edi
pop	edi
jmp	sub_1128290
sub_422A00 endp

align 10h



sub_422A60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_422A00
test	[esp+4+arg_0], 1
jz	short loc_422A86
test	esi, esi
jz	short loc_422A86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_422A86:
mov	eax, esi
pop	esi
retn	4
sub_422A60 endp

align 10h



sub_422A90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
push	edi
mov	esi, eax
call	sub_11280C0
mov	dword ptr [esi], offset	off_15530F0
xor	eax, eax
mov	[esi+38h], ax
mov	[esi+3Ch], ax
mov	[esi+34h], eax
mov	ecx, 1
xor	edx, edx
mov	eax, 10Dh
mov	[esi+3Eh], cx
mov	[esi+3Ah], dx
mov	dword ptr [esi+30h], offset off_155386C
call	sub_1128430
mov	edi, eax
test	edi, edi
jnz	short loc_422AD7
mov	eax, ecx

loc_422AD7:
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	0
push	0FFFFFFFFh
push	0
push	0
mov	[esp+20h+var_4], eax
push	5
lea	eax, [esp+24h+var_8]
push	eax
mov	[esp+28h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+28h+var_4]
push	eax
call	edx
mov	[eax], edi
mov	dword ptr [eax+4], 1
mov	dword ptr [eax+8], 0
add	eax, 0Ch
mov	[esi+40h], eax
mov	byte ptr [eax],	0
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_422B3C
mov	eax, ecx
lea	edi, [eax+1]
jmp	short loc_422B30
align 10h

loc_422B30:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_422B30
sub	eax, edi
mov	[ecx-4], eax

loc_422B3C:
pop	edi
mov	eax, esi
pop	esi
add	esp, 8
retn
sub_422A90 endp

align 10h



sub_422B50 proc	near
mov	eax, offset off_17EF85C
retn
sub_422B50 endp

align 10h



sub_422B60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1135DB0
test	[esp+4+arg_0], 1
jz	short loc_422B86
test	esi, esi
jz	short loc_422B86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	70h
push	3
push	esi
call	eax

loc_422B86:
mov	eax, esi
pop	esi
retn	4
sub_422B60 endp

align 10h



sub_422B90 proc	near
mov	eax, offset off_17EF864
retn
sub_422B90 endp

align 10h



sub_422BA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
mov	ebx, ds:InterlockedDecrement
push	ebp
mov	ebp, ecx
push	esi
push	edi
mov	[esp+18h+var_4], ebp
mov	dword ptr [ebp+0], offset off_1553220
lea	esi, [ebp+20h]
mov	[esp+18h+var_8], 2

loc_422BC5:
mov	eax, [esi-4]
sub	esi, 4
test	eax, eax
jz	short loc_422BE6
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_422BE6
push	esi
mov	eax, edi
call	sub_1171F60

loc_422BE6:
sub	[esp+18h+var_8], 1
jns	short loc_422BC5
lea	esi, [ebp+14h]
mov	ebp, 2

loc_422BF5:
mov	eax, [esi-4]
sub	esi, 4
test	eax, eax
jz	short loc_422C16
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_422C16
push	esi
mov	eax, edi
call	sub_1171F60

loc_422C16:
sub	ebp, 1
jns	short loc_422BF5
mov	esi, [esp+18h+var_4]
mov	eax, [esi+4]
add	esi, 4
test	eax, eax
jz	short loc_422C40
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_422C40
push	esi
mov	eax, edi
call	sub_1171F60

loc_422C40:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_422BA0 endp

align 10h



sub_422C50 proc	near
mov	eax, offset off_17EF89C
retn
sub_422C50 endp

align 10h



sub_422C60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_422BA0
test	[esp+4+arg_0], 1
jz	short loc_422C86
test	esi, esi
jz	short loc_422C86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4Ch
push	3
push	esi
call	eax

loc_422C86:
mov	eax, esi
pop	esi
retn	4
sub_422C60 endp

align 10h



sub_422C90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, 0F0FFh
and	[eax+4], cx
retn	4
sub_422C90 endp




sub_422CA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_112C150
test	[esp+4+arg_0], 1
jz	short loc_422CC6
test	esi, esi
jz	short loc_422CC6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	6Ch
push	3
push	esi
call	eax

loc_422CC6:
mov	eax, esi
pop	esi
retn	4
sub_422CA0 endp

align 10h



sub_422CD0 proc	near
mov	eax, offset off_17EF8A4
retn
sub_422CD0 endp

align 10h



sub_422CE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

mov	eax, [edi+20h]
sub	esp, 14h
push	esi
mov	esi, [eax]
test	esi, esi
jnz	loc_422D7D
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	esi
push	0FFFFFFFFh
push	esi
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_422D3E
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_422D3E:
xor	ecx, ecx
mov	[eax+4], cx
mov	dword ptr [eax], offset	off_1551CF0
mov	[eax+8], ecx
mov	dx, [eax+4]
mov	[eax+0Ch], ecx
mov	ecx, 0F100h
and	dx, cx
mov	ecx, 3100h
or	dx, cx
mov	[eax+4], dx
lea	edx, [esp+18h+var_10]
push	edx
mov	esi, eax
push	0
lea	ecx, [edi+1Ch]
mov	[esp+20h+var_10], esi
call	sub_40FBD0

loc_422D7D:
mov	eax, [esp+18h+arg_0]
mov	[esi+0Ch], eax
pop	esi
add	esp, 14h
retn	4
sub_422CE0 endp

align 10h



sub_422D90 proc	near
mov	ecx, [eax+20h]
mov	eax, [ecx]
test	eax, eax
jz	short loc_422D9D
mov	eax, [eax+0Ch]
retn

loc_422D9D:
xor	eax, eax
retn
sub_422D90 endp




sub_422DA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, dword_188951C
mov	eax, [esi+0F8h]
mov	edx, [eax+4]
add	esi, 0F8h
mov	ecx, esi
call	edx
mov	ecx, [esp+4+arg_0]
mov	[eax+8], ecx
mov	dword ptr [eax], 0
mov	edx, [esi+8]
mov	[eax+4], edx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_422DDE
mov	[ecx], eax
inc	dword ptr [esi+0Ch]
mov	[esi+8], eax
pop	esi
retn

loc_422DDE:
inc	dword ptr [esi+0Ch]
mov	[esi+4], eax
mov	[esi+8], eax
pop	esi
retn
sub_422DA0 endp

align 10h



sub_422DF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1553240
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_422E18
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_422E18:
mov	eax, esi
pop	esi
retn	4
sub_422DF0 endp

align 10h



sub_422E20 proc	near
mov	dword ptr [ecx], offset	off_1553240
jmp	sub_123E740
sub_422E20 endp

align 10h



sub_422E30 proc	near
mov	eax, offset off_17EF90C
retn
sub_422E30 endp

align 10h



sub_422E40 proc	near
mov	eax, 7
retn
sub_422E40 endp

align 10h



sub_422E50 proc	near
mov	dx, [ecx+18h]
push	esi
mov	esi, 0F3FFh
and	dx, si
shl	eax, 0Ah
or	dx, ax
mov	[ecx+18h], dx
pop	esi
retn
sub_422E50 endp

align 10h



sub_422E70 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
xor	eax, eax
xor	ecx, ecx
mov	edx, 4180h
mov	[esi+10h], edi
mov	[esi+14h], ax
mov	[esi+1Ch], edi
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_1553240
mov	dword ptr [esi+20h], 0FFFFFFFFh
mov	[esi+18h], dx
mov	eax, esi
pop	edi
retn
sub_422E70 endp

align 10h



sub_422EC0 proc	near
mov	eax, [ecx]
retn
sub_422EC0 endp

align 10h



sub_422ED0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1272B30
test	[esp+4+arg_0], 1
jz	short loc_422EF6
test	esi, esi
jz	short loc_422EF6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	60h
push	3
push	esi
call	eax

loc_422EF6:
mov	eax, esi
pop	esi
retn	4
sub_422ED0 endp

align 10h



sub_422F00 proc	near
movzx	eax, word ptr [ecx+0Ah]
fldz
cmp	edx, eax
jb	short loc_422F27
lea	eax, [edx+1]
mov	[ecx+0Ah], ax
fcomp	dword ptr [esi]
fnstsw	ax
test	ah, 44h
jnp	short loc_422F58
inc	word ptr [ecx+0Ch]
fld	dword ptr [esi]
mov	ecx, [ecx+4]
fstp	dword ptr [ecx+edx*4]
retn

loc_422F27:
fcom	dword ptr [esi]
fnstsw	ax
test	ah, 44h
mov	eax, [ecx+4]
fcomp	dword ptr [eax+edx*4]
fnstsw	ax
jnp	short loc_422F4A
test	ah, 44h
jp	short loc_422F58
inc	word ptr [ecx+0Ch]
fld	dword ptr [esi]
mov	ecx, [ecx+4]
fstp	dword ptr [ecx+edx*4]
retn

loc_422F4A:
test	ah, 44h
jnp	short loc_422F58
mov	eax, 0FFFFh
add	[ecx+0Ch], ax

loc_422F58:
mov	ecx, [ecx+4]
fld	dword ptr [esi]
fstp	dword ptr [ecx+edx*4]
retn
sub_422F00 endp

align 10h



; int __stdcall	sub_422F70(int,	float)
sub_422F70 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	edx, edx
mov	eax, ebp
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_422F9B
lea	esp, [esp+0]

loc_422F90:
cmp	ebp, [eax+4]
jz	short loc_422FD1
mov	eax, [eax]
test	eax, eax
jnz	short loc_422F90

loc_422F9B:
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	edi
mov	ecx, esi
call	eax
fld	[esp+0Ch+arg_4]
mov	edx, [esi]
push	ecx
fstp	[esp+10h+var_10]
mov	edi, eax
mov	eax, [edx+4]
push	ebp
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esi+8]
mov	edx, [ecx+ebx*4]
mov	[edi], edx
mov	eax, [esi+8]
mov	[eax+ebx*4], edi
inc	dword ptr [esi+0Ch]
pop	edi
pop	ebp
pop	ebx
retn	8

loc_422FD1:
fld	[esp+8+arg_4]
pop	ebp
fstp	dword ptr [eax+8]
pop	ebx
retn	8
sub_422F70 endp

align 10h



sub_422FE0 proc	near
mov	eax, offset off_17EF8AC
retn
sub_422FE0 endp

align 10h



sub_422FF0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+5Ch]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_42302C
test	esi, esi
jz	short loc_42301B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42301B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_42301B:
mov	[ebx+5Ch], edi
test	edi, edi
jz	short loc_42302C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_42302C:
pop	edi
pop	esi
mov	dword ptr [ebx+60h], 0
pop	ebx
retn	4
sub_422FF0 endp

align 10h



; int __cdecl sub_423040(float,	float)
sub_423040 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_0]
fld	[esp+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_42305C
fstp	st
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn

loc_42305C:
fstp	st(1)
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn
sub_423040 endp

align 10h



sub_423070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	[esp+4+var_4], esi
test	esi, esi
jz	short loc_423082
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_423082:
push	edi
mov	edi, [esp+8+arg_0]
lea	ecx, [esp+8+var_4]
push	ecx
add	edi, 28h
call	sub_4296B0
pop	edi
test	esi, esi
jz	short loc_4230B0
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4230B0
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_4230B0:
pop	ecx
retn	4
sub_423070 endp

align 10h



sub_4230C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15532E4
call	sub_418AE0
mov	dword ptr [esi], offset	off_15532F8
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_4230F4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4230F4:
test	[esp+4+arg_0], 1
jz	short loc_42310F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_42310F:
mov	eax, esi
pop	esi
retn	4
sub_4230C0 endp

align 10h



sub_423120 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_423171
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_423171:
fldz
fstp	dword ptr [eax+8]
add	esp, 14h
retn
sub_423120 endp

align 10h


; Attributes: thunk

sub_423180 proc	near
jmp	sub_423120
sub_423180 endp

align 10h



sub_423190 proc	near

arg_0= dword ptr  4

mov	ecx, dword_1889574
fldz
mov	eax, [esp+arg_0]
fstp	dword ptr [eax+8]
mov	ecx, [ecx]
mov	edx, [ecx]
push	0Ch
push	3
push	eax
mov	eax, [edx+8]
call	eax
retn	4
sub_423190 endp




sub_4231B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15532F8
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_4231D9
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4231D9:
test	[esp+4+arg_0], 1
jz	short loc_4231F4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_4231F4:
mov	eax, esi
pop	esi
retn	4
sub_4231B0 endp

align 10h



sub_423200 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12391D0
test	[esp+4+arg_0], 1
jz	short loc_423226
test	esi, esi
jz	short loc_423226
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_423226:
mov	eax, esi
pop	esi
retn	4
sub_423200 endp

align 10h



sub_423230 proc	near
mov	eax, offset off_17EF8B4
retn
sub_423230 endp

align 10h



sub_423240 proc	near

arg_0= dword ptr  4

mov	eax, [esi+20h]
mov	ecx, [eax]
cmp	[esp+arg_0], ecx
jz	short locret_423266
test	ecx, ecx
jz	short loc_423257
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_423257:
lea	ecx, [esp+arg_0]
push	ecx
push	0
lea	ecx, [esi+1Ch]
call	sub_40FBD0

locret_423266:
retn	4
sub_423240 endp

align 10h



sub_423270 proc	near
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_42328E
lea	ecx, [ecx+0]

loc_423280:
cmp	eax, offset off_17EF7E8
jz	short loc_42329A
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_423280

loc_42328E:
xor	al, al
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn

loc_42329A:
mov	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, esi
retn
sub_423270 endp

align 10h



sub_4232B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_4232E0
test	[esp+4+arg_0], 1
jz	short loc_4232D7
test	esi, esi
jz	short loc_4232D7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_4232D7:
mov	eax, esi
pop	esi
retn	4
sub_4232B0 endp

align 10h



sub_4232E0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+18h]
push	esi
mov	esi, ds:InterlockedDecrement
push	edi
lea	edi, [ebp+18h]
test	eax, eax
jz	short loc_42330F
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_42330F
push	edi
mov	eax, ebx
call	sub_1171F60

loc_42330F:
mov	eax, [ebp+14h]
lea	edi, [ebp+14h]
test	eax, eax
jz	short loc_423330
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_423330
push	edi
mov	eax, ebx
call	sub_1171F60

loc_423330:
mov	eax, [ebp+10h]
lea	edi, [ebp+10h]
test	eax, eax
jz	short loc_423351
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_423351
push	edi
mov	eax, ebx
call	sub_1171F60

loc_423351:
mov	eax, [ebp+0Ch]
lea	edi, [ebp+0Ch]
test	eax, eax
jz	short loc_423372
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_423372
push	edi
mov	eax, ebx
call	sub_1171F60

loc_423372:
mov	eax, [ebp+8]
lea	edi, [ebp+8]
test	eax, eax
jz	short loc_423393
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	esi ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_423393
push	edi
mov	eax, ebx
call	sub_1171F60

loc_423393:		; lpAddend
push	offset Addend
mov	dword ptr [ebp+0], offset off_154EE18
call	esi ; InterlockedDecrement
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_4232E0 endp

align 10h



sub_4233B0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_0]
push	esi
mov	esi, [eax+10h]
mov	eax, [edi]
and	esi, 0Fh
test	eax, eax
jz	short loc_4233EA
cmp	dword ptr [eax-4], 0
jz	short loc_4233EA
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4233EA:		; "SPOTLIGHTCOUNT"
push	offset aSpotlightcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	4
sub_4233B0 endp

align 10h



sub_423440 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, ecx
mov	edi, edx
push	esi
call	sub_4233B0
mov	esi, [esi+10h]
mov	eax, [edi]
shr	esi, 4
and	esi, 0Fh
test	eax, eax
jz	short loc_423481
cmp	dword ptr [eax-4], 0
jz	short loc_423481
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423481:		; "DIRLIGHTCOUNT"
push	offset aDirlightcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423440 endp

align 10h



sub_4234E0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_423440
mov	eax, [esi]
movzx	edi, byte ptr [edi+11h]
test	eax, eax
jz	short loc_42351A
cmp	dword ptr [eax-4], 0
jz	short loc_42351A
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_42351A:		; "SHADOWMAPFORLIGHT"
push	offset aShadowmapforli
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4234E0 endp

align 10h



sub_423570 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_4234E0
movzx	edi, word ptr [edi+12h]
mov	eax, [esi]
and	edi, 1
test	eax, eax
jz	short loc_4235AE
cmp	dword ptr [eax-4], 0
jz	short loc_4235AE
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_4235AE:		; "SPECULAR"
push	offset aSpecular_7
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423570 endp




sub_423600 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_423570
mov	esi, [esi+10h]
mov	eax, [edi]
shr	esi, 11h
and	esi, 3
test	eax, eax
jz	short loc_42363F
cmp	dword ptr [eax-4], 0
jz	short loc_42363F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42363F:		; "AMBDIFFEMISSIVE"
push	offset aAmbdiffemissiv
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423600 endp




sub_423690 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_423600
mov	esi, [esi+10h]
mov	eax, [edi]
shr	esi, 13h
and	esi, 3
test	eax, eax
jz	short loc_4236D0
cmp	dword ptr [eax-4], 0
jz	short loc_4236D0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4236D0:		; "LIGHTINGMODE"
push	offset aLightingmode
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423690 endp

align 10h



sub_423730 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_423690
mov	esi, [esi+10h]
mov	eax, [edi]
shr	esi, 15h
and	esi, 1
test	eax, eax
jz	short loc_42376F
cmp	dword ptr [eax-4], 0
jz	short loc_42376F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42376F:		; "APPLYAMBIENT"
push	offset aApplyambient
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423730 endp




sub_4237C0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_423730
mov	esi, [esi+10h]
mov	eax, [edi]
shr	esi, 16h
and	esi, 1
test	eax, eax
jz	short loc_423800
cmp	dword ptr [eax-4], 0
jz	short loc_423800
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423800:		; "BASEMAPALPHAONLY"
push	offset aBasemapalphaon
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4237C0 endp

align 10h



sub_423860 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4237C0
mov	esi, [esi+10h]
mov	eax, [edi]
shr	esi, 17h
and	esi, 1
test	eax, eax
jz	short loc_42389F
cmp	dword ptr [eax-4], 0
jz	short loc_42389F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42389F:		; "APPLYEMISSIVE"
push	offset aApplyemissive
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423860 endp




sub_4238F0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_423860
movzx	esi, byte ptr [esi+13h]
mov	eax, [edi]
and	esi, 0Fh
test	eax, eax
jz	short loc_42392E
cmp	dword ptr [eax-4], 0
jz	short loc_42392E
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42392E:		; "SHADOWTECHNIQUE"
push	offset aShadowtechniqu
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4238F0 endp




sub_423980 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4238F0
mov	esi, [esi+10h]
mov	eax, [edi]
shr	esi, 1Ch
and	esi, 1
test	eax, eax
jz	short loc_4239BF
cmp	dword ptr [eax-4], 0
jz	short loc_4239BF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4239BF:		; "ALPHATEST"
push	offset aAlphatest
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423980 endp




sub_423A10 proc	near

Src= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_0]
push	esi
mov	esi, [eax+0Ch]
mov	eax, [edi]
and	esi, 0Fh
test	eax, eax
jz	short loc_423A4A
cmp	dword ptr [eax-4], 0
jz	short loc_423A4A
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423A4A:		; "UVSETFORMAP05"
push	offset aUvsetformap05
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	4
sub_423A10 endp

align 10h



sub_423AA0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, ecx
mov	edi, edx
push	esi
call	sub_423A10
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 4
and	esi, 0Fh
test	eax, eax
jz	short loc_423AE1
cmp	dword ptr [eax-4], 0
jz	short loc_423AE1
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423AE1:		; "UVSETFORMAP06"
push	offset aUvsetformap06
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423AA0 endp

align 10h



sub_423B40 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_423AA0
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 8
and	esi, 0Fh
test	eax, eax
jz	short loc_423B7F
cmp	dword ptr [eax-4], 0
jz	short loc_423B7F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423B7F:		; "UVSETFORMAP07"
push	offset aUvsetformap07
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423B40 endp




sub_423BD0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_423B40
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 0Ch
and	esi, 0Fh
test	eax, eax
jz	short loc_423C10
cmp	dword ptr [eax-4], 0
jz	short loc_423C10
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423C10:		; "UVSETFORMAP08"
push	offset aUvsetformap08
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423BD0 endp

align 10h



sub_423C70 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_423BD0
movzx	edi, word ptr [edi+0Eh]
mov	eax, [esi]
and	edi, 0Fh
test	eax, eax
jz	short loc_423CAD
cmp	dword ptr [eax-4], 0
jz	short loc_423CAD
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_423CAD:		; "UVSETFORMAP09"
push	offset aUvsetformap09
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423C70 endp

align 10h



sub_423D00 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_423C70
mov	edi, [edi+0Ch]
mov	eax, [esi]
shr	edi, 14h
and	edi, 0Fh
test	eax, eax
jz	short loc_423D40
cmp	dword ptr [eax-4], 0
jz	short loc_423D40
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_423D40:		; "UVSETFORMAP10"
push	offset aUvsetformap10
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423D00 endp

align 10h



sub_423DA0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_423D00
movzx	edi, byte ptr [edi+0Fh]
mov	eax, [esi]
and	edi, 0Fh
test	eax, eax
jz	short loc_423DDD
cmp	dword ptr [eax-4], 0
jz	short loc_423DDD
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_423DDD:		; "UVSETFORMAP11"
push	offset aUvsetformap11
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423DA0 endp

align 10h



sub_423E30 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_423DA0
mov	edi, [edi+0Ch]
mov	eax, [esi]
shr	edi, 1Ch
test	eax, eax
jz	short loc_423E6D
cmp	dword ptr [eax-4], 0
jz	short loc_423E6D
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_423E6D:		; "POINTLIGHTCOUNT"
push	offset aPointlightcoun
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423E30 endp

align 10h



sub_423EC0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_0]
push	esi
mov	esi, [eax+8]
mov	eax, [edi]
and	esi, 7
test	eax, eax
jz	short loc_423EFA
cmp	dword ptr [eax-4], 0
jz	short loc_423EFA
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423EFA:		; "PROJLIGHTMAPCLIPPED"
push	offset aProjlightmapcl
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	4
sub_423EC0 endp

align 10h



sub_423F50 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, ecx
mov	edi, edx
push	esi
call	sub_423EC0
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 3
and	esi, 3
test	eax, eax
jz	short loc_423F91
cmp	dword ptr [eax-4], 0
jz	short loc_423F91
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_423F91:		; "PROJSHADOWMAPCOUNT"
push	offset aProjshadowmapc
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423F50 endp

align 10h



sub_423FF0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_423F50
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 5
and	esi, 7
test	eax, eax
jz	short loc_42402F
cmp	dword ptr [eax-4], 0
jz	short loc_42402F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42402F:		; "PROJSHADOWMAPTYPES"
push	offset aProjshadowmapt
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_423FF0 endp




sub_424080 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_423FF0
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 8
and	esi, 7
test	eax, eax
jz	short loc_4240C0
cmp	dword ptr [eax-4], 0
jz	short loc_4240C0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4240C0:		; "PROJSHADOWMAPCLIPPED"
push	offset aProjshadowma_0
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424080 endp

align 10h



sub_424120 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424080
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 0Bh
and	esi, 1
test	eax, eax
jz	short loc_42415F
cmp	dword ptr [eax-4], 0
jz	short loc_42415F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42415F:		; "PERVERTEXLIGHTING"
push	offset aPervertexlight
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424120 endp




sub_4241B0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424120
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 0Ch
and	esi, 0Fh
test	eax, eax
jz	short loc_4241F0
cmp	dword ptr [eax-4], 0
jz	short loc_4241F0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4241F0:		; "UVSETFORMAP00"
push	offset aUvsetformap00
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4241B0 endp

align 10h



sub_424250 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_4241B0
movzx	edi, word ptr [edi+0Ah]
mov	eax, [esi]
and	edi, 0Fh
test	eax, eax
jz	short loc_42428D
cmp	dword ptr [eax-4], 0
jz	short loc_42428D
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_42428D:		; "UVSETFORMAP01"
push	offset aUvsetformap01
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424250 endp

align 10h



sub_4242E0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_424250
mov	edi, [edi+8]
mov	eax, [esi]
shr	edi, 14h
and	edi, 0Fh
test	eax, eax
jz	short loc_424320
cmp	dword ptr [eax-4], 0
jz	short loc_424320
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_424320:		; "UVSETFORMAP02"
push	offset aUvsetformap02
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4242E0 endp

align 10h



sub_424380 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_4242E0
movzx	edi, byte ptr [edi+0Bh]
mov	eax, [esi]
and	edi, 0Fh
test	eax, eax
jz	short loc_4243BD
cmp	dword ptr [eax-4], 0
jz	short loc_4243BD
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_4243BD:		; "UVSETFORMAP03"
push	offset aUvsetformap03
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424380 endp

align 10h



sub_424410 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_424380
mov	edi, [edi+8]
mov	eax, [esi]
shr	edi, 1Ch
test	eax, eax
jz	short loc_42444D
cmp	dword ptr [eax-4], 0
jz	short loc_42444D
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_42444D:		; "UVSETFORMAP04"
push	offset aUvsetformap04
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424410 endp

align 10h



sub_4244A0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_0]
push	esi
mov	esi, [eax+4]
mov	eax, [edi]
and	esi, 1
test	eax, eax
jz	short loc_4244DA
cmp	dword ptr [eax-4], 0
jz	short loc_4244DA
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4244DA:		; "APPLYMODE"
push	offset aApplymode
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	4
sub_4244A0 endp

align 10h



sub_424530 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, ecx
mov	edi, edx
push	esi
call	sub_4244A0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 1
and	esi, 1
test	eax, eax
jz	short loc_424570
cmp	dword ptr [eax-4], 0
jz	short loc_424570
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424570:		; "WORLDPOSITION"
push	offset aWorldpositio_4
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424530 endp

align 10h



sub_4245D0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424530
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 2
and	esi, 1
test	eax, eax
jz	short loc_42460F
cmp	dword ptr [eax-4], 0
jz	short loc_42460F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42460F:		; "WORLDNORMAL"
push	offset aWorldnormal_0
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4245D0 endp




sub_424660 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_4245D0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 3
and	esi, 1
test	eax, eax
jz	short loc_4246A0
cmp	dword ptr [eax-4], 0
jz	short loc_4246A0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4246A0:		; "WORLDNBT"
push	offset aWorldnbt
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424660 endp

align 10h



sub_424700 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424660
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 4
and	esi, 1
test	eax, eax
jz	short loc_42473F
cmp	dword ptr [eax-4], 0
jz	short loc_42473F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42473F:		; "WORLDVIEW"
push	offset aWorldview_0
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424700 endp




sub_424790 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424700
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 5
and	esi, 3
test	eax, eax
jz	short loc_4247D0
cmp	dword ptr [eax-4], 0
jz	short loc_4247D0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4247D0:		; "NORMALMAPTYPE"
push	offset aNormalmaptyp_1
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424790 endp

align 10h



sub_424830 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424790
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 7
and	esi, 1
test	eax, eax
jz	short loc_42486F
cmp	dword ptr [eax-4], 0
jz	short loc_42486F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42486F:		; "PARALLAXMAPCOUNT"
push	offset aParallaxmapcou
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424830 endp




sub_4248C0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424830
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 8
and	esi, 1
test	eax, eax
jz	short loc_424900
cmp	dword ptr [eax-4], 0
jz	short loc_424900
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424900:		; "BASEMAPCOUNT"
push	offset aBasemapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4248C0 endp

align 10h



sub_424960 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4248C0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 9
and	esi, 1
test	eax, eax
jz	short loc_42499F
cmp	dword ptr [eax-4], 0
jz	short loc_42499F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42499F:		; "NORMALMAPCOUNT"
push	offset aNormalmapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424960 endp




sub_4249F0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424960
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Ah
and	esi, 1
test	eax, eax
jz	short loc_424A30
cmp	dword ptr [eax-4], 0
jz	short loc_424A30
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424A30:		; "DARKMAPCOUNT"
push	offset aDarkmapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4249F0 endp

align 10h



sub_424A90 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4249F0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Bh
and	esi, 1
test	eax, eax
jz	short loc_424ACF
cmp	dword ptr [eax-4], 0
jz	short loc_424ACF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424ACF:		; "DETAILMAPCOUNT"
push	offset aDetailmapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424A90 endp




sub_424B20 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424A90
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Ch
and	esi, 1
test	eax, eax
jz	short loc_424B60
cmp	dword ptr [eax-4], 0
jz	short loc_424B60
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424B60:		; "BUMPMAPCOUNT"
push	offset aBumpmapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424B20 endp

align 10h



sub_424BC0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424B20
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Dh
and	esi, 1
test	eax, eax
jz	short loc_424BFF
cmp	dword ptr [eax-4], 0
jz	short loc_424BFF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424BFF:		; "GLOSSMAPCOUNT"
push	offset aGlossmapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424BC0 endp




sub_424C50 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424BC0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Eh
and	esi, 1
test	eax, eax
jz	short loc_424C90
cmp	dword ptr [eax-4], 0
jz	short loc_424C90
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424C90:		; "GLOWMAPCOUNT"
push	offset aGlowmapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424C50 endp

align 10h



sub_424CF0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424C50
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Fh
and	esi, 1
test	eax, eax
jz	short loc_424D2F
cmp	dword ptr [eax-4], 0
jz	short loc_424D2F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424D2F:		; "CUSTOMMAP00COUNT"
push	offset aCustommap00cou
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424CF0 endp




sub_424D80 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424CF0
movzx	esi, word ptr [esi+6]
mov	eax, [edi]
and	esi, 1
test	eax, eax
jz	short loc_424DBE
cmp	dword ptr [eax-4], 0
jz	short loc_424DBE
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424DBE:		; "CUSTOMMAP01COUNT"
push	offset aCustommap01cou
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424D80 endp




sub_424E10 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424D80
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 11h
and	esi, 1
test	eax, eax
jz	short loc_424E4F
cmp	dword ptr [eax-4], 0
jz	short loc_424E4F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424E4F:		; "CUSTOMMAP02COUNT"
push	offset aCustommap02cou
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424E10 endp




sub_424EA0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424E10
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 12h
and	esi, 1
test	eax, eax
jz	short loc_424EE0
cmp	dword ptr [eax-4], 0
jz	short loc_424EE0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424EE0:		; "CUSTOMMAP03COUNT"
push	offset aCustommap03cou
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424EA0 endp

align 10h



sub_424F40 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424EA0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 13h
and	esi, 1
test	eax, eax
jz	short loc_424F7F
cmp	dword ptr [eax-4], 0
jz	short loc_424F7F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_424F7F:		; "CUSTOMMAP04COUNT"
push	offset aCustommap04cou
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424F40 endp




sub_424FD0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_424F40
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 14h
and	esi, 7
test	eax, eax
jz	short loc_425010
cmp	dword ptr [eax-4], 0
jz	short loc_425010
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425010:		; "DECALMAPCOUNT"
push	offset aDecalmapcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_424FD0 endp

align 10h



sub_425070 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_424FD0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 17h
and	esi, 1
test	eax, eax
jz	short loc_4250AF
cmp	dword ptr [eax-4], 0
jz	short loc_4250AF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4250AF:		; "FOGENABLED"
push	offset aFogenabled_0
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425070 endp




sub_425100 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425070
movzx	esi, byte ptr [esi+7]
mov	eax, [edi]
and	esi, 7
test	eax, eax
jz	short loc_42513E
cmp	dword ptr [eax-4], 0
jz	short loc_42513E
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42513E:		; "ENVMAPTYPE"
push	offset aEnvmaptype
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425100 endp




sub_425190 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_425100
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 1Bh
and	esi, 3
test	eax, eax
jz	short loc_4251CF
cmp	dword ptr [eax-4], 0
jz	short loc_4251CF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4251CF:		; "PROJLIGHTMAPCOUNT"
push	offset aProjlightmapco
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425190 endp




sub_425220 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425190
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 1Dh
test	eax, eax
jz	short loc_42525D
cmp	dword ptr [eax-4], 0
jz	short loc_42525D
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42525D:		; "PROJLIGHTMAPTYPES"
push	offset aProjlightmapty
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425220 endp

align 10h



sub_4252B0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_0]
push	esi
mov	esi, [eax+0Ch]
mov	eax, [edi]
and	esi, 7
test	eax, eax
jz	short loc_4252EA
cmp	dword ptr [eax-4], 0
jz	short loc_4252EA
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4252EA:		; "UVSET09"
push	offset aUvset09
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	4
sub_4252B0 endp

align 10h



sub_425340 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, ecx
mov	edi, edx
push	esi
call	sub_4252B0
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 3
and	esi, 1
test	eax, eax
jz	short loc_425381
cmp	dword ptr [eax-4], 0
jz	short loc_425381
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425381:		; "UVSET09TEXOUTPUT"
push	offset aUvset09texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425340 endp

align 10h



sub_4253E0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_425340
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 4
and	esi, 7
test	eax, eax
jz	short loc_42541F
cmp	dword ptr [eax-4], 0
jz	short loc_42541F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42541F:		; "UVSET10"
push	offset aUvset10
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4253E0 endp




sub_425470 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_4253E0
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 7
and	esi, 1
test	eax, eax
jz	short loc_4254B0
cmp	dword ptr [eax-4], 0
jz	short loc_4254B0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4254B0:		; "UVSET10TEXOUTPUT"
push	offset aUvset10texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425470 endp

align 10h



sub_425510 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_425470
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 8
and	esi, 7
test	eax, eax
jz	short loc_42554F
cmp	dword ptr [eax-4], 0
jz	short loc_42554F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42554F:		; "UVSET11"
push	offset aUvset11
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425510 endp




sub_4255A0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425510
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 0Bh
and	esi, 1
test	eax, eax
jz	short loc_4255E0
cmp	dword ptr [eax-4], 0
jz	short loc_4255E0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4255E0:		; "UVSET11TEXOUTPUT"
push	offset aUvset11texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4255A0 endp

align 10h



sub_425640 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4255A0
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 0Ch
and	esi, 0Fh
test	eax, eax
jz	short loc_42567F
cmp	dword ptr [eax-4], 0
jz	short loc_42567F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42567F:		; "POINTLIGHTCOUNT"
push	offset aPointlightcoun
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425640 endp




sub_4256D0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425640
movzx	esi, word ptr [esi+0Eh]
mov	eax, [edi]
and	esi, 0Fh
test	eax, eax
jz	short loc_42570E
cmp	dword ptr [eax-4], 0
jz	short loc_42570E
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42570E:		; "SPOTLIGHTCOUNT"
push	offset aSpotlightcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4256D0 endp




sub_425760 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4256D0
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 14h
and	esi, 0Fh
test	eax, eax
jz	short loc_42579F
cmp	dword ptr [eax-4], 0
jz	short loc_42579F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42579F:		; "DIRLIGHTCOUNT"
push	offset aDirlightcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425760 endp




sub_4257F0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425760
movzx	esi, byte ptr [esi+0Fh]
mov	eax, [edi]
and	esi, 1
test	eax, eax
jz	short loc_42582E
cmp	dword ptr [eax-4], 0
jz	short loc_42582E
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42582E:		; "VERTEXCOLORS"
push	offset aVertexcolors
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4257F0 endp




sub_425880 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4257F0
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 19h
and	esi, 1
test	eax, eax
jz	short loc_4258BF
cmp	dword ptr [eax-4], 0
jz	short loc_4258BF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4258BF:		; "VERTEXLIGHTSONLY"
push	offset aVertexlightson
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425880 endp




sub_425910 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425880
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 1Ah
and	esi, 3
test	eax, eax
jz	short loc_425950
cmp	dword ptr [eax-4], 0
jz	short loc_425950
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425950:		; "AMBDIFFEMISSIVE"
push	offset aAmbdiffemissiv
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425910 endp

align 10h



sub_4259B0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_425910
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 1Ch
and	esi, 3
test	eax, eax
jz	short loc_4259EF
cmp	dword ptr [eax-4], 0
jz	short loc_4259EF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4259EF:		; "LIGHTINGMODE"
push	offset aLightingmode
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4259B0 endp




sub_425A40 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_4259B0
mov	esi, [esi+0Ch]
mov	eax, [edi]
shr	esi, 1Eh
and	esi, 1
test	eax, eax
jz	short loc_425A80
cmp	dword ptr [eax-4], 0
jz	short loc_425A80
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425A80:		; "APPLYMODE"
push	offset aApplymode
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425A40 endp

align 10h



sub_425AE0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_0]
push	esi
mov	esi, [eax+8]
mov	eax, [edi]
and	esi, 7
test	eax, eax
jz	short loc_425B1A
cmp	dword ptr [eax-4], 0
jz	short loc_425B1A
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425B1A:		; "UVSET01"
push	offset aUvset01
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	4
sub_425AE0 endp

align 10h



sub_425B70 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, ecx
mov	edi, edx
push	esi
call	sub_425AE0
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 3
and	esi, 1
test	eax, eax
jz	short loc_425BB1
cmp	dword ptr [eax-4], 0
jz	short loc_425BB1
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425BB1:		; "UVSET01TEXOUTPUT"
push	offset aUvset01texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425B70 endp

align 10h



sub_425C10 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_425B70
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 4
and	esi, 7
test	eax, eax
jz	short loc_425C4F
cmp	dword ptr [eax-4], 0
jz	short loc_425C4F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425C4F:		; "UVSET02"
push	offset aUvset02
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425C10 endp




sub_425CA0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425C10
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 7
and	esi, 1
test	eax, eax
jz	short loc_425CE0
cmp	dword ptr [eax-4], 0
jz	short loc_425CE0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425CE0:		; "UVSET02TEXOUTPUT"
push	offset aUvset02texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425CA0 endp

align 10h



sub_425D40 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_425CA0
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 8
and	esi, 7
test	eax, eax
jz	short loc_425D7F
cmp	dword ptr [eax-4], 0
jz	short loc_425D7F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425D7F:		; "UVSET03"
push	offset aUvset03
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425D40 endp




sub_425DD0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425D40
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 0Bh
and	esi, 1
test	eax, eax
jz	short loc_425E10
cmp	dword ptr [eax-4], 0
jz	short loc_425E10
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425E10:		; "UVSET03TEXOUTPUT"
push	offset aUvset03texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425DD0 endp

align 10h



sub_425E70 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_425DD0
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 0Ch
and	esi, 7
test	eax, eax
jz	short loc_425EAF
cmp	dword ptr [eax-4], 0
jz	short loc_425EAF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425EAF:		; "UVSET04"
push	offset aUvset04
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425E70 endp




sub_425F00 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_425E70
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 0Fh
and	esi, 1
test	eax, eax
jz	short loc_425F40
cmp	dword ptr [eax-4], 0
jz	short loc_425F40
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_425F40:		; "UVSET04TEXOUTPUT"
push	offset aUvset04texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425F00 endp

align 10h



sub_425FA0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_425F00
movzx	edi, word ptr [edi+0Ah]
mov	eax, [esi]
and	edi, 7
test	eax, eax
jz	short loc_425FDD
cmp	dword ptr [eax-4], 0
jz	short loc_425FDD
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_425FDD:		; "UVSET05"
push	offset aUvset05
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_425FA0 endp

align 10h



sub_426030 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_425FA0
mov	edi, [edi+8]
mov	eax, [esi]
shr	edi, 13h
and	edi, 1
test	eax, eax
jz	short loc_426070
cmp	dword ptr [eax-4], 0
jz	short loc_426070
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_426070:		; "UVSET05TEXOUTPUT"
push	offset aUvset05texoutp
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426030 endp

align 10h



sub_4260D0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_426030
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 14h
and	esi, 7
test	eax, eax
jz	short loc_42610F
cmp	dword ptr [eax-4], 0
jz	short loc_42610F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42610F:		; "UVSET06"
push	offset aUvset06
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4260D0 endp




sub_426160 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_4260D0
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 17h
and	esi, 1
test	eax, eax
jz	short loc_4261A0
cmp	dword ptr [eax-4], 0
jz	short loc_4261A0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4261A0:		; "UVSET06TEXOUTPUT"
push	offset aUvset06texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426160 endp

align 10h



sub_426200 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_426160
movzx	edi, byte ptr [edi+0Bh]
mov	eax, [esi]
and	edi, 7
test	eax, eax
jz	short loc_42623D
cmp	dword ptr [eax-4], 0
jz	short loc_42623D
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_42623D:		; "UVSET07"
push	offset aUvset07
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426200 endp

align 10h



sub_426290 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_426200
mov	edi, [edi+8]
mov	eax, [esi]
shr	edi, 1Bh
and	edi, 1
test	eax, eax
jz	short loc_4262D0
cmp	dword ptr [eax-4], 0
jz	short loc_4262D0
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_4262D0:		; "UVSET07TEXOUTPUT"
push	offset aUvset07texoutp
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426290 endp

align 10h



sub_426330 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_426290
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 1Ch
and	esi, 7
test	eax, eax
jz	short loc_42636F
cmp	dword ptr [eax-4], 0
jz	short loc_42636F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42636F:		; "UVSET08"
push	offset aUvset08
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426330 endp




sub_4263C0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_426330
mov	esi, [esi+8]
mov	eax, [edi]
shr	esi, 1Fh
test	eax, eax
jz	short loc_4263FD
cmp	dword ptr [eax-4], 0
jz	short loc_4263FD
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4263FD:		; "UVSET08TEXOUTPUT"
push	offset aUvset08texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4263C0 endp

align 10h



sub_426450 proc	near

Src= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_0]
push	esi
mov	esi, [eax+4]
mov	eax, [edi]
and	esi, 3
test	eax, eax
jz	short loc_42648A
cmp	dword ptr [eax-4], 0
jz	short loc_42648A
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42648A:		; "TRANSFORM"
push	offset aTransform_0
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	4
sub_426450 endp

align 10h



sub_4264E0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, ecx
mov	edi, edx
push	esi
call	sub_426450
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 2
and	esi, 1
test	eax, eax
jz	short loc_426521
cmp	dword ptr [eax-4], 0
jz	short loc_426521
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_426521:		; "OUTPUTWORLDPOS"
push	offset aOutputworldpos
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4264E0 endp

align 10h



sub_426580 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_4264E0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 3
and	esi, 1
test	eax, eax
jz	short loc_4265BF
cmp	dword ptr [eax-4], 0
jz	short loc_4265BF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4265BF:		; "OUTPUTWORLDNBT"
push	offset aOutputworldnbt
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426580 endp




sub_426610 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_426580
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 4
and	esi, 1
test	eax, eax
jz	short loc_426650
cmp	dword ptr [eax-4], 0
jz	short loc_426650
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_426650:		; "OUTPUTWORLDVIEW"
push	offset aOutputworldvie
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426610 endp

align 10h



sub_4266B0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_426610
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 5
and	esi, 1
test	eax, eax
jz	short loc_4266EF
cmp	dword ptr [eax-4], 0
jz	short loc_4266EF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4266EF:		; "OUTPUTTANGENTVIEW"
push	offset aOutputtangentv
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4266B0 endp




sub_426740 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_4266B0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 6
and	esi, 3
test	eax, eax
jz	short loc_426780
cmp	dword ptr [eax-4], 0
jz	short loc_426780
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_426780:		; "NORMAL"
push	offset aNormal_16
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426740 endp

align 10h



sub_4267E0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_426740
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 8
and	esi, 1
test	eax, eax
jz	short loc_42681F
cmp	dword ptr [eax-4], 0
jz	short loc_42681F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42681F:		; "SPECULAR"
push	offset aSpecular_7
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4267E0 endp




sub_426870 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_4267E0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 9
and	esi, 3
test	eax, eax
jz	short loc_4268B0
cmp	dword ptr [eax-4], 0
jz	short loc_4268B0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4268B0:		; "FOGTYPE"
push	offset aFogtype_1
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426870 endp

align 10h



sub_426910 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_426870
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Bh
and	esi, 7
test	eax, eax
jz	short loc_42694F
cmp	dword ptr [eax-4], 0
jz	short loc_42694F
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_42694F:		; "ENVMAPTYPE"
push	offset aEnvmaptype
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426910 endp




sub_4269A0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_426910
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 0Eh
and	esi, 3
test	eax, eax
jz	short loc_4269E0
cmp	dword ptr [eax-4], 0
jz	short loc_4269E0
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_4269E0:		; "PROJLIGHTMAPCOUNT"
push	offset aProjlightmapco
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_4269A0 endp

align 10h



sub_426A40 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	edi
mov	edx, esi
mov	edi, ecx
call	sub_4269A0
movzx	edi, word ptr [edi+6]
mov	eax, [esi]
and	edi, 7
test	eax, eax
jz	short loc_426A7D
cmp	dword ptr [eax-4], 0
jz	short loc_426A7D
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_426A7D:		; "PROJLIGHTMAPTYPES"
push	offset aProjlightmapty
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426A40 endp

align 10h



sub_426AD0 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	esi, edx
mov	edi, ecx
call	sub_426A40
mov	edi, [edi+4]
mov	eax, [esi]
shr	edi, 13h
and	edi, 3
test	eax, eax
jz	short loc_426B10
cmp	dword ptr [eax-4], 0
jz	short loc_426B10
push	offset asc_154D83C ; "\n"
mov	eax, esi
call	sub_1128DE0

loc_426B10:		; "PROJSHADOWMAPCOUNT"
push	offset aProjshadowmapc
mov	eax, esi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, esi
call	sub_1128DE0
push	edi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, esi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426AD0 endp

align 10h



sub_426B70 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_426AD0
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 15h
and	esi, 7
test	eax, eax
jz	short loc_426BAF
cmp	dword ptr [eax-4], 0
jz	short loc_426BAF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_426BAF:		; "PROJSHADOWMAPTYPES"
push	offset aProjshadowmapt
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426B70 endp




sub_426C00 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_426B70
movzx	esi, byte ptr [esi+7]
mov	eax, [edi]
and	esi, 0Fh
test	eax, eax
jz	short loc_426C3E
cmp	dword ptr [eax-4], 0
jz	short loc_426C3E
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_426C3E:		; "OUTPUTUVCOUNT"
push	offset aOutputuvcount
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426C00 endp




sub_426C90 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	edx, edi
mov	esi, ecx
call	sub_426C00
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 1Ch
and	esi, 7
test	eax, eax
jz	short loc_426CCF
cmp	dword ptr [eax-4], 0
jz	short loc_426CCF
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_426CCF:		; "UVSET00"
push	offset aUvset00
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+110h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+108h+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426C90 endp




sub_426D20 proc	near

Src= byte ptr -104h
var_4= dword ptr -4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
push	edi
mov	edi, edx
mov	esi, ecx
call	sub_426C90
mov	esi, [esi+4]
mov	eax, [edi]
shr	esi, 1Fh
test	eax, eax
jz	short loc_426D5D
cmp	dword ptr [eax-4], 0
jz	short loc_426D5D
push	offset asc_154D83C ; "\n"
mov	eax, edi
call	sub_1128DE0

loc_426D5D:		; "UVSET00TEXOUTPUT"
push	offset aUvset00texoutp
mov	eax, edi
call	sub_1128DE0
push	offset asc_1553318 ; " = "
mov	eax, edi
call	sub_1128DE0
push	esi
push	offset aD_4	; "%d"
mov	ecx, 100h	; SizeInBytes
lea	eax, [esp+114h+Src]
call	sub_4107B0
add	esp, 8
lea	eax, [esp+10Ch+Src]
push	eax		; Src
mov	eax, edi
call	sub_1128DE0
mov	ecx, [esp+10Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_426D20 endp

align 10h



sub_426DB0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	ebx, ebx
cmp	[ebp+4], ebx
jbe	short loc_426DFE
push	esi
push	edi
nop

loc_426DC0:
mov	eax, [ebp+0]
mov	esi, [eax+ebx*4]
lea	edi, [eax+ebx*4]
test	esi, esi
jz	short loc_426DEA
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_426DE4
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_426DE4:
mov	dword ptr [edi], 0

loc_426DEA:
inc	ebx
cmp	ebx, [ebp+4]
jb	short loc_426DC0
pop	edi
pop	esi
mov	dword ptr [ebp+8], 0
pop	ebp
pop	ebx
retn	4

loc_426DFE:
mov	[ebp+8], ebx
pop	ebp
pop	ebx
retn	4
sub_426DB0 endp

align 10h



sub_426E10 proc	near

arg_0= dword ptr  4

movzx	edx, word ptr [eax+0Ah]
push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
cmp	ecx, edx
jb	short loc_426E37
lea	edx, [ecx+1]
mov	[eax+0Ah], dx
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
jz	short loc_426E6A
inc	word ptr [eax+0Ch]
jmp	short loc_426E6A

loc_426E37:
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
mov	edx, [eax+4]
jz	short loc_426E56
cmp	dword ptr [edx+ecx*4], 0
setz	dl
test	dl, dl
jz	short loc_426E6A
inc	word ptr [eax+0Ch]
jmp	short loc_426E6A

loc_426E56:
cmp	dword ptr [edx+ecx*4], 0
setnz	dl
test	dl, dl
jz	short loc_426E6A
mov	edx, 0FFFFh
add	[eax+0Ch], dx

loc_426E6A:
mov	eax, [eax+4]
mov	esi, [eax+ecx*4]
lea	edi, [eax+ecx*4]
cmp	esi, [ebp+0]
jz	short loc_426EAC
test	esi, esi
jz	short loc_426E93
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_426E93
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_426E93:
mov	eax, [ebp+0]
mov	[edi], eax
test	eax, eax
jz	short loc_426EAC
pop	edi
pop	esi
add	eax, 4
pop	ebp
mov	[esp+arg_0], eax
jmp	ds:InterlockedIncrement

loc_426EAC:
pop	edi
pop	esi
pop	ebp
retn	4
sub_426E10 endp

align 10h



sub_426EC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_426EF0
test	[esp+4+arg_0], 1
jz	short loc_426EE6
test	esi, esi
jz	short loc_426EE6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_426EE6:
mov	eax, esi
pop	esi
retn	4
sub_426EC0 endp

align 10h



sub_426EF0 proc	near
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1553870
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_426F1B
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_426F1B
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_426F1B:
mov	eax, [esi+2Ch]
lea	edi, [esi+2Ch]
test	eax, eax
jz	short loc_426F3E
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_426F3D
push	edi
mov	eax, ebx
call	sub_1171F60

loc_426F3D:
pop	ebx

loc_426F3E:
lea	ecx, [esi+28h]
call	sub_11288C0
mov	eax, [esi+1Ch]
mov	dword ptr [esi+18h], offset off_1556034
test	eax, eax
jz	short loc_426F80
mov	ecx, [eax-4]
lea	edi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	edi, edi
jz	short loc_426F80
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	edi
call	edx

loc_426F80:
mov	eax, [esi+0Ch]
mov	dword ptr [esi+8], offset off_1556034
test	eax, eax
jz	short loc_426FBA
mov	ecx, [eax-4]
lea	edi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	edi, edi
jz	short loc_426FBA
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	edi
call	edx

loc_426FBA:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	edi
pop	esi
pop	ebp
retn
sub_426EF0 endp

align 10h



; int __fastcall sub_426FD0(void *Src, void *Dst, rsize_t DstSize)
sub_426FD0 proc	near

Dst= dword ptr	4
DstSize= dword ptr  8

mov	edx, [esp+DstSize]
push	eax		; MaxCount
mov	eax, [esp+4+Dst]
push	ecx		; Src
push	edx		; DstSize
push	eax		; Dst
call	_memmove_s
add	esp, 10h
retn
sub_426FD0 endp

align 10h



sub_426FF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+30h]
push	edi
lea	edi, [esi+30h]
test	eax, eax
jz	short loc_42701B
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_42701A
push	edi
mov	eax, ebx
call	sub_1171F60

loc_42701A:
pop	ebx

loc_42701B:
mov	ecx, esi
call	sub_1128290
test	[esp+8+arg_0], 1
jz	short loc_427040
test	esi, esi
jz	short loc_427040
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_427040:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_426FF0 endp

align 10h



sub_427050 proc	near
mov	eax, offset off_17EF8C4
retn
sub_427050 endp

align 10h



sub_427060 proc	near
mov	eax, offset off_17EF8CC
retn
sub_427060 endp

align 10h



sub_427070 proc	near

arg_0= byte ptr	 4

push	esi

loc_427071:
mov	esi, ecx
call	sub_1128290
test	[esp+4+arg_0], 1
jz	short loc_427096
test	esi, esi
jz	short loc_427096
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_427096:
mov	eax, esi
pop	esi
retn	4
sub_427070 endp

align 10h



sub_4270A0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1556034
test	eax, eax
jz	short loc_4270DE
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4270DD
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4270DD:
pop	esi

loc_4270DE:
test	[esp+4+arg_0], 1
jz	short loc_4270F8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_4270F8:
mov	eax, edi
pop	edi
retn	4
sub_4270A0 endp

align 10h



sub_427100 proc	near
mov	eax, offset off_17EF8D4
retn
sub_427100 endp

align 10h



sub_427110 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1127530
test	[esp+4+arg_0], 1
jz	short loc_427139
test	esi, esi
jz	short loc_427139
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0E4h
push	3
push	esi
call	eax

loc_427139:
mov	eax, esi
pop	esi
retn	4
sub_427110 endp

align 10h



sub_427140 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_427170
test	[esp+4+arg_0], 1
jz	short loc_427166
test	edi, edi
jz	short loc_427166
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	edi
call	eax

loc_427166:
mov	eax, edi
pop	edi
retn	4
sub_427140 endp

align 10h



sub_427170 proc	near
mov	eax, [edi+0Ch]
mov	dword ptr [edi+8], offset off_1556034
test	eax, eax
jz	short loc_4271AC
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_4271AB
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4271AB:
pop	esi

loc_4271AC:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ds:InterlockedDecrement
retn
sub_427170 endp

align 10h



sub_4271C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1553910
call	sub_114BA50
test	[esp+4+arg_0], 1
jz	short loc_4271E8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_4271E8:
mov	eax, esi
pop	esi
retn	4
sub_4271C0 endp

align 10h



sub_4271F0 proc	near
mov	eax, offset off_17EF8DC
retn
sub_4271F0 endp

align 10h



sub_427200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
fld	dword ptr [eax+4]
fld	dword ptr [eax]
fld	dword ptr [eax+8]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+8+var_8]
mov	ecx, [esp+8+var_8]
test	ecx, ecx
jnz	short loc_42722B
fldz
add	esp, 8
retn

loc_42722B:
fld	[esp+8+var_8]
sar	ecx, 1
fmul	ds:dbl_15FCC48
mov	edx, 5F3759DFh
sub	edx, ecx
mov	[esp+8+var_8], edx
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	[esp+8+var_8]
fld	st
fmulp	st(2), st
fld	st
fmulp	st(2), st
fld	ds:dbl_15FCD58
fsubrp	st(2), st
fmulp	st(1), st
fstp	[esp+8+var_8]
fld	dword ptr [eax]
fld	[esp+8+var_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	st
fmul	dword ptr [eax+4]
fstp	dword ptr [eax+4]
fld	dword ptr [eax+8]
fmul	st, st(1)
fstp	dword ptr [eax+8]
fld1
fdivrp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
add	esp, 8
retn
sub_427200 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1270BD0

loc_427290:
push	esi
mov	esi, eax
mov	eax, dword_188AAF4
cmp	eax, esi
jz	short loc_4272CF
test	eax, eax
jz	short loc_4272BB
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4272BA
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_4272BA:
pop	edi

loc_4272BB:
mov	dword_188AAF4, esi
test	esi, esi
jz	short loc_4272CF
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_4272CF:
mov	eax, offset dword_188AAF4
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_1270BD0
align 10h



sub_4272E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_427306
test	esi, esi
jz	short loc_427306
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_427306:
mov	eax, esi
pop	esi
retn	4
sub_4272E0 endp

align 10h



sub_427310 proc	near
mov	eax, offset off_17EF8E4
retn
sub_427310 endp

align 10h



sub_427320 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
xor	eax, eax
xor	ecx, ecx
xor	edx, edx
mov	[esi+10h], edi
mov	[esi+14h], ax
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_1553978
mov	[esi+18h], dx
mov	eax, esi
pop	edi
retn
sub_427320 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1270750

loc_427360:
push	esi
mov	esi, eax
mov	eax, dword_188AAF8
cmp	eax, esi
jz	short loc_42739F
test	eax, eax
jz	short loc_42738B
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42738A
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_42738A:
pop	edi

loc_42738B:
mov	dword_188AAF8, esi
test	esi, esi
jz	short loc_42739F
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_42739F:
mov	eax, offset dword_188AAF8
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_1270750
align 10h



sub_4273B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_4273D6
test	esi, esi
jz	short loc_4273D6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_4273D6:
mov	eax, esi
pop	esi
retn	4
sub_4273B0 endp

align 10h



sub_4273E0 proc	near
mov	eax, offset off_17EF8EC
retn
sub_4273E0 endp

align 10h



sub_4273F0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_4273FF
or	word ptr [eax+18h], 1
retn	4

loc_4273FF:
mov	ecx, 0FFFEh
and	[eax+18h], cx
retn	4
sub_4273F0 endp

align 10h



sub_427410 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
fldz
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	dword ptr [esi], offset	off_15539C8
xor	eax, eax
mov	[esi+14h], ax
xor	ecx, ecx
mov	[esi+16h], cx
fst	dword ptr [esi+20h]
fst	dword ptr [esi+24h]
xor	edx, edx
fstp	dword ptr [esi+28h]
mov	[esi+18h], dx
fld1
pop	edi
fstp	dword ptr [esi+1Ch]
mov	eax, dword_1889A70
mov	[esi+20h], eax
mov	ecx, dword_1889A74
mov	[esi+24h], ecx
mov	edx, dword_1889A78
mov	[esi+28h], edx
mov	eax, esi
retn
sub_427410 endp

align 10h



sub_427480 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1553A18
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_4274A8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_4274A8:
mov	eax, esi
pop	esi
retn	4
sub_427480 endp

align 10h



sub_4274B0 proc	near
push	esi
mov	esi, eax
mov	eax, dword_188AAFC
cmp	eax, esi
jz	short loc_4274EF
test	eax, eax
jz	short loc_4274DB
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4274DA
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_4274DA:
pop	edi

loc_4274DB:
mov	dword_188AAFC, esi
test	esi, esi
jz	short loc_4274EF
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_4274EF:
mov	eax, offset dword_188AAFC
pop	esi
retn
sub_4274B0 endp

align 10h
; [00000006 BYTES: COLLAPSED FUNCTION __RTC_NumErrors_0. PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_427510 proc	near
mov	eax, offset off_17EF8F4
retn
sub_427510 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1270050

loc_427520:
push	esi
mov	esi, eax
mov	eax, dword_188AB00
cmp	eax, esi
jz	short loc_42755F
test	eax, eax
jz	short loc_42754B
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42754A
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_42754A:
pop	edi

loc_42754B:
mov	dword_188AB00, esi
test	esi, esi
jz	short loc_42755F
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_42755F:
mov	eax, offset dword_188AB00
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_1270050
align 10h



sub_427570 proc	near
mov	eax, offset off_17EF8FC
retn
sub_427570 endp

align 10h
; [00000006 BYTES: COLLAPSED FUNCTION __RTC_NumErrors_1. PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_427590 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
xor	eax, eax
xor	ecx, ecx
mov	edx, 1
mov	[esi+10h], edi
mov	[esi+14h], ax
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_1553A68
mov	[esi+18h], dx
mov	eax, esi
pop	edi
retn
sub_427590 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_126FD40

loc_4275D0:
push	esi
mov	esi, eax
mov	eax, dword_188AB04
cmp	eax, esi
jz	short loc_42760F
test	eax, eax
jz	short loc_4275FB
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4275FA
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_4275FA:
pop	edi

loc_4275FB:
mov	dword_188AB04, esi
test	esi, esi
jz	short loc_42760F
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_42760F:
mov	eax, offset dword_188AB04
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_126FD40
align 10h



sub_427620 proc	near
mov	eax, offset off_17EF904
retn
sub_427620 endp

align 10h



sub_427630 proc	near
mov	eax, 6
retn
sub_427630 endp

align 10h



sub_427640 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
xor	eax, eax
xor	ecx, ecx
xor	edx, edx
mov	[esi+10h], edi
mov	[esi+14h], ax
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_15FBDFC
mov	[esi+18h], dx
mov	eax, esi
pop	edi
retn
sub_427640 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_126F650

loc_427680:
push	esi
mov	esi, eax
mov	eax, dword_188AB08
cmp	eax, esi
jz	short loc_4276BF
test	eax, eax
jz	short loc_4276AB
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4276AA
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_4276AA:
pop	edi

loc_4276AB:
mov	dword_188AB08, esi
test	esi, esi
jz	short loc_4276BF
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_4276BF:
mov	eax, offset dword_188AB08
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_126F650
align 10h
; START	OF FUNCTION CHUNK FOR sub_126EF50

loc_4276D0:
push	esi
mov	esi, eax
mov	eax, dword_188AB0C
cmp	eax, esi
jz	short loc_42770F
test	eax, eax
jz	short loc_4276FB
push	edi
mov	edi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4276FA
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_4276FA:
pop	edi

loc_4276FB:
mov	dword_188AB0C, esi
test	esi, esi
jz	short loc_42770F
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_42770F:
mov	eax, offset dword_188AB0C
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_126EF50
align 10h



sub_427720 proc	near
mov	eax, offset off_17EF914
retn
sub_427720 endp

align 10h



sub_427730 proc	near
mov	eax, 0Ah
retn
sub_427730 endp

align 10h



sub_427740 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	[esi+8], edi
mov	[esi+0Ch], edi
xor	eax, eax
xor	ecx, ecx
xor	edx, edx
mov	[esi+10h], edi
mov	[esi+14h], ax
mov	[esi+16h], cx
mov	dword ptr [esi], offset	off_1553AB8
mov	[esi+18h], dx
mov	eax, esi
pop	edi
retn
sub_427740 endp

align 10h



sub_427780 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1553B08
test	eax, eax
jz	short loc_4277BE
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_4277BD
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_4277BD:
pop	esi

loc_4277BE:
test	[esp+4+arg_0], 1
jz	short loc_4277D8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_4277D8:
mov	eax, edi
pop	edi
retn	4
sub_427780 endp

align 10h



sub_4277E0 proc	near
xor	eax, eax
cmp	ax, word_17EF924
jz	locret_4278AD
mov	cx, word_17EF926
xor	edx, edx
push	esi
cmp	dx, cx
jnb	short loc_427869
push	ebx
xor	ebx, ebx
cmp	ax, cx
jnb	short loc_427860
push	ebp
mov	ebp, ds:InterlockedDecrement
push	edi
mov	edi, edi

loc_427810:
mov	eax, dword_17EF920
movzx	edx, bx
cmp	dword ptr [eax+edx*4], 0
lea	esi, [eax+edx*4]
setnz	al
test	al, al
jz	short loc_427858
mov	edi, [esi]
test	edi, edi
jz	short loc_42784C
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_42783F
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42783F:
mov	dword ptr [esi], 0
mov	cx, word_17EF926

loc_42784C:
mov	edx, 0FFFFh
add	word_17EF928, dx

loc_427858:
inc	ebx
cmp	bx, cx
jb	short loc_427810
pop	edi
pop	ebp

loc_427860:
xor	eax, eax
mov	word_17EF926, ax
pop	ebx

loc_427869:
mov	eax, dword_17EF920
xor	ecx, ecx
mov	word_17EF924, cx
mov	dword_17EF920, ecx
test	eax, eax
jz	short loc_4278AC
mov	edx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	edx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_4278AC
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	esi
call	eax

loc_4278AC:
pop	esi

locret_4278AD:
retn
sub_4277E0 endp

align 10h



sub_4278B0 proc	near

arg_0= dword ptr  4

movzx	ecx, word_17EF926
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, dword_17EF920
cmp	eax, ecx
jb	short loc_4278E5
lea	edx, [eax+1]
mov	word_17EF926, dx
cmp	dword ptr [ebx], 0
setnz	cl
test	cl, cl
jz	short loc_42791A
inc	word_17EF928
jmp	short loc_42791A

loc_4278E5:
cmp	dword ptr [ebx], 0
setnz	cl
test	cl, cl
jz	short loc_427903
cmp	dword ptr [edi+eax*4], 0
setz	cl
test	cl, cl
jz	short loc_42791A
inc	word_17EF928
jmp	short loc_42791A

loc_427903:
cmp	dword ptr [edi+eax*4], 0
setnz	cl
test	cl, cl
jz	short loc_42791A
mov	ecx, 0FFFFh
add	word_17EF928, cx

loc_42791A:
mov	esi, [edi+eax*4]
lea	edi, [edi+eax*4]
cmp	esi, [ebx]
jz	short loc_427957
test	esi, esi
jz	short loc_42793F
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42793F
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_42793F:
mov	eax, [ebx]
mov	[edi], eax
test	eax, eax
jz	short loc_427957
pop	edi
pop	esi
add	eax, 4
pop	ebx
mov	[esp+arg_0], eax
jmp	ds:InterlockedIncrement

loc_427957:
pop	edi
pop	esi
pop	ebx
retn	4
sub_4278B0 endp

align 10h



sub_427960 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1553B10
call	sub_111B040
test	[esp+4+arg_0], 1
jz	short loc_427988
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_427988:
mov	eax, esi
pop	esi
retn	4
sub_427960 endp

align 10h



sub_427990 proc	near
mov	eax, offset off_17EF92C
retn
sub_427990 endp

align 10h



sub_4279A0 proc	near
mov	eax, offset off_17EF934
retn
sub_4279A0 endp

align 10h



sub_4279B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1125AA0
test	[esp+4+arg_0], 1
jz	short loc_4279D6
test	esi, esi
jz	short loc_4279D6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_4279D6:
mov	eax, esi
pop	esi
retn	4
sub_4279B0 endp

align 10h



sub_4279E0 proc	near

arg_0= word ptr	 4

movzx	eax, word ptr [ecx+0Ch]
mov	dx, [esp+arg_0]
cmp	dx, ax
ja	short loc_4279F5
mov	[ecx+30h], dx
retn	4

loc_4279F5:
mov	[ecx+30h], ax
retn	4
sub_4279E0 endp

align 10h



sub_427A00 proc	near
mov	eax, offset off_17EF93C
retn
sub_427A00 endp

align 10h



sub_427A10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_116B520
test	[esp+4+arg_0], 1
jz	short loc_427A39
test	esi, esi
jz	short loc_427A39
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0F0h
push	3
push	esi
call	eax

loc_427A39:
mov	eax, esi
pop	esi
retn	4
sub_427A10 endp

align 10h



sub_427A40 proc	near
mov	eax, offset off_17EF944
retn
sub_427A40 endp

align 10h



sub_427A50 proc	near

arg_0= word ptr	 4

mov	cx, [eax+0E8h]
mov	edx, 0FFF8h
and	cx, dx
or	cx, [esp+arg_0]
mov	[eax+0E8h], cx
retn	4
sub_427A50 endp

align 10h



sub_427A70 proc	near
push	edi
mov	edi, eax
push	0
call	sub_116B0A0
fldz
mov	eax, 9
fstp	dword ptr [edi+0ECh]
mov	[edi+0E8h], ax
mov	dword ptr [edi], offset	off_1553C68
mov	eax, edi
pop	edi
retn
sub_427A70 endp

align 10h



sub_427AA0 proc	near
movzx	eax, word ptr [eax+0B8h]
retn
sub_427AA0 endp

align 10h



sub_427AB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_1553D10
test	eax, eax
jz	short loc_427AD4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_427AD4:
mov	ecx, esi
mov	dword ptr [esi+0Ch], 0
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_427AFD
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_427AFD:
mov	eax, esi
pop	esi
retn	4
sub_427AB0 endp

align 10h



sub_427B10 proc	near
mov	eax, offset off_17EF94C
retn
sub_427B10 endp

align 10h



sub_427B20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1553D60
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_427B48
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_427B48:
mov	eax, esi
pop	esi
retn	4
sub_427B20 endp

align 10h



sub_427B50 proc	near
mov	eax, offset off_17EF954
retn
sub_427B50 endp

align 10h



sub_427B60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_116B520
test	[esp+4+arg_0], 1
jz	short loc_427B89
test	esi, esi
jz	short loc_427B89
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	108h
push	3
push	esi
call	eax

loc_427B89:
mov	eax, esi
pop	esi
retn	4
sub_427B60 endp

align 10h



sub_427B90 proc	near
mov	eax, offset off_17EF95C
retn
sub_427B90 endp

align 10h



sub_427BA0 proc	near
push	edi
mov	edi, eax
push	0
call	sub_116B0A0
fldz
mov	dword ptr [edi], offset	off_1553DB0
mov	eax, dword_1889A64
mov	[edi+0E8h], eax
mov	ecx, dword_1889A68
mov	[edi+0ECh], ecx
mov	edx, dword_1889A6C
fst	dword ptr [edi+0F4h]
mov	[edi+0F0h], edx
mov	eax, dword_1889A64
mov	[edi+0F8h], eax
mov	ecx, dword_1889A68
mov	[edi+0FCh], ecx
mov	edx, dword_1889A6C
fstp	dword ptr [edi+104h]
push	2
lea	eax, [edi+0ACh]
push	eax
mov	[edi+100h], edx
call	sub_41E210
xor	ecx, ecx
mov	[edi+0BAh], cx
mov	eax, edi
pop	edi
retn
sub_427BA0 endp

align 10h



sub_427C20 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [ecx+4]
fmul	dword ptr [eax+4]
fld	dword ptr [ecx]
fmul	dword ptr [eax]
faddp	st(1), st
fld	dword ptr [ecx+8]
fmul	dword ptr [eax+8]
faddp	st(1), st
fsub	dword ptr [eax+0Ch]
fstp	[esp+4+var_4]
fldz
fld	[esp+4+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_427C54
fstp	st(1)
mov	eax, 2
fstp	st
pop	ecx
retn

loc_427C54:
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_427C64
mov	eax, 1
pop	ecx
retn

loc_427C64:
xor	eax, eax
pop	ecx
retn
sub_427C20 endp

align 10h



sub_427C70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551E88
mov	ecx, dword_1889414
test	ecx, ecx
jz	short loc_427C8E
mov	eax, [ecx]
mov	edx, [eax+0BCh]
push	esi
call	edx

loc_427C8E:
mov	ecx, esi
call	sub_1138D30
test	[esp+4+arg_0], 1
jz	short loc_427CB2
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	118h
push	3
push	esi
call	eax

loc_427CB2:
mov	eax, esi
pop	esi
retn	4
sub_427C70 endp

align 10h



sub_427CC0 proc	near
mov	eax, offset off_17EF964
retn
sub_427CC0 endp

align 10h



sub_427CD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1553EE8
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_427CF8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_427CF8:
mov	eax, esi
pop	esi
retn	4
sub_427CD0 endp

align 10h



sub_427D00 proc	near
mov	dword ptr [ecx], offset	off_1553EE8
jmp	sub_1160E70
sub_427D00 endp

align 10h



sub_427D10 proc	near
mov	eax, offset off_17EF96C
retn
sub_427D10 endp

align 10h



sub_427D20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1553F38
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_427D48
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_427D48:
mov	eax, esi
pop	esi
retn	4
sub_427D20 endp

align 10h



sub_427D50 proc	near
mov	eax, offset off_17EF974
retn
sub_427D50 endp

align 10h



sub_427D60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1236C80
test	[esp+4+arg_0], 1
jz	short loc_427D89
test	esi, esi
jz	short loc_427D89
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	110h
push	3
push	esi
call	eax

loc_427D89:
mov	eax, esi
pop	esi
retn	4
sub_427D60 endp

align 10h



sub_427D90 proc	near
mov	eax, offset off_17EF97C
retn
sub_427D90 endp

align 10h



sub_427DA0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+108h]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_427DE2
test	esi, esi
jz	short loc_427DCE
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_427DCE
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_427DCE:
mov	[ebx+108h], edi
test	edi, edi
jz	short loc_427DE2
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_427DE2:
pop	edi
pop	esi
pop	ebx
retn	4
sub_427DA0 endp

align 10h



sub_427DF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1162120
test	[esp+4+arg_0], 1
jz	short loc_427E19
test	esi, esi
jz	short loc_427E19
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0D4h
push	3
push	esi
call	eax

loc_427E19:
mov	eax, esi
pop	esi
retn	4
sub_427DF0 endp

align 10h



sub_427E20 proc	near
mov	eax, offset off_17EF984
retn
sub_427E20 endp

align 10h



sub_427E30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+40h]
mov	dword ptr [esi], offset	off_15540D0
test	eax, eax
jz	short loc_427E54
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_427E54:
mov	ecx, esi
call	sub_114BA50
test	[esp+4+arg_0], 1
jz	short loc_427E76
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_427E76:
mov	eax, esi
pop	esi
retn	4
sub_427E30 endp

align 10h



sub_427E80 proc	near
mov	eax, offset off_17EF98C
retn
sub_427E80 endp

align 10h



sub_427E90 proc	near
mov	eax, offset off_17EF994
retn
sub_427E90 endp

align 10h



sub_427EA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_15541B8
test	eax, eax
jz	short loc_427EC4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_427EC4:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_427EF0
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_427EF0:
mov	eax, esi
pop	esi
retn	4
sub_427EA0 endp

align 10h



sub_427F00 proc	near
mov	eax, offset off_17EF99C
retn
sub_427F00 endp

align 10h



sub_427F10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+2Ch]
mov	dword ptr [esi], offset	off_1554210
test	eax, eax
jz	short loc_427F34
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_427F34:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_427F60
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_427F60:
mov	eax, esi
pop	esi
retn	4
sub_427F10 endp

align 10h



sub_427F70 proc	near
mov	eax, offset off_17EF9A4
retn
sub_427F70 endp

align 10h



sub_427F80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12364F0
test	[esp+4+arg_0], 1
jz	short loc_427FA6
test	esi, esi
jz	short loc_427FA6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_427FA6:
mov	eax, esi
pop	esi
retn	4
sub_427F80 endp

db 14h dup(0CCh)



sub_427FC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [esp+8+arg_4]
cmp	esi, [ebx+4]
jz	short loc_428027
push	ebp
test	esi, esi
jbe	short loc_428005
mov	ecx, esi
call	sub_428030
xor	edx, edx
mov	ebp, eax
cmp	[ebx+8], edx
jbe	short loc_428007
xor	eax, eax
push	edi

loc_427FE7:
mov	esi, [ebx]
add	esi, eax
lea	edi, [eax+ebp]
mov	ecx, 7
inc	edx
rep movsd
add	eax, 1Ch
cmp	edx, [ebx+8]
jb	short loc_427FE7
mov	esi, [esp+10h+arg_4]
pop	edi
jmp	short loc_428007

loc_428005:
xor	ebp, ebp

loc_428007:
mov	eax, [ebx]
test	eax, eax
jz	short loc_428021
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_428021:
mov	[ebx], ebp
mov	[ebx+4], esi
pop	ebp

loc_428027:
pop	esi
pop	ebx
retn	8
sub_427FC0 endp

align 10h



sub_428030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

lea	eax, ds:0[ecx*8]
sub	eax, ecx
add	eax, eax
sub	esp, 8
add	eax, eax
jnz	short loc_428047
mov	eax, 1

loc_428047:
push	0
push	0FFFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
add	esp, 8
retn
sub_428030 endp

align 10h



sub_428080 proc	near
mov	eax, offset off_17EF9AC
retn
sub_428080 endp

align 10h



sub_428090 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

mov	eax, [edi+20h]
sub	esp, 10h
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
mov	esi, [eax]
test	esi, esi
jnz	loc_428132
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	esi
push	0FFFFFFFFh
push	esi
push	1
push	1
lea	eax, [esp+2Ch+arg_0]
push	eax
mov	[esp+30h+arg_0], 4
mov	[esp+30h+var_10], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_4280F3
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4280F3:
xor	ecx, ecx
mov	[eax+4], cx
mov	dword ptr [eax], offset	off_1551CF0
mov	[eax+8], ecx
mov	dx, [eax+4]
mov	[eax+0Ch], ecx
mov	ecx, 0F100h
and	dx, cx
mov	ecx, 3100h
or	dx, cx
mov	[eax+4], dx
lea	edx, [esp+18h+arg_0]
push	edx
mov	esi, eax
push	0
lea	ecx, [edi+1Ch]
mov	[esp+20h+arg_0], esi
call	sub_40FBD0

loc_428132:
mov	ax, [esi+4]
mov	ecx, 0CFFFh
shl	ebp, 0Ch
and	ax, cx
or	ax, bp
mov	[esi+4], ax
pop	esi
pop	ebp
add	esp, 10h
retn	4
sub_428090 endp




sub_428150 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 14h
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+20h]
mov	esi, [eax]
test	esi, esi
jnz	loc_4281F0
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	esi
push	0FFFFFFFFh
push	esi
push	1
push	1
lea	eax, [esp+30h+var_14]
push	eax
mov	[esp+34h+var_14], 4
mov	[esp+34h+var_10], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+34h+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_4281B1
lea	ecx, [esp+1Ch+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+20h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4281B1:
xor	ecx, ecx
mov	[eax+4], cx
mov	dword ptr [eax], offset	off_1551CF0
mov	[eax+8], ecx
mov	dx, [eax+4]
mov	[eax+0Ch], ecx
mov	ecx, 0F100h
and	dx, cx
mov	ecx, 3100h
or	dx, cx
mov	[eax+4], dx
lea	edx, [esp+1Ch+var_10]
push	edx
mov	esi, eax
push	0
lea	ecx, [edi+1Ch]
mov	[esp+24h+var_10], esi
call	sub_40FBD0

loc_4281F0:
mov	edi, [esi+8]
push	ebx
mov	ebx, [esp+20h+arg_0]
cmp	edi, ebx
jz	short loc_428228
test	edi, edi
jz	short loc_428217
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_428217
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_428217:
mov	[esi+8], ebx
test	ebx, ebx
jz	short loc_428228
add	ebx, 4
push	ebx		; lpAddend
call	ds:InterlockedIncrement

loc_428228:
pop	ebx
pop	edi
pop	esi
add	esp, 14h
retn	4
sub_428150 endp

align 10h



sub_428240 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1122D30
test	[esp+4+arg_0], 1
jz	short loc_428266
test	esi, esi
jz	short loc_428266
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_428266:
mov	eax, esi
pop	esi
retn	4
sub_428240 endp

align 10h



sub_428270 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
retn
sub_428270 endp

align 10h



sub_428280 proc	near
mov	eax, [ecx]
test	eax, eax
jz	short locret_42829A
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_42829A:
retn
sub_428280 endp

align 10h



sub_4282A0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, 2
jz	short loc_4282E7
mov	eax, [esi-4]
push	edi
push	offset sub_1122100
lea	edi, [esi-4]
push	eax
push	2Ch
push	esi
call	sub_40F3E0
test	bl, 1
jz	short loc_4282DF
test	edi, edi
jz	short loc_4282DF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	edi
call	eax

loc_4282DF:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_4282E7:
call	sub_1122100
test	bl, 1
jz	short loc_428309
test	esi, esi
jz	short loc_428309
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_428309:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_4282A0 endp




sub_428310 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15542FC
call	sub_418AE0
mov	dword ptr [esi], offset	off_15532F8
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_428344
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_428344:
test	[esp+4+arg_0], 1
jz	short loc_42835F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_42835F:
mov	eax, esi
pop	esi
retn	4
sub_428310 endp

align 10h



sub_428370 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	edx, [esi+8]
xor	eax, eax
push	edi
test	edx, edx
jbe	short loc_42839B
movzx	edi, word ptr [ebx]
mov	ecx, [esi]

loc_428387:
cmp	[ecx], di
jz	short loc_428396
inc	eax
add	ecx, 2
cmp	eax, edx
jb	short loc_428387
jmp	short loc_42839B

loc_428396:
cmp	eax, 0FFFFFFFFh
jnz	short loc_4283C4

loc_42839B:
mov	eax, [esi+4]
cmp	edx, eax
jnz	short loc_4283B5
test	eax, eax
jbe	short loc_4283AA
add	eax, eax
jmp	short loc_4283AF

loc_4283AA:
mov	eax, 1

loc_4283AF:
push	eax
call	sub_4284E0

loc_4283B5:
mov	eax, [esi+8]
mov	dx, [ebx]
mov	ecx, [esi]
mov	[ecx+eax*2], dx
inc	dword ptr [esi+8]

loc_4283C4:
pop	edi
pop	esi
pop	ebx
retn	4
sub_428370 endp

align 10h



sub_4283D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_15532F8
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_4283D0 endp

align 10h



; int __stdcall	sub_428440(int,	int, float)
sub_428440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
fld	[esp+arg_8]
mov	ecx, [esp+arg_4]
fstp	dword ptr [eax+8]
mov	[eax+4], ecx
retn	0Ch
sub_428440 endp

align 10h



sub_428460 proc	near

arg_0= dword ptr  4

fldz
push	esi
mov	esi, [esp+4+arg_0]
fstp	dword ptr [esi+8]
call	sub_410460
pop	esi
retn	4
sub_428460 endp

align 10h



sub_428480 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	ebx, [esi+4]
jz	short loc_4284DA
push	edi
test	ebx, ebx
jbe	short loc_4284B8
mov	eax, ebx
call	sub_428540
mov	edi, eax
xor	eax, eax
cmp	[esi+8], eax
jbe	short loc_4284BA
nop

loc_4284A0:
mov	ecx, [esi]
mov	edx, [ecx+eax*8]
mov	[edi+eax*8], edx
mov	ecx, [ecx+eax*8+4]
mov	[edi+eax*8+4], ecx
inc	eax
cmp	eax, [esi+8]
jb	short loc_4284A0
jmp	short loc_4284BA

loc_4284B8:
xor	edi, edi

loc_4284BA:
mov	eax, [esi]
test	eax, eax
jz	short loc_4284D4
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4284D4:
mov	[esi], edi
mov	[esi+4], ebx
pop	edi

loc_4284DA:
pop	ebx
retn	4
sub_428480 endp

align 10h



sub_4284E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	ebx, [esi+4]
jz	short loc_428534
push	edi
test	ebx, ebx
jbe	short loc_428512
mov	eax, ebx
call	sub_41E5C0
mov	edi, eax
xor	eax, eax
cmp	[esi+8], eax
jbe	short loc_428514
nop

loc_428500:
mov	ecx, [esi]
mov	dx, [ecx+eax*2]
mov	[edi+eax*2], dx
inc	eax
cmp	eax, [esi+8]
jb	short loc_428500
jmp	short loc_428514

loc_428512:
xor	edi, edi

loc_428514:
mov	eax, [esi]
test	eax, eax
jz	short loc_42852E
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_42852E:
mov	[esi], edi
mov	[esi+4], ebx
pop	edi

loc_428534:
pop	ebx
retn	4
sub_4284E0 endp

align 10h



sub_428540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

add	eax, eax
add	eax, eax
sub	esp, 8
add	eax, eax
jnz	short loc_428550
mov	eax, 1

loc_428550:
push	0
push	0FFFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
add	esp, 8
retn
sub_428540 endp

align 10h



sub_428590 proc	near
mov	eax, offset off_17EF9B4
retn
sub_428590 endp

align 10h



sub_4285A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1554310
call	sub_116B520
test	[esp+4+arg_0], 1
jz	short loc_4285CB
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0ECh
push	3
push	esi
call	eax

loc_4285CB:
mov	eax, esi
pop	esi
retn	4
sub_4285A0 endp

align 10h



sub_4285E0 proc	near
mov	eax, offset off_17EF9BC
retn
sub_4285E0 endp

align 10h



sub_4285F0 proc	near
mov	eax, [eax+0Ch]
retn
sub_4285F0 endp

align 10h



sub_428600 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1551E88
mov	ecx, dword_1889414
test	ecx, ecx
jz	short loc_42861E
mov	eax, [ecx]
mov	edx, [eax+0BCh]
push	esi
call	edx

loc_42861E:
mov	ecx, esi
call	sub_1138D30
test	[esp+4+arg_0], 1
jz	short loc_428642
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	138h
push	3
push	esi
call	eax

loc_428642:
mov	eax, esi
pop	esi
retn	4
sub_428600 endp

align 10h



sub_428650 proc	near
mov	eax, offset off_17EF9C4
retn
sub_428650 endp

align 10h



; int __stdcall	sub_428660(float)
sub_428660 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx		; float
fst	dword ptr [esi+128h]
fmul	ds:dbl_15FCC90
fdiv	ds:dbl_15FCD10
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fstp	[esp+4+var_4]
call	sub_41BAF0
fstp	dword ptr [esi+134h]
inc	dword ptr [esi+0B8h]
add	esp, 4
retn	4
sub_428660 endp

align 10h



; int __cdecl sub_4286A0(float)
sub_4286A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_41BAF0
add	esp, 4
retn
sub_4286A0 endp

align 10h



; int __stdcall	sub_4286C0(float)
sub_4286C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx		; float
fst	dword ptr [esi+124h]
fmul	ds:dbl_15FCC90
fdiv	ds:dbl_15FCD10
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fstp	[esp+4+var_4]
call	sub_41BAF0
fstp	dword ptr [esi+130h]
inc	dword ptr [esi+0B8h]
add	esp, 4
retn	4
sub_4286C0 endp

align 10h



sub_428700 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_428730
test	[esp+4+arg_0], 1
jz	short loc_428726
test	esi, esi
jz	short loc_428726
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_428726:
mov	eax, esi
pop	esi
retn	4
sub_428700 endp

align 10h



sub_428730 proc	near
push	ebp
push	edi
xor	edi, edi
mov	dword ptr [esi], offset	off_1554448
cmp	[esi+0Ch], edi
jbe	short loc_428764
nop

loc_428740:
mov	eax, [esi+10h]
mov	eax, [eax+edi*4]
test	eax, eax
jz	short loc_42875E
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_42875E:
inc	edi
cmp	edi, [esi+0Ch]
jb	short loc_428740

loc_428764:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_42877F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_42877F:
mov	ebp, ds:InterlockedDecrement
lea	edi, [esi+8]
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_1551F18
mov	eax, [edi]
test	eax, eax
jz	short loc_4287B4
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_4287B3
push	edi
mov	eax, ebx
call	sub_1171F60

loc_4287B3:
pop	ebx

loc_4287B4:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	edi
pop	ebp
retn
sub_428730 endp

align 10h



sub_4287D0 proc	near
mov	eax, offset off_17EF9CC
retn
sub_4287D0 endp

align 10h



sub_4287E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0FCh]
mov	dword ptr [esi+0F8h], offset off_1554C5C
test	eax, eax
jz	short loc_42880B
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_42880B:
mov	ecx, esi
call	sub_116B520
test	[esp+4+arg_0], 1
jz	short loc_428834
test	esi, esi
jz	short loc_428834
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	108h
push	3
push	esi
call	eax

loc_428834:
mov	eax, esi
pop	esi
retn	4
sub_4287E0 endp

align 10h



sub_428840 proc	near
mov	eax, offset off_17EF9D4
retn
sub_428840 endp

align 10h



sub_428850 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_428880
test	[esp+4+arg_0], 1
jz	short loc_428876
test	esi, esi
jz	short loc_428876
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_428876:
mov	eax, esi
pop	esi
retn	4
sub_428850 endp

align 10h



sub_428880 proc	near
push	ebp
push	edi
xor	edi, edi
mov	dword ptr [esi], offset	off_1554540
cmp	[esi+0Ch], edi
jbe	short loc_4288B4
nop

loc_428890:
mov	eax, [esi+10h]
mov	eax, [eax+edi*4]
test	eax, eax
jz	short loc_4288AE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4288AE:
inc	edi
cmp	edi, [esi+0Ch]
jb	short loc_428890

loc_4288B4:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_4288CF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_4288CF:
mov	ebp, ds:InterlockedDecrement
lea	edi, [esi+8]
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_1551F18
mov	eax, [edi]
test	eax, eax
jz	short loc_428904
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_428903
push	edi
mov	eax, ebx
call	sub_1171F60

loc_428903:
pop	ebx

loc_428904:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	edi
pop	ebp
retn
sub_428880 endp

align 10h



sub_428920 proc	near
mov	eax, offset off_17EF9DC
retn
sub_428920 endp

align 10h



sub_428930 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	[ecx+40h], ax
retn	4
sub_428930 endp

align 10h



sub_428940 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	[ecx+42h], ax
retn	4
sub_428940 endp

align 10h



sub_428950 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	[ecx+0Ch], ax
retn	4
sub_428950 endp

align 10h



sub_428960 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	[ecx+30h], ax
retn	4
sub_428960 endp

align 10h



sub_428970 proc	near
mov	eax, offset off_17EF9E4
retn
sub_428970 endp

align 10h



sub_428980 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15545F8
call	sub_1160E70
test	[esp+4+arg_0], 1
jz	short loc_4289A8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_4289A8:
mov	eax, esi
pop	esi
retn	4
sub_428980 endp

align 10h



sub_4289B0 proc	near
mov	eax, offset off_17EF9EC
retn
sub_4289B0 endp

align 10h



sub_4289C0 proc	near
mov	eax, offset off_17EF9F4
retn
sub_4289C0 endp

align 10h



sub_4289D0 proc	near
mov	eax, offset off_17EF9FC
retn
sub_4289D0 endp

align 10h



sub_4289E0 proc	near
mov	eax, offset off_17EFA04
retn
sub_4289E0 endp

align 10h



sub_4289F0 proc	near
mov	eax, offset off_17EFA0C
retn
sub_4289F0 endp

align 10h



sub_428A00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_111FA20
test	[esp+4+arg_0], 1
jz	short loc_428A26
test	esi, esi
jz	short loc_428A26
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	70h
push	3
push	esi
call	eax

loc_428A26:
mov	eax, esi
pop	esi
retn	4
sub_428A00 endp

align 10h



sub_428A30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_111EFF0
test	[esp+4+arg_0], 1
jz	short loc_428A56
test	esi, esi
jz	short loc_428A56
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_428A56:
mov	eax, esi
pop	esi
retn	4
sub_428A30 endp

align 10h



sub_428A60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_111FB90
test	[esp+4+arg_0], 1
jz	short loc_428A89
test	esi, esi
jz	short loc_428A89
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	144h
push	3
push	esi
call	eax

loc_428A89:
mov	eax, esi
pop	esi
retn	4
sub_428A60 endp

align 10h



sub_428A90 proc	near
push	esi
mov	esi, [edi+0Ch]
mov	dword ptr [edi+8], 0
test	esi, esi
jz	short loc_428AB9
mov	ecx, esi
call	sub_428BC0
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_428AB9:
mov	eax, [edi]
pop	esi
test	eax, eax
jz	short locret_428AD4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_428AD4:
retn
sub_428A90 endp

align 10h



sub_428AE0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, dword_1889574
mov	ecx, [eax]
push	ebx
push	ebp
xor	ebp, ebp
push	ebp
push	0FFFFFFFFh
push	ebp
push	1
push	1
lea	eax, [esp+38h+var_14]
push	eax
mov	[esp+3Ch+var_14], 4
mov	[esp+3Ch+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+3Ch+var_10]
push	eax
call	edx
mov	ebx, eax
mov	[esp+24h+var_18], ebx
cmp	ebx, ebp
jnz	short loc_428B39
lea	ecx, [esp+24h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+28h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_428B39:
push	esi
mov	esi, [esp+28h+arg_0]
mov	[ebx+4], esi
mov	[ebx+8], ebp
cmp	esi, ebp
jbe	short loc_428B51
call	sub_428C10
mov	[ebx], eax
jmp	short loc_428B53

loc_428B51:
mov	[ebx], ebp

loc_428B53:
test	esi, esi
jbe	short loc_428BA7
mov	[esp+28h+var_1C], ebp
jmp	short loc_428B60
align 10h

loc_428B60:
cmp	ebp, [ebx+4]
jb	short loc_428B69
xor	ebx, ebx
jmp	short loc_428B6F

loc_428B69:
mov	ebx, [ebx]
add	ebx, [esp+28h+var_1C]

loc_428B6F:
mov	eax, [edi+4]
cmp	[edi+8], eax
jnz	short loc_428B8C
test	eax, eax
jbe	short loc_428B7F
add	eax, eax
jmp	short loc_428B84

loc_428B7F:
mov	eax, 1

loc_428B84:
push	eax
mov	esi, edi
call	sub_410400

loc_428B8C:
mov	ecx, [edi+8]
mov	edx, [edi]
add	[esp+28h+var_1C], 14h
mov	[edx+ecx*4], ebx
inc	dword ptr [edi+8]
mov	ebx, [esp+28h+var_18]
inc	ebp
cmp	ebp, [esp+28h+arg_0]
jb	short loc_428B60

loc_428BA7:
mov	eax, [edi+0Ch]
pop	esi
mov	[ebx+8], eax
pop	ebp
mov	[edi+0Ch], ebx
pop	ebx
add	esp, 1Ch
retn	4
sub_428AE0 endp

align 10h



sub_428BC0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_428BE5
cmp	dword ptr [ecx-4], 0
lea	eax, [ecx-4]
jz	short loc_428BDC
mov	eax, [ecx]
mov	edx, [eax]
push	3
call	edx
jmp	short loc_428BE5

loc_428BDC:		; void *
push	eax
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_428BE5:
mov	esi, [esi+8]
test	esi, esi
jz	short loc_428C06
mov	ecx, esi
call	sub_428BC0
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_428C06:
pop	esi
retn
sub_428BC0 endp

align 10h



sub_428C10 proc	near
test	esi, esi
jnz	short loc_428C1D
push	4		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
jmp	short loc_428C41

loc_428C1D:
xor	ecx, ecx
mov	eax, esi
mov	edx, 14h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070

loc_428C41:
add	esp, 4
test	eax, eax
jz	short loc_428C60
push	edi
push	offset sub_111EB70
push	esi
lea	edi, [eax+4]
push	14h
push	edi
mov	[eax], esi
call	sub_4078B0
mov	eax, edi
pop	edi
retn

loc_428C60:
xor	eax, eax
retn
sub_428C10 endp

align 10h



sub_428C70 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, 2
jz	short loc_428CB7
mov	eax, [esi-4]
push	edi
push	offset sub_111EB10
lea	edi, [esi-4]
push	eax
push	14h
push	esi
call	sub_40F3E0
test	bl, 1
jz	short loc_428CAF
test	edi, edi
jz	short loc_428CAF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	edi
call	eax

loc_428CAF:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_428CB7:
call	sub_111EB10
test	bl, 1
jz	short loc_428CD9
test	esi, esi
jz	short loc_428CD9
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_428CD9:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_428C70 endp




sub_428CE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
xor	eax, eax
mov	dword ptr [esi], offset	off_1554838
mov	[esi+0Ch], eax
mov	[esi+10h], eax
call	sub_1136BA0
test	[esp+4+arg_0], 1
jz	short loc_428D10
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_428D10:
mov	eax, esi
pop	esi
retn	4
sub_428CE0 endp

align 10h



sub_428D20 proc	near
cmp	dword ptr [esi+94h], 3
jz	short loc_428D2C

loc_428D29:
xor	al, al
retn

loc_428D2C:
mov	eax, [esi]
mov	edx, [eax+148h]
mov	ecx, esi
call	edx
mov	dword ptr [esi+94h], 0
test	al, al
jz	short loc_428D29
mov	eax, 1
add	[esi+9Ch], eax
retn
sub_428D20 endp

align 10h



sub_428D60 proc	near
cmp	dword ptr [esi+94h], 1
jnz	short loc_428D83
mov	eax, [esi]
mov	edx, [eax+144h]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_428D86
mov	dword ptr [esi+94h], 0

loc_428D83:
xor	al, al
retn

loc_428D86:
mov	dword ptr [esi+94h], 3
mov	al, 1
retn
sub_428D60 endp

align 10h



sub_428DA0 proc	near
mov	al, [eax+90h]
retn
sub_428DA0 endp

align 10h



sub_428DB0 proc	near
mov	eax, [esi+8]
test	eax, eax
jz	short loc_428DC5
mov	ecx, [esi+10h]
push	ecx
push	esi
call	eax
add	esp, 8
test	al, al
jz	short locret_428DDF

loc_428DC5:
mov	edx, [esi]
mov	eax, [edx+20h]
mov	ecx, esi
call	eax
mov	eax, [esi+0Ch]
test	eax, eax
jz	short locret_428DDF
mov	ecx, [esi+14h]
push	ecx
push	esi
call	eax
add	esp, 8

locret_428DDF:
retn
sub_428DB0 endp




sub_428DE0 proc	near
mov	al, [eax+1Ch]
retn
sub_428DE0 endp

align 10h



sub_428DF0 proc	near
cmp	dword ptr [esi+94h], 0
jz	short loc_428DFC

loc_428DF9:
xor	al, al
retn

loc_428DFC:
mov	eax, [esi]
mov	edx, [eax+140h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_428DF9
mov	eax, 1
mov	[esi+94h], eax
retn
sub_428DF0 endp

align 10h



sub_428E20 proc	near
mov	off_17EC770, eax
retn
sub_428E20 endp

align 10h



sub_428E30 proc	near
mov	off_17EC774, eax
retn
sub_428E30 endp

align 10h



sub_428E40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
movzx	eax, word ptr [ebx+8]
cmp	ecx, eax
jz	loc_428FF5
movzx	eax, word ptr [ebx+0Ah]
push	ebp
movzx	edx, ax
push	esi
push	edi
cmp	ecx, edx
jnb	short loc_428EBF
movzx	ebp, cx
cmp	cx, ax
jnb	short loc_428EBB
jmp	short loc_428E70
align 10h

loc_428E70:
mov	ecx, [ebx+4]
movzx	eax, bp
cmp	dword ptr [ecx+eax*4], 0
lea	esi, [ecx+eax*4]
setnz	al
test	al, al
jz	short loc_428EB0
mov	edi, [esi]
test	edi, edi
jz	short loc_428EA7
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_428EA1
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_428EA1:
mov	dword ptr [esi], 0

loc_428EA7:
mov	eax, 0FFFFh
add	[ebx+0Ch], ax

loc_428EB0:
inc	ebp
cmp	bp, [ebx+0Ah]
jb	short loc_428E70
mov	ecx, [esp+10h+arg_4]

loc_428EBB:
mov	[ebx+0Ah], cx

loc_428EBF:
mov	esi, [ebx+4]
mov	[esp+10h+arg_4], esi
mov	[ebx+8], cx
test	ecx, ecx
jbe	loc_428F9B
movzx	edi, cx
call	sub_5FB570
mov	[ebx+4], eax
xor	eax, eax
xor	ecx, ecx
mov	[esp+10h+arg_0], eax
cmp	cx, [ebx+0Ah]
jnb	short loc_428F4E
jmp	short loc_428EF0
align 10h

loc_428EF0:
mov	edi, [ebx+4]
mov	edx, [esp+10h+arg_4]
movzx	esi, ax
add	esi, esi
add	esi, esi
mov	ebp, [edi+esi]
add	edi, esi
cmp	ebp, [esi+edx]
jz	short loc_428F3B
test	ebp, ebp
jz	short loc_428F24
lea	eax, [ebp+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_428F24
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax

loc_428F24:
mov	ecx, [esp+10h+arg_4]
mov	esi, [esi+ecx]
mov	[edi], esi
test	esi, esi
jz	short loc_428F3B
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_428F3B:
mov	eax, [esp+10h+arg_0]
inc	eax
mov	[esp+10h+arg_0], eax
cmp	ax, [ebx+0Ah]
jb	short loc_428EF0
mov	esi, [esp+10h+arg_4]

loc_428F4E:
movzx	edi, word ptr [ebx+0Ah]
cmp	di, [ebx+8]
jnb	short loc_428FA2
jmp	short loc_428F60
align 10h

loc_428F60:
mov	eax, [ebx+4]
movzx	edx, di
mov	esi, [eax+edx*4]
lea	ebp, [eax+edx*4]
test	esi, esi
jz	short loc_428F8E
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_428F87
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_428F87:
mov	dword ptr [ebp+0], 0

loc_428F8E:
inc	edi
cmp	di, [ebx+8]
jb	short loc_428F60
mov	esi, [esp+10h+arg_4]
jmp	short loc_428FA2

loc_428F9B:
mov	dword ptr [ebx+4], 0

loc_428FA2:
test	esi, esi
jz	short loc_428FF2
mov	ebx, [esi-4]
lea	ebp, [esi-4]
lea	edi, [esi+ebx*4]
sub	ebx, 1
js	short loc_428FDA

loc_428FB4:
mov	esi, [edi-4]
sub	edi, 4
test	esi, esi
jz	short loc_428FD5
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_428FD5
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_428FD5:
sub	ebx, 1
jns	short loc_428FB4

loc_428FDA:
test	ebp, ebp
jz	short loc_428FF2
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	ebp
call	eax

loc_428FF2:
pop	edi
pop	esi
pop	ebp

loc_428FF5:
pop	ebx
retn	8
sub_428E40 endp

align 10h



; int __stdcall	sub_429000(int,	char *)
sub_429000 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+0]
mov	[esp+8+arg_4], eax
cmp	eax, ebx
jnz	short loc_429020
test	ebx, ebx
jz	short loc_429084
pop	ebp
mov	al, 1
pop	ebx
retn	8

loc_429020:
test	ebx, ebx
jz	short loc_429084
test	eax, eax
jz	short loc_429084
cmp	byte ptr [ebx],	0
jz	short loc_429084
mov	eax, ebx
lea	edx, [eax+1]

loc_429032:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_429032
push	esi
sub	eax, edx
push	edi
mov	edi, eax
mov	eax, ebp
xor	esi, esi
call	sub_415C20
test	eax, eax
jbe	short loc_429072
lea	esp, [esp+0]

loc_429050:
mov	eax, [esp+10h+arg_4]
push	edi		; size_t
lea	ecx, [esi+eax]
push	ebx		; char *
push	ecx		; char *
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jz	short loc_42907B
mov	eax, ebp
inc	esi
call	sub_415C20
cmp	esi, eax
jb	short loc_429050

loc_429072:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	8

loc_42907B:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8

loc_429084:
pop	ebp
xor	al, al
pop	ebx
retn	8
sub_429000 endp

align 10h



sub_429090 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_111DED0
test	[esp+4+arg_0], 1
jz	short loc_4290B6
test	esi, esi
jz	short loc_4290B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_4290B6:
mov	eax, esi
pop	esi
retn	4
sub_429090 endp

align 10h



sub_4290C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1293D60
test	[esp+4+arg_0], 1
jz	short loc_4290E6
test	esi, esi
jz	short loc_4290E6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_4290E6:
mov	eax, esi
pop	esi
retn	4
sub_4290C0 endp

align 10h



sub_4290F0 proc	near
mov	eax, offset off_17EFA24
retn
sub_4290F0 endp

align 10h



sub_429100 proc	near
push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_42911F
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42911F
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
pop	esi
jmp	eax

loc_42911F:
pop	esi
retn
sub_429100 endp

align 10h



sub_429130 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+3B8h]
push	edi
lea	edi, [esi+3B8h]
test	eax, eax
jz	short loc_429161
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_429160
push	edi
mov	eax, ebx
call	sub_1171F60

loc_429160:
pop	ebx

loc_429161:
push	esi
call	sub_420110
test	[esp+8+arg_0], 1
jz	short loc_429188
test	esi, esi
jz	short loc_429188
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3BCh
push	3
push	esi
call	eax

loc_429188:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_429130 endp

align 10h



sub_429190 proc	near
mov	eax, offset off_17EFA2C
retn
sub_429190 endp

align 10h



sub_4291A0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_4291D0
test	[esp+4+arg_0], 1
jz	short loc_4291C6
test	edi, edi
jz	short loc_4291C6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	edi
call	eax

loc_4291C6:
mov	eax, edi
pop	edi
retn	4
sub_4291A0 endp

align 10h



sub_4291D0 proc	near
mov	eax, [edi+18h]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
lea	esi, [edi+18h]
test	eax, eax
jz	short loc_4291FB
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_4291FA
push	esi
mov	eax, ebx
call	sub_1171F60

loc_4291FA:
pop	ebx

loc_4291FB:
mov	esi, [edi+14h]
test	esi, esi
jz	short loc_429215
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_429215
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_429215:
mov	esi, [edi+10h]
test	esi, esi
jz	short loc_42922F
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_42922F
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_42922F:
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_429249
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_429249
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_429249:
mov	esi, [edi+8]
test	esi, esi
jz	short loc_429263
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_429263
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_429263:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
retn
sub_4291D0 endp

align 10h



sub_429280 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_111B280
test	[esp+4+arg_0], 1
jz	short loc_4292A6
test	esi, esi
jz	short loc_4292A6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_4292A6:
mov	eax, esi
pop	esi
retn	4
sub_429280 endp

align 10h



sub_4292B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_111B040
test	[esp+4+arg_0], 1
jz	short loc_4292D6
test	esi, esi
jz	short loc_4292D6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_4292D6:
mov	eax, esi
pop	esi
retn	4
sub_4292B0 endp

align 10h



sub_4292E0 proc	near
mov	eax, offset off_17EFA34
retn
sub_4292E0 endp

align 10h



sub_4292F0 proc	near
mov	eax, offset off_17EFA3C
retn
sub_4292F0 endp

align 10h



sub_429300 proc	near
push	offset Addend	; lpAddend
mov	dword ptr [ecx], offset	off_154EE18
call	ds:InterlockedDecrement
retn
sub_429300 endp

align 10h



sub_429320 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_42934E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8
push	3
push	esi
call	eax

loc_42934E:
mov	eax, esi
pop	esi
retn	4
sub_429320 endp

align 10h



sub_429360 proc	near
mov	eax, offset off_17EFA44
retn
sub_429360 endp

align 10h



sub_429370 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_111A9E0
test	[esp+4+arg_0], 1
jz	short loc_429396
test	esi, esi
jz	short loc_429396
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_429396:
mov	eax, esi
pop	esi
retn	4
sub_429370 endp

align 10h



sub_4293A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1554AC8
call	sub_111B280
test	[esp+4+arg_0], 1
jz	short loc_4293C8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	esi
call	eax

loc_4293C8:
mov	eax, esi
pop	esi
retn	4
sub_4293A0 endp

align 10h



sub_4293D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+0D8h]
mov	dword ptr [edi], offset	off_15507C4
call	sub_41C620
mov	ecx, esi
mov	dword ptr [edi], offset	off_15CA734
call	sub_1162120
test	[esp+8+arg_0], 1
jz	short loc_429413
test	esi, esi
jz	short loc_429413
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	12Ch
push	3
push	esi
call	eax

loc_429413:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_4293D0 endp

align 10h



sub_429420 proc	near
mov	eax, offset off_17EFA54
retn
sub_429420 endp

align 10h



sub_429430 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_0]
movzx	eax, word ptr [eax+76h]
push	ebp
xor	ebp, ebp
mov	[esp+8+var_4], eax
test	eax, eax
jbe	short loc_429492
push	ebx
push	esi
push	edi
jmp	short loc_429450
align 10h

loc_429450:
mov	ecx, [esp+14h+arg_0]
mov	edx, [ecx+70h]
mov	edi, [edx+ebp*4]
test	edi, edi
jz	short loc_42948A
movzx	ebx, word ptr [edi+0Ah]
xor	esi, esi
test	ebx, ebx
jbe	short loc_42948A

loc_429468:
mov	eax, [edi+4]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_429481
mov	edx, [ecx]
mov	eax, [esp+14h+arg_4]
mov	edx, [edx+8Ch]
push	eax
call	edx

loc_429481:
inc	esi
cmp	esi, ebx
jb	short loc_429468
mov	eax, [esp+14h+var_4]

loc_42948A:
inc	ebp
cmp	ebp, eax
jb	short loc_429450
pop	edi
pop	esi
pop	ebx

loc_429492:
pop	ebp
pop	ecx
retn	8
sub_429430 endp

align 10h



sub_4294A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_126D320
test	[esp+4+arg_0], 1
jz	short loc_4294C6
test	esi, esi
jz	short loc_4294C6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	7Ch
push	3
push	esi
call	eax

loc_4294C6:
mov	eax, esi
pop	esi
retn	4
sub_4294A0 endp

align 10h



sub_4294D0 proc	near
movzx	edx, word ptr [ecx+5Ch]
test	dx, dx
jnz	short loc_4294E1
mov	ax, [ecx+30h]
mov	[ecx+5Eh], ax

loc_4294E1:
movzx	eax, word ptr [ecx+5Eh]
push	esi
push	edi
movzx	edi, dx
movzx	esi, ax
add	esi, edi
movzx	edi, word ptr [ecx+0Ch]
cmp	esi, edi
pop	edi
pop	esi
jge	short loc_429504
add	eax, edx
inc	edx
movzx	eax, ax
mov	[ecx+5Ch], dx
retn

loc_429504:
mov	eax, 0FFFFh
retn
sub_4294D0 endp

align 10h



sub_429510 proc	near
mov	eax, offset off_17EFA5C
retn
sub_429510 endp

align 10h



sub_429520 proc	near

arg_0= dword ptr  4

movzx	edx, word ptr [ecx+76h]
push	esi
cmp	eax, edx
jb	short loc_42954E
mov	eax, [esp+4+arg_0]
test	eax, eax
jz	short loc_429595
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_429595
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
pop	esi
retn	4

loc_42954E:
mov	ecx, [ecx+70h]
cmp	dword ptr [ecx+eax*4], 0
lea	eax, [ecx+eax*4]
jz	short loc_429574
mov	ecx, [eax]
mov	dx, [ecx+0Ah]
cmp	dx, [ecx+8]
jnb	short loc_429574
push	edi
mov	edi, [eax]
lea	ecx, [esp+8+arg_0]
push	ecx
call	sub_41E0B0
pop	edi

loc_429574:
mov	eax, [esp+4+arg_0]
test	eax, eax
jz	short loc_429595
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_429595
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_429595:
pop	esi
retn	4
sub_429520 endp

align 10h



sub_4295A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+0D8h]
mov	dword ptr [edi], offset	off_15507C4
call	sub_41C620
mov	ecx, esi
mov	dword ptr [edi], offset	off_15CA734
call	sub_1162120
test	[esp+8+arg_0], 1
jz	short loc_4295E3
test	esi, esi
jz	short loc_4295E3
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	124h
push	3
push	esi
call	eax

loc_4295E3:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_4295A0 endp

align 10h



sub_4295F0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_15507C4
call	sub_41C620
test	[esp+4+arg_0], 1
mov	dword ptr [edi], offset	off_15CA734
jz	short loc_42961E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_42961E:
mov	eax, edi
pop	edi
retn	4
sub_4295F0 endp

align 10h



sub_429630 proc	near

arg_0= dword ptr  4

mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	ecx, edi
call	edx
mov	esi, eax
mov	ebx, [esi+8]
cmp	ebx, [ebp+0]
jz	short loc_429679
test	ebx, ebx
jz	short loc_429665
lea	eax, [ebx+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_429665
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_429665:
mov	eax, [ebp+0]
mov	[esi+8], eax
test	eax, eax
jz	short loc_429679
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_429679:
mov	dword ptr [esi+4], 0
mov	ecx, [edi+4]
mov	[esi], ecx
mov	eax, [edi+4]
test	eax, eax
jz	short loc_42969B
mov	[eax+4], esi
inc	dword ptr [edi+0Ch]
mov	[edi+4], esi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_42969B:
inc	dword ptr [edi+0Ch]
mov	[edi+8], esi
mov	[edi+4], esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_429630 endp

align 10h



sub_4296B0 proc	near

arg_0= dword ptr  4

mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	ecx, edi
call	edx
mov	esi, eax
mov	ebx, [esi+8]
cmp	ebx, [ebp+0]
jz	short loc_4296F9
test	ebx, ebx
jz	short loc_4296E5
lea	eax, [ebx+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4296E5
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_4296E5:
mov	eax, [ebp+0]
mov	[esi+8], eax
test	eax, eax
jz	short loc_4296F9
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4296F9:
mov	dword ptr [esi], 0
mov	ecx, [edi+8]
mov	[esi+4], ecx
mov	eax, [edi+8]
test	eax, eax
jz	short loc_42971A
mov	[eax], esi
inc	dword ptr [edi+0Ch]
mov	[edi+8], esi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_42971A:
inc	dword ptr [edi+0Ch]
mov	[edi+4], esi
mov	[edi+8], esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_4296B0 endp

align 10h



sub_429730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
mov	edx, [eax+4]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	ecx, ebx
call	edx
mov	esi, eax
mov	edi, [esi+8]
mov	eax, [esp+10h+arg_8]
cmp	edi, [eax]
jz	short loc_429784
test	edi, edi
jz	short loc_42976D
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42976D
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42976D:
mov	ecx, [esp+10h+arg_8]
mov	eax, [ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_429784
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_429784:
mov	[esi], ebp
mov	edx, [ebp+4]
mov	[esi+4], edx
mov	eax, [ebp+4]
test	eax, eax
jz	short loc_4297A4
mov	[eax], esi
pop	edi
mov	[ebp+4], esi
inc	dword ptr [ebx+0Ch]
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_4297A4:
mov	[ebx+4], esi
pop	edi
mov	[ebp+4], esi
inc	dword ptr [ebx+0Ch]
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_429730 endp

align 10h



sub_4297C0 proc	near
mov	eax, offset off_17EFA64
retn
sub_4297C0 endp

align 10h



sub_4297D0 proc	near
mov	ecx, [eax+0DCh]
push	esi
test	ecx, ecx
jz	short loc_4297F6
jmp	short loc_4297E0
align 10h

loc_4297E0:
lea	eax, [ecx+8]
mov	eax, [eax]
mov	ecx, [ecx]
test	eax, eax
jz	short loc_4297F2
mov	esi, [eax+8]
cmp	esi, [edx]
jz	short loc_4297F8

loc_4297F2:
test	ecx, ecx
jnz	short loc_4297E0

loc_4297F6:
xor	eax, eax

loc_4297F8:
pop	esi
retn
sub_4297D0 endp

align 10h



sub_429800 proc	near
mov	eax, offset off_17EFA6C
retn
sub_429800 endp

align 10h



sub_429810 proc	near
mov	eax, offset off_17EFA74
retn
sub_429810 endp

align 10h



sub_429820 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_429846
test	esi, esi
jz	short loc_429846
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	68h
push	3
push	esi
call	eax

loc_429846:
mov	eax, esi
pop	esi
retn	4
sub_429820 endp

align 10h



sub_429850 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	[ecx+14h], al
retn	4
sub_429850 endp

align 10h



sub_429860 proc	near
mov	eax, offset off_17EFA80
retn
sub_429860 endp

align 10h



; int __cdecl sub_429870(float,	float)
sub_429870 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_0]
fld	[esp+arg_4]
call	__CIpow
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn
sub_429870 endp

align 10h



sub_429890 proc	near
mov	edx, [eax]
mov	[ecx+40h], edx
mov	edx, [eax+4]
mov	[ecx+44h], edx
mov	edx, [eax+8]
mov	[ecx+48h], edx
push	esi
lea	esi, [ecx+4Ch]
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	[esi+4], edx
mov	eax, [eax+8]
mov	[esi+8], eax
call	sub_40F420
fstp	st
fld	dword ptr [esi]
fld	dword_1889A64
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_42990A
fld	dword ptr [esi+4]
fld	dword_1889A68
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_42990A
fld	dword ptr [esi+8]
fld	dword_1889A6C
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_42990A
mov	ecx, dword_17EE0FC
mov	[esi], ecx
mov	edx, dword_17EE100
mov	[esi+4], edx
mov	eax, dword_17EE104
mov	[esi+8], eax

loc_42990A:
pop	esi
retn
sub_429890 endp

align 10h



sub_429910 proc	near
mov	eax, offset off_17EFA94
retn
sub_429910 endp

align 10h



sub_429920 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_429946
test	esi, esi
jz	short loc_429946
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_429946:
mov	eax, esi
pop	esi
retn	4
sub_429920 endp

align 10h



sub_429950 proc	near
mov	eax, offset off_17EFA9C
retn
sub_429950 endp

align 10h



sub_429960 proc	near
mov	eax, offset off_17EFAA4
retn
sub_429960 endp

align 10h



; int __cdecl sub_429970(float)
sub_429970 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
call	__CIexp
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn
sub_429970 endp

align 10h



sub_429990 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
mov	dword ptr [esi], offset	off_1555048
test	eax, eax
jz	short loc_4299B4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_4299B4:
mov	ecx, esi
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_4299D6
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_4299D6:
mov	eax, esi
pop	esi
retn	4
sub_429990 endp

align 10h



sub_4299E0 proc	near
mov	eax, offset off_17EFAAC
retn
sub_4299E0 endp

align 10h



sub_4299F0 proc	near
mov	edx, [eax]
mov	[ecx+1Ch], edx
mov	edx, [eax+4]
mov	[ecx+20h], edx
mov	edx, [eax+8]
mov	[ecx+24h], edx
mov	eax, [eax+0Ch]
mov	[ecx+28h], eax
retn
sub_4299F0 endp

align 10h



sub_429A10 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
push	edi
mov	edi, eax
mov	eax, [esi+1Ch]
mov	[esi+18h], di
test	eax, eax
jz	short loc_429A34
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	4
push	eax
mov	eax, [edx+8]
call	eax

loc_429A34:
movsx	eax, di
cmp	eax, 1
movzx	eax, ax
jg	short loc_429A44
mov	eax, 1

loc_429A44:
movsx	ebp, ax
xor	ecx, ecx
mov	eax, ebp
mov	edx, 10h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
fldz
mov	[esi+1Ch], eax
add	esp, 4
xor	eax, eax
cmp	ebp, 4
jl	loc_429B32
lea	edi, [ebp-4]
shr	edi, 2
xor	ecx, ecx
inc	edi
lea	eax, ds:0[edi*4]
mov	[esp+0Ch+var_4], eax
push	ebx

loc_429A87:
mov	eax, [esi+1Ch]
mov	edx, dword_1889A64
mov	[eax+ecx], edx
mov	edx, dword_1889A68
mov	[eax+ecx+4], edx
mov	edx, dword_1889A6C
mov	[eax+ecx+8], edx
fst	dword ptr [eax+ecx+0Ch]
mov	edx, dword_1889A64
add	eax, ecx
mov	eax, [esi+1Ch]
mov	[eax+ecx+10h], edx
mov	edx, dword_1889A68
mov	[eax+ecx+14h], edx
mov	edx, dword_1889A6C
mov	[eax+ecx+18h], edx
fst	dword ptr [eax+ecx+1Ch]
mov	ebx, dword_1889A64
lea	eax, [eax+ecx+10h]
mov	eax, [esi+1Ch]
lea	edx, [ecx+30h]
mov	[eax+edx-10h], ebx
mov	ebx, dword_1889A68
lea	eax, [eax+edx-10h]
mov	[eax+4], ebx
mov	ebx, dword_1889A6C
mov	[eax+8], ebx
fst	dword ptr [eax+0Ch]
mov	eax, [esi+1Ch]
add	eax, edx
mov	edx, dword_1889A64
mov	[eax], edx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	edx, dword_1889A6C
add	ecx, 40h
sub	edi, 1
mov	[eax+8], edx
fst	dword ptr [eax+0Ch]
jnz	loc_429A87
mov	eax, [esp+10h+var_4]
pop	ebx

loc_429B32:
cmp	eax, ebp
jge	short loc_429B67
mov	ecx, eax
shl	ecx, 4
sub	ebp, eax

loc_429B3D:
mov	eax, [esi+1Ch]
mov	edx, dword_1889A64
add	eax, ecx
mov	[eax], edx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	edx, dword_1889A6C
fst	dword ptr [eax+0Ch]
add	ecx, 10h
sub	ebp, 1
mov	[eax+8], edx
jnz	short loc_429B3D

loc_429B67:
pop	edi
fstp	st
pop	ebp
pop	ecx
retn
sub_429A10 endp

align 10h



sub_429B70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_429B96
test	esi, esi
jz	short loc_429B96
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	60h
push	3
push	esi
call	eax

loc_429B96:
mov	eax, esi
pop	esi
retn	4
sub_429B70 endp

align 10h



sub_429BA0 proc	near
mov	eax, offset off_17EFAB4
retn
sub_429BA0 endp

align 10h



sub_429BB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+18h]
test	edi, edi
jz	short loc_429BD2
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_429BD2
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_429BD2:
mov	ecx, esi
call	sub_11123D0
test	[esp+8+arg_0], 1
jz	short loc_429BF8
test	esi, esi
jz	short loc_429BF8
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_429BF8:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_429BB0 endp

align 10h



sub_429C00 proc	near
mov	eax, offset off_17EFABC
retn
sub_429C00 endp

align 10h



sub_429C10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+18h]
test	edi, edi
jz	short loc_429C32
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_429C32
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_429C32:
mov	ecx, esi
call	sub_11123D0
test	[esp+8+arg_0], 1
jz	short loc_429C58
test	esi, esi
jz	short loc_429C58
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_429C58:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_429C10 endp

align 10h



sub_429C60 proc	near
mov	eax, offset off_17EFAC4
retn
sub_429C60 endp

align 10h



sub_429C70 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, [esi+18h]
cmp	edi, ebx
jz	short loc_429CA9
test	edi, edi
jz	short loc_429C98
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_429C98
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_429C98:
mov	[esi+18h], ebx
test	ebx, ebx
jz	short loc_429CA9
add	ebx, 4
push	ebx		; lpAddend
call	ds:InterlockedIncrement

loc_429CA9:
fldz
mov	eax, [esi+18h]
pop	edi
fst	dword ptr [esi+1Ch]
fstp	dword ptr [esi+20h]
pop	ebx
test	eax, eax
jz	short locret_429CD9
mov	ecx, [eax+8]
mov	dl, [eax+14h]
mov	eax, [eax+0Ch]
test	ecx, ecx
jz	short locret_429CD9
fld	dword ptr [eax]
movzx	edx, dl
dec	ecx
fstp	dword ptr [esi+1Ch]
imul	ecx, edx
fld	dword ptr [ecx+eax]
fstp	dword ptr [esi+20h]

locret_429CD9:
retn	4
sub_429C70 endp

align 10h



sub_429CE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_429D06
test	esi, esi
jz	short loc_429D06
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	5Ch
push	3
push	esi
call	eax

loc_429D06:
mov	eax, esi
pop	esi
retn	4
sub_429CE0 endp

align 10h



sub_429D10 proc	near
mov	eax, offset off_17EFAD0
retn
sub_429D10 endp

align 10h



sub_429D20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1118780
test	[esp+4+arg_0], 1
jz	short loc_429D46
test	esi, esi
jz	short loc_429D46
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	60h
push	3
push	esi
call	eax

loc_429D46:
mov	eax, esi
pop	esi
retn	4
sub_429D20 endp

align 10h



sub_429D50 proc	near
mov	eax, offset off_17EFAD8
retn
sub_429D50 endp

align 10h



sub_429D60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_429D86
test	esi, esi
jz	short loc_429D86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_429D86:
mov	eax, esi
pop	esi
retn	4
sub_429D60 endp

align 10h



sub_429D90 proc	near
mov	eax, offset off_17EFAE0
retn
sub_429D90 endp

align 10h



sub_429DA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_429DC6
test	esi, esi
jz	short loc_429DC6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_429DC6:
mov	eax, esi
pop	esi
retn	4
sub_429DA0 endp

align 10h



sub_429DD0 proc	near
mov	eax, offset off_17EFAE8
retn
sub_429DD0 endp

align 10h



sub_429DE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_429E10
test	[esp+4+arg_0], 1
jz	short loc_429E08
test	esi, esi
jz	short loc_429E08
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	5Ch
push	3
push	esi
call	eax

loc_429E08:
mov	eax, esi
pop	esi
retn	4
sub_429DE0 endp

align 10h



sub_429E10 proc	near
push	ebp
push	esi
push	edi
mov	edi, eax
mov	eax, [edi+50h]
test	eax, eax
jz	short loc_429E30
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_429E30:
mov	esi, [edi+40h]
mov	ebp, ds:InterlockedDecrement
test	esi, esi
jz	short loc_429E50
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_429E50
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_429E50:
lea	esi, [edi+38h]
mov	dword ptr [edi], offset	off_15565E0
mov	eax, [esi]
test	eax, eax
jz	short loc_429E78
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_429E77
push	esi
mov	eax, ebx
call	sub_1171F60

loc_429E77:
pop	ebx

loc_429E78:
call	sub_40FA20
pop	edi
pop	esi
pop	ebp
retn
sub_429E10 endp

align 10h



sub_429E90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	ebx, [esi+4]
jz	short loc_429EE3
push	edi
test	ebx, ebx
jbe	short loc_429EC1
mov	eax, ebx
call	sub_5F46E0
mov	edi, eax
xor	eax, eax
cmp	[esi+8], eax
jbe	short loc_429EC3
nop

loc_429EB0:
mov	ecx, [esi]
fld	dword ptr [ecx+eax*4]
inc	eax
fstp	dword ptr [edi+eax*4-4]
cmp	eax, [esi+8]
jb	short loc_429EB0
jmp	short loc_429EC3

loc_429EC1:
xor	edi, edi

loc_429EC3:
mov	eax, [esi]
test	eax, eax
jz	short loc_429EDD
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_429EDD:
mov	[esi], edi
mov	[esi+4], ebx
pop	edi

loc_429EE3:
pop	ebx
retn	4
sub_429E90 endp

align 10h



sub_429EF0 proc	near
mov	eax, offset off_17EFAF0
retn
sub_429EF0 endp

align 10h



sub_429F00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, eax
xor	ecx, ecx
cmp	edi, ecx
jbe	short loc_429F57
cmp	[ebx+10h], ecx
push	ebp
lea	ebp, [ebx+10h]
jnz	short loc_429F37
push	18h
call	sub_11110D0
add	esp, 4
test	eax, eax
jz	short loc_429F2F
mov	esi, eax
call	sub_410830
jmp	short loc_429F31

loc_429F2F:
xor	eax, eax

loc_429F31:
push	ebp
call	sub_420330

loc_429F37:
mov	eax, [esp+10h+arg_4]
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+14h+arg_8]
push	eax
call	sub_11C2A60
pop	ebp
pop	edi
pop	esi
mov	dword ptr [ebx+14h], 0
pop	ebx
retn	0Ch

loc_429F57:
mov	esi, [ebx+10h]
cmp	esi, ecx
jz	short loc_429F84
mov	eax, [esi+0Ch]
cmp	eax, ecx
jz	short loc_429F77
mov	ecx, [esi+10h]
mov	edx, dword_185F418[ecx*4]
push	eax
call	edx ; dword_185F418
add	esp, 4
xor	ecx, ecx

loc_429F77:
mov	[esi+8], ecx
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	byte ptr [esi+14h], 0

loc_429F84:
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_429F00 endp

align 10h



sub_429F90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+34h]
push	edi
test	esi, esi
jz	short loc_429FAC
mov	edi, offset off_17EDE18
call	sub_41FF90
test	eax, eax
jnz	short loc_429FF4

loc_429FAC:
mov	esi, [ebx+34h]
test	esi, esi
jz	short loc_429FF2
mov	edi, offset off_17EDD48
call	sub_41FF90
mov	esi, eax
test	esi, esi
jz	short loc_429FF2
call	sub_11A7290
cmp	al, 0FFh
jz	short loc_429FF2
cmp	byte ptr [esi+0Eh], 1
jnz	short loc_429FE0
cmp	al, [esi+0Fh]
jnz	short loc_429FE0
mov	eax, [esi+18h]
pop	edi
pop	esi
pop	ebx
retn	4

loc_429FE0:
mov	ecx, [esi+14h]
movzx	eax, al
pop	edi
lea	eax, [eax+eax*2]
mov	eax, [ecx+eax*8]
pop	esi
pop	ebx
retn	4

loc_429FF2:
xor	eax, eax

loc_429FF4:
pop	edi
pop	esi
pop	ebx
retn	4
sub_429F90 endp

align 10h



sub_42A000 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+40h]
push	edi
test	esi, esi
jz	short loc_42A01C
mov	edi, offset off_17EDD78
call	sub_41FF90
test	eax, eax
jnz	short loc_42A064

loc_42A01C:
mov	esi, [ebx+40h]
test	esi, esi
jz	short loc_42A062
mov	edi, offset off_17EDD38
call	sub_41FF90
mov	esi, eax
test	esi, esi
jz	short loc_42A062
call	sub_11A7290
cmp	al, 0FFh
jz	short loc_42A062
cmp	byte ptr [esi+0Eh], 1
jnz	short loc_42A050
cmp	al, [esi+0Fh]
jnz	short loc_42A050
mov	eax, [esi+18h]
pop	edi
pop	esi
pop	ebx
retn	4

loc_42A050:
mov	ecx, [esi+14h]
movzx	eax, al
pop	edi
lea	eax, [eax+eax*2]
mov	eax, [ecx+eax*8]
pop	esi
pop	ebx
retn	4

loc_42A062:
xor	eax, eax

loc_42A064:
pop	edi
pop	esi
pop	ebx
retn	4
sub_42A000 endp

align 10h



sub_42A070 proc	near
cmp	byte ptr [ecx+0Eh], 1
jnz	short loc_42A07F
cmp	al, [ecx+0Fh]
jnz	short loc_42A07F
fld	dword ptr [ecx+20h]
retn

loc_42A07F:
mov	ecx, [ecx+14h]
movzx	eax, al
lea	eax, [eax+eax*2]
fld	dword ptr [ecx+eax*8+14h]
retn
sub_42A070 endp

align 10h



sub_42A090 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_122FCB0
test	[esp+4+arg_0], 1
jz	short loc_42A0B6
test	esi, esi
jz	short loc_42A0B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	esi
call	eax

loc_42A0B6:
mov	eax, esi
pop	esi
retn	4
sub_42A090 endp

align 10h



sub_42A0C0 proc	near
mov	eax, offset off_17EFAF8
retn
sub_42A0C0 endp

align 10h



sub_42A0D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esi+1Ch]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
test	eax, eax
jz	short loc_42A0F1
mov	ecx, [esi+20h]
mov	edx, dword_185F3A0[ecx*4]
push	eax
call	edx ; dword_185F3A0
add	esp, 4

loc_42A0F1:
xor	eax, eax
cmp	ebx, eax
jz	short loc_42A112
cmp	ebp, eax
jz	short loc_42A112
mov	al, byte_185F27A[edi]
mov	[esi+18h], ebp
pop	ebp
mov	[esi+1Ch], ebx
mov	[esi+20h], edi
mov	[esi+24h], al
pop	ebx
retn	8

loc_42A112:
pop	ebp
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+24h], al
pop	ebx
retn	8
sub_42A0D0 endp




sub_42A120 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esi+0Ch]
push	ebx
mov	ebx, [esp+4+arg_0]
xor	ecx, ecx
push	ebp
mov	ebp, [esp+8+arg_4]
cmp	eax, ecx
jz	short loc_42A145
mov	ecx, [esi+10h]
mov	edx, dword_185F3A0[ecx*4]
push	eax
call	edx ; dword_185F3A0
add	esp, 4
xor	ecx, ecx

loc_42A145:
cmp	ebx, ecx
jz	short loc_42A164
cmp	ebp, ecx
jz	short loc_42A164
mov	al, byte_185F25C[edi]
mov	[esi+8], ebp
pop	ebp
mov	[esi+0Ch], ebx
mov	[esi+14h], al
mov	[esi+10h], edi
pop	ebx
retn	8

loc_42A164:
pop	ebp
mov	[esi+8], ecx
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	byte ptr [esi+14h], 0
pop	ebx
retn	8
sub_42A120 endp

align 10h



sub_42A180 proc	near
mov	eax, offset off_17EFB00
retn
sub_42A180 endp

align 10h



sub_42A190 proc	near
mov	eax, offset off_17EFB08
retn
sub_42A190 endp

align 10h



sub_42A1A0 proc	near
mov	eax, offset off_17EFB10
retn
sub_42A1A0 endp

align 10h



sub_42A1B0 proc	near
mov	eax, offset off_17EFB18
retn
sub_42A1B0 endp

align 10h



sub_42A1C0 proc	near
mov	eax, offset off_17EFB20
retn
sub_42A1C0 endp

align 10h



sub_42A1D0 proc	near
mov	eax, offset off_17EFB28
retn
sub_42A1D0 endp

align 10h



sub_42A1E0 proc	near
mov	eax, offset off_17EFB30
retn
sub_42A1E0 endp

align 10h



sub_42A1F0 proc	near
mov	eax, offset off_17EFB38
retn
sub_42A1F0 endp

align 10h



sub_42A200 proc	near
mov	eax, offset off_17EFB40
retn
sub_42A200 endp

align 10h



sub_42A210 proc	near
mov	eax, offset off_17EFB48
retn
sub_42A210 endp

align 10h



sub_42A220 proc	near
mov	eax, offset off_17EFB50
retn
sub_42A220 endp

align 10h



sub_42A230 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42A256
test	esi, esi
jz	short loc_42A256
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_42A256:
mov	eax, esi
pop	esi
retn	4
sub_42A230 endp

align 10h



sub_42A260 proc	near
mov	eax, offset off_17EFB58
retn
sub_42A260 endp

align 10h



sub_42A270 proc	near
mov	eax, offset off_17EFB60
retn
sub_42A270 endp

align 10h



sub_42A280 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42A2A6
test	esi, esi
jz	short loc_42A2A6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	esi
call	eax

loc_42A2A6:
mov	eax, esi
pop	esi
retn	4
sub_42A280 endp

align 10h



sub_42A2B0 proc	near
mov	eax, offset off_17EFB68
retn
sub_42A2B0 endp

align 10h



sub_42A2C0 proc	near
mov	eax, offset off_17EFB70
retn
sub_42A2C0 endp

align 10h



sub_42A2D0 proc	near
mov	eax, offset off_17EFB78
retn
sub_42A2D0 endp

align 10h



sub_42A2E0 proc	near
mov	eax, offset off_17EFB80
retn
sub_42A2E0 endp

align 10h



sub_42A2F0 proc	near
mov	eax, offset off_17EFB88
retn
sub_42A2F0 endp

align 10h



sub_42A300 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_42A330
test	[esp+4+arg_0], 1
jz	short loc_42A329
test	edi, edi
jz	short loc_42A329
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	84h
push	3
push	edi
call	eax

loc_42A329:
mov	eax, edi
pop	edi
retn	4
sub_42A300 endp

align 10h



sub_42A330 proc	near
mov	eax, [edi+64h]
push	esi
mov	dword ptr [edi+60h], offset off_1556034
test	eax, eax
jz	short loc_42A36B
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_42A36B
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_42A36B:
mov	eax, [edi+54h]
mov	dword ptr [edi+50h], offset off_1556034
test	eax, eax
jz	short loc_42A3A5
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_42A3A5
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_42A3A5:
mov	ecx, edi
pop	esi
jmp	sub_11123D0
sub_42A330 endp

align 10h



sub_42A3B0 proc	near
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	dword ptr [esi+4], 0
call	ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_155602C
mov	dword ptr [esi+8], 0
mov	eax, esi
retn
sub_42A3B0 endp

align 10h



sub_42A3E0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_42A405
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_42A405
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42A405:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_42A42D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_42A42D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_42A3E0 endp

align 10h



sub_42A440 proc	near
mov	eax, offset off_17EFB90
retn
sub_42A440 endp

align 10h



sub_42A450 proc	near

arg_0= byte ptr	 4

mov	cl, [esp+arg_0]
mov	[eax+36h], cl
retn	4
sub_42A450 endp

align 10h



; int __cdecl sub_42A460(float)
sub_42A460 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld	[esp+4+arg_0]
mov	ecx, 5F3759DFh
fst	[esp+4+arg_0]
mov	eax, [esp+4+arg_0]
fld	ds:dbl_15FCC48
fmul	st, st(1)
sar	eax, 1
sub	ecx, eax
mov	[esp+4+arg_0], ecx
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fld	[esp+4+arg_0]
fld	st
fmulp	st(2), st
fld	st
fmulp	st(2), st
fld	ds:dbl_15FCD58
fsubrp	st(2), st
fmulp	st(1), st
fstp	[esp+4+arg_0]
fmul	[esp+4+arg_0]
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
pop	ecx
retn
sub_42A460 endp




sub_42A4B0 proc	near
mov	ecx, [eax+0B4h]
mov	eax, [ecx+24h]
retn
sub_42A4B0 endp

align 10h



sub_42A4C0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	dword ptr [edi], offset	off_1556034
test	eax, eax
jz	short loc_42A4FE
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_42A4FD
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_42A4FD:
pop	esi

loc_42A4FE:
test	[esp+4+arg_0], 1
jz	short loc_42A518
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	edi
call	eax

loc_42A518:
mov	eax, edi
pop	edi
retn	4
sub_42A4C0 endp

align 10h



sub_42A520 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_42A550
test	[esp+4+arg_0], 1
jz	short loc_42A546
test	edi, edi
jz	short loc_42A546
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	28h
push	3
push	edi
call	eax

loc_42A546:
mov	eax, edi
pop	edi
retn	4
sub_42A520 endp

align 10h



sub_42A550 proc	near
mov	eax, [edi+1Ch]
mov	dword ptr [edi+18h], offset off_1551A28
test	eax, eax
jz	short loc_42A58C
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_42A58B
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_42A58B:
pop	esi

loc_42A58C:
mov	ecx, edi
jmp	sub_11123D0
sub_42A550 endp

align 10h



sub_42A5A0 proc	near
mov	eax, offset off_17EFB98
retn
sub_42A5A0 endp

align 10h


; Attributes: bp-based frame

sub_42A5B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
movzx	edx, word ptr [ecx+76h]
sub	esp, 0Ch
push	ebx
push	esi
push	edi
cmp	eax, edx
jnb	short loc_42A632
mov	ecx, [ecx+70h]
cmp	dword ptr [ecx+eax*4], 0
lea	eax, [ecx+eax*4]
jz	short loc_42A632
mov	eax, [eax]
xor	edx, edx
xor	ebx, ebx
mov	[esp+18h+var_4], eax
cmp	dx, [eax+8]
jnb	short loc_42A632

loc_42A5E0:
mov	esi, [ebp+arg_0]
call	sub_116D9B0
mov	edi, eax
mov	[esp+18h+var_8], edi
test	edi, edi
jz	short loc_42A5FC
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_42A5FC:
mov	esi, [esp+18h+var_4]
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, ebx
mov	eax, esi
call	sub_426E10
test	edi, edi
jz	short loc_42A629
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42A629
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_42A629:
movzx	eax, word ptr [esi+8]
inc	ebx
cmp	ebx, eax
jb	short loc_42A5E0

loc_42A632:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_42A5B0 endp

align 10h



sub_42A640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
movzx	eax, word ptr [ebp+22h]
push	edi
mov	edi, ecx
cmp	edi, eax
jnb	loc_42A6D8
mov	ecx, [ebp+1Ch]
mov	ebx, [ecx+edi*4]
test	ebx, ebx
jz	short loc_42A66C
lea	edx, [ebx+4]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_42A66C:
mov	[esp+10h+arg_0], esi
test	esi, esi
jz	short loc_42A67E
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_42A67E:
lea	ecx, [esp+10h+arg_0]
push	ecx
lea	eax, [ebp+18h]
mov	ecx, edi
call	sub_426E10
mov	edi, ds:InterlockedDecrement
test	esi, esi
jz	short loc_42A6AA
lea	edx, [esi+4]
push	edx		; lpAddend
call	edi ; InterlockedDecrement
test	eax, eax
jnz	short loc_42A6AA
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_42A6AA:
mov	ebp, [esp+10h+arg_4]
mov	[ebp+0], ebx
test	ebx, ebx
jz	short loc_42A6CF
lea	esi, [ebx+4]
push	esi		; lpAddend
call	ds:InterlockedIncrement
push	esi		; lpAddend
call	edi ; InterlockedDecrement
test	eax, eax
jnz	short loc_42A6CF
mov	eax, [ebx]
mov	edx, [eax+4]
mov	ecx, ebx
call	edx

loc_42A6CF:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	8

loc_42A6D8:
mov	[esp+10h+arg_0], esi
test	esi, esi
jz	short loc_42A6EA
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_42A6EA:
movzx	ecx, word ptr [ebp+20h]
lea	ebx, [ebp+18h]
cmp	edi, ecx
jb	short loc_42A702
movzx	edx, word ptr [ebx+0Eh]
add	edx, edi
push	edx
push	ebx
call	sub_41E210

loc_42A702:
lea	eax, [esp+10h+arg_0]
push	eax
mov	ecx, edi
mov	eax, ebx
call	sub_426E10
test	esi, esi
jz	short loc_42A72B
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42A72B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_42A72B:
mov	eax, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 0
pop	ebx
retn	8
sub_42A640 endp

align 10h



sub_42A740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
movzx	eax, word ptr [ebx+0Ah]
test	ax, ax
jnz	short loc_42A75C
mov	eax, [esp+4+arg_4]
mov	dword ptr [eax], 0
pop	ebx
retn	8

loc_42A75C:
mov	ecx, [ebx+4]
dec	eax
mov	[ebx+0Ah], ax
push	ebp
mov	ebp, ds:InterlockedIncrement
movzx	eax, ax
push	esi
mov	esi, [ecx+eax*4]
push	edi
test	esi, esi
jz	short loc_42A77D
lea	edx, [esi+4]
push	edx		; lpAddend
call	ebp ; InterlockedIncrement

loc_42A77D:
movzx	ecx, word ptr [ebx+0Ah]
mov	edx, [ebx+4]
lea	eax, [esp+10h+arg_0]
push	eax
lea	edi, [edx+ecx*4]
mov	[esp+14h+arg_0], 0
call	sub_418760
test	esi, esi
setnz	al
test	al, al
jz	short loc_42A7AB
mov	eax, 0FFFFh
add	[ebx+0Ch], ax

loc_42A7AB:
mov	ebx, [esp+10h+arg_4]
mov	[ebx], esi
test	esi, esi
jz	short loc_42A7CF
lea	edi, [esi+4]
push	edi		; lpAddend
call	ebp ; InterlockedIncrement
push	edi		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_42A7CF
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_42A7CF:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn	8
sub_42A740 endp

align 10h



sub_42A7E0 proc	near
mov	eax, offset off_17EFBA0
retn
sub_42A7E0 endp

align 10h



sub_42A7F0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+28h]
test	edi, edi
jz	short loc_42A815
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_42A815
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42A815:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_42A840
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	100h
push	3
push	esi
call	eax

loc_42A840:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_42A7F0 endp

align 10h



sub_42A850 proc	near
mov	eax, offset off_17EFBA8
retn
sub_42A850 endp

align 10h



sub_42A860 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [ecx+4]
fmul	dword ptr [eax+4]
fld	dword ptr [ecx]
fmul	dword ptr [eax]
faddp	st(1), st
fld	dword ptr [ecx+8]
fmul	dword ptr [eax+8]
faddp	st(1), st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fsub	dword ptr [eax+0Ch]
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_42A860 endp

align 10h



sub_42A890 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42A8B6
test	esi, esi
jz	short loc_42A8B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_42A8B6:
mov	eax, esi
pop	esi
retn	4
sub_42A890 endp

align 10h



sub_42A8C0 proc	near
mov	eax, offset off_17EFBB0
retn
sub_42A8C0 endp

align 10h



sub_42A8D0 proc	near
mov	eax, offset off_17EFBB8
retn
sub_42A8D0 endp

align 10h



sub_42A8E0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1551878
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_42A90B
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_42A90B
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42A90B:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_42A933
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_42A933:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_42A8E0 endp

align 10h



sub_42A940 proc	near
mov	eax, offset off_17EFBC0
retn
sub_42A940 endp

align 10h



sub_42A950 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42A976
test	esi, esi
jz	short loc_42A976
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_42A976:
mov	eax, esi
pop	esi
retn	4
sub_42A950 endp

align 10h



sub_42A980 proc	near
mov	eax, offset off_17EFBCC
retn
sub_42A980 endp

align 10h



sub_42A990 proc	near
mov	eax, offset off_17EFBD8
retn
sub_42A990 endp

align 10h



sub_42A9A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42A9C6
test	esi, esi
jz	short loc_42A9C6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	58h
push	3
push	esi
call	eax

loc_42A9C6:
mov	eax, esi
pop	esi
retn	4
sub_42A9A0 endp

align 10h



sub_42A9D0 proc	near
mov	eax, offset off_17EFBE4
retn
sub_42A9D0 endp

align 10h



sub_42A9E0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+28h]
test	edi, edi
jz	short loc_42AA05
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_42AA05
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42AA05:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_42AA30
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0B0h
push	3
push	esi
call	eax

loc_42AA30:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_42A9E0 endp

align 10h



sub_42AA40 proc	near
mov	eax, offset off_17EFBEC
retn
sub_42AA40 endp

align 10h



sub_42AA50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42AA76
test	esi, esi
jz	short loc_42AA76
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_42AA76:
mov	eax, esi
pop	esi
retn	4
sub_42AA50 endp

align 10h



sub_42AA80 proc	near
mov	eax, offset off_17EFBF4
retn
sub_42AA80 endp

align 10h



sub_42AA90 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1551878
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_42AABB
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_42AABB
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42AABB:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_42AAE3
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_42AAE3:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_42AA90 endp

align 10h



sub_42AAF0 proc	near
mov	eax, offset off_17EFBFC
retn
sub_42AAF0 endp

align 10h



sub_42AB00 proc	near
mov	eax, offset off_17EFC04
retn
sub_42AB00 endp

align 10h



sub_42AB10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
mov	edx, [esp+18h+arg_4]
fld	dword ptr [eax]
fsub	dword ptr [edx]
push	esi
mov	esi, [esp+1Ch+arg_0]
fstp	[esp+1Ch+var_18]
fld	dword ptr [eax+4]
fsub	dword ptr [edx+4]
fstp	[esp+1Ch+var_14]
fld	dword ptr [eax+8]
fsub	dword ptr [edx+8]
fstp	[esp+1Ch+var_10]
fld	dword ptr [ecx]
fld	[esp+1Ch+var_18]
fld	st
fmulp	st(2), st
fld	[esp+1Ch+var_14]
fld	st
fmul	dword ptr [ecx+4]
faddp	st(3), st
fld	[esp+1Ch+var_10]
fld	st
fmul	dword ptr [ecx+8]
faddp	st(4), st
fxch	st(3)
fstp	[esp+1Ch+arg_4]
fld	dword ptr [ecx]
fld	[esp+1Ch+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_C]
fld	st
fmul	dword ptr [ecx+4]
fstp	[esp+1Ch+var_8]
fmul	dword ptr [ecx+8]
fstp	[esp+1Ch+var_4]
fld	[esp+1Ch+var_C]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_18]
fsub	[esp+1Ch+var_8]
fstp	[esp+1Ch+var_14]
fsub	[esp+1Ch+var_4]
fstp	[esp+1Ch+var_10]
fld	[esp+1Ch+var_18]
fld	dword_1889A64
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_42ABF0
fld	[esp+1Ch+var_14]
fld	dword_1889A68
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_42ABF0
fld	[esp+1Ch+var_10]
fld	dword_1889A6C
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_42ABF0
mov	eax, [esp+1Ch+var_18]
mov	ecx, [esp+1Ch+var_14]
mov	edx, [esp+1Ch+var_10]
mov	[esi], eax
mov	[esi+4], ecx
mov	[esi+8], edx
mov	eax, esi
pop	esi
add	esp, 18h
retn	8

loc_42ABF0:
lea	eax, [esp+1Ch+var_18]
call	sub_4131E0
mov	eax, esi
pop	esi
add	esp, 18h
retn	8
sub_42AB10 endp

align 10h



sub_42AC10 proc	near
push	esi
push	edi
mov	edi, dword_185FE20
mov	esi, [edi+0Ch]
mov	dword ptr [edi+8], 0
test	esi, esi
jz	short loc_42AC69
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_42AC48
cmp	dword ptr [ecx-4], 0
lea	eax, [ecx-4]
jz	short loc_42AC3F
mov	eax, [ecx]
mov	edx, [eax]
push	3
call	edx
jmp	short loc_42AC48

loc_42AC3F:		; void *
push	eax
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_42AC48:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_42AC56
push	1
call	sub_42AC80

loc_42AC56:
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_42AC69:
mov	ecx, [edi+14h]
mov	dword ptr [edi+0Ch], 0
mov	[edi+10h], ecx
pop	edi
pop	esi
retn
sub_42AC10 endp

align 10h



sub_42AC80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_42ACA5
cmp	dword ptr [ecx-4], 0
lea	eax, [ecx-4]
jz	short loc_42AC9C
mov	eax, [ecx]
mov	edx, [eax]
push	3
call	edx
jmp	short loc_42ACA5

loc_42AC9C:		; void *
push	eax
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_42ACA5:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_42ACB3
push	1
call	sub_42AC80

loc_42ACB3:
test	[esp+4+arg_0], 1
jz	short loc_42ACCD
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_42ACCD:
mov	eax, esi
pop	esi
retn	4
sub_42AC80 endp

align 10h



sub_42ACE0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, dword_1889574
mov	ecx, [eax]
push	ebx
push	ebp
xor	ebp, ebp
push	ebp
push	0FFFFFFFFh
push	ebp
push	1
push	1
lea	eax, [esp+38h+var_14]
push	eax
mov	[esp+3Ch+var_14], 4
mov	[esp+3Ch+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+3Ch+var_10]
push	eax
call	edx
mov	ebx, eax
mov	[esp+24h+var_18], ebx
cmp	ebx, ebp
jnz	short loc_42AD39
lea	ecx, [esp+24h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+28h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_42AD39:
push	esi
mov	esi, [esp+28h+arg_0]
mov	[ebx+4], esi
mov	[ebx+8], ebp
cmp	esi, ebp
jbe	short loc_42AD51
call	sub_42ADC0
mov	[ebx], eax
jmp	short loc_42AD53

loc_42AD51:
mov	[ebx], ebp

loc_42AD53:
test	esi, esi
jbe	short loc_42ADA7
mov	[esp+28h+var_1C], ebp
jmp	short loc_42AD60
align 10h

loc_42AD60:
cmp	ebp, [ebx+4]
jb	short loc_42AD69
xor	ebx, ebx
jmp	short loc_42AD6F

loc_42AD69:
mov	ebx, [ebx]
add	ebx, [esp+28h+var_1C]

loc_42AD6F:
mov	eax, [edi+4]
cmp	[edi+8], eax
jnz	short loc_42AD8C
test	eax, eax
jbe	short loc_42AD7F
add	eax, eax
jmp	short loc_42AD84

loc_42AD7F:
mov	eax, 1

loc_42AD84:
push	eax
mov	esi, edi
call	sub_410400

loc_42AD8C:
mov	ecx, [edi+8]
mov	edx, [edi]
add	[esp+28h+var_1C], 14h
mov	[edx+ecx*4], ebx
inc	dword ptr [edi+8]
mov	ebx, [esp+28h+var_18]
inc	ebp
cmp	ebp, [esp+28h+arg_0]
jb	short loc_42AD60

loc_42ADA7:
mov	eax, [edi+0Ch]
pop	esi
mov	[ebx+8], eax
pop	ebp
mov	[edi+0Ch], ebx
pop	ebx
add	esp, 1Ch
retn	4
sub_42ACE0 endp

align 10h



sub_42ADC0 proc	near
test	esi, esi
jnz	short loc_42ADCD
push	4		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
jmp	short loc_42ADF1

loc_42ADCD:
xor	ecx, ecx
mov	eax, esi
mov	edx, 14h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070

loc_42ADF1:
add	esp, 4
test	eax, eax
jz	short loc_42AE10
push	edi
push	offset sub_1228CF0
push	esi
lea	edi, [eax+4]
push	14h
push	edi
mov	[eax], esi
call	sub_4078B0
mov	eax, edi
pop	edi
retn

loc_42AE10:
xor	eax, eax
retn
sub_42ADC0 endp

align 10h



sub_42AE20 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, 2
jz	short loc_42AE67
mov	eax, [esi-4]
push	edi
push	offset sub_1228C90
lea	edi, [esi-4]
push	eax
push	14h
push	esi
call	sub_40F3E0
test	bl, 1
jz	short loc_42AE5F
test	edi, edi
jz	short loc_42AE5F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	edi
call	eax

loc_42AE5F:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_42AE67:
call	sub_1228C90
test	bl, 1
jz	short loc_42AE89
test	esi, esi
jz	short loc_42AE89
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_42AE89:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_42AE20 endp




sub_42AE90 proc	near
mov	eax, offset off_17EFC0C
retn
sub_42AE90 endp

align 10h



sub_42AEA0 proc	near
mov	eax, offset off_17EFC14
retn
sub_42AEA0 endp

align 10h



sub_42AEB0 proc	near
mov	eax, [edx+2Ch]
mov	eax, [eax+0DCh]
push	esi
test	eax, eax
jz	short loc_42AED7
mov	edi, edi

loc_42AEC0:
lea	ecx, [eax+8]
mov	ecx, [ecx]
mov	eax, [eax]
test	ecx, ecx
jz	short loc_42AED3
mov	esi, [ecx+8]
cmp	esi, [edx+38h]
jz	short loc_42AEDE

loc_42AED3:
test	eax, eax
jnz	short loc_42AEC0

loc_42AED7:
xor	eax, eax
mov	[edx+3Ch], eax
pop	esi
retn

loc_42AEDE:
mov	[edx+3Ch], ecx
pop	esi
retn
sub_42AEB0 endp

align 10h



sub_42AEF0 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+38h]
mov	dword ptr [edi], offset	off_15565E0
mov	eax, [esi]
test	eax, eax
jz	short loc_42AF20
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_42AF1F
push	esi
mov	eax, ebx
call	sub_1171F60

loc_42AF1F:
pop	ebx

loc_42AF20:
call	sub_40FA20
test	[esp+8+arg_0], 1
jz	short loc_42AF3F
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	edi
call	eax

loc_42AF3F:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_42AEF0 endp

align 10h



sub_42AF50 proc	near
mov	eax, offset off_17EFC1C
retn
sub_42AF50 endp

align 10h



sub_42AF60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42AF86
test	esi, esi
jz	short loc_42AF86
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_42AF86:
mov	eax, esi
pop	esi
retn	4
sub_42AF60 endp

align 10h



sub_42AF90 proc	near
mov	eax, offset off_17EFC24
retn
sub_42AF90 endp

align 10h



sub_42AFA0 proc	near
mov	eax, offset off_17EFC2C
retn
sub_42AFA0 endp

align 10h



sub_42AFB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42AFD6
test	esi, esi
jz	short loc_42AFD6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_42AFD6:
mov	eax, esi
pop	esi
retn	4
sub_42AFB0 endp

align 10h



sub_42AFE0 proc	near
mov	eax, offset off_17EFC34
retn
sub_42AFE0 endp

align 10h



sub_42AFF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11123D0
test	[esp+4+arg_0], 1
jz	short loc_42B016
test	esi, esi
jz	short loc_42B016
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	50h
push	3
push	esi
call	eax

loc_42B016:
mov	eax, esi
pop	esi
retn	4
sub_42AFF0 endp

align 10h



sub_42B020 proc	near
mov	eax, offset off_17EFC3C
retn
sub_42B020 endp

align 10h



sub_42B030 proc	near
mov	eax, offset off_17EFC44
retn
sub_42B030 endp

align 10h



sub_42B040 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+28h]
test	edi, edi
jz	short loc_42B065
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_42B065
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_42B065:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_42B08D
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_42B08D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_42B040 endp

align 10h



sub_42B0A0 proc	near
mov	eax, offset off_17EFC4C
retn
sub_42B0A0 endp

align 10h



sub_42B0B0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15569CC
jz	short loc_42B0D3
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4
push	3
push	esi
call	eax

loc_42B0D3:
mov	eax, esi
pop	esi
retn	4
sub_42B0B0 endp

align 10h



sub_42B0E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1110CD0
test	[esp+4+arg_0], 1
jz	short loc_42B106
test	esi, esi
jz	short loc_42B106
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_42B106:
mov	eax, esi
pop	esi
retn	4
sub_42B0E0 endp

align 10h



sub_42B110 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15569D8
jz	short loc_42B133
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_42B133:
mov	eax, esi
pop	esi
retn	4
sub_42B110 endp

align 10h



sub_42B140 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15569EC
jz	short loc_42B166
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	210h
push	3
push	esi
call	eax

loc_42B166:
mov	eax, esi
pop	esi
retn	4
sub_42B140 endp

align 10h



sub_42B170 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+20h], 0
mov	dword ptr [esi], offset	off_15569F8
jnz	short loc_42B1A0
cmp	byte ptr [esi+21h], 0
jnz	short loc_42B1A0
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_42B1A0
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_42B1A0:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_15569D8
jz	short loc_42B1C1
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	esi
call	eax

loc_42B1C1:
mov	eax, esi
pop	esi
retn	4
sub_42B170 endp

align 10h



sub_42B1D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_110F280
test	[esp+4+arg_0], 1
jz	short loc_42B1F6
test	esi, esi
jz	short loc_42B1F6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	2Ch
push	3
push	esi
call	eax

loc_42B1F6:
mov	eax, esi
pop	esi
retn	4
sub_42B1D0 endp

align 10h



; int __thiscall sub_42B200(void *, char)
sub_42B200 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1556A4C
jz	short loc_42B219
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_42B219:
mov	eax, esi
pop	esi
retn	4
sub_42B200 endp

align 10h



sub_42B220 proc	near
push	ebx
push	ebp
mov	ebp, ds:DeleteCriticalSection
push	esi
mov	esi, eax
push	edi
mov	ebx, 0FFh
add	esi, 4008h

loc_42B237:
sub	esi, 40h
xor	edi, edi
cmp	[esi+4], edi
jbe	short loc_42B255

loc_42B241:
mov	eax, [esi]
mov	ecx, [eax+edi*8]
push	ecx		; Memory
call	__aligned_free
inc	edi
add	esp, 4
cmp	edi, [esi+4]
jb	short loc_42B241

loc_42B255:
mov	edx, [esi]
push	edx		; void *
call	_free
add	esp, 4
lea	eax, [esi+18h]
push	eax		; lpCriticalSection
call	ebp ; DeleteCriticalSection
sub	ebx, 1
jns	short loc_42B237
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_42B220 endp




sub_42B270 proc	near
push	8		; MaxCount
push	eax		; Src
add	ecx, 0Ch
push	8		; DstSize
push	ecx		; Dst
call	_memcpy_s
add	esp, 10h
retn
sub_42B270 endp

align 10h



sub_42B290 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1556AA4
cmp	esi, offset off_17EFC68
jz	short loc_42B2D4
mov	eax, dword_17EFC6C
mov	[esi+4], eax
mov	cx, word_17EFC70
push	8		; MaxCount
push	offset unk_17EFC74 ; Src
mov	[esi+8], cx
mov	dx, word_17EFC72
lea	eax, [esi+0Ch]
push	8		; DstSize
push	eax		; Dst
mov	[esi+0Ah], dx
call	_memcpy_s
add	esp, 10h

loc_42B2D4:
mov	eax, esi
pop	esi
retn
sub_42B290 endp

align 10h



; int __thiscall sub_42B2E0(void *, char)
sub_42B2E0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1556AA4
jz	short loc_42B2F9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_42B2F9:
mov	eax, esi
pop	esi
retn	4
sub_42B2E0 endp

align 10h



sub_42B300 proc	near

arg_0= word ptr	 4
arg_4= word ptr	 8

mov	dx, [esp+arg_0]
mov	[esi+4], ecx
mov	cx, [esp+arg_4]
mov	dword ptr [esi], offset	off_1556AA4
mov	[esi+8], dx
mov	[esi+0Ah], cx
test	eax, eax
jz	short loc_42B335
push	8		; MaxCount
push	eax		; Src
lea	edx, [esi+0Ch]
push	8		; DstSize
push	edx		; Dst
call	_memcpy_s
add	esp, 10h
mov	eax, esi
retn	8

loc_42B335:
xor	eax, eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	eax, esi
retn	8
sub_42B300 endp

align 10h



; int __stdcall	sub_42B350(char	*)
sub_42B350 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
xor	eax, eax
mov	[esi+4], eax
xor	ecx, ecx
xor	edx, edx
mov	dword ptr [esi], offset	off_1556AA4
mov	[esi+8], cx
mov	[esi+0Ah], dx
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	eax, [esp+4+arg_0]
push	eax		; char *
call	sub_42B580
mov	eax, esi
pop	esi
retn	4
sub_42B350 endp




sub_42B380 proc	near
mov	dword ptr [esi], offset	off_1556AA4
cmp	esi, eax
jz	short loc_42B3B4
mov	ecx, [eax+4]
mov	[esi+4], ecx
mov	dx, [eax+8]
mov	[esi+8], dx
mov	cx, [eax+0Ah]
push	8		; MaxCount
add	eax, 0Ch
push	eax		; Src
lea	edx, [esi+0Ch]
push	8		; DstSize
push	edx		; Dst
mov	[esi+0Ah], cx
call	_memcpy_s
add	esp, 10h

loc_42B3B4:
mov	eax, esi
retn
sub_42B380 endp

align 10h



sub_42B3C0 proc	near
mov	dword ptr [ecx], offset	off_1556AA4
retn
sub_42B3C0 endp

align 10h



sub_42B3D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	esi, eax
jz	short loc_42B405
mov	ecx, [eax+4]
mov	[esi+4], ecx
mov	dx, [eax+8]
mov	[esi+8], dx
mov	cx, [eax+0Ah]
push	8		; MaxCount
add	eax, 0Ch
push	eax		; Src
lea	edx, [esi+0Ch]
push	8		; DstSize
push	edx		; Dst
mov	[esi+0Ah], cx
call	_memcpy_s
add	esp, 10h

loc_42B405:
mov	eax, esi
pop	esi
retn	4
sub_42B3D0 endp

align 10h



sub_42B410 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ebp
mov	esi, 0FFFFFFF4h
sub	edi, ecx
lea	eax, [ecx+0Ch]
sub	esi, ecx

loc_42B425:
mov	dl, [eax]
cmp	dl, [edi+eax]
jnz	short loc_42B459
inc	eax
lea	edx, [esi+eax]
cmp	edx, 8
jb	short loc_42B425
mov	eax, [ecx+4]
cmp	eax, [ebp+4]
jnz	short loc_42B459
mov	dx, [ecx+8]
cmp	dx, [ebp+8]
jnz	short loc_42B459
mov	ax, [ecx+0Ah]
cmp	ax, [ebp+0Ah]
jnz	short loc_42B459
pop	edi
pop	esi
mov	al, 1
pop	ebp
retn	4

loc_42B459:
pop	edi
pop	esi
xor	al, al
pop	ebp
retn	4
sub_42B410 endp

align 10h



sub_42B470 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, [ecx+4]
push	esi
mov	esi, [edx+4]
cmp	eax, esi
jbe	short loc_42B485

loc_42B47F:
xor	al, al
pop	esi
retn	4

loc_42B485:
jnb	short loc_42B48D

loc_42B487:
mov	al, 1
pop	esi
retn	4

loc_42B48D:
movzx	eax, word ptr [ecx+8]
movzx	esi, word ptr [edx+8]
cmp	ax, si
ja	short loc_42B47F
jb	short loc_42B487
movzx	eax, word ptr [ecx+0Ah]
movzx	esi, word ptr [edx+0Ah]
cmp	ax, si
ja	short loc_42B47F
jb	short loc_42B487
push	edi
mov	esi, edx
mov	edi, 0FFFFFFF4h
sub	esi, ecx
lea	eax, [ecx+0Ch]
sub	edi, ecx
lea	ebx, [ebx+0]

loc_42B4C0:
mov	cl, [eax]
mov	dl, [esi+eax]
cmp	cl, dl
ja	short loc_42B4D4
jb	short loc_42B4DB
inc	eax
lea	ecx, [edi+eax]
cmp	ecx, 8
jb	short loc_42B4C0

loc_42B4D4:
pop	edi
xor	al, al
pop	esi
retn	4

loc_42B4DB:
pop	edi
mov	al, 1
pop	esi
retn	4
sub_42B470 endp

align 10h



sub_42B4F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
call	edx
cmp	al, 1
jnz	short loc_42B509
pop	edi
pop	esi
retn	4

loc_42B509:
mov	eax, [esi]
mov	edx, [eax+10h]
push	edi
mov	ecx, esi
call	edx
pop	edi
pop	esi
retn	4
sub_42B4F0 endp

align 10h



sub_42B520 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
call	edx
cmp	al, 1
jnz	short loc_42B53B
pop	edi
xor	al, al
pop	esi
retn	4

loc_42B53B:
mov	eax, [esi]
mov	edx, [eax+10h]
push	edi
mov	ecx, esi
call	edx
cmp	al, 1
pop	edi
setnz	al
pop	esi
retn	4
sub_42B520 endp

align 10h



sub_42B550 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
call	edx
cmp	al, 1
jnz	short loc_42B569
pop	edi
pop	esi
retn	4

loc_42B569:
mov	eax, [esi]
mov	edx, [eax+18h]
push	edi
mov	ecx, esi
call	edx
pop	edi
pop	esi
retn	4
sub_42B550 endp

align 10h



; int __stdcall	sub_42B580(char	*)
sub_42B580 proc	near

var_24=	byte ptr -24h
var_22=	byte ptr -22h
var_20=	byte ptr -20h
var_1E=	word ptr -1Eh
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
Dst= byte ptr -10h
var_E= dword ptr -0Eh
var_A= word ptr	-0Ah
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 24h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+24h+var_4], eax
push	ebx
push	ebp
mov	ebp, [esp+2Ch+arg_0]
push	edi
test	ebp, ebp
jz	loc_42B768
mov	eax, ebp
lea	edx, [eax+1]

loc_42B5A2:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_42B5A2
sub	eax, edx
cmp	eax, 26h
jnz	loc_42B768
push	7Bh		; int
push	ebp		; char *
call	_strchr
add	esp, 8
cmp	ebp, eax
jnz	loc_42B768
push	7Dh		; int
push	ebp		; char *
call	_strchr
lea	ecx, [ebp+25h]
add	esp, 8
cmp	ecx, eax
jnz	loc_42B768
push	2Dh		; int
push	ebp		; char *
call	_strchr
lea	edx, [ebp+9]
add	esp, 8
cmp	edx, eax
jnz	loc_42B768
lea	eax, [ebp+0Ah]
push	2Dh		; int
push	eax		; char *
call	_strchr
lea	ecx, [ebp+0Eh]
add	esp, 8
cmp	ecx, eax
jnz	loc_42B768
lea	edi, [ebp+0Fh]
push	2Dh		; int
push	edi		; char *
call	_strchr
lea	edx, [ebp+13h]
add	esp, 8
cmp	edx, eax
jnz	loc_42B768
lea	ebx, [ebp+14h]
push	2Dh		; int
push	ebx		; char *
call	_strchr
lea	ecx, [ebp+18h]
add	esp, 8
cmp	ecx, eax
jnz	loc_42B768
xor	eax, eax
mov	[esp+30h+var_E], eax
mov	[esp+30h+var_A], ax
mov	[esp+30h+var_8], al
push	8		; MaxCount
lea	eax, [ebp+1]
push	eax		; Src
lea	ecx, [esp+38h+Dst]
xor	edx, edx
push	9		; SizeInBytes
push	ecx		; Dst
mov	word ptr [esp+40h+Dst],	dx
call	_strncpy_s
push	10h		; int
lea	edx, [esp+44h+Dst]
push	0		; char **
push	edx		; char *
call	_strtoul
mov	[esi+4], eax
xor	eax, eax
mov	word ptr [esp+4Ch+var_20], ax
mov	[esp+4Ch+var_1E], ax
mov	[esp+4Ch+var_1C], al
push	4		; MaxCount
lea	eax, [ebp+0Ah]
push	eax		; Src
lea	ecx, [esp+54h+var_20]
push	5		; SizeInBytes
push	ecx		; Dst
call	_strncpy_s
push	10h		; int
lea	edx, [esp+60h+var_20]
push	0		; char **
push	edx		; char *
call	_strtoul
push	4		; MaxCount
push	edi		; Src
mov	[esi+8], ax
xor	eax, eax
lea	ecx, [esp+70h+var_18]
push	5		; SizeInBytes
push	ecx		; Dst
mov	word ptr [esp+78h+var_18], ax
mov	word ptr [esp+78h+var_18+2], ax
mov	[esp+78h+var_14], al
call	_strncpy_s
add	esp, 48h
push	10h		; int
lea	edx, [esp+34h+var_18]
push	0		; char **
push	edx		; char *
call	_strtoul
mov	[esi+0Ah], ax
xor	eax, eax
add	esp, 0Ch
mov	word ptr [esp+30h+var_24], ax
mov	[esp+30h+var_22], al
xor	edi, edi
nop

loc_42B6F0:		; MaxCount
push	2
push	ebx		; Src
lea	ecx, [esp+38h+var_24]
push	3		; SizeInBytes
push	ecx		; Dst
call	_strncpy_s
push	10h		; int
lea	edx, [esp+44h+var_24]
push	0		; char **
push	edx		; char *
call	_strtoul
mov	[esi+edi+0Ch], al
inc	edi
add	esp, 1Ch
add	ebx, 2
cmp	edi, 2
jb	short loc_42B6F0
mov	edi, 2
add	ebp, 19h

loc_42B725:		; MaxCount
push	2
push	ebp		; Src
lea	eax, [esp+38h+var_24]
push	3		; SizeInBytes
push	eax		; Dst
call	_strncpy_s
push	10h		; int
lea	ecx, [esp+44h+var_24]
push	0		; char **
push	ecx		; char *
call	_strtoul
mov	[esi+edi+0Ch], al
inc	edi
add	esp, 1Ch
add	ebp, 2
cmp	edi, 8
jb	short loc_42B725
pop	edi
pop	ebp
mov	al, 1
pop	ebx
mov	ecx, [esp+24h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 24h
retn	4

loc_42B768:
mov	ecx, [esp+30h+var_4]
pop	edi
pop	ebp
pop	ebx
xor	ecx, esp
xor	al, al
call	sub_7999A3
add	esp, 24h
retn	4
sub_42B580 endp

align 10h



sub_42B780 proc	near
movzx	ecx, byte ptr [eax+13h]
movzx	edx, byte ptr [eax+12h]
push	ecx
movzx	ecx, byte ptr [eax+11h]
push	edx
movzx	edx, byte ptr [eax+10h]
push	ecx
movzx	ecx, byte ptr [eax+0Fh]
push	edx
movzx	edx, byte ptr [eax+0Eh]
push	ecx
movzx	ecx, byte ptr [eax+0Dh]
push	edx
movzx	edx, byte ptr [eax+0Ch]
push	ecx
movzx	ecx, word ptr [eax+0Ah]
push	edx
movzx	edx, word ptr [eax+8]
mov	eax, [eax+4]
push	ecx
push	edx
push	eax
push	offset Format	; "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%0"...
push	27h		; SizeInBytes
push	offset DstBuf	; DstBuf
call	_sprintf_s
add	esp, 38h
mov	eax, offset DstBuf
retn
sub_42B780 endp



; Attributes: bp-based frame

sub_42B7D0 proc	near

var_4= dword ptr -4
arg_0= qword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, dword ptr [ebp+arg_0]
mov	edx, dword ptr [ebp+arg_0+4]
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_4]
mov	[ecx+4], eax
mov	eax, dword ptr [ebp+arg_0]
mov	edx, dword ptr [ebp+arg_0+4]
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_4]
mov	[edx+2], ax
mov	eax, dword ptr [ebp+arg_0]
and	eax, 0FFFFh
mov	ecx, dword ptr [ebp+arg_0+4]
and	ecx, 0
mov	edx, [ebp+var_4]
mov	[edx], ax
mov	esp, ebp
pop	ebp
retn	8
sub_42B7D0 endp



; Attributes: bp-based frame

sub_42B820 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_42B864
mov	edx, [ebp+var_4]
fld	dword ptr [edx]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax]
fcomip	st, st(1)
fstp	st
jbe	short loc_42B858
mov	[ebp+var_8], 1
jmp	short loc_42B85F

loc_42B858:
mov	[ebp+var_8], 0

loc_42B85F:
mov	al, byte ptr [ebp+var_8]
jmp	short loc_42B8CD

loc_42B864:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnz	short loc_42B88C
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+0Ch]
jz	short loc_42B8CB

loc_42B88C:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+0Ch]
jl	short loc_42B8BF
jg	short loc_42B8B6
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	ecx, [edx+8]
cmp	ecx, [eax+8]
jbe	short loc_42B8BF

loc_42B8B6:
mov	[ebp+var_1C], 1
jmp	short loc_42B8C6

loc_42B8BF:
mov	[ebp+var_1C], 0

loc_42B8C6:
mov	al, byte ptr [ebp+var_1C]
jmp	short loc_42B8CD

loc_42B8CB:
xor	al, al

loc_42B8CD:
mov	esp, ebp
pop	ebp
retn	4
sub_42B820 endp

align 10h


; Attributes: bp-based frame

sub_42B8E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_110DE00
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42B903
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_42B903:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42B8E0 endp

align 10h


; Attributes: bp-based frame

sub_42B910 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
push	7D00h
mov	ecx, [ebp+var_C]
call	sub_42BD60
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_42B910 endp

align 10h


; Attributes: bp-based frame

sub_42B950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1556B88
mov	ecx, [ebp+var_4]
call	sub_401050
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_42B97E
push	28h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_42B97E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42B950 endp

align 10h


; Attributes: bp-based frame

sub_42B990 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_110DEC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42B9B5
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42B9B5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42B990 endp

align 10h


; Attributes: bp-based frame

sub_42B9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154CB6C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42B9C0 endp

align 10h


; Attributes: bp-based frame

sub_42B9F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154CB6C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154CAB0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+1Ch], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+1Eh], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+20h], ecx
cmp	[ebp+arg_0], 0
jz	short loc_42BA4A
mov	edx, [ebp+var_4]
mov	eax, [edx+20h]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
jmp	short loc_42BA51

loc_42BA4A:
mov	[ebp+var_8], 0

loc_42BA51:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42B9F0 endp

align 10h


; Attributes: bp-based frame

sub_42BA70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+20h], ecx
cmp	[ebp+arg_0], 0
jz	short loc_42BA96
mov	edx, [ebp+var_4]
mov	eax, [edx+20h]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
jmp	short loc_42BA9D

loc_42BA96:
mov	[ebp+var_8], 0

loc_42BA9D:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4
sub_42BA70 endp

align 10h


; Attributes: bp-based frame

sub_42BAB0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 3731h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1556C0C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+28h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+20h], 0
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_42BAB0 endp

align 10h


; Attributes: bp-based frame

sub_42BB10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42BB40
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42BB40:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42BB10 endp

align 10h


; Attributes: bp-based frame

sub_42BB50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
push	eax
call	sub_4093F0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_42BB78
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_42BB78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_42BB50 endp

align 10h


; Attributes: bp-based frame

sub_42BB90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_42BBD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42BBBA
push	80h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_42BBBA:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_42BB90 endp

align 10h


; Attributes: bp-based frame

sub_42BBD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 50h
call	sub_408B00
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_408B00
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_42BC0A
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_64A430

loc_42BC0A:
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_42BBD0 endp

align 10h


; Attributes: bp-based frame

sub_42BC30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx+0Ch]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_42BE20
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
sub	eax, 18h
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_9], cl
mov	esp, ebp
pop	ebp
retn
sub_42BC30 endp

align 10h


; Attributes: bp-based frame

sub_42BC90 proc	near

var_44=	dword ptr -44h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_44]
call	sub_42C150
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_44]
jz	short loc_42BCD9
push	ecx
mov	[ebp+var_38], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	ecx, [ebp+var_44]
call	sub_42BCF0
mov	eax, 1
jmp	short loc_42BCDB

loc_42BCD9:
xor	eax, eax

loc_42BCDB:
mov	esp, ebp
pop	ebp
retn	4
sub_42BC90 endp

align 10h


; Attributes: bp-based frame

sub_42BCF0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_42BD3D
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_42BD3D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_42BCF0 endp

align 10h


; Attributes: bp-based frame

sub_42BD60 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_4043E0
cmp	[ebp+arg_0], eax
jbe	short loc_42BD7E
mov	ecx, [ebp+var_1C]
call	loc_407740

loc_42BD7E:
mov	ecx, [ebp+var_1C]
call	sub_402430
mov	[ebp+var_8], eax
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [eax]
add	edx, 1
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_1C]
call	sub_407DA0
movzx	eax, al
test	eax, eax
jz	short loc_42BDB9
mov	[ebp+var_20], 10h
jmp	short loc_42BDC9

loc_42BDB9:
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	eax, [ecx]
sub	eax, [edx+24h]
sar	eax, 1
mov	[ebp+var_20], eax

loc_42BDC9:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_20]
jnb	short loc_42BDD3
jmp	short loc_42BDDF

loc_42BDD3:
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_42BFB0

loc_42BDDF:
mov	esp, ebp
pop	ebp
retn	4
sub_42BD60 endp

align 10h


; Attributes: bp-based frame

sub_42BDF0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
push	0
push	0
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_42C030
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_42BDF0 endp

align 10h


; Attributes: bp-based frame

sub_42BE20 proc	near

var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	al, [ebp+arg_8]
mov	[ebp+var_1A], al
mov	ecx, [ebp+arg_4]
sub	ecx, 18h
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ecx+4]
mov	[ebp+var_14], eax
mov	edx, [ecx+8]
mov	[ebp+var_10], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_C], eax
mov	edx, [ecx+10h]
mov	[ebp+var_8], edx
mov	eax, [ecx+14h]
mov	[ebp+var_4], eax
mov	cl, [ebp+var_1A]
mov	[ebp+var_19], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
sub	eax, 18h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
movzx	eax, [ebp+var_19]
push	eax
sub	esp, 18h
mov	ecx, esp
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
mov	[ecx+0Ch], eax
mov	edx, [ebp+var_8]
mov	[ecx+10h], edx
mov	eax, [ebp+var_4]
mov	[ecx+14h], eax
mov	eax, [ebp+arg_4]
sub	eax, 18h
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_42C1F0
add	esp, 28h
mov	esp, ebp
pop	ebp
retn
sub_42BE20 endp

align 10h


; Attributes: bp-based frame

sub_42BEE0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
movzx	eax, word ptr [eax]
cdq
mov	esi, eax
mov	edi, edx
mov	ecx, [ebp+arg_0]
movzx	eax, word ptr [ecx+2]
cdq
mov	cl, 10h
call	__allshl
mov	ebx, eax
mov	eax, edx
mov	edx, [ebp+arg_0]
mov	ecx, [edx+4]
xor	edx, edx
mov	[ebp+var_10], eax
mov	eax, ecx
mov	cl, 20h
call	__allshl
or	eax, ebx
mov	ebx, [ebp+var_10]
or	edx, ebx
or	eax, esi
or	edx, edi
mov	[ebp+var_8], eax
mov	[ebp+var_4], edx
mov	edx, [ebp+arg_4]
movzx	eax, word ptr [edx]
cdq
mov	esi, eax
mov	edi, edx
mov	eax, [ebp+arg_4]
movzx	eax, word ptr [eax+2]
cdq
mov	cl, 10h
call	__allshl
mov	ebx, eax
mov	eax, edx
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
xor	ecx, ecx
mov	[ebp+var_14], eax
mov	eax, edx
mov	edx, ecx
mov	cl, 20h
call	__allshl
or	eax, ebx
mov	ebx, [ebp+var_14]
or	edx, ebx
or	eax, esi
or	edx, edi
mov	[ebp+var_1C], eax
mov	[ebp+var_18], edx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_18]
jg	short loc_42BF8F
jl	short loc_42BF86
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_1C]
jnb	short loc_42BF8F

loc_42BF86:
mov	[ebp+var_20], 1
jmp	short loc_42BF96

loc_42BF8F:
mov	[ebp+var_20], 0

loc_42BF96:
mov	al, byte ptr [ebp+var_20]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_42BEE0 endp

align 10h


; Attributes: bp-based frame

sub_42BFB0 proc	near

var_2C=	dword ptr -2Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
add	ecx, 24h
call	sub_407730
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_402CE0
push	eax
mov	ecx, [ebp+var_2C]
call	sub_404430
push	eax
call	sub_4049C0
add	esp, 0Ch
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4077A0
mov	ecx, [ebp+var_2C]
call	sub_407E10
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
lea	eax, [edx+ecx*2]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_404460
mov	esp, ebp
pop	ebp
retn	4
sub_42BFB0 endp

align 10h


; Attributes: bp-based frame

sub_42C030 proc	near

var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	eax, [ebp+arg_4]
sub	eax, 18h
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [eax+4]
mov	[ebp+var_14], edx
mov	ecx, [eax+8]
mov	[ebp+var_10], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_C], edx
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
mov	edx, [eax+14h]
mov	[ebp+var_4], edx
mov	al, [ebp+arg_8]
mov	[ebp+var_39], al
mov	ecx, [ebp+var_18]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_24], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
sub	eax, 1
mov	[ebp+var_20], eax
mov	eax, [ebp+var_20]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_1C], eax

loc_42C0AB:
cmp	[ebp+var_20], 0
jle	short loc_42C114
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_1C]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
call	sub_42B820
movzx	eax, al
test	eax, eax
jz	short loc_42C114
mov	ecx, [ebp+var_1C]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_20]
imul	edx, 18h
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_1C], eax
jmp	short loc_42C0AB

loc_42C114:
mov	eax, [ebp+var_20]
imul	eax, 18h
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_38]
mov	[eax], ecx
mov	edx, [ebp+var_34]
mov	[eax+4], edx
mov	ecx, [ebp+var_30]
mov	[eax+8], ecx
mov	edx, [ebp+var_2C]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_28]
mov	[eax+10h], ecx
mov	edx, [ebp+var_24]
mov	[eax+14h], edx
mov	esp, ebp
pop	ebp
retn
sub_42C030 endp

align 10h


; Attributes: bp-based frame

sub_42C150 proc	near

var_2C=	dword ptr -2Ch
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_42C168:
cmp	[ebp+var_8], 0
jz	short loc_42C1AD
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_2C]
add	ecx, 14h
call	sub_42BEE0
movzx	eax, al
test	eax, eax
jnz	short loc_42C1A2
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_42C1AB

loc_42C1A2:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_42C1AB:
jmp	short loc_42C168

loc_42C1AD:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_2C]
jz	short loc_42C1DE
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 14h
call	sub_42BEE0
movzx	ecx, al
test	ecx, ecx
jz	short loc_42C1DE
mov	edx, [ebp+var_2C]
mov	[ebp+var_4], edx

loc_42C1DE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42C150 endp

align 10h


; Attributes: bp-based frame

sub_42C1F0 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	byte ptr  2Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_42C206:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_42C27F
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 18h
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
call	sub_42B820
movzx	edx, al
test	edx, edx
jz	short loc_42C239
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_42C239:
mov	ecx, [ebp+var_8]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
imul	edx, 18h
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_8]
lea	ecx, [eax+eax+2]
mov	[ebp+var_8], ecx
jmp	short loc_42C206

loc_42C27F:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jnz	short loc_42C2C7
mov	eax, [ebp+var_8]
sub	eax, 1
imul	eax, 18h
add	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_42C2C7:
mov	dl, [ebp+arg_24]
mov	[ebp+var_29], dl
mov	eax, [ebp+arg_C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_18]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_1C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_20]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_42C305:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_4]
jle	short loc_42C370
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_C]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
call	sub_42B820
movzx	eax, al
test	eax, eax
jz	short loc_42C370
mov	ecx, [ebp+var_C]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
imul	edx, 18h
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_42C305

loc_42C370:
mov	eax, [ebp+var_10]
imul	eax, 18h
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_20]
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_18]
mov	[eax+10h], ecx
mov	edx, [ebp+var_14]
mov	[eax+14h], edx
mov	esp, ebp
pop	ebp
retn
sub_42C1F0 endp



; Attributes: bp-based frame

sub_42C3A0 proc	near

var_C= word ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
lea	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+4]
faddp	st(1), st
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+8]
faddp	st(1), st
fstp	[ebp+var_8]
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jnz	short loc_42C3E3
fldz
jmp	short loc_42C447
jmp	short loc_42C447

loc_42C3E3:
mov	edx, [ebp+var_4]
mov	eax, [edx]
shr	eax, 17h
sub	eax, 7Fh
mov	[ebp+var_C], ax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
and	edx, offset loc_7FFFFF
mov	eax, [ebp+var_4]
mov	[eax], edx
movsx	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_42C41A
mov	edx, [ebp+var_4]
mov	eax, [edx]
or	eax, (offset loc_7FFFFF+1)
mov	ecx, [ebp+var_4]
mov	[ecx], eax

loc_42C41A:
mov	dx, [ebp+var_C]
sar	dx, 1
mov	[ebp+var_C], dx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
shr	ecx, 10h
movsx	edx, [ebp+var_C]
add	edx, 7Fh
shl	edx, 17h
mov	eax, dword_188940C
or	edx, [eax+ecx*4]
mov	ecx, [ebp+var_4]
mov	[ecx], edx
fld	[ebp+var_8]

loc_42C447:
mov	esp, ebp
pop	ebp
retn
sub_42C3A0 endp

align 10h
; [00000017 BYTES: COLLAPSED FUNCTION std::_Container_base::_Container_base(void). PRESS KEYPAD	"+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_42C470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	esp, ebp
pop	ebp
retn	8
sub_42C470 endp

align 10h


; Attributes: bp-based frame

sub_42C480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1777h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42C480 endp

align 10h


; Attributes: bp-based frame

sub_42C4B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 177Ah
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+15h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+14h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42C4B0 endp



; Attributes: bp-based frame

sub_42C500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 177Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F4
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+10h], 1
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42C500 endp

align 10h


; Attributes: bp-based frame

sub_42C530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 177Dh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15583C8
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+14h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+10h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42C530 endp

align 10h


; Attributes: bp-based frame

sub_42C5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1785h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42C5C0 endp

align 10h


; Attributes: bp-based frame

sub_42C5F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1788h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15583C8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+18h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42C5F0 endp

align 10h


; Attributes: bp-based frame

sub_42C640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+1], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+3], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+4]
test	ecx, ecx
jz	short loc_42C67E
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+5]
test	eax, eax
jnz	short loc_42C67A
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+8], 1
jnz	short loc_42C67E

loc_42C67A:
mov	al, 1
jmp	short loc_42C680

loc_42C67E:
xor	al, al

loc_42C680:
mov	esp, ebp
pop	ebp
retn
sub_42C640 endp

align 10h


; Attributes: bp-based frame

sub_42C690 proc	near

var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42C690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
lea	ecx, [ebp+var_24]
call	sub_42C4B0
mov	[ebp+var_4], 0
lea	eax, [ebp+var_24]
push	eax
push	2
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
cvtsi2ss xmm0, [ebp+var_1C]
mov	ecx, [ebp+var_28]
movss	dword ptr [ecx], xmm0
cvtsi2ss xmm0, [ebp+var_18]
mov	edx, [ebp+var_28]
movss	dword ptr [edx+4], xmm0
cvtsi2ss xmm0, [ebp+var_14]
mov	eax, [ebp+var_28]
movss	dword ptr [eax+8], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_24]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42C690 endp

align 10h


; Attributes: bp-based frame

sub_42C720 proc	near

var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42C720
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
lea	ecx, [ebp+var_2C]
call	sub_42C530
mov	[ebp+var_4], 0
lea	eax, [ebp+var_2C]
push	eax
push	2
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	ecx, [ebp+var_30]
mov	[ecx+18h], al
mov	edx, [ebp+var_30]
movss	xmm0, [ebp+var_24]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_30]
movss	xmm0, [ebp+var_1C]
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, [ebp+var_20]
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+var_30]
movss	xmm0, [ebp+var_18]
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_30]
movss	xmm0, [ebp+var_14]
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, [ebp+var_10]
movss	dword ptr [ecx+14h], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_2C]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42C720 endp

align 10h


; Attributes: bp-based frame

sub_42C7D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_11096A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42C7F8
push	0ACh
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42C7F8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42C7D0 endp

align 10h


; Attributes: bp-based frame

sub_42C810 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42C810
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	[ebp+var_10], ecx
mov	ecx, 2735h
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1558448
mov	esi, [ebp+var_10]
add	esi, 14h
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 38h
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 44h
call	sub_401EF0
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+10h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+8], 19h
mov	eax, [ebp+var_10]
add	eax, 14h
push	eax
xor	eax, eax
call	sub_420330
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+2Ch], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+30h], 0
mov	dword ptr [edx+34h], 0
mov	eax, [ebp+var_10]
add	eax, 44h
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	edx, [ebp+var_10]
add	edx, 44h
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+28h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_42C810 endp

align 10h


; Attributes: bp-based frame

sub_42C930 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42C983
push	58h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_42C983:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42C930 endp

align 10h


; Attributes: bp-based frame

sub_42C9A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42C9A0 endp

align 10h


; Attributes: bp-based frame

sub_42C9F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 2737h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 64h
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 64h
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42C9F0 endp

align 10h


; Attributes: bp-based frame

sub_42CA30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_42CA30 endp

align 10h


; Attributes: bp-based frame

sub_42CA50 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42CB70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, 372Ch
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1558470
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4022A0
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+var_18]
add	eax, 20h
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
call	sub_401740
mov	eax, [ebp+var_14]
call	sub_401740
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+28h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42CA50 endp

align 10h


; Attributes: bp-based frame

sub_42CB00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42CB53
push	2Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_42CB53:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42CB00 endp

align 10h


; Attributes: bp-based frame

sub_42CB70 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42CB70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, 372Dh
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1558470
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4022A0
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+var_18]
add	eax, 20h
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
call	sub_401740
mov	eax, [ebp+var_14]
call	sub_401740
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+28h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42CB70 endp

align 10h


; Attributes: bp-based frame

sub_42CC20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42CC20 endp

align 10h


; Attributes: bp-based frame

sub_42CC70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 36C2h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42CC70 endp

align 10h


; Attributes: bp-based frame

sub_42CCA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42CCA0 endp

align 10h


; Attributes: bp-based frame

sub_42CCD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 0C1Ah
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15B6C98
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42CCD0 endp

align 10h


; Attributes: bp-based frame

sub_42CD40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42CD65
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42CD65:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42CD40 endp

align 10h


; Attributes: bp-based frame

sub_42CD70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42CD70 endp

align 10h


; Attributes: bp-based frame

sub_42CDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 2337h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_1558474
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+44h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+40h], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+3Ch], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+48h], 0
mov	dword ptr [eax+4Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_42CDA0 endp

align 10h


; Attributes: bp-based frame

sub_42CE40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42CE65
push	50h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42CE65:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42CE40 endp

align 10h


; Attributes: bp-based frame

sub_42CE70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, 2338h
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_1558478
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_401EF0
mov	eax, [ebp+var_10]
add	eax, 28h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_42CE70 endp

align 10h


; Attributes: bp-based frame

sub_42CF00 proc	near

var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42CF00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_64]
add	ecx, 28h
call	sub_42D4F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42CF55
push	34h
mov	ecx, [ebp+var_64]
push	ecx
call	sub_1111040
add	esp, 8

loc_42CF55:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42CF00 endp

align 10h


; Attributes: bp-based frame

sub_42CF70 proc	near

var_6C=	dword ptr -6Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42CF70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_6C]
add	ecx, 28h
call	sub_42D4F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_6C]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42CF70 endp

align 10h


; Attributes: bp-based frame

sub_42CFC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_22 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42CFE8
push	240h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42CFE8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42CFC0 endp

align 10h


; Attributes: bp-based frame

sub_42D000 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42DDE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_429100
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D000 endp

align 10h


; Attributes: bp-based frame

sub_42D070 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D070 endp

align 10h


; Attributes: bp-based frame

sub_42D0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_42D0C0 endp

align 10h


; Attributes: bp-based frame

sub_42D0E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D0E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 40h
call	sub_407910
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D0E0 endp

align 10h


; Attributes: bp-based frame

sub_42D160 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D160
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 40h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D160 endp

align 10h


; Attributes: bp-based frame

sub_42D1C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D1C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 50h
call	sub_407E50
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D1C0 endp

align 10h


; Attributes: bp-based frame

sub_42D240 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42DDE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D240 endp

align 10h


; Attributes: bp-based frame

sub_42D2B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D2B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 50h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D2B0 endp

align 10h


; Attributes: bp-based frame

sub_42D310 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D310 endp

align 10h


; Attributes: bp-based frame

sub_42D360 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D3B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_42DFF0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D360 endp

align 10h


; Attributes: bp-based frame

sub_42D3B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D3B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_593CC0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D3B0 endp

align 10h


; Attributes: bp-based frame

sub_42D400 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
lea	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_24]
call	sub_42E040
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_14]
mov	[eax+4], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_42D400 endp

align 10h


; Attributes: bp-based frame

sub_42D480 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_42E040
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_42D480 endp

align 10h


; Attributes: bp-based frame

sub_42D4F0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ECF80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_5C]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
lea	edx, [ebp+var_60]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_54]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_5C]
mov	[edx], eax
lea	ecx, [ebp+var_58]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_60]
mov	[edx], eax
xor	ecx, ecx
mov	[ebp+var_35], cl
lea	edx, [ebp+var_4C]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_54]
mov	[eax], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_58]
mov	[eax], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_6C]
cmp	dword ptr [edx], 0
jz	short loc_42D5BE
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_6C]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_68], eax
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ebp+var_64], eax
cmp	[ebp+var_64], 0
jz	short loc_42D5BE
mov	ecx, [ebp+var_68]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_64]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_42D5BE:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42D4F0 endp

align 10h


; Attributes: bp-based frame

sub_42D5E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA5130
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D5E0 endp



; Attributes: bp-based frame

sub_42D620 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA0F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D620 endp



; Attributes: bp-based frame

sub_42D660 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0D60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D660 endp



; Attributes: bp-based frame

sub_42D6A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4AD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D6A0 endp



; Attributes: bp-based frame

sub_42D6E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1558458
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E58A10
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_42D6E0 endp

align 10h


; Attributes: bp-based frame

sub_42D750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCDD10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D750 endp



; Attributes: bp-based frame

sub_42D790 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD54C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D790 endp



; Attributes: bp-based frame

sub_42D7D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE000
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D7D0 endp



; Attributes: bp-based frame

sub_42D810 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96270
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D810 endp



; Attributes: bp-based frame

sub_42D850 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC52B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D850 endp



; Attributes: bp-based frame

sub_42D890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5430
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D890 endp



; Attributes: bp-based frame

sub_42D8D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD8E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D8D0 endp



; Attributes: bp-based frame

sub_42D910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAA570
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D910 endp



; Attributes: bp-based frame

sub_42D950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCDA70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42D950 endp



; Attributes: bp-based frame

sub_42D990 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1558460
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E77280
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_42D990 endp

align 10h


; Attributes: bp-based frame

sub_42DA00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155846C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E725A0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_42DA00 endp

align 10h


; Attributes: bp-based frame

sub_42DA70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0D60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_42DA70 endp



; Attributes: bp-based frame

sub_42DAB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1558454
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E7CEF0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_42DAB0 endp

align 10h


; Attributes: bp-based frame

sub_42DB20 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42DB20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_42F780
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_A0]
cmp	dword ptr [ecx], 0
jz	short loc_42DBEF
mov	edx, [ebp+var_A0]
mov	eax, [ebp+var_A0]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_A0]
mov	eax, [edx]
mov	[ebp+var_98], eax
cmp	[ebp+var_98], 0
jz	short loc_42DBEF
mov	ecx, [ebp+var_9C]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_98]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_42DBEF:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42DB20 endp

align 10h


; Attributes: bp-based frame

sub_42DC10 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_31=	byte ptr -31h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0BCh
mov	[ebp+var_BC], ecx
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+var_BC]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_42DC60
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_BC]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_42F7B0
add	esp, 8
mov	eax, [ebp+var_BC]
mov	ecx, [eax+4]
add	ecx, 0Ch
mov	edx, [ebp+var_BC]
mov	[edx+4], ecx
jmp	short loc_42DC97

loc_42DC60:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_BC]
mov	edx, [ecx+4]
mov	[ebp+var_B8], edx
xor	eax, eax
mov	[ebp+var_31], al
push	1
push	1
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_B8]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_42E1B0

loc_42DC97:
mov	esp, ebp
pop	ebp
retn	4
sub_42DC10 endp

align 10h


; Attributes: bp-based frame

sub_42DCA0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42DCA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_5BD2C0
add	esp, 8
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_42DD3A
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_42DD3A
mov	ecx, [ebp+var_60]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_42DD3A:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42DCA0 endp

align 10h


; Attributes: bp-based frame

sub_42DD50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_42DD8B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_42DDB6

loc_42DD8B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_42EEB0

loc_42DDB6:
mov	esp, ebp
pop	ebp
retn	4
sub_42DD50 endp

align 10h


; Attributes: bp-based frame

sub_42DDC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
xor	eax, eax
cmp	ecx, [ebp+arg_0]
setnz	al
mov	esp, ebp
pop	ebp
retn	4
sub_42DDC0 endp

align 10h


; Attributes: bp-based frame

sub_42DDE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42DDE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_429100
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_42DE4E
push	38h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_42DE4E:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42DDE0 endp

align 10h


; Attributes: bp-based frame

sub_42DE70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42DEA0
push	50h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42DEA0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42DE70 endp

align 10h


; Attributes: bp-based frame

sub_42DEB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42DEE0
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_42DEE0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42DEB0 endp

align 10h


; Attributes: bp-based frame

sub_42DEF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_42D0E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42DF17
push	78h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_42DF17:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_42DEF0 endp



; Attributes: bp-based frame

sub_42DF20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_42D1C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_42DF4A
push	98h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_42DF4A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_42DF20 endp

align 10h


; Attributes: bp-based frame

sub_42DF60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42DDE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_42DFCE
push	58h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_42DFCE:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42DF60 endp

align 10h


; Attributes: bp-based frame

sub_42DFF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_42E035
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_42E750
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_42E035:
mov	esp, ebp
pop	ebp
retn
sub_42DFF0 endp

align 10h


; Attributes: bp-based frame

sub_42E040 proc	near

var_34=	dword ptr -34h
var_30=	word ptr -30h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42E040
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_5F38A0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	byte ptr [ebp+var_30+1], al
mov	cl, byte ptr [ebp+var_30+1]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	byte ptr [ebp+var_30], dl
mov	al, byte ptr [ebp+var_30]
mov	[ebp+var_2E], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+8], eax
jmp	short loc_42E0CD

loc_42E09C:
cmp	[ebp+var_14], 0
jz	short loc_42E0B7
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_42E0B7:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_42E0D4
retn

loc_42E0CD:
mov	[ebp+var_4], 0FFFFFFFFh

loc_42E0D4:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_42E040 endp

align 10h


; Attributes: bp-based frame

sub_42E0F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_640560
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_42E8C0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42E0F0 endp



; Attributes: bp-based frame

sub_42E130 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42E130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_42E194
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_42E194
mov	ecx, [ebp+var_14]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_42E194:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42E130 endp

align 10h


; Attributes: bp-based frame

sub_42E1B0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42E1B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jb	short loc_42E1FB
mov	edx, [ebp+var_90]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+4]
jnb	short loc_42E1FB
mov	[ebp+var_94], 1
jmp	short loc_42E205

loc_42E1FB:
mov	[ebp+var_94], 0

loc_42E205:
movzx	ecx, byte ptr [ebp+var_94]
test	ecx, ecx
jz	short loc_42E259
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_42E290
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_19], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_19]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
call	sub_42EA00
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_42DCA0
jmp	short loc_42E27E

loc_42E259:
xor	eax, eax
mov	[ebp+var_1A], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_1A]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
call	sub_42EA00

loc_42E27E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_42E1B0 endp

align 10h


; Attributes: bp-based frame

sub_42E290 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42E290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_642970
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_48]
call	sub_42E350
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
push	0
lea	edx, [ebp+var_3D]
push	edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_432000
add	esp, 14h
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42E290 endp

align 10h


; Attributes: bp-based frame

sub_42E350 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42FB70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_44D330
mov	ecx, [ebp+var_30]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_30]
mov	[eax+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_42E350 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_42E3F0(float,	float, float)
sub_42E3F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
fld	[ebp+arg_0]
fld	[ebp+arg_4]
fcomip	st, st(1)
fstp	st
jbe	short loc_42E406
fld	[ebp+arg_4]
jmp	short loc_42E41C
jmp	short loc_42E41C

loc_42E406:
fld	[ebp+arg_8]
fld	[ebp+arg_0]
fcomip	st, st(1)
fstp	st
jbe	short loc_42E419
fld	[ebp+arg_8]
jmp	short loc_42E41C
jmp	short loc_42E41C

loc_42E419:
fld	[ebp+arg_0]

loc_42E41C:
pop	ebp
retn
sub_42E3F0 endp

align 10h


; Attributes: bp-based frame

sub_42E420 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_42E43C:
cmp	[ebp+var_10], 0
jz	short loc_42E48D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_11]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_34]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_42E47C
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_60], eax
jmp	short loc_42E485

loc_42E47C:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_60], edx

loc_42E485:
mov	eax, [ebp+var_60]
mov	[ebp+var_10], eax
jmp	short loc_42E43C

loc_42E48D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_42E52F
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jz	short loc_42E520
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_58]
call	sub_42FC10
mov	[ebp+var_48], eax
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_42E5AF
jmp	short loc_42E52F

loc_42E520:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_42E52F:
lea	ecx, [ebp+var_26]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_42E594
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_58]
call	sub_42FC10
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_42E5AF

loc_42E594:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_42E5AF:
mov	esp, ebp
pop	ebp
retn	8
sub_42E420 endp

align 10h


; Attributes: bp-based frame

sub_42E5C0 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_42E5DC:
cmp	[ebp+var_10], 0
jz	short loc_42E628
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_11]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_34]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_42E617
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_60], ecx
jmp	short loc_42E620

loc_42E617:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_60], eax

loc_42E620:
mov	ecx, [ebp+var_60]
mov	[ebp+var_10], ecx
jmp	short loc_42E5DC

loc_42E628:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_42E6CA
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_61], cl
movzx	edx, [ebp+var_61]
test	edx, edx
jz	short loc_42E6BB
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_42FD60
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_42E745
jmp	short loc_42E6CA

loc_42E6BB:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_42E6CA:
lea	edx, [ebp+var_26]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
cmp	ecx, [ebp+arg_4]
sbb	edx, edx
neg	edx
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_42E72A
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_42FD60
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_42E745

loc_42E72A:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_42E745:
mov	esp, ebp
pop	ebp
retn	8
sub_42E5C0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_42E750(void	*)
sub_42E750 proc	near

var_58=	dword ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx

loc_42E759:
cmp	[ebp+arg_0], 0
jz	short loc_42E7A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_58]
call	sub_42E750
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4303D0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_42E7A1
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_42E7A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_42E759

loc_42E7A9:
mov	esp, ebp
pop	ebp
retn	4
sub_42E750 endp

align 10h


; Attributes: bp-based frame

sub_42E7B0 proc	near

var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_42E7EF

loc_42E7DE:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_42E7EF:
mov	ecx, [ebp+var_84]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_85], dl
movzx	eax, [ebp+var_85]
test	eax, eax
jz	short loc_42E834
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_42E834
jmp	short loc_42E7DE

loc_42E834:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_42E86E
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_84]
call	sub_490040
jmp	short loc_42E8AD

loc_42E86E:
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_4]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_7C]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	ecx, [ebp+var_84]
call	sub_42FA30

loc_42E8AD:
mov	esp, ebp
pop	ebp
retn	8
sub_42E7B0 endp

align 10h


; Attributes: bp-based frame

sub_42E8C0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_42E8D1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_42E90F
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_4054E0
cmp	[ebp+var_8], 0
jz	short loc_42E90D
mov	eax, 1
imul	eax, 30h
push	eax		; int
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_42E90D:
jmp	short loc_42E8D1

loc_42E90F:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	esp, ebp
pop	ebp
retn
sub_42E8C0 endp

align 10h


; Attributes: bp-based frame

sub_42E930 proc	near

var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	byte ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	eax, [ebp+arg_C]
push	eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_10]
push	ecx
call	sub_430930
add	esp, 10h
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+arg_4], eax
lea	ecx, [ebp+var_30]
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_30]
setz	al
mov	[ebp+var_55], al
movzx	ecx, [ebp+var_55]
test	ecx, ecx
jz	short loc_42E9A8
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_42E9FB
jmp	short loc_42E9FB

loc_42E9A8:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+arg_C]
push	edx
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_34]
call	sub_4046E0
push	ecx
mov	[ebp+var_38], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
lea	eax, [ebp+var_4]
call	sub_405E90
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
call	sub_4309C0
add	esp, 14h
mov	eax, [ebp+arg_0]

loc_42E9FB:
mov	esp, ebp
pop	ebp
retn
sub_42E930 endp

align 10h


; Attributes: bp-based frame

sub_42EA00 proc	near

var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_A8=	dword ptr -0A8h
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42EA00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0FCh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_10C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_50F1D0
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_10C]
add	ecx, 8
call	sub_4C7070
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
lea	eax, [ebp+var_1E+1]
push	eax
movzx	ecx, byte ptr [ebp+var_1E]
push	ecx
mov	edx, [ebp+var_18]
push	edx		; void *
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10C]
mov	edx, [ecx]
push	edx		; int
call	sub_430A50
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_42EAB3
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_1C]
push	ecx		; void *
call	sub_42F7B0
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 0Ch
mov	[ebp+var_1C], edx
jmp	short loc_42EADF

loc_42EAB3:
mov	eax, [ebp+arg_C]
imul	eax, 0Ch
add	eax, [ebp+var_1C]
mov	[ebp+var_60], eax
push	0
lea	ecx, [ebp+var_61]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_431870
add	esp, 14h
mov	edx, [ebp+var_60]
mov	[ebp+var_1C], edx

loc_42EADF:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	loc_42EB71
xor	ecx, ecx
mov	[ebp+var_1F], cl
xor	edx, edx
mov	[ebp+var_20], dl
mov	al, [ebp+var_20]
mov	[ebp+var_85], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_10C]
mov	eax, [edx+4]
mov	[ebp+var_80], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_80]
sub	eax, [ebp+var_7C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_42EB35

loc_42EB2C:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_42EB35:
cmp	[ebp+var_68], 0
jle	short loc_42EB68
mov	eax, [ebp+var_7C]
push	eax		; int
mov	ecx, [ebp+var_84]
push	ecx		; void *
call	sub_431800
add	esp, 8
mov	edx, [ebp+var_7C]
add	edx, 0Ch
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_84]
add	eax, 0Ch
mov	[ebp+var_84], eax
jmp	short loc_42EB2C

loc_42EB68:
mov	ecx, [ebp+var_84]
mov	[ebp+var_1C], ecx

loc_42EB71:
jmp	short loc_42EBC0

loc_42EB73:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_431930
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_A8], ecx
cmp	[ebp+var_18], 0
jz	short loc_42EBAA
mov	edx, [ebp+var_A8]
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_42EBAA:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_42EBC7
retn

loc_42EBC0:
mov	[ebp+var_4], 0FFFFFFFFh

loc_42EBC7:
mov	ecx, [ebp+var_10C]
call	sub_50F2B0
mov	ecx, [ebp+var_14]
imul	ecx, 0Ch
add	ecx, [ebp+var_18]
mov	[ebp+var_108], ecx
mov	edx, [ebp+var_10C]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_10C]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_10C]
mov	ecx, [ebp+var_108]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_42EA00 endp

align 10h


; Attributes: bp-based frame

sub_42EC20 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_9C]
jz	loc_42EEA3
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_9C]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	short loc_42ECCB
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_430AB0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_9C]
call	sub_42F8A0
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
imul	ecx, 0Ch
mov	edx, [ebp+var_9C]
add	ecx, [edx]
mov	eax, [ebp+var_9C]
mov	[eax+8], ecx
jmp	loc_42EE8C

loc_42ECCB:
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_9C]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_42ED85
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_60], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_60]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_50]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4C], eax
jmp	short loc_42ED36

loc_42ED2D:
mov	edx, [ebp+var_4C]
sub	edx, 1
mov	[ebp+var_4C], edx

loc_42ED36:
cmp	[ebp+var_4C], 0
jle	short loc_42ED5C
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
call	sub_431D80
mov	ecx, [ebp+var_50]
add	ecx, 0Ch
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_54]
add	edx, 0Ch
mov	[ebp+var_54], edx
jmp	short loc_42ED2D

loc_42ED5C:
mov	eax, [ebp+var_54]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_6C], edx
push	0
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_431930
add	esp, 0Ch
jmp	loc_42EE8C

loc_42ED85:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_9C]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_88]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_78], eax
mov	eax, [ebp+var_84]
sub	eax, [ebp+var_78]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_74], eax
jmp	short loc_42EDF7

loc_42EDEE:
mov	edx, [ebp+var_74]
sub	edx, 1
mov	[ebp+var_74], edx

loc_42EDF7:
cmp	[ebp+var_74], 0
jle	short loc_42EE1D
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_431D80
mov	ecx, [ebp+var_78]
add	ecx, 0Ch
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_7C]
add	edx, 0Ch
mov	[ebp+var_7C], edx
jmp	short loc_42EDEE

loc_42EE1D:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_9C]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_90], eax
push	0
lea	eax, [ebp+var_89]
push	eax
mov	ecx, [ebp+var_98]
push	ecx
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_90]
push	eax
call	sub_4319D0
add	esp, 14h

loc_42EE8C:
mov	ecx, [ebp+var_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_9C]
add	ecx, [edx]
mov	eax, [ebp+var_9C]
mov	[eax+4], ecx

loc_42EEA3:
mov	eax, [ebp+var_9C]
mov	esp, ebp
pop	ebp
retn	4
sub_42EC20 endp

align 10h


; Attributes: bp-based frame

sub_42EEB0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6B=	byte ptr -6Bh
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_62=	byte ptr -62h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42EEB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B8h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_42F940
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_C0]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_C0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_432000
add	esp, 14h
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_42EF78
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_1C]
push	eax		; void *
call	sub_4B6FE0
add	esp, 8
mov	ecx, [ebp+var_1C]
add	ecx, 4
mov	[ebp+var_1C], ecx
jmp	short loc_42EFA4

loc_42EF78:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+var_1C]
lea	ecx, [eax+edx*4]
mov	[ebp+var_60], ecx
push	0
lea	edx, [ebp+var_61]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_60]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_431A90
add	esp, 14h
mov	eax, [ebp+var_60]
mov	[ebp+var_1C], eax

loc_42EFA4:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_42EFF1
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_69], cl
mov	edx, [ebp+var_C0]
mov	eax, [edx+4]
mov	[ebp+var_68], eax
push	0
lea	ecx, [ebp+var_62]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_432000
add	esp, 14h
mov	[ebp+var_C8], eax
mov	edx, [ebp+var_C8]
mov	[ebp+var_1C], edx

loc_42EFF1:
jmp	short loc_42F04D

loc_42EFF3:
xor	eax, eax
mov	[ebp+var_6A], al
mov	ecx, [ebp+var_18]
mov	[ebp+var_70], ecx
jmp	short loc_42F009

loc_42F000:
mov	edx, [ebp+var_70]
add	edx, 4
mov	[ebp+var_70], edx

loc_42F009:
mov	eax, [ebp+var_70]
cmp	eax, [ebp+var_1C]
jz	short loc_42F018
xor	ecx, ecx
mov	[ebp+var_6B], cl
jmp	short loc_42F000

loc_42F018:
mov	edx, [ebp+var_14]
mov	[ebp+var_74], edx
cmp	[ebp+var_18], 0
jz	short loc_42F037
mov	eax, [ebp+var_74]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_42F037:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_42F054
retn

loc_42F04D:
mov	[ebp+var_4], 0FFFFFFFFh

loc_42F054:
mov	ecx, [ebp+var_C0]
call	sub_4B80F0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
lea	ecx, [eax+edx*4]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_BC]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_42EEB0 endp

align 10h


; Attributes: bp-based frame

sub_42F0B0 proc	near

var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42F0B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D8h
mov	[ebp+var_D4], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_5C7D40
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_D4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_D5], al
movzx	ecx, [ebp+var_D5]
test	ecx, ecx
jnz	short loc_42F17C
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_D4]
call	sub_5F3820
mov	[ebp+var_DC], eax
mov	eax, [ebp+var_4C]
or	eax, 1
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_5C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_42F17C
mov	[ebp+var_E0], 0
jmp	short loc_42F186

loc_42F17C:
mov	[ebp+var_E0], 1

loc_42F186:
mov	cl, byte ptr [ebp+var_E0]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_42F19B
and	[ebp+var_4C], 0FFFFFFFEh

loc_42F19B:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_42F25E
lea	ecx, [ebp+var_3D]
mov	[ebp+var_60], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
push	0
mov	edx, [ebp+var_60]
push	edx
lea	ecx, [ebp+var_34]
call	sub_489990
lea	eax, [ebp+var_3C]
mov	[ebp+var_64], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_64]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_42FAB0
lea	ecx, [ebp+var_30]
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_74]
mov	[ebp+var_68], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	eax, [ebp+var_78]
push	eax
push	ecx
mov	[ebp+var_70], esp
mov	ecx, [ebp+var_74]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_D4]
call	sub_42FEA0
lea	edx, [ebp+var_48]
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_2C]
call	sub_42DB20
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_3C]
call	sub_42DB20
mov	[ebp+var_4], 0FFFFFFFFh

loc_42F25E:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42F0B0 endp

align 10h


; Attributes: bp-based frame

sub_42F280 proc	near

var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_ED=	byte ptr -0EDh
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_D8=	dword ptr -0D8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_A5=	byte ptr -0A5h
var_A4=	byte ptr -0A4h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42F280
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 100h
mov	[ebp+var_EC], ecx
mov	[ebp+var_B4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4320D0
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_EC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C0]
mov	[ebp+var_BC], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_BC]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_C0]
setz	al
mov	[ebp+var_ED], al
movzx	ecx, [ebp+var_ED]
test	ecx, ecx
jnz	loc_42F3C4
lea	ecx, [ebp+var_49]
call	sub_401EF0
mov	[ebp+var_F4], eax
mov	edx, [ebp+var_F4]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_B4]
or	eax, 1
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_F8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_48]
call	sub_407810
mov	eax, [ebp+var_B4]
or	eax, 2
mov	[ebp+var_B4], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_5F3820
mov	[ebp+var_FC], eax
mov	edx, [ebp+var_B4]
or	edx, 4
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
push	ecx
lea	edx, [ebp+var_48]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jnz	short loc_42F3C4
mov	[ebp+var_100], 0
jmp	short loc_42F3CE

loc_42F3C4:
mov	[ebp+var_100], 1

loc_42F3CE:
mov	cl, byte ptr [ebp+var_100]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_B4]
and	edx, 4
jz	short loc_42F3EE
and	[ebp+var_B4], 0FFFFFFFBh
call	nullsub_1

loc_42F3EE:
mov	eax, [ebp+var_B4]
and	eax, 2
jz	short loc_42F408
and	[ebp+var_B4], 0FFFFFFFDh
lea	ecx, [ebp+var_48]
call	sub_407E50

loc_42F408:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_B4]
and	ecx, 1
jz	short loc_42F429
and	[ebp+var_B4], 0FFFFFFFEh
lea	ecx, [ebp+var_49]
call	nullsub_1

loc_42F429:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_42F52B
mov	[ebp+var_7C], 0
lea	ecx, [ebp+var_A5]
call	sub_401EF0
mov	[ebp+var_104], eax
mov	eax, [ebp+var_104]
mov	[ebp+var_108], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_108]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_A4]
call	sub_407810
mov	byte ptr [ebp+var_4], 2
lea	eax, [ebp+var_A4]
push	eax
lea	ecx, [ebp+var_78]
call	sub_403400
mov	ecx, [ebp+var_7C]
mov	[ebp+var_50], ecx
lea	edx, [ebp+var_78]
mov	[ebp+var_E8], edx
mov	byte ptr [ebp+var_4], 3
lea	eax, [ebp+var_E4]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_D8]
call	sub_4046E0
mov	ecx, [ebp+var_E8]
push	ecx
push	ecx
mov	[ebp+var_E0], esp
mov	ecx, [ebp+var_E4]
mov	eax, [ebp+var_E0]
call	sub_4046E0
lea	edx, [ebp+var_B0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_5F3900
lea	eax, [ebp+var_B0]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_78]
call	sub_407E50
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_A4]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_A5]
call	nullsub_1

loc_42F52B:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42F280 endp

align 10h


; Attributes: bp-based frame

sub_42F550 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_75=	byte ptr -75h
var_74=	byte ptr -74h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42F550
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C0h
mov	[ebp+var_B0], ecx
mov	[ebp+var_84], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B0]
call	sub_5C7D40
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_B0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_8C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_90]
setz	al
mov	[ebp+var_B1], al
movzx	ecx, [ebp+var_B1]
test	ecx, ecx
jnz	short loc_42F63D
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_B0]
call	sub_5F3820
mov	[ebp+var_B8], eax
mov	eax, [ebp+var_84]
or	eax, 1
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_42F63D
mov	[ebp+var_BC], 0
jmp	short loc_42F647

loc_42F63D:
mov	[ebp+var_BC], 1

loc_42F647:
mov	cl, byte ptr [ebp+var_BC]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_84]
and	edx, 1
jz	short loc_42F662
and	[ebp+var_84], 0FFFFFFFEh

loc_42F662:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_42F75B
lea	ecx, [ebp+var_75]
call	sub_401EF0
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_C0]
mov	[ebp+var_C4], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_C4]
push	edx
lea	ecx, [ebp+var_74]
call	sub_402390
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	[ebp+var_98], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_98]
push	eax
lea	ecx, [ebp+var_48]
call	sub_403400
lea	ecx, [ebp+var_4C]
mov	[ebp+var_AC], ecx
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_A8]
mov	[ebp+var_9C], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_9C]
call	sub_4046E0
mov	eax, [ebp+var_AC]
push	eax
push	ecx
mov	[ebp+var_A4], esp
mov	ecx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
call	sub_4046E0
lea	ecx, [ebp+var_80]
push	ecx
mov	ecx, [ebp+var_B0]
call	sub_430400
lea	edx, [ebp+var_80]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_48]
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_74]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_75]
call	nullsub_1

loc_42F75B:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42F550 endp

align 10h


; Attributes: bp-based frame

sub_42F780 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 80h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_430B60
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_42F780 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_42F7B0(void *, int)
sub_42F7B0 proc	near

var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F4580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_42F810
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_42E290
mov	[ebp+var_40], eax
jmp	short loc_42F817

loc_42F810:
mov	[ebp+var_40], 0

loc_42F817:
mov	eax, [ebp+var_40]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_42F7B0 endp

align 10h


; Attributes: bp-based frame

sub_42F840 proc	near

var_80=	dword ptr -80h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_80]
add	ecx, 4
call	sub_42DB20
mov	esp, ebp
pop	ebp
retn
sub_42F840 endp

align 10h


; Attributes: bp-based frame

sub_42F860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_42F860 endp

align 10h


; Attributes: bp-based frame

sub_42F880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_42F880 endp

align 10h


; Attributes: bp-based frame

sub_42F8A0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_94]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_42F780
add	esp, 8
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_94]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_90], eax
mov	edx, [ebp+var_94]
mov	eax, [edx]
mov	[ebp+var_8C], eax
cmp	[ebp+var_8C], 0
jz	short loc_42F937
mov	ecx, [ebp+var_90]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_8C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_42F937:
mov	esp, ebp
pop	ebp
retn
sub_42F8A0 endp

align 10h


; Attributes: bp-based frame

sub_42F940 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_8], edx
mov	[ebp+var_C], 3FFFFFFFh
mov	[ebp+var_10], 3FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_42F978
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_42F97E

loc_42F978:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_42F97E:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_42F991
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_42F991:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 3FFFFFFFh
mov	[ebp+var_1C], 3FFFFFFFh
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_42F9C7
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_42F9CD

loc_42F9C7:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_42F9CD:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_42F9DD
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_42FA07

loc_42F9DD:
mov	[ebp+var_20], 3FFFFFFFh
mov	[ebp+var_24], 3FFFFFFFh
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_42F9FB
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_42FA01

loc_42F9FB:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_42FA01:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_42FA07:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_42F940 endp



; Attributes: bp-based frame

sub_42FA10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [eax+14h]
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_42FA10 endp

align 10h


; Attributes: bp-based frame

sub_42FA30 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
jmp	short loc_42FA44

loc_42FA3B:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_42FA44:
cmp	[ebp+arg_4], 0
jbe	short loc_42FAA8
lea	ecx, [ebp+var_1C]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_20]
call	sub_42E040
mov	[ebp+var_18], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	[eax+4], ecx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	short loc_42FA3B

loc_42FAA8:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_42FA30 endp

align 10h


; Attributes: bp-based frame

sub_42FAB0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42FAB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_642970
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_48]
call	sub_42FB70
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
push	0
lea	edx, [ebp+var_3D]
push	edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_4319D0
add	esp, 14h
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_42FAB0 endp

align 10h


; Attributes: bp-based frame

sub_42FB70 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42FB70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_4C7070
mov	ecx, [ebp+var_30]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 0Ch
mov	eax, [ebp+var_30]
add	edx, [eax]
mov	ecx, [ebp+var_30]
mov	[ecx+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_42FB70 endp

align 10h


; Attributes: bp-based frame

sub_42FC10 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_18], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_18]
jnz	short loc_42FC57
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_430CE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_42FD15

loc_42FC57:
cmp	[ebp+arg_10], 0
jnz	short loc_42FC9A
cmp	[ebp+arg_C], 0
jnz	short loc_42FC91
lea	edx, [ebp+var_6]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
or	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_42FC9A

loc_42FC91:
mov	[ebp+var_20], 1
jmp	short loc_42FCA1

loc_42FC9A:
mov	[ebp+var_20], 0

loc_42FCA1:
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_42FCB3
and	[ebp+var_C], 0FFFFFFFEh

loc_42FCB3:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_42FCE9
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_430CE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_42FCE7
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_42FCE7:
jmp	short loc_42FD15

loc_42FCE9:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_18]
call	sub_430CE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_42FD15
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_42FD15:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_18]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_18]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_18]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_42FC10 endp

align 10h


; Attributes: bp-based frame

sub_42FD60 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_18], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_18]
jnz	short loc_42FDA7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_430D90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_42FE60

loc_42FDA7:
cmp	[ebp+arg_10], 0
jnz	short loc_42FDE5
cmp	[ebp+arg_C], 0
jnz	short loc_42FDDC
lea	edx, [ebp+var_6]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
or	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+var_10]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_42FDE5

loc_42FDDC:
mov	[ebp+var_20], 1
jmp	short loc_42FDEC

loc_42FDE5:
mov	[ebp+var_20], 0

loc_42FDEC:
mov	dl, byte ptr [ebp+var_20]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_42FDFE
and	[ebp+var_C], 0FFFFFFFEh

loc_42FDFE:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_42FE34
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_18]
call	sub_430D90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_42FE32
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_42FE32:
jmp	short loc_42FE60

loc_42FE34:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_18]
call	sub_430D90
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_42FE60
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_42FE60:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_18]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_18]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_42FD60 endp

align 10h


; Attributes: bp-based frame

sub_42FEA0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_43009B
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_42FF09
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_431050
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4303BD

loc_42FF09:
lea	edx, [ebp+var_1E]
mov	[ebp+var_A4], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_54], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_54]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_42FF5F
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	loc_4303BD
jmp	loc_430096

loc_42FF5F:
lea	ecx, [ebp+var_1F]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_42FF9E
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4303BD

loc_42FF9E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_A0]
jnz	short loc_42FFE8
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	loc_4303BD

loc_42FFE8:
lea	edx, [ebp+var_21]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_43006B
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_430044
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	loc_4303BD
jmp	short loc_430069

loc_430044:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	loc_4303BD

loc_430069:
jmp	short loc_430096

loc_43006B:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_431050
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4303BD

loc_430096:
jmp	loc_4303BD

loc_43009B:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_430139
lea	ecx, [ebp+var_2E]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx+0Ch]
add	eax, 10h
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_2D], cl
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_430109
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	loc_4303BD
jmp	short loc_430134

loc_430109:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_431050
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4303BD

loc_430134:
jmp	loc_4303BD

loc_430139:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
lea	eax, [ebp+var_39]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_6], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_4301C2
lea	ecx, [ebp+var_3B]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_4C]
or	edx, 1
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4301C2
mov	[ebp+var_BC], 1
jmp	short loc_4301CC

loc_4301C2:
mov	[ebp+var_BC], 0

loc_4301CC:
mov	al, byte ptr [ebp+var_BC]
mov	[ebp+var_3A], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_4301E1
and	[ebp+var_4C], 0FFFFFFFEh

loc_4301E1:
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	short loc_430243
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_430219
mov	ecx, [ebp+var_C]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	loc_4303BD
jmp	short loc_43023E

loc_430219:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	loc_4303BD

loc_43023E:
jmp	loc_4303BD

loc_430243:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	ecx, [ebp+var_6]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_11], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_43029D
lea	eax, [ebp+var_3C]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_11], dl

loc_43029D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_4302FB
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4302FB
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_A0]
jz	short loc_4302EF
lea	eax, [ebp+var_3E]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_4C]
or	ecx, 2
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4302FB

loc_4302EF:
mov	[ebp+var_C8], 1
jmp	short loc_430305

loc_4302FB:
mov	[ebp+var_C8], 0

loc_430305:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_43031A
and	[ebp+var_4C], 0FFFFFFFDh

loc_43031A:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_430373
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_43034F
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	short loc_4303BD
jmp	short loc_430371

loc_43034F:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_430F00
mov	eax, [ebp+arg_0]
jmp	short loc_4303BD

loc_430371:
jmp	short loc_4303BD

loc_430373:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_430391
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4303BD
jmp	short loc_4303BD

loc_430391:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_431050
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4303BD:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_42FEA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4303D0(void *)
sub_4303D0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_42DB20
xor	ecx, ecx
and	ecx, 1
jz	short loc_4303FC
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4303FC:
mov	esp, ebp
pop	ebp
retn
sub_4303D0 endp



; Attributes: bp-based frame

sub_430400 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4305FB
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_430469
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4311F0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_43091D

loc_430469:
lea	edx, [ebp+var_1E]
mov	[ebp+var_A4], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_54], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_54]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4304BF
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	loc_43091D
jmp	loc_4305F6

loc_4304BF:
lea	ecx, [ebp+var_1F]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_4304FE
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_43091D

loc_4304FE:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_A0]
jnz	short loc_430548
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	loc_43091D

loc_430548:
lea	edx, [ebp+var_21]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4305CB
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4305A4
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	loc_43091D
jmp	short loc_4305C9

loc_4305A4:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	loc_43091D

loc_4305C9:
jmp	short loc_4305F6

loc_4305CB:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4311F0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_43091D

loc_4305F6:
jmp	loc_43091D

loc_4305FB:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_430699
lea	ecx, [ebp+var_2E]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx+0Ch]
add	eax, 10h
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_2D], cl
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_430669
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	loc_43091D
jmp	short loc_430694

loc_430669:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4311F0
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_43091D

loc_430694:
jmp	loc_43091D

loc_430699:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
lea	eax, [ebp+var_39]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_6], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_430722
lea	ecx, [ebp+var_3B]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_4C]
or	edx, 1
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_430722
mov	[ebp+var_BC], 1
jmp	short loc_43072C

loc_430722:
mov	[ebp+var_BC], 0

loc_43072C:
mov	al, byte ptr [ebp+var_BC]
mov	[ebp+var_3A], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_430741
and	[ebp+var_4C], 0FFFFFFFEh

loc_430741:
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	short loc_4307A3
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_430779
mov	ecx, [ebp+var_C]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	loc_43091D
jmp	short loc_43079E

loc_430779:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	loc_43091D

loc_43079E:
jmp	loc_43091D

loc_4307A3:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	ecx, [ebp+var_6]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_11], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_4307FD
lea	eax, [ebp+var_3C]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_11], dl

loc_4307FD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_43085B
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_43085B
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_A0]
jz	short loc_43084F
lea	eax, [ebp+var_3E]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_4C]
or	ecx, 2
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_43085B

loc_43084F:
mov	[ebp+var_C8], 1
jmp	short loc_430865

loc_43085B:
mov	[ebp+var_C8], 0

loc_430865:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_43087A
and	[ebp+var_4C], 0FFFFFFFDh

loc_43087A:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_4308D3
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4308AF
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	short loc_43091D
jmp	short loc_4308D1

loc_4308AF:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4316B0
mov	eax, [ebp+arg_0]
jmp	short loc_43091D

loc_4308D1:
jmp	short loc_43091D

loc_4308D3:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_4308F1
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_43091D
jmp	short loc_43091D

loc_4308F1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4311F0
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_43091D:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_430400 endp

align 10h


; Attributes: bp-based frame

sub_430930 proc	near

var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 30h
lea	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_2C]
mov	[ebp+var_14], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_14]
call	sub_4046E0

loc_430958:
lea	edx, [ebp+var_20]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_20]
setnz	cl
mov	[ebp+var_2D], cl
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_4309A5
mov	eax, [ebp+var_2C]
add	eax, 8
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
push	edx
call	[ebp+arg_C]
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_4309A5
lea	eax, [ebp+var_2C]
call	sub_405E90
jmp	short loc_430958

loc_4309A5:
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_430930 endp

align 10h


; Attributes: bp-based frame

sub_4309C0 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h
jmp	short loc_4309D0

loc_4309C8:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_4309D0:
lea	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setnz	dl
mov	[ebp+var_15], dl
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_430A31
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
push	eax
call	[ebp+arg_10]
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_430A2F
mov	edx, [ebp+arg_4]
add	edx, 8
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+8], edx
lea	eax, [ebp+arg_C]
call	sub_405E90

loc_430A2F:
jmp	short loc_4309C8

loc_430A31:
mov	ecx, [ebp+arg_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4309C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_430A50(int, int, void	*)
sub_430A50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
jmp	short loc_430A72

loc_430A69:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_430A72:
cmp	[ebp+var_4], 0
jle	short loc_430A9C
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+arg_8]
push	ecx		; void *
call	sub_431800
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 0Ch
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
add	eax, 0Ch
mov	[ebp+arg_8], eax
jmp	short loc_430A69

loc_430A9C:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_430A50 endp

align 10h


; Attributes: bp-based frame

sub_430AB0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_430AB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_4C7070
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_431980
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_430B4B

loc_430B0D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_430B2E
mov	edx, [ebp+var_3C]
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_430B2E:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_430B4B
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_430B4B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_430AB0 endp

align 10h


; Attributes: bp-based frame

sub_430B60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_431B50
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_430B60 endp

align 10h


; Attributes: bp-based frame

sub_430BA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	ecx, [ebp+arg_4]
call	sub_402CE0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
call	sub_404430
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
call	sub_402CE0
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
call	sub_404430
mov	[ebp+var_10], eax
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_430C00
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn
sub_430BA0 endp

align 10h


; Attributes: bp-based frame

sub_430C00 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_C]
sub	ecx, [ebp+arg_8]
sar	ecx, 1
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
lea	eax, [ebp+var_4]
push	eax
call	sub_405D40
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
jmp	short loc_430C60

loc_430C45:
mov	edx, [ebp+var_14]
add	edx, 2
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 2
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 1
mov	[ebp+var_1C], ecx

loc_430C60:
cmp	[ebp+var_1C], 0
jbe	short loc_430C94
mov	edx, [ebp+var_14]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+var_18]
movzx	edx, word ptr [ecx]
cmp	eax, edx
jz	short loc_430C92
mov	eax, [ebp+var_14]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_18]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	ecx, eax
setnl	dl
lea	edx, [edx+edx-1]
mov	[ebp+var_20], edx
jmp	short loc_430C9B

loc_430C92:
jmp	short loc_430C45

loc_430C94:
mov	[ebp+var_20], 0

loc_430C9B:
mov	eax, [ebp+var_20]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_430CAF
mov	ecx, [ebp+var_C]
mov	[ebp+var_28], ecx
jmp	short loc_430CD4

loc_430CAF:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jge	short loc_430CC0
mov	[ebp+var_2C], 0FFFFFFFFh
jmp	short loc_430CCE

loc_430CC0:
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_8]
setnle	cl
mov	[ebp+var_2C], ecx

loc_430CCE:
mov	edx, [ebp+var_2C]
mov	[ebp+var_28], edx

loc_430CD4:
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn
sub_430C00 endp

align 10h


; Attributes: bp-based frame

sub_430CE0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_430CE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_430E40
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_431BB0
add	esp, 8
jmp	short loc_430D5F

loc_430D2E:
cmp	[ebp+var_14], 0
jz	short loc_430D49
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_430D49:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_430D66
retn

loc_430D5F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_430D66:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_430CE0 endp



; Attributes: bp-based frame

sub_430D90 proc	near

var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_430D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_38], ecx
push	1
mov	ecx, [ebp+var_38]
call	sub_430EA0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_50E940
add	esp, 8
jmp	short loc_430E0F

loc_430DDE:
cmp	[ebp+var_14], 0
jz	short loc_430DF9
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_430DF9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_430E16
retn

loc_430E0F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_430E16:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_430D90 endp



; Attributes: bp-based frame

sub_430E40 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 0AAAAAAAh
jbe	short loc_430E68
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_430E68:
cmp	[ebp+arg_0], 0
jz	short loc_430E8E
mov	ecx, [ebp+arg_0]
imul	ecx, 18h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_430E95

loc_430E8E:
mov	[ebp+var_18], 0

loc_430E95:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_430E40 endp

align 10h


; Attributes: bp-based frame

sub_430EA0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 9249249h
jbe	short loc_430EC8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_430EC8:
cmp	[ebp+arg_0], 0
jz	short loc_430EEE
mov	ecx, [ebp+arg_0]
imul	ecx, 1Ch
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_430EF5

loc_430EEE:
mov	[ebp+var_18], 0

loc_430EF5:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_430EA0 endp

align 10h


; Attributes: bp-based frame

sub_430F00 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_18], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_18]
jnz	short loc_430F47
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_431C20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_431005

loc_430F47:
cmp	[ebp+arg_10], 0
jnz	short loc_430F8A
cmp	[ebp+arg_C], 0
jnz	short loc_430F81
lea	edx, [ebp+var_6]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
or	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_430F8A

loc_430F81:
mov	[ebp+var_20], 1
jmp	short loc_430F91

loc_430F8A:
mov	[ebp+var_20], 0

loc_430F91:
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_430FA3
and	[ebp+var_C], 0FFFFFFFEh

loc_430FA3:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_430FD9
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_431C20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_430FD7
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_430FD7:
jmp	short loc_431005

loc_430FD9:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_18]
call	sub_431C20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_431005
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_431005:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_18]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_18]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_18]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_430F00 endp

align 10h


; Attributes: bp-based frame

sub_431050 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_43106C:
cmp	[ebp+var_10], 0
jz	short loc_4310BD
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_11]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_34]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_4310AC
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_60], eax
jmp	short loc_4310B5

loc_4310AC:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_60], edx

loc_4310B5:
mov	eax, [ebp+var_60]
mov	[ebp+var_10], eax
jmp	short loc_43106C

loc_4310BD:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_43115F
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jz	short loc_431150
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_58]
call	sub_430F00
mov	[ebp+var_48], eax
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4311DF
jmp	short loc_43115F

loc_431150:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_43115F:
lea	ecx, [ebp+var_26]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_4311C4
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_58]
call	sub_430F00
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_4311DF

loc_4311C4:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_4311DF:
mov	esp, ebp
pop	ebp
retn	8
sub_431050 endp

align 10h


; Attributes: bp-based frame

sub_4311F0 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_43120C:
cmp	[ebp+var_10], 0
jz	short loc_43125D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_11]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_34]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_43124C
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_60], eax
jmp	short loc_431255

loc_43124C:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_60], edx

loc_431255:
mov	eax, [ebp+var_60]
mov	[ebp+var_10], eax
jmp	short loc_43120C

loc_43125D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_4312FF
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jz	short loc_4312F0
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_58]
call	sub_4316B0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_43137F
jmp	short loc_4312FF

loc_4312F0:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_4312FF:
lea	ecx, [ebp+var_26]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_431364
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_58]
call	sub_4316B0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_43137F

loc_431364:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_43137F:
mov	esp, ebp
pop	ebp
retn	8
sub_4311F0 endp

align 10h


; Attributes: bp-based frame

sub_431390 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_28], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_28]
jnz	short loc_4313D7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_5F44D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_431496

loc_4313D7:
cmp	[ebp+arg_10], 0
jnz	short loc_43141B
cmp	[ebp+arg_C], 0
jnz	short loc_431412
lea	edx, [ebp+var_6]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_C]
or	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_43141B

loc_431412:
mov	[ebp+var_30], 1
jmp	short loc_431422

loc_43141B:
mov	[ebp+var_30], 0

loc_431422:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_431434
and	[ebp+var_C], 0FFFFFFFEh

loc_431434:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_43146A
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_28]
call	sub_5F44D0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_431468
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_431468:
jmp	short loc_431496

loc_43146A:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_28]
call	sub_5F44D0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_431496
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_431496:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_28]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_28]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_28]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_431390 endp

align 10h


; Attributes: bp-based frame

sub_4314E0 proc	near

var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_431508:
cmp	[ebp+var_10], 0
jz	short loc_431566
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_11]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_43154F
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_94], ecx
jmp	short loc_43155B

loc_43154F:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_94], eax

loc_43155B:
mov	ecx, [ebp+var_94]
mov	[ebp+var_10], ecx
jmp	short loc_431508

loc_431566:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_431614
mov	eax, [ebp+var_8C]
mov	ecx, [eax+8]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_54]
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_54]
setz	cl
mov	[ebp+var_95], cl
movzx	edx, [ebp+var_95]
test	edx, edx
jz	short loc_431605
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_431390
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_4316A1
jmp	short loc_431614

loc_431605:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_431614:
lea	edx, [ebp+var_26]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_431686
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_431390
mov	[ebp+var_88], eax
mov	edx, [ebp+var_88]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_4316A1

loc_431686:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_4316A1:
mov	esp, ebp
pop	ebp
retn	8
sub_4314E0 endp

align 10h


; Attributes: bp-based frame

sub_4316B0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_18], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_18]
jnz	short loc_4316F7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_431CD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_4317B5

loc_4316F7:
cmp	[ebp+arg_10], 0
jnz	short loc_43173A
cmp	[ebp+arg_C], 0
jnz	short loc_431731
lea	edx, [ebp+var_6]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
or	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_43173A

loc_431731:
mov	[ebp+var_20], 1
jmp	short loc_431741

loc_43173A:
mov	[ebp+var_20], 0

loc_431741:
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_431753
and	[ebp+var_C], 0FFFFFFFEh

loc_431753:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_431789
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_431CD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_431787
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_431787:
jmp	short loc_4317B5

loc_431789:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_18]
call	sub_431CD0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4317B5
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_4317B5:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_18]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_18]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_18]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4316B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_431800(void *, int)
sub_431800 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_43185F
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_C]
call	sub_4799C0
mov	ecx, [ebp+var_C]
mov	[ebp+var_38], ecx
jmp	short loc_431866

loc_43185F:
mov	[ebp+var_38], 0

loc_431866:
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	esp, ebp
pop	ebp
retn
sub_431800 endp



; Attributes: bp-based frame

sub_431870 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_431870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4318C7

loc_4318B5:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_14], eax

loc_4318C7:
cmp	[ebp+var_18], 0
jle	short loc_4318DF
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_42F7B0
add	esp, 8
jmp	short loc_4318B5

loc_4318DF:
jmp	short loc_431909

loc_4318E1:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_431930
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_431910
retn

loc_431909:
mov	[ebp+var_4], 0FFFFFFFFh

loc_431910:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_431870 endp

align 10h


; Attributes: bp-based frame

sub_431930 proc	near

var_5C=	dword ptr -5Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_5C], ecx
jmp	short loc_43194C

loc_431943:
mov	edx, [ebp+var_5C]
add	edx, 0Ch
mov	[ebp+var_5C], edx

loc_43194C:
mov	eax, [ebp+var_5C]
cmp	eax, [ebp+arg_4]
jz	short loc_431976
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_5C]
call	sub_42DCA0
xor	edx, edx
and	edx, 1
jz	short loc_431974
mov	eax, [ebp+var_5C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_431974:
jmp	short loc_431943

loc_431976:
mov	esp, ebp
pop	ebp
retn
sub_431930 endp

align 10h


; Attributes: bp-based frame

sub_431980 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4319D0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_431980 endp

align 10h


; Attributes: bp-based frame

sub_4319D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4319D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_431A1E

loc_431A15:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_431A1E:
cmp	[ebp+var_18], 0
jle	short loc_431A48
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_42F7B0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 0Ch
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_14], eax
jmp	short loc_431A15

loc_431A48:
mov	eax, [ebp+var_14]
jmp	short loc_431A7C

loc_431A4D:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_431930
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_431A7C
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_431A7C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4319D0 endp

align 10h


; Attributes: bp-based frame

sub_431A90 proc	near

var_28=	dword ptr -28h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_431A90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_431ADF

loc_431ACD:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax

loc_431ADF:
cmp	[ebp+var_18], 0
jle	short loc_431AF7
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
jmp	short loc_431ACD

loc_431AF7:
jmp	short loc_431B34

loc_431AF9:
xor	eax, eax
mov	[ebp+var_21], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_28], ecx
jmp	short loc_431B0F

loc_431B06:
mov	edx, [ebp+var_28]
add	edx, 4
mov	[ebp+var_28], edx

loc_431B0F:
mov	eax, [ebp+var_28]
cmp	eax, [ebp+var_14]
jz	short loc_431B1E
xor	ecx, ecx
mov	[ebp+var_22], cl
jmp	short loc_431B06

loc_431B1E:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_431B3B
retn

loc_431B34:
mov	[ebp+var_4], 0FFFFFFFFh

loc_431B3B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_431A90 endp

align 10h


; Attributes: bp-based frame

sub_431B50 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
jmp	short loc_431B61

loc_431B58:
mov	eax, [ebp+arg_0]
sub	eax, 0Ch
mov	[ebp+arg_0], eax

loc_431B61:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_431BA4
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 0Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_42DCA0
xor	ecx, ecx
and	ecx, 1
jz	short loc_431BA2
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_431BA2:
jmp	short loc_431B58

loc_431BA4:
mov	esp, ebp
pop	ebp
retn
sub_431B50 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_431BB0(void *, int)
sub_431BB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_431C01
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_431C08

loc_431C01:
mov	[ebp+var_10], 0

loc_431C08:
mov	eax, [ebp+var_10]
mov	[ebp+var_8], eax
mov	esp, ebp
pop	ebp
retn
sub_431BB0 endp

align 10h


; Attributes: bp-based frame

sub_431C20 proc	near

var_50=	dword ptr -50h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_431C20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 40h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_50], ecx
push	1
mov	ecx, [ebp+var_50]
call	sub_43A200
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4321C0
add	esp, 8
jmp	short loc_431C9F

loc_431C6E:
cmp	[ebp+var_14], 0
jz	short loc_431C89
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_431C89:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_431CA6
retn

loc_431C9F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_431CA6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_431C20 endp



; Attributes: bp-based frame

sub_431CD0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_431CD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4517E0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_432260
add	esp, 8
jmp	short loc_431D4F

loc_431D1E:
cmp	[ebp+var_14], 0
jz	short loc_431D39
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_431D39:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_431D56
retn

loc_431D4F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_431D56:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_431CD0 endp



; Attributes: bp-based frame

sub_431D80 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_62=	byte ptr -62h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_9C]
jz	loc_431FE9
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_9C]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 2
cmp	[ebp+var_4], eax
jbe	short loc_431E1F
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_432300
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_9C]
call	sub_4B80F0
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_9C]
mov	[ecx+8], eax
jmp	loc_431FD2

loc_431E1F:
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_9C]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
cmp	ecx, [ebp+var_4]
jb	loc_431EE0
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_60], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_60]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_5C]
sub	edx, [ebp+var_50]
sar	edx, 2
mov	[ebp+var_4C], edx
jmp	short loc_431E80

loc_431E77:
mov	eax, [ebp+var_4C]
sub	eax, 1
mov	[ebp+var_4C], eax

loc_431E80:
cmp	[ebp+var_4C], 0
jle	short loc_431EA4
mov	ecx, [ebp+var_54]
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_50]
add	ecx, 4
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_54]
add	edx, 4
mov	[ebp+var_54], edx
jmp	short loc_431E77

loc_431EA4:
mov	eax, [ebp+var_54]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_61], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_68], ecx
jmp	short loc_431ECC

loc_431EC3:
mov	edx, [ebp+var_68]
add	edx, 4
mov	[ebp+var_68], edx

loc_431ECC:
mov	eax, [ebp+var_68]
cmp	eax, [ebp+var_6C]
jz	short loc_431EDB
xor	ecx, ecx
mov	[ebp+var_62], cl
jmp	short loc_431EC3

loc_431EDB:
jmp	loc_431FD2

loc_431EE0:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_9C]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_84], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_80]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_84]
sub	eax, [ebp+var_78]
sar	eax, 2
mov	[ebp+var_74], eax
jmp	short loc_431F46

loc_431F3D:
mov	ecx, [ebp+var_74]
sub	ecx, 1
mov	[ebp+var_74], ecx

loc_431F46:
cmp	[ebp+var_74], 0
jle	short loc_431F6A
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_78]
add	edx, 4
mov	[ebp+var_78], edx
mov	eax, [ebp+var_7C]
add	eax, 4
mov	[ebp+var_7C], eax
jmp	short loc_431F3D

loc_431F6A:
xor	ecx, ecx
mov	[ebp+var_13], cl
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
mov	[ebp+var_98], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_9C]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
lea	edx, [ecx+edx*4]
mov	[ebp+var_90], edx
push	0
lea	eax, [ebp+var_89]
push	eax
mov	ecx, [ebp+var_98]
push	ecx
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_90]
push	eax
call	sub_432000
add	esp, 14h

loc_431FD2:
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_9C]
mov	[edx+4], ecx

loc_431FE9:
mov	eax, [ebp+var_9C]
mov	esp, ebp
pop	ebp
retn	4
sub_431D80 endp

align 10h


; Attributes: bp-based frame

sub_432000 proc	near

var_28=	dword ptr -28h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_432046

loc_43203D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_432046:
cmp	[ebp+var_18], 0
jle	short loc_432070
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4B6FE0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax
jmp	short loc_43203D

loc_432070:
mov	eax, [ebp+var_14]
jmp	short loc_4320B7

loc_432075:
xor	ecx, ecx
mov	[ebp+var_21], cl
mov	edx, [ebp+arg_8]
mov	[ebp+var_28], edx
jmp	short loc_43208B

loc_432082:
mov	eax, [ebp+var_28]
add	eax, 4
mov	[ebp+var_28], eax

loc_43208B:
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_14]
jz	short loc_43209A
xor	edx, edx
mov	[ebp+var_22], dl
jmp	short loc_432082

loc_43209A:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4320B7
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4320B7:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_432000 endp

align 10h


; Attributes: bp-based frame

sub_4320D0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4320D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 80h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_432109:
cmp	[ebp+var_14], 0
jz	loc_4321AB
lea	ecx, [ebp+var_41]
call	sub_401EF0
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	[ebp+var_8C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_8C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_407810
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_48], eax
lea	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+var_48]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_15], al
lea	ecx, [ebp+var_40]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	ecx, [ebp+var_15]
test	ecx, ecx
jz	short loc_43219D
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4321A6

loc_43219D:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4321A6:
jmp	loc_432109

loc_4321AB:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4320D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4321C0(void *, int)
sub_4321C0 proc	near

var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F4580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_432233
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_42FAB0
mov	eax, [ebp+var_18]
mov	[ebp+var_40], eax
jmp	short loc_43223A

loc_432233:
mov	[ebp+var_40], 0

loc_43223A:
mov	ecx, [ebp+var_40]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4321C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_432260(void *, int)
sub_432260 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F4580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4322D3
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_403400
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
jmp	short loc_4322DA

loc_4322D3:
mov	[ebp+var_1C], 0

loc_4322DA:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432260 endp

align 10h


; Attributes: bp-based frame

sub_432300 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4323B0
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_43239B

loc_43235D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_43237E
mov	edx, [ebp+var_3C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_43237E:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_43239B
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_43239B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_432300 endp

align 10h


; Attributes: bp-based frame

sub_4323B0 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_432000
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_4323B0 endp

align 10h


; Attributes: bp-based frame

sub_432400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1783h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_432400 endp

align 10h


; Attributes: bp-based frame

sub_432430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1784h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_432430 endp

align 10h


; Attributes: bp-based frame

sub_432460 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1104760
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_432485
push	14h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_432485:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_432460 endp

align 10h


; Attributes: bp-based frame

sub_432490 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432490
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 0Bh
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 0Ch
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432490 endp

align 10h


; Attributes: bp-based frame

sub_432580 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4892A0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432580 endp

align 10h


; Attributes: bp-based frame

sub_4325E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4325E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
add	eax, 30h
push	eax
mov	ecx, [ebp+arg_0]
call	sub_77FF00
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4325E0 endp

align 10h


; Attributes: bp-based frame

sub_432640 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432640
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_20], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 0Ch
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432640 endp

align 10h


; Attributes: bp-based frame

sub_4326C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4326C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4326C0 endp

align 10h


; Attributes: bp-based frame

sub_432710 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
add	ecx, 40h
call	sub_43E870
mov	eax, [ebp+var_14]
add	eax, 40h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432710 endp

align 10h


; Attributes: bp-based frame

sub_432770 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_10]
call	sub_43E8E0
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_42E0F0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432770 endp

align 10h


; Attributes: bp-based frame

sub_4327E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_43FBD0
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_4075A0
mov	esp, ebp
pop	ebp
retn
sub_4327E0 endp

align 10h


; Attributes: bp-based frame

sub_432810 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_21 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_432833
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_432833:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_432810 endp

align 10h
; [00000021 BYTES: COLLAPSED FUNCTION DNameNode::DNameNode(void). PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_432870 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 4
jz	short loc_432883
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 3
jnz	short loc_43288C

loc_432883:
mov	eax, 1
jmp	short loc_43288E
jmp	short loc_43288E

loc_43288C:
xor	eax, eax

loc_43288E:
pop	ebp
retn
sub_432870 endp



; Attributes: bp-based frame

sub_432890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_4328B6
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 1
jnz	short loc_4328AD
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+4], 0
jz	short loc_4328B6

loc_4328AD:
mov	[ebp+var_4], 1
jmp	short loc_4328BD

loc_4328B6:
mov	[ebp+var_4], 0

loc_4328BD:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_432890 endp

align 10h


; Attributes: bp-based frame

sub_4328D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
cmp	[ebp+arg_4], 0FFFFD8F0h
jle	loc_432983
cmp	[ebp+arg_4], 0
jle	short loc_432929
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	edx, [ebp+arg_4]
lea	eax, [ecx+edx*8-8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+1Ch]
jnb	short loc_432917
mov	eax, [ebp+arg_8]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_4]
jmp	loc_432A3D
jmp	short loc_432927

loc_432917:
mov	ecx, [ebp+arg_8]
mov	dword ptr [ecx], 1
xor	eax, eax
jmp	loc_432A3D

loc_432927:
jmp	short loc_43297E

loc_432929:
cmp	[ebp+arg_4], 0
jge	short loc_43296E
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*8]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
cmp	ecx, [eax+20h]
jb	short loc_43295C
mov	edx, [ebp+arg_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
jmp	loc_432A3D
jmp	short loc_43296C

loc_43295C:
mov	eax, [ebp+arg_8]
mov	dword ptr [eax], 1
xor	eax, eax
jmp	loc_432A3D

loc_43296C:
jmp	short loc_43297E

loc_43296E:
mov	ecx, [ebp+arg_8]
mov	dword ptr [ecx], 1
xor	eax, eax
jmp	loc_432A3D

loc_43297E:
jmp	loc_432A3D

loc_432983:
cmp	[ebp+arg_4], 0FFFFD8F0h
jnz	short loc_4329A0
mov	edx, [ebp+arg_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+arg_0]
add	eax, 38h
jmp	loc_432A3D

loc_4329A0:
cmp	[ebp+arg_4], 0FFFFD8EEh
jnz	short loc_4329BD
mov	eax, [ebp+arg_8]
mov	dword ptr [eax], 0
mov	eax, [ebp+arg_0]
add	eax, 30h
jmp	loc_432A3D

loc_4329BD:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+20h]
sub	edx, 8
mov	[ebp+var_C], edx
cmp	[ebp+arg_4], 0FFFFD8EEh
jge	short loc_432A10
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0Ah
jnz	short loc_432A03
mov	ecx, [ebp+arg_8]
mov	dword ptr [ecx], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	ecx, [eax-4]
add	ecx, 14h
mov	[ebp+var_10], ecx
mov	edx, 0FFFFD8EEh
sub	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
lea	eax, [eax+edx*8-8]
jmp	short loc_432A3D

loc_432A03:
mov	ecx, [ebp+arg_8]
mov	dword ptr [ecx], 1
xor	eax, eax
jmp	short loc_432A3D

loc_432A10:
cmp	[ebp+arg_4], 0FFFFD8EFh
jnz	short loc_432A32
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0Ah
jnz	short loc_432A32
mov	eax, [ebp+arg_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_C]
mov	eax, [ecx+4]
jmp	short loc_432A3D

loc_432A32:
mov	edx, [ebp+arg_8]
mov	dword ptr [edx], 1
xor	eax, eax

loc_432A3D:
mov	esp, ebp
pop	ebp
retn
sub_4328D0 endp

align 10h


; Attributes: bp-based frame

sub_432A50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
cmp	[ebp+arg_4], 0FFFFD8F0h
jnz	short loc_432A6A
mov	eax, [ebp+arg_0]
add	eax, 38h
jmp	loc_432B14

loc_432A6A:
cmp	[ebp+arg_4], 0FFFFD8EEh
jnz	short loc_432A7E
mov	eax, [ebp+arg_0]
add	eax, 30h
jmp	loc_432B14

loc_432A7E:
cmp	[ebp+arg_4], 0FFFFD8EEh
jge	short loc_432ABF
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
sub	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0Ah
jnz	short loc_432ABB
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	edx, [ecx-4]
add	edx, 14h
mov	[ebp+var_10], edx
mov	eax, 0FFFFD8EEh
sub	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
lea	eax, [ecx+eax*8-8]
jmp	short loc_432B14

loc_432ABB:
xor	eax, eax
jmp	short loc_432B14

loc_432ABF:
cmp	[ebp+arg_4], 0FFFFD8EFh
jnz	short loc_432AE4
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
sub	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0Ah
jnz	short loc_432AE4
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
jmp	short loc_432B14

loc_432AE4:
cmp	[ebp+arg_4], 0
jle	short loc_432AFC
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	edx, [ebp+arg_4]
lea	eax, [ecx+edx*8-8]
mov	[ebp+var_14], eax
jmp	short loc_432B0B

loc_432AFC:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	eax, [ebp+arg_4]
lea	ecx, [edx+eax*8]
mov	[ebp+var_14], ecx

loc_432B0B:
mov	edx, [ebp+var_14]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]

loc_432B14:
mov	esp, ebp
pop	ebp
retn
sub_432A50 endp

align 10h


; Attributes: bp-based frame

sub_432B20 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_432B47
xor	eax, eax
jmp	short loc_432B64

loc_432B47:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 1
jnz	short loc_432B5A
mov	[ebp+var_1C], 1
jmp	short loc_432B61
jmp	short loc_432B61

loc_432B5A:
mov	[ebp+var_1C], 0

loc_432B61:
mov	eax, [ebp+var_1C]

loc_432B64:
mov	esp, ebp
pop	ebp
retn
sub_432B20 endp

align 10h


; Attributes: bp-based frame

sub_432B70 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_432B97
xor	eax, eax
jmp	short loc_432BB4

loc_432B97:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jnz	short loc_432BAA
mov	[ebp+var_1C], 1
jmp	short loc_432BB1
jmp	short loc_432BB1

loc_432BAA:
mov	[ebp+var_1C], 0

loc_432BB1:
mov	eax, [ebp+var_1C]

loc_432BB4:
mov	esp, ebp
pop	ebp
retn
sub_432B70 endp

align 10h


; Attributes: bp-based frame

sub_432BC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 1
mov	edx, [ebp+var_4]
add	edx, 8
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
mov	esp, ebp
pop	ebp
retn
sub_432BC0 endp

align 10h


; Attributes: bp-based frame

sub_432BF0 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_432C17
xor	eax, eax
jmp	short loc_432C43

loc_432C17:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_432C39
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 1
jnz	short loc_432C30
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+4], 0
jz	short loc_432C39

loc_432C30:
mov	[ebp+var_1C], 1
jmp	short loc_432C40

loc_432C39:
mov	[ebp+var_1C], 0

loc_432C40:
mov	eax, [ebp+var_1C]

loc_432C43:
mov	esp, ebp
pop	ebp
retn
sub_432BF0 endp

align 10h


; Attributes: bp-based frame

sub_432C50 proc	near

var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_432A50
add	esp, 8
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
sub	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
sub	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_8194A0
add	esp, 10h
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	[ebp+var_20], ecx
mov	edx, 2
shl	edx, 3
mov	eax, [ebp+var_20]
mov	ecx, [eax]
sub	ecx, edx
mov	edx, [ebp+var_20]
mov	[edx], ecx
mov	esp, ebp
pop	ebp
retn
sub_432C50 endp

align 10h


; Attributes: bp-based frame

sub_432CC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_819A80
add	esp, 10h
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
mov	esp, ebp
pop	ebp
retn
sub_432CC0 endp

align 10h


; Attributes: bp-based frame

sub_432D10 proc	near

var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_432A50
add	esp, 8
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
sub	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_819850
add	esp, 10h
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jnz	short loc_432D8B
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	[ebp+var_20], ecx
mov	edx, 2
shl	edx, 3
mov	eax, [ebp+var_20]
mov	ecx, [eax]
sub	ecx, edx
mov	edx, [ebp+var_20]
mov	[edx], ecx
xor	eax, eax
jmp	short loc_432D90

loc_432D8B:
mov	eax, 1

loc_432D90:
mov	esp, ebp
pop	ebp
retn
sub_432D10 endp

align 10h


; Attributes: bp-based frame

sub_432DA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_432DC7
xor	eax, eax
jmp	short loc_432DD7

loc_432DC7:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_819890
add	esp, 8

loc_432DD7:
mov	esp, ebp
pop	ebp
retn
sub_432DA0 endp

align 10h


; Attributes: bp-based frame

sub_432DE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432DE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432DE0 endp

align 10h


; Attributes: bp-based frame

sub_432E30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10EFB90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_432E53
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_432E53:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_432E30 endp

align 10h


; Attributes: bp-based frame

sub_432E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+0ECh], 0
jl	short loc_432EAA
mov	eax, [ebp+var_4]
add	eax, 0ACh
call	sub_412510
mov	ecx, [ebp+var_4]
cmp	[ecx+0ECh], eax
jge	short loc_432EAA
mov	eax, [ebp+var_4]
add	eax, 0ACh
mov	edx, [ebp+var_4]
mov	edx, [edx+0ECh]
call	sub_417900
call	sub_420D20
jmp	short loc_432EAC
jmp	short loc_432EAC

loc_432EAA:
xor	eax, eax

loc_432EAC:
mov	esp, ebp
pop	ebp
retn
sub_432E60 endp



; Attributes: bp-based frame

sub_432EB0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_8], ecx
mov	[ebp+var_4], edx
fld	[ebp+var_8]
mov	eax, [ebp+arg_4]
fsub	dword ptr [eax]
fstp	[ebp+var_8]
fld	[ebp+var_4]
mov	ecx, [ebp+arg_4]
fsub	dword ptr [ecx+4]
fstp	[ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_432EB0 endp

align 10h


; Attributes: bp-based frame

sub_432F00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax]
mov	ecx, [ebp+var_4]
fmul	dword ptr [ecx]
mov	edx, [ebp+var_4]
fld	dword ptr [edx+4]
mov	eax, [ebp+var_4]
fmul	dword ptr [eax+4]
faddp	st(1), st
fstp	[ebp+var_8]
fld	[ebp+var_8]
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_40F5D0
add	esp, 4
mov	esp, ebp
pop	ebp
retn
sub_432F00 endp

align 10h


; Attributes: bp-based frame

sub_432F40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 0B4h
call	sub_422EC0
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
call	sub_417FB0
mov	esp, ebp
pop	ebp
retn
sub_432F40 endp

align 10h


; Attributes: bp-based frame

sub_432F70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432F70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_438C80
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_432F70 endp

align 10h


; Attributes: bp-based frame

sub_432FE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10F6850
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_433003
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_433003:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_432FE0 endp

align 10h


; Attributes: bp-based frame

sub_433010 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433010
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407640
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_433056
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_433056:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_433010 endp

align 10h


; Attributes: bp-based frame

sub_433070 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
add	edx, 0Ch
mov	eax, dword_17EE12C
mov	[edx], eax
mov	ecx, dword_17EE130
mov	[edx+4], ecx
mov	eax, dword_17EE134
mov	[edx+8], eax
mov	ecx, dword_17EE138
mov	[edx+0Ch], ecx
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_20], eax
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
add	eax, 1Ch
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_18]
add	eax, 8
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], 0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
call	nullsub_1
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+28h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433070 endp

align 10h


; Attributes: bp-based frame

sub_433150 proc	near

var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433150
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_433070
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+2Ch], 0Ah
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+30h], xmm0
mov	edx, [ebp+var_1C]
mov	byte ptr [edx+34h], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+38h], 0
mov	dword ptr [eax+3Ch], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433150 endp

align 10h


; Attributes: bp-based frame

sub_4331D0 proc	near

var_68=	dword ptr -68h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4331D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
add	ecx, 1Ch
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4331D0 endp

align 10h


; Attributes: bp-based frame

sub_433220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	esp, ebp
pop	ebp
retn
sub_433220 endp

align 10h


; Attributes: bp-based frame

sub_433240 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433240
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4393E0
mov	byte ptr [ebp+var_4], 1
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433240 endp

align 10h


; Attributes: bp-based frame

sub_4332A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 139Ch
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E020
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+0Ch], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4332A0 endp

align 10h


; Attributes: bp-based frame

sub_433310 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_20], ecx
mov	ecx, 1389h
mov	eax, [ebp+var_20]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_155E024
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 8
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_2C], eax
mov	eax, [ebp+var_2C]
mov	[ebp+var_30], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 20h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	edx, [ebp+var_20]
add	edx, 44h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_20]
mov	byte ptr [edx+38h], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+3Ch], 0FFFFFFFFh
mov	ecx, [ebp+var_20]
mov	byte ptr [ecx+40h], 0
push	offset aId_2	; "id"
mov	ecx, [ebp+var_20]
add	ecx, 20h
call	sub_402310
mov	edx, [ebp+var_20]
mov	dword ptr [edx+44h], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+48h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433310 endp

align 10h


; Attributes: bp-based frame

sub_433420 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433420
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_433486
push	4Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_433486:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_433420 endp

align 10h


; Attributes: bp-based frame

sub_4334A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433420
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4334A0 endp

align 10h


; Attributes: bp-based frame

sub_433500 proc	near

var_3C=	dword ptr -3Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_3C], ecx
mov	ecx, 13A4h
mov	eax, [ebp+var_3C]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], offset	off_155E028
mov	ecx, [ebp+var_3C]
add	ecx, 8
call	sub_4370B0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+20h], 0FFFFFFFFh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433500 endp

align 10h


; Attributes: bp-based frame

sub_433570 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433680
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4335F2
push	24h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4335F2:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_433570 endp

align 10h


; Attributes: bp-based frame

sub_433610 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433610
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433610 endp

align 10h


; Attributes: bp-based frame

sub_433680 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433680
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433680 endp

align 10h


; Attributes: bp-based frame

sub_433700 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433700
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_1C], 0
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_20], eax
cmp	[ebp+var_24], 0
jz	short loc_433748
mov	[ebp+var_2C], 0
jmp	short loc_433770

loc_433748:
mov	eax, [ebp+var_20]
cmp	dword ptr [eax], 4
jz	short loc_433758
mov	ecx, [ebp+var_20]
cmp	dword ptr [ecx], 3
jnz	short loc_433763

loc_433758:
mov	[ebp+var_28], 1
jmp	short loc_43376A
jmp	short loc_43376A

loc_433763:
mov	[ebp+var_28], 0

loc_43376A:
mov	edx, [ebp+var_28]
mov	[ebp+var_2C], edx

loc_433770:
cmp	[ebp+var_2C], 0
jz	short loc_4337EE
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_81ABE0
add	esp, 0Ch
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_15]
call	sub_401EF0
mov	[ebp+var_44], eax
mov	eax, [ebp+var_44]
mov	[ebp+var_3C], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_4079A0
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_14]
add	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_407CA0
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_1C]
or	edx, 1
mov	[ebp+var_1C], edx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_15]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_43382A
jmp	short loc_43382A

loc_4337EE:
lea	ecx, [ebp+var_16]
call	sub_401EF0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_48]
mov	[ebp+var_4C], eax
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_4C]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_4022A0
mov	edx, [ebp+var_1C]
or	edx, 1
mov	[ebp+var_1C], edx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_16]
call	nullsub_1
mov	eax, [ebp+arg_0]

loc_43382A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433700 endp

align 10h


; Attributes: bp-based frame

sub_433840 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81ACD0
add	esp, 0Ch
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_43387E
mov	[ebp+var_1C], 0
jmp	short loc_4338AD

loc_43387E:
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_4338A0
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 1
jnz	short loc_433897
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+4], 0
jz	short loc_4338A0

loc_433897:
mov	[ebp+var_20], 1
jmp	short loc_4338A7

loc_4338A0:
mov	[ebp+var_20], 0

loc_4338A7:
mov	edx, [ebp+var_20]
mov	[ebp+var_1C], edx

loc_4338AD:
xor	eax, eax
cmp	[ebp+var_1C], 0
setnz	al
mov	esp, ebp
pop	ebp
retn
sub_433840 endp

align 10h


; Attributes: bp-based frame

sub_4338C0 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4338C0 endp



; Attributes: bp-based frame

sub_433910 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433910
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_2C], ecx
mov	ecx, 7DAh
mov	eax, [ebp+var_2C]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_2C]
mov	dword ptr [eax], offset	off_155E048
lea	ecx, [ebp+var_D]
mov	[ebp+var_30], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_2C]
add	edx, 8
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	[eax+10h], ecx
mov	edx, [ebp+var_20]
add	edx, 14h
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	byte ptr [ebp+var_4], 3
push	10h
mov	ecx, [ebp+var_20]
call	sub_4407A0
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_20]
call	sub_439260
mov	byte ptr [ebp+var_4], 6
lea	edx, [ebp+var_E]
mov	[ebp+var_34], edx
mov	byte ptr [ebp+var_4], 7
mov	eax, [ebp+var_2C]
add	eax, 24h
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_28]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_28]
add	eax, 8
mov	[ebp+var_24], eax
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 0Ch
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433910 endp

align 10h


; Attributes: bp-based frame

sub_433A00 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433AA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 54h
mov	[ebp+var_60], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_60]
add	ecx, 24h
call	sub_437500
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
add	eax, 8
mov	[ebp+var_5C], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_5C]
call	sub_4392A0
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_60]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_433A7E
push	34h
mov	edx, [ebp+var_60]
push	edx
call	sub_1111040
add	esp, 8

loc_433A7E:
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_433A00 endp

align 10h


; Attributes: bp-based frame

sub_433AA0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433AA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 54h
mov	[ebp+var_60], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_60]
add	ecx, 24h
call	sub_437500
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
add	eax, 8
mov	[ebp+var_5C], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_5C]
call	sub_4392A0
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_60]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433AA0 endp

align 10h
; [000000A4 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_433BD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	??1strstreambuf@@UAE@XZ	; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_433BF5
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_433BF5:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_433BD0 endp

align 10h


; Attributes: bp-based frame

sub_433C00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433C00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4396E0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433C00 endp

align 10h


; Attributes: bp-based frame

sub_433C70 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433C70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	ecx, 2AFDh
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_155E02C
mov	ecx, [ebp+var_18]
add	ecx, 60h
call	sub_10FB830
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_18]
add	ecx, 0A0h
mov	[ebp+var_10], ecx
xor	edx, edx
mov	eax, [ebp+var_10]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_10]
mov	[edx+2], cx
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+88h], 0
mov	edx, [ebp+var_18]
mov	byte ptr [edx+21h], 0
mov	eax, [ebp+var_18]
mov	byte ptr [eax+1Ch], 0
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+1Dh], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+84h], 1
mov	eax, [ebp+var_18]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+50h], xmm0
mov	ecx, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+30h], xmm0
mov	edx, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+2Ch], xmm0
mov	eax, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+28h], xmm0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+58h], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+5Ch], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+10h], 0
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+3Ch], xmm0
mov	eax, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+38h], xmm0
mov	ecx, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+34h], xmm0
mov	edx, [ebp+var_18]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+40h], xmm0
mov	eax, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+4Ch], xmm0
mov	ecx, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+48h], xmm0
mov	edx, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+44h], xmm0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+18h], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+7Ch], 0
mov	edx, [ebp+var_18]
mov	byte ptr [edx+80h], 1
mov	eax, [ebp+var_18]
mov	byte ptr [eax+81h], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+90h], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+8Ch], 0
mov	eax, [ebp+var_18]
mov	byte ptr [eax+1Fh], 0
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+1Eh], 0
mov	edx, [ebp+var_18]
mov	byte ptr [edx+20h], 0
mov	eax, [ebp+var_18]
mov	byte ptr [eax+89h], 0
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+94h], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+98h], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	dword ptr [eax+9Ch], 0
mov	ecx, [ebp+var_18]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+54h], xmm0
mov	edx, [ebp+var_18]
add	edx, 0A0h
mov	[ebp+var_14], edx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_14]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_14]
mov	[edx], ax
mov	eax, [ebp+var_18]
mov	dword ptr [eax+24h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433C70 endp

align 10h
; [0000007E BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000033 BYTES: COLLAPSED FUNCTION sub_433F80. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_433FC0 proc	near

var_68=	dword ptr -68h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
add	ecx, 1Ch
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_433FC0 endp

align 10h


; Attributes: bp-based frame

sub_434010 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_440360
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_434010 endp

align 10h


; Attributes: bp-based frame

sub_434080 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434080
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
add	ecx, 98h
call	sub_437750
mov	eax, [ebp+var_18]
add	eax, 98h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434080 endp

align 10h


; Attributes: bp-based frame

sub_4340F0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4340F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_2C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_34], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 1Ch
call	sub_4022A0
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_3C], ecx
mov	byte ptr [ebp+var_4], 6
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 38h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 8
lea	ecx, [ebp+var_F]
call	nullsub_1
lea	ecx, [ebp+var_10]
call	sub_401EF0
mov	[ebp+var_40], eax
mov	eax, [ebp+var_40]
mov	[ebp+var_44], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_24]
add	ecx, 50h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 0Bh
lea	ecx, [ebp+var_10]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4340F0 endp

align 10h


; Attributes: bp-based frame

sub_4341F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444840
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 50h
call	sub_407910
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 38h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4341F0 endp

align 10h


; Attributes: bp-based frame

sub_434260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4022F0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+34h]
mov	[edx+34h], ecx
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_4022F0
mov	eax, [ebp+arg_0]
add	eax, 50h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_4022F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_434260 endp

align 10h


; Attributes: bp-based frame

sub_4342D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 68h
call	sub_441DC0
mov	ecx, [ebp+var_4]
add	ecx, 68h
call	sub_4075A0
mov	esp, ebp
pop	ebp
retn
sub_4342D0 endp

align 10h
; [00000086 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000002E BYTES: COLLAPSED FUNCTION sub_434390. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4343C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4343C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439900
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4343C0 endp

align 10h


; Attributes: bp-based frame

sub_434430 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434430
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_20], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	[ebp+var_28], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_2C]
mov	[ebp+var_30], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 18h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 6
mov	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 34h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 8
lea	ecx, [ebp+var_F]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434430 endp

align 10h


; Attributes: bp-based frame

sub_434500 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434500 endp

align 10h


; Attributes: bp-based frame

sub_434560 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+30h]
mov	[edx+30h], ecx
mov	edx, [ebp+arg_0]
add	edx, 34h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_4022F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_434560 endp

align 10h


; Attributes: bp-based frame

sub_4345B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
add	ecx, 90h
call	sub_437BF0
mov	eax, [ebp+var_14]
add	eax, 90h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4345B0 endp

align 10h


; Attributes: bp-based frame

sub_434620 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1_Locimp@locale@std@@MAE@XZ_2	; std::locale::_Locimp::~_Locimp(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_434643
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_434643:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_434620 endp

align 10h


; Attributes: bp-based frame

sub_434650 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434650
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439A20
mov	byte ptr [ebp+var_4], 1
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434650 endp

align 10h


; Attributes: bp-based frame

sub_4346B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4346B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_4892A0
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
add	eax, 14h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
call	nullsub_1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4346B0 endp

align 10h


; Attributes: bp-based frame

sub_434730 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 1BCCh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E058
mov	ecx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+10h], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434730 endp

align 10h


; Attributes: bp-based frame

sub_4347C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_434808
push	14h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_434808:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4347C0 endp

align 10h


; Attributes: bp-based frame

sub_434820 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	ecx, 1C11h
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573E10
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_18]
add	ecx, 14h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
add	eax, 14h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, dword_188B78C
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, dword_188B790
mov	[eax+4], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434820 endp

align 10h


; Attributes: bp-based frame

sub_4348E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	ecx, 1C1Dh
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_155E05C
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_10], ecx
xor	edx, edx
mov	eax, [ebp+var_10]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_10]
mov	[edx+2], cx
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_14], ecx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	edx, [ebp+var_14]
mov	[edx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	ecx, [ebp+var_14]
mov	[ecx+2], ax
xor	edx, edx
and	edx, 0FFFFh
xor	eax, eax
and	eax, 0
mov	ecx, [ebp+var_14]
mov	[ecx], dx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4348E0 endp

align 10h


; Attributes: bp-based frame

sub_4349A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
push	2340h
mov	ecx, [ebp+var_10]
call	sub_42CD70
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E060
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 30h
mov	edx, dword_17EE12C
mov	[ecx], edx
mov	eax, dword_17EE130
mov	[ecx+4], eax
mov	edx, dword_17EE134
mov	[ecx+8], edx
mov	eax, dword_17EE138
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 30h
mov	edx, [ebp+var_10]
add	edx, 1Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_10]
add	edx, 1Ch
mov	eax, [ebp+var_10]
add	eax, 0Ch
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+2Ch], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4349A0 endp

align 10h


; Attributes: bp-based frame

sub_434A90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_434AD8
push	40h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_434AD8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_434A90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_434AF0(float)
sub_434AF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
fld	[ebp+arg_0]
fmul	ds:flt_1515B68
fdiv	ds:dbl_15FCD10
fstp	[ebp+var_4]
fld	[ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_434AF0 endp

align 10h


; Attributes: bp-based frame

sub_434B10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434B90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	[ebp+var_10], ecx
mov	ecx, 2723h
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E064
mov	esi, [ebp+var_10]
add	esi, 8
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
xor	eax, eax
call	sub_420330
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_434B10 endp

align 10h


; Attributes: bp-based frame

sub_434B90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434B90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_10]
add	eax, 8
call	sub_40ABB0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_434BE7
push	0Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_434BE7:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_434B90 endp

align 10h


; Attributes: bp-based frame

sub_434C00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
push	0BCEh
mov	ecx, [ebp+var_10]
call	sub_42CCA0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E068
mov	eax, [ebp+var_10]
add	eax, 0Ch
call	nullsub_1
mov	ecx, [ebp+var_10]
add	ecx, 40h
call	sub_401EF0
mov	eax, [ebp+var_10]
add	eax, 0Ch
call	sub_123B430
mov	ecx, [ebp+var_10]
add	ecx, 40h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434C00 endp

align 10h


; Attributes: bp-based frame

sub_434CA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_434CE8
push	4Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_434CE8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_434CA0 endp

align 10h


; Attributes: bp-based frame

sub_434D00 proc	near

var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
push	0BD4h
mov	ecx, [ebp+var_1C]
call	sub_42CCA0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_155E06C
mov	ecx, [ebp+var_1C]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_1C]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_1C]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_1C]
add	ecx, 0Ch
mov	edx, dword_17EE114
mov	[ecx], edx
mov	eax, dword_17EE118
mov	[ecx+4], eax
mov	edx, dword_17EE11C
mov	[ecx+8], edx
lea	eax, [ebp+var_18]
push	eax
mov	ecx, offset dword_17EE0FC
call	sub_412DA0
mov	ecx, [ebp+var_1C]
add	ecx, 18h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_1C]
add	ecx, 24h
mov	edx, dword_17EE108
mov	[ecx], edx
mov	eax, dword_17EE10C
mov	[ecx+4], eax
mov	edx, dword_17EE110
mov	[ecx+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434D00 endp

align 10h


; Attributes: bp-based frame

sub_434DE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_434E28
push	30h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_434E28:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_434DE0 endp

align 10h


; Attributes: bp-based frame

sub_434E40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_456120
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434E40 endp



; Attributes: bp-based frame

sub_434E80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
push	0C1Bh
mov	ecx, [ebp+var_10]
call	sub_42CCA0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E070
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1Ch], xmm0
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434E80 endp

align 10h


; Attributes: bp-based frame

sub_434F00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_434F48
push	20h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_434F48:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_434F00 endp

align 10h


; Attributes: bp-based frame

sub_434F60 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 20h
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434F60 endp



; Attributes: bp-based frame

sub_434FF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5332C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_434FF0 endp

align 10h


; Attributes: bp-based frame

sub_435070 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435070 endp

align 10h


; Attributes: bp-based frame

sub_4350D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4350D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4350D0 endp

align 10h


; Attributes: bp-based frame

sub_435140 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435140
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435140 endp

align 10h


; Attributes: bp-based frame

sub_435190 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9F40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435190 endp

align 10h


; Attributes: bp-based frame

sub_4351F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4351F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 28h
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 4Ch
call	sub_10FB7C0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4351F0 endp

align 10h


; Attributes: bp-based frame

sub_435270 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_537AF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 4Ch
call	sub_10FB7C0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435270 endp

align 10h


; Attributes: bp-based frame

sub_4352E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4352E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 4Ch
call	sub_10FB7C0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4352E0 endp

align 10h


; Attributes: bp-based frame

sub_435330 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435330
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 20h
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_10]
call	sub_4395C0
mov	byte ptr [ebp+var_4], 5
call	nullsub_1
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435330 endp

align 10h


; Attributes: bp-based frame

sub_4353D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_532090
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_4395C0
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4353D0 endp

align 10h


; Attributes: bp-based frame

sub_435450 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4395C0
mov	byte ptr [ebp+var_4], 1
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435450 endp

align 10h


; Attributes: bp-based frame

sub_4354B0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4354B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_20], eax
mov	eax, [ebp+var_20]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_1C]
add	ecx, 4
call	sub_402390
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_28], eax
mov	edx, [ebp+var_28]
mov	[ebp+var_2C], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 2Ch
call	sub_402390
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4354B0 endp

align 10h


; Attributes: bp-based frame

sub_435550 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435550
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	eax, dword_1968D74
and	eax, 1
jnz	short loc_4355CC
mov	ecx, dword_1968D74
or	ecx, 1
mov	dword_1968D74, ecx
mov	[ebp+var_4], 0
mov	dword_1968D78, 270h
mov	edx, dword_1968D78
add	edx, 1
mov	dword_1968D7C, edx
mov	dword_1968D80, 0
mov	ecx, offset dword_1968D78
call	sub_4356D0
push	offset sub_1412BB0 ; void (__cdecl *)()
call	_atexit
add	esp, 4
mov	[ebp+var_4], 0FFFFFFFFh

loc_4355CC:
mov	eax, offset dword_1968D78
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435550 endp

align 10h


; Attributes: bp-based frame

sub_4355E0 proc	near

var_34=	dword ptr -34h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
cmp	dword ptr [eax+10h], 0
jnz	short loc_4355FA
mov	ecx, [ebp+var_34]
call	sub_4357E0

loc_4355FA:
mov	ecx, [ebp+var_34]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_34]
mov	[eax+10h], edx
mov	ecx, [ebp+var_34]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+0Ch]
add	edx, 4
mov	eax, [ebp+var_34]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_4]
shr	ecx, 0Bh
xor	ecx, [ebp+var_4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
shl	edx, 7
and	edx, 9D2C5680h
xor	edx, [ebp+var_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
shl	eax, 0Fh
and	eax, 0EFC60000h
xor	eax, [ebp+var_4]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
shr	eax, 12h
xor	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4355E0 endp

align 10h


; Attributes: bp-based frame

sub_435660 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
shr	edx, 1
or	edx, [ebp+var_8]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
shr	eax, 2
or	eax, [ebp+var_8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shr	ecx, 4
or	ecx, [ebp+var_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
shr	edx, 8
or	edx, [ebp+var_8]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
shr	eax, 10h
or	eax, [ebp+var_8]
mov	[ebp+var_8], eax

loc_4356AC:
mov	ecx, [ebp+var_3C]
call	sub_4355E0
and	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
ja	short loc_4356AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_435660 endp

align 10h


; Attributes: bp-based frame

sub_4356D0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
push	0		; Time
call	__time64
add	esp, 4
mov	[ebp+var_8], eax
mov	[ebp+var_4], edx
call	_clock
push	eax
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_435950
add	esp, 0Ch
mov	[ebp+var_60], eax
mov	edx, [ebp+var_60]
push	edx
mov	ecx, [ebp+var_64]
call	sub_435720
mov	ecx, [ebp+var_64]
call	sub_4357E0
mov	esp, ebp
pop	ebp
retn
sub_4356D0 endp

align 10h


; Attributes: bp-based frame

sub_435720 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [eax+8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
xor	ecx, ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_14], eax
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax+8], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+8]
mov	[ebp+var_C], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
jmp	short loc_43579D

loc_435794:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_43579D:
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
jnb	short loc_4357D6
mov	eax, [ebp+var_C]
mov	ecx, [eax]
shr	ecx, 1Eh
mov	edx, [ebp+var_C]
xor	ecx, [edx]
imul	ecx, 6C078965h
add	ecx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_435794

loc_4357D6:
mov	esp, ebp
pop	ebp
retn	4
sub_435720 endp

align 10h


; Attributes: bp-based frame

sub_4357E0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
push	esi
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
sub	eax, 18Dh
mov	[ebp+var_8], eax
jmp	short loc_43580B

loc_435802:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_43580B:
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
test	edx, edx
jz	short loc_435869
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
and	eax, 80000000h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
or	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
and	ecx, 1
neg	ecx
and	ecx, 9908B0DFh
mov	edx, [ebp+var_10]
shr	edx, 1
mov	eax, [ebp+var_4]
xor	edx, [eax+634h]
xor	edx, ecx
mov	ecx, [ebp+var_4]
mov	[ecx], edx
jmp	short loc_435802

loc_435869:
mov	[ebp+var_8], 18Dh
jmp	short loc_43587B

loc_435872:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_43587B:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jz	short loc_4358DB
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
and	eax, 80000000h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
or	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
and	ecx, 1
neg	ecx
and	ecx, 9908B0DFh
mov	edx, [ebp+var_30]
mov	eax, 18Dh
sub	eax, [edx]
mov	edx, [ebp+var_1C]
shr	edx, 1
mov	esi, [ebp+var_4]
xor	edx, [esi+eax*4]
xor	edx, ecx
mov	eax, [ebp+var_4]
mov	[eax], edx
jmp	short loc_435872

loc_4358DB:
mov	ecx, [ebp+var_30]
mov	edx, [ecx+8]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
and	ecx, 80000000h
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
and	eax, 7FFFFFFFh
or	eax, [ebp+var_24]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
and	edx, 1
neg	edx
and	edx, 9908B0DFh
mov	eax, [ebp+var_30]
mov	ecx, 18Dh
sub	ecx, [eax]
mov	eax, [ebp+var_28]
shr	eax, 1
mov	esi, [ebp+var_4]
xor	eax, [esi+ecx*4]
xor	eax, edx
mov	ecx, [ebp+var_4]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+10h], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax+8]
mov	[edx+0Ch], ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4357E0 endp

align 10h


; Attributes: bp-based frame

sub_435950 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_C], 0
lea	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	[ebp+var_10], 0
jmp	short loc_435975

loc_43596C:
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_10], ecx

loc_435975:
cmp	[ebp+var_10], 8
jnb	short loc_435998
mov	edx, [ebp+var_C]
imul	edx, 101h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
add	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax]
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
jmp	short loc_43596C

loc_435998:
mov	[ebp+var_8], 0
lea	edx, [ebp+arg_8]
mov	[ebp+var_4], edx
mov	[ebp+var_14], 0
jmp	short loc_4359B7

loc_4359AE:
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_4359B7:
cmp	[ebp+var_14], 4
jnb	short loc_4359DA
mov	ecx, [ebp+var_8]
imul	ecx, 101h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
add	edx, [ebp+var_14]
movzx	eax, byte ptr [edx]
add	eax, [ebp+var_8]
mov	[ebp+var_8], eax
jmp	short loc_4359AE

loc_4359DA:
mov	ecx, [ebp+var_C]
add	ecx, dword_1968DD4
xor	ecx, [ebp+var_8]
mov	[ebp+var_18], ecx
mov	edx, dword_1968DD4
add	edx, 1
mov	dword_1968DD4, edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_435950 endp

align 10h


; Attributes: bp-based frame

sub_435A00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
add	ecx, 58h
call	sub_442E50
mov	eax, [ebp+var_14]
add	eax, 58h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435A00 endp

align 10h


; Attributes: bp-based frame

sub_435A60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4892A0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_435A60 endp

align 10h


; Attributes: bp-based frame

sub_435AC0 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435AC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_18]
call	sub_4079A0
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_407CA0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_435AC0 endp

align 10h


; Attributes: bp-based frame

sub_435B20 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_61ED00
mov	esi, eax
mov	ecx, [ebp+var_8]
call	sub_5F52F0
xor	ecx, ecx
cmp	eax, esi
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_435B71
mov	[ebp+var_1], 0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5F52F0
push	eax
call	sub_405ED0
add	esp, 8
mov	ecx, [ebp+var_8]
call	sub_5F52F0
mov	ecx, [ebp+var_8]
mov	[ecx+10h], eax

loc_435B71:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_435B20 endp

align 10h


; Attributes: bp-based frame

sub_435B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5F52F0
mov	esi, eax
mov	ecx, [ebp+var_4]
call	sub_61ED00
xor	ecx, ecx
cmp	esi, eax
setz	cl
mov	al, cl
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_435B80 endp

align 10h


; Attributes: bp-based frame

sub_435BB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4042A0
cmp	[ebp+arg_0], eax
jbe	short loc_435BCF
mov	ecx, [ebp+var_C]
call	sub_43AF90

loc_435BCF:
mov	ecx, [ebp+var_C]
call	sub_4042A0
sub	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
call	sub_5F52F0
mov	esi, eax
add	esi, [ebp+arg_0]
lea	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
call	sub_407A30
add	esp, 8
add	esi, [eax]
push	esi
mov	ecx, [ebp+var_C]
call	sub_5F52F0
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_4042B0
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_435BB0 endp

align 10h


; Attributes: bp-based frame

sub_435C20 proc	near

var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_4042A0
mov	[ebp+var_8], eax
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_8]
jbe	short loc_435C45
mov	ecx, [ebp+var_20]
call	sub_43AF90

loc_435C45:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	ecx, [ebp+arg_8]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_20]
call	sub_404790
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_4]
sub	eax, edx
cmp	esi, eax
jbe	short loc_435C89
mov	ecx, [ebp+var_20]
call	loc_407740

loc_435C89:
mov	eax, [ebp+arg_8]
cmp	eax, [ebp+var_20]
setz	cl
movzx	edx, cl
push	edx
mov	ecx, [ebp+arg_8]
call	sub_61ED00
push	eax
mov	ecx, [ebp+arg_8]
call	sub_5F52F0
push	eax
mov	ecx, [ebp+var_20]
call	sub_5F52F0
add	eax, [ebp+arg_0]
add	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5F52F0
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
call	sub_43A770
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_435C20 endp

align 10h


; Attributes: bp-based frame

sub_435CE0 proc	near

var_64=	dword ptr -64h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
call	sub_4386C0
mov	esp, ebp
pop	ebp
retn	4
sub_435CE0 endp

align 10h


; Attributes: bp-based frame

sub_435D00 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_28], ecx
mov	[ebp+var_14], 0
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+var_28]
call	sub_604B20
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_438470
mov	eax, [ebp+var_14]
or	eax, 1
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_435D00 endp

align 10h


; Attributes: bp-based frame

sub_435D90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_402430
cmp	[ebp+arg_0], eax
jbe	short loc_435DAF
mov	ecx, [ebp+var_C]
call	sub_43AF90

loc_435DAF:
mov	ecx, [ebp+var_C]
call	sub_402430
sub	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
call	sub_404430
mov	ecx, [ebp+arg_0]
lea	esi, [eax+ecx*2]
lea	edx, [ebp+var_4]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
lea	edx, [esi+ecx*2]
push	edx
mov	ecx, [ebp+var_C]
call	sub_404430
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_C]
call	sub_4043F0
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_435D90 endp

align 10h


; Attributes: bp-based frame

sub_435E10 proc	near

var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_402430
mov	[ebp+var_8], eax
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_8]
jbe	short loc_435E35
mov	ecx, [ebp+var_20]
call	sub_43AF90

loc_435E35:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	ecx, [ebp+arg_8]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_20]
call	sub_4043E0
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_4]
sub	eax, edx
cmp	esi, eax
jbe	short loc_435E79
mov	ecx, [ebp+var_20]
call	loc_407740

loc_435E79:
mov	eax, [ebp+arg_8]
cmp	eax, [ebp+var_20]
setz	cl
movzx	edx, cl
push	edx
mov	ecx, [ebp+arg_8]
call	sub_402CE0
push	eax
mov	ecx, [ebp+arg_8]
call	sub_404430
push	eax
mov	ecx, [ebp+var_20]
call	sub_404430
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_4]
lea	ecx, [edx+eax*2]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_404430
mov	edx, [ebp+arg_0]
lea	eax, [eax+edx*2]
push	eax
mov	ecx, [ebp+var_20]
call	sub_43B080
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_435E10 endp

align 10h


; Attributes: bp-based frame

sub_435ED0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435ED0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_28], ecx
mov	[ebp+var_14], 0
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+var_28]
call	sub_604B20
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_438900
mov	eax, [ebp+var_14]
or	eax, 1
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_435ED0 endp

align 10h


; Attributes: bp-based frame

sub_435F60 proc	near

var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+arg_0]
call	sub_402CE0
push	eax
mov	ecx, [ebp+arg_0]
call	sub_404430
push	eax
mov	ecx, [ebp+var_28]
call	sub_402CE0
push	eax
mov	ecx, [ebp+var_28]
call	sub_404430
push	eax
call	sub_430C00
add	esp, 10h
mov	esp, ebp
pop	ebp
retn	4
sub_435F60 endp

align 10h


; Attributes: bp-based frame

sub_435FA0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
push	esi
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_402430
cmp	[ebp+arg_0], eax
jbe	short loc_435FBF
mov	ecx, [ebp+var_30]
call	sub_43AF90

loc_435FBF:
mov	ecx, [ebp+var_30]
call	sub_402430
sub	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_8]
call	sub_402CE0
push	eax
mov	ecx, [ebp+arg_8]
call	sub_404430
push	eax
mov	ecx, [ebp+var_30]
call	sub_404430
mov	ecx, [ebp+arg_0]
lea	esi, [eax+ecx*2]
lea	edx, [ebp+var_4]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
lea	edx, [esi+ecx*2]
push	edx
mov	ecx, [ebp+var_30]
call	sub_404430
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*2]
push	edx
call	sub_430C00
add	esp, 10h
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_435FA0 endp

align 10h


; Attributes: bp-based frame

sub_436030 proc	near

var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4077F0
add	esp, 4
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
call	sub_402CE0
push	eax
mov	ecx, [ebp+var_28]
call	sub_404430
push	eax
call	sub_430C00
add	esp, 10h
mov	esp, ebp
pop	ebp
retn	4
sub_436030 endp



; Attributes: bp-based frame

sub_436070 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436070 endp

align 10h


; Attributes: bp-based frame

sub_4360C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_18=	byte ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	edx, [ebp+var_30]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
test	eax, eax
jz	short loc_436134
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_30]
mov	ecx, [eax+edx+0Ch]
and	ecx, 5
neg	ecx
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jnz	short loc_436134
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	edx, [ebp+var_30]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_2C], eax
push	10h
push	2
push	0
push	0
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	ecx, [ebp+var_2C]
mov	eax, [edx+8]
call	eax
lea	ecx, [ebp+var_18]
mov	[ebp+var_34], ecx
jmp	short loc_436143

loc_436134:
push	0FFFFFFFFh
push	0FFFFFFFFh
lea	ecx, [ebp+var_28]
call	sub_406AE0
mov	[ebp+var_34], eax

loc_436143:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4360C0 endp

align 10h


; Attributes: bp-based frame

sub_436170 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A7C00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_50E7D0
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_436211
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_436211
mov	ecx, [ebp+var_60]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_436211:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436170 endp

align 10h


; Attributes: bp-based frame

sub_436230 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436230
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	sub_42CA30
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436230 endp

align 10h


; Attributes: bp-based frame

sub_436320 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436320
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_438C80
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436320 endp

align 10h


; Attributes: bp-based frame

sub_436380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax-10h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_4]
mov	dword ptr [eax+edx-10h], offset	off_1446290
mov	esp, ebp
pop	ebp
retn
sub_436380 endp

align 10h


; Attributes: bp-based frame

sub_4363A0 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_4363F7
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx+10h]
call	eax
cmp	eax, 0FFFFFFFFh
jnz	short loc_4363F7
push	1
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
add	ecx, [edx+4]
call	sub_438B50

loc_4363F7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4363A0 endp

align 10h
; [00000072 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000007D BYTES: COLLAPSED FUNCTION sub_436480. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_436500 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_50E7D0
add	esp, 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_5C]
call	sub_438EF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436500 endp

align 10h


; Attributes: bp-based frame

sub_436580 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_24]
mov	edx, [eax+4]
sub	edx, [ecx]
cmp	[ebp+arg_0], edx
jnb	short loc_4365BF
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
add	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_24]
call	sub_438E80
jmp	short loc_4365ED

loc_4365BF:
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_24]
mov	edx, [eax+4]
sub	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_20]
push	ecx		; void *
mov	ecx, [ebp+var_24]
call	sub_43D6B0

loc_4365ED:
mov	esp, ebp
pop	ebp
retn	8
sub_436580 endp

align 10h


; Attributes: bp-based frame

sub_436600 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_439C40
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_436600 endp

align 10h


; Attributes: bp-based frame

sub_436670 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436670
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436670 endp

align 10h


; Attributes: bp-based frame

sub_436760 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_438C80
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436760 endp

align 10h


; Attributes: bp-based frame

sub_4367C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6440
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_438FB0
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4367C0 endp

align 10h


; Attributes: bp-based frame

sub_436820 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_439CE0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_436820 endp

align 10h


; Attributes: bp-based frame

sub_436890 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4054E0
cmp	[ebp+var_C], 0
jz	short loc_4368E7
mov	eax, 1
imul	eax, 30h
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4368E7:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_436890 endp

align 10h


; Attributes: bp-based frame

sub_436900 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_436890
mov	esp, ebp
pop	ebp
retn
sub_436900 endp



; Attributes: bp-based frame

sub_436930 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436930
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_436930 endp

align 10h


; Attributes: bp-based frame

sub_4369C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4369C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_43E8E0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4369C0 endp

align 10h


; Attributes: bp-based frame

sub_436A10 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_8]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	[ebp+var_1C], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx

loc_436A50:
mov	edx, [ebp+var_24]
push	edx
lea	ecx, [ebp+var_18]
call	sub_409650
movzx	eax, al
test	eax, eax
jz	short loc_436A76
lea	eax, [ebp+var_18]
call	sub_405E90
mov	ecx, [ebp+var_1C]
add	ecx, 1
mov	[ebp+var_1C], ecx
jmp	short loc_436A50

loc_436A76:
mov	edx, [ebp+var_1C]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_436A10 endp

align 10h


; Attributes: bp-based frame

sub_436A90 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
lea	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_439D80
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+4], edx
mov	ecx, [ebp+var_14]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_436A90 endp

align 10h


; Attributes: bp-based frame

sub_436B00 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax
call	sub_404B20
add	esp, 4
mov	eax, 1
mov	ecx, [ebp+var_C] ; void	*
call	sub_404550
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_436B00 endp

align 10h


; Attributes: bp-based frame

sub_436B70 proc	near

var_1C=	dword ptr -1Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_1C]
call	sub_402EB0
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_436B00
mov	esp, ebp
pop	ebp
retn
sub_436B70 endp

align 10h


; Attributes: bp-based frame

sub_436BA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_439060
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_436BA0 endp

align 10h


; Attributes: bp-based frame

sub_436C00 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436C00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
push	esi
mov	[ebp+var_38], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_3C], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_40], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_38]
call	sub_4390C0
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	byte ptr [ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_436C00 endp

align 10h
; [00000072 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000007D BYTES: COLLAPSED FUNCTION sub_436CF0. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_436D70 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_38]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_436DAB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4431D0
add	esp, 8
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
add	ecx, 40h
mov	edx, [ebp+var_38]
mov	[edx+4], ecx
jmp	short loc_436DD6

loc_436DAB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	[ebp+var_34], edx
xor	eax, eax
mov	[ebp+var_2D], al
push	1
push	1
lea	ecx, [ebp+var_2D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_38]
call	sub_4404E0

loc_436DD6:
mov	esp, ebp
pop	ebp
retn	4
sub_436D70 endp

align 10h


; Attributes: bp-based frame

sub_436DE0 proc	near

var_8C=	dword ptr -8Ch
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_436E10
jmp	short loc_436E2C

loc_436E10:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_439EC0

loc_436E2C:
mov	esp, ebp
pop	ebp
retn
sub_436DE0 endp



; Attributes: bp-based frame

sub_436E30 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436E30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	[eax+10h], ecx
mov	edx, [ebp+var_1C]
add	edx, 14h
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	[ebp+var_4], 1
push	10h
mov	ecx, [ebp+var_1C]
call	sub_4407A0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_1C]
call	sub_439260
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_436E30 endp

align 10h


; Attributes: bp-based frame

sub_436EB0 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436EB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436EB0 endp

align 10h


; Attributes: bp-based frame

sub_436F00 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436F00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_436F00 endp

align 10h


; Attributes: bp-based frame

sub_436FF0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_439370
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_436FF0 endp

align 10h


; Attributes: bp-based frame

sub_437050 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437050
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4393E0
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437050 endp

align 10h


; Attributes: bp-based frame

sub_4370B0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4370B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	sub_42CA30
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4370B0 endp

align 10h


; Attributes: bp-based frame

sub_4371A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436320
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4371A0 endp

align 10h
; [00000072 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000072 BYTES: COLLAPSED FUNCTION sub_437280. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_437300 proc	near

var_68=	dword ptr -68h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_443260
add	esp, 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
call	sub_439520
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437300 endp

align 10h


; Attributes: bp-based frame

sub_437380 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_48]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4373BB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_452030
add	esp, 8
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
add	ecx, 28h
mov	edx, [ebp+var_48]
mov	[edx+4], ecx
jmp	short loc_4373E6

loc_4373BB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_44], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_48]
call	sub_439F60

loc_4373E6:
mov	esp, ebp
pop	ebp
retn	4
sub_437380 endp

align 10h


; Attributes: bp-based frame

sub_4373F0 proc	near

var_74=	dword ptr -74h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	eax, [ebp+var_74]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_437414
jmp	short loc_43742D

loc_437414:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_74]
call	sub_43A030

loc_43742D:
mov	esp, ebp
pop	ebp
retn
sub_4373F0 endp

align 10h


; Attributes: bp-based frame

sub_437440 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437050
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4395C0
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437440 endp

align 10h


; Attributes: bp-based frame

sub_4374A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4374A0 endp

align 10h


; Attributes: bp-based frame

sub_437500 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
mov	[ebp+var_B4], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_B4]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_443290
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_B4]
cmp	dword ptr [ecx], 0
jz	short loc_4375CF
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_B0], eax
mov	edx, [ebp+var_B4]
mov	eax, [edx]
mov	[ebp+var_AC], eax
cmp	[ebp+var_AC], 0
jz	short loc_4375CF
mov	ecx, [ebp+var_B0]
imul	ecx, 2Ch
push	ecx		; int
mov	edx, [ebp+var_AC]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4375CF:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437500 endp

align 10h


; Attributes: bp-based frame

sub_4375F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4396E0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4375F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_437650(LPCSTR lpFileName, int, int)
sub_437650 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437650
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_8], 0
jz	short loc_4376A2
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	unk_155DFA4
mov	ecx, [ebp+var_20]
add	ecx, 98h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_4376A2:
push	0
push	0
mov	ecx, [ebp+var_20]
call	sub_438CD0
mov	[ebp+var_4], 1
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_20]
mov	dword ptr [edx+ecx], offset off_14463B0
mov	ecx, [ebp+var_20]
add	ecx, 10h
call	sub_43C000
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
add	ecx, [edx+4]
call	sub_43BA90
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
or	ecx, 8
push	ecx		; int
mov	edx, [ebp+lpFileName]
push	edx		; lpFileName
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_77F4E0
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, [ebp+var_14]
jnz	short loc_43772A
push	4
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
add	ecx, [edx+4]
call	sub_438B50

loc_43772A:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_437650 endp

align 10h


; Attributes: bp-based frame

sub_437750 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax-98h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	dword ptr [eax+edx-98h], offset	off_14463B0
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
sub	ecx, 88h
call	sub_43C160
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
sub	ecx, 88h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx-10h]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
mov	dword ptr [edx+ecx-10h], offset	off_1446290
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437750 endp

align 10h


; Attributes: bp-based frame

sub_4377E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_439060
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4377E0 endp

align 10h


; Attributes: bp-based frame

sub_437840 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437840
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437840 endp

align 10h


; Attributes: bp-based frame

sub_437930 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_439890
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_437930 endp

align 10h


; Attributes: bp-based frame

sub_437990 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_439900
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437990 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4379F0(LPCSTR lpFileName, int, int)
sub_4379F0 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437AF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_8], 0
jz	short loc_437A42
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	unk_155DFAC
mov	ecx, [ebp+var_20]
add	ecx, 90h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_437A42:
push	0
push	0
mov	ecx, [ebp+var_20]
call	sub_43D300
mov	[ebp+var_4], 1
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_20]
mov	dword ptr [edx+ecx], offset off_14463B8
mov	ecx, [ebp+var_20]
add	ecx, 8
call	sub_43C000
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
add	eax, 8
push	eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
add	ecx, [edx+4]
call	sub_43BA90
mov	eax, [ebp+var_20]
add	eax, 8
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
or	ecx, 10h
push	ecx		; int
mov	edx, [ebp+lpFileName]
push	edx		; lpFileName
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_77F4E0
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, [ebp+var_14]
jnz	short loc_437ACA
push	4
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
add	ecx, [edx+4]
call	sub_438B50

loc_437ACA:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4379F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_437AF0(LPCWSTR lpFileName, int, int)
sub_437AF0 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437AF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_8], 0
jz	short loc_437B42
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	unk_155DFAC
mov	ecx, [ebp+var_20]
add	ecx, 90h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_437B42:
push	0
push	0
mov	ecx, [ebp+var_20]
call	sub_43D300
mov	[ebp+var_4], 1
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_20]
mov	dword ptr [edx+ecx], offset off_14463B8
mov	ecx, [ebp+var_20]
add	ecx, 8
call	sub_43C000
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
add	eax, 8
push	eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
add	ecx, [edx+4]
call	sub_43BA90
mov	eax, [ebp+var_20]
add	eax, 8
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
or	ecx, 10h
push	ecx		; int
mov	edx, [ebp+lpFileName]
push	edx		; lpFileName
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_77F500
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, [ebp+var_14]
jnz	short loc_437BCA
push	4
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
add	ecx, [edx+4]
call	sub_438B50

loc_437BCA:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_437AF0 endp

align 10h


; Attributes: bp-based frame

sub_437BF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437BF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax-90h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	dword ptr [eax+edx-90h], offset	off_14463B8
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
sub	ecx, 88h
call	sub_43C160
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
sub	ecx, 88h
call	sub_43D390
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437BF0 endp

align 10h


; Attributes: bp-based frame

sub_437C70 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_43C1C0
test	eax, eax
jnz	short loc_437C9C
push	4
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ebp+var_C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_438B50

loc_437C9C:
mov	esp, ebp
pop	ebp
retn
sub_437C70 endp



; Attributes: bp-based frame

sub_437CA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437050
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_439A20
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437CA0 endp

align 10h


; Attributes: bp-based frame

sub_437D00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_14]
call	sub_4892A0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 14h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_437D00 endp

align 10h


; Attributes: bp-based frame

sub_437D70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DD2310
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_437D70 endp

align 10h


; Attributes: bp-based frame

sub_437DF0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_437E4B
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_44C0B0
add	esp, 0Ch
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 54h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_437E76

loc_437E4B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_442B40

loc_437E76:
mov	esp, ebp
pop	ebp
retn	4
sub_437DF0 endp

align 10h


; Attributes: bp-based frame

sub_437E80 proc	near

var_24=	dword ptr -24h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
call	sub_421B80
push	eax
mov	eax, [ebp+var_24]
call	sub_420D20
push	eax
mov	ecx, [ebp+var_24]
call	sub_439B40
mov	esp, ebp
pop	ebp
retn
sub_437E80 endp

align 10h


; Attributes: bp-based frame

sub_437EB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_437F01
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_437F21

loc_437F01:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_455B70

loc_437F21:
mov	esp, ebp
pop	ebp
retn	4
sub_437EB0 endp

align 10h


; Attributes: bp-based frame

sub_437F30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6440
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_438FB0
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_437F30 endp

align 10h


; Attributes: bp-based frame

sub_437F90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_437FDF
mov	edx, [ebp+var_10]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_437FDF:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_437F90 endp

align 10h


; Attributes: bp-based frame

sub_438000 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
sub	ecx, 10h
call	sub_4383B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_43802B
mov	ecx, [ebp+var_C]
sub	ecx, 10h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_43802B:
mov	eax, [ebp+var_C]
sub	eax, 10h
mov	esp, ebp
pop	ebp
retn	4
sub_438000 endp

align 10h


; Attributes: bp-based frame

sub_438040 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434080
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
sub	eax, 98h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
add	ecx, 98h
call	sub_437750
mov	ecx, [ebp+var_18]
add	ecx, 98h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4380BC
mov	ecx, [ebp+var_1C]
sub	ecx, 98h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4380BC:
mov	eax, [ebp+var_1C]
sub	eax, 98h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_438040 endp

align 10h


; Attributes: bp-based frame

sub_4380E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
sub	eax, 90h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 90h
call	sub_437BF0
mov	ecx, [ebp+var_14]
add	ecx, 90h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_43815C
mov	ecx, [ebp+var_18]
sub	ecx, 90h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_43815C:
mov	eax, [ebp+var_18]
sub	eax, 90h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4380E0 endp

align 10h


; Attributes: bp-based frame

sub_438180 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_434F60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4381A7
push	50h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4381A7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_438180 endp



; Attributes: bp-based frame

sub_4381B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4350D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_438226
push	68h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_438226:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4381B0 endp

align 10h


; Attributes: bp-based frame

sub_438240 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9F40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4382A7
push	48h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4382A7:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_438240 endp

align 10h


; Attributes: bp-based frame

sub_4382C0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4351F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4382EA
push	0B0h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4382EA:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4382C0 endp

align 10h


; Attributes: bp-based frame

sub_438300 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9F40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_438367
push	40h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_438367:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_438300 endp

align 10h


; Attributes: bp-based frame

sub_438380 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_435330
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4383A7
push	48h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4383A7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_438380 endp



; Attributes: bp-based frame

sub_4383B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434080
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx-10h]
mov	eax, [edx+4]
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+eax-10h], offset	off_1446290
mov	edx, [ebp+var_18]
add	edx, 10h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4383B0 endp

align 10h


; Attributes: bp-based frame

sub_438430 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_438430 endp

align 10h


; Attributes: bp-based frame

sub_438470 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_63FE60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	esi
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_4079A0
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
call	sub_4042A0
cmp	[ebp+arg_4], eax
jbe	short loc_4384B9
mov	ecx, [ebp+var_20]
call	sub_43AF90
jmp	short loc_4384FB

loc_4384B9:
mov	ecx, [ebp+arg_0]
call	sub_4042A0
sub	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
call	sub_5F52F0
mov	esi, eax
add	esi, [ebp+arg_4]
lea	ecx, [ebp+var_10]
push	ecx
lea	edx, [ebp+arg_8]
push	edx
call	sub_407A30
add	esp, 8
add	esi, [eax]
push	esi
mov	ecx, [ebp+arg_0]
call	sub_5F52F0
add	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_407CA0

loc_4384FB:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_438470 endp

align 10h


; Attributes: bp-based frame

sub_438520 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4042A0
cmp	[ebp+arg_0], eax
ja	short loc_438553
mov	ecx, [ebp+var_4]
call	sub_61ED00
push	eax
mov	ecx, [ebp+var_4]
call	sub_5F52F0
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4042B0
jmp	short loc_43856E

loc_438553:
movzx	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4042A0
mov	ecx, [ebp+arg_0]
sub	ecx, eax
push	ecx
mov	ecx, [ebp+var_4]
call	sub_43A580

loc_43856E:
mov	esp, ebp
pop	ebp
retn	8
sub_438520 endp

align 10h


; Attributes: bp-based frame

sub_438580 proc	near

var_2C=	dword ptr -2Ch
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
call	sub_4042F0
cmp	eax, 1
jnz	short loc_4385A9
push	1
mov	ecx, [ebp+var_2C]
call	sub_404250
push	eax
mov	ecx, [ebp+var_2C]
call	sub_43A470

loc_4385A9:
mov	ecx, [ebp+var_2C]
call	sub_61ED00
add	eax, 1
push	eax
mov	ecx, [ebp+var_2C]
call	sub_407C80
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_61ED00
push	eax
call	sub_405ED0
add	esp, 8
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_2C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_438580 endp

align 10h


; Attributes: bp-based frame

sub_4385F0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_4042A0
mov	[ebp+var_8], eax
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_8]
jbe	short loc_438614
mov	ecx, [ebp+var_20]
call	sub_43AF90

loc_438614:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_20]
call	sub_404790
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_4]
sub	eax, edx
cmp	[ebp+arg_C], eax
jbe	short loc_43864F
mov	ecx, [ebp+var_20]
call	loc_407740

loc_43864F:
mov	ecx, [ebp+var_20]
call	sub_5F52F0
cmp	[ebp+arg_8], eax
jb	short loc_438672
mov	ecx, [ebp+var_20]
call	sub_61ED00
cmp	[ebp+arg_8], eax
jnb	short loc_438672
mov	[ebp+var_24], 1
jmp	short loc_438679

loc_438672:
mov	[ebp+var_24], 0

loc_438679:
movzx	eax, byte ptr [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_8]
add	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_20]
call	sub_5F52F0
add	eax, [ebp+arg_0]
add	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5F52F0
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
call	sub_43A770
mov	esp, ebp
pop	ebp
retn	10h
sub_4385F0 endp

align 10h


; Attributes: bp-based frame

sub_4386C0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_64]
call	sub_4079B0
movzx	eax, al
test	eax, eax
jz	loc_4387CD
mov	ecx, [ebp+arg_0]
call	sub_4079B0
movzx	ecx, al
test	ecx, ecx
jz	loc_4387B7
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [edx+4]
mov	[ebp+var_1C], ecx
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_64]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+10h]
sub	ecx, [eax+14h]
mov	edx, [ebp+var_64]
add	ecx, [edx+14h]
mov	eax, [ebp+var_64]
mov	[eax+10h], ecx
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
sub	edx, [ecx+14h]
add	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[eax+10h], edx
mov	ecx, [ebp+arg_0]
add	ecx, 14h
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_64]
add	edx, 14h
mov	[ebp+var_2C], edx
xor	eax, eax
mov	[ebp+var_21], al
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_30]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	[edx+14h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	[ecx+14h], edx
jmp	short loc_4387C8

loc_4387B7:
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4386C0
jmp	loc_4388F5

loc_4387C8:
jmp	loc_4388F5

loc_4387CD:
mov	ecx, [ebp+arg_0]
call	sub_4079B0
movzx	ecx, al
test	ecx, ecx
jz	loc_43887E
mov	edx, [ebp+var_64]
mov	eax, [edx+14h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_64]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 14h
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_64]
add	ecx, 14h
mov	[ebp+var_3C], ecx
xor	edx, edx
mov	[ebp+var_31], dl
mov	eax, [ebp+var_3C]
mov	ecx, [eax]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_38]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_64]
mov	[ecx+14h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
sub	ecx, [ebp+arg_0]
add	ecx, [ebp+var_64]
mov	edx, [ebp+var_64]
mov	[edx+10h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_10]
mov	[edx+14h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx+10h], edx
jmp	short loc_4388F5

loc_43887E:
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_44]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 14h
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_64]
add	edx, 14h
mov	[ebp+var_50], edx
xor	eax, eax
mov	[ebp+var_45], al
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_58]
mov	[eax], ecx

loc_4388F5:
mov	esp, ebp
pop	ebp
retn	4
sub_4386C0 endp

align 10h


; Attributes: bp-based frame

sub_438900 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	esi
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_407690
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
call	sub_402430
cmp	[ebp+arg_4], eax
jbe	short loc_438949
mov	ecx, [ebp+var_20]
call	sub_43AF90
jmp	short loc_438992

loc_438949:
mov	ecx, [ebp+arg_0]
call	sub_402430
sub	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
call	sub_404430
mov	ecx, [ebp+arg_4]
lea	esi, [eax+ecx*2]
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+arg_8]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
lea	edx, [esi+ecx*2]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_404430
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_20]
call	sub_4077B0

loc_438992:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_438900 endp

align 10h


; Attributes: bp-based frame

sub_4389B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= word ptr	 0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_402430
cmp	[ebp+arg_0], eax
ja	short loc_4389E6
mov	ecx, [ebp+var_4]
call	sub_402CE0
push	eax
mov	ecx, [ebp+var_4]
call	sub_404430
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_4]
call	sub_4043F0
jmp	short loc_438A01

loc_4389E6:
movzx	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_402430
mov	ecx, [ebp+arg_0]
sub	ecx, eax
push	ecx
mov	ecx, [ebp+var_4]
call	sub_43AFB0

loc_438A01:
mov	esp, ebp
pop	ebp
retn	8
sub_4389B0 endp

align 10h


; Attributes: bp-based frame

sub_438A10 proc	near

var_2C=	dword ptr -2Ch
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
call	sub_404440
cmp	eax, 1
jnz	short loc_438A39
push	1
mov	ecx, [ebp+var_2C]
call	sub_404390
push	eax
mov	ecx, [ebp+var_2C]
call	sub_42BFB0

loc_438A39:
mov	ecx, [ebp+var_2C]
call	sub_402CE0
add	eax, 2
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4077A0
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_402CE0
push	eax
call	sub_405EC0
add	esp, 8
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+20h]
add	edx, 2
mov	eax, [ebp+var_2C]
mov	[eax+20h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_438A10 endp

align 10h


; Attributes: bp-based frame

sub_438A80 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_402430
mov	[ebp+var_8], eax
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_8]
jbe	short loc_438AA4
mov	ecx, [ebp+var_20]
call	sub_43AF90

loc_438AA4:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_20]
call	sub_4043E0
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_4]
sub	eax, edx
cmp	[ebp+arg_C], eax
jbe	short loc_438ADF
mov	ecx, [ebp+var_20]
call	loc_407740

loc_438ADF:
mov	ecx, [ebp+var_20]
call	sub_404430
cmp	[ebp+arg_8], eax
jb	short loc_438B02
mov	ecx, [ebp+var_20]
call	sub_402CE0
cmp	[ebp+arg_8], eax
jnb	short loc_438B02
mov	[ebp+var_24], 1
jmp	short loc_438B09

loc_438B02:
mov	[ebp+var_24], 0

loc_438B09:
movzx	eax, byte ptr [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_8]
lea	eax, [edx+ecx*2]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_404430
mov	edx, [ebp+arg_0]
lea	eax, [eax+edx*2]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_20]
call	sub_404430
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_20]
call	sub_43B080
mov	esp, ebp
pop	ebp
retn	10h
sub_438A80 endp

align 10h


; Attributes: bp-based frame

sub_438B50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_41ACE0
or	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_C]
mov	ecx, [eax+58h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_438B7E
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
jmp	short loc_438B87

loc_438B7E:
mov	eax, [ebp+var_8]
or	eax, 1
mov	[ebp+var_10], eax

loc_438B87:
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_405EB0
mov	ecx, [ebp+var_C]
call	sub_405EA0
mov	esp, ebp
pop	ebp
retn	4
sub_438B50 endp

align 10h


; Attributes: bp-based frame

sub_438BB0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_34]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_438BB0 endp

align 10h


; Attributes: bp-based frame

sub_438C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_438CC5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_43D050
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_438CC5:
mov	esp, ebp
pop	ebp
retn
sub_438C80 endp

align 10h


; Attributes: bp-based frame

sub_438CD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438CD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_438D1F
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_1547744
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_438D1F:
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	dword ptr [edx+ecx], offset off_1446290
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
add	ecx, [eax+4]
call	sub_43BA90
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_438CD0 endp

; [0000006B BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000098 BYTES: COLLAPSED FUNCTION sub_438DE0. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_438E80 proc	near

var_14=	dword ptr -14h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_438E96
mov	eax, [ebp+arg_0]
jmp	short loc_438EDD

loc_438E96:
xor	ecx, ecx
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_406610
add	esp, 10h
mov	[ebp+var_8], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	nullsub_1
add	esp, 8
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]

loc_438EDD:
mov	esp, ebp
pop	ebp
retn	8
sub_438E80 endp

align 10h


; Attributes: bp-based frame

sub_438EF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ABA00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_438F38
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [ecx+8]
sub	eax, [edx]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx		; void *
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_4079C0

loc_438F38:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 8
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_438EF0 endp

align 10h


; Attributes: bp-based frame

sub_438F60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_43D720
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_438F60 endp

align 10h


; Attributes: bp-based frame

sub_438FB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6440
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
add	eax, 24h
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_438FB0 endp

align 10h


; Attributes: bp-based frame

sub_439010 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_43E8E0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_439010 endp

align 10h


; Attributes: bp-based frame

sub_439060 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
add	eax, 24h
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403400
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_439060 endp

align 10h


; Attributes: bp-based frame

sub_4390C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4390C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_34]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4390C0 endp

align 10h


; Attributes: bp-based frame

sub_439190 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439520
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
cmp	dword ptr [eax], 0
jz	short loc_4391EF
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_4391EF
mov	eax, [ebp+var_14]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4391EF:
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_18], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_439190 endp



; Attributes: bp-based frame

sub_439220 proc	near

var_84=	dword ptr -84h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_43923C
mov	eax, [ebp+arg_0]
jmp	short loc_439258

loc_43923C:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_84]
call	sub_439EC0

loc_439258:
mov	esp, ebp
pop	ebp
retn	8
sub_439220 endp

align 10h


; Attributes: bp-based frame

sub_439260 proc	near

var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= word ptr	-6
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
xor	edx, edx
mov	byte ptr [ebp+var_8+1],	dl
mov	al, byte ptr [ebp+var_8+1]
mov	byte ptr [ebp+var_6+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_8], cl
mov	dl, byte ptr [ebp+var_8]
mov	byte ptr [ebp+var_6], dl
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
mov	esp, ebp
pop	ebp
retn
sub_439260 endp

align 10h


; Attributes: bp-based frame

sub_4392A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+14h]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_4392F4
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+14h], 0
jz	short loc_4392F4
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_C]
mov	ecx, [edx]
sub	ecx, [eax+14h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx+14h]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4392F4
mov	ecx, [ebp+var_8]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4392F4:
mov	esp, ebp
pop	ebp
retn
sub_4392A0 endp

align 10h


; Attributes: bp-based frame

sub_439300 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	[eax+10h], ecx
mov	edx, [ebp+var_14]
add	edx, 14h
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_14]
call	sub_4407A0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_439300 endp

align 10h


; Attributes: bp-based frame

sub_439370 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_443300
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4393C7
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4393C7:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_439370 endp

align 10h


; Attributes: bp-based frame

sub_4393E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_439425
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4409D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_439425:
mov	esp, ebp
pop	ebp
retn
sub_4393E0 endp

align 10h


; Attributes: bp-based frame

sub_439430 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_43948F
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 3
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_43948F
mov	eax, [ebp+var_14]
shl	eax, 3
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_43948F:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_439430 endp

align 10h
; [0000006B BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000095 BYTES: COLLAPSED FUNCTION sub_439520. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4395C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_439605
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_440C50
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_439605:
mov	esp, ebp
pop	ebp
retn
sub_4395C0 endp

align 10h


; Attributes: bp-based frame

sub_439610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_439655
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_440CB0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_439655:
mov	esp, ebp
pop	ebp
retn
sub_439610 endp

align 10h


; Attributes: bp-based frame

sub_439660 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4396C4
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_4396C4
mov	ecx, [ebp+var_14]
imul	ecx, 2Ch
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4396C4:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_439660 endp



; Attributes: bp-based frame

sub_4396E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_439725
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_440D10
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_439725:
mov	esp, ebp
pop	ebp
retn
sub_4396E0 endp

align 10h


; Attributes: bp-based frame

sub_439730 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ABA70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_48]
call	sub_5E11A0
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_48]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_48]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 0
jz	short loc_43985C
mov	ecx, [ebp+var_48]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_440D80
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_40], eax

loc_439819:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+8], 0
jz	short loc_43982D
mov	edx, [ebp+var_40]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
jmp	short loc_439819

loc_43982D:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx

loc_43983F:
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_439853
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_44], ecx
jmp	short loc_43983F

loc_439853:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_43985C:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_439730 endp

align 10h


; Attributes: bp-based frame

sub_439890 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_443370
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4398E7
mov	edx, 1
imul	edx, 74h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4398E7:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_439890 endp

align 10h


; Attributes: bp-based frame

sub_439900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_439945
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_441E30
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_439945:
mov	esp, ebp
pop	ebp
retn
sub_439900 endp

align 10h


; Attributes: bp-based frame

sub_439950 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439950
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_34]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_439950 endp

align 10h


; Attributes: bp-based frame

sub_439A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_439A65
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4420F0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_439A65:
mov	esp, ebp
pop	ebp
retn
sub_439A20 endp

align 10h


; Attributes: bp-based frame

sub_439A70 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439A70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_34]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_439A70 endp

align 10h


; Attributes: bp-based frame

sub_439B40 proc	near

var_24=	dword ptr -24h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_439B56
mov	eax, [ebp+arg_0]
jmp	short loc_439B9D

loc_439B56:
xor	ecx, ecx
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_443520
add	esp, 10h
mov	[ebp+var_8], eax
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_4435A0
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]

loc_439B9D:
mov	esp, ebp
pop	ebp
retn	8
sub_439B40 endp

align 10h


; Attributes: bp-based frame

sub_439BB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_439BB0 endp

align 10h


; Attributes: bp-based frame

sub_439BF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451400
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_439BF0 endp

align 10h


; Attributes: bp-based frame

sub_439C40 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439C40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx		; void *
call	sub_4433A0
add	esp, 8
jmp	short loc_439CBF

loc_439C8E:
cmp	[ebp+var_14], 0
jz	short loc_439CA9
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_439CA9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_439CC6
retn

loc_439CBF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_439CC6:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_439C40 endp

align 10h


; Attributes: bp-based frame

sub_439CE0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439CE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx		; void *
call	sub_452030
add	esp, 8
jmp	short loc_439D5F

loc_439D2E:
cmp	[ebp+var_14], 0
jz	short loc_439D49
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_439D49:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_439D66
retn

loc_439D5F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_439D66:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_439CE0 endp

align 10h


; Attributes: bp-based frame

sub_439D80 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439D80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_43A200
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	eax, [ebp+arg_0]
call	sub_405760
jmp	short loc_439DEC

loc_439DC9:
mov	eax, 1
mov	ecx, [ebp+var_14] ; void *
call	sub_404550
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_439DF3
retn

loc_439DEC:
mov	[ebp+var_4], 0FFFFFFFFh

loc_439DF3:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_439D80 endp

align 10h


; Attributes: bp-based frame

sub_439E10 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_458FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_439E10 endp

align 10h


; Attributes: bp-based frame

sub_439EC0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_80], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_80]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_10]
sar	edx, 6
mov	[ebp+var_C], edx
jmp	short loc_439EFD

loc_439EF4:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_439EFD:
cmp	[ebp+var_C], 0
jle	short loc_439F23
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_44CDB0
mov	edx, [ebp+var_10]
add	edx, 40h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
add	eax, 40h
mov	[ebp+var_14], eax
jmp	short loc_439EF4

loc_439F23:
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_80]
mov	eax, [edx+4]
mov	[ebp+var_7C], eax
push	0
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_44C150
add	esp, 0Ch
mov	eax, [ebp+var_80]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_439EC0 endp

align 10h


; Attributes: bp-based frame

sub_439F60 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jb	short loc_439F9C
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+4]
jnb	short loc_439F9C
mov	[ebp+var_40], 1
jmp	short loc_439FA3

loc_439F9C:
mov	[ebp+var_40], 0

loc_439FA3:
movzx	ecx, byte ptr [ebp+var_40]
test	ecx, ecx
jz	short loc_439FF1
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_34]
call	sub_403400
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_35], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_35]
push	eax
lea	ecx, [ebp+var_34]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_440A30
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_34]
call	sub_407E50
jmp	short loc_43A013

loc_439FF1:
xor	eax, eax
mov	[ebp+var_36], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_36]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_440A30

loc_43A013:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_439F60 endp

align 10h


; Attributes: bp-based frame

sub_43A030 proc	near

var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
jmp	short loc_43A062

loc_43A050:
mov	ecx, [ebp+var_4]
add	ecx, 28h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
add	edx, 28h
mov	[ebp+var_C], edx

loc_43A062:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_43A08C
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_43A08C
mov	ecx, [ebp+var_4]
call	sub_4054E0
mov	edx, [ebp+var_C]
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_443430
add	esp, 8
jmp	short loc_43A050

loc_43A08C:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jz	short loc_43A0AB
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_4434E0
add	esp, 8
xor	ecx, ecx
mov	[ebp+var_35], cl
jmp	short loc_43A0E3

loc_43A0AB:
jmp	short loc_43A0BF

loc_43A0AD:
mov	edx, [ebp+var_4]
add	edx, 28h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
add	eax, 28h
mov	[ebp+var_C], eax

loc_43A0BF:
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_43A0DE
xor	edx, edx
mov	[ebp+var_36], dl
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_443430
add	esp, 8
jmp	short loc_43A0AD

loc_43A0DE:
xor	edx, edx
mov	[ebp+var_6D], dl

loc_43A0E3:
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43A030 endp

align 10h


; Attributes: bp-based frame

sub_43A100 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43A100 endp

align 10h


; Attributes: bp-based frame

sub_43A150 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43A150
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_43A150 endp

align 10h


; Attributes: bp-based frame

sub_43A200 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 7FFFFFFh
jbe	short loc_43A228
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_43A228:
cmp	[ebp+arg_0], 0
jz	short loc_43A24E
mov	ecx, [ebp+arg_0]
shl	ecx, 5
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_43A255

loc_43A24E:
mov	[ebp+var_18], 0

loc_43A255:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_43A200 endp

align 10h


; Attributes: bp-based frame

sub_43A260 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_43A291:
cmp	[ebp+var_1C], 0
jz	short loc_43A308
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_40]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_43A2F7
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_74], ecx
jmp	short loc_43A300

loc_43A2F7:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_74], eax

loc_43A300:
mov	ecx, [ebp+var_74]
mov	[ebp+var_1C], ecx
jmp	short loc_43A291

loc_43A308:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_43A3AA
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_50]
setz	cl
mov	[ebp+var_75], cl
movzx	edx, [ebp+var_75]
test	edx, edx
jz	short loc_43A39B
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_68]
call	sub_444DB0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_43A456
jmp	short loc_43A3AA

loc_43A39B:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_43A3AA:
lea	edx, [ebp+var_32]
mov	[ebp+var_7C], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_60], eax
lea	ecx, [ebp+var_59]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_60]
add	edx, 10h
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_43A43B
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_68]
call	sub_444DB0
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_43A456

loc_43A43B:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_43A456:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43A260 endp

align 10h


; Attributes: bp-based frame

sub_43A470 proc	near

var_2C=	dword ptr -2Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
add	ecx, 14h
call	sub_407C40
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_61ED00
push	eax
mov	ecx, [ebp+var_2C]
call	sub_5F52F0
push	eax
call	sub_404B30
add	esp, 0Ch
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_407C80
mov	ecx, [ebp+var_2C]
call	sub_4079F0
mov	ecx, [ebp+var_4]
add	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_404310
mov	esp, ebp
pop	ebp
retn	4
sub_43A470 endp

align 10h


; Attributes: bp-based frame

sub_43A4F0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_404790
cmp	[ebp+arg_0], eax
jbe	short loc_43A50E
mov	ecx, [ebp+var_1C]
call	loc_407740

loc_43A50E:
mov	ecx, [ebp+var_1C]
call	sub_4042A0
mov	[ebp+var_8], eax
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [eax]
add	edx, 1
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_1C]
call	sub_4079B0
movzx	eax, al
test	eax, eax
jz	short loc_43A549
mov	[ebp+var_20], 10h
jmp	short loc_43A557

loc_43A549:
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	eax, [ecx]
sub	eax, [edx+14h]
mov	[ebp+var_20], eax

loc_43A557:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_20]
jnb	short loc_43A561
jmp	short loc_43A56D

loc_43A561:
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_43A470

loc_43A56D:
mov	esp, ebp
pop	ebp
retn	4
sub_43A4F0 endp

align 10h


; Attributes: bp-based frame

sub_43A580 proc	near

var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	dword ptr -34h
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
push	esi
mov	[ebp+var_44], ecx
cmp	[ebp+arg_0], 0
jbe	loc_43A640
mov	ecx, [ebp+var_44]
call	sub_404790
mov	esi, eax
mov	ecx, [ebp+var_44]
call	sub_4042A0
sub	esi, eax
cmp	[ebp+arg_0], esi
jbe	short loc_43A5B5
mov	ecx, [ebp+var_44]
call	loc_407740

loc_43A5B5:
mov	ecx, [ebp+var_44]
call	sub_4042F0
cmp	[ebp+arg_0], eax
jb	short loc_43A5D7
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_44]
call	sub_404250
push	eax
mov	ecx, [ebp+var_44]
call	sub_43A470

loc_43A5D7:
mov	ecx, [ebp+var_44]
mov	edx, [ecx+10h]
add	edx, 1
mov	[ebp+var_3C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_3C]
lea	edx, [ecx+eax-1]
mov	[ebp+var_34], edx
push	0
lea	eax, [ebp+var_35]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_3C]
push	eax
call	sub_44D880
add	esp, 14h
mov	ecx, [ebp+var_44]
mov	edx, [ecx+10h]
add	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_44]
call	sub_407C80
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_44]
call	sub_61ED00
push	eax
call	sub_405ED0
add	esp, 8
mov	ecx, [ebp+var_44]
mov	edx, [ecx+10h]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_44]
mov	[eax+10h], edx

loc_43A640:
mov	eax, [ebp+var_44]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_43A580 endp

align 10h


; Attributes: bp-based frame

sub_43A650 proc	near

var_50=	dword ptr -50h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_50]
call	sub_4042F0
cmp	eax, 1
jbe	short loc_43A6BF
mov	ecx, [ebp+var_50]
mov	edx, [ecx+10h]
add	edx, 1
push	edx
mov	ecx, [ebp+var_50]
call	sub_407C80
mov	eax, [ebp+var_50]
mov	ecx, [eax+10h]
sub	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 1
push	eax
call	sub_404770
add	esp, 0Ch
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405ED0
add	esp, 8
mov	eax, [ebp+var_50]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_50]
mov	[edx+10h], ecx
jmp	loc_43A75C

loc_43A6BF:
push	1
mov	ecx, [ebp+var_50]
call	sub_404250
mov	[ebp+var_8], eax
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_50]
add	ecx, 14h
call	sub_407C40
mov	[ebp+var_C], eax
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5F52F0
push	eax
call	sub_404B30
add	esp, 0Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_405ED0
add	esp, 8
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_50]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_404B30
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_50]
call	sub_407C80
mov	ecx, [ebp+var_50]
call	sub_4079F0
mov	eax, [ebp+var_C]
add	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_50]
call	sub_404310

loc_43A75C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_43A650 endp

align 10h


; Attributes: bp-based frame

sub_43A770 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jl	short loc_43A7F3
movzx	eax, [ebp+arg_10]
test	eax, eax
jz	short loc_43A7AB
mov	ecx, [ebp+arg_C]
cmp	ecx, [ebp+arg_0]
jb	short loc_43A7AB
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_4]
jb	short loc_43A7C4

loc_43A7AB:
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405E00
add	esp, 0Ch
jmp	short loc_43A7DB

loc_43A7C4:
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_404770
add	esp, 0Ch

loc_43A7DB:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4042B0
jmp	loc_43A8E9

loc_43A7F3:
movzx	edx, [ebp+arg_10]
test	edx, edx
jz	short loc_43A80B
mov	eax, [ebp+arg_8]
cmp	eax, [ebp+arg_4]
jnb	short loc_43A80B
mov	ecx, [ebp+arg_C]
cmp	ecx, [ebp+arg_0]
ja	short loc_43A849

loc_43A80B:
mov	edx, [ebp+arg_8]
add	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
sub	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405E00
add	esp, 0Ch
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_444F50
jmp	loc_43A8E9

loc_43A849:
mov	ecx, [ebp+arg_8]
cmp	ecx, [ebp+arg_0]
jnb	short loc_43A8B6
mov	edx, [ebp+arg_8]
add	edx, [ebp+var_4]
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_20]
call	sub_5F52F0
mov	ecx, [ebp+arg_0]
sub	ecx, eax
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_20]
call	sub_5F52F0
mov	edx, [ebp+arg_8]
sub	edx, eax
mov	[ebp+var_10], edx
push	1
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_20]
call	sub_444F50
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5F52F0
add	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5F52F0
add	eax, [ebp+var_18]
push	eax
call	sub_404770
add	esp, 0Ch
jmp	short loc_43A8E9

loc_43A8B6:
mov	ecx, [ebp+arg_8]
add	ecx, [ebp+var_4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_404770
add	esp, 0Ch
push	1
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_444F50

loc_43A8E9:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	14h
sub_43A770 endp

align 10h


; Attributes: bp-based frame

sub_43A900 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43AD90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_4042A0
cmp	[ebp+arg_4], eax
jb	short loc_43A930
or	eax, 0FFFFFFFFh
jmp	short loc_43A9AF

loc_43A930:
mov	[ebp+var_4], 0
mov	al, [ebp+arg_0]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_11]
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_1C]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+var_18]
call	sub_61ED00
push	eax
mov	ecx, [ebp+var_18]
call	sub_5F52F0
add	eax, [ebp+arg_4]
push	eax
call	sub_4451C0
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_61ED00
cmp	[ebp+var_10], eax
jz	short loc_43A9A5
mov	ecx, [ebp+var_18]
call	sub_5F52F0
mov	ecx, [ebp+var_10]
sub	ecx, eax
mov	[ebp+var_20], ecx
jmp	short loc_43A9AC

loc_43A9A5:
mov	[ebp+var_20], 0FFFFFFFFh

loc_43A9AC:
mov	eax, [ebp+var_20]

loc_43A9AF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43A900 endp

align 10h


; Attributes: bp-based frame

sub_43A9C0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43A9C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_4042A0
mov	[ebp+var_10], eax
mov	eax, dword ptr [ebp+arg_4]
cmp	eax, [ebp+var_10]
jnb	short loc_43A9FC
mov	ecx, dword ptr [ebp+arg_4]
add	ecx, dword ptr [ebp+arg_4+4]
cmp	ecx, [ebp+var_10]
jbe	short loc_43AA14

loc_43A9FC:
cmp	dword ptr [ebp+arg_4+4], 0
jnz	short loc_43AA0F
mov	edx, dword ptr [ebp+arg_4]
cmp	edx, [ebp+var_10]
ja	short loc_43AA0F
mov	eax, dword ptr [ebp+arg_4]
jmp	short loc_43AA88

loc_43AA0F:
or	eax, 0FFFFFFFFh
jmp	short loc_43AA88

loc_43AA14:
mov	al, [ebp+var_15]
mov	[ebp+var_16], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_16]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, dword ptr [ebp+arg_4+4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_61ED00
push	eax
mov	ecx, [ebp+var_1C]
call	sub_5F52F0
add	eax, dword ptr [ebp+arg_4]
push	eax
call	sub_445220
add	esp, 14h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
call	sub_61ED00
cmp	[ebp+var_14], eax
jz	short loc_43AA7E
mov	ecx, [ebp+var_1C]
call	sub_5F52F0
mov	ecx, [ebp+var_14]
sub	ecx, eax
mov	[ebp+var_20], ecx
jmp	short loc_43AA85

loc_43AA7E:
mov	[ebp+var_20], 0FFFFFFFFh

loc_43AA85:
mov	eax, [ebp+var_20]

loc_43AA88:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43A9C0 endp

align 10h


; Attributes: bp-based frame

sub_43AAA0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43AAA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
push	esi
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
call	sub_4042A0
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 1
jnb	short loc_43AAD8
or	eax, 0FFFFFFFFh
jmp	loc_43ABBB

loc_43AAD8:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_48]
call	sub_5F52F0
mov	esi, eax
lea	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
lea	ecx, [esi+eax+1]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	dl, [ebp+arg_0]
mov	[ebp+var_1D], dl
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_1D]
mov	[ebp+var_4C], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_4C]
movzx	edx, byte ptr [ecx]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_48]
call	sub_5F52F0
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_34]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_28], esp
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
lea	eax, [ebp+var_14]
push	eax
call	sub_445400
add	esp, 10h
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_48]
call	sub_5F52F0
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_14]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_43ABB1
mov	edx, [ebp+var_14]
mov	[ebp+var_44], edx
mov	esi, [ebp+var_44]
sub	esi, 1
mov	ecx, [ebp+var_48]
call	sub_5F52F0
sub	esi, eax
mov	[ebp+var_50], esi
jmp	short loc_43ABB8

loc_43ABB1:
mov	[ebp+var_50], 0FFFFFFFFh

loc_43ABB8:
mov	eax, [ebp+var_50]

loc_43ABBB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_43AAA0 endp

align 10h


; Attributes: bp-based frame

sub_43ABD0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43ABD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
call	sub_4042A0
cmp	[ebp+arg_4], eax
jb	short loc_43AC08
or	eax, 0FFFFFFFFh
jmp	loc_43AC9E
jmp	loc_43AC9E

loc_43AC08:
mov	ecx, [ebp+var_50]
call	sub_61ED00
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_50]
call	sub_5F52F0
add	eax, [ebp+arg_4]
mov	[ebp+var_48], eax
xor	eax, eax
mov	[ebp+var_11], al
xor	ecx, ecx
mov	[ebp+var_19], cl
mov	dl, [ebp+var_1A]
mov	[ebp+var_1B], dl
mov	[ebp+var_4], 0
lea	eax, [ebp+var_19]
push	eax
movzx	ecx, [ebp+var_1B]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_48]
push	edx
call	sub_452D20
add	esp, 1Ch
mov	[ebp+var_18], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_50]
call	sub_61ED00
cmp	[ebp+var_10], eax
jz	short loc_43AC94
mov	ecx, [ebp+var_50]
call	sub_5F52F0
mov	ecx, [ebp+var_10]
sub	ecx, eax
mov	[ebp+var_54], ecx
jmp	short loc_43AC9B

loc_43AC94:
mov	[ebp+var_54], 0FFFFFFFFh

loc_43AC9B:
mov	eax, [ebp+var_54]

loc_43AC9E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43ABD0 endp

align 10h


; Attributes: bp-based frame

sub_43ACB0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
push	esi
mov	[ebp+var_74], ecx
mov	ecx, [ebp+var_74]
call	sub_4042A0
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 1
jnb	short loc_43ACD3
or	eax, 0FFFFFFFFh
jmp	loc_43AD83

loc_43ACD3:
mov	eax, [ebp+var_4]
sub	eax, 1
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_74]
call	sub_5F52F0
mov	esi, eax
lea	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_10]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
lea	ecx, [esi+eax+1]
mov	[ebp+var_C], ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_74]
call	sub_5F52F0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
push	ecx
mov	[ebp+var_2C], esp
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_445480
add	esp, 18h
mov	ecx, [ebp+var_74]
call	sub_5F52F0
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_1C]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_43AD79
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	esi, [ebp+var_70]
sub	esi, 1
mov	ecx, [ebp+var_74]
call	sub_5F52F0
sub	esi, eax
mov	[ebp+var_78], esi
jmp	short loc_43AD80

loc_43AD79:
mov	[ebp+var_78], 0FFFFFFFFh

loc_43AD80:
mov	eax, [ebp+var_78]

loc_43AD83:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43ACB0 endp

align 10h


; Attributes: bp-based frame

sub_43AD90 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43AD90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_4042A0
cmp	eax, 1
jnb	short loc_43ADC2
or	eax, 0FFFFFFFFh
jmp	short loc_43AE3F
jmp	short loc_43AE3F

loc_43ADC2:
mov	[ebp+var_4], 0
mov	al, [ebp+arg_0]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_11]
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_1C]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+var_18]
call	sub_61ED00
push	eax
mov	ecx, [ebp+var_18]
call	sub_5F52F0
add	eax, [ebp+arg_4]
push	eax
call	sub_4454E0
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
cmp	edx, [ecx+10h]
jz	short loc_43AE35
mov	ecx, [ebp+var_18]
call	sub_5F52F0
mov	ecx, [ebp+var_10]
sub	ecx, eax
mov	[ebp+var_20], ecx
jmp	short loc_43AE3C

loc_43AE35:
mov	[ebp+var_20], 0FFFFFFFFh

loc_43AE3C:
mov	eax, [ebp+var_20]

loc_43AE3F:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43AD90 endp

align 10h


; Attributes: bp-based frame

sub_43AE50 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43AE50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
push	esi
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_4C]
call	sub_4042A0
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 1
jnb	short loc_43AE88
or	eax, 0FFFFFFFFh
jmp	loc_43AF71

loc_43AE88:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_4C]
call	sub_5F52F0
mov	esi, eax
lea	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_20]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
lea	ecx, [esi+eax+1]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 0
mov	al, [ebp+arg_0]
mov	[ebp+var_21], al
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_21]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_50]
movzx	eax, byte ptr [edx]
push	eax
push	ecx
mov	ecx, esp
mov	[ebp+var_28], esp
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_4C]
call	sub_5F52F0
mov	[ebp+var_38], eax
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_2C], esp
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_1C]
mov	[edx], eax
lea	ecx, [ebp+var_14]
push	ecx
call	sub_445540
add	esp, 10h
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_4C]
call	sub_5F52F0
mov	[ebp+var_44], eax
mov	edx, [ebp+var_44]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_14]
xor	ecx, ecx
cmp	eax, [ebp+var_30]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_43AF67
mov	eax, [ebp+var_14]
mov	[ebp+var_48], eax
mov	esi, [ebp+var_48]
sub	esi, 1
mov	ecx, [ebp+var_4C]
call	sub_5F52F0
sub	esi, eax
mov	[ebp+var_54], esi
jmp	short loc_43AF6E

loc_43AF67:
mov	[ebp+var_54], 0FFFFFFFFh

loc_43AF6E:
mov	eax, [ebp+var_54]

loc_43AF71:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_43AE50 endp

align 10h


; Attributes: noreturn bp-based	frame

sub_43AF90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset aBasic_string ; "basic_string"
call	sub_77EBC0
sub_43AF90 endp

mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_43AFB0 proc	near

var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	dword ptr -34h
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
push	esi
mov	[ebp+var_44], ecx
cmp	[ebp+arg_0], 0
jbe	loc_43B076
mov	ecx, [ebp+var_44]
call	sub_4043E0
mov	esi, eax
mov	ecx, [ebp+var_44]
call	sub_402430
sub	esi, eax
cmp	[ebp+arg_0], esi
jbe	short loc_43AFE5
mov	ecx, [ebp+var_44]
call	loc_407740

loc_43AFE5:
mov	ecx, [ebp+var_44]
call	sub_404440
cmp	[ebp+arg_0], eax
jb	short loc_43B007
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_44]
call	sub_404390
push	eax
mov	ecx, [ebp+var_44]
call	sub_42BFB0

loc_43B007:
mov	ecx, [ebp+var_44]
mov	edx, [ecx+20h]
add	edx, 2
mov	[ebp+var_3C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_3C]
lea	edx, [ecx+eax*2-2]
mov	[ebp+var_34], edx
push	0
lea	eax, [ebp+var_35]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_3C]
push	eax
call	sub_44E3E0
add	esp, 14h
mov	ecx, [ebp+var_44]
mov	edx, [ecx+20h]
mov	eax, [ebp+arg_0]
lea	ecx, [edx+eax*2]
push	ecx
mov	ecx, [ebp+var_44]
call	sub_4077A0
lea	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_44]
call	sub_402CE0
push	eax
call	sub_405EC0
add	esp, 8
mov	eax, [ebp+var_44]
mov	ecx, [eax+20h]
mov	edx, [ebp+arg_0]
lea	eax, [ecx+edx*2]
mov	ecx, [ebp+var_44]
mov	[ecx+20h], eax

loc_43B076:
mov	eax, [ebp+var_44]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_43AFB0 endp



; Attributes: bp-based frame

sub_43B080 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jl	short loc_43B10E
movzx	eax, [ebp+arg_10]
test	eax, eax
jz	short loc_43B0BF
mov	ecx, [ebp+arg_C]
cmp	ecx, [ebp+arg_0]
jb	short loc_43B0BF
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_4]
jb	short loc_43B0DA

loc_43B0BF:
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
sar	eax, 1
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406C60
add	esp, 0Ch
jmp	short loc_43B0F3

loc_43B0DA:
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
sar	eax, 1
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405D70
add	esp, 0Ch

loc_43B0F3:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*2]
push	eax
mov	ecx, [ebp+var_20]
call	sub_4043F0
jmp	loc_43B219

loc_43B10E:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jz	short loc_43B126
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_4]
jnb	short loc_43B126
mov	eax, [ebp+arg_C]
cmp	eax, [ebp+arg_0]
ja	short loc_43B169

loc_43B126:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_8]
lea	eax, [edx+ecx*2]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
sub	ecx, [ebp+arg_8]
sar	ecx, 1
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_406C60
add	esp, 0Ch
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4455C0
jmp	loc_43B219

loc_43B169:
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_0]
jnb	short loc_43B1E3
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_20]
call	sub_404430
mov	ecx, [ebp+arg_0]
sub	ecx, eax
sar	ecx, 1
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_20]
call	sub_404430
mov	edx, [ebp+arg_8]
sub	edx, eax
sar	edx, 1
mov	[ebp+var_10], edx
push	1
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_20]
call	sub_4455C0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_404430
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_20]
call	sub_404430
mov	ecx, [ebp+var_18]
lea	edx, [eax+ecx*2]
push	edx
call	sub_405D70
add	esp, 0Ch
jmp	short loc_43B219

loc_43B1E3:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405D70
add	esp, 0Ch
push	1
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_20]
call	sub_4455C0

loc_43B219:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	14h
sub_43B080 endp

align 10h


; Attributes: bp-based frame

sub_43B230 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
push	esi
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_402430
cmp	[ebp+arg_4], eax
jb	short loc_43B261
or	eax, 0FFFFFFFFh
jmp	short loc_43B2DE

loc_43B261:
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_12]
call	sub_404700
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
movzx	edx, word ptr [ecx]
push	edx
mov	ecx, [ebp+var_18]
call	sub_402CE0
mov	esi, eax
mov	ecx, [ebp+var_18]
call	sub_404430
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*2]
push	edx
call	sub_405770
add	esp, 8
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	ecx, [ebp+var_18]
call	sub_402CE0
cmp	[ebp+var_10], eax
jz	short loc_43B2D4
mov	ecx, [ebp+var_18]
call	sub_404430
mov	ecx, [ebp+var_10]
sub	ecx, eax
sar	ecx, 1
mov	[ebp+var_24], ecx
jmp	short loc_43B2DB

loc_43B2D4:
mov	[ebp+var_24], 0FFFFFFFFh

loc_43B2DB:
mov	eax, [ebp+var_24]

loc_43B2DE:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_43B230 endp

align 10h


; Attributes: bp-based frame

sub_43B2F0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1E=	byte ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
push	esi
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_4C]
call	sub_402430
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 1
jnb	short loc_43B328
or	eax, 0FFFFFFFFh
jmp	loc_43B409

loc_43B328:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_4C]
call	sub_404430
mov	[ebp+var_30], eax
lea	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
mov	ecx, [ebp+var_30]
lea	edx, [ecx+eax*2+2]
mov	[ebp+var_18], edx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_1E]
call	sub_404700
mov	[ebp+var_50], eax
mov	eax, [ebp+var_50]
mov	[ebp+var_54], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_54]
movzx	edx, word ptr [ecx]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_4C]
call	sub_404430
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_38]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_28], esp
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_18]
mov	[ecx], edx
lea	eax, [ebp+var_14]
push	eax
call	sub_445850
add	esp, 10h
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	ecx, [ebp+var_4C]
call	sub_404430
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_14]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_43B3FF
mov	edx, [ebp+var_14]
mov	[ebp+var_48], edx
mov	esi, [ebp+var_48]
sub	esi, 2
mov	ecx, [ebp+var_4C]
call	sub_404430
sub	esi, eax
sar	esi, 1
mov	[ebp+var_58], esi
jmp	short loc_43B406

loc_43B3FF:
mov	[ebp+var_58], 0FFFFFFFFh

loc_43B406:
mov	eax, [ebp+var_58]

loc_43B409:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_43B2F0 endp

align 10h


; Attributes: bp-based frame

sub_43B420 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
push	esi
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_402430
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+arg_8]
jnb	short loc_43B45A
or	eax, 0FFFFFFFFh
jmp	loc_43B50E

loc_43B45A:
mov	ecx, [ebp+var_10]
sub	ecx, [ebp+arg_8]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_28]
call	sub_404430
mov	esi, eax
lea	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_1C]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
lea	edx, [esi+ecx*2]
mov	eax, [ebp+arg_8]
lea	ecx, [edx+eax*2]
mov	[ebp+var_18], ecx
cmp	[ebp+arg_8], 0
jnz	short loc_43B4A4
mov	ecx, [ebp+var_28]
call	sub_404430
mov	edx, [ebp+var_18]
sub	edx, eax
sar	edx, 1
mov	eax, edx
jmp	short loc_43B50E

loc_43B4A4:
mov	al, [ebp+var_1D]
mov	[ebp+var_1E], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_1E]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*2]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_28]
call	sub_404430
push	eax
call	sub_4458D0
add	esp, 14h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+var_18]
jz	short loc_43B504
mov	ecx, [ebp+var_28]
call	sub_404430
mov	edx, [ebp+var_14]
sub	edx, eax
sar	edx, 1
mov	[ebp+var_2C], edx
jmp	short loc_43B50B

loc_43B504:
mov	[ebp+var_2C], 0FFFFFFFFh

loc_43B50B:
mov	eax, [ebp+var_2C]

loc_43B50E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43B420 endp

align 10h


; Attributes: bp-based frame

sub_43B520 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_402430
cmp	[ebp+arg_4], eax
jb	short loc_43B558
or	eax, 0FFFFFFFFh
jmp	loc_43B5E9
jmp	loc_43B5E9

loc_43B558:
mov	ecx, [ebp+var_28]
call	sub_402CE0
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_28]
call	sub_404430
mov	[ebp+var_18], eax
xor	eax, eax
mov	[ebp+var_19], al
mov	cl, [ebp+var_21]
mov	[ebp+var_22], cl
mov	[ebp+var_4], 0
movzx	edx, [ebp+var_22]
push	edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
lea	ecx, [eax+edx*2]
push	ecx
call	sub_451C30
add	esp, 14h
mov	[ebp+var_20], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	edx, [ebp+var_20]
mov	[ebp+var_10], edx
mov	ecx, [ebp+var_28]
call	sub_402CE0
cmp	[ebp+var_10], eax
jz	short loc_43B5DF
mov	ecx, [ebp+var_28]
call	sub_404430
mov	ecx, [ebp+var_10]
sub	ecx, eax
sar	ecx, 1
mov	[ebp+var_2C], ecx
jmp	short loc_43B5E6

loc_43B5DF:
mov	[ebp+var_2C], 0FFFFFFFFh

loc_43B5E6:
mov	eax, [ebp+var_2C]

loc_43B5E9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43B520 endp

align 10h


; Attributes: bp-based frame

sub_43B600 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 64h
push	esi
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
call	sub_402430
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 1
jnb	short loc_43B623
or	eax, 0FFFFFFFFh
jmp	loc_43B6DC

loc_43B623:
mov	eax, [ebp+var_4]
sub	eax, 1
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_60]
call	sub_404430
mov	[ebp+var_20], eax
lea	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_10]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
mov	ecx, [ebp+var_20]
lea	edx, [ecx+eax*2+2]
mov	[ebp+var_C], edx
push	0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_60]
call	sub_404430
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_28]
mov	[ecx], edx
push	ecx
mov	[ebp+var_30], esp
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_445940
add	esp, 18h
mov	ecx, [ebp+var_60]
call	sub_404430
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_1C]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_43B6D2
mov	ecx, [ebp+var_8]
mov	[ebp+var_5C], ecx
mov	esi, [ebp+var_5C]
sub	esi, 2
mov	ecx, [ebp+var_60]
call	sub_404430
sub	esi, eax
sar	esi, 1
mov	[ebp+var_64], esi
jmp	short loc_43B6D9

loc_43B6D2:
mov	[ebp+var_64], 0FFFFFFFFh

loc_43B6D9:
mov	eax, [ebp+var_64]

loc_43B6DC:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43B600 endp

align 10h


; Attributes: bp-based frame

sub_43B6F0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	word ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= word ptr	 8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43B6F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_402430
cmp	eax, 1
jnb	short loc_43B728
or	eax, 0FFFFFFFFh
jmp	loc_43B7B4
jmp	loc_43B7B4

loc_43B728:
mov	[ebp+var_4], 0
mov	ax, [ebp+arg_0]
mov	[ebp+var_12], ax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_12]
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_1C]
movzx	eax, word ptr [edx]
push	eax
mov	ecx, [ebp+var_18]
call	sub_402CE0
push	eax
mov	ecx, [ebp+var_18]
call	sub_404430
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*2]
push	edx
call	sub_445990
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_12]
call	nullsub_1
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_10]
cmp	ecx, [eax+20h]
jz	short loc_43B7AA
mov	ecx, [ebp+var_18]
call	sub_404430
mov	edx, [ebp+var_10]
sub	edx, eax
sar	edx, 1
mov	[ebp+var_20], edx
jmp	short loc_43B7B1

loc_43B7AA:
mov	[ebp+var_20], 0FFFFFFFFh

loc_43B7B1:
mov	eax, [ebp+var_20]

loc_43B7B4:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43B6F0 endp

align 10h


; Attributes: bp-based frame

sub_43B7D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43B7D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
call	sub_402430
cmp	[ebp+arg_4], eax
jb	short loc_43B808
or	eax, 0FFFFFFFFh
jmp	loc_43B8B8
jmp	loc_43B8B8

loc_43B808:
mov	ecx, [ebp+var_2C]
call	sub_402CE0
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
call	sub_404430
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*2]
mov	[ebp+var_24], edx
xor	eax, eax
mov	[ebp+var_11], al
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*2]
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_20]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
call	sub_451D90
add	esp, 10h
mov	[ebp+var_18], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_20]
call	nullsub_1
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_10]
cmp	ecx, [eax+20h]
jz	short loc_43B8AE
mov	ecx, [ebp+var_2C]
call	sub_404430
mov	edx, [ebp+var_10]
sub	edx, eax
sar	edx, 1
mov	[ebp+var_34], edx
jmp	short loc_43B8B5

loc_43B8AE:
mov	[ebp+var_34], 0FFFFFFFFh

loc_43B8B5:
mov	eax, [ebp+var_34]

loc_43B8B8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43B7D0 endp

align 10h


; Attributes: bp-based frame

sub_43B8D0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= word ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43B8D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
push	esi
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
call	sub_402430
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 1
jnb	short loc_43B908
or	eax, 0FFFFFFFFh
jmp	loc_43BA01

loc_43B908:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_50]
call	sub_404430
mov	[ebp+var_34], eax
lea	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_20]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
mov	ecx, [ebp+var_34]
lea	edx, [ecx+eax*2+2]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
mov	cx, [ebp+arg_0]
mov	[ebp+var_22], cx
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_22]
mov	[ebp+var_54], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_54]
movzx	ecx, word ptr [eax]
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_28], esp
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_50]
call	sub_404430
mov	[ebp+var_3C], eax
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_3C]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_2C], esp
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
lea	edx, [ebp+var_14]
push	edx
call	sub_445A00
add	esp, 10h
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_22]
call	nullsub_1
mov	ecx, [ebp+var_50]
call	sub_404430
mov	[ebp+var_48], eax
mov	eax, [ebp+var_48]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_14]
xor	edx, edx
cmp	ecx, [ebp+var_30]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_43B9F7
mov	ecx, [ebp+var_14]
mov	[ebp+var_4C], ecx
mov	esi, [ebp+var_4C]
sub	esi, 2
mov	ecx, [ebp+var_50]
call	sub_404430
sub	esi, eax
sar	esi, 1
mov	[ebp+var_58], esi
jmp	short loc_43B9FE

loc_43B9F7:
mov	[ebp+var_58], 0FFFFFFFFh

loc_43B9FE:
mov	eax, [ebp+var_58]

loc_43BA01:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_43B8D0 endp

align 10h
; [00000067 BYTES: COLLAPSED FUNCTION filebuf::filebuf(int,char	*,int).	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [000000DD BYTES: COLLAPSED FUNCTION sub_43BA90. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_43BB70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_406A50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_14462A0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_77FF40
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43BB70 endp

align 10h


; Attributes: bp-based frame

sub_43BBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43BBC0 endp



; Attributes: bp-based frame

sub_43BBD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_43BBD0 endp

align 10h


; Attributes: bp-based frame

sub_43BBF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	18h
sub_43BBF0 endp

align 10h


; Attributes: bp-based frame

sub_43BC10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	eax, eax
xor	edx, edx
mov	esp, ebp
pop	ebp
retn
sub_43BC10 endp

align 10h


; Attributes: bp-based frame

sub_43BC20 proc	near

var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	dword ptr [ebp+var_10],	0
mov	dword ptr [ebp+var_10+4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_43BC3E:
mov	eax, dword ptr [ebp+var_10+4]
cmp	eax, dword ptr [ebp+arg_4+4]
jg	loc_43BD26
jl	short loc_43BC58
mov	ecx, dword ptr [ebp+var_10]
cmp	ecx, dword ptr [ebp+arg_4]
jnb	loc_43BD26

loc_43BC58:
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_2C]
mov	ecx, [edx+8]
cmp	ecx, [eax+0Ch]
jnb	short loc_43BCDD
mov	edx, dword ptr [ebp+arg_4]
sub	edx, dword ptr [ebp+var_10]
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, dword ptr [ebp+var_10+4]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	eax, [ecx+0Ch]
sub	eax, [edx+8]
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_1C]
push	ecx
lea	edx, [ebp+var_20]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_405E00
add	esp, 0Ch
mov	edx, [ebp+var_14]
xor	eax, eax
add	edx, dword ptr [ebp+var_10]
mov	ecx, dword ptr [ebp+var_10+4]
adc	ecx, eax
mov	dword ptr [ebp+var_10],	edx
mov	dword ptr [ebp+var_10+4], ecx
mov	edx, [ebp+arg_0]
add	edx, [ebp+var_14]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+8]
add	ecx, [ebp+var_14]
mov	edx, [ebp+var_2C]
mov	[edx+8], ecx
jmp	short loc_43BD21

loc_43BCDD:
mov	ecx, [ebp+var_2C]
call	sub_443C00
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
xor	ecx, ecx
cmp	eax, [ebp+var_4]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_43BD1F
mov	eax, [ebp+arg_0]
mov	cl, byte ptr [ebp+var_18]
mov	[eax], cl
mov	edx, dword ptr [ebp+var_10]
add	edx, 1
mov	eax, dword ptr [ebp+var_10+4]
adc	eax, 0
mov	dword ptr [ebp+var_10],	edx
mov	dword ptr [ebp+var_10+4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
jmp	short loc_43BD21

loc_43BD1F:
jmp	short loc_43BD26

loc_43BD21:
jmp	loc_43BC3E

loc_43BD26:
mov	eax, dword ptr [ebp+var_10]
mov	edx, dword ptr [ebp+var_10+4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43BC20 endp

align 10h


; Attributes: bp-based frame

sub_43BD40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx+1Ch]
call	eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_4]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_43BD7B
mov	[ebp+var_14], 0FFFFFFFFh
jmp	short loc_43BD9C

loc_43BD7B:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
add	ecx, 1
mov	edx, [ebp+var_10]
mov	[edx+8], ecx
mov	eax, [ebp+var_C]
movzx	ecx, byte ptr [eax]
mov	[ebp+var_14], ecx

loc_43BD9C:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_43BD40 endp

align 10h


; Attributes: bp-based frame

sub_43BDB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
or	eax, 0FFFFFFFFh
mov	esp, ebp
pop	ebp
retn	4
sub_43BDB0 endp



; Attributes: bp-based frame

sub_43BDC0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	dword ptr [ebp+var_10],	0
mov	dword ptr [ebp+var_10+4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_43BDDE:
mov	eax, dword ptr [ebp+var_10+4]
cmp	eax, dword ptr [ebp+arg_4+4]
jg	loc_43BED0
jl	short loc_43BDF8
mov	ecx, dword ptr [ebp+var_10]
cmp	ecx, dword ptr [ebp+arg_4]
jnb	loc_43BED0

loc_43BDF8:
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_2C]
mov	ecx, [edx+14h]
cmp	ecx, [eax+18h]
jnb	short loc_43BE7D
mov	edx, dword ptr [ebp+arg_4]
sub	edx, dword ptr [ebp+var_10]
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, dword ptr [ebp+var_10+4]
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	eax, [ecx+18h]
sub	eax, [edx+14h]
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
push	ecx
call	sub_405E00
add	esp, 0Ch
mov	edx, [ebp+var_14]
xor	eax, eax
add	edx, dword ptr [ebp+var_10]
mov	ecx, dword ptr [ebp+var_10+4]
adc	ecx, eax
mov	dword ptr [ebp+var_10],	edx
mov	dword ptr [ebp+var_10+4], ecx
mov	edx, [ebp+arg_0]
add	edx, [ebp+var_14]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
add	ecx, [ebp+var_14]
mov	edx, [ebp+var_2C]
mov	[edx+14h], ecx
jmp	short loc_43BECB

loc_43BE7D:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_2C]
mov	edx, [eax]
mov	ecx, [ebp+var_2C]
mov	eax, [edx+30h]
call	eax
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
xor	edx, edx
cmp	ecx, [ebp+var_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_43BEC9
mov	ecx, dword ptr [ebp+var_10]
add	ecx, 1
mov	edx, dword ptr [ebp+var_10+4]
adc	edx, 0
mov	dword ptr [ebp+var_10],	ecx
mov	dword ptr [ebp+var_10+4], edx
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
jmp	short loc_43BECB

loc_43BEC9:
jmp	short loc_43BED0

loc_43BECB:
jmp	loc_43BDDE

loc_43BED0:
mov	eax, dword ptr [ebp+var_10]
mov	edx, dword ptr [ebp+var_10+4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43BDC0 endp

align 10h


; Attributes: bp-based frame

sub_43BEE0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	dword ptr [ebp+var_10],	0
mov	dword ptr [ebp+var_10+4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_43BEFE:
mov	eax, dword ptr [ebp+var_10+4]
cmp	eax, dword ptr [ebp+arg_4+4]
jg	loc_43BFE9
jl	short loc_43BF18
mov	ecx, dword ptr [ebp+var_10]
cmp	ecx, dword ptr [ebp+arg_4]
jnb	loc_43BFE9

loc_43BF18:
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_34]
mov	ecx, [edx+14h]
cmp	ecx, [eax+18h]
jnb	short loc_43BFA1
mov	edx, dword ptr [ebp+arg_4]
sub	edx, dword ptr [ebp+var_10]
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, dword ptr [ebp+var_10+4]
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	eax, [ecx+18h]
sub	eax, [edx+14h]
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
call	sub_407A30
add	esp, 8
mov	eax, [eax]
mov	[ebp+var_14], eax
mov	cl, [ebp+arg_0]
mov	[ebp+var_29], cl
mov	edx, [ebp+var_34]
mov	eax, [edx+14h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_14]
push	ecx		; size_t
movzx	edx, [ebp+var_29]
push	edx		; int
mov	eax, [ebp+var_28]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, [ebp+var_14]
xor	edx, edx
add	ecx, dword ptr [ebp+var_10]
mov	eax, dword ptr [ebp+var_10+4]
adc	eax, edx
mov	dword ptr [ebp+var_10],	ecx
mov	dword ptr [ebp+var_10+4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+14h]
add	edx, [ebp+var_14]
mov	eax, [ebp+var_34]
mov	[eax+14h], edx
jmp	short loc_43BFE4

loc_43BFA1:
movzx	ecx, [ebp+arg_0]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_34]
mov	edx, [eax]
mov	ecx, [ebp+var_34]
mov	eax, [edx+30h]
call	eax
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
xor	edx, edx
cmp	ecx, [ebp+var_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_43BFE2
mov	ecx, dword ptr [ebp+var_10]
add	ecx, 1
mov	edx, dword ptr [ebp+var_10+4]
adc	edx, 0
mov	dword ptr [ebp+var_10],	ecx
mov	dword ptr [ebp+var_10+4], edx
jmp	short loc_43BFE4

loc_43BFE2:
jmp	short loc_43BFE9

loc_43BFE4:
jmp	loc_43BEFE

loc_43BFE9:
mov	eax, dword ptr [ebp+var_10]
mov	edx, dword ptr [ebp+var_10+4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43BEE0 endp

align 10h


; Attributes: bp-based frame

sub_43C000 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43C000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_445C30
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1446338
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_77F1B0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+30h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+31h], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+32h], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+33h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+34h], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+35h], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+36h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+38h], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+3Ch], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+40h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+44h], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+48h], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4Ch], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+50h], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+54h], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+58h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+60h], 0
mov	dword ptr [edx+64h], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+68h], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+6Ch], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+70h], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+74h], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+78h], 1
mov	edx, [ebp+var_14]
mov	dword ptr [edx+7Ch], 1
lea	ecx, [ebp+var_10]
call	sub_77FEE0
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	byte ptr [ebp+var_4], 1
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_4461C0
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_10]
call	sub_77FF40
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43C000 endp



; Attributes: bp-based frame

sub_43C160 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43C160
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1446338
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_43C1C0
mov	ecx, [ebp+var_10]
call	sub_446070
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_43BB70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43C160 endp

align 10h


; Attributes: bp-based frame

sub_43C1C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_406EA0
mov	[ebp+var_1], al
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+34h]
test	ecx, ecx
jz	short loc_43C241
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_43C21E
mov	[ebp+var_8], 0FFFFFFFFh
push	0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx+30h]
call	eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_43C21E
mov	[ebp+var_14], 1
jmp	short loc_43C225

loc_43C21E:
mov	[ebp+var_14], 0

loc_43C225:
mov	cl, byte ptr [ebp+var_14]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
movzx	eax, [ebp+var_1]
cmp	edx, eax
jnz	short loc_43C23F
mov	ecx, [ebp+var_10]
call	sub_445E30

loc_43C23F:
jmp	short loc_43C254

loc_43C241:
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+33h]
test	eax, eax
jz	short loc_43C254
mov	ecx, [ebp+var_10]
call	sub_445CC0

loc_43C254:
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_77F5B0
movzx	ecx, al
test	ecx, ecx
jz	short loc_43C277
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_43C277
mov	[ebp+var_18], 1
jmp	short loc_43C27E

loc_43C277:
mov	[ebp+var_18], 0

loc_43C27E:
mov	al, byte ptr [ebp+var_18]
mov	[ebp+var_1], al
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+54h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+50h], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4Ch], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+48h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+58h], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+60h], 0
mov	dword ptr [eax+64h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+70h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+6Ch], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+68h], 0
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+36h], 0
mov	edx, [ebp+var_10]
mov	byte ptr [edx+35h], 0
mov	eax, [ebp+var_10]
mov	byte ptr [eax+34h], 0
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+33h], 0
movzx	eax, [ebp+var_1]
neg	eax
sbb	eax, eax
and	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_43C1C0 endp

align 10h


; Attributes: bp-based frame

sub_43C350 proc	near

var_24=	qword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= qword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_406EA0
movzx	eax, al
test	eax, eax
jz	short loc_43C381
mov	ecx, [ebp+var_1C]
movzx	edx, byte ptr [ecx+34h]
test	edx, edx
jnz	short loc_43C381
mov	eax, [ebp+var_1C]
movzx	ecx, byte ptr [eax+35h]
test	ecx, ecx
jz	short loc_43C391

loc_43C381:
or	eax, 0FFFFFFFFh
or	edx, 0FFFFFFFFh
jmp	loc_43C442
jmp	loc_43C442

loc_43C391:
mov	edx, [ebp+var_1C]
movzx	eax, byte ptr [edx+36h]
test	eax, eax
jz	short loc_43C3BF
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_14]
sub	eax, [ebp+var_18]
cdq
jmp	loc_43C442
jmp	loc_43C442

loc_43C3BF:
mov	edx, [ebp+var_1C]
movzx	eax, byte ptr [edx+30h]
test	eax, eax
jz	short loc_43C43E
push	2		; int
push	0		; DistanceToMoveHigh
push	0		; lDistanceToMove
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_77F610
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], edx
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_77F1F0
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], edx
cmp	dword ptr [ebp+var_10+4], 0
jl	short loc_43C426
jg	short loc_43C400
cmp	dword ptr [ebp+var_10],	0
jb	short loc_43C426

loc_43C400:
mov	ecx, dword ptr [ebp+var_8+4]
cmp	ecx, dword ptr [ebp+var_10+4]
jl	short loc_43C426
jg	short loc_43C412
mov	edx, dword ptr [ebp+var_8]
cmp	edx, dword ptr [ebp+var_10]
jbe	short loc_43C426

loc_43C412:
mov	eax, dword ptr [ebp+var_8]
sub	eax, dword ptr [ebp+var_10]
mov	ecx, dword ptr [ebp+var_8+4]
sbb	ecx, dword ptr [ebp+var_10+4]
mov	dword ptr [ebp+var_24],	eax
mov	dword ptr [ebp+var_24+4], ecx
jmp	short loc_43C434

loc_43C426:
mov	dword ptr [ebp+var_24],	0
mov	dword ptr [ebp+var_24+4], 0

loc_43C434:
mov	eax, dword ptr [ebp+var_24]
mov	edx, dword ptr [ebp+var_24+4]
jmp	short loc_43C442
jmp	short loc_43C442

loc_43C43E:
xor	eax, eax
xor	edx, edx

loc_43C442:
mov	esp, ebp
pop	ebp
retn
sub_43C350 endp

align 10h


; Attributes: bp-based frame

sub_43C450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
push	eax
call	sub_77FD40
add	esp, 4
mov	esp, ebp
pop	ebp
retn
sub_43C450 endp

align 10h


; Attributes: bp-based frame

sub_43C470 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_44]
movzx	ecx, byte ptr [eax+33h]
test	ecx, ecx
jnz	short loc_43C493
mov	eax, [ebp+var_4]
jmp	loc_43C656

loc_43C493:
mov	edx, [ebp+var_44]
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_14]
jz	loc_43C555
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+var_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_43C4F4
mov	cl, byte ptr [ebp+arg_0]
mov	[ebp+var_9], cl
mov	edx, [ebp+var_44]
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
movzx	edx, byte ptr [ecx-1]
movzx	eax, [ebp+var_9]
xor	ecx, ecx
cmp	eax, edx
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_43C4F4
mov	eax, [ebp+var_44]
cmp	dword ptr [eax+58h], 0
jnz	short loc_43C555

loc_43C4F4:
mov	ecx, [ebp+var_44]
mov	edx, [ecx+8]
sub	edx, 1
mov	eax, [ebp+var_44]
mov	[eax+8], edx
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+var_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_43C53C
mov	cl, byte ptr [ebp+arg_0]
mov	[ebp+var_A], cl
mov	edx, [ebp+var_44]
mov	eax, [edx+8]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
movzx	edx, byte ptr [ecx]
movzx	eax, [ebp+var_A]
xor	ecx, ecx
cmp	eax, edx
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_43C550

loc_43C53C:
mov	eax, [ebp+var_44]
mov	ecx, [eax+8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
movzx	eax, byte ptr [edx]
jmp	loc_43C656

loc_43C550:
jmp	loc_43C63C

loc_43C555:
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, [ebp+var_4]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	loc_43C637
mov	eax, [ebp+var_44]
add	eax, 88h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_44]
movzx	edx, byte ptr [ecx+36h]
test	edx, edx
jz	short loc_43C5D7
mov	eax, [ebp+var_44]
mov	ecx, [eax+4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_44]
add	edx, 80h
cmp	[ebp+var_24], edx
jz	short loc_43C5CD
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx+0Ch]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
sub	ecx, 1
mov	edx, [ebp+var_44]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
sub	eax, 1
mov	ecx, [ebp+var_44]
mov	[ecx+8], eax
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
jmp	short loc_43C5D5

loc_43C5CD:
mov	eax, [ebp+var_4]
jmp	loc_43C656

loc_43C5D5:
jmp	short loc_43C635

loc_43C5D7:
mov	ecx, [ebp+var_44]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_30]
mov	[eax+68h], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_34]
mov	[ecx+6Ch], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_38]
mov	[edx+70h], eax
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	edx, [ebp+var_44]
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	ecx, [ebp+var_44]
mov	[ecx+8], eax
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_44]
mov	byte ptr [ecx+36h], 1

loc_43C635:
jmp	short loc_43C63C

loc_43C637:
mov	eax, [ebp+var_4]
jmp	short loc_43C656

loc_43C63C:
mov	dl, byte ptr [ebp+arg_0]
mov	[ebp+var_39], dl
mov	eax, [ebp+var_44]
mov	ecx, [eax+8]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	al, [ebp+var_39]
mov	[edx], al
mov	eax, [ebp+arg_0]

loc_43C656:
mov	esp, ebp
pop	ebp
retn	4
sub_43C470 endp

align 10h


; Attributes: bp-based frame

sub_43C660 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
movzx	ecx, byte ptr [eax+34h]
test	ecx, ecx
jnz	short loc_43C68B
mov	ecx, [ebp+var_44]
call	sub_445D20
movzx	edx, al
test	edx, edx
jnz	short loc_43C68B
or	eax, 0FFFFFFFFh
jmp	loc_43C885

loc_43C68B:
mov	eax, [ebp+var_44]
mov	ecx, [eax+38h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx+14h]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+3Ch]
sub	edx, 1
mov	[ebp+var_24], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax+38h]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_20]
mov	[edx+10h], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_20]
mov	[ecx+14h], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_24]
mov	[eax+18h], ecx
mov	[ebp+var_1C], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_1C]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_43C6F7
mov	edx, [ebp+var_4]
mov	al, byte ptr [ebp+arg_0]
mov	[edx], al
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_43C6F7:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+var_4]
jz	loc_43C85A
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+40h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax+44h]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx+40h]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+74h]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_44]
add	eax, 50h
push	eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	ecx, [ebp+var_28]
mov	eax, [edx+4]
call	eax
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 3
jnz	short loc_43C7CD
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+var_8]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
mov	ecx, [ebp+var_44]
add	ecx, 20h
call	sub_77F8A0
movzx	ecx, al
test	ecx, ecx
jz	short loc_43C7B5
mov	[ebp+var_38], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_43C7A6
mov	edx, [ebp+arg_0]
mov	[ebp+var_48], edx
jmp	short loc_43C7AD

loc_43C7A6:
mov	[ebp+var_48], 0

loc_43C7AD:
mov	eax, [ebp+var_48]
mov	[ebp+var_4C], eax
jmp	short loc_43C7C0

loc_43C7B5:
mov	ecx, [ebp+var_44]
call	sub_445DE0
mov	[ebp+var_4C], eax

loc_43C7C0:
mov	eax, [ebp+var_4C]
jmp	loc_43C885
jmp	loc_43C855

loc_43C7CD:
cmp	[ebp+var_10], 2
jz	short loc_43C84B
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_4]
jnz	short loc_43C7F5
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_14]
sub	eax, [edx+40h]
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+var_8]
mov	edx, [ebp+var_44]
imul	ecx, [edx+78h]
cmp	eax, ecx
jz	short loc_43C808

loc_43C7F5:
mov	eax, [ebp+var_44]
movzx	ecx, byte ptr [eax+30h]
test	ecx, ecx
jnz	short loc_43C84B
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_8]
jz	short loc_43C84B

loc_43C808:
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_14]
sub	ecx, [eax+40h]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx+40h]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_18]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
mov	ecx, [ebp+var_44]
add	ecx, 20h
call	sub_77F8A0
movzx	eax, al
test	eax, eax
jz	short loc_43C83F
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
jmp	short loc_43C849

loc_43C83F:
mov	ecx, [ebp+var_44]
call	sub_445DE0
jmp	short loc_43C885

loc_43C849:
jmp	short loc_43C855

loc_43C84B:
mov	ecx, [ebp+var_44]
call	sub_445DE0
jmp	short loc_43C885

loc_43C855:
jmp	loc_43C6F7

loc_43C85A:
mov	[ebp+var_40], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_40]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_43C87B
mov	edx, [ebp+arg_0]
mov	[ebp+var_50], edx
jmp	short loc_43C882

loc_43C87B:
mov	[ebp+var_50], 0

loc_43C882:
mov	eax, [ebp+var_50]

loc_43C885:
mov	esp, ebp
pop	ebp
retn	4
sub_43C660 endp

align 10h


; Attributes: bp-based frame

sub_43C890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+33h]
test	ecx, ecx
jnz	short loc_43C907
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+34h]
test	eax, eax
jnz	short loc_43C907
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx+35h]
test	edx, edx
jnz	short loc_43C907
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+38h], 0
jnz	short loc_43C907
cmp	[ebp+arg_0], 0
jnz	short loc_43C8DF
mov	ecx, dword ptr [ebp+arg_4]
or	ecx, dword ptr [ebp+arg_4+4]
jnz	short loc_43C8DF
push	0
push	1
push	0
mov	ecx, [ebp+var_4]
call	sub_445F10
jmp	short loc_43C907

loc_43C8DF:
cmp	[ebp+arg_0], 0
jz	short loc_43C907
cmp	dword ptr [ebp+arg_4+4], 0
jl	short loc_43C907
jg	short loc_43C8F3
cmp	dword ptr [ebp+arg_4], 0
jbe	short loc_43C907

loc_43C8F3:
mov	edx, dword ptr [ebp+arg_4+4]
push	edx
mov	eax, dword ptr [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_445F10

loc_43C907:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43C890 endp



; Attributes: bp-based frame

sub_43C910 proc	near

var_154= dword ptr -154h
var_150= qword ptr -150h
var_148= dword ptr -148h
var_144= qword ptr -144h
var_13C= dword ptr -13Ch
var_135= byte ptr -135h
var_134= dword ptr -134h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_CC=	dword ptr -0CCh
var_A8=	byte ptr -0A8h
var_98=	byte ptr -98h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_70=	byte ptr -70h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_48=	byte ptr -48h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 154h
push	esi
push	edi
mov	[ebp+var_134], ecx
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_406EA0
movzx	eax, al
test	eax, eax
jnz	short loc_43C94A
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43CE75

loc_43C94A:
mov	ecx, [ebp+var_134]
movzx	edx, byte ptr [ecx+30h]
test	edx, edx
jnz	short loc_43C974
mov	eax, dword ptr [ebp+arg_4]
or	eax, dword ptr [ebp+arg_4+4]
jz	short loc_43C974
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43CE75

loc_43C974:
mov	ecx, dword ptr [ebp+arg_4]
or	ecx, dword ptr [ebp+arg_4+4]
jnz	short loc_43C98B
cmp	[ebp+arg_C], 2
jnz	short loc_43C98B
mov	[ebp+var_135], 0
jmp	short loc_43C992

loc_43C98B:
mov	[ebp+var_135], 1

loc_43C992:
movzx	edx, [ebp+var_135]
push	edx
mov	ecx, [ebp+var_134]
call	sub_4460D0
movzx	eax, al
test	eax, eax
jnz	short loc_43C9C0
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43CE75

loc_43C9C0:
cmp	[ebp+arg_C], 1
jz	short loc_43C9CC
cmp	[ebp+arg_C], 4
jnz	short loc_43CA14

loc_43C9CC:
push	0
mov	ecx, [ebp+arg_C]
push	ecx		; int
mov	edx, [ebp+var_134]
mov	eax, [edx+78h]
cdq
mov	ecx, dword ptr [ebp+arg_4+4]
push	ecx
mov	ecx, dword ptr [ebp+arg_4]
push	ecx
push	edx
push	eax
call	__allmul
push	edx		; DistanceToMoveHigh
push	eax		; lDistanceToMove
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_77F610
push	edx
push	eax
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_134]
call	sub_443B40
mov	eax, [ebp+arg_0]
jmp	loc_43CE75

loc_43CA14:
mov	eax, [ebp+var_134]
movzx	ecx, byte ptr [eax+33h]
test	ecx, ecx
jnz	short loc_43CA6A
push	0
mov	edx, [ebp+arg_C]
push	edx		; int
mov	eax, [ebp+var_134]
mov	eax, [eax+78h]
cdq
mov	ecx, dword ptr [ebp+arg_4+4]
push	ecx
mov	ecx, dword ptr [ebp+arg_4]
push	ecx
push	edx
push	eax
call	__allmul
push	edx		; DistanceToMoveHigh
push	eax		; lDistanceToMove
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_77F610
push	edx
push	eax
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_134]
call	sub_443B40
mov	eax, [ebp+arg_0]
jmp	loc_43CE75

loc_43CA6A:
mov	eax, [ebp+var_134]
cmp	dword ptr [eax+58h], 0
jz	loc_43CB49
mov	ecx, [ebp+var_134]
mov	edx, [ecx+8]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_134]
mov	ecx, [ebp+var_CC]
sub	ecx, [eax+58h]
mov	eax, ecx
cdq
mov	ecx, [ebp+var_134]
mov	esi, [ecx+60h]
sub	esi, eax
mov	eax, [ecx+64h]
sbb	eax, edx
mov	dword ptr [ebp+var_8], esi
mov	dword ptr [ebp+var_8+4], eax
mov	ecx, dword ptr [ebp+arg_4]
or	ecx, dword ptr [ebp+arg_4+4]
jnz	short loc_43CAE5
push	2		; int
push	0		; DistanceToMoveHigh
push	0		; lDistanceToMove
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_77F610
sub	eax, dword ptr [ebp+var_8]
sbb	edx, dword ptr [ebp+var_8+4]
push	edx
push	eax
lea	ecx, [ebp+var_48]
call	sub_406AE0
mov	[ebp+var_13C], eax
jmp	short loc_43CB1C

loc_43CAE5:
push	0
push	2		; int
mov	edx, dword ptr [ebp+arg_4]
sub	edx, dword ptr [ebp+var_8]
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, dword ptr [ebp+var_8+4]
push	eax		; DistanceToMoveHigh
push	edx		; lDistanceToMove
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_77F610
push	edx
push	eax
lea	ecx, [ebp+var_58]
push	ecx
mov	ecx, [ebp+var_134]
call	sub_443B40
mov	[ebp+var_13C], eax

loc_43CB1C:
mov	edx, [ebp+var_13C]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]
jmp	loc_43CE75

loc_43CB49:
mov	ecx, [ebp+var_134]
movzx	edx, byte ptr [ecx+30h]
test	edx, edx
jz	loc_43CC9F
mov	eax, [ebp+var_134]
mov	ecx, [eax+8]
mov	[ebp+var_E0], ecx
mov	edx, [ebp+var_134]
mov	eax, [edx+4]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_E0]
sub	ecx, [ebp+var_E4]
mov	edx, [ebp+var_134]
mov	eax, ecx
imul	eax, [edx+78h]
cdq
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], edx
mov	eax, [ebp+var_134]
mov	ecx, [ebp+var_134]
mov	eax, [eax+4Ch]
sub	eax, [ecx+40h]
cdq
mov	dword ptr [ebp+var_144], eax
mov	dword ptr [ebp+var_144+4], edx
mov	edx, dword ptr [ebp+var_10+4]
cmp	edx, dword ptr [ebp+var_144+4]
jg	loc_43CC9A
jl	short loc_43CBD7
mov	eax, dword ptr [ebp+var_10]
cmp	eax, dword ptr [ebp+var_144]
ja	loc_43CC9A

loc_43CBD7:
mov	ecx, [ebp+var_134]
mov	edx, [ecx+4Ch]
push	edx
mov	eax, dword ptr [ebp+var_10]
mov	ecx, [ebp+var_134]
add	eax, [ecx+40h]
push	eax
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_406030
mov	dword ptr [ebp+var_18],	eax
mov	dword ptr [ebp+var_18+4], edx
mov	edx, dword ptr [ebp+arg_4]
or	edx, dword ptr [ebp+arg_4+4]
jnz	short loc_43CC36
push	2		; int
push	0		; DistanceToMoveHigh
push	0		; lDistanceToMove
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_77F610
sub	eax, dword ptr [ebp+var_18]
sbb	edx, dword ptr [ebp+var_18+4]
push	edx
push	eax
lea	ecx, [ebp+var_70]
call	sub_406AE0
mov	[ebp+var_148], eax
jmp	short loc_43CC6D

loc_43CC36:
push	0
push	2		; int
mov	eax, dword ptr [ebp+arg_4]
sub	eax, dword ptr [ebp+var_18]
mov	ecx, dword ptr [ebp+arg_4+4]
sbb	ecx, dword ptr [ebp+var_18+4]
push	ecx		; DistanceToMoveHigh
push	eax		; lDistanceToMove
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_77F610
push	edx
push	eax
lea	edx, [ebp+var_80]
push	edx
mov	ecx, [ebp+var_134]
call	sub_443B40
mov	[ebp+var_148], eax

loc_43CC6D:
mov	eax, [ebp+var_148]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
jmp	loc_43CE75

loc_43CC9A:
jmp	loc_43CE66

loc_43CC9F:
mov	edx, [ebp+var_134]
mov	eax, [edx+8]
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_134]
mov	edx, [ecx+4]
mov	[ebp+var_104], edx
mov	eax, [ebp+var_100]
sub	eax, [ebp+var_104]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_134]
mov	edx, [ecx+50h]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_134]
mov	ecx, [eax+48h]
mov	[ebp+var_110], ecx
mov	edx, [ebp+var_134]
mov	eax, [edx+40h]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_134]
mov	edx, [ecx+74h]
mov	[ebp+var_108], edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_110]
push	ecx
mov	edx, [ebp+var_10C]
push	edx
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_108]
mov	edx, [ecx]
mov	ecx, [ebp+var_108]
mov	eax, [edx+18h]
call	eax
mov	[ebp+var_20], eax
push	2		; int
push	0		; DistanceToMoveHigh
push	0		; lDistanceToMove
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_77F610
mov	dword ptr [ebp+var_30],	eax
mov	dword ptr [ebp+var_30+4], edx
mov	ecx, [ebp+var_134]
mov	edx, [ecx+40h]
add	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_134]
mov	ecx, [eax+40h]
push	ecx
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_406030
mov	esi, eax
mov	edi, edx
mov	edx, [ebp+var_134]
mov	eax, [edx+4Ch]
push	eax
mov	ecx, [ebp+var_134]
mov	edx, [ecx+40h]
push	edx
mov	ecx, [ebp+var_134]
add	ecx, 20h
call	sub_406030
sub	esi, eax
sbb	edi, edx
mov	dword ptr [ebp+var_28],	esi
mov	dword ptr [ebp+var_28+4], edi
mov	eax, dword ptr [ebp+var_30]
and	eax, dword ptr [ebp+var_30+4]
cmp	eax, 0FFFFFFFFh
jz	loc_43CE66
mov	ecx, dword ptr [ebp+var_30]
add	ecx, dword ptr [ebp+var_28]
mov	edx, dword ptr [ebp+var_30+4]
adc	edx, dword ptr [ebp+var_28+4]
mov	dword ptr [ebp+var_150], ecx
mov	dword ptr [ebp+var_150+4], edx
cmp	dword ptr [ebp+var_150+4], 0
jl	loc_43CE66
jg	short loc_43CDE3
cmp	dword ptr [ebp+var_150], 0
jb	loc_43CE66

loc_43CDE3:
mov	eax, dword ptr [ebp+arg_4]
or	eax, dword ptr [ebp+arg_4+4]
jnz	short loc_43CE0C
mov	ecx, dword ptr [ebp+var_30]
add	ecx, dword ptr [ebp+var_28]
mov	edx, dword ptr [ebp+var_30+4]
adc	edx, dword ptr [ebp+var_28+4]
push	edx
push	ecx
lea	ecx, [ebp+var_98]
call	sub_406AE0
mov	[ebp+var_154], eax
jmp	short loc_43CE36

loc_43CE0C:
mov	eax, [ebp+var_34]
push	eax
mov	ecx, dword ptr [ebp+var_30]
add	ecx, dword ptr [ebp+var_28]
mov	edx, dword ptr [ebp+var_30+4]
adc	edx, dword ptr [ebp+var_28+4]
push	edx
push	ecx
lea	eax, [ebp+var_A8]
push	eax
mov	ecx, [ebp+var_134]
call	sub_443B40
mov	[ebp+var_154], eax

loc_43CE36:
mov	ecx, [ebp+var_154]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_84]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
jmp	short loc_43CE75

loc_43CE66:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]

loc_43CE75:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_43C910 endp

align 10h


; Attributes: bp-based frame

sub_43CE80 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
lDistanceToMove= dword ptr -8
DistanceToMoveHigh= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_406EA0
movzx	eax, al
test	eax, eax
jz	loc_43CF30
push	1
mov	ecx, [ebp+var_1C]
call	sub_4460D0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_43CEC1
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	short loc_43CF3F

loc_43CEC1:
lea	ecx, [ebp+arg_4]
call	sub_406400
mov	[ebp+lDistanceToMove], eax
mov	[ebp+DistanceToMoveHigh], edx
mov	edx, [ebp+lDistanceToMove]
and	edx, [ebp+DistanceToMoveHigh]
cmp	edx, 0FFFFFFFFh
jz	short loc_43CF30
push	1		; int
mov	eax, [ebp+DistanceToMoveHigh]
push	eax		; DistanceToMoveHigh
mov	ecx, [ebp+lDistanceToMove]
push	ecx		; lDistanceToMove
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_77F610
mov	[ebp+var_24], eax
mov	[ebp+var_20], edx
mov	edx, [ebp+var_24]
and	edx, [ebp+var_20]
cmp	edx, 0FFFFFFFFh
jz	short loc_43CF30
lea	ecx, [ebp+arg_4]
call	sub_406880
mov	ecx, [ebp+var_1C]
mov	[ecx+50h], eax
lea	ecx, [ebp+arg_4]
call	sub_406880
push	eax
mov	edx, [ebp+DistanceToMoveHigh]
push	edx
mov	eax, [ebp+lDistanceToMove]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_443B40
mov	eax, [ebp+arg_0]
jmp	short loc_43CF3F

loc_43CF30:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]

loc_43CF3F:
mov	esp, ebp
pop	ebp
retn	18h
sub_43CE80 endp

align 10h


; Attributes: bp-based frame

sub_43CF50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
movzx	ecx, byte ptr [eax+34h]
test	ecx, ecx
jz	short loc_43CF91
mov	[ebp+var_4], 0FFFFFFFFh
push	0FFFFFFFFh
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+30h]
call	edx
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
xor	ecx, ecx
cmp	eax, [ebp+var_4]
setz	cl
movzx	eax, cl
neg	eax
sbb	eax, eax
jmp	short loc_43CF93

loc_43CF91:
xor	eax, eax

loc_43CF93:
mov	esp, ebp
pop	ebp
retn
sub_43CF50 endp

align 10h


; Attributes: bp-based frame

sub_43CFA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+33h]
test	ecx, ecx
jnz	short loc_43CFD6
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+34h]
test	eax, eax
jnz	short loc_43CFD6
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx+35h]
test	edx, edx
jnz	short loc_43CFD6
push	1
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4461C0

loc_43CFD6:
mov	esp, ebp
pop	ebp
retn	4
sub_43CFA0 endp

align 10h


; Attributes: bp-based frame

sub_43CFE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_446A90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_43CFE0 endp

align 10h


; Attributes: bp-based frame

sub_43D000 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_406880
and	eax, 38h
cmp	eax, 8
jz	short loc_43D02B
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
jmp	short loc_43D031

loc_43D02B:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx

loc_43D031:
mov	edx, [ebp+var_C]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_446C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_43D000 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_43D050(void	*)
sub_43D050 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_43D059:
cmp	[ebp+arg_0], 0
jz	short loc_43D0A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_43D050
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_447500
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_43D0A1
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_43D0A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_43D059

loc_43D0A9:
mov	esp, ebp
pop	ebp
retn	4
sub_43D050 endp

align 10h


; Attributes: bp-based frame

sub_43D0B0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
call	sub_4C6940
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	esp, ebp
pop	ebp
retn	4
sub_43D0B0 endp

align 10h


; Attributes: bp-based frame

sub_43D100 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_17=	byte ptr -17h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43D100
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_38], ecx
mov	[ebp+var_20], 0
xor	eax, eax
mov	[ebp+var_15], al
mov	cl, [ebp+var_15]
mov	[ebp+var_21], cl
mov	edx, [ebp+var_38]
push	edx
call	sub_44C9E0
add	esp, 4
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	eax, [ebp+var_38]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	loc_43D2AC
cmp	dword ptr [ebp+arg_4+4], 0
jl	loc_43D2AC
jg	short loc_43D179
cmp	dword ptr [ebp+arg_4], 0
jbe	loc_43D2AC

loc_43D179:
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_38]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_2C]
jz	short loc_43D208
mov	byte ptr [ebp+var_4], 1
mov	al, [ebp+arg_C]
mov	[ebp+var_17], al
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_17]
mov	[ebp+var_3C], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_20]
or	edx, 1
mov	[ebp+var_20], edx
mov	al, [ebp+arg_C]
mov	[ebp+var_16], al
push	1
push	1
push	1
movzx	ecx, [ebp+var_16]
push	ecx
mov	edx, [ebp+var_3C]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, dword ptr [ebp+arg_4]
sub	edx, 1
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, 0
push	eax
push	edx
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_38]
push	edx
call	sub_447560
add	esp, 28h
mov	[ebp+var_44], eax
mov	[ebp+var_40], edx
jmp	short loc_43D264

loc_43D208:
mov	[ebp+var_4], 3
mov	al, [ebp+arg_C]
mov	[ebp+var_18], al
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_18]
mov	[ebp+var_48], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_20]
or	edx, 2
mov	[ebp+var_20], edx
push	1
push	1
push	1
mov	eax, [ebp+var_48]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, dword ptr [ebp+arg_4]
sub	eax, 1
mov	ecx, dword ptr [ebp+arg_4+4]
sbb	ecx, 0
push	ecx
push	eax
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_38]
push	eax
call	sub_447930
add	esp, 24h
mov	[ebp+var_44], eax
mov	[ebp+var_40], edx

loc_43D264:
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_44]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	[ecx+0Ch], eax
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_20]
and	ecx, 2
jz	short loc_43D291
and	[ebp+var_20], 0FFFFFFFDh
mov	[ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2

loc_43D291:
mov	[ebp+var_4], 0
mov	edx, [ebp+var_20]
and	edx, 1
jz	short loc_43D2AC
and	[ebp+var_20], 0FFFFFFFEh
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 0

loc_43D2AC:
mov	eax, [ebp+var_38]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_4C]
mov	eax, [ecx+8]
or	eax, [edx+0Ch]
jnz	short loc_43D2D2
push	4
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	ecx, [ebp+var_38]
add	ecx, [edx+4]
call	sub_438B50

loc_43D2D2:
mov	eax, [ebp+var_38]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_43D100 endp

align 10h


; Attributes: bp-based frame

sub_43D300 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_478 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_43D34F
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_155DF44
mov	ecx, [ebp+var_14]
add	ecx, 8
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_43D34F:
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	dword ptr [edx+ecx], offset off_14462DC
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
add	ecx, [edx+4]
call	sub_43BA90
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43D300 endp

align 10h


; Attributes: bp-based frame

sub_43D390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax-8]
mov	edx, [ecx+4]
mov	eax, [ebp+var_4]
mov	dword ptr [eax+edx-8], offset off_14462DC
mov	esp, ebp
pop	ebp
retn
sub_43D390 endp

align 10h


; Attributes: bp-based frame

sub_43D3B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_448350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_43D3B0 endp

align 10h


; Attributes: bp-based frame

sub_43D3D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_448500
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_43D3D0 endp

align 10h


; Attributes: bp-based frame

sub_43D3F0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43D3F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 40h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_44]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_21], dl
movzx	eax, [ebp+var_21]
test	eax, eax
jz	loc_43D4CA
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_44]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_28]
mov	edx, [eax]
mov	ecx, [ebp+var_28]
mov	eax, [edx+28h]
call	eax
mov	[ebp+var_4C], eax
mov	[ebp+var_48], edx
mov	ecx, [ebp+var_4C]
cmp	ecx, [ebp+arg_4]
jnz	short loc_43D48C
mov	edx, [ebp+var_48]
cmp	edx, [ebp+arg_8]
jz	short loc_43D495

loc_43D48C:
mov	[ebp+var_50], 1
jmp	short loc_43D49C

loc_43D495:
mov	[ebp+var_50], 0

loc_43D49C:
mov	al, byte ptr [ebp+var_50]
mov	[ebp+var_19], al
jmp	short loc_43D4C3

loc_43D4A4:
push	1
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	ecx, [ebp+var_44]
add	ecx, [edx+4]
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_43D4CA
retn

loc_43D4C3:
mov	[ebp+var_4], 0

loc_43D4CA:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_43D4E4
push	1
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	ecx, [ebp+var_44]
add	ecx, [edx+4]
call	sub_438B50

loc_43D4E4:
mov	eax, [ebp+var_44]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43D3F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_43D510(wchar_t *Dst, wchar_t *Format,	char)
sub_43D510 proc	near

ArgList= dword ptr -4
Dst= dword ptr	8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	28h		; SizeInWords
mov	eax, [ebp+Dst]
push	eax		; Dst
call	_vswprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_43D510 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_43D540(char *DstBuf, char *Format, char)
sub_43D540 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	100h		; SizeInBytes
mov	eax, [ebp+DstBuf]
push	eax		; DstBuf
call	_vsprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_43D540 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_43D570(char *DstBuf, char *Format, char)
sub_43D570 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	3E8h		; SizeInBytes
mov	eax, [ebp+DstBuf]
push	eax		; DstBuf
call	_vsprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_43D570 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_43D5A0(char *DstBuf, char *Format, char)
sub_43D5A0 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	40h		; SizeInBytes
mov	eax, [ebp+DstBuf]
push	eax		; DstBuf
call	_vsprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_43D5A0 endp

align 10h


; Attributes: bp-based frame

sub_43D5D0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	edx, [eax+8]
sub	edx, [ecx]
cmp	edx, [ebp+arg_0]
jnb	loc_43D6A3
mov	[ebp+var_C], 0FFFFFFFFh
mov	ecx, [ebp+var_7C]
add	ecx, 8
call	sub_406EE0
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_43D615
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
jmp	short loc_43D61B

loc_43D615:
mov	edx, [ebp+var_C]
mov	[ebp+var_80], edx

loc_43D61B:
mov	eax, [ebp+var_80]
cmp	eax, [ebp+arg_0]
jnb	short loc_43D62B
mov	ecx, [ebp+var_7C]
call	sub_5BD210

loc_43D62B:
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_7C]
cmp	dword ptr [ecx], 0
jz	short loc_43D667
mov	edx, [ebp+var_7C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_448930
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_7C]
call	sub_443CC0
jmp	short loc_43D67D

loc_43D667:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_7C]
add	ecx, 8
call	sub_407C40
mov	[ebp+var_8], eax

loc_43D67D:
mov	eax, [ebp+var_8]
add	eax, [ebp+arg_0]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_8]
add	eax, [ebp+var_4]
mov	ecx, [ebp+var_7C]
mov	[ecx+4], eax
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_78]
mov	[edx+8], eax

loc_43D6A3:
mov	esp, ebp
pop	ebp
retn	4
sub_43D5D0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_43D6B0(void	*, int,	int)
sub_43D6B0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= dword ptr -1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_43D70E
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
cmp	edx, [ebp+arg_4]
jb	short loc_43D6EF
xor	eax, eax
mov	byte ptr [ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx		; int
mov	edx, [ebp+arg_8]
push	edx		; int
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	ecx, [ebp+var_8]
call	sub_4487A0
jmp	short loc_43D70E

loc_43D6EF:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4486B0

loc_43D70E:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43D6B0 endp

align 10h


; Attributes: bp-based frame

sub_43D720 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_43D731:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_43D773
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_4489E0
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_43D771
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_43D771:
jmp	short loc_43D731

loc_43D773:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_43D720 endp

align 10h


; Attributes: bp-based frame

sub_43D790 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43D790
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155DF4C
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 24h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_43BB70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43D790 endp

align 10h


; Attributes: bp-based frame

sub_43D7F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jz	short loc_43D827
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
movzx	edx, byte ptr [ecx]
mov	[ebp+var_14], edx
jmp	short loc_43D82E

loc_43D827:
mov	[ebp+var_14], 0FFFFFFFFh

loc_43D82E:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_43D7F0 endp

align 10h


; Attributes: bp-based frame

sub_43D840 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_43D88B
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
add	ecx, 1
mov	edx, [ebp+var_14]
mov	[edx+8], ecx
mov	eax, [ebp+var_4]
jmp	short loc_43D88E
jmp	short loc_43D88E

loc_43D88B:
or	eax, 0FFFFFFFFh

loc_43D88E:
mov	esp, ebp
pop	ebp
retn
sub_43D840 endp

align 10h


; Attributes: bp-based frame

sub_43D8A0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_10]
jz	loc_43D9A2
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_43D964
mov	dl, byte ptr [ebp+arg_0]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
movzx	eax, byte ptr [edx-1]
movzx	ecx, [ebp+var_5]
xor	edx, edx
cmp	ecx, eax
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_43D925
mov	ecx, [ebp+var_24]
mov	edx, [ecx+8]
sub	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
jmp	loc_43D9A5
jmp	short loc_43D962

loc_43D925:
mov	ecx, [ebp+var_24]
mov	edx, [ecx+20h]
and	edx, 10h
jz	short loc_43D95D
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
sub	ecx, 1
mov	edx, [ebp+var_24]
mov	[edx+8], ecx
mov	al, byte ptr [ebp+arg_0]
mov	[ebp+var_15], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	cl, [ebp+var_15]
mov	[eax], cl
mov	eax, [ebp+arg_0]
jmp	short loc_43D9A5
jmp	short loc_43D962

loc_43D95D:
or	eax, 0FFFFFFFFh
jmp	short loc_43D9A5

loc_43D962:
jmp	short loc_43D9A0

loc_43D964:
mov	edx, [ebp+var_24]
mov	eax, [edx+8]
sub	eax, 1
mov	ecx, [ebp+var_24]
mov	[ecx+8], eax
mov	[ebp+var_20], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_20]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_43D994
mov	edx, [ebp+arg_0]
mov	[ebp+var_28], edx
jmp	short loc_43D99B

loc_43D994:
mov	[ebp+var_28], 0

loc_43D99B:
mov	eax, [ebp+var_28]
jmp	short loc_43D9A5

loc_43D9A0:
jmp	short loc_43D9A5

loc_43D9A2:
or	eax, 0FFFFFFFFh

loc_43D9A5:
mov	esp, ebp
pop	ebp
retn	4
sub_43D8A0 endp

align 10h


; Attributes: bp-based frame

sub_43D9B0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
push	esi
mov	[ebp+var_54], ecx
mov	[ebp+var_C], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, [ebp+var_C]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	loc_43DB84
mov	eax, [ebp+var_54]
mov	ecx, [eax+20h]
and	ecx, 10h
jz	loc_43DB7F
mov	edx, [ebp+var_54]
mov	eax, [edx+14h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+18h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_14]
jnb	short loc_43DA24
movzx	ecx, byte ptr [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 24h
call	sub_438580
mov	edx, [ebp+var_54]
mov	eax, [edx+14h]
add	eax, 1
mov	ecx, [ebp+var_54]
mov	[ecx+14h], eax
jmp	loc_43DB7A

loc_43DA24:
mov	edx, [ebp+var_54]
mov	eax, [edx+20h]
and	eax, 8
jz	loc_43DB04
mov	ecx, [ebp+var_54]
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_1C]
sub	edx, [ebp+var_20]
mov	[ebp+var_4], edx
movzx	eax, byte ptr [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_54]
add	ecx, 24h
call	sub_438580
mov	ecx, [ebp+var_54]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_54]
add	ecx, 24h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_28]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
add	ecx, [ebp+var_4]
mov	edx, [ebp+var_54]
mov	[edx+8], ecx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_2C]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_54]
add	edx, 24h
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_30]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_34], eax
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_8]
mov	[eax+10h], ecx
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_8]
mov	[edx+14h], eax
mov	ecx, [ebp+var_54]
mov	edx, [ebp+var_34]
mov	[ecx+18h], edx
mov	ecx, [ebp+var_54]
add	ecx, 24h
call	sub_4042A0
mov	[ebp+var_38], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, [ebp+var_38]
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
jmp	short loc_43DB7A

loc_43DB04:
movzx	eax, byte ptr [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_54]
add	ecx, 24h
call	sub_438580
mov	ecx, [ebp+var_54]
add	ecx, 24h
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_40]
call	sub_5F52F0
mov	esi, eax
mov	ecx, [ebp+var_40]
call	sub_4042A0
add	esi, eax
mov	[ebp+var_44], esi
mov	ecx, [ebp+var_54]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_48]
mov	[edx+10h], eax
mov	ecx, [ebp+var_54]
mov	edx, [ebp+var_48]
mov	[ecx+14h], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_44]
mov	[eax+18h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 24h
call	sub_4042A0
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_54]
mov	eax, [edx+14h]
add	eax, [ebp+var_4C]
mov	ecx, [ebp+var_54]
mov	[ecx+14h], eax

loc_43DB7A:
mov	eax, [ebp+arg_0]
jmp	short loc_43DBAF

loc_43DB7F:
or	eax, 0FFFFFFFFh
jmp	short loc_43DBAF

loc_43DB84:
mov	[ebp+var_50], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_43DBA5
mov	edx, [ebp+arg_0]
mov	[ebp+var_58], edx
jmp	short loc_43DBAC

loc_43DBA5:
mov	[ebp+var_58], 0

loc_43DBAC:
mov	eax, [ebp+var_58]

loc_43DBAF:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_43D9B0 endp

align 10h


; Attributes: bp-based frame

sub_43DBC0 proc	near

var_60=	qword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
mov	[ebp+var_58], ecx
mov	dword ptr [ebp+var_8], 0
mov	dword ptr [ebp+var_8+4], 0
mov	eax, [ebp+var_58]
mov	ecx, [eax+20h]
and	ecx, 10h
jz	loc_43DE32
cmp	dword ptr [ebp+arg_4+4], 0
jl	loc_43DE32
jg	short loc_43DBFD
cmp	dword ptr [ebp+arg_4], 0
jbe	loc_43DE32

loc_43DBFD:
mov	edx, [ebp+var_58]
add	edx, 24h
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_18]
call	sub_61ED00
mov	esi, eax
mov	ecx, [ebp+var_18]
call	sub_5F52F0
xor	ecx, ecx
cmp	eax, esi
setz	cl
movzx	edx, cl
test	edx, edx
jnz	loc_43DD1A
mov	eax, [ebp+var_58]
mov	ecx, [eax+10h]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_5F52F0
cmp	[ebp+var_1C], eax
jnz	loc_43DD1A
mov	edx, [ebp+var_58]
add	edx, 24h
mov	[ebp+var_20], edx
mov	ecx, [ebp+var_20]
call	sub_5F52F0
mov	esi, eax
mov	ecx, [ebp+var_20]
call	sub_4042A0
add	esi, eax
mov	[ebp+var_24], esi
mov	eax, [ebp+var_58]
mov	ecx, [eax+14h]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_24]
sub	edx, [ebp+var_28]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
cdq
mov	dword ptr [ebp+var_60],	eax
mov	dword ptr [ebp+var_60+4], edx
mov	eax, dword ptr [ebp+var_60+4]
cmp	eax, dword ptr [ebp+arg_4+4]
jl	short loc_43DCCE
jg	short loc_43DC95
mov	ecx, dword ptr [ebp+var_60]
cmp	ecx, dword ptr [ebp+arg_4]
jbe	short loc_43DCCE

loc_43DC95:
mov	edx, [ebp+var_58]
mov	eax, [edx+14h]
mov	[ebp+var_2C], eax
mov	ecx, dword ptr [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_405E00
add	esp, 0Ch
mov	ecx, dword ptr [ebp+arg_4]
mov	edx, [ebp+var_58]
add	ecx, [edx+14h]
mov	eax, [ebp+var_58]
mov	[eax+14h], ecx
mov	eax, dword ptr [ebp+arg_4]
mov	edx, dword ptr [ebp+arg_4+4]
jmp	loc_43DE38
jmp	short loc_43DD1A

loc_43DCCE:
mov	ecx, [ebp+var_58]
mov	edx, [ecx+14h]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_30]
push	edx
call	sub_405E00
add	esp, 0Ch
mov	eax, [ebp+var_10]
cdq
add	eax, dword ptr [ebp+var_8]
mov	ecx, dword ptr [ebp+var_8+4]
adc	ecx, edx
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], ecx
mov	eax, [ebp+var_10]
cdq
mov	ecx, dword ptr [ebp+arg_4]
sub	ecx, eax
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, edx
mov	dword ptr [ebp+arg_4], ecx
mov	dword ptr [ebp+arg_4+4], eax
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_10]
mov	[ebp+arg_0], ecx

loc_43DD1A:
mov	edx, [ebp+var_58]
mov	eax, [edx+20h]
and	eax, 8
jz	short loc_43DDA4
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
sub	edx, [ebp+var_38]
mov	[ebp+var_14], edx
mov	eax, dword ptr [ebp+arg_4]
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_4050A0
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_C], eax
mov	edx, [ebp+var_58]
add	edx, 24h
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_40]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_40]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_44], eax
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
add	edx, [ebp+var_14]
mov	eax, [ebp+var_58]
mov	[eax+8], edx
mov	ecx, [ebp+var_58]
mov	edx, [ebp+var_44]
mov	[ecx+0Ch], edx
jmp	short loc_43DDC8

loc_43DDA4:
mov	eax, dword ptr [ebp+arg_4]
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_4050A0
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_C], eax

loc_43DDC8:
mov	edx, [ebp+var_58]
add	edx, 24h
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_4C]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_4C]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_50], eax
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_C]
mov	[eax+10h], ecx
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_C]
mov	[edx+14h], eax
mov	ecx, [ebp+var_58]
mov	edx, [ebp+var_50]
mov	[ecx+18h], edx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_4042A0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax+14h]
add	ecx, [ebp+var_54]
mov	edx, [ebp+var_58]
mov	[edx+14h], ecx
mov	eax, dword ptr [ebp+var_8]
add	eax, dword ptr [ebp+arg_4]
mov	ecx, dword ptr [ebp+var_8+4]
adc	ecx, dword ptr [ebp+arg_4+4]
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], ecx

loc_43DE32:
mov	eax, dword ptr [ebp+var_8]
mov	edx, dword ptr [ebp+var_8+4]

loc_43DE38:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43DBC0 endp

align 10h


; Attributes: bp-based frame

sub_43DE40 proc	near

var_7C=	dword ptr -7Ch
var_78=	qword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= byte ptr	 8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
push	esi
mov	[ebp+var_70], ecx
mov	dword ptr [ebp+var_8], 0
mov	dword ptr [ebp+var_8+4], 0
mov	eax, [ebp+var_70]
mov	ecx, [eax+20h]
and	ecx, 10h
jz	loc_43E0C6
cmp	dword ptr [ebp+arg_4+4], 0
jl	loc_43E0C6
jg	short loc_43DE7D
cmp	dword ptr [ebp+arg_4], 0
jbe	loc_43E0C6

loc_43DE7D:
mov	edx, [ebp+var_70]
mov	eax, [edx+10h]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_70]
add	ecx, 24h
call	sub_5F52F0
cmp	[ebp+var_24], eax
jnz	loc_43DF72
mov	ecx, [ebp+var_70]
add	ecx, 24h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_5F52F0
mov	esi, eax
mov	ecx, [ebp+var_28]
call	sub_4042A0
add	esi, eax
mov	[ebp+var_2C], esi
mov	edx, [ebp+var_70]
mov	eax, [edx+14h]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_2C]
sub	ecx, [ebp+var_30]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cdq
mov	dword ptr [ebp+var_78],	eax
mov	dword ptr [ebp+var_78+4], edx
mov	edx, dword ptr [ebp+var_78+4]
cmp	edx, dword ptr [ebp+arg_4+4]
jl	short loc_43DF2E
jg	short loc_43DEE8
mov	eax, dword ptr [ebp+var_78]
cmp	eax, dword ptr [ebp+arg_4]
jbe	short loc_43DF2E

loc_43DEE8:
mov	ecx, [ebp+var_70]
mov	edx, [ecx+14h]
mov	[ebp+var_34], edx
mov	eax, dword ptr [ebp+arg_4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
push	ecx		; size_t
movzx	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_34]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, dword ptr [ebp+arg_4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+14h]
add	eax, [ebp+var_3C]
mov	ecx, [ebp+var_70]
mov	[ecx+14h], eax
mov	eax, dword ptr [ebp+arg_4]
mov	edx, dword ptr [ebp+arg_4+4]
jmp	loc_43E0CC
jmp	short loc_43DF72

loc_43DF2E:
mov	edx, [ebp+var_70]
mov	eax, [edx+14h]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_14]
push	ecx		; size_t
movzx	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_40]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	eax, [ebp+var_14]
cdq
add	eax, dword ptr [ebp+var_8]
mov	ecx, dword ptr [ebp+var_8+4]
adc	ecx, edx
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], ecx
mov	eax, [ebp+var_14]
cdq
mov	ecx, dword ptr [ebp+arg_4]
sub	ecx, eax
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, edx
mov	dword ptr [ebp+arg_4], ecx
mov	dword ptr [ebp+arg_4+4], eax

loc_43DF72:
mov	ecx, 1
test	ecx, ecx
jz	short loc_43DFA5
mov	ecx, [ebp+var_70]
add	ecx, 24h
call	sub_404790
xor	edx, edx
mov	[ebp+var_20], eax
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_20]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
call	sub_405570
add	esp, 8
mov	edx, [eax]
mov	[ebp+var_7C], edx
jmp	short loc_43DFAB

loc_43DFA5:
mov	eax, dword ptr [ebp+arg_4]
mov	[ebp+var_7C], eax

loc_43DFAB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+20h]
and	eax, 8
jz	short loc_43E039
mov	ecx, [ebp+var_70]
mov	edx, [ecx+8]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_70]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_54]
sub	edx, [ebp+var_58]
mov	[ebp+var_18], edx
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_70]
add	ecx, 24h
call	sub_43A580
mov	ecx, [ebp+var_70]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_C], eax
mov	edx, [ebp+var_70]
add	edx, 24h
mov	[ebp+var_5C], edx
mov	ecx, [ebp+var_5C]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_5C]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_60], eax
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
add	edx, [ebp+var_18]
mov	eax, [ebp+var_70]
mov	[eax+8], edx
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_60]
mov	[ecx+0Ch], edx
jmp	short loc_43E05B

loc_43E039:
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_70]
add	ecx, 24h
call	sub_43A580
mov	ecx, [ebp+var_70]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_C], eax

loc_43E05B:
mov	edx, [ebp+var_70]
add	edx, 24h
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_64]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_64]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_68], eax
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_C]
mov	[eax+10h], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_C]
mov	[edx+14h], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_68]
mov	[ecx+18h], edx
mov	ecx, [ebp+var_70]
add	ecx, 24h
call	sub_4042A0
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_70]
mov	ecx, [eax+14h]
add	ecx, [ebp+var_6C]
mov	edx, [ebp+var_70]
mov	[edx+14h], ecx
mov	eax, [ebp+var_10]
xor	ecx, ecx
add	eax, dword ptr [ebp+var_8]
mov	edx, dword ptr [ebp+var_8+4]
adc	edx, ecx
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], edx

loc_43E0C6:
mov	eax, dword ptr [ebp+var_8]
mov	edx, dword ptr [ebp+var_8+4]

loc_43E0CC:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43DE40 endp

align 10h


; Attributes: bp-based frame

sub_43E0E0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
mov	[ebp+var_5C], ecx
cmp	[ebp+arg_8], 0
jl	loc_43E274
jg	short loc_43E100
cmp	[ebp+arg_4], 0
jbe	loc_43E274

loc_43E100:
mov	[ebp+var_11], 0
mov	[ebp+var_5], 0
mov	[ebp+var_C], 0
mov	[ebp+var_10], 0
mov	eax, [ebp+var_5C]
mov	ecx, [eax+10h]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_5F52F0
cmp	[ebp+var_24], eax
jnz	short loc_43E14E
mov	[ebp+var_5], 1
mov	edx, [ebp+var_5C]
mov	eax, [edx+14h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_28]
sub	eax, [ebp+var_2C]
mov	[ebp+var_10], eax

loc_43E14E:
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_5F52F0
cmp	[ebp+var_30], eax
jnz	short loc_43E186
mov	[ebp+var_11], 1
mov	eax, [ebp+var_5C]
mov	ecx, [eax+8]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_34]
sub	ecx, [ebp+var_38]
mov	[ebp+var_C], ecx

loc_43E186:
mov	edx, 1
test	edx, edx
jz	short loc_43E1B9
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_404790
xor	ecx, ecx
mov	[ebp+var_20], eax
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_20]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	sub_405570
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_60], ecx
jmp	short loc_43E1BF

loc_43E1B9:
mov	edx, [ebp+arg_4]
mov	[ebp+var_60], edx

loc_43E1BF:
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_43A4F0
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_4], eax
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_43E222
mov	edx, [ebp+var_5C]
add	edx, 24h
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_4C]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_4C]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_50], eax
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
add	edx, [ebp+var_C]
mov	eax, [ebp+var_5C]
mov	[eax+8], edx
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_50]
mov	[ecx+0Ch], edx

loc_43E222:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_43E274
mov	ecx, [ebp+var_5C]
add	ecx, 24h
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
call	sub_4042A0
mov	esi, eax
mov	ecx, [ebp+var_54]
call	sub_5F52F0
add	eax, esi
mov	[ebp+var_58], eax
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_4]
mov	[edx+10h], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_4]
mov	[ecx+14h], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_58]
mov	[eax+18h], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+14h]
add	eax, [ebp+var_10]
mov	ecx, [ebp+var_5C]
mov	[ecx+14h], eax

loc_43E274:
mov	eax, [ebp+var_5C]
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43E0E0 endp

align 10h


; Attributes: bp-based frame

sub_43E280 proc	near

var_74=	qword ptr -74h
var_6C=	qword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	qword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_10]
and	ecx, [eax+20h]
mov	[ebp+arg_10], ecx
mov	edx, [ebp+arg_10]
and	edx, 8
neg	edx
sbb	edx, edx
neg	edx
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_10]
and	eax, 10h
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jnz	short loc_43E2D7
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_43E2D7
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E548

loc_43E2D7:
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_43E2EE
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+8]
mov	[ebp+var_20], edx
cmp	[ebp+var_20], 0
jz	short loc_43E305

loc_43E2EE:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_43E319
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+14h]
mov	[ebp+var_24], edx
cmp	[ebp+var_24], 0
jnz	short loc_43E319

loc_43E305:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E548

loc_43E319:
mov	eax, [ebp+arg_C]
mov	[ebp+var_60], eax
cmp	[ebp+var_60], 1
jz	short loc_43E336
cmp	[ebp+var_60], 2
jz	short loc_43E361
cmp	[ebp+var_60], 4
jz	short loc_43E349
jmp	loc_43E3CD

loc_43E336:
mov	dword ptr [ebp+var_10],	0
mov	dword ptr [ebp+var_10+4], 0
jmp	loc_43E3E1

loc_43E349:
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_4042A0
xor	ecx, ecx
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], ecx
jmp	loc_43E3E1

loc_43E361:
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_43E386
mov	eax, [ebp+var_5C]
mov	ecx, [eax+8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_28]
sub	ecx, [ebp+var_2C]
mov	[ebp+var_64], ecx
jmp	short loc_43E3A1

loc_43E386:
mov	edx, [ebp+var_5C]
mov	eax, [edx+14h]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_30]
sub	eax, [ebp+var_34]
mov	[ebp+var_64], eax

loc_43E3A1:
mov	eax, [ebp+var_64]
cdq
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], edx
mov	ecx, dword ptr [ebp+arg_4]
or	ecx, dword ptr [ebp+arg_4+4]
jnz	short loc_43E3CB
mov	edx, dword ptr [ebp+var_10+4]
push	edx
mov	eax, dword ptr [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E548

loc_43E3CB:
jmp	short loc_43E3E1

loc_43E3CD:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E548

loc_43E3E1:
mov	ecx, dword ptr [ebp+arg_4]
add	ecx, dword ptr [ebp+var_10]
mov	edx, dword ptr [ebp+arg_4+4]
adc	edx, dword ptr [ebp+var_10+4]
mov	dword ptr [ebp+arg_4], ecx
mov	dword ptr [ebp+arg_4+4], edx
movzx	eax, [ebp+var_1]
test	eax, eax
jz	loc_43E494
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_38]
sub	edx, [ebp+var_3C]
mov	[ebp+var_18], edx
cmp	dword ptr [ebp+arg_4+4], 0
jl	short loc_43E444
jg	short loc_43E428
cmp	dword ptr [ebp+arg_4], 0
jb	short loc_43E444

loc_43E428:
mov	eax, [ebp+var_18]
cdq
mov	dword ptr [ebp+var_6C],	eax
mov	dword ptr [ebp+var_6C+4], edx
mov	eax, dword ptr [ebp+arg_4+4]
cmp	eax, dword ptr [ebp+var_6C+4]
jl	short loc_43E458
jg	short loc_43E444
mov	ecx, dword ptr [ebp+arg_4]
cmp	ecx, dword ptr [ebp+var_6C]
jbe	short loc_43E458

loc_43E444:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E548

loc_43E458:
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_48]
mov	[edx+4], eax
mov	ecx, dword ptr [ebp+arg_4]
add	ecx, [ebp+var_44]
mov	edx, [ebp+var_5C]
mov	[edx+8], ecx
mov	eax, [ebp+var_40]
add	eax, [ebp+var_18]
mov	ecx, [ebp+var_5C]
mov	[ecx+0Ch], eax

loc_43E494:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_43E535
mov	eax, [ebp+var_5C]
mov	ecx, [eax+18h]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+10h]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_4C]
sub	ecx, [ebp+var_50]
mov	[ebp+var_1C], ecx
cmp	dword ptr [ebp+arg_4+4], 0
jl	short loc_43E4E5
jg	short loc_43E4C9
cmp	dword ptr [ebp+arg_4], 0
jb	short loc_43E4E5

loc_43E4C9:
mov	eax, [ebp+var_1C]
cdq
mov	dword ptr [ebp+var_74],	eax
mov	dword ptr [ebp+var_74+4], edx
mov	edx, dword ptr [ebp+arg_4+4]
cmp	edx, dword ptr [ebp+var_74+4]
jl	short loc_43E4F6
jg	short loc_43E4E5
mov	eax, dword ptr [ebp+arg_4]
cmp	eax, dword ptr [ebp+var_74]
jbe	short loc_43E4F6

loc_43E4E5:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	short loc_43E548

loc_43E4F6:
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+10h]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_58]
mov	[edx+10h], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_58]
mov	[ecx+14h], edx
mov	eax, [ebp+var_54]
add	eax, [ebp+var_1C]
mov	ecx, [ebp+var_5C]
mov	[ecx+18h], eax
mov	edx, dword ptr [ebp+arg_4]
mov	eax, [ebp+var_5C]
add	edx, [eax+14h]
mov	ecx, [ebp+var_5C]
mov	[ecx+14h], edx

loc_43E535:
mov	edx, dword ptr [ebp+arg_4+4]
push	edx
mov	eax, dword ptr [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]

loc_43E548:
mov	esp, ebp
pop	ebp
retn	14h
sub_43E280 endp

align 10h


; Attributes: bp-based frame

sub_43E550 proc	near

var_84=	qword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_11=	byte ptr -11h
var_10=	qword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
push	esi
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_14]
and	ecx, [eax+20h]
mov	[ebp+arg_14], ecx
mov	edx, [ebp+arg_14]
and	edx, 8
neg	edx
sbb	edx, edx
neg	edx
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_14]
and	eax, 10h
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jnz	short loc_43E5AB
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_43E5AB
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E7A6

loc_43E5AB:
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_43E5C2
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
cmp	[ebp+var_3C], 0
jz	short loc_43E5D9

loc_43E5C2:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_43E5ED
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+14h]
mov	[ebp+var_40], edx
cmp	[ebp+var_40], 0
jnz	short loc_43E5ED

loc_43E5D9:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E7A6

loc_43E5ED:
push	0
push	0
lea	ecx, [ebp+var_28]
call	sub_406AE0
mov	ecx, eax
call	sub_406400
mov	[ebp+var_58], eax
mov	[ebp+var_54], edx
mov	eax, dword ptr [ebp+arg_4]
mov	[ebp+var_50], eax
mov	ecx, dword ptr [ebp+arg_4+4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_48], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_50]
sub	ecx, [ebp+var_58]
mov	edx, [ebp+var_4C]
sbb	edx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	dword ptr [ebp+var_38],	eax
mov	ecx, [ebp+var_4C]
mov	dword ptr [ebp+var_38+4], ecx
mov	edx, [ebp+var_48]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_44]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_38]
call	sub_406400
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], edx
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	loc_43E6F4
cmp	dword ptr [ebp+var_10+4], 0
jl	short loc_43E6A7
jg	short loc_43E670
cmp	dword ptr [ebp+var_10],	0
jb	short loc_43E6A7

loc_43E670:
mov	edx, [ebp+var_7C]
mov	eax, [edx+0Ch]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_60]
cdq
mov	dword ptr [ebp+var_84],	eax
mov	dword ptr [ebp+var_84+4], edx
mov	eax, dword ptr [ebp+var_10+4]
cmp	eax, dword ptr [ebp+var_84+4]
jl	short loc_43E6BB
jg	short loc_43E6A7
mov	ecx, dword ptr [ebp+var_10]
cmp	ecx, dword ptr [ebp+var_84]
jbe	short loc_43E6BB

loc_43E6A7:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43E7A6

loc_43E6BB:
mov	edx, [ebp+var_7C]
mov	eax, [edx+0Ch]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_6C]
mov	[edx+4], eax
mov	ecx, dword ptr [ebp+var_10]
add	ecx, [ebp+var_68]
mov	edx, [ebp+var_7C]
mov	[edx+8], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_64]
mov	[eax+0Ch], ecx

loc_43E6F4:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_43E789
cmp	dword ptr [ebp+var_10+4], 0
jl	short loc_43E720
jg	short loc_43E70E
cmp	dword ptr [ebp+var_10],	0
jb	short loc_43E720

loc_43E70E:
mov	esi, dword ptr [ebp+var_10]
mov	ecx, [ebp+var_7C]
add	ecx, 24h
call	sub_4042A0
cmp	esi, eax
jbe	short loc_43E731

loc_43E720:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	short loc_43E7A6

loc_43E731:
mov	eax, [ebp+var_7C]
add	eax, 24h
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
call	sub_5F52F0
mov	esi, eax
mov	ecx, [ebp+var_70]
call	sub_4042A0
add	esi, eax
mov	[ebp+var_74], esi
mov	ecx, [ebp+var_7C]
add	ecx, 24h
call	sub_5F52F0
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_78]
mov	[ecx+10h], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_78]
mov	[eax+14h], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_74]
mov	[edx+18h], eax
mov	ecx, dword ptr [ebp+var_10]
mov	edx, [ebp+var_7C]
add	ecx, [edx+14h]
mov	eax, [ebp+var_7C]
mov	[eax+14h], ecx

loc_43E789:
mov	ecx, [ebp+arg_0]
mov	edx, dword ptr [ebp+arg_4]
mov	[ecx], edx
mov	eax, dword ptr [ebp+arg_4+4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]

loc_43E7A6:
pop	esi
mov	esp, ebp
pop	ebp
retn	18h
sub_43E550 endp

align 10h


; Attributes: bp-based frame

sub_43E7B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_491 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_43E7FF
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_155DF88
mov	ecx, [ebp+var_14]
add	ecx, 40h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_43E7FF:
push	0
push	0
mov	ecx, [ebp+var_14]
call	sub_43D300
mov	[ebp+var_4], 1
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	dword ptr [edx+ecx], offset off_155DF84
mov	eax, [ebp+arg_0]
or	eax, 10h
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_448A40
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
add	ecx, [eax+4]
call	sub_43BA90
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43E7B0 endp

align 10h


; Attributes: bp-based frame

sub_43E870 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43E870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax-40h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	dword ptr [eax+edx-40h], offset	off_155DF84
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
sub	ecx, 3Ch
call	sub_43D790
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
sub	ecx, 38h
call	sub_43D390
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43E870 endp

align 10h


; Attributes: bp-based frame

sub_43E8E0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_43E8F1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_43E933
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_448AD0
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_43E931
mov	ecx, 1
imul	ecx, 38h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_43E931:
jmp	short loc_43E8F1

loc_43E933:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_43E8E0 endp

align 10h


; Attributes: bp-based frame

sub_43E950 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= word ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43E950
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
mov	[ebp+var_3C], 0
xor	eax, eax
mov	[ebp+var_36], al
lea	ecx, [ebp+var_35]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_604B20
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	[ebp+var_58], edx
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_4]
call	sub_402430
add	eax, 1
push	eax
movzx	eax, [ebp+var_36]
push	eax
lea	ecx, [ebp+var_34]
push	ecx
call	sub_404330
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_35]
call	nullsub_1
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_34]
call	sub_402460
movzx	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_34]
call	sub_438A10
lea	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_403400
mov	edx, [ebp+var_3C]
or	edx, 1
mov	[ebp+var_3C], edx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43E950 endp

align 10h


; Attributes: bp-based frame

sub_43EA10 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_2C=	dword ptr -2Ch
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43EA10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
mov	[ebp+var_2C], 0
xor	eax, eax
mov	[ebp+var_26], al
lea	ecx, [ebp+var_25]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_604B20
mov	[ebp+var_44], eax
mov	edx, [ebp+var_44]
mov	[ebp+var_48], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_4042A0
add	eax, 1
push	eax
movzx	ecx, [ebp+var_26]
push	ecx
lea	ecx, [ebp+var_24]
call	sub_4041F0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_25]
call	nullsub_1
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_24]
call	sub_402340
movzx	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_24]
call	sub_438580
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	edx, [ebp+var_2C]
or	edx, 1
mov	[ebp+var_2C], edx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_24]
call	sub_407910
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43EA10 endp

align 10h


; Attributes: bp-based frame

sub_43EAD0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
push	eax
call	sub_4077F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
call	sub_402430
cmp	eax, [ebp+var_4]
jnz	loc_43EB7A
mov	ecx, [ebp+arg_0]
call	sub_404430
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_8], eax
jmp	short loc_43EB30

loc_43EB15:
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 2
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax

loc_43EB30:
cmp	[ebp+var_10], 0
jbe	short loc_43EB64
mov	ecx, [ebp+var_8]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax]
cmp	edx, ecx
jz	short loc_43EB62
mov	edx, [ebp+var_8]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+var_C]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	eax, edx
setnl	cl
lea	ecx, [ecx+ecx-1]
mov	[ebp+var_14], ecx
jmp	short loc_43EB6B

loc_43EB62:
jmp	short loc_43EB15

loc_43EB64:
mov	[ebp+var_14], 0

loc_43EB6B:
cmp	[ebp+var_14], 0
jnz	short loc_43EB7A
mov	[ebp+var_1C], 1
jmp	short loc_43EB81

loc_43EB7A:
mov	[ebp+var_1C], 0

loc_43EB81:
mov	al, byte ptr [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_43EAD0 endp

align 10h


; Attributes: bp-based frame

sub_43EB90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43EB90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155DFB4
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 24h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_406E60
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43EB90 endp

align 10h


; Attributes: bp-based frame

sub_43EBF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_4023E0
mov	ecx, [ebp+var_4]
call	sub_448BD0
mov	esp, ebp
pop	ebp
retn	4
sub_43EBF0 endp

align 10h


; Attributes: bp-based frame

sub_43EC20 proc	near

var_6= word ptr	-6
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_4]
call	sub_41ACE0
cmp	esi, eax
jz	short loc_43EC57
mov	ecx, [ebp+var_4]
call	sub_406880
push	eax
call	sub_4070A0
add	esp, 4
mov	[ebp+var_6], ax
jmp	short loc_43EC60

loc_43EC57:
call	sub_407230
mov	[ebp+var_6], ax

loc_43EC60:
mov	ax, [ebp+var_6]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_43EC20 endp

align 10h


; Attributes: bp-based frame

sub_43EC70 proc	near

var_8= dword ptr -8
var_4= word ptr	-4

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_8]
call	sub_41ACE0
cmp	esi, eax
jz	short loc_43ECB7
mov	ecx, [ebp+var_8]
call	sub_406880
push	eax
call	sub_4070A0
add	esp, 4
mov	[ebp+var_4], ax
push	1
mov	ecx, [ebp+var_8]
call	sub_406850
mov	ax, [ebp+var_4]
jmp	short loc_43ECBC
jmp	short loc_43ECBC

loc_43ECB7:
call	sub_407230

loc_43ECBC:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_43EC70 endp

align 10h


; Attributes: bp-based frame

sub_43ECD0 proc	near

var_C= dword ptr -0Ch
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= word ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_C]
call	sub_418C90
cmp	esi, eax
jz	loc_43EDB3
call	sub_407230
mov	[ebp+var_2], ax
lea	eax, [ebp+var_2]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_406860
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	loc_43ED99
lea	eax, [ebp+arg_0]
push	eax
call	sub_4070A0
add	esp, 4
mov	[ebp+var_4], ax
mov	ecx, [ebp+var_C]
call	sub_406880
sub	eax, 2
push	eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_406860
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_43ED59
push	0FFFFFFFFh
mov	ecx, [ebp+var_C]
call	sub_406850
mov	ax, [ebp+arg_0]
jmp	short loc_43EDB8
jmp	short loc_43ED97

loc_43ED59:
mov	eax, [ebp+var_C]
mov	ecx, [eax+20h]
and	ecx, 10h
jz	short loc_43ED90
push	0FFFFFFFFh
mov	ecx, [ebp+var_C]
call	sub_406850
lea	edx, [ebp+arg_0]
push	edx
call	sub_4070A0
add	esp, 4
mov	si, ax
mov	ecx, [ebp+var_C]
call	sub_406880
mov	[eax], si
mov	ax, [ebp+arg_0]
jmp	short loc_43EDB8
jmp	short loc_43ED97

loc_43ED90:
call	sub_407230
jmp	short loc_43EDB8

loc_43ED97:
jmp	short loc_43EDB1

loc_43ED99:
push	0FFFFFFFFh
mov	ecx, [ebp+var_C]
call	sub_406850
lea	eax, [ebp+arg_0]
push	eax
call	sub_4070B0
add	esp, 4
jmp	short loc_43EDB8

loc_43EDB1:
jmp	short loc_43EDB8

loc_43EDB3:
call	sub_407230

loc_43EDB8:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_43ECD0 endp

align 10h


; Attributes: bp-based frame

sub_43EDC0 proc	near

var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_A= word ptr	-0Ah
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= word ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
push	esi
mov	[ebp+var_3C], ecx
call	sub_407230
mov	[ebp+var_A], ax
lea	eax, [ebp+var_A]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_406860
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	loc_43EF9A
mov	eax, [ebp+var_3C]
mov	ecx, [eax+20h]
and	ecx, 10h
jz	loc_43EF93
mov	edx, [ebp+var_3C]
mov	eax, [edx+18h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_3C]
call	sub_5F52F0
cmp	eax, [ebp+var_10]
jnb	short loc_43EE46
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4070A0
add	esp, 4
movzx	edx, ax
push	edx
mov	ecx, [ebp+var_3C]
add	ecx, 24h
call	sub_438A10
mov	eax, 1
shl	eax, 1
mov	ecx, [ebp+var_3C]
add	eax, [ecx+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], eax
jmp	loc_43EF8D

loc_43EE46:
mov	eax, [ebp+var_3C]
mov	ecx, [eax+20h]
and	ecx, 8
jz	loc_43EF19
mov	ecx, [ebp+var_3C]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_3C]
call	sub_418C90
sub	esi, eax
sar	esi, 1
mov	[ebp+var_4], esi
lea	edx, [ebp+arg_0]
push	edx
call	sub_4070A0
add	esp, 4
movzx	eax, ax
push	eax
mov	ecx, [ebp+var_3C]
add	ecx, 24h
call	sub_438A10
mov	ecx, [ebp+var_3C]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_3C]
add	ecx, 24h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_1C]
call	sub_404430
lea	edx, [eax+esi*2]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_407300
mov	ecx, [ebp+var_3C]
add	ecx, 24h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_20]
call	sub_404430
lea	edx, [eax+esi*2]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_407320
mov	ecx, [ebp+var_3C]
add	ecx, 24h
call	sub_402430
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+14h]
mov	eax, [ebp+var_24]
lea	ecx, [edx+eax*2]
mov	edx, [ebp+var_3C]
mov	[edx+14h], ecx
jmp	short loc_43EF8D

loc_43EF19:
lea	eax, [ebp+arg_0]
push	eax
call	sub_4070A0
add	esp, 4
movzx	ecx, ax
push	ecx
mov	ecx, [ebp+var_3C]
add	ecx, 24h
call	sub_438A10
mov	edx, [ebp+var_3C]
add	edx, 24h
mov	[ebp+var_2C], edx
mov	ecx, [ebp+var_2C]
call	sub_404430
mov	esi, eax
mov	ecx, [ebp+var_2C]
call	sub_402430
lea	eax, [esi+eax*2]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_3C]
add	ecx, 24h
call	sub_404430
push	eax
mov	ecx, [ebp+var_3C]
call	sub_407320
mov	ecx, [ebp+var_3C]
add	ecx, 24h
call	sub_402430
mov	[ebp+var_34], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_34]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_3C]
mov	[eax+14h], edx

loc_43EF8D:
mov	ax, [ebp+arg_0]
jmp	short loc_43EFA6

loc_43EF93:
call	sub_407230
jmp	short loc_43EFA6

loc_43EF9A:
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4070B0
add	esp, 4

loc_43EFA6:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_43EDC0 endp

align 10h


; Attributes: bp-based frame

sub_43EFB0 proc	near

var_40=	qword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
push	esi
mov	[ebp+var_38], ecx
mov	dword ptr [ebp+var_8], 0
mov	dword ptr [ebp+var_8+4], 0
mov	eax, [ebp+var_38]
mov	ecx, [eax+20h]
and	ecx, 10h
jz	loc_43F1F6
cmp	dword ptr [ebp+arg_4+4], 0
jl	loc_43F1F6
jg	short loc_43EFED
cmp	dword ptr [ebp+arg_4], 0
jbe	loc_43F1F6

loc_43EFED:
mov	ecx, [ebp+var_38]
add	ecx, 24h
call	sub_402CA0
movzx	edx, al
test	edx, edx
jnz	loc_43F0F2
mov	eax, [ebp+var_38]
mov	ecx, [eax+10h]
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_38]
add	ecx, 24h
call	sub_404430
cmp	[ebp+var_18], eax
jnz	loc_43F0F2
mov	edx, [ebp+var_38]
add	edx, 24h
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_1C]
call	sub_404430
mov	esi, eax
mov	ecx, [ebp+var_1C]
call	sub_402430
lea	eax, [esi+eax*2]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_38]
call	sub_5F52F0
mov	ecx, [ebp+var_20]
sub	ecx, eax
sar	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
cdq
mov	dword ptr [ebp+var_40],	eax
mov	dword ptr [ebp+var_40+4], edx
mov	edx, dword ptr [ebp+var_40+4]
cmp	edx, dword ptr [ebp+arg_4+4]
jl	short loc_43F0A7
jg	short loc_43F06F
mov	eax, dword ptr [ebp+var_40]
cmp	eax, dword ptr [ebp+arg_4]
jbe	short loc_43F0A7

loc_43F06F:
mov	ecx, dword ptr [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_38]
call	sub_5F52F0
push	eax
call	sub_406C60
add	esp, 0Ch
mov	eax, dword ptr [ebp+arg_4]
mov	ecx, [ebp+var_38]
mov	edx, [ecx+14h]
lea	eax, [edx+eax*2]
mov	ecx, [ebp+var_38]
mov	[ecx+14h], eax
mov	eax, dword ptr [ebp+arg_4]
mov	edx, dword ptr [ebp+arg_4+4]
jmp	loc_43F1FC
jmp	short loc_43F0F2

loc_43F0A7:
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_5F52F0
push	eax
call	sub_406C60
add	esp, 0Ch
mov	eax, [ebp+var_10]
cdq
add	eax, dword ptr [ebp+var_8]
mov	ecx, dword ptr [ebp+var_8+4]
adc	ecx, edx
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], ecx
mov	eax, [ebp+var_10]
cdq
mov	ecx, dword ptr [ebp+arg_4]
sub	ecx, eax
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, edx
mov	dword ptr [ebp+arg_4], ecx
mov	dword ptr [ebp+arg_4+4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*2]
mov	[ebp+arg_0], eax

loc_43F0F2:
mov	ecx, [ebp+var_38]
mov	edx, [ecx+20h]
and	edx, 8
jz	short loc_43F173
mov	ecx, [ebp+var_38]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_38]
call	sub_418C90
sub	esi, eax
sar	esi, 1
mov	[ebp+var_14], esi
mov	eax, dword ptr [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	ecx, [ecx+eax*2]
mov	edx, [ebp+var_38]
add	edx, 24h
push	edx
mov	edx, [ebp+arg_0]
call	sub_405010
mov	ecx, [ebp+var_38]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_C], eax
mov	eax, [ebp+var_38]
add	eax, 24h
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_28]
call	sub_404430
lea	ecx, [eax+esi*2]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_C]
lea	ecx, [eax+edx*2]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_38]
call	sub_407300
jmp	short loc_43F199

loc_43F173:
mov	eax, dword ptr [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	ecx, [ecx+eax*2]
mov	edx, [ebp+var_38]
add	edx, 24h
push	edx
mov	edx, [ebp+arg_0]
call	sub_405010
mov	ecx, [ebp+var_38]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_C], eax

loc_43F199:
mov	eax, [ebp+var_38]
add	eax, 24h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_30]
call	sub_404430
lea	ecx, [eax+esi*2]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_38]
call	sub_407320
mov	ecx, [ebp+var_38]
add	ecx, 24h
call	sub_402430
mov	[ebp+var_34], eax
mov	eax, [ebp+var_38]
mov	ecx, [eax+14h]
mov	edx, [ebp+var_34]
lea	eax, [ecx+edx*2]
mov	ecx, [ebp+var_38]
mov	[ecx+14h], eax
mov	edx, dword ptr [ebp+var_8]
add	edx, dword ptr [ebp+arg_4]
mov	eax, dword ptr [ebp+var_8+4]
adc	eax, dword ptr [ebp+arg_4+4]
mov	dword ptr [ebp+var_8], edx
mov	dword ptr [ebp+var_8+4], eax

loc_43F1F6:
mov	eax, dword ptr [ebp+var_8]
mov	edx, dword ptr [ebp+var_8+4]

loc_43F1FC:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43EFB0 endp

align 10h


; Attributes: bp-based frame

sub_43F210 proc	near

var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= word ptr	 8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
push	esi
mov	[ebp+var_58], ecx
mov	dword ptr [ebp+var_8], 0
mov	dword ptr [ebp+var_8+4], 0
mov	eax, [ebp+var_58]
mov	ecx, [eax+20h]
and	ecx, 10h
jz	loc_43F474
cmp	dword ptr [ebp+arg_4+4], 0
jl	loc_43F474
jg	short loc_43F24D
cmp	dword ptr [ebp+arg_4], 0
jbe	loc_43F474

loc_43F24D:
mov	edx, [ebp+var_58]
mov	eax, [edx+10h]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_404430
cmp	[ebp+var_24], eax
jnz	loc_43F338
mov	ecx, [ebp+var_58]
add	ecx, 24h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_404430
mov	esi, eax
mov	ecx, [ebp+var_28]
call	sub_402430
lea	edx, [esi+eax*2]
mov	[ebp+var_2C], edx
mov	ecx, [ebp+var_58]
call	sub_5F52F0
mov	ecx, [ebp+var_2C]
sub	ecx, eax
sar	ecx, 1
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cdq
mov	dword ptr [ebp+var_60],	eax
mov	dword ptr [ebp+var_60+4], edx
mov	edx, dword ptr [ebp+var_60+4]
cmp	edx, dword ptr [ebp+arg_4+4]
jl	short loc_43F2F8
jg	short loc_43F2B9
mov	eax, dword ptr [ebp+var_60]
cmp	eax, dword ptr [ebp+arg_4]
jbe	short loc_43F2F8

loc_43F2B9:
movzx	ecx, [ebp+arg_0]
push	ecx
mov	edx, dword ptr [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_58]
call	sub_5F52F0
push	eax
call	sub_406D40
add	esp, 0Ch
mov	eax, dword ptr [ebp+arg_4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+14h]
mov	eax, [ebp+var_34]
lea	ecx, [edx+eax*2]
mov	edx, [ebp+var_58]
mov	[edx+14h], ecx
mov	eax, dword ptr [ebp+arg_4]
mov	edx, dword ptr [ebp+arg_4+4]
jmp	loc_43F47A
jmp	short loc_43F338

loc_43F2F8:
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5F52F0
push	eax
call	sub_406D40
add	esp, 0Ch
mov	eax, [ebp+var_14]
cdq
add	eax, dword ptr [ebp+var_8]
mov	ecx, dword ptr [ebp+var_8+4]
adc	ecx, edx
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], ecx
mov	eax, [ebp+var_14]
cdq
mov	ecx, dword ptr [ebp+arg_4]
sub	ecx, eax
mov	eax, dword ptr [ebp+arg_4+4]
sbb	eax, edx
mov	dword ptr [ebp+arg_4], ecx
mov	dword ptr [ebp+arg_4+4], eax

loc_43F338:
mov	ecx, 1
test	ecx, ecx
jz	short loc_43F36B
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_4043E0
xor	edx, edx
mov	[ebp+var_20], eax
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_20]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
call	sub_405570
add	esp, 8
mov	edx, [eax]
mov	[ebp+var_64], edx
jmp	short loc_43F371

loc_43F36B:
mov	eax, dword ptr [ebp+arg_4]
mov	[ebp+var_64], eax

loc_43F371:
mov	ecx, [ebp+var_64]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx+20h]
and	eax, 8
jz	short loc_43F3F4
mov	ecx, [ebp+var_58]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_58]
call	sub_418C90
sub	esi, eax
sar	esi, 1
mov	[ebp+var_18], esi
movzx	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_43AFB0
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_C], eax
mov	eax, [ebp+var_58]
add	eax, 24h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_4C]
call	sub_404430
lea	ecx, [eax+esi*2]
push	ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_C]
lea	ecx, [eax+edx*2]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_58]
call	sub_407300
jmp	short loc_43F416

loc_43F3F4:
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_43AFB0
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_C], eax

loc_43F416:
mov	edx, [ebp+var_58]
add	edx, 24h
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_50]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_50]
call	sub_404430
lea	eax, [eax+esi*2]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_407320
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_402430
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_54]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_58]
mov	[eax+14h], edx
mov	ecx, [ebp+var_10]
xor	edx, edx
add	ecx, dword ptr [ebp+var_8]
mov	eax, dword ptr [ebp+var_8+4]
adc	eax, edx
mov	dword ptr [ebp+var_8], ecx
mov	dword ptr [ebp+var_8+4], eax

loc_43F474:
mov	eax, dword ptr [ebp+var_8]
mov	edx, dword ptr [ebp+var_8+4]

loc_43F47A:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43F210 endp

align 10h


; Attributes: bp-based frame

sub_43F490 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
push	esi
mov	[ebp+var_48], ecx
cmp	[ebp+arg_8], 0
jl	loc_43F60C
jg	short loc_43F4B0
cmp	[ebp+arg_4], 0
jbe	loc_43F60C

loc_43F4B0:
mov	[ebp+var_11], 0
mov	[ebp+var_5], 0
mov	[ebp+var_C], 0
mov	[ebp+var_10], 0
mov	eax, [ebp+var_48]
mov	ecx, [eax+10h]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_48]
add	ecx, 24h
call	sub_404430
cmp	[ebp+var_24], eax
jnz	short loc_43F4FC
mov	[ebp+var_5], 1
mov	edx, [ebp+var_48]
mov	eax, [edx+10h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_48]
call	sub_5F52F0
sub	eax, [ebp+var_28]
sar	eax, 1
mov	[ebp+var_10], eax

loc_43F4FC:
mov	ecx, [ebp+var_48]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_48]
call	sub_418C90
cmp	eax, [ebp+var_2C]
jnz	short loc_43F534
mov	[ebp+var_11], 1
mov	ecx, [ebp+var_48]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_48]
call	sub_418C90
sub	esi, eax
sar	esi, 1
mov	[ebp+var_C], esi

loc_43F534:
mov	ecx, 1
test	ecx, ecx
jz	short loc_43F567
mov	ecx, [ebp+var_48]
add	ecx, 24h
call	sub_4043E0
xor	edx, edx
mov	[ebp+var_20], eax
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_20]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
call	sub_405570
add	esp, 8
mov	edx, [eax]
mov	[ebp+var_4C], edx
jmp	short loc_43F56D

loc_43F567:
mov	eax, [ebp+arg_4]
mov	[ebp+var_4C], eax

loc_43F56D:
mov	ecx, [ebp+var_4C]
push	ecx
mov	ecx, [ebp+var_48]
add	ecx, 24h
call	sub_42BD60
mov	ecx, [ebp+var_48]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_4], eax
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_43F5C7
mov	eax, [ebp+var_48]
add	eax, 24h
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_40]
call	sub_404430
lea	ecx, [eax+esi*2]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*2]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_48]
call	sub_407300

loc_43F5C7:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_43F60C
mov	ecx, [ebp+var_48]
add	ecx, 24h
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_44]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_44]
call	sub_404430
lea	edx, [eax+esi*2]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_48]
call	sub_407320
mov	ecx, [ebp+var_48]
mov	edx, [ecx+14h]
mov	eax, [ebp+var_10]
lea	ecx, [edx+eax*2]
mov	edx, [ebp+var_48]
mov	[edx+14h], ecx

loc_43F60C:
mov	eax, [ebp+var_48]
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_43F490 endp

align 10h


; Attributes: bp-based frame

sub_43F620 proc	near

var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	qword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
push	esi
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_10]
and	ecx, [eax+20h]
mov	[ebp+arg_10], ecx
mov	edx, [ebp+arg_10]
and	edx, 8
neg	edx
sbb	edx, edx
neg	edx
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_10]
and	eax, 10h
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jnz	short loc_43F678
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_43F678
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43F8CA

loc_43F678:
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_43F68C
mov	ecx, [ebp+var_34]
call	sub_406880
test	eax, eax
jz	short loc_43F6A0

loc_43F68C:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_43F6B4
mov	ecx, [ebp+var_34]
call	sub_5F52F0
test	eax, eax
jnz	short loc_43F6B4

loc_43F6A0:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43F8CA

loc_43F6B4:
mov	edx, [ebp+arg_C]
mov	[ebp+var_38], edx
cmp	[ebp+var_38], 1
jz	short loc_43F6D1
cmp	[ebp+var_38], 2
jz	short loc_43F6F9
cmp	[ebp+var_38], 4
jz	short loc_43F6E4
jmp	loc_43F761

loc_43F6D1:
mov	dword ptr [ebp+var_10],	0
mov	dword ptr [ebp+var_10+4], 0
jmp	loc_43F775

loc_43F6E4:
mov	ecx, [ebp+var_34]
add	ecx, 24h
call	sub_402430
xor	ecx, ecx
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], ecx
jmp	short loc_43F775

loc_43F6F9:
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_43F71C
mov	ecx, [ebp+var_34]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_34]
call	sub_418C90
sub	esi, eax
sar	esi, 1
mov	[ebp+var_3C], esi
jmp	short loc_43F735

loc_43F71C:
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_34]
call	sub_5F52F0
sub	eax, [ebp+var_20]
sar	eax, 1
mov	[ebp+var_3C], eax

loc_43F735:
mov	eax, [ebp+var_3C]
cdq
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], edx
mov	edx, dword ptr [ebp+arg_4]
or	edx, dword ptr [ebp+arg_4+4]
jnz	short loc_43F75F
mov	eax, dword ptr [ebp+var_10+4]
push	eax
mov	ecx, dword ptr [ebp+var_10]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43F8CA

loc_43F75F:
jmp	short loc_43F775

loc_43F761:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43F8CA

loc_43F775:
mov	edx, dword ptr [ebp+arg_4]
add	edx, dword ptr [ebp+var_10]
mov	eax, dword ptr [ebp+arg_4+4]
adc	eax, dword ptr [ebp+var_10+4]
mov	dword ptr [ebp+arg_4], edx
mov	dword ptr [ebp+arg_4+4], eax
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	loc_43F819
mov	ecx, [ebp+var_34]
call	sub_41ACE0
mov	esi, eax
mov	ecx, [ebp+var_34]
call	sub_418C90
sub	esi, eax
sar	esi, 1
mov	[ebp+var_18], esi
cmp	dword ptr [ebp+arg_4+4], 0
jl	short loc_43F7D6
jg	short loc_43F7BA
cmp	dword ptr [ebp+arg_4], 0
jb	short loc_43F7D6

loc_43F7BA:
mov	eax, [ebp+var_18]
cdq
mov	dword ptr [ebp+var_44],	eax
mov	dword ptr [ebp+var_44+4], edx
mov	edx, dword ptr [ebp+arg_4+4]
cmp	edx, dword ptr [ebp+var_44+4]
jl	short loc_43F7EA
jg	short loc_43F7D6
mov	eax, dword ptr [ebp+arg_4]
cmp	eax, dword ptr [ebp+var_44]
jbe	short loc_43F7EA

loc_43F7D6:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43F8CA

loc_43F7EA:
mov	ecx, [ebp+var_34]
call	sub_418C90
mov	ecx, [ebp+var_18]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_34]
call	sub_418C90
mov	ecx, dword ptr [ebp+arg_4]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_34]
call	sub_418C90
push	eax
mov	ecx, [ebp+var_34]
call	sub_407300

loc_43F819:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_43F8B7
mov	ecx, [ebp+var_34]
mov	edx, [ecx+18h]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_24]
sub	edx, [ebp+var_28]
sar	edx, 1
mov	[ebp+var_1C], edx
cmp	dword ptr [ebp+arg_4+4], 0
jl	short loc_43F86C
jg	short loc_43F850
cmp	dword ptr [ebp+arg_4], 0
jb	short loc_43F86C

loc_43F850:
mov	eax, [ebp+var_1C]
cdq
mov	dword ptr [ebp+var_4C],	eax
mov	dword ptr [ebp+var_4C+4], edx
mov	eax, dword ptr [ebp+arg_4+4]
cmp	eax, dword ptr [ebp+var_4C+4]
jl	short loc_43F87D
jg	short loc_43F86C
mov	ecx, dword ptr [ebp+arg_4]
cmp	ecx, dword ptr [ebp+var_4C]
jbe	short loc_43F87D

loc_43F86C:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	short loc_43F8CA

loc_43F87D:
mov	edx, [ebp+var_34]
mov	eax, [edx+10h]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+10h]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_2C]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_407320
mov	ecx, dword ptr [ebp+arg_4]
mov	edx, [ebp+var_34]
mov	eax, [edx+14h]
lea	ecx, [eax+ecx*2]
mov	edx, [ebp+var_34]
mov	[edx+14h], ecx

loc_43F8B7:
mov	eax, dword ptr [ebp+arg_4+4]
push	eax
mov	ecx, dword ptr [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]

loc_43F8CA:
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_43F620 endp

align 10h


; Attributes: bp-based frame

sub_43F8E0 proc	near

var_64=	qword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	qword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_11=	byte ptr -11h
var_10=	qword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
push	esi
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_14]
and	ecx, [eax+20h]
mov	[ebp+arg_14], ecx
mov	edx, [ebp+arg_14]
and	edx, 8
neg	edx
sbb	edx, edx
neg	edx
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_14]
and	eax, 10h
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jnz	short loc_43F938
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_43F938
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43FB02

loc_43F938:
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_43F94C
mov	ecx, [ebp+var_5C]
call	sub_406880
test	eax, eax
jz	short loc_43F960

loc_43F94C:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_43F974
mov	ecx, [ebp+var_5C]
call	sub_5F52F0
test	eax, eax
jnz	short loc_43F974

loc_43F960:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43FB02

loc_43F974:
push	0
push	0
lea	ecx, [ebp+var_28]
call	sub_406AE0
mov	ecx, eax
call	sub_406400
mov	[ebp+var_50], eax
mov	[ebp+var_4C], edx
mov	edx, dword ptr [ebp+arg_4]
mov	dword ptr [ebp+var_48],	edx
mov	eax, dword ptr [ebp+arg_4+4]
mov	dword ptr [ebp+var_48+4], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_40], ecx
mov	edx, [ebp+arg_10]
mov	[ebp+var_3C], edx
mov	eax, dword ptr [ebp+var_48]
sub	eax, [ebp+var_50]
mov	ecx, dword ptr [ebp+var_48+4]
sbb	ecx, [ebp+var_4C]
mov	dword ptr [ebp+var_48],	eax
mov	dword ptr [ebp+var_48+4], ecx
mov	edx, dword ptr [ebp+var_48]
mov	dword ptr [ebp+var_38],	edx
mov	eax, dword ptr [ebp+var_48+4]
mov	dword ptr [ebp+var_38+4], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_38]
call	sub_406400
mov	dword ptr [ebp+var_10],	eax
mov	dword ptr [ebp+var_10+4], edx
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_43FA61
cmp	dword ptr [ebp+var_10+4], 0
jl	short loc_43FA24
jg	short loc_43F9F3
cmp	dword ptr [ebp+var_10],	0
jb	short loc_43FA24

loc_43F9F3:
mov	ecx, [ebp+var_5C]
call	sub_41ACE0
mov	esi, eax
mov	ecx, [ebp+var_5C]
call	sub_418C90
sub	esi, eax
sar	esi, 1
mov	eax, esi
cdq
mov	dword ptr [ebp+var_64],	eax
mov	dword ptr [ebp+var_64+4], edx
mov	ecx, dword ptr [ebp+var_10+4]
cmp	ecx, dword ptr [ebp+var_64+4]
jl	short loc_43FA38
jg	short loc_43FA24
mov	edx, dword ptr [ebp+var_10]
cmp	edx, dword ptr [ebp+var_64]
jbe	short loc_43FA38

loc_43FA24:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	loc_43FB02

loc_43FA38:
mov	ecx, [ebp+var_5C]
call	sub_41ACE0
push	eax
mov	ecx, [ebp+var_5C]
call	sub_418C90
mov	ecx, dword ptr [ebp+var_10]
lea	edx, [eax+ecx*2]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_418C90
push	eax
mov	ecx, [ebp+var_5C]
call	sub_407300

loc_43FA61:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_43FAE5
cmp	dword ptr [ebp+var_10+4], 0
jl	short loc_43FA89
jg	short loc_43FA77
cmp	dword ptr [ebp+var_10],	0
jb	short loc_43FA89

loc_43FA77:
mov	esi, dword ptr [ebp+var_10]
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_402430
cmp	esi, eax
jbe	short loc_43FA9A

loc_43FA89:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_406AE0
mov	eax, [ebp+arg_0]
jmp	short loc_43FB02

loc_43FA9A:
mov	ecx, [ebp+var_5C]
add	ecx, 24h
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
call	sub_404430
mov	esi, eax
mov	ecx, [ebp+var_54]
call	sub_402430
lea	edx, [esi+eax*2]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_404430
push	eax
mov	ecx, [ebp+var_5C]
call	sub_407320
mov	ecx, dword ptr [ebp+var_10]
mov	edx, [ebp+var_5C]
mov	eax, [edx+14h]
lea	ecx, [eax+ecx*2]
mov	edx, [ebp+var_5C]
mov	[edx+14h], ecx

loc_43FAE5:
mov	eax, [ebp+arg_0]
mov	ecx, dword ptr [ebp+arg_4]
mov	[eax], ecx
mov	edx, dword ptr [ebp+arg_4+4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]

loc_43FB02:
pop	esi
mov	esp, ebp
pop	ebp
retn	18h
sub_43F8E0 endp

align 10h


; Attributes: bp-based frame

sub_43FB10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_497 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_43FB5F
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_155DFF0
mov	ecx, [ebp+var_14]
add	ecx, 50h
call	sub_403170
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_43FB5F:
push	0
push	0
mov	ecx, [ebp+var_14]
call	sub_4032A0
mov	[ebp+var_4], 1
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	dword ptr [edx+ecx], offset off_155DFEC
mov	eax, [ebp+arg_0]
or	eax, 10h
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_448B40
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
add	ecx, [eax+4]
call	sub_4031E0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43FB10 endp

align 10h


; Attributes: bp-based frame

sub_43FBD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43FBD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax-50h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	dword ptr [eax+edx-50h], offset	off_155DFEC
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
sub	ecx, 4Ch
call	sub_43EB90
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
sub	ecx, 48h
call	sub_405F90
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43FBD0 endp

align 10h


; Attributes: bp-based frame

sub_43FC40 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0
mov	ecx, [ebp+arg_0]
call	sub_4469A0
mov	eax, [ebp+arg_0]
pop	ebp
retn
sub_43FC40 endp

align 10h


; Attributes: bp-based frame

sub_43FC60 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43FC60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B0h
mov	[ebp+var_A4], ecx
mov	eax, [ebp+var_A4]
mov	[ebp+var_18], eax
mov	eax, [ebp+var_A4]
call	sub_403030
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	[ebp+var_11], 1

loc_43FCA1:
cmp	[ebp+var_1C], 0
jz	loc_43FD40
mov	edx, [ebp+var_1C]
mov	[ebp+var_18], edx
lea	eax, [ebp+var_1D]
mov	[ebp+var_A8], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_41]
mov	[ebp+var_AC], ecx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
call	sub_404540
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	[ebp+var_40], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_43FD22
mov	eax, [ebp+var_1C]
call	sub_4044C0
mov	eax, [eax]
mov	[ebp+var_B0], eax
jmp	short loc_43FD32

loc_43FD22:
mov	eax, [ebp+var_1C]
call	sub_403040
mov	ecx, [eax]
mov	[ebp+var_B0], ecx

loc_43FD32:
mov	edx, [ebp+var_B0]
mov	[ebp+var_1C], edx
jmp	loc_43FCA1

loc_43FD40:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_43FDF2
mov	eax, [ebp+var_A4]
call	sub_4044C0
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_64]
mov	[ebp+var_60], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_64]
setz	cl
mov	[ebp+var_B1], cl
movzx	edx, [ebp+var_B1]
test	edx, edx
jz	short loc_43FDE3
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_448CA0
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_43FEB7
jmp	short loc_43FDF2

loc_43FDE3:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_43FDF2:
lea	edx, [ebp+var_32]
mov	[ebp+var_B8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_78], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_BC], ecx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_78]
call	sub_404540
mov	[ebp+var_74], eax
mov	edx, [ebp+var_74]
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_43FE9C
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_448CA0
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A0]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_43FEB7

loc_43FE9C:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_43FEB7:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43FC60 endp

align 10h


; Attributes: bp-based frame

sub_43FED0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43FED0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_43FF29
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_155DF3C
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], offset unk_155DF44
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_403170
mov	[ebp+var_4], 0
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx

loc_43FF29:
push	0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_402E20
mov	[ebp+var_4], 1
push	0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_4032A0
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	dword ptr [edx+ecx], offset off_1446330
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
add	ecx, [edx+4]
call	sub_4031E0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_43FED0 endp

align 10h


; Attributes: bp-based frame

sub_43FFA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_43FFA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax-18h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	dword ptr [eax+edx-18h], offset	off_1446330
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_405F90
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
sub	ecx, 8
call	sub_402790
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_43FFA0 endp

align 10h


; Attributes: bp-based frame

sub_440010 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_2C=	byte ptr  34h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_440010
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], 0
mov	[ebp+var_4], 2
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403400
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+arg_2C]
push	ecx
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_403400
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+arg_4]
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+arg_2C]
call	sub_407E50
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_440010 endp



; Attributes: bp-based frame

; int __cdecl sub_440090(char *DstBuf, size_t MaxCount,	char *Format, char)
sub_440090 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
MaxCount= dword	ptr  0Ch
Format=	dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_C]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
mov	eax, [ebp+MaxCount]
push	eax		; MaxCount
push	104h		; SizeInBytes
mov	ecx, [ebp+DstBuf]
push	ecx		; DstBuf
call	__vsnprintf_s
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_440090 endp

align 10h


; Attributes: bp-based frame

sub_4400C0 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	byte ptr -78h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4400C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_BC], ecx
mov	[ebp+var_8C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_451E00
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_BC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_98]
mov	[ebp+var_94], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_94]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_98]
setz	al
mov	[ebp+var_BD], al
movzx	ecx, [ebp+var_BD]
test	ecx, ecx
jnz	short loc_4401C6
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_443C60
mov	[ebp+var_C4], eax
mov	edx, [ebp+var_C4]
mov	[ebp+var_C8], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_8C]
or	eax, 1
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_24]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4401C6
mov	[ebp+var_CC], 0
jmp	short loc_4401D0

loc_4401C6:
mov	[ebp+var_CC], 1

loc_4401D0:
mov	al, byte ptr [ebp+var_CC]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_8C]
and	ecx, 1
jz	short loc_4401FA
and	[ebp+var_8C], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	sub_42CA30

loc_4401FA:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_44030B
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_80], ecx
lea	ecx, [ebp+var_79]
call	sub_401EF0
mov	[ebp+var_D0], eax
mov	edx, [ebp+var_D0]
mov	[ebp+var_D4], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_D4]
push	eax
lea	ecx, [ebp+var_78]
call	sub_402390
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	[ebp+var_A4], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_80]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_A4]
push	eax
lea	ecx, [ebp+var_4C]
call	sub_403400
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_50]
mov	[ebp+var_B8], ecx
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+var_B4]
mov	[ebp+var_A8], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_A8]
call	sub_4046E0
mov	eax, [ebp+var_B8]
push	eax
push	ecx
mov	[ebp+var_B0], esp
mov	ecx, [ebp+var_B4]
mov	eax, [ebp+var_B0]
call	sub_4046E0
lea	ecx, [ebp+var_88]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_446DD0
lea	edx, [ebp+var_88]
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_4C]
call	sub_407E50
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_78]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_79]
call	nullsub_1

loc_44030B:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4400C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_440330(wchar_t *Dst, wchar_t *Format,	char)
sub_440330 proc	near

ArgList= dword ptr -4
Dst= dword ptr	8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	104h		; SizeInWords
mov	eax, [ebp+Dst]
push	eax		; Dst
call	_vswprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_440330 endp

align 10h


; Attributes: bp-based frame

sub_440360 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_7C]
jz	loc_4404D3
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 2
cmp	[ebp+var_4], eax
jbe	short loc_4403E1
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_4C3F30
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_7C]
call	sub_444710
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_7C]
mov	[ecx+8], eax
jmp	loc_4404C2

loc_4403E1:
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
cmp	ecx, [ebp+var_4]
jb	short loc_44043C
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
xor	edx, edx
mov	[ebp+var_55], dl
jmp	loc_4404C2

loc_44043C:
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
lea	edx, [ecx+edx*4]
mov	[ebp+var_68], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
call	sub_406610
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
lea	eax, [edx+eax*4]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_70]
push	eax
call	sub_407C50
add	esp, 0Ch

loc_4404C2:
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_7C]
mov	[edx+4], ecx

loc_4404D3:
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	4
sub_440360 endp

align 10h


; Attributes: bp-based frame

sub_4404E0 proc	near

var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_A0=	dword ptr -0A0h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4404E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0DCh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_EC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_5A8F20
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_EC]
add	ecx, 8
call	sub_444100
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_EC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_451EB0
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_44059C
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_1C]
push	edx		; void *
call	sub_4431D0
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 40h
mov	[ebp+var_1C], eax
jmp	short loc_4405C8

loc_44059C:
mov	ecx, [ebp+arg_C]
shl	ecx, 6
add	ecx, [ebp+var_1C]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_44F510
add	esp, 14h
mov	eax, [ebp+var_64]
mov	[ebp+var_1C], eax

loc_4405C8:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_440609
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_EC]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_66]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_451EB0
add	esp, 14h
mov	[ebp+var_1C], eax

loc_440609:
jmp	short loc_440658

loc_44060B:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_44C150
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_A0], ecx
cmp	[ebp+var_18], 0
jz	short loc_440642
mov	edx, [ebp+var_A0]
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_440642:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44065F
retn

loc_440658:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44065F:
mov	ecx, [ebp+var_EC]
call	sub_444060
mov	ecx, [ebp+var_14]
shl	ecx, 6
add	ecx, [ebp+var_18]
mov	[ebp+var_E8], ecx
mov	edx, [ebp+var_EC]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_EC]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+var_E8]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4404E0 endp

align 10h


; Attributes: bp-based frame

sub_4406C0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_78]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 6
cmp	edx, [ebp+arg_0]
jnb	loc_440795
mov	[ebp+var_C], 3FFFFFFh
mov	[ebp+var_10], 3FFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_4406FE
mov	ecx, [ebp+var_10]
mov	[ebp+var_7C], ecx
jmp	short loc_440704

loc_4406FE:
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx

loc_440704:
mov	eax, [ebp+var_7C]
cmp	eax, [ebp+arg_0]
jnb	short loc_440714
mov	ecx, [ebp+var_78]
call	sub_5BD210

loc_440714:
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_78]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 6
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_78]
cmp	dword ptr [ecx], 0
jz	short loc_440753
mov	edx, [ebp+var_78]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_78]
call	sub_449640
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_78]
call	sub_444060
jmp	short loc_440769

loc_440753:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_78]
add	ecx, 8
call	sub_444100
mov	[ebp+var_8], eax

loc_440769:
mov	eax, [ebp+arg_0]
shl	eax, 6
add	eax, [ebp+var_8]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]
shl	eax, 6
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_78]
mov	[ecx+4], eax
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_74]
mov	[edx+8], eax

loc_440795:
mov	esp, ebp
pop	ebp
retn	4
sub_4406C0 endp

align 10h


; Attributes: bp-based frame

sub_4407A0 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_8], 0FFFFFFFFh
lea	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
call	sub_407A30
add	esp, 8
mov	edx, [eax]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
add	eax, 1
cmp	[ebp+arg_0], eax
ja	short loc_44081B
cmp	[ebp+arg_0], 0
jbe	short loc_44081B
cmp	[ebp+arg_0], 10h
jbe	short loc_440819
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 14h
call	sub_444240
mov	ecx, [ebp+var_30]
mov	[ecx+14h], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+14h]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_30]
mov	[ecx], eax

loc_440819:
jmp	short loc_440823

loc_44081B:
mov	ecx, [ebp+var_30]
call	sub_4496F0

loc_440823:
mov	esp, ebp
pop	ebp
retn	4
sub_4407A0 endp

align 10h


; Attributes: bp-based frame

sub_440830 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_440830
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_38], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_40], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_38]
mov	[edx+10h], eax
mov	ecx, [ebp+var_38]
add	ecx, 14h
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_38]
mov	[edx], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_38]
call	sub_444170
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_440830 endp

align 10h


; Attributes: bp-based frame

sub_4408D0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+10h]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+14h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_C]
cmp	[ebp+var_4], edx
ja	short loc_440954
mov	eax, [ebp+var_40]
mov	ecx, [eax+14h]
mov	[ebp+var_10], ecx
cmp	[ebp+var_4], 0
jnz	short loc_440916
mov	edx, [ebp+var_10]
mov	[ebp+var_44], edx
jmp	short loc_44092D

loc_440916:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	[ebp+var_44], eax

loc_44092D:
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx+14h]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
add	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_40]
call	sub_4441D0
jmp	short loc_4409C1

loc_440954:
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx+14h]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+14h]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_28]
sub	eax, [ebp+var_2C]
mov	[ebp+var_34], eax
jnz	short loc_440982
mov	ecx, [ebp+var_30]
mov	[ebp+var_48], ecx
jmp	short loc_440999

loc_440982:
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	[ebp+var_48], eax

loc_440999:
mov	edx, [ebp+var_40]
mov	eax, [edx+10h]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+14h]
mov	[ebp+var_3C], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_38]
sub	ecx, [ebp+var_3C]
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_449710

loc_4409C1:
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	8
sub_4408D0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4409D0(void	*)
sub_4409D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_4409D9:
cmp	[ebp+arg_0], 0
jz	short loc_440A29
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_4409D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_443300
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_440A21
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_440A21:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4409D9

loc_440A29:
mov	esp, ebp
pop	ebp
retn	4
sub_4409D0 endp

align 10h


; Attributes: bp-based frame

sub_440A30 proc	near

var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_90=	dword ptr -90h
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_440A30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0DCh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_EC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4442B0
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_EC]
add	ecx, 8
call	sub_444410
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
lea	eax, [ebp+var_1E+1]
push	eax
movzx	ecx, byte ptr [ebp+var_1E]
push	ecx
mov	edx, [ebp+var_18]
push	edx		; void *
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_EC]
mov	edx, [ecx]
push	edx		; int
call	sub_44A010
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_440AE3
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_1C]
push	ecx		; void *
call	sub_452030
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 28h
mov	[ebp+var_1C], edx
jmp	short loc_440B0F

loc_440AE3:
mov	eax, [ebp+arg_C]
imul	eax, 28h
add	eax, [ebp+var_1C]
mov	[ebp+var_60], eax
push	0
lea	ecx, [ebp+var_61]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_44FA00
add	esp, 14h
mov	edx, [ebp+var_60]
mov	[ebp+var_1C], edx

loc_440B0F:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	loc_440BA1
xor	ecx, ecx
mov	[ebp+var_1F], cl
xor	edx, edx
mov	[ebp+var_20], dl
mov	al, [ebp+var_20]
mov	[ebp+var_85], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_EC]
mov	eax, [edx+4]
mov	[ebp+var_80], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_80]
sub	eax, [ebp+var_7C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_440B65

loc_440B5C:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_440B65:
cmp	[ebp+var_68], 0
jle	short loc_440B98
mov	eax, [ebp+var_7C]
push	eax		; int
mov	ecx, [ebp+var_84]
push	ecx		; void *
call	sub_443430
add	esp, 8
mov	edx, [ebp+var_7C]
add	edx, 28h
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_84]
add	eax, 28h
mov	[ebp+var_84], eax
jmp	short loc_440B5C

loc_440B98:
mov	ecx, [ebp+var_84]
mov	[ebp+var_1C], ecx

loc_440BA1:
jmp	short loc_440BEE

loc_440BA3:
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_4434E0
add	esp, 8
mov	ecx, [ebp+var_14]
mov	[ebp+var_90], ecx
cmp	[ebp+var_18], 0
jz	short loc_440BD8
mov	edx, [ebp+var_90]
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_440BD8:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_440BF5
retn

loc_440BEE:
mov	[ebp+var_4], 0FFFFFFFFh

loc_440BF5:
mov	ecx, [ebp+var_EC]
call	sub_444390
mov	ecx, [ebp+var_14]
imul	ecx, 28h
add	ecx, [ebp+var_18]
mov	[ebp+var_E8], ecx
mov	edx, [ebp+var_EC]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_EC]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+var_E8]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_440A30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_440C50(void	*)
sub_440C50 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_440C59:
cmp	[ebp+arg_0], 0
jz	short loc_440CA9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_440C50
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_44A070
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_440CA1
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_440CA1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_440C59

loc_440CA9:
mov	esp, ebp
pop	ebp
retn	4
sub_440C50 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_440CB0(void	*)
sub_440CB0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_440CB9:
cmp	[ebp+arg_0], 0
jz	short loc_440D09
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_440CB0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_44A0D0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_440D01
mov	edx, 1
shl	edx, 7
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_440D01:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_440CB9

loc_440D09:
mov	esp, ebp
pop	ebp
retn	4
sub_440CB0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_440D10(void	*)
sub_440D10 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_440D19:
cmp	[ebp+arg_0], 0
jz	short loc_440D6C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_440D10
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_44A860
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_440D64
mov	edx, 1
imul	edx, 90h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_440D64:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_440D19

loc_440D6C:
mov	esp, ebp
pop	ebp
retn	4
sub_440D10 endp

align 10h


; Attributes: bp-based frame

sub_440D80 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_440D80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_444B70
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_440DF9
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_440D80
mov	edx, [ebp+var_14]
mov	[edx+0Ch], eax

loc_440DF9:
mov	eax, [ebp+var_14]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_440E08:
cmp	[ebp+arg_0], 0
jz	short loc_440E75
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_444B70
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_440E64
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_24]
call	sub_440D80
mov	ecx, [ebp+var_18]
mov	[ecx+0Ch], eax

loc_440E64:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_440E08

loc_440E75:
jmp	short loc_440E99

loc_440E77:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_24]
call	sub_5091F0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_440EA0
retn

loc_440E99:
mov	[ebp+var_4], 0FFFFFFFFh

loc_440EA0:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_440D80 endp

align 10h


; Attributes: bp-based frame

sub_440EC0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_440EC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 6Ch
mov	[ebp+var_64], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
call	sub_4D1B10
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_65], al
movzx	ecx, [ebp+var_65]
test	ecx, ecx
jnz	short loc_440F83
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_64]
call	sub_444510
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	[ebp+var_70], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_40]
or	eax, 1
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_24]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jnz	short loc_440F83
mov	[ebp+var_74], 0
jmp	short loc_440F8A

loc_440F83:
mov	[ebp+var_74], 1

loc_440F8A:
mov	al, byte ptr [ebp+var_74]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_40]
and	ecx, 1
jz	short loc_440FB1
and	[ebp+var_40], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_440FB1:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_441012
mov	[ebp+var_30], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_60]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	edx, [ebp+var_2C]
push	edx
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_64]
call	sub_44A8D0
lea	ecx, [ebp+var_3C]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_441012:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_440EC0 endp

align 10h


; Attributes: bp-based frame

sub_441030 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_149= byte ptr -149h
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_134= dword ptr -134h
var_130= dword ptr -130h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= byte ptr -110h
var_108= byte ptr -108h
var_A0=	byte ptr -0A0h
var_88=	byte ptr -88h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_441030
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 154h
mov	[ebp+var_148], ecx
mov	[ebp+var_114], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_148]
call	sub_4D1860
mov	[ebp+var_118], eax
mov	ecx, [ebp+var_118]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_148]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_120]
mov	[ebp+var_11C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_11C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_120]
setz	al
mov	[ebp+var_149], al
movzx	ecx, [ebp+var_149]
test	ecx, ecx
jnz	short loc_44112C
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_148]
call	sub_444490
mov	[ebp+var_150], eax
mov	eax, [ebp+var_150]
mov	[ebp+var_154], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_114]
or	ecx, 1
mov	[ebp+var_114], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_124], edx
mov	eax, [ebp+var_124]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_44112C
mov	[ebp+var_158], 0
jmp	short loc_441136

loc_44112C:
mov	[ebp+var_158], 1

loc_441136:
mov	cl, byte ptr [ebp+var_158]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_114]
and	edx, 1
jz	short loc_441160
and	[ebp+var_114], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_441160:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_441263
lea	ecx, [ebp+var_108]
call	sub_4340F0
mov	[ebp+var_15C], eax
mov	ecx, [ebp+var_15C]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_A0]
call	sub_403850
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_130]
push	eax
lea	ecx, [ebp+var_88]
call	sub_444840
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_A0]
mov	[ebp+var_144], ecx
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+var_140]
mov	[ebp+var_134], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_134]
call	sub_4046E0
mov	eax, [ebp+var_144]
push	eax
push	ecx
mov	[ebp+var_13C], esp
mov	ecx, [ebp+var_140]
mov	eax, [ebp+var_13C]
call	sub_4046E0
lea	ecx, [ebp+var_110]
push	ecx
mov	ecx, [ebp+var_148]
call	sub_44A150
lea	edx, [ebp+var_110]
mov	[ebp+var_160], edx
mov	eax, [ebp+var_160]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_88]
call	sub_4341F0
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_A0]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_108]
call	sub_4341F0

loc_441263:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_441030 endp

align 10h


; Attributes: bp-based frame

sub_441280 proc	near

var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_10D= byte ptr -10Dh
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	byte ptr -0C8h
var_BD=	byte ptr -0BDh
var_BC=	byte ptr -0BCh
var_94=	dword ptr -94h
var_84=	byte ptr -84h
var_5C=	byte ptr -5Ch
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_441280
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 124h
mov	[ebp+var_10C], ecx
mov	[ebp+var_CC], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_450220
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_D0]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_D8]
mov	[ebp+var_D4], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_D4]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_D8]
setz	al
mov	[ebp+var_10D], al
movzx	ecx, [ebp+var_10D]
test	ecx, ecx
jnz	loc_4413E0
lea	ecx, [ebp+var_49]
call	sub_401EF0
mov	[ebp+var_114], eax
mov	edx, [ebp+var_114]
mov	[ebp+var_118], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_CC]
or	eax, 1
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_118]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_48]
call	sub_407810
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_CC]
or	ecx, 2
mov	[ebp+var_CC], ecx
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_444000
mov	[ebp+var_11C], eax
mov	eax, [ebp+var_11C]
mov	[ebp+var_120], eax
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_CC]
or	ecx, 4
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_DC]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_4413E0
mov	[ebp+var_124], 0
jmp	short loc_4413EA

loc_4413E0:
mov	[ebp+var_124], 1

loc_4413EA:
mov	al, byte ptr [ebp+var_124]
mov	[ebp+var_11], al
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_CC]
and	ecx, 4
jz	short loc_441411
and	[ebp+var_CC], 0FFFFFFFBh
call	nullsub_1

loc_441411:
mov	[ebp+var_4], 0
mov	edx, [ebp+var_CC]
and	edx, 2
jz	short loc_441432
and	[ebp+var_CC], 0FFFFFFFDh
lea	ecx, [ebp+var_48]
call	sub_407E50

loc_441432:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_CC]
and	eax, 1
jz	short loc_441453
and	[ebp+var_CC], 0FFFFFFFEh
lea	ecx, [ebp+var_49]
call	nullsub_1

loc_441453:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4415D3
lea	ecx, [ebp+var_BD]
call	sub_401EF0
mov	[ebp+var_128], eax
mov	edx, [ebp+var_128]
mov	[ebp+var_12C], edx
mov	[ebp+var_4], 3
mov	eax, [ebp+var_12C]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp+var_BC]
call	sub_407810
mov	byte ptr [ebp+var_4], 4
mov	[ebp+var_94], 0FFFFFFFFh
lea	eax, [ebp+var_94]
mov	[ebp+var_F4], eax
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_BC]
push	ecx
lea	ecx, [ebp+var_84]
call	sub_403400
mov	byte ptr [ebp+var_4], 6
lea	edx, [ebp+var_5C]
mov	[ebp+var_F0], edx
mov	eax, [ebp+var_F0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_F0]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_F4]
push	edx
mov	ecx, [ebp+var_F0]
call	sub_76DEA0
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 5
lea	eax, [ebp+var_84]
mov	[ebp+var_108], eax
mov	byte ptr [ebp+var_4], 8
lea	ecx, [ebp+var_104]
mov	[ebp+var_F8], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_F8]
call	sub_4046E0
mov	edx, [ebp+var_108]
push	edx
push	ecx
mov	[ebp+var_100], esp
mov	ecx, [ebp+var_104]
mov	eax, [ebp+var_100]
call	sub_4046E0
lea	eax, [ebp+var_C8]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4498C0
lea	ecx, [ebp+var_C8]
mov	[ebp+var_130], ecx
mov	edx, [ebp+var_130]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_5C]
call	sub_76FF30
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_84]
call	sub_407E50
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_94]
call	sub_76FF30
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_BC]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_BD]
call	nullsub_1

loc_4415D3:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_441280 endp

align 10h


; Attributes: bp-based frame

sub_4415F0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_6C=	dword ptr -6Ch
var_5C=	byte ptr -5Ch
var_34=	byte ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4415F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C0h
mov	[ebp+var_B8], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_4509B0
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_B8]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_B9], al
movzx	ecx, [ebp+var_B9]
test	ecx, ecx
jnz	short loc_4416DC
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_B8]
call	sub_444000
mov	[ebp+var_C0], eax
mov	eax, [ebp+var_C0]
mov	[ebp+var_C4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_78]
or	ecx, 1
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_88], edx
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_4416DC
mov	[ebp+var_C8], 0
jmp	short loc_4416E6

loc_4416DC:
mov	[ebp+var_C8], 1

loc_4416E6:
mov	al, byte ptr [ebp+var_C8]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_78]
and	ecx, 1
jz	short loc_441707
and	[ebp+var_78], 0FFFFFFFEh
call	nullsub_1

loc_441707:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_441811
mov	[ebp+var_6C], 0FFFFFFFFh
lea	eax, [ebp+var_6C]
mov	[ebp+var_A0], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_5C]
call	sub_403400
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_34]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_9C]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_A0]
push	edx
mov	ecx, [ebp+var_9C]
call	sub_76DEA0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_5C]
mov	[ebp+var_B4], eax
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_B0]
mov	[ebp+var_A4], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_A4]
call	sub_4046E0
mov	edx, [ebp+var_B4]
push	edx
push	ecx
mov	[ebp+var_AC], esp
mov	ecx, [ebp+var_B0]
mov	eax, [ebp+var_AC]
call	sub_4046E0
lea	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_4498C0
lea	ecx, [ebp+var_74]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_34]
call	sub_76FF30
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_5C]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_76FF30

loc_441811:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4415F0 endp

align 10h


; Attributes: bp-based frame

sub_441830 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E450
movzx	ecx, al
test	ecx, ecx
jz	short loc_44185C
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	[edx+4], ecx
jmp	short loc_44186C

loc_44185C:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	dword ptr [edx+4], 0

loc_44186C:
mov	esp, ebp
pop	ebp
retn	8
sub_441830 endp

align 10h


; Attributes: bp-based frame

sub_441880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E3C0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4418AB
mov	edx, [ebp+var_4]
xor	eax, eax
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	[ecx+4], eax
jmp	short loc_4418BB

loc_4418AB:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	dword ptr [edx+4], 0

loc_4418BB:
mov	esp, ebp
pop	ebp
retn	8
sub_441880 endp

align 10h


; Attributes: bp-based frame

sub_4418D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E420
movzx	ecx, al
test	ecx, ecx
jz	short loc_4418FC
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	[edx+4], ecx
jmp	short loc_44190C

loc_4418FC:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	dword ptr [edx+4], 0

loc_44190C:
mov	esp, ebp
pop	ebp
retn	8
sub_4418D0 endp

align 10h


; Attributes: bp-based frame

sub_441920 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E390
movzx	ecx, al
test	ecx, ecx
jz	short loc_44194A
mov	eax, [ebp+var_4]
cdq
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	[ecx+4], edx
jmp	short loc_44195A

loc_44194A:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	dword ptr [edx+4], 0

loc_44195A:
mov	esp, ebp
pop	ebp
retn	8
sub_441920 endp



; Attributes: bp-based frame

sub_441960 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E360
movzx	ecx, al
test	ecx, ecx
jz	short loc_44198B
movzx	eax, [ebp+var_1]
cdq
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	[ecx+4], edx
jmp	short loc_44199B

loc_44198B:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	dword ptr [edx+4], 0

loc_44199B:
mov	esp, ebp
pop	ebp
retn	8
sub_441960 endp

align 10h


; Attributes: bp-based frame

sub_4419B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E3C0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4419D6
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
jmp	short loc_4419DF

loc_4419D6:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0

loc_4419DF:
mov	esp, ebp
pop	ebp
retn	8
sub_4419B0 endp

align 10h


; Attributes: bp-based frame

sub_4419F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E390
movzx	ecx, al
test	ecx, ecx
jz	short loc_441A16
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
jmp	short loc_441A1F

loc_441A16:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0

loc_441A1F:
mov	esp, ebp
pop	ebp
retn	8
sub_4419F0 endp

align 10h


; Attributes: bp-based frame

sub_441A30 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E360
movzx	ecx, al
test	ecx, ecx
jz	short loc_441A57
movzx	edx, [ebp+var_1]
mov	eax, [ebp+arg_0]
mov	[eax], edx
jmp	short loc_441A60

loc_441A57:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0

loc_441A60:
mov	esp, ebp
pop	ebp
retn	8
sub_441A30 endp

align 10h


; Attributes: bp-based frame

sub_441A70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E480
movzx	ecx, al
test	ecx, ecx
jz	short loc_441A96
fld	[ebp+var_4]
mov	edx, [ebp+arg_0]
fstp	qword ptr [edx]
jmp	short loc_441A9D

loc_441A96:
mov	eax, [ebp+arg_0]
fldz
fstp	qword ptr [eax]

loc_441A9D:
mov	esp, ebp
pop	ebp
retn	8
sub_441A70 endp

align 10h


; Attributes: bp-based frame

sub_441AB0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E4B0
movzx	ecx, al
test	ecx, ecx
jz	short loc_441AD6
mov	edx, [ebp+arg_0]
fld	[ebp+var_8]
fstp	qword ptr [edx]
jmp	short loc_441ADD

loc_441AD6:
mov	eax, [ebp+arg_0]
fldz
fstp	qword ptr [eax]

loc_441ADD:
mov	esp, ebp
pop	ebp
retn	8
sub_441AB0 endp

align 10h


; Attributes: bp-based frame

sub_441AF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E480
movzx	ecx, al
test	ecx, ecx
jz	short loc_441B1A
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_4]
movss	dword ptr [edx], xmm0
jmp	short loc_441B29

loc_441B1A:
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0

loc_441B29:
mov	esp, ebp
pop	ebp
retn	8
sub_441AF0 endp

align 10h


; Attributes: bp-based frame

sub_441B30 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E4B0
movzx	ecx, al
test	ecx, ecx
jz	short loc_441B56
fld	[ebp+var_8]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx]
jmp	short loc_441B65

loc_441B56:
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0

loc_441B65:
mov	esp, ebp
pop	ebp
retn	8
sub_441B30 endp

align 10h


; Attributes: bp-based frame

sub_441B70 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E420
movzx	ecx, al
test	ecx, ecx
jz	short loc_441B96
fild	[ebp+var_8]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx]
jmp	short loc_441BA5

loc_441B96:
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0

loc_441BA5:
mov	esp, ebp
pop	ebp
retn	8
sub_441B70 endp

align 10h


; Attributes: bp-based frame

sub_441BB0 proc	near

var_1C=	qword ptr -1Ch
var_14=	qword ptr -14h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_C], ecx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_76E450
movzx	ecx, al
test	ecx, ecx
jz	short loc_441C04
mov	edx, dword ptr [ebp+var_8]
mov	eax, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_14],	edx
mov	dword ptr [ebp+var_14+4], eax
mov	ecx, dword ptr [ebp+var_14+4]
mov	dword ptr [ebp+var_1C+4], ecx
and	dword ptr [ebp+var_14+4], 7FFFFFFFh
fild	[ebp+var_14]
and	dword ptr [ebp+var_1C+4], 80000000h
mov	dword ptr [ebp+var_1C],	0
fild	[ebp+var_1C]
fchs
faddp	st(1), st
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx]
jmp	short loc_441C13

loc_441C04:
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0

loc_441C13:
mov	esp, ebp
pop	ebp
retn	8
sub_441BB0 endp

align 10h


; Attributes: bp-based frame

sub_441C20 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	ecx, [ebp+arg_0]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+arg_4]
call	sub_402430
cmp	esi, eax
jnz	loc_441CDB
mov	ecx, [ebp+arg_0]
call	sub_402430
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_4]
call	sub_404430
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
call	sub_404430
mov	[ebp+var_14], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_4], edx
jmp	short loc_441C91

loc_441C76:
mov	eax, [ebp+var_4]
add	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_441C91:
cmp	[ebp+var_C], 0
jbe	short loc_441CC5
mov	eax, [ebp+var_4]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_8]
movzx	eax, word ptr [edx]
cmp	ecx, eax
jz	short loc_441CC3
mov	ecx, [ebp+var_4]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+var_8]
movzx	ecx, word ptr [eax]
xor	eax, eax
cmp	edx, ecx
setnl	al
lea	eax, [eax+eax-1]
mov	[ebp+var_10], eax
jmp	short loc_441CCC

loc_441CC3:
jmp	short loc_441C76

loc_441CC5:
mov	[ebp+var_10], 0

loc_441CCC:
cmp	[ebp+var_10], 0
jnz	short loc_441CDB
mov	[ebp+var_20], 1
jmp	short loc_441CE2

loc_441CDB:
mov	[ebp+var_20], 0

loc_441CE2:
mov	al, byte ptr [ebp+var_20]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_441C20 endp

align 10h


; Attributes: bp-based frame

sub_441CF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_441CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_441D49
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_155DFFC
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], offset unk_155DF94
mov	ecx, [ebp+var_14]
add	ecx, 68h
call	sub_403170
mov	[ebp+var_4], 0
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx

loc_441D49:
push	0
push	0
mov	ecx, [ebp+var_14]
call	sub_43FED0
mov	[ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	dword ptr [eax+edx], offset off_155DFF8
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_448B40
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
add	edx, 18h
push	edx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ebp+var_14]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4031E0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_441CF0 endp

align 10h


; Attributes: bp-based frame

sub_441DC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_441DC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax-68h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	dword ptr [eax+edx-68h], offset	off_155DFF8
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
sub	ecx, 50h
call	sub_43EB90
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
sub	ecx, 50h
call	sub_43FFA0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_441DC0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_441E30(void	*)
sub_441E30 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_441E39:
cmp	[ebp+arg_0], 0
jz	short loc_441E89
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_441E30
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_443370
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_441E81
mov	edx, 1
imul	edx, 74h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_441E81:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_441E39

loc_441E89:
mov	esp, ebp
pop	ebp
retn	4
sub_441E30 endp

align 10h


; Attributes: bp-based frame

sub_441E90 proc	near

var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_115= byte ptr -115h
var_114= dword ptr -114h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_D0=	byte ptr -0D0h
var_B8=	byte ptr -0B8h
var_9C=	byte ptr -9Ch
var_84=	byte ptr -84h
var_6C=	byte ptr -6Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_441E90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 120h
mov	[ebp+var_114], ecx
mov	[ebp+var_DC], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_114]
call	sub_4D1860
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_114]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_E8]
mov	[ebp+var_E4], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_E4]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_E8]
setz	al
mov	[ebp+var_115], al
movzx	ecx, [ebp+var_115]
test	ecx, ecx
jnz	short loc_441F8C
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_114]
call	sub_444490
mov	[ebp+var_11C], eax
mov	eax, [ebp+var_11C]
mov	[ebp+var_120], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_DC]
or	ecx, 1
mov	[ebp+var_DC], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_441F8C
mov	[ebp+var_124], 0
jmp	short loc_441F96

loc_441F8C:
mov	[ebp+var_124], 1

loc_441F96:
mov	cl, byte ptr [ebp+var_124]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_DC]
and	edx, 1
jz	short loc_441FC0
and	[ebp+var_DC], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_441FC0:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4420D2
lea	ecx, [ebp+var_D0]
call	sub_434430
mov	[ebp+var_128], eax
mov	ecx, [ebp+var_128]
mov	[ebp+var_F8], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_84]
call	sub_403850
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_F8]
push	eax
lea	ecx, [ebp+var_6C]
call	sub_4448F0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_84]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+var_108]
mov	[ebp+var_FC], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_FC]
call	sub_4046E0
mov	eax, [ebp+var_10C]
push	eax
push	ecx
mov	[ebp+var_104], esp
mov	ecx, [ebp+var_108]
mov	eax, [ebp+var_104]
call	sub_4046E0
lea	ecx, [ebp+var_D8]
push	ecx
mov	ecx, [ebp+var_114]
call	sub_44AFF0
lea	edx, [ebp+var_D8]
mov	[ebp+var_12C], edx
mov	eax, [ebp+var_12C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_84]
call	sub_4439A0
mov	[ebp+var_4], 7
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_9C]
call	sub_407910
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_B8]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_D0]
call	sub_407910

loc_4420D2:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_441E90 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4420F0(void	*)
sub_4420F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_4420F9:
cmp	[ebp+arg_0], 0
jz	short loc_442145
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_4420F0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_4054E0
cmp	[ebp+arg_0], 0
jz	short loc_44213D
mov	ecx, 1
imul	ecx, 38h
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_44213D:
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
jmp	short loc_4420F9

loc_442145:
mov	esp, ebp
pop	ebp
retn	4
sub_4420F0 endp

align 10h


; Attributes: bp-based frame

sub_442150 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44F7B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
mov	[ebp+var_9C], ecx
mov	eax, [ebp+var_9C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_44218D:
cmp	[ebp+var_1C], 0
jz	loc_44221C
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_A0], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_A4], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_442202
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+8]
mov	[ebp+var_A8], edx
jmp	short loc_44220E

loc_442202:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+0Ch]
mov	[ebp+var_A8], ecx

loc_44220E:
mov	edx, [ebp+var_A8]
mov	[ebp+var_1C], edx
jmp	loc_44218D

loc_44221C:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4422CA
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+8]
mov	[ebp+var_58], edx
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_60]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_60]
setz	dl
mov	[ebp+var_A9], dl
movzx	eax, [ebp+var_A9]
test	eax, eax
jz	short loc_4422BB
mov	[ebp+var_29], 1
push	0
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_44B700
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_29]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_442387
jmp	short loc_4422CA

loc_4422BB:
mov	edx, [ebp+var_10]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4422CA:
lea	eax, [ebp+var_32]
mov	[ebp+var_B0], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_10]
mov	[ebp+var_70], ecx
lea	edx, [ebp+var_69]
mov	[ebp+var_B4], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_70]
add	eax, 10h
mov	[ebp+var_68], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_44236C
mov	[ebp+var_33], 1
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_44B700
mov	[ebp+var_98], eax
mov	edx, [ebp+var_98]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_33]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_442387

loc_44236C:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_39]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_442387:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_442150 endp

align 10h


; Attributes: bp-based frame

sub_4423A0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4423D1:
cmp	[ebp+var_1C], 0
jz	short loc_44244D
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_40]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, word ptr [eax]
xor	eax, eax
cmp	ecx, edx
setl	al
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_44243C
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_74], eax
jmp	short loc_442445

loc_44243C:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_74], edx

loc_442445:
mov	eax, [ebp+var_74]
mov	[ebp+var_1C], eax
jmp	short loc_4423D1

loc_44244D:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4424EF
mov	edx, [ebp+var_68]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_75], al
movzx	ecx, [ebp+var_75]
test	ecx, ecx
jz	short loc_4424E0
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_68]
call	sub_44B8A0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4425A0
jmp	short loc_4424EF

loc_4424E0:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4424EF:
lea	ecx, [ebp+var_32]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_80], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_4]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+var_58]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setl	cl
mov	[ebp+var_31], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_442585
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_68]
call	sub_44B8A0
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4425A0

loc_442585:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4425A0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4423A0 endp



; Attributes: bp-based frame

sub_4425B0 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	short loc_4425D9
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_770170
add	esp, 10h

loc_4425D9:
pop	ebp
retn
sub_4425B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4425E0(wchar_t *Dst, wchar_t *Format,	char)
sub_4425E0 proc	near

ArgList= dword ptr -4
Dst= dword ptr	8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	0FFh		; SizeInWords
mov	eax, [ebp+Dst]
push	eax		; Dst
call	_vswprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4425E0 endp

align 10h


; Attributes: bp-based frame

sub_442610 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_3C=	byte ptr -3Ch
var_24=	byte ptr -24h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_442750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
lea	ecx, [ebp+var_5C]
call	sub_433310
mov	[ebp+var_4], 0
push	offset aWorldconfig ; "WorldConfig"
lea	ecx, [ebp+var_54]
call	sub_402310
mov	[ebp+var_24], 0
mov	[ebp+var_1C], 1
lea	eax, [ebp+var_5C]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	ecx, al
test	ecx, ecx
jz	short loc_442671
cmp	[ebp+var_14], 0
jnz	short loc_4426AD

loc_442671:
mov	edx, [ebp+arg_4]
mov	[ebp+var_60], edx
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_3C]
call	sub_407910
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_54]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_401110
mov	eax, [ebp+var_60]
jmp	loc_442737

loc_4426AD:
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_78]
push	ecx
call	sub_10F4BF0
add	esp, 8
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
mov	[ebp+var_94], edx
mov	byte ptr [ebp+var_4], 4
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_94]
call	sub_5F52F0
push	eax
push	offset aWorldconfig ; "WorldConfig"
lea	ecx, [ebp+var_18]
push	ecx
call	sub_4428C0
add	esp, 10h
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_78]
call	sub_407910
mov	edx, [ebp+arg_4]
mov	[ebp+var_7C], edx
mov	[ebp+var_4], 7
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_3C]
call	sub_407910
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_54]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_401110
mov	eax, [ebp+var_7C]

loc_442737:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_442610 endp

align 10h


; Attributes: bp-based frame

sub_442750 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_3C=	byte ptr -3Ch
var_24=	byte ptr -24h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_442750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
lea	ecx, [ebp+var_5C]
call	sub_433310
mov	[ebp+var_4], 0
push	offset aWorldconfig ; "WorldConfig"
lea	ecx, [ebp+var_54]
call	sub_402310
mov	[ebp+var_24], 0
mov	[ebp+var_1C], 1
lea	eax, [ebp+var_5C]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	ecx, al
test	ecx, ecx
jz	short loc_4427B1
cmp	[ebp+var_14], 0
jnz	short loc_4427F1

loc_4427B1:
movss	xmm0, [ebp+arg_4]
movss	[ebp+var_60], xmm0
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_3C]
call	sub_407910
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_54]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_401110
fld	[ebp+var_60]
jmp	loc_44287F

loc_4427F1:
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_78]
push	eax
call	sub_10F4BF0
add	esp, 8
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
mov	[ebp+var_94], ecx
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_94]
call	sub_5F52F0
push	eax
push	offset aWorldconfig ; "WorldConfig"
lea	eax, [ebp+var_18]
push	eax
call	sub_442890
add	esp, 10h
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_78]
call	sub_407910
movss	xmm0, [ebp+arg_4]
movss	[ebp+var_7C], xmm0
mov	[ebp+var_4], 7
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_3C]
call	sub_407910
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_54]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_401110
fld	[ebp+var_7C]

loc_44287F:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_442750 endp

align 10h


; Attributes: bp-based frame

sub_442890 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	short loc_4428B9
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_770020
add	esp, 10h

loc_4428B9:
pop	ebp
retn
sub_442890 endp

align 10h


; Attributes: bp-based frame

sub_4428C0 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	short loc_4428E9
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_76FFA0
add	esp, 10h

loc_4428E9:
pop	ebp
retn
sub_4428C0 endp

align 10h


; Attributes: bp-based frame

sub_4428F0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	qword ptr -7Ch
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_50=	dword ptr -50h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	qword ptr -34h
var_28=	dword ptr -28h
var_24=	qword ptr -24h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4428F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
push	esi
push	edi
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_10], al
mov	[ebp+var_4], 0
mov	[ebp+var_15], 0
mov	dl, [ebp+var_10]
mov	[ebp+var_41], dl
movzx	eax, [ebp+var_41]
test	eax, eax
jz	loc_442AF7
mov	[ebp+var_15], 1
mov	ecx, [ebp+arg_4]
call	sub_4042A0
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_406880
and	eax, 1
setnz	al
mov	[ebp+var_16], al
push	0
push	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405E40
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_28], ecx
mov	edx, 1
test	edx, edx
jz	short loc_4429BC
mov	eax, [ebp+var_3C]
xor	ecx, ecx
mov	[ebp+var_70], eax
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
cmp	edx, dword ptr [ebp+var_34+4]
jl	short loc_4429C6
jg	short loc_4429BC
mov	eax, [ebp+var_70]
cmp	eax, dword ptr [ebp+var_34]
jb	short loc_4429C6

loc_4429BC:
xor	ecx, ecx
jnz	short loc_4429C6
mov	[ebp+var_71], 0
jmp	short loc_4429CA

loc_4429C6:
mov	[ebp+var_71], 1

loc_4429CA:
mov	dl, [ebp+var_71]
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	short loc_4429EF
mov	ecx, [ebp+var_3C]
xor	edx, edx
mov	eax, dword ptr [ebp+var_34]
sub	eax, ecx
mov	ecx, dword ptr [ebp+var_34+4]
sbb	ecx, edx
mov	dword ptr [ebp+var_7C],	eax
mov	dword ptr [ebp+var_7C+4], ecx
jmp	short loc_4429FD

loc_4429EF:
mov	dword ptr [ebp+var_7C],	0
mov	dword ptr [ebp+var_7C+4], 0

loc_4429FD:
mov	edx, dword ptr [ebp+var_7C]
mov	dword ptr [ebp+var_24],	edx
mov	eax, dword ptr [ebp+var_7C+4]
mov	dword ptr [ebp+var_24+4], eax
movzx	ecx, [ebp+var_16]
test	ecx, ecx
jnz	short loc_442A2C
mov	edx, dword ptr [ebp+var_24+4]
push	edx
mov	eax, dword ptr [ebp+var_24]
push	eax
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_44BA40
add	esp, 10h
mov	[ebp+var_15], al

loc_442A2C:
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_442A96
mov	ecx, [ebp+arg_4]
call	sub_5F52F0
mov	[ebp+var_50], eax
mov	esi, [ebp+var_3C]
xor	edi, edi
mov	ecx, [ebp+var_3C]
xor	edx, edx
push	edx
push	ecx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	ecx, [ebp+var_28]
mov	eax, [edx+28h]
call	eax
mov	[ebp+var_84], eax
mov	[ebp+var_80], edx
mov	[ebp+var_8C], esi
mov	[ebp+var_88], edi
mov	ecx, [ebp+var_84]
cmp	ecx, [ebp+var_8C]
jnz	short loc_442A96
mov	edx, [ebp+var_80]
cmp	edx, [ebp+var_88]
jnz	short loc_442A96
mov	[ebp+var_90], 1
jmp	short loc_442AA0

loc_442A96:
mov	[ebp+var_90], 0

loc_442AA0:
mov	al, byte ptr [ebp+var_90]
mov	[ebp+var_15], al
movzx	ecx, [ebp+var_16]
test	ecx, ecx
jz	short loc_442AF7
movzx	edx, [ebp+var_15]
test	edx, edx
jz	short loc_442AE4
mov	eax, dword ptr [ebp+var_24+4]
push	eax
mov	ecx, dword ptr [ebp+var_24]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_44BA40
add	esp, 10h
movzx	ecx, al
test	ecx, ecx
jz	short loc_442AE4
mov	[ebp+var_94], 1
jmp	short loc_442AEE

loc_442AE4:
mov	[ebp+var_94], 0

loc_442AEE:
mov	dl, byte ptr [ebp+var_94]
mov	[ebp+var_15], dl

loc_442AF7:
movzx	eax, [ebp+var_15]
test	eax, eax
jnz	short loc_442B11
push	4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_438B50

loc_442B11:
mov	eax, [ebp+arg_0]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_14]
call	sub_444780
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4428F0 endp

align 10h


; Attributes: bp-based frame

sub_442B40 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_442B40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 88h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_444570
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_444690
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4520C0
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_442BFC
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_4432C0
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 54h
mov	[ebp+var_1C], eax
jmp	short loc_442C28

loc_442BFC:
mov	ecx, [ebp+arg_C]
imul	ecx, 54h
add	ecx, [ebp+var_1C]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_4510E0
add	esp, 14h
mov	eax, [ebp+var_64]
mov	[ebp+var_1C], eax

loc_442C28:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_442C69
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_98]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_66]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4520C0
add	esp, 14h
mov	[ebp+var_1C], eax

loc_442C69:
jmp	short loc_442C9C

loc_442C6B:
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_4435A0
add	esp, 8
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18] ; void *
call	sub_403100
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_442CA3
retn

loc_442C9C:
mov	[ebp+var_4], 0FFFFFFFFh

loc_442CA3:
mov	ecx, [ebp+var_98]
call	sub_444640
mov	ecx, [ebp+var_14]
imul	ecx, 54h
add	ecx, [ebp+var_18]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_442B40 endp

align 10h


; Attributes: bp-based frame

sub_442D00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_442D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax-18h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	dword ptr [eax+edx-18h], offset	off_14462E4
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
call	sub_43D390
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
sub	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx-10h]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
mov	dword ptr [edx+ecx-10h], offset	off_1446290
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_442D00 endp

align 10h


; Attributes: bp-based frame

sub_442D80 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_442D80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_442DD9
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_155DF94
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], offset unk_155DF9C
mov	ecx, [ebp+var_14]
add	ecx, 58h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx

loc_442DD9:
push	0
push	0
mov	ecx, [ebp+var_14]
call	sub_44BAD0
mov	[ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	dword ptr [eax+edx], offset off_155DF90
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_448A40
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
add	edx, 18h
push	edx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ebp+var_14]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_43BA90
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_442D80 endp

align 10h


; Attributes: bp-based frame

sub_442E50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_442E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax-58h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	dword ptr [eax+edx-58h], offset	off_155DF90
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
sub	ecx, 40h
call	sub_43D790
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
sub	ecx, 40h
call	sub_442D00
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_442E50 endp

align 10h


; Attributes: bp-based frame

sub_442EC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_44BBA0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_442EC0 endp

align 10h


; Attributes: bp-based frame

sub_442EF0 proc	near

var_2CC= dword ptr -2CCh
var_2C8= dword ptr -2C8h
var_2C4= dword ptr -2C4h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_248= dword ptr -248h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_225= byte ptr -225h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= byte ptr -20Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_442EF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2C0h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jz	short loc_442F2B
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jnz	short loc_442F3C

loc_442F2B:
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
jmp	loc_4431B6

loc_442F3C:
lea	edx, [ebp+var_225]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_443FB0
mov	[ebp+var_2C4], eax
mov	eax, [ebp+var_2C4]
mov	[ebp+var_2C8], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_2C8]
push	ecx
lea	ecx, [ebp+var_21C]
call	sub_594460
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	[ebp+var_210], 40h
lea	edx, [ebp+var_21C]
push	edx
lea	ecx, [ebp+var_20C]
call	sub_4447C0
mov	byte ptr [ebp+var_4], 4
mov	[ebp+var_214], 0

loc_442FA6:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_0]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_443122
push	ecx
mov	ecx, esp
mov	[ebp+var_22C], esp
mov	[ebp+var_240], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_23C], eax
mov	ecx, [ebp+var_23C]
mov	eax, [ebp+var_240]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_230], esp
mov	[ebp+var_248], edx
mov	eax, [ebp+var_21C]
mov	[ebp+var_244], eax
mov	ecx, [ebp+var_244]
mov	eax, [ebp+var_248]
call	sub_4046E0
lea	ecx, [ebp+var_21C]
call	sub_443E20
mov	[ebp+var_220], 0

loc_44302E:
mov	ecx, [ebp+var_220]
cmp	ecx, [ebp+var_214]
jge	loc_4430D4
mov	edx, [ebp+var_220]
lea	eax, [ebp+edx*8+var_20C]
mov	[ebp+var_270], eax
mov	ecx, [ebp+var_270]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+var_270]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4430D4
movzx	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_21C]
push	eax
mov	ecx, [ebp+var_220]
lea	edx, [ebp+ecx*8+var_20C]
push	edx
call	sub_44BC10
add	esp, 0Ch
mov	eax, [ebp+var_220]
mov	[ebp+var_274], eax
mov	ecx, [ebp+var_274]
lea	edx, [ebp+ecx*8+var_20C]
mov	[ebp+var_2CC], edx
mov	eax, [ebp+var_2CC]
push	eax
lea	ecx, [ebp+var_21C]
call	sub_443D20
mov	ecx, [ebp+var_220]
add	ecx, 1
mov	[ebp+var_220], ecx
jmp	loc_44302E

loc_4430D4:
mov	edx, [ebp+var_220]
lea	eax, [ebp+edx*8+var_20C]
push	eax
lea	ecx, [ebp+var_21C]
call	sub_443D20
mov	ecx, [ebp+var_220]
cmp	ecx, [ebp+var_214]
jnz	short loc_44311D
mov	edx, [ebp+var_214]
add	edx, 1
mov	[ebp+var_214], edx
cmp	[ebp+var_214], 40h
jl	short loc_44311D
push	offset aListSort ; "list::sort"
call	sub_77ED00

loc_44311D:
jmp	loc_442FA6

loc_443122:
mov	[ebp+var_224], 1
jmp	short loc_44313D

loc_44312E:
mov	eax, [ebp+var_224]
add	eax, 1
mov	[ebp+var_224], eax

loc_44313D:
mov	ecx, [ebp+var_224]
cmp	ecx, [ebp+var_214]
jge	short loc_443176
movzx	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_224]
lea	ecx, [ebp+eax*8+var_214]
push	ecx
mov	edx, [ebp+var_224]
lea	eax, [ebp+edx*8+var_20C]
push	eax
call	sub_44BC10
add	esp, 0Ch
jmp	short loc_44312E

loc_443176:
mov	ecx, [ebp+var_214]
lea	edx, [ebp+ecx*8+var_214]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_443D20
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_20C]
call	sub_444810
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_21C]
call	sub_42E0F0
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1

loc_4431B6:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_442EF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4431D0(void *, int)
sub_4431D0 proc	near

var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_443230
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_44CC50
mov	[ebp+var_3C], eax
jmp	short loc_443237

loc_443230:
mov	[ebp+var_3C], 0

loc_443237:
mov	eax, [ebp+var_3C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4431D0 endp

align 10h


; Attributes: bp-based frame

sub_443260 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_44C000
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_443260 endp

align 10h


; Attributes: bp-based frame

sub_443290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_44C070
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_443290 endp

align 10h


; Attributes: bp-based frame

sub_4432C0 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_44C0B0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4432C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_443300(void *)
sub_443300 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_443300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_76FF30
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_443356
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_443356:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_443300 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_443370(void *)
sub_443370 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_4439A0
xor	ecx, ecx
and	ecx, 1
jz	short loc_443396
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_443396:
mov	esp, ebp
pop	ebp
retn
sub_443370 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4433A0(void *, int)
sub_4433A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_443400
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_44CD30
mov	[ebp+var_1C], eax
jmp	short loc_443407

loc_443400:
mov	[ebp+var_1C], 0

loc_443407:
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4433A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_443430(void *, int)
sub_443430 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_443430
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4434B3
mov	edx, [ebp+arg_4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_18]
call	sub_44D600
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_44], ecx
jmp	short loc_4434BA

loc_4434B3:
mov	[ebp+var_44], 0

loc_4434BA:
mov	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_443430 endp

align 10h


; Attributes: bp-based frame

sub_4434E0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_4434FC

loc_4434F3:
mov	edx, [ebp+var_8]
add	edx, 28h
mov	[ebp+var_8], edx

loc_4434FC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_443513
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_4054E0
jmp	short loc_4434F3

loc_443513:
mov	esp, ebp
pop	ebp
retn
sub_4434E0 endp

align 10h


; Attributes: bp-based frame

sub_443520 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 54h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_44354E

loc_443545:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_44354E:
cmp	[ebp+var_8], 0
jle	short loc_443598
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	dx, [ecx]
mov	[eax], dx
mov	eax, [ebp+var_C]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+var_C]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_10]
add	ecx, 2Ch
call	sub_4023E0
mov	edx, [ebp+var_C]
add	edx, 54h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, 54h
mov	[ebp+var_10], eax
jmp	short loc_443545

loc_443598:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_443520 endp

align 10h


; Attributes: bp-based frame

sub_4435A0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_4435BC

loc_4435B3:
mov	edx, [ebp+var_8]
add	edx, 54h
mov	[ebp+var_8], edx

loc_4435BC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_4435D3
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	eax, [ebp+var_8]
call	sub_4059F0
jmp	short loc_4435B3

loc_4435D3:
mov	esp, ebp
pop	ebp
retn
sub_4435A0 endp

align 10h


; Attributes: bp-based frame

sub_4435E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_43BB70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_443603
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_443603:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4435E0 endp

align 10h


; Attributes: bp-based frame

sub_443610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_43C160
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_443633
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_443633:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_443610 endp

align 10h


; Attributes: bp-based frame

sub_443640 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
sub	eax, 8
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_43D390
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4436B1
mov	ecx, [ebp+var_18]
sub	ecx, 8
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4436B1:
mov	eax, [ebp+var_18]
sub	eax, 8
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_443640 endp

align 10h


; Attributes: bp-based frame

sub_4436D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_43D790
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4436F3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4436F3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4436D0 endp

align 10h


; Attributes: bp-based frame

sub_443700 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
sub	eax, 40h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 40h
call	sub_43E870
mov	ecx, [ebp+var_14]
add	ecx, 40h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_443771
mov	ecx, [ebp+var_18]
sub	ecx, 40h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_443771:
mov	eax, [ebp+var_18]
sub	eax, 40h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_443700 endp

align 10h


; Attributes: bp-based frame

sub_443790 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_43EB90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4437B3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4437B3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_443790 endp

align 10h


; Attributes: bp-based frame

sub_4437C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
sub	eax, 50h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_43FBD0
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_4075A0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4437FF
mov	edx, [ebp+var_8]
sub	edx, 50h
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4437FF:
mov	eax, [ebp+var_8]
sub	eax, 50h
mov	esp, ebp
pop	ebp
retn	4
sub_4437C0 endp

align 10h


; Attributes: bp-based frame

sub_443810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
sub	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_43FFA0
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_4075A0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_44384F
mov	edx, [ebp+var_8]
sub	edx, 18h
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_44384F:
mov	eax, [ebp+var_8]
sub	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_443810 endp

align 10h


; Attributes: bp-based frame

sub_443860 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_490 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 4
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_443860 endp

align 10h


; Attributes: bp-based frame

sub_4438B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset __ehhandler$??1_Locimp@locale@std@@MAE@XZ_2
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_4341F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4438B0 endp

align 10h


; Attributes: bp-based frame

sub_443900 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_443900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_76FF30
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_443900 endp

align 10h


; Attributes: bp-based frame

sub_443950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
sub	eax, 68h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 68h
call	sub_441DC0
mov	ecx, [ebp+var_4]
add	ecx, 68h
call	sub_4075A0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_44398F
mov	edx, [ebp+var_8]
sub	edx, 68h
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_44398F:
mov	eax, [ebp+var_8]
sub	eax, 68h
mov	esp, ebp
pop	ebp
retn	4
sub_443950 endp

align 10h


; Attributes: bp-based frame

sub_4439A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4439A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_407910
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4439A0 endp

align 10h


; Attributes: bp-based frame

sub_443A20 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
sub	eax, 18h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_442D00
mov	ecx, [ebp+var_14]
add	ecx, 18h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_443A91
mov	ecx, [ebp+var_18]
sub	ecx, 18h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_443A91:
mov	eax, [ebp+var_18]
sub	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_443A20 endp

align 10h


; Attributes: bp-based frame

sub_443AB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
sub	eax, 58h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 58h
call	sub_442E50
mov	ecx, [ebp+var_14]
add	ecx, 58h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_443B21
mov	ecx, [ebp+var_18]
sub	ecx, 58h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_443B21:
mov	eax, [ebp+var_18]
sub	eax, 58h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_443AB0 endp

align 10h


; Attributes: bp-based frame

sub_443B40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
and	eax, [ebp+arg_8]
cmp	eax, 0FFFFFFFFh
jz	short loc_443BBF
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx+33h]
test	edx, edx
jz	short loc_443B67
mov	ecx, [ebp+var_14]
call	sub_445CC0

loc_443B67:
mov	eax, [ebp+var_14]
mov	byte ptr [eax+33h], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+34h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+36h], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+35h], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+18h], 0

loc_443BBF:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_10]
call	sub_406AE0
mov	eax, [ebp+arg_C]
push	eax
lea	ecx, [ebp+var_10]
call	sub_605D50
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	10h
sub_443B40 endp

align 10h


; Attributes: bp-based frame

sub_443C00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
cmp	edx, [ecx+0Ch]
jnb	short loc_443C3A
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
add	eax, 1
mov	ecx, [ebp+var_8]
mov	[ecx+8], eax
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx]
mov	[ebp+var_C], eax
jmp	short loc_443C4A

loc_443C3A:
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx+20h]
call	eax
mov	[ebp+var_C], eax

loc_443C4A:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_443C00 endp

align 10h


; Attributes: bp-based frame

sub_443C60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444980
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_444980
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_443C60 endp

align 10h


; Attributes: bp-based frame

sub_443CC0 proc	near

var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
push	ecx		; int
mov	edx, [ebp+var_50]
mov	eax, [edx]
push	eax		; void *
mov	ecx, [ebp+var_50]
add	ecx, 8
call	sub_4079C0
mov	esp, ebp
pop	ebp
retn
sub_443CC0 endp

align 10h


; Attributes: bp-based frame

sub_443D20 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_3= byte ptr	-3
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_0]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_443D67
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+var_28]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_443D56
jmp	loc_443E19

loc_443D56:
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_28]
call	sub_4449E0
jmp	loc_443E19

loc_443D67:
mov	eax, [ebp+var_28]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+var_28]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_443D8C
mov	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_4449E0
jmp	loc_443E19

loc_443D8C:
xor	edx, edx
mov	[ebp+var_3], dl
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_C], ecx
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_28]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 4
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx]
add	eax, 4
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx

loc_443E19:
mov	esp, ebp
pop	ebp
retn	4
sub_443D20 endp

align 10h


; Attributes: bp-based frame

sub_443E20 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4524D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+arg_8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_10]
call	sub_405E90
lea	eax, [ebp+var_34]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+var_34]
setz	dl
mov	[ebp+var_6D], dl
movzx	eax, [ebp+var_6D]
test	eax, eax
jnz	short loc_443E9F
lea	ecx, [ebp+var_3C]
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_3C]
setz	al
mov	[ebp+var_6E], al
movzx	ecx, [ebp+var_6E]
test	ecx, ecx
jz	short loc_443EA4

loc_443E9F:
jmp	loc_443F98

loc_443EA4:
lea	edx, [ebp+var_1A]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_443FB0
mov	[ebp+var_74], eax
mov	eax, [ebp+var_74]
mov	[ebp+var_78], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_1B]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_443FB0
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_19], 1
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_443F13
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	loc_443F98

loc_443F13:
mov	ecx, [ebp+arg_8]
add	ecx, 8
mov	[ebp+var_40], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_44], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_44]
call	sub_4046E0
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_439CE0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_54]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_50]
mov	edx, [ebp+var_4C]
mov	[ecx], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_48]
mov	[eax+4], ecx
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_50]
mov	[edx], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_50]
mov	[ecx+4], edx
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_28], esp
mov	[ebp+var_58], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_436890

loc_443F98:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_443E20 endp

align 10h


; Attributes: bp-based frame

sub_443FB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444A40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_443FB0 endp

align 10h


; Attributes: bp-based frame

sub_444000 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444A40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_444A40
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_444000 endp

align 10h


; Attributes: bp-based frame

sub_444060 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_44C270
add	esp, 8
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 6
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_A0], eax
cmp	[ebp+var_A0], 0
jz	short loc_4440F0
mov	ecx, [ebp+var_A4]
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_A0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4440F0:
mov	esp, ebp
pop	ebp
retn
sub_444060 endp

align 10h


; Attributes: bp-based frame

sub_444100 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 3FFFFFFh
jbe	short loc_44412D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_44412D:
cmp	[ebp+arg_0], 0
jz	short loc_44415E
mov	edx, [ebp+arg_0]
shl	edx, 6
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
shr	ecx, 6
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_444165

loc_44415E:
mov	[ebp+var_1C], 0

loc_444165:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_444100 endp

align 10h


; Attributes: bp-based frame

sub_444170 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_4407A0
mov	edx, [ebp+var_1C]
mov	eax, [edx+14h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+var_1C]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_1C]
call	sub_439260
mov	esp, ebp
pop	ebp
retn	8
sub_444170 endp

align 10h


; Attributes: bp-based frame

sub_4441D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_444231
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
sub	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+var_8], eax
jnz	short loc_444200
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
jmp	short loc_444217

loc_444200:
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	[ebp+var_14], eax

loc_444217:
mov	edx, [ebp+var_10]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
sub	edx, ecx
mov	eax, [ebp+var_10]
mov	[eax+10h], edx

loc_444231:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4441D0 endp

align 10h


; Attributes: bp-based frame

sub_444240 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 0FFFFFFFFh
jbe	short loc_44426A
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_44426A:
cmp	[ebp+arg_0], 0
jz	short loc_444295
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_44429C

loc_444295:
mov	[ebp+var_1C], 0

loc_44429C:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_444240 endp

align 10h


; Attributes: bp-based frame

sub_4442B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 6666666h
mov	[ebp+var_10], 6666666h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_4442ED
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_4442F3

loc_4442ED:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_4442F3:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_444306
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_444306:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 6666666h
mov	[ebp+var_1C], 6666666h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_44433C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_444342

loc_44433C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_444342:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_444352
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_44437C

loc_444352:
mov	[ebp+var_20], 6666666h
mov	[ebp+var_24], 6666666h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_444370
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_444376

loc_444370:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_444376:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_44437C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4442B0 endp

align 10h


; Attributes: bp-based frame

sub_444390 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_444403
mov	ecx, [ebp+var_54]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_444403:
mov	esp, ebp
pop	ebp
retn
sub_444390 endp

align 10h


; Attributes: bp-based frame

sub_444410 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 6666666h
jbe	short loc_44443D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_44443D:
cmp	[ebp+arg_0], 0
jz	short loc_444474
mov	edx, [ebp+arg_0]
imul	edx, 28h
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 28h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_44447B

loc_444474:
mov	[ebp+var_1C], 0

loc_44447B:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_444410 endp

align 10h


; Attributes: bp-based frame

sub_444490 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B95C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4B8D70
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_444490 endp

align 10h


; Attributes: bp-based frame

sub_4444F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	esp, ebp
pop	ebp
retn	8
sub_4444F0 endp

align 10h


; Attributes: bp-based frame

sub_444510 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4B8F30
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_444510 endp

align 10h


; Attributes: bp-based frame

sub_444570 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
call	sub_4028E0
mov	[ebp+var_8], eax
mov	[ebp+var_C], 30C30C3h
mov	[ebp+var_10], 30C30C3h
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_4445A2
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_4445A8

loc_4445A2:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_4445A8:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_4445BB
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_4445BB:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 30C30C3h
mov	[ebp+var_1C], 30C30C3h
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_4445F1
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_4445F7

loc_4445F1:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_4445F7:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_444607
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_444631

loc_444607:
mov	[ebp+var_20], 30C30C3h
mov	[ebp+var_24], 30C30C3h
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_444625
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_44462B

loc_444625:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_44462B:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_444631:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_444570 endp

align 10h


; Attributes: bp-based frame

sub_444640 proc	near

var_28=	dword ptr -28h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_28]
call	sub_402EB0
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_28]
call	sub_402FE0
call	sub_44C9B0
add	esp, 8
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 54h
idiv	ecx
mov	edx, [ebp+var_28]
mov	ecx, [edx]	; void *
call	sub_403100
mov	esp, ebp
pop	ebp
retn
sub_444640 endp

align 10h


; Attributes: bp-based frame

sub_444690 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 30C30C3h
jbe	short loc_4446BD
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4446BD:
cmp	[ebp+arg_0], 0
jz	short loc_4446F4
mov	edx, [ebp+arg_0]
imul	edx, 54h
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 54h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4446FB

loc_4446F4:
mov	[ebp+var_1C], 0

loc_4446FB:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_444690 endp

align 10h


; Attributes: bp-based frame

sub_444710 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_44477C
mov	ecx, [ebp+var_54]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_44477C:
mov	esp, ebp
pop	ebp
retn
sub_444710 endp



; Attributes: bp-based frame

sub_444780 proc	near

var_14=	dword ptr -14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [ebp+var_14]
mov	ecx, [eax]
add	ecx, [edx+4]
call	sub_406880
and	eax, 2000h
jz	short loc_4447BA
call	j_?__uncaught_exception@@YA_NXZ	; __uncaught_exception(void)
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4447BA
mov	edx, [ebp+var_14]
mov	ecx, [edx]
call	sub_4363A0

loc_4447BA:
mov	esp, ebp
pop	ebp
retn
sub_444780 endp

align 10h


; Attributes: bp-based frame

sub_4447C0 proc	near

var_68=	dword ptr -68h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 0
jmp	short loc_4447DB

loc_4447D2:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_4447DB:
cmp	[ebp+var_4], 40h
jnb	short loc_4447F9
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_68]
lea	ecx, [eax+edx*8]
push	ecx		; void *
call	sub_44CB30
add	esp, 8
jmp	short loc_4447D2

loc_4447F9:
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	4
sub_4447C0 endp

align 10h


; Attributes: bp-based frame

sub_444810 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0
mov	eax, [ebp+var_C]
add	eax, 200h
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_451300
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_444810 endp

align 10h


; Attributes: bp-based frame

sub_444840 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444840
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+34h]
mov	[edx+34h], ecx
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_10]
add	ecx, 38h
call	sub_403850
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+arg_0]
add	eax, 50h
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 50h
call	sub_403850
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_444840 endp

align 10h


; Attributes: bp-based frame

sub_4448F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_434500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+30h]
mov	[edx+30h], ecx
mov	edx, [ebp+arg_0]
add	edx, 34h
push	edx
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_403850
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4448F0 endp

align 10h


; Attributes: bp-based frame

sub_444980 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444980
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
mov	cl, [eax+14h]
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_444980 endp

align 10h


; Attributes: bp-based frame

sub_4449E0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[eax+4], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4449E0 endp

align 10h


; Attributes: bp-based frame

sub_444A40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444A40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
mov	cl, [eax+14h]
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_444A40 endp

align 10h


; Attributes: bp-based frame

sub_444AA0 proc	near

var_40=	dword ptr -40h
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444AA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
push	1
mov	ecx, [ebp+var_40]
call	sub_444D50
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_451350
add	esp, 0Ch
jmp	short loc_444B39

loc_444B08:
cmp	[ebp+var_14], 0
jz	short loc_444B23
mov	ecx, 1
imul	ecx, 48h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_444B23:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_444B40
retn

loc_444B39:
mov	[ebp+var_4], 0FFFFFFFFh

loc_444B40:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_444AA0 endp

align 10h


; Attributes: bp-based frame

sub_444B70 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_444B70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_430E40
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_44CBC0
add	esp, 8
jmp	short loc_444BEF

loc_444BBE:
cmp	[ebp+var_14], 0
jz	short loc_444BD9
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_444BD9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_444BF6
retn

loc_444BEF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_444BF6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_444B70 endp



; Attributes: bp-based frame

sub_444C20 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
cmp	[ebp+arg_0], 6666666h
jbe	short loc_444C48
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_444C48:
cmp	[ebp+arg_0], 0
jz	short loc_444C7C
mov	ecx, [ebp+arg_0]
imul	ecx, 28h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 28h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_444C7E

loc_444C7C:
xor	eax, eax

loc_444C7E:
mov	esp, ebp
pop	ebp
retn	8
sub_444C20 endp

align 10h


; Attributes: bp-based frame

sub_444C90 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
cmp	[ebp+arg_0], 3FFFFFFh
jbe	short loc_444CB8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_444CB8:
cmp	[ebp+arg_0], 0
jz	short loc_444CE6
mov	ecx, [ebp+arg_0]
shl	ecx, 6
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
shr	eax, 6
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	eax, [ebp+var_8]
jmp	short loc_444CE8

loc_444CE6:
xor	eax, eax

loc_444CE8:
mov	esp, ebp
pop	ebp
retn	8
sub_444C90 endp

align 10h


; Attributes: bp-based frame

sub_444CF0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
cmp	[ebp+arg_0], 0FFFFFFFFh
jbe	short loc_444D15
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_444D15:
cmp	[ebp+arg_0], 0
jz	short loc_444D3D
mov	ecx, [ebp+arg_0]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	eax, [ebp+var_8]
jmp	short loc_444D3F

loc_444D3D:
xor	eax, eax

loc_444D3F:
mov	esp, ebp
pop	ebp
retn	8
sub_444CF0 endp

align 10h


; Attributes: bp-based frame

sub_444D50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 38E38E3h
jbe	short loc_444D78
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_444D78:
cmp	[ebp+arg_0], 0
jz	short loc_444D9E
mov	ecx, [ebp+arg_0]
imul	ecx, 48h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_444DA5

loc_444D9E:
mov	[ebp+var_18], 0

loc_444DA5:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_444D50 endp

align 10h


; Attributes: bp-based frame

sub_444DB0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_444E0C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_44CE50
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_444EFD

loc_444E0C:
cmp	[ebp+arg_10], 0
jnz	short loc_444E6D
cmp	[ebp+arg_C], 0
jnz	short loc_444E64
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_444E6D

loc_444E64:
mov	[ebp+var_30], 1
jmp	short loc_444E74

loc_444E6D:
mov	[ebp+var_30], 0

loc_444E74:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
and	eax, 1
jz	short loc_444E9B
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_444E9B:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_444ED1
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_44CE50
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_444ECF
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx

loc_444ECF:
jmp	short loc_444EFD

loc_444ED1:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_44CE50
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_444EFD
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax

loc_444EFD:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_24]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_444DB0 endp

align 10h


; Attributes: bp-based frame

sub_444F50 proc	near

var_5C=	dword ptr -5Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_4451AF
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_5C]
call	sub_4042F0
cmp	eax, [ebp+var_4]
jbe	loc_445112
mov	edx, [ebp+var_5C]
mov	eax, [edx+10h]
sub	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
jb	loc_44506D
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
add	edx, 1
push	edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+10h]
add	ecx, 1
push	ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+10h]
sub	eax, [ebp+var_4]
add	eax, 1
push	eax
call	sub_404B30
add	esp, 0Ch
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
add	edx, [ebp+var_4]
mov	eax, [ebp+var_5C]
mov	[eax+10h], edx
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
add	eax, [ebp+var_4]
push	eax
call	sub_404770
add	esp, 0Ch
movzx	ecx, [ebp+arg_C]
test	ecx, ecx
jz	short loc_445005
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_0]
jnb	short loc_44501E

loc_445005:
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405E00
add	esp, 0Ch
jmp	short loc_445068

loc_44501E:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_0]
jb	short loc_445051
mov	ecx, [ebp+arg_4]
add	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_8]
add	edx, [ebp+var_4]
mov	[ebp+arg_8], edx
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405E00
add	esp, 0Ch
jmp	short loc_445068

loc_445051:
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_404770
add	esp, 0Ch

loc_445068:
jmp	loc_44510D

loc_44506D:
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_10]
lea	eax, [edx+ecx+1]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
add	edx, 1
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_404B30
add	esp, 0Ch
mov	edx, [ebp+var_4]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_5C]
add	edx, [eax+10h]
mov	ecx, [ebp+var_5C]
mov	[ecx+10h], edx
mov	edx, [ebp+var_5C]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_404B30
add	esp, 0Ch
mov	eax, [ebp+var_5C]
mov	ecx, [eax+10h]
add	ecx, [ebp+var_8]
mov	edx, [ebp+var_5C]
mov	[edx+10h], ecx
movzx	eax, [ebp+arg_C]
test	eax, eax
jnz	short loc_4450F6
mov	ecx, [ebp+var_10]
sub	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_405E00
add	esp, 0Ch
jmp	short loc_44510D

loc_4450F6:
mov	ecx, [ebp+var_10]
sub	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_404770
add	esp, 0Ch

loc_44510D:
jmp	loc_4451AF

loc_445112:
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_404250
mov	[ebp+var_14], eax
lea	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 14h
call	sub_407C40
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_5F52F0
push	eax
call	sub_404B30
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_404B30
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_404B30
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_407C80
mov	ecx, [ebp+var_5C]
call	sub_4079F0
mov	edx, [ebp+var_18]
add	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_404310

loc_4451AF:
mov	esp, ebp
pop	ebp
retn	10h
sub_444F50 endp

align 10h


; Attributes: bp-based frame

sub_4451C0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4454E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
lea	eax, [ebp+var_11]
push	eax
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_44D930
add	esp, 10h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4451C0 endp

align 10h


; Attributes: bp-based frame

sub_445220 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_445220
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_445252
mov	ecx, [ebp+arg_8]
cmp	ecx, [ebp+arg_C]
jnz	short loc_44526E

loc_445252:
mov	edx, [ebp+arg_0]
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
jmp	loc_4453ED

loc_44526E:
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	edx, [ebp+arg_C]
jnz	short loc_4452CE

loc_445285:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_4452B2
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4452B2
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx
jmp	short loc_445285

loc_4452B2:
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
jmp	loc_4453ED

loc_4452CE:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jz	short loc_4452FB
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4452FB
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
jmp	short loc_4452CE

loc_4452FB:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jnz	short loc_44531F
mov	edx, [ebp+arg_4]
mov	[ebp+var_24], edx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
jmp	loc_4453ED

loc_44531F:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
add	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
cmp	eax, [ebp+arg_4]
jnz	short loc_445358
mov	ecx, [ebp+arg_4]
mov	[ebp+var_28], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
jmp	loc_4453ED

loc_445358:
mov	edx, [ebp+var_14]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+var_18]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4453C8
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+arg_C]
jnz	short loc_44539C
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
jmp	short loc_4453ED

loc_44539C:
mov	eax, [ebp+var_18]
add	eax, 1
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
cmp	ecx, [ebp+arg_4]
jnz	short loc_4453C6
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
jmp	short loc_4453ED

loc_4453C6:
jmp	short loc_445358

loc_4453C8:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
jmp	loc_4452CE
mov	ecx, [ebp+arg_0]
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]

loc_4453ED:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_445220 endp

align 10h


; Attributes: bp-based frame

sub_445400 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_445540
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_4], 0
lea	eax, [ebp+var_D]
push	eax
movzx	ecx, [ebp+arg_C]
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_44DB70
add	esp, 14h
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_445400 endp

align 10h


; Attributes: bp-based frame

sub_445480 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_48]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
push	ecx
mov	[ebp+var_20], esp
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_4C]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_451970
add	esp, 14h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_445480 endp

align 10h


; Attributes: bp-based frame

sub_4454E0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4454E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
lea	eax, [ebp+var_11]
push	eax
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_44DE40
add	esp, 10h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4454E0 endp

align 10h


; Attributes: bp-based frame

sub_445540 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_445540
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_4], 0
lea	eax, [ebp+var_D]
push	eax
movzx	ecx, [ebp+arg_C]
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_44E0D0
add	esp, 14h
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_445540 endp

align 10h


; Attributes: bp-based frame

sub_4455C0 proc	near

var_5C=	dword ptr -5Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_445846
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
sar	ecx, 1
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_5C]
call	sub_404440
cmp	eax, [ebp+var_4]
jbe	loc_4457A6
mov	edx, [ebp+var_5C]
mov	eax, [edx+20h]
sub	eax, [ebp+arg_0]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+20h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
jb	loc_4456F7
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+20h]
add	edx, 2
push	edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+20h]
add	ecx, 2
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
mov	eax, [ebp+var_5C]
mov	ecx, [eax+20h]
sub	ecx, edx
add	ecx, 2
push	ecx
call	sub_4049C0
add	esp, 0Ch
mov	edx, [ebp+var_5C]
mov	eax, [edx+20h]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_5C]
mov	[eax+20h], edx
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*2]
push	edx
call	sub_405D70
add	esp, 0Ch
movzx	eax, [ebp+arg_C]
test	eax, eax
jz	short loc_445683
mov	ecx, [ebp+arg_8]
cmp	ecx, [ebp+arg_0]
jnb	short loc_44569E

loc_445683:
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
sar	edx, 1
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406C60
add	esp, 0Ch
jmp	short loc_4456F2

loc_44569E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_0]
jb	short loc_4456D9
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+eax*2]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
mov	[ebp+arg_8], edx
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
sar	eax, 1
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406C60
add	esp, 0Ch
jmp	short loc_4456F2

loc_4456D9:
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
sar	eax, 1
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_405D70
add	esp, 0Ch

loc_4456F2:
jmp	loc_4457A1

loc_4456F7:
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_10]
lea	eax, [edx+ecx*2+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+20h]
add	edx, 2
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_4049C0
add	esp, 0Ch
mov	edx, [ebp+var_4]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_5C]
mov	ecx, [eax+20h]
lea	edx, [ecx+edx*2]
mov	eax, [ebp+var_5C]
mov	[eax+20h], edx
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+20h]
push	edx
mov	eax, [ebp+var_C]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4049C0
add	esp, 0Ch
mov	edx, [ebp+var_5C]
mov	eax, [edx+20h]
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_5C]
mov	[eax+20h], edx
movzx	ecx, [ebp+arg_C]
test	ecx, ecx
jnz	short loc_445788
mov	edx, [ebp+var_10]
sub	edx, [ebp+arg_4]
sar	edx, 1
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406C60
add	esp, 0Ch
jmp	short loc_4457A1

loc_445788:
mov	edx, [ebp+var_10]
sub	edx, [ebp+arg_4]
sar	edx, 1
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_405D70
add	esp, 0Ch

loc_4457A1:
jmp	loc_445846

loc_4457A6:
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_404390
mov	[ebp+var_14], eax
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_407730
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_404430
push	eax
call	sub_4049C0
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_4049C0
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+20h]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4049C0
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_4077A0
mov	ecx, [ebp+var_5C]
call	sub_407E10
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_404460

loc_445846:
mov	esp, ebp
pop	ebp
retn	10h
sub_4455C0 endp

align 10h


; Attributes: bp-based frame

sub_445850 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= word ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_4], 0
lea	eax, [ebp+var_D]
push	eax
movzx	ecx, [ebp+arg_C]
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_44E490
add	esp, 14h
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_445850 endp

align 10h


; Attributes: bp-based frame

sub_4458D0 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_4], 0
movzx	eax, [ebp+arg_10]
push	eax
lea	ecx, [ebp+var_11]
push	ecx
lea	edx, [ebp+var_12]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_44E720
add	esp, 1Ch
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4458D0 endp

align 10h


; Attributes: bp-based frame

sub_445940 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_44E830
add	esp, 1Ch
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_445940 endp

align 10h


; Attributes: bp-based frame

sub_445990 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= word ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
lea	eax, [ebp+var_11]
push	eax
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_44E8B0
add	esp, 10h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_445990 endp

align 10h


; Attributes: bp-based frame

sub_445A00 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= word ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_445A00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_4], 0
lea	eax, [ebp+var_D]
push	eax
movzx	ecx, [ebp+arg_C]
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_44EB80
add	esp, 14h
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_445A00 endp



; Attributes: bp-based frame

sub_445A80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+58h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	[edx+58h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+58h]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0
jz	short loc_445AB3
mov	[ebp+var_10], 0
jmp	short loc_445ABB

loc_445AB3:
xor	eax, eax
or	eax, 1
mov	[ebp+var_10], eax

loc_445ABB:
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_405EB0
mov	ecx, [ebp+var_C]
call	sub_405EA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_445A80 endp

align 10h


; Attributes: bp-based frame

sub_445AE0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_445AE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_28], ecx
mov	[ebp+var_20], 0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_77EF60
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_28]
cmp	dword ptr [edx+58h], 0
jz	short loc_445B4B
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_28]
mov	ecx, [edx+58h]
call	sub_44EED0
lea	ecx, [ebp+var_18]
call	sub_77FF40

loc_445B4B:
mov	[ebp+var_24], 0
push	offset unk_167EF9C
mov	ecx, [ebp+arg_4]
call	sub_77FFD0
mov	ecx, [ebp+var_28]
mov	[ecx+50h], eax
jmp	short loc_445BB3

loc_445B67:
lea	edx, [ebp+var_14]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_28]
call	sub_77EF60
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_30], ecx
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+var_30]
push	edx
lea	ecx, [ebp+var_14]
call	sub_77FF50
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_1C]
call	sub_77FF40
push	4
mov	ecx, [ebp+var_28]
call	sub_445C00
mov	[ebp+var_4], 1
mov	eax, offset loc_445BBA
retn

loc_445BB3:
mov	[ebp+var_4], 1

loc_445BBA:
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_77FF00
mov	ecx, [ebp+var_20]
or	ecx, 1
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_14]
call	sub_77FF40
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_445AE0 endp

align 10h


; Attributes: bp-based frame

sub_445C00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_405D20
mov	ecx, [ebp+var_4]
call	sub_41AE90
and	eax, [ebp+arg_0]
jz	short loc_445C29
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_445C29:
mov	esp, ebp
pop	ebp
retn	4
sub_445C00 endp

align 10h


; Attributes: bp-based frame

sub_445C30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_406A50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_14462A0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_77FEE0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_445C30 endp

align 10h


; Attributes: bp-based frame

sub_445CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+58h], 0
jz	short loc_445D08
mov	ecx, [ebp+var_4]
mov	edx, [ecx+64h]
push	edx		; int
mov	eax, [ecx+60h]
push	eax		; int
mov	ecx, [ebp+var_4]
mov	edx, [ecx+58h]
push	edx		; lpBaseAddress
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_77F6E0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+58h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+60h], 0
mov	dword ptr [ecx+64h], 0

loc_445D08:
mov	edx, [ebp+var_4]
mov	byte ptr [edx+33h], 0
mov	esp, ebp
pop	ebp
retn
sub_445CC0 endp

align 10h


; Attributes: bp-based frame

sub_445D20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
add	ecx, 20h
call	sub_406EA0
movzx	eax, al
test	eax, eax
jz	loc_445DDA
mov	ecx, [ebp+var_C]
add	ecx, 20h
call	sub_418C90
and	eax, 10h
jz	loc_445DDA
mov	ecx, [ebp+var_C]
movzx	edx, byte ptr [ecx+33h]
test	edx, edx
jnz	short loc_445DDA
mov	eax, [ebp+var_C]
movzx	ecx, byte ptr [eax+35h]
test	ecx, ecx
jnz	short loc_445DDA
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+38h], 0
jnz	short loc_445D85
mov	ecx, [ebp+var_C]
call	sub_44EF60
movzx	eax, al
test	eax, eax
jnz	short loc_445D85
xor	al, al
jmp	short loc_445DDC

loc_445D85:
mov	ecx, [ebp+var_C]
add	ecx, 20h
call	sub_418C90
and	eax, 1
jz	short loc_445D9F
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+50h], 0

loc_445D9F:
mov	edx, [ebp+var_C]
mov	eax, [edx+3Ch]
sub	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+38h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
mov	[eax+10h], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+14h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	[ecx+18h], edx
mov	eax, [ebp+var_C]
mov	byte ptr [eax+34h], 1
mov	al, 1
jmp	short loc_445DDC

loc_445DDA:
xor	al, al

loc_445DDC:
mov	esp, ebp
pop	ebp
retn
sub_445D20 endp



; Attributes: bp-based frame

sub_445DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+34h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+33h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+35h], 1
mov	eax, [ebp+var_4]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+18h], 0
or	eax, 0FFFFFFFFh
mov	esp, ebp
pop	ebp
retn
sub_445DE0 endp

align 10h


; Attributes: bp-based frame

sub_445E30 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
movzx	ecx, byte ptr [eax+34h]
test	ecx, ecx
jz	loc_445F04
mov	edx, [ebp+var_20]
movzx	eax, byte ptr [edx+30h]
test	eax, eax
jnz	loc_445F04

loc_445E57:
mov	ecx, [ebp+var_20]
mov	edx, [ecx+40h]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax+44h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx+40h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+74h]
mov	[ebp+var_C], edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_20]
add	eax, 50h
push	eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	ecx, [ebp+var_C]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 3
jz	short loc_445EB5
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_8]
cmp	edx, [ecx+40h]
jnz	short loc_445EBB
cmp	[ebp+var_4], 0
jnz	short loc_445EBB

loc_445EB5:
mov	al, 1
jmp	short loc_445F06
jmp	short loc_445EFA

loc_445EBB:
cmp	[ebp+var_4], 2
jnz	short loc_445EC7
xor	al, al
jmp	short loc_445F06
jmp	short loc_445EFA

loc_445EC7:
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_8]
sub	ecx, [eax+40h]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx+40h]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
push	ecx		; int
mov	edx, [ebp+var_18]
push	edx		; void *
mov	ecx, [ebp+var_20]
add	ecx, 20h
call	sub_77F8A0
movzx	eax, al
test	eax, eax
jnz	short loc_445EFA
xor	al, al
jmp	short loc_445F06

loc_445EFA:
cmp	[ebp+var_4], 1
jz	loc_445E57

loc_445F04:
mov	al, 1

loc_445F06:
mov	esp, ebp
pop	ebp
retn
sub_445E30 endp

align 10h


; Attributes: bp-based frame

sub_445F10 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_2C], ecx
cmp	[ebp+arg_0], 0
jnz	short loc_445F85
mov	eax, dword ptr [ebp+arg_4]
mov	dword ptr [ebp+var_10],	eax
mov	ecx, dword ptr [ebp+arg_4+4]
mov	dword ptr [ebp+var_10+4], ecx
mov	edx, 1
test	edx, edx
jz	short loc_445F5A
call	sub_406EE0
xor	ecx, ecx
mov	[ebp+var_34], eax
mov	[ebp+var_30], ecx
mov	edx, dword ptr [ebp+var_10+4]
cmp	edx, [ebp+var_30]
jl	short loc_445F5A
jg	short loc_445F53
mov	eax, dword ptr [ebp+var_10]
cmp	eax, [ebp+var_34]
jbe	short loc_445F5A

loc_445F53:
xor	al, al
jmp	loc_44605D

loc_445F5A:
mov	ecx, dword ptr [ebp+var_10]
push	ecx		; size_t
call	_malloc
add	esp, 4
mov	edx, [ebp+var_2C]
mov	[edx+38h], eax
mov	eax, [ebp+var_2C]
cmp	dword ptr [eax+38h], 0
jnz	short loc_445F7C
xor	al, al
jmp	loc_44605D

loc_445F7C:
mov	ecx, [ebp+var_2C]
mov	byte ptr [ecx+32h], 1
jmp	short loc_445F95

loc_445F85:
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_0]
mov	[edx+38h], eax
mov	ecx, [ebp+var_2C]
mov	byte ptr [ecx+32h], 0

loc_445F95:
mov	edx, [ebp+var_2C]
mov	eax, [edx+74h]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	ecx, [ebp+var_24]
mov	eax, [edx+1Ch]
call	eax
cdq
mov	dword ptr [ebp+var_18],	eax
mov	dword ptr [ebp+var_18+4], edx
mov	ecx, [ebp+var_2C]
mov	eax, [ecx+78h]
cdq
push	edx
push	eax
mov	edx, dword ptr [ebp+arg_4+4]
push	edx
mov	eax, dword ptr [ebp+arg_4]
push	eax
call	__allmul
mov	dword ptr [ebp+var_20],	eax
mov	dword ptr [ebp+var_20+4], edx
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_20]
push	edx
call	sub_406EC0
add	esp, 8
mov	ecx, [eax]
mov	dword ptr [ebp+var_8], ecx
mov	edx, [eax+4]
mov	dword ptr [ebp+var_8+4], edx
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+40h], 0
xor	ecx, ecx
jnz	short loc_446016
call	sub_406EE0
xor	edx, edx
mov	[ebp+var_3C], eax
mov	[ebp+var_38], edx
mov	eax, dword ptr [ebp+var_8+4]
cmp	eax, [ebp+var_38]
jg	short loc_446028
jl	short loc_446016
mov	ecx, dword ptr [ebp+var_8]
cmp	ecx, [ebp+var_3C]
ja	short loc_446028

loc_446016:
mov	edx, dword ptr [ebp+var_8]
push	edx		; size_t
call	_malloc
add	esp, 4
mov	ecx, [ebp+var_2C]
mov	[ecx+40h], eax

loc_446028:
mov	edx, [ebp+var_2C]
cmp	dword ptr [edx+40h], 0
jnz	short loc_44603D
mov	ecx, [ebp+var_2C]
call	sub_446070
xor	al, al
jmp	short loc_44605D

loc_44603D:
mov	eax, dword ptr [ebp+arg_4]
mov	ecx, [ebp+var_2C]
add	eax, [ecx+38h]
mov	edx, [ebp+var_2C]
mov	[edx+3Ch], eax
mov	eax, dword ptr [ebp+var_8]
mov	ecx, [ebp+var_2C]
add	eax, [ecx+40h]
mov	edx, [ebp+var_2C]
mov	[edx+44h], eax
mov	al, 1

loc_44605D:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_445F10 endp

align 10h


; Attributes: bp-based frame

sub_446070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+32h]
test	ecx, ecx
jz	short loc_446091
mov	edx, [ebp+var_4]
mov	eax, [edx+38h]
push	eax		; void *
call	_free
add	esp, 4

loc_446091:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+40h]
push	edx		; void *
call	_free
add	esp, 4
mov	eax, [ebp+var_4]
mov	dword ptr [eax+38h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+3Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+40h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+44h], 0
mov	esp, ebp
pop	ebp
retn
sub_446070 endp

align 10h


; Attributes: bp-based frame

sub_4460D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	byte ptr [eax+35h], 0
mov	ecx, [ebp+var_1C]
movzx	edx, byte ptr [ecx+34h]
test	edx, edx
jz	loc_44618D
mov	[ebp+var_8], 0FFFFFFFFh
push	0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	edx, [eax]
mov	ecx, [ebp+var_1C]
mov	eax, [edx+30h]
call	eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_1], al
movzx	ecx, [ebp+arg_0]
test	ecx, ecx
jz	short loc_446155
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_446148
mov	ecx, [ebp+var_1C]
call	sub_445E30
movzx	eax, al
test	eax, eax
jz	short loc_446148
mov	[ebp+var_20], 1
jmp	short loc_44614F

loc_446148:
mov	[ebp+var_20], 0

loc_44614F:
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_1], cl

loc_446155:
movzx	edx, [ebp+var_1]
test	edx, edx
jnz	short loc_44618D
mov	eax, [ebp+var_1C]
mov	byte ptr [eax+34h], 0
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+35h], 1
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+18h], 0
xor	al, al
jmp	short loc_4461AD

loc_44618D:
mov	edx, [ebp+var_1C]
movzx	eax, byte ptr [edx+33h]
test	eax, eax
jz	short loc_4461AB
mov	ecx, [ebp+var_1C]
movzx	edx, byte ptr [ecx+36h]
test	edx, edx
jz	short loc_4461AB
mov	ecx, [ebp+var_1C]
call	sub_44CF10

loc_4461AB:
mov	al, 1

loc_4461AD:
mov	esp, ebp
pop	ebp
retn	4
sub_4460D0 endp

align 10h


; Attributes: bp-based frame

sub_4461C0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	[ebp+var_C], 0
push	offset unk_167EFA0
mov	ecx, [ebp+arg_0]
call	sub_77FFA0
neg	eax
sbb	eax, eax
neg	eax
movzx	eax, al
test	eax, eax
jz	loc_446287
mov	[ebp+var_10], 0
push	offset unk_167EFA0
mov	ecx, [ebp+arg_0]
call	sub_77FFD0
mov	ecx, [ebp+var_28]
mov	[ecx+74h], eax
mov	edx, [ebp+var_28]
mov	eax, [edx+74h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
mov	eax, [edx+10h]
call	eax
mov	[ebp+var_4], eax
mov	[ebp+var_8], 1
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_406950
add	esp, 8
mov	ecx, [ebp+var_28]
mov	edx, [eax]
mov	[ecx+78h], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax+74h]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+1Ch]
call	edx
mov	ecx, [ebp+var_28]
mov	[ecx+7Ch], eax
cmp	[ebp+var_4], 0
setnle	dl
mov	eax, [ebp+var_28]
mov	[eax+30h], dl
mov	ecx, [ebp+var_28]
mov	edx, [ecx+74h]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	edx, [eax]
mov	ecx, [ebp+var_20]
mov	eax, [edx+14h]
call	eax
mov	ecx, [ebp+var_28]
mov	[ecx+31h], al
jmp	short loc_4462CF

loc_446287:
mov	edx, [ebp+var_28]
mov	dword ptr [edx+74h], 0
mov	eax, [ebp+var_28]
mov	dword ptr [eax+7Ch], 1
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+78h], 1
mov	edx, [ebp+var_28]
mov	byte ptr [edx+31h], 0
mov	eax, [ebp+var_28]
mov	byte ptr [eax+30h], 0
movzx	ecx, [ebp+arg_4]
test	ecx, ecx
jz	short loc_4462CF
mov	[ebp+var_24], 0
push	offset unk_167EFA0
mov	ecx, [ebp+arg_0]
call	sub_77FFD0

loc_4462CF:
mov	esp, ebp
pop	ebp
retn	8
sub_4461C0 endp

align 10h


; Attributes: bp-based frame

sub_4462E0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	qword ptr -74h
var_6C=	dword ptr -6Ch
var_56=	word ptr -56h
var_54=	dword ptr -54h
var_4E=	word ptr -4Eh
var_4C=	dword ptr -4Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= word ptr	 8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4462E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 80h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_6C]
lea	esi, [ebp+var_18]
call	sub_404710
mov	[ebp+var_4], 0
lea	eax, [ebp+var_18]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_4465D2
mov	[ebp+var_19], 1
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx+eax+28h]
mov	[ebp+var_30], edx
mov	eax, [ecx+eax+2Ch]
mov	[ebp+var_2C], eax
cmp	[ebp+var_2C], 0
jl	short loc_446389
jg	short loc_44635C
cmp	[ebp+var_30], 0
jbe	short loc_446389

loc_44635C:
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx+eax+28h]
mov	[ebp+var_38], edx
mov	eax, [ecx+eax+2Ch]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
sub	ecx, 1
mov	edx, [ebp+var_34]
sbb	edx, 0
mov	dword ptr [ebp+var_74],	ecx
mov	dword ptr [ebp+var_74+4], edx
jmp	short loc_446397

loc_446389:
mov	dword ptr [ebp+var_74],	0
mov	dword ptr [ebp+var_74+4], 0

loc_446397:
mov	eax, dword ptr [ebp+var_74]
mov	dword ptr [ebp+var_28],	eax
mov	ecx, dword ptr [ebp+var_74+4]
mov	dword ptr [ebp+var_28+4], ecx
mov	edx, dword ptr [ebp+var_28]
or	edx, dword ptr [ebp+var_28+4]
jnz	short loc_4463DB
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	ecx, [ebp+var_6C]
add	ecx, [edx+4]
call	sub_402D10
mov	ecx, eax
call	sub_405270
movzx	eax, ax
push	eax
call	sub_405240
add	esp, 4
mov	[ebp+var_19], al
jmp	loc_446578

loc_4463DB:
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	ecx, [ebp+var_6C]
add	ecx, [edx+4]
call	sub_406880
and	eax, 7
cmp	eax, 1
jnz	loc_44649C
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	ecx, [ebp+var_6C]
add	ecx, [edx+4]
call	sub_402D10
mov	ecx, eax
call	sub_405270
movzx	eax, ax
push	eax
call	sub_405240
add	esp, 4
mov	[ebp+var_19], al
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jnz	short loc_44648A
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	ecx, [ebp+var_6C]
add	ecx, [eax+4]
call	sub_405230
mov	[ebp+var_4E], ax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	ecx, [ebp+var_6C]
add	ecx, [edx+4]
call	sub_402D10
mov	[ebp+var_4C], eax
mov	eax, dword ptr [ebp+var_28+4]
push	eax
mov	ecx, dword ptr [ebp+var_28]
push	ecx
movzx	edx, [ebp+var_4E]
push	edx
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_7C], eax
mov	[ebp+var_78], edx
mov	ecx, [ebp+var_7C]
cmp	ecx, dword ptr [ebp+var_28]
jnz	short loc_44648A
mov	edx, [ebp+var_78]
cmp	edx, dword ptr [ebp+var_28+4]
jnz	short loc_44648A
mov	[ebp+var_80], 0
jmp	short loc_446491

loc_44648A:
mov	[ebp+var_80], 1

loc_446491:
mov	al, byte ptr [ebp+var_80]
mov	[ebp+var_19], al
jmp	loc_446578

loc_44649C:
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	ecx, [ebp+var_6C]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_56], ax
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	edx, [ebp+var_6C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_54], eax
mov	eax, dword ptr [ebp+var_28+4]
push	eax
mov	ecx, dword ptr [ebp+var_28]
push	ecx
movzx	edx, [ebp+var_56]
push	edx
mov	eax, [ebp+var_54]
mov	edx, [eax]
mov	ecx, [ebp+var_54]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_88], eax
mov	[ebp+var_84], edx
mov	ecx, [ebp+var_88]
cmp	ecx, dword ptr [ebp+var_28]
jnz	short loc_446501
mov	edx, [ebp+var_84]
cmp	edx, dword ptr [ebp+var_28+4]
jz	short loc_44650D

loc_446501:
mov	[ebp+var_8C], 1
jmp	short loc_446517

loc_44650D:
mov	[ebp+var_8C], 0

loc_446517:
mov	al, byte ptr [ebp+var_8C]
mov	[ebp+var_19], al
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jnz	short loc_446565
movzx	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	edx, [ebp+var_6C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	ecx, eax
call	sub_405270
movzx	eax, ax
push	eax
call	sub_405240
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_446565
mov	[ebp+var_90], 0
jmp	short loc_44656F

loc_446565:
mov	[ebp+var_90], 1

loc_44656F:
mov	dl, byte ptr [ebp+var_90]
mov	[ebp+var_19], dl

loc_446578:
push	0
push	0
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	edx, [ebp+var_6C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405E40
jmp	short loc_4465B1

loc_446590:
push	1
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	edx, [ebp+var_6C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_4465B8
retn

loc_4465B1:
mov	[ebp+var_4], 0

loc_4465B8:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_4465D2
push	1
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	ecx, [ebp+var_6C]
add	ecx, [edx+4]
call	sub_402D20

loc_4465D2:
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_404730
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4462E0 endp

align 10h


; Attributes: bp-based frame

sub_446600 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	qword ptr -64h
var_5C=	dword ptr -5Ch
var_4E=	word ptr -4Eh
var_4C=	dword ptr -4Ch
var_46=	word ptr -46h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	qword ptr -30h
var_21=	byte ptr -21h
var_20=	qword ptr -20h
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_446600
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
lea	esi, [ebp+var_18]
call	sub_404710
mov	[ebp+var_4], 0
lea	eax, [ebp+var_18]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_446979
mov	[ebp+var_21], 1
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4077F0
add	esp, 4
xor	edx, edx
mov	dword ptr [ebp+var_30],	eax
mov	dword ptr [ebp+var_30+4], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_5C]
mov	ecx, [eax+edx+28h]
mov	[ebp+var_38], ecx
mov	edx, [eax+edx+2Ch]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
cmp	eax, dword ptr [ebp+var_30+4]
jl	short loc_4466BD
jg	short loc_446690
mov	ecx, [ebp+var_38]
cmp	ecx, dword ptr [ebp+var_30]
jbe	short loc_4466BD

loc_446690:
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_5C]
mov	eax, [edx+ecx+28h]
mov	[ebp+var_40], eax
mov	ecx, [edx+ecx+2Ch]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_40]
sub	edx, dword ptr [ebp+var_30]
mov	eax, [ebp+var_3C]
sbb	eax, dword ptr [ebp+var_30+4]
mov	dword ptr [ebp+var_64],	edx
mov	dword ptr [ebp+var_64+4], eax
jmp	short loc_4466CB

loc_4466BD:
mov	dword ptr [ebp+var_64],	0
mov	dword ptr [ebp+var_64+4], 0

loc_4466CB:
mov	ecx, dword ptr [ebp+var_64]
mov	dword ptr [ebp+var_20],	ecx
mov	edx, dword ptr [ebp+var_64+4]
mov	dword ptr [ebp+var_20+4], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, dword ptr [ebp+var_20]
or	eax, dword ptr [ebp+var_20+4]
jnz	short loc_446737
mov	ecx, dword ptr [ebp+var_30+4]
push	ecx
mov	edx, dword ptr [ebp+var_30]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	ecx, [ebp+var_5C]
add	ecx, [edx+4]
call	sub_402D10
mov	ecx, eax
call	sub_4044A0
mov	[ebp+var_6C], eax
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
cmp	eax, dword ptr [ebp+var_30]
jnz	short loc_44671C
mov	ecx, [ebp+var_68]
cmp	ecx, dword ptr [ebp+var_30+4]
jz	short loc_446725

loc_44671C:
mov	[ebp+var_70], 1
jmp	short loc_44672C

loc_446725:
mov	[ebp+var_70], 0

loc_44672C:
mov	dl, byte ptr [ebp+var_70]
mov	[ebp+var_21], dl
jmp	loc_446921

loc_446737:
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	edx, [ebp+var_5C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_406880
and	eax, 7
cmp	eax, 1
jnz	loc_446831
mov	eax, dword ptr [ebp+var_30+4]
push	eax
mov	ecx, dword ptr [ebp+var_30]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	edx, [ebp+var_5C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	ecx, eax
call	sub_4044A0
mov	[ebp+var_78], eax
mov	[ebp+var_74], edx
mov	eax, [ebp+var_78]
cmp	eax, dword ptr [ebp+var_30]
jnz	short loc_446790
mov	ecx, [ebp+var_74]
cmp	ecx, dword ptr [ebp+var_30+4]
jz	short loc_446799

loc_446790:
mov	[ebp+var_7C], 1
jmp	short loc_4467A0

loc_446799:
mov	[ebp+var_7C], 0

loc_4467A0:
mov	dl, byte ptr [ebp+var_7C]
mov	[ebp+var_21], dl
movzx	eax, [ebp+var_21]
test	eax, eax
jnz	short loc_446819
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	ecx, [ebp+var_5C]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_46], ax
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	edx, [ebp+var_5C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_44], eax
mov	eax, dword ptr [ebp+var_20+4]
push	eax
mov	ecx, dword ptr [ebp+var_20]
push	ecx
movzx	edx, [ebp+var_46]
push	edx
mov	eax, [ebp+var_44]
mov	edx, [eax]
mov	ecx, [ebp+var_44]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_84], eax
mov	[ebp+var_80], edx
mov	ecx, [ebp+var_84]
cmp	ecx, dword ptr [ebp+var_20]
jnz	short loc_446819
mov	edx, [ebp+var_80]
cmp	edx, dword ptr [ebp+var_20+4]
jnz	short loc_446819
mov	[ebp+var_88], 0
jmp	short loc_446823

loc_446819:
mov	[ebp+var_88], 1

loc_446823:
mov	al, byte ptr [ebp+var_88]
mov	[ebp+var_21], al
jmp	loc_446921

loc_446831:
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	ecx, [ebp+var_5C]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_4E], ax
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	edx, [ebp+var_5C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_4C], eax
mov	eax, dword ptr [ebp+var_20+4]
push	eax
mov	ecx, dword ptr [ebp+var_20]
push	ecx
movzx	edx, [ebp+var_4E]
push	edx
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_90], eax
mov	[ebp+var_8C], edx
mov	ecx, [ebp+var_90]
cmp	ecx, dword ptr [ebp+var_20]
jnz	short loc_446896
mov	edx, [ebp+var_8C]
cmp	edx, dword ptr [ebp+var_20+4]
jz	short loc_4468A2

loc_446896:
mov	[ebp+var_94], 1
jmp	short loc_4468AC

loc_4468A2:
mov	[ebp+var_94], 0

loc_4468AC:
mov	al, byte ptr [ebp+var_94]
mov	[ebp+var_21], al
movzx	ecx, [ebp+var_21]
test	ecx, ecx
jnz	short loc_44690E
mov	edx, dword ptr [ebp+var_30+4]
push	edx
mov	eax, dword ptr [ebp+var_30]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	ecx, [ebp+var_5C]
add	ecx, [eax+4]
call	sub_402D10
mov	ecx, eax
call	sub_4044A0
mov	[ebp+var_9C], eax
mov	[ebp+var_98], edx
mov	ecx, [ebp+var_9C]
cmp	ecx, dword ptr [ebp+var_30]
jnz	short loc_44690E
mov	edx, [ebp+var_98]
cmp	edx, dword ptr [ebp+var_30+4]
jnz	short loc_44690E
mov	[ebp+var_A0], 0
jmp	short loc_446918

loc_44690E:
mov	[ebp+var_A0], 1

loc_446918:
mov	al, byte ptr [ebp+var_A0]
mov	[ebp+var_21], al

loc_446921:
push	0
push	0
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	ecx, [ebp+var_5C]
add	ecx, [edx+4]
call	sub_405E40
jmp	short loc_446958

loc_446937:
push	1
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	edx, [ebp+var_5C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_44695F
retn

loc_446958:
mov	[ebp+var_4], 0

loc_44695F:
movzx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_446979
push	4
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	ecx, [ebp+var_5C]
add	ecx, [edx+4]
call	sub_402D20

loc_446979:
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_404730
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_446600 endp

align 10h


; Attributes: bp-based frame

sub_4469A0 proc	near

var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= word ptr	 8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4469A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
lea	esi, [ebp+var_18]
call	sub_404710
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
lea	eax, [ebp+var_18]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	short loc_446A41
mov	byte ptr [ebp+var_4], 1
movzx	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	ecx, [ebp+var_2C]
add	ecx, [eax+4]
call	sub_402D10
mov	ecx, eax
call	sub_405270
movzx	ecx, ax
push	ecx
call	sub_405240
add	esp, 4
mov	[ebp+var_19], al
jmp	short loc_446A3A

loc_446A1B:
push	1
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	ecx, [ebp+var_2C]
add	ecx, [eax+4]
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_446A41
retn

loc_446A3A:
mov	[ebp+var_4], 0

loc_446A41:
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jz	short loc_446A5B
push	1
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	ecx, [ebp+var_2C]
add	ecx, [eax+4]
call	sub_402D20

loc_446A5B:
mov	ecx, [ebp+var_2C]
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_404730
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4469A0 endp

align 10h


; Attributes: bp-based frame

sub_446A90 proc	near

var_58=	dword ptr -58h
var_52=	word ptr -52h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_446A90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 48h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
lea	esi, [ebp+var_18]
call	sub_404710
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
lea	eax, [ebp+var_18]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_446BE9
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_446AEE
mov	[ebp+var_50], 0
jmp	short loc_446AFC

loc_446AEE:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_50], eax

loc_446AFC:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_40], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_402D10
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_28], ecx
xor	edx, edx
cmp	[ebp+var_38], 0
setnz	dl
mov	byte ptr [ebp+var_24], dl
mov	[ebp+var_3C], 0
mov	eax, [ebp+var_3C]
push	eax
call	sub_7803C0
add	esp, 4
push	eax
mov	ecx, [ebp+var_40]
call	sub_77FFD0
mov	[ebp+var_44], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_52], ax
mov	eax, [ebp+var_28]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_48], ecx
mov	edx, [ebp+arg_4]
push	edx
movzx	eax, [ebp+var_52]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_4C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	ecx, [ebp+var_44]
mov	edx, [eax+18h]
call	edx
movzx	eax, [ebp+var_2C]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_19], al
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
jmp	short loc_446BE2

loc_446BC3:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_446BE9
retn

loc_446BE2:
mov	[ebp+var_4], 0

loc_446BE9:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_446C03
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_446C03:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_404730
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_446A90 endp

align 10h


; Attributes: bp-based frame

sub_446C30 proc	near

var_58=	dword ptr -58h
var_52=	word ptr -52h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_446C30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 48h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
lea	esi, [ebp+var_18]
call	sub_404710
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
lea	eax, [ebp+var_18]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_446D89
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_446C8E
mov	[ebp+var_50], 0
jmp	short loc_446C9C

loc_446C8E:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_50], eax

loc_446C9C:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_40], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_402D10
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_28], ecx
xor	edx, edx
cmp	[ebp+var_38], 0
setnz	dl
mov	byte ptr [ebp+var_24], dl
mov	[ebp+var_3C], 0
mov	eax, [ebp+var_3C]
push	eax
call	sub_7803C0
add	esp, 4
push	eax
mov	ecx, [ebp+var_40]
call	sub_77FFD0
mov	[ebp+var_44], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_52], ax
mov	eax, [ebp+var_28]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_48], ecx
mov	edx, [ebp+arg_4]
push	edx
movzx	eax, [ebp+var_52]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_4C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	ecx, [ebp+var_44]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, [ebp+var_2C]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_19], al
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
jmp	short loc_446D82

loc_446D63:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_446D89
retn

loc_446D82:
mov	[ebp+var_4], 0

loc_446D89:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_446DA3
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_446DA3:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_404730
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_446C30 endp

align 10h


; Attributes: bp-based frame

sub_446DD0 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_447076
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_446E4E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_44F150
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5

loc_446E4E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_60]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_29]
test	ecx, ecx
jz	short loc_446ED4
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5
jmp	loc_447071

loc_446ED4:
lea	eax, [ebp+var_2B]
mov	[ebp+var_D8], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_74], ecx
lea	edx, [ebp+var_6D]
mov	[ebp+var_DC], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_74]
add	eax, 10h
mov	[ebp+var_6C], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_11], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_446F43
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5

loc_446F43:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_CC]
jnz	short loc_446F8D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5

loc_446F8D:
lea	eax, [ebp+var_2D]
mov	[ebp+var_E0], eax
mov	[ebp+var_4], 8
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_79]
mov	[ebp+var_E4], edx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_80]
add	eax, 10h
mov	[ebp+var_78], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_447040
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_447019
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5
jmp	short loc_44703E

loc_447019:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5

loc_44703E:
jmp	short loc_447071

loc_447040:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_44F150
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5

loc_447071:
jmp	loc_4474E5

loc_447076:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_447159
lea	ecx, [ebp+var_3A]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_EC], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_447123
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5
jmp	short loc_447154

loc_447123:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44F150
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5

loc_447154:
jmp	loc_4474E5

loc_447159:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_18]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	edx, [ebp+var_45]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_A0], eax
lea	ecx, [ebp+var_99]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 11h
mov	edx, [ebp+var_A0]
add	edx, 10h
mov	[ebp+var_98], edx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_98]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jz	short loc_447252
lea	edx, [ebp+var_47]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 14h
mov	eax, [ebp+var_58]
or	eax, 1
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_AC], ecx
lea	edx, [ebp+var_A5]
mov	[ebp+var_FC], edx
mov	[ebp+var_4], 15h
mov	eax, [ebp+var_AC]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_447252
mov	[ebp+var_100], 1
jmp	short loc_44725C

loc_447252:
mov	[ebp+var_100], 0

loc_44725C:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_447286
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_447286:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4472E8
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4472BE
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5
jmp	short loc_4472E3

loc_4472BE:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	loc_4474E5

loc_4472E3:
jmp	loc_4474E5

loc_4472E8:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_44737B
lea	eax, [ebp+var_48]
mov	[ebp+var_104], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_108], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_1D], cl
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44737B:
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	loc_44740E
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_44740E
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_CC]
jz	short loc_447402
lea	edx, [ebp+var_4A]
mov	[ebp+var_10C], edx
mov	[ebp+var_4], 1Ch
mov	eax, [ebp+var_58]
or	eax, 2
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_C4], ecx
lea	edx, [ebp+var_BD]
mov	[ebp+var_110], edx
mov	[ebp+var_4], 1Dh
mov	eax, [ebp+var_C4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_BC]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_44740E

loc_447402:
mov	[ebp+var_114], 1
jmp	short loc_447418

loc_44740E:
mov	[ebp+var_114], 0

loc_447418:
mov	al, byte ptr [ebp+var_114]
mov	[ebp+var_49], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 2
jz	short loc_447442
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_447442:
movzx	edx, [ebp+var_49]
test	edx, edx
jz	short loc_44749B
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_447477
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	short loc_4474E5
jmp	short loc_447499

loc_447477:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44EFB0
mov	eax, [ebp+arg_0]
jmp	short loc_4474E5

loc_447499:
jmp	short loc_4474E5

loc_44749B:
movzx	eax, [ebp+var_12]
movzx	ecx, [ebp+var_1D]
cmp	eax, ecx
jnz	short loc_4474B9
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4474E5
jmp	short loc_4474E5

loc_4474B9:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_44F150
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4474E5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_446DD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_447500(void *)
sub_447500 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_447500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_44754A
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_44754A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_447500 endp

align 10h


; Attributes: bp-based frame

sub_447560 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7A=	byte ptr -7Ah
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	qword ptr -48h
var_40=	qword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	qword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= qword ptr  10h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	byte ptr  20h
arg_1C=	byte ptr  24h
arg_20=	byte ptr  28h
arg_24=	byte ptr  2Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_447560
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 9Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4], 0
mov	dword ptr [ebp+var_20],	0
mov	dword ptr [ebp+var_20+4], 0
mov	[ebp+var_14], 0
mov	[ebp+var_21], 0
mov	byte ptr [ebp+var_4], 1

loc_4475A9:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_64]
cmp	ecx, [ebp+var_68]
jz	loc_447844
movzx	edx, [ebp+var_21]
test	edx, edx
jnz	loc_447844
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
mov	[ebp+var_38], edx
mov	eax, dword ptr [ebp+arg_8]
sub	eax, dword ptr [ebp+var_20]
mov	ecx, dword ptr [ebp+arg_8+4]
sbb	ecx, dword ptr [ebp+var_20+4]
mov	dword ptr [ebp+var_40],	eax
mov	dword ptr [ebp+var_40+4], ecx
call	sub_4076A0
cdq
mov	dword ptr [ebp+var_48],	eax
mov	dword ptr [ebp+var_48+4], edx
lea	edx, [ebp+var_40]
push	edx
lea	eax, [ebp+var_48]
push	eax
call	sub_405570
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	dl, [ebp+arg_18]
mov	[ebp+var_7A], dl
mov	byte ptr [ebp+var_4], 2
mov	al, [ebp+var_7A]
mov	[ebp+var_79], al
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_79]
mov	[ebp+var_A4], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_A4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_30]
push	edx
call	sub_4451C0
add	esp, 0Ch
mov	[ebp+var_78], eax
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_78]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
sub	ecx, [ebp+var_30]
mov	[ebp+var_4C], ecx
lea	edx, [ebp+var_28]
push	edx
lea	eax, [ebp+var_4C]
push	eax
call	sub_405D40
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
call	sub_405E00
add	esp, 0Ch
mov	edx, [ebp+arg_10]
add	edx, [ebp+var_2C]
mov	[ebp+arg_10], edx
mov	eax, [ebp+var_2C]
cdq
add	eax, dword ptr [ebp+var_20]
mov	ecx, dword ptr [ebp+var_20+4]
adc	ecx, edx
mov	dword ptr [ebp+var_20],	eax
mov	dword ptr [ebp+var_20+4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
add	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_4]
mov	[ecx+8], eax
mov	edx, [ebp+var_34]
cmp	edx, [ebp+var_38]
jz	short loc_447711
mov	eax, [ebp+var_34]
sub	eax, [ebp+var_30]
cmp	eax, [ebp+var_28]
jg	short loc_447711
movzx	ecx, [ebp+arg_1C]
test	ecx, ecx
jz	short loc_447708
mov	edx, dword ptr [ebp+var_20]
add	edx, 1
mov	eax, dword ptr [ebp+var_20+4]
adc	eax, 0
mov	dword ptr [ebp+var_20],	edx
mov	dword ptr [ebp+var_20+4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
add	edx, 1
mov	eax, [ebp+arg_4]
mov	[eax+8], edx

loc_447708:
mov	[ebp+var_21], 1
jmp	loc_44783F

loc_447711:
mov	ecx, dword ptr [ebp+var_20]
cmp	ecx, dword ptr [ebp+arg_8]
jnz	loc_4477C6
mov	edx, dword ptr [ebp+var_20+4]
cmp	edx, dword ptr [ebp+arg_8+4]
jnz	loc_4477C6
movzx	eax, [ebp+arg_24]
test	eax, eax
jz	loc_4477C0
mov	ecx, [ebp+var_38]
sub	ecx, [ebp+var_30]
cmp	[ebp+var_2C], ecx
jnz	short loc_4477B7
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_4]
mov	ecx, [edx+8]
cmp	ecx, [eax+0Ch]
jnb	short loc_44776B
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
movzx	edx, byte ptr [ecx]
mov	[ebp+var_A8], edx
jmp	short loc_44777E

loc_44776B:
mov	eax, [ebp+arg_4]
mov	edx, [eax]
mov	ecx, [ebp+arg_4]
mov	eax, [edx+1Ch]
call	eax
mov	[ebp+var_A8], eax

loc_44777E:
mov	ecx, [ebp+var_A8]
mov	[ebp+var_8C], ecx
mov	[ebp+var_88], 0FFFFFFFFh
mov	edx, [ebp+var_8C]
xor	eax, eax
cmp	edx, [ebp+var_88]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4477B5
mov	edx, [ebp+var_14]
or	edx, 2
mov	[ebp+var_14], edx

loc_4477B5:
jmp	short loc_4477C0

loc_4477B7:
mov	eax, [ebp+var_14]
or	eax, 4
mov	[ebp+var_14], eax

loc_4477C0:
mov	[ebp+var_21], 1
jmp	short loc_44783F

loc_4477C6:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_4]
mov	eax, [ecx+8]
cmp	eax, [edx+0Ch]
jnb	short loc_4477F1
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
movzx	ecx, byte ptr [eax]
mov	[ebp+var_AC], ecx
jmp	short loc_447804

loc_4477F1:
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+1Ch]
call	edx
mov	[ebp+var_AC], eax

loc_447804:
mov	eax, [ebp+var_AC]
mov	[ebp+var_98], eax
mov	[ebp+var_94], 0FFFFFFFFh
mov	ecx, [ebp+var_98]
xor	edx, edx
cmp	ecx, [ebp+var_94]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44783F
mov	ecx, [ebp+var_14]
or	ecx, 2
mov	[ebp+var_14], ecx
mov	[ebp+var_21], 1

loc_44783F:
jmp	loc_4475A9

loc_447844:
jmp	short loc_447869

loc_447846:
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_445C00
mov	[ebp+var_21], 1
mov	[ebp+var_4], 0
mov	eax, offset loc_447870
retn

loc_447869:
mov	[ebp+var_4], 0

loc_447870:
movzx	ecx, [ebp+var_21]
test	ecx, ecx
jz	short loc_4478C2
movzx	edx, [ebp+arg_20]
test	edx, edx
jz	short loc_447886
mov	eax, [ebp+arg_10]
mov	byte ptr [eax],	0

loc_447886:
cmp	[ebp+var_14], 0
jz	short loc_4478A0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_438B50

loc_4478A0:
mov	ecx, dword ptr [ebp+var_20]
mov	dword ptr [ebp+var_58],	ecx
mov	edx, dword ptr [ebp+var_20+4]
mov	dword ptr [ebp+var_58+4], edx
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, dword ptr [ebp+var_58]
mov	edx, dword ptr [ebp+var_58+4]
jmp	short loc_44791A

loc_4478C2:
movzx	eax, [ebp+arg_24]
push	eax
movzx	ecx, [ebp+arg_20]
push	ecx
movzx	edx, [ebp+arg_1C]
push	edx
movzx	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, dword ptr [ebp+arg_8]
sub	edx, dword ptr [ebp+var_20]
mov	eax, dword ptr [ebp+arg_8+4]
sbb	eax, dword ptr [ebp+var_20+4]
push	eax
push	edx
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_447930
add	esp, 24h
add	eax, dword ptr [ebp+var_20]
mov	ecx, dword ptr [ebp+var_20+4]
adc	ecx, edx
mov	dword ptr [ebp+var_60],	eax
mov	dword ptr [ebp+var_60+4], ecx
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, dword ptr [ebp+var_60]
mov	edx, dword ptr [ebp+var_60+4]

loc_44791A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_447560 endp

align 10h


; Attributes: bp-based frame

sub_447930 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	qword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= qword ptr  10h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	byte ptr  20h
arg_1C=	byte ptr  24h
arg_20=	byte ptr  28h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_447930
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 40h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4], 0
mov	dword ptr [ebp+var_20],	0
mov	dword ptr [ebp+var_20+4], 0
mov	[ebp+var_14], 0
mov	byte ptr [ebp+var_4], 1

loc_447972:
mov	eax, dword ptr [ebp+var_20]
cmp	eax, dword ptr [ebp+arg_8]
jnz	short loc_447998
mov	ecx, dword ptr [ebp+var_20+4]
cmp	ecx, dword ptr [ebp+arg_8+4]
jnz	short loc_447998
movzx	edx, [ebp+arg_20]
test	edx, edx
jz	short loc_447993
mov	eax, [ebp+var_14]
or	eax, 4
mov	[ebp+var_14], eax

loc_447993:
jmp	loc_447A75

loc_447998:
mov	ecx, [ebp+arg_4]
call	sub_443C00
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_44], ecx
mov	[ebp+var_40], 0FFFFFFFFh
mov	edx, [ebp+var_44]
xor	eax, eax
cmp	edx, [ebp+var_40]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4479EC
mov	edx, dword ptr [ebp+var_20+4]
cmp	edx, dword ptr [ebp+arg_8+4]
jl	short loc_4479DC
jg	short loc_4479D4
mov	eax, dword ptr [ebp+var_20]
cmp	eax, dword ptr [ebp+arg_8]
jb	short loc_4479DC

loc_4479D4:
movzx	ecx, [ebp+arg_20]
test	ecx, ecx
jz	short loc_4479E5

loc_4479DC:
mov	edx, [ebp+var_14]
or	edx, 2
mov	[ebp+var_14], edx

loc_4479E5:
jmp	loc_447A75
jmp	short loc_447A4D

loc_4479EC:
mov	al, byte ptr [ebp+var_24]
mov	[ebp+var_25], al
movzx	ecx, [ebp+arg_14]
movzx	edx, [ebp+var_25]
xor	eax, eax
cmp	edx, ecx
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_447A4D
movzx	edx, [ebp+arg_18]
test	edx, edx
jz	short loc_447A24
mov	eax, dword ptr [ebp+var_20]
add	eax, 1
mov	ecx, dword ptr [ebp+var_20+4]
adc	ecx, 0
mov	dword ptr [ebp+var_20],	eax
mov	dword ptr [ebp+var_20+4], ecx
jmp	short loc_447A4B

loc_447A24:
mov	dl, byte ptr [ebp+var_24]
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_44F360
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_447A4B
mov	eax, [ebp+var_14]
or	eax, 4
mov	[ebp+var_14], eax

loc_447A4B:
jmp	short loc_447A75

loc_447A4D:
mov	ecx, [ebp+arg_10]
mov	dl, byte ptr [ebp+var_24]
mov	[ecx], dl
mov	eax, [ebp+arg_10]
add	eax, 1
mov	[ebp+arg_10], eax
mov	ecx, dword ptr [ebp+var_20]
add	ecx, 1
mov	edx, dword ptr [ebp+var_20+4]
adc	edx, 0
mov	dword ptr [ebp+var_20],	ecx
mov	dword ptr [ebp+var_20+4], edx
jmp	loc_447972

loc_447A75:
jmp	short loc_447AB0

loc_447A77:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_445C00
mov	eax, [ebp+arg_10]
mov	byte ptr [eax],	0
mov	ecx, dword ptr [ebp+var_20]
mov	[ebp+var_30], ecx
mov	edx, dword ptr [ebp+var_20+4]
mov	[ebp+var_2C], edx
mov	[ebp+var_4], 0
mov	eax, offset loc_447AB9
retn
mov	eax, offset loc_447AB0
retn

loc_447AB0:
mov	[ebp+var_4], 0
jmp	short loc_447ACF

loc_447AB9:
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	edx, [ebp+var_2C]
jmp	short loc_447B19

loc_447ACF:
movzx	eax, [ebp+arg_1C]
test	eax, eax
jz	short loc_447ADD
mov	ecx, [ebp+arg_10]
mov	byte ptr [ecx],	0

loc_447ADD:
cmp	[ebp+var_14], 0
jz	short loc_447AF9
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_438B50

loc_447AF9:
mov	eax, dword ptr [ebp+var_20]
mov	dword ptr [ebp+var_38],	eax
mov	ecx, dword ptr [ebp+var_20+4]
mov	dword ptr [ebp+var_38+4], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, dword ptr [ebp+var_38]
mov	edx, dword ptr [ebp+var_38+4]

loc_447B19:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_447930 endp

align 10h


; Attributes: bp-based frame

sub_447B30 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	qword ptr -0B4h
var_AC=	dword ptr -0ACh
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	qword ptr -28h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_447B30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0C0h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_AC]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_AC]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	dl, [ebp+var_14]
mov	[ebp+var_29], dl
movzx	eax, [ebp+var_29]
test	eax, eax
jz	loc_447ECF
mov	[ebp+var_19], 1
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+eax+28h]
mov	[ebp+var_34], edx
mov	eax, [ecx+eax+2Ch]
mov	[ebp+var_30], eax
cmp	[ebp+var_30], 0
jl	short loc_447BFD
jg	short loc_447BC4
cmp	[ebp+var_34], 0
jbe	short loc_447BFD

loc_447BC4:
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+eax+28h]
mov	[ebp+var_3C], edx
mov	eax, [ecx+eax+2Ch]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
sub	ecx, 1
mov	edx, [ebp+var_38]
sbb	edx, 0
mov	dword ptr [ebp+var_B4],	ecx
mov	dword ptr [ebp+var_B4+4], edx
jmp	short loc_447C11

loc_447BFD:
mov	dword ptr [ebp+var_B4],	0
mov	dword ptr [ebp+var_B4+4], 0

loc_447C11:
mov	eax, dword ptr [ebp+var_B4]
mov	dword ptr [ebp+var_28],	eax
mov	ecx, dword ptr [ebp+var_B4+4]
mov	dword ptr [ebp+var_28+4], ecx
mov	edx, dword ptr [ebp+var_28]
or	edx, dword ptr [ebp+var_28+4]
jnz	short loc_447C6D
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_AC]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_40], ecx
movzx	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_40]
call	sub_44CF60
mov	[ebp+var_50], eax
mov	[ebp+var_4C], 0FFFFFFFFh
mov	eax, [ebp+var_50]
xor	ecx, ecx
cmp	eax, [ebp+var_4C]
setz	cl
mov	[ebp+var_19], cl
jmp	loc_447E63

loc_447C6D:
mov	edx, [ebp+var_AC]
mov	eax, [edx]
mov	ecx, [ebp+var_AC]
add	ecx, [eax+4]
call	sub_406880
and	eax, 7
cmp	eax, 1
jnz	loc_447D64
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_54], edx
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_54]
call	sub_44CF60
mov	[ebp+var_64], eax
mov	[ebp+var_60], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
xor	edx, edx
cmp	ecx, [ebp+var_60]
setz	dl
mov	[ebp+var_19], dl
movzx	eax, [ebp+var_19]
test	eax, eax
jnz	short loc_447D4C
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_AC]
mov	dl, [ecx+eax+54h]
mov	[ebp+var_65], dl
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_AC]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_6C], ecx
mov	edx, dword ptr [ebp+var_28+4]
push	edx
mov	eax, dword ptr [ebp+var_28]
push	eax
movzx	ecx, [ebp+var_65]
push	ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	ecx, [ebp+var_6C]
mov	edx, [eax+2Ch]
call	edx
mov	[ebp+var_BC], eax
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_BC]
cmp	eax, dword ptr [ebp+var_28]
jnz	short loc_447D4C
mov	ecx, [ebp+var_B8]
cmp	ecx, dword ptr [ebp+var_28+4]
jnz	short loc_447D4C
mov	[ebp+var_C0], 0
jmp	short loc_447D56

loc_447D4C:
mov	[ebp+var_C0], 1

loc_447D56:
mov	dl, byte ptr [ebp+var_C0]
mov	[ebp+var_19], dl
jmp	loc_447E63

loc_447D64:
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_AC]
mov	cl, [eax+edx+54h]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_AC]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_AC]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_74], eax
mov	ecx, dword ptr [ebp+var_28+4]
push	ecx
mov	edx, dword ptr [ebp+var_28]
push	edx
movzx	eax, [ebp+var_6D]
push	eax
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
mov	ecx, [ebp+var_74]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_C8], eax
mov	[ebp+var_C4], edx
mov	ecx, [ebp+var_C8]
cmp	ecx, dword ptr [ebp+var_28]
jnz	short loc_447DD0
mov	edx, [ebp+var_C4]
cmp	edx, dword ptr [ebp+var_28+4]
jz	short loc_447DDC

loc_447DD0:
mov	[ebp+var_CC], 1
jmp	short loc_447DE6

loc_447DDC:
mov	[ebp+var_CC], 0

loc_447DE6:
mov	al, byte ptr [ebp+var_CC]
mov	[ebp+var_19], al
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jnz	short loc_447E50
mov	edx, [ebp+var_AC]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_AC]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_78], eax
movzx	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_78]
call	sub_44CF60
mov	[ebp+var_88], eax
mov	[ebp+var_84], 0FFFFFFFFh
mov	edx, [ebp+var_88]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_447E50
mov	[ebp+var_D0], 0
jmp	short loc_447E5A

loc_447E50:
mov	[ebp+var_D0], 1

loc_447E5A:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_19], dl

loc_447E63:
push	0
push	0
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	edx, [ebp+var_AC]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405E40
jmp	short loc_447EA8

loc_447E81:
push	1
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	edx, [ebp+var_AC]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_447EAF
retn

loc_447EA8:
mov	[ebp+var_4], 0

loc_447EAF:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_447ECF
push	1
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	ecx, [ebp+var_AC]
add	ecx, [edx+4]
call	sub_438B50

loc_447ECF:
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_447B30 endp

align 10h


; Attributes: bp-based frame

sub_447F00 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	qword ptr -8Ch
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	qword ptr -30h
var_21=	byte ptr -21h
var_20=	qword ptr -20h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_447F00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B8h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_84]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	dl, [ebp+var_14]
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	loc_448325
mov	[ebp+var_21], 1
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407D10
add	esp, 4
xor	edx, edx
mov	dword ptr [ebp+var_30],	eax
mov	dword ptr [ebp+var_30+4], edx
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_84]
mov	ecx, [eax+edx+28h]
mov	[ebp+var_3C], ecx
mov	edx, [eax+edx+2Ch]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
cmp	eax, dword ptr [ebp+var_30+4]
jl	short loc_447FE1
jg	short loc_447FA8
mov	ecx, [ebp+var_3C]
cmp	ecx, dword ptr [ebp+var_30]
jbe	short loc_447FE1

loc_447FA8:
mov	edx, [ebp+var_84]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_84]
mov	eax, [edx+ecx+28h]
mov	[ebp+var_44], eax
mov	ecx, [edx+ecx+2Ch]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
sub	edx, dword ptr [ebp+var_30]
mov	eax, [ebp+var_40]
sbb	eax, dword ptr [ebp+var_30+4]
mov	dword ptr [ebp+var_8C],	edx
mov	dword ptr [ebp+var_8C+4], eax
jmp	short loc_447FF5

loc_447FE1:
mov	dword ptr [ebp+var_8C],	0
mov	dword ptr [ebp+var_8C+4], 0

loc_447FF5:
mov	ecx, dword ptr [ebp+var_8C]
mov	dword ptr [ebp+var_20],	ecx
mov	edx, dword ptr [ebp+var_8C+4]
mov	dword ptr [ebp+var_20+4], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, dword ptr [ebp+var_20]
or	eax, dword ptr [ebp+var_20+4]
jnz	short loc_44808A
mov	ecx, [ebp+var_84]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_84]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_48], edx
mov	eax, dword ptr [ebp+var_30+4]
push	eax
mov	ecx, dword ptr [ebp+var_30]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_48]
mov	edx, [eax]
mov	ecx, [ebp+var_48]
mov	eax, [edx+28h]
call	eax
mov	[ebp+var_94], eax
mov	[ebp+var_90], edx
mov	ecx, [ebp+var_94]
cmp	ecx, dword ptr [ebp+var_30]
jnz	short loc_448066
mov	edx, [ebp+var_90]
cmp	edx, dword ptr [ebp+var_30+4]
jz	short loc_448072

loc_448066:
mov	[ebp+var_98], 1
jmp	short loc_44807C

loc_448072:
mov	[ebp+var_98], 0

loc_44807C:
mov	al, byte ptr [ebp+var_98]
mov	[ebp+var_21], al
jmp	loc_4482BB

loc_44808A:
mov	ecx, [ebp+var_84]
mov	edx, [ecx]
mov	ecx, [ebp+var_84]
add	ecx, [edx+4]
call	sub_406880
and	eax, 7
cmp	eax, 1
jnz	loc_4481B6
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_84]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_4C], ecx
mov	edx, dword ptr [ebp+var_30+4]
push	edx
mov	eax, dword ptr [ebp+var_30]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
mov	edx, [eax+28h]
call	edx
mov	[ebp+var_A0], eax
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_A0]
cmp	eax, dword ptr [ebp+var_30]
jnz	short loc_4480FF
mov	ecx, [ebp+var_9C]
cmp	ecx, dword ptr [ebp+var_30+4]
jz	short loc_44810B

loc_4480FF:
mov	[ebp+var_A4], 1
jmp	short loc_448115

loc_44810B:
mov	[ebp+var_A4], 0

loc_448115:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_21], dl
movzx	eax, [ebp+var_21]
test	eax, eax
jnz	short loc_44819E
mov	ecx, [ebp+var_84]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_84]
mov	dl, [ecx+eax+54h]
mov	[ebp+var_4D], dl
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_84]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_54], ecx
mov	edx, dword ptr [ebp+var_20+4]
push	edx
mov	eax, dword ptr [ebp+var_20]
push	eax
movzx	ecx, [ebp+var_4D]
push	ecx
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	ecx, [ebp+var_54]
mov	edx, [eax+2Ch]
call	edx
mov	[ebp+var_AC], eax
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_AC]
cmp	eax, dword ptr [ebp+var_20]
jnz	short loc_44819E
mov	ecx, [ebp+var_A8]
cmp	ecx, dword ptr [ebp+var_20+4]
jnz	short loc_44819E
mov	[ebp+var_B0], 0
jmp	short loc_4481A8

loc_44819E:
mov	[ebp+var_B0], 1

loc_4481A8:
mov	dl, byte ptr [ebp+var_B0]
mov	[ebp+var_21], dl
jmp	loc_4482BB

loc_4481B6:
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_84]
mov	cl, [eax+edx+54h]
mov	[ebp+var_55], cl
mov	edx, [ebp+var_84]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_84]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_5C], eax
mov	ecx, dword ptr [ebp+var_20+4]
push	ecx
mov	edx, dword ptr [ebp+var_20]
push	edx
movzx	eax, [ebp+var_55]
push	eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	ecx, [ebp+var_5C]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_B8], eax
mov	[ebp+var_B4], edx
mov	ecx, [ebp+var_B8]
cmp	ecx, dword ptr [ebp+var_20]
jnz	short loc_448222
mov	edx, [ebp+var_B4]
cmp	edx, dword ptr [ebp+var_20+4]
jz	short loc_44822E

loc_448222:
mov	[ebp+var_BC], 1
jmp	short loc_448238

loc_44822E:
mov	[ebp+var_BC], 0

loc_448238:
mov	al, byte ptr [ebp+var_BC]
mov	[ebp+var_21], al
movzx	ecx, [ebp+var_21]
test	ecx, ecx
jnz	short loc_4482A8
mov	edx, [ebp+var_84]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_84]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_60], eax
mov	ecx, dword ptr [ebp+var_30+4]
push	ecx
mov	edx, dword ptr [ebp+var_30]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	ecx, [ebp+var_60]
mov	eax, [edx+28h]
call	eax
mov	[ebp+var_C4], eax
mov	[ebp+var_C0], edx
mov	ecx, [ebp+var_C4]
cmp	ecx, dword ptr [ebp+var_30]
jnz	short loc_4482A8
mov	edx, [ebp+var_C0]
cmp	edx, dword ptr [ebp+var_30+4]
jnz	short loc_4482A8
mov	[ebp+var_C8], 0
jmp	short loc_4482B2

loc_4482A8:
mov	[ebp+var_C8], 1

loc_4482B2:
mov	al, byte ptr [ebp+var_C8]
mov	[ebp+var_21], al

loc_4482BB:
push	0
push	0
mov	ecx, [ebp+var_84]
mov	edx, [ecx]
mov	ecx, [ebp+var_84]
add	ecx, [edx+4]
call	sub_405E40
jmp	short loc_4482FE

loc_4482D7:
push	1
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	edx, [ebp+var_84]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_448305
retn

loc_4482FE:
mov	[ebp+var_4], 0

loc_448305:
movzx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_448325
push	4
mov	ecx, [ebp+var_84]
mov	edx, [ecx]
mov	ecx, [ebp+var_84]
add	ecx, [edx+4]
call	sub_438B50

loc_448325:
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_447F00 endp

align 10h


; Attributes: bp-based frame

sub_448350 proc	near

var_70=	dword ptr -70h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_448350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 60h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	loc_4484AF
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_4483B7
mov	[ebp+var_54], 0
jmp	short loc_4483C5

loc_4483B7:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_54], eax

loc_4483C5:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+54h]
mov	[ebp+var_36], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setnz	cl
mov	byte ptr [ebp+var_24], cl
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803B0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
push	edx
movzx	eax, [ebp+var_36]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_50]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_48]
mov	eax, [edx]
mov	ecx, [ebp+var_48]
mov	edx, [eax+4]
call	edx
movzx	eax, [ebp+var_2C]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_19], al
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
jmp	short loc_4484A8

loc_448489:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_4484AF
retn

loc_4484A8:
mov	[ebp+var_4], 0

loc_4484AF:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_4484C9
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_438B50

loc_4484C9:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_448350 endp

align 10h


; Attributes: bp-based frame

sub_448500 proc	near

var_70=	dword ptr -70h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_448500
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 60h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	loc_44865F
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_448567
mov	[ebp+var_54], 0
jmp	short loc_448575

loc_448567:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_54], eax

loc_448575:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+54h]
mov	[ebp+var_36], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setnz	cl
mov	byte ptr [ebp+var_24], cl
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803B0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
push	edx
movzx	eax, [ebp+var_36]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_50]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_48]
mov	eax, [edx]
mov	ecx, [ebp+var_48]
mov	edx, [eax+18h]
call	edx
movzx	eax, [ebp+var_2C]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_19], al
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
jmp	short loc_448658

loc_448639:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_44865F
retn

loc_448658:
mov	[ebp+var_4], 0

loc_44865F:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_448679
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_438B50

loc_448679:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_448500 endp

align 10h


; Attributes: bp-based frame

sub_4486B0 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_3D=	byte ptr -3Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_44CFD0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_407C40
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_98]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
mov	dl, [ecx]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_C]
sub	eax, [ebp+var_C]
push	eax		; size_t
movzx	ecx, [ebp+var_3D]
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	_memset
add	esp, 0Ch
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_C]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_448757
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_448757:
mov	ecx, [ebp+var_98]
call	sub_443CC0
mov	eax, [ebp+var_8]
add	eax, [ebp+var_4]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_94]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_4486B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4487A0(void	*, int,	int, int)
sub_4487A0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_D= byte ptr	-0Dh
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4487C7
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4487C7
mov	[ebp+var_30], 1
jmp	short loc_4487CE

loc_4487C7:
mov	[ebp+var_30], 0

loc_4487CE:
movzx	ecx, byte ptr [ebp+var_30]
test	ecx, ecx
jz	short loc_448800
mov	edx, [ebp+arg_8]
mov	al, [edx]
mov	[ebp+var_A+1], al
xor	ecx, ecx
mov	[ebp+var_A], cl
lea	edx, [ebp+var_A]
push	edx		; int
lea	eax, [ebp+var_A+1]
push	eax		; int
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
mov	ecx, [ebp+var_2C]
call	sub_4487A0
jmp	loc_448920

loc_448800:
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+4]
mov	dword ptr [ebp+var_A+2], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	short loc_448899
xor	edx, edx
mov	[ebp+var_B], dl
lea	eax, [ebp+var_B]
push	eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+4]
sub	eax, [ebp+arg_4]
push	eax
call	sub_407C50
add	esp, 10h
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
add	edx, [ebp+arg_4]
mov	eax, [ebp+var_2C]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_C], cl
mov	edx, dword ptr [ebp+var_A+2]
push	edx
mov	eax, dword ptr [ebp+var_A+2]
sub	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A290
add	esp, 0Ch
mov	edx, [ebp+arg_8]
mov	al, [edx]
mov	[ebp+var_15], al
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
push	ecx		; size_t
movzx	edx, [ebp+var_15]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	_memset
add	esp, 0Ch
jmp	loc_448920

loc_448899:
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
add	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
push	0
lea	ecx, [ebp+var_1D]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
call	sub_44D880
add	esp, 14h
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_1C]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
push	ecx
mov	edx, dword ptr [ebp+var_A+2]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_407C50
add	esp, 10h
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
add	edx, [ebp+var_4]
mov	eax, [ebp+var_2C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	dl, [ecx]
mov	[ebp+var_25], dl
mov	eax, dword ptr [ebp+var_A+2]
sub	eax, [ebp+arg_0]
push	eax		; size_t
movzx	ecx, [ebp+var_25]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
call	_memset
add	esp, 0Ch

loc_448920:
mov	esp, ebp
pop	ebp
retn	10h
sub_4487A0 endp

align 10h


; Attributes: bp-based frame

sub_448930 proc	near

var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_448930
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_38]
add	ecx, 8
call	sub_407C40
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4489BF

loc_44898D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_38]
add	ecx, 8
call	sub_4079C0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4489BF
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4489BF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_448930 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4489E0(void *)
sub_4489E0 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4489E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_448A2A
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_448A2A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4489E0 endp

align 10h


; Attributes: bp-based frame

sub_448A40 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_448A40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_445C30
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_155DF4C
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[ecx+20h], edx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_448A40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_448AD0(void *)
sub_448AD0 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_448AD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_42E0F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_448B26
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_448B26:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_448AD0 endp

align 10h


; Attributes: bp-based frame

sub_448B40 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_448B40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_404940
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_155DFB4
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[ecx+20h], edx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_402390
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_448B40 endp

align 10h


; Attributes: bp-based frame

sub_448BD0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
add	ecx, 24h
call	sub_404430
mov	[ebp+var_4], eax
mov	eax, [ebp+var_14]
add	eax, 24h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
call	sub_402430
mov	esi, eax
mov	ecx, [ebp+var_C]
call	sub_404430
lea	ecx, [eax+esi*2]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+20h]
and	eax, 8
jz	short loc_448C41
mov	ecx, [ebp+var_14]
mov	edx, [ecx+20h]
and	edx, 2
jz	short loc_448C27
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_448C2D

loc_448C27:
mov	ecx, [ebp+var_4]
mov	[ebp+var_18], ecx

loc_448C2D:
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_407300

loc_448C41:
mov	edx, [ebp+var_14]
mov	eax, [edx+20h]
and	eax, 10h
jz	short loc_448C99
mov	ecx, [ebp+var_14]
mov	edx, [ecx+20h]
and	edx, 3
jz	short loc_448C69
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_407320
jmp	short loc_448C99

loc_448C69:
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_14]
call	sub_407320
mov	ecx, [ebp+var_14]
add	ecx, 24h
call	sub_402430
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+14h]
mov	eax, [ebp+var_10]
lea	ecx, [edx+eax*2]
mov	edx, [ebp+var_14]
mov	[edx+14h], ecx

loc_448C99:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_448BD0 endp

align 10h


; Attributes: bp-based frame

sub_448CA0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_38]
jnz	short loc_448D08
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_44D1A0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
call	sub_4044C0
mov	edx, [ebp+var_10]
mov	[eax], edx
mov	eax, [ebp+var_38]
call	sub_403030
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	eax, [ebp+var_38]
call	sub_403040
mov	edx, [ebp+var_10]
mov	[eax], edx
jmp	loc_448E1B

loc_448D08:
cmp	[ebp+arg_10], 0
jnz	short loc_448D73
cmp	[ebp+arg_C], 0
jnz	short loc_448D6A
lea	eax, [ebp+var_12]
mov	[ebp+var_3C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
or	ecx, 1
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_1D]
mov	[ebp+var_40], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_4]
call	sub_404540
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_448D73

loc_448D6A:
mov	[ebp+var_44], 1
jmp	short loc_448D7A

loc_448D73:
mov	[ebp+var_44], 0

loc_448D7A:
mov	cl, byte ptr [ebp+var_44]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_448DA1
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_448DA1:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_448DE3
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_44D1A0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
call	sub_4044C0
mov	edx, [ebp+var_10]
mov	[eax], edx
mov	eax, [ebp+var_38]
call	sub_4044C0
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jnz	short loc_448DE1
mov	eax, [ebp+var_38]
call	sub_4044C0
mov	edx, [ebp+var_10]
mov	[eax], edx

loc_448DE1:
jmp	short loc_448E1B

loc_448DE3:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_38]
call	sub_44D1A0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
call	sub_403040
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	eax, [ebp+var_38]
call	sub_403040
mov	edx, [ebp+arg_4]
cmp	edx, [eax]
jnz	short loc_448E1B
mov	eax, [ebp+var_38]
call	sub_403040
mov	ecx, [ebp+var_10]
mov	[eax], ecx

loc_448E1B:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_38]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_38]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_38]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_448CA0 endp

align 10h


; Attributes: bp-based frame

sub_448E70 proc	near

var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_168= dword ptr -168h
var_164= dword ptr -164h
var_15D= byte ptr -15Dh
var_15C= dword ptr -15Ch
var_134= dword ptr -134h
var_130= dword ptr -130h
var_129= byte ptr -129h
var_128= dword ptr -128h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_109= byte ptr -109h
var_108= dword ptr -108h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E9=	byte ptr -0E9h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_448E70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1E0h
mov	[ebp+var_1A4], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_1A4]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_449159
mov	edx, [ebp+var_1A4]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_448EEE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_1A4]
call	sub_43FC60
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44962B

loc_448EEE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_1A8], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_6C], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_1AC], ecx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_6C]
call	sub_404540
mov	[ebp+var_68], eax
mov	edx, [ebp+var_68]
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_448F7D
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	loc_44962B
jmp	loc_449154

loc_448F7D:
lea	ecx, [ebp+var_2B]
mov	[ebp+var_1B0], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+arg_4]
mov	[ebp+var_8C], edx
lea	eax, [ebp+var_81]
mov	[ebp+var_1B4], eax
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_8C]
call	sub_404540
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_80]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_449004
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44962B

loc_449004:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_1A4]
jnz	short loc_44904E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	loc_44962B

loc_44904E:
lea	edx, [ebp+var_2D]
mov	[ebp+var_1B8], edx
mov	[ebp+var_4], 8
mov	eax, [ebp+var_10]
mov	[ebp+var_AC], eax
lea	ecx, [ebp+var_A1]
mov	[ebp+var_1BC], ecx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_AC]
call	sub_404540
mov	[ebp+var_A8], eax
mov	edx, [ebp+var_A8]
mov	[ebp+var_A0], edx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_A0]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_449123
mov	eax, [ebp+arg_4]
call	sub_403040
cmp	dword ptr [eax], 0
jnz	short loc_4490FC
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	loc_44962B
jmp	short loc_449121

loc_4490FC:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	loc_44962B

loc_449121:
jmp	short loc_449154

loc_449123:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_1A4]
call	sub_43FC60
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_C0]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44962B

loc_449154:
jmp	loc_44962B

loc_449159:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_1A4]
jnz	loc_449253
lea	eax, [ebp+var_3A]
mov	[ebp+var_1C0], eax
mov	[ebp+var_4], 0Ch
mov	eax, [ebp+var_1A4]
call	sub_403040
mov	ecx, [eax]
mov	[ebp+var_D0], ecx
lea	edx, [ebp+var_C5]
mov	[ebp+var_1C4], edx
mov	byte ptr [ebp+var_4], 0Dh
mov	eax, [ebp+var_D0]
call	sub_404540
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	[ebp+var_C4], eax
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C4]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_44921D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1A4]
call	sub_403040
mov	eax, [eax]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	loc_44962B
jmp	short loc_44924E

loc_44921D:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_1A4]
call	sub_43FC60
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_E4]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44962B

loc_44924E:
jmp	loc_44962B

loc_449253:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_18]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	eax, [ebp+var_45]
mov	[ebp+var_1C8], eax
mov	[ebp+var_4], 10h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_F4], ecx
lea	edx, [ebp+var_E9]
mov	[ebp+var_1CC], edx
mov	byte ptr [ebp+var_4], 11h
mov	eax, [ebp+var_F4]
call	sub_404540
mov	[ebp+var_F0], eax
mov	eax, [ebp+var_F0]
mov	[ebp+var_E8], eax
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	ecx, [ebp+var_E8]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_12]
test	eax, eax
jz	loc_44936E
lea	ecx, [ebp+var_47]
mov	[ebp+var_1D0], ecx
mov	[ebp+var_4], 14h
mov	edx, [ebp+var_58]
or	edx, 1
mov	[ebp+var_58], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_114], eax
lea	ecx, [ebp+var_109]
mov	[ebp+var_1D4], ecx
mov	[ebp+var_4], 15h
mov	eax, [ebp+var_114]
call	sub_404540
mov	[ebp+var_110], eax
mov	edx, [ebp+var_110]
mov	[ebp+var_108], edx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_108]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_44936E
mov	[ebp+var_1D8], 1
jmp	short loc_449378

loc_44936E:
mov	[ebp+var_1D8], 0

loc_449378:
mov	al, byte ptr [ebp+var_1D8]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4493A2
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4493A2:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_449408
mov	eax, [ebp+var_18]
call	sub_403040
cmp	dword ptr [eax], 0
jnz	short loc_4493DE
mov	eax, [ebp+var_18]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	loc_44962B
jmp	short loc_449403

loc_4493DE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	loc_44962B

loc_449403:
jmp	loc_44962B

loc_449408:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	edx, [ebp+var_1C]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	eax, [ebp+var_12]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	short loc_4494AA
lea	edx, [ebp+var_48]
mov	[ebp+var_1DC], edx
mov	[ebp+var_4], 18h
mov	eax, [ebp+arg_4]
mov	[ebp+var_134], eax
lea	ecx, [ebp+var_129]
mov	[ebp+var_1E0], ecx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_134]
call	sub_404540
mov	[ebp+var_130], eax
mov	edx, [ebp+var_130]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_128]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4494AA:
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	loc_449550
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	loc_449550
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_1A4]
jz	short loc_449544
lea	edx, [ebp+var_4A]
mov	[ebp+var_1E4], edx
mov	[ebp+var_4], 1Ch
mov	eax, [ebp+var_58]
or	eax, 2
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_168], ecx
lea	edx, [ebp+var_15D]
mov	[ebp+var_1E8], edx
mov	[ebp+var_4], 1Dh
mov	eax, [ebp+var_168]
call	sub_404540
mov	[ebp+var_164], eax
mov	eax, [ebp+var_164]
mov	[ebp+var_15C], eax
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	ecx, [ebp+var_15C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_449550

loc_449544:
mov	[ebp+var_1EC], 1
jmp	short loc_44955A

loc_449550:
mov	[ebp+var_1EC], 0

loc_44955A:
mov	cl, byte ptr [ebp+var_1EC]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_449584
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_449584:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4495E1
mov	eax, [ebp+arg_4]
call	sub_403040
cmp	dword ptr [eax], 0
jnz	short loc_4495BD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	short loc_44962B
jmp	short loc_4495DF

loc_4495BD:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_1A4]
call	sub_448CA0
mov	eax, [ebp+arg_0]
jmp	short loc_44962B

loc_4495DF:
jmp	short loc_44962B

loc_4495E1:
movzx	eax, [ebp+var_12]
movzx	ecx, [ebp+var_1D]
cmp	eax, ecx
jnz	short loc_4495FF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_44962B
jmp	short loc_44962B

loc_4495FF:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_1A4]
call	sub_43FC60
mov	[ebp+var_1A0], eax
mov	ecx, [ebp+var_1A0]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_44962B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_448E70 endp

align 10h


; Attributes: bp-based frame

sub_449640 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_449640
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_444100
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_44F5C0
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4496DB

loc_44969D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_4496BE
mov	edx, [ebp+var_3C]
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4496BE:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4496DB
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4496DB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_449640 endp

align 10h


; Attributes: noreturn bp-based	frame

sub_4496F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset aBasic_string ; "basic_string"
call	sub_77EC70
sub_4496F0 endp

mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_449710 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_5B=	byte ptr -5Bh
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_42=	word ptr -42h
var_40=	word ptr -40h
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_68], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	loc_4498B6
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_68]
mov	eax, [edx+14h]
xor	ecx, ecx
cmp	eax, [ebp+var_68]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_449758
mov	eax, [ebp+var_68]
mov	ecx, [eax+10h]
sub	ecx, [ebp+var_68]
mov	edx, 10h
sub	edx, ecx
mov	[ebp+var_6C], edx
jmp	short loc_449766

loc_449758:
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	edx, [eax]
sub	edx, [ecx+10h]
mov	[ebp+var_6C], edx

loc_449766:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_6C]
jb	loc_449837
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_44D3A0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_34], edx
xor	eax, eax
mov	[ebp+var_2D], al
lea	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_68]
add	ecx, 14h
call	sub_444CF0
mov	[ebp+var_C], eax
mov	eax, [ebp+var_68]
mov	ecx, [eax+10h]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_68]
mov	eax, [edx+14h]
mov	[ebp+var_3C], eax
push	0
lea	ecx, [ebp+var_3D]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_451F70
add	esp, 14h
mov	[ebp+var_10], eax
push	0
lea	edx, [ebp+var_3E]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_451F70
add	esp, 14h
mov	[ebp+var_10], eax
xor	eax, eax
mov	byte ptr [ebp+var_42+1], al
mov	cl, byte ptr [ebp+var_42+1]
mov	byte ptr [ebp+var_40+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_42], dl
mov	al, byte ptr [ebp+var_42]
mov	byte ptr [ebp+var_40], al
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx],	0
mov	ecx, [ebp+var_68]
call	sub_4392A0
mov	edx, [ebp+var_C]
add	edx, [ebp+var_8]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_50]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_10]
mov	[edx+10h], eax
mov	ecx, [ebp+var_68]
mov	edx, [ebp+var_C]
mov	[ecx+14h], edx
jmp	short loc_4498B6

loc_449837:
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 1
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_68]
mov	eax, [edx+10h]
add	eax, 1
mov	[ebp+var_58], eax
push	0
lea	ecx, [ebp+var_51]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_451F70
add	esp, 14h
mov	edx, [ebp+var_68]
mov	eax, [edx+10h]
add	eax, [ebp+var_4]
mov	[ebp+var_60], eax
xor	ecx, ecx
mov	[ebp+var_5B], cl
mov	dl, [ebp+var_5B]
mov	[ebp+var_59], dl
xor	eax, eax
mov	[ebp+var_5C], al
mov	cl, [ebp+var_5C]
mov	[ebp+var_5A], cl
mov	edx, [ebp+var_60]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_68]
mov	ecx, [eax+10h]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_68]
mov	eax, [edx+10h]
add	eax, [ebp+var_4]
mov	ecx, [ebp+var_68]
mov	[ecx+10h], eax

loc_4498B6:
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	8
sub_449710 endp

align 10h


; Attributes: bp-based frame

sub_4498C0 proc	near

var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_148= dword ptr -148h
var_141= byte ptr -141h
var_140= dword ptr -140h
var_118= dword ptr -118h
var_111= byte ptr -111h
var_110= dword ptr -110h
var_FC=	dword ptr -0FCh
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E0=	dword ptr -0E0h
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_84=	dword ptr -84h
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4498C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1C0h
mov	[ebp+var_184], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_184]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_449B7E
mov	edx, [ebp+var_184]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44993E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_184]
call	sub_44F7B0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_449FF6

loc_44993E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_188], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_18C], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_4499C5
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	loc_449FF6
jmp	loc_449B79

loc_4499C5:
lea	ecx, [ebp+var_2B]
mov	[ebp+var_190], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+arg_4]
mov	[ebp+var_84], edx
lea	eax, [ebp+var_7D]
mov	[ebp+var_194], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_84]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_7C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_449A3B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_449FF6

loc_449A3B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_184]
jnz	short loc_449A85
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	loc_449FF6

loc_449A85:
lea	edx, [ebp+var_2D]
mov	[ebp+var_198], edx
mov	[ebp+var_4], 8
mov	eax, [ebp+var_10]
mov	[ebp+var_A0], eax
lea	ecx, [ebp+var_99]
mov	[ebp+var_19C], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_A0]
add	edx, 10h
mov	[ebp+var_98], edx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_98]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_449B48
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_449B21
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	loc_449FF6
jmp	short loc_449B46

loc_449B21:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	loc_449FF6

loc_449B46:
jmp	short loc_449B79

loc_449B48:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_184]
call	sub_44F7B0
mov	[ebp+var_B4], eax
mov	edx, [ebp+var_B4]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_449FF6

loc_449B79:
jmp	loc_449FF6

loc_449B7E:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_184]
jnz	loc_449C62
lea	ecx, [ebp+var_3A]
mov	[ebp+var_1A0], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_184]
mov	eax, [edx+0Ch]
mov	[ebp+var_C0], eax
lea	ecx, [ebp+var_B9]
mov	[ebp+var_1A4], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_C0]
add	edx, 10h
mov	[ebp+var_B8], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_B8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_39]
test	edx, edx
jz	short loc_449C2C
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_184]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	loc_449FF6
jmp	short loc_449C5D

loc_449C2C:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_184]
call	sub_44F7B0
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_449FF6

loc_449C5D:
jmp	loc_449FF6

loc_449C62:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_18]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	eax, [ebp+var_45]
mov	[ebp+var_1A8], eax
mov	[ebp+var_4], 10h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_E0], ecx
lea	edx, [ebp+var_D9]
mov	[ebp+var_1AC], edx
mov	byte ptr [ebp+var_4], 11h
mov	eax, [ebp+var_E0]
add	eax, 10h
mov	[ebp+var_D8], eax
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	ecx, [ebp+var_D8]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_12]
test	eax, eax
jz	short loc_449D5D
lea	ecx, [ebp+var_47]
mov	[ebp+var_1B0], ecx
mov	[ebp+var_4], 14h
mov	edx, [ebp+var_58]
or	edx, 1
mov	[ebp+var_58], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_FC], eax
lea	ecx, [ebp+var_F5]
mov	[ebp+var_1B4], ecx
mov	[ebp+var_4], 15h
mov	edx, [ebp+var_FC]
add	edx, 10h
mov	[ebp+var_F4], edx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_F4]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_449D5D
mov	[ebp+var_1B8], 1
jmp	short loc_449D67

loc_449D5D:
mov	[ebp+var_1B8], 0

loc_449D67:
mov	al, byte ptr [ebp+var_1B8]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_449D91
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_449D91:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_449DF3
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_449DC9
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	loc_449FF6
jmp	short loc_449DEE

loc_449DC9:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	loc_449FF6

loc_449DEE:
jmp	loc_449FF6

loc_449DF3:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_449E87
lea	eax, [ebp+var_48]
mov	[ebp+var_1BC], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_118], ecx
lea	edx, [ebp+var_111]
mov	[ebp+var_1C0], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_118]
add	eax, 10h
mov	[ebp+var_110], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_110]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_449E87:
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	loc_449F1F
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	loc_449F1F
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_184]
jz	short loc_449F13
lea	eax, [ebp+var_4A]
mov	[ebp+var_1C4], eax
mov	[ebp+var_4], 1Ch
mov	ecx, [ebp+var_58]
or	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_148], edx
lea	eax, [ebp+var_141]
mov	[ebp+var_1C8], eax
mov	[ebp+var_4], 1Dh
mov	ecx, [ebp+var_148]
add	ecx, 10h
mov	[ebp+var_140], ecx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	edx, [ebp+var_140]
push	edx
mov	eax, [ebp+arg_8]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_449F1F

loc_449F13:
mov	[ebp+var_1CC], 1
jmp	short loc_449F29

loc_449F1F:
mov	[ebp+var_1CC], 0

loc_449F29:
mov	dl, byte ptr [ebp+var_1CC]
mov	[ebp+var_49], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 2
jz	short loc_449F53
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_449F53:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jz	short loc_449FAC
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_449F88
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	short loc_449FF6
jmp	short loc_449FAA

loc_449F88:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_184]
call	sub_44F610
mov	eax, [ebp+arg_0]
jmp	short loc_449FF6

loc_449FAA:
jmp	short loc_449FF6

loc_449FAC:
movzx	edx, [ebp+var_12]
movzx	eax, [ebp+var_1D]
cmp	edx, eax
jnz	short loc_449FCA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_449FF6
jmp	short loc_449FF6

loc_449FCA:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_184]
call	sub_44F7B0
mov	[ebp+var_180], eax
mov	eax, [ebp+var_180]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_449FF6:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4498C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44A010(int, int, void	*)
sub_44A010 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_4], eax
jmp	short loc_44A032

loc_44A029:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_44A032:
cmp	[ebp+var_4], 0
jle	short loc_44A05C
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+arg_8]
push	ecx		; void *
call	sub_443430
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 28h
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
add	eax, 28h
mov	[ebp+arg_8], eax
jmp	short loc_44A029

loc_44A05C:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_44A010 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44A070(void *)
sub_44A070 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44A070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_44A0B7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_44A0B7:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44A070 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44A0D0(void *)
sub_44A0D0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44A0D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
call	sub_10FB7C0
xor	edx, edx
and	edx, 1
jz	short loc_44A133
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_44A133:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44A0D0 endp

align 10h


; Attributes: bp-based frame

sub_44A150 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_44A3EA
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44A1CE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_44FC50
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44A845

loc_44A1CE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_44A250
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	loc_44A845
jmp	loc_44A3E5

loc_44A250:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_44A2BB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44A845

loc_44A2BB:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_44A305
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	loc_44A845

loc_44A305:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_44A3B4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44A38D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	loc_44A845
jmp	short loc_44A3B2

loc_44A38D:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	loc_44A845

loc_44A3B2:
jmp	short loc_44A3E5

loc_44A3B4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_44FC50
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44A845

loc_44A3E5:
jmp	loc_44A845

loc_44A3EA:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_44A4C9
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_44A493
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	loc_44A845
jmp	short loc_44A4C4

loc_44A493:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_44FC50
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44A845

loc_44A4C4:
jmp	loc_44A845

loc_44A4C9:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_44A5BA
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_44A5BA
mov	[ebp+var_120], 1
jmp	short loc_44A5C4

loc_44A5BA:
mov	[ebp+var_120], 0

loc_44A5C4:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_44A5EE
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_44A5EE:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_44A650
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44A626
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	loc_44A845
jmp	short loc_44A64B

loc_44A626:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	loc_44A845

loc_44A64B:
jmp	loc_44A845

loc_44A650:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_44A6DF
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44A6DF:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_44A76E
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_44A76E
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_44A762
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_44A76E

loc_44A762:
mov	[ebp+var_134], 1
jmp	short loc_44A778

loc_44A76E:
mov	[ebp+var_134], 0

loc_44A778:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_44A7A2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44A7A2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_44A7FB
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_44A7D7
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	short loc_44A845
jmp	short loc_44A7F9

loc_44A7D7:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_44FAB0
mov	eax, [ebp+arg_0]
jmp	short loc_44A845

loc_44A7F9:
jmp	short loc_44A845

loc_44A7FB:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_44A819
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_44A845
jmp	short loc_44A845

loc_44A819:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_44FC50
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_44A845:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_44A150 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44A860(void *)
sub_44A860 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44A860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_4341F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_44A8B6
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_44A8B6:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44A860 endp

align 10h


; Attributes: bp-based frame

sub_44A8D0 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_44AB73
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44A94E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_450010
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD

loc_44A94E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_60]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_29]
test	ecx, ecx
jz	short loc_44A9D3
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD
jmp	loc_44AB6E

loc_44A9D3:
lea	eax, [ebp+var_2B]
mov	[ebp+var_D8], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_74], ecx
lea	edx, [ebp+var_6D]
mov	[ebp+var_DC], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_74]
add	eax, 10h
mov	[ebp+var_6C], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_44AA41
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD

loc_44AA41:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_CC]
jnz	short loc_44AA8B
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD

loc_44AA8B:
lea	eax, [ebp+var_2D]
mov	[ebp+var_E0], eax
mov	[ebp+var_4], 8
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_79]
mov	[ebp+var_E4], edx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_80]
add	eax, 10h
mov	[ebp+var_78], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_44AB3D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44AB16
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD
jmp	short loc_44AB3B

loc_44AB16:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD

loc_44AB3B:
jmp	short loc_44AB6E

loc_44AB3D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_450010
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD

loc_44AB6E:
jmp	loc_44AFDD

loc_44AB73:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_44AC55
lea	ecx, [ebp+var_3A]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_EC], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_44AC1F
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD
jmp	short loc_44AC50

loc_44AC1F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_450010
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD

loc_44AC50:
jmp	loc_44AFDD

loc_44AC55:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_18]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	edx, [ebp+var_45]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_A0], eax
lea	ecx, [ebp+var_99]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 11h
mov	edx, [ebp+var_A0]
add	edx, 10h
mov	[ebp+var_98], edx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_98]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jz	short loc_44AD4C
lea	edx, [ebp+var_47]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 14h
mov	eax, [ebp+var_58]
or	eax, 1
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_AC], ecx
lea	edx, [ebp+var_A5]
mov	[ebp+var_FC], edx
mov	[ebp+var_4], 15h
mov	eax, [ebp+var_AC]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_44AD4C
mov	[ebp+var_100], 1
jmp	short loc_44AD56

loc_44AD4C:
mov	[ebp+var_100], 0

loc_44AD56:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_44AD80
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_44AD80:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_44ADE2
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44ADB8
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD
jmp	short loc_44ADDD

loc_44ADB8:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	loc_44AFDD

loc_44ADDD:
jmp	loc_44AFDD

loc_44ADE2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_44AE74
lea	eax, [ebp+var_48]
mov	[ebp+var_104], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_108], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_1D], cl
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44AE74:
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	loc_44AF06
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_44AF06
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_CC]
jz	short loc_44AEFA
lea	edx, [ebp+var_4A]
mov	[ebp+var_10C], edx
mov	[ebp+var_4], 1Ch
mov	eax, [ebp+var_58]
or	eax, 2
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_C4], ecx
lea	edx, [ebp+var_BD]
mov	[ebp+var_110], edx
mov	[ebp+var_4], 1Dh
mov	eax, [ebp+var_C4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_BC]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_44AF06

loc_44AEFA:
mov	[ebp+var_114], 1
jmp	short loc_44AF10

loc_44AF06:
mov	[ebp+var_114], 0

loc_44AF10:
mov	al, byte ptr [ebp+var_114]
mov	[ebp+var_49], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 2
jz	short loc_44AF3A
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44AF3A:
movzx	edx, [ebp+var_49]
test	edx, edx
jz	short loc_44AF93
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44AF6F
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	short loc_44AFDD
jmp	short loc_44AF91

loc_44AF6F:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_44FE70
mov	eax, [ebp+arg_0]
jmp	short loc_44AFDD

loc_44AF91:
jmp	short loc_44AFDD

loc_44AF93:
movzx	eax, [ebp+var_12]
movzx	ecx, [ebp+var_1D]
cmp	eax, ecx
jnz	short loc_44AFB1
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_44AFDD
jmp	short loc_44AFDD

loc_44AFB1:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_450010
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_44AFDD:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_44A8D0 endp

align 10h


; Attributes: bp-based frame

sub_44AFF0 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_44B28A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44B06E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_450790
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5

loc_44B06E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_44B0F0
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5
jmp	loc_44B285

loc_44B0F0:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_44B15B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5

loc_44B15B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_44B1A5
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5

loc_44B1A5:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_44B254
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44B22D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5
jmp	short loc_44B252

loc_44B22D:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5

loc_44B252:
jmp	short loc_44B285

loc_44B254:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450790
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5

loc_44B285:
jmp	loc_44B6E5

loc_44B28A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_44B369
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_44B333
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5
jmp	short loc_44B364

loc_44B333:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450790
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5

loc_44B364:
jmp	loc_44B6E5

loc_44B369:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_44B45A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_44B45A
mov	[ebp+var_120], 1
jmp	short loc_44B464

loc_44B45A:
mov	[ebp+var_120], 0

loc_44B464:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_44B48E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_44B48E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_44B4F0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44B4C6
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5
jmp	short loc_44B4EB

loc_44B4C6:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	loc_44B6E5

loc_44B4EB:
jmp	loc_44B6E5

loc_44B4F0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_44B57F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44B57F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_44B60E
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_44B60E
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_44B602
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_44B60E

loc_44B602:
mov	[ebp+var_134], 1
jmp	short loc_44B618

loc_44B60E:
mov	[ebp+var_134], 0

loc_44B618:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_44B642
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44B642:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_44B69B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_44B677
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	short loc_44B6E5
jmp	short loc_44B699

loc_44B677:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4505F0
mov	eax, [ebp+arg_0]
jmp	short loc_44B6E5

loc_44B699:
jmp	short loc_44B6E5

loc_44B69B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_44B6B9
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_44B6E5
jmp	short loc_44B6E5

loc_44B6B9:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450790
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_44B6E5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_44AFF0 endp

align 10h


; Attributes: bp-based frame

sub_44B700 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_34]
jnz	short loc_44B75C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_44D480
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_44B84F

loc_44B75C:
cmp	[ebp+arg_10], 0
jnz	short loc_44B7BF
cmp	[ebp+arg_C], 0
jnz	short loc_44B7B6
lea	edx, [ebp+var_12]
mov	[ebp+var_38], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_3C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_44B7BF

loc_44B7B6:
mov	[ebp+var_40], 1
jmp	short loc_44B7C6

loc_44B7BF:
mov	[ebp+var_40], 0

loc_44B7C6:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_44B7ED
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_44B7ED:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_44B823
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_34]
call	sub_44D480
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_44B821
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_44B821:
jmp	short loc_44B84F

loc_44B823:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_44D480
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_44B84F
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_44B84F:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_34]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_34]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_44B700 endp

align 10h


; Attributes: bp-based frame

sub_44B8A0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_44B8FC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_44D530
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_44B9F2

loc_44B8FC:
cmp	[ebp+arg_10], 0
jnz	short loc_44B962
cmp	[ebp+arg_C], 0
jnz	short loc_44B959
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+arg_8]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44B962

loc_44B959:
mov	[ebp+var_30], 1
jmp	short loc_44B969

loc_44B962:
mov	[ebp+var_30], 0

loc_44B969:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_44B990
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_44B990:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_44B9C6
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_44D530
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_44B9C4
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_44B9C4:
jmp	short loc_44B9F2

loc_44B9C6:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_44D530
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_44B9F2
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_44B9F2:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_44B8A0 endp

align 10h


; Attributes: bp-based frame

sub_44BA40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= qword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+edx+54h]
mov	[ebp+var_1], cl
mov	dword ptr [ebp+var_10],	0
mov	dword ptr [ebp+var_10+4], 0
jmp	short loc_44BA7A

loc_44BA68:
mov	edx, dword ptr [ebp+var_10]
add	edx, 1
mov	eax, dword ptr [ebp+var_10+4]
adc	eax, 0
mov	dword ptr [ebp+var_10],	edx
mov	dword ptr [ebp+var_10+4], eax

loc_44BA7A:
mov	ecx, dword ptr [ebp+var_10+4]
cmp	ecx, dword ptr [ebp+arg_8+4]
jg	short loc_44BABB
jl	short loc_44BA8C
mov	edx, dword ptr [ebp+var_10]
cmp	edx, dword ptr [ebp+arg_8]
jnb	short loc_44BABB

loc_44BA8C:
mov	[ebp+var_14], 0FFFFFFFFh
movzx	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_44CF60
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44BAB9
xor	al, al
jmp	short loc_44BABD

loc_44BAB9:
jmp	short loc_44BA68

loc_44BABB:
mov	al, 1

loc_44BABD:
mov	esp, ebp
pop	ebp
retn
sub_44BA40 endp

align 10h


; Attributes: bp-based frame

sub_44BAD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44BAD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_4], 0
jz	short loc_44BB29
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_155DF3C
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], offset unk_155DF44
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx

loc_44BB29:
push	0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_438CD0
mov	[ebp+var_4], 1
push	0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_43D300
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	dword ptr [edx+ecx], offset off_14462E4
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
add	ecx, [edx+4]
call	sub_43BA90
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_44BAD0 endp

align 10h


; Attributes: bp-based frame

sub_44BBA0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_44BBD2

loc_44BBC9:
mov	ecx, [ebp+var_24]
sub	ecx, 18h
mov	[ebp+var_24], ecx

loc_44BBD2:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44BC02
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 18h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_63CCE0
jmp	short loc_44BBC9

loc_44BC02:
mov	esp, ebp
pop	ebp
retn
sub_44BBA0 endp

align 10h


; Attributes: bp-based frame

sub_44BC10 proc	near

var_101= byte ptr -101h
var_100= dword ptr -100h
var_F9=	byte ptr -0F9h
var_F8=	byte ptr -0F8h
var_F7=	byte ptr -0F7h
var_F6=	byte ptr -0F6h
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	byte ptr -40h
var_23=	byte ptr -23h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44BC10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0F8h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_22]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_443FB0
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	[ebp+var_EC], edx
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_23]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_443FB0
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_F0]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_21], 1
mov	byte ptr [ebp+var_4], 1
call	nullsub_1
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	edx, [ebp+var_21]
test	edx, edx
jz	loc_44BDE0

loc_44BCD7:
lea	eax, [ebp+var_60]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_14]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+var_60]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	loc_44BD9A
lea	ecx, [ebp+var_68]
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_68]
setnz	al
mov	[ebp+var_F6], al
movzx	ecx, [ebp+var_F6]
test	ecx, ecx
jz	short loc_44BD9A
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_6C]
push	ecx
mov	edx, [ebp+var_70]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_44BD8D
mov	ecx, [ebp+var_10]
lea	eax, [ebp+var_20]
call	sub_4046E0
lea	eax, [ebp+var_20]
call	sub_405E90
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_77E410
add	esp, 0Ch
mov	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
jmp	short loc_44BD95

loc_44BD8D:
lea	eax, [ebp+var_18]
call	sub_405E90

loc_44BD95:
jmp	loc_44BCD7

loc_44BD9A:
lea	edx, [ebp+var_78]
mov	[ebp+var_74], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_78]
setnz	cl
mov	[ebp+var_F7], cl
movzx	edx, [ebp+var_F7]
test	edx, edx
jz	short loc_44BDDB
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_77E410
add	esp, 0Ch

loc_44BDDB:
jmp	loc_44BFDF

loc_44BDE0:
lea	eax, [ebp+var_80]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_14]
mov	eax, [ebp+var_7C]
call	sub_4046E0
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+var_80]
setnz	dl
mov	[ebp+var_F8], dl
movzx	eax, [ebp+var_F8]
test	eax, eax
jz	loc_44BF48
lea	ecx, [ebp+var_88]
mov	[ebp+var_84], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_84]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_88]
setnz	al
mov	[ebp+var_F9], al
movzx	ecx, [ebp+var_F9]
test	ecx, ecx
jz	loc_44BF48
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_8C]
push	ecx
mov	edx, [ebp+var_90]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	loc_44BF3B
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_A4], ecx
lea	edx, [ebp+var_B8]
mov	[ebp+var_A8], edx
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_A8]
call	sub_4046E0
mov	eax, [ebp+var_A4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_439CE0
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B8]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_B0]
mov	[ecx], edx
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_AC]
mov	[eax+4], ecx
mov	edx, [ebp+var_AC]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+var_B4]
mov	[ecx+4], edx
mov	ecx, [ebp+var_B4]
lea	eax, [ebp+var_40]
call	sub_4046E0
lea	eax, [ebp+var_40]
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_100]
mov	edx, [ecx]
mov	[ebp+var_18], edx
jmp	short loc_44BF43

loc_44BF3B:
lea	eax, [ebp+var_18]
call	sub_405E90

loc_44BF43:
jmp	loc_44BDE0

loc_44BF48:
lea	eax, [ebp+var_C0]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_BC]
call	sub_4046E0
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_C0]
setnz	dl
mov	[ebp+var_101], dl
movzx	eax, [ebp+var_101]
test	eax, eax
jz	short loc_44BFD7
push	ecx
mov	ecx, esp
mov	[ebp+var_48], esp
mov	[ebp+var_C4], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_C4]
call	sub_4046E0
push	ecx
mov	edx, esp
mov	[ebp+var_4C], esp
mov	[ebp+var_C8], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_C8]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_50], esp
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_CC]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
call	sub_4511B0

loc_44BFD7:
mov	ecx, [ebp+arg_4]
call	sub_42E8C0

loc_44BFDF:
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44BC10 endp

align 10h


; Attributes: bp-based frame

sub_44C000 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_44C032

loc_44C029:
mov	ecx, [ebp+var_24]
sub	ecx, 28h
mov	[ebp+var_24], ecx

loc_44C032:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44C062
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 28h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_4054E0
jmp	short loc_44C029

loc_44C062:
mov	esp, ebp
pop	ebp
retn
sub_44C000 endp

align 10h


; Attributes: bp-based frame

sub_44C070 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_451200
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_44C070 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44C0B0(void *, int)
sub_44C0B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44C0B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	54h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_44C12D
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_4]
mov	ax, [edx]
mov	[ecx], ax
mov	ecx, [ebp+arg_4]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 2Ch
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 2Ch
call	sub_403400
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
jmp	short loc_44C134

loc_44C12D:
mov	[ebp+var_18], 0

loc_44C134:
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44C0B0 endp

align 10h


; Attributes: bp-based frame

sub_44C150 proc	near

var_6C=	dword ptr -6Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5BC4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_6C], ecx
jmp	short loc_44C181

loc_44C178:
mov	edx, [ebp+var_6C]
add	edx, 40h
mov	[ebp+var_6C], edx

loc_44C181:
mov	eax, [ebp+var_6C]
cmp	eax, [ebp+arg_4]
jz	short loc_44C1C3
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_6C]
add	ecx, 1Ch
call	sub_436CF0
xor	edx, edx
and	edx, 1
jz	short loc_44C1C1
mov	eax, [ebp+var_6C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_44C1C1:
jmp	short loc_44C178

loc_44C1C3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44C150 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44C1E0(void *, int)
sub_44C1E0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44C1E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_44C24D
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_14]
call	sub_44D600
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_40], eax
jmp	short loc_44C254

loc_44C24D:
mov	[ebp+var_40], 0

loc_44C254:
mov	ecx, [ebp+var_40]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44C1E0 endp

align 10h


; Attributes: bp-based frame

sub_44C270 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_451290
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_44C270 endp

align 10h


; Attributes: bp-based frame

sub_44C2A0 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_44C53A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44C31E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_450CE0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44C995

loc_44C31E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_44C3A0
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	loc_44C995
jmp	loc_44C535

loc_44C3A0:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_44C40B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44C995

loc_44C40B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_44C455
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	loc_44C995

loc_44C455:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_44C504
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44C4DD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	loc_44C995
jmp	short loc_44C502

loc_44C4DD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	loc_44C995

loc_44C502:
jmp	short loc_44C535

loc_44C504:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450CE0
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44C995

loc_44C535:
jmp	loc_44C995

loc_44C53A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_44C619
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_44C5E3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	loc_44C995
jmp	short loc_44C614

loc_44C5E3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450CE0
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_44C995

loc_44C614:
jmp	loc_44C995

loc_44C619:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_44C70A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_44C70A
mov	[ebp+var_120], 1
jmp	short loc_44C714

loc_44C70A:
mov	[ebp+var_120], 0

loc_44C714:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_44C73E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_44C73E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_44C7A0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_44C776
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	loc_44C995
jmp	short loc_44C79B

loc_44C776:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	loc_44C995

loc_44C79B:
jmp	loc_44C995

loc_44C7A0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_44C82F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44C82F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_44C8BE
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_44C8BE
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_44C8B2
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_44C8BE

loc_44C8B2:
mov	[ebp+var_134], 1
jmp	short loc_44C8C8

loc_44C8BE:
mov	[ebp+var_134], 0

loc_44C8C8:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_44C8F2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_44C8F2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_44C94B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_44C927
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	short loc_44C995
jmp	short loc_44C949

loc_44C927:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_450B40
mov	eax, [ebp+arg_0]
jmp	short loc_44C995

loc_44C949:
jmp	short loc_44C995

loc_44C94B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_44C969
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_44C995
jmp	short loc_44C995

loc_44C969:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_450CE0
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_44C995:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_44C2A0 endp

align 10h


; Attributes: bp-based frame

sub_44C9B0 proc	near

arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
call	sub_4512D0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_44C9B0 endp

align 10h


; Attributes: bp-based frame

sub_44C9E0 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405D30
movzx	eax, al
test	eax, eax
jz	short loc_44CA5D
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+5Ch]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_44CA31
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+5Ch]
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_4363A0

loc_44CA31:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jnz	short loc_44CA5B
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_438B50

loc_44CA5B:
jmp	short loc_44CA71

loc_44CA5D:
push	4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_438B50

loc_44CA71:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405D30
mov	esp, ebp
pop	ebp
retn
sub_44C9E0 endp

align 10h


; Attributes: bp-based frame

sub_44CA90 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405D30
movzx	eax, al
test	eax, eax
jz	short loc_44CB21
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jnz	short loc_44CADB
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_438B50

loc_44CADB:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+5Ch]
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 0
jz	short loc_44CB0D
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx+5Ch]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
call	sub_4363A0

loc_44CB0D:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405D30
jmp	short loc_44CB23
jmp	short loc_44CB23

loc_44CB21:
xor	al, al

loc_44CB23:
mov	esp, ebp
pop	ebp
retn
sub_44CA90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44CB30(void *, int)
sub_44CB30 proc	near

var_70=	dword ptr -70h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_44CB90
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_44D0C0
mov	[ebp+var_70], eax
jmp	short loc_44CB97

loc_44CB90:
mov	[ebp+var_70], 0

loc_44CB97:
mov	eax, [ebp+var_70]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44CB30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_44CBC0(void *, int)
sub_44CBC0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_44CC2D
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
jmp	short loc_44CC34

loc_44CC2D:
mov	[ebp+var_1C], 0

loc_44CC34:
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44CBC0 endp

align 10h


; Attributes: bp-based frame

sub_44CC50 proc	near

var_30=	dword ptr -30h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44CC50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_30]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	edx, [ebp+var_30]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 1Ch
call	sub_44D270
mov	[ebp+var_4], 0
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	cl, [eax+34h]
mov	[edx+34h], cl
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	eax, [eax+3Ch]
mov	[edx+3Ch], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_44CC50 endp

align 10h


; Attributes: bp-based frame

sub_44CD30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4326C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	eax, [edx+24h]
mov	[ecx+24h], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_44CD30 endp

align 10h


; Attributes: bp-based frame

sub_44CDB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_440360
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+34h]
mov	[edx+34h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	eax, [eax+3Ch]
mov	[edx+3Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_44CDB0 endp

align 10h


; Attributes: bp-based frame

sub_44CE50 proc	near

var_34=	dword ptr -34h
var_30=	word ptr -30h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44CE50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_44D7A0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	byte ptr [ebp+var_30+1], al
mov	cl, byte ptr [ebp+var_30+1]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	byte ptr [ebp+var_30], dl
mov	al, byte ptr [ebp+var_30]
mov	[ebp+var_2E], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+10h], eax
jmp	short loc_44CEDD

loc_44CEAC:
cmp	[ebp+var_14], 0
jz	short loc_44CEC7
mov	ecx, 1
imul	ecx, 14h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_44CEC7:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44CEE4
retn

loc_44CEDD:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44CEE4:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_44CE50 endp

align 10h


; Attributes: bp-based frame

sub_44CF10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+70h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+6Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+68h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_10]
mov	byte ptr [eax+36h], 0
mov	esp, ebp
pop	ebp
retn
sub_44CF10 endp

align 10h


; Attributes: bp-based frame

sub_44CF60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax+14h]
cmp	edx, [ecx+18h]
jnb	short loc_44CFA2
mov	eax, [ebp+var_C]
mov	ecx, [eax+14h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	al, [ebp+arg_0]
mov	[edx], al
mov	ecx, [ebp+var_C]
mov	edx, [ecx+14h]
add	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+14h], edx
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx]
mov	[ebp+var_10], edx
jmp	short loc_44CFBD

loc_44CFA2:
movzx	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+30h]
call	edx
mov	[ebp+var_10], eax

loc_44CFBD:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_44CF60 endp

align 10h


; Attributes: bp-based frame

sub_44CFD0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
mov	[ebp+var_8], edx
mov	[ebp+var_C], 0FFFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_406EE0
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_44D00C
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_44D012

loc_44D00C:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_44D012:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_44D025
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_44D025:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 0FFFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_406EE0
mov	[ebp+var_1C], eax
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_44D062
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_44D068

loc_44D062:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_44D068:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_44D078
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_44D0A9

loc_44D078:
mov	[ebp+var_20], 0FFFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_406EE0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_44D09D
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_44D0A3

loc_44D09D:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_44D0A3:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_44D0A9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_44CFD0 endp

align 10h


; Attributes: bp-based frame

sub_44D0C0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_34=	dword ptr -34h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D0C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_64], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_443FB0
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_6C]
push	edx
mov	ecx, [ebp+var_64]
call	sub_594460
mov	byte ptr [ebp+var_4], 2
call	nullsub_1
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	edx, [ebp+var_58]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	edx, [ebp+var_14]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_5C], eax
xor	ecx, ecx
mov	[ebp+var_29], cl
lea	edx, [ebp+var_29]
push	edx
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_5C]
push	ecx
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_58]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	ecx, [ebp+var_64]
call	sub_452300
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_44D0C0 endp

align 10h


; Attributes: bp-based frame

sub_44D1A0 proc	near

var_3C=	dword ptr -3Ch
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D1A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_44D6A0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_4523A0
add	esp, 0Ch
jmp	short loc_44D22B

loc_44D208:
mov	eax, 1
mov	ecx, [ebp+var_14] ; void *
call	sub_405CA0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44D232
retn

loc_44D22B:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44D232:
mov	eax, [ebp+var_14]
call	sub_4044C0
mov	dword ptr [eax], 0
mov	eax, [ebp+var_14]
call	sub_403040
mov	dword ptr [eax], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_44D1A0 endp

align 10h


; Attributes: bp-based frame

sub_44D270 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D270
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_443FB0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	[ebp+var_4C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_44]
call	sub_44D700
mov	byte ptr [ebp+var_4], 2
call	nullsub_1
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_44]
mov	[edx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_44D270 endp

align 10h


; Attributes: bp-based frame

sub_44D330 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 3FFFFFFFh
jbe	short loc_44D35D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_44D35D:
cmp	[ebp+arg_0], 0
jz	short loc_44D38E
mov	edx, [ebp+arg_0]
shl	edx, 2
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
shr	ecx, 2
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_44D395

loc_44D38E:
mov	[ebp+var_1C], 0

loc_44D395:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_44D330 endp

align 10h


; Attributes: bp-based frame

sub_44D3A0 proc	near

var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx+14h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
sub	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	[ebp+var_14], 0FFFFFFFFh
mov	[ebp+var_18], 0FFFFFFFFh
lea	edx, [ebp+var_14]
push	edx
lea	eax, [ebp+var_18]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
sub	ecx, 1
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_44D3FD
mov	ecx, [ebp+var_40]
call	sub_4496F0

loc_44D3FD:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [eax]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx+1]
mov	[ebp+var_4], ecx
mov	[ebp+var_28], 0FFFFFFFFh
mov	[ebp+var_2C], 0FFFFFFFFh
lea	edx, [ebp+var_28]
push	edx
lea	eax, [ebp+var_2C]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
sub	ecx, 1
cmp	[ebp+var_4], ecx
ja	short loc_44D449
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jnb	short loc_44D46F

loc_44D449:
mov	[ebp+var_34], 0FFFFFFFFh
mov	[ebp+var_38], 0FFFFFFFFh
lea	eax, [ebp+var_34]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
call	sub_407A30
add	esp, 8
mov	edx, [eax]
sub	edx, 1
mov	[ebp+var_4], edx

loc_44D46F:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_44D3A0 endp

align 10h


; Attributes: bp-based frame

sub_44D480 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4C7870
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_452030
add	esp, 8
jmp	short loc_44D4FF

loc_44D4CE:
cmp	[ebp+var_14], 0
jz	short loc_44D4E9
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_44D4E9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44D506
retn

loc_44D4FF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44D506:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_44D480 endp



; Attributes: bp-based frame

sub_44D530 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_38], ecx
push	1
mov	ecx, [ebp+var_38]
call	sub_44D7A0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
push	ecx
call	sub_406640
add	esp, 4
mov	[ebp+var_2D], al
call	sub_406640
mov	[ebp+var_2E], al
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	cx, [eax]
mov	[edx], cx
jmp	short loc_44D5C8

loc_44D597:
cmp	[ebp+var_14], 0
jz	short loc_44D5B2
mov	edx, 1
imul	edx, 14h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_44D5B2:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44D5CF
retn

loc_44D5C8:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44D5CF:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_44D530 endp

align 10h


; Attributes: bp-based frame

sub_44D600 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D600
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 24h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
add	eax, 24h
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_20]
call	sub_407980
mov	[ebp+var_4], 0
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ecx], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_44D800
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_44D600 endp

align 10h


; Attributes: bp-based frame

sub_44D6A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 2AAAAAAh
jbe	short loc_44D6C8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_44D6C8:
cmp	[ebp+arg_0], 0
jz	short loc_44D6EE
mov	ecx, [ebp+arg_0]
imul	ecx, 60h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_44D6F5

loc_44D6EE:
mov	[ebp+var_18], 0

loc_44D6F5:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_44D6A0 endp

align 10h


; Attributes: bp-based frame

sub_44D700 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D700
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_44D330
mov	ecx, [ebp+var_30]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_30]
mov	[eax+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_44D700 endp

align 10h


; Attributes: bp-based frame

sub_44D7A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 0CCCCCCCh
jbe	short loc_44D7C8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_44D7C8:
cmp	[ebp+arg_0], 0
jz	short loc_44D7EE
mov	ecx, [ebp+arg_0]
imul	ecx, 14h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_44D7F5

loc_44D7EE:
mov	[ebp+var_18], 0

loc_44D7F5:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_44D7A0 endp

align 10h


; Attributes: bp-based frame

sub_44D800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], ecx
mov	ecx, [ebp+arg_0]
call	sub_407DA0
movzx	eax, al
test	eax, eax
jz	short loc_44D84A
mov	esi, [ebp+arg_0]
mov	ecx, 8
mov	edi, [ebp+var_4]
rep movsd
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+20h]
sub	eax, [edx+24h]
sar	eax, 1
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*2]
mov	eax, [ebp+var_4]
mov	[eax+20h], edx
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	[ecx+24h], edx
jmp	short loc_44D876

loc_44D84A:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+24h]
mov	[eax+24h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+20h]
mov	[eax+20h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+24h], 0

loc_44D876:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_44D800 endp

align 10h


; Attributes: bp-based frame

sub_44D880 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44D880
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
jmp	short loc_44D8CC

loc_44D8BA:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_44D8CC:
cmp	[ebp+var_18], 0
jle	short loc_44D8E4
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_405ED0
add	esp, 8
jmp	short loc_44D8BA

loc_44D8E4:
jmp	short loc_44D90C

loc_44D8E6:
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	nullsub_1
add	esp, 8
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44D913
retn

loc_44D90C:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44D913:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_44D880 endp

align 10h


; Attributes: bp-based frame

sub_44D930 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44DE40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_10], eax
jmp	short loc_44D969

loc_44D960:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_44D969:
cmp	[ebp+var_10], 0
jle	loc_44DA6C
movzx	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44D9A7
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
jmp	loc_44DB5F

loc_44D9A7:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
movzx	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44D9E4
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
jmp	loc_44DB5F

loc_44D9E4:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx
movzx	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_44DA21
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
jmp	loc_44DB5F

loc_44DA21:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
movzx	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44DA5E
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
jmp	loc_44DB5F

loc_44DA5E:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
jmp	loc_44D960

loc_44DA6C:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_34], ecx
cmp	[ebp+var_34], 1
jz	loc_44DB07
cmp	[ebp+var_34], 2
jz	short loc_44DACD
cmp	[ebp+var_34], 3
jz	short loc_44DA90
jmp	loc_44DB38

loc_44DA90:
movzx	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44DAC4
mov	edx, [ebp+arg_0]
mov	[ebp+var_24], edx
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
jmp	loc_44DB5F

loc_44DAC4:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax

loc_44DACD:
movzx	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44DAFE
mov	ecx, [ebp+arg_0]
mov	[ebp+var_28], ecx
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
jmp	short loc_44DB5F

loc_44DAFE:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx

loc_44DB07:
movzx	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_44DB38
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
jmp	short loc_44DB5F

loc_44DB38:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
jmp	short loc_44DB5F
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh

loc_44DB5F:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44D930 endp

align 10h


; Attributes: bp-based frame

sub_44DB70 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44E0D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+arg_8]
sar	ecx, 2
mov	[ebp+var_10], ecx
jmp	short loc_44DBAF

loc_44DBA6:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_44DBAF:
cmp	[ebp+var_10], 0
jle	loc_44DCF6
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 1
mov	[ebp+var_18], ecx
movzx	edx, [ebp+arg_C]
mov	eax, [ebp+var_18]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44DBFE
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44DE24

loc_44DBFE:
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
sub	eax, 1
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+arg_C]
mov	edx, [ebp+var_1C]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44DC4C
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44DE24

loc_44DC4C:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
sub	edx, 1
mov	[ebp+var_20], edx
movzx	eax, [ebp+arg_C]
mov	ecx, [ebp+var_20]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_44DC9A
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44DE24

loc_44DC9A:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 1
mov	[ebp+var_24], ecx
movzx	edx, [ebp+arg_C]
mov	eax, [ebp+var_24]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44DCE8
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44DE24

loc_44DCE8:
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_44DBA6

loc_44DCF6:
mov	edx, [ebp+arg_4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
sub	eax, [ebp+arg_8]
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 1
jz	loc_44DDB9
cmp	[ebp+var_38], 2
jz	short loc_44DD6E
cmp	[ebp+var_38], 3
jz	short loc_44DD20
jmp	loc_44DDFB

loc_44DD20:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx
movzx	eax, [ebp+arg_C]
mov	ecx, [ebp+var_2C]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_44DD65
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44DE24

loc_44DD65:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_44DD6E:
mov	eax, [ebp+arg_4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
sub	ecx, 1
mov	[ebp+var_30], ecx
movzx	edx, [ebp+arg_C]
mov	eax, [ebp+var_30]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44DDB0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_44DE24

loc_44DDB0:
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_44DDB9:
mov	edx, [ebp+arg_4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
sub	eax, 1
mov	[ebp+var_34], eax
movzx	ecx, [ebp+arg_C]
mov	edx, [ebp+var_34]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44DDFB
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_44DE24

loc_44DDFB:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_44DE24
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh

loc_44DE24:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44DB70 endp

align 10h


; Attributes: bp-based frame

sub_44DE40 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44DE40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_10], eax
jmp	short loc_44DE79

loc_44DE70:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_44DE79:
cmp	[ebp+var_10], 0
jle	loc_44DFA4
movzx	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44DEC1
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
jmp	loc_44E0B5

loc_44DEC1:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
movzx	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44DF08
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
jmp	loc_44E0B5

loc_44DF08:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
movzx	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44DF4F
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
jmp	loc_44E0B5

loc_44DF4F:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
movzx	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44DF96
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
jmp	loc_44E0B5

loc_44DF96:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
jmp	loc_44DE70

loc_44DFA4:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
mov	[ebp+var_34], edx
cmp	[ebp+var_34], 1
jz	loc_44E053
cmp	[ebp+var_34], 2
jz	short loc_44E00F
cmp	[ebp+var_34], 3
jz	short loc_44DFC8
jmp	loc_44E08E

loc_44DFC8:
movzx	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
neg	edx
sbb	edx, edx
add	edx, 1
movzx	eax, dl
test	eax, eax
jz	short loc_44E006
mov	ecx, [ebp+arg_0]
mov	[ebp+var_24], ecx
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
jmp	loc_44E0B5

loc_44E006:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx

loc_44E00F:
movzx	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
neg	edx
sbb	edx, edx
add	edx, 1
movzx	eax, dl
test	eax, eax
jz	short loc_44E04A
mov	ecx, [ebp+arg_0]
mov	[ebp+var_28], ecx
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
jmp	short loc_44E0B5

loc_44E04A:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx

loc_44E053:
movzx	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
neg	edx
sbb	edx, edx
add	edx, 1
movzx	eax, dl
test	eax, eax
jz	short loc_44E08E
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
jmp	short loc_44E0B5

loc_44E08E:
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
jmp	short loc_44E0B5
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh

loc_44E0B5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44DE40 endp

align 10h


; Attributes: bp-based frame

sub_44E0D0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44E0D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+arg_8]
sar	ecx, 2
mov	[ebp+var_10], ecx
jmp	short loc_44E10F

loc_44E106:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_44E10F:
cmp	[ebp+var_10], 0
jle	loc_44E27E
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 1
mov	[ebp+var_18], ecx
movzx	edx, [ebp+arg_C]
mov	eax, [ebp+var_18]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44E168
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44E3CA

loc_44E168:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 1
mov	[ebp+var_1C], ecx
movzx	edx, [ebp+arg_C]
mov	eax, [ebp+var_1C]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44E1C0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44E3CA

loc_44E1C0:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
sub	ecx, 1
mov	[ebp+var_20], ecx
movzx	edx, [ebp+arg_C]
mov	eax, [ebp+var_20]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44E218
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44E3CA

loc_44E218:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 1
mov	[ebp+var_24], ecx
movzx	edx, [ebp+arg_C]
mov	eax, [ebp+var_24]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44E270
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44E3CA

loc_44E270:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_44E106

loc_44E27E:
mov	eax, [ebp+arg_4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
sub	ecx, [ebp+arg_8]
mov	[ebp+var_38], ecx
cmp	[ebp+var_38], 1
jz	loc_44E355
cmp	[ebp+var_38], 2
jz	short loc_44E300
cmp	[ebp+var_38], 3
jz	short loc_44E2A8
jmp	loc_44E3A1

loc_44E2A8:
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
sub	eax, 1
mov	[ebp+var_2C], eax
movzx	ecx, [ebp+arg_C]
mov	edx, [ebp+var_2C]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_44E2F7
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_44E3CA

loc_44E2F7:
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_44E300:
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
sub	eax, 1
mov	[ebp+var_30], eax
movzx	ecx, [ebp+arg_C]
mov	edx, [ebp+var_30]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_44E34C
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_44E3CA

loc_44E34C:
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_44E355:
mov	edx, [ebp+arg_4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
sub	eax, 1
mov	[ebp+var_34], eax
movzx	ecx, [ebp+arg_C]
mov	edx, [ebp+var_34]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_44E3A1
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_44E3CA

loc_44E3A1:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_44E3CA
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh

loc_44E3CA:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44E0D0 endp

align 10h


; Attributes: bp-based frame

sub_44E3E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44E3E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 1
mov	[ebp+var_18], ecx
jmp	short loc_44E42E

loc_44E41C:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 2
mov	[ebp+var_14], eax

loc_44E42E:
cmp	[ebp+var_18], 0
jle	short loc_44E446
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_405EC0
add	esp, 8
jmp	short loc_44E41C

loc_44E446:
jmp	short loc_44E46E

loc_44E448:
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	nullsub_1
add	esp, 8
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44E475
retn

loc_44E46E:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44E475:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_44E3E0 endp

align 10h


; Attributes: bp-based frame

sub_44E490 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+arg_8]
sar	ecx, 1
sar	ecx, 2
mov	[ebp+var_10], ecx
jmp	short loc_44E4D1

loc_44E4C8:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_44E4D1:
cmp	[ebp+var_10], 0
jle	loc_44E5F8
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 2
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
lea	edx, [ebp+arg_C]
call	sub_405350
movzx	edx, al
test	edx, edx
jz	short loc_44E518
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44E70C

loc_44E518:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 2
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
lea	edx, [ebp+arg_C]
call	sub_405350
movzx	edx, al
test	edx, edx
jz	short loc_44E55E
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44E70C

loc_44E55E:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
sub	ecx, 2
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
lea	edx, [ebp+arg_C]
call	sub_405350
movzx	edx, al
test	edx, edx
jz	short loc_44E5A4
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44E70C

loc_44E5A4:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 2
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
lea	edx, [ebp+arg_C]
call	sub_405350
movzx	edx, al
test	edx, edx
jz	short loc_44E5EA
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44E70C

loc_44E5EA:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_44E4C8

loc_44E5F8:
mov	eax, [ebp+arg_4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
sub	ecx, [ebp+arg_8]
sar	ecx, 1
mov	[ebp+var_38], ecx
cmp	[ebp+var_38], 1
jz	loc_44E6AD
cmp	[ebp+var_38], 2
jz	short loc_44E66A
cmp	[ebp+var_38], 3
jz	short loc_44E624
jmp	loc_44E6E7

loc_44E624:
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
sub	eax, 2
mov	[ebp+var_2C], eax
mov	eax, [ebp+var_2C]
lea	edx, [ebp+arg_C]
call	sub_405350
movzx	ecx, al
test	ecx, ecx
jz	short loc_44E661
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44E70C

loc_44E661:
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	[ebp+arg_4], ecx

loc_44E66A:
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
sub	eax, 2
mov	[ebp+var_30], eax
mov	eax, [ebp+var_30]
lea	edx, [ebp+arg_C]
call	sub_405350
movzx	ecx, al
test	ecx, ecx
jz	short loc_44E6A4
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_44E70C

loc_44E6A4:
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	[ebp+arg_4], ecx

loc_44E6AD:
mov	edx, [ebp+arg_4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
sub	eax, 2
mov	[ebp+var_34], eax
mov	eax, [ebp+var_34]
lea	edx, [ebp+arg_C]
call	sub_405350
movzx	ecx, al
test	ecx, ecx
jz	short loc_44E6E7
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_44E70C

loc_44E6E7:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_44E70C
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1

loc_44E70C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44E490 endp

align 10h


; Attributes: bp-based frame

sub_44E720 proc	near

var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_18=	byte ptr  20h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
movzx	edx, [ebp+arg_18]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_14]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_28], esp
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_18]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_2C], esp
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
lea	eax, [ebp+var_10]
push	eax
call	sub_4519B0
add	esp, 18h
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_18]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_44E7CE
mov	ecx, [ebp+arg_4]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+var_30]
jmp	short loc_44E818
jmp	short loc_44E80C

loc_44E7CE:
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_405C00
add	esp, 8
neg	eax
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_1C]
lea	ecx, [eax+edx*2]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_34], edx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+var_34]
jmp	short loc_44E818

loc_44E80C:
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1

loc_44E818:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44E720 endp

align 10h


; Attributes: bp-based frame

sub_44E830 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	al, [ebp+var_D]
mov	[ebp+var_19], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_19]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
push	ecx
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_8]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_451CD0
add	esp, 18h
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44E830 endp



; Attributes: bp-based frame

sub_44E8B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44E8B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 1
sar	eax, 2
mov	[ebp+var_10], eax
jmp	short loc_44E8EB

loc_44E8E2:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_44E8EB:
cmp	[ebp+var_10], 0
jle	loc_44EA32
lea	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44E93A
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_14]
jmp	loc_44EB6D

loc_44E93A:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
lea	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44E988
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_18]
jmp	loc_44EB6D

loc_44E988:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
lea	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44E9D6
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_1C]
jmp	loc_44EB6D

loc_44E9D6:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
lea	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44EA24
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_20]
jmp	loc_44EB6D

loc_44EA24:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
jmp	loc_44E8E2

loc_44EA32:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 1
mov	[ebp+var_34], edx
cmp	[ebp+var_34], 1
jz	loc_44EAF4
cmp	[ebp+var_34], 2
jz	short loc_44EAA6
cmp	[ebp+var_34], 3
jz	short loc_44EA58
jmp	loc_44EB36

loc_44EA58:
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406860
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
movzx	eax, dl
test	eax, eax
jz	short loc_44EA9D
mov	ecx, [ebp+arg_0]
mov	[ebp+var_24], ecx
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_24]
jmp	loc_44EB6D

loc_44EA9D:
mov	edx, [ebp+arg_0]
add	edx, 2
mov	[ebp+arg_0], edx

loc_44EAA6:
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406860
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
movzx	eax, dl
test	eax, eax
jz	short loc_44EAEB
mov	ecx, [ebp+arg_0]
mov	[ebp+var_28], ecx
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_28]
jmp	loc_44EB6D

loc_44EAEB:
mov	edx, [ebp+arg_0]
add	edx, 2
mov	[ebp+arg_0], edx

loc_44EAF4:
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406860
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
movzx	eax, dl
test	eax, eax
jz	short loc_44EB36
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_2C]
jmp	short loc_44EB6D

loc_44EB36:
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_30]
jmp	short loc_44EB6D
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1

loc_44EB6D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44E8B0 endp

align 10h


; Attributes: bp-based frame

sub_44EB80 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44EB80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+arg_8]
sar	ecx, 1
sar	ecx, 2
mov	[ebp+var_10], ecx
jmp	short loc_44EBC1

loc_44EBB8:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_44EBC1:
cmp	[ebp+var_10], 0
jle	loc_44ED4C
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 2
mov	[ebp+var_18], ecx
lea	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44EC21
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44EEC2

loc_44EC21:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 2
mov	[ebp+var_1C], ecx
lea	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_1C]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44EC80
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44EEC2

loc_44EC80:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
sub	ecx, 2
mov	[ebp+var_20], ecx
lea	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_20]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44ECDF
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44EEC2

loc_44ECDF:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 2
mov	[ebp+var_24], ecx
lea	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_24]
push	eax
call	sub_406860
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_44ED3E
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44EEC2

loc_44ED3E:
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_44EBB8

loc_44ED4C:
mov	eax, [ebp+arg_4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
sub	ecx, [ebp+arg_8]
sar	ecx, 1
mov	[ebp+var_38], ecx
cmp	[ebp+var_38], 1
jz	loc_44EE36
cmp	[ebp+var_38], 2
jz	short loc_44EDD7
cmp	[ebp+var_38], 3
jz	short loc_44ED78
jmp	loc_44EE89

loc_44ED78:
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
sub	eax, 2
mov	[ebp+var_2C], eax
lea	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
call	sub_406860
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_44EDCE
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44EEC2

loc_44EDCE:
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	[ebp+arg_4], ecx

loc_44EDD7:
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
sub	eax, 2
mov	[ebp+var_30], eax
lea	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
call	sub_406860
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_44EE2D
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_44EEC2

loc_44EE2D:
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	[ebp+arg_4], ecx

loc_44EE36:
mov	edx, [ebp+arg_4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
sub	eax, 2
mov	[ebp+var_34], eax
lea	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_34]
push	edx
call	sub_406860
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_44EE89
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_44EEC2

loc_44EE89:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_44EEC2
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_C]
call	nullsub_1

loc_44EEC2:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_44EB80 endp



; Attributes: bp-based frame

sub_44EED0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44EED0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_14], 0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
mov	eax, [edx+34h]
call	eax
mov	ecx, [ebp+var_18]
add	ecx, 1Ch
push	ecx
lea	ecx, [ebp+var_10]
call	sub_77FF00
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 1Ch
call	sub_77FF50
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_77FF00
mov	ecx, [ebp+var_14]
or	ecx, 1
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_10]
call	sub_77FF40
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_44EED0 endp

align 10h


; Attributes: bp-based frame

sub_44EF60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
call	sub_406EB0
mov	esi, eax
add	esi, 0FFFh
call	sub_406EB0
mov	ecx, eax
mov	eax, esi
xor	edx, edx
div	ecx
mov	esi, eax
call	sub_406EB0
imul	esi, eax
xor	edx, edx
mov	[ebp+var_8], esi
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
push	0
mov	ecx, [ebp+var_C]
call	sub_445F10
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_44EF60 endp

align 10h


; Attributes: bp-based frame

sub_44EFB0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_44F00C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4514C0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_44F0FE

loc_44F00C:
cmp	[ebp+arg_10], 0
jnz	short loc_44F06E
cmp	[ebp+arg_C], 0
jnz	short loc_44F065
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_44F06E

loc_44F065:
mov	[ebp+var_30], 1
jmp	short loc_44F075

loc_44F06E:
mov	[ebp+var_30], 0

loc_44F075:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
and	eax, 1
jz	short loc_44F09C
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_44F09C:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_44F0D2
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4514C0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_44F0D0
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx

loc_44F0D0:
jmp	short loc_44F0FE

loc_44F0D2:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4514C0
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_44F0FE
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax

loc_44F0FE:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_24]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_44EFB0 endp

align 10h


; Attributes: bp-based frame

sub_44F150 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_44F181:
cmp	[ebp+var_1C], 0
jz	short loc_44F1F9
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_40]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_11], cl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_44F1E8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_74], ecx
jmp	short loc_44F1F1

loc_44F1E8:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_74], eax

loc_44F1F1:
mov	ecx, [ebp+var_74]
mov	[ebp+var_1C], ecx
jmp	short loc_44F181

loc_44F1F9:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_44F29B
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_50]
setz	cl
mov	[ebp+var_75], cl
movzx	edx, [ebp+var_75]
test	edx, edx
jz	short loc_44F28C
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_68]
call	sub_44EFB0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_44F348
jmp	short loc_44F29B

loc_44F28C:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_44F29B:
lea	edx, [ebp+var_32]
mov	[ebp+var_7C], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_60], eax
lea	ecx, [ebp+var_59]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_60]
add	edx, 10h
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_44F32D
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_68]
call	sub_44EFB0
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_44F348

loc_44F32D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_44F348:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_44F150 endp

align 10h


; Attributes: bp-based frame

sub_44F360 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44F360
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4], 0
mov	[ebp+var_18], 0FFFFFFFFh
movzx	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_451440
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
xor	edx, edx
cmp	ecx, [ebp+var_18]
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
jmp	short loc_44F3CB

loc_44F3BA:
mov	[ebp+var_11], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44F3D2
retn

loc_44F3CB:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44F3D2:
mov	al, [ebp+var_11]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_44F360 endp

align 10h


; Attributes: bp-based frame

sub_44F3F0 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44F3F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_44F429:
cmp	[ebp+var_14], 0
jz	short loc_44F499
lea	eax, [ebp+var_19]
mov	[ebp+var_9C], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
call	sub_404540
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_44F48A
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
call	sub_4044C0
mov	eax, [eax]
mov	[ebp+var_14], eax
jmp	short loc_44F497

loc_44F48A:
mov	eax, [ebp+var_14]
call	sub_403040
mov	ecx, [eax]
mov	[ebp+var_14], ecx

loc_44F497:
jmp	short loc_44F429

loc_44F499:
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_98]
jz	short loc_44F4F3
lea	eax, [ebp+var_59]
mov	[ebp+var_A0], eax
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
call	sub_404540
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_58], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_44F4F3
mov	edx, [ebp+var_98]
mov	[ebp+var_10], edx

loc_44F4F3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_44F3F0 endp

align 10h


; Attributes: bp-based frame

sub_44F510 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44F510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 6
mov	[ebp+var_18], ecx
jmp	short loc_44F562

loc_44F550:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 40h
mov	[ebp+var_14], eax

loc_44F562:
cmp	[ebp+var_18], 0
jle	short loc_44F57A
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4431D0
add	esp, 8
jmp	short loc_44F550

loc_44F57A:
jmp	short loc_44F5A4

loc_44F57C:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44C150
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44F5AB
retn

loc_44F5A4:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44F5AB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_44F510 endp

align 10h


; Attributes: bp-based frame

sub_44F5C0 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_451EB0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_44F5C0 endp

align 10h


; Attributes: bp-based frame

sub_44F610 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_34]
jnz	short loc_44F66C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_444AA0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_44F75F

loc_44F66C:
cmp	[ebp+arg_10], 0
jnz	short loc_44F6CF
cmp	[ebp+arg_C], 0
jnz	short loc_44F6C6
lea	edx, [ebp+var_12]
mov	[ebp+var_38], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_3C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_44F6CF

loc_44F6C6:
mov	[ebp+var_40], 1
jmp	short loc_44F6D6

loc_44F6CF:
mov	[ebp+var_40], 0

loc_44F6D6:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_44F6FD
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_44F6FD:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_44F733
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_34]
call	sub_444AA0
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_44F731
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_44F731:
jmp	short loc_44F75F

loc_44F733:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_444AA0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_44F75F
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_44F75F:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_34]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_34]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_44F610 endp

align 10h


; Attributes: bp-based frame

sub_44F7B0 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44F7B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
mov	[ebp+var_9C], ecx
mov	eax, [ebp+var_9C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_44F7ED:
cmp	[ebp+var_1C], 0
jz	loc_44F87C
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_A0], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_A4], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_44F862
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+8]
mov	[ebp+var_A8], edx
jmp	short loc_44F86E

loc_44F862:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+0Ch]
mov	[ebp+var_A8], ecx

loc_44F86E:
mov	edx, [ebp+var_A8]
mov	[ebp+var_1C], edx
jmp	loc_44F7ED

loc_44F87C:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_44F92A
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+8]
mov	[ebp+var_58], edx
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_60]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_60]
setz	dl
mov	[ebp+var_A9], dl
movzx	eax, [ebp+var_A9]
test	eax, eax
jz	short loc_44F91B
mov	[ebp+var_29], 1
push	0
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_44F610
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_29]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_44F9E7
jmp	short loc_44F92A

loc_44F91B:
mov	edx, [ebp+var_10]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_44F92A:
lea	eax, [ebp+var_32]
mov	[ebp+var_B0], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_10]
mov	[ebp+var_70], ecx
lea	edx, [ebp+var_69]
mov	[ebp+var_B4], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_70]
add	eax, 10h
mov	[ebp+var_68], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_44F9CC
mov	[ebp+var_33], 1
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_44F610
mov	[ebp+var_98], eax
mov	edx, [ebp+var_98]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_33]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_44F9E7

loc_44F9CC:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_39]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_44F9E7:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_44F7B0 endp

align 10h


; Attributes: bp-based frame

sub_44FA00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_44FA00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_44FA54

loc_44FA42:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_14], eax

loc_44FA54:
cmp	[ebp+var_18], 0
jle	short loc_44FA6C
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_452030
add	esp, 8
jmp	short loc_44FA42

loc_44FA6C:
jmp	short loc_44FA94

loc_44FA6E:
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4434E0
add	esp, 8
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_44FA9B
retn

loc_44FA94:
mov	[ebp+var_4], 0FFFFFFFFh

loc_44FA9B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_44FA00 endp

align 10h


; Attributes: bp-based frame

sub_44FAB0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_44FB0C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_451570
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_44FBFA

loc_44FB0C:
cmp	[ebp+arg_10], 0
jnz	short loc_44FB6A
cmp	[ebp+arg_C], 0
jnz	short loc_44FB61
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_44FB6A

loc_44FB61:
mov	[ebp+var_30], 1
jmp	short loc_44FB71

loc_44FB6A:
mov	[ebp+var_30], 0

loc_44FB71:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_44FB98
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_44FB98:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_44FBCE
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_451570
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_44FBCC
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_44FBCC:
jmp	short loc_44FBFA

loc_44FBCE:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_451570
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_44FBFA
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_44FBFA:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_44FAB0 endp

align 10h


; Attributes: bp-based frame

sub_44FC50 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_44FC84:
cmp	[ebp+var_1C], 0
jz	short loc_44FD01
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_44FCEA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_44FCF6

loc_44FCEA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_44FCF6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_44FC84

loc_44FD01:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_44FDA9
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_44FD9A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_44FAB0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_44FE58
jmp	short loc_44FDA9

loc_44FD9A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_44FDA9:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_44FE3D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_44FAB0
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_44FE58

loc_44FE3D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_44FE58:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_44FC50 endp

align 10h


; Attributes: bp-based frame

sub_44FE70 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_44FECC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_444B70
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_44FFBD

loc_44FECC:
cmp	[ebp+arg_10], 0
jnz	short loc_44FF2D
cmp	[ebp+arg_C], 0
jnz	short loc_44FF24
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_44FF2D

loc_44FF24:
mov	[ebp+var_30], 1
jmp	short loc_44FF34

loc_44FF2D:
mov	[ebp+var_30], 0

loc_44FF34:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
and	eax, 1
jz	short loc_44FF5B
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_44FF5B:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_44FF91
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_444B70
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_44FF8F
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx

loc_44FF8F:
jmp	short loc_44FFBD

loc_44FF91:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_444B70
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_44FFBD
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax

loc_44FFBD:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_24]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_44FE70 endp

align 10h


; Attributes: bp-based frame

sub_450010 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_450041:
cmp	[ebp+var_1C], 0
jz	short loc_4500B8
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_40]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4500A7
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_74], ecx
jmp	short loc_4500B0

loc_4500A7:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_74], eax

loc_4500B0:
mov	ecx, [ebp+var_74]
mov	[ebp+var_1C], ecx
jmp	short loc_450041

loc_4500B8:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_45015A
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_50]
setz	cl
mov	[ebp+var_75], cl
movzx	edx, [ebp+var_75]
test	edx, edx
jz	short loc_45014B
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_68]
call	sub_44FE70
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_450206
jmp	short loc_45015A

loc_45014B:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_45015A:
lea	edx, [ebp+var_32]
mov	[ebp+var_7C], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_60], eax
lea	ecx, [ebp+var_59]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_60]
add	edx, 10h
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_4501EB
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_68]
call	sub_44FE70
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_450206

loc_4501EB:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_450206:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_450010 endp

align 10h


; Attributes: bp-based frame

sub_450220 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D11F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_450259:
cmp	[ebp+var_14], 0
jz	loc_45031A
lea	ecx, [ebp+var_41]
call	sub_401EF0
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	[ebp+var_8C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_8C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_40]
call	sub_407810
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_49]
mov	[ebp+var_90], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_48], edx
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_48]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_15], dl
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_40]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_45030C
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_450315

loc_45030C:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_450315:
jmp	loc_450259

loc_45031A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_450220 endp

align 10h


; Attributes: bp-based frame

sub_450330 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	byte ptr -6Ch
var_42=	byte ptr -42h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_450330
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D4h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+var_C8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_450369:
cmp	[ebp+var_14], 0
jz	loc_45042A
lea	ecx, [ebp+var_41]
call	sub_401EF0
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	[ebp+var_D0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_D0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_40]
call	sub_407810
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_75]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_74], edx
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_74]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_15], dl
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_40]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_45041C
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_450425

loc_45041C:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_450425:
jmp	loc_450369

loc_45042A:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C8]
jz	loc_4504D9
lea	ecx, [ebp+var_6D]
call	sub_401EF0
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	[ebp+var_DC], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_DC]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_6C]
call	sub_407810
mov	byte ptr [ebp+var_4], 5
lea	edx, [ebp+var_8D]
mov	[ebp+var_E0], edx
mov	byte ptr [ebp+var_4], 6
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_8C], eax
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_8C]
push	ecx
lea	edx, [ebp+var_6C]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_42], al
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_6C]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6D]
call	nullsub_1
movzx	eax, [ebp+var_42]
test	eax, eax
jz	short loc_4504D9
mov	ecx, [ebp+var_C8]
mov	[ebp+var_10], ecx

loc_4504D9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_450330 endp

align 10h


; Attributes: bp-based frame

sub_4504F0 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4504F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8Ch
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_90]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_450529:
cmp	[ebp+var_14], 0
jz	short loc_450589
lea	eax, [ebp+var_19]
mov	[ebp+var_94], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_45057E
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_450587

loc_45057E:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_450587:
jmp	short loc_450529

loc_450589:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_90]
jz	short loc_4505DB
lea	edx, [ebp+var_55]
mov	[ebp+var_98], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_54], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_4505DB
mov	ecx, [ebp+var_90]
mov	[ebp+var_10], ecx

loc_4505DB:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4504F0 endp

align 10h


; Attributes: bp-based frame

sub_4505F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_45064C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_451640
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_45073A

loc_45064C:
cmp	[ebp+arg_10], 0
jnz	short loc_4506AA
cmp	[ebp+arg_C], 0
jnz	short loc_4506A1
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4506AA

loc_4506A1:
mov	[ebp+var_30], 1
jmp	short loc_4506B1

loc_4506AA:
mov	[ebp+var_30], 0

loc_4506B1:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4506D8
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4506D8:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_45070E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_451640
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_45070C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_45070C:
jmp	short loc_45073A

loc_45070E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_451640
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_45073A
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_45073A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4505F0 endp

align 10h


; Attributes: bp-based frame

sub_450790 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4507C4:
cmp	[ebp+var_1C], 0
jz	short loc_450841
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_45082A
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_450836

loc_45082A:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_450836:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4507C4

loc_450841:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4508E9
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4508DA
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4505F0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_450998
jmp	short loc_4508E9

loc_4508DA:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4508E9:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_45097D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4505F0
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_450998

loc_45097D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_450998:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_450790 endp

align 10h


; Attributes: bp-based frame

sub_4509B0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4509DD:
cmp	[ebp+var_14], 0
jz	short loc_450A3A
lea	eax, [ebp+var_19]
mov	[ebp+var_58], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_450A2F
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_450A38

loc_450A2F:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_450A38:
jmp	short loc_4509DD

loc_450A3A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4509B0 endp

align 10h


; Attributes: bp-based frame

sub_450A50 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CCFD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_450A7D:
cmp	[ebp+var_14], 0
jz	short loc_450AD9
lea	eax, [ebp+var_19]
mov	[ebp+var_2C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_450ACE
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_450AD7

loc_450ACE:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_450AD7:
jmp	short loc_450A7D

loc_450AD9:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_28]
jz	short loc_450B21
lea	ecx, [ebp+var_21]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_20], edx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_450B21
mov	edx, [ebp+var_28]
mov	[ebp+var_10], edx

loc_450B21:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_450A50 endp

align 10h


; Attributes: bp-based frame

sub_450B40 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_450B9C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_451710
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_450C8A

loc_450B9C:
cmp	[ebp+arg_10], 0
jnz	short loc_450BFA
cmp	[ebp+arg_C], 0
jnz	short loc_450BF1
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_450BFA

loc_450BF1:
mov	[ebp+var_30], 1
jmp	short loc_450C01

loc_450BFA:
mov	[ebp+var_30], 0

loc_450C01:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_450C28
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_450C28:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_450C5E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_451710
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_450C5C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_450C5C:
jmp	short loc_450C8A

loc_450C5E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_451710
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_450C8A
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_450C8A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_450B40 endp

align 10h


; Attributes: bp-based frame

sub_450CE0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_450D14:
cmp	[ebp+var_1C], 0
jz	short loc_450D91
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_450D7A
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_450D86

loc_450D7A:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_450D86:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_450D14

loc_450D91:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_450E39
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_450E2A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_450B40
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_450EE8
jmp	short loc_450E39

loc_450E2A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_450E39:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_450ECD
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_450B40
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_450EE8

loc_450ECD:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_450EE8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_450CE0 endp

align 10h


; Attributes: bp-based frame

sub_450F00 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	byte ptr -6Ch
var_42=	byte ptr -42h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_450F00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0DCh
mov	[ebp+var_D0], ecx
mov	eax, [ebp+var_D0]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_450F39:
cmp	[ebp+var_14], 0
jz	loc_451008
lea	ecx, [ebp+var_41]
call	sub_401EF0
mov	[ebp+var_D4], eax
mov	eax, [ebp+var_D4]
mov	[ebp+var_D8], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_D8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_407810
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_75]
mov	[ebp+var_DC], eax
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_14]
call	sub_404540
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	[ebp+var_74], ecx
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_74]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_15], cl
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_40]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	edx, [ebp+var_15]
test	edx, edx
jz	short loc_450FF6
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_14]
call	sub_4044C0
mov	ecx, [eax]
mov	[ebp+var_14], ecx
jmp	short loc_451003

loc_450FF6:
mov	eax, [ebp+var_14]
call	sub_403040
mov	edx, [eax]
mov	[ebp+var_14], edx

loc_451003:
jmp	loc_450F39

loc_451008:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_D0]
jz	loc_4510C3
lea	ecx, [ebp+var_6D]
call	sub_401EF0
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	[ebp+var_E4], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_E4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_6C]
call	sub_407810
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_91]
mov	[ebp+var_E8], ecx
mov	byte ptr [ebp+var_4], 6
mov	eax, [ebp+var_10]
call	sub_404540
mov	[ebp+var_98], eax
mov	edx, [ebp+var_98]
mov	[ebp+var_90], edx
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_90]
push	eax
lea	ecx, [ebp+var_6C]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_42], al
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_6C]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6D]
call	nullsub_1
movzx	edx, [ebp+var_42]
test	edx, edx
jz	short loc_4510C3
mov	eax, [ebp+var_D0]
mov	[ebp+var_10], eax

loc_4510C3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_450F00 endp

align 10h


; Attributes: bp-based frame

sub_4510E0 proc	near

var_1C=	word ptr -1Ch
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4510E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 54h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_451134

loc_451122:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 54h
mov	[ebp+var_14], eax

loc_451134:
cmp	[ebp+var_18], 0
jle	short loc_451166
xor	ecx, ecx
mov	byte ptr [ebp+var_1C+1], cl
mov	dl, byte ptr [ebp+var_1C+1]
mov	[ebp+var_19], dl
xor	eax, eax
mov	byte ptr [ebp+var_1C], al
mov	cl, byte ptr [ebp+var_1C]
mov	[ebp+var_1A], cl
lea	edx, [ebp+var_1A]
push	edx
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_44C0B0
add	esp, 0Ch
jmp	short loc_451122

loc_451166:
jmp	short loc_45118E

loc_451168:
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4435A0
add	esp, 8
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_451195
retn

loc_45118E:
mov	[ebp+var_4], 0FFFFFFFFh

loc_451195:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4510E0 endp

align 10h


; Attributes: bp-based frame

sub_4511B0 proc	near

var_80=	dword ptr -80h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_80], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_80]
call	sub_4521A0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4511B0 endp



; Attributes: bp-based frame

sub_451200 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451200
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
jmp	short loc_451226

loc_45121D:
mov	eax, [ebp+arg_0]
sub	eax, 2Ch
mov	[ebp+arg_0], eax

loc_451226:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_45127A
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 2Ch
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_451278
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_451278:
jmp	short loc_45121D

loc_45127A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_451200 endp

align 10h


; Attributes: bp-based frame

sub_451290 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_452270
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_451290 endp

align 10h


; Attributes: bp-based frame

sub_4512D0 proc	near

var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_1], al
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
call	sub_4056F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_4512D0 endp

align 10h


; Attributes: bp-based frame

sub_451300 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_45131C

loc_451313:
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_8], edx

loc_45131C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_451346
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_42E0F0
xor	edx, edx
and	edx, 1
jz	short loc_451344
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_451344:
jmp	short loc_451313

loc_451346:
mov	esp, ebp
pop	ebp
retn
sub_451300 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_451350(void *, int)
sub_451350 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4513DB
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_14]
add	edx, 28h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+arg_4]
add	edx, 28h
push	edx
mov	ecx, [ebp+var_18]
call	sub_76DEA0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_1C], eax
jmp	short loc_4513E2

loc_4513DB:
mov	[ebp+var_1C], 0

loc_4513E2:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_451350 endp

align 10h


; Attributes: bp-based frame

sub_451400 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451400
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_451400 endp



; Attributes: bp-based frame

sub_451440 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jnb	short loc_451496
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
movzx	edx, byte ptr [ecx-1]
movzx	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, edx
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_451496
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
sub	ecx, 1
mov	edx, [ebp+var_C]
mov	[edx+8], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx]
mov	[ebp+var_10], eax
jmp	short loc_4514B1

loc_451496:
movzx	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_C]
mov	edx, [eax]
mov	ecx, [ebp+var_C]
mov	eax, [edx+24h]
call	eax
mov	[ebp+var_10], eax

loc_4514B1:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_451440 endp

align 10h


; Attributes: bp-based frame

sub_4514C0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4514C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4517E0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_452430
add	esp, 8
jmp	short loc_45153F

loc_45150E:
cmp	[ebp+var_14], 0
jz	short loc_451529
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_451529:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_451546
retn

loc_45153F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_451546:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4514C0 endp



; Attributes: bp-based frame

sub_451570 proc	near

var_3C=	dword ptr -3Ch
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451570
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_451840
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_452B70
add	esp, 0Ch
jmp	short loc_45160C

loc_4515D8:
cmp	[ebp+var_14], 0
jz	short loc_4515F6
mov	ecx, 1
imul	ecx, 90h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4515F6:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_451613
retn

loc_45160C:
mov	[ebp+var_4], 0FFFFFFFFh

loc_451613:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_451570 endp

align 10h


; Attributes: bp-based frame

sub_451640 proc	near

var_3C=	dword ptr -3Ch
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451640
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4518B0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_452C00
add	esp, 0Ch
jmp	short loc_4516D9

loc_4516A8:
cmp	[ebp+var_14], 0
jz	short loc_4516C3
mov	ecx, 1
imul	ecx, 74h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4516C3:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4516E0
retn

loc_4516D9:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4516E0:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_451640 endp

align 10h


; Attributes: bp-based frame

sub_451710 proc	near

var_3C=	dword ptr -3Ch
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451710
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_451910
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_452C90
add	esp, 0Ch
jmp	short loc_4517A9

loc_451778:
cmp	[ebp+var_14], 0
jz	short loc_451793
mov	ecx, 1
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_451793:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4517B0
retn

loc_4517A9:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4517B0:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_451710 endp

align 10h


; Attributes: bp-based frame

sub_4517E0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 4444444h
jbe	short loc_451808
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_451808:
cmp	[ebp+arg_0], 0
jz	short loc_45182E
mov	ecx, [ebp+arg_0]
imul	ecx, 3Ch
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_451835

loc_45182E:
mov	[ebp+var_18], 0

loc_451835:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4517E0 endp

align 10h


; Attributes: bp-based frame

sub_451840 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 1C71C71h
jbe	short loc_451868
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_451868:
cmp	[ebp+arg_0], 0
jz	short loc_451891
mov	ecx, [ebp+arg_0]
imul	ecx, 90h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_451898

loc_451891:
mov	[ebp+var_18], 0

loc_451898:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_451840 endp

align 10h


; Attributes: bp-based frame

sub_4518B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 234F72Ch
jbe	short loc_4518D8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4518D8:
cmp	[ebp+arg_0], 0
jz	short loc_4518FE
mov	ecx, [ebp+arg_0]
imul	ecx, 74h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_451905

loc_4518FE:
mov	[ebp+var_18], 0

loc_451905:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4518B0 endp

align 10h


; Attributes: bp-based frame

sub_451910 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 3FFFFFFh
jbe	short loc_451938
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_451938:
cmp	[ebp+arg_0], 0
jz	short loc_45195E
mov	ecx, [ebp+arg_0]
shl	ecx, 6
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_451965

loc_45195E:
mov	[ebp+var_18], 0

loc_451965:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_451910 endp

align 10h


; Attributes: bp-based frame

sub_451970 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	0
push	0
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	ecx
mov	[ebp+var_C], esp
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_8]
mov	[edx], eax
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_452620
add	esp, 1Ch
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_451970 endp

align 10h


; Attributes: bp-based frame

sub_4519B0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4519F6
mov	eax, [ebp+arg_C]
xor	ecx, ecx
cmp	eax, [ebp+arg_10]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_451A12

loc_4519F6:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_451C1C

loc_451A12:
mov	edx, [ebp+arg_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 2
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+arg_10]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_451A9C

loc_451A33:
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+arg_8]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_451A80
mov	ecx, [ebp+arg_C]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
sub	edx, 2
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
sub	ecx, 2
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_405350
movzx	edx, al
test	edx, edx
jnz	short loc_451A80
mov	eax, [ebp+arg_4]
sub	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_451A33

loc_451A80:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_451C1C

loc_451A9C:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_451AE9
mov	eax, [ebp+arg_C]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 2
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
sub	eax, 2
mov	[ebp+var_28], eax
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_405350
movzx	ecx, al
test	ecx, ecx
jnz	short loc_451AE9
mov	edx, [ebp+arg_4]
sub	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_451A9C

loc_451AE9:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_451B17
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_451C1C

loc_451B17:
mov	edx, [ebp+var_10]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 2
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
xor	eax, eax
cmp	edx, [ebp+arg_8]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_451B5A
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_451C1C

loc_451B5A:
mov	ecx, [ebp+var_14]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_2C]
sub	edx, 2
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
sub	ecx, 2
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_405350
movzx	edx, al
test	edx, edx
jz	short loc_451BF7
mov	eax, [ebp+var_14]
sub	eax, 2
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
xor	edx, edx
cmp	ecx, [ebp+arg_10]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_451BBE
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_451C1C

loc_451BBE:
mov	eax, [ebp+var_18]
sub	eax, 2
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+arg_8]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_451BF2
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_451C1C

loc_451BF2:
jmp	loc_451B5A

loc_451BF7:
mov	eax, [ebp+arg_4]
sub	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_451A9C
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]

loc_451C1C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4519B0 endp

align 10h


; Attributes: bp-based frame

sub_451C30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_4], 0
jmp	short loc_451C5D

loc_451C54:
mov	eax, [ebp+arg_0]
add	eax, 2
mov	[ebp+arg_0], eax

loc_451C5D:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jz	short loc_451CAB
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
jmp	short loc_451C76

loc_451C6D:
mov	eax, [ebp+var_10]
add	eax, 2
mov	[ebp+var_10], eax

loc_451C76:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+arg_C]
jz	short loc_451CA9
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_405350
movzx	edx, al
test	edx, edx
jz	short loc_451CA7
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+var_14]
jmp	short loc_451CC0

loc_451CA7:
jmp	short loc_451C6D

loc_451CA9:
jmp	short loc_451C54

loc_451CAB:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+var_18]

loc_451CC0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_451C30 endp

align 10h


; Attributes: bp-based frame

sub_451CD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_4], 0
jmp	short loc_451CFD

loc_451CF4:
mov	eax, [ebp+arg_4]
sub	eax, 2
mov	[ebp+arg_4], eax

loc_451CFD:
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+arg_8]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_451D66
mov	ecx, [ebp+arg_C]
mov	[ebp+var_10], ecx
jmp	short loc_451D20

loc_451D17:
mov	edx, [ebp+var_10]
add	edx, 2
mov	[ebp+var_10], edx

loc_451D20:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+arg_10]
jz	short loc_451D64
mov	ecx, [ebp+arg_4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
sub	edx, 2
mov	[ebp+var_14], edx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_14]
call	sub_405350
movzx	eax, al
test	eax, eax
jz	short loc_451D62
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_451D7D

loc_451D62:
jmp	short loc_451D17

loc_451D64:
jmp	short loc_451CF4

loc_451D66:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+arg_0]

loc_451D7D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_451CD0 endp

align 10h


; Attributes: bp-based frame

sub_451D90 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_4], 0
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4526B0
add	esp, 14h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_451D90 endp

align 10h


; Attributes: bp-based frame

sub_451E00 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1B10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_451E2D:
cmp	[ebp+var_14], 0
jz	short loc_451E8F
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_1D]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+var_18]
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_451E84
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_451E8D

loc_451E84:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_451E8D:
jmp	short loc_451E2D

loc_451E8F:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_451E00 endp

align 10h


; Attributes: bp-based frame

sub_451EB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451EB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 6
mov	[ebp+var_18], ecx
jmp	short loc_451EF9

loc_451EF0:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_451EF9:
cmp	[ebp+var_18], 0
jle	short loc_451F23
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4431D0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 40h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 40h
mov	[ebp+var_14], eax
jmp	short loc_451EF0

loc_451F23:
mov	eax, [ebp+var_14]
jmp	short loc_451F57

loc_451F28:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_44C150
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_451F57
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_451F57:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_451EB0 endp

align 10h


; Attributes: bp-based frame

sub_451F70 proc	near

var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_1A=	word ptr -1Ah
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_451F70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
jmp	short loc_451FB3

loc_451FAA:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_451FB3:
cmp	[ebp+var_18], 0
jle	short loc_451FED
xor	eax, eax
mov	[ebp+var_1B], al
mov	cl, [ebp+var_1B]
mov	byte ptr [ebp+var_1A+1], cl
xor	edx, edx
mov	[ebp+var_1C], dl
mov	al, [ebp+var_1C]
mov	byte ptr [ebp+var_1A], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx
jmp	short loc_451FAA

loc_451FED:
mov	eax, [ebp+var_14]
jmp	short loc_452014

loc_451FF2:
xor	eax, eax
mov	[ebp+var_1D], al
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_452014
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_452014:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_451F70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_452030(void *, int)
sub_452030 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_452090
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_403400
mov	[ebp+var_1C], eax
jmp	short loc_452097

loc_452090:
mov	[ebp+var_1C], 0

loc_452097:
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452030 endp

align 10h


; Attributes: bp-based frame

sub_4520C0 proc	near

var_1C=	word ptr -1Ch
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4520C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 54h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_45210B

loc_452102:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_45210B:
cmp	[ebp+var_18], 0
jle	short loc_45214F
xor	eax, eax
mov	byte ptr [ebp+var_1C+1], al
mov	cl, byte ptr [ebp+var_1C+1]
mov	[ebp+var_19], cl
xor	edx, edx
mov	byte ptr [ebp+var_1C], dl
mov	al, byte ptr [ebp+var_1C]
mov	[ebp+var_1A], al
lea	ecx, [ebp+var_1A]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_44C0B0
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 54h
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_14]
add	edx, 54h
mov	[ebp+var_14], edx
jmp	short loc_452102

loc_45214F:
mov	eax, [ebp+var_14]
jmp	short loc_452181

loc_452154:
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_4435A0
add	esp, 8
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_452181
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_452181:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4520C0 endp

align 10h


; Attributes: bp-based frame

sub_4521A0 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_4C=	dword ptr -4Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4521A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_15]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_443FB0
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
mov	[ebp+var_84], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_84]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_2C]
call	sub_4046E0
lea	ecx, [ebp+var_14]
call	sub_452AD0
mov	[ebp+var_88], eax
mov	byte ptr [ebp+var_4], 2
call	nullsub_1
lea	edx, [ebp+var_14]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_4524D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_14]
call	sub_42E0F0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4521A0 endp

align 10h


; Attributes: bp-based frame

sub_452270 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452270
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
jmp	short loc_452296

loc_45228D:
mov	eax, [ebp+arg_0]
sub	eax, 40h
mov	[ebp+arg_0], eax

loc_452296:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4522F1
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 40h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_4522EF
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4522EF:
jmp	short loc_45228D

loc_4522F1:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452270 endp

align 10h


; Attributes: bp-based frame

sub_452300 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
jmp	short loc_452313

loc_45230B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_452313:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_45238F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_24]
call	sub_439CE0
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_14]
mov	[edx+4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	loc_45230B

loc_45238F:
mov	esp, ebp
pop	ebp
retn	10h
sub_452300 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4523A0(void *, int)
sub_4523A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4523A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	50h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_45240B
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 28h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 28h
call	sub_403400
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
jmp	short loc_452412

loc_45240B:
mov	[ebp+var_18], 0

loc_452412:
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4523A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_452430(void *, int)
sub_452430 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452430
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4524AB
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
jmp	short loc_4524B2

loc_4524AB:
mov	[ebp+var_1C], 0

loc_4524B2:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452430 endp

align 10h


; Attributes: bp-based frame

sub_4524D0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4524D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_452602
lea	ecx, [ebp+var_E]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_443FB0
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
mov	[ebp+var_94], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_F]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_443FB0
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_9C], ecx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_D], 1
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
movzx	edx, [ebp+var_D]
test	edx, edx
jz	short loc_4525AB
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E410
add	esp, 0Ch
jmp	short loc_452602

loc_4525AB:
push	ecx
mov	edx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_2C], edx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_2C]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
mov	eax, [ebp+var_34]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
call	sub_4511B0
mov	ecx, [ebp+arg_4]
call	sub_42E8C0

loc_452602:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4524D0 endp

align 10h


; Attributes: bp-based frame

sub_452620 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452620
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	cl, [ebp+var_E]
mov	[ebp+var_19], cl
mov	[ebp+var_4], 0
lea	edx, [ebp+var_D]
push	edx
movzx	eax, [ebp+var_19]
push	eax
mov	ecx, [ebp+arg_18]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
push	ecx
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_8]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_452E50
add	esp, 20h
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452620 endp

align 10h


; Attributes: bp-based frame

sub_4526B0 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_35=	byte ptr -35h
var_34=	byte ptr -34h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4526B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
push	esi
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 1
sar	eax, 2
mov	[ebp+var_10], eax
jmp	short loc_4526EC

loc_4526E3:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_4526EC:
cmp	[ebp+var_10], 0
jle	loc_4528E3
mov	edx, [ebp+arg_0]
mov	cx, [edx]
lea	eax, [ebp+var_34]
call	sub_404700
mov	[ebp+var_50], eax
mov	eax, [ebp+var_50]
mov	[ebp+var_54], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_54]
movzx	edx, word ptr [ecx]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	esi, [ebp+arg_C]
call	sub_405770
add	esp, 8
xor	ecx, ecx
cmp	eax, [ebp+arg_C]
setz	cl
mov	[ebp+var_31], cl
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_452767
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_14]
jmp	loc_452AB2

loc_452767:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	cx, [edx]
lea	eax, [ebp+var_38]
call	sub_404700
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	[ebp+var_5C], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_5C]
movzx	edx, word ptr [ecx]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	esi, [ebp+arg_C]
call	sub_405770
add	esp, 8
xor	ecx, ecx
cmp	eax, [ebp+arg_C]
setz	cl
mov	[ebp+var_35], cl
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	edx, [ebp+var_35]
test	edx, edx
jz	short loc_4527E1
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_18]
jmp	loc_452AB2

loc_4527E1:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	cx, [edx]
lea	eax, [ebp+var_3C]
call	sub_404700
mov	[ebp+var_60], eax
mov	eax, [ebp+var_60]
mov	[ebp+var_64], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_64]
movzx	edx, word ptr [ecx]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	esi, [ebp+arg_C]
call	sub_405770
add	esp, 8
xor	ecx, ecx
cmp	eax, [ebp+arg_C]
setz	cl
mov	[ebp+var_39], cl
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	edx, [ebp+var_39]
test	edx, edx
jz	short loc_45285B
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_1C]
jmp	loc_452AB2

loc_45285B:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	cx, [edx]
lea	eax, [ebp+var_40]
call	sub_404700
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
mov	[ebp+var_6C], eax
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_6C]
movzx	edx, word ptr [ecx]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	esi, [ebp+arg_C]
call	sub_405770
add	esp, 8
xor	ecx, ecx
cmp	eax, [ebp+arg_C]
setz	cl
mov	[ebp+var_3D], cl
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_4528D5
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_20]
jmp	loc_452AB2

loc_4528D5:
mov	ecx, [ebp+arg_0]
add	ecx, 2
mov	[ebp+arg_0], ecx
jmp	loc_4526E3

loc_4528E3:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 1
mov	[ebp+var_70], edx
cmp	[ebp+var_70], 1
jz	loc_452A01
cmp	[ebp+var_70], 2
jz	loc_452987
cmp	[ebp+var_70], 3
jz	short loc_45290D
jmp	loc_452A7B

loc_45290D:
mov	eax, [ebp+arg_0]
mov	cx, [eax]
lea	eax, [ebp+var_44]
call	sub_404700
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_78]
movzx	eax, word ptr [edx]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	esi, [ebp+arg_C]
call	sub_405770
add	esp, 8
xor	edx, edx
cmp	eax, [ebp+arg_C]
setz	dl
mov	[ebp+var_41], dl
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	eax, [ebp+var_41]
test	eax, eax
jz	short loc_45297E
mov	ecx, [ebp+arg_0]
mov	[ebp+var_24], ecx
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_24]
jmp	loc_452AB2

loc_45297E:
mov	edx, [ebp+arg_0]
add	edx, 2
mov	[ebp+arg_0], edx

loc_452987:
mov	eax, [ebp+arg_0]
mov	cx, [eax]
lea	eax, [ebp+var_48]
call	sub_404700
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 0Bh
mov	edx, [ebp+var_80]
movzx	eax, word ptr [edx]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	esi, [ebp+arg_C]
call	sub_405770
add	esp, 8
xor	edx, edx
cmp	eax, [ebp+arg_C]
setz	dl
mov	[ebp+var_45], dl
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_4529F8
mov	ecx, [ebp+arg_0]
mov	[ebp+var_28], ecx
mov	[ebp+var_4], 0Ch
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_28]
jmp	loc_452AB2

loc_4529F8:
mov	edx, [ebp+arg_0]
add	edx, 2
mov	[ebp+arg_0], edx

loc_452A01:
mov	eax, [ebp+arg_0]
mov	cx, [eax]
lea	eax, [ebp+var_4C]
call	sub_404700
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_88], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_88]
movzx	eax, word ptr [edx]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	esi, [ebp+arg_C]
call	sub_405770
add	esp, 8
xor	edx, edx
cmp	eax, [ebp+arg_C]
setz	dl
mov	[ebp+var_49], dl
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_452A7B
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 0Eh
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_2C]
jmp	short loc_452AB2

loc_452A7B:
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	eax, [ebp+var_30]
jmp	short loc_452AB2
mov	[ebp+var_4], 10h
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_8]
call	nullsub_1

loc_452AB2:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4526B0 endp

align 10h


; Attributes: bp-based frame

sub_452AD0 proc	near

var_74=	dword ptr -74h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452AD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_74], ecx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_74]
call	sub_594460
mov	[ebp+var_4], 0
push	ecx
mov	ecx, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_452FA0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_452AD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_452B70(void *, int)
sub_452B70 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452B70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	80h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_452BDE
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_444840
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
jmp	short loc_452BE5

loc_452BDE:
mov	[ebp+var_18], 0

loc_452BE5:
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452B70 endp



; Attributes: bp-based frame

; int __cdecl sub_452C00(void *, int)
sub_452C00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452C00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	64h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_452C6B
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_4448F0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
jmp	short loc_452C72

loc_452C6B:
mov	[ebp+var_18], 0

loc_452C72:
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452C00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_452C90(void *, int)
sub_452C90 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452C90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_452CFB
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_403850
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
jmp	short loc_452D02

loc_452CFB:
mov	[ebp+var_18], 0

loc_452D02:
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452C90 endp

align 10h


; Attributes: bp-based frame

sub_452D20 proc	near

var_34=	dword ptr -34h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452D20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2C], eax
mov	[ebp+var_28], eax
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
jmp	short loc_452D67

loc_452D5E:
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx

loc_452D67:
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_C]
jz	short loc_452DB8
mov	eax, [ebp+arg_8]
mov	cl, [eax]
mov	[ebp+var_2D], cl
movzx	eax, [ebp+var_2D]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
movzx	edx, [ebp+var_2D]
mov	ecx, edx
and	ecx, 80000007h
jns	short loc_452D97
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_452D97:
mov	edx, 1
shl	edx, cl
movzx	ecx, byte ptr [ebp+eax+var_2C]
or	ecx, edx
movzx	eax, [ebp+var_2D]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
mov	byte ptr [ebp+eax+var_2C], cl
jmp	short loc_452D5E

loc_452DB8:
jmp	short loc_452DC3

loc_452DBA:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx

loc_452DC3:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_452E1C
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[ebp+var_2E], dl
mov	eax, 1
test	eax, eax
jz	short loc_452E1A
movzx	eax, [ebp+var_2E]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
movzx	edx, byte ptr [ebp+eax+var_2C]
movzx	eax, [ebp+var_2E]
mov	ecx, eax
and	ecx, 80000007h
jns	short loc_452E01
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_452E01:
mov	eax, 1
shl	eax, cl
and	edx, eax
setnz	cl
mov	[ebp+var_2F], cl
movzx	edx, [ebp+var_2F]
test	edx, edx
jz	short loc_452E1A
jmp	short loc_452E1C

loc_452E1A:
jmp	short loc_452DBA

loc_452E1C:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452D20 endp

align 10h


; Attributes: bp-based frame

sub_452E50 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_452E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2C], eax
mov	[ebp+var_28], eax
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
jmp	short loc_452E97

loc_452E8E:
mov	ecx, [ebp+arg_C]
add	ecx, 1
mov	[ebp+arg_C], ecx

loc_452E97:
mov	edx, [ebp+arg_C]
cmp	edx, [ebp+arg_10]
jz	short loc_452EE8
mov	eax, [ebp+arg_C]
mov	cl, [eax]
mov	[ebp+var_2D], cl
movzx	eax, [ebp+var_2D]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
movzx	edx, [ebp+var_2D]
mov	ecx, edx
and	ecx, 80000007h
jns	short loc_452EC7
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_452EC7:
mov	edx, 1
shl	edx, cl
movzx	ecx, byte ptr [ebp+eax+var_2C]
or	ecx, edx
movzx	eax, [ebp+var_2D]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
mov	byte ptr [ebp+eax+var_2C], cl
jmp	short loc_452E8E

loc_452EE8:
jmp	short loc_452EF3

loc_452EEA:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_452EF3:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_452F77
mov	eax, [ebp+arg_4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
sub	ecx, 1
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	al, [edx]
mov	[ebp+var_2E], al
mov	ecx, [ebp+arg_4]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
sub	edx, 1
mov	[ebp+var_38], edx
mov	eax, 1
test	eax, eax
jz	short loc_452F72
movzx	eax, [ebp+var_2E]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
movzx	edx, byte ptr [ebp+eax+var_2C]
movzx	eax, [ebp+var_2E]
mov	ecx, eax
and	ecx, 80000007h
jns	short loc_452F59
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_452F59:
mov	eax, 1
shl	eax, cl
and	edx, eax
setnz	cl
mov	[ebp+var_2F], cl
movzx	edx, [ebp+var_2F]
test	edx, edx
jz	short loc_452F72
jmp	short loc_452F77

loc_452F72:
jmp	loc_452EEA

loc_452F77:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_452E50 endp

align 10h


; Attributes: bp-based frame

sub_452FA0 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_4C]
call	sub_452FF0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_452FA0 endp

align 10h


; Attributes: bp-based frame

sub_452FF0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
jmp	short loc_453003

loc_452FFB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_453003:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_453094
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_30]
call	sub_439CE0
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_20]
mov	[eax+4], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
jmp	loc_452FFB

loc_453094:
mov	esp, ebp
pop	ebp
retn	10h
sub_452FF0 endp

align 10h



sub_4530A0 proc	near
sub	ecx, 10h
jmp	sub_432FE0
sub_4530A0 endp

align 10h


; Attributes: bp-based frame

sub_4530B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6440
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], 0
mov	ecx, [ebp+arg_4]
call	sub_4042A0
push	eax
mov	ecx, [ebp+arg_4]
call	sub_5F52F0
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_10F2230
add	esp, 0Ch
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4530B0 endp

align 10h


; Attributes: bp-based frame

sub_453110 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 70h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	dword ptr [eax], offset	off_155E01C
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_48], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 4
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_4C], eax
mov	eax, [ebp+var_4C]
mov	[ebp+var_50], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_50]
push	ecx
mov	ecx, [ebp+var_40]
add	ecx, 1Ch
call	sub_4022A0
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	eax, [ebp+var_F]
call	nullsub_1
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 6
mov	eax, [ebp+var_40]
add	eax, 34h
push	eax
call	sub_402710
mov	byte ptr [ebp+var_4], 8
lea	ecx, [ebp+var_F]
call	nullsub_1
lea	eax, [ebp+var_10]
call	nullsub_1
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_60], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_40]
add	edx, 3Ch
push	edx
call	sub_402710
mov	byte ptr [ebp+var_4], 0Bh
lea	ecx, [ebp+var_10]
call	nullsub_1
lea	eax, [ebp+var_11]
call	nullsub_1
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	[ebp+var_68], eax
mov	byte ptr [ebp+var_4], 0Ch
mov	ecx, [ebp+var_40]
add	ecx, 44h
push	ecx
call	sub_402710
mov	byte ptr [ebp+var_4], 0Eh
lea	ecx, [ebp+var_11]
call	nullsub_1
lea	ecx, [ebp+var_12]
call	sub_401EF0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 0Fh
mov	eax, [ebp+var_70]
push	eax
mov	ecx, [ebp+var_40]
add	ecx, 4Ch
call	sub_4022A0
mov	byte ptr [ebp+var_4], 11h
lea	ecx, [ebp+var_12]
call	nullsub_1
lea	ecx, [ebp+var_13]
call	sub_401EF0
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 12h
mov	edx, [ebp+var_78]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 64h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 14h
lea	ecx, [ebp+var_13]
call	nullsub_1
lea	eax, [ebp+var_14]
mov	[ebp+var_7C], eax
mov	byte ptr [ebp+var_4], 15h
mov	ecx, [ebp+var_40]
add	ecx, 7Ch
mov	[ebp+var_3C], ecx
xor	edx, edx
mov	[ebp+var_2C], edx
mov	[ebp+var_28], edx
mov	byte ptr [ebp+var_4], 16h
mov	eax, [ebp+var_2C]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_34], ecx
mov	byte ptr [ebp+var_4], 17h
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx], eax
mov	ecx, [ebp+var_34]
mov	[edx+4], ecx
mov	byte ptr [ebp+var_4], 19h
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	[ecx+4], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 1Ch
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_453110 endp

align 10h


; Attributes: bp-based frame

sub_453300 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_453300 endp

align 10h


; Attributes: bp-based frame

sub_4533F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_453510
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4533F0 endp

align 10h


; Attributes: bp-based frame

sub_453450 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_50E7D0
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_4534EB
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_4534EB
mov	ecx, [ebp+var_60]
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4534EB:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_453450 endp

align 10h


; Attributes: bp-based frame

sub_453510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_453555
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_453930
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_453555:
mov	esp, ebp
pop	ebp
retn
sub_453510 endp

align 10h


; Attributes: bp-based frame

sub_453560 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4535B9
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_4535B9
mov	eax, [ebp+var_14]
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4535B9:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_453560 endp

align 10h


; Attributes: bp-based frame

sub_4535E0 proc	near

var_40=	dword ptr -40h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_17=	byte ptr -17h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4535E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_40], ecx
xor	eax, eax
mov	[ebp+var_15], al
mov	cl, [ebp+var_15]
mov	[ebp+var_22], cl
mov	edx, [ebp+var_40]
push	edx
call	sub_44C9E0
add	esp, 4
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	loc_45371A
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_40]
mov	eax, [edx+ecx+0Ch]
and	eax, 2
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	loc_45371A
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_40]
mov	eax, [edx+ecx+58h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+0Ch]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_2C]
jz	short loc_4536DE
mov	[ebp+var_18], 0
mov	al, [ebp+var_16]
mov	[ebp+var_21], al
mov	byte ptr [ebp+var_4], 1
mov	cl, [ebp+var_18]
mov	[ebp+var_17], cl
push	0
push	0
push	0
movzx	edx, [ebp+var_21]
push	edx
movzx	eax, [ebp+var_17]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, dword ptr [ebp+arg_4+4]
push	edx
mov	eax, dword ptr [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_40]
push	edx
call	sub_453ED0
add	esp, 28h
mov	ecx, [ebp+var_40]
mov	[ecx+8], eax
mov	[ecx+0Ch], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
jmp	short loc_453718

loc_4536DE:
mov	[ebp+var_1A], 0
mov	dl, [ebp+var_1A]
mov	[ebp+var_19], dl
push	0
push	0
push	0
movzx	eax, [ebp+var_19]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, dword ptr [ebp+arg_4+4]
push	edx
mov	eax, dword ptr [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_40]
push	edx
call	sub_454250
add	esp, 24h
mov	ecx, [ebp+var_40]
mov	[ecx+8], eax
mov	[ecx+0Ch], edx

loc_453718:
jmp	short loc_45372C

loc_45371A:
push	4
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	ecx, [ebp+var_40]
add	ecx, [eax+4]
call	sub_438B50

loc_45372C:
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_40]
mov	edx, [ecx+eax+0Ch]
and	edx, 2
neg	edx
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_45375D
push	6
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	ecx, [ebp+var_40]
add	ecx, [edx+4]
call	sub_438B50

loc_45375D:
mov	eax, [ebp+var_40]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4535E0 endp

align 10h


; Attributes: bp-based frame

sub_453780 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_2C=	byte ptr -2Ch
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
mov	[ebp+var_44], ecx
xor	eax, eax
mov	[ebp+var_15], al
mov	cl, [ebp+var_15]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_44]
push	edx
call	sub_44C9E0
add	esp, 4
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	eax, [ebp+var_44]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_44]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 0
jz	short loc_453817
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_44]
mov	eax, [edx+ecx+0Ch]
and	eax, 5
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_453817
push	8
push	2
push	0
push	0
lea	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_14]
mov	edx, [eax]
mov	ecx, [ebp+var_14]
mov	eax, [edx+8]
call	eax
lea	ecx, [ebp+var_2C]
mov	[ebp+var_48], ecx
jmp	short loc_453826

loc_453817:
push	0FFFFFFFFh
push	0FFFFFFFFh
lea	ecx, [ebp+var_3C]
call	sub_406AE0
mov	[ebp+var_48], eax

loc_453826:
mov	edx, [ebp+var_48]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_453780 endp

align 10h


; Attributes: bp-based frame

sub_453870 proc	near

var_4C=	dword ptr -4Ch
var_45=	byte ptr -45h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_15], al
mov	cl, [ebp+var_15]
mov	[ebp+var_45], cl
mov	edx, [ebp+var_4C]
push	edx
call	sub_44C9E0
add	esp, 4
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_4C]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4C]
mov	eax, [edx+ecx+0Ch]
and	eax, 5
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_453905
cmp	[ebp+var_14], 0
jz	short loc_453905
push	8
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_14]
mov	edx, [eax]
mov	ecx, [ebp+var_14]
mov	eax, [edx+8]
call	eax

loc_453905:
mov	ecx, [ebp+var_4C]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_453870 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_453930(void	*)
sub_453930 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_453939:
cmp	[ebp+arg_0], 0
jz	short loc_453989
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_453930
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_454B40
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_453981
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_453981:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_453939

loc_453989:
mov	esp, ebp
pop	ebp
retn	4
sub_453930 endp

align 10h


; Attributes: bp-based frame

sub_453990 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_7C]
jz	loc_453AE5
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+8]
sub	eax, [edx]
cmp	[ebp+var_4], eax
jbe	short loc_453A08
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_454BA0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_7C]
call	sub_453D50
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
add	ecx, [ebp+var_8]
mov	edx, [ebp+var_7C]
mov	[edx+8], ecx
jmp	loc_453AD7

loc_453A08:
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	edx, [eax+4]
sub	edx, [ecx]
cmp	edx, [ebp+var_4]
jb	short loc_453A5D
xor	eax, eax
mov	[ebp+var_11], al
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_50], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_4C]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_5C], edx
xor	eax, eax
mov	[ebp+var_55], al
jmp	short loc_453AD7

loc_453A5D:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
mov	ecx, [ebp+arg_0]
add	eax, [ecx]
mov	[ebp+var_68], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_6C]
push	ecx
mov	edx, [ebp+var_68]
push	edx
mov	eax, [ebp+var_64]
push	eax
call	sub_406610
add	esp, 0Ch
xor	ecx, ecx
mov	[ebp+var_13], cl
mov	edx, [ebp+var_7C]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	edx, [eax+4]
sub	edx, [ecx]
mov	eax, [ebp+arg_0]
add	edx, [eax]
mov	[ebp+var_70], edx
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_70]
push	eax
call	sub_407C50
add	esp, 0Ch

loc_453AD7:
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
add	edx, [ebp+var_4]
mov	eax, [ebp+var_7C]
mov	[eax+4], edx

loc_453AE5:
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	4
sub_453990 endp

align 10h


; Attributes: bp-based frame

sub_453AF0 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453AF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0DCh
mov	[ebp+var_D4], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_455120
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_D4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_D5], al
movzx	ecx, [ebp+var_D5]
test	ecx, ecx
jnz	short loc_453BCF
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_D4]
call	sub_444510
mov	[ebp+var_DC], eax
mov	eax, [ebp+var_DC]
mov	[ebp+var_E0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_4C]
or	ecx, 1
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_5C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_453BCF
mov	[ebp+var_E4], 0
jmp	short loc_453BD9

loc_453BCF:
mov	[ebp+var_E4], 1

loc_453BD9:
mov	dl, byte ptr [ebp+var_E4]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_453C03
and	[ebp+var_4C], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_453C03:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_453CDE
lea	edx, [ebp+var_3D]
mov	[ebp+var_60], edx
mov	[ebp+var_4], 2
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
push	0
mov	eax, [ebp+var_60]
push	eax
lea	ecx, [ebp+var_34]
call	sub_4AC3C0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_3C]
mov	[ebp+var_64], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_64]
push	ecx
lea	ecx, [ebp+var_2C]
call	sub_453DC0
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
lea	edx, [ebp+var_30]
mov	[ebp+var_78], edx
mov	byte ptr [ebp+var_4], 7
lea	eax, [ebp+var_74]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	ecx, [ebp+var_78]
push	ecx
push	ecx
mov	[ebp+var_70], esp
mov	ecx, [ebp+var_74]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_D4]
call	sub_454410
lea	eax, [ebp+var_48]
mov	[ebp+var_E8], eax
mov	ecx, [ebp+var_E8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_2C]
call	sub_453450
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_3C]
call	sub_453450
mov	[ebp+var_4], 0FFFFFFFFh

loc_453CDE:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_453AF0 endp

align 10h


; Attributes: bp-based frame

sub_453D00 proc	near

var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
add	ecx, 4
call	sub_453450
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_453D00 endp

align 10h


; Attributes: bp-based frame

sub_453D50 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_453DB6
mov	ecx, [ebp+var_54]
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_453DB6:
mov	esp, ebp
pop	ebp
retn
sub_453D50 endp

align 10h


; Attributes: bp-based frame

sub_453DC0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453DC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_48]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_48]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_48]
add	edx, 8
mov	[ebp+var_18], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_48]
add	ecx, 8
call	sub_444240
mov	ecx, [ebp+var_48]
mov	[ecx], eax
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx]
add	eax, [ebp+var_38]
mov	ecx, [ebp+var_48]
mov	[ecx+8], eax
mov	byte ptr [ebp+var_4], 4
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_40]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_453DC0 endp

align 10h


; Attributes: bp-based frame

sub_453ED0 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	qword ptr -48h
var_40=	qword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	qword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= qword ptr  10h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_1C=	byte ptr  24h
arg_20=	byte ptr  28h
arg_24=	byte ptr  2Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_453ED0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4], 0
mov	dword ptr [ebp+var_20],	0
mov	dword ptr [ebp+var_20+4], 0
mov	[ebp+var_14], 0
mov	[ebp+var_21], 0
mov	byte ptr [ebp+var_4], 1

loc_453F19:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_64]
cmp	ecx, [ebp+var_68]
jz	loc_45415E
movzx	edx, [ebp+var_21]
test	edx, edx
jnz	loc_45415E
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
mov	[ebp+var_38], edx
mov	eax, dword ptr [ebp+arg_8]
sub	eax, dword ptr [ebp+var_20]
mov	ecx, dword ptr [ebp+arg_8+4]
sbb	ecx, dword ptr [ebp+var_20+4]
mov	dword ptr [ebp+var_40],	eax
mov	dword ptr [ebp+var_40+4], ecx
call	sub_4076A0
cdq
mov	dword ptr [ebp+var_48],	eax
mov	dword ptr [ebp+var_48+4], edx
lea	edx, [ebp+var_40]
push	edx
lea	eax, [ebp+var_48]
push	eax
call	sub_405570
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
sub	eax, [ebp+var_30]
mov	[ebp+var_4C], eax
lea	ecx, [ebp+var_28]
push	ecx
lea	edx, [ebp+var_4C]
push	edx
call	sub_405D40
add	esp, 8
mov	eax, [eax]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+arg_10]
push	eax
call	sub_405E00
add	esp, 0Ch
mov	ecx, [ebp+arg_10]
add	ecx, [ebp+var_2C]
mov	[ebp+arg_10], ecx
mov	eax, [ebp+var_2C]
cdq
add	eax, dword ptr [ebp+var_20]
mov	ecx, dword ptr [ebp+var_20+4]
adc	ecx, edx
mov	dword ptr [ebp+var_20],	eax
mov	dword ptr [ebp+var_20+4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
add	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_4]
mov	[ecx+8], eax
mov	edx, [ebp+var_34]
cmp	edx, [ebp+var_38]
jz	short loc_45403B
mov	eax, [ebp+var_34]
sub	eax, [ebp+var_30]
cmp	eax, [ebp+var_28]
jg	short loc_45403B
movzx	ecx, [ebp+arg_1C]
test	ecx, ecx
jz	short loc_454032
mov	edx, dword ptr [ebp+var_20]
add	edx, 1
mov	eax, dword ptr [ebp+var_20+4]
adc	eax, 0
mov	dword ptr [ebp+var_20],	edx
mov	dword ptr [ebp+var_20+4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
add	edx, 1
mov	eax, [ebp+arg_4]
mov	[eax+8], edx

loc_454032:
mov	[ebp+var_21], 1
jmp	loc_454159

loc_45403B:
mov	ecx, dword ptr [ebp+var_20]
cmp	ecx, dword ptr [ebp+arg_8]
jnz	loc_4540E0
mov	edx, dword ptr [ebp+var_20+4]
cmp	edx, dword ptr [ebp+arg_8+4]
jnz	loc_4540E0
movzx	eax, [ebp+arg_24]
test	eax, eax
jz	short loc_4540DA
mov	ecx, [ebp+var_38]
sub	ecx, [ebp+var_30]
cmp	[ebp+var_2C], ecx
jnz	short loc_4540D1
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_4]
mov	ecx, [edx+8]
cmp	ecx, [eax+0Ch]
jnb	short loc_45408B
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
movzx	edx, byte ptr [ecx]
mov	[ebp+var_9C], edx
jmp	short loc_45409E

loc_45408B:
mov	eax, [ebp+arg_4]
mov	edx, [eax]
mov	ecx, [ebp+arg_4]
mov	eax, [edx+1Ch]
call	eax
mov	[ebp+var_9C], eax

loc_45409E:
mov	ecx, [ebp+var_9C]
mov	[ebp+var_84], ecx
mov	[ebp+var_80], 0FFFFFFFFh
mov	edx, [ebp+var_84]
xor	eax, eax
cmp	edx, [ebp+var_80]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4540CF
mov	edx, [ebp+var_14]
or	edx, 2
mov	[ebp+var_14], edx

loc_4540CF:
jmp	short loc_4540DA

loc_4540D1:
mov	eax, [ebp+var_14]
or	eax, 4
mov	[ebp+var_14], eax

loc_4540DA:
mov	[ebp+var_21], 1
jmp	short loc_454159

loc_4540E0:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_4]
mov	eax, [ecx+8]
cmp	eax, [edx+0Ch]
jnb	short loc_45410B
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_88]
movzx	ecx, byte ptr [eax]
mov	[ebp+var_A0], ecx
jmp	short loc_45411E

loc_45410B:
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+1Ch]
call	edx
mov	[ebp+var_A0], eax

loc_45411E:
mov	eax, [ebp+var_A0]
mov	[ebp+var_90], eax
mov	[ebp+var_8C], 0FFFFFFFFh
mov	ecx, [ebp+var_90]
xor	edx, edx
cmp	ecx, [ebp+var_8C]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_454159
mov	ecx, [ebp+var_14]
or	ecx, 2
mov	[ebp+var_14], ecx
mov	[ebp+var_21], 1

loc_454159:
jmp	loc_453F19

loc_45415E:
jmp	short loc_454183

loc_454160:
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_445C00
mov	[ebp+var_21], 1
mov	[ebp+var_4], 0
mov	eax, offset loc_45418A
retn

loc_454183:
mov	[ebp+var_4], 0

loc_45418A:
movzx	ecx, [ebp+var_21]
test	ecx, ecx
jz	short loc_4541DC
movzx	edx, [ebp+arg_20]
test	edx, edx
jz	short loc_4541A0
mov	eax, [ebp+arg_10]
mov	byte ptr [eax],	0

loc_4541A0:
cmp	[ebp+var_14], 0
jz	short loc_4541BA
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_438B50

loc_4541BA:
mov	ecx, dword ptr [ebp+var_20]
mov	dword ptr [ebp+var_58],	ecx
mov	edx, dword ptr [ebp+var_20+4]
mov	dword ptr [ebp+var_58+4], edx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, dword ptr [ebp+var_58]
mov	edx, dword ptr [ebp+var_58+4]
jmp	short loc_454234

loc_4541DC:
movzx	eax, [ebp+arg_24]
push	eax
movzx	ecx, [ebp+arg_20]
push	ecx
movzx	edx, [ebp+arg_1C]
push	edx
movzx	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, dword ptr [ebp+arg_8]
sub	edx, dword ptr [ebp+var_20]
mov	eax, dword ptr [ebp+arg_8+4]
sbb	eax, dword ptr [ebp+var_20+4]
push	eax
push	edx
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_454250
add	esp, 24h
add	eax, dword ptr [ebp+var_20]
mov	ecx, dword ptr [ebp+var_20+4]
adc	ecx, edx
mov	dword ptr [ebp+var_60],	eax
mov	dword ptr [ebp+var_60+4], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, dword ptr [ebp+var_60]
mov	edx, dword ptr [ebp+var_60+4]

loc_454234:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_453ED0 endp

align 10h


; Attributes: bp-based frame

sub_454250 proc	near

var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= qword ptr  10h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	byte ptr  20h
arg_1C=	byte ptr  24h
arg_20=	byte ptr  28h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_454250
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 38h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	dword ptr [ebp+var_20],	0
mov	dword ptr [ebp+var_20+4], 0
mov	[ebp+var_14], 0
mov	[ebp+var_4], 0

loc_45428E:
mov	eax, dword ptr [ebp+var_20]
cmp	eax, dword ptr [ebp+arg_8]
jnz	short loc_4542B4
mov	ecx, dword ptr [ebp+var_20+4]
cmp	ecx, dword ptr [ebp+arg_8+4]
jnz	short loc_4542B4
movzx	edx, [ebp+arg_20]
test	edx, edx
jz	short loc_4542AF
mov	eax, [ebp+var_14]
or	eax, 4
mov	[ebp+var_14], eax

loc_4542AF:
jmp	loc_454381

loc_4542B4:
mov	ecx, [ebp+arg_4]
call	sub_443C00
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_3C], ecx
mov	[ebp+var_38], 0FFFFFFFFh
mov	edx, [ebp+var_3C]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_454305
mov	edx, dword ptr [ebp+var_20+4]
cmp	edx, dword ptr [ebp+arg_8+4]
jl	short loc_4542F8
jg	short loc_4542F0
mov	eax, dword ptr [ebp+var_20]
cmp	eax, dword ptr [ebp+arg_8]
jb	short loc_4542F8

loc_4542F0:
movzx	ecx, [ebp+arg_20]
test	ecx, ecx
jz	short loc_454301

loc_4542F8:
mov	edx, [ebp+var_14]
or	edx, 2
mov	[ebp+var_14], edx

loc_454301:
jmp	short loc_454381
jmp	short loc_454359

loc_454305:
movzx	eax, byte ptr [ebp+var_24]
mov	[ebp+var_28], eax
movzx	ecx, [ebp+arg_14]
test	ecx, ecx
jz	short loc_454359
movzx	edx, [ebp+arg_18]
test	edx, edx
jz	short loc_454330
mov	eax, dword ptr [ebp+var_20]
add	eax, 1
mov	ecx, dword ptr [ebp+var_20+4]
adc	ecx, 0
mov	dword ptr [ebp+var_20],	eax
mov	dword ptr [ebp+var_20+4], ecx
jmp	short loc_454357

loc_454330:
mov	dl, byte ptr [ebp+var_24]
mov	[ebp+var_3D], dl
movzx	eax, [ebp+var_3D]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_44F360
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_454357
mov	eax, [ebp+var_14]
or	eax, 4
mov	[ebp+var_14], eax

loc_454357:
jmp	short loc_454381

loc_454359:
mov	ecx, [ebp+arg_10]
mov	dl, byte ptr [ebp+var_24]
mov	[ecx], dl
mov	eax, [ebp+arg_10]
add	eax, 1
mov	[ebp+arg_10], eax
mov	ecx, dword ptr [ebp+var_20]
add	ecx, 1
mov	edx, dword ptr [ebp+var_20+4]
adc	edx, 0
mov	dword ptr [ebp+var_20],	ecx
mov	dword ptr [ebp+var_20+4], edx
jmp	loc_45428E

loc_454381:
jmp	short loc_4543BC

loc_454383:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_445C00
mov	eax, [ebp+arg_10]
mov	byte ptr [eax],	0
mov	ecx, dword ptr [ebp+var_20]
mov	[ebp+var_30], ecx
mov	edx, dword ptr [ebp+var_20+4]
mov	[ebp+var_2C], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4543C5
retn
mov	eax, offset loc_4543BC
retn

loc_4543BC:
mov	[ebp+var_4], 0FFFFFFFFh
jmp	short loc_4543CD

loc_4543C5:
mov	eax, [ebp+var_30]
mov	edx, [ebp+var_2C]
jmp	short loc_4543FD

loc_4543CD:
movzx	eax, [ebp+arg_1C]
test	eax, eax
jz	short loc_4543DB
mov	ecx, [ebp+arg_10]
mov	byte ptr [ecx],	0

loc_4543DB:
cmp	[ebp+var_14], 0
jz	short loc_4543F7
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_438B50

loc_4543F7:
mov	eax, dword ptr [ebp+var_20]
mov	edx, dword ptr [ebp+var_20+4]

loc_4543FD:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_454250 endp

align 10h


; Attributes: bp-based frame

sub_454410 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4546B6
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_45448E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_454DF0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_454B25

loc_45448E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_60]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_29]
test	ecx, ecx
jz	short loc_454514
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	loc_454B25
jmp	loc_4546B1

loc_454514:
lea	eax, [ebp+var_2B]
mov	[ebp+var_D8], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_74], ecx
lea	edx, [ebp+var_6D]
mov	[ebp+var_DC], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_74]
add	eax, 10h
mov	[ebp+var_6C], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_11], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_454583
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_454B25

loc_454583:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_CC]
jnz	short loc_4545CD
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	loc_454B25

loc_4545CD:
lea	eax, [ebp+var_2D]
mov	[ebp+var_E0], eax
mov	[ebp+var_4], 8
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_79]
mov	[ebp+var_E4], edx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_80]
add	eax, 10h
mov	[ebp+var_78], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_454680
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_454659
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	loc_454B25
jmp	short loc_45467E

loc_454659:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	loc_454B25

loc_45467E:
jmp	short loc_4546B1

loc_454680:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_454DF0
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_454B25

loc_4546B1:
jmp	loc_454B25

loc_4546B6:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_454799
lea	ecx, [ebp+var_3A]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_EC], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_454763
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	loc_454B25
jmp	short loc_454794

loc_454763:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_454DF0
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_454B25

loc_454794:
jmp	loc_454B25

loc_454799:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_18]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	edx, [ebp+var_45]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_A0], eax
lea	ecx, [ebp+var_99]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 11h
mov	edx, [ebp+var_A0]
add	edx, 10h
mov	[ebp+var_98], edx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_98]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jz	short loc_454892
lea	edx, [ebp+var_47]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 14h
mov	eax, [ebp+var_58]
or	eax, 1
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_AC], ecx
lea	edx, [ebp+var_A5]
mov	[ebp+var_FC], edx
mov	[ebp+var_4], 15h
mov	eax, [ebp+var_AC]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_454892
mov	[ebp+var_100], 1
jmp	short loc_45489C

loc_454892:
mov	[ebp+var_100], 0

loc_45489C:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4548C6
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4548C6:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_454928
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4548FE
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	loc_454B25
jmp	short loc_454923

loc_4548FE:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	loc_454B25

loc_454923:
jmp	loc_454B25

loc_454928:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4549BB
lea	eax, [ebp+var_48]
mov	[ebp+var_104], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_108], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_1D], cl
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4549BB:
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	loc_454A4E
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_454A4E
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_CC]
jz	short loc_454A42
lea	edx, [ebp+var_4A]
mov	[ebp+var_10C], edx
mov	[ebp+var_4], 1Ch
mov	eax, [ebp+var_58]
or	eax, 2
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_C4], ecx
lea	edx, [ebp+var_BD]
mov	[ebp+var_110], edx
mov	[ebp+var_4], 1Dh
mov	eax, [ebp+var_C4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_BC]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_454A4E

loc_454A42:
mov	[ebp+var_114], 1
jmp	short loc_454A58

loc_454A4E:
mov	[ebp+var_114], 0

loc_454A58:
mov	al, byte ptr [ebp+var_114]
mov	[ebp+var_49], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 2
jz	short loc_454A82
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_454A82:
movzx	edx, [ebp+var_49]
test	edx, edx
jz	short loc_454ADB
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_454AB7
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	short loc_454B25
jmp	short loc_454AD9

loc_454AB7:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_454C50
mov	eax, [ebp+arg_0]
jmp	short loc_454B25

loc_454AD9:
jmp	short loc_454B25

loc_454ADB:
movzx	eax, [ebp+var_12]
movzx	ecx, [ebp+var_1D]
cmp	eax, ecx
jnz	short loc_454AF9
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_454B25
jmp	short loc_454B25

loc_454AF9:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_454DF0
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_454B25:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_454410 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_454B40(void *)
sub_454B40 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_454B40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_453450
xor	ecx, ecx
and	ecx, 1
jz	short loc_454B8C
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_454B8C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_454B40 endp

align 10h


; Attributes: bp-based frame

sub_454BA0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_454BA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_444240
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_454C38

loc_454BFD:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_454C1B
mov	edx, [ebp+var_3C]
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_454C1B:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_454C38
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_454C38:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_454BA0 endp

align 10h


; Attributes: bp-based frame

sub_454C50 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_454CAC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_455070
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_454D9E

loc_454CAC:
cmp	[ebp+arg_10], 0
jnz	short loc_454D0E
cmp	[ebp+arg_C], 0
jnz	short loc_454D05
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_454D0E

loc_454D05:
mov	[ebp+var_30], 1
jmp	short loc_454D15

loc_454D0E:
mov	[ebp+var_30], 0

loc_454D15:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
and	eax, 1
jz	short loc_454D3C
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_454D3C:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_454D72
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_455070
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_454D70
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx

loc_454D70:
jmp	short loc_454D9E

loc_454D72:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_455070
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_454D9E
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax

loc_454D9E:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_24]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_454C50 endp

align 10h


; Attributes: bp-based frame

sub_454DF0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_454E21:
cmp	[ebp+var_1C], 0
jz	short loc_454E99
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_40]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_11], cl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_454E88
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_74], ecx
jmp	short loc_454E91

loc_454E88:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_74], eax

loc_454E91:
mov	ecx, [ebp+var_74]
mov	[ebp+var_1C], ecx
jmp	short loc_454E21

loc_454E99:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_454F3B
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_50]
setz	cl
mov	[ebp+var_75], cl
movzx	edx, [ebp+var_75]
test	edx, edx
jz	short loc_454F2C
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_68]
call	sub_454C50
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_454FE8
jmp	short loc_454F3B

loc_454F2C:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_454F3B:
lea	edx, [ebp+var_32]
mov	[ebp+var_7C], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_60], eax
lea	ecx, [ebp+var_59]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_60]
add	edx, 10h
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_454FCD
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_68]
call	sub_454C50
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_454FE8

loc_454FCD:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_454FE8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_454DF0 endp

align 10h


; Attributes: bp-based frame

sub_455000 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_38]
add	ecx, 8
call	sub_444240
mov	edx, [ebp+var_38]
mov	[edx], eax
mov	eax, [ebp+var_38]
mov	ecx, [eax]
add	ecx, [ebp+var_4]
mov	edx, [ebp+var_38]
mov	[edx+8], ecx
mov	eax, [ebp+var_38]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+var_38]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_455000 endp

align 10h


; Attributes: bp-based frame

sub_455070 proc	near

var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_455070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
push	1
mov	ecx, [ebp+var_4C]
call	sub_43A200
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4551C0
add	esp, 8
jmp	short loc_4550EF

loc_4550BE:
cmp	[ebp+var_14], 0
jz	short loc_4550D9
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4550D9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4550F6
retn

loc_4550EF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4550F6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_455070 endp



; Attributes: bp-based frame

sub_455120 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_45514D:
cmp	[ebp+var_14], 0
jz	short loc_4551A9
lea	eax, [ebp+var_19]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_45519E
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_4551A7

loc_45519E:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_4551A7:
jmp	short loc_45514D

loc_4551A9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_455120 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4551C0(void *, int)
sub_4551C0 proc	near

var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4551C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_45523B
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_453DC0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	[ebp+var_3C], eax
jmp	short loc_455242

loc_45523B:
mov	[ebp+var_3C], 0

loc_455242:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4551C0 endp

align 10h


; Attributes: bp-based frame

sub_455260 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_406880
and	eax, 38h
cmp	eax, 8
jz	short loc_45528B
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
jmp	short loc_455291

loc_45528B:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx

loc_455291:
mov	edx, [ebp+var_C]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_4553D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_455260 endp

align 10h


; Attributes: bp-based frame

sub_4552B0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	0Ah
mov	ecx, [ebp+arg_0]
call	sub_4552D0
mov	ecx, [ebp+arg_0]
call	sub_4363A0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4552B0 endp

align 10h


; Attributes: bp-based frame

sub_4552D0 proc	near

var_54=	dword ptr -54h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4552D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 44h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_54]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_21], dl
movzx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_455388
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_54]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_28], edx
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
call	sub_44CF60
mov	[ebp+var_38], eax
mov	[ebp+var_34], 0FFFFFFFFh
mov	ecx, [ebp+var_38]
xor	edx, edx
cmp	ecx, [ebp+var_34]
setz	dl
mov	[ebp+var_19], dl
jmp	short loc_455381

loc_455360:
push	1
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	edx, [ebp+var_54]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_455388
retn

loc_455381:
mov	[ebp+var_4], 0

loc_455388:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_4553A2
push	1
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	ecx, [ebp+var_54]
add	ecx, [edx+4]
call	sub_438B50

loc_4553A2:
mov	eax, [ebp+var_54]
mov	[ebp+var_20], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4552D0 endp

align 10h


; Attributes: bp-based frame

sub_4553D0 proc	near

var_70=	dword ptr -70h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4553D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 60h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	loc_45552F
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_455437
mov	[ebp+var_54], 0
jmp	short loc_455445

loc_455437:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_54], eax

loc_455445:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+54h]
mov	[ebp+var_36], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setnz	cl
mov	byte ptr [ebp+var_24], cl
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803B0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
push	edx
movzx	eax, [ebp+var_36]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_50]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_48]
mov	eax, [edx]
mov	ecx, [ebp+var_48]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, [ebp+var_2C]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_19], al
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
jmp	short loc_455528

loc_455509:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_45552F
retn

loc_455528:
mov	[ebp+var_4], 0

loc_45552F:
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_455549
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_438B50

loc_455549:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4553D0 endp

align 10h


; Attributes: bp-based frame

sub_455580 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_455580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_7966CA
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_455580 endp



; Attributes: bp-based frame

sub_4555C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_455580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	??0exception@std@@QAE@ABV01@@Z ; std::exception::exception(exception::exception	const &)
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_155F118
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	[edx+14h], ecx
mov	esi, [ebp+arg_0]
add	esi, 18h
mov	edi, [ebp+var_10]
add	edi, 18h
mov	ecx, 0B3h
rep movsd
mov	esi, [ebp+arg_0]
add	esi, 2E4h
mov	edi, [ebp+var_10]
add	edi, 2E4h
mov	ecx, 14h
rep movsd
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4555C0 endp

align 10h


; Attributes: bp-based frame

sub_455670 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_455580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_7966CA
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4556B6
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4556B6:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_455670 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4556D0(float)
sub_4556D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
fld	[ebp+arg_0]
call	__CIlog
fstp	[ebp+var_4]
fld	[ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4556D0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4556F0(float)
sub_4556F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
fld	[ebp+arg_0]
fmul	ds:dbl_15FCC48
fstp	[ebp+var_10]
fld	[ebp+var_10]
push	ecx		; float
fstp	[esp+14h+var_14]
mov	ecx, [ebp+var_C]
call	sub_40F740
add	esp, 4
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+8], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_4556F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_455750(float)
sub_455750 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 8
fld	[ebp+arg_0]
fmul	ds:dbl_15FCC48
fstp	[ebp+var_10]
fld	[ebp+var_10]
push	ecx		; float
fstp	[esp+14h+var_14]
mov	ecx, [ebp+var_C]
call	sub_40F740
add	esp, 4
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_455750 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4557B0(float)
sub_4557B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
fld	[ebp+arg_0]
fmul	ds:dbl_15FCC48
fstp	[ebp+var_10]
fld	[ebp+var_10]
push	ecx		; float
fstp	[esp+14h+var_14]
mov	ecx, [ebp+var_C]
call	sub_40F740
add	esp, 4
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_4557B0 endp

align 10h


; Attributes: bp-based frame

sub_455810 proc	near

var_3C=	qword ptr -3Ch
var_34=	dword ptr -34h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
call	sub_4355E0
mov	dword ptr [ebp+var_3C],	eax
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fmul	ds:dbl_15FD7C0
mov	esp, ebp
pop	ebp
retn
sub_455810 endp

align 10h


; Attributes: bp-based frame

sub_455840 proc	near

var_44=	qword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
call	sub_4355E0
mov	dword ptr [ebp+var_44],	eax
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
fmul	ds:dbl_15FD7C0
fstp	[ebp+var_38]
mov	eax, [ebp+arg_0]
fld	[ebp+var_38]
fmul	qword ptr [eax]
mov	esp, ebp
pop	ebp
retn	4
sub_455840 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_455880(float,	float, float, float, float, float)
sub_455880 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
fld	[ebp+arg_C]
fld1
fsubrp	st(1), st
fld	[ebp+arg_14]
fld1
faddp	st(1), st
fmulp	st(1), st
fld	[ebp+arg_10]
fld1
faddp	st(1), st
fmulp	st(1), st
fdiv	ds:dbl_15FCD70
fld	[ebp+arg_0]
fsub	[ebp+arg_4]
fmulp	st(1), st
fstp	[ebp+var_4]
fld	[ebp+arg_C]
fld1
fsubrp	st(1), st
fld	[ebp+arg_14]
fld1
fsubrp	st(1), st
fmulp	st(1), st
fld	[ebp+arg_10]
fld1
fsubrp	st(1), st
fmulp	st(1), st
fdiv	ds:dbl_15FCD70
fld	[ebp+arg_8]
fsub	[ebp+arg_0]
fmulp	st(1), st
fstp	[ebp+var_8]
fld	[ebp+var_4]
fadd	[ebp+var_8]
fstp	[ebp+var_C]
fld	[ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_455880 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4558F0(float,	float, float, float, float, float)
sub_4558F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
fld	[ebp+arg_C]
fld1
fsubrp	st(1), st
fld	[ebp+arg_14]
fld1
faddp	st(1), st
fmulp	st(1), st
fld	[ebp+arg_10]
fld1
fsubrp	st(1), st
fmulp	st(1), st
fdiv	ds:dbl_15FCD70
fld	[ebp+arg_0]
fsub	[ebp+arg_4]
fmulp	st(1), st
fstp	[ebp+var_4]
fld	[ebp+arg_C]
fld1
fsubrp	st(1), st
fld	[ebp+arg_14]
fld1
fsubrp	st(1), st
fmulp	st(1), st
fld	[ebp+arg_10]
fld1
faddp	st(1), st
fmulp	st(1), st
fdiv	ds:dbl_15FCD70
fld	[ebp+arg_8]
fsub	[ebp+arg_0]
fmulp	st(1), st
fstp	[ebp+var_8]
fld	[ebp+var_4]
fadd	[ebp+var_8]
fstp	[ebp+var_C]
fld	[ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4558F0 endp

align 10h


; Attributes: bp-based frame

sub_455960 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_4559BE
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4559A3
jmp	short loc_4559BC

loc_4559A3:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4559BC:
jmp	short loc_4559EF

loc_4559BE:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_455AC0

loc_4559EF:
mov	esp, ebp
pop	ebp
retn	8
sub_455960 endp

align 10h


; Attributes: bp-based frame

sub_455A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	esp, ebp
pop	ebp
retn
sub_455A00 endp

align 10h


; Attributes: bp-based frame

sub_455A20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
imul	eax, 0Ch
add	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_455A20 endp



; Attributes: bp-based frame

; int __cdecl sub_455A40(float,	int)
sub_455A40 proc	near

var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
cmp	[ebp+arg_4], 0
jl	short loc_455A54
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_455A5C

loc_455A54:
mov	ecx, [ebp+arg_4]
neg	ecx
mov	[ebp+var_4], ecx

loc_455A5C:
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_8], xmm0
jmp	short loc_455A74

loc_455A6B:
fld	[ebp+arg_0]
fmul	[ebp+arg_0]
fstp	[ebp+arg_0]

loc_455A74:
mov	edx, [ebp+var_4]
and	edx, 1
jz	short loc_455A85
fld	[ebp+var_8]
fmul	[ebp+arg_0]
fstp	[ebp+var_8]

loc_455A85:
mov	eax, [ebp+var_4]
shr	eax, 1
mov	[ebp+var_4], eax
jnz	short loc_455AB2
cmp	[ebp+arg_4], 0
jge	short loc_455AA1
fld	[ebp+var_8]
fld1
fdivrp	st(1), st
fstp	[ebp+var_10]
jmp	short loc_455AA7

loc_455AA1:
fld	[ebp+var_8]
fstp	[ebp+var_10]

loc_455AA7:
fld	[ebp+var_10]
fstp	[ebp+var_14]
fld	[ebp+var_14]
jmp	short loc_455AB4

loc_455AB2:
jmp	short loc_455A6B

loc_455AB4:
mov	esp, ebp
pop	ebp
retn
sub_455A40 endp

align 10h


; Attributes: bp-based frame

sub_455AC0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_455B21
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_455B02
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_455C70
jmp	short loc_455B21

loc_455B02:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_455B70

loc_455B21:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_455AC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_455B30(float,	float, float)
sub_455B30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
fld	[ebp+arg_0]
fsub	[ebp+arg_4]
fstp	[ebp+var_4]
fld	[ebp+var_4]
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_40F4E0
add	esp, 4
fld	[ebp+arg_8]
fcomip	st, st(1)
fstp	st
jbe	short loc_455B60
mov	[ebp+var_8], 1
jmp	short loc_455B67

loc_455B60:
mov	[ebp+var_8], 0

loc_455B67:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_455B30 endp

align 10h


; Attributes: bp-based frame

sub_455B70 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A8]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_44], edx
jmp	short loc_455BE6

loc_455BD4:
mov	eax, [ebp+var_48]
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
add	ecx, 4
mov	[ebp+var_44], ecx

loc_455BE6:
cmp	[ebp+var_48], 0
jbe	short loc_455BF8
mov	edx, [ebp+var_44]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_455BD4

loc_455BF8:
mov	edx, [ebp+var_44]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_455C23
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_455C23:
mov	ecx, [ebp+var_A8]
call	sub_444710
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_A4]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_455B70 endp

align 10h


; Attributes: bp-based frame

sub_455C70 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_455C97
mov	edx, [ebp+var_4C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_455C97
mov	[ebp+var_50], 1
jmp	short loc_455C9E

loc_455C97:
mov	[ebp+var_50], 0

loc_455C9E:
movzx	ecx, byte ptr [ebp+var_50]
test	ecx, ecx
jz	short loc_455CD0
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_455C70
jmp	loc_455E4D

loc_455CD0:
mov	eax, [ebp+var_4C]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_455DA6
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+var_4C]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_4]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_4C]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
shl	edx, 2
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A290
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
sub	edx, [ebp+var_2C]
sar	edx, 2
mov	[ebp+var_28], edx
jmp	short loc_455D8F

loc_455D7D:
mov	eax, [ebp+var_2C]
add	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_28]
sub	ecx, 1
mov	[ebp+var_28], ecx

loc_455D8F:
cmp	[ebp+var_28], 0
jle	short loc_455DA1
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_455D7D

loc_455DA1:
jmp	loc_455E4D

loc_455DA6:
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
mov	edx, [ebp+var_38]
lea	eax, [edx+ecx*4]
mov	[ebp+var_30], eax
push	0
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
call	sub_455E60
add	esp, 14h
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_30]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
mov	eax, [ebp+var_4]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_4C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_48]
sar	ecx, 2
mov	[ebp+var_44], ecx
jmp	short loc_455E3B

loc_455E29:
mov	edx, [ebp+var_48]
add	edx, 4
mov	[ebp+var_48], edx
mov	eax, [ebp+var_44]
sub	eax, 1
mov	[ebp+var_44], eax

loc_455E3B:
cmp	[ebp+var_44], 0
jle	short loc_455E4D
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
jmp	short loc_455E29

loc_455E4D:
mov	esp, ebp
pop	ebp
retn	10h
sub_455C70 endp

align 10h


; Attributes: bp-based frame

sub_455E60 proc	near

var_1D=	byte ptr -1Dh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_455E60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_455EAF

loc_455E9D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax

loc_455EAF:
cmp	[ebp+var_18], 0
jle	short loc_455ED1
call	sub_406640
mov	[ebp+var_19], al
call	sub_406640
mov	[ebp+var_1A], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
jmp	short loc_455E9D

loc_455ED1:
jmp	short loc_455EEE

loc_455ED3:
xor	ecx, ecx
mov	[ebp+var_1D], cl
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_455EF5
retn

loc_455EEE:
mov	[ebp+var_4], 0FFFFFFFFh

loc_455EF5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_455E60 endp

align 10h


; Attributes: bp-based frame

sub_455F10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155F500
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 1
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_455F10 endp

align 10h


; Attributes: bp-based frame

sub_455F40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456310
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15477D0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_455F40 endp

align 10h


; Attributes: bp-based frame

sub_455F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	3
mov	ecx, [ebp+var_4]
call	sub_455F40
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155F504
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_455F70 endp

align 10h


; Attributes: bp-based frame

sub_455FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
push	eax
call	sub_4018C0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_455FC4
mov	edx, [ebp+var_4]
push	edx
call	sub_4026E0
add	esp, 4

loc_455FC4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_455FA0 endp

align 10h
; [00000010 BYTES: COLLAPSED FUNCTION unknown_libname_1. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_455FE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
push	0
mov	eax, [ebp+arg_0]
push	eax
mov	edx, offset asc_155CC88	; " "
call	sub_402480
mov	[ebp+var_4], eax

loc_455FF9:
cmp	[ebp+var_4], 0FFFFFFFFh
jz	short loc_456035
push	offset a__16	; "_"
call	sub_4077F0
add	esp, 4
push	eax
push	offset a__16	; "_"
push	1
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_438A80
push	0
mov	edx, [ebp+arg_0]
push	edx
mov	edx, offset asc_155CC88	; " "
call	sub_402480
mov	[ebp+var_4], eax
jmp	short loc_455FF9

loc_456035:
mov	esp, ebp
pop	ebp
retn
sub_455FE0 endp

align 10h


; Attributes: bp-based frame

sub_456040 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_C]
call	sub_402400
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, offset a__16 ; "_"
call	sub_402CB0
mov	edx, [ebp+arg_C]
push	edx
mov	edx, [ebp+arg_8]
call	sub_402CB0
mov	eax, [ebp+arg_C]
push	eax
mov	edx, offset a__16 ; "_"
call	sub_402CB0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_4]
call	sub_402CB0
mov	edx, [ebp+arg_C]
push	edx
call	sub_455FE0
add	esp, 4
pop	ebp
retn
sub_456040 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4560A0(int, int, int Val, int)
sub_4560A0 proc	near

DstBuf=	word ptr -48h
var_4= word ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
Val= dword ptr	10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	eax, 20h
mov	[ebp+var_4], ax
push	0Ah		; Radix
push	20h		; SizeInWords
lea	ecx, [ebp+DstBuf]
push	ecx		; DstBuf
mov	edx, [ebp+Val]
push	edx		; Val
call	__itow_s
add	esp, 10h
mov	eax, [ebp+arg_C]
push	eax
lea	ecx, [ebp+DstBuf]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_456040
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4560A0 endp

align 10h


; Attributes: bp-based frame

sub_4560E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Fh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E608
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4560E0 endp

align 10h


; Attributes: bp-based frame

sub_456120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_456120 endp

align 10h


; Attributes: bp-based frame

sub_456140 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
push	eax
call	sub_401F90
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_456166
mov	edx, [ebp+var_14]
push	edx
call	sub_4026E0
add	esp, 4

loc_456166:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_456140 endp

align 10h


; Attributes: bp-based frame

sub_456170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_455F70
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_12685D0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155F518
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], offset off_155F528
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_456170 endp

align 10h


; Attributes: bp-based frame

sub_4561B0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4561B0 endp

align 10h


; Attributes: bp-based frame

sub_4561E0 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
push	eax
call	sub_402010
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_456206
mov	edx, [ebp+var_14]
push	edx
call	sub_4026E0
add	esp, 4

loc_456206:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4561E0 endp

align 10h


; Attributes: bp-based frame

sub_456210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_42D0C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_456210 endp

align 10h


; Attributes: bp-based frame

sub_456230 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_4042A0
cmp	[ebp+arg_0], eax
jbe	short loc_45624F
mov	ecx, [ebp+var_14]
call	sub_43AF90

loc_45624F:
mov	eax, [ebp+arg_4]
push	eax
call	sub_407D10
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
call	sub_404790
mov	esi, eax
mov	ecx, [ebp+var_14]
call	sub_4042A0
sub	esi, eax
cmp	[ebp+var_4], esi
jbe	short loc_45627F
mov	ecx, [ebp+var_14]
call	loc_407740

loc_45627F:
mov	ecx, [ebp+var_14]
call	sub_5F52F0
cmp	[ebp+arg_4], eax
jb	short loc_4562A2
mov	ecx, [ebp+var_14]
call	sub_61ED00
cmp	[ebp+arg_4], eax
jnb	short loc_4562A2
mov	[ebp+var_18], 1
jmp	short loc_4562A9

loc_4562A2:
mov	[ebp+var_18], 0

loc_4562A9:
movzx	ecx, byte ptr [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5F52F0
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_444F50
mov	eax, [ebp+var_14]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_456230 endp

align 10h


; Attributes: bp-based frame

sub_4562E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+arg_0]
call	sub_402430
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_404430
push	eax
mov	ecx, [ebp+var_4]
call	sub_43B520
mov	esp, ebp
pop	ebp
retn	8
sub_4562E0 endp

align 10h


; Attributes: bp-based frame

sub_456310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456430
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155F514
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_456310 endp

align 10h


; Attributes: bp-based frame

sub_456330 proc	near

var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_456366
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	ecx, [ecx+4]
call	sub_405760
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
add	eax, 18h
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
jmp	short loc_456386

loc_456366:
xor	edx, edx
mov	[ebp+var_1], dl
push	1
push	1
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_14]
call	sub_456450

loc_456386:
mov	esp, ebp
pop	ebp
retn	4
sub_456330 endp

align 10h


; Attributes: bp-based frame

sub_456390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155F560
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCCC10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_456390 endp



; Attributes: bp-based frame

sub_4563D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401880
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4563F3
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4026E0
add	esp, 4

loc_4563F3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4563D0 endp

align 10h


; Attributes: bp-based frame

sub_456400 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456210
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_456425
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_456425:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_456400 endp

align 10h


; Attributes: bp-based frame

sub_456430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4564C0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC20C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_456430 endp

align 10h


; Attributes: bp-based frame

sub_456450 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_456510
mov	esp, ebp
pop	ebp
retn	14h
sub_456450 endp

align 10h


; Attributes: bp-based frame

sub_456490 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401760
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4564B3
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4026E0
add	esp, 4

loc_4564B3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_456490 endp

align 10h


; Attributes: bp-based frame

sub_4564C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_455F10
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155F4FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4564C0 endp

align 10h


; Attributes: bp-based frame

sub_4564E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4017A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_456503
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_456503:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4564E0 endp

align 10h


; Attributes: bp-based frame

sub_456510 proc	near

var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_456590
movzx	ecx, al
test	ecx, ecx
jz	short loc_456564
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_403850
xor	eax, eax
mov	[ebp+var_19], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_19]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_20]
call	sub_4565D0
lea	ecx, [ebp+var_18]
call	sub_407910
jmp	short loc_456586

loc_456564:
xor	eax, eax
mov	[ebp+var_1A], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_1A]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_20]
call	sub_4565D0

loc_456586:
mov	esp, ebp
pop	ebp
retn	14h
sub_456510 endp

align 10h


; Attributes: bp-based frame

sub_456590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
cmp	ecx, [eax]
jb	short loc_4565B7
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
cmp	eax, [edx+4]
jnb	short loc_4565B7
mov	[ebp+var_8], 1
jmp	short loc_4565BE

loc_4565B7:
mov	[ebp+var_8], 0

loc_4565BE:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_456590 endp

align 10h


; Attributes: bp-based frame

sub_4565D0 proc	near

var_20=	dword ptr -20h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_456770
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 8
call	sub_456860
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_E], dl
lea	eax, [ebp+var_E+1]
push	eax
movzx	ecx, byte ptr [ebp+var_E]
push	ecx
mov	edx, [ebp+var_8]
push	edx		; void *
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
push	edx		; int
call	sub_456970
add	esp, 14h
mov	[ebp+var_C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_45664C
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_C]
call	sub_405760
mov	eax, [ebp+var_C]
add	eax, 18h
mov	[ebp+var_C], eax
jmp	short loc_456663

loc_45664C:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_4569D0
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_456663:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_456698
xor	edx, edx
mov	byte ptr [ebp+var_10+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_10], al
lea	ecx, [ebp+var_10+1]
push	ecx
movzx	edx, byte ptr [ebp+var_10]
push	edx
mov	eax, [ebp+var_C]
push	eax		; void *
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_456970
add	esp, 14h
mov	[ebp+var_C], eax

loc_456698:
mov	ecx, [ebp+var_20]
call	sub_4567E0
mov	ecx, [ebp+var_4]
imul	ecx, 18h
add	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
call	sub_458870
mov	esp, ebp
pop	ebp
retn	14h
sub_4565D0 endp



; Attributes: bp-based frame

sub_4566C0 proc	near

var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_8]
push	eax
call	sub_407D10
add	esp, 4
mov	[ebp+var_1C], eax
xor	ecx, ecx
mov	[ebp+var_1E], cl
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_604B20
push	eax
mov	ecx, [ebp+arg_4]
call	sub_4042A0
add	eax, [ebp+var_1C]
push	eax
movzx	eax, [ebp+var_1E]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4041F0
lea	ecx, [ebp+var_1D]
call	nullsub_1
mov	ecx, [ebp+arg_4]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_402340
mov	edx, [ebp+arg_8]
add	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4050A0
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_403850
lea	ecx, [ebp+var_18]
call	sub_407910
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4566C0 endp

align 10h


; Attributes: bp-based frame

sub_456750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_456A10
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_456750 endp



; Attributes: bp-based frame

sub_456770 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_4FFDB0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
call	sub_456890
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_45679C
mov	ecx, [ebp+var_10]
call	sub_5BD210

loc_45679C:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_10]
call	sub_456890
cmp	[ebp+var_4], eax
ja	short loc_4567C9
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_4567D4

loc_4567C9:
mov	ecx, [ebp+var_10]
call	sub_456890
mov	[ebp+var_4], eax

loc_4567D4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_456770 endp

align 10h


; Attributes: bp-based frame

sub_4567E0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_456A40
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_20], eax
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jz	short loc_456853
mov	ecx, [ebp+var_20]
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_1C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_456853:
mov	esp, ebp
pop	ebp
retn
sub_4567E0 endp

align 10h


; Attributes: bp-based frame

sub_456860 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4568D0
mov	esp, ebp
pop	ebp
retn	8
sub_456860 endp

align 10h


; Attributes: bp-based frame

sub_456890 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 0AAAAAAAh
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4568F0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
jnb	short loc_4568BE
mov	ecx, [ebp+var_8]
mov	[ebp+var_10], ecx
jmp	short loc_4568C4

loc_4568BE:
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx

loc_4568C4:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_456890 endp

align 10h


; Attributes: bp-based frame

sub_4568D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_456900
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4568D0 endp

align 10h


; Attributes: bp-based frame

sub_4568F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0AAAAAAAh
mov	esp, ebp
pop	ebp
retn
sub_4568F0 endp



; Attributes: bp-based frame

sub_456900 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4568F0
cmp	[ebp+arg_0], eax
jbe	short loc_45692A
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_45692A:
cmp	[ebp+arg_0], 0
jz	short loc_45695E
mov	eax, [ebp+arg_0]
imul	eax, 18h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 18h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_456960

loc_45695E:
xor	eax, eax

loc_456960:
mov	esp, ebp
pop	ebp
retn	8
sub_456900 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

; int __cdecl sub_456970(int, int, void	*)
sub_456970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_4], eax
jmp	short loc_456990

loc_456987:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_456990:
cmp	[ebp+var_4], 0
jle	short loc_4569BA
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+arg_8]
push	ecx		; void *
call	sub_456A70
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
add	eax, 18h
mov	[ebp+arg_8], eax
jmp	short loc_456987

loc_4569BA:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_456970 endp

align 10h


; Attributes: bp-based frame

sub_4569D0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
imul	eax, 18h
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
push	0
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_456AA0
add	esp, 14h
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4569D0 endp

align 10h


; Attributes: bp-based frame

sub_456A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
call	sub_456AF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_456A10 endp

align 10h


; Attributes: bp-based frame

sub_456A40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_456C80
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_456A40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_456A70(void *, int)
sub_456A70 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
call	sub_406640
mov	[ebp+var_1], al
call	sub_406640
mov	[ebp+var_2], al
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
call	sub_456CC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_456A70 endp

align 10h


; Attributes: bp-based frame

sub_456AA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_456AD1

loc_456ABF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
add	eax, 18h
mov	[ebp+var_4], eax

loc_456AD1:
cmp	[ebp+var_8], 0
jle	short loc_456AE9
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_456D10
add	esp, 8
jmp	short loc_456ABF

loc_456AE9:
mov	esp, ebp
pop	ebp
retn
sub_456AA0 endp

align 10h


; Attributes: bp-based frame

sub_456AF0 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	byte ptr -6Ch
var_42=	byte ptr -42h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_456AF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0CCh
mov	[ebp+var_D0], ecx
mov	eax, [ebp+var_D0]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_456B29:
cmp	[ebp+var_14], 0
jz	loc_456BD5
lea	ecx, [ebp+var_41]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_40]
call	sub_407810
lea	edx, [ebp+var_75]
mov	[ebp+var_D4], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
call	sub_404540
mov	[ebp+var_7C], eax
mov	eax, [ebp+var_7C]
mov	[ebp+var_74], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+var_74]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_15], al
lea	ecx, [ebp+var_40]
call	sub_407E50
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	ecx, [ebp+var_15]
test	ecx, ecx
jz	short loc_456BC3
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
call	sub_4044C0
mov	eax, [eax]
mov	[ebp+var_14], eax
jmp	short loc_456BD0

loc_456BC3:
mov	eax, [ebp+var_14]
call	sub_403040
mov	ecx, [eax]
mov	[ebp+var_14], ecx

loc_456BD0:
jmp	loc_456B29

loc_456BD5:
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_D0]
jz	loc_456C6D
lea	ecx, [ebp+var_6D]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_6C]
call	sub_407810
lea	edx, [ebp+var_91]
mov	[ebp+var_D8], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
call	sub_404540
mov	[ebp+var_98], eax
mov	eax, [ebp+var_98]
mov	[ebp+var_90], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_90]
push	ecx
lea	edx, [ebp+var_6C]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_42], al
lea	ecx, [ebp+var_6C]
call	sub_407E50
lea	ecx, [ebp+var_6D]
call	nullsub_1
movzx	eax, [ebp+var_42]
test	eax, eax
jz	short loc_456C6D
mov	ecx, [ebp+var_D0]
mov	[ebp+var_10], ecx

loc_456C6D:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_456AF0 endp



; Attributes: bp-based frame

sub_456C80 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	__initp_misc_winxfltr
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_456C80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_456CC0(void *, int)
sub_456CC0 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_456CFD
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_459510
add	esp, 8
mov	eax, [eax]
push	eax
mov	ecx, [ebp+var_4]
call	sub_456D40
mov	[ebp+var_C], eax
jmp	short loc_456D04

loc_456CFD:
mov	[ebp+var_C], 0

loc_456D04:
mov	esp, ebp
pop	ebp
retn
sub_456CC0 endp

align 10h


; Attributes: bp-based frame

sub_456D10 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
call	sub_406640
mov	[ebp+var_1], al
call	sub_406640
mov	[ebp+var_2], al
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
call	sub_456EA0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_456D10 endp

align 10h


; Attributes: bp-based frame

sub_456D40 proc	near

var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
lea	ecx, [ebp+var_4]
call	sub_457E80
mov	eax, [eax]
push	eax
mov	ecx, [ebp+var_8]
call	sub_456D70
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_456D40 endp

align 10h


; Attributes: bp-based frame

sub_456D70 proc	near

var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
add	eax, 14h
push	eax
lea	ecx, [ebp+var_4]
call	sub_457E80
mov	eax, [eax]
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_456E50
lea	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
mov	ecx, [ebp+var_8]
call	sub_456DC0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_456D70 endp

align 10h


; Attributes: bp-based frame

sub_456DC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+arg_0]
call	sub_4079B0
movzx	eax, al
test	eax, eax
jz	short loc_456E12
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+10h]
sub	ecx, [eax+14h]
add	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	[edx+10h], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+14h], ecx
jmp	short loc_456E3E

loc_456E12:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+14h], 0

loc_456E3E:
mov	esp, ebp
pop	ebp
retn	4
sub_456DC0 endp

align 10h


; Attributes: bp-based frame

sub_456E50 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
lea	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
call	sub_456EE0
add	esp, 4
push	eax
mov	ecx, [ebp+var_4]
call	sub_407980
lea	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
call	sub_456EE0
add	esp, 4
mov	ecx, [ebp+var_4]
mov	edx, [eax]
mov	[ecx], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_456E50 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_456EA0(void *, int)
sub_456EA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_456ECE
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	[ebp+var_8], eax
jmp	short loc_456ED5

loc_456ECE:
mov	[ebp+var_8], 0

loc_456ED5:
mov	esp, ebp
pop	ebp
retn
sub_456EA0 endp

align 10h


; Attributes: bp-based frame

sub_456EE0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
pop	ebp
retn
sub_456EE0 endp

align 10h
; [00000017 BYTES: COLLAPSED FUNCTION std::ios_base::ios_base(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_456F10 proc	near

var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
cmp	[ebp+arg_0], 0
jz	short loc_456F77
lea	ecx, [ebp+var_19]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_18]
call	sub_407D30
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_44]
push	edx
call	sub_10EF240
add	esp, 8
call	sub_412770
push	eax		; char
push	offset aLocalemlImport ; "LocaleML Import: Error: %s"
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h
lea	ecx, [ebp+var_44]
call	sub_407E50
lea	ecx, [ebp+var_18]
call	sub_407910
lea	ecx, [ebp+var_19]
call	nullsub_1

loc_456F77:
mov	esp, ebp
pop	ebp
retn	4
sub_456F10 endp

align 10h


; Attributes: bp-based frame

sub_456F80 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
cmp	dword ptr [ebp+arg_0], 0
jz	short loc_456FA6
mov	eax, dword ptr [ebp+arg_0]
push	eax		; char
push	offset aLocalemlImport ; "LocaleML Import: Error: %s"
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h

loc_456FA6:
mov	esp, ebp
pop	ebp
retn	4
sub_456F80 endp

align 10h


; Attributes: bp-based frame

sub_456FB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4580F0
mov	esp, ebp
pop	ebp
retn	4
sub_456FB0 endp

align 10h


; Attributes: bp-based frame

sub_456FD0 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_58=	byte ptr -58h
lpMultiByteStr=	dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
cmp	[ebp+lpMultiByteStr], 0
jnz	short loc_456FFF
push	offset aTryingToAddloc ; "trying to AddLocale()	with invalid loca"...
mov	eax, [ebp+var_84]
mov	edx, [eax]
mov	ecx, [ebp+var_84]
mov	eax, [edx+24h]
call	eax
jmp	short loc_457043

loc_456FFF:
lea	ecx, [ebp+var_58]
call	sub_4575C0
mov	ecx, [ebp+lpMultiByteStr]
push	ecx		; lpMultiByteStr
lea	edx, [ebp+var_80]
push	edx		; int
call	sub_10EEF80
add	esp, 8
push	eax
lea	ecx, [ebp+var_58]
call	sub_4023E0
lea	ecx, [ebp+var_80]
call	sub_407E50
lea	eax, [ebp+var_58]
push	eax
mov	ecx, [ebp+var_84]
add	ecx, 4
call	sub_4577E0
lea	ecx, [ebp+var_58]
push	ecx
call	sub_405AC0

loc_457043:
mov	esp, ebp
pop	ebp
retn	4
sub_456FD0 endp

align 10h


; Attributes: bp-based frame

sub_457050 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
lpMultiByteStr=	dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
cmp	[ebp+lpMultiByteStr], 0
jnz	short loc_457073
push	offset aTryingToBeginp ; "trying to BeginPhrase() with invalid id"...
mov	eax, [ebp+var_2C]
mov	edx, [eax]
mov	ecx, [ebp+var_2C]
mov	eax, [edx+24h]
call	eax
jmp	short loc_457097

loc_457073:
mov	ecx, [ebp+lpMultiByteStr]
push	ecx		; lpMultiByteStr
lea	edx, [ebp+var_28]
push	edx		; int
call	sub_10EEF80
add	esp, 8
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 1Ch
call	sub_4023E0
lea	ecx, [ebp+var_28]
call	sub_407E50

loc_457097:
mov	esp, ebp
pop	ebp
retn	4
sub_457050 endp

align 10h


; Attributes: bp-based frame

sub_4570A0 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_84=	dword ptr -84h
var_5C=	byte ptr -5Ch
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
lpMultiByteStr=	dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_457350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_B8], ecx
cmp	[ebp+arg_0], 0
jz	short loc_4570D0
cmp	[ebp+lpMultiByteStr], 0
jnz	short loc_457111

loc_4570D0:
cmp	[ebp+arg_0], 0
jnz	short loc_4570EE
push	offset aTryingToAddtra ; "trying to AddTranslation() with invalid"...
mov	eax, [ebp+var_B8]
mov	edx, [eax]
mov	ecx, [ebp+var_B8]
mov	eax, [edx+24h]
call	eax

loc_4570EE:
cmp	[ebp+lpMultiByteStr], 0
jnz	short loc_45710C
push	offset aTryingToAddt_0 ; "trying to AddTranslation() with invalid"...
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	ecx, [ebp+var_B8]
mov	eax, [edx+24h]
call	eax

loc_45710C:
jmp	loc_4571BD

loc_457111:
mov	ecx, [ebp+lpMultiByteStr]
push	ecx		; lpMultiByteStr
lea	edx, [ebp+var_84]
push	edx		; int
call	sub_10EEF80
add	esp, 8
mov	[ebp+var_B4], eax
mov	eax, [ebp+arg_0]
push	eax		; lpMultiByteStr
lea	ecx, [ebp+var_AC]
push	ecx		; int
call	sub_10EEF80
add	esp, 8
mov	[ebp+var_B0], eax
mov	edx, [ebp+var_B0]
push	edx
lea	ecx, [ebp+var_5C]
call	sub_403400
mov	[ebp+var_4], 0
mov	eax, [ebp+var_B4]
push	eax
lea	ecx, [ebp+var_34]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
push	ecx
mov	ecx, [ebp+var_B8]
add	ecx, 10h
call	sub_4578E0
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_407E50
lea	ecx, [ebp+var_AC]
call	sub_407E50
lea	ecx, [ebp+var_84]
call	sub_407E50

loc_4571BD:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4570A0 endp

align 10h


; Attributes: bp-based frame

sub_4571D0 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_457480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
mov	[ebp+var_88], ecx

loc_4571F1:
mov	ecx, [ebp+var_88]
add	ecx, 10h
call	sub_4A6B60
movzx	eax, al
test	eax, eax
jnz	loc_4572F5
mov	ecx, [ebp+var_88]
add	ecx, 10h
call	sub_457880
push	eax
lea	ecx, [ebp+var_5C]
call	sub_4579B0
mov	ecx, [ebp+var_88]
add	ecx, 10h
call	sub_457950
mov	ecx, [ebp+var_88]
add	ecx, 4
call	sub_457760
mov	[ebp+var_60], eax
mov	[ebp+var_64], 0
jmp	short loc_457252

loc_457249:
mov	ecx, [ebp+var_64]
add	ecx, 1
mov	[ebp+var_64], ecx

loc_457252:
mov	edx, [ebp+var_64]
cmp	edx, [ebp+var_60]
jnb	short loc_4572CE
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+var_88]
add	ecx, 4
call	sub_457780
mov	[ebp+var_84], eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	edx, [ebp+var_84]
push	edx
call	sub_441C20
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_457298
jmp	short loc_457249

loc_457298:
lea	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_88]
add	eax, 1Ch
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	ecx, [ebp+var_88]
add	ecx, 4
call	sub_457780
add	eax, 28h
mov	ecx, eax
call	sub_4582A0
mov	ecx, eax
call	sub_4023E0
jmp	loc_457249

loc_4572CE:
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_407E50
jmp	loc_4571F1

loc_4572F5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4571D0 endp

align 10h


; Attributes: bp-based frame

sub_457310 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
lpMultiByteStr=	dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+lpMultiByteStr]
push	eax		; lpMultiByteStr
lea	ecx, [ebp+var_28]
push	ecx		; int
call	sub_10EEF80
add	esp, 8
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 50h
call	sub_4023E0
lea	ecx, [ebp+var_28]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn	4
sub_457310 endp

align 10h


; Attributes: bp-based frame

sub_457350 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_84=	dword ptr -84h
var_5C=	byte ptr -5Ch
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
lpMultiByteStr=	dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_457350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_B8], ecx
cmp	[ebp+arg_0], 0
jz	short loc_457380
cmp	[ebp+lpMultiByteStr], 0
jnz	short loc_4573C1

loc_457380:
cmp	[ebp+arg_0], 0
jnz	short loc_45739E
push	offset aTryingToAddfon ; "trying to AddFontTranslation() with inv"...
mov	eax, [ebp+var_B8]
mov	edx, [eax]
mov	ecx, [ebp+var_B8]
mov	eax, [edx+24h]
call	eax

loc_45739E:
cmp	[ebp+lpMultiByteStr], 0
jnz	short loc_4573BC
push	offset aTryingToAddf_0 ; "trying to AddFontTranslation() with inv"...
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	ecx, [ebp+var_B8]
mov	eax, [edx+24h]
call	eax

loc_4573BC:
jmp	loc_45746D

loc_4573C1:
mov	ecx, [ebp+lpMultiByteStr]
push	ecx		; lpMultiByteStr
lea	edx, [ebp+var_84]
push	edx		; int
call	sub_10EEF80
add	esp, 8
mov	[ebp+var_B4], eax
mov	eax, [ebp+arg_0]
push	eax		; lpMultiByteStr
lea	ecx, [ebp+var_AC]
push	ecx		; int
call	sub_10EEF80
add	esp, 8
mov	[ebp+var_B0], eax
mov	edx, [ebp+var_B0]
push	edx
lea	ecx, [ebp+var_5C]
call	sub_403400
mov	[ebp+var_4], 0
mov	eax, [ebp+var_B4]
push	eax
lea	ecx, [ebp+var_34]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
push	ecx
mov	ecx, [ebp+var_B8]
add	ecx, 44h
call	sub_4578E0
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_407E50
lea	ecx, [ebp+var_AC]
call	sub_407E50
lea	ecx, [ebp+var_84]
call	sub_407E50

loc_45746D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_457350 endp

align 10h


; Attributes: bp-based frame

sub_457480 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_457480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
mov	[ebp+var_88], ecx

loc_4574A1:
mov	ecx, [ebp+var_88]
add	ecx, 44h
call	sub_4A6B60
movzx	eax, al
test	eax, eax
jnz	loc_4575A5
mov	ecx, [ebp+var_88]
add	ecx, 44h
call	sub_457880
push	eax
lea	ecx, [ebp+var_5C]
call	sub_4579B0
mov	ecx, [ebp+var_88]
add	ecx, 44h
call	sub_457950
mov	ecx, [ebp+var_88]
add	ecx, 4
call	sub_457760
mov	[ebp+var_60], eax
mov	[ebp+var_64], 0
jmp	short loc_457502

loc_4574F9:
mov	ecx, [ebp+var_64]
add	ecx, 1
mov	[ebp+var_64], ecx

loc_457502:
mov	edx, [ebp+var_64]
cmp	edx, [ebp+var_60]
jnb	short loc_45757E
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+var_88]
add	ecx, 4
call	sub_457780
mov	[ebp+var_84], eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	edx, [ebp+var_84]
push	edx
call	sub_441C20
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jz	short loc_457548
jmp	short loc_4574F9

loc_457548:
lea	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_88]
add	eax, 50h
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	ecx, [ebp+var_88]
add	ecx, 4
call	sub_457780
add	eax, 40h
mov	ecx, eax
call	sub_4582A0
mov	ecx, eax
call	sub_4023E0
jmp	loc_4574F9

loc_45757E:
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_407E50
jmp	loc_4574A1

loc_4575A5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_457480 endp

align 10h


; Attributes: bp-based frame

sub_4575C0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4575C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
push	esi
mov	[ebp+var_5C], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
call	sub_402390
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+var_5C]
add	eax, 28h
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_12]
mov	[ebp+var_60], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_13]
mov	[ebp+var_64], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4390C0
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	byte ptr [ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_5C]
add	ecx, 40h
call	sub_436C00
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4575C0 endp

align 10h


; Attributes: bp-based frame

sub_457660 proc	near

var_14=	dword ptr -14h
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	??0ios_base@std@@IAE@XZ	; std::ios_base::ios_base(void)
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_155F848
lea	ecx, [ebp+var_1]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4577C0
call	nullsub_1
lea	ecx, [ebp+var_2]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_4577C0
lea	ecx, [ebp+var_2]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 44h
call	sub_4577C0
lea	ecx, [ebp+var_4]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
lea	ecx, [ebp+var_5]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 50h
call	sub_402390
lea	ecx, [ebp+var_5]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_457660 endp

align 10h


; Attributes: bp-based frame

sub_457710 proc	near

var_28=	dword ptr -28h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_28]
add	ecx, 44h
call	sub_4578A0
mov	ecx, [ebp+var_28]
add	ecx, 1Ch
call	sub_407E50
mov	ecx, [ebp+var_28]
add	ecx, 10h
call	sub_4578A0
mov	eax, [ebp+var_28]
add	eax, 4
push	eax
call	sub_4027A0
mov	esp, ebp
pop	ebp
retn
sub_457710 endp

align 10h


; Attributes: bp-based frame

sub_457760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 58h
idiv	ecx
mov	esp, ebp
pop	ebp
retn
sub_457760 endp

align 10h


; Attributes: bp-based frame

sub_457780 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_420D20
mov	ecx, [ebp+arg_0]
imul	ecx, 58h
add	eax, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_457780 endp

align 10h


; Attributes: bp-based frame

sub_4577A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_420D20
mov	esp, ebp
pop	ebp
retn
sub_4577A0 endp

align 10h


; Attributes: bp-based frame

sub_4577C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_457A80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4577C0 endp

align 10h


; Attributes: bp-based frame

sub_4577E0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_45781B
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
push	edx
call	sub_458490
add	esp, 8
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
add	ecx, 58h
mov	edx, [ebp+var_8]
mov	[edx+4], ecx
jmp	short loc_45783B

loc_45781B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_457A00

loc_45783B:
mov	esp, ebp
pop	ebp
retn	4
sub_4577E0 endp

align 10h


; Attributes: bp-based frame

sub_457850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_421B80
push	eax
mov	eax, [ebp+var_4]
call	sub_420D20
push	eax
mov	ecx, [ebp+var_4]
call	sub_457A40
mov	esp, ebp
pop	ebp
retn
sub_457850 endp

align 10h


; Attributes: bp-based frame

sub_457880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
sub	eax, 50h
mov	esp, ebp
pop	ebp
retn
sub_457880 endp

align 10h


; Attributes: bp-based frame

sub_4578A0 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	ecx
push	esp
mov	ecx, [ebp+var_C]
call	sub_457B30
push	ecx
push	esp
mov	ecx, [ebp+var_C]
call	sub_457B00
call	sub_4584D0
add	esp, 8
mov	ecx, [ebp+var_C]
call	sub_457BA0
mov	esp, ebp
pop	ebp
retn
sub_4578A0 endp

align 10h


; Attributes: bp-based frame

sub_4578E0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_45791B
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
push	edx
call	sub_459740
add	esp, 8
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
add	ecx, 50h
mov	edx, [ebp+var_8]
mov	[edx+4], ecx
jmp	short loc_45793B

loc_45791B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_457AC0

loc_45793B:
mov	esp, ebp
pop	ebp
retn	4
sub_4578E0 endp

align 10h


; Attributes: bp-based frame

sub_457950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
sub	ecx, 50h
mov	edx, [ebp+var_4]
mov	[edx+4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
push	ecx
call	sub_458500
add	esp, 4
mov	esp, ebp
pop	ebp
retn
sub_457950 endp

align 10h


; Attributes: bp-based frame

sub_457980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
push	eax
mov	ecx, [ebp+var_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
mov	ecx, [ebp+var_4]
call	sub_457B60
mov	esp, ebp
pop	ebp
retn
sub_457980 endp

align 10h


; Attributes: bp-based frame

sub_4579B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_403400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4579B0 endp

align 10h


; Attributes: bp-based frame

sub_4579E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [ebp+arg_0]
imul	ecx, 28h
add	eax, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4579E0 endp

align 10h


; Attributes: bp-based frame

sub_457A00 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_457EB0
mov	esp, ebp
pop	ebp
retn	14h
sub_457A00 endp

align 10h


; Attributes: bp-based frame

sub_457A40 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_457A56
mov	eax, [ebp+arg_0]
jmp	short loc_457A6F

loc_457A56:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_457C10

loc_457A6F:
mov	esp, ebp
pop	ebp
retn	8
sub_457A40 endp

align 10h


; Attributes: bp-based frame

sub_457A80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
push	0
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_457C70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_457A80 endp

align 10h


; Attributes: bp-based frame

sub_457AC0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_457CA0
mov	esp, ebp
pop	ebp
retn	14h
sub_457AC0 endp

align 10h


; Attributes: bp-based frame

sub_457B00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
push	eax
mov	ecx, [ebp+arg_0]
call	sub_457E80
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_457B00 endp

align 10h


; Attributes: bp-based frame

sub_457B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
mov	ecx, [ebp+arg_0]
call	sub_457E80
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_457B30 endp

align 10h


; Attributes: bp-based frame

sub_457B60 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_457B76
mov	eax, [ebp+arg_0]
jmp	short loc_457B8F

loc_457B76:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_457D60

loc_457B8F:
mov	esp, ebp
pop	ebp
retn	8
sub_457B60 endp

align 10h


; Attributes: bp-based frame

sub_457BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_457BD4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 50h
idiv	ecx
push	eax		; int
mov	edx, [ebp+var_4]
mov	eax, [edx]
push	eax		; void *
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_457E50

loc_457BD4:
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_457BF0
mov	esp, ebp
pop	ebp
retn
sub_457BA0 endp

align 10h


; Attributes: bp-based frame

sub_457BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	esp, ebp
pop	ebp
retn
sub_457BF0 endp

align 10h


; Attributes: bp-based frame

sub_457C10 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
xor	eax, eax
mov	[ebp+var_5], al
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_458520
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_458550
add	esp, 8
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_457C10 endp

align 10h


; Attributes: bp-based frame

sub_457C70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	??4_Init_locks@std@@QAEAAV01@ABV01@@Z ;	std::_Init_locks::operator=(std::_Init_locks const &)
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_457C70 endp

align 10h


; Attributes: bp-based frame

sub_457CA0 proc	near

var_64=	dword ptr -64h
var_5E=	byte ptr -5Eh
var_5D=	byte ptr -5Dh
var_5C=	byte ptr -5Ch
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_457480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
call	sub_456590
movzx	ecx, al
test	ecx, ecx
jz	short loc_457D23
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_5C]
call	sub_4579B0
xor	eax, eax
mov	[ebp+var_5D], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_5D]
push	eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_64]
call	sub_4581A0
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_407E50
jmp	short loc_457D45

loc_457D23:
xor	eax, eax
mov	[ebp+var_5E], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_5E]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_64]
call	sub_4581A0

loc_457D45:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_457CA0 endp

align 10h


; Attributes: bp-based frame

sub_457D60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_10]
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	[ebp+var_8], eax
jmp	short loc_457D94

loc_457D82:
mov	edx, [ebp+var_4]
add	edx, 50h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
add	eax, 50h
mov	[ebp+var_C], eax

loc_457D94:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jz	short loc_457DC2
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_8]
jz	short loc_457DC2
mov	eax, [ebp+var_4]
push	eax
call	sub_458500
add	esp, 4
mov	ecx, [ebp+var_C]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_458570
add	esp, 8
jmp	short loc_457D82

loc_457DC2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_457DEC
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_4585B0
add	esp, 8
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_4585D0
add	esp, 8
jmp	short loc_457E36

loc_457DEC:
jmp	short loc_457E00

loc_457DEE:
mov	edx, [ebp+var_4]
add	edx, 50h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
add	eax, 50h
mov	[ebp+var_C], eax

loc_457E00:
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_457E26
mov	edx, [ebp+var_4]
push	edx
call	sub_4585F0
add	esp, 4
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_458570
add	esp, 8
jmp	short loc_457DEE

loc_457E26:
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_4585D0
add	esp, 8

loc_457E36:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_457D60 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_457E50(void	*, int)
sub_457E50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
cmp	[ebp+arg_0], 0
jz	short loc_457E70
mov	eax, [ebp+arg_4]
imul	eax, 50h
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_457E70:
mov	esp, ebp
pop	ebp
retn	8
sub_457E50 endp

align 10h
; [00000018 BYTES: COLLAPSED FUNCTION sub_457E80. PRESS	KEYPAD "+" TO EXPAND]
align 10h
; [00000010 BYTES: COLLAPSED FUNCTION std::_Init_locks::operator=(std::_Init_locks const &). PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_457EB0 proc	near

var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_14]
call	sub_458610
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_458780
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_E], dl
lea	eax, [ebp+var_E+1]
push	eax
movzx	ecx, byte ptr [ebp+var_E]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
push	edx
call	sub_458A90
add	esp, 14h
mov	[ebp+var_C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_457F31
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_458490
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 58h
mov	[ebp+var_C], edx
jmp	short loc_457F48

loc_457F31:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_458AB0
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_457F48:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_457F7D
xor	ecx, ecx
mov	byte ptr [ebp+var_10+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
lea	eax, [ebp+var_10+1]
push	eax
movzx	ecx, byte ptr [ebp+var_10]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_458A90
add	esp, 14h
mov	[ebp+var_C], eax

loc_457F7D:
mov	ecx, [ebp+var_14]
call	sub_458730
mov	eax, [ebp+var_4]
imul	eax, 58h
add	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_14]
call	sub_458870
mov	esp, ebp
pop	ebp
retn	14h
sub_457EB0 endp

align 10h


; Attributes: bp-based frame

sub_457FB0 proc	near

var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_18]
jz	loc_4580DD
mov	ecx, [ebp+arg_0]
call	sub_457760
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
call	sub_4586C0
cmp	[ebp+var_4], eax
jbe	short loc_458025
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_18]
call	sub_458AF0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_18]
call	sub_4586E0
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
imul	eax, 58h
mov	ecx, [ebp+var_18]
add	eax, [ecx]
mov	edx, [ebp+var_18]
mov	[edx+8], eax
jmp	loc_4580CC

loc_458025:
mov	ecx, [ebp+var_18]
call	sub_457760
cmp	eax, [ebp+var_4]
jb	short loc_45806E
xor	eax, eax
mov	[ebp+var_11], al
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_458520
add	esp, 10h
mov	[ebp+var_10], eax
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_458550
add	esp, 8
jmp	short loc_4580CC

loc_45806E:
xor	edx, edx
mov	[ebp+var_12], dl
lea	eax, [ebp+var_12]
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_18]
call	sub_457760
imul	eax, 58h
mov	ecx, [ebp+arg_0]
add	eax, [ecx]
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_458520
add	esp, 10h
xor	ecx, ecx
mov	[ebp+var_13], cl
lea	edx, [ebp+var_13]
push	edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_18]
call	sub_457760
imul	eax, 58h
mov	ecx, [ebp+arg_0]
add	eax, [ecx]
push	eax
call	sub_459360
add	esp, 10h

loc_4580CC:
mov	edx, [ebp+var_4]
imul	edx, 58h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+4], edx

loc_4580DD:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_457FB0 endp

align 10h


; Attributes: bp-based frame

sub_4580F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4586C0
cmp	eax, [ebp+arg_0]
jnb	loc_45818E
mov	ecx, [ebp+var_C]
call	sub_458680
cmp	eax, [ebp+arg_0]
jnb	short loc_45811F
mov	ecx, [ebp+var_C]
call	sub_5BD210

loc_45811F:
mov	ecx, [ebp+var_C]
call	sub_457760
mov	[ebp+var_4], eax
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_458158
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C]
call	sub_458AF0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
call	sub_4586E0
jmp	short loc_45816E

loc_458158:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_458780
mov	[ebp+var_8], eax

loc_45816E:
mov	edx, [ebp+arg_0]
imul	edx, 58h
add	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
imul	eax, 58h
add	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_458870

loc_45818E:
mov	esp, ebp
pop	ebp
retn	4
sub_4580F0 endp

align 10h


; Attributes: bp-based frame

sub_4581A0 proc	near

var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4587B0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_4588A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_E], dl
lea	eax, [ebp+var_E+1]
push	eax
movzx	ecx, byte ptr [ebp+var_E]
push	ecx
mov	edx, [ebp+var_8]
push	edx		; void *
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
push	edx		; int
call	sub_458B30
add	esp, 14h
mov	[ebp+var_C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_458221
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_459740
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 50h
mov	[ebp+var_C], edx
jmp	short loc_458238

loc_458221:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_458B90
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_458238:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_45826D
xor	ecx, ecx
mov	byte ptr [ebp+var_10+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
lea	eax, [ebp+var_10+1]
push	eax
movzx	ecx, byte ptr [ebp+var_10]
push	ecx
mov	edx, [ebp+var_C]
push	edx		; void *
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; int
call	sub_458B30
add	esp, 14h
mov	[ebp+var_C], eax

loc_45826D:
mov	ecx, [ebp+var_14]
call	sub_458820
mov	eax, [ebp+var_4]
imul	eax, 50h
add	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_14]
call	sub_458870
mov	esp, ebp
pop	ebp
retn	14h
sub_4581A0 endp

align 10h


; Attributes: bp-based frame

sub_4582A0 proc	near

var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E5=	byte ptr -0E5h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C8=	dword ptr -0C8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	byte ptr -0A4h
var_99=	byte ptr -99h
var_98=	byte ptr -98h
var_70=	byte ptr -70h
var_48=	byte ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4582A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E4h
mov	[ebp+var_E4], ecx
mov	[ebp+var_A8], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_E4]
call	sub_458BD0
mov	ecx, [ebp+var_E4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_B0]
mov	[ebp+var_AC], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_AC]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_B0]
setz	cl
mov	[ebp+var_E5], cl
movzx	edx, [ebp+var_E5]
test	edx, edx
jnz	short loc_458376
or	[ebp+var_A8], 1
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_B4], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_E4]
call	sub_444000
mov	[ebp+var_C8], eax
mov	edx, [ebp+var_B4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_458376
mov	[ebp+var_EC], 0
jmp	short loc_458380

loc_458376:
mov	[ebp+var_EC], 1

loc_458380:
mov	dl, byte ptr [ebp+var_EC]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_A8]
and	eax, 1
jz	short loc_4583A0
and	[ebp+var_A8], 0FFFFFFFEh
call	nullsub_1

loc_4583A0:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_458474
lea	ecx, [ebp+var_99]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_98]
call	sub_402390
mov	[ebp+var_D0], eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_70]
call	sub_403400
mov	[ebp+var_4], 0
mov	eax, [ebp+var_D0]
push	eax
lea	ecx, [ebp+var_48]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_E0]
mov	[ebp+var_D4], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_D4]
call	sub_4046E0
lea	edx, [ebp+var_70]
push	edx
push	ecx
mov	[ebp+var_DC], esp
mov	ecx, [ebp+var_E0]
mov	eax, [ebp+var_DC]
call	sub_4046E0
lea	eax, [ebp+var_A4]
push	eax
mov	ecx, [ebp+var_E4]
call	sub_448E70
lea	ecx, [ebp+var_A4]
mov	[ebp+var_F0], ecx
mov	edx, [ebp+var_F0]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_70]
push	ecx
call	sub_405CD0
lea	ecx, [ebp+var_98]
call	sub_407E50
lea	ecx, [ebp+var_99]
call	nullsub_1

loc_458474:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4582A0 endp

align 10h


; Attributes: bp-based frame

sub_458490 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BC5D0
add	esp, 4
mov	[ebp+var_1], al
call	sub_5BC5D0
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_459830
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_458490 endp

align 10h


; Attributes: bp-based frame

sub_4584D0 proc	near

arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0
push	ecx
mov	ecx, esp
lea	eax, [ebp+arg_4]
push	eax
call	sub_4588D0
push	ecx
mov	ecx, esp
lea	edx, [ebp+arg_0]
push	edx
call	sub_4588D0
call	sub_458BF0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4584D0 endp

align 10h


; Attributes: bp-based frame

sub_458500 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_458C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_458500 endp

align 10h


; Attributes: bp-based frame

sub_458520 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
push	0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_458C40
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_458520 endp

align 10h


; Attributes: bp-based frame

sub_458550 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_458C90
add	esp, 0Ch
pop	ebp
retn
sub_458550 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_458570(void *, int)
sub_458570 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BC5D0
add	esp, 4
mov	[ebp+var_1], al
call	sub_5BC5D0
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_458CC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_458570 endp

align 10h


; Attributes: bp-based frame

sub_4585B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_458D10
add	esp, 0Ch
pop	ebp
retn
sub_4585B0 endp

align 10h


; Attributes: bp-based frame

sub_4585D0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_458D40
add	esp, 0Ch
pop	ebp
retn
sub_4585D0 endp

align 10h


; Attributes: bp-based frame

sub_4585F0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	__initp_misc_winxfltr
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_4585F0 endp

align 10h


; Attributes: bp-based frame

sub_458610 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_457760
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
call	sub_458680
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_45863C
mov	ecx, [ebp+var_10]
call	sub_5BD210

loc_45863C:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_10]
call	sub_458680
cmp	[ebp+var_4], eax
ja	short loc_458669
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_458674

loc_458669:
mov	ecx, [ebp+var_10]
call	sub_458680
mov	[ebp+var_4], eax

loc_458674:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_458610 endp

align 10h


; Attributes: bp-based frame

sub_458680 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 2E8BA2Eh
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_458910
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
jnb	short loc_4586AE
mov	ecx, [ebp+var_8]
mov	[ebp+var_10], ecx
jmp	short loc_4586B4

loc_4586AE:
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx

loc_4586B4:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_458680 endp

align 10h


; Attributes: bp-based frame

sub_4586C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 58h
idiv	ecx
mov	esp, ebp
pop	ebp
retn
sub_4586C0 endp

align 10h


; Attributes: bp-based frame

sub_4586E0 proc	near

var_28=	dword ptr -28h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_28]
call	sub_402EB0
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_28]
call	sub_402FE0
call	sub_4041D0
add	esp, 8
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 58h
idiv	ecx
mov	edx, [ebp+var_28]
mov	ecx, [edx]	; void *
call	sub_4030C0
mov	esp, ebp
pop	ebp
retn
sub_4586E0 endp

align 10h


; Attributes: bp-based frame

sub_458730 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_C]
call	sub_402EB0
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_C]
call	sub_402FE0
call	sub_458D70
add	esp, 8
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 58h
idiv	ecx
mov	edx, [ebp+var_C]
mov	ecx, [edx]	; void *
call	sub_4030C0
mov	esp, ebp
pop	ebp
retn
sub_458730 endp

align 10h


; Attributes: bp-based frame

sub_458780 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4588F0
mov	esp, ebp
pop	ebp
retn	8
sub_458780 endp

align 10h


; Attributes: bp-based frame

sub_4587B0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_458920
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
call	sub_458940
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_4587DC
mov	ecx, [ebp+var_10]
call	sub_5BD210

loc_4587DC:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_10]
call	sub_458940
cmp	[ebp+var_4], eax
ja	short loc_458809
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_458814

loc_458809:
mov	ecx, [ebp+var_10]
call	sub_458940
mov	[ebp+var_4], eax

loc_458814:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4587B0 endp

align 10h


; Attributes: bp-based frame

sub_458820 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	ecx
push	esp
mov	ecx, [ebp+var_C]
call	sub_457B30
push	ecx
push	esp
mov	ecx, [ebp+var_C]
call	sub_457B00
call	sub_458DA0
add	esp, 8
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
push	eax		; int
mov	edx, [ebp+var_C]
mov	eax, [edx]
push	eax		; void *
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_457E50
mov	esp, ebp
pop	ebp
retn
sub_458820 endp

align 10h


; Attributes: bp-based frame

sub_458870 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_458870 endp

align 10h


; Attributes: bp-based frame

sub_4588A0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_458980
mov	esp, ebp
pop	ebp
retn	8
sub_4588A0 endp

align 10h


; Attributes: bp-based frame

sub_4588D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4588D0 endp

align 10h


; Attributes: bp-based frame

sub_4588F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_4589A0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4588F0 endp

align 10h


; Attributes: bp-based frame

sub_458910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E8BA2Eh
mov	esp, ebp
pop	ebp
retn
sub_458910 endp



; Attributes: bp-based frame

sub_458920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
mov	esp, ebp
pop	ebp
retn
sub_458920 endp

align 10h


; Attributes: bp-based frame

sub_458940 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 3333333h
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_458A10
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
jnb	short loc_45896E
mov	ecx, [ebp+var_8]
mov	[ebp+var_10], ecx
jmp	short loc_458974

loc_45896E:
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx

loc_458974:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_458940 endp

align 10h


; Attributes: bp-based frame

sub_458980 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_458A20
mov	esp, ebp
pop	ebp
retn	0Ch
sub_458980 endp

align 10h


; Attributes: bp-based frame

sub_4589A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_458910
cmp	[ebp+arg_0], eax
jbe	short loc_4589CA
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_4589CA:
cmp	[ebp+arg_0], 0
jz	short loc_4589FE
mov	eax, [ebp+arg_0]
imul	eax, 58h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 58h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_458A00

loc_4589FE:
xor	eax, eax

loc_458A00:
mov	esp, ebp
pop	ebp
retn	8
sub_4589A0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_458A10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3333333h
mov	esp, ebp
pop	ebp
retn
sub_458A10 endp



; Attributes: bp-based frame

sub_458A20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_458A10
cmp	[ebp+arg_0], eax
jbe	short loc_458A4A
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_458A4A:
cmp	[ebp+arg_0], 0
jz	short loc_458A7E
mov	eax, [ebp+arg_0]
imul	eax, 50h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 50h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_458A80

loc_458A7E:
xor	eax, eax

loc_458A80:
mov	esp, ebp
pop	ebp
retn	8
sub_458A20 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_458A90 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
lea	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_459360
add	esp, 10h
pop	ebp
retn
sub_458A90 endp

align 10h


; Attributes: bp-based frame

sub_458AB0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
imul	eax, 58h
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
push	0
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_459390
add	esp, 14h
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_458AB0 endp

align 10h


; Attributes: bp-based frame

sub_458AF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_458780
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4593E0
add	esp, 0Ch
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_458AF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_458B30(int, int, void	*)
sub_458B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4], eax
jmp	short loc_458B50

loc_458B47:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_458B50:
cmp	[ebp+var_4], 0
jle	short loc_458B7A
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+arg_8]
push	ecx		; void *
call	sub_458570
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 50h
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
add	eax, 50h
mov	[ebp+arg_8], eax
jmp	short loc_458B47

loc_458B7A:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_458B30 endp

align 10h


; Attributes: bp-based frame

sub_458B90 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
imul	eax, 50h
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
push	0
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_459410
add	esp, 14h
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_458B90 endp

align 10h


; Attributes: bp-based frame

sub_458BD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_459460
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_458BD0 endp



; Attributes: bp-based frame

sub_458BF0 proc	near

var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	ecx, esp
lea	eax, [ebp+arg_4]
push	eax
call	sub_4588D0
push	ecx
mov	ecx, esp
lea	edx, [ebp+arg_0]
push	edx
call	sub_4588D0
call	sub_459490
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_458BF0 endp

align 10h


; Attributes: bp-based frame

sub_458C30 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0
mov	ecx, [ebp+arg_0]
call	sub_458E10
pop	ebp
retn
sub_458C30 endp

align 10h


; Attributes: bp-based frame

sub_458C40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_4], eax
jmp	short loc_458C60

loc_458C57:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_458C60:
cmp	[ebp+var_4], 0
jle	short loc_458C86
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_458E80
mov	ecx, [ebp+arg_0]
add	ecx, 58h
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_8]
add	edx, 58h
mov	[ebp+arg_8], edx
jmp	short loc_458C57

loc_458C86:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_458C40 endp

align 10h


; Attributes: bp-based frame

sub_458C90 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4594E0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_458C90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_458CC0(void *, int)
sub_458CC0 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	50h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_458CFD
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_459510
add	esp, 8
mov	eax, [eax]
push	eax
mov	ecx, [ebp+var_4]
call	sub_458F00
mov	[ebp+var_C], eax
jmp	short loc_458D04

loc_458CFD:
mov	[ebp+var_C], 0

loc_458D04:
mov	esp, ebp
pop	ebp
retn
sub_458CC0 endp

align 10h


; Attributes: bp-based frame

sub_458D10 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_459530
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_458D10 endp

align 10h


; Attributes: bp-based frame

sub_458D40 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_458D40 endp

align 10h


; Attributes: bp-based frame

sub_458D70 proc	near

arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
call	sub_459570
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_458D70 endp

align 10h


; Attributes: bp-based frame

sub_458DA0 proc	near

arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0
push	ecx
mov	ecx, esp
lea	eax, [ebp+arg_4]
push	eax
call	sub_4588D0
push	ecx
mov	ecx, esp
lea	edx, [ebp+arg_0]
push	edx
call	sub_4588D0
call	sub_4595A0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_458DA0 endp

align 10h


; Attributes: bp-based frame

sub_458DD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_458EC0
mov	edx, [ebp+arg_0]
add	edx, 40h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_458EC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_458DD0 endp



; Attributes: bp-based frame

sub_458E10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_432DE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_458E65
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_458E65:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_458E10 endp

align 10h


; Attributes: bp-based frame

sub_458E80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_458EE0
mov	edx, [ebp+arg_0]
add	edx, 40h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_458EE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_458E80 endp



; Attributes: bp-based frame

sub_458EC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_458FC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_458EC0 endp

align 10h


; Attributes: bp-based frame

sub_458EE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_459270
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_458EE0 endp

align 10h


; Attributes: bp-based frame

sub_458F00 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_458F00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_6C], ecx
lea	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_44D600
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
add	eax, 28h
mov	[ebp+var_40], eax
mov	edx, [ebp+var_40]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
add	ecx, 28h
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_68]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_64]
call	sub_44D600
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_458F00 endp

align 10h


; Attributes: bp-based frame

sub_458FC0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_458FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
push	esi
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_459170
mov	[ebp+var_38], eax
xor	ecx, ecx
mov	[ebp+var_20], ecx
mov	[ebp+var_1C], ecx
mov	[ebp+var_18], ecx
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_20]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_28], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_34]
mov	[eax], ecx
mov	edx, [ebp+var_30]
mov	[eax+4], edx
mov	ecx, [ebp+var_2C]
mov	[eax+8], ecx
mov	edx, [ebp+var_28]
mov	[eax+0Ch], edx
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	ecx, [ebp+var_44]
call	sub_5E11A0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_44]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+14h]
mov	eax, [ebp+var_44]
mov	[eax+14h], dl
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_3C], edx
cmp	[ebp+var_3C], 0
jz	short loc_4590E8
mov	eax, [ebp+var_44]
push	eax
call	sub_456EE0
add	esp, 4
mov	byte ptr [eax],	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
mov	ecx, [ebp+var_44]
call	sub_459190
mov	esi, eax
mov	eax, [ebp+var_44]
call	sub_403030
mov	[eax], esi
mov	eax, [ebp+var_44]
call	sub_403030
mov	edx, [eax]
push	edx
call	sub_459110
add	esp, 4
mov	esi, eax
mov	eax, [ebp+var_44]
call	sub_4044C0
mov	[eax], esi
mov	eax, [ebp+var_44]
call	sub_403030
mov	eax, [eax]
push	eax
call	sub_459140
add	esp, 4
mov	esi, eax
mov	eax, [ebp+var_44]
call	sub_403040
mov	[eax], esi

loc_4590E8:
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_458FC0 endp

align 10h


; Attributes: bp-based frame

sub_459110 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax

loc_45911A:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+8], 0
jz	short loc_45912E
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
jmp	short loc_45911A

loc_45912E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_459110 endp

align 10h


; Attributes: bp-based frame

sub_459140 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax

loc_45914A:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_45915E
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
mov	[ebp+var_4], eax
jmp	short loc_45914A

loc_45915E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_459140 endp

align 10h


; Attributes: bp-based frame

sub_459170 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
call	??4_Init_locks@std@@QAEAAV01@ABV01@@Z ;	std::_Init_locks::operator=(std::_Init_locks const &)
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_459170 endp

align 10h


; Attributes: bp-based frame

sub_459190 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_4595E0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
call	sub_403040
cmp	dword ptr [eax], 0
jz	short loc_4591E2
mov	eax, [ebp+var_4]
push	eax
mov	eax, [ebp+arg_0]
call	sub_403040
mov	ecx, [eax]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_459190
mov	esi, eax
mov	eax, [ebp+var_4]
call	sub_403040
mov	[eax], esi

loc_4591E2:
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
call	sub_4044C0
mov	eax, [eax]
mov	[ebp+arg_0], eax

loc_4591F5:
cmp	[ebp+arg_0], 0
jz	short loc_459265
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_4595E0
mov	[ebp+var_8], eax
mov	eax, [ebp+arg_4]
call	sub_4044C0
mov	edx, [ebp+var_8]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
call	sub_403040
cmp	dword ptr [eax], 0
jz	short loc_459250
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
call	sub_403040
mov	eax, [eax]
push	eax
mov	ecx, [ebp+var_C]
call	sub_459190
mov	esi, eax
mov	eax, [ebp+var_8]
call	sub_403040
mov	[eax], esi

loc_459250:
mov	ecx, [ebp+var_8]
mov	[ebp+arg_4], ecx
mov	eax, [ebp+arg_0]
call	sub_4044C0
mov	edx, [eax]
mov	[ebp+arg_0], edx
jmp	short loc_4591F5

loc_459265:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_459190 endp

align 10h


; Attributes: bp-based frame

sub_459270 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	eax, [ebp+arg_0]
jz	loc_45934C
mov	esi, [ebp+var_C]
call	sub_405BD0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_C]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4592DD
mov	eax, [ebp+var_C]
call	sub_403030
mov	dword ptr [eax], 0
mov	eax, [ebp+var_C]
call	sub_4044C0
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	eax, [ebp+var_C]
call	sub_403040
mov	edx, [ebp+var_C]
mov	[eax], edx
jmp	short loc_45934C

loc_4592DD:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_C]
call	sub_459190
mov	esi, eax
mov	eax, [ebp+var_C]
call	sub_403030
mov	[eax], esi
mov	eax, [ebp+var_C]
call	sub_403030
mov	ecx, [eax]
push	ecx
call	sub_459110
add	esp, 4
mov	esi, eax
mov	eax, [ebp+var_C]
call	sub_4044C0
mov	[eax], esi
mov	eax, [ebp+var_C]
call	sub_403030
mov	edx, [eax]
push	edx
call	sub_459140
add	esp, 4
mov	esi, eax
mov	eax, [ebp+var_C]
call	sub_403040
mov	[eax], esi
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx

loc_45934C:
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_459270 endp

align 10h


; Attributes: bp-based frame

sub_459360 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
push	0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4596A0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_459360 endp

align 10h


; Attributes: bp-based frame

sub_459390 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_4593C1

loc_4593AF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
add	eax, 58h
mov	[ebp+var_4], eax

loc_4593C1:
cmp	[ebp+var_8], 0
jle	short loc_4593D9
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_458490
add	esp, 8
jmp	short loc_4593AF

loc_4593D9:
mov	esp, ebp
pop	ebp
retn
sub_459390 endp

align 10h


; Attributes: bp-based frame

sub_4593E0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
call	sub_5BC5D0
mov	[ebp+var_1], al
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_459700
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4593E0 endp

align 10h


; Attributes: bp-based frame

sub_459410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_459441

loc_45942F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
add	eax, 50h
mov	[ebp+var_4], eax

loc_459441:
cmp	[ebp+var_8], 0
jle	short loc_459459
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_459740
add	esp, 8
jmp	short loc_45942F

loc_459459:
mov	esp, ebp
pop	ebp
retn
sub_459410 endp

align 10h


; Attributes: bp-based frame

sub_459460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
call	sub_459780
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_459460 endp

align 10h


; Attributes: bp-based frame

sub_459490 proc	near

var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	ecx
jmp	short loc_45949E

loc_459496:
lea	ecx, [ebp+arg_0]
call	sub_459660

loc_45949E:
lea	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+arg_0]
call	sub_459680
movzx	ecx, al
test	ecx, ecx
jz	short loc_4594CD
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
lea	ecx, [ebp+arg_0]
call	sub_459630
push	eax
call	sub_458C30
add	esp, 8
jmp	short loc_459496

loc_4594CD:
mov	esp, ebp
pop	ebp
retn
sub_459490 endp

align 10h


; Attributes: bp-based frame

sub_4594E0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
jmp	short loc_4594EF

loc_4594E6:
mov	eax, [ebp+arg_0]
add	eax, 58h
mov	[ebp+arg_0], eax

loc_4594EF:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jz	short loc_459506
xor	edx, edx
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_0]
call	sub_4059E0
jmp	short loc_4594E6

loc_459506:
mov	esp, ebp
pop	ebp
retn
sub_4594E0 endp

align 10h


; Attributes: bp-based frame

sub_459510 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_457E80
mov	eax, [ebp+arg_0]
pop	ebp
retn
sub_459510 endp

align 10h


; Attributes: bp-based frame

sub_459530 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
jmp	short loc_45953F

loc_459536:
mov	eax, [ebp+arg_0]
add	eax, 50h
mov	[ebp+arg_0], eax

loc_45953F:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jz	short loc_45955E
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_458C30
add	esp, 8
jmp	short loc_459536

loc_45955E:
mov	esp, ebp
pop	ebp
retn
sub_459530 endp

align 10h


; Attributes: bp-based frame

sub_459570 proc	near

var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_1], al
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
call	sub_405620
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_459570 endp

align 10h


; Attributes: bp-based frame

sub_4595A0 proc	near

var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	ecx, esp
lea	eax, [ebp+arg_4]
push	eax
call	sub_4588D0
push	ecx
mov	ecx, esp
lea	edx, [ebp+arg_0]
push	edx
call	sub_4588D0
call	__initp_misc_winxfltr
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4595A0 endp

align 10h


; Attributes: bp-based frame

sub_4595E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
call	sub_404540
push	eax
mov	ecx, [ebp+var_8]
call	sub_44D1A0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_456EE0
add	esp, 4
mov	esi, eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_456EE0
add	esp, 4
mov	dl, [esi]
mov	[eax], dl
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4595E0 endp

align 10h


; Attributes: bp-based frame

sub_459630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 50h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_459630 endp

align 10h


; Attributes: bp-based frame

sub_459660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
sub	ecx, 50h
mov	edx, [ebp+var_4]
mov	[edx], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_459660 endp

align 10h


; Attributes: bp-based frame

sub_459680 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setnz	al
mov	esp, ebp
pop	ebp
retn	4
sub_459680 endp

align 10h


; Attributes: bp-based frame

sub_4596A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_4596C8

loc_4596BF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_4596C8:
cmp	[ebp+var_8], 0
jle	short loc_4596F2
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_458490
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 58h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 58h
mov	[ebp+var_4], eax
jmp	short loc_4596BF

loc_4596F2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4596A0 endp

align 10h


; Attributes: bp-based frame

sub_459700 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
push	0
push	0
call	sub_5BC5D0
add	esp, 8
mov	[ebp+var_1], al
call	sub_5BC5D0
mov	[ebp+var_2], al
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_459360
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_459700 endp

align 10h


; Attributes: bp-based frame

sub_459740 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BC5D0
add	esp, 4
mov	[ebp+var_1], al
call	sub_5BC5D0
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_459870
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_459740 endp

align 10h


; Attributes: bp-based frame

sub_459780 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4597AD:
cmp	[ebp+var_14], 0
jz	short loc_45981A
lea	eax, [ebp+var_19]
mov	[ebp+var_5C], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
call	sub_404540
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_45980B
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
call	sub_4044C0
mov	eax, [eax]
mov	[ebp+var_14], eax
jmp	short loc_459818

loc_45980B:
mov	eax, [ebp+var_14]
call	sub_403040
mov	ecx, [eax]
mov	[ebp+var_14], ecx

loc_459818:
jmp	short loc_4597AD

loc_45981A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_459780 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_459830(void *, int)
sub_459830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax		; void *
push	58h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45985E
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_458DD0
mov	[ebp+var_8], eax
jmp	short loc_459865

loc_45985E:
mov	[ebp+var_8], 0

loc_459865:
mov	esp, ebp
pop	ebp
retn
sub_459830 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_459870(void *, int)
sub_459870 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax		; void *
push	50h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45989E
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_4579B0
mov	[ebp+var_8], eax
jmp	short loc_4598A5

loc_45989E:
mov	[ebp+var_8], 0

loc_4598A5:
mov	esp, ebp
pop	ebp
retn
sub_459870 endp

align 10h


; Attributes: bp-based frame

sub_4598B0 proc	near

var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_10]
push	eax
mov	esi, [ebp+arg_0]
mov	eax, [ebp+var_14]
call	sub_40BEE0
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4598DA
fld	[ebp+var_10]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx]

loc_4598DA:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4598B0 endp

align 10h


; Attributes: bp-based frame

sub_4598F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [ebp+arg_0]
imul	ecx, 18h
add	eax, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4598F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_459910(float)
sub_459910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+4+var_4]
call	sub_41BAD0
add	esp, 4
pop	ebp
retn
sub_459910 endp

align 10h


; Attributes: bp-based frame

sub_459930 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, [ebp+arg_0]
test	eax, eax
jz	short loc_459955
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
or	ecx, [eax+4]
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[eax], ecx
jmp	short loc_45996B

loc_459955:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
not	ecx
and	ecx, [edx]
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[eax], ecx

loc_45996B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_459930 endp

align 10h


; Attributes: bp-based frame

sub_459980 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
and	eax, [edx+4]
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_1], al
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_4599BD
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
or	edx, [ecx+4]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ecx], edx
jmp	short loc_4599D3

loc_4599BD:
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
not	edx
and	edx, [eax]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ecx], edx

loc_4599D3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_459980 endp

align 10h


; Attributes: bp-based frame

sub_4599E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
add	eax, 1
mov	edx, [ebp+var_4]
mov	[edx+4], eax
cmp	ecx, 1Fh
jnz	short loc_459A18
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
add	edx, 4
mov	eax, [ebp+var_4]
mov	[eax], edx

loc_459A18:
mov	esp, ebp
pop	ebp
retn
sub_4599E0 endp

align 10h


; Attributes: bp-based frame

sub_459A20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cdq
and	edx, 1Fh
add	eax, edx
sar	eax, 5
mov	edx, [ebp+var_8]
mov	ecx, [edx]
lea	edx, [ecx+eax*4]
mov	eax, [ebp+var_8]
mov	[eax], edx
mov	ecx, [ebp+var_4]
and	ecx, 8000001Fh
jns	short loc_459A5E
dec	ecx
or	ecx, 0FFFFFFE0h
inc	ecx

loc_459A5E:
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jge	short loc_459A82
mov	edx, [ebp+var_4]
add	edx, 20h
mov	eax, [ebp+var_8]
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
sub	edx, 4
mov	eax, [ebp+var_8]
mov	[eax], edx
jmp	short loc_459A8B

loc_459A82:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx

loc_459A8B:
mov	esp, ebp
pop	ebp
retn	4
sub_459A20 endp

align 10h


; Attributes: bp-based frame

sub_459AA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+arg_0]
call	sub_42A860
fstp	[ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax+0Ch]
fchs
fld	[ebp+var_4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_459AD3
mov	eax, 2
jmp	short loc_459AEF
jmp	short loc_459AEF

loc_459AD3:
fld	[ebp+var_4]
mov	ecx, [ebp+var_8]
fld	dword ptr [ecx+0Ch]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_459AED
mov	eax, 1
jmp	short loc_459AEF
jmp	short loc_459AEF

loc_459AED:
xor	eax, eax

loc_459AEF:
mov	esp, ebp
pop	ebp
retn	4
sub_459AA0 endp

align 10h


; Attributes: bp-based frame

sub_459B00 proc	near

var_F8=	dword ptr -0F8h
var_EC=	dword ptr -0ECh
var_6C=	byte ptr -6Ch
var_38=	byte ptr -38h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0ECh
push	esi
push	edi
mov	[ebp+var_EC], ecx
mov	eax, [ebp+var_EC]
call	sub_4107E0
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_459B82
lea	eax, [ebp+var_38]
call	nullsub_1
mov	eax, [ebp+var_4]
call	sub_412DF0
push	eax
lea	edx, [ebp+var_38]
call	sub_123B500
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_6C]
push	ecx
lea	edx, [ebp+var_38]
push	edx
call	sub_417C80
mov	edi, [ebp+var_EC]
add	edi, 2Ch
mov	ecx, 0Dh
lea	esi, [ebp+var_6C]
rep movsd
mov	eax, [ebp+var_EC]
push	ecx		; float
fld	dword ptr [eax+5Ch]
fstp	[esp+0F8h+var_F8]
call	sub_40F4E0
add	esp, 4
mov	ecx, [ebp+var_EC]
fstp	dword ptr [ecx+5Ch]
jmp	short loc_459BB3

loc_459B82:
mov	esi, [ebp+arg_0]
mov	edi, [ebp+var_EC]
add	edi, 2Ch
mov	ecx, 0Dh
rep movsd
mov	edx, [ebp+var_EC]
push	ecx		; float
fld	dword ptr [edx+5Ch]
fstp	[esp+0F8h+var_F8]
call	sub_40F4E0
add	esp, 4
mov	eax, [ebp+var_EC]
fstp	dword ptr [eax+5Ch]

loc_459BB3:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_459B00 endp

align 10h


; Attributes: bp-based frame

sub_459BC0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
push	esi
mov	[ebp+var_34], ecx
mov	ecx, [ebp+arg_0]
call	sub_405D30
movzx	eax, al
test	eax, eax
jz	short loc_459BDE
jmp	loc_459C97

loc_459BDE:
mov	eax, [ebp+arg_0]
call	sub_421B80
mov	[ebp+var_4], eax

loc_459BE9:
cmp	[ebp+var_4], 0
jz	loc_459C97
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_4]
call	sub_411C00
lea	esi, [ebp+var_8]
call	sub_41E510
lea	eax, [ebp+var_8]
call	sub_420D20
mov	[ebp+var_38], eax
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	ecx, [ebp+var_38]
mov	edx, [eax+48h]
call	edx
mov	[ebp+var_10], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+4]
call	eax
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_34]
lea	eax, [edx+ecx*4+8]
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_41EAC0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_471420
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_41EC30
lea	ecx, [ebp+var_14]
call	sub_429100
lea	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_34]
lea	ecx, [eax+edx*4+8]
call	sub_41EAC0
lea	ecx, [ebp+var_8]
call	sub_429100
jmp	loc_459BE9

loc_459C97:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_459BC0 endp

align 10h


; Attributes: bp-based frame

sub_459CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset sub_12381D0
push	6
push	10h
mov	eax, [ebp+var_4]
push	eax
call	sub_4078B0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+60h], 3Fh
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_459CA0 endp

align 10h


; Attributes: bp-based frame

sub_459CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
shl	eax, 4
add	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_459CD0 endp

align 10h


; Attributes: bp-based frame

sub_459CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
call	sub_41F8F0
movzx	eax, al
test	eax, eax
jnz	short loc_459D0C
xor	al, al
jmp	short loc_459D36

loc_459D0C:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+140h]
call	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_459D27
xor	al, al
jmp	short loc_459D36

loc_459D27:
mov	edx, [ebp+var_4]
mov	dword ptr [edx+94h], 2
mov	al, 1

loc_459D36:
mov	esp, ebp
pop	ebp
retn
sub_459CF0 endp

align 10h


; Attributes: bp-based frame

sub_459D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	2
mov	eax, [ebp+var_4]
call	sub_41F8F0
movzx	eax, al
test	eax, eax
jnz	short loc_459D5C
xor	al, al
jmp	short loc_459D93

loc_459D5C:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+144h]
call	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_459D84
mov	edx, [ebp+var_4]
mov	dword ptr [edx+94h], 0
xor	al, al
jmp	short loc_459D93

loc_459D84:
mov	eax, [ebp+var_4]
mov	dword ptr [eax+94h], 0
mov	al, 1

loc_459D93:
mov	esp, ebp
pop	ebp
retn
sub_459D40 endp

align 10h


; Attributes: bp-based frame

sub_459DA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
push	0
mov	ecx, [ebp+var_8]
call	sub_41FAB0
movzx	eax, al
test	eax, eax
jnz	short loc_459DBE
xor	al, al
jmp	short loc_459DD8

loc_459DBE:
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+74h]
call	edx
push	eax
mov	eax, [ebp+var_8]
call	sub_421B90

loc_459DD8:
mov	esp, ebp
pop	ebp
retn	4
sub_459DA0 endp

align 10h


; Attributes: bp-based frame

sub_459DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0B4h
call	sub_420D20
call	sub_417FD0
mov	esp, ebp
pop	ebp
retn
sub_459DE0 endp

align 10h


; Attributes: bp-based frame

sub_459E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0B4h
call	sub_420D20
call	sub_417FC0
mov	esp, ebp
pop	ebp
retn
sub_459E00 endp

align 10h


; Attributes: bp-based frame

sub_459E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0B4h
call	sub_420D20
call	sub_417BF0
mov	esp, ebp
pop	ebp
retn
sub_459E20 endp

align 10h


; Attributes: bp-based frame

sub_459E40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_10], ecx
push	1
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jz	short loc_459EA1
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_459E89
push	1
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_14], eax
jmp	short loc_459E90

loc_459E89:
mov	[ebp+var_14], 0

loc_459E90:
lea	ecx, [ebp+arg_0]
push	ecx
push	1
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_40FBD0

loc_459EA1:
mov	edx, [ebp+arg_0]
push	edx
mov	esi, [ebp+var_10]
call	sub_1163900
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_459E40 endp

align 10h


; Attributes: bp-based frame

sub_459EC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_10], ecx
push	2
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jz	short loc_459F21
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_459F09
push	1
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_14], eax
jmp	short loc_459F10

loc_459F09:
mov	[ebp+var_14], 0

loc_459F10:
lea	ecx, [ebp+arg_0]
push	ecx
push	2
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_40FBD0

loc_459F21:
mov	edx, [ebp+arg_0]
push	edx
mov	esi, [ebp+var_10]
call	sub_1163900
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_459EC0 endp

align 10h


; Attributes: bp-based frame

sub_459F40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 0B4h
call	sub_422EC0
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
call	sub_417EA0
mov	esp, ebp
pop	ebp
retn
sub_459F40 endp

align 10h


; Attributes: bp-based frame

sub_459F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	esi, [ebp+var_4]
call	sub_1160EC0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1553EE8
mov	ecx, [ebp+var_4]
movss	xmm0, [ebp+arg_0]
movss	dword ptr [ecx+0Ch], xmm0
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_459F70 endp



; Attributes: bp-based frame

sub_459FA0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	edi
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 0
jnz	short loc_459FC0
mov	eax, [ebp+var_10]
add	eax, 680h
call	sub_420D20
mov	[ebp+arg_0], eax

loc_459FC0:
push	0
mov	eax, [ebp+arg_0]
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+6Ch]
call	eax
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
call	sub_418380
mov	edi, offset off_17EE000
call	sub_418390
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
call	sub_418400
pop	edi
mov	esp, ebp
pop	ebp
retn	4
sub_459FA0 endp

align 10h


; Attributes: bp-based frame

sub_45A000 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 8A8h
call	sub_46B1A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_20]
add	ecx, 8B8h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
movzx	eax, word ptr [edx+8]
cmp	[ebp+var_4], eax
jb	short loc_45A049
mov	ecx, [ebp+var_1C]
movzx	edx, word ptr [ecx+0Eh]
add	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_479BC0

loc_45A049:
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_46B100
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_45A000 endp

align 10h


; Attributes: bp-based frame

sub_45A070 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 8C8h
call	sub_46B1A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_20]
add	ecx, 8D8h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
movzx	eax, word ptr [edx+8]
cmp	[ebp+var_4], eax
jb	short loc_45A0B9
mov	ecx, [ebp+var_1C]
movzx	edx, word ptr [ecx+0Eh]
add	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_479BC0

loc_45A0B9:
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_46B100
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_45A070 endp

align 10h


; Attributes: bp-based frame

sub_45A0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+14h]
mov	esp, ebp
pop	ebp
retn
sub_45A0E0 endp

align 10h


; Attributes: bp-based frame

sub_45A100 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+edx*4]
mov	esp, ebp
pop	ebp
retn	4
sub_45A100 endp

align 10h


; Attributes: bp-based frame

sub_45A120 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
mov	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_45A120 endp

align 10h


; Attributes: bp-based frame

sub_45A150 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4694E0
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_0]
mov	al, [edx+18h]
mov	[ecx+18h], al
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_45A150 endp

align 10h


; Attributes: bp-based frame

sub_45A180 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, 13A6h
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_156AF90
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+38h], 0FFFFFFFFh
mov	edx, [ebp+var_10]
mov	byte ptr [edx+3Ch], 0
push	offset aId_2	; "id"
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_402310
mov	eax, [ebp+var_10]
mov	dword ptr [eax+40h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+44h], 0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_45A180 endp

align 10h


; Attributes: bp-based frame

sub_45A220 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45A25B
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45A25B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45A220 endp

align 10h


; Attributes: bp-based frame

sub_45A270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_45A270 endp

align 10h


; Attributes: bp-based frame

sub_45A2A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45A2D7
mov	ecx, 13A9h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A0C
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_45A2DE

loc_45A2D7:
mov	[ebp+var_8], 0

loc_45A2DE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45A2A0 endp

align 10h


; Attributes: bp-based frame

sub_45A2F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax
xor	ecx, ecx
cmp	eax, 7
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_45A327
mov	eax, [ebp+var_4]
mov	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+var_4]
mov	ecx, [edx+8]
call	sub_64AE50
jmp	short loc_45A329

loc_45A327:
xor	eax, eax

loc_45A329:
mov	esp, ebp
pop	ebp
retn
sub_45A2F0 endp

align 10h


; Attributes: bp-based frame

sub_45A330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	esi, [ebp+var_4]
call	sub_1160EC0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AFA8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 0
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+1Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+28h], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+2Ch], 0FFFFFFFFh
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+30h], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	cl, [eax+40h]
and	cl, 0FCh
or	cl, 2
mov	edx, [ebp+var_4]
mov	[edx+40h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+40h]
and	cl, 0FBh
mov	edx, [ebp+var_4]
mov	[edx+40h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+40h]
and	cl, 0F7h
mov	edx, [ebp+var_4]
mov	[edx+40h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+40h]
and	cl, 0EFh
mov	edx, [ebp+var_4]
mov	[edx+40h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+40h]
and	cl, 0BFh
mov	edx, [ebp+var_4]
mov	[edx+40h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+41h]
and	cl, 0FEh
mov	edx, [ebp+var_4]
mov	[edx+41h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+41h]
or	cl, 2
mov	edx, [ebp+var_4]
mov	[edx+41h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+41h]
or	cl, 4
mov	edx, [ebp+var_4]
mov	[edx+41h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+41h]
and	cl, 0F7h
mov	edx, [ebp+var_4]
mov	[edx+41h], cl
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45A330 endp

align 10h


; Attributes: bp-based frame

sub_45A450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+30h]
mov	esp, ebp
pop	ebp
retn
sub_45A450 endp

align 10h


; Attributes: bp-based frame

sub_45A470 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AFA8
mov	ecx, [ebp+var_4]
call	sub_1160E70
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45A49E
push	48h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45A49E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45A470 endp

align 10h


; Attributes: bp-based frame

sub_45A4B0 proc	near

var_24=	dword ptr -24h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_B37670
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_45A4D4
mov	al, 1
jmp	short loc_45A537

loc_45A4D4:
mov	eax, [ebp+var_24]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_B37670
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_45A4F2
mov	al, 1
jmp	short loc_45A537

loc_45A4F2:
mov	eax, [ebp+var_24]
add	eax, 18h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_B37670
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_45A510
mov	al, 1
jmp	short loc_45A537

loc_45A510:
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_B37670
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_45A52B
mov	al, 1
jmp	short loc_45A537

loc_45A52B:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_24]
call	sub_45A540

loc_45A537:
mov	esp, ebp
pop	ebp
retn	4
sub_45A4B0 endp

align 10h


; Attributes: bp-based frame

sub_45A540 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_24]
add	ecx, 0Ch
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_24]
add	edx, 18h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_24]
add	eax, 24h
mov	[ebp+var_8], eax
mov	[ebp+var_1], 1
mov	[ebp+var_18], 0
jmp	short loc_45A580

loc_45A577:
mov	ecx, [ebp+var_18]
add	ecx, 1
mov	[ebp+var_18], ecx

loc_45A580:
cmp	[ebp+var_18], 6
jge	short loc_45A5D2
mov	[ebp+var_1], 1
mov	[ebp+var_1C], 0
jmp	short loc_45A59C

loc_45A593:
mov	edx, [ebp+var_1C]
add	edx, 1
mov	[ebp+var_1C], edx

loc_45A59C:
cmp	[ebp+var_1C], 4
jge	short loc_45A5C4
mov	eax, [ebp+var_18]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_1C]
mov	ecx, [ebp+ecx*4+var_14]
call	sub_427C20
cmp	eax, 2
jz	short loc_45A5C2
mov	[ebp+var_1], 0
jmp	short loc_45A5C4

loc_45A5C2:
jmp	short loc_45A593

loc_45A5C4:
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_45A5D0
xor	al, al
jmp	short loc_45A5D4

loc_45A5D0:
jmp	short loc_45A577

loc_45A5D2:
mov	al, 1

loc_45A5D4:
mov	esp, ebp
pop	ebp
retn	4
sub_45A540 endp

align 10h


; Attributes: bp-based frame

sub_45A5E0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	[ebp+var_8], ecx
mov	ecx, 2719h
mov	eax, [ebp+var_8]
call	sub_401100
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_156AFFC
mov	esi, [ebp+var_8]
add	esi, 14h
xor	eax, eax
call	sub_41DF90
push	ecx
fldz
fstp	[esp+10h+var_10]
push	ecx
fldz
fstp	[esp+14h+var_14]
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
mov	ecx, [ebp+var_8]
add	ecx, 20h
call	sub_40A410
mov	ecx, [ebp+var_8]
add	ecx, 3Ch
mov	[ebp+var_4], ecx
mov	ecx, 2716h
mov	eax, [ebp+var_4]
call	sub_401100
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_156E570
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_8]
add	ecx, 14h
push	ecx
xor	eax, eax
call	sub_420330
mov	edx, [ebp+var_8]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_8]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_8]
add	ecx, 20h
mov	edx, dword_17EE148
mov	[ecx], edx
mov	eax, dword_17EE14C
mov	[ecx+4], eax
mov	edx, dword_17EE150
mov	[ecx+8], edx
mov	eax, dword_17EE154
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+34h], 1
mov	edx, [ebp+var_8]
mov	dword ptr [edx+38h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+48h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+50h], 0
mov	dword ptr [ecx+54h], 0
mov	eax, [ebp+var_8]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45A5E0 endp

align 10h


; Attributes: bp-based frame

sub_45A700 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45A726
mov	ecx, [ebp+var_4]
call	sub_45A5E0
mov	[ebp+var_C], eax
jmp	short loc_45A72D

loc_45A726:
mov	[ebp+var_C], 0

loc_45A72D:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_45A700 endp

align 10h


; Attributes: bp-based frame

sub_45A740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_401110
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45A77B
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45A77B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45A740 endp

align 10h


; Attributes: bp-based frame

sub_45A790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	ecx, 2724h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B000
mov	esi, [ebp+var_4]
add	esi, 8
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx
xor	eax, eax
call	sub_420330
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45A790 endp

align 10h


; Attributes: bp-based frame

sub_45A7E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45A806
mov	ecx, [ebp+var_4]
call	sub_45A790
mov	[ebp+var_8], eax
jmp	short loc_45A80D

loc_45A806:
mov	[ebp+var_8], 0

loc_45A80D:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45A7E0 endp

align 10h


; Attributes: bp-based frame

sub_45A820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45A850
push	0Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45A850:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45A820 endp

align 10h


; Attributes: bp-based frame

sub_45A860 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
push	edi
mov	[ebp+var_10], ecx
mov	ecx, 2727h
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_156B004
mov	esi, [ebp+var_10]
add	esi, 118h
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_10]
add	ecx, 11Ch
call	sub_401EF0
mov	eax, [ebp+var_10]
add	eax, 128h
call	nullsub_1
mov	esi, [ebp+var_10]
add	esi, 154h
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_10]
add	ecx, 16Ch
call	sub_10FB830
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+110h], 0
mov	dword ptr [edx+114h], 0
mov	eax, [ebp+var_10]
add	eax, 118h
push	eax
xor	eax, eax
call	sub_420330
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
push	ecx		; float
fldz
fstp	[esp+24h+var_24]
lea	ecx, [ebp+var_C]
call	sub_40F570
mov	ecx, [ebp+var_10]
add	ecx, 11Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	edi, [ebp+var_10]
add	edi, 128h
mov	ecx, 9
mov	esi, offset unk_17EE184
rep movsd
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+14Ch], 1
mov	edx, [ebp+var_10]
mov	dword ptr [edx+150h], 0
mov	eax, [ebp+var_10]
mov	byte ptr [eax+158h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+160h], 0
mov	dword ptr [ecx+164h], 0
mov	edx, [ebp+var_10]
add	edx, 154h
push	edx
xor	eax, eax
call	sub_420330
xor	eax, eax
mov	ecx, [ebp+var_10]
mov	[ecx+168h], ax
mov	eax, [ebp+var_10]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45A860 endp

align 10h


; Attributes: bp-based frame

sub_45A9A0 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
push	188h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45A9C9
mov	ecx, [ebp+var_4]
call	sub_45A860
mov	[ebp+var_14], eax
jmp	short loc_45A9D0

loc_45A9C9:
mov	[ebp+var_14], 0

loc_45A9D0:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_45A9A0 endp

align 10h


; Attributes: bp-based frame

sub_45A9E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_45AA20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45AA08
push	188h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45AA08:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45A9E0 endp

align 10h


; Attributes: bp-based frame

sub_45AA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 16Ch
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 154h
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 118h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_45AA20 endp

align 10h


; Attributes: bp-based frame

sub_45AA60 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 2736h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156AEA4
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
mov	ecx, [ebp+var_14]
add	ecx, 24h
call	sub_40A410
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+14h], 200h
mov	eax, [ebp+var_14]
mov	dword ptr [eax+18h], 200h
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+20h], 0
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
lea	ecx, [ebp+var_10]
call	sub_40A410
mov	edx, [ebp+var_14]
add	edx, 24h
mov	ecx, [eax]
mov	[edx], ecx
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+34h], 0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_45AA60 endp

align 10h


; Attributes: bp-based frame

sub_45AB40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45AB65
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45AB65:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45AB40 endp

align 10h


; Attributes: bp-based frame

sub_45AB70 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2745h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156AEA0
push	0
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
call	sub_418670
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+0Ch], 1
mov	edx, [ebp+var_C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+18h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_C]
add	eax, 1Ch
push	eax
xor	eax, eax
call	sub_420330
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+24h], 1
mov	edx, [ebp+var_C]
mov	byte ptr [edx+28h], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+29h], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+2Ch], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+30h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_45AB70 endp

align 10h


; Attributes: bp-based frame

sub_45AC40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45AC7B
push	5Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45AC7B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45AC40 endp

align 10h


; Attributes: bp-based frame

sub_45AC90 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	byte ptr -14h
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, 2744h
mov	eax, [ebp+var_1C]
call	sub_401100
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_156B008
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
push	ecx
fldz
fstp	[esp+28h+var_28]
push	ecx
fldz
fstp	[esp+2Ch+var_2C]
mov	ecx, [ebp+var_1C]
add	ecx, 0Ch
call	sub_40A410
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
push	ecx
fldz
fstp	[esp+28h+var_28]
push	ecx
fldz
fstp	[esp+2Ch+var_2C]
mov	ecx, [ebp+var_1C]
add	ecx, 1Ch
call	sub_40A410
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 30h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+2Ch], xmm0
push	ecx
fld1
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
push	ecx
fldz
fstp	[esp+28h+var_28]
push	ecx
fldz
fstp	[esp+2Ch+var_2C]
lea	ecx, [ebp+var_14]
call	sub_40A410
mov	ecx, [ebp+var_1C]
add	ecx, 1Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_1C]
add	ecx, 1Ch
mov	edx, [ebp+var_1C]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
push	offset aNone	; "(none)"
mov	ecx, [ebp+var_1C]
add	ecx, 30h
call	sub_402310
mov	edx, [ebp+var_1C]
mov	byte ptr [edx+48h], 0
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_45AC90 endp

align 10h


; Attributes: bp-based frame

sub_45ADB0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	4Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45ADD6
mov	ecx, [ebp+var_4]
call	sub_45AC90
mov	[ebp+var_20], eax
jmp	short loc_45ADDD

loc_45ADD6:
mov	[ebp+var_20], 0

loc_45ADDD:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45ADB0 endp

align 10h


; Attributes: bp-based frame

sub_45ADF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45AE20
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45AE20:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45ADF0 endp

align 10h


; Attributes: bp-based frame

sub_45AE30 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	ecx, 2747h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156B00C
mov	eax, [ebp+var_C]
add	eax, 8
xor	cl, cl
call	sub_115FC50
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 2Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	esi, [ebp+var_C]
add	esi, 54h
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+28h], 0FFFFFFFFh
mov	edx, [ebp+var_C]
mov	byte ptr [edx+24h], 1
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45AE30 endp

align 10h


; Attributes: bp-based frame

sub_45AEA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 54h
call	sub_40ABB0
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45AEDB
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45AEDB:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45AEA0 endp

align 10h


; Attributes: bp-based frame

sub_45AEF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_1139E20
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45AF23
push	130h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45AF23:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45AEF0 endp

align 10h


; Attributes: bp-based frame

sub_45AF30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45AF71
mov	ecx, 2749h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45AF78

loc_45AF71:
mov	[ebp+var_8], 0

loc_45AF78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45AF30 endp

align 10h


; Attributes: bp-based frame

sub_45AF80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45AFC1
mov	ecx, 274Ch
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45AFC8

loc_45AFC1:
mov	[ebp+var_8], 0

loc_45AFC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45AF80 endp

align 10h


; Attributes: bp-based frame

sub_45AFD0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2759h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156B014
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
push	ecx
fldz
fstp	[esp+10h+var_10]
push	ecx
fldz
fstp	[esp+14h+var_14]
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
mov	ecx, [ebp+var_C]
add	ecx, 20h
call	sub_40A410
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+20h], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+28h], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+2Ch], xmm0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+30h], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+34h], 1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+35h], 0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+36h], 1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_45AFD0 endp

align 10h


; Attributes: bp-based frame

sub_45B0A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45B0D0
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45B0D0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45B0A0 endp

align 10h


; Attributes: bp-based frame

sub_45B0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	232Dh
mov	ecx, [ebp+var_4]
call	sub_42CD70
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B018
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+10h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+1Ah], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+19h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+18h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+20h], 0
mov	dword ptr [ecx+24h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45B0E0 endp

align 10h


; Attributes: bp-based frame

sub_45B160 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32ECh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156B01C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
movss	xmm0, dword_188C9E8
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_45B160 endp

align 10h


; Attributes: bp-based frame

sub_45B1C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45B1F0
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45B1F0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45B1C0 endp

align 10h


; Attributes: bp-based frame

sub_45B200 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32EEh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5108
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_45B200 endp

align 10h


; Attributes: bp-based frame

sub_45B260 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32EFh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5104
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+28h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_45B260 endp

align 10h


; Attributes: bp-based frame

sub_45B2C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	14h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45B312
mov	ecx, 36F5h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F4
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+10h], 0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_45B319

loc_45B312:
mov	[ebp+var_8], 0

loc_45B319:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45B2C0 endp



; Attributes: bp-based frame

sub_45B320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45B357
mov	ecx, 36C0h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A0C
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_45B35E

loc_45B357:
mov	[ebp+var_8], 0

loc_45B35E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45B320 endp

align 10h


; Attributes: bp-based frame

sub_45B370 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 3737h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5108
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_45B370 endp

align 10h


; Attributes: bp-based frame

sub_45B3D0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	28h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45B3F6
mov	ecx, [ebp+var_4]
call	sub_45B370
mov	[ebp+var_10], eax
jmp	short loc_45B3FD

loc_45B3F6:
mov	[ebp+var_10], 0

loc_45B3FD:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_45B3D0 endp

align 10h


; Attributes: bp-based frame

sub_45B410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BBEh
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C020C
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+14h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+10h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45B410 endp

align 10h


; Attributes: bp-based frame

sub_45B470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
push	0BDBh
mov	ecx, [ebp+var_8]
call	sub_42CCA0
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_156B020
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
push	offset sub_12381D0
push	6
push	10h
mov	edx, [ebp+var_4]
push	edx
call	sub_4078B0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+60h], 3Fh
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45B470 endp

align 10h


; Attributes: bp-based frame

sub_45B4C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45B4E5
push	70h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45B4E5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45B4C0 endp

align 10h


; Attributes: bp-based frame

sub_45B4F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BE1h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B024
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
add	eax, 3Ch
mov	ecx, [ebp+var_4]
add	ecx, 30h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
mov	edx, [ebp+var_4]
add	edx, 24h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_4]
add	edx, 24h
mov	eax, [ebp+var_4]
add	eax, 18h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
add	eax, 18h
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+48h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45B4F0 endp

align 10h


; Attributes: bp-based frame

sub_45B5F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45B615
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45B615:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45B5F0 endp

align 10h


; Attributes: bp-based frame

sub_45B620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 2AFFh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B028
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+50h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+51h], 1
mov	eax, [ebp+var_4]
mov	byte ptr [eax+52h], 1
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+53h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+54h], 2
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1Ch], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+14h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+20h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+38h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+34h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+58h], 0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1514FDC
movss	dword ptr [eax+28h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+2Ch], xmm0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+5Ch], 0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1514FC8
movss	dword ptr [eax+3Ch], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1514FCC
movss	dword ptr [ecx+40h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1514FD0
movss	dword ptr [edx+44h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1514FD4
movss	dword ptr [eax+48h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1514FD8
movss	dword ptr [ecx+4Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45B620 endp

align 10h


; Attributes: bp-based frame

sub_45B7A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45B7C5
push	60h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45B7C5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45B7A0 endp

align 10h


; Attributes: bp-based frame

sub_45B7D0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_45B7D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_4C], ecx
mov	ecx, 2AF8h
mov	eax, [ebp+var_4C]
call	sub_401100
mov	eax, [ebp+var_4C]
mov	dword ptr [eax], offset	off_156AF94
mov	ecx, [ebp+var_4C]
add	ecx, 1Ch
call	sub_1014960
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_4C]
add	ecx, 20h
call	sub_4022A0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	ecx, [ebp+var_4C]
add	ecx, 44h
mov	[ebp+var_18], ecx
xor	edx, edx
mov	eax, [ebp+var_18]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_18]
mov	[edx+2], cx
mov	eax, [ebp+var_18]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_4C]
add	ecx, 4Ch
call	sub_45B620
mov	ecx, [ebp+var_4C]
add	ecx, 0C8h
call	sub_45BBA0
lea	eax, [ebp+var_E]
call	nullsub_1
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_4C]
add	ecx, 0E4h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+4], 0
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_439BF0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	edx, [ebp+var_4C]
add	edx, 0F0h
mov	[ebp+var_28], edx
lea	eax, [ebp+var_21]
push	eax
lea	ecx, [ebp+var_22]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_489470
lea	ecx, [ebp+var_22]
call	nullsub_1
mov	edx, [ebp+var_4C]
add	edx, 108h
mov	[ebp+var_30], edx
lea	eax, [ebp+var_29]
push	eax
lea	ecx, [ebp+var_2A]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_489470
lea	ecx, [ebp+var_2A]
call	nullsub_1
mov	edx, [ebp+var_4C]
add	edx, 130h
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_4C]
add	ecx, 154h
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
movss	xmm0, dword_17E66B0
movss	dword ptr [edx], xmm0
push	ecx		; float
fldz
fstp	[esp+50h+var_50]
push	ecx		; float
fldz
fstp	[esp+54h+var_54]
push	ecx		; float
fldz
fstp	[esp+58h+var_58]
mov	ecx, [ebp+var_38]
add	ecx, 4
call	sub_40F570
mov	eax, [ebp+var_38]
mov	ecx, dword_188CB44
mov	[eax+10h], ecx
mov	edx, dword_188CB48
mov	[eax+14h], edx
mov	eax, [ebp+var_4C]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_4C]
mov	dword ptr [ecx+18h], 0
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+38h], 0
mov	dword ptr [edx+3Ch], 0
mov	eax, [ebp+var_4C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+124h], xmm0
mov	ecx, [ebp+var_4C]
mov	dword ptr [ecx+128h], 0FFFFFFFFh
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+40h], 0
mov	eax, [ebp+var_4C]
mov	byte ptr [eax+14Ah], 1
mov	ecx, [ebp+var_4C]
mov	byte ptr [ecx+14Bh], 1
mov	edx, [ebp+var_4C]
mov	byte ptr [edx+14Ch], 1
mov	eax, [ebp+var_4C]
mov	byte ptr [eax+120h], 0
mov	ecx, [ebp+var_4C]
mov	byte ptr [ecx+12Ch], 0
mov	edx, [ebp+var_4C]
mov	byte ptr [edx+0ACh], 0
mov	eax, [ebp+var_4C]
mov	byte ptr [eax+148h], 1
mov	ecx, [ebp+var_4C]
mov	byte ptr [ecx+149h], 0
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+150h], 0
mov	eax, [ebp+var_4C]
mov	byte ptr [eax+8], 0
mov	ecx, [ebp+var_4C]
mov	dword ptr [ecx+0Ch], 2B0Eh
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+10h], 0FFFFFFFFh
mov	eax, [ebp+var_4C]
add	eax, 154h
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
movss	xmm0, dword_188E874
movss	dword ptr [ecx], xmm0
mov	edx, offset dword_188E878
mov	eax, [ebp+var_44]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	[ebp+var_40], offset dword_188E884
mov	eax, [ebp+var_44]
add	eax, 10h
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_4C]
add	ecx, 44h
mov	[ebp+var_48], ecx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	edx, [ebp+var_48]
mov	[edx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	ecx, [ebp+var_48]
mov	[ecx+2], ax
xor	edx, edx
and	edx, 0FFFFh
xor	eax, eax
and	eax, 0
mov	ecx, [ebp+var_48]
mov	[ecx], dx
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+16Ch], 0
mov	eax, [ebp+var_4C]
mov	dword ptr [eax+174h], 0
mov	ecx, [ebp+var_4C]
mov	dword ptr [ecx+170h], 0
mov	edx, [ebp+var_4C]
mov	byte ptr [edx+0B4h], 0
mov	eax, [ebp+var_4C]
mov	byte ptr [eax+0B5h], 1
mov	ecx, [ebp+var_4C]
mov	byte ptr [ecx+0B6h], 0
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+0B8h], 0FFFFFFFFh
mov	eax, [ebp+var_4C]
mov	dword ptr [eax+0BCh], 0FFFFFFFFh
mov	ecx, [ebp+var_4C]
mov	byte ptr [ecx+0C0h], 1
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+0C4h], 0
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_45B7D0 endp

align 10h


; Attributes: bp-based frame

sub_45BB60 proc	near

var_40=	dword ptr -40h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_40]
call	sub_45BD70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45BB8A
push	178h
mov	ecx, [ebp+var_40]
push	ecx
call	sub_1111040
add	esp, 8

loc_45BB8A:
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_45BB60 endp

align 10h


; Attributes: bp-based frame

sub_45BBA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_14], ecx
xor	eax, eax
mov	esi, [ebp+var_14]
call	sub_41DF90
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_45BBD8
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_45BBD8:
mov	esi, [ebp+var_14]
add	esi, 8
xor	eax, eax
call	sub_41DF90
mov	esi, [ebp+var_14]
add	esi, 0Ch
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_45BC16
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA80

loc_45BC16:
mov	esi, [ebp+var_14]
add	esi, 14h
xor	eax, eax
call	sub_41DF90
mov	edx, [ebp+var_14]
add	edx, 18h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_45BC52
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_45BC52:
mov	eax, [ebp+var_14]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45BBA0 endp

align 10h


; Attributes: bp-based frame

sub_45BC60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_45BCA0
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_45BCA0
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax+4]
call	edx

loc_45BCA0:
mov	ecx, [ebp+var_14]
add	ecx, 14h
call	sub_429100
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_45BCC6
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_40AA90

loc_45BCC6:
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
call	sub_429100
mov	eax, [ebp+var_14]
add	eax, 8
call	sub_40ABB0
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_45BCF7
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA90

loc_45BCF7:
mov	ecx, [ebp+var_14]
call	sub_429100
mov	esp, ebp
pop	ebp
retn
sub_45BC60 endp

align 10h


; Attributes: bp-based frame

sub_45BD10 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+arg_0]
add	edx, 4
mov	eax, [ebp+var_C]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_45BD10 endp



; Attributes: bp-based frame

sub_45BD70 proc	near

var_4C=	dword ptr -4Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
add	eax, 108h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_4696F0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_4C]
add	ecx, 0F0h
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_4696A0
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_4C]
add	ecx, 0E4h
call	sub_436480
mov	ecx, [ebp+var_4C]
add	ecx, 0C8h
call	sub_45BC60
mov	ecx, [ebp+var_4C]
add	ecx, 4Ch
call	sub_401110
mov	ecx, [ebp+var_4C]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4C]
add	ecx, 1Ch
call	sub_1014910
mov	ecx, [ebp+var_4C]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_45BD70 endp

align 10h


; Attributes: bp-based frame

sub_45BE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1B85h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F8
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+14h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+15h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+16h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+17h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+19h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+1Ah], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+18h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45BE00 endp

align 10h


; Attributes: bp-based frame

sub_45BE90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_411F60
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B030
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [eax+1Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45BE90 endp

align 10h


; Attributes: bp-based frame

sub_45BF10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_429300
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45BF35
push	20h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45BF35:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45BF10 endp

align 10h


; Attributes: bp-based frame

sub_45BF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_429300
mov	esp, ebp
pop	ebp
retn
sub_45BF40 endp

align 10h


; Attributes: bp-based frame

sub_45BF60 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1BF0h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156B02C
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 0Ch
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 1Ch
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 2Ch
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 3Ch
call	sub_412C60
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
call	sub_401EF0
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 5Ch
call	sub_412C60
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 6Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_14]
add	ecx, 98h
call	sub_45BE90
mov	ecx, [ebp+var_14]
add	ecx, 0B8h
call	sub_45BE90
mov	ecx, [ebp+var_14]
add	ecx, 0DCh
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+0D9h], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+94h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+68h], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+58h], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+48h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+38h], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+28h], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+18h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+9], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+0D8h], 0
mov	edx, [ebp+var_14]
movss	xmm0, ds:dword_1577A6C
movss	dword ptr [edx+0E8h], xmm0
mov	eax, [ebp+var_14]
add	eax, 4Ch
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_45BF60 endp

align 10h


; Attributes: bp-based frame

sub_45C120 proc	near

var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
call	sub_45C160
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45C14A
push	0ECh
mov	ecx, [ebp+var_34]
push	ecx
call	sub_1111040
add	esp, 8

loc_45C14A:
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_45C120 endp

align 10h


; Attributes: bp-based frame

sub_45C160 proc	near

var_34=	dword ptr -34h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
add	ecx, 0DCh
call	sub_487140
mov	ecx, [ebp+var_34]
add	ecx, 0B8h
call	sub_429300
mov	ecx, [ebp+var_34]
add	ecx, 98h
call	sub_429300
mov	ecx, [ebp+var_34]
add	ecx, 6Ch
call	sub_407E50
mov	ecx, [ebp+var_34]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_45C160 endp

align 10h


; Attributes: bp-based frame

sub_45C1B0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1BF1h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156AFF8
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 8
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 14h
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 20h
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 2Ch
call	sub_412C60
mov	ecx, [ebp+var_14]
add	ecx, 38h
call	sub_401EF0
mov	ecx, [ebp+var_14]
add	ecx, 44h
call	sub_401EF0
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_14]
add	eax, 54h
call	sub_412C60
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 60h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_14]
add	ecx, 88h
call	sub_45BE90
mov	ecx, [ebp+var_14]
add	ecx, 0A8h
call	sub_45BE90
mov	ecx, [ebp+var_14]
add	ecx, 0C8h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_45C1B0 endp

align 10h


; Attributes: bp-based frame

sub_45C2F0 proc	near

var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
call	sub_45C330
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45C31A
push	0D4h
mov	ecx, [ebp+var_34]
push	ecx
call	sub_1111040
add	esp, 8

loc_45C31A:
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_45C2F0 endp

align 10h


; Attributes: bp-based frame

sub_45C330 proc	near

var_34=	dword ptr -34h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
add	ecx, 0C8h
call	sub_487140
mov	ecx, [ebp+var_34]
add	ecx, 0A8h
call	sub_429300
mov	ecx, [ebp+var_34]
add	ecx, 88h
call	sub_429300
mov	ecx, [ebp+var_34]
add	ecx, 60h
call	sub_407E50
mov	ecx, [ebp+var_34]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_45C330 endp

align 10h


; Attributes: bp-based frame

sub_45C380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1BF4h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+11h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+10h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+0Fh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0Eh], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0Dh], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+0Bh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0Ah], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+9], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+14h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45C380 endp

align 10h


; Attributes: bp-based frame

sub_45C400 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	[ebp+var_20], ecx
xor	eax, eax
mov	esi, [ebp+var_20]
call	sub_41DF90
mov	esi, [ebp+var_20]
add	esi, 4
xor	eax, eax
call	sub_41DF90
mov	eax, [ebp+var_20]
add	eax, 8
mov	[ebp+var_1C], eax
xor	ecx, ecx
mov	[ebp+var_C], ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	eax, [ebp+var_20]
mov	byte ptr [eax+10h], 1
mov	ecx, [ebp+var_20]
mov	byte ptr [ecx+11h], 0
mov	eax, [ebp+var_20]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45C400 endp

align 10h


; Attributes: bp-based frame

sub_45C480 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
push	esi
mov	[ebp+var_24], ecx
xor	eax, eax
mov	esi, [ebp+var_24]
call	sub_41DF90
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_45C4B7
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA80

loc_45C4B7:
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_20], edx
xor	eax, eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	[eax+4], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_24]
mov	byte ptr [edx+10h], 1
mov	eax, [ebp+var_24]
mov	byte ptr [eax+11h], 0
lea	ecx, [ebp+arg_0]
call	sub_429100
mov	eax, [ebp+var_24]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_45C480 endp

align 10h


; Attributes: bp-based frame

sub_45C520 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
push	esi
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_4]
mov	esi, [ebp+var_24]
call	sub_41DF90
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_45C558
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA80

loc_45C558:
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_20], edx
xor	eax, eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	[eax+4], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_24]
mov	byte ptr [edx+10h], 1
mov	eax, [ebp+var_24]
mov	byte ptr [eax+11h], 0
lea	ecx, [ebp+arg_0]
call	sub_429100
mov	eax, [ebp+var_24]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_45C520 endp

align 10h


; Attributes: bp-based frame

sub_45C5C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+7Ch], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_45C5C0 endp

align 10h


; Attributes: bp-based frame

sub_45C5E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+80h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_45C5E0 endp

align 10h


; Attributes: bp-based frame

sub_45C600 proc	near

var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
jmp	short loc_45C62E

loc_45C61F:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax

loc_45C62E:
mov	ecx, [ebp+var_50]
add	ecx, 0Ch
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_51], dl
movzx	eax, [ebp+var_51]
test	eax, eax
jz	loc_45C6FE
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_30], ecx
lea	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_30]
add	ecx, 4
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_38], eax
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	eax, [ebp+var_8]
push	eax
call	sub_46C230
add	esp, 10h
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_44]
add	ecx, 4
lea	eax, [ebp+var_20]
call	sub_4046E0
lea	edx, [ebp+var_4C]
mov	[ebp+var_48], edx
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	eax, [ebp+var_8]
xor	ecx, ecx
cmp	eax, [ebp+var_4C]
setnz	cl
mov	[ebp+var_52], cl
movzx	edx, [ebp+var_52]
test	edx, edx
jz	short loc_45C6F9
mov	eax, [ebp+var_8]
add	eax, 8
jmp	short loc_45C700

loc_45C6F9:
jmp	loc_45C61F

loc_45C6FE:
xor	eax, eax

loc_45C700:
mov	esp, ebp
pop	ebp
retn	4
sub_45C600 endp

align 10h


; Attributes: bp-based frame

sub_45C710 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_44=	byte ptr -44h
var_3C=	byte ptr -3Ch
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_4= byte ptr	-4
arg_0= byte ptr	 8
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 64h
push	esi
mov	[ebp+var_64], ecx
lea	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_5C]
call	sub_403850
mov	ecx, [ebp+arg_18]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_5C]
push	edx
lea	ecx, [ebp+var_3C]
call	sub_403850
mov	eax, [ebp+var_60]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_5C]
call	sub_407910
lea	ecx, [ebp+var_3C]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_403850
lea	esi, [ebp+var_4]
mov	eax, [ebp+var_24]
call	sub_41DF90
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 150h
call	sub_46BED0
lea	eax, [ebp+var_4]
call	sub_40ABB0
lea	ecx, [ebp+var_1C]
call	sub_407910
lea	ecx, [ebp+var_3C]
call	sub_407910
lea	ecx, [ebp+arg_0]
call	sub_407910
pop	esi
mov	esp, ebp
pop	ebp
retn	1Ch
sub_45C710 endp

align 10h


; Attributes: bp-based frame

sub_45C7A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_4]
call	sub_418670
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_10]
lea	eax, [edx+eax+174h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	ecx, [ebp+var_C]
mov	eax, [edx+4]
call	eax
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_41EAC0
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_C]
call	sub_4713C0
lea	ecx, [ebp+var_4]
call	sub_429100
mov	esp, ebp
pop	ebp
retn	8
sub_45C7A0 endp

align 10h


; Attributes: bp-based frame

sub_45C810 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B0F0
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45C841
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45C841:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45C810 endp

align 10h


; Attributes: bp-based frame

sub_45C850 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+0Ch]
mov	edx, [eax+10h]
mov	[ebp+var_10], ecx
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	[ebp+var_20], eax
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_20]
call	sub_459A20
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	[ebp+var_18], eax
mov	[ebp+var_14], ecx
mov	edx, 1
mov	ecx, [ebp+var_14]
shl	edx, cl
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_4], edx
movzx	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_45C8C2
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
or	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[eax], edx
jmp	short loc_45C8D1

loc_45C8C2:
mov	ecx, [ebp+var_4]
not	ecx
mov	edx, [ebp+var_8]
and	ecx, [edx]
mov	eax, [ebp+var_8]
mov	[eax], ecx

loc_45C8D1:
mov	esp, ebp
pop	ebp
retn	8
sub_45C850 endp

align 10h


; Attributes: bp-based frame

sub_45C8E0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+20h]
mov	edx, [eax+24h]
mov	[ebp+var_10], ecx
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	[ebp+var_20], eax
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_20]
call	sub_459A20
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	[ebp+var_18], eax
mov	[ebp+var_14], ecx
mov	edx, 1
mov	ecx, [ebp+var_14]
shl	edx, cl
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_4], edx
movzx	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_45C952
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
or	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[eax], edx
jmp	short loc_45C961

loc_45C952:
mov	ecx, [ebp+var_4]
not	ecx
mov	edx, [ebp+var_8]
and	ecx, [edx]
mov	eax, [ebp+var_8]
mov	[eax], ecx

loc_45C961:
mov	esp, ebp
pop	ebp
retn	8
sub_45C8E0 endp

align 10h


; Attributes: bp-based frame

sub_45C970 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+20h]
mov	edx, [eax+24h]
mov	[ebp+var_10], ecx
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	[ebp+var_20], eax
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_20]
call	sub_459A20
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	[ebp+var_18], eax
mov	[ebp+var_14], ecx
mov	edx, 1
mov	ecx, [ebp+var_14]
shl	edx, cl
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	eax, [eax]
and	eax, [ebp+var_4]
neg	eax
sbb	eax, eax
neg	eax
mov	esp, ebp
pop	ebp
retn	4
sub_45C970 endp

align 10h


; Attributes: bp-based frame

sub_45C9E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45CA2C
fld	[ebp+arg_0]
fmul	ds:dbl_15FCC48
fstp	[ebp+var_8]
mov	ecx, [ebp+var_4]
sar	ecx, 1
mov	edx, 5F3759DFh
sub	edx, ecx
mov	[ebp+var_4], edx
movss	xmm0, [ebp+var_4]
movss	[ebp+arg_0], xmm0
fld	[ebp+var_8]
fmul	[ebp+arg_0]
fmul	[ebp+arg_0]
fsubr	ds:dbl_15FCD58
fmul	[ebp+arg_0]
fstp	[ebp+arg_0]

loc_45CA2C:
fld	[ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_45C9E0 endp

align 10h


; Attributes: bp-based frame

sub_45CA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+40h], 1
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15FCD6C
movss	dword ptr [ecx+44h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+48h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+4Ch], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15FCD68
movss	dword ptr [ecx+50h], xmm0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+54h], 0
mov	eax, [ebp+var_4]
mov	cl, [eax+58h]
or	cl, 1
mov	edx, [ebp+var_4]
mov	[edx+58h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+58h]
and	cl, 0FDh
mov	edx, [ebp+var_4]
mov	[edx+58h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+58h]
and	cl, 0FBh
mov	edx, [ebp+var_4]
mov	[edx+58h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+58h]
and	cl, 0F7h
mov	edx, [ebp+var_4]
mov	[edx+58h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+58h]
and	cl, 0EFh
mov	edx, [ebp+var_4]
mov	[edx+58h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+58h]
and	cl, 0DFh
mov	edx, [ebp+var_4]
mov	[edx+58h], cl
mov	eax, [ebp+var_4]
mov	cl, [eax+58h]
and	cl, 0BFh
mov	edx, [ebp+var_4]
mov	[edx+58h], cl
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+14h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+18h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+20h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+24h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+28h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+2Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+34h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+38h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+3Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45CA40 endp

align 10h


; Attributes: bp-based frame

sub_45CC10 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_156B2C4
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+20h]
mov	[ebp+var_10], edx
mov	ecx, [ebp+var_10]
lea	eax, [ebp+var_4]
call	sub_4046E0
jmp	short loc_45CC40

loc_45CC38:
lea	eax, [ebp+var_4]
call	sub_405E90

loc_45CC40:
mov	ecx, [ebp+var_1C]
add	ecx, 20h
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_18]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_14]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_18]
setnz	dl
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_45CC89
mov	ecx, [ebp+var_4]
mov	edx, [ecx+80h]
push	edx
call	sub_1227D40
add	esp, 4
jmp	short loc_45CC38

loc_45CC89:
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_46CA40
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_1C]
call	sub_429300
mov	esp, ebp
pop	ebp
retn
sub_45CC10 endp

align 10h


; Attributes: bp-based frame

sub_45CCB0 proc	near

var_1C=	dword ptr -1Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_45CC10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45CCD7
push	28h
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_1111040
add	esp, 8

loc_45CCD7:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	4
sub_45CCB0 endp



; Attributes: bp-based frame

sub_45CCE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_45CD02
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_45CD02:
mov	esp, ebp
pop	ebp
retn
sub_45CCE0 endp

align 10h


; Attributes: bp-based frame

sub_45CD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A9770
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45CD38
push	98h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45CD38:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45CD10 endp

align 10h


; Attributes: bp-based frame

sub_45CD50 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
push	edi
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	[ebp+var_4], 0
jmp	short loc_45CD79

loc_45CD70:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_45CD79:
cmp	[ebp+var_4], 104h
jnb	short loc_45CD96
mov	ecx, [ebp+var_20]
add	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
add	edx, [ebp+var_4]
mov	al, [edx+8]
mov	[ecx+8], al
jmp	short loc_45CD70

loc_45CD96:
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	eax, [edx+110h]
mov	[ecx+110h], eax
mov	edx, [edx+114h]
mov	[ecx+114h], edx
mov	eax, [ebp+arg_0]
add	eax, 118h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
add	ecx, 118h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_45CE05
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_45CDE9
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA90

loc_45CDE9:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_45CE05
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_40AA80

loc_45CE05:
mov	eax, [ebp+arg_0]
add	eax, 11Ch
mov	ecx, [ebp+var_20]
add	ecx, 11Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	esi, [ebp+arg_0]
add	esi, 128h
mov	edi, [ebp+var_20]
add	edi, 128h
mov	ecx, 9
rep movsd
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx+14Ch]
mov	[ecx+14Ch], al
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	eax, [edx+150h]
mov	[ecx+150h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 154h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_20]
add	edx, 154h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_45CEB5
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_45CE99
mov	ecx, [ebp+var_10]
mov	ecx, [ecx]
call	sub_40AA90

loc_45CE99:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_45CEB5
mov	eax, [ebp+var_10]
mov	ecx, [eax]
call	sub_40AA80

loc_45CEB5:
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx+158h]
mov	[ecx+158h], al
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	eax, [edx+160h]
mov	[ecx+160h], eax
mov	edx, [edx+164h]
mov	[ecx+164h], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+168h]
mov	[eax+168h], dx
mov	eax, [ebp+arg_0]
add	eax, 16Ch
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
add	ecx, 16Ch
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_18]
call	sub_46B470
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_20]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_45CD50 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION charNode::getLastChar(void). PRESS KEYPAD	"+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_45CF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1Bh
mov	esp, ebp
pop	ebp
retn
sub_45CF60 endp



; Attributes: bp-based frame

sub_45CF70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 14h
mov	esp, ebp
pop	ebp
retn
sub_45CF70 endp



; Attributes: bp-based frame

sub_45CF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 13h
mov	esp, ebp
pop	ebp
retn
sub_45CF80 endp



; Attributes: bp-based frame

sub_45CF90 proc	near

var_8= dword ptr -8
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset byte_146D660
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407D30
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
push	offset byte_146D660
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
call	sub_407D30
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
push	offset byte_146D660
mov	ecx, [ebp+var_8]
add	ecx, 34h
call	sub_407D30
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	edx, [ebp+var_8]
mov	dword ptr [edx+4Ch], 0
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+50h], xmm0
mov	ecx, [ebp+var_8]
add	ecx, 54h
mov	edx, dword_17EE158
mov	[ecx], edx
mov	eax, dword_17EE15C
mov	[ecx+4], eax
mov	edx, dword_17EE160
mov	[ecx+8], edx
mov	eax, dword_17EE164
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
add	ecx, 64h
mov	edx, dword_17EE158
mov	[ecx], edx
mov	eax, dword_17EE15C
mov	[ecx+4], eax
mov	edx, dword_17EE160
mov	[ecx+8], edx
mov	eax, dword_17EE164
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
add	ecx, 74h
mov	edx, dword_17EE158
mov	[ecx], edx
mov	eax, dword_17EE15C
mov	[ecx+4], eax
mov	edx, dword_17EE160
mov	[ecx+8], edx
mov	eax, dword_17EE164
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+84h], 0
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+88h], xmm0
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8Ch], xmm0
mov	ecx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+90h], xmm0
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+94h], xmm0
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+98h], xmm0
mov	ecx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+9Ch], xmm0
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0A0h], xmm0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_45CF90 endp

align 10h


; Attributes: bp-based frame

sub_45D130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0Fh
mov	esp, ebp
pop	ebp
retn
sub_45D130 endp



; Attributes: bp-based frame

sub_45D140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0Bh
mov	esp, ebp
pop	ebp
retn
sub_45D140 endp

; [00000011 BYTES: COLLAPSED FUNCTION unknown_libname_2. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_45D170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
xor	eax, eax
mov	esi, [ebp+var_4]
call	sub_41DF90
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+18h], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_401EF0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+54h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+5Ch], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+60h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+84h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+88h], 0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+8Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+90h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+94h], xmm0
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45D170 endp

align 10h


; Attributes: bp-based frame

sub_45D250 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
push	eax
xor	eax, eax
call	sub_420330
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+54h], 0
jz	short loc_45D2A6
mov	edx, [ebp+var_C]
mov	eax, [edx+54h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_45D295
push	1
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_45D29C

loc_45D295:
mov	[ebp+var_10], 0

loc_45D29C:
mov	eax, [ebp+var_C]
mov	dword ptr [eax+54h], 0

loc_45D2A6:
mov	esp, ebp
pop	ebp
retn
sub_45D250 endp

align 10h


; Attributes: bp-based frame

sub_45D2B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_125C290
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45D2D8
push	94h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45D2D8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45D2B0 endp

align 10h


; Attributes: bp-based frame

sub_45D2F0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	esp, ebp
pop	ebp
retn
sub_45D2F0 endp

align 10h


; Attributes: bp-based frame

sub_45D340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 14h
mov	edx, [ebp+var_4]
add	edx, 14h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 20h
mov	eax, [ebp+var_4]
add	eax, 20h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 2Ch
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 38h
mov	edx, [ebp+var_4]
add	edx, 38h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 44h
mov	eax, [ebp+var_4]
add	eax, 44h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+50h]
mov	[eax+50h], dl
mov	eax, [ebp+arg_0]
add	eax, 54h
mov	ecx, [ebp+var_4]
add	ecx, 54h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 60h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 88h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 88h
call	sub_45D490
mov	eax, [ebp+arg_0]
add	eax, 0A8h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0A8h
call	sub_45D490
mov	ecx, [ebp+arg_0]
add	ecx, 0C8h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 0C8h
call	sub_46B870
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45D340 endp

align 10h


; Attributes: bp-based frame

sub_45D490 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edx+0Ch]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+10h]
fstp	dword ptr [ecx+10h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+14h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+18h]
fstp	dword ptr [edx+18h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+1Ch]
fstp	dword ptr [ecx+1Ch]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45D490 endp

align 10h


; Attributes: bp-based frame

sub_45D500 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_45D500 endp

align 10h


; Attributes: bp-based frame

sub_45D540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_46B570
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_45D540 endp

align 10h


; Attributes: bp-based frame

sub_45D580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_46B570
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_45D580 endp

align 10h


; Attributes: bp-based frame

sub_45D5B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0Ch]
mov	[eax+0Ch], dl
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+arg_0]
add	eax, 14h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
add	ecx, 14h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_45D635
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_45D619
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA90

loc_45D619:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_45D635
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_45D635:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 20h
mov	ecx, [ebp+var_14]
add	ecx, 20h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+30h]
fstp	dword ptr [ecx+30h]
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+34h]
mov	[eax+34h], dl
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	eax, [ebp+arg_0]
add	eax, 3Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
add	ecx, 3Ch
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+48h]
mov	[edx+48h], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+50h]
mov	[edx+50h], ecx
mov	eax, [eax+54h]
mov	[edx+54h], eax
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_45D5B0 endp

align 10h


; Attributes: bp-based frame

sub_45D6F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+8]
mov	[eax+8], dx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+0Ah]
mov	[eax+0Ah], dx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Ch]
mov	[eax+1Ch], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Dh]
mov	[eax+1Dh], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Eh]
mov	[eax+1Eh], dl
mov	eax, [ebp+arg_0]
add	eax, 20h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 20h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_45D7CB
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_45D7AF
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA90

loc_45D7AF:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_45D7CB
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_45D7CB:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+24h]
mov	[eax+24h], dl
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_45D6F0 endp



; Attributes: bp-based frame

sub_45D7E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+8]
mov	[eax+8], dx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+0Ah]
mov	[eax+0Ah], dx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Ch]
mov	[eax+1Ch], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Dh]
mov	[eax+1Dh], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Eh]
mov	[eax+1Eh], dl
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_45D895
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_45D895:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+24h]
mov	[eax+24h], dl
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_45D7E0 endp

align 10h


; Attributes: bp-based frame

sub_45D8B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	esi, [ebp+var_4]
add	esi, 4
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_401EF0
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45D8B0 endp

align 10h


; Attributes: bp-based frame

sub_45D8F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_45D929
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_45D929:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	edx, [ebp+var_8]
add	edx, 1Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 28h
mov	eax, [ebp+var_8]
add	eax, 28h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+34h]
fstp	dword ptr [eax+34h]
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_45D8F0 endp

align 10h


; Attributes: bp-based frame

sub_45D9B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_45DA0F
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_45D9F3
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA90

loc_45D9F3:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_45DA0F
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_45DA0F:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	edx, [ebp+var_C]
add	edx, 1Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 28h
mov	eax, [ebp+var_C]
add	eax, 28h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+34h]
fstp	dword ptr [eax+34h]
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_45D9B0 endp



; Attributes: bp-based frame

sub_45DA90 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_411F60
mov	eax, [ebp+var_24]
mov	dword ptr [eax], offset	off_156B2C4
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_24]
add	ecx, 20h
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_10], edx
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[edx+4], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	[ecx+4], eax
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn
sub_45DA90 endp

align 10h


; Attributes: bp-based frame

sub_45DB10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ecx+1Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DB10 endp

align 10h


; Attributes: bp-based frame

sub_45DB50 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
push	esi
push	edi
mov	[ebp+var_3C], ecx
cmp	[ebp+arg_0], 0
jz	short loc_45DB6C
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_40], eax
jmp	short loc_45DB73

loc_45DB6C:
mov	[ebp+var_40], 0

loc_45DB73:
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx], offset	off_154774C
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_3C]
mov	dword ptr [edx], offset	off_156B004
mov	esi, [ebp+arg_0]
add	esi, 8
mov	edi, [ebp+var_3C]
add	edi, 8
mov	ecx, 41h
rep movsd
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+110h]
mov	[eax+110h], edx
mov	ecx, [ecx+114h]
mov	[eax+114h], ecx
mov	edx, [ebp+var_3C]
add	edx, 118h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+118h]
mov	[eax], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_45DBEE
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_45DBEE:
mov	edx, [ebp+arg_0]
add	edx, 11Ch
mov	eax, [ebp+var_3C]
add	eax, 11Ch
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	esi, [ebp+arg_0]
add	esi, 128h
mov	edi, [ebp+var_3C]
add	edi, 128h
mov	ecx, 9
rep movsd
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+14Ch]
mov	[eax+14Ch], dl
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+150h]
mov	[eax+150h], edx
mov	eax, [ebp+var_3C]
add	eax, 154h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+154h]
mov	[ecx], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_45DC77
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_40AA80

loc_45DC77:
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+158h]
mov	[eax+158h], dl
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
mov	[eax+160h], edx
mov	ecx, [ecx+164h]
mov	[eax+164h], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_0]
mov	cx, [eax+168h]
mov	[edx+168h], cx
mov	edx, [ebp+arg_0]
add	edx, 16Ch
mov	[ebp+var_38], edx
mov	eax, [ebp+var_3C]
add	eax, 16Ch
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_4694E0
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	cl, [eax+18h]
mov	[edx+18h], cl
mov	eax, [ebp+var_3C]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_45DB50 endp

align 10h


; Attributes: bp-based frame

sub_45DD00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10BAE80
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DD28
push	0ECh
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DD28:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DD00 endp

align 10h


; Attributes: bp-based frame

sub_45DD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5E0AF0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_45DD40 endp

align 10h


; Attributes: bp-based frame

sub_45DD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_188C814
mov	esp, ebp
pop	ebp
retn
sub_45DD60 endp



; Attributes: bp-based frame

sub_45DD70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_188CABC
mov	esp, ebp
pop	ebp
retn
sub_45DD70 endp



; Attributes: bp-based frame

sub_45DD80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A19D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DDA8
push	0A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DDA8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DD80 endp

align 10h


; Attributes: bp-based frame

sub_45DDC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A18C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DDE5
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DDE5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DDC0 endp

align 10h


; Attributes: bp-based frame

sub_45DDF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A9000
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DE15
push	74h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DE15:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DDF0 endp

align 10h


; Attributes: bp-based frame

sub_45DE20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A13B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DE45
push	18h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DE45:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DE20 endp

align 10h


; Attributes: bp-based frame

sub_45DE50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B5B30
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DE75
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DE75:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DE50 endp

align 10h


; Attributes: bp-based frame

sub_45DE80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B0D10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DEA5
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DEA5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DE80 endp

align 10h


; Attributes: bp-based frame

sub_45DEB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B5070
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DED5
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DED5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DEB0 endp

align 10h


; Attributes: bp-based frame

sub_45DEE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A8E70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DF05
push	24h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DF05:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DEE0 endp

align 10h


; Attributes: bp-based frame

sub_45DF10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A8D90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DF35
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DF35:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DF10 endp

align 10h


; Attributes: bp-based frame

sub_45DF40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A8D10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DF65
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DF65:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DF40 endp

align 10h


; Attributes: bp-based frame

sub_45DF70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A8CB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DF95
push	18h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DF95:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DF70 endp

align 10h


; Attributes: bp-based frame

sub_45DFA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A8C30
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DFC5
push	20h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DFC5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DFA0 endp

align 10h


; Attributes: bp-based frame

sub_45DFD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B4AA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45DFF8
push	9Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45DFF8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45DFD0 endp

align 10h


; Attributes: bp-based frame

sub_45E010 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B0380
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E038
push	10Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E038:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E010 endp

align 10h


; Attributes: bp-based frame

sub_45E050 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10BA430
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E075
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E075:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E050 endp

align 10h


; Attributes: bp-based frame

sub_45E080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 7DFh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+14h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_45E080 endp

align 10h


; Attributes: bp-based frame

sub_45E0F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B4680
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E115
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E115:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E0F0 endp

align 10h


; Attributes: bp-based frame

sub_45E120 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B01C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E145
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E145:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E120 endp

align 10h


; Attributes: bp-based frame

sub_45E150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A84D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E175
push	1Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E175:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E150 endp

align 10h


; Attributes: bp-based frame

sub_45E180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A8470
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E1A5
push	1Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E1A5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E180 endp

align 10h


; Attributes: bp-based frame

sub_45E1B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10AFE80
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E1D5
push	54h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E1D5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E1B0 endp

align 10h


; Attributes: bp-based frame

sub_45E1E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10B3AB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E205
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E205:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E1E0 endp

align 10h


; Attributes: bp-based frame

sub_45E210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A81B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E235
push	18h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E235:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E210 endp

align 10h


; Attributes: bp-based frame

sub_45E240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+170h]
mov	esp, ebp
pop	ebp
retn
sub_45E240 endp

align 10h


; Attributes: bp-based frame

sub_45E260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A13B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E285
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E285:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E260 endp

align 10h


; Attributes: bp-based frame

sub_45E290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A13B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E2B5
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E2B5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E290 endp

align 10h


; Attributes: bp-based frame

sub_45E2C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A13B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E2E5
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E2E5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E2C0 endp

align 10h


; Attributes: bp-based frame

sub_45E2F0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
lea	ecx, [ebp+arg_0]
call	sub_429100
mov	esp, ebp
pop	ebp
retn	4
sub_45E2F0 endp

align 10h


; Attributes: bp-based frame

sub_45E310 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A0310
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E335
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E335:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E310 endp

align 10h


; Attributes: bp-based frame

sub_45E340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A13B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_45E365
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_45E365:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E340 endp

align 10h


; Attributes: bp-based frame

sub_45E370 proc	near

var_78=	dword ptr -78h

push	ebp
mov	ebp, esp
sub	esp, 78h
push	esi
mov	[ebp+var_78], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_alph ; "Technique_AlphaAsAlpha_Lighting_VertCol"...
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_0 ; "Technique_AlphaAsAlpha_Lighting_VertCol"...
call	sub_1128940
push	7
mov	ecx, [ebp+var_78]
call	sub_10D2040
mov	eax, [ebp+var_78]
mov	dword ptr [eax], offset	off_1568608
mov	ecx, [ebp+var_78]
call	sub_45EA20
mov	ecx, [ebp+var_78]
call	sub_463300
mov	eax, [ebp+var_78]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45E370 endp

align 10h


; Attributes: bp-based frame

sub_45E400 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45E429
mov	ecx, [ebp+var_4]
call	sub_45E370
mov	[ebp+var_6C], eax
jmp	short loc_45E430

loc_45E429:
mov	[ebp+var_6C], 0

loc_45E430:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_45E400 endp

align 10h


; Attributes: bp-based frame

sub_45E440 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_1 ; "Technique_AlphaAsAlpha_NoLighting"
call	sub_1128940
push	8
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000010h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000010h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45E440 endp

align 10h


; Attributes: bp-based frame

sub_45E4E0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45E509
mov	ecx, [ebp+var_4]
call	sub_45E440
mov	[ebp+var_20], eax
jmp	short loc_45E510

loc_45E509:
mov	[ebp+var_20], 0

loc_45E510:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45E4E0 endp

align 10h


; Attributes: bp-based frame

sub_45E520 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_flai ; "Technique_Flair"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_fl_0 ; "Technique_Flair_Movement"
call	sub_1128940
push	9
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568578
mov	ecx, [ebp+var_B4]
add	ecx, 1E8h
call	sub_401EF0
mov	ecx, [ebp+var_B4]
add	ecx, 1F4h
call	sub_401EF0
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 80000002h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 80000002h
mov	eax, [ebp+var_B4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1E4h], xmm0
mov	ecx, [ebp+var_B4]
add	ecx, 1E8h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_B4]
add	eax, 1F4h
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	ecx, [ebp+var_B4]
call	sub_45E6A0
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45E520 endp

align 10h


; Attributes: bp-based frame

sub_45E650 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	200h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45E67F
mov	ecx, [ebp+var_4]
call	sub_45E520
mov	[ebp+var_B0], eax
jmp	short loc_45E689

loc_45E67F:
mov	[ebp+var_B0], 0

loc_45E689:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_45E650 endp

align 10h


; Attributes: bp-based frame

sub_45E6A0 proc	near

var_C4=	dword ptr -0C4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_78=	byte ptr -78h
var_70=	dword ptr -70h
var_60=	byte ptr -60h
var_5C=	byte ptr -5Ch
var_38=	byte ptr -38h
var_34=	byte ptr -34h
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 0C4h
push	esi
push	edi
mov	[ebp+var_C4], ecx
lea	ecx, [ebp+var_34]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_34]
call	sub_416E80
push	0
lea	ecx, [ebp+var_34]
call	sub_417A20
push	7Fh
lea	ecx, [ebp+var_34]
call	sub_416EC0
push	6
lea	ecx, [ebp+var_34]
call	sub_416EA0
push	25h
lea	edi, [ebp+var_78]
call	sub_414950
mov	[ebp+var_70], 1
lea	edi, [ebp+var_78]
lea	esi, [ebp+var_34]
call	sub_116D710
lea	esi, [ebp+var_60]
call	sub_41DF90
lea	eax, [ebp+var_60]
call	sub_420D20
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	edx, [eax]
mov	ecx, [ebp+var_8C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+168h]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_84]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_8C]
call	sub_420330
lea	esi, [ebp+var_5C]
call	sub_422E70
mov	eax, 3
lea	ecx, [ebp+var_5C]
call	sub_422E50
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_5C]
call	sub_116D710
lea	esi, [ebp+var_38]
call	sub_41DF90
lea	eax, [ebp+var_38]
call	sub_420D20
mov	[ebp+var_A0], eax
mov	eax, [ebp+var_A0]
mov	edx, [eax]
mov	ecx, [ebp+var_A0]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+168h]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_98]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_A0]
call	sub_420330
lea	eax, [ebp+var_38]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_5C]
call	sub_422E20
lea	eax, [ebp+var_60]
call	sub_40ABB0
lea	esi, [ebp+var_78]
call	sub_414810
lea	ecx, [ebp+var_34]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45E6A0 endp

align 10h


; Attributes: bp-based frame

sub_45E820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568578
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45E851
push	200h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45E851:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45E820 endp

align 10h


; Attributes: bp-based frame

sub_45E860 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_2 ; "Technique_AlphaAsAlpha_NoLighting_VertC"...
call	sub_1128940
push	0Ah
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000010h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000010h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45E860 endp

align 10h


; Attributes: bp-based frame

sub_45E900 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45E929
mov	ecx, [ebp+var_4]
call	sub_45E860
mov	[ebp+var_20], eax
jmp	short loc_45E930

loc_45E929:
mov	[ebp+var_20], 0

loc_45E930:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45E900 endp

align 10h


; Attributes: bp-based frame

sub_45E940 proc	near

var_78=	dword ptr -78h

push	ebp
mov	ebp, esp
sub	esp, 78h
push	esi
mov	[ebp+var_78], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_3 ; "Technique_AlphaAsAlpha_NoLighting_VertC"...
call	sub_1128940
push	36h
mov	ecx, [ebp+var_78]
call	sub_10D2040
mov	eax, [ebp+var_78]
mov	dword ptr [eax], offset	off_1568608
mov	ecx, [ebp+var_78]
mov	dword ptr [ecx+138h], 80000002h
mov	edx, [ebp+var_78]
mov	dword ptr [edx+134h], 80000002h
mov	ecx, [ebp+var_78]
call	sub_45EA20
mov	ecx, [ebp+var_78]
call	sub_463300
mov	eax, [ebp+var_78]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45E940 endp

align 10h


; Attributes: bp-based frame

sub_45E9E0 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45EA09
mov	ecx, [ebp+var_4]
call	sub_45E940
mov	[ebp+var_6C], eax
jmp	short loc_45EA10

loc_45EA09:
mov	[ebp+var_6C], 0

loc_45EA10:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_45E9E0 endp

align 10h


; Attributes: bp-based frame

sub_45EA20 proc	near

var_60=	dword ptr -60h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	byte ptr -38h
var_30=	dword ptr -30h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
push	edi
mov	[ebp+var_60], ecx
lea	ecx, [ebp+var_1C]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1C]
call	sub_416E80
push	0
lea	ecx, [ebp+var_1C]
call	sub_417A20
push	7Fh
lea	ecx, [ebp+var_1C]
call	sub_416EC0
push	6
lea	ecx, [ebp+var_1C]
call	sub_416EA0
push	25h
lea	edi, [ebp+var_38]
call	sub_414950
mov	[ebp+var_30], 1
lea	edi, [ebp+var_38]
lea	esi, [ebp+var_1C]
call	sub_116D710
lea	esi, [ebp+var_20]
call	sub_41DF90
lea	eax, [ebp+var_20]
call	sub_420D20
mov	[ebp+var_4C], eax
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx+168h]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_44]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_4C]
call	sub_420330
lea	eax, [ebp+var_20]
call	sub_40ABB0
lea	esi, [ebp+var_38]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45EA20 endp

align 10h


; Attributes: bp-based frame

sub_45EAE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568608
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45EB11
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45EB11:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45EAE0 endp

align 10h


; Attributes: bp-based frame

sub_45EB20 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_4 ; "Technique_AlphaAsAlpha_NoLighting_VertC"...
call	sub_1128940
push	0Bh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000010h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000010h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45EB20 endp

align 10h


; Attributes: bp-based frame

sub_45EBC0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45EBE9
mov	ecx, [ebp+var_4]
call	sub_45EB20
mov	[ebp+var_20], eax
jmp	short loc_45EBF0

loc_45EBE9:
mov	[ebp+var_20], 0

loc_45EBF0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45EBC0 endp

align 10h


; Attributes: bp-based frame

sub_45EC00 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_5 ; "Technique_AlphaAsAlpha_UVScrolling_Simp"...
call	sub_1128940
push	0Dh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45EC00 endp

align 10h


; Attributes: bp-based frame

sub_45EC80 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45ECA9
mov	ecx, [ebp+var_4]
call	sub_45EC00
mov	[ebp+var_20], eax
jmp	short loc_45ECB0

loc_45ECA9:
mov	[ebp+var_20], 0

loc_45ECB0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45EC80 endp

align 10h


; Attributes: bp-based frame

sub_45ECC0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_2 ; "Technique_AlphaAsAlpha_NoLighting_VertC"...
call	sub_1128940
push	4Ah
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000010h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000010h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45ECC0 endp

align 10h


; Attributes: bp-based frame

sub_45ED60 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45ED89
mov	ecx, [ebp+var_4]
call	sub_45ECC0
mov	[ebp+var_20], eax
jmp	short loc_45ED90

loc_45ED89:
mov	[ebp+var_20], 0

loc_45ED90:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45ED60 endp

align 10h


; Attributes: bp-based frame

sub_45EDA0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_basi ; "Technique_Basic_Material_NoLighting"
call	sub_1128940
push	20h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45EDA0 endp

align 10h


; Attributes: bp-based frame

sub_45EE20 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45EE49
mov	ecx, [ebp+var_4]
call	sub_45EDA0
mov	[ebp+var_20], eax
jmp	short loc_45EE50

loc_45EE49:
mov	[ebp+var_20], 0

loc_45EE50:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45EE20 endp

align 10h


; Attributes: bp-based frame

sub_45EE60 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_0 ; "Technique_Basic_Material_NoLighting_NoT"...
call	sub_1128940
push	50h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45EE60 endp

align 10h


; Attributes: bp-based frame

sub_45EEE0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45EF09
mov	ecx, [ebp+var_4]
call	sub_45EE60
mov	[ebp+var_20], eax
jmp	short loc_45EF10

loc_45EF09:
mov	[ebp+var_20], 0

loc_45EF10:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45EEE0 endp

align 10h


; Attributes: bp-based frame

sub_45EF20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45EF67
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568698
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 21h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45EF6E

loc_45EF67:
mov	[ebp+var_8], 0

loc_45EF6E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45EF20 endp

align 10h


; Attributes: bp-based frame

sub_45EF80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568698
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45EFB1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45EFB1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45EF80 endp

align 10h


; Attributes: bp-based frame

sub_45EFC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F007
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568730
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 22h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45F00E

loc_45F007:
mov	[ebp+var_8], 0

loc_45F00E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45EFC0 endp

align 10h


; Attributes: bp-based frame

sub_45F020 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568730
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F051
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F051:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F020 endp

align 10h


; Attributes: bp-based frame

sub_45F060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F0A7
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15687C8
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 23h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45F0AE

loc_45F0A7:
mov	[ebp+var_8], 0

loc_45F0AE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45F060 endp

align 10h


; Attributes: bp-based frame

sub_45F0C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15687C8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F0F1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F0F1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F0C0 endp

align 10h


; Attributes: bp-based frame

sub_45F100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F147
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568860
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 24h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45F14E

loc_45F147:
mov	[ebp+var_8], 0

loc_45F14E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45F100 endp

align 10h


; Attributes: bp-based frame

sub_45F160 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568860
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F191
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F191:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F160 endp

align 10h


; Attributes: bp-based frame

sub_45F1A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F1E7
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15688F8
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 25h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45F1EE

loc_45F1E7:
mov	[ebp+var_8], 0

loc_45F1EE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45F1A0 endp

align 10h


; Attributes: bp-based frame

sub_45F200 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15688F8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F231
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F231:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F200 endp

align 10h


; Attributes: bp-based frame

sub_45F240 proc	near

var_5C=	dword ptr -5Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F28F
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568990
mov	ecx, [ebp+var_4]
call	sub_45F2A0
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 5Eh
mov	edx, [ebp+var_4]
mov	[ebp+var_5C], edx
jmp	short loc_45F296

loc_45F28F:
mov	[ebp+var_5C], 0

loc_45F296:
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn
sub_45F240 endp

align 10h


; Attributes: bp-based frame

sub_45F2A0 proc	near

var_68=	dword ptr -68h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	byte ptr -40h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 68h
push	esi
push	edi
mov	[ebp+var_68], ecx
lea	esi, [ebp+var_40]
call	sub_422E70
mov	eax, 3
lea	ecx, [ebp+var_40]
call	sub_422E50
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_40]
call	sub_116D710
lea	esi, [ebp+var_1C]
call	sub_41DF90
lea	eax, [ebp+var_1C]
call	sub_420D20
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	edx, [eax]
mov	ecx, [ebp+var_54]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+168h]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_4C]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_54]
call	sub_420330
lea	eax, [ebp+var_1C]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_40]
call	sub_422E20
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45F2A0 endp

align 10h


; Attributes: bp-based frame

sub_45F340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568990
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F371
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F371:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F340 endp

align 10h


; Attributes: bp-based frame

sub_45F380 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F3C7
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568A28
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 26h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45F3CE

loc_45F3C7:
mov	[ebp+var_8], 0

loc_45F3CE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45F380 endp

align 10h


; Attributes: bp-based frame

sub_45F3E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568A28
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F411
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F411:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F3E0 endp

align 10h


; Attributes: bp-based frame

sub_45F420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F467
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568AC0
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 27h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_45F46E

loc_45F467:
mov	[ebp+var_8], 0

loc_45F46E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_45F420 endp

align 10h


; Attributes: bp-based frame

sub_45F480 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568AC0
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F4B1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F4B1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F480 endp

align 10h


; Attributes: bp-based frame

sub_45F4C0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_1 ; "Technique_Basic_NoLighting_VertColor_No"...
call	sub_1128940
push	52h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000004h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000004h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45F4C0 endp

align 10h


; Attributes: bp-based frame

sub_45F560 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F589
mov	ecx, [ebp+var_4]
call	sub_45F4C0
mov	[ebp+var_20], eax
jmp	short loc_45F590

loc_45F589:
mov	[ebp+var_20], 0

loc_45F590:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45F560 endp

align 10h


; Attributes: bp-based frame

sub_45F5A0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_2 ; "Technique_Basic_NoLighting"
call	sub_1128940
push	53h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000004h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000004h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45F5A0 endp

align 10h


; Attributes: bp-based frame

sub_45F640 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F669
mov	ecx, [ebp+var_4]
call	sub_45F5A0
mov	[ebp+var_20], eax
jmp	short loc_45F670

loc_45F669:
mov	[ebp+var_20], 0

loc_45F670:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45F640 endp

align 10h


; Attributes: bp-based frame

sub_45F680 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_3 ; "Technique_Basic_NoLighting_VertColor"
call	sub_1128940
push	54h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000004h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000004h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45F680 endp

align 10h


; Attributes: bp-based frame

sub_45F720 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F749
mov	ecx, [ebp+var_4]
call	sub_45F680
mov	[ebp+var_20], eax
jmp	short loc_45F750

loc_45F749:
mov	[ebp+var_20], 0

loc_45F750:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45F720 endp

align 10h


; Attributes: bp-based frame

sub_45F760 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_4 ; "Technique_Basic_Lighting_VertColor_NoTe"...
call	sub_1128940
push	55h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000004h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000004h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45F760 endp

align 10h


; Attributes: bp-based frame

sub_45F800 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F829
mov	ecx, [ebp+var_4]
call	sub_45F760
mov	[ebp+var_20], eax
jmp	short loc_45F830

loc_45F829:
mov	[ebp+var_20], 0

loc_45F830:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45F800 endp

align 10h


; Attributes: bp-based frame

sub_45F840 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45F871
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45F871:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45F840 endp

align 10h


; Attributes: bp-based frame

sub_45F880 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_5 ; "Technique_Basic_Lighting_VertColor"
call	sub_1128940
push	56h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000004h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000004h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45F880 endp

align 10h


; Attributes: bp-based frame

sub_45F920 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45F949
mov	ecx, [ebp+var_4]
call	sub_45F880
mov	[ebp+var_20], eax
jmp	short loc_45F950

loc_45F949:
mov	[ebp+var_20], 0

loc_45F950:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45F920 endp

align 10h


; Attributes: bp-based frame

sub_45F960 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_part ; "Technique_Particle_FX_Basic"
call	sub_1128940
push	42h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45F960 endp

align 10h


; Attributes: bp-based frame

sub_45F9E0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45FA09
mov	ecx, [ebp+var_4]
call	sub_45F960
mov	[ebp+var_20], eax
jmp	short loc_45FA10

loc_45FA09:
mov	[ebp+var_20], 0

loc_45FA10:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45F9E0 endp

align 10h


; Attributes: bp-based frame

sub_45FA20 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_pa_0 ; "Technique_Particle_FX_Overlay"
call	sub_1128940
push	43h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45FA20 endp

align 10h


; Attributes: bp-based frame

sub_45FAA0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45FAC9
mov	ecx, [ebp+var_4]
call	sub_45FA20
mov	[ebp+var_20], eax
jmp	short loc_45FAD0

loc_45FAC9:
mov	[ebp+var_20], 0

loc_45FAD0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_45FAA0 endp

align 10h


; Attributes: bp-based frame

sub_45FAE0 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_5 ; "Technique_Basic_Lighting_VertColor"
call	sub_1128940
push	37h
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568BE8
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_45FBF0
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45FAE0 endp

align 10h


; Attributes: bp-based frame

sub_45FBA0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45FBCF
mov	ecx, [ebp+var_4]
call	sub_45FAE0
mov	[ebp+var_B0], eax
jmp	short loc_45FBD9

loc_45FBCF:
mov	[ebp+var_B0], 0

loc_45FBD9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_45FBA0 endp

align 10h


; Attributes: bp-based frame

sub_45FBF0 proc	near

var_C4=	dword ptr -0C4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_78=	byte ptr -78h
var_70=	dword ptr -70h
var_60=	byte ptr -60h
var_5C=	byte ptr -5Ch
var_38=	byte ptr -38h
var_34=	byte ptr -34h
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 0C4h
push	esi
push	edi
mov	[ebp+var_C4], ecx
lea	ecx, [ebp+var_34]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_34]
call	sub_416E80
push	1
lea	ecx, [ebp+var_34]
call	sub_417A20
push	6
lea	ecx, [ebp+var_34]
call	sub_416E40
push	7
lea	ecx, [ebp+var_34]
call	sub_416E60
push	25h
lea	edi, [ebp+var_78]
call	sub_414950
mov	[ebp+var_70], 1
lea	edi, [ebp+var_78]
lea	esi, [ebp+var_34]
call	sub_116D710
lea	esi, [ebp+var_60]
call	sub_41DF90
lea	eax, [ebp+var_60]
call	sub_420D20
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	edx, [eax]
mov	ecx, [ebp+var_8C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+168h]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_84]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_8C]
call	sub_420330
lea	esi, [ebp+var_5C]
call	sub_422E70
mov	eax, 1
lea	ecx, [ebp+var_5C]
call	sub_422E50
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_5C]
call	sub_116D710
lea	esi, [ebp+var_38]
call	sub_41DF90
lea	eax, [ebp+var_38]
call	sub_420D20
mov	[ebp+var_A0], eax
mov	eax, [ebp+var_A0]
mov	edx, [eax]
mov	ecx, [ebp+var_A0]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+168h]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_98]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_A0]
call	sub_420330
lea	eax, [ebp+var_38]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_5C]
call	sub_422E20
lea	eax, [ebp+var_60]
call	sub_40ABB0
lea	esi, [ebp+var_78]
call	sub_414810
lea	ecx, [ebp+var_34]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45FBF0 endp

align 10h


; Attributes: bp-based frame

sub_45FD70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568BE8
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_45FDA1
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_45FDA1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_45FD70 endp

align 10h


; Attributes: bp-based frame

sub_45FDB0 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_2 ; "Technique_Basic_NoLighting"
call	sub_1128940
push	38h
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45FDB0 endp

align 10h


; Attributes: bp-based frame

sub_45FE70 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45FE9F
mov	ecx, [ebp+var_4]
call	sub_45FDB0
mov	[ebp+var_B0], eax
jmp	short loc_45FEA9

loc_45FE9F:
mov	[ebp+var_B0], 0

loc_45FEA9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_45FE70 endp

align 10h


; Attributes: bp-based frame

sub_45FEC0 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_6 ; "Technique_Basic_NoLighting_AnimAlpha"
call	sub_1128940
push	44h
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45FEC0 endp

align 10h


; Attributes: bp-based frame

sub_45FF80 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_45FFAF
mov	ecx, [ebp+var_4]
call	sub_45FEC0
mov	[ebp+var_B0], eax
jmp	short loc_45FFB9

loc_45FFAF:
mov	[ebp+var_B0], 0

loc_45FFB9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_45FF80 endp

db 1Dh dup(0CCh)


; Attributes: bp-based frame

sub_45FFE0 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_3 ; "Technique_Basic_NoLighting_VertColor"
call	sub_1128940
push	39h
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_45FFE0 endp

align 10h


; Attributes: bp-based frame

sub_4600A0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4600CF
mov	ecx, [ebp+var_4]
call	sub_45FFE0
mov	[ebp+var_B0], eax
jmp	short loc_4600D9

loc_4600CF:
mov	[ebp+var_B0], 0

loc_4600D9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4600A0 endp

align 10h


; Attributes: bp-based frame

sub_4600F0 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_1 ; "Technique_Basic_NoLighting_VertColor_No"...
call	sub_1128940
push	3Ah
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4600F0 endp

align 10h


; Attributes: bp-based frame

sub_4601B0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4601DF
mov	ecx, [ebp+var_4]
call	sub_4600F0
mov	[ebp+var_B0], eax
jmp	short loc_4601E9

loc_4601DF:
mov	[ebp+var_B0], 0

loc_4601E9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4601B0 endp

align 10h


; Attributes: bp-based frame

sub_460200 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_7 ; "Technique_Basic_Lighting_VertColor_UVSc"...
call	sub_1128940
push	3Bh
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460200 endp

align 10h


; Attributes: bp-based frame

sub_4602C0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4602EF
mov	ecx, [ebp+var_4]
call	sub_460200
mov	[ebp+var_B0], eax
jmp	short loc_4602F9

loc_4602EF:
mov	[ebp+var_B0], 0

loc_4602F9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4602C0 endp

align 10h


; Attributes: bp-based frame

sub_460310 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_8 ; "Technique_Basic_Lighting_VertColor_UVSc"...
call	sub_1128940
push	3Ch
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568BE8
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_45FBF0
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460310 endp

align 10h


; Attributes: bp-based frame

sub_4603D0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4603FF
mov	ecx, [ebp+var_4]
call	sub_460310
mov	[ebp+var_B0], eax
jmp	short loc_460409

loc_4603FF:
mov	[ebp+var_B0], 0

loc_460409:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4603D0 endp

align 10h


; Attributes: bp-based frame

sub_460420 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_9 ; "Technique_Basic_NoLighting_Skinned"
call	sub_1128940
push	3Dh
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460420 endp

align 10h


; Attributes: bp-based frame

sub_4604E0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_46050F
mov	ecx, [ebp+var_4]
call	sub_460420
mov	[ebp+var_B0], eax
jmp	short loc_460519

loc_46050F:
mov	[ebp+var_B0], 0

loc_460519:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4604E0 endp

align 10h


; Attributes: bp-based frame

sub_460530 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_b_10 ; "Technique_Basic_NoLighting_VertColor_Sk"...
call	sub_1128940
push	3Eh
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460530 endp

align 10h


; Attributes: bp-based frame

sub_4605F0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_46061F
mov	ecx, [ebp+var_4]
call	sub_460530
mov	[ebp+var_B0], eax
jmp	short loc_460629

loc_46061F:
mov	[ebp+var_B0], 0

loc_460629:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4605F0 endp

align 10h


; Attributes: bp-based frame

sub_460640 proc	near

var_C4=	dword ptr -0C4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_78=	byte ptr -78h
var_70=	dword ptr -70h
var_60=	byte ptr -60h
var_5C=	byte ptr -5Ch
var_38=	byte ptr -38h
var_34=	byte ptr -34h
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 0C4h
push	esi
push	edi
mov	[ebp+var_C4], ecx
lea	ecx, [ebp+var_34]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_34]
call	sub_416E80
push	1
lea	ecx, [ebp+var_34]
call	sub_417A20
push	6
lea	ecx, [ebp+var_34]
call	sub_416E40
push	7
lea	ecx, [ebp+var_34]
call	sub_416E40
push	25h
lea	edi, [ebp+var_78]
call	sub_414950
mov	[ebp+var_70], 1
lea	edi, [ebp+var_78]
lea	esi, [ebp+var_34]
call	sub_116D710
lea	esi, [ebp+var_60]
call	sub_41DF90
lea	eax, [ebp+var_60]
call	sub_420D20
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	edx, [eax]
mov	ecx, [ebp+var_8C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+168h]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_84]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_8C]
call	sub_420330
lea	esi, [ebp+var_5C]
call	sub_422E70
mov	eax, 1
lea	ecx, [ebp+var_5C]
call	sub_422E50
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_5C]
call	sub_116D710
lea	esi, [ebp+var_38]
call	sub_41DF90
lea	eax, [ebp+var_38]
call	sub_420D20
mov	[ebp+var_A0], eax
mov	eax, [ebp+var_A0]
mov	edx, [eax]
mov	ecx, [ebp+var_A0]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+168h]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_98]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_A0]
call	sub_420330
lea	eax, [ebp+var_38]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_5C]
call	sub_422E20
lea	eax, [ebp+var_60]
call	sub_40ABB0
lea	esi, [ebp+var_78]
call	sub_414810
lea	ecx, [ebp+var_34]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460640 endp

align 10h


; Attributes: bp-based frame

sub_4607C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4607F1
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4607F1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4607C0 endp

align 10h


; Attributes: bp-based frame

sub_460800 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_b_11 ; "Technique_Basic_NoLighting_VertColor_No"...
call	sub_1128940
push	3Fh
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460800 endp

align 10h


; Attributes: bp-based frame

sub_4608C0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4608EF
mov	ecx, [ebp+var_4]
call	sub_460800
mov	[ebp+var_B0], eax
jmp	short loc_4608F9

loc_4608EF:
mov	[ebp+var_B0], 0

loc_4608F9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4608C0 endp

align 10h


; Attributes: bp-based frame

sub_460910 proc	near

var_B4=	dword ptr -0B4h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	[ebp+var_B4], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_b_12 ; "Technique_Basic_UVScrolling_SimpleV_Ski"...
call	sub_1128940
push	40h
mov	ecx, [ebp+var_B4]
call	sub_10D2040
mov	eax, [ebp+var_B4]
mov	dword ptr [eax], offset	off_1568C78
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx+138h], 10h
mov	edx, [ebp+var_B4]
mov	dword ptr [edx+134h], 10h
mov	ecx, [ebp+var_B4]
call	sub_460640
mov	ecx, [ebp+var_B4]
call	sub_463300
mov	eax, [ebp+var_B4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460910 endp

align 10h


; Attributes: bp-based frame

sub_4609D0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4609FF
mov	ecx, [ebp+var_4]
call	sub_460910
mov	[ebp+var_B0], eax
jmp	short loc_460A09

loc_4609FF:
mov	[ebp+var_B0], 0

loc_460A09:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4609D0 endp

align 10h


; Attributes: bp-based frame

sub_460A20 proc	near

var_78=	dword ptr -78h

push	ebp
mov	ebp, esp
sub	esp, 78h
push	esi
mov	[ebp+var_78], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_b_13 ; "Technique_Basic_Lighting_VertColor_Emis"...
call	sub_1128940
push	41h
mov	ecx, [ebp+var_78]
call	sub_10D2040
mov	eax, [ebp+var_78]
mov	dword ptr [eax], offset	off_1568608
mov	ecx, [ebp+var_78]
call	sub_45EA20
mov	ecx, [ebp+var_78]
call	sub_463300
mov	eax, [ebp+var_78]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460A20 endp

align 10h


; Attributes: bp-based frame

sub_460AB0 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_460AD9
mov	ecx, [ebp+var_4]
call	sub_460A20
mov	[ebp+var_6C], eax
jmp	short loc_460AE0

loc_460AD9:
mov	[ebp+var_6C], 0

loc_460AE0:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_460AB0 endp

align 10h


; Attributes: bp-based frame

sub_460AF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_460B37
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568D08
mov	ecx, [ebp+var_4]
call	sub_460B50
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 57h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_460B3E

loc_460B37:
mov	[ebp+var_8], 0

loc_460B3E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_460AF0 endp

align 10h


; Attributes: bp-based frame

sub_460B50 proc	near

var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= byte ptr -32Ch
var_320= dword ptr -320h
var_31C= byte ptr -31Ch
var_310= dword ptr -310h
var_30C= byte ptr -30Ch
var_300= dword ptr -300h
var_2FC= byte ptr -2FCh
var_2F0= dword ptr -2F0h
var_2EC= byte ptr -2ECh
var_2E0= dword ptr -2E0h
var_2DC= byte ptr -2DCh
var_2D0= dword ptr -2D0h
var_2CC= byte ptr -2CCh
var_2C0= dword ptr -2C0h
var_2BC= byte ptr -2BCh
var_2B0= dword ptr -2B0h
var_2AC= byte ptr -2ACh
var_2A0= byte ptr -2A0h
var_284= byte ptr -284h
var_280= byte ptr -280h
var_264= byte ptr -264h
var_25C= dword ptr -25Ch
var_24C= byte ptr -24Ch
var_244= dword ptr -244h
var_234= byte ptr -234h
var_218= byte ptr -218h
var_1FC= byte ptr -1FCh
var_1F8= byte ptr -1F8h
var_1DC= byte ptr -1DCh
var_1D8= byte ptr -1D8h
var_1D0= dword ptr -1D0h
var_1C0= byte ptr -1C0h
var_1B8= dword ptr -1B8h
var_1A8= byte ptr -1A8h
var_1A4= byte ptr -1A4h
var_188= byte ptr -188h
var_16C= byte ptr -16Ch
var_150= byte ptr -150h
var_14C= byte ptr -14Ch
var_148= byte ptr -148h
var_140= dword ptr -140h
var_130= byte ptr -130h
var_128= dword ptr -128h
var_118= byte ptr -118h
var_114= byte ptr -114h
var_110= byte ptr -110h
var_108= dword ptr -108h
var_F8=	byte ptr -0F8h
var_DC=	byte ptr -0DCh
var_D4=	dword ptr -0D4h
var_C4=	byte ptr -0C4h
var_A8=	byte ptr -0A8h
var_A0=	dword ptr -0A0h
var_90=	byte ptr -90h
var_8C=	byte ptr -8Ch
var_84=	dword ptr -84h
var_74=	byte ptr -74h
var_70=	byte ptr -70h
var_68=	dword ptr -68h
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_38=	byte ptr -38h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 334h
push	esi
push	edi
mov	[ebp+var_334], ecx
lea	ecx, [ebp+var_2A0]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_2A0]
call	sub_417A20
push	0
lea	ecx, [ebp+var_2A0]
call	sub_416E80
push	25h
lea	edi, [ebp+var_1D8]
call	sub_414950
mov	[ebp+var_1D0], 1
lea	edi, [ebp+var_1D8]
lea	esi, [ebp+var_2A0]
call	sub_116D710
lea	esi, [ebp+var_284]
call	sub_41DF90
lea	eax, [ebp+var_284]
call	sub_420D20
mov	[ebp+var_2B0], eax
mov	eax, [ebp+var_2B0]
push	eax
lea	ecx, [ebp+var_2AC]
call	sub_418670
lea	ecx, [ebp+var_2AC]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2AC]
call	sub_429100
lea	ecx, [ebp+var_188]
call	sub_417A80
push	1
lea	ecx, [ebp+var_188]
call	sub_417A40
push	1
lea	ecx, [ebp+var_188]
call	sub_417A20
push	25h
lea	edi, [ebp+var_DC]
call	sub_414950
mov	[ebp+var_D4], 1
lea	edi, [ebp+var_DC]
lea	esi, [ebp+var_188]
call	sub_116D710
lea	esi, [ebp+var_1FC]
call	sub_41DF90
lea	eax, [ebp+var_1FC]
call	sub_420D20
mov	[ebp+var_2C0], eax
mov	eax, [ebp+var_2C0]
push	eax
lea	ecx, [ebp+var_2BC]
call	sub_418670
lea	ecx, [ebp+var_2BC]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2BC]
call	sub_429100
lea	ecx, [ebp+var_218]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_218]
call	sub_417A20
push	1
lea	ecx, [ebp+var_218]
call	sub_416E80
push	7Fh
lea	ecx, [ebp+var_218]
call	sub_416EC0
push	6
lea	ecx, [ebp+var_218]
call	sub_416EA0
push	25h
lea	edi, [ebp+var_1C0]
call	sub_414950
mov	[ebp+var_1B8], 1
lea	edi, [ebp+var_1C0]
lea	esi, [ebp+var_218]
call	sub_116D710
lea	esi, [ebp+var_1A8]
call	sub_41DF90
lea	eax, [ebp+var_1A8]
call	sub_420D20
mov	[ebp+var_2D0], eax
mov	eax, [ebp+var_2D0]
push	eax
lea	ecx, [ebp+var_2CC]
call	sub_418670
lea	ecx, [ebp+var_2CC]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2CC]
call	sub_429100
lea	ecx, [ebp+var_C4]
call	sub_417A80
push	1
lea	ecx, [ebp+var_C4]
call	sub_417A40
push	1
lea	ecx, [ebp+var_C4]
call	sub_417A20
push	25h
lea	edi, [ebp+var_70]
call	sub_414950
mov	[ebp+var_68], 1
lea	edi, [ebp+var_70]
lea	esi, [ebp+var_C4]
call	sub_116D710
lea	esi, [ebp+var_58]
call	sub_41DF90
lea	eax, [ebp+var_58]
call	sub_420D20
mov	[ebp+var_2E0], eax
mov	eax, [ebp+var_2E0]
push	eax
lea	ecx, [ebp+var_2DC]
call	sub_418670
lea	ecx, [ebp+var_2DC]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2DC]
call	sub_429100
lea	ecx, [ebp+var_234]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_234]
call	sub_417A20
push	0
lea	ecx, [ebp+var_234]
call	sub_416E80
push	25h
lea	edi, [ebp+var_A8]
call	sub_414950
mov	[ebp+var_A0], 1
lea	edi, [ebp+var_A8]
lea	esi, [ebp+var_234]
call	sub_116D710
lea	esi, [ebp+var_114]
call	sub_41DF90
lea	eax, [ebp+var_114]
call	sub_420D20
mov	[ebp+var_2F0], eax
mov	eax, [ebp+var_2F0]
push	eax
lea	ecx, [ebp+var_2EC]
call	sub_418670
lea	ecx, [ebp+var_2EC]
push	ecx
push	4
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2EC]
call	sub_429100
lea	ecx, [ebp+var_280]
call	sub_417A80
push	1
lea	ecx, [ebp+var_280]
call	sub_417A40
push	1
lea	ecx, [ebp+var_280]
call	sub_417A20
push	25h
lea	edi, [ebp+var_130]
call	sub_414950
mov	[ebp+var_128], 1
lea	edi, [ebp+var_130]
lea	esi, [ebp+var_280]
call	sub_116D710
lea	esi, [ebp+var_90]
call	sub_41DF90
lea	eax, [ebp+var_90]
call	sub_420D20
mov	[ebp+var_300], eax
mov	eax, [ebp+var_300]
push	eax
lea	ecx, [ebp+var_2FC]
call	sub_418670
lea	ecx, [ebp+var_2FC]
push	ecx
push	4
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2FC]
call	sub_429100
lea	ecx, [ebp+var_16C]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_16C]
call	sub_417A20
push	6
lea	ecx, [ebp+var_16C]
call	sub_416E40
push	0
lea	ecx, [ebp+var_16C]
call	sub_416E60
push	25h
lea	edi, [ebp+var_8C]
call	sub_414950
mov	[ebp+var_84], 1
lea	edi, [ebp+var_8C]
lea	esi, [ebp+var_16C]
call	sub_116D710
lea	esi, [ebp+var_150]
call	sub_41DF90
lea	eax, [ebp+var_150]
call	sub_420D20
mov	[ebp+var_310], eax
mov	eax, [ebp+var_310]
push	eax
lea	ecx, [ebp+var_30C]
call	sub_418670
lea	ecx, [ebp+var_30C]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_30C]
call	sub_429100
lea	ecx, [ebp+var_54]
call	sub_417A80
push	0
lea	ecx, [ebp+var_54]
call	sub_417A40
push	1
lea	ecx, [ebp+var_54]
call	sub_417A20
push	25h
lea	edi, [ebp+var_264]
call	sub_414950
mov	[ebp+var_25C], 1
lea	edi, [ebp+var_264]
lea	esi, [ebp+var_54]
call	sub_116D710
lea	esi, [ebp+var_14C]
call	sub_41DF90
lea	eax, [ebp+var_14C]
call	sub_420D20
mov	[ebp+var_320], eax
mov	eax, [ebp+var_320]
push	eax
lea	ecx, [ebp+var_31C]
call	sub_418670
lea	ecx, [ebp+var_31C]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_31C]
call	sub_429100
lea	ecx, [ebp+var_1F8]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1F8]
call	sub_417A20
push	6
lea	ecx, [ebp+var_1F8]
call	sub_416E40
push	0
lea	ecx, [ebp+var_1F8]
call	sub_416E60
push	25h
lea	edi, [ebp+var_110]
call	sub_414950
mov	[ebp+var_108], 1
lea	edi, [ebp+var_110]
lea	esi, [ebp+var_1F8]
call	sub_116D710
lea	esi, [ebp+var_1C]
call	sub_41DF90
lea	eax, [ebp+var_1C]
call	sub_420D20
mov	[ebp+var_330], eax
mov	eax, [ebp+var_330]
push	eax
lea	ecx, [ebp+var_32C]
call	sub_418670
lea	ecx, [ebp+var_32C]
push	ecx
push	10h
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_334]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_32C]
call	sub_429100
lea	ecx, [ebp+var_F8]
call	sub_417A80
push	0
lea	ecx, [ebp+var_F8]
call	sub_417A40
push	1
lea	ecx, [ebp+var_F8]
call	sub_417A20
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_F8]
call	sub_116D710
lea	esi, [ebp+var_118]
call	sub_41DF90
lea	eax, [ebp+var_118]
call	sub_420D20
push	eax
push	10h
mov	ecx, [ebp+var_334]
call	sub_45C7A0
lea	ecx, [ebp+var_1A4]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1A4]
call	sub_417A20
push	6
lea	ecx, [ebp+var_1A4]
call	sub_416E40
push	0
lea	ecx, [ebp+var_1A4]
call	sub_416E60
push	25h
lea	edi, [ebp+var_24C]
call	sub_414950
mov	[ebp+var_244], 1
lea	edi, [ebp+var_24C]
lea	esi, [ebp+var_1A4]
call	sub_116D710
lea	esi, [ebp+var_74]
call	sub_41DF90
lea	eax, [ebp+var_74]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_334]
call	sub_45C7A0
lea	ecx, [ebp+var_38]
call	sub_417A80
push	0
lea	ecx, [ebp+var_38]
call	sub_417A40
push	1
lea	ecx, [ebp+var_38]
call	sub_417A20
push	25h
lea	edi, [ebp+var_148]
call	sub_414950
mov	[ebp+var_140], 1
lea	edi, [ebp+var_148]
lea	esi, [ebp+var_38]
call	sub_116D710
lea	esi, [ebp+var_1DC]
call	sub_41DF90
lea	eax, [ebp+var_1DC]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_334]
call	sub_45C7A0
lea	eax, [ebp+var_1DC]
call	sub_40ABB0
lea	esi, [ebp+var_148]
call	sub_414810
lea	ecx, [ebp+var_38]
call	sub_4179F0
lea	eax, [ebp+var_74]
call	sub_40ABB0
lea	esi, [ebp+var_24C]
call	sub_414810
lea	ecx, [ebp+var_1A4]
call	sub_4179F0
lea	eax, [ebp+var_118]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_F8]
call	sub_4179F0
lea	eax, [ebp+var_1C]
call	sub_40ABB0
lea	esi, [ebp+var_110]
call	sub_414810
lea	ecx, [ebp+var_1F8]
call	sub_4179F0
lea	eax, [ebp+var_14C]
call	sub_40ABB0
lea	esi, [ebp+var_264]
call	sub_414810
lea	ecx, [ebp+var_54]
call	sub_4179F0
lea	eax, [ebp+var_150]
call	sub_40ABB0
lea	esi, [ebp+var_8C]
call	sub_414810
lea	ecx, [ebp+var_16C]
call	sub_4179F0
lea	eax, [ebp+var_90]
call	sub_40ABB0
lea	esi, [ebp+var_130]
call	sub_414810
lea	ecx, [ebp+var_280]
call	sub_4179F0
lea	eax, [ebp+var_114]
call	sub_40ABB0
lea	esi, [ebp+var_A8]
call	sub_414810
lea	ecx, [ebp+var_234]
call	sub_4179F0
lea	eax, [ebp+var_58]
call	sub_40ABB0
lea	esi, [ebp+var_70]
call	sub_414810
lea	ecx, [ebp+var_C4]
call	sub_4179F0
lea	eax, [ebp+var_1A8]
call	sub_40ABB0
lea	esi, [ebp+var_1C0]
call	sub_414810
lea	ecx, [ebp+var_218]
call	sub_4179F0
lea	eax, [ebp+var_1FC]
call	sub_40ABB0
lea	esi, [ebp+var_DC]
call	sub_414810
lea	ecx, [ebp+var_188]
call	sub_4179F0
lea	eax, [ebp+var_284]
call	sub_40ABB0
lea	esi, [ebp+var_1D8]
call	sub_414810
lea	ecx, [ebp+var_2A0]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_460B50 endp

align 10h


; Attributes: bp-based frame

sub_461450 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568D08
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_461481
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_461481:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_461450 endp

align 10h


; Attributes: bp-based frame

sub_461490 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_2 ; "Technique_AlphaAsAlpha_NoLighting_VertC"...
call	sub_1128940
push	0Fh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80100000h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80100000h
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_461490 endp

align 10h


; Attributes: bp-based frame

sub_461520 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_461549
mov	ecx, [ebp+var_4]
call	sub_461490
mov	[ebp+var_20], eax
jmp	short loc_461550

loc_461549:
mov	[ebp+var_20], 0

loc_461550:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_461520 endp

align 10h


; Attributes: bp-based frame

sub_461560 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_al_4 ; "Technique_AlphaAsAlpha_NoLighting_VertC"...
call	sub_1128940
push	10h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80100000h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80100000h
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_461560 endp

align 10h


; Attributes: bp-based frame

sub_4615F0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_461619
mov	ecx, [ebp+var_4]
call	sub_461560
mov	[ebp+var_20], eax
jmp	short loc_461620

loc_461619:
mov	[ebp+var_20], 0

loc_461620:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4615F0 endp

align 10h


; Attributes: bp-based frame

sub_461630 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568DA0
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_461661
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_461661:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_461630 endp

align 10h


; Attributes: bp-based frame

sub_461670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4616B7
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568E30
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 5Dh
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_4616BE

loc_4616B7:
mov	[ebp+var_8], 0

loc_4616BE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_461670 endp

align 10h


; Attributes: bp-based frame

sub_4616D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568E30
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_461701
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_461701:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4616D0 endp

align 10h


; Attributes: bp-based frame

sub_461710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_461757
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568EC8
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 6Bh
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_46175E

loc_461757:
mov	[ebp+var_8], 0

loc_46175E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_461710 endp

align 10h


; Attributes: bp-based frame

sub_461770 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568EC8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4617A1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4617A1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_461770 endp

align 10h


; Attributes: bp-based frame

sub_4617B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4617F7
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568F60
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 69h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_4617FE

loc_4617F7:
mov	[ebp+var_8], 0

loc_4617FE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4617B0 endp

align 10h


; Attributes: bp-based frame

sub_461810 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568F60
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_461841
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_461841:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_461810 endp

align 10h


; Attributes: bp-based frame

sub_461850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_461897
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568FF8
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 6Ah
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_46189E

loc_461897:
mov	[ebp+var_8], 0

loc_46189E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_461850 endp

align 10h


; Attributes: bp-based frame

sub_4618B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1568FF8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4618E1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4618E1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4618B0 endp

align 10h


; Attributes: bp-based frame

sub_4618F0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_mode ; "Technique_Model_Footprint"
call	sub_1128940
push	15h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4618F0 endp

align 10h


; Attributes: bp-based frame

sub_461970 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_461999
mov	ecx, [ebp+var_4]
call	sub_4618F0
mov	[ebp+var_20], eax
jmp	short loc_4619A0

loc_461999:
mov	[ebp+var_20], 0

loc_4619A0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_461970 endp

align 10h


; Attributes: bp-based frame

sub_4619B0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_expe ; "Technique_Experimental"
call	sub_1128940
push	31h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4619B0 endp

align 10h


; Attributes: bp-based frame

sub_461A30 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_461A59
mov	ecx, [ebp+var_4]
call	sub_4619B0
mov	[ebp+var_20], eax
jmp	short loc_461A60

loc_461A59:
mov	[ebp+var_20], 0

loc_461A60:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_461A30 endp

align 10h


; Attributes: bp-based frame

sub_461A70 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_skyd ; "Technique_Skydome"
call	sub_1128940
push	0
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1569090
mov	ecx, [ebp+var_1C]
call	sub_461B30
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_461A70 endp

align 10h


; Attributes: bp-based frame

sub_461AF0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_461B19
mov	ecx, [ebp+var_4]
call	sub_461A70
mov	[ebp+var_20], eax
jmp	short loc_461B20

loc_461B19:
mov	[ebp+var_20], 0

loc_461B20:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_461AF0 endp

align 10h


; Attributes: bp-based frame

sub_461B30 proc	near

var_2E4= dword ptr -2E4h
var_2D8= dword ptr -2D8h
var_2D4= byte ptr -2D4h
var_2C8= dword ptr -2C8h
var_2C4= byte ptr -2C4h
var_2B8= dword ptr -2B8h
var_2B4= byte ptr -2B4h
var_2A8= dword ptr -2A8h
var_2A4= byte ptr -2A4h
var_298= dword ptr -298h
var_294= byte ptr -294h
var_288= dword ptr -288h
var_284= byte ptr -284h
var_278= dword ptr -278h
var_274= byte ptr -274h
var_268= byte ptr -268h
var_24C= byte ptr -24Ch
var_248= byte ptr -248h
var_22C= byte ptr -22Ch
var_224= dword ptr -224h
var_214= byte ptr -214h
var_20C= dword ptr -20Ch
var_1FC= byte ptr -1FCh
var_1E0= byte ptr -1E0h
var_1DC= byte ptr -1DCh
var_1C0= byte ptr -1C0h
var_1BC= byte ptr -1BCh
var_1B4= dword ptr -1B4h
var_1A4= byte ptr -1A4h
var_19C= dword ptr -19Ch
var_18C= byte ptr -18Ch
var_188= byte ptr -188h
var_16C= byte ptr -16Ch
var_150= byte ptr -150h
var_134= byte ptr -134h
var_130= byte ptr -130h
var_12C= byte ptr -12Ch
var_124= dword ptr -124h
var_114= byte ptr -114h
var_10C= dword ptr -10Ch
var_FC=	byte ptr -0FCh
var_F8=	byte ptr -0F8h
var_F0=	dword ptr -0F0h
var_E0=	byte ptr -0E0h
var_C4=	byte ptr -0C4h
var_BC=	dword ptr -0BCh
var_AC=	byte ptr -0ACh
var_90=	byte ptr -90h
var_8C=	byte ptr -8Ch
var_84=	dword ptr -84h
var_74=	byte ptr -74h
var_70=	byte ptr -70h
var_68=	dword ptr -68h
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_38=	byte ptr -38h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 2E4h
push	esi
push	edi
mov	[ebp+var_2E4], ecx
lea	ecx, [ebp+var_268]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_268]
call	sub_417A20
push	0
lea	ecx, [ebp+var_268]
call	sub_416E80
push	25h
lea	edi, [ebp+var_1BC]
call	sub_414950
mov	[ebp+var_1B4], 1
lea	edi, [ebp+var_1BC]
lea	esi, [ebp+var_268]
call	sub_116D710
lea	esi, [ebp+var_24C]
call	sub_41DF90
lea	eax, [ebp+var_24C]
call	sub_420D20
mov	[ebp+var_278], eax
mov	eax, [ebp+var_278]
push	eax
lea	ecx, [ebp+var_274]
call	sub_418670
lea	ecx, [ebp+var_274]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_2E4]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_274]
call	sub_429100
lea	ecx, [ebp+var_16C]
call	sub_417A80
push	0
lea	ecx, [ebp+var_16C]
call	sub_417A40
push	25h
lea	edi, [ebp+var_C4]
call	sub_414950
mov	[ebp+var_BC], 1
lea	edi, [ebp+var_C4]
lea	esi, [ebp+var_16C]
call	sub_116D710
lea	esi, [ebp+var_1E0]
call	sub_41DF90
lea	eax, [ebp+var_1E0]
call	sub_420D20
mov	[ebp+var_288], eax
mov	eax, [ebp+var_288]
push	eax
lea	ecx, [ebp+var_284]
call	sub_418670
lea	ecx, [ebp+var_284]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_2E4]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_284]
call	sub_429100
lea	ecx, [ebp+var_1FC]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_1FC]
call	sub_417A20
push	1
lea	ecx, [ebp+var_1FC]
call	sub_416E80
push	7Fh
lea	ecx, [ebp+var_1FC]
call	sub_416EC0
push	6
lea	ecx, [ebp+var_1FC]
call	sub_416EA0
push	25h
lea	edi, [ebp+var_1A4]
call	sub_414950
mov	[ebp+var_19C], 1
lea	edi, [ebp+var_1A4]
lea	esi, [ebp+var_1FC]
call	sub_116D710
lea	esi, [ebp+var_18C]
call	sub_41DF90
lea	eax, [ebp+var_18C]
call	sub_420D20
mov	[ebp+var_298], eax
mov	eax, [ebp+var_298]
push	eax
lea	ecx, [ebp+var_294]
call	sub_418670
lea	ecx, [ebp+var_294]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_2E4]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_294]
call	sub_429100
lea	ecx, [ebp+var_AC]
call	sub_417A80
push	0
lea	ecx, [ebp+var_AC]
call	sub_417A40
push	25h
lea	edi, [ebp+var_70]
call	sub_414950
mov	[ebp+var_68], 1
lea	edi, [ebp+var_70]
lea	esi, [ebp+var_AC]
call	sub_116D710
lea	esi, [ebp+var_58]
call	sub_41DF90
lea	eax, [ebp+var_58]
call	sub_420D20
mov	[ebp+var_2A8], eax
mov	eax, [ebp+var_2A8]
push	eax
lea	ecx, [ebp+var_2A4]
call	sub_418670
lea	ecx, [ebp+var_2A4]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_2E4]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2A4]
call	sub_429100
lea	ecx, [ebp+var_248]
call	sub_417A80
push	0
lea	ecx, [ebp+var_248]
call	sub_417A40
push	25h
lea	edi, [ebp+var_114]
call	sub_414950
mov	[ebp+var_10C], 1
lea	edi, [ebp+var_114]
lea	esi, [ebp+var_248]
call	sub_116D710
lea	esi, [ebp+var_90]
call	sub_41DF90
lea	eax, [ebp+var_90]
call	sub_420D20
mov	[ebp+var_2B8], eax
mov	eax, [ebp+var_2B8]
push	eax
lea	ecx, [ebp+var_2B4]
call	sub_418670
lea	ecx, [ebp+var_2B4]
push	ecx
push	4
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_2E4]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2B4]
call	sub_429100
lea	ecx, [ebp+var_150]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_150]
call	sub_417A20
push	25h
lea	edi, [ebp+var_8C]
call	sub_414950
mov	[ebp+var_84], 1
lea	edi, [ebp+var_8C]
lea	esi, [ebp+var_150]
call	sub_116D710
lea	esi, [ebp+var_134]
call	sub_41DF90
lea	eax, [ebp+var_134]
call	sub_420D20
mov	[ebp+var_2C8], eax
mov	eax, [ebp+var_2C8]
push	eax
lea	ecx, [ebp+var_2C4]
call	sub_418670
lea	ecx, [ebp+var_2C4]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_2E4]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2C4]
call	sub_429100
lea	ecx, [ebp+var_54]
call	sub_417A80
push	0
lea	ecx, [ebp+var_54]
call	sub_417A40
push	25h
lea	edi, [ebp+var_22C]
call	sub_414950
mov	[ebp+var_224], 1
lea	edi, [ebp+var_22C]
lea	esi, [ebp+var_54]
call	sub_116D710
lea	esi, [ebp+var_130]
call	sub_41DF90
lea	eax, [ebp+var_130]
call	sub_420D20
mov	[ebp+var_2D8], eax
mov	eax, [ebp+var_2D8]
push	eax
lea	ecx, [ebp+var_2D4]
call	sub_418670
lea	ecx, [ebp+var_2D4]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_2E4]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2D4]
call	sub_429100
lea	ecx, [ebp+var_1DC]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1DC]
call	sub_417A20
push	25h
lea	edi, [ebp+var_F8]
call	sub_414950
mov	[ebp+var_F0], 1
lea	edi, [ebp+var_F8]
lea	esi, [ebp+var_1DC]
call	sub_116D710
lea	esi, [ebp+var_1C]
call	sub_41DF90
lea	eax, [ebp+var_1C]
call	sub_420D20
push	eax
push	10h
mov	ecx, [ebp+var_2E4]
call	sub_45C7A0
lea	ecx, [ebp+var_E0]
call	sub_417A80
push	0
lea	ecx, [ebp+var_E0]
call	sub_417A40
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_E0]
call	sub_116D710
lea	esi, [ebp+var_FC]
call	sub_41DF90
lea	eax, [ebp+var_FC]
call	sub_420D20
push	eax
push	10h
mov	ecx, [ebp+var_2E4]
call	sub_45C7A0
lea	ecx, [ebp+var_188]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_188]
call	sub_417A20
push	25h
lea	edi, [ebp+var_214]
call	sub_414950
mov	[ebp+var_20C], 1
lea	edi, [ebp+var_214]
lea	esi, [ebp+var_188]
call	sub_116D710
lea	esi, [ebp+var_74]
call	sub_41DF90
lea	eax, [ebp+var_74]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_2E4]
call	sub_45C7A0
lea	ecx, [ebp+var_38]
call	sub_417A80
push	0
lea	ecx, [ebp+var_38]
call	sub_417A40
push	25h
lea	edi, [ebp+var_12C]
call	sub_414950
mov	[ebp+var_124], 1
lea	edi, [ebp+var_12C]
lea	esi, [ebp+var_38]
call	sub_116D710
lea	esi, [ebp+var_1C0]
call	sub_41DF90
lea	eax, [ebp+var_1C0]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_2E4]
call	sub_45C7A0
lea	eax, [ebp+var_1C0]
call	sub_40ABB0
lea	esi, [ebp+var_12C]
call	sub_414810
lea	ecx, [ebp+var_38]
call	sub_4179F0
lea	eax, [ebp+var_74]
call	sub_40ABB0
lea	esi, [ebp+var_214]
call	sub_414810
lea	ecx, [ebp+var_188]
call	sub_4179F0
lea	eax, [ebp+var_FC]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_E0]
call	sub_4179F0
lea	eax, [ebp+var_1C]
call	sub_40ABB0
lea	esi, [ebp+var_F8]
call	sub_414810
lea	ecx, [ebp+var_1DC]
call	sub_4179F0
lea	eax, [ebp+var_130]
call	sub_40ABB0
lea	esi, [ebp+var_22C]
call	sub_414810
lea	ecx, [ebp+var_54]
call	sub_4179F0
lea	eax, [ebp+var_134]
call	sub_40ABB0
lea	esi, [ebp+var_8C]
call	sub_414810
lea	ecx, [ebp+var_150]
call	sub_4179F0
lea	eax, [ebp+var_90]
call	sub_40ABB0
lea	esi, [ebp+var_114]
call	sub_414810
lea	ecx, [ebp+var_248]
call	sub_4179F0
lea	eax, [ebp+var_58]
call	sub_40ABB0
lea	esi, [ebp+var_70]
call	sub_414810
lea	ecx, [ebp+var_AC]
call	sub_4179F0
lea	eax, [ebp+var_18C]
call	sub_40ABB0
lea	esi, [ebp+var_1A4]
call	sub_414810
lea	ecx, [ebp+var_1FC]
call	sub_4179F0
lea	eax, [ebp+var_1E0]
call	sub_40ABB0
lea	esi, [ebp+var_C4]
call	sub_414810
lea	ecx, [ebp+var_16C]
call	sub_4179F0
lea	eax, [ebp+var_24C]
call	sub_40ABB0
lea	esi, [ebp+var_1BC]
call	sub_414810
lea	ecx, [ebp+var_268]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_461B30 endp

align 10h


; Attributes: bp-based frame

sub_462290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569090
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4622C1
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4622C1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_462290 endp

align 10h


; Attributes: bp-based frame

sub_4622D0 proc	near

var_2C=	dword ptr -2Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	esi
mov	[ebp+var_2C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_clea ; "Technique_ClearPlastic"
call	sub_1128940
push	6
mov	ecx, [ebp+var_2C]
call	sub_10D2040
mov	eax, [ebp+var_2C]
mov	dword ptr [eax], offset	off_1569120
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+138h], 80000010h
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+134h], 80000010h
mov	ecx, [ebp+var_2C]
call	sub_4623B0
mov	eax, [ebp+var_2C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4622D0 endp

align 10h


; Attributes: bp-based frame

sub_462370 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462399
mov	ecx, [ebp+var_4]
call	sub_4622D0
mov	[ebp+var_30], eax
jmp	short loc_4623A0

loc_462399:
mov	[ebp+var_30], 0

loc_4623A0:
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn
sub_462370 endp

align 10h


; Attributes: bp-based frame

sub_4623B0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
push	1
push	1
push	1
push	4
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvDef ; "textures/env/default_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
push	1
push	1
push	3
push	4
lea	ecx, [ebp+var_D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvDef ; "textures/env/default_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4623B0 endp

align 10h


; Attributes: bp-based frame

sub_462420 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569120
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_462451
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_462451:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_462420 endp

align 10h


; Attributes: bp-based frame

sub_462460 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_terr ; "Technique_TerrainMeshLighting"
call	sub_1128940
push	2
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462460 endp

align 10h


; Attributes: bp-based frame

sub_4624E0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462509
mov	ecx, [ebp+var_4]
call	sub_462460
mov	[ebp+var_20], eax
jmp	short loc_462510

loc_462509:
mov	[ebp+var_20], 0

loc_462510:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4624E0 endp

align 10h


; Attributes: bp-based frame

sub_462520 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_te_0 ; "Technique_TerrainMeshLighting_Rim"
call	sub_1128940
push	3
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462520 endp

align 10h


; Attributes: bp-based frame

sub_4625A0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4625C9
mov	ecx, [ebp+var_4]
call	sub_462520
mov	[ebp+var_20], eax
jmp	short loc_4625D0

loc_4625C9:
mov	[ebp+var_20], 0

loc_4625D0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4625A0 endp

align 10h


; Attributes: bp-based frame

sub_4625E0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_te_1 ; "Technique_Terrain_GrayScaleHeight"
call	sub_1128940
push	28h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4625E0 endp

align 10h


; Attributes: bp-based frame

sub_462660 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462689
mov	ecx, [ebp+var_4]
call	sub_4625E0
mov	[ebp+var_20], eax
jmp	short loc_462690

loc_462689:
mov	[ebp+var_20], 0

loc_462690:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_462660 endp

align 10h


; Attributes: bp-based frame

sub_4626A0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_te_2 ; "Technique_Terrain_Texture_Only"
call	sub_1128940
push	29h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4626A0 endp

align 10h


; Attributes: bp-based frame

sub_462720 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462749
mov	ecx, [ebp+var_4]
call	sub_4626A0
mov	[ebp+var_20], eax
jmp	short loc_462750

loc_462749:
mov	[ebp+var_20], 0

loc_462750:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_462720 endp

align 10h


; Attributes: bp-based frame

sub_462760 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_te_3 ; "Technique_TerrainDiffuseMap_Only"
call	sub_1128940
push	61h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462760 endp

align 10h


; Attributes: bp-based frame

sub_4627E0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462809
mov	ecx, [ebp+var_4]
call	sub_462760
mov	[ebp+var_20], eax
jmp	short loc_462810

loc_462809:
mov	[ebp+var_20], 0

loc_462810:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4627E0 endp

align 10h


; Attributes: bp-based frame

sub_462820 proc	near

var_78=	dword ptr -78h

push	ebp
mov	ebp, esp
sub	esp, 78h
push	esi
mov	[ebp+var_78], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_tvsc ; "Technique_TVScreen"
call	sub_1128940
push	11h
mov	ecx, [ebp+var_78]
call	sub_10D2040
mov	eax, [ebp+var_78]
mov	dword ptr [eax], offset	off_1569240
mov	ecx, [ebp+var_78]
mov	dword ptr [ecx+138h], 80000010h
mov	edx, [ebp+var_78]
mov	dword ptr [edx+134h], 80000010h
mov	eax, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1E4h], xmm0
mov	ecx, [ebp+var_78]
call	sub_462910
mov	ecx, [ebp+var_78]
call	sub_463300
mov	eax, [ebp+var_78]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462820 endp



; Attributes: bp-based frame

sub_4628D0 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	204h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4628F9
mov	ecx, [ebp+var_4]
call	sub_462820
mov	[ebp+var_6C], eax
jmp	short loc_462900

loc_4628F9:
mov	[ebp+var_6C], 0

loc_462900:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_4628D0 endp

align 10h


; Attributes: bp-based frame

sub_462910 proc	near

var_60=	dword ptr -60h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	byte ptr -38h
var_30=	dword ptr -30h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
push	edi
mov	[ebp+var_60], ecx
lea	ecx, [ebp+var_1C]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_1C]
call	sub_416E80
push	1
lea	ecx, [ebp+var_1C]
call	sub_417A20
push	25h
lea	edi, [ebp+var_38]
call	sub_414950
mov	[ebp+var_30], 1
lea	edi, [ebp+var_38]
lea	esi, [ebp+var_1C]
call	sub_116D710
lea	esi, [ebp+var_20]
call	sub_41DF90
lea	eax, [ebp+var_20]
call	sub_420D20
mov	[ebp+var_4C], eax
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx+168h]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_44]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_4C]
call	sub_420330
lea	eax, [ebp+var_20]
call	sub_40ABB0
lea	esi, [ebp+var_38]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462910 endp

align 10h


; Attributes: bp-based frame

sub_4629C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569240
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4629F1
push	204h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4629F1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4629C0 endp

align 10h


; Attributes: bp-based frame

sub_462A00 proc	near

var_CC=	dword ptr -0CCh

push	ebp
mov	ebp, esp
sub	esp, 0CCh
push	esi
mov	[ebp+var_CC], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_head ; "Technique_HeadIcon"
call	sub_1128940
push	12h
mov	ecx, [ebp+var_CC]
call	sub_10D2040
mov	eax, [ebp+var_CC]
mov	dword ptr [eax], offset	off_15692D0
mov	ecx, [ebp+var_CC]
call	sub_462AF0
mov	ecx, [ebp+var_CC]
call	sub_464C60
mov	eax, [ebp+var_CC]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462A00 endp

align 10h


; Attributes: bp-based frame

sub_462AA0 proc	near

var_C0=	dword ptr -0C0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0C0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462ACF
mov	ecx, [ebp+var_4]
call	sub_462A00
mov	[ebp+var_C0], eax
jmp	short loc_462AD9

loc_462ACF:
mov	[ebp+var_C0], 0

loc_462AD9:
mov	eax, [ebp+var_C0]
mov	esp, ebp
pop	ebp
retn
sub_462AA0 endp

align 10h


; Attributes: bp-based frame

sub_462AF0 proc	near

var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_51=	byte ptr -51h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 0E4h
push	esi
push	edi
mov	[ebp+var_E4], ecx
push	ecx
fld1
fstp	[esp+0F0h+var_F0]
push	ecx
fld1
fstp	[esp+0F4h+var_F4]
push	ecx
fld1
fstp	[esp+0F8h+var_F8]
push	ecx
fld1
fstp	[esp+0FCh+var_FC]
lea	ecx, [ebp+var_2C]
call	sub_40A410
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+var_28]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
mov	[eax+8], ecx
mov	edx, [ebp+var_20]
mov	[eax+0Ch], edx
lea	esi, [ebp+var_1C]
call	sub_11680A0
mov	eax, offset aAttr_iconcolor ; "attr_iconColor"
lea	esi, [ebp+var_4C]
call	sub_4115A0
lea	eax, [ebp+var_4C]
lea	ecx, [ebp+var_1C]
call	sub_1160E20
lea	ecx, [ebp+var_4C]
call	sub_41A470
push	25h
lea	edi, [ebp+var_44]
call	sub_414950
mov	[ebp+var_3C], 1
lea	edi, [ebp+var_44]
lea	esi, [ebp+var_1C]
call	sub_116D710
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_462B98
mov	ecx, [ebp+var_48]
call	sub_40AA80

loc_462B98:
mov	ecx, [ebp+var_48]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
push	edx
lea	ecx, [ebp+var_51]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_iconcolor ; "attr_iconColor"
call	sub_407D30
mov	ecx, [ebp+var_E4]
call	sub_45C710
lea	ecx, [ebp+var_51]
call	nullsub_1
cmp	[ebp+var_48], 0
jz	short loc_462BDB
mov	ecx, [ebp+var_48]
call	sub_40AA90

loc_462BDB:
lea	esi, [ebp+var_44]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_41E9C0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462AF0 endp

align 10h


; Attributes: bp-based frame

sub_462C00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15692D0
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_462C31
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_462C31:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_462C00 endp

align 10h


; Attributes: bp-based frame

sub_462C40 proc	near

var_CC=	dword ptr -0CCh

push	ebp
mov	ebp, esp
sub	esp, 0CCh
push	esi
mov	[ebp+var_CC], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_hear ; "Technique_HeartPowerup"
call	sub_1128940
push	13h
mov	ecx, [ebp+var_CC]
call	sub_10D2040
mov	eax, [ebp+var_CC]
mov	dword ptr [eax], offset	off_1569360
mov	ecx, [ebp+var_CC]
call	sub_462D30
mov	ecx, [ebp+var_CC]
call	sub_464C60
mov	eax, [ebp+var_CC]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462C40 endp

align 10h


; Attributes: bp-based frame

sub_462CE0 proc	near

var_C0=	dword ptr -0C0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0C0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462D0F
mov	ecx, [ebp+var_4]
call	sub_462C40
mov	[ebp+var_C0], eax
jmp	short loc_462D19

loc_462D0F:
mov	[ebp+var_C0], 0

loc_462D19:
mov	eax, [ebp+var_C0]
mov	esp, ebp
pop	ebp
retn
sub_462CE0 endp

align 10h


; Attributes: bp-based frame

sub_462D30 proc	near

var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_51=	byte ptr -51h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 0E4h
push	esi
push	edi
mov	[ebp+var_E4], ecx
push	ecx
fld1
fstp	[esp+0F0h+var_F0]
push	ecx
fldz
fstp	[esp+0F4h+var_F4]
push	ecx
fldz
fstp	[esp+0F8h+var_F8]
push	ecx
fld1
fstp	[esp+0FCh+var_FC]
lea	ecx, [ebp+var_2C]
call	sub_40A410
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+var_28]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
mov	[eax+8], ecx
mov	edx, [ebp+var_20]
mov	[eax+0Ch], edx
lea	esi, [ebp+var_1C]
call	sub_11680A0
mov	eax, offset aAttr_powerupco ; "attr_powerupColor"
lea	esi, [ebp+var_4C]
call	sub_4115A0
lea	eax, [ebp+var_4C]
lea	ecx, [ebp+var_1C]
call	sub_1160E20
lea	ecx, [ebp+var_4C]
call	sub_41A470
push	25h
lea	edi, [ebp+var_44]
call	sub_414950
mov	[ebp+var_3C], 1
lea	edi, [ebp+var_44]
lea	esi, [ebp+var_1C]
call	sub_116D710
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_462DD8
mov	ecx, [ebp+var_48]
call	sub_40AA80

loc_462DD8:
mov	ecx, [ebp+var_48]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
push	edx
lea	ecx, [ebp+var_51]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_powerupco ; "attr_powerupColor"
call	sub_407D30
mov	ecx, [ebp+var_E4]
call	sub_45C710
lea	ecx, [ebp+var_51]
call	nullsub_1
cmp	[ebp+var_48], 0
jz	short loc_462E1B
mov	ecx, [ebp+var_48]
call	sub_40AA90

loc_462E1B:
lea	esi, [ebp+var_44]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_41E9C0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462D30 endp

align 10h


; Attributes: bp-based frame

sub_462E40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569360
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_462E71
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_462E71:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_462E40 endp

align 10h


; Attributes: bp-based frame

sub_462E80 proc	near

var_CC=	dword ptr -0CCh

push	ebp
mov	ebp, esp
sub	esp, 0CCh
push	esi
mov	[ebp+var_CC], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_orbp ; "Technique_OrbPowerup"
call	sub_1128940
push	14h
mov	ecx, [ebp+var_CC]
call	sub_10D2040
mov	eax, [ebp+var_CC]
mov	dword ptr [eax], offset	off_15693F0
mov	ecx, [ebp+var_CC]
call	sub_463010
mov	ecx, [ebp+var_CC]
call	sub_462F70
mov	eax, [ebp+var_CC]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462E80 endp

align 10h


; Attributes: bp-based frame

sub_462F20 proc	near

var_C0=	dword ptr -0C0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0C0h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_462F4F
mov	ecx, [ebp+var_4]
call	sub_462E80
mov	[ebp+var_C0], eax
jmp	short loc_462F59

loc_462F4F:
mov	[ebp+var_C0], 0

loc_462F59:
mov	eax, [ebp+var_C0]
mov	esp, ebp
pop	ebp
retn
sub_462F20 endp

align 10h


; Attributes: bp-based frame

sub_462F70 proc	near

var_60=	dword ptr -60h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	byte ptr -38h
var_30=	dword ptr -30h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
push	edi
mov	[ebp+var_60], ecx
lea	ecx, [ebp+var_1C]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1C]
call	sub_417A20
push	25h
lea	edi, [ebp+var_38]
call	sub_414950
mov	[ebp+var_30], 1
lea	edi, [ebp+var_38]
lea	esi, [ebp+var_1C]
call	sub_116D710
lea	esi, [ebp+var_20]
call	sub_41DF90
lea	eax, [ebp+var_20]
call	sub_420D20
mov	[ebp+var_4C], eax
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx+168h]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_44]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_4C]
call	sub_420330
lea	eax, [ebp+var_20]
call	sub_40ABB0
lea	esi, [ebp+var_38]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_462F70 endp

align 10h


; Attributes: bp-based frame

sub_463010 proc	near

var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_51=	byte ptr -51h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 0E4h
push	esi
push	edi
mov	[ebp+var_E4], ecx
push	ecx
fld1
fstp	[esp+0F0h+var_F0]
push	ecx
fld1
fstp	[esp+0F4h+var_F4]
push	ecx
fld1
fstp	[esp+0F8h+var_F8]
push	ecx
fld1
fstp	[esp+0FCh+var_FC]
lea	ecx, [ebp+var_2C]
call	sub_40A410
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+var_28]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
mov	[eax+8], ecx
mov	edx, [ebp+var_20]
mov	[eax+0Ch], edx
lea	esi, [ebp+var_1C]
call	sub_11680A0
mov	eax, offset aAttr_powerupco ; "attr_powerupColor"
lea	esi, [ebp+var_4C]
call	sub_4115A0
lea	eax, [ebp+var_4C]
lea	ecx, [ebp+var_1C]
call	sub_1160E20
lea	ecx, [ebp+var_4C]
call	sub_41A470
push	25h
lea	edi, [ebp+var_44]
call	sub_414950
mov	[ebp+var_3C], 1
lea	edi, [ebp+var_44]
lea	esi, [ebp+var_1C]
call	sub_116D710
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_4630B8
mov	ecx, [ebp+var_48]
call	sub_40AA80

loc_4630B8:
mov	ecx, [ebp+var_48]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
push	edx
lea	ecx, [ebp+var_51]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_powerupco ; "attr_powerupColor"
call	sub_407D30
mov	ecx, [ebp+var_E4]
call	sub_45C710
lea	ecx, [ebp+var_51]
call	nullsub_1
cmp	[ebp+var_48], 0
jz	short loc_4630FB
mov	ecx, [ebp+var_48]
call	sub_40AA90

loc_4630FB:
lea	esi, [ebp+var_44]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_41E9C0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_463010 endp

align 10h


; Attributes: bp-based frame

sub_463120 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15693F0
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_463151
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_463151:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_463120 endp

align 10h


; Attributes: bp-based frame

sub_463160 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ocea ; "Technique_Ocean_Distort_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ocea ; "Technique_Ocean_Distort_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_0 ; "Technique_Ocean_Distort_3Layers"
call	sub_1128940
push	45h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1569480
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1E4h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1E8h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1ECh], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, ds:dword_15FCD48
movss	dword ptr [ecx+1F0h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_15AAD08
movss	dword ptr [edx+1F4h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1F8h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+1FCh], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+200h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+204h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+208h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+20Ch], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+210h], xmm0
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_463160 endp

align 10h


; Attributes: bp-based frame

sub_4632C0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	214h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4632E9
mov	ecx, [ebp+var_4]
call	sub_463160
mov	[ebp+var_20], eax
jmp	short loc_4632F0

loc_4632E9:
mov	[ebp+var_20], 0

loc_4632F0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4632C0 endp

align 10h


; Attributes: bp-based frame

sub_463300 proc	near

var_32C= dword ptr -32Ch
var_320= dword ptr -320h
var_31C= byte ptr -31Ch
var_310= dword ptr -310h
var_30C= byte ptr -30Ch
var_300= dword ptr -300h
var_2FC= byte ptr -2FCh
var_2F0= dword ptr -2F0h
var_2EC= byte ptr -2ECh
var_2E0= dword ptr -2E0h
var_2DC= byte ptr -2DCh
var_2D0= dword ptr -2D0h
var_2CC= byte ptr -2CCh
var_2C0= dword ptr -2C0h
var_2BC= byte ptr -2BCh
var_2B0= dword ptr -2B0h
var_2AC= byte ptr -2ACh
var_2A0= byte ptr -2A0h
var_284= byte ptr -284h
var_280= byte ptr -280h
var_264= byte ptr -264h
var_25C= dword ptr -25Ch
var_24C= byte ptr -24Ch
var_244= dword ptr -244h
var_234= byte ptr -234h
var_218= byte ptr -218h
var_1FC= byte ptr -1FCh
var_1F8= byte ptr -1F8h
var_1DC= byte ptr -1DCh
var_1D8= byte ptr -1D8h
var_1D0= dword ptr -1D0h
var_1C0= byte ptr -1C0h
var_1B8= dword ptr -1B8h
var_1A8= byte ptr -1A8h
var_1A4= byte ptr -1A4h
var_188= byte ptr -188h
var_16C= byte ptr -16Ch
var_150= byte ptr -150h
var_14C= byte ptr -14Ch
var_148= byte ptr -148h
var_140= dword ptr -140h
var_130= byte ptr -130h
var_128= dword ptr -128h
var_118= byte ptr -118h
var_114= byte ptr -114h
var_110= byte ptr -110h
var_108= dword ptr -108h
var_F8=	byte ptr -0F8h
var_DC=	byte ptr -0DCh
var_D4=	dword ptr -0D4h
var_C4=	byte ptr -0C4h
var_A8=	byte ptr -0A8h
var_A0=	dword ptr -0A0h
var_90=	byte ptr -90h
var_8C=	byte ptr -8Ch
var_84=	dword ptr -84h
var_74=	byte ptr -74h
var_70=	byte ptr -70h
var_68=	dword ptr -68h
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_38=	byte ptr -38h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 32Ch
push	esi
push	edi
mov	[ebp+var_32C], ecx
lea	ecx, [ebp+var_2A0]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_2A0]
call	sub_417A20
push	0
lea	ecx, [ebp+var_2A0]
call	sub_416E80
push	25h
lea	edi, [ebp+var_1D8]
call	sub_414950
mov	[ebp+var_1D0], 1
lea	edi, [ebp+var_1D8]
lea	esi, [ebp+var_2A0]
call	sub_116D710
lea	esi, [ebp+var_284]
call	sub_41DF90
lea	eax, [ebp+var_284]
call	sub_420D20
mov	[ebp+var_2B0], eax
mov	eax, [ebp+var_2B0]
push	eax
lea	ecx, [ebp+var_2AC]
call	sub_418670
lea	ecx, [ebp+var_2AC]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2AC]
call	sub_429100
lea	ecx, [ebp+var_188]
call	sub_417A80
push	1
lea	ecx, [ebp+var_188]
call	sub_417A40
push	1
lea	ecx, [ebp+var_188]
call	sub_417A20
push	25h
lea	edi, [ebp+var_DC]
call	sub_414950
mov	[ebp+var_D4], 1
lea	edi, [ebp+var_DC]
lea	esi, [ebp+var_188]
call	sub_116D710
lea	esi, [ebp+var_1FC]
call	sub_41DF90
lea	eax, [ebp+var_1FC]
call	sub_420D20
mov	[ebp+var_2C0], eax
mov	eax, [ebp+var_2C0]
push	eax
lea	ecx, [ebp+var_2BC]
call	sub_418670
lea	ecx, [ebp+var_2BC]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2BC]
call	sub_429100
lea	ecx, [ebp+var_218]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_218]
call	sub_417A20
push	1
lea	ecx, [ebp+var_218]
call	sub_416E80
push	7Fh
lea	ecx, [ebp+var_218]
call	sub_416EC0
push	6
lea	ecx, [ebp+var_218]
call	sub_416EA0
push	25h
lea	edi, [ebp+var_1C0]
call	sub_414950
mov	[ebp+var_1B8], 1
lea	edi, [ebp+var_1C0]
lea	esi, [ebp+var_218]
call	sub_116D710
lea	esi, [ebp+var_1A8]
call	sub_41DF90
lea	eax, [ebp+var_1A8]
call	sub_420D20
mov	[ebp+var_2D0], eax
mov	eax, [ebp+var_2D0]
push	eax
lea	ecx, [ebp+var_2CC]
call	sub_418670
lea	ecx, [ebp+var_2CC]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2CC]
call	sub_429100
lea	ecx, [ebp+var_C4]
call	sub_417A80
push	1
lea	ecx, [ebp+var_C4]
call	sub_417A40
push	1
lea	ecx, [ebp+var_C4]
call	sub_417A20
push	25h
lea	edi, [ebp+var_70]
call	sub_414950
mov	[ebp+var_68], 1
lea	edi, [ebp+var_70]
lea	esi, [ebp+var_C4]
call	sub_116D710
lea	esi, [ebp+var_58]
call	sub_41DF90
lea	eax, [ebp+var_58]
call	sub_420D20
mov	[ebp+var_2E0], eax
mov	eax, [ebp+var_2E0]
push	eax
lea	ecx, [ebp+var_2DC]
call	sub_418670
lea	ecx, [ebp+var_2DC]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2DC]
call	sub_429100
lea	ecx, [ebp+var_234]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_234]
call	sub_417A20
push	0
lea	ecx, [ebp+var_234]
call	sub_416E80
push	25h
lea	edi, [ebp+var_A8]
call	sub_414950
mov	[ebp+var_A0], 1
lea	edi, [ebp+var_A8]
lea	esi, [ebp+var_234]
call	sub_116D710
lea	esi, [ebp+var_114]
call	sub_41DF90
lea	eax, [ebp+var_114]
call	sub_420D20
mov	[ebp+var_2F0], eax
mov	eax, [ebp+var_2F0]
push	eax
lea	ecx, [ebp+var_2EC]
call	sub_418670
lea	ecx, [ebp+var_2EC]
push	ecx
push	4
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2EC]
call	sub_429100
lea	ecx, [ebp+var_280]
call	sub_417A80
push	1
lea	ecx, [ebp+var_280]
call	sub_417A40
push	1
lea	ecx, [ebp+var_280]
call	sub_417A20
push	25h
lea	edi, [ebp+var_130]
call	sub_414950
mov	[ebp+var_128], 1
lea	edi, [ebp+var_130]
lea	esi, [ebp+var_280]
call	sub_116D710
lea	esi, [ebp+var_90]
call	sub_41DF90
lea	eax, [ebp+var_90]
call	sub_420D20
mov	[ebp+var_300], eax
mov	eax, [ebp+var_300]
push	eax
lea	ecx, [ebp+var_2FC]
call	sub_418670
lea	ecx, [ebp+var_2FC]
push	ecx
push	4
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2FC]
call	sub_429100
lea	ecx, [ebp+var_16C]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_16C]
call	sub_417A20
push	25h
lea	edi, [ebp+var_8C]
call	sub_414950
mov	[ebp+var_84], 1
lea	edi, [ebp+var_8C]
lea	esi, [ebp+var_16C]
call	sub_116D710
lea	esi, [ebp+var_150]
call	sub_41DF90
lea	eax, [ebp+var_150]
call	sub_420D20
mov	[ebp+var_310], eax
mov	eax, [ebp+var_310]
push	eax
lea	ecx, [ebp+var_30C]
call	sub_418670
lea	ecx, [ebp+var_30C]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_30C]
call	sub_429100
lea	ecx, [ebp+var_54]
call	sub_417A80
push	0
lea	ecx, [ebp+var_54]
call	sub_417A40
push	1
lea	ecx, [ebp+var_54]
call	sub_417A20
push	25h
lea	edi, [ebp+var_264]
call	sub_414950
mov	[ebp+var_25C], 1
lea	edi, [ebp+var_264]
lea	esi, [ebp+var_54]
call	sub_116D710
lea	esi, [ebp+var_14C]
call	sub_41DF90
lea	eax, [ebp+var_14C]
call	sub_420D20
mov	[ebp+var_320], eax
mov	eax, [ebp+var_320]
push	eax
lea	ecx, [ebp+var_31C]
call	sub_418670
lea	ecx, [ebp+var_31C]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_32C]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_31C]
call	sub_429100
lea	ecx, [ebp+var_1F8]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1F8]
call	sub_417A20
push	25h
lea	edi, [ebp+var_110]
call	sub_414950
mov	[ebp+var_108], 1
lea	edi, [ebp+var_110]
lea	esi, [ebp+var_1F8]
call	sub_116D710
lea	esi, [ebp+var_1C]
call	sub_41DF90
lea	eax, [ebp+var_1C]
call	sub_420D20
push	eax
push	10h
mov	ecx, [ebp+var_32C]
call	sub_45C7A0
lea	ecx, [ebp+var_F8]
call	sub_417A80
push	0
lea	ecx, [ebp+var_F8]
call	sub_417A40
push	1
lea	ecx, [ebp+var_F8]
call	sub_417A20
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_F8]
call	sub_116D710
lea	esi, [ebp+var_118]
call	sub_41DF90
lea	eax, [ebp+var_118]
call	sub_420D20
push	eax
push	10h
mov	ecx, [ebp+var_32C]
call	sub_45C7A0
lea	ecx, [ebp+var_1A4]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1A4]
call	sub_417A20
push	25h
lea	edi, [ebp+var_24C]
call	sub_414950
mov	[ebp+var_244], 1
lea	edi, [ebp+var_24C]
lea	esi, [ebp+var_1A4]
call	sub_116D710
lea	esi, [ebp+var_74]
call	sub_41DF90
lea	eax, [ebp+var_74]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_32C]
call	sub_45C7A0
lea	ecx, [ebp+var_38]
call	sub_417A80
push	0
lea	ecx, [ebp+var_38]
call	sub_417A40
push	1
lea	ecx, [ebp+var_38]
call	sub_417A20
push	25h
lea	edi, [ebp+var_148]
call	sub_414950
mov	[ebp+var_140], 1
lea	edi, [ebp+var_148]
lea	esi, [ebp+var_38]
call	sub_116D710
lea	esi, [ebp+var_1DC]
call	sub_41DF90
lea	eax, [ebp+var_1DC]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_32C]
call	sub_45C7A0
lea	eax, [ebp+var_1DC]
call	sub_40ABB0
lea	esi, [ebp+var_148]
call	sub_414810
lea	ecx, [ebp+var_38]
call	sub_4179F0
lea	eax, [ebp+var_74]
call	sub_40ABB0
lea	esi, [ebp+var_24C]
call	sub_414810
lea	ecx, [ebp+var_1A4]
call	sub_4179F0
lea	eax, [ebp+var_118]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_F8]
call	sub_4179F0
lea	eax, [ebp+var_1C]
call	sub_40ABB0
lea	esi, [ebp+var_110]
call	sub_414810
lea	ecx, [ebp+var_1F8]
call	sub_4179F0
lea	eax, [ebp+var_14C]
call	sub_40ABB0
lea	esi, [ebp+var_264]
call	sub_414810
lea	ecx, [ebp+var_54]
call	sub_4179F0
lea	eax, [ebp+var_150]
call	sub_40ABB0
lea	esi, [ebp+var_8C]
call	sub_414810
lea	ecx, [ebp+var_16C]
call	sub_4179F0
lea	eax, [ebp+var_90]
call	sub_40ABB0
lea	esi, [ebp+var_130]
call	sub_414810
lea	ecx, [ebp+var_280]
call	sub_4179F0
lea	eax, [ebp+var_114]
call	sub_40ABB0
lea	esi, [ebp+var_A8]
call	sub_414810
lea	ecx, [ebp+var_234]
call	sub_4179F0
lea	eax, [ebp+var_58]
call	sub_40ABB0
lea	esi, [ebp+var_70]
call	sub_414810
lea	ecx, [ebp+var_C4]
call	sub_4179F0
lea	eax, [ebp+var_1A8]
call	sub_40ABB0
lea	esi, [ebp+var_1C0]
call	sub_414810
lea	ecx, [ebp+var_218]
call	sub_4179F0
lea	eax, [ebp+var_1FC]
call	sub_40ABB0
lea	esi, [ebp+var_DC]
call	sub_414810
lea	ecx, [ebp+var_188]
call	sub_4179F0
lea	eax, [ebp+var_284]
call	sub_40ABB0
lea	esi, [ebp+var_1D8]
call	sub_414810
lea	ecx, [ebp+var_2A0]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_463300 endp

align 10h


; Attributes: bp-based frame

sub_463B70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569480
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_463BA1
push	214h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_463BA1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_463B70 endp

align 10h


; Attributes: bp-based frame

sub_463BB0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ocea ; "Technique_Ocean_Distort_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ocea ; "Technique_Ocean_Distort_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_0 ; "Technique_Ocean_Distort_3Layers"
call	sub_1128940
push	5Fh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1569510
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000008h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000008h
mov	ecx, [ebp+var_1C]
call	sub_463C90
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_463BB0 endp

align 10h


; Attributes: bp-based frame

sub_463C50 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_463C79
mov	ecx, [ebp+var_4]
call	sub_463BB0
mov	[ebp+var_20], eax
jmp	short loc_463C80

loc_463C79:
mov	[ebp+var_20], 0

loc_463C80:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_463C50 endp

align 10h


; Attributes: bp-based frame

sub_463C90 proc	near

var_324= dword ptr -324h
var_320= dword ptr -320h
var_31C= byte ptr -31Ch
var_310= dword ptr -310h
var_30C= byte ptr -30Ch
var_300= dword ptr -300h
var_2FC= byte ptr -2FCh
var_2F0= dword ptr -2F0h
var_2EC= byte ptr -2ECh
var_2E0= dword ptr -2E0h
var_2DC= byte ptr -2DCh
var_2D0= dword ptr -2D0h
var_2CC= byte ptr -2CCh
var_2C0= dword ptr -2C0h
var_2BC= byte ptr -2BCh
var_2B0= dword ptr -2B0h
var_2AC= byte ptr -2ACh
var_2A0= byte ptr -2A0h
var_284= byte ptr -284h
var_280= byte ptr -280h
var_264= byte ptr -264h
var_25C= dword ptr -25Ch
var_24C= byte ptr -24Ch
var_244= dword ptr -244h
var_234= byte ptr -234h
var_218= byte ptr -218h
var_1FC= byte ptr -1FCh
var_1F8= byte ptr -1F8h
var_1DC= byte ptr -1DCh
var_1D8= byte ptr -1D8h
var_1D0= dword ptr -1D0h
var_1C0= byte ptr -1C0h
var_1B8= dword ptr -1B8h
var_1A8= byte ptr -1A8h
var_1A4= byte ptr -1A4h
var_188= byte ptr -188h
var_16C= byte ptr -16Ch
var_150= byte ptr -150h
var_14C= byte ptr -14Ch
var_148= byte ptr -148h
var_140= dword ptr -140h
var_130= byte ptr -130h
var_128= dword ptr -128h
var_118= byte ptr -118h
var_114= byte ptr -114h
var_110= byte ptr -110h
var_108= dword ptr -108h
var_F8=	byte ptr -0F8h
var_DC=	byte ptr -0DCh
var_D4=	dword ptr -0D4h
var_C4=	byte ptr -0C4h
var_A8=	byte ptr -0A8h
var_A0=	dword ptr -0A0h
var_90=	byte ptr -90h
var_8C=	byte ptr -8Ch
var_84=	dword ptr -84h
var_74=	byte ptr -74h
var_70=	byte ptr -70h
var_68=	dword ptr -68h
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_38=	byte ptr -38h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 324h
push	esi
push	edi
mov	[ebp+var_324], ecx
lea	ecx, [ebp+var_2A0]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_2A0]
call	sub_417A20
push	0
lea	ecx, [ebp+var_2A0]
call	sub_416E80
push	25h
lea	edi, [ebp+var_1D8]
call	sub_414950
mov	[ebp+var_1D0], 1
lea	edi, [ebp+var_1D8]
lea	esi, [ebp+var_2A0]
call	sub_116D710
lea	esi, [ebp+var_284]
call	sub_41DF90
lea	eax, [ebp+var_284]
call	sub_420D20
mov	[ebp+var_2B0], eax
mov	eax, [ebp+var_2B0]
push	eax
lea	ecx, [ebp+var_2AC]
call	sub_418670
lea	ecx, [ebp+var_2AC]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2AC]
call	sub_429100
lea	ecx, [ebp+var_188]
call	sub_417A80
push	0
lea	ecx, [ebp+var_188]
call	sub_417A40
push	25h
lea	edi, [ebp+var_DC]
call	sub_414950
mov	[ebp+var_D4], 1
lea	edi, [ebp+var_DC]
lea	esi, [ebp+var_188]
call	sub_116D710
lea	esi, [ebp+var_1FC]
call	sub_41DF90
lea	eax, [ebp+var_1FC]
call	sub_420D20
mov	[ebp+var_2C0], eax
mov	eax, [ebp+var_2C0]
push	eax
lea	ecx, [ebp+var_2BC]
call	sub_418670
lea	ecx, [ebp+var_2BC]
push	ecx
push	1
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2BC]
call	sub_429100
lea	ecx, [ebp+var_218]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_218]
call	sub_417A20
push	1
lea	ecx, [ebp+var_218]
call	sub_416E80
push	7Fh
lea	ecx, [ebp+var_218]
call	sub_416EC0
push	6
lea	ecx, [ebp+var_218]
call	sub_416EA0
push	25h
lea	edi, [ebp+var_1C0]
call	sub_414950
mov	[ebp+var_1B8], 1
lea	edi, [ebp+var_1C0]
lea	esi, [ebp+var_218]
call	sub_116D710
lea	esi, [ebp+var_1A8]
call	sub_41DF90
lea	eax, [ebp+var_1A8]
call	sub_420D20
mov	[ebp+var_2D0], eax
mov	eax, [ebp+var_2D0]
push	eax
lea	ecx, [ebp+var_2CC]
call	sub_418670
lea	ecx, [ebp+var_2CC]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2CC]
call	sub_429100
lea	ecx, [ebp+var_C4]
call	sub_417A80
push	0
lea	ecx, [ebp+var_C4]
call	sub_417A40
push	25h
lea	edi, [ebp+var_70]
call	sub_414950
mov	[ebp+var_68], 1
lea	edi, [ebp+var_70]
lea	esi, [ebp+var_C4]
call	sub_116D710
lea	esi, [ebp+var_58]
call	sub_41DF90
lea	eax, [ebp+var_58]
call	sub_420D20
mov	[ebp+var_2E0], eax
mov	eax, [ebp+var_2E0]
push	eax
lea	ecx, [ebp+var_2DC]
call	sub_418670
lea	ecx, [ebp+var_2DC]
push	ecx
push	2
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2DC]
call	sub_429100
lea	ecx, [ebp+var_234]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_234]
call	sub_417A20
push	0
lea	ecx, [ebp+var_234]
call	sub_416E80
push	25h
lea	edi, [ebp+var_A8]
call	sub_414950
mov	[ebp+var_A0], 1
lea	edi, [ebp+var_A8]
lea	esi, [ebp+var_234]
call	sub_116D710
lea	esi, [ebp+var_114]
call	sub_41DF90
lea	eax, [ebp+var_114]
call	sub_420D20
mov	[ebp+var_2F0], eax
mov	eax, [ebp+var_2F0]
push	eax
lea	ecx, [ebp+var_2EC]
call	sub_418670
lea	ecx, [ebp+var_2EC]
push	ecx
push	4
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2EC]
call	sub_429100
lea	ecx, [ebp+var_280]
call	sub_417A80
push	0
lea	ecx, [ebp+var_280]
call	sub_417A40
push	25h
lea	edi, [ebp+var_130]
call	sub_414950
mov	[ebp+var_128], 1
lea	edi, [ebp+var_130]
lea	esi, [ebp+var_280]
call	sub_116D710
lea	esi, [ebp+var_90]
call	sub_41DF90
lea	eax, [ebp+var_90]
call	sub_420D20
mov	[ebp+var_300], eax
mov	eax, [ebp+var_300]
push	eax
lea	ecx, [ebp+var_2FC]
call	sub_418670
lea	ecx, [ebp+var_2FC]
push	ecx
push	4
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_2FC]
call	sub_429100
lea	ecx, [ebp+var_16C]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_16C]
call	sub_417A20
push	25h
lea	edi, [ebp+var_8C]
call	sub_414950
mov	[ebp+var_84], 1
lea	edi, [ebp+var_8C]
lea	esi, [ebp+var_16C]
call	sub_116D710
lea	esi, [ebp+var_150]
call	sub_41DF90
lea	eax, [ebp+var_150]
call	sub_420D20
mov	[ebp+var_310], eax
mov	eax, [ebp+var_310]
push	eax
lea	ecx, [ebp+var_30C]
call	sub_418670
lea	ecx, [ebp+var_30C]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_30C]
call	sub_429100
lea	ecx, [ebp+var_54]
call	sub_417A80
push	0
lea	ecx, [ebp+var_54]
call	sub_417A40
push	25h
lea	edi, [ebp+var_264]
call	sub_414950
mov	[ebp+var_25C], 1
lea	edi, [ebp+var_264]
lea	esi, [ebp+var_54]
call	sub_116D710
lea	esi, [ebp+var_14C]
call	sub_41DF90
lea	eax, [ebp+var_14C]
call	sub_420D20
mov	[ebp+var_320], eax
mov	eax, [ebp+var_320]
push	eax
lea	ecx, [ebp+var_31C]
call	sub_418670
lea	ecx, [ebp+var_31C]
push	ecx
push	8
call	sub_1091B50
add	esp, 4
shl	eax, 4
mov	edx, [ebp+var_324]
lea	ecx, [edx+eax+174h]
call	sub_46B0C0
lea	ecx, [ebp+var_31C]
call	sub_429100
lea	ecx, [ebp+var_1F8]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1F8]
call	sub_417A20
push	25h
lea	edi, [ebp+var_110]
call	sub_414950
mov	[ebp+var_108], 1
lea	edi, [ebp+var_110]
lea	esi, [ebp+var_1F8]
call	sub_116D710
lea	esi, [ebp+var_1C]
call	sub_41DF90
lea	eax, [ebp+var_1C]
call	sub_420D20
push	eax
push	10h
mov	ecx, [ebp+var_324]
call	sub_45C7A0
lea	ecx, [ebp+var_F8]
call	sub_417A80
push	0
lea	ecx, [ebp+var_F8]
call	sub_417A40
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_F8]
call	sub_116D710
lea	esi, [ebp+var_118]
call	sub_41DF90
lea	eax, [ebp+var_118]
call	sub_420D20
push	eax
push	10h
mov	ecx, [ebp+var_324]
call	sub_45C7A0
lea	ecx, [ebp+var_1A4]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1A4]
call	sub_417A20
push	25h
lea	edi, [ebp+var_24C]
call	sub_414950
mov	[ebp+var_244], 1
lea	edi, [ebp+var_24C]
lea	esi, [ebp+var_1A4]
call	sub_116D710
lea	esi, [ebp+var_74]
call	sub_41DF90
lea	eax, [ebp+var_74]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_324]
call	sub_45C7A0
lea	ecx, [ebp+var_38]
call	sub_417A80
push	0
lea	ecx, [ebp+var_38]
call	sub_417A40
push	25h
lea	edi, [ebp+var_148]
call	sub_414950
mov	[ebp+var_140], 1
lea	edi, [ebp+var_148]
lea	esi, [ebp+var_38]
call	sub_116D710
lea	esi, [ebp+var_1DC]
call	sub_41DF90
lea	eax, [ebp+var_1DC]
call	sub_420D20
push	eax
push	20h
mov	ecx, [ebp+var_324]
call	sub_45C7A0
lea	eax, [ebp+var_1DC]
call	sub_40ABB0
lea	esi, [ebp+var_148]
call	sub_414810
lea	ecx, [ebp+var_38]
call	sub_4179F0
lea	eax, [ebp+var_74]
call	sub_40ABB0
lea	esi, [ebp+var_24C]
call	sub_414810
lea	ecx, [ebp+var_1A4]
call	sub_4179F0
lea	eax, [ebp+var_118]
call	sub_40ABB0
lea	esi, [ebp+var_18]
call	sub_414810
lea	ecx, [ebp+var_F8]
call	sub_4179F0
lea	eax, [ebp+var_1C]
call	sub_40ABB0
lea	esi, [ebp+var_110]
call	sub_414810
lea	ecx, [ebp+var_1F8]
call	sub_4179F0
lea	eax, [ebp+var_14C]
call	sub_40ABB0
lea	esi, [ebp+var_264]
call	sub_414810
lea	ecx, [ebp+var_54]
call	sub_4179F0
lea	eax, [ebp+var_150]
call	sub_40ABB0
lea	esi, [ebp+var_8C]
call	sub_414810
lea	ecx, [ebp+var_16C]
call	sub_4179F0
lea	eax, [ebp+var_90]
call	sub_40ABB0
lea	esi, [ebp+var_130]
call	sub_414810
lea	ecx, [ebp+var_280]
call	sub_4179F0
lea	eax, [ebp+var_114]
call	sub_40ABB0
lea	esi, [ebp+var_A8]
call	sub_414810
lea	ecx, [ebp+var_234]
call	sub_4179F0
lea	eax, [ebp+var_58]
call	sub_40ABB0
lea	esi, [ebp+var_70]
call	sub_414810
lea	ecx, [ebp+var_C4]
call	sub_4179F0
lea	eax, [ebp+var_1A8]
call	sub_40ABB0
lea	esi, [ebp+var_1C0]
call	sub_414810
lea	ecx, [ebp+var_218]
call	sub_4179F0
lea	eax, [ebp+var_1FC]
call	sub_40ABB0
lea	esi, [ebp+var_DC]
call	sub_414810
lea	ecx, [ebp+var_188]
call	sub_4179F0
lea	eax, [ebp+var_284]
call	sub_40ABB0
lea	esi, [ebp+var_1D8]
call	sub_414810
lea	ecx, [ebp+var_2A0]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_463C90 endp

align 10h


; Attributes: bp-based frame

sub_4644C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569510
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4644F1
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4644F1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4644C0 endp

align 10h


; Attributes: bp-based frame

sub_464500 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_1 ; "Technique_Ocean_Distort_Directional_2La"...
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_1 ; "Technique_Ocean_Distort_Directional_2La"...
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_2 ; "Technique_Ocean_Distort_Directional_3La"...
call	sub_1128940
push	59h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_15695A0
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1E4h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1E8h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1ECh], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1F0h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1F4h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1F8h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+1FCh], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+200h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [eax+204h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+208h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+20Ch], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+210h], xmm0
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_464500 endp

align 10h


; Attributes: bp-based frame

sub_464660 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	214h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_464689
mov	ecx, [ebp+var_4]
call	sub_464500
mov	[ebp+var_20], eax
jmp	short loc_464690

loc_464689:
mov	[ebp+var_20], 0

loc_464690:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_464660 endp

align 10h


; Attributes: bp-based frame

sub_4646A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15695A0
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4646D1
push	214h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4646D1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4646A0 endp

align 10h


; Attributes: bp-based frame

sub_4646E0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_3 ; "Technique_Ocean_Distort_Unlit_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_3 ; "Technique_Ocean_Distort_Unlit_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_4 ; "Technique_Ocean_Distort_Unlit_3Layers"
call	sub_1128940
push	65h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1569630
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1E4h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1E8h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1ECh], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, ds:dword_15FCD48
movss	dword ptr [ecx+1F0h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_15AAD08
movss	dword ptr [edx+1F4h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1F8h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+1FCh], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+200h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+204h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+208h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+20Ch], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+210h], xmm0
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4646E0 endp

align 10h


; Attributes: bp-based frame

sub_464840 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	214h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_464869
mov	ecx, [ebp+var_4]
call	sub_4646E0
mov	[ebp+var_20], eax
jmp	short loc_464870

loc_464869:
mov	[ebp+var_20], 0

loc_464870:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_464840 endp

align 10h


; Attributes: bp-based frame

sub_464880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569630
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4648B1
push	214h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4648B1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_464880 endp

align 10h


; Attributes: bp-based frame

sub_4648C0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_5 ; "Technique_Ocean_Distort_FX_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_5 ; "Technique_Ocean_Distort_FX_2Layers"
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_6 ; "Technique_Ocean_Distort_FX_3Layers"
call	sub_1128940
push	5Ah
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000008h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000008h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4648C0 endp

align 10h


; Attributes: bp-based frame

sub_464960 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_464989
mov	ecx, [ebp+var_4]
call	sub_4648C0
mov	[ebp+var_20], eax
jmp	short loc_464990

loc_464989:
mov	[ebp+var_20], 0

loc_464990:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_464960 endp

align 10h


; Attributes: bp-based frame

sub_4649A0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_oc_7 ; "Technique_Ocean_FlatSurf"
call	sub_1128940
push	4Eh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568B58
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4649A0 endp

align 10h


; Attributes: bp-based frame

sub_464A20 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_464A49
mov	ecx, [ebp+var_4]
call	sub_4649A0
mov	[ebp+var_20], eax
jmp	short loc_464A50

loc_464A49:
mov	[ebp+var_20], 0

loc_464A50:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_464A20 endp

align 10h


; Attributes: bp-based frame

sub_464A60 proc	near

var_78=	dword ptr -78h

push	ebp
mov	ebp, esp
sub	esp, 78h
push	esi
mov	[ebp+var_78], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_bric ; "Technique_BrickWater"
call	sub_1128940
push	33h
mov	ecx, [ebp+var_78]
call	sub_10D2040
mov	eax, [ebp+var_78]
mov	dword ptr [eax], offset	off_15696C0
mov	ecx, [ebp+var_78]
add	ecx, 200h
call	sub_401EF0
mov	ecx, [ebp+var_78]
add	ecx, 20Ch
call	sub_401EF0
mov	ecx, [ebp+var_78]
mov	byte ptr [ecx+1E4h], 0
mov	edx, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1E8h], xmm0
mov	eax, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1ECh], xmm0
mov	ecx, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1F0h], xmm0
mov	edx, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1F4h], xmm0
mov	eax, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1F8h], xmm0
mov	ecx, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1FCh], xmm0
mov	edx, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+218h], xmm0
mov	eax, [ebp+var_78]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+21Ch], xmm0
mov	ecx, [ebp+var_78]
call	sub_464BF0
mov	ecx, [ebp+var_78]
call	sub_464C60
mov	eax, [ebp+var_78]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_464A60 endp

align 10h


; Attributes: bp-based frame

sub_464BB0 proc	near

var_74=	dword ptr -74h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 74h
push	220h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_464BD9
mov	ecx, [ebp+var_4]
call	sub_464A60
mov	[ebp+var_74], eax
jmp	short loc_464BE0

loc_464BD9:
mov	[ebp+var_74], 0

loc_464BE0:
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn
sub_464BB0 endp

align 10h


; Attributes: bp-based frame

sub_464BF0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
push	0
push	1
push	3
push	4
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvFro ; "textures/env/frontend_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
push	0
push	1
push	1
push	4
lea	ecx, [ebp+var_D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvDef ; "textures/env/default_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_464BF0 endp

align 10h


; Attributes: bp-based frame

sub_464C60 proc	near

var_60=	dword ptr -60h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	byte ptr -38h
var_30=	dword ptr -30h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
push	edi
mov	[ebp+var_60], ecx
lea	ecx, [ebp+var_1C]
call	sub_416ED0
push	0
lea	ecx, [ebp+var_1C]
call	sub_417A20
push	25h
lea	edi, [ebp+var_38]
call	sub_414950
mov	[ebp+var_30], 1
lea	edi, [ebp+var_38]
lea	esi, [ebp+var_1C]
call	sub_116D710
lea	esi, [ebp+var_20]
call	sub_41DF90
lea	eax, [ebp+var_20]
call	sub_420D20
mov	[ebp+var_4C], eax
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx+168h]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_44]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_4C]
call	sub_420330
lea	eax, [ebp+var_20]
call	sub_40ABB0
lea	esi, [ebp+var_38]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_464C60 endp

align 10h


; Attributes: bp-based frame

sub_464D00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15696C0
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_464D31
push	220h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_464D31:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_464D00 endp

align 10h


; Attributes: bp-based frame

sub_464D40 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_gray ; "Technique_GrayBubble_Ghost"
call	sub_1128940
push	4Fh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_15697E0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000080h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000080h
mov	eax, [ebp+var_1C]
mov	byte ptr [eax+1E4h], 0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_464D40 endp

align 10h


; Attributes: bp-based frame

sub_464DE0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_464E09
mov	ecx, [ebp+var_4]
call	sub_464D40
mov	[ebp+var_20], eax
jmp	short loc_464E10

loc_464E09:
mov	[ebp+var_20], 0

loc_464E10:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_464DE0 endp

align 10h


; Attributes: bp-based frame

sub_464E20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15697E0
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_464E51
push	1E8h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_464E51:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_464E20 endp

align 10h


; Attributes: bp-based frame

sub_464E60 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_ba_3 ; "Technique_Basic_NoLighting_VertColor"
call	sub_1128940
push	18h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1569870
mov	esi, [ebp+var_1C]
add	esi, 1E8h
xor	eax, eax
call	sub_41DF90
mov	esi, [ebp+var_1C]
add	esi, 1ECh
xor	eax, eax
call	sub_41DF90
mov	esi, [ebp+var_1C]
add	esi, 1F0h
xor	eax, eax
call	sub_41DF90
mov	esi, [ebp+var_1C]
add	esi, 1F4h
xor	eax, eax
call	sub_41DF90
mov	esi, [ebp+var_1C]
add	esi, 1F8h
xor	eax, eax
call	sub_41DF90
push	0
mov	ecx, [ebp+var_1C]
add	ecx, 1FCh
call	sub_418670
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000008h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000008h
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+200h], 0
mov	ecx, [ebp+var_1C]
add	ecx, 1E8h
push	ecx
xor	eax, eax
call	sub_420330
mov	edx, [ebp+var_1C]
add	edx, 1ECh
push	edx
xor	eax, eax
call	sub_420330
mov	eax, [ebp+var_1C]
add	eax, 1F0h
push	eax
xor	eax, eax
call	sub_420330
mov	ecx, [ebp+var_1C]
add	ecx, 1F4h
push	ecx
xor	eax, eax
call	sub_420330
mov	edx, [ebp+var_1C]
add	edx, 1F8h
push	edx
xor	eax, eax
call	sub_420330
mov	eax, [ebp+var_1C]
add	eax, 1FCh
push	eax
xor	eax, eax
call	sub_420330
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_464E60 endp

align 10h


; Attributes: bp-based frame

sub_464FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569870
mov	ecx, [ebp+var_4]
add	ecx, 1FCh
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 1F8h
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 1F4h
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 1F0h
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 1ECh
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 1E8h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	esp, ebp
pop	ebp
retn
sub_464FC0 endp



; Attributes: bp-based frame

sub_465030 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	204h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_465059
mov	ecx, [ebp+var_4]
call	sub_464E60
mov	[ebp+var_20], eax
jmp	short loc_465060

loc_465059:
mov	[ebp+var_20], 0

loc_465060:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_465030 endp

align 10h


; Attributes: bp-based frame

sub_465070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_464FC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_465098
push	204h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_465098:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465070 endp

align 10h


; Attributes: bp-based frame

sub_4650B0 proc	near

var_60=	dword ptr -60h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
call	sub_10D0B80
mov	eax, [ebp+var_60]
mov	dword ptr [eax], offset	off_1569900
mov	ecx, [ebp+var_60]
call	sub_465140
mov	ecx, [ebp+var_60]
call	sub_465210
mov	ecx, [ebp+var_60]
call	sub_463300
mov	ecx, [ebp+var_60]
mov	dword ptr [ecx+4], 5Ch
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn
sub_4650B0 endp

align 10h


; Attributes: bp-based frame

sub_465100 proc	near

var_64=	dword ptr -64h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 64h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_465129
mov	ecx, [ebp+var_4]
call	sub_4650B0
mov	[ebp+var_64], eax
jmp	short loc_465130

loc_465129:
mov	[ebp+var_64], 0

loc_465130:
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn
sub_465100 endp

align 10h


; Attributes: bp-based frame

sub_465140 proc	near

var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_15=	byte ptr -15h
var_D= byte ptr	-0Dh
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	0
push	1
push	3
push	4
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvFro ; "textures/env/frontend_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
push	0
push	1
push	1
push	4
lea	ecx, [ebp+var_D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvDef ; "textures/env/default_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_D]
call	nullsub_1
push	0
push	0
push	1
push	2
lea	ecx, [ebp+var_15]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesLegoBr ; "textures/lego/bricks/toon_gradient.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_15]
call	nullsub_1
push	0
push	0
push	3
push	2
lea	ecx, [ebp+var_1D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesLegoBr ; "textures/lego/bricks/toon_gradient.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_1D]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_465140 endp

align 10h


; Attributes: bp-based frame

sub_465210 proc	near

var_C8=	dword ptr -0C8h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_35=	byte ptr -35h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0C8h
push	esi
push	edi
mov	[ebp+var_C8], ecx
lea	esi, [ebp+var_14]
call	sub_1160EC0
mov	[ebp+var_14], offset off_1553EE8
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_8], xmm0
mov	eax, offset aAttr_shadowter ; "attr_ShadowTerrain"
lea	esi, [ebp+var_30]
call	sub_4115A0
lea	eax, [ebp+var_30]
lea	ecx, [ebp+var_14]
call	sub_1160E20
lea	ecx, [ebp+var_30]
call	sub_41A470
push	25h
lea	edi, [ebp+var_2C]
call	sub_414950
mov	[ebp+var_24], 1
lea	edi, [ebp+var_2C]
lea	esi, [ebp+var_14]
call	sub_116D710
mov	[ebp+var_50], eax
mov	eax, [ebp+var_50]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_465290
mov	ecx, [ebp+var_4]
call	sub_40AA80

loc_465290:
mov	ecx, [ebp+var_4]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
push	edx
lea	ecx, [ebp+var_35]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_shadowter ; "attr_ShadowTerrain"
call	sub_407D30
mov	ecx, [ebp+var_C8]
call	sub_45C710
lea	ecx, [ebp+var_35]
call	nullsub_1
cmp	[ebp+var_4], 0
jz	short loc_4652D3
mov	ecx, [ebp+var_4]
call	sub_40AA90

loc_4652D3:
lea	esi, [ebp+var_2C]
call	sub_414810
lea	ecx, [ebp+var_14]
call	sub_427D00
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_465210 endp

align 10h


; Attributes: bp-based frame

sub_4652F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569900
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465321
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465321:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4652F0 endp

align 10h


; Attributes: bp-based frame

sub_465330 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_imag ; "Technique_ImaginationCloud"
call	sub_1128940
push	5Bh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1569998
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000080h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000080h
mov	ecx, [ebp+var_1C]
call	sub_463300
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_465330 endp

align 10h


; Attributes: bp-based frame

sub_4653D0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4653F9
mov	ecx, [ebp+var_4]
call	sub_465330
mov	[ebp+var_20], eax
jmp	short loc_465400

loc_4653F9:
mov	[ebp+var_20], 0

loc_465400:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4653D0 endp

align 10h


; Attributes: bp-based frame

sub_465410 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569998
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465441
push	1E4h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465441:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465410 endp

align 10h


; Attributes: bp-based frame

sub_465450 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_10D0B80
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_1569A28
mov	ecx, [ebp+var_AC]
call	sub_465140
mov	ecx, [ebp+var_AC]
call	sub_4659A0
mov	ecx, [ebp+var_AC]
call	sub_463300
mov	ecx, [ebp+var_AC]
mov	dword ptr [ecx+4], 5
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn
sub_465450 endp

align 10h


; Attributes: bp-based frame

sub_4654B0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4654DF
mov	ecx, [ebp+var_4]
call	sub_465450
mov	[ebp+var_B0], eax
jmp	short loc_4654E9

loc_4654DF:
mov	[ebp+var_B0], 0

loc_4654E9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4654B0 endp

align 10h


; Attributes: bp-based frame

sub_465500 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569A28
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465531
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465531:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465500 endp

align 10h


; Attributes: bp-based frame

sub_465540 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_10D0B80
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_1569AC0
mov	ecx, [ebp+var_AC]
call	sub_465140
mov	ecx, [ebp+var_AC]
call	sub_4659A0
mov	ecx, [ebp+var_AC]
call	sub_463300
mov	ecx, [ebp+var_AC]
mov	dword ptr [ecx+4], 4
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn
sub_465540 endp

align 10h


; Attributes: bp-based frame

sub_4655A0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4655CF
mov	ecx, [ebp+var_4]
call	sub_465540
mov	[ebp+var_B0], eax
jmp	short loc_4655D9

loc_4655CF:
mov	[ebp+var_B0], 0

loc_4655D9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_4655A0 endp

align 10h


; Attributes: bp-based frame

sub_4655F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569AC0
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465621
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465621:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4655F0 endp

align 10h


; Attributes: bp-based frame

sub_465630 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_10D0B80
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_1569B58
mov	ecx, [ebp+var_AC]
call	sub_465140
mov	ecx, [ebp+var_AC]
call	sub_4659A0
mov	ecx, [ebp+var_AC]
call	sub_463300
mov	ecx, [ebp+var_AC]
mov	dword ptr [ecx+4], 58h
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn
sub_465630 endp

align 10h


; Attributes: bp-based frame

sub_465690 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4656BF
mov	ecx, [ebp+var_4]
call	sub_465630
mov	[ebp+var_B0], eax
jmp	short loc_4656C9

loc_4656BF:
mov	[ebp+var_B0], 0

loc_4656C9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_465690 endp

align 10h


; Attributes: bp-based frame

sub_4656E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569B58
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465711
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465711:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4656E0 endp

align 10h


; Attributes: bp-based frame

sub_465720 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_10D0B80
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_1569BF0
mov	ecx, [ebp+var_AC]
call	sub_4658D0
mov	ecx, [ebp+var_AC]
call	sub_4659A0
mov	ecx, [ebp+var_AC]
call	sub_463300
mov	ecx, [ebp+var_AC]
mov	dword ptr [ecx+4], 1Eh
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn
sub_465720 endp

align 10h


; Attributes: bp-based frame

sub_465780 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4657AF
mov	ecx, [ebp+var_4]
call	sub_465720
mov	[ebp+var_B0], eax
jmp	short loc_4657B9

loc_4657AF:
mov	[ebp+var_B0], 0

loc_4657B9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_465780 endp

align 10h


; Attributes: bp-based frame

sub_4657D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569BF0
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465801
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465801:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4657D0 endp

align 10h


; Attributes: bp-based frame

sub_465810 proc	near

var_F0=	dword ptr -0F0h

push	ebp
mov	ebp, esp
sub	esp, 0F0h
mov	[ebp+var_F0], ecx
mov	ecx, [ebp+var_F0]
call	sub_10D0B80
mov	eax, [ebp+var_F0]
mov	dword ptr [eax], offset	off_1569C88
mov	ecx, [ebp+var_F0]
call	sub_4658D0
mov	ecx, [ebp+var_F0]
call	sub_4659A0
mov	ecx, [ebp+var_F0]
call	sub_465B70
mov	ecx, [ebp+var_F0]
call	sub_463300
mov	ecx, [ebp+var_F0]
mov	dword ptr [ecx+4], 0Ch
mov	eax, [ebp+var_F0]
mov	esp, ebp
pop	ebp
retn
sub_465810 endp

align 10h


; Attributes: bp-based frame

sub_465880 proc	near

var_F4=	dword ptr -0F4h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0F4h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4658AF
mov	ecx, [ebp+var_4]
call	sub_465810
mov	[ebp+var_F4], eax
jmp	short loc_4658B9

loc_4658AF:
mov	[ebp+var_F4], 0

loc_4658B9:
mov	eax, [ebp+var_F4]
mov	esp, ebp
pop	ebp
retn
sub_465880 endp

align 10h


; Attributes: bp-based frame

sub_4658D0 proc	near

var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_15=	byte ptr -15h
var_D= byte ptr	-0Dh
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	0
push	1
push	3
push	4
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvFro ; "textures/env/frontend_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
push	0
push	1
push	1
push	4
lea	ecx, [ebp+var_D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvDef ; "textures/env/default_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_D]
call	nullsub_1
push	0
push	0
push	3
push	2
lea	ecx, [ebp+var_15]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesLegoBr ; "textures/lego/bricks/toon_gradient.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_15]
call	nullsub_1
push	0
push	0
push	1
push	2
lea	ecx, [ebp+var_1D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesLegoBr ; "textures/lego/bricks/toon_gradient.dds"
call	sub_407D30
mov	ecx, [ebp+var_24]
call	sub_10B2550
lea	ecx, [ebp+var_1D]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4658D0 endp

align 10h


; Attributes: bp-based frame

sub_4659A0 proc	near

var_13C= dword ptr -13Ch
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_7D=	byte ptr -7Dh
var_78=	byte ptr -78h
var_71=	byte ptr -71h
var_6C=	byte ptr -6Ch
var_68=	byte ptr -68h
var_60=	dword ptr -60h
var_50=	dword ptr -50h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 13Ch
push	esi
push	edi
mov	[ebp+var_13C], ecx
lea	esi, [ebp+var_50]
call	sub_1160EC0
mov	[ebp+var_50], offset off_1553EE8
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_44], xmm0
mov	eax, offset aAttr_shadowter ; "attr_ShadowTerrain"
lea	esi, [ebp+var_6C]
call	sub_4115A0
lea	eax, [ebp+var_6C]
lea	ecx, [ebp+var_50]
call	sub_1160E20
lea	ecx, [ebp+var_6C]
call	sub_41A470
push	25h
lea	edi, [ebp+var_68]
call	sub_414950
mov	[ebp+var_60], 1
lea	edi, [ebp+var_68]
lea	esi, [ebp+var_50]
call	sub_116D710
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jz	short loc_465A26
mov	ecx, [ebp+var_1C]
call	sub_40AA80

loc_465A26:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_90]
push	edx
lea	ecx, [ebp+var_71]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_shadowter ; "attr_ShadowTerrain"
call	sub_407D30
mov	ecx, [ebp+var_13C]
call	sub_45C710
lea	ecx, [ebp+var_71]
call	nullsub_1
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_28], xmm0
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_24], xmm0
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_20], xmm0
lea	eax, [ebp+var_28]
push	eax
push	3
lea	eax, [ebp+var_40]
call	sub_1163590
mov	eax, offset aAttr_nonunifor ; "attr_nonUniformScale"
lea	esi, [ebp+var_78]
call	sub_4115A0
lea	eax, [ebp+var_78]
lea	ecx, [ebp+var_40]
call	sub_1160E20
lea	ecx, [ebp+var_78]
call	sub_41A470
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_40]
call	sub_116D710
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_465AEF
mov	ecx, [ebp+var_2C]
call	sub_40AA80

loc_465AEF:
mov	edx, [ebp+var_2C]
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E4]
push	eax
lea	ecx, [ebp+var_7D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_nonunifor ; "attr_nonUniformScale"
call	sub_407D30
mov	ecx, [ebp+var_13C]
call	sub_45C710
lea	ecx, [ebp+var_7D]
call	nullsub_1
cmp	[ebp+var_2C], 0
jz	short loc_465B38
mov	ecx, [ebp+var_2C]
call	sub_40AA90

loc_465B38:
lea	esi, [ebp+var_18]
call	sub_414810
lea	esi, [ebp+var_40]
call	sub_41EF90
cmp	[ebp+var_1C], 0
jz	short loc_465B56
mov	ecx, [ebp+var_1C]
call	sub_40AA90

loc_465B56:
lea	esi, [ebp+var_68]
call	sub_414810
lea	ecx, [ebp+var_50]
call	sub_427D00
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4659A0 endp

align 10h


; Attributes: bp-based frame

sub_465B70 proc	near

var_60=	dword ptr -60h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	byte ptr -38h
var_30=	dword ptr -30h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
push	edi
mov	[ebp+var_60], ecx
lea	ecx, [ebp+var_1C]
call	sub_416ED0
push	1
lea	ecx, [ebp+var_1C]
call	sub_416E80
push	0
lea	ecx, [ebp+var_1C]
call	sub_417A20
push	1
lea	ecx, [ebp+var_1C]
call	sub_416EC0
push	6
lea	ecx, [ebp+var_1C]
call	sub_416EA0
push	25h
lea	edi, [ebp+var_38]
call	sub_414950
mov	[ebp+var_30], 1
lea	edi, [ebp+var_38]
lea	esi, [ebp+var_1C]
call	sub_116D710
lea	esi, [ebp+var_20]
call	sub_41DF90
lea	eax, [ebp+var_20]
call	sub_420D20
mov	[ebp+var_4C], eax
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+48h]
call	eax
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx+168h]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_44]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_4C]
call	sub_420330
lea	eax, [ebp+var_20]
call	sub_40ABB0
lea	esi, [ebp+var_38]
call	sub_414810
lea	ecx, [ebp+var_1C]
call	sub_4179F0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_465B70 endp

align 10h


; Attributes: bp-based frame

sub_465C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569C88
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465C61
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465C61:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465C30 endp

align 10h


; Attributes: bp-based frame

sub_465C70 proc	near

var_84=	dword ptr -84h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
mov	ecx, [ebp+var_84]
call	sub_10D0B80
mov	eax, [ebp+var_84]
mov	dword ptr [eax], offset	off_1569D20
mov	ecx, [ebp+var_84]
call	sub_4658D0
mov	ecx, [ebp+var_84]
call	sub_467210
mov	ecx, [ebp+var_84]
call	sub_463300
mov	ecx, [ebp+var_84]
mov	dword ptr [ecx+4], 1Fh
mov	eax, [ebp+var_84]
mov	esp, ebp
pop	ebp
retn
sub_465C70 endp

align 10h


; Attributes: bp-based frame

sub_465CD0 proc	near

var_84=	dword ptr -84h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 84h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_465CFF
mov	ecx, [ebp+var_4]
call	sub_465C70
mov	[ebp+var_84], eax
jmp	short loc_465D09

loc_465CFF:
mov	[ebp+var_84], 0

loc_465D09:
mov	eax, [ebp+var_84]
mov	esp, ebp
pop	ebp
retn
sub_465CD0 endp

align 10h


; Attributes: bp-based frame

sub_465D20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569D20
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465D51
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465D51:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465D20 endp

align 10h


; Attributes: bp-based frame

sub_465D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_465DA7
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569DB8
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 34h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_465DAE

loc_465DA7:
mov	[ebp+var_8], 0

loc_465DAE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_465D60 endp

align 10h


; Attributes: bp-based frame

sub_465DC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569DB8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465DF1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465DF1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465DC0 endp

align 10h


; Attributes: bp-based frame

sub_465E00 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_10D0B80
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_1569E50
mov	ecx, [ebp+var_AC]
call	sub_4658D0
mov	ecx, [ebp+var_AC]
call	sub_4659A0
mov	ecx, [ebp+var_AC]
call	sub_463300
mov	ecx, [ebp+var_AC]
mov	dword ptr [ecx+4], 0Eh
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn
sub_465E00 endp

align 10h


; Attributes: bp-based frame

sub_465E60 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_465E8F
mov	ecx, [ebp+var_4]
call	sub_465E00
mov	[ebp+var_B0], eax
jmp	short loc_465E99

loc_465E8F:
mov	[ebp+var_B0], 0

loc_465E99:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_465E60 endp

align 10h


; Attributes: bp-based frame

sub_465EB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569E50
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465EE1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465EE1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465EB0 endp

align 10h


; Attributes: bp-based frame

sub_465EF0 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_10D0B80
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_1569EE8
mov	ecx, [ebp+var_AC]
call	sub_4658D0
mov	ecx, [ebp+var_AC]
call	sub_4659A0
mov	ecx, [ebp+var_AC]
call	sub_463300
mov	ecx, [ebp+var_AC]
mov	dword ptr [ecx+4], 35h
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn
sub_465EF0 endp

align 10h


; Attributes: bp-based frame

sub_465F50 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_465F7F
mov	ecx, [ebp+var_4]
call	sub_465EF0
mov	[ebp+var_B0], eax
jmp	short loc_465F89

loc_465F7F:
mov	[ebp+var_B0], 0

loc_465F89:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_465F50 endp

align 10h


; Attributes: bp-based frame

sub_465FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569EE8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_465FD1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_465FD1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_465FA0 endp

align 10h


; Attributes: bp-based frame

sub_465FE0 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_10D0B80
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_1569F80
mov	ecx, [ebp+var_AC]
call	sub_4658D0
mov	ecx, [ebp+var_AC]
call	sub_4659A0
mov	ecx, [ebp+var_AC]
call	sub_463300
mov	ecx, [ebp+var_AC]
mov	dword ptr [ecx+4], 16h
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn
sub_465FE0 endp

align 10h


; Attributes: bp-based frame

sub_466040 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_46606F
mov	ecx, [ebp+var_4]
call	sub_465FE0
mov	[ebp+var_B0], eax
jmp	short loc_466079

loc_46606F:
mov	[ebp+var_B0], 0

loc_466079:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_466040 endp

align 10h


; Attributes: bp-based frame

sub_466090 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1569F80
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4660C1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4660C1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466090 endp

align 10h


; Attributes: bp-based frame

sub_4660D0 proc	near

var_48=	dword ptr -48h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 48h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_46611F
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A018
mov	ecx, [ebp+var_4]
call	sub_465210
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 4Bh
mov	edx, [ebp+var_4]
mov	[ebp+var_48], edx
jmp	short loc_466126

loc_46611F:
mov	[ebp+var_48], 0

loc_466126:
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn
sub_4660D0 endp

align 10h


; Attributes: bp-based frame

sub_466130 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A018
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466161
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466161:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466130 endp

align 10h


; Attributes: bp-based frame

sub_466170 proc	near

var_48=	dword ptr -48h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 48h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4661BF
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A0B0
mov	ecx, [ebp+var_4]
call	sub_465210
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 66h
mov	edx, [ebp+var_4]
mov	[ebp+var_48], edx
jmp	short loc_4661C6

loc_4661BF:
mov	[ebp+var_48], 0

loc_4661C6:
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn
sub_466170 endp

align 10h


; Attributes: bp-based frame

sub_4661D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A0B0
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466201
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466201:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4661D0 endp

align 10h


; Attributes: bp-based frame

sub_466210 proc	near

var_60=	dword ptr -60h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
call	sub_10D0B80
mov	eax, [ebp+var_60]
mov	dword ptr [eax], offset	off_156A148
mov	ecx, [ebp+var_60]
call	sub_4658D0
mov	ecx, [ebp+var_60]
call	sub_465210
mov	ecx, [ebp+var_60]
call	sub_463300
mov	ecx, [ebp+var_60]
mov	dword ptr [ecx+4], 4Ch
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn
sub_466210 endp

align 10h


; Attributes: bp-based frame

sub_466260 proc	near

var_64=	dword ptr -64h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 64h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466289
mov	ecx, [ebp+var_4]
call	sub_466210
mov	[ebp+var_64], eax
jmp	short loc_466290

loc_466289:
mov	[ebp+var_64], 0

loc_466290:
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn
sub_466260 endp

align 10h


; Attributes: bp-based frame

sub_4662A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A148
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4662D1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4662D1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4662A0 endp

align 10h


; Attributes: bp-based frame

sub_4662E0 proc	near

var_60=	dword ptr -60h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
call	sub_10D0B80
mov	eax, [ebp+var_60]
mov	dword ptr [eax], offset	off_156A1E0
mov	ecx, [ebp+var_60]
call	sub_4658D0
mov	ecx, [ebp+var_60]
call	sub_465210
mov	ecx, [ebp+var_60]
call	sub_463300
mov	ecx, [ebp+var_60]
mov	dword ptr [ecx+4], 67h
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn
sub_4662E0 endp

align 10h


; Attributes: bp-based frame

sub_466330 proc	near

var_64=	dword ptr -64h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 64h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466359
mov	ecx, [ebp+var_4]
call	sub_4662E0
mov	[ebp+var_64], eax
jmp	short loc_466360

loc_466359:
mov	[ebp+var_64], 0

loc_466360:
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn
sub_466330 endp

align 10h


; Attributes: bp-based frame

sub_466370 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A1E0
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4663A1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4663A1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466370 endp

align 10h


; Attributes: bp-based frame

sub_4663B0 proc	near

var_48=	dword ptr -48h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 48h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4663FF
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A278
mov	ecx, [ebp+var_4]
call	sub_465210
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 4Dh
mov	edx, [ebp+var_4]
mov	[ebp+var_48], edx
jmp	short loc_466406

loc_4663FF:
mov	[ebp+var_48], 0

loc_466406:
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn
sub_4663B0 endp

align 10h


; Attributes: bp-based frame

sub_466410 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A278
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466441
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466441:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466410 endp

align 10h


; Attributes: bp-based frame

sub_466450 proc	near

var_48=	dword ptr -48h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 48h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_46649F
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A310
mov	ecx, [ebp+var_4]
call	sub_465210
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 68h
mov	edx, [ebp+var_4]
mov	[ebp+var_48], edx
jmp	short loc_4664A6

loc_46649F:
mov	[ebp+var_48], 0

loc_4664A6:
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn
sub_466450 endp

align 10h


; Attributes: bp-based frame

sub_4664B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A310
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4664E1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4664E1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4664B0 endp

align 10h


; Attributes: bp-based frame

sub_4664F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466537
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A3A8
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 46h
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_46653E

loc_466537:
mov	[ebp+var_8], 0

loc_46653E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4664F0 endp

align 10h


; Attributes: bp-based frame

sub_466550 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A3A8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466581
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466581:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466550 endp

align 10h


; Attributes: bp-based frame

sub_466590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A440
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+138h], 80000008h
mov	edx, [ebp+var_4]
mov	dword ptr [edx+134h], 80000008h
mov	ecx, [ebp+var_4]
call	sub_463300
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 51h
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_466590 endp

align 10h


; Attributes: bp-based frame

sub_4665E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466609
mov	ecx, [ebp+var_4]
call	sub_466590
mov	[ebp+var_8], eax
jmp	short loc_466610

loc_466609:
mov	[ebp+var_8], 0

loc_466610:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4665E0 endp

align 10h


; Attributes: bp-based frame

sub_466620 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A440
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466651
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466651:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466620 endp

align 10h


; Attributes: bp-based frame

sub_466660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A4D8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+138h], 80000020h
mov	edx, [ebp+var_4]
mov	dword ptr [edx+134h], 80000020h
mov	ecx, [ebp+var_4]
call	sub_463300
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 49h
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_466660 endp

align 10h


; Attributes: bp-based frame

sub_4666B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4666D9
mov	ecx, [ebp+var_4]
call	sub_466660
mov	[ebp+var_8], eax
jmp	short loc_4666E0

loc_4666D9:
mov	[ebp+var_8], 0

loc_4666E0:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4666B0 endp

align 10h


; Attributes: bp-based frame

sub_4666F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A4D8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466721
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466721:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4666F0 endp

align 10h


; Attributes: bp-based frame

sub_466730 proc	near

var_6C=	dword ptr -6Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
call	sub_10D0B80
mov	eax, [ebp+var_6C]
mov	dword ptr [eax], offset	off_156A570
mov	ecx, [ebp+var_6C]
call	sub_466EE0
mov	ecx, [ebp+var_6C]
call	sub_466B70
mov	ecx, [ebp+var_6C]
call	sub_463300
mov	ecx, [ebp+var_6C]
mov	dword ptr [ecx+4], 1Bh
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466730 endp

align 10h


; Attributes: bp-based frame

sub_466780 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4667A9
mov	ecx, [ebp+var_4]
call	sub_466730
mov	[ebp+var_6C], eax
jmp	short loc_4667B0

loc_4667A9:
mov	[ebp+var_6C], 0

loc_4667B0:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466780 endp

align 10h


; Attributes: bp-based frame

sub_4667C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A570
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4667F1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4667F1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4667C0 endp

align 10h


; Attributes: bp-based frame

sub_466800 proc	near

var_6C=	dword ptr -6Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
call	sub_10D0B80
mov	eax, [ebp+var_6C]
mov	dword ptr [eax], offset	off_156A608
mov	ecx, [ebp+var_6C]
call	sub_466EE0
mov	ecx, [ebp+var_6C]
call	sub_466B70
mov	ecx, [ebp+var_6C]
call	sub_463300
mov	ecx, [ebp+var_6C]
mov	dword ptr [ecx+4], 1Dh
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466800 endp

align 10h


; Attributes: bp-based frame

sub_466850 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466879
mov	ecx, [ebp+var_4]
call	sub_466800
mov	[ebp+var_6C], eax
jmp	short loc_466880

loc_466879:
mov	[ebp+var_6C], 0

loc_466880:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466850 endp

align 10h


; Attributes: bp-based frame

sub_466890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A608
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4668C1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_4668C1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466890 endp

align 10h


; Attributes: bp-based frame

sub_4668D0 proc	near

var_6C=	dword ptr -6Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
call	sub_10D0B80
mov	eax, [ebp+var_6C]
mov	dword ptr [eax], offset	off_156A6A0
mov	ecx, [ebp+var_6C]
call	sub_466EE0
mov	ecx, [ebp+var_6C]
call	sub_466B70
mov	ecx, [ebp+var_6C]
call	sub_463300
mov	ecx, [ebp+var_6C]
mov	dword ptr [ecx+4], 30h
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_4668D0 endp

align 10h


; Attributes: bp-based frame

sub_466920 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466949
mov	ecx, [ebp+var_4]
call	sub_4668D0
mov	[ebp+var_6C], eax
jmp	short loc_466950

loc_466949:
mov	[ebp+var_6C], 0

loc_466950:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466920 endp

align 10h


; Attributes: bp-based frame

sub_466960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A6A0
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466991
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466991:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466960 endp

align 10h


; Attributes: bp-based frame

sub_4669A0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4669E7
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A738
mov	ecx, [ebp+var_4]
call	sub_466EE0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 19h
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
jmp	short loc_4669EE

loc_4669E7:
mov	[ebp+var_18], 0

loc_4669EE:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_4669A0 endp

align 10h


; Attributes: bp-based frame

sub_466A00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A738
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466A31
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466A31:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466A00 endp

align 10h


; Attributes: bp-based frame

sub_466A40 proc	near

var_70=	dword ptr -70h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_70]
call	sub_10D0B80
mov	eax, [ebp+var_70]
mov	dword ptr [eax], offset	off_156A7D0
mov	ecx, [ebp+var_70]
call	sub_466AD0
mov	ecx, [ebp+var_70]
call	sub_466B70
mov	ecx, [ebp+var_70]
call	sub_463300
mov	ecx, [ebp+var_70]
mov	dword ptr [ecx+4], 1Ch
mov	eax, [ebp+var_70]
mov	esp, ebp
pop	ebp
retn
sub_466A40 endp

align 10h


; Attributes: bp-based frame

sub_466A90 proc	near

var_70=	dword ptr -70h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 70h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466AB9
mov	ecx, [ebp+var_4]
call	sub_466A40
mov	[ebp+var_70], eax
jmp	short loc_466AC0

loc_466AB9:
mov	[ebp+var_70], 0

loc_466AC0:
mov	eax, [ebp+var_70]
mov	esp, ebp
pop	ebp
retn
sub_466A90 endp

align 10h


; Attributes: bp-based frame

sub_466AD0 proc	near

var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_D= byte ptr	-0Dh
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	0
push	1
push	3
push	4
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvFro ; "textures/env/frontend_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_1C]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
push	0
push	1
push	1
push	4
lea	ecx, [ebp+var_D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvDef ; "textures/env/default_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_1C]
call	sub_10B2550
lea	ecx, [ebp+var_D]
call	nullsub_1
push	0
push	0
push	1
push	2
lea	ecx, [ebp+var_15]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesLegoBr ; "textures/lego/bricks/toon_gradient.dds"
call	sub_407D30
mov	ecx, [ebp+var_1C]
call	sub_10B2550
lea	ecx, [ebp+var_15]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_466AD0 endp

align 10h


; Attributes: bp-based frame

sub_466B70 proc	near

var_D8=	dword ptr -0D8h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_45=	byte ptr -45h
var_40=	byte ptr -40h
var_3C=	byte ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 0D8h
push	esi
push	edi
mov	[ebp+var_D8], ecx
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_24], xmm0
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_20], xmm0
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_1C], xmm0
lea	eax, [ebp+var_24]
push	eax
push	3
lea	eax, [ebp+var_3C]
call	sub_1163590
mov	eax, offset aAttr_nonunifor ; "attr_nonUniformScale"
lea	esi, [ebp+var_40]
call	sub_4115A0
lea	eax, [ebp+var_40]
lea	ecx, [ebp+var_3C]
call	sub_1160E20
lea	ecx, [ebp+var_40]
call	sub_41A470
push	25h
lea	edi, [ebp+var_18]
call	sub_414950
mov	[ebp+var_10], 1
lea	edi, [ebp+var_18]
lea	esi, [ebp+var_3C]
call	sub_116D710
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_28], ecx
cmp	[ebp+var_28], 0
jz	short loc_466C09
mov	ecx, [ebp+var_28]
call	sub_40AA80

loc_466C09:
mov	edx, [ebp+var_28]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
push	eax
lea	ecx, [ebp+var_45]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_nonunifor ; "attr_nonUniformScale"
call	sub_407D30
mov	ecx, [ebp+var_D8]
call	sub_45C710
lea	ecx, [ebp+var_45]
call	nullsub_1
cmp	[ebp+var_28], 0
jz	short loc_466C4C
mov	ecx, [ebp+var_28]
call	sub_40AA90

loc_466C4C:
lea	esi, [ebp+var_18]
call	sub_414810
lea	esi, [ebp+var_3C]
call	sub_41EF90
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_466B70 endp

align 10h


; Attributes: bp-based frame

sub_466C70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A7D0
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466CA1
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466CA1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466C70 endp

align 10h


; Attributes: bp-based frame

sub_466CB0 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466CFF
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A868
mov	ecx, [ebp+var_4]
call	sub_466EE0
mov	ecx, [ebp+var_4]
call	sub_466B70
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 1Ah
mov	edx, [ebp+var_4]
mov	[ebp+var_6C], edx
jmp	short loc_466D06

loc_466CFF:
mov	[ebp+var_6C], 0

loc_466D06:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466CB0 endp

align 10h


; Attributes: bp-based frame

sub_466D10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A868
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466D41
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466D41:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466D10 endp

align 10h


; Attributes: bp-based frame

sub_466D50 proc	near

var_B8=	dword ptr -0B8h

push	ebp
mov	ebp, esp
sub	esp, 0B8h
mov	[ebp+var_B8], ecx
mov	ecx, [ebp+var_B8]
call	sub_10D0B80
mov	eax, [ebp+var_B8]
mov	dword ptr [eax], offset	off_156A900
mov	ecx, [ebp+var_B8]
call	sub_466EE0
mov	ecx, [ebp+var_B8]
call	sub_466B70
mov	ecx, [ebp+var_B8]
call	sub_465B70
mov	ecx, [ebp+var_B8]
call	sub_463300
mov	ecx, [ebp+var_B8]
mov	dword ptr [ecx+4], 32h
mov	eax, [ebp+var_B8]
mov	esp, ebp
pop	ebp
retn
sub_466D50 endp

align 10h


; Attributes: bp-based frame

sub_466DC0 proc	near

var_B0=	dword ptr -0B0h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0B0h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466DEF
mov	ecx, [ebp+var_4]
call	sub_466D50
mov	[ebp+var_B0], eax
jmp	short loc_466DF9

loc_466DEF:
mov	[ebp+var_B0], 0

loc_466DF9:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn
sub_466DC0 endp

align 10h


; Attributes: bp-based frame

sub_466E10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A900
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466E41
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466E41:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466E10 endp

align 10h


; Attributes: bp-based frame

sub_466E50 proc	near

var_6C=	dword ptr -6Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
call	sub_10D0B80
mov	eax, [ebp+var_6C]
mov	dword ptr [eax], offset	off_156A998
mov	ecx, [ebp+var_6C]
call	sub_466EE0
mov	ecx, [ebp+var_6C]
call	sub_466B70
mov	ecx, [ebp+var_6C]
call	sub_463300
mov	ecx, [ebp+var_6C]
mov	dword ptr [ecx+4], 48h
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466E50 endp

align 10h


; Attributes: bp-based frame

sub_466EA0 proc	near

var_6C=	dword ptr -6Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466EC9
mov	ecx, [ebp+var_4]
call	sub_466E50
mov	[ebp+var_6C], eax
jmp	short loc_466ED0

loc_466EC9:
mov	[ebp+var_6C], 0

loc_466ED0:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn
sub_466EA0 endp

align 10h


; Attributes: bp-based frame

sub_466EE0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
push	0
push	1
push	1
push	4
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesEnvFro ; "textures/env/frontend_reflection.dds"
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
push	0
push	0
push	1
push	2
lea	ecx, [ebp+var_D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesLegoBr ; "textures/lego/bricks/toon_gradient.dds"
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_466EE0 endp

align 10h


; Attributes: bp-based frame

sub_466F50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156A998
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_466F81
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_466F81:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466F50 endp

align 10h


; Attributes: bp-based frame

sub_466F90 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_466FDF
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AA30
mov	ecx, [ebp+var_4]
call	sub_4671D0
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 62h
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx
jmp	short loc_466FE6

loc_466FDF:
mov	[ebp+var_10], 0

loc_466FE6:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_466F90 endp

align 10h


; Attributes: bp-based frame

sub_466FF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AA30
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_467021
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_467021:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_466FF0 endp

align 10h


; Attributes: bp-based frame

sub_467030 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_46707F
mov	ecx, [ebp+var_4]
call	sub_10D0B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AAC8
mov	ecx, [ebp+var_4]
call	sub_467090
mov	ecx, [ebp+var_4]
call	sub_463300
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 63h
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
jmp	short loc_467086

loc_46707F:
mov	[ebp+var_18], 0

loc_467086:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_467030 endp

align 10h


; Attributes: bp-based frame

sub_467090 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
push	1
push	1
push	1
push	6
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesMetalM ; "textures/metal/metal_reflection_brushed"...
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
push	1
push	0
push	1
push	7
lea	ecx, [ebp+var_D]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesMeta_0 ; "textures/metal/metal_reflection_brushed"...
call	sub_407D30
mov	ecx, [ebp+var_14]
call	sub_10B2550
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_467090 endp

align 10h


; Attributes: bp-based frame

sub_467100 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AAC8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_467131
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_467131:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467100 endp

align 10h


; Attributes: bp-based frame

sub_467140 proc	near

var_70=	dword ptr -70h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_70]
call	sub_10D0B80
mov	eax, [ebp+var_70]
mov	dword ptr [eax], offset	off_156AB60
mov	ecx, [ebp+var_70]
call	sub_4671D0
mov	ecx, [ebp+var_70]
call	sub_467210
mov	ecx, [ebp+var_70]
call	sub_463300
mov	ecx, [ebp+var_70]
mov	dword ptr [ecx+4], 60h
mov	eax, [ebp+var_70]
mov	esp, ebp
pop	ebp
retn
sub_467140 endp

align 10h


; Attributes: bp-based frame

sub_467190 proc	near

var_70=	dword ptr -70h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 70h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4671B9
mov	ecx, [ebp+var_4]
call	sub_467140
mov	[ebp+var_70], eax
jmp	short loc_4671C0

loc_4671B9:
mov	[ebp+var_70], 0

loc_4671C0:
mov	eax, [ebp+var_70]
mov	esp, ebp
pop	ebp
retn
sub_467190 endp

align 10h


; Attributes: bp-based frame

sub_4671D0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	1
push	1
push	1
push	6
lea	ecx, [ebp+var_5]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aTexturesMeta_1 ; "textures/metal/metal_reflection_polishe"...
call	sub_407D30
mov	ecx, [ebp+var_C]
call	sub_10B2550
lea	ecx, [ebp+var_5]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4671D0 endp

align 10h


; Attributes: bp-based frame

sub_467210 proc	near

var_E4=	dword ptr -0E4h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_51=	byte ptr -51h
var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0E4h
push	esi
push	edi
mov	[ebp+var_E4], ecx
mov	eax, dword_17EE158
mov	[ebp+var_10], eax
mov	ecx, dword_17EE15C
mov	[ebp+var_C], ecx
mov	edx, dword_17EE160
mov	[ebp+var_8], edx
mov	eax, dword_17EE164
mov	[ebp+var_4], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
lea	esi, [ebp+var_48]
call	sub_11680A0
mov	eax, offset aAttr_itemcolor ; "attr_itemColor"
lea	esi, [ebp+var_4C]
call	sub_4115A0
lea	eax, [ebp+var_4C]
lea	ecx, [ebp+var_48]
call	sub_1160E20
lea	ecx, [ebp+var_4C]
call	sub_41A470
push	25h
lea	edi, [ebp+var_2C]
call	sub_414950
mov	[ebp+var_24], 1
lea	edi, [ebp+var_2C]
lea	esi, [ebp+var_48]
call	sub_116D710
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 0
jz	short loc_4672BA
mov	ecx, [ebp+var_14]
call	sub_40AA80

loc_4672BA:
mov	edx, [ebp+var_14]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
push	eax
lea	ecx, [ebp+var_51]
call	sub_401EF0
sub	esp, 18h
mov	ecx, esp
push	eax
push	offset aAttr_itemcolor ; "attr_itemColor"
call	sub_407D30
mov	ecx, [ebp+var_E4]
call	sub_45C710
lea	ecx, [ebp+var_51]
call	nullsub_1
cmp	[ebp+var_14], 0
jz	short loc_4672FD
mov	ecx, [ebp+var_14]
call	sub_40AA90

loc_4672FD:
lea	esi, [ebp+var_2C]
call	sub_414810
lea	ecx, [ebp+var_48]
call	sub_41E9C0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467210 endp

align 10h


; Attributes: bp-based frame

sub_467320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AB60
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_467351
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_467351:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467320 endp

align 10h


; Attributes: bp-based frame

sub_467360 proc	near

var_78=	dword ptr -78h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	ecx, [ebp+var_78]
call	sub_10D0B80
mov	eax, [ebp+var_78]
mov	dword ptr [eax], offset	off_156ABF8
mov	ecx, [ebp+var_78]
call	sub_467090
mov	ecx, [ebp+var_78]
call	sub_467210
mov	ecx, [ebp+var_78]
call	sub_463300
mov	ecx, [ebp+var_78]
mov	dword ptr [ecx+4], 64h
mov	eax, [ebp+var_78]
mov	esp, ebp
pop	ebp
retn
sub_467360 endp

align 10h


; Attributes: bp-based frame

sub_4673B0 proc	near

var_78=	dword ptr -78h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 78h
push	3BCh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4673D9
mov	ecx, [ebp+var_4]
call	sub_467360
mov	[ebp+var_78], eax
jmp	short loc_4673E0

loc_4673D9:
mov	[ebp+var_78], 0

loc_4673E0:
mov	eax, [ebp+var_78]
mov	esp, ebp
pop	ebp
retn
sub_4673B0 endp

align 10h


; Attributes: bp-based frame

sub_4673F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156ABF8
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_467421
push	3BCh
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_467421:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4673F0 endp

align 10h


; Attributes: bp-based frame

sub_467430 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_b_14 ; "Technique_Basic_NoLighting_VertColor_UV"...
call	sub_1128940
push	17h
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_156AC90
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000080h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000080h
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467430 endp

align 10h


; Attributes: bp-based frame

sub_4674C0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4674E9
mov	ecx, [ebp+var_4]
call	sub_467430
mov	[ebp+var_20], eax
jmp	short loc_4674F0

loc_4674E9:
mov	[ebp+var_20], 0

loc_4674F0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4674C0 endp

align 10h


; Attributes: bp-based frame

sub_467500 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AC90
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_467531
push	1E8h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_467531:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467500 endp

align 10h


; Attributes: bp-based frame

sub_467540 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_basi ; "Technique_Basic_Material_NoLighting"
call	sub_1128940
push	6Ch
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_156AD20
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+138h], 80000080h
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+134h], 80000080h
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467540 endp

align 10h


; Attributes: bp-based frame

sub_4675D0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4675F9
mov	ecx, [ebp+var_4]
call	sub_467540
mov	[ebp+var_20], eax
jmp	short loc_467600

loc_4675F9:
mov	[ebp+var_20], 0

loc_467600:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4675D0 endp

align 10h


; Attributes: bp-based frame

sub_467610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AD20
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_467641
push	1E8h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_467641:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467610 endp

align 10h


; Attributes: bp-based frame

sub_467650 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_text ; "Technique_TextureProj"
call	sub_1128940
push	2Bh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467650 endp

align 10h


; Attributes: bp-based frame

sub_4676D0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4676F9
mov	ecx, [ebp+var_4]
call	sub_467650
mov	[ebp+var_20], eax
jmp	short loc_467700

loc_4676F9:
mov	[ebp+var_20], 0

loc_467700:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4676D0 endp

align 10h


; Attributes: bp-based frame

sub_467710 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_shad ; "Technique_Shadow_Bake"
call	sub_1128940
push	2Ah
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467710 endp

align 10h


; Attributes: bp-based frame

sub_467790 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4677B9
mov	ecx, [ebp+var_4]
call	sub_467710
mov	[ebp+var_20], eax
jmp	short loc_4677C0

loc_4677B9:
mov	[ebp+var_20], 0

loc_4677C0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_467790 endp

align 10h


; Attributes: bp-based frame

sub_4677D0 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_unde ; "Technique_Undefined"
call	sub_1128940
push	2Eh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4677D0 endp

align 10h


; Attributes: bp-based frame

sub_467850 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_467879
mov	ecx, [ebp+var_4]
call	sub_4677D0
mov	[ebp+var_20], eax
jmp	short loc_467880

loc_467879:
mov	[ebp+var_20], 0

loc_467880:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_467850 endp

align 10h


; Attributes: bp-based frame

sub_467890 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_unde ; "Technique_Undefined"
call	sub_1128940
push	2Fh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467890 endp

align 10h


; Attributes: bp-based frame

sub_467910 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_467939
mov	ecx, [ebp+var_4]
call	sub_467890
mov	[ebp+var_20], eax
jmp	short loc_467940

loc_467939:
mov	[ebp+var_20], 0

loc_467940:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_467910 endp

align 10h


; Attributes: bp-based frame

sub_467950 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_sh_0 ; "Technique_ShadowMapping_Depth"
call	sub_1128940
push	2Ch
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467950 endp

align 10h


; Attributes: bp-based frame

sub_4679D0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4679F9
mov	ecx, [ebp+var_4]
call	sub_467950
mov	[ebp+var_20], eax
jmp	short loc_467A00

loc_4679F9:
mov	[ebp+var_20], 0

loc_467A00:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4679D0 endp

align 10h


; Attributes: bp-based frame

sub_467A10 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset byte_146D660
call	sub_1128940
push	ecx
mov	esi, esp
mov	eax, offset aTechnique_sh_1 ; "Technique_ShadowMapping_Depth_Skinned"
call	sub_1128940
push	2Dh
mov	ecx, [ebp+var_1C]
call	sub_10D2040
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1568DA0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467A10 endp

align 10h


; Attributes: bp-based frame

sub_467A90 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
push	1E4h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_467AB9
mov	ecx, [ebp+var_4]
call	sub_467A10
mov	[ebp+var_20], eax
jmp	short loc_467AC0

loc_467AB9:
mov	[ebp+var_20], 0

loc_467AC0:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_467A90 endp

align 10h


; Attributes: bp-based frame

sub_467AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	eax, 100h
mov	esi, [ebp+var_4]
call	sub_11289A0
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467AD0 endp

align 10h


; Attributes: bp-based frame

sub_467AF0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 4
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	esi, [ebp+var_C]
add	esi, 20h
xor	eax, eax
call	sub_41DF90
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_467AF0 endp

align 10h


; Attributes: bp-based frame

sub_467B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10CD1E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467B58
push	1E4h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467B58:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467B30 endp

align 10h


; Attributes: bp-based frame

sub_467B70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10D1780
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467B98
push	204h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467B98:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467B70 endp

align 10h


; Attributes: bp-based frame

sub_467BB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10D1380
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467BD8
push	228h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467BD8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467BB0 endp

align 10h


; Attributes: bp-based frame

sub_467BF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10D0790
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467C18
push	3BCh
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467C18:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467BF0 endp

align 10h


; Attributes: bp-based frame

sub_467C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_188C428
mov	esp, ebp
pop	ebp
retn
sub_467C30 endp



; Attributes: bp-based frame

sub_467C40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A4B90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467C65
push	5Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467C65:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467C40 endp

align 10h


; Attributes: bp-based frame

sub_467C70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A4B40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467C95
push	3Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467C95:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467C70 endp

align 10h


; Attributes: bp-based frame

sub_467CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_188C494
mov	esp, ebp
pop	ebp
retn
sub_467CA0 endp



; Attributes: bp-based frame

sub_467CB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A4AD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467CD5
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467CD5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467CB0 endp

align 10h


; Attributes: bp-based frame

sub_467CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_188C47C
mov	esp, ebp
pop	ebp
retn
sub_467CE0 endp



; Attributes: bp-based frame

sub_467CF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10A4A60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467D15
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_467D15:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467CF0 endp

align 10h


; Attributes: bp-based frame

sub_467D20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_109E8B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_467D43
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_467D43:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_467D20 endp

align 10h


; Attributes: bp-based frame

sub_467D50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_1C]
lea	esi, [ebp+var_8]
call	sub_4099E0
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_467D50 endp

align 10h


; Attributes: bp-based frame

sub_467D80 proc	near

var_18=	dword ptr -18h
var_C= byte ptr	-0Ch
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
lea	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_402EB0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
lea	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_4]
call	sub_402EB0
mov	ecx, [ebp+var_18]
call	sub_469480
lea	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_402EB0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_467D80 endp

align 10h


; Attributes: bp-based frame

sub_467DE0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_5D16B0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_467DE0 endp

align 10h


; Attributes: bp-based frame

sub_467E40 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4694E0
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_467E40 endp

align 10h


; Attributes: bp-based frame

sub_467E60 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_8]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	[ebp+var_1C], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx

loc_467EA0:
mov	edx, [ebp+var_18]
xor	eax, eax
cmp	edx, [ebp+var_24]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_467EC5
lea	eax, [ebp+var_18]
call	sub_405E90
mov	edx, [ebp+var_1C]
add	edx, 1
mov	[ebp+var_1C], edx
jmp	short loc_467EA0

loc_467EC5:
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_467E60 endp

align 10h


; Attributes: bp-based frame

sub_467EE0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_4780E0
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_467EE0 endp

align 10h


; Attributes: bp-based frame

sub_467FA0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_469620
mov	esp, ebp
pop	ebp
retn	4
sub_467FA0 endp

align 10h


; Attributes: bp-based frame

sub_467FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4696F0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_467FD0 endp

align 10h


; Attributes: bp-based frame

sub_467FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_469740
mov	esp, ebp
pop	ebp
retn
sub_467FF0 endp

align 10h


; Attributes: bp-based frame

sub_468010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_469790
mov	esp, ebp
pop	ebp
retn
sub_468010 endp

align 10h


; Attributes: bp-based frame

sub_468030 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FAD0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_4680A4
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 4
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_4680A4
mov	edx, [ebp+var_4C]
shl	edx, 4
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4680A4:
mov	esp, ebp
pop	ebp
retn
sub_468030 endp

align 10h


; Attributes: bp-based frame

sub_4680B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_46810B
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_4804D0
add	esp, 0Ch
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 10h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_468136

loc_46810B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_46BB60

loc_468136:
mov	esp, ebp
pop	ebp
retn	4
sub_4680B0 endp

align 10h


; Attributes: bp-based frame

sub_468140 proc	near

var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_468164
jmp	short loc_46817D

loc_468164:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_46ABB0

loc_46817D:
mov	esp, ebp
pop	ebp
retn
sub_468140 endp

align 10h


; Attributes: bp-based frame

sub_468190 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A4]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FB00
add	esp, 8
mov	edx, [ebp+var_A4]
cmp	dword ptr [edx], 0
jz	short loc_468230
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A4]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_A0], eax
mov	edx, [ebp+var_A4]
mov	eax, [edx]
mov	[ebp+var_9C], eax
cmp	[ebp+var_9C], 0
jz	short loc_468230
mov	ecx, [ebp+var_A0]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_9C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_468230:
mov	esp, ebp
pop	ebp
retn
sub_468190 endp

align 10h


; Attributes: bp-based frame

sub_468240 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4682A3
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 0Ch
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_468288
jmp	short loc_4682A1

loc_468288:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_46AC50

loc_4682A1:
jmp	short loc_4682D9

loc_4682A3:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_46BDF0

loc_4682D9:
mov	esp, ebp
pop	ebp
retn	8
sub_468240 endp

align 10h


; Attributes: bp-based frame

sub_4682E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_469820
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4682E0 endp

align 10h


; Attributes: bp-based frame

sub_468300 proc	near

var_44=	dword ptr -44h
var_8= byte ptr	-8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_44]
call	sub_46AAF0
push	0
lea	ecx, [ebp+var_8]
call	sub_418670
push	eax
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_44]
call	sub_469870
lea	ecx, [ebp+var_8]
call	sub_429100
mov	eax, [ebp+var_44]
mov	esp, ebp
pop	ebp
retn	4
sub_468300 endp

align 10h


; Attributes: bp-based frame

sub_468350 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_4683AE
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_468393
jmp	short loc_4683AC

loc_468393:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_46AD30

loc_4683AC:
jmp	short loc_4683DF

loc_4683AE:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_46C060

loc_4683DF:
mov	esp, ebp
pop	ebp
retn	8
sub_468350 endp

align 10h


; Attributes: bp-based frame

sub_4683F0 proc	near

var_48=	dword ptr -48h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_48]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_48]
call	sub_4698C0
mov	esp, ebp
pop	ebp
retn	4
sub_4683F0 endp

align 10h


; Attributes: bp-based frame

sub_468420 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_46FB30
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_46847B
mov	ecx, 1
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46847B:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_468420 endp

align 10h


; Attributes: bp-based frame

sub_468490 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FB60
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_468509
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_468509
mov	ecx, [ebp+var_4C]
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_468509:
mov	esp, ebp
pop	ebp
retn
sub_468490 endp

align 10h


; Attributes: bp-based frame

sub_468510 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_38]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_46854B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5C9FC0
add	esp, 8
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
add	ecx, 1Ch
mov	edx, [ebp+var_38]
mov	[edx+4], ecx
jmp	short loc_468576

loc_46854B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	[ebp+var_34], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_38]
call	sub_46ADD0

loc_468576:
mov	esp, ebp
pop	ebp
retn	4
sub_468510 endp

align 10h


; Attributes: bp-based frame

sub_468580 proc	near

var_124= dword ptr -124h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 124h
mov	[ebp+var_124], ecx
mov	eax, [ebp+var_124]
mov	ecx, [ebp+var_124]
mov	edx, [eax+8]
cmp	edx, [ecx+10h]
jz	loc_46863C
mov	eax, [ebp+var_124]
add	eax, 8
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, 1
mov	ecx, [ecx+4]
shl	edx, cl
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
movzx	ecx, [ebp+arg_0]
test	ecx, ecx
jz	short loc_4685EE
mov	edx, [ebp+var_8]
mov	eax, [edx]
or	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	[ecx], eax
jmp	short loc_4685FD

loc_4685EE:
mov	edx, [ebp+var_4]
not	edx
mov	eax, [ebp+var_8]
and	edx, [eax]
mov	ecx, [ebp+var_8]
mov	[ecx], edx

loc_4685FD:
mov	edx, [ebp+var_124]
add	edx, 8
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
add	eax, 1
mov	edx, [ebp+var_1C]
mov	[edx+4], eax
cmp	ecx, 1Fh
jnz	short loc_46863A
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
add	edx, 4
mov	eax, [ebp+var_1C]
mov	[eax], edx

loc_46863A:
jmp	short loc_468666

loc_46863C:
movzx	ecx, [ebp+arg_0]
push	ecx
sub	esp, 8
mov	[ebp+var_20], esp
mov	edx, [ebp+var_124]
mov	eax, [edx+8]
mov	ecx, [edx+0Ch]
mov	edx, [ebp+var_20]
mov	[edx], eax
mov	[edx+4], ecx
mov	ecx, [ebp+var_124]
call	sub_469940

loc_468666:
mov	esp, ebp
pop	ebp
retn	4
sub_468580 endp

align 10h


; Attributes: bp-based frame

sub_468670 proc	near

var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_469DC0
mov	esp, ebp
pop	ebp
retn	4
sub_468670 endp

align 10h


; Attributes: bp-based frame

sub_4686A0 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_495460
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_4686FB
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4686FB:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4686A0 endp

align 10h


; Attributes: bp-based frame

sub_468710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_46D750
mov	esp, ebp
pop	ebp
retn
sub_468710 endp

align 10h


; Attributes: bp-based frame

sub_468730 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_469E40
mov	esp, ebp
pop	ebp
retn	4
sub_468730 endp

align 10h


; Attributes: bp-based frame

sub_468760 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax
call	sub_475F30
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_4687BB
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4687BB:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_468760 endp

align 10h


; Attributes: bp-based frame

sub_4687D0 proc	near

var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_40]
lea	eax, [ebp+var_8]
call	sub_4046E0

loc_4687F7:
lea	edx, [ebp+var_24]
mov	[ebp+var_20], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setnz	cl
mov	[ebp+var_41], cl
movzx	edx, [ebp+var_41]
test	edx, edx
jz	short loc_468873
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_28]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_46886B
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_2C]
call	sub_4046E0
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_40]
call	sub_468760

loc_46886B:
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
jmp	short loc_4687F7

loc_468873:
mov	esp, ebp
pop	ebp
retn	4
sub_4687D0 endp

align 10h


; Attributes: bp-based frame

sub_468880 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_469EC0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_468880 endp

align 10h


; Attributes: bp-based frame

sub_4688E0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_46A180
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4688E0 endp

align 10h


; Attributes: bp-based frame

sub_468940 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_46A240
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_468940 endp

align 10h


; Attributes: bp-based frame

sub_4689A0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_46A300
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4689A0 endp

align 10h


; Attributes: bp-based frame

sub_468A00 proc	near

var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_46A410
mov	esp, ebp
pop	ebp
retn	4
sub_468A00 endp

align 10h


; Attributes: bp-based frame

sub_468A30 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_46FB90
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_468A8B
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_468A8B:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_468A30 endp

align 10h


; Attributes: bp-based frame

sub_468AA0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_468B14
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_468B14
mov	edx, [ebp+var_54]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_468B14:
mov	esp, ebp
pop	ebp
retn
sub_468AA0 endp

align 10h


; Attributes: bp-based frame

sub_468B20 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_3C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_40]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_46AE70
mov	[ebp+var_18], eax
mov	edx, [ebp+var_3C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_468B20 endp

align 10h


; Attributes: bp-based frame

sub_468B90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_468B90 endp

align 10h


; Attributes: bp-based frame

sub_468BC0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_46A4E0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_468BC0 endp

align 10h


; Attributes: bp-based frame

sub_468C20 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_468C7E
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_468C63
jmp	short loc_468C7C

loc_468C63:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_5E0DD0

loc_468C7C:
jmp	short loc_468CAF

loc_468C7E:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_46CD00

loc_468CAF:
mov	esp, ebp
pop	ebp
retn	8
sub_468C20 endp

align 10h


; Attributes: bp-based frame

sub_468CC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_468D17
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_C]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
add	edx, 8
mov	eax, [ebp+var_10]
mov	[eax+4], edx
jmp	short loc_468D37

loc_468D17:
xor	ecx, ecx
mov	[ebp+var_1], cl
push	1
push	1
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_50AB50

loc_468D37:
mov	esp, ebp
pop	ebp
retn	4
sub_468CC0 endp

align 10h


; Attributes: bp-based frame

sub_468D40 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_46A5A0
mov	esp, ebp
pop	ebp
retn	4
sub_468D40 endp

align 10h


; Attributes: bp-based frame

sub_468D70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_468DC1
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_468DE1

loc_468DC1:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4726D0

loc_468DE1:
mov	esp, ebp
pop	ebp
retn	4
sub_468D70 endp

align 10h


; Attributes: bp-based frame

sub_468DF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx+0Ch]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_46FC00
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
sub	eax, 4
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_9], cl
mov	esp, ebp
pop	ebp
retn
sub_468DF0 endp

align 10h


; Attributes: bp-based frame

sub_468E50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_46A620
mov	ecx, [ebp+var_1C]
movzx	edx, byte ptr [ecx+28h]
push	edx
sub	esp, 10h
mov	[ebp+var_14], esp
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	ecx, [ebp+var_14]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
call	sub_46FC50
add	esp, 24h
mov	esp, ebp
pop	ebp
retn	4
sub_468E50 endp

align 10h


; Attributes: bp-based frame

sub_468ED0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
movzx	ecx, byte ptr [eax+28h]
push	ecx
sub	esp, 10h
mov	[ebp+var_C], esp
mov	edx, [ebp+var_18]
add	edx, 10h
mov	eax, [ebp+var_C]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
call	sub_46FCB0
add	esp, 24h
mov	ecx, [ebp+var_18]
call	sub_46A670
mov	esp, ebp
pop	ebp
retn
sub_468ED0 endp

align 10h


; Attributes: bp-based frame

sub_468F40 proc	near

var_68=	dword ptr -68h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_68]
add	eax, 10h
mov	ecx, [ebp+var_C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_68]
mov	edx, [ebp+var_10]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
call	sub_46FD10
add	esp, 20h
mov	ecx, [ebp+var_68]
call	sub_46D000
mov	esp, ebp
pop	ebp
retn
sub_468F40 endp

align 10h


; Attributes: bp-based frame

sub_468FB0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_46A6D0
mov	esp, ebp
pop	ebp
retn	4
sub_468FB0 endp

align 10h


; Attributes: bp-based frame

sub_468FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5935F0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	esp, ebp
pop	ebp
retn
sub_468FE0 endp

align 10h


; Attributes: bp-based frame

sub_469000 proc	near

var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_46A750
mov	esp, ebp
pop	ebp
retn	4
sub_469000 endp

align 10h


; Attributes: bp-based frame

sub_469030 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_46FD70
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_46908B
mov	ecx, 1
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46908B:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_469030 endp

align 10h


; Attributes: bp-based frame

sub_4690A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_46A7D0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	esp, ebp
pop	ebp
retn
sub_4690A0 endp

align 10h


; Attributes: bp-based frame

sub_4690C0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_46A820
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4690C0 endp

align 10h


; Attributes: bp-based frame

sub_469120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_46A890
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	esp, ebp
pop	ebp
retn
sub_469120 endp

align 10h


; Attributes: bp-based frame

sub_469140 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_8]
call	sub_405E90
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_469140 endp

align 10h


; Attributes: bp-based frame

sub_469180 proc	near

var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_46A980
mov	esp, ebp
pop	ebp
retn	4
sub_469180 endp

align 10h


; Attributes: bp-based frame

sub_4691B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_14], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
push	0
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax]
call	edx
cmp	[ebp+var_C], 0
jz	short loc_46921B
mov	eax, 1
imul	eax, 190h
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_46921B:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4691B0 endp

align 10h


; Attributes: bp-based frame

sub_469230 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_46928E
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_469273
jmp	short loc_46928C

loc_469273:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_46AF60

loc_46928C:
jmp	short loc_4692BF

loc_46928E:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_46EE20

loc_4692BF:
mov	esp, ebp
pop	ebp
retn	8
sub_469230 endp

align 10h


; Attributes: bp-based frame

sub_4692D0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_46AA00
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4692D0 endp

align 10h


; Attributes: bp-based frame

sub_469330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_469373
push	40h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_469373:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_469330 endp

align 10h


; Attributes: bp-based frame

sub_469380 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4693C3
push	38h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_4693C3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_469380 endp

align 10h


; Attributes: bp-based frame

sub_4693D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_45D540
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4693F7
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_4693F7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4693D0 endp



; Attributes: bp-based frame

sub_469400 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	edx, 1
mov	ecx, [eax+4]
shl	edx, cl
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_469400 endp

align 10h


; Attributes: bp-based frame

sub_469440 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_8], ecx
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_8]
call	sub_459A20
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[eax], ecx
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_469440 endp

align 10h


; Attributes: bp-based frame

sub_469480 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
call	sub_404540
push	eax
call	sub_404B20
add	esp, 4
mov	eax, 1
mov	ecx, [ebp+var_4] ; void	*
call	sub_4044E0
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_469480 endp



; Attributes: bp-based frame

sub_4694E0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50FE00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
mov	[ebp+var_48], ecx
xor	eax, eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_34]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_48]
call	sub_5E11A0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_48]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_48]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx
cmp	[ebp+var_38], 0
jz	short loc_4695F2
mov	edx, [ebp+var_48]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_48]
call	sub_46B390
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_40], eax

loc_4695AF:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+8], 0
jz	short loc_4695C3
mov	edx, [ebp+var_40]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
jmp	short loc_4695AF

loc_4695C3:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx

loc_4695D5:
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4695E9
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_44], ecx
jmp	short loc_4695D5

loc_4695E9:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_4695F2:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4694E0 endp

align 10h


; Attributes: bp-based frame

sub_469620 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503490
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_4B6FE0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_469620 endp

align 10h


; Attributes: bp-based frame

sub_4696A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4696E5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46B7A0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4696E5:
mov	esp, ebp
pop	ebp
retn
sub_4696A0 endp

align 10h


; Attributes: bp-based frame

sub_4696F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_469735
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46B800
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_469735:
mov	esp, ebp
pop	ebp
retn
sub_4696F0 endp

align 10h


; Attributes: bp-based frame

sub_469740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_469785
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46BAA0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_469785:
mov	esp, ebp
pop	ebp
retn
sub_469740 endp

align 10h


; Attributes: bp-based frame

sub_469790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4697D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46BB00
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4697D5:
mov	esp, ebp
pop	ebp
retn
sub_469790 endp

align 10h


; Attributes: bp-based frame

sub_4697E0 proc	near

var_2C=	dword ptr -2Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_4697F6
mov	eax, [ebp+arg_0]
jmp	short loc_46980F

loc_4697F6:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_46ABB0

loc_46980F:
mov	esp, ebp
pop	ebp
retn	8
sub_4697E0 endp

align 10h


; Attributes: bp-based frame

sub_469820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_469865
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46BE70
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_469865:
mov	esp, ebp
pop	ebp
retn
sub_469820 endp

align 10h


; Attributes: bp-based frame

sub_469870 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
xor	edx, edx
mov	byte ptr [ebp+var_4+1],	dl
mov	al, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_4], cl
mov	dl, byte ptr [ebp+var_4]
mov	[ebp+var_2], dl
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_24]
push	eax
call	sub_478530
add	esp, 10h
mov	ecx, [ebp+var_28]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn	8
sub_469870 endp

align 10h


; Attributes: bp-based frame

sub_4698C0 proc	near

var_3C=	dword ptr -3Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_49CA20
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_470160
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4698C0 endp

align 10h


; Attributes: bp-based frame

sub_469940 proc	near

var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 144h
mov	[ebp+var_13C], ecx
mov	eax, [ebp+var_13C]
mov	ecx, [ebp+var_13C]
mov	edx, [eax+8]
cmp	edx, [ecx+10h]
jz	loc_469A7F
push	0
lea	eax, [ebp+var_11]
push	eax
sub	esp, 8
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_13C]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	[ebp+var_70], edx
mov	[ebp+var_6C], eax
push	1
lea	ecx, [ebp+var_70]
call	sub_459A20
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_74]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_78], esp
mov	ecx, [ebp+var_13C]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	ecx, [ebp+var_78]
mov	[ecx], edx
mov	[ecx+4], eax
sub	esp, 8
mov	[ebp+var_7C], esp
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_7C]
mov	[ecx], edx
mov	[ecx+4], eax
lea	edx, [ebp+var_28]
push	edx
call	sub_46FDD0
add	esp, 24h
mov	eax, 1
mov	ecx, [ebp+arg_4]
shl	eax, cl
mov	[ebp+var_A4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A0]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_A4]
mov	[ebp+var_2C], eax
movzx	ecx, [ebp+arg_8]
test	ecx, ecx
jz	short loc_469A19
mov	edx, [ebp+var_30]
mov	eax, [edx]
or	eax, [ebp+var_2C]
mov	ecx, [ebp+var_30]
mov	[ecx], eax
jmp	short loc_469A28

loc_469A19:
mov	edx, [ebp+var_2C]
not	edx
mov	eax, [ebp+var_30]
and	edx, [eax]
mov	ecx, [ebp+var_30]
mov	[ecx], edx

loc_469A28:
mov	edx, [ebp+var_13C]
add	edx, 8
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
add	eax, 1
mov	edx, [ebp+var_A8]
mov	[edx+4], eax
cmp	ecx, 1Fh
jnz	short loc_469A7A
mov	eax, [ebp+var_A8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_A8]
mov	edx, [ecx]
add	edx, 4
mov	eax, [ebp+var_A8]
mov	[eax], edx

loc_469A7A:
jmp	loc_469D59

loc_469A7F:
mov	ecx, [ebp+var_13C]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[ebp+var_B8], edx
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_13C]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	[ebp+var_B0], edx
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_B0]
sub	ecx, [ebp+var_B8]
sar	ecx, 2
shl	ecx, 5
add	ecx, [ebp+var_AC]
sub	ecx, [ebp+var_B4]
jz	short loc_469B25
mov	edx, [ebp+var_13C]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_C8], eax
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_13C]
mov	eax, [edx+8]
mov	ecx, [edx+0Ch]
mov	[ebp+var_C0], eax
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_C0]
sub	edx, [ebp+var_C8]
sar	edx, 2
shl	edx, 5
add	edx, [ebp+var_BC]
sub	edx, [ebp+var_C4]
shl	edx, 1
mov	[ebp+var_140], edx
jmp	short loc_469B2F

loc_469B25:
mov	[ebp+var_140], 20h

loc_469B2F:
mov	eax, [ebp+var_140]
mov	[ebp+var_4], eax
push	0
mov	ecx, [ebp+var_4]
add	ecx, 1Fh
shr	ecx, 5
push	ecx
mov	ecx, [ebp+var_13C]
add	ecx, 10h
call	sub_46B060
mov	[ebp+var_10], eax
sub	esp, 8
mov	[ebp+var_CC], esp
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_10]
mov	[edx], eax
mov	ecx, [ebp+var_CC]
mov	dword ptr [ecx+4], 0
sub	esp, 8
mov	[ebp+var_D0], esp
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_D0]
mov	[ecx], edx
mov	[ecx+4], eax
sub	esp, 8
mov	[ebp+var_D4], esp
mov	edx, [ebp+var_13C]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_D4]
mov	[edx], eax
mov	[edx+4], ecx
lea	eax, [ebp+var_C]
push	eax
call	sub_46FEB0
add	esp, 1Ch
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	[ebp+var_FC], ecx
mov	[ebp+var_F8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
cmp	eax, 1Fh
jnz	short loc_469BEE
mov	[ebp+var_8], 0
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx

loc_469BEE:
mov	eax, [ebp+var_FC]
mov	ecx, [ebp+var_F8]
mov	[ebp+var_44], eax
mov	[ebp+var_40], ecx
mov	edx, 1
mov	ecx, [ebp+var_40]
shl	edx, cl
mov	[ebp+var_104], edx
mov	eax, [ebp+var_44]
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_100]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_104]
mov	[ebp+var_48], edx
movzx	eax, [ebp+arg_8]
test	eax, eax
jz	short loc_469C42
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
or	edx, [ebp+var_48]
mov	eax, [ebp+var_4C]
mov	[eax], edx
jmp	short loc_469C51

loc_469C42:
mov	ecx, [ebp+var_48]
not	ecx
mov	edx, [ebp+var_4C]
and	ecx, [edx]
mov	eax, [ebp+var_4C]
mov	[eax], ecx

loc_469C51:
sub	esp, 8
mov	[ebp+var_108], esp
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_108]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_10C], esp
mov	ecx, [ebp+var_13C]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	ecx, [ebp+var_10C]
mov	[ecx], edx
mov	[ecx+4], eax
sub	esp, 8
mov	[ebp+var_110], esp
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_110]
mov	[ecx], edx
mov	[ecx+4], eax
lea	edx, [ebp+var_60]
push	edx
call	sub_46FEB0
add	esp, 1Ch
mov	[ebp+var_144], eax
mov	eax, [ebp+var_144]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_13C]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_13C]
cmp	dword ptr [ecx], 0
jz	short loc_469D23
mov	edx, [ebp+var_13C]
mov	eax, [ebp+var_13C]
mov	ecx, [edx+10h]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_138], ecx
mov	edx, [ebp+var_13C]
mov	eax, [edx]
mov	[ebp+var_134], eax
cmp	[ebp+var_134], 0
jz	short loc_469D23
mov	ecx, [ebp+var_138]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_134]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_469D23:
mov	eax, [ebp+var_4]
add	eax, 1Fh
shr	eax, 5
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax*4]
mov	eax, [ebp+var_13C]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	[ebp+var_68], ecx
mov	[ebp+var_64], 0
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_13C]
mov	[ecx], edx
mov	[ecx+4], eax

loc_469D59:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_469940 endp

align 10h


; Attributes: bp-based frame

sub_469D60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_10]
add	edx, 8
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_469D60 endp

align 10h


; Attributes: bp-based frame

sub_469DC0 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_596830
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_4701B0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_469DC0 endp

align 10h


; Attributes: bp-based frame

sub_469E40 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503490
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
call	sub_470230
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_469E40 endp

align 10h


; Attributes: bp-based frame

sub_469EC0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_469F0D
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_469F0D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_469EC0 endp

align 10h


; Attributes: bp-based frame

sub_469F30 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	dword ptr [eax+10h], 0
setz	cl
movzx	edx, cl
test	edx, edx
jz	loc_46A021
mov	eax, [ebp+var_44]
xor	ecx, ecx
cmp	dword ptr [eax+10h], 0
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_469F68
jmp	loc_46A171

loc_469F68:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ecx+4]
mov	[ebp+var_10], eax
mov	edx, [ecx+8]
mov	[ebp+var_C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+4], 0
jz	short loc_469FD2
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx

loc_469FD2:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+var_44]
jnz	short loc_469FE6
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[edx+0Ch], eax

loc_469FE6:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
cmp	edx, [ebp+var_44]
jnz	short loc_469FFA
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	[eax+8], ecx

loc_469FFA:
mov	edx, [ebp+var_44]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_44]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_44]
mov	[ecx+8], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_44]
mov	[eax+0Ch], ecx
jmp	loc_46A119

loc_46A021:
mov	edx, [ebp+var_44]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_46A04A
mov	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_469F30
jmp	loc_46A171
jmp	loc_46A119

loc_46A04A:
xor	eax, eax
mov	[ebp+var_15], al
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ecx+4]
mov	[ebp+var_24], eax
mov	edx, [ecx+8]
mov	[ebp+var_20], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_44]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+4], 0
jz	short loc_46A0B4
mov	eax, [ebp+var_44]
mov	ecx, [eax+4]
mov	edx, [ebp+var_44]
mov	[ecx+4], edx

loc_46A0B4:
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+arg_0]
jnz	short loc_46A0C8
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_46A0C8:
mov	ecx, [ebp+var_44]
mov	edx, [ecx+8]
cmp	edx, [ebp+arg_0]
jnz	short loc_46A0DC
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_44]
mov	[eax+8], ecx

loc_46A0DC:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+4], 0
jz	short loc_46A0F1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx

loc_46A0F1:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+var_44]
jnz	short loc_46A105
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[edx+0Ch], eax

loc_46A105:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
cmp	edx, [ebp+var_44]
jnz	short loc_46A119
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	[eax+8], ecx

loc_46A119:
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+var_44]
add	eax, 10h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 14h
mov	[ebp+var_40], edx
mov	eax, [ebp+var_44]
add	eax, 14h
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	dl, [ecx]
mov	[ebp+var_35], dl
mov	eax, [ebp+var_40]
mov	cl, [eax]
mov	edx, [ebp+var_3C]
mov	[edx], cl
mov	eax, [ebp+var_40]
mov	cl, [ebp+var_35]
mov	[eax], cl

loc_46A171:
mov	esp, ebp
pop	ebp
retn	4
sub_469F30 endp

align 10h


; Attributes: bp-based frame

sub_46A180 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_46FF20
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_46A1D7
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46A1D7:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_46A180 endp

align 10h


; Attributes: bp-based frame

sub_46A1F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A235
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46C850
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A235:
mov	esp, ebp
pop	ebp
retn
sub_46A1F0 endp

align 10h


; Attributes: bp-based frame

sub_46A240 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_46FF50
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_46A297
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46A297:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_46A240 endp

align 10h


; Attributes: bp-based frame

sub_46A2B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A2F5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46C8B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A2F5:
mov	esp, ebp
pop	ebp
retn
sub_46A2B0 endp

align 10h


; Attributes: bp-based frame

sub_46A300 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_46FD70
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_46A357
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46A357:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_46A300 endp

align 10h


; Attributes: bp-based frame

sub_46A370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A3B5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46C910
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A3B5:
mov	esp, ebp
pop	ebp
retn
sub_46A370 endp

align 10h


; Attributes: bp-based frame

sub_46A3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A405
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46C970
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A405:
mov	esp, ebp
pop	ebp
retn
sub_46A3C0 endp

align 10h


; Attributes: bp-based frame

sub_46A410 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_49CAE0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_470290
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46A410 endp

align 10h


; Attributes: bp-based frame

sub_46A490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A4D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46CC40
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A4D5:
mov	esp, ebp
pop	ebp
retn
sub_46A490 endp

align 10h


; Attributes: bp-based frame

sub_46A4E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_46FF80
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_46A537
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46A537:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_46A4E0 endp

align 10h


; Attributes: bp-based frame

sub_46A550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A595
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46CCA0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A595:
mov	esp, ebp
pop	ebp
retn
sub_46A550 endp

align 10h


; Attributes: bp-based frame

sub_46A5A0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503490
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
call	sub_480590
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46A5A0 endp

align 10h


; Attributes: bp-based frame

sub_46A620 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+18h]
sub	ecx, 30h
mov	edx, [ebp+var_C]
cmp	[edx+10h], ecx
jz	short loc_46A65E
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_46FFC0
add	esp, 8
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
add	ecx, 30h
mov	edx, [ebp+var_C]
mov	[edx+10h], ecx
jmp	short loc_46A66A

loc_46A65E:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_46D1A0

loc_46A66A:
mov	esp, ebp
pop	ebp
retn	4
sub_46A620 endp



; Attributes: bp-based frame

sub_46A670 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
cmp	edx, [ecx+14h]
jz	short loc_46A6A7
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
sub	ecx, 30h
mov	edx, [ebp+var_8]
mov	[edx+10h], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
push	ecx		; void *
call	sub_5A7B70
add	esp, 4
jmp	short loc_46A6BE

loc_46A6A7:
mov	ecx, [ebp+var_8]
call	sub_46D260
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
push	eax		; void *
call	sub_5A7B70
add	esp, 4

loc_46A6BE:
mov	esp, ebp
pop	ebp
retn
sub_46A670 endp

align 10h


; Attributes: bp-based frame

sub_46A6D0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_596830
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_49C2D0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46A6D0 endp

align 10h


; Attributes: bp-based frame

sub_46A750 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_503430
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_4702E0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46A750 endp

align 10h


; Attributes: bp-based frame

sub_46A7D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A815
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46E130
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A815:
mov	esp, ebp
pop	ebp
retn
sub_46A7D0 endp

align 10h


; Attributes: bp-based frame

sub_46A820 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_470030
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_46A877
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46A877:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_46A820 endp

align 10h


; Attributes: bp-based frame

sub_46A890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A8D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46E210
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A8D5:
mov	esp, ebp
pop	ebp
retn
sub_46A890 endp

align 10h


; Attributes: bp-based frame

sub_46A8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A925
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46E5D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A925:
mov	esp, ebp
pop	ebp
retn
sub_46A8E0 endp

align 10h


; Attributes: bp-based frame

sub_46A930 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46A975
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46E7D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46A975:
mov	esp, ebp
pop	ebp
retn
sub_46A930 endp

align 10h


; Attributes: bp-based frame

sub_46A980 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_46B000
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
call	sub_470330
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46A980 endp

align 10h


; Attributes: bp-based frame

sub_46AA00 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx
call	sub_475F30
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_46AA57
mov	edx, 1
imul	edx, 14h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46AA57:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_46AA00 endp

align 10h


; Attributes: bp-based frame

sub_46AA70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46AAB5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46F0E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46AAB5:
mov	esp, ebp
pop	ebp
retn
sub_46AA70 endp

align 10h


; Attributes: bp-based frame

sub_46AAC0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_C]
mov	eax, [edx]
push	eax		; void *
call	sub_470060
add	esp, 0Ch
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn	8
sub_46AAC0 endp

align 10h


; Attributes: bp-based frame

sub_46AAF0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_5E37E0
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_18]
mov	[eax+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_46AAF0 endp

align 10h


; Attributes: bp-based frame

sub_46AB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_46ABA5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_46F720
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_46ABA5:
mov	esp, ebp
pop	ebp
retn
sub_46AB60 endp

align 10h


; Attributes: bp-based frame

sub_46ABB0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_10]
sar	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_46ABEA

loc_46ABE1:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_46ABEA:
cmp	[ebp+var_C], 0
jle	short loc_46AC10
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_479400
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_14], eax
jmp	short loc_46ABE1

loc_46AC10:
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
push	0
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_478600
add	esp, 0Ch
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46ABB0 endp

align 10h


; Attributes: bp-based frame

sub_46AC50 proc	near

var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_62=	byte ptr -62h
var_61=	byte ptr -61h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
jmp	short loc_46AC8B

loc_46AC79:
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
add	edx, 0Ch
mov	[ebp+var_C], edx

loc_46AC8B:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_46ACB9
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_46ACB9
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_4700C0
add	esp, 4
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_4700F0
add	esp, 8
jmp	short loc_46AC79

loc_46ACB9:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_46ACDA
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_51C900
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_61], dl
jmp	short loc_46AD15

loc_46ACDA:
jmp	short loc_46ACEE

loc_46ACDC:
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
mov	[ebp+var_C], ecx

loc_46ACEE:
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_8]
jz	short loc_46AD0D
xor	eax, eax
mov	[ebp+var_62], al
mov	ecx, [ebp+var_C]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_4700F0
add	esp, 8
jmp	short loc_46ACDC

loc_46AD0D:
xor	eax, eax
mov	[ebp+var_95], al

loc_46AD15:
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46AC50 endp

align 10h


; Attributes: bp-based frame

sub_46AD30 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_10]
sar	edx, 2
mov	[ebp+var_C], edx
jmp	short loc_46AD6A

loc_46AD61:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_46AD6A:
cmp	[ebp+var_C], 0
jle	short loc_46AD90
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_41EAC0
mov	edx, [ebp+var_10]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax
jmp	short loc_46AD61

loc_46AD90:
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
push	0
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_478650
add	esp, 0Ch
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46AD30 endp

align 10h


; Attributes: bp-based frame

sub_46ADD0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jb	short loc_46ADF7
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+4]
jnb	short loc_46ADF7
mov	[ebp+var_28], 1
jmp	short loc_46ADFE

loc_46ADF7:
mov	[ebp+var_28], 0

loc_46ADFE:
movzx	ecx, byte ptr [ebp+var_28]
test	ecx, ecx
jz	short loc_46AE47
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_1C]
call	sub_403850
mov	eax, [ebp+arg_4]
mov	ecx, [eax+18h]
mov	[ebp+var_4], ecx
xor	edx, edx
mov	[ebp+var_1D], dl
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
lea	edx, [ebp+var_1D]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_46C2C0
lea	ecx, [ebp+var_1C]
call	sub_407910
jmp	short loc_46AE69

loc_46AE47:
xor	edx, edx
mov	[ebp+var_1E], dl
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
lea	edx, [ebp+var_1E]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_46C2C0

loc_46AE69:
mov	esp, ebp
pop	ebp
retn	14h
sub_46ADD0 endp

align 10h


; Attributes: bp-based frame

sub_46AE70 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5269E0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 8
push	eax		; void *
call	sub_4786A0
add	esp, 0Ch
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_46AE70 endp

align 10h


; Attributes: bp-based frame

sub_46AEC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
add	edx, 24h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_46D060
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_46AEC0 endp

align 10h


; Attributes: bp-based frame

sub_46AF60 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
push	edi
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_10]
sar	edx, 2
mov	[ebp+var_C], edx
jmp	short loc_46AF9B

loc_46AF92:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_46AF9B:
cmp	[ebp+var_C], 0
jle	short loc_46AFC1
mov	ecx, [ebp+var_10]
push	ecx
mov	edi, [ebp+var_14]
call	sub_418760
mov	edx, [ebp+var_10]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax
jmp	short loc_46AF92

loc_46AFC1:
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
push	0
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_478650
add	esp, 0Ch
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
pop	edi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46AF60 endp

align 10h


; Attributes: bp-based frame

sub_46B000 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], (offset loc_A3D707+3)
jbe	short loc_46B026
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_46B026:
cmp	[ebp+arg_0], 0
jz	short loc_46B04F
mov	eax, [ebp+arg_0]
imul	eax, 190h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_46B056

loc_46B04F:
mov	[ebp+var_C], 0

loc_46B056:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_46B000 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_46B060 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 3FFFFFFFh
jbe	short loc_46B086
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_46B086:
cmp	[ebp+arg_0], 0
jz	short loc_46B0A9
mov	eax, [ebp+arg_0]
shl	eax, 2
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
jmp	short loc_46B0AB

loc_46B0A9:
xor	eax, eax

loc_46B0AB:
mov	esp, ebp
pop	ebp
retn	8
sub_46B060 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_46B0C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	edx, [eax]
mov	ecx, [ebp+var_8]
mov	eax, [edx+4]
call	eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_41EAC0
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4713C0
mov	esp, ebp
pop	ebp
retn	4
sub_46B0C0 endp

align 10h


; Attributes: bp-based frame

sub_46B100 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, word ptr [eax+0Ah]
cmp	[ebp+arg_0], ecx
jb	short loc_46B13C
mov	edx, [ebp+arg_0]
add	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+0Ah], dx
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx], 0
jz	short loc_46B13A
mov	edx, [ebp+var_4]
mov	ax, [edx+0Ch]
add	ax, 1
mov	ecx, [ebp+var_4]
mov	[ecx+0Ch], ax

loc_46B13A:
jmp	short loc_46B188

loc_46B13C:
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx], 0
jz	short loc_46B167
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
cmp	dword ptr [ecx+edx*4], 0
jnz	short loc_46B165
mov	eax, [ebp+var_4]
mov	cx, [eax+0Ch]
add	cx, 1
mov	edx, [ebp+var_4]
mov	[edx+0Ch], cx

loc_46B165:
jmp	short loc_46B188

loc_46B167:
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
cmp	dword ptr [ecx+edx*4], 0
jz	short loc_46B188
mov	eax, [ebp+var_4]
mov	cx, [eax+0Ch]
sub	cx, 1
mov	edx, [ebp+var_4]
mov	[edx+0Ch], cx

loc_46B188:
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	eax, [eax]
mov	[ecx+edx*4], eax
mov	esp, ebp
pop	ebp
retn	8
sub_46B100 endp

align 10h


; Attributes: bp-based frame

sub_46B1A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
movzx	ecx, word ptr [eax+0Ah]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
movzx	eax, word ptr [edx+8]
cmp	[ebp+var_C], eax
jb	short loc_46B1D2
mov	ecx, [ebp+var_10]
movzx	edx, word ptr [ecx+0Eh]
add	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_10]
call	sub_479BC0

loc_46B1D2:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_46B100
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_46B1A0 endp

align 10h


; Attributes: bp-based frame

sub_46B1F0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
movzx	ecx, word ptr [eax+0Ah]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
movzx	eax, word ptr [edx+8]
cmp	[ebp+var_60], eax
jb	short loc_46B222
mov	ecx, [ebp+var_64]
movzx	edx, word ptr [ecx+0Eh]
add	edx, [ebp+var_60]
push	edx
mov	ecx, [ebp+var_64]
call	sub_479D10

loc_46B222:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
push	ecx
mov	ecx, [ebp+var_64]
call	sub_479F90
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn	4
sub_46B1F0 endp

align 10h


; Attributes: bp-based frame

sub_46B240 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= word ptr	-4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_4], ax
jmp	short loc_46B25D

loc_46B251:
mov	cx, [ebp+var_4]
add	cx, 1
mov	[ebp+var_4], cx

loc_46B25D:
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_14]
movzx	ecx, word ptr [eax+0Ah]
cmp	edx, ecx
jge	short loc_46B2CD
push	0
lea	ecx, [ebp+var_8]
call	sub_418670
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
lea	edx, [ecx+edx*4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_46B2C3
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_46B2A7
mov	ecx, [ebp+var_C]
mov	ecx, [ecx]
call	sub_40AA90

loc_46B2A7:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_46B2C3
mov	eax, [ebp+var_C]
mov	ecx, [eax]
call	sub_40AA80

loc_46B2C3:
lea	ecx, [ebp+var_8]
call	sub_429100
jmp	short loc_46B251

loc_46B2CD:
xor	ecx, ecx
mov	edx, [ebp+var_14]
mov	[edx+0Ah], cx
xor	eax, eax
mov	ecx, [ebp+var_14]
mov	[ecx+0Ch], ax
mov	esp, ebp
pop	ebp
retn
sub_46B240 endp

align 10h


; Attributes: bp-based frame

sub_46B2F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	esp, ebp
pop	ebp
retn	4
sub_46B2F0 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION unknown_libname_3. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_46B330 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	esp, ebp
pop	ebp
retn	4
sub_46B330 endp

align 10h


; Attributes: bp-based frame

sub_46B350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_46B387
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_46B387
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax

loc_46B387:
mov	esp, ebp
pop	ebp
retn
sub_46B350 endp

align 10h


; Attributes: bp-based frame

sub_46B390 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_14]
call	sub_444AA0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_46B3E6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_46B390
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_46B3E6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_46B3F5:
cmp	[ebp+arg_0], 0
jz	short loc_46B462
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_14]
call	sub_444AA0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_46B451
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_14]
call	sub_46B390
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_46B451:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_46B3F5

loc_46B462:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_46B390 endp

align 10h


; Attributes: bp-based frame

sub_46B470 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_46B547
mov	ecx, [ebp+var_14]
call	sub_4393E0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_46B4D0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_46B547

loc_46B4D0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_46B390
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_46B4F8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_46B50C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_46B4F8

loc_46B50C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_46B51E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_46B532
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_46B51E

loc_46B532:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_46B547:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_46B470 endp



; Attributes: bp-based frame

sub_46B550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_46B569
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA90

loc_46B569:
mov	esp, ebp
pop	ebp
retn
sub_46B550 endp

align 10h


; Attributes: bp-based frame

sub_46B570 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46B581:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_46B5B9
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_46B5B7
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46B5B7:
jmp	short loc_46B581

loc_46B5B9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_46B570 endp

align 10h


; Attributes: bp-based frame

sub_46B5D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_46B5F1
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_46B5F1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_46B5D0 endp

align 10h


; Attributes: bp-based frame

sub_46B600 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_74=	dword ptr -74h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
cmp	eax, [ebp+arg_0]
jz	loc_46B786
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_46B660:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_99], cl
movzx	edx, [ebp+var_99]
test	edx, edx
jz	short loc_46B6EB
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_46B6EB
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	[ecx+8], eax
jmp	loc_46B660

loc_46B6EB:
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_46B72C
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_98]
call	sub_490040
jmp	short loc_46B786

loc_46B72C:
lea	edx, [ebp+var_8C]
mov	[ebp+var_68], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	eax, [ebp+var_10]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_90], ecx
xor	edx, edx
mov	[ebp+var_69], dl
lea	eax, [ebp+var_69]
push	eax
mov	ecx, [ebp+var_94]
push	ecx
mov	edx, [ebp+var_90]
push	edx
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_47A470

loc_46B786:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_46B600 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46B7A0(void	*)
sub_46B7A0 proc	near

var_40=	dword ptr -40h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx

loc_46B7A9:
cmp	[ebp+arg_0], 0
jz	short loc_46B7F9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_40]
call	sub_46B7A0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_471C40
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46B7F1
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46B7F1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46B7A9

loc_46B7F9:
mov	esp, ebp
pop	ebp
retn	4
sub_46B7A0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46B800(void	*)
sub_46B800 proc	near

var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx

loc_46B809:
cmp	[ebp+arg_0], 0
jz	short loc_46B85C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_18]
call	sub_46B800
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_47EA80
cmp	[ebp+arg_0], 0
jz	short loc_46B854
mov	edx, 1
imul	edx, 5Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46B854:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46B809

loc_46B85C:
mov	esp, ebp
pop	ebp
retn	4
sub_46B800 endp

align 10h


; Attributes: bp-based frame

sub_46B870 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_46BA94
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_46B94F
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_510100
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_51EF50
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_98]
call	sub_50F2B0
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 0Ch
mov	eax, [ebp+var_98]
add	edx, [eax]
mov	ecx, [ebp+var_98]
mov	[ecx+8], edx
jmp	loc_46BA7D

loc_46B94F:
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_46B9BD
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_70]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
xor	edx, edx
mov	[ebp+var_71], dl
jmp	loc_46BA7D

loc_46B9BD:
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_98]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
call	sub_406610
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+var_8C]
push	edx
call	sub_407C50
add	esp, 0Ch

loc_46BA7D:
mov	eax, [ebp+var_4]
imul	eax, 0Ch
mov	ecx, [ebp+var_98]
add	eax, [ecx]
mov	edx, [ebp+var_98]
mov	[edx+4], eax

loc_46BA94:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_46B870 endp



; Attributes: bp-based frame

; int __stdcall	sub_46BAA0(void	*)
sub_46BAA0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46BAA9:
cmp	[ebp+arg_0], 0
jz	short loc_46BAF9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46BAA0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_472160
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46BAF1
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46BAF1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46BAA9

loc_46BAF9:
mov	esp, ebp
pop	ebp
retn	4
sub_46BAA0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46BB00(void	*)
sub_46BB00 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_46BB09:
cmp	[ebp+arg_0], 0
jz	short loc_46BB59
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_46BB00
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_472670
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46BB51
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46BB51:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46BB09

loc_46BB59:
mov	esp, ebp
pop	ebp
retn	4
sub_46BB00 endp

align 10h


; Attributes: bp-based frame

sub_46BB60 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_55=	word ptr -55h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5E75C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5D6180
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 4
mov	[ebp+var_40], edx
jmp	short loc_46BBDE

loc_46BBD5:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_46BBDE:
cmp	[ebp+var_40], 0
jle	short loc_46BC08
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_47F0F0
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 10h
mov	[ebp+var_3C], ecx
jmp	short loc_46BBD5

loc_46BC08:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_46BC49
xor	eax, eax
mov	byte ptr [ebp+var_55+1], al
mov	cl, byte ptr [ebp+var_55+1]
mov	[ebp+var_52], cl
xor	edx, edx
mov	byte ptr [ebp+var_55], dl
mov	al, byte ptr [ebp+var_55]
mov	[ebp+var_53], al
lea	ecx, [ebp+var_53]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_4804D0
add	esp, 0Ch
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_C], ecx
jmp	short loc_46BC99

loc_46BC49:
mov	edx, [ebp+arg_C]
shl	edx, 4
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 4
mov	[ebp+var_6C], ecx
jmp	short loc_46BC7B

loc_46BC69:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 10h
mov	[ebp+var_68], eax

loc_46BC7B:
cmp	[ebp+var_6C], 0
jle	short loc_46BC93
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_47F0F0
add	esp, 8
jmp	short loc_46BC69

loc_46BC93:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_46BC99:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_46BD2C
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 4
mov	[ebp+var_80], eax
jmp	short loc_46BCF3

loc_46BCEA:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_46BCF3:
cmp	[ebp+var_80], 0
jle	short loc_46BD26
mov	edx, [ebp+var_8C]
push	edx		; int
mov	eax, [ebp+var_7C]
push	eax		; void *
call	sub_47F0F0
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 10h
mov	[ebp+var_7C], edx
jmp	short loc_46BCEA

loc_46BD26:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_46BD2C:
mov	ecx, [ebp+var_CC]
call	sub_470440
mov	ecx, [ebp+var_4]
shl	ecx, 4
add	ecx, [ebp+var_8]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C8]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_46BB60 endp

align 10h


; Attributes: bp-based frame

sub_46BD80 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_46BDE1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_46BDC2
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4727D0
jmp	short loc_46BDE1

loc_46BDC2:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4726D0

loc_46BDE1:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46BD80 endp

align 10h


; Attributes: bp-based frame

sub_46BDF0 proc	near

var_80=	dword ptr -80h
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_80], ecx
cmp	[ebp+arg_4], 0
jz	short loc_46BE5E
mov	eax, [ebp+var_80]
mov	ecx, [ebp+var_80]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_46BE3A
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_80]
call	sub_472BB0
jmp	short loc_46BE5E

loc_46BE3A:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_80]
call	sub_470B40

loc_46BE5E:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46BDF0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46BE70(void	*)
sub_46BE70 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46BE79:
cmp	[ebp+arg_0], 0
jz	short loc_46BEC9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46BE70
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_472CF0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46BEC1
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46BEC1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46BE79

loc_46BEC9:
mov	esp, ebp
pop	ebp
retn	4
sub_46BE70 endp

align 10h


; Attributes: bp-based frame

sub_46BED0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_46BEEC:
cmp	[ebp+var_10], 0
jz	short loc_46BF33
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_46BF22
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_46BF2B

loc_46BF22:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_46BF2B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_46BEEC

loc_46BF33:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_46BFD5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_46BFC6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DD1E0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_46C04B
jmp	short loc_46BFD5

loc_46BFC6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_46BFD5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_46C030
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DD1E0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_46C04B

loc_46C030:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_46C04B:
mov	esp, ebp
pop	ebp
retn	8
sub_46BED0 endp

align 10h


; Attributes: bp-based frame

sub_46C060 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_46C0C6
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_46C0A2
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_472F30
jmp	short loc_46C0C6

loc_46C0A2:
xor	edx, edx
mov	byte ptr [ebp+var_3+1],	dl
xor	eax, eax
mov	byte ptr [ebp+var_3], al
push	0
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_3]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_472D30

loc_46C0C6:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46C060 endp

align 10h


; Attributes: bp-based frame

sub_46C0D0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46C0E1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_46C123
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_46FB30
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_46C121
mov	ecx, 1
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46C121:
jmp	short loc_46C0E1

loc_46C123:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_46C0D0 endp

align 10h


; Attributes: bp-based frame

sub_46C140 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_46C17F

loc_46C16E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_46C17F:
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_99], dl
movzx	eax, [ebp+var_99]
test	eax, eax
jz	short loc_46C1C4
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_46C1C4
jmp	short loc_46C16E

loc_46C1C4:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_46C1FE
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_470510
jmp	short loc_46C226

loc_46C1FE:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4]
push	edx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_4704B0

loc_46C226:
mov	esp, ebp
pop	ebp
retn	8
sub_46C140 endp

align 10h


; Attributes: bp-based frame

sub_46C230 proc	near

var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 30h
lea	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_2C]
mov	[ebp+var_14], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_14]
call	sub_4046E0

loc_46C258:
lea	edx, [ebp+var_20]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_20]
setnz	cl
mov	[ebp+var_2D], cl
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_46C2A9
mov	eax, [ebp+var_2C]
add	eax, 8
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_C]
mov	eax, [ecx+4]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_46C2A9
lea	eax, [ebp+var_2C]
call	sub_405E90
jmp	short loc_46C258

loc_46C2A9:
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_46C230 endp

align 10h


; Attributes: bp-based frame

sub_46C2C0 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_10=	word ptr -10h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_470590
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_DC]
add	ecx, 8
call	sub_4706F0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_4D], al
mov	ecx, [ebp+var_8]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx]
mov	[ebp+var_48], eax
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_48]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_38], eax
jmp	short loc_46C33D

loc_46C334:
mov	edx, [ebp+var_38]
sub	edx, 1
mov	[ebp+var_38], edx

loc_46C33D:
cmp	[ebp+var_38], 0
jle	short loc_46C367
mov	eax, [ebp+var_48]
push	eax		; int
mov	ecx, [ebp+var_4C]
push	ecx		; void *
call	sub_47AA60
add	esp, 8
mov	edx, [ebp+var_48]
add	edx, 1Ch
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
add	eax, 1Ch
mov	[ebp+var_4C], eax
jmp	short loc_46C334

loc_46C367:
mov	ecx, [ebp+var_4C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_46C38E
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5C9FC0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
mov	[ebp+var_C], ecx
jmp	short loc_46C3E3

loc_46C38E:
mov	edx, [ebp+arg_C]
imul	edx, 1Ch
add	edx, [ebp+var_C]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_64], eax
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_46C3C5

loc_46C3B3:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx
mov	eax, [ebp+var_64]
add	eax, 1Ch
mov	[ebp+var_64], eax

loc_46C3C5:
cmp	[ebp+var_68], 0
jle	short loc_46C3DD
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_64]
push	edx		; void *
call	sub_5C9FC0
add	esp, 8
jmp	short loc_46C3B3

loc_46C3DD:
mov	eax, [ebp+var_5C]
mov	[ebp+var_C], eax

loc_46C3E3:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_46C41B
xor	edx, edx
mov	byte ptr [ebp+var_10+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_10], al
lea	ecx, [ebp+var_10+1]
push	ecx
movzx	edx, byte ptr [ebp+var_10]
push	edx
mov	eax, [ebp+var_C]
push	eax		; void *
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_473220
add	esp, 14h
mov	[ebp+var_C], eax

loc_46C41B:
mov	ecx, [ebp+var_DC]
call	sub_470670
mov	ecx, [ebp+var_4]
imul	ecx, 1Ch
add	ecx, [ebp+var_8]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_D8]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_46C2C0 endp

align 10h


; Attributes: bp-based frame

sub_46C470 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_46C48C:
cmp	[ebp+var_10], 0
jz	short loc_46C4D6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_46C4C5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_46C4CE

loc_46C4C5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_46C4CE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_46C48C

loc_46C4D6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_46C578
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_46C569
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_473290
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_46C5F1
jmp	short loc_46C578

loc_46C569:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_46C578:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_46C5D6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_473290
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_46C5F1

loc_46C5D6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_46C5F1:
mov	esp, ebp
pop	ebp
retn	8
sub_46C470 endp

align 10h


; Attributes: bp-based frame

sub_46C600 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46C611:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_14]
jz	short loc_46C653
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_495460
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_46C651
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46C651:
jmp	short loc_46C611

loc_46C653:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_46C600 endp

align 10h


; Attributes: bp-based frame

sub_46C670 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_46C6AF

loc_46C69E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_46C6AF:
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_99], dl
movzx	eax, [ebp+var_99]
test	eax, eax
jz	short loc_46C6F4
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_46C6F4
jmp	short loc_46C69E

loc_46C6F4:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_46C72E
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_4707D0
jmp	short loc_46C756

loc_46C72E:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4]
push	edx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_470770

loc_46C756:
mov	esp, ebp
pop	ebp
retn	8
sub_46C670 endp

align 10h


; Attributes: bp-based frame

sub_46C760 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_46C79F

loc_46C78E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_46C79F:
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_99], dl
movzx	eax, [ebp+var_99]
test	eax, eax
jz	short loc_46C7E4
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_46C7E4
jmp	short loc_46C78E

loc_46C7E4:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_46C81E
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_4708B0
jmp	short loc_46C846

loc_46C81E:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4]
push	edx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_470850

loc_46C846:
mov	esp, ebp
pop	ebp
retn	8
sub_46C760 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46C850(void	*)
sub_46C850 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46C859:
cmp	[ebp+arg_0], 0
jz	short loc_46C8A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46C850
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_46FF20
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46C8A1
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46C8A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46C859

loc_46C8A9:
mov	esp, ebp
pop	ebp
retn	4
sub_46C850 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46C8B0(void	*)
sub_46C8B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46C8B9:
cmp	[ebp+arg_0], 0
jz	short loc_46C909
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46C8B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_46FF50
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46C901
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46C901:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46C8B9

loc_46C909:
mov	esp, ebp
pop	ebp
retn	4
sub_46C8B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46C910(void	*)
sub_46C910 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46C919:
cmp	[ebp+arg_0], 0
jz	short loc_46C969
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46C910
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_46FD70
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46C961
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46C961:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46C919

loc_46C969:
mov	esp, ebp
pop	ebp
retn	4
sub_46C910 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46C970(void	*)
sub_46C970 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46C979:
cmp	[ebp+arg_0], 0
jz	short loc_46C9C9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46C970
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_474E20
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46C9C1
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46C9C1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46C979

loc_46C9C9:
mov	esp, ebp
pop	ebp
retn	4
sub_46C970 endp

align 10h


; Attributes: bp-based frame

sub_46C9D0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46C9E1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_46CA23
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_46FB90
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_46CA21
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46CA21:
jmp	short loc_46C9E1

loc_46CA23:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_46C9D0 endp

align 10h


; Attributes: bp-based frame

sub_46CA40 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46CA51:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_46CA96
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_474E50
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_46CA94
mov	ecx, 1
imul	ecx, 84h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46CA94:
jmp	short loc_46CA51

loc_46CA96:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_46CA40 endp

align 10h


; Attributes: bp-based frame

sub_46CAB0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_46CACC:
cmp	[ebp+var_10], 0
jz	short loc_46CB16
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_46CB05
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_46CB0E

loc_46CB05:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_46CB0E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_46CACC

loc_46CB16:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_46CBB8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_46CBA9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_474E80
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_46CC31
jmp	short loc_46CBB8

loc_46CBA9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_46CBB8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_46CC16
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_474E80
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_46CC31

loc_46CC16:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_46CC31:
mov	esp, ebp
pop	ebp
retn	8
sub_46CAB0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46CC40(void	*)
sub_46CC40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46CC49:
cmp	[ebp+arg_0], 0
jz	short loc_46CC99
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46CC40
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4755E0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46CC91
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46CC91:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46CC49

loc_46CC99:
mov	esp, ebp
pop	ebp
retn	4
sub_46CC40 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46CCA0(void	*)
sub_46CCA0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46CCA9:
cmp	[ebp+arg_0], 0
jz	short loc_46CCF9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46CCA0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_46FF80
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46CCF1
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46CCF1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46CCA9

loc_46CCF9:
mov	esp, ebp
pop	ebp
retn	4
sub_46CCA0 endp

align 10h


; Attributes: bp-based frame

sub_46CD00 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_46CD66
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_46CD42
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_475CD0
jmp	short loc_46CD66

loc_46CD42:
xor	edx, edx
mov	byte ptr [ebp+var_3+1],	dl
xor	eax, eax
mov	byte ptr [ebp+var_3], al
push	0
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_3]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_475AD0

loc_46CD66:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46CD00 endp

align 10h


; Attributes: bp-based frame

sub_46CD70 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_141= byte ptr -141h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_124= dword ptr -124h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	byte ptr -0FCh
var_F1=	byte ptr -0F1h
var_F0=	byte ptr -0F0h
var_C5=	byte ptr -0C5h
var_C4=	byte ptr -0C4h
var_9C=	byte ptr -9Ch
var_74=	byte ptr -74h
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_46CD70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 140h
mov	[ebp+var_140], ecx
mov	[ebp+var_100], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_140]
call	sub_47F200
mov	[ebp+var_104], eax
mov	ecx, [ebp+var_104]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_140]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_10C]
mov	[ebp+var_108], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_108]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_10C]
setz	al
mov	[ebp+var_141], al
movzx	ecx, [ebp+var_141]
test	ecx, ecx
jnz	short loc_46CE79
or	[ebp+var_100], 1
lea	ecx, [ebp+var_49]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_48]
call	sub_407810
or	[ebp+var_100], 2
or	[ebp+var_100], 4
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_110], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_140]
call	sub_444000
mov	[ebp+var_124], eax
mov	edx, [ebp+var_110]
push	edx
lea	eax, [ebp+var_48]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_46CE79
mov	[ebp+var_148], 0
jmp	short loc_46CE83

loc_46CE79:
mov	[ebp+var_148], 1

loc_46CE83:
mov	dl, byte ptr [ebp+var_148]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_100]
and	eax, 4
jz	short loc_46CEA3
and	[ebp+var_100], 0FFFFFFFBh
call	nullsub_1

loc_46CEA3:
mov	ecx, [ebp+var_100]
and	ecx, 2
jz	short loc_46CEBD
and	[ebp+var_100], 0FFFFFFFDh
lea	ecx, [ebp+var_48]
call	sub_407E50

loc_46CEBD:
mov	edx, [ebp+var_100]
and	edx, 1
jz	short loc_46CED7
and	[ebp+var_100], 0FFFFFFFEh
lea	ecx, [ebp+var_49]
call	nullsub_1

loc_46CED7:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_46CFE8
lea	ecx, [ebp+var_F1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_F0]
call	sub_407810
lea	ecx, [ebp+var_C5]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_C4]
call	sub_402390
mov	[ebp+var_12C], eax
lea	edx, [ebp+var_F0]
push	edx
lea	ecx, [ebp+var_9C]
call	sub_403400
mov	[ebp+var_4], 0
mov	eax, [ebp+var_12C]
push	eax
lea	ecx, [ebp+var_74]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_13C]
mov	[ebp+var_130], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_130]
call	sub_4046E0
lea	edx, [ebp+var_9C]
push	edx
push	ecx
mov	[ebp+var_138], esp
mov	ecx, [ebp+var_13C]
mov	eax, [ebp+var_138]
call	sub_4046E0
lea	eax, [ebp+var_FC]
push	eax
mov	ecx, [ebp+var_140]
call	sub_448E70
lea	ecx, [ebp+var_FC]
mov	[ebp+var_14C], ecx
mov	edx, [ebp+var_14C]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_9C]
push	ecx
call	sub_405CD0
lea	ecx, [ebp+var_C4]
call	sub_407E50
lea	ecx, [ebp+var_C5]
call	nullsub_1
lea	ecx, [ebp+var_F0]
call	sub_407E50
lea	ecx, [ebp+var_F1]
call	nullsub_1

loc_46CFE8:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46CD70 endp

align 10h


; Attributes: bp-based frame

sub_46D000 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+20h], 0
jz	short loc_46D056
mov	ecx, [ebp+var_C]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_475FB0
mov	edx, [ebp+var_C]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+20h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_46D056
mov	eax, [ebp+var_8]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_46D056:
mov	esp, ebp
pop	ebp
retn
sub_46D000 endp

align 10h


; Attributes: bp-based frame

sub_46D060 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	[ebp+var_18], 80h
mov	eax, [ebp+arg_0]
shr	eax, 1
add	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_10], ecx
mov	[ebp+var_14], 8
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_14]
push	eax
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_40]
mov	edx, [eax]
mov	[ecx+24h], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
push	ecx
mov	ecx, [ebp+var_40]
add	ecx, 20h
call	sub_5A9600
mov	edx, [ebp+var_40]
mov	[edx+20h], eax
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_40]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_40]
call	sub_475F60
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_2C], 80h
mov	eax, 2
imul	eax, 30h
mov	ecx, [ebp+var_40]
add	eax, [ecx+4]
mov	edx, [ebp+var_40]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
sub	eax, 4
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_40]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_30], 80h
mov	ecx, 2
imul	ecx, 30h
mov	edx, [ebp+var_34]
add	ecx, [edx+4]
mov	eax, [ebp+var_34]
mov	[eax+8], ecx
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ecx], eax
mov	[ebp+var_3C], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 2
div	ecx
imul	edx, 30h
mov	eax, [ebp+var_40]
add	edx, [eax+14h]
mov	ecx, [ebp+var_40]
mov	[ecx+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_46D060 endp

align 10h


; Attributes: bp-based frame

sub_46D1A0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_28]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_46D1D8
push	0
push	1
mov	ecx, [ebp+var_28]
call	sub_476010

loc_46D1D8:
mov	[ebp+var_4], 80h
push	2
mov	ecx, [ebp+var_28]
add	ecx, 24h
call	sub_49CAE0
mov	ecx, [ebp+var_28]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_28]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_46FFC0
add	esp, 8
mov	eax, [ebp+var_28]
mov	ecx, [eax+1Ch]
add	ecx, 4
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
add	edx, 10h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_1C], 80h
mov	edx, 2
imul	edx, 30h
mov	eax, [ebp+var_20]
add	edx, [eax+4]
mov	ecx, [ebp+var_20]
mov	[ecx+8], edx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_28]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46D1A0 endp

align 10h


; Attributes: bp-based frame

sub_46D260 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_18]
mov	ecx, [eax+14h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_46D294
mov	edx, 2
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46D294:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
sub	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_C], 80h
mov	eax, 2
imul	eax, 30h
mov	ecx, [ebp+var_10]
add	eax, [ecx+4]
mov	edx, [ebp+var_10]
mov	[edx+8], eax
mov	eax, [ebp+var_18]
mov	ecx, [eax+18h]
sub	ecx, 30h
mov	edx, [ebp+var_18]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn
sub_46D260 endp

align 10h


; Attributes: bp-based frame

sub_46D2F0 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+8], 0
jz	short loc_46D327
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_46D327
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	eax, [edx]
push	eax
call	sub_76FFA0
add	esp, 10h

loc_46D327:
pop	ebp
retn
sub_46D2F0 endp

align 10h


; Attributes: bp-based frame

sub_46D330 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+8], 0
jz	short loc_46D367
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_46D367
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	eax, [edx]
push	eax
call	sub_770170
add	esp, 10h

loc_46D367:
pop	ebp
retn
sub_46D330 endp

align 10h


; Attributes: bp-based frame

sub_46D370 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_74=	byte ptr -74h
var_68=	byte ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C8h
push	esi
push	edi
mov	[ebp+var_BC], ecx
mov	[ebp+var_98], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_5E9440
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_BC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_A4]
mov	[ebp+var_A0], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_A0]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_A4]
setz	al
mov	[ebp+var_BD], al
movzx	ecx, [ebp+var_BD]
test	ecx, ecx
jnz	loc_46D497
or	[ebp+var_98], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_BC]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_A8]
mov	[ebp+var_C4], edx
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ebp+var_C8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_46D476
jb	short loc_46D46A
mov	ecx, [ebp+var_C4]
mov	edx, [ebp+var_C8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_46D476

loc_46D46A:
mov	[ebp+var_CC], 1
jmp	short loc_46D480

loc_46D476:
mov	[ebp+var_CC], 0

loc_46D480:
movzx	ecx, byte ptr [ebp+var_CC]
test	ecx, ecx
jnz	short loc_46D497
mov	[ebp+var_D0], 0
jmp	short loc_46D4A1

loc_46D497:
mov	[ebp+var_D0], 1

loc_46D4A1:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_98]
and	eax, 1
jz	short loc_46D4CA
and	[ebp+var_98], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46D4CA:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_46D5CA
mov	edx, dword_1889A64
mov	[ebp+var_8C], edx
mov	eax, dword_1889A68
mov	[ebp+var_88], eax
mov	ecx, dword_1889A6C
mov	[ebp+var_84], ecx
lea	edx, [ebp+var_80]
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
lea	ecx, [ebp+var_74]
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
lea	eax, [ebp+var_68]
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_5C], eax
mov	ecx, [edx+4]
mov	[ebp+var_58], ecx
lea	edi, [ebp+var_54]
mov	ecx, 0Ch
lea	esi, [ebp+var_8C]
rep movsd
lea	edx, [ebp+var_B8]
mov	[ebp+var_AC], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_AC]
call	sub_4046E0
lea	eax, [ebp+var_5C]
push	eax
push	ecx
mov	[ebp+var_B4], esp
mov	ecx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
call	sub_4046E0
lea	ecx, [ebp+var_94]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_4733D0
lea	edx, [ebp+var_94]
mov	[ebp+var_D4], edx
mov	eax, [ebp+var_D4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_46D5CA:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_46D370 endp

align 10h


; Attributes: bp-based frame

sub_46D5F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
lea	eax, [ebp+var_1]
push	eax
call	sub_4761F0
add	esp, 8
movzx	ecx, byte ptr [eax]
push	ecx
sub	esp, 8
mov	[ebp+var_20], esp
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+var_20]
add	ecx, 4
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_C]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_2C]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	edx, [ebp+arg_0]
push	edx
call	sub_476210
add	esp, 20h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_46D5F0 endp

align 10h


; Attributes: bp-based frame

sub_46D680 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_46D6AF
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_46D6AF:
cmp	[ebp+arg_8], 0
jz	short loc_46D6BD
mov	ecx, [ebp+arg_8]
call	sub_40AA90

loc_46D6BD:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_46D680 endp

align 10h


; Attributes: bp-based frame

sub_46D6D0 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
lea	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_28]
mov	[ebp+var_14], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_14]
call	sub_4046E0

loc_46D6F8:
lea	edx, [ebp+var_20]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_28]
xor	ecx, ecx
cmp	eax, [ebp+var_20]
setnz	cl
mov	[ebp+var_29], cl
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_46D736
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_C]
mov	edx, [eax+8]
cmp	edx, [ecx]
jz	short loc_46D736
lea	eax, [ebp+var_28]
call	sub_405E90
jmp	short loc_46D6F8

loc_46D736:
mov	ecx, [ebp+var_28]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_46D6D0 endp

align 10h


; Attributes: bp-based frame

sub_46D750 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46D761:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_46D7A3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax
call	sub_475F30
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_46D7A1
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46D7A1:
jmp	short loc_46D761

loc_46D7A3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_46D750 endp

align 10h


; Attributes: bp-based frame

sub_46D7C0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	[ebp+var_44], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_74]
call	sub_5DE010
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_74]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_75], al
movzx	ecx, [ebp+var_75]
test	ecx, ecx
jnz	short loc_46D865
or	[ebp+var_44], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_74]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_46D865
mov	[ebp+var_7C], 0
jmp	short loc_46D86C

loc_46D865:
mov	[ebp+var_7C], 1

loc_46D86C:
mov	cl, byte ptr [ebp+var_7C]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_44]
and	edx, 1
jz	short loc_46D88C
and	[ebp+var_44], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46D88C:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_46D91E
xor	ecx, ecx
mov	[ebp+var_5C], ecx
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
lea	ecx, [ebp+var_5D]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_4899B0
lea	ecx, [ebp+var_34]
call	sub_471130
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_34]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_470DE0
lea	edx, [ebp+var_70]
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_2C]
push	eax
push	ecx
mov	[ebp+var_6C], esp
mov	ecx, [ebp+var_70]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	ecx, [ebp+var_40]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_473FB0
lea	edx, [ebp+var_40]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_28]
call	sub_46D750
lea	ecx, [ebp+var_34]
call	sub_46D750

loc_46D91E:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46D7C0 endp

align 10h


; Attributes: bp-based frame

sub_46D940 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
push	esi
mov	[ebp+var_64], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
call	sub_5DE010
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_65], al
movzx	ecx, [ebp+var_65]
test	ecx, ecx
jnz	short loc_46D9E6
or	[ebp+var_38], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_64]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_46D9E6
mov	[ebp+var_6C], 0
jmp	short loc_46D9ED

loc_46D9E6:
mov	[ebp+var_6C], 1

loc_46D9ED:
mov	cl, byte ptr [ebp+var_6C]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_38]
and	edx, 1
jz	short loc_46DA0D
and	[ebp+var_38], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46DA0D:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_46DA9E
xor	eax, eax
lea	esi, [ebp+var_2C]
call	sub_41DF90
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_24]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4C]
cmp	dword ptr [ecx], 0
jz	short loc_46DA50
mov	edx, [ebp+var_4C]
mov	ecx, [edx]
call	sub_40AA80

loc_46DA50:
lea	eax, [ebp+var_60]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	ecx, [ebp+var_28]
push	ecx
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_64]
call	sub_474480
lea	eax, [ebp+var_34]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	ecx, [ebp+var_24]
call	sub_429100
lea	ecx, [ebp+var_2C]
call	sub_429100

loc_46DA9E:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_46D940 endp

align 10h


; Attributes: bp-based frame

sub_46DAC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_46DAC0 endp

align 10h


; Attributes: bp-based frame

sub_46DAF0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_34=	dword ptr -34h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_70], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_70]
call	sub_47F360
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_71], al
movzx	ecx, [ebp+var_71]
test	ecx, ecx
jnz	short loc_46DB89
mov	eax, [ebp+arg_0]
call	sub_420D20
mov	[ebp+var_18], eax
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_70]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_18]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jnz	short loc_46DB89
mov	[ebp+var_78], 0
jmp	short loc_46DB90

loc_46DB89:
mov	[ebp+var_78], 1

loc_46DB90:
mov	al, byte ptr [ebp+var_78]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_40]
and	ecx, 1
jz	short loc_46DBA2
and	[ebp+var_40], 0FFFFFFFEh

loc_46DBA2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_46DC3D
mov	eax, [ebp+arg_0]
call	sub_420D20
mov	[ebp+var_34], eax
xor	eax, eax
mov	[ebp+var_58], eax
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
lea	eax, [ebp+var_59]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_4899B0
lea	ecx, [ebp+var_2C]
call	sub_471130
mov	ecx, [ebp+var_34]
mov	[ebp+var_24], ecx
lea	edx, [ebp+var_2C]
push	edx
lea	ecx, [ebp+var_20]
call	sub_470EA0
lea	eax, [ebp+var_6C]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	ecx, [ebp+var_24]
push	ecx
push	ecx
mov	[ebp+var_68], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_70]
call	sub_473AE0
lea	eax, [ebp+var_3C]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_20]
call	sub_46B570
lea	ecx, [ebp+var_2C]
call	sub_46B570

loc_46DC3D:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_46DAF0 endp

align 10h


; Attributes: bp-based frame

sub_46DC50 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	[ebp+var_44], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_74]
call	sub_5DE010
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_74]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_75], al
movzx	ecx, [ebp+var_75]
test	ecx, ecx
jnz	short loc_46DCF5
or	[ebp+var_44], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_74]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_46DCF5
mov	[ebp+var_7C], 0
jmp	short loc_46DCFC

loc_46DCF5:
mov	[ebp+var_7C], 1

loc_46DCFC:
mov	cl, byte ptr [ebp+var_7C]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_44]
and	edx, 1
jz	short loc_46DD1C
and	[ebp+var_44], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46DD1C:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_46DDAE
xor	ecx, ecx
mov	[ebp+var_5C], ecx
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
lea	ecx, [ebp+var_5D]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_4899B0
lea	ecx, [ebp+var_34]
call	sub_471130
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_34]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_470CA0
lea	edx, [ebp+var_70]
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_2C]
push	eax
push	ecx
mov	[ebp+var_6C], esp
mov	ecx, [ebp+var_70]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	ecx, [ebp+var_40]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_474950
lea	edx, [ebp+var_40]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_28]
call	sub_46C9D0
lea	ecx, [ebp+var_34]
call	sub_46C9D0

loc_46DDAE:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46DC50 endp

align 10h


; Attributes: bp-based frame

sub_46DDD0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_5DE010
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_5D], al
movzx	ecx, [ebp+var_5D]
test	ecx, ecx
jnz	short loc_46DE75
or	[ebp+var_38], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_5C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_46DE75
mov	[ebp+var_64], 0
jmp	short loc_46DE7C

loc_46DE75:
mov	[ebp+var_64], 1

loc_46DE7C:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_38]
and	edx, 1
jz	short loc_46DE9C
and	[ebp+var_38], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46DE9C:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_46DEF7
mov	[ebp+var_2C], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_58]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_58]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_5D9710
lea	ecx, [ebp+var_34]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_68]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_46DEF7:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46DDD0 endp

align 10h


; Attributes: bp-based frame

sub_46DF10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx]
fcomip	st, st(1)
fstp	st
jbe	short loc_46DF2E
mov	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
jmp	short loc_46DF34

loc_46DF2E:
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax

loc_46DF34:
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_46DF10 endp

align 10h


; Attributes: bp-based frame

sub_46DF50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fcomip	st, st(1)
fstp	st
jbe	short loc_46DF6E
mov	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
jmp	short loc_46DF74

loc_46DF6E:
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax

loc_46DF74:
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_46DF50 endp

align 10h


; Attributes: bp-based frame

sub_46DF90 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46DFA1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_46DFE3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_46FD70
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_46DFE1
mov	ecx, 1
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_46DFE1:
jmp	short loc_46DFA1

loc_46DFE3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_46DF90 endp

align 10h


; Attributes: bp-based frame

sub_46E000 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_60], ecx
mov	[ebp+var_3C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_5C7D40
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_48]
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_44]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_48]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jnz	short loc_46E091
or	[ebp+var_3C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_60]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_46E091
mov	[ebp+var_68], 0
jmp	short loc_46E098

loc_46E091:
mov	[ebp+var_68], 1

loc_46E098:
mov	cl, byte ptr [ebp+var_68]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_3C]
and	edx, 1
jz	short loc_46E0B2
and	[ebp+var_3C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_46E0B2:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_46E11A
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_5C]
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
push	ecx
mov	[ebp+var_58], esp
mov	ecx, [ebp+var_5C]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_60]
call	sub_476380
lea	edx, [ebp+var_38]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_46E11A:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_46E000 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46E130(void	*)
sub_46E130 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46E139:
cmp	[ebp+arg_0], 0
jz	short loc_46E17F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46E130
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_46E177
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46E177:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46E139

loc_46E17F:
mov	esp, ebp
pop	ebp
retn	4
sub_46E130 endp

align 10h


; Attributes: bp-based frame

sub_46E190 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_46E1A8:
cmp	[ebp+var_8], 0
jz	short loc_46E1ED
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_46E1E2
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_46E1EB

loc_46E1E2:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_46E1EB:
jmp	short loc_46E1A8

loc_46E1ED:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_476860
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_46E190 endp



; Attributes: bp-based frame

; int __stdcall	sub_46E210(void	*)
sub_46E210 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46E219:
cmp	[ebp+arg_0], 0
jz	short loc_46E269
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46E210
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_470030
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46E261
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46E261:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46E219

loc_46E269:
mov	esp, ebp
pop	ebp
retn	4
sub_46E210 endp

align 10h


; Attributes: bp-based frame

sub_46E270 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_6C], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5C7D40
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jnz	short loc_46E301
or	[ebp+var_38], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_6C]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_46E301
mov	[ebp+var_74], 0
jmp	short loc_46E308

loc_46E301:
mov	[ebp+var_74], 1

loc_46E308:
mov	cl, byte ptr [ebp+var_74]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_38]
and	edx, 1
jz	short loc_46E322
and	[ebp+var_38], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_46E322:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_46E3A5
lea	eax, [ebp+var_29]
call	nullsub_1
lea	ecx, [ebp+var_28]
push	ecx
call	sub_409500
mov	[ebp+var_58], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_58]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_470AD0
lea	edx, [ebp+var_68]
mov	[ebp+var_5C], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	eax, [ebp+var_20]
push	eax
push	ecx
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_4769A0
lea	edx, [ebp+var_34]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_1C]
call	sub_409540
lea	ecx, [ebp+var_28]
call	sub_409540
call	nullsub_1

loc_46E3A5:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_46E270 endp

align 10h


; Attributes: bp-based frame

sub_46E3C0 proc	near

var_58=	dword ptr -58h
var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_8]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	ecx, [ebp+var_58]
call	sub_476E80
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46E3C0 endp

align 10h


; Attributes: bp-based frame

sub_46E410 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
push	esi
mov	[ebp+var_70], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5E9440
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_71], al
movzx	ecx, [ebp+var_71]
test	ecx, ecx
jnz	short loc_46E4E4
or	[ebp+var_48], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_70]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_58]
mov	[ebp+var_78], edx
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_46E4C9
jb	short loc_46E4C0
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_7C]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_46E4C9

loc_46E4C0:
mov	[ebp+var_80], 1
jmp	short loc_46E4D0

loc_46E4C9:
mov	[ebp+var_80], 0

loc_46E4D0:
movzx	ecx, byte ptr [ebp+var_80]
test	ecx, ecx
jnz	short loc_46E4E4
mov	[ebp+var_84], 0
jmp	short loc_46E4EE

loc_46E4E4:
mov	[ebp+var_84], 1

loc_46E4EE:
mov	dl, byte ptr [ebp+var_84]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_48]
and	eax, 1
jz	short loc_46E511
and	[ebp+var_48], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46E511:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_46E5B2
xor	eax, eax
lea	esi, [ebp+var_3C]
call	sub_41DF90
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_34], eax
mov	ecx, [edx+4]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_3C]
mov	[eax], ecx
mov	edx, [ebp+var_5C]
cmp	dword ptr [edx], 0
jz	short loc_46E555
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
call	sub_40AA80

loc_46E555:
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_38]
mov	[ecx+4], edx
lea	eax, [ebp+var_6C]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
push	ecx
mov	[ebp+var_68], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_70]
call	sub_471530
lea	eax, [ebp+var_44]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	ecx, [ebp+var_2C]
call	sub_429100
lea	ecx, [ebp+var_3C]
call	sub_429100

loc_46E5B2:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_46E410 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46E5D0(void	*)
sub_46E5D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46E5D9:
cmp	[ebp+arg_0], 0
jz	short loc_46E62C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46E5D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46E624
mov	edx, 1
imul	edx, 84h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46E624:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46E5D9

loc_46E62C:
mov	esp, ebp
pop	ebp
retn	4
sub_46E5D0 endp

align 10h


; Attributes: bp-based frame

sub_46E640 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_46E65C:
cmp	[ebp+var_10], 0
jz	short loc_46E6A3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_46E692
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_46E69B

loc_46E692:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_46E69B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_46E65C

loc_46E6A3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_46E745
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_46E736
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_476EE0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_46E7BB
jmp	short loc_46E745

loc_46E736:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_46E745:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_46E7A0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_476EE0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_46E7BB

loc_46E7A0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_46E7BB:
mov	esp, ebp
pop	ebp
retn	8
sub_46E640 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46E7D0(void	*)
sub_46E7D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46E7D9:
cmp	[ebp+arg_0], 0
jz	short loc_46E829
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46E7D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_477160
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46E821
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46E821:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46E7D9

loc_46E829:
mov	esp, ebp
pop	ebp
retn	4
sub_46E7D0 endp

align 10h


; Attributes: bp-based frame

sub_46E830 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_46E84C:
cmp	[ebp+var_10], 0
jz	short loc_46E893
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_46E882
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_46E88B

loc_46E882:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_46E88B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_46E84C

loc_46E893:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_46E935
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_46E926
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_477020
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_46E9AB
jmp	short loc_46E935

loc_46E926:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_46E935:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_46E990
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_477020
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_46E9AB

loc_46E990:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_46E9AB:
mov	esp, ebp
pop	ebp
retn	8
sub_46E830 endp

align 10h


; Attributes: bp-based frame

sub_46E9C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4771A0
add	esp, 0Ch
mov	[ebp+arg_0], eax
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_46E9EC
mov	eax, [ebp+arg_0]
jmp	short loc_46EA43
jmp	short loc_46EA43

loc_46E9EC:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_46EA12

loc_46EA09:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_46EA12:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_46EA40
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
push	edx
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jnz	short loc_46EA3E
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_C]
add	eax, 1
mov	[ebp+var_C], eax

loc_46EA3E:
jmp	short loc_46EA09

loc_46EA40:
mov	eax, [ebp+var_C]

loc_46EA43:
mov	esp, ebp
pop	ebp
retn
sub_46E9C0 endp

align 10h


; Attributes: bp-based frame

sub_46EA50 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_75=	byte ptr -75h
var_74=	byte ptr -74h
var_59=	byte ptr -59h
var_58=	byte ptr -58h
var_50=	byte ptr -50h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B4h
mov	[ebp+var_A8], ecx
mov	[ebp+var_84], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_5DE140
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_A8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_8C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_90]
setz	al
mov	[ebp+var_A9], al
movzx	ecx, [ebp+var_A9]
test	ecx, ecx
jnz	short loc_46EB36
or	[ebp+var_84], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_84], 2
or	[ebp+var_84], 4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_A8]
mov	dl, [ecx+14h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_94]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_46EB36
mov	[ebp+var_B0], 0
jmp	short loc_46EB40

loc_46EB36:
mov	[ebp+var_B0], 1

loc_46EB40:
mov	cl, byte ptr [ebp+var_B0]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_84]
and	edx, 4
jz	short loc_46EB63
and	[ebp+var_84], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_46EB63:
mov	eax, [ebp+var_84]
and	eax, 2
jz	short loc_46EB7D
and	[ebp+var_84], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_46EB7D:
mov	ecx, [ebp+var_84]
and	ecx, 1
jz	short loc_46EB97
and	[ebp+var_84], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_46EB97:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_46EC5D
lea	ecx, [ebp+var_75]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_74]
call	sub_407D30
lea	ecx, [ebp+var_59]
push	ecx
lea	ecx, [ebp+var_58]
call	sub_594460
lea	edx, [ebp+var_74]
push	edx
lea	ecx, [ebp+var_50]
call	sub_403850
lea	eax, [ebp+var_58]
push	eax
lea	ecx, [ebp+var_38]
call	sub_470F60
lea	ecx, [ebp+var_A4]
mov	[ebp+var_98], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_98]
call	sub_4046E0
lea	edx, [ebp+var_50]
push	edx
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
call	sub_4046E0
lea	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_475610
lea	ecx, [ebp+var_80]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B4]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_38]
call	sub_479340
lea	ecx, [ebp+var_50]
call	sub_407910
lea	ecx, [ebp+var_58]
call	sub_479340
lea	ecx, [ebp+var_74]
call	sub_407910
lea	ecx, [ebp+var_75]
call	nullsub_1

loc_46EC5D:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_46EA50 endp

align 10h


; Attributes: bp-based frame

sub_46EC70 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C7D40
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_69], al
movzx	ecx, [ebp+var_69]
test	ecx, ecx
jnz	short loc_46ED01
or	[ebp+var_38], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_68]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_46ED01
mov	[ebp+var_70], 0
jmp	short loc_46ED08

loc_46ED01:
mov	[ebp+var_70], 1

loc_46ED08:
mov	cl, byte ptr [ebp+var_70]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_38]
and	edx, 1
jz	short loc_46ED1A
and	[ebp+var_38], 0FFFFFFFEh

loc_46ED1A:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_46EDAC
xor	ecx, ecx
mov	[ebp+var_50], ecx
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_50]
push	eax
lea	ecx, [ebp+var_51]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_4899B0
lea	ecx, [ebp+var_28]
call	sub_471130
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_28]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_479590
lea	edx, [ebp+var_64]
mov	[ebp+var_58], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	eax, [ebp+var_20]
push	eax
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_475100
lea	edx, [ebp+var_34]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_1C]
call	sub_5D2630
lea	ecx, [ebp+var_28]
call	sub_5D2630

loc_46EDAC:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_46EC70 endp

align 10h


; Attributes: bp-based frame

sub_46EDC0 proc	near

var_8= dword ptr -8
var_4= word ptr	-4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_4], ax
jmp	short loc_46EDDD

loc_46EDD1:
mov	cx, [ebp+var_4]
add	cx, 1
mov	[ebp+var_4], cx

loc_46EDDD:
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
movzx	ecx, word ptr [eax+0Ah]
cmp	edx, ecx
jge	short loc_46EDFF
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	dword ptr [ecx+edx*4], 0
jmp	short loc_46EDD1

loc_46EDFF:
xor	edx, edx
mov	eax, [ebp+var_8]
mov	[eax+0Ah], dx
xor	ecx, ecx
mov	edx, [ebp+var_8]
mov	[edx+0Ch], cx
mov	esp, ebp
pop	ebp
retn
sub_46EDC0 endp

align 10h


; Attributes: bp-based frame

sub_46EE20 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_46EE86
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_46EE62
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4773D0
jmp	short loc_46EE86

loc_46EE62:
xor	edx, edx
mov	byte ptr [ebp+var_3+1],	dl
xor	eax, eax
mov	byte ptr [ebp+var_3], al
push	0
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_3]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4771D0

loc_46EE86:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_46EE20 endp

align 10h


; Attributes: bp-based frame

sub_46EE90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_46EEFE
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_46EEBB

loc_46EEB3:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_46EEBB:
cmp	[ebp+var_8], 1
jz	short loc_46EECC
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_46EEB3

loc_46EECC:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4776F0
add	esp, 14h
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4777C0
add	esp, 0Ch

loc_46EEFE:
mov	esp, ebp
pop	ebp
retn
sub_46EE90 endp

align 10h


; Attributes: bp-based frame

sub_46EF10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_46EF7E
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_46EF3B

loc_46EF33:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_46EF3B:
cmp	[ebp+var_8], 1
jz	short loc_46EF4C
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_46EF33

loc_46EF4C:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_477830
add	esp, 14h
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_477900
add	esp, 0Ch

loc_46EF7E:
mov	esp, ebp
pop	ebp
retn
sub_46EF10 endp

align 10h


; Attributes: bp-based frame

sub_46EF90 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C7D40
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_69], al
movzx	ecx, [ebp+var_69]
test	ecx, ecx
jnz	short loc_46F021
or	[ebp+var_38], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_68]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_46F021
mov	[ebp+var_70], 0
jmp	short loc_46F028

loc_46F021:
mov	[ebp+var_70], 1

loc_46F028:
mov	cl, byte ptr [ebp+var_70]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_38]
and	edx, 1
jz	short loc_46F03A
and	[ebp+var_38], 0FFFFFFFEh

loc_46F03A:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_46F0CC
xor	ecx, ecx
mov	[ebp+var_50], ecx
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_50]
push	eax
lea	ecx, [ebp+var_51]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_4899B0
lea	ecx, [ebp+var_28]
call	sub_471130
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_28]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_470BE0
lea	edx, [ebp+var_64]
mov	[ebp+var_58], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	eax, [ebp+var_20]
push	eax
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_471C80
lea	edx, [ebp+var_34]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_1C]
call	sub_46C0D0
lea	ecx, [ebp+var_28]
call	sub_46C0D0

loc_46F0CC:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_46EF90 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46F0E0(void	*)
sub_46F0E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46F0E9:
cmp	[ebp+arg_0], 0
jz	short loc_46F139
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46F0E0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
call	sub_475F30
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46F131
mov	edx, 1
imul	edx, 14h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46F131:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46F0E9

loc_46F139:
mov	esp, ebp
pop	ebp
retn	4
sub_46F0E0 endp

align 10h


; Attributes: bp-based frame

sub_46F140 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_72=	byte ptr -72h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_46F140
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_90]
call	sub_5C7D40
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_90]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_6C]
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_6C]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jnz	short loc_46F1FE
or	[ebp+var_60], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_90]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_70]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_46F1FE
mov	[ebp+var_98], 0
jmp	short loc_46F208

loc_46F1FE:
mov	[ebp+var_98], 1

loc_46F208:
mov	cl, byte ptr [ebp+var_98]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_60]
and	edx, 1
jz	short loc_46F21D
and	[ebp+var_60], 0FFFFFFFEh

loc_46F21D:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_46F2F5
lea	ecx, [ebp+var_71]
push	ecx
lea	ecx, [ebp+var_54]
call	sub_489C40
mov	[ebp+var_44], 0
mov	dl, [ebp+var_72]
mov	[ebp+var_40], dl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_38]
mov	[ebp+var_78], edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_78]
call	sub_471150
lea	ecx, [ebp+var_88]
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+var_90]
call	sub_472190
lea	ecx, [ebp+var_5C]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_38]
mov	[ebp+var_8C], ecx
mov	ecx, [ebp+var_8C]
call	sub_471020
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_54]
call	sub_471020
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh

loc_46F2F5:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46F140 endp

align 10h


; Attributes: bp-based frame

sub_46F310 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	byte ptr -54h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8Ch
mov	[ebp+var_8C], ecx
mov	[ebp+var_64], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_5DE010
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_70]
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_6C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_70]
setz	al
mov	[ebp+var_8D], al
movzx	ecx, [ebp+var_8D]
test	ecx, ecx
jnz	short loc_46F3CD
or	[ebp+var_64], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_74], edx
mov	eax, [ebp+var_8C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_46F3CD
mov	[ebp+var_94], 0
jmp	short loc_46F3D7

loc_46F3CD:
mov	[ebp+var_94], 1

loc_46F3D7:
mov	cl, byte ptr [ebp+var_94]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_64]
and	edx, 1
jz	short loc_46F3FA
and	[ebp+var_64], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46F3FA:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_46F49C
lea	ecx, [ebp+var_55]
push	ecx
lea	ecx, [ebp+var_54]
call	sub_489C40
mov	[ebp+var_44], 0
mov	dl, [ebp+var_56]
mov	[ebp+var_40], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_38]
mov	[ebp+var_78], edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_78]
call	sub_5E0880
lea	ecx, [ebp+var_88]
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_478860
lea	ecx, [ebp+var_60]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_38]
call	sub_46AA70
lea	ecx, [ebp+var_54]
call	sub_46AA70

loc_46F49C:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46F310 endp

align 10h


; Attributes: bp-based frame

sub_46F4C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_46F52E
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_46F4EB

loc_46F4E3:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_46F4EB:
cmp	[ebp+var_8], 1
jz	short loc_46F4FC
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_46F4E3

loc_46F4FC:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_477AC0
add	esp, 14h
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_477B80
add	esp, 0Ch

loc_46F52E:
mov	esp, ebp
pop	ebp
retn
sub_46F4C0 endp

align 10h


; Attributes: bp-based frame

sub_46F540 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_60=	dword ptr -60h
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	byte ptr -58h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
mov	[ebp+var_6C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_47F8E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_94]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_78]
mov	[ebp+var_74], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_78]
setz	al
mov	[ebp+var_95], al
movzx	ecx, [ebp+var_95]
test	ecx, ecx
jnz	short loc_46F603
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
or	[ebp+var_6C], 1
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_94]
mov	al, [edx+14h]
mov	[ebp+var_1D], al
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_24]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_46F603
mov	[ebp+var_9C], 0
jmp	short loc_46F60D

loc_46F603:
mov	[ebp+var_9C], 1

loc_46F60D:
mov	dl, byte ptr [ebp+var_9C]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_6C]
and	eax, 1
jz	short loc_46F630
and	[ebp+var_6C], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46F630:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_46F6DE
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_60], eax
lea	ecx, [ebp+var_59]
push	ecx
lea	ecx, [ebp+var_58]
call	sub_489C40
mov	[ebp+var_48], 0
mov	dl, [ebp+var_5A]
mov	[ebp+var_44], dl
mov	eax, [ebp+var_60]
mov	[ebp+var_40], eax
lea	ecx, [ebp+var_3C]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_58]
push	edx
mov	ecx, [ebp+var_80]
call	sub_5E0880
lea	eax, [ebp+var_90]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	ecx, [ebp+var_40]
push	ecx
push	ecx
mov	[ebp+var_8C], esp
mov	ecx, [ebp+var_90]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	edx, [ebp+var_68]
push	edx
mov	ecx, [ebp+var_94]
call	sub_478860
lea	eax, [ebp+var_68]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	ecx, [ebp+var_3C]
call	sub_46AA70
lea	ecx, [ebp+var_58]
call	sub_46AA70

loc_46F6DE:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46F540 endp

align 10h


; Attributes: bp-based frame

sub_46F700 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
pop	ebp
retn
sub_46F700 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_46F720(void	*)
sub_46F720 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_46F729:
cmp	[ebp+arg_0], 0
jz	short loc_46F779
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_46F720
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4780B0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_46F771
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_46F771:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_46F729

loc_46F779:
mov	esp, ebp
pop	ebp
retn	4
sub_46F720 endp

align 10h


; Attributes: bp-based frame

sub_46F780 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_72=	byte ptr -72h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8Ch
mov	[ebp+var_8C], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_5DE010
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_6C]
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_6C]
setz	al
mov	[ebp+var_8D], al
movzx	ecx, [ebp+var_8D]
test	ecx, ecx
jnz	short loc_46F83D
or	[ebp+var_60], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_8C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_70]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_46F83D
mov	[ebp+var_94], 0
jmp	short loc_46F847

loc_46F83D:
mov	[ebp+var_94], 1

loc_46F847:
mov	cl, byte ptr [ebp+var_94]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_60]
and	edx, 1
jz	short loc_46F86A
and	[ebp+var_60], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_46F86A:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_46F90C
lea	ecx, [ebp+var_71]
push	ecx
lea	ecx, [ebp+var_54]
call	sub_489C40
mov	[ebp+var_44], 0
mov	dl, [ebp+var_72]
mov	[ebp+var_40], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_38]
mov	[ebp+var_78], edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_78]
call	sub_471250
lea	ecx, [ebp+var_88]
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_477BE0
lea	ecx, [ebp+var_5C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_38]
call	sub_471070
lea	ecx, [ebp+var_54]
call	sub_471070

loc_46F90C:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_46F780 endp

align 10h


; Attributes: bp-based frame

sub_46F930 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_BC], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_5DE010
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_BC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_BD], al
movzx	ecx, [ebp+var_BD]
test	ecx, ecx
jnz	short loc_46F9D8
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_BC]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_50]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_46F9D8
mov	[ebp+var_C4], 0
jmp	short loc_46F9E2

loc_46F9D8:
mov	[ebp+var_C4], 1

loc_46F9E2:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_40]
and	edx, 1
jz	short loc_46F9F7
and	[ebp+var_40], 0FFFFFFFEh

loc_46F9F7:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_46FA8A
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
push	0
lea	ecx, [ebp+var_31]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_489990
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_30]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_4710C0
lea	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_24]
push	eax
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_478E70
lea	edx, [ebp+var_3C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_20]
call	sub_468AA0
lea	ecx, [ebp+var_30]
call	sub_468AA0

loc_46FA8A:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_46F930 endp

align 10h


; Attributes: bp-based frame

sub_46FAA0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jge	short loc_46FAB2
mov	eax, [ebp+arg_4]
jmp	short loc_46FAC4
jmp	short loc_46FAC4

loc_46FAB2:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_8]
jle	short loc_46FAC1
mov	eax, [ebp+arg_8]
jmp	short loc_46FAC4
jmp	short loc_46FAC4

loc_46FAC1:
mov	eax, [ebp+arg_0]

loc_46FAC4:
pop	ebp
retn
sub_46FAA0 endp

align 10h


; Attributes: bp-based frame

sub_46FAD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_478140
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_46FAD0 endp

align 10h


; Attributes: bp-based frame

sub_46FB00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 80h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_478180
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_46FB00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_46FB30(void *)
sub_46FB30 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_10A7B40
xor	ecx, ecx
and	ecx, 1
jz	short loc_46FB54
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_46FB54:
mov	esp, ebp
pop	ebp
retn
sub_46FB30 endp

align 10h


; Attributes: bp-based frame

sub_46FB60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4781C0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_46FB60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_46FB90(void *)
sub_46FB90 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 20h
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_46FBB7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_46FBB7:
mov	esp, ebp
pop	ebp
retn
sub_46FB90 endp

align 10h


; Attributes: bp-based frame

sub_46FBC0 proc	near

var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	al, [ebp+arg_8]
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx-4]
push	eax
push	0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
sub	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_47DAF0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_46FBC0 endp

align 10h


; Attributes: bp-based frame

sub_46FC00 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	al, [ebp+arg_8]
mov	[ebp+var_6], al
mov	cl, [ebp+var_6]
mov	[ebp+var_5], cl
mov	edx, [ebp+arg_4]
mov	eax, [edx-4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx-4], eax
movzx	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, 4
sub	eax, [ebp+arg_0]
sar	eax, 2
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47F950
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_46FC00 endp

align 10h


; Attributes: bp-based frame

sub_46FC50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	byte ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
push	0
push	0
movzx	eax, [ebp+arg_20]
push	eax
sub	esp, 10h
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
call	sub_478200
add	esp, 2Ch
mov	esp, ebp
pop	ebp
retn
sub_46FC50 endp

align 10h


; Attributes: bp-based frame

sub_46FCB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	byte ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 98h
movzx	eax, [ebp+arg_20]
push	eax
push	0
sub	esp, 10h
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
call	sub_478310
add	esp, 28h
mov	esp, ebp
pop	ebp
retn
sub_46FCB0 endp

align 10h


; Attributes: bp-based frame

sub_46FD10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 54h
push	0
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
call	sub_478450
add	esp, 24h
mov	esp, ebp
pop	ebp
retn
sub_46FD10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_46FD70(void *)
sub_46FD70 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_46FD97
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_46FD97:
mov	esp, ebp
pop	ebp
retn
sub_46FD70 endp

align 10h


; Attributes: bp-based frame

sub_46FDA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4784F0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_46FDA0 endp

align 10h


; Attributes: bp-based frame

sub_46FDD0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_4]
sar	eax, 2
shl	eax, 5
add	eax, [ebp+arg_10]
sub	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
jmp	short loc_46FDF6

loc_46FDED:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_46FDF6:
cmp	[ebp+var_4], 0
jle	loc_46FE8F
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_10]
sub	eax, 1
mov	[ebp+arg_10], eax
test	edx, edx
jnz	short loc_46FE20
mov	[ebp+arg_10], 1Fh
mov	ecx, [ebp+arg_C]
sub	ecx, 4
mov	[ebp+arg_C], ecx

loc_46FE20:
mov	edx, 1
mov	ecx, [ebp+arg_10]
shl	edx, cl
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+arg_18]
sub	ecx, 1
mov	[ebp+arg_18], ecx
test	eax, eax
jnz	short loc_46FE5F
mov	[ebp+arg_18], 1Fh
mov	edx, [ebp+arg_14]
sub	edx, 4
mov	[ebp+arg_14], edx

loc_46FE5F:
mov	eax, 1
mov	ecx, [ebp+arg_18]
shl	eax, cl
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_14]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_459980
jmp	loc_46FDED

loc_46FE8F:
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	[ecx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_46FDD0 endp

align 10h


; Attributes: bp-based frame

sub_46FEB0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 64h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 8
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_14]
mov	ecx, [ebp+arg_18]
mov	edx, [ebp+var_18]
mov	[edx], eax
mov	[edx+4], ecx
sub	esp, 8
mov	[ebp+var_1C], esp
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+var_1C]
mov	[edx], eax
mov	[edx+4], ecx
sub	esp, 8
mov	[ebp+var_20], esp
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_20]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4785A0
add	esp, 20h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_46FEB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_46FF20(void *)
sub_46FF20 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_46B570
xor	ecx, ecx
and	ecx, 1
jz	short loc_46FF47
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_46FF47:
mov	esp, ebp
pop	ebp
retn
sub_46FF20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_46FF50(void *)
sub_46FF50 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_46D750
xor	ecx, ecx
and	ecx, 1
jz	short loc_46FF77
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_46FF77:
mov	esp, ebp
pop	ebp
retn
sub_46FF50 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_46FF80(void *)
sub_46FF80 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_479340
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_46FFAF
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_46FFAF:
mov	esp, ebp
pop	ebp
retn
sub_46FF80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_46FFC0(void *, int)
sub_46FFC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_470023
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_403400
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_47002A

loc_470023:
mov	[ebp+var_C], 0

loc_47002A:
mov	esp, ebp
pop	ebp
retn
sub_46FFC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_470030(void *)
sub_470030 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_409540
xor	ecx, ecx
and	ecx, 1
jz	short loc_470057
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_470057:
mov	esp, ebp
pop	ebp
retn
sub_470030 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_470060(void *, int)
sub_470060 proc	near

var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_7], cl
mov	dl, [ebp+var_7]
mov	byte ptr [ebp+var_6+1],	dl
xor	eax, eax
mov	[ebp+var_8], al
mov	cl, [ebp+var_8]
mov	byte ptr [ebp+var_6], cl
mov	edx, [ebp+arg_4]
shl	edx, 2
push	edx		; size_t
push	0		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*4]
mov	esp, ebp
pop	ebp
retn
sub_470060 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4700C0(void *)
sub_4700C0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_555450
xor	ecx, ecx
and	ecx, 1
jz	short loc_4700E6
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4700E6:
mov	esp, ebp
pop	ebp
retn
sub_4700C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4700F0(void *, int)
sub_4700F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47014F
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4799C0
mov	ecx, [ebp+var_8]
mov	[ebp+var_34], ecx
jmp	short loc_470156

loc_47014F:
mov	[ebp+var_34], 0

loc_470156:
mov	esp, ebp
pop	ebp
retn
sub_4700F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_470160(void *, int)
sub_470160 proc	near

var_68=	dword ptr -68h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4701A4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_479470
mov	[ebp+var_68], eax
jmp	short loc_4701AB

loc_4701A4:
mov	[ebp+var_68], 0

loc_4701AB:
mov	esp, ebp
pop	ebp
retn
sub_470160 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4701B0(void *, int)
sub_4701B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47021B
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax], edx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_470213
mov	ecx, [ebp+var_C]
mov	ecx, [ecx]
call	sub_40AA80

loc_470213:
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
jmp	short loc_470222

loc_47021B:
mov	[ebp+var_10], 0

loc_470222:
mov	esp, ebp
pop	ebp
retn
sub_4701B0 endp

align 10h


; Attributes: bp-based frame

sub_470230 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_47027C
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_470274
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA80

loc_470274:
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_470283

loc_47027C:
mov	[ebp+var_C], 0

loc_470283:
mov	esp, ebp
pop	ebp
retn
sub_470230 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_470290(void *, int)
sub_470290 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4702D4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_45D7E0
mov	[ebp+var_10], eax
jmp	short loc_4702DB

loc_4702D4:
mov	[ebp+var_10], 0

loc_4702DB:
mov	esp, ebp
pop	ebp
retn
sub_470290 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4702E0(void *, int)
sub_4702E0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_470324
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_45D8F0
mov	[ebp+var_10], eax
jmp	short loc_47032B

loc_470324:
mov	[ebp+var_10], 0

loc_47032B:
mov	esp, ebp
pop	ebp
retn
sub_4702E0 endp

align 10h


; Attributes: bp-based frame

sub_470330 proc	near

var_44=	dword ptr -44h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_470369
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_45DB50
mov	[ebp+var_44], eax
jmp	short loc_470370

loc_470369:
mov	[ebp+var_44], 0

loc_470370:
mov	esp, ebp
pop	ebp
retn
sub_470330 endp

align 10h


; Attributes: bp-based frame

sub_470380 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_156AE9C
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_4703BC
push	3
mov	ecx, [ebp+var_4]
call	sub_470A60
mov	[ebp+var_14], eax
jmp	short loc_4703C3

loc_4703BC:
mov	[ebp+var_14], 0

loc_4703C3:
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4703D9
push	10h
mov	eax, [ebp+var_10]
push	eax
call	sub_1111040
add	esp, 8

loc_4703D9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_470380 endp

align 10h


; Attributes: bp-based frame

sub_4703F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_156846C
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
call	sub_1227D40
add	esp, 4
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_47042D
push	10h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_47042D:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4703F0 endp

align 10h


; Attributes: bp-based frame

sub_470440 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FAD0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 4
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_4704AC
mov	ecx, [ebp+var_4C]
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4704AC:
mov	esp, ebp
pop	ebp
retn
sub_470440 endp



; Attributes: bp-based frame

sub_4704B0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_40]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
mov	[ebp+var_44], ecx
jmp	short loc_4704DB

loc_4704D2:
mov	edx, [ebp+var_44]
sub	edx, 1
mov	[ebp+var_44], edx

loc_4704DB:
cmp	[ebp+var_44], 0
jbe	short loc_470502
mov	eax, [ebp+arg_8]
push	eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_40]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_48]
call	sub_4698C0
jmp	short loc_4704D2

loc_470502:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4704B0 endp

align 10h


; Attributes: bp-based frame

sub_470510 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_470519:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_470570
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_468420
jmp	short loc_470519

loc_470570:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_470510 endp

align 10h


; Attributes: bp-based frame

sub_470590 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 9249249h
mov	[ebp+var_10], 9249249h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_4705CD
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_4705D3

loc_4705CD:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_4705D3:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_4705E6
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_4705E6:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 9249249h
mov	[ebp+var_1C], 9249249h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_47061C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_470622

loc_47061C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_470622:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_470632
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_47065C

loc_470632:
mov	[ebp+var_20], 9249249h
mov	[ebp+var_24], 9249249h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_470650
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_470656

loc_470650:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_470656:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_47065C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_470590 endp

align 10h


; Attributes: bp-based frame

sub_470670 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FB60
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_4706E3
mov	ecx, [ebp+var_4C]
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4706E3:
mov	esp, ebp
pop	ebp
retn
sub_470670 endp

align 10h


; Attributes: bp-based frame

sub_4706F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 9249249h
jbe	short loc_47071B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_47071B:
cmp	[ebp+arg_0], 0
jz	short loc_470752
mov	ecx, [ebp+arg_0]
imul	ecx, 1Ch
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 1Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_470759

loc_470752:
mov	[ebp+var_10], 0

loc_470759:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_4706F0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_470770 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_40]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
mov	[ebp+var_44], ecx
jmp	short loc_47079B

loc_470792:
mov	edx, [ebp+var_44]
sub	edx, 1
mov	[ebp+var_44], edx

loc_47079B:
cmp	[ebp+var_44], 0
jbe	short loc_4707C2
mov	eax, [ebp+arg_8]
push	eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_40]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_48]
call	sub_469DC0
jmp	short loc_470792

loc_4707C2:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_470770 endp

align 10h


; Attributes: bp-based frame

sub_4707D0 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx

loc_4707D9:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	short loc_470830
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_4686A0
jmp	short loc_4707D9

loc_470830:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4707D0 endp

align 10h


; Attributes: bp-based frame

sub_470850 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_3C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
mov	[ebp+var_40], ecx
jmp	short loc_47087B

loc_470872:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_47087B:
cmp	[ebp+var_40], 0
jbe	short loc_4708A2
mov	eax, [ebp+arg_8]
push	eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_3C]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_44]
call	sub_469E40
jmp	short loc_470872

loc_4708A2:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_470850 endp

align 10h


; Attributes: bp-based frame

sub_4708B0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_4708B9:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_470910
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_468760
jmp	short loc_4708B9

loc_470910:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4708B0 endp

align 10h


; Attributes: bp-based frame

sub_470930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
push	edi
mov	[ebp+var_8], ecx
mov	esi, [ebp+arg_0]
mov	ecx, 17h
mov	edi, [ebp+var_8]
rep movsd
mov	eax, [ebp+var_8]
add	eax, 5Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+1Ch]
mov	[edx+1Ch], ecx
mov	eax, [ebp+var_8]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_470930 endp



; Attributes: bp-based frame

sub_470980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403850
mov	ecx, [ebp+var_8]
add	ecx, 18h
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	8
sub_470980 endp

align 10h


; Attributes: bp-based frame

sub_4709D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_470A08
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_470A08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	8
sub_4709D0 endp

align 10h


; Attributes: bp-based frame

sub_470A20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_470A47
push	3
mov	ecx, [ebp+var_4]
call	sub_470A60
mov	[ebp+var_C], eax
jmp	short loc_470A4E

loc_470A47:
mov	[ebp+var_C], 0

loc_470A4E:
mov	esp, ebp
pop	ebp
retn
sub_470A20 endp

align 10h


; Attributes: bp-based frame

sub_470A60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
and	eax, 2
jz	short loc_470AA7
push	offset sub_429100
mov	ecx, [ebp+var_4]
mov	edx, [ecx-4]
push	edx
push	4
mov	eax, [ebp+var_4]
push	eax
call	sub_40F3E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_470A9F
push	4
mov	edx, [ebp+var_4]
sub	edx, 4
push	edx
call	sub_1111020
add	esp, 8

loc_470A9F:
mov	eax, [ebp+var_4]
sub	eax, 4
jmp	short loc_470AC8

loc_470AA7:
mov	ecx, [ebp+var_4]
call	sub_429100
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_470AC5
push	4
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_470AC5:
mov	eax, [ebp+var_4]

loc_470AC8:
mov	esp, ebp
pop	ebp
retn	4
sub_470A60 endp

align 10h


; Attributes: bp-based frame

sub_470AD0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_1A=	byte ptr -1Ah
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
call	sub_409A10
call	nullsub_1
lea	eax, [ebp+var_3C]
mov	ecx, [ebp+var_48]
call	sub_402EB0
lea	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
call	sub_4046E0
mov	eax, [eax]
mov	[ebp+var_44], eax
lea	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
call	sub_402EB0
mov	ecx, [eax]
mov	[ebp+var_40], ecx
xor	edx, edx
mov	[ebp+var_1A], dl
lea	eax, [ebp+var_1A]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
mov	edx, [ebp+var_40]
push	edx
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_3C]
call	sub_402EB0
mov	ecx, [ebp+var_48]
call	sub_47E000
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn	4
sub_470AD0 endp

align 10h


; Attributes: bp-based frame

sub_470B40 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jb	short loc_470B6A
mov	edx, [ebp+var_7C]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+4]
jnb	short loc_470B6A
mov	[ebp+var_80], 1
jmp	short loc_470B71

loc_470B6A:
mov	[ebp+var_80], 0

loc_470B71:
movzx	ecx, byte ptr [ebp+var_80]
test	ecx, ecx
jz	short loc_470BB1
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_C]
call	sub_50FA70
xor	eax, eax
mov	[ebp+var_D], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_D]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_7C]
call	sub_4729A0
lea	ecx, [ebp+var_C]
call	sub_555450
jmp	short loc_470BD3

loc_470BB1:
xor	eax, eax
mov	[ebp+var_E], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_7C]
call	sub_4729A0

loc_470BD3:
mov	esp, ebp
pop	ebp
retn	14h
sub_470B40 endp

align 10h


; Attributes: bp-based frame

sub_470BE0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_47E060
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_470BE0 endp

align 10h


; Attributes: bp-based frame

sub_470CA0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_47E0C0
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_470CA0 endp

align 10h


; Attributes: bp-based frame

sub_470D60 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
jmp	short loc_470D74

loc_470D6B:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_470D74:
cmp	[ebp+arg_4], 0
jbe	short loc_470DD8
lea	ecx, [ebp+var_30]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_489850
mov	[ebp+var_18], eax
mov	eax, [ebp+var_30]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	[eax+4], ecx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	short loc_470D6B

loc_470DD8:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_470D60 endp

align 10h


; Attributes: bp-based frame

sub_470DE0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_47E120
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_470DE0 endp

align 10h


; Attributes: bp-based frame

sub_470EA0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_47E180
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_470EA0 endp

align 10h


; Attributes: bp-based frame

sub_470F60 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_47E280
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_470F60 endp

align 10h


; Attributes: bp-based frame

sub_471020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_471065
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_478800
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_471065:
mov	esp, ebp
pop	ebp
retn
sub_471020 endp

align 10h


; Attributes: bp-based frame

sub_471070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4710B5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_478E10
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4710B5:
mov	esp, ebp
pop	ebp
retn
sub_471070 endp

align 10h


; Attributes: bp-based frame

sub_4710C0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
push	eax
mov	ecx, [ebp+var_28]
call	sub_46AAF0
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_4710C0 endp

align 10h


; Attributes: bp-based frame

sub_471130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	esp, ebp
pop	ebp
retn
sub_471130 endp

align 10h


; Attributes: bp-based frame

sub_471150 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_471237
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_478720
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_4711F4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_471208
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_4711F4

loc_471208:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_47121A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_47122E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_47121A

loc_47122E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_471237:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_471150 endp

align 10h


; Attributes: bp-based frame

sub_471250 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_471337
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_478D30
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_4712F4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_471308
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_4712F4

loc_471308:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_47131A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_47132E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_47131A

loc_47132E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_471337:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_471250 endp

align 10h


; Attributes: bp-based frame

sub_471350 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_50F3A0
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_18]
mov	[eax+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_471350 endp

align 10h


; Attributes: bp-based frame

sub_4713C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx+4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+8], 0
jz	short loc_4713F2
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
jmp	short loc_4713FB

loc_4713F2:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+4], eax

loc_4713FB:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
add	ecx, 1
mov	edx, [ebp+var_4]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4713C0 endp

align 10h


; Attributes: bp-based frame

sub_471420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+4], 0
jz	short loc_471459
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_4]
mov	[edx], eax
jmp	short loc_471462

loc_471459:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx

loc_471462:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
add	eax, 1
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_471420 endp

align 10h


; Attributes: bp-based frame

sub_471490 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax+8]
cmp	[ebp+arg_0], ecx
jb	short loc_4714B8
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+0Eh]
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_479BC0

loc_4714B8:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C]
call	sub_46B100
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_471490 endp

align 10h


; Attributes: bp-based frame

sub_4714E0 proc	near

var_60=	dword ptr -60h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
movzx	ecx, word ptr [eax+8]
cmp	[ebp+arg_0], ecx
jb	short loc_471508
mov	edx, [ebp+var_60]
movzx	eax, word ptr [edx+0Eh]
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_479D10

loc_471508:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_60]
call	sub_479F90
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4714E0 endp

align 10h


; Attributes: bp-based frame

sub_471530 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4717E5
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_471599
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A280
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_471C37

loc_471599:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4715E8
jb	short loc_4715DC
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4715E8

loc_4715DC:
mov	[ebp+var_AC], 1
jmp	short loc_4715F2

loc_4715E8:
mov	[ebp+var_AC], 0

loc_4715F2:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_47162D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	loc_471C37
jmp	loc_4717E0

loc_47162D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_47167C
jb	short loc_471670
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_47167C

loc_471670:
mov	[ebp+var_B8], 1
jmp	short loc_471686

loc_47167C:
mov	[ebp+var_B8], 0

loc_471686:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_4716AA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_471C37

loc_4716AA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_4716F4
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	loc_471C37

loc_4716F4:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_471743
jb	short loc_471737
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_471743

loc_471737:
mov	[ebp+var_C4], 1
jmp	short loc_47174D

loc_471743:
mov	[ebp+var_C4], 0

loc_47174D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4717B5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_47178E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	loc_471C37
jmp	short loc_4717B3

loc_47178E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	loc_471C37

loc_4717B3:
jmp	short loc_4717E0

loc_4717B5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A280
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_471C37

loc_4717E0:
jmp	loc_471C37

loc_4717E5:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4718C1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_471849
jb	short loc_47183D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_471849

loc_47183D:
mov	[ebp+var_D0], 1
jmp	short loc_471853

loc_471849:
mov	[ebp+var_D0], 0

loc_471853:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_471891
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	loc_471C37
jmp	short loc_4718BC

loc_471891:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A280
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_471C37

loc_4718BC:
jmp	loc_471C37

loc_4718C1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_47192A
jb	short loc_47191E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_47192A

loc_47191E:
mov	[ebp+var_DC], 1
jmp	short loc_471934

loc_47192A:
mov	[ebp+var_DC], 0

loc_471934:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_4719BF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_47199E
jb	short loc_471992
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_47199E

loc_471992:
mov	[ebp+var_E8], 1
jmp	short loc_4719A8

loc_47199E:
mov	[ebp+var_E8], 0

loc_4719A8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_4719BF
mov	[ebp+var_EC], 1
jmp	short loc_4719C9

loc_4719BF:
mov	[ebp+var_EC], 0

loc_4719C9:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_4719DE
and	[ebp+var_4C], 0FFFFFFFEh

loc_4719DE:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_471A40
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_471A16
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	loc_471C37
jmp	short loc_471A3B

loc_471A16:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	loc_471C37

loc_471A3B:
jmp	loc_471C37

loc_471A40:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_471AD8
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_471AC5
jb	short loc_471AB9
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_471AC5

loc_471AB9:
mov	[ebp+var_F8], 1
jmp	short loc_471ACF

loc_471AC5:
mov	[ebp+var_F8], 0

loc_471ACF:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_471AD8:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_471B75
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_471B75
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_471B69
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_471B54
jb	short loc_471B48
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_471B54

loc_471B48:
mov	[ebp+var_104], 1
jmp	short loc_471B5E

loc_471B54:
mov	[ebp+var_104], 0

loc_471B5E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_471B75

loc_471B69:
mov	[ebp+var_108], 1
jmp	short loc_471B7F

loc_471B75:
mov	[ebp+var_108], 0

loc_471B7F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_471B94
and	[ebp+var_4C], 0FFFFFFFDh

loc_471B94:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_471BED
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_471BC9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	short loc_471C37
jmp	short loc_471BEB

loc_471BC9:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A110
mov	eax, [ebp+arg_0]
jmp	short loc_471C37

loc_471BEB:
jmp	short loc_471C37

loc_471BED:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_471C0B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_471C37
jmp	short loc_471C37

loc_471C0B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A280
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_471C37:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_471530 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_471C40(void *)
sub_471C40 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
call	sub_436480
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_471C71
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_471C71:
mov	esp, ebp
pop	ebp
retn
sub_471C40 endp

align 10h


; Attributes: bp-based frame

sub_471C80 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_471E60
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_471CE9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A600
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47214B

loc_471CE9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_471D36
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	loc_47214B
jmp	loc_471E5B

loc_471D36:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_471D6C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47214B

loc_471D6C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_471DB6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	loc_47214B

loc_471DB6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_471E30
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_471E09
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	loc_47214B
jmp	short loc_471E2E

loc_471E09:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	loc_47214B

loc_471E2E:
jmp	short loc_471E5B

loc_471E30:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A600
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47214B

loc_471E5B:
jmp	loc_47214B

loc_471E60:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_471EF5
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_471EC5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	loc_47214B
jmp	short loc_471EF0

loc_471EC5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A600
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47214B

loc_471EF0:
jmp	loc_47214B

loc_471EF5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_471F67
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_471F67
mov	[ebp+var_A4], 1
jmp	short loc_471F71

loc_471F67:
mov	[ebp+var_A4], 0

loc_471F71:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_471F86
and	[ebp+var_4C], 0FFFFFFFEh

loc_471F86:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_471FE8
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_471FBE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	loc_47214B
jmp	short loc_471FE3

loc_471FBE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	loc_47214B

loc_471FE3:
jmp	loc_47214B

loc_471FE8:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_472039
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_472039:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_472089
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_472089
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_47207D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_472089

loc_47207D:
mov	[ebp+var_A8], 1
jmp	short loc_472093

loc_472089:
mov	[ebp+var_A8], 0

loc_472093:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4720A8
and	[ebp+var_4C], 0FFFFFFFDh

loc_4720A8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_472101
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4720DD
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	short loc_47214B
jmp	short loc_4720FF

loc_4720DD:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A4C0
mov	eax, [ebp+arg_0]
jmp	short loc_47214B

loc_4720FF:
jmp	short loc_47214B

loc_472101:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_47211F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_47214B
jmp	short loc_47214B

loc_47211F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A600
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_47214B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_471C80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_472160(void *)
sub_472160 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_46C0D0
xor	ecx, ecx
and	ecx, 1
jz	short loc_472187
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_472187:
mov	esp, ebp
pop	ebp
retn
sub_472160 endp

align 10h


; Attributes: bp-based frame

sub_472190 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_472370
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4721F9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A8D0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47265B

loc_4721F9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_472246
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	loc_47265B
jmp	loc_47236B

loc_472246:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_47227C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47265B

loc_47227C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4722C6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	loc_47265B

loc_4722C6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_472340
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_472319
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	loc_47265B
jmp	short loc_47233E

loc_472319:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	loc_47265B

loc_47233E:
jmp	short loc_47236B

loc_472340:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A8D0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47265B

loc_47236B:
jmp	loc_47265B

loc_472370:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_472405
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4723D5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	loc_47265B
jmp	short loc_472400

loc_4723D5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A8D0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47265B

loc_472400:
jmp	loc_47265B

loc_472405:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_472477
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_472477
mov	[ebp+var_A4], 1
jmp	short loc_472481

loc_472477:
mov	[ebp+var_A4], 0

loc_472481:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_472496
and	[ebp+var_4C], 0FFFFFFFEh

loc_472496:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4724F8
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4724CE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	loc_47265B
jmp	short loc_4724F3

loc_4724CE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	loc_47265B

loc_4724F3:
jmp	loc_47265B

loc_4724F8:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_472549
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_472549:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_472599
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_472599
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_47258D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_472599

loc_47258D:
mov	[ebp+var_A8], 1
jmp	short loc_4725A3

loc_472599:
mov	[ebp+var_A8], 0

loc_4725A3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4725B8
and	[ebp+var_4C], 0FFFFFFFDh

loc_4725B8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_472611
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4725ED
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	short loc_47265B
jmp	short loc_47260F

loc_4725ED:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47A790
mov	eax, [ebp+arg_0]
jmp	short loc_47265B

loc_47260F:
jmp	short loc_47265B

loc_472611:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_47262F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_47265B
jmp	short loc_47265B

loc_47262F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47A8D0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_47265B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_472190 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_472670(void *)
sub_472670 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A8120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_471020
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_4726C2
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4726C2:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_472670 endp



; Attributes: bp-based frame

sub_4726D0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_472746

loc_472734:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 4
mov	[ebp+var_38], ecx

loc_472746:
cmp	[ebp+var_3C], 0
jbe	short loc_472758
mov	edx, [ebp+var_38]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_472734

loc_472758:
mov	edx, [ebp+var_38]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_472783
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_472783:
mov	ecx, [ebp+var_9C]
call	sub_444710
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_98]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4726D0 endp

align 10h


; Attributes: bp-based frame

sub_4727D0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4727F7
mov	edx, [ebp+var_54]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4727F7
mov	[ebp+var_58], 1
jmp	short loc_4727FE

loc_4727F7:
mov	[ebp+var_58], 0

loc_4727FE:
movzx	ecx, byte ptr [ebp+var_58]
test	ecx, ecx
jz	short loc_472830
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_54]
call	sub_4727D0
jmp	loc_472992

loc_472830:
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_472906
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_4]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_54]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
shl	edx, 2
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A290
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
sub	edx, [ebp+var_2C]
sar	edx, 2
mov	[ebp+var_28], edx
jmp	short loc_4728EF

loc_4728DD:
mov	eax, [ebp+var_2C]
add	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_28]
sub	ecx, 1
mov	[ebp+var_28], ecx

loc_4728EF:
cmp	[ebp+var_28], 0
jle	short loc_472901
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_4728DD

loc_472901:
jmp	loc_472992

loc_472906:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
push	edx
call	sub_47BF60
add	esp, 0Ch
mov	ecx, [ebp+var_54]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_10], dl
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_54]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_50]
sar	edx, 2
mov	[ebp+var_4C], edx
jmp	short loc_472980

loc_47296E:
mov	eax, [ebp+var_50]
add	eax, 4
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_4C]
sub	ecx, 1
mov	[ebp+var_4C], ecx

loc_472980:
cmp	[ebp+var_4C], 0
jle	short loc_472992
mov	edx, [ebp+var_50]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_47296E

loc_472992:
mov	esp, ebp
pop	ebp
retn	10h
sub_4727D0 endp

align 10h


; Attributes: bp-based frame

sub_4729A0 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_D4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_50F1D0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D4]
add	ecx, 8
call	sub_479650
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_4D], al
mov	ecx, [ebp+var_8]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_D4]
mov	eax, [edx]
mov	[ebp+var_48], eax
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_48]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_38], eax
jmp	short loc_472A1D

loc_472A14:
mov	edx, [ebp+var_38]
sub	edx, 1
mov	[ebp+var_38], edx

loc_472A1D:
cmp	[ebp+var_38], 0
jle	short loc_472A47
mov	eax, [ebp+var_48]
push	eax		; int
mov	ecx, [ebp+var_4C]
push	ecx		; void *
call	sub_4700F0
add	esp, 8
mov	edx, [ebp+var_48]
add	edx, 0Ch
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
add	eax, 0Ch
mov	[ebp+var_4C], eax
jmp	short loc_472A14

loc_472A47:
mov	ecx, [ebp+var_4C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_472A6E
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_480540
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
mov	[ebp+var_C], ecx
jmp	short loc_472AC3

loc_472A6E:
mov	edx, [ebp+arg_C]
imul	edx, 0Ch
add	edx, [ebp+var_C]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_64], eax
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_472AA5

loc_472A93:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx
mov	eax, [ebp+var_64]
add	eax, 0Ch
mov	[ebp+var_64], eax

loc_472AA5:
cmp	[ebp+var_68], 0
jle	short loc_472ABD
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_64]
push	edx		; void *
call	sub_480540
add	esp, 8
jmp	short loc_472A93

loc_472ABD:
mov	eax, [ebp+var_5C]
mov	[ebp+var_C], eax

loc_472AC3:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_472B6A
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_99], cl
mov	edx, [ebp+var_C]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_D4]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_94]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_74], eax
jmp	short loc_472B25

loc_472B1C:
mov	edx, [ebp+var_74]
sub	edx, 1
mov	[ebp+var_74], edx

loc_472B25:
cmp	[ebp+var_74], 0
jle	short loc_472B61
mov	eax, [ebp+var_90]
push	eax		; int
mov	ecx, [ebp+var_98]
push	ecx		; void *
call	sub_4700F0
add	esp, 8
mov	edx, [ebp+var_90]
add	edx, 0Ch
mov	[ebp+var_90], edx
mov	eax, [ebp+var_98]
add	eax, 0Ch
mov	[ebp+var_98], eax
jmp	short loc_472B1C

loc_472B61:
mov	ecx, [ebp+var_98]
mov	[ebp+var_C], ecx

loc_472B6A:
mov	ecx, [ebp+var_D4]
call	sub_50F2B0
mov	edx, [ebp+var_4]
imul	edx, 0Ch
add	edx, [ebp+var_8]
mov	[ebp+var_D0], edx
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_D4]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D0]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_4729A0 endp



; Attributes: bp-based frame

sub_472BB0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A0], ecx
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_472BE6
mov	edx, [ebp+var_A0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_472BE6
mov	[ebp+var_A4], 1
jmp	short loc_472BF0

loc_472BE6:
mov	[ebp+var_A4], 0

loc_472BF0:
movzx	ecx, byte ptr [ebp+var_A4]
test	ecx, ecx
jz	short loc_472C34
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_14]
call	sub_50FA70
xor	eax, eax
mov	[ebp+var_15], al
lea	ecx, [ebp+var_15]
push	ecx
lea	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_472BB0
lea	ecx, [ebp+var_14]
call	sub_555450
jmp	loc_472CE9

loc_472C34:
mov	edx, [ebp+var_A0]
mov	eax, [edx+4]
sub	eax, 0Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
add	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
jmp	short loc_472C63

loc_472C51:
mov	edx, [ebp+var_4]
sub	edx, 0Ch
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
sub	eax, 0Ch
mov	[ebp+var_8], eax

loc_472C63:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_0]
jb	short loc_472C82
mov	edx, [ebp+var_8]
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_4700F0
add	esp, 8
xor	ecx, ecx
mov	[ebp+var_6D], cl
jmp	short loc_472C51

loc_472C82:
mov	edx, [ebp+arg_4]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	[ebp+var_74], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_7C], eax
mov	eax, [ebp+var_74]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_472CB9

loc_472CA7:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx
mov	eax, [ebp+var_7C]
add	eax, 0Ch
mov	[ebp+var_7C], eax

loc_472CB9:
cmp	[ebp+var_80], 0
jle	short loc_472CD1
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_7C]
push	edx		; void *
call	sub_480540
add	esp, 8
jmp	short loc_472CA7

loc_472CD1:
mov	eax, [ebp+arg_4]
imul	eax, 0Ch
mov	ecx, [ebp+var_A0]
add	eax, [ecx+4]
mov	edx, [ebp+var_A0]
mov	[edx+4], eax

loc_472CE9:
mov	esp, ebp
pop	ebp
retn	10h
sub_472BB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_472CF0(void *)
sub_472CF0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	eax, [ebp+arg_0]
add	eax, 18h
call	sub_40ABB0
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_472D1F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_472D1F:
mov	esp, ebp
pop	ebp
retn
sub_472CF0 endp

align 10h


; Attributes: bp-based frame

sub_472D30 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 2
mov	[ebp+var_40], edx
jmp	short loc_472DAE

loc_472DA5:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_472DAE:
cmp	[ebp+var_40], 0
jle	short loc_472DD8
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_480590
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 4
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 4
mov	[ebp+var_3C], ecx
jmp	short loc_472DA5

loc_472DD8:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_472DFF
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_480590
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_472E4F

loc_472DFF:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 2
mov	[ebp+var_6C], ecx
jmp	short loc_472E31

loc_472E1F:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_68], eax

loc_472E31:
cmp	[ebp+var_6C], 0
jle	short loc_472E49
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_480590
add	esp, 8
jmp	short loc_472E1F

loc_472E49:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_472E4F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_472EE2
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 2
mov	[ebp+var_80], eax
jmp	short loc_472EA9

loc_472EA0:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_472EA9:
cmp	[ebp+var_80], 0
jle	short loc_472EDC
mov	edx, [ebp+var_8C]
push	edx
mov	eax, [ebp+var_7C]
push	eax
call	sub_480590
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 4
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 4
mov	[ebp+var_7C], edx
jmp	short loc_472EA0

loc_472EDC:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_472EE2:
mov	ecx, [ebp+var_CC]
call	sub_5A9660
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_472D30 endp

align 10h


; Attributes: bp-based frame

sub_472F30 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
push	esi
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_472F67
mov	edx, [ebp+var_90]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_472F67
mov	[ebp+var_94], 1
jmp	short loc_472F71

loc_472F67:
mov	[ebp+var_94], 0

loc_472F71:
movzx	ecx, byte ptr [ebp+var_94]
test	ecx, ecx
jz	short loc_472FB4
mov	eax, [ebp+arg_8]
lea	esi, [ebp+var_C]
call	sub_41E510
xor	edx, edx
mov	[ebp+var_D], dl
lea	eax, [ebp+var_D]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_90]
call	sub_472F30
lea	ecx, [ebp+var_C]
call	sub_429100
jmp	loc_47320C

loc_472FB4:
mov	ecx, [ebp+var_90]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 2
mov	[ebp+var_4], edx
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_4730DC
xor	eax, eax
mov	[ebp+var_E], al
mov	ecx, [ebp+var_90]
mov	edx, [ecx+4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_4]
shl	edx, 2
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_24], ecx
push	0
lea	edx, [ebp+var_11]
push	edx
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+var_24]
push	edx
call	sub_47F130
add	esp, 14h
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_4]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_F], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_34], eax
jmp	short loc_473071

loc_473068:
mov	ecx, [ebp+var_34]
sub	ecx, 1
mov	[ebp+var_34], ecx

loc_473071:
cmp	[ebp+var_34], 0
jle	short loc_473097
mov	edx, [ebp+var_38]
sub	edx, 4
mov	[ebp+var_38], edx
mov	eax, [ebp+var_3C]
sub	eax, 4
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_41EAC0
jmp	short loc_473068

loc_473097:
mov	edx, [ebp+arg_0]
mov	[ebp+var_48], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
sub	edx, [ebp+var_48]
sar	edx, 2
mov	[ebp+var_44], edx
jmp	short loc_4730C3

loc_4730B1:
mov	eax, [ebp+var_48]
add	eax, 4
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
sub	ecx, 1
mov	[ebp+var_44], ecx

loc_4730C3:
cmp	[ebp+var_44], 0
jle	short loc_4730D7
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_48]
call	sub_41EAC0
jmp	short loc_4730B1

loc_4730D7:
jmp	loc_47320C

loc_4730DC:
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
mov	eax, [ebp+var_64]
lea	ecx, [eax+edx*4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_64]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_4C]
sub	eax, [ebp+var_64]
sar	eax, 2
mov	[ebp+var_58], eax
jmp	short loc_47311D

loc_47310B:
mov	ecx, [ebp+var_58]
sub	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_54]
add	edx, 4
mov	[ebp+var_54], edx

loc_47311D:
cmp	[ebp+var_58], 0
jle	short loc_473135
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
call	sub_480590
add	esp, 8
jmp	short loc_47310B

loc_473135:
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_4C]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_80], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_80]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_7C]
sar	eax, 2
mov	[ebp+var_70], eax
jmp	short loc_473175

loc_47316C:
mov	ecx, [ebp+var_70]
sub	ecx, 1
mov	[ebp+var_70], ecx

loc_473175:
cmp	[ebp+var_70], 0
jle	short loc_47319F
mov	edx, [ebp+var_7C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_480590
add	esp, 8
mov	ecx, [ebp+var_7C]
add	ecx, 4
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_6C]
add	edx, 4
mov	[ebp+var_6C], edx
jmp	short loc_47316C

loc_47319F:
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
mov	edx, [ebp+arg_0]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_8C]
sar	eax, 2
mov	[ebp+var_88], eax
jmp	short loc_4731F2

loc_4731D4:
mov	ecx, [ebp+var_8C]
add	ecx, 4
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_88]
sub	edx, 1
mov	[ebp+var_88], edx

loc_4731F2:
cmp	[ebp+var_88], 0
jle	short loc_47320C
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_41EAC0
jmp	short loc_4731D4

loc_47320C:
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_472F30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_473220(int, int, void	*)
sub_473220 proc	near

var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_4], eax
jmp	short loc_473242

loc_473239:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_473242:
cmp	[ebp+var_4], 0
jle	short loc_473286
xor	eax, eax
mov	byte ptr [ebp+var_8+1],	al
mov	cl, byte ptr [ebp+var_8+1]
mov	[ebp+var_5], cl
xor	edx, edx
mov	byte ptr [ebp+var_8], dl
mov	al, byte ptr [ebp+var_8]
mov	[ebp+var_6], al
lea	ecx, [ebp+var_6]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+arg_8]
push	eax		; void *
call	sub_47F190
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_8]
add	edx, 1Ch
mov	[ebp+arg_8], edx
jmp	short loc_473239

loc_473286:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_473220 endp

align 10h


; Attributes: bp-based frame

sub_473290 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4732D7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5263A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_473389

loc_4732D7:
cmp	[ebp+arg_10], 0
jnz	short loc_47330E
cmp	[ebp+arg_C], 0
jnz	short loc_473305
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47330E

loc_473305:
mov	[ebp+var_34], 1
jmp	short loc_473315

loc_47330E:
mov	[ebp+var_34], 0

loc_473315:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_473327
and	[ebp+var_C], 0FFFFFFFEh

loc_473327:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47335D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5263A0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47335B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47335B:
jmp	short loc_473389

loc_47335D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5263A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_473389
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_473389:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_473290 endp

align 10h


; Attributes: bp-based frame

sub_4733D0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_473685
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_473439
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AC10
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7

loc_473439:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_473488
jb	short loc_47347C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_473488

loc_47347C:
mov	[ebp+var_AC], 1
jmp	short loc_473492

loc_473488:
mov	[ebp+var_AC], 0

loc_473492:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_4734CD
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7
jmp	loc_473680

loc_4734CD:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_47351C
jb	short loc_473510
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_47351C

loc_473510:
mov	[ebp+var_B8], 1
jmp	short loc_473526

loc_47351C:
mov	[ebp+var_B8], 0

loc_473526:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_47354A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7

loc_47354A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_473594
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7

loc_473594:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4735E3
jb	short loc_4735D7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4735E3

loc_4735D7:
mov	[ebp+var_C4], 1
jmp	short loc_4735ED

loc_4735E3:
mov	[ebp+var_C4], 0

loc_4735ED:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_473655
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_47362E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7
jmp	short loc_473653

loc_47362E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7

loc_473653:
jmp	short loc_473680

loc_473655:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AC10
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7

loc_473680:
jmp	loc_473AD7

loc_473685:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_473761
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4736E9
jb	short loc_4736DD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4736E9

loc_4736DD:
mov	[ebp+var_D0], 1
jmp	short loc_4736F3

loc_4736E9:
mov	[ebp+var_D0], 0

loc_4736F3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_473731
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7
jmp	short loc_47375C

loc_473731:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AC10
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7

loc_47375C:
jmp	loc_473AD7

loc_473761:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4737CA
jb	short loc_4737BE
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4737CA

loc_4737BE:
mov	[ebp+var_DC], 1
jmp	short loc_4737D4

loc_4737CA:
mov	[ebp+var_DC], 0

loc_4737D4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_47385F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_47383E
jb	short loc_473832
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_47383E

loc_473832:
mov	[ebp+var_E8], 1
jmp	short loc_473848

loc_47383E:
mov	[ebp+var_E8], 0

loc_473848:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_47385F
mov	[ebp+var_EC], 1
jmp	short loc_473869

loc_47385F:
mov	[ebp+var_EC], 0

loc_473869:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_47387E
and	[ebp+var_4C], 0FFFFFFFEh

loc_47387E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_4738E0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4738B6
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7
jmp	short loc_4738DB

loc_4738B6:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	loc_473AD7

loc_4738DB:
jmp	loc_473AD7

loc_4738E0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_473978
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_473965
jb	short loc_473959
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_473965

loc_473959:
mov	[ebp+var_F8], 1
jmp	short loc_47396F

loc_473965:
mov	[ebp+var_F8], 0

loc_47396F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_473978:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_473A15
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_473A15
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_473A09
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4739F4
jb	short loc_4739E8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4739F4

loc_4739E8:
mov	[ebp+var_104], 1
jmp	short loc_4739FE

loc_4739F4:
mov	[ebp+var_104], 0

loc_4739FE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_473A15

loc_473A09:
mov	[ebp+var_108], 1
jmp	short loc_473A1F

loc_473A15:
mov	[ebp+var_108], 0

loc_473A1F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_473A34
and	[ebp+var_4C], 0FFFFFFFDh

loc_473A34:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_473A8D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_473A69
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	short loc_473AD7
jmp	short loc_473A8B

loc_473A69:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AAA0
mov	eax, [ebp+arg_0]
jmp	short loc_473AD7

loc_473A8B:
jmp	short loc_473AD7

loc_473A8D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_473AAB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_473AD7
jmp	short loc_473AD7

loc_473AAB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AC10
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_473AD7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4733D0 endp

align 10h


; Attributes: bp-based frame

sub_473AE0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_473CBD
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_473B49
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AF40
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473FA3

loc_473B49:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_473B95
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	loc_473FA3
jmp	loc_473CB8

loc_473B95:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_473BCA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473FA3

loc_473BCA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_473C14
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	loc_473FA3

loc_473C14:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_473C8D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_473C66
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	loc_473FA3
jmp	short loc_473C8B

loc_473C66:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	loc_473FA3

loc_473C8B:
jmp	short loc_473CB8

loc_473C8D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AF40
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473FA3

loc_473CB8:
jmp	loc_473FA3

loc_473CBD:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_473D51
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_473D21
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	loc_473FA3
jmp	short loc_473D4C

loc_473D21:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AF40
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_473FA3

loc_473D4C:
jmp	loc_473FA3

loc_473D51:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_473DC1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_473DC1
mov	[ebp+var_A4], 1
jmp	short loc_473DCB

loc_473DC1:
mov	[ebp+var_A4], 0

loc_473DCB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_473DE0
and	[ebp+var_4C], 0FFFFFFFEh

loc_473DE0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_473E42
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_473E18
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	loc_473FA3
jmp	short loc_473E3D

loc_473E18:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	loc_473FA3

loc_473E3D:
jmp	loc_473FA3

loc_473E42:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_473E92
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_473E92:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_473EE1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_473EE1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_473ED5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_473EE1

loc_473ED5:
mov	[ebp+var_A8], 1
jmp	short loc_473EEB

loc_473EE1:
mov	[ebp+var_A8], 0

loc_473EEB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_473F00
and	[ebp+var_4C], 0FFFFFFFDh

loc_473F00:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_473F59
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_473F35
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	short loc_473FA3
jmp	short loc_473F57

loc_473F35:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47AE00
mov	eax, [ebp+arg_0]
jmp	short loc_473FA3

loc_473F57:
jmp	short loc_473FA3

loc_473F59:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_473F77
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_473FA3
jmp	short loc_473FA3

loc_473F77:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47AF40
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_473FA3:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_473AE0 endp

align 10h


; Attributes: bp-based frame

sub_473FB0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_47418D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_474019
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B210
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474473

loc_474019:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_474065
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	loc_474473
jmp	loc_474188

loc_474065:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_47409A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474473

loc_47409A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4740E4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	loc_474473

loc_4740E4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_47415D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_474136
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	loc_474473
jmp	short loc_47415B

loc_474136:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	loc_474473

loc_47415B:
jmp	short loc_474188

loc_47415D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B210
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474473

loc_474188:
jmp	loc_474473

loc_47418D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_474221
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4741F1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	loc_474473
jmp	short loc_47421C

loc_4741F1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B210
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474473

loc_47421C:
jmp	loc_474473

loc_474221:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_474291
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_474291
mov	[ebp+var_A4], 1
jmp	short loc_47429B

loc_474291:
mov	[ebp+var_A4], 0

loc_47429B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4742B0
and	[ebp+var_4C], 0FFFFFFFEh

loc_4742B0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_474312
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4742E8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	loc_474473
jmp	short loc_47430D

loc_4742E8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	loc_474473

loc_47430D:
jmp	loc_474473

loc_474312:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_474362
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_474362:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4743B1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4743B1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_4743A5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_4743B1

loc_4743A5:
mov	[ebp+var_A8], 1
jmp	short loc_4743BB

loc_4743B1:
mov	[ebp+var_A8], 0

loc_4743BB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4743D0
and	[ebp+var_4C], 0FFFFFFFDh

loc_4743D0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_474429
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_474405
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	short loc_474473
jmp	short loc_474427

loc_474405:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B0D0
mov	eax, [ebp+arg_0]
jmp	short loc_474473

loc_474427:
jmp	short loc_474473

loc_474429:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_474447
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_474473
jmp	short loc_474473

loc_474447:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B210
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_474473:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_473FB0 endp

align 10h


; Attributes: bp-based frame

sub_474480 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_47465D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4744E9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B4E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474943

loc_4744E9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_474535
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	loc_474943
jmp	loc_474658

loc_474535:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_47456A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474943

loc_47456A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4745B4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	loc_474943

loc_4745B4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_47462D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_474606
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	loc_474943
jmp	short loc_47462B

loc_474606:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	loc_474943

loc_47462B:
jmp	short loc_474658

loc_47462D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B4E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474943

loc_474658:
jmp	loc_474943

loc_47465D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4746F1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4746C1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	loc_474943
jmp	short loc_4746EC

loc_4746C1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B4E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474943

loc_4746EC:
jmp	loc_474943

loc_4746F1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_474761
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_474761
mov	[ebp+var_A4], 1
jmp	short loc_47476B

loc_474761:
mov	[ebp+var_A4], 0

loc_47476B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_474780
and	[ebp+var_4C], 0FFFFFFFEh

loc_474780:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4747E2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4747B8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	loc_474943
jmp	short loc_4747DD

loc_4747B8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	loc_474943

loc_4747DD:
jmp	loc_474943

loc_4747E2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_474832
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_474832:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_474881
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_474881
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_474875
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_474881

loc_474875:
mov	[ebp+var_A8], 1
jmp	short loc_47488B

loc_474881:
mov	[ebp+var_A8], 0

loc_47488B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4748A0
and	[ebp+var_4C], 0FFFFFFFDh

loc_4748A0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_4748F9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4748D5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	short loc_474943
jmp	short loc_4748F7

loc_4748D5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B3A0
mov	eax, [ebp+arg_0]
jmp	short loc_474943

loc_4748F7:
jmp	short loc_474943

loc_4748F9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_474917
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_474943
jmp	short loc_474943

loc_474917:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B4E0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_474943:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_474480 endp

align 10h


; Attributes: bp-based frame

sub_474950 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_474B2D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4749B9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B7B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474E13

loc_4749B9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_474A05
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	loc_474E13
jmp	loc_474B28

loc_474A05:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_474A3A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474E13

loc_474A3A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_474A84
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	loc_474E13

loc_474A84:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_474AFD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_474AD6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	loc_474E13
jmp	short loc_474AFB

loc_474AD6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	loc_474E13

loc_474AFB:
jmp	short loc_474B28

loc_474AFD:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B7B0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474E13

loc_474B28:
jmp	loc_474E13

loc_474B2D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_474BC1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_474B91
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	loc_474E13
jmp	short loc_474BBC

loc_474B91:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B7B0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_474E13

loc_474BBC:
jmp	loc_474E13

loc_474BC1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_474C31
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_474C31
mov	[ebp+var_A4], 1
jmp	short loc_474C3B

loc_474C31:
mov	[ebp+var_A4], 0

loc_474C3B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_474C50
and	[ebp+var_4C], 0FFFFFFFEh

loc_474C50:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_474CB2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_474C88
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	loc_474E13
jmp	short loc_474CAD

loc_474C88:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	loc_474E13

loc_474CAD:
jmp	loc_474E13

loc_474CB2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_474D02
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_474D02:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_474D51
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_474D51
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_474D45
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_474D51

loc_474D45:
mov	[ebp+var_A8], 1
jmp	short loc_474D5B

loc_474D51:
mov	[ebp+var_A8], 0

loc_474D5B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_474D70
and	[ebp+var_4C], 0FFFFFFFDh

loc_474D70:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_474DC9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_474DA5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	short loc_474E13
jmp	short loc_474DC7

loc_474DA5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B670
mov	eax, [ebp+arg_0]
jmp	short loc_474E13

loc_474DC7:
jmp	short loc_474E13

loc_474DC9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_474DE7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_474E13
jmp	short loc_474E13

loc_474DE7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B7B0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_474E13:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_474950 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_474E20(void *)
sub_474E20 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_46C9D0
xor	ecx, ecx
and	ecx, 1
jz	short loc_474E47
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_474E47:
mov	esp, ebp
pop	ebp
retn
sub_474E20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_474E50(void *)
sub_474E50 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 5Ch
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_474E77
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_474E77:
mov	esp, ebp
pop	ebp
retn
sub_474E50 endp

align 10h


; Attributes: bp-based frame

sub_474E80 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_474EC7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6F30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_474F79

loc_474EC7:
cmp	[ebp+arg_10], 0
jnz	short loc_474EFE
cmp	[ebp+arg_C], 0
jnz	short loc_474EF5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_474EFE

loc_474EF5:
mov	[ebp+var_34], 1
jmp	short loc_474F05

loc_474EFE:
mov	[ebp+var_34], 0

loc_474F05:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_474F17
and	[ebp+var_C], 0FFFFFFFEh

loc_474F17:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_474F4D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6F30
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_474F4B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_474F4B:
jmp	short loc_474F79

loc_474F4D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6F30
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_474F79
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_474F79:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_474E80 endp

align 10h


; Attributes: bp-based frame

sub_474FC0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_475007
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6C40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_4750B6

loc_475007:
cmp	[ebp+arg_10], 0
jnz	short loc_47503B
cmp	[ebp+arg_C], 0
jnz	short loc_475032
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_47503B

loc_475032:
mov	[ebp+var_34], 1
jmp	short loc_475042

loc_47503B:
mov	[ebp+var_34], 0

loc_475042:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_475054
and	[ebp+var_C], 0FFFFFFFEh

loc_475054:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47508A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6C40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_475088
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_475088:
jmp	short loc_4750B6

loc_47508A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6C40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4750B6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_4750B6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_474FC0 endp

align 10h


; Attributes: bp-based frame

sub_475100 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4752E0
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_475169
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47BA80
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4755CB

loc_475169:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_4751B6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	loc_4755CB
jmp	loc_4752DB

loc_4751B6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_4751EC
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4755CB

loc_4751EC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_475236
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	loc_4755CB

loc_475236:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4752B0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_475289
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	loc_4755CB
jmp	short loc_4752AE

loc_475289:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	loc_4755CB

loc_4752AE:
jmp	short loc_4752DB

loc_4752B0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47BA80
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4755CB

loc_4752DB:
jmp	loc_4755CB

loc_4752E0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_475375
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_475345
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	loc_4755CB
jmp	short loc_475370

loc_475345:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47BA80
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4755CB

loc_475370:
jmp	loc_4755CB

loc_475375:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_4753E7
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4753E7
mov	[ebp+var_A4], 1
jmp	short loc_4753F1

loc_4753E7:
mov	[ebp+var_A4], 0

loc_4753F1:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_475406
and	[ebp+var_4C], 0FFFFFFFEh

loc_475406:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_475468
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_47543E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	loc_4755CB
jmp	short loc_475463

loc_47543E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	loc_4755CB

loc_475463:
jmp	loc_4755CB

loc_475468:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4754B9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_4754B9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_475509
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_475509
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_4754FD
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_475509

loc_4754FD:
mov	[ebp+var_A8], 1
jmp	short loc_475513

loc_475509:
mov	[ebp+var_A8], 0

loc_475513:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_475528
and	[ebp+var_4C], 0FFFFFFFDh

loc_475528:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_475581
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_47555D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	short loc_4755CB
jmp	short loc_47557F

loc_47555D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47B940
mov	eax, [ebp+arg_0]
jmp	short loc_4755CB

loc_47557F:
jmp	short loc_4755CB

loc_475581:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_47559F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4755CB
jmp	short loc_4755CB

loc_47559F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47BA80
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4755CB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_475100 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4755E0(void *)
sub_4755E0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_5D2630
xor	ecx, ecx
and	ecx, 1
jz	short loc_475607
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_475607:
mov	esp, ebp
pop	ebp
retn
sub_4755E0 endp

align 10h


; Attributes: bp-based frame

sub_475610 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4757E4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_475679
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_47BD50
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_475ABB

loc_475679:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_4756C2
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	loc_475ABB
jmp	loc_4757DF

loc_4756C2:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_4756F4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_475ABB

loc_4756F4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_47573E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	loc_475ABB

loc_47573E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4757B4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_47578D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	loc_475ABB
jmp	short loc_4757B2

loc_47578D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	loc_475ABB

loc_4757B2:
jmp	short loc_4757DF

loc_4757B4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_47BD50
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_475ABB

loc_4757DF:
jmp	loc_475ABB

loc_4757E4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_475875
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_475845
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	loc_475ABB
jmp	short loc_475870

loc_475845:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_47BD50
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_475ABB

loc_475870:
jmp	loc_475ABB

loc_475875:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_4758DF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_4758DF
mov	[ebp+var_C4], 1
jmp	short loc_4758E9

loc_4758DF:
mov	[ebp+var_C4], 0

loc_4758E9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4758FE
and	[ebp+var_4C], 0FFFFFFFEh

loc_4758FE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_475960
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_475936
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	loc_475ABB
jmp	short loc_47595B

loc_475936:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	loc_475ABB

loc_47595B:
jmp	loc_475ABB

loc_475960:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4759AD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_4759AD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_4759F9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4759F9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_4759ED
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_4759F9

loc_4759ED:
mov	[ebp+var_C8], 1
jmp	short loc_475A03

loc_4759F9:
mov	[ebp+var_C8], 0

loc_475A03:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_475A18
and	[ebp+var_4C], 0FFFFFFFDh

loc_475A18:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_475A71
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_475A4D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	short loc_475ABB
jmp	short loc_475A6F

loc_475A4D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_47BC10
mov	eax, [ebp+arg_0]
jmp	short loc_475ABB

loc_475A6F:
jmp	short loc_475ABB

loc_475A71:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_475A8F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_475ABB
jmp	short loc_475ABB

loc_475A8F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_47BD50
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_475ABB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_475610 endp

align 10h


; Attributes: bp-based frame

sub_475AD0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 2
mov	[ebp+var_40], edx
jmp	short loc_475B4E

loc_475B45:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_475B4E:
cmp	[ebp+var_40], 0
jle	short loc_475B78
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_470230
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 4
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 4
mov	[ebp+var_3C], ecx
jmp	short loc_475B45

loc_475B78:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_475B9F
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_470230
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_475BEF

loc_475B9F:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 2
mov	[ebp+var_6C], ecx
jmp	short loc_475BD1

loc_475BBF:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_68], eax

loc_475BD1:
cmp	[ebp+var_6C], 0
jle	short loc_475BE9
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_470230
add	esp, 8
jmp	short loc_475BBF

loc_475BE9:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_475BEF:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_475C82
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 2
mov	[ebp+var_80], eax
jmp	short loc_475C49

loc_475C40:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_475C49:
cmp	[ebp+var_80], 0
jle	short loc_475C7C
mov	edx, [ebp+var_8C]
push	edx
mov	eax, [ebp+var_7C]
push	eax
call	sub_470230
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 4
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 4
mov	[ebp+var_7C], edx
jmp	short loc_475C40

loc_475C7C:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_475C82:
mov	ecx, [ebp+var_CC]
call	sub_5E3770
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_475AD0 endp

align 10h


; Attributes: bp-based frame

sub_475CD0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_475D06
mov	edx, [ebp+var_90]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_475D06
mov	[ebp+var_94], 1
jmp	short loc_475D10

loc_475D06:
mov	[ebp+var_94], 0

loc_475D10:
movzx	ecx, byte ptr [ebp+var_94]
test	ecx, ecx
jz	short loc_475D64
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_475D31
mov	ecx, [ebp+var_C]
call	sub_40AA80

loc_475D31:
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
call	sub_475CD0
cmp	[ebp+var_C], 0
jz	short loc_475D5F
mov	ecx, [ebp+var_C]
call	sub_40AA90

loc_475D5F:
jmp	loc_475F24

loc_475D64:
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_475E35
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_24], eax
push	0
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
call	sub_47F420
add	esp, 14h
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_90]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_F], cl
lea	edx, [ebp+var_F]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_8]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CCE10
add	esp, 10h
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_47BEE0
add	esp, 0Ch
jmp	loc_475F24

loc_475E35:
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
mov	eax, [ebp+var_64]
lea	ecx, [eax+edx*4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_64]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_4C]
sub	eax, [ebp+var_64]
sar	eax, 2
mov	[ebp+var_58], eax
jmp	short loc_475E76

loc_475E64:
mov	ecx, [ebp+var_58]
sub	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_54]
add	edx, 4
mov	[ebp+var_54], edx

loc_475E76:
cmp	[ebp+var_58], 0
jle	short loc_475E8E
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
call	sub_470230
add	esp, 8
jmp	short loc_475E64

loc_475E8E:
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_4C]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_80], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_80]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_7C]
sar	eax, 2
mov	[ebp+var_70], eax
jmp	short loc_475ECE

loc_475EC5:
mov	ecx, [ebp+var_70]
sub	ecx, 1
mov	[ebp+var_70], ecx

loc_475ECE:
cmp	[ebp+var_70], 0
jle	short loc_475EF8
mov	edx, [ebp+var_7C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_470230
add	esp, 8
mov	ecx, [ebp+var_7C]
add	ecx, 4
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_6C]
add	edx, 4
mov	[ebp+var_6C], edx
jmp	short loc_475EC5

loc_475EF8:
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47BEE0
add	esp, 0Ch

loc_475F24:
mov	esp, ebp
pop	ebp
retn	10h
sub_475CD0 endp

align 10h


; Attributes: bp-based frame

sub_475F30 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_475F56
push	4
mov	edx, [ebp+arg_0]
push	edx
call	sub_1111040
add	esp, 8

loc_475F56:
mov	esp, ebp
pop	ebp
retn
sub_475F30 endp

align 10h


; Attributes: bp-based frame

sub_475F60 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_475F7A

loc_475F71:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_475F7A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_475F9D
mov	[ebp+var_8], 80h
push	2
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_49CAE0
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_475F71

loc_475F9D:
mov	esp, ebp
pop	ebp
retn	8
sub_475F60 endp

align 10h


; Attributes: bp-based frame

sub_475FB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_475FCA

loc_475FC1:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_475FCA:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_475FFE
mov	[ebp+var_8], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_475FFC
mov	edx, 2
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_475FFC:
jmp	short loc_475FC1

loc_475FFE:
mov	esp, ebp
pop	ebp
retn	8
sub_475FB0 endp

align 10h


; Attributes: bp-based frame

sub_476010 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_64]
cmp	[edx+24h], ecx
jbe	short loc_4760BB
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_476093
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_4760B6

loc_476093:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_4760B6:
jmp	loc_476168

loc_4760BB:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_64]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5A9600
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_476156
mov	ecx, [ebp+var_50]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_476156:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_476168:
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 2
imul	eax, 30h
mov	ecx, [ebp+var_64]
add	eax, [ecx+4]
mov	edx, [ebp+var_64]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_58], 80h
mov	eax, 2
imul	eax, 30h
mov	ecx, [ebp+var_5C]
add	eax, [ecx+4]
mov	edx, [ebp+var_5C]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_476010 endp

align 10h


; Attributes: bp-based frame

sub_4761F0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	al, [ebp+var_1]
mov	ecx, [ebp+arg_0]
mov	[ecx], al
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4761F0 endp

align 10h


; Attributes: bp-based frame

sub_476210 proc	near

var_72=	byte ptr -72h
var_71=	byte ptr -71h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 74h
push	esi

loc_476217:
lea	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_1C]
setnz	dl
mov	[ebp+var_71], dl
movzx	eax, [ebp+var_71]
test	eax, eax
jz	loc_476329
lea	ecx, [ebp+var_24]
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	edx, [ebp+arg_C]
xor	eax, eax
cmp	edx, [ebp+var_24]
setnz	al
mov	[ebp+var_72], al
movzx	ecx, [ebp+var_72]
test	ecx, ecx
jz	loc_476329
mov	edx, [ebp+arg_C]
add	edx, 10h
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_2C], eax
mov	eax, [ebp+var_28]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_2C]
call	sub_420D20
cmp	eax, esi
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_4762C4
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
push	ecx
lea	ecx, [ebp+arg_14]
call	sub_479730
mov	edx, [ebp+arg_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
jmp	short loc_476324

loc_4762C4:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_40], eax
mov	ecx, [ebp+arg_C]
add	ecx, 10h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_40]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_44]
call	sub_420D20
cmp	eax, esi
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_476306
mov	ecx, [ebp+arg_C]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax
jmp	short loc_476324

loc_476306:
mov	edx, [ebp+arg_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax

loc_476324:
jmp	loc_476217

loc_476329:
sub	esp, 8
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+var_4C]
add	eax, 4
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_48]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_50]
call	sub_4046E0
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47BFD0
add	esp, 14h
mov	eax, [ebp+arg_0]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_476210 endp

align 10h


; Attributes: bp-based frame

sub_476380 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_476560
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4763E9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47C0E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47684B

loc_4763E9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_476436
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	loc_47684B
jmp	loc_47655B

loc_476436:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_47646C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47684B

loc_47646C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4764B6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	loc_47684B

loc_4764B6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_476530
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_476509
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	loc_47684B
jmp	short loc_47652E

loc_476509:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	loc_47684B

loc_47652E:
jmp	short loc_47655B

loc_476530:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47C0E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47684B

loc_47655B:
jmp	loc_47684B

loc_476560:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4765F5
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4765C5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	loc_47684B
jmp	short loc_4765F0

loc_4765C5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47C0E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47684B

loc_4765F0:
jmp	loc_47684B

loc_4765F5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_476667
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_476667
mov	[ebp+var_A4], 1
jmp	short loc_476671

loc_476667:
mov	[ebp+var_A4], 0

loc_476671:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_476686
and	[ebp+var_4C], 0FFFFFFFEh

loc_476686:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4766E8
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4766BE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	loc_47684B
jmp	short loc_4766E3

loc_4766BE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	loc_47684B

loc_4766E3:
jmp	loc_47684B

loc_4766E8:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_476739
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_476739:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_476789
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_476789
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_47677D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_476789

loc_47677D:
mov	[ebp+var_A8], 1
jmp	short loc_476793

loc_476789:
mov	[ebp+var_A8], 0

loc_476793:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4767A8
and	[ebp+var_4C], 0FFFFFFFDh

loc_4767A8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_476801
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4767DD
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	short loc_47684B
jmp	short loc_4767FF

loc_4767DD:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5ADA90
mov	eax, [ebp+arg_0]
jmp	short loc_47684B

loc_4767FF:
jmp	short loc_47684B

loc_476801:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_47681F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_47684B
jmp	short loc_47684B

loc_47681F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47C0E0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_47684B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_476380 endp

align 10h


; Attributes: bp-based frame

sub_476860 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4768A7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4797B0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47695A

loc_4768A7:
cmp	[ebp+arg_10], 0
jnz	short loc_4768DF
cmp	[ebp+arg_C], 0
jnz	short loc_4768D6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4768DF

loc_4768D6:
mov	[ebp+var_34], 1
jmp	short loc_4768E6

loc_4768DF:
mov	[ebp+var_34], 0

loc_4768E6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4768F8
and	[ebp+var_C], 0FFFFFFFEh

loc_4768F8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47692E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_4797B0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47692C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47692C:
jmp	short loc_47695A

loc_47692E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4797B0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47695A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47695A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_476860 endp

align 10h


; Attributes: bp-based frame

sub_4769A0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_476B80
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_476A09
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47C3B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_476E6B

loc_476A09:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_476A56
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	loc_476E6B
jmp	loc_476B7B

loc_476A56:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_476A8C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_476E6B

loc_476A8C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_476AD6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	loc_476E6B

loc_476AD6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_476B50
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_476B29
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	loc_476E6B
jmp	short loc_476B4E

loc_476B29:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	loc_476E6B

loc_476B4E:
jmp	short loc_476B7B

loc_476B50:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47C3B0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_476E6B

loc_476B7B:
jmp	loc_476E6B

loc_476B80:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_476C15
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_476BE5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	loc_476E6B
jmp	short loc_476C10

loc_476BE5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47C3B0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_476E6B

loc_476C10:
jmp	loc_476E6B

loc_476C15:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_476C87
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_476C87
mov	[ebp+var_A4], 1
jmp	short loc_476C91

loc_476C87:
mov	[ebp+var_A4], 0

loc_476C91:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_476CA6
and	[ebp+var_4C], 0FFFFFFFEh

loc_476CA6:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_476D08
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_476CDE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	loc_476E6B
jmp	short loc_476D03

loc_476CDE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	loc_476E6B

loc_476D03:
jmp	loc_476E6B

loc_476D08:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_476D59
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_476D59:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_476DA9
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_476DA9
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_476D9D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_476DA9

loc_476D9D:
mov	[ebp+var_A8], 1
jmp	short loc_476DB3

loc_476DA9:
mov	[ebp+var_A8], 0

loc_476DB3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_476DC8
and	[ebp+var_4C], 0FFFFFFFDh

loc_476DC8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_476E21
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_476DFD
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	short loc_476E6B
jmp	short loc_476E1F

loc_476DFD:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47C270
mov	eax, [ebp+arg_0]
jmp	short loc_476E6B

loc_476E1F:
jmp	short loc_476E6B

loc_476E21:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_476E3F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_476E6B
jmp	short loc_476E6B

loc_476E3F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47C3B0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_476E6B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4769A0 endp

align 10h


; Attributes: bp-based frame

sub_476E80 proc	near

var_48=	dword ptr -48h
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_8]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
lea	ecx, [ebp+var_8]
call	sub_47C540
call	nullsub_1
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	ecx, [ebp+var_48]
call	sub_4794F0
lea	ecx, [ebp+var_8]
call	sub_409540
mov	esp, ebp
pop	ebp
retn	10h
sub_476E80 endp

align 10h


; Attributes: bp-based frame

sub_476EE0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_476F27
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_479800
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_476FD6

loc_476F27:
cmp	[ebp+arg_10], 0
jnz	short loc_476F5B
cmp	[ebp+arg_C], 0
jnz	short loc_476F52
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_476F5B

loc_476F52:
mov	[ebp+var_34], 1
jmp	short loc_476F62

loc_476F5B:
mov	[ebp+var_34], 0

loc_476F62:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_476F74
and	[ebp+var_C], 0FFFFFFFEh

loc_476F74:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_476FAA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_479800
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_476FA8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_476FA8:
jmp	short loc_476FD6

loc_476FAA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_479800
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_476FD6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_476FD6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_476EE0 endp

align 10h


; Attributes: bp-based frame

sub_477020 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_477067
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_479850
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_477116

loc_477067:
cmp	[ebp+arg_10], 0
jnz	short loc_47709B
cmp	[ebp+arg_C], 0
jnz	short loc_477092
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_47709B

loc_477092:
mov	[ebp+var_34], 1
jmp	short loc_4770A2

loc_47709B:
mov	[ebp+var_34], 0

loc_4770A2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_4770B4
and	[ebp+var_C], 0FFFFFFFEh

loc_4770B4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4770EA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_479850
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4770E8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_4770E8:
jmp	short loc_477116

loc_4770EA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_479850
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_477116
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_477116:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_477020 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_477160(void *)
sub_477160 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_47718F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_47718F:
mov	esp, ebp
pop	ebp
retn
sub_477160 endp

align 10h


; Attributes: bp-based frame

sub_4771A0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47C620
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4771A0 endp

align 10h


; Attributes: bp-based frame

sub_4771D0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 2
mov	[ebp+var_40], edx
jmp	short loc_47724E

loc_477245:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_47724E:
cmp	[ebp+var_40], 0
jle	short loc_477278
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_470230
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 4
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 4
mov	[ebp+var_3C], ecx
jmp	short loc_477245

loc_477278:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_47729F
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_470230
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_4772EF

loc_47729F:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 2
mov	[ebp+var_6C], ecx
jmp	short loc_4772D1

loc_4772BF:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_68], eax

loc_4772D1:
cmp	[ebp+var_6C], 0
jle	short loc_4772E9
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_470230
add	esp, 8
jmp	short loc_4772BF

loc_4772E9:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_4772EF:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_477382
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 2
mov	[ebp+var_80], eax
jmp	short loc_477349

loc_477340:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_477349:
cmp	[ebp+var_80], 0
jle	short loc_47737C
mov	edx, [ebp+var_8C]
push	edx
mov	eax, [ebp+var_7C]
push	eax
call	sub_470230
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 4
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 4
mov	[ebp+var_7C], edx
jmp	short loc_477340

loc_47737C:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_477382:
mov	ecx, [ebp+var_CC]
call	sub_5A9660
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_4771D0 endp

align 10h


; Attributes: bp-based frame

sub_4773D0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
push	edi
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_477407
mov	edx, [ebp+var_90]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_477407
mov	[ebp+var_94], 1
jmp	short loc_477411

loc_477407:
mov	[ebp+var_94], 0

loc_477411:
movzx	ecx, byte ptr [ebp+var_94]
test	ecx, ecx
jz	short loc_47745F
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_477432
mov	ecx, [ebp+var_C]
call	sub_40AA80

loc_477432:
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
call	sub_4773D0
lea	ecx, [ebp+var_C]
call	sub_429100
jmp	loc_4776B7

loc_47745F:
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_477587
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_24], eax
push	0
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
call	sub_47F420
add	esp, 14h
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_90]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_F], cl
mov	edx, [ebp+var_8]
mov	[ebp+var_3C], edx
mov	eax, [ebp+arg_4]
shl	eax, 2
mov	ecx, [ebp+var_8]
sub	ecx, eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
sub	edx, [ebp+arg_0]
sar	edx, 2
mov	[ebp+var_34], edx
jmp	short loc_47751C

loc_477513:
mov	eax, [ebp+var_34]
sub	eax, 1
mov	[ebp+var_34], eax

loc_47751C:
cmp	[ebp+var_34], 0
jle	short loc_477542
mov	ecx, [ebp+var_38]
sub	ecx, 4
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_3C]
sub	edx, 4
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_38]
push	eax
mov	edi, [ebp+var_3C]
call	sub_418760
jmp	short loc_477513

loc_477542:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_48], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*4]
sub	ecx, [ebp+var_48]
sar	ecx, 2
mov	[ebp+var_44], ecx
jmp	short loc_47756E

loc_47755C:
mov	edx, [ebp+var_48]
add	edx, 4
mov	[ebp+var_48], edx
mov	eax, [ebp+var_44]
sub	eax, 1
mov	[ebp+var_44], eax

loc_47756E:
cmp	[ebp+var_44], 0
jle	short loc_477582
mov	ecx, [ebp+arg_8]
push	ecx
mov	edi, [ebp+var_48]
call	sub_418760
jmp	short loc_47755C

loc_477582:
jmp	loc_4776B7

loc_477587:
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
mov	edx, [ebp+var_64]
lea	eax, [edx+ecx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_64]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_4C]
sub	edx, [ebp+var_64]
sar	edx, 2
mov	[ebp+var_58], edx
jmp	short loc_4775C8

loc_4775B6:
mov	eax, [ebp+var_58]
sub	eax, 1
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_54]
add	ecx, 4
mov	[ebp+var_54], ecx

loc_4775C8:
cmp	[ebp+var_58], 0
jle	short loc_4775E0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_54]
push	eax
call	sub_470230
add	esp, 8
jmp	short loc_4775B6

loc_4775E0:
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_4C]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_10], al
mov	ecx, [ebp+var_90]
mov	edx, [ecx+4]
mov	[ebp+var_80], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_80]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_7C]
sar	edx, 2
mov	[ebp+var_70], edx
jmp	short loc_477620

loc_477617:
mov	eax, [ebp+var_70]
sub	eax, 1
mov	[ebp+var_70], eax

loc_477620:
cmp	[ebp+var_70], 0
jle	short loc_47764A
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
call	sub_470230
add	esp, 8
mov	eax, [ebp+var_7C]
add	eax, 4
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_6C]
add	ecx, 4
mov	[ebp+var_6C], ecx
jmp	short loc_477617

loc_47764A:
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_90]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_8C]
sar	edx, 2
mov	[ebp+var_88], edx
jmp	short loc_47769D

loc_47767F:
mov	eax, [ebp+var_8C]
add	eax, 4
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_88]
sub	ecx, 1
mov	[ebp+var_88], ecx

loc_47769D:
cmp	[ebp+var_88], 0
jle	short loc_4776B7
mov	edx, [ebp+arg_8]
push	edx
mov	edi, [ebp+var_8C]
call	sub_418760
jmp	short loc_47767F

loc_4776B7:
pop	edi
mov	esp, ebp
pop	ebp
retn	10h
sub_4773D0 endp

align 10h


; Attributes: bp-based frame

sub_4776C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 0
jmp	short loc_4776D5

loc_4776CD:
mov	eax, [ebp+arg_0]
sar	eax, 1
mov	[ebp+arg_0], eax

loc_4776D5:
cmp	[ebp+arg_0], 1
jz	short loc_4776E6
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
jmp	short loc_4776CD

loc_4776E6:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4776C0 endp

align 10h


; Attributes: bp-based frame

sub_4776F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 2Ch

loc_4776F6:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	loc_4777B3
cmp	[ebp+arg_C], 0
jnz	short loc_47772C
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47C8D0
add	esp, 10h
jmp	loc_4777B3

loc_47772C:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 8
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cdq
sub	eax, edx
sar	eax, 1
mov	edx, [ebp+arg_0]
lea	eax, [edx+eax*8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47C8F0
add	esp, 10h
mov	edx, [eax]
mov	eax, [eax+4]
mov	[ebp+var_C], edx
mov	[ebp+var_8], eax
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+var_8]
push	edx		; float
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; int
call	sub_47CA00
add	esp, 14h
mov	[ebp+var_4], eax
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_4776F0
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_4776F6

loc_4777B3:
mov	esp, ebp
pop	ebp
retn
sub_4776F0 endp

align 10h


; Attributes: bp-based frame

sub_4777C0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	short loc_477814
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 80h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47CAA0
add	esp, 10h
mov	cl, [ebp+arg_8]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 80h
push	ecx
call	sub_47F5E0
add	esp, 10h
jmp	short loc_47782B

loc_477814:
movzx	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47CAA0
add	esp, 10h

loc_47782B:
mov	esp, ebp
pop	ebp
retn
sub_4777C0 endp

align 10h


; Attributes: bp-based frame

sub_477830 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 2Ch

loc_477836:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	loc_4778F3
cmp	[ebp+arg_C], 0
jnz	short loc_47786C
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47CB50
add	esp, 10h
jmp	loc_4778F3

loc_47786C:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 8
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cdq
sub	eax, edx
sar	eax, 1
mov	edx, [ebp+arg_0]
lea	eax, [edx+eax*8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47CB70
add	esp, 10h
mov	edx, [eax]
mov	eax, [eax+4]
mov	[ebp+var_C], edx
mov	[ebp+var_8], eax
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+var_8]
push	edx		; float
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; int
call	sub_47CC90
add	esp, 14h
mov	[ebp+var_4], eax
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_477830
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_477836

loc_4778F3:
mov	esp, ebp
pop	ebp
retn
sub_477830 endp

align 10h


; Attributes: bp-based frame

sub_477900 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	short loc_477954
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 80h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47CD30
add	esp, 10h
mov	cl, [ebp+arg_8]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 80h
push	ecx
call	sub_47F710
add	esp, 10h
jmp	short loc_47796B

loc_477954:
movzx	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47CD30
add	esp, 10h

loc_47796B:
mov	esp, ebp
pop	ebp
retn
sub_477900 endp

align 10h


; Attributes: bp-based frame

sub_477970 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
push	esi
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4779B8
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E3D40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_477A74

loc_4779B8:
cmp	[ebp+arg_10], 0
jnz	short loc_4779F9
cmp	[ebp+arg_C], 0
jnz	short loc_4779F0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+arg_8]
call	sub_420D20
cmp	eax, esi
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4779F9

loc_4779F0:
mov	[ebp+var_34], 1
jmp	short loc_477A00

loc_4779F9:
mov	[ebp+var_34], 0

loc_477A00:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_477A12
and	[ebp+var_C], 0FFFFFFFEh

loc_477A12:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_477A48
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5E3D40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_477A46
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_477A46:
jmp	short loc_477A74

loc_477A48:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5E3D40
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_477A74
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_477A74:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_477970 endp

align 10h


; Attributes: bp-based frame

sub_477AC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	ecx

loc_477AC4:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cmp	eax, 10h
jle	loc_477B6E
cmp	[ebp+arg_C], 0
jnz	short loc_477AF7
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47D190
add	esp, 10h
jmp	short loc_477B6E

loc_477AF7:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
movzx	eax, [ebp+arg_10]
push	eax
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, 4
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47D1B0
add	esp, 10h
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47D2D0
add	esp, 10h
mov	[ebp+var_4], eax
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_477AC0
add	esp, 14h
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
jmp	loc_477AC4

loc_477B6E:
mov	esp, ebp
pop	ebp
retn
sub_477AC0 endp

align 10h


; Attributes: bp-based frame

sub_477B80 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cmp	eax, 10h
jle	short loc_477BC7
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 40h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47D380
add	esp, 10h
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 40h
push	eax
call	sub_47F8A0
add	esp, 10h
jmp	short loc_477BDE

loc_477BC7:
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47D380
add	esp, 10h

loc_477BDE:
pop	ebp
retn
sub_477B80 endp



; Attributes: bp-based frame

sub_477BE0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_477DBD
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_477C49
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D570
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4780A3

loc_477C49:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_477C95
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	loc_4780A3
jmp	loc_477DB8

loc_477C95:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_477CCA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4780A3

loc_477CCA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_477D14
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	loc_4780A3

loc_477D14:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_477D8D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_477D66
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	loc_4780A3
jmp	short loc_477D8B

loc_477D66:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	loc_4780A3

loc_477D8B:
jmp	short loc_477DB8

loc_477D8D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D570
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4780A3

loc_477DB8:
jmp	loc_4780A3

loc_477DBD:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_477E51
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_477E21
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	loc_4780A3
jmp	short loc_477E4C

loc_477E21:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D570
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4780A3

loc_477E4C:
jmp	loc_4780A3

loc_477E51:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_477EC1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_477EC1
mov	[ebp+var_A4], 1
jmp	short loc_477ECB

loc_477EC1:
mov	[ebp+var_A4], 0

loc_477ECB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_477EE0
and	[ebp+var_4C], 0FFFFFFFEh

loc_477EE0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_477F42
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_477F18
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	loc_4780A3
jmp	short loc_477F3D

loc_477F18:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	loc_4780A3

loc_477F3D:
jmp	loc_4780A3

loc_477F42:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_477F92
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_477F92:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_477FE1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_477FE1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_477FD5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_477FE1

loc_477FD5:
mov	[ebp+var_A8], 1
jmp	short loc_477FEB

loc_477FE1:
mov	[ebp+var_A8], 0

loc_477FEB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_478000
and	[ebp+var_4C], 0FFFFFFFDh

loc_478000:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_478059
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_478035
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	short loc_4780A3
jmp	short loc_478057

loc_478035:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D430
mov	eax, [ebp+arg_0]
jmp	short loc_4780A3

loc_478057:
jmp	short loc_4780A3

loc_478059:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_478077
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4780A3
jmp	short loc_4780A3

loc_478077:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D570
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4780A3:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_477BE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4780B0(void *)
sub_4780B0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_471070
xor	ecx, ecx
and	ecx, 1
jz	short loc_4780D7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4780D7:
mov	esp, ebp
pop	ebp
retn
sub_4780B0 endp

align 10h


; Attributes: bp-based frame

sub_4780E0 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_4780F3

loc_4780EB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_4780F3:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_47812F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_469620
jmp	short loc_4780EB

loc_47812F:
mov	esp, ebp
pop	ebp
retn	10h
sub_4780E0 endp

align 10h


; Attributes: bp-based frame

sub_478140 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_47D9D0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_478140 endp

align 10h


; Attributes: bp-based frame

sub_478180 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_47DA30
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_478180 endp

align 10h


; Attributes: bp-based frame

sub_4781C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_47DA90
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4781C0 endp

align 10h


; Attributes: bp-based frame

sub_478200 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	byte ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 0E0h
push	esi
mov	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_18]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_1C]
mov	[ebp+var_2C], ecx
mov	edx, 1
neg	edx
push	edx
lea	ecx, [ebp+var_38]
call	sub_479AE0
mov	eax, [ebp+var_38]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_30]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_3C], ecx
movzx	edx, [ebp+arg_20]
push	edx
sub	esp, 30h
mov	[ebp+var_40], esp
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_3C]
add	eax, 4
push	eax
mov	ecx, [ebp+var_40]
add	ecx, 4
call	sub_403400
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_3C]
mov	eax, [edx+2Ch]
mov	[ecx+2Ch], eax
mov	[ebp+var_44], 80h
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_24]
cdq
mov	ecx, 30h
idiv	ecx
mov	ecx, eax
mov	eax, [ebp+arg_10]
sub	eax, [ebp+arg_14]
cdq
mov	esi, 30h
idiv	esi
mov	edx, [ebp+arg_1C]
sub	edx, [ebp+var_18]
sar	edx, 2
sub	edx, 1
imul	edx, 2
add	edx, eax
add	edx, ecx
mov	[ebp+var_48], edx
push	0
mov	eax, [ebp+var_48]
sub	eax, 1
push	eax
sub	esp, 10h
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
call	sub_47DB80
add	esp, 4Ch
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_478200 endp

align 10h


; Attributes: bp-based frame

sub_478310 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_24=	byte ptr  2Ch

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	eax, [ebp+arg_10]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+arg_18]
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_1C]
mov	[ebp+var_24], eax
mov	ecx, 1
neg	ecx
push	ecx
lea	ecx, [ebp+var_30]
call	sub_479AE0
mov	edx, [ebp+var_30]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_34], eax
push	0
movzx	ecx, [ebp+arg_24]
push	ecx
sub	esp, 30h
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
add	edx, 4
push	edx
mov	ecx, [ebp+var_38]
add	ecx, 4
call	sub_403400
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_34]
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
sub	esp, 10h
mov	[ebp+var_4C], esp
mov	eax, [ebp+arg_10]
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_44], ecx
mov	edx, [ebp+arg_18]
mov	[ebp+var_40], edx
mov	eax, [ebp+arg_1C]
mov	[ebp+var_3C], eax
mov	ecx, 1
neg	ecx
push	ecx
lea	ecx, [ebp+var_48]
call	sub_479AE0
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_48]
mov	[edx], eax
mov	ecx, [ebp+var_44]
mov	[edx+4], ecx
mov	eax, [ebp+var_40]
mov	[edx+8], eax
mov	ecx, [ebp+var_3C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_60], esp
mov	edx, [ebp+arg_10]
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_14]
mov	[ebp+var_58], eax
mov	ecx, [ebp+arg_18]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_1C]
mov	[ebp+var_50], edx
mov	eax, 1
neg	eax
push	eax
lea	ecx, [ebp+var_5C]
call	sub_479AE0
mov	ecx, [ebp+var_60]
mov	edx, [ebp+var_5C]
mov	[ecx], edx
mov	eax, [ebp+var_58]
mov	[ecx+4], eax
mov	edx, [ebp+var_54]
mov	[ecx+8], edx
mov	eax, [ebp+var_50]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_64]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
call	sub_47DD60
add	esp, 68h
mov	esp, ebp
pop	ebp
retn
sub_478310 endp



; Attributes: bp-based frame

sub_478450 proc	near

var_44=	dword ptr -44h
var_34=	dword ptr -34h
var_24=	dword ptr -24h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 44h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_34]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
jmp	short loc_4784A5

loc_47849D:
lea	ecx, [ebp+var_44]
call	sub_47EFF0

loc_4784A5:
mov	eax, [ebp+var_44]
xor	ecx, ecx
cmp	eax, [ebp+var_34]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4784E2
xor	eax, eax
mov	[ebp+var_15], al
mov	ecx, [ebp+var_44]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
add	ecx, 4
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_4784E0
mov	eax, [ebp+var_24]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4784E0:
jmp	short loc_47849D

loc_4784E2:
mov	esp, ebp
pop	ebp
retn
sub_478450 endp

align 10h


; Attributes: bp-based frame

sub_4784F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_47DE60
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4784F0 endp

align 10h


; Attributes: bp-based frame

sub_478530 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+arg_0]
sar	edx, 2
mov	[ebp+var_14], edx
jmp	short loc_47857E

loc_47856C:
mov	eax, [ebp+var_14]
sub	eax, 1
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
add	ecx, 4
mov	[ebp+var_10], ecx

loc_47857E:
cmp	[ebp+var_14], 0
jle	short loc_478596
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_480590
add	esp, 8
jmp	short loc_47856C

loc_478596:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_478530 endp

align 10h


; Attributes: bp-based frame

sub_4785A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 44h
push	0
lea	eax, [ebp+var_1]
push	eax
sub	esp, 8
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_18]
mov	eax, [ebp+var_14]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
mov	eax, [ebp+var_18]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47DEC0
add	esp, 24h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4785A0 endp

align 10h


; Attributes: bp-based frame

sub_478600 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_47861C

loc_478613:
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_8], edx

loc_47861C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_478646
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_429100
xor	edx, edx
and	edx, 1
jz	short loc_478644
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_478644:
jmp	short loc_478613

loc_478646:
mov	esp, ebp
pop	ebp
retn
sub_478600 endp

align 10h


; Attributes: bp-based frame

sub_478650 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_47866C

loc_478663:
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx

loc_47866C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_478698
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_429100
xor	edx, edx
and	edx, 1
jz	short loc_478696
push	4
mov	eax, [ebp+var_8]
push	eax
call	sub_1111040
add	esp, 8

loc_478696:
jmp	short loc_478663

loc_478698:
mov	esp, ebp
pop	ebp
retn
sub_478650 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4786A0(void *, int)
sub_4786A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
push	edi
mov	eax, [ebp+arg_0]
push	eax		; void *
push	7Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_47870A
mov	esi, [ebp+arg_4]
mov	ecx, 17h
mov	edi, [ebp+var_4]
rep movsd
mov	ecx, [ebp+arg_4]
add	ecx, 5Ch
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
add	edx, 5Ch
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403850
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx+1Ch]
mov	[ecx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
jmp	short loc_478711

loc_47870A:
mov	[ebp+var_10], 0

loc_478711:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4786A0 endp

align 10h


; Attributes: bp-based frame

sub_478720 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_479A40
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_478776
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_478720
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_478776:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_478785:
cmp	[ebp+arg_0], 0
jz	short loc_4787F2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_479A40
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_4787E1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_478720
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_4787E1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_478785

loc_4787F2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_478720 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_478800(void	*)
sub_478800 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_478809:
cmp	[ebp+arg_0], 0
jz	short loc_478859
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_478800
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_47DFA0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_478851
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_478851:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_478809

loc_478859:
mov	esp, ebp
pop	ebp
retn	4
sub_478800 endp

align 10h


; Attributes: bp-based frame

sub_478860 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_478A3D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4788C9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D000
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_478D23

loc_4788C9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_478915
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	loc_478D23
jmp	loc_478A38

loc_478915:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_47894A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_478D23

loc_47894A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_478994
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	loc_478D23

loc_478994:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_478A0D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4789E6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	loc_478D23
jmp	short loc_478A0B

loc_4789E6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	loc_478D23

loc_478A0B:
jmp	short loc_478A38

loc_478A0D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D000
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_478D23

loc_478A38:
jmp	loc_478D23

loc_478A3D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_478AD1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_478AA1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	loc_478D23
jmp	short loc_478ACC

loc_478AA1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D000
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_478D23

loc_478ACC:
jmp	loc_478D23

loc_478AD1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_478B41
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_478B41
mov	[ebp+var_A4], 1
jmp	short loc_478B4B

loc_478B41:
mov	[ebp+var_A4], 0

loc_478B4B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_478B60
and	[ebp+var_4C], 0FFFFFFFEh

loc_478B60:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_478BC2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_478B98
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	loc_478D23
jmp	short loc_478BBD

loc_478B98:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	loc_478D23

loc_478BBD:
jmp	loc_478D23

loc_478BC2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_478C12
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_478C12:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_478C61
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_478C61
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_478C55
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_478C61

loc_478C55:
mov	[ebp+var_A8], 1
jmp	short loc_478C6B

loc_478C61:
mov	[ebp+var_A8], 0

loc_478C6B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_478C80
and	[ebp+var_4C], 0FFFFFFFDh

loc_478C80:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_478CD9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_478CB5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	short loc_478D23
jmp	short loc_478CD7

loc_478CB5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47CEC0
mov	eax, [ebp+arg_0]
jmp	short loc_478D23

loc_478CD7:
jmp	short loc_478D23

loc_478CD9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_478CF7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_478D23
jmp	short loc_478D23

loc_478CF7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D000
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_478D23:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_478860 endp

align 10h


; Attributes: bp-based frame

sub_478D30 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_479A90
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_478D86
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_478D30
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_478D86:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_478D95:
cmp	[ebp+arg_0], 0
jz	short loc_478E02
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_479A90
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_478DF1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_478D30
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_478DF1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_478D95

loc_478E02:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_478D30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_478E10(void	*)
sub_478E10 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_478E19:
cmp	[ebp+arg_0], 0
jz	short loc_478E69
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_478E10
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_47DFD0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_478E61
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_478E61:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_478E19

loc_478E69:
mov	esp, ebp
pop	ebp
retn	4
sub_478E10 endp

align 10h


; Attributes: bp-based frame

sub_478E70 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_47904D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_478ED9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D840
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_479333

loc_478ED9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_478F25
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	loc_479333
jmp	loc_479048

loc_478F25:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_478F5A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_479333

loc_478F5A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_478FA4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	loc_479333

loc_478FA4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_47901D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_478FF6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	loc_479333
jmp	short loc_47901B

loc_478FF6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	loc_479333

loc_47901B:
jmp	short loc_479048

loc_47901D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D840
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_479333

loc_479048:
jmp	loc_479333

loc_47904D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4790E1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4790B1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	loc_479333
jmp	short loc_4790DC

loc_4790B1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D840
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_479333

loc_4790DC:
jmp	loc_479333

loc_4790E1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_479151
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_479151
mov	[ebp+var_A4], 1
jmp	short loc_47915B

loc_479151:
mov	[ebp+var_A4], 0

loc_47915B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_479170
and	[ebp+var_4C], 0FFFFFFFEh

loc_479170:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4791D2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4791A8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	loc_479333
jmp	short loc_4791CD

loc_4791A8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	loc_479333

loc_4791CD:
jmp	loc_479333

loc_4791D2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_479222
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_479222:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_479271
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_479271
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_479265
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_479271

loc_479265:
mov	[ebp+var_A8], 1
jmp	short loc_47927B

loc_479271:
mov	[ebp+var_A8], 0

loc_47927B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_479290
and	[ebp+var_4C], 0FFFFFFFDh

loc_479290:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_4792E9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4792C5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	short loc_479333
jmp	short loc_4792E7

loc_4792C5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47D700
mov	eax, [ebp+arg_0]
jmp	short loc_479333

loc_4792E7:
jmp	short loc_479333

loc_4792E9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_479307
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_479333
jmp	short loc_479333

loc_479307:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47D840
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_479333:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_478E70 endp

align 10h


; Attributes: bp-based frame

sub_479340 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_479351:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_14]
jz	short loc_4793A3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_9], cl
push	0
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
call	edx
cmp	[ebp+var_8], 0
jz	short loc_4793A1
mov	eax, 1
imul	eax, 190h
push	eax		; int
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4793A1:
jmp	short loc_479351

loc_4793A3:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+4], edx
mov	esp, ebp
pop	ebp
retn
sub_479340 endp

align 10h


; Attributes: bp-based frame

sub_4793C0 proc	near

var_24=	dword ptr -24h
var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	ecx, [ebp+var_24]
call	sub_47E000
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4793C0 endp

align 10h


; Attributes: bp-based frame

sub_479400 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_479441
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_479425
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA90

loc_479425:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_479441
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_479441:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
mov	[ecx+0Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_479400 endp

align 10h


; Attributes: bp-based frame

sub_479470 proc	near

var_70=	dword ptr -70h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_70]
cmp	dword ptr [eax], 0
jz	short loc_479495
mov	ecx, [ebp+var_70]
mov	ecx, [ecx]
call	sub_40AA80

loc_479495:
mov	edx, [ebp+var_70]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_4794BB
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_4794BB:
mov	edx, [ebp+arg_0]
add	edx, 8
push	edx
mov	ecx, [ebp+var_70]
add	ecx, 8
call	sub_479590
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+10h]
mov	[eax+10h], dl
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+11h]
mov	[eax+11h], dl
mov	eax, [ebp+var_70]
mov	esp, ebp
pop	ebp
retn	4
sub_479470 endp

align 10h


; Attributes: bp-based frame

sub_4794F0 proc	near

var_50=	dword ptr -50h
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
push	edi
mov	[ebp+var_50], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_47957F
mov	[ebp+var_1], 1
call	nullsub_1
call	nullsub_1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_47954E
lea	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
call	sub_4046E0
mov	edx, [eax]
push	edx
lea	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
call	sub_402EB0
mov	eax, [eax]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E410
add	esp, 0Ch
jmp	short loc_47957F

loc_47954E:
push	ecx
mov	eax, esp
mov	ecx, [ebp+arg_4]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	ecx, [ebp+var_50]
call	sub_46E3C0
mov	edi, [ebp+arg_4]
call	sub_409A20

loc_47957F:
pop	edi
mov	esp, ebp
pop	ebp
retn	8
sub_4794F0 endp

align 10h


; Attributes: bp-based frame

sub_479590 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_47E1E0
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_479590 endp

align 10h


; Attributes: bp-based frame

sub_479650 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 15555555h
jbe	short loc_47967B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_47967B:
cmp	[ebp+arg_0], 0
jz	short loc_4796B2
mov	ecx, [ebp+arg_0]
imul	ecx, 0Ch
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 0Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_4796B9

loc_4796B2:
mov	[ebp+var_10], 0

loc_4796B9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_479650 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_4796D0 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_47FDB0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4796D0 endp



; Attributes: bp-based frame

sub_479730 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
lea	eax, [ebp+var_18]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_24]
mov	ecx, [ecx+4]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_47E480
lea	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	eax, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
add	ecx, 4
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
push	eax
call	sub_77E2F0
add	esp, 4
mov	ecx, [ebp+var_20]
mov	[ecx], eax
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	4
sub_479730 endp

align 10h


; Attributes: bp-based frame

sub_4797B0 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_47E340
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4797B0 endp

align 10h


; Attributes: bp-based frame

sub_479800 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5269E0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_47E3C0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_479800 endp

align 10h


; Attributes: bp-based frame

sub_479850 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_47E430
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_479850 endp

align 10h


; Attributes: bp-based frame

sub_4798A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	eax, [ebp+var_4]
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_479907
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	[ecx], edx
push	offset sub_479920
mov	eax, [ebp+var_4]
push	eax
push	4
mov	ecx, [ebp+var_8]
add	ecx, 4
push	ecx
call	sub_4078B0
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_47990E

loc_479907:
mov	[ebp+var_C], 0

loc_47990E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4798A0 endp

align 10h


; Attributes: bp-based frame

sub_479920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	ecx, [ebp+var_4]
call	sub_418670
mov	esp, ebp
pop	ebp
retn
sub_479920 endp

align 10h


; Attributes: bp-based frame

sub_479940 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
and	eax, 2
jz	short loc_479987
push	offset sub_46B550
mov	ecx, [ebp+var_4]
mov	edx, [ecx-4]
push	edx
push	4
mov	eax, [ebp+var_4]
push	eax
call	sub_40F3E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_47997F
push	4
mov	edx, [ebp+var_4]
sub	edx, 4
push	edx
call	sub_1111020
add	esp, 8

loc_47997F:
mov	eax, [ebp+var_4]
sub	eax, 4
jmp	short loc_4799B2

loc_479987:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_479999
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA90

loc_479999:
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4799AF
push	4
mov	eax, [ebp+var_4]
push	eax
call	sub_1111040
add	esp, 8

loc_4799AF:
mov	eax, [ebp+var_4]

loc_4799B2:
mov	esp, ebp
pop	ebp
retn	4
sub_479940 endp

align 10h


; Attributes: bp-based frame

sub_4799C0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
add	eax, 8
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	4
sub_4799C0 endp

align 10h


; Attributes: bp-based frame

sub_479A40 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_47E9A0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_479A40 endp

align 10h


; Attributes: bp-based frame

sub_479A90 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_47EA10
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_479A90 endp

align 10h


; Attributes: bp-based frame

sub_479AE0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	[ebp+var_10], 80h
mov	[ebp+var_8], 2
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	eax, [eax]
sub	eax, [ecx+4]
cdq
mov	ecx, 30h
idiv	ecx
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
js	short loc_479B2F
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jge	short loc_479B2F
mov	eax, [ebp+arg_0]
imul	eax, 30h
mov	ecx, [ebp+var_1C]
add	eax, [ecx]
mov	edx, [ebp+var_1C]
mov	[edx], eax
jmp	loc_479BB5

loc_479B2F:
cmp	[ebp+var_4], 0
jle	short loc_479B42
mov	eax, [ebp+var_4]
xor	edx, edx
div	[ebp+var_8]
mov	[ebp+var_20], eax
jmp	short loc_479B57

loc_479B42:
mov	eax, [ebp+var_4]
neg	eax
sub	eax, 1
xor	edx, edx
div	[ebp+var_8]
neg	eax
sub	eax, 1
mov	[ebp+var_20], eax

loc_479B57:
mov	eax, [ebp+var_20]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	eax, [ebp+var_C]
lea	ecx, [edx+eax*4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_14], 80h
mov	ecx, 2
imul	ecx, 30h
mov	edx, [ebp+var_1C]
add	ecx, [edx+4]
mov	eax, [ebp+var_1C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
imul	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
sub	edx, ecx
imul	edx, 30h
mov	eax, [ebp+var_1C]
add	edx, [eax+4]
mov	ecx, [ebp+var_1C]
mov	[ecx], edx

loc_479BB5:
mov	esp, ebp
pop	ebp
retn	4
sub_479AE0 endp

align 10h


; Attributes: bp-based frame

sub_479BC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax+8]
cmp	[ebp+arg_0], ecx
jnz	short loc_479BDB
jmp	loc_479D07

loc_479BDB:
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+0Ah]
cmp	[ebp+arg_0], eax
jnb	short loc_479C4C
mov	cx, word ptr [ebp+arg_0]
mov	[ebp+var_4], cx
jmp	short loc_479BFD

loc_479BF1:
mov	dx, [ebp+var_4]
add	dx, 1
mov	[ebp+var_4], dx

loc_479BFD:
movzx	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
movzx	edx, word ptr [ecx+0Ah]
cmp	eax, edx
jge	short loc_479C41
movzx	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
cmp	dword ptr [edx+eax*4], 0
jz	short loc_479C3F
movzx	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
mov	dword ptr [edx+eax*4], 0
mov	eax, [ebp+var_C]
mov	cx, [eax+0Ch]
sub	cx, 1
mov	edx, [ebp+var_C]
mov	[edx+0Ch], cx

loc_479C3F:
jmp	short loc_479BF1

loc_479C41:
mov	eax, [ebp+var_C]
mov	cx, word ptr [ebp+arg_0]
mov	[eax+0Ah], cx

loc_479C4C:
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	dx, word ptr [ebp+arg_0]
mov	[ecx+8], dx
cmp	[ebp+arg_0], 0
jbe	loc_479CF5
mov	eax, [ebp+var_C]
movzx	eax, word ptr [eax+8]
call	sub_5F46E0
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_4], dx
jmp	short loc_479C90

loc_479C84:
mov	ax, [ebp+var_4]
add	ax, 1
mov	[ebp+var_4], ax

loc_479C90:
movzx	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+0Ah]
cmp	ecx, eax
jge	short loc_479CB8
movzx	ecx, [ebp+var_4]
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
mov	eax, [eax+4]
mov	esi, [ebp+var_8]
mov	ecx, [esi+ecx*4]
mov	[eax+edx*4], ecx
jmp	short loc_479C84

loc_479CB8:
mov	edx, [ebp+var_C]
mov	ax, [edx+0Ah]
mov	[ebp+var_4], ax
jmp	short loc_479CD1

loc_479CC5:
mov	cx, [ebp+var_4]
add	cx, 1
mov	[ebp+var_4], cx

loc_479CD1:
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax+8]
cmp	edx, ecx
jge	short loc_479CF3
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	dword ptr [ecx+edx*4], 0
jmp	short loc_479CC5

loc_479CF3:
jmp	short loc_479CFF

loc_479CF5:
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0

loc_479CFF:
mov	eax, [ebp+var_8]
call	sub_418650

loc_479D07:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_479BC0 endp

align 10h


; Attributes: bp-based frame

sub_479D10 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= word ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
movzx	ecx, word ptr [eax+8]
cmp	[ebp+arg_0], ecx
jnz	short loc_479D2A
jmp	loc_479F88

loc_479D2A:
mov	edx, [ebp+var_48]
movzx	eax, word ptr [edx+0Ah]
cmp	[ebp+arg_0], eax
jnb	loc_479E1B
mov	cx, word ptr [ebp+arg_0]
mov	[ebp+var_4], cx
jmp	short loc_479D50

loc_479D44:
mov	dx, [ebp+var_4]
add	dx, 1
mov	[ebp+var_4], dx

loc_479D50:
movzx	eax, [ebp+var_4]
mov	ecx, [ebp+var_48]
movzx	edx, word ptr [ecx+0Ah]
cmp	eax, edx
jge	loc_479E10
push	0
lea	ecx, [ebp+var_10]
call	sub_418670
mov	[ebp+var_1C], eax
movzx	eax, [ebp+var_4]
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	ecx, [ebp+var_1C]
mov	edx, [edx+eax*4]
xor	eax, eax
cmp	edx, [ecx]
setnz	al
mov	[ebp+var_9], al
lea	ecx, [ebp+var_10]
call	sub_429100
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_479E0B
push	0
lea	ecx, [ebp+var_14]
call	sub_418670
mov	[ebp+var_24], eax
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
lea	edx, [ecx+edx*4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_479DF1
mov	eax, [ebp+var_20]
cmp	dword ptr [eax], 0
jz	short loc_479DD5
mov	ecx, [ebp+var_20]
mov	ecx, [ecx]
call	sub_40AA90

loc_479DD5:
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_20]
cmp	dword ptr [edx], 0
jz	short loc_479DF1
mov	eax, [ebp+var_20]
mov	ecx, [eax]
call	sub_40AA80

loc_479DF1:
lea	ecx, [ebp+var_14]
call	sub_429100
mov	ecx, [ebp+var_48]
mov	dx, [ecx+0Ch]
sub	dx, 1
mov	eax, [ebp+var_48]
mov	[eax+0Ch], dx

loc_479E0B:
jmp	loc_479D44

loc_479E10:
mov	ecx, [ebp+var_48]
mov	dx, word ptr [ebp+arg_0]
mov	[ecx+0Ah], dx

loc_479E1B:
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_48]
mov	ax, word ptr [ebp+arg_0]
mov	[edx+8], ax
cmp	[ebp+arg_0], 0
jbe	loc_479F56
mov	ecx, [ebp+var_48]
movzx	edx, word ptr [ecx+8]
push	edx
call	sub_4798A0
add	esp, 4
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_4], dx
jmp	short loc_479E63

loc_479E57:
mov	ax, [ebp+var_4]
add	ax, 1
mov	[ebp+var_4], ax

loc_479E63:
movzx	ecx, [ebp+var_4]
mov	edx, [ebp+var_48]
movzx	eax, word ptr [edx+0Ah]
cmp	ecx, eax
jge	short loc_479ECB
movzx	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_34], eax
movzx	ecx, [ebp+var_4]
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_479EC9
mov	edx, [ebp+var_30]
cmp	dword ptr [edx], 0
jz	short loc_479EAD
mov	eax, [ebp+var_30]
mov	ecx, [eax]
call	sub_40AA90

loc_479EAD:
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_30]
cmp	dword ptr [ecx], 0
jz	short loc_479EC9
mov	edx, [ebp+var_30]
mov	ecx, [edx]
call	sub_40AA80

loc_479EC9:
jmp	short loc_479E57

loc_479ECB:
mov	eax, [ebp+var_48]
mov	cx, [eax+0Ah]
mov	[ebp+var_4], cx
jmp	short loc_479EE4

loc_479ED8:
mov	dx, [ebp+var_4]
add	dx, 1
mov	[ebp+var_4], dx

loc_479EE4:
movzx	eax, [ebp+var_4]
mov	ecx, [ebp+var_48]
movzx	edx, word ptr [ecx+8]
cmp	eax, edx
jge	short loc_479F54
push	0
lea	ecx, [ebp+var_18]
call	sub_418670
mov	[ebp+var_3C], eax
movzx	eax, [ebp+var_4]
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
lea	eax, [edx+eax*4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_3C]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_479F4A
mov	ecx, [ebp+var_38]
cmp	dword ptr [ecx], 0
jz	short loc_479F2E
mov	edx, [ebp+var_38]
mov	ecx, [edx]
call	sub_40AA90

loc_479F2E:
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_38]
cmp	dword ptr [eax], 0
jz	short loc_479F4A
mov	ecx, [ebp+var_38]
mov	ecx, [ecx]
call	sub_40AA80

loc_479F4A:
lea	ecx, [ebp+var_18]
call	sub_429100
jmp	short loc_479ED8

loc_479F54:
jmp	short loc_479F60

loc_479F56:
mov	edx, [ebp+var_48]
mov	dword ptr [edx+4], 0

loc_479F60:
mov	eax, [ebp+var_8]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
cmp	[ebp+var_40], 0
jz	short loc_479F81
push	3
mov	ecx, [ebp+var_40]
call	sub_470A60
mov	[ebp+var_4C], eax
jmp	short loc_479F88

loc_479F81:
mov	[ebp+var_4C], 0

loc_479F88:
mov	esp, ebp
pop	ebp
retn	4
sub_479D10 endp

align 10h


; Attributes: bp-based frame

sub_479F90 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_9= byte ptr	-9
var_8= byte ptr	-8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
movzx	ecx, word ptr [eax+0Ah]
cmp	[ebp+arg_0], ecx
jb	short loc_479FF8
mov	edx, [ebp+arg_0]
add	edx, 1
mov	eax, [ebp+var_38]
mov	[eax+0Ah], dx
push	0
lea	ecx, [ebp+var_8]
call	sub_418670
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_24]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setnz	cl
mov	[ebp+var_1], cl
lea	ecx, [ebp+var_8]
call	sub_429100
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_479FF3
mov	eax, [ebp+var_38]
mov	cx, [eax+0Ch]
add	cx, 1
mov	edx, [ebp+var_38]
mov	[edx+0Ch], cx

loc_479FF3:
jmp	loc_47A0B9

loc_479FF8:
push	0
lea	ecx, [ebp+var_10]
call	sub_418670
mov	[ebp+var_28], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_28]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setnz	al
mov	[ebp+var_9], al
lea	ecx, [ebp+var_10]
call	sub_429100
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_47A071
push	0
lea	ecx, [ebp+var_18]
call	sub_418670
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_38]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_2C]
mov	eax, [eax+ecx*4]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
mov	[ebp+var_11], cl
lea	ecx, [ebp+var_18]
call	sub_429100
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_47A06F
mov	eax, [ebp+var_38]
mov	cx, [eax+0Ch]
add	cx, 1
mov	edx, [ebp+var_38]
mov	[edx+0Ch], cx

loc_47A06F:
jmp	short loc_47A0B9

loc_47A071:
push	0
lea	ecx, [ebp+var_20]
call	sub_418670
mov	[ebp+var_30], eax
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_30]
mov	ecx, [ecx+edx*4]
xor	edx, edx
cmp	ecx, [eax]
setnz	dl
mov	[ebp+var_19], dl
lea	ecx, [ebp+var_20]
call	sub_429100
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_47A0B9
mov	ecx, [ebp+var_38]
mov	dx, [ecx+0Ch]
sub	dx, 1
mov	eax, [ebp+var_38]
mov	[eax+0Ch], dx

loc_47A0B9:
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
lea	ecx, [edx+eax*4]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_4]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_47A102
mov	edx, [ebp+var_34]
cmp	dword ptr [edx], 0
jz	short loc_47A0E6
mov	eax, [ebp+var_34]
mov	ecx, [eax]
call	sub_40AA90

loc_47A0E6:
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx], 0
jz	short loc_47A102
mov	edx, [ebp+var_34]
mov	ecx, [edx]
call	sub_40AA80

loc_47A102:
mov	esp, ebp
pop	ebp
retn	8
sub_479F90 endp

align 10h


; Attributes: bp-based frame

sub_47A110 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47A157
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EB70
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47A234

loc_47A157:
cmp	[ebp+arg_10], 0
jnz	short loc_47A1B9
cmp	[ebp+arg_C], 0
jnz	short loc_47A1B0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_47A1A1
jb	short loc_47A198
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_47A1A1

loc_47A198:
mov	[ebp+var_3C], 1
jmp	short loc_47A1A8

loc_47A1A1:
mov	[ebp+var_3C], 0

loc_47A1A8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_47A1B9

loc_47A1B0:
mov	[ebp+var_40], 1
jmp	short loc_47A1C0

loc_47A1B9:
mov	[ebp+var_40], 0

loc_47A1C0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_47A1D2
and	[ebp+var_C], 0FFFFFFFEh

loc_47A1D2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_47A208
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EB70
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_47A206
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_47A206:
jmp	short loc_47A234

loc_47A208:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EB70
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_47A234
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_47A234:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47A110 endp

align 10h


; Attributes: bp-based frame

sub_47A280 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47A29C:
cmp	[ebp+var_10], 0
jz	short loc_47A313
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_47A2E2
jb	short loc_47A2D9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_47A2E2

loc_47A2D9:
mov	[ebp+var_64], 1
jmp	short loc_47A2E9

loc_47A2E2:
mov	[ebp+var_64], 0

loc_47A2E9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_47A302
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_47A30B

loc_47A302:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_47A30B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_47A29C

loc_47A313:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_47A3B5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_47A3A6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47A110
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_47A45B
jmp	short loc_47A3B5

loc_47A3A6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47A3B5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_47A3EF
jb	short loc_47A3E6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_47A3EF

loc_47A3E6:
mov	[ebp+var_78], 1
jmp	short loc_47A3F6

loc_47A3EF:
mov	[ebp+var_78], 0

loc_47A3F6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_47A440
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47A110
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_47A45B

loc_47A440:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_47A45B:
mov	esp, ebp
pop	ebp
retn	8
sub_47A280 endp

align 10h


; Attributes: bp-based frame

sub_47A470 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_47F060
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_47EBD0
lea	ecx, [ebp+var_8]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn	10h
sub_47A470 endp

align 10h


; Attributes: bp-based frame

sub_47A4C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47A507
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EC80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47A5BA

loc_47A507:
cmp	[ebp+arg_10], 0
jnz	short loc_47A53F
cmp	[ebp+arg_C], 0
jnz	short loc_47A536
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_47A53F

loc_47A536:
mov	[ebp+var_34], 1
jmp	short loc_47A546

loc_47A53F:
mov	[ebp+var_34], 0

loc_47A546:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47A558
and	[ebp+var_C], 0FFFFFFFEh

loc_47A558:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47A58E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EC80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47A58C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47A58C:
jmp	short loc_47A5BA

loc_47A58E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EC80
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47A5BA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47A5BA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47A4C0 endp

align 10h


; Attributes: bp-based frame

sub_47A600 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47A61C:
cmp	[ebp+var_10], 0
jz	short loc_47A667
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47A656
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47A65F

loc_47A656:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47A65F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47A61C

loc_47A667:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47A709
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47A6FA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47A4C0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47A783
jmp	short loc_47A709

loc_47A6FA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47A709:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47A768
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47A4C0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47A783

loc_47A768:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47A783:
mov	esp, ebp
pop	ebp
retn	8
sub_47A600 endp

align 10h


; Attributes: bp-based frame

sub_47A790 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47A7D7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47ECD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47A88A

loc_47A7D7:
cmp	[ebp+arg_10], 0
jnz	short loc_47A80F
cmp	[ebp+arg_C], 0
jnz	short loc_47A806
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_47A80F

loc_47A806:
mov	[ebp+var_34], 1
jmp	short loc_47A816

loc_47A80F:
mov	[ebp+var_34], 0

loc_47A816:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47A828
and	[ebp+var_C], 0FFFFFFFEh

loc_47A828:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47A85E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47ECD0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47A85C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47A85C:
jmp	short loc_47A88A

loc_47A85E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47ECD0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47A88A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47A88A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47A790 endp

align 10h


; Attributes: bp-based frame

sub_47A8D0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47A8EC:
cmp	[ebp+var_10], 0
jz	short loc_47A937
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47A926
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47A92F

loc_47A926:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47A92F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47A8EC

loc_47A937:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47A9D9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47A9CA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47A790
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47AA53
jmp	short loc_47A9D9

loc_47A9CA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47A9D9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47AA38
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47A790
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47AA53

loc_47AA38:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47AA53:
mov	esp, ebp
pop	ebp
retn	8
sub_47A8D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47AA60(void *, int)
sub_47AA60 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_47F190
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_47AA60 endp

align 10h


; Attributes: bp-based frame

sub_47AAA0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47AAE7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47ED20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47ABC4

loc_47AAE7:
cmp	[ebp+arg_10], 0
jnz	short loc_47AB49
cmp	[ebp+arg_C], 0
jnz	short loc_47AB40
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_47AB31
jb	short loc_47AB28
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_47AB31

loc_47AB28:
mov	[ebp+var_3C], 1
jmp	short loc_47AB38

loc_47AB31:
mov	[ebp+var_3C], 0

loc_47AB38:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_47AB49

loc_47AB40:
mov	[ebp+var_40], 1
jmp	short loc_47AB50

loc_47AB49:
mov	[ebp+var_40], 0

loc_47AB50:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_47AB62
and	[ebp+var_C], 0FFFFFFFEh

loc_47AB62:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_47AB98
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47ED20
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_47AB96
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_47AB96:
jmp	short loc_47ABC4

loc_47AB98:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47ED20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_47ABC4
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_47ABC4:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47AAA0 endp

align 10h


; Attributes: bp-based frame

sub_47AC10 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47AC2C:
cmp	[ebp+var_10], 0
jz	short loc_47ACA3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_47AC72
jb	short loc_47AC69
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_47AC72

loc_47AC69:
mov	[ebp+var_64], 1
jmp	short loc_47AC79

loc_47AC72:
mov	[ebp+var_64], 0

loc_47AC79:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_47AC92
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_47AC9B

loc_47AC92:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_47AC9B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_47AC2C

loc_47ACA3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_47AD45
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_47AD36
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47AAA0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_47ADEB
jmp	short loc_47AD45

loc_47AD36:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47AD45:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_47AD7F
jb	short loc_47AD76
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_47AD7F

loc_47AD76:
mov	[ebp+var_78], 1
jmp	short loc_47AD86

loc_47AD7F:
mov	[ebp+var_78], 0

loc_47AD86:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_47ADD0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47AAA0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_47ADEB

loc_47ADD0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_47ADEB:
mov	esp, ebp
pop	ebp
retn	8
sub_47AC10 endp

align 10h


; Attributes: bp-based frame

sub_47AE00 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47AE47
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47ED70
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47AEF9

loc_47AE47:
cmp	[ebp+arg_10], 0
jnz	short loc_47AE7E
cmp	[ebp+arg_C], 0
jnz	short loc_47AE75
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47AE7E

loc_47AE75:
mov	[ebp+var_34], 1
jmp	short loc_47AE85

loc_47AE7E:
mov	[ebp+var_34], 0

loc_47AE85:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47AE97
and	[ebp+var_C], 0FFFFFFFEh

loc_47AE97:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47AECD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47ED70
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47AECB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47AECB:
jmp	short loc_47AEF9

loc_47AECD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47ED70
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47AEF9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47AEF9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47AE00 endp

align 10h


; Attributes: bp-based frame

sub_47AF40 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47AF5C:
cmp	[ebp+var_10], 0
jz	short loc_47AFA6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47AF95
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47AF9E

loc_47AF95:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47AF9E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47AF5C

loc_47AFA6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47B048
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47B039
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47AE00
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47B0C1
jmp	short loc_47B048

loc_47B039:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47B048:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47B0A6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47AE00
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47B0C1

loc_47B0A6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47B0C1:
mov	esp, ebp
pop	ebp
retn	8
sub_47AF40 endp

align 10h


; Attributes: bp-based frame

sub_47B0D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47B117
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EDC0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47B1C9

loc_47B117:
cmp	[ebp+arg_10], 0
jnz	short loc_47B14E
cmp	[ebp+arg_C], 0
jnz	short loc_47B145
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47B14E

loc_47B145:
mov	[ebp+var_34], 1
jmp	short loc_47B155

loc_47B14E:
mov	[ebp+var_34], 0

loc_47B155:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47B167
and	[ebp+var_C], 0FFFFFFFEh

loc_47B167:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47B19D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EDC0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47B19B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47B19B:
jmp	short loc_47B1C9

loc_47B19D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EDC0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47B1C9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47B1C9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47B0D0 endp

align 10h


; Attributes: bp-based frame

sub_47B210 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47B22C:
cmp	[ebp+var_10], 0
jz	short loc_47B276
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47B265
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47B26E

loc_47B265:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47B26E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47B22C

loc_47B276:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47B318
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47B309
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47B0D0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47B391
jmp	short loc_47B318

loc_47B309:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47B318:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47B376
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47B0D0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47B391

loc_47B376:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47B391:
mov	esp, ebp
pop	ebp
retn	8
sub_47B210 endp

align 10h


; Attributes: bp-based frame

sub_47B3A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47B3E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EE10
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47B499

loc_47B3E7:
cmp	[ebp+arg_10], 0
jnz	short loc_47B41E
cmp	[ebp+arg_C], 0
jnz	short loc_47B415
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47B41E

loc_47B415:
mov	[ebp+var_34], 1
jmp	short loc_47B425

loc_47B41E:
mov	[ebp+var_34], 0

loc_47B425:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47B437
and	[ebp+var_C], 0FFFFFFFEh

loc_47B437:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47B46D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EE10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47B46B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47B46B:
jmp	short loc_47B499

loc_47B46D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EE10
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47B499
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47B499:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47B3A0 endp

align 10h


; Attributes: bp-based frame

sub_47B4E0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47B4FC:
cmp	[ebp+var_10], 0
jz	short loc_47B546
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47B535
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47B53E

loc_47B535:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47B53E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47B4FC

loc_47B546:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47B5E8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47B5D9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47B3A0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47B661
jmp	short loc_47B5E8

loc_47B5D9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47B5E8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47B646
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47B3A0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47B661

loc_47B646:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47B661:
mov	esp, ebp
pop	ebp
retn	8
sub_47B4E0 endp

align 10h


; Attributes: bp-based frame

sub_47B670 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47B6B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EE60
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47B769

loc_47B6B7:
cmp	[ebp+arg_10], 0
jnz	short loc_47B6EE
cmp	[ebp+arg_C], 0
jnz	short loc_47B6E5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47B6EE

loc_47B6E5:
mov	[ebp+var_34], 1
jmp	short loc_47B6F5

loc_47B6EE:
mov	[ebp+var_34], 0

loc_47B6F5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47B707
and	[ebp+var_C], 0FFFFFFFEh

loc_47B707:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47B73D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EE60
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47B73B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47B73B:
jmp	short loc_47B769

loc_47B73D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EE60
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47B769
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47B769:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47B670 endp

align 10h


; Attributes: bp-based frame

sub_47B7B0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47B7CC:
cmp	[ebp+var_10], 0
jz	short loc_47B816
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47B805
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47B80E

loc_47B805:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47B80E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47B7CC

loc_47B816:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47B8B8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47B8A9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47B670
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47B931
jmp	short loc_47B8B8

loc_47B8A9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47B8B8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47B916
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47B670
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47B931

loc_47B916:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47B931:
mov	esp, ebp
pop	ebp
retn	8
sub_47B7B0 endp

align 10h


; Attributes: bp-based frame

sub_47B940 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47B987
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EEB0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47BA3A

loc_47B987:
cmp	[ebp+arg_10], 0
jnz	short loc_47B9BF
cmp	[ebp+arg_C], 0
jnz	short loc_47B9B6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_47B9BF

loc_47B9B6:
mov	[ebp+var_34], 1
jmp	short loc_47B9C6

loc_47B9BF:
mov	[ebp+var_34], 0

loc_47B9C6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47B9D8
and	[ebp+var_C], 0FFFFFFFEh

loc_47B9D8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47BA0E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EEB0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47BA0C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47BA0C:
jmp	short loc_47BA3A

loc_47BA0E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EEB0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47BA3A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47BA3A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47B940 endp

align 10h


; Attributes: bp-based frame

sub_47BA80 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47BA9C:
cmp	[ebp+var_10], 0
jz	short loc_47BAE7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47BAD6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47BADF

loc_47BAD6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47BADF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47BA9C

loc_47BAE7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47BB89
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47BB7A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47B940
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47BC03
jmp	short loc_47BB89

loc_47BB7A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47BB89:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47BBE8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47B940
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47BC03

loc_47BBE8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47BC03:
mov	esp, ebp
pop	ebp
retn	8
sub_47BA80 endp

align 10h


; Attributes: bp-based frame

sub_47BC10 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47BC57
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EF00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47BD06

loc_47BC57:
cmp	[ebp+arg_10], 0
jnz	short loc_47BC8B
cmp	[ebp+arg_C], 0
jnz	short loc_47BC82
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_47BC8B

loc_47BC82:
mov	[ebp+var_34], 1
jmp	short loc_47BC92

loc_47BC8B:
mov	[ebp+var_34], 0

loc_47BC92:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_47BCA4
and	[ebp+var_C], 0FFFFFFFEh

loc_47BCA4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47BCDA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EF00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_47BCD8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_47BCD8:
jmp	short loc_47BD06

loc_47BCDA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EF00
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_47BD06
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_47BD06:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47BC10 endp

align 10h


; Attributes: bp-based frame

sub_47BD50 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47BD6C:
cmp	[ebp+var_10], 0
jz	short loc_47BDB3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_47BDA2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_47BDAB

loc_47BDA2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_47BDAB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_47BD6C

loc_47BDB3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_47BE55
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_47BE46
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_47BC10
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_47BECB
jmp	short loc_47BE55

loc_47BE46:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47BE55:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_47BEB0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_47BC10
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_47BECB

loc_47BEB0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_47BECB:
mov	esp, ebp
pop	ebp
retn	8
sub_47BD50 endp

align 10h


; Attributes: bp-based frame

sub_47BEE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_C]
sar	ecx, 2
mov	[ebp+var_8], ecx
jmp	short loc_47BF0C

loc_47BEFA:
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_47BF0C:
cmp	[ebp+var_8], 0
jle	short loc_47BF4E
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_47BF4C
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_47BF30
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_40AA90

loc_47BF30:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_47BF4C
mov	ecx, [ebp+var_C]
mov	ecx, [ecx]
call	sub_40AA80

loc_47BF4C:
jmp	short loc_47BEFA

loc_47BF4E:
mov	esp, ebp
pop	ebp
retn
sub_47BEE0 endp

align 10h


; Attributes: bp-based frame

sub_47BF60 proc	near

var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_10], ecx
jmp	short loc_47BF98

loc_47BF86:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_C], eax

loc_47BF98:
cmp	[ebp+var_10], 0
jle	short loc_47BFC0
xor	ecx, ecx
mov	byte ptr [ebp+var_14+1], cl
mov	dl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], dl
xor	eax, eax
mov	byte ptr [ebp+var_14], al
mov	cl, byte ptr [ebp+var_14]
mov	[ebp+var_12], cl
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_47BF86

loc_47BFC0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_47BF60 endp

align 10h


; Attributes: bp-based frame

sub_47BFD0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 68h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 8
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
add	edx, 4
mov	[ebp+var_18], edx
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
call	sub_47F300
add	esp, 18h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_47BFD0 endp

align 10h


; Attributes: bp-based frame

sub_47C040 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_47C058:
cmp	[ebp+var_8], 0
jz	short loc_47C0A1
mov	eax, [ebp+arg_0]
call	sub_420D20
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
cmp	edx, [ebp+var_C]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_47C096
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_47C09F

loc_47C096:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_47C09F:
jmp	short loc_47C058

loc_47C0A1:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_24]
jz	short loc_47C0D6
mov	eax, [ebp+arg_0]
call	sub_420D20
mov	[ebp+var_10], eax
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_10]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_47C0D6
mov	ecx, [ebp+var_24]
mov	[ebp+var_4], ecx

loc_47C0D6:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47C040 endp

align 10h


; Attributes: bp-based frame

sub_47C0E0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47C0FC:
cmp	[ebp+var_10], 0
jz	short loc_47C147
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47C136
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47C13F

loc_47C136:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47C13F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47C0FC

loc_47C147:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47C1E9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47C1DA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5ADA90
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47C263
jmp	short loc_47C1E9

loc_47C1DA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47C1E9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47C248
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5ADA90
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47C263

loc_47C248:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47C263:
mov	esp, ebp
pop	ebp
retn	8
sub_47C0E0 endp

align 10h


; Attributes: bp-based frame

sub_47C270 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47C2B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EF50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47C36A

loc_47C2B7:
cmp	[ebp+arg_10], 0
jnz	short loc_47C2EF
cmp	[ebp+arg_C], 0
jnz	short loc_47C2E6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_47C2EF

loc_47C2E6:
mov	[ebp+var_34], 1
jmp	short loc_47C2F6

loc_47C2EF:
mov	[ebp+var_34], 0

loc_47C2F6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47C308
and	[ebp+var_C], 0FFFFFFFEh

loc_47C308:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47C33E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EF50
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47C33C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47C33C:
jmp	short loc_47C36A

loc_47C33E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EF50
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47C36A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47C36A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47C270 endp

align 10h


; Attributes: bp-based frame

sub_47C3B0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47C3CC:
cmp	[ebp+var_10], 0
jz	short loc_47C417
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47C406
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47C40F

loc_47C406:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47C40F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47C3CC

loc_47C417:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47C4B9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47C4AA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47C270
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47C533
jmp	short loc_47C4B9

loc_47C4AA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47C4B9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47C518
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47C270
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47C533

loc_47C518:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47C533:
mov	esp, ebp
pop	ebp
retn	8
sub_47C3B0 endp

align 10h


; Attributes: bp-based frame

sub_47C540 proc	near

var_40=	dword ptr -40h
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
call	sub_409A10
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_40]
call	sub_402EB0
mov	ecx, [ebp+var_40]
call	sub_47F3D0
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_47C540 endp

align 10h


; Attributes: bp-based frame

sub_47C590 proc	near

var_3C=	dword ptr -3Ch
var_24=	dword ptr -24h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_47C5A8:
cmp	[ebp+var_8], 0
jz	short loc_47C5E5
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jnz	short loc_47C5DA
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_47C5E3

loc_47C5DA:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_47C5E3:
jmp	short loc_47C5A8

loc_47C5E5:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_3C]
jz	short loc_47C60E
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_47C60E
mov	ecx, [ebp+var_3C]
mov	[ebp+var_4], ecx

loc_47C60E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47C590 endp

align 10h


; Attributes: bp-based frame

sub_47C620 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_47C63D

loc_47C634:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_47C63D:
cmp	[ebp+var_4], 0
jle	loc_47C6D4
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
push	eax
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jz	short loc_47C660
mov	eax, [ebp+arg_0]
jmp	loc_47C748

loc_47C660:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
push	eax
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jz	short loc_47C682
mov	eax, [ebp+arg_0]
jmp	loc_47C748

loc_47C682:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
push	eax
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jz	short loc_47C6A4
mov	eax, [ebp+arg_0]
jmp	loc_47C748

loc_47C6A4:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
push	eax
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jz	short loc_47C6C6
mov	eax, [ebp+arg_0]
jmp	loc_47C748

loc_47C6C6:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
jmp	loc_47C634

loc_47C6D4:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 1
jz	short loc_47C72F
cmp	[ebp+var_8], 2
jz	short loc_47C710
cmp	[ebp+var_8], 3
jz	short loc_47C6F1
jmp	short loc_47C745

loc_47C6F1:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
push	ecx
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jz	short loc_47C707
mov	eax, [ebp+arg_0]
jmp	short loc_47C748

loc_47C707:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx

loc_47C710:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
push	ecx
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jz	short loc_47C726
mov	eax, [ebp+arg_0]
jmp	short loc_47C748

loc_47C726:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx

loc_47C72F:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
push	ecx
call	[ebp+arg_8]
add	esp, 4
test	eax, eax
jz	short loc_47C745
mov	eax, [ebp+arg_0]
jmp	short loc_47C748

loc_47C745:
mov	eax, [ebp+arg_4]

loc_47C748:
mov	esp, ebp
pop	ebp
retn
sub_47C620 endp

align 10h


; Attributes: bp-based frame

sub_47C750 proc	near

var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_47C768:
cmp	[ebp+var_8], 0
jz	short loc_47C7D8
lea	ecx, [ebp+var_25]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_24]
call	sub_407D30
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_24]
mov	ecx, [ebp+var_48]
call	sub_404510
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_9], dl
lea	ecx, [ebp+var_24]
call	sub_407910
lea	ecx, [ebp+var_25]
call	nullsub_1
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_47C7CD
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_47C7D6

loc_47C7CD:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_47C7D6:
jmp	short loc_47C768

loc_47C7D8:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_68]
jz	short loc_47C82A
lea	ecx, [ebp+var_41]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_40]
call	sub_407D30
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
lea	ecx, [ebp+var_40]
call	sub_404510
mov	[ebp+var_26], al
lea	ecx, [ebp+var_40]
call	sub_407910
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	eax, [ebp+var_26]
test	eax, eax
jz	short loc_47C82A
mov	ecx, [ebp+var_68]
mov	[ebp+var_4], ecx

loc_47C82A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47C750 endp

align 10h


; Attributes: bp-based frame

sub_47C840 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_47C858:
cmp	[ebp+var_8], 0
jz	short loc_47C89B
mov	eax, [ebp+var_8]
call	sub_404540
mov	ecx, eax
mov	eax, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_47C88C
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_8]
call	sub_4044C0
mov	ecx, [eax]
mov	[ebp+var_8], ecx
jmp	short loc_47C899

loc_47C88C:
mov	eax, [ebp+var_8]
call	sub_403040
mov	edx, [eax]
mov	[ebp+var_8], edx

loc_47C899:
jmp	short loc_47C858

loc_47C89B:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_3C]
jz	short loc_47C8C0
mov	eax, [ebp+var_4]
call	sub_404540
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_47C8C0
mov	edx, [ebp+var_3C]
mov	[ebp+var_4], edx

loc_47C8C0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47C840 endp

align 10h


; Attributes: bp-based frame

sub_47C8D0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47F480
add	esp, 14h
pop	ebp
retn
sub_47C8D0 endp



; Attributes: bp-based frame

sub_47C8F0 proc	near

var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47C90E
mov	[ebp+var_19], 1
jmp	short loc_47C912

loc_47C90E:
mov	[ebp+var_19], 0

loc_47C912:
movzx	edx, [ebp+var_19]
test	edx, edx
jz	short loc_47C98C
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47C932
mov	[ebp+var_1A], 1
jmp	short loc_47C936

loc_47C932:
mov	[ebp+var_1A], 0

loc_47C936:
movzx	edx, [ebp+var_1A]
test	edx, edx
jz	short loc_47C94E
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
jmp	loc_47C9F7
jmp	short loc_47C98A

loc_47C94E:
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47C966
mov	[ebp+var_1B], 1
jmp	short loc_47C96A

loc_47C966:
mov	[ebp+var_1B], 0

loc_47C96A:
movzx	eax, [ebp+var_1B]
test	eax, eax
jz	short loc_47C97F
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
jmp	short loc_47C9F7
jmp	short loc_47C98A

loc_47C97F:
mov	edx, [ebp+arg_0]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
jmp	short loc_47C9F7

loc_47C98A:
jmp	short loc_47C9F7

loc_47C98C:
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47C9A4
mov	[ebp+var_1C], 1
jmp	short loc_47C9A8

loc_47C9A4:
mov	[ebp+var_1C], 0

loc_47C9A8:
movzx	edx, [ebp+var_1C]
test	edx, edx
jz	short loc_47C9BD
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
jmp	short loc_47C9F7
jmp	short loc_47C9F7

loc_47C9BD:
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47C9D5
mov	[ebp+var_1D], 1
jmp	short loc_47C9D9

loc_47C9D5:
mov	[ebp+var_1D], 0

loc_47C9D9:
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_47C9EE
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
jmp	short loc_47C9F7
jmp	short loc_47C9F7

loc_47C9EE:
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]

loc_47C9F7:
mov	esp, ebp
pop	ebp
retn
sub_47C8F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47CA00(int, int, int,	float)
sub_47CA00 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h

loc_47CA06:
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fld	[ebp+arg_C]
fcomip	st, st(1)
fstp	st
jbe	short loc_47CA1B
mov	[ebp+var_5], 1
jmp	short loc_47CA1F

loc_47CA1B:
mov	[ebp+var_5], 0

loc_47CA1F:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47CA32
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
jmp	short loc_47CA06

loc_47CA32:
mov	eax, [ebp+arg_4]
sub	eax, 8
mov	[ebp+arg_4], eax

loc_47CA3B:
fld	[ebp+arg_C]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47CA50
mov	[ebp+var_6], 1
jmp	short loc_47CA54

loc_47CA50:
mov	[ebp+var_6], 0

loc_47CA54:
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_47CA67
mov	eax, [ebp+arg_4]
sub	eax, 8
mov	[ebp+arg_4], eax
jmp	short loc_47CA3B

loc_47CA67:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jb	short loc_47CA7A
mov	edx, [ebp+arg_0]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
jmp	short loc_47CA98

loc_47CA7A:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47F570
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
jmp	loc_47CA06

loc_47CA98:
mov	esp, ebp
pop	ebp
retn
sub_47CA00 endp

align 10h


; Attributes: bp-based frame

sub_47CAA0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_47CAB3
jmp	loc_47CB49

loc_47CAB3:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_4], ecx
jmp	short loc_47CAC7

loc_47CABE:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_47CAC7:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_47CB49
mov	cl, [ebp+arg_C]
mov	[ebp+var_19], cl
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [edx+4]
mov	[ebp+var_14], ecx
fld	[ebp+var_14]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47CAF8
mov	[ebp+var_5], 1
jmp	short loc_47CAFC

loc_47CAF8:
mov	[ebp+var_5], 0

loc_47CAFC:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47CB2B
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F4430
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
jmp	short loc_47CB44

loc_47CB2B:
movzx	ecx, [ebp+var_19]
push	ecx
mov	edx, [ebp+var_14]
push	edx		; float
mov	eax, [ebp+var_18]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
call	sub_480750
add	esp, 10h

loc_47CB44:
jmp	loc_47CABE

loc_47CB49:
mov	esp, ebp
pop	ebp
retn
sub_47CAA0 endp

align 10h


; Attributes: bp-based frame

sub_47CB50 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47F620
add	esp, 14h
pop	ebp
retn
sub_47CB50 endp



; Attributes: bp-based frame

sub_47CB70 proc	near

var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47CB90
mov	[ebp+var_19], 1
jmp	short loc_47CB94

loc_47CB90:
mov	[ebp+var_19], 0

loc_47CB94:
movzx	edx, [ebp+var_19]
test	edx, edx
jz	short loc_47CC12
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47CBB6
mov	[ebp+var_1A], 1
jmp	short loc_47CBBA

loc_47CBB6:
mov	[ebp+var_1A], 0

loc_47CBBA:
movzx	edx, [ebp+var_1A]
test	edx, edx
jz	short loc_47CBD2
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
jmp	loc_47CC81
jmp	short loc_47CC10

loc_47CBD2:
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47CBEC
mov	[ebp+var_1B], 1
jmp	short loc_47CBF0

loc_47CBEC:
mov	[ebp+var_1B], 0

loc_47CBF0:
movzx	eax, [ebp+var_1B]
test	eax, eax
jz	short loc_47CC05
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
jmp	short loc_47CC81
jmp	short loc_47CC10

loc_47CC05:
mov	edx, [ebp+arg_0]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
jmp	short loc_47CC81

loc_47CC10:
jmp	short loc_47CC81

loc_47CC12:
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47CC2C
mov	[ebp+var_1C], 1
jmp	short loc_47CC30

loc_47CC2C:
mov	[ebp+var_1C], 0

loc_47CC30:
movzx	edx, [ebp+var_1C]
test	edx, edx
jz	short loc_47CC45
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
jmp	short loc_47CC81
jmp	short loc_47CC81

loc_47CC45:
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47CC5F
mov	[ebp+var_1D], 1
jmp	short loc_47CC63

loc_47CC5F:
mov	[ebp+var_1D], 0

loc_47CC63:
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_47CC78
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
jmp	short loc_47CC81
jmp	short loc_47CC81

loc_47CC78:
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]

loc_47CC81:
mov	esp, ebp
pop	ebp
retn
sub_47CB70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47CC90(int, int, int,	float)
sub_47CC90 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h

loc_47CC96:
mov	eax, [ebp+arg_0]
fld	[ebp+arg_C]
fld	dword ptr [eax+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47CCAB
mov	[ebp+var_5], 1
jmp	short loc_47CCAF

loc_47CCAB:
mov	[ebp+var_5], 0

loc_47CCAF:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47CCC2
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
jmp	short loc_47CC96

loc_47CCC2:
mov	eax, [ebp+arg_4]
sub	eax, 8
mov	[ebp+arg_4], eax

loc_47CCCB:
fld	[ebp+arg_C]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47CCE2
mov	[ebp+var_6], 1
jmp	short loc_47CCE6

loc_47CCE2:
mov	[ebp+var_6], 0

loc_47CCE6:
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_47CCF9
mov	eax, [ebp+arg_4]
sub	eax, 8
mov	[ebp+arg_4], eax
jmp	short loc_47CCCB

loc_47CCF9:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jb	short loc_47CD0C
mov	edx, [ebp+arg_0]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
jmp	short loc_47CD2A

loc_47CD0C:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47F570
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
jmp	loc_47CC96

loc_47CD2A:
mov	esp, ebp
pop	ebp
retn
sub_47CC90 endp

align 10h


; Attributes: bp-based frame

sub_47CD30 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_47CD43
jmp	loc_47CDDB

loc_47CD43:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_4], ecx
jmp	short loc_47CD57

loc_47CD4E:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_47CD57:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_47CDDB
mov	cl, [ebp+arg_C]
mov	[ebp+var_19], cl
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [edx+4]
mov	[ebp+var_14], ecx
fld	[ebp+var_14]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47CD8A
mov	[ebp+var_5], 1
jmp	short loc_47CD8E

loc_47CD8A:
mov	[ebp+var_5], 0

loc_47CD8E:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47CDBD
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F4430
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
jmp	short loc_47CDD6

loc_47CDBD:
movzx	ecx, [ebp+var_19]
push	ecx
mov	edx, [ebp+var_14]
push	edx		; float
mov	eax, [ebp+var_18]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
call	sub_480850
add	esp, 10h

loc_47CDD6:
jmp	loc_47CD4E

loc_47CDDB:
mov	esp, ebp
pop	ebp
retn
sub_47CD30 endp

align 10h


; Attributes: bp-based frame

sub_47CDE0 proc	near

var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	esi
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_47CDF9:
cmp	[ebp+var_8], 0
jz	short loc_47CE66
mov	eax, [ebp+arg_0]
mov	eax, [eax]
lea	esi, [ebp+var_10]
call	sub_41DF90
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_1C], ecx
lea	eax, [ebp+var_10]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_1C]
call	sub_420D20
cmp	eax, esi
sbb	edx, edx
neg	edx
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_9], al
lea	ecx, [ebp+var_10]
call	sub_429100
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_47CE5B
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_47CE64

loc_47CE5B:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_47CE64:
jmp	short loc_47CDF9

loc_47CE66:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_2C]
jz	short loc_47CEB5
mov	edx, [ebp+arg_0]
mov	eax, [edx]
lea	esi, [ebp+var_18]
call	sub_41DF90
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
call	sub_420D20
mov	esi, eax
lea	eax, [ebp+var_18]
call	sub_420D20
cmp	eax, esi
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
lea	ecx, [ebp+var_18]
call	sub_429100
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_47CEB5
mov	eax, [ebp+var_2C]
mov	[ebp+var_4], eax

loc_47CEB5:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_47CDE0 endp

align 10h


; Attributes: bp-based frame

sub_47CEC0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47CF07
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_479A40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47CFB9

loc_47CF07:
cmp	[ebp+arg_10], 0
jnz	short loc_47CF3E
cmp	[ebp+arg_C], 0
jnz	short loc_47CF35
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47CF3E

loc_47CF35:
mov	[ebp+var_34], 1
jmp	short loc_47CF45

loc_47CF3E:
mov	[ebp+var_34], 0

loc_47CF45:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47CF57
and	[ebp+var_C], 0FFFFFFFEh

loc_47CF57:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47CF8D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_479A40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47CF8B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47CF8B:
jmp	short loc_47CFB9

loc_47CF8D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_479A40
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47CFB9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47CFB9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47CEC0 endp

align 10h


; Attributes: bp-based frame

sub_47D000 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47D01C:
cmp	[ebp+var_10], 0
jz	short loc_47D066
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47D055
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47D05E

loc_47D055:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47D05E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47D01C

loc_47D066:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47D108
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47D0F9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47CEC0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47D181
jmp	short loc_47D108

loc_47D0F9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47D108:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47D166
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47CEC0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47D181

loc_47D166:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47D181:
mov	esp, ebp
pop	ebp
retn	8
sub_47D000 endp

align 10h


; Attributes: bp-based frame

sub_47D190 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_47F750
add	esp, 14h
pop	ebp
retn
sub_47D190 endp



; Attributes: bp-based frame

sub_47D1B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
fld	dword ptr [eax+1Ch]
fld	dword ptr [ecx+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47D1D5
mov	[ebp+var_4], 1
jmp	short loc_47D1DC

loc_47D1D5:
mov	[ebp+var_4], 0

loc_47D1DC:
movzx	ecx, byte ptr [ebp+var_4]
test	ecx, ecx
jz	short loc_47D258
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
fld	dword ptr [edx+1Ch]
fld	dword ptr [eax+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47D203
mov	[ebp+var_8], 1
jmp	short loc_47D20A

loc_47D203:
mov	[ebp+var_8], 0

loc_47D20A:
movzx	eax, byte ptr [ebp+var_8]
test	eax, eax
jz	short loc_47D21C
mov	eax, [ebp+arg_4]
jmp	loc_47D2C5
jmp	short loc_47D256

loc_47D21C:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
fld	dword ptr [ecx+1Ch]
fld	dword ptr [edx+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47D23B
mov	[ebp+var_C], 1
jmp	short loc_47D242

loc_47D23B:
mov	[ebp+var_C], 0

loc_47D242:
movzx	edx, byte ptr [ebp+var_C]
test	edx, edx
jz	short loc_47D251
mov	eax, [ebp+arg_8]
jmp	short loc_47D2C5
jmp	short loc_47D256

loc_47D251:
mov	eax, [ebp+arg_0]
jmp	short loc_47D2C5

loc_47D256:
jmp	short loc_47D2C5

loc_47D258:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
fld	dword ptr [eax+1Ch]
fld	dword ptr [ecx+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47D277
mov	[ebp+var_10], 1
jmp	short loc_47D27E

loc_47D277:
mov	[ebp+var_10], 0

loc_47D27E:
movzx	ecx, byte ptr [ebp+var_10]
test	ecx, ecx
jz	short loc_47D28D
mov	eax, [ebp+arg_0]
jmp	short loc_47D2C5
jmp	short loc_47D2C5

loc_47D28D:
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
fld	dword ptr [edx+1Ch]
fld	dword ptr [eax+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47D2AC
mov	[ebp+var_14], 1
jmp	short loc_47D2B3

loc_47D2AC:
mov	[ebp+var_14], 0

loc_47D2B3:
movzx	eax, byte ptr [ebp+var_14]
test	eax, eax
jz	short loc_47D2C2
mov	eax, [ebp+arg_8]
jmp	short loc_47D2C5
jmp	short loc_47D2C5

loc_47D2C2:
mov	eax, [ebp+arg_4]

loc_47D2C5:
mov	esp, ebp
pop	ebp
retn
sub_47D1B0 endp

align 10h


; Attributes: bp-based frame

sub_47D2D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch

loc_47D2D6:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
fld	dword ptr [ecx+1Ch]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+1Ch]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47D2F5
mov	[ebp+var_18], 1
jmp	short loc_47D2FC

loc_47D2F5:
mov	[ebp+var_18], 0

loc_47D2FC:
movzx	eax, byte ptr [ebp+var_18]
test	eax, eax
jz	short loc_47D30F
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+arg_0], ecx
jmp	short loc_47D2D6

loc_47D30F:
mov	edx, [ebp+arg_4]
sub	edx, 4
mov	[ebp+arg_4], edx

loc_47D318:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_8]
fld	dword ptr [ecx+1Ch]
fld	dword ptr [edx+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47D335
mov	[ebp+var_1C], 1
jmp	short loc_47D33C

loc_47D335:
mov	[ebp+var_1C], 0

loc_47D33C:
movzx	eax, byte ptr [ebp+var_1C]
test	eax, eax
jz	short loc_47D34F
mov	ecx, [ebp+arg_4]
sub	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_47D318

loc_47D34F:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_47D35C
mov	eax, [ebp+arg_0]
jmp	short loc_47D37A

loc_47D35C:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47F840
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
jmp	loc_47D2D6

loc_47D37A:
mov	esp, ebp
pop	ebp
retn
sub_47D2D0 endp

align 10h


; Attributes: bp-based frame

sub_47D380 proc	near

var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_47D393
jmp	loc_47D424

loc_47D393:
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_47D3A7

loc_47D39E:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_47D3A7:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_47D424
mov	cl, [ebp+arg_C]
mov	[ebp+var_15], cl
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+var_14]
fld	dword ptr [edx+1Ch]
fld	dword ptr [eax+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47D3DA
mov	[ebp+var_1C], 1
jmp	short loc_47D3E1

loc_47D3DA:
mov	[ebp+var_1C], 0

loc_47D3E1:
movzx	ecx, byte ptr [ebp+var_1C]
test	ecx, ecx
jz	short loc_47D40A
mov	edx, [ebp+var_4]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5F4430
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	[edx], eax
jmp	short loc_47D41F

loc_47D40A:
movzx	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_480930
add	esp, 0Ch

loc_47D41F:
jmp	loc_47D39E

loc_47D424:
mov	esp, ebp
pop	ebp
retn
sub_47D380 endp

align 10h


; Attributes: bp-based frame

sub_47D430 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47D477
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EFA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47D529

loc_47D477:
cmp	[ebp+arg_10], 0
jnz	short loc_47D4AE
cmp	[ebp+arg_C], 0
jnz	short loc_47D4A5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47D4AE

loc_47D4A5:
mov	[ebp+var_34], 1
jmp	short loc_47D4B5

loc_47D4AE:
mov	[ebp+var_34], 0

loc_47D4B5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47D4C7
and	[ebp+var_C], 0FFFFFFFEh

loc_47D4C7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47D4FD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EFA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47D4FB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47D4FB:
jmp	short loc_47D529

loc_47D4FD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EFA0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47D529
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47D529:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47D430 endp

align 10h


; Attributes: bp-based frame

sub_47D570 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47D58C:
cmp	[ebp+var_10], 0
jz	short loc_47D5D6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47D5C5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47D5CE

loc_47D5C5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47D5CE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47D58C

loc_47D5D6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47D678
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47D669
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47D430
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47D6F1
jmp	short loc_47D678

loc_47D669:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47D678:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47D6D6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47D430
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47D6F1

loc_47D6D6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47D6F1:
mov	esp, ebp
pop	ebp
retn	8
sub_47D570 endp

align 10h


; Attributes: bp-based frame

sub_47D700 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_47D747
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_479A90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_47D7F9

loc_47D747:
cmp	[ebp+arg_10], 0
jnz	short loc_47D77E
cmp	[ebp+arg_C], 0
jnz	short loc_47D775
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47D77E

loc_47D775:
mov	[ebp+var_34], 1
jmp	short loc_47D785

loc_47D77E:
mov	[ebp+var_34], 0

loc_47D785:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_47D797
and	[ebp+var_C], 0FFFFFFFEh

loc_47D797:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_47D7CD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_479A90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_47D7CB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_47D7CB:
jmp	short loc_47D7F9

loc_47D7CD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_479A90
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_47D7F9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_47D7F9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_47D700 endp

align 10h


; Attributes: bp-based frame

sub_47D840 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47D85C:
cmp	[ebp+var_10], 0
jz	short loc_47D8A6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47D895
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47D89E

loc_47D895:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47D89E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47D85C

loc_47D8A6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47D948
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47D939
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_47D700
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47D9C1
jmp	short loc_47D948

loc_47D939:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47D948:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47D9A6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_47D700
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47D9C1

loc_47D9A6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47D9C1:
mov	esp, ebp
pop	ebp
retn	8
sub_47D840 endp

align 10h


; Attributes: bp-based frame

sub_47D9D0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_47D9E1

loc_47D9D8:
mov	eax, [ebp+arg_0]
sub	eax, 10h
mov	[ebp+arg_0], eax

loc_47D9E1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_47DA24
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_47DA22
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_47DA22:
jmp	short loc_47D9D8

loc_47DA24:
mov	esp, ebp
pop	ebp
retn
sub_47D9D0 endp

align 10h


; Attributes: bp-based frame

sub_47DA30 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
jmp	short loc_47DA41

loc_47DA38:
mov	eax, [ebp+arg_0]
sub	eax, 0Ch
mov	[ebp+arg_0], eax

loc_47DA41:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_47DA84
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 0Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_555450
xor	ecx, ecx
and	ecx, 1
jz	short loc_47DA82
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_47DA82:
jmp	short loc_47DA38

loc_47DA84:
mov	esp, ebp
pop	ebp
retn
sub_47DA30 endp

align 10h


; Attributes: bp-based frame

sub_47DA90 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_47DAA1

loc_47DA98:
mov	eax, [ebp+arg_0]
sub	eax, 1Ch
mov	[ebp+arg_0], eax

loc_47DAA1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_47DAE4
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 1Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_47DAE2
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_47DAE2:
jmp	short loc_47DA98

loc_47DAE4:
mov	esp, ebp
pop	ebp
retn
sub_47DA90 endp

align 10h


; Attributes: bp-based frame

sub_47DAF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_47DB05:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_47DB6B
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
fld	dword ptr [eax+98h]
mov	ecx, [ebp+arg_C]
fld	dword ptr [ecx+98h]
fcomip	st, st(1)
fstp	st
jbe	short loc_47DB34
mov	[ebp+var_8], 1
jmp	short loc_47DB3B

loc_47DB34:
mov	[ebp+var_8], 0

loc_47DB3B:
movzx	edx, byte ptr [ebp+var_8]
test	edx, edx
jz	short loc_47DB6B
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	esi, [ebp+arg_0]
mov	edx, [esi+edx*4]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_47DB05

loc_47DB6B:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+ecx*4], eax
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_47DAF0 endp

align 10h


; Attributes: bp-based frame

sub_47DB80 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h
arg_44=	dword ptr  4Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	eax, [ebp+arg_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_47DB97:
mov	eax, [ebp+arg_10]
cmp	eax, [ebp+arg_14]
jle	loc_47DCC1
mov	ecx, [ebp+arg_0]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_50], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_4]
push	edx
lea	ecx, [ebp+var_54]
call	sub_479AE0
mov	eax, [ebp+var_54]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_50]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_48]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_58], ecx
lea	edx, [ebp+arg_18]
push	edx
mov	ecx, [ebp+var_58]
call	sub_1092DD0
movzx	eax, al
test	eax, eax
jz	loc_47DCC1
mov	ecx, [ebp+arg_0]
mov	[ebp+var_68], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_64], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_60], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_4]
push	edx
lea	ecx, [ebp+var_68]
call	sub_479AE0
mov	eax, [ebp+var_68]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_64]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_60]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_5C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_74], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_10]
push	eax
lea	ecx, [ebp+var_7C]
call	sub_479AE0
mov	ecx, [ebp+var_7C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_6C]
add	eax, 4
push	eax
mov	ecx, [ebp+var_80]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+var_80]
mov	edx, [ebp+var_6C]
mov	eax, [edx+2Ch]
mov	[ecx+2Ch], eax
mov	ecx, [ebp+var_4]
mov	[ebp+arg_10], ecx
mov	eax, [ebp+arg_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	loc_47DB97

loc_47DCC1:
mov	edx, [ebp+arg_0]
mov	[ebp+var_90], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_88], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_84], edx
mov	eax, [ebp+arg_10]
push	eax
lea	ecx, [ebp+var_90]
call	sub_479AE0
mov	ecx, [ebp+var_90]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_88]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
mov	ecx, [ebp+arg_18]
mov	[eax], ecx
lea	edx, [ebp+arg_1C]
push	edx
mov	ecx, [ebp+var_94]
add	ecx, 4
call	sub_4023E0
mov	eax, [ebp+var_94]
mov	ecx, [ebp+arg_44]
mov	[eax+2Ch], ecx
lea	ecx, [ebp+arg_1C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_47DB80 endp

align 10h


; Attributes: bp-based frame

sub_47DD60 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_30=	dword ptr  38h
arg_34=	byte ptr  3Ch
arg_5C=	dword ptr  64h
arg_60=	byte ptr  68h

push	ebp
mov	ebp, esp
sub	esp, 30h
push	esi
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_20]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_1C]
add	edx, 4
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 4
call	sub_4023E0
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_8], eax
movzx	ecx, [ebp+arg_60]
push	ecx
sub	esp, 30h
mov	[ebp+var_24], esp
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_30]
mov	[edx], eax
lea	ecx, [ebp+arg_34]
push	ecx
mov	ecx, [ebp+var_24]
add	ecx, 4
call	sub_403400
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_5C]
mov	[edx+2Ch], eax
mov	[ebp+var_28], 80h
mov	eax, [ebp+var_C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 30h
idiv	ecx
mov	ecx, eax
mov	eax, [ebp+arg_10]
sub	eax, [ebp+arg_14]
cdq
mov	esi, 30h
idiv	esi
mov	edx, [ebp+arg_1C]
sub	edx, [ebp+var_8]
sar	edx, 2
sub	edx, 1
imul	edx, 2
add	edx, eax
add	edx, ecx
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
push	eax
push	0
sub	esp, 10h
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
call	sub_47FA20
add	esp, 4Ch
lea	ecx, [ebp+arg_34]
call	sub_407E50
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_47DD60 endp

align 10h


; Attributes: bp-based frame

sub_47DE60 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_47DE71

loc_47DE68:
mov	eax, [ebp+arg_0]
sub	eax, 4
mov	[ebp+arg_0], eax

loc_47DE71:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_47DEB6
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_47DEB4
push	4
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_47DEB4:
jmp	short loc_47DE68

loc_47DEB6:
mov	esp, ebp
pop	ebp
retn
sub_47DE60 endp

align 10h


; Attributes: bp-based frame

sub_47DEC0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_4]
sar	eax, 2
shl	eax, 5
add	eax, [ebp+arg_10]
sub	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
jmp	short loc_47DEE6

loc_47DEDD:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_47DEE6:
cmp	[ebp+var_4], 0
jle	loc_47DF81
mov	edx, 1
mov	ecx, [ebp+arg_8]
shl	edx, cl
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_10], edx
mov	eax, 1
mov	ecx, [ebp+arg_18]
shl	eax, cl
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_14]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_459980
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
cmp	edx, 1Fh
jnz	short loc_47DF5B
mov	[ebp+arg_8], 0
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx

loc_47DF5B:
mov	edx, [ebp+arg_18]
mov	eax, [ebp+arg_18]
add	eax, 1
mov	[ebp+arg_18], eax
cmp	edx, 1Fh
jnz	short loc_47DF7C
mov	[ebp+arg_18], 0
mov	ecx, [ebp+arg_14]
add	ecx, 4
mov	[ebp+arg_14], ecx

loc_47DF7C:
jmp	loc_47DEDD

loc_47DF81:
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	[ecx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_47DEC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47DFA0(void *)
sub_47DFA0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_46AA70
xor	ecx, ecx
and	ecx, 1
jz	short loc_47DFC7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_47DFC7:
mov	esp, ebp
pop	ebp
retn
sub_47DFA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47DFD0(void *)
sub_47DFD0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_468AA0
xor	ecx, ecx
and	ecx, 1
jz	short loc_47DFF9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_47DFF9:
mov	esp, ebp
pop	ebp
retn
sub_47DFD0 endp

align 10h


; Attributes: bp-based frame

sub_47E000 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	[ebp+var_1C], ecx
jmp	short loc_47E014

loc_47E00C:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_47E014:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+arg_4]
call	sub_409650
movzx	ecx, al
test	ecx, ecx
jz	short loc_47E04E
mov	edx, [ebp+arg_4]
add	edx, 8
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	eax, [ebp+var_20]
lea	esi, [ebp+var_8]
call	sub_4099E0
jmp	short loc_47E00C

loc_47E04E:
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_47E000 endp

align 10h


; Attributes: bp-based frame

sub_47E060 proc	near

var_3C=	dword ptr -3Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
jmp	short loc_47E073

loc_47E06B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_47E073:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_47E0AF
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_4698C0
jmp	short loc_47E06B

loc_47E0AF:
mov	esp, ebp
pop	ebp
retn	10h
sub_47E060 endp

align 10h


; Attributes: bp-based frame

sub_47E0C0 proc	near

var_3C=	dword ptr -3Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
jmp	short loc_47E0D3

loc_47E0CB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_47E0D3:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_47E10F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_46A410
jmp	short loc_47E0CB

loc_47E10F:
mov	esp, ebp
pop	ebp
retn	10h
sub_47E0C0 endp

align 10h


; Attributes: bp-based frame

sub_47E120 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_47E133

loc_47E12B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_47E133:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_47E16F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_469E40
jmp	short loc_47E12B

loc_47E16F:
mov	esp, ebp
pop	ebp
retn	10h
sub_47E120 endp

align 10h


; Attributes: bp-based frame

sub_47E180 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_47E193

loc_47E18B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_47E193:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_47E1CF
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_46A6D0
jmp	short loc_47E18B

loc_47E1CF:
mov	esp, ebp
pop	ebp
retn	10h
sub_47E180 endp

align 10h


; Attributes: bp-based frame

sub_47E1E0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_47E1F3

loc_47E1EB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_47E1F3:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_47E26F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_34]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_38]
call	sub_489850
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_34]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_14]
mov	[edx+4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	loc_47E1EB

loc_47E26F:
mov	esp, ebp
pop	ebp
retn	10h
sub_47E1E0 endp

align 10h


; Attributes: bp-based frame

sub_47E280 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_47E293

loc_47E28B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_47E293:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_47E2CF
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_46A980
jmp	short loc_47E28B

loc_47E2CF:
mov	esp, ebp
pop	ebp
retn	10h
sub_47E280 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47E2E0(void *, int)
sub_47E2E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47E331
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_47E338

loc_47E331:
mov	[ebp+var_C], 0

loc_47E338:
mov	esp, ebp
pop	ebp
retn
sub_47E2E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47E340(void *, int)
sub_47E340 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47E3AD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_14], ecx
jmp	short loc_47E3B4

loc_47E3AD:
mov	[ebp+var_14], 0

loc_47E3B4:
mov	esp, ebp
pop	ebp
retn
sub_47E340 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47E3C0(void *, int)
sub_47E3C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	74h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47E41C
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	esi, [ebp+arg_4]
add	esi, 18h
mov	edi, [ebp+var_8]
add	edi, 18h
mov	ecx, 17h
rep movsd
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_47E423

loc_47E41C:
mov	[ebp+var_C], 0

loc_47E423:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_47E3C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47E430(void *, int)
sub_47E430 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47E474
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_480470
mov	[ebp+var_14], eax
jmp	short loc_47E47B

loc_47E474:
mov	[ebp+var_14], 0

loc_47E47B:
mov	esp, ebp
pop	ebp
retn
sub_47E430 endp

align 10h


; Attributes: bp-based frame

sub_47E480 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
push	esi
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_47E67C
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_47E4EA
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_47FE20
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47E994

loc_47E4EA:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+arg_8]
call	sub_420D20
cmp	eax, esi
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_47E540
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	loc_47E994
jmp	loc_47E677

loc_47E540:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	eax, [ebp+arg_8]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_5C]
call	sub_420D20
cmp	eax, esi
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_47E57F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47E994

loc_47E57F:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_47E5C9
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	loc_47E994

loc_47E5C9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+arg_8]
call	sub_420D20
cmp	eax, esi
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_47E64C
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_47E625
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	loc_47E994
jmp	short loc_47E64A

loc_47E625:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	loc_47E994

loc_47E64A:
jmp	short loc_47E677

loc_47E64C:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47FE20
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47E994

loc_47E677:
jmp	loc_47E994

loc_47E67C:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_47E71A
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_70]
call	sub_420D20
cmp	eax, esi
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_47E6EA
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	loc_47E994
jmp	short loc_47E715

loc_47E6EA:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_47FE20
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_47E994

loc_47E715:
jmp	loc_47E994

loc_47E71A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+arg_8]
call	sub_420D20
cmp	eax, esi
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_47E79E
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+arg_8]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_84]
call	sub_420D20
cmp	eax, esi
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_47E79E
mov	[ebp+var_A4], 1
jmp	short loc_47E7A8

loc_47E79E:
mov	[ebp+var_A4], 0

loc_47E7A8:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_47E7BD
and	[ebp+var_4C], 0FFFFFFFEh

loc_47E7BD:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_47E81F
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_47E7F5
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	loc_47E994
jmp	short loc_47E81A

loc_47E7F5:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	loc_47E994

loc_47E81A:
jmp	loc_47E994

loc_47E81F:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_47E879
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_8C]
call	sub_420D20
cmp	eax, esi
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_47E879:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_47E8D2
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_47E8D2
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_47E8C6
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_94]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+arg_8]
call	sub_420D20
cmp	eax, esi
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_47E8D2

loc_47E8C6:
mov	[ebp+var_A8], 1
jmp	short loc_47E8DC

loc_47E8D2:
mov	[ebp+var_A8], 0

loc_47E8DC:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_47E8F1
and	[ebp+var_4C], 0FFFFFFFDh

loc_47E8F1:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_47E94A
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_47E926
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	short loc_47E994
jmp	short loc_47E948

loc_47E926:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_477970
mov	eax, [ebp+arg_0]
jmp	short loc_47E994

loc_47E948:
jmp	short loc_47E994

loc_47E94A:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_47E968
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_47E994
jmp	short loc_47E994

loc_47E968:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_47FE20
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_47E994:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_47E480 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47E9A0(void *, int)
sub_47E9A0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47E9FD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_5E0880
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_47EA04

loc_47E9FD:
mov	[ebp+var_38], 0

loc_47EA04:
mov	esp, ebp
pop	ebp
retn
sub_47E9A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47EA10(void *, int)
sub_47EA10 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_47EA67
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_4710C0
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_47EA6E

loc_47EA67:
mov	[ebp+var_28], 0

loc_47EA6E:
mov	esp, ebp
pop	ebp
retn
sub_47EA10 endp

align 10h


; Attributes: bp-based frame

sub_47EA80 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_45BC60
mov	ecx, [ebp+var_10]
call	sub_407910
mov	ecx, [ebp+var_14]
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_47EAC1
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_47EAC1:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_47EA80 endp

align 10h


; Attributes: bp-based frame

sub_47EAD0 proc	near

var_5C=	dword ptr -5Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 1Ch
call	sub_436480
mov	ecx, [ebp+var_5C]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_47EAD0 endp



; Attributes: bp-based frame

sub_47EAF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_45BC60
mov	ecx, [ebp+var_10]
call	sub_407910
mov	ecx, [ebp+var_14]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_47EAF0 endp

align 10h


; Attributes: bp-based frame

sub_47EB30 proc	near

var_5C=	dword ptr -5Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 4
call	sub_436480
mov	esp, ebp
pop	ebp
retn
sub_47EB30 endp

align 10h


; Attributes: bp-based frame

sub_47EB50 proc	near

var_14=	dword ptr -14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_45BC60
mov	ecx, [ebp+var_14]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_47EB50 endp



; Attributes: bp-based frame

sub_47EB70 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_526980
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_4809A0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EB70 endp



; Attributes: bp-based frame

sub_47EBD0 proc	near

var_7C=	dword ptr -7Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_47EC76
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_47EC31
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	short loc_47EC76

loc_47EC31:
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_47FFC0
mov	ecx, [ebp+arg_4]
call	sub_5D2630

loc_47EC76:
mov	esp, ebp
pop	ebp
retn	8
sub_47EBD0 endp

align 10h


; Attributes: bp-based frame

sub_47EC80 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_480010
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EC80 endp

align 10h


; Attributes: bp-based frame

sub_47ECD0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_480080
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47ECD0 endp

align 10h


; Attributes: bp-based frame

sub_47ED20 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4800F0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47ED20 endp

align 10h


; Attributes: bp-based frame

sub_47ED70 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_480160
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47ED70 endp

align 10h


; Attributes: bp-based frame

sub_47EDC0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4801D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EDC0 endp

align 10h


; Attributes: bp-based frame

sub_47EE10 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4701B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EE10 endp

align 10h


; Attributes: bp-based frame

sub_47EE60 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_480240
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EE60 endp

align 10h


; Attributes: bp-based frame

sub_47EEB0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4802B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EEB0 endp

align 10h


; Attributes: bp-based frame

sub_47EF00 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_480320
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EF00 endp

align 10h


; Attributes: bp-based frame

sub_47EF50 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_480390
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EF50 endp

align 10h


; Attributes: bp-based frame

sub_47EFA0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_480400
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47EFA0 endp

align 10h


; Attributes: bp-based frame

sub_47EFF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
add	ecx, 30h
mov	edx, [ebp+var_C]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+8]
jnz	short loc_47F059
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 2
imul	ecx, 30h
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx], eax

loc_47F059:
mov	esp, ebp
pop	ebp
retn
sub_47EFF0 endp

align 10h


; Attributes: bp-based frame

sub_47F060 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[edx+4], ecx
lea	edx, [ebp+var_64]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_68]
call	sub_4780E0
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_47F060 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47F0F0(void *, int)
sub_47F0F0 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_4804D0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_47F0F0 endp

align 10h


; Attributes: bp-based frame

sub_47F130 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_8], ecx
jmp	short loc_47F153

loc_47F14A:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_47F153:
cmp	[ebp+var_8], 0
jle	short loc_47F17D
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_480590
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
jmp	short loc_47F14A

loc_47F17D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_47F130 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47F190(void *, int)
sub_47F190 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_47F1F4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
lea	edx, [ebp+var_C]
push	edx
call	sub_459510
add	esp, 8
mov	eax, [eax]
push	eax
mov	ecx, [ebp+var_4]
call	sub_456D40
mov	ecx, [ebp+var_18]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_14]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_1C], edx
jmp	short loc_47F1FB

loc_47F1F4:
mov	[ebp+var_1C], 0

loc_47F1FB:
mov	esp, ebp
pop	ebp
retn
sub_47F190 endp

align 10h


; Attributes: bp-based frame

sub_47F200 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_47F200
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 80h
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_47F239:
cmp	[ebp+var_14], 0
jz	loc_47F2E3
lea	ecx, [ebp+var_41]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_40]
call	sub_407810
lea	ecx, [ebp+var_49]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
call	sub_404540
mov	[ebp+var_50], eax
mov	edx, [ebp+var_50]
mov	[ebp+var_48], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_48]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_15], dl
lea	ecx, [ebp+var_40]
call	sub_407E50
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_47F2D1
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_14]
call	sub_4044C0
mov	edx, [eax]
mov	[ebp+var_14], edx
jmp	short loc_47F2DE

loc_47F2D1:
mov	eax, [ebp+var_14]
call	sub_403040
mov	eax, [eax]
mov	[ebp+var_14], eax

loc_47F2DE:
jmp	loc_47F239

loc_47F2E3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_47F200 endp

align 10h


; Attributes: bp-based frame

sub_47F300 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 54h
push	0
lea	eax, [ebp+var_1]
push	eax
sub	esp, 8
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4805E0
add	esp, 1Ch
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_47F300 endp

align 10h


; Attributes: bp-based frame

sub_47F360 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_47F378:
cmp	[ebp+var_8], 0
jz	short loc_47F3C1
mov	eax, [ebp+arg_0]
call	sub_420D20
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
cmp	edx, [ebp+var_C]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_47F3B6
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_47F3BF

loc_47F3B6:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_47F3BF:
jmp	short loc_47F378

loc_47F3C1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47F360 endp

align 10h


; Attributes: bp-based frame

sub_47F3D0 proc	near

var_2C=	dword ptr -2Ch
var_1= byte ptr	-1
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_8]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	ecx, [ebp+var_2C]
call	sub_480660
mov	esp, ebp
pop	ebp
retn	0Ch
sub_47F3D0 endp

align 10h


; Attributes: bp-based frame

sub_47F420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_8], ecx
jmp	short loc_47F443

loc_47F43A:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_47F443:
cmp	[ebp+var_8], 0
jle	short loc_47F46D
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_470230
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
jmp	short loc_47F43A

loc_47F46D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_47F420 endp

align 10h


; Attributes: bp-based frame

sub_47F480 proc	near

var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4806C0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_47F4AC

loc_47F4A3:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_47F4AC:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	short loc_47F523
mov	eax, [ebp+var_4]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_47F4CC
mov	[ebp+var_D], 1
jmp	short loc_47F4D0

loc_47F4CC:
mov	[ebp+var_D], 0

loc_47F4D0:
movzx	edx, [ebp+var_D]
test	edx, edx
jz	short loc_47F521
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_C], ecx
mov	[ebp+var_8], edx
mov	al, [ebp+arg_10]
mov	[ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_4]
mov	[ecx], edx
mov	[ecx+4], eax
movzx	edx, [ebp+var_E]
push	edx		; char
mov	eax, [ebp+var_8]
push	eax		; float
mov	ecx, [ebp+var_C]
push	ecx		; int
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 3
push	edx		; int
push	0		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_480A80
add	esp, 18h

loc_47F521:
jmp	short loc_47F4A3

loc_47F523:
mov	cl, [ebp+arg_10]
mov	[ebp+var_15], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx

loc_47F52F:
mov	eax, [ebp+var_14]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 1
jle	short loc_47F563
mov	ecx, [ebp+var_14]
mov	[ebp+var_1C], ecx
movzx	edx, [ebp+var_15]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_480B60
add	esp, 0Ch
mov	edx, [ebp+var_14]
sub	edx, 8
mov	[ebp+var_14], edx
jmp	short loc_47F52F

loc_47F563:
mov	esp, ebp
pop	ebp
retn
sub_47F480 endp

align 10h


; Attributes: bp-based frame

sub_47F570 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	[ebp+var_6], dl
mov	al, [ebp+var_6]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_8+1],	cl
mov	dl, byte ptr [ebp+var_8+1]
mov	[ebp+var_1], dl
xor	eax, eax
mov	byte ptr [ebp+var_8], al
mov	cl, byte ptr [ebp+var_8]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_14]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_10]
mov	[edx], eax
mov	ecx, [ebp+var_C]
mov	[edx+4], ecx
mov	esp, ebp
pop	ebp
retn
sub_47F570 endp

align 10h


; Attributes: bp-based frame

sub_47F5E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_47F5F5

loc_47F5EC:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_47F5F5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_47F61A
movzx	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; float
mov	eax, [ecx]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
call	sub_480750
add	esp, 10h
jmp	short loc_47F5EC

loc_47F61A:
mov	esp, ebp
pop	ebp
retn
sub_47F5E0 endp

align 10h


; Attributes: bp-based frame

sub_47F620 proc	near

var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4807C0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_47F64C

loc_47F643:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_47F64C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	short loc_47F6C8
mov	eax, [ebp+var_4]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_47F66E
mov	[ebp+var_D], 1
jmp	short loc_47F672

loc_47F66E:
mov	[ebp+var_D], 0

loc_47F672:
movzx	edx, [ebp+var_D]
test	edx, edx
jz	short loc_47F6C3
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_C], ecx
mov	[ebp+var_8], edx
mov	al, [ebp+arg_10]
mov	[ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_4]
mov	[ecx], edx
mov	[ecx+4], eax
movzx	edx, [ebp+var_E]
push	edx		; char
mov	eax, [ebp+var_8]
push	eax		; float
mov	ecx, [ebp+var_C]
push	ecx		; int
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 3
push	edx		; int
push	0		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_480BC0
add	esp, 18h

loc_47F6C3:
jmp	loc_47F643

loc_47F6C8:
mov	cl, [ebp+arg_10]
mov	[ebp+var_15], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx

loc_47F6D4:
mov	eax, [ebp+var_14]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 1
jle	short loc_47F708
mov	ecx, [ebp+var_14]
mov	[ebp+var_1C], ecx
movzx	edx, [ebp+var_15]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_480CA0
add	esp, 0Ch
mov	edx, [ebp+var_14]
sub	edx, 8
mov	[ebp+var_14], edx
jmp	short loc_47F6D4

loc_47F708:
mov	esp, ebp
pop	ebp
retn
sub_47F620 endp

align 10h


; Attributes: bp-based frame

sub_47F710 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_47F725

loc_47F71C:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_47F725:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_47F74A
movzx	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; float
mov	eax, [ecx]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
call	sub_480850
add	esp, 10h
jmp	short loc_47F71C

loc_47F74A:
mov	esp, ebp
pop	ebp
retn
sub_47F710 endp

align 10h


; Attributes: bp-based frame

sub_47F750 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4808C0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_47F77C

loc_47F773:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_47F77C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	short loc_47F7ED
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
fld	dword ptr [eax+1Ch]
fld	dword ptr [ecx+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_47F7A3
mov	[ebp+var_18], 1
jmp	short loc_47F7AA

loc_47F7A3:
mov	[ebp+var_18], 0

loc_47F7AA:
movzx	ecx, byte ptr [ebp+var_18]
test	ecx, ecx
jz	short loc_47F7EB
mov	dl, [ebp+arg_10]
mov	[ebp+var_9], dl
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
movzx	edx, [ebp+var_9]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_480D00
add	esp, 14h

loc_47F7EB:
jmp	short loc_47F773

loc_47F7ED:
mov	al, [ebp+arg_10]
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx

loc_47F7F9:
mov	edx, [ebp+var_10]
sub	edx, [ebp+arg_0]
sar	edx, 2
cmp	edx, 1
jle	short loc_47F82D
mov	eax, [ebp+var_10]
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_480DD0
add	esp, 0Ch
mov	ecx, [ebp+var_10]
sub	ecx, 4
mov	[ebp+var_10], ecx
jmp	short loc_47F7F9

loc_47F82D:
mov	esp, ebp
pop	ebp
retn
sub_47F750 endp

align 10h


; Attributes: bp-based frame

sub_47F840 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	[ebp+var_6], dl
mov	al, [ebp+var_6]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_8+1],	cl
mov	dl, byte ptr [ebp+var_8+1]
mov	[ebp+var_1], dl
xor	eax, eax
mov	byte ptr [ebp+var_8], al
mov	cl, byte ptr [ebp+var_8]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn
sub_47F840 endp

align 10h


; Attributes: bp-based frame

sub_47F8A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_47F8B5

loc_47F8AC:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_47F8B5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_47F8D6
movzx	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_480930
add	esp, 0Ch
jmp	short loc_47F8AC

loc_47F8D6:
mov	esp, ebp
pop	ebp
retn
sub_47F8A0 endp

align 10h


; Attributes: bp-based frame

sub_47F8E0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_47F8F8:
cmp	[ebp+var_8], 0
jz	short loc_47F93E
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
cmp	ecx, [ebp+var_C]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_47F933
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_47F93C

loc_47F933:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_47F93C:
jmp	short loc_47F8F8

loc_47F93E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_47F8E0 endp

align 10h


; Attributes: bp-based frame

sub_47F950 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_47F967:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_47F9D9
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	ecx, [edx+ecx*4-4]
fld	dword ptr [eax+98h]
fld	dword ptr [ecx+98h]
fcomip	st, st(1)
fstp	st
jbe	short loc_47F99D
mov	[ebp+var_10], 1
jmp	short loc_47F9A4

loc_47F99D:
mov	[ebp+var_10], 0

loc_47F9A4:
movzx	edx, byte ptr [ebp+var_10]
test	edx, edx
jz	short loc_47F9B5
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_47F9B5:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	eax, [esi+eax*4]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_8]
lea	eax, [edx+edx+2]
mov	[ebp+var_8], eax
jmp	short loc_47F967

loc_47F9D9:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_47F9FD
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	ecx, [esi+ecx*4-4]
mov	[eax+edx*4], ecx
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_47F9FD:
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47DAF0
add	esp, 14h
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_47F950 endp

align 10h


; Attributes: bp-based frame

sub_47FA20 proc	near

var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h
arg_44=	dword ptr  4Ch
arg_48=	byte ptr  50h

push	ebp
mov	ebp, esp
sub	esp, 16Ch
mov	eax, [ebp+arg_10]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_10]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_47FA39:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_14]
jge	loc_47FC1E
mov	ecx, [ebp+arg_0]
mov	[ebp+var_80], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_8]
sub	edx, 1
push	edx
lea	ecx, [ebp+var_80]
call	sub_479AE0
mov	eax, [ebp+var_80]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_7C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_74]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_84], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_94]
call	sub_479AE0
mov	ecx, [ebp+var_94]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_90]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_8C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_28]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_98]
call	sub_1092DD0
movzx	ecx, al
test	ecx, ecx
jz	short loc_47FB0F
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_47FB0F:
mov	eax, [ebp+arg_0]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_A8]
call	sub_479AE0
mov	edx, [ebp+var_A8]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_A4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_A0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_48]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_B8], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+arg_10]
push	edx
lea	ecx, [ebp+var_BC]
call	sub_479AE0
mov	eax, [ebp+var_BC]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_B8]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_B4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_B0]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_AC]
add	edx, 4
push	edx
mov	ecx, [ebp+var_C0]
add	ecx, 4
call	sub_4023E0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+arg_10], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	loc_47FA39

loc_47FC1E:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_14]
jnz	loc_47FD30
mov	ecx, [ebp+arg_0]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_CC], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_8]
sub	edx, 1
push	edx
lea	ecx, [ebp+var_D0]
call	sub_479AE0
mov	eax, [ebp+var_D0]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_CC]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_C8]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C4]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_68]
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_E4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_DC], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_D8], edx
mov	eax, [ebp+arg_10]
push	eax
lea	ecx, [ebp+var_E4]
call	sub_479AE0
mov	ecx, [ebp+var_E4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_E0]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_DC]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_D8]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_E8], edx
mov	eax, [ebp+var_E8]
mov	ecx, [ebp+var_D4]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_D4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_E8]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+var_E8]
mov	edx, [ebp+var_D4]
mov	eax, [edx+2Ch]
mov	[ecx+2Ch], eax
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+arg_10], ecx

loc_47FD30:
movzx	edx, [ebp+arg_48]
push	edx
sub	esp, 30h
mov	[ebp+var_EC], esp
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_18]
mov	[eax], ecx
lea	edx, [ebp+arg_1C]
push	edx
mov	ecx, [ebp+var_EC]
add	ecx, 4
call	sub_403400
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_44]
mov	[eax+2Ch], ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_10]
push	eax
sub	esp, 10h
mov	[ebp+var_F0], esp
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
call	sub_47DB80
add	esp, 4Ch
lea	ecx, [ebp+arg_1C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_47FA20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_47FDB0(void *, int)
sub_47FDB0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_47FE07
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+var_4]
add	edx, 18h
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[eax], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_47FDFF
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA80

loc_47FDFF:
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
jmp	short loc_47FE0E

loc_47FE07:
mov	[ebp+var_C], 0

loc_47FE0E:
mov	esp, ebp
pop	ebp
retn
sub_47FDB0 endp

align 10h


; Attributes: bp-based frame

sub_47FE20 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
push	esi
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_47FE3D:
cmp	[ebp+var_10], 0
jz	short loc_47FE91
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+arg_4]
call	sub_420D20
cmp	eax, esi
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_47FE80
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_47FE89

loc_47FE80:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_47FE89:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_47FE3D

loc_47FE91:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_47FF33
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_47FF24
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_477970
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_47FFB6
jmp	short loc_47FF33

loc_47FF24:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_47FF33:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	eax, [ebp+arg_4]
call	sub_420D20
mov	esi, eax
mov	eax, [ebp+var_4C]
call	sub_420D20
cmp	eax, esi
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_47FF9B
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_477970
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_47FFB6

loc_47FF9B:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_47FFB6:
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_47FE20 endp

align 10h


; Attributes: bp-based frame

sub_47FFC0 proc	near

var_78=	dword ptr -78h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_480A20
mov	esp, ebp
pop	ebp
retn	0Ch
sub_47FFC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480010(void *, int)
sub_480010 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_480067
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_470BE0
mov	eax, [ebp+var_8]
mov	[ebp+var_74], eax
jmp	short loc_48006E

loc_480067:
mov	[ebp+var_74], 0

loc_48006E:
mov	esp, ebp
pop	ebp
retn
sub_480010 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480080(void *, int)
sub_480080 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4800DD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_471150
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_4800E4

loc_4800DD:
mov	[ebp+var_38], 0

loc_4800E4:
mov	esp, ebp
pop	ebp
retn
sub_480080 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4800F0(void *, int)
sub_4800F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_480150
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 0Ch
rep movsd
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_480157

loc_480150:
mov	[ebp+var_C], 0

loc_480157:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4800F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480160(void *, int)
sub_480160 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4801B7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_470EA0
mov	eax, [ebp+var_8]
mov	[ebp+var_74], eax
jmp	short loc_4801BE

loc_4801B7:
mov	[ebp+var_74], 0

loc_4801BE:
mov	esp, ebp
pop	ebp
retn
sub_480160 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4801D0(void *, int)
sub_4801D0 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_480227
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_470DE0
mov	eax, [ebp+var_8]
mov	[ebp+var_74], eax
jmp	short loc_48022E

loc_480227:
mov	[ebp+var_74], 0

loc_48022E:
mov	esp, ebp
pop	ebp
retn
sub_4801D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480240(void *, int)
sub_480240 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_480297
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_470CA0
mov	eax, [ebp+var_8]
mov	[ebp+var_74], eax
jmp	short loc_48029E

loc_480297:
mov	[ebp+var_74], 0

loc_48029E:
mov	esp, ebp
pop	ebp
retn
sub_480240 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4802B0(void *, int)
sub_4802B0 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_480307
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_479590
mov	eax, [ebp+var_8]
mov	[ebp+var_74], eax
jmp	short loc_48030E

loc_480307:
mov	[ebp+var_74], 0

loc_48030E:
mov	esp, ebp
pop	ebp
retn
sub_4802B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480320(void *, int)
sub_480320 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_480379
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_470F60
mov	ecx, [ebp+var_8]
mov	[ebp+var_74], ecx
jmp	short loc_480380

loc_480379:
mov	[ebp+var_74], 0

loc_480380:
mov	esp, ebp
pop	ebp
retn
sub_480320 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480390(void *, int)
sub_480390 proc	near

var_50=	dword ptr -50h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4803E7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_470AD0
mov	eax, [ebp+var_8]
mov	[ebp+var_50], eax
jmp	short loc_4803EE

loc_4803E7:
mov	[ebp+var_50], 0

loc_4803EE:
mov	esp, ebp
pop	ebp
retn
sub_480390 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480400(void *, int)
sub_480400 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_48045D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_471250
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_480464

loc_48045D:
mov	[ebp+var_38], 0

loc_480464:
mov	esp, ebp
pop	ebp
retn
sub_480400 endp

align 10h


; Attributes: bp-based frame

sub_480470 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 18h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [edx+1Ch]
mov	[ecx+1Ch], eax
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_480470 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4804D0(void *, int)
sub_4804D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_480535
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_480509
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_480509:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
jmp	short loc_48053C

loc_480535:
mov	[ebp+var_8], 0

loc_48053C:
mov	esp, ebp
pop	ebp
retn
sub_4804D0 endp



; Attributes: bp-based frame

; int __cdecl sub_480540(void *, int)
sub_480540 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_480584
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_50FA70
mov	[ebp+var_28], eax
jmp	short loc_48058B

loc_480584:
mov	[ebp+var_28], 0

loc_48058B:
mov	esp, ebp
pop	ebp
retn
sub_480540 endp

align 10h


; Attributes: bp-based frame

sub_480590 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_4805C9
mov	eax, [ebp+arg_4]
mov	esi, [ebp+var_8]
call	sub_41E510
mov	[ebp+var_C], eax
jmp	short loc_4805D0

loc_4805C9:
mov	[ebp+var_C], 0

loc_4805D0:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_480590 endp

align 10h


; Attributes: bp-based frame

sub_4805E0 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
jmp	short loc_4805F7

loc_4805E8:
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax

loc_4805F7:
lea	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_C]
setnz	al
mov	[ebp+var_35], al
movzx	ecx, [ebp+var_35]
test	ecx, ecx
jz	short loc_480635
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+arg_C]
call	sub_479730
jmp	short loc_4805E8

loc_480635:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4805E0 endp

align 10h


; Attributes: bp-based frame

sub_480660 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= byte ptr	-0Ch
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	[ebp+var_1C], ecx
jmp	short loc_480674

loc_48066C:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_480674:
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_8]
call	sub_402EB0
lea	ecx, [ebp+arg_4]
call	sub_409650
movzx	eax, al
test	eax, eax
jz	short loc_4806B1
lea	eax, [ebp+arg_4]
call	sub_4028D0
mov	[ebp+var_20], eax
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	eax, [ebp+var_20]
lea	esi, [ebp+var_C]
call	sub_4099E0
jmp	short loc_48066C

loc_4806B1:
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_480660 endp

align 10h


; Attributes: bp-based frame

sub_4806C0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	al, [ebp+arg_8]
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
cmp	ecx, 2
jge	short loc_4806DC
jmp	short loc_48073D

loc_4806DC:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_4806F6:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	[ebp+var_10], edx
mov	[ebp+var_C], eax
movzx	ecx, [ebp+var_11]
push	ecx		; char
mov	edx, [ebp+var_C]
push	edx		; float
mov	eax, [ebp+var_10]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_480A80
add	esp, 18h
cmp	[ebp+var_8], 0
jnz	short loc_480732
jmp	short loc_48073D

loc_480732:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_4806F6

loc_48073D:
mov	esp, ebp
pop	ebp
retn
sub_4806C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480750(int, int, float)
sub_480750 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 8
mov	[ebp+var_4], ecx

loc_480765:
fld	[ebp+arg_8]
mov	edx, [ebp+var_4]
fld	dword ptr [edx+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_48077A
mov	[ebp+var_5], 1
jmp	short loc_48077E

loc_48077A:
mov	[ebp+var_5], 0

loc_48077E:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4807A7
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_4]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
sub	eax, 8
mov	[ebp+var_4], eax
jmp	short loc_480765

loc_4807A7:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_480750 endp

align 10h


; Attributes: bp-based frame

sub_4807C0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	al, [ebp+arg_8]
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
cmp	ecx, 2
jge	short loc_4807DC
jmp	short loc_48083D

loc_4807DC:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_4807F6:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	[ebp+var_10], edx
mov	[ebp+var_C], eax
movzx	ecx, [ebp+var_11]
push	ecx		; char
mov	edx, [ebp+var_C]
push	edx		; float
mov	eax, [ebp+var_10]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_480BC0
add	esp, 18h
cmp	[ebp+var_8], 0
jnz	short loc_480832
jmp	short loc_48083D

loc_480832:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_4807F6

loc_48083D:
mov	esp, ebp
pop	ebp
retn
sub_4807C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480850(int, int, float)
sub_480850 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 8
mov	[ebp+var_4], ecx

loc_480865:
fld	[ebp+arg_8]
mov	edx, [ebp+var_4]
fld	dword ptr [edx+4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_48087C
mov	[ebp+var_5], 1
jmp	short loc_480880

loc_48087C:
mov	[ebp+var_5], 0

loc_480880:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4808A9
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+arg_0]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_4]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
sub	eax, 8
mov	[ebp+var_4], eax
jmp	short loc_480865

loc_4808A9:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_480850 endp

align 10h


; Attributes: bp-based frame

sub_4808C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cmp	eax, 2
jge	short loc_4808D6
jmp	short loc_480926

loc_4808D6:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_4808F0:
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_480D00
add	esp, 14h
cmp	[ebp+var_8], 0
jnz	short loc_48091B
jmp	short loc_480926

loc_48091B:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_4808F0

loc_480926:
mov	esp, ebp
pop	ebp
retn
sub_4808C0 endp

align 10h


; Attributes: bp-based frame

sub_480930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 4
mov	[ebp+var_4], ecx

loc_480945:
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+arg_4]
fld	dword ptr [eax+1Ch]
fld	dword ptr [ecx+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_480962
mov	[ebp+var_8], 1
jmp	short loc_480969

loc_480962:
mov	[ebp+var_8], 0

loc_480969:
movzx	edx, byte ptr [ebp+var_8]
test	edx, edx
jz	short loc_48098C
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_4]
sub	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_480945

loc_48098C:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	esp, ebp
pop	ebp
retn
sub_480930 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4809A0(void *, int)
sub_4809A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_480A0F
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_4809FB
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA80

loc_4809FB:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
jmp	short loc_480A16

loc_480A0F:
mov	[ebp+var_10], 0

loc_480A16:
mov	esp, ebp
pop	ebp
retn
sub_4809A0 endp

align 10h


; Attributes: bp-based frame

sub_480A20 proc	near

var_6C=	dword ptr -6Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_480E10
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_47EBD0
lea	ecx, [ebp+var_8]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn	10h
sub_480A20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480A80(int, int, int,	int, float, char)
sub_480A80 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_480A97:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_480B00
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+ecx*8+4]
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+eax*8-4]
fcomip	st, st(1)
fstp	st
jbe	short loc_480ABF
mov	[ebp+var_9], 1
jmp	short loc_480AC3

loc_480ABF:
mov	[ebp+var_9], 0

loc_480AC3:
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_480AD4
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_480AD4:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8]
mov	ecx, [edx+ecx*8+4]
mov	edx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+edx*8], eax
mov	[esi+edx*8+4], ecx
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_480A97

loc_480B00:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_480B2C
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8-8]
mov	ecx, [edx+ecx*8-4]
mov	edx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+edx*8], eax
mov	[esi+edx*8+4], ecx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_480B2C:
movzx	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_10]
push	edx		; float
mov	eax, [ebp+arg_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_480EA0
add	esp, 18h
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_480A80 endp

align 10h


; Attributes: bp-based frame

sub_480B60 proc	near

var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	al, [ebp+arg_8]
mov	[ebp+var_A], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx-8]
mov	eax, [ecx-4]
mov	[ebp+var_8], edx
mov	[ebp+var_4], eax
mov	cl, [ebp+var_A]
mov	[ebp+var_9], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+arg_4]
mov	[edx-8], eax
mov	[edx-4], ecx
movzx	eax, [ebp+var_9]
push	eax		; char
mov	ecx, [ebp+var_4]
push	ecx		; float
mov	edx, [ebp+var_8]
push	edx		; int
mov	eax, [ebp+arg_4]
sub	eax, 8
sub	eax, [ebp+arg_0]
sar	eax, 3
push	eax		; int
push	0		; int
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_480A80
add	esp, 18h
mov	esp, ebp
pop	ebp
retn
sub_480B60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480BC0(int, int, int,	int, float, char)
sub_480BC0 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_480BD7:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_480C42
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+ecx*8+4]
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+eax*8-4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_480C01
mov	[ebp+var_9], 1
jmp	short loc_480C05

loc_480C01:
mov	[ebp+var_9], 0

loc_480C05:
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_480C16
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_480C16:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8]
mov	ecx, [edx+ecx*8+4]
mov	edx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+edx*8], eax
mov	[esi+edx*8+4], ecx
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_480BD7

loc_480C42:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_480C6E
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8-8]
mov	ecx, [edx+ecx*8-4]
mov	edx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+edx*8], eax
mov	[esi+edx*8+4], ecx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_480C6E:
movzx	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_10]
push	edx		; float
mov	eax, [ebp+arg_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; int
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_480F30
add	esp, 18h
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_480BC0 endp

align 10h


; Attributes: bp-based frame

sub_480CA0 proc	near

var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	al, [ebp+arg_8]
mov	[ebp+var_A], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx-8]
mov	eax, [ecx-4]
mov	[ebp+var_8], edx
mov	[ebp+var_4], eax
mov	cl, [ebp+var_A]
mov	[ebp+var_9], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+arg_4]
mov	[edx-8], eax
mov	[edx-4], ecx
movzx	eax, [ebp+var_9]
push	eax		; char
mov	ecx, [ebp+var_4]
push	ecx		; float
mov	edx, [ebp+var_8]
push	edx		; int
mov	eax, [ebp+arg_4]
sub	eax, 8
sub	eax, [ebp+arg_0]
sar	eax, 3
push	eax		; int
push	0		; int
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_480BC0
add	esp, 18h
mov	esp, ebp
pop	ebp
retn
sub_480CA0 endp

align 10h


; Attributes: bp-based frame

sub_480D00 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_480D17:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_480D83
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	ecx, [edx+ecx*4-4]
fld	dword ptr [ecx+1Ch]
fld	dword ptr [eax+1Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_480D47
mov	[ebp+var_10], 1
jmp	short loc_480D4E

loc_480D47:
mov	[ebp+var_10], 0

loc_480D4E:
movzx	edx, byte ptr [ebp+var_10]
test	edx, edx
jz	short loc_480D5F
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_480D5F:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	eax, [esi+eax*4]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_8]
lea	eax, [edx+edx+2]
mov	[ebp+var_8], eax
jmp	short loc_480D17

loc_480D83:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_480DA7
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	ecx, [esi+ecx*4-4]
mov	[eax+edx*4], ecx
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_480DA7:
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_480FC0
add	esp, 14h
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_480D00 endp

align 10h


; Attributes: bp-based frame

sub_480DD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax-4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx-4], ecx
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 4
sub	ecx, [ebp+arg_0]
sar	ecx, 2
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_480D00
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_480DD0 endp



; Attributes: bp-based frame

sub_480E10 proc	near

var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[edx+4], ecx
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_481050
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_480E10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480EA0(int, int, int,	int, float)
sub_480EA0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_480EB5:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_480F12
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+ecx*8+4]
fld	[ebp+arg_10]
fcomip	st, st(1)
fstp	st
jbe	short loc_480ED6
mov	[ebp+var_5], 1
jmp	short loc_480EDA

loc_480ED6:
mov	[ebp+var_5], 0

loc_480EDA:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_480F12
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8]
mov	ecx, [edx+ecx*8+4]
mov	edx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+edx*8], eax
mov	[esi+edx*8+4], ecx
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_480EB5

loc_480F12:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+ecx*8], eax
mov	eax, [ebp+arg_10]
mov	[edx+ecx*8+4], eax
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_480EA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_480F30(int, int, int,	int, float)
sub_480F30 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_480F45:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_480FA2
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	[ebp+arg_10]
fld	dword ptr [edx+ecx*8+4]
fcomip	st, st(1)
fstp	st
jbe	short loc_480F66
mov	[ebp+var_5], 1
jmp	short loc_480F6A

loc_480F66:
mov	[ebp+var_5], 0

loc_480F6A:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_480FA2
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8]
mov	ecx, [edx+ecx*8+4]
mov	edx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+edx*8], eax
mov	[esi+edx*8+4], ecx
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_480F45

loc_480FA2:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+ecx*8], eax
mov	eax, [ebp+arg_10]
mov	[edx+ecx*8+4], eax
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_480F30 endp

align 10h


; Attributes: bp-based frame

sub_480FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_480FD5:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_481037
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
fld	dword ptr [eax+1Ch]
mov	ecx, [ebp+arg_C]
fld	dword ptr [ecx+1Ch]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_481000
mov	[ebp+var_8], 1
jmp	short loc_481007

loc_481000:
mov	[ebp+var_8], 0

loc_481007:
movzx	edx, byte ptr [ebp+var_8]
test	edx, edx
jz	short loc_481037
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	esi, [ebp+arg_0]
mov	edx, [esi+edx*4]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_480FD5

loc_481037:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+ecx*4], eax
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_480FC0 endp

align 10h


; Attributes: bp-based frame

sub_481050 proc	near

var_60=	dword ptr -60h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_60]
call	sub_4810A0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_481050 endp

align 10h


; Attributes: bp-based frame

sub_4810A0 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
jmp	short loc_4810B3

loc_4810AB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_4810B3:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_481104
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
push	edx
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_44]
call	sub_469620
jmp	short loc_4810AB

loc_481104:
mov	esp, ebp
pop	ebp
retn	10h
sub_4810A0 endp

align 10h



sub_481110 proc	near
sub	ecx, 2Ch
jmp	sub_45CD10
sub_481110 endp

align 10h


; Attributes: bp-based frame

sub_481120 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156BA88
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_481146
push	4
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_481146:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_481120 endp

align 10h


; Attributes: bp-based frame

sub_481150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1090390
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_481175
push	74h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_481175:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_481150 endp

align 10h


; Attributes: bp-based frame

sub_481180 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_20]
add	ecx, 30h
call	sub_401EF0
mov	eax, [ebp+var_20]
add	eax, 3Ch
mov	[ebp+var_1C], eax
xor	ecx, ecx
mov	[ebp+var_C], ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_481180 endp

align 10h


; Attributes: bp-based frame

sub_4811F0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_48123D
mov	edx, 1
imul	edx, 24h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48123D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4811F0 endp

align 10h


; Attributes: bp-based frame

sub_481260 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_6C], ecx
mov	[ebp+var_44], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5DE010
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jnz	short loc_4812F0
or	[ebp+var_44], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_6C]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_4812F0
mov	[ebp+var_74], 0
jmp	short loc_4812F7

loc_4812F0:
mov	[ebp+var_74], 1

loc_4812F7:
mov	cl, byte ptr [ebp+var_74]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_44]
and	edx, 1
jz	short loc_481309
and	[ebp+var_44], 0FFFFFFFEh

loc_481309:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_48138D
mov	[ebp+var_38], 0
lea	ecx, [ebp+var_34]
call	sub_401EF0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_24]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	edx, [ebp+var_38]
mov	[ecx], edx
lea	eax, [ebp+var_34]
mov	ecx, [ebp+var_58]
add	ecx, 4
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
lea	ecx, [ebp+var_68]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
push	ecx
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_4813A0
lea	ecx, [ebp+var_40]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_48138D:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_481260 endp

align 10h


; Attributes: bp-based frame

sub_4813A0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_48157D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_481409
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4819B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_481863

loc_481409:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_481455
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	loc_481863
jmp	loc_481578

loc_481455:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_48148A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_481863

loc_48148A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4814D4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	loc_481863

loc_4814D4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_48154D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_481526
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	loc_481863
jmp	short loc_48154B

loc_481526:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	loc_481863

loc_48154B:
jmp	short loc_481578

loc_48154D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4819B0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_481863

loc_481578:
jmp	loc_481863

loc_48157D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_481611
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4815E1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	loc_481863
jmp	short loc_48160C

loc_4815E1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4819B0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_481863

loc_48160C:
jmp	loc_481863

loc_481611:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_481681
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_481681
mov	[ebp+var_A4], 1
jmp	short loc_48168B

loc_481681:
mov	[ebp+var_A4], 0

loc_48168B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4816A0
and	[ebp+var_4C], 0FFFFFFFEh

loc_4816A0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_481702
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4816D8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	loc_481863
jmp	short loc_4816FD

loc_4816D8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	loc_481863

loc_4816FD:
jmp	loc_481863

loc_481702:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_481752
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_481752:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4817A1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4817A1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_481795
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_4817A1

loc_481795:
mov	[ebp+var_A8], 1
jmp	short loc_4817AB

loc_4817A1:
mov	[ebp+var_A8], 0

loc_4817AB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4817C0
and	[ebp+var_4C], 0FFFFFFFDh

loc_4817C0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_481819
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4817F5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	short loc_481863
jmp	short loc_481817

loc_4817F5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_481870
mov	eax, [ebp+arg_0]
jmp	short loc_481863

loc_481817:
jmp	short loc_481863

loc_481819:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_481837
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_481863
jmp	short loc_481863

loc_481837:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4819B0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_481863:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4813A0 endp

align 10h


; Attributes: bp-based frame

sub_481870 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4818B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_481B40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_481969

loc_4818B7:
cmp	[ebp+arg_10], 0
jnz	short loc_4818EE
cmp	[ebp+arg_C], 0
jnz	short loc_4818E5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4818EE

loc_4818E5:
mov	[ebp+var_34], 1
jmp	short loc_4818F5

loc_4818EE:
mov	[ebp+var_34], 0

loc_4818F5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_481907
and	[ebp+var_C], 0FFFFFFFEh

loc_481907:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_48193D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_481B40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_48193B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_48193B:
jmp	short loc_481969

loc_48193D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_481B40
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_481969
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_481969:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_481870 endp

align 10h


; Attributes: bp-based frame

sub_4819B0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_4819CC:
cmp	[ebp+var_10], 0
jz	short loc_481A16
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_481A05
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_481A0E

loc_481A05:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_481A0E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_4819CC

loc_481A16:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_481AB8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_481AA9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_481870
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_481B31
jmp	short loc_481AB8

loc_481AA9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_481AB8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_481B16
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_481870
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_481B31

loc_481B16:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_481B31:
mov	esp, ebp
pop	ebp
retn	8
sub_4819B0 endp

align 10h


; Attributes: bp-based frame

sub_481B40 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_503180
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_481B90
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_481B40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_481B90(void *, int)
sub_481B90 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_481C0D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_10]
add	ecx, 4
mov	edx, [ebp+var_C]
add	edx, 4
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
jmp	short loc_481C14

loc_481C0D:
mov	[ebp+var_14], 0

loc_481C14:
mov	esp, ebp
pop	ebp
retn
sub_481B90 endp

align 10h


; Attributes: bp-based frame

sub_481C20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
cmp	[ebp+arg_0], 0
jl	short loc_481C64
cmp	[ebp+arg_0], 100h
jge	short loc_481C64
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
cmp	[ebp+arg_4], 0
jb	short loc_481C58
cmp	[ebp+arg_4], 100h
jnb	short loc_481C58
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
jmp	short loc_481C62

loc_481C58:
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0

loc_481C62:
jmp	short loc_481C77

loc_481C64:
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0

loc_481C77:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_481C20 endp



; Attributes: bp-based frame

sub_481C80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, [ebp+arg_0]
movss	dword ptr [eax+8], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_481C80 endp

align 10h


; Attributes: bp-based frame

sub_481CA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, [ebp+arg_0]
movss	dword ptr [eax+0Ch], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_481CA0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_481CC0(float, float, float)
sub_481CC0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
push	ecx		; float
fld	[ebp+arg_8]
fstp	[esp+14h+var_14]
push	ecx		; float
fld	[ebp+arg_4]
fstp	[esp+18h+var_18]
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+1Ch+var_1C]
lea	ecx, [ebp+var_C]
call	sub_40F570
mov	ecx, [ebp+var_10]
add	ecx, 50h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_481CC0 endp

align 10h


; Attributes: bp-based frame

sub_481D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax]
mov	ecx, [ebp+var_4]
fmul	dword ptr [ecx]
mov	edx, [ebp+var_4]
fld	dword ptr [edx+4]
mov	eax, [ebp+var_4]
fmul	dword ptr [eax+4]
faddp	st(1), st
fstp	[ebp+var_8]
fld	[ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_481D10 endp

align 10h


; Attributes: bp-based frame

sub_481D40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_10], ecx
push	4
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jz	short loc_481DA1
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_481D89
push	1
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_14], eax
jmp	short loc_481D90

loc_481D89:
mov	[ebp+var_14], 0

loc_481D90:
lea	ecx, [ebp+arg_0]
push	ecx
push	4
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_40FBD0

loc_481DA1:
mov	edx, [ebp+arg_0]
push	edx
mov	esi, [ebp+var_10]
call	sub_1163900
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_481D40 endp

align 10h


; Attributes: bp-based frame

sub_481DC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
mov	[ebp+var_14], ecx
push	5
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jz	short loc_481E27
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_481E09
push	1
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_18], eax
jmp	short loc_481E10

loc_481E09:
mov	[ebp+var_18], 0

loc_481E10:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
push	5
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_40FBD0

loc_481E27:
mov	eax, [ebp+arg_0]
push	eax
mov	esi, [ebp+var_14]
call	sub_1163900
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_481DC0 endp

align 10h


; Attributes: bp-based frame

sub_481E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_8]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
mov	esp, ebp
pop	ebp
retn
sub_481E40 endp

align 10h


; Attributes: bp-based frame

sub_481E90 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jnz	short loc_481EEA
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
sub	ecx, 8
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_8192D0
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	[ebp+var_1C], ecx
mov	edx, 1
shl	edx, 3
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
sub	ecx, edx
mov	edx, [ebp+var_1C]
mov	[edx], ecx

loc_481EEA:
xor	eax, eax
mov	esp, ebp
pop	ebp
retn
sub_481E90 endp



; Attributes: bp-based frame

sub_481EF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_432A50
add	esp, 8
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
sub	eax, 8
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_8192F0
add	esp, 10h
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	ecx, [ebp+var_C]
mov	[eax-8], ecx
mov	edx, [ebp+var_8]
mov	[eax-4], edx
mov	esp, ebp
pop	ebp
retn
sub_481EF0 endp

align 10h


; Attributes: bp-based frame

sub_481F50 proc	near

var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_432A50
add	esp, 8
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
sub	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
sub	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_819790
add	esp, 10h
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	[ebp+var_20], ecx
mov	edx, 2
shl	edx, 3
mov	eax, [ebp+var_20]
mov	ecx, [eax]
sub	ecx, edx
mov	edx, [ebp+var_20]
mov	[edx], ecx
mov	esp, ebp
pop	ebp
retn
sub_481F50 endp

align 10h


; Attributes: bp-based frame

sub_481FC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2710h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156E55C
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_482003
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_482003:
mov	edx, [ebp+var_C]
mov	dword ptr [edx+8], 0FFFFFFFFh
mov	eax, [ebp+var_C]
add	eax, 0Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_48204B
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_482030
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA90

loc_482030:
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_48204B
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA80

loc_48204B:
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+10h], 1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_481FC0 endp

align 10h


; Attributes: bp-based frame

sub_482060 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	14h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482086
mov	ecx, [ebp+var_4]
call	sub_481FC0
mov	[ebp+var_10], eax
jmp	short loc_48208D

loc_482086:
mov	[ebp+var_10], 0

loc_48208D:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_482060 endp

align 10h


; Attributes: bp-based frame

sub_4820A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_4820C4
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_4820C4:
mov	ecx, [ebp+var_8]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4820E2
push	14h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_4820E2:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4820A0 endp

align 10h


; Attributes: bp-based frame

sub_4820F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482131
mov	ecx, 2711h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_482138

loc_482131:
mov	[ebp+var_8], 0

loc_482138:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4820F0 endp

align 10h


; Attributes: bp-based frame

sub_482140 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, 2713h
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1581810
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
mov	eax, [ebp+var_10]
add	eax, 1Ch
call	sub_412C60
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+8], 1
mov	edx, [ebp+var_10]
movss	xmm0, ds:dword_15FCD68
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_10]
movss	xmm0, ds:dword_15FD1D8
movss	dword ptr [eax+10h], xmm0
push	ecx		; float
fld	ds:flt_15FD1D4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1D0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCF1C
fstp	[esp+1Ch+var_1C]
lea	eax, [ebp+var_C]
call	sub_412C60
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_482140 endp

align 10h


; Attributes: bp-based frame

sub_4821F0 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
push	28h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482216
mov	ecx, [ebp+var_4]
call	sub_482140
mov	[ebp+var_14], eax
jmp	short loc_48221D

loc_482216:
mov	[ebp+var_14], 0

loc_48221D:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4821F0 endp

align 10h


; Attributes: bp-based frame

sub_482230 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 8
call	sub_555450
mov	ecx, [ebp+var_58]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482262
push	14h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_482262:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_482230 endp

align 10h


; Attributes: bp-based frame

sub_482270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	18h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4822BF
mov	ecx, 2728h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+10h], 0
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
jmp	short loc_4822C6

loc_4822BF:
mov	[ebp+var_8], 0

loc_4822C6:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_482270 endp

align 10h


; Attributes: bp-based frame

sub_4822D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 272Eh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E564
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
add	edx, 10h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
mov	edx, dword_17EE12C
mov	[ecx], edx
mov	eax, dword_17EE130
mov	[ecx+4], eax
mov	edx, dword_17EE134
mov	[ecx+8], edx
mov	eax, dword_17EE138
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+2Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4822D0 endp

align 10h


; Attributes: bp-based frame

sub_482370 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482395
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_482395:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482370 endp

align 10h


; Attributes: bp-based frame

sub_4823A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4823E8
mov	ecx, 2734h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0Dh
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
jmp	short loc_4823EF

loc_4823E8:
mov	[ebp+var_8], 0

loc_4823EF:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4823A0 endp

align 10h


; Attributes: bp-based frame

sub_482400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 273Dh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15FD1CC
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15FD1C8
movss	dword ptr [ecx+14h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_482400 endp

align 10h


; Attributes: bp-based frame

sub_482460 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 2741h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156E568
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
call	sub_40A410
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_40A410
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
movss	xmm0, dword ptr	off_17E66B4
movss	dword ptr [edx+2Ch], xmm0
push	ecx
fld1
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
lea	ecx, [ebp+var_10]
call	sub_40A410
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
mov	edx, [ebp+var_14]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_14]
mov	byte ptr [edx+30h], 1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_482460 endp

align 10h


; Attributes: bp-based frame

sub_482550 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
push	34h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482576
mov	ecx, [ebp+var_4]
call	sub_482460
mov	[ebp+var_18], eax
jmp	short loc_48257D

loc_482576:
mov	[ebp+var_18], 0

loc_48257D:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_482550 endp

align 10h


; Attributes: bp-based frame

sub_482590 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4825B5
push	34h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4825B5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482590 endp

align 10h


; Attributes: bp-based frame

sub_4825C0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2742h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156E56C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 14h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
push	offset aNone	; "(none)"
mov	ecx, [ebp+var_C]
add	ecx, 14h
call	sub_402310
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+2Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4825C0 endp

align 10h


; Attributes: bp-based frame

sub_482650 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482676
mov	ecx, [ebp+var_4]
call	sub_4825C0
mov	[ebp+var_10], eax
jmp	short loc_48267D

loc_482676:
mov	[ebp+var_10], 0

loc_48267D:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_482650 endp

align 10h


; Attributes: bp-based frame

sub_482690 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4826C0
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4826C0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482690 endp

align 10h


; Attributes: bp-based frame

sub_4826D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 2743h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+14h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4826D0 endp

align 10h


; Attributes: bp-based frame

sub_482730 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	18h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482756
mov	ecx, [ebp+var_4]
call	sub_4826D0
mov	[ebp+var_8], eax
jmp	short loc_48275D

loc_482756:
mov	[ebp+var_8], 0

loc_48275D:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_482730 endp

align 10h


; Attributes: bp-based frame

sub_482770 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_482770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_48]
mov	dword ptr [ecx+4], 0
push	offset sub_482890
push	3
push	18h
mov	edx, [ebp+var_48]
add	edx, 8
push	edx
call	sub_4078B0
mov	eax, [ebp+var_48]
add	eax, 58h
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_D]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_489C40
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_E]
mov	ecx, [ebp+var_1C]
mov	[ecx+14h], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_48]
add	edx, 70h
mov	[ebp+var_44], edx
xor	eax, eax
mov	[ebp+var_2C], eax
mov	[ebp+var_28], eax
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_28]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_3C]
mov	[edx+4], ecx
mov	eax, [ebp+var_38]
mov	[edx+8], eax
mov	ecx, [ebp+var_34]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_44]
call	sub_5E11A0
mov	edx, [ebp+var_44]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_10]
mov	ecx, [ebp+var_44]
mov	[ecx+14h], al
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_48]
mov	byte ptr [edx+88h], 0
mov	eax, [ebp+var_48]
mov	dword ptr [eax+50h], 0FFFFFFFFh
mov	ecx, [ebp+var_48]
mov	dword ptr [ecx+54h], 0
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_482770 endp

align 10h


; Attributes: bp-based frame

sub_482890 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_482890 endp

align 10h


; Attributes: bp-based frame

sub_4828C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4828C0 endp



; Attributes: bp-based frame

sub_482900 proc	near

var_24=	dword ptr -24h
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_24]
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 30h
call	sub_4022A0
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 48h
call	sub_4022A0
lea	ecx, [ebp+var_4]
call	nullsub_1
lea	ecx, [ebp+var_5]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 60h
call	sub_4022A0
lea	ecx, [ebp+var_5]
call	nullsub_1
lea	ecx, [ebp+var_6]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 78h
call	sub_4022A0
lea	ecx, [ebp+var_6]
call	nullsub_1
mov	eax, [ebp+var_24]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+90h], xmm0
mov	ecx, [ebp+var_24]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+94h], xmm0
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn
sub_482900 endp

align 10h


; Attributes: bp-based frame

sub_4829E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	ecx, 1B5Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E594
mov	esi, [ebp+var_4]
add	esi, 20h
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
add	eax, 20h
push	eax
xor	eax, eax
call	sub_420330
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+24h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+28h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+2Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+30h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+38h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+34h], 0
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4829E0 endp

align 10h


; Attributes: bp-based frame

sub_482A80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 20h
call	sub_40ABB0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482AB0
push	3Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_482AB0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482A80 endp

align 10h


; Attributes: bp-based frame

sub_482AC0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1B5Ch
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156E580
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
push	offset aInvalid	; "(invalid)"
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402310
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+20h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_482AC0 endp

align 10h


; Attributes: bp-based frame

sub_482B20 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	24h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482B46
mov	ecx, [ebp+var_4]
call	sub_482AC0
mov	[ebp+var_10], eax
jmp	short loc_482B4D

loc_482B46:
mov	[ebp+var_10], 0

loc_482B4D:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_482B20 endp

align 10h


; Attributes: bp-based frame

sub_482B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482B90
push	24h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_482B90:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482B60 endp

align 10h


; Attributes: bp-based frame

sub_482BA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1B89h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, dword_188DC64
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, dword_188DC68
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_482BA0 endp

align 10h


; Attributes: bp-based frame

sub_482C10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482C35
push	10h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_482C35:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482C10 endp

align 10h


; Attributes: bp-based frame

sub_482C40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1BFCh
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156E598
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_14]
add	ecx, 34h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 3Ch
call	sub_401EF0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0Ch
push	offset szReferrer
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
call	sub_402400
mov	edx, [ebp+var_14]
add	edx, 34h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, dword_188DC64
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, dword_188DC68
mov	[edx+4], eax
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_482C40 endp

align 10h


; Attributes: bp-based frame

sub_482CF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482D20
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_482D20:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482CF0 endp

align 10h


; Attributes: bp-based frame

sub_482D30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1C0Ch
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, dword_188DC64
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, dword_188DC68
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_482D30 endp

align 10h


; Attributes: bp-based frame

sub_482DA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_5021C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482DD0
push	20h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_482DD0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482DA0 endp

align 10h


; Attributes: bp-based frame

sub_482DE0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, 1C12h
mov	eax, [ebp+var_30]
call	sub_401100
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_156E5A0
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_30]
add	ecx, 14h
mov	[ebp+var_2C], ecx
xor	edx, edx
mov	[ebp+var_14], edx
mov	[ebp+var_10], edx
mov	[ebp+var_C], edx
mov	[ebp+var_8], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_28]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_20]
mov	[ecx+8], edx
mov	eax, [ebp+var_1C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_2C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax+8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_2C]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_2]
mov	eax, [ebp+var_2C]
mov	[eax+14h], dl
mov	ecx, [ebp+var_30]
add	ecx, 8
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn
sub_482DE0 endp

align 10h


; Attributes: bp-based frame

sub_482EB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_5021C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_482EE0
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_482EE0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482EB0 endp

align 10h


; Attributes: bp-based frame

sub_482EF0 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1C24h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156E5A4
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 58h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
push	offset szReferrer
mov	ecx, [ebp+var_14]
add	ecx, 58h
call	sub_402400
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_4023E0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_482EF0 endp

align 10h


; Attributes: bp-based frame

sub_482FA0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_482FC9
mov	ecx, [ebp+var_4]
call	sub_482EF0
mov	[ebp+var_18], eax
jmp	short loc_482FD0

loc_482FC9:
mov	[ebp+var_18], 0

loc_482FD0:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_482FA0 endp

align 10h


; Attributes: bp-based frame

sub_482FE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_483020
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483008
push	80h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_483008:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_482FE0 endp

align 10h


; Attributes: bp-based frame

sub_483020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_483020 endp

align 10h


; Attributes: bp-based frame

sub_483060 proc	near

var_28=	dword ptr -28h
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, 1C25h
mov	eax, [ebp+var_28]
call	sub_401100
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_156E5A8
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 58h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 80h
call	sub_402390
lea	ecx, [ebp+var_4]
call	nullsub_1
lea	ecx, [ebp+var_5]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 0A8h
call	sub_402390
lea	ecx, [ebp+var_5]
call	nullsub_1
lea	ecx, [ebp+var_6]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 0D0h
call	sub_402390
lea	ecx, [ebp+var_6]
call	nullsub_1
lea	ecx, [ebp+var_7]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 0F8h
call	sub_402390
lea	ecx, [ebp+var_7]
call	nullsub_1
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+120h], 0
mov	edx, [ebp+var_28]
mov	dword ptr [edx+124h], 0
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn
sub_483060 endp



; Attributes: bp-based frame

sub_483170 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	128h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_483199
mov	ecx, [ebp+var_4]
call	sub_483060
mov	[ebp+var_2C], eax
jmp	short loc_4831A0

loc_483199:
mov	[ebp+var_2C], 0

loc_4831A0:
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_483170 endp

align 10h


; Attributes: bp-based frame

sub_4831B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4831F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4831D8
push	128h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4831D8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4831B0 endp

align 10h


; Attributes: bp-based frame

sub_4831F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0F8h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0D0h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0A8h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 80h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4831F0 endp

align 10h


; Attributes: bp-based frame

sub_483260 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_487260
mov	ecx, [ebp+var_18]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483292
push	24h
mov	ecx, [ebp+var_18]
push	ecx
call	sub_1111040
add	esp, 8

loc_483292:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_483260 endp

align 10h


; Attributes: bp-based frame

sub_4832A0 proc	near

var_18=	dword ptr -18h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_487260
mov	ecx, [ebp+var_18]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4832A0 endp



; Attributes: bp-based frame

sub_4832C0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, 1B6Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_156E5B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4832C0 endp

align 10h


; Attributes: bp-based frame

sub_483320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_48335B
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_48335B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_483320 endp

align 10h


; Attributes: bp-based frame

sub_483370 proc	near

var_10=	dword ptr -10h
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, 1B6Ch
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_156E5B4
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	eax, [ebp+var_3]
call	nullsub_1
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 58h
call	sub_594460
call	nullsub_1
lea	eax, [ebp+var_4]
call	nullsub_1
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 60h
call	sub_594460
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_483370 endp



; Attributes: bp-based frame

sub_483400 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_483430
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483425
push	68h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_483425:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_483400 endp

align 10h


; Attributes: bp-based frame

sub_483430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_42E0F0
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_42E0F0
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_483430 endp

align 10h


; Attributes: bp-based frame

sub_483470 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_3= byte ptr	-3
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, 1BF2h
mov	eax, [ebp+var_18]
call	sub_401100
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_156E5B8
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
push	ecx		; float
fldz
fstp	[esp+24h+var_24]
mov	eax, [ebp+var_18]
add	eax, 8
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
push	ecx		; float
fldz
fstp	[esp+24h+var_24]
mov	eax, [ebp+var_18]
add	eax, 14h
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
push	ecx		; float
fldz
fstp	[esp+24h+var_24]
mov	eax, [ebp+var_18]
add	eax, 20h
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
push	ecx		; float
fldz
fstp	[esp+24h+var_24]
mov	eax, [ebp+var_18]
add	eax, 2Ch
call	sub_412C60
mov	ecx, [ebp+var_18]
add	ecx, 38h
call	sub_401EF0
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
push	ecx		; float
fldz
fstp	[esp+24h+var_24]
mov	eax, [ebp+var_18]
add	eax, 48h
call	sub_412C60
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 54h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_18]
add	ecx, 7Ch
call	sub_45BE90
mov	ecx, [ebp+var_18]
add	ecx, 9Ch
call	sub_45BE90
mov	ecx, [ebp+var_18]
add	ecx, 0BCh
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 0C8h
call	sub_4022A0
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_483470 endp

align 10h


; Attributes: bp-based frame

sub_4835C0 proc	near

var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
call	sub_483600
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4835EA
push	0E4h
mov	ecx, [ebp+var_34]
push	ecx
call	sub_1111040
add	esp, 8

loc_4835EA:
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_4835C0 endp

align 10h


; Attributes: bp-based frame

sub_483600 proc	near

var_34=	dword ptr -34h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
add	ecx, 0C8h
call	sub_407910
mov	ecx, [ebp+var_34]
add	ecx, 0BCh
call	sub_487140
mov	ecx, [ebp+var_34]
add	ecx, 9Ch
call	sub_429300
mov	ecx, [ebp+var_34]
add	ecx, 7Ch
call	sub_429300
mov	ecx, [ebp+var_34]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_34]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_483600 endp

align 10h


; Attributes: bp-based frame

sub_483660 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1C2Bh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, dword_188DC64
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, dword_188DC68
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_483660 endp

align 10h


; Attributes: bp-based frame

sub_4836D0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4836F6
mov	ecx, [ebp+var_4]
call	sub_483660
mov	[ebp+var_10], eax
jmp	short loc_4836FD

loc_4836F6:
mov	[ebp+var_10], 0

loc_4836FD:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4836D0 endp

align 10h


; Attributes: bp-based frame

sub_483710 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, 1C05h
mov	eax, [ebp+var_18]
call	sub_401100
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_156E57C
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
add	ecx, 18h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
add	eax, 8
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, dword_188DC64
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, dword_188DC68
mov	[eax+4], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+24h], 0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_483710 endp

align 10h


; Attributes: bp-based frame

sub_4837C0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 18h
call	sub_487140
mov	ecx, [ebp+var_58]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4837F2
push	28h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_4837F2:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_4837C0 endp

align 10h


; Attributes: bp-based frame

sub_483800 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	ecx, 1C06h
mov	eax, [ebp+var_4C]
call	sub_401100
mov	eax, [ebp+var_4C]
mov	dword ptr [eax], offset	off_156E574
mov	ecx, [ebp+var_4C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_4C]
add	ecx, 14h
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_1]
push	edx
mov	ecx, [ebp+var_C]
call	sub_594460
mov	eax, [ebp+var_4C]
add	eax, 1Ch
mov	[ebp+var_1C], eax
xor	ecx, ecx
mov	[ebp+var_14], ecx
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_15]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_4899B0
mov	ecx, [ebp+var_1C]
call	sub_471130
mov	edx, [ebp+var_4C]
add	edx, 24h
mov	[ebp+var_2C], edx
xor	eax, eax
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_24]
push	edx
lea	eax, [ebp+var_25]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4899B0
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	eax, [ebp+var_4C]
add	eax, 2Ch
mov	[ebp+var_44], eax
xor	ecx, ecx
mov	[ebp+var_34], ecx
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_40]
mov	[ecx], edx
mov	eax, [ebp+var_3C]
mov	[ecx+4], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_44]
mov	[ecx], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[eax+4], edx
mov	eax, [ebp+var_4C]
add	eax, 8
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	edx, dword_188DC64
mov	[ecx], edx
mov	eax, [ebp+var_48]
mov	ecx, dword_188DC68
mov	[eax+4], ecx
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_4C]
mov	esp, ebp
pop	ebp
retn
sub_483800 endp

align 10h


; Attributes: bp-based frame

sub_483930 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_483960
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483955
push	34h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_483955:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_483930 endp

align 10h


; Attributes: bp-based frame

sub_483960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_5D2630
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_5D2630
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_5D2630
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_5D2630
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_483960 endp

align 10h


; Attributes: bp-based frame

sub_4839A0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	ecx, 1C2Fh
mov	eax, [ebp+var_3C]
call	sub_401100
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], offset	off_156E578
mov	ecx, [ebp+var_3C]
add	ecx, 8
mov	[ebp+var_8], ecx
xor	edx, edx
mov	eax, [ebp+var_8]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_8]
mov	[edx+2], cx
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_3C]
add	ecx, 10h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_3C]
add	ecx, 18h
mov	[ebp+var_14], ecx
xor	edx, edx
mov	[ebp+var_E], dl
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+var_14]
call	sub_489C40
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_3C]
add	ecx, 30h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_3C]
add	ecx, 48h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	edx, [ebp+var_3C]
add	edx, 6Ch
mov	[ebp+var_34], edx
xor	eax, eax
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_30]
mov	[eax], ecx
mov	edx, [ebp+var_2C]
mov	[eax+4], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_3C]
add	edx, 10h
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
mov	ecx, dword_188DC64
mov	[eax], ecx
mov	edx, [ebp+var_38]
mov	eax, dword_188DC68
mov	[edx+4], eax
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx+60h], 1
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+64h], 0
mov	eax, [ebp+var_3C]
mov	dword ptr [eax+68h], 0
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx+74h], 0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+78h], 0
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn
sub_4839A0 endp

align 10h


; Attributes: bp-based frame

sub_483AF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_483B20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483B15
push	7Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_483B15:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_483AF0 endp

align 10h


; Attributes: bp-based frame

sub_483B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 6Ch
call	sub_5D2630
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_5935F0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_483B20 endp

align 10h


; Attributes: bp-based frame

sub_483B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_488DA0
mov	esp, ebp
pop	ebp
retn
sub_483B60 endp

align 10h


; Attributes: bp-based frame

sub_483B80 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1C32h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_4], ecx
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_C], ecx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	edx, [ebp+var_C]
mov	[edx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	ecx, [ebp+var_C]
mov	[ecx+2], ax
xor	edx, edx
and	edx, 0FFFFh
xor	eax, eax
and	eax, 0
mov	ecx, [ebp+var_C]
mov	[ecx], dx
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, dword_188DC64
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, dword_188DC68
mov	[edx+4], eax
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_483B80 endp

align 10h


; Attributes: bp-based frame

sub_483C50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483C75
push	18h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_483C75:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_483C50 endp

align 10h


; Attributes: bp-based frame

sub_483C80 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1C39h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156E5BC
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+30h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_483C80 endp

align 10h


; Attributes: bp-based frame

sub_483CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483D00
push	34h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_483D00:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_483CD0 endp

align 10h


; Attributes: bp-based frame

sub_483D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_483D10 endp

align 10h


; Attributes: bp-based frame

sub_483D30 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1C20h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C0198
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_483D30 endp

align 10h


; Attributes: bp-based frame

sub_483D80 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1C6Ch
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156E5C8
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
add	ecx, 20h
call	sub_401EF0
push	offset byte_146D660
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402310
mov	ecx, [ebp+var_C]
add	ecx, 20h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_483D80 endp

align 10h


; Attributes: bp-based frame

sub_483E00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_483E30
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_483E30:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_483E00 endp

align 10h


; Attributes: bp-based frame

sub_483E40 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1C6Dh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
push	offset byte_146D660
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402310
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_483E40 endp

align 10h


; Attributes: bp-based frame

sub_483EA0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	[ebp+var_10], ecx
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_10]
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_10]
add	eax, 0Ch
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_10]
add	eax, 18h
call	sub_412C60
mov	ecx, [ebp+var_10]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_401EF0
mov	eax, [ebp+var_10]
add	eax, 3Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_483F38
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA80

loc_483F38:		; float
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_10]
add	eax, 40h
call	sub_412C60
mov	esi, [ebp+var_10]
add	esi, 4Ch
xor	eax, eax
call	sub_41DF90
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 50h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
push	ecx		; float
fldz
fstp	[esp+20h+var_20]
mov	eax, [ebp+var_10]
add	eax, 6Ch
call	sub_412C60
mov	ecx, [ebp+var_10]
add	ecx, 78h
call	sub_45BE90
mov	ecx, [ebp+var_10]
add	ecx, 98h
call	sub_45BE90
mov	eax, [ebp+var_10]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_483EA0 endp

align 10h


; Attributes: bp-based frame

sub_483FC0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_483FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
mov	ecx, 2AFCh
mov	eax, [ebp+var_34]
call	sub_401100
mov	eax, [ebp+var_34]
mov	dword ptr [eax], offset	off_156E5CC
mov	ecx, [ebp+var_34]
add	ecx, 8
mov	[ebp+var_14], ecx
xor	edx, edx
mov	eax, [ebp+var_14]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_14]
mov	[edx+2], cx
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	dword ptr [eax+4], 0
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	ecx, [ebp+var_34]
add	ecx, 30h
mov	[ebp+var_24], ecx
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_24]
call	sub_489C40
mov	eax, [ebp+var_24]
mov	dword ptr [eax+10h], 0
mov	cl, [ebp+var_1E]
mov	edx, [ebp+var_24]
mov	[edx+14h], cl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_E]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 48h
call	sub_4022A0
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	eax, [ebp+var_34]
add	eax, 8
mov	[ebp+var_2C], eax
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_2C]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_2C]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_2C]
mov	[edx], ax
mov	eax, [ebp+var_34]
add	eax, 10h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	edx, dword_188DC64
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	ecx, dword_188DC68
mov	[eax+4], ecx
mov	edx, [ebp+var_34]
mov	byte ptr [edx+60h], 0
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_483FC0 endp



; Attributes: bp-based frame

sub_484120 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_484150
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_484147
push	64h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_484147:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_484120 endp



; Attributes: bp-based frame

sub_484150 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
add	ecx, 48h
call	sub_407910
mov	eax, [ebp+var_14]
add	eax, 30h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_488FC0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_484150 endp

align 10h


; Attributes: bp-based frame

sub_4841C0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	0A8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4841E9
mov	ecx, [ebp+var_4]
call	sub_433C70
mov	[ebp+var_10], eax
jmp	short loc_4841F0

loc_4841E9:
mov	[ebp+var_10], 0

loc_4841F0:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4841C0 endp

align 10h


; Attributes: bp-based frame

sub_484200 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, 2B05h
mov	eax, [ebp+var_18]
call	sub_401100
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_156E5D0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 20h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_18]
add	ecx, 40h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
cmp	dword ptr [eax], 0
jz	short loc_484286
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_484286:
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+38h], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+3Ch], 0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_484200 endp

align 10h


; Attributes: bp-based frame

sub_4842A0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4842D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4842C7
push	44h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4842C7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4842A0 endp



; Attributes: bp-based frame

sub_4842D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 40h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_484310
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_484310
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax+4]
call	edx

loc_484310:
mov	ecx, [ebp+var_C]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_C]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4842D0 endp

align 10h


; Attributes: bp-based frame

sub_484340 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0BC6h
mov	ecx, [ebp+var_C]
call	sub_42CCA0
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156E5D4
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+0Ch], xmm0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+38h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_484340 endp

align 10h


; Attributes: bp-based frame

sub_4843A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4843D0
push	3Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4843D0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4843A0 endp

align 10h


; Attributes: bp-based frame

sub_4843E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	esp, ebp
pop	ebp
retn
sub_4843E0 endp

align 10h


; Attributes: bp-based frame

sub_484400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	esp, ebp
pop	ebp
retn
sub_484400 endp

align 10h


; Attributes: bp-based frame

sub_484420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+20h]
mov	esp, ebp
pop	ebp
retn
sub_484420 endp

align 10h


; Attributes: bp-based frame

sub_484440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+0C8h]
mov	esp, ebp
pop	ebp
retn
sub_484440 endp

align 10h


; Attributes: bp-based frame

sub_484460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+0CCh]
mov	esp, ebp
pop	ebp
retn
sub_484460 endp

align 10h


; Attributes: bp-based frame

sub_484480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+0D0h]
mov	esp, ebp
pop	ebp
retn
sub_484480 endp

align 10h


; Attributes: bp-based frame

sub_4844A0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4844A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_34], eax
cmp	[ebp+var_38], 0
jz	short loc_4844E1
mov	[ebp+var_40], 0
jmp	short loc_484509

loc_4844E1:
mov	eax, [ebp+var_34]
cmp	dword ptr [eax], 4
jz	short loc_4844F1
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx], 3
jnz	short loc_4844FC

loc_4844F1:
mov	[ebp+var_3C], 1
jmp	short loc_484503
jmp	short loc_484503

loc_4844FC:
mov	[ebp+var_3C], 0

loc_484503:
mov	edx, [ebp+var_3C]
mov	[ebp+var_40], edx

loc_484509:
cmp	[ebp+var_40], 0
jz	short loc_48458B
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_81ABE0
add	esp, 0Ch
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_2D]
call	sub_401EF0
mov	[ebp+var_50], eax
mov	eax, [ebp+var_10]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_50]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_4079A0
mov	[ebp+var_4], 0
mov	edx, [ebp+var_2C]
add	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_2C]
push	eax
lea	ecx, [ebp+var_28]
call	sub_407CA0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_2D]
call	nullsub_1
lea	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_10EF0E0
add	esp, 8
lea	ecx, [ebp+var_28]
call	sub_407910
mov	eax, [ebp+arg_0]
jmp	short loc_4845A7
jmp	short loc_4845A7

loc_48458B:
lea	ecx, [ebp+var_2E]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
call	sub_402390
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	eax, [ebp+arg_0]

loc_4845A7:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4844A0 endp

align 10h


; Attributes: bp-based frame

sub_4845C0 proc	near

var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
call	sub_10F4AA0
add	esp, 8
lea	ecx, [ebp+var_18]
call	sub_4042A0
push	eax
lea	ecx, [ebp+var_18]
call	sub_5F52F0
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_81B9D0
add	esp, 0Ch
lea	ecx, [ebp+var_18]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_4845C0 endp



; Attributes: bp-based frame

sub_484600 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81AC40
add	esp, 8
pop	ebp
retn
sub_484600 endp

align 10h


; Attributes: bp-based frame

sub_484620 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, [ebp+arg_4]
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 3
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
mov	esp, ebp
pop	ebp
retn
sub_484620 endp

align 10h


; Attributes: bp-based frame

sub_484660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 98h
call	sub_429300
mov	ecx, [ebp+var_8]
add	ecx, 78h
call	sub_429300
mov	ecx, [ebp+var_8]
add	ecx, 50h
call	sub_407910
mov	ecx, [ebp+var_8]
add	ecx, 4Ch
call	sub_429100
mov	eax, [ebp+var_8]
add	eax, 3Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_4846B3
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_4846B3:
mov	esp, ebp
pop	ebp
retn
sub_484660 endp

align 10h


; Attributes: bp-based frame

sub_4846C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	edx, [ebp+var_14]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	eax, [ebp+var_14]
add	eax, 18h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 24h
mov	ecx, [ebp+var_14]
add	ecx, 24h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 30h
mov	edx, [ebp+var_14]
add	edx, 30h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 3Ch
mov	[ebp+var_8], edx
mov	eax, [ebp+var_14]
add	eax, 3Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_48479B
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_48477F
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_48477F:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_48479B
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_48479B:
mov	edx, [ebp+arg_0]
add	edx, 40h
mov	eax, [ebp+var_14]
add	eax, 40h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 4Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_484803
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_4847E7
mov	eax, [ebp+var_C]
mov	ecx, [eax]
call	sub_40AA90

loc_4847E7:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_484803
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_40AA80

loc_484803:
mov	eax, [ebp+arg_0]
add	eax, 50h
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 50h
call	sub_4022F0
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	al, [edx+68h]
mov	[ecx+68h], al
mov	ecx, [ebp+arg_0]
add	ecx, 6Ch
mov	edx, [ebp+var_14]
add	edx, 6Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 78h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 78h
call	sub_45D490
mov	eax, [ebp+arg_0]
add	eax, 98h
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 98h
call	sub_45D490
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4846C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_484870(int, int, int,	int, float, float)
sub_484870 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	eax, [ebp+arg_C]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jz	loc_484967
mov	edx, [ebp+arg_10]
fld	dword ptr [edx]
fadd	[ebp+arg_14]
mov	eax, [ebp+arg_10]
fstp	dword ptr [eax]
mov	ecx, [ebp+arg_10]
fld1
fld	dword ptr [ecx]
fcomip	st, st(1)
fstp	st
jb	short loc_4848CE
mov	edx, [ebp+arg_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_C]
mov	byte ptr [eax],	0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
jmp	loc_484963

loc_4848CE:
mov	edx, [ebp+arg_10]
push	ecx		; float
fld	dword ptr [edx]
fstp	[esp+58h+var_58]
lea	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
call	sub_4194E0
mov	[ebp+var_50], eax
mov	eax, [ebp+arg_10]
fld	dword ptr [eax]
fld1
fsubrp	st(1), st
fstp	[ebp+var_54]
fld	[ebp+var_54]
push	ecx		; float
fstp	[esp+58h+var_58]
lea	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
call	sub_4194E0
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_48], edx
mov	eax, [ecx+4]
mov	[ebp+var_44], eax
mov	ecx, [ecx+8]
mov	[ebp+var_40], ecx
fld	[ebp+var_48]
mov	edx, [ebp+var_50]
fadd	dword ptr [edx]
fstp	[ebp+var_48]
fld	[ebp+var_44]
mov	eax, [ebp+var_50]
fadd	dword ptr [eax+4]
fstp	[ebp+var_44]
fld	[ebp+var_40]
mov	ecx, [ebp+var_50]
fadd	dword ptr [ecx+8]
fstp	[ebp+var_40]
mov	edx, [ebp+var_48]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_44]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+var_20]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	[edx+8], eax

loc_484963:
mov	al, 1
jmp	short loc_484969

loc_484967:
xor	al, al

loc_484969:
mov	esp, ebp
pop	ebp
retn
sub_484870 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_484970(int, int, int,	float)
sub_484970 proc	near

var_34=	dword ptr -34h
var_24=	byte ptr -24h
var_18=	byte ptr -18h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	esi
fld1
fld	[ebp+arg_C]
fcomip	st, st(1)
fstp	st
jb	short loc_48499A
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
jmp	short loc_484A0C

loc_48499A:
fldz
fld	[ebp+arg_C]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4849C1
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
jmp	short loc_484A0C

loc_4849C1:		; float
push	ecx
fld	[ebp+arg_C]
fstp	[esp+34h+var_34]
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_C]
call	sub_40F4A0
mov	ecx, eax
lea	eax, [ebp+var_18]
call	sub_40F920
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, eax
lea	eax, [ebp+var_24]
call	sub_40F7F0
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	esi, [ebp+arg_8]
call	sub_40F420
fstp	st

loc_484A0C:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_484970 endp

db 4Fh dup(0CCh)


; Attributes: bp-based frame

sub_484A60 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
push	offset sub_486110
push	0FFh
push	0Ch
mov	eax, [ebp+var_C]
push	eax
call	sub_4078B0
mov	ecx, dword_1969BE4
and	ecx, 1
jnz	loc_48606C
mov	edx, dword_1969BE4
or	edx, 1
mov	dword_1969BE4, edx
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A7E0
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A7EC
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A7F8
call	sub_412C60
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A804
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A810
call	sub_412C60
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A81C
call	sub_412C60
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A828
call	sub_412C60
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A834
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A840
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A84C
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A858
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A864
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A870
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A87C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1BC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A888
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1BC
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A894
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1B8
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8A0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1B4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8AC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1BC
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8B8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1B4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1B4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1B8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8C4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1B4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1B8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1B4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8D0
call	sub_412C60
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8DC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1B0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1AC
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1A8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8E8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1A4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1A0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1B0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A8F4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD19C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD198
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD194
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A900
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD190
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD18C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD188
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A90C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD184
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD180
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD17C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A918
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD178
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD174
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A924
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD19C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD170
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD16C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A930
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD168
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD164
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD160
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A93C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD15C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD158
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD194
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A948
call	sub_412C60
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
push	ecx		; float
fldz
fstp	[esp+18h+var_18]
push	ecx		; float
fldz
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A954
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD154
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD150
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD14C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A960
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD148
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1A4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD144
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A96C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD140
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD13C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD13C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A978
call	sub_412C60
push	ecx		; float
fld	ds:dword_15FCD48
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCC7C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15AEAE8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A984
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD138
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD134
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD130
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A990
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD12C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15AEAE8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD128
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A99C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD124
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD120
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1AC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9A8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD11C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD118
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD114
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9B4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD110
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD10C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD108
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9C0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD104
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD100
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9CC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD120
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0FC
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0F8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9D8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0F4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0F0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0EC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9E4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCC7C
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9F0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD13C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0E8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0E4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196A9FC
call	sub_412C60
push	ecx		; float
fld	ds:dword_15FCD48
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0E0
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA08
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0DC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0D8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0D4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA14
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0D0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD14C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0CC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA20
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0C8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD120
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0C4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA2C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1A4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0C0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0D4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA38
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0BC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0B8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0B4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA44
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD198
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0C4
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA50
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0B0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD18C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD194
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA5C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0AC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0A8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0A4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA68
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0A0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1B0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1A8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA74
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD09C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD098
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD15C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA80
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0CC
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0B8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA8C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD164
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD094
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0B0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AA98
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD090
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD08C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD088
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AAA4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15AEAE8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15AEAE8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:dword_15FCD48
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AAB0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD084
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0F4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD170
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AABC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1A4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD198
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD080
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AAC8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD07C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD078
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD074
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AAD4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD070
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD06C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1A0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AAE0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD188
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD14C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0E4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AAEC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD108
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD08C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD068
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AAF8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD06C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD064
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD060
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB04
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0B8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0CC
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB10
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD120
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD05C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD058
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB1C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD114
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD054
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD120
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB28
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD10C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD050
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD04C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB34
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD048
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0EC
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD044
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB40
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD040
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD108
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD080
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB4C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD03C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD038
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB58
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD034
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD12C
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB64
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD030
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD08C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD02C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB70
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD028
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD060
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0E0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB7C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD024
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD020
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1B0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB88
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD01C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD028
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD018
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AB94
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0E0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0B4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD084
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABA0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD014
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD010
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD00C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABAC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0E0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD134
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1A8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABB8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD108
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0C4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD194
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABC4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD054
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD008
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD004
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABD0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD048
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD138
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD000
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABDC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD070
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFFC
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD090
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABE8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFF8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD178
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFF4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ABF4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0A8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0A0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD138
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC00
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD010
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1A4
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC0C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0A4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0A4
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC18
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFF0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD040
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFEC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC24
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFE8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD074
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFE4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC30
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD024
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD020
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD118
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC3C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD020
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD15C
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC48
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFE0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD180
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0E4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC54
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFDC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFD8
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC60
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFE4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD140
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD090
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC6C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFE4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0D4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD194
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC78
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD188
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFD4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC84
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD194
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD178
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD080
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC90
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFD0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD048
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFCC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AC9C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFC8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFC4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFC0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACA8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD00C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFBC
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD178
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACB4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD138
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD164
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFB8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACC0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0A8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD104
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACCC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFB4
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFB0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0D0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACD8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFAC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFFC
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFA8
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACE4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD140
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD008
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACF0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD110
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFA4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD154
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ACFC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD104
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFA0
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD08
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD048
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0D8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCF9C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD14
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD114
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0B8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD144
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD20
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD180
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD098
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD188
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD2C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0E0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF98
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD38
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCF94
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF90
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD080
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD44
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCF8C
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD054
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD50
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1B8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD190
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD160
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD5C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD03C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF88
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCF84
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD68
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD120
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF80
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFB0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD74
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD13C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0B8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFC4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD80
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCF7C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD090
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1B0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD8C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0BC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF78
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1C4
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AD98
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCF74
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0F8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD05C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADA4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD008
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFD8
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADB0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFA0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF70
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD194
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADBC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0A8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFD0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD16C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADC8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD19C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFD0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCF6C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADD4
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1BC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF68
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0BC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADE0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD14C
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF64
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD080
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADEC
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFF8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFE8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD18C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196ADF8
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD034
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0E0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1AC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE04
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD170
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0D4
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCF60
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE10
call	sub_412C60
push	ecx		; float
fld	ds:flt_15AEAE8
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE1C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD094
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD15C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD0DC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE28
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD058
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD020
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCF5C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE34
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD0C0
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCFA0
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FCFCC
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE40
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCF64
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD07C
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE4C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFB8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF58
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD048
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE58
call	sub_412C60
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE64
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD140
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF54
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD13C
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE70
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFC8
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD0A8
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD080
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE7C
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD1AC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD174
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD1B0
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE88
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FD124
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD064
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD080
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AE94
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCF50
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FCF4C
fstp	[esp+18h+var_18]
push	ecx		; float
fld	ds:flt_15FD090
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AEA0
call	sub_412C60
push	ecx		; float
fld	ds:flt_15FCFBC
fstp	[esp+14h+var_14]
push	ecx		; float
fld	ds:flt_15FD094
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AEAC
call	sub_412C60

loc_48606C:
mov	eax, dword_1969BE4
and	eax, 2
jnz	short loc_4860A1
mov	ecx, dword_1969BE4
or	ecx, 2
mov	dword_1969BE4, ecx
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	ecx		; float
fld1
fstp	[esp+18h+var_18]
push	ecx		; float
fld1
fstp	[esp+1Ch+var_1C]
mov	eax, offset unk_196AEB8
call	sub_412C60

loc_4860A1:
mov	[ebp+var_4], 0
jmp	short loc_4860B3

loc_4860AA:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_4860B3:
cmp	[ebp+var_4], 0FFh
jnb	short loc_486100
cmp	[ebp+var_4], 92h
jnb	short loc_4860D5
mov	eax, [ebp+var_4]
imul	eax, 0Ch
add	eax, offset unk_196A7E0
mov	[ebp+var_10], eax
jmp	short loc_4860DC

loc_4860D5:
mov	[ebp+var_10], offset unk_196AEB8

loc_4860DC:
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
imul	eax, 0Ch
add	eax, [ebp+var_C]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
jmp	short loc_4860AA

loc_486100:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_484A60 endp

align 10h


; Attributes: bp-based frame

sub_486110 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	ecx		; float
fldz
fstp	[esp+8+var_8]
push	ecx		; float
fldz
fstp	[esp+0Ch+var_C]
push	ecx		; float
fldz
fstp	[esp+10h+var_10]
mov	eax, [ebp+var_4]
call	sub_412C60
mov	esp, ebp
pop	ebp
retn
sub_486110 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_486140(float, int)
sub_486140 proc	near

var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_4]
push	eax
push	ecx
fld	[ebp+arg_0]
fstp	[esp+40h+var_40]
lea	ecx, [ebp+var_18]
call	sub_110D500
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
add	ecx, 4
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_30]
call	sub_58F950
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
movzx	edx, byte ptr [ecx+0Ch]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_42BDF0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn	8
sub_486140 endp

align 10h


; Attributes: bp-based frame

sub_4861B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1F7Ch
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_4], ecx
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	edx, [ebp+var_8]
mov	[edx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	ecx, [ebp+var_8]
mov	[ecx+2], ax
xor	edx, edx
and	edx, 0FFFFh
xor	eax, eax
and	eax, 0
mov	ecx, [ebp+var_8]
mov	[ecx], dx
mov	edx, [ebp+var_C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+14h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+15h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4861B0 endp

align 10h


; Attributes: bp-based frame

sub_486260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_486285
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_486285:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_486260 endp

align 10h


; Attributes: bp-based frame

sub_486290 proc	near

var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_58=	dword ptr -58h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_78], ecx
mov	[ebp+var_58], 0
mov	ecx, [ebp+var_78]
add	ecx, 78h
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_78]
add	ecx, 78h
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_28]
setnz	al
mov	[ebp+var_79], al
movzx	ecx, [ebp+var_79]
test	ecx, ecx
jz	short loc_486311
lea	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_78]
add	ecx, 78h
call	sub_48C3D0
mov	[ebp+var_70], eax
mov	eax, [ebp+var_70]
mov	ecx, [eax]
mov	[ebp+var_74], ecx
mov	eax, [ebp+var_74]
jmp	short loc_486313

loc_486311:
xor	eax, eax

loc_486313:
mov	esp, ebp
pop	ebp
retn	8
sub_486290 endp

align 10h


; Attributes: bp-based frame

sub_486320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_486361
mov	ecx, 36B3h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_486368

loc_486361:
mov	[ebp+var_8], 0

loc_486368:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_486320 endp

align 10h


; Attributes: bp-based frame

sub_486370 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 36F0h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, dword_188DC64
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, dword_188DC68
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_486370 endp

align 10h


; Attributes: bp-based frame

sub_4863E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1085AB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_486403
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_486403:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4863E0 endp

align 10h


; Attributes: bp-based frame

sub_486410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_486410 endp

align 10h


; Attributes: bp-based frame

sub_486450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_486450 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_486480(float)
sub_486480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
fld	[ebp+arg_0]
fadd	ds:dbl_15FCC48
fstp	[ebp+var_4]
fld	[ebp+var_4]
push	ecx		; float
fstp	[esp+8+var_8]
call	sub_414380
add	esp, 4
mov	esp, ebp
pop	ebp
retn
sub_486480 endp

align 10h


; Attributes: bp-based frame

sub_4864B0 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_8], eax
xor	ecx, ecx
mov	edx, [ebp+var_8]
mov	[edx], cx
xor	eax, eax
mov	ecx, [ebp+var_8]
mov	[ecx+2], ax
mov	edx, [ebp+var_8]
mov	dword ptr [edx+4], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 14h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 3Ch
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4864B0 endp

align 10h


; Attributes: bp-based frame

sub_486520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [ecx+10h]
mov	ecx, [ebp+var_4]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+arg_0]
add	edx, 14h
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_403400
mov	eax, [ebp+arg_0]
add	eax, 3Ch
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 3Ch
call	sub_403400
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+64h]
mov	[ecx+64h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+68h]
mov	[ecx+68h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+6Ch]
fstp	dword ptr [ecx+6Ch]
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+70h]
mov	[eax+70h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+74h]
mov	[eax+74h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+78h]
fstp	dword ptr [eax+78h]
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+7Ch]
fstp	dword ptr [edx+7Ch]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+80h]
fstp	dword ptr [ecx+80h]
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+84h]
fstp	dword ptr [eax+84h]
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_486520 endp

align 10h


; Attributes: bp-based frame

sub_486610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [eax+10h]
mov	eax, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	[eax+10h], edx
mov	ecx, [ebp+arg_0]
add	ecx, 14h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 3Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+64h]
mov	[eax+64h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+68h]
mov	[eax+68h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+6Ch]
fstp	dword ptr [eax+6Ch]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+70h]
mov	[edx+70h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+74h]
mov	[edx+74h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+78h]
fstp	dword ptr [edx+78h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+7Ch]
fstp	dword ptr [ecx+7Ch]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+80h]
fstp	dword ptr [eax+80h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+84h]
fstp	dword ptr [edx+84h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_486610 endp



; Attributes: bp-based frame

sub_4866F0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4866F0 endp

align 10h


; Attributes: bp-based frame

sub_486740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+34h]
mov	esp, ebp
pop	ebp
retn
sub_486740 endp

align 10h


; Attributes: bp-based frame

sub_486760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwolevelinterf ; "LWOLevelInterface"
mov	esp, ebp
pop	ebp
retn
sub_486760 endp



; Attributes: bp-based frame

sub_486770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1514EC8
mov	esp, ebp
pop	ebp
retn
sub_486770 endp



; Attributes: bp-based frame

sub_486780 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_106EE20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4867A5
push	3Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4867A5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_486780 endp

align 10h


; Attributes: bp-based frame

sub_4867B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1079450
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4867D8
push	118h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4867D8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4867B0 endp

align 10h


; Attributes: bp-based frame

sub_4867F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_488C70
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4867F0 endp



; Attributes: bp-based frame

sub_486830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_486830 endp

align 10h


; Attributes: bp-based frame

sub_486880 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E3960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 70h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 58h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_5021C0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
push	offset sub_407910
push	3
push	18h
mov	edx, [ebp+var_18]
add	edx, 8
push	edx
call	sub_40F3E0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_486880 endp

align 10h


; Attributes: bp-based frame

sub_486900 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	[ebp+var_4], 0
jmp	short loc_486931

loc_486928:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_486931:
cmp	[ebp+var_4], 3
jnb	short loc_486959
mov	ecx, [ebp+var_4]
imul	ecx, 18h
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx+8]
push	eax
mov	ecx, [ebp+var_4]
imul	ecx, 18h
mov	edx, [ebp+var_10]
lea	ecx, [edx+ecx+8]
call	sub_4022F0
jmp	short loc_486928

loc_486959:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+50h]
mov	edx, [eax+54h]
mov	eax, [ebp+var_10]
mov	[eax+50h], ecx
mov	[eax+54h], edx
mov	ecx, [ebp+var_10]
add	ecx, 58h
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 58h
push	edx
mov	ecx, [ebp+var_8]
call	sub_48A080
mov	eax, [ebp+var_10]
add	eax, 70h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
add	ecx, 70h
push	ecx
mov	ecx, [ebp+var_C]
call	sub_48A080
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	cl, [eax+88h]
mov	[edx+88h], cl
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_486900 endp

align 10h


; Attributes: bp-based frame

sub_4869C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_4022F0
mov	edx, [ebp+arg_0]
add	edx, 30h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_4022F0
mov	eax, [ebp+arg_0]
add	eax, 48h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 60h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_4022F0
mov	edx, [ebp+arg_0]
add	edx, 78h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_4022F0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+90h]
fstp	dword ptr [eax+90h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+94h]
fstp	dword ptr [edx+94h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4869C0 endp

align 10h


; Attributes: bp-based frame

sub_486A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_486A60 endp

align 10h


; Attributes: bp-based frame

sub_486A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_486A80 endp

align 10h


; Attributes: bp-based frame

sub_486AA0 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 28h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 50h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_486AA0 endp

align 10h


; Attributes: bp-based frame

sub_486B10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 50h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_486B10 endp



; Attributes: bp-based frame

; int __stdcall	sub_486B50(float)
sub_486B50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_0]
fsub	dword ptr [ecx]
mov	edx, [ebp+var_4]
fld	dword ptr [edx]
mov	eax, [ebp+arg_0]
fsub	dword ptr [eax]
fmulp	st(1), st
mov	ecx, [ebp+var_4]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_0]
fsub	dword ptr [edx+4]
mov	eax, [ebp+var_4]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_0]
fsub	dword ptr [ecx+4]
fmulp	st(1), st
faddp	st(1), st
fstp	[ebp+var_8]
fld	[ebp+var_8]
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_40F5D0
add	esp, 4
mov	esp, ebp
pop	ebp
retn	4
sub_486B50 endp

align 10h


; Attributes: bp-based frame

sub_486BB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_486BD8
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
jmp	short loc_486BE7
jmp	short loc_486BE7

loc_486BD8:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al

loc_486BE7:
mov	esp, ebp
pop	ebp
retn	4
sub_486BB0 endp

align 10h


; Attributes: bp-based frame

sub_486BF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
cmp	ecx, [eax]
jz	short loc_486C12
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
cmp	eax, [edx+4]
jz	short loc_486C12
cmp	[ebp+arg_0], 0FFFFFFFFh
jnz	short loc_486C14

loc_486C12:
jmp	short loc_486C38

loc_486C14:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short loc_486C26
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_486C38

loc_486C26:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+4], 0FFFFFFFFh
jnz	short loc_486C38
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+4], eax

loc_486C38:
mov	esp, ebp
pop	ebp
retn	4
sub_486BF0 endp

align 10h


; Attributes: bp-based frame

sub_486C40 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= word ptr	 8
arg_4= word ptr	 0Ch
arg_8= word ptr	 10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	byte ptr [eax+6], 1
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_1C]
mov	eax, [ecx]
sub	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_1C]
mov	eax, [ecx+4]
sub	eax, [edx+4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_18]
mov	edx, [ebp+arg_1C]
mov	eax, [ecx]
sub	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_18]
mov	edx, [ebp+arg_1C]
mov	eax, [ecx+4]
sub	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
imul	ecx, [ebp+var_14]
mov	edx, [ebp+var_20]
imul	edx, [ebp+var_8]
sub	ecx, edx
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jle	short loc_486CC3
mov	eax, [ebp+var_24]
mov	cx, [ebp+arg_0]
mov	[eax], cx
mov	edx, [ebp+var_24]
mov	ax, [ebp+arg_4]
mov	[edx+2], ax
mov	ecx, [ebp+var_24]
mov	dx, [ebp+arg_8]
mov	[ecx+4], dx
jmp	short loc_486CE9

loc_486CC3:
cmp	[ebp+var_C], 0
jge	short loc_486CE9
mov	eax, [ebp+var_24]
mov	cx, [ebp+arg_0]
mov	[eax], cx
mov	edx, [ebp+var_24]
mov	ax, [ebp+arg_8]
mov	[edx+2], ax
mov	ecx, [ebp+var_24]
mov	dx, [ebp+arg_4]
mov	[ecx+4], dx

loc_486CE9:
mov	[ebp+var_1], 0
mov	[ebp+var_D], 0
mov	[ebp+var_19], 0
cmp	[ebp+arg_C], 0
jnz	short loc_486D39
mov	eax, [ebp+arg_10]
sub	eax, 1
mov	ecx, [ebp+arg_14]
xor	edx, edx
cmp	[ecx], eax
setz	dl
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_10]
sub	eax, 1
mov	ecx, [ebp+arg_18]
xor	edx, edx
cmp	[ecx], eax
setz	dl
mov	[ebp+var_D], dl
mov	eax, [ebp+arg_10]
sub	eax, 1
mov	ecx, [ebp+arg_1C]
xor	edx, edx
cmp	[ecx], eax
setz	dl
mov	[ebp+var_19], dl
jmp	loc_486DE2

loc_486D39:
cmp	[ebp+arg_C], 1
jnz	short loc_486D6B
mov	eax, [ebp+arg_14]
xor	ecx, ecx
cmp	dword ptr [eax], 0
setz	cl
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_18]
xor	eax, eax
cmp	dword ptr [edx], 0
setz	al
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_1C]
xor	edx, edx
cmp	dword ptr [ecx], 0
setz	dl
mov	[ebp+var_19], dl
jmp	short loc_486DE2

loc_486D6B:
cmp	[ebp+arg_C], 2
jnz	short loc_486DA0
mov	eax, [ebp+arg_14]
xor	ecx, ecx
cmp	dword ptr [eax+4], 0
setz	cl
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_18]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_1C]
xor	edx, edx
cmp	dword ptr [ecx+4], 0
setz	dl
mov	[ebp+var_19], dl
jmp	short loc_486DE2

loc_486DA0:
cmp	[ebp+arg_C], 3
jnz	short loc_486DE2
mov	eax, [ebp+arg_10]
sub	eax, 1
mov	ecx, [ebp+arg_14]
xor	edx, edx
cmp	[ecx+4], eax
setz	dl
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_10]
sub	eax, 1
mov	ecx, [ebp+arg_18]
xor	edx, edx
cmp	[ecx+4], eax
setz	dl
mov	[ebp+var_D], dl
mov	eax, [ebp+arg_10]
sub	eax, 1
mov	ecx, [ebp+arg_1C]
xor	edx, edx
cmp	[ecx+4], eax
setz	dl
mov	[ebp+var_19], dl

loc_486DE2:
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_486E15
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	short loc_486E15
mov	edx, [ebp+var_24]
mov	ax, [ebp+arg_0]
mov	[edx+8], ax
mov	ecx, [ebp+var_24]
mov	dx, [ebp+arg_4]
mov	[ecx+0Ah], dx
mov	eax, [ebp+var_24]
mov	cx, [ebp+arg_8]
mov	[eax+0Ch], cx
jmp	short loc_486E82

loc_486E15:
movzx	edx, [ebp+var_D]
test	edx, edx
jz	short loc_486E48
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_486E48
mov	ecx, [ebp+var_24]
mov	dx, [ebp+arg_4]
mov	[ecx+8], dx
mov	eax, [ebp+var_24]
mov	cx, [ebp+arg_8]
mov	[eax+0Ah], cx
mov	edx, [ebp+var_24]
mov	ax, [ebp+arg_0]
mov	[edx+0Ch], ax
jmp	short loc_486E82

loc_486E48:
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jz	short loc_486E7B
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_486E7B
mov	eax, [ebp+var_24]
mov	cx, [ebp+arg_8]
mov	[eax+8], cx
mov	edx, [ebp+var_24]
mov	ax, [ebp+arg_0]
mov	[edx+0Ah], ax
mov	ecx, [ebp+var_24]
mov	dx, [ebp+arg_4]
mov	[ecx+0Ch], dx
jmp	short loc_486E82

loc_486E7B:
mov	eax, [ebp+var_24]
mov	byte ptr [eax+6], 0

loc_486E82:
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	20h
sub_486C40 endp

align 10h


; Attributes: bp-based frame

sub_486E90 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax]
and	ecx, [ebp+arg_8]
neg	ecx
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_4]
movzx	eax, word ptr [edx]
and	eax, [ebp+arg_C]
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_1], al
movzx	ecx, [ebp+var_2]
movzx	edx, [ebp+var_1]
cmp	ecx, edx
jz	short loc_486EF4
movzx	eax, [ebp+var_2]
movzx	ecx, [ebp+var_1]
cmp	eax, ecx
jle	short loc_486EE1
mov	edx, [ebp+arg_4]
movzx	eax, word ptr [edx]
or	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[ecx], ax
jmp	short loc_486EF0

loc_486EE1:
mov	edx, [ebp+arg_0]
movzx	eax, word ptr [edx]
or	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
mov	[ecx], ax

loc_486EF0:
mov	al, 1
jmp	short loc_486EF6

loc_486EF4:
xor	al, al

loc_486EF6:
mov	esp, ebp
pop	ebp
retn
sub_486E90 endp

align 10h


; Attributes: bp-based frame

sub_486F00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_489250
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_486F5B
push	24h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_486F5B:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_486F00 endp

align 10h


; Attributes: bp-based frame

sub_486F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0Ch]
mov	[eax+0Ch], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0Dh]
mov	[eax+0Dh], dl
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_48EF80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_486F70 endp

align 10h


; Attributes: bp-based frame

sub_486FD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_48EF10
mov	ecx, [ebp+var_4]
call	sub_429300
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_487000
push	18h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_487000:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_486FD0 endp

align 10h


; Attributes: bp-based frame

sub_487010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_487010 endp

align 10h


; Attributes: bp-based frame

sub_487030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_487030 endp

align 10h


; Attributes: bp-based frame

sub_487070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_1063B10
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_156E550
mov	edx, [ebp+var_4]
mov	byte ptr [edx+38h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+3Ch], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+40h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+44h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+48h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+14h], 7D0h
mov	eax, 2
mov	ecx, [ebp+var_4]
mov	[ecx+1Ah], ax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_487070 endp

align 10h


; Attributes: bp-based frame

sub_4870E0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_487116
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
call	sub_409EC0
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
add	eax, 4
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
jmp	short loc_487136

loc_487116:
xor	edx, edx
mov	[ebp+var_1], dl
push	1
push	1
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_C]
call	sub_455B70

loc_487136:
mov	esp, ebp
pop	ebp
retn	4
sub_4870E0 endp

align 10h


; Attributes: bp-based frame

sub_487140 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_4871B9
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4871B9
mov	ecx, [ebp+var_54]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4871B9:
mov	esp, ebp
pop	ebp
retn
sub_487140 endp

align 10h


; Attributes: bp-based frame

sub_4871C0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_488CC0
mov	esp, ebp
pop	ebp
retn	4
sub_4871C0 endp

align 10h


; Attributes: bp-based frame

sub_4871F0 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_3], cl
mov	edx, [ebp+var_14]
add	edx, 4
mov	[ebp+var_8], edx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+var_8]
call	sub_52A300
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_4]
call	nullsub_1
mov	edx, [ebp+var_14]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+18h], xmm0
push	0
mov	ecx, [ebp+var_14]
call	sub_640690
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4871F0 endp

align 10h


; Attributes: bp-based frame

sub_487260 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_48A780
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_48A710
mov	esp, ebp
pop	ebp
retn
sub_487260 endp

align 10h


; Attributes: bp-based frame

sub_4872A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4872FD
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
add	edx, 0Ch
mov	eax, [ebp+var_10]
mov	[eax+4], edx
jmp	short loc_48731D

loc_4872FD:
xor	ecx, ecx
mov	[ebp+var_1], cl
push	1
push	1
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_4C3960

loc_48731D:
mov	esp, ebp
pop	ebp
retn	4
sub_4872A0 endp

align 10h


; Attributes: bp-based frame

sub_487330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_48A9D0
mov	esp, ebp
pop	ebp
retn
sub_487330 endp

align 10h


; Attributes: bp-based frame

sub_487350 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
cmp	[ebp+var_C], 0
jz	short loc_4873A1
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4873A1:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_487350 endp

align 10h


; Attributes: bp-based frame

sub_4873C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn
sub_4873C0 endp

align 10h


; Attributes: bp-based frame

sub_4873E0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_488DF0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4873E0 endp

align 10h


; Attributes: bp-based frame

sub_487440 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_488EB0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_487440 endp

align 10h


; Attributes: bp-based frame

sub_4874A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4874F7
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
add	eax, 8
mov	ecx, [ebp+var_10]
mov	[ecx+4], eax
jmp	short loc_487517

loc_4874F7:
xor	edx, edx
mov	[ebp+var_1], dl
push	1
push	1
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_10]
call	sub_48B7F0

loc_487517:
mov	esp, ebp
pop	ebp
retn	4
sub_4874A0 endp

align 10h


; Attributes: bp-based frame

sub_487520 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0DCh
idiv	ecx
push	eax
mov	ecx, [ebp+var_40]
call	sub_489060
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_38]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_48758F

loc_487586:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_48758F:
cmp	[ebp+var_2C], 0
jle	short loc_4875BE
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_49BF60
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 0DCh
mov	[ebp+var_38], edx
mov	eax, [ebp+var_28]
add	eax, 0DCh
mov	[ebp+var_28], eax
jmp	short loc_487586

loc_4875BE:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_487520 endp



; Attributes: bp-based frame

sub_4875D0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_498650
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_48764C
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_48764C
mov	ecx, [ebp+var_4C]
imul	ecx, 0DCh
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_48764C:
mov	esp, ebp
pop	ebp
retn
sub_4875D0 endp



; Attributes: bp-based frame

sub_487650 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_48768E
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_49BF60
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 0DCh
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_4876B9

loc_48768E:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_48B8F0

loc_4876B9:
mov	esp, ebp
pop	ebp
retn	4
sub_487650 endp

align 10h


; Attributes: bp-based frame

sub_4876C0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0DCh
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_487726
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 0DCh
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_48770B
jmp	short loc_487724

loc_48770B:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_4899D0

loc_487724:
jmp	short loc_48775C

loc_487726:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_48BE90

loc_48775C:
mov	esp, ebp
pop	ebp
retn	8
sub_4876C0 endp

align 10h


; Attributes: bp-based frame

sub_487770 proc	near

var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_487794
jmp	short loc_4877AD

loc_487794:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_4899D0

loc_4877AD:
mov	esp, ebp
pop	ebp
retn
sub_487770 endp

align 10h


; Attributes: bp-based frame

sub_4877C0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_48FA70
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_487839
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_487839
mov	ecx, [ebp+var_4C]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_487839:
mov	esp, ebp
pop	ebp
retn
sub_4877C0 endp

align 10h


; Attributes: bp-based frame

sub_487840 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 50h
idiv	ecx
push	eax
mov	ecx, [ebp+var_40]
call	sub_4890D0
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_38]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_4878AF

loc_4878A6:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_4878AF:
cmp	[ebp+var_2C], 0
jle	short loc_4878D9
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_49C080
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 50h
mov	[ebp+var_38], edx
mov	eax, [ebp+var_28]
add	eax, 50h
mov	[ebp+var_28], eax
jmp	short loc_4878A6

loc_4878D9:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_487840 endp

align 10h


; Attributes: bp-based frame

sub_4878F0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_48FAA0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_487969
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_487969
mov	ecx, [ebp+var_4C]
imul	ecx, 50h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_487969:
mov	esp, ebp
pop	ebp
retn
sub_4878F0 endp

align 10h


; Attributes: bp-based frame

sub_487970 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4879D3
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 50h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_4879B8
jmp	short loc_4879D1

loc_4879B8:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_489AF0

loc_4879D1:
jmp	short loc_487A09

loc_4879D3:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_48C190

loc_487A09:
mov	esp, ebp
pop	ebp
retn	8
sub_487970 endp

align 10h


; Attributes: bp-based frame

sub_487A10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= word ptr	-5
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_487A88
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	byte ptr [ebp+var_3+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	byte ptr [ebp+var_3], dl
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_487A70
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
jmp	short loc_487A77

loc_487A70:
mov	[ebp+var_18], 0

loc_487A77:
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
add	ecx, 0Ch
mov	edx, [ebp+var_14]
mov	[edx+4], ecx
jmp	short loc_487AA8

loc_487A88:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_4C3960

loc_487AA8:
mov	esp, ebp
pop	ebp
retn	4
sub_487A10 endp

align 10h


; Attributes: bp-based frame

sub_487AB0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	eax, [ebp+var_30]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_489B50
mov	[ebp+var_18], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_487AB0 endp

align 10h


; Attributes: bp-based frame

sub_487B20 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18]
call	sub_403850
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 18h
call	sub_4887A0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_487B20 endp

align 10h


; Attributes: bp-based frame

sub_487B50 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_487BC9
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_487BC9
mov	ecx, [ebp+var_54]
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_487BC9:
mov	esp, ebp
pop	ebp
retn
sub_487B50 endp

align 10h


; Attributes: bp-based frame

sub_487BD0 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_4891E0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_487BD0 endp

align 10h


; Attributes: bp-based frame

sub_487C30 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax
call	sub_48FAD0
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_487C8E
mov	ecx, 1
imul	ecx, 150h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_487C8E:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_487C30 endp

align 10h


; Attributes: bp-based frame

sub_487CB0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
xor	eax, eax
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_14], ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_C], ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_20]
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_2C]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+10h], 0
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_487CB0 endp

align 10h


; Attributes: bp-based frame

sub_487D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_487D40 endp

align 10h


; Attributes: bp-based frame

sub_487D70 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	eax, [ebp+var_30]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_489850
mov	[ebp+var_18], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_487D70 endp

align 10h


; Attributes: bp-based frame

sub_487DE0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_49C410
add	esp, 8
mov	edx, [ebp+var_54]
cmp	dword ptr [edx], 0
jz	short loc_487E59
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_54]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_487E59
mov	ecx, [ebp+var_50]
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_487E59:
mov	esp, ebp
pop	ebp
retn
sub_487DE0 endp

align 10h


; Attributes: bp-based frame

sub_487E60 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_487EC3
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 24h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_487EA8
jmp	short loc_487EC1

loc_487EA8:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_489BA0

loc_487EC1:
jmp	short loc_487EF9

loc_487EC3:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_48D510

loc_487EF9:
mov	esp, ebp
pop	ebp
retn	8
sub_487E60 endp

align 10h


; Attributes: bp-based frame

sub_487F00 proc	near

var_3C=	dword ptr -3Ch
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_487F24
jmp	short loc_487F3D

loc_487F24:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_489BA0

loc_487F3D:
mov	esp, ebp
pop	ebp
retn
sub_487F00 endp

align 10h


; Attributes: bp-based frame

sub_487F50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_487F8B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_48FB00
add	esp, 8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 0Ch
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_487FB6

loc_487F8B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_48D6B0

loc_487FB6:
mov	esp, ebp
pop	ebp
retn	4
sub_487F50 endp

align 10h


; Attributes: bp-based frame

sub_487FC0 proc	near

var_40=	dword ptr -40h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_487FE4
jmp	short loc_487FFD

loc_487FE4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_40]
call	sub_489CC0

loc_487FFD:
mov	esp, ebp
pop	ebp
retn
sub_487FC0 endp

align 10h


; Attributes: bp-based frame

sub_488010 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_48FB50
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_488089
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_488089
mov	ecx, [ebp+var_4C]
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_488089:
mov	esp, ebp
pop	ebp
retn
sub_488010 endp

align 10h


; Attributes: bp-based frame

sub_488090 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 18h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4880F3
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 18h
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4880D8
jmp	short loc_4880F1

loc_4880D8:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_489D60

loc_4880F1:
jmp	short loc_488129

loc_4880F3:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_48E410

loc_488129:
mov	esp, ebp
pop	ebp
retn	8
sub_488090 endp

align 10h


; Attributes: bp-based frame

sub_488130 proc	near

var_78=	dword ptr -78h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_488154
jmp	short loc_48816D

loc_488154:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_78]
call	sub_489D60

loc_48816D:
mov	esp, ebp
pop	ebp
retn
sub_488130 endp

align 10h


; Attributes: bp-based frame

sub_488180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
sar	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_488180 endp

align 10h


; Attributes: bp-based frame

sub_4881A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
lea	eax, [eax+edx*2]
mov	esp, ebp
pop	ebp
retn	4
sub_4881A0 endp



; Attributes: bp-based frame

sub_4881C0 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_489500
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
push	edx
call	sub_48FB80
add	esp, 0Ch
mov	ecx, [ebp+var_2C]
mov	[ecx+4], eax
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4881C0 endp

align 10h


; Attributes: bp-based frame

sub_488200 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_488272
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 1
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_488272
mov	edx, [ebp+var_54]
shl	edx, 1
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_488272:
mov	esp, ebp
pop	ebp
retn
sub_488200 endp

align 10h


; Attributes: bp-based frame

sub_488280 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4882D3
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx]
mov	[eax], dx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 2
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_4882F3

loc_4882D3:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_48E490

loc_4882F3:
mov	esp, ebp
pop	ebp
retn	4
sub_488280 endp

align 10h


; Attributes: bp-based frame

sub_488300 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 1
cmp	[ebp+arg_0], edx
jnb	short loc_48835D
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*2]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_488342
jmp	short loc_48835B

loc_488342:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_48835B:
jmp	short loc_48838D

loc_48835D:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 1
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_48E590

loc_48838D:
mov	esp, ebp
pop	ebp
retn	8
sub_488300 endp

align 10h


; Attributes: bp-based frame

sub_4883A0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_488419
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0Eh
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_488419
mov	ecx, [ebp+var_54]
imul	ecx, 0Eh
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_488419:
mov	esp, ebp
pop	ebp
retn
sub_4883A0 endp

align 10h


; Attributes: bp-based frame

sub_488420 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_48845B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_48FBF0
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 0Eh
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_48847B

loc_48845B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_48E600

loc_48847B:
mov	esp, ebp
pop	ebp
retn	4
sub_488420 endp

align 10h


; Attributes: bp-based frame

sub_488490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5021C0
mov	esp, ebp
pop	ebp
retn
sub_488490 endp

align 10h


; Attributes: bp-based frame

sub_4884B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489570
mov	esp, ebp
pop	ebp
retn
sub_4884B0 endp

align 10h


; Attributes: bp-based frame

sub_4884D0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_498120
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_4884D0 endp

align 10h


; Attributes: bp-based frame

sub_488590 proc	near

var_30=	dword ptr -30h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_30]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4895C0
mov	esp, ebp
pop	ebp
retn	4
sub_488590 endp

align 10h


; Attributes: bp-based frame

sub_4885C0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_498320
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_4885C0 endp

align 10h


; Attributes: bp-based frame

sub_488680 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_489640
mov	esp, ebp
pop	ebp
retn	4
sub_488680 endp

align 10h


; Attributes: bp-based frame

sub_4886B0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_498380
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_4886B0 endp

align 10h


; Attributes: bp-based frame

sub_488770 proc	near

var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_44]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_44]
call	sub_4896C0
mov	esp, ebp
pop	ebp
retn	4
sub_488770 endp

align 10h


; Attributes: bp-based frame

sub_4887A0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_20], ecx
cmp	[ebp+arg_0], 0
jz	short loc_4887BA
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_24], eax
jmp	short loc_4887C1

loc_4887BA:
mov	[ebp+var_24], 0

loc_4887C1:
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], offset	off_154774C
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], offset	off_156B02C
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+8]
mov	[eax+8], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+9]
mov	[eax+9], dl
mov	eax, [ebp+arg_0]
add	eax, 0Ch
mov	ecx, [ebp+var_20]
add	ecx, 0Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx+18h]
mov	[ecx+18h], al
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	edx, [ebp+var_20]
add	edx, 1Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_0]
mov	cl, [eax+28h]
mov	[edx+28h], cl
mov	edx, [ebp+arg_0]
add	edx, 2Ch
mov	eax, [ebp+var_20]
add	eax, 2Ch
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+38h]
mov	[eax+38h], dl
mov	eax, [ebp+arg_0]
add	eax, 3Ch
mov	ecx, [ebp+var_20]
add	ecx, 3Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx+48h]
mov	[ecx+48h], al
mov	ecx, [ebp+arg_0]
add	ecx, 4Ch
mov	edx, [ebp+var_20]
add	edx, 4Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_0]
mov	cl, [eax+58h]
mov	[edx+58h], cl
mov	edx, [ebp+arg_0]
add	edx, 5Ch
mov	eax, [ebp+var_20]
add	eax, 5Ch
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+68h]
mov	[eax+68h], dl
mov	eax, [ebp+arg_0]
add	eax, 6Ch
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 6Ch
call	sub_403400
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx+94h]
mov	[ecx+94h], al
mov	ecx, [ebp+arg_0]
add	ecx, 98h
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 98h
call	sub_488A20
mov	edx, [ebp+arg_0]
add	edx, 0B8h
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 0B8h
call	sub_488A20
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0D8h]
mov	[eax+0D8h], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0D9h]
mov	[eax+0D9h], dl
mov	eax, [ebp+arg_0]
add	eax, 0DCh
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 0DCh
call	sub_50FA00
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0E8h]
fstp	dword ptr [ecx+0E8h]
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_4887A0 endp

align 10h


; Attributes: bp-based frame

sub_4889A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_486410
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4889C7
push	78h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_4889C7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4889A0 endp



; Attributes: bp-based frame

sub_4889D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_488A13
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_488A13:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4889D0 endp

align 10h


; Attributes: bp-based frame

sub_488A20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154EE18
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
push	offset Addend	; lpAddend
call	sub_40AA70
add	esp, 4
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_156B030
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edx+0Ch]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+10h]
fstp	dword ptr [ecx+10h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+14h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+18h]
fstp	dword ptr [edx+18h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+1Ch]
fstp	dword ptr [ecx+1Ch]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_488A20 endp

align 10h


; Attributes: bp-based frame

sub_488AB0 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_488AF9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_594BE0
mov	eax, 1
jmp	short loc_488AFB

loc_488AF9:
xor	eax, eax

loc_488AFB:
mov	esp, ebp
pop	ebp
retn	4
sub_488AB0 endp

align 10h


; Attributes: bp-based frame

sub_488B10 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_488BF7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_48A350
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_488BB4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_488BC8
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_488BB4

loc_488BC8:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_488BDA:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_488BEE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_488BDA

loc_488BEE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_488BF7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_488B10 endp

align 10h


; Attributes: bp-based frame

sub_488C10 proc	near

var_3C=	dword ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5BC040
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_3C]
jz	short loc_488C59
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_3C]
call	sub_4897E0
mov	eax, 1
jmp	short loc_488C5B

loc_488C59:
xor	eax, eax

loc_488C5B:
mov	esp, ebp
pop	ebp
retn	4
sub_488C10 endp

align 10h


; Attributes: bp-based frame

sub_488C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_488CB5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48A430
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_488CB5:
mov	esp, ebp
pop	ebp
retn
sub_488C70 endp

align 10h


; Attributes: bp-based frame

sub_488CC0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_526A40
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_49D9D0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_488CC0 endp

align 10h


; Attributes: bp-based frame

sub_488D40 proc	near

var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_38]
jz	short loc_488D89
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_38]
call	sub_489920
mov	eax, 1
jmp	short loc_488D8B

loc_488D89:
xor	eax, eax

loc_488D8B:
mov	esp, ebp
pop	ebp
retn	4
sub_488D40 endp

align 10h


; Attributes: bp-based frame

sub_488DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_488DE5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48ABD0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_488DE5:
mov	esp, ebp
pop	ebp
retn
sub_488DA0 endp

align 10h


; Attributes: bp-based frame

sub_488DF0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_488E3D
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_488E3D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_488DF0 endp

align 10h


; Attributes: bp-based frame

sub_488E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_488EA5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48ADD0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_488EA5:
mov	esp, ebp
pop	ebp
retn
sub_488E60 endp

align 10h


; Attributes: bp-based frame

sub_488EB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7EB0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_488F07
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_488F07:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_488EB0 endp

align 10h


; Attributes: bp-based frame

sub_488F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_488F65
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48AFC0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_488F65:
mov	esp, ebp
pop	ebp
retn
sub_488F20 endp

align 10h


; Attributes: bp-based frame

sub_488F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_488FB5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48B210
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_488FB5:
mov	esp, ebp
pop	ebp
retn
sub_488F70 endp

align 10h


; Attributes: bp-based frame

sub_488FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_489005
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48B410
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_489005:
mov	esp, ebp
pop	ebp
retn
sub_488FC0 endp

align 10h


; Attributes: bp-based frame

sub_489010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_489055
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48B600
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_489055:
mov	esp, ebp
pop	ebp
retn
sub_489010 endp

align 10h


; Attributes: bp-based frame

sub_489060 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_489A70
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 0DCh
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_489060 endp

align 10h


; Attributes: bp-based frame

sub_4890D0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_5A8C40
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 50h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_4890D0 endp

align 10h


; Attributes: bp-based frame

sub_489140 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_489188
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_489188
mov	ecx, [ebp+var_8]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_489188:
mov	esp, ebp
pop	ebp
retn
sub_489140 endp

align 10h


; Attributes: bp-based frame

sub_489190 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_4891D8
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4891D8
mov	ecx, [ebp+var_8]
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4891D8:
mov	esp, ebp
pop	ebp
retn
sub_489190 endp

align 10h


; Attributes: bp-based frame

sub_4891E0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_48FC60
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_489237
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_489237:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4891E0 endp

align 10h


; Attributes: bp-based frame

sub_489250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_489295
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48C210
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_489295:
mov	esp, ebp
pop	ebp
retn
sub_489250 endp

align 10h


; Attributes: bp-based frame

sub_4892A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4892E5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48CFE0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4892E5:
mov	esp, ebp
pop	ebp
retn
sub_4892A0 endp

align 10h


; Attributes: bp-based frame

sub_4892F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_489335
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48D4B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_489335:
mov	esp, ebp
pop	ebp
retn
sub_4892F0 endp

align 10h


; Attributes: bp-based frame

sub_489340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_489385
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48D590
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_489385:
mov	esp, ebp
pop	ebp
retn
sub_489340 endp

align 10h


; Attributes: bp-based frame

sub_489390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4893D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48D5F0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4893D5:
mov	esp, ebp
pop	ebp
retn
sub_489390 endp

align 10h


; Attributes: bp-based frame

sub_4893E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_489425
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48D650
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_489425:
mov	esp, ebp
pop	ebp
retn
sub_4893E0 endp

align 10h


; Attributes: bp-based frame

sub_489430 proc	near

var_38=	dword ptr -38h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_489446
mov	eax, [ebp+arg_0]
jmp	short loc_48945F

loc_489446:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_489CC0

loc_48945F:
mov	esp, ebp
pop	ebp
retn	8
sub_489430 endp

align 10h


; Attributes: bp-based frame

sub_489470 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+var_20]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_28]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_28]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_28]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	edx, [ebp+var_28]
mov	[edx+14h], cl
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	8
sub_489470 endp

align 10h


; Attributes: bp-based frame

sub_489500 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_489E30
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_18]
mov	[eax+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_489500 endp

align 10h


; Attributes: bp-based frame

sub_489570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4895B5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48EA40
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4895B5:
mov	esp, ebp
pop	ebp
retn
sub_489570 endp

align 10h


; Attributes: bp-based frame

sub_4895C0 proc	near

var_24=	dword ptr -24h
var_20=	word ptr -20h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_503490
mov	[ebp+var_10], eax
xor	eax, eax
mov	byte ptr [ebp+var_20+1], al
mov	cl, byte ptr [ebp+var_20+1]
mov	[ebp+var_1D], cl
xor	edx, edx
mov	byte ptr [ebp+var_20], dl
mov	al, byte ptr [ebp+var_20]
mov	[ebp+var_1E], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4895C0 endp

align 10h


; Attributes: bp-based frame

sub_489640 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_595E40
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_48FE20
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_489640 endp

align 10h


; Attributes: bp-based frame

sub_4896C0 proc	near

var_48=	dword ptr -48h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
push	1
mov	ecx, [ebp+var_48]
call	sub_489EA0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_48FE80
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4896C0 endp

align 10h


; Attributes: bp-based frame

sub_489740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_489785
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48F2D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_489785:
mov	esp, ebp
pop	ebp
retn
sub_489740 endp

align 10h


; Attributes: bp-based frame

sub_489790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4897D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_48F7D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4897D5:
mov	esp, ebp
pop	ebp
retn
sub_489790 endp

align 10h


; Attributes: bp-based frame

sub_4897E0 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_14]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_48FCA0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_48983A
mov	edx, 1
imul	edx, 0A0h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48983A:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_14]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4897E0 endp

align 10h


; Attributes: bp-based frame

sub_489850 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_503490
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+8], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_489850 endp



; Attributes: bp-based frame

sub_489890 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_4898DD
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4898DD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_489890 endp

align 10h


; Attributes: bp-based frame

sub_489900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_48A710
mov	esp, ebp
pop	ebp
retn
sub_489900 endp

align 10h


; Attributes: bp-based frame

sub_489920 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_48FCD0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_489977
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_489977:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_489920 endp

align 10h


; Attributes: bp-based frame

sub_489990 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_489990 endp

align 10h


; Attributes: bp-based frame

sub_4899B0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4899B0 endp

align 10h


; Attributes: bp-based frame

sub_4899D0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_489A0F

loc_489A06:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_489A0F:
cmp	[ebp+var_C], 0
jle	short loc_489A3B
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_10817E0
mov	ecx, [ebp+var_10]
add	ecx, 0DCh
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 0DCh
mov	[ebp+var_14], edx
jmp	short loc_489A06

loc_489A3B:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
push	0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4983E0
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4899D0 endp

align 10h


; Attributes: bp-based frame

sub_489A70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], (offset loc_129E410+2)
jbe	short loc_489A9B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_489A9B:
cmp	[ebp+arg_0], 0
jz	short loc_489AD5
mov	ecx, [ebp+arg_0]
imul	ecx, 0DCh
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 0DCh
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_489ADC

loc_489AD5:
mov	[ebp+var_10], 0

loc_489ADC:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_489A70 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_489AF0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_5], al
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_48FD10
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
push	0
mov	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_498430
add	esp, 0Ch
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_489AF0 endp

align 10h


; Attributes: bp-based frame

sub_489B50 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_596830
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+8], eax
mov	edx, [edx+4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_489B50 endp

align 10h


; Attributes: bp-based frame

sub_489BA0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_489BDF

loc_489BD6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_489BDF:
cmp	[ebp+var_C], 0
jle	short loc_489C05
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_4988A0
mov	ecx, [ebp+var_14]
add	ecx, 24h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
add	edx, 24h
mov	[ebp+var_18], edx
jmp	short loc_489BD6

loc_489C05:
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_2C], edx
push	0
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_498490
add	esp, 0Ch
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_489BA0 endp

align 10h


; Attributes: bp-based frame

sub_489C40 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+var_20]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_28]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_28]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	[eax+0Ch], ecx
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_489C40 endp

align 10h


; Attributes: bp-based frame

sub_489CC0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_18]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_489CFF

loc_489CF6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_489CFF:
cmp	[ebp+var_C], 0
jle	short loc_489D25
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_498900
mov	ecx, [ebp+var_18]
add	ecx, 0Ch
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 0Ch
mov	[ebp+var_1C], edx
jmp	short loc_489CF6

loc_489D25:
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
push	0
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_498510
add	esp, 0Ch
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_489CC0 endp

align 10h


; Attributes: bp-based frame

sub_489D60 proc	near

var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
jmp	short loc_489D92

loc_489D80:
mov	ecx, [ebp+var_4]
add	ecx, 18h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
add	edx, 18h
mov	[ebp+var_C], edx

loc_489D92:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_489DC0
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_489DC0
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_48FD80
add	esp, 4
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_48FDB0
add	esp, 8
jmp	short loc_489D80

loc_489DC0:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_489DE1
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_498600
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_31], dl
jmp	short loc_489E19

loc_489DE1:
jmp	short loc_489DF5

loc_489DE3:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
add	ecx, 18h
mov	[ebp+var_C], ecx

loc_489DF5:
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_8]
jz	short loc_489E14
xor	eax, eax
mov	[ebp+var_32], al
mov	ecx, [ebp+var_C]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_48FDB0
add	esp, 8
jmp	short loc_489DE3

loc_489E14:
xor	eax, eax
mov	[ebp+var_65], al

loc_489E19:
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_489D60 endp

align 10h


; Attributes: bp-based frame

sub_489E30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 7FFFFFFFh
jbe	short loc_489E5B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_489E5B:
cmp	[ebp+arg_0], 0
jz	short loc_489E8A
mov	ecx, [ebp+arg_0]
shl	ecx, 1
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
shr	eax, 1
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_489E91

loc_489E8A:
mov	[ebp+var_10], 0

loc_489E91:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_489E30 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_489EA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 3C3C3C3h
jbe	short loc_489EC6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_489EC6:
cmp	[ebp+arg_0], 0
jz	short loc_489EEC
mov	eax, [ebp+arg_0]
imul	eax, 44h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_489EF3

loc_489EEC:
mov	[ebp+var_C], 0

loc_489EF3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_489EA0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_489F00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], (offset loc_129E410+2)
jbe	short loc_489F26
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_489F26:
cmp	[ebp+arg_0], 0
jz	short loc_489F5D
mov	eax, [ebp+arg_0]
imul	eax, 0DCh
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 0DCh
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_489F5F

loc_489F5D:
xor	eax, eax

loc_489F5F:
mov	esp, ebp
pop	ebp
retn	8
sub_489F00 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_489F70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 3333333h
jbe	short loc_489F96
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_489F96:
cmp	[ebp+arg_0], 0
jz	short loc_489FCA
mov	eax, [ebp+arg_0]
imul	eax, 50h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 50h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_489FCC

loc_489FCA:
xor	eax, eax

loc_489FCC:
mov	esp, ebp
pop	ebp
retn	8
sub_489F70 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_489FE0(float)
sub_489FE0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
fld	[ebp+arg_0]
sub	esp, 8
fstp	[esp+0Ch+var_C]
mov	eax, [ebp+var_4]
push	eax		; int
call	sub_490FB0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn	4
sub_489FE0 endp

align 10h


; Attributes: bp-based frame

sub_48A010 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= word ptr	-4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
mov	[ebp+var_C], ecx
xor	eax, eax
mov	[ebp+var_4], ax
jmp	short loc_48A02F

loc_48A023:
mov	cx, [ebp+var_4]
add	cx, 1
mov	[ebp+var_4], cx

loc_48A02F:
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax+0Ah]
cmp	edx, ecx
jge	short loc_48A065
xor	eax, eax
lea	esi, [ebp+var_8]
call	sub_41DF90
push	eax
movzx	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
lea	edi, [ecx+edx*4]
call	sub_418760
lea	ecx, [ebp+var_8]
call	sub_429100
jmp	short loc_48A023

loc_48A065:
xor	edx, edx
mov	eax, [ebp+var_C]
mov	[eax+0Ah], dx
xor	ecx, ecx
mov	edx, [ebp+var_C]
mov	[edx+0Ch], cx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_48A010 endp

align 10h


; Attributes: bp-based frame

sub_48A080 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_48A157
mov	ecx, [ebp+var_14]
call	sub_5021C0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_48A0E0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_48A157

loc_48A0E0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_491270
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_48A108:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_48A11C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_48A108

loc_48A11C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_48A12E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_48A142
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_48A12E

loc_48A142:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_48A157:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_48A080 endp



; Attributes: bp-based frame

sub_48A160 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48A17C:
cmp	[ebp+var_10], 0
jz	short loc_48A1F3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_48A1C2
jb	short loc_48A1B9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_48A1C2

loc_48A1B9:
mov	[ebp+var_64], 1
jmp	short loc_48A1C9

loc_48A1C2:
mov	[ebp+var_64], 0

loc_48A1C9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_48A1E2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_48A1EB

loc_48A1E2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_48A1EB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_48A17C

loc_48A1F3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_48A295
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_48A286
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_491100
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_48A33B
jmp	short loc_48A295

loc_48A286:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48A295:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_48A2CF
jb	short loc_48A2C6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_48A2CF

loc_48A2C6:
mov	[ebp+var_78], 1
jmp	short loc_48A2D6

loc_48A2CF:
mov	[ebp+var_78], 0

loc_48A2D6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_48A320
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_491100
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_48A33B

loc_48A320:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_48A33B:
mov	esp, ebp
pop	ebp
retn	8
sub_48A160 endp

align 10h


; Attributes: bp-based frame

sub_48A350 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_490A50
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_48A3A6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_48A350
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_48A3A6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_48A3B5:
cmp	[ebp+arg_0], 0
jz	short loc_48A422
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_490A50
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_48A411
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_48A350
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_48A411:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_48A3B5

loc_48A422:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_48A350 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48A430(void	*)
sub_48A430 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx

loc_48A439:
cmp	[ebp+arg_0], 0
jz	short loc_48A48C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_14]
call	sub_48A430
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_48FCA0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48A484
mov	edx, 1
imul	edx, 0A0h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48A484:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48A439

loc_48A48C:
mov	esp, ebp
pop	ebp
retn	4
sub_48A430 endp

align 10h


; Attributes: bp-based frame

sub_48A4A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_48A577
mov	ecx, [ebp+var_14]
call	sub_5021C0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_48A500
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_48A577

loc_48A500:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_496CF0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_48A528:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_48A53C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_48A528

loc_48A53C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_48A54E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_48A562
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_48A54E

loc_48A562:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_48A577:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_48A4A0 endp



; Attributes: bp-based frame

sub_48A580 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48A59C:
cmp	[ebp+var_10], 0
jz	short loc_48A5E7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_48A5D6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_48A5DF

loc_48A5D6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_48A5DF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_48A59C

loc_48A5E7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_48A689
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_48A67A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_491820
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_48A703
jmp	short loc_48A689

loc_48A67A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48A689:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_48A6E8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_491820
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_48A703

loc_48A6E8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_48A703:
mov	esp, ebp
pop	ebp
retn	8
sub_48A580 endp

align 10h


; Attributes: bp-based frame

sub_48A710 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_48A721:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_48A766
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_491960
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_48A764
mov	ecx, 1
imul	ecx, 84h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_48A764:
jmp	short loc_48A721

loc_48A766:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_48A710 endp

align 10h


; Attributes: bp-based frame

sub_48A780 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_48A710
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_48A780 endp



; Attributes: bp-based frame

sub_48A7D0 proc	near

var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_48A7D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 6Ch
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_48A801:
cmp	[ebp+var_1C], 0
jz	short loc_48A875
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_41]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_1C]
add	edx, 10h
mov	[ebp+var_40], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_40]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_48A864
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_70], eax
jmp	short loc_48A86D

loc_48A864:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_70], edx

loc_48A86D:
mov	eax, [ebp+var_70]
mov	[ebp+var_1C], eax
jmp	short loc_48A801

loc_48A875:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_48A917
mov	edx, [ebp+var_68]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_71], al
movzx	ecx, [ebp+var_71]
test	ecx, ecx
jz	short loc_48A908
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_68]
call	sub_4919D0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_48A9C0
jmp	short loc_48A917

loc_48A908:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_48A917:
mov	ecx, [ebp+var_10]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_59]
mov	[ebp+var_78], edx
mov	[ebp+var_4], 3
mov	eax, [ebp+var_60]
add	eax, 10h
mov	[ebp+var_58], eax
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_31], cl
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_48A9A5
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4919D0
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_48A9C0

loc_48A9A5:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_48A9C0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_48A7D0 endp



; Attributes: bp-based frame

sub_48A9D0 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_48A9E1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_48AA19
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_48AA17
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_48AA17:
jmp	short loc_48A9E1

loc_48AA19:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_48A9D0 endp

align 10h


; Attributes: bp-based frame

sub_48AA30 proc	near

var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_84=	dword ptr -84h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A4], ecx
mov	eax, [ebp+var_A4]
cmp	eax, [ebp+arg_0]
jz	loc_48ABC0
mov	ecx, [ebp+var_A4]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_A4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_48AA90:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_A5], cl
movzx	edx, [ebp+var_A5]
test	edx, edx
jz	short loc_48AB1F
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_48AB1F
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_48FEE0
jmp	loc_48AA90

loc_48AB1F:
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_10]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_48AB60
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_5C]
call	sub_4046E0
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_A4]
call	sub_4900C0
jmp	short loc_48ABC0

loc_48AB60:
lea	eax, [ebp+var_98]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_78]
call	sub_4046E0
mov	ecx, [ebp+var_10]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_9C], edx
xor	eax, eax
mov	[ebp+var_79], al
lea	ecx, [ebp+var_79]
push	ecx
mov	edx, [ebp+var_A0]
push	edx
mov	eax, [ebp+var_9C]
push	eax
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_84]
call	sub_4046E0
mov	ecx, [ebp+var_A4]
call	sub_499A00

loc_48ABC0:
mov	eax, [ebp+var_A4]
mov	esp, ebp
pop	ebp
retn	4
sub_48AA30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48ABD0(void	*)
sub_48ABD0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_48ABD9:
cmp	[ebp+arg_0], 0
jz	short loc_48AC29
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_48ABD0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_48FCD0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48AC21
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48AC21:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48ABD9

loc_48AC29:
mov	esp, ebp
pop	ebp
retn	4
sub_48ABD0 endp

align 10h


; Attributes: bp-based frame

sub_48AC30 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_74=	dword ptr -74h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
cmp	eax, [ebp+arg_0]
jz	loc_48ADB6
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_48AC90:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_99], cl
movzx	edx, [ebp+var_99]
test	edx, edx
jz	short loc_48AD1B
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_48AD1B
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	[ecx+8], eax
jmp	loc_48AC90

loc_48AD1B:
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_48AD5C
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_98]
call	sub_490040
jmp	short loc_48ADB6

loc_48AD5C:
lea	edx, [ebp+var_8C]
mov	[ebp+var_68], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	eax, [ebp+var_10]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_90], ecx
xor	edx, edx
mov	[ebp+var_69], dl
lea	eax, [ebp+var_69]
push	eax
mov	ecx, [ebp+var_94]
push	ecx
mov	edx, [ebp+var_90]
push	edx
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_499620

loc_48ADB6:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_48AC30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48ADD0(void	*)
sub_48ADD0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48ADD9:
cmp	[ebp+arg_0], 0
jz	short loc_48AE1F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48ADD0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_48AE17
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48AE17:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48ADD9

loc_48AE1F:
mov	esp, ebp
pop	ebp
retn	4
sub_48ADD0 endp

align 10h


; Attributes: bp-based frame

sub_48AE30 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48AE4C:
cmp	[ebp+var_10], 0
jz	short loc_48AE96
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_48AE85
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_48AE8E

loc_48AE85:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_48AE8E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_48AE4C

loc_48AE96:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_48AF38
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_48AF29
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_492710
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_48AFB1
jmp	short loc_48AF38

loc_48AF29:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48AF38:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_48AF96
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_492710
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_48AFB1

loc_48AF96:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_48AFB1:
mov	esp, ebp
pop	ebp
retn	8
sub_48AE30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48AFC0(void	*)
sub_48AFC0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48AFC9:
cmp	[ebp+arg_0], 0
jz	short loc_48B019
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48AFC0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7EB0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48B011
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48B011:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48AFC9

loc_48B019:
mov	esp, ebp
pop	ebp
retn	4
sub_48AFC0 endp

align 10h


; Attributes: bp-based frame

sub_48B020 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48B03C:
cmp	[ebp+var_10], 0
jz	short loc_48B0B3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_48B082
jb	short loc_48B079
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_48B082

loc_48B079:
mov	[ebp+var_64], 1
jmp	short loc_48B089

loc_48B082:
mov	[ebp+var_64], 0

loc_48B089:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_48B0A2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_48B0AB

loc_48B0A2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_48B0AB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_48B03C

loc_48B0B3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_48B155
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_48B146
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_492850
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_48B1FB
jmp	short loc_48B155

loc_48B146:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48B155:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_48B18F
jb	short loc_48B186
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_48B18F

loc_48B186:
mov	[ebp+var_78], 1
jmp	short loc_48B196

loc_48B18F:
mov	[ebp+var_78], 0

loc_48B196:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_48B1E0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_492850
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_48B1FB

loc_48B1E0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_48B1FB:
mov	esp, ebp
pop	ebp
retn	8
sub_48B020 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48B210(void	*)
sub_48B210 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx

loc_48B219:
cmp	[ebp+arg_0], 0
jz	short loc_48B26C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_24]
call	sub_48B210
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_492B00
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48B264
mov	edx, 1
imul	edx, 114h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48B264:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48B219

loc_48B26C:
mov	esp, ebp
pop	ebp
retn	4
sub_48B210 endp

align 10h


; Attributes: bp-based frame

sub_48B280 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48B29C:
cmp	[ebp+var_10], 0
jz	short loc_48B2E3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_48B2D2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_48B2DB

loc_48B2D2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_48B2DB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_48B29C

loc_48B2E3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_48B385
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_48B376
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4929C0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_48B3FB
jmp	short loc_48B385

loc_48B376:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48B385:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_48B3E0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_4929C0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_48B3FB

loc_48B3E0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_48B3FB:
mov	esp, ebp
pop	ebp
retn	8
sub_48B280 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48B410(void	*)
sub_48B410 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48B419:
cmp	[ebp+arg_0], 0
jz	short loc_48B469
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48B410
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7E80
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48B461
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48B461:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48B419

loc_48B469:
mov	esp, ebp
pop	ebp
retn	4
sub_48B410 endp

align 10h


; Attributes: bp-based frame

sub_48B470 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48B48C:
cmp	[ebp+var_10], 0
jz	short loc_48B4D7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_48B4C6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_48B4CF

loc_48B4C6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_48B4CF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_48B48C

loc_48B4D7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_48B579
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_48B56A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C31B0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_48B5F3
jmp	short loc_48B579

loc_48B56A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48B579:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_48B5D8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C31B0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_48B5F3

loc_48B5D8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_48B5F3:
mov	esp, ebp
pop	ebp
retn	8
sub_48B470 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48B600(void	*)
sub_48B600 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48B609:
cmp	[ebp+arg_0], 0
jz	short loc_48B64F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48B600
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
call	nullsub_1
cmp	[ebp+arg_0], 0
jz	short loc_48B647
mov	ecx, 1
imul	ecx, 14h
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_48B647:
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
jmp	short loc_48B609

loc_48B64F:
mov	esp, ebp
pop	ebp
retn	4
sub_48B600 endp

align 10h


; Attributes: bp-based frame

sub_48B660 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48B67C:
cmp	[ebp+var_10], 0
jz	short loc_48B6C7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_48B6B6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_48B6BF

loc_48B6B6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_48B6BF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_48B67C

loc_48B6C7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_48B769
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_48B75A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_493010
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_48B7E3
jmp	short loc_48B769

loc_48B75A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48B769:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_48B7C8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_493010
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_48B7E3

loc_48B7C8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_48B7E3:
mov	esp, ebp
pop	ebp
retn	8
sub_48B660 endp

align 10h


; Attributes: bp-based frame

sub_48B7F0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_48B866

loc_48B854:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 8
mov	[ebp+var_38], ecx

loc_48B866:
cmp	[ebp+var_3C], 0
jbe	short loc_48B87E
mov	edx, [ebp+var_38]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
jmp	short loc_48B854

loc_48B87E:
mov	ecx, [ebp+var_38]
mov	[ebp+var_C], ecx
movzx	edx, [ebp+arg_10]
test	edx, edx
jnz	short loc_48B8A9
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_48B8A9:
mov	ecx, [ebp+var_9C]
call	sub_50F330
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_48B7F0 endp

align 10h


; Attributes: bp-based frame

sub_48B8F0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_490140
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_489A70
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_48B973

loc_48B96A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_48B973:
cmp	[ebp+var_40], 0
jle	short loc_48B9A2
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_49BF60
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 0DCh
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 0DCh
mov	[ebp+var_3C], eax
jmp	short loc_48B96A

loc_48B9A2:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_48B9CC
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_49BF60
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 0DCh
mov	[ebp+var_C], ecx
jmp	short loc_48BA26

loc_48B9CC:
mov	edx, [ebp+arg_C]
imul	edx, 0DCh
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_48BA08

loc_48B9F4:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 0DCh
mov	[ebp+var_68], eax

loc_48BA08:
cmp	[ebp+var_6C], 0
jle	short loc_48BA20
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_49BF60
add	esp, 8
jmp	short loc_48B9F4

loc_48BA20:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_48BA26:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_48BAC3
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_48BA85

loc_48BA7C:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_48BA85:
cmp	[ebp+var_80], 0
jle	short loc_48BABD
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_49BF60
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 0DCh
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 0DCh
mov	[ebp+var_7C], eax
jmp	short loc_48BA7C

loc_48BABD:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_48BAC3:
mov	ecx, [ebp+var_CC]
call	sub_490220
mov	edx, [ebp+var_4]
imul	edx, 0DCh
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_48B8F0 endp

align 10h


; Attributes: bp-based frame

sub_48BB10 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_CC]
jz	loc_48BE75
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0DCh
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_48BBF2
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_489F00
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_499FF0
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_CC]
call	sub_490220
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 0DCh
mov	eax, [ebp+var_CC]
add	edx, [eax]
mov	ecx, [ebp+var_CC]
mov	[ecx+8], edx
jmp	loc_48BE5B

loc_48BBF2:
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0DCh
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_48BCBA
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_48BC5F

loc_48BC56:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_48BC5F:
cmp	[ebp+var_68], 0
jle	short loc_48BC8B
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_10817E0
mov	ecx, [ebp+var_6C]
add	ecx, 0DCh
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 0DCh
mov	[ebp+var_70], edx
jmp	short loc_48BC56

loc_48BC8B:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_4983E0
add	esp, 0Ch
jmp	loc_48BE5B

loc_48BCBA:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0DCh
idiv	ecx
imul	eax, 0DCh
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A0], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	eax, [ebp+var_A0]
sub	eax, [ebp+var_94]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_48BD47

loc_48BD38:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_48BD47:
cmp	[ebp+var_90], 0
jle	short loc_48BD88
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_98]
call	sub_10817E0
mov	ecx, [ebp+var_94]
add	ecx, 0DCh
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
add	edx, 0DCh
mov	[ebp+var_98], edx
jmp	short loc_48BD38

loc_48BD88:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_C8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0DCh
idiv	ecx
imul	eax, 0DCh
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_C0], eax
mov	eax, [ebp+var_C0]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_C4]
sub	eax, [ebp+var_BC]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_B0], eax
jmp	short loc_48BE17

loc_48BE08:
mov	edx, [ebp+var_B0]
sub	edx, 1
mov	[ebp+var_B0], edx

loc_48BE17:
cmp	[ebp+var_B0], 0
jle	short loc_48BE5B
mov	eax, [ebp+var_BC]
push	eax		; int
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	sub_49BF60
add	esp, 8
mov	edx, [ebp+var_BC]
add	edx, 0DCh
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_AC]
add	eax, 0DCh
mov	[ebp+var_AC], eax
jmp	short loc_48BE08

loc_48BE5B:
mov	ecx, [ebp+var_4]
imul	ecx, 0DCh
mov	edx, [ebp+var_CC]
add	ecx, [edx]
mov	eax, [ebp+var_CC]
mov	[eax+4], ecx

loc_48BE75:
mov	eax, [ebp+var_CC]
mov	esp, ebp
pop	ebp
retn	4
sub_48BB10 endp

align 10h


; Attributes: bp-based frame

sub_48BE90 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_48BEFB
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 0DCh
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_48BED7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_493150
jmp	short loc_48BEFB

loc_48BED7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_48B8F0

loc_48BEFB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_48BE90 endp

align 10h


; Attributes: bp-based frame

sub_48BF10 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B4h
mov	[ebp+var_B4], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_B4]
jz	loc_48C17E
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_48BFEF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_B4]
add	ecx, 8
call	sub_489F70
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_49A0F0
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_B4]
call	sub_4902A0
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 50h
mov	eax, [ebp+var_B4]
add	edx, [eax]
mov	ecx, [ebp+var_B4]
mov	[ecx+8], edx
jmp	loc_48C167

loc_48BFEF:
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_48C05C
xor	edx, edx
mov	[ebp+var_11], dl
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_B4]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_48FD10
add	esp, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ecx+4]
mov	[ebp+var_7C], edx
push	0
mov	eax, [ebp+var_7C]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_498430
add	esp, 0Ch
jmp	loc_48C167

loc_48C05C:
xor	edx, edx
mov	[ebp+var_12], dl
lea	eax, [ebp+var_12]
push	eax
mov	ecx, [ebp+var_B4]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_B4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
imul	eax, 50h
mov	edx, [ebp+arg_0]
add	eax, [edx]
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_48FD10
add	esp, 10h
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_B4]
mov	ecx, [eax+4]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_B4]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 50h
idiv	ecx
imul	eax, 50h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A8], eax
mov	eax, [ebp+var_A8]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_B0]
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_AC]
sub	eax, [ebp+var_A4]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_98], eax
jmp	short loc_48C128

loc_48C119:
mov	edx, [ebp+var_98]
sub	edx, 1
mov	[ebp+var_98], edx

loc_48C128:
cmp	[ebp+var_98], 0
jle	short loc_48C167
mov	eax, [ebp+var_A4]
push	eax		; int
mov	ecx, [ebp+var_94]
push	ecx		; void *
call	sub_49C080
add	esp, 8
mov	edx, [ebp+var_A4]
add	edx, 50h
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_94]
add	eax, 50h
mov	[ebp+var_94], eax
jmp	short loc_48C119

loc_48C167:
mov	ecx, [ebp+var_4]
imul	ecx, 50h
mov	edx, [ebp+var_B4]
add	ecx, [edx]
mov	eax, [ebp+var_B4]
mov	[eax+4], ecx

loc_48C17E:
mov	eax, [ebp+var_B4]
mov	esp, ebp
pop	ebp
retn	4
sub_48BF10 endp

align 10h


; Attributes: bp-based frame

sub_48C190 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_48C1FB
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_48C1D7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4937B0
jmp	short loc_48C1FB

loc_48C1D7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4935A0

loc_48C1FB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_48C190 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48C210(void	*)
sub_48C210 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_48C219:
cmp	[ebp+arg_0], 0
jz	short loc_48C269
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_48C210
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_48FC60
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48C261
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48C261:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48C219

loc_48C269:
mov	esp, ebp
pop	ebp
retn	4
sub_48C210 endp

align 10h


; Attributes: bp-based frame

sub_48C270 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_48C281:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_48C2C6
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax
call	sub_48FAD0
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_48C2C4
mov	ecx, 1
imul	ecx, 150h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_48C2C4:
jmp	short loc_48C281

loc_48C2C6:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_48C270 endp

align 10h


; Attributes: bp-based frame

sub_48C2E0 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_48C31F

loc_48C30E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_48C31F:
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_99], dl
movzx	eax, [ebp+var_99]
test	eax, eax
jz	short loc_48C364
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_48C364
jmp	short loc_48C30E

loc_48C364:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_48C39E
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_490380
jmp	short loc_48C3C6

loc_48C39E:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4]
push	edx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_490320

loc_48C3C6:
mov	esp, ebp
pop	ebp
retn	8
sub_48C2E0 endp

align 10h


; Attributes: bp-based frame

sub_48C3D0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_5C], ecx
mov	[ebp+var_30], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_5C7D40
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_3C]
setz	al
mov	[ebp+var_5D], al
movzx	ecx, [ebp+var_5D]
test	ecx, ecx
jnz	short loc_48C461
or	[ebp+var_30], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_40], edx
mov	eax, [ebp+var_5C]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_40]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_48C461
mov	[ebp+var_64], 0
jmp	short loc_48C468

loc_48C461:
mov	[ebp+var_64], 1

loc_48C468:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_30]
and	edx, 1
jz	short loc_48C47A
and	[ebp+var_30], 0FFFFFFFEh

loc_48C47A:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_48C52D
mov	[ebp+var_24], 0
cmp	[ebp+var_24], 0
jz	short loc_48C49B
mov	ecx, [ebp+var_24]
call	sub_40AA80

loc_48C49B:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[ebp+var_20], edx
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_18]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+var_44]
cmp	dword ptr [ecx], 0
jz	short loc_48C4C9
mov	edx, [ebp+var_44]
mov	ecx, [edx]
call	sub_40AA80

loc_48C4C9:
lea	eax, [ebp+var_54]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	ecx, [ebp+var_20]
push	ecx
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_54]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_492230
lea	eax, [ebp+var_2C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_18]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
cmp	dword ptr [ecx], 0
jz	short loc_48C51F
mov	edx, [ebp+var_58]
mov	ecx, [edx]
call	sub_40AA90

loc_48C51F:
cmp	[ebp+var_24], 0
jz	short loc_48C52D
mov	ecx, [ebp+var_24]
call	sub_40AA90

loc_48C52D:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_48C3D0 endp

align 10h


; Attributes: bp-based frame

sub_48C540 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0Ah
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4031D0
movzx	eax, ax
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4469A0
mov	ecx, [ebp+arg_0]
call	sub_4047A0
mov	eax, [ebp+arg_0]
pop	ebp
retn
sub_48C540 endp



; Attributes: bp-based frame

sub_48C570 proc	near

var_20=	dword ptr -20h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_48C670
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
push	eax
call	sub_4B6C20
add	esp, 4
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_10], edx
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
lea	eax, [edx+eax*2]
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
lea	ecx, [ebp+var_12]
call	sub_401EF0
mov	[ebp+var_20], eax
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_407690
mov	[ebp+var_4], 0
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4077B0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_12]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_48C570 endp

align 10h


; Attributes: bp-based frame

sub_48C610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 4
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	esp, ebp
pop	ebp
retn
sub_48C610 endp

align 10h


; Attributes: bp-based frame

sub_48C640 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 8
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	edx, [edx+4]
mov	esp, ebp
pop	ebp
retn
sub_48C640 endp

align 10h


; Attributes: bp-based frame

sub_48C670 proc	near

var_24=	dword ptr -24h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_48C670
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
push	eax
call	sub_48C610
add	esp, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	edx, [ebp+var_14]
lea	eax, [ecx+edx*2]
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
lea	ecx, [ebp+var_15]
call	sub_401EF0
mov	[ebp+var_24], eax
mov	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_407690
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4077B0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_15]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_48C670 endp

align 10h


; Attributes: bp-based frame

sub_48C710 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 4
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+var_4]
fld	dword ptr [edx]
mov	esp, ebp
pop	ebp
retn
sub_48C710 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48C740(wchar_t *DstBuf, size_t MaxCount, wchar_t *Format, char)
sub_48C740 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
MaxCount= dword	ptr  0Ch
Format=	dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_C]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
mov	eax, [ebp+MaxCount]
push	eax		; MaxCount
push	80h		; SizeInWords
mov	ecx, [ebp+DstBuf]
push	ecx		; DstBuf
call	__vsnwprintf_s
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_48C740 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48C770(wchar_t *DstBuf, size_t MaxCount, wchar_t *Format, char)
sub_48C770 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
MaxCount= dword	ptr  0Ch
Format=	dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_C]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
mov	eax, [ebp+MaxCount]
push	eax		; MaxCount
push	100h		; SizeInWords
mov	ecx, [ebp+DstBuf]
push	ecx		; DstBuf
call	__vsnwprintf_s
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_48C770 endp

align 10h


; Attributes: bp-based frame

sub_48C7A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 38h
lea	eax, [ebp+var_1]
push	eax
sub	esp, 28h
mov	[ebp+var_14], esp
lea	ecx, [ebp+arg_C]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403400
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	edx, [ebp+arg_0]
push	edx
call	sub_494820
add	esp, 38h
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_48C7A0 endp

align 10h


; Attributes: bp-based frame

sub_48C800 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 48h
jmp	short loc_48C810

loc_48C808:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_48C810:
lea	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_48C861
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_44]
call	?egptr@streambuf@@IBEPADXZ_1 ; streambuf::egptr(void)
cmp	eax, [ebp+arg_C]
jnz	short loc_48C85F
mov	edx, [ebp+var_44]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_10]
call	sub_487D70

loc_48C85F:
jmp	short loc_48C808

loc_48C861:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_10]
mov	[ecx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_48C800 endp

align 10h


; Attributes: bp-based frame

sub_48C880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwolevelinterf ; "LWOLevelInterface"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_4948A0
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1514EC8 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_48C880 endp

align 10h


; Attributes: bp-based frame

sub_48C950 proc	near

var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_4]
call	sub_4046E0
jmp	short loc_48C97B

loc_48C96C:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax

loc_48C97B:
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_20]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_20]
setnz	dl
mov	[ebp+var_21], dl
movzx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_48C9DE
mov	ecx, [ebp+var_4]
mov	edx, [ecx+18h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_48C9D5
push	1
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	ecx, [ebp+var_10]
mov	eax, [edx]
call	eax
mov	[ebp+var_28], eax
jmp	short loc_48C9DC

loc_48C9D5:
mov	[ebp+var_28], 0

loc_48C9DC:
jmp	short loc_48C96C

loc_48C9DE:
mov	ecx, [ebp+arg_0]
call	sub_5935F0
mov	esp, ebp
pop	ebp
retn
sub_48C950 endp

align 10h


; Attributes: bp-based frame

sub_48C9F0 proc	near

var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_4]
call	sub_4046E0
jmp	short loc_48CA13

loc_48CA0B:
lea	eax, [ebp+var_4]
call	sub_405E90

loc_48CA13:
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	edx, [ebp+var_20]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_20]
setnz	cl
mov	[ebp+var_21], cl
movzx	edx, [ebp+var_21]
test	edx, edx
jz	short loc_48CA76
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_48CA6D
push	1
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx]
call	eax
mov	[ebp+var_28], eax
jmp	short loc_48CA74

loc_48CA6D:
mov	[ebp+var_28], 0

loc_48CA74:
jmp	short loc_48CA0B

loc_48CA76:
mov	ecx, [ebp+arg_0]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn
sub_48C9F0 endp

align 10h


; Attributes: bp-based frame

sub_48CA90 proc	near

var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_185= byte ptr -185h
var_184= dword ptr -184h
var_178= dword ptr -178h
var_174= dword ptr -174h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= byte ptr -144h
var_13C= byte ptr -13Ch
var_B0=	dword ptr -0B0h
var_AC=	byte ptr -0ACh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 184h
mov	[ebp+var_184], ecx
mov	[ebp+var_148], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_184]
call	sub_5DE010
mov	[ebp+var_14C], eax
mov	ecx, [ebp+var_14C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_184]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_154]
mov	[ebp+var_150], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_150]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_154]
setz	al
mov	[ebp+var_185], al
movzx	ecx, [ebp+var_185]
test	ecx, ecx
jnz	short loc_48CB6B
or	[ebp+var_148], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_158], edx
mov	eax, [ebp+var_184]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_158]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_48CB6B
mov	[ebp+var_18C], 0
jmp	short loc_48CB75

loc_48CB6B:
mov	[ebp+var_18C], 1

loc_48CB75:
mov	cl, byte ptr [ebp+var_18C]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_148]
and	edx, 1
jz	short loc_48CB9E
and	[ebp+var_148], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_48CB9E:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_48CC50
lea	ecx, [ebp+var_13C]
call	sub_482770
mov	[ebp+var_168], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_168]
push	eax
lea	ecx, [ebp+var_AC]
call	sub_4908E0
lea	ecx, [ebp+var_178]
mov	[ebp+var_16C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_16C]
call	sub_4046E0
lea	edx, [ebp+var_B0]
push	edx
push	ecx
mov	[ebp+var_174], esp
mov	ecx, [ebp+var_178]
mov	eax, [ebp+var_174]
call	sub_4046E0
lea	eax, [ebp+var_144]
push	eax
mov	ecx, [ebp+var_184]
call	sub_491350
lea	ecx, [ebp+var_144]
mov	[ebp+var_190], ecx
mov	edx, [ebp+var_190]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_AC]
call	sub_486880
lea	ecx, [ebp+var_13C]
call	sub_486880

loc_48CC50:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_48CA90 endp

align 10h


; Attributes: bp-based frame

sub_48CC70 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	esp, ebp
pop	ebp
retn	4
sub_48CC70 endp

align 10h


; Attributes: bp-based frame

sub_48CCC0 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_455120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_51], al
movzx	ecx, [ebp+var_51]
test	ecx, ecx
jnz	short loc_48CD51
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_50]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_48CD51
mov	[ebp+var_58], 0
jmp	short loc_48CD58

loc_48CD51:
mov	[ebp+var_58], 1

loc_48CD58:
mov	cl, byte ptr [ebp+var_58]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_48CD72
and	[ebp+var_2C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_48CD72:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_48CDCD
mov	[ebp+var_20], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_50]
call	sub_491B60
lea	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_48CDCD:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_48CCC0 endp

align 10h


; Attributes: bp-based frame

sub_48CDE0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_C]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
call	sub_494910
add	esp, 14h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_48CDE0 endp

align 10h


; Attributes: bp-based frame

sub_48CE40 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_55=	byte ptr -55h
var_54=	byte ptr -54h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	[ebp+var_64], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_90]
call	sub_5DE010
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_90]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_70]
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_6C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_70]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jnz	short loc_48CEFD
or	[ebp+var_64], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_74], edx
mov	eax, [ebp+var_90]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_48CEFD
mov	[ebp+var_98], 0
jmp	short loc_48CF07

loc_48CEFD:
mov	[ebp+var_98], 1

loc_48CF07:
mov	cl, byte ptr [ebp+var_98]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_64]
and	edx, 1
jz	short loc_48CF2A
and	[ebp+var_64], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_48CF2A:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_48CFC9
lea	ecx, [ebp+var_55]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_54]
call	sub_4022A0
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_7C]
push	eax
lea	ecx, [ebp+var_38]
call	sub_403850
lea	ecx, [ebp+var_8C]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
push	ecx
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_88]
call	sub_4046E0
lea	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_90]
call	sub_492B40
lea	ecx, [ebp+var_60]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_38]
call	sub_407910
lea	ecx, [ebp+var_54]
call	sub_407910
lea	ecx, [ebp+var_55]
call	nullsub_1

loc_48CFC9:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_48CE40 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48CFE0(void	*)
sub_48CFE0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48CFE9:
cmp	[ebp+arg_0], 0
jz	short loc_48D02F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48CFE0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_48D027
mov	edx, 1
imul	edx, 14h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48D027:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48CFE9

loc_48D02F:
mov	esp, ebp
pop	ebp
retn	4
sub_48CFE0 endp

align 10h


; Attributes: bp-based frame

sub_48D040 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48D05C:
cmp	[ebp+var_10], 0
jz	short loc_48D0A6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_48D095
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_48D09E

loc_48D095:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_48D09E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_48D05C

loc_48D0A6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_48D148
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_48D139
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B0A60
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_48D1C1
jmp	short loc_48D148

loc_48D139:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48D148:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_48D1A6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B0A60
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_48D1C1

loc_48D1A6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_48D1C1:
mov	esp, ebp
pop	ebp
retn	8
sub_48D040 endp

align 10h


; Attributes: bp-based frame

sub_48D1D0 proc	near

var_15C= dword ptr -15Ch
var_156= byte ptr -156h
var_155= byte ptr -155h
var_154= dword ptr -154h
var_14C= dword ptr -14Ch
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_118= dword ptr -118h
var_110= dword ptr -110h
var_10C= byte ptr -10Ch
var_E4=	byte ptr -0E4h
var_BC=	byte ptr -0BCh
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 15Ch
mov	[ebp+var_154], ecx
mov	[ebp+var_110], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_118]
push	ecx
mov	ecx, [ebp+var_154]
call	sub_49A120
mov	edx, [ebp+var_118]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_124]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_120]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_124]
mov	[ebp+var_14], edx
lea	eax, [ebp+var_140]
mov	[ebp+var_12C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_128], ecx
mov	edx, [ebp+var_12C]
mov	eax, [ebp+var_128]
mov	[edx], eax
lea	ecx, [ebp+var_13C]
mov	[ebp+var_138], ecx
mov	edx, [ebp+var_140]
mov	[ebp+var_134], edx
mov	eax, [ebp+var_138]
mov	ecx, [ebp+var_134]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_13C]
setz	al
mov	[ebp+var_155], al
mov	cl, [ebp+var_155]
mov	[ebp+var_156], cl
movzx	edx, [ebp+var_156]
test	edx, edx
jz	short loc_48D2FF
or	[ebp+var_110], 1
or	[ebp+var_110], 2
lea	ecx, [ebp+var_10C]
call	sub_486AA0
mov	[ebp+var_14C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_94], ecx
mov	[ebp+var_90], edx
mov	eax, [ebp+var_14C]
push	eax
lea	ecx, [ebp+var_8C]
call	sub_4908A0
lea	ecx, [ebp+var_94]
push	ecx
mov	ecx, [ebp+var_154]
call	sub_491990
add	eax, 8
mov	[ebp+var_15C], eax
jmp	short loc_48D30B

loc_48D2FF:
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	[ebp+var_15C], edx

loc_48D30B:
mov	eax, [ebp+var_15C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_110]
and	edx, 2
jz	short loc_48D337
and	[ebp+var_110], 0FFFFFFFDh
lea	ecx, [ebp+var_94]
call	sub_48FFB0

loc_48D337:
mov	eax, [ebp+var_110]
and	eax, 1
jz	short loc_48D36A
and	[ebp+var_110], 0FFFFFFFEh
lea	ecx, [ebp+var_BC]
call	sub_407E50
lea	ecx, [ebp+var_E4]
call	sub_407E50
lea	ecx, [ebp+var_10C]
call	sub_407E50

loc_48D36A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_48D1D0 endp

align 10h


; Attributes: bp-based frame

sub_48D380 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_64], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
call	sub_49D270
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_34]
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_34]
setz	al
mov	[ebp+var_65], al
movzx	ecx, [ebp+var_65]
test	ecx, ecx
jnz	short loc_48D440
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_38], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_3C]
cmp	ecx, [ebp+var_40]
jl	short loc_48D431
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_44]
cmp	eax, [ebp+var_48]
jnz	short loc_48D428
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_4C]
cmp	edx, [ebp+var_50]
jb	short loc_48D431

loc_48D428:
mov	[ebp+var_6C], 0
jmp	short loc_48D438

loc_48D431:
mov	[ebp+var_6C], 1

loc_48D438:
movzx	eax, byte ptr [ebp+var_6C]
test	eax, eax
jz	short loc_48D499

loc_48D440:
mov	[ebp+var_20], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_14], ecx
lea	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_64]
call	sub_493F50
lea	edx, [ebp+var_28]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_48D499:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_48D380 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48D4B0(void	*)
sub_48D4B0 proc	near

var_58=	dword ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx

loc_48D4B9:
cmp	[ebp+arg_0], 0
jz	short loc_48D509
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_58]
call	sub_48D4B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_494E80
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48D501
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48D501:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48D4B9

loc_48D509:
mov	esp, ebp
pop	ebp
retn	4
sub_48D4B0 endp

align 10h


; Attributes: bp-based frame

sub_48D510 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_48D57B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 24h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_48D557
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4950C0
jmp	short loc_48D57B

loc_48D557:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_494EB0

loc_48D57B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_48D510 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48D590(void	*)
sub_48D590 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_48D599:
cmp	[ebp+arg_0], 0
jz	short loc_48D5E9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_48D590
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_495460
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48D5E1
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48D5E1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48D599

loc_48D5E9:
mov	esp, ebp
pop	ebp
retn	4
sub_48D590 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48D5F0(void	*)
sub_48D5F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48D5F9:
cmp	[ebp+arg_0], 0
jz	short loc_48D649
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48D5F0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_495980
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48D641
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48D641:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48D5F9

loc_48D649:
mov	esp, ebp
pop	ebp
retn	4
sub_48D5F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48D650(void	*)
sub_48D650 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48D659:
cmp	[ebp+arg_0], 0
jz	short loc_48D6A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48D650
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_495E70
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48D6A1
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48D6A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48D659

loc_48D6A9:
mov	esp, ebp
pop	ebp
retn	4
sub_48D650 endp

align 10h


; Attributes: bp-based frame

sub_48D6B0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_50F1D0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_479650
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_48D733

loc_48D72A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_48D733:
cmp	[ebp+var_40], 0
jle	short loc_48D75D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_48FB00
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 0Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 0Ch
mov	[ebp+var_3C], eax
jmp	short loc_48D72A

loc_48D75D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_48D784
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_48FB00
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
mov	[ebp+var_C], ecx
jmp	short loc_48D7D9

loc_48D784:
mov	edx, [ebp+arg_C]
imul	edx, 0Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_48D7BB

loc_48D7A9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 0Ch
mov	[ebp+var_68], eax

loc_48D7BB:
cmp	[ebp+var_6C], 0
jle	short loc_48D7D3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_48FB00
add	esp, 8
jmp	short loc_48D7A9

loc_48D7D3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_48D7D9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_48D871
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_48D838

loc_48D82F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_48D838:
cmp	[ebp+var_80], 0
jle	short loc_48D86B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_48FB00
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 0Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 0Ch
mov	[ebp+var_7C], eax
jmp	short loc_48D82F

loc_48D86B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_48D871:
mov	ecx, [ebp+var_CC]
call	sub_490480
mov	edx, [ebp+var_4]
imul	edx, 0Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_48D6B0 endp

align 10h


; Attributes: bp-based frame

sub_48D8C0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	esi
mov	[ebp+var_60], ecx
mov	[ebp+var_34], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_49D390
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_40]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_40]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jnz	short loc_48D958
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_18], eax
or	[ebp+var_34], 1
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_60]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_18]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_48D958
mov	[ebp+var_68], 0
jmp	short loc_48D95F

loc_48D958:
mov	[ebp+var_68], 1

loc_48D95F:
mov	dl, byte ptr [ebp+var_68]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_34]
and	eax, 1
jz	short loc_48D979
and	[ebp+var_34], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_48D979:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_48DA10
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
xor	eax, eax
lea	esi, [ebp+var_24]
call	sub_41DF90
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_20], ecx
lea	edx, [ebp+var_1C]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_48]
cmp	dword ptr [eax], 0
jz	short loc_48D9C2
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
call	sub_40AA80

loc_48D9C2:
lea	edx, [ebp+var_5C]
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	eax, [ebp+var_20]
push	eax
push	ecx
mov	[ebp+var_58], esp
mov	ecx, [ebp+var_5C]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_60]
call	sub_4954A0
lea	edx, [ebp+var_30]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_1C]
call	sub_429100
lea	ecx, [ebp+var_24]
call	sub_429100

loc_48DA10:
mov	eax, [ebp+var_4]
add	eax, 14h
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_48D8C0 endp

align 10h


; Attributes: bp-based frame

sub_48DA20 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	short loc_48DA49
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_7700F0
add	esp, 10h

loc_48DA49:
pop	ebp
retn
sub_48DA20 endp

align 10h


; Attributes: bp-based frame

sub_48DA50 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_60], ecx
mov	[ebp+var_34], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_49D390
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_40]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_40]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jnz	short loc_48DAE7
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_18], eax
or	[ebp+var_34], 1
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_60]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_18]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_48DAE7
mov	[ebp+var_68], 0
jmp	short loc_48DAEE

loc_48DAE7:
mov	[ebp+var_68], 1

loc_48DAEE:
mov	dl, byte ptr [ebp+var_68]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_34]
and	eax, 1
jz	short loc_48DB08
and	[ebp+var_34], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_48DB08:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_48DBBB
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	[ebp+var_24], 0
cmp	[ebp+var_24], 0
jz	short loc_48DB31
mov	ecx, [ebp+var_24]
call	sub_40AA80

loc_48DB31:
mov	ecx, [ebp+var_28]
mov	[ebp+var_20], ecx
lea	edx, [ebp+var_1C]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_48]
cmp	dword ptr [edx], 0
jz	short loc_48DB57
mov	eax, [ebp+var_48]
mov	ecx, [eax]
call	sub_40AA80

loc_48DB57:
lea	ecx, [ebp+var_58]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	edx, [ebp+var_20]
push	edx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_58]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_60]
call	sub_4954A0
lea	ecx, [ebp+var_30]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_1C]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
cmp	dword ptr [edx], 0
jz	short loc_48DBAD
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
call	sub_40AA90

loc_48DBAD:
cmp	[ebp+var_24], 0
jz	short loc_48DBBB
mov	ecx, [ebp+var_24]
call	sub_40AA90

loc_48DBBB:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_48DA50 endp

align 10h


; Attributes: bp-based frame

sub_48DBD0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
push	esi
mov	[ebp+var_58], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_59], al
movzx	ecx, [ebp+var_59]
test	ecx, ecx
jnz	short loc_48DC62
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_58]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_48DC62
mov	[ebp+var_60], 0
jmp	short loc_48DC69

loc_48DC62:
mov	[ebp+var_60], 1

loc_48DC69:
mov	cl, byte ptr [ebp+var_60]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_48DC83
and	[ebp+var_2C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_48DC83:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_48DD14
xor	eax, eax
lea	esi, [ebp+var_20]
call	sub_41DF90
mov	[ebp+var_44], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_18]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx], 0
jz	short loc_48DCC6
mov	edx, [ebp+var_40]
mov	ecx, [edx]
call	sub_40AA80

loc_48DCC6:
lea	eax, [ebp+var_54]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	ecx, [ebp+var_1C]
push	ecx
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_54]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_58]
call	sub_4954A0
lea	eax, [ebp+var_28]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_18]
call	sub_40ABB0
lea	eax, [ebp+var_20]
call	sub_40ABB0

loc_48DD14:
mov	eax, [ebp+var_4]
add	eax, 14h
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_48DBD0 endp

align 10h


; Attributes: bp-based frame

sub_48DD30 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_34=	byte ptr -34h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_80], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_80]
call	sub_5C9500
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_80]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_81], al
movzx	ecx, [ebp+var_81]
test	ecx, ecx
jnz	short loc_48DDC9
or	[ebp+var_4C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_80]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_48DDC9
mov	[ebp+var_88], 0
jmp	short loc_48DDD3

loc_48DDC9:
mov	[ebp+var_88], 1

loc_48DDD3:
mov	al, byte ptr [ebp+var_88]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_48DDF0
and	[ebp+var_4C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_48DDF0:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_48DE89
lea	eax, [ebp+var_3D]
call	nullsub_1
lea	eax, [ebp+var_3C]
push	eax
call	sub_409500
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_403850
mov	edx, [ebp+var_6C]
push	edx
lea	ecx, [ebp+var_1C]
call	sub_470AD0
lea	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
push	ecx
mov	[ebp+var_78], esp
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+var_78]
call	sub_4046E0
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_80]
call	sub_4959B0
lea	eax, [ebp+var_48]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_1C]
call	sub_409540
lea	ecx, [ebp+var_34]
call	sub_407910
lea	ecx, [ebp+var_3C]
call	sub_409540
call	nullsub_1

loc_48DE89:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_48DD30 endp

align 10h


; Attributes: bp-based frame

sub_48DEA0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_58], ecx
mov	[ebp+var_34], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_58]
call	sub_451E00
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_40]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_40]
setz	al
mov	[ebp+var_59], al
movzx	ecx, [ebp+var_59]
test	ecx, ecx
jnz	short loc_48DF37
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_18], eax
or	[ebp+var_34], 1
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_58]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_18]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_48DF37
mov	[ebp+var_60], 0
jmp	short loc_48DF3E

loc_48DF37:
mov	[ebp+var_60], 1

loc_48DF3E:
mov	dl, byte ptr [ebp+var_60]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_34]
and	eax, 1
jz	short loc_48DF58
and	[ebp+var_34], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_48DF58:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_48DFB9
mov	[ebp+var_24], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_54]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	ecx, [ebp+var_20]
push	ecx
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_54]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_58]
call	sub_491B60
lea	eax, [ebp+var_30]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_48DFB9:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_48DEA0 endp

align 10h


; Attributes: bp-based frame

sub_48DFD0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_49D400
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_5D], al
movzx	ecx, [ebp+var_5D]
test	ecx, ecx
jnz	short loc_48E078
or	[ebp+var_38], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_48], edx
lea	eax, [ebp+var_1D]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_444510
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_48]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jnz	short loc_48E078
mov	[ebp+var_64], 0
jmp	short loc_48E07F

loc_48E078:
mov	[ebp+var_64], 1

loc_48E07F:
mov	al, byte ptr [ebp+var_64]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_38]
and	ecx, 1
jz	short loc_48E09F
and	[ebp+var_38], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_48E09F:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_48E0FA
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_24], edx
lea	eax, [ebp+var_58]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	ecx, [ebp+var_28]
push	ecx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_58]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_44A8D0
lea	eax, [ebp+var_34]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx]
mov	[ebp+var_10], edx

loc_48E0FA:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_48DFD0 endp



; Attributes: bp-based frame

sub_48E110 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C8h
mov	[ebp+var_C8], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_5DE010
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_C8]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_C9], al
movzx	ecx, [ebp+var_C9]
test	ecx, ecx
jnz	short loc_48E1CD
or	[ebp+var_4C], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_C8]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_5C]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_48E1CD
mov	[ebp+var_D0], 0
jmp	short loc_48E1D7

loc_48E1CD:
mov	[ebp+var_D0], 1

loc_48E1D7:
mov	cl, byte ptr [ebp+var_D0]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_48E1FA
and	[ebp+var_4C], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_48E1FA:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_48E28D
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
push	0
lea	ecx, [ebp+var_3D]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_489990
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_3C]
push	ecx
lea	ecx, [ebp+var_2C]
call	sub_490AA0
lea	edx, [ebp+var_6C]
mov	[ebp+var_60], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	eax, [ebp+var_30]
push	eax
push	ecx
mov	[ebp+var_68], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_C8]
call	sub_4949B0
lea	edx, [ebp+var_48]
mov	[ebp+var_D4], edx
mov	eax, [ebp+var_D4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_2C]
call	sub_490400
lea	ecx, [ebp+var_3C]
call	sub_490400

loc_48E28D:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_48E110 endp

align 10h


; Attributes: bp-based frame

sub_48E2B0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	esi
mov	[ebp+var_60], ecx
mov	[ebp+var_34], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_49D390
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_40]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_40]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jnz	short loc_48E348
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_18], eax
or	[ebp+var_34], 1
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_60]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_18]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_48E348
mov	[ebp+var_68], 0
jmp	short loc_48E34F

loc_48E348:
mov	[ebp+var_68], 1

loc_48E34F:
mov	dl, byte ptr [ebp+var_68]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_34]
and	eax, 1
jz	short loc_48E369
and	[ebp+var_34], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_48E369:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_48E400
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
xor	eax, eax
lea	esi, [ebp+var_24]
call	sub_41DF90
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_20], ecx
lea	edx, [ebp+var_1C]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_48]
cmp	dword ptr [eax], 0
jz	short loc_48E3B2
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
call	sub_40AA80

loc_48E3B2:
lea	edx, [ebp+var_5C]
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	eax, [ebp+var_20]
push	eax
push	ecx
mov	[ebp+var_58], esp
mov	ecx, [ebp+var_5C]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_60]
call	sub_4954A0
lea	edx, [ebp+var_30]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	eax, [ebp+var_1C]
call	sub_40ABB0
lea	eax, [ebp+var_24]
call	sub_40ABB0

loc_48E400:
mov	eax, [ebp+var_4]
add	eax, 14h
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_48E2B0 endp

align 10h


; Attributes: bp-based frame

sub_48E410 proc	near

var_48=	dword ptr -48h
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
cmp	[ebp+arg_4], 0
jz	short loc_48E47B
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_48]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 18h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_48E457
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_48]
call	sub_496850
jmp	short loc_48E47B

loc_48E457:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_48]
call	sub_490B50

loc_48E47B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_48E410 endp

align 10h


; Attributes: bp-based frame

sub_48E490 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_490500
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_489E30
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_48E506

loc_48E4F4:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 2
mov	[ebp+var_38], ecx

loc_48E506:
cmp	[ebp+var_3C], 0
jbe	short loc_48E51A
mov	edx, [ebp+var_38]
mov	eax, [ebp+arg_4]
mov	cx, [eax]
mov	[edx], cx
jmp	short loc_48E4F4

loc_48E51A:
mov	edx, [ebp+var_38]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_48E545
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_48E545:
mov	ecx, [ebp+var_9C]
call	sub_4905D0
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*2]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_98]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_48E490 endp

align 10h


; Attributes: bp-based frame

sub_48E590 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_48E5F0
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 1
cmp	edx, [ebp+arg_4]
jb	short loc_48E5D1
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4969B0
jmp	short loc_48E5F0

loc_48E5D1:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_48E490

loc_48E5F0:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_48E590 endp

align 10h


; Attributes: bp-based frame

sub_48E600 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_490640
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_4907A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_48E676

loc_48E664:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 0Eh
mov	[ebp+var_38], ecx

loc_48E676:
cmp	[ebp+var_3C], 0
jbe	short loc_48E69C
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	dx, [edx+0Ch]
mov	[eax+0Ch], dx
jmp	short loc_48E664

loc_48E69C:
mov	eax, [ebp+var_38]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_48E6C7
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_48E6C7:
mov	ecx, [ebp+var_9C]
call	sub_490720
mov	eax, [ebp+var_4]
imul	eax, 0Eh
add	eax, [ebp+var_8]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_48E600 endp

align 10h


; Attributes: bp-based frame

sub_48E710 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4E=	byte ptr -4Eh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48E72C:
cmp	[ebp+var_10], 0
jz	short loc_48E7A1
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_48E765
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setl	dl
mov	[ebp+var_36], dl
jmp	short loc_48E777
jmp	short loc_48E777

loc_48E765:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_34]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_36], al

loc_48E777:
mov	cl, [ebp+var_36]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_48E790
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_5C], ecx
jmp	short loc_48E799

loc_48E790:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_5C], eax

loc_48E799:
mov	ecx, [ebp+var_5C]
mov	[ebp+var_10], ecx
jmp	short loc_48E72C

loc_48E7A1:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_48E843
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_5D], cl
movzx	edx, [ebp+var_5D]
test	edx, edx
jz	short loc_48E834
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_496B80
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_48E8E7
jmp	short loc_48E843

loc_48E834:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48E843:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_48E870
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_4E], al
jmp	short loc_48E882
jmp	short loc_48E882

loc_48E870:
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_4E], cl

loc_48E882:
mov	dl, [ebp+var_4E]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_48E8CC
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_496B80
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_48E8E7

loc_48E8CC:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_48E8E7:
mov	esp, ebp
pop	ebp
retn	8
sub_48E710 endp

align 10h


; Attributes: bp-based frame

sub_48E8F0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_60], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_49D4A0
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jnz	short loc_48E9A9
or	[ebp+var_38], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_60]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_48E986
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setl	dl
mov	[ebp+var_49], dl
jmp	short loc_48E998
jmp	short loc_48E998

loc_48E986:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_48]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_49], al

loc_48E998:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jnz	short loc_48E9A9
mov	[ebp+var_68], 0
jmp	short loc_48E9B0

loc_48E9A9:
mov	[ebp+var_68], 1

loc_48E9B0:
mov	dl, byte ptr [ebp+var_68]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_38]
and	eax, 1
jz	short loc_48E9C2
and	[ebp+var_38], 0FFFFFFFEh

loc_48E9C2:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_48EA30
mov	[ebp+var_2C], 0FFFFFFFFh
mov	[ebp+var_28], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_24], eax
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[ebp+var_1C], edx
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_5C]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_24]
push	edx
push	ecx
mov	[ebp+var_58], esp
mov	ecx, [ebp+var_5C]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_60]
call	sub_496020
lea	ecx, [ebp+var_34]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_48EA30:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_48E8F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48EA40(void	*)
sub_48EA40 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48EA49:
cmp	[ebp+arg_0], 0
jz	short loc_48EA8F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48EA40
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_48EA87
mov	edx, 1
imul	edx, 24h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48EA87:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48EA49

loc_48EA8F:
mov	esp, ebp
pop	ebp
retn	4
sub_48EA40 endp

align 10h


; Attributes: bp-based frame

sub_48EAA0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4E=	byte ptr -4Eh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48EABC:
cmp	[ebp+var_10], 0
jz	short loc_48EB31
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_48EAF5
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setl	dl
mov	[ebp+var_36], dl
jmp	short loc_48EB07
jmp	short loc_48EB07

loc_48EAF5:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_34]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_36], al

loc_48EB07:
mov	cl, [ebp+var_36]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_48EB20
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_5C], ecx
jmp	short loc_48EB29

loc_48EB20:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_5C], eax

loc_48EB29:
mov	ecx, [ebp+var_5C]
mov	[ebp+var_10], ecx
jmp	short loc_48EABC

loc_48EB31:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_48EBD3
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_5D], cl
movzx	edx, [ebp+var_5D]
test	edx, edx
jz	short loc_48EBC4
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_496DD0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_48EC77
jmp	short loc_48EBD3

loc_48EBC4:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48EBD3:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_48EC00
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_4E], al
jmp	short loc_48EC12
jmp	short loc_48EC12

loc_48EC00:
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_4E], cl

loc_48EC12:
mov	dl, [ebp+var_4E]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_48EC5C
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_496DD0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_48EC77

loc_48EC5C:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_48EC77:
mov	esp, ebp
pop	ebp
retn	8
sub_48EAA0 endp

align 10h


; Attributes: bp-based frame

sub_48EC80 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_28]
call	sub_496F40
mov	esp, ebp
pop	ebp
retn	8
sub_48EC80 endp

align 10h


; Attributes: bp-based frame

sub_48ECC0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4E=	byte ptr -4Eh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_48ECDC:
cmp	[ebp+var_10], 0
jz	short loc_48ED51
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_48ED15
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setl	dl
mov	[ebp+var_36], dl
jmp	short loc_48ED27
jmp	short loc_48ED27

loc_48ED15:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_34]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_36], al

loc_48ED27:
mov	cl, [ebp+var_36]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_48ED40
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_5C], ecx
jmp	short loc_48ED49

loc_48ED40:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_5C], eax

loc_48ED49:
mov	ecx, [ebp+var_5C]
mov	[ebp+var_10], ecx
jmp	short loc_48ECDC

loc_48ED51:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_48EDF3
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_5D], cl
movzx	edx, [ebp+var_5D]
test	edx, edx
jz	short loc_48EDE4
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_495EB0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_48EE97
jmp	short loc_48EDF3

loc_48EDE4:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_48EDF3:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_48EE20
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_4E], al
jmp	short loc_48EE32
jmp	short loc_48EE32

loc_48EE20:
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_4E], cl

loc_48EE32:
mov	dl, [ebp+var_4E]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_48EE7C
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_495EB0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_48EE97

loc_48EE7C:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_48EE97:
mov	esp, ebp
pop	ebp
retn	8
sub_48ECC0 endp

align 10h


; Attributes: bp-based frame

sub_48EEA0 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_48EEB1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_48EEF9
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
push	0
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_49C540
cmp	[ebp+var_8], 0
jz	short loc_48EEF7
mov	ecx, 1
imul	ecx, 88h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_48EEF7:
jmp	short loc_48EEB1

loc_48EEF9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_48EEA0 endp

align 10h


; Attributes: bp-based frame

sub_48EF10 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_48EF21:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_48EF66
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
push	0
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_49C590
cmp	[ebp+var_8], 0
jz	short loc_48EF64
mov	ecx, 1
imul	ecx, 44h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_48EF64:
jmp	short loc_48EF21

loc_48EF66:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_48EF10 endp

align 10h


; Attributes: bp-based frame

sub_48EF80 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_74=	dword ptr -74h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
cmp	eax, [ebp+arg_0]
jz	loc_48F10A
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_48EFE0:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_99], cl
movzx	edx, [ebp+var_99]
test	edx, edx
jz	short loc_48F06F
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_48F06F
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_48FFF0
jmp	loc_48EFE0

loc_48F06F:
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_10]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_48F0B0
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_98]
call	sub_490820
jmp	short loc_48F10A

loc_48F0B0:
lea	eax, [ebp+var_8C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	ecx, [ebp+var_10]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_90], edx
xor	eax, eax
mov	[ebp+var_69], al
lea	ecx, [ebp+var_69]
push	ecx
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_90]
push	eax
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_49B750

loc_48F10A:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_48EF80 endp

align 10h


; Attributes: bp-based frame

sub_48F120 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8Ch
mov	[ebp+var_8C], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_5DE010
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_6C]
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_6C]
setz	al
mov	[ebp+var_8D], al
movzx	ecx, [ebp+var_8D]
test	ecx, ecx
jnz	short loc_48F1DD
or	[ebp+var_60], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_8C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_70]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_48F1DD
mov	[ebp+var_94], 0
jmp	short loc_48F1E7

loc_48F1DD:
mov	[ebp+var_94], 1

loc_48F1E7:
mov	cl, byte ptr [ebp+var_94]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_60]
and	edx, 1
jz	short loc_48F20A
and	[ebp+var_60], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_48F20A:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_48F2B4
lea	ecx, [ebp+var_54]
call	sub_107BC20
mov	[ebp+var_74], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_74]
push	eax
lea	ecx, [ebp+var_38]
call	sub_4909A0
lea	ecx, [ebp+var_84]
mov	[ebp+var_78], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_78]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
push	ecx
mov	[ebp+var_80], esp
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_80]
call	sub_4046E0
lea	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_493A80
lea	ecx, [ebp+var_5C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_38]
mov	[ebp+var_88], ecx
mov	ecx, [ebp+var_88]
add	ecx, 10h
call	sub_48EF10
mov	ecx, [ebp+var_88]
call	sub_429300
lea	ecx, [ebp+var_44]
call	sub_48EF10
lea	ecx, [ebp+var_54]
call	sub_429300

loc_48F2B4:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_48F120 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48F2D0(void	*)
sub_48F2D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48F2D9:
cmp	[ebp+arg_0], 0
jz	short loc_48F329
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48F2D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4974A0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48F321
mov	edx, 1
imul	edx, 68h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48F321:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48F2D9

loc_48F329:
mov	esp, ebp
pop	ebp
retn	4
sub_48F2D0 endp

align 10h


; Attributes: bp-based frame

sub_48F330 proc	near

var_148= dword ptr -148h
var_144= dword ptr -144h
var_13D= byte ptr -13Dh
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	byte ptr -0FCh
var_F1=	byte ptr -0F1h
var_F0=	byte ptr -0F0h
var_C8=	byte ptr -0C8h
var_C0=	byte ptr -0C0h
var_98=	byte ptr -98h
var_70=	byte ptr -70h
var_68=	byte ptr -68h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 148h
mov	[ebp+var_13C], ecx
mov	[ebp+var_100], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_13C]
call	sub_49D5C0
mov	[ebp+var_104], eax
mov	ecx, [ebp+var_104]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_13C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_10C]
mov	[ebp+var_108], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_108]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_10C]
setz	al
mov	[ebp+var_13D], al
movzx	ecx, [ebp+var_13D]
test	ecx, ecx
jnz	short loc_48F41B
or	[ebp+var_100], 1
lea	ecx, [ebp+var_3D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_3C]
call	sub_407810
or	[ebp+var_100], 2
or	[ebp+var_100], 4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_110], eax
mov	ecx, [ebp+var_13C]
mov	dl, [ecx+14h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_110]
push	eax
lea	ecx, [ebp+var_3C]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_48F41B
mov	[ebp+var_144], 0
jmp	short loc_48F425

loc_48F41B:
mov	[ebp+var_144], 1

loc_48F425:
mov	al, byte ptr [ebp+var_144]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_100]
and	ecx, 4
jz	short loc_48F445
and	[ebp+var_100], 0FFFFFFFBh
call	nullsub_1

loc_48F445:
mov	edx, [ebp+var_100]
and	edx, 2
jz	short loc_48F45F
and	[ebp+var_100], 0FFFFFFFDh
lea	ecx, [ebp+var_3C]
call	sub_407E50

loc_48F45F:
mov	eax, [ebp+var_100]
and	eax, 1
jz	short loc_48F479
and	[ebp+var_100], 0FFFFFFFEh
lea	ecx, [ebp+var_3D]
call	nullsub_1

loc_48F479:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_48F59C
lea	ecx, [ebp+var_F1]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_F0]
call	sub_407810
lea	ecx, [ebp+var_C8]
call	sub_1072EE0
mov	[ebp+var_128], eax
lea	eax, [ebp+var_F0]
push	eax
lea	ecx, [ebp+var_98]
call	sub_403400
lea	ecx, [ebp+var_70]
mov	[ebp+var_124], ecx
mov	edx, [ebp+var_124]
mov	eax, [ebp+var_128]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_124]
mov	eax, [ebp+var_128]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_128]
add	edx, 8
push	edx
mov	ecx, [ebp+var_124]
add	ecx, 8
call	sub_403400
lea	eax, [ebp+var_138]
mov	[ebp+var_12C], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_12C]
call	sub_4046E0
lea	ecx, [ebp+var_98]
push	ecx
push	ecx
mov	[ebp+var_134], esp
mov	ecx, [ebp+var_138]
mov	eax, [ebp+var_134]
call	sub_4046E0
lea	edx, [ebp+var_FC]
push	edx
mov	ecx, [ebp+var_13C]
call	sub_496FA0
lea	eax, [ebp+var_FC]
mov	[ebp+var_148], eax
mov	ecx, [ebp+var_148]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_68]
call	sub_407E50
lea	ecx, [ebp+var_98]
call	sub_407E50
lea	ecx, [ebp+var_C0]
call	sub_407E50
lea	ecx, [ebp+var_F0]
call	sub_407E50
lea	ecx, [ebp+var_F1]
call	nullsub_1

loc_48F59C:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_48F330 endp

align 10h


; Attributes: bp-based frame

sub_48F5B0 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DD=	byte ptr -0DDh
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	byte ptr -0A4h
var_99=	byte ptr -99h
var_98=	byte ptr -98h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0E8h
mov	[ebp+var_DC], ecx
mov	[ebp+var_A8], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_49D5C0
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_AC]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_DC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_B4]
mov	[ebp+var_B0], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_B0]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_B4]
setz	al
mov	[ebp+var_DD], al
movzx	ecx, [ebp+var_DD]
test	ecx, ecx
jnz	short loc_48F69B
or	[ebp+var_A8], 1
lea	ecx, [ebp+var_3D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_3C]
call	sub_407810
or	[ebp+var_A8], 2
or	[ebp+var_A8], 4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_DC]
mov	dl, [ecx+14h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_B8]
push	eax
lea	ecx, [ebp+var_3C]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_48F69B
mov	[ebp+var_E4], 0
jmp	short loc_48F6A5

loc_48F69B:
mov	[ebp+var_E4], 1

loc_48F6A5:
mov	al, byte ptr [ebp+var_E4]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_A8]
and	ecx, 4
jz	short loc_48F6C5
and	[ebp+var_A8], 0FFFFFFFBh
call	nullsub_1

loc_48F6C5:
mov	edx, [ebp+var_A8]
and	edx, 2
jz	short loc_48F6DF
and	[ebp+var_A8], 0FFFFFFFDh
lea	ecx, [ebp+var_3C]
call	sub_407E50

loc_48F6DF:
mov	eax, [ebp+var_A8]
and	eax, 1
jz	short loc_48F6F9
and	[ebp+var_A8], 0FFFFFFFEh
lea	ecx, [ebp+var_3D]
call	nullsub_1

loc_48F6F9:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_48F7B9
mov	[ebp+var_70], 0
lea	ecx, [ebp+var_99]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_98]
call	sub_407810
lea	eax, [ebp+var_98]
push	eax
lea	ecx, [ebp+var_6C]
call	sub_403400
mov	ecx, [ebp+var_70]
mov	[ebp+var_44], ecx
lea	edx, [ebp+var_D8]
mov	[ebp+var_CC], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_CC]
call	sub_4046E0
lea	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_D4], esp
mov	ecx, [ebp+var_D8]
mov	eax, [ebp+var_D4]
call	sub_4046E0
lea	ecx, [ebp+var_A4]
push	ecx
mov	ecx, [ebp+var_DC]
call	sub_4974E0
lea	edx, [ebp+var_A4]
mov	[ebp+var_E8], edx
mov	eax, [ebp+var_E8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_6C]
call	sub_407E50
lea	ecx, [ebp+var_98]
call	sub_407E50
lea	ecx, [ebp+var_99]
call	nullsub_1

loc_48F7B9:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_48F5B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_48F7D0(void	*)
sub_48F7D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_48F7D9:
cmp	[ebp+arg_0], 0
jz	short loc_48F829
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_48F7D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_51B120
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_48F821
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_48F821:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_48F7D9

loc_48F829:
mov	esp, ebp
pop	ebp
retn	4
sub_48F7D0 endp

align 10h


; Attributes: bp-based frame

sub_48F830 proc	near

var_104= dword ptr -104h
var_100= dword ptr -100h
var_F9=	byte ptr -0F9h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	byte ptr -0BCh
var_B1=	byte ptr -0B1h
var_B0=	byte ptr -0B0h
var_88=	byte ptr -88h
var_78=	byte ptr -78h
var_50=	byte ptr -50h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 104h
mov	[ebp+var_F8], ecx
mov	[ebp+var_C0], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_F8]
call	sub_49D5C0
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_F8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_CC]
mov	[ebp+var_C8], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_C8]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_CC]
setz	al
mov	[ebp+var_F9], al
movzx	ecx, [ebp+var_F9]
test	ecx, ecx
jnz	short loc_48F91B
or	[ebp+var_C0], 1
lea	ecx, [ebp+var_3D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_3C]
call	sub_407810
or	[ebp+var_C0], 2
or	[ebp+var_C0], 4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_F8]
mov	dl, [ecx+14h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_D0]
push	eax
lea	ecx, [ebp+var_3C]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_48F91B
mov	[ebp+var_100], 0
jmp	short loc_48F925

loc_48F91B:
mov	[ebp+var_100], 1

loc_48F925:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C0]
and	ecx, 4
jz	short loc_48F945
and	[ebp+var_C0], 0FFFFFFFBh
call	nullsub_1

loc_48F945:
mov	edx, [ebp+var_C0]
and	edx, 2
jz	short loc_48F95F
and	[ebp+var_C0], 0FFFFFFFDh
lea	ecx, [ebp+var_3C]
call	sub_407E50

loc_48F95F:
mov	eax, [ebp+var_C0]
and	eax, 1
jz	short loc_48F979
and	[ebp+var_C0], 0FFFFFFFEh
lea	ecx, [ebp+var_3D]
call	nullsub_1

loc_48F979:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_48FA5C
lea	ecx, [ebp+var_B1]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_B0]
call	sub_407810
lea	ecx, [ebp+var_88]
call	sub_1063B90
mov	[ebp+var_E4], eax
lea	eax, [ebp+var_B0]
push	eax
lea	ecx, [ebp+var_78]
call	sub_403400
mov	ecx, [ebp+var_E4]
lea	edx, [ebp+var_50]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_F4]
mov	[ebp+var_E8], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_E8]
call	sub_4046E0
lea	eax, [ebp+var_78]
push	eax
push	ecx
mov	[ebp+var_F0], esp
mov	ecx, [ebp+var_F4]
mov	eax, [ebp+var_F0]
call	sub_4046E0
lea	ecx, [ebp+var_BC]
push	ecx
mov	ecx, [ebp+var_F8]
call	sub_4979E0
lea	edx, [ebp+var_BC]
mov	[ebp+var_104], edx
mov	eax, [ebp+var_104]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_78]
call	sub_407E50
lea	ecx, [ebp+var_B0]
call	sub_407E50
lea	ecx, [ebp+var_B1]
call	nullsub_1

loc_48FA5C:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_48F830 endp

align 10h


; Attributes: bp-based frame

sub_48FA70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_497EE0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_48FA70 endp

align 10h


; Attributes: bp-based frame

sub_48FAA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_497F20
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_48FAA0 endp

align 10h


; Attributes: bp-based frame

sub_48FAD0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_1087DA0
xor	ecx, ecx
and	ecx, 1
jz	short loc_48FAF9
push	148h
mov	edx, [ebp+arg_0]
push	edx
call	sub_1111040
add	esp, 8

loc_48FAF9:
mov	esp, ebp
pop	ebp
retn
sub_48FAD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FB00(void *, int)
sub_48FB00 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_48FB44
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4987D0
mov	[ebp+var_10], eax
jmp	short loc_48FB4B

loc_48FB44:
mov	[ebp+var_10], 0

loc_48FB4B:
mov	esp, ebp
pop	ebp
retn
sub_48FB00 endp

align 10h


; Attributes: bp-based frame

sub_48FB50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_497F60
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_48FB50 endp

align 10h


; Attributes: bp-based frame

sub_48FB80 proc	near

var_14=	word ptr -14h
var_12=	word ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*2]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 1
mov	[ebp+var_10], ecx
jmp	short loc_48FBB7

loc_48FBA5:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
add	eax, 2
mov	[ebp+var_C], eax

loc_48FBB7:
cmp	[ebp+var_10], 0
jle	short loc_48FBE1
xor	ecx, ecx
mov	byte ptr [ebp+var_14+1], cl
mov	dl, byte ptr [ebp+var_14+1]
mov	byte ptr [ebp+var_12+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_14], al
mov	cl, byte ptr [ebp+var_14]
mov	byte ptr [ebp+var_12], cl
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_8]
mov	cx, [eax]
mov	[edx], cx
jmp	short loc_48FBA5

loc_48FBE1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_48FB80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FBF0(void *, int)
sub_48FBF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Eh		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_48FC49
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	dx, [edx+0Ch]
mov	[eax+0Ch], dx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_48FC50

loc_48FC49:
mov	[ebp+var_C], 0

loc_48FC50:
mov	esp, ebp
pop	ebp
retn
sub_48FBF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FC60(void *)
sub_48FC60 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_48EF10
mov	ecx, [ebp+var_8]
call	sub_429300
xor	edx, edx
and	edx, 1
jz	short loc_48FC9A
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_48FC9A:
mov	esp, ebp
pop	ebp
retn
sub_48FC60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FCA0(void *)
sub_48FCA0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_486880
xor	ecx, ecx
and	ecx, 1
jz	short loc_48FCC9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_48FCC9:
mov	esp, ebp
pop	ebp
retn
sub_48FCA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FCD0(void *)
sub_48FCD0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_48FCF6
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA90

loc_48FCF6:
xor	ecx, ecx
and	ecx, 1
jz	short loc_48FD09
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_48FD09:
mov	esp, ebp
pop	ebp
retn
sub_48FCD0 endp

align 10h


; Attributes: bp-based frame

sub_48FD10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_48FD3E

loc_48FD35:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_48FD3E:
cmp	[ebp+var_8], 0
jle	short loc_48FD76
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_10]
call	sub_4023E0
mov	ecx, [ebp+var_C]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_4023E0
mov	edx, [ebp+var_C]
add	edx, 50h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, 50h
mov	[ebp+var_10], eax
jmp	short loc_48FD35

loc_48FD76:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_48FD10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FD80(void *)
sub_48FD80 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_5021C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_48FDA4
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_48FDA4:
mov	esp, ebp
pop	ebp
retn
sub_48FD80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FDB0(void *, int)
sub_48FDB0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_48FE0F
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4991B0
mov	ecx, [ebp+var_8]
mov	[ebp+var_40], ecx
jmp	short loc_48FE16

loc_48FE0F:
mov	[ebp+var_40], 0

loc_48FE16:
mov	esp, ebp
pop	ebp
retn
sub_48FDB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FE20(void *, int)
sub_48FE20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	80h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_48FE67
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4989A0
mov	[ebp+var_C], eax
jmp	short loc_48FE6E

loc_48FE67:
mov	[ebp+var_C], 0

loc_48FE6E:
mov	esp, ebp
pop	ebp
retn
sub_48FE20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_48FE80(void *, int)
sub_48FE80 proc	near

var_A4=	dword ptr -0A4h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A4h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	3Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_48FECA
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_498A00
mov	[ebp+var_A4], eax
jmp	short loc_48FED4

loc_48FECA:
mov	[ebp+var_A4], 0

loc_48FED4:
mov	esp, ebp
pop	ebp
retn
sub_48FE80 endp

align 10h


; Attributes: bp-based frame

sub_48FEE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
jmp	short loc_48FEFB

loc_48FEF2:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_48FEFB:
cmp	[ebp+var_4], 2
jnb	short loc_48FF25
mov	ecx, [ebp+var_4]
imul	ecx, 0Ch
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
imul	edx, 0Ch
add	edx, [ebp+var_14]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
jmp	short loc_48FEF2

loc_48FF25:
mov	[ebp+var_8], 0
jmp	short loc_48FF37

loc_48FF2E:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_48FF37:
cmp	[ebp+var_8], 2
jnb	short loc_48FF6F
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*8+18h]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_14]
lea	edx, [ecx+eax*8+18h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
mov	[eax+4], edx
jmp	short loc_48FF2E

loc_48FF6F:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_48FEE0 endp

align 10h


; Attributes: bp-based frame

sub_48FF80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_48FFA4
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_48FFA4:
mov	esp, ebp
pop	ebp
retn
sub_48FF80 endp

align 10h


; Attributes: bp-based frame

sub_48FFB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_48FFB0 endp

align 10h


; Attributes: bp-based frame

sub_48FFF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_497FA0
mov	edx, [ebp+arg_0]
add	edx, 30h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_498180
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_48FFF0 endp

align 10h


; Attributes: bp-based frame

sub_490040 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_490049:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4900A0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_58F630
jmp	short loc_490049

loc_4900A0:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_490040 endp

align 10h


; Attributes: bp-based frame

sub_4900C0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_4900C9:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_490120
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_487350
jmp	short loc_4900C9

loc_490120:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4900C0 endp

align 10h


; Attributes: bp-based frame

sub_490140 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], (offset loc_129E410+2)
mov	[ebp+var_10], (offset loc_129E410+2)
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_49017D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_490183

loc_49017D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_490183:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_490196
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_490196:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], (offset loc_129E410+2)
mov	[ebp+var_1C], (offset loc_129E410+2)
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_4901CC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_4901D2

loc_4901CC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_4901D2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_4901E2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_49020C

loc_4901E2:
mov	[ebp+var_20], (offset loc_129E410+2)
mov	[ebp+var_24], (offset loc_129E410+2)
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_490200
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_490206

loc_490200:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_490206:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_49020C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_490140 endp

align 10h


; Attributes: bp-based frame

sub_490220 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_498650
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_490296
mov	ecx, [ebp+var_4C]
imul	ecx, 0DCh
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_490296:
mov	esp, ebp
pop	ebp
retn
sub_490220 endp

align 10h


; Attributes: bp-based frame

sub_4902A0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_48FAA0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_490313
mov	ecx, [ebp+var_4C]
imul	ecx, 50h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_490313:
mov	esp, ebp
pop	ebp
retn
sub_4902A0 endp

align 10h


; Attributes: bp-based frame

sub_490320 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_3C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
mov	[ebp+var_40], ecx
jmp	short loc_49034B

loc_490342:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_49034B:
cmp	[ebp+var_40], 0
jbe	short loc_490372
mov	eax, [ebp+arg_8]
push	eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_3C]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_44]
call	sub_490DD0
jmp	short loc_490342

loc_490372:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_490320 endp

align 10h


; Attributes: bp-based frame

sub_490380 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_490389:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4903E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_487C30
jmp	short loc_490389

loc_4903E0:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_490380 endp

align 10h


; Attributes: bp-based frame

sub_490400 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_498680
add	esp, 8
mov	edx, [ebp+var_54]
cmp	dword ptr [edx], 0
jz	short loc_490479
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_54]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_490479
mov	ecx, [ebp+var_50]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_490479:
mov	esp, ebp
pop	ebp
retn
sub_490400 endp

align 10h


; Attributes: bp-based frame

sub_490480 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_498680
add	esp, 8
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_54]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_4904F3
mov	ecx, [ebp+var_50]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4904F3:
mov	esp, ebp
pop	ebp
retn
sub_490480 endp

align 10h


; Attributes: bp-based frame

sub_490500 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 1
mov	[ebp+var_8], edx
mov	[ebp+var_C], 7FFFFFFFh
mov	[ebp+var_10], 7FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_490537
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_49053D

loc_490537:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_49053D:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_490550
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_490550:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 7FFFFFFFh
mov	[ebp+var_1C], 7FFFFFFFh
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_490586
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_49058C

loc_490586:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_49058C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_49059C
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_4905C6

loc_49059C:
mov	[ebp+var_20], 7FFFFFFFh
mov	[ebp+var_24], 7FFFFFFFh
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_4905BA
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_4905C0

loc_4905BA:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_4905C0:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_4905C6:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_490500 endp

align 10h


; Attributes: bp-based frame

sub_4905D0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_49063A
mov	ecx, [ebp+var_54]
shl	ecx, 1
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_49063A:
mov	esp, ebp
pop	ebp
retn
sub_4905D0 endp

align 10h


; Attributes: bp-based frame

sub_490640 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Eh
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 12492492h
mov	[ebp+var_10], 12492492h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_49067D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_490683

loc_49067D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_490683:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_490696
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_490696:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 12492492h
mov	[ebp+var_1C], 12492492h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_4906CC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_4906D2

loc_4906CC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_4906D2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_4906E2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_49070C

loc_4906E2:
mov	[ebp+var_20], 12492492h
mov	[ebp+var_24], 12492492h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_490700
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_490706

loc_490700:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_490706:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_49070C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_490640 endp

align 10h


; Attributes: bp-based frame

sub_490720 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Eh
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_490793
mov	ecx, [ebp+var_54]
imul	ecx, 0Eh
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_490793:
mov	esp, ebp
pop	ebp
retn
sub_490720 endp

align 10h


; Attributes: bp-based frame

sub_4907A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 12492492h
jbe	short loc_4907CB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_4907CB:
cmp	[ebp+arg_0], 0
jz	short loc_490802
mov	ecx, [ebp+arg_0]
imul	ecx, 0Eh
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 0Eh
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_490809

loc_490802:
mov	[ebp+var_10], 0

loc_490809:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_4907A0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_490820 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_490829:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_490880
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_490BF0
jmp	short loc_490829

loc_490880:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_490820 endp

align 10h


; Attributes: bp-based frame

sub_4908A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 50h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_403400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4908A0 endp



; Attributes: bp-based frame

sub_4908E0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_68]
mov	[eax], ecx
mov	[eax+4], edx
mov	[ebp+var_C], 3
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_68]
add	edx, 8
mov	[ebp+var_4], edx

loc_490912:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax
js	short loc_49093D
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+var_4]
add	edx, 18h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 18h
mov	[ebp+var_8], eax
jmp	short loc_490912

loc_49093D:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+50h]
mov	eax, [ecx+54h]
mov	ecx, [ebp+var_68]
mov	[ecx+50h], edx
mov	[ecx+54h], eax
mov	edx, [ebp+var_68]
add	edx, 58h
mov	[ebp+var_38], edx
mov	eax, [ebp+arg_0]
add	eax, 58h
push	eax
mov	ecx, [ebp+var_38]
call	sub_490C70
mov	ecx, [ebp+var_68]
add	ecx, 70h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_0]
add	edx, 70h
push	edx
mov	ecx, [ebp+var_64]
call	sub_490C70
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+88h]
mov	[eax+88h], dl
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	4
sub_4908E0 endp

align 10h


; Attributes: bp-based frame

sub_4909A0 proc	near

var_74=	dword ptr -74h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	eax, [ebp+var_74]
mov	dword ptr [eax], offset	off_154EE18
mov	ecx, [ebp+var_74]
mov	dword ptr [ecx+4], 0
push	offset Addend	; lpAddend
call	sub_40AA70
add	esp, 4
mov	edx, [ebp+var_74]
mov	dword ptr [edx], offset	off_156E5C0
mov	eax, [ebp+var_74]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0Ch]
mov	[eax+0Ch], dl
mov	eax, [ebp+var_74]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0Dh]
mov	[eax+0Dh], dl
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_74]
add	ecx, 10h
call	sub_4886B0
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_4909A0 endp

align 10h


; Attributes: bp-based frame

sub_490A20 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp

loc_490A23:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
js	short loc_490A4C
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	[ebp+arg_10]
mov	edx, [ebp+arg_0]
add	edx, [ebp+arg_8]
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_4]
add	eax, [ebp+arg_8]
mov	[ebp+arg_4], eax
jmp	short loc_490A23

loc_490A4C:
pop	ebp
retn	14h
sub_490A20 endp



; Attributes: bp-based frame

sub_490A50 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_490D70
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4986B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_490A50 endp

align 10h


; Attributes: bp-based frame

sub_490AA0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
push	eax
mov	ecx, [ebp+var_44]
call	sub_510260
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_3C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_490B0F

loc_490B06:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_490B0F:
cmp	[ebp+var_2C], 0
jle	short loc_490B39
mov	eax, [ebp+var_3C]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_48FB00
add	esp, 8
mov	edx, [ebp+var_3C]
add	edx, 0Ch
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_28]
add	eax, 0Ch
mov	[ebp+var_28], eax
jmp	short loc_490B06

loc_490B39:
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_44]
mov	esp, ebp
pop	ebp
retn	4
sub_490AA0 endp

align 10h


; Attributes: bp-based frame

sub_490B50 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jb	short loc_490B77
mov	edx, [ebp+var_44]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+4]
jnb	short loc_490B77
mov	[ebp+var_48], 1
jmp	short loc_490B7E

loc_490B77:
mov	[ebp+var_48], 0

loc_490B7E:
movzx	ecx, byte ptr [ebp+var_48]
test	ecx, ecx
jz	short loc_490BBE
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_490E50
xor	eax, eax
mov	[ebp+var_19], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_19]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_44]
call	sub_496640
lea	ecx, [ebp+var_18]
call	sub_5021C0
jmp	short loc_490BE0

loc_490BBE:
xor	eax, eax
mov	[ebp+var_1A], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_1A]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_44]
call	sub_496640

loc_490BE0:
mov	esp, ebp
pop	ebp
retn	14h
sub_490B50 endp

align 10h


; Attributes: bp-based frame

sub_490BF0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
push	0
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_49C590
cmp	[ebp+var_C], 0
jz	short loc_490C4E
mov	ecx, 1
imul	ecx, 44h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_490C4E:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_490BF0 endp

align 10h


; Attributes: bp-based frame

sub_490C70 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_490D57
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_491270
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_490D14:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_490D28
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_490D14

loc_490D28:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_490D3A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_490D4E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_490D3A

loc_490D4E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_490D57:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_490C70 endp

align 10h


; Attributes: bp-based frame

sub_490D70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1999999h
jbe	short loc_490D96
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_490D96:
cmp	[ebp+arg_0], 0
jz	short loc_490DBF
mov	eax, [ebp+arg_0]
imul	eax, 0A0h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_490DC6

loc_490DBF:
mov	[ebp+var_C], 0

loc_490DC6:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_490D70 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_490DD0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_490F50
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
call	sub_498720
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_490DD0 endp

align 10h


; Attributes: bp-based frame

sub_490E50 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_490F37
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_496CF0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_490EF4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_490F08
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_490EF4

loc_490F08:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_490F1A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_490F2E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_490F1A

loc_490F2E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_490F37:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_490E50 endp

align 10h


; Attributes: bp-based frame

sub_490F50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], offset loc_C30C30
jbe	short loc_490F76
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_490F76:
cmp	[ebp+arg_0], 0
jz	short loc_490F9F
mov	eax, [ebp+arg_0]
imul	eax, 150h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_490FA6

loc_490F9F:
mov	[ebp+var_C], 0

loc_490FA6:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_490F50 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

; int __cdecl sub_490FB0(int, double)
sub_490FB0 proc	near

var_50=	qword ptr -50h
var_42=	word ptr -42h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
push	esi
mov	eax, [ebp+arg_0]
lea	esi, [ebp+var_8]
call	sub_404710
mov	[ebp+var_9], 1
lea	eax, [ebp+var_8]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_4910CC
cmp	[ebp+arg_0], 0
jnz	short loc_490FE8
mov	[ebp+var_40], 0
jmp	short loc_490FF6

loc_490FE8:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_40], eax

loc_490FF6:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D10
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_18], eax
xor	ecx, ecx
cmp	[ebp+var_28], 0
setnz	cl
mov	byte ptr [ebp+var_14], cl
lea	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_30], eax
mov	[ebp+var_2C], 0
mov	eax, [ebp+var_2C]
push	eax
call	sub_7803C0
add	esp, 4
push	eax
mov	ecx, [ebp+var_30]
call	sub_77FFD0
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_42], ax
mov	eax, [ebp+var_18]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
sub	esp, 8
fld	[ebp+arg_4]
fstp	[esp+50h+var_50]
movzx	edx, [ebp+var_42]
push	edx
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	ecx, [ebp+var_34]
mov	eax, [edx+14h]
call	eax
movzx	ecx, [ebp+var_1C]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_9], cl
lea	ecx, [ebp+var_10]
call	sub_77FF40
xor	edx, edx
jz	short loc_4910CC
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360

loc_4910CC:
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_4910E6
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_4910E6:
mov	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_8]
call	sub_404730
mov	eax, [ebp+var_24]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_490FB0 endp

align 10h


; Attributes: bp-based frame

sub_491100 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_491147
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498A70
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_491224

loc_491147:
cmp	[ebp+arg_10], 0
jnz	short loc_4911A9
cmp	[ebp+arg_C], 0
jnz	short loc_4911A0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_491191
jb	short loc_491188
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_491191

loc_491188:
mov	[ebp+var_3C], 1
jmp	short loc_491198

loc_491191:
mov	[ebp+var_3C], 0

loc_491198:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_4911A9

loc_4911A0:
mov	[ebp+var_40], 1
jmp	short loc_4911B0

loc_4911A9:
mov	[ebp+var_40], 0

loc_4911B0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_4911C2
and	[ebp+var_C], 0FFFFFFFEh

loc_4911C2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_4911F8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498A70
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_4911F6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_4911F6:
jmp	short loc_491224

loc_4911F8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498A70
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_491224
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_491224:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_491100 endp

align 10h


; Attributes: bp-based frame

sub_491270 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_498A70
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_4912C6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_491270
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_4912C6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_4912D5:
cmp	[ebp+arg_0], 0
jz	short loc_491342
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_498A70
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_491331
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_491270
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_491331:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_4912D5

loc_491342:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_491270 endp

align 10h


; Attributes: bp-based frame

sub_491350 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_49152D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4913B9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499490
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_491813

loc_4913B9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_491405
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	loc_491813
jmp	loc_491528

loc_491405:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_49143A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_491813

loc_49143A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_491484
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	loc_491813

loc_491484:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4914FD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4914D6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	loc_491813
jmp	short loc_4914FB

loc_4914D6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	loc_491813

loc_4914FB:
jmp	short loc_491528

loc_4914FD:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499490
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_491813

loc_491528:
jmp	loc_491813

loc_49152D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4915C1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_491591
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	loc_491813
jmp	short loc_4915BC

loc_491591:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499490
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_491813

loc_4915BC:
jmp	loc_491813

loc_4915C1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_491631
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_491631
mov	[ebp+var_A4], 1
jmp	short loc_49163B

loc_491631:
mov	[ebp+var_A4], 0

loc_49163B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_491650
and	[ebp+var_4C], 0FFFFFFFEh

loc_491650:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4916B2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_491688
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	loc_491813
jmp	short loc_4916AD

loc_491688:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	loc_491813

loc_4916AD:
jmp	loc_491813

loc_4916B2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_491702
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_491702:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_491751
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_491751
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_491745
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_491751

loc_491745:
mov	[ebp+var_A8], 1
jmp	short loc_49175B

loc_491751:
mov	[ebp+var_A8], 0

loc_49175B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_491770
and	[ebp+var_4C], 0FFFFFFFDh

loc_491770:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_4917C9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4917A5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	short loc_491813
jmp	short loc_4917C7

loc_4917A5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499350
mov	eax, [ebp+arg_0]
jmp	short loc_491813

loc_4917C7:
jmp	short loc_491813

loc_4917C9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_4917E7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_491813
jmp	short loc_491813

loc_4917E7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499490
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_491813:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_491350 endp

align 10h


; Attributes: bp-based frame

sub_491820 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_491867
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498F30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49191A

loc_491867:
cmp	[ebp+arg_10], 0
jnz	short loc_49189F
cmp	[ebp+arg_C], 0
jnz	short loc_491896
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_49189F

loc_491896:
mov	[ebp+var_34], 1
jmp	short loc_4918A6

loc_49189F:
mov	[ebp+var_34], 0

loc_4918A6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4918B8
and	[ebp+var_C], 0FFFFFFFEh

loc_4918B8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_4918EE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_498F30
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4918EC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_4918EC:
jmp	short loc_49191A

loc_4918EE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498F30
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_49191A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_49191A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_491820 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_491960(void *)
sub_491960 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_48FFB0
xor	ecx, ecx
and	ecx, 1
jz	short loc_491986
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_491986:
mov	esp, ebp
pop	ebp
retn
sub_491960 endp

align 10h


; Attributes: bp-based frame

sub_491990 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_499970
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_499670
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_491990 endp

align 10h


; Attributes: bp-based frame

sub_4919D0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ACD50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
mov	[ebp+var_3C], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_3C]
jnz	short loc_491A2C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_5C6F30
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_491B08

loc_491A2C:
cmp	[ebp+arg_10], 0
jnz	short loc_491A7F
cmp	[ebp+arg_C], 0
jnz	short loc_491A76
or	[ebp+var_18], 1
lea	edx, [ebp+var_25]
mov	[ebp+var_40], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_24], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_24]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_491A7F

loc_491A76:
mov	[ebp+var_44], 1
jmp	short loc_491A86

loc_491A7F:
mov	[ebp+var_44], 0

loc_491A86:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_491AA6
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh

loc_491AA6:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_491ADC
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5C6F30
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_491ADA
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_491ADA:
jmp	short loc_491B08

loc_491ADC:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_5C6F30
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_491B08
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_491B08:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_3C]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_3C]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_3C]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4919D0 endp

align 10h


; Attributes: bp-based frame

sub_491B60 proc	near

var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_49=	byte ptr -49h
var_46=	byte ptr -46h
var_44=	byte ptr -44h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2C=	byte ptr -2Ch
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_491B60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E8h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_491DF1
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_491BDE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_48A7D0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_492215

loc_491BDE:
mov	edx, [ebp+arg_4]
mov	[ebp+var_68], edx
lea	eax, [ebp+var_61]
mov	[ebp+var_D0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_68]
add	ecx, 10h
mov	[ebp+var_60], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_60]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_29], dl
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_491C5D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	loc_492215
jmp	loc_491DEC

loc_491C5D:
mov	edx, [ebp+arg_4]
mov	[ebp+var_74], edx
lea	eax, [ebp+var_6D]
mov	[ebp+var_D4], eax
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_74]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_6C]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_11], dl
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_491CC5
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_492215

loc_491CC5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_CC]
jnz	short loc_491D0F
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	loc_492215

loc_491D0F:
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_79]
mov	[ebp+var_D8], edx
mov	[ebp+var_4], 6
mov	eax, [ebp+var_80]
add	eax, 10h
mov	[ebp+var_78], eax
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_491DBB
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_491D94
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	loc_492215
jmp	short loc_491DB9

loc_491D94:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	loc_492215

loc_491DB9:
jmp	short loc_491DEC

loc_491DBB:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_48A7D0
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_492215

loc_491DEC:
jmp	loc_492215

loc_491DF1:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_491ECD
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx
lea	eax, [ebp+var_89]
mov	[ebp+var_DC], eax
mov	[ebp+var_4], 9
mov	ecx, [ebp+var_90]
add	ecx, 10h
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_88]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_39], dl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_491E97
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	loc_492215
jmp	short loc_491EC8

loc_491E97:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_48A7D0
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_492215

loc_491EC8:
jmp	loc_492215

loc_491ECD:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_A0], ecx
lea	edx, [ebp+var_99]
mov	[ebp+var_E0], edx
mov	[ebp+var_4], 0Ch
mov	eax, [ebp+var_A0]
add	eax, 10h
mov	[ebp+var_98], eax
mov	[ebp+var_4], 0Dh
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_98]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_12], cl
mov	[ebp+var_4], 0Eh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_491FAD
or	[ebp+var_58], 1
mov	eax, [ebp+var_18]
mov	[ebp+var_AC], eax
lea	ecx, [ebp+var_A5]
mov	[ebp+var_E4], ecx
mov	[ebp+var_4], 0Fh
mov	edx, [ebp+var_AC]
add	edx, 10h
mov	[ebp+var_A4], edx
mov	[ebp+var_4], 10h
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_491FAD
mov	[ebp+var_E8], 1
jmp	short loc_491FB7

loc_491FAD:
mov	[ebp+var_E8], 0

loc_491FB7:
mov	dl, byte ptr [ebp+var_E8]
mov	[ebp+var_46], dl
mov	eax, [ebp+var_58]
and	eax, 1
jz	short loc_491FDA
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 11h
mov	[ebp+var_4], 0FFFFFFFFh

loc_491FDA:
movzx	ecx, [ebp+var_46]
test	ecx, ecx
jz	short loc_49203C
mov	edx, [ebp+var_18]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_492012
mov	eax, [ebp+var_18]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	loc_492215
jmp	short loc_492037

loc_492012:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	loc_492215

loc_492037:
jmp	loc_492215

loc_49203C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	edx, [ebp+var_1C]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	eax, [ebp+var_12]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	short loc_4920C8
mov	edx, [ebp+arg_4]
mov	[ebp+var_B8], edx
lea	eax, [ebp+var_B1]
mov	[ebp+var_EC], eax
mov	[ebp+var_4], 12h
mov	ecx, [ebp+var_B8]
add	ecx, 10h
mov	[ebp+var_B0], ecx
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_B0]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_1D], dl
mov	[ebp+var_4], 14h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4920C8:
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	short loc_492145
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_492145
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_CC]
jz	short loc_492139
or	[ebp+var_58], 2
mov	eax, [ebp+var_1C]
mov	[ebp+var_C4], eax
lea	ecx, [ebp+var_BD]
mov	[ebp+var_F0], ecx
mov	[ebp+var_4], 15h
mov	edx, [ebp+var_C4]
add	edx, 10h
mov	[ebp+var_BC], edx
mov	[ebp+var_4], 16h
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_BC]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_492145

loc_492139:
mov	[ebp+var_F4], 1
jmp	short loc_49214F

loc_492145:
mov	[ebp+var_F4], 0

loc_49214F:
mov	dl, byte ptr [ebp+var_F4]
mov	[ebp+var_49], dl
mov	eax, [ebp+var_58]
and	eax, 2
jz	short loc_492172
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_492172:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jz	short loc_4921CB
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4921A7
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	short loc_492215
jmp	short loc_4921C9

loc_4921A7:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4919D0
mov	eax, [ebp+arg_0]
jmp	short loc_492215

loc_4921C9:
jmp	short loc_492215

loc_4921CB:
movzx	edx, [ebp+var_12]
movzx	eax, [ebp+var_1D]
cmp	edx, eax
jnz	short loc_4921E9
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_492215
jmp	short loc_492215

loc_4921E9:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_48A7D0
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_492215:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_491B60 endp

align 10h


; Attributes: bp-based frame

sub_492230 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_492410
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_492299
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499B90
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4926FB

loc_492299:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_4922E6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	loc_4926FB
jmp	loc_49240B

loc_4922E6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_49231C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4926FB

loc_49231C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_492366
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	loc_4926FB

loc_492366:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4923E0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4923B9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	loc_4926FB
jmp	short loc_4923DE

loc_4923B9:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	loc_4926FB

loc_4923DE:
jmp	short loc_49240B

loc_4923E0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499B90
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4926FB

loc_49240B:
jmp	loc_4926FB

loc_492410:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4924A5
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_492475
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	loc_4926FB
jmp	short loc_4924A0

loc_492475:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499B90
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4926FB

loc_4924A0:
jmp	loc_4926FB

loc_4924A5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_492517
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_492517
mov	[ebp+var_A4], 1
jmp	short loc_492521

loc_492517:
mov	[ebp+var_A4], 0

loc_492521:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_492536
and	[ebp+var_4C], 0FFFFFFFEh

loc_492536:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_492598
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_49256E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	loc_4926FB
jmp	short loc_492593

loc_49256E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	loc_4926FB

loc_492593:
jmp	loc_4926FB

loc_492598:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4925E9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_4925E9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_492639
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_492639
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_49262D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_492639

loc_49262D:
mov	[ebp+var_A8], 1
jmp	short loc_492643

loc_492639:
mov	[ebp+var_A8], 0

loc_492643:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_492658
and	[ebp+var_4C], 0FFFFFFFDh

loc_492658:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_4926B1
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_49268D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	short loc_4926FB
jmp	short loc_4926AF

loc_49268D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499A50
mov	eax, [ebp+arg_0]
jmp	short loc_4926FB

loc_4926AF:
jmp	short loc_4926FB

loc_4926B1:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_4926CF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4926FB
jmp	short loc_4926FB

loc_4926CF:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499B90
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4926FB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_492230 endp

align 10h


; Attributes: bp-based frame

sub_492710 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_492757
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498AD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_492809

loc_492757:
cmp	[ebp+arg_10], 0
jnz	short loc_49278E
cmp	[ebp+arg_C], 0
jnz	short loc_492785
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_49278E

loc_492785:
mov	[ebp+var_34], 1
jmp	short loc_492795

loc_49278E:
mov	[ebp+var_34], 0

loc_492795:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4927A7
and	[ebp+var_C], 0FFFFFFFEh

loc_4927A7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_4927DD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_498AD0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4927DB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_4927DB:
jmp	short loc_492809

loc_4927DD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498AD0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_492809
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_492809:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_492710 endp

align 10h


; Attributes: bp-based frame

sub_492850 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_492897
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498B20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_492974

loc_492897:
cmp	[ebp+arg_10], 0
jnz	short loc_4928F9
cmp	[ebp+arg_C], 0
jnz	short loc_4928F0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4928E1
jb	short loc_4928D8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4928E1

loc_4928D8:
mov	[ebp+var_3C], 1
jmp	short loc_4928E8

loc_4928E1:
mov	[ebp+var_3C], 0

loc_4928E8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_4928F9

loc_4928F0:
mov	[ebp+var_40], 1
jmp	short loc_492900

loc_4928F9:
mov	[ebp+var_40], 0

loc_492900:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_492912
and	[ebp+var_C], 0FFFFFFFEh

loc_492912:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_492948
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498B20
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_492946
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_492946:
jmp	short loc_492974

loc_492948:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498B20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_492974
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_492974:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_492850 endp

align 10h


; Attributes: bp-based frame

sub_4929C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_492A07
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498B80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_492AB6

loc_492A07:
cmp	[ebp+arg_10], 0
jnz	short loc_492A3B
cmp	[ebp+arg_C], 0
jnz	short loc_492A32
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_492A3B

loc_492A32:
mov	[ebp+var_34], 1
jmp	short loc_492A42

loc_492A3B:
mov	[ebp+var_34], 0

loc_492A42:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_492A54
and	[ebp+var_C], 0FFFFFFFEh

loc_492A54:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_492A8A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498B80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_492A88
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_492A88:
jmp	short loc_492AB6

loc_492A8A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_498B80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_492AB6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_492AB6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4929C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_492B00(void *)
sub_492B00 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_45C160
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_492B31
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_492B31:
mov	esp, ebp
pop	ebp
retn
sub_492B00 endp

align 10h


; Attributes: bp-based frame

sub_492B40 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_492D1D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_492BA9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499E60
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493003

loc_492BA9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_492BF5
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	loc_493003
jmp	loc_492D18

loc_492BF5:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_492C2A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493003

loc_492C2A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_492C74
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	loc_493003

loc_492C74:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_492CED
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_492CC6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	loc_493003
jmp	short loc_492CEB

loc_492CC6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	loc_493003

loc_492CEB:
jmp	short loc_492D18

loc_492CED:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499E60
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493003

loc_492D18:
jmp	loc_493003

loc_492D1D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_492DB1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_492D81
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	loc_493003
jmp	short loc_492DAC

loc_492D81:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499E60
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493003

loc_492DAC:
jmp	loc_493003

loc_492DB1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_492E21
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_492E21
mov	[ebp+var_A4], 1
jmp	short loc_492E2B

loc_492E21:
mov	[ebp+var_A4], 0

loc_492E2B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_492E40
and	[ebp+var_4C], 0FFFFFFFEh

loc_492E40:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_492EA2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_492E78
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	loc_493003
jmp	short loc_492E9D

loc_492E78:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	loc_493003

loc_492E9D:
jmp	loc_493003

loc_492EA2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_492EF2
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_492EF2:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_492F41
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_492F41
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_492F35
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_492F41

loc_492F35:
mov	[ebp+var_A8], 1
jmp	short loc_492F4B

loc_492F41:
mov	[ebp+var_A8], 0

loc_492F4B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_492F60
and	[ebp+var_4C], 0FFFFFFFDh

loc_492F60:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_492FB9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_492F95
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	short loc_493003
jmp	short loc_492FB7

loc_492F95:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_499D20
mov	eax, [ebp+arg_0]
jmp	short loc_493003

loc_492FB7:
jmp	short loc_493003

loc_492FB9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_492FD7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_493003
jmp	short loc_493003

loc_492FD7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_499E60
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_493003:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_492B40 endp

align 10h


; Attributes: bp-based frame

sub_493010 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_493057
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498BD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49310A

loc_493057:
cmp	[ebp+arg_10], 0
jnz	short loc_49308F
cmp	[ebp+arg_C], 0
jnz	short loc_493086
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_49308F

loc_493086:
mov	[ebp+var_34], 1
jmp	short loc_493096

loc_49308F:
mov	[ebp+var_34], 0

loc_493096:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4930A8
and	[ebp+var_C], 0FFFFFFFEh

loc_4930A8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_4930DE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_498BD0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4930DC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_4930DC:
jmp	short loc_49310A

loc_4930DE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498BD0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_49310A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_49310A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_493010 endp

align 10h


; Attributes: bp-based frame

sub_493150 proc	near

var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_164= dword ptr -164h
var_160= dword ptr -160h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_148= dword ptr -148h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_EC=	byte ptr -0ECh
var_EB=	byte ptr -0EBh
var_EA=	byte ptr -0EAh
var_E9=	byte ptr -0E9h
var_E8=	byte ptr -0E8h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 178h
mov	[ebp+var_174], ecx
mov	eax, [ebp+var_174]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_493186
mov	edx, [ebp+var_174]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_493186
mov	[ebp+var_178], 1
jmp	short loc_493190

loc_493186:
mov	[ebp+var_178], 0

loc_493190:
movzx	ecx, byte ptr [ebp+var_178]
test	ecx, ecx
jz	short loc_4931E3
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_E8]
call	sub_10819B0
xor	eax, eax
mov	[ebp+var_E9], al
lea	ecx, [ebp+var_E9]
push	ecx
lea	edx, [ebp+var_E8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_174]
call	sub_493150
lea	ecx, [ebp+var_E8]
call	sub_1081770
jmp	loc_493598

loc_4931E3:
mov	edx, [ebp+var_174]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_174]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_4933EC
xor	edx, edx
mov	[ebp+var_EA], dl
mov	eax, [ebp+var_174]
mov	ecx, [eax+4]
mov	[ebp+var_110], ecx
mov	edx, [ebp+var_174]
mov	eax, [edx+4]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0DCh
mov	edx, [ebp+var_174]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_108], eax
mov	ecx, [ebp+var_108]
mov	[ebp+var_104], ecx
mov	edx, [ebp+var_110]
mov	[ebp+var_F4], edx
mov	eax, [ebp+var_10C]
sub	eax, [ebp+var_104]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_F8], eax
jmp	short loc_493295

loc_493286:
mov	edx, [ebp+var_F8]
sub	edx, 1
mov	[ebp+var_F8], edx

loc_493295:
cmp	[ebp+var_F8], 0
jle	short loc_4932D9
mov	eax, [ebp+var_104]
push	eax		; int
mov	ecx, [ebp+var_F4]
push	ecx		; void *
call	sub_49BF60
add	esp, 8
mov	edx, [ebp+var_104]
add	edx, 0DCh
mov	[ebp+var_104], edx
mov	eax, [ebp+var_F4]
add	eax, 0DCh
mov	[ebp+var_F4], eax
jmp	short loc_493286

loc_4932D9:
mov	ecx, [ebp+arg_4]
imul	ecx, 0DCh
mov	edx, [ebp+var_174]
add	ecx, [edx+4]
mov	eax, [ebp+var_174]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[ebp+var_EB], cl
mov	edx, [ebp+var_8]
mov	[ebp+var_120], edx
mov	eax, [ebp+arg_4]
imul	eax, 0DCh
mov	ecx, [ebp+var_8]
sub	ecx, eax
mov	[ebp+var_11C], ecx
mov	eax, [ebp+var_11C]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_118], eax
jmp	short loc_493341

loc_493332:
mov	edx, [ebp+var_118]
sub	edx, 1
mov	[ebp+var_118], edx

loc_493341:
cmp	[ebp+var_118], 0
jle	short loc_493381
mov	eax, [ebp+var_11C]
sub	eax, 0DCh
mov	[ebp+var_11C], eax
mov	ecx, [ebp+var_120]
sub	ecx, 0DCh
mov	[ebp+var_120], ecx
mov	edx, [ebp+var_11C]
push	edx
mov	ecx, [ebp+var_120]
call	sub_10817E0
jmp	short loc_493332

loc_493381:
mov	eax, [ebp+arg_0]
mov	[ebp+var_12C], eax
mov	eax, [ebp+arg_4]
imul	eax, 0DCh
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_12C]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_128], eax
jmp	short loc_4933CD

loc_4933AC:
mov	edx, [ebp+var_12C]
add	edx, 0DCh
mov	[ebp+var_12C], edx
mov	eax, [ebp+var_128]
sub	eax, 1
mov	[ebp+var_128], eax

loc_4933CD:
cmp	[ebp+var_128], 0
jle	short loc_4933E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_12C]
call	sub_10817E0
jmp	short loc_4933AC

loc_4933E7:
jmp	loc_493598

loc_4933EC:
mov	edx, [ebp+var_174]
mov	eax, [edx+4]
mov	[ebp+var_148], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 0DCh
add	ecx, [ebp+var_148]
mov	[ebp+var_130], ecx
mov	edx, [ebp+var_148]
mov	[ebp+var_138], edx
mov	eax, [ebp+var_130]
sub	eax, [ebp+var_148]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_13C], eax
jmp	short loc_49345B

loc_49343B:
mov	edx, [ebp+var_13C]
sub	edx, 1
mov	[ebp+var_13C], edx
mov	eax, [ebp+var_138]
add	eax, 0DCh
mov	[ebp+var_138], eax

loc_49345B:
cmp	[ebp+var_13C], 0
jle	short loc_493479
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_138]
push	edx		; void *
call	sub_49BF60
add	esp, 8
jmp	short loc_49343B

loc_493479:
mov	eax, [ebp+var_174]
mov	ecx, [ebp+var_130]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_EC], dl
mov	eax, [ebp+var_174]
mov	ecx, [eax+4]
mov	[ebp+var_164], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_160], edx
mov	eax, [ebp+var_164]
mov	[ebp+var_150], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_160]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_154], eax
jmp	short loc_4934DC

loc_4934CD:
mov	edx, [ebp+var_154]
sub	edx, 1
mov	[ebp+var_154], edx

loc_4934DC:
cmp	[ebp+var_154], 0
jle	short loc_493520
mov	eax, [ebp+var_160]
push	eax		; int
mov	ecx, [ebp+var_150]
push	ecx		; void *
call	sub_49BF60
add	esp, 8
mov	edx, [ebp+var_160]
add	edx, 0DCh
mov	[ebp+var_160], edx
mov	eax, [ebp+var_150]
add	eax, 0DCh
mov	[ebp+var_150], eax
jmp	short loc_4934CD

loc_493520:
mov	ecx, [ebp+var_4]
imul	ecx, 0DCh
mov	edx, [ebp+var_174]
add	ecx, [edx+4]
mov	eax, [ebp+var_174]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_170], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_170]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_16C], eax
jmp	short loc_49357E

loc_49355D:
mov	edx, [ebp+var_170]
add	edx, 0DCh
mov	[ebp+var_170], edx
mov	eax, [ebp+var_16C]
sub	eax, 1
mov	[ebp+var_16C], eax

loc_49357E:
cmp	[ebp+var_16C], 0
jle	short loc_493598
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_170]
call	sub_10817E0
jmp	short loc_49355D

loc_493598:
mov	esp, ebp
pop	ebp
retn	10h
sub_493150 endp

align 10h


; Attributes: bp-based frame

sub_4935A0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_498C20
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A8C40
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_493623

loc_49361A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_493623:
cmp	[ebp+var_40], 0
jle	short loc_49364D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_49C080
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 50h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 50h
mov	[ebp+var_3C], eax
jmp	short loc_49361A

loc_49364D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_493674
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_49C080
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 50h
mov	[ebp+var_C], ecx
jmp	short loc_4936C9

loc_493674:
mov	edx, [ebp+arg_C]
imul	edx, 50h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_4936AB

loc_493699:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 50h
mov	[ebp+var_68], eax

loc_4936AB:
cmp	[ebp+var_6C], 0
jle	short loc_4936C3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_49C080
add	esp, 8
jmp	short loc_493699

loc_4936C3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_4936C9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_493761
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_493728

loc_49371F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_493728:
cmp	[ebp+var_80], 0
jle	short loc_49375B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_49C080
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 50h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 50h
mov	[ebp+var_7C], eax
jmp	short loc_49371F

loc_49375B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_493761:
mov	ecx, [ebp+var_CC]
call	sub_4902A0
mov	edx, [ebp+var_4]
imul	edx, 50h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_4935A0 endp

align 10h


; Attributes: bp-based frame

sub_4937B0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B0=	dword ptr -0B0h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_5D=	byte ptr -5Dh
var_5C=	byte ptr -5Ch
var_5B=	byte ptr -5Bh
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	byte ptr -58h
var_30=	byte ptr -30h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_DC], ecx
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4937E6
mov	edx, [ebp+var_DC]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4937E6
mov	[ebp+var_E0], 1
jmp	short loc_4937F0

loc_4937E6:
mov	[ebp+var_E0], 0

loc_4937F0:
movzx	ecx, byte ptr [ebp+var_E0]
test	ecx, ecx
jz	short loc_49384B
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_58]
call	sub_403400
mov	eax, [ebp+arg_8]
add	eax, 28h
push	eax
lea	ecx, [ebp+var_30]
call	sub_403400
xor	ecx, ecx
mov	[ebp+var_59], cl
lea	edx, [ebp+var_59]
push	edx
lea	eax, [ebp+var_58]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_DC]
call	sub_4937B0
lea	ecx, [ebp+var_30]
call	sub_407E50
lea	ecx, [ebp+var_58]
call	sub_407E50
jmp	loc_493A74

loc_49384B:
mov	eax, [ebp+var_DC]
mov	eax, [eax+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_DC]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_493921
xor	edx, edx
mov	[ebp+var_5A], dl
mov	eax, [ebp+var_DC]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx+4]
mov	[ebp+var_74], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 50h
mov	edx, [ebp+var_DC]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_70], eax
push	0
lea	ecx, [ebp+var_5D]
push	ecx
mov	edx, [ebp+var_78]
push	edx
mov	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_70]
push	ecx
call	sub_49D190
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 50h
mov	eax, [ebp+var_DC]
add	edx, [eax+4]
mov	ecx, [ebp+var_DC]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_5B], dl
lea	eax, [ebp+var_5B]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
imul	edx, 50h
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_49A020
add	esp, 10h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
imul	eax, 50h
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_49A090
add	esp, 0Ch
jmp	loc_493A74

loc_493921:
mov	edx, [ebp+var_DC]
mov	eax, [edx+4]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 50h
add	ecx, [ebp+var_B0]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_B0]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_98]
sub	eax, [ebp+var_B0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_A4], eax
jmp	short loc_49398B

loc_49396D:
mov	edx, [ebp+var_A4]
sub	edx, 1
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A0]
add	eax, 50h
mov	[ebp+var_A0], eax

loc_49398B:
cmp	[ebp+var_A4], 0
jle	short loc_4939A9
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_A0]
push	edx		; void *
call	sub_49C080
add	esp, 8
jmp	short loc_49396D

loc_4939A9:
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_98]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_5C], dl
mov	eax, [ebp+var_DC]
mov	ecx, [eax+4]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	[ebp+var_B8], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_C8]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_BC], eax
jmp	short loc_493A09

loc_4939FA:
mov	edx, [ebp+var_BC]
sub	edx, 1
mov	[ebp+var_BC], edx

loc_493A09:
cmp	[ebp+var_BC], 0
jle	short loc_493A48
mov	eax, [ebp+var_C8]
push	eax		; int
mov	ecx, [ebp+var_B8]
push	ecx		; void *
call	sub_49C080
add	esp, 8
mov	edx, [ebp+var_C8]
add	edx, 50h
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_B8]
add	eax, 50h
mov	[ebp+var_B8], eax
jmp	short loc_4939FA

loc_493A48:
mov	ecx, [ebp+var_4]
imul	ecx, 50h
mov	edx, [ebp+var_DC]
add	ecx, [edx+4]
mov	eax, [ebp+var_DC]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_49A090
add	esp, 0Ch

loc_493A74:
mov	esp, ebp
pop	ebp
retn	10h
sub_4937B0 endp

align 10h


; Attributes: bp-based frame

sub_493A80 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_493C5D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_493AE9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49A380
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493F43

loc_493AE9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_493B35
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	loc_493F43
jmp	loc_493C58

loc_493B35:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_493B6A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493F43

loc_493B6A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_493BB4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	loc_493F43

loc_493BB4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_493C2D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_493C06
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	loc_493F43
jmp	short loc_493C2B

loc_493C06:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	loc_493F43

loc_493C2B:
jmp	short loc_493C58

loc_493C2D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49A380
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493F43

loc_493C58:
jmp	loc_493F43

loc_493C5D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_493CF1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_493CC1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	loc_493F43
jmp	short loc_493CEC

loc_493CC1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49A380
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_493F43

loc_493CEC:
jmp	loc_493F43

loc_493CF1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_493D61
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_493D61
mov	[ebp+var_A4], 1
jmp	short loc_493D6B

loc_493D61:
mov	[ebp+var_A4], 0

loc_493D6B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_493D80
and	[ebp+var_4C], 0FFFFFFFEh

loc_493D80:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_493DE2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_493DB8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	loc_493F43
jmp	short loc_493DDD

loc_493DB8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	loc_493F43

loc_493DDD:
jmp	loc_493F43

loc_493DE2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_493E32
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_493E32:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_493E81
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_493E81
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_493E75
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_493E81

loc_493E75:
mov	[ebp+var_A8], 1
jmp	short loc_493E8B

loc_493E81:
mov	[ebp+var_A8], 0

loc_493E8B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_493EA0
and	[ebp+var_4C], 0FFFFFFFDh

loc_493EA0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_493EF9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_493ED5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	short loc_493F43
jmp	short loc_493EF7

loc_493ED5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49A240
mov	eax, [ebp+arg_0]
jmp	short loc_493F43

loc_493EF7:
jmp	short loc_493F43

loc_493EF9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_493F17
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_493F43
jmp	short loc_493F43

loc_493F17:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49A380
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_493F43:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_493A80 endp

align 10h


; Attributes: bp-based frame

sub_493F50 proc	near

var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 188h
mov	[ebp+var_160], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_160]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_494283
mov	edx, [ebp+var_160]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_493FB9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_160]
call	sub_49A6A0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494815

loc_493FB9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
cmp	ecx, [ebp+var_60]
jl	short loc_494018
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_64]
cmp	eax, [ebp+var_68]
jnz	short loc_49400C
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_6C]
cmp	edx, [ebp+var_70]
jb	short loc_494018

loc_49400C:
mov	[ebp+var_164], 0
jmp	short loc_494022

loc_494018:
mov	[ebp+var_164], 1

loc_494022:
mov	al, byte ptr [ebp+var_164]
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_49405D
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	loc_494815
jmp	loc_49427E

loc_49405D:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_7C]
cmp	edx, [ebp+var_80]
jl	short loc_4940D4
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[ebp+var_84], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_84]
cmp	ecx, [ebp+var_88]
jnz	short loc_4940C8
mov	edx, [ebp+var_74]
mov	eax, [edx+4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_8C]
cmp	eax, [ebp+var_90]
jb	short loc_4940D4

loc_4940C8:
mov	[ebp+var_168], 0
jmp	short loc_4940DE

loc_4940D4:
mov	[ebp+var_168], 1

loc_4940DE:
mov	cl, byte ptr [ebp+var_168]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_494102
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494815

loc_494102:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_160]
jnz	short loc_49414C
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	loc_494815

loc_49414C:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_9C]
cmp	edx, [ebp+var_A0]
jl	short loc_4941DB
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_94]
mov	eax, [edx]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A4]
cmp	ecx, [ebp+var_A8]
jnz	short loc_4941CF
mov	edx, [ebp+arg_8]
mov	eax, [edx+4]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx+4]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_AC]
cmp	eax, [ebp+var_B0]
jb	short loc_4941DB

loc_4941CF:
mov	[ebp+var_16C], 0
jmp	short loc_4941E5

loc_4941DB:
mov	[ebp+var_16C], 1

loc_4941E5:
mov	cl, byte ptr [ebp+var_16C]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_49424D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_494226
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	loc_494815
jmp	short loc_49424B

loc_494226:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	loc_494815

loc_49424B:
jmp	short loc_49427E

loc_49424D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_160]
call	sub_49A6A0
mov	[ebp+var_B4], eax
mov	edx, [ebp+var_B4]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494815

loc_49427E:
jmp	loc_494815

loc_494283:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_160]
jnz	loc_4943A5
mov	ecx, [ebp+var_160]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_B8]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C0]
cmp	ecx, [ebp+var_C4]
jl	short loc_494327
mov	edx, [ebp+var_B8]
mov	eax, [edx]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_C8]
cmp	eax, [ebp+var_CC]
jnz	short loc_49431B
mov	ecx, [ebp+var_B8]
mov	edx, [ecx+4]
mov	[ebp+var_D0], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
mov	[ebp+var_D4], ecx
mov	edx, [ebp+var_D0]
cmp	edx, [ebp+var_D4]
jb	short loc_494327

loc_49431B:
mov	[ebp+var_170], 0
jmp	short loc_494331

loc_494327:
mov	[ebp+var_170], 1

loc_494331:
mov	al, byte ptr [ebp+var_170]
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_49436F
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_160]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	loc_494815
jmp	short loc_4943A0

loc_49436F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_160]
call	sub_49A6A0
mov	[ebp+var_D8], eax
mov	eax, [ebp+var_D8]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494815

loc_4943A0:
jmp	loc_494815

loc_4943A5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_DC], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_E4], ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx]
mov	[ebp+var_E8], eax
mov	ecx, [ebp+var_E4]
cmp	ecx, [ebp+var_E8]
jl	short loc_49444E
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ecx]
mov	[ebp+var_F0], edx
mov	eax, [ebp+var_EC]
cmp	eax, [ebp+var_F0]
jnz	short loc_494442
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_F4], edx
mov	eax, [ebp+var_DC]
mov	ecx, [eax+4]
mov	[ebp+var_F8], ecx
mov	edx, [ebp+var_F4]
cmp	edx, [ebp+var_F8]
jb	short loc_49444E

loc_494442:
mov	[ebp+var_174], 0
jmp	short loc_494458

loc_49444E:
mov	[ebp+var_174], 1

loc_494458:
mov	al, byte ptr [ebp+var_174]
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	loc_494521
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_FC]
mov	ecx, [eax]
mov	[ebp+var_104], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_108], eax
mov	ecx, [ebp+var_104]
cmp	ecx, [ebp+var_108]
jl	short loc_494500
mov	edx, [ebp+var_FC]
mov	eax, [edx]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_110], edx
mov	eax, [ebp+var_10C]
cmp	eax, [ebp+var_110]
jnz	short loc_4944F4
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
mov	[ebp+var_114], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
mov	[ebp+var_118], ecx
mov	edx, [ebp+var_114]
cmp	edx, [ebp+var_118]
jb	short loc_494500

loc_4944F4:
mov	[ebp+var_178], 0
jmp	short loc_49450A

loc_494500:
mov	[ebp+var_178], 1

loc_49450A:
movzx	eax, byte ptr [ebp+var_178]
test	eax, eax
jz	short loc_494521
mov	[ebp+var_17C], 1
jmp	short loc_49452B

loc_494521:
mov	[ebp+var_17C], 0

loc_49452B:
mov	cl, byte ptr [ebp+var_17C]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_494540
and	[ebp+var_4C], 0FFFFFFFEh

loc_494540:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_4945A2
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_494578
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	loc_494815
jmp	short loc_49459D

loc_494578:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	loc_494815

loc_49459D:
jmp	loc_494815

loc_4945A2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	loc_494678
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_11C], ecx
mov	edx, [ebp+var_11C]
mov	eax, [edx]
mov	[ebp+var_124], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_128], edx
mov	eax, [ebp+var_124]
cmp	eax, [ebp+var_128]
jl	short loc_494665
mov	ecx, [ebp+var_11C]
mov	edx, [ecx]
mov	[ebp+var_12C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_130], ecx
mov	edx, [ebp+var_12C]
cmp	edx, [ebp+var_130]
jnz	short loc_494659
mov	eax, [ebp+var_11C]
mov	ecx, [eax+4]
mov	[ebp+var_134], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+4]
mov	[ebp+var_138], eax
mov	ecx, [ebp+var_134]
cmp	ecx, [ebp+var_138]
jb	short loc_494665

loc_494659:
mov	[ebp+var_180], 0
jmp	short loc_49466F

loc_494665:
mov	[ebp+var_180], 1

loc_49466F:
mov	dl, byte ptr [ebp+var_180]
mov	[ebp+var_11], dl

loc_494678:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	loc_494753
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_494753
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_160]
jz	loc_494747
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_13C], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_144], edx
mov	eax, [ebp+var_13C]
mov	ecx, [eax]
mov	[ebp+var_148], ecx
mov	edx, [ebp+var_144]
cmp	edx, [ebp+var_148]
jl	short loc_494732
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_14C], ecx
mov	edx, [ebp+var_13C]
mov	eax, [edx]
mov	[ebp+var_150], eax
mov	ecx, [ebp+var_14C]
cmp	ecx, [ebp+var_150]
jnz	short loc_494726
mov	edx, [ebp+arg_8]
mov	eax, [edx+4]
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_13C]
mov	edx, [ecx+4]
mov	[ebp+var_158], edx
mov	eax, [ebp+var_154]
cmp	eax, [ebp+var_158]
jb	short loc_494732

loc_494726:
mov	[ebp+var_184], 0
jmp	short loc_49473C

loc_494732:
mov	[ebp+var_184], 1

loc_49473C:
movzx	ecx, byte ptr [ebp+var_184]
test	ecx, ecx
jz	short loc_494753

loc_494747:
mov	[ebp+var_188], 1
jmp	short loc_49475D

loc_494753:
mov	[ebp+var_188], 0

loc_49475D:
mov	dl, byte ptr [ebp+var_188]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_494772
and	[ebp+var_4C], 0FFFFFFFDh

loc_494772:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_4947CB
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4947A7
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	short loc_494815
jmp	short loc_4947C9

loc_4947A7:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_160]
call	sub_49A510
mov	eax, [ebp+arg_0]
jmp	short loc_494815

loc_4947C9:
jmp	short loc_494815

loc_4947CB:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_4947E9
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_494815
jmp	short loc_494815

loc_4947E9:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_160]
call	sub_49A6A0
mov	[ebp+var_15C], eax
mov	eax, [ebp+var_15C]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_494815:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_493F50 endp

align 10h


; Attributes: bp-based frame

sub_494820 proc	near

var_1D=	byte ptr -1Dh
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 20h

loc_494826:
lea	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setnz	dl
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_49487C
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_10], ecx
lea	edx, [ebp+arg_C]
push	edx
mov	ecx, [ebp+var_10]
call	sub_10649D0
push	eax
call	sub_441C20
add	esp, 8
movzx	eax, al
test	eax, eax
jnz	short loc_49487C
lea	eax, [ebp+arg_4]
call	sub_405E90
jmp	short loc_494826

loc_49487C:
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_494820 endp

align 10h


; Attributes: bp-based frame

sub_4948A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwolevelinterf ; "LWOLevelInterface"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_494905
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_494905
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_494905
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_4948FE
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_494905

loc_4948FE:
mov	[ebp+var_10], 0

loc_494905:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_4948A0 endp

align 10h


; Attributes: bp-based frame

sub_494910 proc	near

var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
lea	eax, [ebp+var_30]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_C]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	ecx, [ebp+var_34]
mov	[ebp+var_18], ecx
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_18]
call	sub_4046E0
lea	edx, [ebp+var_38]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_1C]
call	sub_4046E0
jmp	short loc_49495B

loc_49494B:
lea	eax, [ebp+var_30]
call	sub_405E90
lea	eax, [ebp+var_38]
call	sub_405E90

loc_49495B:
lea	eax, [ebp+var_28]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_24]
call	sub_4046E0
mov	ecx, [ebp+var_38]
xor	edx, edx
cmp	ecx, [ebp+var_28]
setnz	dl
mov	[ebp+var_39], dl
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_494998
mov	ecx, [ebp+var_38]
add	ecx, 8
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[edx+8], ecx
jmp	short loc_49494B

loc_494998:
mov	ecx, [ebp+var_30]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_494910 endp

align 10h


; Attributes: bp-based frame

sub_4949B0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_494B8D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_494A19
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49AEF0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494E73

loc_494A19:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_494A65
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	loc_494E73
jmp	loc_494B88

loc_494A65:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_494A9A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494E73

loc_494A9A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_494AE4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	loc_494E73

loc_494AE4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_494B5D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_494B36
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	loc_494E73
jmp	short loc_494B5B

loc_494B36:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	loc_494E73

loc_494B5B:
jmp	short loc_494B88

loc_494B5D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49AEF0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494E73

loc_494B88:
jmp	loc_494E73

loc_494B8D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_494C21
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_494BF1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	loc_494E73
jmp	short loc_494C1C

loc_494BF1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49AEF0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_494E73

loc_494C1C:
jmp	loc_494E73

loc_494C21:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_494C91
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_494C91
mov	[ebp+var_A4], 1
jmp	short loc_494C9B

loc_494C91:
mov	[ebp+var_A4], 0

loc_494C9B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_494CB0
and	[ebp+var_4C], 0FFFFFFFEh

loc_494CB0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_494D12
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_494CE8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	loc_494E73
jmp	short loc_494D0D

loc_494CE8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	loc_494E73

loc_494D0D:
jmp	loc_494E73

loc_494D12:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_494D62
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_494D62:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_494DB1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_494DB1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_494DA5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_494DB1

loc_494DA5:
mov	[ebp+var_A8], 1
jmp	short loc_494DBB

loc_494DB1:
mov	[ebp+var_A8], 0

loc_494DBB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_494DD0
and	[ebp+var_4C], 0FFFFFFFDh

loc_494DD0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_494E29
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_494E05
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	short loc_494E73
jmp	short loc_494E27

loc_494E05:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49ABF0
mov	eax, [ebp+arg_0]
jmp	short loc_494E73

loc_494E27:
jmp	short loc_494E73

loc_494E29:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_494E47
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_494E73
jmp	short loc_494E73

loc_494E47:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49AEF0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_494E73:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4949B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_494E80(void *)
sub_494E80 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_490400
xor	ecx, ecx
and	ecx, 1
jz	short loc_494EA9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_494EA9:
mov	esp, ebp
pop	ebp
retn
sub_494E80 endp

align 10h


; Attributes: bp-based frame

sub_494EB0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4B87E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_498DE0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_494F33

loc_494F2A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_494F33:
cmp	[ebp+var_40], 0
jle	short loc_494F5D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_49DF00
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 24h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 24h
mov	[ebp+var_3C], eax
jmp	short loc_494F2A

loc_494F5D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_494F84
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_49DF00
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 24h
mov	[ebp+var_C], ecx
jmp	short loc_494FD9

loc_494F84:
mov	edx, [ebp+arg_C]
imul	edx, 24h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_494FBB

loc_494FA9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 24h
mov	[ebp+var_68], eax

loc_494FBB:
cmp	[ebp+var_6C], 0
jle	short loc_494FD3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_49DF00
add	esp, 8
jmp	short loc_494FA9

loc_494FD3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_494FD9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_495071
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_495038

loc_49502F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_495038:
cmp	[ebp+var_80], 0
jle	short loc_49506B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_49DF00
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 24h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 24h
mov	[ebp+var_7C], eax
jmp	short loc_49502F

loc_49506B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_495071:
mov	ecx, [ebp+var_CC]
call	sub_498D60
mov	edx, [ebp+var_4]
imul	edx, 24h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_494EB0 endp

align 10h


; Attributes: bp-based frame

sub_4950C0 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C4=	dword ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_30=	byte ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4950C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+var_D0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_49510B
mov	edx, [ebp+var_D0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_49510B
mov	[ebp+var_D4], 1
jmp	short loc_495115

loc_49510B:
mov	[ebp+var_D4], 0

loc_495115:
movzx	ecx, byte ptr [ebp+var_D4]
test	ecx, ecx
jz	short loc_49516D
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_38]
call	sub_498770
xor	eax, eax
mov	[ebp+var_39], al
lea	ecx, [ebp+var_39]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_D0]
call	sub_4950C0
lea	edx, [ebp+var_30]
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_44]
call	sub_4892F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
jmp	loc_49544C

loc_49516D:
mov	eax, [ebp+var_D0]
mov	eax, [eax+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_10], eax
mov	edx, [ebp+var_D0]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+arg_4]
jbe	loc_4952B3
xor	edx, edx
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_D0]
mov	ecx, [eax+4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_D0]
mov	eax, [edx+4]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 24h
mov	edx, [ebp+var_D0]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_58], eax
push	0
lea	ecx, [ebp+var_45]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+var_58]
push	ecx
call	sub_49D330
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 24h
mov	eax, [ebp+var_D0]
add	edx, [eax+4]
mov	ecx, [ebp+var_D0]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_3B], dl
mov	eax, [ebp+var_14]
mov	[ebp+var_74], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 24h
mov	edx, [ebp+var_14]
sub	edx, ecx
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_495234

loc_49522B:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_495234:
cmp	[ebp+var_68], 0
jle	short loc_49525A
mov	eax, [ebp+var_70]
sub	eax, 24h
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
sub	ecx, 24h
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
push	edx
mov	ecx, [ebp+var_74]
call	sub_4988A0
jmp	short loc_49522B

loc_49525A:
mov	eax, [ebp+arg_0]
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_4]
imul	eax, 24h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_84]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_7C], eax
jmp	short loc_495297

loc_49527F:
mov	edx, [ebp+var_84]
add	edx, 24h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_7C]
sub	eax, 1
mov	[ebp+var_7C], eax

loc_495297:
cmp	[ebp+var_7C], 0
jle	short loc_4952AE
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_84]
call	sub_4988A0
jmp	short loc_49527F

loc_4952AE:
jmp	loc_49544C

loc_4952B3:
mov	edx, [ebp+var_D0]
mov	eax, [edx+4]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_10]
imul	ecx, 24h
add	ecx, [ebp+var_A0]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_A0]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_88]
sub	eax, [ebp+var_A0]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_94], eax
jmp	short loc_49531D

loc_4952FF:
mov	edx, [ebp+var_94]
sub	edx, 1
mov	[ebp+var_94], edx
mov	eax, [ebp+var_90]
add	eax, 24h
mov	[ebp+var_90], eax

loc_49531D:
cmp	[ebp+var_94], 0
jle	short loc_49533B
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_90]
push	edx		; void *
call	sub_49DF00
add	esp, 8
jmp	short loc_4952FF

loc_49533B:
mov	eax, [ebp+var_D0]
mov	ecx, [ebp+var_88]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_3C], dl
mov	eax, [ebp+var_D0]
mov	ecx, [eax+4]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_BC]
mov	[ebp+var_A8], eax
mov	eax, [ebp+var_14]
sub	eax, [ebp+var_B8]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_AC], eax
jmp	short loc_49539B

loc_49538C:
mov	edx, [ebp+var_AC]
sub	edx, 1
mov	[ebp+var_AC], edx

loc_49539B:
cmp	[ebp+var_AC], 0
jle	short loc_4953DA
mov	eax, [ebp+var_B8]
push	eax		; int
mov	ecx, [ebp+var_A8]
push	ecx		; void *
call	sub_49DF00
add	esp, 8
mov	edx, [ebp+var_B8]
add	edx, 24h
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_A8]
add	eax, 24h
mov	[ebp+var_A8], eax
jmp	short loc_49538C

loc_4953DA:
mov	ecx, [ebp+var_10]
imul	ecx, 24h
mov	edx, [ebp+var_D0]
add	ecx, [edx+4]
mov	eax, [ebp+var_D0]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_CC], ecx
mov	eax, [ebp+var_14]
sub	eax, [ebp+var_CC]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_C4], eax
jmp	short loc_495432

loc_495414:
mov	edx, [ebp+var_CC]
add	edx, 24h
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_C4]
sub	eax, 1
mov	[ebp+var_C4], eax

loc_495432:
cmp	[ebp+var_C4], 0
jle	short loc_49544C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4988A0
jmp	short loc_495414

loc_49544C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4950C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_495460(void *)
sub_495460 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_495486
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA90

loc_495486:
xor	ecx, ecx
and	ecx, 1
jz	short loc_495499
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_495499:
mov	esp, ebp
pop	ebp
retn
sub_495460 endp

align 10h


; Attributes: bp-based frame

sub_4954A0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_495680
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_495509
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_49B080
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_49596B

loc_495509:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_495556
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	loc_49596B
jmp	loc_49567B

loc_495556:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_49558C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_49596B

loc_49558C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4955D6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	loc_49596B

loc_4955D6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_495650
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_495629
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	loc_49596B
jmp	short loc_49564E

loc_495629:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	loc_49596B

loc_49564E:
jmp	short loc_49567B

loc_495650:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49B080
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_49596B

loc_49567B:
jmp	loc_49596B

loc_495680:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_495715
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4956E5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	loc_49596B
jmp	short loc_495710

loc_4956E5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_49B080
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_49596B

loc_495710:
jmp	loc_49596B

loc_495715:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_495787
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_495787
mov	[ebp+var_A4], 1
jmp	short loc_495791

loc_495787:
mov	[ebp+var_A4], 0

loc_495791:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4957A6
and	[ebp+var_4C], 0FFFFFFFEh

loc_4957A6:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_495808
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4957DE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	loc_49596B
jmp	short loc_495803

loc_4957DE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	loc_49596B

loc_495803:
jmp	loc_49596B

loc_495808:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_495859
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_495859:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4958A9
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4958A9
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_49589D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4958A9

loc_49589D:
mov	[ebp+var_A8], 1
jmp	short loc_4958B3

loc_4958A9:
mov	[ebp+var_A8], 0

loc_4958B3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4958C8
and	[ebp+var_4C], 0FFFFFFFDh

loc_4958C8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_495921
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4958FD
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	short loc_49596B
jmp	short loc_49591F

loc_4958FD:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8280
mov	eax, [ebp+arg_0]
jmp	short loc_49596B

loc_49591F:
jmp	short loc_49596B

loc_495921:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_49593F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_49596B
jmp	short loc_49596B

loc_49593F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_49B080
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_49596B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4954A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_495980(void *)
sub_495980 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	eax, [ebp+arg_0]
add	eax, 4
call	sub_40ABB0
xor	ecx, ecx
and	ecx, 1
jz	short loc_4959A7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4959A7:
mov	esp, ebp
pop	ebp
retn
sub_495980 endp

align 10h


; Attributes: bp-based frame

sub_4959B0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_495B84
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_495A19
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_49B350
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_495E5B

loc_495A19:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_495A62
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	loc_495E5B
jmp	loc_495B7F

loc_495A62:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_495A94
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_495E5B

loc_495A94:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_495ADE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	loc_495E5B

loc_495ADE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_495B54
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_495B2D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	loc_495E5B
jmp	short loc_495B52

loc_495B2D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	loc_495E5B

loc_495B52:
jmp	short loc_495B7F

loc_495B54:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_49B350
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_495E5B

loc_495B7F:
jmp	loc_495E5B

loc_495B84:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_495C15
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_495BE5
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	loc_495E5B
jmp	short loc_495C10

loc_495BE5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_49B350
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_495E5B

loc_495C10:
jmp	loc_495E5B

loc_495C15:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_495C7F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_495C7F
mov	[ebp+var_C4], 1
jmp	short loc_495C89

loc_495C7F:
mov	[ebp+var_C4], 0

loc_495C89:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_495C9E
and	[ebp+var_4C], 0FFFFFFFEh

loc_495C9E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_495D00
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_495CD6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	loc_495E5B
jmp	short loc_495CFB

loc_495CD6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	loc_495E5B

loc_495CFB:
jmp	loc_495E5B

loc_495D00:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_495D4D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_495D4D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_495D99
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_495D99
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_495D8D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_495D99

loc_495D8D:
mov	[ebp+var_C8], 1
jmp	short loc_495DA3

loc_495D99:
mov	[ebp+var_C8], 0

loc_495DA3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_495DB8
and	[ebp+var_4C], 0FFFFFFFDh

loc_495DB8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_495E11
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_495DED
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	short loc_495E5B
jmp	short loc_495E0F

loc_495DED:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_49B210
mov	eax, [ebp+arg_0]
jmp	short loc_495E5B

loc_495E0F:
jmp	short loc_495E5B

loc_495E11:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_495E2F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_495E5B
jmp	short loc_495E5B

loc_495E2F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_49B350
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_495E5B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4959B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_495E70(void *)
sub_495E70 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_409540
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_495E9F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_495E9F:
mov	esp, ebp
pop	ebp
retn
sub_495E70 endp

align 10h


; Attributes: bp-based frame

sub_495EB0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1A=	byte ptr -1Ah
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_495EF7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498E60
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_495FD2

loc_495EF7:
cmp	[ebp+arg_10], 0
jnz	short loc_495F57
cmp	[ebp+arg_C], 0
jnz	short loc_495F4E
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_495F34
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_1A], al
jmp	short loc_495F46
jmp	short loc_495F46

loc_495F34:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_18]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_1A], cl

loc_495F46:
movzx	edx, [ebp+var_1A]
test	edx, edx
jz	short loc_495F57

loc_495F4E:
mov	[ebp+var_34], 1
jmp	short loc_495F5E

loc_495F57:
mov	[ebp+var_34], 0

loc_495F5E:
mov	al, byte ptr [ebp+var_34]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_495F70
and	[ebp+var_C], 0FFFFFFFEh

loc_495F70:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_495FA6
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498E60
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_495FA4
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_495FA4:
jmp	short loc_495FD2

loc_495FA6:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498E60
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_495FD2
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_495FD2:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_495EB0 endp

align 10h


; Attributes: bp-based frame

sub_496020 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_96=	byte ptr -96h
var_94=	dword ptr -94h
var_8E=	byte ptr -8Eh
var_8C=	dword ptr -8Ch
var_86=	byte ptr -86h
var_84=	dword ptr -84h
var_7E=	byte ptr -7Eh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_72=	byte ptr -72h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_64=	dword ptr -64h
var_5E=	byte ptr -5Eh
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_496251
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_496089
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_48ECC0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_496637

loc_496089:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_486BB0
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_4960D3
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	loc_496637
jmp	loc_49624C

loc_4960D3:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_496100
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx+4]
xor	ecx, ecx
cmp	eax, [edx+4]
setl	cl
mov	[ebp+var_5E], cl
jmp	short loc_496112
jmp	short loc_496112

loc_496100:
mov	edx, [ebp+var_5C]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5E], dl

loc_496112:
mov	al, [ebp+var_5E]
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_496133
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_496637

loc_496133:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_A0]
jnz	short loc_49617D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	loc_496637

loc_49617D:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_64]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_4961AA
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_64]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_66], al
jmp	short loc_4961BC
jmp	short loc_4961BC

loc_4961AA:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_66], cl

loc_4961BC:
mov	dl, [ebp+var_66]
mov	[ebp+var_20], dl
movzx	eax, [ebp+var_20]
test	eax, eax
jz	short loc_496221
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4961FA
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	loc_496637
jmp	short loc_49621F

loc_4961FA:
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	loc_496637

loc_49621F:
jmp	short loc_49624C

loc_496221:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_48ECC0
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_496637

loc_49624C:
jmp	loc_496637

loc_496251:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_A0]
jnz	loc_496310
mov	edx, [ebp+var_A0]
mov	eax, [edx+0Ch]
add	eax, 10h
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_496293
mov	ecx, [ebp+var_70]
mov	edx, [ebp+arg_8]
mov	eax, [ecx+4]
xor	ecx, ecx
cmp	eax, [edx+4]
setl	cl
mov	[ebp+var_72], cl
jmp	short loc_4962A5
jmp	short loc_4962A5

loc_496293:
mov	edx, [ebp+var_70]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_72], dl

loc_4962A5:
mov	al, [ebp+var_72]
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4962E0
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	loc_496637
jmp	short loc_49630B

loc_4962E0:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_48ECC0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_496637

loc_49630B:
jmp	loc_496637

loc_496310:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_496357
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_7E], al
jmp	short loc_496369
jmp	short loc_496369

loc_496357:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_7C]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_7E], cl

loc_496369:
mov	dl, [ebp+var_7E]
mov	[ebp+var_6], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_4963E3
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_84]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_4963B4
mov	edx, [ebp+var_84]
mov	eax, [ebp+arg_8]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setl	dl
mov	[ebp+var_86], dl
jmp	short loc_4963CC
jmp	short loc_4963CC

loc_4963B4:
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_86], al

loc_4963CC:
movzx	ecx, [ebp+var_86]
test	ecx, ecx
jz	short loc_4963E3
mov	[ebp+var_A4], 1
jmp	short loc_4963ED

loc_4963E3:
mov	[ebp+var_A4], 0

loc_4963ED:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_496402
and	[ebp+var_4C], 0FFFFFFFEh

loc_496402:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_496464
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_49643A
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	loc_496637
jmp	short loc_49645F

loc_49643A:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	loc_496637

loc_49645F:
jmp	loc_496637

loc_496464:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4964EE
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_4964CD
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_8E], al
jmp	short loc_4964E5
jmp	short loc_4964E5

loc_4964CD:
mov	ecx, [ebp+var_8C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_8E], cl

loc_4964E5:
mov	dl, [ebp+var_8E]
mov	[ebp+var_11], dl

loc_4964EE:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_496575
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_496575
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_A0]
jz	short loc_496569
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_94]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_496546
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_94]
mov	eax, [ecx+4]
xor	ecx, ecx
cmp	eax, [edx+4]
setl	cl
mov	[ebp+var_96], cl
jmp	short loc_49655E
jmp	short loc_49655E

loc_496546:
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_96], dl

loc_49655E:
movzx	eax, [ebp+var_96]
test	eax, eax
jz	short loc_496575

loc_496569:
mov	[ebp+var_A8], 1
jmp	short loc_49657F

loc_496575:
mov	[ebp+var_A8], 0

loc_49657F:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_496594
and	[ebp+var_4C], 0FFFFFFFDh

loc_496594:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_4965ED
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4965C9
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	short loc_496637
jmp	short loc_4965EB

loc_4965C9:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_495EB0
mov	eax, [ebp+arg_0]
jmp	short loc_496637

loc_4965EB:
jmp	short loc_496637

loc_4965ED:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_49660B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_496637
jmp	short loc_496637

loc_49660B:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_48ECC0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_496637:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_496020 endp

align 10h


; Attributes: bp-based frame

sub_496640 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_D4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_50F5C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D4]
add	ecx, 8
call	sub_498EB0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_4D], al
mov	ecx, [ebp+var_8]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_D4]
mov	eax, [edx]
mov	[ebp+var_48], eax
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_48]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_38], eax
jmp	short loc_4966BD

loc_4966B4:
mov	edx, [ebp+var_38]
sub	edx, 1
mov	[ebp+var_38], edx

loc_4966BD:
cmp	[ebp+var_38], 0
jle	short loc_4966E7
mov	eax, [ebp+var_48]
push	eax		; int
mov	ecx, [ebp+var_4C]
push	ecx		; void *
call	sub_48FDB0
add	esp, 8
mov	edx, [ebp+var_48]
add	edx, 18h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
add	eax, 18h
mov	[ebp+var_4C], eax
jmp	short loc_4966B4

loc_4966E7:
mov	ecx, [ebp+var_4C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_49670E
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_49DF50
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 18h
mov	[ebp+var_C], ecx
jmp	short loc_496763

loc_49670E:
mov	edx, [ebp+arg_C]
imul	edx, 18h
add	edx, [ebp+var_C]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_64], eax
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_496745

loc_496733:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx
mov	eax, [ebp+var_64]
add	eax, 18h
mov	[ebp+var_64], eax

loc_496745:
cmp	[ebp+var_68], 0
jle	short loc_49675D
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_64]
push	edx		; void *
call	sub_49DF50
add	esp, 8
jmp	short loc_496733

loc_49675D:
mov	eax, [ebp+var_5C]
mov	[ebp+var_C], eax

loc_496763:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_49680A
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_99], cl
mov	edx, [ebp+var_C]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_D4]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_94]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_74], eax
jmp	short loc_4967C5

loc_4967BC:
mov	edx, [ebp+var_74]
sub	edx, 1
mov	[ebp+var_74], edx

loc_4967C5:
cmp	[ebp+var_74], 0
jle	short loc_496801
mov	eax, [ebp+var_90]
push	eax		; int
mov	ecx, [ebp+var_98]
push	ecx		; void *
call	sub_48FDB0
add	esp, 8
mov	edx, [ebp+var_90]
add	edx, 18h
mov	[ebp+var_90], edx
mov	eax, [ebp+var_98]
add	eax, 18h
mov	[ebp+var_98], eax
jmp	short loc_4967BC

loc_496801:
mov	ecx, [ebp+var_98]
mov	[ebp+var_C], ecx

loc_49680A:
mov	ecx, [ebp+var_D4]
call	sub_50F6A0
mov	edx, [ebp+var_4]
imul	edx, 18h
add	edx, [ebp+var_8]
mov	[ebp+var_D0], edx
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_D4]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D0]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_496640 endp



; Attributes: bp-based frame

sub_496850 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_25=	word ptr -25h
var_23=	byte ptr -23h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_94]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_496886
mov	edx, [ebp+var_94]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_496886
mov	[ebp+var_98], 1
jmp	short loc_496890

loc_496886:
mov	[ebp+var_98], 0

loc_496890:
movzx	ecx, byte ptr [ebp+var_98]
test	ecx, ecx
jz	short loc_4968D4
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_20]
call	sub_490E50
xor	eax, eax
mov	[ebp+var_21], al
lea	ecx, [ebp+var_21]
push	ecx
lea	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_94]
call	sub_496850
lea	ecx, [ebp+var_20]
call	sub_5021C0
jmp	loc_4969A3

loc_4968D4:
mov	edx, [ebp+var_94]
mov	eax, [edx+4]
sub	eax, 18h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 18h
add	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
jmp	short loc_496903

loc_4968F1:
mov	edx, [ebp+var_4]
sub	edx, 18h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
sub	eax, 18h
mov	[ebp+var_8], eax

loc_496903:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_0]
jb	short loc_49693C
xor	edx, edx
mov	byte ptr [ebp+var_25+1], dl
mov	al, byte ptr [ebp+var_25+1]
mov	[ebp+var_22], al
xor	ecx, ecx
mov	byte ptr [ebp+var_25], cl
mov	dl, byte ptr [ebp+var_25]
mov	[ebp+var_23], dl
lea	eax, [ebp+var_23]
push	eax
mov	ecx, [ebp+var_8]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_498570
add	esp, 0Ch
xor	eax, eax
mov	[ebp+var_4D], al
jmp	short loc_4968F1

loc_49693C:
mov	ecx, [ebp+arg_4]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_54]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_60], eax
jmp	short loc_496973

loc_496961:
mov	edx, [ebp+var_60]
sub	edx, 1
mov	[ebp+var_60], edx
mov	eax, [ebp+var_5C]
add	eax, 18h
mov	[ebp+var_5C], eax

loc_496973:
cmp	[ebp+var_60], 0
jle	short loc_49698B
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_49DF50
add	esp, 8
jmp	short loc_496961

loc_49698B:
mov	eax, [ebp+arg_4]
imul	eax, 18h
mov	ecx, [ebp+var_94]
add	eax, [ecx+4]
mov	edx, [ebp+var_94]
mov	[edx+4], eax

loc_4969A3:
mov	esp, ebp
pop	ebp
retn	10h
sub_496850 endp

align 10h


; Attributes: bp-based frame

sub_4969B0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= word ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4969D7
mov	edx, [ebp+var_54]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4969D7
mov	[ebp+var_58], 1
jmp	short loc_4969DE

loc_4969D7:
mov	[ebp+var_58], 0

loc_4969DE:
movzx	ecx, byte ptr [ebp+var_58]
test	ecx, ecx
jz	short loc_496A12
mov	edx, [ebp+arg_8]
mov	ax, [edx]
mov	[ebp+var_C], ax
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_54]
call	sub_4969B0
jmp	loc_496B73

loc_496A12:
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_496AE6
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 1
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_4]
lea	ecx, [edx+eax*2]
mov	edx, [ebp+var_54]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
shl	edx, 1
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A290
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*2]
sub	edx, [ebp+var_2C]
sar	edx, 1
mov	[ebp+var_28], edx
jmp	short loc_496ACD

loc_496ABB:
mov	eax, [ebp+var_2C]
add	eax, 2
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_28]
sub	ecx, 1
mov	[ebp+var_28], ecx

loc_496ACD:
cmp	[ebp+var_28], 0
jle	short loc_496AE1
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_8]
mov	cx, [eax]
mov	[edx], cx
jmp	short loc_496ABB

loc_496AE1:
jmp	loc_496B73

loc_496AE6:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
push	edx
call	sub_48FB80
add	esp, 0Ch
mov	ecx, [ebp+var_54]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_10], dl
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_54]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_50]
sar	edx, 1
mov	[ebp+var_4C], edx
jmp	short loc_496B5F

loc_496B4D:
mov	eax, [ebp+var_50]
add	eax, 2
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_4C]
sub	ecx, 1
mov	[ebp+var_4C], ecx

loc_496B5F:
cmp	[ebp+var_4C], 0
jle	short loc_496B73
mov	edx, [ebp+var_50]
mov	eax, [ebp+arg_8]
mov	cx, [eax]
mov	[edx], cx
jmp	short loc_496B4D

loc_496B73:
mov	esp, ebp
pop	ebp
retn	10h
sub_4969B0 endp

align 10h


; Attributes: bp-based frame

sub_496B80 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1A=	byte ptr -1Ah
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_496BC7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498F30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_496CA2

loc_496BC7:
cmp	[ebp+arg_10], 0
jnz	short loc_496C27
cmp	[ebp+arg_C], 0
jnz	short loc_496C1E
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_496C04
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_1A], al
jmp	short loc_496C16
jmp	short loc_496C16

loc_496C04:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_18]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_1A], cl

loc_496C16:
movzx	edx, [ebp+var_1A]
test	edx, edx
jz	short loc_496C27

loc_496C1E:
mov	[ebp+var_34], 1
jmp	short loc_496C2E

loc_496C27:
mov	[ebp+var_34], 0

loc_496C2E:
mov	al, byte ptr [ebp+var_34]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_496C40
and	[ebp+var_C], 0FFFFFFFEh

loc_496C40:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_496C76
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498F30
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_496C74
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_496C74:
jmp	short loc_496CA2

loc_496C76:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498F30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_496CA2
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_496CA2:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_496B80 endp

align 10h


; Attributes: bp-based frame

sub_496CF0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_498F30
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_496D46
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_496CF0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_496D46:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_496D55:
cmp	[ebp+arg_0], 0
jz	short loc_496DC2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_498F30
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_496DB1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_496CF0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_496DB1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_496D55

loc_496DC2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_496CF0 endp

align 10h


; Attributes: bp-based frame

sub_496DD0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1A=	byte ptr -1Ah
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_496E17
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498F80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_496EF2

loc_496E17:
cmp	[ebp+arg_10], 0
jnz	short loc_496E77
cmp	[ebp+arg_C], 0
jnz	short loc_496E6E
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_496E54
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setl	al
mov	[ebp+var_1A], al
jmp	short loc_496E66
jmp	short loc_496E66

loc_496E54:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_18]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_1A], cl

loc_496E66:
movzx	edx, [ebp+var_1A]
test	edx, edx
jz	short loc_496E77

loc_496E6E:
mov	[ebp+var_34], 1
jmp	short loc_496E7E

loc_496E77:
mov	[ebp+var_34], 0

loc_496E7E:
mov	al, byte ptr [ebp+var_34]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_496E90
and	[ebp+var_C], 0FFFFFFFEh

loc_496E90:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_496EC6
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498F80
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_496EC4
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_496EC4:
jmp	short loc_496EF2

loc_496EC6:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498F80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_496EF2
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_496EF2:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_496DD0 endp

align 10h


; Attributes: bp-based frame

sub_496F40 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
jmp	short loc_496F5A

loc_496F4B:
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_0], eax

loc_496F5A:
lea	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_14]
setnz	al
mov	[ebp+var_19], al
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jz	short loc_496F96
mov	edx, [ebp+arg_0]
add	edx, 10h
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_18]
call	sub_48ECC0
jmp	short loc_496F4B

loc_496F96:
mov	esp, ebp
pop	ebp
retn	8
sub_496F40 endp

align 10h


; Attributes: bp-based frame

sub_496FA0 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_49718F
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_497009
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49B8E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497491

loc_497009:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_497057
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	loc_497491
jmp	loc_49718A

loc_497057:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_49708E
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497491

loc_49708E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_4970D8
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	loc_497491

loc_4970D8:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_497159
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_497132
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	loc_497491
jmp	short loc_497157

loc_497132:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	loc_497491

loc_497157:
jmp	short loc_49718A

loc_497159:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49B8E0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497491

loc_49718A:
jmp	loc_497491

loc_49718F:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_497231
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_4971FB
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	loc_497491
jmp	short loc_49722C

loc_4971FB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49B8E0
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497491

loc_49722C:
jmp	loc_497491

loc_497231:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_4972AB
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_4972AB
mov	[ebp+var_15C], 1
jmp	short loc_4972B5

loc_4972AB:
mov	[ebp+var_15C], 0

loc_4972B5:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4972CA
and	[ebp+var_4C], 0FFFFFFFEh

loc_4972CA:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_49732C
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_497302
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	loc_497491
jmp	short loc_497327

loc_497302:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	loc_497491

loc_497327:
jmp	loc_497491

loc_49732C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_49737E
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_49737E:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_4973CF
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4973CF
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_4973C3
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_4973CF

loc_4973C3:
mov	[ebp+var_160], 1
jmp	short loc_4973D9

loc_4973CF:
mov	[ebp+var_160], 0

loc_4973D9:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_4973EE
and	[ebp+var_4C], 0FFFFFFFDh

loc_4973EE:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_497447
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_497423
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	short loc_497491
jmp	short loc_497445

loc_497423:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_49B7A0
mov	eax, [ebp+arg_0]
jmp	short loc_497491

loc_497445:
jmp	short loc_497491

loc_497447:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_497465
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_497491
jmp	short loc_497491

loc_497465:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49B8E0
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_497491:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_496FA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4974A0(void *)
sub_4974A0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_4974CF
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4974CF:
mov	esp, ebp
pop	ebp
retn
sub_4974A0 endp

align 10h


; Attributes: bp-based frame

sub_4974E0 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4976CF
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_497549
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BAA0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1

loc_497549:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_497597
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1
jmp	loc_4976CA

loc_497597:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_4975CE
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1

loc_4975CE:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_497618
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1

loc_497618:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_497699
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_497672
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1
jmp	short loc_497697

loc_497672:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1

loc_497697:
jmp	short loc_4976CA

loc_497699:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49BAA0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1

loc_4976CA:
jmp	loc_4979D1

loc_4976CF:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_497771
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_49773B
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1
jmp	short loc_49776C

loc_49773B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BAA0
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1

loc_49776C:
jmp	loc_4979D1

loc_497771:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_4977EB
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_4977EB
mov	[ebp+var_15C], 1
jmp	short loc_4977F5

loc_4977EB:
mov	[ebp+var_15C], 0

loc_4977F5:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_49780A
and	[ebp+var_4C], 0FFFFFFFEh

loc_49780A:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_49786C
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_497842
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1
jmp	short loc_497867

loc_497842:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	loc_4979D1

loc_497867:
jmp	loc_4979D1

loc_49786C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4978BE
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_4978BE:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_49790F
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_49790F
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_497903
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_49790F

loc_497903:
mov	[ebp+var_160], 1
jmp	short loc_497919

loc_49790F:
mov	[ebp+var_160], 0

loc_497919:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_49792E
and	[ebp+var_4C], 0FFFFFFFDh

loc_49792E:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_497987
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_497963
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	short loc_4979D1
jmp	short loc_497985

loc_497963:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
jmp	short loc_4979D1

loc_497985:
jmp	short loc_4979D1

loc_497987:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_4979A5
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4979D1
jmp	short loc_4979D1

loc_4979A5:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BAA0
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4979D1:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4974E0 endp

align 10h


; Attributes: bp-based frame

sub_4979E0 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_497BCF
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_497A49
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BDA0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497ED1

loc_497A49:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_497A97
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	loc_497ED1
jmp	loc_497BCA

loc_497A97:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_497ACE
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497ED1

loc_497ACE:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_497B18
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	loc_497ED1

loc_497B18:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_497B99
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_497B72
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	loc_497ED1
jmp	short loc_497B97

loc_497B72:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	loc_497ED1

loc_497B97:
jmp	short loc_497BCA

loc_497B99:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49BDA0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497ED1

loc_497BCA:
jmp	loc_497ED1

loc_497BCF:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_497C71
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_497C3B
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	loc_497ED1
jmp	short loc_497C6C

loc_497C3B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BDA0
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_497ED1

loc_497C6C:
jmp	loc_497ED1

loc_497C71:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_497CEB
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_497CEB
mov	[ebp+var_15C], 1
jmp	short loc_497CF5

loc_497CEB:
mov	[ebp+var_15C], 0

loc_497CF5:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_497D0A
and	[ebp+var_4C], 0FFFFFFFEh

loc_497D0A:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_497D6C
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_497D42
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	loc_497ED1
jmp	short loc_497D67

loc_497D42:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	loc_497ED1

loc_497D67:
jmp	loc_497ED1

loc_497D6C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_497DBE
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_497DBE:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_497E0F
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_497E0F
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_497E03
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_497E0F

loc_497E03:
mov	[ebp+var_160], 1
jmp	short loc_497E19

loc_497E0F:
mov	[ebp+var_160], 0

loc_497E19:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_497E2E
and	[ebp+var_4C], 0FFFFFFFDh

loc_497E2E:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_497E87
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_497E63
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	short loc_497ED1
jmp	short loc_497E85

loc_497E63:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_49BC60
mov	eax, [ebp+arg_0]
jmp	short loc_497ED1

loc_497E85:
jmp	short loc_497ED1

loc_497E87:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_497EA5
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_497ED1
jmp	short loc_497ED1

loc_497EA5:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_49BDA0
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_497ED1:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4979E0 endp

align 10h


; Attributes: bp-based frame

sub_497EE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49C020
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_497EE0 endp

align 10h


; Attributes: bp-based frame

sub_497F20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49C0F0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_497F20 endp

align 10h


; Attributes: bp-based frame

sub_497F60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49C1F0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_497F60 endp

align 10h


; Attributes: bp-based frame

sub_497FA0 proc	near

var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_70=	dword ptr -70h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_94]
cmp	eax, [ebp+arg_0]
jz	loc_49810F
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_94]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_498000:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_95], cl
movzx	edx, [ebp+var_95]
test	edx, edx
jz	short loc_498074
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_498074
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_44]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	edx, [ebp+var_44]
push	edx
lea	ecx, [ebp+var_1C]
call	sub_4ABD70
jmp	short loc_498000

loc_498074:
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4980B5
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_48]
call	sub_4046E0
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_94]
call	sub_490040
jmp	short loc_49810F

loc_4980B5:
lea	ecx, [ebp+var_88]
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	edx, [ebp+var_10]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_8C], eax
xor	ecx, ecx
mov	[ebp+var_65], cl
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+var_90]
push	eax
mov	ecx, [ebp+var_8C]
push	ecx
push	ecx
mov	[ebp+var_70], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	ecx, [ebp+var_94]
call	sub_49D660

loc_49810F:
mov	eax, [ebp+var_94]
mov	esp, ebp
pop	ebp
retn	4
sub_497FA0 endp

align 10h


; Attributes: bp-based frame

sub_498120 proc	near

var_34=	dword ptr -34h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
jmp	short loc_498133

loc_49812B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_498133:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_49816F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_4895C0
jmp	short loc_49812B

loc_49816F:
mov	esp, ebp
pop	ebp
retn	10h
sub_498120 endp

align 10h


; Attributes: bp-based frame

sub_498180 proc	near

var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_74=	dword ptr -74h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_94]
cmp	eax, [ebp+arg_0]
jz	loc_49830A
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_94]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_4981E0:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_95], cl
movzx	edx, [ebp+var_95]
test	edx, edx
jz	short loc_49826F
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_49826F
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_498840
jmp	loc_4981E0

loc_49826F:
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_10]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4982B0
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_94]
call	sub_498FD0
jmp	short loc_49830A

loc_4982B0:
lea	eax, [ebp+var_88]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	ecx, [ebp+var_10]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_8C], edx
xor	eax, eax
mov	[ebp+var_69], al
lea	ecx, [ebp+var_69]
push	ecx
mov	edx, [ebp+var_90]
push	edx
mov	eax, [ebp+var_8C]
push	eax
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	ecx, [ebp+var_94]
call	sub_49D6B0

loc_49830A:
mov	eax, [ebp+var_94]
mov	esp, ebp
pop	ebp
retn	4
sub_498180 endp

align 10h


; Attributes: bp-based frame

sub_498320 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_498333

loc_49832B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_498333:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_49836F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_489640
jmp	short loc_49832B

loc_49836F:
mov	esp, ebp
pop	ebp
retn	10h
sub_498320 endp

align 10h


; Attributes: bp-based frame

sub_498380 proc	near

var_48=	dword ptr -48h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
jmp	short loc_498393

loc_49838B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_498393:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4983CF
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_48]
call	sub_4896C0
jmp	short loc_49838B

loc_4983CF:
mov	esp, ebp
pop	ebp
retn	10h
sub_498380 endp

align 10h


; Attributes: bp-based frame

sub_4983E0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_4983FF

loc_4983F3:
mov	edx, [ebp+var_8]
add	edx, 0DCh
mov	[ebp+var_8], edx

loc_4983FF:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_498429
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_1081770
xor	edx, edx
and	edx, 1
jz	short loc_498427
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_498427:
jmp	short loc_4983F3

loc_498429:
mov	esp, ebp
pop	ebp
retn
sub_4983E0 endp

align 10h


; Attributes: bp-based frame

sub_498430 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_49844C

loc_498443:
mov	edx, [ebp+var_8]
add	edx, 50h
mov	[ebp+var_8], edx

loc_49844C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_498481
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_49847F
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49847F:
jmp	short loc_498443

loc_498481:
mov	esp, ebp
pop	ebp
retn
sub_498430 endp

align 10h


; Attributes: bp-based frame

sub_498490 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A8120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
jmp	short loc_4984C1

loc_4984B8:
mov	edx, [ebp+var_18]
add	edx, 24h
mov	[ebp+var_18], edx

loc_4984C1:
mov	eax, [ebp+var_18]
cmp	eax, [ebp+arg_4]
jz	short loc_498502
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_14]
call	sub_4892F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
xor	eax, eax
and	eax, 1
jz	short loc_498500
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_498500:
jmp	short loc_4984B8

loc_498502:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_498490 endp



; Attributes: bp-based frame

sub_498510 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
jmp	short loc_49852C

loc_498523:
mov	edx, [ebp+var_C]
add	edx, 0Ch
mov	[ebp+var_C], edx

loc_49852C:
mov	eax, [ebp+var_C]
cmp	eax, [ebp+arg_4]
jz	short loc_498569
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_498554
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA90

loc_498554:
xor	edx, edx
and	edx, 1
jz	short loc_498567
mov	eax, [ebp+var_C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_498567:
jmp	short loc_498523

loc_498569:
mov	esp, ebp
pop	ebp
retn
sub_498510 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_498570(void *, int)
sub_498570 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4985F3
mov	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_4]
call	sub_499290
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_38]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	dl, [ecx+14h]
mov	eax, [ebp+var_4]
mov	[eax+14h], dl
mov	ecx, [ebp+var_38]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_40], edx
jmp	short loc_4985FA

loc_4985F3:
mov	[ebp+var_40], 0

loc_4985FA:
mov	esp, ebp
pop	ebp
retn
sub_498570 endp

align 10h


; Attributes: bp-based frame

sub_498600 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_49861C

loc_498613:
mov	edx, [ebp+var_8]
add	edx, 18h
mov	[ebp+var_8], edx

loc_49861C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_498646
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_5021C0
xor	edx, edx
and	edx, 1
jz	short loc_498644
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_498644:
jmp	short loc_498613

loc_498646:
mov	esp, ebp
pop	ebp
retn
sub_498600 endp

align 10h


; Attributes: bp-based frame

sub_498650 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49C250
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_498650 endp

align 10h


; Attributes: bp-based frame

sub_498680 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49C290
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_498680 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4986B0(void *, int)
sub_4986B0 proc	near

var_70=	dword ptr -70h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	90h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49870A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_4908E0
mov	eax, [ebp+var_8]
mov	[ebp+var_70], eax
jmp	short loc_498711

loc_49870A:
mov	[ebp+var_70], 0

loc_498711:
mov	esp, ebp
pop	ebp
retn
sub_4986B0 endp

align 10h


; Attributes: bp-based frame

sub_498720 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_498759
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_1087E70
mov	[ebp+var_C], eax
jmp	short loc_498760

loc_498759:
mov	[ebp+var_C], 0

loc_498760:
mov	esp, ebp
pop	ebp
retn
sub_498720 endp

align 10h


; Attributes: bp-based frame

sub_498770 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+4]
mov	[eax+4], dl
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+5]
mov	[eax+5], dl
mov	eax, [ebp+var_30]
add	eax, 8
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4990B0
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	[edx+20h], ecx
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_498770 endp

align 10h


; Attributes: bp-based frame

sub_4987D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx]
mov	[eax], dx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+2]
mov	[eax+2], dx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+4]
mov	[eax+4], dx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+6]
mov	[eax+6], dx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_498835
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_498835:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4987D0 endp

align 10h


; Attributes: bp-based frame

sub_498840 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 54h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+7Ch]
mov	[eax+7Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498840 endp

align 10h


; Attributes: bp-based frame

sub_4988A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+4]
mov	[eax+4], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+5]
mov	[eax+5], dl
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_4]
call	sub_49AE10
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	[edx+20h], ecx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4988A0 endp

align 10h


; Attributes: bp-based frame

sub_498900 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx]
mov	[eax], dx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+2]
mov	[eax+2], dx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+4]
mov	[eax+4], dx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+6]
mov	[eax+6], dx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_49898B
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_49896F
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA90

loc_49896F:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_49898B
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_49898B:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_498900 endp

align 10h


; Attributes: bp-based frame

sub_4989A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 54h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+7Ch]
mov	[eax+7Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4989A0 endp

align 10h


; Attributes: bp-based frame

sub_498A00 proc	near

var_AC=	dword ptr -0ACh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_AC]
add	ecx, 28h
call	sub_4884D0
mov	edx, [ebp+arg_0]
add	edx, 30h
push	edx
mov	ecx, [ebp+var_AC]
add	ecx, 30h
call	sub_4885C0
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn	4
sub_498A00 endp

align 10h


; Attributes: bp-based frame

sub_498A70 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_5DDE90
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+10h], eax
mov	edx, [edx+4]
mov	[ecx+14h], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498A70 endp

align 10h


; Attributes: bp-based frame

sub_498AD0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_4E1E10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49C330
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498AD0 endp

align 10h


; Attributes: bp-based frame

sub_498B20 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CBA0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_49D770
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498B20 endp



; Attributes: bp-based frame

sub_498B80 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_499050
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49C3A0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498B80 endp

align 10h


; Attributes: bp-based frame

sub_498BD0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_526A40
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
add	edx, 10h
mov	eax, [ebp+arg_0]
call	sub_409EC0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498BD0 endp

align 10h


; Attributes: bp-based frame

sub_498C20 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 3333333h
mov	[ebp+var_10], 3333333h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_498C5D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_498C63

loc_498C5D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_498C63:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_498C76
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_498C76:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 3333333h
mov	[ebp+var_1C], 3333333h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_498CAC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_498CB2

loc_498CAC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_498CB2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_498CC2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_498CEC

loc_498CC2:
mov	[ebp+var_20], 3333333h
mov	[ebp+var_24], 3333333h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_498CE0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_498CE6

loc_498CE0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_498CE6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_498CEC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498C20 endp

align 10h


; Attributes: bp-based frame

sub_498D00 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_526A40
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498D00 endp

align 10h


; Attributes: bp-based frame

sub_498D60 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_49C410
add	esp, 8
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_54]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_498DD3
mov	ecx, [ebp+var_50]
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_498DD3:
mov	esp, ebp
pop	ebp
retn
sub_498D60 endp

align 10h


; Attributes: bp-based frame

sub_498DE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 71C71C7h
jbe	short loc_498E0B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_498E0B:
cmp	[ebp+arg_0], 0
jz	short loc_498E42
mov	ecx, [ebp+arg_0]
imul	ecx, 24h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 24h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_498E49

loc_498E42:
mov	[ebp+var_10], 0

loc_498E49:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_498DE0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_498E60 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49C440
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498E60 endp

align 10h


; Attributes: bp-based frame

sub_498EB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 0AAAAAAAh
jbe	short loc_498EDB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_498EDB:
cmp	[ebp+arg_0], 0
jz	short loc_498F12
mov	ecx, [ebp+arg_0]
imul	ecx, 18h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 18h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_498F19

loc_498F12:
mov	[ebp+var_10], 0

loc_498F19:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_498EB0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_498F30 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7AA0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498F30 endp

align 10h


; Attributes: bp-based frame

sub_498F80 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_503180
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49C4B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_498F80 endp

align 10h


; Attributes: bp-based frame

sub_498FD0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_498FD9:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_499030
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_499210
jmp	short loc_498FD9

loc_499030:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_498FD0 endp

align 10h


; Attributes: bp-based frame

sub_499050 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], offset loc_ED7303
jbe	short loc_499076
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_499076:
cmp	[ebp+arg_0], 0
jz	short loc_49909F
mov	eax, [ebp+arg_0]
imul	eax, 114h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4990A6

loc_49909F:
mov	[ebp+var_C], 0

loc_4990A6:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_499050 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_4990B0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_499197
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_49AD30
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_499154:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_499168
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_499154

loc_499168:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_49917A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_49918E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_49917A

loc_49918E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_499197:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_4990B0 endp

align 10h


; Attributes: bp-based frame

sub_4991B0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_28]
call	sub_499290
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	dl, [ecx+14h]
mov	eax, [ebp+var_28]
mov	[eax+14h], dl
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+10h], 0
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_4991B0 endp

align 10h


; Attributes: bp-based frame

sub_499210 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
push	0
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_49C540
cmp	[ebp+var_C], 0
jz	short loc_499271
mov	ecx, 1
imul	ecx, 88h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_499271:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_499210 endp

align 10h


; Attributes: bp-based frame

sub_499290 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_20]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_20]
cmp	dword ptr [ecx+4], 0
jz	short loc_4992EE
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
mov	ecx, [ebp+var_20]
mov	[eax+4], ecx

loc_4992EE:
mov	edx, [ebp+var_20]
mov	eax, [edx+0Ch]
cmp	eax, [ebp+var_18]
jnz	short loc_499302
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_20]
mov	[ecx+0Ch], edx

loc_499302:
mov	eax, [ebp+var_20]
mov	ecx, [eax+8]
cmp	ecx, [ebp+var_18]
jnz	short loc_499316
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_20]
mov	[edx+8], eax

loc_499316:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	[ecx+8], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	[eax+0Ch], ecx
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_499290 endp

align 10h


; Attributes: bp-based frame

sub_499350 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_499397
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_490A50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_499449

loc_499397:
cmp	[ebp+arg_10], 0
jnz	short loc_4993CE
cmp	[ebp+arg_C], 0
jnz	short loc_4993C5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4993CE

loc_4993C5:
mov	[ebp+var_34], 1
jmp	short loc_4993D5

loc_4993CE:
mov	[ebp+var_34], 0

loc_4993D5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4993E7
and	[ebp+var_C], 0FFFFFFFEh

loc_4993E7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_49941D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_490A50
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_49941B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_49941B:
jmp	short loc_499449

loc_49941D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_490A50
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_499449
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_499449:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_499350 endp

align 10h


; Attributes: bp-based frame

sub_499490 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_4994AC:
cmp	[ebp+var_10], 0
jz	short loc_4994F6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4994E5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_4994EE

loc_4994E5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_4994EE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_4994AC

loc_4994F6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_499598
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_499589
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_499350
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_499611
jmp	short loc_499598

loc_499589:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_499598:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_4995F6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_499350
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_499611

loc_4995F6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_499611:
mov	esp, ebp
pop	ebp
retn	8
sub_499490 endp

align 10h


; Attributes: bp-based frame

sub_499620 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_49D080
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_49C5E0
lea	ecx, [ebp+var_8]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn	10h
sub_499620 endp

align 10h


; Attributes: bp-based frame

sub_499670 proc	near

var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_D8], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D9], dl
movzx	eax, [ebp+var_D9]
test	eax, eax
jz	loc_499924
jmp	short loc_499735

loc_49972D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_499735:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_DA], dl
movzx	eax, [ebp+var_DA]
test	eax, eax
jz	loc_49981A
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_8C]
xor	eax, eax
cmp	edx, [ebp+var_90]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_499815
mov	[ebp+var_15], 0
lea	edx, [ebp+var_9C]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_1C]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A4]
mov	eax, [edx]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_15]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_49996A

loc_499815:
jmp	loc_49972D

loc_49981A:
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ecx]
mov	[ebp+var_B0], edx
lea	eax, [ebp+var_B8]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_AC]
mov	edx, [ebp+var_B0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_D8]
add	ecx, 4
call	sub_49CC00
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_B8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ebp+var_B4]
mov	[ecx], edx
mov	eax, [ebp+var_B4]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_28]
mov	[ebp+var_E0], ecx
mov	edx, [ebp+var_E0]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx+14h]
add	edx, 1
mov	eax, [ebp+var_D8]
mov	[eax+14h], edx
mov	[ebp+var_29], 1
lea	ecx, [ebp+var_C4]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_BC]
mov	[eax], ecx
mov	edx, [ebp+var_C4]
mov	[ebp+var_30], edx
lea	eax, [ebp+var_30]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_C8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C8]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_49996A

loc_499924:
mov	[ebp+var_35], 1
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
lea	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_D8]
call	sub_49CC40
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ecx]
mov	[ebp+var_D0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_D0]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_35]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_49996A:
mov	esp, ebp
pop	ebp
retn	8
sub_499670 endp



; Attributes: bp-based frame

sub_499970 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_4999D2
jmp	short loc_4999ED

loc_4999D2:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_49CD40

loc_4999ED:
mov	esp, ebp
pop	ebp
retn	4
sub_499970 endp

align 10h


; Attributes: bp-based frame

sub_499A00 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_49CFF0
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_49C690
lea	ecx, [ebp+var_8]
call	sub_48A9D0
mov	esp, ebp
pop	ebp
retn	10h
sub_499A00 endp

align 10h


; Attributes: bp-based frame

sub_499A50 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_499A97
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_49C740
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_499B4A

loc_499A97:
cmp	[ebp+arg_10], 0
jnz	short loc_499ACF
cmp	[ebp+arg_C], 0
jnz	short loc_499AC6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_499ACF

loc_499AC6:
mov	[ebp+var_34], 1
jmp	short loc_499AD6

loc_499ACF:
mov	[ebp+var_34], 0

loc_499AD6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_499AE8
and	[ebp+var_C], 0FFFFFFFEh

loc_499AE8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_499B1E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_49C740
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_499B1C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_499B1C:
jmp	short loc_499B4A

loc_499B1E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_49C740
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_499B4A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_499B4A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_499A50 endp

align 10h


; Attributes: bp-based frame

sub_499B90 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_499BAC:
cmp	[ebp+var_10], 0
jz	short loc_499BF7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_499BE6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_499BEF

loc_499BE6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_499BEF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_499BAC

loc_499BF7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_499C99
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_499C8A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_499A50
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_499D13
jmp	short loc_499C99

loc_499C8A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_499C99:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_499CF8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_499A50
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_499D13

loc_499CF8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_499D13:
mov	esp, ebp
pop	ebp
retn	8
sub_499B90 endp

align 10h


; Attributes: bp-based frame

sub_499D20 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_499D67
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6E80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_499E19

loc_499D67:
cmp	[ebp+arg_10], 0
jnz	short loc_499D9E
cmp	[ebp+arg_C], 0
jnz	short loc_499D95
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_499D9E

loc_499D95:
mov	[ebp+var_34], 1
jmp	short loc_499DA5

loc_499D9E:
mov	[ebp+var_34], 0

loc_499DA5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_499DB7
and	[ebp+var_C], 0FFFFFFFEh

loc_499DB7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_499DED
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6E80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_499DEB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_499DEB:
jmp	short loc_499E19

loc_499DED:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6E80
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_499E19
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_499E19:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_499D20 endp

align 10h


; Attributes: bp-based frame

sub_499E60 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_499E7C:
cmp	[ebp+var_10], 0
jz	short loc_499EC6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_499EB5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_499EBE

loc_499EB5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_499EBE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_499E7C

loc_499EC6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_499F68
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_499F59
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_499D20
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_499FE1
jmp	short loc_499F68

loc_499F59:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_499F68:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_499FC6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_499D20
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_499FE1

loc_499FC6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_499FE1:
mov	esp, ebp
pop	ebp
retn	8
sub_499E60 endp

align 10h


; Attributes: bp-based frame

sub_499FF0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_49D110
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_499FF0 endp

align 10h


; Attributes: bp-based frame

sub_49A020 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_49A04E

loc_49A045:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_49A04E:
cmp	[ebp+var_8], 0
jle	short loc_49A086
mov	eax, [ebp+var_C]
sub	eax, 50h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
sub	ecx, 50h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_10]
call	sub_4023E0
mov	eax, [ebp+var_C]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_4023E0
jmp	short loc_49A045

loc_49A086:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_49A020 endp

align 10h


; Attributes: bp-based frame

sub_49A090 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_49A0C1

loc_49A0AF:
mov	edx, [ebp+var_C]
add	edx, 50h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_49A0C1:
cmp	[ebp+var_8], 0
jle	short loc_49A0E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_4023E0
mov	edx, [ebp+arg_8]
add	edx, 28h
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 28h
call	sub_4023E0
jmp	short loc_49A0AF

loc_49A0E7:
mov	esp, ebp
pop	ebp
retn
sub_49A090 endp

align 10h


; Attributes: bp-based frame

sub_49A0F0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_49D1F0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_49A0F0 endp

align 10h


; Attributes: bp-based frame

sub_49A120 proc	near

var_62=	byte ptr -62h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_18], eax
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
xor	edx, edx
div	[ebp+var_18]
mov	[ebp+var_C], edx
mov	edx, [ebp+var_60]
mov	eax, [edx+8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_20]
mov	eax, [edx+ecx*4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_60]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_28]
mov	eax, [edx+ecx*4+4]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_8], ecx
jmp	short loc_49A18E

loc_49A186:
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_49A18E:
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_30]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setnz	al
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jz	short loc_49A1EB
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_48], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_48]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_49A1EB
jmp	short loc_49A186

loc_49A1EB:
lea	edx, [ebp+var_58]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_54]
mov	edx, [ebp+var_50]
mov	[ecx], edx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_58]
setnz	cl
mov	[ebp+var_62], cl
movzx	edx, [ebp+var_62]
test	edx, edx
jz	short loc_49A22A
mov	eax, [ebp+var_4]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_5C]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
jmp	short loc_49A236
jmp	short loc_49A236

loc_49A22A:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	eax, [ebp+arg_0]

loc_49A236:
mov	esp, ebp
pop	ebp
retn	8
sub_49A120 endp

align 10h


; Attributes: bp-based frame

sub_49A240 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_49A287
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_49C790
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49A339

loc_49A287:
cmp	[ebp+arg_10], 0
jnz	short loc_49A2BE
cmp	[ebp+arg_C], 0
jnz	short loc_49A2B5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_49A2BE

loc_49A2B5:
mov	[ebp+var_34], 1
jmp	short loc_49A2C5

loc_49A2BE:
mov	[ebp+var_34], 0

loc_49A2C5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_49A2D7
and	[ebp+var_C], 0FFFFFFFEh

loc_49A2D7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_49A30D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_49C790
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_49A30B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_49A30B:
jmp	short loc_49A339

loc_49A30D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_49C790
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_49A339
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_49A339:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_49A240 endp

align 10h


; Attributes: bp-based frame

sub_49A380 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49A39C:
cmp	[ebp+var_10], 0
jz	short loc_49A3E6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_49A3D5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_49A3DE

loc_49A3D5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_49A3DE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_49A39C

loc_49A3E6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_49A488
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_49A479
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_49A240
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_49A501
jmp	short loc_49A488

loc_49A479:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49A488:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_49A4E6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_49A240
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_49A501

loc_49A4E6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_49A501:
mov	esp, ebp
pop	ebp
retn	8
sub_49A380 endp

align 10h


; Attributes: bp-based frame

sub_49A510 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_48], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_48]
jnz	short loc_49A557
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_48]
call	sub_49C7E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49A656

loc_49A557:
cmp	[ebp+arg_10], 0
jnz	short loc_49A5DB
cmp	[ebp+arg_C], 0
jnz	short loc_49A5D2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_20]
cmp	ecx, [ebp+var_24]
jl	short loc_49A5C3
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_28]
cmp	eax, [ebp+var_2C]
jnz	short loc_49A5BA
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_30]
cmp	edx, [ebp+var_34]
jb	short loc_49A5C3

loc_49A5BA:
mov	[ebp+var_4C], 0
jmp	short loc_49A5CA

loc_49A5C3:
mov	[ebp+var_4C], 1

loc_49A5CA:
movzx	eax, byte ptr [ebp+var_4C]
test	eax, eax
jz	short loc_49A5DB

loc_49A5D2:
mov	[ebp+var_50], 1
jmp	short loc_49A5E2

loc_49A5DB:
mov	[ebp+var_50], 0

loc_49A5E2:
mov	cl, byte ptr [ebp+var_50]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_49A5F4
and	[ebp+var_C], 0FFFFFFFEh

loc_49A5F4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_49A62A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_48]
call	sub_49C7E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_49A628
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_49A628:
jmp	short loc_49A656

loc_49A62A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_48]
call	sub_49C7E0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_48]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_49A656
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_49A656:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_48]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_48]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_48]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_49A510 endp

align 10h


; Attributes: bp-based frame

sub_49A6A0 proc	near

var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49A6C8:
cmp	[ebp+var_10], 0
jz	loc_49A77A
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_3C]
cmp	eax, [ebp+var_40]
jl	short loc_49A737
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_44]
cmp	edx, [ebp+var_48]
jnz	short loc_49A72B
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_4C]
cmp	ecx, [ebp+var_50]
jb	short loc_49A737

loc_49A72B:
mov	[ebp+var_8C], 0
jmp	short loc_49A741

loc_49A737:
mov	[ebp+var_8C], 1

loc_49A741:
mov	dl, byte ptr [ebp+var_8C]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_49A760
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_90], edx
jmp	short loc_49A76C

loc_49A760:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_90], ecx

loc_49A76C:
mov	edx, [ebp+var_90]
mov	[ebp+var_10], edx
jmp	loc_49A6C8

loc_49A77A:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_49A828
mov	ecx, [ebp+var_88]
mov	edx, [ecx+8]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_54]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_5C]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_58]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_5C]
setz	dl
mov	[ebp+var_91], dl
movzx	eax, [ebp+var_91]
test	eax, eax
jz	short loc_49A819
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_88]
call	sub_49A510
mov	[ebp+var_60], eax
mov	edx, [ebp+var_60]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_49A902
jmp	short loc_49A828

loc_49A819:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49A828:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_6C]
cmp	edx, [ebp+var_70]
jl	short loc_49A887
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_74], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_74]
cmp	ecx, [ebp+var_78]
jnz	short loc_49A87B
mov	edx, [ebp+var_64]
mov	eax, [edx+4]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_7C]
cmp	eax, [ebp+var_80]
jb	short loc_49A887

loc_49A87B:
mov	[ebp+var_98], 0
jmp	short loc_49A891

loc_49A887:
mov	[ebp+var_98], 1

loc_49A891:
mov	cl, byte ptr [ebp+var_98]
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_49A8E7
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_88]
call	sub_49A510
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_49A902

loc_49A8E7:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_49A902:
mov	esp, ebp
pop	ebp
retn	8
sub_49A6A0 endp

align 10h


; Attributes: bp-based frame

sub_49A910 proc	near

var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_68=	dword ptr -68h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_9C]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_49A9E9
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
xor	ecx, ecx
mov	[ebp+var_25], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_510100
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+var_24]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_9C]
call	sub_50F2B0
mov	edx, [ebp+var_8]
imul	edx, 0Ch
add	edx, [ebp+var_C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_4]
imul	edx, 0Ch
add	edx, [ebp+var_C]
mov	eax, [ebp+var_9C]
mov	[eax+4], edx
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_68]
mov	[ecx+8], edx
jmp	loc_49AAB2

loc_49A9E9:
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_9C]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_49AA42
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	eax, [ebp+var_9C]
mov	ecx, [eax+4]
mov	[ebp+var_7C], ecx
xor	edx, edx
mov	[ebp+var_75], dl
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_10]
mov	[eax+4], ecx
jmp	short loc_49AAB2

loc_49AA42:
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_9C]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
imul	edx, 0Ch
add	edx, [ebp+var_14]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5E8DC0
add	esp, 0Ch
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_51EF50
add	esp, 0Ch
mov	edx, [ebp+var_9C]
mov	[edx+4], eax

loc_49AAB2:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49A910 endp

align 10h


; Attributes: bp-based frame

sub_49AAC0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_49AAD8:
cmp	[ebp+var_8], 0
jz	loc_49AB6C
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_14]
cmp	edx, [ebp+var_18]
jl	short loc_49AB3E
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_20]
jnz	short loc_49AB35
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_24]
cmp	eax, [ebp+var_28]
jb	short loc_49AB3E

loc_49AB35:
mov	[ebp+var_50], 0
jmp	short loc_49AB45

loc_49AB3E:
mov	[ebp+var_50], 1

loc_49AB45:
movzx	ecx, byte ptr [ebp+var_50]
test	ecx, ecx
jnz	short loc_49AB5E
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_49AB67

loc_49AB5E:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_49AB67:
jmp	loc_49AAD8

loc_49AB6C:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_4C]
jz	short loc_49ABE5
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_38]
jl	short loc_49ABD0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_3C]
cmp	eax, [ebp+var_40]
jnz	short loc_49ABC7
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_44]
cmp	edx, [ebp+var_48]
jb	short loc_49ABD0

loc_49ABC7:
mov	[ebp+var_54], 0
jmp	short loc_49ABD7

loc_49ABD0:
mov	[ebp+var_54], 1

loc_49ABD7:
movzx	eax, byte ptr [ebp+var_54]
test	eax, eax
jz	short loc_49ABE5
mov	ecx, [ebp+var_4C]
mov	[ebp+var_4], ecx

loc_49ABE5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49AAC0 endp

align 10h


; Attributes: bp-based frame

sub_49ABF0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_49AC37
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_49C830
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49ACE9

loc_49AC37:
cmp	[ebp+arg_10], 0
jnz	short loc_49AC6E
cmp	[ebp+arg_C], 0
jnz	short loc_49AC65
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_49AC6E

loc_49AC65:
mov	[ebp+var_34], 1
jmp	short loc_49AC75

loc_49AC6E:
mov	[ebp+var_34], 0

loc_49AC75:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_49AC87
and	[ebp+var_C], 0FFFFFFFEh

loc_49AC87:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_49ACBD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_49C830
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_49ACBB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_49ACBB:
jmp	short loc_49ACE9

loc_49ACBD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_49C830
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_49ACE9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_49ACE9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_49ABF0 endp

align 10h


; Attributes: bp-based frame

sub_49AD30 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_49C830
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_49AD86
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_49AD30
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_49AD86:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_49AD95:
cmp	[ebp+arg_0], 0
jz	short loc_49AE02
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_49C830
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_49ADF1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_49AD30
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_49ADF1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_49AD95

loc_49AE02:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_49AD30 endp

align 10h


; Attributes: bp-based frame

sub_49AE10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_49AEE7
mov	ecx, [ebp+var_14]
call	sub_4892F0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_49AE70
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_49AEE7

loc_49AE70:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_49AD30
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_49AE98:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_49AEAC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_49AE98

loc_49AEAC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_49AEBE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_49AED2
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_49AEBE

loc_49AED2:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_49AEE7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_49AE10 endp



; Attributes: bp-based frame

sub_49AEF0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49AF0C:
cmp	[ebp+var_10], 0
jz	short loc_49AF56
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_49AF45
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_49AF4E

loc_49AF45:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_49AF4E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_49AF0C

loc_49AF56:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_49AFF8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_49AFE9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_49ABF0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_49B071
jmp	short loc_49AFF8

loc_49AFE9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49AFF8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_49B056
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_49ABF0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_49B071

loc_49B056:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_49B071:
mov	esp, ebp
pop	ebp
retn	8
sub_49AEF0 endp

align 10h


; Attributes: bp-based frame

sub_49B080 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49B09C:
cmp	[ebp+var_10], 0
jz	short loc_49B0E7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_49B0D6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_49B0DF

loc_49B0D6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_49B0DF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_49B09C

loc_49B0E7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_49B189
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_49B17A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5E8280
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_49B203
jmp	short loc_49B189

loc_49B17A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49B189:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_49B1E8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5E8280
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_49B203

loc_49B1E8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_49B203:
mov	esp, ebp
pop	ebp
retn	8
sub_49B080 endp

align 10h


; Attributes: bp-based frame

sub_49B210 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_49B257
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_49C880
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49B306

loc_49B257:
cmp	[ebp+arg_10], 0
jnz	short loc_49B28B
cmp	[ebp+arg_C], 0
jnz	short loc_49B282
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_49B28B

loc_49B282:
mov	[ebp+var_34], 1
jmp	short loc_49B292

loc_49B28B:
mov	[ebp+var_34], 0

loc_49B292:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_49B2A4
and	[ebp+var_C], 0FFFFFFFEh

loc_49B2A4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_49B2DA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_49C880
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_49B2D8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_49B2D8:
jmp	short loc_49B306

loc_49B2DA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_49C880
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_49B306
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_49B306:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_49B210 endp

align 10h


; Attributes: bp-based frame

sub_49B350 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49B36C:
cmp	[ebp+var_10], 0
jz	short loc_49B3B3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_49B3A2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_49B3AB

loc_49B3A2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_49B3AB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_49B36C

loc_49B3B3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_49B455
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_49B446
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_49B210
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_49B4CB
jmp	short loc_49B455

loc_49B446:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49B455:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_49B4B0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_49B210
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_49B4CB

loc_49B4B0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_49B4CB:
mov	esp, ebp
pop	ebp
retn	8
sub_49B350 endp

align 10h


; Attributes: bp-based frame

sub_49B4E0 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_49B4F8:
cmp	[ebp+var_8], 0
jz	short loc_49B53F
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_49B534
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_49B53D

loc_49B534:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_49B53D:
jmp	short loc_49B4F8

loc_49B53F:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_24]
jz	short loc_49B572
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_49B572
mov	edx, [ebp+var_24]
mov	[ebp+var_4], edx

loc_49B572:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49B4E0 endp

align 10h


; Attributes: bp-based frame

sub_49B580 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CDCB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_49B5AD:
cmp	[ebp+var_14], 0
jz	short loc_49B60F
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_21]
mov	[ebp+var_34], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_20], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+var_18]
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_49B604
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_49B60D

loc_49B604:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_49B60D:
jmp	short loc_49B5AD

loc_49B60F:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_30]
jz	short loc_49B65D
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_29]
mov	[ebp+var_38], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_28], edx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_1C]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_49B65D
mov	ecx, [ebp+var_30]
mov	[ebp+var_10], ecx

loc_49B65D:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_49B580 endp



; Attributes: bp-based frame

sub_49B670 proc	near

var_1C=	dword ptr -1Ch
var_16=	byte ptr -16h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_49B688:
cmp	[ebp+var_8], 0
jz	short loc_49B6F1
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_49B6BB
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
xor	ecx, ecx
cmp	eax, [edx+4]
setl	cl
mov	[ebp+var_E], cl
jmp	short loc_49B6CD
jmp	short loc_49B6CD

loc_49B6BB:
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_E], dl

loc_49B6CD:
movzx	eax, [ebp+var_E]
test	eax, eax
jnz	short loc_49B6E6
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_49B6EF

loc_49B6E6:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_49B6EF:
jmp	short loc_49B688

loc_49B6F1:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_1C]
jz	short loc_49B746
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_49B726
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setl	dl
mov	[ebp+var_16], dl
jmp	short loc_49B738
jmp	short loc_49B738

loc_49B726:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_16], al

loc_49B738:
movzx	ecx, [ebp+var_16]
test	ecx, ecx
jz	short loc_49B746
mov	edx, [ebp+var_1C]
mov	[ebp+var_4], edx

loc_49B746:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49B670 endp

align 10h


; Attributes: bp-based frame

sub_49B750 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_49D530
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_49C8D0
lea	ecx, [ebp+var_8]
call	sub_48EF10
mov	esp, ebp
pop	ebp
retn	10h
sub_49B750 endp

align 10h


; Attributes: bp-based frame

sub_49B7A0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_49B7E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_49C980
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49B89B

loc_49B7E7:
cmp	[ebp+arg_10], 0
jnz	short loc_49B820
cmp	[ebp+arg_C], 0
jnz	short loc_49B817
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_49B820

loc_49B817:
mov	[ebp+var_44], 1
jmp	short loc_49B827

loc_49B820:
mov	[ebp+var_44], 0

loc_49B827:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_49B839
and	[ebp+var_C], 0FFFFFFFEh

loc_49B839:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_49B86F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_49C980
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_49B86D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_49B86D:
jmp	short loc_49B89B

loc_49B86F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_49C980
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_49B89B
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_49B89B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_49B7A0 endp

align 10h


; Attributes: bp-based frame

sub_49B8E0 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49B908:
cmp	[ebp+var_10], 0
jz	short loc_49B95D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_49B946
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_49B952

loc_49B946:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_49B952:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_49B908

loc_49B95D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_49BA0B
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_49B9FC
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_49B7A0
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_49BA8F
jmp	short loc_49BA0B

loc_49B9FC:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49BA0B:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_49BA74
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_49B7A0
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_49BA8F

loc_49BA74:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_49BA8F:
mov	esp, ebp
pop	ebp
retn	8
sub_49B8E0 endp

align 10h


; Attributes: bp-based frame

sub_49BAA0 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49BAC8:
cmp	[ebp+var_10], 0
jz	short loc_49BB1D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_49BB06
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_49BB12

loc_49BB06:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_49BB12:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_49BAC8

loc_49BB1D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_49BBCB
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_49BBBC
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5AF4C0
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_49BC4F
jmp	short loc_49BBCB

loc_49BBBC:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49BBCB:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_49BC34
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5AF4C0
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_49BC4F

loc_49BC34:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_49BC4F:
mov	esp, ebp
pop	ebp
retn	8
sub_49BAA0 endp

align 10h


; Attributes: bp-based frame

sub_49BC60 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_49BCA7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_49C9D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_49BD5B

loc_49BCA7:
cmp	[ebp+arg_10], 0
jnz	short loc_49BCE0
cmp	[ebp+arg_C], 0
jnz	short loc_49BCD7
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_49BCE0

loc_49BCD7:
mov	[ebp+var_44], 1
jmp	short loc_49BCE7

loc_49BCE0:
mov	[ebp+var_44], 0

loc_49BCE7:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_49BCF9
and	[ebp+var_C], 0FFFFFFFEh

loc_49BCF9:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_49BD2F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_49C9D0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_49BD2D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_49BD2D:
jmp	short loc_49BD5B

loc_49BD2F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_49C9D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_49BD5B
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_49BD5B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_49BC60 endp

align 10h


; Attributes: bp-based frame

sub_49BDA0 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_49BDC8:
cmp	[ebp+var_10], 0
jz	short loc_49BE1D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_49BE06
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_49BE12

loc_49BE06:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_49BE12:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_49BDC8

loc_49BE1D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_49BECB
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_49BEBC
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_49BC60
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_49BF4F
jmp	short loc_49BECB

loc_49BEBC:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_49BECB:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_49BF34
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_49BC60
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_49BF4F

loc_49BF34:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_49BF4F:
mov	esp, ebp
pop	ebp
retn	8
sub_49BDA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49BF60(void *, int)
sub_49BF60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0DCh		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49BFA7
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_10819B0
mov	[ebp+var_C], eax
jmp	short loc_49BFAE

loc_49BFA7:
mov	[ebp+var_C], 0

loc_49BFAE:
mov	esp, ebp
pop	ebp
retn
sub_49BF60 endp

align 10h


; Attributes: bp-based frame

sub_49BFC0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_49BFD3

loc_49BFC8:
mov	eax, [ebp+arg_0]
sub	eax, 0DCh
mov	[ebp+arg_0], eax

loc_49BFD3:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_49C018
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 0DCh
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_1081770
xor	ecx, ecx
and	ecx, 1
jz	short loc_49C016
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49C016:
jmp	short loc_49BFC8

loc_49C018:
mov	esp, ebp
pop	ebp
retn
sub_49BFC0 endp

align 10h


; Attributes: bp-based frame

sub_49C020 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_49C031

loc_49C028:
mov	eax, [ebp+arg_0]
sub	eax, 30h
mov	[ebp+arg_0], eax

loc_49C031:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_49C077
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 30h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_10FB7C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_49C075
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49C075:
jmp	short loc_49C028

loc_49C077:
mov	esp, ebp
pop	ebp
retn
sub_49C020 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49C080(void *, int)
sub_49C080 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	50h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49C0D9
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+arg_4]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_403400
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_49C0E0

loc_49C0D9:
mov	[ebp+var_C], 0

loc_49C0E0:
mov	esp, ebp
pop	ebp
retn
sub_49C080 endp

align 10h


; Attributes: bp-based frame

sub_49C0F0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_49C101

loc_49C0F8:
mov	eax, [ebp+arg_0]
sub	eax, 50h
mov	[ebp+arg_0], eax

loc_49C101:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_49C14F
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 50h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_49C14D
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49C14D:
jmp	short loc_49C0F8

loc_49C14F:
mov	esp, ebp
pop	ebp
retn
sub_49C0F0 endp

align 10h


; Attributes: bp-based frame

sub_49C160 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49C160
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
jmp	short loc_49C186

loc_49C17D:
mov	eax, [ebp+arg_0]
sub	eax, 24h
mov	[ebp+arg_0], eax

loc_49C186:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_49C1E0
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 24h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_4892F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_49C1DE
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49C1DE:
jmp	short loc_49C17D

loc_49C1E0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49C160 endp

align 10h


; Attributes: bp-based frame

sub_49C1F0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_49C201

loc_49C1F8:
mov	eax, [ebp+arg_0]
sub	eax, 18h
mov	[ebp+arg_0], eax

loc_49C201:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_49C244
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 18h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_5021C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_49C242
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49C242:
jmp	short loc_49C1F8

loc_49C244:
mov	esp, ebp
pop	ebp
retn
sub_49C1F0 endp

align 10h


; Attributes: bp-based frame

sub_49C250 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49BFC0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_49C250 endp

align 10h


; Attributes: bp-based frame

sub_49C290 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49D700
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_49C290 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49C2D0(void *, int)
sub_49C2D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49C321
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49C328

loc_49C321:
mov	[ebp+var_C], 0

loc_49C328:
mov	esp, ebp
pop	ebp
retn
sub_49C2D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49C330(void *, int)
sub_49C330 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49C38A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	esi, [ebp+arg_4]
add	esi, 4
mov	edi, [ebp+var_8]
add	edi, 4
mov	ecx, 9
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49C391

loc_49C38A:
mov	[ebp+var_C], 0

loc_49C391:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_49C330 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49C3A0(void *, int)
sub_49C3A0 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	104h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49C3FC
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_4887A0
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
jmp	short loc_49C403

loc_49C3FC:
mov	[ebp+var_1C], 0

loc_49C403:
mov	esp, ebp
pop	ebp
retn
sub_49C3A0 endp

align 10h


; Attributes: bp-based frame

sub_49C410 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49D800
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_49C410 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49C440(void *, int)
sub_49C440 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49C49D
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_8]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_8]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_49C4A4

loc_49C49D:
mov	[ebp+var_C], 0

loc_49C4A4:
mov	esp, ebp
pop	ebp
retn
sub_49C440 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49C4B0(void *, int)
sub_49C4B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49C529
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_8]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
jmp	short loc_49C530

loc_49C529:
mov	[ebp+var_14], 0

loc_49C530:
mov	esp, ebp
pop	ebp
retn
sub_49C4B0 endp

align 10h


; Attributes: bp-based frame

sub_49C540 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_49C579
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49C579:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C540 endp

align 10h


; Attributes: bp-based frame

sub_49C590 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_48EEA0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_5D2630
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_49C5C9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49C5C9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C590 endp

align 10h


; Attributes: bp-based frame

sub_49C5E0 proc	near

var_7C=	dword ptr -7Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_49C686
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_49C641
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	short loc_49C686

loc_49C641:
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49D840
mov	ecx, [ebp+arg_4]
call	sub_5D2630

loc_49C686:
mov	esp, ebp
pop	ebp
retn	8
sub_49C5E0 endp

align 10h


; Attributes: bp-based frame

sub_49C690 proc	near

var_7C=	dword ptr -7Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_49C736
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_49C6F1
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	short loc_49C736

loc_49C6F1:
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49D890
mov	ecx, [ebp+arg_4]
call	sub_48A9D0

loc_49C736:
mov	esp, ebp
pop	ebp
retn	8
sub_49C690 endp

align 10h


; Attributes: bp-based frame

sub_49C740 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49D8E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C740 endp

align 10h


; Attributes: bp-based frame

sub_49C790 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49D960
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C790 endp

align 10h


; Attributes: bp-based frame

sub_49C7E0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49D9D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C7E0 endp

align 10h


; Attributes: bp-based frame

sub_49C830 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49DA40
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C830 endp

align 10h


; Attributes: bp-based frame

sub_49C880 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49DAB0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C880 endp

align 10h


; Attributes: bp-based frame

sub_49C8D0 proc	near

var_7C=	dword ptr -7Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_49C976
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_49C931
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	short loc_49C976

loc_49C931:
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49DB20
mov	ecx, [ebp+arg_4]
call	sub_48EF10

loc_49C976:
mov	esp, ebp
pop	ebp
retn	8
sub_49C8D0 endp

align 10h


; Attributes: bp-based frame

sub_49C980 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CB40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49DB70
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C980 endp

align 10h


; Attributes: bp-based frame

sub_49C9D0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49DBC0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49C9D0 endp

align 10h


; Attributes: bp-based frame

sub_49CA20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 9249249h
jbe	short loc_49CA46
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_49CA46:
cmp	[ebp+arg_0], 0
jz	short loc_49CA6C
mov	eax, [ebp+arg_0]
imul	eax, 1Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49CA73

loc_49CA6C:
mov	[ebp+var_C], 0

loc_49CA73:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_49CA20 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_49CA80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 5D1745Dh
jbe	short loc_49CAA6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_49CAA6:
cmp	[ebp+arg_0], 0
jz	short loc_49CACC
mov	eax, [ebp+arg_0]
imul	eax, 2Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49CAD3

loc_49CACC:
mov	[ebp+var_C], 0

loc_49CAD3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_49CA80 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_49CAE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 5555555h
jbe	short loc_49CB06
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_49CB06:
cmp	[ebp+arg_0], 0
jz	short loc_49CB2C
mov	eax, [ebp+arg_0]
imul	eax, 30h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49CB33

loc_49CB2C:
mov	[ebp+var_C], 0

loc_49CB33:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_49CAE0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_49CB40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 2762762h
jbe	short loc_49CB66
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_49CB66:
cmp	[ebp+arg_0], 0
jz	short loc_49CB8C
mov	eax, [ebp+arg_0]
imul	eax, 68h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49CB93

loc_49CB8C:
mov	[ebp+var_C], 0

loc_49CB93:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_49CB40 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_49CBA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 38E38E3h
jbe	short loc_49CBC6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_49CBC6:
cmp	[ebp+arg_0], 0
jz	short loc_49CBEC
mov	eax, [ebp+arg_0]
imul	eax, 48h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49CBF3

loc_49CBEC:
mov	[ebp+var_C], 0

loc_49CBF3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_49CBA0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_49CC00 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5269E0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_49DC40
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49CC00 endp

align 10h


; Attributes: bp-based frame

sub_49CC40 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_49CC00
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49CC40 endp

align 10h


; Attributes: bp-based frame

sub_49CD40 proc	near

var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E6=	byte ptr -0E6h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_FC], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_FC]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_FC]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_49CDB0:
mov	edx, [ebp+var_FC]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_49CF88
mov	edx, [ebp+var_FC]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_49CE2A

loc_49CE1A:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_49CE2A:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_FD], dl
movzx	eax, [ebp+var_FD]
test	eax, eax
jz	short loc_49CEB7
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [edx]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_80]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_90]
xor	ecx, ecx
cmp	eax, [ebp+var_94]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_49CEB7
jmp	loc_49CE1A

loc_49CEB7:
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_1C]
push	ecx
lea	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_40]
push	ecx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	eax, [edx]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_28], ecx
push	ecx
mov	[ebp+var_A4], esp
mov	edx, [ebp+var_20]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A0]
mov	[eax], ecx
push	ecx
mov	[ebp+var_A8], esp
mov	edx, [ebp+var_FC]
add	edx, 4
mov	eax, [ebp+var_A8]
mov	[eax], edx
mov	ecx, [ebp+var_FC]
add	ecx, 4
push	ecx
push	ecx
mov	[ebp+var_B0], esp
mov	edx, [ebp+var_28]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
lea	ecx, [ebp+var_C]
call	sub_49DCB0
lea	edx, [ebp+var_8]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_24]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_49CDB0

loc_49CF88:
mov	eax, [ebp+var_FC]
add	eax, 4
mov	[ebp+var_F0], eax
xor	ecx, ecx
mov	[ebp+var_E6], cl
mov	edx, [ebp+var_F0]
mov	eax, [edx]
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_F0]
mov	[edx], ecx
mov	eax, [ebp+var_EC]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_FC]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_489900
mov	esp, ebp
pop	ebp
retn	4
sub_49CD40 endp

align 10h


; Attributes: bp-based frame

sub_49CFF0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[edx+4], ecx
lea	edx, [ebp+var_64]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_68]
call	sub_49E340
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49CFF0 endp

align 10h


; Attributes: bp-based frame

sub_49D080 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[edx+4], ecx
lea	edx, [ebp+var_64]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_68]
call	sub_47E1E0
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49D080 endp

align 10h


; Attributes: bp-based frame

sub_49D110 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 0DCh
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_49D154

loc_49D14B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_49D154:
cmp	[ebp+var_10], 0
jle	short loc_49D183
mov	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_49BF60
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 0DCh
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
add	eax, 0DCh
mov	[ebp+var_C], eax
jmp	short loc_49D14B

loc_49D183:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_49D110 endp

align 10h


; Attributes: bp-based frame

sub_49D190 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_49D1B8

loc_49D1AF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_49D1B8:
cmp	[ebp+var_8], 0
jle	short loc_49D1E2
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_49C080
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 50h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 50h
mov	[ebp+var_4], eax
jmp	short loc_49D1AF

loc_49D1E2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_49D190 endp

align 10h


; Attributes: bp-based frame

sub_49D1F0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_49D234

loc_49D22B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_49D234:
cmp	[ebp+var_10], 0
jle	short loc_49D25E
mov	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_49C080
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 50h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
add	eax, 50h
mov	[ebp+var_C], eax
jmp	short loc_49D22B

loc_49D25E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_49D1F0 endp

align 10h


; Attributes: bp-based frame

sub_49D270 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_49D288:
cmp	[ebp+var_8], 0
jz	loc_49D31C
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_14]
cmp	edx, [ebp+var_18]
jl	short loc_49D2EE
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_20]
jnz	short loc_49D2E5
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_24]
cmp	eax, [ebp+var_28]
jb	short loc_49D2EE

loc_49D2E5:
mov	[ebp+var_30], 0
jmp	short loc_49D2F5

loc_49D2EE:
mov	[ebp+var_30], 1

loc_49D2F5:
movzx	ecx, byte ptr [ebp+var_30]
test	ecx, ecx
jnz	short loc_49D30E
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_49D317

loc_49D30E:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_49D317:
jmp	loc_49D288

loc_49D31C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49D270 endp

align 10h


; Attributes: bp-based frame

sub_49D330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_49D358

loc_49D34F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_49D358:
cmp	[ebp+var_8], 0
jle	short loc_49D382
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_49DF00
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 24h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 24h
mov	[ebp+var_4], eax
jmp	short loc_49D34F

loc_49D382:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_49D330 endp

align 10h


; Attributes: bp-based frame

sub_49D390 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_49D3A8:
cmp	[ebp+var_8], 0
jz	short loc_49D3EF
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_49D3E4
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_49D3ED

loc_49D3E4:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_49D3ED:
jmp	short loc_49D3A8

loc_49D3EF:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49D390 endp

align 10h


; Attributes: bp-based frame

sub_49D400 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_49D42D:
cmp	[ebp+var_14], 0
jz	short loc_49D488
lea	eax, [ebp+var_19]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_49D47D
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_49D486

loc_49D47D:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_49D486:
jmp	short loc_49D42D

loc_49D488:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_49D400 endp

align 10h


; Attributes: bp-based frame

sub_49D4A0 proc	near

var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_49D4B8:
cmp	[ebp+var_8], 0
jz	short loc_49D521
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_49D4EB
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
xor	ecx, ecx
cmp	eax, [edx+4]
setl	cl
mov	[ebp+var_E], cl
jmp	short loc_49D4FD
jmp	short loc_49D4FD

loc_49D4EB:
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_E], dl

loc_49D4FD:
movzx	eax, [ebp+var_E]
test	eax, eax
jnz	short loc_49D516
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_49D51F

loc_49D516:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_49D51F:
jmp	short loc_49D4B8

loc_49D521:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49D4A0 endp

align 10h


; Attributes: bp-based frame

sub_49D530 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[edx+4], ecx
lea	edx, [ebp+var_64]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_68]
call	sub_498380
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49D530 endp

align 10h


; Attributes: bp-based frame

sub_49D5C0 proc	near

var_78=	dword ptr -78h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	byte ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_49D5D8:
cmp	[ebp+var_8], 0
jz	short loc_49D64D
lea	ecx, [ebp+var_35]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_34]
call	sub_407810
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_3C]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_9], cl
lea	ecx, [ebp+var_34]
call	sub_407E50
lea	ecx, [ebp+var_35]
call	nullsub_1
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_49D642
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_49D64B

loc_49D642:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_49D64B:
jmp	short loc_49D5D8

loc_49D64D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49D5C0 endp

align 10h


; Attributes: bp-based frame

sub_49D660 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_49DFB0
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_49DDA0
lea	ecx, [ebp+var_8]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn	10h
sub_49D660 endp

align 10h


; Attributes: bp-based frame

sub_49D6B0 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_49E040
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_49DE50
lea	ecx, [ebp+var_8]
call	sub_48EEA0
mov	esp, ebp
pop	ebp
retn	10h
sub_49D6B0 endp

align 10h


; Attributes: bp-based frame

sub_49D700 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
jmp	short loc_49D711

loc_49D708:
mov	eax, [ebp+arg_0]
sub	eax, 0Ch
mov	[ebp+arg_0], eax

loc_49D711:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_49D767
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 0Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_49D752
mov	eax, [ebp+var_C]
mov	ecx, [eax]
call	sub_40AA90

loc_49D752:
xor	ecx, ecx
and	ecx, 1
jz	short loc_49D765
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_49D765:
jmp	short loc_49D708

loc_49D767:
mov	esp, ebp
pop	ebp
retn
sub_49D700 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49D770(void *, int)
sub_49D770 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_49D7F1
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	ecx, [ecx+1Ch]
mov	[eax+1Ch], ecx
mov	edx, [ebp+var_C]
add	edx, 20h
mov	eax, [ebp+var_8]
add	eax, 20h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_10], eax
jmp	short loc_49D7F8

loc_49D7F1:
mov	[ebp+var_10], 0

loc_49D7F8:
mov	esp, ebp
pop	ebp
retn
sub_49D770 endp

align 10h


; Attributes: bp-based frame

sub_49D800 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_49C160
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_49D800 endp

align 10h


; Attributes: bp-based frame

sub_49D840 proc	near

var_78=	dword ptr -78h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_49E0D0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49D840 endp

align 10h


; Attributes: bp-based frame

sub_49D890 proc	near

var_78=	dword ptr -78h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_49E130
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49D890 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49D8E0(void *, int)
sub_49D8E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49D951
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_8]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_49D949
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_40AA80

loc_49D949:
mov	eax, [ebp+var_8]
mov	[ebp+var_10], eax
jmp	short loc_49D958

loc_49D951:
mov	[ebp+var_10], 0

loc_49D958:
mov	esp, ebp
pop	ebp
retn
sub_49D8E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49D960(void *, int)
sub_49D960 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49D9B7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_4909A0
mov	eax, [ebp+var_8]
mov	[ebp+var_74], eax
jmp	short loc_49D9BE

loc_49D9B7:
mov	[ebp+var_74], 0

loc_49D9BE:
mov	esp, ebp
pop	ebp
retn
sub_49D960 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49D9D0(void *, int)
sub_49D9D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DA27
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_8]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_49DA2E

loc_49DA27:
mov	[ebp+var_C], 0

loc_49DA2E:
mov	esp, ebp
pop	ebp
retn
sub_49D9D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49DA40(void *, int)
sub_49DA40 proc	near

var_44=	dword ptr -44h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DA97
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_490AA0
mov	eax, [ebp+var_8]
mov	[ebp+var_44], eax
jmp	short loc_49DA9E

loc_49DA97:
mov	[ebp+var_44], 0

loc_49DA9E:
mov	esp, ebp
pop	ebp
retn
sub_49DA40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49DAB0(void *, int)
sub_49DAB0 proc	near

var_50=	dword ptr -50h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DB09
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_470AD0
mov	ecx, [ebp+var_8]
mov	[ebp+var_50], ecx
jmp	short loc_49DB10

loc_49DB09:
mov	[ebp+var_50], 0

loc_49DB10:
mov	esp, ebp
pop	ebp
retn
sub_49DAB0 endp

align 10h


; Attributes: bp-based frame

sub_49DB20 proc	near

var_78=	dword ptr -78h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_49E190
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49DB20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49DB70(void *, int)
sub_49DB70 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	58h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DBB4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_49E2E0
mov	[ebp+var_14], eax
jmp	short loc_49DBBB

loc_49DBB4:
mov	[ebp+var_14], 0

loc_49DBBB:
mov	esp, ebp
pop	ebp
retn
sub_49DB70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49DBC0(void *, int)
sub_49DBC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DC29
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+arg_4]
add	eax, 28h
mov	ecx, [ebp+var_8]
add	ecx, 28h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_49DC30

loc_49DC29:
mov	[ebp+var_C], 0

loc_49DC30:
mov	esp, ebp
pop	ebp
retn
sub_49DBC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49DC40(void *, int)
sub_49DC40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	80h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DCA0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_8]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_4]
add	eax, 8
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_4908A0
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_49DCA7

loc_49DCA0:
mov	[ebp+var_C], 0

loc_49DCA7:
mov	esp, ebp
pop	ebp
retn
sub_49DC40 endp

align 10h


; Attributes: bp-based frame

sub_49DCB0 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_49DD9A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_49DD0F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_49DD9A

loc_49DD0F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_49E1F0
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_48A710
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_49DD9A:
mov	esp, ebp
pop	ebp
retn	10h
sub_49DCB0 endp



; Attributes: bp-based frame

sub_49DDA0 proc	near

var_7C=	dword ptr -7Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_49DE46
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_49DE01
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	short loc_49DE46

loc_49DE01:
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49E240
mov	ecx, [ebp+arg_4]
call	sub_5D2630

loc_49DE46:
mov	esp, ebp
pop	ebp
retn	8
sub_49DDA0 endp

align 10h


; Attributes: bp-based frame

sub_49DE50 proc	near

var_7C=	dword ptr -7Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_49DEF6
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_49DEB1
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	short loc_49DEF6

loc_49DEB1:
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49E290
mov	ecx, [ebp+arg_4]
call	sub_48EEA0

loc_49DEF6:
mov	esp, ebp
pop	ebp
retn	8
sub_49DE50 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49DF00(void *, int)
sub_49DF00 proc	near

var_38=	dword ptr -38h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	24h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DF44
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_498770
mov	[ebp+var_38], eax
jmp	short loc_49DF4B

loc_49DF44:
mov	[ebp+var_38], 0

loc_49DF4B:
mov	esp, ebp
pop	ebp
retn
sub_49DF00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49DF50(void *, int)
sub_49DF50 proc	near

var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49DF97
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_490E50
mov	eax, [ebp+var_8]
mov	[ebp+var_34], eax
jmp	short loc_49DF9E

loc_49DF97:
mov	[ebp+var_34], 0

loc_49DF9E:
mov	esp, ebp
pop	ebp
retn
sub_49DF50 endp

align 10h


; Attributes: bp-based frame

sub_49DFB0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	[eax], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[edx+4], ecx
lea	edx, [ebp+var_60]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_64]
call	sub_498120
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49DFB0 endp

align 10h


; Attributes: bp-based frame

sub_49E040 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[edx+4], ecx
lea	edx, [ebp+var_64]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_68]
call	sub_498320
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E040 endp

align 10h


; Attributes: bp-based frame

sub_49E0D0 proc	near

var_6C=	dword ptr -6Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_49E3A0
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_49C5E0
lea	ecx, [ebp+var_8]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn	10h
sub_49E0D0 endp

align 10h


; Attributes: bp-based frame

sub_49E130 proc	near

var_6C=	dword ptr -6Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_49E430
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_49C690
lea	ecx, [ebp+var_8]
call	sub_48A9D0
mov	esp, ebp
pop	ebp
retn	10h
sub_49E130 endp

align 10h


; Attributes: bp-based frame

sub_49E190 proc	near

var_6C=	dword ptr -6Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_49E4C0
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_49C8D0
lea	ecx, [ebp+var_8]
call	sub_48EF10
mov	esp, ebp
pop	ebp
retn	10h
sub_49E190 endp

align 10h


; Attributes: bp-based frame

sub_49E1F0 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_49E550
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E1F0 endp

align 10h


; Attributes: bp-based frame

sub_49E240 proc	near

var_78=	dword ptr -78h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_49E5A0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E240 endp

align 10h


; Attributes: bp-based frame

sub_49E290 proc	near

var_78=	dword ptr -78h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_49E600
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E290 endp

align 10h


; Attributes: bp-based frame

sub_49E2E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 28h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 28h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_403400
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_49E2E0 endp

align 10h


; Attributes: bp-based frame

sub_49E340 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_49E353

loc_49E34B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_49E353:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_49E38F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_49E660
jmp	short loc_49E34B

loc_49E38F:
mov	esp, ebp
pop	ebp
retn	10h
sub_49E340 endp

align 10h


; Attributes: bp-based frame

sub_49E3A0 proc	near

var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[edx+4], ecx
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49E6E0
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E3A0 endp

align 10h


; Attributes: bp-based frame

sub_49E430 proc	near

var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[edx+4], ecx
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49E730
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E430 endp

align 10h


; Attributes: bp-based frame

sub_49E4C0 proc	near

var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[edx+4], ecx
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49E780
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E4C0 endp

align 10h


; Attributes: bp-based frame

sub_49E550 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_49E7D0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E550 endp

align 10h


; Attributes: bp-based frame

sub_49E5A0 proc	near

var_6C=	dword ptr -6Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_49E840
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_49DDA0
lea	ecx, [ebp+var_8]
call	sub_5D2630
mov	esp, ebp
pop	ebp
retn	10h
sub_49E5A0 endp

align 10h


; Attributes: bp-based frame

sub_49E600 proc	near

var_6C=	dword ptr -6Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_49E8D0
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_49DE50
lea	ecx, [ebp+var_8]
call	sub_48EEA0
mov	esp, ebp
pop	ebp
retn	10h
sub_49E600 endp

align 10h


; Attributes: bp-based frame

sub_49E660 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_49CAE0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_49E960
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E660 endp

align 10h


; Attributes: bp-based frame

sub_49E6E0 proc	near

var_60=	dword ptr -60h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_60]
call	sub_49EA40
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E6E0 endp

align 10h


; Attributes: bp-based frame

sub_49E730 proc	near

var_60=	dword ptr -60h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_60]
call	sub_49EAF0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E730 endp

align 10h


; Attributes: bp-based frame

sub_49E780 proc	near

var_60=	dword ptr -60h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_60]
call	sub_49EB60
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E780 endp

align 10h


; Attributes: bp-based frame

sub_49E7D0 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_49EBD0
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_49E9C0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_48A710
mov	esp, ebp
pop	ebp
retn	10h
sub_49E7D0 endp

align 10h


; Attributes: bp-based frame

sub_49E840 proc	near

var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[edx+4], ecx
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49EC30
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E840 endp

align 10h


; Attributes: bp-based frame

sub_49E8D0 proc	near

var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[edx+4], ecx
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_49EC80
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49E8D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_49E960(void *, int)
sub_49E960 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49E9AA
mov	esi, [ebp+arg_4]
mov	ecx, 0Ah
mov	edi, [ebp+var_8]
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_49E9B1

loc_49E9AA:
mov	[ebp+var_C], 0

loc_49E9B1:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_49E960 endp

align 10h


; Attributes: bp-based frame

sub_49E9C0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_49E9E7
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_49EA30

loc_49E9E7:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_49E1F0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_48A710

loc_49EA30:
mov	esp, ebp
pop	ebp
retn	8
sub_49E9C0 endp

align 10h


; Attributes: bp-based frame

sub_49EA40 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
jmp	short loc_49EA53

loc_49EA4B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_49EA53:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_49EAE4
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_40]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_44]
call	sub_489850
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_20]
mov	[eax+4], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
jmp	loc_49EA4B

loc_49EAE4:
mov	esp, ebp
pop	ebp
retn	10h
sub_49EA40 endp

align 10h


; Attributes: bp-based frame

sub_49EAF0 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
jmp	short loc_49EB03

loc_49EAFB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_49EB03:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_49EB54
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
push	edx
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_44]
call	sub_49E660
jmp	short loc_49EAFB

loc_49EB54:
mov	esp, ebp
pop	ebp
retn	10h
sub_49EAF0 endp

align 10h


; Attributes: bp-based frame

sub_49EB60 proc	near

var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
jmp	short loc_49EB73

loc_49EB6B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_49EB73:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_55], dl
movzx	eax, [ebp+var_55]
test	eax, eax
jz	short loc_49EBC4
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
push	edx
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_54]
call	sub_4896C0
jmp	short loc_49EB6B

loc_49EBC4:
mov	esp, ebp
pop	ebp
retn	10h
sub_49EB60 endp

align 10h


; Attributes: bp-based frame

sub_49EBD0 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_49ECD0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49EBD0 endp

align 10h


; Attributes: bp-based frame

sub_49EC30 proc	near

var_5C=	dword ptr -5Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_49ED20
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49EC30 endp

align 10h


; Attributes: bp-based frame

sub_49EC80 proc	near

var_60=	dword ptr -60h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_60]
call	sub_49ED90
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49EC80 endp

align 10h


; Attributes: bp-based frame

sub_49ECD0 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_49EE00
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49ECD0 endp

align 10h


; Attributes: bp-based frame

sub_49ED20 proc	near

var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
jmp	short loc_49ED33

loc_49ED2B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_49ED33:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_41], dl
movzx	eax, [ebp+var_41]
test	eax, eax
jz	short loc_49ED84
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
push	edx
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_4895C0
jmp	short loc_49ED2B

loc_49ED84:
mov	esp, ebp
pop	ebp
retn	10h
sub_49ED20 endp

align 10h


; Attributes: bp-based frame

sub_49ED90 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
jmp	short loc_49EDA3

loc_49ED9B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_49EDA3:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_49EDF4
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
push	edx
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_44]
call	sub_489640
jmp	short loc_49ED9B

loc_49EDF4:
mov	esp, ebp
pop	ebp
retn	10h
sub_49ED90 endp

align 10h


; Attributes: bp-based frame

sub_49EE00 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_49EE09:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_49EE87
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_5269E0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_49DC40
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_49EE09

loc_49EE87:
mov	esp, ebp
pop	ebp
retn	10h
sub_49EE00 endp

align 10h



sub_49EE90 proc	near
sub	ecx, 28h
jmp	sub_486780
sub_49EE90 endp

align 10h


; Attributes: bp-based frame

sub_49EEA0 proc	near

var_74=	dword ptr -74h
var_6C=	qword ptr -6Ch
var_64=	qword ptr -64h
var_5C=	qword ptr -5Ch
var_54=	dword ptr -54h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	esi
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
push	ecx		; float
fld	dword ptr [eax]
fstp	[esp+74h+var_74]
call	sub_40F4E0
add	esp, 4
mov	ecx, [ebp+var_54]
push	ecx		; float
fld	dword ptr [ecx+4]
fstp	[esp+74h+var_74]
fstp	[ebp+var_5C]
call	sub_40F4E0
add	esp, 4
fld	[ebp+var_5C]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_49EF3A
mov	edx, [ebp+var_54]
push	ecx		; float
fld	dword ptr [edx+8]
fstp	[esp+74h+var_74]
call	sub_40F4E0
add	esp, 4
mov	eax, [ebp+var_54]
push	ecx		; float
fld	dword ptr [eax]
fstp	[esp+74h+var_74]
fstp	[ebp+var_64]
call	sub_40F4E0
add	esp, 4
fld	[ebp+var_64]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_49EF23
mov	eax, offset dword_17EE114
mov	esi, [ebp+arg_0]
mov	ecx, [ebp+var_54]
call	sub_4131E0
mov	eax, [ebp+arg_0]
jmp	short loc_49EF96
jmp	short loc_49EF38

loc_49EF23:
mov	eax, offset dword_17EE0FC
mov	esi, [ebp+arg_0]
mov	ecx, [ebp+var_54]
call	sub_4131E0
mov	eax, [ebp+arg_0]
jmp	short loc_49EF96

loc_49EF38:
jmp	short loc_49EF96

loc_49EF3A:
mov	ecx, [ebp+var_54]
push	ecx		; float
fld	dword ptr [ecx+8]
fstp	[esp+74h+var_74]
call	sub_40F4E0
add	esp, 4
mov	edx, [ebp+var_54]
push	ecx		; float
fld	dword ptr [edx+4]
fstp	[esp+74h+var_74]
fstp	[ebp+var_6C]
call	sub_40F4E0
add	esp, 4
fld	[ebp+var_6C]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_49EF83
mov	eax, offset dword_17EE114
mov	esi, [ebp+arg_0]
mov	ecx, [ebp+var_54]
call	sub_4131E0
mov	eax, [ebp+arg_0]
jmp	short loc_49EF96
jmp	short loc_49EF96

loc_49EF83:
mov	eax, offset dword_17EE108
mov	esi, [ebp+arg_0]
mov	ecx, [ebp+var_54]
call	sub_4131E0
mov	eax, [ebp+arg_0]

loc_49EF96:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_49EEA0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_49EFA0(int,	float)
sub_49EFA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_8], ecx
mov	[ebp+var_4], edx
fld	[ebp+var_8]
fmul	[ebp+arg_4]
fstp	[ebp+var_8]
fld	[ebp+var_4]
fmul	[ebp+arg_4]
fstp	[ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_49EFA0 endp



; Attributes: bp-based frame

sub_49EFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0Ch
call	sub_420D20
mov	esp, ebp
pop	ebp
retn
sub_49EFE0 endp

align 10h


; Attributes: bp-based frame

sub_49F000 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_10], ecx
push	3
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jz	short loc_49F061
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49F049
push	1
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_14], eax
jmp	short loc_49F050

loc_49F049:
mov	[ebp+var_14], 0

loc_49F050:
lea	ecx, [ebp+arg_0]
push	ecx
push	3
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_40FBD0

loc_49F061:
mov	edx, [ebp+arg_0]
push	edx
mov	esi, [ebp+var_10]
call	sub_1163900
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_49F000 endp

align 10h


; Attributes: bp-based frame

sub_49F080 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
mov	[ebp+var_14], ecx
push	7
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jz	short loc_49F0E7
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49F0C9
push	1
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_18], eax
jmp	short loc_49F0D0

loc_49F0C9:
mov	[ebp+var_18], 0

loc_49F0D0:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
push	7
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
call	sub_40FBD0

loc_49F0E7:
mov	eax, [ebp+arg_0]
push	eax
mov	esi, [ebp+var_14]
call	sub_1163900
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_49F080 endp

align 10h


; Attributes: bp-based frame

sub_49F100 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_10], ecx
push	6
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jz	short loc_49F161
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_49F149
push	1
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_14], eax
jmp	short loc_49F150

loc_49F149:
mov	[ebp+var_14], 0

loc_49F150:
lea	ecx, [ebp+arg_0]
push	ecx
push	6
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_40FBD0

loc_49F161:
mov	edx, [ebp+arg_0]
push	edx
mov	esi, [ebp+var_10]
call	sub_1163900
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_49F100 endp

align 10h


; Attributes: bp-based frame

sub_49F180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1573C00
push	offset dword_1889590 ; lpAddend
call	ds:InterlockedDecrement
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_49F1B1
push	8
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_49F1B1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49F180 endp

align 10h


; Attributes: bp-based frame

sub_49F1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1573C00
push	offset dword_1889590 ; lpAddend
call	ds:InterlockedDecrement
mov	esp, ebp
pop	ebp
retn
sub_49F1C0 endp

align 10h
; [00000087 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000094 BYTES: COLLAPSED FUNCTION sub_49F270. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_49F310 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C10
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49F310 endp

align 10h


; Attributes: bp-based frame

sub_49F360 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 139Eh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E05C
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49F360 endp

align 10h


; Attributes: bp-based frame

sub_49F3D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_49F445
mov	ecx, 139Eh
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_155E05C
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
jmp	short loc_49F44C

loc_49F445:
mov	[ebp+var_18], 0

loc_49F44C:
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49F3D0 endp

align 10h


; Attributes: bp-based frame

sub_49F470 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	ecx, 1392h
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573E24
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, dword_188E968
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	edx, dword_188E96C
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
mov	dword ptr [eax+10h], 0
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+18h], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49F470 endp

align 10h


; Attributes: bp-based frame

sub_49F520 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F520
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_20], ecx
mov	ecx, 13A5h
mov	eax, [ebp+var_20]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_1573C1C
mov	ecx, [ebp+var_20]
add	ecx, 8
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_E]
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
push	0
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4AC3C0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 18h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	edx, [ebp+var_20]
mov	dword ptr [edx+14h], 0FFFFFFFFh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49F520 endp

align 10h


; Attributes: bp-based frame

sub_49F600 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F6E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_68]
add	ecx, 18h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_68]
add	eax, 8
mov	[ebp+var_64], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_64]
call	sub_4A9770
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_49F676
push	30h
mov	edx, [ebp+var_68]
push	edx
call	sub_1111040
add	esp, 8

loc_49F676:
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_49F600 endp

align 10h


; Attributes: bp-based frame

sub_49F690 proc	near

var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
call	sub_4A9770
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49F690 endp

align 10h


; Attributes: bp-based frame

sub_49F6E0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F6E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_68]
add	ecx, 18h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_68]
add	eax, 8
mov	[ebp+var_64], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_64]
call	sub_4A9770
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49F6E0 endp

align 10h


; Attributes: bp-based frame

sub_49F750 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_49F798
push	10h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_49F798:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_49F750 endp

align 10h


; Attributes: bp-based frame

sub_49F7B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
mov	[ebp+var_4], ecx
cvtsi2ss xmm0, [ebp+arg_4]
mov	edx, [ebp+var_4]
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 3
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
mov	esp, ebp
pop	ebp
retn
sub_49F7B0 endp

align 10h


; Attributes: bp-based frame

sub_49F7F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
call	sub_410220
movzx	eax, al
test	eax, eax
jnz	short loc_49F82C
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	edx, [ebp+arg_0]
add	edx, 0Ch
call	sub_410220
movzx	ecx, al
test	ecx, ecx
jnz	short loc_49F82C
mov	[ebp+var_8], 0
jmp	short loc_49F833

loc_49F82C:
mov	[ebp+var_8], 1

loc_49F833:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_49F7F0 endp

align 10h


; Attributes: bp-based frame

sub_49F840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_49F85B

loc_49F852:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_49F85B:
mov	eax, [ebp+var_8]
add	eax, 8
call	sub_412510
cmp	[ebp+var_4], eax
jnb	short loc_49F886
mov	eax, [ebp+var_8]
add	eax, 8
mov	edx, [ebp+var_4]
call	sub_417900
call	sub_420D20
push	eax
call	sub_11BA0E0
jmp	short loc_49F852

loc_49F886:
mov	esp, ebp
pop	ebp
retn
sub_49F840 endp

align 10h


; Attributes: bp-based frame

sub_49F890 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
jmp	short loc_49F8B2

loc_49F8A9:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_49F8B2:
mov	eax, [ebp+var_1C]
add	eax, 8
call	sub_412510
cmp	[ebp+var_8], eax
jnb	short loc_49F91A
mov	eax, [ebp+var_1C]
add	eax, 8
mov	edx, [ebp+var_8]
call	sub_417900
call	sub_420D20
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+7Ch]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
call	sub_421B80
cmp	eax, [ebp+var_4]
jbe	short loc_49F918
mov	eax, [ebp+var_1C]
add	eax, 8
mov	edx, [ebp+var_8]
call	sub_417900
call	sub_420D20
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	ecx, [eax+7Ch]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
call	sub_421B80
mov	[ebp+var_4], eax

loc_49F918:
jmp	short loc_49F8A9

loc_49F91A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_49F890 endp

align 10h


; Attributes: bp-based frame

sub_49F930 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2FF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	cl, [ebp+arg_8]
mov	[eax], cl
mov	edx, [ebp+var_1C]
mov	al, [ebp+arg_0]
mov	[edx+1], al
mov	ecx, [ebp+var_1C]
mov	dl, [ebp+arg_4]
mov	[ecx+2], dl
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_20], eax
mov	eax, [ebp+var_20]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
add	ecx, 4
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_49F930 endp



; Attributes: bp-based frame

sub_49F9E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset __ehhandler$??1_Locimp@locale@std@@MAE@XZ_1
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	[ebp+var_10], ecx
mov	ecx, 271Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D5C
mov	esi, [ebp+var_10]
add	esi, 18h
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_10]
add	edx, 18h
push	edx
xor	eax, eax
call	sub_420330
mov	eax, [ebp+var_10]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_10]
mov	byte ptr [eax+0Ch], 0
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+24h], 1
mov	edx, [ebp+var_10]
mov	dword ptr [edx+28h], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+30h], 0
mov	dword ptr [eax+34h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_49F9E0 endp

align 10h


; Attributes: bp-based frame

sub_49FAB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_49FAF2
mov	ecx, [ebp+var_14]
call	sub_49F9E0
mov	[ebp+var_18], eax
jmp	short loc_49FAF9

loc_49FAF2:
mov	[ebp+var_18], 0

loc_49FAF9:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49FAB0 endp

align 10h


; Attributes: bp-based frame

sub_49FB20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset __ehhandler$??1_Locimp@locale@std@@MAE@XZ_1
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_49FB77
push	38h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_49FB77:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_49FB20 endp

align 10h


; Attributes: bp-based frame

sub_49FB90 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49FB90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
push	esi
mov	[ebp+var_1C], ecx
mov	ecx, 271Ch
mov	eax, [ebp+var_1C]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1573D60
mov	esi, [ebp+var_1C]
add	esi, 10h
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 1
mov	esi, [ebp+var_1C]
add	esi, 14h
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 2
push	ecx
fldz
fstp	[esp+34h+var_34]
push	ecx
fldz
fstp	[esp+38h+var_38]
push	ecx
fldz
fstp	[esp+3Ch+var_3C]
push	ecx
fldz
fstp	[esp+40h+var_40]
mov	ecx, [ebp+var_1C]
add	ecx, 34h
call	sub_40A410
mov	eax, [ebp+var_1C]
add	eax, 48h
call	nullsub_1
mov	eax, [ebp+var_1C]
add	eax, 7Ch
xor	cl, cl
call	sub_115FC50
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_1C]
add	ecx, 98h
call	sub_402390
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	esi, [ebp+var_1C]
add	esi, 0C0h
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_2C], eax
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_1C]
add	ecx, 0C4h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	ecx, [ebp+var_1C]
add	ecx, 0E0h
call	sub_10FB830
mov	byte ptr [ebp+var_4], 0Ah
mov	edx, [ebp+var_1C]
add	edx, 10h
push	edx
xor	eax, eax
call	sub_420330
mov	eax, [ebp+var_1C]
add	eax, 14h
push	eax
xor	eax, eax
call	sub_420330
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+28h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+2Ch], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+18h], 0
mov	edx, [ebp+var_1C]
mov	byte ptr [edx+0DEh], 1
mov	eax, [ebp+var_1C]
mov	byte ptr [eax+0DDh], 1
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+0DCh], 1
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+24h], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_49FB90 endp

align 10h


; Attributes: bp-based frame

sub_49FD50 proc	near

var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49FD50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
push	100h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_49FD95
mov	ecx, [ebp+var_14]
call	sub_49FB90
mov	[ebp+var_24], eax
jmp	short loc_49FD9C

loc_49FD95:
mov	[ebp+var_24], 0

loc_49FD9C:
mov	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49FD50 endp

align 10h


; Attributes: bp-based frame

sub_49FDC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_49FE00
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_49FDE8
push	100h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_49FDE8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_49FDC0 endp

align 10h


; Attributes: bp-based frame

sub_49FE00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49FE00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_10]
add	ecx, 0E0h
call	sub_10FB7C0
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
add	ecx, 0C4h
call	sub_407910
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_10]
add	eax, 0C0h
call	sub_40ABB0
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 98h
call	sub_407E50
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_429100
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49FE00 endp

align 10h


; Attributes: bp-based frame

sub_49FEB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_49FEFB
push	110h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_49FEFB:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_49FEB0 endp

align 10h


; Attributes: bp-based frame

sub_49FF10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A37A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_49FF6A
mov	ecx, 275Ah
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+8], 1
mov	edx, [ebp+var_14]
mov	[ebp+var_18], edx
jmp	short loc_49FF71

loc_49FF6A:
mov	[ebp+var_18], 0

loc_49FF71:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49FF10 endp

align 10h


; Attributes: bp-based frame

sub_49FF90 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 275Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E020
push	ecx
fldz
fstp	[esp+14h+var_14]
push	ecx
fldz
fstp	[esp+18h+var_18]
push	ecx
fldz
fstp	[esp+1Ch+var_1C]
push	ecx
fldz
fstp	[esp+20h+var_20]
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_40A410
mov	ecx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_10]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+14h], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_49FF90 endp

align 10h


; Attributes: bp-based frame

sub_4A0050 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A0098
push	18h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A0098:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A0050 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION unknown_libname_4. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4A00D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
call	sub_AD5DD0
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4A00D0 endp

align 10h


; Attributes: bp-based frame

sub_4A0100 proc	near
push	ebp
mov	ebp, esp
mov	eax, offset unk_1895CA0
pop	ebp
retn
sub_4A0100 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4A0110(int,	float)
sub_4A0110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	ecx		; float
fld	[ebp+arg_4]
fstp	[esp+8+var_8]
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
call	sub_1255AA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_4A0110 endp

align 10h


; Attributes: bp-based frame

sub_4A0140 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4]
movzx	edx, word ptr [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	ecx, [ebp+var_10]
mov	eax, [edx+8]
call	eax
mov	esp, ebp
pop	ebp
retn
sub_4A0140 endp



; Attributes: bp-based frame

sub_4A0180 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A01C8
push	10h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A01C8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A0180 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4A01E0(int, int, float)
sub_4A01E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx		; float
fld	[ebp+arg_8]
fstp	[esp+4+var_4]
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_10E3AD0
add	esp, 0Ch
neg	eax
sbb	eax, eax
add	eax, 1
pop	ebp
retn
sub_4A01E0 endp

align 10h


; Attributes: bp-based frame

sub_4A0210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
cdq
mov	ecx, [ebp+var_4]
mov	[ecx], eax
mov	[ecx+4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A0210 endp

align 10h



sub_4A0230 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebx+0Ch]
movss	xmm0, dword ptr	[eax]
movss	dword ptr [ebp-4], xmm0
mov	ecx, [ebx+0Ch]
movss	xmm0, dword ptr	[ecx+4]
movss	dword ptr [ebp-8], xmm0
mov	edx, [ebx+0Ch]
movss	xmm0, dword ptr	[edx+8]
movss	dword ptr [ebp-0Ch], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, dword ptr	[ebp-0Ch]
movss	xmm2, dword ptr	[ebp-8]
movss	xmm3, dword ptr	[ebp-4]
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-20h], xmm3
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [eax], xmm0
mov	eax, [ebx+8]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4A0230 endp

align 10h


; Attributes: bp-based frame

sub_4A02B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_10199C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A02D5
push	1Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A02D5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A02B0 endp

align 10h


; Attributes: bp-based frame

sub_4A02E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx+8], 10h
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4A02E0 endp

align 10h


; Attributes: bp-based frame

sub_4A0320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1010F60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A0343
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4A0343:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A0320 endp

align 10h


; Attributes: bp-based frame

sub_4A0350 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0350 endp



; Attributes: bp-based frame

sub_4A0390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	al, al
mov	esp, ebp
pop	ebp
retn	4
sub_4A0390 endp

align 10h


; Attributes: bp-based frame

sub_4A03A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+40h]
mov	esp, ebp
pop	ebp
retn
sub_4A03A0 endp

align 10h


; Attributes: bp-based frame

sub_4A03C0 proc	near

var_58=	dword ptr -58h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A03C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	dword ptr [eax], offset	off_1573CF8
mov	ecx, [ebp+var_58]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_58]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	ecx, [ebp+var_58]
add	ecx, 0Ch
call	sub_4A6E10
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_58]
mov	byte ptr [ecx+24h], 0
mov	ecx, [ebp+var_58]
add	ecx, 28h
call	sub_4A6E10
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_58]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+40h], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4A03C0 endp

align 10h


; Attributes: bp-based frame

sub_4A0450 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0450 endp

align 10h


; Attributes: bp-based frame

sub_4A04B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6440
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
add	eax, 38h
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A04B0 endp

align 10h


; Attributes: bp-based frame

sub_4A0510 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, [ebp+arg_4]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
add	edx, 4
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+10h]
mov	ecx, [edx+14h]
mov	edx, [ebp+var_4]
mov	[edx+10h], eax
mov	[edx+14h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	10h
sub_4A0510 endp

align 10h


; Attributes: bp-based frame

sub_4A0560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4A05B8
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	edx, [ebp+var_4]
add	edx, 4
call	sub_40F620
movzx	edx, al
test	edx, edx
jz	short loc_4A05B8
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+10h]
xor	eax, eax
cmp	edx, [ecx+10h]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4A05B8
mov	[ebp+var_8], 1
jmp	short loc_4A05BF

loc_4A05B8:
mov	[ebp+var_8], 0

loc_4A05BF:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4A0560 endp

align 10h


; Attributes: bp-based frame

sub_4A05D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4A0628
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	edx, [ebp+var_4]
add	edx, 4
call	sub_410220
movzx	edx, al
test	edx, edx
jnz	short loc_4A0628
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+10h]
xor	eax, eax
cmp	edx, [ecx+10h]
setnz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4A0628
mov	[ebp+var_8], 0
jmp	short loc_4A062F

loc_4A0628:
mov	[ebp+var_8], 1

loc_4A062F:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4A05D0 endp

align 10h


; Attributes: bp-based frame

sub_4A0640 proc	near

var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0640
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
push	178h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0685
mov	ecx, [ebp+var_14]
call	sub_45B7D0
mov	[ebp+var_38], eax
jmp	short loc_4A068C

loc_4A0685:
mov	[ebp+var_38], 0

loc_4A068C:
mov	eax, [ebp+var_38]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0640 endp

align 10h


; Attributes: bp-based frame

sub_4A06B0 proc	near

var_2C=	dword ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A06B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
push	180h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A071D
mov	ecx, 2B0Eh
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1573DB8
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_45B7D0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_2C], ecx
jmp	short loc_4A0724

loc_4A071D:
mov	[ebp+var_2C], 0

loc_4A0724:
mov	edx, [ebp+var_2C]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A06B0 endp

align 10h


; Attributes: bp-based frame

sub_4A0750 proc	near

var_30=	dword ptr -30h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_45BD70
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_30]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A07AC
push	180h
mov	ecx, [ebp+var_30]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A07AC:
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A0750 endp

align 10h


; Attributes: bp-based frame

sub_4A07C0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0EA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_20], ecx
mov	ecx, 2AFBh
mov	eax, [ebp+var_20]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_1573DBC
mov	ecx, [ebp+var_20]
add	ecx, 8
mov	[ebp+var_14], ecx
xor	edx, edx
mov	eax, [ebp+var_14]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_14]
mov	[edx+2], cx
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 10h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+var_20]
add	eax, 8
mov	[ebp+var_1C], eax
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_1C]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_1C]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_1C]
mov	[edx], ax
push	offset aInvalid	; "(invalid)"
mov	ecx, [ebp+var_20]
add	ecx, 10h
call	sub_402310
mov	eax, [ebp+var_20]
mov	byte ptr [eax+28h], 0
mov	ecx, [ebp+var_20]
mov	byte ptr [ecx+29h], 0
mov	edx, [ebp+var_20]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+34h], xmm0
mov	eax, [ebp+var_20]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_20]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+2Ch], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A07C0 endp

align 10h


; Attributes: bp-based frame

sub_4A0900 proc	near

var_28=	dword ptr -28h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0942
mov	ecx, [ebp+var_14]
call	sub_4A07C0
mov	[ebp+var_28], eax
jmp	short loc_4A0949

loc_4A0942:
mov	[ebp+var_28], 0

loc_4A0949:
mov	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0900 endp

align 10h


; Attributes: bp-based frame

sub_4A0970 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0FA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A09C7
push	38h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A09C7:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A0970 endp

align 10h


; Attributes: bp-based frame

sub_4A09E0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A09E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
push	64h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0A22
mov	ecx, [ebp+var_14]
call	sub_483FC0
mov	[ebp+var_3C], eax
jmp	short loc_4A0A29

loc_4A0A22:
mov	[ebp+var_3C], 0

loc_4A0A29:
mov	eax, [ebp+var_3C]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A09E0 endp

align 10h


; Attributes: bp-based frame

sub_4A0A50 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0CC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, 2B06h
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573DC0
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0A50 endp

align 10h


; Attributes: bp-based frame

sub_4A0AE0 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2250
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	20h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0B22
mov	ecx, [ebp+var_14]
call	sub_4A0A50
mov	[ebp+var_20], eax
jmp	short loc_4A0B29

loc_4A0B22:
mov	[ebp+var_20], 0

loc_4A0B29:
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0AE0 endp

align 10h


; Attributes: bp-based frame

sub_4A0B50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0DC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A0BA7
push	20h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A0BA7:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A0B50 endp

align 10h


; Attributes: bp-based frame

sub_4A0BC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A37A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0C1A
mov	ecx, 2B09h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	[ebp+var_18], edx
jmp	short loc_4A0C21

loc_4A0C1A:
mov	[ebp+var_18], 0

loc_4A0C21:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0BC0 endp

align 10h


; Attributes: bp-based frame

sub_4A0C40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1210
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0C9B
mov	ecx, 2B0Ah
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1573DCC
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
jmp	short loc_4A0CA2

loc_4A0C9B:
mov	[ebp+var_18], 0

loc_4A0CA2:
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0C40 endp



; Attributes: bp-based frame

sub_4A0CC0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0CC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, 2B0Bh
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573DC0
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0CC0 endp

align 10h


; Attributes: bp-based frame

sub_4A0D50 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2250
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	20h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0D92
mov	ecx, [ebp+var_14]
call	sub_4A0CC0
mov	[ebp+var_20], eax
jmp	short loc_4A0D99

loc_4A0D92:
mov	[ebp+var_20], 0

loc_4A0D99:
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0D50 endp

align 10h


; Attributes: bp-based frame

sub_4A0DC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0DC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0DC0 endp

align 10h


; Attributes: bp-based frame

sub_4A0E10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A0E75
mov	ecx, 2B0Dh
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_155E074
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_14]
mov	[ebp+var_18], edx
jmp	short loc_4A0E7C

loc_4A0E75:
mov	[ebp+var_18], 0

loc_4A0E7C:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0E10 endp

align 10h


; Attributes: bp-based frame

sub_4A0EA0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0EA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_20], ecx
mov	ecx, 2B0Fh
mov	eax, [ebp+var_20]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_1573DC4
mov	ecx, [ebp+var_20]
add	ecx, 8
mov	[ebp+var_14], ecx
xor	edx, edx
mov	eax, [ebp+var_14]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_14]
mov	[edx+2], cx
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 10h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+var_20]
add	eax, 8
mov	[ebp+var_1C], eax
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_1C]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_1C]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_1C]
mov	[edx], ax
mov	eax, [ebp+var_20]
mov	byte ptr [eax+28h], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A0EA0 endp

align 10h


; Attributes: bp-based frame

sub_4A0FA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0FA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A0FF7
push	2Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A0FF7:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A0FA0 endp

align 10h


; Attributes: bp-based frame

sub_4A1010 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A0FA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1010 endp

align 10h


; Attributes: bp-based frame

sub_4A1060 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1060
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	ecx, 2B10h
mov	eax, [ebp+var_1C]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1573DC8
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_2C], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_1C]
add	ecx, 24h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_1C]
mov	byte ptr [eax+3Dh], 0
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+3Ch], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1060 endp

align 10h


; Attributes: bp-based frame

sub_4A1130 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A11B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 24h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A1196
push	40h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A1196:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A1130 endp

align 10h


; Attributes: bp-based frame

sub_4A11B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A11B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 24h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A11B0 endp

align 10h


; Attributes: bp-based frame

sub_4A1210 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1210
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A126B
mov	ecx, 2B1Eh
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1573DCC
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
jmp	short loc_4A1272

loc_4A126B:
mov	[ebp+var_18], 0

loc_4A1272:
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1210 endp



; Attributes: bp-based frame

sub_4A1290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A12D8
push	8
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A12D8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A1290 endp

align 10h


; Attributes: bp-based frame

sub_4A12F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A1365
mov	ecx, 2B1Fh
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_155E05C
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
jmp	short loc_4A136C

loc_4A1365:
mov	[ebp+var_18], 0

loc_4A136C:
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A12F0 endp

align 10h


; Attributes: bp-based frame

sub_4A1390 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1390
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
push	24h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A1409
mov	ecx, 2B28h
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1573DD0
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_1014960
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	byte ptr [edx],	0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_1C], eax
jmp	short loc_4A1410

loc_4A1409:
mov	[ebp+var_1C], 0

loc_4A1410:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1390 endp

align 10h


; Attributes: bp-based frame

sub_4A1430 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_1014910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A1487
push	24h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A1487:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A1430 endp

align 10h


; Attributes: bp-based frame

sub_4A14A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A14A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A150A
mov	ecx, 2B29h
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1573DD4
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_1014960
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
jmp	short loc_4A1511

loc_4A150A:
mov	[ebp+var_18], 0

loc_4A1511:
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A14A0 endp

align 10h


; Attributes: bp-based frame

sub_4A1530 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_1014910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A1587
push	0Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A1587:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A1530 endp

align 10h


; Attributes: bp-based frame

sub_4A15A0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A15A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	ecx, 2B34h
mov	eax, [ebp+var_28]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_1573DD8
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_30], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_34], eax
mov	eax, [ebp+var_34]
mov	[ebp+var_38], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_28]
add	ecx, 20h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	eax, [ebp+var_F]
call	nullsub_1
mov	[ebp+var_3C], eax
mov	edx, [ebp+var_3C]
mov	[ebp+var_40], edx
mov	byte ptr [ebp+var_4], 7
mov	eax, [ebp+var_28]
add	eax, 3Ch
push	eax
call	sub_402710
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_F]
call	nullsub_1
mov	ecx, [ebp+var_28]
mov	byte ptr [ecx+38h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A15A0 endp

align 10h


; Attributes: bp-based frame

sub_4A1690 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4A16C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A16B5
push	44h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A16B5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A1690 endp

align 10h


; Attributes: bp-based frame

sub_4A16C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A16C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 3Ch
call	sub_402750
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A16C0 endp

align 10h


; Attributes: bp-based frame

sub_4A1730 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1730
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 6Ch
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_74], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_70]
add	ecx, 0Ch
mov	[ebp+var_28], ecx
xor	edx, edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_18]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+var_20]
mov	[edx+4], ecx
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_28]
call	sub_471130
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 7
lea	edx, [ebp+var_E]
mov	[ebp+var_78], edx
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_70]
add	eax, 14h
mov	[ebp+var_40], eax
xor	ecx, ecx
mov	[ebp+var_30], ecx
mov	[ebp+var_2C], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_30]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_38], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_3C]
mov	[ecx], edx
mov	eax, [ebp+var_38]
mov	[ecx+4], eax
mov	byte ptr [ebp+var_4], 0Ch
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_40]
mov	[ecx], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[eax+4], edx
mov	byte ptr [ebp+var_4], 0Dh
mov	byte ptr [ebp+var_4], 0Fh
mov	ecx, [ebp+var_70]
add	ecx, 1Ch
call	sub_4370B0
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_70]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_70]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_70]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_70]
mov	dword ptr [eax+34h], 0
mov	ecx, [ebp+var_70]
mov	byte ptr [ecx+38h], 0
mov	edx, [ebp+var_70]
mov	byte ptr [edx+39h], 0
mov	eax, [ebp+var_70]
mov	byte ptr [eax+3Ah], 0
mov	ecx, [ebp+var_70]
mov	byte ptr [ecx+3Bh], 0
mov	edx, [ebp+var_70]
mov	byte ptr [edx+3Ch], 0
mov	eax, [ebp+var_70]
mov	byte ptr [eax+3Dh], 0
mov	ecx, [ebp+var_70]
mov	byte ptr [ecx+3Eh], 0
mov	edx, [ebp+var_70]
mov	dword ptr [edx+40h], 0FFFFFFFFh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1730 endp

align 10h
; [000000B0 BYTES: COLLAPSED FUNCTION std::locale::_Locimp::~_Locimp(void). PRESS KEYPAD "+" TO	EXPAND]
; [000000C9 BYTES: COLLAPSED FUNCTION sub_4A1940. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4A1A10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1A10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4AACD0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1A10 endp

align 10h


; Attributes: bp-based frame

sub_4A1A70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1A70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4AAD90
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1A70 endp

align 10h


; Attributes: bp-based frame

sub_4A1AD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_4A1AFE
push	1
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_4A1B05

loc_4A1AFE:
mov	[ebp+var_10], 0

loc_4A1B05:
mov	esp, ebp
pop	ebp
retn	8
sub_4A1AD0 endp

align 10h


; Attributes: bp-based frame

sub_4A1B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+40h]
mov	esp, ebp
pop	ebp
retn
sub_4A1B10 endp

align 10h


; Attributes: bp-based frame

sub_4A1B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLworesmgr2inte ; "LWOResMgr2Interface"
mov	esp, ebp
pop	ebp
retn
sub_4A1B30 endp



; Attributes: bp-based frame

sub_4A1B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1514E1C
mov	esp, ebp
pop	ebp
retn
sub_4A1B40 endp



; Attributes: bp-based frame

sub_4A1B50 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1B50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
push	esi
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], 0FFFFFFFFh
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_E]
mov	[ebp+var_18], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_3C]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_489C40
mov	edx, [ebp+var_14]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_18]
mov	cl, [eax]
mov	edx, [ebp+var_14]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_E]
call	sub_42CA30
mov	byte ptr [ebp+var_4], 4
call	nullsub_1
lea	eax, [ebp+var_F]
call	nullsub_1
mov	[ebp+var_44], eax
mov	eax, [ebp+var_44]
mov	[ebp+var_48], eax
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_10]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 6
mov	edx, [ebp+var_3C]
add	edx, 1Ch
mov	[ebp+var_34], edx
xor	eax, eax
mov	[ebp+var_2C], eax
mov	[ebp+var_28], eax
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	eax, [ebp+var_28]
mov	[ecx+4], eax
mov	edx, [ebp+var_24]
mov	[ecx+8], edx
mov	eax, [ebp+var_20]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_2D]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5E1170
mov	ecx, [ebp+var_34]
call	sub_5E11A0
mov	edx, [ebp+var_34]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_38]
mov	cl, [eax]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 8
lea	ecx, [ebp+var_10]
call	sub_42CA30
mov	byte ptr [ebp+var_4], 9
call	nullsub_1
mov	esi, [ebp+var_3C]
add	esi, 34h
call	sub_41DF30
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4A1B50 endp

align 10h


; Attributes: bp-based frame

sub_4A1CA0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	ecx, 1B59h
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573E10
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_10], ecx
xor	edx, edx
mov	eax, [ebp+var_10]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_10]
mov	[edx+2], cx
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_14], ecx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	edx, [ebp+var_14]
mov	[edx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	ecx, [ebp+var_14]
mov	[ecx+2], ax
xor	edx, edx
and	edx, 0FFFFh
xor	eax, eax
and	eax, 0
mov	ecx, [ebp+var_14]
mov	[ecx], dx
mov	edx, [ebp+var_18]
mov	dword ptr [edx+18h], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+10h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1CA0 endp

align 10h


; Attributes: bp-based frame

sub_4A1D80 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1D80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	1Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A1DC2
mov	ecx, [ebp+var_14]
call	sub_4A1CA0
mov	[ebp+var_20], eax
jmp	short loc_4A1DC9

loc_4A1DC2:
mov	[ebp+var_20], 0

loc_4A1DC9:
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1D80 endp

align 10h


; Attributes: bp-based frame

sub_4A1DF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A1E38
push	1Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A1E38:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A1DF0 endp

align 10h


; Attributes: bp-based frame

sub_4A1E50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 1B5Ah
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573E14
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_10]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+20h], xmm0
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1Ch], xmm0
mov	ecx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+2Ch], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+30h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+28h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1E50 endp

align 10h


; Attributes: bp-based frame

sub_4A1F20 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1F20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0B8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A1F65
mov	ecx, [ebp+var_14]
call	sub_4A1E50
mov	[ebp+var_18], eax
jmp	short loc_4A1F6C

loc_4A1F65:
mov	[ebp+var_18], 0

loc_4A1F6C:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1F20 endp

align 10h


; Attributes: bp-based frame

sub_4A1F90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A1FDB
push	0B8h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A1FDB:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A1F90 endp

align 10h


; Attributes: bp-based frame

sub_4A1FF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A1FF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	3Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2032
mov	ecx, [ebp+var_14]
call	sub_4829E0
mov	[ebp+var_18], eax
jmp	short loc_4A2039

loc_4A2032:
mov	[ebp+var_18], 0

loc_4A2039:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A1FF0 endp

align 10h


; Attributes: bp-based frame

sub_4A2060 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A20D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_10FB7C0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A20B7
push	30h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A20B7:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A2060 endp

align 10h


; Attributes: bp-based frame

sub_4A20D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A20D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_10FB7C0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A20D0 endp

align 10h


; Attributes: bp-based frame

sub_4A2120 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2185
mov	ecx, 1BAEh
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_155E074
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_14]
mov	[ebp+var_18], edx
jmp	short loc_4A218C

loc_4A2185:
mov	[ebp+var_18], 0

loc_4A218C:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2120 endp

align 10h


; Attributes: bp-based frame

sub_4A21B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset __ehhandler$??1_Locimp@locale@std@@MAE@XZ_1
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	[ebp+var_10], ecx
mov	ecx, 1B9Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573E1C
mov	esi, [ebp+var_10]
add	esi, 18h
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_10]
add	eax, 18h
push	eax
xor	eax, eax
call	sub_420330
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+1Ch], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4A21B0 endp

align 10h


; Attributes: bp-based frame

sub_4A2250 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2250
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	20h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2292
mov	ecx, [ebp+var_14]
call	sub_4A21B0
mov	[ebp+var_18], eax
jmp	short loc_4A2299

loc_4A2292:
mov	[ebp+var_18], 0

loc_4A2299:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2250 endp

align 10h


; Attributes: bp-based frame

sub_4A22C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset __ehhandler$??1_Locimp@locale@std@@MAE@XZ_1
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A2317
push	20h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A2317:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A22C0 endp

align 10h


; Attributes: bp-based frame

sub_4A2330 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, 1BA1h
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573E20
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, dword_17EE12C
mov	[eax], ecx
mov	edx, dword_17EE130
mov	[eax+4], edx
mov	ecx, dword_17EE134
mov	[eax+8], ecx
mov	edx, dword_17EE138
mov	[eax+0Ch], edx
mov	eax, [ebp+var_10]
mov	byte ptr [eax+24h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2330 endp

align 10h


; Attributes: bp-based frame

sub_4A23F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A2438
push	28h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A2438:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A23F0 endp

align 10h


; Attributes: bp-based frame

sub_4A2450 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_18], ecx
mov	ecx, 1C28h
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573E0C
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 10h
call	sub_402390
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	ecx, [ebp+var_18]
add	ecx, 48h
call	sub_401EF0
mov	ecx, [ebp+var_18]
add	ecx, 54h
call	sub_401EF0
mov	ecx, [ebp+var_18]
add	ecx, 68h
call	sub_10FB830
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_18]
mov	dword ptr [eax+8], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+38h], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	dword ptr [edx+40h], 0
mov	dword ptr [edx+44h], 0
mov	eax, [ebp+var_18]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+64h], xmm0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2450 endp

align 10h


; Attributes: bp-based frame

sub_4A2530 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2575
mov	ecx, [ebp+var_14]
call	sub_4A2450
mov	[ebp+var_20], eax
jmp	short loc_4A257C

loc_4A2575:
mov	[ebp+var_20], 0

loc_4A257C:
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2530 endp

align 10h


; Attributes: bp-based frame

sub_4A25A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A25A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 68h
call	sub_10FB7C0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A2609
push	88h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A2609:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A25A0 endp

align 10h


; Attributes: bp-based frame

sub_4A2620 proc	near

var_28=	dword ptr -28h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2620
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
push	0ECh
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2665
mov	ecx, [ebp+var_14]
call	sub_45BF60
mov	[ebp+var_28], eax
jmp	short loc_4A266C

loc_4A2665:
mov	[ebp+var_28], 0

loc_4A266C:
mov	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2620 endp

align 10h


; Attributes: bp-based frame

sub_4A2690 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	ecx, 1B7Bh
mov	eax, [ebp+var_18]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573E24
mov	ecx, [ebp+var_18]
add	ecx, 18h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_18]
mov	byte ptr [edx+10h], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_18]
add	ecx, 18h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, dword_188E968
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	edx, dword_188E96C
mov	[ecx+4], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2690 endp



; Attributes: bp-based frame

sub_4A2740 proc	near

var_2C=	dword ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2740
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
push	28h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2782
mov	ecx, [ebp+var_14]
call	sub_483710
mov	[ebp+var_2C], eax
jmp	short loc_4A2789

loc_4A2782:
mov	[ebp+var_2C], 0

loc_4A2789:
mov	eax, [ebp+var_2C]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2740 endp

align 10h


; Attributes: bp-based frame

sub_4A27B0 proc	near

var_54=	dword ptr -54h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
push	34h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A27F2
mov	ecx, [ebp+var_14]
call	sub_483800
mov	[ebp+var_54], eax
jmp	short loc_4A27F9

loc_4A27F2:
mov	[ebp+var_54], 0

loc_4A27F9:
mov	eax, [ebp+var_54]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A27B0 endp

align 10h


; Attributes: bp-based frame

sub_4A2820 proc	near

var_48=	dword ptr -48h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2820
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
push	7Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2862
mov	ecx, [ebp+var_14]
call	sub_4839A0
mov	[ebp+var_48], eax
jmp	short loc_4A2869

loc_4A2862:
mov	[ebp+var_48], 0

loc_4A2869:
mov	eax, [ebp+var_48]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2820 endp

align 10h


; Attributes: bp-based frame

sub_4A2890 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2890
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_50], ecx
mov	ecx, 1C31h
mov	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_50]
mov	dword ptr [eax], offset	off_1573E28
mov	ecx, [ebp+var_50]
add	ecx, 8
mov	[ebp+var_18], ecx
xor	edx, edx
mov	eax, [ebp+var_18]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_18]
mov	[edx+2], cx
mov	eax, [ebp+var_18]
mov	dword ptr [eax+4], 0
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_58]
push	edx
mov	ecx, [ebp+var_50]
add	ecx, 10h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_5C], eax
mov	eax, [ebp+var_5C]
mov	[ebp+var_60], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_60]
push	ecx
mov	ecx, [ebp+var_50]
add	ecx, 28h
call	sub_402390
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	[ebp+var_68], edx
mov	byte ptr [ebp+var_4], 7
mov	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_50]
add	ecx, 50h
call	sub_402390
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_F]
call	nullsub_1
lea	ecx, [ebp+var_10]
call	sub_401EF0
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	[ebp+var_70], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	edx, [ebp+var_70]
push	edx
mov	ecx, [ebp+var_50]
add	ecx, 78h
call	sub_402390
mov	byte ptr [ebp+var_4], 0Ch
lea	ecx, [ebp+var_10]
call	nullsub_1
lea	eax, [ebp+var_11]
mov	[ebp+var_30], eax
mov	byte ptr [ebp+var_4], 0Dh
mov	ecx, [ebp+var_50]
add	ecx, 0A0h
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_594460
mov	byte ptr [ebp+var_4], 0Fh
mov	eax, [ebp+var_50]
add	eax, 0A8h
mov	[ebp+var_38], eax
lea	ecx, [ebp+var_31]
push	ecx
lea	edx, [ebp+var_32]
push	edx
mov	ecx, [ebp+var_38]
call	sub_489470
mov	byte ptr [ebp+var_4], 10h
lea	eax, [ebp+var_12]
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_50]
add	ecx, 0C0h
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_40]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_594460
mov	byte ptr [ebp+var_4], 13h
lea	ecx, [ebp+var_13]
call	sub_401EF0
mov	[ebp+var_74], eax
mov	eax, [ebp+var_74]
mov	[ebp+var_48], eax
mov	byte ptr [ebp+var_4], 14h
mov	ecx, [ebp+var_50]
add	ecx, 0C8h
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_44]
mov	dword ptr [eax+4], 0
push	0
mov	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_44]
add	ecx, 8
call	sub_407990
mov	byte ptr [ebp+var_4], 15h
mov	byte ptr [ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 18h
lea	ecx, [ebp+var_13]
call	nullsub_1
mov	ecx, [ebp+var_50]
add	ecx, 0D8h
call	sub_401EF0
mov	ecx, [ebp+var_50]
add	ecx, 0E8h
call	sub_401EF0
mov	ecx, [ebp+var_50]
add	ecx, 0F4h
call	sub_401EF0
mov	edx, [ebp+var_50]
add	edx, 8
mov	[ebp+var_4C], edx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_4C]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_4C]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_4C]
mov	[edx], ax
push	offset aInvalid	; "(invalid)"
mov	ecx, [ebp+var_50]
add	ecx, 10h
call	sub_402310
mov	eax, [ebp+var_50]
mov	dword ptr [eax+0D4h], 0FFFFFFFFh
mov	ecx, [ebp+var_50]
add	ecx, 0D8h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_50]
mov	byte ptr [eax+0E4h], 0
mov	ecx, [ebp+var_50]
add	ecx, 0E8h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_50]
add	eax, 0F4h
mov	ecx, dword_17EE12C
mov	[eax], ecx
mov	edx, dword_17EE130
mov	[eax+4], edx
mov	ecx, dword_17EE134
mov	[eax+8], ecx
mov	edx, dword_17EE138
mov	[eax+0Ch], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2890 endp

align 10h


; Attributes: bp-based frame

sub_4A2BA0 proc	near

var_58=	dword ptr -58h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2BA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
push	104h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2BE5
mov	ecx, [ebp+var_14]
call	sub_4A2890
mov	[ebp+var_58], eax
jmp	short loc_4A2BEC

loc_4A2BE5:
mov	[ebp+var_58], 0

loc_4A2BEC:
mov	eax, [ebp+var_58]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2BA0 endp

align 10h


; Attributes: bp-based frame

sub_4A2C10 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
call	sub_4A2C50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A2C3A
push	104h
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A2C3A:
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_4A2C10 endp

align 10h


; Attributes: bp-based frame

sub_4A2C50 proc	near

var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2C50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_38], ecx
mov	[ebp+var_4], 8
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_38]
add	ecx, 0C8h
call	sub_436500
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_38]
add	ecx, 0C0h
call	sub_5D2630
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_38]
add	ecx, 0A8h
call	sub_488DA0
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_38]
add	ecx, 0A0h
call	sub_48A9D0
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_38]
add	ecx, 78h
call	sub_407E50
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_38]
add	ecx, 50h
call	sub_407E50
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_38]
add	ecx, 28h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_38]
add	ecx, 10h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2C50 endp

align 10h


; Attributes: bp-based frame

sub_4A2D20 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	34h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2D63
mov	eax, [ebp+var_14]
push	eax
call	sub_408570
mov	[ebp+var_20], eax
jmp	short loc_4A2D6A

loc_4A2D63:
mov	[ebp+var_20], 0

loc_4A2D6A:
mov	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2D20 endp

align 10h


; Attributes: bp-based frame

sub_4A2D90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A2DD8
push	20h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A2DD8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A2D90 endp

align 10h


; Attributes: bp-based frame

sub_4A2DF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2E5C
mov	ecx, 1F57h
mov	eax, [ebp+var_14]
call	sub_401100
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_155E05C
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_14]
mov	[ebp+var_18], edx
jmp	short loc_4A2E63

loc_4A2E5C:
mov	[ebp+var_18], 0

loc_4A2E63:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2DF0 endp

align 10h


; Attributes: bp-based frame

sub_4A2E90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A2ED8
push	0Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A2ED8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A2E90 endp

align 10h


; Attributes: bp-based frame

sub_4A2EF0 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2EF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	18h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A2F32
mov	ecx, [ebp+var_14]
call	sub_4861B0
mov	[ebp+var_20], eax
jmp	short loc_4A2F39

loc_4A2F32:
mov	[ebp+var_20], 0

loc_4A2F39:
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2EF0 endp

align 10h


; Attributes: bp-based frame

sub_4A2F60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2F60 endp



; Attributes: bp-based frame

sub_4A2FA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2FA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
push	eax
xor	eax, eax
call	sub_420330
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
call	sub_40ABB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2FA0 endp

align 10h


; Attributes: bp-based frame

sub_4A2FF0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A2FF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_1C], ecx
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_20], eax
mov	eax, [ebp+var_20]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
add	ecx, 4
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+10h], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A2FF0 endp

align 10h


; Attributes: bp-based frame

sub_4A30A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 0CCh
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	eax, [ecx+10h]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4A30CF
xor	eax, eax
jmp	short loc_4A3107

loc_4A30CF:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+0CCh]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
add	ecx, 0CCh
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_14], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	ecx, [ebp+var_18]
call	sub_4B1520
mov	eax, [ebp+var_4]

loc_4A3107:
mov	esp, ebp
pop	ebp
retn
sub_4A30A0 endp

align 10h


; Attributes: bp-based frame

sub_4A3110 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
add	eax, 94h
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403400
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A3110 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4A3170(wchar_t *)
sub_4A3170 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_3C], offset aEn_us ; "en_us"
mov	[ebp+var_38], offset aEn_gb ; "en_gb"
mov	[ebp+var_34], offset aDe_de ; "de_de"
mov	[ebp+var_30], offset aFr_fr ; "fr_fr"
mov	[ebp+var_2C], offset aFr_ca ; "fr_ca"
mov	[ebp+var_28], offset aEs_es ; "es_es"
mov	[ebp+var_24], offset aEs_mx ; "es_mx"
mov	[ebp+var_20], offset aIt_it ; "it_it"
mov	[ebp+var_1C], offset aNl_nl ; "nl_nl"
mov	[ebp+var_18], offset aPt_pt ; "pt_pt"
mov	[ebp+var_14], offset aSv_se ; "sv_se"
mov	[ebp+var_10], offset aDa_dk ; "da_dk"
mov	[ebp+var_C], offset aNb_no ; "nb_no"
mov	[ebp+var_8], offset aPt_br ; "pt_br"
mov	[ebp+var_78], 409h
mov	[ebp+var_74], 809h
mov	[ebp+var_70], 407h
mov	[ebp+var_6C], 40Ch
mov	[ebp+var_68], 0C0Ch
mov	[ebp+var_64], 40Ah
mov	[ebp+var_60], 80Ah
mov	[ebp+var_5C], 410h
mov	[ebp+var_58], 418h
mov	[ebp+var_54], 816h
mov	[ebp+var_50], 41Dh
mov	[ebp+var_4C], 406h
mov	[ebp+var_48], 414h
mov	[ebp+var_44], 416h
mov	[ebp+var_3D], 0
mov	[ebp+var_4], 0
mov	[ebp+var_7C], 0
jmp	short loc_4A3257

loc_4A324E:
mov	eax, [ebp+var_7C]
add	eax, 1
mov	[ebp+var_7C], eax

loc_4A3257:
cmp	[ebp+var_7C], 0Eh
jnb	short loc_4A32AC
mov	ecx, [ebp+arg_0]
push	ecx		; wchar_t *
mov	edx, [ebp+var_7C]
mov	eax, [ebp+edx*4+var_3C]
push	eax		; wchar_t *
call	__wcsicmp
add	esp, 8
test	eax, eax
jnz	short loc_4A327E
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+ecx*4+var_78]
jmp	short loc_4A32B3

loc_4A327E:
movzx	edx, [ebp+var_3D]
test	edx, edx
jnz	short loc_4A32AA
push	2		; size_t
mov	eax, [ebp+arg_0]
push	eax		; wchar_t *
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+ecx*4+var_3C]
push	edx		; wchar_t *
call	__wcsnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_4A32AA
mov	eax, [ebp+var_7C]
mov	[ebp+var_4], eax
mov	[ebp+var_3D], 1

loc_4A32AA:
jmp	short loc_4A324E

loc_4A32AC:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+ecx*4+var_78]

loc_4A32B3:
mov	esp, ebp
pop	ebp
retn
sub_4A3170 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4A32C0(int, wchar_t *)
sub_4A32C0 proc	near

var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_17=	byte ptr -17h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A32C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E4h
mov	[ebp+var_20], 0
mov	eax, [ebp+arg_4]
push	eax		; wchar_t *
call	sub_4A3170
add	esp, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_A0], ecx
cmp	[ebp+var_A0], 410h
jg	short loc_4A3345
cmp	[ebp+var_A0], 410h
jz	loc_4A350B
mov	edx, [ebp+var_A0]
sub	edx, 406h
mov	[ebp+var_A0], edx
cmp	[ebp+var_A0], 6	; switch 7 cases
ja	loc_4A33C3	; default
			; jumptable 004A333E cases 2,3,5
mov	eax, [ebp+var_A0]
jmp	ds:off_4A3700[eax*4] ; switch jump

loc_4A3345:
cmp	[ebp+var_A0], 41Dh
jg	short loc_4A3393
cmp	[ebp+var_A0], 41Dh
jz	loc_4A3601
cmp	[ebp+var_A0], 414h
jz	loc_4A36A2
cmp	[ebp+var_A0], 416h
jz	loc_4A35AF
cmp	[ebp+var_A0], 418h
jz	loc_4A355D
jmp	short loc_4A33C3 ; default
			; jumptable 004A333E cases 2,3,5

loc_4A3393:
cmp	[ebp+var_A0], 80Ah
jz	loc_4A34B9	; jumptable 004A333E case 4
cmp	[ebp+var_A0], 816h
jz	loc_4A35AF
cmp	[ebp+var_A0], 0C0Ch
jz	loc_4A3467	; jumptable 004A333E case 6

loc_4A33C3:		; default
lea	ecx, [ebp+var_11] ; jumptable 004A333E cases 2,3,5
call	sub_401EF0
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
mov	[ebp+var_A8], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_A8]
push	edx
push	offset aDefault	; "default"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_11]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A3415:		; jumptable 004A333E case 1
lea	ecx, [ebp+var_12]
call	sub_401EF0
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_AC]
mov	[ebp+var_B0], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+var_B0]
push	edx
push	offset aGerman	; "german"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_12]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A3467:		; jumptable 004A333E case 6
lea	ecx, [ebp+var_13]
call	sub_401EF0
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
mov	[ebp+var_B8], ecx
mov	[ebp+var_4], 3
mov	edx, [ebp+var_B8]
push	edx
push	offset aFrench	; "french"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_13]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A34B9:		; jumptable 004A333E case 4
lea	ecx, [ebp+var_14]
call	sub_401EF0
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_C0], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_C0]
push	edx
push	offset aSpanish	; "spanish"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_14]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A350B:
lea	ecx, [ebp+var_15]
call	sub_401EF0
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
mov	[ebp+var_C8], ecx
mov	[ebp+var_4], 5
mov	edx, [ebp+var_C8]
push	edx
push	offset aItalian	; "italian"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_15]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A355D:
lea	ecx, [ebp+var_16]
call	sub_401EF0
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_CC]
mov	[ebp+var_D0], ecx
mov	[ebp+var_4], 6
mov	edx, [ebp+var_D0]
push	edx
push	offset aDutch	; "dutch"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_16]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A35AF:
lea	ecx, [ebp+var_17]
call	sub_401EF0
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	[ebp+var_D8], ecx
mov	[ebp+var_4], 7
mov	edx, [ebp+var_D8]
push	edx
push	offset aPortuguese ; "portuguese"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_17]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A3601:
lea	ecx, [ebp+var_18]
call	sub_401EF0
mov	[ebp+var_DC], eax
mov	ecx, [ebp+var_DC]
mov	[ebp+var_E0], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_E0]
push	edx
push	offset aSwedish	; "swedish"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_18]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	loc_4A36EF

loc_4A3653:		; jumptable 004A333E case 0
lea	ecx, [ebp+var_19]
call	sub_401EF0
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_E4]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 9
mov	edx, [ebp+var_E8]
push	edx
push	offset aDanish	; "danish"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_19]
call	nullsub_1
mov	eax, [ebp+arg_0]
jmp	short loc_4A36EF

loc_4A36A2:
lea	ecx, [ebp+var_1A]
call	sub_401EF0
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_EC]
mov	[ebp+var_F0], ecx
mov	[ebp+var_4], 0Ah
mov	edx, [ebp+var_F0]
push	edx
push	offset aNorwegian ; "norwegian"
mov	ecx, [ebp+arg_0]
call	sub_407810
mov	eax, [ebp+var_20]
or	eax, 1
mov	[ebp+var_20], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_1A]
call	nullsub_1
mov	eax, [ebp+arg_0]

loc_4A36EF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A32C0 endp

align 10h
off_4A3700 dd offset loc_4A3653	; jump table for switch	statement
dd offset loc_4A3415
dd offset loc_4A33C3
dd offset loc_4A33C3
dd offset loc_4A34B9
dd offset loc_4A33C3
dd offset loc_4A3467
align 10h


; Attributes: bp-based frame

sub_4A3720 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A37A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A3773
push	0BB8h
mov	ecx, [ebp+var_14]
call	sub_42CCA0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156E5D8
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
jmp	short loc_4A377A

loc_4A3773:
mov	[ebp+var_18], 0

loc_4A377A:
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3720 endp

align 10h


; Attributes: bp-based frame

sub_4A37A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A37A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4A37F3
push	0C0Bh
mov	ecx, [ebp+var_14]
call	sub_42CCA0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156E5D8
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
jmp	short loc_4A37FA

loc_4A37F3:
mov	[ebp+var_18], 0

loc_4A37FA:
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A37A0 endp

align 10h


; Attributes: bp-based frame

sub_4A3820 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3820
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	ecx, 3703h
mov	eax, [ebp+var_1C]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1573A84
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_402390
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_2C], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_1C]
add	ecx, 30h
call	sub_402390
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3820 endp

align 10h


; Attributes: bp-based frame

sub_4A38E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A3946
push	58h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A3946:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A38E0 endp

align 10h


; Attributes: bp-based frame

sub_4A3960 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3960 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4A39C0(float, int)
sub_4A39C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx]
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4A3A09
mov	edx, [ebp+arg_0]
fld	dword ptr [edx]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_4A39FA
mov	[ebp+var_8], 1
jmp	short loc_4A3A01

loc_4A39FA:
mov	[ebp+var_8], 0

loc_4A3A01:
mov	al, byte ptr [ebp+var_8]
jmp	loc_4A3AA4

loc_4A3A09:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	edx, [ebp+arg_0]
add	edx, 4
call	sub_40F620
movzx	ecx, al
test	ecx, ecx
jz	short loc_4A3A25
xor	al, al
jmp	short loc_4A3AA4

loc_4A3A25:
mov	edx, [ebp+var_4]
push	ecx		; float
fld	dword ptr [edx+8]
fstp	[esp+18h+var_18]
mov	eax, [ebp+var_4]
push	ecx		; float
fld	dword ptr [eax]
fstp	[esp+1Ch+var_1C]
mov	ecx, [ebp+arg_0]
push	ecx		; float
fld	dword ptr [ecx+0Ch]
fstp	[esp+20h+var_20]
mov	edx, [ebp+arg_0]
push	ecx		; float
fld	dword ptr [edx+4]
fstp	[esp+24h+var_24]
call	sub_10E1130
add	esp, 10h
mov	eax, [ebp+var_4]
push	ecx		; float
fld	dword ptr [eax+8]
fstp	[esp+18h+var_18]
mov	ecx, [ebp+var_4]
push	ecx		; float
fld	dword ptr [ecx]
fstp	[esp+1Ch+var_1C]
mov	edx, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [edx+0Ch]
fstp	[esp+20h+var_20]
mov	eax, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [eax+4]
fstp	[esp+24h+var_24]
fstp	[ebp+var_10]
call	sub_10E1130
add	esp, 10h
fld	[ebp+var_10]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_4A3A9A
mov	[ebp+var_14], 1
jmp	short loc_4A3AA1

loc_4A3A9A:
mov	[ebp+var_14], 0

loc_4A3AA1:
mov	al, byte ptr [ebp+var_14]

loc_4A3AA4:
mov	esp, ebp
pop	ebp
retn	8
sub_4A39C0 endp

align 10h


; Attributes: bp-based frame

sub_4A3AB0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_3C=	dword ptr -3Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3AB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
push	esi
mov	[ebp+var_70], ecx
push	offset aTogglemessageb ; "ToggleMessageBox"
lea	ecx, [ebp+var_64]
call	sub_110E550
mov	[ebp+var_4], 0
call	sub_401F20
add	eax, 10h
mov	[ebp+var_74], eax
push	0
push	offset aUi_out_of_disk ; "UI_OUT_OF_DISK_SPACE"
mov	eax, [ebp+var_74]
mov	edx, [eax]
mov	ecx, [ebp+var_74]
mov	eax, [edx+4]
call	eax
mov	esi, eax
push	offset aText	; "text"
mov	edx, [ebp+var_3C]
lea	ecx, [ebp+var_3C]
mov	eax, [edx+30h]
call	eax
mov	ecx, esi
mov	esi, eax
call	sub_401A10
push	offset aStridentifier ;	"strIdentifier"
mov	edx, [ebp+var_3C]
lea	ecx, [ebp+var_3C]
mov	eax, [edx+30h]
call	eax
mov	ecx, offset aUi_out_of_disk ; "UI_OUT_OF_DISK_SPACE"
mov	esi, eax
call	sub_401A10
push	offset aVisible	; "visible"
mov	edx, [ebp+var_3C]
lea	ecx, [ebp+var_3C]
mov	eax, [edx+30h]
call	eax
mov	cl, 1
mov	esi, eax
call	sub_401900
push	offset aCallbackmessag ; "callbackMessage"
mov	edx, [ebp+var_3C]
lea	ecx, [ebp+var_3C]
mov	eax, [edx+30h]
call	eax
mov	ecx, offset aOutofdiskspace ; "OutOfDiskSpace"
mov	esi, eax
call	sub_401A00
lea	ecx, [ebp+var_64]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_68], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_64]
push	edx
call	sub_4093F0
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4A3AB0 endp

align 10h


; Attributes: bp-based frame

sub_4A3BB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_102BA50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A3BD8
push	56Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A3BD8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A3BB0 endp

align 10h


; Attributes: bp-based frame

sub_4A3BF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3BF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_18]
add	eax, 34h
call	sub_41DF20
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 1Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_489010
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 4
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_489010
mov	ecx, [ebp+var_14]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3BF0 endp

align 10h


; Attributes: bp-based frame

sub_4A3C80 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 1Ch
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_1C]
add	ecx, 14h
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_14]
call	sub_5D2630
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_1C]
add	edx, 0Ch
mov	[ebp+var_18], edx
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0Ch
mov	ecx, [ebp+var_18]
call	sub_5D2630
mov	[ebp+var_4], 0Dh
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3C80 endp

align 10h


; Attributes: bp-based frame

sub_4A3D50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3D50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_46A7D0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3D50 endp

align 10h


; Attributes: bp-based frame

sub_4A3DB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3DB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4AB030
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3DB0 endp

align 10h


; Attributes: bp-based frame

sub_4A3E10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3E10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4AB480
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3E10 endp

align 10h


; Attributes: bp-based frame

sub_4A3E70 proc	near

var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3E70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
call	sub_436170
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3E70 endp

align 10h


; Attributes: bp-based frame

sub_4A3EC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3EC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4AB750
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3EC0 endp

align 10h


; Attributes: bp-based frame

sub_4A3F30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573DE4
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_18]
add	ecx, 1Ch
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_10]
call	sub_4AAD90
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
add	edx, 4
mov	[ebp+var_14], edx
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0Bh
mov	ecx, [ebp+var_14]
call	sub_4AACD0
mov	byte ptr [ebp+var_4], 0Ch
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0Dh
mov	[ebp+var_4], 0Eh
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A3F30 endp

align 10h


; Attributes: bp-based frame

sub_4A3FF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A3F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1573DE4
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_18]
add	ecx, 1Ch
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_10]
call	sub_4AAD90
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
add	edx, 4
mov	[ebp+var_14], edx
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0Bh
mov	ecx, [ebp+var_14]
call	sub_4AACD0
mov	byte ptr [ebp+var_4], 0Ch
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0Dh
mov	[ebp+var_4], 0Eh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A40B4
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4A40B4:
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A3FF0 endp

align 10h


; Attributes: bp-based frame

sub_4A40D0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+8]
mov	[eax+8], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+arg_0]
add	eax, 1Ch
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 1Ch
call	sub_1014860
mov	ecx, [ebp+arg_0]
add	ecx, 20h
push	ecx
mov	ecx, [ebp+var_2C]
add	ecx, 20h
call	sub_4022F0
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	eax, [eax+3Ch]
mov	[edx+3Ch], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+40h]
mov	[ecx+40h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+44h]
mov	eax, [ecx+48h]
mov	ecx, [ebp+var_2C]
mov	[ecx+44h], edx
mov	[ecx+48h], eax
mov	edx, [ebp+arg_0]
add	edx, 4Ch
push	edx
mov	ecx, [ebp+var_2C]
add	ecx, 4Ch
call	sub_4A4720
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0ACh]
mov	[eax+0ACh], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0B0h]
mov	[eax+0B0h], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0B4h]
mov	[eax+0B4h], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0B5h]
mov	[eax+0B5h], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0B6h]
mov	[eax+0B6h], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0B8h]
mov	[eax+0B8h], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0BCh]
mov	[eax+0BCh], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0C0h]
mov	[eax+0C0h], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0C4h]
mov	[eax+0C4h], edx
mov	eax, [ebp+arg_0]
add	eax, 0C8h
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 0C8h
call	sub_4A4870
mov	ecx, [ebp+arg_0]
add	ecx, 0E4h
push	ecx
mov	ecx, [ebp+var_2C]
add	ecx, 0E4h
call	sub_4ACEE0
mov	edx, [ebp+var_2C]
add	edx, 0F0h
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
add	eax, 0F0h
push	eax
mov	ecx, [ebp+var_14]
call	sub_4AE570
mov	ecx, [ebp+var_2C]
add	ecx, 108h
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_0]
add	edx, 108h
push	edx
mov	ecx, [ebp+var_18]
call	sub_4AE650
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+120h]
mov	[eax+120h], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+124h]
fstp	dword ptr [eax+124h]
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+128h]
mov	[edx+128h], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_0]
mov	cl, [eax+12Ch]
mov	[edx+12Ch], cl
mov	edx, [ebp+arg_0]
add	edx, 130h
mov	eax, [ebp+var_2C]
add	eax, 130h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+148h]
mov	[eax+148h], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+149h]
mov	[eax+149h], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+14Ah]
mov	[eax+14Ah], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+14Bh]
mov	[eax+14Bh], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+14Ch]
mov	[eax+14Ch], dl
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+150h]
mov	[eax+150h], edx
mov	eax, [ebp+arg_0]
add	eax, 154h
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
add	ecx, 154h
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_28]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_28]
add	ecx, 4
mov	edx, [ebp+var_24]
add	edx, 4
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_28]
add	edx, 10h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+16Ch]
mov	[ecx+16Ch], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+170h]
mov	[ecx+170h], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+174h]
mov	[ecx+174h], eax
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_4A40D0 endp

align 10h


; Attributes: bp-based frame

sub_4A4420 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	eax, [eax+14h]
mov	[edx+14h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+1Ch]
mov	[ecx+1Ch], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+1Dh]
mov	[ecx+1Dh], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+1Eh]
mov	[ecx+1Eh], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+1Fh]
mov	[ecx+1Fh], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+21h]
mov	[ecx+21h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+24h]
mov	[ecx+24h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+28h]
fstp	dword ptr [ecx+28h]
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+2Ch]
fstp	dword ptr [eax+2Ch]
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+30h]
fstp	dword ptr [edx+30h]
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+34h]
fstp	dword ptr [ecx+34h]
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+38h]
fstp	dword ptr [eax+38h]
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+3Ch]
fstp	dword ptr [edx+3Ch]
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+40h]
fstp	dword ptr [ecx+40h]
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+44h]
fstp	dword ptr [eax+44h]
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+48h]
fstp	dword ptr [edx+48h]
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+4Ch]
fstp	dword ptr [ecx+4Ch]
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+50h]
fstp	dword ptr [eax+50h]
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+54h]
fstp	dword ptr [edx+54h]
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+58h]
mov	[ecx+58h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+5Ch]
mov	[ecx+5Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 60h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 60h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4]
call	sub_46B470
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	al, [edx+18h]
mov	[ecx+18h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+7Ch]
mov	[ecx+7Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+80h]
mov	[ecx+80h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+81h]
mov	[ecx+81h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+84h]
mov	[ecx+84h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+88h]
mov	[ecx+88h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+89h]
mov	[ecx+89h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8Ch]
mov	[ecx+8Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	[ecx+90h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+94h]
mov	[ecx+94h], al
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+98h]
mov	[ecx+98h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+9Ch]
mov	[ecx+9Ch], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0A0h]
mov	eax, [ecx+0A4h]
mov	ecx, [ebp+var_C]
mov	[ecx+0A0h], edx
mov	[ecx+0A4h], eax
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4A4420 endp

align 10h


; Attributes: bp-based frame

sub_4A4680 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_10]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_4022F0
mov	ecx, [ebp+var_10]
add	ecx, 30h
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
add	edx, 30h
push	edx
mov	ecx, [ebp+var_C]
call	sub_4AE950
mov	eax, [ebp+arg_0]
add	eax, 48h
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 48h
call	sub_4022F0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx+60h]
mov	[ecx+60h], al
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4A4680 endp



; Attributes: bp-based frame

sub_4A4720 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	[ebp+var_4], 0
jmp	short loc_4A4748

loc_4A473F:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_4A4748:
cmp	[ebp+var_4], 3
jnb	short loc_4A4764
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_4]
mov	esi, [ebp+arg_0]
fld	dword ptr [esi+eax*4+8]
fstp	dword ptr [edx+ecx*4+8]
jmp	short loc_4A473F

loc_4A4764:
mov	[ebp+var_8], 0
jmp	short loc_4A4776

loc_4A476D:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_4A4776:
cmp	[ebp+var_8], 4
jnb	short loc_4A4792
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_8]
mov	esi, [ebp+arg_0]
fld	dword ptr [esi+ecx*4+14h]
fstp	dword ptr [eax+edx*4+14h]
jmp	short loc_4A476D

loc_4A4792:
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+24h]
fstp	dword ptr [edx+24h]
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+28h]
fstp	dword ptr [ecx+28h]
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+2Ch]
fstp	dword ptr [eax+2Ch]
mov	[ebp+var_C], 0
jmp	short loc_4A47C8

loc_4A47BF:
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_C], edx

loc_4A47C8:
cmp	[ebp+var_C], 3
jnb	short loc_4A47E4
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	esi, [ebp+arg_0]
fld	dword ptr [esi+edx*4+30h]
fstp	dword ptr [ecx+eax*4+30h]
jmp	short loc_4A47BF

loc_4A47E4:
mov	[ebp+var_10], 0
jmp	short loc_4A47F6

loc_4A47ED:
mov	eax, [ebp+var_10]
add	eax, 1
mov	[ebp+var_10], eax

loc_4A47F6:
cmp	[ebp+var_10], 5
jnb	short loc_4A4812
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	esi, [ebp+arg_0]
fld	dword ptr [esi+eax*4+3Ch]
fstp	dword ptr [edx+ecx*4+3Ch]
jmp	short loc_4A47ED

loc_4A4812:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	al, [edx+50h]
mov	[ecx+50h], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	al, [edx+51h]
mov	[ecx+51h], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	al, [edx+52h]
mov	[ecx+52h], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	al, [edx+53h]
mov	[ecx+53h], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+54h]
mov	[ecx+54h], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+58h]
mov	[ecx+58h], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	al, [edx+5Ch]
mov	[ecx+5Ch], al
mov	eax, [ebp+var_14]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4A4720 endp



; Attributes: bp-based frame

sub_4A4870 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	edi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_4A48B4
mov	eax, [ebp+var_1C]
cmp	dword ptr [eax], 0
jz	short loc_4A4898
mov	ecx, [ebp+var_1C]
mov	ecx, [ecx]
call	sub_40AA90

loc_4A4898:
mov	edx, [ebp+var_1C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_1C]
cmp	dword ptr [edx], 0
jz	short loc_4A48B4
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
call	sub_40AA80

loc_4A48B4:
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_1C]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_4A4900
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_4A48E4
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA90

loc_4A48E4:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_4A4900
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_4A4900:
mov	ecx, [ebp+arg_0]
add	ecx, 8
push	ecx
mov	edi, [ebp+var_1C]
add	edi, 8
call	sub_418760
mov	edx, [ebp+arg_0]
add	edx, 0Ch
push	edx
mov	edi, [ebp+var_1C]
add	edi, 0Ch
call	sub_418760
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_1C]
add	ecx, 10h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_4A4970
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_4A4954
mov	eax, [ebp+var_C]
mov	ecx, [eax]
call	sub_40AA90

loc_4A4954:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_4A4970
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_40AA80

loc_4A4970:
mov	eax, [ebp+arg_0]
add	eax, 14h
push	eax
mov	edi, [ebp+var_1C]
add	edi, 14h
call	sub_418760
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_1C]
add	ecx, 18h
call	sub_4AC7F0
mov	eax, [ebp+var_1C]
pop	edi
mov	esp, ebp
pop	ebp
retn	4
sub_4A4870 endp

align 10h


; Attributes: bp-based frame

sub_4A49A0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A49A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
push	esi
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_24]
cmp	dword ptr [eax], 0
jz	short loc_4A49DB
mov	ecx, [ebp+var_24]
mov	ecx, [ecx]
call	sub_40AA80

loc_4A49DB:
mov	[ebp+var_4], 0
mov	edx, [ebp+var_24]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax], edx
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_4A4A08
mov	ecx, [ebp+var_10]
mov	ecx, [ecx]
call	sub_40AA80

loc_4A4A08:
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax], edx
mov	eax, [ebp+var_14]
cmp	dword ptr [eax], 0
jz	short loc_4A4A32
mov	ecx, [ebp+var_14]
mov	ecx, [ecx]
call	sub_40AA80

loc_4A4A32:
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+arg_0]
add	eax, 0Ch
mov	esi, [ebp+var_24]
add	esi, 0Ch
call	sub_41E510
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_24]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax], edx
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4A4A71
mov	ecx, [ebp+var_18]
mov	ecx, [ecx]
call	sub_40AA80

loc_4A4A71:
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_0]
add	eax, 14h
mov	esi, [ebp+var_24]
add	esi, 14h
call	sub_41E510
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_24]
add	edx, 18h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax], edx
mov	eax, [ebp+var_20]
cmp	dword ptr [eax], 0
jz	short loc_4A4ABB
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4A4ABB:
mov	byte ptr [ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4A49A0 endp

align 10h


; Attributes: bp-based frame

sub_4A4AE0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4AE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
movss	xmm0, dword_17E66B0
movss	dword ptr [eax], xmm0
push	ecx		; float
fldz
fstp	[esp+34h+var_34]
push	ecx		; float
fldz
fstp	[esp+38h+var_38]
push	ecx		; float
fldz
fstp	[esp+3Ch+var_3C]
mov	ecx, [ebp+var_2C]
add	ecx, 4
call	sub_40F570
mov	ecx, [ebp+var_2C]
mov	edx, dword_188CB44
mov	[ecx+10h], edx
mov	eax, dword_188CB48
mov	[ecx+14h], eax
lea	ecx, [ebp+var_D]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_2C]
add	edx, 18h
mov	[ebp+var_28], edx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A4AE0 endp

align 10h


; Attributes: bp-based frame

sub_4A4BC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4BC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_5D2630
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A4BC0 endp

align 10h


; Attributes: bp-based frame

sub_4A4C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_4]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+28h]
mov	[edx+28h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+29h]
mov	[edx+29h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+2Ch]
fstp	dword ptr [edx+2Ch]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+30h]
fstp	dword ptr [ecx+30h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+34h]
fstp	dword ptr [eax+34h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A4C30 endp

align 10h


; Attributes: bp-based frame

sub_4A4CB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4CB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_429100
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A4CB0 endp

align 10h


; Attributes: bp-based frame

sub_4A4D20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4D20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A4D20 endp

align 10h


; Attributes: bp-based frame

sub_4A4D70 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4D70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 20h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_4A4DC5
mov	eax, [ebp+var_10]
mov	ecx, [eax]
call	sub_40AA90

loc_4A4DC5:
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A4D70 endp

align 10h


; Attributes: bp-based frame

sub_4A4DF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_4A4E34
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA90

loc_4A4E34:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A4DF0 endp

align 10h


; Attributes: bp-based frame

sub_4A4E60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4E60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C10
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A4EC0
mov	edx, [ebp+var_10]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4A4EC0:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A4E60 endp

align 10h


; Attributes: bp-based frame

sub_4A4EE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1]
mov	[eax+1], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+2]
mov	[eax+2], dl
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4ACEE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A4EE0 endp

align 10h


; Attributes: bp-based frame

sub_4A4F30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
add	ecx, 0A0h
call	sub_4A8F10
mov	eax, [ebp+var_14]
add	eax, 0A0h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A4F30 endp

align 10h


; Attributes: bp-based frame

sub_4A4FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1011DF0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A4FC5
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A4FC5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A4FA0 endp

align 10h


; Attributes: bp-based frame

sub_4A4FD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1011D40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A4FF5
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A4FF5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A4FD0 endp

align 10h


; Attributes: bp-based frame

sub_4A5000 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset __ehhandler$??1_Locimp@locale@std@@MAE@XZ_0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_1018B20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A5057
push	1Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A5057:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A5000 endp

align 10h


; Attributes: bp-based frame

sub_4A5070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_20 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A5095
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A5095:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A5070 endp

align 10h


; Attributes: bp-based frame

sub_4A50A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A50EF
push	44h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A50EF:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A50A0 endp

align 10h


; Attributes: bp-based frame

sub_4A5110 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A5110 endp



; Attributes: bp-based frame

sub_4A5150 proc	near

var_5C=	dword ptr -5Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5150
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_5C], ecx
push	0
push	0FFFFFFFFh
mov	ecx, [ebp+var_5C]
call	sub_4A03C0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_5C]
mov	dword ptr [eax], offset	off_1573AF8
mov	ecx, [ebp+var_5C]
add	ecx, 44h
call	sub_4A8FE0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_5C]
mov	dword ptr [ecx+60h], 0
mov	dword ptr [ecx+64h], 0
mov	edx, [ebp+var_5C]
mov	dword ptr [edx+68h], 0
mov	eax, [ebp+var_5C]
mov	dword ptr [eax+6Ch], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A5150 endp

align 10h


; Attributes: bp-based frame

sub_4A51E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 73h
mov	esp, ebp
pop	ebp
retn
sub_4A51E0 endp



; Attributes: bp-based frame

sub_4A51F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A52E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 44h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_4AB820
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_F62C70
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A526B
push	70h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4A526B:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A51F0 endp

align 10h


; Attributes: bp-based frame

sub_4A5280 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5280
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4AB820
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A5280 endp

align 10h


; Attributes: bp-based frame

sub_4A52E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A52E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 44h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_4AB820
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A52E0 endp

align 10h


; Attributes: bp-based frame

sub_4A5360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E8h
mov	esp, ebp
pop	ebp
retn
sub_4A5360 endp



; Attributes: bp-based frame

sub_4A5370 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4A53B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A539A
push	0E8h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A539A:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4A5370 endp

align 10h


; Attributes: bp-based frame

sub_4A53B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A53B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 78h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 4
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_18]
add	ecx, 44h
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_14]
call	sub_4AB820
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A53B0 endp

align 10h


; Attributes: bp-based frame

sub_4A5450 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A549F
push	60h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A549F:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A5450 endp

align 10h


; Attributes: bp-based frame

sub_4A54C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A54C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_10FB7C0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A54C0 endp

align 10h


; Attributes: bp-based frame

sub_4A5530 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_10FB7C0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A5530 endp

align 10h


; Attributes: bp-based frame

sub_4A5580 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A5580 endp



; Attributes: bp-based frame

sub_4A55C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A55C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A55C0 endp

align 10h


; Attributes: bp-based frame

sub_4A5630 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5630
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A5630 endp

align 10h


; Attributes: bp-based frame

sub_4A5680 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+5Ch], 0
mov	ecx, [ebp+var_4]
mov	dl, [ebp+arg_8]
mov	[ecx+60h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+18h]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+34h]
mov	[edx+34h], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 38h
call	sub_5F52F0
push	eax		; Src
push	21h		; SizeInBytes
mov	edx, [ebp+var_4]
add	edx, 38h
push	edx		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
add	ecx, 1Ch
call	sub_5F52F0
push	eax		; Src
push	21h		; SizeInBytes
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4A5680 endp

align 10h


; Attributes: bp-based frame

sub_4A5700 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5700
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	[ebp+var_28], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	edx, [ebp+var_E]
mov	[ebp+var_2C], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_20]
add	eax, 24h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_1C]
add	eax, 8
mov	[ebp+var_18], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A5700 endp

align 10h


; Attributes: bp-based frame

sub_4A57B0 proc	near

var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A57B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_64]
add	ecx, 24h
call	sub_4A9130
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A57B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4A5810(wchar_t *Src)
sub_4A5810 proc	near

var_28=	dword ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
Src= dword ptr	8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5810
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_411F60
mov	[ebp+var_4], 0
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_1573BE8
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+210h], 0
push	offset szReferrer ; Src
push	104h		; SizeInWords
mov	edx, [ebp+var_28]
add	edx, 8
push	edx		; Dst
call	_wcscpy_s
add	esp, 0Ch
mov	eax, [ebp+var_28]
mov	dword ptr [eax+214h], 0
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+218h], 0
mov	edx, [ebp+Src]
push	edx		; Src
mov	ecx, [ebp+var_28]
call	sub_4A59D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A5810 endp

align 10h
; [00000053 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000004B BYTES: COLLAPSED FUNCTION sub_4A5910. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4A5960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+210h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	eax, [ebp+var_8]
mov	dword ptr [eax+210h], 0
push	offset szReferrer ; Src
push	104h		; SizeInWords
mov	ecx, [ebp+var_8]
add	ecx, 8
push	ecx		; Dst
call	_wcscpy_s
add	esp, 0Ch
mov	edx, [ebp+var_8]
mov	dword ptr [edx+214h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+218h], 0
mov	esp, ebp
pop	ebp
retn
sub_4A5960 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4A59D0(wchar_t *Src)
sub_4A59D0 proc	near

var_2C=	dword ptr -2Ch
var_26=	word ptr -26h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
NumberOfBytesRead= dword ptr -0Ch
lpBuffer= dword	ptr -8
hObject= dword ptr -4
Src= dword ptr	8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_4A5960
mov	eax, [ebp+Src]
push	eax		; Src
push	104h		; SizeInWords
mov	ecx, [ebp+var_1C]
add	ecx, 8
push	ecx		; Dst
call	_wcscpy_s
add	esp, 0Ch
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
add	eax, 2
mov	[ebp+var_24], eax

loc_4A5A0B:
mov	ecx, [ebp+var_20]
mov	dx, [ecx]
mov	[ebp+var_26], dx
add	[ebp+var_20], 2
cmp	[ebp+var_26], 0
jnz	short loc_4A5A0B
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_24]
sar	eax, 1
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_2C]
mov	[ecx+214h], edx
push	0		; hTemplateFile
push	80h		; dwFlagsAndAttributes
push	3		; dwCreationDisposition
push	0		; lpSecurityAttributes
push	1		; dwShareMode
push	80000000h	; dwDesiredAccess
mov	eax, [ebp+var_1C]
add	eax, 8
push	eax		; lpFileName
call	ds:CreateFileW
mov	[ebp+hObject], eax
cmp	[ebp+hObject], 0FFFFFFFFh
jz	loc_4A5B12
push	0		; lpFileSizeHigh
mov	ecx, [ebp+hObject]
push	ecx		; hFile
call	ds:GetFileSize
mov	edx, [ebp+var_1C]
mov	[edx+218h], eax
mov	eax, [ebp+var_1C]
mov	ecx, [eax+218h]
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
mov	[ebp+lpBuffer],	edx
mov	[ebp+NumberOfBytesRead], 0
push	0		; lpOverlapped
lea	eax, [ebp+NumberOfBytesRead]
push	eax		; lpNumberOfBytesRead
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+218h]
push	edx		; nNumberOfBytesToRead
mov	eax, [ebp+lpBuffer]
push	eax		; lpBuffer
mov	ecx, [ebp+hObject]
push	ecx		; hFile
call	ds:ReadFile
mov	edx, [ebp+hObject]
push	edx		; hObject
call	ds:CloseHandle
movzx	eax, byte_1692CFE
test	eax, eax
jz	short loc_4A5B06
push	0
mov	ecx, [ebp+var_1C]
add	ecx, 210h
push	ecx
mov	edx, [ebp+NumberOfBytesRead]
push	edx
mov	eax, [ebp+lpBuffer]
push	eax
call	sub_10121C0
add	esp, 10h
mov	ecx, [ebp+var_1C]
mov	[ecx+218h], eax
mov	edx, [ebp+lpBuffer]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
jmp	short loc_4A5B12

loc_4A5B06:
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+lpBuffer]
mov	[ecx+210h], edx

loc_4A5B12:
mov	esp, ebp
pop	ebp
retn	4
sub_4A59D0 endp

align 10h
; [00000071 BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000077 BYTES: COLLAPSED FUNCTION sub_4A5BA0. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4A5C20 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
Src= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
shr	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+Src], ecx
mov	[ebp+var_C], 104h
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_4]
push	eax
call	sub_407A30
add	esp, 8
mov	ecx, [eax]
mov	[ebp+var_4], ecx
cmp	[ebp+Src], 0
jnz	short loc_4A5C5B
jmp	short loc_4A5C98

loc_4A5C5B:
cmp	[ebp+var_4], 1
jbe	short loc_4A5C8F
mov	edx, [ebp+var_4]
sub	edx, 1
push	edx		; MaxCount
mov	eax, [ebp+Src]
push	eax		; Src
push	104h		; SizeInWords
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
push	ecx		; Dst
call	_wcsncpy_s
add	esp, 10h
xor	edx, edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_14]
mov	[ecx+eax*2+0Ah], dx
jmp	short loc_4A5C98

loc_4A5C8F:
xor	edx, edx
mov	eax, [ebp+var_14]
mov	[eax+0Ch], dx

loc_4A5C98:
mov	esp, ebp
pop	ebp
retn	8
sub_4A5C20 endp

align 10h


; Attributes: bp-based frame

sub_4A5CA0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_64=	byte ptr -64h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5CA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A4h
mov	[ebp+var_90], ecx
lea	ecx, [ebp+var_35]
call	sub_401EF0
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	[ebp+var_98], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_98]
push	ecx
mov	edx, [ebp+var_90]
add	edx, 0Ch
push	edx
lea	ecx, [ebp+var_34]
call	sub_407810
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_35]
call	nullsub_1
push	0
push	1
sub	esp, 28h
mov	ecx, esp
mov	[ebp+var_3C], esp
lea	eax, [ebp+var_34]
push	eax
call	sub_403400
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	[ebp+var_A0], ecx
mov	byte ptr [ebp+var_4], 3
lea	edx, [ebp+var_64]
push	edx
mov	byte ptr [ebp+var_4], 2
call	sub_10F0D30
add	esp, 34h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	[ebp+var_A8], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_A8]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_4023E0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_64]
call	sub_407E50
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8C]
push	eax
lea	ecx, [ebp+var_34]
call	sub_403FE0
add	esp, 8
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_AC]
mov	[ebp+var_B0], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_B0]
push	edx
lea	ecx, [ebp+var_34]
call	sub_4023E0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_8C]
call	sub_407E50
lea	eax, [ebp+var_34]
call	sub_412770
push	eax		; Src
push	104h		; SizeInWords
mov	eax, [ebp+var_90]
add	eax, 0Ch
push	eax		; Dst
call	_wcscpy_s
add	esp, 0Ch
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A5CA0 endp

align 10h


; Attributes: bp-based frame

sub_4A5E00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
NumberOfBytesWritten= dword ptr	-10h
hObject= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	[ebp+var_1], 0
mov	eax, [ebp+var_14]
cmp	dword ptr [eax+214h], 0
jz	short loc_4A5E2D
mov	ecx, [ebp+var_14]
movzx	edx, word ptr [ecx+0Ch]
test	edx, edx
jz	short loc_4A5E2D
mov	[ebp+var_18], 1
jmp	short loc_4A5E34

loc_4A5E2D:
mov	[ebp+var_18], 0

loc_4A5E34:
movzx	eax, byte ptr [ebp+var_18]
test	eax, eax
jnz	short loc_4A5E43
xor	al, al
jmp	loc_4A5F23

loc_4A5E43:
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
push	ecx		; pszPath
call	ds:PathFileExistsW
test	eax, eax
jz	short loc_4A5E72
mov	edx, [ebp+var_14]
add	edx, 0Ch
push	edx		; lpFileName
call	ds:GetFileAttributesW
and	eax, 0FFFFFFFEh
push	eax		; dwFileAttributes
mov	eax, [ebp+var_14]
add	eax, 0Ch
push	eax		; lpFileName
call	ds:SetFileAttributesW

loc_4A5E72:
movzx	ecx, byte_1692CFE
test	ecx, ecx
jz	short loc_4A5EAE
mov	edx, [ebp+var_14]
add	edx, 0Ch
push	edx		; lpFileName
mov	eax, [ebp+var_14]
mov	ecx, [eax+214h]
push	ecx		; int
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
push	eax		; int
call	sub_1042430
add	esp, 0Ch
mov	[ebp+var_8], eax
xor	ecx, ecx
cmp	ecx, [ebp+var_8]
sbb	edx, edx
neg	edx
mov	[ebp+var_1], dl
jmp	short loc_4A5F20

loc_4A5EAE:		; hTemplateFile
push	0
push	80h		; dwFlagsAndAttributes
push	2		; dwCreationDisposition
push	0		; lpSecurityAttributes
push	0		; dwShareMode
push	40000000h	; dwDesiredAccess
mov	eax, [ebp+var_14]
add	eax, 0Ch
push	eax		; lpFileName
call	ds:CreateFileW
mov	[ebp+hObject], eax
cmp	[ebp+hObject], 0FFFFFFFFh
jnz	short loc_4A5EDA
xor	al, al
jmp	short loc_4A5F23

loc_4A5EDA:
mov	[ebp+NumberOfBytesWritten], 0
push	0		; lpOverlapped
lea	ecx, [ebp+NumberOfBytesWritten]
push	ecx		; lpNumberOfBytesWritten
mov	edx, [ebp+var_14]
mov	eax, [edx+214h]
push	eax		; nNumberOfBytesToWrite
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
push	edx		; lpBuffer
mov	eax, [ebp+hObject]
push	eax		; hFile
call	ds:WriteFile
mov	ecx, [ebp+var_14]
mov	edx, [ebp+NumberOfBytesWritten]
xor	eax, eax
cmp	edx, [ecx+214h]
setz	al
mov	[ebp+var_1], al
mov	ecx, [ebp+hObject]
push	ecx		; hObject
call	ds:CloseHandle

loc_4A5F20:
mov	al, [ebp+var_1]

loc_4A5F23:
mov	esp, ebp
pop	ebp
retn
sub_4A5E00 endp

align 10h


; Attributes: bp-based frame

sub_4A5F30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	eax, [ebp+var_C]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+214h], 0
cmp	[ebp+arg_4], 0
jnz	short loc_4A5F6D
jmp	short loc_4A5FAE

loc_4A5F6D:
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_4]
mov	[edx+214h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+214h]
push	edx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_4A5FAE:
mov	esp, ebp
pop	ebp
retn	8
sub_4A5F30 endp

align 10h


; Attributes: bp-based frame

sub_4A5FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	eax, [ebp+var_8]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+214h], 0
mov	esp, ebp
pop	ebp
retn
sub_4A5FC0 endp

align 10h


; Attributes: bp-based frame

sub_4A6000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_4A5BA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A602A
push	218h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A602A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4A6000 endp

align 10h


; Attributes: bp-based frame

sub_4A6040 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6040
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
cmp	dword ptr [ecx], 0
jz	short loc_4A60A3
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4A60A3
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
call	edx

loc_4A60A3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6040 endp

align 10h


; Attributes: bp-based frame

sub_4A60C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_476 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_4A6107
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA90

loc_4A6107:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A60C0 endp

align 10h


; Attributes: bp-based frame

sub_4A6120 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
add	eax, 4
call	sub_40ABB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6120 endp

align 10h


; Attributes: bp-based frame

sub_4A6170 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_475 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 4
call	sub_429100
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6170 endp

align 10h


; Attributes: bp-based frame

sub_4A61C0 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A61C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 8
call	sub_4113A0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_429300
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A6219
push	18h
mov	ecx, [ebp+var_18]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A6219:
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A61C0 endp

align 10h


; Attributes: bp-based frame

sub_4A6230 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6230
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
add	ecx, 18h
call	sub_45BC60
mov	ecx, [ebp+var_20]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6230 endp

align 10h


; Attributes: bp-based frame

sub_4A6290 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_20]
add	eax, 18h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 18h
call	sub_45BC60
mov	ecx, [ebp+var_1C]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_20]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6290 endp

align 10h


; Attributes: bp-based frame

sub_4A6300 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C80
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_429300
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6300 endp

align 10h


; Attributes: bp-based frame

sub_4A6350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	al, al
mov	esp, ebp
pop	ebp
retn	8
sub_4A6350 endp

align 10h


; Attributes: bp-based frame

sub_4A6360 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	esi
mov	eax, [ebp+arg_0]
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+18h]
call	eax
mov	esi, eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	ecx, [ebp+arg_4]
mov	eax, [edx+18h]
call	eax
cmp	esi, eax
jnz	short loc_4A6399
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1Ch]
call	edx
jmp	short loc_4A63BE
jmp	short loc_4A63BE

loc_4A6399:
mov	eax, [ebp+arg_0]
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+18h]
call	eax
mov	esi, eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	ecx, [ebp+arg_4]
mov	eax, [edx+18h]
call	eax
xor	ecx, ecx
cmp	esi, eax
setl	cl
mov	al, cl

loc_4A63BE:
pop	esi
pop	ebp
retn
sub_4A6360 endp

align 10h


; Attributes: bp-based frame

sub_4A63D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C80
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A6421
push	8
mov	edx, [ebp+var_10]
push	edx
call	sub_1111040
add	esp, 8

loc_4A6421:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A63D0 endp

align 10h


; Attributes: bp-based frame

sub_4A6440 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6440
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
add	eax, 8
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A6440 endp

align 10h


; Attributes: bp-based frame

sub_4A64A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_61ED00
mov	esi, eax
mov	ecx, [ebp+var_4]
call	sub_5F52F0
xor	ecx, ecx
cmp	eax, esi
setz	cl
movzx	eax, cl
neg	eax
sbb	eax, eax
add	eax, 1
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4A64A0 endp

align 10h


; Attributes: bp-based frame

sub_4A64E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A64E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C80
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A654E
push	20h
mov	edx, [ebp+var_10]
push	edx
call	sub_1111040
add	esp, 8

loc_4A654E:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A64E0 endp

align 10h


; Attributes: bp-based frame

sub_4A6570 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	eax, [ecx+8]
or	eax, [edx+0Ch]
jz	short loc_4A6596
mov	[ebp+var_C], 1
jmp	short loc_4A659D

loc_4A6596:
mov	[ebp+var_C], 0

loc_4A659D:
mov	al, byte ptr [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4A6570 endp

align 10h


; Attributes: bp-based frame

sub_4A65B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A65B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C80
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A660F
push	18h
mov	edx, [ebp+var_10]
push	edx
call	sub_1111040
add	esp, 8

loc_4A660F:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A65B0 endp

align 10h


; Attributes: bp-based frame

sub_4A6630 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6630
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4AA6A0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6630 endp

align 10h


; Attributes: bp-based frame

sub_4A66A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A66A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A66A0 endp

align 10h


; Attributes: bp-based frame

sub_4A6700 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6700
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_10]
call	sub_4ABBD0
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 5
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6700 endp

align 10h


; Attributes: bp-based frame

sub_4A6770 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4ABBD0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6770 endp

align 10h


; Attributes: bp-based frame

sub_4A67D0 proc	near

var_B8=	dword ptr -0B8h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A67D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_B8], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_B8]
add	ecx, 10h
call	sub_487140
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_B8]
add	ecx, 4
call	sub_4A9770
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A67D0 endp



; Attributes: bp-based frame

sub_4A6830 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6830
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 9Ch
mov	[ebp+var_A8], ecx
mov	[ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_A8]
add	ecx, 98h
call	sub_436500
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_A8]
add	ecx, 88h
call	sub_4A9B90
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_A8]
add	ecx, 6Ch
call	sub_407910
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_A8]
add	ecx, 54h
call	sub_407910
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_A8]
add	ecx, 3Ch
call	sub_407910
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_A8]
add	ecx, 30h
call	sub_4A9A50
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_A8]
add	eax, 18h
mov	[ebp+var_A4], eax
mov	[ebp+var_4], 7
mov	[ebp+var_4], 9
mov	ecx, [ebp+var_A4]
call	sub_4ABC20
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0Ch
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6830 endp

align 10h


; Attributes: bp-based frame

sub_4A6930 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6930
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_4ABC20
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6930 endp

align 10h


; Attributes: bp-based frame

sub_4A6990 proc	near

var_A4=	dword ptr -0A4h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 98h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_A4]
call	sub_4A8C30
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6990 endp

align 10h


; Attributes: bp-based frame

sub_4A69E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	ecx, [ebp+var_8]
mov	[ecx], ax
xor	edx, edx
mov	eax, [ebp+var_8]
mov	[eax+2], dx
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_401EF0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4A69E0 endp

align 10h


; Attributes: bp-based frame

sub_4A6A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset sub_401EF0
push	2
push	0Ch
mov	eax, [ebp+var_4]
push	eax
call	sub_4078B0
push	offset ??0DNameNode@@IAE@XZ ; DNameNode::DNameNode(void)
push	2
push	8
mov	ecx, [ebp+var_4]
add	ecx, 18h
push	ecx
call	sub_4078B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4A6A40 endp

align 10h


; Attributes: bp-based frame

sub_4A6A80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 20h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_4022F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A6A80 endp

align 10h


; Attributes: bp-based frame

sub_4A6AD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1021910
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A6AF5
push	70h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A6AF5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4A6AD0 endp

align 10h


; Attributes: bp-based frame

sub_4A6B00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [eax+14h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_4A6B54
mov	[ebp+var_1], 0
mov	ecx, [ebp+var_18]
mov	edx, [ecx+14h]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	cl, [ebp+var_1]
mov	[eax], cl
mov	edx, [ebp+var_18]
mov	eax, [edx+14h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx+10h], edx

loc_4A6B54:
mov	esp, ebp
pop	ebp
retn
sub_4A6B00 endp

align 10h


; Attributes: bp-based frame

sub_4A6B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
mov	esp, ebp
pop	ebp
retn
sub_4A6B60 endp

align 10h


; Attributes: bp-based frame

sub_4A6B80 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6B80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_38], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_40], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_38]
call	sub_4AA430
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_38]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_38]
mov	[edx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A6B80 endp

align 10h


; Attributes: bp-based frame

sub_4A6C40 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4A6CA3
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 0Ch
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4A6C88
jmp	short loc_4A6CA1

loc_4A6C88:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4A6CA1:
jmp	short loc_4A6CD9

loc_4A6CA3:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4B0F50

loc_4A6CD9:
mov	esp, ebp
pop	ebp
retn	8
sub_4A6C40 endp

align 10h


; Attributes: bp-based frame

sub_4A6CE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A6D31
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
add	eax, 4
mov	ecx, [ebp+var_10]
mov	[ecx+4], eax
jmp	short loc_4A6D51

loc_4A6D31:
xor	edx, edx
mov	[ebp+var_1], dl
push	1
push	1
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_10]
call	sub_4ACDE0

loc_4A6D51:
mov	esp, ebp
pop	ebp
retn	4
sub_4A6CE0 endp

align 10h


; Attributes: bp-based frame

sub_4A6D60 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_48=	dword ptr -48h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_8]
call	sub_4046E0

loc_4A6D87:
lea	edx, [ebp+var_24]
mov	[ebp+var_20], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setnz	cl
mov	[ebp+var_5D], cl
movzx	edx, [ebp+var_5D]
test	edx, edx
jz	short loc_4A6E04
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_441C20
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_4A6DFC
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_436890

loc_4A6DFC:
mov	edx, [ebp+var_C]
mov	[ebp+var_4], edx
jmp	short loc_4A6D87

loc_4A6E04:
mov	esp, ebp
pop	ebp
retn	4
sub_4A6D60 endp

align 10h


; Attributes: bp-based frame

sub_4A6E10 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6E10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6E10 endp

align 10h


; Attributes: bp-based frame

sub_4A6F00 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_4AA5D0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A6F00 endp

align 10h


; Attributes: bp-based frame

sub_4A6F60 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A6F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
mov	[ebp+var_84], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_84]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_4C6C30
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_84]
cmp	dword ptr [ecx], 0
jz	short loc_4A701D
mov	edx, [ebp+var_84]
mov	eax, [ebp+var_84]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_80], eax
mov	edx, [ebp+var_84]
mov	eax, [edx]
mov	[ebp+var_7C], eax
cmp	[ebp+var_7C], 0
jz	short loc_4A701D
mov	ecx, [ebp+var_80]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_7C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A701D:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A6F60 endp

align 10h


; Attributes: bp-based frame

sub_4A7040 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4A70A3
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 30h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_4A7088
jmp	short loc_4A70A1

loc_4A7088:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_4ABF30

loc_4A70A1:
jmp	short loc_4A70D9

loc_4A70A3:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_4AD830

loc_4A70D9:
mov	esp, ebp
pop	ebp
retn	8
sub_4A7040 endp

align 10h


; Attributes: bp-based frame

sub_4A70E0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A70E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_50E7D0
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_4A7188
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_60], eax
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_4A7188
mov	ecx, [ebp+var_60]
imul	ecx, 14h
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A7188:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A70E0 endp

align 10h


; Attributes: bp-based frame

sub_4A71B0 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A71EB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4D27C0
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 14h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_4A720B

loc_4A71EB:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4AD8B0

loc_4A720B:
mov	esp, ebp
pop	ebp
retn	4
sub_4A71B0 endp

align 10h


; Attributes: bp-based frame

sub_4A7220 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 14h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4A7283
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 14h
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4A7268
jmp	short loc_4A7281

loc_4A7268:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4A7281:
jmp	short loc_4A72B9

loc_4A7283:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4AD9D0

loc_4A72B9:
mov	esp, ebp
pop	ebp
retn	8
sub_4A7220 endp

align 10h


; Attributes: bp-based frame

sub_4A72C0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A72C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A72C0 endp

align 10h


; Attributes: bp-based frame

sub_4A73B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AA6A0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A73B0 endp

align 10h


; Attributes: bp-based frame

sub_4A7410 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A7410
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7410 endp

align 10h


; Attributes: bp-based frame

sub_4A7500 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_24]
call	sub_4AA6F0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A7500 endp

align 10h


; Attributes: bp-based frame

sub_4A7560 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AA7C0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7560 endp

align 10h


; Attributes: bp-based frame

sub_4A75C0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A75C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A75C0 endp

align 10h


; Attributes: bp-based frame

sub_4A76B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AA880
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A76B0 endp

align 10h


; Attributes: bp-based frame

sub_4A7710 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A7710
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7710 endp

align 10h


; Attributes: bp-based frame

sub_4A7800 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_4AA8D0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A7800 endp

align 10h


; Attributes: bp-based frame

sub_4A7860 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AA9A0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7860 endp

align 10h


; Attributes: bp-based frame

sub_4A78C0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A78C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A78C0 endp

align 10h


; Attributes: bp-based frame

sub_4A79B0 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_4AA9F0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A79B0 endp

align 10h


; Attributes: bp-based frame

sub_4A7A10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AAAC0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7A10 endp

align 10h


; Attributes: bp-based frame

sub_4A7A70 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_24]
call	sub_4AA810
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A7A70 endp

align 10h


; Attributes: bp-based frame

sub_4A7AD0 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_4AABE0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A7AD0 endp

align 10h


; Attributes: bp-based frame

sub_4A7B30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A7B30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_5D2630
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7B30 endp

align 10h


; Attributes: bp-based frame

sub_4A7B80 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
lea	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4AC120
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_14]
mov	[eax+4], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_4A7B80 endp

align 10h


; Attributes: bp-based frame

sub_4A7C00 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A7C00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_5BD2C0
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_4A7CA1
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_4A7CA1
mov	ecx, [ebp+var_60]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A7CA1:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7C00 endp

align 10h


; Attributes: bp-based frame

sub_4A7CC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A7CFB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_4A7D26

loc_4A7CFB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_4AEB40

loc_4A7D26:
mov	esp, ebp
pop	ebp
retn	4
sub_4A7CC0 endp

align 10h


; Attributes: bp-based frame

sub_4A7D30 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A7D30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
mov	[ebp+var_B4], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_B4]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_4B7030
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_B4]
cmp	dword ptr [ecx], 0
jz	short loc_4A7DFF
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_B0], eax
mov	edx, [ebp+var_B4]
mov	eax, [edx]
mov	[ebp+var_AC], eax
cmp	[ebp+var_AC], 0
jz	short loc_4A7DFF
mov	ecx, [ebp+var_B0]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_AC]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A7DFF:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7D30 endp

align 10h


; Attributes: bp-based frame

sub_4A7E20 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4A7E83
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 0Ch
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4A7E68
jmp	short loc_4A7E81

loc_4A7E68:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_4AC040

loc_4A7E81:
jmp	short loc_4A7EB9

loc_4A7E83:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4AED20

loc_4A7EB9:
mov	esp, ebp
pop	ebp
retn	8
sub_4A7E20 endp

align 10h


; Attributes: bp-based frame

sub_4A7EC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AACD0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7EC0 endp

align 10h


; Attributes: bp-based frame

sub_4A7F20 proc	near

var_44=	dword ptr -44h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_44]
call	sub_4AAD20
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A7F20 endp

align 10h


; Attributes: bp-based frame

sub_4A7F80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AAD90
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A7F80 endp

align 10h


; Attributes: bp-based frame

sub_4A7FE0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4AC120
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_4A7FE0 endp

align 10h


; Attributes: bp-based frame

sub_4A8050 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8050
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_46A7D0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8050 endp

align 10h


; Attributes: bp-based frame

sub_4A80B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A80B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AEE70
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A80B0 endp

align 10h


; Attributes: bp-based frame

sub_4A8100 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4AC1D0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_4A8100 endp

align 10h


; Attributes: bp-based frame

sub_4A8170 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
cmp	[ebp+var_C], 0
jz	short loc_4A81C1
mov	ecx, 1
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A81C1:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A8170 endp

align 10h


; Attributes: bp-based frame

sub_4A81E0 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4A8170
mov	esp, ebp
pop	ebp
retn
sub_4A81E0 endp



; Attributes: bp-based frame

sub_4A8210 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8050
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AB030
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8210 endp

align 10h


; Attributes: bp-based frame

sub_4A8270 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_18], eax
mov	[ebp+var_14], 80h
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_10]
sar	ecx, 2
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	edx, [edx]
sub	edx, [eax+4]
sar	edx, 2
mov	eax, [ebp+var_18]
mov	eax, [eax+0Ch]
sub	eax, [ebp+var_4]
sar	eax, 2
sub	eax, 1
imul	eax, 20h
add	eax, edx
add	eax, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8270 endp

align 10h


; Attributes: bp-based frame

sub_4A82E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+18h]
sub	ecx, 4
mov	edx, [ebp+var_C]
cmp	[edx+10h], ecx
jz	short loc_4A8334
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
xor	edx, edx
mov	[ebp+var_3], dl
mov	al, [ebp+var_3]
mov	[ebp+var_1], al
xor	ecx, ecx
mov	[ebp+var_4], cl
mov	dl, [ebp+var_4]
mov	[ebp+var_2], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
add	ecx, 4
mov	edx, [ebp+var_C]
mov	[edx+10h], ecx
jmp	short loc_4A8340

loc_4A8334:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_4B0900

loc_4A8340:
mov	esp, ebp
pop	ebp
retn	4
sub_4A82E0 endp

align 10h


; Attributes: bp-based frame

sub_4A8350 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jnz	short loc_4A8398
mov	edx, [ebp+arg_14]
push	edx
mov	ecx, [ebp+var_38]
call	sub_4AB080
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]
jmp	loc_4A8433
jmp	loc_4A8433

loc_4A8398:
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+10h]
jnz	short loc_4A83F5
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+var_38]
call	sub_4A82E0
mov	ecx, [ebp+var_38]
add	ecx, 10h
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ecx+4]
mov	[ebp+var_C], eax
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_10]
call	sub_4AC350
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]
jmp	short loc_4A8433
jmp	short loc_4A8433

loc_4A83F5:
xor	ecx, ecx
mov	[ebp+var_11], cl
lea	edx, [ebp+var_11]
push	edx
mov	eax, [ebp+arg_14]
push	eax
push	1
sub	esp, 10h
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_4AF0F0
mov	eax, [ebp+arg_0]

loc_4A8433:
mov	esp, ebp
pop	ebp
retn	18h
sub_4A8350 endp

align 10h


; Attributes: bp-based frame

sub_4A8440 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_1C=	byte ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
mov	ecx, [ebp+var_88]
call	sub_4A8270
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_4]
jnb	loc_4A84EB
sub	esp, 10h
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_88]
add	ecx, 10h
mov	edx, [ebp+var_3C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_50], esp
mov	edx, [ebp+var_88]
mov	eax, [edx]
mov	[ebp+var_4C], eax
mov	ecx, [edx+4]
mov	[ebp+var_48], ecx
mov	eax, [edx+8]
mov	[ebp+var_44], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_40], ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_4C]
call	sub_4AC610
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	edx, [ebp+var_48]
mov	[eax+4], edx
mov	ecx, [ebp+var_44]
mov	[eax+8], ecx
mov	edx, [ebp+var_40]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_88]
call	sub_4AB0F0
jmp	short loc_4A8555

loc_4A84EB:
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_4]
mov	[ebp+var_84], ecx
lea	edx, [ebp+var_80]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_88]
add	eax, 10h
mov	ecx, [ebp+var_68]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_84]
push	edx
sub	esp, 10h
mov	[ebp+var_70], esp
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_80]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	[eax+4], edx
mov	ecx, [ebp+var_78]
mov	[eax+8], ecx
mov	edx, [ebp+var_74]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_88]
call	sub_4AFD80

loc_4A8555:
mov	esp, ebp
pop	ebp
retn	8
sub_4A8440 endp

align 10h


; Attributes: bp-based frame

sub_4A8560 proc	near

var_44=	dword ptr -44h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_44]
call	sub_4AB410
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A8560 endp

align 10h


; Attributes: bp-based frame

sub_4A85C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AB480
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A85C0 endp

align 10h


; Attributes: bp-based frame

sub_4A8620 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_24]
add	edx, 4
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_11], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A8620 endp

align 10h


; Attributes: bp-based frame

sub_4A86B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_4A870E
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4A86F3
jmp	short loc_4A870C

loc_4A86F3:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4A870C:
jmp	short loc_4A873F

loc_4A870E:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_4B1410

loc_4A873F:
mov	esp, ebp
pop	ebp
retn	8
sub_4A86B0 endp

align 10h


; Attributes: bp-based frame

sub_4A8750 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_59ED70
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8750 endp

align 10h


; Attributes: bp-based frame

sub_4A87A0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4AB540
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_4A87A0 endp

align 10h


; Attributes: bp-based frame

sub_4A8810 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
cmp	[ebp+var_C], 0
jz	short loc_4A8861
mov	ecx, 1
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A8861:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4A8810 endp

align 10h


; Attributes: bp-based frame

sub_4A8880 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4A8810
mov	esp, ebp
pop	ebp
retn
sub_4A8880 endp



; Attributes: bp-based frame

sub_4A88B0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A88B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 54h
mov	[ebp+var_60], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_4B7060
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_60]
cmp	dword ptr [ecx], 0
jz	short loc_4A8951
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_60]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 5
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	[ebp+var_58], eax
cmp	[ebp+var_58], 0
jz	short loc_4A8951
mov	ecx, [ebp+var_5C]
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_58]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A8951:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A88B0 endp

align 10h


; Attributes: bp-based frame

sub_4A8970 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A89AB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4CFD90
add	esp, 8
mov	eax, [ebp+var_58]
mov	ecx, [eax+4]
add	ecx, 20h
mov	edx, [ebp+var_58]
mov	[edx+4], ecx
jmp	short loc_4A89D6

loc_4A89AB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_54], edx
xor	eax, eax
mov	[ebp+var_4D], al
push	1
push	1
lea	ecx, [ebp+var_4D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_58]
call	sub_4B0D20

loc_4A89D6:
mov	esp, ebp
pop	ebp
retn	4
sub_4A8970 endp

align 10h


; Attributes: bp-based frame

sub_4A89E0 proc	near

var_4C=	dword ptr -4Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A89E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4C]
call	sub_437EB0
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_4C]
movzx	eax, byte ptr [edx+0Ch]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_24]
push	edx
call	sub_4B7090
add	esp, 0Ch
jmp	short loc_4A8A61

loc_4A8A43:
mov	ecx, [ebp+var_4C]
call	sub_591AF0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4A8A68
retn

loc_4A8A61:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4A8A68:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4A89E0 endp

align 10h


; Attributes: bp-based frame

sub_4A8A80 proc	near

var_48=	dword ptr -48h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8A80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 38h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_48], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_48]
movzx	edx, byte ptr [ecx+0Ch]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
call	sub_4B70C0
add	esp, 0Ch
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
sub	eax, 4
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
jmp	short loc_4A8B12

loc_4A8AF4:
mov	ecx, [ebp+var_48]
call	sub_591AF0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4A8B19
retn

loc_4A8B12:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4A8B19:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4A8A80 endp

align 10h


; Attributes: bp-based frame

sub_4A8B30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_437990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AB750
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8B30 endp

align 10h


; Attributes: bp-based frame

sub_4A8B90 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A8BCB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7AA0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_4A8BF6

loc_4A8BCB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_4B0FC0

loc_4A8BF6:
mov	esp, ebp
pop	ebp
retn	4
sub_4A8B90 endp

align 10h


; Attributes: bp-based frame

sub_4A8C00 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_49E660
mov	esp, ebp
pop	ebp
retn	4
sub_4A8C00 endp

align 10h


; Attributes: bp-based frame

sub_4A8C30 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8C30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 98h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_90]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_A4]
add	ecx, 10h
mov	edx, [ebp+var_18]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_A0]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_70]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_90]
mov	[edx], eax
mov	ecx, [ebp+var_8C]
mov	[edx+4], ecx
mov	eax, [ebp+var_88]
mov	[edx+8], eax
mov	ecx, [ebp+var_84]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_80]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_A0]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	[eax+4], edx
mov	ecx, [ebp+var_98]
mov	[eax+8], ecx
mov	edx, [ebp+var_94]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_2D], al
lea	ecx, [ebp+var_50]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_70]
mov	[edx], eax
mov	ecx, [ebp+var_6C]
mov	[edx+4], ecx
mov	eax, [ebp+var_68]
mov	[edx+8], eax
mov	ecx, [ebp+var_64]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_60]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_80]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	[eax+4], edx
mov	ecx, [ebp+var_78]
mov	[eax+8], ecx
mov	edx, [ebp+var_74]
mov	[eax+0Ch], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_A4]
call	sub_4B1480
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8C30 endp

align 10h


; Attributes: bp-based frame

sub_4A8D70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8D70 endp

align 10h


; Attributes: bp-based frame

sub_4A8DD0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4AC440
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_4A8DD0 endp

align 10h


; Attributes: bp-based frame

sub_4A8E40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8E40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_0], 0
jz	short loc_4A8E9C
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_1573BF8
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], offset unk_155DFAC
mov	ecx, [ebp+var_14]
add	ecx, 0A0h
call	??0filebuf@@QAE@HPADH@Z	; filebuf::filebuf(int,char *,int)
mov	[ebp+var_4], 0
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx

loc_4A8E9C:
push	0
push	0
mov	ecx, [ebp+var_14]
call	sub_44BAD0
mov	[ebp+var_4], 1
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	dword ptr [eax+edx], offset off_14463C0
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_43C000
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
add	ecx, 18h
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
add	ecx, [eax+4]
call	sub_43BA90
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A8E40 endp

align 10h


; Attributes: bp-based frame

sub_4A8F10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8F10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax-0A0h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	dword ptr [eax+edx-0A0h], offset off_14463C0
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
sub	ecx, 88h
call	sub_43C160
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
sub	ecx, 88h
call	sub_442D00
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8F10 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4A8F90(LPCSTR lpFileName, int)
sub_4A8F90 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+lpFileName]
push	edx		; lpFileName
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_77F4E0
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, [ebp+var_4]
jnz	short loc_4A8FD3
push	4
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	ecx, [ebp+var_10]
add	ecx, [edx+4]
call	sub_438B50

loc_4A8FD3:
mov	esp, ebp
pop	ebp
retn	8
sub_4A8F90 endp

align 10h


; Attributes: bp-based frame

sub_4A8FE0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A8FE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A8FE0 endp

align 10h


; Attributes: bp-based frame

sub_4A90D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4AB820
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A90D0 endp

align 10h


; Attributes: bp-based frame

sub_4A9130 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_50E7D0
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_4A91D8
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_60], eax
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_4A91D8
mov	ecx, [ebp+var_60]
imul	ecx, 64h
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A91D8:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A9130 endp

align 10h


; Attributes: bp-based frame

sub_4A9200 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A923B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4D3130
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 64h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_4A925B

loc_4A923B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4B34C0

loc_4A925B:
mov	esp, ebp
pop	ebp
retn	4
sub_4A9200 endp

align 10h


; Attributes: bp-based frame

sub_4A9270 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 64h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4A92D3
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 64h
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4A92B8
jmp	short loc_4A92D1

loc_4A92B8:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4A92D1:
jmp	short loc_4A9309

loc_4A92D3:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4B35C0

loc_4A9309:
mov	esp, ebp
pop	ebp
retn	8
sub_4A9270 endp

align 10h


; Attributes: bp-based frame

sub_4A9310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
sar	eax, 2
mov	esp, ebp
pop	ebp
retn
sub_4A9310 endp

align 10h


; Attributes: bp-based frame

sub_4A9330 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A936B
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx
call	sub_5EB830
add	esp, 8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_4A9396

loc_4A936B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_4B3BB0

loc_4A9396:
mov	esp, ebp
pop	ebp
retn	4
sub_4A9330 endp

align 10h


; Attributes: bp-based frame

sub_4A93A0 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A93A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_4CE480
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_5C]
cmp	dword ptr [ecx], 0
jz	short loc_4A9441
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_5C]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_54], eax
cmp	[ebp+var_54], 0
jz	short loc_4A9441
mov	ecx, [ebp+var_58]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_54]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A9441:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A93A0 endp

align 10h


; Attributes: bp-based frame

sub_4A9460 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_4A94BE
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_4A94A3
jmp	short loc_4A94BC

loc_4A94A3:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_5E0DD0

loc_4A94BC:
jmp	short loc_4A94EF

loc_4A94BE:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_4B3D80

loc_4A94EF:
mov	esp, ebp
pop	ebp
retn	8
sub_4A9460 endp

align 10h


; Attributes: bp-based frame

sub_4A9500 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= word ptr	-5
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
push	edi
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A9571
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	byte ptr [ebp+var_3+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	byte ptr [ebp+var_3], dl
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_4A9559
mov	esi, [ebp+arg_0]
mov	ecx, 9
mov	edi, [ebp+var_C]
rep movsd
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
jmp	short loc_4A9560

loc_4A9559:
mov	[ebp+var_18], 0

loc_4A9560:
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
add	eax, 24h
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
jmp	short loc_4A9591

loc_4A9571:
xor	edx, edx
mov	[ebp+var_1], dl
push	1
push	1
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4B52D0

loc_4A9591:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4A9500 endp

align 10h


; Attributes: bp-based frame

sub_4A95A0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_10=	word ptr -10h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A95A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_38], eax
mov	eax, [ebp+var_38]
mov	[ebp+var_3C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_34]
call	sub_4AB960
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
xor	eax, eax
mov	[ebp+var_10], ax
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_34]
mov	ecx, [eax]
push	ecx		; void *
call	sub_4B76A0
add	esp, 0Ch
mov	edx, [ebp+var_34]
mov	[edx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A95A0 endp

align 10h


; Attributes: bp-based frame

sub_4A9630 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9630
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_50E7D0
add	esp, 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_5C]
call	sub_4ABA00
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A9630 endp

align 10h


; Attributes: bp-based frame

sub_4A96B0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A96B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_48]
call	sub_4C7730
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
push	0
lea	edx, [ebp+var_3D]
push	edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_4D1710
add	esp, 14h
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A96B0 endp

align 10h


; Attributes: bp-based frame

sub_4A9770 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_50E7D0
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_4A9811
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_4A9811
mov	ecx, [ebp+var_60]
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A9811:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A9770 endp

align 10h


; Attributes: bp-based frame

sub_4A9830 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A986B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4B7100
add	esp, 8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_4A9896

loc_4A986B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_4B5B40

loc_4A9896:
mov	esp, ebp
pop	ebp
retn	4
sub_4A9830 endp

align 10h


; Attributes: bp-based frame

sub_4A98A0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A98A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E]
mov	[ebp+var_38], ecx
mov	byte ptr [ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	[edx+0Ch], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A98A0 endp

align 10h


; Attributes: bp-based frame

sub_4A9990 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4ABBD0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A9990 endp

align 10h


; Attributes: bp-based frame

sub_4A99F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_436760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_4ABC20
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A99F0 endp

align 10h


; Attributes: bp-based frame

sub_4A9A50 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9A50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_4C6C60
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx], 0
jz	short loc_4A9AF8
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_60], eax
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jz	short loc_4A9AF8
mov	ecx, [ebp+var_60]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_5C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A9AF8:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A9A50 endp

align 10h


; Attributes: bp-based frame

sub_4A9B20 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A9B5B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4B7190
add	esp, 8
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 34h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_4A9B86

loc_4A9B5B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_4B63B0

loc_4A9B86:
mov	esp, ebp
pop	ebp
retn	4
sub_4A9B20 endp

align 10h


; Attributes: bp-based frame

sub_4A9B90 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9B90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
mov	[ebp+var_B4], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_B4]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_4C6C90
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_B4]
cmp	dword ptr [ecx], 0
jz	short loc_4A9C5F
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_B0], eax
mov	edx, [ebp+var_B4]
mov	eax, [edx]
mov	[ebp+var_AC], eax
cmp	[ebp+var_AC], 0
jz	short loc_4A9C5F
mov	ecx, [ebp+var_B0]
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_AC]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4A9C5F:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A9B90 endp

align 10h


; Attributes: bp-based frame

sub_4A9C80 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_48]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4A9CDB
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_4C66D0
add	esp, 0Ch
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
add	ecx, 1Ch
mov	edx, [ebp+var_48]
mov	[edx+4], ecx
jmp	short loc_4A9D06

loc_4A9CDB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_44], edx
xor	eax, eax
mov	[ebp+var_3D], al
push	1
push	1
lea	ecx, [ebp+var_3D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_48]
call	sub_4B6580

loc_4A9D06:
mov	esp, ebp
pop	ebp
retn	4
sub_4A9C80 endp

align 10h


; Attributes: bp-based frame

sub_4A9D10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4A9D10 endp

align 10h


; Attributes: bp-based frame

sub_4A9D50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4CB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_429100
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A9DC6
push	38h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4A9DC6:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A9D50 endp

align 10h


; Attributes: bp-based frame

sub_4A9DE0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4A4D70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A9E07
push	38h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4A9E07:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4A9DE0 endp



; Attributes: bp-based frame

sub_4A9E10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4345B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
sub	eax, 0A0h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 0A0h
call	sub_4A8F10
mov	ecx, [ebp+var_14]
add	ecx, 0A0h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4A9E8C
mov	ecx, [ebp+var_18]
sub	ecx, 0A0h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4A9E8C:
mov	eax, [ebp+var_18]
sub	eax, 0A0h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A9E10 endp

align 10h


; Attributes: bp-based frame

sub_4A9EB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A54C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_10FB7C0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A9F26
push	50h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4A9F26:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A9EB0 endp

align 10h


; Attributes: bp-based frame

sub_4A9F40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A9F40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4A9FA7
push	38h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4A9FA7:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A9F40 endp

align 10h


; Attributes: bp-based frame

sub_4A9FC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A55C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4AA036
push	68h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4AA036:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4A9FC0 endp

align 10h


; Attributes: bp-based frame

sub_4AA050 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_47C840
mov	ecx, eax
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_2C]
jz	short loc_4AA091
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_4]
call	sub_402EB0
mov	ecx, [ebp+var_2C]
call	sub_469480
mov	eax, 1
jmp	short loc_4AA093

loc_4AA091:
xor	eax, eax

loc_4AA093:
mov	esp, ebp
pop	ebp
retn	4
sub_4AA050 endp

align 10h


; Attributes: bp-based frame

sub_4AA0A0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+14h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+var_8]
cmp	[ebp+arg_0], ecx
ja	short loc_4AA0ED
mov	edx, [ebp+var_28]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+14h]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_4441D0
jmp	short loc_4AA118

loc_4AA0ED:
mov	edx, [ebp+var_28]
mov	eax, [edx+10h]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+14h]
mov	[ebp+var_24], edx
movzx	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_20]
sub	ecx, [ebp+var_24]
mov	edx, [ebp+arg_0]
sub	edx, ecx
push	edx
mov	ecx, [ebp+var_28]
call	sub_4AC930

loc_4AA118:
mov	esp, ebp
pop	ebp
retn	8
sub_4AA0A0 endp

align 10h


; Attributes: bp-based frame

sub_4AA120 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [eax+14h]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setz	dl
movzx	eax, dl
test	eax, eax
jz	loc_4AA239
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
xor	eax, eax
cmp	edx, [ebp+arg_0]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	loc_4AA223
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [edx+4]
mov	[ebp+var_1C], ecx
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_64]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+10h]
sub	ecx, [eax+14h]
mov	edx, [ebp+var_64]
add	ecx, [edx+14h]
mov	eax, [ebp+var_64]
mov	[eax+10h], ecx
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
sub	edx, [ecx+14h]
add	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[eax+10h], edx
mov	ecx, [ebp+arg_0]
add	ecx, 14h
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_64]
add	edx, 14h
mov	[ebp+var_2C], edx
xor	eax, eax
mov	[ebp+var_21], al
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_30]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	[edx+14h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	[ecx+14h], edx
jmp	short loc_4AA234

loc_4AA223:
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AA120
jmp	loc_4AA367

loc_4AA234:
jmp	loc_4AA367

loc_4AA239:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
xor	eax, eax
cmp	edx, [ebp+arg_0]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	loc_4AA2F0
mov	edx, [ebp+var_64]
mov	eax, [edx+14h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_64]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 14h
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_64]
add	ecx, 14h
mov	[ebp+var_3C], ecx
xor	edx, edx
mov	[ebp+var_31], dl
mov	eax, [ebp+var_3C]
mov	ecx, [eax]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_38]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_64]
mov	[ecx+14h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
sub	ecx, [ebp+arg_0]
add	ecx, [ebp+var_64]
mov	edx, [ebp+var_64]
mov	[edx+10h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_10]
mov	[edx+14h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx+10h], edx
jmp	short loc_4AA367

loc_4AA2F0:
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_44]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 14h
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_64]
add	edx, 14h
mov	[ebp+var_50], edx
xor	eax, eax
mov	[ebp+var_45], al
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_58]
mov	[eax], ecx

loc_4AA367:
mov	esp, ebp
pop	ebp
retn	4
sub_4AA120 endp

align 10h


; Attributes: bp-based frame

sub_4AA370 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_4AA3B9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_4ABDF0
mov	eax, 1
jmp	short loc_4AA3BB

loc_4AA3B9:
xor	eax, eax

loc_4AA3BB:
mov	esp, ebp
pop	ebp
retn	4
sub_4AA370 endp

align 10h


; Attributes: bp-based frame

sub_4AA3D0 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_450A50
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_4AA419
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_594BE0
mov	eax, 1
jmp	short loc_4AA41B

loc_4AA419:
xor	eax, eax

loc_4AA41B:
mov	esp, ebp
pop	ebp
retn	4
sub_4AA3D0 endp

align 10h


; Attributes: bp-based frame

sub_4AA430 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA430
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_479650
mov	ecx, [ebp+var_24]
mov	[ecx], eax
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 0Ch
mov	eax, [ebp+var_24]
add	edx, [eax]
mov	ecx, [ebp+var_24]
mov	[ecx+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AA430 endp

align 10h


; Attributes: bp-based frame

sub_4AA4D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4AA534
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_4AA534
mov	ecx, [ebp+var_14]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AA534:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AA4D0 endp



; Attributes: bp-based frame

sub_4AA550 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4AA5B4
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_4AA5B4
mov	ecx, [ebp+var_14]
imul	ecx, 14h
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AA5B4:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AA550 endp



; Attributes: bp-based frame

sub_4AA5D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B72D0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AA627
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AA627:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AA5D0 endp

align 10h


; Attributes: bp-based frame

sub_4AA640 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4C6770
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_4AA689
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_4AA5D0
mov	eax, 1
jmp	short loc_4AA68B

loc_4AA689:
xor	eax, eax

loc_4AA68B:
mov	esp, ebp
pop	ebp
retn	4
sub_4AA640 endp

align 10h


; Attributes: bp-based frame

sub_4AA6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AA6E5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4ADAC0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AA6E5:
mov	esp, ebp
pop	ebp
retn
sub_4AA6A0 endp

align 10h


; Attributes: bp-based frame

sub_4AA6F0 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_14]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7330
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AA747
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AA747:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_14]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AA6F0 endp

align 10h


; Attributes: bp-based frame

sub_4AA760 proc	near

var_3C=	dword ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_4C6770
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_3C]
jz	short loc_4AA7A9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_3C]
call	sub_4AA6F0
mov	eax, 1
jmp	short loc_4AA7AB

loc_4AA7A9:
xor	eax, eax

loc_4AA7AB:
mov	esp, ebp
pop	ebp
retn	4
sub_4AA760 endp

align 10h


; Attributes: bp-based frame

sub_4AA7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AA805
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4ADB20
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AA805:
mov	esp, ebp
pop	ebp
retn
sub_4AA7C0 endp

align 10h


; Attributes: bp-based frame

sub_4AA810 proc	near

var_14=	dword ptr -14h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_14]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4C6E40
cmp	[ebp+var_4], 0
jz	short loc_4AA86A
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AA86A:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_14]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AA810 endp

align 10h


; Attributes: bp-based frame

sub_4AA880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AA8C5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4ADB80
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AA8C5:
mov	esp, ebp
pop	ebp
retn
sub_4AA880 endp

align 10h


; Attributes: bp-based frame

sub_4AA8D0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B73A0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AA927
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AA927:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AA8D0 endp

align 10h


; Attributes: bp-based frame

sub_4AA940 proc	near

var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_4C6770
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_38]
jz	short loc_4AA989
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_38]
call	sub_4AA8D0
mov	eax, 1
jmp	short loc_4AA98B

loc_4AA989:
xor	eax, eax

loc_4AA98B:
mov	esp, ebp
pop	ebp
retn	4
sub_4AA940 endp

align 10h


; Attributes: bp-based frame

sub_4AA9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AA9E5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4ADBF0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AA9E5:
mov	esp, ebp
pop	ebp
retn
sub_4AA9A0 endp

align 10h


; Attributes: bp-based frame

sub_4AA9F0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7420
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AAA47
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AAA47:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AA9F0 endp

align 10h


; Attributes: bp-based frame

sub_4AAA60 proc	near

var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_4C6770
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_38]
jz	short loc_4AAAA9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_38]
call	sub_4AA9F0
mov	eax, 1
jmp	short loc_4AAAAB

loc_4AAAA9:
xor	eax, eax

loc_4AAAAB:
mov	esp, ebp
pop	ebp
retn	4
sub_4AAA60 endp

align 10h


; Attributes: bp-based frame

sub_4AAAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AAB05
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4ADC50
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AAB05:
mov	esp, ebp
pop	ebp
retn
sub_4AAAC0 endp

align 10h
; [0000000B BYTES: COLLAPSED FUNCTION std::_Init_locks::~_Init_locks(void). PRESS KEYPAD "+" TO	EXPAND]
align 10h


; Attributes: bp-based frame

sub_4AAB20 proc	near

var_3C=	dword ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_4C6770
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_3C]
jz	short loc_4AAB69
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_3C]
call	sub_4AA810
mov	eax, 1
jmp	short loc_4AAB6B

loc_4AAB69:
xor	eax, eax

loc_4AAB6B:
mov	esp, ebp
pop	ebp
retn	4
sub_4AAB20 endp

align 10h


; Attributes: bp-based frame

sub_4AAB80 proc	near

var_5C=	dword ptr -5Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_4C6770
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_5C]
jz	short loc_4AABC9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_4ABFD0
mov	eax, 1
jmp	short loc_4AABCB

loc_4AABC9:
xor	eax, eax

loc_4AABCB:
mov	esp, ebp
pop	ebp
retn	4
sub_4AAB80 endp

align 10h


; Attributes: bp-based frame

sub_4AABE0 proc	near

var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_18]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_47EA80
cmp	[ebp+var_4], 0
jz	short loc_4AAC3A
mov	edx, 1
imul	edx, 5Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AAC3A:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_18]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AABE0 endp

align 10h


; Attributes: bp-based frame

sub_4AAC50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4AACB4
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_4AACB4
mov	ecx, [ebp+var_14]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AACB4:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AAC50 endp



; Attributes: bp-based frame

sub_4AACD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AAD15
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4AEDB0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AAD15:
mov	esp, ebp
pop	ebp
retn
sub_4AACD0 endp

align 10h


; Attributes: bp-based frame

sub_4AAD20 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_60]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_60]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B74A0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AAD77
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AAD77:
mov	ecx, [ebp+var_60]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_60]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AAD20 endp

align 10h


; Attributes: bp-based frame

sub_4AAD90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AADD5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4AEE10
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AADD5:
mov	esp, ebp
pop	ebp
retn
sub_4AAD90 endp

align 10h


; Attributes: bp-based frame

sub_4AADE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_5D2630
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AADE0 endp

align 10h


; Attributes: bp-based frame

sub_4AAE30 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AAE30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4AAE30 endp

align 10h


; Attributes: bp-based frame

sub_4AAEB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_4AEE70
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AAEB0 endp

align 10h


; Attributes: bp-based frame

sub_4AAF00 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AAF00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_34]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AAF00 endp

align 10h


; Attributes: bp-based frame

sub_4AAFD0 proc	near

var_54=	dword ptr -54h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_54]
call	sub_4C6850
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_54]
jz	short loc_4AB019
push	ecx
mov	[ebp+var_38], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	ecx, [ebp+var_54]
call	sub_4AC290
mov	eax, 1
jmp	short loc_4AB01B

loc_4AB019:
xor	eax, eax

loc_4AB01B:
mov	esp, ebp
pop	ebp
retn	4
sub_4AAFD0 endp

align 10h


; Attributes: bp-based frame

sub_4AB030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AB075
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4AEED0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AB075:
mov	esp, ebp
pop	ebp
retn
sub_4AB030 endp

align 10h


; Attributes: bp-based frame

sub_4AB080 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+4]
jz	short loc_4AB0D0
mov	eax, [ebp+var_C]
mov	ecx, [eax]
sub	ecx, 4
mov	[ebp+var_8], ecx
xor	edx, edx
mov	[ebp+var_3], dl
mov	al, [ebp+var_3]
mov	[ebp+var_1], al
xor	ecx, ecx
mov	[ebp+var_4], cl
mov	dl, [ebp+var_4]
mov	[ebp+var_2], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
sub	ecx, 4
mov	edx, [ebp+var_C]
mov	[edx], ecx
jmp	short loc_4AB0DC

loc_4AB0D0:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_4B0A60

loc_4AB0DC:
mov	esp, ebp
pop	ebp
retn	4
sub_4AB080 endp

align 10h


; Attributes: bp-based frame

sub_4AB0F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [eax]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4AB156
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_14]
xor	eax, eax
cmp	edx, [ecx+10h]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4AB156
mov	ecx, [ebp+var_18]
call	sub_4B07E0
mov	edx, [ebp+var_18]
add	edx, 10h
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
jmp	loc_4AB1DF
jmp	loc_4AB1DF

loc_4AB156:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_14]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4AB187
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
jmp	short loc_4AB1DF

loc_4AB187:
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4AFFE0
mov	eax, [ebp+arg_0]

loc_4AB1DF:
mov	esp, ebp
pop	ebp
retn	24h
sub_4AB0F0 endp

align 10h


; Attributes: bp-based frame

sub_4AB1F0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AB1F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_20]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_20]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
add	eax, 20h
mov	[ebp+var_18], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_20]
add	edx, 24h
mov	[ebp+var_1C], edx
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4AEF30
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AB1F0 endp

align 10h


; Attributes: bp-based frame

sub_4AB2D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
add	ecx, 4
mov	edx, [ebp+var_C]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+8]
jnz	short loc_4AB339
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 20h
shl	ecx, 2
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx], eax

loc_4AB339:
mov	esp, ebp
pop	ebp
retn
sub_4AB2D0 endp

align 10h


; Attributes: bp-based frame

sub_4AB340 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AB340
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_34]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AB340 endp

align 10h


; Attributes: bp-based frame

sub_4AB410 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_60]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_60]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7510
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AB467
mov	edx, 1
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AB467:
mov	ecx, [ebp+var_60]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_60]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AB410 endp

align 10h


; Attributes: bp-based frame

sub_4AB480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AB4C5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4B0BB0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AB4C5:
mov	esp, ebp
pop	ebp
retn
sub_4AB480 endp

align 10h
; [0000006B BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000009C BYTES: COLLAPSED FUNCTION sub_4AB540. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4AB5E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_59ED70
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AB5E0 endp

align 10h


; Attributes: bp-based frame

sub_4AB630 proc	near

var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 20h
cmp	edx, [ebp+var_8]
jz	short loc_4AB6A7
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
add	ecx, 20h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_24]
sub	edx, [ebp+var_1C]
sar	edx, 5
mov	[ebp+var_10], edx
jmp	short loc_4AB681

loc_4AB678:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax

loc_4AB681:
cmp	[ebp+var_10], 0
jle	short loc_4AB6A7
mov	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4C6ED0
mov	edx, [ebp+var_1C]
add	edx, 20h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
add	eax, 20h
mov	[ebp+var_20], eax
jmp	short loc_4AB678

loc_4AB6A7:
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
sub	edx, 20h
mov	eax, [ebp+var_30]
mov	[eax+4], edx
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4B7620
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4AB630 endp

align 10h


; Attributes: bp-based frame

sub_4AB6D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4AB72F
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 5
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_4AB72F
mov	eax, [ebp+var_14]
shl	eax, 5
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4AB72F:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AB6D0 endp

align 10h


; Attributes: bp-based frame

sub_4AB750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AB795
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4B0EF0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AB795:
mov	esp, ebp
pop	ebp
retn
sub_4AB750 endp

align 10h


; Attributes: bp-based frame

sub_4AB7A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4AB7FF
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_4AB7FF
mov	eax, [ebp+var_14]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4AB7FF:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AB7A0 endp

align 10h


; Attributes: bp-based frame

sub_4AB820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4AB865
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4B3100
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4AB865:
mov	esp, ebp
pop	ebp
retn
sub_4AB820 endp

align 10h


; Attributes: bp-based frame

sub_4AB870 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 64h
cmp	edx, [ebp+var_8]
jz	short loc_4AB8B2
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 64h
push	edx
call	sub_406610
add	esp, 0Ch

loc_4AB8B2:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
sub	ecx, 64h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4AB870 endp

align 10h


; Attributes: bp-based frame

sub_4AB8E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4AB944
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_4AB944
mov	ecx, [ebp+var_14]
imul	ecx, 64h
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AB944:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AB8E0 endp



; Attributes: bp-based frame

sub_4AB960 proc	near

var_28=	dword ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AB960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+4], 0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_407990
mov	[ebp+var_4], 0
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_407730
mov	edx, [ebp+var_28]
mov	[edx], eax
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[eax+4], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
lea	eax, [ecx+edx*2]
mov	ecx, [ebp+var_28]
mov	[ecx+8], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AB960 endp

align 10h


; Attributes: bp-based frame

sub_4ABA00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ABA00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_4ABA4A
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 1
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx		; void *
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407DE0

loc_4ABA4A:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 8
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ABA00 endp

align 10h


; Attributes: bp-based frame

sub_4ABA70 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ABA70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_48]
call	sub_5E11A0
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_48]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_48]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 7
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 0
jz	short loc_4ABB9C
mov	ecx, [ebp+var_48]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_4B60D0
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_40], eax

loc_4ABB59:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+8], 0
jz	short loc_4ABB6D
mov	edx, [ebp+var_40]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
jmp	short loc_4ABB59

loc_4ABB6D:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx

loc_4ABB7F:
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4ABB93
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_44], ecx
jmp	short loc_4ABB7F

loc_4ABB93:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_4ABB9C:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4ABA70 endp

align 10h


; Attributes: bp-based frame

sub_4ABBD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4ABC15
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4B6210
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4ABC15:
mov	esp, ebp
pop	ebp
retn
sub_4ABBD0 endp

align 10h


; Attributes: bp-based frame

sub_4ABC20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4ABC65
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4B6350
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4ABC65:
mov	esp, ebp
pop	ebp
retn
sub_4ABC20 endp

align 10h


; Attributes: bp-based frame

sub_4ABC70 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4ABCD4
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_4ABCD4
mov	ecx, [ebp+var_14]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4ABCD4:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ABC70 endp



; Attributes: bp-based frame

sub_4ABCF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AA4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_4ABD54
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_4ABD54
mov	ecx, [ebp+var_14]
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4ABD54:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ABCF0 endp



; Attributes: bp-based frame

sub_4ABD70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4ABD70 endp

align 10h


; Attributes: bp-based frame

sub_4ABD90 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4C6940
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_4ABDD9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_4AC540
mov	eax, 1
jmp	short loc_4ABDDB

loc_4ABDD9:
xor	eax, eax

loc_4ABDDB:
mov	esp, ebp
pop	ebp
retn	4
sub_4ABD90 endp

align 10h


; Attributes: bp-based frame

sub_4ABDF0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
call	nullsub_1
cmp	[ebp+var_4], 0
jz	short loc_4ABE3D
mov	ecx, 1
imul	ecx, 14h
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4ABE3D:
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
sub	ecx, 1
mov	edx, [ebp+var_C]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4ABDF0 endp

align 10h


; Attributes: bp-based frame

sub_4ABE60 proc	near

var_1C=	dword ptr -1Ch
var_17=	byte ptr -17h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
jmp	short loc_4ABE92

loc_4ABE80:
mov	ecx, [ebp+var_4]
add	ecx, 18h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
add	edx, 18h
mov	[ebp+var_C], edx

loc_4ABE92:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_4ABEC0
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_4ABEC0
mov	edx, [ebp+var_4]
push	edx
call	sub_404B20
add	esp, 4
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_456A70
add	esp, 8
jmp	short loc_4ABE80

loc_4ABEC0:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_4ABEDF
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4B7700
add	esp, 8
xor	edx, edx
mov	[ebp+var_15], dl
jmp	short loc_4ABF17

loc_4ABEDF:
jmp	short loc_4ABEF3

loc_4ABEE1:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
add	ecx, 18h
mov	[ebp+var_C], ecx

loc_4ABEF3:
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_8]
jz	short loc_4ABF12
xor	eax, eax
mov	[ebp+var_16], al
mov	ecx, [ebp+var_C]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_456A70
add	esp, 8
jmp	short loc_4ABEE1

loc_4ABF12:
xor	eax, eax
mov	[ebp+var_17], al

loc_4ABF17:
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4ABE60 endp

align 10h


; Attributes: bp-based frame

sub_4ABF30 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_4ABF6F

loc_4ABF66:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_4ABF6F:
cmp	[ebp+var_C], 0
jle	short loc_4ABF95
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4C6DE0
mov	ecx, [ebp+var_10]
add	ecx, 30h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 30h
mov	[ebp+var_14], edx
jmp	short loc_4ABF66

loc_4ABF95:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
push	0
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4C6A30
add	esp, 0Ch
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4ABF30 endp

align 10h


; Attributes: bp-based frame

sub_4ABFD0 proc	near

var_40=	dword ptr -40h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_40]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_40]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_471C40
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AC027
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AC027:
mov	ecx, [ebp+var_40]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_40]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4ABFD0 endp

align 10h


; Attributes: bp-based frame

sub_4AC040 proc	near

var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_A4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
jmp	short loc_4AC07B

loc_4AC069:
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
add	edx, 0Ch
mov	[ebp+var_C], edx

loc_4AC07B:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_4AC0A9
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_4AC0A9
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_4B7740
add	esp, 4
mov	eax, [ebp+var_C]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_4B7770
add	esp, 8
jmp	short loc_4AC069

loc_4AC0A9:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_4AC0CA
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4C6AC0
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_65], dl
jmp	short loc_4AC105

loc_4AC0CA:
jmp	short loc_4AC0DE

loc_4AC0CC:
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
mov	[ebp+var_C], ecx

loc_4AC0DE:
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_8]
jz	short loc_4AC0FD
xor	eax, eax
mov	[ebp+var_66], al
mov	ecx, [ebp+var_C]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_4B7770
add	esp, 8
jmp	short loc_4AC0CC

loc_4AC0FD:
xor	eax, eax
mov	[ebp+var_9D], al

loc_4AC105:
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4AC040 endp

align 10h


; Attributes: bp-based frame

sub_4AC120 proc	near

var_34=	dword ptr -34h
var_30=	word ptr -30h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AC120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_5F38A0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	byte ptr [ebp+var_30+1], al
mov	cl, byte ptr [ebp+var_30+1]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	byte ptr [ebp+var_30], dl
mov	al, byte ptr [ebp+var_30]
mov	[ebp+var_2E], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+8], eax
jmp	short loc_4AC1AD

loc_4AC17C:
cmp	[ebp+var_14], 0
jz	short loc_4AC197
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AC197:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AC1B4
retn

loc_4AC1AD:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AC1B4:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4AC120 endp

align 10h


; Attributes: bp-based frame

sub_4AC1D0 proc	near

var_40=	dword ptr -40h
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AC1D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
push	1
mov	ecx, [ebp+var_40]
call	sub_4AC5B0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 8
push	eax		; void *
call	sub_4C6B10
add	esp, 0Ch
jmp	short loc_4AC269

loc_4AC238:
cmp	[ebp+var_14], 0
jz	short loc_4AC253
mov	ecx, 1
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AC253:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AC270
retn

loc_4AC269:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AC270:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4AC1D0 endp

align 10h


; Attributes: bp-based frame

sub_4AC290 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7820
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_4AC2E7
mov	edx, 1
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AC2E7:
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AC290 endp

align 10h


; Attributes: bp-based frame

sub_4AC300 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+0Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
sub	edx, 1
mov	eax, edx
imul	eax, 20h
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	ecx, [ecx]
sub	ecx, [edx+4]
sar	ecx, 2
add	eax, ecx
mov	edx, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [edx+8]
sub	edx, [ecx]
sar	edx, 2
add	eax, edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AC300 endp

align 10h


; Attributes: bp-based frame

sub_4AC350 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+4]
jnz	short loc_4AC3AC
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 20h
shl	ecx, 2
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ecx], eax

loc_4AC3AC:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
sub	edx, 4
mov	eax, [ebp+var_C]
mov	[eax], edx
mov	esp, ebp
pop	ebp
retn
sub_4AC350 endp

align 10h


; Attributes: bp-based frame

sub_4AC3C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AC3C0 endp

align 10h


; Attributes: bp-based frame

sub_4AC410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4AC410 endp

align 10h


; Attributes: bp-based frame

sub_4AC440 proc	near

var_34=	dword ptr -34h
var_30=	word ptr -30h
var_2E=	word ptr -2Eh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AC440
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_644220
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	byte ptr [ebp+var_30+1], al
mov	cl, byte ptr [ebp+var_30+1]
mov	byte ptr [ebp+var_2E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_30], dl
mov	al, byte ptr [ebp+var_30]
mov	byte ptr [ebp+var_2E], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
fld	qword ptr [edx]
fstp	qword ptr [ecx+8]
jmp	short loc_4AC4CD

loc_4AC49C:
cmp	[ebp+var_14], 0
jz	short loc_4AC4B7
mov	eax, 1
shl	eax, 4
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4AC4B7:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AC4D4
retn

loc_4AC4CD:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AC4D4:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4AC440 endp

align 10h


; Attributes: bp-based frame

sub_4AC4F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4AC4F0 endp

align 10h


; Attributes: bp-based frame

sub_4AC540 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_4AC58D
mov	edx, 1
imul	edx, 14h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AC58D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_4AC540 endp

align 10h


; Attributes: bp-based frame

sub_4AC5B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 6666666h
jbe	short loc_4AC5D8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4AC5D8:
cmp	[ebp+arg_0], 0
jz	short loc_4AC5FE
mov	ecx, [ebp+arg_0]
imul	ecx, 28h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_4AC605

loc_4AC5FE:
mov	[ebp+var_18], 0

loc_4AC605:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4AC5B0 endp

align 10h


; Attributes: bp-based frame

sub_4AC610 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	[ebp+var_10], 80h
mov	[ebp+var_8], 20h
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
sub	edx, [ecx+4]
sar	edx, 2
add	edx, [ebp+arg_0]
mov	[ebp+var_4], edx
js	short loc_4AC65A
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jge	short loc_4AC65A
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_1C]
mov	[edx], ecx
jmp	loc_4AC6E0

loc_4AC65A:
cmp	[ebp+var_4], 0
jle	short loc_4AC66D
mov	eax, [ebp+var_4]
xor	edx, edx
div	[ebp+var_8]
mov	[ebp+var_20], eax
jmp	short loc_4AC682

loc_4AC66D:
mov	eax, [ebp+var_4]
neg	eax
sub	eax, 1
xor	edx, edx
div	[ebp+var_8]
neg	eax
sub	eax, 1
mov	[ebp+var_20], eax

loc_4AC682:
mov	eax, [ebp+var_20]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	eax, [ebp+var_C]
lea	ecx, [edx+eax*4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_14], 80h
mov	ecx, 20h
shl	ecx, 2
mov	edx, [ebp+var_1C]
add	ecx, [edx+4]
mov	eax, [ebp+var_1C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
imul	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
sub	edx, ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
lea	edx, [ecx+edx*4]
mov	eax, [ebp+var_1C]
mov	[eax], edx

loc_4AC6E0:
mov	esp, ebp
pop	ebp
retn	4
sub_4AC610 endp

align 10h


; Attributes: bp-based frame

sub_4AC6F0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1B10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
push	esi
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_4042A0
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+arg_8]
jnb	short loc_4AC72A
or	eax, 0FFFFFFFFh
jmp	loc_4AC7D3

loc_4AC72A:
mov	ecx, [ebp+var_10]
sub	ecx, [ebp+arg_8]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_28]
call	sub_5F52F0
mov	esi, eax
lea	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_1C]
push	eax
call	sub_407A30
add	esp, 8
add	esi, [eax]
add	esi, [ebp+arg_8]
mov	[ebp+var_18], esi
cmp	[ebp+arg_8], 0
jnz	short loc_4AC76C
mov	ecx, [ebp+var_28]
call	sub_5F52F0
mov	ecx, [ebp+var_18]
sub	ecx, eax
mov	eax, ecx
jmp	short loc_4AC7D3

loc_4AC76C:
mov	dl, [ebp+var_1D]
mov	[ebp+var_1E], dl
mov	[ebp+var_4], 0
movzx	eax, [ebp+var_1E]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_28]
call	sub_5F52F0
push	eax
call	sub_4B9A30
add	esp, 14h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+var_18]
jz	short loc_4AC7C9
mov	ecx, [ebp+var_28]
call	sub_5F52F0
mov	edx, [ebp+var_14]
sub	edx, eax
mov	[ebp+var_2C], edx
jmp	short loc_4AC7D0

loc_4AC7C9:
mov	[ebp+var_2C], 0FFFFFFFFh

loc_4AC7D0:
mov	eax, [ebp+var_2C]

loc_4AC7D3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4AC6F0 endp

align 10h


; Attributes: bp-based frame

sub_4AC7F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_4AC85A
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_4AC833
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4AC833
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax

loc_4AC833:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_4AC85A
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_4AC85A:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4AC7F0 endp

align 10h


; Attributes: bp-based frame

sub_4AC870 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_28], ecx
mov	[ebp+var_C], 0FFFFFFFFh
mov	[ebp+var_10], 0FFFFFFFFh
lea	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_10]
push	ecx
call	sub_407A30
add	esp, 8
mov	edx, [eax]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_18]
jbe	short loc_4AC8AF
mov	ecx, [ebp+var_28]
call	sub_4496F0

loc_4AC8AF:
mov	ecx, [ebp+var_28]
mov	edx, [ecx+10h]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax+14h]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_1C]
sub	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [eax]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax+14h]
xor	edx, edx
cmp	ecx, [ebp+var_28]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4AC900
mov	[ebp+var_2C], 10h
jmp	short loc_4AC90E

loc_4AC900:
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	eax, [ecx]
sub	eax, [edx+14h]
mov	[ebp+var_2C], eax

loc_4AC90E:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_2C]
jnb	short loc_4AC918
jmp	short loc_4AC924

loc_4AC918:
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_28]
call	sub_4B9AA0

loc_4AC924:
mov	esp, ebp
pop	ebp
retn	4
sub_4AC870 endp

align 10h


; Attributes: bp-based frame

sub_4AC930 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_57=	byte ptr -57h
var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_64], ecx
cmp	[ebp+arg_0], 0
jbe	loc_4ACA63
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_8], 0FFFFFFFFh
lea	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
call	sub_407A30
add	esp, 8
mov	edx, [eax]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+14h]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
sub	edx, ecx
cmp	[ebp+arg_0], edx
jbe	short loc_4AC993
mov	ecx, [ebp+var_64]
call	sub_4496F0

loc_4AC993:
mov	eax, [ebp+var_64]
mov	ecx, [eax+14h]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4AC9BD
mov	ecx, [ebp+var_64]
mov	edx, [ecx+10h]
sub	edx, [ebp+var_64]
mov	eax, 10h
sub	eax, edx
mov	[ebp+var_68], eax
jmp	short loc_4AC9CB

loc_4AC9BD:
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
sub	eax, [edx+10h]
mov	[ebp+var_68], eax

loc_4AC9CB:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_68]
jb	short loc_4AC9E8
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_64]
call	sub_44D3A0
push	eax
mov	ecx, [ebp+var_64]
call	sub_4B9AA0

loc_4AC9E8:
mov	eax, [ebp+var_64]
mov	ecx, [eax+10h]
add	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
lea	ecx, [eax+edx-1]
mov	[ebp+var_4C], ecx
push	0
lea	edx, [ebp+var_4D]
push	edx
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_54]
push	edx
call	sub_4C79E0
add	esp, 14h
mov	eax, [ebp+var_64]
mov	ecx, [eax+10h]
add	ecx, [ebp+arg_0]
mov	[ebp+var_5C], ecx
xor	edx, edx
mov	[ebp+var_57], dl
mov	al, [ebp+var_57]
mov	[ebp+var_55], al
xor	ecx, ecx
mov	[ebp+var_58], cl
mov	dl, [ebp+var_58]
mov	[ebp+var_56], dl
mov	eax, [ebp+var_5C]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_64]
mov	edx, [ecx+10h]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_60]
mov	cl, [ebp+arg_4]
mov	[eax], cl
mov	edx, [ebp+var_64]
mov	eax, [edx+10h]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_64]
mov	[ecx+10h], eax

loc_4ACA63:
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	8
sub_4AC930 endp

align 10h


; Attributes: bp-based frame

sub_4ACA70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_4ACB47
mov	ecx, [ebp+var_14]
call	sub_5021C0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4ACAD0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_4ACB47

loc_4ACAD0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4B9B40
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_4ACAF8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_4ACB0C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_4ACAF8

loc_4ACB0C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_4ACB1E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4ACB32
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_4ACB1E

loc_4ACB32:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_4ACB47:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4ACA70 endp



; Attributes: bp-based frame

sub_4ACB50 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_7C]
jz	loc_4ACCDE
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	short loc_4ACBDD
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_7C]
call	sub_4B9C80
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_7C]
call	sub_50F2B0
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
imul	ecx, 0Ch
mov	edx, [ebp+var_7C]
add	ecx, [edx]
mov	eax, [ebp+var_7C]
mov	[eax+8], ecx
jmp	loc_4ACCCD

loc_4ACBDD:
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_4ACC3D
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
xor	edx, edx
mov	[ebp+var_55], dl
jmp	loc_4ACCCD

loc_4ACC3D:
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
call	sub_406610
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_70], eax
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_74]
push	ecx
mov	edx, [ebp+var_70]
push	edx
call	sub_407C50
add	esp, 0Ch

loc_4ACCCD:
mov	eax, [ebp+var_4]
imul	eax, 0Ch
mov	ecx, [ebp+var_7C]
add	eax, [ecx]
mov	edx, [ebp+var_7C]
mov	[edx+4], eax

loc_4ACCDE:
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	4
sub_4ACB50 endp

align 10h


; Attributes: bp-based frame

sub_4ACCF0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+arg_0]
jnb	loc_4ACDD2
mov	[ebp+var_C], 15555555h
mov	[ebp+var_10], 15555555h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_4ACD36
mov	eax, [ebp+var_10]
mov	[ebp+var_80], eax
jmp	short loc_4ACD3C

loc_4ACD36:
mov	ecx, [ebp+var_C]
mov	[ebp+var_80], ecx

loc_4ACD3C:
mov	edx, [ebp+var_80]
cmp	edx, [ebp+arg_0]
jnb	short loc_4ACD4C
mov	ecx, [ebp+var_7C]
call	sub_5BD210

loc_4ACD4C:
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_7C]
cmp	dword ptr [edx], 0
jz	short loc_4ACD90
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+var_7C]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_7C]
call	sub_4B9C80
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_7C]
call	sub_50F2B0
jmp	short loc_4ACDA6

loc_4ACD90:
lea	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_7C]
add	ecx, 8
call	sub_479650
mov	[ebp+var_8], eax

loc_4ACDA6:
mov	ecx, [ebp+arg_0]
imul	ecx, 0Ch
add	ecx, [ebp+var_8]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
imul	ecx, 0Ch
add	ecx, [ebp+var_8]
mov	edx, [ebp+var_7C]
mov	[edx+4], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_78]
mov	[eax+8], ecx

loc_4ACDD2:
mov	esp, ebp
pop	ebp
retn	4
sub_4ACCF0 endp

align 10h


; Attributes: bp-based frame

sub_4ACDE0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A8]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_44], edx
jmp	short loc_4ACE56

loc_4ACE44:
mov	eax, [ebp+var_48]
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
add	ecx, 4
mov	[ebp+var_44], ecx

loc_4ACE56:
cmp	[ebp+var_48], 0
jbe	short loc_4ACE68
mov	edx, [ebp+var_44]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
fstp	dword ptr [edx]
jmp	short loc_4ACE44

loc_4ACE68:
mov	ecx, [ebp+var_44]
mov	[ebp+var_C], ecx
movzx	edx, [ebp+arg_10]
test	edx, edx
jnz	short loc_4ACE93
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4ACE93:
mov	ecx, [ebp+var_A8]
call	sub_444710
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_4ACDE0 endp

align 10h


; Attributes: bp-based frame

sub_4ACEE0 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_4AD11A
mov	ecx, [ebp+arg_0]
call	sub_4FFDB0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 18h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	short loc_4ACF7E
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_98]
call	sub_4B9D30
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_98]
call	sub_4B7D90
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
imul	ecx, 18h
mov	edx, [ebp+var_98]
add	ecx, [edx]
mov	eax, [ebp+var_98]
mov	[eax+8], ecx
jmp	loc_4AD103

loc_4ACF7E:
mov	ecx, [ebp+var_98]
call	sub_4FFDB0
cmp	eax, [ebp+var_4]
jb	loc_4AD022
xor	ecx, ecx
mov	[ebp+var_11], cl
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_60], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	[ebp+var_50], eax
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_50]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_4C], eax
jmp	short loc_4ACFDB

loc_4ACFD2:
mov	edx, [ebp+var_4C]
sub	edx, 1
mov	[ebp+var_4C], edx

loc_4ACFDB:
cmp	[ebp+var_4C], 0
jle	short loc_4AD001
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
call	sub_4022F0
mov	ecx, [ebp+var_50]
add	ecx, 18h
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_54]
add	edx, 18h
mov	[ebp+var_54], edx
jmp	short loc_4ACFD2

loc_4AD001:
mov	eax, [ebp+var_54]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_4B7700
add	esp, 8
jmp	loc_4AD103

loc_4AD022:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_98]
call	sub_4FFDB0
imul	eax, 18h
mov	ecx, [ebp+arg_0]
add	eax, [ecx]
mov	[ebp+var_80], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_80]
sub	eax, [ebp+var_74]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_70], eax
jmp	short loc_4AD07E

loc_4AD075:
mov	edx, [ebp+var_70]
sub	edx, 1
mov	[ebp+var_70], edx

loc_4AD07E:
cmp	[ebp+var_70], 0
jle	short loc_4AD0A4
mov	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4022F0
mov	ecx, [ebp+var_74]
add	ecx, 18h
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_78]
add	edx, 18h
mov	[ebp+var_78], edx
jmp	short loc_4AD075

loc_4AD0A4:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	ecx, [ebp+var_98]
call	sub_4FFDB0
imul	eax, 18h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_8C], eax
push	0
lea	eax, [ebp+var_85]
push	eax
mov	ecx, [ebp+var_94]
push	ecx
mov	edx, [ebp+var_90]
push	edx
mov	eax, [ebp+var_8C]
push	eax
call	sub_4C7B50
add	esp, 14h

loc_4AD103:
mov	ecx, [ebp+var_4]
imul	ecx, 18h
mov	edx, [ebp+var_98]
add	ecx, [edx]
mov	eax, [ebp+var_98]
mov	[eax+4], ecx

loc_4AD11A:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_4ACEE0 endp

align 10h


; Attributes: bp-based frame

sub_4AD130 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_4AD171
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_4AD155
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA90

loc_4AD155:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_4AD171
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_4AD171:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4AD130 endp

align 10h


; Attributes: bp-based frame

sub_4AD180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	loc_4AD216
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_4], 0
jmp	short loc_4AD1B4

loc_4AD1AC:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_4AD1B4:
cmp	[ebp+var_8], 1
jz	short loc_4AD1C5
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_4AD1AC

loc_4AD1C5:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
shl	eax, 1
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4B9DE0
add	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4B9F10
add	esp, 14h

loc_4AD216:
mov	esp, ebp
pop	ebp
retn
sub_4AD180 endp

align 10h


; Attributes: bp-based frame

sub_4AD220 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AD310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_D], al
call	sub_AD5DD0
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_19], al
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_2C]
mov	eax, [edx+8]
and	eax, 80000000h
jnz	short loc_4AD2AD
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	[ebp+var_28], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	[ebp+var_20], 10h
mov	edx, [ebp+var_28]
shl	edx, 4
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
mov	eax, [edx+10h]
call	eax

loc_4AD2AD:
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+8], 80000000h
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AD220 endp

align 10h


; Attributes: bp-based frame

sub_4AD2E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 10h
mov	esp, ebp
pop	ebp
retn	8
sub_4AD2E0 endp

align 10h


; Attributes: bp-based frame

sub_4AD310 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AD310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_D], al
call	sub_AD5DD0
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_19], al
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_2C]
mov	eax, [edx+8]
and	eax, 80000000h
jnz	short loc_4AD39D
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	[ebp+var_28], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	[ebp+var_20], 4
mov	edx, [ebp+var_28]
shl	edx, 2
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
mov	eax, [edx+10h]
call	eax

loc_4AD39D:
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+8], 80000000h
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AD310 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4AD3D0(char *DstBuf, char *Format, char)
sub_4AD3D0 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	104h		; SizeInBytes
mov	eax, [ebp+DstBuf]
push	eax		; DstBuf
call	_vsprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4AD3D0 endp

align 10h


; Attributes: bp-based frame

sub_4AD400 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	short loc_4AD429
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_76FFE0
add	esp, 10h

loc_4AD429:
pop	ebp
retn
sub_4AD400 endp

align 10h


; Attributes: bp-based frame

sub_4AD430 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4AD464:
cmp	[ebp+var_1C], 0
jz	short loc_4AD4E1
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4AD4CA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4AD4D6

loc_4AD4CA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4AD4D6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4AD464

loc_4AD4E1:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4AD589
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4AD57A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4C7F40
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4AD638
jmp	short loc_4AD589

loc_4AD57A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4AD589:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4AD61D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4C7F40
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4AD638

loc_4AD61D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4AD638:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AD430 endp

align 10h


; Attributes: bp-based frame

sub_4AD650 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_90=	dword ptr -90h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AD650
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0CCh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_DC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_51E030
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_DC]
add	ecx, 8
call	sub_4B7E90
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_DC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4CF8C0
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4AD70C
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_1C]
push	edx		; void *
call	sub_4CF980
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 30h
mov	[ebp+var_1C], eax
jmp	short loc_4AD738

loc_4AD70C:
mov	ecx, [ebp+arg_C]
imul	ecx, 30h
add	ecx, [ebp+var_1C]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_4C7E80
add	esp, 14h
mov	eax, [ebp+var_64]
mov	[ebp+var_1C], eax

loc_4AD738:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_4AD779
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_DC]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_66]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4CF8C0
add	esp, 14h
mov	[ebp+var_1C], eax

loc_4AD779:
jmp	short loc_4AD7C8

loc_4AD77B:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_4C6A30
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_90], ecx
cmp	[ebp+var_18], 0
jz	short loc_4AD7B2
mov	edx, [ebp+var_90]
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AD7B2:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AD7CF
retn

loc_4AD7C8:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AD7CF:
mov	ecx, [ebp+var_DC]
call	sub_4B7E10
mov	ecx, [ebp+var_14]
imul	ecx, 30h
add	ecx, [ebp+var_18]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_D8]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4AD650 endp

align 10h


; Attributes: bp-based frame

sub_4AD830 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4AD89B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 30h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_4AD877
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4BA000
jmp	short loc_4AD89B

loc_4AD877:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4AD650

loc_4AD89B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4AD830 endp

align 10h


; Attributes: bp-based frame

sub_4AD8B0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_4B7F10
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A8]
add	ecx, 8
call	sub_4B8070
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_44], edx
jmp	short loc_4AD926

loc_4AD914:
mov	eax, [ebp+var_48]
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
add	ecx, 14h
mov	[ebp+var_44], ecx

loc_4AD926:
cmp	[ebp+var_48], 0
jbe	short loc_4AD950
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_44]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [edx+10h]
mov	[eax+10h], edx
jmp	short loc_4AD914

loc_4AD950:
mov	eax, [ebp+var_44]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_4AD97B
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4AD97B:
mov	ecx, [ebp+var_A8]
call	sub_4B7FF0
mov	eax, [ebp+var_4]
imul	eax, 14h
add	eax, [ebp+var_8]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_4AD8B0 endp

align 10h


; Attributes: bp-based frame

sub_4AD9D0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4ADA36
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 14h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_4ADA17
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4BA320
jmp	short loc_4ADA36

loc_4ADA17:
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4AD8B0

loc_4ADA36:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4AD9D0 endp

align 10h


; Attributes: bp-based frame

sub_4ADA40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ADA40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_10], 0
mov	[ebp+var_4], 1
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_1C]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_20]
mov	[ecx+4], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+arg_4]
call	sub_407910
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ADA40 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4ADAC0(void	*)
sub_4ADAC0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_4ADAC9:
cmp	[ebp+arg_0], 0
jz	short loc_4ADB19
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_4ADAC0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4B72D0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4ADB11
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4ADB11:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4ADAC9

loc_4ADB19:
mov	esp, ebp
pop	ebp
retn	4
sub_4ADAC0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4ADB20(void	*)
sub_4ADB20 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx

loc_4ADB29:
cmp	[ebp+arg_0], 0
jz	short loc_4ADB79
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_14]
call	sub_4ADB20
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7330
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4ADB71
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4ADB71:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4ADB29

loc_4ADB79:
mov	esp, ebp
pop	ebp
retn	4
sub_4ADB20 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4ADB80(void	*)
sub_4ADB80 proc	near

var_14=	dword ptr -14h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx

loc_4ADB89:
cmp	[ebp+arg_0], 0
jz	short loc_4ADBDC
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_14]
call	sub_4ADB80
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_4C6E40
cmp	[ebp+arg_0], 0
jz	short loc_4ADBD4
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4ADBD4:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4ADB89

loc_4ADBDC:
mov	esp, ebp
pop	ebp
retn	4
sub_4ADB80 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4ADBF0(void	*)
sub_4ADBF0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_4ADBF9:
cmp	[ebp+arg_0], 0
jz	short loc_4ADC49
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_4ADBF0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4B73A0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4ADC41
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4ADC41:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4ADBF9

loc_4ADC49:
mov	esp, ebp
pop	ebp
retn	4
sub_4ADBF0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4ADC50(void	*)
sub_4ADC50 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_4ADC59:
cmp	[ebp+arg_0], 0
jz	short loc_4ADCA9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_4ADC50
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7420
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4ADCA1
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4ADCA1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4ADC59

loc_4ADCA9:
mov	esp, ebp
pop	ebp
retn	4
sub_4ADC50 endp

align 10h


; Attributes: bp-based frame

sub_4ADCB0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ADD60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
call	sub_10F4BF0
add	esp, 8
mov	[ebp+var_38], eax
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
mov	[ebp+var_4], 0
movzx	eax, [ebp+arg_8]
push	eax
push	0
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_10429F0
add	esp, 10h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_2C]
call	sub_407910
cmp	[ebp+var_14], 0FFFFFFFFh
jle	short loc_4ADD49
mov	eax, [ebp+var_10]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_403980
mov	eax, [ebp+var_10]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	al, 1
jmp	short loc_4ADD4B

loc_4ADD49:
xor	al, al

loc_4ADD4B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ADCB0 endp

align 10h


; Attributes: bp-based frame

sub_4ADD60 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ADD60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
call	sub_10F4BF0
add	esp, 8
mov	[ebp+var_38], eax
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
mov	[ebp+var_4], 0
movzx	eax, [ebp+arg_8]
push	eax
push	0
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_10429F0
add	esp, 10h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_2C]
call	sub_407910
cmp	[ebp+var_14], 0FFFFFFFFh
jle	short loc_4ADDF9
mov	eax, [ebp+var_10]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_4408D0
mov	eax, [ebp+var_10]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	al, 1
jmp	short loc_4ADDFB

loc_4ADDF9:
xor	al, al

loc_4ADDFB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ADD60 endp

align 10h


; Attributes: bp-based frame

sub_4ADE10 proc	near

var_12C= dword ptr -12Ch
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_104= dword ptr -104h
var_FE=	byte ptr -0FEh
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F4=	byte ptr -0F4h
var_F0=	dword ptr -0F0h
var_6C=	byte ptr -6Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AE130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 120h
mov	[ebp+var_104], 0
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_10F7620
add	esp, 8
push	1		; int
push	4		; int
mov	ecx, [ebp+arg_0]
call	sub_5F52F0
push	eax		; lpFileName
lea	ecx, [ebp+var_FC]
call	sub_4379F0
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
mov	eax, [ebp+edx+var_F0]
and	eax, 1
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4ADED4
mov	[ebp+var_FD], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_437BF0
lea	edx, [ebp+var_6C]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_114]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_114]
call	sub_77EEB0
mov	al, [ebp+var_FD]
jmp	loc_4ADF9E

loc_4ADED4:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+10h]
mov	[ebp+var_118], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14h]
mov	[ebp+var_11C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+14h]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_118]
sub	ecx, [ebp+var_11C]
xor	edx, edx
push	edx
push	ecx
mov	eax, [ebp+var_120]
push	eax
lea	ecx, [ebp+var_FC]
call	sub_43D3F0
lea	ecx, [ebp+var_F4]
call	sub_43C1C0
test	eax, eax
jnz	short loc_4ADF40
push	4
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
lea	ecx, [ebp+edx+var_FC]
call	sub_438B50

loc_4ADF40:
mov	eax, [ebp+var_FC]
mov	ecx, [eax+4]
lea	ecx, [ebp+ecx+var_FC]
call	sub_405D30
mov	[ebp+var_FE], al
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_437BF0
lea	edx, [ebp+var_6C]
mov	[ebp+var_12C], edx
mov	eax, [ebp+var_12C]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_12C]
call	sub_77EEB0
mov	al, [ebp+var_FE]

loc_4ADF9E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ADE10 endp

align 10h


; Attributes: bp-based frame

sub_4ADFB0 proc	near

var_120= dword ptr -120h
var_114= dword ptr -114h
var_104= dword ptr -104h
var_FE=	byte ptr -0FEh
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F4=	byte ptr -0F4h
var_F0=	dword ptr -0F0h
var_6C=	byte ptr -6Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ADFB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 114h
mov	[ebp+var_104], 0
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_10F0870
add	esp, 8
push	1		; int
push	4		; int
mov	eax, [ebp+arg_0]
call	sub_412770
push	eax		; lpFileName
lea	ecx, [ebp+var_FC]
call	sub_437AF0
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
mov	eax, [ebp+edx+var_F0]
and	eax, 1
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4AE074
mov	[ebp+var_FD], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_437BF0
lea	edx, [ebp+var_6C]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_114]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_114]
call	sub_77EEB0
mov	al, [ebp+var_FD]
jmp	loc_4AE118

loc_4AE074:
mov	ecx, [ebp+arg_4]
call	sub_4042A0
xor	ecx, ecx
push	ecx
push	eax
mov	ecx, [ebp+arg_4]
call	sub_5F52F0
push	eax
lea	ecx, [ebp+var_FC]
call	sub_43D3F0
lea	ecx, [ebp+var_F4]
call	sub_43C1C0
test	eax, eax
jnz	short loc_4AE0BA
push	4
mov	edx, [ebp+var_FC]
mov	eax, [edx+4]
lea	ecx, [ebp+eax+var_FC]
call	sub_438B50

loc_4AE0BA:
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
lea	ecx, [ebp+edx+var_FC]
call	sub_405D30
mov	[ebp+var_FE], al
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_437BF0
lea	eax, [ebp+var_6C]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_120]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_120]
call	sub_77EEB0
mov	al, [ebp+var_FE]

loc_4AE118:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4ADFB0 endp

align 10h


; Attributes: bp-based frame

sub_4AE130 proc	near

var_12C= dword ptr -12Ch
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_104= dword ptr -104h
var_FE=	byte ptr -0FEh
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F4=	byte ptr -0F4h
var_F0=	dword ptr -0F0h
var_6C=	byte ptr -6Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AE130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 120h
mov	[ebp+var_104], 0
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_10F0870
add	esp, 8
push	1		; int
push	4		; int
mov	eax, [ebp+arg_0]
call	sub_412770
push	eax		; lpFileName
lea	ecx, [ebp+var_FC]
call	sub_437AF0
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
mov	eax, [ebp+edx+var_F0]
and	eax, 1
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4AE1F4
mov	[ebp+var_FD], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_437BF0
lea	edx, [ebp+var_6C]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_114]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_114]
call	sub_77EEB0
mov	al, [ebp+var_FD]
jmp	loc_4AE2BE

loc_4AE1F4:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+10h]
mov	[ebp+var_118], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14h]
mov	[ebp+var_11C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+14h]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_118]
sub	ecx, [ebp+var_11C]
xor	edx, edx
push	edx
push	ecx
mov	eax, [ebp+var_120]
push	eax
lea	ecx, [ebp+var_FC]
call	sub_43D3F0
lea	ecx, [ebp+var_F4]
call	sub_43C1C0
test	eax, eax
jnz	short loc_4AE260
push	4
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
lea	ecx, [ebp+edx+var_FC]
call	sub_438B50

loc_4AE260:
mov	eax, [ebp+var_FC]
mov	ecx, [eax+4]
lea	ecx, [ebp+ecx+var_FC]
call	sub_405D30
mov	[ebp+var_FE], al
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_437BF0
lea	edx, [ebp+var_6C]
mov	[ebp+var_12C], edx
mov	eax, [ebp+var_12C]
mov	dword ptr [eax], offset	off_1446274
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_12C]
call	sub_77EEB0
mov	al, [ebp+var_FE]

loc_4AE2BE:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4AE130 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4AE2D0(double)
sub_4AE2D0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= qword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
sub	esp, 8
fld	[ebp+arg_0]
fstp	[esp+0Ch+var_C]
mov	eax, [ebp+var_4]
push	eax		; int
call	sub_4BCFC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn	8
sub_4AE2D0 endp

align 10h
; [00000021 BYTES: COLLAPSED FUNCTION std::locale::_Locimp::_Addfac(std::locale::facet *,uint).	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000021 BYTES: COLLAPSED FUNCTION std::locale::_Locimp::_Addfac(std::locale::facet *,uint).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4AE360 proc	near

var_40064= dword ptr -40064h
var_40060= dword ptr -40060h
var_4005C= dword ptr -4005Ch
var_40058= dword ptr -40058h
var_40050= dword ptr -40050h
var_4004C= dword ptr -4004Ch
var_40048= dword ptr -40048h
var_40044= dword ptr -40044h
var_40040= dword ptr -40040h
var_4003C= dword ptr -4003Ch
var_40038= dword ptr -40038h
var_40034= dword ptr -40034h
var_40030= dword ptr -40030h
var_40010= byte	ptr -40010h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, 40064h
call	__alloca_probe
cmp	[ebp+arg_0], 0
jnz	short loc_4AE37A
xor	al, al
jmp	loc_4AE566

loc_4AE37A:
mov	ecx, [ebp+arg_8]
call	sub_435B20
push	38h		; size_t
push	0		; int
lea	eax, [ebp+var_40048]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40048], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_40044], edx
mov	[ebp+var_40040], 0
lea	eax, [ebp+var_40010]
mov	[ebp+var_4003C], eax
mov	[ebp+var_40038], 40000h
mov	[ebp+var_40034], 0
mov	[ebp+var_40030], 0
mov	[ebp+var_4004C], 0Fh
mov	ecx, [ebp+var_4004C]
or	ecx, 10h
mov	[ebp+var_4004C], ecx
mov	[ebp+var_8], 0
push	38h
push	offset a1_2_2	; "1.2.2"
mov	edx, [ebp+var_4004C]
push	edx
lea	eax, [ebp+var_40048]
push	eax
call	sub_767B50
add	esp, 10h
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4AE428
xor	al, al
jmp	loc_4AE566

loc_4AE428:
mov	[ebp+var_40050], 0
mov	[ebp+var_1], 1

loc_4AE436:
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	loc_4AE529
mov	[ebp+var_40050], 0
push	2
lea	edx, [ebp+var_40048]
push	edx
call	sub_767D20
add	esp, 8
mov	[ebp+var_40050], eax
mov	eax, [ebp+var_40050]
mov	[ebp+var_40060], eax
cmp	[ebp+var_40060], 0
jz	short loc_4AE4D3
cmp	[ebp+var_40060], 1
jz	short loc_4AE486
jmp	loc_4AE520

loc_4AE486:
mov	ecx, [ebp+var_4003C]
lea	edx, [ebp+var_40010]
sub	ecx, edx
mov	[ebp+var_40058], ecx
mov	eax, [ebp+var_40058]
lea	ecx, [ebp+eax+var_40010]
push	ecx
lea	edx, [ebp+var_40010]
push	edx
mov	ecx, [ebp+arg_8]
call	sub_4038B0
lea	eax, [ebp+var_40010]
mov	[ebp+var_4003C], eax
mov	[ebp+var_40038], 40000h
mov	[ebp+var_1], 0
jmp	short loc_4AE524

loc_4AE4D3:
mov	ecx, [ebp+var_4003C]
lea	edx, [ebp+var_40010]
sub	ecx, edx
mov	[ebp+var_4005C], ecx
mov	eax, [ebp+var_4005C]
lea	ecx, [ebp+eax+var_40010]
push	ecx
lea	edx, [ebp+var_40010]
push	edx
mov	ecx, [ebp+arg_8]
call	sub_4038B0
lea	eax, [ebp+var_40010]
mov	[ebp+var_4003C], eax
mov	[ebp+var_40038], 40000h
mov	[ebp+var_1], 1
jmp	short loc_4AE524

loc_4AE520:
mov	[ebp+var_1], 0

loc_4AE524:
jmp	loc_4AE436

loc_4AE529:
lea	ecx, [ebp+var_40048]
push	ecx
call	sub_7690B0
add	esp, 4
mov	[ebp+var_C], eax
cmp	[ebp+var_40050], 1
jnz	short loc_4AE556
cmp	[ebp+var_C], 0
jnz	short loc_4AE556
mov	[ebp+var_40064], 1
jmp	short loc_4AE560

loc_4AE556:
mov	[ebp+var_40064], 0

loc_4AE560:
mov	al, byte ptr [ebp+var_40064]

loc_4AE566:
mov	esp, ebp
pop	ebp
retn
sub_4AE360 endp

align 10h


; Attributes: bp-based frame

sub_4AE570 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_4AE647
mov	ecx, [ebp+var_14]
call	sub_4696A0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4AE5D0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_4AE647

loc_4AE5D0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4BD4D0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_4AE5F8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_4AE60C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_4AE5F8

loc_4AE60C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_4AE61E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4AE632
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_4AE61E

loc_4AE632:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_4AE647:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4AE570 endp



; Attributes: bp-based frame

sub_4AE650 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_4AE727
mov	ecx, [ebp+var_14]
call	sub_4696F0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4AE6B0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_4AE727

loc_4AE6B0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4BDEC0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_4AE6D8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_4AE6EC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_4AE6D8

loc_4AE6EC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_4AE6FE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4AE712
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_4AE6FE

loc_4AE712:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_4AE727:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4AE650 endp



; Attributes: bp-based frame

sub_4AE730 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4AE764:
cmp	[ebp+var_1C], 0
jz	short loc_4AE7E1
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4AE7CA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4AE7D6

loc_4AE7CA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4AE7D6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4AE764

loc_4AE7E1:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4AE889
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4AE87A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4BDD20
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4AE938
jmp	short loc_4AE889

loc_4AE87A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4AE889:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4AE91D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4BDD20
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4AE938

loc_4AE91D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4AE938:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4AE730 endp

align 10h


; Attributes: bp-based frame

sub_4AE950 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_4AEA27
mov	ecx, [ebp+var_14]
call	sub_488FC0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4AE9B0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_4AEA27

loc_4AE9B0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4BE710
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_4AE9D8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_4AE9EC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_4AE9D8

loc_4AE9EC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_4AE9FE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4AEA12
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_4AE9FE

loc_4AEA12:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_4AEA27:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4AE950 endp



; Attributes: bp-based frame

sub_4AEA30 proc	near

var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_4AEA6F

loc_4AEA5E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_4AEA6F:
mov	ecx, [ebp+var_84]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_85], dl
movzx	eax, [ebp+var_85]
test	eax, eax
jz	short loc_4AEAB4
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_4AEAB4
jmp	short loc_4AEA5E

loc_4AEAB4:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_4AEAEE
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_84]
call	sub_490040
jmp	short loc_4AEB2D

loc_4AEAEE:
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_4]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_7C]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	ecx, [ebp+var_84]
call	sub_4B8DD0

loc_4AEB2D:
mov	esp, ebp
pop	ebp
retn	8
sub_4AEA30 endp

align 10h


; Attributes: bp-based frame

sub_4AEB40 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6B=	byte ptr -6Bh
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_62=	byte ptr -62h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AEB40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B0h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_42F940
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_C0]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_C0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4CFAC0
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4AEBFC
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_1C]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 4
mov	[ebp+var_1C], eax
jmp	short loc_4AEC28

loc_4AEBFC:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_1C]
lea	eax, [edx+ecx*4]
mov	[ebp+var_60], eax
push	0
lea	ecx, [ebp+var_61]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_4C9760
add	esp, 14h
mov	edx, [ebp+var_60]
mov	[ebp+var_1C], edx

loc_4AEC28:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_4AEC69
xor	ecx, ecx
mov	byte ptr [ebp+var_20+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_20], dl
mov	al, byte ptr [ebp+var_20]
mov	[ebp+var_69], al
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+4]
mov	[ebp+var_68], edx
push	0
lea	eax, [ebp+var_62]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_68]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CFAC0
add	esp, 14h
mov	[ebp+var_1C], eax

loc_4AEC69:
jmp	short loc_4AECC5

loc_4AEC6B:
xor	ecx, ecx
mov	[ebp+var_6A], cl
mov	edx, [ebp+var_18]
mov	[ebp+var_70], edx
jmp	short loc_4AEC81

loc_4AEC78:
mov	eax, [ebp+var_70]
add	eax, 4
mov	[ebp+var_70], eax

loc_4AEC81:
mov	ecx, [ebp+var_70]
cmp	ecx, [ebp+var_1C]
jz	short loc_4AEC90
xor	edx, edx
mov	[ebp+var_6B], dl
jmp	short loc_4AEC78

loc_4AEC90:
mov	eax, [ebp+var_14]
mov	[ebp+var_74], eax
cmp	[ebp+var_18], 0
jz	short loc_4AECAF
mov	ecx, [ebp+var_74]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_18]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AECAF:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AECCC
retn

loc_4AECC5:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AECCC:
mov	ecx, [ebp+var_C0]
call	sub_4B80F0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
lea	edx, [ecx+eax*4]
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_1C]
mov	[edx+4], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_BC]
mov	[ecx+8], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4AEB40 endp

align 10h


; Attributes: bp-based frame

sub_4AED20 proc	near

var_88=	dword ptr -88h
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4AED9D
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_88]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_4AED76
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_4BEA70
jmp	short loc_4AED9D

loc_4AED76:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_4B8E50

loc_4AED9D:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4AED20 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4AEDB0(void	*)
sub_4AEDB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_4AEDB9:
cmp	[ebp+arg_0], 0
jz	short loc_4AEE09
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_4AEDB0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4BF300
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4AEE01
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AEE01:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4AEDB9

loc_4AEE09:
mov	esp, ebp
pop	ebp
retn	4
sub_4AEDB0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4AEE10(void	*)
sub_4AEE10 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_4AEE19:
cmp	[ebp+arg_0], 0
jz	short loc_4AEE69
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_4AEE10
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4B74A0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4AEE61
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AEE61:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4AEE19

loc_4AEE69:
mov	esp, ebp
pop	ebp
retn	4
sub_4AEE10 endp

align 10h


; Attributes: bp-based frame

sub_4AEE70 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_4AEE81:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_4AEEB9
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_4AEEB7
mov	ecx, 1
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4AEEB7:
jmp	short loc_4AEE81

loc_4AEEB9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_4AEE70 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4AEED0(void	*)
sub_4AEED0 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx

loc_4AEED9:
cmp	[ebp+arg_0], 0
jz	short loc_4AEF29
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_24]
call	sub_4AEED0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7820
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4AEF21
mov	edx, 1
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AEF21:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4AEED9

loc_4AEF29:
mov	esp, ebp
pop	ebp
retn	4
sub_4AEED0 endp

align 10h


; Attributes: bp-based frame

sub_4AEF30 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AEF30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 54h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_64], ecx
mov	[ebp+var_28], 80h
mov	eax, [ebp+arg_0]
shr	eax, 5
add	eax, 1
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
add	ecx, 2
mov	[ebp+var_20], ecx
mov	[ebp+var_24], 8
lea	edx, [ebp+var_20]
push	edx
lea	eax, [ebp+var_24]
push	eax
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_64]
mov	edx, [eax]
mov	[ecx+24h], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5F3840
mov	edx, [ebp+var_64]
mov	[edx+20h], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_18]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_64]
call	sub_4C1090
jmp	short loc_4AF039

loc_4AEFE4:
mov	ecx, [ebp+var_64]
mov	edx, [ecx+24h]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+20h]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_4AF00F
mov	edx, [ebp+var_4C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4AF00F:
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_64]
mov	dword ptr [edx+24h], 0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AF040
retn

loc_4AF039:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AF040:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_50], 80h
mov	edx, 20h
shl	edx, 2
mov	eax, [ebp+var_64]
add	edx, [eax+4]
mov	ecx, [ebp+var_64]
mov	[ecx+8], edx
mov	edx, [ebp+var_1C]
sub	edx, 4
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	edx, [ebp+var_5C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 20h
shl	eax, 2
mov	ecx, [ebp+var_58]
add	eax, [ecx+4]
mov	edx, [ebp+var_58]
mov	[edx+8], eax
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [ecx+4]
mov	[eax], edx
mov	[ebp+var_60], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, [ebp+var_64]
mov	ecx, [eax+14h]
lea	edx, [ecx+edx*4]
mov	eax, [ebp+var_64]
mov	[eax+10h], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4AEF30 endp



; Attributes: bp-based frame

sub_4AF0F0 proc	near

var_458= dword ptr -458h
var_400= dword ptr -400h
var_3FC= dword ptr -3FCh
var_3F8= dword ptr -3F8h
var_3F4= dword ptr -3F4h
var_3F0= dword ptr -3F0h
var_3EC= dword ptr -3ECh
var_3E8= dword ptr -3E8h
var_3E4= dword ptr -3E4h
var_3E0= dword ptr -3E0h
var_3DC= dword ptr -3DCh
var_3D8= dword ptr -3D8h
var_3D4= dword ptr -3D4h
var_3D0= dword ptr -3D0h
var_3CC= dword ptr -3CCh
var_3C8= dword ptr -3C8h
var_3C4= dword ptr -3C4h
var_3C0= dword ptr -3C0h
var_3BC= dword ptr -3BCh
var_3B8= dword ptr -3B8h
var_3B4= dword ptr -3B4h
var_3B0= dword ptr -3B0h
var_3AC= dword ptr -3ACh
var_3A8= byte ptr -3A8h
var_398= dword ptr -398h
var_394= dword ptr -394h
var_390= dword ptr -390h
var_38C= dword ptr -38Ch
var_388= dword ptr -388h
var_384= dword ptr -384h
var_380= dword ptr -380h
var_370= dword ptr -370h
var_36C= dword ptr -36Ch
var_368= dword ptr -368h
var_364= dword ptr -364h
var_360= dword ptr -360h
var_35C= dword ptr -35Ch
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= dword ptr -314h
var_2F4= dword ptr -2F4h
var_2F0= dword ptr -2F0h
var_2EC= dword ptr -2ECh
var_2E8= dword ptr -2E8h
var_2E4= dword ptr -2E4h
var_2E0= dword ptr -2E0h
var_2DC= dword ptr -2DCh
var_2D8= dword ptr -2D8h
var_2D4= dword ptr -2D4h
var_2D0= dword ptr -2D0h
var_2CC= dword ptr -2CCh
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_288= dword ptr -288h
var_284= byte ptr -284h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= byte ptr -168h
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_140= byte ptr -140h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= byte ptr -124h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	byte ptr -0BCh
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AF0F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 448h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_458], ecx
mov	eax, [ebp+var_458]
mov	ecx, [eax]
mov	[ebp+var_90], ecx
mov	edx, [eax+4]
mov	[ebp+var_8C], edx
mov	ecx, [eax+8]
mov	[ebp+var_88], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_84], edx
lea	eax, [ebp+var_90]
push	eax
lea	ecx, [ebp+arg_4]
call	sub_4AC300
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_458]
mov	edx, [ecx]
mov	[ebp+var_180], edx
mov	eax, [ecx+4]
mov	[ebp+var_17C], eax
mov	edx, [ecx+8]
mov	[ebp+var_178], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_174], eax
lea	ecx, [ebp+var_180]
push	ecx
mov	ecx, [ebp+var_458]
add	ecx, 10h
call	sub_4AC300
mov	[ebp+var_14], eax
mov	edx, [ebp+arg_18]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_14]
shr	ecx, 1
cmp	[ebp+var_18], ecx
jg	loc_4AF746
mov	edx, [ebp+arg_14]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_458]
call	sub_4B8210
mov	ecx, [ebp+var_458]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ecx+4]
mov	[ebp+var_38], eax
mov	edx, [ecx+8]
mov	[ebp+var_34], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_458]
mov	edx, [ecx]
mov	[ebp+var_1A4], edx
mov	eax, [ecx+4]
mov	[ebp+var_1A0], eax
mov	edx, [ecx+8]
mov	[ebp+var_19C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_198], eax
mov	ecx, [ebp+var_18]
push	ecx
lea	ecx, [ebp+var_1A4]
call	sub_4AC610
mov	edx, [ebp+var_1A4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_1A0]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_19C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_198]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_A0]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_9C]
mov	[ebp+arg_8], ecx
mov	edx, [ebp+var_98]
mov	[ebp+arg_C], edx
mov	eax, [ebp+var_94]
mov	[ebp+arg_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
cmp	ecx, [ebp+arg_14]
jl	loc_4AF4E8
mov	edx, [ebp+var_458]
mov	eax, [edx]
mov	[ebp+var_1B4], eax
mov	ecx, [edx+4]
mov	[ebp+var_1B0], ecx
mov	eax, [edx+8]
mov	[ebp+var_1AC], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_1A8], ecx
mov	edx, [ebp+arg_14]
push	edx
lea	ecx, [ebp+var_1B4]
call	sub_4AC610
mov	eax, [ebp+var_1B4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_1B0]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_1AC]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_1A8]
mov	[ebp+var_40], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_A4], esp
mov	[ebp+var_1B8], ecx
mov	edx, [ebp+var_1B8]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_28]
mov	[edx+4], ecx
mov	eax, [ebp+var_24]
mov	[edx+8], eax
mov	ecx, [ebp+var_20]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_A8], esp
mov	[ebp+var_1BC], edx
mov	eax, [ebp+var_1BC]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	edx, [ebp+var_48]
mov	[eax+4], edx
mov	ecx, [ebp+var_44]
mov	[eax+8], ecx
mov	edx, [ebp+var_40]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_AC], esp
mov	[ebp+var_1C0], eax
mov	ecx, [ebp+var_458]
mov	edx, [ebp+var_1C0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_BC]
push	edx
call	sub_4CFC50
add	esp, 34h
mov	eax, [ebp+var_458]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+var_28]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
mov	[eax+8], ecx
mov	edx, [ebp+var_20]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_C0], esp
mov	[ebp+var_1E0], eax
mov	ecx, [ebp+var_1E0]
mov	edx, [ebp+var_3C]
mov	[ecx], edx
mov	eax, [ebp+var_38]
mov	[ecx+4], eax
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_C4], esp
mov	[ebp+var_1E4], ecx
mov	edx, [ebp+var_1E4]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_C8], esp
mov	[ebp+var_1E8], edx
mov	eax, [ebp+var_1E8]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	edx, [ebp+var_48]
mov	[eax+4], edx
mov	ecx, [ebp+var_44]
mov	[eax+8], ecx
mov	edx, [ebp+var_40]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_D8]
push	eax
call	sub_4C1610
add	esp, 34h
lea	ecx, [ebp+var_1C]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_DC], esp
mov	[ebp+var_20C], edx
mov	eax, [ebp+var_20C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_E0], esp
mov	[ebp+var_220], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_21C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_218], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_214], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_210], ecx
mov	edx, [ebp+arg_14]
neg	edx
push	edx
lea	ecx, [ebp+var_21C]
call	sub_4AC610
mov	eax, [ebp+var_220]
mov	ecx, [ebp+var_21C]
mov	[eax], ecx
mov	edx, [ebp+var_218]
mov	[eax+4], edx
mov	ecx, [ebp+var_214]
mov	[eax+8], ecx
mov	edx, [ebp+var_210]
mov	[eax+0Ch], edx
call	sub_4C16A0
add	esp, 24h
mov	eax, [ebp+arg_14]
neg	eax
push	eax
lea	ecx, [ebp+arg_4]
call	sub_4AC610
jmp	loc_4AF709

loc_4AF4E8:
lea	ecx, [ebp+var_1C]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_E4], esp
mov	[ebp+var_238], edx
mov	eax, [ebp+var_458]
mov	ecx, [ebp+var_238]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_E8], esp
mov	[ebp+var_23C], ecx
mov	edx, [ebp+var_23C]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_28]
mov	[edx+4], ecx
mov	eax, [ebp+var_24]
mov	[edx+8], eax
mov	ecx, [ebp+var_20]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_EC], esp
mov	[ebp+var_240], edx
mov	eax, [ebp+var_240]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_F0], esp
mov	[ebp+var_244], eax
mov	ecx, [ebp+var_458]
mov	edx, [ebp+var_244]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
call	sub_4C1760
add	esp, 44h
mov	edx, [ebp+var_458]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_28]
mov	[edx+4], ecx
mov	eax, [ebp+var_24]
mov	[edx+8], eax
mov	ecx, [ebp+var_20]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_2A4]
mov	[ebp+var_248], edx
mov	eax, [ebp+var_248]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_2B4]
mov	[ebp+var_24C], eax
mov	ecx, [ebp+var_24C]
mov	edx, [ebp+var_3C]
mov	[ecx], edx
mov	eax, [ebp+var_38]
mov	[ecx+4], eax
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_284]
mov	[ebp+var_25C], ecx
mov	edx, [ebp+var_25C]
mov	eax, [ebp+var_2A4]
mov	[edx], eax
mov	ecx, [ebp+var_2A0]
mov	[edx+4], ecx
mov	eax, [ebp+var_29C]
mov	[edx+8], eax
mov	ecx, [ebp+var_298]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_294]
mov	[ebp+var_260], edx
mov	eax, [ebp+var_260]
mov	ecx, [ebp+var_2B4]
mov	[eax], ecx
mov	edx, [ebp+var_2B0]
mov	[eax+4], edx
mov	ecx, [ebp+var_2AC]
mov	[eax+8], ecx
mov	edx, [ebp+var_2A8]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_294]
mov	[ebp+var_274], eax
mov	ecx, [ebp+var_290]
mov	[ebp+var_270], ecx
mov	edx, [ebp+var_28C]
mov	[ebp+var_26C], edx
mov	eax, [ebp+var_288]
mov	[ebp+var_268], eax
lea	ecx, [ebp+var_274]
push	ecx
lea	ecx, [ebp+var_284]
call	sub_4AC300
mov	[ebp+var_264], eax
jmp	short loc_4AF6F3

loc_4AF6D9:
lea	ecx, [ebp+var_294]
call	sub_4AB2D0
mov	edx, [ebp+var_264]
sub	edx, 1
mov	[ebp+var_264], edx

loc_4AF6F3:
cmp	[ebp+var_264], 0
jle	short loc_4AF709
mov	eax, [ebp+var_294]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
jmp	short loc_4AF6D9

loc_4AF709:
jmp	short loc_4AF73A

loc_4AF70B:
mov	edx, [ebp+var_458]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_458]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AF741
retn

loc_4AF73A:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AF741:
jmp	loc_4AFD43

loc_4AF746:
mov	edx, [ebp+arg_14]
push	edx
lea	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_458]
call	sub_4B8290
mov	ecx, [ebp+var_458]
add	ecx, 10h
mov	edx, [ecx]
mov	[ebp+var_70], edx
mov	eax, [ecx+4]
mov	[ebp+var_6C], eax
mov	edx, [ecx+8]
mov	[ebp+var_68], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+var_18]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_458]
add	edx, 10h
mov	eax, [edx]
mov	[ebp+var_2D8], eax
mov	ecx, [edx+4]
mov	[ebp+var_2D4], ecx
mov	eax, [edx+8]
mov	[ebp+var_2D0], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_2CC], ecx
mov	edx, [ebp+var_50]
neg	edx
push	edx
lea	ecx, [ebp+var_2D8]
call	sub_4AC610
mov	eax, [ebp+var_2D8]
mov	[ebp+var_108], eax
mov	ecx, [ebp+var_2D4]
mov	[ebp+var_104], ecx
mov	edx, [ebp+var_2D0]
mov	[ebp+var_100], edx
mov	eax, [ebp+var_2CC]
mov	[ebp+var_FC], eax
mov	ecx, [ebp+var_108]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_104]
mov	[ebp+arg_8], edx
mov	eax, [ebp+var_100]
mov	[ebp+arg_C], eax
mov	ecx, [ebp+var_FC]
mov	[ebp+arg_10], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+var_50]
cmp	edx, [ebp+arg_14]
jle	loc_4AFB63
mov	eax, [ebp+var_458]
add	eax, 10h
mov	ecx, [eax]
mov	[ebp+var_2E8], ecx
mov	edx, [eax+4]
mov	[ebp+var_2E4], edx
mov	ecx, [eax+8]
mov	[ebp+var_2E0], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_2DC], edx
mov	eax, [ebp+arg_14]
neg	eax
push	eax
lea	ecx, [ebp+var_2E8]
call	sub_4AC610
mov	ecx, [ebp+var_2E8]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_2E4]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_2E0]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_2DC]
mov	[ebp+var_74], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_10C], esp
mov	[ebp+var_2EC], edx
mov	eax, [ebp+var_458]
add	eax, 10h
mov	ecx, [ebp+var_2EC]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_110], esp
mov	[ebp+var_2F0], ecx
mov	edx, [ebp+var_458]
add	edx, 10h
mov	eax, [ebp+var_2F0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_114], esp
mov	[ebp+var_2F4], eax
mov	ecx, [ebp+var_2F4]
mov	edx, [ebp+var_80]
mov	[ecx], edx
mov	eax, [ebp+var_7C]
mov	[ecx+4], eax
mov	edx, [ebp+var_78]
mov	[ecx+8], edx
mov	eax, [ebp+var_74]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_124]
push	ecx
call	sub_4CFC50
add	esp, 34h
mov	edx, [ebp+var_458]
add	edx, 10h
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_5C]
mov	[edx+4], ecx
mov	eax, [ebp+var_58]
mov	[edx+8], eax
mov	ecx, [ebp+var_54]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_128], esp
mov	[ebp+var_314], edx
mov	eax, [ebp+var_314]
mov	ecx, [ebp+var_70]
mov	[eax], ecx
mov	edx, [ebp+var_6C]
mov	[eax+4], edx
mov	ecx, [ebp+var_68]
mov	[eax+8], ecx
mov	edx, [ebp+var_64]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_12C], esp
mov	[ebp+var_318], eax
mov	ecx, [ebp+var_318]
mov	edx, [ebp+var_80]
mov	[ecx], edx
mov	eax, [ebp+var_7C]
mov	[ecx+4], eax
mov	edx, [ebp+var_78]
mov	[ecx+8], edx
mov	eax, [ebp+var_74]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_130], esp
mov	[ebp+var_31C], ecx
mov	edx, [ebp+var_31C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_140]
push	edx
call	sub_4C19D0
add	esp, 34h
lea	eax, [ebp+var_3C8]
mov	[ebp+var_36C], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_368], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_364], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_360], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_35C], ecx
mov	edx, [ebp+arg_14]
push	edx
lea	ecx, [ebp+var_368]
call	sub_4AC610
mov	eax, [ebp+var_36C]
mov	ecx, [ebp+var_368]
mov	[eax], ecx
mov	edx, [ebp+var_364]
mov	[eax+4], edx
mov	ecx, [ebp+var_360]
mov	[eax+8], ecx
mov	edx, [ebp+var_35C]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_3D8]
mov	[ebp+var_370], eax
mov	ecx, [ebp+var_370]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_3A8]
mov	[ebp+var_380], ecx
mov	edx, [ebp+var_380]
mov	eax, [ebp+var_3C8]
mov	[edx], eax
mov	ecx, [ebp+var_3C4]
mov	[edx+4], ecx
mov	eax, [ebp+var_3C0]
mov	[edx+8], eax
mov	ecx, [ebp+var_3BC]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_3B8]
mov	[ebp+var_384], edx
mov	eax, [ebp+var_384]
mov	ecx, [ebp+var_3D8]
mov	[eax], ecx
mov	edx, [ebp+var_3D4]
mov	[eax+4], edx
mov	ecx, [ebp+var_3D0]
mov	[eax+8], ecx
mov	edx, [ebp+var_3CC]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_3B8]
mov	[ebp+var_398], eax
mov	ecx, [ebp+var_3B4]
mov	[ebp+var_394], ecx
mov	edx, [ebp+var_3B0]
mov	[ebp+var_390], edx
mov	eax, [ebp+var_3AC]
mov	[ebp+var_38C], eax
lea	ecx, [ebp+var_398]
push	ecx
lea	ecx, [ebp+var_3A8]
call	sub_4AC300
mov	[ebp+var_388], eax
jmp	short loc_4AFB48

loc_4AFB2E:
lea	ecx, [ebp+var_3B8]
call	sub_4AB2D0
mov	edx, [ebp+var_388]
sub	edx, 1
mov	[ebp+var_388], edx

loc_4AFB48:
cmp	[ebp+var_388], 0
jle	short loc_4AFB5E
mov	eax, [ebp+var_3B8]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
jmp	short loc_4AFB2E

loc_4AFB5E:
jmp	loc_4AFD05

loc_4AFB63:
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_14C], esp
mov	[ebp+var_3DC], edx
mov	eax, [ebp+var_458]
add	eax, 10h
mov	ecx, [ebp+var_3DC]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_150], esp
mov	[ebp+var_3E0], ecx
mov	edx, [ebp+var_3E0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_1C]
push	edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_154], esp
mov	[ebp+var_3F4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_3F0], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_3EC], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_3E8], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_3E4], ecx
mov	edx, [ebp+arg_14]
push	edx
lea	ecx, [ebp+var_3F0]
call	sub_4AC610
mov	eax, [ebp+var_3F4]
mov	ecx, [ebp+var_3F0]
mov	[eax], ecx
mov	edx, [ebp+var_3EC]
mov	[eax+4], edx
mov	ecx, [ebp+var_3E8]
mov	[eax+8], ecx
mov	edx, [ebp+var_3E4]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_158], esp
mov	[ebp+var_3F8], eax
mov	ecx, [ebp+var_458]
add	ecx, 10h
mov	edx, [ebp+var_3F8]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_168]
push	edx
call	sub_4C1A60
add	esp, 48h
mov	eax, [ebp+var_458]
add	eax, 10h
mov	ecx, [ebp+var_60]
mov	[eax], ecx
mov	edx, [ebp+var_5C]
mov	[eax+4], edx
mov	ecx, [ebp+var_58]
mov	[eax+8], ecx
mov	edx, [ebp+var_54]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_1C]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_16C], esp
mov	[ebp+var_3FC], ecx
mov	edx, [ebp+var_3FC]
mov	eax, [ebp+var_70]
mov	[edx], eax
mov	ecx, [ebp+var_6C]
mov	[edx+4], ecx
mov	eax, [ebp+var_68]
mov	[edx+8], eax
mov	ecx, [ebp+var_64]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_170], esp
mov	[ebp+var_400], edx
mov	eax, [ebp+var_400]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
call	sub_4C16A0
add	esp, 24h

loc_4AFD05:
jmp	short loc_4AFD3C

loc_4AFD07:
mov	eax, [ebp+var_54]
add	eax, 4
push	eax
mov	ecx, [ebp+var_458]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	ecx, [ebp+var_458]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AFD43
retn

loc_4AFD3C:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AFD43:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	20h
sub_4AF0F0 endp

align 10h


; Attributes: bp-based frame

sub_4AFD80 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_58=	byte ptr -58h
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4AFD80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B0h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C0], ecx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_0]
cmp	ecx, [eax]
jnz	loc_4AFE8B
mov	edx, [ebp+arg_10]
push	edx
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_4B8210
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_14]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_34], esp
mov	[ebp+var_70], edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_70]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_38], esp
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
call	sub_4C1CD0
add	esp, 24h
jmp	short loc_4AFE62

loc_4AFE33:
mov	edx, [ebp+var_C0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AFE69
retn

loc_4AFE62:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AFE69:
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
jmp	loc_4AFFCC

loc_4AFE8B:
mov	edx, [ebp+var_C0]
mov	eax, [ebp+arg_0]
cmp	eax, [edx+10h]
jnz	loc_4AFF81
mov	ecx, [ebp+arg_10]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_4B8290
mov	[ebp+var_4], 2
mov	eax, [ebp+arg_14]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_3C], esp
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A0]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_40], esp
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_C0]
add	eax, 10h
mov	ecx, [ebp+var_A4]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
call	sub_4C1CD0
add	esp, 24h
jmp	short loc_4AFF58

loc_4AFF23:
mov	ecx, [ebp+var_24]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_C0]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_C0]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4AFF5F
retn

loc_4AFF58:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4AFF5F:
mov	ecx, [ebp+var_C0]
add	ecx, 10h
mov	edx, [ebp+var_30]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
mov	[ecx+4], eax
mov	edx, [ebp+var_28]
mov	[ecx+8], edx
mov	eax, [ebp+var_24]
mov	[ecx+0Ch], eax
jmp	short loc_4AFFCC

loc_4AFF81:
xor	ecx, ecx
mov	[ebp+var_41], cl
lea	edx, [ebp+var_41]
push	edx
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_48], esp
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_58]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_4AF0F0

loc_4AFFCC:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h
sub_4AFD80 endp

align 10h


; Attributes: bp-based frame

sub_4AFFE0 proc	near

var_284= dword ptr -284h
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_208= byte ptr -208h
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1E5= byte ptr -1E5h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= byte ptr -134h
var_124= byte ptr -124h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_101= byte ptr -101h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_94=	dword ptr -94h
var_88=	byte ptr -88h
var_64=	byte ptr -64h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 284h
mov	[ebp+var_284], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_38]
push	ecx
lea	ecx, [ebp+arg_14]
call	sub_4AC300
mov	[ebp+var_8], eax
mov	edx, [ebp+var_284]
mov	eax, [edx]
mov	[ebp+var_48], eax
mov	ecx, [edx+4]
mov	[ebp+var_44], ecx
mov	eax, [edx+8]
mov	[ebp+var_40], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_3C], ecx
mov	[ebp+var_94], 80h
mov	edx, [ebp+var_40]
sub	edx, [ebp+var_48]
sar	edx, 2
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_8]
sar	eax, 2
mov	ecx, [ebp+arg_10]
sub	ecx, [ebp+var_3C]
sar	ecx, 2
sub	ecx, 1
imul	ecx, 20h
add	ecx, eax
add	ecx, edx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_284]
call	sub_4A8270
sub	eax, [ebp+var_8]
cdq
sub	eax, edx
sar	eax, 1
cmp	[ebp+var_4], eax
jg	loc_4B02CE
sub	esp, 10h
mov	[ebp+var_B0], esp
mov	edx, [ebp+var_B0]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_B4], esp
mov	edx, [ebp+var_B4]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_B8], esp
mov	edx, [ebp+var_284]
mov	eax, [ebp+var_B8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_64]
push	eax
call	sub_4C19D0
add	esp, 34h
mov	ecx, [ebp+var_284]
mov	edx, [ecx]
mov	[ebp+var_E8], edx
mov	eax, [ecx+4]
mov	[ebp+var_E4], eax
mov	edx, [ecx+8]
mov	[ebp+var_E0], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_DC], eax
mov	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_E8]
call	sub_4AC610
mov	edx, [ebp+var_E8]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_E4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_E0]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_DC]
mov	[ebp+var_C], edx
lea	eax, [ebp+var_164]
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_EC]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_174]
mov	[ebp+var_F0], ecx
mov	edx, [ebp+var_284]
mov	eax, [ebp+var_F0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_144]
mov	[ebp+var_FC], eax
mov	ecx, [ebp+var_FC]
mov	edx, [ebp+var_164]
mov	[ecx], edx
mov	eax, [ebp+var_160]
mov	[ecx+4], eax
mov	edx, [ebp+var_15C]
mov	[ecx+8], edx
mov	eax, [ebp+var_158]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_154]
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_100]
mov	eax, [ebp+var_174]
mov	[edx], eax
mov	ecx, [ebp+var_170]
mov	[edx+4], ecx
mov	eax, [ebp+var_16C]
mov	[edx+8], eax
mov	ecx, [ebp+var_168]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_101], dl
lea	eax, [ebp+var_124]
mov	[ebp+var_110], eax
mov	ecx, [ebp+var_110]
mov	edx, [ebp+var_144]
mov	[ecx], edx
mov	eax, [ebp+var_140]
mov	[ecx+4], eax
mov	edx, [ebp+var_13C]
mov	[ecx+8], edx
mov	eax, [ebp+var_138]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_134]
mov	[ebp+var_114], ecx
mov	edx, [ebp+var_114]
mov	eax, [ebp+var_154]
mov	[edx], eax
mov	ecx, [ebp+var_150]
mov	[edx+4], ecx
mov	eax, [ebp+var_14C]
mov	[edx+8], eax
mov	ecx, [ebp+var_148]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_284]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_284]
call	sub_4C3FE0
mov	edx, [ebp+var_284]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	[edx+4], ecx
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_C]
mov	[edx+0Ch], ecx
jmp	loc_4B052D

loc_4B02CE:
sub	esp, 10h
mov	[ebp+var_178], esp
mov	edx, [ebp+var_178]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_17C], esp
mov	edx, [ebp+var_284]
add	edx, 10h
mov	eax, [ebp+var_17C]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_180], esp
mov	eax, [ebp+var_180]
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
mov	edx, [ebp+arg_18]
mov	[eax+4], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_20]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_88]
push	eax
call	sub_4C1610
add	esp, 34h
mov	ecx, [ebp+var_284]
add	ecx, 10h
mov	edx, [ecx]
mov	[ebp+var_1CC], edx
mov	eax, [ecx+4]
mov	[ebp+var_1C8], eax
mov	edx, [ecx+8]
mov	[ebp+var_1C4], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_1C0], eax
mov	ecx, [ebp+var_8]
neg	ecx
push	ecx
lea	ecx, [ebp+var_1CC]
call	sub_4AC610
mov	edx, [ebp+var_1CC]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_1C8]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_1C4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_1C0]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_248]
mov	[ebp+var_1D0], eax
mov	ecx, [ebp+var_284]
add	ecx, 10h
mov	edx, [ebp+var_1D0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_258]
mov	[ebp+var_1D4], edx
mov	eax, [ebp+var_1D4]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_20]
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_228]
mov	[ebp+var_1E0], eax
mov	ecx, [ebp+var_1E0]
mov	edx, [ebp+var_248]
mov	[ecx], edx
mov	eax, [ebp+var_244]
mov	[ecx+4], eax
mov	edx, [ebp+var_240]
mov	[ecx+8], edx
mov	eax, [ebp+var_23C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_238]
mov	[ebp+var_1E4], ecx
mov	edx, [ebp+var_1E4]
mov	eax, [ebp+var_258]
mov	[edx], eax
mov	ecx, [ebp+var_254]
mov	[edx+4], ecx
mov	eax, [ebp+var_250]
mov	[edx+8], eax
mov	ecx, [ebp+var_24C]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_1E5], dl
lea	eax, [ebp+var_208]
mov	[ebp+var_1F4], eax
mov	ecx, [ebp+var_1F4]
mov	edx, [ebp+var_228]
mov	[ecx], edx
mov	eax, [ebp+var_224]
mov	[ecx+4], eax
mov	edx, [ebp+var_220]
mov	[ecx+8], edx
mov	eax, [ebp+var_21C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_218]
mov	[ebp+var_1F8], ecx
mov	edx, [ebp+var_1F8]
mov	eax, [ebp+var_238]
mov	[edx], eax
mov	ecx, [ebp+var_234]
mov	[edx+4], ecx
mov	eax, [ebp+var_230]
mov	[edx+8], eax
mov	ecx, [ebp+var_22C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_284]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_284]
call	sub_4C3FE0
mov	edx, [ebp+var_284]
add	edx, 10h
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx

loc_4B052D:
mov	edx, [ebp+var_284]
mov	eax, [edx]
mov	[ebp+var_268], eax
mov	ecx, [edx+4]
mov	[ebp+var_264], ecx
mov	eax, [edx+8]
mov	[ebp+var_260], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_25C], ecx
mov	edx, [ebp+var_4]
push	edx
lea	ecx, [ebp+var_268]
call	sub_4AC610
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_268]
mov	[eax], ecx
mov	edx, [ebp+var_264]
mov	[eax+4], edx
mov	ecx, [ebp+var_260]
mov	[eax+8], ecx
mov	edx, [ebp+var_25C]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	28h
sub_4AFFE0 endp

align 10h


; Attributes: bp-based frame

sub_4B05A0 proc	near

var_138= dword ptr -138h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AD=	byte ptr -0ADh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_68=	dword ptr -68h
var_5C=	byte ptr -5Ch
var_40=	byte ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 138h
mov	[ebp+var_138], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_10]
call	sub_4AB2D0
mov	ecx, [ebp+var_138]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ecx+4]
mov	[ebp+var_20], eax
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_18], eax
mov	[ebp+var_68], 80h
mov	ecx, [ebp+var_1C]
sub	ecx, [ebp+var_24]
sar	ecx, 2
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_8]
sar	edx, 2
mov	eax, [ebp+arg_10]
sub	eax, [ebp+var_18]
sar	eax, 2
sub	eax, 1
imul	eax, 20h
add	eax, edx
add	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_138]
call	sub_4A8270
shr	eax, 1
cmp	[ebp+var_14], eax
jnb	loc_4B06DA
sub	esp, 10h
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_88]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_8C], esp
mov	ecx, [ebp+var_138]
mov	edx, [ebp+var_8C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_4C19D0
add	esp, 34h
mov	eax, [ebp+var_138]
mov	ecx, [eax]
mov	[ebp+var_B4], ecx
xor	edx, edx
mov	[ebp+var_AD], dl
mov	ecx, [ebp+var_138]
call	sub_4B1520
jmp	loc_4B076B

loc_4B06DA:
sub	esp, 10h
mov	[ebp+var_B8], esp
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_BC], esp
mov	eax, [ebp+var_138]
add	eax, 10h
mov	ecx, [ebp+var_BC]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_C0], esp
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_5C]
push	ecx
call	sub_4C1610
add	esp, 34h
mov	ecx, [ebp+var_138]
call	sub_4B81C0

loc_4B076B:
mov	edx, [ebp+var_138]
mov	eax, [edx]
mov	[ebp+var_11C], eax
mov	ecx, [edx+4]
mov	[ebp+var_118], ecx
mov	eax, [edx+8]
mov	[ebp+var_114], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_110], ecx
mov	edx, [ebp+var_14]
push	edx
lea	ecx, [ebp+var_11C]
call	sub_4AC610
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_11C]
mov	[eax], ecx
mov	edx, [ebp+var_118]
mov	[eax+4], edx
mov	ecx, [ebp+var_114]
mov	[eax+8], ecx
mov	edx, [ebp+var_110]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	18h
sub_4B05A0 endp

align 10h


; Attributes: bp-based frame

sub_4B07E0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_4B0800

loc_4B07F7:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_4B0800:
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_4]
cmp	ecx, [eax+1Ch]
jnb	short loc_4B085B
mov	[ebp+var_8], 80h
mov	edx, 20h
shl	edx, 2
mov	eax, [ebp+var_4]
add	edx, [eax]
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_10], edx
xor	eax, eax
mov	[ebp+var_9], al
mov	[ebp+var_18], 80h
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
cmp	[ebp+var_1C], 0
jz	short loc_4B0859
mov	eax, 20h
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_1C]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4B0859:
jmp	short loc_4B07F7

loc_4B085B:
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_4C]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+1Ch]
jz	short loc_4B08C3
mov	edx, [ebp+var_4C]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_24], edx
xor	eax, eax
mov	[ebp+var_1D], al
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+10h]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax+14h]
mov	[ebp+var_30], ecx
xor	edx, edx
mov	[ebp+var_29], dl
mov	[ebp+var_38], 80h
mov	eax, [ebp+var_4C]
mov	ecx, [eax+14h]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_3C], 0
jz	short loc_4B08C1
mov	edx, 20h
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_3C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B08C1:
jmp	short loc_4B08D9

loc_4B08C3:
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+10h]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
xor	edx, edx
mov	[ebp+var_3D], dl

loc_4B08D9:
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_4C]
add	ecx, 10h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	esp, ebp
pop	ebp
retn
sub_4B07E0 endp

align 10h


; Attributes: bp-based frame

sub_4B0900 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B0900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_4C]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_4C]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_4B0954
push	0
push	1
mov	ecx, [ebp+var_4C]
call	sub_4C1430

loc_4B0954:
mov	[ebp+var_14], 80h
push	20h
mov	ecx, [ebp+var_4C]
add	ecx, 24h
call	sub_5F3840
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_4C]
mov	ecx, [eax+10h]
mov	[ebp+var_34], ecx
xor	edx, edx
mov	[ebp+var_2F], dl
mov	al, [ebp+var_2F]
mov	[ebp+var_2D], al
xor	ecx, ecx
mov	[ebp+var_30], cl
mov	dl, [ebp+var_30]
mov	[ebp+var_2E], dl
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax+1Ch]
add	ecx, 4
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_4C]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_40]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_38], 80h
mov	edx, 20h
shl	edx, 2
mov	eax, [ebp+var_3C]
add	edx, [eax+4]
mov	ecx, [ebp+var_3C]
mov	[ecx+8], edx
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_4C]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
jmp	short loc_4B0A37

loc_4B09F3:
mov	[ebp+var_44], 80h
mov	edx, [ebp+var_4C]
mov	eax, [edx+1Ch]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_4B0A21
mov	edx, 20h
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B0A21:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B0A3E
retn

loc_4B0A37:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B0A3E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4B0900 endp

align 10h


; Attributes: bp-based frame

sub_4B0A60 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_38=	word ptr -38h
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B0A60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 40h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+0Ch]
sub	edx, [ecx+20h]
sar	edx, 2
cmp	edx, 1
jnb	short loc_4B0AA5
push	1
push	1
mov	ecx, [ebp+var_50]
call	sub_4C1430

loc_4B0AA5:
mov	[ebp+var_14], 80h
push	20h
mov	ecx, [ebp+var_50]
add	ecx, 24h
call	sub_5F3840
mov	ecx, [ebp+var_50]
mov	edx, [ecx+0Ch]
mov	[edx-4], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_50]
mov	ecx, [eax+0Ch]
sub	ecx, 4
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_34]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_50]
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_30], 80h
mov	ecx, 20h
shl	ecx, 2
mov	edx, [ebp+var_50]
add	ecx, [edx+4]
mov	eax, [ebp+var_50]
mov	[eax+8], ecx
mov	ecx, [ebp+var_50]
mov	edx, [ecx+8]
sub	edx, 4
mov	eax, [ebp+var_50]
mov	[eax], edx
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
xor	eax, eax
mov	byte ptr [ebp+var_38+1], al
mov	cl, byte ptr [ebp+var_38+1]
mov	[ebp+var_35], cl
xor	edx, edx
mov	byte ptr [ebp+var_38], dl
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_36], al
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx], eax
jmp	short loc_4B0B88

loc_4B0B3C:
mov	ecx, [ebp+var_50]
call	sub_4AB2D0
mov	[ebp+var_48], 80h
mov	ecx, [ebp+var_50]
mov	edx, [ecx+0Ch]
mov	eax, [edx-4]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_4B0B72
mov	ecx, 20h
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B0B72:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B0B8F
retn

loc_4B0B88:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B0B8F:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4B0A60 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4B0BB0(void	*)
sub_4B0BB0 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_4B0BB9:
cmp	[ebp+arg_0], 0
jz	short loc_4B0C09
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_4B0BB0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4B7510
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4B0C01
mov	edx, 1
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B0C01:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4B0BB9

loc_4B0C09:
mov	esp, ebp
pop	ebp
retn	4
sub_4B0BB0 endp

align 10h


; Attributes: bp-based frame

sub_4B0C10 proc	near

var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_4B0C4F

loc_4B0C3E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_4B0C4F:
mov	ecx, [ebp+var_84]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_85], dl
movzx	eax, [ebp+var_85]
test	eax, eax
jz	short loc_4B0C94
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_4B0C94
jmp	short loc_4B0C3E

loc_4B0C94:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_4B0CCE
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_84]
call	sub_4B8320
jmp	short loc_4B0D0D

loc_4B0CCE:
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_4]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_7C]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	ecx, [ebp+var_84]
call	sub_4B90B0

loc_4B0D0D:
mov	esp, ebp
pop	ebp
retn	8
sub_4B0C10 endp

align 10h


; Attributes: bp-based frame

sub_4B0D20 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_7C=	dword ptr -7Ch
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B0D20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B8h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_5AA310
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_4B8410
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_C8]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4CFCD0
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4B0DDC
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_1C]
push	edx		; void *
call	sub_4CFD90
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 20h
mov	[ebp+var_1C], eax
jmp	short loc_4B0E08

loc_4B0DDC:
mov	ecx, [ebp+arg_C]
shl	ecx, 5
add	ecx, [ebp+var_1C]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_4CB740
add	esp, 14h
mov	eax, [ebp+var_64]
mov	[ebp+var_1C], eax

loc_4B0E08:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_4B0E49
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_C8]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_66]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4CFCD0
add	esp, 14h
mov	[ebp+var_1C], eax

loc_4B0E49:
jmp	short loc_4B0E92

loc_4B0E4B:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_4CB7F0
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_7C], ecx
cmp	[ebp+var_18], 0
jz	short loc_4B0E7C
mov	edx, [ebp+var_7C]
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B0E7C:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B0E99
retn

loc_4B0E92:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B0E99:
mov	ecx, [ebp+var_C8]
call	sub_4B83A0
mov	ecx, [ebp+var_14]
shl	ecx, 5
add	ecx, [ebp+var_18]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_C4]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4B0D20 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4B0EF0(void	*)
sub_4B0EF0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_4B0EF9:
cmp	[ebp+arg_0], 0
jz	short loc_4B0F49
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_4B0EF0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4C2DB0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4B0F41
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B0F41:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4B0EF9

loc_4B0F49:
mov	esp, ebp
pop	ebp
retn	4
sub_4B0EF0 endp

align 10h


; Attributes: bp-based frame

sub_4B0F50 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4B0FB6
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_4B0F97
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4C3A70
jmp	short loc_4B0FB6

loc_4B0F97:
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4C3960

loc_4B0FB6:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B0F50 endp

align 10h


; Attributes: bp-based frame

sub_4B0FC0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B0FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B8h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_4B89C0
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_4B8480
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_4D], al
mov	ecx, [ebp+var_C8]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4B1076
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_1C]
push	ecx		; void *
call	sub_5A7AA0
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_1C], edx
jmp	short loc_4B10A2

loc_4B1076:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_1C]
lea	edx, [ecx+eax*8]
mov	[ebp+var_5C], edx
push	0
lea	eax, [ebp+var_5D]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
mov	eax, [ebp+var_1C]
push	eax
call	sub_4CC150
add	esp, 14h
mov	ecx, [ebp+var_5C]
mov	[ebp+var_1C], ecx

loc_4B10A2:
movzx	edx, [ebp+arg_10]
test	edx, edx
jnz	short loc_4B10DD
xor	eax, eax
mov	byte ptr [ebp+var_20+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_20], cl
mov	dl, byte ptr [ebp+var_20]
mov	[ebp+var_65], dl
mov	eax, [ebp+var_C8]
mov	ecx, [eax+4]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_1C], eax

loc_4B10DD:
jmp	short loc_4B1119

loc_4B10DF:
xor	edx, edx
mov	[ebp+var_66], dl
mov	eax, [ebp+var_14]
mov	[ebp+var_6C], eax
cmp	[ebp+var_18], 0
jz	short loc_4B1103
mov	ecx, [ebp+var_6C]
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_18]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B1103:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B1120
retn

loc_4B1119:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B1120:
mov	ecx, [ebp+var_C8]
call	sub_50F330
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
lea	edx, [ecx+eax*8]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_1C]
mov	[edx+4], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ebp+var_C4]
mov	[ecx+8], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4B0FC0 endp

align 10h


; Attributes: bp-based frame

sub_4B1180 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_6C]
jz	loc_4B12DA
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_6C]
mov	eax, [ecx+8]
sub	eax, [edx]
cmp	[ebp+var_4], eax
jbe	short loc_4B11F8
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_4C3C90
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_6C]
call	sub_443CC0
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
add	ecx, [ebp+var_8]
mov	edx, [ebp+var_6C]
mov	[edx+8], ecx
jmp	loc_4B12CC

loc_4B11F8:
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_6C]
mov	edx, [eax+4]
sub	edx, [ecx]
cmp	edx, [ebp+var_4]
jb	short loc_4B1252
xor	eax, eax
mov	[ebp+var_11], al
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_44]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	nullsub_1
add	esp, 8
jmp	short loc_4B12CC

loc_4B1252:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_6C]
mov	eax, [ecx+4]
sub	eax, [edx]
mov	ecx, [ebp+arg_0]
add	eax, [ecx]
mov	[ebp+var_58], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_5C]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_54]
push	eax
call	sub_406610
add	esp, 0Ch
xor	ecx, ecx
mov	[ebp+var_13], cl
mov	edx, [ebp+var_6C]
mov	eax, [edx+4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_6C]
mov	edx, [eax+4]
sub	edx, [ecx]
mov	eax, [ebp+arg_0]
add	edx, [eax]
mov	[ebp+var_60], edx
mov	ecx, [ebp+var_68]
push	ecx
mov	edx, [ebp+var_64]
push	edx
mov	eax, [ebp+var_60]
push	eax
call	sub_407C50
add	esp, 0Ch

loc_4B12CC:
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
add	edx, [ebp+var_4]
mov	eax, [ebp+var_6C]
mov	[eax+4], edx

loc_4B12DA:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn	4
sub_4B1180 endp

align 10h


; Attributes: bp-based frame

sub_4B12F0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_88]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
cmp	edx, [ebp+arg_0]
jnb	loc_4B1404
mov	[ebp+var_C], 3FFFFFFFh
mov	[ebp+var_10], 3FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_4B133D
mov	ecx, [ebp+var_10]
mov	[ebp+var_8C], ecx
jmp	short loc_4B1346

loc_4B133D:
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx

loc_4B1346:
mov	eax, [ebp+var_8C]
cmp	eax, [ebp+arg_0]
jnb	short loc_4B135C
mov	ecx, [ebp+var_88]
call	sub_5BD210

loc_4B135C:
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_88]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_88]
cmp	dword ptr [ecx], 0
jz	short loc_4B13B0
mov	edx, [ebp+var_88]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_4C3F30
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_88]
call	sub_444710
jmp	short loc_4B13C9

loc_4B13B0:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_88]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_8], eax

loc_4B13C9:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
lea	edx, [ecx+eax*4]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
mov	edx, [ebp+var_88]
mov	[edx+4], ecx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_84]
mov	[eax+8], ecx

loc_4B1404:
mov	esp, ebp
pop	ebp
retn	4
sub_4B12F0 endp

align 10h


; Attributes: bp-based frame

sub_4B1410 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4B1471
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_4B1452
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4C3D40
jmp	short loc_4B1471

loc_4B1452:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_455B70

loc_4B1471:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B1410 endp

align 10h


; Attributes: bp-based frame

sub_4B1480 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B1480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+20h], 0
jz	short loc_4B14F2
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_4C3FE0
mov	edx, [ebp+var_18]
mov	eax, [edx+24h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+20h]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_4B14F2
mov	eax, [ebp+var_14]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4B14F2:
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B1480 endp

align 10h


; Attributes: bp-based frame

sub_4B1520 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
sub	ecx, 4
mov	edx, [ebp+var_14]
cmp	[edx], ecx
jz	short loc_4B1548
mov	eax, [ebp+var_14]
mov	ecx, [eax]
add	ecx, 4
mov	edx, [ebp+var_14]
mov	[edx], ecx
jmp	short loc_4B15B9

loc_4B1548:
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_4B1573
mov	edx, 20h
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B1573:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_C], 80h
mov	edx, 20h
shl	edx, 2
mov	eax, [ebp+var_14]
add	edx, [eax+4]
mov	ecx, [ebp+var_14]
mov	[ecx+8], edx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[edx], ecx

loc_4B15B9:
mov	esp, ebp
pop	ebp
retn
sub_4B1520 endp

align 10h


; Attributes: bp-based frame

sub_4B15C0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_87=	byte ptr -87h
var_86=	byte ptr -86h
var_85=	byte ptr -85h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_60=	byte ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B15C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D4h
mov	[ebp+var_C4], ecx
mov	[ebp+var_6C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_4CFFF0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_C4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_78]
mov	[ebp+var_74], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_78]
setz	al
mov	[ebp+var_C5], al
movzx	ecx, [ebp+var_C5]
test	ecx, ecx
jnz	short loc_4B16A3
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_C4]
call	sub_4B8160
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	[ebp+var_D0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_6C]
or	ecx, 1
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_D0]
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jnz	short loc_4B16A3
mov	[ebp+var_D4], 0
jmp	short loc_4B16AD

loc_4B16A3:
mov	[ebp+var_D4], 1

loc_4B16AD:
mov	al, byte ptr [ebp+var_D4]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_6C]
and	ecx, 1
jz	short loc_4B16C9
and	[ebp+var_6C], 0FFFFFFFEh

loc_4B16C9:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4B1802
xor	eax, eax
mov	[ebp+var_87], al
lea	ecx, [ebp+var_85]
mov	[ebp+var_D8], ecx
mov	[ebp+var_4], 1
lea	edx, [ebp+var_86]
mov	[ebp+var_DC], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_D8]
push	eax
mov	ecx, [ebp+var_DC]
push	ecx
lea	edx, [ebp+var_87]
push	edx
push	0
lea	ecx, [ebp+var_60]
call	sub_4B9130
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_60]
mov	[ebp+var_90], eax
mov	[ebp+var_4], 7
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[ebp+var_44], edx
mov	[ebp+var_40], eax
lea	ecx, [ebp+var_3C]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_90]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_4B91F0
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 7
lea	eax, [ebp+var_44]
mov	[ebp+var_A4], eax
mov	byte ptr [ebp+var_4], 0Ah
lea	ecx, [ebp+var_A0]
mov	[ebp+var_94], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_94]
call	sub_4046E0
mov	edx, [ebp+var_A4]
push	edx
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_A0]
mov	eax, [ebp+var_9C]
call	sub_4046E0
lea	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_4C0920
lea	ecx, [ebp+var_68]
mov	[ebp+var_E0], ecx
mov	edx, [ebp+var_E0]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 7
lea	ecx, [ebp+var_44]
call	sub_4B78E0
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_60]
call	sub_4B84F0

loc_4B1802:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B15C0 endp

align 10h


; Attributes: bp-based frame

sub_4B1820 proc	near

var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	byte ptr -48h
var_41=	byte ptr -41h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B1820
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E0h
mov	[ebp+var_D8], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_50], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_50]
mov	eax, [ecx]
xor	edx, edx
div	[ebp+var_54]
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_14]
lea	eax, [eax+edx*4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_14]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_D9], dl
movzx	eax, [ebp+var_D9]
test	eax, eax
jz	loc_4B1B44
jmp	short loc_4B1902

loc_4B18FA:
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_18], edx

loc_4B1902:
lea	eax, [ebp+var_7C]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_74]
mov	[edx], eax
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+var_7C]
setnz	dl
mov	[ebp+var_DA], dl
movzx	eax, [ebp+var_DA]
test	eax, eax
jz	loc_4B1A3A
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_4]
mov	[ebp+var_84], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_88], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_88]
mov	[ebp+var_90], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_84]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_4B19BD
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_4B19BD
mov	[ebp+var_E8], 1
jmp	short loc_4B19C7

loc_4B19BD:
mov	[ebp+var_E8], 0

loc_4B19C7:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_4B1A35
mov	[ebp+var_21], 0
lea	ecx, [ebp+var_9C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ecx]
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_A0]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_21]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_4B1B8A

loc_4B1A35:
jmp	loc_4B18FA

loc_4B1A3A:
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_14]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_B0], ecx
lea	edx, [ebp+var_B8]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D8]
add	ecx, 4
call	sub_4B97B0
mov	[ebp+var_B4], eax
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+var_B4]
mov	[eax], ecx
mov	edx, [ebp+var_B4]
mov	[ebp+var_34], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_EC]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_D8]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D8]
mov	[edx+14h], ecx
mov	[ebp+var_35], 1
lea	eax, [ebp+var_C4]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_BC]
mov	[edx], eax
mov	ecx, [ebp+var_C4]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_3C]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_4B1B8A

loc_4B1B44:
mov	[ebp+var_41], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_D8]
call	sub_4C4040
mov	[ebp+var_D4], eax
mov	eax, [ebp+var_D4]
mov	ecx, [eax]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_D0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_41]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4B1B8A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4B1820 endp

align 10h


; Attributes: bp-based frame

sub_4B1BA0 proc	near

var_DA=	byte ptr -0DAh
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B1BA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+var_50], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_50]
mov	[ebp+var_58], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_5C], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
xor	edx, edx
div	[ebp+var_5C]
mov	[ebp+var_10], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	[ebp+var_18], edx
mov	[ebp+var_14], 0
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_4B1D20
mov	ecx, [ebp+var_10]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_52A900
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_88]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_80]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_50F900
mov	[ebp+var_84], eax
mov	eax, [ebp+var_84]
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_3C]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_D8]
mov	eax, [edx]
mov	[ebp+var_34], eax
lea	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_10]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax
jmp	loc_4B1E9F

loc_4B1D20:
mov	ecx, [ebp+var_18]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_94]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_640660
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_10]
lea	eax, [eax+edx*4+4]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_24], eax
jmp	short loc_4B1D84

loc_4B1D74:
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[ebp+var_18], ecx

loc_4B1D84:
lea	edx, [ebp+var_A8]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
mov	eax, [ebp+var_18]
xor	ecx, ecx
cmp	eax, [ebp+var_A8]
setnz	cl
mov	[ebp+var_D9], cl
movzx	edx, [ebp+var_D9]
test	edx, edx
jz	loc_4B1E9F
lea	eax, [ebp+var_B4]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_AC]
mov	[edx], eax
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+var_B4]
setz	dl
mov	[ebp+var_DA], dl
movzx	eax, [ebp+var_DA]
test	eax, eax
jz	loc_4B1E9A
lea	ecx, [ebp+var_CC]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_28]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+var_B8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx]
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C0]
mov	[eax], ecx
xor	edx, edx
mov	[ebp+var_C5], dl
cmp	[ebp+var_C4], 0
jz	short loc_4B1E86
mov	eax, 1
imul	eax, 18h
push	eax		; int
mov	ecx, [ebp+var_C4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4B1E86:
mov	edx, [ebp+var_C0]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax
jmp	short loc_4B1E9F

loc_4B1E9A:
jmp	loc_4B1D74

loc_4B1E9F:
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_14]
mov	eax, [ebp+var_D0]
mov	[eax+14h], edx
mov	ecx, [ebp+var_D0]
call	sub_4C4690
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B1BA0 endp

align 10h


; Attributes: bp-based frame

sub_4B1ED0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_4B1F32
jmp	short loc_4B1F4D

loc_4B1F32:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_4C47F0

loc_4B1F4D:
mov	esp, ebp
pop	ebp
retn	4
sub_4B1ED0 endp

align 10h


; Attributes: bp-based frame

sub_4B1F60 proc	near

var_60=	dword ptr -60h
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_4CC1F0
mov	edx, [ebp+var_2C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_38]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_54]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_3C]
mov	[edx], eax
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_59], al
mov	cl, [ebp+var_59]
mov	[ebp+var_5A], cl
movzx	edx, [ebp+var_5A]
test	edx, edx
jz	short loc_4B2007
mov	[ebp+var_24], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [eax+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_4C4BC0
add	eax, 8
mov	[ebp+var_60], eax
jmp	short loc_4B2010

loc_4B2007:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_60], edx

loc_4B2010:
mov	eax, [ebp+var_60]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4B1F60 endp

align 10h


; Attributes: bp-based frame

sub_4B2020 proc	near

var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E1=	byte ptr -0E1h
var_E0=	dword ptr -0E0h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B2020
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0F4h
mov	[ebp+var_E0], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_4D0090
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_E0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_E1], al
movzx	ecx, [ebp+var_E1]
test	ecx, ecx
jnz	loc_4B2148
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_E0]
call	sub_444510
mov	[ebp+var_E8], eax
mov	eax, [ebp+var_E8]
mov	[ebp+var_EC], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_68], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_68]
mov	[ebp+var_F0], eax
mov	[ebp+var_F4], ecx
mov	edx, [ebp+var_F0]
mov	eax, [ebp+var_F4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4B2127
jb	short loc_4B211B
mov	edx, [ebp+var_F0]
mov	eax, [ebp+var_F4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4B2127

loc_4B211B:
mov	[ebp+var_F8], 1
jmp	short loc_4B2131

loc_4B2127:
mov	[ebp+var_F8], 0

loc_4B2131:
movzx	edx, byte ptr [ebp+var_F8]
test	edx, edx
jnz	short loc_4B2148
mov	[ebp+var_FC], 0
jmp	short loc_4B2152

loc_4B2148:
mov	[ebp+var_FC], 1

loc_4B2152:
mov	al, byte ptr [ebp+var_FC]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4B217C
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B217C:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4B2263
lea	eax, [ebp+var_49]
mov	[ebp+var_6C], eax
mov	[ebp+var_4], 2
mov	[ebp+var_48], 0
mov	[ebp+var_44], 0
push	0
mov	ecx, [ebp+var_6C]
push	ecx
lea	ecx, [ebp+var_40]
call	sub_4AC3C0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_48]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [eax+4]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_70]
push	eax
lea	ecx, [ebp+var_34]
call	sub_4B8FF0
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_3C]
mov	[ebp+var_84], ecx
mov	byte ptr [ebp+var_4], 7
lea	edx, [ebp+var_80]
mov	[ebp+var_74], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	eax, [ebp+var_84]
push	eax
push	ecx
mov	[ebp+var_7C], esp
mov	ecx, [ebp+var_80]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_E0]
call	sub_4C1D30
lea	edx, [ebp+var_54]
mov	[ebp+var_100], edx
mov	eax, [ebp+var_100]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_34]
call	sub_436170
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_48]
call	sub_436170
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B2263:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B2020 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B2280(wchar_t *DstBuf, size_t MaxCount, wchar_t *Format, char)
sub_4B2280 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
MaxCount= dword	ptr  0Ch
Format=	dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_C]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
mov	eax, [ebp+MaxCount]
push	eax		; MaxCount
push	400h		; SizeInWords
mov	ecx, [ebp+DstBuf]
push	ecx		; DstBuf
call	__vsnwprintf_s
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_4B2280 endp

align 10h


; Attributes: bp-based frame

sub_4B22B0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	byte ptr -0A8h
var_A0=	byte ptr -0A0h
var_88=	byte ptr -88h
var_6C=	byte ptr -6Ch
var_54=	byte ptr -54h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B22B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0FCh
mov	[ebp+var_F0], ecx
mov	[ebp+var_AC], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_F0]
call	sub_4D1860
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_B0]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_F0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_B8]
mov	[ebp+var_B4], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_B4]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_B8]
setz	al
mov	[ebp+var_F1], al
movzx	ecx, [ebp+var_F1]
test	ecx, ecx
jnz	short loc_4B23AC
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_F0]
call	sub_444490
mov	[ebp+var_F8], eax
mov	eax, [ebp+var_F8]
mov	[ebp+var_FC], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_AC]
or	ecx, 1
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B23AC
mov	[ebp+var_100], 0
jmp	short loc_4B23B6

loc_4B23AC:
mov	[ebp+var_100], 1

loc_4B23B6:
mov	cl, byte ptr [ebp+var_100]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_AC]
and	edx, 1
jz	short loc_4B23E0
and	[ebp+var_AC], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B23E0:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B251D
lea	ecx, [ebp+var_A0]
call	sub_4B8580
mov	[ebp+var_104], eax
mov	ecx, [ebp+var_104]
mov	[ebp+var_CC], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_6C]
call	sub_403850
mov	byte ptr [ebp+var_4], 2
lea	eax, [ebp+var_54]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
push	ecx
mov	ecx, [ebp+var_C8]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_CC]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_C8]
add	ecx, 18h
call	sub_4A49A0
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_6C]
mov	[ebp+var_E0], eax
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_DC]
mov	[ebp+var_D0], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_D0]
call	sub_4046E0
mov	edx, [ebp+var_E0]
push	edx
push	ecx
mov	[ebp+var_D8], esp
mov	ecx, [ebp+var_DC]
mov	eax, [ebp+var_D8]
call	sub_4046E0
lea	eax, [ebp+var_A8]
push	eax
mov	ecx, [ebp+var_F0]
call	sub_4BE000
lea	ecx, [ebp+var_A8]
mov	[ebp+var_108], ecx
mov	edx, [ebp+var_108]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_54]
mov	[ebp+var_E4], ecx
mov	ecx, [ebp+var_E4]
add	ecx, 18h
call	sub_45BC60
mov	ecx, [ebp+var_E4]
call	sub_407910
lea	ecx, [ebp+var_6C]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_88]
call	sub_45BC60
lea	ecx, [ebp+var_A0]
call	sub_407910

loc_4B251D:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B22B0 endp

align 10h


; Attributes: bp-based frame

sub_4B2540 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B2540
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_10], 0
mov	[ebp+var_4], 2
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+arg_1C]
push	ecx
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_4A49A0
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+arg_4]
call	sub_407910
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+arg_1C]
call	sub_45BC60
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B2540 endp

align 10h


; Attributes: bp-based frame

sub_4B25D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLworesmgr2inte ; "LWOResMgr2Interface"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_4C4DB0
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1514E1C ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4B25D0 endp

align 10h


; Attributes: bp-based frame

sub_4B26A0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	[ebp+var_3C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4CFFF0
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_48]
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_44]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_48]
setz	al
mov	[ebp+var_69], al
movzx	ecx, [ebp+var_69]
test	ecx, ecx
jnz	short loc_4B275F
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_68]
call	sub_4B8160
mov	[ebp+var_70], eax
mov	eax, [ebp+var_70]
mov	[ebp+var_74], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_3C]
or	ecx, 1
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jnz	short loc_4B275F
mov	[ebp+var_78], 0
jmp	short loc_4B2766

loc_4B275F:
mov	[ebp+var_78], 1

loc_4B2766:
mov	al, byte ptr [ebp+var_78]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_3C]
and	ecx, 1
jz	short loc_4B277F
and	[ebp+var_3C], 0FFFFFFFEh

loc_4B277F:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4B27E0
mov	[ebp+var_30], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_2C], ecx
mov	[ebp+var_28], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	edx, [ebp+var_2C]
push	edx
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4C01B0
lea	ecx, [ebp+var_38]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_4B27E0:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B26A0 endp

align 10h


; Attributes: bp-based frame

sub_4B2800 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_4B288D
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 5
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_4B282B

loc_4B2823:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_4B282B:
cmp	[ebp+var_8], 1
jz	short loc_4B283C
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_4B2823

loc_4B283C:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
shl	eax, 1
push	eax		; int
push	0		; int
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; float
call	sub_4C4E20
add	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4C4FC0
add	esp, 14h

loc_4B288D:
mov	esp, ebp
pop	ebp
retn
sub_4B2800 endp

align 10h


; Attributes: bp-based frame

sub_4B28A0 proc	near

var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_141= byte ptr -141h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	byte ptr -0FCh
var_F1=	byte ptr -0F1h
var_F0=	byte ptr -0F0h
var_C5=	byte ptr -0C5h
var_C4=	byte ptr -0C4h
var_9C=	byte ptr -9Ch
var_74=	byte ptr -74h
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B28A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 164h
mov	[ebp+var_140], ecx
mov	[ebp+var_100], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_140]
call	sub_4D11F0
mov	[ebp+var_104], eax
mov	ecx, [ebp+var_104]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_140]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_10C]
mov	[ebp+var_108], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_108]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_10C]
setz	al
mov	[ebp+var_141], al
movzx	ecx, [ebp+var_141]
test	ecx, ecx
jnz	loc_4B29FE
lea	ecx, [ebp+var_49]
call	sub_401EF0
mov	[ebp+var_148], eax
mov	edx, [ebp+var_148]
mov	[ebp+var_14C], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_100]
or	eax, 1
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_14C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_48]
call	sub_407810
mov	[ebp+var_4], 1
mov	eax, [ebp+var_100]
or	eax, 2
mov	[ebp+var_100], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_140]
call	sub_444000
mov	[ebp+var_150], eax
mov	edx, [ebp+var_150]
mov	[ebp+var_154], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_100]
or	eax, 4
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_110], ecx
mov	edx, [ebp+var_110]
push	edx
lea	eax, [ebp+var_48]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4B29FE
mov	[ebp+var_158], 0
jmp	short loc_4B2A08

loc_4B29FE:
mov	[ebp+var_158], 1

loc_4B2A08:
mov	dl, byte ptr [ebp+var_158]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 1
mov	eax, [ebp+var_100]
and	eax, 4
jz	short loc_4B2A2F
and	[ebp+var_100], 0FFFFFFFBh
call	nullsub_1

loc_4B2A2F:
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_100]
and	ecx, 2
jz	short loc_4B2A50
and	[ebp+var_100], 0FFFFFFFDh
lea	ecx, [ebp+var_48]
call	sub_407E50

loc_4B2A50:
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_100]
and	edx, 1
jz	short loc_4B2A71
and	[ebp+var_100], 0FFFFFFFEh
lea	ecx, [ebp+var_49]
call	nullsub_1

loc_4B2A71:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B2BF2
lea	ecx, [ebp+var_F1]
call	sub_401EF0
mov	[ebp+var_15C], eax
mov	ecx, [ebp+var_15C]
mov	[ebp+var_160], ecx
mov	[ebp+var_4], 3
mov	edx, [ebp+var_160]
push	edx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_F0]
call	sub_407810
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_C5]
call	sub_401EF0
mov	[ebp+var_164], eax
mov	ecx, [ebp+var_164]
mov	[ebp+var_168], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_168]
push	edx
lea	ecx, [ebp+var_C4]
call	sub_402390
mov	[ebp+var_16C], eax
mov	eax, [ebp+var_16C]
mov	[ebp+var_128], eax
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_F0]
push	ecx
lea	ecx, [ebp+var_9C]
call	sub_403400
mov	byte ptr [ebp+var_4], 7
mov	edx, [ebp+var_128]
push	edx
lea	ecx, [ebp+var_74]
call	sub_403400
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 6
lea	eax, [ebp+var_9C]
mov	[ebp+var_13C], eax
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_138]
mov	[ebp+var_12C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_12C]
call	sub_4046E0
mov	edx, [ebp+var_13C]
push	edx
push	ecx
mov	[ebp+var_134], esp
mov	ecx, [ebp+var_138]
mov	eax, [ebp+var_134]
call	sub_4046E0
lea	eax, [ebp+var_FC]
push	eax
mov	ecx, [ebp+var_140]
call	sub_448E70
lea	ecx, [ebp+var_FC]
mov	[ebp+var_170], ecx
mov	edx, [ebp+var_170]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_9C]
push	ecx
call	sub_405CD0
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_C4]
call	sub_407E50
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_C5]
call	nullsub_1
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_F0]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_F1]
call	nullsub_1

loc_4B2BF2:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B28A0 endp

align 10h


; Attributes: bp-based frame

sub_4B2C10 proc	near

var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DD=	byte ptr -0DDh
var_DC=	dword ptr -0DCh
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_58=	byte ptr -58h
var_57=	byte ptr -57h
var_56=	byte ptr -56h
var_54=	byte ptr -54h
var_48=	byte ptr -48h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B2C10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0F0h
mov	[ebp+var_DC], ecx
mov	[ebp+var_64], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_4D1860
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_DC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_70]
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_6C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_70]
setz	al
mov	[ebp+var_DD], al
movzx	ecx, [ebp+var_DD]
test	ecx, ecx
jnz	short loc_4B2CEB
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_DC]
call	sub_444490
mov	[ebp+var_E4], eax
mov	eax, [ebp+var_E4]
mov	[ebp+var_E8], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_64]
or	ecx, 1
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B2CEB
mov	[ebp+var_EC], 0
jmp	short loc_4B2CF5

loc_4B2CEB:
mov	[ebp+var_EC], 1

loc_4B2CF5:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_64]
and	edx, 1
jz	short loc_4B2D19
and	[ebp+var_64], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B2D19:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B2E30
mov	[ebp+var_58], 1
mov	[ebp+var_57], 0
mov	[ebp+var_56], 1
lea	eax, [ebp+var_75]
call	nullsub_1
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_F0]
mov	[ebp+var_80], ecx
mov	[ebp+var_4], 1
lea	edx, [ebp+var_54]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_7C]
call	??1strstreambuf@@UAE@XZ_5 ; strstreambuf::~strstreambuf(void)
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_75]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_58]
mov	[ebp+var_F4], ecx
mov	[ebp+var_4], 5
mov	edx, [ebp+var_F4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_48]
call	sub_4B8600
mov	[ebp+var_F8], eax
mov	ecx, [ebp+var_F8]
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 6
lea	edx, [ebp+var_94]
mov	[ebp+var_88], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_88]
call	sub_4046E0
mov	eax, [ebp+var_98]
push	eax
push	ecx
mov	[ebp+var_90], esp
mov	ecx, [ebp+var_94]
mov	eax, [ebp+var_90]
call	sub_4046E0
lea	ecx, [ebp+var_60]
push	ecx
mov	ecx, [ebp+var_DC]
call	sub_4BD610
lea	edx, [ebp+var_60]
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_FC]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_2C]
call	sub_436480
lea	ecx, [ebp+var_48]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_54]
call	sub_436480

loc_4B2E30:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B2C10 endp

align 10h


; Attributes: bp-based frame

sub_4B2E50 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B2E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A0h
mov	[ebp+var_94], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_4D1860
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_94]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_95], al
movzx	ecx, [ebp+var_95]
test	ecx, ecx
jnz	short loc_4B2F2B
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_94]
call	sub_444490
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	[ebp+var_A0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B2F2B
mov	[ebp+var_A4], 0
jmp	short loc_4B2F35

loc_4B2F2B:
mov	[ebp+var_A4], 1

loc_4B2F35:
mov	cl, byte ptr [ebp+var_A4]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 1
jz	short loc_4B2F59
and	[ebp+var_58], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B2F59:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B3091
lea	ecx, [ebp+var_49]
mov	[ebp+var_A8], ecx
mov	[ebp+var_4], 1
xor	edx, edx
mov	[ebp+var_70], edx
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
push	ecx
lea	edx, [ebp+var_71]
push	edx
lea	ecx, [ebp+var_48]
call	sub_4B98B0
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_48]
call	sub_471130
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_48]
mov	[ebp+var_78], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_40]
call	sub_403850
mov	byte ptr [ebp+var_4], 7
mov	edx, [ebp+var_78]
push	edx
lea	ecx, [ebp+var_28]
call	sub_4B9350
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 6
lea	eax, [ebp+var_40]
mov	[ebp+var_8C], eax
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_88]
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_7C]
call	sub_4046E0
mov	edx, [ebp+var_8C]
push	edx
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_94]
call	sub_4C26A0
lea	ecx, [ebp+var_54]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_AC]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 0Bh
mov	byte ptr [ebp+var_4], 0Ah
lea	ecx, [ebp+var_28]
mov	[ebp+var_90], ecx
mov	byte ptr [ebp+var_4], 0Ch
mov	byte ptr [ebp+var_4], 0Dh
mov	ecx, [ebp+var_90]
call	sub_46B570
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_40]
call	sub_407910
mov	byte ptr [ebp+var_4], 0Fh
mov	byte ptr [ebp+var_4], 10h
lea	ecx, [ebp+var_48]
call	sub_46B570
mov	byte ptr [ebp+var_4], 11h
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B3091:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B2E50 endp

align 10h


; Attributes: bp-based frame

sub_4B30B0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
call	sub_49B4E0
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	esp, ebp
pop	ebp
retn	4
sub_4B30B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4B3100(void	*)
sub_4B3100 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_4B3109:
cmp	[ebp+arg_0], 0
jz	short loc_4B3159
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_4B3100
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4C5060
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4B3151
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B3151:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4B3109

loc_4B3159:
mov	esp, ebp
pop	ebp
retn	4
sub_4B3100 endp

align 10h


; Attributes: bp-based frame

sub_4B3160 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B3160
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_64], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
call	sub_451E00
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_65], al
movzx	ecx, [ebp+var_65]
test	ecx, ecx
jnz	short loc_4B321E
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_64]
mov	dl, [ecx+14h]
mov	[ebp+var_1D], dl
lea	eax, [ebp+var_1D]
mov	[ebp+var_6C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_40]
or	ecx, 1
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_24]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_4B321E
mov	[ebp+var_70], 0
jmp	short loc_4B3225

loc_4B321E:
mov	[ebp+var_70], 1

loc_4B3225:
mov	cl, byte ptr [ebp+var_70]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_40]
and	edx, 1
jz	short loc_4B3246
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	sub_42CA30

loc_4B3246:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4B32A7
mov	[ebp+var_30], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_28], ecx
lea	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_2C]
push	eax
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_64]
call	sub_491B60
lea	edx, [ebp+var_3C]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_4B32A7:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B3160 endp

align 10h


; Attributes: bp-based frame

sub_4B32C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_4B33B4
mov	[ebp+var_4], 0
jmp	short loc_4B32F3

loc_4B32EA:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_4B32F3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+var_4], edx
jnb	loc_4B33B4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+eax*8]
mov	eax, [edx+4]
mov	[ebp+var_18], eax

loc_4B3327:
mov	ecx, [ebp+var_18]
mov	dl, [ecx]
mov	[ebp+var_19], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax]
jnz	short loc_4B3364
cmp	[ebp+var_19], 0
jz	short loc_4B335B
mov	ecx, [ebp+var_18]
mov	dl, [ecx+1]
mov	[ebp+var_1A], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax+1]
jnz	short loc_4B3364
add	[ebp+var_18], 2
add	[ebp+var_14], 2
cmp	[ebp+var_1A], 0
jnz	short loc_4B3327

loc_4B335B:
mov	[ebp+var_20], 0
jmp	short loc_4B336C

loc_4B3364:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_20], ecx

loc_4B336C:
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
cmp	[ebp+var_24], 0
jnz	short loc_4B33AF
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+eax*8+4]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+eax*8]
push	edx
call	sub_770170
add	esp, 10h
jmp	short loc_4B33B4

loc_4B33AF:
jmp	loc_4B32EA

loc_4B33B4:
mov	esp, ebp
pop	ebp
retn
sub_4B32C0 endp

align 10h


; Attributes: bp-based frame

sub_4B33C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_4B34B4
mov	[ebp+var_4], 0
jmp	short loc_4B33F3

loc_4B33EA:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_4B33F3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+var_4], edx
jnb	loc_4B34B4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+eax*8]
mov	eax, [edx+4]
mov	[ebp+var_18], eax

loc_4B3427:
mov	ecx, [ebp+var_18]
mov	dl, [ecx]
mov	[ebp+var_19], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax]
jnz	short loc_4B3464
cmp	[ebp+var_19], 0
jz	short loc_4B345B
mov	ecx, [ebp+var_18]
mov	dl, [ecx+1]
mov	[ebp+var_1A], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax+1]
jnz	short loc_4B3464
add	[ebp+var_18], 2
add	[ebp+var_14], 2
cmp	[ebp+var_1A], 0
jnz	short loc_4B3427

loc_4B345B:
mov	[ebp+var_20], 0
jmp	short loc_4B346C

loc_4B3464:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_20], ecx

loc_4B346C:
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
cmp	[ebp+var_24], 0
jnz	short loc_4B34AF
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+eax*8+4]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+eax*8]
push	edx
call	sub_76FFA0
add	esp, 10h
jmp	short loc_4B34B4

loc_4B34AF:
jmp	loc_4B33EA

loc_4B34B4:
mov	esp, ebp
pop	ebp
retn
sub_4B33C0 endp

align 10h


; Attributes: bp-based frame

sub_4B34C0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
push	esi
push	edi
mov	[ebp+var_A8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_5A9ED0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A8]
add	ecx, 8
call	sub_4B8760
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_44], edx
jmp	short loc_4B3538

loc_4B3526:
mov	eax, [ebp+var_48]
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
add	ecx, 64h
mov	[ebp+var_44], ecx

loc_4B3538:
cmp	[ebp+var_48], 0
jbe	short loc_4B354D
mov	esi, [ebp+arg_4]
mov	ecx, 19h
mov	edi, [ebp+var_44]
rep movsd
jmp	short loc_4B3526

loc_4B354D:
mov	edx, [ebp+var_44]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_4B3578
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4B3578:
mov	ecx, [ebp+var_A8]
call	sub_4B86E0
mov	edx, [ebp+var_4]
imul	edx, 64h
add	edx, [ebp+var_8]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_A4]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_4B34C0 endp



; Attributes: bp-based frame

sub_4B35C0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4B3626
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 64h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_4B3607
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4C50E0
jmp	short loc_4B3626

loc_4B3607:
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4B34C0

loc_4B3626:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B35C0 endp

align 10h


; Attributes: bp-based frame

sub_4B3630 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_4B36DD
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 14h
idiv	ecx
sar	eax, 1
mov	[ebp+var_4], eax

loc_4B366B:
cmp	[ebp+var_4], 0FFFFFFFFh
jz	short loc_4B36DB
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
imul	ecx, 14h
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+ecx]
jnb	short loc_4B36A4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
imul	eax, 14h
mov	ecx, [ebp+var_C]
mov	edx, [ecx+eax+4]
mov	[ebp+var_4], edx
jmp	short loc_4B36D9

loc_4B36A4:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4]
imul	edx, 14h
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+edx]
jbe	short loc_4B36D7
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_4]
imul	ecx, 14h
mov	edx, [ebp+var_14]
mov	eax, [edx+ecx+8]
mov	[ebp+var_4], eax
jmp	short loc_4B36D9

loc_4B36D7:
jmp	short loc_4B36DB

loc_4B36D9:
jmp	short loc_4B366B

loc_4B36DB:
jmp	short loc_4B36E4

loc_4B36DD:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B36E4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4B3630 endp

align 10h


; Attributes: bp-based frame

sub_4B36F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_4B379D
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 64h
idiv	ecx
sar	eax, 1
mov	[ebp+var_4], eax

loc_4B372B:
cmp	[ebp+var_4], 0FFFFFFFFh
jz	short loc_4B379B
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
imul	ecx, 64h
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+ecx]
jnb	short loc_4B3764
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
imul	eax, 64h
mov	ecx, [ebp+var_C]
mov	edx, [ecx+eax+4]
mov	[ebp+var_4], edx
jmp	short loc_4B3799

loc_4B3764:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4]
imul	edx, 64h
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+edx]
jbe	short loc_4B3797
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_4]
imul	ecx, 64h
mov	edx, [ebp+var_14]
mov	eax, [edx+ecx+8]
mov	[ebp+var_4], eax
jmp	short loc_4B3799

loc_4B3797:
jmp	short loc_4B379B

loc_4B3799:
jmp	short loc_4B372B

loc_4B379B:
jmp	short loc_4B37A4

loc_4B379D:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B37A4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4B36F0 endp

align 10h


; Attributes: bp-based frame

sub_4B37B0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
push	esi
push	edi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_4]
add	ecx, [ebp+arg_8]
sar	ecx, 1
imul	ecx, 64h
mov	edx, [ebp+var_7C]
mov	eax, [edx+ecx]
mov	[ebp+var_8], eax

loc_4B37E3:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_4]
imul	eax, 64h
mov	ecx, [ebp+var_80]
mov	edx, [ecx+eax]
cmp	edx, [ebp+var_8]
jnb	short loc_4B380F
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_8]
jge	short loc_4B380F
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
jmp	short loc_4B37E3

loc_4B380F:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_C]
imul	ecx, 64h
mov	edx, [ebp+var_84]
mov	eax, [ebp+var_8]
cmp	eax, [edx+ecx]
jnb	short loc_4B3841
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+arg_4]
jle	short loc_4B3841
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx
jmp	short loc_4B380F

loc_4B3841:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_C]
jg	loc_4B38D6
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_88], edx
mov	esi, [ebp+var_4]
imul	esi, 64h
add	esi, [ebp+var_88]
mov	ecx, 19h
lea	edi, [ebp+var_78]
rep movsd
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_90], eax
mov	esi, [ebp+var_C]
imul	esi, 64h
add	esi, [ebp+var_8C]
mov	edi, [ebp+var_4]
imul	edi, 64h
add	edi, [ebp+var_90]
mov	ecx, 19h
rep movsd
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	edi, [ebp+var_C]
imul	edi, 64h
add	edi, [ebp+var_94]
mov	ecx, 19h
lea	esi, [ebp+var_78]
rep movsd
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
sub	ecx, 1
mov	[ebp+var_C], ecx

loc_4B38D6:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C]
jle	loc_4B37E3
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C]
jge	short loc_4B38FE
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4B37B0
add	esp, 0Ch

loc_4B38FE:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_8]
jge	short loc_4B391A
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4B37B0
add	esp, 0Ch

loc_4B391A:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4B37B0 endp



; Attributes: bp-based frame

sub_4B3920 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
add	eax, [ebp+arg_8]
sar	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_4B393E
or	eax, 0FFFFFFFFh
jmp	short loc_4B3996

loc_4B393E:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4B3920
add	esp, 0Ch
mov	ecx, [ebp+var_4]
imul	ecx, 64h
mov	edx, [ebp+var_8]
mov	[edx+ecx+4], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4B3920
add	esp, 0Ch
mov	edx, [ebp+var_4]
imul	edx, 64h
mov	ecx, [ebp+var_C]
mov	[ecx+edx+8], eax
mov	eax, [ebp+var_4]

loc_4B3996:
mov	esp, ebp
pop	ebp
retn
sub_4B3920 endp

align 10h


; Attributes: bp-based frame

sub_4B39A0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_4]
add	ecx, [ebp+arg_8]
sar	ecx, 1
imul	ecx, 14h
mov	edx, [ebp+var_24]
mov	eax, [edx+ecx]
mov	[ebp+var_8], eax

loc_4B39CE:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_4]
imul	eax, 14h
mov	ecx, [ebp+var_28]
mov	edx, [ecx+eax]
cmp	edx, [ebp+var_8]
jnb	short loc_4B39FA
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_8]
jge	short loc_4B39FA
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
jmp	short loc_4B39CE

loc_4B39FA:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_C]
imul	ecx, 14h
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_8]
cmp	eax, [edx+ecx]
jnb	short loc_4B3A26
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+arg_4]
jle	short loc_4B3A26
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx
jmp	short loc_4B39FA

loc_4B3A26:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_C]
jg	loc_4B3ADE
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_4]
imul	eax, 14h
add	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [eax+4]
mov	[ebp+var_1C], edx
mov	ecx, [eax+8]
mov	[ebp+var_18], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_14], edx
mov	eax, [eax+10h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_C]
imul	edx, 14h
add	edx, [ebp+var_34]
mov	eax, [ebp+var_4]
imul	eax, 14h
add	eax, [ebp+var_38]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [edx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
imul	edx, 14h
add	edx, [ebp+var_3C]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
mov	eax, [ebp+var_10]
mov	[edx+10h], eax
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_4B3ADE:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_C]
jle	loc_4B39CE
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_C]
jge	short loc_4B3B06
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4B39A0
add	esp, 0Ch

loc_4B3B06:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jge	short loc_4B3B22
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4B39A0
add	esp, 0Ch

loc_4B3B22:
mov	esp, ebp
pop	ebp
retn
sub_4B39A0 endp

align 10h


; Attributes: bp-based frame

sub_4B3B30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
add	eax, [ebp+arg_8]
sar	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_4B3B4E
or	eax, 0FFFFFFFFh
jmp	short loc_4B3BA6

loc_4B3B4E:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4B3B30
add	esp, 0Ch
mov	ecx, [ebp+var_4]
imul	ecx, 14h
mov	edx, [ebp+var_8]
mov	[edx+ecx+4], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4B3B30
add	esp, 0Ch
mov	edx, [ebp+var_4]
imul	edx, 14h
mov	ecx, [ebp+var_C]
mov	[ecx+edx+8], eax
mov	eax, [ebp+var_4]

loc_4B3BA6:
mov	esp, ebp
pop	ebp
retn
sub_4B3B30 endp

align 10h


; Attributes: bp-based frame

sub_4B3BB0 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_78=	dword ptr -78h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B3BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B4h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_42F940
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_C4]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4D1470
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4B3C6C
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_5EB830
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 4
mov	[ebp+var_1C], eax
jmp	short loc_4B3C98

loc_4B3C6C:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_1C]
lea	eax, [edx+ecx*4]
mov	[ebp+var_64], eax
push	0
lea	ecx, [ebp+var_65]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_4CCD60
add	esp, 14h
mov	edx, [ebp+var_64]
mov	[ebp+var_1C], edx

loc_4B3C98:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_4B3CD9
xor	ecx, ecx
mov	byte ptr [ebp+var_20+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_20], dl
mov	al, byte ptr [ebp+var_20]
mov	[ebp+var_6D], al
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+4]
mov	[ebp+var_6C], edx
push	0
lea	eax, [ebp+var_66]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D1470
add	esp, 14h
mov	[ebp+var_1C], eax

loc_4B3CD9:
jmp	short loc_4B3D22

loc_4B3CDB:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
call	sub_4C6BD0
add	esp, 0Ch
mov	eax, [ebp+var_14]
mov	[ebp+var_78], eax
cmp	[ebp+var_18], 0
jz	short loc_4B3D0C
mov	ecx, [ebp+var_78]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_18]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B3D0C:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B3D29
retn

loc_4B3D22:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B3D29:
mov	ecx, [ebp+var_C4]
call	sub_5E3770
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
lea	edx, [ecx+eax*4]
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_C4]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_C4]
mov	eax, [ebp+var_1C]
mov	[edx+4], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ebp+var_C0]
mov	[ecx+8], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4B3BB0 endp

align 10h


; Attributes: bp-based frame

sub_4B3D80 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4B3DE6
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_4B3DC2
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4C5370
jmp	short loc_4B3DE6

loc_4B3DC2:
xor	edx, edx
mov	byte ptr [ebp+var_3+1],	dl
xor	eax, eax
mov	byte ptr [ebp+var_3], al
push	0
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_3]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4B3BB0

loc_4B3DE6:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B3D80 endp

align 10h


; Attributes: bp-based frame

sub_4B3DF0 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B3DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_A4], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_4D1860
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_A4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_A5], al
movzx	ecx, [ebp+var_A5]
test	ecx, ecx
jnz	short loc_4B3ECB
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_A4]
call	sub_444490
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	[ebp+var_B0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_54]
or	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B3ECB
mov	[ebp+var_B4], 0
jmp	short loc_4B3ED5

loc_4B3ECB:
mov	[ebp+var_B4], 1

loc_4B3ED5:
mov	cl, byte ptr [ebp+var_B4]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_54]
and	edx, 1
jz	short loc_4B3EF9
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B3EF9:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B403E
mov	[ebp+var_48], 0
lea	ecx, [ebp+var_44]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_6C]
cmp	dword ptr [eax], 0
jz	short loc_4B3F38
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_4B3F38:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_48]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
lea	eax, [ebp+var_28]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_78]
add	ecx, 4
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+var_74]
cmp	dword ptr [edx], 0
jz	short loc_4B3FA4
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_4B3FA4:
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2
lea	eax, [ebp+var_40]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_8C]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_90]
push	edx
push	ecx
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_88]
call	sub_4046E0
lea	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_4BAC70
lea	ecx, [ebp+var_50]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_B8]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 7
lea	ecx, [ebp+var_28]
call	sub_4A6040
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_48]
call	sub_4A6040

loc_4B403E:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B3DF0 endp

align 10h


; Attributes: bp-based frame

sub_4B4060 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B4060
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_10], 0
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+var_18]
cmp	dword ptr [edx], 0
jz	short loc_4B40BF
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_4B40BF:
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 0
cmp	[ebp+arg_8], 0
jz	short loc_4B40FE
mov	ecx, [ebp+arg_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_4B40FE
mov	eax, [ebp+var_1C]
mov	edx, [eax]
mov	ecx, [ebp+var_1C]
mov	eax, [edx+4]
call	eax

loc_4B40FE:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B4060 endp

align 10h


; Attributes: bp-based frame

sub_4B4110 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B4110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_80], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_80]
call	sub_4D1860
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_80]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_81], al
movzx	ecx, [ebp+var_81]
test	ecx, ecx
jnz	short loc_4B41DF
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_80]
call	sub_444490
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	[ebp+var_8C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_54]
or	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B41DF
mov	[ebp+var_90], 0
jmp	short loc_4B41E9

loc_4B41DF:
mov	[ebp+var_90], 1

loc_4B41E9:
mov	cl, byte ptr [ebp+var_90]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_54]
and	edx, 1
jz	short loc_4B420D
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B420D:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B42BF
mov	[ebp+var_48], 0
mov	[ebp+var_44], 0
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_40]
call	sub_403850
mov	[ebp+var_4], 1
lea	edx, [ebp+var_28]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_44]
mov	[edx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_40]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 2
lea	edx, [ebp+var_78]
mov	[ebp+var_6C], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_6C]
call	sub_4046E0
mov	eax, [ebp+var_7C]
push	eax
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_78]
mov	eax, [ebp+var_74]
call	sub_4046E0
lea	ecx, [ebp+var_50]
push	ecx
mov	ecx, [ebp+var_80]
call	sub_4BA560
lea	edx, [ebp+var_50]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_40]
call	sub_407910

loc_4B42BF:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B4110 endp

align 10h


; Attributes: bp-based frame

sub_4B42E0 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B42E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
push	esi
mov	[ebp+var_8C], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_4D1860
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_8D], al
movzx	ecx, [ebp+var_8D]
test	ecx, ecx
jnz	short loc_4B43BC
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_444490
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	[ebp+var_98], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_54]
or	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B43BC
mov	[ebp+var_9C], 0
jmp	short loc_4B43C6

loc_4B43BC:
mov	[ebp+var_9C], 1

loc_4B43C6:
mov	cl, byte ptr [ebp+var_9C]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_54]
and	edx, 1
jz	short loc_4B43EA
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B43EA:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B4514
mov	[ebp+var_48], 0
lea	esi, [ebp+var_44]
xor	eax, eax
call	sub_41DF90
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_48]
mov	[ebp+var_70], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
lea	eax, [ebp+var_28]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_70]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_6C]
add	ecx, 4
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_70]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+var_68]
cmp	dword ptr [edx], 0
jz	short loc_4B4468
mov	eax, [ebp+var_68]
mov	ecx, [eax]
call	sub_40AA80

loc_4B4468:
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
mov	[ebp+var_84], ecx
mov	byte ptr [ebp+var_4], 6
lea	edx, [ebp+var_80]
mov	[ebp+var_74], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	eax, [ebp+var_84]
push	eax
push	ecx
mov	[ebp+var_7C], esp
mov	ecx, [ebp+var_80]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	ecx, [ebp+var_50]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_4BB380
lea	edx, [ebp+var_50]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 7
lea	edx, [ebp+var_28]
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_88]
add	ecx, 4
call	sub_429100
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
call	sub_407910
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_429100

loc_4B4514:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4B42E0 endp

align 10h


; Attributes: bp-based frame

sub_4B4530 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B4530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_10], 0
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+var_14]
cmp	dword ptr [edx], 0
jz	short loc_4B4584
mov	eax, [ebp+var_14]
mov	ecx, [eax]
call	sub_40AA80

loc_4B4584:
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+arg_8]
call	sub_429100
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B4530 endp

align 10h


; Attributes: bp-based frame

sub_4B45C0 proc	near

var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_ED=	byte ptr -0EDh
var_EC=	dword ptr -0ECh
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AD=	byte ptr -0ADh
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	byte ptr -98h
var_8D=	byte ptr -8Dh
var_8C=	byte ptr -8Ch
var_74=	byte ptr -74h
var_73=	byte ptr -73h
var_72=	byte ptr -72h
var_70=	byte ptr -70h
var_64=	byte ptr -64h
var_48=	byte ptr -48h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B45C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 110h
mov	[ebp+var_EC], ecx
mov	[ebp+var_9C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4D1530
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A0]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_EC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_A8]
mov	[ebp+var_A4], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_A4]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_A8]
setz	al
mov	[ebp+var_ED], al
movzx	ecx, [ebp+var_ED]
test	ecx, ecx
jnz	loc_4B471B
lea	ecx, [ebp+var_39]
call	sub_401EF0
mov	[ebp+var_F4], eax
mov	edx, [ebp+var_F4]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_9C]
or	eax, 1
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_F8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_38]
call	sub_407D30
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_9C]
or	ecx, 2
mov	[ebp+var_9C], ecx
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_444490
mov	[ebp+var_FC], eax
mov	eax, [ebp+var_FC]
mov	[ebp+var_100], eax
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_9C]
or	ecx, 4
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_AC]
lea	ecx, [ebp+var_38]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B471B
mov	[ebp+var_104], 0
jmp	short loc_4B4725

loc_4B471B:
mov	[ebp+var_104], 1

loc_4B4725:
mov	cl, byte ptr [ebp+var_104]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 1
mov	edx, [ebp+var_9C]
and	edx, 4
jz	short loc_4B474F
and	[ebp+var_9C], 0FFFFFFFBh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B474F:
mov	[ebp+var_4], 0
mov	eax, [ebp+var_9C]
and	eax, 2
jz	short loc_4B4770
and	[ebp+var_9C], 0FFFFFFFDh
lea	ecx, [ebp+var_38]
call	sub_407910

loc_4B4770:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_9C]
and	ecx, 1
jz	short loc_4B4791
and	[ebp+var_9C], 0FFFFFFFEh
lea	ecx, [ebp+var_39]
call	nullsub_1

loc_4B4791:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4B4918
lea	ecx, [ebp+var_8D]
call	sub_401EF0
mov	[ebp+var_108], eax
mov	eax, [ebp+var_108]
mov	[ebp+var_10C], eax
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_10C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_8C]
call	sub_407D30
mov	byte ptr [ebp+var_4], 4
mov	[ebp+var_74], 1
mov	[ebp+var_73], 0
mov	[ebp+var_72], 1
lea	eax, [ebp+var_AD]
call	nullsub_1
mov	[ebp+var_110], eax
mov	ecx, [ebp+var_110]
mov	[ebp+var_B8], ecx
mov	byte ptr [ebp+var_4], 5
lea	edx, [ebp+var_70]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_B8]
push	eax
mov	ecx, [ebp+var_B4]
call	??1strstreambuf@@UAE@XZ_5 ; strstreambuf::~strstreambuf(void)
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 8
lea	ecx, [ebp+var_AD]
call	nullsub_1
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_74]
mov	[ebp+var_114], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_114]
push	edx
lea	eax, [ebp+var_8C]
push	eax
lea	ecx, [ebp+var_64]
call	sub_4B8600
mov	[ebp+var_118], eax
mov	ecx, [ebp+var_118]
mov	[ebp+var_D0], ecx
mov	byte ptr [ebp+var_4], 0Ah
lea	edx, [ebp+var_CC]
mov	[ebp+var_C0], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_C0]
call	sub_4046E0
mov	eax, [ebp+var_D0]
push	eax
push	ecx
mov	[ebp+var_C8], esp
mov	ecx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
call	sub_4046E0
lea	ecx, [ebp+var_98]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4BD610
lea	edx, [ebp+var_98]
mov	[ebp+var_11C], edx
mov	eax, [ebp+var_11C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_48]
call	sub_436480
lea	ecx, [ebp+var_64]
call	sub_407910
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_70]
call	sub_436480
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_8C]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_8D]
call	nullsub_1

loc_4B4918:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B45C0 endp

align 10h


; Attributes: bp-based frame

sub_4B4930 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B4930
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_10], 0
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+var_14]
cmp	dword ptr [edx], 0
jz	short loc_4B4984
mov	eax, [ebp+var_14]
mov	ecx, [eax]
call	sub_40AA80

loc_4B4984:
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 0
cmp	[ebp+arg_8], 0
jz	short loc_4B49A7
mov	ecx, [ebp+arg_8]
call	sub_40AA90

loc_4B49A7:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B4930 endp

align 10h


; Attributes: bp-based frame

sub_4B49C0 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B49C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
push	esi
mov	[ebp+var_8C], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_4D1860
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_8D], al
movzx	ecx, [ebp+var_8D]
test	ecx, ecx
jnz	short loc_4B4A9C
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_444490
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	[ebp+var_98], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_54]
or	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B4A9C
mov	[ebp+var_9C], 0
jmp	short loc_4B4AA6

loc_4B4A9C:
mov	[ebp+var_9C], 1

loc_4B4AA6:
mov	cl, byte ptr [ebp+var_9C]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_54]
and	edx, 1
jz	short loc_4B4ACA
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B4ACA:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B4BF4
mov	[ebp+var_48], 0
lea	esi, [ebp+var_44]
xor	eax, eax
call	sub_41DF90
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_48]
mov	[ebp+var_70], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
lea	eax, [ebp+var_28]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_70]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_6C]
add	ecx, 4
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_70]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+var_68]
cmp	dword ptr [edx], 0
jz	short loc_4B4B48
mov	eax, [ebp+var_68]
mov	ecx, [eax]
call	sub_40AA80

loc_4B4B48:
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
mov	[ebp+var_84], ecx
mov	byte ptr [ebp+var_4], 6
lea	edx, [ebp+var_80]
mov	[ebp+var_74], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	eax, [ebp+var_84]
push	eax
push	ecx
mov	[ebp+var_7C], esp
mov	ecx, [ebp+var_80]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	ecx, [ebp+var_50]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_4BBA90
lea	edx, [ebp+var_50]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 7
lea	edx, [ebp+var_28]
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 7
mov	eax, [ebp+var_88]
add	eax, 4
call	sub_40ABB0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
call	sub_407910
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_44]
call	sub_40ABB0

loc_4B4BF4:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4B49C0 endp

align 10h


; Attributes: bp-based frame

sub_4B4C10 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B4C10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
push	esi
mov	[ebp+var_88], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_4D1860
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_88]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_89], al
movzx	ecx, [ebp+var_89]
test	ecx, ecx
jnz	short loc_4B4CEC
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_88]
call	sub_444490
mov	[ebp+var_90], eax
mov	eax, [ebp+var_90]
mov	[ebp+var_94], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_54]
or	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B4CEC
mov	[ebp+var_98], 0
jmp	short loc_4B4CF6

loc_4B4CEC:
mov	[ebp+var_98], 1

loc_4B4CF6:
mov	cl, byte ptr [ebp+var_98]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_54]
and	edx, 1
jz	short loc_4B4D1A
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B4D1A:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B4E29
mov	[ebp+var_48], 0
lea	esi, [ebp+var_44]
xor	eax, eax
call	sub_41DF90
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_48]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
lea	eax, [ebp+var_28]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ecx], eax
mov	eax, [ebp+var_6C]
add	eax, 4
mov	esi, [ebp+var_68]
add	esi, 4
call	sub_41E510
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 6
lea	edx, [ebp+var_7C]
mov	[ebp+var_70], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	eax, [ebp+var_80]
push	eax
push	ecx
mov	[ebp+var_78], esp
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+var_78]
call	sub_4046E0
lea	ecx, [ebp+var_50]
push	ecx
mov	ecx, [ebp+var_88]
call	sub_4BC1A0
lea	edx, [ebp+var_50]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 7
lea	edx, [ebp+var_28]
mov	[ebp+var_84], edx
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_84]
add	ecx, 4
call	sub_429100
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
call	sub_407910
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_429100

loc_4B4E29:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4B4C10 endp



; Attributes: bp-based frame

sub_4B4E40 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B4E40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A0h
mov	[ebp+var_98], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_98]
call	sub_4D1860
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_99], al
movzx	ecx, [ebp+var_99]
test	ecx, ecx
jnz	short loc_4B4F1B
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_98]
call	sub_444490
mov	[ebp+var_A0], eax
mov	eax, [ebp+var_A0]
mov	[ebp+var_A4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_54]
or	ecx, 1
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B4F1B
mov	[ebp+var_A8], 0
jmp	short loc_4B4F25

loc_4B4F1B:
mov	[ebp+var_A8], 1

loc_4B4F25:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_54]
and	edx, 1
jz	short loc_4B4F49
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B4F49:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B50C2
mov	[ebp+var_48], 0
lea	ecx, [ebp+var_44]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_68]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_68]
cmp	dword ptr [eax], 0
jz	short loc_4B4F7D
mov	ecx, [ebp+var_68]
mov	ecx, [ecx]
call	sub_40AA80

loc_4B4F7D:
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_48]
mov	[ebp+var_74], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_40]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_28]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_70]
add	edx, 4
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_74]
mov	edx, [ecx+4]
mov	[eax], edx
mov	eax, [ebp+var_6C]
cmp	dword ptr [eax], 0
jz	short loc_4B4FDE
mov	ecx, [ebp+var_6C]
mov	ecx, [ecx]
call	sub_40AA80

loc_4B4FDE:
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_40]
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 6
lea	eax, [ebp+var_84]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_78]
call	sub_4046E0
mov	ecx, [ebp+var_88]
push	ecx
push	ecx
mov	[ebp+var_80], esp
mov	ecx, [ebp+var_84]
mov	eax, [ebp+var_80]
call	sub_4046E0
lea	edx, [ebp+var_50]
push	edx
mov	ecx, [ebp+var_98]
call	sub_4BC8B0
lea	eax, [ebp+var_50]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 7
lea	eax, [ebp+var_28]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_90]
add	ecx, 4
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
cmp	dword ptr [edx], 0
jz	short loc_4B5087
mov	eax, [ebp+var_8C]
mov	ecx, [eax]
call	sub_40AA90

loc_4B5087:
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_40]
call	sub_407910
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
cmp	dword ptr [edx], 0
jz	short loc_4B50C2
mov	eax, [ebp+var_94]
mov	ecx, [eax]
call	sub_40AA90

loc_4B50C2:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B4E40 endp

align 10h


; Attributes: bp-based frame

sub_4B50E0 proc	near

var_2C=	dword ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B50E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_14], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_403850
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_8]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_2C]
add	ecx, 18h
call	sub_4A49A0
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
or	eax, 1
mov	[ebp+var_14], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B50E0 endp

align 10h


; Attributes: bp-based frame

sub_4B5170 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B5170
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_30], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_34], eax
mov	eax, [ebp+var_34]
mov	[ebp+var_38], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_30]
call	sub_407D30
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
add	edx, 18h
mov	[ebp+var_28], edx
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_28]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_2C]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_28]
add	ecx, 18h
call	sub_4A49A0
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B5170 endp

align 10h


; Attributes: bp-based frame

sub_4B5220 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_1C=	byte ptr  24h
arg_34=	byte ptr  3Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B5220
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_10], 0
mov	[ebp+var_4], 2
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_14], ecx
lea	edx, [ebp+arg_1C]
push	edx
mov	ecx, [ebp+var_14]
call	sub_403850
mov	byte ptr [ebp+var_4], 4
lea	eax, [ebp+arg_34]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_4A49A0
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+arg_4]
call	sub_407910
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+arg_34]
call	sub_45BC60
lea	ecx, [ebp+arg_1C]
call	sub_407910
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B5220 endp

align 10h


; Attributes: bp-based frame

sub_4B52D0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
push	esi
push	edi
mov	[ebp+var_A8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_4B87E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A8]
add	ecx, 8
call	sub_4B8940
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_44], edx
jmp	short loc_4B5348

loc_4B5336:
mov	eax, [ebp+var_48]
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
add	ecx, 24h
mov	[ebp+var_44], ecx

loc_4B5348:
cmp	[ebp+var_48], 0
jbe	short loc_4B535D
mov	esi, [ebp+arg_4]
mov	ecx, 9
mov	edi, [ebp+var_44]
rep movsd
jmp	short loc_4B5336

loc_4B535D:
mov	edx, [ebp+var_44]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_4B5388
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4B5388:
mov	ecx, [ebp+var_A8]
call	sub_4B88C0
mov	edx, [ebp+var_4]
imul	edx, 24h
add	edx, [ebp+var_8]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_A4]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_4B52D0 endp



; Attributes: bp-based frame

sub_4B53D0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_88]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
cmp	eax, [ebp+arg_0]
jnb	loc_4B54EE
mov	[ebp+var_C], 71C71C7h
mov	[ebp+var_10], 71C71C7h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_4B5422
mov	eax, [ebp+var_10]
mov	[ebp+var_8C], eax
jmp	short loc_4B542B

loc_4B5422:
mov	ecx, [ebp+var_C]
mov	[ebp+var_8C], ecx

loc_4B542B:
mov	edx, [ebp+var_8C]
cmp	edx, [ebp+arg_0]
jnb	short loc_4B5441
mov	ecx, [ebp+var_88]
call	sub_5BD210

loc_4B5441:
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_88]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_88]
cmp	dword ptr [edx], 0
jz	short loc_4B549A
mov	eax, [ebp+var_88]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+var_88]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_88]
call	sub_4C55A0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_88]
call	sub_4B88C0
jmp	short loc_4B54B3

loc_4B549A:
lea	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
add	ecx, 8
call	sub_4B8940
mov	[ebp+var_8], eax

loc_4B54B3:
mov	ecx, [ebp+arg_0]
imul	ecx, 24h
add	ecx, [ebp+var_8]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_88]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
imul	ecx, 24h
add	ecx, [ebp+var_8]
mov	edx, [ebp+var_88]
mov	[edx+4], ecx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_84]
mov	[eax+8], ecx

loc_4B54EE:
mov	esp, ebp
pop	ebp
retn	4
sub_4B53D0 endp

align 10h


; Attributes: bp-based frame

sub_4B5500 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_6C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_4D1620
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_3C]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jnz	short loc_4B55C0
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_40], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
cmp	ecx, [ebp+var_48]
jl	short loc_4B55B1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_4C]
cmp	eax, [ebp+var_50]
jnz	short loc_4B55A8
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_54]
cmp	edx, [ebp+var_58]
jb	short loc_4B55B1

loc_4B55A8:
mov	[ebp+var_74], 0
jmp	short loc_4B55B8

loc_4B55B1:
mov	[ebp+var_74], 1

loc_4B55B8:
movzx	eax, byte ptr [ebp+var_74]
test	eax, eax
jz	short loc_4B5620

loc_4B55C0:
xor	ecx, ecx
mov	[ebp+var_28], ecx
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_20], eax
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[ebp+var_18], edx
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_68]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	edx, [ebp+var_20]
push	edx
push	ecx
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_4C2E30
lea	ecx, [ebp+var_30]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_4B5620:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_4B5500 endp

align 10h


; Attributes: bp-based frame

sub_4B5630 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 2
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	ax, [edx]
mov	esp, ebp
pop	ebp
retn
sub_4B5630 endp

align 10h


; Attributes: bp-based frame

sub_4B5660 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
Dst= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
call	sub_48C610
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4B5684
jmp	short loc_4B56E9

loc_4B5684:
mov	ecx, [ebp+var_4]
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+var_C]
mov	[ebp+Dst], edx
mov	eax, [ebp+var_4]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+Dst]
push	edx		; Dst
call	sub_4B57B0
add	esp, 0Ch
mov	eax, [ebp+Dst]
add	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax-1]
test	ecx, ecx
jnz	short loc_4B56C4
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_4B56C4:
mov	eax, [ebp+Dst]
add	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+Dst]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_403980
mov	edx, [ebp+Dst]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_4B56E9:
mov	esp, ebp
pop	ebp
retn
sub_4B5660 endp

align 10h


; Attributes: bp-based frame

sub_4B56F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
add	eax, 0Ch
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4B56F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B5730(void *Dst, int, int)
sub_4B5730 proc	near

MaxCount= dword	ptr -4
Dst= dword ptr	8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
shl	eax, 1
mov	[ebp+MaxCount],	eax
mov	ecx, [ebp+MaxCount]
push	ecx		; MaxCount
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax		; Src
mov	ecx, [ebp+MaxCount]
push	ecx		; DstSize
mov	edx, [ebp+Dst]
push	edx		; Dst
call	_memcpy_s
add	esp, 10h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, [ebp+MaxCount]
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+MaxCount]
mov	esp, ebp
pop	ebp
retn
sub_4B5730 endp

align 10h


; Attributes: bp-based frame

sub_4B5770 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
add	eax, 10h
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4B5770 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B57B0(void *Dst, int, int)
sub_4B57B0 proc	near

MaxCount= dword	ptr -4
Dst= dword ptr	8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
mov	[ebp+MaxCount],	eax
mov	ecx, [ebp+MaxCount]
push	ecx		; MaxCount
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax		; Src
mov	ecx, [ebp+MaxCount]
push	ecx		; DstSize
mov	edx, [ebp+Dst]
push	edx		; Dst
call	_memcpy_s
add	esp, 10h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, [ebp+MaxCount]
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+MaxCount]
mov	esp, ebp
pop	ebp
retn
sub_4B57B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B57F0(void *Dst, int, int)
sub_4B57F0 proc	near

MaxCount= dword	ptr -4
Dst= dword ptr	8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
shl	eax, 2
mov	[ebp+MaxCount],	eax
mov	ecx, [ebp+MaxCount]
push	ecx		; MaxCount
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax		; Src
mov	ecx, [ebp+MaxCount]
push	ecx		; DstSize
mov	edx, [ebp+Dst]
push	edx		; Dst
call	_memcpy_s
add	esp, 10h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, [ebp+MaxCount]
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+MaxCount]
mov	esp, ebp
pop	ebp
retn
sub_4B57F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B5830(void *Dst, int, int)
sub_4B5830 proc	near

MaxCount= dword	ptr -4
Dst= dword ptr	8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
imul	eax, 24h
mov	[ebp+MaxCount],	eax
mov	ecx, [ebp+MaxCount]
push	ecx		; MaxCount
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax		; Src
mov	ecx, [ebp+MaxCount]
push	ecx		; DstSize
mov	edx, [ebp+Dst]
push	edx		; Dst
call	_memcpy_s
add	esp, 10h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, [ebp+MaxCount]
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+MaxCount]
mov	esp, ebp
pop	ebp
retn
sub_4B5830 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B5870(void *Dst, int, int)
sub_4B5870 proc	near

MaxCount= dword	ptr -4
Dst= dword ptr	8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
imul	eax, 14h
mov	[ebp+MaxCount],	eax
mov	ecx, [ebp+MaxCount]
push	ecx		; MaxCount
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax		; Src
mov	ecx, [ebp+MaxCount]
push	ecx		; DstSize
mov	edx, [ebp+Dst]
push	edx		; Dst
call	_memcpy_s
add	esp, 10h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, [ebp+MaxCount]
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+MaxCount]
mov	esp, ebp
pop	ebp
retn
sub_4B5870 endp

align 10h


; Attributes: bp-based frame

sub_4B58B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	al, [ecx]
mov	[edx], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_4]
mov	[eax], edx
pop	ebp
retn
sub_4B58B0 endp

align 10h


; Attributes: bp-based frame

sub_4B58D0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
add	edx, 4
mov	eax, [ebp+arg_4]
mov	[eax], edx
pop	ebp
retn
sub_4B58D0 endp

align 10h


; Attributes: bp-based frame

sub_4B58F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
add	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
mov	[eax], edx
pop	ebp
retn
sub_4B58F0 endp

align 10h


; Attributes: bp-based frame

sub_4B5920 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B5920
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0CCh
mov	[ebp+var_C4], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_4D17C0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_C4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_C5], al
movzx	ecx, [ebp+var_C5]
test	ecx, ecx
jnz	short loc_4B5A00
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_C4]
call	sub_444510
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	[ebp+var_D0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_4C]
or	ecx, 1
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_1011870
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_4B5A00
mov	[ebp+var_D4], 0
jmp	short loc_4B5A0A

loc_4B5A00:
mov	[ebp+var_D4], 1

loc_4B5A0A:
mov	al, byte ptr [ebp+var_D4]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_4B5A34
and	[ebp+var_4C], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B5A34:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4B5B23
lea	eax, [ebp+var_3D]
mov	[ebp+var_60], eax
mov	[ebp+var_4], 2
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
push	0
mov	ecx, [ebp+var_60]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_4AC3C0
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_3C]
mov	[ebp+var_64], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_30]
call	sub_10148B0
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_64]
push	ecx
lea	ecx, [ebp+var_2C]
call	sub_4A96B0
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 5
lea	edx, [ebp+var_30]
mov	[ebp+var_78], edx
mov	byte ptr [ebp+var_4], 8
lea	eax, [ebp+var_74]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	ecx, [ebp+var_78]
push	ecx
push	ecx
mov	[ebp+var_70], esp
mov	ecx, [ebp+var_74]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C4]
call	sub_4BF360
lea	eax, [ebp+var_48]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_2C]
call	sub_4A9770
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_30]
call	sub_1014910
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_3C]
call	sub_4A9770
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B5B23:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B5920 endp

align 10h


; Attributes: bp-based frame

sub_4B5B40 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_74=	dword ptr -74h
var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B5B40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0C0h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_4B89C0
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_4B8480
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_D0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4D1710
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4B5BFC
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_1C]
push	edx		; void *
call	sub_4B7100
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 8
mov	[ebp+var_1C], eax
jmp	short loc_4B5C28

loc_4B5BFC:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_1C]
lea	eax, [edx+ecx*8]
mov	[ebp+var_64], eax
push	0
lea	ecx, [ebp+var_65]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_4CD0C0
add	esp, 14h
mov	edx, [ebp+var_64]
mov	[ebp+var_1C], edx

loc_4B5C28:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_4B5C69
xor	ecx, ecx
mov	byte ptr [ebp+var_20+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_20], dl
mov	al, byte ptr [ebp+var_20]
mov	[ebp+var_6D], al
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
mov	[ebp+var_6C], edx
push	0
lea	eax, [ebp+var_66]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D1710
add	esp, 14h
mov	[ebp+var_1C], eax

loc_4B5C69:
jmp	short loc_4B5CA5

loc_4B5C6B:
xor	ecx, ecx
mov	[ebp+var_6E], cl
mov	edx, [ebp+var_14]
mov	[ebp+var_74], edx
cmp	[ebp+var_18], 0
jz	short loc_4B5C8F
mov	eax, [ebp+var_74]
shl	eax, 3
push	eax		; int
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4B5C8F:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B5CAC
retn

loc_4B5CA5:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B5CAC:
mov	ecx, [ebp+var_D0]
call	sub_50F330
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
lea	ecx, [eax+edx*8]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_D0]
mov	ecx, [ebp+var_CC]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4B5B40 endp

align 10h


; Attributes: bp-based frame

sub_4B5D00 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_5C=	byte ptr -5Ch
var_58=	byte ptr -58h
var_40=	byte ptr -40h
var_3C=	byte ptr -3Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B5D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 9Ch
push	esi
push	edi
mov	[ebp+var_94], ecx
mov	[ebp+var_68], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_4D17C0
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_94]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_74]
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_74]
setz	al
mov	[ebp+var_95], al
movzx	ecx, [ebp+var_95]
test	ecx, ecx
jnz	short loc_4B5DE2
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_94]
call	sub_444510
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	[ebp+var_A0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_68]
or	ecx, 1
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_78], edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_1011870
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_4B5DE2
mov	[ebp+var_A4], 0
jmp	short loc_4B5DEC

loc_4B5DE2:
mov	[ebp+var_A4], 1

loc_4B5DEC:
mov	al, byte ptr [ebp+var_A4]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
and	ecx, 1
jz	short loc_4B5E16
and	[ebp+var_68], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B5E16:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4B5ED1
lea	eax, [ebp+var_58]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_10148B0
mov	[ebp+var_4], 2
lea	edi, [ebp+var_3C]
mov	ecx, 7
lea	esi, [ebp+var_5C]
rep movsd
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_40]
mov	[ebp+var_90], eax
mov	[ebp+var_4], 3
lea	ecx, [ebp+var_8C]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_90]
push	edx
push	ecx
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_88]
call	sub_4046E0
lea	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+var_94]
call	sub_4BEBC0
lea	ecx, [ebp+var_64]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_40]
call	sub_1014910

loc_4B5ED1:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4B5D00 endp

align 10h


; Attributes: bp-based frame

sub_4B5EF0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B5EF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 98h
mov	[ebp+var_90], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_90]
call	sub_4D1860
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_90]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jnz	short loc_4B5FCB
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_90]
call	sub_444490
mov	[ebp+var_98], eax
mov	eax, [ebp+var_98]
mov	[ebp+var_9C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_4B5FCB
mov	[ebp+var_A0], 0
jmp	short loc_4B5FD5

loc_4B5FCB:
mov	[ebp+var_A0], 1

loc_4B5FD5:
mov	cl, byte ptr [ebp+var_A0]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 1
jz	short loc_4B5FF9
and	[ebp+var_58], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_4B5FF9:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4B60B5
mov	[ebp+var_4C], 0
mov	[ebp+var_48], 0
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_44]
call	sub_403850
mov	[ebp+var_4], 1
mov	edx, [ebp+var_4C]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_48]
mov	[ebp+var_28], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 2
lea	edx, [ebp+var_88]
mov	[ebp+var_7C], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_7C]
call	sub_4046E0
mov	eax, [ebp+var_8C]
push	eax
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_90]
call	sub_4BFAA0
lea	edx, [ebp+var_54]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_407910

loc_4B60B5:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B5EF0 endp

align 10h


; Attributes: bp-based frame

sub_4B60D0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B60D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_4B94B0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_4B6149
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4B60D0
mov	edx, [ebp+var_14]
mov	[edx+0Ch], eax

loc_4B6149:
mov	eax, [ebp+var_14]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_4B6158:
cmp	[ebp+arg_0], 0
jz	short loc_4B61C5
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_4B94B0
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_4B61B4
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4B60D0
mov	ecx, [ebp+var_18]
mov	[ecx+0Ch], eax

loc_4B61B4:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_4B6158

loc_4B61C5:
jmp	short loc_4B61E9

loc_4B61C7:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_24]
call	sub_4B6210
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B61F0
retn

loc_4B61E9:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B61F0:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_4B60D0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4B6210(void	*)
sub_4B6210 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_4B6219:
cmp	[ebp+arg_0], 0
jz	short loc_4B6269
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_4B6210
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4C5D70
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4B6261
mov	edx, 1
imul	edx, 4Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B6261:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4B6219

loc_4B6269:
mov	esp, ebp
pop	ebp
retn	4
sub_4B6210 endp

align 10h


; Attributes: bp-based frame

sub_4B6270 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_4B6347
mov	ecx, [ebp+var_14]
call	sub_4ABBD0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4B62D0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_4B6347

loc_4B62D0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4B60D0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_4B62F8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_4B630C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_4B62F8

loc_4B630C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_4B631E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4B6332
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_4B631E

loc_4B6332:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_4B6347:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4B6270 endp



; Attributes: bp-based frame

; int __stdcall	sub_4B6350(void	*)
sub_4B6350 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_4B6359:
cmp	[ebp+arg_0], 0
jz	short loc_4B63A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_4B6350
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4C6510
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4B63A1
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B63A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4B6359

loc_4B63A9:
mov	esp, ebp
pop	ebp
retn	4
sub_4B6350 endp

align 10h


; Attributes: bp-based frame

sub_4B63B0 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_78=	dword ptr -78h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B63B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0B4h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_5A87A0
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_4B8B10
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_C4]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4D1900
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4B646C
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_1C]
push	edx		; void *
call	sub_4B7190
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 34h
mov	[ebp+var_1C], eax
jmp	short loc_4B6498

loc_4B646C:
mov	ecx, [ebp+arg_C]
imul	ecx, 34h
add	ecx, [ebp+var_1C]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_4CD8C0
add	esp, 14h
mov	eax, [ebp+var_64]
mov	[ebp+var_1C], eax

loc_4B6498:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_4B64D9
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_C4]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_66]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4D1900
add	esp, 14h
mov	[ebp+var_1C], eax

loc_4B64D9:
jmp	short loc_4B6522

loc_4B64DB:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_4CD970
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_78], ecx
cmp	[ebp+var_18], 0
jz	short loc_4B650C
mov	edx, [ebp+var_78]
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B650C:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B6529
retn

loc_4B6522:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B6529:
mov	ecx, [ebp+var_C4]
call	sub_4B8A90
mov	ecx, [ebp+var_14]
imul	ecx, 34h
add	ecx, [ebp+var_18]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+var_C4]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [ebp+var_C0]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4B63B0 endp

align 10h


; Attributes: bp-based frame

sub_4B6580 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_90=	dword ptr -90h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B6580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0CCh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_DC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_470590
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_DC]
add	ecx, 8
call	sub_4B8C30
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_DC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_4D19C0
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4B663C
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_4B7290
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 1Ch
mov	[ebp+var_1C], eax
jmp	short loc_4B6668

loc_4B663C:
mov	ecx, [ebp+arg_C]
imul	ecx, 1Ch
add	ecx, [ebp+var_1C]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_4CD9C0
add	esp, 14h
mov	eax, [ebp+var_64]
mov	[ebp+var_1C], eax

loc_4B6668:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_4B66A9
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_DC]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_66]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4D19C0
add	esp, 14h
mov	[ebp+var_1C], eax

loc_4B66A9:
jmp	short loc_4B66F8

loc_4B66AB:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_4CDA90
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_90], ecx
cmp	[ebp+var_18], 0
jz	short loc_4B66E2
mov	edx, [ebp+var_90]
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B66E2:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B66FF
retn

loc_4B66F8:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B66FF:
mov	ecx, [ebp+var_DC]
call	sub_4B8B90
mov	ecx, [ebp+var_14]
imul	ecx, 1Ch
add	ecx, [ebp+var_18]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_D8]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4B6580 endp

align 10h


; Attributes: bp-based frame

sub_4B6760 proc	near

var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_94=	byte ptr -94h
var_8C=	byte ptr -8Ch
var_74=	byte ptr -74h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B6760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E0h
mov	[ebp+var_D4], ecx
mov	[ebp+var_A0], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_49D400
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_D4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_AC]
mov	[ebp+var_A8], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_A8]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_AC]
setz	al
mov	[ebp+var_D5], al
movzx	ecx, [ebp+var_D5]
test	ecx, ecx
jnz	short loc_4B685F
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_D4]
call	sub_444510
mov	[ebp+var_DC], eax
mov	eax, [ebp+var_DC]
mov	[ebp+var_E0], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_A0]
or	ecx, 1
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_B0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_B0]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4B685F
mov	[ebp+var_E4], 0
jmp	short loc_4B6869

loc_4B685F:
mov	[ebp+var_E4], 1

loc_4B6869:
mov	dl, byte ptr [ebp+var_E4]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_A0]
and	eax, 1
jz	short loc_4B6899
and	[ebp+var_A0], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B6899:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4B69FD
lea	ecx, [ebp+var_94]
call	sub_1021C90
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	[ebp+var_B8], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
lea	edx, [ebp+var_58]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_B8]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_B4]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_B8]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_B4]
add	ecx, 8
call	sub_403850
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_B8]
add	edx, 20h
push	edx
mov	ecx, [ebp+var_B4]
add	ecx, 20h
call	sub_403850
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 2
lea	eax, [ebp+var_5C]
mov	[ebp+var_CC], eax
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_C8]
mov	[ebp+var_BC], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_BC]
call	sub_4046E0
mov	edx, [ebp+var_CC]
push	edx
push	ecx
mov	[ebp+var_C4], esp
mov	ecx, [ebp+var_C8]
mov	eax, [ebp+var_C4]
call	sub_4046E0
lea	eax, [ebp+var_9C]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_4C5650
lea	ecx, [ebp+var_9C]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_EC]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_58]
mov	[ebp+var_D0], ecx
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+var_D0]
add	ecx, 20h
call	sub_407910
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_407910
mov	[ebp+var_4], 0Bh
mov	byte ptr [ebp+var_4], 0Ah
lea	ecx, [ebp+var_74]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_8C]
call	sub_407910

loc_4B69FD:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B6760 endp

align 10h


; Attributes: bp-based frame

sub_4B6A20 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B6A20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_80], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_80]
call	sub_4D1AA0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_80]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_81], al
movzx	ecx, [ebp+var_81]
test	ecx, ecx
jnz	short loc_4B6AF2
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
lea	eax, [ebp+var_28]
call	sub_4078F0
mov	eax, [ebp+var_80]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
lea	edx, [ebp+var_1D]
mov	[ebp+var_88], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_4C]
or	eax, 1
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_28]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4B6AF2
mov	[ebp+var_8C], 0
jmp	short loc_4B6AFC

loc_4B6AF2:
mov	[ebp+var_8C], 1

loc_4B6AFC:
mov	al, byte ptr [ebp+var_8C]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_4B6B18
and	[ebp+var_4C], 0FFFFFFFEh

loc_4B6B18:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4B6C00
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
lea	eax, [ebp+var_40]
call	sub_4078F0
mov	[ebp+var_38], 0
cmp	[ebp+var_38], 0
jz	short loc_4B6B46
mov	ecx, [ebp+var_38]
call	sub_40AA80

loc_4B6B46:
lea	ecx, [ebp+var_38]
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_3C]
mov	[ebp+var_34], edx
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_2C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_60]
cmp	dword ptr [edx], 0
jz	short loc_4B6B81
mov	eax, [ebp+var_60]
mov	ecx, [eax]
call	sub_40AA80

loc_4B6B81:
lea	ecx, [ebp+var_34]
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_74]
mov	[ebp+var_68], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	eax, [ebp+var_78]
push	eax
push	ecx
mov	[ebp+var_70], esp
mov	ecx, [ebp+var_74]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_80]
call	sub_492230
lea	edx, [ebp+var_48]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 1
lea	edx, [ebp+var_2C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
cmp	dword ptr [eax], 0
jz	short loc_4B6BEB
mov	ecx, [ebp+var_7C]
mov	ecx, [ecx]
call	sub_40AA90

loc_4B6BEB:
mov	[ebp+var_4], 0FFFFFFFFh
cmp	[ebp+var_38], 0
jz	short loc_4B6C00
mov	ecx, [ebp+var_38]
call	sub_40AA90

loc_4B6C00:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B6A20 endp

align 10h


; Attributes: bp-based frame

sub_4B6C20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	esp, ebp
pop	ebp
retn
sub_4B6C20 endp

align 10h


; Attributes: bp-based frame

sub_4B6C50 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B6C50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
push	eax
call	sub_4B6C20
add	esp, 4
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_10], edx
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+arg_4]
add	eax, [ecx]
mov	edx, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_12]
call	sub_401EF0
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_4079A0
mov	byte ptr [ebp+var_4], 2
movzx	edx, [ebp+var_11]
add	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_407CA0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_18]
or	ecx, 1
mov	[ebp+var_18], ecx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_12]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B6C50 endp

align 10h


; Attributes: bp-based frame

sub_4B6D00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
add	eax, 8
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+arg_0]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4B6D00 endp



; Attributes: bp-based frame

sub_4B6D30 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7A=	byte ptr -7Ah
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B6D30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B0h
mov	[ebp+var_A0], ecx
mov	[ebp+var_68], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4D1B10
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_A0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_74]
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_74]
setz	al
mov	[ebp+var_A1], al
movzx	ecx, [ebp+var_A1]
test	ecx, ecx
jnz	short loc_4B6E14
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_444510
mov	[ebp+var_A8], eax
mov	edx, [ebp+var_A8]
mov	[ebp+var_AC], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_68]
or	eax, 1
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_24]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jnz	short loc_4B6E14
mov	[ebp+var_B0], 0
jmp	short loc_4B6E1E

loc_4B6E14:
mov	[ebp+var_B0], 1

loc_4B6E1E:
mov	al, byte ptr [ebp+var_B0]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
and	ecx, 1
jz	short loc_4B6E48
and	[ebp+var_68], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B6E48:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4B6FC3
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
lea	edx, [ebp+var_79]
mov	[ebp+var_B4], edx
mov	[ebp+var_4], 2
lea	eax, [ebp+var_7A]
mov	[ebp+var_B8], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_B4]
push	ecx
mov	edx, [ebp+var_B8]
push	edx
lea	ecx, [ebp+var_58]
call	sub_4AB340
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 7
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_58]
mov	[ebp+var_84], eax
mov	[ebp+var_4], 9
mov	ecx, [ebp+var_5C]
mov	[ebp+var_40], ecx
lea	edx, [ebp+var_3C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_80]
call	sub_4ABA70
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 0Bh
mov	byte ptr [ebp+var_4], 0Ch
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_40]
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 0Dh
lea	edx, [ebp+var_94]
mov	[ebp+var_88], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_88]
call	sub_4046E0
mov	eax, [ebp+var_98]
push	eax
push	ecx
mov	[ebp+var_90], esp
mov	ecx, [ebp+var_94]
mov	eax, [ebp+var_90]
call	sub_4046E0
lea	ecx, [ebp+var_64]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4C5DF0
lea	edx, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 9
lea	edx, [ebp+var_3C]
mov	[ebp+var_9C], edx
mov	byte ptr [ebp+var_4], 0Fh
mov	byte ptr [ebp+var_4], 10h
mov	byte ptr [ebp+var_4], 12h
mov	ecx, [ebp+var_9C]
call	sub_4ABBD0
mov	byte ptr [ebp+var_4], 13h
mov	byte ptr [ebp+var_4], 11h
mov	byte ptr [ebp+var_4], 14h
mov	byte ptr [ebp+var_4], 15h
mov	byte ptr [ebp+var_4], 9
mov	[ebp+var_4], 16h
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 19h
lea	ecx, [ebp+var_58]
call	sub_4ABBD0
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 1Ch
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B6FC3:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B6D30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B6FE0(void *, int)
sub_4B6FE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4B7025
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4B702C

loc_4B7025:
mov	[ebp+var_C], 0

loc_4B702C:
mov	esp, ebp
pop	ebp
retn
sub_4B6FE0 endp



; Attributes: bp-based frame

sub_4B7030 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4C65B0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4B7030 endp

align 10h


; Attributes: bp-based frame

sub_4B7060 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4C65F0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4B7060 endp

align 10h


; Attributes: bp-based frame

sub_4B7090 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 10h
push	0
push	0
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4C6630
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_4B7090 endp

align 10h


; Attributes: bp-based frame

sub_4B70C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax-4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx-4], ecx
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 4
sub	ecx, [ebp+arg_0]
sar	ecx, 2
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_4D1BC0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_4B70C0 endp



; Attributes: bp-based frame

; int __cdecl sub_4B7100(void *, int)
sub_4B7100 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4B716A
mov	eax, [ebp+var_18]
call	sub_401740
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_18]
call	sub_402700
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
jmp	short loc_4B7171

loc_4B716A:
mov	[ebp+var_1C], 0

loc_4B7171:
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7100 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7190(void *, int)
sub_4B7190 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	34h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	loc_4B7265
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_4]
add	eax, 0Ch
mov	ecx, [ebp+var_18]
add	ecx, 0Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_4]
add	ecx, 18h
mov	edx, [ebp+var_18]
add	edx, 18h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_18]
add	edx, 24h
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+24h]
mov	edx, [eax+28h]
mov	eax, [ebp+var_1C]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+2Ch]
mov	eax, [ecx+30h]
mov	ecx, [ebp+var_18]
mov	[ecx+2Ch], edx
mov	[ecx+30h], eax
mov	edx, [ebp+var_18]
mov	[ebp+var_20], edx
jmp	short loc_4B726C

loc_4B7265:
mov	[ebp+var_20], 0

loc_4B726C:
mov	eax, [ebp+var_20]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7190 endp

align 10h


; Attributes: bp-based frame

sub_4B7290 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_4C66D0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4B7290 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B72D0(void *)
sub_4B72D0 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B72D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_4B7317
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B7317:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B72D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7330(void *)
sub_4B7330 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7330
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_4A6040
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_4B7388
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B7388:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7330 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B73A0(void *)
sub_4B73A0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B73A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 4
call	sub_40ABB0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	edx, edx
and	edx, 1
jz	short loc_4B7409
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B7409:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B73A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7420(void *)
sub_4B7420 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_488 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	edx, edx
and	edx, 1
jz	short loc_4B7489
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B7489:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7420 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B74A0(void *)
sub_4B74A0 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B74A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_4A9770
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_1014910
xor	ecx, ecx
and	ecx, 1
jz	short loc_4B74F8
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B74F8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B74A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7510(void *)
sub_4B7510 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_436170
xor	ecx, ecx
and	ecx, 1
jz	short loc_4B755C
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B755C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7510 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7570(void *, int)
sub_4B7570 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4B75F7
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_1C]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[ebp+var_20], ecx
jmp	short loc_4B75FE

loc_4B75F7:
mov	[ebp+var_20], 0

loc_4B75FE:
mov	edx, [ebp+var_20]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7570 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7620(void *)
sub_4B7620 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7620
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_5D2630
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_4B768E
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B768E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7620 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B76A0(void *, int)
sub_4B76A0 proc	near

var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_7], cl
mov	dl, [ebp+var_7]
mov	byte ptr [ebp+var_6+1],	dl
xor	eax, eax
mov	[ebp+var_8], al
mov	cl, [ebp+var_8]
mov	byte ptr [ebp+var_6], cl
mov	edx, [ebp+arg_4]
shl	edx, 1
push	edx		; size_t
push	0		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*2]
mov	esp, ebp
pop	ebp
retn
sub_4B76A0 endp

align 10h


; Attributes: bp-based frame

sub_4B7700 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_4B771C

loc_4B7713:
mov	edx, [ebp+var_8]
add	edx, 18h
mov	[ebp+var_8], edx

loc_4B771C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_4B7733
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_63CCE0
jmp	short loc_4B7713

loc_4B7733:
mov	esp, ebp
pop	ebp
retn
sub_4B7700 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7740(void *)
sub_4B7740 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_4B7766
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B7766:
mov	esp, ebp
pop	ebp
retn
sub_4B7740 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7770(void *, int)
sub_4B7770 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4B77F3
mov	edx, [ebp+arg_4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_18]
call	sub_4C7510
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_44], ecx
jmp	short loc_4B77FA

loc_4B77F3:
mov	[ebp+var_44], 0

loc_4B77FA:
mov	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7770 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4B7820(void *)
sub_4B7820 proc	near

var_34=	dword ptr -34h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7820
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_34]
call	sub_4B84F0
xor	edx, edx
and	edx, 1
jz	short loc_4B7880
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4B7880:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7820 endp

align 10h


; Attributes: bp-based frame

sub_4B7890 proc	near

var_30=	dword ptr -30h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7890
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_30]
call	sub_4B84F0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7890 endp

align 10h


; Attributes: bp-based frame

sub_4B78E0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B78E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
add	eax, 8
mov	[ebp+var_30], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_30]
call	sub_4B84F0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B78E0 endp

align 10h


; Attributes: bp-based frame

sub_4B7940 proc	near

var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7940
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
add	ecx, 8
call	sub_436170
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7940 endp

align 10h


; Attributes: bp-based frame

sub_4B7990 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_10]
call	sub_46B570
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7990 endp

align 10h


; Attributes: bp-based frame

sub_4B7A00 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7A00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_18]
add	ecx, 18h
call	sub_4A6040
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7A00 endp

align 10h


; Attributes: bp-based frame

sub_4B7A60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7A60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7A60 endp



; Attributes: bp-based frame

sub_4B7AA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_482 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 4
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7AA0 endp

align 10h


; Attributes: bp-based frame

sub_4B7B10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7B10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_10]
add	eax, 4
call	sub_40ABB0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7B10 endp

align 10h


; Attributes: bp-based frame

sub_4B7B80 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_486 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 18h
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_4B7BD5
mov	eax, [ebp+var_10]
mov	ecx, [eax]
call	sub_40AA90

loc_4B7BD5:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7B80 endp

align 10h


; Attributes: bp-based frame

sub_4B7C00 proc	near

var_64=	dword ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7C00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_64]
add	ecx, 4
call	sub_4A9770
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_64]
call	sub_1014910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7C00 endp

align 10h


; Attributes: bp-based frame

sub_4B7C60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7C60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_1014910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7C60 endp



; Attributes: bp-based frame

sub_4B7CA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7CA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7CA0 endp

align 10h


; Attributes: bp-based frame

sub_4B7D10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B7D10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_4ABBD0
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 6
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B7D10 endp

align 10h


; Attributes: bp-based frame

sub_4B7D90 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_442EC0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4B7E03
mov	ecx, [ebp+var_54]
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B7E03:
mov	esp, ebp
pop	ebp
retn
sub_4B7D90 endp

align 10h


; Attributes: bp-based frame

sub_4B7E10 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4C6C30
add	esp, 8
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_78]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_74], eax
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ebp+var_70], eax
cmp	[ebp+var_70], 0
jz	short loc_4B7E83
mov	ecx, [ebp+var_74]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_70]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B7E83:
mov	esp, ebp
pop	ebp
retn
sub_4B7E10 endp

align 10h


; Attributes: bp-based frame

sub_4B7E90 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 5555555h
jbe	short loc_4B7EBD
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B7EBD:
cmp	[ebp+arg_0], 0
jz	short loc_4B7EF4
mov	edx, [ebp+arg_0]
imul	edx, 30h
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 30h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B7EFB

loc_4B7EF4:
mov	[ebp+var_1C], 0

loc_4B7EFB:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B7E90 endp

align 10h


; Attributes: bp-based frame

sub_4B7F10 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 0CCCCCCCh
mov	[ebp+var_10], 0CCCCCCCh
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_4B7F4D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_4B7F53

loc_4B7F4D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_4B7F53:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_4B7F66
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_4B7F66:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 0CCCCCCCh
mov	[ebp+var_1C], 0CCCCCCCh
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_4B7F9C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_4B7FA2

loc_4B7F9C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_4B7FA2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_4B7FB2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_4B7FDC

loc_4B7FB2:
mov	[ebp+var_20], 0CCCCCCCh
mov	[ebp+var_24], 0CCCCCCCh
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_4B7FD0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_4B7FD6

loc_4B7FD0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_4B7FD6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_4B7FDC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4B7F10 endp

align 10h


; Attributes: bp-based frame

sub_4B7FF0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4B8063
mov	ecx, [ebp+var_54]
imul	ecx, 14h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B8063:
mov	esp, ebp
pop	ebp
retn
sub_4B7FF0 endp

align 10h


; Attributes: bp-based frame

sub_4B8070 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 0CCCCCCCh
jbe	short loc_4B809D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B809D:
cmp	[ebp+arg_0], 0
jz	short loc_4B80D4
mov	edx, [ebp+arg_0]
imul	edx, 14h
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 14h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B80DB

loc_4B80D4:
mov	[ebp+var_1C], 0

loc_4B80DB:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8070 endp

align 10h


; Attributes: bp-based frame

sub_4B80F0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD2C0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4B815C
mov	ecx, [ebp+var_54]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B815C:
mov	esp, ebp
pop	ebp
retn
sub_4B80F0 endp



; Attributes: bp-based frame

sub_4B8160 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4B8F90
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B8160 endp

align 10h


; Attributes: bp-based frame

sub_4B81C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [eax+10h]
cmp	edx, [ecx+14h]
jz	short loc_4B81F6
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
sub	ecx, 4
mov	edx, [ebp+var_14]
mov	[edx+10h], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
xor	edx, edx
mov	[ebp+var_1], dl
jmp	short loc_4B820C

loc_4B81F6:
mov	ecx, [ebp+var_14]
call	sub_4C1140
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	[ebp+var_9], dl

loc_4B820C:
mov	esp, ebp
pop	ebp
retn
sub_4B81C0 endp



; Attributes: bp-based frame

sub_4B8210 proc	near

var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_30]
mov	edx, [eax]
sub	edx, [ecx+4]
sar	edx, 2
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jbe	short loc_4B8241
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4C11D0

loc_4B8241:
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [edx+4]
mov	[ebp+var_10], ecx
mov	eax, [edx+8]
mov	[ebp+var_C], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
neg	edx
push	edx
lea	ecx, [ebp+var_14]
call	sub_4AC610
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[eax+4], edx
mov	ecx, [ebp+var_C]
mov	[eax+8], ecx
mov	edx, [ebp+var_8]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8210 endp

align 10h


; Attributes: bp-based frame

sub_4B8290 proc	near

var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_30]
mov	edx, [eax+18h]
sub	edx, [ecx+10h]
sar	edx, 2
sub	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jbe	short loc_4B82C5
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4C1300

loc_4B82C5:
mov	edx, [ebp+var_30]
add	edx, 10h
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [edx+4]
mov	[ebp+var_10], ecx
mov	eax, [edx+8]
mov	[ebp+var_C], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_14]
call	sub_4AC610
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[eax+4], edx
mov	ecx, [ebp+var_C]
mov	[eax+8], ecx
mov	edx, [ebp+var_8]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8290 endp

align 10h


; Attributes: bp-based frame

sub_4B8320 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_4B8329:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4B8380
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4A8810
jmp	short loc_4B8329

loc_4B8380:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B8320 endp

align 10h


; Attributes: bp-based frame

sub_4B83A0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4B7060
add	esp, 8
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_54]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 5
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_4B840C
mov	ecx, [ebp+var_50]
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B840C:
mov	esp, ebp
pop	ebp
retn
sub_4B83A0 endp



; Attributes: bp-based frame

sub_4B8410 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 7FFFFFFh
jbe	short loc_4B843D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B843D:
cmp	[ebp+arg_0], 0
jz	short loc_4B846E
mov	edx, [ebp+arg_0]
shl	edx, 5
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
shr	ecx, 5
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B8475

loc_4B846E:
mov	[ebp+var_1C], 0

loc_4B8475:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8410 endp

align 10h


; Attributes: bp-based frame

sub_4B8480 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 1FFFFFFFh
jbe	short loc_4B84AD
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B84AD:
cmp	[ebp+arg_0], 0
jz	short loc_4B84DE
mov	edx, [ebp+arg_0]
shl	edx, 3
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
shr	ecx, 3
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B84E5

loc_4B84DE:
mov	[ebp+var_1C], 0

loc_4B84E5:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8480 endp

align 10h


; Attributes: bp-based frame

sub_4B84F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B84F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_30]
call	sub_4C4B70
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_402DB0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_30]
add	eax, 4
mov	[ebp+var_2C], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
push	0
mov	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_506A50
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B84F0 endp

align 10h


; Attributes: bp-based frame

sub_4B8580 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_28], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_2C], eax
mov	eax, [ebp+var_2C]
mov	[ebp+var_30], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	ecx, [ebp+var_28]
add	ecx, 18h
call	sub_45BBA0
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B8580 endp

align 10h


; Attributes: bp-based frame

sub_4B8600 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8600
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_2C]
add	ecx, 18h
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+arg_4]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_28]
mov	eax, [ebp+arg_4]
mov	cl, [eax+1]
mov	[edx+1], cl
mov	edx, [ebp+var_28]
mov	eax, [ebp+arg_4]
mov	cl, [eax+2]
mov	[edx+2], cl
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_28]
add	ecx, 4
call	sub_4B8CB0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4B8600 endp



; Attributes: bp-based frame

sub_4B8690 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8690
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_46B570
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B8690 endp

align 10h


; Attributes: bp-based frame

sub_4B86E0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4B8753
mov	ecx, [ebp+var_54]
imul	ecx, 64h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B8753:
mov	esp, ebp
pop	ebp
retn
sub_4B86E0 endp

align 10h


; Attributes: bp-based frame

sub_4B8760 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 28F5C28h
jbe	short loc_4B878D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B878D:
cmp	[ebp+arg_0], 0
jz	short loc_4B87C4
mov	edx, [ebp+arg_0]
imul	edx, 64h
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 64h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B87CB

loc_4B87C4:
mov	[ebp+var_1C], 0

loc_4B87CB:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8760 endp

align 10h


; Attributes: bp-based frame

sub_4B87E0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 71C71C7h
mov	[ebp+var_10], 71C71C7h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_4B881D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_4B8823

loc_4B881D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_4B8823:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_4B8836
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_4B8836:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 71C71C7h
mov	[ebp+var_1C], 71C71C7h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_4B886C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_4B8872

loc_4B886C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_4B8872:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_4B8882
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_4B88AC

loc_4B8882:
mov	[ebp+var_20], 71C71C7h
mov	[ebp+var_24], 71C71C7h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_4B88A0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_4B88A6

loc_4B88A0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_4B88A6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_4B88AC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4B87E0 endp

align 10h


; Attributes: bp-based frame

sub_4B88C0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4B8933
mov	ecx, [ebp+var_54]
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B8933:
mov	esp, ebp
pop	ebp
retn
sub_4B88C0 endp

align 10h


; Attributes: bp-based frame

sub_4B8940 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 71C71C7h
jbe	short loc_4B896D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B896D:
cmp	[ebp+arg_0], 0
jz	short loc_4B89A4
mov	edx, [ebp+arg_0]
imul	edx, 24h
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 24h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B89AB

loc_4B89A4:
mov	[ebp+var_1C], 0

loc_4B89AB:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8940 endp

align 10h


; Attributes: bp-based frame

sub_4B89C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_8], edx
mov	[ebp+var_C], 1FFFFFFFh
mov	[ebp+var_10], 1FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_4B89F8
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_4B89FE

loc_4B89F8:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_4B89FE:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_4B8A11
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_4B8A11:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 1FFFFFFFh
mov	[ebp+var_1C], 1FFFFFFFh
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_4B8A47
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_4B8A4D

loc_4B8A47:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_4B8A4D:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_4B8A5D
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_4B8A87

loc_4B8A5D:
mov	[ebp+var_20], 1FFFFFFFh
mov	[ebp+var_24], 1FFFFFFFh
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_4B8A7B
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_4B8A81

loc_4B8A7B:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_4B8A81:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_4B8A87:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4B89C0 endp



; Attributes: bp-based frame

sub_4B8A90 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4C6C60
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4B8B03
mov	ecx, [ebp+var_54]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B8B03:
mov	esp, ebp
pop	ebp
retn
sub_4B8A90 endp

align 10h


; Attributes: bp-based frame

sub_4B8B10 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 4EC4EC4h
jbe	short loc_4B8B3D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B8B3D:
cmp	[ebp+arg_0], 0
jz	short loc_4B8B74
mov	edx, [ebp+arg_0]
imul	edx, 34h
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 34h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B8B7B

loc_4B8B74:
mov	[ebp+var_1C], 0

loc_4B8B7B:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8B10 endp

align 10h


; Attributes: bp-based frame

sub_4B8B90 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4C6C90
add	esp, 8
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_A4], eax
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_A0], eax
cmp	[ebp+var_A0], 0
jz	short loc_4B8C27
mov	ecx, [ebp+var_A4]
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_A0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4B8C27:
mov	esp, ebp
pop	ebp
retn
sub_4B8B90 endp

align 10h


; Attributes: bp-based frame

sub_4B8C30 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 9249249h
jbe	short loc_4B8C5D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B8C5D:
cmp	[ebp+arg_0], 0
jz	short loc_4B8C94
mov	edx, [ebp+arg_0]
imul	edx, 1Ch
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 1Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4B8C9B

loc_4B8C94:
mov	[ebp+var_1C], 0

loc_4B8C9B:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4B8C30 endp

align 10h


; Attributes: bp-based frame

sub_4B8CB0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8CB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4B95C0
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_4FFDB0
push	eax
mov	ecx, [ebp+var_28]
call	??1strstreambuf@@UAE@XZ_11 ; strstreambuf::~strstreambuf(void)
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_D]
call	nullsub_1
xor	eax, eax
mov	[ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	[ebp+var_20], eax
push	0
lea	edx, [ebp+var_19]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_20]
push	edx
call	sub_4C7B50
add	esp, 14h
mov	ecx, [ebp+var_28]
mov	[ecx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B8CB0 endp

align 10h


; Attributes: bp-based frame

sub_4B8D70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B95C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
mov	cl, [eax+14h]
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B8D70 endp

align 10h


; Attributes: bp-based frame

sub_4B8DD0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
jmp	short loc_4B8DE4

loc_4B8DDB:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_4B8DE4:
cmp	[ebp+arg_4], 0
jbe	short loc_4B8E48
lea	ecx, [ebp+var_1C]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_20]
call	sub_4AC120
mov	[ebp+var_18], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	[eax+4], ecx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	short loc_4B8DDB

loc_4B8E48:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B8DD0 endp

align 10h


; Attributes: bp-based frame

sub_4B8E50 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jb	short loc_4B8E9B
mov	edx, [ebp+var_90]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+4]
jnb	short loc_4B8E9B
mov	[ebp+var_94], 1
jmp	short loc_4B8EA5

loc_4B8E9B:
mov	[ebp+var_94], 0

loc_4B8EA5:
movzx	ecx, byte ptr [ebp+var_94]
test	ecx, ecx
jz	short loc_4B8EF9
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_44D270
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_19], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_19]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
call	sub_4BE850
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_436CF0
jmp	short loc_4B8F1E

loc_4B8EF9:
xor	eax, eax
mov	[ebp+var_1A], al
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_1A]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
call	sub_4BE850

loc_4B8F1E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4B8E50 endp

align 10h


; Attributes: bp-based frame

sub_4B8F30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
mov	cl, [eax+14h]
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B8F30 endp

align 10h


; Attributes: bp-based frame

sub_4B8F90 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+var_14]
mov	cl, [eax+14h]
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B8F90 endp

align 10h


; Attributes: bp-based frame

sub_4B8FF0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B8FF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	[ebp+var_4C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_44]
call	sub_4B96B0
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_44]
mov	[edx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B8FF0 endp

align 10h


; Attributes: bp-based frame

sub_4B90B0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
jmp	short loc_4B90C4

loc_4B90BB:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_4B90C4:
cmp	[ebp+arg_4], 0
jbe	short loc_4B9128
lea	ecx, [ebp+var_1C]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_20]
call	sub_4AB540
mov	[ebp+var_18], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	[eax+4], ecx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	short loc_4B90BB

loc_4B9128:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B90B0 endp

align 10h


; Attributes: bp-based frame

sub_4B9130 proc	near

var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_2C]
add	eax, 4
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_14]
mov	[ebp+var_1C], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 7
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_403050
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_2C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_640690
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4B9130 endp

align 10h


; Attributes: bp-based frame

sub_4B91F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B91F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4B9750
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_2C], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_24]
add	edx, 4
mov	[ebp+var_20], edx
xor	eax, eax
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_14]
mov	[ebp+var_1C], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], 0
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 8
lea	edx, [ebp+var_F]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_4B9750
mov	[ebp+var_30], eax
mov	eax, [ebp+var_30]
mov	[ebp+var_34], eax
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 0Ah
lea	ecx, [ebp+var_E]
push	ecx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_403050
mov	byte ptr [ebp+var_4], 0Ch
lea	ecx, [ebp+var_E]
call	nullsub_1
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_24]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_24]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+18h], xmm0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4C4C00
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B91F0 endp

align 10h


; Attributes: bp-based frame

sub_4B92F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B92F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_10]
call	sub_506A50
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B92F0 endp

align 10h


; Attributes: bp-based frame

sub_4B9350 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_48=	dword ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_78], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	[ebp+var_80], ecx
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_24], edx
mov	[ebp+var_20], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_24]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_2C], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_78]
mov	[edx], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ecx+4], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+var_6C]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	eax, [ebp+var_14]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_70], ecx
xor	edx, edx
mov	[ebp+var_3D], dl
lea	eax, [ebp+var_3D]
push	eax
mov	ecx, [ebp+var_74]
push	ecx
mov	edx, [ebp+var_70]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_4CE160
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B9350 endp

align 10h


; Attributes: bp-based frame

sub_4B9460 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
call	sub_46B570
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B9460 endp

align 10h


; Attributes: bp-based frame

sub_4B94B0 proc	near

var_44=	dword ptr -44h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B94B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 34h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_44], ecx
push	1
mov	ecx, [ebp+var_44]
call	sub_4B9900
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4C6CC0
add	esp, 8
jmp	short loc_4B952F

loc_4B94FE:
cmp	[ebp+var_14], 0
jz	short loc_4B9519
mov	edx, 1
imul	edx, 4Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B9519:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B9536
retn

loc_4B952F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B9536:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4B94B0 endp



; Attributes: bp-based frame

sub_4B9560 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
cmp	[ebp+arg_0], 3FFFFFFFh
jbe	short loc_4B9588
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B9588:
cmp	[ebp+arg_0], 0
jz	short loc_4B95B6
mov	ecx, [ebp+arg_0]
shl	ecx, 2
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
shr	eax, 2
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	eax, [ebp+var_8]
jmp	short loc_4B95B8

loc_4B95B6:
xor	eax, eax

loc_4B95B8:
mov	esp, ebp
pop	ebp
retn	8
sub_4B9560 endp

align 10h


; Attributes: bp-based frame

sub_4B95C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B95C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
or	eax, 1
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B95C0 endp

align 10h
; [0000009F BYTES: COLLAPSED FUNCTION strstreambuf::~strstreambuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4B96B0 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C77D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_44D330
mov	ecx, [ebp+var_30]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_30]
mov	[eax+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4B96B0 endp

align 10h


; Attributes: bp-based frame

sub_4B9750 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4B9960
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B9750 endp

align 10h


; Attributes: bp-based frame

sub_4B97B0 proc	near

var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B97B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_38], ecx
push	1
mov	ecx, [ebp+var_38]
call	sub_430E40
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx		; void *
call	sub_5A74B0
add	esp, 8
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
jmp	short loc_4B9838

loc_4B9807:
cmp	[ebp+var_14], 0
jz	short loc_4B9822
mov	eax, 1
imul	eax, 18h
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4B9822:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B983F
retn

loc_4B9838:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B983F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4B97B0 endp

align 10h


; Attributes: bp-based frame

sub_4B9860 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_438F60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_10]
call	sub_506A50
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B9860 endp

align 10h


; Attributes: bp-based frame

sub_4B98B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B98B0 endp

align 10h


; Attributes: bp-based frame

sub_4B9900 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 35E50D7h
jbe	short loc_4B9928
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4B9928:
cmp	[ebp+arg_0], 0
jz	short loc_4B994E
mov	ecx, [ebp+arg_0]
imul	ecx, 4Ch
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_4B9955

loc_4B994E:
mov	[ebp+var_18], 0

loc_4B9955:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4B9900 endp

align 10h


; Attributes: bp-based frame

sub_4B9960 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4AC4F0
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B9960 endp

align 10h


; Attributes: bp-based frame

sub_4B99C0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B99C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
xor	eax, eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
mov	[ebp+var_18], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4B99C0 endp

align 10h


; Attributes: bp-based frame

sub_4B9A30 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9A30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_4], 0
movzx	eax, [ebp+arg_10]
push	eax
lea	ecx, [ebp+var_11]
push	ecx
lea	edx, [ebp+var_12]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4C78D0
add	esp, 1Ch
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4B9A30 endp

align 10h


; Attributes: bp-based frame

sub_4B9AA0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_31=	word ptr -31h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_44]
add	ecx, 14h
call	sub_444240
mov	[ebp+var_4], eax
mov	edx, [ebp+var_44]
mov	eax, [edx+10h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+14h]
mov	[ebp+var_2C], edx
push	0
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_451F70
add	esp, 14h
mov	[ebp+var_8], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_31+1], cl
mov	dl, byte ptr [ebp+var_31+1]
mov	[ebp+var_2E], dl
xor	eax, eax
mov	byte ptr [ebp+var_31], al
mov	cl, byte ptr [ebp+var_31]
mov	[ebp+var_2F], cl
mov	edx, [ebp+var_8]
mov	byte ptr [edx],	0
mov	ecx, [ebp+var_44]
call	sub_4392A0
mov	eax, [ebp+var_4]
add	eax, [ebp+arg_0]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_40]
mov	[ecx], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_8]
mov	[eax+10h], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_4]
mov	[edx+14h], eax
mov	esp, ebp
pop	ebp
retn	4
sub_4B9AA0 endp

align 10h


; Attributes: bp-based frame

sub_4B9B40 proc	near

var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9B40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_28]
call	sub_5C6F30
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_4B9BB9
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_4B9B40
mov	edx, [ebp+var_14]
mov	[edx+0Ch], eax

loc_4B9BB9:
mov	eax, [ebp+var_14]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_4B9BC8:
cmp	[ebp+arg_0], 0
jz	short loc_4B9C35
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_28]
call	sub_5C6F30
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_4B9C24
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_28]
call	sub_4B9B40
mov	ecx, [ebp+var_18]
mov	[ecx+0Ch], eax

loc_4B9C24:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_4B9BC8

loc_4B9C35:
jmp	short loc_4B9C59

loc_4B9C37:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_28]
call	sub_5091F0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B9C60
retn

loc_4B9C59:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B9C60:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_4B9B40 endp

align 10h


; Attributes: bp-based frame

sub_4B9C80 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_34]
add	ecx, 8
call	sub_479650
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4B9D1B

loc_4B9CDD:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_30], ecx
cmp	[ebp+var_14], 0
jz	short loc_4B9CFE
mov	edx, [ebp+var_30]
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B9CFE:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B9D1B
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B9D1B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B9C80 endp

align 10h


; Attributes: bp-based frame

sub_4B9D30 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4B9D30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_456860
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4C7B00
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4B9DCB

loc_4B9D8D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
cmp	[ebp+var_14], 0
jz	short loc_4B9DAE
mov	edx, [ebp+var_20]
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4B9DAE:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4B9DCB
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4B9DCB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4B9D30 endp

align 10h


; Attributes: bp-based frame

sub_4B9DE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 10h

loc_4B9DE6:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 10h
jle	loc_4B9F05
cmp	[ebp+arg_C], 0
jnz	short loc_4B9E32
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4C7C10
add	esp, 18h
jmp	loc_4B9F05

loc_4B9E32:
mov	ecx, [ebp+arg_C]
sub	ecx, 1
mov	[ebp+arg_C], ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_4]
sub	ecx, 0Ch
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cdq
sub	eax, edx
sar	eax, 1
imul	eax, 0Ch
add	eax, [ebp+arg_0]
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_4C7C50
add	esp, 18h
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	eax, [eax+8]
mov	[ebp+var_8], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4C7CF0
add	esp, 20h
mov	[ebp+var_4], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_4B9DE0
add	esp, 1Ch
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
jmp	loc_4B9DE6

loc_4B9F05:
mov	esp, ebp
pop	ebp
retn
sub_4B9DE0 endp

align 10h


; Attributes: bp-based frame

sub_4B9F10 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 10h
jle	short loc_4B9F80
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_10]
mov	[edx+8], eax
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 0C0h
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4C7D70
add	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 0C0h
push	eax
call	sub_4CF860
add	esp, 18h
jmp	short loc_4B9FA8

loc_4B9F80:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4C7D70
add	esp, 18h

loc_4B9FA8:
pop	ebp
retn
sub_4B9F10 endp

align 10h


; Attributes: bp-based frame

sub_4B9FB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	[ebp+var_C], 10h
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
shl	ecx, 4
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_4], eax
mov	eax, [ebp+var_8]
cdq
and	edx, 0Fh
add	eax, edx
sar	eax, 4
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4B9FB0 endp

align 10h


; Attributes: bp-based frame

sub_4BA000 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_20=	byte ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
mov	[ebp+var_B0], ecx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4BA04B
mov	edx, [ebp+var_B0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4BA04B
mov	[ebp+var_B4], 1
jmp	short loc_4BA055

loc_4BA04B:
mov	[ebp+var_B4], 0

loc_4BA055:
movzx	ecx, byte ptr [ebp+var_B4]
test	ecx, ecx
jz	short loc_4BA0BA
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_44]
call	sub_4C6D50
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_45], al
lea	ecx, [ebp+var_45]
push	ecx
lea	edx, [ebp+var_44]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_B0]
call	sub_4BA000
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_4A9130
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_407910
jmp	loc_4BA308

loc_4BA0BA:
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_10], eax
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+arg_4]
jbe	loc_4BA20C
xor	edx, edx
mov	[ebp+var_46], dl
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 30h
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_68], eax
push	0
lea	ecx, [ebp+var_61]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_68]
push	ecx
call	sub_4CF8C0
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 30h
mov	eax, [ebp+var_B0]
add	edx, [eax+4]
mov	ecx, [ebp+var_B0]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_47], dl
mov	eax, [ebp+var_14]
mov	[ebp+var_80], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 30h
mov	edx, [ebp+var_14]
sub	edx, ecx
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_78], eax
jmp	short loc_4BA181

loc_4BA178:
mov	edx, [ebp+var_78]
sub	edx, 1
mov	[ebp+var_78], edx

loc_4BA181:
cmp	[ebp+var_78], 0
jle	short loc_4BA1A7
mov	eax, [ebp+var_7C]
sub	eax, 30h
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_80]
sub	ecx, 30h
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_80]
call	sub_4C6DE0
jmp	short loc_4BA178

loc_4BA1A7:
mov	eax, [ebp+arg_0]
mov	[ebp+var_8C], eax
mov	eax, [ebp+arg_4]
imul	eax, 30h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_88], eax
jmp	short loc_4BA1ED

loc_4BA1CF:
mov	edx, [ebp+var_8C]
add	edx, 30h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_88]
sub	eax, 1
mov	[ebp+var_88], eax

loc_4BA1ED:
cmp	[ebp+var_88], 0
jle	short loc_4BA207
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_4C6DE0
jmp	short loc_4BA1CF

loc_4BA207:
jmp	loc_4BA308

loc_4BA20C:
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_98], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_10]
imul	ecx, 30h
add	ecx, [ebp+var_98]
mov	[ebp+var_90], ecx
push	0
lea	edx, [ebp+var_91]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+var_98]
push	edx
call	sub_4C7E80
add	esp, 14h
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_90]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_48], dl
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_A0], ecx
push	0
lea	edx, [ebp+var_99]
push	edx
mov	eax, [ebp+var_A0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4CF8C0
add	esp, 14h
mov	eax, [ebp+var_10]
imul	eax, 30h
mov	ecx, [ebp+var_B0]
add	eax, [ecx+4]
mov	edx, [ebp+var_B0]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_14]
sub	eax, [ebp+var_AC]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_A8], eax
jmp	short loc_4BA2EE

loc_4BA2D0:
mov	edx, [ebp+var_AC]
add	edx, 30h
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_A8]
sub	eax, 1
mov	[ebp+var_A8], eax

loc_4BA2EE:
cmp	[ebp+var_A8], 0
jle	short loc_4BA308
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_AC]
call	sub_4C6DE0
jmp	short loc_4BA2D0

loc_4BA308:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4BA000 endp

align 10h


; Attributes: bp-based frame

sub_4BA320 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4BA347
mov	edx, [ebp+var_5C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4BA347
mov	[ebp+var_60], 1
jmp	short loc_4BA34E

loc_4BA347:
mov	[ebp+var_60], 0

loc_4BA34E:
movzx	ecx, byte ptr [ebp+var_60]
test	ecx, ecx
jz	short loc_4BA398
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [edx+4]
mov	[ebp+var_18], ecx
mov	eax, [edx+8]
mov	[ebp+var_14], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_10], ecx
mov	edx, [edx+10h]
mov	[ebp+var_C], edx
xor	eax, eax
mov	[ebp+var_1D], al
lea	ecx, [ebp+var_1D]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_4BA320
jmp	loc_4BA554

loc_4BA398:
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_4BA490
xor	edx, edx
mov	[ebp+var_1E], dl
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 14h
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_24]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
imul	ecx, 14h
mov	edx, [ebp+var_5C]
add	ecx, [edx+4]
mov	eax, [ebp+var_5C]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[ebp+var_1F], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
imul	eax, 14h
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_3C], eax
mov	eax, [ebp+arg_4]
imul	eax, 14h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_3C]
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_38], eax
jmp	short loc_4BA461

loc_4BA44F:
mov	edx, [ebp+var_3C]
add	edx, 14h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_38]
sub	eax, 1
mov	[ebp+var_38], eax

loc_4BA461:
cmp	[ebp+var_38], 0
jle	short loc_4BA48B
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_3C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ecx+10h]
mov	[edx+10h], ecx
jmp	short loc_4BA44F

loc_4BA48B:
jmp	loc_4BA554

loc_4BA490:
mov	edx, [ebp+var_5C]
mov	eax, [edx+4]
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 14h
add	ecx, [ebp+var_48]
mov	[ebp+var_40], ecx
push	0
lea	edx, [ebp+var_41]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+var_48]
push	edx
call	sub_4CFA10
add	esp, 14h
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_40]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_20], dl
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_4]
imul	edx, 14h
mov	eax, [ebp+var_5C]
add	edx, [eax+4]
mov	ecx, [ebp+var_5C]
mov	[ecx+4], edx
mov	edx, [ebp+arg_0]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_58]
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_54], eax
jmp	short loc_4BA52A

loc_4BA518:
mov	edx, [ebp+var_58]
add	edx, 14h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_54]
sub	eax, 1
mov	[ebp+var_54], eax

loc_4BA52A:
cmp	[ebp+var_54], 0
jle	short loc_4BA554
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_58]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ecx+10h]
mov	[edx+10h], ecx
jmp	short loc_4BA518

loc_4BA554:
mov	esp, ebp
pop	ebp
retn	10h
sub_4BA320 endp

align 10h


; Attributes: bp-based frame

sub_4BA560 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BA7FA
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BA5DE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4AD430
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55

loc_4BA5DE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BA660
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55
jmp	loc_4BA7F5

loc_4BA660:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BA6CB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55

loc_4BA6CB:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BA715
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55

loc_4BA715:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BA7C4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BA79D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55
jmp	short loc_4BA7C2

loc_4BA79D:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55

loc_4BA7C2:
jmp	short loc_4BA7F5

loc_4BA7C4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4AD430
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55

loc_4BA7F5:
jmp	loc_4BAC55

loc_4BA7FA:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BA8D9
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BA8A3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55
jmp	short loc_4BA8D4

loc_4BA8A3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4AD430
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55

loc_4BA8D4:
jmp	loc_4BAC55

loc_4BA8D9:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BA9CA
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BA9CA
mov	[ebp+var_120], 1
jmp	short loc_4BA9D4

loc_4BA9CA:
mov	[ebp+var_120], 0

loc_4BA9D4:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BA9FE
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BA9FE:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BAA60
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BAA36
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55
jmp	short loc_4BAA5B

loc_4BAA36:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	loc_4BAC55

loc_4BAA5B:
jmp	loc_4BAC55

loc_4BAA60:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BAAEF
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BAAEF:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BAB7E
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BAB7E
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BAB72
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BAB7E

loc_4BAB72:
mov	[ebp+var_134], 1
jmp	short loc_4BAB88

loc_4BAB7E:
mov	[ebp+var_134], 0

loc_4BAB88:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BABB2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BABB2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BAC0B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BABE7
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	short loc_4BAC55
jmp	short loc_4BAC09

loc_4BABE7:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C7F40
mov	eax, [ebp+arg_0]
jmp	short loc_4BAC55

loc_4BAC09:
jmp	short loc_4BAC55

loc_4BAC0B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BAC29
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BAC55
jmp	short loc_4BAC55

loc_4BAC29:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4AD430
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BAC55:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BA560 endp

align 10h


; Attributes: bp-based frame

sub_4BAC70 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BAF0A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BACEE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8280
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365

loc_4BACEE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BAD70
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365
jmp	loc_4BAF05

loc_4BAD70:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BADDB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365

loc_4BADDB:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BAE25
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365

loc_4BAE25:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BAED4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BAEAD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365
jmp	short loc_4BAED2

loc_4BAEAD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365

loc_4BAED2:
jmp	short loc_4BAF05

loc_4BAED4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8280
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365

loc_4BAF05:
jmp	loc_4BB365

loc_4BAF0A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BAFE9
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BAFB3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365
jmp	short loc_4BAFE4

loc_4BAFB3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8280
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365

loc_4BAFE4:
jmp	loc_4BB365

loc_4BAFE9:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BB0DA
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BB0DA
mov	[ebp+var_120], 1
jmp	short loc_4BB0E4

loc_4BB0DA:
mov	[ebp+var_120], 0

loc_4BB0E4:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BB10E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BB10E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BB170
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BB146
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365
jmp	short loc_4BB16B

loc_4BB146:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	loc_4BB365

loc_4BB16B:
jmp	loc_4BB365

loc_4BB170:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BB1FF
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BB1FF:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BB28E
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BB28E
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BB282
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BB28E

loc_4BB282:
mov	[ebp+var_134], 1
jmp	short loc_4BB298

loc_4BB28E:
mov	[ebp+var_134], 0

loc_4BB298:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BB2C2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BB2C2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BB31B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BB2F7
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BB365
jmp	short loc_4BB319

loc_4BB2F7:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C80E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BB365

loc_4BB319:
jmp	short loc_4BB365

loc_4BB31B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BB339
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BB365
jmp	short loc_4BB365

loc_4BB339:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8280
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BB365:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BAC70 endp

align 10h


; Attributes: bp-based frame

sub_4BB380 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BB61A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BB3FE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8640
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75

loc_4BB3FE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BB480
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75
jmp	loc_4BB615

loc_4BB480:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BB4EB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75

loc_4BB4EB:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BB535
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75

loc_4BB535:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BB5E4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BB5BD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75
jmp	short loc_4BB5E2

loc_4BB5BD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75

loc_4BB5E2:
jmp	short loc_4BB615

loc_4BB5E4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8640
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75

loc_4BB615:
jmp	loc_4BBA75

loc_4BB61A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BB6F9
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BB6C3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75
jmp	short loc_4BB6F4

loc_4BB6C3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8640
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75

loc_4BB6F4:
jmp	loc_4BBA75

loc_4BB6F9:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BB7EA
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BB7EA
mov	[ebp+var_120], 1
jmp	short loc_4BB7F4

loc_4BB7EA:
mov	[ebp+var_120], 0

loc_4BB7F4:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BB81E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BB81E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BB880
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BB856
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75
jmp	short loc_4BB87B

loc_4BB856:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	loc_4BBA75

loc_4BB87B:
jmp	loc_4BBA75

loc_4BB880:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BB90F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BB90F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BB99E
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BB99E
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BB992
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BB99E

loc_4BB992:
mov	[ebp+var_134], 1
jmp	short loc_4BB9A8

loc_4BB99E:
mov	[ebp+var_134], 0

loc_4BB9A8:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BB9D2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BB9D2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BBA2B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BBA07
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	short loc_4BBA75
jmp	short loc_4BBA29

loc_4BBA07:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C84A0
mov	eax, [ebp+arg_0]
jmp	short loc_4BBA75

loc_4BBA29:
jmp	short loc_4BBA75

loc_4BBA2B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BBA49
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BBA75
jmp	short loc_4BBA75

loc_4BBA49:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8640
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BBA75:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BB380 endp

align 10h


; Attributes: bp-based frame

sub_4BBA90 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BBD2A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BBB0E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8C20
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC185

loc_4BBB0E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BBB90
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	loc_4BC185
jmp	loc_4BBD25

loc_4BBB90:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BBBFB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC185

loc_4BBBFB:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BBC45
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	loc_4BC185

loc_4BBC45:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BBCF4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BBCCD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	loc_4BC185
jmp	short loc_4BBCF2

loc_4BBCCD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	loc_4BC185

loc_4BBCF2:
jmp	short loc_4BBD25

loc_4BBCF4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8C20
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC185

loc_4BBD25:
jmp	loc_4BC185

loc_4BBD2A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BBE09
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BBDD3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	loc_4BC185
jmp	short loc_4BBE04

loc_4BBDD3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8C20
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC185

loc_4BBE04:
jmp	loc_4BC185

loc_4BBE09:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BBEFA
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BBEFA
mov	[ebp+var_120], 1
jmp	short loc_4BBF04

loc_4BBEFA:
mov	[ebp+var_120], 0

loc_4BBF04:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BBF2E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BBF2E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BBF90
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BBF66
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	loc_4BC185
jmp	short loc_4BBF8B

loc_4BBF66:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	loc_4BC185

loc_4BBF8B:
jmp	loc_4BC185

loc_4BBF90:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BC01F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BC01F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BC0AE
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BC0AE
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BC0A2
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BC0AE

loc_4BC0A2:
mov	[ebp+var_134], 1
jmp	short loc_4BC0B8

loc_4BC0AE:
mov	[ebp+var_134], 0

loc_4BC0B8:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BC0E2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BC0E2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BC13B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BC117
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	short loc_4BC185
jmp	short loc_4BC139

loc_4BC117:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8A80
mov	eax, [ebp+arg_0]
jmp	short loc_4BC185

loc_4BC139:
jmp	short loc_4BC185

loc_4BC13B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BC159
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BC185
jmp	short loc_4BC185

loc_4BC159:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8C20
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BC185:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BBA90 endp

align 10h


; Attributes: bp-based frame

sub_4BC1A0 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BC43A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BC21E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8FE0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC895

loc_4BC21E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BC2A0
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	loc_4BC895
jmp	loc_4BC435

loc_4BC2A0:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BC30B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC895

loc_4BC30B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BC355
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	loc_4BC895

loc_4BC355:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BC404
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BC3DD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	loc_4BC895
jmp	short loc_4BC402

loc_4BC3DD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	loc_4BC895

loc_4BC402:
jmp	short loc_4BC435

loc_4BC404:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8FE0
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC895

loc_4BC435:
jmp	loc_4BC895

loc_4BC43A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BC519
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BC4E3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	loc_4BC895
jmp	short loc_4BC514

loc_4BC4E3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8FE0
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BC895

loc_4BC514:
jmp	loc_4BC895

loc_4BC519:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BC60A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BC60A
mov	[ebp+var_120], 1
jmp	short loc_4BC614

loc_4BC60A:
mov	[ebp+var_120], 0

loc_4BC614:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BC63E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BC63E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BC6A0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BC676
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	loc_4BC895
jmp	short loc_4BC69B

loc_4BC676:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	loc_4BC895

loc_4BC69B:
jmp	loc_4BC895

loc_4BC6A0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BC72F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BC72F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BC7BE
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BC7BE
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BC7B2
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BC7BE

loc_4BC7B2:
mov	[ebp+var_134], 1
jmp	short loc_4BC7C8

loc_4BC7BE:
mov	[ebp+var_134], 0

loc_4BC7C8:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BC7F2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BC7F2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BC84B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BC827
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	short loc_4BC895
jmp	short loc_4BC849

loc_4BC827:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8E40
mov	eax, [ebp+arg_0]
jmp	short loc_4BC895

loc_4BC849:
jmp	short loc_4BC895

loc_4BC84B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BC869
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BC895
jmp	short loc_4BC895

loc_4BC869:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8FE0
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BC895:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BC1A0 endp

align 10h


; Attributes: bp-based frame

sub_4BC8B0 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BCB4A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BC92E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C8860
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5

loc_4BC92E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BC9B0
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5
jmp	loc_4BCB45

loc_4BC9B0:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BCA1B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5

loc_4BCA1B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BCA65
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5

loc_4BCA65:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BCB14
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BCAED
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5
jmp	short loc_4BCB12

loc_4BCAED:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5

loc_4BCB12:
jmp	short loc_4BCB45

loc_4BCB14:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8860
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5

loc_4BCB45:
jmp	loc_4BCFA5

loc_4BCB4A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BCC29
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BCBF3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5
jmp	short loc_4BCC24

loc_4BCBF3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8860
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5

loc_4BCC24:
jmp	loc_4BCFA5

loc_4BCC29:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BCD1A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BCD1A
mov	[ebp+var_120], 1
jmp	short loc_4BCD24

loc_4BCD1A:
mov	[ebp+var_120], 0

loc_4BCD24:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BCD4E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BCD4E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BCDB0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BCD86
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5
jmp	short loc_4BCDAB

loc_4BCD86:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	loc_4BCFA5

loc_4BCDAB:
jmp	loc_4BCFA5

loc_4BCDB0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BCE3F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BCE3F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BCECE
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BCECE
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BCEC2
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BCECE

loc_4BCEC2:
mov	[ebp+var_134], 1
jmp	short loc_4BCED8

loc_4BCECE:
mov	[ebp+var_134], 0

loc_4BCED8:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BCF02
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BCF02:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BCF5B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BCF37
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	short loc_4BCFA5
jmp	short loc_4BCF59

loc_4BCF37:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C9200
mov	eax, [ebp+arg_0]
jmp	short loc_4BCFA5

loc_4BCF59:
jmp	short loc_4BCFA5

loc_4BCF5B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BCF79
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BCFA5
jmp	short loc_4BCFA5

loc_4BCF79:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C8860
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BCFA5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BC8B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4BCFC0(int, double)
sub_4BCFC0 proc	near

var_84=	qword ptr -84h
var_70=	dword ptr -70h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BCFC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 60h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	loc_4BD126
mov	byte ptr [ebp+var_4], 1
wait
cmp	[ebp+arg_0], 0
jnz	short loc_4BD028
mov	[ebp+var_54], 0
jmp	short loc_4BD036

loc_4BD028:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_54], eax

loc_4BD036:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+54h]
mov	[ebp+var_36], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setnz	cl
mov	byte ptr [ebp+var_24], cl
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803B0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4C], ecx
sub	esp, 8
fld	[ebp+arg_4]
fstp	[esp+84h+var_84]
movzx	edx, [ebp+var_36]
push	edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_50]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx]
mov	ecx, [ebp+var_48]
mov	eax, [edx+14h]
call	eax
movzx	ecx, [ebp+var_2C]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_19], cl
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
wait
jmp	short loc_4BD11F

loc_4BD100:
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_4BD126
retn

loc_4BD11F:
mov	[ebp+var_4], 0

loc_4BD126:
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jz	short loc_4BD140
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_438B50

loc_4BD140:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4BCFC0 endp

align 10h


; Attributes: bp-based frame

sub_4BD170 proc	near

var_70=	dword ptr -70h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BD170
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 60h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	loc_4BD2D3
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_4BD1D7
mov	[ebp+var_54], 0
jmp	short loc_4BD1E5

loc_4BD1D7:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_54], eax

loc_4BD1E5:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+54h]
mov	[ebp+var_36], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setnz	cl
mov	byte ptr [ebp+var_24], cl
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803B0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
movzx	ecx, [ebp+var_36]
push	ecx
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_48]
mov	edx, [eax]
mov	ecx, [ebp+var_48]
mov	eax, [edx+8]
call	eax
movzx	ecx, [ebp+var_2C]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_19], cl
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
jmp	short loc_4BD2CC

loc_4BD2AD:
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_4BD2D3
retn

loc_4BD2CC:
mov	[ebp+var_4], 0

loc_4BD2D3:
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jz	short loc_4BD2ED
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_438B50

loc_4BD2ED:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4BD170 endp

align 10h


; Attributes: bp-based frame

sub_4BD320 proc	near

var_70=	dword ptr -70h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BD320
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 60h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_44CA90
add	esp, 4
mov	[ebp+var_14], al
mov	[ebp+var_4], 0
mov	[ebp+var_19], 1
mov	dl, [ebp+var_14]
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	loc_4BD483
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_4BD387
mov	[ebp+var_54], 0
jmp	short loc_4BD395

loc_4BD387:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_54], eax

loc_4BD395:
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+54h]
mov	[ebp+var_36], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+58h]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setnz	cl
mov	byte ptr [ebp+var_24], cl
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803B0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
movzx	ecx, [ebp+var_36]
push	ecx
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_48]
mov	edx, [eax]
mov	ecx, [ebp+var_48]
mov	eax, [edx+0Ch]
call	eax
movzx	ecx, [ebp+var_2C]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_19], cl
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_20]
call	sub_77FF40
jmp	short loc_4BD47C

loc_4BD45D:
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_445C00
mov	[ebp+var_4], 0
mov	eax, offset loc_4BD483
retn

loc_4BD47C:
mov	[ebp+var_4], 0

loc_4BD483:
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jz	short loc_4BD49D
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_438B50

loc_4BD49D:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_444780
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4BD320 endp

align 10h


; Attributes: bp-based frame

sub_4BD4D0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BD4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_4C7620
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_4BD549
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4BD4D0
mov	edx, [ebp+var_14]
mov	[edx+0Ch], eax

loc_4BD549:
mov	eax, [ebp+var_14]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_4BD558:
cmp	[ebp+arg_0], 0
jz	short loc_4BD5C5
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_4C7620
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_4BD5B4
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4BD4D0
mov	ecx, [ebp+var_18]
mov	[ecx+0Ch], eax

loc_4BD5B4:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_4BD558

loc_4BD5C5:
jmp	short loc_4BD5E9

loc_4BD5C7:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_24]
call	sub_46B7A0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4BD5F0
retn

loc_4BD5E9:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BD5F0:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_4BD4D0 endp

align 10h


; Attributes: bp-based frame

sub_4BD610 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BD8AA
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BD68E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C9540
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05

loc_4BD68E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BD710
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05
jmp	loc_4BD8A5

loc_4BD710:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BD77B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05

loc_4BD77B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BD7C5
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05

loc_4BD7C5:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BD874
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BD84D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05
jmp	short loc_4BD872

loc_4BD84D:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05

loc_4BD872:
jmp	short loc_4BD8A5

loc_4BD874:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C9540
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05

loc_4BD8A5:
jmp	loc_4BDD05

loc_4BD8AA:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BD989
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BD953
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05
jmp	short loc_4BD984

loc_4BD953:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C9540
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05

loc_4BD984:
jmp	loc_4BDD05

loc_4BD989:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BDA7A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BDA7A
mov	[ebp+var_120], 1
jmp	short loc_4BDA84

loc_4BDA7A:
mov	[ebp+var_120], 0

loc_4BDA84:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BDAAE
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BDAAE:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BDB10
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BDAE6
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05
jmp	short loc_4BDB0B

loc_4BDAE6:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	loc_4BDD05

loc_4BDB0B:
jmp	loc_4BDD05

loc_4BDB10:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BDB9F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BDB9F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BDC2E
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BDC2E
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BDC22
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BDC2E

loc_4BDC22:
mov	[ebp+var_134], 1
jmp	short loc_4BDC38

loc_4BDC2E:
mov	[ebp+var_134], 0

loc_4BDC38:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BDC62
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BDC62:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BDCBB
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BDC97
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	short loc_4BDD05
jmp	short loc_4BDCB9

loc_4BDC97:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4C93A0
mov	eax, [ebp+arg_0]
jmp	short loc_4BDD05

loc_4BDCB9:
jmp	short loc_4BDD05

loc_4BDCBB:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BDCD9
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BDD05
jmp	short loc_4BDD05

loc_4BDCD9:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4C9540
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BDD05:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BD610 endp

align 10h


; Attributes: bp-based frame

sub_4BDD20 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4BDD7C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4C6FC0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4BDE6A

loc_4BDD7C:
cmp	[ebp+arg_10], 0
jnz	short loc_4BDDDA
cmp	[ebp+arg_C], 0
jnz	short loc_4BDDD1
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BDDDA

loc_4BDDD1:
mov	[ebp+var_30], 1
jmp	short loc_4BDDE1

loc_4BDDDA:
mov	[ebp+var_30], 0

loc_4BDDE1:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4BDE08
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BDE08:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4BDE3E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4C6FC0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4BDE3C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4BDE3C:
jmp	short loc_4BDE6A

loc_4BDE3E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4C6FC0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4BDE6A
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4BDE6A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4BDD20 endp

align 10h


; Attributes: bp-based frame

sub_4BDEC0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BDEC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_4C6FC0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_4BDF39
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4BDEC0
mov	edx, [ebp+var_14]
mov	[edx+0Ch], eax

loc_4BDF39:
mov	eax, [ebp+var_14]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_4BDF48:
cmp	[ebp+arg_0], 0
jz	short loc_4BDFB5
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_4C6FC0
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_4BDFA4
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4BDEC0
mov	ecx, [ebp+var_18]
mov	[ecx+0Ch], eax

loc_4BDFA4:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_4BDF48

loc_4BDFB5:
jmp	short loc_4BDFD9

loc_4BDFB7:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_24]
call	sub_46B800
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4BDFE0
retn

loc_4BDFD9:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BDFE0:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_4BDEC0 endp

align 10h


; Attributes: bp-based frame

sub_4BE000 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BE29A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BE07E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4AE730
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5

loc_4BE07E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BE100
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5
jmp	loc_4BE295

loc_4BE100:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BE16B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5

loc_4BE16B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BE1B5
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5

loc_4BE1B5:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BE264
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BE23D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5
jmp	short loc_4BE262

loc_4BE23D:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5

loc_4BE262:
jmp	short loc_4BE295

loc_4BE264:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4AE730
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5

loc_4BE295:
jmp	loc_4BE6F5

loc_4BE29A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BE379
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BE343
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5
jmp	short loc_4BE374

loc_4BE343:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4AE730
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5

loc_4BE374:
jmp	loc_4BE6F5

loc_4BE379:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BE46A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BE46A
mov	[ebp+var_120], 1
jmp	short loc_4BE474

loc_4BE46A:
mov	[ebp+var_120], 0

loc_4BE474:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BE49E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BE49E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BE500
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BE4D6
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5
jmp	short loc_4BE4FB

loc_4BE4D6:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	loc_4BE6F5

loc_4BE4FB:
jmp	loc_4BE6F5

loc_4BE500:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BE58F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BE58F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4BE61E
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4BE61E
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4BE612
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4BE61E

loc_4BE612:
mov	[ebp+var_134], 1
jmp	short loc_4BE628

loc_4BE61E:
mov	[ebp+var_134], 0

loc_4BE628:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4BE652
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BE652:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4BE6AB
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4BE687
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	short loc_4BE6F5
jmp	short loc_4BE6A9

loc_4BE687:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4BDD20
mov	eax, [ebp+arg_0]
jmp	short loc_4BE6F5

loc_4BE6A9:
jmp	short loc_4BE6F5

loc_4BE6AB:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4BE6C9
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BE6F5
jmp	short loc_4BE6F5

loc_4BE6C9:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4AE730
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BE6F5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BE000 endp

align 10h


; Attributes: bp-based frame

sub_4BE710 proc	near

var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BE710
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_28]
call	sub_5C6E80
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_4BE789
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_4BE710
mov	edx, [ebp+var_14]
mov	[edx+0Ch], eax

loc_4BE789:
mov	eax, [ebp+var_14]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_4BE798:
cmp	[ebp+arg_0], 0
jz	short loc_4BE805
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_28]
call	sub_5C6E80
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_20]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_4BE7F4
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_28]
call	sub_4BE710
mov	ecx, [ebp+var_18]
mov	[ecx+0Ch], eax

loc_4BE7F4:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_4BE798

loc_4BE805:
jmp	short loc_4BE829

loc_4BE807:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_28]
call	sub_48B410
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4BE830
retn

loc_4BE829:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BE830:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_4BE710 endp

align 10h


; Attributes: bp-based frame

sub_4BE850 proc	near

var_104= dword ptr -104h
var_100= dword ptr -100h
var_A8=	dword ptr -0A8h
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BE850
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0F4h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_104], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_104]
call	sub_50F1D0
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_104]
add	ecx, 8
call	sub_4C7070
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
lea	eax, [ebp+var_1E+1]
push	eax
movzx	ecx, byte ptr [ebp+var_1E]
push	ecx
mov	edx, [ebp+var_18]
push	edx		; void *
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_104]
mov	edx, [ecx]
push	edx		; int
call	sub_4C9820
add	esp, 14h
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_4BE903
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_1C]
push	ecx		; void *
call	sub_4C9880
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 0Ch
mov	[ebp+var_1C], edx
jmp	short loc_4BE92F

loc_4BE903:
mov	eax, [ebp+arg_C]
imul	eax, 0Ch
add	eax, [ebp+var_1C]
mov	[ebp+var_60], eax
push	0
lea	ecx, [ebp+var_61]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_4CFB90
add	esp, 14h
mov	edx, [ebp+var_60]
mov	[ebp+var_1C], edx

loc_4BE92F:
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	loc_4BE9C1
xor	ecx, ecx
mov	[ebp+var_1F], cl
xor	edx, edx
mov	[ebp+var_20], dl
mov	al, [ebp+var_20]
mov	[ebp+var_85], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_104]
mov	eax, [edx+4]
mov	[ebp+var_80], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_80]
sub	eax, [ebp+var_7C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_4BE985

loc_4BE97C:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_4BE985:
cmp	[ebp+var_68], 0
jle	short loc_4BE9B8
mov	eax, [ebp+var_7C]
push	eax		; int
mov	ecx, [ebp+var_84]
push	ecx		; void *
call	sub_4B7770
add	esp, 8
mov	edx, [ebp+var_7C]
add	edx, 0Ch
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_84]
add	eax, 0Ch
mov	[ebp+var_84], eax
jmp	short loc_4BE97C

loc_4BE9B8:
mov	ecx, [ebp+var_84]
mov	[ebp+var_1C], ecx

loc_4BE9C1:
jmp	short loc_4BEA10

loc_4BE9C3:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_4C6AC0
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_A8], ecx
cmp	[ebp+var_18], 0
jz	short loc_4BE9FA
mov	edx, [ebp+var_A8]
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4BE9FA:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4BEA17
retn

loc_4BEA10:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BEA17:
mov	ecx, [ebp+var_104]
call	sub_50F2B0
mov	ecx, [ebp+var_14]
imul	ecx, 0Ch
add	ecx, [ebp+var_18]
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_104]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_104]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_104]
mov	ecx, [ebp+var_100]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_4BE850 endp

align 10h


; Attributes: bp-based frame

sub_4BEA70 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BEA70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
mov	[ebp+var_9C], ecx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4BEABB
mov	edx, [ebp+var_9C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4BEABB
mov	[ebp+var_A0], 1
jmp	short loc_4BEAC5

loc_4BEABB:
mov	[ebp+var_A0], 0

loc_4BEAC5:
movzx	ecx, byte ptr [ebp+var_A0]
test	ecx, ecx
jz	short loc_4BEB17
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_20]
call	sub_44D270
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_21], al
lea	ecx, [ebp+var_21]
push	ecx
lea	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_4BEA70
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_20]
call	sub_436CF0
jmp	loc_4BEBAF

loc_4BEB17:
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
sub	eax, 0Ch
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
add	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
jmp	short loc_4BEB46

loc_4BEB34:
mov	edx, [ebp+var_10]
sub	edx, 0Ch
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
sub	eax, 0Ch
mov	[ebp+var_14], eax

loc_4BEB46:
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+arg_0]
jb	short loc_4BEB68
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_10]
push	eax		; void *
call	sub_4B7770
add	esp, 8
xor	ecx, ecx
mov	[ebp+var_8D], cl
jmp	short loc_4BEB34

loc_4BEB68:
mov	edx, [ebp+arg_4]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	[ebp+var_94], edx
push	0
lea	eax, [ebp+var_95]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CFB90
add	esp, 14h
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_9C]
add	ecx, [edx+4]
mov	eax, [ebp+var_9C]
mov	[eax+4], ecx

loc_4BEBAF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4BEA70 endp

align 10h


; Attributes: bp-based frame

sub_4BEBC0 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BEE69
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BEC3E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9AB0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1

loc_4BEC3E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_1011870
add	esp, 8
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_4BECC5
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1
jmp	loc_4BEE64

loc_4BECC5:
lea	ecx, [ebp+var_2B]
mov	[ebp+var_D8], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+arg_4]
mov	[ebp+var_74], edx
lea	eax, [ebp+var_6D]
mov	[ebp+var_DC], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_74]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_1011870
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_4BED35
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1

loc_4BED35:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_CC]
jnz	short loc_4BED7F
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1

loc_4BED7F:
lea	edx, [ebp+var_2D]
mov	[ebp+var_E0], edx
mov	[ebp+var_4], 8
mov	eax, [ebp+var_10]
mov	[ebp+var_80], eax
lea	ecx, [ebp+var_79]
mov	[ebp+var_E4], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_80]
add	edx, 10h
mov	[ebp+var_78], edx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_1011870
add	esp, 8
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BEE33
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BEE0C
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1
jmp	short loc_4BEE31

loc_4BEE0C:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1

loc_4BEE31:
jmp	short loc_4BEE64

loc_4BEE33:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9AB0
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1

loc_4BEE64:
jmp	loc_4BF2E1

loc_4BEE69:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_4BEF4D
lea	ecx, [ebp+var_3A]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_EC], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_88]
push	ecx
call	sub_1011870
add	esp, 8
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_39]
test	edx, edx
jz	short loc_4BEF17
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1
jmp	short loc_4BEF48

loc_4BEF17:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9AB0
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1

loc_4BEF48:
jmp	loc_4BF2E1

loc_4BEF4D:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_18]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	eax, [ebp+var_45]
mov	[ebp+var_F0], eax
mov	[ebp+var_4], 10h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_A0], ecx
lea	edx, [ebp+var_99]
mov	[ebp+var_F4], edx
mov	byte ptr [ebp+var_4], 11h
mov	eax, [ebp+var_A0]
add	eax, 10h
mov	[ebp+var_98], eax
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	ecx, [ebp+var_98]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_12]
test	eax, eax
jz	short loc_4BF048
lea	ecx, [ebp+var_47]
mov	[ebp+var_F8], ecx
mov	[ebp+var_4], 14h
mov	edx, [ebp+var_58]
or	edx, 1
mov	[ebp+var_58], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_AC], eax
lea	ecx, [ebp+var_A5]
mov	[ebp+var_FC], ecx
mov	[ebp+var_4], 15h
mov	edx, [ebp+var_AC]
add	edx, 10h
mov	[ebp+var_A4], edx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A4]
push	ecx
call	sub_1011870
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_4BF048
mov	[ebp+var_100], 1
jmp	short loc_4BF052

loc_4BF048:
mov	[ebp+var_100], 0

loc_4BF052:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BF07C
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BF07C:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BF0DE
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BF0B4
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1
jmp	short loc_4BF0D9

loc_4BF0B4:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	loc_4BF2E1

loc_4BF0D9:
jmp	loc_4BF2E1

loc_4BF0DE:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BF172
lea	eax, [ebp+var_48]
mov	[ebp+var_104], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_108], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_B0]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BF172:
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	loc_4BF20A
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	loc_4BF20A
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_CC]
jz	short loc_4BF1FE
lea	eax, [ebp+var_4A]
mov	[ebp+var_10C], eax
mov	[ebp+var_4], 1Ch
mov	ecx, [ebp+var_58]
or	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_C4], edx
lea	eax, [ebp+var_BD]
mov	[ebp+var_110], eax
mov	[ebp+var_4], 1Dh
mov	ecx, [ebp+var_C4]
add	ecx, 10h
mov	[ebp+var_BC], ecx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	edx, [ebp+var_BC]
push	edx
mov	eax, [ebp+arg_8]
push	eax
call	sub_1011870
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BF20A

loc_4BF1FE:
mov	[ebp+var_114], 1
jmp	short loc_4BF214

loc_4BF20A:
mov	[ebp+var_114], 0

loc_4BF214:
mov	dl, byte ptr [ebp+var_114]
mov	[ebp+var_49], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 2
jz	short loc_4BF23E
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BF23E:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jz	short loc_4BF297
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4BF273
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	short loc_4BF2E1
jmp	short loc_4BF295

loc_4BF273:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9910
mov	eax, [ebp+arg_0]
jmp	short loc_4BF2E1

loc_4BF295:
jmp	short loc_4BF2E1

loc_4BF297:
movzx	edx, [ebp+var_12]
movzx	eax, [ebp+var_1D]
cmp	edx, eax
jnz	short loc_4BF2B5
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BF2E1
jmp	short loc_4BF2E1

loc_4BF2B5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4C9AB0
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BF2E1:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BEBC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4BF300(void *)
sub_4BF300 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4BF300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_1014910
xor	ecx, ecx
and	ecx, 1
jz	short loc_4BF347
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4BF347:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4BF300 endp

align 10h


; Attributes: bp-based frame

sub_4BF360 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BF609
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BF3DE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9E60
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81

loc_4BF3DE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_1011870
add	esp, 8
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_4BF465
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81
jmp	loc_4BF604

loc_4BF465:
lea	ecx, [ebp+var_2B]
mov	[ebp+var_D8], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+arg_4]
mov	[ebp+var_74], edx
lea	eax, [ebp+var_6D]
mov	[ebp+var_DC], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_74]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_1011870
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_4BF4D5
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81

loc_4BF4D5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_CC]
jnz	short loc_4BF51F
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81

loc_4BF51F:
lea	edx, [ebp+var_2D]
mov	[ebp+var_E0], edx
mov	[ebp+var_4], 8
mov	eax, [ebp+var_10]
mov	[ebp+var_80], eax
lea	ecx, [ebp+var_79]
mov	[ebp+var_E4], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_80]
add	edx, 10h
mov	[ebp+var_78], edx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_1011870
add	esp, 8
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BF5D3
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BF5AC
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81
jmp	short loc_4BF5D1

loc_4BF5AC:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81

loc_4BF5D1:
jmp	short loc_4BF604

loc_4BF5D3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9E60
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81

loc_4BF604:
jmp	loc_4BFA81

loc_4BF609:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_4BF6ED
lea	ecx, [ebp+var_3A]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_EC], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_88]
push	ecx
call	sub_1011870
add	esp, 8
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_39]
test	edx, edx
jz	short loc_4BF6B7
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81
jmp	short loc_4BF6E8

loc_4BF6B7:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9E60
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81

loc_4BF6E8:
jmp	loc_4BFA81

loc_4BF6ED:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_18]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	eax, [ebp+var_45]
mov	[ebp+var_F0], eax
mov	[ebp+var_4], 10h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_A0], ecx
lea	edx, [ebp+var_99]
mov	[ebp+var_F4], edx
mov	byte ptr [ebp+var_4], 11h
mov	eax, [ebp+var_A0]
add	eax, 10h
mov	[ebp+var_98], eax
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	ecx, [ebp+var_98]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_12]
test	eax, eax
jz	short loc_4BF7E8
lea	ecx, [ebp+var_47]
mov	[ebp+var_F8], ecx
mov	[ebp+var_4], 14h
mov	edx, [ebp+var_58]
or	edx, 1
mov	[ebp+var_58], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_AC], eax
lea	ecx, [ebp+var_A5]
mov	[ebp+var_FC], ecx
mov	[ebp+var_4], 15h
mov	edx, [ebp+var_AC]
add	edx, 10h
mov	[ebp+var_A4], edx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A4]
push	ecx
call	sub_1011870
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_4BF7E8
mov	[ebp+var_100], 1
jmp	short loc_4BF7F2

loc_4BF7E8:
mov	[ebp+var_100], 0

loc_4BF7F2:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BF81C
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BF81C:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BF87E
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BF854
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81
jmp	short loc_4BF879

loc_4BF854:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	loc_4BFA81

loc_4BF879:
jmp	loc_4BFA81

loc_4BF87E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4BF912
lea	eax, [ebp+var_48]
mov	[ebp+var_104], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_108], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_B0]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BF912:
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	loc_4BF9AA
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	loc_4BF9AA
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_CC]
jz	short loc_4BF99E
lea	eax, [ebp+var_4A]
mov	[ebp+var_10C], eax
mov	[ebp+var_4], 1Ch
mov	ecx, [ebp+var_58]
or	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_C4], edx
lea	eax, [ebp+var_BD]
mov	[ebp+var_110], eax
mov	[ebp+var_4], 1Dh
mov	ecx, [ebp+var_C4]
add	ecx, 10h
mov	[ebp+var_BC], ecx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	edx, [ebp+var_BC]
push	edx
mov	eax, [ebp+arg_8]
push	eax
call	sub_1011870
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BF9AA

loc_4BF99E:
mov	[ebp+var_114], 1
jmp	short loc_4BF9B4

loc_4BF9AA:
mov	[ebp+var_114], 0

loc_4BF9B4:
mov	dl, byte ptr [ebp+var_114]
mov	[ebp+var_49], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 2
jz	short loc_4BF9DE
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BF9DE:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jz	short loc_4BFA37
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4BFA13
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	short loc_4BFA81
jmp	short loc_4BFA35

loc_4BFA13:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4C9CC0
mov	eax, [ebp+arg_0]
jmp	short loc_4BFA81

loc_4BFA35:
jmp	short loc_4BFA81

loc_4BFA37:
movzx	edx, [ebp+var_12]
movzx	eax, [ebp+var_1D]
cmp	edx, eax
jnz	short loc_4BFA55
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4BFA81
jmp	short loc_4BFA81

loc_4BFA55:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4C9E60
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4BFA81:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BF360 endp

align 10h


; Attributes: bp-based frame

sub_4BFAA0 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4BFD3A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4BFB1E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4CA210
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0195

loc_4BFB1E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4BFBA0
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	loc_4C0195
jmp	loc_4BFD35

loc_4BFBA0:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4BFC0B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0195

loc_4BFC0B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4BFC55
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	loc_4C0195

loc_4BFC55:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4BFD04
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BFCDD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	loc_4C0195
jmp	short loc_4BFD02

loc_4BFCDD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	loc_4C0195

loc_4BFD02:
jmp	short loc_4BFD35

loc_4BFD04:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CA210
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0195

loc_4BFD35:
jmp	loc_4C0195

loc_4BFD3A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4BFE19
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4BFDE3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	loc_4C0195
jmp	short loc_4BFE14

loc_4BFDE3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CA210
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0195

loc_4BFE14:
jmp	loc_4C0195

loc_4BFE19:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4BFF0A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4BFF0A
mov	[ebp+var_120], 1
jmp	short loc_4BFF14

loc_4BFF0A:
mov	[ebp+var_120], 0

loc_4BFF14:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4BFF3E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4BFF3E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4BFFA0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4BFF76
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	loc_4C0195
jmp	short loc_4BFF9B

loc_4BFF76:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	loc_4C0195

loc_4BFF9B:
jmp	loc_4C0195

loc_4BFFA0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4C002F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C002F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4C00BE
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4C00BE
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4C00B2
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C00BE

loc_4C00B2:
mov	[ebp+var_134], 1
jmp	short loc_4C00C8

loc_4C00BE:
mov	[ebp+var_134], 0

loc_4C00C8:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4C00F2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C00F2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4C014B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4C0127
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	short loc_4C0195
jmp	short loc_4C0149

loc_4C0127:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4CA070
mov	eax, [ebp+arg_0]
jmp	short loc_4C0195

loc_4C0149:
jmp	short loc_4C0195

loc_4C014B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4C0169
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C0195
jmp	short loc_4C0195

loc_4C0169:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CA210
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C0195:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4BFAA0 endp

align 10h


; Attributes: bp-based frame

sub_4C01B0 proc	near

var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_FC=	dword ptr -0FCh
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E1=	byte ptr -0E1h
var_E0=	dword ptr -0E0h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C0920
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 148h
mov	[ebp+var_10C], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_10C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4C047A
mov	edx, [ebp+var_10C]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C022E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA5D0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0910

loc_4C022E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_110], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_114], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_4C02BB
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	loc_4C0910
jmp	loc_4C0475

loc_4C02BB:
lea	ecx, [ebp+var_2B]
mov	[ebp+var_118], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+arg_4]
mov	[ebp+var_7C], edx
lea	eax, [ebp+var_75]
mov	[ebp+var_11C], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_7C]
add	ecx, 10h
mov	[ebp+var_74], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_4C0331
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0910

loc_4C0331:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_10C]
jnz	short loc_4C037B
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	loc_4C0910

loc_4C037B:
lea	edx, [ebp+var_2D]
mov	[ebp+var_120], edx
mov	[ebp+var_4], 8
mov	eax, [ebp+var_10]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_124], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4C0444
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C041D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	loc_4C0910
jmp	short loc_4C0442

loc_4C041D:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	loc_4C0910

loc_4C0442:
jmp	short loc_4C0475

loc_4C0444:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA5D0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0910

loc_4C0475:
jmp	loc_4C0910

loc_4C047A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_10C]
jnz	loc_4C0564
lea	ecx, [ebp+var_3A]
mov	[ebp+var_128], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_10C]
mov	eax, [edx+0Ch]
mov	[ebp+var_A8], eax
lea	ecx, [ebp+var_A1]
mov	[ebp+var_12C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_A8]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_39]
test	edx, edx
jz	short loc_4C052E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10C]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	loc_4C0910
jmp	short loc_4C055F

loc_4C052E:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA5D0
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C0910

loc_4C055F:
jmp	loc_4C0910

loc_4C0564:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_18]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	eax, [ebp+var_45]
mov	[ebp+var_130], eax
mov	[ebp+var_4], 10h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C0], ecx
lea	edx, [ebp+var_B9]
mov	[ebp+var_134], edx
mov	byte ptr [ebp+var_4], 11h
mov	eax, [ebp+var_C0]
add	eax, 10h
mov	[ebp+var_B8], eax
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	ecx, [ebp+var_B8]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_12]
test	eax, eax
jz	short loc_4C066B
lea	ecx, [ebp+var_47]
mov	[ebp+var_138], ecx
mov	[ebp+var_4], 14h
mov	edx, [ebp+var_58]
or	edx, 1
mov	[ebp+var_58], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_13C], ecx
mov	[ebp+var_4], 15h
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_CC]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jz	short loc_4C066B
mov	[ebp+var_140], 1
jmp	short loc_4C0675

loc_4C066B:
mov	[ebp+var_140], 0

loc_4C0675:
mov	al, byte ptr [ebp+var_140]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4C069F
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C069F:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4C0701
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C06D7
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	loc_4C0910
jmp	short loc_4C06FC

loc_4C06D7:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	loc_4C0910

loc_4C06FC:
jmp	loc_4C0910

loc_4C0701:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4C079B
lea	eax, [ebp+var_48]
mov	[ebp+var_144], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_E8], ecx
lea	edx, [ebp+var_E1]
mov	[ebp+var_148], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_E8]
add	eax, 10h
mov	[ebp+var_E0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_E0]
push	edx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C079B:
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	loc_4C0839
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	loc_4C0839
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_10C]
jz	short loc_4C082D
lea	eax, [ebp+var_4A]
mov	[ebp+var_14C], eax
mov	[ebp+var_4], 1Ch
mov	ecx, [ebp+var_58]
or	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_FC], edx
lea	eax, [ebp+var_F5]
mov	[ebp+var_150], eax
mov	[ebp+var_4], 1Dh
mov	ecx, [ebp+var_FC]
add	ecx, 10h
mov	[ebp+var_F4], ecx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	edx, [ebp+var_F4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C0839

loc_4C082D:
mov	[ebp+var_154], 1
jmp	short loc_4C0843

loc_4C0839:
mov	[ebp+var_154], 0

loc_4C0843:
mov	dl, byte ptr [ebp+var_154]
mov	[ebp+var_49], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 2
jz	short loc_4C086D
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C086D:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jz	short loc_4C08C6
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4C08A2
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	short loc_4C0910
jmp	short loc_4C08C4

loc_4C08A2:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA430
mov	eax, [ebp+arg_0]
jmp	short loc_4C0910

loc_4C08C4:
jmp	short loc_4C0910

loc_4C08C6:
movzx	edx, [ebp+var_12]
movzx	eax, [ebp+var_1D]
cmp	edx, eax
jnz	short loc_4C08E4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C0910
jmp	short loc_4C0910

loc_4C08E4:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_4CA5D0
mov	[ebp+var_108], eax
mov	eax, [ebp+var_108]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C0910:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C01B0 endp



; Attributes: bp-based frame

sub_4C0920 proc	near

var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_FC=	dword ptr -0FCh
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E1=	byte ptr -0E1h
var_E0=	dword ptr -0E0h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C0920
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 148h
mov	[ebp+var_10C], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_10C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4C0BEA
mov	edx, [ebp+var_10C]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C099E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA9A0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C1080

loc_4C099E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_110], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_114], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_4C0A2B
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	loc_4C1080
jmp	loc_4C0BE5

loc_4C0A2B:
lea	ecx, [ebp+var_2B]
mov	[ebp+var_118], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+arg_4]
mov	[ebp+var_7C], edx
lea	eax, [ebp+var_75]
mov	[ebp+var_11C], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_7C]
add	ecx, 10h
mov	[ebp+var_74], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_4C0AA1
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C1080

loc_4C0AA1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_10C]
jnz	short loc_4C0AEB
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	loc_4C1080

loc_4C0AEB:
lea	edx, [ebp+var_2D]
mov	[ebp+var_120], edx
mov	[ebp+var_4], 8
mov	eax, [ebp+var_10]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_124], ecx
mov	byte ptr [ebp+var_4], 9
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4C0BB4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C0B8D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	loc_4C1080
jmp	short loc_4C0BB2

loc_4C0B8D:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	loc_4C1080

loc_4C0BB2:
jmp	short loc_4C0BE5

loc_4C0BB4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA9A0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C1080

loc_4C0BE5:
jmp	loc_4C1080

loc_4C0BEA:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_10C]
jnz	loc_4C0CD4
lea	ecx, [ebp+var_3A]
mov	[ebp+var_128], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_10C]
mov	eax, [edx+0Ch]
mov	[ebp+var_A8], eax
lea	ecx, [ebp+var_A1]
mov	[ebp+var_12C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_A8]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_39]
test	edx, edx
jz	short loc_4C0C9E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10C]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	loc_4C1080
jmp	short loc_4C0CCF

loc_4C0C9E:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA9A0
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C1080

loc_4C0CCF:
jmp	loc_4C1080

loc_4C0CD4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_18]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	eax, [ebp+var_45]
mov	[ebp+var_130], eax
mov	[ebp+var_4], 10h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C0], ecx
lea	edx, [ebp+var_B9]
mov	[ebp+var_134], edx
mov	byte ptr [ebp+var_4], 11h
mov	eax, [ebp+var_C0]
add	eax, 10h
mov	[ebp+var_B8], eax
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	ecx, [ebp+var_B8]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_12]
test	eax, eax
jz	short loc_4C0DDB
lea	ecx, [ebp+var_47]
mov	[ebp+var_138], ecx
mov	[ebp+var_4], 14h
mov	edx, [ebp+var_58]
or	edx, 1
mov	[ebp+var_58], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_13C], ecx
mov	[ebp+var_4], 15h
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_CC]
push	ecx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jz	short loc_4C0DDB
mov	[ebp+var_140], 1
jmp	short loc_4C0DE5

loc_4C0DDB:
mov	[ebp+var_140], 0

loc_4C0DE5:
mov	al, byte ptr [ebp+var_140]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4C0E0F
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C0E0F:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4C0E71
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C0E47
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	loc_4C1080
jmp	short loc_4C0E6C

loc_4C0E47:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	loc_4C1080

loc_4C0E6C:
jmp	loc_4C1080

loc_4C0E71:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4C0F0B
lea	eax, [ebp+var_48]
mov	[ebp+var_144], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_E8], ecx
lea	edx, [ebp+var_E1]
mov	[ebp+var_148], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_E8]
add	eax, 10h
mov	[ebp+var_E0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_E0]
push	edx
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C0F0B:
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	loc_4C0FA9
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	loc_4C0FA9
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_10C]
jz	short loc_4C0F9D
lea	eax, [ebp+var_4A]
mov	[ebp+var_14C], eax
mov	[ebp+var_4], 1Ch
mov	ecx, [ebp+var_58]
or	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_FC], edx
lea	eax, [ebp+var_F5]
mov	[ebp+var_150], eax
mov	[ebp+var_4], 1Dh
mov	ecx, [ebp+var_FC]
add	ecx, 10h
mov	[ebp+var_F4], ecx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	edx, [ebp+var_F4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10C]
add	ecx, 14h
call	sub_42BEE0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C0FA9

loc_4C0F9D:
mov	[ebp+var_154], 1
jmp	short loc_4C0FB3

loc_4C0FA9:
mov	[ebp+var_154], 0

loc_4C0FB3:
mov	dl, byte ptr [ebp+var_154]
mov	[ebp+var_49], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 2
jz	short loc_4C0FDD
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C0FDD:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jz	short loc_4C1036
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4C1012
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	short loc_4C1080
jmp	short loc_4C1034

loc_4C1012:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10C]
call	sub_4CA800
mov	eax, [ebp+arg_0]
jmp	short loc_4C1080

loc_4C1034:
jmp	short loc_4C1080

loc_4C1036:
movzx	edx, [ebp+var_12]
movzx	eax, [ebp+var_1D]
cmp	edx, eax
jnz	short loc_4C1054
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C1080
jmp	short loc_4C1080

loc_4C1054:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_4CA9A0
mov	[ebp+var_108], eax
mov	eax, [ebp+var_108]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C1080:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C0920 endp



; Attributes: bp-based frame

sub_4C1090 proc	near

var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C1090
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
jmp	short loc_4C10CD

loc_4C10C4:
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_14], ecx

loc_4C10CD:
mov	edx, [ebp+var_14]
cmp	edx, [ebp+arg_4]
jnb	short loc_4C10F0
mov	[ebp+var_18], 80h
push	20h
mov	ecx, [ebp+var_34]
add	ecx, 24h
call	sub_5F3840
mov	ecx, [ebp+var_14]
mov	[ecx], eax
jmp	short loc_4C10C4

loc_4C10F0:
jmp	short loc_4C1118

loc_4C10F2:
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C111F
retn

loc_4C1118:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C111F:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_4C1090 endp

align 10h


; Attributes: bp-based frame

sub_4C1140 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_18]
mov	ecx, [eax+14h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_4C1174
mov	edx, 20h
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4C1174:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
sub	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_C], 80h
mov	eax, 20h
shl	eax, 2
mov	ecx, [ebp+var_10]
add	eax, [ecx+4]
mov	edx, [ebp+var_10]
mov	[edx+8], eax
mov	eax, [ebp+var_18]
mov	ecx, [eax+18h]
sub	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn
sub_4C1140 endp

align 10h


; Attributes: bp-based frame

sub_4C11D0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C11D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
mov	[ebp+var_20], 80h
mov	[ebp+var_24], 80h
mov	eax, [ebp+arg_0]
add	eax, 1Fh
shr	eax, 5
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_4C]
mov	eax, [ecx+0Ch]
sub	eax, [edx+20h]
sar	eax, 2
cmp	[ebp+var_18], eax
jbe	short loc_4C1231
push	1
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_4C1430

loc_4C1231:
mov	[ebp+var_14], 1
mov	[ebp+var_4], 0
jmp	short loc_4C124A

loc_4C1241:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_4C124A:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_18]
ja	short loc_4C1278
mov	[ebp+var_28], 80h
push	20h
mov	ecx, [ebp+var_4C]
add	ecx, 24h
call	sub_5F3840
mov	ecx, [ebp+var_14]
shl	ecx, 2
mov	edx, [ebp+var_4C]
mov	edx, [edx+0Ch]
sub	edx, ecx
mov	[edx], eax
jmp	short loc_4C1241

loc_4C1278:
jmp	short loc_4C12E1

loc_4C127A:
mov	[ebp+var_1C], 1
jmp	short loc_4C128C

loc_4C1283:
mov	eax, [ebp+var_1C]
add	eax, 1
mov	[ebp+var_1C], eax

loc_4C128C:
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_14]
jnb	short loc_4C12CB
mov	[ebp+var_44], 80h
mov	edx, [ebp+var_1C]
shl	edx, 2
mov	eax, [ebp+var_4C]
mov	ecx, [eax+0Ch]
sub	ecx, edx
mov	edx, [ecx]
mov	[ebp+var_48], edx
cmp	[ebp+var_48], 0
jz	short loc_4C12C9
mov	eax, 20h
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_48]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_4C12C9:
jmp	short loc_4C1283

loc_4C12CB:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C12E8
retn

loc_4C12E1:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C12E8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4C11D0 endp

align 10h


; Attributes: bp-based frame

sub_4C1300 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C1300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
mov	[ebp+var_20], 80h
mov	[ebp+var_24], 80h
mov	eax, [ebp+arg_0]
add	eax, 1Fh
shr	eax, 5
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
add	ecx, 1
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_4C]
mov	edx, [edx+1Ch]
sub	edx, [eax+20h]
sar	edx, 2
mov	eax, [ebp+var_4C]
mov	eax, [eax+24h]
sub	eax, edx
cmp	ecx, eax
jbe	short loc_4C136E
push	0
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_4C1430

loc_4C136E:
mov	[ebp+var_14], 1
mov	[ebp+var_4], 0
jmp	short loc_4C1387

loc_4C137E:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_4C1387:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_18]
ja	short loc_4C13B1
mov	[ebp+var_28], 80h
push	20h
mov	ecx, [ebp+var_4C]
add	ecx, 24h
call	sub_5F3840
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+1Ch]
mov	ecx, [ebp+var_14]
mov	[edx+ecx*4], eax
jmp	short loc_4C137E

loc_4C13B1:
jmp	short loc_4C1416

loc_4C13B3:
mov	[ebp+var_1C], 1
jmp	short loc_4C13C5

loc_4C13BC:
mov	edx, [ebp+var_1C]
add	edx, 1
mov	[ebp+var_1C], edx

loc_4C13C5:
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_14]
jnb	short loc_4C1400
mov	[ebp+var_44], 80h
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+1Ch]
mov	eax, [ebp+var_1C]
mov	ecx, [edx+eax*4]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_4C13FE
mov	edx, 20h
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4C13FE:
jmp	short loc_4C13BC

loc_4C1400:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C141D
retn

loc_4C1416:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C141D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4C1300 endp



; Attributes: bp-based frame

sub_4C1430 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_70]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_70]
cmp	[edx+24h], ecx
jbe	short loc_4C14DB
mov	eax, [ebp+var_70]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_70]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_4C14B3
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_70]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_4C14D6

loc_4C14B3:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_4C14D6:
jmp	loc_4C1588

loc_4C14DB:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_70]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_70]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_70]
add	ecx, 20h
call	sub_5F3840
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_70]
mov	ecx, [eax+24h]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+20h]
mov	[ebp+var_58], eax
cmp	[ebp+var_58], 0
jz	short loc_4C1576
mov	ecx, [ebp+var_5C]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_58]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4C1576:
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_4C1588:
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_60], 80h
mov	eax, 20h
shl	eax, 2
mov	ecx, [ebp+var_70]
add	eax, [ecx+4]
mov	edx, [ebp+var_70]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
add	eax, 10h
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	edx, [ebp+var_6C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_64], 80h
mov	eax, 20h
shl	eax, 2
mov	ecx, [ebp+var_68]
add	eax, [ecx+4]
mov	edx, [ebp+var_68]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_4C1430 endp

align 10h


; Attributes: bp-based frame

sub_4C1610 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 98h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 10h
mov	[ebp+var_18], esp
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
mov	edx, [ebp+arg_18]
mov	[eax+4], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_20]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_20], esp
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CAE10
add	esp, 38h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4C1610 endp

align 10h


; Attributes: bp-based frame

sub_4C16A0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 54h
lea	eax, [ebp+var_44]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_54]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
mov	[edx+4], ecx
mov	eax, [ebp+arg_8]
mov	[edx+8], eax
mov	ecx, [ebp+arg_C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_48]
mov	[ebp+var_1C], edx
mov	[ebp+var_2C], 80h
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_28]
sar	eax, 2
mov	ecx, [ebp+var_44]
sub	ecx, [ebp+var_40]
sar	ecx, 2
mov	edx, [ebp+var_38]
sub	edx, [ebp+var_1C]
sar	edx, 2
sub	edx, 1
imul	edx, 20h
add	edx, ecx
add	edx, eax
mov	[ebp+var_18], edx
jmp	short loc_4C1740

loc_4C172F:
lea	ecx, [ebp+var_54]
call	sub_4AB2D0
mov	eax, [ebp+var_18]
sub	eax, 1
mov	[ebp+var_18], eax

loc_4C1740:
cmp	[ebp+var_18], 0
jle	short loc_4C1752
mov	ecx, [ebp+var_54]
mov	edx, [ebp+arg_20]
mov	eax, [edx]
mov	[ecx], eax
jmp	short loc_4C172F

loc_4C1752:
mov	esp, ebp
pop	ebp
retn
sub_4C16A0 endp

align 10h


; Attributes: bp-based frame

sub_4C1760 proc	near

var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	byte ptr -0ECh
var_DC=	byte ptr -0DCh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch
arg_38=	dword ptr  40h
arg_3C=	dword ptr  44h
arg_40=	dword ptr  48h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C1760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 11Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_20]
mov	[ecx], edx
mov	eax, [ebp+arg_24]
mov	[ecx+4], eax
mov	edx, [ebp+arg_28]
mov	[ecx+8], edx
mov	eax, [ebp+arg_2C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_28], esp
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_2C], esp
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_20]
push	eax
call	sub_4CAF20
add	esp, 34h
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_40]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_30], esp
mov	[ebp+var_88], edx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_30]
mov	[eax], ecx
mov	edx, [ebp+arg_34]
mov	[eax+4], edx
mov	ecx, [ebp+arg_38]
mov	[eax+8], ecx
mov	edx, [ebp+arg_3C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_34], esp
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
call	sub_4C1CD0
add	esp, 24h
jmp	loc_4C19B2

loc_4C186E:
lea	ecx, [ebp+var_11C]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_12C]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+arg_20]
mov	[eax], ecx
mov	edx, [ebp+arg_24]
mov	[eax+4], edx
mov	ecx, [ebp+arg_28]
mov	[eax+8], ecx
mov	edx, [ebp+arg_2C]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_FC]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_11C]
mov	[ecx], edx
mov	eax, [ebp+var_118]
mov	[ecx+4], eax
mov	edx, [ebp+var_114]
mov	[ecx+8], edx
mov	eax, [ebp+var_110]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_10C]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_12C]
mov	[edx], eax
mov	ecx, [ebp+var_128]
mov	[edx+4], ecx
mov	eax, [ebp+var_124]
mov	[edx+8], eax
mov	ecx, [ebp+var_120]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_B9], dl
lea	eax, [ebp+var_DC]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ebp+var_FC]
mov	[ecx], edx
mov	eax, [ebp+var_F8]
mov	[ecx+4], eax
mov	edx, [ebp+var_F4]
mov	[ecx+8], edx
mov	eax, [ebp+var_F0]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_EC]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_10C]
mov	[edx], eax
mov	ecx, [ebp+var_108]
mov	[edx+4], ecx
mov	eax, [ebp+var_104]
mov	[edx+8], eax
mov	ecx, [ebp+var_100]
mov	[edx+0Ch], ecx
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C19B9
retn

loc_4C19B2:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C19B9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4C1760 endp

align 10h


; Attributes: bp-based frame

sub_4C19D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 98h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 10h
mov	[ebp+var_18], esp
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
mov	edx, [ebp+arg_18]
mov	[eax+4], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_20]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_20], esp
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CAFB0
add	esp, 38h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4C19D0 endp

align 10h


; Attributes: bp-based frame

sub_4C1A60 proc	near

var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	byte ptr -0DCh
var_CC=	byte ptr -0CCh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch
arg_38=	dword ptr  40h
arg_3C=	dword ptr  44h
arg_40=	dword ptr  48h
arg_44=	dword ptr  4Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C1A60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 10Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_24]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
call	sub_4C1CD0
add	esp, 24h
mov	[ebp+var_4], 0
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+arg_18]
mov	[ecx+4], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_20]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_50]
mov	eax, [ebp+arg_38]
mov	[edx], eax
mov	ecx, [ebp+arg_3C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_40]
mov	[edx+8], eax
mov	ecx, [ebp+arg_44]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_24], esp
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_28]
mov	[eax], ecx
mov	edx, [ebp+arg_2C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_30]
mov	[eax+8], ecx
mov	edx, [ebp+arg_34]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CAF20
add	esp, 34h
mov	eax, [ebp+arg_0]
jmp	loc_4C1CB0

loc_4C1B65:
lea	ecx, [ebp+var_10C]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_11C]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_EC]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_10C]
mov	[ecx], edx
mov	eax, [ebp+var_108]
mov	[ecx+4], eax
mov	edx, [ebp+var_104]
mov	[ecx+8], edx
mov	eax, [ebp+var_100]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_FC]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_11C]
mov	[edx], eax
mov	ecx, [ebp+var_118]
mov	[edx+4], ecx
mov	eax, [ebp+var_114]
mov	[edx+8], eax
mov	ecx, [ebp+var_110]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_A9], dl
lea	eax, [ebp+var_CC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ebp+var_EC]
mov	[ecx], edx
mov	eax, [ebp+var_E8]
mov	[ecx+4], eax
mov	edx, [ebp+var_E4]
mov	[ecx+8], edx
mov	eax, [ebp+var_E0]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_DC]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_BC]
mov	eax, [ebp+var_FC]
mov	[edx], eax
mov	ecx, [ebp+var_F8]
mov	[edx+4], ecx
mov	eax, [ebp+var_F4]
mov	[edx+8], eax
mov	ecx, [ebp+var_F0]
mov	[edx+0Ch], ecx
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C1CB0
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C1CB0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4C1A60 endp

align 10h


; Attributes: bp-based frame

sub_4C1CD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 14h
push	0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_20]
push	ecx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
mov	[edx+4], ecx
mov	eax, [ebp+arg_8]
mov	[edx+8], eax
mov	ecx, [ebp+arg_C]
mov	[edx+0Ch], ecx
call	sub_4CB0C0
add	esp, 2Ch
mov	esp, ebp
pop	ebp
retn
sub_4C1CD0 endp

align 10h


; Attributes: bp-based frame

sub_4C1D30 proc	near

var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 168h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4C20AB
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C1DAE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CB4A0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689

loc_4C1DAE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_60]
mov	[ebp+var_D8], eax
mov	[ebp+var_DC], ecx
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4C1E28
jb	short loc_4C1E1C
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_DC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4C1E28

loc_4C1E1C:
mov	[ebp+var_E0], 1
jmp	short loc_4C1E32

loc_4C1E28:
mov	[ebp+var_E0], 0

loc_4C1E32:
mov	dl, byte ptr [ebp+var_E0]
mov	[ebp+var_29], dl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4C1E7B
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689
jmp	loc_4C20A6

loc_4C1E7B:
lea	edx, [ebp+var_2B]
mov	[ebp+var_E4], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_E8], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_EC], eax
mov	[ebp+var_F0], ecx
mov	edx, [ebp+var_EC]
mov	eax, [ebp+var_F0]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4C1EF5
jb	short loc_4C1EE9
mov	edx, [ebp+var_EC]
mov	eax, [ebp+var_F0]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4C1EF5

loc_4C1EE9:
mov	[ebp+var_F4], 1
jmp	short loc_4C1EFF

loc_4C1EF5:
mov	[ebp+var_F4], 0

loc_4C1EFF:
mov	dl, byte ptr [ebp+var_F4]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4C1F31
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689

loc_4C1F31:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_CC]
jnz	short loc_4C1F7B
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689

loc_4C1F7B:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_F8], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_FC], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_78]
mov	[ebp+var_100], edx
mov	[ebp+var_104], eax
mov	ecx, [ebp+var_100]
mov	edx, [ebp+var_104]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4C1FF5
jb	short loc_4C1FE9
mov	ecx, [ebp+var_100]
mov	edx, [ebp+var_104]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4C1FF5

loc_4C1FE9:
mov	[ebp+var_108], 1
jmp	short loc_4C1FFF

loc_4C1FF5:
mov	[ebp+var_108], 0

loc_4C1FFF:
mov	cl, byte ptr [ebp+var_108]
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4C2075
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C204E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689
jmp	short loc_4C2073

loc_4C204E:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689

loc_4C2073:
jmp	short loc_4C20A6

loc_4C2075:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CB4A0
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689

loc_4C20A6:
jmp	loc_4C2689

loc_4C20AB:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_4C21D5
lea	ecx, [ebp+var_3A]
mov	[ebp+var_10C], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_110], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_114], eax
mov	[ebp+var_118], ecx
mov	edx, [ebp+var_114]
mov	eax, [ebp+var_118]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4C2149
jb	short loc_4C213D
mov	edx, [ebp+var_114]
mov	eax, [ebp+var_118]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4C2149

loc_4C213D:
mov	[ebp+var_11C], 1
jmp	short loc_4C2153

loc_4C2149:
mov	[ebp+var_11C], 0

loc_4C2153:
mov	dl, byte ptr [ebp+var_11C]
mov	[ebp+var_39], dl
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4C219F
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689
jmp	short loc_4C21D0

loc_4C219F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CB4A0
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689

loc_4C21D0:
jmp	loc_4C2689

loc_4C21D5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_120], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_124], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_98]
mov	[ebp+var_128], edx
mov	[ebp+var_12C], eax
mov	ecx, [ebp+var_128]
mov	edx, [ebp+var_12C]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4C2278
jb	short loc_4C226C
mov	ecx, [ebp+var_128]
mov	edx, [ebp+var_12C]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4C2278

loc_4C226C:
mov	[ebp+var_130], 1
jmp	short loc_4C2282

loc_4C2278:
mov	[ebp+var_130], 0

loc_4C2282:
mov	cl, byte ptr [ebp+var_130]
mov	[ebp+var_12], cl
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	loc_4C235E
lea	eax, [ebp+var_47]
mov	[ebp+var_134], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_138], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	edx, [ebp+var_A4]
mov	eax, [ebp+arg_8]
mov	[ebp+var_13C], edx
mov	[ebp+var_140], eax
mov	ecx, [ebp+var_13C]
mov	edx, [ebp+var_140]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4C233D
jb	short loc_4C2331
mov	ecx, [ebp+var_13C]
mov	edx, [ebp+var_140]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4C233D

loc_4C2331:
mov	[ebp+var_144], 1
jmp	short loc_4C2347

loc_4C233D:
mov	[ebp+var_144], 0

loc_4C2347:
movzx	ecx, byte ptr [ebp+var_144]
test	ecx, ecx
jz	short loc_4C235E
mov	[ebp+var_148], 1
jmp	short loc_4C2368

loc_4C235E:
mov	[ebp+var_148], 0

loc_4C2368:
mov	dl, byte ptr [ebp+var_148]
mov	[ebp+var_46], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 1
jz	short loc_4C2392
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C2392:
movzx	ecx, [ebp+var_46]
test	ecx, ecx
jz	short loc_4C23F4
mov	edx, [ebp+var_18]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4C23CA
mov	eax, [ebp+var_18]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689
jmp	short loc_4C23EF

loc_4C23CA:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	loc_4C2689

loc_4C23EF:
jmp	loc_4C2689

loc_4C23F4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	edx, [ebp+var_1C]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	eax, [ebp+var_12]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4C24D2
lea	edx, [ebp+var_48]
mov	[ebp+var_14C], edx
mov	[ebp+var_4], 18h
mov	eax, [ebp+arg_4]
mov	[ebp+var_B8], eax
lea	ecx, [ebp+var_B1]
mov	[ebp+var_150], ecx
mov	byte ptr [ebp+var_4], 19h
mov	edx, [ebp+var_B8]
add	edx, 10h
mov	[ebp+var_B0], edx
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_154], eax
mov	[ebp+var_158], ecx
mov	edx, [ebp+var_154]
mov	eax, [ebp+var_158]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4C24B1
jb	short loc_4C24A5
mov	edx, [ebp+var_154]
mov	eax, [ebp+var_158]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4C24B1

loc_4C24A5:
mov	[ebp+var_15C], 1
jmp	short loc_4C24BB

loc_4C24B1:
mov	[ebp+var_15C], 0

loc_4C24BB:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_1D], dl
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C24D2:
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	loc_4C25B2
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	loc_4C25B2
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_CC]
jz	loc_4C25A6
lea	eax, [ebp+var_4A]
mov	[ebp+var_160], eax
mov	[ebp+var_4], 1Ch
mov	ecx, [ebp+var_58]
or	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_C4], edx
lea	eax, [ebp+var_BD]
mov	[ebp+var_164], eax
mov	[ebp+var_4], 1Dh
mov	ecx, [ebp+var_C4]
add	ecx, 10h
mov	[ebp+var_BC], ecx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_BC]
mov	[ebp+var_168], edx
mov	[ebp+var_16C], eax
mov	ecx, [ebp+var_168]
mov	edx, [ebp+var_16C]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4C2591
jb	short loc_4C2585
mov	ecx, [ebp+var_168]
mov	edx, [ebp+var_16C]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4C2591

loc_4C2585:
mov	[ebp+var_170], 1
jmp	short loc_4C259B

loc_4C2591:
mov	[ebp+var_170], 0

loc_4C259B:
movzx	ecx, byte ptr [ebp+var_170]
test	ecx, ecx
jz	short loc_4C25B2

loc_4C25A6:
mov	[ebp+var_174], 1
jmp	short loc_4C25BC

loc_4C25B2:
mov	[ebp+var_174], 0

loc_4C25BC:
mov	dl, byte ptr [ebp+var_174]
mov	[ebp+var_49], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 2
jz	short loc_4C25E6
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C25E6:
movzx	ecx, [ebp+var_49]
test	ecx, ecx
jz	short loc_4C263F
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4C261B
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	short loc_4C2689
jmp	short loc_4C263D

loc_4C261B:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CB2D0
mov	eax, [ebp+arg_0]
jmp	short loc_4C2689

loc_4C263D:
jmp	short loc_4C2689

loc_4C263F:
movzx	edx, [ebp+var_12]
movzx	eax, [ebp+var_1D]
cmp	edx, eax
jnz	short loc_4C265D
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C2689
jmp	short loc_4C2689

loc_4C265D:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CB4A0
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C2689:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C1D30 endp

align 10h


; Attributes: bp-based frame

sub_4C26A0 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C26A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_EC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4C293A
mov	edx, [ebp+var_EC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C271E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4CBA30
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95

loc_4C271E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4C27A0
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95
jmp	loc_4C2935

loc_4C27A0:
lea	edx, [ebp+var_2B]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_6D]
mov	[ebp+var_FC], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_74]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_6C]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_4C280B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95

loc_4C280B:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_EC]
jnz	short loc_4C2855
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95

loc_4C2855:
lea	ecx, [ebp+var_2D]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 8
mov	edx, [ebp+var_10]
mov	[ebp+var_80], edx
lea	eax, [ebp+var_79]
mov	[ebp+var_104], eax
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_80]
add	ecx, 10h
mov	[ebp+var_78], ecx
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_2C], al
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4C2904
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C28DD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95
jmp	short loc_4C2902

loc_4C28DD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95

loc_4C2902:
jmp	short loc_4C2935

loc_4C2904:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CBA30
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95

loc_4C2935:
jmp	loc_4C2D95

loc_4C293A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_EC]
jnz	loc_4C2A19
lea	ecx, [ebp+var_3A]
mov	[ebp+var_108], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_EC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_10C], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_88]
call	sub_404510
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_39]
test	eax, eax
jz	short loc_4C29E3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95
jmp	short loc_4C2A14

loc_4C29E3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CBA30
mov	[ebp+var_94], eax
mov	edx, [ebp+var_94]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95

loc_4C2A14:
jmp	loc_4C2D95

loc_4C2A19:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_110], ecx
mov	[ebp+var_4], 10h
mov	edx, [ebp+arg_4]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_99]
mov	[ebp+var_114], eax
mov	byte ptr [ebp+var_4], 11h
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+var_98]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_12]
test	edx, edx
jz	short loc_4C2B0A
lea	eax, [ebp+var_47]
mov	[ebp+var_118], eax
mov	[ebp+var_4], 14h
mov	ecx, [ebp+var_58]
or	ecx, 1
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_A5]
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 15h
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_A4]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4C2B0A
mov	[ebp+var_120], 1
jmp	short loc_4C2B14

loc_4C2B0A:
mov	[ebp+var_120], 0

loc_4C2B14:
mov	al, byte ptr [ebp+var_120]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4C2B3E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C2B3E:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4C2BA0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C2B76
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95
jmp	short loc_4C2B9B

loc_4C2B76:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	loc_4C2D95

loc_4C2B9B:
jmp	loc_4C2D95

loc_4C2BA0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4C2C2F
lea	eax, [ebp+var_48]
mov	[ebp+var_124], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_128], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_B0]
call	sub_404510
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C2C2F:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4C2CBE
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_4C2CBE
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_EC]
jz	short loc_4C2CB2
lea	ecx, [ebp+var_4A]
mov	[ebp+var_12C], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_CD]
mov	[ebp+var_130], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_D4]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C2CBE

loc_4C2CB2:
mov	[ebp+var_134], 1
jmp	short loc_4C2CC8

loc_4C2CBE:
mov	[ebp+var_134], 0

loc_4C2CC8:
mov	cl, byte ptr [ebp+var_134]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4C2CF2
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C2CF2:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4C2D4B
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4C2D27
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	short loc_4C2D95
jmp	short loc_4C2D49

loc_4C2D27:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_4CB890
mov	eax, [ebp+arg_0]
jmp	short loc_4C2D95

loc_4C2D49:
jmp	short loc_4C2D95

loc_4C2D4B:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4C2D69
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C2D95
jmp	short loc_4C2D95

loc_4C2D69:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_4CBA30
mov	[ebp+var_E8], eax
mov	edx, [ebp+var_E8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C2D95:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C26A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C2DB0(void *)
sub_4C2DB0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C2DB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_14]
call	sub_46B570
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	edx, edx
and	edx, 1
jz	short loc_4C2E1E
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4C2E1E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C2DB0 endp

align 10h


; Attributes: bp-based frame

sub_4C2E30 proc	near

var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_165= byte ptr -165h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_141= byte ptr -141h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_11D= byte ptr -11Dh
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_F9=	byte ptr -0F9h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C2E30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1E8h
mov	[ebp+var_18C], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_18C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4C324D
mov	edx, [ebp+var_18C]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C2EAE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_4CBE40
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C394D

loc_4C2EAE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_190], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_194], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_6C]
cmp	ecx, [ebp+var_70]
jl	short loc_4C2F38
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_74]
cmp	eax, [ebp+var_78]
jnz	short loc_4C2F2C
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax+4]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_7C]
cmp	edx, [ebp+var_80]
jb	short loc_4C2F38

loc_4C2F2C:
mov	[ebp+var_198], 0
jmp	short loc_4C2F42

loc_4C2F38:
mov	[ebp+var_198], 1

loc_4C2F42:
mov	al, byte ptr [ebp+var_198]
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_29]
test	ecx, ecx
jz	short loc_4C2F8B
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	loc_4C394D
jmp	loc_4C3248

loc_4C2F8B:
lea	eax, [ebp+var_2B]
mov	[ebp+var_19C], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_8C], ecx
lea	edx, [ebp+var_85]
mov	[ebp+var_1A0], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_8C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_84]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_90]
cmp	edx, [ebp+var_94]
jl	short loc_4C304E
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_98]
cmp	ecx, [ebp+var_9C]
jnz	short loc_4C3042
mov	edx, [ebp+var_84]
mov	eax, [edx+4]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A0]
cmp	eax, [ebp+var_A4]
jb	short loc_4C304E

loc_4C3042:
mov	[ebp+var_1A4], 0
jmp	short loc_4C3058

loc_4C304E:
mov	[ebp+var_1A4], 1

loc_4C3058:
mov	cl, byte ptr [ebp+var_1A4]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_4C308A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C394D

loc_4C308A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_18C]
jnz	short loc_4C30D4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	loc_4C394D

loc_4C30D4:
lea	eax, [ebp+var_2D]
mov	[ebp+var_1A8], eax
mov	[ebp+var_4], 8
mov	ecx, [ebp+var_10]
mov	[ebp+var_B0], ecx
lea	edx, [ebp+var_A9]
mov	[ebp+var_1AC], edx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_B0]
add	eax, 10h
mov	[ebp+var_A8], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_B4]
cmp	edx, [ebp+var_B8]
jl	short loc_4C3197
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
cmp	ecx, [ebp+var_C0]
jnz	short loc_4C318B
mov	edx, [ebp+arg_8]
mov	eax, [edx+4]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C4]
cmp	eax, [ebp+var_C8]
jb	short loc_4C3197

loc_4C318B:
mov	[ebp+var_1B0], 0
jmp	short loc_4C31A1

loc_4C3197:
mov	[ebp+var_1B0], 1

loc_4C31A1:
mov	cl, byte ptr [ebp+var_1B0]
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4C3217
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C31F0
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	loc_4C394D
jmp	short loc_4C3215

loc_4C31F0:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	loc_4C394D

loc_4C3215:
jmp	short loc_4C3248

loc_4C3217:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_4CBE40
mov	[ebp+var_CC], eax
mov	edx, [ebp+var_CC]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C394D

loc_4C3248:
jmp	loc_4C394D

loc_4C324D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_18C]
jnz	loc_4C33B1
lea	ecx, [ebp+var_3A]
mov	[ebp+var_1B4], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_18C]
mov	eax, [edx+0Ch]
mov	[ebp+var_D8], eax
lea	ecx, [ebp+var_D1]
mov	[ebp+var_1B8], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_D8]
add	edx, 10h
mov	[ebp+var_D0], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+var_D0]
mov	ecx, [eax]
mov	[ebp+var_DC], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_DC]
cmp	ecx, [ebp+var_E0]
jl	short loc_4C3325
mov	edx, [ebp+var_D0]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_E8], edx
mov	eax, [ebp+var_E4]
cmp	eax, [ebp+var_E8]
jnz	short loc_4C3319
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
mov	[ebp+var_F0], ecx
mov	edx, [ebp+var_EC]
cmp	edx, [ebp+var_F0]
jb	short loc_4C3325

loc_4C3319:
mov	[ebp+var_1BC], 0
jmp	short loc_4C332F

loc_4C3325:
mov	[ebp+var_1BC], 1

loc_4C332F:
mov	al, byte ptr [ebp+var_1BC]
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_4C337B
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_18C]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	loc_4C394D
jmp	short loc_4C33AC

loc_4C337B:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_4CBE40
mov	[ebp+var_F4], eax
mov	eax, [ebp+var_F4]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C394D

loc_4C33AC:
jmp	loc_4C394D

loc_4C33B1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_18]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	edx, [ebp+var_45]
mov	[ebp+var_1C0], edx
mov	[ebp+var_4], 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_100], eax
lea	ecx, [ebp+var_F9]
mov	[ebp+var_1C4], ecx
mov	byte ptr [ebp+var_4], 11h
mov	edx, [ebp+var_100]
add	edx, 10h
mov	[ebp+var_F8], edx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_104], ecx
mov	edx, [ebp+var_F8]
mov	eax, [edx]
mov	[ebp+var_108], eax
mov	ecx, [ebp+var_104]
cmp	ecx, [ebp+var_108]
jl	short loc_4C348E
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_F8]
mov	edx, [ecx]
mov	[ebp+var_110], edx
mov	eax, [ebp+var_10C]
cmp	eax, [ebp+var_110]
jnz	short loc_4C3482
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_F8]
mov	ecx, [eax+4]
mov	[ebp+var_118], ecx
mov	edx, [ebp+var_114]
cmp	edx, [ebp+var_118]
jb	short loc_4C348E

loc_4C3482:
mov	[ebp+var_1C8], 0
jmp	short loc_4C3498

loc_4C348E:
mov	[ebp+var_1C8], 1

loc_4C3498:
mov	al, byte ptr [ebp+var_1C8]
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jz	loc_4C35AE
lea	edx, [ebp+var_47]
mov	[ebp+var_1CC], edx
mov	[ebp+var_4], 14h
mov	eax, [ebp+var_58]
or	eax, 1
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_124], ecx
lea	edx, [ebp+var_11D]
mov	[ebp+var_1D0], edx
mov	[ebp+var_4], 15h
mov	eax, [ebp+var_124]
add	eax, 10h
mov	[ebp+var_11C], eax
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	ecx, [ebp+var_11C]
mov	edx, [ecx]
mov	[ebp+var_128], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_12C], ecx
mov	edx, [ebp+var_128]
cmp	edx, [ebp+var_12C]
jl	short loc_4C358D
mov	eax, [ebp+var_11C]
mov	ecx, [eax]
mov	[ebp+var_130], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_134], eax
mov	ecx, [ebp+var_130]
cmp	ecx, [ebp+var_134]
jnz	short loc_4C3581
mov	edx, [ebp+var_11C]
mov	eax, [edx+4]
mov	[ebp+var_138], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_13C], edx
mov	eax, [ebp+var_138]
cmp	eax, [ebp+var_13C]
jb	short loc_4C358D

loc_4C3581:
mov	[ebp+var_1D4], 0
jmp	short loc_4C3597

loc_4C358D:
mov	[ebp+var_1D4], 1

loc_4C3597:
movzx	ecx, byte ptr [ebp+var_1D4]
test	ecx, ecx
jz	short loc_4C35AE
mov	[ebp+var_1D8], 1
jmp	short loc_4C35B8

loc_4C35AE:
mov	[ebp+var_1D8], 0

loc_4C35B8:
mov	dl, byte ptr [ebp+var_1D8]
mov	[ebp+var_46], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
and	eax, 1
jz	short loc_4C35E2
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C35E2:
movzx	ecx, [ebp+var_46]
test	ecx, ecx
jz	short loc_4C3644
mov	edx, [ebp+var_18]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4C361A
mov	eax, [ebp+var_18]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	loc_4C394D
jmp	short loc_4C363F

loc_4C361A:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	loc_4C394D

loc_4C363F:
jmp	loc_4C394D

loc_4C3644:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	edx, [ebp+var_1C]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	eax, [ebp+var_12]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4C375C
lea	edx, [ebp+var_48]
mov	[ebp+var_1DC], edx
mov	[ebp+var_4], 18h
mov	eax, [ebp+arg_4]
mov	[ebp+var_148], eax
lea	ecx, [ebp+var_141]
mov	[ebp+var_1E0], ecx
mov	byte ptr [ebp+var_4], 19h
mov	edx, [ebp+var_148]
add	edx, 10h
mov	[ebp+var_140], edx
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	eax, [ebp+var_140]
mov	ecx, [eax]
mov	[ebp+var_14C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_150], eax
mov	ecx, [ebp+var_14C]
cmp	ecx, [ebp+var_150]
jl	short loc_4C373B
mov	edx, [ebp+var_140]
mov	eax, [edx]
mov	[ebp+var_154], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_158], edx
mov	eax, [ebp+var_154]
cmp	eax, [ebp+var_158]
jnz	short loc_4C372F
mov	ecx, [ebp+var_140]
mov	edx, [ecx+4]
mov	[ebp+var_15C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
mov	[ebp+var_160], ecx
mov	edx, [ebp+var_15C]
cmp	edx, [ebp+var_160]
jb	short loc_4C373B

loc_4C372F:
mov	[ebp+var_1E4], 0
jmp	short loc_4C3745

loc_4C373B:
mov	[ebp+var_1E4], 1

loc_4C3745:
mov	al, byte ptr [ebp+var_1E4]
mov	[ebp+var_1D], al
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C375C:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	loc_4C3876
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	loc_4C3876
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18C]
jz	loc_4C386A
lea	ecx, [ebp+var_4A]
mov	[ebp+var_1E8], ecx
mov	[ebp+var_4], 1Ch
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_16C], eax
lea	ecx, [ebp+var_165]
mov	[ebp+var_1EC], ecx
mov	[ebp+var_4], 1Dh
mov	edx, [ebp+var_16C]
add	edx, 10h
mov	[ebp+var_164], edx
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_170], ecx
mov	edx, [ebp+var_164]
mov	eax, [edx]
mov	[ebp+var_174], eax
mov	ecx, [ebp+var_170]
cmp	ecx, [ebp+var_174]
jl	short loc_4C3855
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_178], eax
mov	ecx, [ebp+var_164]
mov	edx, [ecx]
mov	[ebp+var_17C], edx
mov	eax, [ebp+var_178]
cmp	eax, [ebp+var_17C]
jnz	short loc_4C3849
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_180], edx
mov	eax, [ebp+var_164]
mov	ecx, [eax+4]
mov	[ebp+var_184], ecx
mov	edx, [ebp+var_180]
cmp	edx, [ebp+var_184]
jb	short loc_4C3855

loc_4C3849:
mov	[ebp+var_1F0], 0
jmp	short loc_4C385F

loc_4C3855:
mov	[ebp+var_1F0], 1

loc_4C385F:
movzx	eax, byte ptr [ebp+var_1F0]
test	eax, eax
jz	short loc_4C3876

loc_4C386A:
mov	[ebp+var_1F4], 1
jmp	short loc_4C3880

loc_4C3876:
mov	[ebp+var_1F4], 0

loc_4C3880:
mov	cl, byte ptr [ebp+var_1F4]
mov	[ebp+var_49], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_58]
and	edx, 2
jz	short loc_4C38AA
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C38AA:
movzx	eax, [ebp+var_49]
test	eax, eax
jz	short loc_4C3903
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4C38DF
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	short loc_4C394D
jmp	short loc_4C3901

loc_4C38DF:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_4CBC50
mov	eax, [ebp+arg_0]
jmp	short loc_4C394D

loc_4C3901:
jmp	short loc_4C394D

loc_4C3903:
movzx	ecx, [ebp+var_12]
movzx	edx, [ebp+var_1D]
cmp	ecx, edx
jnz	short loc_4C3921
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C394D
jmp	short loc_4C394D

loc_4C3921:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_4CBE40
mov	[ebp+var_188], eax
mov	edx, [ebp+var_188]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C394D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C2E30 endp

align 10h


; Attributes: bp-based frame

sub_4C3960 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_50F1D0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_479650
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_4C39D6

loc_4C39C4:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 0Ch
mov	[ebp+var_38], ecx

loc_4C39D6:
cmp	[ebp+var_3C], 0
jbe	short loc_4C39F4
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
jmp	short loc_4C39C4

loc_4C39F4:
mov	eax, [ebp+var_38]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_4C3A1F
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4C3A1F:
mov	ecx, [ebp+var_9C]
call	sub_50F2B0
mov	eax, [ebp+var_4]
imul	eax, 0Ch
add	eax, [ebp+var_8]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_4C3960 endp

align 10h


; Attributes: bp-based frame

sub_4C3A70 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_17=	byte ptr -17h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4C3A97
mov	edx, [ebp+var_54]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4C3A97
mov	[ebp+var_58], 1
jmp	short loc_4C3A9E

loc_4C3A97:
mov	[ebp+var_58], 0

loc_4C3A9E:
movzx	ecx, byte ptr [ebp+var_58]
test	ecx, ecx
jz	short loc_4C3ADC
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [edx+4]
mov	[ebp+var_10], ecx
mov	edx, [edx+8]
mov	[ebp+var_C], edx
xor	eax, eax
mov	[ebp+var_15], al
lea	ecx, [ebp+var_15]
push	ecx
lea	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_54]
call	sub_4C3A70
jmp	loc_4C3C80

loc_4C3ADC:
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_4C3BC8
xor	edx, edx
mov	[ebp+var_16], dl
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_1C]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_54]
add	ecx, [edx+4]
mov	eax, [ebp+var_54]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[ebp+var_17], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
imul	eax, 0Ch
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	eax, [ebp+arg_4]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_34]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_30], eax
jmp	short loc_4C3BA5

loc_4C3B93:
mov	edx, [ebp+var_34]
add	edx, 0Ch
mov	[ebp+var_34], edx
mov	eax, [ebp+var_30]
sub	eax, 1
mov	[ebp+var_30], eax

loc_4C3BA5:
cmp	[ebp+var_30], 0
jle	short loc_4C3BC3
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_34]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
jmp	short loc_4C3B93

loc_4C3BC3:
jmp	loc_4C3C80

loc_4C3BC8:
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_40], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 0Ch
add	ecx, [ebp+var_40]
mov	[ebp+var_38], ecx
push	0
lea	edx, [ebp+var_39]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_40]
push	edx
call	sub_4CFE60
add	esp, 14h
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_38]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_18], dl
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_4]
imul	edx, 0Ch
mov	eax, [ebp+var_54]
add	edx, [eax+4]
mov	ecx, [ebp+var_54]
mov	[ecx+4], edx
mov	edx, [ebp+arg_0]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_50]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4C], eax
jmp	short loc_4C3C62

loc_4C3C50:
mov	edx, [ebp+var_50]
add	edx, 0Ch
mov	[ebp+var_50], edx
mov	eax, [ebp+var_4C]
sub	eax, 1
mov	[ebp+var_4C], eax

loc_4C3C62:
cmp	[ebp+var_4C], 0
jle	short loc_4C3C80
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_50]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
jmp	short loc_4C3C50

loc_4C3C80:
mov	esp, ebp
pop	ebp
retn	10h
sub_4C3A70 endp

align 10h


; Attributes: bp-based frame

sub_4C3C90 proc	near

var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C3C90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_407C40
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4C3D1F

loc_4C3CED:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_4079C0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C3D1F
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C3D1F:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C3C90 endp

align 10h


; Attributes: bp-based frame

sub_4C3D40 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4C3D67
mov	edx, [ebp+var_4C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4C3D67
mov	[ebp+var_50], 1
jmp	short loc_4C3D6E

loc_4C3D67:
mov	[ebp+var_50], 0

loc_4C3D6E:
movzx	ecx, byte ptr [ebp+var_50]
test	ecx, ecx
jz	short loc_4C3DA0
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_4C3D40
jmp	loc_4C3F1D

loc_4C3DA0:
mov	eax, [ebp+var_4C]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_4C3E76
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+var_4C]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_4]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_4C]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
shl	edx, 2
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A290
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
sub	edx, [ebp+var_2C]
sar	edx, 2
mov	[ebp+var_28], edx
jmp	short loc_4C3E5F

loc_4C3E4D:
mov	eax, [ebp+var_2C]
add	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_28]
sub	ecx, 1
mov	[ebp+var_28], ecx

loc_4C3E5F:
cmp	[ebp+var_28], 0
jle	short loc_4C3E71
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_4C3E4D

loc_4C3E71:
jmp	loc_4C3F1D

loc_4C3E76:
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
mov	edx, [ebp+var_38]
lea	eax, [edx+ecx*4]
mov	[ebp+var_30], eax
push	0
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
call	sub_4CFF40
add	esp, 14h
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_30]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	edx, [ebp+var_4C]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
mov	eax, [ebp+var_4]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_4C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_48]
sar	ecx, 2
mov	[ebp+var_44], ecx
jmp	short loc_4C3F0B

loc_4C3EF9:
mov	edx, [ebp+var_48]
add	edx, 4
mov	[ebp+var_48], edx
mov	eax, [ebp+var_44]
sub	eax, 1
mov	[ebp+var_44], eax

loc_4C3F0B:
cmp	[ebp+var_44], 0
jle	short loc_4C3F1D
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
jmp	short loc_4C3EF9

loc_4C3F1D:
mov	esp, ebp
pop	ebp
retn	10h
sub_4C3D40 endp

align 10h


; Attributes: bp-based frame

sub_4C3F30 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C3F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4C3FCB

loc_4C3F8D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_4C3FAE
mov	edx, [ebp+var_3C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4C3FAE:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C3FCB
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C3FCB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C3F30 endp

align 10h


; Attributes: bp-based frame

sub_4C3FE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_4C3FFA

loc_4C3FF1:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_4C3FFA:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_4C402E
mov	[ebp+var_8], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_4C402C
mov	edx, 20h
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4C402C:
jmp	short loc_4C3FF1

loc_4C402E:
mov	esp, ebp
pop	ebp
retn	8
sub_4C3FE0 endp

align 10h


; Attributes: bp-based frame

sub_4C4040 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_4B97B0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C4040 endp

align 10h


; Attributes: bp-based frame

sub_4C4140 proc	near

var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_12D= byte ptr -12Dh
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_119= byte ptr -119h
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_109= byte ptr -109h
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C4140
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 130h
mov	[ebp+var_F4], ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_50], eax
mov	eax, [ebp+arg_0]
mov	eax, [eax]
xor	edx, edx
div	[ebp+var_50]
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_14]
lea	edx, [eax+ecx*4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_14]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_60]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_6C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_64]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
xor	edx, edx
cmp	ecx, [ebp+var_6C]
setz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_4C4207
xor	eax, eax
jmp	loc_4C467C

loc_4C4207:
mov	[ebp+var_18], 0
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_70], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_70]
mov	[ebp+var_78], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_0]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_4C426F
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jnz	short loc_4C426F
mov	[ebp+var_104], 1
jmp	short loc_4C4279

loc_4C426F:
mov	[ebp+var_104], 0

loc_4C4279:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	loc_4C441E
mov	eax, [ebp+var_14]
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_20]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_F4]
call	sub_52A900
mov	[ebp+var_80], eax
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_24], edx

loc_4C42B2:
lea	eax, [ebp+var_90]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_88]
mov	eax, [ebp+var_84]
mov	[edx], eax
mov	ecx, [ebp+var_90]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_50F900
mov	[ebp+var_8C], eax
mov	edx, [ebp+var_8C]
mov	[ebp+var_38], edx
lea	eax, [ebp+var_38]
mov	[ebp+var_108], eax
mov	ecx, [ebp+var_108]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_18]
add	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_9C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
xor	eax, eax
cmp	edx, [ebp+var_9C]
setnz	al
mov	[ebp+var_109], al
movzx	ecx, [ebp+var_109]
test	ecx, ecx
jz	loc_4C43E2
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_A0], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_A0]
mov	[ebp+var_A8], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+arg_0]
mov	[ebp+var_110], ecx
mov	[ebp+var_114], edx
mov	eax, [ebp+var_110]
mov	ecx, [ebp+var_114]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_4C43C9
mov	eax, [ebp+var_110]
mov	ecx, [ebp+var_114]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_4C43C9
mov	[ebp+var_118], 1
jmp	short loc_4C43D3

loc_4C43C9:
mov	[ebp+var_118], 0

loc_4C43D3:
movzx	eax, byte ptr [ebp+var_118]
test	eax, eax
jnz	loc_4C42B2

loc_4C43E2:
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_14]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_20]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_4C4659

loc_4C441E:
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_B0]
call	sub_640660
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_B0]
push	eax
lea	ecx, [ebp+var_28]
call	sub_640660
jmp	short loc_4C4456

loc_4C4446:
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx

loc_4C4456:
lea	edx, [ebp+var_BC]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ebp+var_B4]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
xor	ecx, ecx
cmp	eax, [ebp+var_BC]
setnz	cl
mov	[ebp+var_119], cl
movzx	edx, [ebp+var_119]
test	edx, edx
jz	loc_4C4659
mov	eax, [ebp+var_1C]
add	eax, 8
mov	[ebp+var_C0], eax
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_C0]
mov	[ebp+var_C8], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_C8]
mov	eax, [ebp+arg_0]
mov	[ebp+var_120], edx
mov	[ebp+var_124], eax
mov	ecx, [ebp+var_120]
mov	edx, [ebp+var_124]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_4C4509
mov	ecx, [ebp+var_120]
mov	edx, [ebp+var_124]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jnz	short loc_4C4509
mov	[ebp+var_128], 1
jmp	short loc_4C4513

loc_4C4509:
mov	[ebp+var_128], 0

loc_4C4513:
movzx	ecx, byte ptr [ebp+var_128]
test	ecx, ecx
jz	loc_4C4654

loc_4C4522:
lea	edx, [ebp+var_D8]
mov	[ebp+var_D0], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_CC]
mov	[ecx], edx
mov	eax, [ebp+var_D8]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_50F900
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_48]
mov	[ebp+var_12C], edx
mov	eax, [ebp+var_12C]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_18]
add	edx, 1
mov	[ebp+var_18], edx
lea	eax, [ebp+var_E4]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_DC], ecx
mov	edx, [ebp+var_E0]
mov	eax, [ebp+var_DC]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
xor	edx, edx
cmp	ecx, [ebp+var_E4]
setnz	dl
mov	[ebp+var_12D], dl
movzx	eax, [ebp+var_12D]
test	eax, eax
jz	loc_4C4652
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 3
mov	edx, [ebp+var_E8]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_F0]
mov	ecx, [ebp+arg_0]
mov	[ebp+var_134], eax
mov	[ebp+var_138], ecx
mov	edx, [ebp+var_134]
mov	eax, [ebp+var_138]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_4C4639
mov	edx, [ebp+var_134]
mov	eax, [ebp+var_138]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jnz	short loc_4C4639
mov	[ebp+var_13C], 1
jmp	short loc_4C4643

loc_4C4639:
mov	[ebp+var_13C], 0

loc_4C4643:
movzx	edx, byte ptr [ebp+var_13C]
test	edx, edx
jnz	loc_4C4522

loc_4C4652:
jmp	short loc_4C4659

loc_4C4654:
jmp	loc_4C4446

loc_4C4659:
mov	eax, [ebp+var_F4]
mov	ecx, [eax+14h]
sub	ecx, [ebp+var_18]
mov	edx, [ebp+var_F4]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_F4]
call	sub_4C4690
mov	eax, [ebp+var_18]

loc_4C467C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C4140 endp

align 10h


; Attributes: bp-based frame

sub_4C4690 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:dbl_15FCD40
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_4C46F8
jmp	loc_4C47E9

loc_4C46F8:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_4C476C
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_4C476A
jmp	short loc_4C47E9

loc_4C476A:
jmp	short loc_4C4778

loc_4C476C:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_4C4778
jmp	short loc_4C47E9

loc_4C4778:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_4C47DB
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_4C47D0
jmp	short loc_4C47DB

loc_4C47D0:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_4C4778

loc_4C47DB:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_4C47F0

loc_4C47E9:
mov	esp, ebp
pop	ebp
retn
sub_4C4690 endp

align 10h


; Attributes: bp-based frame

sub_4C47F0 proc	near

var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_111= byte ptr -111h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E6=	byte ptr -0E6h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C47F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 114h
mov	[ebp+var_104], ecx
lea	eax, [ebp+var_39]
push	eax
mov	ecx, [ebp+var_104]
add	ecx, 4
call	sub_4B9960
mov	[ebp+var_108], eax
mov	ecx, [ebp+var_108]
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_5C]
push	edx
lea	ecx, [ebp+var_18]
call	sub_4B99C0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_40], 0
lea	eax, [ebp+var_3A]
push	eax
mov	ecx, [ebp+var_104]
add	ecx, 8
call	sub_604B20
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	[ebp+var_110], ecx
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+var_110]
push	edx
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_24]
call	sub_4045A0
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_3A]
call	nullsub_1
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0

loc_4C48B3:
mov	edx, [ebp+var_104]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_4C4AE7
mov	edx, [ebp+var_104]
mov	eax, [edx+4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_6C], eax
mov	byte ptr [ebp+var_4], 7
mov	ecx, [ebp+var_6C]
mov	[ebp+var_74], ecx
mov	byte ptr [ebp+var_4], 6
mov	edx, [ebp+var_74]
mov	eax, [edx]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ebp+var_38], eax
jmp	short loc_4C492F

loc_4C491F:
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx

loc_4C492F:
lea	edx, [ebp+var_80]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_78]
mov	[ecx], edx
mov	eax, [ebp+var_38]
xor	ecx, ecx
cmp	eax, [ebp+var_80]
setnz	cl
mov	[ebp+var_111], cl
movzx	edx, [ebp+var_111]
test	edx, edx
jz	loc_4C4A07
mov	eax, [ebp+var_38]
add	eax, 8
mov	[ebp+var_84], eax
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	byte ptr [ebp+var_4], 6
mov	edx, [ebp+var_14]
add	edx, 8
mov	[ebp+var_90], edx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_90]
mov	[ebp+var_98], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_8C]
mov	[ebp+var_118], ecx
mov	[ebp+var_11C], edx
mov	eax, [ebp+var_118]
mov	ecx, [ebp+var_11C]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_4C49ED
mov	eax, [ebp+var_118]
mov	ecx, [ebp+var_11C]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_4C49ED
mov	[ebp+var_120], 1
jmp	short loc_4C49F7

loc_4C49ED:
mov	[ebp+var_120], 0

loc_4C49F7:
movzx	eax, byte ptr [ebp+var_120]
test	eax, eax
jz	short loc_4C4A07
jmp	loc_4C491F

loc_4C4A07:
mov	ecx, [ebp+var_30]
mov	[ebp+var_28], ecx
lea	edx, [ebp+var_28]
push	edx
lea	eax, [ebp+var_24]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_4C]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_A0], eax
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_34], edx
push	ecx
mov	eax, esp
mov	[ebp+var_50], esp
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_54], esp
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_104]
add	edx, 4
mov	eax, [ebp+var_AC]
mov	[eax], edx
mov	ecx, [ebp+var_104]
add	ecx, 4
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_58], esp
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_B0]
mov	[ecx], edx
lea	ecx, [ebp+var_18]
call	sub_4C72C0
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_30]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_28]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_4C48B3

loc_4C4AE7:
mov	eax, [ebp+var_104]
add	eax, 4
mov	[ebp+var_F0], eax
xor	ecx, ecx
mov	[ebp+var_E6], cl
mov	edx, [ebp+var_F0]
mov	eax, [edx]
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_F0]
mov	[edx], ecx
mov	eax, [ebp+var_EC]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_104]
add	ecx, 8
call	sub_404640
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_24]
call	sub_402DB0
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_18]
call	sub_4B9860
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C47F0 endp

align 10h


; Attributes: bp-based frame

sub_4C4B70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_506A50
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_4C4B70 endp



; Attributes: bp-based frame

sub_4C4BC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4B1ED0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_4B1820
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 8
mov	esp, ebp
pop	ebp
retn	4
sub_4C4BC0 endp

align 10h


; Attributes: bp-based frame

sub_4C4C00 proc	near

var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_34], eax
push	0
mov	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_506A50
mov	[ebp+var_20], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_24], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_48], edx
xor	eax, eax
mov	[ebp+var_3D], al
lea	ecx, [ebp+var_3D]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_68]
add	ecx, 4
call	sub_4D2830
mov	[ebp+var_2C], 0
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_4C6F50
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_1C], edx
mov	[ebp+var_C], 0
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_422EC0
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_418C90
mov	[ebp+var_14], eax
jmp	short loc_4C4CF8

loc_4C4CE8:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_4C4CF8:
mov	edx, [ebp+var_1C]
xor	eax, eax
cmp	edx, [ebp+var_C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C4D40
jmp	short loc_4C4D1E

loc_4C4D0C:
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_18], eax

loc_4C4D1E:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_10]
jz	short loc_4C4D3E
mov	edx, [ebp+var_8]
mov	eax, [edx]
cmp	eax, [ebp+var_1C]
jnz	short loc_4C4D3A
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx], edx
jmp	short loc_4C4D3C

loc_4C4D3A:
jmp	short loc_4C4D3E

loc_4C4D3C:
jmp	short loc_4C4D0C

loc_4C4D3E:
jmp	short loc_4C4CE8

loc_4C4D40:
mov	[ebp+var_30], 0
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+18h]
mov	esp, ebp
pop	ebp
retn	4
sub_4C4C00 endp

align 10h


; Attributes: bp-based frame

sub_4C4D80 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	ecx, [ebp+var_60]
call	sub_4CC1F0
mov	edx, [ebp+var_5C]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_58]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4C4D80 endp



; Attributes: bp-based frame

sub_4C4DB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLworesmgr2inte ; "LWOResMgr2Interface"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4C4E15
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_4C4E15
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_4C4E15
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_4C4E0E
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_4C4E15

loc_4C4E0E:
mov	[ebp+var_10], 0

loc_4C4E15:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_4C4DB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C4E20(float,	int, int, int, int, int, int)
sub_4C4E20 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 80h

loc_4C4E3E:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 5
cmp	eax, 10h
jle	loc_4C4FAE
cmp	[ebp+arg_C], 0
jnz	short loc_4C4E85
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4CC8D0
add	esp, 18h
jmp	loc_4C4FAE

loc_4C4E85:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
sub	edx, 20h
push	edx		; int
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 5
cdq
sub	eax, edx
sar	eax, 1
shl	eax, 5
add	eax, [ebp+arg_0]
push	eax		; int
mov	eax, [ebp+arg_0]
push	eax		; float
call	sub_4CC910
add	esp, 18h
mov	[ebp+var_84], eax
sub	esp, 20h
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_84]
mov	eax, [ebp+var_80]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_84]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_80]
add	ecx, 18h
call	sub_4C70F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_80]
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; float
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_4CC9B0
add	esp, 34h
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	[ebp+var_10], ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_C]
push	ecx		; int
push	0		; int
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_10]
push	eax		; float
call	sub_4C4E20
add	esp, 1Ch
mov	ecx, [ebp+var_10]
mov	[ebp+arg_4], ecx
jmp	loc_4C4E3E

loc_4C4FAE:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C4E20 endp

align 10h


; Attributes: bp-based frame

sub_4C4FC0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 5
cmp	eax, 10h
jle	short loc_4C502B
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
push	0
mov	eax, [ebp+arg_0]
add	eax, 200h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4CCAD0
add	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_10]
mov	[edx+8], eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 200h
push	edx
call	sub_4D1110
add	esp, 18h
jmp	short loc_4C5053

loc_4C502B:
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CCAD0
add	esp, 18h

loc_4C5053:
pop	ebp
retn
sub_4C4FC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C5060(void *)
sub_4C5060 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5060
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_4C50C3
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4C50C3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C5060 endp

align 10h


; Attributes: bp-based frame

sub_4C50E0 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_73=	byte ptr -73h
var_72=	byte ptr -72h
var_71=	byte ptr -71h
var_70=	byte ptr -70h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
push	edi
mov	[ebp+var_B0], ecx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4C5118
mov	edx, [ebp+var_B0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4C5118
mov	[ebp+var_B4], 1
jmp	short loc_4C5122

loc_4C5118:
mov	[ebp+var_B4], 0

loc_4C5122:
movzx	ecx, byte ptr [ebp+var_B4]
test	ecx, ecx
jz	short loc_4C515F
mov	esi, [ebp+arg_8]
mov	ecx, 19h
lea	edi, [ebp+var_70]
rep movsd
xor	edx, edx
mov	[ebp+var_71], dl
lea	eax, [ebp+var_71]
push	eax
lea	ecx, [ebp+var_70]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B0]
call	sub_4C50E0
jmp	loc_4C5366

loc_4C515F:
mov	ecx, [ebp+var_B0]
mov	eax, [ecx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_4C5272
xor	edx, edx
mov	[ebp+var_72], dl
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 64h
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_80]
push	ecx
mov	edx, [ebp+var_7C]
push	edx
mov	eax, [ebp+var_78]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
imul	ecx, 64h
mov	edx, [ebp+var_B0]
add	ecx, [edx+4]
mov	eax, [ebp+var_B0]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[ebp+var_73], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
imul	eax, 64h
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_90], eax
mov	eax, [ebp+arg_4]
imul	eax, 64h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_8C], eax
jmp	short loc_4C5252

loc_4C5234:
mov	edx, [ebp+var_90]
add	edx, 64h
mov	[ebp+var_90], edx
mov	eax, [ebp+var_8C]
sub	eax, 1
mov	[ebp+var_8C], eax

loc_4C5252:
cmp	[ebp+var_8C], 0
jle	short loc_4C526D
mov	esi, [ebp+arg_8]
mov	ecx, 19h
mov	edi, [ebp+var_90]
rep movsd
jmp	short loc_4C5234

loc_4C526D:
jmp	loc_4C5366

loc_4C5272:
mov	ecx, [ebp+var_B0]
mov	edx, [ecx+4]
mov	[ebp+var_9C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
imul	eax, 64h
add	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
push	0
lea	ecx, [ebp+var_95]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_9C]
push	ecx
call	sub_4D13C0
add	esp, 14h
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_94]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_74], cl
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A0]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_4]
imul	ecx, 64h
mov	edx, [ebp+var_B0]
add	ecx, [edx+4]
mov	eax, [ebp+var_B0]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_AC]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_A8], eax
jmp	short loc_4C534B

loc_4C532D:
mov	edx, [ebp+var_AC]
add	edx, 64h
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_A8]
sub	eax, 1
mov	[ebp+var_A8], eax

loc_4C534B:
cmp	[ebp+var_A8], 0
jle	short loc_4C5366
mov	esi, [ebp+arg_8]
mov	ecx, 19h
mov	edi, [ebp+var_AC]
rep movsd
jmp	short loc_4C532D

loc_4C5366:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_4C50E0 endp

align 10h


; Attributes: bp-based frame

sub_4C5370 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5370
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4C53AC
mov	edx, [ebp+var_6C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4C53AC
mov	[ebp+var_70], 1
jmp	short loc_4C53B3

loc_4C53AC:
mov	[ebp+var_70], 0

loc_4C53B3:
movzx	ecx, byte ptr [ebp+var_70]
test	ecx, ecx
jz	short loc_4C540F
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0
jz	short loc_4C53D1
mov	ecx, [ebp+var_18]
call	sub_40AA80

loc_4C53D1:
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_19]
push	edx
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_6C]
call	sub_4C5370
mov	[ebp+var_4], 0FFFFFFFFh
cmp	[ebp+var_18], 0
jz	short loc_4C540A
mov	ecx, [ebp+var_18]
call	sub_40AA90

loc_4C540A:
jmp	loc_4C5554

loc_4C540F:
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+arg_4]
jbe	loc_4C54CB
xor	edx, edx
mov	[ebp+var_1A], dl
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx+4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_6C]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_24], eax
push	0
lea	ecx, [ebp+var_1D]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
call	sub_4D1470
add	esp, 14h
mov	edx, [ebp+var_6C]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_6C]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_1B], cl
lea	edx, [ebp+var_1B]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_14]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CCE10
add	esp, 10h
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_47BEE0
add	esp, 0Ch
jmp	loc_4C5554

loc_4C54CB:
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_10]
mov	eax, [ebp+var_54]
lea	ecx, [eax+edx*4]
mov	[ebp+var_4C], ecx
push	0
lea	edx, [ebp+var_4D]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_54]
push	edx
call	sub_4CCD60
add	esp, 14h
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_4C]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_1C], dl
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
push	0
lea	edx, [ebp+var_55]
push	edx
mov	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4D1470
add	esp, 14h
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_6C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47BEE0
add	esp, 0Ch

loc_4C5554:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4C5370 endp

align 10h


; Attributes: bp-based frame

sub_4C5570 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_68]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_4CCEA0
mov	edx, [ebp+var_68]
mov	[ebp+var_64], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_64]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4C5570 endp



; Attributes: bp-based frame

sub_4C55A0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C55A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_4B8940
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4C563B

loc_4C55FD:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_4C561E
mov	edx, [ebp+var_3C]
imul	edx, 24h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4C561E:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C563B
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C563B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C55A0 endp

align 10h


; Attributes: bp-based frame

sub_4C5650 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4C58F3
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C56CE
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CD300
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D

loc_4C56CE:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_60]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_29]
test	ecx, ecx
jz	short loc_4C5753
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D
jmp	loc_4C58EE

loc_4C5753:
lea	eax, [ebp+var_2B]
mov	[ebp+var_D8], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_74], ecx
lea	edx, [ebp+var_6D]
mov	[ebp+var_DC], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_74]
add	eax, 10h
mov	[ebp+var_6C], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_4C57C1
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D

loc_4C57C1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_CC]
jnz	short loc_4C580B
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D

loc_4C580B:
lea	eax, [ebp+var_2D]
mov	[ebp+var_E0], eax
mov	[ebp+var_4], 8
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_79]
mov	[ebp+var_E4], edx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_80]
add	eax, 10h
mov	[ebp+var_78], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4C58BD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C5896
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D
jmp	short loc_4C58BB

loc_4C5896:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D

loc_4C58BB:
jmp	short loc_4C58EE

loc_4C58BD:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD300
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D

loc_4C58EE:
jmp	loc_4C5D5D

loc_4C58F3:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_4C59D5
lea	ecx, [ebp+var_3A]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_EC], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_4C599F
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D
jmp	short loc_4C59D0

loc_4C599F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD300
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D

loc_4C59D0:
jmp	loc_4C5D5D

loc_4C59D5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_18]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	edx, [ebp+var_45]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_A0], eax
lea	ecx, [ebp+var_99]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 11h
mov	edx, [ebp+var_A0]
add	edx, 10h
mov	[ebp+var_98], edx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_98]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jz	short loc_4C5ACC
lea	edx, [ebp+var_47]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 14h
mov	eax, [ebp+var_58]
or	eax, 1
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_AC], ecx
lea	edx, [ebp+var_A5]
mov	[ebp+var_FC], edx
mov	[ebp+var_4], 15h
mov	eax, [ebp+var_AC]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_4C5ACC
mov	[ebp+var_100], 1
jmp	short loc_4C5AD6

loc_4C5ACC:
mov	[ebp+var_100], 0

loc_4C5AD6:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4C5B00
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C5B00:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4C5B62
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C5B38
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D
jmp	short loc_4C5B5D

loc_4C5B38:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	loc_4C5D5D

loc_4C5B5D:
jmp	loc_4C5D5D

loc_4C5B62:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4C5BF4
lea	eax, [ebp+var_48]
mov	[ebp+var_104], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_108], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_1D], cl
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C5BF4:
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	loc_4C5C86
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_4C5C86
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_CC]
jz	short loc_4C5C7A
lea	edx, [ebp+var_4A]
mov	[ebp+var_10C], edx
mov	[ebp+var_4], 1Ch
mov	eax, [ebp+var_58]
or	eax, 2
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_C4], ecx
lea	edx, [ebp+var_BD]
mov	[ebp+var_110], edx
mov	[ebp+var_4], 1Dh
mov	eax, [ebp+var_C4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_BC]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_4C5C86

loc_4C5C7A:
mov	[ebp+var_114], 1
jmp	short loc_4C5C90

loc_4C5C86:
mov	[ebp+var_114], 0

loc_4C5C90:
mov	al, byte ptr [ebp+var_114]
mov	[ebp+var_49], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 2
jz	short loc_4C5CBA
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C5CBA:
movzx	edx, [ebp+var_49]
test	edx, edx
jz	short loc_4C5D13
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C5CEF
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	short loc_4C5D5D
jmp	short loc_4C5D11

loc_4C5CEF:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD160
mov	eax, [ebp+arg_0]
jmp	short loc_4C5D5D

loc_4C5D11:
jmp	short loc_4C5D5D

loc_4C5D13:
movzx	eax, [ebp+var_12]
movzx	ecx, [ebp+var_1D]
cmp	eax, ecx
jnz	short loc_4C5D31
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C5D5D
jmp	short loc_4C5D5D

loc_4C5D31:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CD300
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C5D5D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C5650 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C5D70(void *)
sub_4C5D70 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5D70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_407910
xor	edx, edx
and	edx, 1
jz	short loc_4C5DE2
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4C5DE2:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C5D70 endp



; Attributes: bp-based frame

sub_4C5DF0 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C5DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_CC], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4C6093
mov	edx, [ebp+var_CC]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C5E6E
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CD6B0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD

loc_4C5E6E:
lea	edx, [ebp+var_2A]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax
lea	ecx, [ebp+var_61]
mov	[ebp+var_D4], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_68]
add	edx, 10h
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_60]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_29], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_29]
test	ecx, ecx
jz	short loc_4C5EF3
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD
jmp	loc_4C608E

loc_4C5EF3:
lea	eax, [ebp+var_2B]
mov	[ebp+var_D8], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_74], ecx
lea	edx, [ebp+var_6D]
mov	[ebp+var_DC], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_74]
add	eax, 10h
mov	[ebp+var_6C], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_4C5F61
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD

loc_4C5F61:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_CC]
jnz	short loc_4C5FAB
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD

loc_4C5FAB:
lea	eax, [ebp+var_2D]
mov	[ebp+var_E0], eax
mov	[ebp+var_4], 8
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
lea	edx, [ebp+var_79]
mov	[ebp+var_E4], edx
mov	byte ptr [ebp+var_4], 9
mov	eax, [ebp+var_80]
add	eax, 10h
mov	[ebp+var_78], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_4C605D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C6036
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD
jmp	short loc_4C605B

loc_4C6036:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD

loc_4C605B:
jmp	short loc_4C608E

loc_4C605D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD6B0
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD

loc_4C608E:
jmp	loc_4C64FD

loc_4C6093:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_CC]
jnz	loc_4C6175
lea	ecx, [ebp+var_3A]
mov	[ebp+var_E8], ecx
mov	[ebp+var_4], 0Ch
mov	edx, [ebp+var_CC]
mov	eax, [edx+0Ch]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_89]
mov	[ebp+var_EC], ecx
mov	byte ptr [ebp+var_4], 0Dh
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_88], edx
mov	byte ptr [ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Ch
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_39], al
mov	[ebp+var_4], 0Fh
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_4C613F
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD
jmp	short loc_4C6170

loc_4C613F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD6B0
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD

loc_4C6170:
jmp	loc_4C64FD

loc_4C6175:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_18]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	edx, [ebp+var_45]
mov	[ebp+var_F0], edx
mov	[ebp+var_4], 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_A0], eax
lea	ecx, [ebp+var_99]
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 11h
mov	edx, [ebp+var_A0]
add	edx, 10h
mov	[ebp+var_98], edx
mov	byte ptr [ebp+var_4], 12h
mov	byte ptr [ebp+var_4], 10h
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_98]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_12], al
mov	[ebp+var_4], 13h
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jz	short loc_4C626C
lea	edx, [ebp+var_47]
mov	[ebp+var_F8], edx
mov	[ebp+var_4], 14h
mov	eax, [ebp+var_58]
or	eax, 1
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_AC], ecx
lea	edx, [ebp+var_A5]
mov	[ebp+var_FC], edx
mov	[ebp+var_4], 15h
mov	eax, [ebp+var_AC]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	[ebp+var_4], 16h
mov	byte ptr [ebp+var_4], 14h
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_4C626C
mov	[ebp+var_100], 1
jmp	short loc_4C6276

loc_4C626C:
mov	[ebp+var_100], 0

loc_4C6276:
mov	al, byte ptr [ebp+var_100]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_4C62A0
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 17h
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C62A0:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_4C6302
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C62D8
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD
jmp	short loc_4C62FD

loc_4C62D8:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	loc_4C64FD

loc_4C62FD:
jmp	loc_4C64FD

loc_4C6302:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_1C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_12]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_1D], cl
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	short loc_4C6394
lea	eax, [ebp+var_48]
mov	[ebp+var_104], eax
mov	[ebp+var_4], 18h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_B8], ecx
lea	edx, [ebp+var_B1]
mov	[ebp+var_108], edx
mov	byte ptr [ebp+var_4], 19h
mov	eax, [ebp+var_B8]
add	eax, 10h
mov	[ebp+var_B0], eax
mov	byte ptr [ebp+var_4], 1Ah
mov	byte ptr [ebp+var_4], 18h
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_1D], cl
mov	[ebp+var_4], 1Bh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C6394:
movzx	edx, [ebp+var_12]
test	edx, edx
jnz	loc_4C6426
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_4C6426
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_CC]
jz	short loc_4C641A
lea	edx, [ebp+var_4A]
mov	[ebp+var_10C], edx
mov	[ebp+var_4], 1Ch
mov	eax, [ebp+var_58]
or	eax, 2
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_C4], ecx
lea	edx, [ebp+var_BD]
mov	[ebp+var_110], edx
mov	[ebp+var_4], 1Dh
mov	eax, [ebp+var_C4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	[ebp+var_4], 1Eh
mov	byte ptr [ebp+var_4], 1Ch
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_BC]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_4C6426

loc_4C641A:
mov	[ebp+var_114], 1
jmp	short loc_4C6430

loc_4C6426:
mov	[ebp+var_114], 0

loc_4C6430:
mov	al, byte ptr [ebp+var_114]
mov	[ebp+var_49], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 2
jz	short loc_4C645A
and	[ebp+var_58], 0FFFFFFFDh
mov	[ebp+var_4], 1Fh
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C645A:
movzx	edx, [ebp+var_49]
test	edx, edx
jz	short loc_4C64B3
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4C648F
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	short loc_4C64FD
jmp	short loc_4C64B1

loc_4C648F:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_4CD510
mov	eax, [ebp+arg_0]
jmp	short loc_4C64FD

loc_4C64B1:
jmp	short loc_4C64FD

loc_4C64B3:
movzx	eax, [ebp+var_12]
movzx	ecx, [ebp+var_1D]
cmp	eax, ecx
jnz	short loc_4C64D1
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4C64FD
jmp	short loc_4C64FD

loc_4C64D1:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4CD6B0
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4C64FD:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C5DF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C6510(void *)
sub_4C6510 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C6510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_14]
call	sub_4ABBD0
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 6
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_4C6594
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4C6594:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C6510 endp

align 10h


; Attributes: bp-based frame

sub_4C65B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CDE40
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4C65B0 endp

align 10h


; Attributes: bp-based frame

sub_4C65F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CDEA0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4C65F0 endp

align 10h


; Attributes: bp-based frame

sub_4C6630 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	al, [ebp+arg_8]
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx-4]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
sub	eax, 1
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_4C6663:
cmp	[ebp+var_8], 0
jle	short loc_4C66B4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
mov	ecx, [ebp+var_C]
mov	edx, [eax+170h]
cmp	[ecx+170h], edx
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C66B4
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	esi, [ebp+arg_0]
mov	ecx, [esi+ecx*4]
mov	[eax+edx*4], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_4C6663

loc_4C66B4:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx+eax*4], edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4C6630 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C66D0(void *, int)
sub_4C66D0 proc	near

var_54=	dword ptr -54h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C66D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4C674B
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_4]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4C7200
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_4A6B80
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_54], eax
jmp	short loc_4C6752

loc_4C674B:
mov	[ebp+var_54], 0

loc_4C6752:
mov	ecx, [ebp+var_54]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C66D0 endp

align 10h


; Attributes: bp-based frame

sub_4C6770 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C6770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4C679D:
cmp	[ebp+var_14], 0
jz	short loc_4C67F5
lea	eax, [ebp+var_19]
mov	[ebp+var_4C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_18]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_4C67EA
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
mov	[ebp+var_14], edx
jmp	short loc_4C67F3

loc_4C67EA:
mov	eax, [ebp+var_14]
mov	ecx, [eax+0Ch]
mov	[ebp+var_14], ecx

loc_4C67F3:
jmp	short loc_4C679D

loc_4C67F5:
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_48]
jz	short loc_4C6839
lea	eax, [ebp+var_31]
mov	[ebp+var_50], eax
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jz	short loc_4C6839
mov	eax, [ebp+var_48]
mov	[ebp+var_10], eax

loc_4C6839:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C6770 endp

align 10h


; Attributes: bp-based frame

sub_4C6850 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C6850
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4C687D:
cmp	[ebp+var_14], 0
jz	short loc_4C68DD
lea	eax, [ebp+var_19]
mov	[ebp+var_3C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_38]
add	ecx, 14h
call	sub_42BEE0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4C68D2
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4C68DB

loc_4C68D2:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4C68DB:
jmp	short loc_4C687D

loc_4C68DD:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_38]
jz	short loc_4C6929
lea	edx, [ebp+var_29]
mov	[ebp+var_40], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_28], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_38]
add	ecx, 14h
call	sub_42BEE0
movzx	eax, al
test	eax, eax
jz	short loc_4C6929
mov	ecx, [ebp+var_38]
mov	[ebp+var_10], ecx

loc_4C6929:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C6850 endp

align 10h


; Attributes: bp-based frame

sub_4C6940 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CCFD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4C696D:
cmp	[ebp+var_14], 0
jz	short loc_4C69C8
lea	eax, [ebp+var_19]
mov	[ebp+var_2C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_4C69BD
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_4C69C6

loc_4C69BD:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_4C69C6:
jmp	short loc_4C696D

loc_4C69C8:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_28]
jz	short loc_4C6A0F
lea	ecx, [ebp+var_21]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_20], edx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C6A0F
mov	edx, [ebp+var_28]
mov	[ebp+var_10], edx

loc_4C6A0F:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C6940 endp

align 10h


; Attributes: bp-based frame

sub_4C6A30 proc	near

var_68=	dword ptr -68h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C6A30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_68], ecx
jmp	short loc_4C6A61

loc_4C6A58:
mov	edx, [ebp+var_68]
add	edx, 30h
mov	[ebp+var_68], edx

loc_4C6A61:
mov	eax, [ebp+var_68]
cmp	eax, [ebp+arg_4]
jz	short loc_4C6AA8
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_68]
add	ecx, 24h
call	sub_4A9130
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
call	sub_407910
xor	edx, edx
and	edx, 1
jz	short loc_4C6AA6
mov	eax, [ebp+var_68]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4C6AA6:
jmp	short loc_4C6A58

loc_4C6AA8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C6A30 endp

align 10h


; Attributes: bp-based frame

sub_4C6AC0 proc	near

var_60=	dword ptr -60h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_60], ecx
jmp	short loc_4C6ADC

loc_4C6AD3:
mov	edx, [ebp+var_60]
add	edx, 0Ch
mov	[ebp+var_60], edx

loc_4C6ADC:
mov	eax, [ebp+var_60]
cmp	eax, [ebp+arg_4]
jz	short loc_4C6B06
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_60]
call	sub_436CF0
xor	edx, edx
and	edx, 1
jz	short loc_4C6B04
mov	eax, [ebp+var_60]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4C6B04:
jmp	short loc_4C6AD3

loc_4C6B06:
mov	esp, ebp
pop	ebp
retn
sub_4C6AC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C6B10(void *, int)
sub_4C6B10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C6B10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4C6B9F
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+0Ch]
mov	eax, [ecx+10h]
mov	ecx, [ebp+var_18]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	cl, [eax+18h]
mov	[edx+18h], cl
mov	edx, [ebp+var_14]
mov	[ebp+var_1C], edx
jmp	short loc_4C6BA6

loc_4C6B9F:
mov	[ebp+var_1C], 0

loc_4C6BA6:
mov	eax, [ebp+var_1C]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C6B10 endp

align 10h


; Attributes: bp-based frame

sub_4C6BD0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_4C6BEC

loc_4C6BE3:
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx

loc_4C6BEC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_4C6C22
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_4C6C0B
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA90

loc_4C6C0B:
xor	ecx, ecx
and	ecx, 1
jz	short loc_4C6C20
push	4
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_4C6C20:
jmp	short loc_4C6BE3

loc_4C6C22:
mov	esp, ebp
pop	ebp
retn
sub_4C6BD0 endp

align 10h


; Attributes: bp-based frame

sub_4C6C30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 80h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CE060
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4C6C30 endp

align 10h


; Attributes: bp-based frame

sub_4C6C60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CE0A0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4C6C60 endp

align 10h


; Attributes: bp-based frame

sub_4C6C90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D4h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CE120
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4C6C90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C6CC0(void *, int)
sub_4C6CC0 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	3Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4C6D20
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4CF060
mov	[ebp+var_24], eax
jmp	short loc_4C6D27

loc_4C6D20:
mov	[ebp+var_24], 0

loc_4C6D27:
mov	eax, [ebp+var_24]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C6CC0 endp

align 10h


; Attributes: bp-based frame

sub_4C6D50 proc	near

var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C6D50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
mov	[ebp+var_44], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_44]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_0]
mov	al, [edx+1Ch]
mov	[ecx+1Ch], al
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 24h
push	ecx
mov	ecx, [ebp+var_44]
add	ecx, 24h
call	sub_4C7450
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C6D50 endp

align 10h


; Attributes: bp-based frame

sub_4C6DE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4022F0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+1Ch]
mov	[ecx+1Ch], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 24h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_4CCBC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4C6DE0 endp

align 10h


; Attributes: bp-based frame

sub_4C6E40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_486 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
add	eax, 18h
mov	[ebp+var_14], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_4C6E95
mov	eax, [ebp+var_10]
mov	ecx, [eax]
call	sub_40AA90

loc_4C6E95:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4C6EB8
mov	edx, [ebp+var_18]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4C6EB8:
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C6E40 endp

align 10h


; Attributes: bp-based frame

sub_4C6ED0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+arg_0]
add	edx, 4
mov	eax, [ebp+var_C]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 18h
call	sub_4CE200
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4C6ED0 endp

align 10h


; Attributes: bp-based frame

sub_4C6F50 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_404580
cmp	[ebp+arg_0], eax
jnb	short loc_4C6F88
mov	ecx, [ebp+var_20]
call	sub_418C90
push	eax
mov	ecx, [ebp+var_20]
call	sub_422EC0
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*4]
push	edx
mov	ecx, [ebp+var_20]
call	sub_404670
jmp	short loc_4C6FB7

loc_4C6F88:
mov	ecx, [ebp+var_20]
call	sub_404580
mov	ecx, [ebp+arg_0]
sub	ecx, eax
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_20]
call	sub_418C90
mov	[ebp+var_18], eax
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_4C7A90

loc_4C6FB7:
mov	esp, ebp
pop	ebp
retn	8
sub_4C6F50 endp

align 10h


; Attributes: bp-based frame

sub_4C6FC0 proc	near

var_44=	dword ptr -44h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C6FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 34h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_44], ecx
push	1
mov	ecx, [ebp+var_44]
call	sub_4C76D0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4CE3A0
add	esp, 8
jmp	short loc_4C703F

loc_4C700E:
cmp	[ebp+var_14], 0
jz	short loc_4C7029
mov	edx, 1
imul	edx, 5Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4C7029:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C7046
retn

loc_4C703F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C7046:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4C6FC0 endp



; Attributes: bp-based frame

sub_4C7070 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 15555555h
jbe	short loc_4C709D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4C709D:
cmp	[ebp+arg_0], 0
jz	short loc_4C70D4
mov	edx, [ebp+arg_0]
imul	edx, 0Ch
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 0Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_4C70DB

loc_4C70D4:
mov	[ebp+var_1C], 0

loc_4C70DB:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_4C7070 endp

align 10h


; Attributes: bp-based frame

sub_4C70F0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_48=	dword ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C70F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_78], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	[ebp+var_80], ecx
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_24], edx
mov	[ebp+var_20], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_24]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_2C], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
mov	[edx+4], ecx
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_78]
mov	[edx], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ecx+4], eax
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+var_6C]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	eax, [ebp+var_14]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_70], ecx
xor	edx, edx
mov	[ebp+var_3D], dl
lea	eax, [ebp+var_3D]
push	eax
mov	ecx, [ebp+var_74]
push	ecx
mov	edx, [ebp+var_70]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_4D1CE0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C70F0 endp

align 10h


; Attributes: bp-based frame

sub_4C7200 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C7200
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	[ebp+var_4C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_44]
call	sub_4C7730
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_44]
mov	[edx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C7200 endp

align 10h


; Attributes: bp-based frame

sub_4C72C0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_643F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_88], ecx
lea	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_38]
setnz	dl
mov	[ebp+var_89], dl
movzx	eax, [ebp+var_89]
test	eax, eax
jz	loc_4C7435
lea	ecx, [ebp+var_12]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_4B9960
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
mov	[ebp+var_94], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_13]
push	eax
mov	ecx, [ebp+var_88]
call	sub_4B9960
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_9C], ecx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_11], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4C7392
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E450
add	esp, 0Ch
jmp	loc_4C7435

loc_4C7392:
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_40]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_48], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_48]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_50], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	ecx, [ebp+var_88]
call	sub_4CE430
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+arg_C], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
lea	edx, [ebp+var_84]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_74]
mov	[ecx], edx
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_506A50
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
mov	[ebp+var_2C], edx

loc_4C7435:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4C72C0 endp

align 10h


; Attributes: bp-based frame

sub_4C7450 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C7450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4AC4F0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	[ebp+var_4C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_44]
call	sub_4C77D0
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_44]
mov	[edx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C7450 endp

align 10h


; Attributes: bp-based frame

sub_4C7510 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C7510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
add	eax, 8
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[eax], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4C7510 endp

align 10h


; Attributes: bp-based frame

sub_4C75C0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 5555555h
jbe	short loc_4C75E8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4C75E8:
cmp	[ebp+arg_0], 0
jz	short loc_4C760E
mov	ecx, [ebp+arg_0]
imul	ecx, 30h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_4C7615

loc_4C760E:
mov	[ebp+var_18], 0

loc_4C7615:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4C75C0 endp

align 10h


; Attributes: bp-based frame

sub_4C7620 proc	near

var_44=	dword ptr -44h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C7620
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 34h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_44], ecx
push	1
mov	ecx, [ebp+var_44]
call	sub_4C7870
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4CE4B0
add	esp, 8
jmp	short loc_4C769F

loc_4C766E:
cmp	[ebp+var_14], 0
jz	short loc_4C7689
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4C7689:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C76A6
retn

loc_4C769F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C76A6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4C7620 endp



; Attributes: bp-based frame

sub_4C76D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 2C8590Bh
jbe	short loc_4C76F8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4C76F8:
cmp	[ebp+arg_0], 0
jz	short loc_4C771E
mov	ecx, [ebp+arg_0]
imul	ecx, 5Ch
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_4C7725

loc_4C771E:
mov	[ebp+var_18], 0

loc_4C7725:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4C76D0 endp

align 10h


; Attributes: bp-based frame

sub_4C7730 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C77D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_4B8480
mov	ecx, [ebp+var_30]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_30]
mov	[eax+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C7730 endp

align 10h


; Attributes: bp-based frame

sub_4C77D0 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C77D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_4B8760
mov	ecx, [ebp+var_30]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 64h
mov	eax, [ebp+var_30]
add	edx, [eax]
mov	ecx, [ebp+var_30]
mov	[ecx+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C77D0 endp

align 10h


; Attributes: bp-based frame

sub_4C7870 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 4924924h
jbe	short loc_4C7898
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4C7898:
cmp	[ebp+arg_0], 0
jz	short loc_4C78BE
mov	ecx, [ebp+arg_0]
imul	ecx, 38h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_4C78C5

loc_4C78BE:
mov	[ebp+var_18], 0

loc_4C78C5:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4C7870 endp

align 10h


; Attributes: bp-based frame

sub_4C78D0 proc	near

var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_18=	byte ptr  20h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C78D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
movzx	edx, [ebp+arg_18]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_14]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_28], esp
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_18]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_2C], esp
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
lea	eax, [ebp+var_10]
push	eax
call	sub_4CF1C0
add	esp, 18h
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_18]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4C7980
mov	ecx, [ebp+arg_4]
mov	[ebp+var_30], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
jmp	short loc_4C79CB
jmp	short loc_4C79BD

loc_4C7980:
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_405C10
add	esp, 8
neg	eax
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_1C]
add	edx, [ebp+var_4C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
jmp	short loc_4C79CB

loc_4C79BD:
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C79CB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C78D0 endp

align 10h


; Attributes: bp-based frame

sub_4C79E0 proc	near

var_1D=	byte ptr -1Dh
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C79E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
jmp	short loc_4C7A2C

loc_4C7A1A:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_4C7A2C:
cmp	[ebp+var_18], 0
jle	short loc_4C7A54
xor	ecx, ecx
mov	byte ptr [ebp+var_1C+1], cl
mov	dl, byte ptr [ebp+var_1C+1]
mov	byte ptr [ebp+var_1A+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_1C], al
mov	cl, byte ptr [ebp+var_1C]
mov	byte ptr [ebp+var_1A], cl
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_8]
mov	cl, [eax]
mov	[edx], cl
jmp	short loc_4C7A1A

loc_4C7A54:
jmp	short loc_4C7A71

loc_4C7A56:
xor	edx, edx
mov	[ebp+var_1D], dl
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C7A78
retn

loc_4C7A71:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C7A78:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4C79E0 endp

align 10h


; Attributes: bp-based frame

sub_4C7A90 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4C7AF1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_4C7AD2
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4CF510
jmp	short loc_4C7AF1

loc_4C7AD2:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4CF460

loc_4C7AF1:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4C7A90 endp

align 10h


; Attributes: bp-based frame

sub_4C7B00 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4C7B50
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_4C7B00 endp

align 10h


; Attributes: bp-based frame

sub_4C7B50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C7B50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4C7B9B

loc_4C7B92:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4C7B9B:
cmp	[ebp+var_18], 0
jle	short loc_4C7BC5
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_456D10
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_14], eax
jmp	short loc_4C7B92

loc_4C7BC5:
mov	eax, [ebp+var_14]
jmp	short loc_4C7BF7

loc_4C7BCA:
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_4B7700
add	esp, 8
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C7BF7
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C7BF7:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4C7B50 endp

align 10h


; Attributes: bp-based frame

sub_4C7C10 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4CF680
add	esp, 1Ch
pop	ebp
retn
sub_4C7C10 endp

align 10h


; Attributes: bp-based frame

sub_4C7C50 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+arg_C]
call	sub_1012350
movzx	edx, al
test	edx, edx
jz	short loc_4C7CAD
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
lea	ecx, [ebp+arg_C]
call	sub_1012350
movzx	edx, al
test	edx, edx
jz	short loc_4C7C88
mov	eax, [ebp+arg_4]
jmp	short loc_4C7CEC
jmp	short loc_4C7CAB

loc_4C7C88:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+arg_C]
call	sub_1012350
movzx	edx, al
test	edx, edx
jz	short loc_4C7CA6
mov	eax, [ebp+arg_8]
jmp	short loc_4C7CEC
jmp	short loc_4C7CAB

loc_4C7CA6:
mov	eax, [ebp+arg_0]
jmp	short loc_4C7CEC

loc_4C7CAB:
jmp	short loc_4C7CEC

loc_4C7CAD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+arg_C]
call	sub_1012350
movzx	edx, al
test	edx, edx
jz	short loc_4C7CCB
mov	eax, [ebp+arg_0]
jmp	short loc_4C7CEC
jmp	short loc_4C7CEC

loc_4C7CCB:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
lea	ecx, [ebp+arg_C]
call	sub_1012350
movzx	edx, al
test	edx, edx
jz	short loc_4C7CE9
mov	eax, [ebp+arg_8]
jmp	short loc_4C7CEC
jmp	short loc_4C7CEC

loc_4C7CE9:
mov	eax, [ebp+arg_4]

loc_4C7CEC:
pop	ebp
retn
sub_4C7C50 endp

align 10h


; Attributes: bp-based frame

sub_4C7CF0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch

loc_4C7CF6:
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+arg_14]
call	sub_1012350
movzx	edx, al
test	edx, edx
jz	short loc_4C7D18
mov	eax, [ebp+arg_0]
add	eax, 0Ch
mov	[ebp+arg_0], eax
jmp	short loc_4C7CF6

loc_4C7D18:
mov	ecx, [ebp+arg_4]
sub	ecx, 0Ch
mov	[ebp+arg_4], ecx

loc_4C7D21:
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+arg_14]
call	sub_1012350
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C7D43
mov	edx, [ebp+arg_4]
sub	edx, 0Ch
mov	[ebp+arg_4], edx
jmp	short loc_4C7D21

loc_4C7D43:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jb	short loc_4C7D50
mov	eax, [ebp+arg_0]
jmp	short loc_4C7D6B

loc_4C7D50:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4CF7E0
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 0Ch
mov	[ebp+arg_0], eax
jmp	short loc_4C7CF6

loc_4C7D6B:
mov	esp, ebp
pop	ebp
retn
sub_4C7CF0 endp

align 10h


; Attributes: bp-based frame

sub_4C7D70 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_4C7D83
jmp	loc_4C7E4A

loc_4C7D83:
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
jmp	short loc_4C7D97

loc_4C7D8E:
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	[ebp+var_4], edx

loc_4C7D97:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	loc_4C7E4A
mov	ecx, [ebp+arg_C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+arg_14]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ecx+4]
mov	[ebp+var_18], eax
mov	ecx, [ecx+8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_28]
call	sub_1012350
movzx	ecx, al
test	ecx, ecx
jz	short loc_4C7E0D
mov	edx, [ebp+var_4]
add	edx, 0Ch
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5F4430
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[edx+4], ecx
mov	eax, [ebp+var_14]
mov	[edx+8], eax
jmp	short loc_4C7E45

loc_4C7E0D:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_28]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_20]
mov	[ecx+8], edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	[eax+4], edx
mov	ecx, [ebp+var_14]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_4D2750
add	esp, 1Ch

loc_4C7E45:
jmp	loc_4C7D8E

loc_4C7E4A:
mov	esp, ebp
pop	ebp
retn
sub_4C7D70 endp

align 10h


; Attributes: bp-based frame

sub_4C7E50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 10h
mov	eax, [ebp+arg_4]
shl	eax, 4
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4C7E50 endp

align 10h


; Attributes: bp-based frame

sub_4C7E80 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C7E80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 8Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4C7ED7

loc_4C7EC5:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 30h
mov	[ebp+var_14], eax

loc_4C7ED7:
cmp	[ebp+var_18], 0
jle	short loc_4C7EEF
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4CF980
add	esp, 8
jmp	short loc_4C7EC5

loc_4C7EEF:
jmp	short loc_4C7F19

loc_4C7EF1:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4C6A30
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C7F20
retn

loc_4C7F19:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C7F20:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4C7E80 endp

align 10h


; Attributes: bp-based frame

sub_4C7F40 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C7F9C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE590
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C808A

loc_4C7F9C:
cmp	[ebp+arg_10], 0
jnz	short loc_4C7FFA
cmp	[ebp+arg_C], 0
jnz	short loc_4C7FF1
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C7FFA

loc_4C7FF1:
mov	[ebp+var_30], 1
jmp	short loc_4C8001

loc_4C7FFA:
mov	[ebp+var_30], 0

loc_4C8001:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4C8028
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C8028:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C805E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE590
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4C805C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4C805C:
jmp	short loc_4C808A

loc_4C805E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CE590
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4C808A
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4C808A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C7F40 endp

align 10h


; Attributes: bp-based frame

sub_4C80E0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C813C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE660
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C822A

loc_4C813C:
cmp	[ebp+arg_10], 0
jnz	short loc_4C819A
cmp	[ebp+arg_C], 0
jnz	short loc_4C8191
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C819A

loc_4C8191:
mov	[ebp+var_30], 1
jmp	short loc_4C81A1

loc_4C819A:
mov	[ebp+var_30], 0

loc_4C81A1:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4C81C8
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C81C8:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C81FE
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE660
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4C81FC
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4C81FC:
jmp	short loc_4C822A

loc_4C81FE:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CE660
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4C822A
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4C822A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C80E0 endp

align 10h


; Attributes: bp-based frame

sub_4C8280 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C82B4:
cmp	[ebp+var_1C], 0
jz	short loc_4C8331
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4C831A
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4C8326

loc_4C831A:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4C8326:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4C82B4

loc_4C8331:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4C83D9
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4C83CA
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4C80E0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4C8488
jmp	short loc_4C83D9

loc_4C83CA:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C83D9:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4C846D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4C80E0
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4C8488

loc_4C846D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4C8488:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C8280 endp

align 10h


; Attributes: bp-based frame

sub_4C84A0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C84FC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE710
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C85EA

loc_4C84FC:
cmp	[ebp+arg_10], 0
jnz	short loc_4C855A
cmp	[ebp+arg_C], 0
jnz	short loc_4C8551
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C855A

loc_4C8551:
mov	[ebp+var_30], 1
jmp	short loc_4C8561

loc_4C855A:
mov	[ebp+var_30], 0

loc_4C8561:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4C8588
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C8588:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C85BE
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE710
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4C85BC
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4C85BC:
jmp	short loc_4C85EA

loc_4C85BE:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CE710
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4C85EA
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4C85EA:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C84A0 endp

align 10h


; Attributes: bp-based frame

sub_4C8640 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C8674:
cmp	[ebp+var_1C], 0
jz	short loc_4C86F1
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4C86DA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4C86E6

loc_4C86DA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4C86E6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4C8674

loc_4C86F1:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4C8799
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4C878A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4C84A0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4C8848
jmp	short loc_4C8799

loc_4C878A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C8799:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4C882D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4C84A0
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4C8848

loc_4C882D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4C8848:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C8640 endp

align 10h


; Attributes: bp-based frame

sub_4C8860 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C8894:
cmp	[ebp+var_1C], 0
jz	short loc_4C8911
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4C88FA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4C8906

loc_4C88FA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4C8906:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4C8894

loc_4C8911:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4C89B9
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4C89AA
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4C9200
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4C8A68
jmp	short loc_4C89B9

loc_4C89AA:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C89B9:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4C8A4D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4C9200
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4C8A68

loc_4C8A4D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4C8A68:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C8860 endp

align 10h


; Attributes: bp-based frame

sub_4C8A80 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C8ADC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE7C0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C8BCA

loc_4C8ADC:
cmp	[ebp+arg_10], 0
jnz	short loc_4C8B3A
cmp	[ebp+arg_C], 0
jnz	short loc_4C8B31
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C8B3A

loc_4C8B31:
mov	[ebp+var_30], 1
jmp	short loc_4C8B41

loc_4C8B3A:
mov	[ebp+var_30], 0

loc_4C8B41:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4C8B68
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C8B68:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C8B9E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE7C0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4C8B9C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4C8B9C:
jmp	short loc_4C8BCA

loc_4C8B9E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CE7C0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4C8BCA
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4C8BCA:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C8A80 endp

align 10h


; Attributes: bp-based frame

sub_4C8C20 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C8C54:
cmp	[ebp+var_1C], 0
jz	short loc_4C8CD1
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4C8CBA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4C8CC6

loc_4C8CBA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4C8CC6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4C8C54

loc_4C8CD1:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4C8D79
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4C8D6A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4C8A80
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4C8E28
jmp	short loc_4C8D79

loc_4C8D6A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C8D79:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4C8E0D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4C8A80
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4C8E28

loc_4C8E0D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4C8E28:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C8C20 endp

align 10h


; Attributes: bp-based frame

sub_4C8E40 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C8E9C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE870
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C8F8A

loc_4C8E9C:
cmp	[ebp+arg_10], 0
jnz	short loc_4C8EFA
cmp	[ebp+arg_C], 0
jnz	short loc_4C8EF1
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C8EFA

loc_4C8EF1:
mov	[ebp+var_30], 1
jmp	short loc_4C8F01

loc_4C8EFA:
mov	[ebp+var_30], 0

loc_4C8F01:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4C8F28
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C8F28:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C8F5E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE870
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4C8F5C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4C8F5C:
jmp	short loc_4C8F8A

loc_4C8F5E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CE870
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4C8F8A
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4C8F8A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C8E40 endp

align 10h


; Attributes: bp-based frame

sub_4C8FE0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C9014:
cmp	[ebp+var_1C], 0
jz	short loc_4C9091
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4C907A
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4C9086

loc_4C907A:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4C9086:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4C9014

loc_4C9091:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4C9139
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4C912A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4C8E40
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4C91E8
jmp	short loc_4C9139

loc_4C912A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C9139:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4C91CD
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4C8E40
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4C91E8

loc_4C91CD:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4C91E8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C8FE0 endp

align 10h


; Attributes: bp-based frame

sub_4C9200 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C925C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE940
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C934A

loc_4C925C:
cmp	[ebp+arg_10], 0
jnz	short loc_4C92BA
cmp	[ebp+arg_C], 0
jnz	short loc_4C92B1
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C92BA

loc_4C92B1:
mov	[ebp+var_30], 1
jmp	short loc_4C92C1

loc_4C92BA:
mov	[ebp+var_30], 0

loc_4C92C1:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4C92E8
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C92E8:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C931E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE940
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4C931C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4C931C:
jmp	short loc_4C934A

loc_4C931E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CE940
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4C934A
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4C934A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C9200 endp

align 10h


; Attributes: bp-based frame

sub_4C93A0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C93FC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4C7620
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C94EA

loc_4C93FC:
cmp	[ebp+arg_10], 0
jnz	short loc_4C945A
cmp	[ebp+arg_C], 0
jnz	short loc_4C9451
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4C945A

loc_4C9451:
mov	[ebp+var_30], 1
jmp	short loc_4C9461

loc_4C945A:
mov	[ebp+var_30], 0

loc_4C9461:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4C9488
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C9488:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C94BE
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4C7620
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4C94BC
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4C94BC:
jmp	short loc_4C94EA

loc_4C94BE:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4C7620
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4C94EA
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4C94EA:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C93A0 endp

align 10h


; Attributes: bp-based frame

sub_4C9540 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C9574:
cmp	[ebp+var_1C], 0
jz	short loc_4C95F1
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4C95DA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4C95E6

loc_4C95DA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4C95E6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4C9574

loc_4C95F1:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4C9699
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4C968A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4C93A0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4C9748
jmp	short loc_4C9699

loc_4C968A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C9699:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4C972D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4C93A0
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4C9748

loc_4C972D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4C9748:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C9540 endp

align 10h


; Attributes: bp-based frame

sub_4C9760 proc	near

var_28=	dword ptr -28h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4C9760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_4C97AF

loc_4C979D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax

loc_4C97AF:
cmp	[ebp+var_18], 0
jle	short loc_4C97C7
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
jmp	short loc_4C979D

loc_4C97C7:
jmp	short loc_4C9804

loc_4C97C9:
xor	eax, eax
mov	[ebp+var_21], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_28], ecx
jmp	short loc_4C97DF

loc_4C97D6:
mov	edx, [ebp+var_28]
add	edx, 4
mov	[ebp+var_28], edx

loc_4C97DF:
mov	eax, [ebp+var_28]
cmp	eax, [ebp+var_14]
jz	short loc_4C97EE
xor	ecx, ecx
mov	[ebp+var_22], cl
jmp	short loc_4C97D6

loc_4C97EE:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4C980B
retn

loc_4C9804:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C980B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4C9760 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C9820(int, int, void	*)
sub_4C9820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
jmp	short loc_4C9842

loc_4C9839:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_4C9842:
cmp	[ebp+var_4], 0
jle	short loc_4C986C
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+arg_8]
push	ecx		; void *
call	sub_4B7770
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 0Ch
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
add	eax, 0Ch
mov	[ebp+arg_8], eax
jmp	short loc_4C9839

loc_4C986C:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_4C9820 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4C9880(void *, int)
sub_4C9880 proc	near

var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4C98E0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_44D270
mov	[ebp+var_3C], eax
jmp	short loc_4C98E7

loc_4C98E0:
mov	[ebp+var_3C], 0

loc_4C98E7:
mov	eax, [ebp+var_3C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4C9880 endp

align 10h


; Attributes: bp-based frame

sub_4C9910 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C996C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE9F0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C9A5F

loc_4C996C:
cmp	[ebp+arg_10], 0
jnz	short loc_4C99CF
cmp	[ebp+arg_C], 0
jnz	short loc_4C99C6
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_1011870
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_4C99CF

loc_4C99C6:
mov	[ebp+var_30], 1
jmp	short loc_4C99D6

loc_4C99CF:
mov	[ebp+var_30], 0

loc_4C99D6:
mov	al, byte ptr [ebp+var_30]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_4C99FD
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C99FD:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4C9A33
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4CE9F0
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_4C9A31
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_4C9A31:
jmp	short loc_4C9A5F

loc_4C9A33:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CE9F0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_4C9A5F
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_4C9A5F:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_24]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_24]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_24]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C9910 endp

align 10h


; Attributes: bp-based frame

sub_4C9AB0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C9AE1:
cmp	[ebp+var_1C], 0
jz	short loc_4C9B5A
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C9B49
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+8]
mov	[ebp+var_74], edx
jmp	short loc_4C9B52

loc_4C9B49:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+0Ch]
mov	[ebp+var_74], ecx

loc_4C9B52:
mov	edx, [ebp+var_74]
mov	[ebp+var_1C], edx
jmp	short loc_4C9AE1

loc_4C9B5A:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4C9BFC
mov	ecx, [ebp+var_68]
mov	edx, [ecx+8]
mov	[ebp+var_48], edx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_50]
setz	dl
mov	[ebp+var_75], dl
movzx	eax, [ebp+var_75]
test	eax, eax
jz	short loc_4C9BED
mov	[ebp+var_29], 1
push	0
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_4C9910
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_29]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_4C9CAA
jmp	short loc_4C9BFC

loc_4C9BED:
mov	edx, [ebp+var_10]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C9BFC:
lea	eax, [ebp+var_32]
mov	[ebp+var_7C], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_10]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_59]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_60]
add	eax, 10h
mov	[ebp+var_58], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_58]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4C9C8F
mov	[ebp+var_33], 1
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_4C9910
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_33]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_4C9CAA

loc_4C9C8F:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_39]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_4C9CAA:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C9AB0 endp

align 10h


; Attributes: bp-based frame

sub_4C9CC0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4C9D1C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CEAA0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4C9E0F

loc_4C9D1C:
cmp	[ebp+arg_10], 0
jnz	short loc_4C9D7F
cmp	[ebp+arg_C], 0
jnz	short loc_4C9D76
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_1011870
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_4C9D7F

loc_4C9D76:
mov	[ebp+var_30], 1
jmp	short loc_4C9D86

loc_4C9D7F:
mov	[ebp+var_30], 0

loc_4C9D86:
mov	al, byte ptr [ebp+var_30]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_4C9DAD
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4C9DAD:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4C9DE3
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4CEAA0
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_4C9DE1
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_4C9DE1:
jmp	short loc_4C9E0F

loc_4C9DE3:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CEAA0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_4C9E0F
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_4C9E0F:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_24]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_24]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_24]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4C9CC0 endp

align 10h


; Attributes: bp-based frame

sub_4C9E60 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4C9E91:
cmp	[ebp+var_1C], 0
jz	short loc_4C9F0A
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4C9EF9
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+8]
mov	[ebp+var_74], edx
jmp	short loc_4C9F02

loc_4C9EF9:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+0Ch]
mov	[ebp+var_74], ecx

loc_4C9F02:
mov	edx, [ebp+var_74]
mov	[ebp+var_1C], edx
jmp	short loc_4C9E91

loc_4C9F0A:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4C9FAC
mov	ecx, [ebp+var_68]
mov	edx, [ecx+8]
mov	[ebp+var_48], edx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_50]
setz	dl
mov	[ebp+var_75], dl
movzx	eax, [ebp+var_75]
test	eax, eax
jz	short loc_4C9F9D
mov	[ebp+var_29], 1
push	0
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_4C9CC0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_29]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_4CA05A
jmp	short loc_4C9FAC

loc_4C9F9D:
mov	edx, [ebp+var_10]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4C9FAC:
lea	eax, [ebp+var_32]
mov	[ebp+var_7C], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_10]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_59]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_60]
add	eax, 10h
mov	[ebp+var_58], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_58]
push	edx
call	sub_1011870
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4CA03F
mov	[ebp+var_33], 1
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_4C9CC0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_33]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_4CA05A

loc_4CA03F:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_39]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_4CA05A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4C9E60 endp

align 10h


; Attributes: bp-based frame

sub_4CA070 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4CA0CC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CEB70
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CA1BA

loc_4CA0CC:
cmp	[ebp+arg_10], 0
jnz	short loc_4CA12A
cmp	[ebp+arg_C], 0
jnz	short loc_4CA121
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4CA12A

loc_4CA121:
mov	[ebp+var_30], 1
jmp	short loc_4CA131

loc_4CA12A:
mov	[ebp+var_30], 0

loc_4CA131:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4CA158
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CA158:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4CA18E
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CEB70
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4CA18C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4CA18C:
jmp	short loc_4CA1BA

loc_4CA18E:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CEB70
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4CA1BA
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4CA1BA:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CA070 endp

align 10h


; Attributes: bp-based frame

sub_4CA210 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CA244:
cmp	[ebp+var_1C], 0
jz	short loc_4CA2C1
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4CA2AA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4CA2B6

loc_4CA2AA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4CA2B6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4CA244

loc_4CA2C1:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4CA369
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4CA35A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4CA070
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4CA418
jmp	short loc_4CA369

loc_4CA35A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CA369:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4CA3FD
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4CA070
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4CA418

loc_4CA3FD:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4CA418:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CA210 endp

align 10h


; Attributes: bp-based frame

sub_4CA430 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_2C]
jnz	short loc_4CA48C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4CEC20
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CA582

loc_4CA48C:
cmp	[ebp+arg_10], 0
jnz	short loc_4CA4F2
cmp	[ebp+arg_C], 0
jnz	short loc_4CA4E9
lea	edx, [ebp+var_12]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_2C]
add	ecx, 14h
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jz	short loc_4CA4F2

loc_4CA4E9:
mov	[ebp+var_38], 1
jmp	short loc_4CA4F9

loc_4CA4F2:
mov	[ebp+var_38], 0

loc_4CA4F9:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_4CA520
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CA520:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4CA556
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4CEC20
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_4CA554
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_4CA554:
jmp	short loc_4CA582

loc_4CA556:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4CEC20
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_4CA582
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_4CA582:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_2C]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_2C]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_2C]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CA430 endp

align 10h


; Attributes: bp-based frame

sub_4CA5D0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CA9A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CA604:
cmp	[ebp+var_1C], 0
jz	loc_4CA690
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_78]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4CA676
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+8]
mov	[ebp+var_84], edx
jmp	short loc_4CA682

loc_4CA676:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+0Ch]
mov	[ebp+var_84], ecx

loc_4CA682:
mov	edx, [ebp+var_84]
mov	[ebp+var_1C], edx
jmp	loc_4CA604

loc_4CA690:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4CA738
mov	ecx, [ebp+var_78]
mov	edx, [ecx+8]
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_58]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_58]
setz	dl
mov	[ebp+var_85], dl
movzx	eax, [ebp+var_85]
test	eax, eax
jz	short loc_4CA729
mov	[ebp+var_29], 1
push	0
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_78]
call	sub_4CA430
mov	[ebp+var_5C], eax
mov	edx, [ebp+var_5C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_29]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_4CA7EF
jmp	short loc_4CA738

loc_4CA729:
mov	edx, [ebp+var_10]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CA738:
lea	eax, [ebp+var_32]
mov	[ebp+var_8C], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_10]
mov	[ebp+var_68], ecx
lea	edx, [ebp+var_61]
mov	[ebp+var_90], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_68]
add	eax, 10h
mov	[ebp+var_60], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	ecx, [ebp+var_78]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4CA7D4
mov	[ebp+var_33], 1
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_78]
call	sub_4CA430
mov	[ebp+var_74], eax
mov	edx, [ebp+var_74]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_33]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_4CA7EF

loc_4CA7D4:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_39]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_4CA7EF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CA5D0 endp

align 10h


; Attributes: bp-based frame

sub_4CA800 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_2C]
jnz	short loc_4CA85C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4CECD0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CA952

loc_4CA85C:
cmp	[ebp+arg_10], 0
jnz	short loc_4CA8C2
cmp	[ebp+arg_C], 0
jnz	short loc_4CA8B9
lea	edx, [ebp+var_12]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_34], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_2C]
add	ecx, 14h
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jz	short loc_4CA8C2

loc_4CA8B9:
mov	[ebp+var_38], 1
jmp	short loc_4CA8C9

loc_4CA8C2:
mov	[ebp+var_38], 0

loc_4CA8C9:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_4CA8F0
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CA8F0:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4CA926
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4CECD0
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_4CA924
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_4CA924:
jmp	short loc_4CA952

loc_4CA926:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4CECD0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_4CA952
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_4CA952:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_2C]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_2C]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_2C]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CA800 endp

align 10h


; Attributes: bp-based frame

sub_4CA9A0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CA9A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CA9D4:
cmp	[ebp+var_1C], 0
jz	loc_4CAA60
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_78]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4CAA46
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+8]
mov	[ebp+var_84], edx
jmp	short loc_4CAA52

loc_4CAA46:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+0Ch]
mov	[ebp+var_84], ecx

loc_4CAA52:
mov	edx, [ebp+var_84]
mov	[ebp+var_1C], edx
jmp	loc_4CA9D4

loc_4CAA60:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4CAB08
mov	ecx, [ebp+var_78]
mov	edx, [ecx+8]
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_58]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_58]
setz	dl
mov	[ebp+var_85], dl
movzx	eax, [ebp+var_85]
test	eax, eax
jz	short loc_4CAAF9
mov	[ebp+var_29], 1
push	0
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_78]
call	sub_4CA800
mov	[ebp+var_5C], eax
mov	edx, [ebp+var_5C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_29]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_4CABBF
jmp	short loc_4CAB08

loc_4CAAF9:
mov	edx, [ebp+var_10]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CAB08:
lea	eax, [ebp+var_32]
mov	[ebp+var_8C], eax
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_10]
mov	[ebp+var_68], ecx
lea	edx, [ebp+var_61]
mov	[ebp+var_90], edx
mov	byte ptr [ebp+var_4], 5
mov	eax, [ebp+var_68]
add	eax, 10h
mov	[ebp+var_60], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	ecx, [ebp+var_78]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4CABA4
mov	[ebp+var_33], 1
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_78]
call	sub_4CA800
mov	[ebp+var_74], eax
mov	edx, [ebp+var_74]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_33]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_4CABBF

loc_4CABA4:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_39]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_4CABBF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CA9A0 endp

align 10h


; Attributes: bp-based frame

sub_4CABD0 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	byte ptr -0A8h
var_98=	byte ptr -98h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_4C=	dword ptr -4Ch
var_48=	word ptr -48h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CABD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0D8h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_24]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_28]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_2C]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_30]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_28], ecx
mov	[ebp+var_40], 80h
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_34]
sar	edx, 2
mov	eax, [ebp+arg_14]
sub	eax, [ebp+arg_18]
sar	eax, 2
mov	ecx, [ebp+arg_20]
sub	ecx, [ebp+var_28]
sar	ecx, 2
sub	ecx, 1
imul	ecx, 20h
add	ecx, eax
add	ecx, edx
mov	[ebp+var_24], ecx
jmp	short loc_4CAC66

loc_4CAC5D:
mov	edx, [ebp+var_24]
sub	edx, 1
mov	[ebp+var_24], edx

loc_4CAC66:
cmp	[ebp+var_24], 0
jle	short loc_4CACAA
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_4C], ecx
xor	edx, edx
mov	byte ptr [ebp+var_48+1], dl
mov	al, byte ptr [ebp+var_48+1]
mov	[ebp+var_45], al
xor	ecx, ecx
mov	byte ptr [ebp+var_48], cl
mov	dl, byte ptr [ebp+var_48]
mov	[ebp+var_46], dl
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[eax], edx
lea	ecx, [ebp+arg_4]
call	sub_4AB2D0
lea	ecx, [ebp+var_20]
call	sub_4AB2D0
jmp	short loc_4CAC5D

loc_4CACAA:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
jmp	loc_4CADFC

loc_4CACCC:
lea	eax, [ebp+var_D8]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_E8]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+arg_24]
mov	[edx], eax
mov	ecx, [ebp+arg_28]
mov	[edx+4], ecx
mov	eax, [ebp+arg_2C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_30]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_B8]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_D8]
mov	[eax], ecx
mov	edx, [ebp+var_D4]
mov	[eax+4], edx
mov	ecx, [ebp+var_D0]
mov	[eax+8], ecx
mov	edx, [ebp+var_CC]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_C8]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_E8]
mov	[ecx], edx
mov	eax, [ebp+var_E4]
mov	[ecx+4], eax
mov	edx, [ebp+var_E0]
mov	[ecx+8], edx
mov	eax, [ebp+var_DC]
mov	[ecx+0Ch], eax
xor	ecx, ecx
mov	[ebp+var_75], cl
lea	edx, [ebp+var_98]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+var_B8]
mov	[eax], ecx
mov	edx, [ebp+var_B4]
mov	[eax+4], edx
mov	ecx, [ebp+var_B0]
mov	[eax+8], ecx
mov	edx, [ebp+var_AC]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_A8]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_C8]
mov	[ecx], edx
mov	eax, [ebp+var_C4]
mov	[ecx+4], eax
mov	edx, [ebp+var_C0]
mov	[ecx+8], edx
mov	eax, [ebp+var_BC]
mov	[ecx+0Ch], eax
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CADFC
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CADFC:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CABD0 endp

align 10h


; Attributes: bp-based frame

sub_4CAE10 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 78h
lea	eax, [ebp+var_58]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_68]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_78]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_78]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_70]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_6C]
mov	[ebp+var_24], eax
mov	[ebp+var_34], 80h
mov	ecx, [ebp+var_28]
sub	ecx, [ebp+var_30]
sar	ecx, 2
mov	edx, [ebp+var_68]
sub	edx, [ebp+var_64]
sar	edx, 2
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_24]
sar	eax, 2
sub	eax, 1
imul	eax, 20h
add	eax, edx
add	eax, ecx
mov	[ebp+var_20], eax
jmp	short loc_4CAEC8

loc_4CAEBF:
mov	ecx, [ebp+var_20]
sub	ecx, 1
mov	[ebp+var_20], ecx

loc_4CAEC8:
cmp	[ebp+var_20], 0
jle	short loc_4CAEF0
mov	edx, [ebp+var_78]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[eax], edx
lea	ecx, [ebp+var_78]
call	sub_4AB2D0
lea	ecx, [ebp+var_58]
call	sub_4AB2D0
jmp	short loc_4CAEBF

loc_4CAEF0:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_58]
mov	[eax], ecx
mov	edx, [ebp+var_54]
mov	[eax+4], edx
mov	ecx, [ebp+var_50]
mov	[eax+8], ecx
mov	edx, [ebp+var_4C]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4CAE10 endp

align 10h


; Attributes: bp-based frame

sub_4CAF20 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 10h
mov	[ebp+var_18], esp
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
mov	edx, [ebp+arg_18]
mov	[eax+4], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_20]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_20], esp
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CFC50
add	esp, 38h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4CAF20 endp

align 10h


; Attributes: bp-based frame

sub_4CAFB0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 78h
lea	eax, [ebp+var_58]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_68]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_78]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_78]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_70]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_6C]
mov	[ebp+var_24], eax
mov	[ebp+var_34], 80h
mov	ecx, [ebp+var_28]
sub	ecx, [ebp+var_30]
sar	ecx, 2
mov	edx, [ebp+var_68]
sub	edx, [ebp+var_64]
sar	edx, 2
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_24]
sar	eax, 2
sub	eax, 1
imul	eax, 20h
add	eax, edx
add	eax, ecx
mov	[ebp+var_20], eax
jmp	short loc_4CB068

loc_4CB05F:
mov	ecx, [ebp+var_20]
sub	ecx, 1
mov	[ebp+var_20], ecx

loc_4CB068:
cmp	[ebp+var_20], 0
jle	short loc_4CB090
lea	ecx, [ebp+var_68]
call	sub_4AC350
mov	edx, [ebp+var_68]
mov	[ebp+var_40], edx
lea	ecx, [ebp+var_58]
call	sub_4AC350
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[eax], edx
jmp	short loc_4CB05F

loc_4CB090:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_58]
mov	[eax], ecx
mov	edx, [ebp+var_54]
mov	[eax+4], edx
mov	ecx, [ebp+var_50]
mov	[eax+8], ecx
mov	edx, [ebp+var_4C]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4CAFB0 endp

align 10h


; Attributes: bp-based frame

sub_4CB0C0 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_8C=	byte ptr -8Ch
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	word ptr -4Ch
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CB0C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0CCh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_28], ecx
mov	[ebp+var_40], 80h
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_34]
sar	edx, 2
mov	eax, [ebp+arg_10]
sub	eax, [ebp+arg_14]
sar	eax, 2
mov	ecx, [ebp+arg_1C]
sub	ecx, [ebp+var_28]
sar	ecx, 2
sub	ecx, 1
imul	ecx, 20h
add	ecx, eax
add	ecx, edx
mov	[ebp+var_24], ecx
jmp	short loc_4CB15E

loc_4CB14D:
mov	edx, [ebp+var_24]
sub	edx, 1
mov	[ebp+var_24], edx
lea	ecx, [ebp+var_20]
call	sub_4AB2D0

loc_4CB15E:
cmp	[ebp+var_24], 0
jle	short loc_4CB18C
mov	eax, [ebp+var_20]
mov	[ebp+var_50], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_4C+1], cl
mov	dl, byte ptr [ebp+var_4C+1]
mov	[ebp+var_49], dl
xor	eax, eax
mov	byte ptr [ebp+var_4C], al
mov	cl, byte ptr [ebp+var_4C]
mov	[ebp+var_4A], cl
mov	edx, [ebp+var_50]
mov	eax, [ebp+arg_20]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_4CB14D

loc_4CB18C:
jmp	loc_4CB2AE

loc_4CB191:
lea	edx, [ebp+var_CC]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_DC]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_AC]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_CC]
mov	[edx], eax
mov	ecx, [ebp+var_C8]
mov	[edx+4], ecx
mov	eax, [ebp+var_C4]
mov	[edx+8], eax
mov	ecx, [ebp+var_C0]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_BC]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_DC]
mov	[eax], ecx
mov	edx, [ebp+var_D8]
mov	[eax+4], edx
mov	ecx, [ebp+var_D4]
mov	[eax+8], ecx
mov	edx, [ebp+var_D0]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_69], al
lea	ecx, [ebp+var_8C]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_AC]
mov	[edx], eax
mov	ecx, [ebp+var_A8]
mov	[edx+4], ecx
mov	eax, [ebp+var_A4]
mov	[edx+8], eax
mov	ecx, [ebp+var_A0]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_9C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_BC]
mov	[eax], ecx
mov	edx, [ebp+var_B8]
mov	[eax+4], edx
mov	ecx, [ebp+var_B4]
mov	[eax+8], ecx
mov	edx, [ebp+var_B0]
mov	[eax+0Ch], edx
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CB2B5
retn

loc_4CB2AE:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CB2B5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CB0C0 endp

align 10h


; Attributes: bp-based frame

sub_4CB2D0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4CB32C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CED80
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CB44C

loc_4CB32C:
cmp	[ebp+arg_10], 0
jnz	loc_4CB3BC
cmp	[ebp+arg_C], 0
jnz	short loc_4CB3B3
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], eax
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4CB3A4
jb	short loc_4CB39B
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4CB3A4

loc_4CB39B:
mov	[ebp+var_38], 1
jmp	short loc_4CB3AB

loc_4CB3A4:
mov	[ebp+var_38], 0

loc_4CB3AB:
movzx	edx, byte ptr [ebp+var_38]
test	edx, edx
jz	short loc_4CB3BC

loc_4CB3B3:
mov	[ebp+var_3C], 1
jmp	short loc_4CB3C3

loc_4CB3BC:
mov	[ebp+var_3C], 0

loc_4CB3C3:
mov	al, byte ptr [ebp+var_3C]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_4CB3EA
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CB3EA:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4CB420
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4CED80
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_4CB41E
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_4CB41E:
jmp	short loc_4CB44C

loc_4CB420:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CED80
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_4CB44C
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_4CB44C:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_24]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_24]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_24]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CB2D0 endp

align 10h


; Attributes: bp-based frame

sub_4CB4A0 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8Ch
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CB4D4:
cmp	[ebp+var_1C], 0
jz	loc_4CB57F
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_40]
mov	[ebp+var_74], ecx
mov	[ebp+var_78], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_78]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_4CB53D
jb	short loc_4CB534
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_78]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_4CB53D

loc_4CB534:
mov	[ebp+var_7C], 1
jmp	short loc_4CB544

loc_4CB53D:
mov	[ebp+var_7C], 0

loc_4CB544:
mov	al, byte ptr [ebp+var_7C]
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4CB56B
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_80], eax
jmp	short loc_4CB574

loc_4CB56B:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_80], edx

loc_4CB574:
mov	eax, [ebp+var_80]
mov	[ebp+var_1C], eax
jmp	loc_4CB4D4

loc_4CB57F:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4CB627
mov	edx, [ebp+var_68]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_81], al
movzx	ecx, [ebp+var_81]
test	ecx, ecx
jz	short loc_4CB618
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_68]
call	sub_4CB2D0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4CB721
jmp	short loc_4CB627

loc_4CB618:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CB627:
lea	ecx, [ebp+var_32]
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_8C], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+var_58]
mov	eax, [ebp+arg_4]
mov	[ebp+var_90], edx
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_94]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4CB6A1
jb	short loc_4CB695
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_94]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4CB6A1

loc_4CB695:
mov	[ebp+var_98], 1
jmp	short loc_4CB6AB

loc_4CB6A1:
mov	[ebp+var_98], 0

loc_4CB6AB:
mov	cl, byte ptr [ebp+var_98]
mov	[ebp+var_31], cl
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4CB706
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4CB2D0
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4CB721

loc_4CB706:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4CB721:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CB4A0 endp

align 10h


; Attributes: bp-based frame

sub_4CB740 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CB740
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 5Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 5
mov	[ebp+var_18], ecx
jmp	short loc_4CB78F

loc_4CB77D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_14], eax

loc_4CB78F:
cmp	[ebp+var_18], 0
jle	short loc_4CB7A7
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4CFD90
add	esp, 8
jmp	short loc_4CB77D

loc_4CB7A7:
jmp	short loc_4CB7D1

loc_4CB7A9:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4CB7F0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CB7D8
retn

loc_4CB7D1:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CB7D8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CB740 endp

align 10h


; Attributes: bp-based frame

sub_4CB7F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CB7F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
jmp	short loc_4CB821

loc_4CB818:
mov	edx, [ebp+var_18]
add	edx, 20h
mov	[ebp+var_18], edx

loc_4CB821:
mov	eax, [ebp+var_18]
cmp	eax, [ebp+arg_4]
jz	short loc_4CB87E
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
add	edx, 18h
mov	[ebp+var_14], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_5D2630
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
xor	eax, eax
and	eax, 1
jz	short loc_4CB87C
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CB87C:
jmp	short loc_4CB818

loc_4CB87E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CB7F0 endp

align 10h


; Attributes: bp-based frame

sub_4CB890 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4CB8EC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CEE30
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CB9DA

loc_4CB8EC:
cmp	[ebp+arg_10], 0
jnz	short loc_4CB94A
cmp	[ebp+arg_C], 0
jnz	short loc_4CB941
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4CB94A

loc_4CB941:
mov	[ebp+var_30], 1
jmp	short loc_4CB951

loc_4CB94A:
mov	[ebp+var_30], 0

loc_4CB951:
mov	cl, byte ptr [ebp+var_30]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4CB978
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CB978:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4CB9AE
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CEE30
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4CB9AC
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4CB9AC:
jmp	short loc_4CB9DA

loc_4CB9AE:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CEE30
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4CB9DA
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4CB9DA:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_24]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_24]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CB890 endp

align 10h


; Attributes: bp-based frame

sub_4CBA30 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CBA64:
cmp	[ebp+var_1C], 0
jz	short loc_4CBAE1
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_7C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_80], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_11], al
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4CBACA
mov	edx, [ebp+var_1C]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
jmp	short loc_4CBAD6

loc_4CBACA:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+0Ch]
mov	[ebp+var_84], edx

loc_4CBAD6:
mov	eax, [ebp+var_84]
mov	[ebp+var_1C], eax
jmp	short loc_4CBA64

loc_4CBAE1:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4CBB89
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_4CBB7A
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_78]
call	sub_4CB890
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_4CBC38
jmp	short loc_4CBB89

loc_4CBB7A:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CBB89:
lea	ecx, [ebp+var_32]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_10]
mov	[ebp+var_60], edx
lea	eax, [ebp+var_59]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_58], ecx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_58]
call	sub_404510
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_4CBC1D
mov	[ebp+var_33], 1
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_78]
call	sub_4CB890
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_33]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4CBC38

loc_4CBC1D:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_39]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4CBC38:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CBA30 endp

align 10h


; Attributes: bp-based frame

sub_4CBC50 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_3C], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_3C]
jnz	short loc_4CBCAC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_4CEF00
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CBDF2

loc_4CBCAC:
cmp	[ebp+arg_10], 0
jnz	loc_4CBD62
cmp	[ebp+arg_C], 0
jnz	loc_4CBD59
lea	edx, [ebp+var_12]
mov	[ebp+var_40], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_44], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_28]
jl	short loc_4CBD4A
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_2C]
cmp	eax, [ebp+var_30]
jnz	short loc_4CBD41
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
cmp	edx, [ebp+var_38]
jb	short loc_4CBD4A

loc_4CBD41:
mov	[ebp+var_48], 0
jmp	short loc_4CBD51

loc_4CBD4A:
mov	[ebp+var_48], 1

loc_4CBD51:
movzx	eax, byte ptr [ebp+var_48]
test	eax, eax
jz	short loc_4CBD62

loc_4CBD59:
mov	[ebp+var_4C], 1
jmp	short loc_4CBD69

loc_4CBD62:
mov	[ebp+var_4C], 0

loc_4CBD69:
mov	cl, byte ptr [ebp+var_4C]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_4CBD90
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CBD90:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4CBDC6
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_4CEF00
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4CBDC4
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_4CBDC4:
jmp	short loc_4CBDF2

loc_4CBDC6:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_4CEF00
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4CBDF2
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_4CBDF2:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_3C]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_3C]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CBC50 endp

align 10h


; Attributes: bp-based frame

sub_4CBE40 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CBE40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CBE7D:
cmp	[ebp+var_1C], 0
jz	loc_4CBF62
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_9C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_A0], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_48]
cmp	edx, [ebp+var_4C]
jl	short loc_4CBF11
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_50]
cmp	ecx, [ebp+var_54]
jnz	short loc_4CBF05
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+4]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_58]
cmp	eax, [ebp+var_5C]
jb	short loc_4CBF11

loc_4CBF05:
mov	[ebp+var_A4], 0
jmp	short loc_4CBF1B

loc_4CBF11:
mov	[ebp+var_A4], 1

loc_4CBF1B:
mov	cl, byte ptr [ebp+var_A4]
mov	[ebp+var_11], cl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4CBF48
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_A8], ecx
jmp	short loc_4CBF54

loc_4CBF48:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_A8], eax

loc_4CBF54:
mov	ecx, [ebp+var_A8]
mov	[ebp+var_1C], ecx
jmp	loc_4CBE7D

loc_4CBF62:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4CC010
mov	eax, [ebp+var_98]
mov	ecx, [eax+8]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_68]
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_68]
setz	cl
mov	[ebp+var_A9], cl
movzx	edx, [ebp+var_A9]
test	edx, edx
jz	short loc_4CC001
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_98]
call	sub_4CBC50
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_4CC13B
jmp	short loc_4CC010

loc_4CC001:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CC010:
lea	edx, [ebp+var_32]
mov	[ebp+var_B0], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_78], eax
lea	ecx, [ebp+var_71]
mov	[ebp+var_B4], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_78]
add	edx, 10h
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_70]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_7C]
cmp	ecx, [ebp+var_80]
jl	short loc_4CC0B2
mov	edx, [ebp+var_70]
mov	eax, [edx]
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_84]
cmp	eax, [ebp+var_88]
jnz	short loc_4CC0A6
mov	ecx, [ebp+var_70]
mov	edx, [ecx+4]
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_8C]
cmp	edx, [ebp+var_90]
jb	short loc_4CC0B2

loc_4CC0A6:
mov	[ebp+var_B8], 0
jmp	short loc_4CC0BC

loc_4CC0B2:
mov	[ebp+var_B8], 1

loc_4CC0BC:
mov	al, byte ptr [ebp+var_B8]
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_4CC120
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_98]
call	sub_4CBC50
mov	[ebp+var_94], eax
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_4CC13B

loc_4CC120:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_4CC13B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CBE40 endp

align 10h


; Attributes: bp-based frame

sub_4CC150 proc	near

var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CC150
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_18], ecx
jmp	short loc_4CC19F

loc_4CC18D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_14], eax

loc_4CC19F:
cmp	[ebp+var_18], 0
jle	short loc_4CC1B7
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_5A7AA0
add	esp, 8
jmp	short loc_4CC18D

loc_4CC1B7:
jmp	short loc_4CC1D4

loc_4CC1B9:
xor	eax, eax
mov	[ebp+var_21], al
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CC1DB
retn

loc_4CC1D4:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CC1DB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CC150 endp

align 10h


; Attributes: bp-based frame

sub_4CC1F0 proc	near

var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CC1F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_24], eax
mov	eax, [ebp+arg_4]
mov	eax, [eax]
xor	edx, edx
div	[ebp+var_24]
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_60]
mov	edx, [ecx+8]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_28]
mov	edx, [ecx+eax*4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx+8]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_30]
mov	edx, [ecx+eax*4+4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_14], eax
jmp	short loc_4CC26D

loc_4CC265:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[ebp+var_10], edx

loc_4CC26D:
lea	eax, [ebp+var_40]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx], eax
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_40]
setnz	dl
mov	[ebp+var_61], dl
movzx	eax, [ebp+var_61]
test	eax, eax
jz	short loc_4CC2F7
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_44], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_44]
mov	[ebp+var_4C], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_68], eax
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_6C]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_4CC2E3
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_6C]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jnz	short loc_4CC2E3
mov	[ebp+var_70], 1
jmp	short loc_4CC2EA

loc_4CC2E3:
mov	[ebp+var_70], 0

loc_4CC2EA:
movzx	edx, byte ptr [ebp+var_70]
test	edx, edx
jnz	short loc_4CC2F7
jmp	loc_4CC265

loc_4CC2F7:
lea	eax, [ebp+var_58]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_50]
mov	[edx], eax
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_58]
setnz	dl
mov	[ebp+var_71], dl
movzx	eax, [ebp+var_71]
test	eax, eax
jz	short loc_4CC336
mov	ecx, [ebp+var_10]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_4CC342
jmp	short loc_4CC342

loc_4CC336:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_4CC342:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CC1F0 endp

align 10h


; Attributes: bp-based frame

sub_4CC360 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CCFD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4CC38D:
cmp	[ebp+var_14], 0
jz	loc_4CC41A
lea	eax, [ebp+var_19]
mov	[ebp+var_2C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	[ebp+var_30], edx
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4CC3EC
jb	short loc_4CC3E3
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4CC3EC

loc_4CC3E3:
mov	[ebp+var_38], 1
jmp	short loc_4CC3F3

loc_4CC3EC:
mov	[ebp+var_38], 0

loc_4CC3F3:
movzx	ecx, byte ptr [ebp+var_38]
test	ecx, ecx
jnz	short loc_4CC40C
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4CC415

loc_4CC40C:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4CC415:
jmp	loc_4CC38D

loc_4CC41A:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_28]
jz	short loc_4CC48C
lea	edx, [ebp+var_21]
mov	[ebp+var_3C], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_20], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_20]
mov	[ebp+var_40], ecx
mov	[ebp+var_44], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_44]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_4CC477
jb	short loc_4CC46E
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_44]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_4CC477

loc_4CC46E:
mov	[ebp+var_48], 1
jmp	short loc_4CC47E

loc_4CC477:
mov	[ebp+var_48], 0

loc_4CC47E:
movzx	eax, byte ptr [ebp+var_48]
test	eax, eax
jz	short loc_4CC48C
mov	ecx, [ebp+var_28]
mov	[ebp+var_10], ecx

loc_4CC48C:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4CC360 endp

align 10h


; Attributes: bp-based frame

sub_4CC4A0 proc	near

var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_109= byte ptr -109h
var_108= dword ptr -108h
var_101= byte ptr -101h
var_F9=	byte ptr -0F9h
var_F8=	dword ptr -0F8h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B5=	byte ptr -0B5h
var_B4=	dword ptr -0B4h
var_AD=	byte ptr -0ADh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	byte ptr -5Ch
var_48=	byte ptr -48h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CC4A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 12Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_13C], ecx
mov	eax, [ebp+arg_20]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_24]
mov	[ebp+var_88], ecx
mov	edx, [ebp+arg_28]
mov	[ebp+var_84], edx
mov	eax, [ebp+arg_2C]
mov	[ebp+var_80], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_18]
mov	[ebp+var_74], eax
mov	ecx, [ebp+arg_1C]
mov	[ebp+var_70], ecx
mov	[ebp+var_6C], 80h
mov	edx, [ebp+var_74]
sub	edx, [ebp+var_7C]
sar	edx, 2
mov	eax, [ebp+var_8C]
sub	eax, [ebp+var_88]
sar	eax, 2
mov	ecx, [ebp+var_80]
sub	ecx, [ebp+var_70]
sar	ecx, 2
sub	ecx, 1
imul	ecx, 20h
add	ecx, eax
add	ecx, edx
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_13C]
mov	eax, [ebp+arg_0]
cmp	eax, [edx]
jnz	loc_4CC6AF
mov	ecx, [ebp+var_14]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_13C]
call	sub_4B8210
mov	[ebp+var_4], 0
lea	eax, [ebp+var_E0]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_20]
mov	[ecx+4], eax
mov	edx, [ebp+var_1C]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	[ecx+0Ch], eax
xor	ecx, ecx
mov	[ebp+var_AD], cl
mov	dl, [ebp+var_AD]
mov	[ebp+var_A5], dl
lea	eax, [ebp+var_D0]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_E0]
mov	[ecx], edx
mov	eax, [ebp+var_DC]
mov	[ecx+4], eax
mov	edx, [ebp+var_D8]
mov	[ecx+8], edx
mov	eax, [ebp+var_D4]
mov	[ecx+0Ch], eax
push	0
lea	ecx, [ebp+var_B5]
push	ecx
sub	esp, 10h
mov	[ebp+var_C0], esp
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_D0]
mov	[edx], eax
mov	ecx, [ebp+var_CC]
mov	[edx+4], ecx
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	ecx, [ebp+var_C4]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_20]
mov	[edx], eax
mov	ecx, [ebp+arg_24]
mov	[edx+4], ecx
mov	eax, [ebp+arg_28]
mov	[edx+8], eax
mov	ecx, [ebp+arg_2C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_48]
push	edx
call	sub_4D3E60
add	esp, 3Ch
mov	eax, [ebp+var_13C]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	ecx, [ebp+var_1C]
mov	[eax+8], ecx
mov	edx, [ebp+var_18]
mov	[eax+0Ch], edx
jmp	short loc_4CC6A3

loc_4CC674:
mov	eax, [ebp+var_13C]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_13C]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CC6AA
retn

loc_4CC6A3:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CC6AA:
jmp	loc_4CC8AF

loc_4CC6AF:
mov	eax, [ebp+var_13C]
mov	ecx, [ebp+arg_0]
cmp	ecx, [eax+10h]
jnz	loc_4CC834
mov	edx, [ebp+var_14]
push	edx
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_13C]
call	sub_4B8290
mov	[ebp+var_4], 2
lea	ecx, [ebp+var_134]
mov	[ebp+var_F8], ecx
mov	edx, [ebp+var_13C]
add	edx, 10h
mov	eax, [ebp+var_F8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_101], al
mov	cl, [ebp+var_101]
mov	[ebp+var_F9], cl
lea	edx, [ebp+var_124]
mov	[ebp+var_108], edx
mov	eax, [ebp+var_108]
mov	ecx, [ebp+var_134]
mov	[eax], ecx
mov	edx, [ebp+var_130]
mov	[eax+4], edx
mov	ecx, [ebp+var_12C]
mov	[eax+8], ecx
mov	edx, [ebp+var_128]
mov	[eax+0Ch], edx
push	0
lea	eax, [ebp+var_109]
push	eax
sub	esp, 10h
mov	[ebp+var_114], esp
mov	ecx, [ebp+var_114]
mov	edx, [ebp+var_124]
mov	[ecx], edx
mov	eax, [ebp+var_120]
mov	[ecx+4], eax
mov	edx, [ebp+var_11C]
mov	[ecx+8], edx
mov	eax, [ebp+var_118]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+arg_20]
mov	[ecx], edx
mov	eax, [ebp+arg_24]
mov	[ecx+4], eax
mov	edx, [ebp+arg_28]
mov	[ecx+8], edx
mov	eax, [ebp+arg_2C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_5C]
push	ecx
call	sub_4D3E60
add	esp, 3Ch
mov	edx, [ebp+var_13C]
add	edx, 10h
mov	eax, [ebp+var_34]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	[edx+0Ch], ecx
jmp	short loc_4CC82B

loc_4CC7F6:
mov	edx, [ebp+var_28]
add	edx, 4
push	edx
mov	eax, [ebp+var_13C]
mov	ecx, [eax+1Ch]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_13C]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CC832
retn

loc_4CC82B:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CC832:
jmp	short loc_4CC8AF

loc_4CC834:
xor	edx, edx
mov	[ebp+var_5D], dl
lea	eax, [ebp+var_5D]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_20]
mov	[edx], eax
mov	ecx, [ebp+arg_24]
mov	[edx+4], ecx
mov	eax, [ebp+arg_28]
mov	[edx+8], eax
mov	ecx, [ebp+arg_2C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_64], esp
mov	[ebp+var_138], edx
mov	eax, [ebp+var_138]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_13C]
call	sub_4D0160

loc_4CC8AF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	34h
sub_4CC4A0 endp

align 10h


; Attributes: bp-based frame

sub_4CC8D0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4D0E10
add	esp, 1Ch
pop	ebp
retn
sub_4CC8D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4CC910(float,	int, int, char)
sub_4CC910 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; float
lea	ecx, [ebp+arg_C]
call	sub_4A39C0
movzx	edx, al
test	edx, edx
jz	short loc_4CC96D
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+arg_4]
push	ecx		; float
lea	ecx, [ebp+arg_C]
call	sub_4A39C0
movzx	edx, al
test	edx, edx
jz	short loc_4CC948
mov	eax, [ebp+arg_4]
jmp	short loc_4CC9AC
jmp	short loc_4CC96B

loc_4CC948:
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; float
lea	ecx, [ebp+arg_C]
call	sub_4A39C0
movzx	edx, al
test	edx, edx
jz	short loc_4CC966
mov	eax, [ebp+arg_8]
jmp	short loc_4CC9AC
jmp	short loc_4CC96B

loc_4CC966:
mov	eax, [ebp+arg_0]
jmp	short loc_4CC9AC

loc_4CC96B:
jmp	short loc_4CC9AC

loc_4CC96D:
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; float
lea	ecx, [ebp+arg_C]
call	sub_4A39C0
movzx	edx, al
test	edx, edx
jz	short loc_4CC98B
mov	eax, [ebp+arg_0]
jmp	short loc_4CC9AC
jmp	short loc_4CC9AC

loc_4CC98B:
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+arg_4]
push	ecx		; float
lea	ecx, [ebp+arg_C]
call	sub_4A39C0
movzx	edx, al
test	edx, edx
jz	short loc_4CC9A9
mov	eax, [ebp+arg_8]
jmp	short loc_4CC9AC
jmp	short loc_4CC9AC

loc_4CC9A9:
mov	eax, [ebp+arg_4]

loc_4CC9AC:
pop	ebp
retn
sub_4CC910 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4CC9B0(float,	int, int, int, int, int, int, int, char, int, char)
sub_4CC9B0 proc	near

var_54=	dword ptr -54h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_20=	byte ptr  28h
arg_28=	byte ptr  30h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CC9B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
mov	[ebp+var_4], 0

loc_4CC9D2:
lea	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; float
lea	ecx, [ebp+arg_28]
call	sub_4A39C0
movzx	edx, al
test	edx, edx
jz	short loc_4CC9F4
mov	eax, [ebp+arg_0]
add	eax, 20h
mov	[ebp+arg_0], eax
jmp	short loc_4CC9D2

loc_4CC9F4:
mov	ecx, [ebp+arg_4]
sub	ecx, 20h
mov	[ebp+arg_4], ecx

loc_4CC9FD:
mov	edx, [ebp+arg_4]
push	edx		; int
lea	eax, [ebp+arg_8]
push	eax		; float
lea	ecx, [ebp+arg_28]
call	sub_4A39C0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4CCA1F
mov	edx, [ebp+arg_4]
sub	edx, 20h
mov	[ebp+arg_4], edx
jmp	short loc_4CC9FD

loc_4CCA1F:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jb	short loc_4CCA6A
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+arg_20]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_14]
call	sub_5D2630
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
jmp	short loc_4CCAC0

loc_4CCA6A:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4D0F90
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 20h
mov	[ebp+arg_0], edx
jmp	loc_4CC9D2
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+arg_20]
mov	[ebp+var_54], eax
mov	[ebp+var_4], 6
mov	[ebp+var_4], 7
mov	ecx, [ebp+var_54]
call	sub_5D2630
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CCAC0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CC9B0 endp

align 10h


; Attributes: bp-based frame

sub_4CCAD0 proc	near

var_A0=	dword ptr -0A0h
var_58=	dword ptr -58h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CCAD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_4CCAFB
jmp	loc_4CCBB0

loc_4CCAFB:
mov	ecx, [ebp+arg_0]
add	ecx, 20h
mov	[ebp+var_10], ecx
jmp	short loc_4CCB0F

loc_4CCB06:
mov	edx, [ebp+var_10]
add	edx, 20h
mov	[ebp+var_10], edx

loc_4CCB0F:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+arg_4]
jz	loc_4CCBB0
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_10]
mov	[ecx+4], eax
mov	edx, [ebp+arg_14]
mov	[ecx+8], edx
sub	esp, 20h
mov	eax, esp
mov	[ebp+var_14], esp
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_58]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_10]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_58]
add	ecx, 18h
call	sub_4C70F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_58]
mov	[ebp+var_A0], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
push	ecx		; int
mov	edx, [ebp+arg_0]
push	edx		; int
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_4D0FE0
add	esp, 34h
jmp	loc_4CCB06

loc_4CCBB0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CCAD0 endp

align 10h


; Attributes: bp-based frame

sub_4CCBC0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_7C]
jz	loc_4CCD4E
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 64h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	short loc_4CCC4D
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_7C]
call	sub_4D1310
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_7C]
call	sub_4B86E0
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
imul	ecx, 64h
mov	edx, [ebp+var_7C]
add	ecx, [edx]
mov	eax, [ebp+var_7C]
mov	[eax+8], ecx
jmp	loc_4CCD3D

loc_4CCC4D:
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 64h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_4CCCAD
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
xor	edx, edx
mov	[ebp+var_55], dl
jmp	loc_4CCD3D

loc_4CCCAD:
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 64h
idiv	ecx
imul	eax, 64h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
call	sub_406610
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 64h
idiv	ecx
imul	eax, 64h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_70], eax
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_74]
push	ecx
mov	edx, [ebp+var_70]
push	edx
call	sub_407C50
add	esp, 0Ch

loc_4CCD3D:
mov	eax, [ebp+var_4]
imul	eax, 64h
mov	ecx, [ebp+var_7C]
add	eax, [ecx]
mov	edx, [ebp+var_7C]
mov	[edx+4], eax

loc_4CCD4E:
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	4
sub_4CCBC0 endp

align 10h


; Attributes: bp-based frame

sub_4CCD60 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CCD60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_4CCDAF

loc_4CCD9D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax

loc_4CCDAF:
cmp	[ebp+var_18], 0
jle	short loc_4CCDC7
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_5EB830
add	esp, 8
jmp	short loc_4CCD9D

loc_4CCDC7:
jmp	short loc_4CCDF1

loc_4CCDC9:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4C6BD0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CCDF8
retn

loc_4CCDF1:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CCDF8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CCD60 endp

align 10h


; Attributes: bp-based frame

sub_4CCE10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
sub	edx, [ebp+arg_0]
sar	edx, 2
mov	[ebp+var_8], edx
jmp	short loc_4CCE39

loc_4CCE30:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_4CCE39:
cmp	[ebp+var_8], 0
jle	short loc_4CCE8D
mov	ecx, [ebp+var_C]
sub	ecx, 4
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
sub	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_4CCE8B
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_4CCE6F
mov	ecx, [ebp+var_10]
mov	ecx, [ecx]
call	sub_40AA90

loc_4CCE6F:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_4CCE8B
mov	eax, [ebp+var_10]
mov	ecx, [eax]
call	sub_40AA80

loc_4CCE8B:
jmp	short loc_4CCE30

loc_4CCE8D:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4CCE10 endp

align 10h


; Attributes: bp-based frame

sub_4CCEA0 proc	near

var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_20], eax
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
lea	eax, [ebp+var_28]
call	sub_4078F0
mov	eax, [ebp+var_28]
xor	edx, edx
div	[ebp+var_20]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_68]
mov	edx, [ecx+8]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+eax*4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+8]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_34]
mov	edx, [ecx+eax*4+4]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
mov	[ebp+var_8], eax
jmp	short loc_4CCF13

loc_4CCF0B:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_4CCF13:
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_3C]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setnz	dl
mov	[ebp+var_69], dl
movzx	eax, [ebp+var_69]
test	eax, eax
jz	short loc_4CCF75
mov	ecx, [ebp+arg_4]
mov	ecx, [ecx]
lea	eax, [ebp+var_18]
call	sub_4078F0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
xor	ecx, ecx
cmp	eax, [ebp+var_18]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4CCF75
jmp	short loc_4CCF0B

loc_4CCF75:
lea	eax, [ebp+var_60]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_58]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_60]
setnz	dl
mov	[ebp+var_6A], dl
movzx	eax, [ebp+var_6A]
test	eax, eax
jz	short loc_4CCFB4
mov	ecx, [ebp+var_4]
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_64]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_4CCFC0
jmp	short loc_4CCFC0

loc_4CCFB4:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_4CCFC0:
mov	esp, ebp
pop	ebp
retn	8
sub_4CCEA0 endp

align 10h


; Attributes: bp-based frame

sub_4CCFD0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CCFD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4CCFFD:
cmp	[ebp+var_14], 0
jz	short loc_4CD05A
lea	eax, [ebp+var_19]
mov	[ebp+var_2C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_1011870
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4CD04F
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4CD058

loc_4CD04F:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4CD058:
jmp	short loc_4CCFFD

loc_4CD05A:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_28]
jz	short loc_4CD0A3
lea	edx, [ebp+var_21]
mov	[ebp+var_30], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_20], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_1011870
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_4CD0A3
mov	ecx, [ebp+var_28]
mov	[ebp+var_10], ecx

loc_4CD0A3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4CCFD0 endp

align 10h


; Attributes: bp-based frame

sub_4CD0C0 proc	near

var_25=	byte ptr -25h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD0C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_18], ecx
jmp	short loc_4CD10F

loc_4CD0FD:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_14], eax

loc_4CD10F:
cmp	[ebp+var_18], 0
jle	short loc_4CD127
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4B7100
add	esp, 8
jmp	short loc_4CD0FD

loc_4CD127:
jmp	short loc_4CD144

loc_4CD129:
xor	eax, eax
mov	[ebp+var_25], al
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CD14B
retn

loc_4CD144:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CD14B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CD0C0 endp

align 10h


; Attributes: bp-based frame

sub_4CD160 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4CD1BC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4B94B0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CD2AD

loc_4CD1BC:
cmp	[ebp+arg_10], 0
jnz	short loc_4CD21D
cmp	[ebp+arg_C], 0
jnz	short loc_4CD214
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4CD21D

loc_4CD214:
mov	[ebp+var_30], 1
jmp	short loc_4CD224

loc_4CD21D:
mov	[ebp+var_30], 0

loc_4CD224:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
and	eax, 1
jz	short loc_4CD24B
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CD24B:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4CD281
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4B94B0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4CD27F
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx

loc_4CD27F:
jmp	short loc_4CD2AD

loc_4CD281:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4B94B0
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_4CD2AD
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax

loc_4CD2AD:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_24]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CD160 endp

align 10h


; Attributes: bp-based frame

sub_4CD300 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CD331:
cmp	[ebp+var_1C], 0
jz	short loc_4CD3A8
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_40]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4CD397
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_74], ecx
jmp	short loc_4CD3A0

loc_4CD397:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_74], eax

loc_4CD3A0:
mov	ecx, [ebp+var_74]
mov	[ebp+var_1C], ecx
jmp	short loc_4CD331

loc_4CD3A8:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4CD44A
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_50]
setz	cl
mov	[ebp+var_75], cl
movzx	edx, [ebp+var_75]
test	edx, edx
jz	short loc_4CD43B
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4CD160
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_4CD4F6
jmp	short loc_4CD44A

loc_4CD43B:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CD44A:
lea	edx, [ebp+var_32]
mov	[ebp+var_7C], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_60], eax
lea	ecx, [ebp+var_59]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_60]
add	edx, 10h
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_4CD4DB
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_68]
call	sub_4CD160
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_4CD4F6

loc_4CD4DB:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_4CD4F6:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CD300 endp

align 10h


; Attributes: bp-based frame

sub_4CD510 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_24]
jnz	short loc_4CD56C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4CEFB0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_4CD65D

loc_4CD56C:
cmp	[ebp+arg_10], 0
jnz	short loc_4CD5CD
cmp	[ebp+arg_C], 0
jnz	short loc_4CD5C4
lea	edx, [ebp+var_12]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_2C], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4CD5CD

loc_4CD5C4:
mov	[ebp+var_30], 1
jmp	short loc_4CD5D4

loc_4CD5CD:
mov	[ebp+var_30], 0

loc_4CD5D4:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
and	eax, 1
jz	short loc_4CD5FB
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CD5FB:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4CD631
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4CEFB0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4CD62F
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx

loc_4CD62F:
jmp	short loc_4CD65D

loc_4CD631:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
call	sub_4CEFB0
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_4CD65D
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax

loc_4CD65D:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_24]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_24]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_4CD510 endp

align 10h


; Attributes: bp-based frame

sub_4CD6B0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD6B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_4CD6E1:
cmp	[ebp+var_1C], 0
jz	short loc_4CD758
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_70], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_40]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_11], cl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4CD747
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_74], ecx
jmp	short loc_4CD750

loc_4CD747:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_74], eax

loc_4CD750:
mov	ecx, [ebp+var_74]
mov	[ebp+var_1C], ecx
jmp	short loc_4CD6E1

loc_4CD758:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_4CD7FA
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_50]
setz	cl
mov	[ebp+var_75], cl
movzx	edx, [ebp+var_75]
test	edx, edx
jz	short loc_4CD7EB
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4CD510
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_4CD8A6
jmp	short loc_4CD7FA

loc_4CD7EB:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_4CD7FA:
lea	edx, [ebp+var_32]
mov	[ebp+var_7C], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_10]
mov	[ebp+var_60], eax
lea	ecx, [ebp+var_59]
mov	[ebp+var_80], ecx
mov	byte ptr [ebp+var_4], 5
mov	edx, [ebp+var_60]
add	edx, 10h
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_31], al
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_4CD88B
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_68]
call	sub_4CD510
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_4CD8A6

loc_4CD88B:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_4CD8A6:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4CD6B0 endp

align 10h


; Attributes: bp-based frame

sub_4CD8C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD8C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4CD914

loc_4CD902:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 34h
mov	[ebp+var_14], eax

loc_4CD914:
cmp	[ebp+var_18], 0
jle	short loc_4CD92C
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4B7190
add	esp, 8
jmp	short loc_4CD902

loc_4CD92C:
jmp	short loc_4CD956

loc_4CD92E:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4CD970
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CD95D
retn

loc_4CD956:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CD95D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CD8C0 endp

align 10h


; Attributes: bp-based frame

sub_4CD970 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_4CD98C

loc_4CD983:
mov	edx, [ebp+var_8]
add	edx, 34h
mov	[ebp+var_8], edx

loc_4CD98C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_4CD9AE
xor	ecx, ecx
mov	[ebp+var_2], cl
xor	edx, edx
and	edx, 1
jz	short loc_4CD9AC
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CD9AC:
jmp	short loc_4CD983

loc_4CD9AE:
mov	esp, ebp
pop	ebp
retn
sub_4CD970 endp

align 10h


; Attributes: bp-based frame

sub_4CD9C0 proc	near

var_1C=	word ptr -1Ch
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CD9C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0ECh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4CDA17

loc_4CDA05:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 1Ch
mov	[ebp+var_14], eax

loc_4CDA17:
cmp	[ebp+var_18], 0
jle	short loc_4CDA49
xor	ecx, ecx
mov	byte ptr [ebp+var_1C+1], cl
mov	dl, byte ptr [ebp+var_1C+1]
mov	[ebp+var_19], dl
xor	eax, eax
mov	byte ptr [ebp+var_1C], al
mov	cl, byte ptr [ebp+var_1C]
mov	[ebp+var_1A], cl
lea	edx, [ebp+var_1A]
push	edx
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4C66D0
add	esp, 0Ch
jmp	short loc_4CDA05

loc_4CDA49:
jmp	short loc_4CDA73

loc_4CDA4B:
push	0
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CDA90
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CDA7A
retn

loc_4CDA73:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CDA7A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CD9C0 endp

align 10h


; Attributes: bp-based frame

sub_4CDA90 proc	near

var_BC=	dword ptr -0BCh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CDA90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B0h
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_BC], ecx
jmp	short loc_4CDACD

loc_4CDABE:
mov	edx, [ebp+var_BC]
add	edx, 1Ch
mov	[ebp+var_BC], edx

loc_4CDACD:
mov	eax, [ebp+var_BC]
cmp	eax, [ebp+arg_4]
jz	short loc_4CDB23
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_BC]
add	ecx, 10h
call	sub_487140
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_BC]
add	ecx, 4
call	sub_4A9770
xor	edx, edx
and	edx, 1
jz	short loc_4CDB21
mov	eax, [ebp+var_BC]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CDB21:
jmp	short loc_4CDABE

loc_4CDB23:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CDA90 endp

align 10h


; Attributes: bp-based frame

sub_4CDB40 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_60=	byte ptr -60h
var_5F=	byte ptr -5Fh
var_5E=	byte ptr -5Eh
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_405C10
add	esp, 8
mov	[ebp+var_4], eax
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [edx+8]
sub	ecx, [eax]
cmp	[ebp+var_4], ecx
jbe	short loc_4CDBBC
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_74]
call	sub_4C3C90
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_74]
call	sub_443CC0
mov	eax, [ebp+var_C]
add	eax, [ebp+var_8]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+var_4]
mov	ecx, [ebp+var_74]
mov	[ecx+4], eax
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_44]
mov	[edx+8], eax
jmp	loc_4CDCA9

loc_4CDBBC:
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_74]
mov	eax, [ecx+4]
sub	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_4CDC2B
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
mov	[ebp+var_54], edx
xor	eax, eax
mov	[ebp+var_46], al
mov	cl, [ebp+var_46]
mov	[ebp+var_45], cl
push	0
push	0
call	sub_406640
add	esp, 8
mov	[ebp+var_47], al
call	sub_406640
mov	[ebp+var_48], al
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	edx, [ebp+var_74]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	nullsub_1
add	esp, 8
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
jmp	short loc_4CDCA9

loc_4CDC2B:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_14]
add	edx, [ebp+var_5C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_5E], al
mov	cl, [ebp+var_5E]
mov	[ebp+var_5D], cl
push	0
push	0
call	sub_406640
add	esp, 8
mov	[ebp+var_5F], al
call	sub_406640
mov	[ebp+var_60], al
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	edx, [ebp+var_74]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_74]
mov	[ecx+4], eax

loc_4CDCA9:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4CDB40 endp

align 10h


; Attributes: bp-based frame

sub_4CDCB0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CDCB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4CDCDD:
cmp	[ebp+var_14], 0
jz	short loc_4CDD3E
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_21]
mov	[ebp+var_34], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_20], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
cmp	edx, [ebp+var_18]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4CDD33
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4CDD3C

loc_4CDD33:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4CDD3C:
jmp	short loc_4CDCDD

loc_4CDD3E:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_30]
jz	short loc_4CDD8B
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_29]
mov	[ebp+var_38], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_28], edx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_1C]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_4CDD8B
mov	ecx, [ebp+var_30]
mov	[ebp+var_10], ecx

loc_4CDD8B:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4CDCB0 endp

align 10h


; Attributes: bp-based frame

sub_4CDDA0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CDDA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
jmp	short loc_4CDDC6

loc_4CDDBD:
mov	eax, [ebp+arg_0]
sub	eax, 30h
mov	[ebp+arg_0], eax

loc_4CDDC6:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CDE26
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 30h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 24h
call	sub_4A9130
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_4CDE24
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CDE24:
jmp	short loc_4CDDBD

loc_4CDE26:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CDDA0 endp

align 10h


; Attributes: bp-based frame

sub_4CDE40 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
jmp	short loc_4CDE51

loc_4CDE48:
mov	eax, [ebp+arg_0]
sub	eax, 0Ch
mov	[ebp+arg_0], eax

loc_4CDE51:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CDE94
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 0Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_4CDE92
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CDE92:
jmp	short loc_4CDE48

loc_4CDE94:
mov	esp, ebp
pop	ebp
retn
sub_4CDE40 endp

align 10h


; Attributes: bp-based frame

sub_4CDEA0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CDEA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
jmp	short loc_4CDEC6

loc_4CDEBD:
mov	eax, [ebp+arg_0]
sub	eax, 20h
mov	[ebp+arg_0], eax

loc_4CDEC6:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CDF3C
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 20h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_18]
call	sub_5D2630
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_4CDF3A
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CDF3A:
jmp	short loc_4CDEBD

loc_4CDF3C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CDEA0 endp

align 10h


; Attributes: bp-based frame

sub_4CDF50 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_4CDF61

loc_4CDF58:
mov	eax, [ebp+arg_0]
sub	eax, 4
mov	[ebp+arg_0], eax

loc_4CDF61:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CDFB0
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_4CDF99
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_40AA90

loc_4CDF99:
xor	eax, eax
and	eax, 1
jz	short loc_4CDFAE
push	4
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_4CDFAE:
jmp	short loc_4CDF58

loc_4CDFB0:
mov	esp, ebp
pop	ebp
retn
sub_4CDF50 endp

align 10h


; Attributes: bp-based frame

sub_4CDFC0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CDFC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B0h
jmp	short loc_4CDFE9

loc_4CDFE0:
mov	eax, [ebp+arg_0]
sub	eax, 1Ch
mov	[ebp+arg_0], eax

loc_4CDFE9:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CE04C
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 1Ch
mov	[ebp+var_14], eax
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_487140
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4A9770
xor	ecx, ecx
and	ecx, 1
jz	short loc_4CE04A
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CE04A:
jmp	short loc_4CDFE0

loc_4CE04C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CDFC0 endp

align 10h


; Attributes: bp-based frame

sub_4CE060 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CDDA0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4CE060 endp

align 10h


; Attributes: bp-based frame

sub_4CE0A0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_4CE0D2

loc_4CE0C9:
mov	ecx, [ebp+var_24]
sub	ecx, 34h
mov	[ebp+var_24], ecx

loc_4CE0D2:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4CE10D
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 34h
mov	[ebp+var_1C], ecx
xor	edx, edx
and	edx, 1
jz	short loc_4CE10B
mov	eax, [ebp+var_1C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4CE10B:
jmp	short loc_4CE0C9

loc_4CE10D:
mov	esp, ebp
pop	ebp
retn
sub_4CE0A0 endp

align 10h


; Attributes: bp-based frame

sub_4CE120 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C4h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CDFC0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4CE120 endp

align 10h


; Attributes: bp-based frame

sub_4CE160 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
jmp	short loc_4CE173

loc_4CE16B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_4CE173:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4CE1EF
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4AC440
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_14]
mov	[edx+4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	loc_4CE16B

loc_4CE1EF:
mov	esp, ebp
pop	ebp
retn	10h
sub_4CE160 endp

align 10h


; Attributes: bp-based frame

sub_4CE200 proc	near

var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_74=	dword ptr -74h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A0], ecx
mov	eax, [ebp+var_A0]
cmp	eax, [ebp+arg_0]
jz	loc_4CE386
mov	ecx, [ebp+var_A0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_A0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_4CE260:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_A1], cl
movzx	edx, [ebp+var_A1]
test	edx, edx
jz	short loc_4CE2EB
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4CE2EB
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	[ecx+8], eax
jmp	loc_4CE260

loc_4CE2EB:
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CE32C
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_490040
jmp	short loc_4CE386

loc_4CE32C:
lea	edx, [ebp+var_94]
mov	[ebp+var_68], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	eax, [ebp+var_10]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_98], ecx
xor	edx, edx
mov	[ebp+var_69], dl
lea	eax, [ebp+var_69]
push	eax
mov	ecx, [ebp+var_9C]
push	ecx
mov	edx, [ebp+var_98]
push	edx
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_94]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	ecx, [ebp+var_A0]
call	sub_4D3190

loc_4CE386:
mov	eax, [ebp+var_A0]
mov	esp, ebp
pop	ebp
retn	4
sub_4CE200 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4CE3A0(void *, int)
sub_4CE3A0 proc	near

var_38=	dword ptr -38h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	4Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4CE400
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4D2610
mov	[ebp+var_38], eax
jmp	short loc_4CE407

loc_4CE400:
mov	[ebp+var_38], 0

loc_4CE407:
mov	eax, [ebp+var_38]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CE3A0 endp

align 10h


; Attributes: bp-based frame

sub_4CE430 proc	near

var_94=	dword ptr -94h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_4D1D80
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4CE430 endp

align 10h


; Attributes: bp-based frame

sub_4CE480 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4D1DE0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4CE480 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4CE4B0(void *, int)
sub_4CE4B0 proc	near

var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4CE510
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4D2570
mov	[ebp+var_3C], eax
jmp	short loc_4CE517

loc_4CE510:
mov	[ebp+var_3C], 0

loc_4CE517:
mov	eax, [ebp+var_3C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CE4B0 endp

align 10h


; Attributes: bp-based frame

sub_4CE540 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE540
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CE540 endp

align 10h


; Attributes: bp-based frame

sub_4CE590 proc	near

var_44=	dword ptr -44h
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE590
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 34h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_44], ecx
push	1
mov	ecx, [ebp+var_44]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_4D3330
add	esp, 0Ch
jmp	short loc_4CE629

loc_4CE5F8:
cmp	[ebp+var_14], 0
jz	short loc_4CE613
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4CE613:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CE630
retn

loc_4CE629:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CE630:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CE590 endp

align 10h


; Attributes: bp-based frame

sub_4CE660 proc	near

var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE660
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
push	1
mov	ecx, [ebp+var_4C]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D1E20
add	esp, 8
jmp	short loc_4CE6DF

loc_4CE6AE:
cmp	[ebp+var_14], 0
jz	short loc_4CE6C9
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CE6C9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CE6E6
retn

loc_4CE6DF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CE6E6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CE660 endp



; Attributes: bp-based frame

sub_4CE710 proc	near

var_48=	dword ptr -48h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE710
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 38h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_48], ecx
push	1
mov	ecx, [ebp+var_48]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D1EB0
add	esp, 8
jmp	short loc_4CE78F

loc_4CE75E:
cmp	[ebp+var_14], 0
jz	short loc_4CE779
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CE779:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CE796
retn

loc_4CE78F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CE796:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CE710 endp



; Attributes: bp-based frame

sub_4CE7C0 proc	near

var_48=	dword ptr -48h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE7C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 38h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_48], ecx
push	1
mov	ecx, [ebp+var_48]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D1F40
add	esp, 8
jmp	short loc_4CE83F

loc_4CE80E:
cmp	[ebp+var_14], 0
jz	short loc_4CE829
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CE829:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CE846
retn

loc_4CE83F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CE846:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CE7C0 endp



; Attributes: bp-based frame

sub_4CE870 proc	near

var_44=	dword ptr -44h
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 34h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_44], ecx
push	1
mov	ecx, [ebp+var_44]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_4D33D0
add	esp, 0Ch
jmp	short loc_4CE909

loc_4CE8D8:
cmp	[ebp+var_14], 0
jz	short loc_4CE8F3
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4CE8F3:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CE910
retn

loc_4CE909:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CE910:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CE870 endp

align 10h


; Attributes: bp-based frame

sub_4CE940 proc	near

var_48=	dword ptr -48h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE940
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 38h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_48], ecx
push	1
mov	ecx, [ebp+var_48]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D1FD0
add	esp, 8
jmp	short loc_4CE9BF

loc_4CE98E:
cmp	[ebp+var_14], 0
jz	short loc_4CE9A9
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CE9A9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CE9C6
retn

loc_4CE9BF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CE9C6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CE940 endp



; Attributes: bp-based frame

sub_4CE9F0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CE9F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D2060
add	esp, 8
jmp	short loc_4CEA6F

loc_4CEA3E:
cmp	[ebp+var_14], 0
jz	short loc_4CEA59
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CEA59:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CEA76
retn

loc_4CEA6F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CEA76:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CE9F0 endp



; Attributes: bp-based frame

sub_4CEAA0 proc	near

var_3C=	dword ptr -3Ch
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CEAA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_43A200
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_4D3480
add	esp, 0Ch
jmp	short loc_4CEB39

loc_4CEB08:
cmp	[ebp+var_14], 0
jz	short loc_4CEB23
mov	ecx, 1
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4CEB23:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CEB40
retn

loc_4CEB39:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CEB40:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CEAA0 endp

align 10h


; Attributes: bp-based frame

sub_4CEB70 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CEB70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D2110
add	esp, 8
jmp	short loc_4CEBEF

loc_4CEBBE:
cmp	[ebp+var_14], 0
jz	short loc_4CEBD9
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CEBD9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CEBF6
retn

loc_4CEBEF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CEBF6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CEB70 endp



; Attributes: bp-based frame

sub_4CEC20 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CEC20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_430EA0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D21B0
add	esp, 8
jmp	short loc_4CEC9F

loc_4CEC6E:
cmp	[ebp+var_14], 0
jz	short loc_4CEC89
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CEC89:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CECA6
retn

loc_4CEC9F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CECA6:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CEC20 endp



; Attributes: bp-based frame

sub_4CECD0 proc	near

var_40=	dword ptr -40h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CECD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
push	1
mov	ecx, [ebp+var_40]
call	sub_4CF100
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D2250
add	esp, 8
jmp	short loc_4CED4F

loc_4CED1E:
cmp	[ebp+var_14], 0
jz	short loc_4CED39
mov	edx, 1
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CED39:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CED56
retn

loc_4CED4F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CED56:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CECD0 endp



; Attributes: bp-based frame

sub_4CED80 proc	near

var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CED80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
push	1
mov	ecx, [ebp+var_4C]
call	sub_4AC5B0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D2300
add	esp, 8
jmp	short loc_4CEDFF

loc_4CEDCE:
cmp	[ebp+var_14], 0
jz	short loc_4CEDE9
mov	edx, 1
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CEDE9:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CEE06
retn

loc_4CEDFF:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CEE06:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CED80 endp



; Attributes: bp-based frame

sub_4CEE30 proc	near

var_3C=	dword ptr -3Ch
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CEE30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4C75C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_4D3510
add	esp, 0Ch
jmp	short loc_4CEEC9

loc_4CEE98:
cmp	[ebp+var_14], 0
jz	short loc_4CEEB3
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4CEEB3:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CEED0
retn

loc_4CEEC9:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CEED0:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CEE30 endp

align 10h


; Attributes: bp-based frame

sub_4CEF00 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CEF00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_43A200
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D23B0
add	esp, 8
jmp	short loc_4CEF7F

loc_4CEF4E:
cmp	[ebp+var_14], 0
jz	short loc_4CEF69
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CEF69:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CEF86
retn

loc_4CEF7F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CEF86:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CEF00 endp



; Attributes: bp-based frame

sub_4CEFB0 proc	near

var_40=	dword ptr -40h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CEFB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
push	1
mov	ecx, [ebp+var_40]
call	sub_4CF160
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_4D2450
add	esp, 8
jmp	short loc_4CF02F

loc_4CEFFE:
cmp	[ebp+var_14], 0
jz	short loc_4CF019
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4CF019:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CF036
retn

loc_4CF02F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CF036:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_4CEFB0 endp



; Attributes: bp-based frame

sub_4CF060 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CF060
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
add	ecx, 4
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_10]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_14]
add	eax, 8
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 20h
push	ecx
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4CF060 endp

align 10h


; Attributes: bp-based frame

sub_4CF100 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 4EC4EC4h
jbe	short loc_4CF128
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4CF128:
cmp	[ebp+arg_0], 0
jz	short loc_4CF14E
mov	ecx, [ebp+arg_0]
imul	ecx, 34h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_4CF155

loc_4CF14E:
mov	[ebp+var_18], 0

loc_4CF155:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4CF100 endp

align 10h


; Attributes: bp-based frame

sub_4CF160 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 5D1745Dh
jbe	short loc_4CF188
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_4CF188:
cmp	[ebp+arg_0], 0
jz	short loc_4CF1AE
mov	ecx, [ebp+arg_0]
imul	ecx, 2Ch
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_4CF1B5

loc_4CF1AE:
mov	[ebp+var_18], 0

loc_4CF1B5:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4CF160 endp

align 10h


; Attributes: bp-based frame

sub_4CF1C0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CF1C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4CF206
mov	eax, [ebp+arg_C]
xor	ecx, ecx
cmp	eax, [ebp+arg_10]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4CF224

loc_4CF206:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_4CF452

loc_4CF224:
mov	edx, [ebp+arg_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+arg_10]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CF2B8

loc_4CF245:
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+arg_8]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CF29A
mov	ecx, [ebp+arg_C]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
sub	edx, 1
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
sub	ecx, 1
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_1C]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+var_20]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4CF29A
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax
jmp	short loc_4CF245

loc_4CF29A:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_4CF452

loc_4CF2B8:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4CF30D
mov	eax, [ebp+arg_C]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 1
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
sub	eax, 1
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_24]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+var_28]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4CF30D
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
jmp	short loc_4CF2B8

loc_4CF30D:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4CF33D
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_4CF452

loc_4CF33D:
mov	edx, [ebp+var_10]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 1
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
xor	eax, eax
cmp	edx, [ebp+arg_8]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4CF382
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	loc_4CF452

loc_4CF382:
mov	ecx, [ebp+var_14]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
sub	ecx, 1
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_2C]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+var_30]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4CF42B
mov	eax, [ebp+var_14]
sub	eax, 1
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
xor	edx, edx
cmp	ecx, [ebp+arg_10]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CF3F0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_4CF452

loc_4CF3F0:
mov	eax, [ebp+var_18]
sub	eax, 1
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
xor	edx, edx
cmp	ecx, [ebp+arg_8]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4CF426
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
jmp	short loc_4CF452

loc_4CF426:
jmp	loc_4CF382

loc_4CF42B:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax
jmp	loc_4CF2B8
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]

loc_4CF452:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CF1C0 endp



; Attributes: bp-based frame

sub_4CF460 proc	near

var_60=	dword ptr -60h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_60]
call	sub_4D2500
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_60]
add	ecx, 8
call	sub_4046D0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_60]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_404C50
add	esp, 0Ch
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_4CF4E0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_60]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4CF4E0:
mov	ecx, [ebp+var_60]
call	sub_403090
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_60]
call	sub_4046B0
mov	esp, ebp
pop	ebp
retn	14h
sub_4CF460 endp

align 10h


; Attributes: bp-based frame

sub_4CF510 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4CF537
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4CF537
mov	[ebp+var_30], 1
jmp	short loc_4CF53E

loc_4CF537:
mov	[ebp+var_30], 0

loc_4CF53E:
movzx	ecx, byte ptr [ebp+var_30]
test	ecx, ecx
jz	short loc_4CF570
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_4CF510
jmp	loc_4CF673

loc_4CF570:
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	short loc_4CF60D
xor	edx, edx
mov	[ebp+var_E], dl
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_4]
shl	edx, 2
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
sub	ecx, edx
push	ecx
call	sub_407C50
add	esp, 10h
mov	edx, [ebp+var_2C]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_2C]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_F], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
shl	eax, 2
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_404BF0
add	esp, 0Ch
jmp	short loc_4CF673

loc_4CF60D:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
push	edx
call	sub_404C20
add	esp, 0Ch
mov	ecx, [ebp+var_2C]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_10], dl
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 10h
mov	edx, [ebp+var_2C]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_2C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_404BF0
add	esp, 0Ch

loc_4CF673:
mov	esp, ebp
pop	ebp
retn	10h
sub_4CF510 endp

align 10h


; Attributes: bp-based frame

sub_4CF680 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 30h
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D26A0
add	esp, 14h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx
jmp	short loc_4CF6BD

loc_4CF6B4:
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	[ebp+var_4], edx

loc_4CF6BD:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_8]
jnb	loc_4CF76E
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4]
push	edx
lea	ecx, [ebp+arg_10]
call	sub_1012350
movzx	eax, al
test	eax, eax
jz	loc_4CF769
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ecx+4]
mov	[ebp+var_C], eax
mov	ecx, [ecx+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_14]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_18]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	[eax+4], edx
mov	ecx, [ebp+var_14]
mov	[eax+8], ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+var_10]
mov	[edx], eax
mov	ecx, [ebp+var_C]
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_4D3B90
add	esp, 24h

loc_4CF769:
jmp	loc_4CF6B4

loc_4CF76E:
mov	eax, [ebp+arg_10]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_18]
mov	[ebp+var_24], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax

loc_4CF786:
mov	eax, [ebp+var_20]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 1
jle	short loc_4CF7D0
mov	edx, [ebp+var_20]
mov	[ebp+var_30], edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+var_28]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D3D00
add	esp, 14h
mov	ecx, [ebp+var_20]
sub	ecx, 0Ch
mov	[ebp+var_20], ecx
jmp	short loc_4CF786

loc_4CF7D0:
mov	esp, ebp
pop	ebp
retn
sub_4CF680 endp

align 10h


; Attributes: bp-based frame

sub_4CF7E0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	[ebp+var_6], dl
mov	al, [ebp+var_6]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_8+1],	cl
mov	dl, byte ptr [ebp+var_8+1]
mov	[ebp+var_1], dl
xor	eax, eax
mov	byte ptr [ebp+var_8], al
mov	cl, byte ptr [ebp+var_8]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ecx+4]
mov	[ebp+var_10], eax
mov	ecx, [ecx+8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[eax+4], edx
mov	ecx, [ebp+var_C]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn
sub_4CF7E0 endp



; Attributes: bp-based frame

sub_4CF860 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_4CF875

loc_4CF86C:
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	[ebp+var_4], ecx

loc_4CF875:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_4CF8B9
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
push	eax
call	sub_4D2750
add	esp, 1Ch
jmp	short loc_4CF86C

loc_4CF8B9:
mov	esp, ebp
pop	ebp
retn
sub_4CF860 endp

align 10h


; Attributes: bp-based frame

sub_4CF8C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CF8C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 8Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4CF90E

loc_4CF905:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4CF90E:
cmp	[ebp+var_18], 0
jle	short loc_4CF938
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4CF980
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 30h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 30h
mov	[ebp+var_14], eax
jmp	short loc_4CF905

loc_4CF938:
mov	eax, [ebp+var_14]
jmp	short loc_4CF96C

loc_4CF93D:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_4C6A30
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CF96C
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CF96C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CF8C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4CF980(void *, int)
sub_4CF980 proc	near

var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4CF9E0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4C6D50
mov	[ebp+var_3C], eax
jmp	short loc_4CF9E7

loc_4CF9E0:
mov	[ebp+var_3C], 0

loc_4CF9E7:
mov	eax, [ebp+var_3C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CF980 endp

align 10h


; Attributes: bp-based frame

sub_4CFA10 proc	near

var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CFA10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 14h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4CFA64

loc_4CFA52:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 14h
mov	[ebp+var_14], eax

loc_4CFA64:
cmp	[ebp+var_18], 0
jle	short loc_4CFA7C
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4D27C0
add	esp, 8
jmp	short loc_4CFA52

loc_4CFA7C:
jmp	short loc_4CFA99

loc_4CFA7E:
xor	eax, eax
mov	[ebp+var_21], al
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CFAA0
retn

loc_4CFA99:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CFAA0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CFA10 endp

align 10h


; Attributes: bp-based frame

sub_4CFAC0 proc	near

var_28=	dword ptr -28h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CFAC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_4CFB06

loc_4CFAFD:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4CFB06:
cmp	[ebp+var_18], 0
jle	short loc_4CFB30
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4B6FE0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax
jmp	short loc_4CFAFD

loc_4CFB30:
mov	eax, [ebp+var_14]
jmp	short loc_4CFB77

loc_4CFB35:
xor	ecx, ecx
mov	[ebp+var_21], cl
mov	edx, [ebp+arg_8]
mov	[ebp+var_28], edx
jmp	short loc_4CFB4B

loc_4CFB42:
mov	eax, [ebp+var_28]
add	eax, 4
mov	[ebp+var_28], eax

loc_4CFB4B:
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_14]
jz	short loc_4CFB5A
xor	edx, edx
mov	[ebp+var_22], dl
jmp	short loc_4CFB42

loc_4CFB5A:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CFB77
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CFB77:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CFAC0 endp

align 10h


; Attributes: bp-based frame

sub_4CFB90 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CFB90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 90h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4CFBE7

loc_4CFBD5:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_14], eax

loc_4CFBE7:
cmp	[ebp+var_18], 0
jle	short loc_4CFBFF
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4C9880
add	esp, 8
jmp	short loc_4CFBD5

loc_4CFBFF:
jmp	short loc_4CFC29

loc_4CFC01:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4C6AC0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CFC30
retn

loc_4CFC29:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CFC30:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CFB90 endp

align 10h


; Attributes: bp-based frame

sub_4CFC50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	0
lea	eax, [ebp+var_1]
push	eax
sub	esp, 10h
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+arg_18]
mov	[ecx+4], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_20]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4CABD0
add	esp, 3Ch
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4CFC50 endp

align 10h


; Attributes: bp-based frame

sub_4CFCD0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CFCD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 5Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 5
mov	[ebp+var_18], ecx
jmp	short loc_4CFD16

loc_4CFD0D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4CFD16:
cmp	[ebp+var_18], 0
jle	short loc_4CFD40
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4CFD90
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 20h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_14], eax
jmp	short loc_4CFD0D

loc_4CFD40:
mov	eax, [ebp+var_14]
jmp	short loc_4CFD74

loc_4CFD45:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_4CB7F0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CFD74
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CFD74:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CFCD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4CFD90(void *, int)
sub_4CFD90 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CFD90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4CFE2C
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 18h
call	sub_4C70F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_84], ecx
jmp	short loc_4CFE36

loc_4CFE2C:
mov	[ebp+var_84], 0

loc_4CFE36:
mov	edx, [ebp+var_84]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4CFD90 endp

align 10h


; Attributes: bp-based frame

sub_4CFE60 proc	near

var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CFE60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4CFEB4

loc_4CFEA2:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_14], eax

loc_4CFEB4:
cmp	[ebp+var_18], 0
jle	short loc_4CFF03
xor	ecx, ecx
mov	byte ptr [ebp+var_1C+1], cl
mov	dl, byte ptr [ebp+var_1C+1]
mov	byte ptr [ebp+var_1A+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_1C], al
mov	cl, byte ptr [ebp+var_1C]
mov	byte ptr [ebp+var_1A], cl
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
cmp	[ebp+var_20], 0
jz	short loc_4CFEFA
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_20]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_28], ecx
jmp	short loc_4CFF01

loc_4CFEFA:
mov	[ebp+var_28], 0

loc_4CFF01:
jmp	short loc_4CFEA2

loc_4CFF03:
jmp	short loc_4CFF20

loc_4CFF05:
xor	edx, edx
mov	[ebp+var_21], dl
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CFF27
retn

loc_4CFF20:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CFF27:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CFE60 endp

align 10h


; Attributes: bp-based frame

sub_4CFF40 proc	near

var_1D=	byte ptr -1Dh
var_1C=	word ptr -1Ch
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4CFF40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_4CFF8F

loc_4CFF7D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax

loc_4CFF8F:
cmp	[ebp+var_18], 0
jle	short loc_4CFFB7
xor	ecx, ecx
mov	byte ptr [ebp+var_1C+1], cl
mov	dl, byte ptr [ebp+var_1C+1]
mov	[ebp+var_19], dl
xor	eax, eax
mov	byte ptr [ebp+var_1C], al
mov	cl, byte ptr [ebp+var_1C]
mov	[ebp+var_1A], cl
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
jmp	short loc_4CFF7D

loc_4CFFB7:
jmp	short loc_4CFFD4

loc_4CFFB9:
xor	edx, edx
mov	[ebp+var_1D], dl
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4CFFDB
retn

loc_4CFFD4:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4CFFDB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4CFF40 endp

align 10h


; Attributes: bp-based frame

sub_4CFFF0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D001D:
cmp	[ebp+var_14], 0
jz	short loc_4D007D
lea	eax, [ebp+var_19]
mov	[ebp+var_2C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 14h
call	sub_42BEE0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4D0072
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4D007B

loc_4D0072:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4D007B:
jmp	short loc_4D001D

loc_4D007D:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4CFFF0 endp



; Attributes: bp-based frame

sub_4D0090 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D00BD:
cmp	[ebp+var_14], 0
jz	loc_4D014A
lea	eax, [ebp+var_19]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	[ebp+var_28], edx
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_2C]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4D011C
jb	short loc_4D0113
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_2C]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4D011C

loc_4D0113:
mov	[ebp+var_30], 1
jmp	short loc_4D0123

loc_4D011C:
mov	[ebp+var_30], 0

loc_4D0123:
movzx	ecx, byte ptr [ebp+var_30]
test	ecx, ecx
jnz	short loc_4D013C
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4D0145

loc_4D013C:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4D0145:
jmp	loc_4D00BD

loc_4D014A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D0090 endp

align 10h


; Attributes: bp-based frame

sub_4D0160 proc	near

var_4F4= dword ptr -4F4h
var_4F0= dword ptr -4F0h
var_4EC= dword ptr -4ECh
var_4E8= dword ptr -4E8h
var_4E4= dword ptr -4E4h
var_4E0= dword ptr -4E0h
var_4DC= dword ptr -4DCh
var_4D8= dword ptr -4D8h
var_4D4= dword ptr -4D4h
var_478= dword ptr -478h
var_471= byte ptr -471h
var_469= byte ptr -469h
var_468= dword ptr -468h
var_464= dword ptr -464h
var_460= dword ptr -460h
var_45C= dword ptr -45Ch
var_3D8= dword ptr -3D8h
var_398= dword ptr -398h
var_394= dword ptr -394h
var_390= dword ptr -390h
var_350= dword ptr -350h
var_34C= dword ptr -34Ch
var_348= dword ptr -348h
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2FC= dword ptr -2FCh
var_2F8= dword ptr -2F8h
var_2F4= dword ptr -2F4h
var_2F0= dword ptr -2F0h
var_2EC= dword ptr -2ECh
var_2E8= dword ptr -2E8h
var_2E4= dword ptr -2E4h
var_2E0= dword ptr -2E0h
var_2D5= byte ptr -2D5h
var_2D4= dword ptr -2D4h
var_2CD= byte ptr -2CDh
var_2C5= byte ptr -2C5h
var_2C4= dword ptr -2C4h
var_2C0= dword ptr -2C0h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_285= byte ptr -285h
var_284= dword ptr -284h
var_27D= byte ptr -27Dh
var_275= byte ptr -275h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= byte ptr -1C4h
var_1B0= byte ptr -1B0h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= byte ptr -194h
var_184= dword ptr -184h
var_180= byte ptr -180h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= byte ptr -164h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= byte ptr -138h
var_124= byte ptr -124h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= byte ptr -108h
var_F4=	byte ptr -0F4h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D0160
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 4E4h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4F4], ecx
mov	eax, [ebp+var_4F4]
mov	ecx, [eax]
mov	[ebp+var_AC], ecx
mov	edx, [eax+4]
mov	[ebp+var_A8], edx
mov	ecx, [eax+8]
mov	[ebp+var_A4], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_AC]
push	eax
lea	ecx, [ebp+arg_0]
call	sub_4AC300
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_4F4]
mov	edx, [ecx]
mov	[ebp+var_1D4], edx
mov	eax, [ecx+4]
mov	[ebp+var_1D0], eax
mov	edx, [ecx+8]
mov	[ebp+var_1CC], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_1C8], eax
lea	ecx, [ebp+var_1D4]
push	ecx
mov	ecx, [ebp+var_4F4]
add	ecx, 10h
call	sub_4AC300
mov	[ebp+var_14], eax
mov	edx, [ebp+var_14]
shr	edx, 1
cmp	[ebp+var_18], edx
jg	loc_4D0849
mov	eax, [ebp+arg_30]
push	eax
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_4F4]
call	sub_4B8210
mov	edx, [ebp+var_4F4]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	ecx, [edx+4]
mov	[ebp+var_34], ecx
mov	eax, [edx+8]
mov	[ebp+var_30], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_4F4]
mov	eax, [edx]
mov	[ebp+var_1F8], eax
mov	ecx, [edx+4]
mov	[ebp+var_1F4], ecx
mov	eax, [edx+8]
mov	[ebp+var_1F0], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_1EC], ecx
mov	edx, [ebp+var_18]
push	edx
lea	ecx, [ebp+var_1F8]
call	sub_4AC610
mov	eax, [ebp+var_1F8]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_1F4]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_1F0]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_1EC]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_B8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_B4]
mov	[ebp+arg_8], eax
mov	ecx, [ebp+var_B0]
mov	[ebp+arg_C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_18]
cmp	edx, [ebp+arg_30]
jl	loc_4D05CE
mov	eax, [ebp+var_4F4]
mov	ecx, [eax]
mov	[ebp+var_208], ecx
mov	edx, [eax+4]
mov	[ebp+var_204], edx
mov	ecx, [eax+8]
mov	[ebp+var_200], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_1FC], edx
mov	eax, [ebp+arg_30]
push	eax
lea	ecx, [ebp+var_208]
call	sub_4AC610
mov	ecx, [ebp+var_208]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_204]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_200]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1FC]
mov	[ebp+var_3C], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_C0], esp
mov	[ebp+var_20C], edx
mov	eax, [ebp+var_20C]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_20]
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_C4], esp
mov	[ebp+var_210], eax
mov	ecx, [ebp+var_210]
mov	edx, [ebp+var_48]
mov	[ecx], edx
mov	eax, [ebp+var_44]
mov	[ecx+4], eax
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_C8], esp
mov	[ebp+var_214], ecx
mov	edx, [ebp+var_4F4]
mov	eax, [ebp+var_214]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_D8]
push	eax
call	sub_4CAF20
add	esp, 34h
mov	ecx, [ebp+var_4F4]
mov	edx, [ebp+var_28]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_20]
mov	[ecx+8], edx
mov	eax, [ebp+var_1C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_DC], esp
mov	[ebp+var_238], ecx
mov	edx, [ebp+var_238]
mov	eax, [ebp+var_38]
mov	[edx], eax
mov	ecx, [ebp+var_34]
mov	[edx+4], ecx
mov	eax, [ebp+var_30]
mov	[edx+8], eax
mov	ecx, [ebp+var_2C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_E0], esp
mov	[ebp+var_23C], edx
mov	eax, [ebp+var_23C]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_E4], esp
mov	[ebp+var_240], eax
mov	ecx, [ebp+var_240]
mov	edx, [ebp+var_48]
mov	[ecx], edx
mov	eax, [ebp+var_44]
mov	[ecx+4], eax
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_F4]
push	ecx
call	sub_4C1610
add	esp, 34h
lea	edx, [ebp+var_2B0]
mov	[ebp+var_274], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_270], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_26C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_268], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_264], eax
mov	ecx, [ebp+arg_30]
neg	ecx
push	ecx
lea	ecx, [ebp+var_270]
call	sub_4AC610
mov	edx, [ebp+var_274]
mov	eax, [ebp+var_270]
mov	[edx], eax
mov	ecx, [ebp+var_26C]
mov	[edx+4], ecx
mov	eax, [ebp+var_268]
mov	[edx+8], eax
mov	ecx, [ebp+var_264]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_27D], dl
mov	al, [ebp+var_27D]
mov	[ebp+var_275], al
lea	ecx, [ebp+var_2A0]
mov	[ebp+var_284], ecx
mov	edx, [ebp+var_284]
mov	eax, [ebp+var_2B0]
mov	[edx], eax
mov	ecx, [ebp+var_2AC]
mov	[edx+4], ecx
mov	eax, [ebp+var_2A8]
mov	[edx+8], eax
mov	ecx, [ebp+var_2A4]
mov	[edx+0Ch], ecx
push	0
lea	edx, [ebp+var_285]
push	edx
sub	esp, 10h
mov	[ebp+var_290], esp
mov	eax, [ebp+var_290]
mov	ecx, [ebp+var_2A0]
mov	[eax], ecx
mov	edx, [ebp+var_29C]
mov	[eax+4], edx
mov	ecx, [ebp+var_298]
mov	[eax+8], ecx
mov	edx, [ebp+var_294]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_20]
mov	[eax], ecx
mov	edx, [ebp+arg_24]
mov	[eax+4], edx
mov	ecx, [ebp+arg_28]
mov	[eax+8], ecx
mov	edx, [ebp+arg_2C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_108]
push	eax
call	sub_4D47C0
add	esp, 3Ch
jmp	loc_4D080C

loc_4D05CE:
mov	ecx, [ebp+arg_10]
mov	[ebp+var_58], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_18]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_1C]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_30]
sub	edx, [ebp+var_18]
push	edx
lea	ecx, [ebp+var_58]
call	sub_4AC610
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_10C], esp
mov	[ebp+var_2B8], eax
mov	ecx, [ebp+var_2B8]
mov	edx, [ebp+var_28]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_20]
mov	[ecx+8], edx
mov	eax, [ebp+var_1C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_58]
mov	[ecx], edx
mov	eax, [ebp+var_54]
mov	[ecx+4], eax
mov	edx, [ebp+var_50]
mov	[ecx+8], edx
mov	eax, [ebp+var_4C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_110], esp
mov	[ebp+var_2BC], ecx
mov	edx, [ebp+var_2BC]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
mov	[edx+4], ecx
mov	eax, [ebp+arg_8]
mov	[edx+8], eax
mov	ecx, [ebp+arg_C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_114], esp
mov	[ebp+var_2C0], edx
mov	eax, [ebp+var_4F4]
mov	ecx, [ebp+var_2C0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_124]
push	ecx
call	sub_4D2960
add	esp, 54h
mov	edx, [ebp+var_4F4]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_300]
mov	[ebp+var_2C4], edx
mov	eax, [ebp+var_2C4]
mov	ecx, [ebp+var_38]
mov	[eax], ecx
mov	edx, [ebp+var_34]
mov	[eax+4], edx
mov	ecx, [ebp+var_30]
mov	[eax+8], ecx
mov	edx, [ebp+var_2C]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_58]
mov	[ebp+var_310], eax
mov	ecx, [ebp+var_54]
mov	[ebp+var_30C], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_308], edx
mov	eax, [ebp+var_4C]
mov	[ebp+var_304], eax
xor	ecx, ecx
mov	[ebp+var_2CD], cl
mov	dl, [ebp+var_2CD]
mov	[ebp+var_2C5], dl
lea	eax, [ebp+var_2F0]
mov	[ebp+var_2D4], eax
mov	ecx, [ebp+var_2D4]
mov	edx, [ebp+var_300]
mov	[ecx], edx
mov	eax, [ebp+var_2FC]
mov	[ecx+4], eax
mov	edx, [ebp+var_2F8]
mov	[ecx+8], edx
mov	eax, [ebp+var_2F4]
mov	[ecx+0Ch], eax
push	0
lea	ecx, [ebp+var_2D5]
push	ecx
sub	esp, 10h
mov	[ebp+var_2E0], esp
mov	edx, [ebp+var_2E0]
mov	eax, [ebp+var_2F0]
mov	[edx], eax
mov	ecx, [ebp+var_2EC]
mov	[edx+4], ecx
mov	eax, [ebp+var_2E8]
mov	[edx+8], eax
mov	ecx, [ebp+var_2E4]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_20]
mov	[edx], eax
mov	ecx, [ebp+arg_24]
mov	[edx+4], ecx
mov	eax, [ebp+arg_28]
mov	[edx+8], eax
mov	ecx, [ebp+arg_2C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_310]
mov	[edx], eax
mov	ecx, [ebp+var_30C]
mov	[edx+4], ecx
mov	eax, [ebp+var_308]
mov	[edx+8], eax
mov	ecx, [ebp+var_304]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_138]
push	edx
call	sub_4D47C0
add	esp, 3Ch

loc_4D080C:
jmp	short loc_4D083D

loc_4D080E:
mov	eax, [ebp+var_4F4]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_4F4]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D0844
retn

loc_4D083D:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D0844:
jmp	loc_4D0DF8

loc_4D0849:
mov	eax, [ebp+arg_30]
push	eax
lea	ecx, [ebp+var_6C]
push	ecx
mov	ecx, [ebp+var_4F4]
call	sub_4B8290
mov	edx, [ebp+var_4F4]
add	edx, 10h
mov	eax, [edx]
mov	[ebp+var_7C], eax
mov	ecx, [edx+4]
mov	[ebp+var_78], ecx
mov	eax, [edx+8]
mov	[ebp+var_74], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_14]
sub	edx, [ebp+var_18]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_4F4]
add	eax, 10h
mov	ecx, [eax]
mov	[ebp+var_334], ecx
mov	edx, [eax+4]
mov	[ebp+var_330], edx
mov	ecx, [eax+8]
mov	[ebp+var_32C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_328], edx
mov	eax, [ebp+var_5C]
neg	eax
push	eax
lea	ecx, [ebp+var_334]
call	sub_4AC610
mov	ecx, [ebp+var_334]
mov	[ebp+var_148], ecx
mov	edx, [ebp+var_330]
mov	[ebp+var_144], edx
mov	eax, [ebp+var_32C]
mov	[ebp+var_140], eax
mov	ecx, [ebp+var_328]
mov	[ebp+var_13C], ecx
mov	edx, [ebp+var_148]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_144]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_140]
mov	[ebp+arg_8], ecx
mov	edx, [ebp+var_13C]
mov	[ebp+arg_C], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_5C]
cmp	eax, [ebp+arg_30]
jle	loc_4D0B81
mov	ecx, [ebp+var_4F4]
add	ecx, 10h
mov	edx, [ecx]
mov	[ebp+var_344], edx
mov	eax, [ecx+4]
mov	[ebp+var_340], eax
mov	edx, [ecx+8]
mov	[ebp+var_33C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_338], eax
mov	ecx, [ebp+arg_30]
neg	ecx
push	ecx
lea	ecx, [ebp+var_344]
call	sub_4AC610
mov	edx, [ebp+var_344]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_340]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_33C]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_338]
mov	[ebp+var_80], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_14C], esp
mov	[ebp+var_348], eax
mov	ecx, [ebp+var_4F4]
add	ecx, 10h
mov	edx, [ebp+var_348]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_150], esp
mov	[ebp+var_34C], edx
mov	eax, [ebp+var_4F4]
add	eax, 10h
mov	ecx, [ebp+var_34C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_154], esp
mov	[ebp+var_350], ecx
mov	edx, [ebp+var_350]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	ecx, [ebp+var_88]
mov	[edx+4], ecx
mov	eax, [ebp+var_84]
mov	[edx+8], eax
mov	ecx, [ebp+var_80]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_164]
push	edx
call	sub_4CAF20
add	esp, 34h
mov	eax, [ebp+var_4F4]
add	eax, 10h
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	[eax+4], edx
mov	ecx, [ebp+var_64]
mov	[eax+8], ecx
mov	edx, [ebp+var_60]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_168], esp
mov	[ebp+var_390], eax
mov	ecx, [ebp+var_390]
mov	edx, [ebp+var_7C]
mov	[ecx], edx
mov	eax, [ebp+var_78]
mov	[ecx+4], eax
mov	edx, [ebp+var_74]
mov	[ecx+8], edx
mov	eax, [ebp+var_70]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_16C], esp
mov	[ebp+var_394], ecx
mov	edx, [ebp+var_394]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	ecx, [ebp+var_88]
mov	[edx+4], ecx
mov	eax, [ebp+var_84]
mov	[edx+8], eax
mov	ecx, [ebp+var_80]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_170], esp
mov	[ebp+var_398], edx
mov	eax, [ebp+var_398]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_180]
push	eax
call	sub_4C19D0
add	esp, 34h
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_184], esp
mov	[ebp+var_3D8], ecx
mov	edx, [ebp+var_3D8]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
mov	[edx+4], ecx
mov	eax, [ebp+arg_8]
mov	[edx+8], eax
mov	ecx, [ebp+arg_C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_20]
mov	[edx], eax
mov	ecx, [ebp+arg_24]
mov	[edx+4], ecx
mov	eax, [ebp+arg_28]
mov	[edx+8], eax
mov	ecx, [ebp+arg_2C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_194]
push	edx
call	sub_4D28E0
add	esp, 34h
jmp	loc_4D0DBA

loc_4D0B81:
mov	eax, [ebp+arg_10]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_98], ecx
mov	edx, [ebp+arg_18]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_1C]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_5C]
push	ecx
lea	ecx, [ebp+var_9C]
call	sub_4AC610
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_198], esp
mov	[ebp+var_45C], edx
mov	eax, [ebp+var_4F4]
add	eax, 10h
mov	ecx, [ebp+var_45C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_19C], esp
mov	[ebp+var_460], ecx
mov	edx, [ebp+var_4F4]
add	edx, 10h
mov	eax, [ebp+var_460]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_1A0], esp
mov	[ebp+var_464], eax
mov	ecx, [ebp+var_464]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+arg_4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+arg_20]
mov	[ecx], edx
mov	eax, [ebp+arg_24]
mov	[ecx+4], eax
mov	edx, [ebp+arg_28]
mov	[ecx+8], edx
mov	eax, [ebp+arg_2C]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_9C]
mov	[ecx], edx
mov	eax, [ebp+var_98]
mov	[ecx+4], eax
mov	edx, [ebp+var_94]
mov	[ecx+8], edx
mov	eax, [ebp+var_90]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_1B0]
push	ecx
call	sub_4D2C60
add	esp, 54h
mov	edx, [ebp+var_4F4]
add	edx, 10h
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_68]
mov	[edx+4], ecx
mov	eax, [ebp+var_64]
mov	[edx+8], eax
mov	ecx, [ebp+var_60]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_4E0]
mov	[ebp+var_468], edx
mov	eax, [ebp+var_468]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_4F0], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_4EC], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_4E8], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_4E4], eax
xor	ecx, ecx
mov	[ebp+var_471], cl
mov	dl, [ebp+var_471]
mov	[ebp+var_469], dl
lea	eax, [ebp+var_469]
push	eax
sub	esp, 10h
mov	[ebp+var_478], esp
mov	ecx, [ebp+var_478]
mov	edx, [ebp+var_4E0]
mov	[ecx], edx
mov	eax, [ebp+var_4DC]
mov	[ecx+4], eax
mov	edx, [ebp+var_4D8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4D4]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_4F0]
mov	[ecx], edx
mov	eax, [ebp+var_4EC]
mov	[ecx+4], eax
mov	edx, [ebp+var_4E8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4E4]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_1C4]
push	ecx
call	sub_4D4080
add	esp, 38h

loc_4D0DBA:
jmp	short loc_4D0DF1

loc_4D0DBC:
mov	edx, [ebp+var_60]
add	edx, 4
push	edx
mov	eax, [ebp+var_4F4]
mov	ecx, [eax+1Ch]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_4F4]
call	sub_4C3FE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D0DF8
retn

loc_4D0DF1:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D0DF8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	38h
sub_4D0160 endp

align 10h


; Attributes: bp-based frame

sub_4D0E10 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D0E10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D2F30
add	esp, 14h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
jmp	short loc_4D0E62

loc_4D0E59:
mov	edx, [ebp+var_10]
add	edx, 20h
mov	[ebp+var_10], edx

loc_4D0E62:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+arg_8]
jnb	loc_4D0F21
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; float
lea	ecx, [ebp+arg_10]
call	sub_4A39C0
movzx	eax, al
test	eax, eax
jz	loc_4D0F1C
push	0
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
sub	esp, 20h
mov	eax, esp
mov	[ebp+var_14], esp
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_38]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_10]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_38]
add	ecx, 18h
call	sub_4C70F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_38]
mov	[ebp+var_60], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_4D2F70
add	esp, 3Ch

loc_4D0F1C:
jmp	loc_4D0E59

loc_4D0F21:
mov	ecx, [ebp+arg_10]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_18]
mov	[ebp+var_54], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_50], ecx

loc_4D0F39:
mov	edx, [ebp+var_50]
sub	edx, [ebp+arg_0]
sar	edx, 5
cmp	edx, 1
jle	short loc_4D0F7E
mov	eax, [ebp+var_50]
mov	[ebp+var_64], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_5C]
mov	[ecx], edx
mov	eax, [ebp+var_58]
mov	[ecx+4], eax
mov	edx, [ebp+var_54]
mov	[ecx+8], edx
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4D4420
add	esp, 14h
mov	edx, [ebp+var_50]
sub	edx, 20h
mov	[ebp+var_50], edx
jmp	short loc_4D0F39

loc_4D0F7E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D0E10 endp

align 10h


; Attributes: bp-based frame

sub_4D0F90 proc	near

var_8= byte ptr	-8
var_7= word ptr	-7
var_5= byte ptr	-5
var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	byte ptr [ebp+var_7+1],	dl
mov	al, byte ptr [ebp+var_7+1]
mov	byte ptr [ebp+var_4+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_7], cl
mov	dl, byte ptr [ebp+var_7]
mov	[ebp+var_1], dl
xor	eax, eax
mov	[ebp+var_8], al
mov	cl, [ebp+var_8]
mov	byte ptr [ebp+var_4], cl
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D4460
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_4D0F90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D0FE0(int, int, float, int, int, int, int, int, char, int, int, int,	int)
sub_4D0FE0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	byte ptr  28h
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D0FE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
lea	ecx, [ebp+arg_8]
push	ecx		; float
lea	ecx, [ebp+arg_28]
call	sub_4A39C0
movzx	edx, al
test	edx, edx
jz	short loc_4D104D
xor	eax, eax
mov	[ebp+var_12], al
mov	cl, [ebp+var_12]
mov	[ebp+var_11], cl
lea	edx, [ebp+var_11]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 20h
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4D4520
add	esp, 10h
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4C6ED0
jmp	short loc_4D10C5

loc_4D104D:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_28]
mov	[ecx], edx
mov	eax, [ebp+arg_2C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_30]
mov	[ecx+8], edx
sub	esp, 20h
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
mov	eax, [ebp+arg_14]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_18]
mov	[ecx+10h], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+14h], eax
lea	ecx, [ebp+arg_20]
push	ecx
mov	ecx, [ebp+var_60]
add	ecx, 18h
call	sub_4C70F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_60]
mov	[ebp+var_68], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+arg_4]
push	eax		; int
mov	byte ptr [ebp+var_4], 0
call	sub_4D3070
add	esp, 30h

loc_4D10C5:
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_20]
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	ecx, [ebp+var_64]
call	sub_5D2630
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D0FE0 endp

align 10h


; Attributes: bp-based frame

sub_4D1110 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
jmp	short loc_4D113C

loc_4D1133:
mov	ecx, [ebp+var_10]
add	ecx, 20h
mov	[ebp+var_10], ecx

loc_4D113C:
mov	edx, [ebp+var_10]
cmp	edx, [ebp+arg_4]
jz	loc_4D11D9
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
sub	esp, 20h
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_80], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_80]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_10]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_80]
add	ecx, 18h
call	sub_4C70F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_80]
mov	[ebp+var_84], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_10]
push	eax		; int
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_4D3070
add	esp, 30h
jmp	loc_4D1133

loc_4D11D9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D1110 endp

align 10h


; Attributes: bp-based frame

sub_4D11F0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D11F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D1229:
cmp	[ebp+var_14], 0
jz	loc_4D12F8
lea	ecx, [ebp+var_41]
call	sub_401EF0
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	[ebp+var_90], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_407810
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_49]
mov	[ebp+var_94], eax
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_14]
call	sub_404540
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	[ebp+var_48], ecx
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_48]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_15], cl
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_40]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	edx, [ebp+var_15]
test	edx, edx
jz	short loc_4D12E6
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_14]
call	sub_4044C0
mov	ecx, [eax]
mov	[ebp+var_14], ecx
jmp	short loc_4D12F3

loc_4D12E6:
mov	eax, [ebp+var_14]
call	sub_403040
mov	edx, [eax]
mov	[ebp+var_14], edx

loc_4D12F3:
jmp	loc_4D1229

loc_4D12F8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D11F0 endp

align 10h


; Attributes: bp-based frame

sub_4D1310 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_4B8760
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_4D13AB

loc_4D136D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_4D138E
mov	edx, [ebp+var_3C]
imul	edx, 64h
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4D138E:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D13AB
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D13AB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D1310 endp

align 10h


; Attributes: bp-based frame

sub_4D13C0 proc	near

var_21=	byte ptr -21h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D13C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4D1414

loc_4D1402:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 64h
mov	[ebp+var_14], eax

loc_4D1414:
cmp	[ebp+var_18], 0
jle	short loc_4D142C
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_4D3130
add	esp, 8
jmp	short loc_4D1402

loc_4D142C:
jmp	short loc_4D1449

loc_4D142E:
xor	eax, eax
mov	[ebp+var_21], al
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D1450
retn

loc_4D1449:
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D1450:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D13C0 endp

align 10h


; Attributes: bp-based frame

sub_4D1470 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1470
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_4D14B6

loc_4D14AD:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4D14B6:
cmp	[ebp+var_18], 0
jle	short loc_4D14E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_5EB830
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax
jmp	short loc_4D14AD

loc_4D14E0:
mov	eax, [ebp+var_14]
jmp	short loc_4D1514

loc_4D14E5:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_4C6BD0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D1514
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D1514:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D1470 endp

align 10h


; Attributes: bp-based frame

sub_4D1530 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D155D:
cmp	[ebp+var_14], 0
jz	loc_4D160A
lea	ecx, [ebp+var_31]
call	sub_401EF0
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	[ebp+var_58], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_58]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_30]
call	sub_407D30
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_39]
mov	[ebp+var_5C], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_38], edx
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_30]
mov	ecx, [ebp+var_38]
call	sub_404510
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_15], al
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_30]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_31]
call	nullsub_1
movzx	ecx, [ebp+var_15]
test	ecx, ecx
jz	short loc_4D15FC
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4D1605

loc_4D15FC:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4D1605:
jmp	loc_4D155D

loc_4D160A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D1530 endp

align 10h


; Attributes: bp-based frame

sub_4D1620 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D164D:
cmp	[ebp+var_14], 0
jz	loc_4D16FC
lea	eax, [ebp+var_19]
mov	[ebp+var_3C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_20]
cmp	eax, [ebp+var_24]
jl	short loc_4D16CE
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_2C]
jnz	short loc_4D16C5
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_30]
cmp	ecx, [ebp+var_34]
jb	short loc_4D16CE

loc_4D16C5:
mov	[ebp+var_40], 0
jmp	short loc_4D16D5

loc_4D16CE:
mov	[ebp+var_40], 1

loc_4D16D5:
movzx	edx, byte ptr [ebp+var_40]
test	edx, edx
jnz	short loc_4D16EE
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
mov	[ebp+var_14], edx
jmp	short loc_4D16F7

loc_4D16EE:
mov	eax, [ebp+var_14]
mov	ecx, [eax+0Ch]
mov	[ebp+var_14], ecx

loc_4D16F7:
jmp	loc_4D164D

loc_4D16FC:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D1620 endp

align 10h


; Attributes: bp-based frame

sub_4D1710 proc	near

var_25=	byte ptr -25h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1710
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_18], ecx
jmp	short loc_4D1756

loc_4D174D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4D1756:
cmp	[ebp+var_18], 0
jle	short loc_4D1780
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4B7100
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_14], eax
jmp	short loc_4D174D

loc_4D1780:
mov	eax, [ebp+var_14]
jmp	short loc_4D17A7

loc_4D1785:
xor	ecx, ecx
mov	[ebp+var_25], cl
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D17A7
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D17A7:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D1710 endp

align 10h


; Attributes: bp-based frame

sub_4D17C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D17ED:
cmp	[ebp+var_14], 0
jz	short loc_4D184A
lea	eax, [ebp+var_19]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_1011870
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4D183F
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4D1848

loc_4D183F:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4D1848:
jmp	short loc_4D17ED

loc_4D184A:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D17C0 endp

align 10h


; Attributes: bp-based frame

sub_4D1860 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1860
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D188D:
cmp	[ebp+var_14], 0
jz	short loc_4D18E5
lea	eax, [ebp+var_19]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_18]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_4D18DA
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
mov	[ebp+var_14], edx
jmp	short loc_4D18E3

loc_4D18DA:
mov	eax, [ebp+var_14]
mov	ecx, [eax+0Ch]
mov	[ebp+var_14], ecx

loc_4D18E3:
jmp	short loc_4D188D

loc_4D18E5:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D1860 endp

align 10h


; Attributes: bp-based frame

sub_4D1900 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4D194B

loc_4D1942:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4D194B:
cmp	[ebp+var_18], 0
jle	short loc_4D1975
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_4B7190
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 34h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 34h
mov	[ebp+var_14], eax
jmp	short loc_4D1942

loc_4D1975:
mov	eax, [ebp+var_14]
jmp	short loc_4D19A9

loc_4D197A:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_4CD970
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D19A9
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D19A9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D1900 endp

align 10h


; Attributes: bp-based frame

sub_4D19C0 proc	near

var_1C=	word ptr -1Ch
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D19C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0ECh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_4D1A0E

loc_4D1A05:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_4D1A0E:
cmp	[ebp+var_18], 0
jle	short loc_4D1A52
xor	eax, eax
mov	byte ptr [ebp+var_1C+1], al
mov	cl, byte ptr [ebp+var_1C+1]
mov	[ebp+var_19], cl
xor	edx, edx
mov	byte ptr [ebp+var_1C], dl
mov	al, byte ptr [ebp+var_1C]
mov	[ebp+var_1A], al
lea	ecx, [ebp+var_1A]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_4C66D0
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_14]
add	edx, 1Ch
mov	[ebp+var_14], edx
jmp	short loc_4D1A05

loc_4D1A52:
mov	eax, [ebp+var_14]
jmp	short loc_4D1A86

loc_4D1A57:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_4CDA90
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D1A86
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D1A86:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D19C0 endp

align 10h


; Attributes: bp-based frame

sub_4D1AA0 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_4D1AB8:
cmp	[ebp+var_8], 0
jz	short loc_4D1B04
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
lea	eax, [ebp+var_10]
call	sub_4078F0
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_4D1AF9
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_4D1B02

loc_4D1AF9:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_4D1B02:
jmp	short loc_4D1AB8

loc_4D1B04:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D1AA0 endp

align 10h


; Attributes: bp-based frame

sub_4D1B10 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D1B10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_4D1B3D:
cmp	[ebp+var_14], 0
jz	short loc_4D1B9E
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_1D]
mov	[ebp+var_28], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
cmp	edx, [ebp+var_18]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4D1B93
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_4D1B9C

loc_4D1B93:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_4D1B9C:
jmp	short loc_4D1B3D

loc_4D1B9E:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D1B10 endp

align 10h


; Attributes: bp-based frame

sub_4D1BC0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_4D1BD7:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_4D1C36
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4-4]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	ecx, [edx+ecx*4]
mov	edx, [ecx+170h]
cmp	[eax+170h], edx
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4D1C12
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_4D1C12:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	edx, [esi+edx*4]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_4D1BD7

loc_4D1C36:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_4D1C5A
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	eax, [esi+eax*4-4]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_4D1C5A:
mov	dl, [ebp+arg_10]
mov	[ebp+var_11], dl
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_4D1C74:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_4]
jle	short loc_4D1CC7
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx*4]
mov	edx, [ebp+arg_C]
mov	eax, [ecx+170h]
cmp	[edx+170h], eax
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_4D1CC7
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	esi, [ebp+arg_0]
mov	edx, [esi+edx*4]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_4D1C74

loc_4D1CC7:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+ecx*4], eax
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4D1BC0 endp

align 10h


; Attributes: bp-based frame

sub_4D1CE0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
jmp	short loc_4D1CF3

loc_4D1CEB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_4D1CF3:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4D1D6F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_24]
call	sub_4AC120
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_14]
mov	[edx+4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	loc_4D1CEB

loc_4D1D6F:
mov	esp, ebp
pop	ebp
retn	10h
sub_4D1CE0 endp

align 10h


; Attributes: bp-based frame

sub_4D1D80 proc	near

var_84=	dword ptr -84h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_84]
call	sub_4D3240
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D1D80 endp

align 10h


; Attributes: bp-based frame

sub_4D1DE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4CDF50
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_4D1DE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D1E20(void *, int)
sub_4D1E20 proc	near

var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D1E80
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4D3910
mov	[ebp+var_2C], eax
jmp	short loc_4D1E87

loc_4D1E80:
mov	[ebp+var_2C], 0

loc_4D1E87:
mov	eax, [ebp+var_2C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D1E20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D1EB0(void *, int)
sub_4D1EB0 proc	near

var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D1F10
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4D39B0
mov	[ebp+var_28], eax
jmp	short loc_4D1F17

loc_4D1F10:
mov	[ebp+var_28], 0

loc_4D1F17:
mov	eax, [ebp+var_28]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D1EB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D1F40(void *, int)
sub_4D1F40 proc	near

var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D1FA0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4D3A50
mov	[ebp+var_28], eax
jmp	short loc_4D1FA7

loc_4D1FA0:
mov	[ebp+var_28], 0

loc_4D1FA7:
mov	eax, [ebp+var_28]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D1F40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D1FD0(void *, int)
sub_4D1FD0 proc	near

var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D2030
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_4D3AF0
mov	[ebp+var_28], eax
jmp	short loc_4D2037

loc_4D2030:
mov	[ebp+var_28], 0

loc_4D2037:
mov	eax, [ebp+var_28]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D1FD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D2060(void *, int)
sub_4D2060 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2060
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D20E0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_10148B0
mov	byte ptr [ebp+var_4], 1
mov	esi, [ebp+arg_4]
add	esi, 4
mov	edi, [ebp+var_18]
add	edi, 4
mov	ecx, 7
rep movsd
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
jmp	short loc_4D20E7

loc_4D20E0:
mov	[ebp+var_1C], 0

loc_4D20E7:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4D2060 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D2110(void *, int)
sub_4D2110 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D218D
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	ecx, [ecx+1Ch]
mov	[eax+1Ch], ecx
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
jmp	short loc_4D2194

loc_4D218D:
mov	[ebp+var_1C], 0

loc_4D2194:
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D2110 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D21B0(void *, int)
sub_4D21B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D2223
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_18]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
jmp	short loc_4D222A

loc_4D2223:
mov	[ebp+var_1C], 0

loc_4D222A:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D21B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D2250(void *, int)
sub_4D2250 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2250
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	24h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D22DB
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_18]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
add	eax, 8
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4B91F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx
jmp	short loc_4D22E2

loc_4D22DB:
mov	[ebp+var_30], 0

loc_4D22E2:
mov	eax, [ebp+var_30]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D2250 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D2300(void *, int)
sub_4D2300 proc	near

var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2300
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D2381
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4B8FF0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_18]
mov	[ebp+var_3C], edx
jmp	short loc_4D2388

loc_4D2381:
mov	[ebp+var_3C], 0

loc_4D2388:
mov	eax, [ebp+var_3C]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D2300 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D23B0(void *, int)
sub_4D23B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D23B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D2429
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_18]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_18]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_18]
mov	[ebp+var_1C], ecx
jmp	short loc_4D2430

loc_4D2429:
mov	[ebp+var_1C], 0

loc_4D2430:
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D23B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D2450(void *, int)
sub_4D2450 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_4D24D9
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_18]
add	edx, 4
mov	[ebp+var_44], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_4ABA70
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_48], ecx
jmp	short loc_4D24E0

loc_4D24D9:
mov	[ebp+var_48], 0

loc_4D24E0:
mov	edx, [ebp+var_48]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D2450 endp

align 10h


; Attributes: bp-based frame

sub_4D2500 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_404580
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_28]
call	sub_404590
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_4D252C
mov	ecx, [ebp+var_28]
call	sub_404B50

loc_4D252C:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_28]
call	sub_404590
cmp	[ebp+var_4], eax
ja	short loc_4D2559
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_4D2564

loc_4D2559:
mov	ecx, [ebp+var_28]
call	sub_404590
mov	[ebp+var_4], eax

loc_4D2564:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D2500 endp

align 10h


; Attributes: bp-based frame

sub_4D2570 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2570
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
add	edx, 18h
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_2C]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_2C]
mov	dl, [ecx+1]
mov	[eax+1], dl
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_2C]
mov	dl, [ecx+2]
mov	[eax+2], dl
mov	eax, [ebp+var_2C]
add	eax, 4
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 4
call	sub_4B8CB0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D2570 endp

align 10h


; Attributes: bp-based frame

sub_4D2610 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2610
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
add	edx, 18h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_24]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_28]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_24]
add	ecx, 18h
call	sub_4A49A0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D2610 endp

align 10h


; Attributes: bp-based frame

sub_4D26A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 2
jge	short loc_4D26BE
jmp	loc_4D274A

loc_4D26BE:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_4D26DD:
mov	edx, [ebp+var_8]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [edx+4]
mov	[ebp+var_10], ecx
mov	edx, [edx+8]
mov	[ebp+var_C], edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D3B90
add	esp, 24h
cmp	[ebp+var_8], 0
jnz	short loc_4D273F
jmp	short loc_4D274A

loc_4D273F:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_4D26DD

loc_4D274A:
mov	esp, ebp
pop	ebp
retn
sub_4D26A0 endp

align 10h


; Attributes: bp-based frame

sub_4D2750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Ch
mov	[ebp+var_4], ecx

loc_4D2763:
mov	edx, [ebp+var_4]
push	edx
lea	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+arg_10]
call	sub_1012350
movzx	ecx, al
test	ecx, ecx
jz	short loc_4D27A1
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Ch
mov	[ebp+var_4], ecx
jmp	short loc_4D2763

loc_4D27A1:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn
sub_4D2750 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D27C0(void *, int)
sub_4D27C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4D281D
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [edx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_4D2824

loc_4D281D:
mov	[ebp+var_C], 0

loc_4D2824:
mov	esp, ebp
pop	ebp
retn
sub_4D27C0 endp

align 10h


; Attributes: bp-based frame

sub_4D2830 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4CE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_4B9960
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_64], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_64]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
lea	ecx, [ebp+var_10]
call	sub_4D3D90
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_10]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_5C]
call	sub_4D37E0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
push	0
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_10]
call	sub_506A50
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4D2830 endp

align 10h


; Attributes: bp-based frame

sub_4D28E0 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 68h
xor	eax, eax
mov	[ebp+var_9], al
mov	cl, [ebp+var_9]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
mov	edx, [ebp+arg_18]
mov	[eax+4], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_20]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D4080
add	esp, 38h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4D28E0 endp



; Attributes: bp-based frame

sub_4D2960 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= byte ptr -10Ch
var_FC=	byte ptr -0FCh
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch
arg_38=	dword ptr  40h
arg_3C=	dword ptr  44h
arg_40=	dword ptr  48h
arg_44=	dword ptr  4Ch
arg_48=	dword ptr  50h
arg_4C=	dword ptr  54h
arg_50=	dword ptr  58h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 13Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_44]
mov	[ecx], edx
mov	eax, [ebp+arg_48]
mov	[ecx+4], eax
mov	edx, [ebp+arg_4C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_50]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_28], esp
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_2C], esp
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_20]
push	eax
call	sub_4CAF20
add	esp, 34h
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_C0]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_84]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_8D], dl
mov	al, [ebp+var_8D]
mov	[ebp+var_85], al
lea	ecx, [ebp+var_B0]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[edx+4], ecx
mov	eax, [ebp+var_B8]
mov	[edx+8], eax
mov	ecx, [ebp+var_B4]
mov	[edx+0Ch], ecx
push	0
lea	edx, [ebp+var_95]
push	edx
sub	esp, 10h
mov	[ebp+var_A0], esp
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_B0]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[eax+4], edx
mov	ecx, [ebp+var_A8]
mov	[eax+8], ecx
mov	edx, [ebp+var_A4]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_34]
mov	[eax], ecx
mov	edx, [ebp+arg_38]
mov	[eax+4], edx
mov	ecx, [ebp+arg_3C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_40]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D3E60
add	esp, 3Ch
mov	eax, [ebp+arg_0]
jmp	loc_4D2C4B

loc_4D2B00:
lea	ecx, [ebp+var_13C]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_C4]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_14C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+arg_44]
mov	[eax], ecx
mov	edx, [ebp+arg_48]
mov	[eax+4], edx
mov	ecx, [ebp+arg_4C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_50]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_11C]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_13C]
mov	[ecx], edx
mov	eax, [ebp+var_138]
mov	[ecx+4], eax
mov	edx, [ebp+var_134]
mov	[ecx+8], edx
mov	eax, [ebp+var_130]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_12C]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_14C]
mov	[edx], eax
mov	ecx, [ebp+var_148]
mov	[edx+4], ecx
mov	eax, [ebp+var_144]
mov	[edx+8], eax
mov	ecx, [ebp+var_140]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_D9], dl
lea	eax, [ebp+var_FC]
mov	[ebp+var_E8], eax
mov	ecx, [ebp+var_E8]
mov	edx, [ebp+var_11C]
mov	[ecx], edx
mov	eax, [ebp+var_118]
mov	[ecx+4], eax
mov	edx, [ebp+var_114]
mov	[ecx+8], edx
mov	eax, [ebp+var_110]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_10C]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_EC]
mov	eax, [ebp+var_12C]
mov	[edx], eax
mov	ecx, [ebp+var_128]
mov	[edx+4], ecx
mov	eax, [ebp+var_124]
mov	[edx+8], eax
mov	ecx, [ebp+var_120]
mov	[edx+0Ch], ecx
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D2C4B
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D2C4B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D2960 endp

align 10h


; Attributes: bp-based frame

sub_4D2C60 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= byte ptr -10Ch
var_FC=	byte ptr -0FCh
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_45=	byte ptr -45h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch
arg_38=	dword ptr  40h
arg_3C=	dword ptr  44h
arg_40=	dword ptr  48h
arg_44=	dword ptr  4Ch
arg_48=	dword ptr  50h
arg_4C=	dword ptr  54h
arg_50=	dword ptr  58h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2C60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 13Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
lea	eax, [ebp+var_78]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_44]
mov	[ecx], edx
mov	eax, [ebp+arg_48]
mov	[ecx+4], eax
mov	edx, [ebp+arg_4C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_50]
mov	[ecx+0Ch], eax
xor	ecx, ecx
mov	[ebp+var_45], cl
mov	dl, [ebp+var_45]
mov	[ebp+var_3D], dl
lea	eax, [ebp+var_68]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_78]
mov	[ecx], edx
mov	eax, [ebp+var_74]
mov	[ecx+4], eax
mov	edx, [ebp+var_70]
mov	[ecx+8], edx
mov	eax, [ebp+var_6C]
mov	[ecx+0Ch], eax
push	0
lea	ecx, [ebp+var_4D]
push	ecx
sub	esp, 10h
mov	[ebp+var_58], esp
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	[edx+4], ecx
mov	eax, [ebp+var_60]
mov	[edx+8], eax
mov	ecx, [ebp+var_5C]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_20]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_20]
push	edx
call	sub_4D3E60
add	esp, 3Ch
mov	[ebp+var_4], 0
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_28], esp
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	[ebp+var_2C], esp
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	eax, [ebp+arg_34]
mov	[edx], eax
mov	ecx, [ebp+arg_38]
mov	[edx+4], ecx
mov	eax, [ebp+arg_3C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_40]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_30], esp
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4CAF20
add	esp, 34h
mov	eax, [ebp+arg_0]
jmp	loc_4D2F15

loc_4D2DCA:
lea	ecx, [ebp+var_13C]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_C4]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_14C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+arg_44]
mov	[eax], ecx
mov	edx, [ebp+arg_48]
mov	[eax+4], edx
mov	ecx, [ebp+arg_4C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_50]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_11C]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_13C]
mov	[ecx], edx
mov	eax, [ebp+var_138]
mov	[ecx+4], eax
mov	edx, [ebp+var_134]
mov	[ecx+8], edx
mov	eax, [ebp+var_130]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_12C]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_14C]
mov	[edx], eax
mov	ecx, [ebp+var_148]
mov	[edx+4], ecx
mov	eax, [ebp+var_144]
mov	[edx+8], eax
mov	ecx, [ebp+var_140]
mov	[edx+0Ch], ecx
xor	edx, edx
mov	[ebp+var_D9], dl
lea	eax, [ebp+var_FC]
mov	[ebp+var_E8], eax
mov	ecx, [ebp+var_E8]
mov	edx, [ebp+var_11C]
mov	[ecx], edx
mov	eax, [ebp+var_118]
mov	[ecx+4], eax
mov	edx, [ebp+var_114]
mov	[ecx+8], edx
mov	eax, [ebp+var_110]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_10C]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_EC]
mov	eax, [ebp+var_12C]
mov	[edx], eax
mov	ecx, [ebp+var_128]
mov	[edx+4], ecx
mov	eax, [ebp+var_124]
mov	[edx+8], eax
mov	ecx, [ebp+var_120]
mov	[edx+0Ch], ecx
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D2F15
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D2F15:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D2C60 endp

align 10h


; Attributes: bp-based frame

sub_4D2F30 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 7Ch
push	0
push	0
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D4160
add	esp, 1Ch
mov	esp, ebp
pop	ebp
retn
sub_4D2F30 endp

align 10h


; Attributes: bp-based frame

sub_4D2F70 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	byte ptr  2Ch
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D2F70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_4C6ED0
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_2C]
mov	[ecx], edx
mov	eax, [ebp+arg_30]
mov	[ecx+4], eax
mov	edx, [ebp+arg_34]
mov	[ecx+8], edx
sub	esp, 20h
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_10]
mov	[ecx+4], eax
mov	edx, [ebp+arg_14]
mov	[ecx+8], edx
mov	eax, [ebp+arg_18]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+10h], edx
mov	eax, [ebp+arg_20]
mov	[ecx+14h], eax
lea	ecx, [ebp+arg_24]
push	ecx
mov	ecx, [ebp+var_5C]
add	ecx, 18h
call	sub_4C70F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_5C]
mov	[ebp+var_64], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 5
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
mov	byte ptr [ebp+var_4], 0
call	sub_4D4290
add	esp, 38h
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+arg_24]
mov	[ebp+var_60], edx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	ecx, [ebp+var_60]
call	sub_5D2630
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D2F70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D3070(int, float, int, int, int, int, int, char, int, char)
sub_4D3070 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_1C=	byte ptr  24h
arg_24=	byte ptr  2Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 20h
mov	[ebp+var_10], ecx

loc_4D30A1:
mov	edx, [ebp+var_10]
push	edx		; int
lea	eax, [ebp+arg_4]
push	eax		; float
lea	ecx, [ebp+arg_24]
call	sub_4A39C0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4D30D5
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_4C6ED0
mov	eax, [ebp+var_10]
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_10]
sub	ecx, 20h
mov	[ebp+var_10], ecx
jmp	short loc_4D30A1

loc_4D30D5:
lea	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_4C6ED0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+arg_1C]
mov	[ebp+var_24], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_24]
call	sub_5D2630
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D3070 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D3130(void *, int)
sub_4D3130 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	64h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4D317A
mov	esi, [ebp+arg_4]
mov	ecx, 19h
mov	edi, [ebp+var_8]
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4D3181

loc_4D317A:
mov	[ebp+var_C], 0

loc_4D3181:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4D3130 endp

align 10h


; Attributes: bp-based frame

sub_4D3190 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_38=	dword ptr -38h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4AC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_15]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_4AC4F0
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
mov	[ebp+var_84], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_84]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
lea	ecx, [ebp+var_14]
call	sub_4D4590
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_14]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_4D35A0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
lea	ecx, [ebp+var_14]
call	sub_5D2630
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4D3190 endp

align 10h


; Attributes: bp-based frame

sub_4D3240 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_4C=	dword ptr -4Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4CE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_84]
call	sub_4B9960
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_8C]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
lea	ecx, [ebp+var_10]
call	sub_4D4660
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_10]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_84]
call	sub_4D36E0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
push	0
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_10]
call	sub_506A50
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4D3240 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D3330(void *, int)
sub_4D3330 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3330
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4D33AD
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 18h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
jmp	short loc_4D33B4

loc_4D33AD:
mov	[ebp+var_20], 0

loc_4D33B4:
mov	edx, [ebp+var_20]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D3330 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D33D0(void *, int)
sub_4D33D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D33D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
push	esi
mov	eax, [ebp+arg_0]
push	eax		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4D345B
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 18h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ecx], eax
mov	eax, [ebp+var_1C]
add	eax, 4
mov	esi, [ebp+var_18]
add	esi, 4
call	sub_41E510
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
jmp	short loc_4D3462

loc_4D345B:
mov	[ebp+var_20], 0

loc_4D3462:
mov	edx, [ebp+var_20]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4D33D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D3480(void *, int)
sub_4D3480 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_481 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4D34EB
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_10148B0
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4A96B0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_3C], eax
jmp	short loc_4D34F2

loc_4D34EB:
mov	[ebp+var_3C], 0

loc_4D34F2:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D3480 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D3510(void *, int)
sub_4D3510 proc	near

var_80=	dword ptr -80h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3510
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_4D357B
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_4B9350
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	[ebp+var_80], eax
jmp	short loc_4D3582

loc_4D357B:
mov	[ebp+var_80], 0

loc_4D3582:
mov	ecx, [ebp+var_80]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D3510 endp

align 10h


; Attributes: bp-based frame

sub_4D35A0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_4D36C8
lea	ecx, [ebp+var_E]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_4AC4F0
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
mov	[ebp+var_94], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_F]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_4AC4F0
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_9C], ecx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_D], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_D]
test	edx, edx
jz	short loc_4D3671
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E410
add	esp, 0Ch
jmp	short loc_4D36C8

loc_4D3671:
push	ecx
mov	edx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_2C], edx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_2C]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
mov	eax, [ebp+var_34]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
call	sub_4D4710
mov	ecx, [ebp+arg_4]
call	sub_5D2630

loc_4D36C8:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4D35A0 endp

align 10h


; Attributes: bp-based frame

sub_4D36E0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_80], ecx
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_4B9960
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_F]
push	edx
mov	ecx, [ebp+var_80]
call	sub_4B9960
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_D], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	short loc_4D3771
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E910
add	esp, 8
jmp	short loc_4D37C9

loc_4D3771:
push	ecx
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	ecx, [ebp+var_80]
call	sub_4CE430
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_506A50

loc_4D37C9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4D36E0 endp

align 10h


; Attributes: bp-based frame

sub_4D37E0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_80], ecx
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax], 0
jz	loc_4D38F1
lea	ecx, [ebp+var_E]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_4B9960
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	[ebp+var_88], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_F]
push	eax
mov	ecx, [ebp+var_80]
call	sub_4B9960
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	[ebp+var_90], ecx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_D], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_D]
test	edx, edx
jz	short loc_4D3899
push	0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E480
add	esp, 8
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_80]
push	eax
call	sub_77E480
add	esp, 8
push	eax
call	sub_77E450
add	esp, 0Ch
jmp	short loc_4D38F1

loc_4D3899:
push	ecx
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	ecx, [ebp+var_80]
call	sub_4D4770
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_506A50

loc_4D38F1:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4D37E0 endp

align 10h


; Attributes: bp-based frame

sub_4D3910 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3910
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_20]
add	edx, 18h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
mov	[ecx], eax
mov	ecx, [ebp+var_14]
cmp	dword ptr [ecx], 0
jz	short loc_4D398E
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_4D398E:
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D3910 endp



; Attributes: bp-based frame

sub_4D39B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D39B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 18h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ecx], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_4D3A23
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA80

loc_4D3A23:
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D39B0 endp

align 10h


; Attributes: bp-based frame

sub_4D3A50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3A50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 18h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ecx], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_4D3AC3
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA80

loc_4D3AC3:
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D3A50 endp

align 10h


; Attributes: bp-based frame

sub_4D3AF0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3AF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 18h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ecx], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_4D3B63
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA80

loc_4D3B63:
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D3AF0 endp

align 10h


; Attributes: bp-based frame

sub_4D3B90 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_4D3BA6:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_4D3C11
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 0Ch
add	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+arg_18]
call	sub_1012350
movzx	eax, al
test	eax, eax
jz	short loc_4D3BDD
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx

loc_4D3BDD:
mov	edx, [ebp+var_8]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_4D3BA6

loc_4D3C11:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_4D3C47
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 0Ch
add	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_4D3C47:
mov	eax, [ebp+arg_18]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_1C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_20]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_4D3C7F:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_4]
jle	short loc_4D3CDC
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_C]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_28]
call	sub_1012350
movzx	ecx, al
test	ecx, ecx
jz	short loc_4D3CDC
mov	edx, [ebp+var_C]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_10]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_4D3C7F

loc_4D3CDC:
mov	ecx, [ebp+var_10]
imul	ecx, 0Ch
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn
sub_4D3B90 endp

align 10h


; Attributes: bp-based frame

sub_4D3D00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
sub	eax, 0Ch
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [eax+4]
mov	[ebp+var_8], edx
mov	eax, [eax+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
sub	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_10]
mov	[edx+8], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	[ecx+4], eax
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
sub	eax, 0Ch
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_4D3B90
add	esp, 24h
mov	esp, ebp
pop	ebp
retn
sub_4D3D00 endp

align 10h


; Attributes: bp-based frame

sub_4D3D90 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3D90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
xor	eax, eax
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
mov	[ebp+var_18], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 4
xor	edx, edx
mov	[ebp+var_19], dl
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_28], ecx

loc_4D3DF1:
mov	edx, [ebp+var_2C]
xor	eax, eax
cmp	edx, [ebp+arg_4]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4D3E3D
mov	edx, [ebp+var_2C]
add	edx, 8
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4B97B0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_28]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
jmp	short loc_4D3DF1

loc_4D3E3D:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D3D90 endp

align 10h


; Attributes: bp-based frame

sub_4D3E60 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	byte ptr -98h
var_88=	byte ptr -88h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_3C=	dword ptr -3Ch
var_38=	word ptr -38h
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D3E60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0C8h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_24]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_28]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_2C]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_30]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	[ebp+var_30], 80h
mov	ecx, [ebp+arg_C]
sub	ecx, [ebp+arg_4]
sar	ecx, 2
mov	edx, [ebp+arg_14]
sub	edx, [ebp+arg_18]
sar	edx, 2
mov	eax, [ebp+arg_20]
sub	eax, [ebp+arg_10]
sar	eax, 2
sub	eax, 1
imul	eax, 20h
add	eax, edx
add	eax, ecx
mov	[ebp+var_24], eax
jmp	short loc_4D3EDE

loc_4D3ED5:
mov	ecx, [ebp+var_24]
sub	ecx, 1
mov	[ebp+var_24], ecx

loc_4D3EDE:
cmp	[ebp+var_24], 0
jle	short loc_4D3F22
mov	edx, [ebp+arg_4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_3C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_38+1], cl
mov	dl, byte ptr [ebp+var_38+1]
mov	[ebp+var_35], dl
xor	eax, eax
mov	byte ptr [ebp+var_38], al
mov	cl, byte ptr [ebp+var_38]
mov	[ebp+var_36], cl
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
lea	ecx, [ebp+arg_4]
call	sub_4AB2D0
lea	ecx, [ebp+var_20]
call	sub_4AB2D0
jmp	short loc_4D3ED5

loc_4D3F22:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
jmp	loc_4D4068

loc_4D3F44:
lea	edx, [ebp+var_C8]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_D8]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_A8]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+var_C4]
mov	[edx+4], ecx
mov	eax, [ebp+var_C0]
mov	[edx+8], eax
mov	ecx, [ebp+var_BC]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_B8]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_D8]
mov	[eax], ecx
mov	edx, [ebp+var_D4]
mov	[eax+4], edx
mov	ecx, [ebp+var_D0]
mov	[eax+8], ecx
mov	edx, [ebp+var_CC]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_65], al
lea	ecx, [ebp+var_88]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_A8]
mov	[edx], eax
mov	ecx, [ebp+var_A4]
mov	[edx+4], ecx
mov	eax, [ebp+var_A0]
mov	[edx+8], eax
mov	ecx, [ebp+var_9C]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_98]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_B8]
mov	[eax], ecx
mov	edx, [ebp+var_B4]
mov	[eax+4], edx
mov	ecx, [ebp+var_B0]
mov	[eax+8], ecx
mov	edx, [ebp+var_AC]
mov	[eax+0Ch], edx
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_4D4068
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_4D4068:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_4D3E60 endp

align 10h


; Attributes: bp-based frame

sub_4D4080 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 58h
lea	eax, [ebp+var_38]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_58], ecx
mov	edx, [ebp+arg_18]
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_1C]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_20]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_48], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_44], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_40], ecx
mov	edx, [ebp+arg_10]
mov	[ebp+var_3C], edx
mov	[ebp+var_14], 80h
mov	eax, [ebp+var_40]
sub	eax, [ebp+var_48]
sar	eax, 2
mov	ecx, [ebp+var_58]
sub	ecx, [ebp+var_54]
sar	ecx, 2
mov	edx, [ebp+var_4C]
sub	edx, [ebp+var_3C]
sar	edx, 2
sub	edx, 1
imul	edx, 20h
add	edx, ecx
add	edx, eax
mov	[ebp+var_10], edx
jmp	short loc_4D4110

loc_4D4107:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax

loc_4D4110:
cmp	[ebp+var_10], 0
jle	short loc_4D4138
mov	ecx, [ebp+var_48]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx], ecx
lea	ecx, [ebp+var_48]
call	sub_4AB2D0
lea	ecx, [ebp+var_38]
call	sub_4AB2D0
jmp	short loc_4D4107

loc_4D4138:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_38]
mov	[edx], eax
mov	ecx, [ebp+var_34]
mov	[edx+4], ecx
mov	eax, [ebp+var_30]
mov	[edx+8], eax
mov	ecx, [ebp+var_2C]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4D4080 endp

align 10h


; Attributes: bp-based frame

sub_4D4160 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4160
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 80h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 5
cmp	eax, 2
jge	short loc_4D4191
jmp	loc_4D4276

loc_4D4191:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 5
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_14], eax

loc_4D41AB:
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
shl	ecx, 5
add	ecx, [ebp+arg_0]
mov	[ebp+var_88], ecx
sub	esp, 20h
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_84], edx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_84]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_88]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 18h
call	sub_4C70F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_84]
mov	[ebp+var_8C], edx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_4D4290
add	esp, 38h
cmp	[ebp+var_14], 0
jnz	short loc_4D4268
jmp	short loc_4D4276

loc_4D4268:
mov	eax, [ebp+var_14]
sub	eax, 1
mov	[ebp+var_14], eax
jmp	loc_4D41AB

loc_4D4276:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D4160 endp

align 10h


; Attributes: bp-based frame

sub_4D4290 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	byte ptr  2Ch
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 58h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_14], edx

loc_4D42C2:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_8]
jge	short loc_4D4323
mov	ecx, [ebp+var_14]
sub	ecx, 1
shl	ecx, 5
add	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_14]
shl	edx, 5
add	edx, [ebp+arg_0]
push	edx		; float
lea	ecx, [ebp+arg_2C]
call	sub_4A39C0
movzx	eax, al
test	eax, eax
jz	short loc_4D42F9
mov	ecx, [ebp+var_14]
sub	ecx, 1
mov	[ebp+var_14], ecx

loc_4D42F9:
mov	edx, [ebp+var_14]
shl	edx, 5
add	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+arg_4]
shl	ecx, 5
add	ecx, [ebp+arg_0]
call	sub_4C6ED0
mov	eax, [ebp+var_14]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_14]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_14], edx
jmp	short loc_4D42C2

loc_4D4323:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_8]
jnz	short loc_4D434F
mov	ecx, [ebp+var_14]
sub	ecx, 1
shl	ecx, 5
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+arg_4]
shl	ecx, 5
add	ecx, [ebp+arg_0]
call	sub_4C6ED0
mov	edx, [ebp+var_14]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_4D434F:
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_2C]
mov	[eax], ecx
mov	edx, [ebp+arg_30]
mov	[eax+4], edx
mov	ecx, [ebp+arg_34]
mov	[eax+8], ecx
sub	esp, 20h
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
mov	edx, [ebp+arg_18]
mov	[eax+0Ch], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+10h], ecx
mov	edx, [ebp+arg_20]
mov	[eax+14h], edx
lea	eax, [ebp+arg_24]
push	eax
mov	ecx, [ebp+var_48]
add	ecx, 18h
call	sub_4C70F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_48]
mov	[ebp+var_64], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	byte ptr [ebp+var_4], 0
call	sub_4D4850
add	esp, 38h
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+arg_24]
mov	[ebp+var_60], edx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	ecx, [ebp+var_60]
call	sub_5D2630
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D4290 endp

align 10h


; Attributes: bp-based frame

sub_4D4420 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 80h
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4D4930
add	esp, 18h
mov	esp, ebp
pop	ebp
retn
sub_4D4420 endp

align 10h


; Attributes: bp-based frame

sub_4D4460 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4460
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
mov	edx, [eax+4]
mov	[ebp+var_28], edx
mov	ecx, [eax+8]
mov	[ebp+var_24], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_20], edx
mov	ecx, [eax+10h]
mov	[ebp+var_1C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
add	eax, 18h
push	eax
lea	ecx, [ebp+var_14]
call	sub_4C70F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_4C6ED0
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_4C6ED0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_14]
mov	[ebp+var_5C], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_5C]
call	sub_5D2630
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D4460 endp

align 10h


; Attributes: bp-based frame

sub_4D4520 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
sub	eax, [ebp+arg_0]
sar	eax, 5
mov	[ebp+var_C], eax
jmp	short loc_4D455F

loc_4D4556:
mov	ecx, [ebp+var_C]
sub	ecx, 1
mov	[ebp+var_C], ecx

loc_4D455F:
cmp	[ebp+var_C], 0
jle	short loc_4D4585
mov	edx, [ebp+var_18]
sub	edx, 20h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
sub	eax, 20h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_4C6ED0
jmp	short loc_4D4556

loc_4D4585:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_4D4520 endp

align 10h


; Attributes: bp-based frame

sub_4D4590 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_38=	dword ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4590
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 54h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_60]
mov	[eax], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_60]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_4], 4
lea	edx, [ebp+var_5C]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_2C]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_2D], dl
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_38], esp
mov	ecx, [ebp+var_5C]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	ecx, [ebp+var_60]
call	sub_4D1CE0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4590 endp

align 10h


; Attributes: bp-based frame

sub_4D4660 proc	near

var_74=	dword ptr -74h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4660
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_20], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_74]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 4
push	ecx
mov	edx, esp
mov	[ebp+var_10], esp
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_14], esp
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_4D4A10
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4660 endp

align 10h


; Attributes: bp-based frame

sub_4D4710 proc	near

var_84=	dword ptr -84h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_84]
call	sub_4D4AC0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4710 endp

align 10h


; Attributes: bp-based frame

sub_4D4770 proc	near

var_8C=	dword ptr -8Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_8C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_4D4BA0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4770 endp

align 10h


; Attributes: bp-based frame

sub_4D47C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_8], 80h
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_4]
sar	eax, 2
mov	ecx, [ebp+arg_14]
sub	ecx, [ebp+arg_18]
sar	ecx, 2
mov	edx, [ebp+arg_20]
sub	edx, [ebp+arg_10]
sar	edx, 2
sub	edx, 1
imul	edx, 20h
add	edx, ecx
add	edx, eax
mov	[ebp+var_4], edx
jmp	short loc_4D4800

loc_4D47F7:
mov	eax, [ebp+var_4]
sub	eax, 1
mov	[ebp+var_4], eax

loc_4D4800:
cmp	[ebp+var_4], 0
jle	short loc_4D4828
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_24]
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[edx], ecx
lea	ecx, [ebp+arg_4]
call	sub_4AB2D0
lea	ecx, [ebp+arg_24]
call	sub_4AB2D0
jmp	short loc_4D47F7

loc_4D4828:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_24]
mov	[edx], eax
mov	ecx, [ebp+arg_28]
mov	[edx+4], ecx
mov	eax, [ebp+arg_2C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_30]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4D47C0 endp

align 10h


; Attributes: bp-based frame

sub_4D4850 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_24=	byte ptr  2Ch
arg_2C=	byte ptr  34h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4850
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_10], eax

loc_4D4880:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_4D48D3
lea	ecx, [ebp+arg_C]
push	ecx		; int
mov	edx, [ebp+var_10]
shl	edx, 5
add	edx, [ebp+arg_0]
push	edx		; float
lea	ecx, [ebp+arg_2C]
call	sub_4A39C0
movzx	eax, al
test	eax, eax
jz	short loc_4D48D3
mov	ecx, [ebp+var_10]
shl	ecx, 5
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+arg_4]
shl	ecx, 5
add	ecx, [ebp+arg_0]
call	sub_4C6ED0
mov	edx, [ebp+var_10]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_10], eax
jmp	short loc_4D4880

loc_4D48D3:
lea	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 5
add	ecx, [ebp+arg_0]
call	sub_4C6ED0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_24]
mov	[ebp+var_24], ecx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_24]
call	sub_5D2630
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D4850 endp

align 10h


; Attributes: bp-based frame

sub_4D4930 proc	near

var_98=	dword ptr -98h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4930
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8Ch
push	0
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
sub	edx, 20h
mov	[ebp+var_58], edx
sub	esp, 20h
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_58]
mov	edx, [ebp+var_54]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_58]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 18h
call	sub_4C70F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_54]
mov	[ebp+var_98], eax
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_4]
sub	ecx, 20h
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, 20h
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_4D2F70
add	esp, 3Ch
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D4930 endp

align 10h


; Attributes: bp-based frame

sub_4D4A10 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_38]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
lea	edx, [ebp+var_3C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_40], eax

loc_4D4A4C:
lea	ecx, [ebp+var_2C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_3C]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
mov	[ebp+var_45], al
movzx	ecx, [ebp+var_45]
test	ecx, ecx
jz	short loc_4D4AB0
mov	edx, [ebp+var_3C]
add	edx, 8
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_44]
call	sub_4B97B0
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
jmp	short loc_4D4A4C

loc_4D4AB0:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4A10 endp

align 10h


; Attributes: bp-based frame

sub_4D4AC0 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_4C=	dword ptr -4Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4AC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_15]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_4AC4F0
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
mov	[ebp+var_84], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_84]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_2C]
call	sub_4046E0
lea	ecx, [ebp+var_14]
call	sub_4D4BF0
mov	[ebp+var_88], eax
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_14]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_24], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_4D35A0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
lea	ecx, [ebp+var_14]
call	sub_5D2630
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4D4AC0 endp

align 10h


; Attributes: bp-based frame

sub_4D4BA0 proc	near

var_7C=	dword ptr -7Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_7C]
call	sub_4D4CE0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4BA0 endp

align 10h


; Attributes: bp-based frame

sub_4D4BF0 proc	near

var_88=	dword ptr -88h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4BF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 7Ch
mov	[ebp+var_88], ecx
xor	eax, eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_28], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+var_28]
mov	[eax+4], edx
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_88]
mov	[eax], ecx
mov	edx, [ebp+var_88]
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_4], 4
push	ecx
mov	edx, esp
mov	[ebp+var_10], esp
mov	[ebp+var_30], edx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_14], esp
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_34]
call	sub_4046E0
push	ecx
mov	ecx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_88]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_88]
call	sub_4D4DD0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_88]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4BF0 endp

align 10h


; Attributes: bp-based frame

sub_4D4CE0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_4C=	dword ptr -4Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D4CE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_84]
call	sub_4B9960
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_8C]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
lea	ecx, [ebp+var_10]
call	sub_4D4660
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_10]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_84]
call	sub_4D37E0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
push	0
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_10]
call	sub_506A50
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4D4CE0 endp

align 10h


; Attributes: bp-based frame

sub_4D4DD0 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_4C]
call	sub_4D4E20
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D4DD0 endp

align 10h


; Attributes: bp-based frame

sub_4D4E20 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
jmp	short loc_4D4E33

loc_4D4E2B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_4D4E33:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4D4EC4
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4AC120
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_20]
mov	[eax+4], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
jmp	loc_4D4E2B

loc_4D4EC4:
mov	esp, ebp
pop	ebp
retn	10h
sub_4D4E20 endp

align 10h



sub_4D4ED0 proc	near
sub	ecx, 28h
jmp	sub_4A3BB0
sub_4D4ED0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D4EE0(float,	float)
sub_4D4EE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
fld	[ebp+arg_0]
fld	[ebp+arg_4]
call	sub_79A3DA
fstp	[ebp+var_4]
fld	[ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D4EE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D4F00(float)
sub_4D4F00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+4+var_4]
call	sub_414380
add	esp, 4
pop	ebp
retn
sub_4D4F00 endp

align 10h


; Attributes: bp-based frame

sub_4D4F20 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D4F20 endp

align 10h


; Attributes: bp-based frame

sub_4D4F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	eax, byte ptr [eax]
neg	eax
sbb	eax, eax
neg	eax
mov	esp, ebp
pop	ebp
retn
sub_4D4F40 endp

align 10h


; Attributes: bp-based frame

sub_4D4F60 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
movzx	eax, [ebp+arg_4]
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
cmp	edx, eax
setz	al
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1]
mov	[ecx], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4D4F60 endp

align 10h


; Attributes: bp-based frame

sub_4D4F90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sar	edx, 10h
mov	eax, [ebp+var_8]
mov	[eax], dx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4D4F90 endp

align 10h


; Attributes: bp-based frame

sub_4D4FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
movsx	ecx, word ptr [eax]
shl	ecx, 10h
mov	[ebp+var_4], ecx
fld	[ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D4FC0 endp

align 10h


; Attributes: bp-based frame

sub_4D4FE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D5004
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D5004:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D4FE0 endp

align 10h
; [00000008 BYTES: COLLAPSED FUNCTION operator new(uint,void *). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D5020 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
call	sub_AD5DD0
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4D5020 endp

align 10h



sub_4D5050 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D5050 endp

align 10h



sub_4D5090 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp-4], ecx
movss	xmm0, dword ptr	[ebx+8]
movaps	xmmword	ptr [ebp-20h], xmm0
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [eax], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D5090 endp

align 10h



sub_4D50D0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [eax]
movss	dword ptr [ebp-8], xmm0
fld	dword ptr [ebp-8]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D50D0 endp

align 10h



sub_4D5110 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebx+10h]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [ecx]
subss	xmm1, xmm0
movaps	xmmword	ptr [ebp-10h], xmm1
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [ebp-10h]
movaps	xmmword	ptr [edx], xmm0
mov	eax, [ebx+8]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D5110 endp

align 10h



sub_4D5160 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_14EE240
subss	xmm1, xmm0
movaps	xmmword	ptr [ebp-10h], xmm1
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ebp-10h]
movaps	xmmword	ptr [ecx], xmm0
mov	eax, [ebx+8]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D5160 endp

align 10h



sub_4D51B0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 0A0h
movaps	xmmword	ptr [ebp-10h], xmm0
rsqrtps	xmm0, xmmword ptr [ebp-10h]
movaps	xmmword	ptr [ebp-20h], xmm0
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [ebp-30h], xmm0
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, ds:xmmword_14EE2B0
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-40h], xmm1
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [ebp-50h], xmm0
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, xmmword ptr [ebp-10h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-60h], xmm1
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, xmmword ptr [ebp-60h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-70h], xmm1
movaps	xmm0, xmmword ptr [ebp-70h]
movaps	xmmword	ptr [ebp-80h], xmm0
movaps	xmm0, xmmword ptr [ebp-80h]
movaps	xmm1, ds:xmmword_14EE2A0
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-90h], xmm1
movaps	xmm0, xmmword ptr [ebp-90h]
movaps	xmm1, xmmword ptr [ebp-50h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-0A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0A0h]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D51B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D5260(float)
sub_4D5260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+4+var_4]
call	sub_40F5B0
add	esp, 4
pop	ebp
retn
sub_4D5260 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D5280(float)
sub_4D5280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	ecx
fld	[ebp+arg_0]
fstp	[esp+8+var_8]
call	sub_40F5B0
add	esp, 4
fld1
fdivrp	st(1), st
fstp	[ebp+var_4]
fld	[ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D5280 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D52B0(float)
sub_4D52B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	ecx
fld	[ebp+arg_0]
fstp	[esp+8+var_8]
call	sub_40F4C0
add	esp, 4
fld1
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_4D5303
fldz
fld	[ebp+arg_0]
fcomip	st, st(1)
fstp	st
jbe	short loc_4D52E7
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_4], xmm0
jmp	short loc_4D52F4

loc_4D52E7:
movss	xmm0, ds:dword_1541BC8
movss	[ebp+var_4], xmm0

loc_4D52F4:
movss	xmm0, [ebp+var_4]
movss	[ebp+arg_0], xmm0
fld	[ebp+arg_0]
jmp	short loc_4D5312

loc_4D5303:		; float
push	ecx
fld	[ebp+arg_0]
fstp	[esp+8+var_8]
call	sub_41DD30
add	esp, 4

loc_4D5312:
mov	esp, ebp
pop	ebp
retn
sub_4D52B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D5320(float)
sub_4D5320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
fld	[ebp+arg_0]
fldz
fcomip	st, st(1)
fstp	st
jbe	short loc_4D5338
mov	[ebp+var_4], 1
jmp	short loc_4D533F

loc_4D5338:
mov	[ebp+var_4], 0

loc_4D533F:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D5320 endp

align 10h


; Attributes: bp-based frame

sub_4D5350 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
movss	xmm0, [ebp+arg_4]
movss	[ebp+var_4], xmm0
mov	eax, [ebp+var_4]
and	eax, 7F800000h
cmp	eax, 7F800000h
setnz	cl
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_4D5350 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D5380(float,	float)
sub_4D5380 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx		; float
fld	[ebp+arg_4]
fstp	[esp+4+var_4]
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+8+var_8]
call	sub_AD3580
add	esp, 8
pop	ebp
retn
sub_4D5380 endp

align 10h



sub_4D53A0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebx+8]
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	eax, [ebx+8]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D53A0 endp

align 10h



sub_4D53E0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, [ebx+8]
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx+20h]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D53E0 endp




sub_4D5430 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
xor	eax, eax
shl	eax, 4
add	eax, [ebx+8]
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ecx], xmm0
mov	edx, 1
shl	edx, 4
add	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, 2
shl	ecx, 4
add	ecx, [ebx+8]
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [edx+20h], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D5430 endp



; Attributes: bp-based frame

sub_4D5490 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_1255B10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D5490 endp

align 10h



sub_4D54B0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp-4], ecx
movss	xmm0, dword ptr	[ebx+14h]
movss	xmm1, dword ptr	[ebx+10h]
movss	xmm2, dword ptr	[ebx+0Ch]
movss	xmm3, dword ptr	[ebx+8]
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-20h], xmm3
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [eax], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	10h
sub_4D54B0 endp

align 10h



sub_4D5510 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
movaps	xmm0, ds:xmmword_14EE290
movaps	xmmword	ptr [eax], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D5510 endp




sub_4D5540 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 2E0h
mov	[ebp-4], ecx
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-20h], xmm1
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [edx]
mov	eax, [ebx+8]
movaps	xmm1, xmmword ptr [eax]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-30h], xmm1
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmm1, xmmword ptr [ebp-30h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-40h], xmm1
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [ebp-50h], xmm0
mov	ecx, [ebx+0Ch]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-60h], xmm1
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-70h], xmm1
movaps	xmm0, xmmword ptr [ebp-60h]
movaps	xmm1, xmmword ptr [ebp-70h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-80h], xmm1
movaps	xmm0, xmmword ptr [ebp-80h]
movaps	xmmword	ptr [ebp-90h], xmm0
movaps	xmm0, xmmword ptr [ebp-90h]
movaps	xmm1, xmmword ptr [ebp-50h]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-0A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0A0h]
movaps	xmmword	ptr [ebp-0B0h],	xmm0
mov	dword ptr [ebp-0B4h], 3
cmp	dword ptr [ebp-0B4h], 0
jz	short loc_4D562D
cmp	dword ptr [ebp-0B4h], 1
jz	short loc_4D564B
cmp	dword ptr [ebp-0B4h], 2
jz	short loc_4D567E
jmp	loc_4D56B1

loc_4D562D:
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax
jmp	loc_4D56E2

loc_4D564B:
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebx+8]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-0F0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0F0h]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax
jmp	short loc_4D56E2

loc_4D567E:
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebx+8]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-100h],	xmm1
movaps	xmm0, xmmword ptr [ebp-100h]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax
jmp	short loc_4D56E2

loc_4D56B1:
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebx+8]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0FFh
movaps	xmmword	ptr [ebp-110h],	xmm1
movaps	xmm0, xmmword ptr [ebp-110h]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax

loc_4D56E2:
mov	ecx, [ebp-0D4h]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebp-0D4h]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-120h],	xmm1
movaps	xmm0, xmmword ptr [ebp-120h]
movaps	xmmword	ptr [ebp-130h],	xmm0
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, xmmword ptr [ebp-130h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-140h],	xmm1
movaps	xmm0, xmmword ptr [ebp-140h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
addps	xmm1, xmm0
movaps	xmmword	ptr [ebp-150h],	xmm1
movaps	xmm0, xmmword ptr [ebp-150h]
movaps	xmmword	ptr [ebp-0B0h],	xmm0
mov	dword ptr [ebp-154h], 3
cmp	dword ptr [ebp-154h], 0
jz	short loc_4D5774
cmp	dword ptr [ebp-154h], 1
jz	short loc_4D5792
cmp	dword ptr [ebp-154h], 2
jz	short loc_4D57C5
jmp	loc_4D57F8

loc_4D5774:
mov	ecx, [ebx+0Ch]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx
jmp	loc_4D5829

loc_4D5792:
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-190h],	xmm1
movaps	xmm0, xmmword ptr [ebp-190h]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx
jmp	short loc_4D5829

loc_4D57C5:
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-1A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1A0h]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx
jmp	short loc_4D5829

loc_4D57F8:
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0FFh
movaps	xmmword	ptr [ebp-1B0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1B0h]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx

loc_4D5829:
mov	eax, [ebp-174h]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-174h]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-1C0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1C0h]
movaps	xmmword	ptr [ebp-1D0h],	xmm0
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [edx]
movaps	xmm1, xmmword ptr [ebp-1D0h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-1E0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1E0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
addps	xmm1, xmm0
movaps	xmmword	ptr [ebp-1F0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1F0h]
movaps	xmmword	ptr [ebp-0B0h],	xmm0
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+8]
movaps	xmm1, xmmword ptr [ecx]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-200h],	xmm1
movaps	xmm0, xmmword ptr [ebp-200h]
movaps	xmmword	ptr [ebp-210h],	xmm0
movaps	xmm0, xmmword ptr [ebp-210h]
movaps	xmm1, xmmword ptr [ebp-210h]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-220h],	xmm1
movaps	xmm0, xmmword ptr [ebp-210h]
movaps	xmm1, xmmword ptr [ebp-220h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-230h],	xmm1
movaps	xmm0, xmmword ptr [ebp-230h]
movaps	xmmword	ptr [ebp-240h],	xmm0
movaps	xmm0, xmmword ptr [ebp-210h]
movaps	xmm1, xmmword ptr [ebp-210h]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-250h],	xmm1
movaps	xmm0, xmmword ptr [ebp-240h]
movaps	xmm1, xmmword ptr [ebp-250h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-260h],	xmm1
movaps	xmm0, xmmword ptr [ebp-260h]
movaps	xmmword	ptr [ebp-270h],	xmm0
movaps	xmm0, xmmword ptr [ebp-270h]
movaps	xmm1, xmmword ptr [ebp-270h]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-280h],	xmm1
movaps	xmm0, xmmword ptr [ebp-280h]
movaps	xmmword	ptr [ebp-290h],	xmm0
mov	edx, [ebx+0Ch]
movaps	xmm0, xmmword ptr [edx]
mov	eax, [ebx+8]
movaps	xmm1, xmmword ptr [eax]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-2A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-2A0h]
movaps	xmmword	ptr [ebp-2B0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-290h]
movaps	xmm1, xmmword ptr [ebp-2B0h]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-2C0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-2C0h]
movaps	xmmword	ptr [ebp-2B0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-2B0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
unpckhps xmm1, xmm0
movaps	xmmword	ptr [ebp-2D0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-2D0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
shufps	xmm1, xmm0, 0C4h
movaps	xmmword	ptr [ebp-2E0h],	xmm1
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-2E0h]
movaps	xmmword	ptr [ecx], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	8
sub_4D5540 endp

align 10h



sub_4D59F0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 2E0h
mov	[ebp-4], ecx
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-20h], xmm1
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [edx]
mov	eax, [ebp-4]
movaps	xmm1, xmmword ptr [eax]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-30h], xmm1
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmm1, xmmword ptr [ebp-30h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-40h], xmm1
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [ebp-50h], xmm0
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebx+8]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-60h], xmm1
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-4]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-70h], xmm1
movaps	xmm0, xmmword ptr [ebp-60h]
movaps	xmm1, xmmword ptr [ebp-70h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-80h], xmm1
movaps	xmm0, xmmword ptr [ebp-80h]
movaps	xmmword	ptr [ebp-90h], xmm0
movaps	xmm0, xmmword ptr [ebp-90h]
movaps	xmm1, xmmword ptr [ebp-50h]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-0A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0A0h]
movaps	xmmword	ptr [ebp-0B0h],	xmm0
mov	dword ptr [ebp-0B4h], 3
cmp	dword ptr [ebp-0B4h], 0
jz	short loc_4D5ADD
cmp	dword ptr [ebp-0B4h], 1
jz	short loc_4D5AFB
cmp	dword ptr [ebp-0B4h], 2
jz	short loc_4D5B2E
jmp	loc_4D5B61

loc_4D5ADD:
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax
jmp	loc_4D5B92

loc_4D5AFB:
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebp-4]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-0F0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0F0h]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax
jmp	short loc_4D5B92

loc_4D5B2E:
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebp-4]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-100h],	xmm1
movaps	xmm0, xmmword ptr [ebp-100h]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax
jmp	short loc_4D5B92

loc_4D5B61:
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebp-4]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0FFh
movaps	xmmword	ptr [ebp-110h],	xmm1
movaps	xmm0, xmmword ptr [ebp-110h]
movaps	xmmword	ptr [ebp-0D0h],	xmm0
lea	eax, [ebp-0D0h]
mov	[ebp-0D4h], eax

loc_4D5B92:
mov	ecx, [ebp-0D4h]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebp-0D4h]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-120h],	xmm1
movaps	xmm0, xmmword ptr [ebp-120h]
movaps	xmmword	ptr [ebp-130h],	xmm0
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, xmmword ptr [ebp-130h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-140h],	xmm1
movaps	xmm0, xmmword ptr [ebp-140h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
addps	xmm1, xmm0
movaps	xmmword	ptr [ebp-150h],	xmm1
movaps	xmm0, xmmword ptr [ebp-150h]
movaps	xmmword	ptr [ebp-0B0h],	xmm0
mov	dword ptr [ebp-154h], 3
cmp	dword ptr [ebp-154h], 0
jz	short loc_4D5C24
cmp	dword ptr [ebp-154h], 1
jz	short loc_4D5C42
cmp	dword ptr [ebp-154h], 2
jz	short loc_4D5C75
jmp	loc_4D5CA8

loc_4D5C24:
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx
jmp	loc_4D5CD9

loc_4D5C42:
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-190h],	xmm1
movaps	xmm0, xmmword ptr [ebp-190h]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx
jmp	short loc_4D5CD9

loc_4D5C75:
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-1A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1A0h]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx
jmp	short loc_4D5CD9

loc_4D5CA8:
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0FFh
movaps	xmmword	ptr [ebp-1B0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1B0h]
movaps	xmmword	ptr [ebp-170h],	xmm0
lea	edx, [ebp-170h]
mov	[ebp-174h], edx

loc_4D5CD9:
mov	eax, [ebp-174h]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-174h]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-1C0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1C0h]
movaps	xmmword	ptr [ebp-1D0h],	xmm0
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [edx]
movaps	xmm1, xmmword ptr [ebp-1D0h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-1E0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1E0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
addps	xmm1, xmm0
movaps	xmmword	ptr [ebp-1F0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1F0h]
movaps	xmmword	ptr [ebp-0B0h],	xmm0
mov	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-4]
movaps	xmm1, xmmword ptr [ecx]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-200h],	xmm1
movaps	xmm0, xmmword ptr [ebp-200h]
movaps	xmmword	ptr [ebp-210h],	xmm0
movaps	xmm0, xmmword ptr [ebp-210h]
movaps	xmm1, xmmword ptr [ebp-210h]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-220h],	xmm1
movaps	xmm0, xmmword ptr [ebp-210h]
movaps	xmm1, xmmword ptr [ebp-220h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-230h],	xmm1
movaps	xmm0, xmmword ptr [ebp-230h]
movaps	xmmword	ptr [ebp-240h],	xmm0
movaps	xmm0, xmmword ptr [ebp-210h]
movaps	xmm1, xmmword ptr [ebp-210h]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-250h],	xmm1
movaps	xmm0, xmmword ptr [ebp-240h]
movaps	xmm1, xmmword ptr [ebp-250h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-260h],	xmm1
movaps	xmm0, xmmword ptr [ebp-260h]
movaps	xmmword	ptr [ebp-270h],	xmm0
movaps	xmm0, xmmword ptr [ebp-270h]
movaps	xmm1, xmmword ptr [ebp-270h]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-280h],	xmm1
movaps	xmm0, xmmword ptr [ebp-280h]
movaps	xmmword	ptr [ebp-290h],	xmm0
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [edx]
mov	eax, [ebp-4]
movaps	xmm1, xmmword ptr [eax]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-2A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-2A0h]
movaps	xmmword	ptr [ebp-2B0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-290h]
movaps	xmm1, xmmword ptr [ebp-2B0h]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-2C0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-2C0h]
movaps	xmmword	ptr [ebp-2B0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-2B0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
unpckhps xmm1, xmm0
movaps	xmmword	ptr [ebp-2D0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-2D0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
shufps	xmm1, xmm0, 0C4h
movaps	xmmword	ptr [ebp-2E0h],	xmm1
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-2E0h]
movaps	xmmword	ptr [ecx], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D59F0 endp

align 10h


; Attributes: bp-based frame

sub_4D5EA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
lea	eax, [ecx+eax*4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D5EA0 endp

align 10h



sub_4D5EC0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 510h
mov	[ebp-4], ecx
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+8]
movaps	xmm1, xmmword ptr [ecx]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-20h], xmm1
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [ebp-30h], xmm0
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, xmmword ptr [ebp-30h]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-40h], xmm1
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, xmmword ptr [ebp-40h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-50h], xmm1
movaps	xmm0, xmmword ptr [ebp-50h]
movaps	xmmword	ptr [ebp-60h], xmm0
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, xmmword ptr [ebp-30h]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-70h], xmm1
movaps	xmm0, xmmword ptr [ebp-60h]
movaps	xmm1, xmmword ptr [ebp-70h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-80h], xmm1
movaps	xmm0, xmmword ptr [ebp-80h]
movaps	xmmword	ptr [ebp-90h], xmm0
movaps	xmm0, xmmword ptr [ebp-90h]
movaps	xmm1, xmmword ptr [ebp-90h]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-0A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0A0h]
movaps	xmmword	ptr [ebp-0B0h],	xmm0
movaps	xmm0, ds:xmmword_1513E50
movaps	xmmword	ptr [ebp-0C0h],	xmm0
movaps	xmm0, ds:xmmword_1513E60
movaps	xmmword	ptr [ebp-0D0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-0B0h]
movaps	xmm1, xmmword ptr [ebp-0C0h]
cmpltps	xmm1, xmm0
movaps	xmmword	ptr [ebp-0E0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0E0h]
movaps	xmmword	ptr [ebp-0F0h],	xmm0
mov	edx, [ebp-0F0h]
mov	[ebp-100h], edx
mov	eax, [ebp-0ECh]
mov	[ebp-0FCh], eax
mov	ecx, [ebp-0E8h]
mov	[ebp-0F8h], ecx
mov	edx, [ebp-0E4h]
mov	[ebp-0F4h], edx
movaps	xmm0, ds:xmmword_1573EB0
movaps	xmm1, xmmword ptr [ebp-0C0h]
xorps	xmm1, xmm0
movaps	xmmword	ptr [ebp-110h],	xmm1
movaps	xmm0, xmmword ptr [ebp-110h]
movaps	xmmword	ptr [ebp-0C0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-0C0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
cmpltps	xmm1, xmm0
movaps	xmmword	ptr [ebp-120h],	xmm1
movaps	xmm0, xmmword ptr [ebp-120h]
movaps	xmmword	ptr [ebp-130h],	xmm0
mov	eax, [ebp-130h]
mov	[ebp-140h], eax
mov	ecx, [ebp-12Ch]
mov	[ebp-13Ch], ecx
mov	edx, [ebp-128h]
mov	[ebp-138h], edx
mov	eax, [ebp-124h]
mov	[ebp-134h], eax
movaps	xmm0, xmmword ptr [ebp-100h]
movmskps ecx, xmm0
test	ecx, ecx
jz	short loc_4D6084
mov	edx, [ebp-4]
movaps	xmm0, ds:xmmword_14EE290
movaps	xmmword	ptr [edx], xmm0
jmp	loc_4D65D8

loc_4D6084:
movaps	xmm0, xmmword ptr [ebp-140h]
movmskps eax, xmm0
test	eax, eax
jz	short loc_4D60A3
mov	ecx, [ebx+8]
push	ecx
mov	ecx, [ebp-4]
call	sub_12560E0
jmp	loc_4D65D8

loc_4D60A3:
movaps	xmm0, ds:xmmword_14EE2B0
movaps	xmmword	ptr [ebp-150h],	xmm0
movaps	xmm0, xmmword ptr [ebp-0B0h]
movaps	xmm1, xmmword ptr [ebp-150h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-160h],	xmm1
movaps	xmm0, xmmword ptr [ebp-160h]
movaps	xmm1, xmmword ptr [ebp-150h]
addps	xmm1, xmm0
movaps	xmmword	ptr [ebp-170h],	xmm1
movaps	xmm0, xmmword ptr [ebp-170h]
movaps	xmmword	ptr [ebp-180h],	xmm0
movaps	xmm0, xmmword ptr [ebp-180h]
call	sub_4D51B0
movaps	xmmword	ptr [ebp-190h],	xmm0
movaps	xmm0, xmmword ptr [ebp-190h]
movaps	xmmword	ptr [ebp-1A0h],	xmm0
mov	edx, [ebx+0Ch]
movaps	xmm0, xmmword ptr [edx]
mov	eax, [ebx+0Ch]
movaps	xmm1, xmmword ptr [eax]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-1B0h],	xmm1
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebx+8]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-1C0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1B0h]
movaps	xmm1, xmmword ptr [ebp-1C0h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-1D0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1D0h]
movaps	xmmword	ptr [ebp-1E0h],	xmm0
mov	eax, [ebx+0Ch]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-1F0h],	xmm1
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [edx]
mov	eax, [ebx+8]
movaps	xmm1, xmmword ptr [eax]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-200h],	xmm1
movaps	xmm0, xmmword ptr [ebp-1F0h]
movaps	xmm1, xmmword ptr [ebp-200h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-210h],	xmm1
movaps	xmm0, xmmword ptr [ebp-210h]
movaps	xmmword	ptr [ebp-220h],	xmm0
movaps	xmm0, xmmword ptr [ebp-220h]
movaps	xmm1, xmmword ptr [ebp-1E0h]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-230h],	xmm1
movaps	xmm0, xmmword ptr [ebp-230h]
movaps	xmmword	ptr [ebp-240h],	xmm0
movaps	xmm0, xmmword ptr [ebp-1A0h]
movaps	xmm1, xmmword ptr [ebp-150h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-250h],	xmm1
movaps	xmm0, xmmword ptr [ebp-250h]
movaps	xmmword	ptr [ebp-260h],	xmm0
movaps	xmm0, xmmword ptr [ebp-0D0h]
movaps	xmm1, xmmword ptr [ebp-0B0h]
cmpltps	xmm1, xmm0
movaps	xmmword	ptr [ebp-270h],	xmm1
movaps	xmm0, xmmword ptr [ebp-270h]
movaps	xmmword	ptr [ebp-280h],	xmm0
mov	ecx, [ebp-280h]
mov	[ebp-290h], ecx
mov	edx, [ebp-27Ch]
mov	[ebp-28Ch], edx
mov	eax, [ebp-278h]
mov	[ebp-288h], eax
mov	ecx, [ebp-274h]
mov	[ebp-284h], ecx
movaps	xmm0, xmmword ptr [ebp-290h]
movmskps edx, xmm0
test	edx, edx
jz	loc_4D6540
movaps	xmm0, xmmword ptr [ebp-0B0h]
movaps	xmm1, xmmword ptr [ebp-180h]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-2A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-2A0h]
movaps	xmmword	ptr [ebp-2B0h],	xmm0
xorps	xmm0, xmm0
movss	xmm1, ds:dword_1479C58
movss	xmm0, xmm1
movaps	xmmword	ptr [ebp-2C0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-2C0h]
movaps	xmmword	ptr [ebp-2D0h],	xmm0
xorps	xmm0, xmm0
movss	xmm1, dword ptr	off_17E66B4
movss	xmm0, xmm1
movaps	xmmword	ptr [ebp-2E0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-2E0h]
movaps	xmmword	ptr [ebp-2F0h],	xmm0
xorps	xmm0, xmm0
movss	xmm1, dword ptr	ds:xmmword_1479F30
movss	xmm0, xmm1
movaps	xmmword	ptr [ebp-300h],	xmm0
movaps	xmm0, xmmword ptr [ebp-300h]
movaps	xmmword	ptr [ebp-310h],	xmm0
movaps	xmm0, xmmword ptr [ebp-240h]
movaps	xmm1, xmmword ptr [ebp-240h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-320h],	xmm1
movaps	xmm0, xmmword ptr [ebp-320h]
movaps	xmmword	ptr [ebp-330h],	xmm0
movaps	xmm0, xmmword ptr [ebp-330h]
movaps	xmm1, xmmword ptr [ebp-330h]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-340h],	xmm1
movaps	xmm0, xmmword ptr [ebp-330h]
movaps	xmm1, xmmword ptr [ebp-340h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-350h],	xmm1
movaps	xmm0, xmmword ptr [ebp-350h]
movaps	xmmword	ptr [ebp-360h],	xmm0
movaps	xmm0, xmmword ptr [ebp-330h]
movaps	xmm1, xmmword ptr [ebp-330h]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-370h],	xmm1
movaps	xmm0, xmmword ptr [ebp-360h]
movaps	xmm1, xmmword ptr [ebp-370h]
addss	xmm1, xmm0
movaps	xmmword	ptr [ebp-380h],	xmm1
movaps	xmm0, xmmword ptr [ebp-380h]
movaps	xmmword	ptr [ebp-390h],	xmm0
movaps	xmm0, xmmword ptr [ebp-390h]
movaps	xmmword	ptr [ebp-3A0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-310h]
movaps	xmm1, xmmword ptr [ebp-3A0h]
cmpeqss	xmm1, xmm0
movaps	xmmword	ptr [ebp-3B0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-3B0h]
movaps	xmmword	ptr [ebp-3C0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-3A0h]
rsqrtss	xmm0, xmm0
movaps	xmmword	ptr [ebp-3D0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-3D0h]
movaps	xmmword	ptr [ebp-3E0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-3E0h]
movaps	xmm1, xmmword ptr [ebp-3A0h]
mulss	xmm1, xmm0
movaps	xmmword	ptr [ebp-3F0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-3E0h]
movaps	xmm1, xmmword ptr [ebp-3F0h]
mulss	xmm1, xmm0
movaps	xmmword	ptr [ebp-400h],	xmm1
movaps	xmm0, xmmword ptr [ebp-400h]
movaps	xmm1, xmmword ptr [ebp-2F0h]
subss	xmm1, xmm0
movaps	xmmword	ptr [ebp-410h],	xmm1
movaps	xmm0, xmmword ptr [ebp-3E0h]
movaps	xmm1, xmmword ptr [ebp-2D0h]
mulss	xmm1, xmm0
movaps	xmmword	ptr [ebp-420h],	xmm1
movaps	xmm0, xmmword ptr [ebp-410h]
movaps	xmm1, xmmword ptr [ebp-420h]
mulss	xmm1, xmm0
movaps	xmmword	ptr [ebp-430h],	xmm1
movaps	xmm0, xmmword ptr [ebp-430h]
movaps	xmmword	ptr [ebp-440h],	xmm0
movaps	xmm0, xmmword ptr [ebp-440h]
movaps	xmm1, xmmword ptr [ebp-3C0h]
andnps	xmm1, xmm0
movaps	xmmword	ptr [ebp-450h],	xmm1
movaps	xmm0, xmmword ptr [ebp-450h]
movaps	xmmword	ptr [ebp-460h],	xmm0
movaps	xmm0, xmmword ptr [ebp-2B0h]
call	sub_4D51B0
movaps	xmmword	ptr [ebp-470h],	xmm0
movaps	xmm0, xmmword ptr [ebp-470h]
movaps	xmmword	ptr [ebp-480h],	xmm0
movaps	xmm0, xmmword ptr [ebp-2B0h]
movaps	xmm1, xmmword ptr [ebp-480h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-490h],	xmm1
movaps	xmm0, xmmword ptr [ebp-490h]
movaps	xmmword	ptr [ebp-260h],	xmm0
movaps	xmm0, xmmword ptr [ebp-460h]
movaps	xmm1, xmmword ptr [ebp-460h]
shufps	xmm1, xmm0, 0
movaps	xmmword	ptr [ebp-4A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-4A0h]
movaps	xmmword	ptr [ebp-4B0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-260h]
movaps	xmm1, xmmword ptr [ebp-4B0h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-4C0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-4C0h]
movaps	xmmword	ptr [ebp-260h],	xmm0

loc_4D6540:
movaps	xmm0, xmmword ptr [ebp-260h]
movaps	xmm1, xmmword ptr [ebp-240h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-4D0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-4D0h]
movaps	xmmword	ptr [ebp-240h],	xmm0
movaps	xmm0, xmmword ptr [ebp-1A0h]
movaps	xmm1, xmmword ptr [ebp-180h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-4E0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-4E0h]
movaps	xmmword	ptr [ebp-4F0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-4F0h]
movaps	xmm1, xmmword ptr [ebp-240h]
unpckhps xmm1, xmm0
movaps	xmmword	ptr [ebp-500h],	xmm1
movaps	xmm0, xmmword ptr [ebp-500h]
movaps	xmm1, xmmword ptr [ebp-240h]
shufps	xmm1, xmm0, 0C4h
movaps	xmmword	ptr [ebp-510h],	xmm1
movaps	xmm0, xmmword ptr [ebp-510h]
movaps	xmmword	ptr [ebp-240h],	xmm0
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-240h]
movaps	xmmword	ptr [eax], xmm0

loc_4D65D8:
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	8
sub_4D5EC0 endp

align 10h



sub_4D65F0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
xor	eax, eax
shl	eax, 4
add	eax, [ebx+8]
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ecx], xmm0
mov	edx, 1
shl	edx, 4
add	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, 2
shl	ecx, 4
add	ecx, [ebx+8]
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D65F0 endp

align 10h


; Attributes: bp-based frame

sub_4D6660 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_20]
jge	short loc_4D66D9
mov	ecx, [ebp+var_14]
shl	ecx, 1
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_20]
cmp	edx, [ebp+var_1C]
jge	short loc_4D66B7
mov	eax, [ebp+var_1C]
mov	[ebp+var_28], eax
jmp	short loc_4D66BD

loc_4D66B7:
mov	ecx, [ebp+var_20]
mov	[ebp+var_28], ecx

loc_4D66BD:
mov	edx, [ebp+var_28]
mov	[ebp+var_18], edx
push	1
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_121B8C0
add	esp, 10h

loc_4D66D9:
xor	eax, eax
mov	byte ptr [ebp+var_E+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_E], cl
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx+4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
mov	byte ptr [edx+eax], 0
mov	esp, ebp
pop	ebp
retn	4
sub_4D6660 endp

align 10h


; Attributes: bp-based frame

sub_4D6700 proc	near

var_24=	dword ptr -24h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
add	eax, 0Ch
mov	ecx, [ebp+var_24]
mov	[ecx], eax
mov	edx, [ebp+var_24]
mov	dword ptr [edx+4], 0
mov	eax, 80h
or	eax, 80000000h
mov	ecx, [ebp+var_24]
mov	[ecx+8], eax
push	0
mov	ecx, [ebp+var_24]
call	sub_4D6660
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	byte ptr [eax],	0
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn
sub_4D6700 endp

align 10h


; Attributes: bp-based frame

sub_4D6750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D6775
push	14h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4D6775:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D6750 endp

align 10h


; Attributes: bp-based frame

sub_4D6780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+4Ch]
mov	esp, ebp
pop	ebp
retn
sub_4D6780 endp

align 10h


; Attributes: bp-based frame

sub_4D67A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwophysicsinte ; "LWOPhysicsInterface"
mov	esp, ebp
pop	ebp
retn
sub_4D67A0 endp



; Attributes: bp-based frame

sub_4D67B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1514D38
mov	esp, ebp
pop	ebp
retn
sub_4D67B0 endp



; Attributes: bp-based frame

sub_4D67C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D67C0 endp

align 10h



sub_4D67E0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D67E0 endp

align 10h



sub_4D6820 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax+10h], xmm0
mov	edx, 3
shl	edx, 2
mov	eax, [ebp-4]
movss	xmm0, dword ptr	[ebx+0Ch]
movss	dword ptr [eax+edx+10h], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	8
sub_4D6820 endp

align 10h


; Attributes: bp-based frame

sub_4D6870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3
shl	eax, 2
mov	ecx, [ebp+var_4]
fld	dword ptr [ecx+eax+10h]
mov	esp, ebp
pop	ebp
retn
sub_4D6870 endp

align 10h


; Attributes: bp-based frame

sub_4D6890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3
shl	eax, 2
mov	ecx, [ebp+var_4]
movss	xmm0, [ebp+arg_0]
movss	dword ptr [ecx+eax+10h], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_4D6890 endp

align 10h
; [0000000D BYTES: COLLAPSED FUNCTION unknown_libname_5. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D68D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movsx	eax, byte ptr [eax+10h]
add	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D68D0 endp

align 10h


; Attributes: bp-based frame

sub_4D68F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	byte ptr [eax+10h], 0
mov	ecx, [ebp+var_10]
add	ecx, 14h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_8]
mov	[eax+4], cl
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+6], 0FFh
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+5], 7Fh
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_AAD970
mov	edx, [ebp+var_10]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+4Ch], xmm0
mov	eax, [ebp+var_10]
add	eax, 14h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
sub	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	al, byte ptr [ebp+var_8]
mov	[edx+5], al
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+11h], 0
xor	edx, edx
mov	eax, [ebp+var_10]
mov	[eax+12h], dx
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D68F0 endp

align 10h


; Attributes: bp-based frame

sub_4D69B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn
sub_4D69B0 endp

align 10h


; Attributes: bp-based frame

sub_4D69D0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
movsx	eax, byte ptr [eax+10h]
add	eax, [ebp+arg_0]
pop	ebp
retn
sub_4D69D0 endp

align 10h


; Attributes: bp-based frame

sub_4D69E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	esp, ebp
pop	ebp
retn
sub_4D69E0 endp

align 10h


; Attributes: bp-based frame

sub_4D6A00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	[ebp+var_C], 0
jmp	short loc_4D6A1B

loc_4D6A12:
mov	eax, [ebp+var_C]
add	eax, 1
mov	[ebp+var_C], eax

loc_4D6A1B:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+7Ch]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
cmp	eax, [ebp+var_10]
jge	short loc_4D6A63
mov	ecx, [ebp+var_C]
shl	ecx, 4
mov	edx, [ebp+var_14]
mov	eax, [edx+78h]
mov	ecx, [ecx+eax]
cmp	ecx, [ebp+arg_4]
jnz	short loc_4D6A61
mov	edx, [ebp+var_C]
shl	edx, 4
mov	eax, [ebp+var_14]
mov	ecx, [eax+78h]
mov	eax, [ecx+edx+8]
mov	ecx, [ecx+edx+0Ch]
mov	edx, [ebp+arg_0]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_4D6A82

loc_4D6A61:
jmp	short loc_4D6A12

loc_4D6A63:
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]

loc_4D6A82:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D6A00 endp

align 10h


; Attributes: bp-based frame

sub_4D6A90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 0
jmp	short loc_4D6AAB

loc_4D6AA2:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_4D6AAB:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+7Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jge	short loc_4D6AD6
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	edx, [ebp+var_C]
mov	eax, [edx+78h]
mov	ecx, [ecx+eax]
cmp	ecx, [ebp+arg_0]
jnz	short loc_4D6AD4
mov	al, 1
jmp	short loc_4D6AD8

loc_4D6AD4:
jmp	short loc_4D6AA2

loc_4D6AD6:
xor	al, al

loc_4D6AD8:
mov	esp, ebp
pop	ebp
retn	8
sub_4D6A90 endp

align 10h


; Attributes: bp-based frame

sub_4D6AE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+0Ch], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4D6AE0 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D6B20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F593C
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D6B44
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D6B44:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D6B20 endp

align 10h


; Attributes: bp-based frame

sub_4D6B50 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
movsx	ecx, byte ptr [eax+18h]
cmp	ecx, 2
jnz	short loc_4D6B6B
mov	edx, [ebp+arg_0]
movsx	eax, byte ptr [edx+10h]
add	eax, [ebp+arg_0]
jmp	short loc_4D6B6D

loc_4D6B6B:
xor	eax, eax

loc_4D6B6D:
pop	ebp
retn
sub_4D6B50 endp

align 10h


; Attributes: bp-based frame

sub_4D6B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0B0h
mov	esp, ebp
pop	ebp
retn
sub_4D6B70 endp

align 10h


; Attributes: bp-based frame

sub_4D6B90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_4D6BB7
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
jmp	short loc_4D6BE8

loc_4D6BB7:
mov	ecx, 4
mov	edi, [ebp+arg_0]
add	edi, 4
mov	esi, [ebp+var_4]
add	esi, 4
xor	eax, eax
mov	[ebp+var_8], eax
repe cmpsb
jz	short loc_4D6BD9
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_8], ecx

loc_4D6BD9:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
xor	eax, eax
cmp	[ebp+var_C], 0
setl	al

loc_4D6BE8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4D6B90 endp



; Attributes: bp-based frame

sub_4D6BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1B74h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F4
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+10h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D6BF0 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION __CxxRestoreUnhandledExceptionFilter(void). PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D6C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_4D6C79
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_AD6020

loc_4D6C79:
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	esp, ebp
pop	ebp
retn
sub_4D6C60 endp

align 10h


; Attributes: bp-based frame

sub_4D6C90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1472700
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D6CB4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D6CB4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D6C90 endp

align 10h


; Attributes: bp-based frame

sub_4D6CC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_147270C
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D6CE4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D6CE4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D6CC0 endp

align 10h


; Attributes: bp-based frame

sub_4D6CF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1472718
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D6D14
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D6D14:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D6CF0 endp

align 10h


; Attributes: bp-based frame

sub_4D6D20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_147272C
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D6D44
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D6D44:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D6D20 endp

align 10h


; Attributes: bp-based frame

sub_4D6D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+14h], offset off_147270C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], offset off_147272C
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], offset off_1472718
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], offset off_1472700
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4D6D50 endp

align 10h


; Attributes: bp-based frame

sub_4D6DA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_147089C
mov	ecx, [ebp+var_10]
add	ecx, 6Ch
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_4D6DCD
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_AD6020

loc_4D6DCD:
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_10]
add	edx, 5Ch
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_4D6DF1
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_AD6020

loc_4D6DF1:
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
add	eax, 58h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_4D6E15
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_AD6020

loc_4D6E15:
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4D6DA0 endp

align 10h


; Attributes: bp-based frame

sub_4D6E40 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_4D6DA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D6E8F
mov	ecx, [ebp+var_1C]
mov	[ebp+var_10], ecx
call	sub_AD5DD0
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [ebp+var_20]
mov	edx, [eax+8]
call	edx

loc_4D6E8F:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	4
sub_4D6E40 endp

align 10h


; Attributes: bp-based frame

sub_4D6EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+78h]
mov	esp, ebp
pop	ebp
retn
sub_4D6EA0 endp

align 10h


; Attributes: bp-based frame

sub_4D6EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+58h]
mov	esp, ebp
pop	ebp
retn
sub_4D6EC0 endp

align 10h


; Attributes: bp-based frame

sub_4D6EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+80h]
mov	esp, ebp
pop	ebp
retn
sub_4D6EE0 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION unknown_libname_6. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D6F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+7Ch]
mov	esp, ebp
pop	ebp
retn
sub_4D6F20 endp

align 10h


; Attributes: bp-based frame

sub_4D6F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+4]
mov	esp, ebp
pop	ebp
retn
sub_4D6F40 endp

align 10h


; Attributes: bp-based frame

sub_4D6F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	esp, ebp
pop	ebp
retn
sub_4D6F60 endp

align 10h


; Attributes: bp-based frame

sub_4D6F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D6F90 endp

align 10h


; Attributes: bp-based frame

sub_4D6FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	eax, byte ptr [eax+8]
mov	esp, ebp
pop	ebp
retn
sub_4D6FC0 endp

align 10h



sub_4D6FE0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
add	eax, 0C0h
mov	[ebp-8], eax
mov	dword ptr [ebp-0Ch], 3
cmp	dword ptr [ebp-0Ch], 0
jz	short loc_4D7022
cmp	dword ptr [ebp-0Ch], 1
jz	short loc_4D7030
cmp	dword ptr [ebp-0Ch], 2
jz	short loc_4D7050
jmp	short loc_4D7070

loc_4D7022:
mov	ecx, [ebx+8]
mov	edx, [ebp-8]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [ecx], xmm0
jmp	short loc_4D708E

loc_4D7030:
mov	eax, [ebp-8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 55h
movaps	xmmword	ptr [ebp-20h], xmm1
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [edx], xmm0
jmp	short loc_4D708E

loc_4D7050:
mov	eax, [ebp-8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0AAh
movaps	xmmword	ptr [ebp-30h], xmm1
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmmword	ptr [edx], xmm0
jmp	short loc_4D708E

loc_4D7070:
mov	eax, [ebp-8]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-8]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0FFh
movaps	xmmword	ptr [ebp-40h], xmm1
mov	edx, [ebx+8]
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [edx], xmm0

loc_4D708E:
mov	eax, [ebx+8]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D6FE0 endp

align 10h


; Attributes: bp-based frame

sub_4D70A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 60h
mov	esp, ebp
pop	ebp
retn
sub_4D70A0 endp

align 10h


; Attributes: bp-based frame

sub_4D70C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 40h
mov	esp, ebp
pop	ebp
retn
sub_4D70C0 endp

align 10h


; Attributes: bp-based frame

sub_4D70E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 80h
mov	esp, ebp
pop	ebp
retn
sub_4D70E0 endp

align 10h


; Attributes: bp-based frame

sub_4D7100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0D0h
mov	esp, ebp
pop	ebp
retn
sub_4D7100 endp

align 10h


; Attributes: bp-based frame

sub_4D7120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+0CCh]
mov	esp, ebp
pop	ebp
retn
sub_4D7120 endp

align 10h


; Attributes: bp-based frame

sub_4D7140 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+208h]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+edx*4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D7140 endp

align 10h


; Attributes: bp-based frame

sub_4D7160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	eax, word ptr [eax+20Ch]
mov	esp, ebp
pop	ebp
retn
sub_4D7160 endp

align 10h


; Attributes: bp-based frame

sub_4D7180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 8Ch
mov	esp, ebp
pop	ebp
retn
sub_4D7180 endp

align 10h


; Attributes: bp-based frame

sub_4D71A0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, 5
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+0E8h]
cmp	edx, eax
setz	al
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1]
mov	[ecx], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4D71A0 endp

align 10h


; Attributes: bp-based frame

sub_4D71E0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, 5
mov	ecx, [ebp+var_C]
movzx	edx, byte ptr [ecx+0E8h]
cmp	edx, eax
setz	al
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
neg	edx
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_4D724B
mov	ecx, 4
mov	edx, [ebp+var_C]
movzx	eax, byte ptr [edx+0E8h]
cmp	eax, ecx
setz	cl
mov	[ebp+var_4], cl
mov	dl, [ebp+var_4]
mov	[ebp+var_2], dl
movzx	eax, [ebp+var_2]
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4D724B
mov	[ebp+var_5], 0
jmp	short loc_4D724F

loc_4D724B:
mov	[ebp+var_5], 1

loc_4D724F:
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_5]
mov	[edx], al
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4D71E0 endp



; Attributes: bp-based frame

sub_4D7260 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
movsx	ecx, byte ptr [eax+18h]
cmp	ecx, 1
jnz	short loc_4D727B
mov	edx, [ebp+arg_0]
movsx	eax, byte ptr [edx+10h]
add	eax, [ebp+arg_0]
jmp	short loc_4D727D

loc_4D727B:
xor	eax, eax

loc_4D727D:
pop	ebp
retn
sub_4D7260 endp

align 10h


; Attributes: bp-based frame

sub_4D7280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	esp, ebp
pop	ebp
retn
sub_4D7280 endp

align 10h


; Attributes: bp-based frame

sub_4D72A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0E0h
call	sub_A885D0
mov	esp, ebp
pop	ebp
retn
sub_4D72A0 endp

align 10h



sub_4D72C0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp-4], ecx
lea	eax, [ebp-20h]
push	eax
mov	ecx, [ebp-4]
add	ecx, 0E0h
call	sub_4D6FE0
mov	[ebp-24h], eax
mov	ecx, [ebp-24h]
movaps	xmm0, xmmword ptr [ecx]
movss	dword ptr [ebp-28h], xmm0
fld	dword ptr [ebp-28h]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D72C0 endp

align 10h


; Attributes: bp-based frame

sub_4D7310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 140h
mov	esp, ebp
pop	ebp
retn
sub_4D7310 endp

align 10h


; Attributes: bp-based frame

sub_4D7330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 120h
mov	esp, ebp
pop	ebp
retn
sub_4D7330 endp

align 10h


; Attributes: bp-based frame

sub_4D7350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 160h
mov	esp, ebp
pop	ebp
retn
sub_4D7350 endp

align 10h


; Attributes: bp-based frame

sub_4D7370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0F0h
mov	esp, ebp
pop	ebp
retn
sub_4D7370 endp

align 10h


; Attributes: bp-based frame

sub_4D7390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 1B0h
mov	esp, ebp
pop	ebp
retn
sub_4D7390 endp

align 10h


; Attributes: bp-based frame

sub_4D73B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 1C0h
mov	esp, ebp
pop	ebp
retn
sub_4D73B0 endp

align 10h



sub_4D73D0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
add	eax, 0E0h
mov	[ebp-8], eax
mov	ecx, [ebp-8]
movaps	xmm0, xmmword ptr [ecx+60h]
mov	edx, [ebx+8]
movaps	xmm1, xmmword ptr [edx]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-20h], xmm1
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [ebp-30h], xmm0
mov	eax, [ebp-8]
add	eax, 0E0h
mov	[ebp-34h], eax
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, xmmword ptr [ebp-30h]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-50h], xmm1
mov	ecx, [ebp-34h]
movaps	xmm0, xmmword ptr [ecx]
mov	edx, [ebp-34h]
movaps	xmm1, xmmword ptr [edx]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-60h], xmm1
movaps	xmm0, xmmword ptr [ebp-50h]
movaps	xmm1, xmmword ptr [ebp-60h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-70h], xmm1
movaps	xmm0, xmmword ptr [ebp-70h]
movaps	xmmword	ptr [ebp-80h], xmm0
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmm1, xmmword ptr [ebp-30h]
shufps	xmm1, xmm0, 0C9h
movaps	xmmword	ptr [ebp-90h], xmm1
mov	eax, [ebp-34h]
movaps	xmm0, xmmword ptr [eax]
mov	ecx, [ebp-34h]
movaps	xmm1, xmmword ptr [ecx]
shufps	xmm1, xmm0, 0D2h
movaps	xmmword	ptr [ebp-0A0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-90h]
movaps	xmm1, xmmword ptr [ebp-0A0h]
mulps	xmm1, xmm0
movaps	xmmword	ptr [ebp-0B0h],	xmm1
movaps	xmm0, xmmword ptr [ebp-0B0h]
movaps	xmmword	ptr [ebp-0C0h],	xmm0
movaps	xmm0, xmmword ptr [ebp-0C0h]
movaps	xmm1, xmmword ptr [ebp-80h]
subps	xmm1, xmm0
movaps	xmmword	ptr [ebp-0D0h],	xmm1
mov	edx, [ebx+0Ch]
movaps	xmm0, xmmword ptr [ebp-0D0h]
movaps	xmmword	ptr [edx], xmm0
mov	eax, [ebp-8]
movaps	xmm0, xmmword ptr [eax+0D0h]
mov	ecx, [ebx+0Ch]
movaps	xmm1, xmmword ptr [ecx]
addps	xmm1, xmm0
movaps	xmmword	ptr [ebp-0E0h],	xmm1
mov	edx, [ebx+0Ch]
movaps	xmm0, xmmword ptr [ebp-0E0h]
movaps	xmmword	ptr [edx], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	8
sub_4D73D0 endp

align 10h


; Attributes: bp-based frame

sub_4D7500 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A937C0
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+4Ch]
call	edx
mov	esp, ebp
pop	ebp
retn	4
sub_4D7500 endp

align 10h


; Attributes: bp-based frame

sub_4D7540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A937C0
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
mov	edx, [eax]
mov	ecx, [ebp+var_8]
mov	eax, [edx+50h]
call	eax
mov	esp, ebp
pop	ebp
retn	8
sub_4D7540 endp

align 10h


; Attributes: bp-based frame

sub_4D7580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A937C0
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+54h]
call	edx
mov	esp, ebp
pop	ebp
retn	4
sub_4D7580 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4D75C0(float, int)
sub_4D75C0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A937C0
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
push	ecx
push	ecx
fld	[ebp+arg_0]
fstp	[esp+10h+var_10]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+5Ch]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4D75C0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4D7600(float, int)
sub_4D7600 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A937C0
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
push	ecx
push	ecx
fld	[ebp+arg_0]
fstp	[esp+10h+var_10]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+60h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4D7600 endp

align 10h


; Attributes: bp-based frame

sub_4D7640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	eax, byte ptr [eax+0E8h]
mov	esp, ebp
pop	ebp
retn
sub_4D7640 endp

align 10h


; Attributes: bp-based frame

sub_4D7660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A937C0
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+40h]
call	edx
mov	esp, ebp
pop	ebp
retn	4
sub_4D7660 endp

align 10h


; Attributes: bp-based frame

sub_4D76A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A937C0
mov	eax, [ebp+var_4]
add	eax, 0E0h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+44h]
call	edx
mov	esp, ebp
pop	ebp
retn	4
sub_4D76A0 endp

align 10h


; Attributes: bp-based frame

sub_4D76E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+6], dx
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15F1A9C
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15F1B80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D76E0 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D7760 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F19CC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D7784
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D7784:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D7760 endp

align 10h


; Attributes: bp-based frame

sub_4D7790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F1C44
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+4], 0
jz	short loc_4D77B4
mov	edx, [ebp+var_4]
mov	ecx, [edx+4]
call	sub_AD6020

loc_4D77B4:
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F19CC
mov	esp, ebp
pop	ebp
retn
sub_4D7790 endp

align 10h


; Attributes: bp-based frame

sub_4D77D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F1C44
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+4], 0
jz	short loc_4D77F4
mov	edx, [ebp+var_4]
mov	ecx, [edx+4]
call	sub_AD6020

loc_4D77F4:
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F19CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D77D0 endp

align 10h


; Attributes: bp-based frame

sub_4D7810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 14h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15F1C44
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+4], 0
jz	short loc_4D783F
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
call	sub_AD6020

loc_4D783F:
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15F19CC
mov	edx, [ebp+var_8]
mov	dword ptr [edx], offset	off_146A160
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4D7810 endp

align 10h


; Attributes: bp-based frame

sub_4D7860 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+6], dx
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15F1A9C
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15F1B80
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F1B34
mov	ecx, [ebp+var_4]
movss	xmm0, [ebp+arg_4]
movss	dword ptr [ecx+10h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_4D7860 endp

align 10h


; Attributes: bp-based frame

sub_4D78D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+10h]
mov	esp, ebp
pop	ebp
retn
sub_4D78D0 endp

align 10h


; Attributes: bp-based frame

sub_4D78F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60h
mov	esp, ebp
pop	ebp
retn	8
sub_4D78F0 endp

align 10h


; Attributes: bp-based frame

sub_4D7910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+8], 80000000h
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 80000000h
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4D7910 endp

align 10h



sub_4D7970 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	dword ptr [eax], 0
mov	ecx, [ebp-4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp-4]
mov	dword ptr [edx+8], 80000000h
mov	eax, [ebp-4]
add	eax, 0Ch
mov	[ebp-8], eax
mov	ecx, [ebp-8]
mov	dword ptr [ecx], 0
mov	edx, [ebp-8]
mov	dword ptr [edx+4], 0
mov	eax, [ebp-8]
mov	dword ptr [eax+8], 80000000h
xor	ecx, ecx
mov	[ebp-9], cl
xor	edx, edx
mov	[ebp-0Ah], dl
call	sub_AD5DD0
mov	[ebp-10h], eax
mov	eax, [ebp-10h]
mov	ecx, [eax+10h]
mov	[ebp-14h], ecx
mov	dl, [ebp-9]
mov	[ebp-18h], dl
mov	eax, [ebp-4]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp-1Ch], ecx
mov	edx, [ebx+8]
mov	eax, [edx+4]
mov	[ebp-20h], eax
mov	ecx, [ebp-1Ch]
cmp	ecx, [ebp-20h]
jge	loc_4D7AAD
mov	edx, [ebp-4]
mov	eax, [edx+8]
and	eax, 80000000h
jnz	short loc_4D7A5A
mov	ecx, [ebp-4]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	[ebp-24h], edx
mov	eax, [ebp-4]
mov	ecx, [eax]
mov	[ebp-28h], ecx
mov	dword ptr [ebp-2Ch], 10h
mov	edx, [ebp-24h]
shl	edx, 4
push	edx
mov	eax, [ebp-28h]
push	eax
mov	ecx, [ebp-14h]
mov	edx, [ecx]
mov	ecx, [ebp-14h]
mov	eax, [edx+10h]
call	eax

loc_4D7A5A:
mov	ecx, [ebx+8]
mov	edx, [ecx+4]
mov	[ebp-30h], edx
mov	eax, [ebp-30h]
mov	[ebp-34h], eax
mov	dword ptr [ebp-38h], 10h
mov	ecx, [ebp-34h]
shl	ecx, 4
mov	[ebp-3Ch], ecx
lea	edx, [ebp-3Ch]
push	edx
mov	eax, [ebp-14h]
mov	edx, [eax]
mov	ecx, [ebp-14h]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp-40h], eax
mov	eax, [ebp-3Ch]
cdq
and	edx, 0Fh
add	eax, edx
sar	eax, 4
mov	[ebp-34h], eax
mov	ecx, [ebp-4]
mov	edx, [ebp-40h]
mov	[ecx], edx
mov	eax, [ebp-4]
mov	ecx, [ebp-34h]
mov	[eax+8], ecx

loc_4D7AAD:
mov	edx, [ebx+8]
mov	eax, [edx+4]
mov	[ebp-44h], eax
mov	ecx, [ebp-4]
mov	edx, [ebp-44h]
mov	[ecx+4], edx
mov	eax, [ebp-4]
mov	ecx, [eax+4]
mov	[ebp-48h], ecx
mov	edx, [ebx+8]
mov	eax, [edx]
mov	[ebp-4Ch], eax
mov	ecx, [ebp-4]
mov	edx, [ecx]
mov	[ebp-50h], edx
mov	dword ptr [ebp-54h], 0
jmp	short loc_4D7AEA

loc_4D7AE1:
mov	eax, [ebp-54h]
add	eax, 1
mov	[ebp-54h], eax

loc_4D7AEA:
mov	ecx, [ebp-54h]
cmp	ecx, [ebp-48h]
jge	short loc_4D7B0C
mov	edx, [ebp-54h]
shl	edx, 4
add	edx, [ebp-4Ch]
mov	eax, [ebp-54h]
shl	eax, 4
add	eax, [ebp-50h]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [eax], xmm0
jmp	short loc_4D7AE1

loc_4D7B0C:
mov	ecx, [ebx+8]
add	ecx, 0Ch
mov	[ebp-58h], ecx
mov	edx, [ebp-4]
add	edx, 0Ch
mov	[ebp-5Ch], edx
xor	eax, eax
mov	[ebp-5Dh], al
xor	ecx, ecx
mov	[ebp-5Eh], cl
call	sub_AD5DD0
mov	[ebp-64h], eax
mov	edx, [ebp-64h]
mov	eax, [edx+10h]
mov	[ebp-68h], eax
mov	cl, [ebp-5Dh]
mov	[ebp-6Ch], cl
mov	edx, [ebp-5Ch]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp-70h], eax
mov	ecx, [ebp-58h]
mov	edx, [ecx+4]
mov	[ebp-74h], edx
mov	eax, [ebp-70h]
cmp	eax, [ebp-74h]
jge	loc_4D7C1D
mov	ecx, [ebp-5Ch]
mov	edx, [ecx+8]
and	edx, 80000000h
jnz	short loc_4D7BA6
mov	eax, [ebp-5Ch]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp-78h], ecx
mov	edx, [ebp-5Ch]
mov	eax, [edx]
mov	[ebp-7Ch], eax
mov	dword ptr [ebp-80h], 10h
mov	ecx, [ebp-78h]
shl	ecx, 4
push	ecx
mov	edx, [ebp-7Ch]
push	edx
mov	eax, [ebp-68h]
mov	edx, [eax]
mov	ecx, [ebp-68h]
mov	eax, [edx+10h]
call	eax

loc_4D7BA6:
mov	ecx, [ebp-58h]
mov	edx, [ecx+4]
mov	[ebp-84h], edx
mov	eax, [ebp-84h]
mov	[ebp-88h], eax
mov	dword ptr [ebp-8Ch], 10h
mov	ecx, [ebp-88h]
shl	ecx, 4
mov	[ebp-90h], ecx
lea	edx, [ebp-90h]
push	edx
mov	eax, [ebp-68h]
mov	edx, [eax]
mov	ecx, [ebp-68h]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp-94h], eax
mov	eax, [ebp-90h]
cdq
and	edx, 0Fh
add	eax, edx
sar	eax, 4
mov	[ebp-88h], eax
mov	ecx, [ebp-5Ch]
mov	edx, [ebp-94h]
mov	[ecx], edx
mov	eax, [ebp-5Ch]
mov	ecx, [ebp-88h]
mov	[eax+8], ecx

loc_4D7C1D:
mov	edx, [ebp-58h]
mov	eax, [edx+4]
mov	[ebp-98h], eax
mov	ecx, [ebp-5Ch]
mov	edx, [ebp-98h]
mov	[ecx+4], edx
mov	eax, [ebp-5Ch]
mov	ecx, [eax+4]
mov	[ebp-9Ch], ecx
mov	edx, [ebp-58h]
mov	eax, [edx]
mov	[ebp-0A0h], eax
mov	ecx, [ebp-5Ch]
mov	edx, [ecx]
mov	[ebp-0A4h], edx
mov	dword ptr [ebp-0A8h], 0
jmp	short loc_4D7C72

loc_4D7C63:
mov	eax, [ebp-0A8h]
add	eax, 1
mov	[ebp-0A8h], eax

loc_4D7C72:
mov	ecx, [ebp-0A8h]
cmp	ecx, [ebp-9Ch]
jge	short loc_4D7CB6
mov	edx, [ebp-0A8h]
shl	edx, 4
add	edx, [ebp-0A0h]
mov	eax, [ebp-0A8h]
shl	eax, 4
add	eax, [ebp-0A4h]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	short loc_4D7C63

loc_4D7CB6:
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D7970 endp

align 10h


; Attributes: bp-based frame

sub_4D7CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D7CD0 endp

align 10h


; Attributes: bp-based frame

sub_4D7CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+0Ch]
call	eax
mov	esp, ebp
pop	ebp
retn
sub_4D7CF0 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D7D30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15CB6E8
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D7D54
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D7D54:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D7D30 endp

align 10h


; Attributes: bp-based frame

sub_4D7D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_4D7D9A
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
mov	edx, [eax]
mov	ecx, [ebp+var_8]
mov	eax, [edx+8]
call	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+4]
call	edx

loc_4D7D9A:
mov	esp, ebp
pop	ebp
retn	4
sub_4D7D60 endp




sub_4D7DA0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	dword ptr [eax], 2
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, ds:dword_1479C54
movss	xmm2, dword ptr	ds:xmmword_1479F30
movss	xmm3, dword ptr	ds:xmmword_1479F30
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-20h], xmm3
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [ecx+10h], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, dword ptr	ds:xmmword_1479F30
movss	xmm2, dword ptr	ds:xmmword_1479F30
movss	xmm3, dword ptr	ds:xmmword_1479F30
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-30h], xmm3
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp-4]
add	ecx, 34h
mov	[ebp-34h], ecx
mov	edx, [ebp-34h]
mov	byte ptr [edx],	0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D7DA0 endp

align 10h



sub_4D7E60 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp-4], ecx
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, dword ptr	ds:xmmword_1479F30
movss	xmm2, dword ptr	ds:xmmword_1479F30
movss	xmm3, dword ptr	ds:xmmword_1479F30
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-20h], xmm3
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [eax], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, dword ptr	ds:xmmword_1479F30
movss	xmm2, dword ptr	ds:xmmword_1479F30
movss	xmm3, dword ptr	ds:xmmword_1479F30
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-30h], xmm3
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmmword	ptr [ecx+10h], xmm0
mov	edx, [ebp-4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+20h], xmm0
mov	eax, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+24h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, dword_17E66B0
movss	dword ptr [ecx+28h], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, dword ptr	ds:xmmword_1479F30
movss	xmm2, ds:dword_1479C54
movss	xmm3, dword ptr	ds:xmmword_1479F30
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-40h], xmm3
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [edx+30h], xmm0
mov	eax, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+40h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+44h], xmm0
mov	edx, [ebp-4]
mov	dword ptr [edx+48h], 0
mov	eax, [ebp-4]
movss	xmm0, ds:dword_156F414
movss	dword ptr [eax+4Ch], xmm0
mov	ecx, [ebp-4]
movss	xmm0, ds:dword_1577A6C
movss	dword ptr [ecx+50h], xmm0
mov	edx, [ebp-4]
mov	dword ptr [edx+54h], 4
mov	eax, [ebp-4]
movss	xmm0, ds:dword_1577A6C
movss	dword ptr [eax+58h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [ecx+5Ch], xmm0
mov	edx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+60h], xmm0
mov	eax, [ebp-4]
movss	xmm0, ds:flt_15FCF40
movss	dword ptr [eax+64h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+68h], xmm0
mov	edx, [ebp-4]
mov	dword ptr [edx+6Ch], 0Ah
mov	eax, [ebp-4]
mov	byte ptr [eax+70h], 0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D7E60 endp

align 10h


; Attributes: bp-based frame

sub_4D8020 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1576DAC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D8044
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D8044:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8020 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D8050(int, float)
sub_4D8050 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, 2
shl	eax, 2
mov	ecx, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [ecx+eax]
fstp	[esp+4+var_4]
mov	edx, 1
shl	edx, 2
mov	eax, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [eax+edx]
fstp	[esp+8+var_8]
xor	ecx, ecx
shl	ecx, 2
mov	edx, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [edx+ecx]
fstp	[esp+0Ch+var_C]
mov	ecx, [ebp+arg_0]
call	sub_40F570
mov	eax, [ebp+arg_0]
pop	ebp
retn
sub_4D8050 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4D80A0(int, float)
sub_4D80A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, 2
shl	eax, 2
mov	ecx, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [ecx+eax]
fstp	[esp+4+var_4]
mov	edx, 1
shl	edx, 2
mov	eax, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [eax+edx]
fstp	[esp+8+var_8]
xor	ecx, ecx
shl	ecx, 2
mov	edx, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [edx+ecx]
fstp	[esp+0Ch+var_C]
mov	eax, 3
shl	eax, 2
mov	ecx, [ebp+arg_4]
push	ecx		; float
fld	dword ptr [ecx+eax]
fstp	[esp+10h+var_10]
mov	eax, [ebp+arg_0]
call	sub_116E940
mov	eax, [ebp+arg_0]
pop	ebp
retn
sub_4D80A0 endp

align 10h


; Attributes: bp-based frame

sub_4D8100 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+6], dx
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_1576DAC
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1576DDC
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+8], offset off_1576DE8
mov	edx, [ebp+var_10]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_10]
add	eax, 58h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_10]
add	edx, 59h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	byte ptr [eax],	0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4D8100 endp

align 10h
; [00000017 BYTES: COLLAPSED FUNCTION std::ios_base::ios_base(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D81B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 50h
mov	esp, ebp
pop	ebp
retn
sub_4D81B0 endp

align 10h


; Attributes: bp-based frame

sub_4D81D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	eax, [ecx+eax*4+4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D81D0 endp

align 10h


; Attributes: bp-based frame

sub_4D81F0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 4
lea	ecx, [ebp+arg_0]
call	sub_AD3670
mov	esp, ebp
pop	ebp
retn	4
sub_4D81F0 endp

align 10h


; Attributes: bp-based frame

sub_4D8210 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_C]
add	edx, 40h
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4D8210 endp

; [0000000E BYTES: COLLAPSED FUNCTION _LocaleUpdate::GetLocaleT(void). PRESS KEYPAD "+"	TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D8270 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
push	offset ?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ;	_LocaleUpdate::GetLocaleT(void)
push	100h
push	30h
mov	eax, [ebp+var_10]
add	eax, 10h
push	eax
call	sub_4078B0
mov	ecx, [ebp+var_10]
add	ecx, 3010h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
add	edx, 20h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_C]
add	ecx, 40h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8270 endp

align 10h


; Attributes: bp-based frame

sub_4D82F0 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_4D8270
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D82F0 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D8330 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1472738
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D8354
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D8354:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8330 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D8380 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_147277C
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D83A4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D83A4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8380 endp

align 10h


; Attributes: bp-based frame

sub_4D83B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FD73A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D83D3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D83D3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D83B0 endp

align 10h
; [00000017 BYTES: COLLAPSED FUNCTION std::ios_base::ios_base(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D8400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3
shl	eax, 2
mov	ecx, [ebp+var_4]
fld	dword ptr [ecx+eax]
mov	esp, ebp
pop	ebp
retn
sub_4D8400 endp

align 10h


; Attributes: bp-based frame

sub_4D8420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+34h]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D8420 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION unknown_libname_7. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D8460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+0C4h]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D8460 endp

align 10h


; Attributes: bp-based frame

sub_4D8480 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
shl	eax, 4
mov	ecx, [ebp+var_4]
mov	edx, [ecx+18h]
mov	eax, [eax+edx]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8480 endp

align 10h


; Attributes: bp-based frame

sub_4D84A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 2Ch
mov	esp, ebp
pop	ebp
retn
sub_4D84A0 endp

align 10h


; Attributes: bp-based frame

sub_4D84C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+arg_0]
call	sub_AD60E0
mov	eax, [ebp+var_24]
add	eax, 0Ch
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	eax, [ebp+var_20]
cmp	[eax+4], edx
jnz	short loc_4D8516
push	4
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_121B830
add	esp, 0Ch

loc_4D8516:
xor	eax, eax
mov	[ebp+var_D], al
mov	cl, [ebp+var_D]
mov	[ebp+var_19], cl
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
lea	eax, [edx+eax*4]
mov	[ebp+var_18], eax
mov	[ebp+var_14], 0
jmp	short loc_4D8544

loc_4D853B:
mov	ecx, [ebp+var_14]
add	ecx, 1
mov	[ebp+var_14], ecx

loc_4D8544:
cmp	[ebp+var_14], 1
jge	short loc_4D8558
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	[eax+edx*4], ecx
jmp	short loc_4D853B

loc_4D8558:
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
add	eax, 1
mov	ecx, [ebp+var_20]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn	4
sub_4D84C0 endp

align 10h


; Attributes: bp-based frame

sub_4D8570 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_19 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D8595
push	60h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4D8595:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8570 endp

align 10h


; Attributes: bp-based frame

sub_4D85A0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4D85A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 40h
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
add	eax, 0Ch
mov	[ebp+var_2C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
call	sub_AD5DD0
mov	[ebp+var_14], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+10h]
mov	[ebp+var_18], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_2C]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4D862F
mov	edx, [ebp+var_2C]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	[ebp+var_20], 10h
mov	eax, [ebp+var_28]
shl	eax, 4
push	eax
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	ecx, [ebp+var_18]
mov	edx, [eax+10h]
call	edx

loc_4D862F:
mov	eax, [ebp+var_2C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+8], 80000000h
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_2D], dl
call	sub_AD5DD0
mov	[ebp+var_34], eax
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
mov	[ebp+var_38], ecx
xor	edx, edx
mov	[ebp+var_39], dl
mov	eax, [ebp+var_4C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+8]
and	edx, 80000000h
jnz	short loc_4D86B2
mov	eax, [ebp+var_4C]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	[ebp+var_44], eax
mov	[ebp+var_40], 10h
mov	ecx, [ebp+var_48]
shl	ecx, 4
push	ecx
mov	edx, [ebp+var_44]
push	edx
mov	eax, [ebp+var_38]
mov	edx, [eax]
mov	ecx, [ebp+var_38]
mov	eax, [edx+10h]
call	eax

loc_4D86B2:
mov	ecx, [ebp+var_4C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_4C]
mov	dword ptr [edx+8], 80000000h
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4D85A0 endp

align 10h



sub_4D86E0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
xor	eax, eax
shl	eax, 4
add	eax, [ebx+8]
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ecx], xmm0
mov	edx, 1
shl	edx, 4
add	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, 2
shl	ecx, 4
add	ecx, [ebx+8]
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebx+8]
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [eax+30h]
movaps	xmmword	ptr [ecx+30h], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D86E0 endp

align 10h


; Attributes: bp-based frame

sub_4D8760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [eax+4], xmm0
mov	esp, ebp
pop	ebp
retn
sub_4D8760 endp

align 10h


; Attributes: bp-based frame

sub_4D8780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1472890
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [ecx+4], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D8780 endp

align 10h


; Attributes: bp-based frame

sub_4D87B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1472890
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D87FA
cmp	[ebp+var_C], 0
jz	short loc_4D87FA
call	sub_AD5DD0
mov	[ebp+var_4], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+10h]
mov	[ebp+var_10], ecx
push	8
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx+8]
call	eax

loc_4D87FA:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4D87B0 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D8830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+30h], 0
mov	ecx, 3
shl	ecx, 2
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [edx+ecx+20h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [eax+4], xmm0
mov	esp, ebp
pop	ebp
retn
sub_4D8830 endp

align 10h


; Attributes: bp-based frame

sub_4D8870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1472890
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15F2E08
mov	eax, [ebp+var_4]
mov	dword ptr [eax+30h], 0
mov	ecx, 3
shl	ecx, 2
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [edx+ecx+20h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [eax+4], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D8870 endp

align 10h


; Attributes: bp-based frame

sub_4D88E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15F2E08
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], offset	off_1472890
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4D8933
cmp	[ebp+var_C], 0
jz	short loc_4D8933
call	sub_AD5DD0
mov	[ebp+var_4], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+10h]
mov	[ebp+var_10], edx
push	40h
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	ecx, [ebp+var_10]
mov	eax, [edx+8]
call	eax

loc_4D8933:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4D88E0 endp

align 10h


; Attributes: bp-based frame

sub_4D8940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F2E08
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1472890
mov	esp, ebp
pop	ebp
retn
sub_4D8940 endp

align 10h


; Attributes: bp-based frame

sub_4D8960 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax+30h], 0
setnz	cl
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1]
mov	[edx], al
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8960 endp

align 10h


; Attributes: bp-based frame

sub_4D8990 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_4D8A50
mov	ecx, [ebp+arg_0]
add	ecx, 50h
mov	edx, [ebp+var_C]
add	edx, 50h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+60h]
mov	ecx, [ebp+var_C]
mov	[ecx+60h], eax
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
mov	[edx+68h], ecx
mov	edx, [ebp+arg_0]
mov	al, [edx+6Ch]
mov	ecx, [ebp+var_C]
mov	[ecx+6Ch], al
mov	edx, [ebp+arg_0]
mov	al, [edx+6Dh]
mov	ecx, [ebp+var_C]
mov	[ecx+6Dh], al
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+70h]
mov	[edx+70h], ecx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8990 endp

align 10h


; Attributes: bp-based frame

sub_4D8A10 proc	near

var_1C=	dword ptr -1Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_4D8B00
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+64h], 0
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_4D8990
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8A10 endp

align 10h



sub_4D8A50 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebx+8]
mov	ecx, [eax]
mov	edx, [ebp-4]
mov	[edx], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+4]
mov	edx, [ebp-4]
mov	[edx+4], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+8]
mov	edx, [ebp-4]
mov	[edx+8], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+0Ch]
mov	edx, [ebp-4]
mov	[edx+0Ch], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+10h]
mov	edx, [ebp-4]
mov	[edx+10h], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+14h]
mov	edx, [ebp-4]
mov	[edx+14h], ecx
mov	eax, [ebx+8]
add	eax, 20h
mov	[ebp-8], eax
mov	ecx, [ebp-4]
add	ecx, 20h
mov	[ebp-0Ch], ecx
mov	edx, [ebp-0Ch]
mov	eax, [ebp-8]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [edx], xmm0
mov	ecx, [ebp-8]
mov	edx, [ebp-0Ch]
movaps	xmm0, xmmword ptr [ecx+10h]
movaps	xmmword	ptr [edx+10h], xmm0
mov	eax, [ebp-8]
mov	ecx, [ebp-0Ch]
movaps	xmm0, xmmword ptr [eax+20h]
movaps	xmmword	ptr [ecx+20h], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D8A50 endp

align 10h



sub_4D8B00 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp-4], ecx
mov	eax, [ebx+8]
mov	ecx, [eax]
mov	edx, [ebp-4]
mov	[edx], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+4]
mov	edx, [ebp-4]
mov	[edx+4], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+8]
mov	edx, [ebp-4]
mov	[edx+8], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+0Ch]
mov	edx, [ebp-4]
mov	[edx+0Ch], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+10h]
mov	edx, [ebp-4]
mov	[edx+10h], ecx
mov	eax, [ebx+8]
mov	ecx, [eax+14h]
mov	edx, [ebp-4]
mov	[edx+14h], ecx
mov	eax, [ebx+8]
add	eax, 20h
mov	[ebp-8], eax
mov	ecx, [ebp-4]
add	ecx, 20h
mov	[ebp-0Ch], ecx
mov	edx, [ebp-0Ch]
mov	eax, [ebp-8]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [edx], xmm0
mov	ecx, [ebp-0Ch]
add	ecx, 10h
mov	[ebp-10h], ecx
mov	edx, [ebp-8]
mov	eax, [ebp-10h]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax], xmm0
mov	ecx, [ebp-0Ch]
add	ecx, 20h
mov	[ebp-14h], ecx
mov	edx, [ebp-8]
mov	eax, [ebp-14h]
movaps	xmm0, xmmword ptr [edx+20h]
movaps	xmmword	ptr [eax], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D8B00 endp

align 10h


; Attributes: bp-based frame

sub_4D8BC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+64h], 0
jz	short loc_4D8C02
call	sub_AD5DD0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+10h]
mov	[ebp+var_10], eax
push	200h
mov	ecx, [ebp+var_C]
mov	edx, [ecx+64h]
push	edx
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx+8]
call	eax

loc_4D8C02:
mov	esp, ebp
pop	ebp
retn
sub_4D8BC0 endp

align 10h



sub_4D8C10 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
movss	xmm0, ds:flt_1479C64
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, ds:flt_15BF168
movss	dword ptr [ecx+54h], xmm0
mov	edx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+34h], xmm0
mov	eax, [ebp-4]
movss	xmm0, ds:flt_15FD2C8
movss	dword ptr [eax+50h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, ds:dword_1479C58
movss	dword ptr [ecx+58h], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, dword ptr	ds:xmmword_1479F30
movss	xmm2, ds:dword_1479C54
movss	xmm3, dword ptr	ds:xmmword_1479F30
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-20h], xmm3
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [edx+40h], xmm0
mov	eax, [ebp-4]
movss	xmm0, ds:flt_15FCCD8
movss	dword ptr [eax+38h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, ds:dword_15FCE94
movss	dword ptr [ecx+3Ch], xmm0
mov	edx, [ebp-4]
movss	xmm0, ds:dword_1577A6C
movss	dword ptr [edx+5Ch], xmm0
mov	eax, [ebp-4]
mov	dword ptr [eax], 0
xorps	xmm0, xmm0
movaps	xmmword	ptr [ebp-30h], xmm0
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmmword	ptr [ecx+10h], xmm0
mov	edx, [ebp-4]
movaps	xmm0, ds:xmmword_14EE290
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebp-4]
movss	xmm0, dword_17E66B0
movss	dword ptr [eax+60h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+64h], xmm0
mov	edx, [ebp-4]
mov	dword ptr [edx+68h], 0A0FF0000h
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D8C10 endp

align 10h


; Attributes: bp-based frame

sub_4D8D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_1965B70
mov	esp, ebp
pop	ebp
retn
sub_4D8D50 endp



; Attributes: bp-based frame

; int __stdcall	sub_4D8D60(int,	float, int, __int16)
sub_4D8D60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= word ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_127D840
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1576EE4
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+1Ch], eax
fld	[ebp+arg_4]
fmul	ds:dbl_15FCEC0
fstp	[ebp+var_8]
fld	[ebp+var_8]
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_4286A0
add	esp, 4
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+20h]
mov	edx, [ebp+var_4]
movss	xmm0, [ebp+arg_8]
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_4]
mov	cx, [ebp+arg_C]
mov	[eax+28h], cx
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+2Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+34h], xmm0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+38h], 0
xor	eax, eax
mov	ecx, [ebp+var_4]
mov	[ecx+3Ah], ax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	10h
sub_4D8D60 endp

align 10h


; Attributes: bp-based frame

sub_4D8E10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_127D800
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D8E5F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4D8E5F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D8E10 endp

align 10h
; [0000000D BYTES: COLLAPSED FUNCTION unknown_libname_8. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D8E80 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_10], ecx
mov	esi, [ebp+var_10]
call	sub_A6A1F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D8ED0
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4D8ED0:
mov	eax, [ebp+var_10]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4D8E80 endp

align 10h


; Attributes: bp-based frame

sub_4D8EE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+24h]
call	eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D8EE0 endp

align 10h


; Attributes: bp-based frame

sub_4D8F10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+28h]
call	eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D8F10 endp

align 10h


; Attributes: bp-based frame

sub_4D8F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4D8F40 endp

align 10h



sub_4D8F50 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp-4], ecx
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, ds:dword_1479C54
movss	xmm2, ds:dword_1479C54
movss	xmm3, ds:dword_1479C54
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-20h], xmm3
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [eax], xmm0
mov	ecx, [ebp-4]
mov	dword ptr [ecx+10h], 2
mov	edx, [ebp-4]
mov	dword ptr [edx+14h], 2
mov	eax, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+18h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+1Ch], xmm0
mov	edx, [ebp-4]
add	edx, 20h
mov	[ebp-24h], edx
mov	eax, [ebp-24h]
mov	byte ptr [eax],	0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D8F50 endp



; Attributes: bp-based frame

sub_4D8FF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+60h]
mov	[ebp+var_C], ecx
call	sub_AD5DD0
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
mov	eax, [edx+10h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
call	sub_AD5D00
add	esp, 8
mov	eax, [ebp+var_10]
mov	dword ptr [eax+60h], 0
mov	esp, ebp
pop	ebp
retn
sub_4D8FF0 endp

align 10h


; Attributes: bp-based frame

sub_4D9040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FC2950
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9063
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9063:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9040 endp

align 10h


; Attributes: bp-based frame

sub_4D9070 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_C], edx
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_20]
mov	eax, [edx+8]
and	eax, 80000000h
jnz	short loc_4D90DE
mov	ecx, [ebp+var_20]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	[ebp+var_14], 1
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	ecx, [ebp+var_C]
mov	eax, [edx+10h]
call	eax

loc_4D90DE:
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_20]
mov	dword ptr [edx+8], 80000000h
mov	esp, ebp
pop	ebp
retn
sub_4D9070 endp

align 10h


; Attributes: bp-based frame

sub_4D9100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+6], dx
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15F76D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D9100 endp

align 10h


; Attributes: bp-based frame

sub_4D9140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F76D8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4D9140 endp

align 10h


; Attributes: bp-based frame

sub_4D9170 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15F76D8
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_146A158
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D91D2
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4D91D2:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9170 endp

align 10h


; Attributes: bp-based frame

sub_4D91E0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
call	sub_4D9240
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D922F
mov	ecx, [ebp+var_34]
mov	[ebp+var_28], ecx
call	sub_AD5DD0
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+10h]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_28]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_34]
push	ecx
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	ecx, [ebp+var_38]
mov	edx, [eax+8]
call	edx

loc_4D922F:
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_4D91E0 endp

align 10h


; Attributes: bp-based frame

sub_4D9240 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
add	eax, 8
mov	[ebp+var_24], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	[ebp+var_14], 0
jmp	short loc_4D927F

loc_4D9276:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_4D927F:
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_14]
cmp	ecx, [eax+4]
jge	short loc_4D928C
jmp	short loc_4D9276

loc_4D928C:
mov	edx, [ebp+var_24]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4D92D9
mov	edx, [ebp+var_24]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	[ebp+var_18], 30h
mov	eax, [ebp+var_20]
imul	eax, 30h
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx

loc_4D92D9:
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+8], 80000000h
mov	edx, [ebp+var_28]
mov	dword ptr [edx], offset	off_146A160
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4D9240 endp

align 10h


; Attributes: bp-based frame

sub_4D9310 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FBC930
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D935F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4D935F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9310 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D9390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F5C6C
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4D93B4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D93B4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9390 endp

align 10h


; Attributes: bp-based frame

sub_4D93C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+80h], 1
mov	esp, ebp
pop	ebp
retn
sub_4D93C0 endp

align 10h


; Attributes: bp-based frame

sub_4D93E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_100C350
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9403
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9403:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D93E0 endp

align 10h
; [00000017 BYTES: COLLAPSED FUNCTION std::ios_base::ios_base(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D9430 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	[ebp+var_8], 0
jmp	short loc_4D9459

loc_4D9450:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_4D9459:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
cmp	ecx, [eax+4]
jge	short loc_4D9466
jmp	short loc_4D9450

loc_4D9466:
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_10]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [eax+4], xmm0
mov	esp, ebp
pop	ebp
retn
sub_4D9430 endp

align 10h


; Attributes: bp-based frame

sub_4D9490 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1472890
mov	ecx, [ebp+var_14]
movss	xmm0, ds:dword_15FCC88
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15F61C8
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	edx, [ebp+var_4]
mov	[edx], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, 8
or	ecx, 80000000h
mov	edx, [ebp+var_4]
mov	[edx+8], ecx
push	offset ?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ;	_LocaleUpdate::GetLocaleT(void)
push	8
push	30h
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax
call	sub_4078B0
mov	ecx, [ebp+var_14]
call	sub_4D9430
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4D9490 endp

align 10h


; Attributes: bp-based frame

sub_4D9510 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_4D9570
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D955C
cmp	[ebp+var_30], 0
jz	short loc_4D955C
call	sub_AD5DD0
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+10h]
mov	[ebp+var_34], eax
push	1A0h
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	ecx, [ebp+var_34]
mov	edx, [eax+8]
call	edx

loc_4D955C:
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9510 endp

align 10h


; Attributes: bp-based frame

sub_4D9570 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_15F61C8
mov	ecx, [ebp+var_28]
add	ecx, 10h
mov	[ebp+var_24], ecx
xor	edx, edx
mov	[ebp+var_1], dl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_D], dl
mov	[ebp+var_14], 0
jmp	short loc_4D95B8

loc_4D95AF:
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_4D95B8:
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_14]
cmp	edx, [ecx+4]
jge	short loc_4D95C5
jmp	short loc_4D95AF

loc_4D95C5:
mov	eax, [ebp+var_24]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_24]
mov	edx, [ecx+8]
and	edx, 80000000h
jnz	short loc_4D9613
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	[ebp+var_18], 30h
mov	ecx, [ebp+var_20]
imul	ecx, 30h
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_C]
mov	edx, [eax]
mov	ecx, [ebp+var_C]
mov	eax, [edx+10h]
call	eax

loc_4D9613:
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_24]
mov	dword ptr [edx+8], 80000000h
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_1472890
mov	esp, ebp
pop	ebp
retn
sub_4D9570 endp

align 10h


; Attributes: bp-based frame

sub_4D9640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+14h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
setnle	dl
mov	eax, [ebp+arg_0]
mov	[eax], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9640 endp

align 10h


; Attributes: bp-based frame

sub_4D9670 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FC1370
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9693
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9693:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9670 endp

align 10h


; Attributes: bp-based frame

sub_4D96A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+24h]
mov	esp, ebp
pop	ebp
retn
sub_4D96A0 endp

align 10h


; Attributes: bp-based frame

sub_4D96C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+28h]
mov	esp, ebp
pop	ebp
retn
sub_4D96C0 endp

align 10h


; Attributes: bp-based frame

sub_4D96E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+2Ch]
mov	esp, ebp
pop	ebp
retn
sub_4D96E0 endp

align 10h


; Attributes: bp-based frame

sub_4D9700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+34h]
mov	esp, ebp
pop	ebp
retn
sub_4D9700 endp

align 10h


; Attributes: bp-based frame

sub_4D9720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+58h]
mov	esp, ebp
pop	ebp
retn
sub_4D9720 endp

align 10h


; Attributes: bp-based frame

sub_4D9740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+3Ch]
mov	esp, ebp
pop	ebp
retn
sub_4D9740 endp

align 10h


; Attributes: bp-based frame

sub_4D9760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+38h]
mov	esp, ebp
pop	ebp
retn
sub_4D9760 endp

align 10h


; Attributes: bp-based frame

sub_4D9780 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax+59h], cl
mov	esp, ebp
pop	ebp
retn	4
sub_4D9780 endp

align 10h


; Attributes: bp-based frame

sub_4D97A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 78h
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4D97A0 endp

align 10h


; Attributes: bp-based frame

sub_4D97D0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax+71h], cl
mov	esp, ebp
pop	ebp
retn	4
sub_4D97D0 endp

align 10h


; Attributes: bp-based frame

sub_4D97F0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax+5Ah], cl
mov	esp, ebp
pop	ebp
retn	4
sub_4D97F0 endp

align 10h


; Attributes: bp-based frame

sub_4D9810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+64h]
mov	esp, ebp
pop	ebp
retn
sub_4D9810 endp

align 10h


; Attributes: bp-based frame

sub_4D9830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+65h]
mov	esp, ebp
pop	ebp
retn
sub_4D9830 endp

align 10h


; Attributes: bp-based frame

sub_4D9850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+68h]
mov	esp, ebp
pop	ebp
retn
sub_4D9850 endp

align 10h


; Attributes: bp-based frame

sub_4D9870 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9870 endp

align 10h


; Attributes: bp-based frame

sub_4D98A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+8Ch], 0
setnz	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn
sub_4D98A0 endp

align 10h


; Attributes: bp-based frame

sub_4D98C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+50h], 1
mov	esp, ebp
pop	ebp
retn
sub_4D98C0 endp

align 10h


; Attributes: bp-based frame

sub_4D98E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	ecx		; float
fldz
fstp	[esp+8+var_8]
mov	eax, [ebp+var_4]
push	ecx		; float
fld	dword ptr [eax+20h]
fstp	[esp+0Ch+var_C]
push	ecx		; float
fldz
fstp	[esp+10h+var_10]
mov	ecx, [ebp+arg_0]
call	sub_40F570
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4D98E0 endp

align 10h


; Attributes: bp-based frame

sub_4D9910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+1Ch]
mov	esp, ebp
pop	ebp
retn
sub_4D9910 endp

align 10h


; Attributes: bp-based frame

sub_4D9930 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+20h]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9930 endp

align 10h


; Attributes: bp-based frame

sub_4D9950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+88h]
mov	esp, ebp
pop	ebp
retn
sub_4D9950 endp

align 10h


; Attributes: bp-based frame

sub_4D9970 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax+64h], cl
mov	esp, ebp
pop	ebp
retn	4
sub_4D9970 endp

align 10h


; Attributes: bp-based frame

sub_4D9990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 20h
mov	esp, ebp
pop	ebp
retn
sub_4D9990 endp

align 10h


; Attributes: bp-based frame

sub_4D99B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+14h]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D99B0 endp

align 10h


; Attributes: bp-based frame

sub_4D99D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 30h
mov	esp, ebp
pop	ebp
retn
sub_4D99D0 endp

align 10h



sub_4D99F0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp-4], ecx
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	xmm1, dword ptr	ds:xmmword_1479F30
movss	xmm2, ds:dword_1479C54
movss	xmm3, dword ptr	ds:xmmword_1479F30
unpcklps xmm3, xmm1
unpcklps xmm2, xmm0
unpcklps xmm3, xmm2
movaps	xmmword	ptr [ebp-20h], xmm3
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [eax+30h], xmm0
movss	xmm0, ds:dword_1480254
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [ebp-30h], xmm0
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmmword	ptr [ecx+20h], xmm0
xorps	xmm0, xmm0
movaps	xmmword	ptr [ebp-40h], xmm0
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [edx], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4D99F0 endp

align 10h


; Attributes: bp-based frame

sub_4D9A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4D9A80 endp



; Attributes: bp-based frame

sub_4D9A90 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_A6C7E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9ADF
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4D9ADF:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9A90 endp

align 10h


; Attributes: bp-based frame

sub_4D9AF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FC2820
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9B13
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9B13:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9AF0 endp

align 10h


; Attributes: bp-based frame

sub_4D9B20 proc	near

var_28=	dword ptr -28h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
add	ecx, 40h
call	sub_4D7DA0
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn
sub_4D9B20 endp

align 10h


; Attributes: bp-based frame

sub_4D9B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1480254
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1480254
movss	dword ptr [ecx+14h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D9B40 endp

align 10h



sub_4D9B70 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
fld	dword ptr [edx+20h]
fstp	dword ptr [ecx+20h]
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
fld	dword ptr [ecx+24h]
fstp	dword ptr [eax+24h]
mov	edx, [ebp-4]
mov	eax, [ebx+8]
fld	dword ptr [eax+28h]
fstp	dword ptr [edx+28h]
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
fld	dword ptr [edx+2Ch]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D9B70 endp

align 10h



sub_4D9BF0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
mov	eax, [edx+24h]
mov	[ecx+24h], eax
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
mov	eax, [edx+2Ch]
mov	[ecx+2Ch], eax
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D9BF0 endp

align 10h



sub_4D9C70 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax+10h], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4D9C70 endp

align 10h
; [0000000D BYTES: COLLAPSED FUNCTION std::codecvt_base::do_always_noconv(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D9CD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1576E64
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_146A158
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9D32
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4D9D32:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9CD0 endp

align 10h


; Attributes: bp-based frame

sub_4D9D40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_100BEE0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9D63
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9D63:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9D40 endp

align 10h


; Attributes: bp-based frame

sub_4D9D70 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
add	ecx, 1C0h
call	sub_488E60
mov	ecx, [ebp+var_30]
add	ecx, 1A8h
call	sub_488E60
mov	ecx, [ebp+var_30]
call	sub_4D9570
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9DD8
cmp	[ebp+var_30], 0
jz	short loc_4D9DD8
call	sub_AD5DD0
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+10h]
mov	[ebp+var_34], eax
push	1E0h
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	ecx, [ebp+var_34]
mov	edx, [eax+8]
call	edx

loc_4D9DD8:
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9D70 endp

align 10h


; Attributes: bp-based frame

sub_4D9DF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4D9DF0 endp

align 10h


; Attributes: bp-based frame

sub_4D9E20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FC0D40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9E6F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4D9E6F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9E20 endp

align 10h


; Attributes: bp-based frame

sub_4D9E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1472758
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1472738
mov	esp, ebp
pop	ebp
retn
sub_4D9E80 endp

align 10h


; Attributes: bp-based frame

sub_4D9EA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1472758
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1472738
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4D9ECD
mov	eax, [ebp+var_4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9ECD:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9EA0 endp

align 10h


; Attributes: bp-based frame

sub_4D9EE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FC0CB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9F03
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9F03:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9EE0 endp

align 10h
; [00000017 BYTES: COLLAPSED FUNCTION std::ios_base::ios_base(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D9F30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FBAD00
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9F53
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9F53:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9F30 endp

align 10h


; Attributes: bp-based frame

sub_4D9F60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FD0C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4D9F83
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4D9F83:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4D9F60 endp

align 10h
; [00000017 BYTES: COLLAPSED FUNCTION std::ios_base::ios_base(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4D9FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 0FFFFFFFFh
mov	esp, ebp
pop	ebp
retn
sub_4D9FB0 endp

align 10h


; Attributes: bp-based frame

sub_4D9FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4D9FE0 endp

align 10h


; Attributes: bp-based frame

sub_4DA010 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	0
mov	esp, ebp
pop	ebp
retn
sub_4DA010 endp

align 10h


; Attributes: bp-based frame

sub_4DA030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1472880
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4DA030 endp

align 10h


; Attributes: bp-based frame

sub_4DA060 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1472880
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4DA0AA
cmp	[ebp+var_C], 0
jz	short loc_4DA0AA
call	sub_AD5DD0
mov	[ebp+var_4], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+10h]
mov	[ebp+var_10], ecx
push	8
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx+8]
call	eax

loc_4DA0AA:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA060 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4DA0E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	[ebp+var_8], 0
jmp	short loc_4DA109

loc_4DA100:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_4DA109:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
cmp	ecx, [eax+4]
jge	short loc_4DA116
jmp	short loc_4DA100

loc_4DA116:
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx],	0
mov	esp, ebp
pop	ebp
retn
sub_4DA0E0 endp

align 10h


; Attributes: bp-based frame

sub_4DA140 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1472880
mov	ecx, [ebp+var_1C]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_15768EC
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
add	edx, 0Ch
mov	eax, [ebp+var_8]
mov	[eax], edx
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+4], 0
mov	edx, 10h
or	edx, 80000000h
mov	eax, [ebp+var_8]
mov	[eax+8], edx
mov	ecx, [ebp+var_1C]
call	sub_4DA0E0
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_4DA140 endp

align 10h


; Attributes: bp-based frame

sub_4DA1B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_4DA210
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DA1FC
cmp	[ebp+var_30], 0
jz	short loc_4DA1FC
call	sub_AD5DD0
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+10h]
mov	[ebp+var_34], eax
push	114h
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	ecx, [ebp+var_34]
mov	edx, [eax+8]
call	edx

loc_4DA1FC:
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA1B0 endp

align 10h


; Attributes: bp-based frame

sub_4DA210 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_15768EC
mov	ecx, [ebp+var_28]
add	ecx, 8
mov	[ebp+var_24], ecx
xor	edx, edx
mov	[ebp+var_1], dl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_D], dl
mov	[ebp+var_14], 0
jmp	short loc_4DA258

loc_4DA24F:
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_4DA258:
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_14]
cmp	edx, [ecx+4]
jge	short loc_4DA265
jmp	short loc_4DA24F

loc_4DA265:
mov	eax, [ebp+var_24]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_24]
mov	edx, [ecx+8]
and	edx, 80000000h
jnz	short loc_4DA2B3
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	[ebp+var_18], 10h
mov	ecx, [ebp+var_20]
shl	ecx, 4
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_C]
mov	edx, [eax]
mov	ecx, [ebp+var_C]
mov	eax, [edx+10h]
call	eax

loc_4DA2B3:
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_24]
mov	dword ptr [edx+8], 80000000h
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_1472880
mov	esp, ebp
pop	ebp
retn
sub_4DA210 endp

align 10h


; Attributes: bp-based frame

sub_4DA2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	dword ptr [edx+40h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+20h], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+50h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DA2E0 endp

align 10h


; Attributes: bp-based frame

sub_4DA330 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax+50h], 0
setnz	cl
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1]
mov	[edx], al
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA330 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4DA380 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F23D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4DA3A4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DA3A4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA380 endp

align 10h


; Attributes: bp-based frame

sub_4DA3B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+4], xmm0
mov	esp, ebp
pop	ebp
retn
sub_4DA3B0 endp

align 10h


; Attributes: bp-based frame

sub_4DA3D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15F23D0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+4], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DA3D0 endp

align 10h


; Attributes: bp-based frame

sub_4DA400 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	[ebp+var_8], 0
jmp	short loc_4DA429

loc_4DA420:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_4DA429:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
cmp	ecx, [eax+4]
jge	short loc_4DA436
jmp	short loc_4DA420

loc_4DA436:
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_10]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+4], xmm0
mov	esp, ebp
pop	ebp
retn
sub_4DA400 endp

align 10h


; Attributes: bp-based frame

sub_4DA460 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15F23D0
mov	ecx, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15768F8
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	edx, [ebp+var_4]
mov	[edx], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, 8
or	ecx, 80000000h
mov	edx, [ebp+var_4]
mov	[edx+8], ecx
push	offset sub_4DA2E0
push	8
push	60h
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax
call	sub_4078B0
mov	ecx, [ebp+var_14]
call	sub_4DA400
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4DA460 endp

align 10h


; Attributes: bp-based frame

sub_4DA4E0 proc	near

var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_4DA510
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DA505
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DA505:
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA4E0 endp

align 10h


; Attributes: bp-based frame

sub_4DA510 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_15768F8
mov	ecx, [ebp+var_28]
add	ecx, 10h
mov	[ebp+var_24], ecx
xor	edx, edx
mov	[ebp+var_1], dl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_D], dl
mov	[ebp+var_14], 0
jmp	short loc_4DA558

loc_4DA54F:
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_4DA558:
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_14]
cmp	edx, [ecx+4]
jge	short loc_4DA565
jmp	short loc_4DA54F

loc_4DA565:
mov	eax, [ebp+var_24]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_24]
mov	edx, [ecx+8]
and	edx, 80000000h
jnz	short loc_4DA5B3
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	[ebp+var_18], 60h
mov	ecx, [ebp+var_20]
imul	ecx, 60h
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_C]
mov	edx, [eax]
mov	ecx, [ebp+var_C]
mov	eax, [edx+10h]
call	eax

loc_4DA5B3:
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_24]
mov	dword ptr [edx+8], 80000000h
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_15F23D0
mov	esp, ebp
pop	ebp
retn
sub_4DA510 endp

align 10h


; Attributes: bp-based frame

sub_4DA5E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FCFB60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DA603
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DA603:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA5E0 endp

align 10h


; Attributes: bp-based frame

sub_4DA610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+6], dx
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15CF080
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DA610 endp

align 10h


; Attributes: bp-based frame

sub_4DA650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146A160
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4DA650 endp

align 10h


; Attributes: bp-based frame

sub_4DA670 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax+8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+8]
mov	[ebp+var_20], edx
xor	eax, eax
mov	[ebp+var_5], al
call	sub_AD5DD0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
cmp	edx, [ebp+var_24]
jge	short loc_4DA6FE
mov	eax, [ebp+var_14]
shl	eax, 1
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_1C]
jge	short loc_4DA6DC
mov	edx, [ebp+var_1C]
mov	[ebp+var_38], edx
jmp	short loc_4DA6E2

loc_4DA6DC:
mov	eax, [ebp+var_24]
mov	[ebp+var_38], eax

loc_4DA6E2:
mov	ecx, [ebp+var_38]
mov	[ebp+var_18], ecx
push	1
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_121B8C0
add	esp, 10h

loc_4DA6FE:
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+8]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_2C]
add	eax, [ebp+var_30]
mov	byte ptr [eax],	0
mov	esp, ebp
pop	ebp
retn
sub_4DA670 endp

align 10h


; Attributes: bp-based frame

sub_4DA730 proc	near

var_38=	dword ptr -38h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+var_38]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, 1
mov	eax, [ebp+var_38]
mov	[eax+6], dx
mov	ecx, [ebp+var_38]
mov	dword ptr [ecx], offset	off_15CF080
mov	edx, [ebp+var_38]
mov	dword ptr [edx], offset	off_15CF0A8
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	[eax+8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_4]
mov	[eax+10h], ecx
mov	ecx, [ebp+var_38]
call	sub_4DA670
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	8
sub_4DA730 endp

align 10h


; Attributes: bp-based frame

sub_4DA7A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_15CF0A8
mov	ecx, [ebp+var_30]
cmp	dword ptr [ecx+10h], 0
jnz	short loc_4DA7E6
mov	edx, [ebp+var_30]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_4DA7DF
push	1
mov	ecx, [ebp+var_4]
call	sub_4DA890
mov	[ebp+var_34], eax
jmp	short loc_4DA7E6

loc_4DA7DF:
mov	[ebp+var_34], 0

loc_4DA7E6:
mov	edx, [ebp+var_30]
mov	dword ptr [edx], offset	off_146A160
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4DA7A0 endp

align 10h


; Attributes: bp-based frame

sub_4DA800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	byte ptr [eax],	1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA800 endp

align 10h


; Attributes: bp-based frame

sub_4DA820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_189641C
mov	esp, ebp
pop	ebp
retn
sub_4DA820 endp



; Attributes: bp-based frame

sub_4DA830 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
call	sub_4DA7A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DA87F
mov	ecx, [ebp+var_3C]
mov	[ebp+var_30], ecx
call	sub_AD5DD0
mov	[ebp+var_34], eax
mov	edx, [ebp+var_38]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_30]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	ecx, [ebp+var_40]
mov	edx, [eax+8]
call	edx

loc_4DA87F:
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA830 endp

align 10h


; Attributes: bp-based frame

sub_4DA890 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_1], al
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_28]
mov	eax, [edx+8]
and	eax, 80000000h
jnz	short loc_4DA8FE
mov	ecx, [ebp+var_28]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	[ebp+var_14], 1
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	ecx, [ebp+var_C]
mov	eax, [edx+10h]
call	eax

loc_4DA8FE:
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_28]
mov	dword ptr [edx+8], 80000000h
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DA949
cmp	[ebp+var_28], 0
jz	short loc_4DA949
call	sub_AD5DD0
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx+10h]
mov	[ebp+var_2C], eax
push	0Ch
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	ecx, [ebp+var_2C]
mov	edx, [eax+8]
call	edx

loc_4DA949:
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA890 endp

align 10h


; Attributes: bp-based frame

sub_4DA960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_4DA984
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_AD6020

loc_4DA984:
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_AD3ED0
mov	ecx, [ebp+var_8]
call	sub_AD3ED0
mov	esp, ebp
pop	ebp
retn
sub_4DA960 endp

align 10h


; Attributes: bp-based frame

sub_4DA9B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_AD3EA0
mov	ecx, [ebp+arg_0]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_10]
add	ecx, 4
call	sub_AD3EA0
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_4DAA21
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4DAA07
mov	ecx, [ebp+var_4]
call	sub_AD60E0

loc_4DAA07:
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_4DAA19
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_AD6020

loc_4DAA19:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
mov	[eax], ecx

loc_4DAA21:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DA9B0 endp

align 10h


; Attributes: bp-based frame

sub_4DAA30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_14], ecx
push	0
push	0
mov	esi, [ebp+var_14]
call	sub_121A080
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15767A0
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx],	0
push	2FF8C16Fh
mov	ecx, [ebp+var_14]
call	sub_121A030
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	byte ptr [edx],	0
push	6E8D163Bh
mov	ecx, [ebp+var_14]
call	sub_121A030
mov	eax, [ebp+var_14]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4DAA30 endp

align 10h


; Attributes: bp-based frame

sub_4DAA90 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_82=	byte ptr -82h
var_81=	byte ptr -81h
var_80=	byte ptr -80h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_58=	byte ptr -58h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_94], ecx
cmp	[ebp+arg_4], 0FFFFFFFFh
jnz	short loc_4DAAE4
mov	eax, [ebp+var_94]
mov	ecx, [eax+18h]
mov	[ebp+var_88], ecx
cmp	[ebp+var_88], 0
jz	short loc_4DAAE4
mov	edx, [ebp+var_94]
add	edx, 14h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8C]
mov	eax, [edx]
mov	ecx, [eax+ecx*4-4]
mov	[ebp+arg_4], ecx

loc_4DAAE4:
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_81]
push	eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	ecx, [ebp+var_94]
mov	eax, [edx+14h]
call	eax
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
movzx	edx, byte ptr [ecx]
neg	edx
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_4DAB25
xor	eax, eax
jmp	loc_4DAC3D

loc_4DAB25:
mov	[ebp+var_8], 2
mov	[ebp+var_9], 0
mov	ecx, [ebp+arg_0]
mov	[ebp+var_98], ecx
cmp	[ebp+var_98], 1
jz	short loc_4DAB56
cmp	[ebp+var_98], 2
jz	short loc_4DAB5F
cmp	[ebp+var_98], 3
jz	short loc_4DAB68
jmp	short loc_4DAB73

loc_4DAB56:
mov	[ebp+var_8], 3
jmp	short loc_4DAB73

loc_4DAB5F:
mov	[ebp+var_8], 5
jmp	short loc_4DAB73

loc_4DAB68:
mov	[ebp+var_8], 5
mov	[ebp+var_9], 1

loc_4DAB73:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, dword ptr [ebp+arg_C]
push	edx		; char
push	offset aSD0xXS	; "%S(%d): [0x%x] : '%S'"
push	40h		; int
mov	eax, [ebp+var_8]
push	eax		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED8B0
add	esp, 20h
mov	[ebp+var_1], al
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	loc_4DAC3B
movzx	edx, [ebp+var_9]
neg	edx
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_4DAC3B
call	sub_AD43E0
mov	[ebp+var_68], eax
call	sub_AD4040
mov	[ebp+var_64], eax
cmp	[ebp+var_64], 2
jle	short loc_4DAC3B
lea	ecx, [ebp+var_82]
call	sub_401EF0
push	eax
push	offset aStackTraceIs ; "Stack trace is:\n"
lea	ecx, [ebp+var_80]
call	sub_407D30
lea	ecx, [ebp+var_82]
call	nullsub_1
lea	ecx, [ebp+var_80]
push	ecx
push	offset __initp_misc_winxfltr_16
mov	edx, [ebp+var_64]
sub	edx, 2
push	edx
lea	eax, [ebp+var_58]
push	eax
mov	ecx, [ebp+var_68]
push	ecx
call	sub_AD4050
lea	ecx, [ebp+var_80]
call	sub_5F52F0
push	eax		; char
push	offset aS	; "%S"
mov	edx, [ebp+var_8]
push	edx		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h
lea	ecx, [ebp+var_80]
call	sub_407910

loc_4DAC3B:
xor	eax, eax

loc_4DAC3D:
mov	esp, ebp
pop	ebp
retn	14h
sub_4DAA90 endp

align 10h


; Attributes: bp-based frame

sub_4DAC50 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
call	sub_4DACB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DAC9F
mov	ecx, [ebp+var_3C]
mov	[ebp+var_30], ecx
call	sub_AD5DD0
mov	[ebp+var_34], eax
mov	edx, [ebp+var_38]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_30]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	ecx, [ebp+var_40]
mov	edx, [eax+8]
call	edx

loc_4DAC9F:
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_4DAC50 endp

align 10h


; Attributes: bp-based frame

sub_4DACB0 proc	near

var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
add	eax, 14h
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+var_20]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_20]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4DAD2A
mov	edx, [ebp+var_20]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	[ebp+var_14], 4
mov	eax, [ebp+var_1C]
shl	eax, 2
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx

loc_4DAD2A:
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+8], 80000000h
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_4DCDB0
mov	edx, [ebp+var_30]
mov	dword ptr [edx], offset	off_146A160
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4DACB0 endp

align 10h


; Attributes: bp-based frame

sub_4DAD60 proc	near

var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_4DCDB0
mov	esp, ebp
pop	ebp
retn
sub_4DAD60 endp

align 10h


; Attributes: bp-based frame

sub_4DAD80 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+6], dx
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], offset	off_15F7570
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 80000000h
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15F755C
mov	ecx, [ebp+var_C]
add	ecx, 14h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 80000000h
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4DAD80 endp

align 10h


; Attributes: bp-based frame

sub_4DAE10 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
call	sub_4DAE70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DAE5F
mov	ecx, [ebp+var_58]
mov	[ebp+var_4C], ecx
call	sub_AD5DD0
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax+10h]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_4C]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_58]
push	ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	ecx, [ebp+var_5C]
mov	edx, [eax+8]
call	edx

loc_4DAE5F:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_4DAE10 endp

align 10h


; Attributes: bp-based frame

sub_4DAE70 proc	near

var_4C=	dword ptr -4Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
add	eax, 14h
mov	[ebp+var_24], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	[ebp+var_14], 0
jmp	short loc_4DAEAF

loc_4DAEA6:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_4DAEAF:
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_14]
cmp	ecx, [eax+4]
jge	short loc_4DAEBC
jmp	short loc_4DAEA6

loc_4DAEBC:
mov	edx, [ebp+var_24]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4DAF09
mov	edx, [ebp+var_24]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	[ebp+var_18], 0Ch
mov	eax, [ebp+var_20]
imul	eax, 0Ch
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx

loc_4DAF09:
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+8], 80000000h
mov	ecx, [ebp+var_4C]
call	sub_4D9240
mov	esp, ebp
pop	ebp
retn
sub_4DAE70 endp

align 10h


; Attributes: bp-based frame

sub_4DAF30 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
call	sub_4DAF90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DAF7F
mov	ecx, [ebp+var_1C]
mov	[ebp+var_10], ecx
call	sub_AD5DD0
mov	[ebp+var_14], eax
mov	edx, [ebp+var_18]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [ebp+var_20]
mov	edx, [eax+8]
call	edx

loc_4DAF7F:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	4
sub_4DAF30 endp

align 10h


; Attributes: bp-based frame

sub_4DAF90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 1Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_4DAFDC
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_C]
mov	ecx, [edx+10h]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4DAFDC
mov	ecx, [ebp+var_8]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4DAFDC:
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_146A160
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4DAF90 endp

align 10h


; Attributes: bp-based frame

sub_4DB000 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_18], ecx
call	sub_AD5DD0
mov	[ebp+var_10], eax
mov	eax, [ebp+var_14]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
mov	[ebp+var_1C], edx
push	14h
mov	eax, [ebp+var_1C]
mov	edx, [eax]
mov	ecx, [ebp+var_1C]
mov	eax, [edx+4]
call	eax
mov	[ebp+var_C], eax
mov	ecx, 14h
mov	edx, [ebp+var_C]
mov	[edx+4], cx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4DB082
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_146A158
mov	edx, [ebp+var_8]
mov	dword ptr [edx], offset	off_146A160
mov	eax, 1
mov	ecx, [ebp+var_8]
mov	[ecx+6], ax
mov	edx, [ebp+var_8]
mov	dword ptr [edx], offset	off_15F76D8
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1576814
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
jmp	short loc_4DB089

loc_4DB082:
mov	[ebp+var_20], 0

loc_4DB089:
mov	edx, [ebp+var_20]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4DB130
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DB000 endp

align 10h


; Attributes: bp-based frame

sub_4DB0B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1576814
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_15F76D8
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_146A160
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4DB11B
mov	edx, [ebp+var_10]
mov	[ebp+var_4], edx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_4]
movzx	ecx, word ptr [eax+4]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_14]
mov	edx, [eax]
mov	ecx, [ebp+var_14]
mov	eax, [edx+8]
call	eax

loc_4DB11B:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB0B0 endp

align 10h


; Attributes: bp-based frame

sub_4DB130 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+4]
mov	[eax+4], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+6]
mov	[eax+6], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edx+0Ch]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+10h]
mov	eax, [ebp+var_4]
mov	[eax+10h], dl
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+11h]
mov	eax, [ebp+var_4]
mov	[eax+11h], dl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB130 endp

align 10h


; Attributes: bp-based frame

sub_4DB190 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+4]
mov	[eax+4], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+6]
mov	[eax+6], dx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB190 endp

align 10h


; Attributes: bp-based frame

sub_4DB1C0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
call	sub_4DB220
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DB20F
mov	ecx, [ebp+var_34]
mov	[ebp+var_28], ecx
call	sub_AD5DD0
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+10h]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_28]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_34]
push	ecx
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	ecx, [ebp+var_38]
mov	edx, [eax+8]
call	edx

loc_4DB20F:
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB1C0 endp

align 10h


; Attributes: bp-based frame

sub_4DB220 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
add	eax, 8
mov	[ebp+var_24], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	[ebp+var_14], 0
jmp	short loc_4DB25F

loc_4DB256:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_4DB25F:
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_14]
cmp	ecx, [eax+4]
jge	short loc_4DB26C
jmp	short loc_4DB256

loc_4DB26C:
mov	edx, [ebp+var_24]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4DB2B9
mov	edx, [ebp+var_24]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	[ebp+var_18], 0Ch
mov	eax, [ebp+var_20]
imul	eax, 0Ch
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx

loc_4DB2B9:
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+8], 80000000h
mov	edx, [ebp+var_28]
mov	dword ptr [edx], offset	off_146A160
mov	eax, [ebp+var_28]
mov	dword ptr [eax], offset	off_146A158
mov	esp, ebp
pop	ebp
retn
sub_4DB220 endp

align 10h



sub_4DB2F0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp-4], ecx
xorps	xmm0, xmm0
movaps	xmmword	ptr [ebp-20h], xmm0
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [eax], xmm0
xorps	xmm0, xmm0
movaps	xmmword	ptr [ebp-30h], xmm0
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmmword	ptr [ecx+10h], xmm0
xorps	xmm0, xmm0
movaps	xmmword	ptr [ebp-40h], xmm0
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+38h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+3Ch], xmm0
mov	edx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+40h], xmm0
mov	eax, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+44h], xmm0
mov	ecx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+48h], xmm0
mov	edx, [ebp-4]
mov	byte ptr [edx+50h], 0
mov	eax, [ebp-4]
mov	dword ptr [eax+30h], 0
mov	ecx, [ebp-4]
mov	dword ptr [ecx+34h], 0
mov	edx, [ebp-4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+4Ch], xmm0
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn
sub_4DB2F0 endp

align 10h


; Attributes: bp-based frame

sub_4DB3D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_20]
add	ecx, 4
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_20]
add	edx, 1Ch
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4DB3D0 endp

align 10h


; Attributes: bp-based frame

sub_4DB480 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_146A160
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_146A158
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4DB4D9
mov	eax, [ebp+var_10]
mov	[ebp+var_4], eax
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_4]
movzx	edx, word ptr [ecx+4]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
mov	eax, [edx+8]
call	eax

loc_4DB4D9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB480 endp

align 10h


; Attributes: bp-based frame

sub_4DB4F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	esi, [ebp+var_C]
call	sub_11E49C0
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15768A8
xor	ecx, ecx
mov	edx, [ebp+var_C]
mov	[edx+2Ch], cx
mov	eax, [ebp+var_C]
mov	cl, [ebp+arg_0]
mov	[eax+2Eh], cl
movzx	edx, [ebp+arg_0]
push	edx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
mov	[eax+24h], ecx
movzx	eax, [ebp+arg_0]
xor	ecx, ecx
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax+28h], ecx
movzx	edx, [ebp+arg_0]
push	edx		; size_t
push	0		; int
mov	eax, [ebp+var_C]
mov	ecx, [eax+24h]
push	ecx		; void *
call	_memset
add	esp, 0Ch
movzx	edx, [ebp+arg_0]
shl	edx, 2
push	edx		; size_t
push	0		; int
mov	eax, [ebp+var_C]
mov	ecx, [eax+28h]
push	ecx		; void *
call	_memset
add	esp, 0Ch
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4DB4F0 endp

align 10h


; Attributes: bp-based frame

sub_4DB5A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15768A8
mov	ecx, [ebp+var_C]
mov	edx, [ecx+24h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	ecx, [ebp+var_C]
mov	edx, [ecx+28h]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	ecx, [ebp+var_C]
call	sub_11E4920
mov	esp, ebp
pop	ebp
retn
sub_4DB5A0 endp

align 10h


; Attributes: bp-based frame

sub_4DB5F0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_4DB5A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DB63F
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
call	sub_AD5DD0
mov	[ebp+var_10], eax
mov	edx, [ebp+var_14]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+10h]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+8]
call	edx

loc_4DB63F:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB5F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4DB650(float, int, int)
sub_4DB650 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+2Eh]
push	ecx		; size_t
push	0		; int
mov	edx, [ebp+var_4]
mov	eax, [edx+24h]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx+2Eh]
shl	edx, 2
push	edx		; size_t
push	0		; int
mov	eax, [ebp+var_4]
mov	ecx, [eax+28h]
push	ecx		; void *
call	_memset
add	esp, 0Ch
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax+2Ch], dx
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+2Fh], 0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
push	ecx
fld	[ebp+arg_0]
fstp	[esp+10h+var_10]
mov	ecx, [ebp+var_4]
call	sub_11E4C80
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DB650 endp

align 10h


; Attributes: bp-based frame

sub_4DB6C0 proc	near

var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_5C], ecx
movzx	eax, [ebp+arg_4]
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+24h]
mov	byte ptr [eax+edx], 1
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
movzx	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_11E4A30
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+50h]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
movsx	ecx, byte ptr [eax+18h]
cmp	ecx, 1
jnz	short loc_4DB714
mov	edx, [ebp+var_1C]
movsx	eax, byte ptr [edx+10h]
add	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
jmp	short loc_4DB71B

loc_4DB714:
mov	[ebp+var_4], 0

loc_4DB71B:
cmp	[ebp+var_4], 0
jz	loc_4DB8EA
mov	[ebp+var_20], 0
jmp	short loc_4DB737

loc_4DB72E:
mov	ecx, [ebp+var_20]
add	ecx, 1
mov	[ebp+var_20], ecx

loc_4DB737:
mov	edx, [ebp+var_4]
mov	eax, [edx+7Ch]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_20]
cmp	ecx, [ebp+var_24]
jge	short loc_4DB765
mov	edx, [ebp+var_20]
shl	edx, 4
mov	eax, [ebp+var_4]
mov	ecx, [eax+78h]
cmp	dword ptr [edx+ecx], 7D1h
jnz	short loc_4DB763
mov	[ebp+var_25], 1
jmp	short loc_4DB769

loc_4DB763:
jmp	short loc_4DB72E

loc_4DB765:
mov	[ebp+var_25], 0

loc_4DB769:
movzx	edx, [ebp+var_25]
test	edx, edx
jz	loc_4DB885
mov	[ebp+var_34], 0
jmp	short loc_4DB787

loc_4DB77E:
mov	eax, [ebp+var_34]
add	eax, 1
mov	[ebp+var_34], eax

loc_4DB787:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+7Ch]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_34]
cmp	eax, [ebp+var_38]
jge	short loc_4DB7D1
mov	ecx, [ebp+var_34]
shl	ecx, 4
mov	edx, [ebp+var_4]
mov	eax, [edx+78h]
cmp	dword ptr [ecx+eax], 7D1h
jnz	short loc_4DB7CF
mov	ecx, [ebp+var_34]
shl	ecx, 4
mov	edx, [ebp+var_4]
mov	eax, [edx+78h]
mov	edx, [eax+ecx+8]
mov	eax, [eax+ecx+0Ch]
mov	[ebp+var_10], edx
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_10]
mov	[ebp+var_3C], ecx
jmp	short loc_4DB7F1

loc_4DB7CF:
jmp	short loc_4DB77E

loc_4DB7D1:
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
mov	edx, [ebp+var_30]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_10]
mov	[ebp+var_3C], ecx

loc_4DB7F1:
mov	edx, [ebp+var_3C]
cmp	dword ptr [edx], 0
jz	loc_4DB885
mov	[ebp+var_48], 0
jmp	short loc_4DB80F

loc_4DB806:
mov	eax, [ebp+var_48]
add	eax, 1
mov	[ebp+var_48], eax

loc_4DB80F:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+7Ch]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_48]
cmp	eax, [ebp+var_4C]
jge	short loc_4DB859
mov	ecx, [ebp+var_48]
shl	ecx, 4
mov	edx, [ebp+var_4]
mov	eax, [edx+78h]
cmp	dword ptr [ecx+eax], 7D1h
jnz	short loc_4DB857
mov	ecx, [ebp+var_48]
shl	ecx, 4
mov	edx, [ebp+var_4]
mov	eax, [edx+78h]
mov	edx, [eax+ecx+8]
mov	eax, [eax+ecx+0Ch]
mov	[ebp+var_18], edx
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_18]
mov	[ebp+var_50], ecx
jmp	short loc_4DB879

loc_4DB857:
jmp	short loc_4DB806

loc_4DB859:
mov	[ebp+var_44], 0
mov	[ebp+var_40], 0
mov	edx, [ebp+var_44]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_40]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_18]
mov	[ebp+var_50], ecx

loc_4DB879:
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	ecx, [ebp+var_5C]
mov	[ecx+2Ch], ax

loc_4DB885:
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	[edx+90h]
movss	[ebp+var_54], xmm0
movzx	eax, [ebp+arg_4]
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+28h]
movss	xmm0, [ebp+var_54]
movss	dword ptr [edx+eax*4], xmm0
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0
jz	short loc_4DB8EA
mov	eax, [ebp+var_8]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	edx, [ebp+var_60]
mov	eax, [ecx+8]
or	eax, [edx+0Ch]
jnz	short loc_4DB8DD
mov	ecx, [ebp+var_5C]
mov	dl, [ecx+2Fh]
mov	[ebp+var_61], dl
jmp	short loc_4DB8E1

loc_4DB8DD:
mov	[ebp+var_61], 1

loc_4DB8E1:
mov	eax, [ebp+var_5C]
mov	cl, [ebp+var_61]
mov	[eax+2Fh], cl

loc_4DB8EA:
mov	esp, ebp
pop	ebp
retn	10h
sub_4DB6C0 endp



; Attributes: bp-based frame

sub_4DB8F0 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
mov	[ebp+var_1], 0
mov	[ebp+var_2], 0
jmp	short loc_4DB90B

loc_4DB903:
mov	al, [ebp+var_2]
add	al, 1
mov	[ebp+var_2], al

loc_4DB90B:
movzx	ecx, [ebp+var_2]
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2Eh]
cmp	ecx, eax
jge	short loc_4DB944
movzx	ecx, [ebp+var_2]
mov	edx, [ebp+var_8]
mov	eax, [edx+24h]
movzx	ecx, byte ptr [eax+ecx]
test	ecx, ecx
jz	short loc_4DB93C
mov	dl, [ebp+var_1]
mov	[ebp+var_9], dl
mov	al, [ebp+var_1]
add	al, 1
mov	[ebp+var_1], al
jmp	short loc_4DB942

loc_4DB93C:
mov	cl, [ebp+var_1]
mov	[ebp+var_9], cl

loc_4DB942:
jmp	short loc_4DB903

loc_4DB944:
mov	al, [ebp+var_1]
mov	esp, ebp
pop	ebp
retn
sub_4DB8F0 endp

align 10h


; Attributes: bp-based frame

sub_4DB950 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_C], ecx
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_4], xmm0
mov	[ebp+var_5], 0
jmp	short loc_4DB974

loc_4DB96C:
mov	al, [ebp+var_5]
add	al, 1
mov	[ebp+var_5], al

loc_4DB974:
movzx	ecx, [ebp+var_5]
mov	edx, [ebp+var_C]
movzx	eax, byte ptr [edx+2Eh]
cmp	ecx, eax
jge	short loc_4DB998
movzx	ecx, [ebp+var_5]
mov	edx, [ebp+var_C]
mov	eax, [edx+28h]
fld	[ebp+var_4]
fadd	dword ptr [eax+ecx*4]
fstp	[ebp+var_4]
jmp	short loc_4DB96C

loc_4DB998:
mov	ecx, [ebp+var_C]
movzx	edx, byte ptr [ecx+2Eh]
mov	[ebp+var_10], edx
fild	[ebp+var_10]
fdivr	[ebp+var_4]
fstp	[ebp+var_14]
fld	[ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4DB950 endp

align 10h


; Attributes: bp-based frame

sub_4DB9C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FCEDC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DB9E3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DB9E3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB9C0 endp

align 10h


; Attributes: bp-based frame

sub_4DB9F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FE1E40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DBA3F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DBA3F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DB9F0 endp

align 10h


; Attributes: bp-based frame

sub_4DBA50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset ?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ;	_LocaleUpdate::GetLocaleT(void)
push	2
push	60h
mov	eax, [ebp+var_4]
push	eax
call	sub_4078B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DBA50 endp



; Attributes: bp-based frame

sub_4DBA70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 80000000h
mov	ecx, [ebp+var_C]
add	ecx, 14h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 80000000h
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4DBA70 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp-44h], ecx
mov	eax, [ebp-44h]
add	eax, 14h
mov	[ebp-20h], eax
xor	ecx, ecx
mov	[ebp-1], cl
call	sub_AD5DD0
mov	[ebp-8], eax
mov	edx, [ebp-8]
mov	eax, [edx+10h]
mov	[ebp-0Ch], eax
xor	ecx, ecx
mov	[ebp-0Dh], cl
mov	edx, [ebp-20h]
mov	dword ptr [edx+4], 0
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4DBB4A
mov	edx, [ebp-20h]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp-1Ch], eax
mov	ecx, [ebp-20h]
mov	edx, [ecx]
mov	[ebp-18h], edx
mov	dword ptr [ebp-14h], 4
mov	eax, [ebp-1Ch]
shl	eax, 2
push	eax
mov	ecx, [ebp-18h]
push	ecx
mov	edx, [ebp-0Ch]
mov	eax, [edx]
mov	ecx, [ebp-0Ch]
mov	edx, [eax+10h]
call	edx

loc_4DBB4A:
mov	eax, [ebp-20h]
mov	dword ptr [eax], 0
mov	ecx, [ebp-20h]
mov	dword ptr [ecx+8], 80000000h
mov	ecx, [ebp-44h]
call	sub_4DBE20
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_4DBB70 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
add	eax, 0Ch
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+var_20]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_20]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4DBBE7
mov	edx, [ebp+var_20]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	[ebp+var_14], 1
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx

loc_4DBBE7:
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+8], 80000000h
xor	edx, edx
mov	[ebp+var_21], dl
call	sub_AD5DD0
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	ecx, [eax+10h]
mov	[ebp+var_2C], ecx
xor	edx, edx
mov	[ebp+var_2D], dl
mov	eax, [ebp+var_40]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_40]
mov	edx, [ecx+8]
and	edx, 80000000h
jnz	short loc_4DBC63
mov	eax, [ebp+var_40]
mov	ecx, [eax+8]
and	ecx, 3FFFFFFFh
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	[ebp+var_34], 4
mov	ecx, [ebp+var_3C]
shl	ecx, 2
push	ecx
mov	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_2C]
mov	edx, [eax]
mov	ecx, [ebp+var_2C]
mov	eax, [edx+10h]
call	eax

loc_4DBC63:
mov	ecx, [ebp+var_40]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_40]
mov	dword ptr [edx+8], 80000000h
mov	esp, ebp
pop	ebp
retn
sub_4DBB70 endp

align 10h



sub_4DBC80 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebx+8]
mov	cl, [eax]
mov	edx, [ebp-4]
mov	[edx], cl
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, [ebx+8]
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx+20h]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebx+8]
mov	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [eax+30h]
movaps	xmmword	ptr [ecx+30h], xmm0
mov	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx+40h]
movaps	xmmword	ptr [eax+40h], xmm0
mov	ecx, [ebx+8]
add	ecx, 50h
mov	[ebp-8], ecx
mov	edx, [ebp-4]
add	edx, 50h
mov	[ebp-0Ch], edx
xor	eax, eax
shl	eax, 4
add	eax, [ebp-8]
mov	ecx, [ebp-0Ch]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ecx], xmm0
mov	edx, 1
shl	edx, 4
add	edx, [ebp-8]
mov	eax, [ebp-0Ch]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, 2
shl	ecx, 4
add	ecx, [ebp-8]
mov	edx, [ebp-0Ch]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4DBC80 endp

align 10h


; Attributes: bp-based frame

sub_4DBD50 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
jmp	short loc_4DBD6B

loc_4DBD62:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_4DBD6B:
cmp	[ebp+var_4], 2
jnb	short loc_4DBD8B
mov	ecx, [ebp+var_4]
imul	ecx, 60h
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
imul	ecx, 60h
add	ecx, [ebp+var_18]
call	sub_4DBEC0
jmp	short loc_4DBD62

loc_4DBD8B:
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0C0h]
fstp	dword ptr [edx+0C0h]
mov	ecx, [ebp+arg_0]
add	ecx, 0D0h
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 0D0h
call	sub_4DBC80
mov	edx, [ebp+arg_0]
add	edx, 150h
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 150h
call	sub_4DBC80
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4DBD50 endp

align 10h


; Attributes: bp-based frame

sub_4DBDE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 80000000h
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4DBDE0 endp

align 10h


; Attributes: bp-based frame

sub_4DBE20 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_1], cl
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+var_20]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_20]
mov	ecx, [eax+8]
and	ecx, 80000000h
jnz	short loc_4DBE9A
mov	edx, [ebp+var_20]
mov	eax, [edx+8]
and	eax, 3FFFFFFFh
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	[ebp+var_14], 4
mov	eax, [ebp+var_1C]
shl	eax, 2
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx

loc_4DBE9A:
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+8], 80000000h
mov	esp, ebp
pop	ebp
retn
sub_4DBE20 endp

align 10h



sub_4DBEC0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	edx, [ebx+8]
mov	eax, [ebp-4]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax+10h], xmm0
mov	ecx, [ebx+8]
mov	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ecx+20h]
movaps	xmmword	ptr [edx+20h], xmm0
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
mov	edx, [ecx+34h]
mov	[eax+34h], edx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
fld	dword ptr [ecx+38h]
fstp	dword ptr [eax+38h]
mov	edx, [ebp-4]
mov	eax, [ebx+8]
fld	dword ptr [eax+3Ch]
fstp	dword ptr [edx+3Ch]
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
fld	dword ptr [edx+40h]
fstp	dword ptr [ecx+40h]
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
fld	dword ptr [ecx+44h]
fstp	dword ptr [eax+44h]
mov	edx, [ebp-4]
mov	eax, [ebx+8]
fld	dword ptr [eax+48h]
fstp	dword ptr [edx+48h]
mov	ecx, [ebp-4]
mov	edx, [ebx+8]
fld	dword ptr [edx+4Ch]
fstp	dword ptr [ecx+4Ch]
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
mov	dl, [ecx+50h]
mov	[eax+50h], dl
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4DBEC0 endp

align 10h


; Attributes: bp-based frame

sub_4DBF80 proc	near

var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F4h
mov	[ebp+var_E0], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_CC]
movsx	eax, byte ptr [edx+10h]
add	eax, [ebp+var_CC]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0Ch]
mov	[ebp+var_D0], edx
cmp	[ebp+var_D0], 0
jz	loc_4DC271
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_D4], ecx
mov	edx, [ebp+var_D4]
xor	eax, eax
mov	[ebp+var_28], edx
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_C], ecx
mov	[ebp+var_1C], 0
mov	[ebp+var_14], 0
mov	edx, [ebp+var_E0]
cmp	dword ptr [edx+14h], 1Ah
jnz	short loc_4DC031
mov	[ebp+var_1C], 40000000h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ecx+1Ch]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D8]
mov	[ebp+var_14], eax
jmp	short loc_4DC055

loc_4DC031:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	eax, [edx+1Ch]
mov	[ebp+var_DC], eax
mov	ecx, [ebp+var_DC]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_E0]
mov	eax, [edx+14h]
mov	[ebp+var_14], eax

loc_4DC055:
mov	ecx, [ebp+var_E0]
mov	[ebp+var_E4], ecx
mov	edx, [ebp+var_E4]
mov	eax, [ebp+var_10]
cmp	eax, [edx+8]
jnz	short loc_4DC081
mov	ecx, [ebp+var_E4]
mov	edx, [ebp+var_C]
cmp	edx, [ecx+0Ch]
jz	loc_4DC267

loc_4DC081:
cmp	[ebp+var_14], 8
jz	loc_4DC267
mov	eax, [ebp+var_14]
and	eax, [ebp+var_1C]
jz	loc_4DC265
mov	ecx, [ebp+var_18]
cmp	dword ptr [ecx], 2
jz	loc_4DC265
mov	edx, [ebp+var_E0]
movzx	eax, byte ptr [edx+10h]
test	eax, eax
jz	short loc_4DC0C5
mov	ecx, [ebp+var_10]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_E8], edx
jmp	short loc_4DC0DD

loc_4DC0C5:
mov	eax, [ebp+var_E0]
mov	ecx, [eax+8]
mov	[ebp+var_EC], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_E8], edx

loc_4DC0DD:
mov	eax, [ebp+var_EC]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_E8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_E0]
movzx	eax, byte ptr [edx+10h]
test	eax, eax
jz	short loc_4DC117
mov	ecx, [ebp+var_E0]
mov	edx, [ecx+8]
mov	[ebp+var_F4], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_F0], eax
jmp	short loc_4DC129

loc_4DC117:
mov	ecx, [ebp+var_10]
mov	[ebp+var_F4], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_F0], edx

loc_4DC129:
mov	eax, [ebp+var_F4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_F0]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_18]
cmp	dword ptr [edx], 2
jnz	short loc_4DC1B3
mov	ecx, 138Bh
lea	eax, [ebp+var_80]
call	sub_401100
mov	[ebp+var_80], offset off_155845C
mov	eax, [ebp+var_38]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_74], ecx
lea	ecx, [ebp+var_70]
call	sub_DD7800
mov	edx, [ebp+var_30]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+10h]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_80]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_70]
call	sub_4087D0
lea	ecx, [ebp+var_80]
call	sub_401110
jmp	loc_4DC250

loc_4DC1B3:
mov	ecx, 138Bh
lea	eax, [ebp+var_C8]
call	sub_401100
mov	[ebp+var_C8], offset off_155845C
mov	eax, [ebp+var_38]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_BC], ecx
lea	ecx, [ebp+var_B8]
call	sub_DD7A10
mov	edx, [ebp+var_30]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+10h]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_30]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_84], eax
lea	ecx, [ebp+var_C8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_B8]
call	sub_4087D0
lea	ecx, [ebp+var_C8]
call	sub_401110

loc_4DC250:
mov	edx, [ebp+var_E0]
mov	eax, [edx+18h]
add	eax, 1
mov	ecx, [ebp+var_E0]
mov	[ecx+18h], eax

loc_4DC265:
jmp	short loc_4DC271

loc_4DC267:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 1

loc_4DC271:
mov	esp, ebp
pop	ebp
retn	4
sub_4DBF80 endp

align 10h


; Attributes: bp-based frame

sub_4DC280 proc	near

var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F4h
mov	[ebp+var_E0], ecx
mov	eax, [ebp+var_E0]
cmp	dword ptr [eax+18h], 0
jnz	short loc_4DC2A0
jmp	loc_4DC555

loc_4DC2A0:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_CC]
movsx	ecx, byte ptr [eax+10h]
add	ecx, [ebp+var_CC]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
mov	[ebp+var_D0], eax
cmp	[ebp+var_D0], 0
jz	loc_4DC555
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0Ch]
mov	[ebp+var_D4], edx
mov	eax, [ebp+var_D4]
xor	ecx, ecx
mov	[ebp+var_28], eax
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+8]
mov	[ebp+var_10], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_C], edx
mov	[ebp+var_1C], 0
mov	[ebp+var_14], 0
mov	eax, [ebp+var_E0]
cmp	dword ptr [eax+14h], 1Ah
jnz	short loc_4DC342
mov	[ebp+var_1C], 40000000h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	eax, [edx+1Ch]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	[ebp+var_14], ecx
jmp	short loc_4DC366

loc_4DC342:
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	ecx, [eax+1Ch]
mov	[ebp+var_DC], ecx
mov	edx, [ebp+var_DC]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_E0]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx

loc_4DC366:
mov	edx, [ebp+var_E0]
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E4]
mov	ecx, [ebp+var_10]
cmp	ecx, [eax+8]
jnz	short loc_4DC392
mov	edx, [ebp+var_E4]
mov	eax, [ebp+var_C]
cmp	eax, [edx+0Ch]
jz	loc_4DC555

loc_4DC392:
cmp	[ebp+var_14], 8
jz	loc_4DC555
mov	ecx, [ebp+var_14]
and	ecx, [ebp+var_1C]
jz	loc_4DC555
mov	edx, [ebp+var_E0]
movzx	eax, byte ptr [edx+10h]
test	eax, eax
jz	short loc_4DC3CA
mov	ecx, [ebp+var_10]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_E8], edx
jmp	short loc_4DC3E2

loc_4DC3CA:
mov	eax, [ebp+var_E0]
mov	ecx, [eax+8]
mov	[ebp+var_EC], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_E8], edx

loc_4DC3E2:
mov	eax, [ebp+var_EC]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_E8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_E0]
movzx	eax, byte ptr [edx+10h]
test	eax, eax
jz	short loc_4DC41C
mov	ecx, [ebp+var_E0]
mov	edx, [ecx+8]
mov	[ebp+var_F4], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_F0], eax
jmp	short loc_4DC42E

loc_4DC41C:
mov	ecx, [ebp+var_10]
mov	[ebp+var_F4], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_F0], edx

loc_4DC42E:
mov	eax, [ebp+var_F4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_F0]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_18]
cmp	dword ptr [edx], 2
jnz	short loc_4DC4B8
mov	ecx, 138Bh
lea	eax, [ebp+var_80]
call	sub_401100
mov	[ebp+var_80], offset off_155845C
mov	eax, [ebp+var_38]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_74], ecx
lea	ecx, [ebp+var_70]
call	sub_DD7760
mov	edx, [ebp+var_30]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+10h]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_80]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_70]
call	sub_4087D0
lea	ecx, [ebp+var_80]
call	sub_401110
jmp	loc_4DC555

loc_4DC4B8:
mov	ecx, 138Bh
lea	eax, [ebp+var_C8]
call	sub_401100
mov	[ebp+var_C8], offset off_155845C
mov	eax, [ebp+var_38]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_BC], ecx
lea	ecx, [ebp+var_B8]
call	sub_DD78A0
mov	edx, [ebp+var_30]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+10h]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_30]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_84], eax
lea	ecx, [ebp+var_C8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_B8]
call	sub_4087D0
lea	ecx, [ebp+var_C8]
call	sub_401110

loc_4DC555:
mov	esp, ebp
pop	ebp
retn	4
sub_4DC280 endp

align 10h


; Attributes: bp-based frame

sub_4DC560 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FD75C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC583
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DC583:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC560 endp

align 10h


; Attributes: bp-based frame

sub_4DC590 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FC7F60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC5B3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DC5B3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC590 endp

align 10h


; Attributes: bp-based frame

sub_4DC5C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FC7E00
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC5E3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DC5E3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC5C0 endp

align 10h


; Attributes: bp-based frame

sub_4DC5F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FF1E70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC63F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC63F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC5F0 endp

align 10h


; Attributes: bp-based frame

sub_4DC650 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FF1E40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC69F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC69F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC650 endp

align 10h


; Attributes: bp-based frame

sub_4DC6B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+18h]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DC6B0 endp

align 10h


; Attributes: bp-based frame

sub_4DC6D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 14h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15F1C44
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+4], 0
jz	short loc_4DC6FF
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
call	sub_AD6020

loc_4DC6FF:
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15F19CC
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_146A160
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_146A158
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4DC758
mov	edx, [ebp+var_14]
mov	[ebp+var_8], edx
call	sub_AD5DD0
mov	[ebp+var_C], eax
mov	eax, [ebp+var_10]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_8]
movzx	ecx, word ptr [eax+4]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_18]
mov	edx, [eax]
mov	ecx, [ebp+var_18]
mov	eax, [edx+8]
call	eax

loc_4DC758:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC6D0 endp

align 10h


; Attributes: bp-based frame

sub_4DC770 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FD7040
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC7BF
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC7BF:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC770 endp

align 10h


; Attributes: bp-based frame

sub_4DC7D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_12838C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC81F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC81F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC7D0 endp

align 10h


; Attributes: bp-based frame

sub_4DC830 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FF0C20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC87F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC87F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC830 endp

align 10h


; Attributes: bp-based frame

sub_4DC890 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FE04C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC8DF
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC8DF:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC890 endp

align 10h


; Attributes: bp-based frame

sub_4DC8F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FBDC20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC93F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC93F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC8F0 endp

align 10h


; Attributes: bp-based frame

sub_4DC950 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax+8], offset off_1576DAC
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_146A160
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_146A158
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC9B3
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DC9B3:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC950 endp

align 10h


; Attributes: bp-based frame

sub_4DC9C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_FC58D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DC9E3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DC9E3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC9C0 endp

align 10h


; Attributes: bp-based frame

sub_4DC9F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FC5590
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DCA3F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DCA3F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DC9F0 endp

align 10h


; Attributes: bp-based frame

sub_4DCA50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_FBCDB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4DCA9F
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4DCA9F:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DCA50 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4DCAB0(LPCSTR lpFileName, int, int)
sub_4DCAB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
cmp	[ebp+arg_8], 0
jz	short loc_4DCAE1
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	unk_155DFA4
mov	ecx, [ebp+var_8]
add	ecx, 98h
call	sub_403170
or	[ebp+var_4], 1

loc_4DCAE1:
push	0
push	0
mov	ecx, [ebp+var_8]
call	sub_4032A0
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+eax], offset off_14463D0
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_403330
mov	edx, [ebp+var_8]
add	edx, 8
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4031E0
mov	eax, [ebp+arg_4]
or	eax, 10h
push	eax		; int
mov	ecx, [ebp+lpFileName]
push	ecx		; lpFileName
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_402D40
test	eax, eax
jnz	short loc_4DCB4F
push	4
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
add	ecx, [eax+4]
call	sub_402D20

loc_4DCB4F:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DCAB0 endp

align 10h


; Attributes: bp-based frame

sub_4DCB60 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
cmp	dword_196AFBC, 0
jz	short loc_4DCB77
mov	ecx, dword_196AFBC
call	sub_AD5E10

loc_4DCB77:
mov	eax, [ebp+arg_0]
mov	dword_196AFBC, eax
pop	ebp
retn
sub_4DCB60 endp

align 10h


; Attributes: bp-based frame

sub_4DCB90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= word ptr	-5
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
push	edi
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4DCBE6
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	byte ptr [ebp+var_3+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	byte ptr [ebp+var_3], dl
mov	esi, [ebp+arg_0]
mov	ecx, 0Ah
mov	edi, [ebp+var_C]
rep movsd
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 28h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_4DCC06

loc_4DCBE6:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4DD970

loc_4DCC06:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4DCB90 endp

align 10h


; Attributes: bp-based frame

sub_4DCC10 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 5
cmp	[ebp+arg_0], edx
jnb	short loc_4DCC6E
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
shl	ecx, 5
add	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_4]
jnz	short loc_4DCC53
jmp	short loc_4DCC6C

loc_4DCC53:
xor	eax, eax
mov	[ebp+var_9], al
lea	ecx, [ebp+var_9]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4DCC6C:
jmp	short loc_4DCC9F

loc_4DCC6E:
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 5
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_34]
call	sub_4DDA70

loc_4DCC9F:
mov	esp, ebp
pop	ebp
retn	8
sub_4DCC10 endp

align 10h


; Attributes: bp-based frame

sub_4DCCB0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_5D12F0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4DCCB0 endp

align 10h


; Attributes: bp-based frame

sub_4DCD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4DCD10 endp

align 10h


; Attributes: bp-based frame

sub_4DCD30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_594900
mov	esp, ebp
pop	ebp
retn
sub_4DCD30 endp

align 10h


; Attributes: bp-based frame

sub_4DCD50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movsx	eax, byte ptr [eax]
mov	esp, ebp
pop	ebp
retn
sub_4DCD50 endp

align 10h


; Attributes: bp-based frame

sub_4DCD70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	eax, byte ptr [eax]
mov	esp, ebp
pop	ebp
retn
sub_4DCD70 endp

align 10h


; Attributes: bp-based frame

sub_4DCD90 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax], cl
mov	esp, ebp
pop	ebp
retn	4
sub_4DCD90 endp

align 10h


; Attributes: bp-based frame

sub_4DCDB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
xor	eax, eax
mov	[ebp+var_1], al
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_10]
call	sub_4DDEC0
mov	ecx, [ebp+var_10]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	esp, ebp
pop	ebp
retn
sub_4DCDB0 endp

align 10h


; Attributes: bp-based frame

sub_4DCDF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4DCE41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98D20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_4DCE48

loc_4DCE41:
mov	[ebp+var_8], 0

loc_4DCE48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4DCDF0 endp

align 10h


; Attributes: bp-based frame

sub_4DCE50 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4DCE8B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7750
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 20h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_4DCEAB

loc_4DCE8B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4DF2C0

loc_4DCEAB:
mov	esp, ebp
pop	ebp
retn	4
sub_4DCE50 endp

align 10h


; Attributes: bp-based frame

sub_4DCEC0 proc	near

var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 1ACh
mov	[ebp+var_1AC], ecx
mov	eax, [ebp+var_1AC]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_2C], ecx
mov	[ebp+var_28], edx
mov	eax, [ebp+var_1AC]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	[ebp+var_24], ecx
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
sub	eax, [ebp+var_2C]
sar	eax, 2
shl	eax, 5
add	eax, [ebp+var_20]
sub	eax, [ebp+var_28]
cmp	[ebp+arg_0], eax
jnb	short loc_4DCF74
sub	esp, 8
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_1AC]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	ecx, [ebp+var_30]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_1AC]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_10], eax
mov	[ebp+var_C], ecx
sub	esp, 8
mov	[ebp+var_40], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[ebp+var_38], edx
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_38]
call	sub_459A20
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_40]
mov	[ecx], edx
mov	[ecx+4], eax
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_1AC]
call	sub_4DD310
jmp	loc_4DD030

loc_4DCF74:
mov	eax, [ebp+var_1AC]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_90], ecx
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_1AC]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	[ebp+var_88], ecx
mov	[ebp+var_84], edx
mov	eax, [ebp+var_88]
sub	eax, [ebp+var_90]
sar	eax, 2
shl	eax, 5
add	eax, [ebp+var_84]
sub	eax, [ebp+var_8C]
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_94]
mov	[ebp+var_1A8], ecx
lea	edx, [ebp+var_1A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_1AC]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_98]
mov	[eax], ecx
mov	[eax+4], edx
movzx	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_1A8]
push	edx
sub	esp, 8
mov	[ebp+var_A0], esp
mov	eax, [ebp+var_1A4]
mov	ecx, [ebp+var_1A0]
mov	edx, [ebp+var_A0]
mov	[edx], eax
mov	[edx+4], ecx
mov	ecx, [ebp+var_1AC]
call	sub_4DD3B0

loc_4DD030:
mov	esp, ebp
pop	ebp
retn	8
sub_4DCEC0 endp

align 10h


; Attributes: bp-based frame

sub_4DD040 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A0h
mov	[ebp+var_A0], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4DEE00
add	esp, 8
mov	edx, [ebp+var_A0]
cmp	dword ptr [edx], 0
jz	short loc_4DD0E0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A0]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_A0]
mov	eax, [edx]
mov	[ebp+var_98], eax
cmp	[ebp+var_98], 0
jz	short loc_4DD0E0
mov	ecx, [ebp+var_9C]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_98]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4DD0E0:
mov	esp, ebp
pop	ebp
retn
sub_4DD040 endp

align 10h


; Attributes: bp-based frame

sub_4DD0F0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4DD153
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 34h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_4DD138
jmp	short loc_4DD151

loc_4DD138:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_4DD8D0

loc_4DD151:
jmp	short loc_4DD189

loc_4DD153:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_4DE970

loc_4DD189:
mov	esp, ebp
pop	ebp
retn	8
sub_4DD0F0 endp

align 10h


; Attributes: bp-based frame

sub_4DD190 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+8], 0FFFFFFFFh
xor	eax, eax
mov	[ebp+var_1], al
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4DEDC0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4DD190 endp

align 10h


; Attributes: bp-based frame

sub_4DD1F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4DD235
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4DDB40
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4DD235:
mov	esp, ebp
pop	ebp
retn
sub_4DD1F0 endp

align 10h


; Attributes: bp-based frame

sub_4DD240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+4]
and	eax, 7FFFFFFFh
mov	esp, ebp
pop	ebp
retn
sub_4DD240 endp

align 10h


; Attributes: bp-based frame

sub_4DD260 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4E1600
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_4DD2A9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_594BE0
mov	eax, 1
jmp	short loc_4DD2AB

loc_4DD2A9:
xor	eax, eax

loc_4DD2AB:
mov	esp, ebp
pop	ebp
retn	4
sub_4DD260 endp

align 10h


; Attributes: bp-based frame

sub_4DD2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_4DD305
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_4DE4B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_4DD305:
mov	esp, ebp
pop	ebp
retn
sub_4DD2C0 endp

align 10h


; Attributes: bp-based frame

sub_4DD310 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_88], ecx
sub	esp, 8
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_18]
mov	[edx], eax
mov	[edx+4], ecx
sub	esp, 8
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_88]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_1C]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
mov	eax, [ebp+var_20]
mov	[eax], ecx
mov	[eax+4], edx
lea	ecx, [ebp+var_14]
push	ecx
call	sub_46FEB0
add	esp, 1Ch
mov	[ebp+var_8C], eax
mov	edx, [ebp+var_8C]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_88]
mov	[edx+8], eax
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_0]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4DD310 endp

align 10h


; Attributes: bp-based frame

sub_4DD3B0 proc	near

var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= byte ptr -160h
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_148= dword ptr -148h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_34=	dword ptr -34h
var_28=	byte ptr -28h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 1DCh
mov	[ebp+var_1D8], ecx
cmp	[ebp+arg_8], 0
jnz	short loc_4DD3CA
jmp	loc_4DD8C7

loc_4DD3CA:
mov	eax, [ebp+var_1D8]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_70], ecx
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_1D8]
mov	ecx, [eax+10h]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_74]
mov	[ebp+var_68], edx
mov	[ebp+var_64], 0
mov	eax, [ebp+var_68]
sub	eax, [ebp+var_70]
sar	eax, 2
shl	eax, 5
add	eax, [ebp+var_64]
sub	eax, [ebp+var_6C]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_1D8]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[ebp+var_88], edx
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_1D8]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	[ebp+var_80], edx
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_80]
sub	ecx, [ebp+var_88]
sar	ecx, 2
shl	ecx, 5
add	ecx, [ebp+var_7C]
sub	ecx, [ebp+var_84]
mov	edx, [ebp+var_78]
sub	edx, ecx
cmp	edx, [ebp+arg_8]
jb	loc_4DD599
push	0
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_98], ecx
sub	esp, 8
mov	[ebp+var_94], esp
mov	edx, [ebp+var_1D8]
mov	eax, [edx+8]
mov	ecx, [edx+0Ch]
mov	[ebp+var_90], eax
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_98]
push	edx
lea	ecx, [ebp+var_90]
call	sub_459A20
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	edx, [ebp+var_94]
mov	[edx], eax
mov	[edx+4], ecx
sub	esp, 8
mov	[ebp+var_9C], esp
mov	eax, [ebp+var_1D8]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [ebp+var_9C]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_A0], esp
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_A0]
mov	[eax], ecx
mov	[eax+4], edx
lea	ecx, [ebp+var_28]
push	ecx
call	sub_46FDD0
add	esp, 24h
lea	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_D0], eax
sub	esp, 8
mov	[ebp+var_CC], esp
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ebp+var_C8], ecx
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_D0]
push	eax
lea	ecx, [ebp+var_C8]
call	sub_459A20
mov	ecx, [ebp+var_C8]
mov	edx, [ebp+var_C4]
mov	eax, [ebp+var_CC]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_D4], esp
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_D4]
mov	[eax], ecx
mov	[eax+4], edx
call	sub_4DEE30
add	esp, 14h
mov	ecx, [ebp+arg_8]
mov	[ebp+var_F0], ecx
mov	edx, [ebp+var_1D8]
add	edx, 8
mov	[ebp+var_EC], edx
mov	eax, [ebp+var_F0]
push	eax
mov	ecx, [ebp+var_EC]
call	sub_459A20
jmp	loc_4DD8C7

loc_4DD599:
mov	ecx, [ebp+var_1D8]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[ebp+var_100], edx
mov	[ebp+var_FC], eax
mov	ecx, [ebp+var_1D8]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	[ebp+var_F8], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F8]
sub	ecx, [ebp+var_100]
sar	ecx, 2
shl	ecx, 5
add	ecx, [ebp+var_F4]
sub	ecx, [ebp+var_FC]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_1D8]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_110], eax
mov	[ebp+var_10C], ecx
mov	edx, [ebp+var_1D8]
mov	eax, [edx+8]
mov	ecx, [edx+0Ch]
mov	[ebp+var_108], eax
mov	[ebp+var_104], ecx
mov	edx, [ebp+var_108]
sub	edx, [ebp+var_110]
sar	edx, 2
shl	edx, 5
add	edx, [ebp+var_104]
sub	edx, [ebp+var_10C]
mov	[ebp+var_114], edx
lea	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_34]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_114]
add	edx, [eax]
mov	[ebp+var_4], edx
push	0
mov	eax, [ebp+var_4]
add	eax, 1Fh
shr	eax, 5
push	eax
mov	ecx, [ebp+var_1D8]
add	ecx, 10h
call	sub_46B060
mov	[ebp+var_10], eax
sub	esp, 8
mov	[ebp+var_11C], esp
mov	ecx, [ebp+var_11C]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_11C]
mov	dword ptr [eax+4], 0
sub	esp, 8
mov	[ebp+var_120], esp
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_120]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_124], esp
mov	ecx, [ebp+var_1D8]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_124]
mov	[ecx], edx
mov	[ecx+4], eax
lea	edx, [ebp+var_C]
push	edx
call	sub_46FEB0
add	esp, 1Ch
lea	eax, [ebp+var_174]
mov	[ebp+var_148], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_148]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[ebp+var_178], ecx
lea	edx, [ebp+var_168]
mov	[ebp+var_158], edx
mov	eax, [ebp+var_174]
mov	ecx, [ebp+var_170]
mov	edx, [ebp+var_158]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_178]
mov	[ebp+var_16C], eax
jmp	short loc_4DD74B

loc_4DD731:
mov	ecx, [ebp+var_16C]
sub	ecx, 1
mov	[ebp+var_16C], ecx
lea	ecx, [ebp+var_168]
call	sub_4599E0

loc_4DD74B:
cmp	[ebp+var_16C], 0
jbe	short loc_4DD774
movzx	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_160]
push	eax
lea	ecx, [ebp+var_168]
call	sub_469400
mov	ecx, eax
call	sub_459930
jmp	short loc_4DD731

loc_4DD774:
mov	ecx, [ebp+var_168]
mov	edx, [ebp+var_164]
mov	[ebp+var_154], ecx
mov	[ebp+var_150], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_188], eax
sub	esp, 8
mov	[ebp+var_184], esp
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	[ebp+var_180], ecx
mov	[ebp+var_17C], edx
mov	eax, [ebp+var_188]
push	eax
lea	ecx, [ebp+var_180]
call	sub_459A20
mov	ecx, [ebp+var_180]
mov	edx, [ebp+var_17C]
mov	eax, [ebp+var_184]
mov	[eax], ecx
mov	[eax+4], edx
sub	esp, 8
mov	[ebp+var_18C], esp
mov	ecx, [ebp+var_1D8]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	ecx, [ebp+var_18C]
mov	[ecx], edx
mov	[ecx+4], eax
sub	esp, 8
mov	[ebp+var_190], esp
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_190]
mov	[ecx], edx
mov	[ecx+4], eax
lea	edx, [ebp+var_58]
push	edx
call	sub_46FEB0
add	esp, 1Ch
mov	[ebp+var_1DC], eax
mov	eax, [ebp+var_1DC]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_1D8]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_1D8]
cmp	dword ptr [ecx], 0
jz	short loc_4DD891
mov	edx, [ebp+var_1D8]
mov	eax, [ebp+var_1D8]
mov	ecx, [edx+10h]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_1D4], ecx
mov	edx, [ebp+var_1D8]
mov	eax, [edx]
mov	[ebp+var_1D0], eax
cmp	[ebp+var_1D0], 0
jz	short loc_4DD891
mov	ecx, [ebp+var_1D4]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_1D0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4DD891:
mov	eax, [ebp+var_4]
add	eax, 1Fh
shr	eax, 5
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax*4]
mov	eax, [ebp+var_1D8]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	[ebp+var_60], ecx
mov	[ebp+var_5C], 0
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_1D8]
mov	[ecx], edx
mov	[ecx+4], eax

loc_4DD8C7:
mov	esp, ebp
pop	ebp
retn	10h
sub_4DD3B0 endp

align 10h


; Attributes: bp-based frame

sub_4DD8D0 proc	near

var_FC=	dword ptr -0FCh
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0FCh
mov	[ebp+var_FC], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_4DD918

loc_4DD90F:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_4DD918:
cmp	[ebp+var_C], 0
jle	short loc_4DD93E
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4E1A60
mov	ecx, [ebp+var_10]
add	ecx, 34h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 34h
mov	[ebp+var_14], edx
jmp	short loc_4DD90F

loc_4DD93E:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_FC]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_4DEE80
add	esp, 8
mov	ecx, [ebp+var_FC]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DD8D0 endp

align 10h


; Attributes: bp-based frame

sub_4DD970 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
push	esi
push	edi
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_4442B0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_4DEED0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_4DD9E8

loc_4DD9D6:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 28h
mov	[ebp+var_38], ecx

loc_4DD9E8:
cmp	[ebp+var_3C], 0
jbe	short loc_4DD9FD
mov	esi, [ebp+arg_4]
mov	ecx, 0Ah
mov	edi, [ebp+var_38]
rep movsd
jmp	short loc_4DD9D6

loc_4DD9FD:
mov	edx, [ebp+var_38]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_4DDA28
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4DDA28:
mov	ecx, [ebp+var_9C]
call	sub_444390
mov	edx, [ebp+var_4]
imul	edx, 28h
add	edx, [ebp+var_8]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_4DD970 endp



; Attributes: bp-based frame

sub_4DDA70 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4DDAD1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 5
cmp	edx, [ebp+arg_4]
jb	short loc_4DDAB2
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_4DF3C0
jmp	short loc_4DDAD1

loc_4DDAB2:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4DF2C0

loc_4DDAD1:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DDA70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4DDAE0(float,	float)
sub_4DDAE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
fld	[ebp+arg_4]
fld	[ebp+arg_0]
fcomip	st, st(1)
fstp	st
jbe	short loc_4DDAFC
movss	xmm0, [ebp+arg_0]
movss	[ebp+var_4], xmm0
jmp	short loc_4DDB06

loc_4DDAFC:
movss	xmm0, [ebp+arg_4]
movss	[ebp+var_4], xmm0

loc_4DDB06:
fld	[ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DDAE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4DDB10(float,	float)
sub_4DDB10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
fld	[ebp+arg_0]
fld	[ebp+arg_4]
fcomip	st, st(1)
fstp	st
jbe	short loc_4DDB2C
movss	xmm0, [ebp+arg_0]
movss	[ebp+var_4], xmm0
jmp	short loc_4DDB36

loc_4DDB2C:
movss	xmm0, [ebp+arg_4]
movss	[ebp+var_4], xmm0

loc_4DDB36:
fld	[ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DDB10 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4DDB40(void	*)
sub_4DDB40 proc	near

var_44=	dword ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx

loc_4DDB49:
cmp	[ebp+arg_0], 0
jz	short loc_4DDB99
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_44]
call	sub_4DDB40
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_4DFAB0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_4DDB91
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4DDB91:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4DDB49

loc_4DDB99:
mov	esp, ebp
pop	ebp
retn	4
sub_4DDB40 endp

align 10h


; Attributes: bp-based frame

sub_4DDBA0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_4DDBB8:
cmp	[ebp+var_8], 0
jz	short loc_4DDC29
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_20]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4DDBFE
jb	short loc_4DDBF5
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_20]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4DDBFE

loc_4DDBF5:
mov	[ebp+var_24], 1
jmp	short loc_4DDC05

loc_4DDBFE:
mov	[ebp+var_24], 0

loc_4DDC05:
mov	cl, byte ptr [ebp+var_24]
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_4DDC1E
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_4DDC27

loc_4DDC1E:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_4DDC27:
jmp	short loc_4DDBB8

loc_4DDC29:
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5B5B20
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4DDBA0 endp

align 10h


; Attributes: bp-based frame

sub_4DDC50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jle	short loc_4DDC64
mov	ecx, [ebp+arg_0]
mov	[ebp+var_4], ecx
jmp	short loc_4DDC6A

loc_4DDC64:
mov	edx, [ebp+arg_4]
mov	[ebp+var_4], edx

loc_4DDC6A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DDC50 endp

align 10h


; Attributes: bp-based frame

sub_4DDC80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_4DDC9B

loc_4DDC92:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_4DDC9B:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+8]
jg	short loc_4DDCBF
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	dword ptr [ecx+edx*8], 0FFFFFFFFh
setnz	al
test	eax, eax
jz	short loc_4DDCBD
jmp	short loc_4DDCBF

loc_4DDCBD:
jmp	short loc_4DDC92

loc_4DDCBF:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4DDC80 endp

align 10h


; Attributes: bp-based frame

sub_4DDCD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	eax, [edx+eax*8+4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DDCD0 endp

align 10h


; Attributes: bp-based frame

sub_4DDD00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
jmp	short loc_4DDD23

loc_4DDD1A:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_4DDD23:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
cmp	ecx, [eax+8]
jg	short loc_4DDD47
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	dword ptr [eax+ecx*8], 0FFFFFFFFh
setnz	dl
test	edx, edx
jz	short loc_4DDD45
jmp	short loc_4DDD47

loc_4DDD45:
jmp	short loc_4DDD1A

loc_4DDD47:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4DDD00 endp



; Attributes: bp-based frame

sub_4DDD50 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+8]
setle	al
mov	[ebp+var_5], al
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_5]
mov	[ecx], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4DDD50 endp

align 10h


; Attributes: bp-based frame

sub_4DDD80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax+8], 0
jle	short loc_4DDDF4
mov	ecx, [ebp+arg_0]
shr	ecx, 4
imul	ecx, 9E3779B1h
mov	edx, [ebp+var_8]
and	ecx, [edx+8]
mov	[ebp+var_4], ecx
jmp	short loc_4DDDB8

loc_4DDDA9:
mov	eax, [ebp+var_4]
add	eax, 1
mov	ecx, [ebp+var_8]
and	eax, [ecx+8]
mov	[ebp+var_4], eax

loc_4DDDB8:
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	dword ptr [eax+ecx*8], 0FFFFFFFFh
setnz	dl
test	edx, edx
jz	short loc_4DDDF4
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*8]
xor	ecx, ecx
cmp	eax, [ebp+arg_0]
setz	cl
test	ecx, ecx
jz	short loc_4DDDF2
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	eax, [eax+ecx*8+4]
jmp	short loc_4DDDF7

loc_4DDDF2:
jmp	short loc_4DDDA9

loc_4DDDF4:
mov	eax, [ebp+arg_4]

loc_4DDDF7:
mov	esp, ebp
pop	ebp
retn	8
sub_4DDD80 endp

align 10h


; Attributes: bp-based frame

sub_4DDE00 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4DFAF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_C]
cmp	eax, [edx+8]
setle	cl
mov	[ebp+var_D], cl
mov	dl, [ebp+var_D]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4DDE54
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_14]
call	sub_4DEC40
xor	eax, eax
jmp	short loc_4DDE59

loc_4DDE54:
mov	eax, 1

loc_4DDE59:
mov	esp, ebp
pop	ebp
retn	4
sub_4DDE00 endp

align 10h


; Attributes: bp-based frame

sub_4DDE60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	[ebp+var_8], 0
jmp	short loc_4DDE87

loc_4DDE7E:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_4DDE87:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
jge	short loc_4DDEA8
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [edx+eax*8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0FFFFFFFFh
jmp	short loc_4DDE7E

loc_4DDEA8:
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
and	ecx, 80000000h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
mov	esp, ebp
pop	ebp
retn
sub_4DDE60 endp

align 10h


; Attributes: bp-based frame

sub_4DDEC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4DDE60
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
and	ecx, 80000000h
jnz	short loc_4DDEFE
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
lea	ecx, ds:8[eax*8]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+8]
call	eax

loc_4DDEFE:
mov	esp, ebp
pop	ebp
retn	4
sub_4DDEC0 endp

align 10h


; Attributes: bp-based frame

sub_4DDF10 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4E=	byte ptr -4Eh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
push	esi
push	edi
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_4DDF2E:
cmp	[ebp+var_10], 0
jz	short loc_4DDF76
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_4D6B90
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4DDF65
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_4DDF6E

loc_4DDF65:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_4DDF6E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_4DDF2E

loc_4DDF76:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_4DE018
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_4DE009
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_4DFB70
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_4DE0D9
jmp	short loc_4DE018

loc_4DE009:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_4DE018:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_4DE040
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_4E], cl
jmp	short loc_4DE074

loc_4DE040:
mov	ecx, 4
mov	edi, [ebp+arg_4]
add	edi, 4
mov	esi, [ebp+var_4C]
add	esi, 4
xor	edx, edx
mov	[ebp+var_64], edx
repe cmpsb
jz	short loc_4DE062
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
mov	[ebp+var_64], eax

loc_4DE062:
mov	ecx, [ebp+var_64]
mov	[ebp+var_68], ecx
xor	edx, edx
cmp	[ebp+var_68], 0
setl	dl
mov	[ebp+var_4E], dl

loc_4DE074:
mov	al, [ebp+var_4E]
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_4DE0BE
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_58]
call	sub_4DFB70
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_4DE0D9

loc_4DE0BE:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_4DE0D9:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4DDF10 endp

align 10h


; Attributes: bp-based frame

sub_4DE0F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_4DE1C7
mov	ecx, [ebp+var_14]
call	sub_488E60
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_4DE150
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_4DE1C7

loc_4DE150:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4DFCB0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_4DE178:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_4DE18C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_4DE178

loc_4DE18C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_4DE19E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_4DE1B2
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_4DE19E

loc_4DE1B2:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_4DE1C7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_4DE0F0 endp



; Attributes: bp-based frame

sub_4DE1D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwophysicsinte ; "LWOPhysicsInterface"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_4DFD90
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1514D38 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4DE1D0 endp

align 10h


; Attributes: bp-based frame

sub_4DE2A0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_20]
mov	eax, [edx+8]
and	eax, 80000000h
jnz	short loc_4DE311
mov	ecx, [ebp+var_20]
mov	edx, [ecx+8]
and	edx, 3FFFFFFFh
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	[ebp+var_14], 4
mov	edx, [ebp+var_1C]
shl	edx, 2
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	ecx, [ebp+var_C]
mov	eax, [edx+10h]
call	eax

loc_4DE311:
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_20]
mov	dword ptr [edx+8], 80000000h
mov	esp, ebp
pop	ebp
retn
sub_4DE2A0 endp

align 10h


; Attributes: bp-based frame

sub_4DE330 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	byte ptr -38h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
push	esi
push	edi
mov	[ebp+var_90], ecx
mov	[ebp+var_6C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_90]
call	sub_5DE010
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_90]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_78]
mov	[ebp+var_74], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_78]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jnz	short loc_4DE3DA
or	[ebp+var_6C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_7C]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_4DE3DA
mov	[ebp+var_98], 0
jmp	short loc_4DE3E4

loc_4DE3DA:
mov	[ebp+var_98], 1

loc_4DE3E4:
mov	cl, byte ptr [ebp+var_98]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_6C]
and	edx, 1
jz	short loc_4DE3F9
and	[ebp+var_6C], 0FFFFFFFEh

loc_4DE3F9:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_4DE498
mov	[ebp+var_60], 0
mov	[ebp+var_58], 0
mov	[ebp+var_54], 0
mov	[ebp+var_50], 0
mov	[ebp+var_48], 0
mov	[ebp+var_47], 0
mov	[ebp+var_44], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_40], edx
lea	edi, [ebp+var_38]
mov	ecx, 8
lea	esi, [ebp+var_60]
rep movsd
lea	eax, [ebp+var_8C]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_80]
call	sub_4046E0
lea	ecx, [ebp+var_40]
push	ecx
push	ecx
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_88]
call	sub_4046E0
lea	edx, [ebp+var_68]
push	edx
mov	ecx, [ebp+var_90]
call	sub_4DFE00
lea	eax, [ebp+var_68]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_4DE498:
mov	eax, [ebp+var_4]
add	eax, 18h
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4DE330 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4DE4B0(void	*)
sub_4DE4B0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_4DE4B9:
cmp	[ebp+arg_0], 0
jz	short loc_4DE4FF
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_4DE4B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_4DE4F7
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4DE4F7:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_4DE4B9

loc_4DE4FF:
mov	esp, ebp
pop	ebp
retn	4
sub_4DE4B0 endp

align 10h


; Attributes: bp-based frame

sub_4DE510 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	byte ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_88=	byte ptr -88h
var_7C=	byte ptr -7Ch
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_64=	dword ptr -64h
var_5C=	byte ptr -5Ch
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
push	esi
push	edi
mov	[ebp+var_D0], ecx
mov	[ebp+var_AC], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_47F8E0
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_B0]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_D0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_B8]
mov	[ebp+var_B4], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_B4]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_B8]
setz	al
mov	[ebp+var_D1], al
movzx	ecx, [ebp+var_D1]
test	ecx, ecx
jnz	short loc_4DE5F3
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
or	[ebp+var_AC], 1
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_D0]
mov	al, [edx+14h]
mov	[ebp+var_1D], al
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_24]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4DE5F3
mov	[ebp+var_D8], 0
jmp	short loc_4DE5FD

loc_4DE5F3:
mov	[ebp+var_D8], 1

loc_4DE5FD:
mov	dl, byte ptr [ebp+var_D8]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_AC]
and	eax, 1
jz	short loc_4DE626
and	[ebp+var_AC], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_4DE626:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4DE734
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_A0], eax
mov	[ebp+var_9C], 0
mov	[ebp+var_98], 0
lea	ecx, [ebp+var_94]
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
lea	eax, [ebp+var_88]
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
lea	edx, [ebp+var_7C]
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_70], xmm0
mov	[ebp+var_6C], 0
mov	ecx, [ebp+var_A0]
mov	[ebp+var_64], ecx
lea	edi, [ebp+var_5C]
mov	ecx, 0Eh
lea	esi, [ebp+var_9C]
rep movsd
lea	edx, [ebp+var_CC]
mov	[ebp+var_C0], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_C0]
call	sub_4046E0
lea	eax, [ebp+var_64]
push	eax
push	ecx
mov	[ebp+var_C8], esp
mov	ecx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
call	sub_4046E0
lea	ecx, [ebp+var_A8]
push	ecx
mov	ecx, [ebp+var_D0]
call	sub_4E02D0
lea	edx, [ebp+var_A8]
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_4DE734:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4DE510 endp

align 10h


; Attributes: bp-based frame

sub_4DE750 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_7C], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_5E9440
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_7D], al
movzx	ecx, [ebp+var_7D]
test	ecx, ecx
jnz	short loc_4DE841
or	[ebp+var_58], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_68], edx
mov	eax, [ebp+var_7C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_68]
mov	[ebp+var_84], edx
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_88]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4DE820
jb	short loc_4DE814
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_88]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4DE820

loc_4DE814:
mov	[ebp+var_8C], 1
jmp	short loc_4DE82A

loc_4DE820:
mov	[ebp+var_8C], 0

loc_4DE82A:
movzx	ecx, byte ptr [ebp+var_8C]
test	ecx, ecx
jnz	short loc_4DE841
mov	[ebp+var_90], 0
jmp	short loc_4DE84B

loc_4DE841:
mov	[ebp+var_90], 1

loc_4DE84B:
mov	dl, byte ptr [ebp+var_90]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_58]
and	eax, 1
jz	short loc_4DE86E
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_4DE86E:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4DE908
mov	[ebp+var_4C], 0
mov	[ebp+var_48], 0
movss	xmm0, ds:dword_1513EA4
movss	[ebp+var_44], xmm0
mov	[ebp+var_40], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_3C], eax
mov	ecx, [edx+4]
mov	[ebp+var_38], ecx
lea	edx, [ebp+var_34]
mov	eax, [ebp+var_4C]
mov	[edx], eax
mov	ecx, [ebp+var_48]
mov	[edx+4], ecx
mov	eax, [ebp+var_44]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_78]
mov	[ebp+var_6C], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	eax, [ebp+var_3C]
push	eax
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_78]
mov	eax, [ebp+var_74]
call	sub_4046E0
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_7C]
call	sub_4E07A0
lea	edx, [ebp+var_54]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_4DE908:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4DE750 endp

align 10h


; Attributes: bp-based frame

sub_4DE920 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, dword_196D2BC
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_A5AD10
call	sub_AD4F80
push	eax
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+18h]
call	edx
mov	esp, ebp
pop	ebp
retn
sub_4DE920 endp

align 10h


; Attributes: bp-based frame

sub_4DE970 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_4DE9DB
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_4DE9B7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4E10C0
jmp	short loc_4DE9DB

loc_4DE9B7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4E0EB0

loc_4DE9DB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DE970 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4DE9F0(float,	float, float)
sub_4DE9F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
fld	[ebp+arg_0]
fld	[ebp+arg_4]
fcomip	st, st(1)
fstp	st
jbe	short loc_4DEA04
fld	[ebp+arg_4]
jmp	short loc_4DEA18

loc_4DEA04:
fld	[ebp+arg_8]
fld	[ebp+arg_0]
fcomip	st, st(1)
fstp	st
jbe	short loc_4DEA15
fld	[ebp+arg_8]
jmp	short loc_4DEA18

loc_4DEA15:
fld	[ebp+arg_0]

loc_4DEA18:
pop	ebp
retn
sub_4DE9F0 endp

align 10h


; Attributes: bp-based frame

sub_4DEA20 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_70], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5C9500
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_71], al
movzx	ecx, [ebp+var_71]
test	ecx, ecx
jnz	short loc_4DEAAD
or	[ebp+var_48], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_70]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_4DEAAD
mov	[ebp+var_78], 0
jmp	short loc_4DEAB4

loc_4DEAAD:
mov	[ebp+var_78], 1

loc_4DEAB4:
mov	al, byte ptr [ebp+var_78]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_48]
and	ecx, 1
jz	short loc_4DEACE
and	[ebp+var_48], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_4DEACE:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_4DEB4D
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_34]
call	sub_403850
lea	ecx, [ebp+var_1C]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_3C]
mov	[edx], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_38]
mov	[ecx+4], edx
lea	eax, [ebp+var_6C]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
push	ecx
mov	[ebp+var_68], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_70]
call	sub_4DF5F0
lea	eax, [ebp+var_44]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_34]
call	sub_407910

loc_4DEB4D:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_4DEA20 endp

align 10h


; Attributes: bp-based frame

sub_4DEB60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
and	ecx, 7FFFFFFFh
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
add	edx, [ebp+var_8]
mov	eax, [ebp+var_10]
cmp	edx, [eax+8]
jle	short loc_4DEBA3
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
lea	edx, [edx+ecx+2]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_4E1460

loc_4DEBA3:
mov	[ebp+var_C], 1
mov	ecx, [ebp+arg_4]
shr	ecx, 4
imul	ecx, 9E3779B1h
mov	edx, [ebp+var_10]
and	ecx, [edx+8]
mov	[ebp+var_4], ecx
jmp	short loc_4DEBD0

loc_4DEBC1:
mov	eax, [ebp+var_4]
add	eax, 1
mov	ecx, [ebp+var_10]
and	eax, [ecx+8]
mov	[ebp+var_4], eax

loc_4DEBD0:
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	dword ptr [eax+ecx*8], 0FFFFFFFFh
setnz	dl
test	edx, edx
jz	short loc_4DEC07
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*8]
xor	ecx, ecx
cmp	eax, [ebp+arg_4]
setz	cl
test	ecx, ecx
jz	short loc_4DEC05
mov	[ebp+var_C], 0
jmp	short loc_4DEC07

loc_4DEC05:
jmp	short loc_4DEBC1

loc_4DEC07:
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
add	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[eax+ecx*8], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_8]
mov	[ecx+edx*8+4], eax
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DEB60 endp

align 10h


; Attributes: bp-based frame

sub_4DEC40 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
sub	edx, 1
mov	eax, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [edx+eax*8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_8]
add	ecx, [eax+8]
mov	edx, [ebp+var_1C]
and	ecx, [edx+8]
mov	[ebp+var_4], ecx

loc_4DEC88:
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	dword ptr [ecx+edx*8], 0FFFFFFFFh
setnz	al
test	eax, eax
jz	short loc_4DECB1
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_4]
add	edx, [ecx+8]
mov	eax, [ebp+var_1C]
and	edx, [eax+8]
mov	[ebp+var_4], edx
jmp	short loc_4DEC88

loc_4DECB1:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	edx, [ebp+var_1C]
and	ecx, [edx+8]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	edx, [ebp+var_1C]
and	ecx, [edx+8]
mov	[ebp+var_8], ecx
jmp	short loc_4DECE6

loc_4DECD7:
mov	eax, [ebp+var_8]
add	eax, 1
mov	ecx, [ebp+var_1C]
and	eax, [ecx+8]
mov	[ebp+var_8], eax

loc_4DECE6:
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	dword ptr [eax+ecx*8], 0FFFFFFFFh
setnz	dl
test	edx, edx
jz	loc_4DEDB1
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
mov	eax, [ecx+edx*8]
shr	eax, 4
imul	eax, 9E3779B1h
mov	ecx, [ebp+var_1C]
and	eax, [ecx+8]
mov	[ebp+var_10], eax
mov	edx, [ebp+var_8]
cmp	edx, [ebp+var_4]
jb	short loc_4DED30
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jbe	short loc_4DED30
jmp	short loc_4DECD7
jmp	short loc_4DED61

loc_4DED30:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jnb	short loc_4DED4C
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
ja	short loc_4DED48
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_8]
ja	short loc_4DED4C

loc_4DED48:
jmp	short loc_4DECD7
jmp	short loc_4DED61

loc_4DED4C:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_C]
jbe	short loc_4DED61
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_4]
jnb	short loc_4DED61
jmp	loc_4DECD7

loc_4DED61:
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	edx, [ebp+var_C]
mov	esi, [ebp+var_8]
mov	ecx, [ecx+esi*8]
mov	[eax+edx*8], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	ecx, [ebp+var_C]
mov	esi, [ebp+var_8]
mov	eax, [eax+esi*8+4]
mov	[edx+ecx*8+4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [edx+eax*8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	loc_4DECD7

loc_4DEDB1:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4DEC40 endp

align 10h


; Attributes: bp-based frame

sub_4DEDC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
shl	eax, 1
mov	[ebp+var_8], eax
mov	[ebp+var_4], 8

loc_4DEDD8:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jge	short loc_4DEDEA
mov	edx, [ebp+var_4]
shl	edx, 1
mov	[ebp+var_4], edx
jmp	short loc_4DEDD8

loc_4DEDEA:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_4E1460
mov	esp, ebp
pop	ebp
retn	8
sub_4DEDC0 endp



; Attributes: bp-based frame

sub_4DEE00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 130h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_4E1580
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_4DEE00 endp

align 10h


; Attributes: bp-based frame

sub_4DEE30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
sub	esp, 8
mov	[ebp+var_10], esp
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_10]
mov	[ecx], edx
mov	[ecx+4], eax
sub	esp, 8
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_14]
mov	[ecx], edx
mov	[ecx+4], eax
call	sub_4E1730
add	esp, 1Ch
mov	esp, ebp
pop	ebp
retn
sub_4DEE30 endp

align 10h


; Attributes: bp-based frame

sub_4DEE80 proc	near

var_104= dword ptr -104h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 104h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_104], ecx
jmp	short loc_4DEEA8

loc_4DEE99:
mov	edx, [ebp+var_104]
add	edx, 34h
mov	[ebp+var_104], edx

loc_4DEEA8:
mov	eax, [ebp+var_104]
cmp	eax, [ebp+arg_4]
jz	short loc_4DEEC7
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	ecx, [ebp+var_104]
call	sub_4E3270
jmp	short loc_4DEE99

loc_4DEEC7:
mov	esp, ebp
pop	ebp
retn
sub_4DEE80 endp

align 10h


; Attributes: bp-based frame

sub_4DEED0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 6666666h
jbe	short loc_4DEEFB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_4DEEFB:
cmp	[ebp+arg_0], 0
jz	short loc_4DEF32
mov	ecx, [ebp+arg_0]
imul	ecx, 28h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 28h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_4DEF39

loc_4DEF32:
mov	[ebp+var_10], 0

loc_4DEF39:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_4DEED0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_4DEF50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 7FFFFFFh
jbe	short loc_4DEF7B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_4DEF7B:
cmp	[ebp+arg_0], 0
jz	short loc_4DEFAC
mov	ecx, [ebp+arg_0]
shl	ecx, 5
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
shr	eax, 5
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_4DEFB3

loc_4DEFAC:
mov	[ebp+var_10], 0

loc_4DEFB3:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_4DEF50 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_4DEFC0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
shr	eax, 4
imul	eax, 9E3779B1h
and	eax, [ebp+arg_4]
pop	ebp
retn
sub_4DEFC0 endp

align 10h


; Attributes: bp-based frame

sub_4DEFE0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0FFFFFFFFh
pop	ebp
retn
sub_4DEFE0 endp

align 10h


; Attributes: bp-based frame

sub_4DEFF0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
xor	eax, eax
cmp	[ebp+arg_0], 0FFFFFFFFh
setnz	al
pop	ebp
retn
sub_4DEFF0 endp

align 10h


; Attributes: bp-based frame

sub_4DF000 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, [ebp+arg_4]
setz	cl
mov	eax, ecx
pop	ebp
retn
sub_4DF000 endp

align 10h


; Attributes: bp-based frame

sub_4DF020 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	qword ptr -54h
var_4C=	dword ptr -4Ch
var_3E=	word ptr -3Eh
var_3C=	dword ptr -3Ch
var_36=	word ptr -36h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_11=	byte ptr -11h
var_10=	qword ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 70h
push	esi
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
lea	esi, [ebp+var_8]
call	sub_404710
lea	eax, [ebp+var_8]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_4DF2A7
mov	[ebp+var_11], 1
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407D10
add	esp, 4
xor	edx, edx
mov	dword ptr [ebp+var_20],	eax
mov	dword ptr [ebp+var_20+4], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+var_4C]
mov	ecx, [eax+edx+28h]
mov	[ebp+var_28], ecx
mov	edx, [eax+edx+2Ch]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
cmp	eax, dword ptr [ebp+var_20+4]
jl	short loc_4DF0B8
jg	short loc_4DF08B
mov	ecx, [ebp+var_28]
cmp	ecx, dword ptr [ebp+var_20]
jbe	short loc_4DF0B8

loc_4DF08B:
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4C]
mov	eax, [edx+ecx+28h]
mov	[ebp+var_30], eax
mov	ecx, [edx+ecx+2Ch]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
sub	edx, dword ptr [ebp+var_20]
mov	eax, [ebp+var_2C]
sbb	eax, dword ptr [ebp+var_20+4]
mov	dword ptr [ebp+var_54],	edx
mov	dword ptr [ebp+var_54+4], eax
jmp	short loc_4DF0C6

loc_4DF0B8:
mov	dword ptr [ebp+var_54],	0
mov	dword ptr [ebp+var_54+4], 0

loc_4DF0C6:
mov	ecx, dword ptr [ebp+var_54]
mov	dword ptr [ebp+var_10],	ecx
mov	edx, dword ptr [ebp+var_54+4]
mov	dword ptr [ebp+var_10+4], edx
mov	eax, dword ptr [ebp+var_10]
or	eax, dword ptr [ebp+var_10+4]
jnz	short loc_4DF100
mov	ecx, dword ptr [ebp+var_20+4]
push	ecx
mov	edx, dword ptr [ebp+var_20]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4C]
call	sub_4E1E70
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_11], cl
jmp	loc_4DF263

loc_4DF100:
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
add	ecx, [eax+4]
call	sub_406880
and	eax, 7
cmp	eax, 1
jnz	loc_4DF1BB
mov	ecx, dword ptr [ebp+var_20+4]
push	ecx
mov	edx, dword ptr [ebp+var_20]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4C]
call	sub_4E1E70
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_11], cl
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_4DF1A9
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	edx, [ebp+var_4C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405230
mov	[ebp+var_36], ax
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	edx, [ebp+var_4C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_34], eax
mov	eax, dword ptr [ebp+var_10+4]
push	eax
mov	ecx, dword ptr [ebp+var_10]
push	ecx
movzx	edx, [ebp+var_36]
push	edx
mov	eax, [ebp+var_34]
mov	edx, [eax]
mov	ecx, [ebp+var_34]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_5C], eax
mov	[ebp+var_58], edx
mov	ecx, [ebp+var_5C]
cmp	ecx, dword ptr [ebp+var_10]
jnz	short loc_4DF1A9
mov	edx, [ebp+var_58]
cmp	edx, dword ptr [ebp+var_10+4]
jnz	short loc_4DF1A9
mov	[ebp+var_60], 0
jmp	short loc_4DF1B0

loc_4DF1A9:
mov	[ebp+var_60], 1

loc_4DF1B0:
mov	al, byte ptr [ebp+var_60]
mov	[ebp+var_11], al
jmp	loc_4DF263

loc_4DF1BB:
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	ecx, [ebp+var_4C]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_3E], ax
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	edx, [ebp+var_4C]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_3C], eax
mov	eax, dword ptr [ebp+var_10+4]
push	eax
mov	ecx, dword ptr [ebp+var_10]
push	ecx
movzx	edx, [ebp+var_3E]
push	edx
mov	eax, [ebp+var_3C]
mov	edx, [eax]
mov	ecx, [ebp+var_3C]
mov	eax, [edx+2Ch]
call	eax
mov	[ebp+var_68], eax
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_68]
cmp	ecx, dword ptr [ebp+var_10]
jnz	short loc_4DF214
mov	edx, [ebp+var_64]
cmp	edx, dword ptr [ebp+var_10+4]
jz	short loc_4DF21D

loc_4DF214:
mov	[ebp+var_6C], 1
jmp	short loc_4DF224

loc_4DF21D:
mov	[ebp+var_6C], 0

loc_4DF224:
mov	al, byte ptr [ebp+var_6C]
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_4DF256
mov	edx, dword ptr [ebp+var_20+4]
push	edx
mov	eax, dword ptr [ebp+var_20]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_4E1E70
movzx	edx, al
test	edx, edx
jz	short loc_4DF256
mov	[ebp+var_70], 0
jmp	short loc_4DF25D

loc_4DF256:
mov	[ebp+var_70], 1

loc_4DF25D:
mov	al, byte ptr [ebp+var_70]
mov	[ebp+var_11], al

loc_4DF263:
push	0
push	0
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	ecx, [ebp+var_4C]
add	ecx, [edx+4]
call	sub_405E40
xor	eax, eax
jz	short loc_4DF28D
push	1
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	ecx, [ebp+var_4C]
add	ecx, [edx+4]
call	sub_405360

loc_4DF28D:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_4DF2A7
push	4
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	ecx, [ebp+var_4C]
add	ecx, [edx+4]
call	sub_402D20

loc_4DF2A7:
lea	ecx, [ebp+var_8]
call	sub_404730
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4DF020 endp

align 10h


; Attributes: bp-based frame

sub_4DF2C0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
push	esi
push	edi
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5AA310
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_4DEF50
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_4DF338

loc_4DF326:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 20h
mov	[ebp+var_38], ecx

loc_4DF338:
cmp	[ebp+var_3C], 0
jbe	short loc_4DF34D
mov	esi, [ebp+arg_4]
mov	ecx, 8
mov	edi, [ebp+var_38]
rep movsd
jmp	short loc_4DF326

loc_4DF34D:
mov	edx, [ebp+var_38]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_4DF378
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_4DF378:
mov	ecx, [ebp+var_9C]
call	sub_4E1B30
mov	edx, [ebp+var_4]
shl	edx, 5
add	edx, [ebp+var_8]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_4DF2C0 endp



; Attributes: bp-based frame

sub_4DF3C0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
push	esi
push	edi
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4DF3F8
mov	edx, [ebp+var_90]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4DF3F8
mov	[ebp+var_94], 1
jmp	short loc_4DF402

loc_4DF3F8:
mov	[ebp+var_94], 0

loc_4DF402:
movzx	ecx, byte ptr [ebp+var_94]
test	ecx, ecx
jz	short loc_4DF43F
mov	esi, [ebp+arg_8]
mov	ecx, 8
lea	edi, [ebp+var_28]
rep movsd
xor	edx, edx
mov	[ebp+var_29], dl
lea	eax, [ebp+var_29]
push	eax
lea	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_90]
call	sub_4DF3C0
jmp	loc_4DF5E6

loc_4DF43F:
mov	ecx, [ebp+var_90]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 5
mov	[ebp+var_4], edx
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_4DF52D
xor	eax, eax
mov	[ebp+var_2A], al
mov	ecx, [ebp+var_90]
mov	edx, [ecx+4]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
shl	edx, 5
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+arg_4]
shl	edx, 5
mov	eax, [ebp+var_90]
add	edx, [eax+4]
mov	ecx, [ebp+var_90]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_2B], dl
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 5
mov	edx, [ebp+var_8]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A290
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ebp+var_48], ecx
mov	edx, [ebp+arg_4]
shl	edx, 5
add	edx, [ebp+arg_0]
sub	edx, [ebp+var_48]
sar	edx, 5
mov	[ebp+var_44], edx
jmp	short loc_4DF513

loc_4DF501:
mov	eax, [ebp+var_48]
add	eax, 20h
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
sub	ecx, 1
mov	[ebp+var_44], ecx

loc_4DF513:
cmp	[ebp+var_44], 0
jle	short loc_4DF528
mov	esi, [ebp+arg_8]
mov	ecx, 8
mov	edi, [ebp+var_48]
rep movsd
jmp	short loc_4DF501

loc_4DF528:
jmp	loc_4DF5E6

loc_4DF52D:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_90]
mov	edx, [ecx+4]
push	edx
call	sub_4E1F10
add	esp, 0Ch
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_2C], dl
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_4]
shl	edx, 5
mov	eax, [ebp+var_90]
add	edx, [eax+4]
mov	ecx, [ebp+var_90]
mov	[ecx+4], edx
mov	edx, [ebp+arg_0]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_8C]
sar	eax, 5
mov	[ebp+var_88], eax
jmp	short loc_4DF5CB

loc_4DF5AD:
mov	ecx, [ebp+var_8C]
add	ecx, 20h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_88]
sub	edx, 1
mov	[ebp+var_88], edx

loc_4DF5CB:
cmp	[ebp+var_88], 0
jle	short loc_4DF5E6
mov	esi, [ebp+arg_8]
mov	ecx, 8
mov	edi, [ebp+var_8C]
rep movsd
jmp	short loc_4DF5AD

loc_4DF5E6:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_4DF3C0 endp

align 10h


; Attributes: bp-based frame

sub_4DF5F0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4DF7C4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4DF659
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_4E20D0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B

loc_4DF659:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_4DF6A2
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B
jmp	loc_4DF7BF

loc_4DF6A2:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_4DF6D4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B

loc_4DF6D4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_4DF71E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B

loc_4DF71E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4DF794
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4DF76D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B
jmp	short loc_4DF792

loc_4DF76D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B

loc_4DF792:
jmp	short loc_4DF7BF

loc_4DF794:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_4E20D0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B

loc_4DF7BF:
jmp	loc_4DFA9B

loc_4DF7C4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_4DF855
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_4DF825
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B
jmp	short loc_4DF850

loc_4DF825:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_4E20D0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B

loc_4DF850:
jmp	loc_4DFA9B

loc_4DF855:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_4DF8BF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_4DF8BF
mov	[ebp+var_C4], 1
jmp	short loc_4DF8C9

loc_4DF8BF:
mov	[ebp+var_C4], 0

loc_4DF8C9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4DF8DE
and	[ebp+var_4C], 0FFFFFFFEh

loc_4DF8DE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4DF940
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4DF916
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B
jmp	short loc_4DF93B

loc_4DF916:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	loc_4DFA9B

loc_4DF93B:
jmp	loc_4DFA9B

loc_4DF940:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4DF98D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_4DF98D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_4DF9D9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_4DF9D9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_4DF9CD
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_4DF9D9

loc_4DF9CD:
mov	[ebp+var_C8], 1
jmp	short loc_4DF9E3

loc_4DF9D9:
mov	[ebp+var_C8], 0

loc_4DF9E3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_4DF9F8
and	[ebp+var_4C], 0FFFFFFFDh

loc_4DF9F8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_4DFA51
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4DFA2D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	short loc_4DFA9B
jmp	short loc_4DFA4F

loc_4DFA2D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_4E1F90
mov	eax, [ebp+arg_0]
jmp	short loc_4DFA9B

loc_4DFA4F:
jmp	short loc_4DFA9B

loc_4DFA51:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_4DFA6F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4DFA9B
jmp	short loc_4DFA9B

loc_4DFA6F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_4E20D0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4DFA9B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DF5F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4DFAB0(void *)
sub_4DFAB0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_4D85A0
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_4DFAE1
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4DFAE1:
mov	esp, ebp
pop	ebp
retn
sub_4DFAB0 endp

align 10h


; Attributes: bp-based frame

sub_4DFAF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax+8], 0
jle	short loc_4DFB5B
mov	ecx, [ebp+arg_0]
shr	ecx, 4
imul	ecx, 9E3779B1h
mov	edx, [ebp+var_8]
and	ecx, [edx+8]
mov	[ebp+var_4], ecx
jmp	short loc_4DFB28

loc_4DFB19:
mov	eax, [ebp+var_4]
add	eax, 1
mov	ecx, [ebp+var_8]
and	eax, [ecx+8]
mov	[ebp+var_4], eax

loc_4DFB28:
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	dword ptr [eax+ecx*8], 0FFFFFFFFh
setnz	dl
test	edx, edx
jz	short loc_4DFB5B
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*8]
xor	ecx, ecx
cmp	eax, [ebp+arg_0]
setz	cl
test	ecx, ecx
jz	short loc_4DFB59
mov	eax, [ebp+var_4]
jmp	short loc_4DFB64

loc_4DFB59:
jmp	short loc_4DFB19

loc_4DFB5B:
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
add	eax, 1

loc_4DFB64:
mov	esp, ebp
pop	ebp
retn	4
sub_4DFAF0 endp

align 10h


; Attributes: bp-based frame

sub_4DFB70 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4DFBB7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E1C60
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_4DFC67

loc_4DFBB7:
cmp	[ebp+arg_10], 0
jnz	short loc_4DFBEC
cmp	[ebp+arg_C], 0
jnz	short loc_4DFBE3
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_4D6B90
movzx	ecx, al
test	ecx, ecx
jz	short loc_4DFBEC

loc_4DFBE3:
mov	[ebp+var_34], 1
jmp	short loc_4DFBF3

loc_4DFBEC:
mov	[ebp+var_34], 0

loc_4DFBF3:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4DFC05
and	[ebp+var_C], 0FFFFFFFEh

loc_4DFC05:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_4DFC3B
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_4E1C60
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4DFC39
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_4DFC39:
jmp	short loc_4DFC67

loc_4DFC3B:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4E1C60
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_4DFC67
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_4DFC67:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4DFB70 endp

align 10h


; Attributes: bp-based frame

sub_4DFCB0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_4E1DC0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_4DFD06
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_4DFCB0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_4DFD06:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_4DFD15:
cmp	[ebp+arg_0], 0
jz	short loc_4DFD82
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_4E1DC0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_4DFD71
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_4DFCB0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_4DFD71:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_4DFD15

loc_4DFD82:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_4DFCB0 endp

align 10h


; Attributes: bp-based frame

sub_4DFD90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwophysicsinte ; "LWOPhysicsInterface"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4DFDF5
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_4DFDF5
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_4DFDF5
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_4DFDEE
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_4DFDF5

loc_4DFDEE:
mov	[ebp+var_10], 0

loc_4DFDF5:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_4DFD90 endp

align 10h


; Attributes: bp-based frame

sub_4DFE00 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4DFFDD
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4DFE69
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E24E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3

loc_4DFE69:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_4DFEB5
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3
jmp	loc_4DFFD8

loc_4DFEB5:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_4DFEEA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3

loc_4DFEEA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4DFF34
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3

loc_4DFF34:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4DFFAD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4DFF86
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3
jmp	short loc_4DFFAB

loc_4DFF86:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3

loc_4DFFAB:
jmp	short loc_4DFFD8

loc_4DFFAD:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E24E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3

loc_4DFFD8:
jmp	loc_4E02C3

loc_4DFFDD:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4E0071
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4E0041
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3
jmp	short loc_4E006C

loc_4E0041:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E24E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3

loc_4E006C:
jmp	loc_4E02C3

loc_4E0071:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_4E00E1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E00E1
mov	[ebp+var_A4], 1
jmp	short loc_4E00EB

loc_4E00E1:
mov	[ebp+var_A4], 0

loc_4E00EB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4E0100
and	[ebp+var_4C], 0FFFFFFFEh

loc_4E0100:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4E0162
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4E0138
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3
jmp	short loc_4E015D

loc_4E0138:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	loc_4E02C3

loc_4E015D:
jmp	loc_4E02C3

loc_4E0162:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4E01B2
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_4E01B2:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4E0201
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4E0201
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_4E01F5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_4E0201

loc_4E01F5:
mov	[ebp+var_A8], 1
jmp	short loc_4E020B

loc_4E0201:
mov	[ebp+var_A8], 0

loc_4E020B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4E0220
and	[ebp+var_4C], 0FFFFFFFDh

loc_4E0220:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_4E0279
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4E0255
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	short loc_4E02C3
jmp	short loc_4E0277

loc_4E0255:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E2370
mov	eax, [ebp+arg_0]
jmp	short loc_4E02C3

loc_4E0277:
jmp	short loc_4E02C3

loc_4E0279:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_4E0297
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4E02C3
jmp	short loc_4E02C3

loc_4E0297:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E24E0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4E02C3:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4DFE00 endp

align 10h


; Attributes: bp-based frame

sub_4E02D0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4E04AD
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E0339
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E27E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793

loc_4E0339:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_4E0385
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793
jmp	loc_4E04A8

loc_4E0385:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_4E03BA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793

loc_4E03BA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_4E0404
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793

loc_4E0404:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4E047D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4E0456
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793
jmp	short loc_4E047B

loc_4E0456:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793

loc_4E047B:
jmp	short loc_4E04A8

loc_4E047D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E27E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793

loc_4E04A8:
jmp	loc_4E0793

loc_4E04AD:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4E0541
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_4E0511
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793
jmp	short loc_4E053C

loc_4E0511:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E27E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793

loc_4E053C:
jmp	loc_4E0793

loc_4E0541:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_4E05B1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E05B1
mov	[ebp+var_A4], 1
jmp	short loc_4E05BB

loc_4E05B1:
mov	[ebp+var_A4], 0

loc_4E05BB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_4E05D0
and	[ebp+var_4C], 0FFFFFFFEh

loc_4E05D0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_4E0632
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_4E0608
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793
jmp	short loc_4E062D

loc_4E0608:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	loc_4E0793

loc_4E062D:
jmp	loc_4E0793

loc_4E0632:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4E0682
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_4E0682:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_4E06D1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_4E06D1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_4E06C5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_4E06D1

loc_4E06C5:
mov	[ebp+var_A8], 1
jmp	short loc_4E06DB

loc_4E06D1:
mov	[ebp+var_A8], 0

loc_4E06DB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_4E06F0
and	[ebp+var_4C], 0FFFFFFFDh

loc_4E06F0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_4E0749
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4E0725
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	short loc_4E0793
jmp	short loc_4E0747

loc_4E0725:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E26A0
mov	eax, [ebp+arg_0]
jmp	short loc_4E0793

loc_4E0747:
jmp	short loc_4E0793

loc_4E0749:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_4E0767
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4E0793
jmp	short loc_4E0793

loc_4E0767:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E27E0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4E0793:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E02D0 endp

align 10h


; Attributes: bp-based frame

sub_4E07A0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_4E0A55
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E0809
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E2BB0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7

loc_4E0809:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4E0858
jb	short loc_4E084C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4E0858

loc_4E084C:
mov	[ebp+var_AC], 1
jmp	short loc_4E0862

loc_4E0858:
mov	[ebp+var_AC], 0

loc_4E0862:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_4E089D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7
jmp	loc_4E0A50

loc_4E089D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4E08EC
jb	short loc_4E08E0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4E08EC

loc_4E08E0:
mov	[ebp+var_B8], 1
jmp	short loc_4E08F6

loc_4E08EC:
mov	[ebp+var_B8], 0

loc_4E08F6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_4E091A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7

loc_4E091A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_4E0964
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7

loc_4E0964:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4E09B3
jb	short loc_4E09A7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4E09B3

loc_4E09A7:
mov	[ebp+var_C4], 1
jmp	short loc_4E09BD

loc_4E09B3:
mov	[ebp+var_C4], 0

loc_4E09BD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_4E0A25
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4E09FE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7
jmp	short loc_4E0A23

loc_4E09FE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7

loc_4E0A23:
jmp	short loc_4E0A50

loc_4E0A25:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E2BB0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7

loc_4E0A50:
jmp	loc_4E0EA7

loc_4E0A55:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_4E0B31
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4E0AB9
jb	short loc_4E0AAD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4E0AB9

loc_4E0AAD:
mov	[ebp+var_D0], 1
jmp	short loc_4E0AC3

loc_4E0AB9:
mov	[ebp+var_D0], 0

loc_4E0AC3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_4E0B01
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7
jmp	short loc_4E0B2C

loc_4E0B01:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E2BB0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7

loc_4E0B2C:
jmp	loc_4E0EA7

loc_4E0B31:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4E0B9A
jb	short loc_4E0B8E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4E0B9A

loc_4E0B8E:
mov	[ebp+var_DC], 1
jmp	short loc_4E0BA4

loc_4E0B9A:
mov	[ebp+var_DC], 0

loc_4E0BA4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_4E0C2F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_4E0C0E
jb	short loc_4E0C02
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_4E0C0E

loc_4E0C02:
mov	[ebp+var_E8], 1
jmp	short loc_4E0C18

loc_4E0C0E:
mov	[ebp+var_E8], 0

loc_4E0C18:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_4E0C2F
mov	[ebp+var_EC], 1
jmp	short loc_4E0C39

loc_4E0C2F:
mov	[ebp+var_EC], 0

loc_4E0C39:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_4E0C4E
and	[ebp+var_4C], 0FFFFFFFEh

loc_4E0C4E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_4E0CB0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_4E0C86
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7
jmp	short loc_4E0CAB

loc_4E0C86:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	loc_4E0EA7

loc_4E0CAB:
jmp	loc_4E0EA7

loc_4E0CB0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_4E0D48
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4E0D35
jb	short loc_4E0D29
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4E0D35

loc_4E0D29:
mov	[ebp+var_F8], 1
jmp	short loc_4E0D3F

loc_4E0D35:
mov	[ebp+var_F8], 0

loc_4E0D3F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_4E0D48:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_4E0DE5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_4E0DE5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_4E0DD9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4E0DC4
jb	short loc_4E0DB8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4E0DC4

loc_4E0DB8:
mov	[ebp+var_104], 1
jmp	short loc_4E0DCE

loc_4E0DC4:
mov	[ebp+var_104], 0

loc_4E0DCE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_4E0DE5

loc_4E0DD9:
mov	[ebp+var_108], 1
jmp	short loc_4E0DEF

loc_4E0DE5:
mov	[ebp+var_108], 0

loc_4E0DEF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_4E0E04
and	[ebp+var_4C], 0FFFFFFFDh

loc_4E0E04:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_4E0E5D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_4E0E39
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	short loc_4E0EA7
jmp	short loc_4E0E5B

loc_4E0E39:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_4E2A40
mov	eax, [ebp+arg_0]
jmp	short loc_4E0EA7

loc_4E0E5B:
jmp	short loc_4E0EA7

loc_4E0E5D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_4E0E7B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_4E0EA7
jmp	short loc_4E0EA7

loc_4E0E7B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_4E2BB0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_4E0EA7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E07A0 endp

align 10h


; Attributes: bp-based frame

sub_4E0EB0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A87A0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A8900
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_4E0F33

loc_4E0F2A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_4E0F33:
cmp	[ebp+var_40], 0
jle	short loc_4E0F5D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_4E32D0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 34h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 34h
mov	[ebp+var_3C], eax
jmp	short loc_4E0F2A

loc_4E0F5D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_4E0F84
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_4E32D0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 34h
mov	[ebp+var_C], ecx
jmp	short loc_4E0FD9

loc_4E0F84:
mov	edx, [ebp+arg_C]
imul	edx, 34h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_4E0FBB

loc_4E0FA9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 34h
mov	[ebp+var_68], eax

loc_4E0FBB:
cmp	[ebp+var_6C], 0
jle	short loc_4E0FD3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_4E32D0
add	esp, 8
jmp	short loc_4E0FA9

loc_4E0FD3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_4E0FD9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_4E1071
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_4E1038

loc_4E102F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_4E1038:
cmp	[ebp+var_80], 0
jle	short loc_4E106B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_4E32D0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 34h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 34h
mov	[ebp+var_7C], eax
jmp	short loc_4E102F

loc_4E106B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_4E1071:
mov	ecx, [ebp+var_CC]
call	sub_4E1CB0
mov	edx, [ebp+var_4]
imul	edx, 34h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_4E0EB0 endp

align 10h


; Attributes: bp-based frame

sub_4E10C0 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AC=	dword ptr -0ACh
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_59=	byte ptr -59h
var_40=	byte ptr -40h
var_3F=	byte ptr -3Fh
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_38=	byte ptr -38h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_D8], ecx
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_4E10F6
mov	edx, [ebp+var_D8]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_4E10F6
mov	[ebp+var_DC], 1
jmp	short loc_4E1100

loc_4E10F6:
mov	[ebp+var_DC], 0

loc_4E1100:
movzx	ecx, byte ptr [ebp+var_DC]
test	ecx, ecx
jz	short loc_4E1154
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_3C]
call	sub_4E19E0
xor	eax, eax
mov	[ebp+var_3D], al
lea	ecx, [ebp+var_3D]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_D8]
call	sub_4E10C0
lea	ecx, [ebp+var_20]
call	sub_468AA0
lea	ecx, [ebp+var_2C]
call	sub_468AA0
lea	ecx, [ebp+var_38]
call	sub_468AA0
jmp	loc_4E144B

loc_4E1154:
mov	edx, [ebp+var_D8]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_D8]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_4E12B2
xor	edx, edx
mov	[ebp+var_3E], dl
mov	eax, [ebp+var_D8]
mov	ecx, [eax+4]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_D8]
mov	eax, [edx+4]
mov	[ebp+var_70], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 34h
mov	edx, [ebp+var_D8]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_59]
push	ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_70]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
call	sub_4E3120
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 34h
mov	eax, [ebp+var_D8]
add	edx, [eax+4]
mov	ecx, [ebp+var_D8]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_3F], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 34h
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_7C], eax
jmp	short loc_4E121E

loc_4E1215:
mov	edx, [ebp+var_7C]
sub	edx, 1
mov	[ebp+var_7C], edx

loc_4E121E:
cmp	[ebp+var_7C], 0
jle	short loc_4E124D
mov	eax, [ebp+var_80]
sub	eax, 34h
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_84]
sub	ecx, 34h
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_80]
push	edx
mov	ecx, [ebp+var_84]
call	sub_4E1A60
jmp	short loc_4E1215

loc_4E124D:
mov	eax, [ebp+arg_0]
mov	[ebp+var_90], eax
mov	eax, [ebp+arg_4]
imul	eax, 34h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_8C], eax
jmp	short loc_4E1293

loc_4E1275:
mov	edx, [ebp+var_90]
add	edx, 34h
mov	[ebp+var_90], edx
mov	eax, [ebp+var_8C]
sub	eax, 1
mov	[ebp+var_8C], eax

loc_4E1293:
cmp	[ebp+var_8C], 0
jle	short loc_4E12AD
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_90]
call	sub_4E1A60
jmp	short loc_4E1275

loc_4E12AD:
jmp	loc_4E144B

loc_4E12B2:
mov	edx, [ebp+var_D8]
mov	eax, [edx+4]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 34h
add	ecx, [ebp+var_AC]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_94]
sub	eax, [ebp+var_AC]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_A0], eax
jmp	short loc_4E131C

loc_4E12FE:
mov	edx, [ebp+var_A0]
sub	edx, 1
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_9C]
add	eax, 34h
mov	[ebp+var_9C], eax

loc_4E131C:
cmp	[ebp+var_A0], 0
jle	short loc_4E133A
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_9C]
push	edx		; void *
call	sub_4E32D0
add	esp, 8
jmp	short loc_4E12FE

loc_4E133A:
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_94]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_40], dl
mov	eax, [ebp+var_D8]
mov	ecx, [eax+4]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C8]
mov	[ebp+var_B4], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_C4]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_B8], eax
jmp	short loc_4E139A

loc_4E138B:
mov	edx, [ebp+var_B8]
sub	edx, 1
mov	[ebp+var_B8], edx

loc_4E139A:
cmp	[ebp+var_B8], 0
jle	short loc_4E13D9
mov	eax, [ebp+var_C4]
push	eax		; int
mov	ecx, [ebp+var_B4]
push	ecx		; void *
call	sub_4E32D0
add	esp, 8
mov	edx, [ebp+var_C4]
add	edx, 34h
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_B4]
add	eax, 34h
mov	[ebp+var_B4], eax
jmp	short loc_4E138B

loc_4E13D9:
mov	ecx, [ebp+var_4]
imul	ecx, 34h
mov	edx, [ebp+var_D8]
add	ecx, [edx+4]
mov	eax, [ebp+var_D8]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_D4], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_D4]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_D0], eax
jmp	short loc_4E1431

loc_4E1413:
mov	edx, [ebp+var_D4]
add	edx, 34h
mov	[ebp+var_D4], edx
mov	eax, [ebp+var_D0]
sub	eax, 1
mov	[ebp+var_D0], eax

loc_4E1431:
cmp	[ebp+var_D0], 0
jle	short loc_4E144B
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_D4]
call	sub_4E1A60
jmp	short loc_4E1413

loc_4E144B:
mov	esp, ebp
pop	ebp
retn	10h
sub_4E10C0 endp

align 10h


; Attributes: bp-based frame

sub_4E1460 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_4], 8
jle	short loc_4E1477
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
jmp	short loc_4E147E

loc_4E1477:
mov	[ebp+var_20], 8

loc_4E147E:
mov	ecx, [ebp+var_20]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
and	eax, 80000000h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+8]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
shl	edx, 3
push	edx
mov	eax, [ebp+arg_0]
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+4]
call	eax
mov	ecx, [ebp+var_1C]
mov	[ecx], eax
mov	[ebp+var_10], 0
jmp	short loc_4E14D1

loc_4E14C8:
mov	edx, [ebp+var_10]
add	edx, 1
mov	[ebp+var_10], edx

loc_4E14D1:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+arg_4]
jge	short loc_4E14F2
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	eax, [ebp+var_10]
lea	ecx, [edx+eax*8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0FFFFFFFFh
jmp	short loc_4E14C8

loc_4E14F2:
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	edx, [ebp+var_1C]
mov	[edx+8], ecx
mov	[ebp+var_14], 0
jmp	short loc_4E151A

loc_4E1511:
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_4E151A:
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+var_4]
jge	short loc_4E1558
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
xor	ecx, ecx
cmp	dword ptr [eax+edx*8], 0FFFFFFFFh
setnz	cl
test	ecx, ecx
jz	short loc_4E1556
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
mov	ecx, [eax+edx*8+4]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
mov	ecx, [eax+edx*8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_4DEB60

loc_4E1556:
jmp	short loc_4E1511

loc_4E1558:
cmp	[ebp+var_C], 0
jnz	short loc_4E1576
mov	eax, [ebp+var_4]
shl	eax, 3
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+8]
call	edx

loc_4E1576:
mov	esp, ebp
pop	ebp
retn	8
sub_4E1460 endp

align 10h


; Attributes: bp-based frame

sub_4E1580 proc	near

var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 120h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_11C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_120]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_4E15C1

loc_4E15B2:
mov	ecx, [ebp+var_120]
sub	ecx, 34h
mov	[ebp+var_120], ecx

loc_4E15C1:
mov	edx, [ebp+var_120]
xor	eax, eax
cmp	edx, [ebp+var_11C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E15FC
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_120]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 34h
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_4E3270
jmp	short loc_4E15B2

loc_4E15FC:
mov	esp, ebp
pop	ebp
retn
sub_4E1580 endp



; Attributes: bp-based frame

sub_4E1600 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_16=	byte ptr -16h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	esi
push	edi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_4E161A:
cmp	[ebp+var_8], 0
jz	loc_4E16A7
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_4E164C
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_E], cl
jmp	short loc_4E1680

loc_4E164C:
mov	ecx, 4
mov	edi, [ebp+arg_0]
add	edi, 4
mov	esi, [ebp+var_C]
add	esi, 4
xor	edx, edx
mov	[ebp+var_20], edx
repe cmpsb
jz	short loc_4E166E
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
mov	[ebp+var_20], eax

loc_4E166E:
mov	ecx, [ebp+var_20]
mov	[ebp+var_24], ecx
xor	edx, edx
cmp	[ebp+var_24], 0
setl	dl
mov	[ebp+var_E], dl

loc_4E1680:
movzx	eax, [ebp+var_E]
test	eax, eax
jnz	short loc_4E1699
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_4E16A2

loc_4E1699:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_4E16A2:
jmp	loc_4E161A

loc_4E16A7:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_1C]
jz	short loc_4E1719
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_4E16D7
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_16], dl
jmp	short loc_4E170B

loc_4E16D7:
mov	ecx, 4
mov	edi, [ebp+var_14]
add	edi, 4
mov	esi, [ebp+arg_0]
add	esi, 4
xor	eax, eax
mov	[ebp+var_28], eax
repe cmpsb
jz	short loc_4E16F9
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_28], ecx

loc_4E16F9:
mov	edx, [ebp+var_28]
mov	[ebp+var_2C], edx
xor	eax, eax
cmp	[ebp+var_2C], 0
setl	al
mov	[ebp+var_16], al

loc_4E170B:
movzx	ecx, [ebp+var_16]
test	ecx, ecx
jz	short loc_4E1719
mov	edx, [ebp+var_1C]
mov	[ebp+var_4], edx

loc_4E1719:
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4E1600 endp

align 10h


; Attributes: bp-based frame

sub_4E1730 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_0]
sar	eax, 2
shl	eax, 5
add	eax, [ebp+arg_C]
sub	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_4E1777

loc_4E174D:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
cmp	ecx, 1Fh
jnz	short loc_4E176E
mov	[ebp+arg_4], 0
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+arg_0], eax

loc_4E176E:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_4E1777:
cmp	[ebp+var_4], 0
jle	short loc_4E17CC
mov	edx, 1
mov	ecx, [ebp+arg_4]
shl	edx, cl
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_10]
mov	cl, [eax]
mov	[ebp+var_15], cl
movzx	edx, [ebp+var_15]
test	edx, edx
jz	short loc_4E17BB
mov	eax, [ebp+var_C]
mov	ecx, [eax]
or	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	[edx], ecx
jmp	short loc_4E17CA

loc_4E17BB:
mov	eax, [ebp+var_8]
not	eax
mov	ecx, [ebp+var_C]
and	eax, [ecx]
mov	edx, [ebp+var_C]
mov	[edx], eax

loc_4E17CA:
jmp	short loc_4E174D

loc_4E17CC:
mov	esp, ebp
pop	ebp
retn
sub_4E1730 endp



; Attributes: bp-based frame

; int __cdecl sub_4E17D0(void *, int)
sub_4E17D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4E182A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 8
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4E1831

loc_4E182A:
mov	[ebp+var_C], 0

loc_4E1831:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4E17D0 endp

align 10h



sub_4E1840 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	edx, [ebp-4]
add	edx, 10h
mov	[ebp-8], edx
mov	eax, [ebx+8]
mov	ecx, [ebp-8]
movaps	xmm0, xmmword ptr [eax+10h]
movaps	xmmword	ptr [ecx], xmm0
mov	edx, [ebp-4]
mov	eax, [ebx+8]
mov	ecx, [eax+20h]
mov	[edx+20h], ecx
mov	edx, [ebp-4]
mov	eax, [ebx+8]
mov	ecx, [eax+24h]
mov	[edx+24h], ecx
mov	edx, [ebp-4]
mov	eax, [ebx+8]
mov	ecx, [eax+28h]
mov	[edx+28h], ecx
mov	edx, [ebp-4]
mov	eax, [ebx+8]
mov	ecx, [eax+2Ch]
mov	[edx+2Ch], ecx
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4E1840 endp

align 10h


; Attributes: bp-based frame

sub_4E18C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_4DA960
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E1909
cmp	[ebp+var_10], 0
jz	short loc_4E1909
call	sub_AD5DD0
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
mov	[ebp+var_14], eax
push	0Ch
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [ebp+var_14]
mov	edx, [eax+8]
call	edx

loc_4E1909:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_4E18C0 endp

align 10h



sub_4E1920 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp-4], ecx
xor	eax, eax
shl	eax, 4
add	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ebp-20h], xmm0
mov	ecx, 1
shl	ecx, 4
add	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [ebp-30h], xmm0
mov	edx, 2
shl	edx, 4
add	edx, [ebx+8]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [ebp-40h], xmm0
mov	eax, 3
shl	eax, 4
add	eax, [ebx+8]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ebp-50h], xmm0
xor	ecx, ecx
shl	ecx, 4
add	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-20h]
movaps	xmmword	ptr [ecx], xmm0
mov	edx, 1
shl	edx, 4
add	edx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-30h]
movaps	xmmword	ptr [edx], xmm0
mov	eax, 2
shl	eax, 4
add	eax, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-40h]
movaps	xmmword	ptr [eax], xmm0
mov	ecx, 3
shl	ecx, 4
add	ecx, [ebp-4]
movaps	xmm0, xmmword ptr [ebp-50h]
movaps	xmmword	ptr [ecx], xmm0
mov	edx, [ebp-4]
mov	eax, [ebx+8]
mov	ecx, [eax+40h]
mov	[edx+40h], ecx
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4E1920 endp

align 10h


; Attributes: bp-based frame

sub_4E19E0 proc	near

var_48=	dword ptr -48h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+arg_0]
add	edx, 4
push	edx
mov	ecx, [ebp+var_48]
add	ecx, 4
call	sub_4E1BF0
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_48]
add	ecx, 10h
call	sub_4E1BF0
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_48]
add	ecx, 1Ch
call	sub_4E1BF0
mov	edx, [ebp+var_48]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+28h]
fstp	dword ptr [edx+28h]
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+2Ch]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+var_48]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn	4
sub_4E19E0 endp

align 10h


; Attributes: bp-based frame

sub_4E1A60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+arg_0]
add	edx, 4
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4E2DA0
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4E2DA0
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_4E2DA0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+28h]
fstp	dword ptr [edx+28h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+2Ch]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E1A60 endp

align 10h



sub_4E1AE0 proc	near

var_8= dword ptr -8

push	ebx
mov	ebx, esp
sub	esp, 8
and	esp, 0FFFFFFF0h
add	esp, 4
push	ebp
mov	ebp, [ebx+4]
mov	[esp+0Ch+var_8], ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebx+8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
mov	edx, [ebp-4]
add	edx, 10h
mov	[ebp-8], edx
mov	eax, [ebx+8]
mov	ecx, [ebp-8]
movaps	xmm0, xmmword ptr [eax+10h]
movaps	xmmword	ptr [ecx], xmm0
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
mov	esp, ebx
pop	ebx
retn	4
sub_4E1AE0 endp

align 10h


; Attributes: bp-based frame

sub_4E1B30 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 5
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4E1B9C
mov	ecx, [ebp+var_54]
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4E1B9C:
mov	esp, ebp
pop	ebp
retn
sub_4E1B30 endp



; Attributes: bp-based frame

sub_4E1BA0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDEF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6150
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E1BA0 endp

align 10h


; Attributes: bp-based frame

sub_4E1BF0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
push	eax
mov	ecx, [ebp+var_34]
call	sub_4E1D50
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_34]
mov	[edx+4], eax
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_4E1BF0 endp

align 10h


; Attributes: bp-based frame

sub_4E1C60 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4E2FC0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E1C60 endp

align 10h


; Attributes: bp-based frame

sub_4E1CB0 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A0h
mov	[ebp+var_A0], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4DEE00
add	esp, 8
mov	edx, [ebp+var_A0]
mov	eax, [ebp+var_A0]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_A0]
mov	eax, [edx]
mov	[ebp+var_98], eax
cmp	[ebp+var_98], 0
jz	short loc_4E1D47
mov	ecx, [ebp+var_9C]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_98]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4E1D47:
mov	esp, ebp
pop	ebp
retn
sub_4E1CB0 endp

align 10h


; Attributes: bp-based frame

sub_4E1D50 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_44D330
mov	ecx, [ebp+var_24]
mov	[ecx], eax
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_24]
mov	[eax+8], edx
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	8
sub_4E1D50 endp

align 10h


; Attributes: bp-based frame

sub_4E1DC0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_4E1E10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4E17D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E1DC0 endp

align 10h


; Attributes: bp-based frame

sub_4E1E10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 4924924h
jbe	short loc_4E1E36
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_4E1E36:
cmp	[ebp+arg_0], 0
jz	short loc_4E1E5C
mov	eax, [ebp+arg_0]
imul	eax, 38h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4E1E63

loc_4E1E5C:
mov	[ebp+var_C], 0

loc_4E1E63:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4E1E10 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_4E1E70 proc	near

var_16=	word ptr -16h
var_14=	word ptr -14h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	edx, [ebp+var_10]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_4], eax
jmp	short loc_4E1EA2

loc_4E1E90:
mov	eax, dword ptr [ebp+arg_4]
sub	eax, 1
mov	ecx, dword ptr [ebp+arg_4+4]
sbb	ecx, 0
mov	dword ptr [ebp+arg_4], eax
mov	dword ptr [ebp+arg_4+4], ecx

loc_4E1EA2:
cmp	dword ptr [ebp+arg_4+4], 0
jl	short loc_4E1F05
jg	short loc_4E1EB0
cmp	dword ptr [ebp+arg_4], 0
jbe	short loc_4E1F05

loc_4E1EB0:
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
add	ecx, [eax+4]
call	sub_4031D0
mov	[ebp+var_14], ax
movzx	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_405270
mov	[ebp+var_16], ax
movzx	edx, [ebp+var_16]
push	edx
call	sub_405240
add	esp, 4
movzx	eax, al
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
test	eax, eax
jz	short loc_4E1F03
xor	al, al
jmp	short loc_4E1F07

loc_4E1F03:
jmp	short loc_4E1E90

loc_4E1F05:
mov	al, 1

loc_4E1F07:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E1E70 endp

align 10h


; Attributes: bp-based frame

sub_4E1F10 proc	near

var_34=	byte ptr -34h
var_14=	word ptr -14h
var_12=	word ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
push	esi
push	edi
mov	eax, [ebp+arg_4]
shl	eax, 5
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
sub	edx, [ebp+arg_0]
sar	edx, 5
mov	[ebp+var_10], edx
jmp	short loc_4E1F4A

loc_4E1F38:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
add	ecx, 20h
mov	[ebp+var_C], ecx

loc_4E1F4A:
cmp	[ebp+var_10], 0
jle	short loc_4E1F82
xor	edx, edx
mov	byte ptr [ebp+var_14+1], dl
mov	al, byte ptr [ebp+var_14+1]
mov	byte ptr [ebp+var_12+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_14], cl
mov	dl, byte ptr [ebp+var_14]
mov	byte ptr [ebp+var_12], dl
mov	esi, [ebp+arg_8]
mov	ecx, 8
lea	edi, [ebp+var_34]
rep movsd
mov	ecx, 8
lea	esi, [ebp+var_34]
mov	edi, [ebp+var_C]
rep movsd
jmp	short loc_4E1F38

loc_4E1F82:
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4E1F10 endp

align 10h


; Attributes: bp-based frame

sub_4E1F90 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4E1FD7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E3020
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_4E2086

loc_4E1FD7:
cmp	[ebp+arg_10], 0
jnz	short loc_4E200B
cmp	[ebp+arg_C], 0
jnz	short loc_4E2002
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_4E200B

loc_4E2002:
mov	[ebp+var_34], 1
jmp	short loc_4E2012

loc_4E200B:
mov	[ebp+var_34], 0

loc_4E2012:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_4E2024
and	[ebp+var_C], 0FFFFFFFEh

loc_4E2024:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4E205A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E3020
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_4E2058
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_4E2058:
jmp	short loc_4E2086

loc_4E205A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_4E3020
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_4E2086
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_4E2086:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4E1F90 endp

align 10h


; Attributes: bp-based frame

sub_4E20D0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_4E20EC:
cmp	[ebp+var_10], 0
jz	short loc_4E2133
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_4E2122
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_4E212B

loc_4E2122:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_4E212B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_4E20EC

loc_4E2133:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_4E21D5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_4E21C6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_4E1F90
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_4E224B
jmp	short loc_4E21D5

loc_4E21C6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_4E21D5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_4E2230
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_4E1F90
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_4E224B

loc_4E2230:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_4E224B:
mov	esp, ebp
pop	ebp
retn	8
sub_4E20D0 endp

align 10h


; Attributes: bp-based frame

sub_4E2260 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4E2260 endp

align 10h


; Attributes: bp-based frame

sub_4E2290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 4
mov	eax, [ebp+arg_4]
shl	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4E2290 endp

align 10h


; Attributes: bp-based frame

sub_4E22C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 2
mov	eax, [ebp+arg_4]
shl	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4E22C0 endp

align 10h


; Attributes: bp-based frame

sub_4E22F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 30h
mov	eax, [ebp+arg_4]
imul	eax, 30h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4E22F0 endp

align 10h


; Attributes: bp-based frame

sub_4E2320 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	[ebp+var_C], 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
shl	ecx, 2
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_4], eax
mov	eax, [ebp+var_8]
cdq
and	edx, 3
add	eax, edx
sar	eax, 2
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E2320 endp

align 10h


; Attributes: bp-based frame

sub_4E2370 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4E23B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E1DC0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_4E2469

loc_4E23B7:
cmp	[ebp+arg_10], 0
jnz	short loc_4E23EE
cmp	[ebp+arg_C], 0
jnz	short loc_4E23E5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E23EE

loc_4E23E5:
mov	[ebp+var_34], 1
jmp	short loc_4E23F5

loc_4E23EE:
mov	[ebp+var_34], 0

loc_4E23F5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4E2407
and	[ebp+var_C], 0FFFFFFFEh

loc_4E2407:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_4E243D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_4E1DC0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4E243B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_4E243B:
jmp	short loc_4E2469

loc_4E243D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4E1DC0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_4E2469
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_4E2469:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4E2370 endp

align 10h


; Attributes: bp-based frame

sub_4E24B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0Ch
mov	eax, [ebp+arg_4]
imul	eax, 0Ch
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4E24B0 endp

align 10h


; Attributes: bp-based frame

sub_4E24E0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_4E24FC:
cmp	[ebp+var_10], 0
jz	short loc_4E2546
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4E2535
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_4E253E

loc_4E2535:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_4E253E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_4E24FC

loc_4E2546:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_4E25E8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_4E25D9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_4E2370
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_4E2661
jmp	short loc_4E25E8

loc_4E25D9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_4E25E8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_4E2646
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_4E2370
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4E2661

loc_4E2646:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4E2661:
mov	esp, ebp
pop	ebp
retn	8
sub_4E24E0 endp

align 10h


; Attributes: bp-based frame

sub_4E2670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 40h
mov	eax, [ebp+arg_4]
shl	eax, 6
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4E2670 endp

align 10h


; Attributes: bp-based frame

sub_4E26A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4E26E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E3080
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_4E2799

loc_4E26E7:
cmp	[ebp+arg_10], 0
jnz	short loc_4E271E
cmp	[ebp+arg_C], 0
jnz	short loc_4E2715
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E271E

loc_4E2715:
mov	[ebp+var_34], 1
jmp	short loc_4E2725

loc_4E271E:
mov	[ebp+var_34], 0

loc_4E2725:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_4E2737
and	[ebp+var_C], 0FFFFFFFEh

loc_4E2737:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_4E276D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_4E3080
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_4E276B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_4E276B:
jmp	short loc_4E2799

loc_4E276D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4E3080
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_4E2799
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_4E2799:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4E26A0 endp

align 10h


; Attributes: bp-based frame

sub_4E27E0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_4E27FC:
cmp	[ebp+var_10], 0
jz	short loc_4E2846
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_4E2835
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_4E283E

loc_4E2835:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_4E283E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_4E27FC

loc_4E2846:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_4E28E8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_4E28D9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_4E26A0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_4E2961
jmp	short loc_4E28E8

loc_4E28D9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_4E28E8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_4E2946
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_4E26A0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_4E2961

loc_4E2946:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_4E2961:
mov	esp, ebp
pop	ebp
retn	8
sub_4E27E0 endp

align 10h


; Attributes: bp-based frame

sub_4E2970 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_4E2988:
cmp	[ebp+var_8], 0
jz	short loc_4E29CE
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
cmp	ecx, [ebp+var_C]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_4E29C3
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_4E29CC

loc_4E29C3:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_4E29CC:
jmp	short loc_4E2988

loc_4E29CE:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_24]
jz	short loc_4E2A00
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_10]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E2A00
mov	edx, [ebp+var_24]
mov	[ebp+var_4], edx

loc_4E2A00:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E2970 endp

align 10h


; Attributes: bp-based frame

sub_4E2A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 8
mov	eax, [ebp+arg_4]
shl	eax, 3
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
call	edx
mov	esp, ebp
pop	ebp
retn	8
sub_4E2A10 endp

align 10h


; Attributes: bp-based frame

sub_4E2A40 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_4E2A87
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E30D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_4E2B64

loc_4E2A87:
cmp	[ebp+arg_10], 0
jnz	short loc_4E2AE9
cmp	[ebp+arg_C], 0
jnz	short loc_4E2AE0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4E2AD1
jb	short loc_4E2AC8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4E2AD1

loc_4E2AC8:
mov	[ebp+var_3C], 1
jmp	short loc_4E2AD8

loc_4E2AD1:
mov	[ebp+var_3C], 0

loc_4E2AD8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_4E2AE9

loc_4E2AE0:
mov	[ebp+var_40], 1
jmp	short loc_4E2AF0

loc_4E2AE9:
mov	[ebp+var_40], 0

loc_4E2AF0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_4E2B02
and	[ebp+var_C], 0FFFFFFFEh

loc_4E2B02:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_4E2B38
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4E30D0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_4E2B36
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_4E2B36:
jmp	short loc_4E2B64

loc_4E2B38:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E30D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_4E2B64
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_4E2B64:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_4E2A40 endp

align 10h


; Attributes: bp-based frame

sub_4E2BB0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_4E2BCC:
cmp	[ebp+var_10], 0
jz	short loc_4E2C43
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_4E2C12
jb	short loc_4E2C09
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_4E2C12

loc_4E2C09:
mov	[ebp+var_64], 1
jmp	short loc_4E2C19

loc_4E2C12:
mov	[ebp+var_64], 0

loc_4E2C19:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_4E2C32
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_4E2C3B

loc_4E2C32:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_4E2C3B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_4E2BCC

loc_4E2C43:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_4E2CE5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_4E2CD6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_4E2A40
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_4E2D8B
jmp	short loc_4E2CE5

loc_4E2CD6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_4E2CE5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_4E2D1F
jb	short loc_4E2D16
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_4E2D1F

loc_4E2D16:
mov	[ebp+var_78], 1
jmp	short loc_4E2D26

loc_4E2D1F:
mov	[ebp+var_78], 0

loc_4E2D26:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_4E2D70
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_4E2A40
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_4E2D8B

loc_4E2D70:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_4E2D8B:
mov	esp, ebp
pop	ebp
retn	8
sub_4E2BB0 endp

align 10h


; Attributes: bp-based frame

sub_4E2DA0 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_4E2FA7
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 2
cmp	[ebp+var_4], eax
jbe	loc_4E2E73
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_4B9560
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_98]
call	sub_444710
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_98]
mov	[edx+8], ecx
jmp	loc_4E2F90

loc_4E2E73:
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_98]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	edx, [ebp+var_4]
jb	short loc_4E2EDA
xor	eax, eax
mov	[ebp+var_11], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_70]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+var_68]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
xor	eax, eax
mov	[ebp+var_71], al
jmp	loc_4E2F90

loc_4E2EDA:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
lea	eax, [edx+eax*4]
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	edx, [ebp+var_80]
push	edx
call	sub_406610
add	esp, 0Ch
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_90]
push	eax
mov	ecx, [ebp+var_8C]
push	ecx
call	sub_407C50
add	esp, 0Ch

loc_4E2F90:
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_98]
mov	[eax+4], edx

loc_4E2FA7:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_4E2DA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4E2FC0(void *, int)
sub_4E2FC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4E300E
mov	eax, [ebp+var_8]
call	sub_401740
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_8]
call	sub_402700
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4E3015

loc_4E300E:
mov	[ebp+var_C], 0

loc_4E3015:
mov	esp, ebp
pop	ebp
retn
sub_4E2FC0 endp

align 10h


; Attributes: bp-based frame

sub_4E3020 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CAE0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_4E3320
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E3020 endp



; Attributes: bp-based frame

sub_4E3080 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5BEF70
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4E3180
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E3080 endp

align 10h


; Attributes: bp-based frame

sub_4E30D0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDEF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4E31F0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E30D0 endp

align 10h


; Attributes: bp-based frame

sub_4E3120 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_4E3148

loc_4E313F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_4E3148:
cmp	[ebp+var_8], 0
jle	short loc_4E3172
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_4E32D0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 34h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 34h
mov	[ebp+var_4], eax
jmp	short loc_4E313F

loc_4E3172:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E3120 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4E3180(void *, int)
sub_4E3180 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4E31DA
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 0Eh
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4E31E1

loc_4E31DA:
mov	[ebp+var_C], 0

loc_4E31E1:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4E3180 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4E31F0(void *, int)
sub_4E31F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4E325D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_4E3264

loc_4E325D:
mov	[ebp+var_C], 0

loc_4E3264:
mov	esp, ebp
pop	ebp
retn
sub_4E31F0 endp

align 10h


; Attributes: bp-based frame

sub_4E3270 proc	near

var_100= dword ptr -100h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_100], ecx
mov	ecx, [ebp+var_100]
add	ecx, 1Ch
call	sub_468AA0
mov	ecx, [ebp+var_100]
add	ecx, 10h
call	sub_468AA0
mov	ecx, [ebp+var_100]
add	ecx, 4
call	sub_468AA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E32C0
mov	ecx, [ebp+var_100]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E32C0:
mov	eax, [ebp+var_100]
mov	esp, ebp
pop	ebp
retn	4
sub_4E3270 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4E32D0(void *, int)
sub_4E32D0 proc	near

var_48=	dword ptr -48h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	34h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4E3314
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4E19E0
mov	[ebp+var_48], eax
jmp	short loc_4E331B

loc_4E3314:
mov	[ebp+var_48], 0

loc_4E331B:
mov	esp, ebp
pop	ebp
retn
sub_4E32D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4E3320(void *, int)
sub_4E3320 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4E3379
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+arg_4]
add	edx, 18h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
add	eax, 18h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
jmp	short loc_4E3380

loc_4E3379:
mov	[ebp+var_10], 0

loc_4E3380:
mov	esp, ebp
pop	ebp
retn
sub_4E3320 endp

align 10h



sub_4E3390 proc	near
sub	ecx, 10h
jmp	sub_4DC770
sub_4E3390 endp

align 10h



sub_4E33A0 proc	near
sub	ecx, 0D8h
jmp	sub_4DB9F0
sub_4E33A0 endp

align 10h



sub_4E33B0 proc	near
sub	ecx, 78h
jmp	sub_4D93E0
sub_4E33B0 endp

align 10h



sub_4E33C0 proc	near
sub	ecx, 14h
jmp	sub_4D9E20
sub_4E33C0 endp

align 10h



sub_4E33D0 proc	near
sub	ecx, 0Ch
jmp	sub_4DC890
sub_4E33D0 endp

align 10h



sub_4E33E0 proc	near
sub	ecx, 38h
jmp	sub_4D9AF0
sub_4E33E0 endp

align 10h



sub_4E33F0 proc	near
sub	ecx, 0Ch
jmp	sub_4D9A90
sub_4E33F0 endp

align 10h



sub_4E3400 proc	near
sub	ecx, 88h
jmp	sub_4D9D40
sub_4E3400 endp

align 10h



sub_4E3410 proc	near
sub	ecx, 8
jmp	sub_4DC950
sub_4E3410 endp

align 10h



sub_4E3420 proc	near
sub	ecx, 38h
jmp	sub_FB5900
sub_4E3420 endp

align 10h



sub_4E3430 proc	near
sub	ecx, 10h
jmp	sub_4DC890
sub_4E3430 endp

align 10h



sub_4E3440 proc	near
sub	ecx, 8
jmp	sub_4DC8F0
sub_4E3440 endp

align 10h



sub_4E3450 proc	near
sub	ecx, 0Ch
jmp	sub_4DC8F0
sub_4E3450 endp

align 10h



sub_4E3460 proc	near
sub	ecx, 28h
jmp	sub_4D8570
sub_4E3460 endp

align 10h



sub_4E3470 proc	near
sub	ecx, 10h
jmp	sub_4DC8F0
sub_4E3470 endp

align 10h



sub_4E3480 proc	near
sub	ecx, 8
jmp	sub_4D9E20
sub_4E3480 endp

align 10h



sub_4E3490 proc	near
sub	ecx, 8
jmp	sub_4DC770
sub_4E3490 endp

align 10h



sub_4E34A0 proc	near
sub	ecx, 4
jmp	sub_4D9F60
sub_4E34A0 endp

align 10h



sub_4E34B0 proc	near
sub	ecx, 0Ch
jmp	sub_4D9E20
sub_4E34B0 endp

align 10h



sub_4E34C0 proc	near
sub	ecx, 0Ch
jmp	sub_4DC770
sub_4E34C0 endp

align 10h



sub_4E34D0 proc	near
sub	ecx, 0D4h
jmp	sub_4DB9F0
sub_4E34D0 endp

align 10h



sub_4E34E0 proc	near
sub	ecx, 8
jmp	sub_4D9F60
sub_4E34E0 endp

align 10h



sub_4E34F0 proc	near
sub	ecx, 10h
jmp	sub_4D9E20
sub_4E34F0 endp

align 10h



sub_4E3500 proc	near
sub	ecx, 8
jmp	sub_4DC890
sub_4E3500 endp

align 10h



sub_4E3510 proc	near
sub	ecx, 8
jmp	sub_4D9A90
sub_4E3510 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_4E3520(float)
sub_4E3520 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+4+var_4]
call	sub_40F4C0
add	esp, 4
pop	ebp
retn
sub_4E3520 endp

align 10h


; Attributes: bp-based frame

sub_4E3540 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_8], ecx
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
movss	xmm0, [ebp+var_8]
addss	xmm0, dword ptr	[eax]
movss	[ebp+var_8], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, [ebp+var_4]
addss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_4], xmm0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4E3540 endp

align 10h


; Attributes: bp-based frame

sub_4E35A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
shl	edx, 0Bh
mov	eax, [ebp+var_C]
lea	ecx, [eax+edx+18h]
mov	edx, [ebp+var_8]
mov	eax, [ecx+edx*8]
mov	edx, [ecx+edx*8+4]
mov	esp, ebp
pop	ebp
retn	8
sub_4E35A0 endp

align 10h


; Attributes: bp-based frame

sub_4E35E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+9], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+14h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E35E0 endp

align 10h


; Attributes: bp-based frame

sub_4E3630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4E3678
mov	ecx, 1394h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_4E367F

loc_4E3678:
mov	[ebp+var_8], 0

loc_4E367F:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4E3630 endp

align 10h


; Attributes: bp-based frame

sub_4E3690 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, 138Ah
mov	eax, [ebp+var_30]
call	sub_401100
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_15817E8
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_30]
add	ecx, 24h
mov	[ebp+var_2C], ecx
xor	edx, edx
mov	[ebp+var_14], edx
mov	[ebp+var_10], edx
mov	[ebp+var_C], edx
mov	[ebp+var_8], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_28]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_20]
mov	[ecx+8], edx
mov	eax, [ebp+var_1C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_2C]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax+8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_2C]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_2]
mov	eax, [ebp+var_2C]
mov	[eax+14h], dl
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+18h], 0
mov	edx, [ebp+var_30]
mov	byte ptr [edx+1Ch], 0
mov	eax, [ebp+var_30]
mov	dword ptr [eax+20h], 0
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn
sub_4E3690 endp

align 10h


; Attributes: bp-based frame

sub_4E3760 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_594900
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E3790
push	3Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E3790:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E3760 endp

align 10h


; Attributes: bp-based frame

sub_4E37A0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3A=	byte ptr -3Ah
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E37A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_68], ecx
mov	ecx, 1390h
mov	eax, [ebp+var_68]
call	sub_401100
mov	eax, [ebp+var_68]
mov	dword ptr [eax], offset	off_15817EC
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_68]
add	ecx, 14h
call	sub_401EF0
mov	ecx, [ebp+var_68]
add	ecx, 50h
mov	[ebp+var_38], ecx
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_38]
call	sub_5E11A0
mov	ecx, [ebp+var_38]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_E]
mov	eax, [ebp+var_38]
mov	[eax+14h], dl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
add	ecx, 68h
mov	[ebp+var_64], ecx
xor	edx, edx
mov	[ebp+var_4C], edx
mov	[ebp+var_48], edx
mov	[ebp+var_44], edx
mov	[ebp+var_40], edx
mov	eax, [ebp+var_4C]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_48]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_40]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_60]
mov	[ecx], edx
mov	eax, [ebp+var_5C]
mov	[ecx+4], eax
mov	edx, [ebp+var_58]
mov	[ecx+8], edx
mov	eax, [ebp+var_54]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_64]
call	sub_5E11A0
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_3A]
mov	eax, [ebp+var_64]
mov	[eax+14h], dl
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_68]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+3Ch], xmm0
mov	edx, [ebp+var_68]
mov	byte ptr [edx+40h], 0
mov	eax, [ebp+var_68]
mov	byte ptr [eax+41h], 0
mov	ecx, [ebp+var_68]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+48h], xmm0
mov	edx, [ebp+var_68]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+44h], xmm0
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E37A0 endp

align 10h


; Attributes: bp-based frame

sub_4E3920 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4E3960
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E394A
push	80h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E394A:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4E3920 endp

align 10h


; Attributes: bp-based frame

sub_4E3960 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E3960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 68h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 50h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_5021C0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E3960 endp

align 10h


; Attributes: bp-based frame

sub_4E39E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 13B8h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581810
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+18h], 0
mov	dword ptr [edx+1Ch], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+20h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+24h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E39E0 endp

align 10h


; Attributes: bp-based frame

sub_4E3A40 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5920F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_3C], ecx
mov	ecx, 13AEh
mov	eax, [ebp+var_3C]
call	sub_401100
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], offset	off_1581814
mov	ecx, [ebp+var_3C]
add	ecx, 0Ch
mov	[ebp+var_38], ecx
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_38]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_38]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_38]
mov	[eax+8], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_38]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_E]
mov	eax, [ebp+var_38]
mov	[eax+14h], dl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E3A40 endp

align 10h


; Attributes: bp-based frame

sub_4E3B20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4E3B7B
push	24h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4E3B7B:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4E3B20 endp

align 10h


; Attributes: bp-based frame

sub_4E3B90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, 13B5h
mov	eax, [ebp+var_8]
call	sub_401100
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1581810
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_401740
mov	eax, [ebp+var_4]
call	sub_401740
mov	edx, [ebp+var_8]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+18h], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4E3B90 endp

align 10h


; Attributes: bp-based frame

sub_4E3C00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, 13B6h
mov	eax, [ebp+var_8]
call	sub_401100
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1581810
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_401740
mov	eax, [ebp+var_4]
call	sub_401740
mov	edx, [ebp+var_8]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+18h], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4E3C00 endp

align 10h


; Attributes: bp-based frame

sub_4E3C70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E3C95
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E3C95:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E3C70 endp

align 10h


; Attributes: bp-based frame

sub_4E3CA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, 13B7h
mov	eax, [ebp+var_8]
call	sub_401100
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1581810
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_401740
mov	eax, [ebp+var_4]
call	sub_401740
mov	edx, [ebp+var_8]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+18h], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4E3CA0 endp

align 10h


; Attributes: bp-based frame

sub_4E3D10 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, 13C1h
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1581818
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+30h], 0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4E3D10 endp

align 10h


; Attributes: bp-based frame

sub_4E3D80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E3DBB
push	5Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E3DBB:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E3D80 endp

align 10h


; Attributes: bp-based frame

sub_4E3DD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_4E3DF7
fldz
jmp	short loc_4E3E07

loc_4E3DF7:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_818F90
add	esp, 8

loc_4E3E07:
mov	esp, ebp
pop	ebp
retn
sub_4E3DD0 endp

align 10h


; Attributes: bp-based frame

sub_4E3E10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_4E3E39
xor	eax, eax
jmp	short loc_4E3E4B
jmp	short loc_4E3E4B

loc_4E3E39:
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_818EC0
add	esp, 0Ch

loc_4E3E4B:
mov	esp, ebp
pop	ebp
retn
sub_4E3E10 endp

align 10h


; Attributes: bp-based frame

sub_4E3E50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
mov	[ebp+var_4], ecx
cmp	[ebp+arg_4], 0
jle	short loc_4E3E7D
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
sub	eax, [edx+20h]
sar	eax, 3
sub	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+var_10], eax
jmp	short loc_4E3E85

loc_4E3E7D:
mov	ecx, [ebp+arg_4]
neg	ecx
mov	[ebp+var_10], ecx

loc_4E3E85:
mov	edx, [ebp+var_4]
mov	eax, [edx-8]
mov	ecx, [edx-4]
mov	[ebp+var_C], eax
mov	[ebp+var_8], ecx
mov	[ebp+var_14], 1
jmp	short loc_4E3EA6

loc_4E3E9D:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_4E3EA6:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_10]
jge	short loc_4E3ED1
mov	ecx, [ebp+var_14]
shl	ecx, 3
mov	edx, [ebp+var_4]
sub	edx, ecx
mov	eax, [edx-8]
mov	ecx, [edx-4]
mov	edx, [ebp+var_14]
shl	edx, 3
mov	esi, [ebp+var_4]
sub	esi, edx
mov	[esi], eax
mov	[esi+4], ecx
jmp	short loc_4E3E9D

loc_4E3ED1:
mov	eax, [ebp+var_10]
shl	eax, 3
mov	ecx, [ebp+var_4]
sub	ecx, eax
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx+1Ch], edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_4E3E50 endp

align 10h


; Attributes: bp-based frame

sub_4E3F00 proc	near

var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_40]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_40]
add	ecx, 28h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_40]
add	ecx, 50h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_40]
add	eax, 78h
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_24]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_24]
add	eax, 8
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_40]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+84h], xmm0
mov	eax, [ebp+var_40]
mov	dword ptr [eax+88h], 0
mov	ecx, [ebp+var_40]
mov	dword ptr [ecx+8Ch], 0
mov	[ebp+var_10], 0
mov	[ebp+var_C], 0
lea	edx, [ebp+var_10]
push	edx
push	0
mov	ecx, [ebp+var_40]
add	ecx, 78h
call	sub_4FED20
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn
sub_4E3F00 endp

align 10h


; Attributes: bp-based frame

sub_4E3FE0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_18]
add	edx, 10h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
add	ecx, 1Ch
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+28h], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+30h], 0
mov	dword ptr [ecx+34h], 0
mov	edx, [ebp+var_18]
mov	byte ptr [edx+38h], 0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_4E3FE0 endp

align 10h


; Attributes: bp-based frame

sub_4E4090 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	ecx, dword_1855FC0
mov	eax, [edx+28h]
call	eax
pop	ebp
retn	4
sub_4E4090 endp



; Attributes: bp-based frame

sub_4E40B0 proc	near

var_8= dword ptr -8
Value= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+Value], 0FFFFFFFFh
mov	eax, [ebp+Value]
push	eax		; Value
mov	ecx, [ebp+var_8]
add	ecx, 4
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
mov	[ebp+Value], eax
mov	edx, [ebp+Value]
sub	edx, 1
jnz	short loc_4E40E5
mov	eax, [ebp+var_8]
push	eax
call	sub_401750

loc_4E40E5:
mov	esp, ebp
pop	ebp
retn
sub_4E40B0 endp

align 10h


; Attributes: bp-based frame

sub_4E40F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
and	edx, 0FFFFFFFCh
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_4]
call	sub_4E40B0
mov	esp, ebp
pop	ebp
retn
sub_4E40F0 endp

align 10h


; Attributes: bp-based frame

sub_4E4120 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
and	edx, 0FFFFFFFCh
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
and	edx, 0FFFFFFFCh
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_14], ecx

loc_4E415D:
mov	edx, [ebp+var_14]
mov	al, [edx]
mov	[ebp+var_15], al
mov	ecx, [ebp+var_10]
cmp	al, [ecx]
jnz	short loc_4E419A
cmp	[ebp+var_15], 0
jz	short loc_4E4191
mov	edx, [ebp+var_14]
mov	al, [edx+1]
mov	[ebp+var_16], al
mov	ecx, [ebp+var_10]
cmp	al, [ecx+1]
jnz	short loc_4E419A
add	[ebp+var_14], 2
add	[ebp+var_10], 2
cmp	[ebp+var_16], 0
jnz	short loc_4E415D

loc_4E4191:
mov	[ebp+var_1C], 0
jmp	short loc_4E41A2

loc_4E419A:
sbb	edx, edx
sbb	edx, 0FFFFFFFFh
mov	[ebp+var_1C], edx

loc_4E41A2:
mov	eax, [ebp+var_1C]
mov	[ebp+var_20], eax
xor	eax, eax
cmp	[ebp+var_20], 0
setz	al
mov	esp, ebp
pop	ebp
retn	4
sub_4E4120 endp

align 10h


; Attributes: bp-based frame

sub_4E41C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
and	edx, 0FFFFFFFCh
mov	[ebp+var_8], edx
mov	eax, 80000000h
not	eax
mov	ecx, [ebp+var_8]
and	eax, [ecx]
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
and	ecx, 0FFFFFFFCh
mov	[ebp+var_C], ecx
push	1505h
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax
call	sub_679B00
mov	esp, ebp
pop	ebp
retn	4
sub_4E41C0 endp

align 10h


; Attributes: bp-based frame

sub_4E4220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
sub	ecx, 1
mov	edx, [ebp+var_4]
mov	[edx+8], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+8], 0
jnz	short loc_4E4247
mov	ecx, [ebp+var_4]
call	sub_650DF0

loc_4E4247:
mov	esp, ebp
pop	ebp
retn
sub_4E4220 endp

align 10h


; Attributes: bp-based frame

sub_4E4250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
sub	eax, 1
mov	ecx, [ebp+var_4]
mov	[ecx+8], eax
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+8], 0
jnz	short loc_4E4281
mov	ecx, [ebp+var_4]
call	sub_650DF0

loc_4E4281:
mov	esp, ebp
pop	ebp
retn
sub_4E4250 endp

align 10h


; Attributes: bp-based frame

sub_4E4290 proc	near

var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+278h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_18], eax

loc_4E42B4:
mov	ecx, [ebp+var_14]
mov	dl, [ecx]
mov	[ebp+var_19], dl
add	[ebp+var_14], 1
cmp	[ebp+var_19], 0
jnz	short loc_4E42B4
mov	eax, [ebp+var_14]
sub	eax, [ebp+var_18]
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_4]
call	sub_650E40
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
add	edx, 1
mov	eax, [ebp+var_8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4E4290 endp

align 10h


; Attributes: bp-based frame

sub_4E4310 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+278h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_4]
call	sub_651000
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
add	edx, 1
mov	eax, [ebp+var_8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4E4310 endp

align 10h


; Attributes: bp-based frame

sub_4E4360 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+278h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_4]
call	sub_651030
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
add	edx, 1
mov	eax, [ebp+var_8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4E4360 endp

align 10h


; Attributes: bp-based frame

sub_4E43B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_0]
jz	short loc_4E4425
mov	ecx, [ebp+var_4]
call	sub_4089A0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E43D6
mov	ecx, [ebp+var_4]
call	sub_4089F0

loc_4E43D6:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	ecx, [edx+14h]
mov	edx, [ebp+var_4]
mov	[edx+10h], eax
mov	[edx+14h], ecx
mov	ecx, [ebp+arg_0]
call	sub_4089A0
movzx	eax, al
test	eax, eax
jz	short loc_4E4425
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+8]
call	sub_64AF60

loc_4E4425:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E43B0 endp

align 10h


; Attributes: bp-based frame

sub_4E4430 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+0Ch]
jz	short loc_4E444E
xor	al, al
jmp	loc_4E457F

loc_4E444E:
mov	eax, [ebp+var_14]
mov	ecx, [eax+0Ch]
and	ecx, 0Fh
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 2
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 3	; switch 4 cases
ja	loc_4E456C	; default
mov	eax, [ebp+var_18]
jmp	ds:off_4E4588[eax*4] ; switch jump

loc_4E4477:		; jumptable 004E4470 case 0
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx+10h]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+10h]
xor	eax, eax
cmp	edx, ecx
setz	al
jmp	loc_4E457F

loc_4E4491:		; jumptable 004E4470 case 1
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
fld	qword ptr [eax+10h]
fld	qword ptr [edx+10h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4E44B0
mov	[ebp+var_1C], 1
jmp	short loc_4E44B7

loc_4E44B0:
mov	[ebp+var_1C], 0

loc_4E44B7:
mov	al, byte ptr [ebp+var_1C]
jmp	loc_4E457F

loc_4E44BF:		; jumptable 004E4470 case 2
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+10h]
call	eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
mov	eax, [edx+10h]
call	eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_24], edx

loc_4E44EB:
mov	eax, [ebp+var_24]
mov	cl, [eax]
mov	[ebp+var_25], cl
mov	edx, [ebp+var_20]
cmp	cl, [edx]
jnz	short loc_4E4528
cmp	[ebp+var_25], 0
jz	short loc_4E451F
mov	eax, [ebp+var_24]
mov	cl, [eax+1]
mov	[ebp+var_26], cl
mov	edx, [ebp+var_20]
cmp	cl, [edx+1]
jnz	short loc_4E4528
add	[ebp+var_24], 2
add	[ebp+var_20], 2
cmp	[ebp+var_26], 0
jnz	short loc_4E44EB

loc_4E451F:
mov	[ebp+var_2C], 0
jmp	short loc_4E4530

loc_4E4528:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
mov	[ebp+var_2C], eax

loc_4E4530:
mov	ecx, [ebp+var_2C]
mov	[ebp+var_30], ecx
xor	eax, eax
cmp	[ebp+var_30], 0
setz	al
jmp	short loc_4E457F

loc_4E4541:		; jumptable 004E4470 case 3
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_67B360
add	esp, 8
neg	eax
sbb	eax, eax
add	eax, 1
jmp	short loc_4E457F

loc_4E456C:		; default
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+10h]
xor	edx, edx
cmp	ecx, [eax+10h]
setz	dl
mov	al, dl

loc_4E457F:
mov	esp, ebp
pop	ebp
retn	4
sub_4E4430 endp

align 4
off_4E4588 dd offset loc_4E4477	; jump table for switch	statement
dd offset loc_4E4491
dd offset loc_4E44BF
dd offset loc_4E4541
align 10h


; Attributes: bp-based frame

sub_4E45A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax
cmp	eax, 6
jz	short loc_4E45E8
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax
cmp	eax, 7
jz	short loc_4E45E8
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax
cmp	eax, 8
jz	short loc_4E45E8
mov	[ebp+var_8], 0
jmp	short loc_4E45EF

loc_4E45E8:
mov	[ebp+var_8], 1

loc_4E45EF:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4E45A0 endp

align 10h


; Attributes: bp-based frame

sub_4E4600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E4600 endp

align 10h


; Attributes: bp-based frame

sub_4E4620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_652060
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
mov	esp, ebp
pop	ebp
retn
sub_4E4620 endp

align 10h


; Attributes: bp-based frame

sub_4E4640 proc	near

var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+278h]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
add	edx, 1
mov	[ebp+var_1C], edx

loc_4E466F:
mov	eax, [ebp+var_18]
mov	cl, [eax]
mov	[ebp+var_1D], cl
add	[ebp+var_18], 1
cmp	[ebp+var_1D], 0
jnz	short loc_4E466F
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_1C]
mov	[ebp+var_24], edx
push	0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_650E40
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
add	ecx, 1
mov	edx, [ebp+var_8]
mov	[edx+8], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4E4640 endp

align 10h


; Attributes: bp-based frame

sub_4E46D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154CB6C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154CAB0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+1Ch], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+1Eh], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+20h], 0
push	offset aHud	; "HUD"
mov	ecx, [ebp+var_4]
call	sub_F80460
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E46D0 endp

align 10h


; Attributes: bp-based frame

sub_4E4730 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
fild	[ebp+arg_0]
sub	esp, 8
fstp	[esp+0Ch+var_C]
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+18h]
call	eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E4730 endp

align 10h


; Attributes: bp-based frame

sub_4E4760 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+24h]
call	eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_4E43B0
push	1
mov	ecx, [ebp+var_4]
call	sub_F8E6B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E4760 endp

align 10h


; Attributes: bp-based frame

sub_4E47B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15818F8
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4E47D4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E47D4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E47B0 endp

align 10h


; Attributes: bp-based frame

sub_4E47E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15818F8
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4E4804
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E4804:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E47E0 endp

align 10h


; Attributes: bp-based frame

sub_4E4810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15818B8
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx+2Dh]
test	edx, edx
jz	short loc_4E4842
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_4E4842
mov	edx, [ebp+var_4]
mov	eax, [edx+30h]
push	eax
call	sub_401750

loc_4E4842:
mov	ecx, [ebp+var_4]
call	sub_408B00
mov	esp, ebp
pop	ebp
retn
sub_4E4810 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4E4850(char	*Src, int, int)
sub_4E4850 proc	near

var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
SizeInBytes= dword ptr -4
Src= dword ptr	8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2Dh]
test	ecx, ecx
jz	short loc_4E487B
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2Ch]
test	eax, eax
jz	short loc_4E487B
mov	ecx, [ebp+var_8]
mov	edx, [ecx+30h]
push	edx
call	sub_401750

loc_4E487B:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_8]
mov	[eax+20h], ecx
cmp	[ebp+arg_8], 0
jz	short loc_4E4898
mov	edx, [ebp+var_8]
mov	eax, [edx+20h]
mov	ecx, [eax+10h]
mov	[ebp+var_C], ecx
jmp	short loc_4E489F

loc_4E4898:
mov	[ebp+var_C], 0

loc_4E489F:
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+2Ch], 1
mov	edx, [ebp+var_8]
mov	byte ptr [edx+2Dh], 1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	[eax+28h], ecx
mov	edx, [ebp+Src]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
add	eax, 1
mov	[ebp+var_14], eax

loc_4E48CE:
mov	ecx, [ebp+var_10]
mov	dl, [ecx]
mov	[ebp+var_15], dl
add	[ebp+var_10], 1
cmp	[ebp+var_15], 0
jnz	short loc_4E48CE
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_14]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 1
mov	[ebp+SizeInBytes], ecx
push	0
mov	edx, [ebp+SizeInBytes]
push	edx
mov	eax, dword_1855FC0
mov	edx, [eax]
mov	ecx, dword_1855FC0
mov	eax, [edx+28h]
call	eax
mov	ecx, [ebp+var_8]
mov	[ecx+30h], eax
mov	edx, [ebp+Src]
push	edx		; Src
mov	eax, [ebp+SizeInBytes]
push	eax		; SizeInBytes
mov	ecx, [ebp+var_8]
mov	edx, [ecx+30h]
push	edx		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E4850 endp

align 10h


; Attributes: bp-based frame

sub_4E4930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+2Dh]
test	ecx, ecx
jz	short loc_4E495B
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+2Ch]
test	eax, eax
jz	short loc_4E495B
mov	ecx, [ebp+var_4]
mov	edx, [ecx+30h]
push	edx
call	sub_401750

loc_4E495B:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_8]
mov	[eax+20h], ecx
cmp	[ebp+arg_8], 0
jz	short loc_4E4978
mov	edx, [ebp+var_4]
mov	eax, [edx+20h]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
jmp	short loc_4E497F

loc_4E4978:
mov	[ebp+var_8], 0

loc_4E497F:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+2Dh], 1
mov	edx, [ebp+var_4]
mov	byte ptr [edx+2Ch], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+28h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+34h], eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E4930 endp

align 10h


; Attributes: bp-based frame

sub_4E49B0 proc	near

var_4C=	dword ptr -4Ch
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	[ebp+var_10], 2
mov	al, [ebp+arg_0]
mov	[ebp+var_C], al
lea	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_4E6BD0
lea	ecx, [ebp+var_10]
call	sub_652830
mov	esp, ebp
pop	ebp
retn	4
sub_4E49B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_4E49E0(double)
sub_4E49E0 proc	near

var_4C=	dword ptr -4Ch
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= qword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	[ebp+var_10], 3
fld	[ebp+arg_0]
fstp	[ebp+var_C]
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_4C]
call	sub_4E6BD0
lea	ecx, [ebp+var_10]
call	sub_652830
mov	esp, ebp
pop	ebp
retn	8
sub_4E49E0 endp

align 10h


; Attributes: bp-based frame

sub_4E4A10 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_24=	byte ptr -24h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
mov	edx, [eax]
mov	ecx, [ebp+var_60]
mov	eax, [edx+4]
call	eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_60]
call	sub_F9AC20
mov	[ebp+var_4], eax
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	ecx, [ebp+var_60]
mov	edx, [eax+4]
call	edx
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
cmp	eax, [ebp+var_8]
jz	short loc_4E4A94
mov	ecx, [ebp+var_60]
mov	edx, [ecx+10h]
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 0
jz	short loc_4E4A6A
mov	eax, [ebp+var_14]
sub	eax, 10h
mov	[ebp+var_64], eax
jmp	short loc_4E4A71

loc_4E4A6A:
mov	[ebp+var_64], 0

loc_4E4A71:
mov	ecx, [ebp+var_64]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx
lea	ecx, [ebp+var_24]
call	sub_652700
push	eax
mov	ecx, [ebp+var_60]
call	sub_4E6BD0
lea	ecx, [ebp+var_24]
call	sub_652830

loc_4E4A94:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E4A10 endp

align 10h


; Attributes: bp-based frame

sub_4E4AA0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_38=	byte ptr -38h
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
Src= dword ptr	8

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_AC]
mov	edx, [eax]
mov	ecx, [ebp+var_AC]
mov	eax, [edx+4]
call	eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+Src]
push	ecx		; Src
mov	ecx, [ebp+var_AC]
call	sub_F8E9B0
mov	[ebp+var_4], eax
mov	edx, [ebp+var_AC]
mov	eax, [edx]
mov	ecx, [ebp+var_AC]
mov	edx, [eax+4]
call	edx
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
cmp	eax, [ebp+var_8]
jz	loc_4E4B9B
cmp	[ebp+var_C], 6
jz	short loc_4E4B05
cmp	[ebp+var_C], 7
jnz	short loc_4E4B5A

loc_4E4B05:
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+10h]
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 0
jz	short loc_4E4B25
mov	eax, [ebp+var_14]
sub	eax, 10h
mov	[ebp+var_B0], eax
jmp	short loc_4E4B2F

loc_4E4B25:
mov	[ebp+var_B0], 0

loc_4E4B2F:
mov	ecx, [ebp+var_B0]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx
lea	ecx, [ebp+var_28]
call	sub_652700
push	eax
mov	ecx, [ebp+var_AC]
call	sub_4E6BD0
lea	ecx, [ebp+var_28]
call	sub_652830
jmp	short loc_4E4B9B

loc_4E4B5A:
cmp	[ebp+var_C], 8
jnz	short loc_4E4B9B
mov	eax, [ebp+var_AC]
mov	ecx, [eax+10h]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_AC]
mov	eax, [edx+20h]
push	eax
mov	ecx, [ebp+var_18]
call	sub_654F00
push	eax
lea	ecx, [ebp+var_38]
call	sub_651CF0
push	eax
mov	ecx, [ebp+var_AC]
call	sub_4E6BD0
lea	ecx, [ebp+var_38]
call	sub_652830

loc_4E4B9B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E4AA0 endp

align 10h


; Attributes: bp-based frame

sub_4E4BB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4E4810
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E4BD3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E4BD3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E4BB0 endp

align 10h


; Attributes: bp-based frame

sub_4E4BE0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
jmp	short loc_4E4C05

loc_4E4BFC:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_4E4C05:
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_4E4C4F
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0
jz	short loc_4E4C43
push	1
mov	eax, [ebp+var_8]
mov	edx, [eax]
mov	ecx, [ebp+var_8]
mov	eax, [edx]
call	eax
mov	[ebp+var_94], eax
jmp	short loc_4E4C4D

loc_4E4C43:
mov	[ebp+var_94], 0

loc_4E4C4D:
jmp	short loc_4E4BFC

loc_4E4C4F:
mov	ecx, [ebp+var_90]
call	sub_591AF0
mov	ecx, [ebp+var_90]
add	ecx, 0Ch
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_38]
call	sub_5E0AF0
mov	ecx, [ebp+var_38]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_90]
call	sub_468AA0
mov	esp, ebp
pop	ebp
retn
sub_4E4BE0 endp

align 10h


; Attributes: bp-based frame

sub_4E4C90 proc	near
push	ebp
mov	ebp, esp
mov	eax, dword_196AF84
and	eax, 1
jnz	short loc_4E4CC3
mov	ecx, dword_196AF84
or	ecx, 1
mov	dword_196AF84, ecx
mov	ecx, offset unk_196AF60
call	sub_EFCAA0
push	offset sub_1414460 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_4E4CC3:
mov	eax, offset unk_196AF60
pop	ebp
retn
sub_4E4C90 endp

align 10h


; Attributes: bp-based frame

sub_4E4CD0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 0Ch
call	sub_47C590
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_20]
add	ecx, 0Ch
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4E4D1A
xor	eax, eax
jmp	short loc_4E4D20

loc_4E4D1A:
mov	ecx, [ebp+var_4]
mov	eax, [ecx+28h]

loc_4E4D20:
mov	esp, ebp
pop	ebp
retn	4
sub_4E4CD0 endp

align 10h


; Attributes: bp-based frame

sub_4E4D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 3729h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155844C
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0Dh], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+0Bh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0Ah], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+9], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+8], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E4D30 endp

align 10h


; Attributes: bp-based frame

sub_4E4D80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_4]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4E4DB4
mov	eax, [ebp+var_4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E4DB4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E4D80 endp

align 10h


; Attributes: bp-based frame

sub_4E4DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax]
add	eax, 7
shr	eax, 3
mov	esp, ebp
pop	ebp
retn
sub_4E4DC0 endp

align 10h


; Attributes: bp-based frame

sub_4E4DE0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, [ebp+arg_0]
test	eax, eax
jz	short loc_4E4DF9
mov	eax, [ebp+var_4]
call	sub_A494B0
jmp	short loc_4E4E01

loc_4E4DF9:
mov	eax, [ebp+var_4]
call	sub_A494F0

loc_4E4E01:
mov	esp, ebp
pop	ebp
retn	4
sub_4E4DE0 endp

align 10h


; Attributes: bp-based frame

sub_4E4E10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
add	ecx, 1
mov	edx, [ebp+var_4]
cmp	ecx, [edx]
jbe	short loc_4E4E32
mov	eax, [ebp+var_4]
mov	byte ptr [eax+0Ch], 1
xor	al, al
jmp	short loc_4E4E78

loc_4E4E32:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
shr	edx, 3
mov	eax, [ebp+var_4]
mov	ecx, [eax+10h]
movzx	edx, byte ptr [ecx+edx]
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
and	ecx, 7
mov	eax, 80h
sar	eax, cl
and	edx, eax
jz	short loc_4E4E61
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx],	1
jmp	short loc_4E4E67

loc_4E4E61:
mov	edx, [ebp+arg_0]
mov	byte ptr [edx],	0

loc_4E4E67:
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
add	ecx, 1
mov	edx, [ebp+var_4]
mov	[edx+8], ecx
mov	al, 1

loc_4E4E78:
mov	esp, ebp
pop	ebp
retn	4
sub_4E4E10 endp

align 10h


; Attributes: bp-based frame

sub_4E4E80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+4]
call	sub_F88AC0
push	1
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
call	sub_F8FF70
mov	esp, ebp
pop	ebp
retn	8
sub_4E4E80 endp

align 10h


; Attributes: bp-based frame

sub_4E4EB0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 38h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_10]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+64h], xmm0
mov	edx, [ebp+var_10]
movss	xmm0, ds:dword_15FCCC0
movss	dword ptr [edx+68h], xmm0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4E4EB0 endp

align 10h


; Attributes: bp-based frame

sub_4E4F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	esp, ebp
pop	ebp
retn	1Ch
sub_4E4F30 endp

align 10h


; Attributes: bp-based frame

sub_4E4F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwogameobjinte ; "LWOGameObjInterface"
mov	esp, ebp
pop	ebp
retn
sub_4E4F40 endp



; Attributes: bp-based frame

sub_4E4F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1513D50
mov	esp, ebp
pop	ebp
retn
sub_4E4F50 endp



; Attributes: bp-based frame

sub_4E4F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+0CCh]
mov	esp, ebp
pop	ebp
retn
sub_4E4F60 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION ios::lockptr(void). PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4E4FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 54h
mov	esp, ebp
pop	ebp
retn
sub_4E4FA0 endp

align 10h


; Attributes: bp-based frame

sub_4E4FC0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5920F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_3C], ecx
push	234Ah
mov	ecx, [ebp+var_3C]
call	sub_42CD70
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], offset	off_15819EC
mov	ecx, [ebp+var_3C]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_3C]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_3C]
add	ecx, 3Ch
mov	[ebp+var_38], ecx
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_38]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_38]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_38]
mov	[eax+8], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_38]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_E]
mov	eax, [ebp+var_38]
mov	[eax+14h], dl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_3C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+24h], xmm0
mov	edx, [ebp+var_3C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+28h], xmm0
mov	eax, [ebp+var_3C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+2Ch], xmm0
mov	ecx, [ebp+var_3C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+30h], xmm0
mov	edx, [ebp+var_3C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+34h], xmm0
mov	eax, [ebp+var_3C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+38h], xmm0
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E4FC0 endp

align 10h


; Attributes: bp-based frame

sub_4E5110 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 3Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_456120
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4E516B
push	54h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_4E516B:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4E5110 endp

align 10h


; Attributes: bp-based frame

sub_4E5180 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
push	235Ah
mov	ecx, [ebp+var_10]
call	sub_42CD70
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15819F0
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 2Ch
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
add	eax, 0Ch
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	edx, [ebp+var_10]
add	edx, 18h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+24h], 0
mov	edx, [ebp+var_10]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+28h], xmm0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4E5180 endp

align 10h


; Attributes: bp-based frame

sub_4E5250 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
push	235Ch
mov	ecx, [ebp+var_10]
call	sub_42CD70
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15819F0
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_10]
add	ecx, 2Ch
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
add	eax, 0Ch
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	edx, [ebp+var_10]
add	edx, 18h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+24h], 0
mov	edx, [ebp+var_10]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+28h], xmm0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4E5250 endp

align 10h


; Attributes: bp-based frame

sub_4E5320 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 2Ch
call	sub_487140
mov	ecx, [ebp+var_58]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E5352
push	38h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E5352:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5320 endp

align 10h


; Attributes: bp-based frame

sub_4E5360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwotimer ;	"LWOTimer"
mov	esp, ebp
pop	ebp
retn
sub_4E5360 endp



; Attributes: bp-based frame

sub_4E5370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1513DF8
mov	esp, ebp
pop	ebp
retn
sub_4E5370 endp



; Attributes: bp-based frame

sub_4E5380 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5076A0
mov	esp, ebp
pop	ebp
retn	4
sub_4E5380 endp

align 10h


; Attributes: bp-based frame

sub_4E53A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
mov	byte ptr [ecx+28h], 1
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+8]
mov	edx, [eax]
mov	eax, [edx+8]
call	eax
mov	ecx, [ebp+var_4]
mov	[ecx+0Ch], eax
mov	esp, ebp
pop	ebp
retn
sub_4E53A0 endp

align 10h


; Attributes: bp-based frame

sub_4E53D0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	dl, [ecx+28h]
mov	[ebp+var_1], dl
movzx	eax, [ebp+var_1]
test	eax, eax
jnz	short loc_4E5404
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	edx, [edx]
mov	eax, [edx+4]
call	eax
jmp	short loc_4E540A
jmp	short loc_4E540A

loc_4E5404:
mov	ecx, [ebp+var_8]
mov	eax, [ecx+0Ch]

loc_4E540A:
mov	esp, ebp
pop	ebp
retn
sub_4E53D0 endp

align 10h


; Attributes: bp-based frame

sub_4E5410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+30h], 0
jz	short loc_4E543C
push	ecx
fldz
fstp	[esp+8+var_8]
mov	ecx, [ebp+var_4]
mov	edx, [ecx+3Ch]
push	edx
mov	eax, [ecx+38h]
push	eax
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+30h]
call	sub_F88560

loc_4E543C:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_4E5410 endp

align 10h


; Attributes: bp-based frame

sub_4E5450 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F5B1A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E5473
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E5473:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5450 endp

align 10h


; Attributes: bp-based frame

sub_4E5480 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 80h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_501C30
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_F5B1A0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4E54DB
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E54DB:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4E5480 endp

align 10h


; Attributes: bp-based frame

sub_4E54F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4E54F0 endp

align 10h


; Attributes: bp-based frame

sub_4E5530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_4E5530 endp

align 10h


; Attributes: bp-based frame

sub_4E5560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4E5560 endp

align 10h


; Attributes: bp-based frame

sub_4E5580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 84h
call	sub_501BE0
mov	esp, ebp
pop	ebp
retn
sub_4E5580 endp

align 10h


; Attributes: bp-based frame

sub_4E55A0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax+9Ch], cl
mov	esp, ebp
pop	ebp
retn	4
sub_4E55A0 endp

align 10h


; Attributes: bp-based frame

sub_4E55C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+0A4h]
mov	esp, ebp
pop	ebp
retn
sub_4E55C0 endp

align 10h


; Attributes: bp-based frame

sub_4E55E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 84h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_501BE0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_F5B1A0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4E563B
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E563B:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4E55E0 endp

align 10h


; Attributes: bp-based frame

sub_4E5650 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
add	ecx, 0Ch
lea	eax, [ebp+var_8]
call	sub_4046E0
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 0Ch
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	eax, eax
cmp	ecx, [ebp+var_8]
setnz	al
mov	esp, ebp
pop	ebp
retn	4
sub_4E5650 endp

align 10h


; Attributes: bp-based frame

sub_4E56A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	byte ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158181C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_8]
mov	[ecx+10h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_10]
mov	[eax+14h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_1C]
mov	[edx+18h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_C]
mov	[ecx+1Ch], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+20h], 0
mov	ecx, [ebp+var_4]
mov	dl, [ebp+arg_14]
mov	[ecx+24h], dl
mov	eax, [ebp+var_4]
mov	byte ptr [eax+25h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+26h], 0
mov	edx, [ebp+var_4]
mov	al, [ebp+arg_18]
mov	[edx+27h], al
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	20h
sub_4E56A0 endp

align 10h


; Attributes: bp-based frame

sub_4E5720 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+25h], 1
mov	ecx, [ebp+var_4]
mov	dl, [ebp+arg_0]
mov	[ecx+26h], dl
mov	esp, ebp
pop	ebp
retn	4
sub_4E5720 endp

align 10h


; Attributes: bp-based frame

sub_4E5740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+20h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4E5740 endp

align 10h


; Attributes: bp-based frame

sub_4E5760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+1], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5760 endp



; Attributes: bp-based frame

sub_4E57A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+20h], 0
mov	dword ptr [ecx+24h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+28h], 0
push	ecx		; float
fldz
fstp	[esp+8+var_8]
push	ecx		; float
fldz
fstp	[esp+0Ch+var_C]
push	ecx		; float
fldz
fstp	[esp+10h+var_10]
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_40F570
mov	eax, [ebp+var_4]
mov	byte ptr [eax+38h], 1
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+39h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+3Ah], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+3Bh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+3Ch], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+40h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+44h], xmm0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+48h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+50h], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+54h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E57A0 endp

align 10h


; Attributes: bp-based frame

sub_4E5890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15818A0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+8], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_403400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E5890 endp

align 10h


; Attributes: bp-based frame

sub_4E58D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581AB4
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158181C
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4E5908
mov	eax, [ebp+var_4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E5908:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E58D0 endp

align 10h


; Attributes: bp-based frame

sub_4E5920 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1581AD8
mov	ecx, [ebp+var_C]
mov	edx, [ecx+80h]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4E595D
push	1
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx]
call	eax
mov	[ebp+var_10], eax
jmp	short loc_4E5964

loc_4E595D:
mov	[ebp+var_10], 0

loc_4E5964:
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+80h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx], offset	off_158181C
mov	esp, ebp
pop	ebp
retn
sub_4E5920 endp

align 10h


; Attributes: bp-based frame

sub_4E5980 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+25h], 1
mov	ecx, [ebp+var_4]
mov	dl, [ebp+arg_0]
mov	[ecx+26h], dl
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+80h], 0
jz	short loc_4E59C3
mov	ecx, [ebp+var_4]
add	ecx, 28h
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+80h]
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+80h]
mov	edx, [eax]
mov	eax, [edx+10h]
call	eax

loc_4E59C3:
mov	esp, ebp
pop	ebp
retn	4
sub_4E5980 endp

align 10h


; Attributes: bp-based frame

sub_4E59D0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4E5920
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E59F5
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E59F5:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4E59D0 endp

align 10h


; Attributes: bp-based frame

sub_4E5A00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1facet@locale@std@@UAE@XZ_10 ; std::locale::facet::~facet(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E5A25
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E5A25:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5A00 endp

align 10h


; Attributes: bp-based frame

sub_4E5A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_4E5A30 endp

align 10h


; Attributes: bp-based frame

sub_4E5A50 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
push	0BBCh
mov	ecx, [ebp+var_10]
call	sub_42CCA0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1581B48
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_10]
add	ecx, 60h
call	sub_10FB830
mov	ecx, [ebp+var_10]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+5Ch], xmm0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4E5A50 endp

align 10h


; Attributes: bp-based frame

sub_4E5AD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4E5B00
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E5AF5
push	7Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E5AF5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5AD0 endp

align 10h


; Attributes: bp-based frame

sub_4E5B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	esp, ebp
pop	ebp
retn
sub_4E5B00 endp

align 10h


; Attributes: bp-based frame

sub_4E5B40 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0BC5h
mov	ecx, [ebp+var_C]
call	sub_42CCA0
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1581B4C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4E5B40 endp

align 10h


; Attributes: bp-based frame

sub_4E5B90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E5BC0
push	34h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E5BC0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5B90 endp

align 10h


; Attributes: bp-based frame

sub_4E5BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BD5h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E608
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5BD0 endp

align 10h


; Attributes: bp-based frame

sub_4E5C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BD9h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E608
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5C10 endp

align 10h


; Attributes: bp-based frame

sub_4E5C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BE4h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A08
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0Fh], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0Eh], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+0Dh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+14h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+10h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5C50 endp



; Attributes: bp-based frame

sub_4E5CB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BFDh
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E608
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5CB0 endp

align 10h


; Attributes: bp-based frame

sub_4E5CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BFFh
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581B50
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+14h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+1Eh], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+1Dh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+1Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5CF0 endp

align 10h


; Attributes: bp-based frame

sub_4E5D70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E5D95
push	20h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E5D95:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5D70 endp

align 10h


; Attributes: bp-based frame

sub_4E5DA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E5DC5
push	10h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E5DC5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5DA0 endp

align 10h


; Attributes: bp-based frame

sub_4E5DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0C09h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C020C
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+10h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+1Ah], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+19h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+18h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5DD0 endp

align 10h


; Attributes: bp-based frame

sub_4E5E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0C12h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A08
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E5E40 endp

align 10h


; Attributes: bp-based frame

sub_4E5E90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1]
mov	[eax+1], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+8]
fstp	dword ptr [edx+8]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0Ch]
fstp	dword ptr [ecx+0Ch]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+arg_0]
add	eax, 14h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 3Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 64h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 64h
call	sub_403400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E5E90 endp

align 10h


; Attributes: bp-based frame

sub_4E5F20 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
lea	ecx, [ebp+var_11]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_30]
call	sub_402390
lea	ecx, [ebp+var_11]
call	nullsub_1
lea	ecx, [ebp+var_12]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_30]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_12]
call	nullsub_1
lea	ecx, [ebp+var_13]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_30]
add	ecx, 58h
call	sub_402390
lea	ecx, [ebp+var_13]
call	nullsub_1
lea	ecx, [ebp+var_14]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_30]
add	ecx, 0ACh
call	sub_4022A0
lea	ecx, [ebp+var_14]
call	nullsub_1
push	ecx
fldz
fstp	[esp+34h+var_34]
push	ecx
fldz
fstp	[esp+38h+var_38]
push	ecx
fldz
fstp	[esp+3Ch+var_3C]
push	ecx
fldz
fstp	[esp+40h+var_40]
mov	ecx, [ebp+var_30]
add	ecx, 0E4h
call	sub_40A410
lea	ecx, [ebp+var_15]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_30]
add	ecx, 104h
call	sub_4022A0
lea	ecx, [ebp+var_15]
call	nullsub_1
mov	ecx, [ebp+var_30]
add	ecx, 120h
call	sub_10FB830
mov	eax, [ebp+var_30]
mov	byte ptr [eax+80h], 0
mov	ecx, [ebp+var_30]
mov	byte ptr [ecx+81h], 1
mov	edx, [ebp+var_30]
mov	dword ptr [edx+28h], 0FFFFFFFFh
mov	eax, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+2Ch], xmm0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+84h], 0
mov	edx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+88h], xmm0
mov	eax, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8Ch], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+90h], xmm0
mov	edx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+94h], xmm0
mov	eax, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+98h], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+9Ch], xmm0
mov	edx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0A0h], xmm0
mov	eax, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0A4h], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0A8h], xmm0
mov	edx, [ebp+var_30]
mov	dword ptr [edx+0C4h], 0FFFFFFFFh
mov	eax, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0C8h], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0CCh], xmm0
mov	edx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0D0h], xmm0
mov	eax, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0D4h], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0D8h], xmm0
mov	edx, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0DCh], xmm0
mov	eax, [ebp+var_30]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0E0h], xmm0
mov	ecx, dword_17EE158
mov	[ebp+var_10], ecx
mov	edx, dword_17EE15C
mov	[ebp+var_C], edx
mov	eax, dword_17EE160
mov	[ebp+var_8], eax
mov	ecx, dword_17EE164
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	dword ptr [edx+0F4h], 0FFFFFFFFh
mov	eax, [ebp+var_30]
mov	dword ptr [eax+0F8h], 0FFFFFFFFh
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+0FCh], 0FFFFFFFFh
mov	edx, [ebp+var_30]
movss	xmm0, ds:dword_1577A70
movss	dword ptr [edx+100h], xmm0
mov	eax, [ebp+var_30]
mov	byte ptr [eax+11Ch], 0
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn
sub_4E5F20 endp

align 10h


; Attributes: bp-based frame

sub_4E61E0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2755h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
push	offset aNone	; "(none)"
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402310
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4E61E0 endp

align 10h


; Attributes: bp-based frame

sub_4E6240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 120h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 104h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0ACh
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_4E6240 endp

align 10h


; Attributes: bp-based frame

sub_4E62A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_403400
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+2Ch]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+arg_0]
add	eax, 30h
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 30h
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 58h
push	ecx
mov	ecx, [ebp+var_34]
add	ecx, 58h
call	sub_403400
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	cl, [eax+80h]
mov	[edx+80h], cl
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	cl, [eax+81h]
mov	[edx+81h], cl
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+84h]
mov	[edx+84h], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+88h]
fstp	dword ptr [edx+88h]
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8Ch]
fstp	dword ptr [ecx+8Ch]
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+90h]
fstp	dword ptr [eax+90h]
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+94h]
fstp	dword ptr [edx+94h]
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+98h]
fstp	dword ptr [ecx+98h]
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+9Ch]
fstp	dword ptr [eax+9Ch]
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0A0h]
fstp	dword ptr [edx+0A0h]
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0A4h]
fstp	dword ptr [ecx+0A4h]
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0A8h]
fstp	dword ptr [eax+0A8h]
mov	edx, [ebp+arg_0]
add	edx, 0ACh
push	edx
mov	ecx, [ebp+var_34]
add	ecx, 0ACh
call	sub_403850
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0C4h]
mov	[eax+0C4h], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0C8h]
fstp	dword ptr [eax+0C8h]
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0CCh]
fstp	dword ptr [edx+0CCh]
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0D0h]
fstp	dword ptr [ecx+0D0h]
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0D4h]
fstp	dword ptr [eax+0D4h]
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0D8h]
fstp	dword ptr [edx+0D8h]
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0DCh]
fstp	dword ptr [ecx+0DCh]
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0E0h]
fstp	dword ptr [eax+0E0h]
mov	edx, [ebp+arg_0]
add	edx, 0E4h
mov	eax, [ebp+var_34]
add	eax, 0E4h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0F4h]
mov	[eax+0F4h], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0F8h]
mov	[eax+0F8h], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0FCh]
mov	[eax+0FCh], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+100h]
fstp	dword ptr [eax+100h]
mov	edx, [ebp+arg_0]
add	edx, 104h
push	edx
mov	ecx, [ebp+var_34]
add	ecx, 104h
call	sub_403850
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+11Ch]
mov	[eax+11Ch], dl
mov	eax, [ebp+arg_0]
add	eax, 120h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_34]
add	ecx, 120h
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_4694E0
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_30]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_4E62A0 endp

align 10h


; Attributes: bp-based frame

sub_4E6550 proc	near

var_20=	dword ptr -20h
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_20]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 28h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 50h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 78h
call	sub_402390
lea	ecx, [ebp+var_4]
call	nullsub_1
lea	ecx, [ebp+var_5]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 0A0h
call	sub_402390
lea	ecx, [ebp+var_5]
call	nullsub_1
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_4E6550 endp

align 10h


; Attributes: bp-based frame

sub_4E65F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A0h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_4E65F0 endp

align 10h


; Attributes: bp-based frame

sub_4E6640 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 50h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_403400
mov	eax, [ebp+arg_0]
add	eax, 78h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 0A0h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A0h
call	sub_403400
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0C8h]
mov	[edx+0C8h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+0CCh]
mov	[edx+0CCh], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0D0h]
mov	[edx+0D0h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6640 endp



; Attributes: bp-based frame

sub_4E66E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 50h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_4023E0
mov	eax, [ebp+arg_0]
add	eax, 78h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 0A0h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A0h
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0C8h]
mov	[edx+0C8h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+0CCh]
mov	[edx+0CCh], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0D0h]
mov	[edx+0D0h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E66E0 endp



; Attributes: bp-based frame

sub_4E6780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581B74
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 1
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+10h], edx
mov	eax, [ebp+arg_8]
mov	[ecx+14h], eax
or	ecx, 0FFFFFFFFh
cmp	ecx, 1
jnb	short loc_4E67D6
mov	edx, 1
cmp	edx, 8
jnb	short loc_4E67D6
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 1
mov	[ebp+var_8], 1
jmp	short loc_4E67E7

loc_4E67D6:
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+18h], 0
mov	[ebp+var_8], 0

loc_4E67E7:
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_1581B7C
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+20h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+24h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E6780 endp

align 10h


; Attributes: bp-based frame

sub_4E6820 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
movzx	eax, [ebp+arg_C]
neg	eax
sbb	eax, eax
add	eax, 3
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_1581B74
mov	edx, [ebp+var_8]
mov	byte ptr [edx+8], 1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[edx+10h], eax
mov	ecx, [ebp+arg_8]
mov	[edx+14h], ecx
cmp	[ebp+var_4], 0FFFFFFFFh
jbe	short loc_4E687C
cmp	[ebp+var_4], 8
jnb	short loc_4E687C
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx+18h], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
jmp	short loc_4E688D

loc_4E687C:
mov	edx, [ebp+var_8]
mov	dword ptr [edx+18h], 0
mov	[ebp+var_C], 0

loc_4E688D:
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1581B80
mov	ecx, [ebp+var_8]
mov	dl, [ebp+arg_C]
mov	[ecx+20h], dl
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+24h], xmm0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	10h
sub_4E6820 endp

align 10h


; Attributes: bp-based frame

sub_4E68C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
movzx	eax, [ebp+arg_C]
neg	eax
sbb	eax, eax
add	eax, 5
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_1581B74
mov	edx, [ebp+var_8]
mov	byte ptr [edx+8], 1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[edx+10h], eax
mov	ecx, [ebp+arg_8]
mov	[edx+14h], ecx
cmp	[ebp+var_4], 0FFFFFFFFh
jbe	short loc_4E691C
cmp	[ebp+var_4], 8
jnb	short loc_4E691C
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx+18h], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
jmp	short loc_4E692D

loc_4E691C:
mov	edx, [ebp+var_8]
mov	dword ptr [edx+18h], 0
mov	[ebp+var_C], 0

loc_4E692D:
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1581B84
mov	ecx, [ebp+var_8]
mov	dl, [ebp+arg_C]
mov	[ecx+20h], dl
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+24h], xmm0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+28h], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	10h
sub_4E68C0 endp

align 10h


; Attributes: bp-based frame

sub_4E6970 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
movzx	eax, [ebp+arg_C]
neg	eax
sbb	eax, eax
and	eax, 0
add	eax, 6
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_1581B74
mov	edx, [ebp+var_8]
mov	byte ptr [edx+8], 1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[edx+10h], eax
mov	ecx, [ebp+arg_8]
mov	[edx+14h], ecx
cmp	[ebp+var_4], 0FFFFFFFFh
jbe	short loc_4E69CF
cmp	[ebp+var_4], 8
jnb	short loc_4E69CF
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx+18h], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
jmp	short loc_4E69E0

loc_4E69CF:
mov	edx, [ebp+var_8]
mov	dword ptr [edx+18h], 0
mov	[ebp+var_C], 0

loc_4E69E0:
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1581B88
mov	ecx, [ebp+var_8]
mov	dl, [ebp+arg_C]
mov	[ecx+20h], dl
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+24h], xmm0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+28h], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	10h
sub_4E6970 endp

align 10h


; Attributes: bp-based frame

sub_4E6A20 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+arg_0]
call	sub_652060
mov	eax, [ebp+arg_0]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_3C]
movzx	edx, byte ptr [ecx+2Ch]
test	edx, edx
jz	loc_4E6B5B
mov	eax, [ebp+var_3C]
mov	ecx, [eax+28h]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+28h]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
call	edx
xor	ecx, ecx
cmp	eax, 8
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4E6ABE
mov	eax, [ebp+var_3C]
mov	ecx, [eax+28h]
mov	edx, [ecx+10h]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+20h]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_654F00
mov	[ebp+var_40], eax
cmp	[ebp+var_40], 0
jz	short loc_4E6AA6
mov	edx, [ebp+var_40]
add	edx, 78h
mov	[ebp+var_44], edx
jmp	short loc_4E6AAD

loc_4E6AA6:
mov	[ebp+var_44], 0

loc_4E6AAD:
mov	eax, [ebp+var_44]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_4E6ABE
jmp	loc_4E6BBF

loc_4E6ABE:
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+20h]
mov	eax, [edx+30h]
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+20h]
mov	ecx, [edx+30h]
mov	eax, [eax]
mov	edx, [eax+70h]
call	edx
mov	[ebp+var_4], eax
mov	eax, [ebp+var_3C]
mov	ecx, [eax+30h]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+78h]
add	ecx, 8
call	sub_4E4290
push	0
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
add	eax, 78h
push	eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	ecx, [ebp+var_C]
mov	eax, [edx+24h]
call	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E6B33
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx

loc_4E6B33:
mov	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+8]
sub	edx, 1
mov	eax, [ebp+var_34]
mov	[eax+8], edx
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jnz	short loc_4E6B59
mov	ecx, [ebp+var_34]
call	sub_650DF0

loc_4E6B59:
jmp	short loc_4E6BBF

loc_4E6B5B:
mov	edx, [ebp+var_3C]
mov	eax, [edx+28h]
mov	ecx, [eax+10h]
mov	[ebp+var_1C], ecx
cmp	[ebp+var_1C], 0
jz	short loc_4E6B78
mov	edx, [ebp+var_1C]
sub	edx, 10h
mov	[ebp+var_48], edx
jmp	short loc_4E6B7F

loc_4E6B78:
mov	[ebp+var_48], 0

loc_4E6B7F:
mov	eax, [ebp+var_48]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+3Ch]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+34h]
cmp	ecx, [ebp+var_38]
jb	short loc_4E6B9B
jmp	short loc_4E6BBF

loc_4E6B9B:
mov	edx, [ebp+var_3C]
mov	eax, [edx+34h]
mov	ecx, [ebp+var_18]
mov	edx, [ecx+38h]
mov	eax, [edx+eax*4]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_4E6BBF
mov	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_652520

loc_4E6BBF:
mov	esp, ebp
pop	ebp
retn	4
sub_4E6A20 endp

align 10h


; Attributes: bp-based frame

sub_4E6BD0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	loc_4E6D13
mov	edx, [ebp+var_3C]
mov	eax, [edx+28h]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx+28h]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
mov	eax, [edx+4]
call	eax
xor	ecx, ecx
cmp	eax, 8
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4E6C60
mov	eax, [ebp+var_3C]
mov	ecx, [eax+28h]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+20h]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_654F00
mov	[ebp+var_40], eax
cmp	[ebp+var_40], 0
jz	short loc_4E6C48
mov	edx, [ebp+var_40]
add	edx, 78h
mov	[ebp+var_44], edx
jmp	short loc_4E6C4F

loc_4E6C48:
mov	[ebp+var_44], 0

loc_4E6C4F:
mov	eax, [ebp+var_44]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jnz	short loc_4E6C60
jmp	loc_4E6D50

loc_4E6C60:
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+20h]
mov	eax, [edx+30h]
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+20h]
mov	ecx, [edx+30h]
mov	eax, [eax]
mov	edx, [eax+70h]
call	edx
mov	[ebp+var_4], eax
mov	[ebp+var_15], 0
mov	eax, [ebp+var_3C]
mov	ecx, [eax+20h]
mov	edx, [ecx+23C4h]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+30h]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+280h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_651000
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+8]
add	edx, 1
mov	eax, [ebp+var_2C]
mov	[eax+8], edx
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax+0Ch]
call	edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	edx, [ecx+8]
sub	edx, 1
mov	eax, [ebp+var_38]
mov	[eax+8], edx
mov	ecx, [ebp+var_38]
cmp	dword ptr [ecx+8], 0
jnz	short loc_4E6D11
mov	ecx, [ebp+var_38]
call	sub_650DF0

loc_4E6D11:
jmp	short loc_4E6D50

loc_4E6D13:
mov	edx, [ebp+var_3C]
mov	eax, [edx+28h]
mov	ecx, [eax+10h]
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 0
jz	short loc_4E6D30
mov	edx, [ebp+var_14]
sub	edx, 10h
mov	[ebp+var_48], edx
jmp	short loc_4E6D37

loc_4E6D30:
mov	[ebp+var_48], 0

loc_4E6D37:
mov	eax, [ebp+var_48]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx+34h]
push	eax
mov	ecx, [ebp+var_10]
call	sub_65EA00

loc_4E6D50:
mov	esp, ebp
pop	ebp
retn	4
sub_4E6BD0 endp

align 10h


; Attributes: bp-based frame

sub_4E6D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0FFFFFFFFh
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+14h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+15h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E6D60 endp

align 10h


; Attributes: bp-based frame

sub_4E6DC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7F110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E6DE8
push	0BCh
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E6DE8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6DC0 endp

align 10h


; Attributes: bp-based frame

sub_4E6E00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5E0AF0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4E6E43
push	20h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_4E6E43:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6E00 endp

align 10h


; Attributes: bp-based frame

sub_4E6E50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F750E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E6E78
push	218h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E6E78:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6E50 endp

align 10h


; Attributes: bp-based frame

sub_4E6E90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F750E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E6EB8
push	258h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E6EB8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6E90 endp

align 10h


; Attributes: bp-based frame

sub_4E6ED0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F78290
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E6EF8
push	250h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E6EF8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6ED0 endp

align 10h


; Attributes: bp-based frame

sub_4E6F10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F78270
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E6F38
push	218h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E6F38:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6F10 endp

align 10h


; Attributes: bp-based frame

sub_4E6F50 proc	near

var_58=	dword ptr -58h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 20h
call	sub_487140
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_4E6F50 endp



; Attributes: bp-based frame

sub_4E6F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F78250
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E6F98
push	220h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E6F98:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6F70 endp

align 10h


; Attributes: bp-based frame

sub_4E6FB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F78230
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E6FD8
push	220h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E6FD8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6FB0 endp

align 10h


; Attributes: bp-based frame

sub_4E6FF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F78210
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E7018
push	238h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E7018:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E6FF0 endp

align 10h


; Attributes: bp-based frame

sub_4E7030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F781F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E7058
push	218h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E7058:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E7030 endp

align 10h


; Attributes: bp-based frame

sub_4E7070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2
mov	ecx, [ebp+var_4]
mov	[ecx], ax
mov	edx, [ebp+var_4]
mov	byte ptr [edx+6], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_4E7070 endp



; Attributes: bp-based frame

sub_4E7090 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1F5Dh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4E7090 endp

align 10h


; Attributes: bp-based frame

sub_4E70E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1F7Fh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15583C8
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_4], ecx
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_8], edx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_8]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_8]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_8]
mov	[edx], ax
mov	eax, [ebp+var_C]
mov	byte ptr [eax+18h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+19h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_4E70E0 endp

align 10h


; Attributes: bp-based frame

sub_4E7190 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	ecx, 1C13h
mov	eax, [ebp+var_38]
call	sub_401100
mov	eax, [ebp+var_38]
mov	dword ptr [eax], offset	off_1580644
mov	ecx, [ebp+var_38]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_38]
add	ecx, 10h
mov	[ebp+var_30], ecx
xor	edx, edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	[ebp+var_10], edx
mov	[ebp+var_C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	eax, [ebp+var_28]
mov	[ecx+4], eax
mov	edx, [ebp+var_24]
mov	[ecx+8], edx
mov	eax, [ebp+var_20]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_30]
call	sub_5E11A0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_2]
mov	eax, [ebp+var_30]
mov	[eax+14h], dl
mov	ecx, [ebp+var_38]
add	ecx, 8
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, dword_188F85C
mov	[edx], eax
mov	ecx, [ebp+var_34]
mov	edx, dword_188F860
mov	[ecx+4], edx
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn
sub_4E7190 endp

align 10h


; Attributes: bp-based frame

sub_4E7260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5021C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E7290
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E7290:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E7260 endp

align 10h


; Attributes: bp-based frame

sub_4E72A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_A496A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E72C3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E72C3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E72A0 endp

align 10h


; Attributes: bp-based frame

sub_4E72D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwogameobjprox ; "LWOGameObjProxy"
mov	esp, ebp
pop	ebp
retn
sub_4E72D0 endp



; Attributes: bp-based frame

sub_4E72E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset unk_1513DE0
mov	esp, ebp
pop	ebp
retn
sub_4E72E0 endp



; Attributes: bp-based frame

sub_4E72F0 proc	near
push	ebp
mov	ebp, esp
mov	eax, dword_1889824
pop	ebp
retn
sub_4E72F0 endp

align 10h


; Attributes: bp-based frame

sub_4E7300 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5920F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	eax, dword_196AF10
and	eax, 1
jnz	loc_4E73BB
mov	ecx, dword_196AF10
or	ecx, 1
mov	dword_196AF10, ecx
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	eax, [ebp+var_20]
mov	dword_196AEF8, eax
mov	ecx, [ebp+var_1C]
mov	dword_196AEFC, ecx
mov	edx, [ebp+var_18]
mov	dword_196AF00, edx
mov	eax, [ebp+var_14]
mov	dword_196AF04, eax
mov	byte ptr dword_196AEF8,	0
mov	dword_196AEFC, 0
mov	dword_196AF00, offset dword_196AEF8
mov	dword_196AF04, offset dword_196AEF8
mov	dword_196AF08, 0
mov	cl, [ebp+var_E]
mov	byte_196AF0C, cl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
push	offset sub_14145B0 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_4E73BB:
mov	eax, offset dword_196AEF8
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E7300 endp

align 10h


; Attributes: bp-based frame

sub_4E73D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F972D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E73F8
push	100h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_4E73F8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E73D0 endp

align 10h


; Attributes: bp-based frame

sub_4E7410 proc	near

var_724= dword ptr -724h
var_720= dword ptr -720h
var_71C= dword ptr -71Ch
var_718= qword ptr -718h
var_710= dword ptr -710h
var_70C= dword ptr -70Ch
var_708= dword ptr -708h
var_704= byte ptr -704h
var_703= byte ptr -703h
var_702= byte ptr -702h
var_701= byte ptr -701h
var_700= dword ptr -700h
var_6FA= byte ptr -6FAh
var_6F9= byte ptr -6F9h
var_6F8= dword ptr -6F8h
var_6F4= dword ptr -6F4h
var_6F0= dword ptr -6F0h
var_6EC= dword ptr -6ECh
var_6E8= dword ptr -6E8h
var_68C= dword ptr -68Ch
var_688= dword ptr -688h
var_654= dword ptr -654h
var_640= dword ptr -640h
var_63C= dword ptr -63Ch
var_638= dword ptr -638h
var_631= byte ptr -631h
var_630= dword ptr -630h
var_62C= dword ptr -62Ch
var_628= dword ptr -628h
var_624= dword ptr -624h
var_61C= dword ptr -61Ch
var_618= dword ptr -618h
var_5E0= dword ptr -5E0h
var_5DC= dword ptr -5DCh
var_5D8= dword ptr -5D8h
var_5D0= dword ptr -5D0h
var_5CC= dword ptr -5CCh
var_5C8= dword ptr -5C8h
var_5C4= byte ptr -5C4h
var_5C0= dword ptr -5C0h
var_5B8= dword ptr -5B8h
var_5B4= byte ptr -5B4h
var_5AC= dword ptr -5ACh
var_5A8= dword ptr -5A8h
var_5A4= dword ptr -5A4h
var_59C= dword ptr -59Ch
var_598= dword ptr -598h
var_560= dword ptr -560h
var_559= byte ptr -559h
var_558= dword ptr -558h
var_554= dword ptr -554h
var_550= dword ptr -550h
var_54C= dword ptr -54Ch
var_544= dword ptr -544h
var_540= dword ptr -540h
var_51C= dword ptr -51Ch
var_518= dword ptr -518h
var_514= dword ptr -514h
var_50C= dword ptr -50Ch
var_508= dword ptr -508h
var_504= dword ptr -504h
var_500= dword ptr -500h
var_4FC= dword ptr -4FCh
var_4F8= dword ptr -4F8h
var_4F4= dword ptr -4F4h
var_4F0= dword ptr -4F0h
var_4EC= dword ptr -4ECh
var_4E8= dword ptr -4E8h
var_4E1= byte ptr -4E1h
var_4E0= byte ptr -4E0h
var_4C8= byte ptr -4C8h
var_4B0= dword ptr -4B0h
var_4AC= byte ptr -4ACh
var_494= byte ptr -494h
var_47C= dword ptr -47Ch
var_478= byte ptr -478h
var_460= byte ptr -460h
var_448= dword ptr -448h
var_441= byte ptr -441h
var_440= byte ptr -440h
var_43F= byte ptr -43Fh
var_43E= byte ptr -43Eh
var_43D= byte ptr -43Dh
var_43C= byte ptr -43Ch
var_43B= byte ptr -43Bh
var_43A= byte ptr -43Ah
var_439= byte ptr -439h
var_438= byte ptr -438h
var_42D= byte ptr -42Dh
var_42C= dword ptr -42Ch
var_428= dword ptr -428h
var_420= dword ptr -420h
var_414= dword ptr -414h
var_40C= dword ptr -40Ch
var_401= byte ptr -401h
var_400= dword ptr -400h
var_3FC= dword ptr -3FCh
var_3F8= dword ptr -3F8h
var_3F4= dword ptr -3F4h
var_3EC= dword ptr -3ECh
var_3E8= dword ptr -3E8h
var_3E4= dword ptr -3E4h
var_3D8= byte ptr -3D8h
var_3AD= byte ptr -3ADh
var_3AC= dword ptr -3ACh
var_3A8= byte ptr -3A8h
var_390= byte ptr -390h
var_376= byte ptr -376h
var_375= byte ptr -375h
var_374= byte ptr -374h
var_35C= byte ptr -35Ch
var_348= byte ptr -348h
var_334= byte ptr -334h
var_32C= byte ptr -32Ch
var_314= dword ptr -314h
var_310= byte ptr -310h
var_2F5= byte ptr -2F5h
var_2F4= byte ptr -2F4h
var_2EC= byte ptr -2ECh
var_2D4= byte ptr -2D4h
var_2BC= dword ptr -2BCh
var_2B4= byte ptr -2B4h
var_2AC= byte ptr -2ACh
var_2AA= dword ptr -2AAh
var_2A4= byte ptr -2A4h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_28C= dword ptr -28Ch
var_284= byte ptr -284h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= byte ptr -274h
var_268= dword ptr -268h
var_264= byte ptr -264h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_24C= byte ptr -24Ch
var_24A= dword ptr -24Ah
var_245= dword ptr -245h
var_241= dword ptr -241h
Dst= word ptr -23Dh
var_1F0= dword ptr -1F0h
var_1EC= byte ptr -1ECh
var_1C4= byte ptr -1C4h
var_190= dword ptr -190h
var_18C= byte ptr -18Ch
var_164= byte ptr -164h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= byte ptr -120h
var_10C= byte ptr -10Ch
var_F8=	dword ptr -0F8h
var_F4=	byte ptr -0F4h
var_EC=	byte ptr -0ECh
var_D4=	byte ptr -0D4h
var_BC=	dword ptr -0BCh
var_B4=	byte ptr -0B4h
var_A8=	dword ptr -0A8h
var_A4=	qword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	byte ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E7410
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 718h
push	esi
mov	[ebp+var_6E8], ecx
mov	[ebp+var_4E8], 0
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4EC]
mov	[ebp+var_6EC], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+20h]
mov	[ebp+var_6EC], eax
cmp	[ebp+var_6EC], 38Ch
jg	loc_4E7532
cmp	[ebp+var_6EC], 38Ch
jz	loc_4E82F7
cmp	[ebp+var_6EC], 140h
jg	short loc_4E74CC
cmp	[ebp+var_6EC], 140h
jz	loc_4E7EB5
mov	ecx, [ebp+var_6EC]
sub	ecx, 27h
mov	[ebp+var_6EC], ecx
cmp	[ebp+var_6EC], 81h ; switch 130	cases
ja	loc_4E8A66	; default
			; jumptable 004E74C5 cases 1-122,124-127
			; jumptable 004E757A cases 2-24,26-44
mov	edx, [ebp+var_6EC]
movzx	eax, ds:byte_4E8AA8[edx]
jmp	ds:off_4E8A94[eax*4] ; switch jump

loc_4E74CC:
cmp	[ebp+var_6EC], 310h
jg	short loc_4E750D
cmp	[ebp+var_6EC], 310h
jz	loc_4E7FA5
cmp	[ebp+var_6EC], 210h
jz	loc_4E8123
cmp	[ebp+var_6EC], 30Fh
jz	loc_4E7F81
jmp	loc_4E8A66	; default
			; jumptable 004E74C5 cases 1-122,124-127
			; jumptable 004E757A cases 2-24,26-44

loc_4E750D:
cmp	[ebp+var_6EC], 32Ch
jl	loc_4E8A66	; default
			; jumptable 004E74C5 cases 1-122,124-127
			; jumptable 004E757A cases 2-24,26-44
cmp	[ebp+var_6EC], 32Dh
jle	loc_4E82DE
jmp	loc_4E8A66	; default
			; jumptable 004E74C5 cases 1-122,124-127
			; jumptable 004E757A cases 2-24,26-44

loc_4E7532:
cmp	[ebp+var_6EC], 565h
jg	short loc_4E7581
cmp	[ebp+var_6EC], 565h
jz	loc_4E7865
mov	ecx, [ebp+var_6EC]
sub	ecx, 4A0h
mov	[ebp+var_6EC], ecx
cmp	[ebp+var_6EC], 2Dh ; switch 46 cases
ja	loc_4E8A66	; default
			; jumptable 004E74C5 cases 1-122,124-127
			; jumptable 004E757A cases 2-24,26-44
mov	edx, [ebp+var_6EC]
movzx	eax, ds:byte_4E8B40[edx]
jmp	ds:off_4E8B2C[eax*4] ; switch jump

loc_4E7581:
cmp	[ebp+var_6EC], 680h
jz	loc_4E8310
cmp	[ebp+var_6EC], 687h
jz	loc_4E8446
cmp	[ebp+var_6EC], 6BDh
jz	loc_4E83DC
jmp	loc_4E8A66	; default
			; jumptable 004E74C5 cases 1-122,124-127
			; jumptable 004E757A cases 2-24,26-44

loc_4E75B6:		; jumptable 004E74C5 case 0
mov	ecx, [ebp+var_6E8]
movzx	edx, byte ptr [ecx+25h]
test	edx, edx
jnz	loc_4E7860
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+20h]
mov	[ebp+var_400], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_3FC], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_3F8], edx
mov	eax, [ebp+var_400]
mov	[ebp+var_3F4], eax
mov	ecx, [ebp+var_3FC]
mov	[ebp+var_3EC], ecx
mov	edx, [ebp+var_3F8]
mov	[ebp+var_3E8], edx
mov	eax, [ebp+var_3F4]
mov	[ebp+var_3E4], eax
mov	ecx, [ebp+var_6E8]
mov	edx, [ecx]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+4Ch]
call	eax
mov	[ebp+var_4F0], eax
mov	ecx, [ebp+var_4F0]
mov	edx, [ecx+14h]
add	edx, 1
push	edx
mov	ecx, [ebp+var_4F0]
call	sub_5070E0
lea	eax, [ebp+var_3EC]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_4F0]
call	sub_506AB0
movzx	edx, [ebp+var_18]
test	edx, edx
jz	loc_4E7827
mov	eax, [ebp+var_14]
movzx	ecx, byte ptr [eax+24h]
test	ecx, ecx
jz	short loc_4E76D4
mov	ecx, 3705h
lea	eax, [ebp+var_5C]
call	sub_401100
mov	[ebp+var_5C], offset off_155844C
mov	[ebp+var_54], 0
mov	[ebp+var_50], 0
mov	edx, [ebp+var_6E8]
mov	eax, [edx+0D0h]
mov	[ebp+var_54], eax
mov	ecx, [edx+0D4h]
mov	[ebp+var_50], ecx
lea	edx, [ebp+var_5C]
push	edx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_5C]
call	sub_401110

loc_4E76D4:
mov	eax, [ebp+var_14]
mov	ecx, [eax+20h]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+70h]
mov	[ebp+var_4F8], eax
mov	ecx, [edx+74h]
mov	[ebp+var_4F4], ecx
cmp	[ebp+var_4F8], 0FFFFFFFEh
jnz	short loc_4E7722
cmp	[ebp+var_4F4], 3FFFh
jnz	short loc_4E7722
mov	edx, [ebp+var_6E8]
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[edx+90h], ecx
mov	eax, [eax+0Ch]
mov	[edx+94h], eax

loc_4E7722:
mov	ecx, [ebp+var_14]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_48]
add	ecx, 0B4h
call	sub_4023E0
mov	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_6E8]
call	sub_F856C0
lea	ecx, [ebp+var_44]
call	sub_DD1010
mov	eax, [ebp+var_14]
mov	ecx, [eax+50h]
mov	[ebp+var_24], ecx
mov	edx, [eax+54h]
mov	[ebp+var_20], edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx]
mov	ecx, [ebp+var_48]
mov	eax, [edx]
call	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
and	edx, 0
mov	eax, [ecx+0Ch]
and	eax, 0FFFFC000h
mov	[ebp+var_6F4], edx
mov	[ebp+var_6F0], eax
cmp	[ebp+var_6F4], 0
jnz	short loc_4E77AB
cmp	[ebp+var_6F0], 4000000h
jnz	short loc_4E77AB
mov	[ebp+var_6F8], 1
jmp	short loc_4E77B5

loc_4E77AB:
mov	[ebp+var_6F8], 0

loc_4E77B5:
movzx	ecx, byte ptr [ebp+var_6F8]
test	ecx, ecx
jnz	short loc_4E780B
mov	ecx, 1F61h
lea	eax, [ebp+var_6C]
call	sub_401100
mov	[ebp+var_6C], offset off_155844C
mov	[ebp+var_64], 0
mov	[ebp+var_60], 0
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_64], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_6C]
push	edx
push	0Ah
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_6C]
call	sub_401110

loc_4E780B:
mov	[ebp+var_401], 1
lea	ecx, [ebp+var_44]
call	sub_4087D0
mov	al, [ebp+var_401]
jmp	loc_4E8A83
jmp	short loc_4E7860

loc_4E7827:
mov	eax, [ebp+var_14]
mov	ecx, [eax+20h]
mov	edx, [ecx+0ACh]
mov	[ebp+var_4FC], edx
mov	eax, [ebp+var_4FC]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ecx+8]
push	eax		; char
push	offset aAttemptedToAdd ; "Attempted to add object to world twice!"...
push	5		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 18h

loc_4E7860:
jmp	loc_4E8A81

loc_4E7865:
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
mov	byte ptr [edx+20h], 0
call	sub_401210
mov	ecx, [ebp+var_70]
mov	edx, [eax+48h]
mov	[ecx+24h], edx
call	sub_401210
mov	ecx, [ebp+var_70]
mov	edx, [eax+4Ch]
mov	[ecx+28h], edx
mov	al, 1
jmp	loc_4E8A83
jmp	loc_4E8A81

loc_4E789D:		; jumptable 004E74C5 case 123
mov	eax, [ebp+var_6E8]
mov	edx, [eax]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+54h]
call	eax
mov	[ebp+var_500], eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
lea	edx, [ebp+var_74]
push	edx
mov	ecx, [ebp+var_500]
call	sub_50A640
mov	eax, [ebp+var_6E8]
mov	edx, [eax]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+54h]
call	eax
mov	[ebp+var_504], eax
lea	ecx, [ebp+var_40C]
push	ecx
mov	ecx, [ebp+var_504]
call	sub_502260
lea	edx, [ebp+var_51C]
mov	[ebp+var_50C], edx
mov	eax, [ebp+var_40C]
mov	[ebp+var_508], eax
mov	ecx, [ebp+var_50C]
mov	edx, [ebp+var_508]
mov	[ecx], edx
push	ecx
mov	[ebp+var_518], esp
mov	eax, [ebp+var_51C]
mov	[ebp+var_514], eax
mov	ecx, [ebp+var_518]
mov	edx, [ebp+var_514]
mov	[ecx], edx
lea	ecx, [ebp+var_74]
call	sub_42DDC0
mov	[ebp+var_6F9], al
mov	al, [ebp+var_6F9]
mov	[ebp+var_6FA], al
movzx	ecx, [ebp+var_6FA]
test	ecx, ecx
jz	short loc_4E7998
mov	edx, [ebp+var_74]
mov	eax, [edx+10h]
mov	[ebp+var_700], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
push	ecx
mov	edx, [ebp+var_700]
mov	eax, [edx]
mov	ecx, [ebp+var_700]
mov	edx, [eax]
call	edx
xor	ecx, ecx
test	eax, eax
setnle	cl
mov	al, cl
jmp	loc_4E8A83
jmp	short loc_4E79B6

loc_4E7998:
mov	edx, [ebp+var_10]
add	edx, 10h
push	edx
mov	eax, [ebp+var_10]
add	eax, 8
push	eax
mov	ecx, [ebp+var_6E8]
call	sub_4E8B70
jmp	loc_4E8A83

loc_4E79B6:
jmp	loc_4E8A81

loc_4E79BB:		; jumptable 004E74C5 case 128
mov	ecx, [ebp+var_6E8]
mov	edx, [ecx]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+4Ch]
call	eax
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
lea	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_78]
call	sub_50A640
lea	eax, [ebp+var_414]
push	eax
mov	ecx, [ebp+var_78]
call	sub_502260
lea	ecx, [ebp+var_554]
mov	[ebp+var_544], ecx
mov	edx, [ebp+var_414]
mov	[ebp+var_540], edx
mov	eax, [ebp+var_544]
mov	ecx, [ebp+var_540]
mov	[eax], ecx
push	ecx
mov	[ebp+var_550], esp
mov	edx, [ebp+var_554]
mov	[ebp+var_54C], edx
mov	eax, [ebp+var_550]
mov	ecx, [ebp+var_54C]
mov	[eax], ecx
lea	ecx, [ebp+var_7C]
call	sub_42DDC0
mov	[ebp+var_701], al
mov	dl, [ebp+var_701]
mov	[ebp+var_702], dl
movzx	eax, [ebp+var_702]
test	eax, eax
jz	loc_4E7B3B
mov	ecx, [ebp+var_7C]
add	ecx, 8
mov	[ebp+var_558], ecx
mov	edx, [ebp+var_558]
mov	eax, [edx+8]
mov	cl, [eax+18Eh]
mov	[ebp+var_559], cl
movzx	edx, [ebp+var_559]
test	edx, edx
jnz	loc_4E7B34
mov	eax, [ebp+var_7C]
mov	ecx, [eax+10h]
call	sub_F5DE20
mov	ecx, [ebp+var_7C]
add	ecx, 8
mov	[ebp+var_560], ecx
mov	edx, [ebp+var_10]
add	edx, 8
push	edx
mov	eax, [ebp+var_6E8]
mov	edx, [eax]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+54h]
call	eax
mov	ecx, eax
call	sub_509F20
mov	ecx, [ebp+var_560]
mov	edx, [ecx+8]
mov	[eax], edx
mov	eax, [ebp+var_7C]
mov	ecx, [eax+10h]
push	ecx
mov	ecx, [ebp+var_6E8]
call	sub_F85550
lea	edx, [ebp+var_5AC]
mov	[ebp+var_59C], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_598], eax
mov	ecx, [ebp+var_59C]
mov	edx, [ebp+var_598]
mov	[ecx], edx
push	ecx
mov	[ebp+var_5A8], esp
mov	eax, [ebp+var_5AC]
mov	[ebp+var_5A4], eax
mov	ecx, [ebp+var_5A8]
mov	edx, [ebp+var_5A4]
mov	[ecx], edx
mov	ecx, [ebp+var_78]
call	sub_506DE0

loc_4E7B34:
mov	al, 1
jmp	loc_4E8A83

loc_4E7B3B:
jmp	loc_4E8A81

loc_4E7B40:		; jumptable 004E74C5 case 129
mov	[ebp+var_8D], 0
mov	eax, [ebp+var_6E8]
mov	edx, [eax]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+54h]
call	eax
mov	[ebp+var_5B8], eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
lea	edx, [ebp+var_5B4]
push	edx
mov	ecx, [ebp+var_5B8]
call	sub_522260
lea	eax, [ebp+var_5B4]
push	eax
lea	ecx, [ebp+var_94]
call	sub_640660
mov	ecx, [ebp+var_6E8]
mov	edx, [ecx]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+54h]
call	eax
mov	[ebp+var_5C8], eax
lea	ecx, [ebp+var_5C4]
mov	[ebp+var_5C0], ecx
mov	edx, [ebp+var_5C0]
mov	dword ptr [edx], 0
lea	eax, [ebp+var_5C4]
push	eax
lea	ecx, [ebp+var_420]
call	sub_640660
lea	ecx, [ebp+var_5E0]
mov	[ebp+var_5D0], ecx
mov	edx, [ebp+var_420]
mov	[ebp+var_5CC], edx
mov	eax, [ebp+var_5D0]
mov	ecx, [ebp+var_5CC]
mov	[eax], ecx
push	ecx
mov	[ebp+var_5DC], esp
mov	edx, [ebp+var_5E0]
mov	[ebp+var_5D8], edx
mov	eax, [ebp+var_5DC]
mov	ecx, [ebp+var_5D8]
mov	[eax], ecx
lea	ecx, [ebp+var_94]
call	sub_42DDC0
mov	[ebp+var_703], al
mov	dl, [ebp+var_703]
mov	[ebp+var_704], dl
movzx	eax, [ebp+var_704]
test	eax, eax
jz	loc_4E7CFD
mov	ecx, [ebp+var_94]
mov	edx, [ecx+10h]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_10]
add	eax, 8
push	eax
mov	ecx, [ebp+var_6E8]
mov	edx, [ecx]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+4Ch]
call	eax
mov	ecx, eax
call	sub_509F20
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+var_98]
push	edx
mov	ecx, [ebp+var_6E8]
call	sub_F856C0
lea	eax, [ebp+var_62C]
mov	[ebp+var_61C], eax
mov	ecx, [ebp+var_94]
mov	[ebp+var_618], ecx
mov	edx, [ebp+var_61C]
mov	eax, [ebp+var_618]
mov	[edx], eax
mov	ecx, [ebp+var_6E8]
mov	edx, [ecx]
mov	ecx, [ebp+var_6E8]
mov	eax, [edx+54h]
call	eax
mov	[ebp+var_630], eax
push	ecx
mov	[ebp+var_628], esp
mov	ecx, [ebp+var_62C]
mov	[ebp+var_624], ecx
mov	edx, [ebp+var_628]
mov	eax, [ebp+var_624]
mov	[edx], eax
mov	ecx, [ebp+var_630]
call	sub_506DE0
mov	[ebp+var_8D], 1

loc_4E7CFD:
lea	ecx, [ebp+var_631]
push	ecx
lea	ecx, [ebp+var_8C]
call	sub_5E0080

loc_4E7D0F:
mov	edx, [ebp+var_6E8]
add	edx, 4
mov	[ebp+var_638], edx
mov	eax, [ebp+var_638]
mov	ecx, [ebp+var_638]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_4E7E61
mov	edx, [ebp+var_6E8]
mov	eax, [edx+4]
mov	[ebp+var_63C], eax
mov	ecx, [ebp+var_63C]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+10h]
cmp	dword ptr [eax+4], 138Bh
jnz	loc_4E7E15
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+10h]
mov	eax, [ebp+var_10]
mov	[ebp+var_708], edx
mov	[ebp+var_70C], eax
mov	ecx, [ebp+var_708]
mov	edx, [ebp+var_70C]
mov	eax, [ecx+8]
cmp	eax, [edx+8]
jnz	short loc_4E7E15
mov	ecx, [ebp+var_708]
mov	edx, [ebp+var_70C]
mov	eax, [ecx+0Ch]
cmp	eax, [edx+0Ch]
jnz	short loc_4E7E15
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+10h]
cmp	dword ptr [edx+4], 0A7h
jnz	short loc_4E7E15
mov	eax, [ebp+var_9C]
mov	ecx, [eax+10h]
mov	[ebp+var_42C], ecx
mov	edx, [ebp+var_42C]
mov	[ebp+var_428], edx
cmp	[ebp+var_428], 0
jz	short loc_4E7E02
push	1
mov	eax, [ebp+var_428]
mov	edx, [eax]
mov	ecx, [ebp+var_428]
mov	eax, [edx]
call	eax
mov	[ebp+var_710], eax
jmp	short loc_4E7E0C

loc_4E7E02:
mov	[ebp+var_710], 0

loc_4E7E0C:
mov	[ebp+var_8D], 1
jmp	short loc_4E7E4E

loc_4E7E15:
mov	ecx, [ebp+var_9C]
push	ecx
lea	ecx, [ebp+var_8C]
call	sub_58F950
mov	edx, [ebp+var_88]
mov	[ebp+var_640], edx
movzx	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_640]
push	ecx
mov	edx, [ebp+var_8C]
push	edx
call	sub_42BDF0
add	esp, 0Ch

loc_4E7E4E:
mov	ecx, [ebp+var_6E8]
add	ecx, 4
call	sub_42BC30
jmp	loc_4E7D0F

loc_4E7E61:
mov	eax, [ebp+var_6E8]
add	eax, 4
mov	[ebp+var_654], eax
lea	ecx, [ebp+var_8C]
push	ecx
mov	ecx, [ebp+var_654]
call	sub_504C20
mov	dl, [ebp+var_80]
mov	eax, [ebp+var_654]
mov	[eax+0Ch], dl
mov	cl, [ebp+var_8D]
mov	[ebp+var_42D], cl
lea	ecx, [ebp+var_8C]
call	sub_4FFDD0
mov	al, [ebp+var_42D]
jmp	loc_4E8A83
jmp	loc_4E8A81

loc_4E7EB5:
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
movzx	ecx, byte ptr [eax+50h]
test	ecx, ecx
jz	short loc_4E7EE6
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	dword ptr [ebp+var_718], eax
mov	ecx, [edx+0Ch]
mov	dword ptr [ebp+var_718+4], ecx
jmp	short loc_4E7EFA

loc_4E7EE6:
mov	dword ptr [ebp+var_718], 0
mov	dword ptr [ebp+var_718+4], 0

loc_4E7EFA:
mov	edx, dword ptr [ebp+var_718]
mov	dword ptr [ebp+var_A4],	edx
mov	eax, dword ptr [ebp+var_718+4]
mov	dword ptr [ebp+var_A4+4], eax
mov	ecx, [ebp+var_A8]
movzx	edx, byte ptr [ecx+51h]
push	edx
mov	eax, dword ptr [ebp+var_A4+4]
push	eax
mov	ecx, dword ptr [ebp+var_A4]
push	ecx
mov	edx, [ebp+var_A8]
add	edx, 20h
push	edx
lea	eax, [ebp+var_438]
push	eax
mov	ecx, [ebp+var_6E8]
call	sub_F6E230
push	eax
mov	ecx, [ebp+var_A8]
add	ecx, 48h
call	sub_504A80
lea	ecx, [ebp+var_438]
call	sub_46B570
mov	ecx, [ebp+var_A8]
add	ecx, 48h
call	sub_467E60
xor	ecx, ecx
cmp	ecx, eax
sbb	eax, eax
neg	eax
jmp	loc_4E8A83
jmp	loc_4E8A81

loc_4E7F81:
mov	edx, [ebp+var_10]
add	edx, 30h
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [eax+8]
push	edx
mov	ecx, [ebp+var_6E8]
call	sub_F7E770
mov	al, 1
jmp	loc_4E8A83

loc_4E7FA5:
mov	eax, [ebp+var_10]
add	eax, 30h
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ecx+8]
push	eax
mov	ecx, [ebp+var_6E8]
call	sub_F8C740
mov	al, 1
jmp	loc_4E8A83

loc_4E7FC9:		; jumptable 004E757A case 25
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_F8], ecx
lea	ecx, [ebp+var_F4]
call	sub_45A180
push	offset aComponentsregi ; "ComponentsRegistry"
lea	ecx, [ebp+var_EC]
call	sub_402310
mov	edx, [ebp+var_F8]
mov	eax, [edx+20h]
mov	[ebp+var_BC], eax
lea	ecx, [ebp+var_F4]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_B4]
call	sub_770A40
movzx	edx, al
test	edx, edx
jnz	loc_4E80F6
mov	eax, [ebp+var_BC]
push	eax
lea	ecx, [ebp+var_120]
push	ecx
lea	ecx, [ebp+var_B4]
call	sub_770890
lea	edx, [ebp+var_10C]
push	edx
lea	ecx, [ebp+var_B4]
call	sub_7709F0
jmp	short loc_4E8062

loc_4E8057:
lea	ecx, [ebp+var_120]
call	sub_770760

loc_4E8062:
lea	eax, [ebp+var_10C]
push	eax
lea	ecx, [ebp+var_120]
call	sub_770740
movzx	ecx, al
test	ecx, ecx
jz	short loc_4E80F6
mov	[ebp+var_128], 0FFFFFFFFh
mov	[ebp+var_124], 0FFFFFFFFh
lea	edx, [ebp+var_128]
push	edx
push	offset aComponent_type ; "component_type"
push	offset aComponentsregi ; "ComponentsRegistry"
lea	eax, [ebp+var_120]
push	eax
call	sub_46D2F0
add	esp, 10h
lea	ecx, [ebp+var_124]
push	ecx
push	offset aComponent_id ; "component_id"
push	offset aComponentsregi ; "ComponentsRegistry"
lea	edx, [ebp+var_120]
push	edx
call	sub_46D2F0
add	esp, 10h
mov	eax, [ebp+var_F8]
mov	ecx, [ebp+var_128]
cmp	ecx, [eax+24h]
jnz	short loc_4E80F1
mov	edx, [ebp+var_F8]
mov	eax, [ebp+var_124]
mov	[edx+28h], eax
jmp	short loc_4E80F6

loc_4E80F1:
jmp	loc_4E8057

loc_4E80F6:
lea	ecx, [ebp+var_D4]
call	sub_407910
lea	ecx, [ebp+var_EC]
call	sub_407910
lea	ecx, [ebp+var_F4]
call	sub_401110
mov	al, 1
jmp	loc_4E8A83
jmp	loc_4E8A81

loc_4E8123:
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_12C], ecx
mov	edx, [ebp+var_6E8]
mov	eax, [ebp+var_12C]
mov	ecx, [eax+20h]
mov	[edx+0D0h], ecx
mov	eax, [eax+24h]
mov	[edx+0D4h], eax
jmp	loc_4E8A81

loc_4E8152:		; jumptable 004E757A case 0
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_130], ecx
mov	ecx, [ebp+var_130]
add	ecx, 20h
call	sub_5F52F0
push	eax
lea	ecx, [ebp+var_18C]
call	sub_110E550
mov	edx, [ebp+var_130]
add	edx, 38h
push	edx
lea	ecx, [ebp+var_164]
call	sub_4E4760
lea	eax, [ebp+var_18C]
push	eax
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_439], 1
lea	ecx, [ebp+var_18C]
push	ecx
call	sub_4093F0
mov	al, [ebp+var_439]
jmp	loc_4E8A83

loc_4E81C0:		; jumptable 004E757A case 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_190], edx
mov	ecx, [ebp+var_190]
add	ecx, 20h
call	sub_5F52F0
push	eax
lea	ecx, [ebp+var_1EC]
call	sub_110E550
mov	eax, [ebp+var_190]
add	eax, 38h
push	eax
lea	ecx, [ebp+var_1C4]
call	sub_4E4760
lea	ecx, [ebp+var_1EC]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_43A], 1
lea	edx, [ebp+var_1EC]
push	edx
call	sub_4093F0
mov	al, [ebp+var_43A]
jmp	loc_4E8A83

loc_4E822E:		; jumptable 004E757A case 45
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_1F0], eax
lea	eax, [ebp+var_24C]
call	sub_408560
mov	[ebp+var_24A], 7
mov	ecx, [ebp+var_1F0]
mov	edx, [ecx+20h]
mov	[ebp+var_245], edx
mov	eax, [ecx+24h]
mov	[ebp+var_241], eax
push	20h		; MaxCount
mov	eax, [ebp+var_1F0]
add	eax, 28h
call	sub_412770
push	eax		; Src
push	21h		; SizeInWords
lea	ecx, [ebp+Dst]
push	ecx		; Dst
call	_wcsncpy_s
add	esp, 10h
lea	edx, [ebp+var_264]
push	edx
call	sub_408670
lea	eax, [ebp+var_24C]
mov	[ebp+var_25C], eax
mov	[ebp+var_258], 51h
lea	ecx, [ebp+var_264]
push	ecx
push	0Ah
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_43B], 1
lea	edx, [ebp+var_264]
push	edx
call	sub_409000
mov	al, [ebp+var_43B]
jmp	loc_4E8A83

loc_4E82DE:
push	1
mov	eax, [ebp+var_10]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_6E8]
call	sub_F5D680
jmp	loc_4E8A83

loc_4E82F7:
push	0
mov	ecx, [ebp+var_10]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_6E8]
call	sub_F5D680
jmp	loc_4E8A83

loc_4E8310:
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_268], edx
mov	ecx, 1F5Ch
lea	eax, [ebp+var_28C]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_28C], offset off_1573E24
mov	[ebp+var_284], 0
mov	[ebp+var_27C], 0
mov	[ebp+var_278], 0
mov	[ebp+var_274], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_28C]
push	eax
push	0Ah
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	ecx, [ebp+var_268]
mov	dl, [ebp+var_284]
mov	[ecx+20h], dl
mov	eax, [ebp+var_268]
mov	ecx, [ebp+var_27C]
mov	[eax+28h], ecx
mov	edx, [ebp+var_278]
mov	[eax+2Ch], edx
mov	eax, [ebp+var_268]
mov	cl, [ebp+var_274]
mov	[eax+30h], cl
mov	[ebp+var_43C], 1
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_28C]
call	sub_401110
mov	al, [ebp+var_43C]
jmp	loc_4E8A83

loc_4E83DC:
lea	eax, [ebp+var_2AC]
call	sub_408560
mov	[ebp+var_2AA], 20h
lea	edx, [ebp+var_2A4]
push	edx
call	sub_408670
lea	eax, [ebp+var_2AC]
mov	[ebp+var_29C], eax
mov	[ebp+var_298], 7
lea	ecx, [ebp+var_2A4]
push	ecx
push	0Ah
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_43D], 1
lea	edx, [ebp+var_2A4]
push	edx
call	sub_409000
mov	al, [ebp+var_43D]
jmp	loc_4E8A83

loc_4E8446:
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_314], eax
lea	ecx, [ebp+var_334]
call	sub_4E7090
lea	ecx, [ebp+var_334]
push	ecx
push	0Ah
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
call	sub_401F20
mov	[ebp+var_688], eax
mov	edx, [ebp+var_688]
mov	eax, [edx+284h]
mov	[ebp+var_68C], eax
lea	ecx, [ebp+var_43E]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_68C]
push	ecx
call	sub_401F20
mov	ecx, eax
call	sub_10DEEE0
push	eax
lea	ecx, [ebp+var_310]
call	sub_407D30
lea	ecx, [ebp+var_43E]
call	nullsub_1
lea	ecx, [ebp+var_2F4]
call	sub_45A180
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	ecx, [ebp+var_2EC]
call	sub_402310
lea	edx, [ebp+var_2F4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_2F5], 1
mov	eax, [ebp+var_2BC]
push	eax
lea	ecx, [ebp+var_35C]
push	ecx
lea	ecx, [ebp+var_2B4]
call	sub_770890
lea	edx, [ebp+var_348]
push	edx
lea	ecx, [ebp+var_2B4]
call	sub_7709F0
jmp	short loc_4E8534

loc_4E8529:
lea	ecx, [ebp+var_35C]
call	sub_770760

loc_4E8534:
lea	eax, [ebp+var_348]
push	eax
lea	ecx, [ebp+var_35C]
call	sub_770740
movzx	ecx, al
test	ecx, ecx
jz	loc_4E8A15
lea	ecx, [ebp+var_43F]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_374]
call	sub_4022A0
lea	ecx, [ebp+var_43F]
call	nullsub_1
lea	edx, [ebp+var_374]
push	edx
push	offset aCountrycode ; "countryCode"
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	eax, [ebp+var_35C]
push	eax
call	sub_5085B0
add	esp, 10h
lea	ecx, [ebp+var_32C]
call	sub_5F52F0
push	eax		; char *
lea	ecx, [ebp+var_374]
call	sub_5F52F0
push	eax		; char *
call	__stricmp
add	esp, 8
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_376], al
lea	ecx, [ebp+var_310]
call	sub_5F52F0
push	eax		; char *
lea	ecx, [ebp+var_374]
call	sub_5F52F0
push	eax		; char *
call	__stricmp
add	esp, 8
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_375], al
movzx	ecx, [ebp+var_376]
test	ecx, ecx
jnz	short loc_4E8612
movzx	edx, [ebp+var_375]
test	edx, edx
jnz	short loc_4E8612
movzx	eax, [ebp+var_2F5]
test	eax, eax
jz	loc_4E89FE

loc_4E8612:
mov	ecx, [ebp+var_314]
add	ecx, 20h
push	ecx
push	offset aId_2	; "id"
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	edx, [ebp+var_35C]
push	edx
call	sub_46D2F0
add	esp, 10h
mov	[ebp+var_3AD], 0
lea	eax, [ebp+var_3AD]
push	eax
push	offset aSymbolisappend ; "symbolIsAppended"
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	ecx, [ebp+var_35C]
push	ecx
call	sub_505FE0
add	esp, 10h
mov	[ebp+var_3AC], 24h
lea	edx, [ebp+var_3AC]
push	edx
push	offset aMonetarysymbol ; "monetarySymbol"
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	eax, [ebp+var_35C]
push	eax
call	sub_46D2F0
add	esp, 10h
lea	ecx, [ebp+var_440]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_390]
call	sub_4022A0
lea	ecx, [ebp+var_440]
call	nullsub_1
lea	ecx, [ebp+var_441]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_3D8]
call	sub_402390
lea	ecx, [ebp+var_441]
call	nullsub_1
call	sub_61ED10
movzx	ecx, ax
push	ecx
push	1
lea	ecx, [ebp+var_3D8]
call	sub_4389B0
xor	esi, esi
shl	esi, 1
lea	ecx, [ebp+var_3D8]
call	sub_404430
mov	dx, word ptr [ebp+var_3AC]
mov	[eax+esi], dx
lea	eax, [ebp+var_3D8]
push	eax
lea	ecx, [ebp+var_3A8]
push	ecx
call	sub_10F4AA0
add	esp, 8
lea	edx, [ebp+var_390]
push	edx
push	offset aMonthlyfeegold ; "monthlyFeeGold"
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	eax, [ebp+var_35C]
push	eax
call	sub_5085B0
add	esp, 10h
movzx	ecx, [ebp+var_3AD]
test	ecx, ecx
jz	short loc_4E8767
or	[ebp+var_4E8], 1
lea	edx, [ebp+var_3A8]
push	edx
lea	eax, [ebp+var_390]
push	eax
lea	ecx, [ebp+var_460]
push	ecx
call	sub_403CD0
add	esp, 0Ch
mov	[ebp+var_71C], eax
jmp	short loc_4E8791

loc_4E8767:
or	[ebp+var_4E8], 2
lea	edx, [ebp+var_390]
push	edx
lea	eax, [ebp+var_3A8]
push	eax
lea	ecx, [ebp+var_478]
push	ecx
call	sub_403CD0
add	esp, 0Ch
mov	[ebp+var_71C], eax

loc_4E8791:
mov	edx, [ebp+var_71C]
mov	[ebp+var_448], edx
mov	eax, [ebp+var_448]
push	eax
mov	ecx, [ebp+var_314]
add	ecx, 24h
call	sub_4022F0
mov	ecx, [ebp+var_4E8]
and	ecx, 2
jz	short loc_4E87CF
and	[ebp+var_4E8], 0FFFFFFFDh
lea	ecx, [ebp+var_478]
call	sub_407910

loc_4E87CF:
mov	edx, [ebp+var_4E8]
and	edx, 1
jz	short loc_4E87EC
and	[ebp+var_4E8], 0FFFFFFFEh
lea	ecx, [ebp+var_460]
call	sub_407910

loc_4E87EC:
lea	eax, [ebp+var_390]
push	eax
push	offset aMonthlyfeesilv ; "monthlyFeeSilver"
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	ecx, [ebp+var_35C]
push	ecx
call	sub_5085B0
add	esp, 10h
movzx	edx, [ebp+var_3AD]
test	edx, edx
jz	short loc_4E8843
or	[ebp+var_4E8], 4
lea	eax, [ebp+var_3A8]
push	eax
lea	ecx, [ebp+var_390]
push	ecx
lea	edx, [ebp+var_494]
push	edx
call	sub_403CD0
add	esp, 0Ch
mov	[ebp+var_720], eax
jmp	short loc_4E886D

loc_4E8843:
or	[ebp+var_4E8], 8
lea	eax, [ebp+var_390]
push	eax
lea	ecx, [ebp+var_3A8]
push	ecx
lea	edx, [ebp+var_4AC]
push	edx
call	sub_403CD0
add	esp, 0Ch
mov	[ebp+var_720], eax

loc_4E886D:
mov	eax, [ebp+var_720]
mov	[ebp+var_47C], eax
mov	ecx, [ebp+var_47C]
push	ecx
mov	ecx, [ebp+var_314]
add	ecx, 3Ch
call	sub_4022F0
mov	edx, [ebp+var_4E8]
and	edx, 8
jz	short loc_4E88AB
and	[ebp+var_4E8], 0FFFFFFF7h
lea	ecx, [ebp+var_4AC]
call	sub_407910

loc_4E88AB:
mov	eax, [ebp+var_4E8]
and	eax, 4
jz	short loc_4E88C8
and	[ebp+var_4E8], 0FFFFFFFBh
lea	ecx, [ebp+var_494]
call	sub_407910

loc_4E88C8:
lea	ecx, [ebp+var_390]
push	ecx
push	offset aMonthlyfeebron ; "monthlyFeeBronze"
push	offset aSubscriptionpr ; "SubscriptionPricing"
lea	edx, [ebp+var_35C]
push	edx
call	sub_5085B0
add	esp, 10h
movzx	eax, [ebp+var_3AD]
test	eax, eax
jz	short loc_4E891F
or	[ebp+var_4E8], 10h
lea	ecx, [ebp+var_3A8]
push	ecx
lea	edx, [ebp+var_390]
push	edx
lea	eax, [ebp+var_4C8]
push	eax
call	sub_403CD0
add	esp, 0Ch
mov	[ebp+var_724], eax
jmp	short loc_4E8949

loc_4E891F:
or	[ebp+var_4E8], 20h
lea	ecx, [ebp+var_390]
push	ecx
lea	edx, [ebp+var_3A8]
push	edx
lea	eax, [ebp+var_4E0]
push	eax
call	sub_403CD0
add	esp, 0Ch
mov	[ebp+var_724], eax

loc_4E8949:
mov	ecx, [ebp+var_724]
mov	[ebp+var_4B0], ecx
mov	edx, [ebp+var_4B0]
push	edx
mov	ecx, [ebp+var_314]
add	ecx, 54h
call	sub_4022F0
mov	eax, [ebp+var_4E8]
and	eax, 20h
jz	short loc_4E8987
and	[ebp+var_4E8], 0FFFFFFDFh
lea	ecx, [ebp+var_4E0]
call	sub_407910

loc_4E8987:
mov	ecx, [ebp+var_4E8]
and	ecx, 10h
jz	short loc_4E89A4
and	[ebp+var_4E8], 0FFFFFFEFh
lea	ecx, [ebp+var_4C8]
call	sub_407910

loc_4E89A4:
movzx	edx, [ebp+var_376]
test	edx, edx
jz	short loc_4E89DD
lea	ecx, [ebp+var_3A8]
call	sub_407910
lea	ecx, [ebp+var_3D8]
call	sub_407E50
lea	ecx, [ebp+var_390]
call	sub_407910
lea	ecx, [ebp+var_374]
call	sub_407910
jmp	short loc_4E8A15

loc_4E89DD:
lea	ecx, [ebp+var_3A8]
call	sub_407910
lea	ecx, [ebp+var_3D8]
call	sub_407E50
lea	ecx, [ebp+var_390]
call	sub_407910

loc_4E89FE:
mov	[ebp+var_2F5], 0
lea	ecx, [ebp+var_374]
call	sub_407910
jmp	loc_4E8529

loc_4E8A15:
mov	[ebp+var_4E1], 1
lea	ecx, [ebp+var_2D4]
call	sub_407910
lea	ecx, [ebp+var_2EC]
call	sub_407910
lea	ecx, [ebp+var_2F4]
call	sub_401110
lea	ecx, [ebp+var_310]
call	sub_407910
lea	ecx, [ebp+var_32C]
call	sub_407910
lea	ecx, [ebp+var_334]
call	sub_401110
mov	al, [ebp+var_4E1]
jmp	short loc_4E8A83

loc_4E8A66:		; default
mov	eax, [ebp+var_10] ; jumptable 004E74C5 cases 1-122,124-127
			; jumptable 004E757A cases 2-24,26-44
add	eax, 10h
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_6E8]
call	sub_4E8B70
jmp	short loc_4E8A83

loc_4E8A81:
xor	al, al

loc_4E8A83:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4E7410 endp

off_4E8A94 dd offset loc_4E75B6, offset	loc_4E789D ; jump table	for switch statement
dd offset loc_4E79BB, offset loc_4E7B40
dd offset loc_4E8A66
byte_4E8AA8 db	    0,	   4,	  4,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     1
db	4,     4,     4,     4
db	2,     3
align 4
off_4E8B2C dd offset loc_4E8152	; jump table for switch	statement
dd offset loc_4E81C0
dd offset loc_4E7FC9
dd offset loc_4E822E
dd offset loc_4E8A66
byte_4E8B40 db	    0,	   1,	  4,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     2,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3
align 10h


; Attributes: bp-based frame

sub_4E8B70 proc	near

var_50=	dword ptr -50h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	edx, [eax]
mov	ecx, [ebp+var_48]
mov	eax, [edx+4Ch]
call	eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_4]
call	sub_522260
mov	eax, [ebp+var_1C]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_28]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_28]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_44]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
lea	edx, [ebp+var_40]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_44]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_38]
mov	[ecx], edx
mov	eax, [ebp+var_8]
xor	ecx, ecx
cmp	eax, [ebp+var_40]
setnz	cl
mov	[ebp+var_49], cl
mov	dl, [ebp+var_49]
mov	[ebp+var_4A], dl
movzx	eax, [ebp+var_4A]
test	eax, eax
jz	short loc_4E8C20
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
mov	[ebp+var_50], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	ecx, [ebp+var_50]
mov	eax, [edx]
call	eax
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_4E8C1C
jmp	short loc_4E8C20

loc_4E8C1C:
mov	al, 1
jmp	short loc_4E8C22

loc_4E8C20:
xor	al, al

loc_4E8C22:
mov	esp, ebp
pop	ebp
retn	8
sub_4E8B70 endp

align 10h


; Attributes: bp-based frame

sub_4E8C30 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E8C30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_0]
mov	[ebp+var_64], eax
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_68]
mov	ecx, [edx+8]
cmp	ecx, [eax]
jnz	short loc_4E8C81
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_68]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+4]
jnz	short loc_4E8C81
mov	al, 1
jmp	loc_4E8D9E
jmp	loc_4E8D9E

loc_4E8C81:
mov	edx, [ebp+var_60]
movzx	eax, byte ptr [edx+10h]
test	eax, eax
jz	loc_4E8D9C
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ecx+4]
mov	[ebp+var_4C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_44]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_44], offset off_1573D4C
mov	ecx, [ebp+var_50]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_4C]
mov	[ebp+var_38], edx
lea	ecx, [ebp+var_34]
call	sub_DD2310
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	eax, [ebp+var_60]
mov	ecx, [eax]
mov	edx, [edx]
mov	eax, [edx+0Ch]
call	eax
cmp	[ebp+var_14], 0B0h
jnz	short loc_4E8D31
mov	[ebp+var_45], 1
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_34]
mov	[ebp+var_54], ecx
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_54]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_401110
mov	al, [ebp+var_45]
jmp	short loc_4E8D9E
jmp	short loc_4E8D6A

loc_4E8D31:
mov	[ebp+var_46], 0
mov	[ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
lea	edx, [ebp+var_34]
mov	[ebp+var_58], edx
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_401110
mov	al, [ebp+var_46]
jmp	short loc_4E8D9E

loc_4E8D6A:
mov	[ebp+var_4], 9
mov	byte ptr [ebp+var_4], 8
lea	eax, [ebp+var_34]
mov	[ebp+var_5C], eax
mov	byte ptr [ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+var_5C]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_401110
jmp	short loc_4E8D9E

loc_4E8D9C:
xor	al, al

loc_4E8D9E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4E8C30 endp

align 10h


; Attributes: bp-based frame

sub_4E8DB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F77FB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E8DD3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E8DD3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E8DB0 endp

align 10h


; Attributes: bp-based frame

sub_4E8DE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F5D1F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E8E03
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E8E03:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E8DE0 endp

align 10h


; Attributes: bp-based frame

sub_4E8E10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A31BD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E8E33
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E8E33:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E8E10 endp

align 10h


; Attributes: bp-based frame

sub_4E8E40 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E8E40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_14], eax
mov	eax, [ebp+var_28]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+4], 0
push	0
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_43A100
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_F]
call	nullsub_1
mov	eax, [ebp+var_28]
add	eax, 70h
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_24]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_24]
add	eax, 8
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E8E40 endp

align 10h


; Attributes: bp-based frame

sub_4E8F20 proc	near

var_A0=	dword ptr -0A0h

push	ebp
mov	ebp, esp
sub	esp, 0A0h
mov	[ebp+var_A0], ecx
mov	ecx, [ebp+var_A0]
add	ecx, 70h
call	sub_468190
mov	ecx, [ebp+var_A0]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_A0]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_A0]
call	sub_436CF0
mov	esp, ebp
pop	ebp
retn
sub_4E8F20 endp

align 10h


; Attributes: bp-based frame

sub_4E8F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_440360
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 34h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+5Ch]
mov	[eax+5Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+60h]
mov	[eax+60h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+64h]
mov	[eax+64h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+68h]
mov	[eax+68h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+6Ch]
fstp	dword ptr [eax+6Ch]
mov	edx, [ebp+arg_0]
add	edx, 70h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_50AC50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E8F70 endp

align 10h


; Attributes: bp-based frame

sub_4E9000 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E9000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_2C], ecx
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_18], eax
mov	eax, [ebp+var_2C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_2C]
add	edx, 8
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	ecx, [ebp+var_2C]
add	ecx, 0Ch
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_20]
add	ecx, 8
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_2C]
add	eax, 18h
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_28]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_28]
add	eax, 8
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E9000 endp

align 10h


; Attributes: bp-based frame

sub_4E90E0 proc	near

var_14=	dword ptr -14h
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_14]
push	eax
call	sub_409500
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4E90E0 endp

align 10h


; Attributes: bp-based frame

sub_4E9110 proc	near

var_100= dword ptr -100h
var_FC=	dword ptr -0FCh

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_100], ecx
mov	eax, [ebp+var_100]
add	eax, 4
mov	[ebp+var_FC], eax
mov	ecx, [ebp+var_FC]
add	ecx, 18h
call	sub_437300
mov	ecx, [ebp+var_FC]
add	ecx, 0Ch
call	sub_437300
mov	ecx, [ebp+var_FC]
call	sub_437300
mov	esp, ebp
pop	ebp
retn
sub_4E9110 endp

align 10h


; Attributes: bp-based frame

sub_4E9160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581850
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_4E9160 endp

align 10h


; Attributes: bp-based frame

sub_4E91A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	al, al
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4E91A0 endp

align 10h


; Attributes: bp-based frame

sub_4E91B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
or	eax, 0FFFFFFFFh
mov	esp, ebp
pop	ebp
retn
sub_4E91B0 endp

align 10h


; Attributes: bp-based frame

sub_4E91C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	edx, [eax+0ACh]
xor	eax, eax
cmp	edx, [ecx+0A8h]
setnl	al
mov	esp, ebp
pop	ebp
retn
sub_4E91C0 endp

align 10h


; Attributes: bp-based frame

sub_4E91F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+0ACh], 0
jle	short loc_4E9213
mov	ecx, [ebp+var_4]
mov	edx, [ecx+80h]
mov	[ebp+var_8], edx
jmp	short loc_4E921A

loc_4E9213:
mov	[ebp+var_8], 0FFFFFFFFh

loc_4E921A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_4E91F0 endp

align 10h


; Attributes: bp-based frame

sub_4E9230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+0A8h]
mov	esp, ebp
pop	ebp
retn
sub_4E9230 endp

align 10h


; Attributes: bp-based frame

sub_4E9250 proc	near

var_5C=	dword ptr -5Ch
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 28h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 50h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 78h
call	sub_402390
lea	ecx, [ebp+var_4]
call	nullsub_1
lea	ecx, [ebp+var_5]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 0A0h
call	sub_402390
lea	ecx, [ebp+var_5]
call	nullsub_1
lea	ecx, [ebp+var_6]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 0C8h
call	sub_402390
lea	ecx, [ebp+var_6]
call	nullsub_1
lea	ecx, [ebp+var_7]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 0F0h
call	sub_402390
lea	ecx, [ebp+var_7]
call	nullsub_1
lea	ecx, [ebp+var_8]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 118h
call	sub_402390
lea	ecx, [ebp+var_8]
call	nullsub_1
lea	ecx, [ebp+var_9]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 140h
call	sub_402390
lea	ecx, [ebp+var_9]
call	nullsub_1
lea	ecx, [ebp+var_A]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 168h
call	sub_402390
lea	ecx, [ebp+var_A]
call	nullsub_1
lea	ecx, [ebp+var_B]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 190h
call	sub_402390
lea	ecx, [ebp+var_B]
call	nullsub_1
lea	ecx, [ebp+var_C]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 1B8h
call	sub_4022A0
lea	ecx, [ebp+var_C]
call	nullsub_1
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 1D0h
call	sub_4022A0
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 1E8h
call	sub_4022A0
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 200h
call	sub_402390
lea	ecx, [ebp+var_F]
call	nullsub_1
push	offset sub_4561B0
push	4
push	28h
mov	eax, [ebp+var_5C]
add	eax, 228h
push	eax
call	sub_4078B0
lea	ecx, [ebp+var_10]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 2C8h
call	sub_402390
lea	ecx, [ebp+var_10]
call	nullsub_1
lea	ecx, [ebp+var_11]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_5C]
add	ecx, 2F0h
call	sub_402390
lea	ecx, [ebp+var_11]
call	nullsub_1
push	offset sub_4561B0
push	6
push	28h
mov	ecx, [ebp+var_5C]
add	ecx, 318h
push	ecx
call	sub_4078B0
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn
sub_4E9250 endp

align 10h


; Attributes: bp-based frame

sub_4E9490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset sub_407E50
push	6
push	28h
mov	eax, [ebp+var_4]
add	eax, 318h
push	eax
call	sub_40F3E0
mov	ecx, [ebp+var_4]
add	ecx, 2F0h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 2C8h
call	sub_407E50
push	offset sub_407E50
push	4
push	28h
mov	ecx, [ebp+var_4]
add	ecx, 228h
push	ecx
call	sub_40F3E0
mov	ecx, [ebp+var_4]
add	ecx, 200h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 1E8h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 1D0h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 1B8h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 190h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 168h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 140h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 118h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0F0h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0C8h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0A0h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_4E9490 endp

align 10h


; Attributes: bp-based frame

sub_4E95B0 proc	near

var_68=	dword ptr -68h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_68]
add	ecx, 10h
call	sub_4E95D0
mov	ecx, [ebp+var_68]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4E95B0 endp



; Attributes: bp-based frame

sub_4E95D0 proc	near

var_DC=	dword ptr -0DCh
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	eax, [ebp+var_DC]
add	eax, 50h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5935F0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_DC]
add	ecx, 44h
call	sub_555450
mov	ecx, [ebp+var_DC]
add	ecx, 38h
call	sub_4FF260
mov	ecx, [ebp+var_DC]
add	ecx, 2Ch
call	sub_4FF260
mov	ecx, [ebp+var_DC]
add	ecx, 20h
call	sub_4FF260
mov	ecx, [ebp+var_DC]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_4E95D0 endp

align 10h


; Attributes: bp-based frame

sub_4E9650 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 14h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx+4]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_4E967D
xor	eax, eax
jmp	short loc_4E96E2

loc_4E967D:
mov	[ebp+var_4], 0
jmp	short loc_4E968F

loc_4E9686:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_4E968F:
mov	ecx, [ebp+var_14]
add	ecx, 14h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_C]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
cmp	[ebp+var_4], ecx
jnb	short loc_4E96DD
mov	edx, [ebp+var_14]
mov	eax, [edx+14h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_10]
mov	eax, [edx+ecx*4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
mov	eax, [edx+10h]
call	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4E96DB
mov	eax, 2
jmp	short loc_4E96E2

loc_4E96DB:
jmp	short loc_4E9686

loc_4E96DD:
mov	eax, 4

loc_4E96E2:
mov	esp, ebp
pop	ebp
retn
sub_4E9650 endp

align 10h


; Attributes: bp-based frame

sub_4E96F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	edx, [ebp+arg_0]
add	edx, 1Ch
mov	[ebp+var_30], edx
mov	eax, [ebp+var_34]
add	eax, 1Ch
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4694E0
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_30]
mov	cl, [eax+18h]
mov	[edx+18h], cl
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	cl, [eax+38h]
mov	[edx+38h], cl
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+40h]
mov	[edx+40h], ecx
mov	eax, [eax+44h]
mov	[edx+44h], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
mov	eax, [edx+40h]
mov	[ecx+40h], eax
mov	edx, [edx+44h]
mov	[ecx+44h], edx
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_4E96F0 endp

align 10h


; Attributes: bp-based frame

sub_4E97B0 proc	near

var_58=	dword ptr -58h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 78h
call	sub_555450
mov	ecx, [ebp+var_58]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_58]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_58]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_4E97B0 endp

align 10h


; Attributes: bp-based frame

sub_4E97F0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax+35h], cl
mov	esp, ebp
pop	ebp
retn	4
sub_4E97F0 endp

align 10h


; Attributes: bp-based frame

sub_4E9810 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 4
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4E9810 endp

align 10h


; Attributes: bp-based frame

sub_4E9860 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+2Ch]
mov	[ecx+2Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_403400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E9860 endp

align 10h


; Attributes: bp-based frame

sub_4E98B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+2Ch]
mov	[ecx+2Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E98B0 endp

align 10h


; Attributes: bp-based frame

sub_4E9900 proc	near

var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E9900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
call	sub_402390
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	eax, [ebp+var_E]
call	nullsub_1
mov	[ebp+var_20], eax
mov	eax, [ebp+var_28]
add	eax, 34h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_1C]
add	eax, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 48h
call	sub_402390
lea	ecx, [ebp+var_F]
call	nullsub_1
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E9900 endp

align 10h


; Attributes: bp-based frame

sub_4E99C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F73F50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E99E3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E99E3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E99C0 endp

align 10h


; Attributes: bp-based frame

sub_4E99F0 proc	near

var_EC=	dword ptr -0ECh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A5=	byte ptr -0A5h
DstBuf=	byte ptr -0A4h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E99F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E0h
mov	[ebp+var_EC], ecx
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
lea	ecx, [ebp+var_A5]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_EC]
add	ecx, 4
call	sub_4022A0
lea	ecx, [ebp+var_A5]
call	nullsub_1
mov	ecx, 139Ch
lea	eax, [ebp+var_24]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_24], offset off_155E020
mov	[ebp+var_1C], 0
mov	[ebp+var_18], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_1C], 0
lea	edx, [ebp+var_24]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
push	offset aI64d	; "%I64d"
push	80h		; SizeInBytes
lea	edx, [ebp+DstBuf]
push	edx		; DstBuf
call	_sprintf_s
add	esp, 14h
lea	eax, [ebp+DstBuf]
push	eax
mov	ecx, [ebp+var_EC]
add	ecx, 4
call	sub_402310
mov	ecx, [ebp+var_EC]
mov	edx, [ecx]
mov	[ebp+var_B8], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_B8]
push	ecx
call	sub_432A50
add	esp, 8
mov	[ebp+var_B0], eax
mov	edx, [ebp+var_B8]
mov	eax, [edx+1Ch]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_B4]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_B4]
add	edx, 8
mov	eax, [ebp+var_B8]
mov	[eax+1Ch], edx
mov	ecx, [ebp+var_EC]
add	ecx, 4
call	sub_4042A0
push	eax
mov	ecx, [ebp+var_EC]
add	ecx, 4
call	sub_5F52F0
push	eax
mov	ecx, [ebp+var_EC]
mov	edx, [ecx]
push	edx
call	sub_81B9D0
add	esp, 0Ch
push	0FFFFFFFEh
mov	eax, [ebp+var_EC]
mov	ecx, [eax]
push	ecx
call	sub_4E3E50
add	esp, 8
push	0FFFFD8F0h
mov	edx, [ebp+var_EC]
mov	eax, [edx]
push	eax
call	sub_432C50
add	esp, 8
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_24]
call	sub_401110
mov	eax, [ebp+var_EC]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4E99F0 endp

align 10h


; Attributes: bp-based frame

sub_4E9BB0 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
add	ecx, 4
call	sub_4042A0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 4
call	sub_5F52F0
push	eax
mov	eax, [ebp+var_28]
mov	ecx, [eax]
push	ecx
call	sub_81B9D0
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+1Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	edx, [ebp+var_8]
mov	[edx+1Ch], ecx
push	0FFFFD8F0h
mov	eax, [ebp+var_28]
mov	ecx, [eax]
push	ecx
call	sub_432C50
add	esp, 8
mov	ecx, [ebp+var_28]
add	ecx, 4
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_4E9BB0 endp

align 10h


; Attributes: bp-based frame

sub_4E9C30 proc	near

var_24=	dword ptr -24h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
add	ecx, 4
call	sub_4042A0
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 4
call	sub_5F52F0
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B9D0
add	esp, 0Ch
push	0FFFFD8F0h
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_481EF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_4E9C30 endp

align 10h


; Attributes: bp-based frame

sub_4E9C80 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_80]
call	sub_49F270
mov	eax, [ebp+var_80]
mov	dword ptr [eax], offset	off_15806AC
mov	ecx, [ebp+var_80]
add	ecx, 30h
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_1C], edx
mov	[ebp+arg_0], 0
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_80]
add	edx, 34h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
cmp	[ebp+arg_4], 0
jz	loc_4E9D74
push	28h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_4E9D10
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[ebp+var_2C], edx
mov	eax, [ecx+1Ch]
mov	[ebp+var_28], eax
push	0
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8]
call	sub_F5D280
mov	[ebp+var_30], eax
jmp	short loc_4E9D17

loc_4E9D10:
mov	[ebp+var_30], 0

loc_4E9D17:
mov	eax, [ebp+var_30]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_34], ecx
lea	edx, [ebp+var_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_80]
add	ecx, 34h
call	sub_5003D0
mov	eax, [ebp+var_4]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
cmp	[ebp+var_4C], 0
jz	short loc_4E9D6A
push	1
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
mov	edx, [eax]
call	edx
mov	[ebp+var_84], eax
jmp	short loc_4E9D74

loc_4E9D6A:
mov	[ebp+var_84], 0

loc_4E9D74:
lea	ecx, [ebp+arg_0]
call	sub_500380
mov	eax, [ebp+var_80]
mov	esp, ebp
pop	ebp
retn	8
sub_4E9C80 endp

align 10h


; Attributes: bp-based frame

sub_4E9D90 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	ecx, [eax+34h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_4E9DE1
mov	edx, [ebp+var_54]
mov	eax, [edx+34h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+18h]
or	ecx, [eax+1Ch]
jz	short loc_4E9DCE
mov	[ebp+var_5C], 1
jmp	short loc_4E9DD5

loc_4E9DCE:
mov	[ebp+var_5C], 0

loc_4E9DD5:
movzx	edx, byte ptr [ebp+var_5C]
test	edx, edx
jz	loc_4E9E8E

loc_4E9DE1:
mov	eax, [ebp+var_54]
mov	ecx, [eax+30h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+30h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_14]
call	sub_4E9C30
push	0
push	0
push	0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_81C700
add	esp, 10h
test	eax, eax
jz	short loc_4E9E8E
lea	edx, [ebp+var_3C]
push	edx
push	0FFFFFFFFh
mov	eax, [ebp+var_4]
push	eax
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_38], eax
cmp	[ebp+var_3C], 0
jz	short loc_4E9E43
mov	dword ptr [ebp+var_50],	0
jmp	short loc_4E9E58
jmp	short loc_4E9E58

loc_4E9E43:
push	0
mov	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_818EC0
add	esp, 0Ch
mov	dword ptr [ebp+var_50],	eax

loc_4E9E58:
mov	eax, dword ptr [ebp+var_50]
push	eax		; char
push	offset aLuaErrorS ; "Lua error:	%S"
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
mov	[ebp+var_60], ecx
mov	edx, 1
shl	edx, 3
mov	eax, [ebp+var_60]
mov	ecx, [eax]
sub	ecx, edx
mov	edx, [ebp+var_60]
mov	[edx], ecx

loc_4E9E8E:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_4E9D90 endp

align 10h


; Attributes: bp-based frame

sub_4E9EA0 proc	near

var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_4E9ED0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4E9EC5
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4E9EC5:
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_4E9EA0 endp

align 10h


; Attributes: bp-based frame

sub_4E9ED0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4E9ED0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax+34h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_4E9F16
push	1
mov	eax, [ebp+var_10]
mov	edx, [eax]
mov	ecx, [ebp+var_10]
mov	eax, [edx]
call	eax
mov	[ebp+var_38], eax
jmp	short loc_4E9F1D

loc_4E9F16:
mov	[ebp+var_38], 0

loc_4E9F1D:
mov	ecx, [ebp+var_34]
add	ecx, 30h
call	sub_500380
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx], offset	off_1573C10
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_34]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4E9ED0 endp

align 10h


; Attributes: bp-based frame

sub_4E9F60 proc	near

var_38=	dword ptr -38h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+arg_0]
mov	cl, [eax+18h]
mov	[edx+18h], cl
mov	edx, [ebp+arg_0]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_38]
add	ecx, 1Ch
call	sub_44D270
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+28h]
mov	[eax+28h], dl
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+29h]
mov	[eax+29h], dl
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+2Ah]
mov	[eax+2Ah], dl
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_4E9F60 endp

align 10h


; Attributes: bp-based frame

sub_4E9FF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F6DBF0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA013
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA013:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4E9FF0 endp

align 10h


; Attributes: bp-based frame

sub_4EA020 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F6DA70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA043
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA043:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA020 endp

align 10h


; Attributes: bp-based frame

sub_4EA050 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset aGoto	; "GoTo"
mov	ecx, [ebp+arg_0]
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA050 endp



; Attributes: bp-based frame

sub_4EA080 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset aFacetarget ; "FaceTarget"
mov	ecx, [ebp+arg_0]
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA080 endp



; Attributes: bp-based frame

sub_4EA0B0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset aEvadetarget ; "EvadeTarget"
mov	ecx, [ebp+arg_0]
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA0B0 endp



; Attributes: bp-based frame

sub_4EA0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 40h
mov	eax, [ebp+var_4]
mov	edx, [eax+40h]
mov	eax, [edx+14h]
call	eax
mov	esp, ebp
pop	ebp
retn
sub_4EA0E0 endp

align 10h


; Attributes: bp-based frame

sub_4EA100 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0D8h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_501C30
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 40h
call	sub_F60230
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], offset	off_1580788
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4EA167
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA167:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4EA100 endp

align 10h


; Attributes: bp-based frame

sub_4EA180 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset aFollowtarget ; "FollowTarget"
mov	ecx, [ebp+arg_0]
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA180 endp



; Attributes: bp-based frame

sub_4EA1B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A0h
mov	eax, [ebp+var_4]
mov	edx, [eax+0A0h]
mov	eax, [edx+14h]
call	eax
mov	esp, ebp
pop	ebp
retn
sub_4EA1B0 endp

align 10h


; Attributes: bp-based frame

sub_4EA1E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+138h], offset off_1580788
mov	ecx, [ebp+var_4]
add	ecx, 0A0h
call	sub_F60230
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_F607E0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1580788
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4EA22A
mov	eax, [ebp+var_4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA22A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA1E0 endp

align 10h


; Attributes: bp-based frame

sub_4EA240 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0FFFFFFFFh
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+24h]
call	eax
mov	esp, ebp
pop	ebp
retn	4
sub_4EA240 endp



; Attributes: bp-based frame

sub_4EA260 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset aWaypoint ; "Waypoint"
mov	ecx, [ebp+arg_0]
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA260 endp



; Attributes: bp-based frame

sub_4EA290 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset aRotatedegrees ;	"RotateDegrees"
mov	ecx, [ebp+arg_0]
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA290 endp



; Attributes: bp-based frame

sub_4EA2C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_F60230
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1580788
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4EA2EF
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA2EF:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA2C0 endp

align 10h


; Attributes: bp-based frame

sub_4EA300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F60230
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA323
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA323:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA300 endp

align 10h


; Attributes: bp-based frame

sub_4EA330 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1580788
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4EA354
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA354:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA330 endp

align 10h


; Attributes: bp-based frame

sub_4EA360 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_4EA360 endp

align 10h


; Attributes: bp-based frame

sub_4EA3B0 proc	near

var_34=	dword ptr -34h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_34]
add	ecx, 30h
call	sub_5D0370
mov	eax, [ebp+var_34]
mov	dword ptr [eax+48h], 0
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_4EA3B0 endp

align 10h


; Attributes: bp-based frame

sub_4EA410 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_403850
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_2C]
add	ecx, 18h
call	sub_403850
mov	ecx, [ebp+var_2C]
add	ecx, 30h
call	sub_5D0370
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+48h], 0
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	8
sub_4EA410 endp

align 10h


; Attributes: bp-based frame

sub_4EA460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 30h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_502840
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_8]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_4EA460 endp

align 10h


; Attributes: bp-based frame

sub_4EA4A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_4022F0
mov	edx, [ebp+var_8]
add	edx, 30h
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
add	eax, 30h
push	eax
mov	ecx, [ebp+var_4]
call	sub_50D0A0
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+48h]
mov	[ecx+48h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+4Ch]
mov	[ecx+4Ch], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA4A0 endp



; Attributes: bp-based frame

sub_4EA500 proc	near
push	ebp
mov	ebp, esp
mov	eax, dword_196AEF4
and	eax, 1
jnz	short loc_4EA533
mov	ecx, dword_196AEF4
or	ecx, 1
mov	dword_196AEF4, ecx
mov	ecx, offset unk_196AF18
call	sub_FAD270
push	offset sub_14147B0 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_4EA533:
mov	eax, offset unk_196AF18
pop	ebp
retn
sub_4EA500 endp

align 10h


; Attributes: bp-based frame

sub_4EA540 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_4EA560
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_4EA540 endp



; Attributes: bp-based frame

sub_4EA560 proc	near

var_2C=	dword ptr -2Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 180h
call	sub_407E50
mov	ecx, [ebp+var_2C]
add	ecx, 148h
call	sub_407E50
mov	ecx, [ebp+var_2C]
add	ecx, 120h
call	sub_407E50
mov	ecx, [ebp+var_2C]
add	ecx, 114h
call	sub_487140
mov	ecx, [ebp+var_2C]
add	ecx, 0ECh
call	sub_407E50
mov	ecx, [ebp+var_2C]
add	ecx, 64h
call	sub_407E50
mov	ecx, [ebp+var_2C]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_2C]
add	ecx, 14h
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_4EA560 endp

align 10h


; Attributes: bp-based frame

sub_4EA5E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	ecx
fldz
fstp	[esp+8+var_8]
call	sub_4EA500
mov	ecx, eax
call	sub_F82280
call	sub_4EA500
mov	ecx, eax
call	sub_F7C870
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_4EA5E0 endp

align 10h


; Attributes: bp-based frame

sub_4EA610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7C850
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA633
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA633:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA610 endp

align 10h


; Attributes: bp-based frame

sub_4EA640 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 28h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 50h
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 50h
call	sub_403400
mov	eax, [ebp+arg_0]
add	eax, 78h
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 78h
call	sub_50FA70
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+84h]
fstp	dword ptr [ecx+84h]
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+88h]
mov	[eax+88h], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8Ch]
mov	[eax+8Ch], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	[eax+90h], edx
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA640 endp

align 10h


; Attributes: bp-based frame

sub_4EA6E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7C720
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA703
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA703:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA6E0 endp

align 10h


; Attributes: bp-based frame

sub_4EA710 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1580C98
mov	ecx, [ebp+var_4]
call	sub_4E9160
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4EA73C
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA73C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA710 endp

align 10h


; Attributes: bp-based frame

sub_4EA750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7C3D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA773
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA773:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA750 endp

align 10h


; Attributes: bp-based frame

sub_4EA780 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7C2D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA7A3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA7A3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA780 endp

align 10h


; Attributes: bp-based frame

sub_4EA7B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 84h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4E9160
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4EA7F3
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA7F3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA7B0 endp

align 10h


; Attributes: bp-based frame

sub_4EA800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7C0C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA823
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA823:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA800 endp

align 10h


; Attributes: bp-based frame

sub_4EA830 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1580D98
mov	ecx, [ebp+var_18]
add	ecx, 84h
call	sub_5000F0
mov	ecx, [ebp+var_18]
call	sub_4E9160
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4EA86C
mov	edx, [ebp+var_18]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA86C:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA830 endp

align 10h


; Attributes: bp-based frame

sub_4EA880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7BEF0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA8A3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA8A3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA880 endp

align 10h
; [00000010 BYTES: COLLAPSED FUNCTION unknown_libname_9. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_4EA8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0Eh
mov	esp, ebp
pop	ebp
retn
sub_4EA8C0 endp



; Attributes: bp-based frame

sub_4EA8D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 16h
mov	esp, ebp
pop	ebp
retn
sub_4EA8D0 endp



; Attributes: bp-based frame

sub_4EA8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 17h
mov	esp, ebp
pop	ebp
retn
sub_4EA8E0 endp



; Attributes: bp-based frame

sub_4EA8F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_1581298
mov	ecx, [ebp+var_8]
add	ecx, 84h
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4E9160
mov	esp, ebp
pop	ebp
retn
sub_4EA8F0 endp

align 10h


; Attributes: bp-based frame

sub_4EA930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_4EA8F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA955
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA955:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA930 endp

align 10h


; Attributes: bp-based frame

sub_4EA960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1Eh
mov	esp, ebp
pop	ebp
retn
sub_4EA960 endp



; Attributes: bp-based frame

sub_4EA970 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 20h
mov	esp, ebp
pop	ebp
retn
sub_4EA970 endp



; Attributes: bp-based frame

sub_4EA980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 21h
mov	esp, ebp
pop	ebp
retn
sub_4EA980 endp



; Attributes: bp-based frame

sub_4EA990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 23h
mov	esp, ebp
pop	ebp
retn
sub_4EA990 endp



; Attributes: bp-based frame

sub_4EA9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 24h
mov	esp, ebp
pop	ebp
retn
sub_4EA9A0 endp



; Attributes: bp-based frame

sub_4EA9B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7BDF0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EA9D3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EA9D3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA9B0 endp

align 10h


; Attributes: bp-based frame

sub_4EA9E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7BCB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAA03
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAA03:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EA9E0 endp

align 10h


; Attributes: bp-based frame

sub_4EAA10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7BBA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAA33
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAA33:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAA10 endp

align 10h


; Attributes: bp-based frame

sub_4EAA40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7BAB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAA63
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAA63:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAA40 endp

align 10h


; Attributes: bp-based frame

sub_4EAA70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B9A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAA93
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAA93:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAA70 endp

align 10h


; Attributes: bp-based frame

sub_4EAAA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B8B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAAC3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAAC3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAAA0 endp

align 10h


; Attributes: bp-based frame

sub_4EAAD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B7E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAAF3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAAF3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAAD0 endp

align 10h


; Attributes: bp-based frame

sub_4EAB00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B6C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAB23
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAB23:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAB00 endp

align 10h


; Attributes: bp-based frame

sub_4EAB30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B5D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAB53
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAB53:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAB30 endp

align 10h


; Attributes: bp-based frame

sub_4EAB60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B4E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAB83
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAB83:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAB60 endp

align 10h


; Attributes: bp-based frame

sub_4EAB90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B3F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EABB3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EABB3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAB90 endp

align 10h


; Attributes: bp-based frame

sub_4EABC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B210
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EABE3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EABE3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EABC0 endp

align 10h


; Attributes: bp-based frame

sub_4EABF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7B100
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAC13
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAC13:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EABF0 endp

align 10h


; Attributes: bp-based frame

sub_4EAC20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7AFF0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAC43
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAC43:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAC20 endp

align 10h


; Attributes: bp-based frame

sub_4EAC50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7AD90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAC73
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAC73:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAC50 endp

align 10h


; Attributes: bp-based frame

sub_4EAC80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7AC80
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EACA3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EACA3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAC80 endp

align 10h


; Attributes: bp-based frame

sub_4EACB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7AAA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EACD3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EACD3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EACB0 endp

align 10h


; Attributes: bp-based frame

sub_4EACE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7A990
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAD03
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAD03:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EACE0 endp

align 10h


; Attributes: bp-based frame

sub_4EAD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F7A880
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAD33
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAD33:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAD10 endp

align 10h


; Attributes: bp-based frame

sub_4EAD40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4E9160
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAD63
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAD63:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAD40 endp

align 10h


; Attributes: bp-based frame

sub_4EAD70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 88h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4E9160
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EADA1
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EADA1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAD70 endp

align 10h


; Attributes: bp-based frame

sub_4EADB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 80h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4E9160
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4EADF3
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EADF3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_4EADB0 endp

align 10h


; Attributes: bp-based frame

sub_4EAE00 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_15818A0
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax+8], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 0Ch
call	sub_403400
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_1581518
mov	ecx, [ebp+var_20]
add	ecx, 34h
mov	[ebp+var_1C], ecx
xor	edx, edx
mov	[ebp+var_C], edx
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	[edx+4], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ecx+4], eax
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4EAE00 endp

align 10h


; Attributes: bp-based frame

sub_4EAE90 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 90h
call	sub_4FFDD0
mov	ecx, [ebp+var_58]
call	sub_F90930
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4EAEC3
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EAEC3:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_4EAE90 endp

align 10h


; Attributes: bp-based frame

sub_4EAED0 proc	near

var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_152= byte ptr -152h
var_151= byte ptr -151h
var_150= dword ptr -150h
var_149= byte ptr -149h
var_148= dword ptr -148h
var_11D= byte ptr -11Dh
var_11C= dword ptr -11Ch
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_44=	byte ptr -44h
var_38=	byte ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 17Ch
mov	[ebp+var_164], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EAF05
mov	ecx, [ebp+var_164]
mov	edx, [ecx+4]
push	edx
push	offset aBlockbehaviorC ; "BlockBehavior	cast --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EAF05:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4EAF1A
mov	eax, 1
jmp	loc_4EB283

loc_4EAF1A:
lea	eax, [ebp+var_151]
push	eax
lea	ecx, [ebp+var_152]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_164]
call	sub_F79E10
lea	ecx, [ebp+var_99]
call	sub_401EF0
push	eax
push	offset aNum_attacks_ca ; "num_attacks_can_block"
lea	ecx, [ebp+var_98]
call	sub_407810
push	ecx		; float
fld	ds:dword_15439C8
fstp	[esp+180h+var_180]
lea	eax, [ebp+var_98]
push	eax		; int
lea	ecx, [ebp+var_1C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_98]
call	sub_407E50
lea	ecx, [ebp+var_99]
call	nullsub_1
lea	ecx, [ebp+var_C5]
call	sub_401EF0
push	eax
push	offset aBlock_damage ; "block_damage"
lea	ecx, [ebp+var_C4]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+180h+var_180]
lea	edx, [ebp+var_C4]
push	edx		; int
lea	eax, [ebp+var_1C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EAFEA
mov	[ebp+var_168], 1
jmp	short loc_4EAFF4

loc_4EAFEA:
mov	[ebp+var_168], 0

loc_4EAFF4:
mov	cl, byte ptr [ebp+var_168]
mov	[ebp+var_1D], cl
lea	ecx, [ebp+var_C4]
call	sub_407E50
lea	ecx, [ebp+var_C5]
call	nullsub_1
lea	ecx, [ebp+var_F1]
call	sub_401EF0
push	eax
push	offset aBlock_stuns ; "block_stuns"
lea	ecx, [ebp+var_F0]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+180h+var_180]
lea	edx, [ebp+var_F0]
push	edx		; int
lea	eax, [ebp+var_1C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EB062
mov	[ebp+var_16C], 1
jmp	short loc_4EB06C

loc_4EB062:
mov	[ebp+var_16C], 0

loc_4EB06C:
mov	cl, byte ptr [ebp+var_16C]
mov	[ebp+var_1E], cl
lea	ecx, [ebp+var_F0]
call	sub_407E50
lea	ecx, [ebp+var_F1]
call	nullsub_1
lea	ecx, [ebp+var_11D]
call	sub_401EF0
push	eax
push	offset aBlock_knockbac ; "block_knockbacks"
lea	ecx, [ebp+var_11C]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+180h+var_180]
lea	edx, [ebp+var_11C]
push	edx		; int
lea	eax, [ebp+var_1C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EB0DA
mov	[ebp+var_170], 1
jmp	short loc_4EB0E4

loc_4EB0DA:
mov	[ebp+var_170], 0

loc_4EB0E4:
mov	cl, byte ptr [ebp+var_170]
mov	[ebp+var_6D], cl
lea	ecx, [ebp+var_11C]
call	sub_407E50
lea	ecx, [ebp+var_11D]
call	nullsub_1
lea	ecx, [ebp+var_149]
call	sub_401EF0
push	eax
push	offset aBreak_action ; "break_action"
lea	ecx, [ebp+var_148]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+180h+var_180]
lea	edx, [ebp+var_148]
push	edx		; int
lea	eax, [ebp+var_1C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_6C], eax
lea	ecx, [ebp+var_148]
call	sub_407E50
lea	ecx, [ebp+var_149]
call	nullsub_1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_15C], edx
mov	eax, [ecx+4]
mov	[ebp+var_158], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_68]
call	sub_401100
mov	[ebp+var_68], offset off_155845C
mov	ecx, [ebp+var_15C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_158]
mov	[ebp+var_5C], edx
lea	ecx, [ebp+var_58]
call	sub_D96100
mov	[ebp+var_38], 1
mov	eax, [ebp+var_6C]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+20h]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_34], eax
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_4EB1D5
lea	edx, [ebp+var_30]
mov	[ebp+var_174], edx
mov	eax, [ebp+var_174]
mov	ecx, [eax]
or	ecx, 1
mov	edx, [ebp+var_174]
mov	[edx], ecx

loc_4EB1D5:
movzx	eax, [ebp+var_6D]
test	eax, eax
jz	short loc_4EB1F9
lea	ecx, [ebp+var_30]
mov	[ebp+var_178], ecx
mov	edx, [ebp+var_178]
mov	eax, [edx]
or	eax, 2
mov	ecx, [ebp+var_178]
mov	[ecx], eax

loc_4EB1F9:
movzx	edx, [ebp+var_1E]
test	edx, edx
jz	short loc_4EB21D
lea	eax, [ebp+var_30]
mov	[ebp+var_17C], eax
mov	ecx, [ebp+var_17C]
mov	edx, [ecx]
or	edx, 4
mov	eax, [ebp+var_17C]
mov	[eax], edx

loc_4EB21D:
lea	ecx, [ebp+var_44]
mov	[ebp+var_160], ecx
mov	edx, [ebp+var_160]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_160]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EB256
lea	eax, [ebp+var_68]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EB256:
mov	[ebp+var_150], 1
lea	ecx, [ebp+var_58]
call	sub_4087D0
lea	ecx, [ebp+var_68]
call	sub_401110
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_150]

loc_4EB283:
mov	esp, ebp
pop	ebp
retn	8
sub_4EAED0 endp

align 10h


; Attributes: bp-based frame

sub_4EB290 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_24=	byte ptr -24h
var_18=	byte ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EB2BC
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
push	edx
push	offset aBlockbehaviorU ; "BlockBehavior	uncast--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EB2BC:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ecx+4]
mov	[ebp+var_4C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_48]
call	sub_401100
mov	[ebp+var_48], offset off_155845C
mov	ecx, [ebp+var_50]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_4C]
mov	[ebp+var_3C], edx
lea	ecx, [ebp+var_38]
call	sub_D96100
mov	[ebp+var_18], 0
lea	eax, [ebp+var_24]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_54]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4EB327
lea	edx, [ebp+var_48]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EB327:
lea	ecx, [ebp+var_38]
call	sub_4087D0
lea	ecx, [ebp+var_48]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	4
sub_4EB290 endp

align 10h


; Attributes: bp-based frame

sub_4EB340 proc	near

var_7B0= dword ptr -7B0h
var_7AC= dword ptr -7ACh
var_7A8= dword ptr -7A8h
var_7A4= dword ptr -7A4h
var_7A0= dword ptr -7A0h
var_79C= dword ptr -79Ch
var_798= dword ptr -798h
var_794= dword ptr -794h
var_790= dword ptr -790h
var_78B= byte ptr -78Bh
var_78A= byte ptr -78Ah
var_789= byte ptr -789h
var_788= dword ptr -788h
var_784= dword ptr -784h
var_780= dword ptr -780h
var_77C= dword ptr -77Ch
var_778= dword ptr -778h
var_774= dword ptr -774h
var_770= dword ptr -770h
var_6D0= dword ptr -6D0h
var_6CC= dword ptr -6CCh
var_6C8= dword ptr -6C8h
var_6C4= dword ptr -6C4h
var_6C0= dword ptr -6C0h
var_6BC= dword ptr -6BCh
var_6B6= byte ptr -6B6h
var_6B5= byte ptr -6B5h
var_6B4= dword ptr -6B4h
var_6B0= dword ptr -6B0h
var_6AC= dword ptr -6ACh
var_6A8= byte ptr -6A8h
var_699= byte ptr -699h
var_698= byte ptr -698h
var_66D= byte ptr -66Dh
var_66C= dword ptr -66Ch
var_641= byte ptr -641h
var_640= dword ptr -640h
var_615= byte ptr -615h
var_614= dword ptr -614h
var_5EC= dword ptr -5ECh
var_5E5= byte ptr -5E5h
var_5E4= byte ptr -5E4h
var_5BC= dword ptr -5BCh
var_5B8= dword ptr -5B8h
var_5A8= dword ptr -5A8h
var_1A0= byte ptr -1A0h
var_17C= byte ptr -17Ch
var_170= byte ptr -170h
var_160= byte ptr -160h
var_13C= byte ptr -13Ch
var_130= byte ptr -130h
var_11D= byte ptr -11Dh
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_117= byte ptr -117h
var_116= byte ptr -116h
var_115= byte ptr -115h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
var_E0=	byte ptr -0E0h
var_C8=	dword ptr -0C8h
var_C4=	byte ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_94=	byte ptr -94h
var_88=	byte ptr -88h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_5C=	byte ptr -5Ch
var_50=	qword ptr -50h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7ACh
mov	[ebp+var_788], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EB375
mov	ecx, [ebp+var_788]
mov	edx, [ecx+4]
push	edx
push	offset aVerifybehavior ; "VerifyBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EB375:
lea	ecx, [ebp+var_6B5]
push	ecx
lea	edx, [ebp+var_6B6]
push	edx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_788]
call	sub_F79E10
lea	ecx, [ebp+var_5E5]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_5E4]
call	sub_407810
lea	ecx, [ebp+var_5E4]
push	ecx
lea	edx, [ebp+var_18]
push	edx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_5E4]
call	sub_407E50
lea	ecx, [ebp+var_5E5]
call	nullsub_1
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+39h]
test	ecx, ecx
jz	short loc_4EB46E
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
push	eax		; char
push	offset aVerifyCalledOn ; "Verify called	on a client cast! Skill:%"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 18h
movzx	ecx, byte_1889845
test	ecx, ecx
jz	short loc_4EB439
push	offset aPassingThrough ; "passing through verify without handling"...
mov	edx, [ebp+arg_0]
push	edx
call	__initp_misc_winxfltr_14
add	esp, 8

loc_4EB439:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_788]
call	sub_FB0570
mov	[ebp+var_5EC], eax
lea	ecx, [ebp+var_18]
call	sub_4FFBC0
mov	eax, [ebp+var_5EC]
jmp	loc_4EBE1C
jmp	loc_4EBE0F

loc_4EB46E:
lea	ecx, [ebp+var_615]
call	sub_401EF0
push	eax
push	offset aCheck_blocking ; "check_blocking"
lea	ecx, [ebp+var_614]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+7B0h+var_7B0]
lea	eax, [ebp+var_614]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EB4BA
mov	[ebp+var_789], 1
jmp	short loc_4EB4C1

loc_4EB4BA:
mov	[ebp+var_789], 0

loc_4EB4C1:
mov	dl, [ebp+var_789]
mov	[ebp+var_39], dl
lea	ecx, [ebp+var_614]
call	sub_407E50
lea	ecx, [ebp+var_615]
call	nullsub_1
lea	ecx, [ebp+var_641]
call	sub_401EF0
push	eax
push	offset aCheck_chargeup ; "check_chargeup"
lea	ecx, [ebp+var_640]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+7B0h+var_7B0]
lea	eax, [ebp+var_640]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EB52C
mov	[ebp+var_78A], 1
jmp	short loc_4EB533

loc_4EB52C:
mov	[ebp+var_78A], 0

loc_4EB533:
mov	dl, [ebp+var_78A]
mov	[ebp+var_33], dl
lea	ecx, [ebp+var_640]
call	sub_407E50
lea	ecx, [ebp+var_641]
call	nullsub_1
lea	ecx, [ebp+var_66D]
call	sub_401EF0
push	eax
push	offset aCheck_range ; "check_range"
lea	ecx, [ebp+var_66C]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+7B0h+var_7B0]
lea	eax, [ebp+var_66C]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EB59E
mov	[ebp+var_78B], 1
jmp	short loc_4EB5A5

loc_4EB59E:
mov	[ebp+var_78B], 0

loc_4EB5A5:
mov	dl, [ebp+var_78B]
mov	[ebp+var_31], dl
lea	ecx, [ebp+var_66C]
call	sub_407E50
lea	ecx, [ebp+var_66D]
call	nullsub_1
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_38], xmm0
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_4EB621
lea	ecx, [ebp+var_699]
call	sub_401EF0
push	eax
push	offset aRange	; "range"
lea	ecx, [ebp+var_698]
call	sub_407810
lea	ecx, [ebp+var_698]
push	ecx
lea	edx, [ebp+var_18]
push	edx
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_38]
lea	ecx, [ebp+var_698]
call	sub_407E50
lea	ecx, [ebp+var_699]
call	nullsub_1

loc_4EB621:
lea	eax, [ebp+var_30]
push	eax
call	sub_408780
lea	ecx, [ebp+var_30]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_32], 0
mov	edx, [ebp+arg_0]
mov	[ebp+var_790], edx
mov	eax, [ebp+var_790]
mov	ecx, [ebp+var_28]
cmp	ecx, [eax+10h]
jnz	short loc_4EB669
mov	edx, [ebp+var_790]
mov	eax, [ebp+var_24]
cmp	eax, [edx+14h]
jz	loc_4EB734

loc_4EB669:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_794], ecx
mov	edx, [ebp+var_794]
mov	eax, [ebp+var_794]
mov	ecx, [edx+10h]
or	ecx, [eax+14h]
jz	loc_4EB732
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_6C0], eax
mov	ecx, [edx+14h]
mov	[ebp+var_6BC], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_80]
call	sub_401100
mov	[ebp+var_80], offset off_1558450
mov	edx, [ebp+var_6C0]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_6BC]
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_70]
call	sub_DCA070
lea	ecx, [ebp+var_5C]
mov	[ebp+var_6C4], ecx
mov	edx, [ebp+var_6C4]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_6C4]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EB706
lea	eax, [ebp+var_80]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EB706:
mov	edx, dword ptr [ebp+var_50]
or	edx, dword ptr [ebp+var_50+4]
jz	short loc_4EB722
mov	eax, dword ptr [ebp+var_50]
cmp	eax, [ebp+var_28]
jnz	short loc_4EB722
mov	ecx, dword ptr [ebp+var_50+4]
cmp	ecx, [ebp+var_24]
jnz	short loc_4EB722
mov	[ebp+var_32], 1

loc_4EB722:
lea	ecx, [ebp+var_70]
call	sub_4087D0
lea	ecx, [ebp+var_80]
call	sub_401110

loc_4EB732:
jmp	short loc_4EB738

loc_4EB734:
mov	[ebp+var_32], 1

loc_4EB738:
mov	edx, [ebp+arg_0]
mov	[ebp+var_798], edx
mov	eax, [ebp+var_798]
mov	ecx, [ebp+var_798]
mov	edx, [eax+10h]
or	edx, [ecx+14h]
jz	loc_4EBD70
movzx	eax, [ebp+var_32]
test	eax, eax
jz	loc_4EBD70
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	[ebp+var_79C], ecx
mov	[ebp+var_7A0], edx
mov	eax, [ebp+var_79C]
mov	ecx, [ebp+var_7A0]
mov	edx, [eax+10h]
cmp	edx, [ecx]
jnz	short loc_4EB7A2
mov	eax, [ebp+var_79C]
mov	ecx, [ebp+var_7A0]
mov	edx, [eax+14h]
cmp	edx, [ecx+4]
jz	loc_4EBD70

loc_4EB7A2:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
lea	ecx, [ebp+var_B8]
call	sub_42DA70
lea	eax, [ebp+var_94]
mov	[ebp+var_6C8], eax
mov	ecx, [ebp+var_6C8]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_6C8]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4EB7F7
lea	edx, [ebp+var_B8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EB7F7:
movzx	ecx, [ebp+var_88]
test	ecx, ecx
jnz	loc_4EBD65
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B700
add	esp, 4
mov	[ebp+var_BC], 0
mov	[ebp+var_114], 0
mov	eax, [ebp+arg_4]
push	eax		; int
lea	ecx, [ebp+var_114]
push	ecx		; void *
call	sub_50DDD0
add	esp, 8
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_6D0], eax
mov	ecx, [edx+14h]
mov	[ebp+var_6CC], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_110]
call	sub_401100
mov	[ebp+var_110], offset off_1581910
mov	edx, [ebp+var_6D0]
mov	[ebp+var_108], edx
mov	eax, [ebp+var_6CC]
mov	[ebp+var_104], eax
lea	ecx, [ebp+var_100]
call	sub_E7C470
mov	ecx, [ebp+var_114]
mov	[ebp+var_C8], ecx
mov	[ebp+var_11D], 0
mov	[ebp+var_116], 0
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B700
add	esp, 4
movzx	eax, al
test	eax, eax
jz	short loc_4EB8BF
mov	[ebp+var_11D], 1

loc_4EB8BF:
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B700
add	esp, 4
movzx	edx, al
test	edx, edx
jz	short loc_4EB8D9
mov	[ebp+var_116], 1

loc_4EB8D9:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [eax+10h]
push	edx
mov	ecx, [ebp+var_788]
call	sub_4EBE30
mov	[ebp+var_118], al
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [eax+10h]
push	edx
mov	ecx, [ebp+var_788]
call	sub_4EBEE0
mov	[ebp+var_117], al
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EB94D
movzx	ecx, [ebp+var_116]
push	ecx
movzx	edx, [ebp+var_11D]
push	edx
movzx	eax, [ebp+var_117]
push	eax
movzx	ecx, [ebp+var_118]
push	ecx
push	offset aOurblockingDOu ; "ourblocking:%d ourcharging:%d	serverblo"...
mov	edx, [ebp+arg_0]
push	edx
call	__initp_misc_winxfltr_14
add	esp, 18h

loc_4EB94D:
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_11C], xmm0
mov	[ebp+var_115], 0
movzx	eax, [ebp+var_31]
test	eax, eax
jz	loc_4EBA71
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
lea	ecx, [ebp+var_1A0]
call	sub_42D660
lea	ecx, [ebp+var_17C]
mov	[ebp+var_770], ecx
mov	edx, [ebp+var_770]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_770]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EB9C4
lea	eax, [ebp+var_1A0]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EB9C4:
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
push	eax
mov	ecx, [edx+10h]
push	ecx
lea	ecx, [ebp+var_160]
call	sub_42D660
lea	edx, [ebp+var_13C]
mov	[ebp+var_774], edx
mov	eax, [ebp+var_774]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_774]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EBA1A
lea	ecx, [ebp+var_160]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EBA1A:
lea	ecx, [ebp+var_170]
lea	eax, [ebp+var_130]
push	eax
lea	eax, [ebp+var_6A8]
call	sub_40F4A0
call	sub_40F5F0
fstp	[ebp+var_11C]
movss	xmm0, [ebp+var_38]
mulss	xmm0, [ebp+var_38]
movss	xmm1, [ebp+var_11C]
comiss	xmm1, xmm0
jbe	short loc_4EBA5B
mov	[ebp+var_115], 1

loc_4EBA5B:
lea	ecx, [ebp+var_160]
call	sub_4E5560
lea	ecx, [ebp+var_1A0]
call	sub_4E5560

loc_4EBA71:
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_4EBA8B
movzx	edx, [ebp+var_118]
movzx	eax, [ebp+var_11D]
cmp	edx, eax
jnz	short loc_4EBAB4

loc_4EBA8B:
movzx	ecx, [ebp+var_33]
test	ecx, ecx
jz	short loc_4EBAA5
movzx	edx, [ebp+var_117]
movzx	eax, [ebp+var_116]
cmp	edx, eax
jnz	short loc_4EBAB4

loc_4EBAA5:
movzx	ecx, [ebp+var_115]
test	ecx, ecx
jz	loc_4EBCA8

loc_4EBAB4:
movzx	edx, byte_1889845
test	edx, edx
jz	short loc_4EBAD0
push	offset aVerifyHasDiffe ; "Verify has different result"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 8

loc_4EBAD0:
mov	[ebp+var_C4], 1
lea	eax, [ebp+var_5B8]
call	sub_A49A00
movzx	ecx, [ebp+var_118]
test	ecx, ecx
jz	short loc_4EBB08
lea	edx, [ebp+var_5B8]
push	edx
call	sub_F5B750
add	esp, 4
mov	[ebp+var_7A4], 0
jmp	short loc_4EBB21

loc_4EBB08:
lea	eax, [ebp+var_5B8]
push	eax
call	sub_F5B7A0
add	esp, 4
mov	[ebp+var_7A4], 0

loc_4EBB21:
movzx	ecx, [ebp+var_117]
test	ecx, ecx
jz	short loc_4EBB47
lea	edx, [ebp+var_5B8]
push	edx
call	sub_F5B750
add	esp, 4
mov	[ebp+var_7A8], 0
jmp	short loc_4EBB60

loc_4EBB47:
lea	eax, [ebp+var_5B8]
push	eax
call	sub_F5B7A0
add	esp, 4
mov	[ebp+var_7A8], 0

loc_4EBB60:
movzx	ecx, [ebp+var_115]
test	ecx, ecx
jz	short loc_4EBB86
lea	edx, [ebp+var_5B8]
push	edx
call	sub_F5B750
add	esp, 4
mov	[ebp+var_7AC], 0
jmp	short loc_4EBB9F

loc_4EBB86:
lea	eax, [ebp+var_5B8]
push	eax
call	sub_F5B7A0
add	esp, 4
mov	[ebp+var_7AC], 0

loc_4EBB9F:
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx+3Ch], 1
movzx	edx, [ebp+var_115]
test	edx, edx
jnz	short loc_4EBBD1
lea	eax, [ebp+var_5B8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_788]
call	sub_FB0570
mov	[ebp+var_BC], eax

loc_4EBBD1:
mov	eax, [ebp+arg_0]
mov	byte ptr [eax+3Ch], 0
lea	ecx, [ebp+var_5B8]
call	sub_A493F0
mov	ecx, [ebp+var_5B8]
add	ecx, 7
shr	ecx, 3
mov	[ebp+var_778], ecx
mov	edx, [ebp+var_5A8]
mov	[ebp+var_77C], edx
mov	eax, [ebp+var_77C]
add	eax, [ebp+var_778]
push	eax
mov	ecx, [ebp+var_77C]
push	ecx
lea	ecx, [ebp+var_E0]
call	sub_403980
lea	edx, [ebp+var_110]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_BC]
mov	[ebp+var_6AC], eax
lea	eax, [ebp+var_5B8]
call	sub_A496A0
lea	ecx, [ebp+var_100]
mov	[ebp+var_780], ecx
mov	ecx, [ebp+var_780]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_780]
call	sub_4087D0
lea	ecx, [ebp+var_110]
call	sub_401110
lea	ecx, [ebp+var_B8]
call	sub_4E5560
lea	edx, [ebp+var_30]
push	edx
call	sub_409000
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_6AC]
jmp	loc_4EBE1C

loc_4EBCA8:
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EBCC4
push	offset aVerifyHasSameR ; "Verify has same result"
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 8

loc_4EBCC4:
mov	[ebp+var_C4], 0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_788]
call	sub_FB0570
mov	[ebp+var_BC], eax
lea	edx, [ebp+var_110]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_BC]
mov	[ebp+var_6B0], eax
lea	ecx, [ebp+var_100]
mov	[ebp+var_784], ecx
mov	ecx, [ebp+var_784]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_784]
call	sub_4087D0
lea	ecx, [ebp+var_110]
call	sub_401110
lea	ecx, [ebp+var_B8]
call	sub_4E5560
lea	edx, [ebp+var_30]
push	edx
call	sub_409000
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_6B0]
jmp	loc_4EBE1C

loc_4EBD65:
lea	ecx, [ebp+var_B8]
call	sub_4E5560

loc_4EBD70:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	short loc_4EBDB8
mov	[ebp+var_5BC], 0
mov	edx, [ebp+arg_4]
push	edx		; int
lea	eax, [ebp+var_5BC]
push	eax		; void *
call	sub_50DDD0
add	esp, 8
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B700
add	esp, 4
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B700
add	esp, 4

loc_4EBDB8:
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EBDD4
push	offset aPassingThrough ; "passing through verify without handling"...
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 8

loc_4EBDD4:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_788]
call	sub_FB0570
mov	[ebp+var_6B4], eax
lea	edx, [ebp+var_30]
push	edx
call	sub_409000
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_6B4]
jmp	short loc_4EBE1C

loc_4EBE0F:
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1

loc_4EBE1C:
mov	esp, ebp
pop	ebp
retn	8
sub_4EB340 endp

align 10h


; Attributes: bp-based frame

sub_4EBE30 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+arg_0]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_D96030
mov	[ebp+var_8], 0FFh
lea	edx, [ebp+var_14]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_40]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EBE99
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EBE99:
movzx	eax, [ebp+var_4]
test	eax, eax
jz	short loc_4EBEBA
mov	[ebp+var_39], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	al, [ebp+var_39]
jmp	short loc_4EBED1

loc_4EBEBA:
mov	[ebp+var_3A], 0
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	al, [ebp+var_3A]

loc_4EBED1:
mov	esp, ebp
pop	ebp
retn	8
sub_4EBE30 endp

align 10h


; Attributes: bp-based frame

sub_4EBEE0 proc	near

var_70=	dword ptr -70h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1581928
mov	eax, [ebp+arg_0]
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_44], ecx
lea	ecx, [ebp+var_40]
call	sub_E2E6F0
mov	[ebp+var_8], 2Bh
lea	edx, [ebp+var_2C]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_58]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EBF49
lea	ecx, [ebp+var_50]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EBF49:
mov	eax, [ebp+var_10]
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jbe	short loc_4EBF66
mov	[ebp+var_51], 1
lea	ecx, [ebp+var_50]
call	sub_4FB380
mov	al, [ebp+var_51]
jmp	short loc_4EBF75

loc_4EBF66:
mov	[ebp+var_52], 0
lea	ecx, [ebp+var_50]
call	sub_4FB380
mov	al, [ebp+var_52]

loc_4EBF75:
mov	esp, ebp
pop	ebp
retn	8
sub_4EBEE0 endp

align 10h


; Attributes: bp-based frame

sub_4EBF80 proc	near

var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_12E= byte ptr -12Eh
var_12D= byte ptr -12Dh
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_121= byte ptr -121h
var_120= byte ptr -120h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_BC=	byte ptr -0BCh
var_B0=	byte ptr -0B0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_18=	byte ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 150h
mov	[ebp+var_150], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EBFB5
mov	ecx, [ebp+var_150]
mov	edx, [ecx+4]
push	edx
push	offset aHealbehaviorD ;	"HealBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EBFB5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4EBFCA
mov	eax, 1
jmp	loc_4EC2DA

loc_4EBFCA:
lea	eax, [ebp+var_12D]
push	eax
lea	ecx, [ebp+var_12E]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_150]
call	sub_F79E10
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_138], ecx
mov	edx, [eax+14h]
mov	[ebp+var_134], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558464
mov	eax, [ebp+var_138]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_134]
mov	[ebp+var_44], ecx
lea	ecx, [ebp+var_40]
call	sub_DDD7B0
lea	edx, [ebp+var_2C]
mov	[ebp+var_13C], edx
mov	eax, [ebp+var_13C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_13C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EC071
lea	ecx, [ebp+var_50]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EC071:
movzx	eax, [ebp+var_20]
test	eax, eax
jnz	loc_4EC2AD
lea	ecx, [ebp+var_F8]
call	sub_4E35E0
lea	ecx, [ebp+var_121]
call	sub_401EF0
push	eax
push	offset aHealth	; "health"
lea	ecx, [ebp+var_120]
call	sub_407810
lea	ecx, [ebp+var_120]
push	ecx
lea	edx, [ebp+var_18]
push	edx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_F4], eax
lea	ecx, [ebp+var_120]
call	sub_407E50
lea	ecx, [ebp+var_121]
call	nullsub_1
mov	[ebp+var_E4], 1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_144], ecx
mov	edx, [eax+14h]
mov	[ebp+var_140], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_E0]
call	sub_401100
mov	[ebp+var_E0], offset off_1581904
mov	eax, [ebp+var_144]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_140]
mov	[ebp+var_D4], ecx
lea	ecx, [ebp+var_D0]
call	sub_E7D010
lea	edx, [ebp+var_B0]
mov	eax, [ebp+var_F8]
mov	[edx], eax
mov	ecx, [ebp+var_F4]
mov	[edx+4], ecx
mov	eax, [ebp+var_F0]
mov	[edx+8], eax
mov	ecx, [ebp+var_EC]
mov	[edx+0Ch], ecx
mov	eax, [ebp+var_E8]
mov	[edx+10h], eax
mov	ecx, [ebp+var_E4]
mov	[edx+14h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_98], eax
mov	ecx, [edx+4]
mov	[ebp+var_94], ecx
lea	edx, [ebp+var_BC]
mov	[ebp+var_148], edx
mov	eax, [ebp+var_148]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_148]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EC1C3
lea	ecx, [ebp+var_E0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EC1C3:
mov	eax, [ebp+var_150]
cmp	dword ptr [eax+8], 0
jz	short loc_4EC24E
push	ecx
fld	ds:flt_1513C00
fstp	[esp+154h+var_154]
push	offset aCast	; "cast"
mov	ecx, [ebp+var_150]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_150]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
call	sub_F81B80
add	esp, 1Ch
fld	ds:flt_1513C04
fstp	[esp+154h+var_154]
push	offset aOnhit	; "onhit"
mov	ecx, [ebp+var_150]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_150]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
call	sub_F81B80
add	esp, 20h

loc_4EC24E:
mov	[ebp+var_128], 1
lea	ecx, [ebp+var_D0]
mov	[ebp+var_14C], ecx
mov	ecx, [ebp+var_14C]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_14C]
call	sub_4087D0
lea	ecx, [ebp+var_E0]
call	sub_401110
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_128]
jmp	short loc_4EC2DA

loc_4EC2AD:
mov	[ebp+var_12C], 0
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_12C]

loc_4EC2DA:
mov	esp, ebp
pop	ebp
retn	8
sub_4EBF80 endp



; Attributes: bp-based frame

sub_4EC2E0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_7C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_78], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	eax, [ebp+var_7C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_78]
mov	[ebp+var_64], ecx
lea	ecx, [ebp+var_60]
call	sub_DD69D0
lea	edx, [ebp+var_4C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_80]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EC357
lea	ecx, [ebp+var_70]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EC357:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_88], ecx
mov	edx, [eax+14h]
mov	[ebp+var_84], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_88]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DD6860
lea	edx, [ebp+var_14]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_8C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EC3D4
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EC3D4:
mov	eax, [ebp+var_40]
xor	ecx, ecx
cmp	eax, [ebp+var_8]
setl	cl
mov	[ebp+var_71], cl
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
mov	al, [ebp+var_71]
mov	esp, ebp
pop	ebp
retn	4
sub_4EC2E0 endp

align 10h


; Attributes: bp-based frame

sub_4EC410 proc	near

var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_8C], ecx
lea	eax, [ebp+var_59]
push	eax
lea	ecx, [ebp+var_1C]
call	sub_489C40
mov	[ebp+var_C], 0
mov	cl, [ebp+var_5A]
mov	[ebp+var_8], cl
call	nullsub_1
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_F79E10
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EC472
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
push	edx
push	offset aAndbehaviorD ; "AndBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EC472:
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_20]
call	sub_4046E0
jmp	short loc_4EC49B

loc_4EC48C:
mov	edx, [ebp+var_20]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_20], eax

loc_4EC49B:
lea	ecx, [ebp+var_1C]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	ecx, [ebp+var_20]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_8D], dl
movzx	eax, [ebp+var_8D]
test	eax, eax
jz	loc_4EC56C
mov	ecx, [ebp+var_20]
add	ecx, 10h
mov	[ebp+var_6C], ecx
push	offset aBehavior ; "behavior"
push	8
push	0
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_6C]
call	sub_435ED0
push	eax
call	sub_43EAD0
add	esp, 8
mov	[ebp+var_29], al
lea	ecx, [ebp+var_54]
call	sub_407E50
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4EC567
movzx	ecx, byte_1889845
test	ecx, ecx
jz	short loc_4EC536
mov	edx, [ebp+var_20]
cvttss2si eax, dword ptr [edx+38h]
push	eax
push	offset aAndbehaviorCas ; "AndBehavior Casting %d "
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EC536:
mov	edx, [ebp+var_20]
add	edx, 10h
mov	[ebp+var_88], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_88]
cvttss2si eax, dword ptr [edx+28h]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_FB0570
add	eax, [ebp+var_4]
mov	[ebp+var_4], eax

loc_4EC567:
jmp	loc_4EC48C

loc_4EC56C:
mov	ecx, [ebp+var_4]
mov	[ebp+var_58], ecx
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	8
sub_4EC410 endp

align 10h


; Attributes: bp-based frame

sub_4EC590 proc	near

var_6A4= dword ptr -6A4h
var_6A0= dword ptr -6A0h
var_69C= dword ptr -69Ch
var_698= dword ptr -698h
var_68D= byte ptr -68Dh
var_68C= dword ptr -68Ch
var_688= qword ptr -688h
var_680= dword ptr -680h
var_67A= word ptr -67Ah
var_678= dword ptr -678h
var_674= dword ptr -674h
var_670= dword ptr -670h
var_554= dword ptr -554h
var_550= dword ptr -550h
var_54C= dword ptr -54Ch
var_548= dword ptr -548h
var_544= dword ptr -544h
var_540= dword ptr -540h
var_53C= dword ptr -53Ch
var_538= dword ptr -538h
var_534= dword ptr -534h
var_530= dword ptr -530h
var_520= dword ptr -520h
var_51C= dword ptr -51Ch
var_518= dword ptr -518h
var_510= dword ptr -510h
var_50C= dword ptr -50Ch
var_322= byte ptr -322h
var_321= byte ptr -321h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_310= byte ptr -310h
var_307= byte ptr -307h
var_306= byte ptr -306h
var_305= byte ptr -305h
var_304= dword ptr -304h
var_2D9= byte ptr -2D9h
var_2D8= byte ptr -2D8h
var_2AD= byte ptr -2ADh
var_2AC= dword ptr -2ACh
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_26D= byte ptr -26Dh
var_26C= dword ptr -26Ch
var_265= byte ptr -265h
var_264= dword ptr -264h
var_239= byte ptr -239h
var_238= dword ptr -238h
var_231= byte ptr -231h
var_230= byte ptr -230h
var_205= byte ptr -205h
var_204= dword ptr -204h
var_1D9= byte ptr -1D9h
var_1D8= dword ptr -1D8h
var_1AD= byte ptr -1ADh
var_1AC= dword ptr -1ACh
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= byte ptr -16Ch
var_158= byte ptr -158h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_13D= byte ptr -13Dh
var_13C= byte ptr -13Ch
var_134= dword ptr -134h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_118= dword ptr -118h
var_114= dword ptr -114h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_F0=	byte ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_C4=	byte ptr -0C4h
var_A0=	byte ptr -0A0h
var_94=	dword ptr -94h
var_80=	byte ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_5C=	byte ptr -5Ch
var_54=	dword ptr -54h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4EC590
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 684h
push	esi
mov	[ebp+var_670], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EC5DB
mov	ecx, [ebp+var_670]
mov	edx, [ecx+4]
push	edx
push	offset aAoebehaviorD ; "AOEBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EC5DB:
lea	ecx, [ebp+var_321]
push	ecx
lea	edx, [ebp+var_322]
push	edx
lea	ecx, [ebp+var_34]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_670]
call	sub_F79E10
lea	ecx, [ebp+var_1AD]
call	sub_401EF0
push	eax
push	offset aOffset_x ; "offset_x"
lea	ecx, [ebp+var_1AC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+698h+var_698]
lea	ecx, [ebp+var_1AC]
push	ecx		; int
lea	edx, [ebp+var_34]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
mov	eax, [ebp+var_670]
fstp	dword ptr [eax+40h]
lea	ecx, [ebp+var_1AC]
call	sub_407E50
lea	ecx, [ebp+var_1AD]
call	nullsub_1
lea	ecx, [ebp+var_1D9]
call	sub_401EF0
push	eax
push	offset aOffset_y ; "offset_y"
lea	ecx, [ebp+var_1D8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+698h+var_698]
lea	ecx, [ebp+var_1D8]
push	ecx		; int
lea	edx, [ebp+var_34]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
mov	eax, [ebp+var_670]
fstp	dword ptr [eax+44h]
lea	ecx, [ebp+var_1D8]
call	sub_407E50
lea	ecx, [ebp+var_1D9]
call	nullsub_1
lea	ecx, [ebp+var_205]
call	sub_401EF0
push	eax
push	offset aOffset_z ; "offset_z"
lea	ecx, [ebp+var_204]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+698h+var_698]
lea	ecx, [ebp+var_204]
push	ecx		; int
lea	edx, [ebp+var_34]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
mov	eax, [ebp+var_670]
fstp	dword ptr [eax+48h]
lea	ecx, [ebp+var_204]
call	sub_407E50
lea	ecx, [ebp+var_205]
call	nullsub_1
lea	ecx, [ebp+var_231]
call	sub_401EF0
push	eax
push	offset aRadius	; "radius"
lea	ecx, [ebp+var_230]
call	sub_407810
lea	ecx, [ebp+var_230]
push	ecx
lea	edx, [ebp+var_34]
push	edx
call	sub_F90A60
add	esp, 8
mov	eax, [ebp+var_670]
fstp	dword ptr [eax+3Ch]
lea	ecx, [ebp+var_230]
call	sub_407E50
lea	ecx, [ebp+var_231]
call	nullsub_1
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Ch]
test	edx, edx
jnz	short loc_4EC78A
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_670]
call	sub_4ED1C0
mov	[ebp+var_238], eax
lea	ecx, [ebp+var_34]
call	sub_4FFBC0
mov	eax, [ebp+var_238]
jmp	loc_4ED058

loc_4EC78A:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	edx, [eax+4]
mov	[ebp+var_18], edx
lea	ecx, [ebp+var_265]
call	sub_401EF0
push	eax
push	offset aUse_target_pos ; "use_target_position"
lea	ecx, [ebp+var_264]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+698h+var_698]
lea	eax, [ebp+var_264]
push	eax		; int
lea	ecx, [ebp+var_34]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EC7E7
mov	[ebp+var_674], 1
jmp	short loc_4EC7F1

loc_4EC7E7:
mov	[ebp+var_674], 0

loc_4EC7F1:
mov	dl, byte ptr [ebp+var_674]
mov	[ebp+var_239], dl
lea	ecx, [ebp+var_264]
call	sub_407E50
lea	ecx, [ebp+var_265]
call	nullsub_1
movzx	eax, [ebp+var_239]
test	eax, eax
jz	short loc_4EC867
mov	ecx, [ebp+arg_0]
mov	[ebp+var_678], ecx
mov	edx, [ebp+var_678]
mov	eax, [ebp+var_678]
mov	ecx, [edx+10h]
or	ecx, [eax+14h]
jnz	short loc_4EC858
mov	[ebp+var_26C], 0
lea	ecx, [ebp+var_34]
call	sub_4FFBC0
mov	eax, [ebp+var_26C]
jmp	loc_4ED058

loc_4EC858:
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_1C], eax
mov	ecx, [edx+14h]
mov	[ebp+var_18], ecx

loc_4EC867:
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_C4]
call	sub_42D660
lea	ecx, [ebp+var_A0]
mov	[ebp+var_50C], ecx
mov	edx, [ebp+var_50C]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_50C]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EC8B9
lea	eax, [ebp+var_C4]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EC8B9:
mov	edx, [ebp+var_670]
fldz
fld	dword ptr [edx+40h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4EC8FC
mov	eax, [ebp+var_670]
fldz
fld	dword ptr [eax+44h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4EC8FC
mov	ecx, [ebp+var_670]
fldz
fld	dword ptr [ecx+48h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	loc_4EC9F8

loc_4EC8FC:
mov	ecx, 138Bh
lea	eax, [ebp+var_114]
call	sub_401100
mov	[ebp+var_114], offset off_1558450
mov	edx, [ebp+var_1C]
mov	[ebp+var_10C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_108], eax
lea	ecx, [ebp+var_104]
call	sub_DE0C00
lea	ecx, [ebp+var_F0]
mov	[ebp+var_510], ecx
mov	edx, [ebp+var_510]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_510]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EC972
lea	eax, [ebp+var_114]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EC972:		; float
push	ecx
fld	[ebp+var_DC]
fstp	[esp+698h+var_698]
push	ecx		; float
fld	[ebp+var_E0]
fstp	[esp+69Ch+var_69C]
push	ecx		; float
fld	[ebp+var_E4]
fstp	[esp+6A0h+var_6A0]
push	ecx		; float
fld	[ebp+var_D8]
fstp	[esp+6A4h+var_6A4]
lea	eax, [ebp+var_D4]
call	sub_116E940
mov	edx, [ebp+var_670]
push	ecx		; float
fld	dword ptr [edx+48h]
fstp	[esp+698h+var_698]
mov	eax, [ebp+var_670]
push	ecx		; int
fld	dword ptr [eax+44h]
fstp	[esp+69Ch+var_69C]
mov	ecx, [ebp+var_670]
push	ecx		; float
fld	dword ptr [ecx+40h]
fstp	[esp+6A0h+var_6A0]
lea	edx, [ebp+var_D4]
push	edx		; int
lea	eax, [ebp+var_94]
push	eax		; int
call	sub_F5B4B0
add	esp, 14h
lea	ecx, [ebp+var_104]
call	sub_4087D0
lea	ecx, [ebp+var_114]
call	sub_401110

loc_4EC9F8:
lea	ecx, [ebp+var_80]
call	sub_4E3690
lea	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_78], edx
mov	eax, [ecx+4]
mov	[ebp+var_74], eax
mov	ecx, [ecx+8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_670]
movss	xmm0, dword ptr	[edx+3Ch]
movss	[ebp+var_6C], xmm0
lea	eax, [ebp+var_80]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
lea	ecx, [ebp+var_34]
push	ecx
lea	edx, [ebp+var_5C]
push	edx
call	sub_F80E80
add	esp, 10h
lea	eax, [ebp+var_26D]
push	eax
push	ecx
mov	[ebp+var_518], esp
lea	ecx, [ebp+var_5C]
mov	eax, [ebp+var_518]
call	sub_4046E0
push	ecx
mov	[ebp+var_520], esp
mov	ecx, [ebp+var_54]
mov	[ebp+var_51C], ecx
mov	ecx, [ebp+var_51C]
mov	eax, [ebp+var_520]
call	sub_4046E0
lea	ecx, [ebp+var_40]
call	sub_50DE40
lea	edx, [ebp+var_94]
mov	eax, [edx]
mov	[ebp+var_538], eax
mov	ecx, [edx+4]
mov	[ebp+var_534], ecx
mov	edx, [edx+8]
mov	[ebp+var_530], edx
mov	eax, [ebp+var_538]
mov	[ebp+var_284], eax
mov	ecx, [ebp+var_534]
mov	[ebp+var_280], ecx
mov	edx, [ebp+var_530]
mov	[ebp+var_27C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_53C], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_284]
mov	[ecx], edx
mov	eax, [ebp+var_280]
mov	[ecx+4], eax
mov	edx, [ebp+var_27C]
mov	[ecx+8], edx
mov	eax, [ebp+var_53C]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
call	sub_50DEF0
add	esp, 14h
lea	ecx, [ebp+var_2AD]
call	sub_401EF0
push	eax
push	offset aMaxTargets ; "max targets"
lea	ecx, [ebp+var_2AC]
call	sub_407810
push	ecx		; float
fld	ds:flt_1479C64
fstp	[esp+698h+var_698]
lea	edx, [ebp+var_2AC]
push	edx		; int
lea	eax, [ebp+var_34]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fnstcw	[ebp+var_67A]
movzx	eax, [ebp+var_67A]
or	eax, 0C00h
mov	[ebp+var_680], eax
fldcw	word ptr [ebp+var_680]
fistp	[ebp+var_688]
fldcw	[ebp+var_67A]
mov	ecx, dword ptr [ebp+var_688]
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_2AC]
call	sub_407E50
lea	ecx, [ebp+var_2AD]
call	nullsub_1
cmp	[ebp+var_10], 0
jnz	short loc_4ECBA6
mov	[ebp+var_10], 64h

loc_4ECBA6:
mov	edx, [ebp+var_3C]
sub	edx, [ebp+var_40]
sar	edx, 3
cmp	[ebp+var_10], edx
jbe	short loc_4ECBC0
mov	eax, [ebp+var_3C]
sub	eax, [ebp+var_40]
sar	eax, 3
mov	[ebp+var_10], eax

loc_4ECBC0:
lea	ecx, [ebp+var_2D9]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_2D8]
call	sub_407810
lea	ecx, [ebp+var_2D8]
push	ecx
lea	edx, [ebp+var_34]
push	edx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_44], eax
lea	ecx, [ebp+var_2D8]
call	sub_407E50
lea	ecx, [ebp+var_2D9]
call	nullsub_1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_50E110
add	esp, 8
mov	edx, [ebp+var_40]
xor	eax, eax
cmp	edx, [ebp+var_3C]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_4ECFF8
lea	ecx, [ebp+var_305]
call	sub_401EF0
push	eax
push	offset aUse_target_as_ ; "use_target_as_caster"
lea	ecx, [ebp+var_304]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+698h+var_698]
lea	edx, [ebp+var_304]
push	edx		; int
lea	eax, [ebp+var_34]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4ECC82
mov	[ebp+var_68C], 1
jmp	short loc_4ECC8C

loc_4ECC82:
mov	[ebp+var_68C], 0

loc_4ECC8C:
mov	cl, byte ptr [ebp+var_68C]
mov	[ebp+var_13D], cl
lea	ecx, [ebp+var_304]
call	sub_407E50
lea	ecx, [ebp+var_305]
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_124], eax
mov	ecx, [edx+4]
mov	[ebp+var_120], ecx
movzx	edx, [ebp+var_13D]
test	edx, edx
jz	short loc_4ECCDE
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax], edx
mov	ecx, [ecx+14h]
mov	[eax+4], ecx

loc_4ECCDE:
movzx	edx, byte_1889845
test	edx, edx
jz	short loc_4ECCFE
mov	eax, [ebp+var_10]
push	eax
push	offset aAoebehaviorTar ; "AOEBehavior Targets: %d"
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4ECCFE:
mov	[ebp+var_118], 0
lea	edx, [ebp+var_306]
push	edx
lea	eax, [ebp+var_307]
push	eax
lea	ecx, [ebp+var_13C]
call	sub_489470
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_180], 0
jmp	short loc_4ECD4A

loc_4ECD3B:
mov	ecx, [ebp+var_180]
add	ecx, 1
mov	[ebp+var_180], ecx

loc_4ECD4A:
mov	edx, [ebp+var_180]
cmp	edx, [ebp+var_10]
jnb	short loc_4ECDA0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_180]
mov	edx, [ebp+var_40]
mov	esi, [edx+ecx*8]
mov	[eax+10h], esi
mov	ecx, [edx+ecx*8+4]
mov	[eax+14h], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [eax+10h]
push	edx
call	sub_50DF90
add	esp, 0Ch
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
lea	ecx, [ebp+var_310]
push	ecx
lea	ecx, [ebp+var_13C]
call	sub_48A160
jmp	short loc_4ECD3B

loc_4ECDA0:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+3Bh]
test	eax, eax
jz	short loc_4ECDBA
mov	[ebp+var_118], 1
jmp	loc_4ECE79

loc_4ECDBA:
mov	ecx, [ebp+var_134]
mov	[ebp+var_540], ecx
mov	ecx, [ebp+var_540]
lea	eax, [ebp+var_184]
call	sub_4046E0

loc_4ECDD7:
lea	ecx, [ebp+var_13C]
lea	eax, [ebp+var_318]
call	sub_4046E0
lea	edx, [ebp+var_548]
mov	[ebp+var_544], edx
mov	ecx, [ebp+var_318]
mov	eax, [ebp+var_544]
call	sub_4046E0
mov	eax, [ebp+var_184]
xor	ecx, ecx
cmp	eax, [ebp+var_548]
setnz	cl
mov	[ebp+var_68D], cl
movzx	edx, [ebp+var_68D]
test	edx, edx
jz	short loc_4ECE79
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_184]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_670]
call	sub_FB0570
add	eax, [ebp+var_118]
mov	[ebp+var_118], eax
mov	edx, [ebp+var_184]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_184], eax
jmp	loc_4ECDD7

loc_4ECE79:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_124]
mov	[eax], ecx
mov	edx, [ebp+var_120]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_550], ecx
mov	edx, [eax+4]
mov	[ebp+var_54C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_17C]
call	sub_401100
mov	[ebp+var_17C], offset off_1558464
mov	eax, [ebp+var_550]
mov	[ebp+var_174], eax
mov	ecx, [ebp+var_54C]
mov	[ebp+var_170], ecx
lea	ecx, [ebp+var_16C]
call	sub_DDC580
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_14C], eax
mov	ecx, [edx+14h]
mov	[ebp+var_148], ecx
lea	edx, [ebp+var_158]
mov	[ebp+var_554], edx
mov	eax, [ebp+var_554]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_554]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4ECF33
lea	ecx, [ebp+var_17C]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4ECF33:
mov	eax, [ebp+var_670]
cmp	dword ptr [eax+8], 0
jz	short loc_4ECF83
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jnz	short loc_4ECF83
push	ecx
fld	ds:flt_1513C00
fstp	[esp+698h+var_698]
push	offset aCast	; "cast"
mov	eax, [ebp+var_670]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_670]
mov	edx, [ecx+8]
push	edx
push	0
push	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
call	sub_F81B80
add	esp, 20h

loc_4ECF83:
mov	eax, [ebp+var_118]
mov	[ebp+var_31C], eax
lea	ecx, [ebp+var_16C]
call	sub_4087D0
lea	ecx, [ebp+var_17C]
call	sub_401110
lea	ecx, [ebp+var_13C]
call	sub_5021C0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_40]
call	sub_4A9770
lea	ecx, [ebp+var_5C]
call	sub_594900
lea	ecx, [ebp+var_80]
call	sub_401110
lea	ecx, [ebp+var_C4]
call	sub_4E5560
lea	ecx, [ebp+var_34]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_31C]
jmp	short loc_4ED058
jmp	short loc_4ED018

loc_4ECFF8:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jnz	short loc_4ED018
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	ecx, [ebp+var_670]
call	sub_4ED070

loc_4ED018:
mov	[ebp+var_320], 0
lea	ecx, [ebp+var_40]
call	sub_4A9770
lea	ecx, [ebp+var_5C]
call	sub_594900
lea	ecx, [ebp+var_80]
call	sub_401110
lea	ecx, [ebp+var_C4]
call	sub_4E5560
lea	ecx, [ebp+var_34]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_320]

loc_4ED058:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4EC590 endp

align 10h


; Attributes: bp-based frame

sub_4ED070 proc	near

var_D0=	dword ptr -0D0h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_9C=	byte ptr -9Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_4C=	dword ptr -4Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_D0], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+arg_0]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DDC580
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_14]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_C4]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4ED0EF
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4ED0EF:
mov	eax, [ebp+var_D0]
cmp	dword ptr [eax+8], 0
jz	loc_4ED1A7
mov	ecx, 138Bh
lea	eax, [ebp+var_C0]
call	sub_401100
mov	[ebp+var_C0], offset off_158190C
mov	ecx, [ebp+arg_0]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_B4], edx
lea	ecx, [ebp+var_B0]
call	sub_E7C1E0
push	offset aMiss	; "miss"
lea	ecx, [ebp+var_74]
call	sub_402400
mov	eax, [ebp+var_D0]
mov	ecx, [eax+8]
mov	[ebp+var_78], ecx
movss	xmm0, ds:flt_1513C00
movss	[ebp+var_4C], xmm0
lea	edx, [ebp+var_9C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_C8]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4ED19C
lea	ecx, [ebp+var_C0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4ED19C:
lea	ecx, [ebp+var_C0]
call	sub_4E54F0

loc_4ED1A7:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	8
sub_4ED070 endp

align 10h


; Attributes: bp-based frame

sub_4ED1C0 proc	near

var_308= dword ptr -308h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2FC= dword ptr -2FCh
var_2F5= byte ptr -2F5h
var_2F4= dword ptr -2F4h
var_2F0= dword ptr -2F0h
var_2EC= dword ptr -2ECh
var_2E8= qword ptr -2E8h
var_2E0= dword ptr -2E0h
var_2DA= word ptr -2DAh
var_2D8= dword ptr -2D8h
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E0= byte ptr -1E0h
var_1D7= byte ptr -1D7h
var_1D6= byte ptr -1D6h
var_1D5= byte ptr -1D5h
var_1D4= dword ptr -1D4h
var_1A9= byte ptr -1A9h
var_1A8= dword ptr -1A8h
var_17E= byte ptr -17Eh
var_17D= byte ptr -17Dh
var_17C= dword ptr -17Ch
var_151= byte ptr -151h
var_150= dword ptr -150h
var_128= dword ptr -128h
var_124= dword ptr -124h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= byte ptr -114h
var_100= byte ptr -100h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_D4=	dword ptr -0D4h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	byte ptr -0C4h
var_B0=	byte ptr -0B0h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_95=	byte ptr -95h
var_94=	byte ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7C=	byte ptr -7Ch
var_58=	byte ptr -58h
var_4C=	dword ptr -4Ch
var_3C=	qword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4ED1C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2ECh
mov	[ebp+var_2D8], ecx
lea	ecx, [ebp+var_151]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_150]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2FCh+var_2FC]
lea	eax, [ebp+var_150]
push	eax		; int
mov	ecx, [ebp+arg_8]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_150]
call	sub_407E50
lea	ecx, [ebp+var_151]
call	nullsub_1
mov	dword ptr [ebp+var_24],	0
mov	edx, [ebp+arg_4]
push	edx		; int
lea	eax, [ebp+var_24]
push	eax		; void *
call	sub_50DDD0
add	esp, 8
lea	ecx, [ebp+var_17D]
call	sub_401EF0
push	eax
push	offset aMaxTargets ; "max targets"
lea	ecx, [ebp+var_17C]
call	sub_407810
push	ecx		; float
fld	ds:flt_1479C64
fstp	[esp+2FCh+var_2FC]
lea	ecx, [ebp+var_17C]
push	ecx		; int
mov	edx, [ebp+arg_8]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fnstcw	[ebp+var_2DA]
movzx	eax, [ebp+var_2DA]
or	eax, 0C00h
mov	[ebp+var_2E0], eax
fldcw	word ptr [ebp+var_2E0]
fistp	[ebp+var_2E8]
fldcw	[ebp+var_2DA]
mov	eax, dword ptr [ebp+var_2E8]
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_17C]
call	sub_407E50
lea	ecx, [ebp+var_17D]
call	nullsub_1
cmp	[ebp+var_20], 0
jnz	short loc_4ED2DD
mov	[ebp+var_20], 64h

loc_4ED2DD:
mov	ecx, dword ptr [ebp+var_24]
cmp	ecx, [ebp+var_20]
jbe	short loc_4ED309
mov	edx, [ebp+var_20]
push	edx
mov	eax, dword ptr [ebp+var_24]
push	eax		; char
push	offset aAoebehaviorUns ; "AOEBehavior unserialize, serialized siz"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 14h
xor	eax, eax
jmp	loc_4ED898

loc_4ED309:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ecx+4]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1A9]
call	sub_401EF0
push	eax
push	offset aUse_target_pos ; "use_target_position"
lea	ecx, [ebp+var_1A8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2FCh+var_2FC]
lea	ecx, [ebp+var_1A8]
push	ecx		; int
mov	edx, [ebp+arg_8]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4ED366
mov	[ebp+var_2EC], 1
jmp	short loc_4ED370

loc_4ED366:
mov	[ebp+var_2EC], 0

loc_4ED370:
mov	al, byte ptr [ebp+var_2EC]
mov	[ebp+var_17E], al
lea	ecx, [ebp+var_1A8]
call	sub_407E50
lea	ecx, [ebp+var_1A9]
call	nullsub_1
movzx	ecx, [ebp+var_17E]
test	ecx, ecx
jz	short loc_4ED3D0
mov	edx, [ebp+arg_0]
mov	[ebp+var_2F0], edx
mov	eax, [ebp+var_2F0]
mov	ecx, [ebp+var_2F0]
mov	edx, [eax+10h]
or	edx, [ecx+14h]
jnz	short loc_4ED3C1
xor	eax, eax
jmp	loc_4ED898

loc_4ED3C1:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_1C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_18], edx

loc_4ED3D0:
mov	[ebp+var_10], 0
cmp	dword ptr [ebp+var_24],	0
jbe	loc_4ED880
lea	ecx, [ebp+var_1D5]
call	sub_401EF0
push	eax
push	offset aUse_target_as_ ; "use_target_as_caster"
lea	ecx, [ebp+var_1D4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2FCh+var_2FC]
lea	eax, [ebp+var_1D4]
push	eax		; int
mov	ecx, [ebp+arg_8]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4ED430
mov	[ebp+var_2F4], 1
jmp	short loc_4ED43A

loc_4ED430:
mov	[ebp+var_2F4], 0

loc_4ED43A:
mov	dl, byte ptr [ebp+var_2F4]
mov	[ebp+var_95], dl
lea	ecx, [ebp+var_1D4]
call	sub_407E50
lea	ecx, [ebp+var_1D5]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	edx, [eax+4]
mov	[ebp+var_30], edx
movzx	eax, [ebp+var_95]
test	eax, eax
jz	short loc_4ED486
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx], eax
mov	edx, [edx+14h]
mov	[ecx+4], edx

loc_4ED486:
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
lea	ecx, [ebp+var_7C]
call	sub_42D660
lea	edx, [ebp+var_58]
mov	[ebp+var_1EC], edx
mov	eax, [ebp+var_1EC]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_1EC]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4ED4D0
lea	ecx, [ebp+var_7C]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4ED4D0:
mov	eax, [ebp+var_2D8]
fldz
fld	dword ptr [eax+40h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4ED513
mov	ecx, [ebp+var_2D8]
fldz
fld	dword ptr [ecx+44h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4ED513
mov	edx, [ebp+var_2D8]
fldz
fld	dword ptr [edx+48h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	loc_4ED60D

loc_4ED513:
mov	ecx, 138Bh
lea	eax, [ebp+var_124]
call	sub_401100
mov	[ebp+var_124], offset off_1558450
mov	eax, [ebp+var_1C]
mov	[ebp+var_11C], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_118], ecx
lea	ecx, [ebp+var_114]
call	sub_DE0C00
lea	edx, [ebp+var_100]
mov	[ebp+var_1F0], edx
mov	eax, [ebp+var_1F0]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_1F0]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4ED58A
lea	ecx, [ebp+var_124]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4ED58A:		; float
push	ecx
fld	[ebp+var_EC]
fstp	[esp+2FCh+var_2FC]
push	ecx		; float
fld	[ebp+var_F0]
fstp	[esp+300h+var_300]
push	ecx		; float
fld	[ebp+var_F4]
fstp	[esp+304h+var_304]
push	ecx		; float
fld	[ebp+var_E8]
fstp	[esp+308h+var_308]
lea	eax, [ebp+var_E4]
call	sub_116E940
mov	eax, [ebp+var_2D8]
push	ecx		; float
fld	dword ptr [eax+48h]
fstp	[esp+2FCh+var_2FC]
mov	ecx, [ebp+var_2D8]
push	ecx		; int
fld	dword ptr [ecx+44h]
fstp	[esp+300h+var_300]
mov	edx, [ebp+var_2D8]
push	ecx		; float
fld	dword ptr [edx+40h]
fstp	[esp+304h+var_304]
lea	eax, [ebp+var_E4]
push	eax		; int
lea	ecx, [ebp+var_4C]
push	ecx		; int
call	sub_F5B4B0
add	esp, 14h
lea	ecx, [ebp+var_114]
call	sub_4087D0
lea	ecx, [ebp+var_124]
call	sub_401110

loc_4ED60D:
lea	edx, [ebp+var_1D6]
push	edx
lea	ecx, [ebp+var_94]
call	sub_489C40
mov	[ebp+var_84], 0
mov	al, [ebp+var_1D7]
mov	[ebp+var_80], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	dword ptr [ebp+var_3C],	0
mov	dword ptr [ebp+var_3C+4], 0
mov	[ebp+var_128], 0
jmp	short loc_4ED669

loc_4ED65A:
mov	ecx, [ebp+var_128]
add	ecx, 1
mov	[ebp+var_128], ecx

loc_4ED669:
mov	edx, [ebp+var_128]
cmp	edx, dword ptr [ebp+var_24]
jnb	short loc_4ED6A4
mov	eax, [ebp+arg_4]
push	eax		; int
lea	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_50E000
add	esp, 8
mov	edx, dword ptr [ebp+var_3C]
or	edx, dword ptr [ebp+var_3C+4]
jz	short loc_4ED6A2
lea	eax, [ebp+var_3C]
push	eax
lea	ecx, [ebp+var_1E0]
push	ecx
lea	ecx, [ebp+var_94]
call	sub_48A160

loc_4ED6A2:
jmp	short loc_4ED65A

loc_4ED6A4:
mov	edx, [ebp+var_8C]
mov	[ebp+var_1F4], edx
mov	ecx, [ebp+var_1F4]
lea	eax, [ebp+var_2C]
call	sub_4046E0

loc_4ED6BE:
lea	ecx, [ebp+var_94]
lea	eax, [ebp+var_1E8]
call	sub_4046E0
lea	eax, [ebp+var_1FC]
mov	[ebp+var_1F8], eax
mov	ecx, [ebp+var_1E8]
mov	eax, [ebp+var_1F8]
call	sub_4046E0
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_1FC]
setnz	dl
mov	[ebp+var_2F5], dl
movzx	eax, [ebp+var_2F5]
test	eax, eax
jz	short loc_4ED74E
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_2C]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	edx, [edx+14h]
mov	[ecx+14h], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_2D8]
call	sub_FB0570
add	eax, [ebp+var_10]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_2C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_2C], eax
jmp	loc_4ED6BE

loc_4ED74E:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_204], edx
mov	eax, [ecx+4]
mov	[ebp+var_200], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_D4]
call	sub_401100
mov	[ebp+var_D4], offset off_1558464
mov	ecx, [ebp+var_204]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_200]
mov	[ebp+var_C8], edx
lea	ecx, [ebp+var_C4]
call	sub_DDC580
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_A4], ecx
mov	edx, [eax+14h]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_B0]
mov	[ebp+var_208], eax
mov	ecx, [ebp+var_208]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_208]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4ED802
lea	edx, [ebp+var_D4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4ED802:
mov	ecx, [ebp+var_2D8]
cmp	dword ptr [ecx+8], 0
jz	short loc_4ED847
push	ecx
fld	ds:flt_1513C00
fstp	[esp+2FCh+var_2FC]
push	offset aCast	; "cast"
mov	edx, [ebp+var_2D8]
add	edx, 0Ch
push	edx
mov	eax, [ebp+var_2D8]
mov	ecx, [eax+8]
push	ecx
push	0
push	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
call	sub_F81B80
add	esp, 20h

loc_4ED847:
lea	ecx, [ebp+var_C4]
call	sub_4087D0
lea	ecx, [ebp+var_D4]
call	sub_401110
lea	ecx, [ebp+var_94]
call	sub_5021C0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_7C]
call	sub_4E5560
jmp	short loc_4ED895

loc_4ED880:
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	ecx, [ebp+var_2D8]
call	sub_4ED070

loc_4ED895:
mov	eax, [ebp+var_10]

loc_4ED898:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4ED1C0 endp

align 10h


; Attributes: bp-based frame

sub_4ED8B0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	byte ptr -0BCh
var_94=	byte ptr -94h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_38=	byte ptr -38h
var_29=	byte ptr -29h
var_28=	byte ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_D0], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4ED8E5
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
push	edx
push	offset aPlayeffectbeha ; "PlayEffectBehavior-->	%d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4ED8E5:
mov	ecx, [ebp+var_D0]
cmp	dword ptr [ecx+8], 0
jz	loc_4EDB0B
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+3Bh]
test	eax, eax
jnz	loc_4EDB0B
lea	ecx, [ebp+var_69]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_28]
call	sub_402390
lea	ecx, [ebp+var_69]
call	nullsub_1
mov	ecx, [ebp+var_D0]
add	ecx, 0Ch
call	sub_402CA0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4ED963
push	offset aCast	; "cast"
mov	ecx, [ebp+var_D0]
add	ecx, 0Ch
lea	edx, [ebp+var_94]
push	edx
call	sub_403DC0
add	esp, 8
push	eax
lea	ecx, [ebp+var_28]
call	sub_4023E0
lea	ecx, [ebp+var_94]
call	sub_407E50

loc_4ED963:
push	ecx
fld	ds:flt_1513C00
fstp	[esp+0E0h+var_E0]
push	offset aCast	; "cast"
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+8]
push	edx
push	0
push	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
call	sub_F81B80
add	esp, 20h
mov	eax, [ebp+arg_0]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D4]
mov	eax, [ecx+10h]
or	eax, [edx+14h]
jz	loc_4EDAE7
mov	[ebp+var_29], 1
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	[ebp+var_D8], ecx
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_DC]
mov	edx, [eax+10h]
cmp	edx, [ecx]
jnz	short loc_4ED9F4
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_DC]
mov	edx, [eax+14h]
cmp	edx, [ecx+4]
jz	short loc_4EDA65

loc_4ED9F4:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_CC], ecx
mov	edx, [eax+14h]
mov	[ebp+var_C8], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_68]
call	sub_401100
mov	[ebp+var_68], offset off_1558464
mov	eax, [ebp+var_CC]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_5C], ecx
lea	ecx, [ebp+var_58]
call	sub_D93A10
lea	edx, [ebp+var_68]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	eax, [ebp+var_38]
test	eax, eax
jz	short loc_4EDA55
mov	[ebp+var_29], 0

loc_4EDA55:
lea	ecx, [ebp+var_58]
call	sub_4087D0
lea	ecx, [ebp+var_68]
call	sub_401110

loc_4EDA65:
mov	ecx, [ebp+var_D0]
add	ecx, 0Ch
call	sub_402CA0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4EDAAB
push	offset aOnhit	; "onhit"
mov	ecx, [ebp+var_D0]
add	ecx, 0Ch
lea	edx, [ebp+var_BC]
push	edx
call	sub_403DC0
add	esp, 8
push	eax
lea	ecx, [ebp+var_28]
call	sub_4023E0
lea	ecx, [ebp+var_BC]
call	sub_407E50

loc_4EDAAB:
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4EDAE7
push	ecx
fld	ds:flt_1513C04
fstp	[esp+0E0h+var_E0]
push	offset aOnhit	; "onhit"
lea	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+var_D0]
mov	eax, [edx+8]
push	eax
push	0
push	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
call	sub_F81B80
add	esp, 20h

loc_4EDAE7:
mov	ecx, [ebp+var_D0]
mov	byte ptr [ecx+34h], 1
mov	[ebp+var_C0], 1
lea	ecx, [ebp+var_28]
call	sub_407E50
mov	eax, [ebp+var_C0]
jmp	short loc_4EDB0D

loc_4EDB0B:
xor	eax, eax

loc_4EDB0D:
mov	esp, ebp
pop	ebp
retn	8
sub_4ED8B0 endp

align 10h


; Attributes: bp-based frame

sub_4EDB20 proc	near

var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_168= byte ptr -168h
var_150= byte ptr -150h
var_128= byte ptr -128h
var_110= byte ptr -110h
var_E5=	byte ptr -0E5h
var_E4=	dword ptr -0E4h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_C0=	byte ptr -0C0h
var_B4=	byte ptr -0B4h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_70=	byte ptr -70h
var_64=	byte ptr -64h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4EDB20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 188h
mov	[ebp+var_190], ecx
mov	eax, [ebp+var_190]
movzx	ecx, byte ptr [eax+34h]
test	ecx, ecx
jnz	short loc_4EDB57
jmp	loc_4EDF31

loc_4EDB57:
movzx	edx, byte_1889845
test	edx, edx
jz	short loc_4EDB7D
mov	eax, [ebp+var_190]
mov	ecx, [eax+4]
push	ecx
push	offset aPlayeffectbe_0 ; "PlayEffectBehavior Uncast -->	%d"
mov	edx, [ebp+arg_0]
push	edx
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EDB7D:
mov	ecx, [ebp+var_190]
add	ecx, 0Ch
call	sub_402CA0
movzx	eax, al
test	eax, eax
jz	short loc_4EDBC7
movzx	ecx, byte_1889845
test	ecx, ecx
jz	short loc_4EDBC2
mov	edx, [ebp+var_190]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_190]
mov	edx, [ecx+8]
push	edx
push	offset aEffectidIForBe ; "effectID %i for behaviorID %i	has no ef"...
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_4EDBC2:
jmp	loc_4EDF31

loc_4EDBC7:
lea	ecx, [ebp+var_E5]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_34]
call	sub_402390
lea	ecx, [ebp+var_E5]
call	nullsub_1
mov	ecx, [ebp+var_190]
add	ecx, 0Ch
call	sub_402CA0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4EDC2C
push	offset aCast	; "cast"
mov	ecx, [ebp+var_190]
add	ecx, 0Ch
lea	edx, [ebp+var_110]
push	edx
call	sub_403DC0
add	esp, 8
push	eax
lea	ecx, [ebp+var_34]
call	sub_4023E0
lea	ecx, [ebp+var_110]
call	sub_407E50

loc_4EDC2C:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_174], ecx
mov	edx, [eax+4]
mov	[ebp+var_170], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_E4]
call	sub_401100
mov	[ebp+var_E4], offset off_1581910
mov	eax, [ebp+var_174]
mov	[ebp+var_DC], eax
mov	ecx, [ebp+var_170]
mov	[ebp+var_D8], ecx
lea	ecx, [ebp+var_D4]
call	sub_E7C090
lea	edx, [ebp+var_34]
push	edx
lea	eax, [ebp+var_128]
push	eax
call	sub_10F4BF0
add	esp, 8
push	eax
lea	ecx, [ebp+var_B4]
call	sub_4022F0
lea	ecx, [ebp+var_128]
call	sub_407910
lea	ecx, [ebp+var_C0]
mov	[ebp+var_178], ecx
mov	edx, [ebp+var_178]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_178]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EDCE6
lea	eax, [ebp+var_E4]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EDCE6:
mov	edx, [ebp+arg_0]
mov	[ebp+var_194], edx
mov	eax, [ebp+var_194]
mov	ecx, [ebp+var_194]
mov	edx, [eax+10h]
or	edx, [ecx+14h]
jnz	short loc_4EDD26
lea	ecx, [ebp+var_D4]
call	sub_4E5A30
lea	ecx, [ebp+var_E4]
call	sub_401110
lea	ecx, [ebp+var_34]
call	sub_407E50
jmp	loc_4EDF31

loc_4EDD26:
mov	ecx, 1397h
lea	eax, [ebp+var_44]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_44], offset off_155E05C
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_3C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_38], edx
lea	eax, [ebp+var_44]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4EDDB7
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_401110
lea	ecx, [ebp+var_D4]
call	sub_4E5A30
lea	ecx, [ebp+var_E4]
call	sub_401110
lea	ecx, [ebp+var_34]
call	sub_407E50
jmp	loc_4EDF31

loc_4EDDB7:
mov	ecx, [ebp+var_190]
add	ecx, 0Ch
call	sub_402CA0
movzx	edx, al
test	edx, edx
jnz	short loc_4EDDFD
push	offset aOnhit	; "onhit"
mov	ecx, [ebp+var_190]
add	ecx, 0Ch
lea	eax, [ebp+var_150]
push	eax
call	sub_403DC0
add	esp, 8
push	eax
lea	ecx, [ebp+var_34]
call	sub_4023E0
lea	ecx, [ebp+var_150]
call	sub_407E50

loc_4EDDFD:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_180], edx
mov	eax, [ecx+14h]
mov	[ebp+var_17C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_94]
call	sub_401100
mov	[ebp+var_94], offset off_1581910
mov	ecx, [ebp+var_180]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_17C]
mov	[ebp+var_88], edx
lea	ecx, [ebp+var_84]
call	sub_E7C090
lea	eax, [ebp+var_34]
push	eax
lea	ecx, [ebp+var_168]
push	ecx
call	sub_10F4BF0
add	esp, 8
push	eax
lea	ecx, [ebp+var_64]
call	sub_4022F0
lea	ecx, [ebp+var_168]
call	sub_407910
lea	edx, [ebp+var_70]
mov	[ebp+var_184], edx
mov	eax, [ebp+var_184]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_184]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EDEB3
lea	ecx, [ebp+var_94]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EDEB3:
lea	eax, [ebp+var_84]
mov	[ebp+var_188], eax
mov	ecx, [ebp+var_188]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_188]
call	sub_4087D0
lea	ecx, [ebp+var_94]
call	sub_401110
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_401110
lea	ecx, [ebp+var_D4]
mov	[ebp+var_18C], ecx
mov	ecx, [ebp+var_18C]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_18C]
call	sub_4087D0
lea	ecx, [ebp+var_E4]
call	sub_401110
lea	ecx, [ebp+var_34]
call	sub_407E50

loc_4EDF31:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4EDB20 endp

align 10h


; Attributes: bp-based frame

sub_4EDF50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0Dh
mov	esp, ebp
pop	ebp
retn
sub_4EDF50 endp



; Attributes: bp-based frame

sub_4EDF60 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_106= byte ptr -106h
var_105= byte ptr -105h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_F9=	byte ptr -0F9h
var_F8=	byte ptr -0F8h
var_D0=	dword ptr -0D0h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_AC=	byte ptr -0ACh
var_A0=	dword ptr -0A0h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_6C=	byte ptr -6Ch
var_5B=	byte ptr -5Bh
var_5A=	byte ptr -5Ah
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_18=	byte ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 130h
mov	[ebp+var_130], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EDF95
mov	ecx, [ebp+var_130]
mov	edx, [ecx+4]
push	edx
push	offset aImaginationbeh ; "ImaginationBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EDF95:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4EDFAA
mov	eax, 1
jmp	loc_4EE2F2

loc_4EDFAA:
lea	eax, [ebp+var_105]
push	eax
lea	ecx, [ebp+var_106]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_130]
call	sub_F79E10
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_110], ecx
mov	edx, [eax+14h]
mov	[ebp+var_10C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558464
mov	eax, [ebp+var_110]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_10C]
mov	[ebp+var_44], ecx
lea	ecx, [ebp+var_40]
call	sub_DDD7B0
lea	edx, [ebp+var_2C]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_114]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_114]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EE051
lea	ecx, [ebp+var_50]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EE051:
movzx	eax, [ebp+var_20]
test	eax, eax
jnz	loc_4EE2C5
lea	ecx, [ebp+var_F9]
call	sub_401EF0
push	eax
push	offset aImagination ; "imagination"
lea	ecx, [ebp+var_F8]
call	sub_407810
lea	ecx, [ebp+var_F8]
push	ecx
lea	edx, [ebp+var_18]
push	edx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_94], eax
lea	ecx, [ebp+var_F8]
call	sub_407E50
lea	ecx, [ebp+var_F9]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_11C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_118], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_90]
call	sub_401100
mov	[ebp+var_90], offset off_1558450
mov	eax, [ebp+var_11C]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_118]
mov	[ebp+var_84], ecx
lea	ecx, [ebp+var_80]
call	sub_D8EEB0
lea	edx, [ebp+var_6C]
mov	[ebp+var_120], edx
mov	eax, [ebp+var_120]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_120]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EE139
lea	ecx, [ebp+var_90]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EE139:
movzx	eax, [ebp+var_5B]
test	eax, eax
jnz	short loc_4EE14A
cmp	[ebp+var_94], 0
jg	short loc_4EE163

loc_4EE14A:
movzx	ecx, [ebp+var_5A]
test	ecx, ecx
jnz	loc_4EE2B2
cmp	[ebp+var_94], 0
jge	loc_4EE2B2

loc_4EE163:
mov	edx, [ebp+var_130]
cmp	dword ptr [edx+8], 0
jz	short loc_4EE1AF
push	ecx
fld	ds:flt_1513C04
fstp	[esp+134h+var_134]
push	offset aOnhit	; "onhit"
mov	eax, [ebp+var_130]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_130]
mov	edx, [ecx+8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [eax+10h]
push	edx
call	sub_F81B80
add	esp, 20h

loc_4EE1AF:
cmp	[ebp+var_94], 0
jz	loc_4EE270
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_128], ecx
mov	edx, [eax+14h]
mov	[ebp+var_124], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_D0]
call	sub_401100
mov	[ebp+var_D0], offset off_1558464
mov	eax, [ebp+var_128]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_124]
mov	[ebp+var_C4], ecx
lea	ecx, [ebp+var_C0]
call	sub_DD6B80
mov	edx, [ebp+var_94]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_AC]
mov	[ebp+var_12C], eax
mov	ecx, [ebp+var_12C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_12C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4EE25A
lea	edx, [ebp+var_D0]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EE25A:
lea	ecx, [ebp+var_C0]
call	sub_4087D0
lea	ecx, [ebp+var_D0]
call	sub_401110

loc_4EE270:
mov	[ebp+var_100], 1
lea	ecx, [ebp+var_80]
call	sub_4087D0
lea	ecx, [ebp+var_90]
call	sub_401110
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_100]
jmp	short loc_4EE2F2

loc_4EE2B2:
lea	ecx, [ebp+var_80]
call	sub_4087D0
lea	ecx, [ebp+var_90]
call	sub_401110

loc_4EE2C5:
mov	[ebp+var_104], 0
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_104]

loc_4EE2F2:
mov	esp, ebp
pop	ebp
retn	8
sub_4EDF60 endp

align 10h


; Attributes: bp-based frame

sub_4EE300 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_7C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_78], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	eax, [ebp+var_7C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_78]
mov	[ebp+var_64], ecx
lea	ecx, [ebp+var_60]
call	sub_DD6D70
lea	edx, [ebp+var_4C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_80]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EE377
lea	ecx, [ebp+var_70]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EE377:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_88], ecx
mov	edx, [eax+14h]
mov	[ebp+var_84], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_88]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DD6C00
lea	edx, [ebp+var_14]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_8C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EE3F4
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EE3F4:
mov	eax, [ebp+var_40]
xor	ecx, ecx
cmp	eax, [ebp+var_8]
setl	cl
mov	[ebp+var_71], cl
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
mov	al, [ebp+var_71]
mov	esp, ebp
pop	ebp
retn	4
sub_4EE300 endp

align 10h


; Attributes: bp-based frame

sub_4EE430 proc	near

var_2D0= dword ptr -2D0h
var_2CC= dword ptr -2CCh
var_2C8= dword ptr -2C8h
var_2C4= dword ptr -2C4h
var_2C0= dword ptr -2C0h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_286= byte ptr -286h
var_285= byte ptr -285h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_271= byte ptr -271h
var_270= dword ptr -270h
var_245= byte ptr -245h
var_244= dword ptr -244h
var_219= byte ptr -219h
var_218= dword ptr -218h
var_1ED= byte ptr -1EDh
var_1EC= dword ptr -1ECh
var_1C1= byte ptr -1C1h
var_1C0= dword ptr -1C0h
var_195= byte ptr -195h
var_194= dword ptr -194h
var_169= byte ptr -169h
var_168= dword ptr -168h
var_13D= byte ptr -13Dh
var_13C= dword ptr -13Ch
var_111= byte ptr -111h
var_110= dword ptr -110h
var_E8=	dword ptr -0E8h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_C4=	byte ptr -0C4h
var_B8=	dword ptr -0B8h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	byte ptr -0A0h
var_8C=	byte ptr -8Ch
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_37=	byte ptr -37h
var_36=	byte ptr -36h
var_34=	byte ptr -34h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2CCh
mov	[ebp+var_298], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EE465
mov	ecx, [ebp+var_298]
mov	edx, [ecx+4]
push	edx
push	offset aStunbehaviorD ;	"StunBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EE465:
lea	ecx, [ebp+var_285]
push	ecx
lea	edx, [ebp+var_286]
push	edx
lea	ecx, [ebp+var_20]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_298]
call	sub_F79E10
lea	ecx, [ebp+var_111]
call	sub_401EF0
push	eax
push	offset aStun_caster ; "stun_caster"
lea	ecx, [ebp+var_110]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2D0h+var_2D0]
lea	ecx, [ebp+var_110]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE4DE
mov	[ebp+var_29C], 1
jmp	short loc_4EE4E8

loc_4EE4DE:
mov	[ebp+var_29C], 0

loc_4EE4E8:
mov	eax, [ebp+var_298]
mov	cl, byte ptr [ebp+var_29C]
mov	[eax+35h], cl
lea	ecx, [ebp+var_110]
call	sub_407E50
lea	ecx, [ebp+var_111]
call	nullsub_1
lea	ecx, [ebp+var_13D]
call	sub_401EF0
push	eax
push	offset aCant_move ; "cant_move"
lea	ecx, [ebp+var_13C]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+2D0h+var_2D0]
lea	edx, [ebp+var_13C]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE55C
mov	[ebp+var_2A0], 1
jmp	short loc_4EE566

loc_4EE55C:
mov	[ebp+var_2A0], 0

loc_4EE566:
mov	ecx, [ebp+var_298]
mov	dl, byte ptr [ebp+var_2A0]
mov	[ecx+36h], dl
lea	ecx, [ebp+var_13C]
call	sub_407E50
lea	ecx, [ebp+var_13D]
call	nullsub_1
lea	ecx, [ebp+var_169]
call	sub_401EF0
push	eax
push	offset aCant_jump ; "cant_jump"
lea	ecx, [ebp+var_168]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+2D0h+var_2D0]
lea	eax, [ebp+var_168]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE5DA
mov	[ebp+var_2A4], 1
jmp	short loc_4EE5E4

loc_4EE5DA:
mov	[ebp+var_2A4], 0

loc_4EE5E4:
mov	edx, [ebp+var_298]
mov	al, byte ptr [ebp+var_2A4]
mov	[edx+37h], al
lea	ecx, [ebp+var_168]
call	sub_407E50
lea	ecx, [ebp+var_169]
call	nullsub_1
lea	ecx, [ebp+var_195]
call	sub_401EF0
push	eax
push	offset aCant_turn ; "cant_turn"
lea	ecx, [ebp+var_194]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+2D0h+var_2D0]
lea	ecx, [ebp+var_194]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE658
mov	[ebp+var_2A8], 1
jmp	short loc_4EE662

loc_4EE658:
mov	[ebp+var_2A8], 0

loc_4EE662:
mov	eax, [ebp+var_298]
mov	cl, byte ptr [ebp+var_2A8]
mov	[eax+38h], cl
lea	ecx, [ebp+var_194]
call	sub_407E50
lea	ecx, [ebp+var_195]
call	nullsub_1
lea	ecx, [ebp+var_1C1]
call	sub_401EF0
push	eax
push	offset aCant_attack ; "cant_attack"
lea	ecx, [ebp+var_1C0]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+2D0h+var_2D0]
lea	edx, [ebp+var_1C0]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE6D6
mov	[ebp+var_2AC], 1
jmp	short loc_4EE6E0

loc_4EE6D6:
mov	[ebp+var_2AC], 0

loc_4EE6E0:
mov	ecx, [ebp+var_298]
mov	dl, byte ptr [ebp+var_2AC]
mov	[ecx+39h], dl
lea	ecx, [ebp+var_1C0]
call	sub_407E50
lea	ecx, [ebp+var_1C1]
call	nullsub_1
lea	ecx, [ebp+var_1ED]
call	sub_401EF0
push	eax
push	offset aCant_use_item ;	"cant_use_item"
lea	ecx, [ebp+var_1EC]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+2D0h+var_2D0]
lea	eax, [ebp+var_1EC]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE754
mov	[ebp+var_2B0], 1
jmp	short loc_4EE75E

loc_4EE754:
mov	[ebp+var_2B0], 0

loc_4EE75E:
mov	edx, [ebp+var_298]
mov	al, byte ptr [ebp+var_2B0]
mov	[edx+3Ah], al
lea	ecx, [ebp+var_1EC]
call	sub_407E50
lea	ecx, [ebp+var_1ED]
call	nullsub_1
lea	ecx, [ebp+var_219]
call	sub_401EF0
push	eax
push	offset aCant_equip ; "cant_equip"
lea	ecx, [ebp+var_218]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+2D0h+var_2D0]
lea	ecx, [ebp+var_218]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE7D2
mov	[ebp+var_2B4], 1
jmp	short loc_4EE7DC

loc_4EE7D2:
mov	[ebp+var_2B4], 0

loc_4EE7DC:
mov	eax, [ebp+var_298]
mov	cl, byte ptr [ebp+var_2B4]
mov	[eax+3Bh], cl
lea	ecx, [ebp+var_218]
call	sub_407E50
lea	ecx, [ebp+var_219]
call	nullsub_1
lea	ecx, [ebp+var_245]
call	sub_401EF0
push	eax
push	offset aCant_interact ;	"cant_interact"
lea	ecx, [ebp+var_244]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+2D0h+var_2D0]
lea	edx, [ebp+var_244]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE850
mov	[ebp+var_2B8], 1
jmp	short loc_4EE85A

loc_4EE850:
mov	[ebp+var_2B8], 0

loc_4EE85A:
mov	ecx, [ebp+var_298]
mov	dl, byte ptr [ebp+var_2B8]
mov	[ecx+3Ch], dl
lea	ecx, [ebp+var_244]
call	sub_407E50
lea	ecx, [ebp+var_245]
call	nullsub_1
lea	ecx, [ebp+var_271]
call	sub_401EF0
push	eax
push	offset aIgnore_immunit ; "ignore_immunity"
lea	ecx, [ebp+var_270]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2D0h+var_2D0]
lea	eax, [ebp+var_270]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EE8CE
mov	[ebp+var_2BC], 1
jmp	short loc_4EE8D8

loc_4EE8CE:
mov	[ebp+var_2BC], 0

loc_4EE8D8:
mov	edx, [ebp+var_298]
mov	al, byte ptr [ebp+var_2BC]
mov	[edx+3Dh], al
lea	ecx, [ebp+var_270]
call	sub_407E50
lea	ecx, [ebp+var_271]
call	nullsub_1
mov	ecx, [ebp+var_298]
mov	byte ptr [ecx+34h], 0
mov	ecx, [ebp+var_298]
call	sub_4EF0F0
mov	edx, [ebp+var_298]
movzx	eax, byte ptr [edx+35h]
test	eax, eax
jz	short loc_4EE936
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C4], edx
mov	eax, [ecx+4]
mov	[ebp+var_2C0], eax
jmp	short loc_4EE94B

loc_4EE936:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_2C4], edx
mov	eax, [ecx+14h]
mov	[ebp+var_2C0], eax

loc_4EE94B:
mov	ecx, [ebp+var_2C4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C0]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C8], eax
mov	ecx, [ebp+var_2C8]
mov	edx, [ebp+var_8]
cmp	edx, [ecx]
jnz	short loc_4EE985
mov	eax, [ebp+var_2C8]
mov	ecx, [ebp+var_4]
cmp	ecx, [eax+4]
jz	loc_4EEB6B

loc_4EE985:
mov	[ebp+var_71], 0
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+3Ch]
test	eax, eax
jz	loc_4EEA6A
mov	ecx, 138Bh
lea	eax, [ebp+var_B0]
call	sub_401100
mov	[ebp+var_B0], offset off_1558464
mov	ecx, [ebp+var_8]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_A4], edx
lea	ecx, [ebp+var_A0]
call	sub_D96030
mov	[ebp+var_80], 4
lea	eax, [ebp+var_8C]
mov	[ebp+var_28C], eax
mov	ecx, [ebp+var_28C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_28C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4EEA16
lea	edx, [ebp+var_B0]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EEA16:
mov	cl, [ebp+var_7C]
mov	[ebp+var_71], cl
movzx	edx, [ebp+var_71]
test	edx, edx
jz	short loc_4EEA3C
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B750
add	esp, 4
mov	[ebp+var_2CC], 0
jmp	short loc_4EEA52

loc_4EEA3C:
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B7A0
add	esp, 4
mov	[ebp+var_2CC], 0

loc_4EEA52:
lea	ecx, [ebp+var_A0]
call	sub_4087D0
lea	ecx, [ebp+var_B0]
call	sub_401110
jmp	short loc_4EEA79

loc_4EEA6A:
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B700
add	esp, 4
mov	[ebp+var_71], al

loc_4EEA79:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Bh]
test	ecx, ecx
jz	short loc_4EEAA6
mov	[ebp+var_278], 1
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_278]
jmp	loc_4EEDB5

loc_4EEAA6:
movzx	edx, [ebp+var_71]
test	edx, edx
jz	loc_4EEB6B
mov	ecx, 138Bh
lea	eax, [ebp+var_E8]
call	sub_401100
mov	[ebp+var_E8], offset off_1558464
mov	eax, [ebp+var_8]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_DC], ecx
lea	ecx, [ebp+var_D8]
call	sub_D95F90
mov	[ebp+var_B8], 4
lea	edx, [ebp+var_C4]
mov	[ebp+var_290], edx
mov	eax, [ebp+var_290]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_290]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EEB33
lea	ecx, [ebp+var_E8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EEB33:
mov	[ebp+var_27C], 0
lea	ecx, [ebp+var_D8]
call	sub_4087D0
lea	ecx, [ebp+var_E8]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_27C]
jmp	loc_4EEDB5

loc_4EEB6B:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Bh]
test	ecx, ecx
jz	short loc_4EEB98
mov	[ebp+var_280], 1
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_280]
jmp	loc_4EEDB5

loc_4EEB98:
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558468
mov	edx, [ebp+var_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_64], eax
lea	ecx, [ebp+var_60]
call	sub_DD5680
mov	[ebp+var_40], 0
mov	ecx, [ebp+var_298]
mov	dl, [ecx+36h]
mov	[ebp+var_3C], dl
mov	eax, [ebp+var_298]
mov	cl, [eax+37h]
mov	[ebp+var_3B], cl
mov	edx, [ebp+var_298]
mov	al, [edx+38h]
mov	[ebp+var_3A], al
mov	ecx, [ebp+var_298]
mov	dl, [ecx+39h]
mov	[ebp+var_39], dl
mov	eax, [ebp+var_298]
mov	cl, [eax+3Ah]
mov	[ebp+var_38], cl
mov	edx, [ebp+var_298]
mov	al, [edx+3Bh]
mov	[ebp+var_37], al
mov	ecx, [ebp+var_298]
mov	dl, [ecx+3Ch]
mov	[ebp+var_36], dl
mov	eax, [ebp+var_298]
mov	cl, [eax+35h]
mov	[ebp+var_2D], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_298]
mov	al, [edx+3Dh]
mov	[ebp+var_2D], al
lea	ecx, [ebp+var_4C]
mov	[ebp+var_294], ecx
mov	edx, [ebp+var_294]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_294]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EEC7B
lea	eax, [ebp+var_70]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EEC7B:
mov	edx, [ebp+var_298]
mov	al, [ebp+var_34]
mov	[edx+3Eh], al
mov	ecx, [ebp+var_298]
mov	dl, [ebp+var_33]
mov	[ecx+3Fh], dl
mov	eax, [ebp+var_298]
mov	cl, [ebp+var_32]
mov	[eax+40h], cl
mov	edx, [ebp+var_298]
mov	al, [ebp+var_31]
mov	[edx+41h], al
mov	ecx, [ebp+var_298]
mov	dl, [ebp+var_30]
mov	[ecx+42h], dl
mov	eax, [ebp+var_298]
mov	cl, [ebp+var_2F]
mov	[eax+43h], cl
mov	edx, [ebp+var_298]
mov	al, [ebp+var_2E]
mov	[edx+44h], al
mov	ecx, [ebp+var_298]
cmp	dword ptr [ecx+8], 0
jz	loc_4EED88
mov	edx, [ebp+var_298]
movzx	eax, byte ptr [edx+3Eh]
test	eax, eax
jnz	short loc_4EED41
mov	ecx, [ebp+var_298]
movzx	edx, byte ptr [ecx+3Fh]
test	edx, edx
jnz	short loc_4EED41
mov	eax, [ebp+var_298]
movzx	ecx, byte ptr [eax+40h]
test	ecx, ecx
jnz	short loc_4EED41
mov	edx, [ebp+var_298]
movzx	eax, byte ptr [edx+41h]
test	eax, eax
jnz	short loc_4EED41
mov	ecx, [ebp+var_298]
movzx	edx, byte ptr [ecx+42h]
test	edx, edx
jnz	short loc_4EED41
mov	eax, [ebp+var_298]
movzx	ecx, byte ptr [eax+43h]
test	ecx, ecx
jnz	short loc_4EED41
mov	edx, [ebp+var_298]
movzx	eax, byte ptr [edx+44h]
test	eax, eax
jz	short loc_4EED88

loc_4EED41:
push	ecx
fld	ds:flt_1513C04
fstp	[esp+2D0h+var_2D0]
push	offset aOnhit	; "onhit"
mov	ecx, [ebp+var_298]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_298]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
call	sub_F81B80
add	esp, 20h
mov	eax, [ebp+var_298]
mov	byte ptr [eax+34h], 1

loc_4EED88:
mov	[ebp+var_284], 1
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_284]

loc_4EEDB5:
mov	esp, ebp
pop	ebp
retn	8
sub_4EE430 endp

align 10h


; Attributes: bp-based frame

sub_4EEDC0 proc	near

var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	byte ptr -0DCh
var_C4=	dword ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	byte ptr -0B4h
var_A0=	byte ptr -0A0h
var_94=	byte ptr -94h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_50=	byte ptr -50h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3F=	byte ptr -3Fh
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_31=	byte ptr -31h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4EEDC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E8h
mov	[ebp+var_EC], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EEE0A
mov	ecx, [ebp+var_EC]
mov	edx, [ecx+4]
push	edx
push	offset aStununcastD ; "StunUncast--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EEE0A:
mov	ecx, [ebp+var_EC]
movzx	edx, byte ptr [ecx+35h]
test	edx, edx
jz	short loc_4EEE2E
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_F4], ecx
mov	edx, [eax+4]
mov	[ebp+var_F0], edx
jmp	short loc_4EEE43

loc_4EEE2E:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_F4], ecx
mov	edx, [eax+14h]
mov	[ebp+var_F0], edx

loc_4EEE43:
mov	eax, [ebp+var_F4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_F0]
mov	[ebp+var_10], ecx
mov	ecx, 1397h
lea	eax, [ebp+var_24]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_24], offset off_155E05C
mov	[ebp+var_1C], 0
mov	[ebp+var_18], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_14]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_24]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	edx, al
test	edx, edx
jz	loc_4EF0BD
mov	ecx, 138Bh
lea	eax, [ebp+var_74]
call	sub_401100
mov	[ebp+var_74], offset off_1558468
mov	eax, [ebp+var_14]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_68], ecx
lea	ecx, [ebp+var_64]
call	sub_DD5680
mov	[ebp+var_44], 1
mov	edx, [ebp+var_EC]
mov	al, [edx+3Eh]
mov	[ebp+var_40], al
mov	ecx, [ebp+var_EC]
mov	dl, [ecx+3Fh]
mov	[ebp+var_3F], dl
mov	eax, [ebp+var_EC]
mov	cl, [eax+40h]
mov	[ebp+var_3E], cl
mov	edx, [ebp+var_EC]
mov	al, [edx+41h]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_EC]
mov	dl, [ecx+42h]
mov	[ebp+var_3C], dl
mov	eax, [ebp+var_EC]
mov	cl, [eax+43h]
mov	[ebp+var_3B], cl
mov	edx, [ebp+var_EC]
mov	al, [edx+44h]
mov	[ebp+var_3A], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+var_2C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_28], eax
mov	[ebp+var_31], 1
lea	ecx, [ebp+var_50]
mov	[ebp+var_E0], ecx
mov	edx, [ebp+var_E0]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_E0]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EEF7D
lea	eax, [ebp+var_74]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EEF7D:
mov	ecx, [ebp+var_EC]
call	sub_4EF0F0
mov	edx, [ebp+var_EC]
movzx	eax, byte ptr [edx+34h]
test	eax, eax
jz	short loc_4EEFAB
mov	ecx, [ebp+var_EC]
add	ecx, 0Ch
call	sub_402CA0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4EEFD6

loc_4EEFAB:
lea	ecx, [ebp+var_64]
call	sub_4087D0
lea	ecx, [ebp+var_74]
call	sub_401110
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_24]
call	sub_401110
jmp	loc_4EF0D3

loc_4EEFD6:
mov	ecx, 138Bh
lea	eax, [ebp+var_C4]
call	sub_401100
mov	[ebp+var_C4], offset off_1581910
mov	edx, [ebp+var_14]
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_B8], eax
lea	ecx, [ebp+var_B4]
call	sub_E7C090
mov	ecx, [ebp+var_EC]
add	ecx, 0Ch
push	ecx
lea	edx, [ebp+var_DC]
push	edx
call	sub_10F4BF0
add	esp, 8
push	eax
lea	ecx, [ebp+var_94]
call	sub_4022F0
lea	ecx, [ebp+var_DC]
call	sub_407910
lea	eax, [ebp+var_A0]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_E4]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_E4]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4EF07D
lea	edx, [ebp+var_C4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EF07D:
lea	ecx, [ebp+var_B4]
mov	[ebp+var_E8], ecx
mov	ecx, [ebp+var_E8]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_E8]
call	sub_4087D0
lea	ecx, [ebp+var_C4]
call	sub_401110
lea	ecx, [ebp+var_64]
call	sub_4087D0
lea	ecx, [ebp+var_74]
call	sub_401110

loc_4EF0BD:
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_24]
call	sub_401110

loc_4EF0D3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4EEDC0 endp

align 10h


; Attributes: bp-based frame

sub_4EF0F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+3Eh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+3Fh], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+40h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+41h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+42h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+43h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+44h], 0
mov	esp, ebp
pop	ebp
retn
sub_4EF0F0 endp

align 10h


; Attributes: bp-based frame

sub_4EF130 proc	near

var_324= dword ptr -324h
var_318= dword ptr -318h
var_314= dword ptr -314h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2FC= dword ptr -2FCh
var_2F8= dword ptr -2F8h
var_2F4= dword ptr -2F4h
var_2F0= dword ptr -2F0h
var_2A4= dword ptr -2A4h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_294= byte ptr -294h
var_23A= byte ptr -23Ah
var_239= byte ptr -239h
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= byte ptr -220h
var_205= byte ptr -205h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F5= byte ptr -1F5h
var_1F4= dword ptr -1F4h
var_1CC= dword ptr -1CCh
var_1C5= byte ptr -1C5h
var_1C4= dword ptr -1C4h
var_199= byte ptr -199h
var_198= byte ptr -198h
var_16D= byte ptr -16Dh
var_16C= byte ptr -16Ch
var_144= byte ptr -144h
var_104= byte ptr -104h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_80=	byte ptr -80h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	byte ptr -68h
var_50=	byte ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4EF130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30Ch
push	esi
push	edi
mov	[ebp+var_300], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EF17C
mov	ecx, [ebp+var_300]
mov	edx, [ecx+4]
push	edx
push	offset aDurationbehavi ; "DurationBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EF17C:
lea	ecx, [ebp+var_239]
push	ecx
lea	edx, [ebp+var_23A]
push	edx
lea	ecx, [ebp+var_2C]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_300]
call	sub_F79E10
lea	ecx, [ebp+var_16D]
call	sub_401EF0
push	eax
push	offset aDuration ; "duration"
lea	ecx, [ebp+var_16C]
call	sub_407810
lea	ecx, [ebp+var_16C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_10]
lea	ecx, [ebp+var_16C]
call	sub_407E50
lea	ecx, [ebp+var_16D]
call	nullsub_1
lea	ecx, [ebp+var_199]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_198]
call	sub_407810
lea	eax, [ebp+var_198]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_198]
call	sub_407E50
lea	ecx, [ebp+var_199]
call	nullsub_1
lea	ecx, [ebp+var_1C5]
call	sub_401EF0
push	eax
push	offset aOriginator_is_ ; "originator_is_owner"
lea	ecx, [ebp+var_1C4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+324h+var_324]
lea	edx, [ebp+var_1C4]
push	edx		; int
lea	eax, [ebp+var_2C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EF28A
mov	[ebp+var_304], 1
jmp	short loc_4EF294

loc_4EF28A:
mov	[ebp+var_304], 0

loc_4EF294:
mov	cl, byte ptr [ebp+var_304]
mov	[ebp+var_35], cl
lea	ecx, [ebp+var_1C4]
call	sub_407E50
lea	ecx, [ebp+var_1C5]
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_34], eax
mov	ecx, [edx+14h]
mov	[ebp+var_30], ecx
lea	ecx, [ebp+var_1F5]
call	sub_401EF0
push	eax
push	offset aTarget_caster ;	"target_caster"
lea	ecx, [ebp+var_1F4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+324h+var_324]
lea	edx, [ebp+var_1F4]
push	edx		; int
lea	eax, [ebp+var_2C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_1CC]
lea	ecx, [ebp+var_1F4]
call	sub_407E50
lea	ecx, [ebp+var_1F5]
call	nullsub_1
movss	xmm0, [ebp+var_1CC]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	short loc_4EF336
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	eax, [ecx+4]
mov	[ebp+var_30], eax

loc_4EF336:
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_FAF3D0
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	loc_4EF78D
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_40], eax
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4EF3D7
mov	eax, [ebp+var_14]
mov	[ebp+var_200], eax
mov	ecx, [ebp+var_200]
mov	[ebp+var_1FC], ecx
cmp	[ebp+var_1FC], 0
jz	short loc_4EF3AC
push	1
mov	edx, [ebp+var_1FC]
mov	eax, [edx]
mov	ecx, [ebp+var_1FC]
mov	edx, [eax]
call	edx
mov	[ebp+var_308], eax
jmp	short loc_4EF3B6

loc_4EF3AC:
mov	[ebp+var_308], 0

loc_4EF3B6:
mov	eax, [ebp+var_40]
mov	[ebp+var_204], eax
lea	ecx, [ebp+var_2C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_204]
jmp	loc_4EF7AA

loc_4EF3D7:
cmp	[ebp+var_40], 0
jz	loc_4EF72B
lea	ecx, [ebp+var_205]
call	sub_401EF0
push	eax
push	offset aDskill	; "dskill"
lea	ecx, [ebp+var_68]
call	sub_407D30
lea	ecx, [ebp+var_205]
call	nullsub_1
push	1
push	10h
lea	ecx, [ebp+var_144]
call	sub_43E7B0
mov	ecx, dword_18897F4
mov	[ebp+var_30C], ecx
mov	edx, dword_18897F4
add	edx, 1
mov	dword_18897F4, edx
mov	eax, [ebp+var_30C]
push	eax
lea	ecx, [ebp+var_144]
call	sub_43D3D0
lea	ecx, [ebp+var_220]
push	ecx
lea	ecx, [ebp+var_144]
call	sub_4367C0
push	eax
lea	ecx, [ebp+var_68]
call	sub_402340
lea	ecx, [ebp+var_220]
call	sub_407910
lea	ecx, [ebp+var_50]
call	sub_49F360
movss	xmm0, [ebp+var_10]
movss	[ebp+var_44], xmm0
push	90h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_224], eax
cmp	[ebp+var_224], 0
jz	loc_4EF54C
mov	ecx, 16h
mov	esi, [ebp+arg_0]
lea	edi, [ebp+var_294]
rep movsd
mov	ecx, [ebp+var_224]
call	sub_49F270
mov	edx, [ebp+var_224]
mov	dword ptr [edx], offset	off_15808F0
mov	edi, [ebp+var_224]
add	edi, 30h
mov	ecx, 16h
lea	esi, [ebp+var_294]
rep movsd
mov	eax, [ebp+var_224]
mov	ecx, [ebp+var_14]
mov	[eax+88h], ecx
lea	edx, [ebp+var_68]
push	edx
mov	ecx, [ebp+var_224]
add	ecx, 10h
call	sub_4022F0
mov	eax, [ebp+var_224]
mov	dword ptr [eax+2Ch], 1
movzx	ecx, [ebp+var_35]
test	ecx, ecx
jz	short loc_4EF526
mov	edx, [ebp+var_224]
mov	eax, [ebp+var_224]
mov	ecx, [eax+38h]
mov	[edx+8], ecx
mov	eax, [eax+3Ch]
mov	[edx+0Ch], eax
jmp	short loc_4EF53E

loc_4EF526:
mov	ecx, [ebp+var_224]
mov	edx, [ebp+var_224]
mov	eax, [edx+30h]
mov	[ecx+8], eax
mov	edx, [edx+34h]
mov	[ecx+0Ch], edx

loc_4EF53E:
mov	eax, [ebp+var_224]
mov	[ebp+var_310], eax
jmp	short loc_4EF556

loc_4EF54C:
mov	[ebp+var_310], 0

loc_4EF556:
mov	ecx, [ebp+var_310]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_29C], ecx
mov	edx, [eax+4]
mov	[ebp+var_298], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_A4]
call	sub_401100
mov	[ebp+var_A4], offset off_1558464
mov	eax, [ebp+var_29C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_298]
mov	[ebp+var_98], ecx
lea	ecx, [ebp+var_94]
call	sub_DD5FF0
push	98h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_228], eax
cmp	[ebp+var_228], 0
jz	short loc_4EF65D
mov	ecx, 16h
mov	esi, [ebp+arg_0]
lea	edi, [ebp+var_2F4]
rep movsd
mov	edx, [ebp+var_2A4]
push	edx
push	1
push	1
push	10h
push	7FFFFFFFh
push	0FFFFFFFFh
mov	eax, [ebp+var_2F0]
push	eax
mov	ecx, [ebp+var_2F4]
push	ecx
mov	ecx, [ebp+var_228]
call	sub_4E56A0
mov	edx, [ebp+var_228]
mov	dword ptr [edx], offset	off_1581AB4
lea	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_228]
add	ecx, 28h
call	sub_403850
mov	edi, [ebp+var_228]
add	edi, 40h
mov	ecx, 16h
lea	esi, [ebp+var_2F4]
rep movsd
mov	ecx, [ebp+var_228]
mov	[ebp+var_314], ecx
jmp	short loc_4EF667

loc_4EF65D:
mov	[ebp+var_314], 0

loc_4EF667:
mov	edx, [ebp+var_314]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_300]
mov	ecx, [eax+4]
mov	[ebp+var_70], ecx
lea	edx, [ebp+var_80]
mov	[ebp+var_2F8], edx
mov	eax, [ebp+var_2F8]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_2F8]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EF6B9
lea	ecx, [ebp+var_A4]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EF6B9:
lea	ecx, [ebp+var_94]
call	sub_4087D0
lea	ecx, [ebp+var_A4]
call	sub_401110
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_104]
call	sub_43E870
lea	eax, [ebp+var_104]
mov	[ebp+var_2FC], eax
mov	ecx, [ebp+var_2FC]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_2FC]
call	sub_77EEB0
lea	ecx, [ebp+var_68]
call	sub_407910
jmp	short loc_4EF76F

loc_4EF72B:
mov	edx, [ebp+var_14]
mov	[ebp+var_230], edx
mov	eax, [ebp+var_230]
mov	[ebp+var_22C], eax
cmp	[ebp+var_22C], 0
jz	short loc_4EF765
push	1
mov	ecx, [ebp+var_22C]
mov	edx, [ecx]
mov	ecx, [ebp+var_22C]
mov	eax, [edx]
call	eax
mov	[ebp+var_318], eax
jmp	short loc_4EF76F

loc_4EF765:
mov	[ebp+var_318], 0

loc_4EF76F:
mov	ecx, [ebp+var_40]
mov	[ebp+var_234], ecx
lea	ecx, [ebp+var_2C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_234]
jmp	short loc_4EF7AA

loc_4EF78D:
mov	[ebp+var_238], 0
lea	ecx, [ebp+var_2C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_238]

loc_4EF7AA:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4EF130 endp

align 10h


; Attributes: bp-based frame

sub_4EF7C0 proc	near

var_F9=	byte ptr -0F9h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_88=	byte ptr -88h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_38=	byte ptr -38h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4EF7C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0F0h
mov	[ebp+var_F4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EF806
push	offset aDurationbeha_0 ; "DurationBehavior--> UncastTimer"
mov	ecx, [ebp+var_F4]
add	ecx, 30h
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 8

loc_4EF806:
mov	edx, [ebp+var_F4]
mov	byte ptr [edx+68h], 0
mov	eax, [ebp+var_F4]
add	eax, 30h
push	eax
mov	ecx, [ebp+var_F4]
mov	edx, [ecx+88h]
mov	eax, [ebp+var_F4]
mov	ecx, [eax+88h]
mov	edx, [edx]
mov	eax, [edx+10h]
call	eax
mov	ecx, [ebp+var_F4]
mov	edx, [ecx+88h]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_B4]
mov	[ebp+var_B0], eax
cmp	[ebp+var_B0], 0
jz	short loc_4EF87C
push	1
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	ecx, [ebp+var_B0]
mov	eax, [edx]
call	eax
mov	[ebp+var_F8], eax
jmp	short loc_4EF886

loc_4EF87C:
mov	[ebp+var_F8], 0

loc_4EF886:
mov	ecx, [ebp+var_F4]
mov	dword ptr [ecx+88h], 0
mov	ecx, 1397h
lea	eax, [ebp+var_6C]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_6C], offset off_155E05C
mov	[ebp+var_64], 0
mov	[ebp+var_60], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_F4]
mov	eax, [edx+30h]
mov	[ebp+var_64], eax
mov	ecx, [edx+34h]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_6C]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	eax, al
test	eax, eax
jnz	short loc_4EF91C
mov	[ebp+var_B8], 1
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_401110
mov	eax, [ebp+var_B8]
jmp	loc_4EFB64

loc_4EF91C:
mov	ecx, [ebp+var_F4]
mov	edx, [ecx+30h]
mov	[ebp+var_CC], edx
mov	eax, [ecx+34h]
mov	[ebp+var_C8], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_5C]
call	sub_401100
mov	[ebp+var_5C], offset off_1581928
mov	ecx, [ebp+var_CC]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_C8]
mov	[ebp+var_50], edx
lea	ecx, [ebp+var_4C]
call	sub_E2E6F0
mov	[ebp+var_14], 10h
lea	eax, [ebp+var_38]
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_D0]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4EF9A3
lea	edx, [ebp+var_5C]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EF9A3:
mov	ecx, [ebp+var_24]
mov	[ebp+var_D4], ecx
mov	ecx, [ebp+var_D4]
lea	eax, [ebp+var_70]
call	sub_4046E0
jmp	short loc_4EF9CB

loc_4EF9BC:
mov	edx, [ebp+var_70]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_70], eax

loc_4EF9CB:
lea	ecx, [ebp+var_2C]
lea	eax, [ebp+var_C0]
call	sub_4046E0
lea	eax, [ebp+var_DC]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_C0]
mov	eax, [ebp+var_D8]
call	sub_4046E0
mov	ecx, [ebp+var_70]
xor	edx, edx
cmp	ecx, [ebp+var_DC]
setnz	dl
mov	[ebp+var_F9], dl
movzx	eax, [ebp+var_F9]
test	eax, eax
jz	loc_4EFB14
mov	ecx, [ebp+var_70]
mov	edx, [ecx+14h]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_F4]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_74]
add	ecx, 28h
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	loc_4EFB0F
mov	eax, [ebp+var_F4]
mov	ecx, [eax+30h]
mov	[ebp+var_E4], ecx
mov	edx, [eax+34h]
mov	[ebp+var_E0], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_AC]
call	sub_401100
mov	[ebp+var_AC], offset off_1558464
mov	eax, [ebp+var_E4]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_E0]
mov	[ebp+var_A0], ecx
lea	ecx, [ebp+var_9C]
call	sub_DD5F70
mov	edx, [ebp+var_70]
add	edx, 10h
mov	[ebp+var_E8], edx
mov	eax, [ebp+var_E8]
mov	ecx, [eax+4]
mov	[ebp+var_7C], ecx
mov	[ebp+var_78], 1
lea	edx, [ebp+var_88]
mov	[ebp+var_EC], edx
mov	eax, [ebp+var_EC]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_EC]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4EFAF7
lea	ecx, [ebp+var_AC]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EFAF7:
lea	ecx, [ebp+var_9C]
call	sub_4087D0
lea	ecx, [ebp+var_AC]
call	sub_401110
jmp	short loc_4EFB14

loc_4EFB0F:
jmp	loc_4EF9BC

loc_4EFB14:
mov	[ebp+var_C4], 1
lea	eax, [ebp+var_4C]
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_F0]
add	ecx, 20h
call	sub_4FF4D0
mov	ecx, [ebp+var_F0]
call	sub_4087D0
lea	ecx, [ebp+var_5C]
call	sub_401110
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_401110
mov	eax, [ebp+var_C4]

loc_4EFB64:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4EF7C0 endp

align 10h
; [00000018 BYTES: COLLAPSED FUNCTION unknown_libname_10. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_4EFBA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C10
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4EFBF2
mov	edx, [ebp+var_10]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4EFBF2:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_4EFBA0 endp

align 10h


; Attributes: bp-based frame

sub_4EFC10 proc	near

var_3D4= dword ptr -3D4h
var_3D0= dword ptr -3D0h
var_3CC= dword ptr -3CCh
var_3C8= dword ptr -3C8h
var_3C4= dword ptr -3C4h
var_3C0= dword ptr -3C0h
var_3BC= dword ptr -3BCh
var_3B8= dword ptr -3B8h
var_3B4= dword ptr -3B4h
var_3B0= dword ptr -3B0h
var_3AC= dword ptr -3ACh
var_390= dword ptr -390h
var_38C= dword ptr -38Ch
var_388= dword ptr -388h
var_380= dword ptr -380h
var_37C= dword ptr -37Ch
var_378= dword ptr -378h
var_374= dword ptr -374h
var_370= dword ptr -370h
var_36A= byte ptr -36Ah
var_369= byte ptr -369h
var_368= dword ptr -368h
var_361= byte ptr -361h
var_360= dword ptr -360h
var_338= byte ptr -338h
var_32C= byte ptr -32Ch
var_320= byte ptr -320h
var_314= byte ptr -314h
var_305= byte ptr -305h
var_304= dword ptr -304h
var_2D9= byte ptr -2D9h
var_2D8= dword ptr -2D8h
var_2AD= byte ptr -2ADh
var_2AC= byte ptr -2ACh
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_271= byte ptr -271h
var_270= dword ptr -270h
var_248= dword ptr -248h
var_241= byte ptr -241h
var_240= dword ptr -240h
var_218= byte ptr -218h
var_1F4= byte ptr -1F4h
var_1E8= byte ptr -1E8h
var_1D8= byte ptr -1D8h
var_1B4= byte ptr -1B4h
var_1A8= byte ptr -1A8h
var_198= dword ptr -198h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= byte ptr -188h
var_174= byte ptr -174h
var_168= byte ptr -168h
var_151= byte ptr -151h
var_150= dword ptr -150h
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
var_12C= byte ptr -12Ch
var_120= dword ptr -120h
var_118= dword ptr -118h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= byte ptr -108h
var_F4=	byte ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	byte ptr -0E4h
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_AC=	byte ptr -0ACh
var_A0=	byte ptr -0A0h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_5C=	byte ptr -5Ch
var_50=	byte ptr -50h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3C8h
mov	[ebp+var_3B0], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4EFC45
mov	ecx, [ebp+var_3B0]
mov	edx, [ecx+4]
push	edx
push	offset aKnockbackbehav ; "KnockbackBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4EFC45:
lea	ecx, [ebp+var_369]
push	ecx
lea	edx, [ebp+var_36A]
push	edx
lea	ecx, [ebp+var_30]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3B0]
call	sub_F79E10
lea	ecx, [ebp+var_241]
call	sub_401EF0
push	eax
push	offset aIgnore_self ; "ignore_self"
lea	ecx, [ebp+var_240]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+3CCh+var_3CC]
lea	ecx, [ebp+var_240]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4EFCBE
mov	[ebp+var_3B4], 1
jmp	short loc_4EFCC8

loc_4EFCBE:
mov	[ebp+var_3B4], 0

loc_4EFCC8:
mov	al, byte ptr [ebp+var_3B4]
mov	[ebp+var_3D], al
lea	ecx, [ebp+var_240]
call	sub_407E50
lea	ecx, [ebp+var_241]
call	nullsub_1
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_4EFD45
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[ebp+var_3B8], edx
mov	[ebp+var_3BC], eax
mov	ecx, [ebp+var_3B8]
mov	edx, [ebp+var_3BC]
mov	eax, [ecx]
cmp	eax, [edx+10h]
jnz	short loc_4EFD45
mov	ecx, [ebp+var_3B8]
mov	edx, [ebp+var_3BC]
mov	eax, [ecx+4]
cmp	eax, [edx+14h]
jnz	short loc_4EFD45
mov	[ebp+var_248], 0
lea	ecx, [ebp+var_30]
call	sub_4FFBC0
mov	eax, [ebp+var_248]
jmp	loc_4F0652

loc_4EFD45:
lea	ecx, [ebp+var_271]
call	sub_401EF0
push	eax
push	offset aCaster	; "caster"
lea	ecx, [ebp+var_270]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3CCh+var_3CC]
lea	ecx, [ebp+var_270]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_270]
call	sub_407E50
lea	ecx, [ebp+var_271]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_D8], ecx
mov	edx, [eax+4]
mov	[ebp+var_D4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_38], ecx
mov	edx, [eax+14h]
mov	[ebp+var_34], edx
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_4EFDEC
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_D8], edx
mov	eax, [ecx+14h]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_38], edx
mov	eax, [ecx+4]
mov	[ebp+var_34], eax

loc_4EFDEC:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_3C0], ecx
mov	edx, [ebp+var_3C0]
mov	eax, [edx]
cmp	eax, [ebp+var_38]
jnz	short loc_4EFE14
mov	ecx, [ebp+var_3C0]
mov	edx, [ecx+4]
cmp	edx, [ebp+var_34]
jz	loc_4F0004

loc_4EFE14:
mov	[ebp+var_D9], 0
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Ch]
test	ecx, ecx
jz	loc_4EFF07
mov	ecx, 138Bh
lea	eax, [ebp+var_118]
call	sub_401100
mov	[ebp+var_118], offset off_1558464
mov	edx, [ebp+var_38]
mov	[ebp+var_110], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_10C], eax
lea	ecx, [ebp+var_108]
call	sub_D96030
mov	[ebp+var_E8], 2
lea	ecx, [ebp+var_F4]
mov	[ebp+var_370], ecx
mov	edx, [ebp+var_370]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_370]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4EFEAA
lea	eax, [ebp+var_118]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EFEAA:
mov	dl, [ebp+var_E4]
mov	[ebp+var_D9], dl
movzx	eax, [ebp+var_D9]
test	eax, eax
jz	short loc_4EFED9
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B750
add	esp, 4
mov	[ebp+var_3C4], 0
jmp	short loc_4EFEEF

loc_4EFED9:
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B7A0
add	esp, 4
mov	[ebp+var_3C4], 0

loc_4EFEEF:
lea	ecx, [ebp+var_108]
call	sub_4087D0
lea	ecx, [ebp+var_118]
call	sub_401110
jmp	short loc_4EFF19

loc_4EFF07:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
mov	[ebp+var_D9], al

loc_4EFF19:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4EFF41
mov	[ebp+var_278], 1
lea	ecx, [ebp+var_30]
call	sub_4FFBC0
mov	eax, [ebp+var_278]
jmp	loc_4F0652

loc_4EFF41:
movzx	eax, [ebp+var_D9]
test	eax, eax
jz	loc_4F0004
mov	ecx, 138Bh
lea	eax, [ebp+var_150]
call	sub_401100
mov	[ebp+var_150], offset off_1558464
mov	ecx, [ebp+var_38]
mov	[ebp+var_148], ecx
mov	edx, [ebp+var_34]
mov	[ebp+var_144], edx
lea	ecx, [ebp+var_140]
call	sub_D95F90
mov	[ebp+var_120], 2
lea	eax, [ebp+var_12C]
mov	[ebp+var_374], eax
mov	ecx, [ebp+var_374]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_374]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4EFFD1
lea	edx, [ebp+var_150]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4EFFD1:
mov	[ebp+var_27C], 0
lea	ecx, [ebp+var_140]
call	sub_4087D0
lea	ecx, [ebp+var_150]
call	sub_401110
lea	ecx, [ebp+var_30]
call	sub_4FFBC0
mov	eax, [ebp+var_27C]
jmp	loc_4F0652

loc_4F0004:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F002C
mov	[ebp+var_280], 1
lea	ecx, [ebp+var_30]
call	sub_4FFBC0
mov	eax, [ebp+var_280]
jmp	loc_4F0652

loc_4F002C:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_37C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_378], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_80]
call	sub_401100
mov	[ebp+var_80], offset off_1558450
mov	eax, [ebp+var_37C]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_378]
mov	[ebp+var_74], ecx
lea	ecx, [ebp+var_70]
call	sub_D8EEB0
lea	edx, [ebp+var_5C]
mov	[ebp+var_380], edx
mov	eax, [ebp+var_380]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_380]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F00A9
lea	ecx, [ebp+var_80]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F00A9:
movzx	eax, [ebp+var_50]
test	eax, eax
jz	short loc_4F00DE
mov	[ebp+var_284], 0
lea	ecx, [ebp+var_70]
call	sub_4087D0
lea	ecx, [ebp+var_80]
call	sub_401110
lea	ecx, [ebp+var_30]
call	sub_4FFBC0
mov	eax, [ebp+var_284]
jmp	loc_4F0652

loc_4F00DE:
lea	ecx, [ebp+var_2AD]
call	sub_401EF0
push	eax
push	offset aStrength ; "strength"
lea	ecx, [ebp+var_2AC]
call	sub_407810
lea	ecx, [ebp+var_2AC]
push	ecx
lea	edx, [ebp+var_30]
push	edx
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_14]
lea	ecx, [ebp+var_2AC]
call	sub_407E50
lea	ecx, [ebp+var_2AD]
call	nullsub_1
push	offset unk_1513C38
lea	eax, [ebp+var_14]
push	eax
call	sub_46DF50
add	esp, 8
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_14], xmm0
lea	ecx, [ebp+var_2D9]
call	sub_401EF0
push	eax
push	offset aAngle	; "angle"
lea	ecx, [ebp+var_2D8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3CCh+var_3CC]
lea	ecx, [ebp+var_2D8]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_3C]
lea	ecx, [ebp+var_2D8]
call	sub_407E50
lea	ecx, [ebp+var_2D9]
call	nullsub_1
movss	xmm0, [ebp+var_3C]
comiss	xmm0, ds:dword_15FDB2C
jbe	short loc_4F01B6
movss	xmm0, ds:dword_15FDB28
comiss	xmm0, [ebp+var_3C]
jbe	short loc_4F01B6
mov	[ebp+var_3C8], 1
jmp	short loc_4F01C0

loc_4F01B6:
mov	[ebp+var_3C8], 0

loc_4F01C0:
mov	al, byte ptr [ebp+var_3C8]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_10]
call	sub_401EF0
movzx	ecx, [ebp+var_2]
test	ecx, ecx
jnz	loc_4F045C
movss	xmm0, ds:dword_1513BE8
divss	xmm0, ds:dword_15FCD3C
mulss	xmm0, [ebp+var_3C]
movss	[ebp+var_3C], xmm0
lea	ecx, [ebp+var_305]
call	sub_401EF0
push	eax
push	offset aRelative ; "relative"
lea	ecx, [ebp+var_304]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3CCh+var_3CC]
lea	edx, [ebp+var_304]
push	edx		; int
lea	eax, [ebp+var_30]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
neg	eax
sbb	eax, eax
neg	eax
mov	[ebp+var_151], al
lea	ecx, [ebp+var_304]
call	sub_407E50
lea	ecx, [ebp+var_305]
call	nullsub_1
movzx	ecx, [ebp+var_151]
test	ecx, ecx
jz	loc_4F0316
mov	ecx, 138Bh
lea	eax, [ebp+var_198]
call	sub_401100
mov	[ebp+var_198], offset off_1558450
mov	edx, [ebp+var_38]
mov	[ebp+var_190], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_18C], eax
lea	ecx, [ebp+var_188]
call	sub_DE0600
lea	ecx, [ebp+var_174]
mov	[ebp+var_388], ecx
mov	edx, [ebp+var_388]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_388]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F02D8
lea	eax, [ebp+var_198]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F02D8:
lea	edx, [ebp+var_314]
push	edx
lea	ecx, [ebp+var_168]
call	sub_412DA0
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	eax, [eax+8]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_188]
call	sub_4087D0
lea	ecx, [ebp+var_198]
call	sub_401110
jmp	loc_4F0401

loc_4F0316:
mov	ecx, [ebp+var_D4]
push	ecx
mov	edx, [ebp+var_D8]
push	edx
lea	ecx, [ebp+var_1D8]
call	sub_42D660
lea	eax, [ebp+var_1B4]
mov	[ebp+var_38C], eax
mov	ecx, [ebp+var_38C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_38C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F036F
lea	edx, [ebp+var_1D8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F036F:
mov	ecx, [ebp+var_34]
push	ecx
mov	edx, [ebp+var_38]
push	edx
lea	ecx, [ebp+var_218]
call	sub_42D660
lea	eax, [ebp+var_1F4]
mov	[ebp+var_390], eax
mov	ecx, [ebp+var_390]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_390]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F03C2
lea	edx, [ebp+var_218]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F03C2:
lea	ecx, [ebp+var_1A8]
lea	edx, [ebp+var_1E8]
push	edx
lea	eax, [ebp+var_320]
call	sub_40F4A0
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	eax, [eax+8]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_218]
call	sub_4E5560
lea	ecx, [ebp+var_1D8]
call	sub_4E5560

loc_4F0401:		; float
push	ecx
fld	[ebp+var_8]
fstp	[esp+3CCh+var_3CC]
push	ecx		; float
fldz
fstp	[esp+3D0h+var_3D0]
push	ecx		; float
fld	[ebp+var_10]
fstp	[esp+3D4h+var_3D4]
lea	ecx, [ebp+var_32C]
call	sub_40F570
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	eax, [eax+8]
mov	[ebp+var_8], eax
lea	eax, [ebp+var_10]
call	sub_427200
fstp	st
push	ecx		; float
fld	[ebp+var_3C]
fstp	[esp+3CCh+var_3CC]
call	sub_459910
add	esp, 4
fadd	[ebp+var_C]
fstp	[ebp+var_C]
lea	eax, [ebp+var_10]
call	sub_427200
fstp	st
jmp	short loc_4F048A

loc_4F045C:		; float
push	ecx
fldz
fstp	[esp+3CCh+var_3CC]
push	ecx		; float
fld1
fstp	[esp+3D0h+var_3D0]
push	ecx		; float
fldz
fstp	[esp+3D4h+var_3D4]
lea	ecx, [ebp+var_338]
call	sub_40F570
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	eax, [eax+8]
mov	[ebp+var_8], eax

loc_4F048A:		; float
push	ecx
fld	[ebp+var_14]
fstp	[esp+3CCh+var_3CC]
lea	eax, [ebp+var_10]
call	sub_40F900
mov	[ebp+var_18], 0
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+39h]
test	edx, edx
jz	short loc_4F04FE
lea	ecx, [ebp+var_361]
call	sub_401EF0
push	eax
push	offset aTime_ms	; "time_ms"
lea	ecx, [ebp+var_360]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3CCh+var_3CC]
lea	eax, [ebp+var_360]
push	eax		; int
lea	ecx, [ebp+var_30]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_360]
call	sub_407E50
lea	ecx, [ebp+var_361]
call	nullsub_1

loc_4F04FE:
mov	ecx, 138Bh
lea	eax, [ebp+var_D0]
call	sub_401100
mov	[ebp+var_D0], offset off_1558468
mov	edx, [ebp+var_38]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_C4], eax
lea	ecx, [ebp+var_C0]
call	sub_DD47D0
lea	ecx, [ebp+var_A0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_D8]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_D4]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_88], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_94], edx
lea	eax, [ebp+var_AC]
mov	[ebp+var_3AC], eax
mov	ecx, [ebp+var_3AC]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_3AC]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F05C2
lea	edx, [ebp+var_D0]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F05C2:
mov	ecx, [ebp+var_3B0]
cmp	dword ptr [ecx+8], 0
jz	short loc_4F060F
push	ecx
fld	ds:flt_1513C04
fstp	[esp+3CCh+var_3CC]
push	offset aOnhit	; "onhit"
mov	edx, [ebp+var_3B0]
add	edx, 0Ch
push	edx
mov	eax, [ebp+var_3B0]
mov	ecx, [eax+8]
push	ecx
mov	edx, [ebp+var_D4]
push	edx
mov	eax, [ebp+var_D8]
push	eax
mov	ecx, [ebp+var_34]
push	ecx
mov	edx, [ebp+var_38]
push	edx
call	sub_F81B80
add	esp, 20h

loc_4F060F:
mov	[ebp+var_368], 1
lea	ecx, [ebp+var_C0]
call	sub_4087D0
lea	ecx, [ebp+var_D0]
call	sub_401110
lea	ecx, [ebp+var_70]
call	sub_4087D0
lea	ecx, [ebp+var_80]
call	sub_401110
lea	ecx, [ebp+var_30]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_368]

loc_4F0652:
mov	esp, ebp
pop	ebp
retn	8
sub_4EFC10 endp

align 10h


; Attributes: bp-based frame

sub_4F0660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 12h
mov	esp, ebp
pop	ebp
retn
sub_4F0660 endp



; Attributes: bp-based frame

sub_4F0670 proc	near

var_1A8= dword ptr -1A8h
var_19C= qword ptr -19Ch
var_194= dword ptr -194h
var_18E= word ptr -18Eh
var_18C= dword ptr -18Ch
var_188= qword ptr -188h
var_180= dword ptr -180h
var_17A= word ptr -17Ah
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_156= byte ptr -156h
var_155= byte ptr -155h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_149= byte ptr -149h
var_148= dword ptr -148h
var_11D= byte ptr -11Dh
var_11C= dword ptr -11Ch
var_F1=	byte ptr -0F1h
var_F0=	byte ptr -0F0h
var_C5=	byte ptr -0C5h
var_C4=	byte ptr -0C4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_74=	byte ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_3C=	byte ptr -3Ch
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 19Ch
push	esi
push	edi
mov	[ebp+var_174], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F06A7
mov	ecx, [ebp+var_174]
mov	edx, [ecx+4]
push	edx
push	offset aAttackdelaybeh ; "AttackDelayBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F06A7:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F06BC
mov	eax, 1
jmp	loc_4F0B80

loc_4F06BC:
lea	eax, [ebp+var_155]
push	eax
lea	ecx, [ebp+var_156]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_174]
call	sub_F79E10
lea	ecx, [ebp+var_C5]
call	sub_401EF0
push	eax
push	offset aDelay	; "delay"
lea	ecx, [ebp+var_C4]
call	sub_407810
lea	eax, [ebp+var_C4]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_28]
lea	ecx, [ebp+var_C4]
call	sub_407E50
lea	ecx, [ebp+var_C5]
call	nullsub_1
lea	ecx, [ebp+var_F1]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_F0]
call	sub_407810
lea	edx, [ebp+var_F0]
push	edx
lea	eax, [ebp+var_1C]
push	eax
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_F0]
call	sub_407E50
lea	ecx, [ebp+var_F1]
call	nullsub_1
lea	ecx, [ebp+var_11D]
call	sub_401EF0
push	eax
push	offset aNum_intervals ;	"num_intervals"
lea	ecx, [ebp+var_11C]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+1A8h+var_1A8]
lea	ecx, [ebp+var_11C]
push	ecx		; int
lea	edx, [ebp+var_1C]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_11C]
call	sub_407E50
lea	ecx, [ebp+var_11D]
call	nullsub_1
lea	ecx, [ebp+var_149]
call	sub_401EF0
push	eax
push	offset aIgnore_interru ; "ignore_interrupts"
lea	ecx, [ebp+var_148]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1A8h+var_1A8]
lea	eax, [ebp+var_148]
push	eax		; int
lea	ecx, [ebp+var_1C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F081D
mov	[ebp+var_178], 1
jmp	short loc_4F0827

loc_4F081D:
mov	[ebp+var_178], 0

loc_4F0827:
mov	dl, byte ptr [ebp+var_178]
mov	[ebp+var_21], dl
lea	ecx, [ebp+var_148]
call	sub_407E50
lea	ecx, [ebp+var_149]
call	nullsub_1
mov	eax, [ebp+var_174]
cmp	dword ptr [eax+8], 0
jz	short loc_4F0892
push	ecx
fld	ds:flt_1513C00
fstp	[esp+1A8h+var_1A8]
push	offset aCast	; "cast"
mov	ecx, [ebp+var_174]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_174]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
call	sub_F81B80
add	esp, 20h

loc_4F0892:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+39h]
test	edx, edx
jz	loc_4F0AE8
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_160], ecx
mov	edx, [eax+4]
mov	[ebp+var_15C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_60]
call	sub_401100
mov	[ebp+var_60], offset off_1558464
mov	eax, [ebp+var_160]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_15C]
mov	[ebp+var_54], ecx
lea	ecx, [ebp+var_50]
call	sub_D9C360
lea	edx, [ebp+var_3C]
mov	[ebp+var_164], edx
mov	eax, [ebp+var_164]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_164]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F091D
lea	ecx, [ebp+var_60]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F091D:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
call	sub_50E110
add	esp, 8
movzx	edx, byte_1889845
test	edx, edx
jz	short loc_4F094D
mov	eax, [ebp+var_30]
push	eax
push	offset aAttackdelayb_0 ; "AttackDelayBehavior writing handle %d"
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F094D:
fld	[ebp+var_28]
fmul	ds:flt_15BF168
fimul	[ebp+var_4]
fnstcw	[ebp+var_17A]
movzx	eax, [ebp+var_17A]
or	eax, 0C00h
mov	[ebp+var_180], eax
fldcw	word ptr [ebp+var_180]
fistp	[ebp+var_188]
fldcw	[ebp+var_17A]
mov	edx, dword ptr [ebp+var_188]
push	edx
mov	eax, [ebp+var_174]
mov	edx, [eax]
mov	ecx, [ebp+var_174]
mov	eax, [edx+4]
call	eax
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_20]
push	eax
call	sub_F5B550
add	esp, 14h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_16C], edx
mov	eax, [ecx+4]
mov	[ebp+var_168], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_98]
call	sub_401100
mov	[ebp+var_98], offset off_1558464
mov	ecx, [ebp+var_16C]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_168]
mov	[ebp+var_8C], edx
lea	ecx, [ebp+var_88]
call	sub_DD5FF0
push	98h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_150], eax
cmp	[ebp+var_150], 0
jz	short loc_4F0A64
movzx	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_20]
push	edx
mov	esi, [ebp+arg_0]
sub	esp, 58h
mov	ecx, 16h
mov	edi, esp
rep movsd
mov	eax, [ebp+var_4]
push	eax
movss	xmm0, [ebp+var_28]
mulss	xmm0, ds:flt_15BF168
cvttss2si ecx, xmm0
push	ecx
mov	ecx, [ebp+var_150]
call	sub_4F0B90
mov	[ebp+var_18C], eax
jmp	short loc_4F0A6E

loc_4F0A64:
mov	[ebp+var_18C], 0

loc_4F0A6E:
mov	edx, [ebp+var_18C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_174]
mov	ecx, [eax+4]
mov	[ebp+var_64], ecx
lea	edx, [ebp+var_74]
mov	[ebp+var_170], edx
mov	eax, [ebp+var_170]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_170]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F0AC0
lea	ecx, [ebp+var_98]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F0AC0:
lea	ecx, [ebp+var_88]
call	sub_4087D0
lea	ecx, [ebp+var_98]
call	sub_401110
lea	ecx, [ebp+var_50]
call	sub_4087D0
lea	ecx, [ebp+var_60]
call	sub_401110
jmp	short loc_4F0B63

loc_4F0AE8:
mov	eax, [ebp+arg_4]
push	eax		; int
lea	ecx, [ebp+var_9C]
push	ecx		; void *
call	sub_50DDD0
add	esp, 8
mov	edx, [ebp+var_174]
mov	eax, [edx]
mov	ecx, [ebp+var_174]
mov	edx, [eax+4]
call	edx
push	eax
fld	[ebp+var_28]
fmul	ds:flt_15BF168
fimul	[ebp+var_4]
fnstcw	[ebp+var_18E]
movzx	eax, [ebp+var_18E]
or	eax, 0C00h
mov	[ebp+var_194], eax
fldcw	word ptr [ebp+var_194]
fistp	[ebp+var_19C]
fldcw	[ebp+var_18E]
mov	eax, dword ptr [ebp+var_19C]
push	eax
mov	ecx, [ebp+var_9C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_20]
push	eax
call	sub_F5B620
add	esp, 14h

loc_4F0B63:
mov	[ebp+var_154], 1
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_154]

loc_4F0B80:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4F0670 endp

align 10h


; Attributes: bp-based frame

sub_4F0B90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_58=	dword ptr  60h
arg_60=	dword ptr  68h
arg_64=	dword ptr  6Ch
arg_68=	byte ptr  70h

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158181C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+10h], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+14h], 12h
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_58]
mov	[ecx+18h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+1Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+24h], 1
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+25h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+26h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+27h], 1
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158092C
mov	edx, [ebp+var_4]
mov	al, [ebp+arg_68]
mov	[edx+28h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_60]
mov	[ecx+2Ch], edx
mov	edi, [ebp+var_4]
add	edi, 30h
mov	ecx, 16h
lea	esi, [ebp+arg_8]
rep movsd
mov	eax, [ebp+var_4]
mov	dword ptr [eax+88h], 0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_64]
mov	[ecx+8Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+90h], ecx
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	6Ch
sub_4F0B90 endp

align 10h


; Attributes: bp-based frame

sub_4F0C60 proc	near

var_4C4= dword ptr -4C4h
var_4C0= dword ptr -4C0h
var_4BC= dword ptr -4BCh
var_4B8= dword ptr -4B8h
var_4B4= dword ptr -4B4h
var_4B0= dword ptr -4B0h
var_4AC= dword ptr -4ACh
var_4A8= dword ptr -4A8h
var_4A1= byte ptr -4A1h
var_4A0= dword ptr -4A0h
var_49C= dword ptr -49Ch
var_498= dword ptr -498h
var_490= dword ptr -490h
var_48C= dword ptr -48Ch
var_488= byte ptr -488h
var_474= byte ptr -474h
var_468= dword ptr -468h
var_464= dword ptr -464h
var_45D= byte ptr -45Dh
var_45C= dword ptr -45Ch
var_458= byte ptr -458h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 4C4h
mov	[ebp+var_4C0], ecx
mov	eax, [ebp+var_4C0]
mov	ecx, [eax+8]
mov	[ebp+var_4AC], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4A8], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_4AC]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_4A8]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DDD7B0
lea	edx, [ebp+var_14]
mov	[ebp+var_4B0], edx
mov	eax, [ebp+var_4B0]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_4B0]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	loc_4F0F41
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	edx, al
test	edx, edx
jz	loc_4F0F41
movzx	eax, [ebp+var_8]
test	eax, eax
jnz	loc_4F0F41
mov	ecx, [ebp+var_4C0]
mov	byte ptr [ecx+68h], 0
lea	eax, [ebp+var_458]
call	sub_A49A00
mov	edx, [ebp+var_4C0]
mov	eax, [edx+2Ch]
push	eax
call	sub_FAF3D0
add	esp, 4
mov	[ebp+var_3C], eax
cmp	[ebp+var_3C], 0
jz	loc_4F0F36
mov	[ebp+var_45D], 0
mov	ecx, [ebp+var_4C0]
mov	edx, [ecx+88h]
add	edx, 1
mov	eax, [ebp+var_4C0]
mov	[eax+88h], edx
mov	ecx, [ebp+var_4C0]
mov	edx, [ebp+var_4C0]
mov	eax, [ecx+88h]
cmp	eax, [edx+90h]
jb	short loc_4F0D81
mov	[ebp+var_45D], 1

loc_4F0D81:
movzx	ecx, byte_1889845
test	ecx, ecx
jz	short loc_4F0DA3
push	offset aAttackdelayb_1 ; "AttackDelayBehavior subcasting"
mov	edx, [ebp+var_4C0]
add	edx, 30h
push	edx
call	__initp_misc_winxfltr_14
add	esp, 8

loc_4F0DA3:
lea	eax, [ebp+var_458]
push	eax
mov	ecx, [ebp+var_4C0]
add	ecx, 30h
push	ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	ecx, [ebp+var_3C]
mov	edx, [eax+0Ch]
call	edx
mov	[ebp+var_45C], eax
movzx	eax, [ebp+var_45D]
push	eax
mov	ecx, [ebp+var_4C0]
add	ecx, 8Ch
push	ecx
lea	edx, [ebp+var_458]
push	edx
mov	eax, [ebp+var_4C0]
add	eax, 30h
push	eax
call	sub_F79D10
add	esp, 10h
cmp	[ebp+var_45C], 0
jz	short loc_4F0E15
mov	ecx, [ebp+var_4C0]
add	ecx, 30h
push	ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	ecx, [ebp+var_3C]
mov	edx, [eax+10h]
call	edx

loc_4F0E15:
mov	eax, [ebp+var_3C]
mov	[ebp+var_4A0], eax
mov	ecx, [ebp+var_4A0]
mov	[ebp+var_49C], ecx
cmp	[ebp+var_49C], 0
jz	short loc_4F0E4F
push	1
mov	edx, [ebp+var_49C]
mov	eax, [edx]
mov	ecx, [ebp+var_49C]
mov	edx, [eax]
call	edx
mov	[ebp+var_4C4], eax
jmp	short loc_4F0E59

loc_4F0E4F:
mov	[ebp+var_4C4], 0

loc_4F0E59:
movzx	eax, [ebp+var_45D]
test	eax, eax
jz	loc_4F0F36
mov	ecx, [ebp+var_4C0]
mov	edx, [ecx+30h]
mov	[ebp+var_4B8], edx
mov	eax, [ecx+34h]
mov	[ebp+var_4B4], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_498]
call	sub_401100
mov	[ebp+var_498], offset off_1558464
mov	ecx, [ebp+var_4B8]
mov	[ebp+var_490], ecx
mov	edx, [ebp+var_4B4]
mov	[ebp+var_48C], edx
lea	ecx, [ebp+var_488]
call	sub_D85A30
mov	eax, [ebp+var_4C0]
mov	ecx, [eax+8Ch]
mov	[ebp+var_468], ecx
mov	edx, [ebp+var_4C0]
mov	eax, [edx+84h]
mov	[ebp+var_464], eax
lea	ecx, [ebp+var_474]
mov	[ebp+var_4BC], ecx
mov	edx, [ebp+var_4BC]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_4BC]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F0F20
lea	eax, [ebp+var_498]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F0F20:
lea	ecx, [ebp+var_488]
call	sub_4087D0
lea	ecx, [ebp+var_498]
call	sub_401110

loc_4F0F36:
lea	eax, [ebp+var_458]
call	sub_A496A0

loc_4F0F41:
mov	[ebp+var_4A1], 0
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	al, [ebp+var_4A1]
mov	esp, ebp
pop	ebp
retn
sub_4F0C60 endp

align 10h


; Attributes: bp-based frame

sub_4F0F70 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	byte ptr [eax+25h], 1
mov	ecx, [ebp+var_48]
mov	dl, [ebp+arg_0]
mov	[ecx+26h], dl
movzx	eax, [ebp+arg_0]
test	eax, eax
jz	loc_4F1024
mov	ecx, [ebp+var_48]
mov	edx, [ecx+30h]
mov	[ebp+var_40], edx
mov	eax, [ecx+34h]
mov	[ebp+var_3C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	ecx, [ebp+var_40]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_28]
call	sub_D85A30
mov	eax, [ebp+var_48]
mov	ecx, [eax+8Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+84h]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_14]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_44]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F1014
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1014:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110

loc_4F1024:
mov	esp, ebp
pop	ebp
retn	4
sub_4F0F70 endp

align 10h


; Attributes: bp-based frame

sub_4F1030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158092C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158181C
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_4F105D
mov	eax, [ebp+var_4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4F105D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4F1030 endp

align 10h


; Attributes: bp-based frame

sub_4F1070 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8A=	byte ptr -8Ah
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	byte ptr -80h
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_34=	byte ptr -34h
var_28=	dword ptr -28h
var_1C=	byte ptr -1Ch
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F10A5
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
push	edx
push	offset aFallspeedbuffb ; "FallSpeedBuffBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F10A5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F10BA
mov	eax, 1
jmp	loc_4F11DE

loc_4F10BA:
lea	eax, [ebp+var_89]
push	eax
lea	ecx, [ebp+var_1C]
call	sub_489C40
mov	[ebp+var_C], 0
mov	cl, [ebp+var_8A]
mov	[ebp+var_8], cl
call	nullsub_1
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_9C]
call	sub_F79E10
lea	ecx, [ebp+var_81]
call	sub_401EF0
push	eax
push	offset aPercent_slowed ; "percent_slowed"
lea	ecx, [ebp+var_80]
call	sub_407810
lea	eax, [ebp+var_80]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_4]
lea	ecx, [ebp+var_80]
call	sub_407E50
lea	ecx, [ebp+var_81]
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_94], eax
mov	ecx, [edx+4]
mov	[ebp+var_90], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_58]
call	sub_401100
mov	[ebp+var_58], offset off_1558464
mov	edx, [ebp+var_94]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_4C], eax
lea	ecx, [ebp+var_48]
call	sub_DC0A70
movss	xmm0, [ebp+var_4]
movss	[ebp+var_28], xmm0
lea	ecx, [ebp+var_34]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_98]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F11B1
lea	eax, [ebp+var_58]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F11B1:
mov	[ebp+var_88], 1
lea	ecx, [ebp+var_48]
call	sub_4087D0
lea	ecx, [ebp+var_58]
call	sub_401110
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_88]

loc_4F11DE:
mov	esp, ebp
pop	ebp
retn	8
sub_4F1070 endp

align 10h


; Attributes: bp-based frame

sub_4F11F0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
mov	edx, [eax+4]
mov	[ebp+var_3C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_40]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DC0A70
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_8], xmm0
lea	edx, [ebp+var_14]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_44]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F126D
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F126D:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	4
sub_4F11F0 endp

align 10h


; Attributes: bp-based frame

sub_4F1290 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F12BC
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
push	edx
push	offset aShieldbehavior ; "ShieldBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F12BC:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F12D1
mov	eax, 1
jmp	loc_4F1356

loc_4F12D1:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
mov	edx, [eax+4]
mov	[ebp+var_40], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_44]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DC0700
mov	[ebp+var_8], 1
lea	edx, [ebp+var_14]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_48]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F133C
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F133C:
mov	[ebp+var_3C], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	eax, [ebp+var_3C]

loc_4F1356:
mov	esp, ebp
pop	ebp
retn	8
sub_4F1290 endp

align 10h


; Attributes: bp-based frame

sub_4F1360 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
mov	edx, [eax+4]
mov	[ebp+var_3C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_40]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DC0700
mov	[ebp+var_8], 0
lea	edx, [ebp+var_14]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_44]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F13D4
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F13D4:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	4
sub_4F1360 endp

align 10h


; Attributes: bp-based frame

sub_4F13F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15818A0
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4F141F
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4F141F:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4F13F0 endp

align 10h


; Attributes: bp-based frame

sub_4F1430 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BE=	byte ptr -0BEh
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	byte ptr -0B0h
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_64=	byte ptr -64h
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_18=	byte ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F1465
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+4]
push	edx
push	offset aRepairarmorbeh ; "RepairArmorBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F1465:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F147A
mov	eax, 1
jmp	loc_4F16FA

loc_4F147A:
lea	eax, [ebp+var_BD]
push	eax
lea	ecx, [ebp+var_BE]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_DC]
call	sub_F79E10
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_C8], ecx
mov	edx, [eax+14h]
mov	[ebp+var_C4], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558464
mov	eax, [ebp+var_C8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_C4]
mov	[ebp+var_44], ecx
lea	ecx, [ebp+var_40]
call	sub_DDD7B0
lea	edx, [ebp+var_2C]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_CC]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F1521
lea	ecx, [ebp+var_50]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1521:
movzx	eax, [ebp+var_20]
test	eax, eax
jnz	loc_4F16CD
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_D4], edx
mov	eax, [ecx+14h]
mov	[ebp+var_D0], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_88]
call	sub_401100
mov	[ebp+var_88], offset off_1558464
mov	ecx, [ebp+var_D4]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_D0]
mov	[ebp+var_7C], edx
lea	ecx, [ebp+var_78]
call	sub_DD6450
lea	ecx, [ebp+var_B1]
call	sub_401EF0
push	eax
push	offset aArmor	; "armor"
lea	ecx, [ebp+var_B0]
call	sub_407810
lea	eax, [ebp+var_B0]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_58], eax
lea	ecx, [ebp+var_B0]
call	sub_407E50
lea	ecx, [ebp+var_B1]
call	nullsub_1
lea	edx, [ebp+var_64]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D8]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_D8]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F1600
lea	ecx, [ebp+var_88]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1600:
mov	eax, [ebp+var_DC]
cmp	dword ptr [eax+8], 0
jz	short loc_4F168B
push	ecx
fld	ds:flt_1513C00
fstp	[esp+0E0h+var_E0]
push	offset aCast	; "cast"
mov	ecx, [ebp+var_DC]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
call	sub_F81B80
add	esp, 1Ch
fld	ds:flt_1513C04
fstp	[esp+0E0h+var_E0]
push	offset aOnhit	; "onhit"
mov	ecx, [ebp+var_DC]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
call	sub_F81B80
add	esp, 20h

loc_4F168B:
mov	[ebp+var_B8], 1
lea	ecx, [ebp+var_78]
call	sub_4087D0
lea	ecx, [ebp+var_88]
call	sub_401110
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_B8]
jmp	short loc_4F16FA

loc_4F16CD:
mov	[ebp+var_BC], 0
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_BC]

loc_4F16FA:
mov	esp, ebp
pop	ebp
retn	8
sub_4F1430 endp



; Attributes: bp-based frame

sub_4F1700 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_7C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_78], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_7C]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_78]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DD6640
lea	edx, [ebp+var_14]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_80]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F1777
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1777:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_88], ecx
mov	edx, [eax+14h]
mov	[ebp+var_84], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	eax, [ebp+var_88]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_64], ecx
lea	ecx, [ebp+var_60]
call	sub_DD64D0
lea	edx, [ebp+var_4C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_8C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F17F4
lea	ecx, [ebp+var_70]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F17F4:
mov	eax, [ebp+var_8]
xor	ecx, ecx
cmp	eax, [ebp+var_40]
setl	cl
mov	[ebp+var_71], cl
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	al, [ebp+var_71]
mov	esp, ebp
pop	ebp
retn	4
sub_4F1700 endp

align 10h


; Attributes: bp-based frame

sub_4F1830 proc	near

var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_16E= byte ptr -16Eh
var_16D= byte ptr -16Dh
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_161= byte ptr -161h
var_160= dword ptr -160h
var_135= byte ptr -135h
var_134= dword ptr -134h
var_109= byte ptr -109h
var_108= dword ptr -108h
var_E0=	dword ptr -0E0h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_BC=	byte ptr -0BCh
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	byte ptr -90h
var_7C=	byte ptr -7Ch
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_3C=	byte ptr -3Ch
var_2E=	byte ptr -2Eh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1A8h
mov	[ebp+var_198], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F1865
mov	ecx, [ebp+var_198]
mov	edx, [ecx+4]
push	edx
push	offset aSpeedbehaviorD ; "SpeedBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F1865:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F187A
mov	eax, 1
jmp	loc_4F1D24

loc_4F187A:
lea	eax, [ebp+var_16D]
push	eax
lea	ecx, [ebp+var_16E]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_198]
call	sub_F79E10
mov	[ebp+var_19], 0
lea	ecx, [ebp+var_109]
call	sub_401EF0
push	eax
push	offset aAffects_caster ; "affects_caster"
lea	ecx, [ebp+var_108]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1ACh+var_1AC]
lea	eax, [ebp+var_108]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F18F7
mov	[ebp+var_19C], 1
jmp	short loc_4F1901

loc_4F18F7:
mov	[ebp+var_19C], 0

loc_4F1901:
mov	dl, byte ptr [ebp+var_19C]
mov	[ebp+var_1A], dl
lea	ecx, [ebp+var_108]
call	sub_407E50
lea	ecx, [ebp+var_109]
call	nullsub_1
lea	ecx, [ebp+var_135]
call	sub_401EF0
push	eax
push	offset aAttack_speed ; "attack_speed"
lea	ecx, [ebp+var_134]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1ACh+var_1AC]
lea	eax, [ebp+var_134]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+1ACh+var_1AC]
call	sub_486480
add	esp, 4
call	__ftol2_sse
mov	edx, [ebp+var_198]
mov	[edx+40h], eax
lea	ecx, [ebp+var_134]
call	sub_407E50
lea	ecx, [ebp+var_135]
call	nullsub_1
lea	ecx, [ebp+var_161]
call	sub_401EF0
push	eax
push	offset aRun_speed ; "run_speed"
lea	ecx, [ebp+var_160]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1ACh+var_1AC]
lea	eax, [ebp+var_160]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+1ACh+var_1AC]
call	sub_486480
add	esp, 4
call	__ftol2_sse
mov	edx, [ebp+var_198]
mov	[edx+44h], eax
lea	ecx, [ebp+var_160]
call	sub_407E50
lea	ecx, [ebp+var_161]
call	nullsub_1
mov	eax, [ebp+var_198]
cmp	dword ptr [eax+44h], 3E8h
ja	short loc_4F1A03
mov	ecx, [ebp+var_198]
cmp	dword ptr [ecx+44h], 0
jge	short loc_4F1A44

loc_4F1A03:
mov	edx, [ebp+var_198]
mov	eax, [edx+44h]
push	eax		; char
push	offset aSpeedBehaviorW ; "Speed	Behavior with invalid value %d"
push	2		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h
mov	[ebp+var_168], 1
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_168]
jmp	loc_4F1D24

loc_4F1A44:
movzx	ecx, [ebp+var_1A]
test	ecx, ecx
jz	short loc_4F1A62
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_1A4], eax
mov	ecx, [edx+4]
mov	[ebp+var_1A0], ecx
jmp	short loc_4F1A77

loc_4F1A62:
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_1A4], eax
mov	ecx, [edx+14h]
mov	[ebp+var_1A0], ecx

loc_4F1A77:
mov	edx, [ebp+var_198]
mov	eax, [ebp+var_1A4]
mov	[edx+38h], eax
mov	ecx, [ebp+var_1A0]
mov	[edx+3Ch], ecx
mov	edx, [ebp+var_198]
mov	[ebp+var_1A8], edx
mov	eax, [ebp+var_1A8]
mov	ecx, [ebp+var_1A8]
mov	edx, [eax+38h]
or	edx, [ecx+3Ch]
jz	loc_4F1D07
mov	eax, [ebp+var_198]
mov	ecx, [eax+38h]
mov	[ebp+var_178], ecx
mov	edx, [eax+3Ch]
mov	[ebp+var_174], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_60]
call	sub_401100
mov	[ebp+var_60], offset off_1558450
mov	eax, [ebp+var_178]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_174]
mov	[ebp+var_54], ecx
lea	ecx, [ebp+var_50]
call	sub_D8EEB0
lea	edx, [ebp+var_3C]
mov	[ebp+var_17C], edx
mov	eax, [ebp+var_17C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_17C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F1B33
lea	ecx, [ebp+var_60]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1B33:
movzx	eax, [ebp+var_2E]
test	eax, eax
jnz	loc_4F1CF7
mov	ecx, [ebp+var_198]
cmp	dword ptr [ecx+40h], 0
jz	loc_4F1C15
mov	edx, [ebp+var_198]
mov	eax, [edx+38h]
mov	[ebp+var_184], eax
mov	ecx, [edx+3Ch]
mov	[ebp+var_180], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_A0]
call	sub_401100
mov	[ebp+var_A0], offset off_1558450
mov	edx, [ebp+var_184]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_180]
mov	[ebp+var_94], eax
lea	ecx, [ebp+var_90]
call	sub_DBF990
mov	ecx, [ebp+var_198]
mov	edx, [ecx+40h]
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_68], ecx
mov	edx, [eax+4]
mov	[ebp+var_64], edx
lea	eax, [ebp+var_7C]
mov	[ebp+var_188], eax
mov	ecx, [ebp+var_188]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_188]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F1BFB
lea	edx, [ebp+var_A0]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1BFB:
mov	[ebp+var_19], 1
lea	ecx, [ebp+var_90]
call	sub_4087D0
lea	ecx, [ebp+var_A0]
call	sub_401110

loc_4F1C15:
mov	ecx, [ebp+var_198]
cmp	dword ptr [ecx+44h], 0
jz	loc_4F1CF7
mov	edx, [ebp+var_198]
mov	eax, [edx+38h]
mov	[ebp+var_190], eax
mov	ecx, [edx+3Ch]
mov	[ebp+var_18C], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_E0]
call	sub_401100
mov	[ebp+var_E0], offset off_1558450
mov	edx, [ebp+var_190]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_18C]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_D0]
call	sub_D8BC80
mov	ecx, [ebp+var_198]
mov	edx, [ecx+44h]
mov	[ebp+var_A8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_B0], ecx
mov	edx, [eax+4]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_BC]
mov	[ebp+var_194], eax
mov	ecx, [ebp+var_194]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_194]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F1CDD
lea	edx, [ebp+var_E0]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1CDD:
mov	[ebp+var_19], 1
lea	ecx, [ebp+var_D0]
call	sub_4087D0
lea	ecx, [ebp+var_E0]
call	sub_401110

loc_4F1CF7:
lea	ecx, [ebp+var_50]
call	sub_4087D0
lea	ecx, [ebp+var_60]
call	sub_401110

loc_4F1D07:
movzx	ecx, [ebp+var_19]
mov	[ebp+var_16C], ecx
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_16C]

loc_4F1D24:
mov	esp, ebp
pop	ebp
retn	8
sub_4F1830 endp

align 10h


; Attributes: bp-based frame

sub_4F1D30 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_54=	byte ptr -54h
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_94], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F1D5B
push	offset aSpeedbehaviorU ; "SpeedBehavior	Uncast"
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 8

loc_4F1D5B:
mov	edx, [ebp+var_94]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_98]
mov	edx, [eax+38h]
or	edx, [ecx+3Ch]
jz	loc_4F1ECD
mov	eax, [ebp+var_94]
cmp	dword ptr [eax+40h], 0
jz	loc_4F1E21
mov	ecx, [ebp+var_94]
mov	edx, [ecx+38h]
mov	[ebp+var_80], edx
mov	eax, [ecx+3Ch]
mov	[ebp+var_7C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_40]
call	sub_401100
mov	[ebp+var_40], offset off_1558450
mov	ecx, [ebp+var_80]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_34], edx
lea	ecx, [ebp+var_30]
call	sub_DBF990
mov	eax, [ebp+var_94]
mov	ecx, [eax+40h]
neg	ecx
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_1C]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_84]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F1E11
lea	ecx, [ebp+var_40]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1E11:
lea	ecx, [ebp+var_30]
call	sub_4087D0
lea	ecx, [ebp+var_40]
call	sub_401110

loc_4F1E21:
mov	eax, [ebp+var_94]
cmp	dword ptr [eax+44h], 0
jz	loc_4F1ECD
mov	ecx, [ebp+var_94]
mov	edx, [ecx+38h]
mov	[ebp+var_8C], edx
mov	eax, [ecx+3Ch]
mov	[ebp+var_88], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_78]
call	sub_401100
mov	[ebp+var_78], offset off_1558464
mov	ecx, [ebp+var_8C]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_88]
mov	[ebp+var_6C], edx
lea	ecx, [ebp+var_68]
call	sub_D8BBE0
mov	eax, [ebp+var_94]
mov	ecx, [eax+44h]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_90]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F1EBD
lea	ecx, [ebp+var_78]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F1EBD:
lea	ecx, [ebp+var_68]
call	sub_4087D0
lea	ecx, [ebp+var_78]
call	sub_401110

loc_4F1ECD:
mov	esp, ebp
pop	ebp
retn	4
sub_4F1D30 endp

align 10h


; Attributes: bp-based frame

sub_4F1EE0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_15818A0
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax+8], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 0Ch
call	sub_403400
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_1581518
mov	ecx, [ebp+var_20]
add	ecx, 34h
mov	[ebp+var_1C], ecx
xor	edx, edx
mov	[ebp+var_C], edx
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	[edx+4], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ecx+4], eax
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], offset	off_1581518
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4F1EE0 endp

align 10h


; Attributes: bp-based frame

sub_4F1F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F90930
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4F1F93
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4F1F93:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4F1F70 endp

align 10h


; Attributes: bp-based frame

sub_4F1FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F1FCA
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
push	offset aSpawnbehaviorD ; "SpawnBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F1FCA:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F1FDC
mov	eax, 1
jmp	short loc_4F1FE1

loc_4F1FDC:
mov	eax, 1

loc_4F1FE1:
mov	esp, ebp
pop	ebp
retn	8
sub_4F1FA0 endp

align 10h


; Attributes: bp-based frame

sub_4F1FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 39h
mov	esp, ebp
pop	ebp
retn
sub_4F1FF0 endp



; Attributes: bp-based frame

sub_4F2000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F202A
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
push	offset aSpawnquickbuil ; "SpawnQuickbuildBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F202A:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F203C
mov	eax, 1
jmp	short loc_4F2041

loc_4F203C:
mov	eax, 1

loc_4F2041:
mov	esp, ebp
pop	ebp
retn	8
sub_4F2000 endp

align 10h


; Attributes: bp-based frame

sub_4F2050 proc	near

var_730= dword ptr -730h
var_72C= dword ptr -72Ch
var_728= qword ptr -728h
var_720= dword ptr -720h
var_719= byte ptr -719h
var_718= dword ptr -718h
var_714= qword ptr -714h
var_70C= byte ptr -70Ch
var_70B= byte ptr -70Bh
var_70A= byte ptr -70Ah
var_709= byte ptr -709h
var_708= dword ptr -708h
var_700= dword ptr -700h
var_6FC= dword ptr -6FCh
var_6EC= dword ptr -6ECh
var_6E8= dword ptr -6E8h
var_6E4= dword ptr -6E4h
var_6E0= dword ptr -6E0h
var_6DC= dword ptr -6DCh
var_6D8= dword ptr -6D8h
var_6D4= dword ptr -6D4h
var_6D0= dword ptr -6D0h
var_6C4= dword ptr -6C4h
var_6C0= dword ptr -6C0h
var_6BC= dword ptr -6BCh
var_6B8= byte ptr -6B8h
var_6B4= byte ptr -6B4h
var_6B0= dword ptr -6B0h
var_6A8= dword ptr -6A8h
var_6A4= dword ptr -6A4h
var_6A0= dword ptr -6A0h
var_69C= dword ptr -69Ch
var_698= dword ptr -698h
var_694= dword ptr -694h
var_690= dword ptr -690h
var_68C= dword ptr -68Ch
var_688= dword ptr -688h
var_684= byte ptr -684h
var_674= dword ptr -674h
var_670= dword ptr -670h
var_66C= dword ptr -66Ch
var_668= dword ptr -668h
var_664= dword ptr -664h
var_660= dword ptr -660h
var_65C= dword ptr -65Ch
var_658= dword ptr -658h
var_654= dword ptr -654h
var_650= dword ptr -650h
var_64C= dword ptr -64Ch
var_648= dword ptr -648h
var_644= dword ptr -644h
var_640= dword ptr -640h
var_63C= dword ptr -63Ch
var_636= byte ptr -636h
var_635= byte ptr -635h
var_634= dword ptr -634h
var_630= dword ptr -630h
var_62C= dword ptr -62Ch
var_628= dword ptr -628h
var_622= byte ptr -622h
var_621= byte ptr -621h
var_620= dword ptr -620h
var_61C= dword ptr -61Ch
var_618= dword ptr -618h
var_614= dword ptr -614h
var_610= dword ptr -610h
var_608= byte ptr -608h
var_5FC= byte ptr -5FCh
var_5F0= byte ptr -5F0h
var_5E4= dword ptr -5E4h
var_5E0= byte ptr -5E0h
var_5DC= dword ptr -5DCh
var_5D4= byte ptr -5D4h
var_5B4= dword ptr -5B4h
var_5AC= byte ptr -5ACh
var_594= dword ptr -594h
var_58C= byte ptr -58Ch
var_57D= byte ptr -57Dh
var_57C= dword ptr -57Ch
var_551= byte ptr -551h
var_550= dword ptr -550h
var_525= byte ptr -525h
var_524= dword ptr -524h
var_4F9= byte ptr -4F9h
var_4F8= dword ptr -4F8h
var_4CD= byte ptr -4CDh
var_4CC= dword ptr -4CCh
var_4A1= byte ptr -4A1h
var_4A0= dword ptr -4A0h
var_475= byte ptr -475h
var_474= dword ptr -474h
var_449= byte ptr -449h
var_448= dword ptr -448h
var_41D= byte ptr -41Dh
var_41C= dword ptr -41Ch
var_3F4= byte ptr -3F4h
var_3EC= dword ptr -3ECh
var_3E8= dword ptr -3E8h
var_3E4= dword ptr -3E4h
var_3E0= dword ptr -3E0h
var_3DC= dword ptr -3DCh
var_3D8= byte ptr -3D8h
var_3D5= byte ptr -3D5h
var_3CC= dword ptr -3CCh
var_3C8= dword ptr -3C8h
var_3C4= dword ptr -3C4h
var_3C0= dword ptr -3C0h
var_3BC= dword ptr -3BCh
var_3B8= dword ptr -3B8h
var_3B4= dword ptr -3B4h
var_360= byte ptr -360h
var_34C= dword ptr -34Ch
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= byte ptr -334h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= byte ptr -314h
var_300= byte ptr -300h
var_2F4= dword ptr -2F4h
var_2E8= dword ptr -2E8h
var_2E4= byte ptr -2E4h
var_2C0= byte ptr -2C0h
var_2B4= dword ptr -2B4h
var_2AC= dword ptr -2ACh
var_2A4= dword ptr -2A4h
var_29C= qword ptr -29Ch
var_294= byte ptr -294h
var_280= byte ptr -280h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_260= byte ptr -260h
var_254= byte ptr -254h
var_230= byte ptr -230h
var_224= byte ptr -224h
var_220= dword ptr -220h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= byte ptr -1FCh
var_1E8= byte ptr -1E8h
var_1DC= dword ptr -1DCh
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= byte ptr -1C0h
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_19C= byte ptr -19Ch
var_194= dword ptr -194h
var_184= dword ptr -184h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= byte ptr -174h
var_160= byte ptr -160h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= byte ptr -130h
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_10C= byte ptr -10Ch
var_104= dword ptr -104h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	qword ptr -0E4h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	byte ptr -0CCh
var_BC=	dword ptr -0BCh
var_B4=	byte ptr -0B4h
var_90=	byte ptr -90h
var_84=	byte ptr -84h
var_74=	byte ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4F2050
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 714h
mov	[ebp+var_708], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F209A
mov	ecx, [ebp+var_708]
mov	edx, [ecx+4]
push	edx
push	offset aLaybrickbehavi ; "LayBrickBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F209A:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F20AF
mov	eax, 1
jmp	loc_4F339B

loc_4F20AF:
lea	eax, [ebp+var_621]
push	eax
lea	ecx, [ebp+var_622]
push	ecx
lea	ecx, [ebp+var_30]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_708]
call	sub_F79E10
lea	ecx, [ebp+var_41D]
call	sub_401EF0
push	eax
push	offset aTemplateid ; "templateID"
lea	ecx, [ebp+var_41C]
call	sub_407810
push	ecx		; float
fld	ds:dword_15439C8
fstp	dword ptr [esp+724h+var_728+4]
lea	eax, [ebp+var_41C]
push	eax		; int
lea	ecx, [ebp+var_30]
push	ecx		; int
call	sub_F5FD20
add	esp, 8
fstp	dword ptr [esp+724h+var_728+4]
call	sub_486480
add	esp, 4
call	__ftol2_sse
mov	[ebp+var_34], eax
lea	ecx, [ebp+var_41C]
call	sub_407E50
lea	ecx, [ebp+var_41D]
call	nullsub_1
lea	ecx, [ebp+var_449]
call	sub_401EF0
push	eax
push	offset aDistance ; "distance"
lea	ecx, [ebp+var_448]
call	sub_407810
push	ecx		; float
fldz
fstp	dword ptr [esp+724h+var_728+4]
lea	edx, [ebp+var_448]
push	edx		; int
lea	eax, [ebp+var_30]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_18]
lea	ecx, [ebp+var_448]
call	sub_407E50
lea	ecx, [ebp+var_449]
call	nullsub_1
lea	ecx, [ebp+var_475]
call	sub_401EF0
push	eax
push	offset aForcestack ; "forcestack"
lea	ecx, [ebp+var_474]
call	sub_407810
push	ecx		; float
fldz
fstp	dword ptr [esp+724h+var_728+4]
lea	ecx, [ebp+var_474]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4F21D5
mov	[ebp+var_709], 1
jmp	short loc_4F21DC

loc_4F21D5:
mov	[ebp+var_709], 0

loc_4F21DC:
mov	al, [ebp+var_709]
mov	[ebp+var_3A], al
lea	ecx, [ebp+var_474]
call	sub_407E50
lea	ecx, [ebp+var_475]
call	nullsub_1
lea	ecx, [ebp+var_4A1]
call	sub_401EF0
push	eax
push	offset aForcelay ; "forcelay"
lea	ecx, [ebp+var_4A0]
call	sub_407810
push	ecx		; float
fldz
fstp	dword ptr [esp+724h+var_728+4]
lea	ecx, [ebp+var_4A0]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4F2247
mov	[ebp+var_70A], 1
jmp	short loc_4F224E

loc_4F2247:
mov	[ebp+var_70A], 0

loc_4F224E:
mov	al, [ebp+var_70A]
mov	[ebp+var_39], al
lea	ecx, [ebp+var_4A0]
call	sub_407E50
lea	ecx, [ebp+var_4A1]
call	nullsub_1
lea	ecx, [ebp+var_4CD]
call	sub_401EF0
push	eax
push	offset aForceflat ; "forceflat"
lea	ecx, [ebp+var_4CC]
call	sub_407810
push	ecx		; float
fldz
fstp	dword ptr [esp+724h+var_728+4]
lea	ecx, [ebp+var_4CC]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4F22B9
mov	[ebp+var_70B], 1
jmp	short loc_4F22C0

loc_4F22B9:
mov	[ebp+var_70B], 0

loc_4F22C0:
mov	al, [ebp+var_70B]
mov	[ebp+var_41], al
lea	ecx, [ebp+var_4CC]
call	sub_407E50
lea	ecx, [ebp+var_4CD]
call	nullsub_1
lea	ecx, [ebp+var_4F9]
call	sub_401EF0
push	eax
push	offset aMaxbricks ; "maxbricks"
lea	ecx, [ebp+var_4F8]
call	sub_407810
push	ecx		; float
fld	ds:flt_1573A78
fstp	dword ptr [esp+724h+var_728+4]
lea	ecx, [ebp+var_4F8]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_40]
lea	ecx, [ebp+var_4F8]
call	sub_407E50
lea	ecx, [ebp+var_4F9]
call	nullsub_1
lea	ecx, [ebp+var_525]
call	sub_401EF0
push	eax
push	offset aOffset_forward ; "offset_forward"
lea	ecx, [ebp+var_524]
call	sub_407810
push	ecx		; float
fld	ds:flt_15FDAB0
fstp	dword ptr [esp+724h+var_728+4]
lea	eax, [ebp+var_524]
push	eax		; int
lea	ecx, [ebp+var_30]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_38]
lea	ecx, [ebp+var_524]
call	sub_407E50
lea	ecx, [ebp+var_525]
call	nullsub_1
lea	ecx, [ebp+var_551]
call	sub_401EF0
push	eax
push	offset aOffset_up ; "offset_up"
lea	ecx, [ebp+var_550]
call	sub_407810
push	ecx		; float
fld	ds:flt_1479FAC
fstp	dword ptr [esp+724h+var_728+4]
lea	edx, [ebp+var_550]
push	edx		; int
lea	eax, [ebp+var_30]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_14]
lea	ecx, [ebp+var_550]
call	sub_407E50
lea	ecx, [ebp+var_551]
call	nullsub_1
lea	ecx, [ebp+var_57D]
call	sub_401EF0
push	eax
push	offset aDuration ; "duration"
lea	ecx, [ebp+var_57C]
call	sub_407810
push	ecx		; float
fld	ds:dword_1577A6C
fstp	dword ptr [esp+724h+var_728+4]
lea	ecx, [ebp+var_57C]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_10]
lea	ecx, [ebp+var_57C]
call	sub_407E50
lea	ecx, [ebp+var_57D]
call	nullsub_1
cmp	[ebp+var_34], 0FFFFFFFFh
jz	loc_4F337E
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [eax+8]
push	edx
lea	ecx, [ebp+var_B4]
call	sub_42D660
lea	eax, [ebp+var_90]
mov	[ebp+var_628], eax
mov	ecx, [ebp+var_628]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_628]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F2487
lea	edx, [ebp+var_B4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F2487:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+var_630], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_62C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_184]
call	sub_401100
mov	[ebp+var_184], offset off_1558450
mov	ecx, [ebp+var_630]
mov	[ebp+var_17C], ecx
mov	edx, [ebp+var_62C]
mov	[ebp+var_178], edx
lea	ecx, [ebp+var_174]
call	sub_DE0C00
lea	eax, [ebp+var_160]
mov	[ebp+var_634], eax
mov	ecx, [ebp+var_634]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_634]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F2519
lea	edx, [ebp+var_184]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F2519:		; float
push	ecx
fld	[ebp+var_14C]
fstp	dword ptr [esp+724h+var_728+4]
push	ecx		; float
fld	[ebp+var_150]
fstp	dword ptr [esp+728h+var_728]
push	ecx		; float
fld	[ebp+var_154]
fstp	[esp+72Ch+var_72C]
push	ecx		; float
fld	[ebp+var_148]
fstp	[esp+730h+var_730]
lea	eax, [ebp+var_F4]
call	sub_116E940
lea	ecx, [ebp+var_F4]
push	ecx
lea	edx, [ebp+var_140]
push	edx
call	sub_10E3070
add	esp, 8
push	ecx		; float
fld	[ebp+var_18]
fstp	dword ptr [esp+724h+var_728+4]
lea	ecx, [ebp+var_140]
lea	eax, [ebp+var_58C]
call	sub_40F590
add	esp, 4
lea	ecx, [ebp+var_84]
push	ecx
mov	ecx, eax
lea	eax, [ebp+var_1CC]
call	sub_40F7F0
mov	edx, [ebp+var_1CC]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_1C8]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_1C4]
mov	[ebp+var_D0], ecx
lea	ecx, [ebp+var_74]
call	sub_45B0E0
movss	xmm0, [ebp+var_D8]
movss	[ebp+var_68], xmm0
movss	xmm0, [ebp+var_D0]
movss	[ebp+var_60], xmm0
mov	[ebp+var_5C], 1
movss	xmm0, [ebp+var_D4]
movss	[ebp+var_64], xmm0
lea	edx, [ebp+var_74]
push	edx
push	5
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movss	xmm0, [ebp+var_64]
addss	xmm0, ds:dword_156F414
comiss	xmm0, [ebp+var_D4]
jbe	short loc_4F2625
movss	xmm0, [ebp+var_64]
addss	xmm0, ds:dword_156F414
movss	[ebp+var_D4], xmm0

loc_4F2625:
movss	xmm0, [ebp+var_D4]
movss	[ebp+var_48], xmm0
movss	xmm0, ds:dword_14EF16C
movss	[ebp+var_134], xmm0
mov	dword ptr [ebp+var_E4],	0
mov	dword ptr [ebp+var_E4+4], 0
lea	eax, [ebp+var_635]
push	eax
lea	ecx, [ebp+var_636]
push	ecx
lea	ecx, [ebp+var_CC]
call	sub_489470
lea	ecx, [ebp+var_130]
call	sub_4E3690
mov	edx, [ebp+var_1CC]
mov	[ebp+var_128], edx
mov	eax, [ebp+var_1C8]
mov	[ebp+var_124], eax
mov	ecx, [ebp+var_1C4]
mov	[ebp+var_120], ecx
movss	xmm0, [ebp+var_40]
mulss	xmm0, [ebp+var_38]
addss	xmm0, [ebp+var_134]
movss	[ebp+var_11C], xmm0
lea	edx, [ebp+var_130]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_104]
mov	[ebp+var_63C], eax
mov	ecx, [ebp+var_63C]
lea	eax, [ebp+var_1D0]
call	sub_4046E0
jmp	short loc_4F2701

loc_4F26EC:
mov	ecx, [ebp+var_1D0]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1D0], eax

loc_4F2701:
lea	ecx, [ebp+var_10C]
lea	eax, [ebp+var_594]
call	sub_4046E0
lea	edx, [ebp+var_644]
mov	[ebp+var_640], edx
mov	ecx, [ebp+var_594]
mov	eax, [ebp+var_640]
call	sub_4046E0
mov	eax, [ebp+var_1D0]
xor	ecx, ecx
cmp	eax, [ebp+var_644]
setnz	cl
mov	[ebp+var_70C], cl
movzx	edx, [ebp+var_70C]
test	edx, edx
jz	loc_4F2AFC
mov	eax, [ebp+var_1D0]
mov	ecx, [eax+10h]
mov	[ebp+var_64C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_648], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_20C]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_20C], offset off_1573D4C
mov	eax, [ebp+var_64C]
mov	[ebp+var_204], eax
mov	ecx, [ebp+var_648]
mov	[ebp+var_200], ecx
lea	ecx, [ebp+var_1FC]
call	sub_DD2310
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_1E8]
mov	[ebp+var_650], edx
mov	eax, [ebp+var_650]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_650]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F27FC
lea	ecx, [ebp+var_20C]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F27FC:
mov	eax, [ebp+var_1DC]
cmp	eax, [ebp+var_34]
jnz	loc_4F2ABB
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_210], xmm0
mov	ecx, [ebp+var_1D0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
lea	ecx, [ebp+var_254]
call	sub_42D660
lea	ecx, [ebp+var_230]
mov	[ebp+var_654], ecx
mov	edx, [ebp+var_654]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_654]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F2873
lea	eax, [ebp+var_254]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F2873:
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	short loc_4F288D
movss	xmm0, [ebp+var_220]
movss	[ebp+var_210], xmm0
jmp	short loc_4F28B6

loc_4F288D:
lea	ecx, [ebp+var_84]
lea	eax, [ebp+var_224]
push	eax
lea	eax, [ebp+var_260]
call	sub_40F4A0
lea	eax, [ebp+var_260]
call	sub_40F5F0
fstp	[ebp+var_210]

loc_4F28B6:
mov	ecx, [ebp+var_1D0]
add	ecx, 10h
mov	[ebp+var_658], ecx
lea	edx, [ebp+var_224]
mov	eax, [edx]
mov	[ebp+var_670], eax
mov	ecx, [edx+4]
mov	[ebp+var_66C], ecx
mov	edx, [edx+8]
mov	[ebp+var_668], edx
mov	eax, [ebp+var_658]
mov	ecx, [eax]
mov	[ebp+var_664], ecx
mov	edx, [eax+4]
mov	[ebp+var_660], edx
lea	eax, [ebp+var_68C]
mov	[ebp+var_65C], eax
mov	ecx, [ebp+var_65C]
mov	edx, [ebp+var_664]
mov	[ecx], edx
mov	eax, [ebp+var_660]
mov	[ecx+4], eax
mov	ecx, [ebp+var_65C]
add	ecx, 8
mov	edx, [ebp+var_670]
mov	[ecx], edx
mov	eax, [ebp+var_66C]
mov	[ecx+4], eax
mov	edx, [ebp+var_668]
mov	[ecx+8], edx
movss	xmm0, [ebp+var_210]
movss	[ebp+var_690], xmm0
movss	xmm0, [ebp+var_690]
movss	[ebp+var_5DC], xmm0
lea	eax, [ebp+var_5D4]
mov	[ebp+var_674], eax
mov	ecx, [ebp+var_674]
mov	edx, [ebp+var_68C]
mov	[ecx], edx
mov	eax, [ebp+var_688]
mov	[ecx+4], eax
lea	ecx, [ebp+var_684]
mov	edx, [ebp+var_674]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
lea	edx, [ebp+var_5DC]
mov	[ebp+var_69C], edx
mov	eax, [ebp+var_69C]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_5B4], xmm0
mov	ecx, [ebp+var_69C]
add	ecx, 8
mov	[ebp+var_698], ecx
lea	edx, [ebp+var_5AC]
mov	[ebp+var_694], edx
mov	eax, [ebp+var_694]
mov	ecx, [ebp+var_698]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_698]
add	edx, 8
mov	eax, [ebp+var_694]
add	eax, 8
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
lea	eax, [ebp+var_5B4]
push	eax
lea	ecx, [ebp+var_5E0]
push	ecx
lea	ecx, [ebp+var_CC]
call	sub_50E070
mov	edx, [ebp+var_BC]
mov	[ebp+var_6A0], edx
mov	eax, [ebp+var_6A0]
mov	dword ptr [ebp+var_714], eax
mov	dword ptr [ebp+var_714+4], 0
fild	[ebp+var_714]
fld	[ebp+var_40]
fsub	ds:dword_1479C54
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_4F2AB0
lea	ecx, [ebp+var_254]
call	sub_4E5560
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_1FC]
mov	[ebp+var_6A4], ecx
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_6A4]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_20C]
call	sub_401110
jmp	short loc_4F2AFC

loc_4F2AB0:
lea	ecx, [ebp+var_254]
call	sub_4E5560

loc_4F2ABB:
mov	[ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
lea	edx, [ebp+var_1FC]
mov	[ebp+var_6A8], edx
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_6A8]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_20C]
call	sub_401110
jmp	loc_4F26EC

loc_4F2AFC:
xor	eax, eax
cmp	[ebp+var_BC], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_4F2B7A
lea	edx, [ebp+var_6B4]
mov	[ebp+var_6B0], edx
lea	ecx, [ebp+var_CC]
mov	eax, [ebp+var_6B0]
call	sub_4046E0
lea	eax, [ebp+var_6B4]
push	eax
lea	ecx, [ebp+var_5E4]
call	sub_4ABD70
mov	ecx, [ebp+var_5E4]
lea	eax, [ebp+var_6B8]
call	sub_4046E0
lea	ecx, [ebp+var_6B8]
call	sub_502300
mov	[ebp+var_6BC], eax
mov	ecx, [ebp+var_6BC]
mov	edx, [ecx]
mov	eax, [edx+18h]
mov	dword ptr [ebp+var_E4],	eax
mov	ecx, [edx+1Ch]
mov	dword ptr [ebp+var_E4+4], ecx

loc_4F2B7A:
mov	edx, dword ptr [ebp+var_E4]
or	edx, dword ptr [ebp+var_E4+4]
jz	loc_4F2DD4
mov	ecx, 138Bh
lea	eax, [ebp+var_2A4]
call	sub_401100
mov	[ebp+var_2A4], offset off_1558450
mov	eax, dword ptr [ebp+var_E4]
mov	dword ptr [ebp+var_29C], eax
mov	ecx, dword ptr [ebp+var_E4+4]
mov	dword ptr [ebp+var_29C+4], ecx
lea	ecx, [ebp+var_294]
call	sub_DE0C00
lea	edx, [ebp+var_280]
mov	[ebp+var_6C0], edx
mov	eax, [ebp+var_6C0]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_6C0]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F2C09
lea	ecx, [ebp+var_2A4]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F2C09:		; float
push	ecx
fld	[ebp+var_26C]
fstp	dword ptr [esp+724h+var_728+4]
push	ecx		; float
fld	[ebp+var_270]
fstp	dword ptr [esp+728h+var_728]
push	ecx		; float
fld	[ebp+var_274]
fstp	[esp+72Ch+var_72C]
push	ecx		; float
fld	[ebp+var_268]
fstp	[esp+730h+var_730]
lea	eax, [ebp+var_F4]
call	sub_418690
mov	eax, dword ptr [ebp+var_E4+4]
push	eax
mov	ecx, dword ptr [ebp+var_E4]
push	ecx
lea	ecx, [ebp+var_2E4]
call	sub_42D660
lea	edx, [ebp+var_2C0]
mov	[ebp+var_6C4], edx
mov	eax, [ebp+var_6C4]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_6C4]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F2C95
lea	ecx, [ebp+var_2E4]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F2C95:
movzx	eax, [ebp+var_3A]
test	eax, eax
jnz	short loc_4F2CF9
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jnz	short loc_4F2D1B
movss	xmm0, [ebp+var_2B4]
subss	xmm0, [ebp+var_1CC]
push	ecx		; float
movss	dword ptr [esp+724h+var_728+4],	xmm0
call	sub_40F4C0
add	esp, 4
movss	xmm0, [ebp+var_2AC]
subss	xmm0, [ebp+var_1C4]
push	ecx		; float
movss	dword ptr [esp+724h+var_728+4],	xmm0
fstp	[ebp+var_718]
call	sub_40F4E0
add	esp, 4
fadd	[ebp+var_718]
fld	ds:flt_15FD94C
fcomip	st, st(1)
fstp	st
jbe	short loc_4F2D1B

loc_4F2CF9:
lea	edx, [ebp+var_2B4]
mov	eax, [edx]
mov	[ebp+var_1CC], eax
mov	ecx, [edx+4]
mov	[ebp+var_1C8], ecx
mov	edx, [edx+8]
mov	[ebp+var_1C4], edx
jmp	short loc_4F2D94

loc_4F2D1B:
lea	eax, [ebp+var_F4]
push	eax
lea	ecx, [ebp+var_5F0]
push	ecx
call	sub_10E3070
add	esp, 8
mov	edx, [eax]
mov	[ebp+var_140], edx
mov	ecx, [eax+4]
mov	[ebp+var_13C], ecx
mov	edx, [eax+8]
mov	[ebp+var_138], edx
push	ecx		; float
fld	[ebp+var_38]
fstp	dword ptr [esp+724h+var_728+4]
lea	ecx, [ebp+var_140]
lea	eax, [ebp+var_5FC]
call	sub_40F590
add	esp, 4
lea	ecx, [ebp+var_2B4]
push	ecx
mov	ecx, eax
lea	eax, [ebp+var_608]
call	sub_40F7F0
mov	edx, [eax]
mov	[ebp+var_1CC], edx
mov	ecx, [eax+4]
mov	[ebp+var_1C8], ecx
mov	edx, [eax+8]
mov	[ebp+var_1C4], edx

loc_4F2D94:
movzx	eax, [ebp+var_41]
test	eax, eax
jnz	short loc_4F2DB1
movss	xmm0, [ebp+var_1C8]
addss	xmm0, [ebp+var_14]
movss	[ebp+var_1C8], xmm0

loc_4F2DB1:
lea	ecx, [ebp+var_2E4]
call	sub_4E5560
lea	ecx, [ebp+var_294]
call	sub_4087D0
lea	ecx, [ebp+var_2A4]
call	sub_401110
jmp	short loc_4F2DE1

loc_4F2DD4:
movss	xmm0, [ebp+var_48]
movss	[ebp+var_1C8], xmm0

loc_4F2DE1:
lea	ecx, [ebp+var_1C0]
call	sub_4E3690
mov	[ebp+var_1A8], 1
mov	ecx, [ebp+var_1CC]
mov	[ebp+var_1B8], ecx
mov	edx, [ebp+var_1C8]
mov	[ebp+var_1B4], edx
mov	eax, [ebp+var_1C4]
mov	[ebp+var_1B0], eax
movss	xmm0, ds:dword_15FCCC0
movss	[ebp+var_1AC], xmm0
lea	ecx, [ebp+var_1C0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	edx, [ebp+var_194]
mov	[ebp+var_6D0], edx
mov	ecx, [ebp+var_6D0]
lea	eax, [ebp+var_2E8]
call	sub_4046E0
jmp	short loc_4F2E73

loc_4F2E5E:
mov	eax, [ebp+var_2E8]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_2E8], eax

loc_4F2E73:
lea	ecx, [ebp+var_19C]
lea	eax, [ebp+var_610]
call	sub_4046E0
lea	ecx, [ebp+var_6D8]
mov	[ebp+var_6D4], ecx
mov	ecx, [ebp+var_610]
mov	eax, [ebp+var_6D4]
call	sub_4046E0
mov	edx, [ebp+var_2E8]
xor	eax, eax
cmp	edx, [ebp+var_6D8]
setnz	al
mov	[ebp+var_719], al
movzx	ecx, [ebp+var_719]
test	ecx, ecx
jz	loc_4F307B
mov	edx, [ebp+var_2E8]
mov	eax, [edx+10h]
mov	[ebp+var_6E0], eax
mov	ecx, [edx+14h]
mov	[ebp+var_6DC], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_324]
call	sub_401100
mov	[ebp+var_4], 8
mov	[ebp+var_324], offset off_1573D4C
mov	edx, [ebp+var_6E0]
mov	[ebp+var_31C], edx
mov	eax, [ebp+var_6DC]
mov	[ebp+var_318], eax
lea	ecx, [ebp+var_314]
call	sub_DD2310
mov	byte ptr [ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_300]
mov	[ebp+var_6E4], ecx
mov	edx, [ebp+var_6E4]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_6E4]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F2F6D
lea	eax, [ebp+var_324]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F2F6D:
mov	edx, [ebp+var_2F4]
cmp	edx, [ebp+var_34]
jnz	loc_4F303A
mov	[ebp+var_614], 0
mov	[ebp+var_4], 0Bh
mov	byte ptr [ebp+var_4], 0Ah
lea	eax, [ebp+var_314]
mov	[ebp+var_6E8], eax
mov	byte ptr [ebp+var_4], 0Ch
mov	byte ptr [ebp+var_4], 0Ah
mov	ecx, [ebp+var_6E8]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_324]
call	sub_401110
lea	ecx, [ebp+var_19C]
call	sub_4DCD30
lea	ecx, [ebp+var_1C0]
call	sub_401110
lea	ecx, [ebp+var_10C]
call	sub_4DCD30
lea	ecx, [ebp+var_130]
call	sub_401110
lea	ecx, [ebp+var_CC]
call	sub_501C30
lea	ecx, [ebp+var_74]
call	sub_456120
lea	ecx, [ebp+var_174]
call	sub_4087D0
lea	ecx, [ebp+var_184]
call	sub_401110
lea	ecx, [ebp+var_B4]
call	sub_4E5560
lea	ecx, [ebp+var_30]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_614]
jmp	loc_4F339B

loc_4F303A:
mov	[ebp+var_4], 0Eh
mov	byte ptr [ebp+var_4], 0Dh
lea	ecx, [ebp+var_314]
mov	[ebp+var_6EC], ecx
mov	byte ptr [ebp+var_4], 0Fh
mov	byte ptr [ebp+var_4], 0Dh
mov	ecx, [ebp+var_6EC]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_324]
call	sub_401110
jmp	loc_4F2E5E

loc_4F307B:
mov	ecx, 139Ch
lea	eax, [ebp+var_34C]
call	sub_401100
mov	[ebp+var_4], 10h
mov	[ebp+var_34C], offset off_155E020
mov	[ebp+var_344], 0
mov	[ebp+var_340], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_344], 1
lea	edx, [ebp+var_34C]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_3F4]
call	sub_433C70
mov	eax, [ebp+var_33C]
mov	[ebp+var_3EC], eax
mov	ecx, [ebp+var_338]
mov	[ebp+var_3E8], ecx
movss	xmm0, [ebp+var_1CC]
movss	[ebp+var_3CC], xmm0
movss	xmm0, [ebp+var_1C8]
movss	[ebp+var_3C8], xmm0
movss	xmm0, [ebp+var_1C4]
movss	[ebp+var_3C4], xmm0
movss	xmm0, [ebp+var_F0]
movss	[ebp+var_3C0], xmm0
movss	xmm0, [ebp+var_EC]
movss	[ebp+var_3BC], xmm0
movss	xmm0, [ebp+var_E8]
movss	[ebp+var_3B8], xmm0
movss	xmm0, [ebp+var_F4]
movss	[ebp+var_3B4], xmm0
mov	edx, [ebp+var_34]
mov	[ebp+var_3DC], edx
mov	[ebp+var_3D8], 0
mov	[ebp+var_3D5], 1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+var_3E4], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_3E0], edx
mov	[ebp+var_360], 1
lea	eax, [ebp+var_3F4]
push	eax
push	1
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_334]
call	sub_49F360
movss	xmm0, [ebp+var_10]
movss	[ebp+var_328], xmm0
push	38h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_618], eax
cmp	[ebp+var_618], 0
jz	short loc_4F3237
mov	ecx, [ebp+var_3EC]
mov	[ebp+var_700], ecx
mov	edx, [ebp+var_3E8]
mov	[ebp+var_6FC], edx
mov	ecx, [ebp+var_618]
call	sub_49F270
mov	eax, [ebp+var_618]
mov	dword ptr [eax], offset	off_1580A10
mov	ecx, [ebp+var_618]
mov	edx, [ebp+var_700]
mov	[ecx+30h], edx
mov	eax, [ebp+var_6FC]
mov	[ecx+34h], eax
mov	ecx, [ebp+var_618]
mov	[ebp+var_720], ecx
jmp	short loc_4F3241

loc_4F3237:
mov	[ebp+var_720], 0

loc_4F3241:
mov	edx, [ebp+var_720]
mov	[ebp+var_32C], edx
lea	eax, [ebp+var_334]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_61C], 1
mov	[ebp+var_4], 11h
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_334]
call	sub_401110
lea	ecx, [ebp+var_3F4]
call	??1strstreambuf@@UAE@XZ_0 ; strstreambuf::~strstreambuf(void)
mov	[ebp+var_4], 12h
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_34C]
call	sub_401110
lea	ecx, [ebp+var_19C]
call	sub_594900
lea	ecx, [ebp+var_1C0]
call	sub_401110
lea	ecx, [ebp+var_10C]
call	sub_594900
lea	ecx, [ebp+var_130]
call	sub_401110
lea	ecx, [ebp+var_CC]
call	sub_501C30
lea	ecx, [ebp+var_74]
call	sub_456120
lea	ecx, [ebp+var_174]
call	sub_4087D0
lea	ecx, [ebp+var_184]
call	sub_401110
lea	ecx, [ebp+var_B4]
call	sub_4E5560
lea	ecx, [ebp+var_30]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_61C]
jmp	short loc_4F339B
lea	ecx, [ebp+var_19C]
call	sub_594900
lea	ecx, [ebp+var_1C0]
call	sub_401110
lea	ecx, [ebp+var_10C]
call	sub_594900
lea	ecx, [ebp+var_130]
call	sub_401110
lea	ecx, [ebp+var_CC]
call	sub_501C30
lea	ecx, [ebp+var_74]
call	sub_456120
lea	ecx, [ebp+var_174]
call	sub_4087D0
lea	ecx, [ebp+var_184]
call	sub_401110
lea	ecx, [ebp+var_B4]
call	sub_4E5560

loc_4F337E:
mov	[ebp+var_620], 0
lea	ecx, [ebp+var_30]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_620]

loc_4F339B:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4F2050 endp

align 10h


; Attributes: bp-based frame

sub_4F33B0 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
call	sub_4E3630
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+30h]
mov	[eax+8], edx
mov	ecx, [ecx+34h]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
push	edx		; int
push	ecx		; float
fld1
fstp	[esp+14h+var_14]
push	4		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_4F33B0 endp

align 10h


; Attributes: bp-based frame

sub_4F3400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1Dh
mov	esp, ebp
pop	ebp
retn
sub_4F3400 endp



; Attributes: bp-based frame

sub_4F3410 proc	near

var_34C= dword ptr -34Ch
var_348= dword ptr -348h
var_344= dword ptr -344h
var_33D= byte ptr -33Dh
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= dword ptr -314h
var_294= dword ptr -294h
var_28E= byte ptr -28Eh
var_28D= byte ptr -28Dh
var_28C= dword ptr -28Ch
var_285= byte ptr -285h
var_284= dword ptr -284h
var_259= byte ptr -259h
var_258= dword ptr -258h
var_22D= byte ptr -22Dh
var_22C= dword ptr -22Ch
var_201= byte ptr -201h
var_200= dword ptr -200h
var_1D5= byte ptr -1D5h
var_1D4= dword ptr -1D4h
var_1A9= byte ptr -1A9h
var_1A8= dword ptr -1A8h
var_17D= byte ptr -17Dh
var_17C= byte ptr -17Ch
var_151= byte ptr -151h
var_150= dword ptr -150h
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
var_12C= byte ptr -12Ch
var_120= dword ptr -120h
var_103= byte ptr -103h
var_100= dword ptr -100h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	byte ptr -0F0h
var_DC=	byte ptr -0DCh
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	byte ptr -0C8h
var_B8=	dword ptr -0B8h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	byte ptr -0A8h
var_94=	byte ptr -94h
var_88=	dword ptr -88h
var_80=	byte ptr -80h
var_5C=	byte ptr -5Ch
var_50=	byte ptr -50h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 348h
mov	[ebp+var_33C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F3445
mov	ecx, [ebp+var_33C]
mov	edx, [ecx+4]
push	edx
push	offset aSwitchbehavior ; "SwitchBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F3445:
lea	ecx, [ebp+var_28D]
push	ecx
lea	edx, [ebp+var_28E]
push	edx
lea	ecx, [ebp+var_30]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_33C]
call	sub_F79E10
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_151]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_594460
lea	ecx, [ebp+var_17D]
call	sub_401EF0
push	eax
push	offset aFaction	; "faction"
lea	ecx, [ebp+var_17C]
call	sub_407810
lea	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_17C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
call	sub_F7A120
add	esp, 0Ch
lea	ecx, [ebp+var_17C]
call	sub_407E50
lea	ecx, [ebp+var_17D]
call	nullsub_1
lea	ecx, [ebp+var_1A9]
call	sub_401EF0
push	eax
push	offset aDistance ; "distance"
lea	ecx, [ebp+var_1A8]
call	sub_407810
push	ecx		; float
fld	ds:dword_15439C8
fstp	[esp+34Ch+var_34C]
lea	edx, [ebp+var_1A8]
push	edx		; int
lea	eax, [ebp+var_30]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_10]
lea	ecx, [ebp+var_1A8]
call	sub_407E50
lea	ecx, [ebp+var_1A9]
call	nullsub_1
lea	ecx, [ebp+var_1D5]
call	sub_401EF0
push	eax
push	offset aIsenemyfaction ; "isEnemyFaction"
lea	ecx, [ebp+var_1D4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+34Ch+var_34C]
lea	ecx, [ebp+var_1D4]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4F356C
mov	[ebp+var_33D], 1
jmp	short loc_4F3573

loc_4F356C:
mov	[ebp+var_33D], 0

loc_4F3573:
mov	al, [ebp+var_33D]
mov	[ebp+var_3D], al
lea	ecx, [ebp+var_1D4]
call	sub_407E50
lea	ecx, [ebp+var_1D5]
call	nullsub_1
lea	ecx, [ebp+var_201]
call	sub_401EF0
push	eax
push	offset aImagination ; "imagination"
lea	ecx, [ebp+var_200]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+34Ch+var_34C]
lea	ecx, [ebp+var_200]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_200]
call	sub_407E50
lea	ecx, [ebp+var_201]
call	nullsub_1
lea	ecx, [ebp+var_22D]
call	sub_401EF0
push	eax
push	offset aTarget_has_buf ; "target_has_buff"
lea	ecx, [ebp+var_22C]
call	sub_407810
push	ecx		; float
fld	ds:dword_15439C8
fstp	[esp+34Ch+var_34C]
lea	eax, [ebp+var_22C]
push	eax		; int
lea	ecx, [ebp+var_30]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_34], eax
lea	ecx, [ebp+var_22C]
call	sub_407E50
lea	ecx, [ebp+var_22D]
call	nullsub_1
lea	ecx, [ebp+var_259]
call	sub_401EF0
push	eax
push	offset aAction_true ; "action_true"
lea	ecx, [ebp+var_258]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+34Ch+var_34C]
lea	edx, [ebp+var_258]
push	edx		; int
lea	eax, [ebp+var_30]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_38], eax
lea	ecx, [ebp+var_258]
call	sub_407E50
lea	ecx, [ebp+var_259]
call	nullsub_1
lea	ecx, [ebp+var_285]
call	sub_401EF0
push	eax
push	offset aAction_false ; "action_false"
lea	ecx, [ebp+var_284]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+34Ch+var_34C]
lea	ecx, [ebp+var_284]
push	ecx		; int
lea	edx, [ebp+var_30]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_284]
call	sub_407E50
lea	ecx, [ebp+var_285]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
lea	ecx, [ebp+var_80]
call	sub_42D660
lea	eax, [ebp+var_5C]
mov	[ebp+var_294], eax
mov	ecx, [ebp+var_294]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_294]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F372E
lea	edx, [ebp+var_80]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F372E:
mov	[ebp+var_3C], 0
movss	xmm0, [ebp+var_10]
comiss	xmm0, ds:dword_15439C8
jbe	loc_4F37C8
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Ch]
test	edx, edx
jz	short loc_4F37A2
push	ecx
fld	[ebp+var_10]
fstp	[esp+34Ch+var_34C]
lea	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
mov	ecx, [ebp+var_33C]
call	sub_4F3BC0
movzx	ecx, al
test	ecx, ecx
jz	short loc_4F378E
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B750
add	esp, 4
jmp	short loc_4F37A0

loc_4F378E:
mov	ecx, [ebp+var_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B7A0
add	esp, 4

loc_4F37A0:
jmp	short loc_4F37C3

loc_4F37A2:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	short loc_4F37BD
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
jmp	short loc_4F37C3

loc_4F37BD:
mov	eax, [ebp+var_C]
mov	[ebp+var_3C], eax

loc_4F37C3:
jmp	loc_4F3B62

loc_4F37C8:
cmp	[ebp+var_8], 0
jle	loc_4F38DD
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_318], edx
mov	eax, [ecx+4]
mov	[ebp+var_314], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_B8]
call	sub_401100
mov	[ebp+var_B8], offset off_1558464
mov	ecx, [ebp+var_318]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_314]
mov	[ebp+var_AC], edx
lea	ecx, [ebp+var_A8]
call	sub_DD6D70
lea	eax, [ebp+var_94]
mov	[ebp+var_31C], eax
mov	ecx, [ebp+var_31C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_31C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F3863
lea	edx, [ebp+var_B8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F3863:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Ch]
test	edx, edx
jz	short loc_4F38A1
mov	eax, [ebp+var_88]
cmp	eax, [ebp+var_8]
jl	short loc_4F388D
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B750
add	esp, 4
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
jmp	short loc_4F389F

loc_4F388D:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B7A0
add	esp, 4
mov	ecx, [ebp+var_C]
mov	[ebp+var_3C], ecx

loc_4F389F:
jmp	short loc_4F38C2

loc_4F38A1:
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B700
add	esp, 4
movzx	eax, al
test	eax, eax
jz	short loc_4F38BC
mov	ecx, [ebp+var_38]
mov	[ebp+var_3C], ecx
jmp	short loc_4F38C2

loc_4F38BC:
mov	edx, [ebp+var_C]
mov	[ebp+var_3C], edx

loc_4F38C2:
lea	ecx, [ebp+var_A8]
call	sub_4087D0
lea	ecx, [ebp+var_B8]
call	sub_401110
jmp	loc_4F3B62

loc_4F38DD:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	loc_4F39D6
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+var_324], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_320], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_100]
call	sub_401100
mov	[ebp+var_100], offset off_155845C
mov	ecx, [ebp+var_324]
mov	[ebp+var_F8], ecx
mov	edx, [ebp+var_320]
mov	[ebp+var_F4], edx
lea	ecx, [ebp+var_F0]
call	sub_DD6EB0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_D0], ecx
mov	edx, [eax+14h]
mov	[ebp+var_CC], edx
lea	eax, [ebp+var_DC]
mov	[ebp+var_328], eax
mov	ecx, [ebp+var_328]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_328]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F3990
lea	edx, [ebp+var_100]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F3990:
movzx	ecx, [ebp+var_C8]
test	ecx, ecx
jz	short loc_4F39AC
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_344], eax
jmp	short loc_4F39BB

loc_4F39AC:
mov	ecx, [ebp+var_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_344], edx

loc_4F39BB:
lea	ecx, [ebp+var_F0]
call	sub_4087D0
lea	ecx, [ebp+var_100]
call	sub_401110
jmp	loc_4F3B62

loc_4F39D6:
cmp	[ebp+var_34], 0
jle	loc_4F3B22
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Ch]
test	ecx, ecx
jz	loc_4F3AED
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_330], eax
mov	ecx, [edx+14h]
mov	[ebp+var_32C], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_150]
call	sub_401100
mov	[ebp+var_150], offset off_1599B30
mov	edx, [ebp+var_330]
mov	[ebp+var_148], edx
mov	eax, [ebp+var_32C]
mov	[ebp+var_144], eax
lea	ecx, [ebp+var_140]
call	sub_E70F60
mov	ecx, [ebp+var_34]
mov	[ebp+var_120], ecx
lea	edx, [ebp+var_12C]
mov	[ebp+var_334], edx
mov	eax, [ebp+var_334]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_334]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F3A8A
lea	ecx, [ebp+var_150]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F3A8A:
movzx	eax, [ebp+var_103]
test	eax, eax
jz	short loc_4F3AA9
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B750
add	esp, 4
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
jmp	short loc_4F3ABB

loc_4F3AA9:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B7A0
add	esp, 4
mov	ecx, [ebp+var_C]
mov	[ebp+var_3C], ecx

loc_4F3ABB:
lea	edx, [ebp+var_140]
mov	[ebp+var_338], edx
mov	ecx, [ebp+var_338]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_338]
call	sub_4087D0
lea	ecx, [ebp+var_150]
call	sub_401110
jmp	short loc_4F3B20

loc_4F3AED:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	short loc_4F3B11
mov	edx, [ebp+var_38]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_348], eax
jmp	short loc_4F3B20

loc_4F3B11:
mov	ecx, [ebp+var_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_348], edx

loc_4F3B20:
jmp	short loc_4F3B62

loc_4F3B22:
mov	eax, [ebp+var_18]
lea	ecx, [ebp+var_18]
xor	edx, edx
cmp	eax, ecx
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_4F3B62
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
call	sub_F5B370
add	esp, 0Ch
movzx	edx, al
test	edx, edx
jz	short loc_4F3B5C
mov	eax, [ebp+var_38]
mov	[ebp+var_3C], eax
jmp	short loc_4F3B62

loc_4F3B5C:
mov	ecx, [ebp+var_C]
mov	[ebp+var_3C], ecx

loc_4F3B62:
cmp	[ebp+var_3C], 0
jle	short loc_4F3B82
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_33C]
call	sub_FB0570
mov	[ebp+var_4], eax

loc_4F3B82:
mov	edx, [ebp+var_4]
mov	[ebp+var_28C], edx
lea	ecx, [ebp+var_80]
call	sub_4E5560
lea	ecx, [ebp+var_18]
call	sub_5D2630
lea	ecx, [ebp+var_30]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_28C]
mov	esp, ebp
pop	ebp
retn	8
sub_4F3410 endp

align 10h


; Attributes: bp-based frame

sub_4F3BC0 proc	near

var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_38=	byte ptr -38h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_8C], ecx
lea	ecx, [ebp+var_5C]
call	sub_4E3690
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [eax+4]
mov	[ebp+var_50], edx
mov	eax, [eax+8]
mov	[ebp+var_4C], eax
movss	xmm0, [ebp+arg_C]
movss	[ebp+var_48], xmm0
mov	[ebp+var_44], 1
mov	[ebp+var_40], 0
lea	ecx, [ebp+var_5C]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	edx, dword_1889A64
mov	[ebp+var_7C], edx
mov	eax, dword_1889A68
mov	[ebp+var_78], eax
mov	ecx, dword_1889A6C
mov	[ebp+var_74], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_18]
mov	edx, [ebp+var_7C]
mov	[ecx], edx
mov	eax, [ebp+var_78]
mov	[ecx+4], eax
mov	edx, [ebp+var_74]
mov	[ecx+8], edx
lea	eax, [ebp+var_20]
push	eax
lea	ecx, [ebp+var_38]
call	sub_5BFFB0
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
lea	eax, [ebp+var_60]
call	sub_4046E0
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_4]
call	sub_4046E0
lea	ecx, [ebp+var_38]
lea	eax, [ebp+var_68]
call	sub_4046E0
lea	ecx, [ebp+var_88]
mov	[ebp+var_84], ecx
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_84]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_88]
setz	al
mov	[ebp+var_8D], al
movzx	ecx, [ebp+var_8D]
test	ecx, ecx
jz	short loc_4F3CD0
mov	[ebp+var_69], 0
lea	ecx, [ebp+var_38]
call	sub_594900
lea	ecx, [ebp+var_5C]
call	sub_401110
mov	al, [ebp+var_69]
jmp	short loc_4F3CF9
jmp	short loc_4F3CE9

loc_4F3CD0:
mov	[ebp+var_6A], 1
lea	ecx, [ebp+var_38]
call	sub_594900
lea	ecx, [ebp+var_5C]
call	sub_401110
mov	al, [ebp+var_6A]
jmp	short loc_4F3CF9

loc_4F3CE9:
lea	ecx, [ebp+var_38]
call	sub_594900
lea	ecx, [ebp+var_5C]
call	sub_401110

loc_4F3CF9:
mov	esp, ebp
pop	ebp
retn	10h
sub_4F3BC0 endp

align 10h


; Attributes: bp-based frame

sub_4F3D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6
mov	esp, ebp
pop	ebp
retn
sub_4F3D00 endp



; Attributes: bp-based frame

sub_4F3D10 proc	near

var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_202= byte ptr -202h
var_201= byte ptr -201h
var_200= dword ptr -200h
var_1F9= byte ptr -1F9h
var_1F8= dword ptr -1F8h
var_1CD= byte ptr -1CDh
var_1CC= dword ptr -1CCh
var_1A1= byte ptr -1A1h
var_1A0= dword ptr -1A0h
var_175= byte ptr -175h
var_174= dword ptr -174h
var_149= byte ptr -149h
var_148= dword ptr -148h
var_11D= byte ptr -11Dh
var_11C= dword ptr -11Ch
var_F1=	byte ptr -0F1h
var_F0=	byte ptr -0F0h
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_A4=	byte ptr -0A4h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_54=	byte ptr -54h
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 224h
mov	[ebp+var_220], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F3D45
mov	ecx, [ebp+var_220]
mov	edx, [ecx+4]
push	edx
push	offset aMovementswitch ; "MovementSwitchBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F3D45:
lea	ecx, [ebp+var_201]
push	ecx
lea	edx, [ebp+var_202]
push	edx
lea	ecx, [ebp+var_24]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_220]
call	sub_F79E10
lea	ecx, [ebp+var_F1]
call	sub_401EF0
push	eax
push	offset aGround_action ;	"ground_action"
lea	ecx, [ebp+var_F0]
call	sub_407810
lea	ecx, [ebp+var_F0]
push	ecx
lea	edx, [ebp+var_24]
push	edx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_F0]
call	sub_407E50
lea	ecx, [ebp+var_F1]
call	nullsub_1
lea	ecx, [ebp+var_11D]
call	sub_401EF0
push	eax
push	offset aJump_action ; "jump_action"
lea	ecx, [ebp+var_11C]
call	sub_407810
cvtsi2ss xmm0, [ebp+var_C]
push	ecx		; float
movss	[esp+228h+var_228], xmm0
lea	eax, [ebp+var_11C]
push	eax		; int
lea	ecx, [ebp+var_24]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_11C]
call	sub_407E50
lea	ecx, [ebp+var_11D]
call	nullsub_1
lea	ecx, [ebp+var_149]
call	sub_401EF0
push	eax
push	offset aDouble_jump_ac ; "double_jump_action"
lea	ecx, [ebp+var_148]
call	sub_407810
cvtsi2ss xmm0, [ebp+var_C]
push	ecx		; float
movss	[esp+228h+var_228], xmm0
lea	edx, [ebp+var_148]
push	edx		; int
lea	eax, [ebp+var_24]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_40], eax
lea	ecx, [ebp+var_148]
call	sub_407E50
lea	ecx, [ebp+var_149]
call	nullsub_1
lea	ecx, [ebp+var_175]
call	sub_401EF0
push	eax
push	offset aJetpack_action ; "jetpack_action"
lea	ecx, [ebp+var_174]
call	sub_407810
cvtsi2ss xmm0, [ebp+var_C]
push	ecx		; float
movss	[esp+228h+var_228], xmm0
lea	ecx, [ebp+var_174]
push	ecx		; int
lea	edx, [ebp+var_24]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_34], eax
lea	ecx, [ebp+var_174]
call	sub_407E50
lea	ecx, [ebp+var_175]
call	nullsub_1
lea	ecx, [ebp+var_1A1]
call	sub_401EF0
push	eax
push	offset aFalling_action ; "falling_action"
lea	ecx, [ebp+var_1A0]
call	sub_407810
cvtsi2ss xmm0, [ebp+var_C]
push	ecx		; float
movss	[esp+228h+var_228], xmm0
lea	eax, [ebp+var_1A0]
push	eax		; int
lea	ecx, [ebp+var_24]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_1A0]
call	sub_407E50
lea	ecx, [ebp+var_1A1]
call	nullsub_1
lea	ecx, [ebp+var_1CD]
call	sub_401EF0
push	eax
push	offset aAir_action ; "air_action"
lea	ecx, [ebp+var_1CC]
call	sub_407810
cvtsi2ss xmm0, [ebp+var_C]
push	ecx		; float
movss	[esp+228h+var_228], xmm0
lea	edx, [ebp+var_1CC]
push	edx		; int
lea	eax, [ebp+var_24]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_1CC]
call	sub_407E50
lea	ecx, [ebp+var_1CD]
call	nullsub_1
lea	ecx, [ebp+var_1F9]
call	sub_401EF0
push	eax
push	offset aMoving_action ;	"moving_action"
lea	ecx, [ebp+var_1F8]
call	sub_407810
cvtsi2ss xmm0, [ebp+var_C]
push	ecx		; float
movss	[esp+228h+var_228], xmm0
lea	ecx, [ebp+var_1F8]
push	ecx		; int
lea	edx, [ebp+var_24]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_1F8]
call	sub_407E50
lea	ecx, [ebp+var_1F9]
call	nullsub_1
mov	[ebp+var_38], 0
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Ch]
test	ecx, ecx
jz	loc_4F40B4
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20C], eax
mov	ecx, [edx+4]
mov	[ebp+var_208], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_78]
call	sub_401100
mov	[ebp+var_78], offset off_1558464
mov	edx, [ebp+var_20C]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_208]
mov	[ebp+var_6C], eax
lea	ecx, [ebp+var_68]
call	sub_DBE120
lea	ecx, [ebp+var_54]
mov	[ebp+var_210], ecx
mov	edx, [ebp+var_210]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_210]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F406B
lea	eax, [ebp+var_78]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F406B:
cmp	[ebp+var_48], 0
jnz	short loc_4F4083
mov	[ebp+var_2C], 1
mov	edx, [ebp+var_2C]
mov	[ebp+var_224], edx
jmp	short loc_4F4092

loc_4F4083:
mov	eax, [ebp+var_48]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_224], ecx

loc_4F4092:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_50E110
add	esp, 8
lea	ecx, [ebp+var_68]
call	sub_4087D0
lea	ecx, [ebp+var_78]
call	sub_401110
jmp	short loc_4F40D1

loc_4F40B4:
mov	ecx, [ebp+arg_4]
push	ecx		; int
lea	edx, [ebp+var_2C]
push	edx		; void *
call	sub_50DDD0
add	esp, 8
cmp	[ebp+var_2C], 0
jnz	short loc_4F40D1
mov	[ebp+var_2C], 1

loc_4F40D1:
cmp	[ebp+var_2C], 2
jnz	short loc_4F40E2
mov	eax, [ebp+var_4]
mov	[ebp+var_30], eax
jmp	loc_4F4243

loc_4F40E2:
cmp	[ebp+var_2C], 4
jnz	short loc_4F40F3
mov	ecx, [ebp+var_40]
mov	[ebp+var_30], ecx
jmp	loc_4F4243

loc_4F40F3:
cmp	[ebp+var_2C], 6
jnz	short loc_4F4104
mov	edx, [ebp+var_34]
mov	[ebp+var_30], edx
jmp	loc_4F4243

loc_4F4104:
cmp	[ebp+var_2C], 5
jnz	short loc_4F4115
mov	eax, [ebp+var_8]
mov	[ebp+var_30], eax
jmp	loc_4F4243

loc_4F4115:
cmp	[ebp+var_2C], 3
jnz	short loc_4F4126
mov	ecx, [ebp+var_3C]
mov	[ebp+var_30], ecx
jmp	loc_4F4243

loc_4F4126:
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_C]
jz	loc_4F423D
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_218], ecx
mov	edx, [eax+4]
mov	[ebp+var_214], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_C8]
call	sub_401100
mov	[ebp+var_C8], offset off_1558468
mov	eax, [ebp+var_218]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_214]
mov	[ebp+var_BC], ecx
lea	ecx, [ebp+var_B8]
call	sub_DDCBC0
lea	edx, [ebp+var_A4]
mov	[ebp+var_21C], edx
mov	eax, [ebp+var_21C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_21C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F41C3
lea	ecx, [ebp+var_C8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F41C3:
movss	xmm0, [ebp+var_98]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jp	short loc_4F4217
movss	xmm0, [ebp+var_94]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jp	short loc_4F4217
movss	xmm0, [ebp+var_8C]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jp	short loc_4F4217
movss	xmm0, [ebp+var_88]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	short loc_4F421F

loc_4F4217:
mov	eax, [ebp+var_28]
mov	[ebp+var_30], eax
jmp	short loc_4F4225

loc_4F421F:
mov	ecx, [ebp+var_C]
mov	[ebp+var_30], ecx

loc_4F4225:
lea	ecx, [ebp+var_B8]
call	sub_4087D0
lea	ecx, [ebp+var_C8]
call	sub_401110
jmp	short loc_4F4243

loc_4F423D:
mov	edx, [ebp+var_C]
mov	[ebp+var_30], edx

loc_4F4243:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Bh]
test	ecx, ecx
jnz	short loc_4F4268
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_220]
call	sub_FB0570
mov	[ebp+var_38], eax

loc_4F4268:
mov	edx, [ebp+var_38]
mov	[ebp+var_200], edx
lea	ecx, [ebp+var_24]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_200]
mov	esp, ebp
pop	ebp
retn	8
sub_4F3D10 endp

align 10h


; Attributes: bp-based frame

sub_4F4290 proc	near

var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 258h
mov	[ebp+var_258], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F42C5
mov	ecx, [ebp+var_258]
mov	edx, [ecx+4]
push	edx
push	offset aStatbuffbehavi ; "StatBuffBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F42C5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F42D4
xor	eax, eax
jmp	short loc_4F433A

loc_4F42D4:
mov	eax, [ebp+arg_0]
push	eax
push	ecx
fld1
fstp	[esp+260h+var_260]
mov	ecx, [ebp+var_258]
call	sub_4F4370
mov	ecx, [ebp+var_258]
cmp	dword ptr [ecx+8], 0
jz	short loc_4F4335
push	ecx
fld	ds:flt_1513C00
fstp	[esp+25Ch+var_25C]
push	offset aCast	; "cast"
mov	edx, [ebp+var_258]
add	edx, 0Ch
push	edx
mov	eax, [ebp+var_258]
mov	ecx, [eax+8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
push	eax
mov	ecx, [edx+10h]
push	ecx
call	sub_F81B80
add	esp, 20h

loc_4F4335:
mov	eax, 1

loc_4F433A:
mov	esp, ebp
pop	ebp
retn	8
sub_4F4290 endp



; Attributes: bp-based frame

sub_4F4340 proc	near

var_260= dword ptr -260h
var_258= dword ptr -258h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 258h
mov	[ebp+var_258], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
fld	ds:dword_15439C8
fstp	[esp+260h+var_260]
mov	ecx, [ebp+var_258]
call	sub_4F4370
mov	esp, ebp
pop	ebp
retn	4
sub_4F4340 endp

align 10h


; Attributes: bp-based frame

sub_4F4370 proc	near

var_2B0= dword ptr -2B0h
var_2AC= qword ptr -2ACh
var_2A4= dword ptr -2A4h
var_29E= word ptr -29Eh
var_29C= qword ptr -29Ch
var_294= dword ptr -294h
var_28E= word ptr -28Eh
var_28C= qword ptr -28Ch
var_284= dword ptr -284h
var_27E= word ptr -27Eh
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_242= byte ptr -242h
var_241= byte ptr -241h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_231= byte ptr -231h
var_230= dword ptr -230h
var_205= byte ptr -205h
var_204= dword ptr -204h
var_1D9= byte ptr -1D9h
var_1D8= dword ptr -1D8h
var_1AD= byte ptr -1ADh
var_1AC= dword ptr -1ACh
var_181= byte ptr -181h
var_180= dword ptr -180h
var_158= dword ptr -158h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= byte ptr -148h
var_134= byte ptr -134h
var_128= dword ptr -128h
var_120= dword ptr -120h
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= byte ptr -110h
var_FC=	byte ptr -0FCh
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E0=	dword ptr -0E0h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_BC=	byte ptr -0BCh
var_B0=	dword ptr -0B0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_74=	byte ptr -74h
var_34=	byte ptr -34h
var_2C=	byte ptr -2Ch
var_24=	byte ptr -24h
var_18=	dword ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2ACh
mov	[ebp+var_270], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+10h]
mov	[ebp+var_23C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_238], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_98]
call	sub_401100
mov	[ebp+var_98], offset off_1581900
mov	eax, [ebp+var_23C]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_238]
mov	[ebp+var_8C], ecx
lea	ecx, [ebp+var_88]
call	sub_E709C0
lea	edx, [ebp+var_74]
mov	[ebp+var_240], edx
mov	eax, [ebp+var_240]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_240]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F440E
lea	ecx, [ebp+var_98]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F440E:
lea	eax, [ebp+var_241]
push	eax
lea	ecx, [ebp+var_242]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_270]
call	sub_F79E10
lea	ecx, [ebp+var_181]
call	sub_401EF0
push	eax
push	offset aArmor	; "armor"
lea	ecx, [ebp+var_180]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2B0h+var_2B0]
lea	eax, [ebp+var_180]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_9C]
lea	ecx, [ebp+var_180]
call	sub_407E50
lea	ecx, [ebp+var_181]
call	nullsub_1
movss	xmm0, [ebp+var_9C]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	short loc_4F44C8
lea	edx, [ebp+var_2C]
mov	[ebp+var_274], edx
movss	xmm0, [ebp+var_9C]
mulss	xmm0, [ebp+arg_0]
mov	eax, [ebp+var_274]
addss	xmm0, dword ptr	[eax]
mov	ecx, [ebp+var_274]
movss	dword ptr [ecx], xmm0

loc_4F44C8:
lea	ecx, [ebp+var_1AD]
call	sub_401EF0
push	eax
push	offset aLife	; "life"
lea	ecx, [ebp+var_1AC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2B0h+var_2B0]
lea	edx, [ebp+var_1AC]
push	edx		; int
lea	eax, [ebp+var_18]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_9C]
lea	ecx, [ebp+var_1AC]
call	sub_407E50
lea	ecx, [ebp+var_1AD]
call	nullsub_1
movss	xmm0, [ebp+var_9C]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	short loc_4F4558
lea	ecx, [ebp+var_34]
mov	[ebp+var_278], ecx
movss	xmm0, [ebp+var_9C]
mulss	xmm0, [ebp+arg_0]
mov	edx, [ebp+var_278]
addss	xmm0, dword ptr	[edx]
mov	eax, [ebp+var_278]
movss	dword ptr [eax], xmm0

loc_4F4558:
lea	ecx, [ebp+var_1D9]
call	sub_401EF0
push	eax
push	offset aImag	; "imag"
lea	ecx, [ebp+var_1D8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2B0h+var_2B0]
lea	ecx, [ebp+var_1D8]
push	ecx		; int
lea	edx, [ebp+var_18]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_9C]
lea	ecx, [ebp+var_1D8]
call	sub_407E50
lea	ecx, [ebp+var_1D9]
call	nullsub_1
movss	xmm0, [ebp+var_9C]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	short loc_4F45E8
lea	eax, [ebp+var_24]
mov	[ebp+var_27C], eax
movss	xmm0, [ebp+var_9C]
mulss	xmm0, [ebp+arg_0]
mov	ecx, [ebp+var_27C]
addss	xmm0, dword ptr	[ecx]
mov	edx, [ebp+var_27C]
movss	dword ptr [edx], xmm0

loc_4F45E8:
lea	ecx, [ebp+var_205]
call	sub_401EF0
push	eax
push	offset aAttack_speed ; "attack_speed"
lea	ecx, [ebp+var_204]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2B0h+var_2B0]
lea	eax, [ebp+var_204]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_9C]
lea	ecx, [ebp+var_204]
call	sub_407E50
lea	ecx, [ebp+var_205]
call	nullsub_1
movss	xmm0, [ebp+var_9C]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	loc_4F4736
mov	edx, [ebp+arg_4]
mov	eax, [edx+10h]
mov	[ebp+var_24C], eax
mov	ecx, [edx+14h]
mov	[ebp+var_248], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_E0]
call	sub_401100
mov	[ebp+var_E0], offset off_1558450
mov	edx, [ebp+var_24C]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_248]
mov	[ebp+var_D4], eax
lea	ecx, [ebp+var_D0]
call	sub_DBF990
fld	[ebp+var_9C]
fnstcw	[ebp+var_27E]
movzx	eax, [ebp+var_27E]
or	eax, 0C00h
mov	[ebp+var_284], eax
fldcw	word ptr [ebp+var_284]
fistp	[ebp+var_28C]
fldcw	[ebp+var_27E]
mov	ecx, dword ptr [ebp+var_28C]
mov	[ebp+var_B0], ecx
lea	edx, [ebp+var_BC]
mov	[ebp+var_250], edx
mov	eax, [ebp+var_250]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_250]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F4720
lea	ecx, [ebp+var_E0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F4720:
lea	ecx, [ebp+var_D0]
call	sub_4087D0
lea	ecx, [ebp+var_E0]
call	sub_401110

loc_4F4736:
lea	ecx, [ebp+var_231]
call	sub_401EF0
push	eax
push	offset aRun_speed ; "run_speed"
lea	ecx, [ebp+var_230]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+2B0h+var_2B0]
lea	eax, [ebp+var_230]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_9C]
lea	ecx, [ebp+var_230]
call	sub_407E50
lea	ecx, [ebp+var_231]
call	nullsub_1
movss	xmm0, [ebp+var_9C]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	loc_4F49DB
movss	xmm0, [ebp+var_9C]
comiss	xmm0, ds:flt_15BF168
ja	short loc_4F47C2
movss	xmm0, dword ptr	ds:xmmword_1479F30
comiss	xmm0, [ebp+var_9C]
jbe	short loc_4F47E8

loc_4F47C2:
fld	[ebp+var_9C]
sub	esp, 8
fstp	qword ptr [esp]
push	offset aStatbuffBehavi ; "StatBuff Behavior Speed has invalid val"...
push	2		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 14h
jmp	loc_4F49DB

loc_4F47E8:
movss	xmm0, [ebp+arg_0]
comiss	xmm0, dword ptr	ds:xmmword_1479F30
jbe	loc_4F48F7
mov	edx, [ebp+arg_4]
mov	eax, [edx+10h]
mov	[ebp+var_258], eax
mov	ecx, [edx+14h]
mov	[ebp+var_254], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_120]
call	sub_401100
mov	[ebp+var_120], offset off_1558450
mov	edx, [ebp+var_258]
mov	[ebp+var_118], edx
mov	eax, [ebp+var_254]
mov	[ebp+var_114], eax
lea	ecx, [ebp+var_110]
call	sub_D8BC80
fld	[ebp+var_9C]
fnstcw	[ebp+var_28E]
movzx	eax, [ebp+var_28E]
or	eax, 0C00h
mov	[ebp+var_294], eax
fldcw	word ptr [ebp+var_294]
fistp	[ebp+var_29C]
fldcw	[ebp+var_28E]
mov	ecx, dword ptr [ebp+var_29C]
mov	[ebp+var_E8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_F0], eax
mov	ecx, [edx+4]
mov	[ebp+var_EC], ecx
lea	edx, [ebp+var_FC]
mov	[ebp+var_25C], edx
mov	eax, [ebp+var_25C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_25C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F48DC
lea	ecx, [ebp+var_120]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F48DC:
lea	ecx, [ebp+var_110]
call	sub_4087D0
lea	ecx, [ebp+var_120]
call	sub_401110
jmp	loc_4F49DB

loc_4F48F7:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+10h]
mov	[ebp+var_264], ecx
mov	edx, [eax+14h]
mov	[ebp+var_260], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_158]
call	sub_401100
mov	[ebp+var_158], offset off_1558464
mov	eax, [ebp+var_264]
mov	[ebp+var_150], eax
mov	ecx, [ebp+var_260]
mov	[ebp+var_14C], ecx
lea	ecx, [ebp+var_148]
call	sub_D8BBE0
fld	[ebp+var_9C]
fnstcw	[ebp+var_29E]
movzx	eax, [ebp+var_29E]
or	eax, 0C00h
mov	[ebp+var_2A4], eax
fldcw	word ptr [ebp+var_2A4]
fistp	[ebp+var_2AC]
fldcw	[ebp+var_29E]
mov	edx, dword ptr [ebp+var_2AC]
mov	[ebp+var_128], edx
lea	eax, [ebp+var_134]
mov	[ebp+var_268], eax
mov	ecx, [ebp+var_268]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_268]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F49C5
lea	edx, [ebp+var_158]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F49C5:
lea	ecx, [ebp+var_148]
call	sub_4087D0
lea	ecx, [ebp+var_158]
call	sub_401110

loc_4F49DB:
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
lea	ecx, [ebp+var_88]
call	sub_4F4A30
lea	ecx, [ebp+var_98]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	8
sub_4F4370 endp

align 10h


; Attributes: bp-based frame

sub_4F4A10 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_4F4A30
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4F4A10 endp



; Attributes: bp-based frame

sub_4F4A30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 30h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_4F4A30 endp

align 10h


; Attributes: bp-based frame

sub_4F4A70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 40h
mov	esp, ebp
pop	ebp
retn
sub_4F4A70 endp



; Attributes: bp-based frame

sub_4F4A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 41h
mov	esp, ebp
pop	ebp
retn
sub_4F4A80 endp



; Attributes: bp-based frame

sub_4F4A90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3Eh
mov	esp, ebp
pop	ebp
retn
sub_4F4A90 endp



; Attributes: bp-based frame

sub_4F4AA0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_7E=	byte ptr -7Eh
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_84], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F4AD5
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
push	offset aCleartargetbeh ; "ClearTargetBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F4AD5:
lea	ecx, [ebp+var_7D]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_489C40
mov	[ebp+var_C], 0
mov	dl, [ebp+var_7E]
mov	[ebp+var_8], dl
call	nullsub_1
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_84]
call	sub_F79E10
lea	ecx, [ebp+var_49]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_48]
call	sub_407810
lea	ecx, [ebp+var_48]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_48]
call	sub_407E50
lea	ecx, [ebp+var_49]
call	nullsub_1
lea	ecx, [ebp+var_75]
call	sub_401EF0
push	eax
push	offset aClear_if_caste ; "clear_if_caster"
lea	ecx, [ebp+var_74]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+94h+var_94]
lea	eax, [ebp+var_74]
push	eax		; int
lea	ecx, [ebp+var_1C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F4B83
mov	[ebp+var_85], 1
jmp	short loc_4F4B8A

loc_4F4B83:
mov	[ebp+var_85], 0

loc_4F4B8A:
mov	dl, [ebp+var_85]
mov	[ebp+var_1], dl
lea	ecx, [ebp+var_74]
call	sub_407E50
lea	ecx, [ebp+var_75]
call	nullsub_1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_4F4BF7
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	[ebp+var_90], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+var_90]
mov	edx, [eax]
cmp	edx, [ecx+10h]
jnz	short loc_4F4BF5
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+var_90]
mov	edx, [eax+4]
cmp	edx, [ecx+14h]
jnz	short loc_4F4BF5
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+10h], 0
mov	dword ptr [eax+14h], 0

loc_4F4BF5:
jmp	short loc_4F4C08

loc_4F4BF7:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+10h], 0
mov	dword ptr [ecx+14h], 0

loc_4F4C08:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_84]
call	sub_FB0570
mov	[ebp+var_7C], eax
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	8
sub_4F4AA0 endp

align 10h


; Attributes: bp-based frame

sub_4F4C40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F4C6A
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
push	offset aApplybuffbehav ; "ApplyBuffBehavior -->	%d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F4C6A:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn	8
sub_4F4C40 endp

align 10h


; Attributes: bp-based frame

sub_4F4C80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F4CAA
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
push	offset aApplybuffbeh_0 ; "ApplyBuffBehavior Uncast --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F4CAA:
mov	esp, ebp
pop	ebp
retn	4
sub_4F4C80 endp



; Attributes: bp-based frame

sub_4F4CB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 31h
mov	esp, ebp
pop	ebp
retn
sub_4F4CB0 endp



; Attributes: bp-based frame

sub_4F4CC0 proc	near

var_E0=	dword ptr -0E0h
var_D9=	byte ptr -0D9h
var_D8=	qword ptr -0D8h
var_D0=	dword ptr -0D0h
var_CA=	word ptr -0CAh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B6=	byte ptr -0B6h
var_B5=	byte ptr -0B5h
var_B4=	dword ptr -0B4h
var_AD=	byte ptr -0ADh
var_AC=	dword ptr -0ACh
var_81=	byte ptr -81h
var_80=	byte ptr -80h
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_34=	byte ptr -34h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_22=	byte ptr -22h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_C8], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F4CF5
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+4]
push	edx
push	offset aRemovebuffbeha ; "RemoveBuffBehavior --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F4CF5:
lea	ecx, [ebp+var_B5]
push	ecx
lea	edx, [ebp+var_B6]
push	edx
lea	ecx, [ebp+var_1C]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_F79E10
lea	ecx, [ebp+var_81]
call	sub_401EF0
push	eax
push	offset aBuff_id	; "buff_id"
lea	ecx, [ebp+var_80]
call	sub_407810
lea	ecx, [ebp+var_80]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
call	sub_F90A60
add	esp, 8
fnstcw	[ebp+var_CA]
movzx	eax, [ebp+var_CA]
or	eax, 0C00h
mov	[ebp+var_D0], eax
fldcw	word ptr [ebp+var_D0]
fistp	[ebp+var_D8]
fldcw	[ebp+var_CA]
mov	eax, dword ptr [ebp+var_D8]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_80]
call	sub_407E50
lea	ecx, [ebp+var_81]
call	nullsub_1
lea	ecx, [ebp+var_AD]
call	sub_401EF0
push	eax
push	offset aRemove_immunit ; "remove_immunity"
lea	ecx, [ebp+var_AC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+0E0h+var_E0]
lea	ecx, [ebp+var_AC]
push	ecx		; int
lea	edx, [ebp+var_1C]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F4DDA
mov	[ebp+var_D9], 1
jmp	short loc_4F4DE1

loc_4F4DDA:
mov	[ebp+var_D9], 0

loc_4F4DE1:
mov	al, [ebp+var_D9]
mov	[ebp+var_1D], al
lea	ecx, [ebp+var_AC]
call	sub_407E50
lea	ecx, [ebp+var_AD]
call	nullsub_1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_C0], edx
mov	eax, [ecx+14h]
mov	[ebp+var_BC], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_58]
call	sub_401100
mov	[ebp+var_58], offset off_1558464
mov	ecx, [ebp+var_C0]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_BC]
mov	[ebp+var_4C], edx
lea	ecx, [ebp+var_48]
call	sub_D85BC0
mov	eax, [ebp+var_4]
mov	[ebp+var_28], eax
mov	cl, [ebp+var_1D]
mov	[ebp+var_24], cl
mov	[ebp+var_22], 1
lea	edx, [ebp+var_34]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_C4]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F4E8D
lea	ecx, [ebp+var_58]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F4E8D:
mov	[ebp+var_B4], 0
lea	ecx, [ebp+var_48]
call	sub_4087D0
lea	ecx, [ebp+var_58]
call	sub_401110
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_B4]
mov	esp, ebp
pop	ebp
retn	8
sub_4F4CC0 endp



; Attributes: bp-based frame

sub_4F4EC0 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_96=	byte ptr -96h
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_6C=	byte ptr -6Ch
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	dword ptr -20h
var_18=	byte ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B4h
mov	[ebp+var_B4], ecx
lea	eax, [ebp+var_95]
push	eax
lea	ecx, [ebp+var_96]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_B4]
call	sub_F79E10
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F4F1F
mov	ecx, [ebp+var_B4]
mov	edx, [ecx+4]
push	edx
push	offset aSkillcastfaile ; "SkillCastFailedBehavior --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F4F1F:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_A0], edx
mov	eax, [ecx+4]
mov	[ebp+var_9C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558464
mov	ecx, [ebp+var_A0]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_44], edx
lea	ecx, [ebp+var_40]
call	sub_DD6B80
mov	eax, [ebp+arg_0]
mov	ecx, [eax+48h]
mov	[ebp+var_20], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_A4]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F4FA4
lea	ecx, [ebp+var_50]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F4FA4:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+38h]
test	ecx, ecx
jz	short loc_4F4FC4
mov	edx, [ebp+arg_0]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+40h], xmm0
jmp	loc_4F507B

loc_4F4FC4:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_AC], ecx
mov	edx, [eax+4]
mov	[ebp+var_A8], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_90]
call	sub_401100
mov	[ebp+var_90], offset off_1558450
mov	eax, [ebp+var_AC]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_A8]
mov	[ebp+var_84], ecx
lea	ecx, [ebp+var_80]
call	sub_DD9AD0
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ebp+var_60], eax
movss	xmm0, ds:dword_15439C8
movss	[ebp+var_5C], xmm0
mov	[ebp+var_58], 0
lea	ecx, [ebp+var_6C]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_B0]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_B0]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F5068
lea	eax, [ebp+var_90]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5068:
lea	ecx, [ebp+var_80]
call	sub_4087D0
lea	ecx, [ebp+var_90]
call	sub_401110

loc_4F507B:
mov	[ebp+var_94], 0
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_94]
mov	esp, ebp
pop	ebp
retn	8
sub_4F4EC0 endp

align 10h


; Attributes: bp-based frame

sub_4F50B0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B6=	byte ptr -0B6h
var_B5=	byte ptr -0B5h
var_B4=	dword ptr -0B4h
var_AD=	byte ptr -0ADh
var_AC=	dword ptr -0ACh
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	qword ptr -78h
var_70=	byte ptr -70h
var_5C=	byte ptr -5Ch
var_50=	byte ptr -50h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C4h
mov	[ebp+var_C4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F50E5
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+4]
push	edx
push	offset aSkilleventbeha ; "SkillEventBehavior --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F50E5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F50F7
xor	eax, eax
jmp	loc_4F52B2

loc_4F50F7:
mov	ecx, [ebp+var_C4]
add	ecx, 0Ch
call	sub_402CA0
movzx	eax, al
test	eax, eax
jz	short loc_4F5128
push	offset aSkilleventbe_0 ; "SkillEventBehavior, no effect	handle pr"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 0Ch
xor	eax, eax
jmp	loc_4F52B2

loc_4F5128:
lea	ecx, [ebp+var_B5]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489C40
mov	[ebp+var_8], 0
mov	dl, [ebp+var_B6]
mov	[ebp+var_4], dl
call	nullsub_1
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_F79E10
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	dword ptr [ebp+var_20],	edx
mov	eax, [ecx+14h]
mov	dword ptr [ebp+var_20+4], eax
lea	ecx, [ebp+var_AD]
call	sub_401EF0
push	eax
push	offset aTarget_caster ;	"target_caster"
lea	ecx, [ebp+var_AC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+0C8h+var_C8]
lea	ecx, [ebp+var_AC]
push	ecx		; int
lea	edx, [ebp+var_18]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_84]
lea	ecx, [ebp+var_AC]
call	sub_407E50
lea	ecx, [ebp+var_AD]
call	nullsub_1
movss	xmm0, [ebp+var_84]
ucomiss	xmm0, dword ptr	ds:xmmword_1479F30
lahf
test	ah, 44h
jnp	short loc_4F51DE
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	dword ptr [ebp+var_20],	ecx
mov	edx, [eax+4]
mov	dword ptr [ebp+var_20+4], edx

loc_4F51DE:
mov	eax, dword ptr [ebp+var_20]
or	eax, dword ptr [ebp+var_20+4]
jz	loc_4F5295
mov	ecx, 138Bh
lea	eax, [ebp+var_80]
call	sub_401100
mov	[ebp+var_80], offset off_1599B2C
mov	ecx, dword ptr [ebp+var_20]
mov	dword ptr [ebp+var_78],	ecx
mov	edx, dword ptr [ebp+var_20+4]
mov	dword ptr [ebp+var_78+4], edx
lea	ecx, [ebp+var_70]
call	sub_E71C00
mov	eax, [ebp+var_C4]
add	eax, 0Ch
push	eax
lea	ecx, [ebp+var_50]
call	sub_4023E0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ecx+4]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_5C]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_BC]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_BC]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F526B
lea	eax, [ebp+var_80]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F526B:
lea	edx, [ebp+var_70]
mov	[ebp+var_C0], edx
mov	ecx, [ebp+var_C0]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_C0]
call	sub_4087D0
lea	ecx, [ebp+var_80]
call	sub_401110

loc_4F5295:
mov	[ebp+var_B4], 0
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_B4]

loc_4F52B2:
mov	esp, ebp
pop	ebp
retn	8
sub_4F50B0 endp

align 10h


; Attributes: bp-based frame

sub_4F52C0 proc	near

var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_12E= byte ptr -12Eh
var_12D= byte ptr -12Dh
var_12C= dword ptr -12Ch
var_125= byte ptr -125h
var_124= dword ptr -124h
var_F9=	byte ptr -0F9h
var_F8=	byte ptr -0F8h
var_CD=	byte ptr -0CDh
var_CC=	byte ptr -0CCh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	byte ptr -90h
var_7C=	byte ptr -7Ch
var_70=	dword ptr -70h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_3C=	byte ptr -3Ch
var_30=	byte ptr -30h
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 150h
mov	[ebp+var_14C], ecx
lea	eax, [ebp+var_12D]
push	eax
lea	ecx, [ebp+var_12E]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_14C]
call	sub_F79E10
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F531F
mov	ecx, [ebp+var_14C]
mov	edx, [ecx+4]
push	edx
push	offset aCarboostbehavi ; "CarBoostBehavior --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F531F:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F5347
mov	[ebp+var_A4], 0
lea	ecx, [ebp+var_1C]
call	sub_4FFBC0
mov	eax, [ebp+var_A4]
jmp	loc_4F5638

loc_4F5347:
lea	ecx, [ebp+var_CD]
call	sub_401EF0
push	eax
push	offset aTime	; "time"
lea	ecx, [ebp+var_CC]
call	sub_407810
lea	eax, [ebp+var_CC]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_64]
lea	ecx, [ebp+var_CC]
call	sub_407E50
lea	ecx, [ebp+var_CD]
call	nullsub_1
lea	ecx, [ebp+var_F9]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_F8]
call	sub_407810
lea	edx, [ebp+var_F8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_F8]
call	sub_407E50
lea	ecx, [ebp+var_F9]
call	nullsub_1
lea	ecx, [ebp+var_125]
call	sub_401EF0
push	eax
push	offset aAction_failed ;	"action_failed"
lea	ecx, [ebp+var_124]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+154h+var_154]
lea	ecx, [ebp+var_124]
push	ecx		; int
lea	edx, [ebp+var_1C]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_124]
call	sub_407E50
lea	ecx, [ebp+var_125]
call	nullsub_1
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_138], ecx
mov	edx, [eax+4]
mov	[ebp+var_134], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_60]
call	sub_401100
mov	[ebp+var_60], offset off_1558464
mov	eax, [ebp+var_138]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_134]
mov	[ebp+var_54], ecx
lea	ecx, [ebp+var_50]
call	sub_D91B20
lea	edx, [ebp+var_3C]
mov	[ebp+var_13C], edx
mov	eax, [ebp+var_13C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_13C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F54B2
lea	ecx, [ebp+var_60]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F54B2:
mov	[ebp+var_25], 0
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Ch]
test	ecx, ecx
jz	short loc_4F54FF
movzx	edx, [ebp+var_30]
test	edx, edx
jz	short loc_4F54E1
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B750
add	esp, 4
mov	[ebp+var_150], 0
jmp	short loc_4F54F7

loc_4F54E1:
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B7A0
add	esp, 4
mov	[ebp+var_150], 0

loc_4F54F7:
mov	dl, [ebp+var_30]
mov	[ebp+var_25], dl
jmp	short loc_4F5516

loc_4F54FF:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	short loc_4F5516
mov	[ebp+var_25], 1

loc_4F5516:
movzx	edx, [ebp+var_25]
test	edx, edx
jz	loc_4F55EC
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_14C]
call	sub_FB0570
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_144], ecx
mov	edx, [eax+4]
mov	[ebp+var_140], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_A0]
call	sub_401100
mov	[ebp+var_A0], offset off_1558464
mov	eax, [ebp+var_144]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_140]
mov	[ebp+var_94], ecx
lea	ecx, [ebp+var_90]
call	sub_D91AA0
movss	xmm0, [ebp+var_64]
movss	[ebp+var_70], xmm0
lea	edx, [ebp+var_7C]
mov	[ebp+var_148], edx
mov	eax, [ebp+var_148]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_148]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F55D4
lea	ecx, [ebp+var_A0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F55D4:
lea	ecx, [ebp+var_90]
call	sub_4087D0
lea	ecx, [ebp+var_A0]
call	sub_401110
jmp	short loc_4F560C

loc_4F55EC:
cmp	[ebp+var_20], 0
jle	short loc_4F560C
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_14C]
call	sub_FB0570
mov	[ebp+var_4], eax

loc_4F560C:
mov	eax, [ebp+var_4]
mov	[ebp+var_12C], eax
lea	ecx, [ebp+var_50]
call	sub_4087D0
lea	ecx, [ebp+var_60]
call	sub_401110
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_12C]

loc_4F5638:
mov	esp, ebp
pop	ebp
retn	8
sub_4F52C0 endp

align 10h


; Attributes: bp-based frame

sub_4F5640 proc	near

var_188= dword ptr -188h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_156= byte ptr -156h
var_155= byte ptr -155h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= byte ptr -138h
var_124= byte ptr -124h
var_118= dword ptr -118h
var_114= byte ptr -114h
var_110= byte ptr -110h
var_F8=	byte ptr -0F8h
var_D4=	byte ptr -0D4h
var_C8=	byte ptr -0C8h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_9C=	byte ptr -9Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_4C=	dword ptr -4Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 188h
mov	[ebp+var_188], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F5675
mov	ecx, [ebp+var_188]
mov	edx, [ecx+4]
push	edx
push	offset aImitationstink ; "ImitationStinkBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F5675:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F568A
mov	eax, 1
jmp	loc_4F59D3

loc_4F568A:
lea	eax, [ebp+var_155]
push	eax
lea	ecx, [ebp+var_156]
push	ecx
lea	ecx, [ebp+var_110]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_110]
push	edx
mov	ecx, [ebp+var_188]
call	sub_F79E10
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [eax+10h]
push	edx
lea	ecx, [ebp+var_F8]
call	sub_42DA70
lea	eax, [ebp+var_D4]
mov	[ebp+var_15C], eax
mov	ecx, [ebp+var_15C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_15C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F5710
lea	edx, [ebp+var_F8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5710:
movzx	ecx, [ebp+var_C8]
test	ecx, ecx
jnz	short loc_4F5746
mov	[ebp+var_14C], 0
lea	ecx, [ebp+var_F8]
call	sub_4E5560
lea	ecx, [ebp+var_110]
call	sub_4FFBC0
mov	eax, [ebp+var_14C]
jmp	loc_4F59D3

loc_4F5746:
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_164], eax
mov	ecx, [edx+14h]
mov	[ebp+var_160], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_148]
call	sub_401100
mov	[ebp+var_148], offset off_1558464
mov	edx, [ebp+var_164]
mov	[ebp+var_140], edx
mov	eax, [ebp+var_160]
mov	[ebp+var_13C], eax
lea	ecx, [ebp+var_138]
call	sub_DB3F60
mov	[ebp+var_118], 23h
lea	ecx, [ebp+var_124]
mov	[ebp+var_168], ecx
mov	edx, [ebp+var_168]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_168]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F57E1
lea	eax, [ebp+var_148]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F57E1:
movzx	edx, [ebp+var_114]
test	edx, edx
jz	short loc_4F582D
mov	[ebp+var_150], 0
lea	ecx, [ebp+var_138]
call	sub_4087D0
lea	ecx, [ebp+var_148]
call	sub_401110
lea	ecx, [ebp+var_F8]
call	sub_4E5560
lea	ecx, [ebp+var_110]
call	sub_4FFBC0
mov	eax, [ebp+var_150]
jmp	loc_4F59D3

loc_4F582D:
mov	eax, [ebp+var_188]
mov	byte ptr [eax+34h], 1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_170], edx
mov	eax, [ecx+14h]
mov	[ebp+var_16C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	ecx, [ebp+var_170]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_16C]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_28]
call	sub_DB3E90
mov	[ebp+var_8], 23h
mov	[ebp+var_4], 1
lea	eax, [ebp+var_14]
mov	[ebp+var_174], eax
mov	ecx, [ebp+var_174]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_174]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F58BF
lea	edx, [ebp+var_38]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F58BF:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_17C], edx
mov	eax, [ecx+14h]
mov	[ebp+var_178], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_C0]
call	sub_401100
mov	[ebp+var_C0], offset off_158190C
mov	ecx, [ebp+var_17C]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_178]
mov	[ebp+var_B4], edx
lea	ecx, [ebp+var_B0]
call	sub_E7C1E0
push	offset aImitate	; "imitate"
lea	ecx, [ebp+var_74]
call	sub_402400
mov	eax, [ebp+var_188]
mov	ecx, [eax+8]
mov	[ebp+var_78], ecx
movss	xmm0, ds:flt_1513C00
movss	[ebp+var_4C], xmm0
lea	edx, [ebp+var_9C]
mov	[ebp+var_180], edx
mov	eax, [ebp+var_180]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_180]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F5977
lea	ecx, [ebp+var_C0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5977:
mov	[ebp+var_154], 1
lea	ecx, [ebp+var_C0]
call	sub_4E54F0
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_138]
call	sub_4087D0
lea	ecx, [ebp+var_148]
call	sub_401110
lea	ecx, [ebp+var_F8]
call	sub_4E5560
lea	ecx, [ebp+var_110]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_154]

loc_4F59D3:
mov	esp, ebp
pop	ebp
retn	8
sub_4F5640 endp

align 10h


; Attributes: bp-based frame

sub_4F59E0 proc	near

var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= byte ptr -110h
var_F8=	dword ptr -0F8h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	byte ptr -0E8h
var_D4=	byte ptr -0D4h
var_C8=	dword ptr -0C8h
var_C4=	byte ptr -0C4h
var_C0=	byte ptr -0C0h
var_9C=	byte ptr -9Ch
var_90=	byte ptr -90h
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_64=	byte ptr -64h
var_58=	byte ptr -58h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 140h
mov	[ebp+var_140], ecx
mov	eax, [ebp+var_140]
movzx	ecx, byte ptr [eax+34h]
test	ecx, ecx
jnz	short loc_4F5A02
jmp	loc_4F5CD8

loc_4F5A02:
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
push	eax
mov	ecx, [edx+10h]
push	ecx
lea	ecx, [ebp+var_C0]
call	sub_42DA70
lea	edx, [ebp+var_9C]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_114]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_114]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F5A58
lea	ecx, [ebp+var_C0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5A58:
movzx	eax, [ebp+var_90]
test	eax, eax
jnz	short loc_4F5A73
lea	ecx, [ebp+var_C0]
call	sub_4E5560
jmp	loc_4F5CD8

loc_4F5A73:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_11C], edx
mov	eax, [ecx+14h]
mov	[ebp+var_118], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_F8]
call	sub_401100
mov	[ebp+var_F8], offset off_1558464
mov	ecx, [ebp+var_11C]
mov	[ebp+var_F0], ecx
mov	edx, [ebp+var_118]
mov	[ebp+var_EC], edx
lea	ecx, [ebp+var_E8]
call	sub_DB3F60
mov	[ebp+var_C8], 23h
lea	eax, [ebp+var_D4]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_120]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_120]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F5B0F
lea	edx, [ebp+var_F8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5B0F:
movzx	ecx, [ebp+var_C4]
test	ecx, ecx
jnz	short loc_4F5B40
lea	ecx, [ebp+var_E8]
call	sub_4087D0
lea	ecx, [ebp+var_F8]
call	sub_401110
lea	ecx, [ebp+var_C0]
call	sub_4E5560
jmp	loc_4F5CD8

loc_4F5B40:
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_128], eax
mov	ecx, [edx+14h]
mov	[ebp+var_124], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	edx, [ebp+var_128]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_124]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_28]
call	sub_DB3E90
mov	[ebp+var_8], 23h
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_14]
mov	[ebp+var_12C], ecx
mov	edx, [ebp+var_12C]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_12C]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F5BC7
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5BC7:
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_134], eax
mov	ecx, [edx+14h]
mov	[ebp+var_130], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_88]
call	sub_401100
mov	[ebp+var_88], offset off_1581910
mov	edx, [ebp+var_134]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_130]
mov	[ebp+var_7C], eax
lea	ecx, [ebp+var_78]
call	sub_E7C090
mov	ecx, [ebp+var_140]
add	ecx, 0Ch
push	ecx
lea	edx, [ebp+var_110]
push	edx
call	sub_10F4BF0
add	esp, 8
push	eax
lea	ecx, [ebp+var_58]
call	sub_4022F0
lea	ecx, [ebp+var_110]
call	sub_407910
lea	eax, [ebp+var_64]
mov	[ebp+var_138], eax
mov	ecx, [ebp+var_138]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_138]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F5C7A
lea	edx, [ebp+var_88]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5C7A:
lea	ecx, [ebp+var_78]
mov	[ebp+var_13C], ecx
mov	ecx, [ebp+var_13C]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_13C]
call	sub_4087D0
lea	ecx, [ebp+var_88]
call	sub_401110
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_E8]
call	sub_4087D0
lea	ecx, [ebp+var_F8]
call	sub_401110
lea	ecx, [ebp+var_C0]
call	sub_4E5560

loc_4F5CD8:
mov	esp, ebp
pop	ebp
retn	4
sub_4F59E0 endp

align 10h


; Attributes: bp-based frame

sub_4F5CE0 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AE=	byte ptr -0AEh
var_AD=	byte ptr -0ADh
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_50=	dword ptr -50h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Bh]
test	ecx, ecx
jz	short loc_4F5D04
mov	eax, 1
jmp	loc_4F5ECB

loc_4F5D04:
lea	edx, [ebp+var_AD]
push	edx
lea	eax, [ebp+var_AE]
push	eax
lea	ecx, [ebp+var_50]
call	sub_489470
call	nullsub_1
lea	ecx, [ebp+var_50]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_F79E10
lea	ecx, [ebp+var_79]
call	sub_401EF0
push	eax
push	offset aFlags_on ; "flags_on"
lea	ecx, [ebp+var_78]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+0C4h+var_C4]
lea	edx, [ebp+var_78]
push	edx		; int
lea	eax, [ebp+var_50]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	ecx, [ebp+var_C0]
mov	[ecx+34h], eax
lea	ecx, [ebp+var_78]
call	sub_407E50
lea	ecx, [ebp+var_79]
call	nullsub_1
lea	ecx, [ebp+var_A5]
call	sub_401EF0
push	eax
push	offset aFlags_off ; "flags_off"
lea	ecx, [ebp+var_A4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+0C4h+var_C4]
lea	edx, [ebp+var_A4]
push	edx		; int
lea	eax, [ebp+var_50]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	ecx, [ebp+var_C0]
mov	[ecx+38h], eax
lea	ecx, [ebp+var_A4]
call	sub_407E50
lea	ecx, [ebp+var_A5]
call	nullsub_1
movzx	edx, byte_1889845
test	edx, edx
jz	short loc_4F5E0B
mov	eax, [ebp+var_C0]
mov	ecx, [eax+38h]
push	ecx
mov	edx, [ebp+var_C0]
mov	eax, [edx+34h]
push	eax
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+4]
push	edx
push	offset aChangeidleflag ; "ChangeIdleFlagsBehavior--> %d	on:%d off"...
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 14h

loc_4F5E0B:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_B8], edx
mov	eax, [ecx+4]
mov	[ebp+var_B4], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	ecx, [ebp+var_B8]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_B4]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_28]
call	sub_D92D20
mov	eax, [ebp+var_C0]
mov	ecx, [eax+34h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C0]
mov	eax, [edx+38h]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_14]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_BC]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_BC]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F5E9E
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5E9E:
mov	[ebp+var_AC], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_50]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_AC]

loc_4F5ECB:
mov	esp, ebp
pop	ebp
retn	8
sub_4F5CE0 endp

align 10h


; Attributes: bp-based frame

sub_4F5EE0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F5F1A
mov	ecx, [ebp+var_48]
mov	edx, [ecx+38h]
push	edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+34h]
push	ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
push	eax
push	offset aChangeidlefl_0 ; "ChangeIdleFlagsBehavior off--> %d on:%d"...
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 14h

loc_4F5F1A:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_40], eax
mov	ecx, [edx+4]
mov	[ebp+var_3C], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	edx, [ebp+var_40]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_28]
call	sub_D92D20
mov	ecx, [ebp+var_48]
mov	edx, [ecx+38h]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+34h]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_14]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_44]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F5F93
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F5F93:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	4
sub_4F5EE0 endp

align 10h


; Attributes: bp-based frame

sub_4F5FB0 proc	near

var_298= dword ptr -298h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_287= byte ptr -287h
var_286= byte ptr -286h
var_285= byte ptr -285h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_160= dword ptr -160h
var_15C= byte ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= byte ptr -108h
var_107= byte ptr -107h
var_106= byte ptr -106h
var_105= byte ptr -105h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_F9=	byte ptr -0F9h
var_F8=	dword ptr -0F8h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C4=	dword ptr -0C4h
var_BC=	byte ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A4=	byte ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_68=	byte ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4F5FB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 284h
push	esi
mov	[ebp+var_27C], ecx
mov	[ebp+var_104], 0
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F6005
mov	ecx, [ebp+var_27C]
mov	edx, [ecx+4]
push	edx
push	offset aChainbehaviorD ; "ChainBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F6005:
lea	ecx, [ebp+var_105]
push	ecx
lea	edx, [ebp+var_106]
push	edx
lea	ecx, [ebp+var_2C]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_27C]
call	sub_F79E10
mov	[ebp+var_10], 0
lea	ecx, [ebp+var_107]
mov	[ebp+var_280], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_108]
mov	[ebp+var_284], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_280]
push	eax
mov	ecx, [ebp+var_284]
push	ecx
lea	ecx, [ebp+var_44]
call	sub_438BB0
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_108]
call	sub_42CA30
mov	byte ptr [ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_14], 0
mov	edx, [ebp+var_24]
mov	[ebp+var_10C], edx
mov	ecx, [ebp+var_10C]
lea	eax, [ebp+var_48]
call	sub_4046E0
jmp	short loc_4F60B8

loc_4F60A9:
mov	eax, [ebp+var_48]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_48], eax

loc_4F60B8:
lea	ecx, [ebp+var_2C]
lea	eax, [ebp+var_B0]
call	sub_4046E0
lea	ecx, [ebp+var_114]
mov	[ebp+var_110], ecx
mov	ecx, [ebp+var_B0]
mov	eax, [ebp+var_110]
call	sub_4046E0
mov	edx, [ebp+var_48]
xor	eax, eax
cmp	edx, [ebp+var_114]
setnz	al
mov	[ebp+var_285], al
movzx	ecx, [ebp+var_285]
test	ecx, ecx
jz	short loc_4F6159
mov	edx, [ebp+var_48]
add	edx, 10h
mov	[ebp+var_118], edx
lea	eax, [ebp+var_14]
push	eax
push	offset aBehaviorD ; "behavior %d"
mov	eax, [ebp+var_118]
call	sub_412770
push	eax		; Src
call	_swscanf_s
add	esp, 0Ch
test	eax, eax
jle	short loc_4F6154
mov	ecx, [ebp+var_48]
add	ecx, 10h
mov	[ebp+var_11C], ecx
mov	edx, [ebp+var_11C]
cvttss2si esi, dword ptr [edx+28h]
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_44]
call	sub_48CCC0
mov	[eax], esi

loc_4F6154:
jmp	loc_4F60A9

loc_4F6159:
mov	ecx, [ebp+var_34]
mov	[ebp+var_150], ecx
cmp	[ebp+var_150], 0
jz	loc_4F668A
mov	edx, [ebp+var_3C]
mov	[ebp+var_154], edx
mov	ecx, [ebp+var_154]
lea	eax, [ebp+var_B4]
call	sub_4046E0
mov	eax, [ebp+var_B4]
mov	ecx, [eax+14h]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_158], edx
mov	ecx, [ebp+var_158]
lea	eax, [ebp+var_B8]
call	sub_4046E0
mov	eax, [ebp+var_B8]
mov	ecx, [eax+10h]
mov	[ebp+var_4C], ecx
mov	[ebp+var_50], 0
lea	edx, [ebp+var_BC]
push	edx
lea	ecx, [ebp+var_44]
call	sub_502290
lea	eax, [ebp+var_BC]
push	eax
lea	ecx, [ebp+var_15C]
call	sub_4ABD70
lea	ecx, [ebp+var_15C]
call	sub_502300
mov	[ebp+var_160], eax
lea	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+var_160]
mov	eax, [edx]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	ecx, [ebp+var_27C]
call	sub_4F66F0
mov	edx, [ebp+var_3C]
mov	[ebp+var_1D0], edx
mov	ecx, [ebp+var_1D0]
lea	eax, [ebp+var_94]
call	sub_4046E0

loc_4F6236:
mov	eax, [ebp+var_94]
mov	ecx, [eax+14h]
mov	[ebp+var_98], ecx
lea	ecx, [ebp+var_44]
lea	eax, [ebp+var_C4]
call	sub_4046E0
lea	edx, [ebp+var_1D8]
mov	[ebp+var_1D4], edx
mov	ecx, [ebp+var_C4]
mov	eax, [ebp+var_1D4]
call	sub_4046E0
mov	eax, [ebp+var_94]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
xor	edx, edx
cmp	ecx, [ebp+var_1D8]
setz	dl
mov	[ebp+var_286], dl
movzx	eax, [ebp+var_286]
test	eax, eax
jz	short loc_4F62A9
jmp	short loc_4F6311

loc_4F62A9:
mov	[ebp+var_9C], 0
lea	ecx, [ebp+var_9C]
push	ecx
mov	edx, [ebp+var_98]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	ecx, [ebp+var_27C]
call	sub_4F66F0
movzx	eax, al
test	eax, eax
jz	short loc_4F630C
mov	ecx, [ebp+var_9C]
cmp	ecx, [ebp+var_50]
jb	short loc_4F630C
mov	edx, [ebp+var_94]
mov	eax, [edx+14h]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx+10h]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_50], eax

loc_4F630C:
jmp	loc_4F6236

loc_4F6311:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Ch]
test	edx, edx
jz	short loc_4F6331
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
call	sub_50E110
add	esp, 8
jmp	loc_4F6432

loc_4F6331:
mov	dword ptr [ebp+var_A4],	0
mov	edx, [ebp+arg_4]
push	edx		; int
lea	eax, [ebp+var_A4]
push	eax		; void *
call	sub_50DDD0
add	esp, 8
lea	ecx, [ebp+var_A4]
push	ecx
lea	ecx, [ebp+var_44]
call	sub_450A50
mov	[ebp+var_248], eax
mov	ecx, [ebp+var_248]
lea	eax, [ebp+var_A0]
call	sub_4046E0
lea	ecx, [ebp+var_44]
lea	eax, [ebp+var_CC]
call	sub_4046E0
lea	edx, [ebp+var_250]
mov	[ebp+var_24C], edx
mov	ecx, [ebp+var_CC]
mov	eax, [ebp+var_24C]
call	sub_4046E0
mov	eax, [ebp+var_A0]
xor	ecx, ecx
cmp	eax, [ebp+var_250]
setz	cl
mov	[ebp+var_287], cl
movzx	edx, [ebp+var_287]
test	edx, edx
jz	short loc_4F63DF
mov	eax, dword ptr [ebp+var_A4]
push	eax		; char
push	offset aChainBehaviorI ; "Chain	behavior invalid serialization in"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h
jmp	short loc_4F6432

loc_4F63DF:
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+14h]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
cmp	eax, [ebp+var_90]
jz	short loc_4F6432
movzx	ecx, byte_1889845
test	ecx, ecx
jz	short loc_4F6426
mov	edx, [ebp+var_90]
push	edx
mov	eax, [ebp+var_A8]
push	eax
push	offset aSerializedIdDi ; "Serialized ID	different from ours: %d	%"...
mov	ecx, [ebp+arg_0]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_4F6426:
mov	edx, [ebp+var_A8]
mov	[ebp+var_90], edx

loc_4F6432:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_90]
push	edx
mov	ecx, [ebp+var_27C]
call	sub_FB0570
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_258], ecx
mov	edx, [eax+4]
mov	[ebp+var_254], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_8C]
call	sub_401100
mov	[ebp+var_8C], offset off_1558464
mov	eax, [ebp+var_258]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_254]
mov	[ebp+var_80], ecx
lea	ecx, [ebp+var_7C]
call	sub_DD5FF0
push	38h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_D0], eax
cmp	[ebp+var_D0], 0
jz	loc_4F65E4
or	[ebp+var_104], 1
lea	ecx, [ebp+var_F9]
call	sub_401EF0
push	eax
push	offset aChain_delay ; "chain_delay"
lea	ecx, [ebp+var_F8]
call	sub_407810
or	[ebp+var_104], 2
mov	edx, [ebp+arg_0]
mov	eax, [edx+50h]
mov	[ebp+var_274], eax
mov	ecx, [ebp+var_27C]
mov	edx, [ecx+4]
mov	[ebp+var_270], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	[ebp+var_26C], ecx
mov	edx, [eax+24h]
mov	[ebp+var_268], edx
push	ecx		; float
fld	ds:dword_1479C58
fstp	[esp+298h+var_298]
lea	eax, [ebp+var_F8]
push	eax		; int
lea	ecx, [ebp+var_2C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fmul	ds:flt_15BF168
call	__ftol2_sse
mov	[ebp+var_264], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_260], eax
mov	ecx, [edx+4]
mov	[ebp+var_25C], ecx
cmp	[ebp+var_264], 0
jnz	short loc_4F6568
mov	[ebp+var_28C], 0FFFFFFFFh
jmp	short loc_4F6574

loc_4F6568:
mov	edx, [ebp+var_264]
mov	[ebp+var_28C], edx

loc_4F6574:
mov	eax, [ebp+var_274]
push	eax
push	1
push	1
push	26h
mov	ecx, [ebp+var_28C]
push	ecx
push	1
mov	edx, [ebp+var_25C]
push	edx
mov	eax, [ebp+var_260]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_4E56A0
mov	ecx, [ebp+var_D0]
mov	dword ptr [ecx], offset	off_158181C
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_26C]
mov	[edx+28h], eax
mov	ecx, [ebp+var_268]
mov	[edx+2Ch], ecx
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_270]
mov	[edx+30h], eax
mov	ecx, [ebp+var_D0]
mov	[ebp+var_290], ecx
jmp	short loc_4F65EE

loc_4F65E4:
mov	[ebp+var_290], 0

loc_4F65EE:
mov	edx, [ebp+var_290]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_104]
and	eax, 2
jz	short loc_4F6614
and	[ebp+var_104], 0FFFFFFFDh
lea	ecx, [ebp+var_F8]
call	sub_407E50

loc_4F6614:
mov	ecx, [ebp+var_104]
and	ecx, 1
jz	short loc_4F6631
and	[ebp+var_104], 0FFFFFFFEh
lea	ecx, [ebp+var_F9]
call	nullsub_1

loc_4F6631:
mov	edx, [ebp+var_90]
mov	[ebp+var_58], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_278], eax
mov	ecx, [ebp+var_278]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_278]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F6677
lea	edx, [ebp+var_8C]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F6677:
lea	ecx, [ebp+var_7C]
call	sub_4087D0
lea	ecx, [ebp+var_8C]
call	sub_401110

loc_4F668A:
mov	ecx, [ebp+var_10]
mov	[ebp+var_100], ecx
mov	[ebp+var_4], 5
mov	[ebp+var_4], 7
lea	ecx, [ebp+var_44]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_30]
call	sub_42CA30
mov	[ebp+var_4], 8
mov	[ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_2C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_100]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4F5FB0 endp

align 10h


; Attributes: bp-based frame

sub_4F66F0 proc	near

var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_54=	dword ptr -54h
var_4E=	byte ptr -4Eh
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A0], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_40]
call	sub_401100
mov	[ebp+var_40], offset off_1581920
mov	eax, [ebp+arg_0]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_30]
call	sub_E308C0
mov	edx, [ebp+arg_8]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_54]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F675E
lea	edx, [ebp+var_40]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F675E:
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx], 0
lea	ecx, [ebp+var_10]
call	sub_467E60
test	eax, eax
jz	loc_4F6883
mov	edx, [ebp+var_10]
mov	[ebp+var_74], edx
mov	ecx, [ebp+var_74]
lea	eax, [ebp+var_44]
call	sub_4046E0
jmp	short loc_4F6792

loc_4F678A:
lea	eax, [ebp+var_44]
call	sub_405E90

loc_4F6792:
lea	ecx, [ebp+var_10]
lea	eax, [ebp+var_4C]
call	sub_4046E0
lea	eax, [ebp+var_7C]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_78]
call	sub_4046E0
mov	ecx, [ebp+var_44]
xor	edx, edx
cmp	ecx, [ebp+var_7C]
setnz	dl
mov	[ebp+var_A1], dl
movzx	eax, [ebp+var_A1]
test	eax, eax
jz	loc_4F6850
mov	ecx, [ebp+var_44]
add	ecx, 8
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	eax, [edx]
mov	ecx, [eax+20h]
mov	[ebp+var_84], ecx
cmp	[ebp+var_84], 0
jnz	short loc_4F67F9
mov	edx, [ebp+arg_C]
mov	dword ptr [edx], 0FFFFFFFFh
jmp	short loc_4F684B

loc_4F67F9:
mov	eax, [ebp+var_44]
add	eax, 8
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx]
mov	eax, [edx+20h]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_8C]
cmp	edx, [ecx]
jbe	short loc_4F684B
mov	eax, [ebp+var_44]
add	eax, 8
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
mov	edx, [ecx]
mov	eax, [edx+20h]
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_94]
mov	[ecx], edx

loc_4F684B:
jmp	loc_4F678A

loc_4F6850:
mov	[ebp+var_4D], 1
lea	eax, [ebp+var_30]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
add	ecx, 20h
call	sub_5D2630
mov	ecx, [ebp+var_98]
call	sub_4087D0
lea	ecx, [ebp+var_40]
call	sub_401110
mov	al, [ebp+var_4D]
jmp	short loc_4F68B4

loc_4F6883:
mov	[ebp+var_4E], 0
lea	ecx, [ebp+var_30]
mov	[ebp+var_9C], ecx
mov	ecx, [ebp+var_9C]
add	ecx, 20h
call	sub_5D2630
mov	ecx, [ebp+var_9C]
call	sub_4087D0
lea	ecx, [ebp+var_40]
call	sub_401110
mov	al, [ebp+var_4E]

loc_4F68B4:
mov	esp, ebp
pop	ebp
retn	10h
sub_4F66F0 endp

align 10h


; Attributes: bp-based frame

sub_4F68C0 proc	near

var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_192= byte ptr -192h
var_191= byte ptr -191h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_185= byte ptr -185h
var_184= dword ptr -184h
var_159= byte ptr -159h
var_158= dword ptr -158h
var_130= dword ptr -130h
var_129= byte ptr -129h
var_128= dword ptr -128h
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_A8=	dword ptr -0A8h
var_A0=	qword ptr -0A0h
var_98=	byte ptr -98h
var_84=	byte ptr -84h
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_70=	dword ptr -70h
var_68=	qword ptr -68h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	qword ptr -40h
var_38=	qword ptr -38h
var_2C=	dword ptr -2Ch
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	qword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1C0h
mov	[ebp+var_1A0], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F68F5
mov	ecx, [ebp+var_1A0]
mov	edx, [ecx+4]
push	edx
push	offset aChangeorientat ; "ChangeOrientationBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F68F5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F690A
mov	eax, 1
jmp	loc_4F6DAA

loc_4F690A:
lea	eax, [ebp+var_191]
push	eax
lea	ecx, [ebp+var_192]
push	ecx
lea	ecx, [ebp+var_2C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_1A0]
call	sub_F79E10
lea	ecx, [ebp+var_D1]
call	sub_401EF0
push	eax
push	offset aOrient_caster ;	"orient_caster"
lea	ecx, [ebp+var_D0]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+1C4h+var_1C4]
lea	eax, [ebp+var_D0]
push	eax		; int
lea	ecx, [ebp+var_2C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F6983
mov	[ebp+var_1A4], 1
jmp	short loc_4F698D

loc_4F6983:
mov	[ebp+var_1A4], 0

loc_4F698D:
mov	dl, byte ptr [ebp+var_1A4]
mov	[ebp+var_1], dl
lea	ecx, [ebp+var_D0]
call	sub_407E50
lea	ecx, [ebp+var_D1]
call	nullsub_1
lea	ecx, [ebp+var_FD]
call	sub_401EF0
push	eax
push	offset aTo_target ; "to_target"
lea	ecx, [ebp+var_FC]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+1C4h+var_1C4]
lea	eax, [ebp+var_FC]
push	eax		; int
lea	ecx, [ebp+var_2C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F69FB
mov	[ebp+var_1A8], 1
jmp	short loc_4F6A05

loc_4F69FB:
mov	[ebp+var_1A8], 0

loc_4F6A05:
mov	dl, byte ptr [ebp+var_1A8]
mov	[ebp+var_12], dl
lea	ecx, [ebp+var_FC]
call	sub_407E50
lea	ecx, [ebp+var_FD]
call	nullsub_1
lea	ecx, [ebp+var_129]
call	sub_401EF0
push	eax
push	offset aTo_angle ; "to_angle"
lea	ecx, [ebp+var_128]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1C4h+var_1C4]
lea	eax, [ebp+var_128]
push	eax		; int
lea	ecx, [ebp+var_2C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F6A73
mov	[ebp+var_1AC], 1
jmp	short loc_4F6A7D

loc_4F6A73:
mov	[ebp+var_1AC], 0

loc_4F6A7D:
mov	dl, byte ptr [ebp+var_1AC]
mov	[ebp+var_11], dl
lea	ecx, [ebp+var_128]
call	sub_407E50
lea	ecx, [ebp+var_129]
call	nullsub_1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_4F6ABA
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1B4], edx
mov	eax, [ecx+4]
mov	[ebp+var_1B0], eax
jmp	short loc_4F6ACF

loc_4F6ABA:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_1B4], edx
mov	eax, [ecx+14h]
mov	[ebp+var_1B0], eax

loc_4F6ACF:
mov	ecx, [ebp+var_1B4]
mov	dword ptr [ebp+var_10],	ecx
mov	edx, [ebp+var_1B0]
mov	dword ptr [ebp+var_10+4], edx
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_4F6B00
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_1BC], edx
mov	eax, [ecx+14h]
mov	[ebp+var_1B8], eax
jmp	short loc_4F6B14

loc_4F6B00:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1BC], edx
mov	eax, [ecx+4]
mov	[ebp+var_1B8], eax

loc_4F6B14:
mov	ecx, [ebp+var_1BC]
mov	dword ptr [ebp+var_38],	ecx
mov	edx, [ebp+var_1B8]
mov	dword ptr [ebp+var_38+4], edx
mov	eax, dword ptr [ebp+var_10]
or	eax, dword ptr [ebp+var_10+4]
jz	loc_4F6D8D
mov	ecx, dword ptr [ebp+var_10]
cmp	ecx, dword ptr [ebp+var_38]
jnz	short loc_4F6B46
mov	edx, dword ptr [ebp+var_10+4]
cmp	edx, dword ptr [ebp+var_38+4]
jz	loc_4F6D8D

loc_4F6B46:
movzx	eax, [ebp+var_12]
test	eax, eax
jz	loc_4F6C03
mov	ecx, dword ptr [ebp+var_38]
or	ecx, dword ptr [ebp+var_38+4]
jz	loc_4F6C03
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	edx, dword ptr [ebp+var_10]
mov	dword ptr [ebp+var_68],	edx
mov	eax, dword ptr [ebp+var_10+4]
mov	dword ptr [ebp+var_68+4], eax
lea	ecx, [ebp+var_60]
call	sub_DAB570
mov	ecx, dword ptr [ebp+var_38]
mov	dword ptr [ebp+var_40],	ecx
mov	edx, dword ptr [ebp+var_38+4]
mov	dword ptr [ebp+var_40+4], edx
lea	eax, [ebp+var_4C]
mov	[ebp+var_198], eax
mov	ecx, [ebp+var_198]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_198]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F6BCC
lea	edx, [ebp+var_70]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F6BCC:
mov	[ebp+var_130], 1
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	ecx, [ebp+var_2C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_130]
jmp	loc_4F6DAA
jmp	loc_4F6D8D

loc_4F6C03:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_4F6D8D
mov	ecx, 138Bh
lea	eax, [ebp+var_A8]
call	sub_401100
mov	[ebp+var_A8], offset off_1558464
mov	edx, dword ptr [ebp+var_10]
mov	dword ptr [ebp+var_A0],	edx
mov	eax, dword ptr [ebp+var_10+4]
mov	dword ptr [ebp+var_A0+4], eax
lea	ecx, [ebp+var_98]
call	sub_DAB0B0
lea	ecx, [ebp+var_159]
call	sub_401EF0
push	eax
push	offset aAngle	; "angle"
lea	ecx, [ebp+var_158]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1C4h+var_1C4]
lea	ecx, [ebp+var_158]
push	ecx		; int
lea	edx, [ebp+var_2C]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fmul	ds:dword_1513BE8
fdiv	ds:dword_15FCD3C
fstp	[ebp+var_78]
lea	ecx, [ebp+var_158]
call	sub_407E50
lea	ecx, [ebp+var_159]
call	nullsub_1
lea	ecx, [ebp+var_185]
call	sub_401EF0
push	eax
push	offset aRelative ; "relative"
lea	ecx, [ebp+var_184]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1C4h+var_1C4]
lea	eax, [ebp+var_184]
push	eax		; int
lea	ecx, [ebp+var_2C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F6CEF
mov	[ebp+var_1C0], 1
jmp	short loc_4F6CF9

loc_4F6CEF:
mov	[ebp+var_1C0], 0

loc_4F6CF9:
mov	dl, byte ptr [ebp+var_1C0]
mov	[ebp+var_74], dl
lea	ecx, [ebp+var_184]
call	sub_407E50
lea	ecx, [ebp+var_185]
call	nullsub_1
lea	eax, [ebp+var_84]
mov	[ebp+var_19C], eax
mov	ecx, [ebp+var_19C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_19C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F6D58
lea	edx, [ebp+var_A8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F6D58:
mov	[ebp+var_18C], 1
lea	ecx, [ebp+var_98]
call	sub_4087D0
lea	ecx, [ebp+var_A8]
call	sub_401110
lea	ecx, [ebp+var_2C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_18C]
jmp	short loc_4F6DAA

loc_4F6D8D:
mov	[ebp+var_190], 0
lea	ecx, [ebp+var_2C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_190]

loc_4F6DAA:
mov	esp, ebp
pop	ebp
retn	8
sub_4F68C0 endp



; Attributes: bp-based frame

sub_4F6DB0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	esi
push	edi
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+50h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	dword ptr [edx], offset	off_158181C
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+10h], 0FFFFFFFFh
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+14h], 18h
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_8]
mov	[edx+18h], eax
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+1Ch], 0FFFFFFFFh
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_2C]
mov	byte ptr [eax+24h], 1
mov	ecx, [ebp+var_2C]
mov	byte ptr [ecx+25h], 0
mov	edx, [ebp+var_2C]
mov	byte ptr [edx+26h], 0
mov	eax, [ebp+var_2C]
mov	byte ptr [eax+27h], 1
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx], offset	off_1581548
mov	esi, [ebp+arg_8]
mov	edi, [ebp+var_2C]
add	edi, 28h
mov	ecx, 16h
rep movsd
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_C]
mov	[edx+80h], eax
mov	ecx, [ebp+var_2C]
add	ecx, 84h
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_10]
push	edx
mov	ecx, [ebp+var_C]
call	sub_501020
lea	eax, [ebp+var_1]
call	nullsub_1
mov	[ebp+var_28], eax
mov	eax, [ebp+var_2C]
add	eax, 9Ch
mov	[ebp+var_24], eax
xor	ecx, ecx
mov	[ebp+var_1C], ecx
mov	[ebp+var_18], ecx
mov	[ebp+var_14], ecx
mov	[ebp+var_10], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[edx+4], ecx
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_10]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_24]
call	sub_5E1170
mov	ecx, [ebp+var_24]
call	sub_5E11A0
mov	eax, [ebp+var_24]
mov	dword ptr [eax+10h], 0
mov	cl, [ebp+var_2]
mov	edx, [ebp+var_24]
mov	[edx+14h], cl
lea	ecx, [ebp+var_2]
call	sub_42CA30
call	nullsub_1
mov	eax, [ebp+arg_8]
cmp	dword ptr [eax+4Ch], 1
jnz	short loc_4F6EEA
mov	ecx, [ebp+var_2C]
mov	byte ptr [ecx+27h], 0

loc_4F6EEA:
mov	eax, [ebp+var_2C]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_4F6DB0 endp

align 10h


; Attributes: bp-based frame

sub_4F6F00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 0
jnz	short loc_4F6F11
jmp	short loc_4F6F2F

loc_4F6F11:
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
add	ecx, 9Ch
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_503940

loc_4F6F2F:
mov	esp, ebp
pop	ebp
retn	4
sub_4F6F00 endp

align 10h


; Attributes: bp-based frame

sub_4F6F40 proc	near

var_4B0= dword ptr -4B0h
var_4AC= dword ptr -4ACh
var_4A8= dword ptr -4A8h
var_4A4= dword ptr -4A4h
var_4A0= dword ptr -4A0h
var_49C= dword ptr -49Ch
var_498= dword ptr -498h
var_494= dword ptr -494h
var_490= dword ptr -490h
var_48C= dword ptr -48Ch
var_488= dword ptr -488h
var_484= dword ptr -484h
var_480= dword ptr -480h
var_47C= dword ptr -47Ch
var_474= dword ptr -474h
var_470= dword ptr -470h
var_46C= dword ptr -46Ch
var_465= byte ptr -465h
var_464= dword ptr -464h
var_460= dword ptr -460h
var_45C= byte ptr -45Ch
var_43A= byte ptr -43Ah
var_439= byte ptr -439h
var_438= dword ptr -438h
var_434= dword ptr -434h
var_430= byte ptr -430h
var_428= dword ptr -428h
var_420= dword ptr -420h
var_41C= byte ptr -41Ch
var_418= byte ptr -418h

push	ebp
mov	ebp, esp
sub	esp, 4B0h
mov	[ebp+var_4A8], ecx
lea	eax, [ebp+var_418]
call	sub_A49A00
mov	eax, [ebp+var_4A8]
xor	ecx, ecx
cmp	dword ptr [eax+0ACh], 0
setz	cl
movzx	edx, cl
test	edx, edx
jnz	loc_4F71D6
lea	eax, [ebp+var_439]
call	nullsub_1
mov	[ebp+var_46C], eax
mov	eax, [ebp+var_46C]
push	eax
lea	ecx, [ebp+var_43A]
push	ecx
lea	ecx, [ebp+var_430]
call	sub_489470
lea	ecx, [ebp+var_43A]
call	sub_42CA30
call	nullsub_1
lea	edx, [ebp+var_488]
mov	[ebp+var_474], edx
mov	eax, [ebp+var_428]
mov	[ebp+var_470], eax
mov	ecx, [ebp+var_470]
mov	eax, [ebp+var_474]
call	sub_4046E0
sub	esp, 8
mov	[ebp+var_48C], esp
lea	ecx, [ebp+var_484]
mov	[ebp+var_47C], ecx
mov	ecx, [ebp+var_488]
mov	eax, [ebp+var_47C]
call	sub_4046E0
mov	edx, [ebp+var_48C]
lea	eax, [ebp+var_430]
mov	[edx], eax
mov	ecx, [ebp+var_48C]
add	ecx, 4
mov	[ebp+var_480], ecx
mov	ecx, [ebp+var_484]
mov	eax, [ebp+var_480]
call	sub_4046E0
mov	edx, [ebp+var_48C]
mov	[ebp+var_4AC], edx
push	ecx
mov	[ebp+var_490], esp
mov	ecx, [ebp+var_4A8]
add	ecx, 84h
mov	eax, [ebp+var_490]
call	sub_4046E0
push	ecx
mov	[ebp+var_498], esp
mov	eax, [ebp+var_4A8]
mov	ecx, [eax+8Ch]
mov	[ebp+var_494], ecx
mov	ecx, [ebp+var_494]
mov	eax, [ebp+var_498]
call	sub_4046E0
push	ecx
mov	[ebp+var_49C], esp
mov	ecx, [ebp+var_4A8]
add	ecx, 9Ch
mov	eax, [ebp+var_49C]
call	sub_4046E0
push	ecx
mov	[ebp+var_4A4], esp
mov	edx, [ebp+var_4A8]
mov	eax, [edx+0A4h]
mov	[ebp+var_4A0], eax
mov	ecx, [ebp+var_4A0]
mov	eax, [ebp+var_4A4]
call	sub_4046E0
lea	ecx, [ebp+var_45C]
push	ecx
call	sub_50E180
add	esp, 1Ch
xor	edx, edx
cmp	[ebp+var_420], 0
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_4F71C0
mov	ecx, [ebp+var_4A8]
mov	edx, [ecx+80h]
push	edx
call	sub_FAF3D0
add	esp, 4
mov	[ebp+var_434], eax
cmp	[ebp+var_434], 0
jz	loc_4F71AF
lea	eax, [ebp+var_418]
push	eax
mov	ecx, [ebp+var_4A8]
add	ecx, 28h
push	ecx
mov	edx, [ebp+var_434]
mov	eax, [edx]
mov	ecx, [ebp+var_434]
mov	edx, [eax+0Ch]
call	edx
mov	[ebp+var_438], eax
cmp	[ebp+var_438], 0
jz	short loc_4F7168
mov	eax, [ebp+var_4A8]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_434]
mov	edx, [ecx]
mov	ecx, [ebp+var_434]
mov	eax, [edx+10h]
call	eax

loc_4F7168:
mov	ecx, [ebp+var_434]
mov	[ebp+var_464], ecx
mov	edx, [ebp+var_464]
mov	[ebp+var_460], edx
cmp	[ebp+var_460], 0
jz	short loc_4F71A5
push	1
mov	eax, [ebp+var_460]
mov	edx, [eax]
mov	ecx, [ebp+var_460]
mov	eax, [edx]
call	eax
mov	[ebp+var_4B0], eax
jmp	short loc_4F71AF

loc_4F71A5:
mov	[ebp+var_4B0], 0

loc_4F71AF:
mov	ecx, [ebp+var_4A8]
add	ecx, 9Ch
call	sub_489010

loc_4F71C0:
lea	ecx, [ebp+var_430]
call	sub_489010
lea	ecx, [ebp+var_41C]
call	sub_42CA30

loc_4F71D6:
mov	ecx, [ebp+var_4A8]
mov	dword ptr [ecx+1Ch], 0FFFFFFFFh
mov	[ebp+var_465], 0
lea	eax, [ebp+var_418]
call	sub_A496A0
mov	al, [ebp+var_465]
mov	esp, ebp
pop	ebp
retn
sub_4F6F40 endp

align 10h


; Attributes: bp-based frame

sub_4F7200 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1581548
mov	ecx, [ebp+var_C]
add	ecx, 9Ch
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	edx, [ebp+var_C]
add	edx, 84h
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_8]
call	sub_489010
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_42CA30
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_158181C
mov	esp, ebp
pop	ebp
retn
sub_4F7200 endp

align 10h


; Attributes: bp-based frame

sub_4F7260 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4F7200
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4F7285
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4F7285:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4F7260 endp

align 10h


; Attributes: bp-based frame

sub_4F7290 proc	near

var_124= dword ptr -124h
var_11D= byte ptr -11Dh
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F2=	byte ptr -0F2h
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	byte ptr -0E8h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D4=	dword ptr -0D4h
var_CF=	byte ptr -0CFh
var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	byte ptr -0CCh
var_A2=	byte ptr -0A2h
var_A1=	byte ptr -0A1h
var_A0=	byte ptr -0A0h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_20=	byte ptr -20h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 124h
mov	[ebp+var_11C], ecx
lea	eax, [ebp+var_F1]
push	eax
lea	ecx, [ebp+var_F2]
push	ecx
lea	ecx, [ebp+var_38]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_11C]
call	sub_F79E10
lea	ecx, [ebp+var_A1]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_A0]
call	sub_407810
lea	eax, [ebp+var_A0]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_A0]
call	sub_407E50
lea	ecx, [ebp+var_A1]
call	nullsub_1
lea	edx, [ebp+var_A2]
push	edx
lea	ecx, [ebp+var_8]
call	sub_594460
lea	ecx, [ebp+var_CD]
call	sub_401EF0
push	eax
push	offset aFaction_list ; "faction_list"
lea	ecx, [ebp+var_CC]
call	sub_407810
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_CC]
push	ecx
lea	edx, [ebp+var_38]
push	edx
call	sub_F90AD0
add	esp, 0Ch
lea	ecx, [ebp+var_CC]
call	sub_407E50
lea	ecx, [ebp+var_CD]
call	nullsub_1
lea	eax, [ebp+var_CE]
call	nullsub_1
mov	[ebp+var_F8], eax
mov	eax, [ebp+var_F8]
push	eax
lea	ecx, [ebp+var_CF]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_489470
lea	ecx, [ebp+var_CF]
call	sub_42CA30
call	nullsub_1
mov	edx, [ebp+var_8]
mov	[ebp+var_FC], edx
mov	ecx, [ebp+var_FC]
lea	eax, [ebp+var_D4]
call	sub_4046E0
mov	ecx, [ebp+var_D4]
lea	eax, [ebp+var_78]
call	sub_4046E0
jmp	short loc_4F73D7

loc_4F73CF:
lea	eax, [ebp+var_78]
call	sub_405E90

loc_4F73D7:
lea	ecx, [ebp+var_8]
lea	eax, [ebp+var_DC]
call	sub_4046E0
lea	eax, [ebp+var_104]
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_DC]
mov	eax, [ebp+var_100]
call	sub_4046E0
mov	ecx, [ebp+var_78]
xor	edx, edx
cmp	ecx, [ebp+var_104]
setnz	dl
mov	[ebp+var_11D], dl
movzx	eax, [ebp+var_11D]
test	eax, eax
jz	short loc_4F7447
mov	ecx, [ebp+var_78]
cvttss2si edx, dword ptr [ecx+8]
mov	[ebp+var_E0], edx
lea	eax, [ebp+var_E0]
push	eax
lea	ecx, [ebp+var_E8]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_48B660
jmp	short loc_4F73CF

loc_4F7447:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_10C], eax
mov	ecx, [edx+4]
mov	[ebp+var_108], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	edx, [ebp+var_10C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_108]
mov	[ebp+var_64], eax
lea	ecx, [ebp+var_60]
call	sub_DD5FF0
mov	ecx, [ebp+var_11C]
mov	edx, [ecx+4]
mov	[ebp+var_3C], edx
push	0B8h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_EC], eax
cmp	[ebp+var_EC], 0
jz	short loc_4F74DA
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_74]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	ecx, [ebp+var_EC]
call	sub_4F6DB0
mov	[ebp+var_124], eax
jmp	short loc_4F74E4

loc_4F74DA:
mov	[ebp+var_124], 0

loc_4F74E4:
mov	eax, [ebp+var_124]
mov	[ebp+var_40], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_118], ecx
mov	edx, [ebp+var_118]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_118]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F7526
lea	eax, [ebp+var_70]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F7526:
movzx	edx, byte_1889845
test	edx, edx
jz	short loc_4F754C
mov	eax, [ebp+var_11C]
mov	ecx, [eax+4]
push	ecx
push	offset aOnkillfactionb ; "OnKillFactionBehavior	--> %d"
mov	edx, [ebp+arg_0]
push	edx
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F754C:
mov	[ebp+var_F0], 0
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_489010
lea	ecx, [ebp+var_C]
call	sub_42CA30
lea	ecx, [ebp+var_8]
call	sub_5D2630
lea	ecx, [ebp+var_38]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_F0]
mov	esp, ebp
pop	ebp
retn	8
sub_4F7290 endp

align 10h


; Attributes: bp-based frame

sub_4F75A0 proc	near

var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_6C=	byte ptr -6Ch
var_60=	dword ptr -60h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_A0], ecx
mov	edx, [eax+4]
mov	[ebp+var_9C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1581928
mov	eax, [ebp+var_A0]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_9C]
mov	[ebp+var_44], ecx
lea	ecx, [ebp+var_40]
call	sub_E2E6F0
mov	[ebp+var_8], 18h
lea	edx, [ebp+var_2C]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_A4]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F7632
lea	ecx, [ebp+var_50]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F7632:
mov	eax, [ebp+var_18]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A8]
lea	eax, [ebp+var_54]
call	sub_4046E0
jmp	short loc_4F765A

loc_4F764B:
mov	ecx, [ebp+var_54]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_54], eax

loc_4F765A:
lea	ecx, [ebp+var_20]
lea	eax, [ebp+var_98]
call	sub_4046E0
lea	edx, [ebp+var_B0]
mov	[ebp+var_AC], edx
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_AC]
call	sub_4046E0
mov	eax, [ebp+var_54]
xor	ecx, ecx
cmp	eax, [ebp+var_B0]
setnz	cl
mov	[ebp+var_CD], cl
movzx	edx, [ebp+var_CD]
test	edx, edx
jz	loc_4F777A
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_CC]
mov	edx, [eax+10h]
cmp	edx, [ecx+4]
jnz	loc_4F7775
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_B8], ecx
mov	edx, [eax+4]
mov	[ebp+var_B4], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_90]
call	sub_401100
mov	[ebp+var_90], offset off_1558464
mov	eax, [ebp+var_B8]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_B4]
mov	[ebp+var_84], ecx
lea	ecx, [ebp+var_80]
call	sub_DD5F70
mov	edx, [ebp+var_54]
add	edx, 10h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_BC]
mov	ecx, [eax+4]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_6C]
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_C0]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F7760
lea	ecx, [ebp+var_90]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F7760:
lea	ecx, [ebp+var_80]
call	sub_4087D0
lea	ecx, [ebp+var_90]
call	sub_401110
jmp	short loc_4F777A

loc_4F7775:
jmp	loc_4F764B

loc_4F777A:
lea	ecx, [ebp+var_50]
call	sub_4FB380
mov	esp, ebp
pop	ebp
retn	4
sub_4F75A0 endp

align 10h


; Attributes: bp-based frame

sub_4F7790 proc	near

var_15C= dword ptr -15Ch
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_132= byte ptr -132h
var_131= byte ptr -131h
var_130= dword ptr -130h
var_129= byte ptr -129h
var_128= dword ptr -128h
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_A8=	dword ptr -0A8h
var_A2=	byte ptr -0A2h
var_A1=	byte ptr -0A1h
var_A0=	byte ptr -0A0h
var_78=	dword ptr -78h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_10=	byte ptr -10h
var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 154h
push	esi
mov	[ebp+var_13C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F77C6
mov	ecx, [ebp+var_13C]
mov	edx, [ecx+4]
push	edx
push	offset aOnshowminimape ; "OnShowMiniMapExtras --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F77C6:
lea	ecx, [ebp+var_40]
push	ecx
call	sub_408780
lea	edx, [ebp+var_40]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
mov	[ebp+var_140], eax
mov	ecx, [ebp+var_140]
mov	edx, [ebp+var_140]
mov	eax, [ecx+10h]
or	eax, [edx+14h]
jz	short loc_4F782F
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_30], edx
mov	eax, [ecx+14h]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_148], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_144], edx
jmp	short loc_4F784F

loc_4F782F:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_30], ecx
mov	edx, [eax+4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_148], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_144], ecx

loc_4F784F:
mov	edx, [ebp+var_38]
cmp	edx, [ebp+var_30]
jnz	short loc_4F785F
mov	eax, [ebp+var_34]
cmp	eax, [ebp+var_2C]
jz	short loc_4F787D

loc_4F785F:
mov	[ebp+var_A8], 0
lea	ecx, [ebp+var_40]
push	ecx
call	sub_409000
mov	eax, [ebp+var_A8]
jmp	loc_4F7B30

loc_4F787D:
lea	edx, [ebp+var_131]
push	edx
lea	eax, [ebp+var_132]
push	eax
lea	ecx, [ebp+var_28]
call	sub_489470
call	nullsub_1
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_13C]
call	sub_F79E10
lea	ecx, [ebp+var_D1]
call	sub_401EF0
push	eax
push	offset aShow_pet_digs ;	"show_pet_digs"
lea	ecx, [ebp+var_D0]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+15Ch+var_15C]
lea	edx, [ebp+var_D0]
push	edx		; int
lea	eax, [ebp+var_28]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F78F6
mov	[ebp+var_14C], 1
jmp	short loc_4F7900

loc_4F78F6:
mov	[ebp+var_14C], 0

loc_4F7900:
mov	cl, byte ptr [ebp+var_14C]
mov	[ebp+var_A2], cl
lea	ecx, [ebp+var_D0]
call	sub_407E50
lea	ecx, [ebp+var_D1]
call	nullsub_1
lea	ecx, [ebp+var_FD]
call	sub_401EF0
push	eax
push	offset aShow_collectib ; "show_collectibles"
lea	ecx, [ebp+var_FC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+15Ch+var_15C]
lea	edx, [ebp+var_FC]
push	edx		; int
lea	eax, [ebp+var_28]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F7971
mov	[ebp+var_150], 1
jmp	short loc_4F797B

loc_4F7971:
mov	[ebp+var_150], 0

loc_4F797B:
mov	cl, byte ptr [ebp+var_150]
mov	[ebp+var_A1], cl
lea	ecx, [ebp+var_FC]
call	sub_407E50
lea	ecx, [ebp+var_FD]
call	nullsub_1
lea	ecx, [ebp+var_129]
call	sub_401EF0
push	eax
push	offset aShow_minibosse ; "show_minibosses"
lea	ecx, [ebp+var_128]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+15Ch+var_15C]
lea	edx, [ebp+var_128]
push	edx		; int
lea	eax, [ebp+var_28]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F79EC
mov	[ebp+var_154], 1
jmp	short loc_4F79F6

loc_4F79EC:
mov	[ebp+var_154], 0

loc_4F79F6:
mov	cl, byte ptr [ebp+var_154]
mov	[ebp+var_41], cl
lea	ecx, [ebp+var_128]
call	sub_407E50
lea	ecx, [ebp+var_129]
call	nullsub_1
push	offset aSetfactionvisi ; "SetFactionVisibility"
lea	ecx, [ebp+var_A0]
call	sub_110E550
movzx	edx, [ebp+var_A2]
test	edx, edx
jz	short loc_4F7A4D
push	offset aBshowpetdigs ; "bShowPetDigs"
mov	eax, [ebp+var_78]
lea	ecx, [ebp+var_78]
mov	edx, [eax+30h]
call	edx
mov	cl, [ebp+var_A2]
mov	esi, eax
call	sub_401900

loc_4F7A4D:
movzx	eax, [ebp+var_A1]
test	eax, eax
jz	short loc_4F7A75
push	offset aBshowcollectib ; "bShowCollectibles"
mov	edx, [ebp+var_78]
lea	ecx, [ebp+var_78]
mov	eax, [edx+30h]
call	eax
mov	cl, [ebp+var_A1]
mov	esi, eax
call	sub_401900

loc_4F7A75:
movzx	ecx, [ebp+var_41]
test	ecx, ecx
jz	short loc_4F7A97
push	offset aBshowminibosse ; "bShowMiniBosses"
mov	edx, [ebp+var_78]
lea	ecx, [ebp+var_78]
mov	eax, [edx+30h]
call	eax
mov	cl, [ebp+var_41]
mov	esi, eax
call	sub_401900

loc_4F7A97:
lea	ecx, [ebp+var_A0]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_10]
call	sub_4E4D30
mov	dl, [ebp+var_A2]
mov	[ebp+var_8], dl
mov	al, [ebp+var_A1]
mov	[ebp+var_7], al
mov	cl, [ebp+var_41]
mov	[ebp+var_6], cl
mov	dl, [ebp+var_A2]
mov	[ebp+var_5], dl
mov	al, [ebp+var_A1]
mov	[ebp+var_4], al
mov	cl, [ebp+var_41]
mov	[ebp+var_3], cl
lea	edx, [ebp+var_10]
push	edx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_130], 1
lea	ecx, [ebp+var_10]
call	sub_401110
lea	eax, [ebp+var_A0]
push	eax
call	sub_4093F0
lea	ecx, [ebp+var_28]
call	sub_5028E0
call	nullsub_1
lea	ecx, [ebp+var_40]
push	ecx
call	sub_409000
mov	eax, [ebp+var_130]

loc_4F7B30:
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4F7790 endp

align 10h


; Attributes: bp-based frame

sub_4F7B40 proc	near

var_150= dword ptr -150h
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_127= byte ptr -127h
var_126= byte ptr -126h
var_125= byte ptr -125h
var_124= dword ptr -124h
var_F9=	byte ptr -0F9h
var_F8=	dword ptr -0F8h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_A2=	byte ptr -0A2h
var_A1=	byte ptr -0A1h
var_A0=	byte ptr -0A0h
var_78=	dword ptr -78h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_10=	byte ptr -10h
var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 148h
push	esi
mov	[ebp+var_130], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F7B76
mov	ecx, [ebp+var_130]
mov	edx, [ecx+4]
push	edx
push	offset aOnshowminima_0 ; "OnShowMiniMapExtras Uncast --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F7B76:
lea	ecx, [ebp+var_40]
push	ecx
call	sub_408780
lea	edx, [ebp+var_40]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
mov	[ebp+var_134], eax
mov	ecx, [ebp+var_134]
mov	edx, [ebp+var_134]
mov	eax, [ecx+10h]
or	eax, [edx+14h]
jz	short loc_4F7BDF
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_30], edx
mov	eax, [ecx+14h]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_13C], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_138], edx
jmp	short loc_4F7BFF

loc_4F7BDF:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_30], ecx
mov	edx, [eax+4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	[ebp+var_13C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_138], ecx

loc_4F7BFF:
mov	edx, [ebp+var_38]
cmp	edx, [ebp+var_30]
jnz	short loc_4F7C0F
mov	eax, [ebp+var_34]
cmp	eax, [ebp+var_2C]
jz	short loc_4F7C1D

loc_4F7C0F:
lea	ecx, [ebp+var_40]
push	ecx
call	sub_409000
jmp	loc_4F7EAB

loc_4F7C1D:
lea	edx, [ebp+var_126]
push	edx
lea	eax, [ebp+var_127]
push	eax
lea	ecx, [ebp+var_28]
call	sub_489470
call	nullsub_1
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_130]
call	sub_F79E10
lea	ecx, [ebp+var_CD]
call	sub_401EF0
push	eax
push	offset aShow_pet_digs ;	"show_pet_digs"
lea	ecx, [ebp+var_CC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+150h+var_150]
lea	edx, [ebp+var_CC]
push	edx		; int
lea	eax, [ebp+var_28]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F7C96
mov	[ebp+var_140], 1
jmp	short loc_4F7CA0

loc_4F7C96:
mov	[ebp+var_140], 0

loc_4F7CA0:
mov	cl, byte ptr [ebp+var_140]
mov	[ebp+var_A2], cl
lea	ecx, [ebp+var_CC]
call	sub_407E50
lea	ecx, [ebp+var_CD]
call	nullsub_1
lea	ecx, [ebp+var_F9]
call	sub_401EF0
push	eax
push	offset aShow_collectib ; "show_collectibles"
lea	ecx, [ebp+var_F8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+150h+var_150]
lea	edx, [ebp+var_F8]
push	edx		; int
lea	eax, [ebp+var_28]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F7D11
mov	[ebp+var_144], 1
jmp	short loc_4F7D1B

loc_4F7D11:
mov	[ebp+var_144], 0

loc_4F7D1B:
mov	cl, byte ptr [ebp+var_144]
mov	[ebp+var_A1], cl
lea	ecx, [ebp+var_F8]
call	sub_407E50
lea	ecx, [ebp+var_F9]
call	nullsub_1
lea	ecx, [ebp+var_125]
call	sub_401EF0
push	eax
push	offset aShow_minibosse ; "show_minibosses"
lea	ecx, [ebp+var_124]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+150h+var_150]
lea	edx, [ebp+var_124]
push	edx		; int
lea	eax, [ebp+var_28]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F7D8C
mov	[ebp+var_148], 1
jmp	short loc_4F7D96

loc_4F7D8C:
mov	[ebp+var_148], 0

loc_4F7D96:
mov	cl, byte ptr [ebp+var_148]
mov	[ebp+var_41], cl
lea	ecx, [ebp+var_124]
call	sub_407E50
lea	ecx, [ebp+var_125]
call	nullsub_1
push	offset aSetfactionvisi ; "SetFactionVisibility"
lea	ecx, [ebp+var_A0]
call	sub_110E550
movzx	edx, [ebp+var_A2]
test	edx, edx
jz	short loc_4F7DE9
push	offset aBshowpetdigs ; "bShowPetDigs"
mov	eax, [ebp+var_78]
lea	ecx, [ebp+var_78]
mov	edx, [eax+30h]
call	edx
xor	cl, cl
mov	esi, eax
call	sub_401900

loc_4F7DE9:
movzx	eax, [ebp+var_A1]
test	eax, eax
jz	short loc_4F7E0D
push	offset aBshowcollectib ; "bShowCollectibles"
mov	edx, [ebp+var_78]
lea	ecx, [ebp+var_78]
mov	eax, [edx+30h]
call	eax
xor	cl, cl
mov	esi, eax
call	sub_401900

loc_4F7E0D:
movzx	ecx, [ebp+var_41]
test	ecx, ecx
jz	short loc_4F7E2E
push	offset aBshowminibosse ; "bShowMiniBosses"
mov	edx, [ebp+var_78]
lea	ecx, [ebp+var_78]
mov	eax, [edx+30h]
call	eax
xor	cl, cl
mov	esi, eax
call	sub_401900

loc_4F7E2E:
lea	ecx, [ebp+var_A0]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_10]
call	sub_4E4D30
mov	[ebp+var_8], 0
mov	[ebp+var_7], 0
mov	[ebp+var_6], 0
mov	dl, [ebp+var_A2]
mov	[ebp+var_5], dl
mov	al, [ebp+var_A1]
mov	[ebp+var_4], al
mov	cl, [ebp+var_41]
mov	[ebp+var_3], cl
lea	edx, [ebp+var_10]
push	edx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_10]
call	sub_401110
lea	eax, [ebp+var_A0]
push	eax
call	sub_4093F0
lea	ecx, [ebp+var_28]
call	sub_5028E0
call	nullsub_1
lea	ecx, [ebp+var_40]
push	ecx
call	sub_409000

loc_4F7EAB:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_4F7B40 endp

align 10h


; Attributes: bp-based frame

sub_4F7EC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h
arg_60=	dword ptr  68h
arg_68=	dword ptr  70h
arg_6C=	dword ptr  74h
arg_70=	dword ptr  78h
arg_74=	dword ptr  7Ch
arg_78=	dword ptr  80h
arg_7C=	dword ptr  84h
arg_80=	dword ptr  88h

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
push	edi
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_158181C
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+10h], 0FFFFFFFFh
mov	edx, [ebp+var_8]
mov	dword ptr [edx+14h], 28h
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_60]
mov	[eax+18h], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_68]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_8]
mov	byte ptr [edx+24h], 1
mov	eax, [ebp+var_8]
mov	byte ptr [eax+25h], 0
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+26h], 0
mov	edx, [ebp+var_8]
mov	byte ptr [edx+27h], 1
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_158159C
mov	edi, [ebp+var_8]
add	edi, 28h
mov	ecx, 16h
lea	esi, [ebp+arg_10]
rep movsd
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx+80h], edx
mov	eax, [ebp+arg_C]
mov	[ecx+84h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_6C]
mov	[ecx+88h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_70]
mov	[eax+8Ch], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_74]
mov	[edx+90h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_78]
mov	[ecx+94h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_7C]
mov	[eax+98h], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_80]
mov	[edx+9Ch], eax
mov	ecx, [ebp+var_8]
add	ecx, 0A0h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+1], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+10h], 0
mov	eax, [ebp+var_8]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	84h
sub_4F7EC0 endp

align 10h


; Attributes: bp-based frame

sub_4F8000 proc	near

var_558= dword ptr -558h
var_554= dword ptr -554h
var_550= dword ptr -550h
var_54C= dword ptr -54Ch
var_548= dword ptr -548h
var_544= dword ptr -544h
var_540= dword ptr -540h
var_53C= dword ptr -53Ch
var_538= dword ptr -538h
var_534= dword ptr -534h
var_530= dword ptr -530h
var_52C= dword ptr -52Ch
var_528= dword ptr -528h
var_524= dword ptr -524h
var_520= dword ptr -520h
var_51A= byte ptr -51Ah
var_519= byte ptr -519h
var_518= dword ptr -518h
var_514= dword ptr -514h
var_510= dword ptr -510h
var_508= dword ptr -508h
var_504= dword ptr -504h
var_500= byte ptr -500h
var_4EC= byte ptr -4ECh
var_4E0= dword ptr -4E0h
var_4DC= dword ptr -4DCh
var_4D8= dword ptr -4D8h
var_4D0= dword ptr -4D0h
var_4CC= dword ptr -4CCh
var_4C8= byte ptr -4C8h
var_4B4= byte ptr -4B4h
var_4A8= dword ptr -4A8h
var_4A4= dword ptr -4A4h
var_4A0= byte ptr -4A0h
var_498= dword ptr -498h
var_490= byte ptr -490h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 558h
mov	[ebp+var_550], ecx
mov	eax, [ebp+var_550]
mov	byte ptr [eax+60h], 0
lea	eax, [ebp+var_490]
call	sub_A49A00
mov	[ebp+var_74], 0
mov	ecx, [ebp+var_550]
movzx	edx, byte ptr [ecx+0A0h]
test	edx, edx
jz	loc_4F81E3
mov	eax, [ebp+var_550]
mov	ecx, [eax+88h]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_550]
mov	[ebp+var_554], edx
mov	eax, [ebp+var_554]
mov	ecx, [ebp+var_554]
mov	edx, [eax+0A8h]
or	edx, [ecx+0ACh]
jz	loc_4F81E1
mov	[ebp+var_74], 0
mov	eax, [ebp+var_550]
cmp	dword ptr [eax+8Ch], 0
jnz	short loc_4F80B8
mov	ecx, [ebp+var_550]
cmp	dword ptr [ecx+90h], 0
jz	loc_4F81E1
mov	edx, [ebp+var_550]
cmp	dword ptr [edx+94h], 80000000h
jz	loc_4F81E1

loc_4F80B8:
mov	eax, [ebp+var_550]
mov	ecx, [eax+8]
mov	[ebp+var_524], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_520], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_4D8]
call	sub_401100
mov	[ebp+var_4D8], offset off_155845C
mov	eax, [ebp+var_524]
mov	[ebp+var_4D0], eax
mov	ecx, [ebp+var_520]
mov	[ebp+var_4CC], ecx
lea	ecx, [ebp+var_4C8]
call	sub_DD6EB0
mov	edx, [ebp+var_550]
mov	eax, [edx+0A8h]
mov	[ebp+var_4A8], eax
mov	ecx, [edx+0ACh]
mov	[ebp+var_4A4], ecx
lea	edx, [ebp+var_4B4]
mov	[ebp+var_528], edx
mov	eax, [ebp+var_528]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_528]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F816B
lea	ecx, [ebp+var_4D8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F816B:
mov	eax, [ebp+var_550]
cmp	dword ptr [eax+94h], 80000000h
jz	short loc_4F81A2
mov	ecx, [ebp+var_550]
mov	edx, [ecx+94h]
cmp	edx, [ebp+var_498]
jnz	short loc_4F81A2
mov	eax, [ebp+var_550]
mov	ecx, [eax+90h]
mov	[ebp+var_74], ecx
jmp	short loc_4F81CB

loc_4F81A2:
movzx	edx, [ebp+var_4A0]
test	edx, edx
jz	short loc_4F81CB
mov	eax, [ebp+var_550]
cmp	dword ptr [eax+8Ch], 0
jz	short loc_4F81CB
mov	ecx, [ebp+var_550]
mov	edx, [ecx+8Ch]
mov	[ebp+var_74], edx

loc_4F81CB:
lea	ecx, [ebp+var_4C8]
call	sub_4087D0
lea	ecx, [ebp+var_4D8]
call	sub_401110

loc_4F81E1:
jmp	short loc_4F8212

loc_4F81E3:
mov	eax, [ebp+var_550]
cmp	dword ptr [eax+0B0h], 0
jz	short loc_4F8203
mov	ecx, [ebp+var_550]
movzx	edx, byte ptr [ecx+0A1h]
test	edx, edx
jz	short loc_4F8212

loc_4F8203:
mov	eax, [ebp+var_550]
mov	ecx, [eax+98h]
mov	[ebp+var_74], ecx

loc_4F8212:
mov	edx, [ebp+var_550]
mov	eax, [edx+28h]
mov	[ebp+var_530], eax
mov	ecx, [edx+2Ch]
mov	[ebp+var_52C], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	edx, [ebp+var_530]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_52C]
mov	[ebp+var_64], eax
lea	ecx, [ebp+var_60]
call	sub_DAB790
mov	[ebp+var_40], 0
lea	ecx, [ebp+var_70]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
cmp	[ebp+var_74], 0
jz	loc_4F8447
mov	edx, [ebp+var_550]
mov	eax, [ebp+var_550]
mov	ecx, [eax+0A8h]
mov	[edx+38h], ecx
mov	eax, [eax+0ACh]
mov	[edx+3Ch], eax
lea	ecx, [ebp+var_490]
push	ecx
mov	edx, [ebp+var_74]
push	edx
call	sub_50E110
add	esp, 8
lea	eax, [ebp+var_490]
push	eax
mov	ecx, [ebp+var_550]
mov	edx, [ecx+3Ch]
push	edx
mov	eax, [ecx+38h]
push	eax
call	sub_50DF90
add	esp, 0Ch
mov	ecx, [ebp+var_550]
mov	edx, [ecx+8]
mov	[ebp+var_538], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_534], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_510]
call	sub_401100
mov	[ebp+var_510], offset off_1599AE8
mov	ecx, [ebp+var_538]
mov	[ebp+var_508], ecx
mov	edx, [ebp+var_534]
mov	[ebp+var_504], edx
lea	ecx, [ebp+var_500]
call	sub_DAB8A0
lea	eax, [ebp+var_4EC]
mov	[ebp+var_53C], eax
mov	ecx, [ebp+var_53C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_53C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F835B
lea	edx, [ebp+var_510]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F835B:
mov	ecx, [ebp+var_74]
push	ecx
call	sub_FAF3D0
add	esp, 4
mov	[ebp+var_4DC], eax
lea	edx, [ebp+var_490]
push	edx
mov	eax, [ebp+var_550]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_4DC]
mov	edx, [ecx]
mov	ecx, [ebp+var_4DC]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_4E0], eax
push	1
mov	ecx, [ebp+var_550]
add	ecx, 9Ch
push	ecx
lea	edx, [ebp+var_490]
push	edx
mov	eax, [ebp+var_550]
add	eax, 28h
push	eax
call	sub_F79D10
add	esp, 10h
cmp	[ebp+var_4E0], 0
jz	short loc_4F83E5
mov	ecx, [ebp+var_550]
add	ecx, 28h
push	ecx
mov	edx, [ebp+var_4DC]
mov	eax, [edx]
mov	ecx, [ebp+var_4DC]
mov	edx, [eax+10h]
call	edx

loc_4F83E5:
mov	eax, [ebp+var_4DC]
mov	[ebp+var_518], eax
mov	ecx, [ebp+var_518]
mov	[ebp+var_514], ecx
cmp	[ebp+var_514], 0
jz	short loc_4F8422
push	1
mov	edx, [ebp+var_514]
mov	eax, [edx]
mov	ecx, [ebp+var_514]
mov	edx, [eax]
call	edx
mov	[ebp+var_558], eax
jmp	short loc_4F842C

loc_4F8422:
mov	[ebp+var_558], 0

loc_4F842C:
lea	ecx, [ebp+var_500]
call	sub_4087D0
lea	ecx, [ebp+var_510]
call	sub_401110
jmp	loc_4F852B

loc_4F8447:
mov	eax, [ebp+var_550]
cmp	dword ptr [eax+0B0h], 0
jbe	loc_4F84DF
mov	ecx, [ebp+var_550]
mov	edx, [ecx+0B0h]
mov	[ebp+var_540], edx
mov	eax, [ebp+var_550]
mov	ecx, [ebp+var_540]
mov	[eax+1Ch], ecx
mov	edx, [ebp+var_550]
mov	byte ptr [edx+0A0h], 0
mov	eax, [ebp+var_550]
mov	dword ptr [eax+0B0h], 0
mov	ecx, [ebp+var_550]
mov	dword ptr [ecx+0A8h], 0
mov	dword ptr [ecx+0ACh], 0
mov	[ebp+var_519], 0
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	eax, [ebp+var_490]
call	sub_A496A0
mov	al, [ebp+var_519]
jmp	loc_4F85FD

loc_4F84DF:
lea	edx, [ebp+var_490]
push	edx
push	0
call	sub_50E110
add	esp, 8
lea	eax, [ebp+var_490]
push	eax
push	0
push	0
call	sub_50DF90
add	esp, 0Ch
push	1
mov	ecx, [ebp+var_550]
add	ecx, 9Ch
push	ecx
lea	edx, [ebp+var_490]
push	edx
mov	eax, [ebp+var_550]
add	eax, 28h
push	eax
call	sub_F79D10
add	esp, 10h

loc_4F852B:
mov	ecx, [ebp+var_550]
mov	edx, [ecx+28h]
mov	[ebp+var_548], edx
mov	eax, [ecx+2Ch]
mov	[ebp+var_544], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	ecx, [ebp+var_548]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_544]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_28]
call	sub_D85A30
mov	eax, [ebp+var_550]
mov	ecx, [eax+9Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_550]
mov	eax, [edx+7Ch]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_14]
mov	[ebp+var_54C], ecx
mov	edx, [ebp+var_54C]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_54C]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F85C5
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F85C5:
mov	[ebp+var_51A], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	eax, [ebp+var_490]
call	sub_A496A0
mov	al, [ebp+var_51A]

loc_4F85FD:
mov	esp, ebp
pop	ebp
retn
sub_4F8000 endp

align 10h


; Attributes: bp-based frame

sub_4F8610 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_44=	byte ptr -44h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
movzx	eax, [ebp+arg_0]
test	eax, eax
jz	loc_4F873B
mov	ecx, [ebp+var_84]
mov	edx, [ecx+8]
mov	[ebp+var_70], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_6C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_68]
call	sub_401100
mov	[ebp+var_68], offset off_1599AE8
mov	ecx, [ebp+var_70]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_6C]
mov	[ebp+var_5C], edx
lea	ecx, [ebp+var_58]
call	sub_DAB8A0
lea	eax, [ebp+var_44]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_74]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F8696
lea	edx, [ebp+var_68]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F8696:
mov	ecx, [ebp+var_84]
mov	edx, [ecx+28h]
mov	[ebp+var_7C], edx
mov	eax, [ecx+2Ch]
mov	[ebp+var_78], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	ecx, [ebp+var_7C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_28]
call	sub_D85A30
mov	eax, [ebp+var_84]
mov	ecx, [eax+9Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_84]
mov	eax, [edx+7Ch]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_14]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_80]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F871B
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F871B:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_58]
call	sub_4087D0
lea	ecx, [ebp+var_68]
call	sub_401110

loc_4F873B:
mov	esp, ebp
pop	ebp
retn	4
sub_4F8610 endp

align 10h


; Attributes: bp-based frame

sub_4F8750 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_0], 0
jnz	short loc_4F8761
jmp	short loc_4F87AB

loc_4F8761:
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	[ecx+0A0h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx+0A8h], eax
mov	edx, [edx+0Ch]
mov	[ecx+0ACh], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	[eax+0A4h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
mov	edx, [ecx+10h]
mov	[eax+0B0h], edx

loc_4F87AB:
mov	esp, ebp
pop	ebp
retn	4
sub_4F8750 endp

align 10h


; Attributes: bp-based frame

sub_4F87C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 28h
mov	esp, ebp
pop	ebp
retn
sub_4F87C0 endp



; Attributes: bp-based frame

sub_4F87D0 proc	near

var_3A0= dword ptr -3A0h
var_394= dword ptr -394h
var_390= qword ptr -390h
var_388= dword ptr -388h
var_382= word ptr -382h
var_380= qword ptr -380h
var_378= dword ptr -378h
var_372= word ptr -372h
var_370= dword ptr -370h
var_36C= qword ptr -36Ch
var_364= dword ptr -364h
var_360= dword ptr -360h
var_35C= dword ptr -35Ch
var_354= dword ptr -354h
var_350= dword ptr -350h
var_34C= dword ptr -34Ch
var_346= byte ptr -346h
var_345= byte ptr -345h
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_335= byte ptr -335h
var_334= dword ptr -334h
var_309= byte ptr -309h
var_308= dword ptr -308h
var_2DD= byte ptr -2DDh
var_2DC= dword ptr -2DCh
var_2B1= byte ptr -2B1h
var_2B0= dword ptr -2B0h
var_285= byte ptr -285h
var_284= dword ptr -284h
var_259= byte ptr -259h
var_258= dword ptr -258h
var_22D= byte ptr -22Dh
var_22C= dword ptr -22Ch
var_201= byte ptr -201h
var_200= dword ptr -200h
var_1D5= byte ptr -1D5h
var_1D4= dword ptr -1D4h
var_1A9= byte ptr -1A9h
var_1A8= dword ptr -1A8h
var_17D= byte ptr -17Dh
var_17C= dword ptr -17Ch
var_151= byte ptr -151h
var_150= dword ptr -150h
var_128= dword ptr -128h
var_120= qword ptr -120h
var_118= byte ptr -118h
var_104= byte ptr -104h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E8=	qword ptr -0E8h
var_E0=	byte ptr -0E0h
var_CC=	byte ptr -0CCh
var_C0=	dword ptr -0C0h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A0=	qword ptr -0A0h
var_98=	byte ptr -98h
var_84=	byte ptr -84h
var_78=	byte ptr -78h
var_70=	dword ptr -70h
var_68=	qword ptr -68h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 394h
push	esi
push	edi
mov	[ebp+var_360], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F8807
mov	ecx, [ebp+var_360]
mov	edx, [ecx+4]
push	edx
push	offset aForcemovementb ; "ForceMovementBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F8807:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F881C
mov	eax, 1
jmp	loc_4F9114

loc_4F881C:
lea	eax, [ebp+var_345]
push	eax
lea	ecx, [ebp+var_346]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_360]
call	sub_F79E10
lea	ecx, [ebp+var_151]
call	sub_401EF0
push	eax
push	offset aHit_action ; "hit_action"
lea	ecx, [ebp+var_150]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_150]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	edx, [ebp+var_360]
mov	[edx+34h], eax
lea	ecx, [ebp+var_150]
call	sub_407E50
lea	ecx, [ebp+var_151]
call	nullsub_1
lea	ecx, [ebp+var_17D]
call	sub_401EF0
push	eax
push	offset aHit_action_ene ; "hit_action_enemy"
lea	ecx, [ebp+var_17C]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_17C]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	edx, [ebp+var_360]
mov	[edx+38h], eax
lea	ecx, [ebp+var_17C]
call	sub_407E50
lea	ecx, [ebp+var_17D]
call	nullsub_1
lea	ecx, [ebp+var_1A9]
call	sub_401EF0
push	eax
push	offset aHit_action_fac ; "hit_action_faction"
lea	ecx, [ebp+var_1A8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_1A8]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	edx, [ebp+var_360]
mov	[edx+3Ch], eax
lea	ecx, [ebp+var_1A8]
call	sub_407E50
lea	ecx, [ebp+var_1A9]
call	nullsub_1
lea	ecx, [ebp+var_1D5]
call	sub_401EF0
push	eax
push	offset aCollide_with_f ; "collide_with_faction"
lea	ecx, [ebp+var_1D4]
call	sub_407810
push	ecx		; float
fld	ds:flt_15FDA3C
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_1D4]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	edx, [ebp+var_360]
mov	[edx+40h], eax
lea	ecx, [ebp+var_1D4]
call	sub_407E50
lea	ecx, [ebp+var_1D5]
call	nullsub_1
lea	ecx, [ebp+var_201]
call	sub_401EF0
push	eax
push	offset aTimeout_action ; "timeout_action"
lea	ecx, [ebp+var_200]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_200]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	edx, [ebp+var_360]
mov	[edx+44h], eax
lea	ecx, [ebp+var_200]
call	sub_407E50
lea	ecx, [ebp+var_201]
call	nullsub_1
lea	ecx, [ebp+var_22D]
call	sub_401EF0
push	eax
push	offset aMove_target ; "move_target"
lea	ecx, [ebp+var_22C]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_22C]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F8A56
mov	[ebp+var_364], 1
jmp	short loc_4F8A60

loc_4F8A56:
mov	[ebp+var_364], 0

loc_4F8A60:
mov	dl, byte ptr [ebp+var_364]
mov	[ebp+var_21], dl
lea	ecx, [ebp+var_22C]
call	sub_407E50
lea	ecx, [ebp+var_22D]
call	nullsub_1
movzx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_4F8A9E
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	dword ptr [ebp+var_36C], edx
mov	eax, [ecx+14h]
mov	dword ptr [ebp+var_36C+4], eax
jmp	short loc_4F8AB2

loc_4F8A9E:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	dword ptr [ebp+var_36C], edx
mov	eax, [ecx+4]
mov	dword ptr [ebp+var_36C+4], eax

loc_4F8AB2:
mov	ecx, dword ptr [ebp+var_36C]
mov	dword ptr [ebp+var_8], ecx
mov	edx, dword ptr [ebp+var_36C+4]
mov	dword ptr [ebp+var_8+4], edx
mov	eax, dword ptr [ebp+var_8]
or	eax, dword ptr [ebp+var_8+4]
jz	loc_4F90F7
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_155845C
mov	ecx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_68],	ecx
mov	edx, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_68+4], edx
lea	ecx, [ebp+var_60]
call	sub_DAB910
lea	ecx, [ebp+var_259]
call	sub_401EF0
push	eax
push	offset aDuration ; "duration"
lea	ecx, [ebp+var_258]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_258]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_40]
lea	ecx, [ebp+var_258]
call	sub_407E50
lea	ecx, [ebp+var_259]
call	nullsub_1
lea	ecx, [ebp+var_285]
call	sub_401EF0
push	eax
push	offset aLeft	; "left"
lea	ecx, [ebp+var_284]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	edx, [ebp+var_284]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_3C]
lea	ecx, [ebp+var_284]
call	sub_407E50
lea	ecx, [ebp+var_285]
call	nullsub_1
lea	ecx, [ebp+var_2B1]
call	sub_401EF0
push	eax
push	offset aForward	; "forward"
lea	ecx, [ebp+var_2B0]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	ecx, [ebp+var_2B0]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_38]
lea	ecx, [ebp+var_2B0]
call	sub_407E50
lea	ecx, [ebp+var_2B1]
call	nullsub_1
lea	ecx, [ebp+var_2DD]
call	sub_401EF0
push	eax
push	offset aYaw	; "yaw"
lea	ecx, [ebp+var_2DC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	eax, [ebp+var_2DC]
push	eax		; int
lea	ecx, [ebp+var_20]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_34]
lea	ecx, [ebp+var_2DC]
call	sub_407E50
lea	ecx, [ebp+var_2DD]
call	nullsub_1
lea	ecx, [ebp+var_309]
call	sub_401EF0
push	eax
push	offset aYaw_abs	; "yaw_abs"
lea	ecx, [ebp+var_308]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	edx, [ebp+var_308]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_30]
lea	ecx, [ebp+var_308]
call	sub_407E50
lea	ecx, [ebp+var_309]
call	nullsub_1
lea	ecx, [ebp+var_4C]
mov	[ebp+var_34C], ecx
mov	edx, [ebp+var_34C]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_34C]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F8CB7
lea	eax, [ebp+var_70]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F8CB7:
lea	ecx, [ebp+var_335]
call	sub_401EF0
push	eax
push	offset aIgnore_project ; "ignore_projectile_collision"
lea	ecx, [ebp+var_334]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+3A0h+var_3A0]
lea	edx, [ebp+var_334]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F8D06
mov	[ebp+var_370], 1
jmp	short loc_4F8D10

loc_4F8D06:
mov	[ebp+var_370], 0

loc_4F8D10:
mov	cl, byte ptr [ebp+var_370]
mov	[ebp+var_A9], cl
lea	ecx, [ebp+var_334]
call	sub_407E50
lea	ecx, [ebp+var_335]
call	nullsub_1
mov	ecx, 138Bh
lea	eax, [ebp+var_A8]
call	sub_401100
mov	[ebp+var_A8], offset off_1558464
mov	edx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_A0],	edx
mov	eax, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_A0+4], eax
lea	ecx, [ebp+var_98]
call	sub_DAB790
mov	cl, [ebp+var_A9]
mov	[ebp+var_78], cl
lea	edx, [ebp+var_84]
mov	[ebp+var_350], edx
mov	eax, [ebp+var_350]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_350]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F8DB2
lea	ecx, [ebp+var_A8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F8DB2:
mov	eax, [ebp+var_360]
cmp	dword ptr [eax+34h], 0
jnz	short loc_4F8DDA
mov	ecx, [ebp+var_360]
cmp	dword ptr [ecx+38h], 0
jnz	short loc_4F8DDA
mov	edx, [ebp+var_360]
cmp	dword ptr [edx+3Ch], 0
jz	loc_4F90B2

loc_4F8DDA:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Ch]
test	ecx, ecx
jnz	short loc_4F8E60
mov	edx, [ebp+arg_4]
push	edx		; int
lea	eax, [ebp+var_B0]
push	eax		; void *
call	sub_50DDD0
add	esp, 8
mov	ecx, [ebp+var_360]
mov	edx, [ecx]
mov	ecx, [ebp+var_360]
mov	eax, [edx+4]
call	eax
push	eax
fld	[ebp+var_40]
fmul	ds:flt_15BF168
fnstcw	[ebp+var_372]
movzx	eax, [ebp+var_372]
or	eax, 0C00h
mov	[ebp+var_378], eax
fldcw	word ptr [ebp+var_378]
fistp	[ebp+var_380]
fldcw	[ebp+var_372]
mov	ecx, dword ptr [ebp+var_380]
push	ecx
mov	edx, [ebp+var_B0]
push	edx
mov	eax, [ebp+arg_0]
push	eax
push	0
call	sub_F5B620
add	esp, 14h
jmp	loc_4F90B2

loc_4F8E60:
mov	ecx, 138Bh
lea	eax, [ebp+var_F0]
call	sub_401100
mov	[ebp+var_F0], offset off_1558464
mov	ecx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_E8],	ecx
mov	edx, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_E8+4], edx
lea	ecx, [ebp+var_E0]
call	sub_D9C360
lea	eax, [ebp+var_CC]
mov	[ebp+var_354], eax
mov	ecx, [ebp+var_354]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_354]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F8ED7
lea	edx, [ebp+var_F0]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F8ED7:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C0]
push	edx
call	sub_50E110
add	esp, 8
fld	[ebp+var_40]
fmul	ds:flt_15BF168
fnstcw	[ebp+var_382]
movzx	eax, [ebp+var_382]
or	eax, 0C00h
mov	[ebp+var_388], eax
fldcw	word ptr [ebp+var_388]
fistp	[ebp+var_390]
fldcw	[ebp+var_382]
mov	eax, dword ptr [ebp+var_390]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
push	ecx
mov	edx, [ebp+var_360]
mov	eax, [edx]
mov	ecx, [ebp+var_360]
mov	edx, [eax+4]
call	edx
push	eax
mov	eax, [ebp+var_C0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
push	0
call	sub_F5B550
add	esp, 14h
mov	ecx, 138Bh
lea	eax, [ebp+var_128]
call	sub_401100
mov	[ebp+var_128], offset off_1558464
mov	edx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_120], edx
mov	eax, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_120+4], eax
lea	ecx, [ebp+var_118]
call	sub_DD5FF0
push	0B8h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_33C], eax
cmp	[ebp+var_33C], 0
jz	short loc_4F9021
mov	ecx, [ebp+var_C0]
push	ecx
mov	edx, [ebp+var_360]
mov	eax, [edx+44h]
push	eax
mov	ecx, [ebp+var_360]
mov	edx, [ecx+40h]
push	edx
mov	eax, [ebp+var_360]
mov	ecx, [eax+3Ch]
push	ecx
mov	edx, [ebp+var_360]
mov	eax, [edx+38h]
push	eax
mov	ecx, [ebp+var_360]
mov	edx, [ecx+34h]
push	edx
mov	eax, [ebp+var_B4]
push	eax
mov	esi, [ebp+arg_0]
sub	esp, 58h
mov	ecx, 16h
mov	edi, esp
rep movsd
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+24h]
push	edx
mov	eax, [ecx+20h]
push	eax
mov	ecx, dword ptr [ebp+var_8+4]
push	ecx
mov	edx, dword ptr [ebp+var_8]
push	edx
mov	ecx, [ebp+var_33C]
call	sub_4F7EC0
mov	[ebp+var_394], eax
jmp	short loc_4F902B

loc_4F9021:
mov	[ebp+var_394], 0

loc_4F902B:
mov	eax, [ebp+var_394]
mov	[ebp+var_F8], eax
mov	ecx, [ebp+var_360]
mov	edx, [ecx+4]
mov	[ebp+var_F4], edx
lea	eax, [ebp+var_104]
mov	[ebp+var_35C], eax
mov	ecx, [ebp+var_35C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_35C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F9086
lea	edx, [ebp+var_128]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F9086:
lea	ecx, [ebp+var_118]
call	sub_4087D0
lea	ecx, [ebp+var_128]
call	sub_401110
lea	ecx, [ebp+var_E0]
call	sub_4087D0
lea	ecx, [ebp+var_F0]
call	sub_401110

loc_4F90B2:
mov	[ebp+var_340], 1
lea	ecx, [ebp+var_98]
call	sub_4087D0
lea	ecx, [ebp+var_A8]
call	sub_401110
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_340]
jmp	short loc_4F9114

loc_4F90F7:
mov	[ebp+var_344], 0
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_344]

loc_4F9114:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4F87D0 endp

align 10h


; Attributes: bp-based frame

sub_4F9120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2Ah
mov	esp, ebp
pop	ebp
retn
sub_4F9120 endp



; Attributes: bp-based frame

sub_4F9130 proc	near

var_D8=	dword ptr -0D8h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BE=	byte ptr -0BEh
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B5=	byte ptr -0B5h
var_B4=	dword ptr -0B4h
var_89=	byte ptr -89h
var_88=	byte ptr -88h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_3C=	byte ptr -3Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_D0], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F9165
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
push	edx
push	offset aAltercooldownb ; "AlterCooldownBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F9165:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F917A
mov	eax, 1
jmp	loc_4F935B

loc_4F917A:
lea	eax, [ebp+var_BD]
push	eax
lea	ecx, [ebp+var_BE]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_F79E10
lea	ecx, [ebp+var_89]
call	sub_401EF0
push	eax
push	offset aAmount	; "amount"
lea	ecx, [ebp+var_88]
call	sub_407810
lea	eax, [ebp+var_88]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_20]
lea	ecx, [ebp+var_88]
call	sub_407E50
lea	ecx, [ebp+var_89]
call	nullsub_1
lea	ecx, [ebp+var_B5]
call	sub_401EF0
push	eax
push	offset aAdd	; "add"
lea	ecx, [ebp+var_B4]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+0D8h+var_D8]
lea	edx, [ebp+var_B4]
push	edx		; int
lea	eax, [ebp+var_1C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F9238
mov	[ebp+var_D1], 1
jmp	short loc_4F923F

loc_4F9238:
mov	[ebp+var_D1], 0

loc_4F923F:
mov	cl, [ebp+var_D1]
mov	[ebp+var_1], cl
lea	ecx, [ebp+var_B4]
call	sub_407E50
lea	ecx, [ebp+var_B5]
call	nullsub_1
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+38h]
test	eax, eax
jz	short loc_4F929A
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_4F9288
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+40h]
addss	xmm0, [ebp+var_20]
mov	eax, [ebp+arg_0]
movss	dword ptr [eax+40h], xmm0
jmp	short loc_4F9295

loc_4F9288:
mov	ecx, [ebp+arg_0]
movss	xmm0, [ebp+var_20]
movss	dword ptr [ecx+40h], xmm0

loc_4F9295:
jmp	loc_4F933E

loc_4F929A:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_C8], eax
mov	ecx, [edx+4]
mov	[ebp+var_C4], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_60]
call	sub_401100
mov	[ebp+var_60], offset off_1558450
mov	edx, [ebp+var_C8]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_C4]
mov	[ebp+var_54], eax
lea	ecx, [ebp+var_50]
call	sub_DD9AD0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[ebp+var_30], edx
movss	xmm0, [ebp+var_20]
movss	[ebp+var_2C], xmm0
mov	al, [ebp+var_1]
mov	[ebp+var_28], al
lea	ecx, [ebp+var_3C]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_CC]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F932E
lea	eax, [ebp+var_60]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F932E:
lea	ecx, [ebp+var_50]
call	sub_4087D0
lea	ecx, [ebp+var_60]
call	sub_401110

loc_4F933E:
mov	[ebp+var_BC], 1
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_BC]

loc_4F935B:
mov	esp, ebp
pop	ebp
retn	8
sub_4F9130 endp

align 10h


; Attributes: bp-based frame

sub_4F9370 proc	near

var_164= dword ptr -164h
var_160= qword ptr -160h
var_158= dword ptr -158h
var_152= word ptr -152h
var_150= dword ptr -150h
var_14C= qword ptr -14Ch
var_144= dword ptr -144h
var_13E= word ptr -13Eh
var_13C= qword ptr -13Ch
var_134= dword ptr -134h
var_12E= word ptr -12Eh
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_FE=	byte ptr -0FEh
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F1=	byte ptr -0F1h
var_F0=	byte ptr -0F0h
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_74=	byte ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_3C=	byte ptr -3Ch
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_12C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F93A5
mov	ecx, [ebp+var_12C]
mov	edx, [ecx+4]
push	edx
push	offset aChargeupbehavi ; "ChargeUpBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F93A5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4F93BA
mov	eax, 1
jmp	loc_4F97CE

loc_4F93BA:
lea	eax, [ebp+var_FD]
push	eax
lea	ecx, [ebp+var_FE]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_12C]
call	sub_F79E10
lea	ecx, [ebp+var_C5]
call	sub_401EF0
push	eax
push	offset aMax_duration ; "max_duration"
lea	ecx, [ebp+var_C4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+164h+var_164]
lea	eax, [ebp+var_C4]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fstp	[ebp+var_20]
lea	ecx, [ebp+var_C4]
call	sub_407E50
lea	ecx, [ebp+var_C5]
call	nullsub_1
lea	ecx, [ebp+var_F1]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_F0]
call	sub_407810
lea	edx, [ebp+var_F0]
push	edx
lea	eax, [ebp+var_18]
push	eax
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_F0]
call	sub_407E50
lea	ecx, [ebp+var_F1]
call	nullsub_1
mov	ecx, [ebp+var_12C]
cmp	dword ptr [ecx+8], 0
jz	short loc_4F94CB
push	ecx
fld	ds:flt_1513C00
fstp	[esp+164h+var_164]
push	offset aCast	; "cast"
mov	edx, [ebp+var_12C]
add	edx, 0Ch
push	edx
mov	eax, [ebp+var_12C]
mov	ecx, [eax+8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
push	eax
mov	ecx, [edx+10h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
call	sub_F81B80
add	esp, 20h

loc_4F94CB:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+39h]
test	eax, eax
jz	loc_4F972E
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_108], edx
mov	eax, [ecx+4]
mov	[ebp+var_104], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_60]
call	sub_401100
mov	[ebp+var_60], offset off_1558464
mov	ecx, [ebp+var_108]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_104]
mov	[ebp+var_54], edx
lea	ecx, [ebp+var_50]
call	sub_D9C360
lea	eax, [ebp+var_3C]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_10C]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4F9556
lea	edx, [ebp+var_60]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F9556:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_30]
push	edx
call	sub_50E110
add	esp, 8
fld	[ebp+var_20]
fmul	ds:flt_15BF168
fnstcw	[ebp+var_12E]
movzx	eax, [ebp+var_12E]
or	eax, 0C00h
mov	[ebp+var_134], eax
fldcw	word ptr [ebp+var_134]
fistp	[ebp+var_13C]
fldcw	[ebp+var_12E]
mov	eax, dword ptr [ebp+var_13C]
push	eax
mov	ecx, [ebp+var_12C]
mov	edx, [ecx]
mov	ecx, [ebp+var_12C]
mov	eax, [edx+4]
call	eax
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
call	sub_F5B550
add	esp, 14h
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_FAF3D0
add	esp, 4
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jz	loc_4F9719
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_114], eax
mov	ecx, [edx+4]
mov	[ebp+var_110], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_98]
call	sub_401100
mov	[ebp+var_98], offset off_1558464
mov	edx, [ebp+var_114]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_110]
mov	[ebp+var_8C], eax
lea	ecx, [ebp+var_88]
call	sub_DD5FF0
push	90h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_F8], eax
cmp	[ebp+var_F8], 0
jz	short loc_4F96A7
mov	ecx, [ebp+var_30]
push	ecx
fld	[ebp+var_20]
fmul	ds:flt_15BF168
fnstcw	[ebp+var_13E]
movzx	eax, [ebp+var_13E]
or	eax, 0C00h
mov	[ebp+var_144], eax
fldcw	word ptr [ebp+var_144]
fistp	[ebp+var_14C]
fldcw	[ebp+var_13E]
mov	edx, dword ptr [ebp+var_14C]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_F8]
call	sub_4F97E0
mov	[ebp+var_150], eax
jmp	short loc_4F96B1

loc_4F96A7:
mov	[ebp+var_150], 0

loc_4F96B1:
mov	edx, [ebp+var_150]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_12C]
mov	ecx, [eax+4]
mov	[ebp+var_64], ecx
lea	edx, [ebp+var_74]
mov	[ebp+var_128], edx
mov	eax, [ebp+var_128]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_128]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F9703
lea	ecx, [ebp+var_98]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F9703:
lea	ecx, [ebp+var_88]
call	sub_4087D0
lea	ecx, [ebp+var_98]
call	sub_401110

loc_4F9719:
lea	ecx, [ebp+var_50]
call	sub_4087D0
lea	ecx, [ebp+var_60]
call	sub_401110
jmp	loc_4F97B1

loc_4F972E:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+39h]
test	ecx, ecx
jnz	short loc_4F97B1
mov	edx, [ebp+arg_4]
push	edx		; int
lea	eax, [ebp+var_9C]
push	eax		; void *
call	sub_50DDD0
add	esp, 8
mov	ecx, [ebp+var_12C]
mov	edx, [ecx]
mov	ecx, [ebp+var_12C]
mov	eax, [edx+4]
call	eax
push	eax
fld	[ebp+var_20]
fmul	ds:flt_15BF168
fnstcw	[ebp+var_152]
movzx	eax, [ebp+var_152]
or	eax, 0C00h
mov	[ebp+var_158], eax
fldcw	word ptr [ebp+var_158]
fistp	[ebp+var_160]
fldcw	[ebp+var_152]
mov	ecx, dword ptr [ebp+var_160]
push	ecx
mov	edx, [ebp+var_9C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_F5B620
add	esp, 14h

loc_4F97B1:
mov	[ebp+var_FC], 1
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_FC]

loc_4F97CE:
mov	esp, ebp
pop	ebp
retn	8
sub_4F9370 endp

align 10h


; Attributes: bp-based frame

sub_4F97E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
push	edi
mov	[ebp+var_14], ecx
cmp	[ebp+arg_8], 0
jnz	short loc_4F97FA
mov	[ebp+var_C], 0FFFFFFFFh
jmp	short loc_4F9800

loc_4F97FA:
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax

loc_4F9800:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+50h]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [eax+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_158181C
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0FFFFFFFFh
mov	edx, [ebp+var_14]
mov	dword ptr [edx+14h], 2Bh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax+18h], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_C]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+24h], 1
mov	eax, [ebp+var_14]
mov	byte ptr [eax+25h], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+26h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+27h], 1
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1581608
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_4]
mov	[ecx+28h], edx
call	ds:GetTickCount
mov	ecx, [ebp+var_14]
mov	[ecx+2Ch], eax
mov	esi, [ebp+arg_0]
mov	edi, [ebp+var_14]
add	edi, 30h
mov	ecx, 16h
rep movsd
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_C]
mov	[edx+88h], eax
mov	eax, [ebp+var_14]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_4F97E0 endp



; Attributes: bp-based frame

sub_4F98C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1581608
mov	ecx, [ebp+var_C]
mov	edx, [ecx+28h]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_4F98FA
push	1
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx]
call	eax
mov	[ebp+var_10], eax
jmp	short loc_4F9901

loc_4F98FA:
mov	[ebp+var_10], 0

loc_4F9901:
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], offset	off_158181C
mov	esp, ebp
pop	ebp
retn
sub_4F98C0 endp

align 10h


; Attributes: bp-based frame

sub_4F9910 proc	near

var_4AC= dword ptr -4ACh

push	ebp
mov	ebp, esp
sub	esp, 4ACh
mov	[ebp+var_4AC], ecx
mov	ecx, [ebp+var_4AC]
call	sub_4F9930
mov	al, 1
mov	esp, ebp
pop	ebp
retn
sub_4F9910 endp



; Attributes: bp-based frame

sub_4F9930 proc	near

var_4C4= dword ptr -4C4h
var_4BC= dword ptr -4BCh
var_4B8= qword ptr -4B8h
var_4B0= dword ptr -4B0h
var_4AC= dword ptr -4ACh
var_4A8= dword ptr -4A8h
var_4A4= dword ptr -4A4h
var_4A0= dword ptr -4A0h
var_49C= dword ptr -49Ch
var_498= dword ptr -498h
var_494= dword ptr -494h
var_490= byte ptr -490h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 4BCh
mov	[ebp+var_4B0], ecx
mov	eax, [ebp+var_4B0]
mov	ecx, [eax+8]
mov	[ebp+var_4A0], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_49C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_4A0]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_49C]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DDD7B0
mov	edx, [ebp+var_4B0]
cmp	dword ptr [edx+28h], 0
jz	loc_4F9AAC
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	ecx, al
test	ecx, ecx
jz	loc_4F9AAC
movzx	edx, [ebp+var_8]
test	edx, edx
jnz	loc_4F9AAC
call	ds:GetTickCount
mov	ecx, [ebp+var_4B0]
sub	eax, [ecx+2Ch]
mov	dword ptr [ebp+var_4B8], eax
mov	dword ptr [ebp+var_4B8+4], 0
fild	[ebp+var_4B8]
fdiv	ds:flt_15BF168
mov	edx, [ebp+var_4B0]
fstp	dword ptr [edx+74h]
mov	eax, [ebp+var_4B0]
mov	byte ptr [eax+68h], 0
lea	eax, [ebp+var_490]
call	sub_A49A00
lea	ecx, [ebp+var_490]
push	ecx
mov	edx, [ebp+var_4B0]
push	ecx
fld	dword ptr [edx+74h]
fstp	[esp+4C4h+var_4C4]
call	sub_50E220
add	esp, 8
lea	eax, [ebp+var_490]
push	eax
mov	ecx, [ebp+var_4B0]
add	ecx, 30h
push	ecx
mov	edx, [ebp+var_4B0]
mov	eax, [edx+28h]
mov	ecx, [ebp+var_4B0]
mov	ecx, [ecx+28h]
mov	edx, [eax]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_74], eax
push	1
mov	ecx, [ebp+var_4B0]
add	ecx, 88h
push	ecx
lea	edx, [ebp+var_490]
push	edx
mov	eax, [ebp+var_4B0]
add	eax, 30h
push	eax
call	sub_F79D10
add	esp, 10h
cmp	[ebp+var_74], 0
jz	short loc_4F9AA1
mov	ecx, [ebp+var_4B0]
add	ecx, 30h
push	ecx
mov	edx, [ebp+var_4B0]
mov	eax, [edx+28h]
mov	ecx, [ebp+var_4B0]
mov	ecx, [ecx+28h]
mov	edx, [eax]
mov	eax, [edx+10h]
call	eax

loc_4F9AA1:
lea	eax, [ebp+var_490]
call	sub_A496A0

loc_4F9AAC:
mov	ecx, [ebp+var_4B0]
mov	edx, [ecx+28h]
mov	[ebp+var_498], edx
mov	eax, [ebp+var_498]
mov	[ebp+var_494], eax
cmp	[ebp+var_494], 0
jz	short loc_4F9AEC
push	1
mov	ecx, [ebp+var_494]
mov	edx, [ecx]
mov	ecx, [ebp+var_494]
mov	eax, [edx]
call	eax
mov	[ebp+var_4BC], eax
jmp	short loc_4F9AF6

loc_4F9AEC:
mov	[ebp+var_4BC], 0

loc_4F9AF6:
mov	ecx, [ebp+var_4B0]
mov	dword ptr [ecx+28h], 0
mov	edx, [ebp+var_4B0]
mov	eax, [edx+30h]
mov	[ebp+var_4A8], eax
mov	ecx, [edx+34h]
mov	[ebp+var_4A4], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	edx, [ebp+var_4A8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_4A4]
mov	[ebp+var_64], eax
lea	ecx, [ebp+var_60]
call	sub_D85A30
mov	ecx, [ebp+var_4B0]
mov	edx, [ecx+88h]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_4B0]
mov	ecx, [eax+84h]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_4C]
mov	[ebp+var_4AC], edx
mov	eax, [ebp+var_4AC]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_4AC]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4F9BA1
lea	ecx, [ebp+var_70]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F9BA1:
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4F9930 endp

align 10h


; Attributes: bp-based frame

sub_4F9BD0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	byte ptr [eax+25h], 1
mov	ecx, [ebp+var_48]
mov	dl, [ebp+arg_0]
mov	[ecx+26h], dl
movzx	eax, [ebp+arg_0]
test	eax, eax
jz	loc_4F9C84
mov	ecx, [ebp+var_48]
mov	edx, [ecx+30h]
mov	[ebp+var_40], edx
mov	eax, [ecx+34h]
mov	[ebp+var_3C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	ecx, [ebp+var_40]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_28]
call	sub_D85A30
mov	eax, [ebp+var_48]
mov	ecx, [eax+88h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+84h]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_14]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_44]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4F9C74
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4F9C74:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110

loc_4F9C84:
mov	esp, ebp
pop	ebp
retn	4
sub_4F9BD0 endp

align 10h


; Attributes: bp-based frame

sub_4F9C90 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4F98C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_4F9CB5
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4F9CB5:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_4F9C90 endp

align 10h


; Attributes: bp-based frame

sub_4F9CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2Ch
mov	esp, ebp
pop	ebp
retn
sub_4F9CC0 endp



; Attributes: bp-based frame

sub_4F9CD0 proc	near

var_2CC= qword ptr -2CCh
var_2C4= qword ptr -2C4h
var_2B8= byte ptr -2B8h
var_2B7= byte ptr -2B7h
var_2B6= byte ptr -2B6h
var_2B5= byte ptr -2B5h
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_28C= dword ptr -28Ch
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= byte ptr -24Ch
var_24B= byte ptr -24Bh
var_24A= byte ptr -24Ah
var_249= byte ptr -249h
var_248= dword ptr -248h
var_244= dword ptr -244h
var_23C= byte ptr -23Ch
var_22D= byte ptr -22Dh
var_22C= dword ptr -22Ch
var_201= byte ptr -201h
var_200= dword ptr -200h
var_1D5= byte ptr -1D5h
var_1D4= byte ptr -1D4h
var_1AC= dword ptr -1ACh
var_1A4= dword ptr -1A4h
var_1A0= byte ptr -1A0h
var_17C= byte ptr -17Ch
var_170= byte ptr -170h
var_160= byte ptr -160h
var_13C= byte ptr -13Ch
var_130= byte ptr -130h
var_119= byte ptr -119h
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_109= byte ptr -109h
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
var_F8=	dword ptr -0F8h
var_F0=	dword ptr -0F0h
var_E8=	dword ptr -0E8h
var_E0=	dword ptr -0E0h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
Dst= word ptr -0C8h
arg_0= qword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2B8h
push	esi
mov	[ebp+var_2B4], ecx
mov	[ebp+var_28C], 0
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4F9D10
mov	ecx, [ebp+var_2B4]
mov	edx, [ecx+4]
push	edx
push	offset aSwitchmultiple ; "SwitchMultipleBehavior--> %d"
mov	eax, dword ptr [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4F9D10:
lea	ecx, [ebp+var_249]
push	ecx
lea	edx, [ebp+var_24A]
push	edx
lea	ecx, [ebp+var_E8]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_E8]
push	eax
mov	ecx, [ebp+var_2B4]
call	sub_F79E10
mov	[ebp+var_CC], 0
lea	ecx, [ebp+var_24B]
push	ecx
lea	edx, [ebp+var_24C]
push	edx
lea	ecx, [ebp+var_100]
call	sub_489470
mov	[ebp+var_D0], 0
mov	eax, [ebp+var_E0]
mov	[ebp+var_250], eax
mov	ecx, [ebp+var_250]
lea	eax, [ebp+var_104]
call	sub_4046E0
jmp	short loc_4F9DA1

loc_4F9D8C:
mov	ecx, [ebp+var_104]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_104], eax

loc_4F9DA1:
lea	ecx, [ebp+var_E8]
lea	eax, [ebp+var_1AC]
call	sub_4046E0
lea	edx, [ebp+var_258]
mov	[ebp+var_254], edx
mov	ecx, [ebp+var_1AC]
mov	eax, [ebp+var_254]
call	sub_4046E0
mov	eax, [ebp+var_104]
xor	ecx, ecx
cmp	eax, [ebp+var_258]
setnz	cl
mov	[ebp+var_2B5], cl
movzx	edx, [ebp+var_2B5]
test	edx, edx
jz	loc_4F9ECC
mov	eax, [ebp+var_104]
add	eax, 10h
mov	[ebp+var_25C], eax
lea	ecx, [ebp+var_D0]
push	ecx
push	offset aBehaviorD ; "behavior %d"
mov	eax, [ebp+var_25C]
call	sub_412770
push	eax		; Src
call	_swscanf_s
add	esp, 0Ch
test	eax, eax
jle	loc_4F9EC7
mov	edx, [ebp+var_D0]
push	edx
push	offset aValueD	; "value %d"
push	64h		; SizeInWords
lea	eax, [ebp+Dst]
push	eax		; Dst
call	_swprintf_s
add	esp, 10h
lea	ecx, [ebp+var_1D5]
call	sub_401EF0
push	eax
lea	ecx, [ebp+Dst]
push	ecx
lea	ecx, [ebp+var_1D4]
call	sub_407810
lea	edx, [ebp+var_1D4]
push	edx
lea	eax, [ebp+var_E8]
push	eax
call	sub_F90A60
add	esp, 8
fstp	[ebp+var_108]
lea	ecx, [ebp+var_1D4]
call	sub_407E50
lea	ecx, [ebp+var_1D5]
call	nullsub_1
mov	ecx, [ebp+var_104]
add	ecx, 10h
mov	[ebp+var_260], ecx
mov	edx, [ebp+var_260]
cvttss2si esi, dword ptr [edx+28h]
lea	eax, [ebp+var_108]
push	eax
lea	ecx, [ebp+var_100]
call	sub_50E290
mov	[eax], esi

loc_4F9EC7:
jmp	loc_4F9D8C

loc_4F9ECC:
xor	ecx, ecx
cmp	[ebp+var_F0], 0
setz	cl
movzx	edx, cl
test	edx, edx
jnz	loc_4FA2A4
mov	[ebp+var_114], 0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_118], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_110], xmm0
lea	ecx, [ebp+var_201]
call	sub_401EF0
push	eax
push	offset aDistance_to_ta ; "distance_to_target"
lea	ecx, [ebp+var_200]
call	sub_407810
push	ecx		; float
fldz
fstp	dword ptr [esp+2C0h+var_2C4+4]
lea	eax, [ebp+var_200]
push	eax		; int
lea	ecx, [ebp+var_E8]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F9F5C
mov	[ebp+var_2B6], 1
jmp	short loc_4F9F63

loc_4F9F5C:
mov	[ebp+var_2B6], 0

loc_4F9F63:
mov	dl, [ebp+var_2B6]
mov	[ebp+var_109], dl
lea	ecx, [ebp+var_200]
call	sub_407E50
lea	ecx, [ebp+var_201]
call	nullsub_1
lea	ecx, [ebp+var_22D]
call	sub_401EF0
push	eax
push	offset aCharge_time ; "charge_time"
lea	ecx, [ebp+var_22C]
call	sub_407810
push	ecx		; float
fldz
fstp	dword ptr [esp+2C0h+var_2C4+4]
lea	eax, [ebp+var_22C]
push	eax		; int
lea	ecx, [ebp+var_E8]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4F9FD4
mov	[ebp+var_2B7], 1
jmp	short loc_4F9FDB

loc_4F9FD4:
mov	[ebp+var_2B7], 0

loc_4F9FDB:
mov	dl, [ebp+var_2B7]
mov	[ebp+var_119], dl
lea	ecx, [ebp+var_22C]
call	sub_407E50
lea	ecx, [ebp+var_22D]
call	nullsub_1
movzx	eax, [ebp+var_109]
test	eax, eax
jz	loc_4FA1B2
mov	ecx, dword ptr [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
lea	ecx, [ebp+var_160]
call	sub_42D660
lea	ecx, [ebp+var_13C]
mov	[ebp+var_298], ecx
mov	edx, [ebp+var_298]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_298]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FA060
lea	eax, [ebp+var_160]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FA060:
mov	edx, dword ptr [ebp+arg_0]
mov	eax, [edx+14h]
push	eax
mov	ecx, [edx+10h]
push	ecx
lea	ecx, [ebp+var_1A0]
call	sub_42D660
lea	edx, [ebp+var_17C]
mov	[ebp+var_29C], edx
mov	eax, [ebp+var_29C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_29C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FA0B6
lea	ecx, [ebp+var_1A0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FA0B6:
lea	ecx, [ebp+var_170]
lea	eax, [ebp+var_130]
push	eax
lea	eax, [ebp+var_23C]
call	sub_40F4A0
call	sub_40F500
fstp	[ebp+var_118]
mov	ecx, dword ptr [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Ch]
test	edx, edx
jz	short loc_4FA0FF
mov	eax, dword ptr [ebp+arg_0+4]
push	eax
push	ecx
fld	[ebp+var_118]
fstp	dword ptr [esp+2C4h+var_2C4]
call	sub_50E220
add	esp, 8
jmp	loc_4FA19A

loc_4FA0FF:
mov	ecx, dword ptr [ebp+arg_0+4]
push	ecx		; int
lea	edx, [ebp+var_110]
push	edx		; void *
call	sub_50DDD0
add	esp, 8
movss	xmm0, [ebp+var_118]
subss	xmm0, [ebp+var_110]
movss	[ebp+var_2A0], xmm0
push	ecx		; float
fld	[ebp+var_2A0]
fstp	dword ptr [esp+2C0h+var_2C4+4]
call	sub_40F4C0
add	esp, 4
fstp	[ebp+var_2A4]
movss	xmm0, [ebp+var_2A4]
comiss	xmm0, ds:dword_1513C78
jbe	short loc_4FA18A
fld	[ebp+var_110]
sub	esp, 8
fstp	[esp+2C4h+var_2C4]
fld	[ebp+var_118]
sub	esp, 8
fstp	[esp+2CCh+var_2CC]
mov	eax, dword ptr [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx		; char
push	offset aSwitchmultip_0 ; "SwitchMultiple distance cheat	threshold"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 24h

loc_4FA18A:
movss	xmm0, [ebp+var_110]
movss	[ebp+var_118], xmm0

loc_4FA19A:
lea	ecx, [ebp+var_1A0]
call	sub_4E5560
lea	ecx, [ebp+var_160]
call	sub_4E5560
jmp	short loc_4FA1CD

loc_4FA1B2:
movzx	eax, [ebp+var_119]
test	eax, eax
jz	short loc_4FA1CD
mov	ecx, dword ptr [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+44h]
movss	[ebp+var_118], xmm0

loc_4FA1CD:
mov	edx, [ebp+var_F8]
mov	[ebp+var_2A8], edx
mov	ecx, [ebp+var_2A8]
lea	eax, [ebp+var_1A4]
call	sub_4046E0
jmp	short loc_4FA201

loc_4FA1EC:
mov	eax, [ebp+var_1A4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1A4], eax

loc_4FA201:
lea	ecx, [ebp+var_100]
lea	eax, [ebp+var_244]
call	sub_4046E0
lea	ecx, [ebp+var_2B0]
mov	[ebp+var_2AC], ecx
mov	ecx, [ebp+var_244]
mov	eax, [ebp+var_2AC]
call	sub_4046E0
mov	edx, [ebp+var_1A4]
xor	eax, eax
cmp	edx, [ebp+var_2B0]
setnz	al
mov	[ebp+var_2B8], al
movzx	ecx, [ebp+var_2B8]
test	ecx, ecx
jz	short loc_4FA27B
mov	edx, [ebp+var_1A4]
mov	eax, [edx+14h]
mov	[ebp+var_114], eax
mov	ecx, [ebp+var_1A4]
movss	xmm0, dword ptr	[ecx+10h]
comiss	xmm0, [ebp+var_118]
jb	short loc_4FA276
jmp	short loc_4FA27B

loc_4FA276:
jmp	loc_4FA1EC

loc_4FA27B:
cmp	[ebp+var_114], 0
jz	short loc_4FA2A4
mov	edx, dword ptr [ebp+arg_0+4]
push	edx
mov	eax, dword ptr [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_114]
push	ecx
mov	ecx, [ebp+var_2B4]
call	sub_FB0570
mov	[ebp+var_CC], eax

loc_4FA2A4:
mov	edx, [ebp+var_CC]
mov	[ebp+var_248], edx
lea	ecx, [ebp+var_100]
call	sub_5021C0
lea	ecx, [ebp+var_E8]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_248]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4F9CD0 endp

align 10h


; Attributes: bp-based frame

sub_4FA2E0 proc	near

var_15C= dword ptr -15Ch
var_155= byte ptr -155h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12A= byte ptr -12Ah
var_129= byte ptr -129h
var_128= dword ptr -128h
var_124= dword ptr -124h
var_11C= dword ptr -11Ch
var_115= byte ptr -115h
var_114= dword ptr -114h
var_EA=	byte ptr -0EAh
var_E9=	byte ptr -0E9h
var_E8=	byte ptr -0E8h
var_C0=	dword ptr -0C0h
var_B8=	qword ptr -0B8h
var_B0=	byte ptr -0B0h
var_9C=	byte ptr -9Ch
var_90=	dword ptr -90h
var_84=	dword ptr -84h
var_80=	qword ptr -80h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_58=	dword ptr -58h
var_50=	qword ptr -50h
var_48=	byte ptr -48h
var_34=	byte ptr -34h
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 158h
mov	[ebp+var_150], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FA315
mov	ecx, [ebp+var_150]
mov	edx, [ecx+4]
push	edx
push	offset aEndbehaviorD ; "EndBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FA315:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FA32A
mov	eax, 1
jmp	loc_4FA648

loc_4FA32A:
lea	eax, [ebp+var_129]
push	eax
lea	ecx, [ebp+var_12A]
push	ecx
lea	ecx, [ebp+var_70]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_70]
push	edx
mov	ecx, [ebp+var_150]
call	sub_F79E10
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_E9]
call	sub_401EF0
push	eax
push	offset aStart_action ; "start_action"
lea	ecx, [ebp+var_E8]
call	sub_407810
lea	eax, [ebp+var_E8]
push	eax
lea	ecx, [ebp+var_70]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_74], eax
lea	ecx, [ebp+var_E8]
call	sub_407E50
lea	ecx, [ebp+var_E9]
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	dword ptr [ebp+var_80],	eax
mov	ecx, [edx+4]
mov	dword ptr [ebp+var_80+4], ecx
lea	ecx, [ebp+var_115]
call	sub_401EF0
push	eax
push	offset aUse_target ; "use_target"
lea	ecx, [ebp+var_114]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+15Ch+var_15C]
lea	edx, [ebp+var_114]
push	edx		; int
lea	eax, [ebp+var_70]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FA405
mov	[ebp+var_154], 1
jmp	short loc_4FA40F

loc_4FA405:
mov	[ebp+var_154], 0

loc_4FA40F:
mov	cl, byte ptr [ebp+var_154]
mov	[ebp+var_EA], cl
lea	ecx, [ebp+var_114]
call	sub_407E50
lea	ecx, [ebp+var_115]
call	nullsub_1
movzx	edx, [ebp+var_EA]
test	edx, edx
jz	short loc_4FA44B
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	dword ptr [ebp+var_80],	ecx
mov	edx, [eax+14h]
mov	dword ptr [ebp+var_80+4], edx

loc_4FA44B:
mov	eax, dword ptr [ebp+var_80]
or	eax, dword ptr [ebp+var_80+4]
jnz	short loc_4FA470
mov	[ebp+var_11C], 0
lea	ecx, [ebp+var_70]
call	sub_4FFBC0
mov	eax, [ebp+var_11C]
jmp	loc_4FA648

loc_4FA470:
mov	ecx, 138Bh
lea	eax, [ebp+var_58]
call	sub_401100
mov	[ebp+var_58], offset off_1581928
mov	ecx, dword ptr [ebp+var_80]
mov	dword ptr [ebp+var_50],	ecx
mov	edx, dword ptr [ebp+var_80+4]
mov	dword ptr [ebp+var_50+4], edx
lea	ecx, [ebp+var_48]
call	sub_E2E6F0
mov	[ebp+var_10], 2Dh
lea	eax, [ebp+var_34]
mov	[ebp+var_130], eax
mov	ecx, [ebp+var_130]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_130]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4FA4D9
lea	edx, [ebp+var_58]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FA4D9:
mov	ecx, [ebp+var_20]
mov	[ebp+var_134], ecx
mov	ecx, [ebp+var_134]
lea	eax, [ebp+var_84]
call	sub_4046E0
jmp	short loc_4FA50A

loc_4FA4F5:
mov	edx, [ebp+var_84]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_84], eax

loc_4FA50A:
lea	ecx, [ebp+var_28]
lea	eax, [ebp+var_124]
call	sub_4046E0
lea	eax, [ebp+var_13C]
mov	[ebp+var_138], eax
mov	ecx, [ebp+var_124]
mov	eax, [ebp+var_138]
call	sub_4046E0
mov	ecx, [ebp+var_84]
xor	edx, edx
cmp	ecx, [ebp+var_13C]
setnz	dl
mov	[ebp+var_155], dl
movzx	eax, [ebp+var_155]
test	eax, eax
jz	loc_4FA624
mov	ecx, [ebp+var_84]
mov	edx, [ecx+10h]
cmp	edx, [ebp+var_74]
jz	short loc_4FA56B
jmp	short loc_4FA4F5

loc_4FA56B:
mov	ecx, 138Bh
lea	eax, [ebp+var_C0]
call	sub_401100
mov	[ebp+var_C0], offset off_1558464
mov	eax, dword ptr [ebp+var_80]
mov	dword ptr [ebp+var_B8],	eax
mov	ecx, dword ptr [ebp+var_80+4]
mov	dword ptr [ebp+var_B8+4], ecx
lea	ecx, [ebp+var_B0]
call	sub_DD5F70
mov	edx, [ebp+var_84]
add	edx, 10h
mov	[ebp+var_140], edx
mov	eax, [ebp+var_140]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
lea	edx, [ebp+var_9C]
mov	[ebp+var_144], edx
mov	eax, [ebp+var_144]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_144]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FA600
lea	ecx, [ebp+var_C0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FA600:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_B0]
call	sub_4087D0
lea	ecx, [ebp+var_C0]
call	sub_401110
jmp	loc_4FA4F5

loc_4FA624:
mov	ecx, [ebp+var_4]
mov	[ebp+var_128], ecx
lea	ecx, [ebp+var_58]
call	sub_4FB380
lea	ecx, [ebp+var_70]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_128]

loc_4FA648:
mov	esp, ebp
pop	ebp
retn	8
sub_4FA2E0 endp

align 10h


; Attributes: bp-based frame

sub_4FA650 proc	near

var_36C= dword ptr -36Ch
var_365= byte ptr -365h
var_364= dword ptr -364h
var_360= dword ptr -360h
var_35C= dword ptr -35Ch
var_358= dword ptr -358h
var_354= dword ptr -354h
var_350= qword ptr -350h
var_348= dword ptr -348h
var_344= dword ptr -344h
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= dword ptr -314h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2FC= dword ptr -2FCh
var_2F8= dword ptr -2F8h
var_2F4= dword ptr -2F4h
var_2F0= dword ptr -2F0h
var_2EC= dword ptr -2ECh
var_2E8= dword ptr -2E8h
var_2E4= dword ptr -2E4h
var_2DD= byte ptr -2DDh
var_2DC= dword ptr -2DCh
var_2D8= dword ptr -2D8h
var_2D4= dword ptr -2D4h
var_2CE= byte ptr -2CEh
var_2CD= byte ptr -2CDh
var_2CC= dword ptr -2CCh
var_2C8= dword ptr -2C8h
var_2C0= dword ptr -2C0h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2A9= byte ptr -2A9h
var_2A8= dword ptr -2A8h
var_27E= byte ptr -27Eh
var_27D= byte ptr -27Dh
var_27C= dword ptr -27Ch
var_251= byte ptr -251h
var_250= dword ptr -250h
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_219= byte ptr -219h
var_218= dword ptr -218h
var_1F0= dword ptr -1F0h
var_1E8= qword ptr -1E8h
var_1E0= byte ptr -1E0h
var_1CC= byte ptr -1CCh
var_1C0= dword ptr -1C0h
var_1BC= byte ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B0= qword ptr -1B0h
var_1A8= byte ptr -1A8h
var_194= byte ptr -194h
var_188= dword ptr -188h
var_184= byte ptr -184h
var_180= dword ptr -180h
var_178= qword ptr -178h
var_170= byte ptr -170h
var_15C= byte ptr -15Ch
var_150= dword ptr -150h
var_14C= byte ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_130= qword ptr -130h
var_128= byte ptr -128h
var_114= byte ptr -114h
var_108= dword ptr -108h
var_104= byte ptr -104h
var_100= dword ptr -100h
var_F8=	qword ptr -0F8h
var_F0=	byte ptr -0F0h
var_DC=	byte ptr -0DCh
var_D0=	byte ptr -0D0h
var_CF=	byte ptr -0CFh
var_B8=	dword ptr -0B8h
var_B0=	qword ptr -0B0h
var_A8=	byte ptr -0A8h
var_94=	byte ptr -94h
var_87=	byte ptr -87h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_68=	qword ptr -68h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_23=	byte ptr -23h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 368h
mov	[ebp+var_344], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FA685
mov	ecx, [ebp+var_344]
mov	edx, [ecx+4]
push	edx
push	offset aInterruptbehav ; "InterruptBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FA685:
lea	ecx, [ebp+var_2CD]
push	ecx
lea	edx, [ebp+var_2CE]
push	edx
lea	ecx, [ebp+var_20]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_344]
call	sub_F79E10
lea	ecx, [ebp+var_219]
call	sub_401EF0
push	eax
push	offset aTarget	; "target"
lea	ecx, [ebp+var_218]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+36Ch+var_36C]
lea	ecx, [ebp+var_218]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FA6FE
mov	[ebp+var_348], 1
jmp	short loc_4FA708

loc_4FA6FE:
mov	[ebp+var_348], 0

loc_4FA708:
mov	al, byte ptr [ebp+var_348]
mov	[ebp+var_23], al
lea	ecx, [ebp+var_218]
call	sub_407E50
lea	ecx, [ebp+var_219]
call	nullsub_1
movzx	ecx, [ebp+var_23]
test	ecx, ecx
jz	short loc_4FA746
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	dword ptr [ebp+var_350], eax
mov	ecx, [edx+14h]
mov	dword ptr [ebp+var_350+4], ecx
jmp	short loc_4FA75A

loc_4FA746:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	dword ptr [ebp+var_350], eax
mov	ecx, [edx+4]
mov	dword ptr [ebp+var_350+4], ecx

loc_4FA75A:
mov	edx, dword ptr [ebp+var_350]
mov	dword ptr [ebp+var_8], edx
mov	eax, dword ptr [ebp+var_350+4]
mov	dword ptr [ebp+var_8+4], eax
mov	ecx, dword ptr [ebp+var_8]
or	ecx, dword ptr [ebp+var_8+4]
jnz	short loc_4FA791
mov	[ebp+var_220], 0
lea	ecx, [ebp+var_20]
call	sub_4FFBC0
mov	eax, [ebp+var_220]
jmp	loc_4FB377

loc_4FA791:
mov	edx, [ebp+arg_0]
mov	[ebp+var_354], edx
mov	eax, [ebp+var_354]
mov	ecx, [eax]
cmp	ecx, dword ptr [ebp+var_8]
jnz	short loc_4FA7B9
mov	edx, [ebp+var_354]
mov	eax, [edx+4]
cmp	eax, dword ptr [ebp+var_8+4]
jz	loc_4FA8DF

loc_4FA7B9:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Ch]
test	edx, edx
jz	loc_4FA8AF
mov	ecx, 138Bh
lea	eax, [ebp+var_B8]
call	sub_401100
mov	[ebp+var_B8], offset off_1558450
mov	eax, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_B0],	eax
mov	ecx, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_B0+4], ecx
lea	ecx, [ebp+var_A8]
call	sub_D8EEB0
lea	edx, [ebp+var_94]
mov	[ebp+var_2D4], edx
mov	eax, [ebp+var_2D4]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_2D4]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FA83F
lea	ecx, [ebp+var_B8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FA83F:
movzx	eax, [ebp+var_87]
test	eax, eax
jz	short loc_4FA88B
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B750
add	esp, 4
mov	[ebp+var_224], 0
lea	ecx, [ebp+var_A8]
call	sub_4087D0
lea	ecx, [ebp+var_B8]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_4FFBC0
mov	eax, [ebp+var_224]
jmp	loc_4FB377
jmp	short loc_4FA897

loc_4FA88B:
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B7A0
add	esp, 4

loc_4FA897:
lea	ecx, [ebp+var_A8]
call	sub_4087D0
lea	ecx, [ebp+var_B8]
call	sub_401110
jmp	short loc_4FA8DF

loc_4FA8AF:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	short loc_4FA8DF
mov	[ebp+var_228], 0
lea	ecx, [ebp+var_20]
call	sub_4FFBC0
mov	eax, [ebp+var_228]
jmp	loc_4FB377

loc_4FA8DF:
lea	ecx, [ebp+var_251]
call	sub_401EF0
push	eax
push	offset aInterrupt_atta ; "interrupt_attack"
lea	ecx, [ebp+var_250]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+36Ch+var_36C]
lea	edx, [ebp+var_250]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FA92E
mov	[ebp+var_358], 1
jmp	short loc_4FA938

loc_4FA92E:
mov	[ebp+var_358], 0

loc_4FA938:
mov	cl, byte ptr [ebp+var_358]
mov	[ebp+var_22], cl
lea	ecx, [ebp+var_250]
call	sub_407E50
lea	ecx, [ebp+var_251]
call	nullsub_1
lea	ecx, [ebp+var_27D]
call	sub_401EF0
push	eax
push	offset aInterrupt_char ; "interrupt_charge"
lea	ecx, [ebp+var_27C]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+36Ch+var_36C]
lea	edx, [ebp+var_27C]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FA9A6
mov	[ebp+var_35C], 1
jmp	short loc_4FA9B0

loc_4FA9A6:
mov	[ebp+var_35C], 0

loc_4FA9B0:
mov	cl, byte ptr [ebp+var_35C]
mov	[ebp+var_21], cl
lea	ecx, [ebp+var_27C]
call	sub_407E50
lea	ecx, [ebp+var_27D]
call	nullsub_1
lea	ecx, [ebp+var_2A9]
call	sub_401EF0
push	eax
push	offset aInterrupt_bloc ; "interrupt_block"
lea	ecx, [ebp+var_2A8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+36Ch+var_36C]
lea	edx, [ebp+var_2A8]
push	edx		; int
lea	eax, [ebp+var_20]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FAA1E
mov	[ebp+var_360], 1
jmp	short loc_4FAA28

loc_4FAA1E:
mov	[ebp+var_360], 0

loc_4FAA28:
mov	cl, byte ptr [ebp+var_360]
mov	[ebp+var_27E], cl
lea	ecx, [ebp+var_2A8]
call	sub_407E50
lea	ecx, [ebp+var_2A9]
call	nullsub_1
movzx	edx, [ebp+var_27E]
test	edx, edx
jz	loc_4FAB07
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Bh]
test	ecx, ecx
jnz	loc_4FAB02
mov	ecx, 138Bh
lea	eax, [ebp+var_100]
call	sub_401100
mov	[ebp+var_100], offset off_155845C
mov	edx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_F8],	edx
mov	eax, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_F8+4], eax
lea	ecx, [ebp+var_F0]
call	sub_D96100
mov	[ebp+var_D0], 0
mov	[ebp+var_CF], 1
lea	ecx, [ebp+var_DC]
mov	[ebp+var_2D8], ecx
mov	edx, [ebp+var_2D8]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_2D8]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FAAEC
lea	eax, [ebp+var_100]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FAAEC:
lea	ecx, [ebp+var_F0]
call	sub_4087D0
lea	ecx, [ebp+var_100]
call	sub_401110

loc_4FAB02:
jmp	loc_4FAC37

loc_4FAB07:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+3Ch]
test	eax, eax
jz	loc_4FAC07
mov	ecx, 138Bh
lea	eax, [ebp+var_138]
call	sub_401100
mov	[ebp+var_138], offset off_1558464
mov	ecx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_130], ecx
mov	edx, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_130+4], edx
lea	ecx, [ebp+var_128]
call	sub_D96030
mov	[ebp+var_108], 0FFh
lea	eax, [ebp+var_114]
mov	[ebp+var_2DC], eax
mov	ecx, [ebp+var_2DC]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_2DC]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4FAB97
lea	edx, [ebp+var_138]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FAB97:
movzx	ecx, [ebp+var_104]
test	ecx, ecx
jz	short loc_4FABE3
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B750
add	esp, 4
mov	[ebp+var_2B0], 0
lea	ecx, [ebp+var_128]
call	sub_4087D0
lea	ecx, [ebp+var_138]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_4FFBC0
mov	eax, [ebp+var_2B0]
jmp	loc_4FB377
jmp	short loc_4FABEF

loc_4FABE3:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B7A0
add	esp, 4

loc_4FABEF:
lea	ecx, [ebp+var_128]
call	sub_4087D0
lea	ecx, [ebp+var_138]
call	sub_401110
jmp	short loc_4FAC37

loc_4FAC07:
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B700
add	esp, 4
movzx	edx, al
test	edx, edx
jz	short loc_4FAC37
mov	[ebp+var_2B4], 0
lea	ecx, [ebp+var_20]
call	sub_4FFBC0
mov	eax, [ebp+var_2B4]
jmp	loc_4FB377

loc_4FAC37:
mov	[ebp+var_71], 0
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Ch]
test	ecx, ecx
jz	short loc_4FAC81
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+3Bh]
test	eax, eax
jz	short loc_4FAC69
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B750
add	esp, 4
mov	[ebp+var_364], 0
jmp	short loc_4FAC7F

loc_4FAC69:
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B7A0
add	esp, 4
mov	[ebp+var_364], 0

loc_4FAC7F:
jmp	short loc_4FAC98

loc_4FAC81:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	short loc_4FAC98
mov	[ebp+var_71], 1

loc_4FAC98:
movzx	edx, [ebp+var_71]
test	edx, edx
jz	loc_4FAD7F
mov	[ebp+var_13C], 0

loc_4FACAE:
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B700
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	loc_4FAD7F
cmp	[ebp+var_13C], 64h
jl	short loc_4FAD00
push	offset aInterruptBehav ; "Interrupt Behavior: Hit 100 iterations."...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 0Ch
mov	[ebp+var_2B8], 0
lea	ecx, [ebp+var_20]
call	sub_4FFBC0
mov	eax, [ebp+var_2B8]
jmp	loc_4FB377

loc_4FAD00:
mov	edx, [ebp+arg_4]
mov	al, [edx+0Ch]
mov	[ebp+var_2DD], al
movzx	ecx, [ebp+var_2DD]
test	ecx, ecx
jz	short loc_4FAD4E
push	offset aInterruptBeh_0 ; "Interrupt Behavior: In loop while out	o"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 0Ch
mov	[ebp+var_2BC], 0
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_2BC]
jmp	loc_4FB377

loc_4FAD4E:
mov	[ebp+var_140], 0
mov	edx, [ebp+arg_4]
push	edx		; int
lea	eax, [ebp+var_140]
push	eax		; void *
call	sub_50DDD0
add	esp, 8
mov	ecx, [ebp+var_13C]
add	ecx, 1
mov	[ebp+var_13C], ecx
jmp	loc_4FACAE

loc_4FAD7F:
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1581924
mov	edx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_68],	edx
mov	eax, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_68+4], eax
lea	ecx, [ebp+var_60]
call	sub_E30840
lea	ecx, [ebp+var_4C]
mov	[ebp+var_2E4], ecx
mov	edx, [ebp+var_2E4]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_2E4]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FADE0
lea	eax, [ebp+var_70]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FADE0:
xor	edx, edx
cmp	[ebp+var_30], 0
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_4FAE53
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FAE07
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B7A0
add	esp, 4

loc_4FAE07:
mov	[ebp+var_2C0], 0
lea	ecx, [ebp+var_60]
mov	[ebp+var_2E8], ecx
mov	ecx, [ebp+var_2E8]
add	ecx, 20h
call	sub_4FF4D0
mov	ecx, [ebp+var_2E8]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_2C0]
jmp	loc_4FB377

loc_4FAE53:
mov	edx, [ebp+var_38]
mov	[ebp+var_2EC], edx
mov	ecx, [ebp+var_2EC]
lea	eax, [ebp+var_144]
call	sub_4046E0
jmp	short loc_4FAE84

loc_4FAE6F:
mov	eax, [ebp+var_144]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_144], eax

loc_4FAE84:
lea	ecx, [ebp+var_40]
lea	eax, [ebp+var_2C8]
call	sub_4046E0
lea	ecx, [ebp+var_2F4]
mov	[ebp+var_2F0], ecx
mov	ecx, [ebp+var_2C8]
mov	eax, [ebp+var_2F0]
call	sub_4046E0
mov	edx, [ebp+var_144]
xor	eax, eax
cmp	edx, [ebp+var_2F4]
setnz	al
mov	[ebp+var_365], al
movzx	ecx, [ebp+var_365]
test	ecx, ecx
jz	loc_4FB33B
movzx	edx, [ebp+var_22]
test	edx, edx
jz	loc_4FB04F
mov	eax, [ebp+var_144]
add	eax, 10h
mov	[ebp+var_2F8], eax
mov	ecx, [ebp+var_2F8]
mov	edx, [ecx+4]
mov	eax, [edx+14h]
mov	[ebp+var_2FC], eax
cmp	[ebp+var_2FC], 12h
jnz	loc_4FB04F
mov	ecx, [ebp+var_144]
mov	edx, [ecx+14h]
mov	[ebp+var_148], edx
mov	eax, [ebp+var_148]
movzx	ecx, byte ptr [eax+28h]
test	ecx, ecx
jnz	loc_4FB04A
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+3Bh]
test	eax, eax
jz	short loc_4FAF98
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B750
add	esp, 4
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_144]
mov	ecx, [eax+10h]
push	ecx
call	sub_50E110
add	esp, 8
mov	edx, [ebp+var_144]
add	edx, 10h
mov	[ebp+var_300], edx
mov	eax, dword ptr [ebp+var_8+4]
push	eax
mov	ecx, dword ptr [ebp+var_8]
push	ecx
mov	edx, [ebp+var_300]
mov	eax, [edx+4]
push	eax		; char
push	offset aInterruptBeh_1 ; "Interrupt Behavior Serialize serializin"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 18h
jmp	loc_4FB04A

loc_4FAF98:
mov	ecx, 138Bh
lea	eax, [ebp+var_180]
call	sub_401100
mov	[ebp+var_180], offset off_1558464
mov	ecx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_178], ecx
mov	edx, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_178+4], edx
lea	ecx, [ebp+var_170]
call	sub_DD5F70
mov	eax, [ebp+var_144]
add	eax, 10h
mov	[ebp+var_304], eax
mov	ecx, [ebp+var_304]
mov	edx, [ecx+4]
mov	[ebp+var_150], edx
mov	[ebp+var_14C], 1
lea	eax, [ebp+var_15C]
mov	[ebp+var_308], eax
mov	ecx, [ebp+var_308]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_308]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4FB034
lea	edx, [ebp+var_180]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FB034:
lea	ecx, [ebp+var_170]
call	sub_4087D0
lea	ecx, [ebp+var_180]
call	sub_401110

loc_4FB04A:
jmp	loc_4FB336

loc_4FB04F:
movzx	ecx, [ebp+var_21]
test	ecx, ecx
jz	short loc_4FB081
mov	edx, [ebp+var_144]
add	edx, 10h
mov	[ebp+var_30C], edx
mov	eax, [ebp+var_30C]
mov	ecx, [eax+4]
mov	edx, [ecx+14h]
mov	[ebp+var_310], edx
cmp	[ebp+var_310], 2Bh
jz	short loc_4FB0BB

loc_4FB081:
movzx	eax, [ebp+var_22]
test	eax, eax
jz	loc_4FB1DA
mov	ecx, [ebp+var_144]
add	ecx, 10h
mov	[ebp+var_314], ecx
mov	edx, [ebp+var_314]
mov	eax, [edx+4]
mov	ecx, [eax+14h]
mov	[ebp+var_318], ecx
cmp	[ebp+var_318], 38h
jnz	loc_4FB1DA

loc_4FB0BB:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+3Bh]
test	eax, eax
jz	short loc_4FB123
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_F5B750
add	esp, 4
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_144]
mov	ecx, [eax+10h]
push	ecx
call	sub_50E110
add	esp, 8
mov	edx, [ebp+var_144]
add	edx, 10h
mov	[ebp+var_31C], edx
mov	eax, dword ptr [ebp+var_8+4]
push	eax
mov	ecx, dword ptr [ebp+var_8]
push	ecx
mov	edx, [ebp+var_31C]
mov	eax, [edx+4]
push	eax		; char
push	offset aInterruptBeh_1 ; "Interrupt Behavior Serialize serializin"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 18h
jmp	loc_4FB1D5

loc_4FB123:
mov	ecx, 138Bh
lea	eax, [ebp+var_1B8]
call	sub_401100
mov	[ebp+var_1B8], offset off_1558464
mov	ecx, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_1B0], ecx
mov	edx, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_1B0+4], edx
lea	ecx, [ebp+var_1A8]
call	sub_DD5F70
mov	eax, [ebp+var_144]
add	eax, 10h
mov	[ebp+var_320], eax
mov	ecx, [ebp+var_320]
mov	edx, [ecx+4]
mov	[ebp+var_188], edx
mov	[ebp+var_184], 1
lea	eax, [ebp+var_194]
mov	[ebp+var_324], eax
mov	ecx, [ebp+var_324]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_324]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4FB1BF
lea	edx, [ebp+var_1B8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FB1BF:
lea	ecx, [ebp+var_1A8]
call	sub_4087D0
lea	ecx, [ebp+var_1B8]
call	sub_401110

loc_4FB1D5:
jmp	loc_4FB336

loc_4FB1DA:
movzx	ecx, [ebp+var_22]
test	ecx, ecx
jnz	short loc_4FB1EE
movzx	edx, [ebp+var_21]
test	edx, edx
jz	loc_4FB336

loc_4FB1EE:
mov	eax, [ebp+var_144]
add	eax, 10h
mov	[ebp+var_328], eax
mov	ecx, [ebp+var_328]
mov	edx, [ecx+4]
mov	eax, [edx+14h]
mov	[ebp+var_32C], eax
cmp	[ebp+var_32C], 2Dh
jnz	loc_4FB336
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FB284
mov	eax, [ebp+arg_4]
push	eax
call	sub_F5B750
add	esp, 4
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_144]
mov	eax, [edx+10h]
push	eax
call	sub_50E110
add	esp, 8
mov	ecx, [ebp+var_144]
add	ecx, 10h
mov	[ebp+var_330], ecx
mov	edx, dword ptr [ebp+var_8+4]
push	edx
mov	eax, dword ptr [ebp+var_8]
push	eax
mov	ecx, [ebp+var_330]
mov	edx, [ecx+4]
push	edx		; char
push	offset aInterruptBeh_1 ; "Interrupt Behavior Serialize serializin"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 18h
jmp	loc_4FB336

loc_4FB284:
mov	ecx, 138Bh
lea	eax, [ebp+var_1F0]
call	sub_401100
mov	[ebp+var_1F0], offset off_1558464
mov	eax, dword ptr [ebp+var_8]
mov	dword ptr [ebp+var_1E8], eax
mov	ecx, dword ptr [ebp+var_8+4]
mov	dword ptr [ebp+var_1E8+4], ecx
lea	ecx, [ebp+var_1E0]
call	sub_DD5F70
mov	edx, [ebp+var_144]
add	edx, 10h
mov	[ebp+var_334], edx
mov	eax, [ebp+var_334]
mov	ecx, [eax+4]
mov	[ebp+var_1C0], ecx
mov	[ebp+var_1BC], 1
lea	edx, [ebp+var_1CC]
mov	[ebp+var_338], edx
mov	eax, [ebp+var_338]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_338]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FB320
lea	ecx, [ebp+var_1F0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FB320:
lea	ecx, [ebp+var_1E0]
call	sub_4087D0
lea	ecx, [ebp+var_1F0]
call	sub_401110

loc_4FB336:
jmp	loc_4FAE6F

loc_4FB33B:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+3Bh]
test	ecx, ecx
jz	short loc_4FB352
mov	edx, [ebp+arg_4]
push	edx
call	sub_F5B7A0
add	esp, 4

loc_4FB352:
mov	[ebp+var_2CC], 1
lea	ecx, [ebp+var_70]
call	sub_4FB380
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_2CC]

loc_4FB377:
mov	esp, ebp
pop	ebp
retn	8
sub_4FA650 endp

align 10h


; Attributes: bp-based frame

sub_4FB380 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 20h
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5021C0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+var_C]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_4FB380 endp

align 10h


; Attributes: bp-based frame

sub_4FB3D0 proc	near

var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_121= byte ptr -121h
var_120= qword ptr -120h
var_118= dword ptr -118h
var_112= word ptr -112h
var_110= dword ptr -110h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_DD=	byte ptr -0DDh
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_A1=	byte ptr -0A1h
var_A0=	byte ptr -0A0h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 128h
mov	[ebp+var_110], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FB405
mov	ecx, [ebp+var_110]
mov	edx, [ecx+4]
push	edx
push	offset aAttackchaindel ; "AttackChainDelayBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FB405:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FB41A
mov	eax, 1
jmp	loc_4FB6AF

loc_4FB41A:
lea	eax, [ebp+var_DD]
push	eax
lea	ecx, [ebp+var_DE]
push	ecx
lea	ecx, [ebp+var_6C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_6C]
push	edx
mov	ecx, [ebp+var_110]
call	sub_F79E10
lea	ecx, [ebp+var_A1]
call	sub_401EF0
push	eax
push	offset aChain_action ; "chain_action"
lea	ecx, [ebp+var_A0]
call	sub_407810
lea	eax, [ebp+var_A0]
push	eax
lea	ecx, [ebp+var_6C]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_70], eax
lea	ecx, [ebp+var_A0]
call	sub_407E50
lea	ecx, [ebp+var_A1]
call	nullsub_1
lea	ecx, [ebp+var_CD]
call	sub_401EF0
push	eax
push	offset aNew_delay ; "new_delay"
lea	ecx, [ebp+var_CC]
call	sub_407810
push	ecx		; float
fld	ds:dword_1479C58
fstp	[esp+12Ch+var_12C]
lea	edx, [ebp+var_CC]
push	edx		; int
lea	eax, [ebp+var_6C]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fmul	ds:flt_15BF168
fnstcw	[ebp+var_112]
movzx	eax, [ebp+var_112]
or	eax, 0C00h
mov	[ebp+var_118], eax
fldcw	word ptr [ebp+var_118]
fistp	[ebp+var_120]
fldcw	[ebp+var_112]
mov	ecx, dword ptr [ebp+var_120]
mov	[ebp+var_54], ecx
lea	ecx, [ebp+var_CC]
call	sub_407E50
lea	ecx, [ebp+var_CD]
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_E8], eax
mov	ecx, [edx+4]
mov	[ebp+var_E4], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1581928
mov	edx, [ebp+var_E8]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_E4]
mov	[ebp+var_44], eax
lea	ecx, [ebp+var_40]
call	sub_E2E6F0
mov	[ebp+var_8], 26h
lea	ecx, [ebp+var_2C]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_EC]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_EC]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FB59B
lea	eax, [ebp+var_50]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FB59B:
mov	edx, [ebp+var_18]
mov	[ebp+var_F0], edx
mov	ecx, [ebp+var_F0]
lea	eax, [ebp+var_74]
call	sub_4046E0
jmp	short loc_4FB5C3

loc_4FB5B4:
mov	eax, [ebp+var_74]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_74], eax

loc_4FB5C3:
lea	ecx, [ebp+var_20]
lea	eax, [ebp+var_D8]
call	sub_4046E0
lea	ecx, [ebp+var_F8]
mov	[ebp+var_F4], ecx
mov	ecx, [ebp+var_D8]
mov	eax, [ebp+var_F4]
call	sub_4046E0
mov	edx, [ebp+var_74]
xor	eax, eax
cmp	edx, [ebp+var_F8]
setnz	al
mov	[ebp+var_121], al
movzx	ecx, [ebp+var_121]
test	ecx, ecx
jz	short loc_4FB68A
mov	edx, [ebp+var_74]
mov	eax, [edx+14h]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+30h]
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_FC]
cmp	eax, [ebp+var_70]
jnz	short loc_4FB66D
mov	ecx, [ebp+var_78]
mov	edx, [ecx+28h]
mov	[ebp+var_104], edx
mov	eax, [ecx+2Ch]
mov	[ebp+var_100], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_128], ecx
mov	edx, [ebp+var_128]
mov	eax, [ebp+var_104]
cmp	eax, [edx+20h]
jnz	short loc_4FB66D
mov	ecx, [ebp+var_128]
mov	edx, [ebp+var_100]
cmp	edx, [ecx+24h]
jz	short loc_4FB672

loc_4FB66D:
jmp	loc_4FB5B4

loc_4FB672:
mov	eax, [ebp+var_78]
mov	dword ptr [eax+20h], 0
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_54]
mov	[ecx+1Ch], edx
jmp	loc_4FB5B4

loc_4FB68A:
mov	[ebp+var_DC], 1
lea	ecx, [ebp+var_50]
call	sub_4FB380
lea	ecx, [ebp+var_6C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_DC]

loc_4FB6AF:
mov	esp, ebp
pop	ebp
retn	8
sub_4FB3D0 endp

align 10h


; Attributes: bp-based frame

sub_4FB6C0 proc	near

var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_288= dword ptr -288h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25A= byte ptr -25Ah
var_259= byte ptr -259h
var_258= dword ptr -258h
var_251= byte ptr -251h
var_250= dword ptr -250h
var_225= byte ptr -225h
var_224= dword ptr -224h
var_1F9= byte ptr -1F9h
var_1F8= dword ptr -1F8h
var_1CD= byte ptr -1CDh
var_1CC= dword ptr -1CCh
var_1A1= byte ptr -1A1h
var_1A0= dword ptr -1A0h
var_175= byte ptr -175h
var_174= dword ptr -174h
var_149= byte ptr -149h
var_148= dword ptr -148h
var_11D= byte ptr -11Dh
var_11C= dword ptr -11Ch
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_A4=	byte ptr -0A4h
var_98=	byte ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_54=	byte ptr -54h
var_48=	byte ptr -48h
var_3C=	byte ptr -3Ch
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 284h
mov	[ebp+var_278], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FB6F5
mov	ecx, [ebp+var_278]
mov	edx, [ecx+4]
push	edx
push	offset aCamerabehavior ; "CameraBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FB6F5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FB70A
mov	eax, 1
jmp	loc_4FBC43

loc_4FB70A:
lea	eax, [ebp+var_259]
push	eax
lea	ecx, [ebp+var_25A]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_278]
call	sub_F79E10
lea	ecx, [ebp+var_F1]
call	sub_401EF0
push	eax
push	offset aLock_camera ; "lock_camera"
lea	ecx, [ebp+var_F0]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+288h+var_288]
lea	eax, [ebp+var_F0]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FB783
mov	[ebp+var_27C], 1
jmp	short loc_4FB78D

loc_4FB783:
mov	[ebp+var_27C], 0

loc_4FB78D:
mov	edx, [ebp+var_278]
mov	al, byte ptr [ebp+var_27C]
mov	[edx+34h], al
lea	ecx, [ebp+var_F0]
call	sub_407E50
lea	ecx, [ebp+var_F1]
call	nullsub_1
lea	ecx, [ebp+var_11D]
call	sub_401EF0
push	eax
push	offset aLookat_relativ ; "lookat_relative"
lea	ecx, [ebp+var_11C]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+288h+var_288]
lea	ecx, [ebp+var_11C]
push	ecx		; int
lea	edx, [ebp+var_18]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FB801
mov	[ebp+var_280], 1
jmp	short loc_4FB80B

loc_4FB801:
mov	[ebp+var_280], 0

loc_4FB80B:
mov	al, byte ptr [ebp+var_280]
mov	[ebp+var_19], al
lea	ecx, [ebp+var_11C]
call	sub_407E50
lea	ecx, [ebp+var_11D]
call	nullsub_1
lea	ecx, [ebp+var_149]
call	sub_401EF0
push	eax
push	offset aPos_relative ; "pos_relative"
lea	ecx, [ebp+var_148]
call	sub_407810
push	ecx		; float
fld1
fstp	[esp+288h+var_288]
lea	ecx, [ebp+var_148]
push	ecx		; int
lea	edx, [ebp+var_18]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FB879
mov	[ebp+var_284], 1
jmp	short loc_4FB883

loc_4FB879:
mov	[ebp+var_284], 0

loc_4FB883:
mov	al, byte ptr [ebp+var_284]
mov	[ebp+var_1A], al
lea	ecx, [ebp+var_148]
call	sub_407E50
lea	ecx, [ebp+var_149]
call	nullsub_1
lea	ecx, [ebp+var_175]
call	sub_401EF0
push	eax
push	offset aLookat_z ; "lookat_z"
lea	ecx, [ebp+var_174]
call	sub_407810
lea	ecx, [ebp+var_1A1]
call	sub_401EF0
push	eax
push	offset aLookat_y ; "lookat_y"
lea	ecx, [ebp+var_1A0]
call	sub_407810
lea	ecx, [ebp+var_1CD]
call	sub_401EF0
push	eax
push	offset aLookat_x ; "lookat_x"
lea	ecx, [ebp+var_1CC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+288h+var_288]
lea	ecx, [ebp+var_174]
push	ecx		; int
lea	edx, [ebp+var_18]
push	edx		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+288h+var_288]
push	ecx		; float
fldz
fstp	[esp+28Ch+var_28C]
lea	eax, [ebp+var_1A0]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+28Ch+var_28C]
push	ecx		; float
fldz
fstp	[esp+290h+var_290]
lea	edx, [ebp+var_1CC]
push	edx		; int
lea	eax, [ebp+var_18]
push	eax		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+290h+var_290]
lea	ecx, [ebp+var_84]
call	sub_40F570
lea	ecx, [ebp+var_1CC]
call	sub_407E50
lea	ecx, [ebp+var_1CD]
call	nullsub_1
lea	ecx, [ebp+var_1A0]
call	sub_407E50
lea	ecx, [ebp+var_1A1]
call	nullsub_1
lea	ecx, [ebp+var_174]
call	sub_407E50
lea	ecx, [ebp+var_175]
call	nullsub_1
lea	ecx, [ebp+var_1F9]
call	sub_401EF0
push	eax
push	offset aPos_z	; "pos_z"
lea	ecx, [ebp+var_1F8]
call	sub_407810
lea	ecx, [ebp+var_225]
call	sub_401EF0
push	eax
push	offset aPos_y	; "pos_y"
lea	ecx, [ebp+var_224]
call	sub_407810
lea	ecx, [ebp+var_251]
call	sub_401EF0
push	eax
push	offset aPos_x	; "pos_x"
lea	ecx, [ebp+var_250]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+288h+var_288]
lea	ecx, [ebp+var_1F8]
push	ecx		; int
lea	edx, [ebp+var_18]
push	edx		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+288h+var_288]
push	ecx		; float
fldz
fstp	[esp+28Ch+var_28C]
lea	eax, [ebp+var_224]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+28Ch+var_28C]
push	ecx		; float
fldz
fstp	[esp+290h+var_290]
lea	edx, [ebp+var_250]
push	edx		; int
lea	eax, [ebp+var_18]
push	eax		; int
call	sub_F5FD20
add	esp, 8
fstp	[esp+290h+var_290]
lea	ecx, [ebp+var_90]
call	sub_40F570
lea	ecx, [ebp+var_250]
call	sub_407E50
lea	ecx, [ebp+var_251]
call	nullsub_1
lea	ecx, [ebp+var_224]
call	sub_407E50
lea	ecx, [ebp+var_225]
call	nullsub_1
lea	ecx, [ebp+var_1F8]
call	sub_407E50
lea	ecx, [ebp+var_1F9]
call	nullsub_1
mov	ecx, [ebp+var_278]
movzx	edx, byte ptr [ecx+34h]
test	edx, edx
jz	loc_4FBB4C
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_264], ecx
mov	edx, [eax+4]
mov	[ebp+var_260], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_C8]
call	sub_401100
mov	[ebp+var_C8], offset off_1558464
mov	eax, [ebp+var_264]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_260]
mov	[ebp+var_BC], ecx
lea	ecx, [ebp+var_B8]
call	sub_DAA390
mov	[ebp+var_98], 1
lea	edx, [ebp+var_A4]
mov	[ebp+var_268], edx
mov	eax, [ebp+var_268]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_268]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FBB36
lea	ecx, [ebp+var_C8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FBB36:
lea	ecx, [ebp+var_B8]
call	sub_4087D0
lea	ecx, [ebp+var_C8]
call	sub_401110

loc_4FBB4C:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_270], ecx
mov	edx, [eax+4]
mov	[ebp+var_26C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_78]
call	sub_401100
mov	[ebp+var_78], offset off_1599B28
mov	eax, [ebp+var_270]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_26C]
mov	[ebp+var_6C], ecx
lea	ecx, [ebp+var_68]
call	sub_DA9CA0
lea	edx, [ebp+var_48]
mov	eax, [ebp+var_90]
mov	[edx], eax
mov	ecx, [ebp+var_8C]
mov	[edx+4], ecx
mov	eax, [ebp+var_88]
mov	[edx+8], eax
lea	ecx, [ebp+var_3C]
mov	edx, [ebp+var_84]
mov	[ecx], edx
mov	eax, [ebp+var_80]
mov	[ecx+4], eax
mov	edx, [ebp+var_7C]
mov	[ecx+8], edx
mov	al, [ebp+var_1A]
mov	[ebp+var_30], al
mov	cl, [ebp+var_19]
mov	[ebp+var_2F], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [edx+4]
mov	[ebp+var_24], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_274], edx
mov	eax, [ebp+var_274]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_274]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FBC16
lea	ecx, [ebp+var_78]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FBC16:
mov	[ebp+var_258], 1
lea	ecx, [ebp+var_68]
call	sub_4087D0
lea	ecx, [ebp+var_78]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_258]

loc_4FBC43:
mov	esp, ebp
pop	ebp
retn	8
sub_4FB6C0 endp

align 10h


; Attributes: bp-based frame

sub_4FBC50 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
movzx	ecx, byte ptr [eax+34h]
test	ecx, ecx
jz	short loc_4FBCDE
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_40], eax
mov	ecx, [edx+4]
mov	[ebp+var_3C], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	edx, [ebp+var_40]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_28]
call	sub_DAA390
mov	[ebp+var_8], 0
lea	ecx, [ebp+var_14]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_44]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FBCCE
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FBCCE:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110

loc_4FBCDE:
mov	esp, ebp
pop	ebp
retn	4
sub_4FBC50 endp

align 10h


; Attributes: bp-based frame

sub_4FBCF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 32h
mov	esp, ebp
pop	ebp
retn
sub_4FBCF0 endp



; Attributes: bp-based frame

sub_4FBD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1
mov	esp, ebp
pop	ebp
retn	8
sub_4FBD00 endp

align 10h


; Attributes: bp-based frame

sub_4FBD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 33h
mov	esp, ebp
pop	ebp
retn
sub_4FBD20 endp



; Attributes: bp-based frame

sub_4FBD30 proc	near

var_2B8= dword ptr -2B8h
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_1E0= dword ptr -1E0h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= byte ptr -188h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_136= byte ptr -136h
var_135= byte ptr -135h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_11D= byte ptr -11Dh
var_11C= byte ptr -11Ch
var_F4=	dword ptr -0F4h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	byte ptr -0E4h
var_C4=	byte ptr -0C4h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4FBD30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2ACh
mov	[ebp+var_2A4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FBD7A
mov	ecx, [ebp+var_2A4]
mov	edx, [ecx+4]
push	edx
push	offset aModularbuildbe ; "ModularBuildBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FBD7A:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FBD8F
mov	eax, 1
jmp	loc_4FC21E

loc_4FBD8F:
lea	eax, [ebp+var_135]
push	eax
lea	ecx, [ebp+var_136]
push	ecx
lea	ecx, [ebp+var_6C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_6C]
push	edx
mov	ecx, [ebp+var_2A4]
call	sub_F79E10
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_140], ecx
mov	edx, [eax+4]
mov	[ebp+var_13C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_F4]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_F4], offset off_155E030
mov	eax, [ebp+var_140]
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_13C]
mov	[ebp+var_E8], ecx
lea	ecx, [ebp+var_E4]
call	sub_E8BE20
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_F4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_11D]
call	sub_401EF0
push	eax
push	offset aExtra_1	; "Extra_1"
lea	ecx, [ebp+var_11C]
call	sub_407810
mov	[ebp+var_148], eax
mov	eax, [ebp+var_148]
push	eax
lea	ecx, [ebp+var_C4]
call	sub_4504F0
mov	[ebp+var_144], eax
mov	ecx, [ebp+var_144]
lea	eax, [ebp+var_124]
call	sub_4046E0
mov	ecx, [ebp+var_124]
lea	eax, [ebp+var_74]
call	sub_4046E0
lea	ecx, [ebp+var_11C]
call	sub_407E50
lea	ecx, [ebp+var_11D]
call	nullsub_1
lea	ecx, [ebp+var_C4]
lea	eax, [ebp+var_128]
call	sub_4046E0
mov	ecx, [ebp+var_128]
lea	eax, [ebp+var_4C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
xor	edx, edx
cmp	ecx, [ebp+var_4C]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_4FBEEC
mov	ecx, [ebp+var_74]
mov	edx, [ecx+38h]
mov	[ebp+var_2AC], edx
mov	eax, [ecx+3Ch]
mov	[ebp+var_2A8], eax
jmp	short loc_4FBF01

loc_4FBEEC:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_2AC], edx
mov	eax, [ecx+14h]
mov	[ebp+var_2A8], eax

loc_4FBF01:
mov	ecx, [ebp+var_2AC]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_2A8]
mov	[ebp+var_50], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_150], ecx
mov	edx, [eax+4]
mov	[ebp+var_14C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_AC]
call	sub_401100
mov	[ebp+var_AC], offset off_1558464
mov	eax, [ebp+var_150]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_14C]
mov	[ebp+var_A0], ecx
lea	ecx, [ebp+var_9C]
call	sub_D9C240
lea	edx, [ebp+var_AC]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_44]
call	sub_401100
mov	[ebp+var_4], 2
mov	[ebp+var_44], offset off_1573D4C
mov	ecx, [ebp+var_54]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_38], edx
lea	ecx, [ebp+var_34]
call	sub_D9C1D0
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_70]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_44]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	edx, al
test	edx, edx
jz	loc_4FC1E8
mov	eax, [ebp+var_70]
mov	[ebp+var_2B0], eax
cmp	[ebp+var_2B0], 1
jz	short loc_4FC00D
cmp	[ebp+var_2B0], 2
jle	loc_4FC1E8
cmp	[ebp+var_2B0], 6
jle	loc_4FC130
jmp	loc_4FC1E8

loc_4FC00D:
movzx	ecx, [ebp+var_45]
test	ecx, ecx
jz	short loc_4FC07A
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_194], eax
mov	ecx, [edx+4]
mov	[ebp+var_190], ecx
mov	edx, [ebp+var_190]
push	edx
mov	eax, [ebp+var_194]
push	eax
lea	ecx, [ebp+var_188]
call	sub_500AD0
lea	ecx, [ebp+var_188]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_18C], 1
lea	ecx, [ebp+var_188]
call	sub_4E5560
mov	edx, [ebp+var_18C]
mov	[ebp+var_2B4], edx
jmp	short loc_4FC09D

loc_4FC07A:
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	ecx, [ebp+var_2A4]
call	sub_4FC470
mov	[ebp+var_2B4], eax

loc_4FC09D:
mov	edx, [ebp+var_2B4]
mov	[ebp+var_12C], edx
mov	[ebp+var_4], 5
mov	byte ptr [ebp+var_4], 4
lea	eax, [ebp+var_34]
mov	[ebp+var_1E0], eax
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_1E0]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_401110
lea	ecx, [ebp+var_9C]
call	sub_4087D0
lea	ecx, [ebp+var_AC]
call	sub_401110
mov	[ebp+var_4], 8
mov	byte ptr [ebp+var_4], 7
lea	ecx, [ebp+var_E4]
call	sub_4353D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_F4]
call	sub_401110
lea	ecx, [ebp+var_6C]
call	sub_4FFBC0
mov	eax, [ebp+var_12C]
jmp	loc_4FC21E

loc_4FC130:
movzx	ecx, [ebp+var_45]
test	ecx, ecx
jz	short loc_4FC15D
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+var_2A4]
call	sub_4FC230
mov	[ebp+var_2B8], eax
jmp	short loc_4FC180

loc_4FC15D:
mov	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	ecx, [ebp+var_2A4]
call	sub_4FC3E0
mov	[ebp+var_2B8], eax

loc_4FC180:
mov	eax, [ebp+var_2B8]
mov	[ebp+var_130], eax
mov	[ebp+var_4], 0Ah
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_34]
mov	[ebp+var_2A0], ecx
mov	byte ptr [ebp+var_4], 0Bh
mov	byte ptr [ebp+var_4], 9
mov	ecx, [ebp+var_2A0]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_44]
call	sub_401110
lea	ecx, [ebp+var_AC]
call	sub_4E5560
lea	ecx, [ebp+var_F4]
call	sub_435330
lea	ecx, [ebp+var_6C]
call	sub_4FFBC0
mov	eax, [ebp+var_130]
jmp	short loc_4FC21E

loc_4FC1E8:
mov	[ebp+var_134], 1
lea	ecx, [ebp+var_44]
call	sub_435190
lea	ecx, [ebp+var_AC]
call	sub_4E5560
lea	ecx, [ebp+var_F4]
call	sub_435330
lea	ecx, [ebp+var_6C]
call	sub_4FFBC0
mov	eax, [ebp+var_134]

loc_4FC21E:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_4FBD30 endp

align 10h


; Attributes: bp-based frame

sub_4FC230 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	byte ptr -0B4h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4FC230
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C4h
mov	[ebp+var_D0], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_C4]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_C4], offset off_1573D4C
mov	eax, [ebp+arg_8]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_B8], ecx
lea	ecx, [ebp+var_B4]
call	sub_DD2310
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_C4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	ecx, 138Bh
lea	eax, [ebp+var_8C]
call	sub_401100
mov	[ebp+var_8C], offset off_155845C
mov	eax, [ebp+arg_0]
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_80], ecx
lea	ecx, [ebp+var_7C]
call	sub_D9E320
mov	edx, [ebp+arg_8]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_C]
mov	[ebp+var_48], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_44]
call	sub_401100
mov	[ebp+var_44], offset off_1558464
mov	ecx, [ebp+arg_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_38], edx
lea	ecx, [ebp+var_34]
call	sub_D9DED0
lea	eax, [ebp+var_44]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	ecx, [ebp+var_14]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_94]
mov	[ebp+var_54], eax
lea	ecx, [ebp+var_8C]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_C8], 1
lea	ecx, [ebp+var_34]
call	sub_4087D0
lea	ecx, [ebp+var_44]
call	sub_401110
lea	ecx, [ebp+var_7C]
call	sub_4087D0
lea	ecx, [ebp+var_8C]
call	sub_401110
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_B4]
mov	[ebp+var_CC], edx
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_CC]
call	sub_4087D0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_C4]
call	sub_401110
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_4FC230 endp

align 10h


; Attributes: bp-based frame

sub_4FC3E0 proc	near

var_7C=	dword ptr -7Ch
var_64=	dword ptr -64h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
call	sub_407FD0
mov	eax, [eax]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
call	sub_40A440
cmp	eax, 0Ah
jz	short loc_4FC462
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558468
mov	ecx, [ebp+arg_0]
mov	[ebp+var_48], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_44], edx
lea	ecx, [ebp+var_40]
call	sub_D9DF50
mov	eax, [ebp+arg_8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_50]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_54], 1
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
mov	eax, [ebp+var_54]
jmp	short loc_4FC464

loc_4FC462:
xor	eax, eax

loc_4FC464:
mov	esp, ebp
pop	ebp
retn	10h
sub_4FC3E0 endp

align 10h


; Attributes: bp-based frame

sub_4FC470 proc	near

var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
call	sub_407FD0
mov	eax, [eax]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
call	sub_40A440
cmp	eax, 9
jz	short loc_4FC4F2
mov	ecx, 138Bh
lea	eax, [ebp+var_40]
call	sub_401100
mov	[ebp+var_40], offset off_1558450
mov	ecx, [ebp+arg_0]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_34], edx
lea	ecx, [ebp+var_30]
call	sub_DAEED0
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_40]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_44], 1
lea	ecx, [ebp+var_30]
call	sub_4087D0
lea	ecx, [ebp+var_40]
call	sub_401110
mov	eax, [ebp+var_44]
jmp	short loc_4FC4F4

loc_4FC4F2:
xor	eax, eax

loc_4FC4F4:
mov	esp, ebp
pop	ebp
retn	10h
sub_4FC470 endp

align 10h


; Attributes: bp-based frame

sub_4FC500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 34h
mov	esp, ebp
pop	ebp
retn
sub_4FC500 endp



; Attributes: bp-based frame

sub_4FC510 proc	near

var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_8C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FC545
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
push	edx
push	offset aNpccombatskill ; "NPCCombatSkill--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FC545:
lea	ecx, [ebp+var_59]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_489C40
mov	[ebp+var_C], 0
mov	dl, [ebp+var_5A]
mov	[ebp+var_8], dl
call	nullsub_1
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_F79E10
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_20]
call	sub_4046E0
jmp	short loc_4FC59B

loc_4FC58C:
mov	edx, [ebp+var_20]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_20], eax

loc_4FC59B:
lea	ecx, [ebp+var_1C]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	ecx, [ebp+var_20]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_8D], dl
movzx	eax, [ebp+var_8D]
test	eax, eax
jz	short loc_4FC643
mov	ecx, [ebp+var_20]
add	ecx, 10h
mov	[ebp+var_6C], ecx
push	offset aBehavior ; "behavior"
push	8
push	0
lea	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_6C]
call	sub_435ED0
push	eax
call	sub_43EAD0
add	esp, 8
mov	[ebp+var_29], al
lea	ecx, [ebp+var_54]
call	sub_407E50
movzx	eax, [ebp+var_29]
test	eax, eax
jz	short loc_4FC63E
mov	ecx, [ebp+var_20]
add	ecx, 10h
mov	[ebp+var_88], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
cvttss2si edx, dword ptr [ecx+28h]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_FB0570
add	eax, [ebp+var_4]
mov	[ebp+var_4], eax

loc_4FC63E:
jmp	loc_4FC58C

loc_4FC643:
mov	eax, [ebp+var_4]
mov	[ebp+var_58], eax
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	8
sub_4FC510 endp

align 10h


; Attributes: bp-based frame

sub_4FC660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FC68A
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
push	offset aTauntbehaviorD ; "TauntBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FC68A:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FC69C
mov	eax, 1
jmp	short loc_4FC6E4

loc_4FC69C:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+8], 0
jz	short loc_4FC6DF
push	ecx
fld	ds:flt_1513C04
fstp	[esp+8+var_8]
push	offset aOnhit	; "onhit"
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ecx+10h]
push	eax
call	sub_F81B80
add	esp, 20h

loc_4FC6DF:
mov	eax, 1

loc_4FC6E4:
mov	esp, ebp
pop	ebp
retn	8
sub_4FC660 endp

align 10h


; Attributes: bp-based frame

sub_4FC6F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15818A0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+8], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_403400
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15816BC
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+41h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+40h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+3Fh], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+3Eh], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+3Dh], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+3Ch], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+3Bh], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+38h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+37h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+36h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+35h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+34h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_4FC6F0 endp

align 10h


; Attributes: bp-based frame

sub_4FC790 proc	near

var_368= dword ptr -368h
var_364= dword ptr -364h
var_360= dword ptr -360h
var_35C= dword ptr -35Ch
var_358= dword ptr -358h
var_354= dword ptr -354h
var_350= dword ptr -350h
var_34C= dword ptr -34Ch
var_348= dword ptr -348h
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= dword ptr -314h
var_30E= byte ptr -30Eh
var_30D= byte ptr -30Dh
var_30C= dword ptr -30Ch
var_305= byte ptr -305h
var_304= dword ptr -304h
var_2D9= byte ptr -2D9h
var_2D8= dword ptr -2D8h
var_2AD= byte ptr -2ADh
var_2AC= dword ptr -2ACh
var_281= byte ptr -281h
var_280= dword ptr -280h
var_255= byte ptr -255h
var_254= dword ptr -254h
var_229= byte ptr -229h
var_228= dword ptr -228h
var_1FD= byte ptr -1FDh
var_1FC= dword ptr -1FCh
var_1D1= byte ptr -1D1h
var_1D0= dword ptr -1D0h
var_1A5= byte ptr -1A5h
var_1A4= dword ptr -1A4h
var_179= byte ptr -179h
var_178= dword ptr -178h
var_14D= byte ptr -14Dh
var_14C= dword ptr -14Ch
var_121= byte ptr -121h
var_120= dword ptr -120h
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	byte ptr -90h
var_7C=	byte ptr -7Ch
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_6B=	byte ptr -6Bh
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_67=	byte ptr -67h
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	byte ptr -64h
var_60=	dword ptr -60h
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 364h
mov	[ebp+var_32C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FC7C5
mov	ecx, [ebp+var_32C]
mov	edx, [ecx+4]
push	edx
push	offset aImmunitybehavi ; "ImmunityBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FC7C5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FC7DA
mov	eax, 1
jmp	loc_4FD0ED

loc_4FC7DA:
lea	eax, [ebp+var_30D]
push	eax
lea	ecx, [ebp+var_30E]
push	ecx
lea	ecx, [ebp+var_60]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_60]
push	edx
mov	ecx, [ebp+var_32C]
call	sub_F79E10
lea	ecx, [ebp+var_C9]
call	sub_401EF0
push	eax
push	offset aImmune_stun_mo ; "immune_stun_move"
lea	ecx, [ebp+var_C8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	eax, [ebp+var_C8]
push	eax		; int
lea	ecx, [ebp+var_60]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FC853
mov	[ebp+var_330], 1
jmp	short loc_4FC85D

loc_4FC853:
mov	[ebp+var_330], 0

loc_4FC85D:
mov	edx, [ebp+var_32C]
mov	al, byte ptr [ebp+var_330]
mov	[edx+34h], al
lea	ecx, [ebp+var_C8]
call	sub_407E50
lea	ecx, [ebp+var_C9]
call	nullsub_1
lea	ecx, [ebp+var_F5]
call	sub_401EF0
push	eax
push	offset aImmune_stun_ro ; "immune_stun_rotate"
lea	ecx, [ebp+var_F4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	ecx, [ebp+var_F4]
push	ecx		; int
lea	edx, [ebp+var_60]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FC8D1
mov	[ebp+var_334], 1
jmp	short loc_4FC8DB

loc_4FC8D1:
mov	[ebp+var_334], 0

loc_4FC8DB:
mov	eax, [ebp+var_32C]
mov	cl, byte ptr [ebp+var_334]
mov	[eax+35h], cl
lea	ecx, [ebp+var_F4]
call	sub_407E50
lea	ecx, [ebp+var_F5]
call	nullsub_1
lea	ecx, [ebp+var_121]
call	sub_401EF0
push	eax
push	offset aImmune_stun_at ; "immune_stun_attack"
lea	ecx, [ebp+var_120]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	edx, [ebp+var_120]
push	edx		; int
lea	eax, [ebp+var_60]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FC94F
mov	[ebp+var_338], 1
jmp	short loc_4FC959

loc_4FC94F:
mov	[ebp+var_338], 0

loc_4FC959:
mov	ecx, [ebp+var_32C]
mov	dl, byte ptr [ebp+var_338]
mov	[ecx+36h], dl
lea	ecx, [ebp+var_120]
call	sub_407E50
lea	ecx, [ebp+var_121]
call	nullsub_1
lea	ecx, [ebp+var_14D]
call	sub_401EF0
push	eax
push	offset aImmune_stun_eq ; "immune_stun_equip"
lea	ecx, [ebp+var_14C]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	eax, [ebp+var_14C]
push	eax		; int
lea	ecx, [ebp+var_60]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FC9CD
mov	[ebp+var_33C], 1
jmp	short loc_4FC9D7

loc_4FC9CD:
mov	[ebp+var_33C], 0

loc_4FC9D7:
mov	edx, [ebp+var_32C]
mov	al, byte ptr [ebp+var_33C]
mov	[edx+37h], al
lea	ecx, [ebp+var_14C]
call	sub_407E50
lea	ecx, [ebp+var_14D]
call	nullsub_1
lea	ecx, [ebp+var_179]
call	sub_401EF0
push	eax
push	offset aImmune_stun_in ; "immune_stun_interact"
lea	ecx, [ebp+var_178]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	ecx, [ebp+var_178]
push	ecx		; int
lea	edx, [ebp+var_60]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCA4B
mov	[ebp+var_340], 1
jmp	short loc_4FCA55

loc_4FCA4B:
mov	[ebp+var_340], 0

loc_4FCA55:
mov	eax, [ebp+var_32C]
mov	cl, byte ptr [ebp+var_340]
mov	[eax+38h], cl
lea	ecx, [ebp+var_178]
call	sub_407E50
lea	ecx, [ebp+var_179]
call	nullsub_1
lea	ecx, [ebp+var_1A5]
call	sub_401EF0
push	eax
push	offset aImmune_knockba ; "immune_knockback"
lea	ecx, [ebp+var_1A4]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	edx, [ebp+var_1A4]
push	edx		; int
lea	eax, [ebp+var_60]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCAC9
mov	[ebp+var_344], 1
jmp	short loc_4FCAD3

loc_4FCAC9:
mov	[ebp+var_344], 0

loc_4FCAD3:
mov	ecx, [ebp+var_32C]
mov	dl, byte ptr [ebp+var_344]
mov	[ecx+39h], dl
lea	ecx, [ebp+var_1A4]
call	sub_407E50
lea	ecx, [ebp+var_1A5]
call	nullsub_1
lea	ecx, [ebp+var_1D1]
call	sub_401EF0
push	eax
push	offset aImmune_interru ; "immune_interrupt"
lea	ecx, [ebp+var_1D0]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	eax, [ebp+var_1D0]
push	eax		; int
lea	ecx, [ebp+var_60]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCB47
mov	[ebp+var_348], 1
jmp	short loc_4FCB51

loc_4FCB47:
mov	[ebp+var_348], 0

loc_4FCB51:
mov	edx, [ebp+var_32C]
mov	al, byte ptr [ebp+var_348]
mov	[edx+3Ah], al
lea	ecx, [ebp+var_1D0]
call	sub_407E50
lea	ecx, [ebp+var_1D1]
call	nullsub_1
lea	ecx, [ebp+var_1FD]
call	sub_401EF0
push	eax
push	offset aImmune_speed ; "immune_speed"
lea	ecx, [ebp+var_1FC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	ecx, [ebp+var_1FC]
push	ecx		; int
lea	edx, [ebp+var_60]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCBC5
mov	[ebp+var_34C], 1
jmp	short loc_4FCBCF

loc_4FCBC5:
mov	[ebp+var_34C], 0

loc_4FCBCF:
mov	eax, [ebp+var_32C]
mov	cl, byte ptr [ebp+var_34C]
mov	[eax+3Bh], cl
lea	ecx, [ebp+var_1FC]
call	sub_407E50
lea	ecx, [ebp+var_1FD]
call	nullsub_1
lea	ecx, [ebp+var_229]
call	sub_401EF0
push	eax
push	offset aImmune_basic_a ; "immune_basic_attack"
lea	ecx, [ebp+var_228]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	edx, [ebp+var_228]
push	edx		; int
lea	eax, [ebp+var_60]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCC43
mov	[ebp+var_350], 1
jmp	short loc_4FCC4D

loc_4FCC43:
mov	[ebp+var_350], 0

loc_4FCC4D:
mov	ecx, [ebp+var_32C]
mov	dl, byte ptr [ebp+var_350]
mov	[ecx+3Ch], dl
lea	ecx, [ebp+var_228]
call	sub_407E50
lea	ecx, [ebp+var_229]
call	nullsub_1
lea	ecx, [ebp+var_255]
call	sub_401EF0
push	eax
push	offset aImmune_damage_ ; "immune_damage_over_time"
lea	ecx, [ebp+var_254]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	eax, [ebp+var_254]
push	eax		; int
lea	ecx, [ebp+var_60]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCCC1
mov	[ebp+var_354], 1
jmp	short loc_4FCCCB

loc_4FCCC1:
mov	[ebp+var_354], 0

loc_4FCCCB:
mov	edx, [ebp+var_32C]
mov	al, byte ptr [ebp+var_354]
mov	[edx+3Dh], al
lea	ecx, [ebp+var_254]
call	sub_407E50
lea	ecx, [ebp+var_255]
call	nullsub_1
lea	ecx, [ebp+var_281]
call	sub_401EF0
push	eax
push	offset aImmune_imagina ; "immune_imagination_gain"
lea	ecx, [ebp+var_280]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	ecx, [ebp+var_280]
push	ecx		; int
lea	edx, [ebp+var_60]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCD3F
mov	[ebp+var_358], 1
jmp	short loc_4FCD49

loc_4FCD3F:
mov	[ebp+var_358], 0

loc_4FCD49:
mov	eax, [ebp+var_32C]
mov	cl, byte ptr [ebp+var_358]
mov	[eax+3Eh], cl
lea	ecx, [ebp+var_280]
call	sub_407E50
lea	ecx, [ebp+var_281]
call	nullsub_1
lea	ecx, [ebp+var_2AD]
call	sub_401EF0
push	eax
push	offset aImmune_imagi_0 ; "immune_imagination_loss"
lea	ecx, [ebp+var_2AC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	edx, [ebp+var_2AC]
push	edx		; int
lea	eax, [ebp+var_60]
push	eax		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCDBD
mov	[ebp+var_35C], 1
jmp	short loc_4FCDC7

loc_4FCDBD:
mov	[ebp+var_35C], 0

loc_4FCDC7:
mov	ecx, [ebp+var_32C]
mov	dl, byte ptr [ebp+var_35C]
mov	[ecx+3Fh], dl
lea	ecx, [ebp+var_2AC]
call	sub_407E50
lea	ecx, [ebp+var_2AD]
call	nullsub_1
lea	ecx, [ebp+var_2D9]
call	sub_401EF0
push	eax
push	offset aImmune_quickbu ; "immune_quickbuild_interrupts"
lea	ecx, [ebp+var_2D8]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	eax, [ebp+var_2D8]
push	eax		; int
lea	ecx, [ebp+var_60]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCE3B
mov	[ebp+var_360], 1
jmp	short loc_4FCE45

loc_4FCE3B:
mov	[ebp+var_360], 0

loc_4FCE45:
mov	edx, [ebp+var_32C]
mov	al, byte ptr [ebp+var_360]
mov	[edx+40h], al
lea	ecx, [ebp+var_2D8]
call	sub_407E50
lea	ecx, [ebp+var_2D9]
call	nullsub_1
lea	ecx, [ebp+var_305]
call	sub_401EF0
push	eax
push	offset aImmune_pulltop ; "immune_pulltopoint"
lea	ecx, [ebp+var_304]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+368h+var_368]
lea	ecx, [ebp+var_304]
push	ecx		; int
lea	edx, [ebp+var_60]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fld1
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_4FCEB9
mov	[ebp+var_364], 1
jmp	short loc_4FCEC3

loc_4FCEB9:
mov	[ebp+var_364], 0

loc_4FCEC3:
mov	eax, [ebp+var_32C]
mov	cl, byte ptr [ebp+var_364]
mov	[eax+41h], cl
lea	ecx, [ebp+var_304]
call	sub_407E50
lea	ecx, [ebp+var_305]
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_318], eax
mov	ecx, [edx+14h]
mov	[ebp+var_314], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_48]
call	sub_401100
mov	[ebp+var_48], offset off_155845C
mov	edx, [ebp+var_318]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_314]
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_38]
call	sub_DD4F70
mov	ecx, [ebp+var_32C]
mov	dl, [ecx+34h]
mov	[ebp+var_14], dl
mov	eax, [ebp+var_32C]
mov	cl, [eax+35h]
mov	[ebp+var_12], cl
mov	edx, [ebp+var_32C]
mov	al, [edx+36h]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_32C]
mov	dl, [ecx+37h]
mov	[ebp+var_F], dl
mov	eax, [ebp+var_32C]
mov	cl, [eax+38h]
mov	[ebp+var_E], cl
mov	[ebp+var_18], 0
lea	edx, [ebp+var_24]
mov	[ebp+var_31C], edx
mov	eax, [ebp+var_31C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_31C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FCFA8
lea	ecx, [ebp+var_48]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FCFA8:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_324], ecx
mov	edx, [eax+14h]
mov	[ebp+var_320], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_A0]
call	sub_401100
mov	[ebp+var_A0], offset off_1558450
mov	eax, [ebp+var_324]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_320]
mov	[ebp+var_94], ecx
lea	ecx, [ebp+var_90]
call	sub_D8F090
mov	edx, [ebp+var_32C]
mov	al, [edx+39h]
mov	[ebp+var_6C], al
mov	ecx, [ebp+var_32C]
mov	dl, [ecx+3Ah]
mov	[ebp+var_6B], dl
mov	eax, [ebp+var_32C]
mov	cl, [eax+3Bh]
mov	[ebp+var_6A], cl
mov	edx, [ebp+var_32C]
mov	al, [edx+3Ch]
mov	[ebp+var_69], al
mov	ecx, [ebp+var_32C]
mov	dl, [ecx+3Dh]
mov	[ebp+var_68], dl
mov	eax, [ebp+var_32C]
mov	cl, [eax+3Eh]
mov	[ebp+var_67], cl
mov	edx, [ebp+var_32C]
mov	al, [edx+3Fh]
mov	[ebp+var_66], al
mov	ecx, [ebp+var_32C]
mov	dl, [ecx+40h]
mov	[ebp+var_65], dl
mov	eax, [ebp+var_32C]
mov	cl, [eax+41h]
mov	[ebp+var_64], cl
mov	[ebp+var_70], 0
lea	edx, [ebp+var_7C]
mov	[ebp+var_328], edx
mov	eax, [ebp+var_328]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_328]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FD0AA
lea	ecx, [ebp+var_A0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FD0AA:
mov	[ebp+var_30C], 1
lea	ecx, [ebp+var_90]
call	sub_4087D0
lea	ecx, [ebp+var_A0]
call	sub_401110
lea	ecx, [ebp+var_38]
call	sub_4087D0
lea	ecx, [ebp+var_48]
call	sub_401110
lea	ecx, [ebp+var_60]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_30C]

loc_4FD0ED:
mov	esp, ebp
pop	ebp
retn	8
sub_4FC790 endp

align 10h


; Attributes: bp-based frame

sub_4FD100 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_64=	byte ptr -64h
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	byte ptr -50h
var_4F=	byte ptr -4Fh
var_4E=	byte ptr -4Eh
var_4D=	byte ptr -4Dh
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FD135
mov	ecx, [ebp+var_A4]
mov	edx, [ecx+4]
push	edx
push	offset aImmunitybeha_0 ; "ImmunityBehavior Uncast %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FD135:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_90], edx
mov	eax, [ecx+14h]
mov	[ebp+var_8C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_48]
call	sub_401100
mov	[ebp+var_48], offset off_155845C
mov	ecx, [ebp+var_90]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_3C], edx
lea	ecx, [ebp+var_38]
call	sub_DD4F70
mov	eax, [ebp+var_A4]
mov	cl, [eax+34h]
mov	[ebp+var_14], cl
mov	edx, [ebp+var_A4]
mov	al, [edx+35h]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_A4]
mov	dl, [ecx+36h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_A4]
mov	cl, [eax+37h]
mov	[ebp+var_F], cl
mov	edx, [ebp+var_A4]
mov	al, [edx+38h]
mov	[ebp+var_E], al
mov	[ebp+var_18], 1
lea	ecx, [ebp+var_24]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_94]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FD1F4
lea	eax, [ebp+var_48]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FD1F4:
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_9C], eax
mov	ecx, [edx+14h]
mov	[ebp+var_98], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_88]
call	sub_401100
mov	[ebp+var_88], offset off_1558450
mov	edx, [ebp+var_9C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_98]
mov	[ebp+var_7C], eax
lea	ecx, [ebp+var_78]
call	sub_D8F090
mov	ecx, [ebp+var_A4]
mov	dl, [ecx+39h]
mov	[ebp+var_54], dl
mov	eax, [ebp+var_A4]
mov	cl, [eax+3Ah]
mov	[ebp+var_53], cl
mov	edx, [ebp+var_A4]
mov	al, [edx+3Bh]
mov	[ebp+var_52], al
mov	ecx, [ebp+var_A4]
mov	dl, [ecx+3Ch]
mov	[ebp+var_51], dl
mov	eax, [ebp+var_A4]
mov	cl, [eax+3Dh]
mov	[ebp+var_50], cl
mov	edx, [ebp+var_A4]
mov	al, [edx+3Eh]
mov	[ebp+var_4F], al
mov	ecx, [ebp+var_A4]
mov	dl, [ecx+3Fh]
mov	[ebp+var_4E], dl
mov	eax, [ebp+var_A4]
mov	cl, [eax+40h]
mov	[ebp+var_4D], cl
mov	edx, [ebp+var_A4]
mov	al, [edx+41h]
mov	[ebp+var_4C], al
mov	[ebp+var_58], 1
lea	ecx, [ebp+var_64]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_A0]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FD2EC
lea	eax, [ebp+var_88]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FD2EC:
lea	ecx, [ebp+var_78]
call	sub_4087D0
lea	ecx, [ebp+var_88]
call	sub_401110
lea	ecx, [ebp+var_38]
call	sub_4087D0
lea	ecx, [ebp+var_48]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	4
sub_4FD100 endp

align 10h


; Attributes: bp-based frame

sub_4FD320 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_82=	byte ptr -82h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FD355
mov	ecx, [ebp+var_94]
mov	edx, [ecx+4]
push	edx
push	offset aDamageabsorpti ; "DamageAbsorptionBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FD355:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FD36A
mov	eax, 1
jmp	loc_4FD4A7

loc_4FD36A:
lea	eax, [ebp+var_81]
push	eax
lea	ecx, [ebp+var_18]
call	sub_489C40
mov	[ebp+var_8], 0
mov	cl, [ebp+var_82]
mov	[ebp+var_4], cl
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_94]
call	sub_F79E10
lea	ecx, [ebp+var_79]
call	sub_401EF0
push	eax
push	offset aAbsorb_amount ;	"absorb_amount"
lea	ecx, [ebp+var_78]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+98h+var_98]
lea	eax, [ebp+var_78]
push	eax		; int
lea	ecx, [ebp+var_18]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	edx, [ebp+var_94]
mov	[edx+34h], eax
lea	ecx, [ebp+var_78]
call	sub_407E50
lea	ecx, [ebp+var_79]
call	nullsub_1
mov	eax, [ebp+var_94]
cmp	dword ptr [eax+34h], 0
jz	loc_4FD490
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_8C], edx
mov	eax, [ecx+14h]
mov	[ebp+var_88], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558464
mov	ecx, [ebp+var_8C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_88]
mov	[ebp+var_44], edx
lea	ecx, [ebp+var_40]
call	sub_D9A5F0
mov	eax, [ebp+var_94]
mov	ecx, [eax+34h]
mov	[ebp+var_20], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_90]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FD480
lea	ecx, [ebp+var_50]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FD480:
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110

loc_4FD490:
mov	[ebp+var_80], 1
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_80]

loc_4FD4A7:
mov	esp, ebp
pop	ebp
retn	8
sub_4FD320 endp

align 10h


; Attributes: bp-based frame

sub_4FD4B0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
cmp	dword ptr [eax+34h], 0
jz	loc_4FD549
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_40], edx
mov	eax, [ecx+14h]
mov	[ebp+var_3C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	ecx, [ebp+var_40]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_2C], edx
lea	ecx, [ebp+var_28]
call	sub_D9A5F0
mov	eax, [ebp+var_48]
mov	ecx, [eax+34h]
neg	ecx
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_14]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_44]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FD539
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FD539:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110

loc_4FD549:
mov	esp, ebp
pop	ebp
retn	4
sub_4FD4B0 endp

align 10h


; Attributes: bp-based frame

sub_4FD550 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FD57A
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
push	offset aOvertimebehavi ; "OverTimeBehavior cast	--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FD57A:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn	8
sub_4FD550 endp

align 10h


; Attributes: bp-based frame

sub_4FD590 proc	near

var_5C=	dword ptr -5Ch
var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	byte ptr -4Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FD5BC
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
push	edx
push	offset aTargetcasterbe ; "TargetCasterBehavior cast -->	%d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FD5BC:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_20], edx
mov	eax, [ecx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+10h], eax
mov	edx, [edx+4]
mov	[ecx+14h], edx
lea	eax, [ebp+var_55]
push	eax
lea	ecx, [ebp+var_18]
call	sub_489C40
mov	[ebp+var_8], 0
mov	cl, [ebp+var_56]
mov	[ebp+var_4], cl
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_F79E10
lea	ecx, [ebp+var_4D]
call	sub_401EF0
push	eax
push	offset aAction	; "action"
lea	ecx, [ebp+var_4C]
call	sub_407810
lea	eax, [ebp+var_4C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_4C]
call	sub_407E50
lea	ecx, [ebp+var_4D]
call	nullsub_1
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_FB0570
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_20]
mov	[edx+10h], eax
mov	ecx, [ebp+var_1C]
mov	[edx+14h], ecx
mov	[ebp+var_54], 1
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_54]
mov	esp, ebp
pop	ebp
retn	8
sub_4FD590 endp

align 10h


; Attributes: bp-based frame

sub_4FD690 proc	near

var_298= dword ptr -298h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_288= dword ptr -288h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_24E= byte ptr -24Eh
var_24D= byte ptr -24Dh
var_24C= dword ptr -24Ch
var_245= byte ptr -245h
var_244= dword ptr -244h
var_219= byte ptr -219h
var_218= dword ptr -218h
var_1F0= dword ptr -1F0h
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= byte ptr -1E0h
var_1CC= byte ptr -1CCh
var_1C0= byte ptr -1C0h
var_1A3= byte ptr -1A3h
var_1A2= byte ptr -1A2h
var_1A0= dword ptr -1A0h
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= byte ptr -190h
var_17C= byte ptr -17Ch
var_170= byte ptr -170h
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
var_134= byte ptr -134h
var_128= dword ptr -128h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_104= byte ptr -104h
var_F0=	byte ptr -0F0h
var_E8=	byte ptr -0E8h
var_B8=	byte ptr -0B8h
var_A8=	byte ptr -0A8h
var_78=	byte ptr -78h
var_68=	byte ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 290h
push	esi
mov	[ebp+var_290], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FD6C6
mov	ecx, [ebp+var_290]
mov	edx, [ecx+4]
push	edx
push	offset aPulltopointbeh ; "PullToPointBehavior cast --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FD6C6:
lea	ecx, [ebp+var_24D]
push	ecx
lea	edx, [ebp+var_24E]
push	edx
lea	ecx, [ebp+var_50]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_290]
call	sub_F79E10
lea	ecx, [ebp+var_219]
call	sub_401EF0
push	eax
push	offset aDistance_offse ; "distance_offset"
lea	ecx, [ebp+var_218]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+298h+var_298]
lea	ecx, [ebp+var_218]
push	ecx		; int
lea	edx, [ebp+var_50]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
mov	eax, [ebp+var_290]
fstp	dword ptr [eax+38h]
lea	ecx, [ebp+var_218]
call	sub_407E50
lea	ecx, [ebp+var_219]
call	nullsub_1
lea	ecx, [ebp+var_245]
call	sub_401EF0
push	eax
push	offset aArc_height ; "arc_height"
lea	ecx, [ebp+var_244]
call	sub_407810
push	ecx		; float
fld	ds:dword_1577A6C
fstp	[esp+298h+var_298]
lea	ecx, [ebp+var_244]
push	ecx		; int
lea	edx, [ebp+var_50]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
mov	eax, [ebp+var_290]
fstp	dword ptr [eax+34h]
lea	ecx, [ebp+var_244]
call	sub_407E50
lea	ecx, [ebp+var_245]
call	nullsub_1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
lea	ecx, [ebp+var_E8]
call	sub_42D660
lea	ecx, [ebp+var_E8]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
push	eax
mov	ecx, [edx+10h]
push	ecx
lea	ecx, [ebp+var_A8]
call	sub_42D660
lea	edx, [ebp+var_A8]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_B8]
lea	eax, [ebp+var_78]
push	eax
lea	eax, [ebp+var_68]
call	sub_40F4A0
lea	esi, [ebp+var_68]
call	sub_40F420
fstp	st
mov	ecx, [ebp+var_290]
push	ecx		; float
fld	dword ptr [ecx+38h]
fstp	[esp+298h+var_298]
lea	eax, [ebp+var_68]
call	sub_40F900
lea	edx, [ebp+var_B8]
push	edx
lea	ecx, [ebp+var_68]
lea	eax, [ebp+var_5C]
call	sub_40F7F0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_260], ecx
mov	edx, [eax+14h]
mov	[ebp+var_25C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_260]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_25C]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DA8A60
mov	[ebp+var_4], 1
lea	edx, [ebp+var_14]
mov	[ebp+var_264], edx
mov	eax, [ebp+var_264]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_264]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FD8B8
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FD8B8:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_26C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_268], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_128]
call	sub_401100
mov	[ebp+var_128], offset off_1558450
mov	eax, [ebp+var_26C]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_268]
mov	[ebp+var_11C], ecx
lea	ecx, [ebp+var_118]
call	sub_D8EEB0
lea	edx, [ebp+var_104]
mov	[ebp+var_270], edx
mov	eax, [ebp+var_270]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_270]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FD94A
lea	ecx, [ebp+var_128]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FD94A:
movzx	eax, [ebp+var_8]
test	eax, eax
jz	loc_4FDB50
movzx	ecx, [ebp+var_F0]
test	ecx, ecx
jnz	loc_4FDB50
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ebp+var_278], eax
mov	ecx, [edx+14h]
mov	[ebp+var_274], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_1A0]
call	sub_401100
mov	[ebp+var_1A0], offset off_1581934
mov	edx, [ebp+var_278]
mov	[ebp+var_198], edx
mov	eax, [ebp+var_274]
mov	[ebp+var_194], eax
lea	ecx, [ebp+var_190]
call	sub_E73060
mov	[ebp+var_148], 53Ah
push	offset aPulltopoint ; "pulltopoint"
lea	ecx, [ebp+var_170]
call	sub_402400
mov	ecx, [ebp+var_290]
movss	xmm0, dword ptr	[ecx+34h]
movss	[ebp+var_144], xmm0
lea	edx, [ebp+var_134]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_58]
mov	[edx+4], ecx
mov	eax, [ebp+var_54]
mov	[edx+8], eax
lea	ecx, [ebp+var_78]
lea	edx, [ebp+var_140]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
lea	edx, [ebp+var_17C]
mov	[ebp+var_27C], edx
mov	eax, [ebp+var_27C]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_27C]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FDA54
lea	ecx, [ebp+var_1A0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FDA54:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_284], ecx
mov	edx, [eax+14h]
mov	[ebp+var_280], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_1F0]
call	sub_401100
mov	[ebp+var_1F0], offset off_1558468
mov	eax, [ebp+var_284]
mov	[ebp+var_1E8], eax
mov	ecx, [ebp+var_280]
mov	[ebp+var_1E4], ecx
lea	ecx, [ebp+var_1E0]
call	sub_DDEB00
lea	edx, [ebp+var_1C0]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_58]
mov	[edx+4], ecx
mov	eax, [ebp+var_54]
mov	[edx+8], eax
mov	[ebp+var_1A3], 1
mov	[ebp+var_1A2], 1
lea	ecx, [ebp+var_1CC]
mov	[ebp+var_288], ecx
mov	edx, [ebp+var_288]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_288]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FDB0A
lea	eax, [ebp+var_1F0]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FDB0A:
lea	ecx, [ebp+var_1E0]
call	sub_4087D0
lea	ecx, [ebp+var_1F0]
call	sub_401110
lea	edx, [ebp+var_190]
mov	[ebp+var_28C], edx
mov	ecx, [ebp+var_28C]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_28C]
call	sub_4087D0
lea	ecx, [ebp+var_1A0]
call	sub_401110

loc_4FDB50:
mov	[ebp+var_24C], 1
lea	ecx, [ebp+var_118]
call	sub_4087D0
lea	ecx, [ebp+var_128]
call	sub_401110
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_A8]
call	sub_4E5560
lea	ecx, [ebp+var_E8]
call	sub_4E5560
lea	ecx, [ebp+var_50]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_24C]
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_4FD690 endp



; Attributes: bp-based frame

sub_4FDBB0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_82=	byte ptr -82h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	byte ptr -78h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_2C=	byte ptr -2Ch
var_20=	dword ptr -20h
var_18=	byte ptr -18h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FDBE5
mov	ecx, [ebp+var_94]
mov	edx, [ecx+4]
push	edx
push	offset aDamagereductio ; "DamageReductionBehavior cast --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FDBE5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FDBFA
mov	eax, 1
jmp	loc_4FDD20

loc_4FDBFA:
lea	eax, [ebp+var_81]
push	eax
lea	ecx, [ebp+var_18]
call	sub_489C40
mov	[ebp+var_8], 0
mov	cl, [ebp+var_82]
mov	[ebp+var_4], cl
call	nullsub_1
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_94]
call	sub_F79E10
lea	ecx, [ebp+var_79]
call	sub_401EF0
push	eax
push	offset aReduction_amou ; "reduction_amount"
lea	ecx, [ebp+var_78]
call	sub_407810
lea	eax, [ebp+var_78]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	edx, [ebp+var_94]
mov	[edx+34h], eax
lea	ecx, [ebp+var_78]
call	sub_407E50
lea	ecx, [ebp+var_79]
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_8C], ecx
mov	edx, [eax+14h]
mov	[ebp+var_88], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558464
mov	eax, [ebp+var_8C]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_44], ecx
lea	ecx, [ebp+var_40]
call	sub_D94F40
mov	edx, [ebp+var_94]
mov	eax, [edx+34h]
mov	[ebp+var_20], eax
lea	ecx, [ebp+var_2C]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_90]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FDCF9
lea	eax, [ebp+var_50]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FDCF9:
mov	[ebp+var_80], 1
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
lea	ecx, [ebp+var_18]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_80]

loc_4FDD20:
mov	esp, ebp
pop	ebp
retn	8
sub_4FDBB0 endp

align 10h


; Attributes: bp-based frame

sub_4FDD30 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_14=	byte ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_40], ecx
mov	edx, [eax+14h]
mov	[ebp+var_3C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_40]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_D94EA0
mov	edx, [ebp+var_48]
mov	eax, [edx+34h]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_14]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_44]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FDDA9
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FDDA9:
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn	4
sub_4FDD30 endp

align 10h


; Attributes: bp-based frame

sub_4FDDC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FDDEA
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
push	offset aTeleportToProp ; "Teleport to property behavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FDDEA:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FDDFC
mov	eax, 1
jmp	short loc_4FDE01

loc_4FDDFC:
mov	eax, 1

loc_4FDE01:
mov	esp, ebp
pop	ebp
retn	8
sub_4FDDC0 endp

align 10h


; Attributes: bp-based frame

sub_4FDE10 proc	near

var_E8=	dword ptr -0E8h
var_E2=	byte ptr -0E2h
var_E1=	byte ptr -0E1h
var_E0=	dword ptr -0E0h
var_D6=	byte ptr -0D6h
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_4C=	dword ptr -4Ch
var_44=	byte ptr -44h
var_3C=	byte ptr -3Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0E4h
mov	[ebp+var_E0], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FDE45
mov	ecx, [ebp+var_E0]
mov	edx, [ecx+4]
push	edx
push	offset aTakepicturebeh ; "TakePictureBehavior --> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FDE45:
lea	ecx, [ebp+var_D5]
push	ecx
lea	edx, [ebp+var_D6]
push	edx
lea	ecx, [ebp+var_20]
call	sub_489470
call	nullsub_1
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_F79E10
lea	ecx, [ebp+var_75]
call	sub_401EF0
push	eax
push	offset aUpload_to_web ;	"upload_to_web"
lea	ecx, [ebp+var_74]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+0E8h+var_E8]
lea	ecx, [ebp+var_74]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FDEB2
mov	[ebp+var_E1], 1
jmp	short loc_4FDEB9

loc_4FDEB2:
mov	[ebp+var_E1], 0

loc_4FDEB9:
mov	al, [ebp+var_E1]
mov	[ebp+var_1], al
lea	ecx, [ebp+var_74]
call	sub_407E50
lea	ecx, [ebp+var_75]
call	nullsub_1
lea	ecx, [ebp+var_A1]
call	sub_401EF0
push	eax
push	offset aSave_to_disk ; "save_to_disk"
lea	ecx, [ebp+var_A0]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+0E8h+var_E8]
lea	ecx, [ebp+var_A0]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
fldz
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_4FDF1E
mov	[ebp+var_E2], 1
jmp	short loc_4FDF25

loc_4FDF1E:
mov	[ebp+var_E2], 0

loc_4FDF25:
mov	al, [ebp+var_E2]
mov	[ebp+var_21], al
lea	ecx, [ebp+var_A0]
call	sub_407E50
lea	ecx, [ebp+var_A1]
call	nullsub_1
lea	ecx, [ebp+var_CD]
call	sub_401EF0
push	eax
push	offset aOverlay_type ; "overlay_type"
lea	ecx, [ebp+var_CC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+0E8h+var_E8]
lea	ecx, [ebp+var_CC]
push	ecx		; int
lea	edx, [ebp+var_20]
push	edx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_CC]
call	sub_407E50
lea	ecx, [ebp+var_CD]
call	nullsub_1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_4FE006
lea	ecx, [ebp+var_44]
call	sub_4E61E0
cmp	[ebp+var_8], 0
jnz	short loc_4FDFBC
push	offset aLight_scratchi ; "light_scratching.dds"
lea	ecx, [ebp+var_3C]
call	sub_402310
jmp	short loc_4FDFE4

loc_4FDFBC:
cmp	[ebp+var_8], 1
jnz	short loc_4FDFD1
push	offset aNasty_polaroid ; "nasty_polaroid.dds"
lea	ecx, [ebp+var_3C]
call	sub_402310
jmp	short loc_4FDFE4

loc_4FDFD1:
cmp	[ebp+var_8], 2
jnz	short loc_4FDFE4
push	offset aOld_and_browni ; "old_and_brownish.dds"
lea	ecx, [ebp+var_3C]
call	sub_402310

loc_4FDFE4:
lea	ecx, [ebp+var_44]
push	ecx
push	0Fh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_3C]
call	sub_407910
lea	ecx, [ebp+var_44]
call	sub_401110

loc_4FE006:
movzx	edx, [ebp+var_21]
test	edx, edx
jz	short loc_4FE03C
mov	ecx, 2754h
lea	eax, [ebp+var_4C]
call	sub_401100
mov	[ebp+var_4C], offset off_15C8A0C
lea	eax, [ebp+var_4C]
push	eax
push	0Fh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_4C]
call	sub_401110

loc_4FE03C:
mov	[ebp+var_D4], 1
lea	ecx, [ebp+var_20]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_D4]
mov	esp, ebp
pop	ebp
retn	8
sub_4FDE10 endp

align 10h


; Attributes: bp-based frame

sub_4FE060 proc	near

var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CA= byte ptr -1CAh
var_1C9= byte ptr -1C9h
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1BD= byte ptr -1BDh
var_1BC= dword ptr -1BCh
var_191= byte ptr -191h
var_190= byte ptr -190h
var_165= byte ptr -165h
var_164= dword ptr -164h
var_139= byte ptr -139h
var_138= byte ptr -138h
var_110= dword ptr -110h
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
var_EC=	byte ptr -0ECh
var_D8=	qword ptr -0D8h
var_C0=	dword ptr -0C0h
var_BC=	byte ptr -0BCh
var_B0=	byte ptr -0B0h
var_AC=	dword ptr -0ACh
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_4C=	byte ptr -4Ch
var_40=	qword ptr -40h
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1ECh
mov	[ebp+var_1EC], ecx
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_4FE095
mov	ecx, [ebp+var_1EC]
mov	edx, [ecx+4]
push	edx
push	offset aConsumeitembeh ; "ConsumeItemBehavior--> %d"
mov	eax, [ebp+arg_0]
push	eax
call	__initp_misc_winxfltr_14
add	esp, 0Ch

loc_4FE095:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+3Bh]
test	edx, edx
jz	short loc_4FE0AA
mov	eax, 1
jmp	loc_4FE42B

loc_4FE0AA:
lea	eax, [ebp+var_1C9]
push	eax
lea	ecx, [ebp+var_1CA]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_489470
call	nullsub_1
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_1EC]
call	sub_F79E10
lea	ecx, [ebp+var_139]
call	sub_401EF0
push	eax
push	offset aConsume_lot ; "consume_lot"
lea	ecx, [ebp+var_138]
call	sub_407810
lea	eax, [ebp+var_138]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_138]
call	sub_407E50
lea	ecx, [ebp+var_139]
call	nullsub_1
lea	ecx, [ebp+var_165]
call	sub_401EF0
push	eax
push	offset aNum_to_consume ; "num_to_consume"
lea	ecx, [ebp+var_164]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1F0h+var_1F0]
lea	edx, [ebp+var_164]
push	edx		; int
lea	eax, [ebp+var_1C]
push	eax		; int
call	sub_F5FD20
fstp	st
add	esp, 0Ch
mov	[ebp+var_28], 1
lea	ecx, [ebp+var_164]
call	sub_407E50
lea	ecx, [ebp+var_165]
call	nullsub_1
lea	ecx, [ebp+var_191]
call	sub_401EF0
push	eax
push	offset aAction_consume ; "action_consumed"
lea	ecx, [ebp+var_190]
call	sub_407810
lea	ecx, [ebp+var_190]
push	ecx
lea	edx, [ebp+var_1C]
push	edx
call	sub_F90A60
add	esp, 8
call	__ftol2_sse
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_190]
call	sub_407E50
lea	ecx, [ebp+var_191]
call	nullsub_1
lea	ecx, [ebp+var_1BD]
call	sub_401EF0
push	eax
push	offset aAction_not_con ; "action_not_consumed"
lea	ecx, [ebp+var_1BC]
call	sub_407810
push	ecx		; float
fldz
fstp	[esp+1F0h+var_1F0]
lea	eax, [ebp+var_1BC]
push	eax		; int
lea	ecx, [ebp+var_1C]
push	ecx		; int
call	sub_F5FD20
add	esp, 0Ch
call	__ftol2_sse
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_1BC]
call	sub_407E50
lea	ecx, [ebp+var_1BD]
call	nullsub_1
mov	edx, [ebp+var_24]
mov	[ebp+var_20], edx
cmp	[ebp+var_4], 0FFFFFFFFh
jz	loc_4FE3D6
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_1D4], ecx
mov	edx, [eax+4]
mov	[ebp+var_1D0], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558450
mov	eax, [ebp+var_1D4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_1D0]
mov	[ebp+var_64], ecx
lea	ecx, [ebp+var_60]
call	sub_DD35A0
mov	edx, [ebp+var_4]
mov	[ebp+var_38], edx
lea	eax, [ebp+var_4C]
mov	[ebp+var_1D8], eax
mov	ecx, [ebp+var_1D8]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_1D8]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	loc_4FE3C6
lea	edx, [ebp+var_70]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	eax, al
test	eax, eax
jz	loc_4FE3C6
mov	ecx, dword ptr [ebp+var_40]
or	ecx, dword ptr [ebp+var_40+4]
jz	loc_4FE3C6
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_1E0], eax
mov	ecx, [edx+4]
mov	[ebp+var_1DC], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_110]
call	sub_401100
mov	[ebp+var_110], offset off_1581914
mov	edx, [ebp+var_1E0]
mov	[ebp+var_108], edx
mov	eax, [ebp+var_1DC]
mov	[ebp+var_104], eax
lea	ecx, [ebp+var_100]
call	sub_F20A30
mov	ecx, dword ptr [ebp+var_40]
mov	dword ptr [ebp+var_D8],	ecx
mov	edx, dword ptr [ebp+var_40+4]
mov	dword ptr [ebp+var_D8+4], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_C0], eax
mov	[ebp+var_BC], 1
mov	[ebp+var_AC], 12h
lea	ecx, [ebp+var_EC]
mov	[ebp+var_1E4], ecx
mov	edx, [ebp+var_1E4]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_1E4]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FE396
lea	eax, [ebp+var_110]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	ecx, al
test	ecx, ecx
jz	short loc_4FE396
movzx	edx, [ebp+var_B0]
test	edx, edx
jz	short loc_4FE396
mov	eax, [ebp+var_2C]
mov	[ebp+var_20], eax

loc_4FE396:
lea	ecx, [ebp+var_100]
mov	[ebp+var_1E8], ecx
mov	ecx, [ebp+var_1E8]
add	ecx, 70h
call	sub_10FB7C0
mov	ecx, [ebp+var_1E8]
call	sub_4087D0
lea	ecx, [ebp+var_110]
call	sub_401110

loc_4FE3C6:
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110

loc_4FE3D6:
cmp	[ebp+var_20], 0
jz	short loc_4FE40E
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_1EC]
call	sub_FB0570
mov	[ebp+var_1C4], eax
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_1C4]
jmp	short loc_4FE42B

loc_4FE40E:
mov	[ebp+var_1C8], 1
lea	ecx, [ebp+var_1C]
call	sub_5028E0
call	nullsub_1
mov	eax, [ebp+var_1C8]

loc_4FE42B:
mov	esp, ebp
pop	ebp
retn	8
sub_4FE060 endp

align 10h


; Attributes: bp-based frame

sub_4FE440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_4FE440 endp

align 10h


; Attributes: bp-based frame

sub_4FE480 proc	near

var_520= dword ptr -520h
var_51C= dword ptr -51Ch
var_518= dword ptr -518h
var_514= dword ptr -514h
var_510= dword ptr -510h
var_50C= dword ptr -50Ch
var_508= dword ptr -508h
var_504= dword ptr -504h
var_500= dword ptr -500h
var_4FC= dword ptr -4FCh
var_4F8= dword ptr -4F8h
var_4F4= dword ptr -4F4h
var_4ED= byte ptr -4EDh
var_4EC= dword ptr -4ECh
var_4E8= dword ptr -4E8h
var_4E4= dword ptr -4E4h
var_4E0= dword ptr -4E0h
var_4D8= dword ptr -4D8h
var_4D4= dword ptr -4D4h
var_4D0= byte ptr -4D0h
var_4BC= byte ptr -4BCh
var_4B0= dword ptr -4B0h
var_4A8= dword ptr -4A8h
var_4A4= dword ptr -4A4h
var_4A0= byte ptr -4A0h
var_48C= byte ptr -48Ch
var_480= dword ptr -480h
var_47C= dword ptr -47Ch
var_478= byte ptr -478h
var_468= byte ptr -468h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 520h
mov	[ebp+var_518], ecx
mov	eax, [ebp+var_518]
mov	byte ptr [eax+60h], 0
lea	eax, [ebp+var_468]
call	sub_A49A00
mov	[ebp+var_4], 0
mov	dword ptr [ebp+var_4C],	0
mov	[ebp+var_10], 0
mov	[ebp+var_C], 0
mov	ecx, [ebp+var_518]
movzx	edx, byte ptr [ecx+0A0h]
test	edx, edx
jz	loc_4FE64B
mov	eax, [ebp+var_518]
mov	[ebp+var_51C], eax
mov	ecx, [ebp+var_51C]
mov	edx, [ebp+var_51C]
mov	eax, [ecx+0A8h]
or	eax, [edx+0ACh]
jz	loc_4FE64B
mov	ecx, [ebp+var_518]
cmp	dword ptr [ecx+8Ch], 0
jz	loc_4FE64B
mov	edx, [ebp+var_518]
mov	eax, [edx+8Ch]
mov	dword ptr [ebp+var_4C],	eax
mov	ecx, [ebp+var_518]
cmp	dword ptr [ecx+90h], 0
jz	loc_4FE646
mov	edx, [ebp+var_518]
mov	eax, [edx+28h]
mov	[ebp+var_4F8], eax
mov	ecx, [edx+2Ch]
mov	[ebp+var_4F4], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_4B0]
call	sub_401100
mov	[ebp+var_4B0], offset off_155845C
mov	edx, [ebp+var_4F8]
mov	[ebp+var_4A8], edx
mov	eax, [ebp+var_4F4]
mov	[ebp+var_4A4], eax
lea	ecx, [ebp+var_4A0]
call	sub_DD6EB0
mov	ecx, [ebp+var_518]
mov	edx, [ecx+0A8h]
mov	[ebp+var_480], edx
mov	eax, [ecx+0ACh]
mov	[ebp+var_47C], eax
lea	ecx, [ebp+var_48C]
mov	[ebp+var_4FC], ecx
mov	edx, [ebp+var_4FC]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_4FC]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FE5E6
lea	eax, [ebp+var_4B0]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FE5E6:
movzx	edx, [ebp+var_478]
test	edx, edx
jz	short loc_4FE630
mov	eax, [ebp+var_518]
mov	ecx, [ebp+var_518]
mov	edx, [ecx+0A8h]
mov	[eax+38h], edx
mov	ecx, [ecx+0ACh]
mov	[eax+3Ch], ecx
mov	edx, [ebp+var_518]
mov	eax, [edx+38h]
mov	[ebp+var_10], eax
mov	ecx, [edx+3Ch]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_518]
mov	eax, [edx+90h]
mov	dword ptr [ebp+var_4C],	eax

loc_4FE630:
lea	ecx, [ebp+var_4A0]
call	sub_4087D0
lea	ecx, [ebp+var_4B0]
call	sub_401110

loc_4FE646:
jmp	loc_4FE75D

loc_4FE64B:
mov	ecx, [ebp+var_518]
cmp	dword ptr [ecx+0A4h], 1
jnz	short loc_4FE67D
mov	edx, [ebp+var_518]
cmp	dword ptr [edx+88h], 0
jz	short loc_4FE67D
mov	eax, [ebp+var_518]
mov	ecx, [eax+88h]
mov	dword ptr [ebp+var_4C],	ecx
jmp	loc_4FE75D

loc_4FE67D:
mov	edx, [ebp+var_518]
movzx	eax, byte ptr [edx+0A1h]
test	eax, eax
jnz	short loc_4FE6A3
mov	ecx, [ebp+var_518]
movzx	edx, byte ptr [ecx+0A0h]
test	edx, edx
jnz	loc_4FE75D

loc_4FE6A3:
mov	eax, [ebp+var_518]
mov	ecx, [eax+8]
mov	[ebp+var_504], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_500], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_4E0]
call	sub_401100
mov	[ebp+var_4E0], offset off_1599AE8
mov	eax, [ebp+var_504]
mov	[ebp+var_4D8], eax
mov	ecx, [ebp+var_500]
mov	[ebp+var_4D4], ecx
lea	ecx, [ebp+var_4D0]
call	sub_D98B20
lea	edx, [ebp+var_4BC]
mov	[ebp+var_508], edx
mov	eax, [ebp+var_508]
mov	ecx, [eax]
or	ecx, 80000h
mov	edx, [ebp+var_508]
mov	[edx], ecx
mov	eax, 1
test	eax, eax
jz	short loc_4FE738
lea	ecx, [ebp+var_4E0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FE738:
mov	eax, [ebp+var_518]
mov	ecx, [eax+94h]
mov	dword ptr [ebp+var_4C],	ecx
lea	ecx, [ebp+var_4D0]
call	sub_4087D0
lea	ecx, [ebp+var_4E0]
call	sub_401110

loc_4FE75D:
lea	edx, [ebp+var_468]
push	edx
mov	eax, dword ptr [ebp+var_4C]
push	eax
call	sub_50E110
add	esp, 8
lea	ecx, [ebp+var_468]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_50DF90
add	esp, 0Ch
cmp	dword ptr [ebp+var_4C],	0
jz	loc_4FE877
mov	ecx, dword ptr [ebp+var_4C]
push	ecx
call	sub_FAF3D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	loc_4FE85C
lea	edx, [ebp+var_468]
push	edx
mov	eax, [ebp+var_518]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+0Ch]
call	eax
mov	[ebp+var_4E4], eax
push	1
mov	ecx, [ebp+var_518]
add	ecx, 98h
push	ecx
lea	edx, [ebp+var_468]
push	edx
mov	eax, [ebp+var_518]
add	eax, 28h
push	eax
call	sub_F79D10
add	esp, 10h
cmp	[ebp+var_4E4], 0
jz	short loc_4FE816
mov	ecx, [ebp+var_518]
add	ecx, 28h
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax+10h]
call	edx

loc_4FE816:
mov	eax, [ebp+var_4]
mov	[ebp+var_4EC], eax
mov	ecx, [ebp+var_4EC]
mov	[ebp+var_4E8], ecx
cmp	[ebp+var_4E8], 0
jz	short loc_4FE850
push	1
mov	edx, [ebp+var_4E8]
mov	eax, [edx]
mov	ecx, [ebp+var_4E8]
mov	edx, [eax]
call	edx
mov	[ebp+var_520], eax
jmp	short loc_4FE85A

loc_4FE850:
mov	[ebp+var_520], 0

loc_4FE85A:
jmp	short loc_4FE875

loc_4FE85C:
mov	eax, dword ptr [ebp+var_4C]
push	eax		; char
push	offset aMakeBehaviorFa ; "make behavior	failed in AirMovementStat"...
push	5		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h

loc_4FE875:
jmp	short loc_4FE89F

loc_4FE877:
push	1
mov	ecx, [ebp+var_518]
add	ecx, 98h
push	ecx
lea	edx, [ebp+var_468]
push	edx
mov	eax, [ebp+var_518]
add	eax, 28h
push	eax
call	sub_F79D10
add	esp, 10h

loc_4FE89F:
mov	ecx, [ebp+var_518]
mov	edx, [ecx+28h]
mov	[ebp+var_510], edx
mov	eax, [ecx+2Ch]
mov	[ebp+var_50C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_48]
call	sub_401100
mov	[ebp+var_48], offset off_1558464
mov	ecx, [ebp+var_510]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_50C]
mov	[ebp+var_3C], edx
lea	ecx, [ebp+var_38]
call	sub_D85A30
mov	eax, [ebp+var_518]
mov	ecx, [eax+98h]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_518]
mov	eax, [edx+7Ch]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_514], ecx
mov	edx, [ebp+var_514]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_514]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FE939
lea	eax, [ebp+var_48]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FE939:
mov	[ebp+var_4ED], 1
lea	ecx, [ebp+var_38]
call	sub_4087D0
lea	ecx, [ebp+var_48]
call	sub_401110
lea	eax, [ebp+var_468]
call	sub_A496A0
mov	al, [ebp+var_4ED]
mov	esp, ebp
pop	ebp
retn
sub_4FE480 endp

align 10h


; Attributes: bp-based frame

sub_4FE970 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_44=	byte ptr -44h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_C= byte ptr	-0Ch
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
movzx	eax, [ebp+arg_0]
test	eax, eax
jz	loc_4FEA9B
mov	ecx, [ebp+var_84]
mov	edx, [ecx+8]
mov	[ebp+var_70], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_6C], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_30]
call	sub_401100
mov	[ebp+var_30], offset off_1599AE8
mov	ecx, [ebp+var_70]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_6C]
mov	[ebp+var_24], edx
lea	ecx, [ebp+var_20]
call	sub_D98B20
lea	eax, [ebp+var_C]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
or	edx, 80000h
mov	eax, [ebp+var_74]
mov	[eax], edx
mov	ecx, 1
test	ecx, ecx
jz	short loc_4FE9F6
lea	edx, [ebp+var_30]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FE9F6:
mov	ecx, [ebp+var_84]
mov	edx, [ecx+28h]
mov	[ebp+var_7C], edx
mov	eax, [ecx+2Ch]
mov	[ebp+var_78], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_68]
call	sub_401100
mov	[ebp+var_68], offset off_1558464
mov	ecx, [ebp+var_7C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_5C], edx
lea	ecx, [ebp+var_58]
call	sub_D85A30
mov	eax, [ebp+var_84]
mov	ecx, [eax+98h]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_84]
mov	eax, [edx+7Ch]
mov	[ebp+var_34], eax
lea	ecx, [ebp+var_44]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	eax, [edx]
or	eax, 80000h
mov	ecx, [ebp+var_80]
mov	[ecx], eax
mov	edx, 1
test	edx, edx
jz	short loc_4FEA7B
lea	eax, [ebp+var_68]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370

loc_4FEA7B:
lea	ecx, [ebp+var_58]
call	sub_4087D0
lea	ecx, [ebp+var_68]
call	sub_401110
lea	ecx, [ebp+var_20]
call	sub_4087D0
lea	ecx, [ebp+var_30]
call	sub_401110

loc_4FEA9B:
mov	esp, ebp
pop	ebp
retn	4
sub_4FE970 endp

align 10h


; Attributes: bp-based frame

sub_4FEAB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_0], 0
jnz	short loc_4FEAC1
jmp	short loc_4FEAFC

loc_4FEAC1:
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	[ecx+0A0h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx+0A8h], eax
mov	edx, [edx+0Ch]
mov	[ecx+0ACh], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	[eax+0A4h], edx

loc_4FEAFC:
mov	esp, ebp
pop	ebp
retn	4
sub_4FEAB0 endp

align 10h


; Attributes: bp-based frame

sub_4FEB10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158181C
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_4FEB34
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_4FEB34:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4FEB10 endp

align 10h


; Attributes: bp-based frame

sub_4FEB40 proc	near

var_48=	dword ptr -48h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_48]
add	eax, 10h
mov	ecx, [ebp+var_C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_10]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
call	sub_50E690
add	esp, 20h
mov	ecx, [ebp+var_48]
call	sub_503A20
mov	esp, ebp
pop	ebp
retn
sub_4FEB40 endp

align 10h


; Attributes: bp-based frame

sub_4FEBB0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_501200
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4FEBB0 endp

align 10h


; Attributes: bp-based frame

sub_4FEC10 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_594BE0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4FEC10 endp

align 10h


; Attributes: bp-based frame

sub_4FEC70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4FEC70 endp



; Attributes: bp-based frame

sub_4FECB0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
push	eax
mov	ecx, [ebp+var_28]
call	sub_501420
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_4FECB0 endp

align 10h


; Attributes: bp-based frame

sub_4FED20 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+arg_0], edx
jnb	short loc_4FED7E
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4FED63
jmp	short loc_4FED7C

loc_4FED63:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4FED7C:
jmp	short loc_4FEDAF

loc_4FED7E:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_504130

loc_4FEDAF:
mov	esp, ebp
pop	ebp
retn	8
sub_4FED20 endp

align 10h


; Attributes: bp-based frame

sub_4FEDC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_401740
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
call	sub_402700
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_4FEDC0 endp

align 10h


; Attributes: bp-based frame

sub_4FEDF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
lea	eax, [eax+edx*8]
mov	esp, ebp
pop	ebp
retn	4
sub_4FEDF0 endp



; Attributes: bp-based frame

sub_4FEE10 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4FEE4E
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_50E6F0
add	esp, 8
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
add	ecx, 94h
mov	edx, [ebp+var_28]
mov	[edx+4], ecx
jmp	short loc_4FEE79

loc_4FEE4E:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
xor	eax, eax
mov	[ebp+var_1D], al
push	1
push	1
lea	ecx, [ebp+var_1D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_28]
call	sub_5041A0

loc_4FEE79:
mov	esp, ebp
pop	ebp
retn	4
sub_4FEE10 endp

align 10h


; Attributes: bp-based frame

sub_4FEE80 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 4
cmp	[ebp+arg_0], edx
jnb	short loc_4FEEDE
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
shl	ecx, 4
add	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_4]
jnz	short loc_4FEEC3
jmp	short loc_4FEEDC

loc_4FEEC3:
xor	eax, eax
mov	[ebp+var_9], al
lea	ecx, [ebp+var_9]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4FEEDC:
jmp	short loc_4FEF0F

loc_4FEEDE:
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_34]
call	sub_5043C0

loc_4FEF0F:
mov	esp, ebp
pop	ebp
retn	8
sub_4FEE80 endp

align 10h


; Attributes: bp-based frame

sub_4FEF20 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 6
push	eax
mov	ecx, [ebp+var_6C]
call	sub_501590
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_68]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_28]
sub	ecx, [ebp+var_64]
sar	ecx, 6
mov	[ebp+var_38], ecx
jmp	short loc_4FEF85

loc_4FEF7C:
mov	edx, [ebp+var_38]
sub	edx, 1
mov	[ebp+var_38], edx

loc_4FEF85:
cmp	[ebp+var_38], 0
jle	short loc_4FEFAF
mov	eax, [ebp+var_64]
push	eax		; int
mov	ecx, [ebp+var_34]
push	ecx		; void *
call	sub_4431D0
add	esp, 8
mov	edx, [ebp+var_64]
add	edx, 40h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_34]
add	eax, 40h
mov	[ebp+var_34], eax
jmp	short loc_4FEF7C

loc_4FEFAF:
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_34]
mov	[ecx+4], edx
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn	4
sub_4FEF20 endp

align 10h


; Attributes: bp-based frame

sub_4FEFD0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_44C270
add	esp, 8
mov	edx, [ebp+var_A8]
cmp	dword ptr [edx], 0
jz	short loc_4FF06B
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_A8]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 6
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_A0], ecx
cmp	[ebp+var_A0], 0
jz	short loc_4FF06B
mov	edx, [ebp+var_A4]
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_A0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_4FF06B:
mov	esp, ebp
pop	ebp
retn
sub_4FEFD0 endp

align 10h


; Attributes: bp-based frame

sub_4FF070 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4FF0D3
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 28h
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4FF0B8
jmp	short loc_4FF0D1

loc_4FF0B8:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_43A030

loc_4FF0D1:
jmp	short loc_4FF109

loc_4FF0D3:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_504780

loc_4FF109:
mov	esp, ebp
pop	ebp
retn	8
sub_4FF070 endp

align 10h


; Attributes: bp-based frame

sub_4FF110 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_4FF16E
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_4FF153
jmp	short loc_4FF16C

loc_4FF153:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_4FF16C:
jmp	short loc_4FF19F

loc_4FF16E:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_504800

loc_4FF19F:
mov	esp, ebp
pop	ebp
retn	8
sub_4FF110 endp

align 10h


; Attributes: bp-based frame

sub_4FF1B0 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 48h
idiv	ecx
push	eax
mov	ecx, [ebp+var_70]
call	sub_501600
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_68]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_4FF21F

loc_4FF216:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_4FF21F:
cmp	[ebp+var_2C], 0
jle	short loc_4FF249
mov	eax, [ebp+var_68]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_50E780
add	esp, 8
mov	edx, [ebp+var_68]
add	edx, 48h
mov	[ebp+var_68], edx
mov	eax, [ebp+var_28]
add	eax, 48h
mov	[ebp+var_28], eax
jmp	short loc_4FF216

loc_4FF249:
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_70]
mov	esp, ebp
pop	ebp
retn	4
sub_4FF1B0 endp

align 10h


; Attributes: bp-based frame

sub_4FF260 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E750
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_4FF2D9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_4FF2D9
mov	ecx, [ebp+var_4C]
imul	ecx, 48h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4FF2D9:
mov	esp, ebp
pop	ebp
retn
sub_4FF260 endp

align 10h


; Attributes: bp-based frame

sub_4FF2E0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4FF31B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_50E780
add	esp, 8
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 48h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_4FF346

loc_4FF31B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_504870

loc_4FF346:
mov	esp, ebp
pop	ebp
retn	4
sub_4FF2E0 endp

align 10h


; Attributes: bp-based frame

sub_4FF350 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_51C5A0
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_4FF350 endp

align 10h


; Attributes: bp-based frame

sub_4FF410 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_8]
call	sub_4046E0

loc_4FF437:
lea	edx, [ebp+var_24]
mov	[ebp+var_20], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setnz	cl
mov	[ebp+var_3D], cl
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_4FF4BE
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[ebp+var_44], eax
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
cmp	ecx, [eax+8]
jnz	short loc_4FF4B3
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_48]
mov	ecx, [edx+4]
cmp	ecx, [eax+0Ch]
jnz	short loc_4FF4B3
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_501670

loc_4FF4B3:
mov	eax, [ebp+var_C]
mov	[ebp+var_4], eax
jmp	loc_4FF437

loc_4FF4BE:
mov	esp, ebp
pop	ebp
retn	4
sub_4FF410 endp

align 10h


; Attributes: bp-based frame

sub_4FF4D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5021C0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	esp, ebp
pop	ebp
retn
sub_4FF4D0 endp

align 10h


; Attributes: bp-based frame

sub_4FF4F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx+18h], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_4FF4F0 endp

align 10h


; Attributes: bp-based frame

sub_4FF520 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_3], al
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_1]
push	edx
mov	ecx, [ebp+var_8]
call	sub_52A300
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_4]
call	nullsub_1
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+18h], xmm0
push	0
mov	ecx, [ebp+var_14]
call	sub_640690
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4FF520 endp

align 10h


; Attributes: bp-based frame

sub_4FF590 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_5057A0
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_5053B0
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4FF590 endp

align 10h


; Attributes: bp-based frame

sub_4FF5D0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E820
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_4FF649
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_4FF649
mov	ecx, [ebp+var_4C]
imul	ecx, 6Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4FF649:
mov	esp, ebp
pop	ebp
retn
sub_4FF5D0 endp

align 10h


; Attributes: bp-based frame

sub_4FF650 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4FF68B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_50E850
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 6Ch
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_4FF6B6

loc_4FF68B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_505970

loc_4FF6B6:
mov	esp, ebp
pop	ebp
retn	4
sub_4FF650 endp

align 10h


; Attributes: bp-based frame

sub_4FF6C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_505F50
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_505EE0
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4FF6C0 endp

align 10h


; Attributes: bp-based frame

sub_4FF700 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_3], al
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_1]
push	edx
mov	ecx, [ebp+var_8]
call	sub_52A300
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_4]
call	nullsub_1
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+18h], xmm0
push	0
mov	ecx, [ebp+var_14]
call	sub_640690
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_4FF700 endp

align 10h


; Attributes: bp-based frame

sub_4FF770 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_641270
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_640F10
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4FF770 endp

align 10h


; Attributes: bp-based frame

sub_4FF7C0 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5920F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_20]
add	ecx, 4
mov	[ebp+var_14], ecx
lea	edx, [ebp+var_D]
push	edx
mov	ecx, [ebp+var_14]
call	sub_52A300
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_10]
call	nullsub_1
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_20]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+18h], xmm0
push	0
mov	ecx, [ebp+var_20]
call	sub_640690
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4FF7C0 endp

align 10h


; Attributes: bp-based frame

sub_4FF860 proc	near

var_34=	dword ptr -34h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_501B00
mov	esp, ebp
pop	ebp
retn	8
sub_4FF860 endp

align 10h


; Attributes: bp-based frame

sub_4FF8A0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50F410
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_5075F0
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_30]
add	eax, 4
mov	[ebp+var_2C], eax
push	0
mov	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_507280
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_4FF8A0 endp

align 10h


; Attributes: bp-based frame

sub_4FF910 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx+0Ch]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_50E8D0
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
sub	eax, 4
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_9], cl
mov	esp, ebp
pop	ebp
retn
sub_4FF910 endp

align 10h


; Attributes: bp-based frame

sub_4FF970 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_38]
call	sub_501CE0
mov	esp, ebp
pop	ebp
retn	4
sub_4FF970 endp

align 10h


; Attributes: bp-based frame

sub_4FF9B0 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_50E910
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_4FFA0B
mov	ecx, 1
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4FFA0B:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4FF9B0 endp

align 10h


; Attributes: bp-based frame

sub_4FFA20 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_38]
call	sub_501D60
mov	esp, ebp
pop	ebp
retn	4
sub_4FFA20 endp

align 10h


; Attributes: bp-based frame

sub_4FFA60 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
push	0
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_51D900
cmp	[ebp+var_C], 0
jz	short loc_4FFAC1
mov	ecx, 1
imul	ecx, 94h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4FFAC1:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_4FFA60 endp

align 10h


; Attributes: bp-based frame

sub_4FFAE0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_51C780
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jl	short loc_4FFB12
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+var_3C]
mov	eax, [edx]
lea	ecx, [eax+ecx+10h]
mov	[ebp+var_4], ecx
jmp	short loc_4FFB19

loc_4FFB12:
mov	[ebp+var_4], 0

loc_4FFB19:
cmp	[ebp+var_4], 0
jz	short loc_4FFB2A
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_40], edx
jmp	short loc_4FFB31

loc_4FFB2A:
mov	[ebp+var_40], 0

loc_4FFB31:
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_4FFAE0 endp

align 10h


; Attributes: bp-based frame

sub_4FFB40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
cmp	ecx, [edx+4]
jg	short loc_4FFBBC
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
add	eax, 1
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax

loc_4FFB6A:
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [eax]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
cmp	eax, [ecx+4]
ja	short loc_4FFBBC
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
shl	eax, 4
lea	ecx, [ecx+eax+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	dword ptr [edx], 0FFFFFFFEh
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_4FFBBC
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
add	eax, 1
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
jmp	short loc_4FFB6A

loc_4FFBBC:
mov	esp, ebp
pop	ebp
retn
sub_4FFB40 endp



; Attributes: bp-based frame

sub_4FFBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5028E0
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_4FFBC0 endp

align 10h


; Attributes: bp-based frame

sub_4FFBE0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_4FFC43
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 30h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_4FFC28
jmp	short loc_4FFC41

loc_4FFC28:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_502DF0

loc_4FFC41:
jmp	short loc_4FFC79

loc_4FFC43:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_508E00

loc_4FFC79:
mov	esp, ebp
pop	ebp
retn	8
sub_4FFBE0 endp

align 10h


; Attributes: bp-based frame

sub_4FFC80 proc	near

var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_4FFCA4
jmp	short loc_4FFCBD

loc_4FFCA4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_502DF0

loc_4FFCBD:
mov	esp, ebp
pop	ebp
retn
sub_4FFC80 endp

align 10h


; Attributes: bp-based frame

sub_4FFCD0 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4FFD0B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_50E940
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 0Ch
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_4FFD2B

loc_4FFD0B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4C3960

loc_4FFD2B:
mov	esp, ebp
pop	ebp
retn	4
sub_4FFCD0 endp

align 10h


; Attributes: bp-based frame

sub_4FFD40 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
push	eax
mov	ecx, [ebp+var_28]
call	sub_5AAE90
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_4FFD40 endp

align 10h


; Attributes: bp-based frame

sub_4FFDB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 18h
idiv	ecx
mov	esp, ebp
pop	ebp
retn
sub_4FFDB0 endp

align 10h


; Attributes: bp-based frame

sub_4FFDD0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_4FFE49
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_4FFE49
mov	ecx, [ebp+var_54]
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_4FFE49:
mov	esp, ebp
pop	ebp
retn
sub_4FFDD0 endp

align 10h


; Attributes: bp-based frame

sub_4FFE50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4FFE8B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4E2FC0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_4FFEB6

loc_4FFE8B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5099E0

loc_4FFEB6:
mov	esp, ebp
pop	ebp
retn	4
sub_4FFE50 endp

align 10h


; Attributes: bp-based frame

sub_4FFEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax]
add	eax, 8
mov	esp, ebp
pop	ebp
retn
sub_4FFEC0 endp

align 10h


; Attributes: bp-based frame

sub_4FFEE0 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+var_10]
setnz	al
mov	[ebp+var_15], al
mov	al, [ebp+var_15]
mov	esp, ebp
pop	ebp
retn	4
sub_4FFEE0 endp

align 10h


; Attributes: bp-based frame

sub_4FFF20 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+var_10]
setz	al
mov	[ebp+var_15], al
mov	al, [ebp+var_15]
mov	esp, ebp
pop	ebp
retn	4
sub_4FFF20 endp

align 10h


; Attributes: bp-based frame

sub_4FFF60 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_4FFF9B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7AA0
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_4FFFBB

loc_4FFF9B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_50AB50

loc_4FFFBB:
mov	esp, ebp
pop	ebp
retn	4
sub_4FFF60 endp

align 10h


; Attributes: bp-based frame

sub_4FFFD0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_500033
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 0Ch
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_500018
jmp	short loc_500031

loc_500018:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_502EA0

loc_500031:
jmp	short loc_500069

loc_500033:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_50AFB0

loc_500069:
mov	esp, ebp
pop	ebp
retn	8
sub_4FFFD0 endp

align 10h


; Attributes: bp-based frame

sub_500070 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
xor	eax, eax
mov	[ebp+var_3], al
lea	eax, [ebp+var_1]
call	nullsub_1
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_8]
call	sub_52A300
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_4]
call	nullsub_1
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_18]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+18h], xmm0
push	0
mov	ecx, [ebp+var_18]
call	sub_640690
lea	ecx, [ebp+var_2]
call	nullsub_1
call	nullsub_1
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_500070 endp

align 10h


; Attributes: bp-based frame

sub_5000F0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_50BEA0
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_50BAC0
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_5000F0 endp

align 10h


; Attributes: bp-based frame

sub_500140 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 1
cmp	[ebp+arg_0], edx
jnb	short loc_500184
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*2]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_502390
jmp	short loc_5001B4

loc_500184:
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_28]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 1
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_28]
call	sub_50C1D0

loc_5001B4:
mov	esp, ebp
pop	ebp
retn	8
sub_500140 endp

align 10h


; Attributes: bp-based frame

sub_5001C0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E9A0
add	esp, 8
mov	edx, [ebp+var_9C]
cmp	dword ptr [edx], 0
jz	short loc_500260
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_9C]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_98], eax
mov	edx, [ebp+var_9C]
mov	eax, [edx]
mov	[ebp+var_94], eax
cmp	[ebp+var_94], 0
jz	short loc_500260
mov	ecx, [ebp+var_98]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_94]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_500260:
mov	esp, ebp
pop	ebp
retn
sub_5001C0 endp

align 10h


; Attributes: bp-based frame

sub_500270 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_5002D3
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 28h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_5002B8
jmp	short loc_5002D1

loc_5002B8:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_502F60

loc_5002D1:
jmp	short loc_500309

loc_5002D3:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_50C240

loc_500309:
mov	esp, ebp
pop	ebp
retn	8
sub_500270 endp

align 10h


; Attributes: bp-based frame

sub_500310 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx+28h], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_500310 endp

align 10h


; Attributes: bp-based frame

sub_500340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6D70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_500340 endp



; Attributes: bp-based frame

sub_500380 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_5003C3
mov	ecx, [ebp+var_4]
call	sub_4E9BB0
mov	eax, 1
and	eax, 1
jz	short loc_5003BB
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5003BB:
mov	edx, [ebp+var_4]
mov	[ebp+var_34], edx
jmp	short loc_5003CA

loc_5003C3:
mov	[ebp+var_34], 0

loc_5003CA:
mov	esp, ebp
pop	ebp
retn
sub_500380 endp

align 10h


; Attributes: bp-based frame

sub_5003D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0
mov	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
cmp	edx, [ebp+var_C]
jz	short loc_50042A
mov	eax, [ebp+var_C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 0
jz	short loc_500423
push	1
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
call	edx
mov	[ebp+var_1C], eax
jmp	short loc_50042A

loc_500423:
mov	[ebp+var_1C], 0

loc_50042A:
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_5003D0 endp

align 10h


; Attributes: bp-based frame

sub_500440 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_502450
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_500440 endp

align 10h


; Attributes: bp-based frame

sub_500460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_502550
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	esp, ebp
pop	ebp
retn
sub_500460 endp

align 10h


; Attributes: bp-based frame

sub_500480 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_502600
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_500480 endp

align 10h


; Attributes: bp-based frame

sub_5004E0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_18], eax
mov	[ebp+var_14], 80h
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	ecx, eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	edx, [edx]
sub	edx, [eax+4]
mov	eax, edx
cdq
mov	esi, 0Ch
idiv	esi
mov	edx, [ebp+var_18]
mov	edx, [edx+0Ch]
sub	edx, [ebp+var_4]
sar	edx, 2
sub	edx, 1
imul	edx, 0Ah
add	edx, eax
add	edx, ecx
mov	eax, edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5004E0 endp

align 10h


; Attributes: bp-based frame

sub_500560 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
lea	eax, [ebp+var_84]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_98]
add	ecx, 10h
mov	edx, [ebp+var_C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_94]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_84]
mov	[edx], eax
mov	ecx, [ebp+var_80]
mov	[edx+4], ecx
mov	eax, [ebp+var_7C]
mov	[edx+8], eax
mov	ecx, [ebp+var_78]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_74]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[eax+4], edx
mov	ecx, [ebp+var_8C]
mov	[eax+8], ecx
mov	edx, [ebp+var_88]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_21], al
lea	ecx, [ebp+var_44]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_64]
mov	[edx], eax
mov	ecx, [ebp+var_60]
mov	[edx+4], ecx
mov	eax, [ebp+var_5C]
mov	[edx+8], eax
mov	ecx, [ebp+var_58]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_70]
mov	[eax+4], edx
mov	ecx, [ebp+var_6C]
mov	[eax+8], ecx
mov	edx, [ebp+var_68]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_98]
call	sub_50C970
mov	esp, ebp
pop	ebp
retn
sub_500560 endp

align 10h


; Attributes: bp-based frame

sub_500670 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
cmp	edx, [ecx+4]
jz	short loc_5006E7
mov	eax, [ebp+var_10]
mov	ecx, [eax]
sub	ecx, 0Ch
mov	[ebp+var_C], ecx
xor	edx, edx
mov	byte ptr [ebp+var_4+1],	dl
mov	al, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_4], cl
mov	dl, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], dl
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5006D1
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
jmp	short loc_5006D8

loc_5006D1:
mov	[ebp+var_14], 0

loc_5006D8:
mov	eax, [ebp+var_10]
mov	ecx, [eax]
sub	ecx, 0Ch
mov	edx, [ebp+var_10]
mov	[edx], ecx
jmp	short loc_5006F3

loc_5006E7:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_50CC30

loc_5006F3:
mov	esp, ebp
pop	ebp
retn	4
sub_500670 endp

align 10h


; Attributes: bp-based frame

sub_500700 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [eax+10h]
cmp	edx, [ecx+14h]
jz	short loc_500736
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
sub	ecx, 0Ch
mov	edx, [ebp+var_14]
mov	[edx+10h], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
xor	edx, edx
mov	[ebp+var_1], dl
jmp	short loc_50074C

loc_500736:
mov	ecx, [ebp+var_14]
call	sub_5F34A0
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	[ebp+var_9], dl

loc_50074C:
mov	esp, ebp
pop	ebp
retn
sub_500700 endp



; Attributes: bp-based frame

sub_500750 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 18h
idiv	ecx
push	eax
mov	ecx, [ebp+var_28]
call	sub_5027D0
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_20]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_28]
mov	[ecx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_500750 endp

align 10h


; Attributes: bp-based frame

sub_5007C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_50082F
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
add	edx, 18h
mov	eax, [ebp+var_10]
mov	[eax+4], edx
jmp	short loc_50084F

loc_50082F:
xor	ecx, ecx
mov	[ebp+var_1], cl
push	1
push	1
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_50CF10

loc_50084F:
mov	esp, ebp
pop	ebp
retn	4
sub_5007C0 endp

align 10h


; Attributes: bp-based frame

sub_500860 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
lea	eax, [ebp+var_84]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_98]
add	ecx, 10h
mov	edx, [ebp+var_C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_94]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_84]
mov	[edx], eax
mov	ecx, [ebp+var_80]
mov	[edx+4], ecx
mov	eax, [ebp+var_7C]
mov	[edx+8], eax
mov	ecx, [ebp+var_78]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_74]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[eax+4], edx
mov	ecx, [ebp+var_8C]
mov	[eax+8], ecx
mov	edx, [ebp+var_88]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_21], al
lea	ecx, [ebp+var_44]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_64]
mov	[edx], eax
mov	ecx, [ebp+var_60]
mov	[edx+4], ecx
mov	eax, [ebp+var_5C]
mov	[edx+8], eax
mov	ecx, [ebp+var_58]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_70]
mov	[eax+4], edx
mov	ecx, [ebp+var_6C]
mov	[eax+8], ecx
mov	edx, [ebp+var_68]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_98]
call	sub_50D1E0
mov	esp, ebp
pop	ebp
retn
sub_500860 endp

align 10h


; Attributes: bp-based frame

sub_500970 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_502930
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_500970 endp

align 10h


; Attributes: bp-based frame

sub_5009D0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5029F0
mov	esp, ebp
pop	ebp
retn	4
sub_5009D0 endp

align 10h


; Attributes: bp-based frame

sub_500A00 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_502A70
mov	esp, ebp
pop	ebp
retn
sub_500A00 endp



; Attributes: bp-based frame

sub_500A30 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_502AE0
mov	esp, ebp
pop	ebp
retn	4
sub_500A30 endp

align 10h


; Attributes: bp-based frame

sub_500A60 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	eax, [ebp+var_30]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5030C0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_500A60 endp

align 10h


; Attributes: bp-based frame

sub_500AD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9B6E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_500AD0 endp



; Attributes: bp-based frame

sub_500B10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_4E54F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_500B3A
push	88h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_500B3A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500B10 endp

align 10h


; Attributes: bp-based frame

sub_500B50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_500B93
push	50h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_500B93:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500B50 endp

align 10h


; Attributes: bp-based frame

sub_500BA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5385C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_500BD3
push	0C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_500BD3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_500BA0 endp

align 10h


; Attributes: bp-based frame

sub_500BE0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 20h
call	sub_487140
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_500C23
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_500C23:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_500BE0 endp

align 10h


; Attributes: bp-based frame

sub_500C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_500C63
push	80h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_500C63:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_500C30 endp

align 10h


; Attributes: bp-based frame

sub_500C70 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_500C70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_18], eax
mov	eax, [ebp+var_34]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_34]
add	edx, 8
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
lea	eax, [ebp+var_E]
call	nullsub_1
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_34]
add	ecx, 0Ch
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_20]
add	ecx, 8
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 3
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], 0
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
lea	eax, [ebp+var_F]
call	nullsub_1
mov	[ebp+var_30], eax
mov	eax, [ebp+var_34]
add	eax, 18h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_2C]
add	eax, 8
mov	[ebp+var_28], eax
mov	[ebp+var_4], 6
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 7
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_500C70 endp

align 10h


; Attributes: bp-based frame

sub_500DB0 proc	near

var_68=	dword ptr -68h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_68]
add	ecx, 10h
call	sub_4E95D0
mov	ecx, [ebp+var_68]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_500DE2
push	78h
mov	ecx, [ebp+var_68]
push	ecx
call	sub_1111040
add	esp, 8

loc_500DE2:
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	4
sub_500DB0 endp

align 10h


; Attributes: bp-based frame

sub_500DF0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4FB380
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_500E17
push	50h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_500E17:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_500DF0 endp



; Attributes: bp-based frame

sub_500E20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_500E66
push	90h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_500E66:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500E20 endp

align 10h


; Attributes: bp-based frame

sub_500E70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_4F4A30
mov	ecx, [ebp+var_8]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_500EA5
push	80h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_500EA5:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500E70 endp

align 10h


; Attributes: bp-based frame

sub_500EB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_5D2630
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_500EF3
push	40h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_500EF3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500EB0 endp

align 10h


; Attributes: bp-based frame

sub_500F00 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_4FB380
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_500F27
push	48h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_500F27:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_500F00 endp



; Attributes: bp-based frame

sub_500F30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_500F73
push	78h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_500F73:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500F30 endp

align 10h


; Attributes: bp-based frame

sub_500F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_500FC6
push	0A0h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_500FC6:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500F80 endp

align 10h


; Attributes: bp-based frame

sub_500FD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_501013
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_501013:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_500FD0 endp

align 10h


; Attributes: bp-based frame

sub_501020 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
call	nullsub_1
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_50110C
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_503860
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5010C9:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5010DD
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5010C9

loc_5010DD:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5010EF:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_501103
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5010EF

loc_501103:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_50110C:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_501020 endp

align 10h


; Attributes: bp-based frame

sub_501130 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_18], eax
mov	[ebp+var_14], 80h
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 3Ch
idiv	ecx
mov	ecx, eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	edx, [edx]
sub	edx, [eax+4]
mov	eax, edx
cdq
mov	esi, 3Ch
idiv	esi
mov	edx, [ebp+var_18]
mov	edx, [edx+0Ch]
sub	edx, [ebp+var_4]
sar	edx, 2
sub	edx, 1
imul	edx, 2
add	edx, eax
add	edx, ecx
mov	eax, edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_501130 endp

align 10h


; Attributes: bp-based frame

sub_5011B0 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+18h]
sub	ecx, 3Ch
mov	edx, [ebp+var_10]
cmp	[edx+10h], ecx
jz	short loc_5011EE
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_50EA40
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+10h]
add	ecx, 3Ch
mov	edx, [ebp+var_10]
mov	[edx+10h], ecx
jmp	short loc_5011FA

loc_5011EE:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_503BC0

loc_5011FA:
mov	esp, ebp
pop	ebp
retn	4
sub_5011B0 endp



; Attributes: bp-based frame

sub_501200 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_50124D
mov	edx, 1
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50124D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_501200 endp

align 10h


; Attributes: bp-based frame

sub_501270 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50FE00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
mov	[ebp+var_48], ecx
xor	eax, eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_34]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_48]
call	sub_5E11A0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_48]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_48]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx
cmp	[ebp+var_38], 0
jz	short loc_501382
mov	edx, [ebp+var_48]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_48]
call	sub_4B9B40
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_40], eax

loc_50133F:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+8], 0
jz	short loc_501353
mov	edx, [ebp+var_40]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
jmp	short loc_50133F

loc_501353:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx

loc_501365:
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_501379
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_44], ecx
jmp	short loc_501365

loc_501379:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_501382:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_501270 endp

align 10h


; Attributes: bp-based frame

sub_5013B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
cmp	edx, [ebp+var_8]
jz	short loc_5013F2
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 8
push	edx
call	sub_406610
add	esp, 0Ch

loc_5013F2:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
sub	ecx, 8
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5013B0 endp

align 10h


; Attributes: bp-based frame

sub_501420 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_50F3A0
mov	ecx, [ebp+var_24]
mov	[ecx], eax
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_24]
mov	[eax+8], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_501420 endp

align 10h


; Attributes: bp-based frame

sub_5014C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 6
cmp	[ebp+arg_0], edx
jb	short loc_5014E2
mov	ecx, [ebp+var_4]
call	sub_504430

loc_5014E2:
mov	esp, ebp
pop	ebp
retn	4
sub_5014C0 endp

align 10h


; Attributes: bp-based frame

sub_5014F0 proc	near

var_7C=	dword ptr -7Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 40h
cmp	edx, [ebp+var_8]
jz	short loc_501567
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
add	ecx, 40h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_1C]
sub	edx, [ebp+var_14]
sar	edx, 6
mov	[ebp+var_10], edx
jmp	short loc_501541

loc_501538:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax

loc_501541:
cmp	[ebp+var_10], 0
jle	short loc_501567
mov	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_44CDB0
mov	edx, [ebp+var_14]
add	edx, 40h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 40h
mov	[ebp+var_18], eax
jmp	short loc_501538

loc_501567:
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
sub	edx, 40h
mov	eax, [ebp+var_7C]
mov	[eax+4], edx
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_50EA90
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5014F0 endp

align 10h


; Attributes: bp-based frame

sub_501590 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_444100
mov	ecx, [ebp+var_24]
mov	[ecx], eax
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
shl	edx, 6
mov	eax, [ebp+var_24]
add	edx, [eax]
mov	ecx, [ebp+var_24]
mov	[ecx+8], edx
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	8
sub_501590 endp

align 10h


; Attributes: bp-based frame

sub_501600 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_5BEB60
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 48h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_501600 endp

align 10h


; Attributes: bp-based frame

sub_501670 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
cmp	[ebp+var_C], 0
jz	short loc_5016C1
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5016C1:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_501670 endp

align 10h


; Attributes: bp-based frame

sub_5016E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_2= byte ptr	-2
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
push	edx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_10]
call	sub_489990
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
lea	edx, [ebp+var_2]
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_14]
call	sub_5057F0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5016E0 endp

align 10h


; Attributes: bp-based frame

sub_501760 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_4]
call	sub_505710
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_505420
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_501760 endp

align 10h


; Attributes: bp-based frame

sub_5017A0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 6Ch
idiv	ecx
push	eax
mov	ecx, [ebp+var_40]
call	sub_502C40
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_38]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_50180F

loc_501806:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_50180F:
cmp	[ebp+var_2C], 0
jle	short loc_501839
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_50E850
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 6Ch
mov	[ebp+var_38], edx
mov	eax, [ebp+var_28]
add	eax, 6Ch
mov	[ebp+var_28], eax
jmp	short loc_501806

loc_501839:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_5017A0 endp

align 10h


; Attributes: bp-based frame

sub_501850 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
lea	eax, [ebp+var_14]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_501850 endp

align 10h


; Attributes: bp-based frame

sub_501890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5018D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5061A0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5018D5:
mov	esp, ebp
pop	ebp
retn
sub_501890 endp

align 10h


; Attributes: bp-based frame

sub_5018E0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
cmp	edx, [ebp+var_8]
jz	short loc_501922
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 4
push	edx
call	sub_406610
add	esp, 0Ch

loc_501922:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
sub	ecx, 4
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5018E0 endp

align 10h


; Attributes: bp-based frame

sub_501950 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_501A37
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5067E0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5019F4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_501A08
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5019F4

loc_501A08:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_501A1A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_501A2E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_501A1A

loc_501A2E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_501A37:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_501950 endp

align 10h


; Attributes: bp-based frame

sub_501A50 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_51C820
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_501A99
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_501200
mov	eax, 1
jmp	short loc_501A9B

loc_501A99:
xor	eax, eax

loc_501A9B:
mov	esp, ebp
pop	ebp
retn	4
sub_501A50 endp

align 10h


; Attributes: bp-based frame

sub_501AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_501AF5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_507170
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_501AF5:
mov	esp, ebp
pop	ebp
retn
sub_501AB0 endp

align 10h


; Attributes: bp-based frame

sub_501B00 proc	near

var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
cmp	ecx, [eax+8]
jnz	short loc_501B26
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_24]
jnz	short loc_501B26
mov	ecx, [ebp+var_24]
call	sub_5935F0
jmp	short loc_501B80

loc_501B26:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_501B80
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_14]
mov	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_24]
call	sub_489890
jmp	short loc_501B26

loc_501B80:
mov	esp, ebp
pop	ebp
retn	8
sub_501B00 endp

align 10h


; Attributes: bp-based frame

sub_501B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_501BD5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_507640
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_501BD5:
mov	esp, ebp
pop	ebp
retn
sub_501B90 endp

align 10h


; Attributes: bp-based frame

sub_501BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_501C25
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_507B00
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_501C25:
mov	esp, ebp
pop	ebp
retn
sub_501BE0 endp

align 10h


; Attributes: bp-based frame

sub_501C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_501C75
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_507FB0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_501C75:
mov	esp, ebp
pop	ebp
retn
sub_501C30 endp

align 10h


; Attributes: bp-based frame

sub_501C80 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_501CC9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_594BE0
mov	eax, 1
jmp	short loc_501CCB

loc_501CC9:
xor	eax, eax

loc_501CCB:
mov	esp, ebp
pop	ebp
retn	4
sub_501C80 endp

align 10h


; Attributes: bp-based frame

sub_501CE0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503180
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_50EBB0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_501CE0 endp

align 10h


; Attributes: bp-based frame

sub_501D60 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5031E0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_50EC10
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_501D60 endp

align 10h


; Attributes: bp-based frame

sub_501DE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_4]
call	sub_5088E0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_5085F0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_501DE0 endp

align 10h


; Attributes: bp-based frame

sub_501E20 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_54]
call	sub_502D30
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_4]
jbe	short loc_501E97
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_44], eax
mov	[ebp+var_48], 0
jmp	short loc_501E79

loc_501E67:
mov	ecx, [ebp+var_48]
add	ecx, 1
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_44]
add	edx, 4
mov	[ebp+var_44], edx

loc_501E79:
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4]
cmp	[ebp+var_48], eax
jnb	short loc_501E97
mov	ecx, [ebp+var_44]
push	ecx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4C], eax
jmp	short loc_501E67

loc_501E97:
mov	esp, ebp
pop	ebp
retn	4
sub_501E20 endp

align 10h


; Attributes: bp-based frame

sub_501EA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jnz	short loc_501EC9
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+arg_0]
jmp	short loc_501F20

loc_501EC9:
mov	[ebp+var_4], 0

loc_501ED0:
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+4]
ja	short loc_501F0C
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
shl	edx, 4
lea	eax, [ecx+edx+8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	dword ptr [ecx], 0FFFFFFFEh
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_501F0C
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
jmp	short loc_501ED0

loc_501F0C:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]

loc_501F20:
mov	esp, ebp
pop	ebp
retn	4
sub_501EA0 endp

align 10h


; Attributes: bp-based frame

sub_501F30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_501F66
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
cmp	dword ptr [edx], 0
jz	short loc_501F66
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
cmp	ecx, [edx+4]
jg	short loc_501F66
mov	[ebp+var_8], 0
jmp	short loc_501F6D

loc_501F66:
mov	[ebp+var_8], 1

loc_501F6D:
movzx	edx, byte ptr [ebp+var_8]
test	edx, edx
jz	short loc_501FB7
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_501FA2
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
cmp	dword ptr [edx], 0
jz	short loc_501FA2
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
cmp	ecx, [edx+4]
jg	short loc_501FA2
mov	[ebp+var_C], 0
jmp	short loc_501FA9

loc_501FA2:
mov	[ebp+var_C], 1

loc_501FA9:
movzx	edx, byte ptr [ebp+var_C]
test	edx, edx
jz	short loc_501FB7
mov	al, 1
jmp	short loc_501FE4
jmp	short loc_501FE4

loc_501FB7:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_501FDA
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_501FDA
mov	[ebp+var_10], 1
jmp	short loc_501FE1

loc_501FDA:
mov	[ebp+var_10], 0

loc_501FE1:
mov	al, byte ptr [ebp+var_10]

loc_501FE4:
mov	esp, ebp
pop	ebp
retn	4
sub_501F30 endp

align 10h


; Attributes: bp-based frame

sub_501FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502035
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_508A20
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502035:
mov	esp, ebp
pop	ebp
retn
sub_501FF0 endp

align 10h


; Attributes: bp-based frame

sub_502040 proc	near

var_2C=	dword ptr -2Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_502056
mov	eax, [ebp+arg_0]
jmp	short loc_50206F

loc_502056:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_502DF0

loc_50206F:
mov	esp, ebp
pop	ebp
retn	8
sub_502040 endp

align 10h


; Attributes: bp-based frame

sub_502080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5020C5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_508E80
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5020C5:
mov	esp, ebp
pop	ebp
retn
sub_502080 endp

align 10h


; Attributes: bp-based frame

sub_5020D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502115
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_508EE0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502115:
mov	esp, ebp
pop	ebp
retn
sub_5020D0 endp

align 10h


; Attributes: bp-based frame

sub_502120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502165
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_508F40
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502165:
mov	esp, ebp
pop	ebp
retn
sub_502120 endp

align 10h


; Attributes: bp-based frame

sub_502170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5021B5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_508FA0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5021B5:
mov	esp, ebp
pop	ebp
retn
sub_502170 endp

align 10h


; Attributes: bp-based frame

sub_5021C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502205
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5091F0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502205:
mov	esp, ebp
pop	ebp
retn
sub_5021C0 endp

align 10h


; Attributes: bp-based frame

sub_502210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502255
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_509D30
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502255:
mov	esp, ebp
pop	ebp
retn
sub_502210 endp

align 10h


; Attributes: bp-based frame

sub_502260 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_10]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_502260 endp

align 10h


; Attributes: bp-based frame

sub_502290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_502290 endp

align 10h


; Attributes: bp-based frame

sub_5022C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5022C0 endp

align 10h


; Attributes: bp-based frame

sub_502300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
push	ecx
call	sub_77E330
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_502300 endp

align 10h


; Attributes: bp-based frame

sub_502330 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
xor	eax, eax
cmp	ecx, [ebp+arg_0]
setz	al
mov	esp, ebp
pop	ebp
retn	4
sub_502330 endp

align 10h


; Attributes: bp-based frame

sub_502350 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_4]
call	sub_50BE10
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_50BB20
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_502350 endp

align 10h


; Attributes: bp-based frame

sub_502390 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5023A6
mov	eax, [ebp+arg_0]
jmp	short loc_5023EF

loc_5023A6:
xor	ecx, ecx
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_9], dl
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_8], eax
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	nullsub_1
add	esp, 8
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]

loc_5023EF:
mov	esp, ebp
pop	ebp
retn	8
sub_502390 endp

align 10h


; Attributes: bp-based frame

sub_502400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502445
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_50C380
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502445:
mov	esp, ebp
pop	ebp
retn
sub_502400 endp

align 10h


; Attributes: bp-based frame

sub_502450 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_502537
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_50C570
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5024F4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_502508
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5024F4

loc_502508:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_50251A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_50252E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_50251A

loc_50252E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_502537:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_502450 endp

align 10h


; Attributes: bp-based frame

sub_502550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502595
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_50C650
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502595:
mov	esp, ebp
pop	ebp
retn
sub_502550 endp

align 10h


; Attributes: bp-based frame

sub_5025A0 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BC040
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_5025E9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_4AC540
mov	eax, 1
jmp	short loc_5025EB

loc_5025E9:
xor	eax, eax

loc_5025EB:
mov	esp, ebp
pop	ebp
retn	4
sub_5025A0 endp

align 10h


; Attributes: bp-based frame

sub_502600 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_50264D
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50264D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_502600 endp

align 10h


; Attributes: bp-based frame

sub_502670 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
add	edx, 24h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_50C9D0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_502670 endp

align 10h


; Attributes: bp-based frame

sub_502710 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
add	ecx, 0Ch
mov	edx, [ebp+var_C]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+8]
jnz	short loc_502779
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 0Ah
imul	ecx, 0Ch
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx], eax

loc_502779:
mov	esp, ebp
pop	ebp
retn
sub_502710 endp

align 10h


; Attributes: bp-based frame

sub_502780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5027C5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_50CD20
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5027C5:
mov	esp, ebp
pop	ebp
retn
sub_502780 endp

align 10h


; Attributes: bp-based frame

sub_5027D0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_498EB0
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 18h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_5027D0 endp

align 10h


; Attributes: bp-based frame

sub_502840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502885
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_50D030
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502885:
mov	esp, ebp
pop	ebp
retn
sub_502840 endp

align 10h


; Attributes: bp-based frame

sub_502890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5028D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_50D180
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5028D5:
mov	esp, ebp
pop	ebp
retn
sub_502890 endp

align 10h


; Attributes: bp-based frame

sub_5028E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_502925
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_50D700
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_502925:
mov	esp, ebp
pop	ebp
retn
sub_5028E0 endp

align 10h


; Attributes: bp-based frame

sub_502930 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_50EB30
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_502987
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_502987:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_502930 endp

align 10h


; Attributes: bp-based frame

sub_5029A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5029E5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_50D760
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5029E5:
mov	esp, ebp
pop	ebp
retn
sub_5029A0 endp

align 10h


; Attributes: bp-based frame

sub_5029F0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503430
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_50EC70
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5029F0 endp

align 10h


; Attributes: bp-based frame

sub_502A70 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_51B120
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_502ACB
mov	ecx, 1
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_502ACB:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_502A70 endp

align 10h


; Attributes: bp-based frame

sub_502AE0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_49CB40
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_50ECE0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_502AE0 endp

align 10h


; Attributes: bp-based frame

sub_502B60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
add	edx, 24h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_503A80
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_502B60 endp

align 10h


; Attributes: bp-based frame

sub_502C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_504FC0
mov	esp, ebp
pop	ebp
retn
sub_502C00 endp

align 10h


; Attributes: bp-based frame

sub_502C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_5053B0
mov	esp, ebp
pop	ebp
retn
sub_502C20 endp

align 10h


; Attributes: bp-based frame

sub_502C40 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_503100
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 6Ch
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_502C40 endp

align 10h


; Attributes: bp-based frame

sub_502CB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_505EE0
mov	esp, ebp
pop	ebp
retn
sub_502CB0 endp

align 10h


; Attributes: bp-based frame

sub_502CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_640F10
mov	esp, ebp
pop	ebp
retn
sub_502CD0 endp

align 10h


; Attributes: bp-based frame

sub_502CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_506A50
mov	esp, ebp
pop	ebp
retn
sub_502CF0 endp

align 10h


; Attributes: bp-based frame

sub_502D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_507280
mov	esp, ebp
pop	ebp
retn
sub_502D10 endp

align 10h


; Attributes: bp-based frame

sub_502D30 proc	near

var_74=	dword ptr -74h
var_44=	dword ptr -44h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	eax, [ebp+var_74]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnb	short loc_502DB8
mov	eax, [ebp+var_4]
sub	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
mov	eax, [ebp+arg_4]
lea	ecx, [edx+eax*4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
lea	ecx, [eax+edx*4-4]
mov	[ebp+var_C], ecx
mov	[ebp+var_8], 0
jmp	short loc_502D89

loc_502D77:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
sub	eax, 4
mov	[ebp+var_C], eax

loc_502D89:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_10]
jnb	short loc_502D93
jmp	short loc_502D77

loc_502D93:
mov	edx, [ebp+var_74]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
shr	ecx, 1
cmp	[ebp+arg_4], ecx
jnb	short loc_502DB6
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_74]
call	sub_503240

loc_502DB6:
jmp	short loc_502DDF

loc_502DB8:
mov	ecx, [ebp+var_74]
mov	edx, [ecx+8]
mov	[ebp+var_44], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_44]
jb	short loc_502DDF
mov	ecx, [ebp+arg_4]
shr	ecx, 2
add	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_503240

loc_502DDF:
mov	eax, [ebp+var_74]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	esp, ebp
pop	ebp
retn	8
sub_502D30 endp

align 10h


; Attributes: bp-based frame

sub_502DF0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_502E2F

loc_502E26:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_502E2F:
cmp	[ebp+var_C], 0
jle	short loc_502E6B
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_10]
add	edx, 8
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+var_10]
add	eax, 30h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
mov	[ebp+var_14], ecx
jmp	short loc_502E26

loc_502E6B:
mov	edx, [ebp+var_14]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
mov	[ebp+var_24], ecx
push	0
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_51C8B0
add	esp, 0Ch
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_502DF0 endp

align 10h


; Attributes: bp-based frame

sub_502EA0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_502EDF

loc_502ED6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_502EDF:
cmp	[ebp+var_C], 0
jle	short loc_502F05
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_503F10
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 0Ch
mov	[ebp+var_14], edx
jmp	short loc_502ED6

loc_502F05:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
push	0
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_51C900
add	esp, 0Ch
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_502EA0 endp

align 10h


; Attributes: bp-based frame

sub_502F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_50BAC0
mov	esp, ebp
pop	ebp
retn
sub_502F40 endp

align 10h


; Attributes: bp-based frame

sub_502F60 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 114h
mov	[ebp+var_114], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_114]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_502FA8

loc_502F9F:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_502FA8:
cmp	[ebp+var_C], 0
jle	short loc_502FDE
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_10]
add	eax, 4
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_51D9B0
mov	ecx, [ebp+var_10]
add	ecx, 28h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 28h
mov	[ebp+var_14], edx
jmp	short loc_502F9F

loc_502FDE:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_114]
mov	edx, [ecx+4]
mov	[ebp+var_110], edx
push	0
mov	eax, [ebp+var_110]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_51C950
add	esp, 0Ch
mov	edx, [ebp+var_114]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_502F60 endp

align 10h


; Attributes: bp-based frame

sub_503020 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
add	edx, 24h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_50D240
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_503020 endp

align 10h


; Attributes: bp-based frame

sub_5030C0 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_503490
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5030C0 endp



; Attributes: bp-based frame

sub_503100 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 25ED097h
jbe	short loc_50312B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_50312B:
cmp	[ebp+arg_0], 0
jz	short loc_503162
mov	ecx, [ebp+arg_0]
imul	ecx, 6Ch
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 6Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_503169

loc_503162:
mov	[ebp+var_10], 0

loc_503169:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_503100 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_503180 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 71C71C7h
jbe	short loc_5031A6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5031A6:
cmp	[ebp+arg_0], 0
jz	short loc_5031CC
mov	eax, [ebp+arg_0]
imul	eax, 24h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5031D3

loc_5031CC:
mov	[ebp+var_C], 0

loc_5031D3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_503180 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5031E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1BACF91h
jbe	short loc_503206
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_503206:
cmp	[ebp+arg_0], 0
jz	short loc_50322F
mov	eax, [ebp+arg_0]
imul	eax, 94h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_503236

loc_50322F:
mov	[ebp+var_C], 0

loc_503236:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5031E0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_503240 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
xor	eax, eax
jz	short loc_503263
mov	ecx, [ebp+var_30]
mov	edx, [ecx+8]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_10]
jnb	short loc_503263
jmp	loc_5033E1

loc_503263:
cmp	[ebp+arg_4], 0
jnb	short loc_503270
mov	[ebp+arg_4], 0

loc_503270:
cmp	[ebp+arg_4], 0
jnz	short loc_5032A7
mov	ecx, [ebp+var_30]
cmp	dword ptr [ecx], 0
jz	short loc_503298
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_401750
mov	edx, [ebp+var_30]
mov	dword ptr [edx], 0

loc_503298:
mov	eax, [ebp+var_30]
mov	dword ptr [eax+8], 0
jmp	loc_5033E1

loc_5032A7:
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
lea	eax, [edx+ecx-1]
xor	edx, edx
div	[ebp+var_4]
imul	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	eax, [ebp+var_30]
cmp	dword ptr [eax], 0
jz	loc_5033AE
mov	ecx, 1
test	ecx, ecx
jz	short loc_503308
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, dword_1855FC0
mov	edx, [eax]
mov	ecx, dword_1855FC0
mov	eax, [edx+2Ch]
call	eax
mov	ecx, [ebp+var_30]
mov	[ecx], eax
jmp	loc_5033AC

loc_503308:
mov	[ebp+var_1C], 2
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
shl	eax, 2
push	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	ecx, dword_1855FC0
mov	eax, [edx+28h]
call	eax
mov	[ebp+var_8], eax
mov	[ebp+var_C], 0
jmp	short loc_503342

loc_503339:
mov	ecx, [ebp+var_C]
add	ecx, 1
mov	[ebp+var_C], ecx

loc_503342:
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_C]
cmp	eax, [edx+4]
jnb	short loc_503393
mov	ecx, [ebp+var_30]
mov	edx, [ecx]
mov	eax, [ebp+var_C]
lea	ecx, [edx+eax*4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
push	ecx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jz	short loc_50338A
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_34], edx
jmp	short loc_503391

loc_50338A:
mov	[ebp+var_34], 0

loc_503391:
jmp	short loc_503339

loc_503393:
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
push	edx
call	sub_401750
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_8]
mov	[eax], ecx

loc_5033AC:
jmp	short loc_5033D8

loc_5033AE:
mov	[ebp+var_2C], 2
lea	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+arg_4]
shl	eax, 2
push	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	ecx, dword_1855FC0
mov	eax, [edx+28h]
call	eax
mov	ecx, [ebp+var_30]
mov	[ecx], eax

loc_5033D8:
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
mov	[edx+8], eax

loc_5033E1:
mov	esp, ebp
pop	ebp
retn	8
sub_503240 endp

align 10h


; Attributes: bp-based frame

sub_5033F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4-4]
mov	[ebp+arg_0], edx
mov	[ebp+var_4], 0
jmp	short loc_50341C

loc_50340A:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
sub	ecx, 4
mov	[ebp+arg_0], ecx

loc_50341C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_503426
jmp	short loc_50340A

loc_503426:
mov	esp, ebp
pop	ebp
retn
sub_5033F0 endp

align 10h


; Attributes: bp-based frame

sub_503430 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 3FFFFFFh
jbe	short loc_503456
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_503456:
cmp	[ebp+arg_0], 0
jz	short loc_50347C
mov	eax, [ebp+arg_0]
shl	eax, 6
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_503483

loc_50347C:
mov	[ebp+var_C], 0

loc_503483:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_503430 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_503490 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 15555555h
jbe	short loc_5034B6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5034B6:
cmp	[ebp+arg_0], 0
jz	short loc_5034DC
mov	eax, [ebp+arg_0]
imul	eax, 0Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5034E3

loc_5034DC:
mov	[ebp+var_C], 0

loc_5034E3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_503490 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5034F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 38E38E3h
jbe	short loc_503516
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_503516:
cmp	[ebp+arg_0], 0
jz	short loc_50354A
mov	eax, [ebp+arg_0]
imul	eax, 48h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 48h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_50354C

loc_50354A:
xor	eax, eax

loc_50354C:
mov	esp, ebp
pop	ebp
retn	8
sub_5034F0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_503560 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 0FFFFFFFh
jbe	short loc_503586
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_503586:
cmp	[ebp+arg_0], 0
jz	short loc_5035B4
mov	eax, [ebp+arg_0]
shl	eax, 4
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_4]
shr	edx, 4
mov	eax, [ebp+arg_4]
mov	[eax], edx
mov	eax, [ebp+var_8]
jmp	short loc_5035B6

loc_5035B4:
xor	eax, eax

loc_5035B6:
mov	esp, ebp
pop	ebp
retn	8
sub_503560 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5035C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 25ED097h
jbe	short loc_5035E6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5035E6:
cmp	[ebp+arg_0], 0
jz	short loc_50361A
mov	eax, [ebp+arg_0]
imul	eax, 6Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 6Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_50361C

loc_50361A:
xor	eax, eax

loc_50361C:
mov	esp, ebp
pop	ebp
retn	8
sub_5035C0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_503630 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
movzx	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_510620
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_503630 endp

align 10h
; [00000021 BYTES: COLLAPSED FUNCTION std::locale::_Locimp::_Addfac(std::locale::facet *,uint).	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000021 BYTES: COLLAPSED FUNCTION std::locale::_Locimp::_Addfac(std::locale::facet *,uint).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5036B0 proc	near

var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_74], ecx
mov	eax, [ebp+var_74]
mov	[ebp+var_C], eax
mov	eax, [ebp+var_74]
call	sub_403030
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	[ebp+var_5], 1

loc_5036D0:
cmp	[ebp+var_10], 0
jz	short loc_503727
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
call	sub_404540
mov	[ebp+var_3C], eax
mov	eax, [ebp+var_3C]
mov	[ebp+var_34], eax
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_503712
mov	eax, [ebp+var_10]
call	sub_4044C0
mov	edx, [eax]
mov	[ebp+var_78], edx
jmp	short loc_50371F

loc_503712:
mov	eax, [ebp+var_10]
call	sub_403040
mov	eax, [eax]
mov	[ebp+var_78], eax

loc_50371F:
mov	ecx, [ebp+var_78]
mov	[ebp+var_10], ecx
jmp	short loc_5036D0

loc_503727:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5037CD
mov	eax, [ebp+var_74]
call	sub_4044C0
mov	eax, [eax]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_48]
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_44]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_48]
setz	al
mov	[ebp+var_79], al
movzx	ecx, [ebp+var_79]
test	ecx, ecx
jz	short loc_5037BE
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_74]
call	sub_510A10
mov	[ebp+var_4C], eax
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_503851
jmp	short loc_5037CD

loc_5037BE:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5037CD:
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
call	sub_404540
mov	[ebp+var_58], eax
mov	edx, [ebp+var_58]
mov	[ebp+var_50], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_50]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_503836
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_510A10
mov	[ebp+var_70], eax
mov	edx, [ebp+var_70]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_503851

loc_503836:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_503851:
mov	esp, ebp
pop	ebp
retn	8
sub_5036B0 endp

align 10h


; Attributes: bp-based frame

sub_503860 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_498BD0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5038B6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_503860
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5038B6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5038C5:
cmp	[ebp+arg_0], 0
jz	short loc_503932
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_498BD0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_503921
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_503860
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_503921:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5038C5

loc_503932:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_503860 endp

align 10h


; Attributes: bp-based frame

sub_503940 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_503A17
mov	ecx, [ebp+var_14]
call	sub_489010
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5039A0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_503A17

loc_5039A0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_503860
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_5039C8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_5039DC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_5039C8

loc_5039DC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_5039EE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_503A02
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_5039EE

loc_503A02:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_503A17:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_503940 endp



; Attributes: bp-based frame

sub_503A20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+20h], 0
jz	short loc_503A76
mov	ecx, [ebp+var_C]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_510BD0
mov	edx, [ebp+var_C]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+20h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_503A76
mov	eax, [ebp+var_8]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_503A76:
mov	esp, ebp
pop	ebp
retn
sub_503A20 endp

align 10h


; Attributes: bp-based frame

sub_503A80 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	[ebp+var_18], 80h
mov	eax, [ebp+arg_0]
shr	eax, 1
add	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_10], ecx
mov	[ebp+var_14], 8
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_14]
push	eax
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_40]
mov	edx, [eax]
mov	[ecx+24h], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
push	ecx
mov	ecx, [ebp+var_40]
add	ecx, 20h
call	sub_5A9600
mov	edx, [ebp+var_40]
mov	[edx+20h], eax
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_40]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_40]
call	sub_510B80
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_2C], 80h
mov	eax, 2
imul	eax, 3Ch
mov	ecx, [ebp+var_40]
add	eax, [ecx+4]
mov	edx, [ebp+var_40]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
sub	eax, 4
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_40]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_30], 80h
mov	ecx, 2
imul	ecx, 3Ch
mov	edx, [ebp+var_34]
add	ecx, [edx+4]
mov	eax, [ebp+var_34]
mov	[eax+8], ecx
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ecx], eax
mov	[ebp+var_3C], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 2
div	ecx
imul	edx, 3Ch
mov	eax, [ebp+var_40]
add	edx, [eax+14h]
mov	ecx, [ebp+var_40]
mov	[ecx+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_503A80 endp

align 10h


; Attributes: bp-based frame

sub_503BC0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_2C]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_503BF8
push	0
push	1
mov	ecx, [ebp+var_2C]
call	sub_510C30

loc_503BF8:
mov	[ebp+var_4], 80h
push	2
mov	ecx, [ebp+var_2C]
add	ecx, 24h
call	sub_5C7020
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_50EA40
add	esp, 8
mov	eax, [ebp+var_2C]
mov	ecx, [eax+1Ch]
add	ecx, 4
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
add	edx, 10h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_28]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_20], 80h
mov	edx, 2
imul	edx, 3Ch
mov	eax, [ebp+var_24]
add	edx, [eax+4]
mov	ecx, [ebp+var_24]
mov	[ecx+8], edx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_503BC0 endp

align 10h


; Attributes: bp-based frame

sub_503C80 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
sub	ecx, 3Ch
mov	edx, [ebp+var_14]
cmp	[edx], ecx
jz	short loc_503CA8
mov	eax, [ebp+var_14]
mov	ecx, [eax]
add	ecx, 3Ch
mov	edx, [ebp+var_14]
mov	[edx], ecx
jmp	short loc_503D19

loc_503CA8:
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_503CD3
mov	edx, 2
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_503CD3:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_C], 80h
mov	edx, 2
imul	edx, 3Ch
mov	eax, [ebp+var_14]
add	edx, [eax+4]
mov	ecx, [ebp+var_14]
mov	[ecx+8], edx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[edx], ecx

loc_503D19:
mov	esp, ebp
pop	ebp
retn
sub_503C80 endp

align 10h


; Attributes: bp-based frame

sub_503D20 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_503D3C:
cmp	[ebp+var_10], 0
jz	short loc_503DB3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_503D82
jb	short loc_503D79
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_503D82

loc_503D79:
mov	[ebp+var_64], 1
jmp	short loc_503D89

loc_503D82:
mov	[ebp+var_64], 0

loc_503D89:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_503DA2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_503DAB

loc_503DA2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_503DAB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_503D3C

loc_503DB3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_503E55
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_503E46
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C2FB0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_503EFB
jmp	short loc_503E55

loc_503E46:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_503E55:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_503E8F
jb	short loc_503E86
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_503E8F

loc_503E86:
mov	[ebp+var_78], 1
jmp	short loc_503E96

loc_503E8F:
mov	[ebp+var_78], 0

loc_503E96:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_503EE0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C2FB0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_503EFB

loc_503EE0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_503EFB:
mov	esp, ebp
pop	ebp
retn	8
sub_503D20 endp

align 10h


; Attributes: bp-based frame

sub_503F10 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_504117
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 3
cmp	[ebp+var_4], eax
jbe	loc_503FE3
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_510200
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_98]
call	sub_50F330
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [edx+eax*8]
mov	edx, [ebp+var_98]
mov	[edx+8], ecx
jmp	loc_504100

loc_503FE3:
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_98]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	edx, [ebp+var_4]
jb	short loc_50404A
xor	eax, eax
mov	[ebp+var_11], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_70]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+var_68]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
xor	eax, eax
mov	[ebp+var_71], al
jmp	loc_504100

loc_50404A:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
lea	eax, [edx+eax*8]
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	edx, [ebp+var_80]
push	edx
call	sub_406610
add	esp, 0Ch
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 3
mov	edx, [ebp+arg_0]
mov	eax, [edx]
lea	ecx, [eax+ecx*8]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_90]
push	eax
mov	ecx, [ebp+var_8C]
push	ecx
call	sub_407C50
add	esp, 0Ch

loc_504100:
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_98]
mov	[eax+4], edx

loc_504117:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_503F10 endp

align 10h


; Attributes: bp-based frame

sub_504130 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_504191
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 3
cmp	edx, [ebp+arg_4]
jb	short loc_504172
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_510E10
jmp	short loc_504191

loc_504172:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_48B7F0

loc_504191:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_504130 endp

align 10h


; Attributes: bp-based frame

sub_5041A0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_50ED60
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_50EEC0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 94h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_504223

loc_50421A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_504223:
cmp	[ebp+var_40], 0
jle	short loc_504252
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_50E6F0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 94h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 94h
mov	[ebp+var_3C], eax
jmp	short loc_50421A

loc_504252:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_50427C
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_50E6F0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 94h
mov	[ebp+var_C], ecx
jmp	short loc_5042D6

loc_50427C:
mov	edx, [ebp+arg_C]
imul	edx, 94h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 94h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5042B8

loc_5042A4:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 94h
mov	[ebp+var_68], eax

loc_5042B8:
cmp	[ebp+var_6C], 0
jle	short loc_5042D0
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_50E6F0
add	esp, 8
jmp	short loc_5042A4

loc_5042D0:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5042D6:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_504373
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 94h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_504335

loc_50432C:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_504335:
cmp	[ebp+var_80], 0
jle	short loc_50436D
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_50E6F0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 94h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 94h
mov	[ebp+var_7C], eax
jmp	short loc_50432C

loc_50436D:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_504373:
mov	ecx, [ebp+var_CC]
call	sub_50EE40
mov	edx, [ebp+var_4]
imul	edx, 94h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5041A0 endp

align 10h


; Attributes: bp-based frame

sub_5043C0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_504421
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 4
cmp	edx, [ebp+arg_4]
jb	short loc_504402
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_510FF0
jmp	short loc_504421

loc_504402:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5AEAA0

loc_504421:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5043C0 endp

align 10h


; Attributes: noreturn bp-based	frame

sub_504430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset aVector	; "vector"
call	sub_77EBC0
sub_504430 endp

mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_504450 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_D0]
jz	loc_504768
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 6
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_D0]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 6
cmp	[ebp+var_4], eax
jbe	loc_504523
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_444C90
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_51EF90
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_D0]
call	sub_444060
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 6
mov	edx, [ebp+var_D0]
add	ecx, [edx]
mov	eax, [ebp+var_D0]
mov	[eax+8], ecx
jmp	loc_504751

loc_504523:
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_D0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 6
cmp	eax, [ebp+var_4]
jb	loc_5045D9
xor	ecx, ecx
mov	[ebp+var_11], cl
mov	edx, [ebp+var_D0]
mov	eax, [edx]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_78]
sub	ecx, [ebp+var_6C]
sar	ecx, 6
mov	[ebp+var_68], ecx
jmp	short loc_504584

loc_50457B:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_504584:
cmp	[ebp+var_68], 0
jle	short loc_5045AA
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_44CDB0
mov	ecx, [ebp+var_6C]
add	ecx, 40h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 40h
mov	[ebp+var_70], edx
jmp	short loc_50457B

loc_5045AA:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_44C150
add	esp, 0Ch
jmp	loc_504751

loc_5045D9:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_D0]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_D0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 6
shl	ecx, 6
mov	edx, [ebp+arg_0]
add	ecx, [edx]
mov	[ebp+var_A0], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_A0]
sub	ecx, [ebp+var_94]
sar	ecx, 6
mov	[ebp+var_90], ecx
jmp	short loc_504657

loc_504648:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_504657:
cmp	[ebp+var_90], 0
jle	short loc_504692
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_98]
call	sub_44CDB0
mov	ecx, [ebp+var_94]
add	ecx, 40h
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
add	edx, 40h
mov	[ebp+var_98], edx
jmp	short loc_504648

loc_504692:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
mov	[ebp+var_CC], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_D0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 6
shl	ecx, 6
mov	edx, [ebp+arg_0]
add	ecx, [edx]
mov	[ebp+var_C4], ecx
mov	eax, [ebp+var_C4]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_CC]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_C8]
sub	edx, [ebp+var_C0]
sar	edx, 6
mov	[ebp+var_B0], edx
jmp	short loc_504712

loc_504703:
mov	eax, [ebp+var_B0]
sub	eax, 1
mov	[ebp+var_B0], eax

loc_504712:
cmp	[ebp+var_B0], 0
jle	short loc_504751
mov	ecx, [ebp+var_C0]
push	ecx		; int
mov	edx, [ebp+var_AC]
push	edx		; void *
call	sub_4431D0
add	esp, 8
mov	eax, [ebp+var_C0]
add	eax, 40h
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_AC]
add	ecx, 40h
mov	[ebp+var_AC], ecx
jmp	short loc_504703

loc_504751:
mov	edx, [ebp+var_4]
shl	edx, 6
mov	eax, [ebp+var_D0]
add	edx, [eax]
mov	ecx, [ebp+var_D0]
mov	[ecx+4], edx

loc_504768:
mov	eax, [ebp+var_D0]
mov	esp, ebp
pop	ebp
retn	4
sub_504450 endp

align 10h


; Attributes: bp-based frame

sub_504780 proc	near

var_34=	dword ptr -34h
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
cmp	[ebp+arg_4], 0
jz	short loc_5047EB
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 28h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_5047C7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_511230
jmp	short loc_5047EB

loc_5047C7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_439F60

loc_5047EB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_504780 endp

align 10h


; Attributes: bp-based frame

sub_504800 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_504861
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_504842
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_511340
jmp	short loc_504861

loc_504842:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4ACDE0

loc_504861:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_504800 endp

align 10h


; Attributes: bp-based frame

sub_504870 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5BEA00
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5BEB60
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5048F3

loc_5048EA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5048F3:
cmp	[ebp+var_40], 0
jle	short loc_50491D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_50E780
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 48h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 48h
mov	[ebp+var_3C], eax
jmp	short loc_5048EA

loc_50491D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_504944
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_50E780
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 48h
mov	[ebp+var_C], ecx
jmp	short loc_504999

loc_504944:
mov	edx, [ebp+arg_C]
imul	edx, 48h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_50497B

loc_504969:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 48h
mov	[ebp+var_68], eax

loc_50497B:
cmp	[ebp+var_6C], 0
jle	short loc_504993
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_50E780
add	esp, 8
jmp	short loc_504969

loc_504993:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_504999:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_504A31
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5049F8

loc_5049EF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5049F8:
cmp	[ebp+var_80], 0
jle	short loc_504A2B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_50E780
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 48h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 48h
mov	[ebp+var_7C], eax
jmp	short loc_5049EF

loc_504A2B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_504A31:
mov	ecx, [ebp+var_CC]
call	sub_50EF40
mov	edx, [ebp+var_4]
imul	edx, 48h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_504870 endp

align 10h


; Attributes: bp-based frame

sub_504A80 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_74=	dword ptr -74h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
cmp	eax, [ebp+arg_0]
jz	loc_504C0C
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_504AE0:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_99], cl
movzx	edx, [ebp+var_99]
test	edx, edx
jz	short loc_504B71
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_504B71
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	[ecx+8], eax
mov	edx, [edx+4]
mov	[ecx+0Ch], edx
jmp	loc_504AE0

loc_504B71:
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_504BB2
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_98]
call	sub_50EFC0
jmp	short loc_504C0C

loc_504BB2:
lea	ecx, [ebp+var_8C]
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	edx, [ebp+var_10]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_90], eax
xor	ecx, ecx
mov	[ebp+var_69], cl
lea	edx, [ebp+var_69]
push	edx
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_90]
push	ecx
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_51F380

loc_504C0C:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_504A80 endp

align 10h


; Attributes: bp-based frame

sub_504C20 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_504E44
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 18h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_504CFF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_510170
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_51EF50
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_98]
call	sub_50F6A0
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 18h
mov	eax, [ebp+var_98]
add	edx, [eax]
mov	ecx, [ebp+var_98]
mov	[ecx+8], edx
jmp	loc_504E2D

loc_504CFF:
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 18h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_504D6D
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_70]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
xor	edx, edx
mov	[ebp+var_71], dl
jmp	loc_504E2D

loc_504D6D:
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_98]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 18h
idiv	ecx
imul	eax, 18h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
call	sub_406610
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 18h
idiv	ecx
imul	eax, 18h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+var_8C]
push	edx
call	sub_407C50
add	esp, 0Ch

loc_504E2D:
mov	eax, [ebp+var_4]
imul	eax, 18h
mov	ecx, [ebp+var_98]
add	eax, [ecx]
mov	edx, [ebp+var_98]
mov	[edx+4], eax

loc_504E44:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_504C20 endp



; Attributes: bp-based frame

sub_504E50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_511510
add	esp, 14h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_504E50 endp

align 10h


; Attributes: bp-based frame

sub_504E90 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_1]
push	eax
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_511700
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_504E90 endp

align 10h


; Attributes: bp-based frame

sub_504EC0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	eax, eax
jz	short loc_504EDD
push	1
push	10h
lea	ecx, [ebp+arg_0]
push	ecx
mov	eax, [ebp+var_4]
call	sub_A49320
jmp	short loc_504EED

loc_504EDD:
push	1
push	10h
lea	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
call	sub_A49320

loc_504EED:
mov	esp, ebp
pop	ebp
retn	4
sub_504EC0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_504F00(void	*)
sub_504F00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
xor	eax, eax
jz	short loc_504F20
push	1		; char
push	10h		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250
jmp	short loc_504F30
jmp	short loc_504F30

loc_504F20:		; char
push	1
push	10h		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250

loc_504F30:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_504F00 endp

align 10h


; Attributes: bp-based frame

sub_504F40 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1
test	eax, eax
jz	short loc_504F62
push	1
push	8
lea	ecx, [ebp+arg_0]
push	ecx
mov	eax, [ebp+var_4]
call	sub_A49320
jmp	short loc_504F72

loc_504F62:
push	1
push	8
lea	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
call	sub_A49320

loc_504F72:
mov	esp, ebp
pop	ebp
retn	4
sub_504F40 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_504F80(void	*)
sub_504F80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	eax, 1
test	eax, eax
jz	short loc_504FA5
push	1		; char
push	8		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250
jmp	short loc_504FB5
jmp	short loc_504FB5

loc_504FA5:		; char
push	1
push	8		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250

loc_504FB5:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_504F80 endp

align 10h


; Attributes: bp-based frame

sub_504FC0 proc	near

var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_504FD1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_505013
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_511850
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_505011
mov	ecx, 1
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_505011:
jmp	short loc_504FD1

loc_505013:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_504FC0 endp

align 10h


; Attributes: bp-based frame

sub_505030 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_5052D3
jmp	short loc_5050F5

loc_5050ED:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_5050F5:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_5051C9
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jz	short loc_5051C4
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_505319

loc_5051C4:
jmp	loc_5050ED

loc_5051C9:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_50FD40
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_505319

loc_5052D3:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_511880
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_505319:
mov	esp, ebp
pop	ebp
retn	8
sub_505030 endp

align 10h


; Attributes: bp-based frame

sub_505320 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_505382
jmp	short loc_50539D

loc_505382:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_511980

loc_50539D:
mov	esp, ebp
pop	ebp
retn	4
sub_505320 endp

align 10h


; Attributes: bp-based frame

sub_5053B0 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5053C1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_505403
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_511C20
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_505401
mov	ecx, 1
imul	ecx, 38h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_505401:
jmp	short loc_5053C1

loc_505403:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5053B0 endp

align 10h


; Attributes: bp-based frame

sub_505420 proc	near

var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_D8], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
push	ecx
call	sub_5296E0
add	esp, 4
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setnz	dl
mov	[ebp+var_D9], dl
movzx	eax, [ebp+var_D9]
test	eax, eax
jz	loc_5056BE
jmp	short loc_5054E6

loc_5054DE:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_5054E6:
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_DA], dl
movzx	eax, [ebp+var_DA]
test	eax, eax
jz	loc_5055B4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+var_84]
push	edx
call	sub_441C20
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5055AF
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_9C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ecx]
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_A0]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_505704

loc_5055AF:
jmp	loc_5054DE

loc_5055B4:
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_B0], ecx
lea	edx, [ebp+var_B8]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D8]
add	ecx, 4
call	sub_50FD80
mov	[ebp+var_B4], eax
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+var_B4]
mov	[eax], ecx
mov	edx, [ebp+var_B4]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D8]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D8]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_C4]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_BC]
mov	[edx], eax
mov	ecx, [ebp+var_C4]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_505704

loc_5056BE:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D8]
call	sub_511C60
mov	[ebp+var_D4], eax
mov	eax, [ebp+var_D4]
mov	ecx, [eax]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_D0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_505704:
mov	esp, ebp
pop	ebp
retn	8
sub_505420 endp

align 10h


; Attributes: bp-based frame

sub_505710 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_505772
jmp	short loc_50578D

loc_505772:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_511D60

loc_50578D:
mov	esp, ebp
pop	ebp
retn	4
sub_505710 endp

align 10h


; Attributes: bp-based frame

sub_5057A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5053B0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_5057A0 endp



; Attributes: bp-based frame

sub_5057F0 proc	near

var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_34], eax
push	0
mov	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5053B0
mov	[ebp+var_20], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_24], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_48], edx
xor	eax, eax
mov	[ebp+var_3D], al
lea	ecx, [ebp+var_3D]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_68]
add	ecx, 4
call	sub_526BA0
mov	[ebp+var_2C], 0
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_4C6F50
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_1C], edx
mov	[ebp+var_C], 0
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_422EC0
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_418C90
mov	[ebp+var_14], eax
jmp	short loc_5058E8

loc_5058D8:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5058E8:
mov	edx, [ebp+var_1C]
xor	eax, eax
cmp	edx, [ebp+var_C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_505930
jmp	short loc_50590E

loc_5058FC:
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_18], eax

loc_50590E:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_10]
jz	short loc_50592E
mov	edx, [ebp+var_8]
mov	eax, [edx]
cmp	eax, [ebp+var_1C]
jnz	short loc_50592A
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx], edx
jmp	short loc_50592C

loc_50592A:
jmp	short loc_50592E

loc_50592C:
jmp	short loc_5058FC

loc_50592E:
jmp	short loc_5058D8

loc_505930:
mov	[ebp+var_30], 0
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+18h]
mov	esp, ebp
pop	ebp
retn	4
sub_5057F0 endp

align 10h


; Attributes: bp-based frame

sub_505970 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_50F040
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_503100
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5059F3

loc_5059EA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5059F3:
cmp	[ebp+var_40], 0
jle	short loc_505A1D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_50E850
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 6Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 6Ch
mov	[ebp+var_3C], eax
jmp	short loc_5059EA

loc_505A1D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_505A44
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_50E850
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 6Ch
mov	[ebp+var_C], ecx
jmp	short loc_505A99

loc_505A44:
mov	edx, [ebp+arg_C]
imul	edx, 6Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_505A7B

loc_505A69:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 6Ch
mov	[ebp+var_68], eax

loc_505A7B:
cmp	[ebp+var_6C], 0
jle	short loc_505A93
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_50E850
add	esp, 8
jmp	short loc_505A69

loc_505A93:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_505A99:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_505B31
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_505AF8

loc_505AEF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_505AF8:
cmp	[ebp+var_80], 0
jle	short loc_505B2B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_50E850
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 6Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 6Ch
mov	[ebp+var_7C], eax
jmp	short loc_505AEF

loc_505B2B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_505B31:
mov	ecx, [ebp+var_CC]
call	sub_50F120
mov	edx, [ebp+var_4]
imul	edx, 6Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_505970 endp

align 10h


; Attributes: bp-based frame

sub_505B80 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_CC]
jz	loc_505EC8
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 6Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_505C5F
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5035C0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_51F4C0
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_CC]
call	sub_50F120
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 6Ch
mov	eax, [ebp+var_CC]
add	edx, [eax]
mov	ecx, [ebp+var_CC]
mov	[ecx+8], edx
jmp	loc_505EB1

loc_505C5F:
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 6Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_505D21
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_505CCC

loc_505CC3:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_505CCC:
cmp	[ebp+var_68], 0
jle	short loc_505CF2
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_525C80
mov	ecx, [ebp+var_6C]
add	ecx, 6Ch
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 6Ch
mov	[ebp+var_70], edx
jmp	short loc_505CC3

loc_505CF2:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_51F4F0
add	esp, 0Ch
jmp	loc_505EB1

loc_505D21:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 6Ch
idiv	ecx
imul	eax, 6Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A0], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	eax, [ebp+var_A0]
sub	eax, [ebp+var_94]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_505DAB

loc_505D9C:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_505DAB:
cmp	[ebp+var_90], 0
jle	short loc_505DE6
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_98]
call	sub_525C80
mov	ecx, [ebp+var_94]
add	ecx, 6Ch
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
add	edx, 6Ch
mov	[ebp+var_98], edx
jmp	short loc_505D9C

loc_505DE6:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_C8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 6Ch
idiv	ecx
imul	eax, 6Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_C0], eax
mov	eax, [ebp+var_C0]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_C4]
sub	eax, [ebp+var_BC]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_B0], eax
jmp	short loc_505E72

loc_505E63:
mov	edx, [ebp+var_B0]
sub	edx, 1
mov	[ebp+var_B0], edx

loc_505E72:
cmp	[ebp+var_B0], 0
jle	short loc_505EB1
mov	eax, [ebp+var_BC]
push	eax		; int
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	sub_50E850
add	esp, 8
mov	edx, [ebp+var_BC]
add	edx, 6Ch
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_AC]
add	eax, 6Ch
mov	[ebp+var_AC], eax
jmp	short loc_505E63

loc_505EB1:
mov	ecx, [ebp+var_4]
imul	ecx, 6Ch
mov	edx, [ebp+var_CC]
add	ecx, [edx]
mov	eax, [ebp+var_CC]
mov	[eax+4], ecx

loc_505EC8:
mov	eax, [ebp+var_CC]
mov	esp, ebp
pop	ebp
retn	4
sub_505B80 endp

align 10h


; Attributes: bp-based frame

sub_505EE0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_505EF1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_505F33
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_51B120
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_505F31
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_505F31:
jmp	short loc_505EF1

loc_505F33:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_505EE0 endp

align 10h


; Attributes: bp-based frame

sub_505F50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_505EE0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_505F50 endp



; Attributes: bp-based frame

sub_505FA0 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+8], 0
jz	short loc_505FD7
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_505FD7
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	eax, [edx]
push	eax
call	sub_770020
add	esp, 10h

loc_505FD7:
pop	ebp
retn
sub_505FA0 endp

align 10h


; Attributes: bp-based frame

sub_505FE0 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+8], 0
jz	short loc_506017
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_506017
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	eax, [edx]
push	eax
call	sub_76FFE0
add	esp, 10h

loc_506017:
pop	ebp
retn
sub_505FE0 endp

align 10h


; Attributes: bp-based frame

sub_506020 proc	near

var_84=	dword ptr -84h
var_7E=	byte ptr -7Eh
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_7C], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_50]
push	ecx
mov	ecx, [ebp+var_7C]
call	sub_51F8D0
mov	edx, [ebp+var_50]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_5C]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_5C]
mov	[ebp+var_14], edx
lea	eax, [ebp+var_78]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_74]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_74]
setz	al
mov	[ebp+var_7D], al
mov	cl, [ebp+var_7D]
mov	[ebp+var_7E], cl
movzx	edx, [ebp+var_7E]
test	edx, edx
jz	short loc_5060E0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_44], xmm0
or	[ebp+var_48], 1
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_40]
call	sub_403400
movss	xmm0, [ebp+var_44]
movss	[ebp+var_18], xmm0
lea	ecx, [ebp+var_40]
push	ecx
mov	ecx, [ebp+var_7C]
call	sub_511FF0
add	eax, 28h
mov	[ebp+var_84], eax
jmp	short loc_5060EC

loc_5060E0:
mov	edx, [ebp+var_4]
add	edx, 2Ch
mov	[ebp+var_84], edx

loc_5060EC:
mov	eax, [ebp+var_84]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_48]
and	edx, 1
jz	short loc_50610F
and	[ebp+var_48], 0FFFFFFFEh
lea	ecx, [ebp+var_40]
call	sub_407E50

loc_50610F:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_506020 endp

align 10h


; Attributes: bp-based frame

sub_506120 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	eax, eax
jz	short loc_50613D
push	1
push	40h
lea	ecx, [ebp+arg_0]
push	ecx
mov	eax, [ebp+var_4]
call	sub_A49320
jmp	short loc_50614D

loc_50613D:
push	1
push	40h
lea	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
call	sub_A49320

loc_50614D:
mov	esp, ebp
pop	ebp
retn	8
sub_506120 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_506160(void	*)
sub_506160 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
xor	eax, eax
jz	short loc_506180
push	1		; char
push	40h		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250
jmp	short loc_506190
jmp	short loc_506190

loc_506180:		; char
push	1
push	40h		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250

loc_506190:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_506160 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5061A0(void	*)
sub_5061A0 proc	near

var_3C=	dword ptr -3Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx

loc_5061A9:
cmp	[ebp+arg_0], 0
jz	short loc_5061F9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_3C]
call	sub_5061A0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_512520
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5061F1
mov	edx, 1
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5061F1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5061A9

loc_5061F9:
mov	esp, ebp
pop	ebp
retn	4
sub_5061A0 endp

align 10h


; Attributes: bp-based frame

sub_506200 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_8]
sar	edx, 2
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
push	eax
push	1
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_46BD80
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
lea	eax, [edx+ecx*4]
mov	esp, ebp
pop	ebp
retn	8
sub_506200 endp

align 10h


; Attributes: bp-based frame

sub_506250 proc	near

var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_80], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_80]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
xor	edx, edx
div	[ebp+var_24]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_80]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_80]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
jmp	short loc_5062D5

loc_5062CD:
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx

loc_5062D5:
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_3C]
mov	[ecx], edx
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setnz	cl
mov	[ebp+var_81], cl
movzx	edx, [ebp+var_81]
test	edx, edx
jz	loc_5063AE
mov	eax, [ebp+arg_4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_C]
add	ecx, 4
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_58]
push	ecx
mov	ecx, [ebp+var_80]
add	ecx, 1
call	sub_40A230
movzx	edx, al
test	edx, edx
jz	short loc_5063A9
mov	eax, [ebp+var_80]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_80]
mov	[edx+14h], ecx
lea	eax, [ebp+var_70]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
lea	ecx, [ebp+var_7C]
mov	[ebp+var_74], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_80]
add	ecx, 4
call	sub_50FDC0
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_70]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_78]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_5063C5

loc_5063A9:
jmp	loc_5062CD

loc_5063AE:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_80]
call	sub_512560
mov	eax, [ebp+arg_0]

loc_5063C5:
mov	esp, ebp
pop	ebp
retn	8
sub_506250 endp

align 10h


; Attributes: bp-based frame

sub_5063D0 proc	near

var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_50], eax
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
xor	edx, edx
div	[ebp+var_50]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_C], edx
mov	[ebp+var_8], 0
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setz	dl
mov	[ebp+var_C9], dl
movzx	eax, [ebp+var_C9]
test	eax, eax
jz	loc_506527
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_52A900
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_6C]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_80]
push	edx
mov	ecx, [ebp+var_C8]
add	ecx, 4
call	sub_6415B0
mov	[ebp+var_7C], eax
mov	eax, [ebp+var_7C]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_30]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_D0]
mov	eax, [edx]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_5066A6

loc_506527:
mov	ecx, [ebp+var_C]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_8C]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_640660
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
mov	[ebp+var_18], eax
jmp	short loc_50658B

loc_50657B:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx

loc_50658B:
lea	edx, [ebp+var_A0]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx], edx
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_A0]
setnz	cl
mov	[ebp+var_D1], cl
movzx	edx, [ebp+var_D1]
test	edx, edx
jz	loc_5066A6
lea	eax, [ebp+var_AC]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_AC]
setz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_5066A1
lea	ecx, [ebp+var_C4]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_B0]
mov	[eax], ecx
mov	edx, [ebp+var_C4]
mov	eax, [edx]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ecx]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_C4]
mov	ecx, [ebp+var_B8]
mov	[eax], ecx
xor	edx, edx
mov	[ebp+var_BD], dl
cmp	[ebp+var_BC], 0
jz	short loc_50668D
mov	eax, 1
imul	eax, 0Ch
push	eax		; int
mov	ecx, [ebp+var_BC]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_50668D:
mov	edx, [ebp+var_B8]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_5066A6

loc_5066A1:
jmp	loc_50657B

loc_5066A6:
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_C8]
mov	[eax+14h], edx
mov	ecx, [ebp+var_C8]
call	sub_512660
mov	esp, ebp
pop	ebp
retn	4
sub_5063D0 endp

align 10h


; Attributes: bp-based frame

sub_5066D0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_506732
jmp	short loc_50674D

loc_506732:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_5127C0

loc_50674D:
mov	esp, ebp
pop	ebp
retn	4
sub_5066D0 endp

align 10h


; Attributes: bp-based frame

sub_506760 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_506778:
cmp	[ebp+var_8], 0
jz	short loc_5067BD
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5067B2
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5067BB

loc_5067B2:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5067BB:
jmp	short loc_506778

loc_5067BD:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_512A60
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_506760 endp



; Attributes: bp-based frame

sub_5067E0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_50F8A0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_506836
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5067E0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_506836:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_506845:
cmp	[ebp+arg_0], 0
jz	short loc_5068B2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_50F8A0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5068A1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5067E0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5068A1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_506845

loc_5068B2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5067E0 endp

align 10h


; Attributes: bp-based frame

sub_5068C0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5068DC:
cmp	[ebp+var_10], 0
jz	short loc_506924
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_F5A2E0
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_506913
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_50691C

loc_506913:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_50691C:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5068DC

loc_506924:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5069C6
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5069B7
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_512BA0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_506A3D
jmp	short loc_5069C6

loc_5069B7:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5069C6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_F5A2E0
mov	[ebp+var_25], al
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_506A22
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_512BA0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_506A3D

loc_506A22:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_506A3D:
mov	esp, ebp
pop	ebp
retn	8
sub_5068C0 endp

align 10h


; Attributes: bp-based frame

sub_506A50 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_506A61:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_506A99
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_506A97
mov	ecx, 1
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_506A97:
jmp	short loc_506A61

loc_506A99:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_506A50 endp

align 10h


; Attributes: bp-based frame

sub_506AB0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	eax, [ecx]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setnz	dl
mov	[ebp+var_CD], dl
movzx	eax, [ebp+var_CD]
test	eax, eax
jz	loc_506D89
jmp	short loc_506B6F

loc_506B67:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_506B6F:
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_CE], dl
movzx	eax, [ebp+var_CE]
test	eax, eax
jz	loc_506C7F
mov	ecx, [ebp+arg_4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_78]
mov	[ebp+var_D4], ecx
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_D8]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_506C02
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_D8]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_506C02
mov	[ebp+var_DC], 1
jmp	short loc_506C0C

loc_506C02:
mov	[ebp+var_DC], 0

loc_506C0C:
movzx	eax, byte ptr [ebp+var_DC]
test	eax, eax
jz	short loc_506C7A
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+var_88]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_506DCF

loc_506C7A:
jmp	loc_506B67

loc_506C7F:
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
lea	edx, [ebp+var_AC]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A4]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 4
call	sub_50FF40
mov	[ebp+var_A8], eax
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+var_A8]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_CC]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_B8]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B0]
mov	[edx], eax
mov	ecx, [ebp+var_B8]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_BC]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_506DCF

loc_506D89:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_512DC0
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_506DCF:
mov	esp, ebp
pop	ebp
retn	8
sub_506AB0 endp

align 10h


; Attributes: bp-based frame

sub_506DE0 proc	near

var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_C4], ecx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_50], eax
mov	edx, [ebp+var_4C]
mov	eax, [edx]
xor	edx, edx
div	[ebp+var_50]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_C], edx
mov	[ebp+var_8], 0
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setz	dl
mov	[ebp+var_C5], dl
movzx	eax, [ebp+var_C5]
test	eax, eax
jz	loc_506F31
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_52A900
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_7C]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_70]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_C4]
add	ecx, 4
call	sub_50F900
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_30]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_5070B0

loc_506F31:
mov	ecx, [ebp+var_C]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_88]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_640660
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_18], eax
jmp	short loc_506F95

loc_506F85:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx

loc_506F95:
lea	edx, [ebp+var_9C]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_9C]
setnz	cl
mov	[ebp+var_CD], cl
movzx	edx, [ebp+var_CD]
test	edx, edx
jz	loc_5070B0
lea	eax, [ebp+var_A8]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_A8]
setz	dl
mov	[ebp+var_CE], dl
movzx	eax, [ebp+var_CE]
test	eax, eax
jz	loc_5070AB
lea	ecx, [ebp+var_C0]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_C0]
mov	eax, [edx]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_B4]
mov	[eax], ecx
xor	edx, edx
mov	[ebp+var_B9], dl
cmp	[ebp+var_B8], 0
jz	short loc_507097
mov	eax, 1
imul	eax, 18h
push	eax		; int
mov	ecx, [ebp+var_B8]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_507097:
mov	edx, [ebp+var_B4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_5070B0

loc_5070AB:
jmp	loc_506F85

loc_5070B0:
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_C4]
mov	[eax+14h], edx
mov	ecx, [ebp+var_C4]
call	sub_512EC0
mov	esp, ebp
pop	ebp
retn	4
sub_506DE0 endp

align 10h


; Attributes: bp-based frame

sub_5070E0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_507142
jmp	short loc_50715D

loc_507142:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_513020

loc_50715D:
mov	esp, ebp
pop	ebp
retn	4
sub_5070E0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_507170(void	*)
sub_507170 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_507179:
cmp	[ebp+arg_0], 0
jz	short loc_5071C9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_507170
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_513830
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5071C1
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5071C1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_507179

loc_5071C9:
mov	esp, ebp
pop	ebp
retn	4
sub_507170 endp

align 10h


; Attributes: bp-based frame

sub_5071D0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5071E8:
cmp	[ebp+var_8], 0
jz	short loc_507259
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_20]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_50722E
jb	short loc_507225
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_20]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_50722E

loc_507225:
mov	[ebp+var_24], 1
jmp	short loc_507235

loc_50722E:
mov	[ebp+var_24], 0

loc_507235:
mov	cl, byte ptr [ebp+var_24]
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_50724E
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_507257

loc_50724E:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_507257:
jmp	short loc_5071E8

loc_507259:
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5071D0 endp

align 10h


; Attributes: bp-based frame

sub_507280 proc	near

var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_507291:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5072D3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_513870
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_5072D1
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5072D1:
jmp	short loc_507291

loc_5072D3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_507280 endp

align 10h


; Attributes: bp-based frame

sub_5072F0 proc	near

var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_50], eax
mov	edx, [ebp+var_4C]
mov	eax, [edx]
xor	edx, edx
div	[ebp+var_50]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_C], edx
mov	[ebp+var_8], 0
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setz	dl
mov	[ebp+var_C9], dl
movzx	eax, [ebp+var_C9]
test	eax, eax
jz	loc_507441
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_52A900
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_7C]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_70]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_C8]
add	ecx, 4
call	sub_50F950
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_30]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_D0]
mov	eax, [edx]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_5075CA

loc_507441:
mov	ecx, [ebp+var_C]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_88]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_640660
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_18], eax
jmp	short loc_5074A5

loc_507495:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx

loc_5074A5:
lea	edx, [ebp+var_9C]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_9C]
setnz	cl
mov	[ebp+var_D1], cl
movzx	edx, [ebp+var_D1]
test	edx, edx
jz	loc_5075CA
lea	eax, [ebp+var_A8]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_A8]
setz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_5075C5
lea	ecx, [ebp+var_C4]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_C4]
mov	eax, [edx]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [ebp+var_B4]
mov	[eax], ecx
mov	edx, [ebp+var_B8]
add	edx, 8
push	edx		; void *
call	sub_513870
add	esp, 4
cmp	[ebp+var_B8], 0
jz	short loc_5075B1
mov	eax, 1
imul	eax, 30h
push	eax		; int
mov	ecx, [ebp+var_B8]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5075B1:
mov	edx, [ebp+var_B4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_5075CA

loc_5075C5:
jmp	loc_507495

loc_5075CA:
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_C8]
mov	[eax+14h], edx
mov	ecx, [ebp+var_C8]
call	sub_5138A0
mov	esp, ebp
pop	ebp
retn	4
sub_5072F0 endp



; Attributes: bp-based frame

sub_5075F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_507280
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_5075F0 endp



; Attributes: bp-based frame

; int __stdcall	sub_507640(void	*)
sub_507640 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_507649:
cmp	[ebp+arg_0], 0
jz	short loc_507699
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_507640
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_50EB00
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_507691
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_507691:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_507649

loc_507699:
mov	esp, ebp
pop	ebp
retn	4
sub_507640 endp

align 10h


; Attributes: bp-based frame

sub_5076A0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	4
mov	eax, [ebp+arg_0]
push	eax
call	sub_81BDF0
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_20]
mov	edx, [eax]
mov	ecx, [ebp+var_20]
mov	eax, [edx+4]
call	eax
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7D0
add	esp, 8
push	0FFFFFFFEh
mov	edx, [ebp+arg_0]
push	edx
call	sub_481E90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_5076A0 endp



; Attributes: bp-based frame

sub_5076F0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_50770C:
cmp	[ebp+var_10], 0
jz	short loc_507783
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_507752
jb	short loc_507749
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_507752

loc_507749:
mov	[ebp+var_64], 1
jmp	short loc_507759

loc_507752:
mov	[ebp+var_64], 0

loc_507759:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_507772
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_50777B

loc_507772:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_50777B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_50770C

loc_507783:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_507825
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_507816
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_519FB0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5078CB
jmp	short loc_507825

loc_507816:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_507825:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_50785F
jb	short loc_507856
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_50785F

loc_507856:
mov	[ebp+var_78], 1
jmp	short loc_507866

loc_50785F:
mov	[ebp+var_78], 0

loc_507866:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5078B0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_519FB0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5078CB

loc_5078B0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5078CB:
mov	esp, ebp
pop	ebp
retn	8
sub_5076F0 endp

align 10h


; Attributes: bp-based frame

sub_5078E0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 98h
mov	[ebp+var_8C], ecx
mov	[ebp+var_68], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_5E9440
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_8C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_74]
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_74]
setz	al
mov	[ebp+var_8D], al
movzx	ecx, [ebp+var_8D]
test	ecx, ecx
jnz	loc_5079E7
or	[ebp+var_68], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_78], edx
mov	eax, [ebp+var_8C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_78]
mov	[ebp+var_94], edx
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_94]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5079C6
jb	short loc_5079BA
mov	ecx, [ebp+var_94]
mov	edx, [ebp+var_98]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5079C6

loc_5079BA:
mov	[ebp+var_9C], 1
jmp	short loc_5079D0

loc_5079C6:
mov	[ebp+var_9C], 0

loc_5079D0:
movzx	ecx, byte ptr [ebp+var_9C]
test	ecx, ecx
jnz	short loc_5079E7
mov	[ebp+var_A0], 0
jmp	short loc_5079F1

loc_5079E7:
mov	[ebp+var_A0], 1

loc_5079F1:
mov	dl, byte ptr [ebp+var_A0]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_68]
and	eax, 1
jz	short loc_507A14
and	[ebp+var_68], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_507A14:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_507AE7
mov	edx, dword_1889A64
mov	[ebp+var_5C], edx
mov	eax, dword_1889A68
mov	[ebp+var_58], eax
mov	ecx, dword_1889A6C
mov	[ebp+var_54], ecx
movss	xmm0, ds:dword_15439C8
movss	[ebp+var_50], xmm0
movss	xmm0, ds:dword_15439C8
movss	[ebp+var_4C], xmm0
mov	byte ptr [ebp+var_48], 0
mov	byte ptr [ebp+var_48+1], 0
mov	byte ptr [ebp+var_48+2], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_44], eax
mov	ecx, [edx+4]
mov	[ebp+var_40], ecx
lea	edx, [ebp+var_3C]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_58]
mov	[edx+4], ecx
mov	eax, [ebp+var_54]
mov	[edx+8], eax
mov	ecx, [ebp+var_50]
mov	[edx+0Ch], ecx
mov	eax, [ebp+var_4C]
mov	[edx+10h], eax
mov	ecx, [ebp+var_48]
mov	[edx+14h], ecx
lea	edx, [ebp+var_88]
mov	[ebp+var_7C], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	eax, [ebp+var_44]
push	eax
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	ecx, [ebp+var_64]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_513A40
lea	edx, [ebp+var_64]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_507AE7:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5078E0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_507B00(void	*)
sub_507B00 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_507B09:
cmp	[ebp+arg_0], 0
jz	short loc_507B4F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_507B00
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_507B47
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_507B47:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_507B09

loc_507B4F:
mov	esp, ebp
pop	ebp
retn	4
sub_507B00 endp

align 10h


; Attributes: bp-based frame

sub_507B60 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_507B7C:
cmp	[ebp+var_10], 0
jz	short loc_507BF3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_507BC2
jb	short loc_507BB9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_507BC2

loc_507BB9:
mov	[ebp+var_64], 1
jmp	short loc_507BC9

loc_507BC2:
mov	[ebp+var_64], 0

loc_507BC9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_507BE2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_507BEB

loc_507BE2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_507BEB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_507B7C

loc_507BF3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_507C95
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_507C86
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_514150
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_507D3B
jmp	short loc_507C95

loc_507C86:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_507C95:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_507CCF
jb	short loc_507CC6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_507CCF

loc_507CC6:
mov	[ebp+var_78], 1
jmp	short loc_507CD6

loc_507CCF:
mov	[ebp+var_78], 0

loc_507CD6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_507D20
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_514150
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_507D3B

loc_507D20:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_507D3B:
mov	esp, ebp
pop	ebp
retn	8
sub_507B60 endp

align 10h


; Attributes: bp-based frame

sub_507D50 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AD=	byte ptr -0ADh
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_70=	byte ptr -70h
var_64=	byte ptr -64h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B8h
push	esi
push	edi
mov	[ebp+var_AC], ecx
mov	[ebp+var_88], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_5E9440
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_AC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_90]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_94]
setz	al
mov	[ebp+var_AD], al
movzx	ecx, [ebp+var_AD]
test	ecx, ecx
jnz	loc_507E77
or	[ebp+var_88], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_98], edx
mov	eax, [ebp+var_AC]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_98]
mov	[ebp+var_B4], edx
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_B8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_507E56
jb	short loc_507E4A
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+var_B8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_507E56

loc_507E4A:
mov	[ebp+var_BC], 1
jmp	short loc_507E60

loc_507E56:
mov	[ebp+var_BC], 0

loc_507E60:
movzx	ecx, byte ptr [ebp+var_BC]
test	ecx, ecx
jnz	short loc_507E77
mov	[ebp+var_C0], 0
jmp	short loc_507E81

loc_507E77:
mov	[ebp+var_C0], 1

loc_507E81:
mov	dl, byte ptr [ebp+var_C0]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_88]
and	eax, 1
jz	short loc_507EAA
and	[ebp+var_88], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_507EAA:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_507F8D
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_7C], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_78], xmm0
mov	[ebp+var_74], 0
lea	edx, [ebp+var_70]
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
lea	ecx, [ebp+var_64]
mov	edx, dword_17EE12C
mov	[ecx], edx
mov	eax, dword_17EE130
mov	[ecx+4], eax
mov	edx, dword_17EE134
mov	[ecx+8], edx
mov	eax, dword_17EE138
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_54], edx
mov	eax, [ecx+4]
mov	[ebp+var_50], eax
lea	edi, [ebp+var_4C]
mov	ecx, 0Ah
lea	esi, [ebp+var_7C]
rep movsd
lea	ecx, [ebp+var_A8]
mov	[ebp+var_9C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_9C]
call	sub_4046E0
lea	edx, [ebp+var_54]
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	ecx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
call	sub_4046E0
lea	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_5142C0
lea	ecx, [ebp+var_84]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_C4]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_507F8D:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_507D50 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_507FB0(void	*)
sub_507FB0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_507FB9:
cmp	[ebp+arg_0], 0
jz	short loc_507FFF
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_507FB0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_507FF7
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_507FF7:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_507FB9

loc_507FFF:
mov	esp, ebp
pop	ebp
retn	4
sub_507FB0 endp

align 10h


; Attributes: bp-based frame

sub_508010 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A4h
mov	[ebp+var_9C], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_527100
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_9D], al
movzx	ecx, [ebp+var_9D]
test	ecx, ecx
jnz	short loc_508118
mov	edx, [ebp+arg_0]
mov	eax, [edx]
xor	ecx, ecx
mov	[ebp+var_2C], eax
mov	[ebp+var_28], ecx
or	[ebp+var_78], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_88], edx
mov	eax, [ebp+var_9C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+var_88]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_28]
cmp	ecx, [eax+4]
ja	short loc_5080F7
jb	short loc_5080EB
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_2C]
cmp	eax, [edx]
jnb	short loc_5080F7

loc_5080EB:
mov	[ebp+var_A8], 1
jmp	short loc_508101

loc_5080F7:
mov	[ebp+var_A8], 0

loc_508101:
movzx	ecx, byte ptr [ebp+var_A8]
test	ecx, ecx
jnz	short loc_508118
mov	[ebp+var_AC], 0
jmp	short loc_508122

loc_508118:
mov	[ebp+var_AC], 1

loc_508122:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_78]
and	eax, 1
jz	short loc_508145
and	[ebp+var_78], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_508145:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_50821B
mov	edx, [ebp+arg_0]
mov	eax, [edx]
xor	ecx, ecx
mov	[ebp+var_6C], eax
mov	[ebp+var_68], ecx
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_60], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_5C], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_58], xmm0
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_54], xmm0
mov	byte ptr [ebp+var_50], 0
mov	edx, [ebp+var_6C]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_68]
mov	[ebp+var_48], eax
lea	ecx, [ebp+var_44]
mov	edx, [ebp+var_60]
mov	[ecx], edx
mov	eax, [ebp+var_5C]
mov	[ecx+4], eax
mov	edx, [ebp+var_58]
mov	[ecx+8], edx
mov	eax, [ebp+var_54]
mov	[ecx+0Ch], eax
mov	edx, [ebp+var_50]
mov	[ecx+10h], edx
lea	eax, [ebp+var_98]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
push	ecx
push	ecx
mov	[ebp+var_94], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_94]
call	sub_4046E0
lea	edx, [ebp+var_74]
push	edx
mov	ecx, [ebp+var_9C]
call	sub_5149D0
lea	eax, [ebp+var_74]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[ebp+var_10], edx

loc_50821B:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_508010 endp

align 10h


; Attributes: bp-based frame

sub_508240 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_51C9E0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_508240 endp



; Attributes: bp-based frame

sub_508290 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5082B8:
cmp	[ebp+var_10], 0
jz	short loc_50830D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5082F6
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_508302

loc_5082F6:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_508302:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_5082B8

loc_50830D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_5083BB
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_5083AC
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_515120
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_50843F
jmp	short loc_5083BB

loc_5083AC:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5083BB:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_508424
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_515120
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_50843F

loc_508424:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_50843F:
mov	esp, ebp
pop	ebp
retn	8
sub_508290 endp

align 10h


; Attributes: bp-based frame

sub_508450 proc	near

var_94=	dword ptr -94h
var_8E=	byte ptr -8Eh
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7E=	byte ptr -7Eh
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_520E70
mov	edx, [ebp+var_54]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_60]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_60]
mov	[ebp+var_14], edx
lea	eax, [ebp+var_7C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_64]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_70]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_78]
setz	al
mov	[ebp+var_8D], al
mov	cl, [ebp+var_8D]
mov	[ebp+var_8E], cl
movzx	edx, [ebp+var_8E]
test	edx, edx
jz	short loc_508544
or	[ebp+var_4C], 1
or	[ebp+var_4C], 2
lea	eax, [ebp+var_7D]
push	eax
lea	ecx, [ebp+var_48]
call	sub_489C40
mov	[ebp+var_38], 0
mov	cl, [ebp+var_7E]
mov	[ebp+var_34], cl
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_2C]
mov	[ebp+var_84], ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_84]
call	sub_50FF80
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_5150E0
add	eax, 4
mov	[ebp+var_94], eax
jmp	short loc_508550

loc_508544:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_94], ecx

loc_508550:
mov	edx, [ebp+var_94]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_508584
and	[ebp+var_4C], 0FFFFFFFDh
lea	edx, [ebp+var_2C]
mov	[ebp+var_88], edx
mov	ecx, [ebp+var_88]
call	sub_50F9B0
call	nullsub_1

loc_508584:
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_50859D
and	[ebp+var_4C], 0FFFFFFFEh
lea	ecx, [ebp+var_48]
call	sub_50F9B0
call	nullsub_1

loc_50859D:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_508450 endp

align 10h


; Attributes: bp-based frame

sub_5085B0 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+8], 0
jz	short loc_5085E7
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5085E7
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	eax, [edx]
push	eax
call	sub_7700F0
add	esp, 10h

loc_5085E7:
pop	ebp
retn
sub_5085B0 endp

align 10h


; Attributes: bp-based frame

sub_5085F0 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_508893
jmp	short loc_5086B5

loc_5086AD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_5086B5:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_508789
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jz	short loc_508784
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5088D9

loc_508784:
jmp	loc_5086AD

loc_508789:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_510080
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5088D9

loc_508893:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_5153B0
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5088D9:
mov	esp, ebp
pop	ebp
retn	8
sub_5085F0 endp

align 10h


; Attributes: bp-based frame

sub_5088E0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_508942
jmp	short loc_50895D

loc_508942:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_5154B0

loc_50895D:
mov	esp, ebp
pop	ebp
retn	4
sub_5088E0 endp

align 10h


; Attributes: bp-based frame

sub_508970 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_51CA50
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_508970 endp



; Attributes: bp-based frame

; int __cdecl sub_5089C0(void *)
sub_5089C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_508A11
mov	ecx, [ebp+var_4]
call	sub_4E46D0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15818B8
mov	edx, [ebp+var_4]
mov	byte ptr [edx+2Dh], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+30h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+30h], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_508A18

loc_508A11:
mov	[ebp+var_8], 0

loc_508A18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5089C0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_508A20(void	*)
sub_508A20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_508A29:
cmp	[ebp+arg_0], 0
jz	short loc_508A79
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_508A20
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_515C50
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_508A71
mov	edx, 1
imul	edx, 54h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_508A71:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_508A29

loc_508A79:
mov	esp, ebp
pop	ebp
retn	4
sub_508A20 endp

align 10h


; Attributes: bp-based frame

sub_508A80 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_74=	byte ptr -74h
var_58=	byte ptr -58h
var_30=	byte ptr -30h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_D0], ecx
mov	[ebp+var_80], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_5C7CD0
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_D0]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_8C]
mov	[ebp+var_88], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_88]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_8C]
setz	al
mov	[ebp+var_D1], al
movzx	ecx, [ebp+var_D1]
test	ecx, ecx
jnz	short loc_508B42
or	[ebp+var_80], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_90], edx
mov	eax, [ebp+var_D0]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_90]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_508B42
mov	[ebp+var_D8], 0
jmp	short loc_508B4C

loc_508B42:
mov	[ebp+var_D8], 1

loc_508B4C:
mov	dl, byte ptr [ebp+var_D8]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_80]
and	eax, 1
jz	short loc_508B66
and	[ebp+var_80], 0FFFFFFFEh
call	nullsub_1

loc_508B66:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_508C2A
lea	ecx, [ebp+var_74]
call	sub_10FB830
mov	[ebp+var_BC], eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_58]
call	sub_403400
lea	eax, [ebp+var_30]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	ecx, [ebp+var_B8]
call	sub_4694E0
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_BC]
mov	cl, [eax+18h]
mov	[edx+18h], cl
lea	edx, [ebp+var_CC]
mov	[ebp+var_C0], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_C0]
call	sub_4046E0
lea	eax, [ebp+var_58]
push	eax
push	ecx
mov	[ebp+var_C8], esp
mov	ecx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
call	sub_4046E0
lea	ecx, [ebp+var_7C]
push	ecx
mov	ecx, [ebp+var_D0]
call	sub_515750
lea	edx, [ebp+var_7C]
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_30]
call	sub_10FB7C0
lea	ecx, [ebp+var_58]
call	sub_407E50
lea	ecx, [ebp+var_74]
call	sub_10FB7C0

loc_508C2A:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_508A80 endp

align 10h


; Attributes: bp-based frame

sub_508C40 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_508C68:
cmp	[ebp+var_10], 0
jz	short loc_508CBD
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_508CA6
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_508CB2

loc_508CA6:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_508CB2:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_508C68

loc_508CBD:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_508D6B
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_508D5C
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_515C90
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_508DEF
jmp	short loc_508D6B

loc_508D5C:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_508D6B:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_508DD4
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_515C90
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_508DEF

loc_508DD4:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_508DEF:
mov	esp, ebp
pop	ebp
retn	8
sub_508C40 endp

align 10h


; Attributes: bp-based frame

sub_508E00 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_508E6B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 30h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_508E47
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_515FE0
jmp	short loc_508E6B

loc_508E47:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_515DD0

loc_508E6B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_508E00 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_508E80(void	*)
sub_508E80 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_508E89:
cmp	[ebp+arg_0], 0
jz	short loc_508ED9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_508E80
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_516380
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_508ED1
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_508ED1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_508E89

loc_508ED9:
mov	esp, ebp
pop	ebp
retn	4
sub_508E80 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_508EE0(void	*)
sub_508EE0 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_508EE9:
cmp	[ebp+arg_0], 0
jz	short loc_508F39
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_508EE0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_516890
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_508F31
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_508F31:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_508EE9

loc_508F39:
mov	esp, ebp
pop	ebp
retn	4
sub_508EE0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_508F40(void	*)
sub_508F40 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_508F49:
cmp	[ebp+arg_0], 0
jz	short loc_508F99
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_508F40
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_516DA0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_508F91
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_508F91:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_508F49

loc_508F99:
mov	esp, ebp
pop	ebp
retn	4
sub_508F40 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_508FA0(void	*)
sub_508FA0 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_508FA9:
cmp	[ebp+arg_0], 0
jz	short loc_508FF9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_508FA0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5172B0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_508FF1
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_508FF1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_508FA9

loc_508FF9:
mov	esp, ebp
pop	ebp
retn	4
sub_508FA0 endp

align 10h


; Attributes: bp-based frame

sub_509000 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_BC], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_5C7D40
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_BC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_BD], al
movzx	ecx, [ebp+var_BD]
test	ecx, ecx
jnz	short loc_5090A9
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_BC]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_50]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5090A9
mov	[ebp+var_C4], 0
jmp	short loc_5090B3

loc_5090A9:
mov	[ebp+var_C4], 1

loc_5090B3:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_40]
and	edx, 1
jz	short loc_5090D0
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_5090D0:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_509163
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
push	0
lea	ecx, [ebp+var_31]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_489990
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_30]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_50FA00
lea	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_24]
push	eax
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_5163B0
lea	edx, [ebp+var_3C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_20]
call	sub_487140
lea	ecx, [ebp+var_30]
call	sub_487140

loc_509163:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_509000 endp

align 10h


; Attributes: bp-based frame

sub_509170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_5091E3
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_4], 0
jmp	short loc_5091A0

loc_509198:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_5091A0:
cmp	[ebp+var_8], 1
jz	short loc_5091B1
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_509198

loc_5091B1:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5172E0
add	esp, 14h
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_517490
add	esp, 0Ch

loc_5091E3:
mov	esp, ebp
pop	ebp
retn
sub_509170 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5091F0(void	*)
sub_5091F0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5091F9:
cmp	[ebp+arg_0], 0
jz	short loc_50923F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5091F0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_509237
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_509237:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5091F9

loc_50923F:
mov	esp, ebp
pop	ebp
retn	4
sub_5091F0 endp

align 10h


; Attributes: bp-based frame

sub_509250 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_509457
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 4
cmp	[ebp+var_4], eax
jbe	loc_509323
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_503560
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_98]
call	sub_5ED2E0
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+var_98]
add	ecx, [edx]
mov	eax, [ebp+var_98]
mov	[eax+8], ecx
jmp	loc_509440

loc_509323:
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
cmp	eax, [ebp+var_4]
jb	short loc_50938A
xor	ecx, ecx
mov	[ebp+var_11], cl
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_70], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_6C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_68]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	edx, [ebp+var_98]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
xor	ecx, ecx
mov	[ebp+var_71], cl
jmp	loc_509440

loc_50938A:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 4
shl	ecx, 4
mov	edx, [ebp+arg_0]
add	ecx, [edx]
mov	[ebp+var_84], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
call	sub_406610
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
shl	eax, 4
mov	ecx, [ebp+arg_0]
add	eax, [ecx]
mov	[ebp+var_8C], eax
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_90]
push	eax
mov	ecx, [ebp+var_8C]
push	ecx
call	sub_407C50
add	esp, 0Ch

loc_509440:
mov	edx, [ebp+var_4]
shl	edx, 4
mov	eax, [ebp+var_98]
add	edx, [eax]
mov	ecx, [ebp+var_98]
mov	[ecx+4], edx

loc_509457:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_509250 endp

align 10h


; Attributes: bp-based frame

sub_509470 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_BC], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_5C7D40
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_BC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_BD], al
movzx	ecx, [ebp+var_BD]
test	ecx, ecx
jnz	short loc_509519
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_BC]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_50]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_509519
mov	[ebp+var_C4], 0
jmp	short loc_509523

loc_509519:
mov	[ebp+var_C4], 1

loc_509523:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_40]
and	edx, 1
jz	short loc_509540
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_509540:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5095D3
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
push	0
lea	ecx, [ebp+var_31]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_489990
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_30]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_4FFD40
lea	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_24]
push	eax
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_5168C0
lea	edx, [ebp+var_3C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_20]
call	sub_555750
lea	ecx, [ebp+var_30]
call	sub_555750

loc_5095D3:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_509470 endp

align 10h


; Attributes: bp-based frame

sub_5095E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_50964E
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_50960B

loc_509603:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_50960B:
cmp	[ebp+var_8], 1
jz	short loc_50961C
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_509603

loc_50961C:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_517510
add	esp, 14h
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_517600
add	esp, 0Ch

loc_50964E:
mov	esp, ebp
pop	ebp
retn
sub_5095E0 endp

align 10h


; Attributes: bp-based frame

sub_509660 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_BC], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_5C7D40
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_BC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_BD], al
movzx	ecx, [ebp+var_BD]
test	ecx, ecx
jnz	short loc_509709
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_BC]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_50]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_509709
mov	[ebp+var_C4], 0
jmp	short loc_509713

loc_509709:
mov	[ebp+var_C4], 1

loc_509713:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_40]
and	edx, 1
jz	short loc_509730
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_509730:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5097C3
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
push	0
lea	ecx, [ebp+var_31]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_489990
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_30]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_50FA70
lea	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_24]
push	eax
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_516DD0
lea	edx, [ebp+var_3C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_20]
call	sub_555450
lea	ecx, [ebp+var_30]
call	sub_555450

loc_5097C3:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_509660 endp

align 10h


; Attributes: bp-based frame

sub_5097D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_50983E
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_5097FB

loc_5097F3:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_5097FB:
cmp	[ebp+var_8], 1
jz	short loc_50980C
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5097F3

loc_50980C:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_517670
add	esp, 14h
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_517740
add	esp, 0Ch

loc_50983E:
mov	esp, ebp
pop	ebp
retn
sub_5097D0 endp

align 10h


; Attributes: bp-based frame

sub_509850 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_50986C:
cmp	[ebp+var_10], 0
jz	short loc_5098B7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5098A6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5098AF

loc_5098A6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5098AF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_50986C

loc_5098B7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_509959
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_50994A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5209B0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5099D3
jmp	short loc_509959

loc_50994A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_509959:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5099B8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5209B0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5099D3

loc_5099B8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5099D3:
mov	esp, ebp
pop	ebp
retn	8
sub_509850 endp

align 10h


; Attributes: bp-based frame

sub_5099E0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 3
mov	[ebp+var_40], edx
jmp	short loc_509A5E

loc_509A55:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_509A5E:
cmp	[ebp+var_40], 0
jle	short loc_509A88
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_4E2FC0
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 8
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 8
mov	[ebp+var_3C], ecx
jmp	short loc_509A55

loc_509A88:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_509AAF
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_4E2FC0
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx
jmp	short loc_509AFF

loc_509AAF:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*8]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 3
mov	[ebp+var_6C], ecx
jmp	short loc_509AE1

loc_509ACF:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 8
mov	[ebp+var_68], eax

loc_509AE1:
cmp	[ebp+var_6C], 0
jle	short loc_509AF9
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_4E2FC0
add	esp, 8
jmp	short loc_509ACF

loc_509AF9:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_509AFF:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_509B92
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 3
mov	[ebp+var_80], eax
jmp	short loc_509B59

loc_509B50:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_509B59:
cmp	[ebp+var_80], 0
jle	short loc_509B8C
mov	edx, [ebp+var_8C]
push	edx		; int
mov	eax, [ebp+var_7C]
push	eax		; void *
call	sub_4E2FC0
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 8
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 8
mov	[ebp+var_7C], edx
jmp	short loc_509B50

loc_509B8C:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_509B92:
mov	ecx, [ebp+var_CC]
call	sub_50F330
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5099E0 endp

align 10h


; Attributes: bp-based frame

sub_509BE0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_90]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 3
cmp	edx, [ebp+arg_0]
jnb	loc_509D28
mov	[ebp+var_C], 1FFFFFFFh
mov	[ebp+var_10], 1FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_509C2D
mov	ecx, [ebp+var_10]
mov	[ebp+var_94], ecx
jmp	short loc_509C36

loc_509C2D:
mov	edx, [ebp+var_C]
mov	[ebp+var_94], edx

loc_509C36:
mov	eax, [ebp+var_94]
cmp	eax, [ebp+arg_0]
jnb	short loc_509C4C
mov	ecx, [ebp+var_90]
call	sub_5BD210

loc_509C4C:
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_90]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_90]
cmp	dword ptr [ecx], 0
jz	short loc_509CD4
mov	edx, [ebp+var_90]
mov	eax, [edx+4]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_90]
mov	edx, [ecx]
mov	[ebp+var_44], edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_14], eax
xor	edx, edx
mov	[ebp+var_26], dl
mov	al, [ebp+var_26]
mov	[ebp+var_25], al
lea	ecx, [ebp+var_25]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
call	sub_527A20
add	esp, 10h
mov	edx, [ebp+var_14]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_90]
call	sub_50F330
jmp	short loc_509CED

loc_509CD4:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax

loc_509CED:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*8]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx+8], eax

loc_509D28:
mov	esp, ebp
pop	ebp
retn	4
sub_509BE0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_509D30(void	*)
sub_509D30 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_509D39:
cmp	[ebp+arg_0], 0
jz	short loc_509D89
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_509D30
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_517950
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_509D81
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_509D81:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_509D39

loc_509D89:
mov	esp, ebp
pop	ebp
retn	4
sub_509D30 endp

align 10h


; Attributes: bp-based frame

sub_509D90 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_509DAC:
cmp	[ebp+var_10], 0
jz	short loc_509DF7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_509DE6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_509DEF

loc_509DE6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_509DEF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_509DAC

loc_509DF7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_509E99
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_509E8A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_517810
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_509F13
jmp	short loc_509E99

loc_509E8A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_509E99:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_509EF8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_517810
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_509F13

loc_509EF8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_509F13:
mov	esp, ebp
pop	ebp
retn	8
sub_509D90 endp

align 10h


; Attributes: bp-based frame

sub_509F20 proc	near

var_60=	dword ptr -60h
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_522260
mov	edx, [ebp+var_2C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_38]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_54]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_3C]
mov	[edx], eax
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_59], al
mov	cl, [ebp+var_59]
mov	[ebp+var_5A], cl
movzx	edx, [ebp+var_5A]
test	edx, edx
jz	short loc_509FC7
mov	[ebp+var_24], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [eax+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5132F0
add	eax, 8
mov	[ebp+var_60], eax
jmp	short loc_509FD0

loc_509FC7:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_60], edx

loc_509FD0:
mov	eax, [ebp+var_60]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_509F20 endp

align 10h


; Attributes: bp-based frame

sub_509FE0 proc	near

var_D0=	dword ptr -0D0h
var_CA=	byte ptr -0CAh
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_A4=	dword ptr -0A4h
var_9F=	byte ptr -9Fh
var_9E=	byte ptr -9Eh
var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_509FE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C4h
mov	[ebp+var_C8], ecx
mov	[ebp+var_6C], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_C8]
call	sub_522260
mov	edx, [ebp+var_74]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_80]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_80]
mov	[ebp+var_20], edx
lea	eax, [ebp+var_9C]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_88]
mov	eax, [ebp+var_84]
mov	[edx], eax
lea	ecx, [ebp+var_98]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_94]
mov	ecx, [ebp+var_90]
mov	[eax], ecx
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_98]
setz	al
mov	[ebp+var_C9], al
mov	cl, [ebp+var_C9]
mov	[ebp+var_CA], cl
movzx	edx, [ebp+var_CA]
test	edx, edx
jz	short loc_50A12A
or	[ebp+var_6C], 1
or	[ebp+var_6C], 2
xor	eax, eax
mov	[ebp+var_9F], al
lea	ecx, [ebp+var_9D]
push	ecx
lea	edx, [ebp+var_9E]
push	edx
lea	eax, [ebp+var_9F]
push	eax
push	0
lea	ecx, [ebp+var_68]
call	sub_50FAE0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ecx+4]
mov	[ebp+var_48], eax
lea	ecx, [ebp+var_44]
mov	[ebp+var_A4], ecx
lea	edx, [ebp+var_68]
push	edx
mov	ecx, [ebp+var_A4]
call	sub_50FB60
lea	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_513A00
add	eax, 8
mov	[ebp+var_D0], eax
jmp	short loc_50A136

loc_50A12A:
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_D0], ecx

loc_50A136:
mov	edx, [ebp+var_D0]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_6C]
and	ecx, 2
jz	short loc_50A159
and	[ebp+var_6C], 0FFFFFFFDh
lea	ecx, [ebp+var_44]
call	sub_50F410

loc_50A159:
mov	edx, [ebp+var_6C]
and	edx, 1
jz	short loc_50A16D
and	[ebp+var_6C], 0FFFFFFFEh
lea	ecx, [ebp+var_68]
call	sub_50F410

loc_50A16D:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_509FE0 endp



; Attributes: bp-based frame

sub_50A180 proc	near

var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_C4], ecx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_50], eax
mov	edx, [ebp+var_4C]
mov	eax, [edx]
xor	edx, edx
div	[ebp+var_50]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_C], edx
mov	[ebp+var_8], 0
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setz	dl
mov	[ebp+var_C5], dl
movzx	eax, [ebp+var_C5]
test	eax, eax
jz	loc_50A2D1
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_52A900
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_7C]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_70]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_C4]
add	ecx, 4
call	sub_50FBE0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_30]
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_50A45A

loc_50A2D1:
mov	ecx, [ebp+var_C]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_88]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_640660
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_18], eax
jmp	short loc_50A335

loc_50A325:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx

loc_50A335:
lea	edx, [ebp+var_9C]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_9C]
setnz	cl
mov	[ebp+var_CD], cl
movzx	edx, [ebp+var_CD]
test	edx, edx
jz	loc_50A45A
lea	eax, [ebp+var_A8]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_A8]
setz	dl
mov	[ebp+var_CE], dl
movzx	eax, [ebp+var_CE]
test	eax, eax
jz	loc_50A455
lea	ecx, [ebp+var_C0]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_C0]
mov	eax, [edx]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_B4]
mov	[eax], ecx
mov	edx, [ebp+var_B8]
add	edx, 8
push	edx		; void *
call	sub_51D660
add	esp, 4
cmp	[ebp+var_B8], 0
jz	short loc_50A441
mov	eax, 1
imul	eax, 30h
push	eax		; int
mov	ecx, [ebp+var_B8]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_50A441:
mov	edx, [ebp+var_B4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_50A45A

loc_50A455:
jmp	loc_50A325

loc_50A45A:
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_C4]
mov	[eax+14h], edx
mov	ecx, [ebp+var_C4]
call	sub_517A00
mov	esp, ebp
pop	ebp
retn	4
sub_50A180 endp



; Attributes: bp-based frame

sub_50A480 proc	near

var_134= dword ptr -134h
var_12E= byte ptr -12Eh
var_12D= byte ptr -12Dh
var_12C= dword ptr -12Ch
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50A480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
mov	[ebp+var_12C], ecx
mov	[ebp+var_70], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_78]
push	ecx
mov	ecx, [ebp+var_12C]
call	sub_522260
mov	edx, [ebp+var_78]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_84]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_84]
mov	[ebp+var_20], edx
lea	eax, [ebp+var_A0]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+var_88]
mov	[edx], eax
lea	ecx, [ebp+var_9C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_A0]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_9C]
setz	al
mov	[ebp+var_12D], al
mov	cl, [ebp+var_12D]
mov	[ebp+var_12E], cl
movzx	edx, [ebp+var_12E]
test	edx, edx
jz	loc_50A5E8
or	[ebp+var_70], 1
or	[ebp+var_70], 2
lea	eax, [ebp+var_5C]
mov	[ebp+var_A8], eax
lea	ecx, [ebp+var_A1]
push	ecx
mov	ecx, [ebp+var_A8]
call	??1strstreambuf@@UAE@XZ_10 ; strstreambuf::~strstreambuf(void)
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_4C], eax
mov	ecx, [edx+4]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	eax, [ebp+var_64]
mov	[edx+8], eax
mov	ecx, [ebp+var_60]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_5C]
push	edx
mov	ecx, [ebp+var_AC]
add	ecx, 10h
call	sub_4FECB0
lea	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_12C]
call	sub_517BB0
add	eax, 8
mov	[ebp+var_134], eax
jmp	short loc_50A5F4

loc_50A5E8:
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_134], ecx

loc_50A5F4:
mov	edx, [ebp+var_134]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_70]
and	ecx, 2
jz	short loc_50A617
and	[ebp+var_70], 0FFFFFFFDh
lea	ecx, [ebp+var_34]
call	sub_4A9770

loc_50A617:
mov	edx, [ebp+var_70]
and	edx, 1
jz	short loc_50A62B
and	[ebp+var_70], 0FFFFFFFEh
lea	ecx, [ebp+var_5C]
call	sub_4A9770

loc_50A62B:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_50A480 endp

align 10h


; Attributes: bp-based frame

sub_50A640 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	ecx, [ebp+var_60]
call	sub_522260
mov	edx, [ebp+var_5C]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_58]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_50A640 endp



; Attributes: bp-based frame

sub_50A670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwotimer ; "LWOTimer"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_517D70
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1513DF8 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_50A670 endp

align 10h


; Attributes: bp-based frame

sub_50A740 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwogameobjprox ; "LWOGameObjProxy"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_517DE0
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset unk_1513DE0 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	edx, [ebp+arg_0]
push	edx
call	sub_FA61D0
add	esp, 4
mov	esp, ebp
pop	ebp
retn
sub_50A740 endp

align 10h


; Attributes: bp-based frame

sub_50A810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwogameobjinte ; "LWOGameObjInterface"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_517E50
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1513D50 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_50A810 endp

align 10h


; Attributes: bp-based frame

sub_50A8E0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_4C=	byte ptr -4Ch
var_44=	byte ptr -44h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_9C], ecx
mov	[ebp+var_5C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5C7CD0
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_68]
setz	al
mov	[ebp+var_9D], al
movzx	ecx, [ebp+var_9D]
test	ecx, ecx
jnz	short loc_50A98A
or	[ebp+var_5C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_9C]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_50A98A
mov	[ebp+var_A4], 0
jmp	short loc_50A994

loc_50A98A:
mov	[ebp+var_A4], 1

loc_50A994:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_5C]
and	eax, 1
jz	short loc_50A9AE
and	[ebp+var_5C], 0FFFFFFFEh
call	nullsub_1

loc_50A9AE:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_50AA70
xor	edx, edx
mov	[ebp+var_84], edx
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
lea	edx, [ebp+var_85]
push	edx
lea	ecx, [ebp+var_4C]
call	sub_4899B0
lea	ecx, [ebp+var_4C]
call	sub_471130
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_44]
call	sub_403400
lea	ecx, [ebp+var_4C]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_4FF350
lea	edx, [ebp+var_98]
mov	[ebp+var_8C], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	eax, [ebp+var_44]
push	eax
push	ecx
mov	[ebp+var_94], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_94]
call	sub_4046E0
lea	ecx, [ebp+var_58]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_513330
lea	edx, [ebp+var_58]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_1C]
call	sub_46B570
lea	ecx, [ebp+var_44]
call	sub_407E50
lea	ecx, [ebp+var_4C]
call	sub_46B570

loc_50AA70:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_50A8E0 endp

align 10h


; Attributes: bp-based frame

sub_50AA80 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 34h
lea	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_28]
mov	[ebp+var_14], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_14]
call	sub_4046E0

loc_50AAA8:
lea	edx, [ebp+var_20]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_28]
xor	ecx, ecx
cmp	eax, [ebp+var_20]
setnz	cl
mov	[ebp+var_29], cl
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_50AB00
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_C]
mov	[ebp+var_30], eax
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [edx+8]
cmp	ecx, [eax]
jnz	short loc_50AAF6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+4]
jz	short loc_50AB00

loc_50AAF6:
lea	eax, [ebp+var_28]
call	sub_405E90
jmp	short loc_50AAA8

loc_50AB00:
mov	ecx, [ebp+var_28]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_50AA80 endp

align 10h


; Attributes: bp-based frame

sub_50AB20 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	short loc_50AB49
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_770070
add	esp, 10h

loc_50AB49:
pop	ebp
retn
sub_50AB20 endp

align 10h


; Attributes: bp-based frame

sub_50AB50 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_50ABC6

loc_50ABB4:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 8
mov	[ebp+var_38], ecx

loc_50ABC6:
cmp	[ebp+var_3C], 0
jbe	short loc_50ABDE
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_38]
mov	[edx], eax
mov	[edx+4], ecx
jmp	short loc_50ABB4

loc_50ABDE:
mov	eax, [ebp+var_38]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_50AC09
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_50AC09:
mov	ecx, [ebp+var_9C]
call	sub_50F330
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
lea	edx, [ecx+eax*8]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_50AB50 endp

align 10h


; Attributes: bp-based frame

sub_50AC50 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_DC]
jz	loc_50AF98
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_50AD2F
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_DC]
add	ecx, 8
call	sub_510100
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_522A90
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_DC]
call	sub_50F480
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 0Ch
mov	eax, [ebp+var_DC]
add	edx, [eax]
mov	ecx, [ebp+var_DC]
mov	[ecx+8], edx
jmp	loc_50AF81

loc_50AD2F:
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_50ADF1
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_50AD9C

loc_50AD93:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_50AD9C:
cmp	[ebp+var_68], 0
jle	short loc_50ADC2
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_503F10
mov	ecx, [ebp+var_6C]
add	ecx, 0Ch
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 0Ch
mov	[ebp+var_70], edx
jmp	short loc_50AD93

loc_50ADC2:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_51C900
add	esp, 0Ch
jmp	loc_50AF81

loc_50ADF1:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A0], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	eax, [ebp+var_A0]
sub	eax, [ebp+var_94]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_50AE7B

loc_50AE6C:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_50AE7B:
cmp	[ebp+var_90], 0
jle	short loc_50AEB6
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_98]
call	sub_503F10
mov	ecx, [ebp+var_94]
add	ecx, 0Ch
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
add	edx, 0Ch
mov	[ebp+var_98], edx
jmp	short loc_50AE6C

loc_50AEB6:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+4]
mov	[ebp+var_D8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_D4], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
imul	eax, 0Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_D0], eax
mov	eax, [ebp+var_D0]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_D8]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_D4]
sub	eax, [ebp+var_CC]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_B0], eax
jmp	short loc_50AF42

loc_50AF33:
mov	edx, [ebp+var_B0]
sub	edx, 1
mov	[ebp+var_B0], edx

loc_50AF42:
cmp	[ebp+var_B0], 0
jle	short loc_50AF81
mov	eax, [ebp+var_CC]
push	eax		; int
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	sub_522A30
add	esp, 8
mov	edx, [ebp+var_CC]
add	edx, 0Ch
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_AC]
add	eax, 0Ch
mov	[ebp+var_AC], eax
jmp	short loc_50AF33

loc_50AF81:
mov	ecx, [ebp+var_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_DC]
add	ecx, [edx]
mov	eax, [ebp+var_DC]
mov	[eax+4], ecx

loc_50AF98:
mov	eax, [ebp+var_DC]
mov	esp, ebp
pop	ebp
retn	4
sub_50AC50 endp

align 10h


; Attributes: bp-based frame

sub_50AFB0 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_50B01B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_50AFF7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_518180
jmp	short loc_50B01B

loc_50AFF7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_517F70

loc_50B01B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_50AFB0 endp

align 10h


; Attributes: bp-based frame

sub_50B030 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_51CB30
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_50B030 endp



; Attributes: bp-based frame

sub_50B080 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_51CBA0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_50B080 endp



; Attributes: bp-based frame

sub_50B0D0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	byte ptr -48h
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_80], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_80]
call	sub_5C7D40
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_80]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_81], al
movzx	ecx, [ebp+var_81]
test	ecx, ecx
jnz	short loc_50B16D
or	[ebp+var_54], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_80]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_64]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_50B16D
mov	[ebp+var_88], 0
jmp	short loc_50B177

loc_50B16D:
mov	[ebp+var_88], 1

loc_50B177:
mov	cl, byte ptr [ebp+var_88]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_54]
and	edx, 1
jz	short loc_50B194
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_50B194:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_50B227
lea	ecx, [ebp+var_65]
push	ecx
lea	ecx, [ebp+var_48]
call	sub_489C40
mov	[ebp+var_38], 0
mov	dl, [ebp+var_66]
mov	[ebp+var_34], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_6C], edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5102D0
lea	ecx, [ebp+var_7C]
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	edx, [ebp+var_30]
push	edx
push	ecx
mov	[ebp+var_78], esp
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+var_78]
call	sub_4046E0
lea	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_80]
call	sub_51CC10
lea	ecx, [ebp+var_50]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_2C]
call	sub_5021C0
lea	ecx, [ebp+var_48]
call	sub_5021C0

loc_50B227:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_50B0D0 endp

align 10h


; Attributes: bp-based frame

sub_50B240 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_50B25C:
cmp	[ebp+var_10], 0
jz	short loc_50B2BA
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_50B289
mov	[ebp+var_5C], 1
jmp	short loc_50B290

loc_50B289:
mov	[ebp+var_5C], 0

loc_50B290:
mov	cl, byte ptr [ebp+var_5C]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_50B2A9
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_60], ecx
jmp	short loc_50B2B2

loc_50B2A9:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_60], eax

loc_50B2B2:
mov	ecx, [ebp+var_60]
mov	[ebp+var_10], ecx
jmp	short loc_50B25C

loc_50B2BA:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_50B35C
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_61], cl
movzx	edx, [ebp+var_61]
test	edx, edx
jz	short loc_50B34D
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_518540
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_50B3E9
jmp	short loc_50B35C

loc_50B34D:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_50B35C:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_50B37D
mov	[ebp+var_68], 1
jmp	short loc_50B384

loc_50B37D:
mov	[ebp+var_68], 0

loc_50B384:
mov	dl, byte ptr [ebp+var_68]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_50B3CE
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_518540
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_50B3E9

loc_50B3CE:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_50B3E9:
mov	esp, ebp
pop	ebp
retn	8
sub_50B240 endp

align 10h


; Attributes: bp-based frame

sub_50B3F0 proc	near

var_1A4= dword ptr -1A4h
var_19E= byte ptr -19Eh
var_19D= byte ptr -19Dh
var_19C= dword ptr -19Ch
var_150= dword ptr -150h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_11C= dword ptr -11Ch
var_114= dword ptr -114h
var_110= byte ptr -110h
var_94=	dword ptr -94h
var_90=	byte ptr -90h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1A4h
mov	[ebp+var_19C], ecx
mov	[ebp+var_114], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_11C]
push	ecx
mov	ecx, [ebp+var_19C]
call	sub_520E70
mov	edx, [ebp+var_11C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_128]
mov	[ebp+var_124], eax
mov	ecx, [ebp+var_124]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_128]
mov	[ebp+var_14], edx
lea	eax, [ebp+var_144]
mov	[ebp+var_130], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_12C], ecx
mov	edx, [ebp+var_130]
mov	eax, [ebp+var_12C]
mov	[edx], eax
lea	ecx, [ebp+var_140]
mov	[ebp+var_13C], ecx
mov	edx, [ebp+var_144]
mov	[ebp+var_138], edx
mov	eax, [ebp+var_13C]
mov	ecx, [ebp+var_138]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_140]
setz	al
mov	[ebp+var_19D], al
mov	cl, [ebp+var_19D]
mov	[ebp+var_19E], cl
movzx	edx, [ebp+var_19E]
test	edx, edx
jz	short loc_50B516
or	[ebp+var_114], 1
or	[ebp+var_114], 2
lea	ecx, [ebp+var_110]
call	sub_4E8E40
mov	[ebp+var_150], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_150]
push	edx
lea	ecx, [ebp+var_90]
call	sub_50F7B0
lea	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_19C]
call	sub_5184C0
add	eax, 4
mov	[ebp+var_1A4], eax
jmp	short loc_50B522

loc_50B516:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_1A4], ecx

loc_50B522:
mov	edx, [ebp+var_1A4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_114]
and	ecx, 2
jz	short loc_50B54E
and	[ebp+var_114], 0FFFFFFFDh
lea	ecx, [ebp+var_90]
call	sub_4E8F20

loc_50B54E:
mov	edx, [ebp+var_114]
and	edx, 1
jz	short loc_50B56B
and	[ebp+var_114], 0FFFFFFFEh
lea	ecx, [ebp+var_110]
call	sub_4E8F20

loc_50B56B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_50B3F0 endp

align 10h


; Attributes: bp-based frame

sub_50B580 proc	near

var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50B580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D4h
mov	[ebp+var_D8], ecx
mov	[ebp+var_44], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_4C]
push	ecx
mov	ecx, [ebp+var_D8]
call	sub_520E70
mov	edx, [ebp+var_4C]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_58]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_58]
mov	[ebp+var_20], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
lea	ecx, [ebp+var_70]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_74]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_70]
setz	al
mov	[ebp+var_D9], al
mov	cl, [ebp+var_D9]
mov	[ebp+var_DA], cl
movzx	edx, [ebp+var_DA]
test	edx, edx
jz	short loc_50B69F
or	[ebp+var_44], 1
or	[ebp+var_44], 2
or	[ebp+var_44], 4
lea	eax, [ebp+var_3D]
call	nullsub_1
mov	[ebp+var_78], eax
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
push	0
mov	eax, [ebp+var_78]
push	eax
lea	ecx, [ebp+var_34]
call	sub_43A100
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
lea	eax, [ebp+var_3C]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_44D270
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_D8]
call	sub_518500
add	eax, 4
mov	[ebp+var_E0], eax
jmp	short loc_50B6AB

loc_50B69F:
mov	edx, [ebp+var_10]
add	edx, 8
mov	[ebp+var_E0], edx

loc_50B6AB:
mov	eax, [ebp+var_E0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_44]
and	edx, 4
jz	short loc_50B6CE
and	[ebp+var_44], 0FFFFFFFBh
lea	ecx, [ebp+var_2C]
call	sub_436CF0

loc_50B6CE:
mov	eax, [ebp+var_44]
and	eax, 2
jz	short loc_50B6E2
and	[ebp+var_44], 0FFFFFFFDh
lea	ecx, [ebp+var_3C]
call	sub_436CF0

loc_50B6E2:
mov	ecx, [ebp+var_44]
and	ecx, 1
jz	short loc_50B6F3
and	[ebp+var_44], 0FFFFFFFEh
call	nullsub_1

loc_50B6F3:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_50B580 endp

align 10h


; Attributes: bp-based frame

sub_50B710 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_51], al
movzx	ecx, [ebp+var_51]
test	ecx, ecx
jnz	short loc_50B7A1
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_50]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_50B7A1
mov	[ebp+var_58], 0
jmp	short loc_50B7A8

loc_50B7A1:
mov	[ebp+var_58], 1

loc_50B7A8:
mov	cl, byte ptr [ebp+var_58]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_50B7C2
and	[ebp+var_2C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_50B7C2:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_50B827
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	[ebp+var_20], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
movss	xmm0, [ebp+var_20]
movss	[ebp+var_18], xmm0
lea	eax, [ebp+var_4C]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	ecx, [ebp+var_1C]
push	ecx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_50]
call	sub_51D0F0
lea	eax, [ebp+var_28]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_50B827:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_50B710 endp

align 10h


; Attributes: bp-based frame

sub_50B840 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_38=	byte ptr -38h
var_20=	byte ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C4h
mov	[ebp+var_B8], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_5C9500
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_B8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_B9], al
movzx	ecx, [ebp+var_B9]
test	ecx, ecx
jnz	short loc_50B8E5
or	[ebp+var_54], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_B8]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_50B8E5
mov	[ebp+var_C0], 0
jmp	short loc_50B8EF

loc_50B8E5:
mov	[ebp+var_C0], 1

loc_50B8EF:
mov	al, byte ptr [ebp+var_C0]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_54]
and	ecx, 1
jz	short loc_50B90C
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_50B90C:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_50B9AB
mov	[ebp+var_44], 0
mov	[ebp+var_40], 0
push	0
lea	eax, [ebp+var_45]
push	eax
lea	ecx, [ebp+var_3C]
call	sub_489990
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_38]
call	sub_403850
lea	edx, [ebp+var_44]
push	edx
lea	ecx, [ebp+var_20]
call	sub_4FEF20
lea	eax, [ebp+var_74]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	ecx, [ebp+var_38]
push	ecx
push	ecx
mov	[ebp+var_70], esp
mov	ecx, [ebp+var_74]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	edx, [ebp+var_50]
push	edx
mov	ecx, [ebp+var_B8]
call	sub_512060
lea	eax, [ebp+var_50]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_20]
call	sub_4FEFD0
lea	ecx, [ebp+var_38]
call	sub_407910
lea	ecx, [ebp+var_44]
call	sub_4FEFD0

loc_50B9AB:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_50B840 endp

align 10h


; Attributes: bp-based frame

sub_50B9C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_50BAB4
mov	[ebp+var_4], 0
jmp	short loc_50B9F3

loc_50B9EA:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_50B9F3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+var_4], edx
jnb	loc_50BAB4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+eax*8]
mov	eax, [edx+4]
mov	[ebp+var_18], eax

loc_50BA27:
mov	ecx, [ebp+var_18]
mov	dl, [ecx]
mov	[ebp+var_19], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax]
jnz	short loc_50BA64
cmp	[ebp+var_19], 0
jz	short loc_50BA5B
mov	ecx, [ebp+var_18]
mov	dl, [ecx+1]
mov	[ebp+var_1A], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax+1]
jnz	short loc_50BA64
add	[ebp+var_18], 2
add	[ebp+var_14], 2
cmp	[ebp+var_1A], 0
jnz	short loc_50BA27

loc_50BA5B:
mov	[ebp+var_20], 0
jmp	short loc_50BA6C

loc_50BA64:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_20], ecx

loc_50BA6C:
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
cmp	[ebp+var_24], 0
jnz	short loc_50BAAF
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+eax*8+4]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+eax*8]
push	edx
call	sub_7700F0
add	esp, 10h
jmp	short loc_50BAB4

loc_50BAAF:
jmp	loc_50B9EA

loc_50BAB4:
mov	esp, ebp
pop	ebp
retn
sub_50B9C0 endp

align 10h


; Attributes: bp-based frame

sub_50BAC0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_50BAD1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_50BB09
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
call	nullsub_1
cmp	[ebp+var_8], 0
jz	short loc_50BB07
mov	eax, 1
shl	eax, 3
push	eax		; int
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_50BB07:
jmp	short loc_50BAD1

loc_50BB09:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_50BAC0 endp

align 10h


; Attributes: bp-based frame

sub_50BB20 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_50BDC3
jmp	short loc_50BBE5

loc_50BBDD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_50BBE5:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_50BCB9
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jz	short loc_50BCB4
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_50BE09

loc_50BCB4:
jmp	loc_50BBDD

loc_50BCB9:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_5103D0
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_50BE09

loc_50BDC3:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_518D50
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_50BE09:
mov	esp, ebp
pop	ebp
retn	8
sub_50BB20 endp

align 10h


; Attributes: bp-based frame

sub_50BE10 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_50BE72
jmp	short loc_50BE8D

loc_50BE72:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_518E50

loc_50BE8D:
mov	esp, ebp
pop	ebp
retn	4
sub_50BE10 endp

align 10h


; Attributes: bp-based frame

sub_50BEA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_50BAC0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_50BEA0 endp



; Attributes: bp-based frame

sub_50BEF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_50BF78
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 6
mov	[ebp+var_C], ecx
mov	[ebp+var_8], 0
jmp	short loc_50BF1B

loc_50BF13:
mov	edx, [ebp+var_C]
sar	edx, 1
mov	[ebp+var_C], edx

loc_50BF1B:
cmp	[ebp+var_C], 1
jz	short loc_50BF2C
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_50BF13

loc_50BF2C:
push	0
lea	ecx, [ebp+var_1]
push	ecx
call	sub_4761F0
add	esp, 8
movzx	edx, byte ptr [eax]
push	edx
mov	eax, [ebp+var_8]
shl	eax, 1
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5190F0
add	esp, 14h
push	0
lea	eax, [ebp+var_2]
push	eax
call	sub_4761F0
add	esp, 8
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5191C0
add	esp, 0Ch

loc_50BF78:
mov	esp, ebp
pop	ebp
retn
sub_50BEF0 endp

align 10h


; Attributes: bp-based frame

sub_50BF80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0B4h
push	esi
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_50BF94
jmp	short loc_50BFD9

loc_50BF94:
mov	ecx, [ebp+arg_0]
add	ecx, 40h
mov	[ebp+var_4], ecx
jmp	short loc_50BFA8

loc_50BF9F:
mov	edx, [ebp+var_4]
add	edx, 40h
mov	[ebp+var_4], edx

loc_50BFA8:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_50BFD9
mov	esi, [ebp+var_4]
sub	esi, [ebp+arg_0]
sar	esi, 6
add	esi, 1
call	_rand
cdq
idiv	esi
shl	edx, 6
add	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4]
push	ecx
call	sub_519230
add	esp, 8
jmp	short loc_50BF9F

loc_50BFD9:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_50BF80 endp

align 10h


; Attributes: bp-based frame

sub_50BFE0 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_75=	byte ptr -75h
var_74=	byte ptr -74h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50BFE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B0h
mov	[ebp+var_B0], ecx
mov	[ebp+var_84], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B0]
call	sub_455120
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_B0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_8C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_90]
setz	al
mov	[ebp+var_B1], al
movzx	ecx, [ebp+var_B1]
test	ecx, ecx
jnz	short loc_50C0BF
or	[ebp+var_84], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
lea	eax, [ebp+var_1D]
push	eax
mov	ecx, [ebp+var_B0]
call	sub_443C60
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_94]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_50C0BF
mov	[ebp+var_B8], 0
jmp	short loc_50C0C9

loc_50C0BF:
mov	[ebp+var_B8], 1

loc_50C0C9:
mov	al, byte ptr [ebp+var_B8]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_84]
and	ecx, 1
jz	short loc_50C0EC
and	[ebp+var_84], 0FFFFFFFEh
lea	ecx, [ebp+var_1D]
call	sub_42CA30

loc_50C0EC:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_50C1B3
lea	ecx, [ebp+var_75]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_74]
call	sub_402390
mov	[ebp+var_9C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_9C]
push	edx
lea	ecx, [ebp+var_48]
call	sub_403400
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_AC]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_A0]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
push	ecx
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_AC]
mov	eax, [ebp+var_A8]
call	sub_4046E0
lea	edx, [ebp+var_80]
push	edx
mov	ecx, [ebp+var_B0]
call	sub_446DD0
lea	eax, [ebp+var_80]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_48]
call	sub_407E50
lea	ecx, [ebp+var_74]
call	sub_407E50
lea	ecx, [ebp+var_75]
call	nullsub_1

loc_50C1B3:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_50BFE0 endp

align 10h


; Attributes: bp-based frame

sub_50C1D0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_50C230
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 1
cmp	edx, [ebp+arg_4]
jb	short loc_50C211
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_519380
jmp	short loc_50C230

loc_50C211:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_519280

loc_50C230:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_50C1D0 endp

align 10h


; Attributes: bp-based frame

sub_50C240 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_50C2AB
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 28h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_50C287
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_519770
jmp	short loc_50C2AB

loc_50C287:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_519560

loc_50C2AB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_50C240 endp

align 10h


; Attributes: bp-based frame

sub_50C2C0 proc	near

var_4C=	dword ptr -4Ch
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_50C2D8:
cmp	[ebp+var_8], 0
jz	short loc_50C31E
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_9], al
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_50C313
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_50C31C

loc_50C313:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_50C31C:
jmp	short loc_50C2D8

loc_50C31E:
push	0
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4C]
call	sub_5AF4C0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_50C2C0 endp

align 10h


; Attributes: bp-based frame

sub_50C350 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_519AF0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_50C350 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_50C380(void	*)
sub_50C380 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_50C389:
cmp	[ebp+arg_0], 0
jz	short loc_50C3D9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_50C380
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_519D40
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_50C3D1
mov	edx, 1
imul	edx, 6Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50C3D1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_50C389

loc_50C3D9:
mov	esp, ebp
pop	ebp
retn	4
sub_50C380 endp

align 10h


; Attributes: bp-based frame

sub_50C3E0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_50C3FC:
cmp	[ebp+var_10], 0
jz	short loc_50C447
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_50C436
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_50C43F

loc_50C436:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_50C43F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_50C3FC

loc_50C447:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_50C4E9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_50C4DA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_519C00
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_50C563
jmp	short loc_50C4E9

loc_50C4DA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_50C4E9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_50C548
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_519C00
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_50C563

loc_50C548:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_50C563:
mov	esp, ebp
pop	ebp
retn	8
sub_50C3E0 endp

align 10h


; Attributes: bp-based frame

sub_50C570 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_50FCF0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_50C5C6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_50C570
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_50C5C6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_50C5D5:
cmp	[ebp+arg_0], 0
jz	short loc_50C642
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_50FCF0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_50C631
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_50C570
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_50C631:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_50C5D5

loc_50C642:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_50C570 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_50C650(void	*)
sub_50C650 proc	near

var_64=	dword ptr -64h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx

loc_50C659:
cmp	[ebp+arg_0], 0
jz	short loc_50C6A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_64]
call	sub_50C650
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_519ED0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_50C6A1
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50C6A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_50C659

loc_50C6A9:
mov	esp, ebp
pop	ebp
retn	4
sub_50C650 endp

align 10h


; Attributes: bp-based frame

sub_50C6B0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_50C6CC:
cmp	[ebp+var_10], 0
jz	short loc_50C717
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_50C706
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_50C70F

loc_50C706:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_50C70F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_50C6CC

loc_50C717:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_50C7B9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_50C7AA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_519D90
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_50C833
jmp	short loc_50C7B9

loc_50C7AA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_50C7B9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_50C818
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_519D90
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_50C833

loc_50C818:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_50C833:
mov	esp, ebp
pop	ebp
retn	8
sub_50C6B0 endp

align 10h


; Attributes: bp-based frame

sub_50C840 proc	near

arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+8], 0
jz	short loc_50C877
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_50C877
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	eax, [edx]
push	eax
call	sub_770070
add	esp, 10h

loc_50C877:
pop	ebp
retn
sub_50C840 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50C880(int, int, int,	float)
sub_50C880 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	ecx		; float
fld	[ebp+arg_C]
fstp	[esp+30h+var_30]
lea	eax, [ebp+var_10]
push	eax		; int
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+arg_8]
call	sub_432EB0
mov	ecx, eax
call	sub_49EFA0
mov	[ebp+var_2C], eax
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_28], ecx
mov	[ebp+var_24], edx
mov	eax, [ebp+var_2C]
movss	xmm0, [ebp+var_28]
addss	xmm0, dword ptr	[eax]
movss	[ebp+var_28], xmm0
mov	ecx, [ebp+var_2C]
movss	xmm0, [ebp+var_24]
addss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_24], xmm0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_50C880 endp

align 10h


; Attributes: bp-based frame

sub_50C900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_50C96C
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_50C92B

loc_50C923:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_50C92B:
cmp	[ebp+var_8], 1
jz	short loc_50C93C
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_50C923

loc_50C93C:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_519F00
add	esp, 14h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B5C90
add	esp, 0Ch

loc_50C96C:
mov	esp, ebp
pop	ebp
retn
sub_50C900 endp



; Attributes: bp-based frame

sub_50C970 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+20h], 0
jz	short loc_50C9C6
mov	ecx, [ebp+var_C]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_51A170
mov	edx, [ebp+var_C]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+20h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_50C9C6
mov	eax, [ebp+var_8]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_50C9C6:
mov	esp, ebp
pop	ebp
retn
sub_50C970 endp

align 10h


; Attributes: bp-based frame

sub_50C9D0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	[ebp+var_18], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 0Ah
div	ecx
add	eax, 1
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
add	edx, 2
mov	[ebp+var_10], edx
mov	[ebp+var_14], 8
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_14]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_40]
mov	eax, [eax]
mov	[edx+24h], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+24h]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 20h
call	sub_5A9600
mov	ecx, [ebp+var_40]
mov	[ecx+20h], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+24h]
sub	eax, [ebp+var_8]
shr	eax, 1
mov	ecx, [ebp+var_40]
mov	edx, [ecx+20h]
lea	eax, [edx+eax*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
lea	eax, [edx+ecx*4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_40]
call	sub_51A120
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_2C], 80h
mov	edx, 0Ah
imul	edx, 0Ch
mov	eax, [ebp+var_40]
add	edx, [eax+4]
mov	ecx, [ebp+var_40]
mov	[ecx+8], edx
mov	edx, [ebp+var_C]
sub	edx, 4
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_30], 80h
mov	eax, 0Ah
imul	eax, 0Ch
mov	ecx, [ebp+var_34]
add	eax, [ecx+4]
mov	edx, [ebp+var_34]
mov	[edx+8], eax
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [ecx+4]
mov	[eax], edx
mov	[ebp+var_3C], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 0Ah
div	ecx
imul	edx, 0Ch
mov	eax, [ebp+var_40]
add	edx, [eax+14h]
mov	ecx, [ebp+var_40]
mov	[ecx+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_50C9D0 endp

align 10h


; Attributes: bp-based frame

sub_50CB10 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_50CB30

loc_50CB27:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_50CB30:
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_4]
cmp	ecx, [eax+1Ch]
jnb	short loc_50CB8B
mov	[ebp+var_8], 80h
mov	edx, 0Ah
imul	edx, 0Ch
mov	eax, [ebp+var_4]
add	edx, [eax]
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_10], edx
xor	eax, eax
mov	[ebp+var_9], al
mov	[ebp+var_18], 80h
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
cmp	[ebp+var_1C], 0
jz	short loc_50CB89
mov	eax, 0Ah
imul	eax, 0Ch
push	eax		; int
mov	ecx, [ebp+var_1C]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_50CB89:
jmp	short loc_50CB27

loc_50CB8B:
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_4C]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+1Ch]
jz	short loc_50CBF3
mov	edx, [ebp+var_4C]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_24], edx
xor	eax, eax
mov	[ebp+var_1D], al
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+10h]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax+14h]
mov	[ebp+var_30], ecx
xor	edx, edx
mov	[ebp+var_29], dl
mov	[ebp+var_38], 80h
mov	eax, [ebp+var_4C]
mov	ecx, [eax+14h]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_3C], 0
jz	short loc_50CBF1
mov	edx, 0Ah
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_3C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50CBF1:
jmp	short loc_50CC09

loc_50CBF3:
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+10h]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
xor	edx, edx
mov	[ebp+var_3D], dl

loc_50CC09:
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_4C]
add	ecx, 10h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	esp, ebp
pop	ebp
retn
sub_50CB10 endp

align 10h


; Attributes: bp-based frame

sub_50CC30 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+0Ch]
sub	edx, [ecx+20h]
sar	edx, 2
cmp	edx, 1
jnb	short loc_50CC59
push	1
push	1
mov	ecx, [ebp+var_28]
call	sub_51A1D0

loc_50CC59:
mov	[ebp+var_4], 80h
push	0Ah
mov	ecx, [ebp+var_28]
add	ecx, 24h
call	sub_503490
mov	ecx, [ebp+var_28]
mov	edx, [ecx+0Ch]
mov	[edx-4], eax
mov	eax, [ebp+var_28]
mov	ecx, [eax+0Ch]
sub	ecx, 4
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_18]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_14], 80h
mov	ecx, 0Ah
imul	ecx, 0Ch
mov	edx, [ebp+var_28]
add	ecx, [edx+4]
mov	eax, [ebp+var_28]
mov	[eax+8], ecx
mov	ecx, [ebp+var_28]
mov	edx, [ecx+8]
sub	edx, 0Ch
mov	eax, [ebp+var_28]
mov	[eax], edx
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[ebp+var_24], edx
xor	eax, eax
mov	byte ptr [ebp+var_1C+1], al
mov	cl, byte ptr [ebp+var_1C+1]
mov	byte ptr [ebp+var_1A+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1C], dl
mov	al, byte ptr [ebp+var_1C]
mov	byte ptr [ebp+var_1A], al
mov	ecx, [ebp+var_24]
mov	[ebp+var_20], ecx
cmp	[ebp+var_20], 0
jz	short loc_50CD07
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_20]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_2C], eax
jmp	short loc_50CD0E

loc_50CD07:
mov	[ebp+var_2C], 0

loc_50CD0E:
mov	esp, ebp
pop	ebp
retn	4
sub_50CC30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_50CD20(void	*)
sub_50CD20 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_50CD29:
cmp	[ebp+arg_0], 0
jz	short loc_50CD6F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_50CD20
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_50CD67
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50CD67:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_50CD29

loc_50CD6F:
mov	esp, ebp
pop	ebp
retn	4
sub_50CD20 endp

align 10h


; Attributes: bp-based frame

sub_50CD80 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_50CD9C:
cmp	[ebp+var_10], 0
jz	short loc_50CDE7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_50CDD6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_50CDDF

loc_50CDD6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_50CDDF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_50CD9C

loc_50CDE7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_50CE89
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_50CE7A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_51A4F0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_50CF03
jmp	short loc_50CE89

loc_50CE7A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_50CE89:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_50CEE8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_51A4F0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_50CF03

loc_50CEE8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_50CF03:
mov	esp, ebp
pop	ebp
retn	8
sub_50CD80 endp

align 10h


; Attributes: bp-based frame

sub_50CF10 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_50F5C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_498EB0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_50CF86

loc_50CF74:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 18h
mov	[ebp+var_38], ecx

loc_50CF86:
cmp	[ebp+var_3C], 0
jbe	short loc_50CFB6
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
jmp	short loc_50CF74

loc_50CFB6:
mov	eax, [ebp+var_38]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_50CFE1
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_50CFE1:
mov	ecx, [ebp+var_9C]
call	sub_50F6A0
mov	eax, [ebp+var_4]
imul	eax, 18h
add	eax, [ebp+var_8]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_50CF10 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_50D030(void	*)
sub_50D030 proc	near

var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_50D039:
cmp	[ebp+arg_0], 0
jz	short loc_50D08C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_50D030
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_525D30
cmp	[ebp+arg_0], 0
jz	short loc_50D084
mov	edx, 1
imul	edx, 5Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50D084:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_50D039

loc_50D08C:
mov	esp, ebp
pop	ebp
retn	4
sub_50D030 endp

align 10h


; Attributes: bp-based frame

sub_50D0A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_50D177
mov	ecx, [ebp+var_14]
call	sub_502840
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_50D100
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_50D177

loc_50D100:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_51A630
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_50D128:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_50D13C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_50D128

loc_50D13C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_50D14E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_50D162
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_50D14E

loc_50D162:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_50D177:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_50D0A0 endp



; Attributes: bp-based frame

; int __stdcall	sub_50D180(void	*)
sub_50D180 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_50D189:
cmp	[ebp+arg_0], 0
jz	short loc_50D1D9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_50D180
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_51B090
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_50D1D1
mov	edx, 1
imul	edx, 78h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50D1D1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_50D189

loc_50D1D9:
mov	esp, ebp
pop	ebp
retn	4
sub_50D180 endp

align 10h


; Attributes: bp-based frame

sub_50D1E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+20h], 0
jz	short loc_50D236
mov	ecx, [ebp+var_C]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_5F3F00
mov	edx, [ebp+var_C]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+20h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_50D236
mov	eax, [ebp+var_8]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_50D236:
mov	esp, ebp
pop	ebp
retn
sub_50D1E0 endp

align 10h


; Attributes: bp-based frame

sub_50D240 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	[ebp+var_18], 80h
mov	eax, [ebp+arg_0]
shr	eax, 3
add	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_10], ecx
mov	[ebp+var_14], 8
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_14]
push	eax
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_40]
mov	edx, [eax]
mov	[ecx+24h], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
push	ecx
mov	ecx, [ebp+var_40]
add	ecx, 20h
call	sub_5A9600
mov	edx, [ebp+var_40]
mov	[edx+20h], eax
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_40]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_40]
call	sub_51B0D0
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_2C], 80h
mov	eax, 8
shl	eax, 4
mov	ecx, [ebp+var_40]
add	eax, [ecx+4]
mov	edx, [ebp+var_40]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
sub	eax, 4
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_40]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_30], 80h
mov	ecx, 8
shl	ecx, 4
mov	edx, [ebp+var_34]
add	ecx, [edx+4]
mov	eax, [ebp+var_34]
mov	[eax+8], ecx
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ecx], eax
mov	[ebp+var_3C], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 8
div	ecx
shl	edx, 4
mov	eax, [ebp+var_40]
add	edx, [eax+14h]
mov	ecx, [ebp+var_40]
mov	[ecx+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_50D240 endp

align 10h


; Attributes: bp-based frame

sub_50D380 proc	near

var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_111= byte ptr -111h
var_110= dword ptr -110h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_CC=	byte ptr -0CCh
var_7C=	byte ptr -7Ch
var_64=	byte ptr -64h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 11Ch
mov	[ebp+var_110], ecx
mov	[ebp+var_D8], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_110]
call	sub_5C9500
mov	[ebp+var_DC], eax
mov	ecx, [ebp+var_DC]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_110]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_E4]
mov	[ebp+var_E0], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_E0]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_E4]
setz	al
mov	[ebp+var_111], al
movzx	ecx, [ebp+var_111]
test	ecx, ecx
jnz	short loc_50D443
or	[ebp+var_D8], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_E8], edx
mov	eax, [ebp+var_110]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_E8]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_50D443
mov	[ebp+var_118], 0
jmp	short loc_50D44D

loc_50D443:
mov	[ebp+var_118], 1

loc_50D44D:
mov	al, byte ptr [ebp+var_118]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_D8]
and	ecx, 1
jz	short loc_50D470
and	[ebp+var_D8], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_50D470:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_50D51A
lea	ecx, [ebp+var_CC]
call	sub_4EA3B0
mov	[ebp+var_F4], eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_7C]
call	sub_403850
mov	ecx, [ebp+var_F4]
push	ecx
lea	ecx, [ebp+var_64]
call	sub_50F840
lea	edx, [ebp+var_104]
mov	[ebp+var_F8], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_F8]
call	sub_4046E0
lea	eax, [ebp+var_7C]
push	eax
push	ecx
mov	[ebp+var_100], esp
mov	ecx, [ebp+var_104]
mov	eax, [ebp+var_100]
call	sub_4046E0
lea	ecx, [ebp+var_D4]
push	ecx
mov	ecx, [ebp+var_110]
call	sub_51ABD0
lea	edx, [ebp+var_D4]
mov	[ebp+var_11C], edx
mov	eax, [ebp+var_11C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_7C]
call	sub_50ED40
lea	ecx, [ebp+var_CC]
call	sub_4EA460

loc_50D51A:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_50D380 endp

align 10h


; Attributes: bp-based frame

sub_50D530 proc	near

var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_94=	byte ptr -94h
var_7C=	byte ptr -7Ch
var_60=	byte ptr -60h
var_48=	byte ptr -48h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0E4h
mov	[ebp+var_D8], ecx
mov	[ebp+var_A0], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D8]
call	sub_5C9500
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_D8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_AC]
mov	[ebp+var_A8], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_A8]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_AC]
setz	al
mov	[ebp+var_D9], al
movzx	ecx, [ebp+var_D9]
test	ecx, ecx
jnz	short loc_50D5F3
or	[ebp+var_A0], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_D8]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_50D5F3
mov	[ebp+var_E0], 0
jmp	short loc_50D5FD

loc_50D5F3:
mov	[ebp+var_E0], 1

loc_50D5FD:
mov	al, byte ptr [ebp+var_E0]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_A0]
and	ecx, 1
jz	short loc_50D620
and	[ebp+var_A0], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_50D620:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_50D6E9
lea	ecx, [ebp+var_94]
call	sub_4EA360
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_60]
call	sub_50F750
mov	[ebp+var_D0], eax
lea	ecx, [ebp+var_CC]
mov	[ebp+var_C0], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_C0]
call	sub_4046E0
mov	edx, [ebp+var_D0]
push	edx
push	ecx
mov	[ebp+var_C8], esp
mov	ecx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
call	sub_4046E0
lea	eax, [ebp+var_9C]
push	eax
mov	ecx, [ebp+var_D8]
call	sub_51A710
lea	ecx, [ebp+var_9C]
mov	[ebp+var_E4], ecx
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_48]
mov	[ebp+var_D4], ecx
mov	ecx, [ebp+var_D4]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_D4]
call	sub_407910
lea	ecx, [ebp+var_60]
call	sub_407910
lea	ecx, [ebp+var_7C]
call	sub_407910
lea	ecx, [ebp+var_94]
call	sub_407910

loc_50D6E9:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_50D530 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_50D700(void	*)
sub_50D700 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_50D709:
cmp	[ebp+arg_0], 0
jz	short loc_50D759
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_50D700
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_51B120
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_50D751
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50D751:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_50D709

loc_50D759:
mov	esp, ebp
pop	ebp
retn	4
sub_50D700 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_50D760(void	*)
sub_50D760 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_50D769:
cmp	[ebp+arg_0], 0
jz	short loc_50D7B9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_50D760
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_50EB30
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_50D7B1
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_50D7B1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_50D769

loc_50D7B9:
mov	esp, ebp
pop	ebp
retn	4
sub_50D760 endp

align 10h


; Attributes: bp-based frame

sub_50D7C0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_50D7D1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_50D813
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_51B120
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_50D811
mov	ecx, 1
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50D811:
jmp	short loc_50D7D1

loc_50D813:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_50D7C0 endp

align 10h


; Attributes: bp-based frame

sub_50D830 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_98], ecx
mov	[ebp+var_50], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_98]
call	sub_5C7CD0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_5C]
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_58]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_5C]
setz	al
mov	[ebp+var_99], al
movzx	ecx, [ebp+var_99]
test	ecx, ecx
jnz	short loc_50D8DA
or	[ebp+var_50], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_60], edx
mov	eax, [ebp+var_98]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_50D8DA
mov	[ebp+var_A0], 0
jmp	short loc_50D8E4

loc_50D8DA:
mov	[ebp+var_A0], 1

loc_50D8E4:
mov	dl, byte ptr [ebp+var_A0]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_50]
and	eax, 1
jz	short loc_50D8FE
and	[ebp+var_50], 0FFFFFFFEh
call	nullsub_1

loc_50D8FE:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_50D980
mov	[ebp+var_44], 0
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_40]
call	sub_403400
mov	eax, [ebp+var_44]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_94]
mov	[ebp+var_88], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_88]
call	sub_4046E0
lea	edx, [ebp+var_40]
push	edx
push	ecx
mov	[ebp+var_90], esp
mov	ecx, [ebp+var_94]
mov	eax, [ebp+var_90]
call	sub_4046E0
lea	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_4974E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A4]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_40]
call	sub_407E50

loc_50D980:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_50D830 endp

align 10h


; Attributes: bp-based frame

sub_50D990 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	byte ptr -54h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50D990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
mov	[ebp+var_64], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_5DE010
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_94]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_70]
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_6C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_70]
setz	al
mov	[ebp+var_95], al
movzx	ecx, [ebp+var_95]
test	ecx, ecx
jnz	short loc_50DA4D
or	[ebp+var_64], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_74], edx
mov	eax, [ebp+var_94]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_50DA4D
mov	[ebp+var_9C], 0
jmp	short loc_50DA57

loc_50DA4D:
mov	[ebp+var_9C], 1

loc_50DA57:
mov	cl, byte ptr [ebp+var_9C]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_64]
and	edx, 1
jz	short loc_50DA6C
and	[ebp+var_64], 0FFFFFFFEh

loc_50DA6C:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_50DBA0
lea	eax, [ebp+var_55]
call	nullsub_1
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
push	ecx
lea	ecx, [ebp+var_54]
call	sub_43A150
mov	[ebp+var_4], 0
mov	[ebp+var_44], 0
mov	dl, [ebp+var_56]
mov	[ebp+var_40], dl
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_38]
mov	[ebp+var_7C], edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_50FE00
lea	ecx, [ebp+var_8C]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
push	ecx
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_8C]
mov	eax, [ebp+var_88]
call	sub_4046E0
lea	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_94]
call	sub_51B150
lea	ecx, [ebp+var_60]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_38]
mov	[ebp+var_90], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 5
mov	ecx, [ebp+var_90]
call	sub_439A20
mov	byte ptr [ebp+var_4], 4
call	nullsub_1
mov	[ebp+var_4], 6
mov	[ebp+var_4], 7
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 8
mov	[ebp+var_4], 0Ah
lea	ecx, [ebp+var_54]
call	sub_439A20
mov	byte ptr [ebp+var_4], 9
call	nullsub_1
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0Ch
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
call	nullsub_1

loc_50DBA0:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_50D990 endp

align 10h


; Attributes: bp-based frame

sub_50DBC0 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_50DBDC:
cmp	[ebp+var_10], 0
jz	short loc_50DC3A
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_50DC09
mov	[ebp+var_5C], 1
jmp	short loc_50DC10

loc_50DC09:
mov	[ebp+var_5C], 0

loc_50DC10:
mov	cl, byte ptr [ebp+var_5C]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_50DC29
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_60], ecx
jmp	short loc_50DC32

loc_50DC29:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_60], eax

loc_50DC32:
mov	ecx, [ebp+var_60]
mov	[ebp+var_10], ecx
jmp	short loc_50DBDC

loc_50DC3A:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_50DCDC
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_61], cl
movzx	edx, [ebp+var_61]
test	edx, edx
jz	short loc_50DCCD
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_51B620
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_50DD69
jmp	short loc_50DCDC

loc_50DCCD:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_50DCDC:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_50DCFD
mov	[ebp+var_68], 1
jmp	short loc_50DD04

loc_50DCFD:
mov	[ebp+var_68], 0

loc_50DD04:
mov	dl, byte ptr [ebp+var_68]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_50DD4E
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_51B620
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_50DD69

loc_50DD4E:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_50DD69:
mov	esp, ebp
pop	ebp
retn	8
sub_50DBC0 endp

align 10h


; Attributes: bp-based frame

sub_50DD70 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_50DD81:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_50DDB9
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_50DDB7
mov	ecx, 1
imul	ecx, 68h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50DDB7:
jmp	short loc_50DD81

loc_50DDB9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_50DD70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50DDD0(void *, int)
sub_50DDD0 proc	near

var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
push	esi
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_50DE0A
lea	ecx, [ebp+var_58]
call	sub_4E57A0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
push	4
push	offset aSkillreadSizeD ; "SkillRead Size:%d Offset:%d"
lea	ecx, [ebp+var_58]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_50DE0A:
xor	edx, edx
jz	short loc_50DE22
push	1		; char
push	20h		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
mov	esi, [ebp+arg_4]
call	sub_A49250
jmp	short loc_50DE32
jmp	short loc_50DE32

loc_50DE22:		; char
push	1
push	20h		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	esi, [ebp+arg_4]
call	sub_A49250

loc_50DE32:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_50DDD0 endp

align 10h


; Attributes: bp-based frame

sub_50DE40 proc	near

var_94=	dword ptr -94h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5D45A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_94]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_94]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_94]
add	edx, 8
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_24]
call	sub_4046E0
mov	ecx, [ebp+var_94]
call	sub_51B770
mov	eax, [ebp+var_94]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_50DE40 endp

align 10h


; Attributes: bp-based frame

sub_50DEF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_50DF7D
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_50DF1B

loc_50DF13:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_50DF1B:
cmp	[ebp+var_8], 1
jz	short loc_50DF2C
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_50DF13

loc_50DF2C:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
shl	eax, 1
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_51B7C0
add	esp, 10h
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_51B8C0
add	esp, 14h

loc_50DF7D:
mov	esp, ebp
pop	ebp
retn
sub_50DEF0 endp

align 10h


; Attributes: bp-based frame

sub_50DF90 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 64h
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_50DFC8
lea	ecx, [ebp+var_58]
call	sub_4E57A0
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
push	8
push	offset aSkillwriteSize ; "SkillWrite Size:%d Offset:%d"
lea	ecx, [ebp+var_58]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_50DFC8:
mov	edx, [ebp+arg_0]
mov	[ebp+var_64], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_60], eax
xor	ecx, ecx
jz	short loc_50DFEA
push	1
push	40h
lea	edx, [ebp+var_64]
push	edx
mov	eax, [ebp+arg_8]
call	sub_A49320
jmp	short loc_50DFFA

loc_50DFEA:
push	1
push	40h
lea	eax, [ebp+var_64]
push	eax
mov	eax, [ebp+arg_8]
call	sub_A49320

loc_50DFFA:
mov	esp, ebp
pop	ebp
retn
sub_50DF90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50E000(void *, int)
sub_50E000 proc	near

var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
push	esi
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_50E03A
lea	ecx, [ebp+var_58]
call	sub_4E57A0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
push	8
push	offset aSkillreadSizeD ; "SkillRead Size:%d Offset:%d"
lea	ecx, [ebp+var_58]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_50E03A:
xor	edx, edx
jz	short loc_50E052
push	1		; char
push	40h		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
mov	esi, [ebp+arg_4]
call	sub_A49250
jmp	short loc_50E062
jmp	short loc_50E062

loc_50E052:		; char
push	1
push	40h		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	esi, [ebp+arg_4]
call	sub_A49250

loc_50E062:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_50E000 endp

align 10h


; Attributes: bp-based frame

sub_50E070 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_50E088:
cmp	[ebp+var_8], 0
jz	short loc_50E0E0
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_50E0B5
mov	[ebp+var_1C], 1
jmp	short loc_50E0BC

loc_50E0B5:
mov	[ebp+var_1C], 0

loc_50E0BC:
mov	cl, byte ptr [ebp+var_1C]
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_50E0D5
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_50E0DE

loc_50E0D5:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_50E0DE:
jmp	short loc_50E088

loc_50E0E0:
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_51B960
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_50E070 endp

align 10h


; Attributes: bp-based frame

sub_50E110 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_50E148
lea	ecx, [ebp+var_58]
call	sub_4E57A0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
push	4
push	offset aSkillwriteSize ; "SkillWrite Size:%d Offset:%d"
lea	ecx, [ebp+var_58]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_50E148:
mov	edx, [ebp+arg_0]
mov	[ebp+var_60], edx
xor	eax, eax
jz	short loc_50E164
push	1
push	20h
lea	ecx, [ebp+var_60]
push	ecx
mov	eax, [ebp+arg_4]
call	sub_A49320
jmp	short loc_50E174

loc_50E164:
push	1
push	20h
lea	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+arg_4]
call	sub_A49320

loc_50E174:
mov	esp, ebp
pop	ebp
retn
sub_50E110 endp

align 10h


; Attributes: bp-based frame

sub_50E180 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
lea	eax, [ebp+var_1]
push	eax
call	sub_51BAB0
add	esp, 8
movzx	ecx, byte ptr [eax]
push	ecx
sub	esp, 8
mov	[ebp+var_20], esp
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+var_20]
add	ecx, 4
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_C]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_2C]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	edx, [ebp+arg_0]
push	edx
call	sub_51BAD0
add	esp, 20h
lea	ecx, [ebp+var_1]
call	sub_42CA30
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_50E180 endp

align 10h


; Attributes: bp-based frame

sub_50E220 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_50E258
lea	ecx, [ebp+var_58]
call	sub_4E57A0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
push	4
push	offset aSkillwriteSize ; "SkillWrite Size:%d Offset:%d"
lea	ecx, [ebp+var_58]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_50E258:
movss	xmm0, [ebp+arg_0]
movss	[ebp+var_60], xmm0
xor	edx, edx
jz	short loc_50E278
push	1
push	20h
lea	eax, [ebp+var_60]
push	eax
mov	eax, [ebp+arg_4]
call	sub_A49320
jmp	short loc_50E288

loc_50E278:
push	1
push	20h
lea	ecx, [ebp+var_60]
push	ecx
mov	eax, [ebp+arg_4]
call	sub_A49320

loc_50E288:
mov	esp, ebp
pop	ebp
retn
sub_50E220 endp

align 10h


; Attributes: bp-based frame

sub_50E290 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_50], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_528F70
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_51], al
movzx	ecx, [ebp+var_51]
test	ecx, ecx
jnz	short loc_50E332
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_50]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_50E31A
mov	[ebp+var_58], 1
jmp	short loc_50E321

loc_50E31A:
mov	[ebp+var_58], 0

loc_50E321:
movzx	ecx, byte ptr [ebp+var_58]
test	ecx, ecx
jnz	short loc_50E332
mov	[ebp+var_5C], 0
jmp	short loc_50E339

loc_50E332:
mov	[ebp+var_5C], 1

loc_50E339:
mov	dl, byte ptr [ebp+var_5C]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_2C]
and	eax, 1
jz	short loc_50E34B
and	[ebp+var_2C], 0FFFFFFFEh

loc_50E34B:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_50E3AA
mov	[ebp+var_20], 0
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx]
movss	[ebp+var_1C], xmm0
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_50]
call	sub_518770
lea	ecx, [ebp+var_28]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_50E3AA:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_50E290 endp

align 10h


; Attributes: bp-based frame

sub_50E3C0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_50E3F8
lea	ecx, [ebp+var_58]
call	sub_4E57A0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
push	1
push	offset aSkillwriteSize ; "SkillWrite Size:%d Offset:%d"
lea	ecx, [ebp+var_58]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_50E3F8:
mov	dl, [ebp+arg_0]
mov	[ebp+var_5D], dl
mov	eax, 1
test	eax, eax
jz	short loc_50E419
push	1
push	8
lea	ecx, [ebp+var_5D]
push	ecx
mov	eax, [ebp+arg_4]
call	sub_A49320
jmp	short loc_50E429

loc_50E419:
push	1
push	8
lea	edx, [ebp+var_5D]
push	edx
mov	eax, [ebp+arg_4]
call	sub_A49320

loc_50E429:
mov	esp, ebp
pop	ebp
retn
sub_50E3C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50E430(void *, int)
sub_50E430 proc	near

var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
push	esi
movzx	eax, byte_1889845
test	eax, eax
jz	short loc_50E46A
lea	ecx, [ebp+var_58]
call	sub_4E57A0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
push	1
push	offset aSkillreadSizeD ; "SkillRead Size:%d Offset:%d"
lea	ecx, [ebp+var_58]
push	ecx
call	__initp_misc_winxfltr_14
add	esp, 10h

loc_50E46A:
mov	edx, 1
test	edx, edx
jz	short loc_50E487
push	1		; char
push	8		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
mov	esi, [ebp+arg_4]
call	sub_A49250
jmp	short loc_50E497
jmp	short loc_50E497

loc_50E487:		; char
push	1
push	8		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	esi, [ebp+arg_4]
call	sub_A49250

loc_50E497:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_50E430 endp

align 10h


; Attributes: bp-based frame

sub_50E4A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_50E511
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_4], 0
jmp	short loc_50E4D0

loc_50E4C8:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_50E4D0:
cmp	[ebp+var_8], 1
jz	short loc_50E4E1
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_50E4C8

loc_50E4E1:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_51BC90
add	esp, 14h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_51BFB0
add	esp, 0Ch

loc_50E511:
mov	esp, ebp
pop	ebp
retn
sub_50E4A0 endp

align 10h


; Attributes: bp-based frame

sub_50E520 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_BC], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_5C7D40
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_BC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_BD], al
movzx	ecx, [ebp+var_BD]
test	ecx, ecx
jnz	short loc_50E5C9
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_BC]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_50]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_50E5C9
mov	[ebp+var_C4], 0
jmp	short loc_50E5D3

loc_50E5C9:
mov	[ebp+var_C4], 1

loc_50E5D3:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_40]
and	edx, 1
jz	short loc_50E5F0
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_50E5F0:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_50E683
mov	[ebp+var_30], 0
mov	[ebp+var_2C], 0
push	0
lea	ecx, [ebp+var_31]
push	ecx
lea	ecx, [ebp+var_28]
call	sub_489990
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_30]
push	ecx
lea	ecx, [ebp+var_20]
call	sub_500750
lea	edx, [ebp+var_60]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_24]
push	eax
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_60]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_51C020
lea	edx, [ebp+var_3C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_20]
call	sub_4FFDD0
lea	ecx, [ebp+var_30]
call	sub_4FFDD0

loc_50E683:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_50E520 endp

align 10h


; Attributes: bp-based frame

sub_50E690 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
call	sub_51C500
add	esp, 24h
mov	esp, ebp
pop	ebp
retn
sub_50E690 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50E6F0(void *, int)
sub_50E6F0 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	94h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50E737
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4EA640
mov	[ebp+var_28], eax
jmp	short loc_50E73E

loc_50E737:
mov	[ebp+var_28], 0

loc_50E73E:
mov	esp, ebp
pop	ebp
retn
sub_50E6F0 endp

align 10h


; Attributes: bp-based frame

sub_50E750 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_51C560
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_50E750 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50E780(void *, int)
sub_50E780 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	48h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50E7C4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4E96F0
mov	[ebp+var_3C], eax
jmp	short loc_50E7CB

loc_50E7C4:
mov	[ebp+var_3C], 0

loc_50E7CB:
mov	esp, ebp
pop	ebp
retn
sub_50E780 endp

align 10h


; Attributes: bp-based frame

sub_50E7D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
lea	eax, [ebp+var_30]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
xor	eax, eax
mov	[ebp+var_11], al
lea	ecx, [ebp+var_28]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_30]
mov	[edx], eax
lea	ecx, [ebp+var_2C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_34]
mov	[edx], eax
mov	esp, ebp
pop	ebp
retn
sub_50E7D0 endp

align 10h


; Attributes: bp-based frame

sub_50E820 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_51C640
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_50E820 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50E850(void *, int)
sub_50E850 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	6Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50E894
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_51D850
mov	[ebp+var_C], eax
jmp	short loc_50E89B

loc_50E894:
mov	[ebp+var_C], 0

loc_50E89B:
mov	esp, ebp
pop	ebp
retn
sub_50E850 endp

align 10h


; Attributes: bp-based frame

sub_50E8A0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 14h
push	0
push	0
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_51C680
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_50E8A0 endp

align 10h


; Attributes: bp-based frame

sub_50E8D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax-4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx-4], ecx
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 4
sub	ecx, [ebp+arg_0]
sar	ecx, 2
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_529290
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_50E8D0 endp



; Attributes: bp-based frame

; int __cdecl sub_50E910(void *)
sub_50E910 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_F58520
xor	ecx, ecx
and	ecx, 1
jz	short loc_50E934
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_50E934:
mov	esp, ebp
pop	ebp
retn
sub_50E910 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50E940(void *, int)
sub_50E940 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50E991
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_50E998

loc_50E991:
mov	[ebp+var_C], 0

loc_50E998:
mov	esp, ebp
pop	ebp
retn
sub_50E940 endp

align 10h


; Attributes: bp-based frame

sub_50E9A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 118h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_51C7E0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_50E9A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50E9D0(void *, int)
sub_50E9D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50EA33
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_50EA3A

loc_50EA33:
mov	[ebp+var_C], 0

loc_50EA3A:
mov	esp, ebp
pop	ebp
retn
sub_50E9D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50EA40(void *, int)
sub_50EA40 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	3Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50EA84
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_51D950
mov	[ebp+var_10], eax
jmp	short loc_50EA8B

loc_50EA84:
mov	[ebp+var_10], 0

loc_50EA8B:
mov	esp, ebp
pop	ebp
retn
sub_50EA40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50EA90(void *)
sub_50EA90 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50EA90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_50EAE3
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_50EAE3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_50EA90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50EB00(void *)
sub_50EB00 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_5D2630
xor	ecx, ecx
and	ecx, 1
jz	short loc_50EB27
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_50EB27:
mov	esp, ebp
pop	ebp
retn
sub_50EB00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50EB30(void *)
sub_50EB30 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50EB30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_439A20
mov	byte ptr [ebp+var_4], 1
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_50EBA0
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_50EBA0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_50EB30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50EBB0(void *, int)
sub_50EBB0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50EBFA
mov	esi, [ebp+arg_4]
mov	ecx, 7
mov	edi, [ebp+var_8]
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_50EC01

loc_50EBFA:
mov	[ebp+var_C], 0

loc_50EC01:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_50EBB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50EC10(void *, int)
sub_50EC10 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50EC57
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4E5E90
mov	[ebp+var_C], eax
jmp	short loc_50EC5E

loc_50EC57:
mov	[ebp+var_C], 0

loc_50EC5E:
mov	esp, ebp
pop	ebp
retn
sub_50EC10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_50EC70(void *, int)
sub_50EC70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50ECD5
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	ecx, [ecx+2Ch]
mov	[eax+2Ch], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_50ECDC

loc_50ECD5:
mov	[ebp+var_C], 0

loc_50ECDC:
mov	esp, ebp
pop	ebp
retn
sub_50EC70 endp



; Attributes: bp-based frame

; int __cdecl sub_50ECE0(void *, int)
sub_50ECE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	60h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_50ED2A
mov	esi, [ebp+arg_4]
mov	ecx, 18h
mov	edi, [ebp+var_8]
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_50ED31

loc_50ED2A:
mov	[ebp+var_C], 0

loc_50ED31:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_50ECE0 endp

align 10h


; Attributes: bp-based frame

sub_50ED40 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_4EA460
mov	ecx, [ebp+var_8]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_50ED40 endp



; Attributes: bp-based frame

sub_50ED60 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 94h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 1BACF91h
mov	[ebp+var_10], 1BACF91h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_50ED9D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_50EDA3

loc_50ED9D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_50EDA3:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_50EDB6
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_50EDB6:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 1BACF91h
mov	[ebp+var_1C], 1BACF91h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_50EDEC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_50EDF2

loc_50EDEC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_50EDF2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_50EE02
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_50EE2C

loc_50EE02:
mov	[ebp+var_20], 1BACF91h
mov	[ebp+var_24], 1BACF91h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_50EE20
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_50EE26

loc_50EE20:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_50EE26:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_50EE2C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50ED60 endp

align 10h


; Attributes: bp-based frame

sub_50EE40 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_51C9B0
add	esp, 8
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 94h
idiv	ecx
mov	[ebp+var_64], eax
mov	edx, [ebp+var_68]
mov	eax, [edx]
mov	[ebp+var_60], eax
cmp	[ebp+var_60], 0
jz	short loc_50EEB6
mov	ecx, [ebp+var_64]
imul	ecx, 94h
push	ecx		; int
mov	edx, [ebp+var_60]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50EEB6:
mov	esp, ebp
pop	ebp
retn
sub_50EE40 endp

align 10h


; Attributes: bp-based frame

sub_50EEC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 1BACF91h
jbe	short loc_50EEEB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_50EEEB:
cmp	[ebp+arg_0], 0
jz	short loc_50EF25
mov	ecx, [ebp+arg_0]
imul	ecx, 94h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 94h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_50EF2C

loc_50EF25:
mov	[ebp+var_10], 0

loc_50EF2C:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_50EEC0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_50EF40 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E750
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_50EFB3
mov	ecx, [ebp+var_4C]
imul	ecx, 48h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50EFB3:
mov	esp, ebp
pop	ebp
retn
sub_50EF40 endp

align 10h


; Attributes: bp-based frame

sub_50EFC0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_50EFC9:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_50F020
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_501670
jmp	short loc_50EFC9

loc_50F020:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_50EFC0 endp

align 10h


; Attributes: bp-based frame

sub_50F040 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 25ED097h
mov	[ebp+var_10], 25ED097h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_50F07D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_50F083

loc_50F07D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_50F083:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_50F096
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_50F096:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 25ED097h
mov	[ebp+var_1C], 25ED097h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_50F0CC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_50F0D2

loc_50F0CC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_50F0D2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_50F0E2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_50F10C

loc_50F0E2:
mov	[ebp+var_20], 25ED097h
mov	[ebp+var_24], 25ED097h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_50F100
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_50F106

loc_50F100:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_50F106:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_50F10C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50F040 endp

align 10h


; Attributes: bp-based frame

sub_50F120 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E820
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_50F193
mov	ecx, [ebp+var_4C]
imul	ecx, 6Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50F193:
mov	esp, ebp
pop	ebp
retn
sub_50F120 endp

align 10h


; Attributes: bp-based frame

sub_50F1A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4E6640
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_50F1A0 endp

align 10h


; Attributes: bp-based frame

sub_50F1D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 15555555h
mov	[ebp+var_10], 15555555h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_50F20D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_50F213

loc_50F20D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_50F213:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_50F226
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_50F226:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 15555555h
mov	[ebp+var_1C], 15555555h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_50F25C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_50F262

loc_50F25C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_50F262:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_50F272
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_50F29C

loc_50F272:
mov	[ebp+var_20], 15555555h
mov	[ebp+var_24], 15555555h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_50F290
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_50F296

loc_50F290:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_50F296:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_50F29C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50F1D0 endp

align 10h


; Attributes: bp-based frame

sub_50F2B0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_50F323
mov	ecx, [ebp+var_54]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50F323:
mov	esp, ebp
pop	ebp
retn
sub_50F2B0 endp

align 10h


; Attributes: bp-based frame

sub_50F330 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_50F39C
mov	ecx, [ebp+var_54]
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50F39C:
mov	esp, ebp
pop	ebp
retn
sub_50F330 endp



; Attributes: bp-based frame

sub_50F3A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 1FFFFFFFh
jbe	short loc_50F3CB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_50F3CB:
cmp	[ebp+arg_0], 0
jz	short loc_50F3FC
mov	ecx, [ebp+arg_0]
shl	ecx, 3
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
shr	eax, 3
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_50F403

loc_50F3FC:
mov	[ebp+var_10], 0

loc_50F403:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_50F3A0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_50F410 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50F410
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_517B60
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_30]
add	eax, 4
mov	[ebp+var_2C], eax
push	0
mov	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_51CAC0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_50F410 endp

align 10h


; Attributes: bp-based frame

sub_50F480 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A4]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FB00
add	esp, 8
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A4]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_A0], eax
mov	edx, [ebp+var_A4]
mov	eax, [edx]
mov	[ebp+var_9C], eax
cmp	[ebp+var_9C], 0
jz	short loc_50F517
mov	ecx, [ebp+var_A0]
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_9C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50F517:
mov	esp, ebp
pop	ebp
retn
sub_50F480 endp

align 10h


; Attributes: bp-based frame

sub_50F520 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4E9860
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_50F520 endp

align 10h


; Attributes: bp-based frame

sub_50F550 proc	near

var_24=	dword ptr -24h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_4E9F60
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	8
sub_50F550 endp

align 10h


; Attributes: bp-based frame

sub_50F580 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
add	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_502450
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	8
sub_50F580 endp

align 10h


; Attributes: bp-based frame

sub_50F5C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 0AAAAAAAh
mov	[ebp+var_10], 0AAAAAAAh
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_50F5FD
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_50F603

loc_50F5FD:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_50F603:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_50F616
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_50F616:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 0AAAAAAAh
mov	[ebp+var_1C], 0AAAAAAAh
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_50F64C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_50F652

loc_50F64C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_50F652:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_50F662
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_50F68C

loc_50F662:
mov	[ebp+var_20], 0AAAAAAAh
mov	[ebp+var_24], 0AAAAAAAh
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_50F680
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_50F686

loc_50F680:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_50F686:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_50F68C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50F5C0 endp

align 10h


; Attributes: bp-based frame

sub_50F6A0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_50F713
mov	ecx, [ebp+var_54]
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50F713:
mov	esp, ebp
pop	ebp
retn
sub_50F6A0 endp

align 10h


; Attributes: bp-based frame

sub_50F720 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 4
call	sub_500750
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	8
sub_50F720 endp

align 10h


; Attributes: bp-based frame

sub_50F750 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403850
mov	ecx, [ebp+var_8]
add	ecx, 18h
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx+30h]
mov	[ecx+30h], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	8
sub_50F750 endp

align 10h


; Attributes: bp-based frame

sub_50F7B0 proc	near

var_6C=	dword ptr -6Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_44D270
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
push	ecx
mov	ecx, [ebp+var_6C]
add	ecx, 0Ch
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 34h
push	edx
mov	ecx, [ebp+var_6C]
add	ecx, 34h
call	sub_403400
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+5Ch]
mov	[eax+5Ch], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+60h]
mov	[eax+60h], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+64h]
mov	[eax+64h], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+68h]
mov	[eax+68h], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+6Ch]
fstp	dword ptr [eax+6Ch]
mov	edx, [ebp+arg_0]
add	edx, 70h
push	edx
mov	ecx, [ebp+var_6C]
add	ecx, 70h
call	sub_50FC40
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn	4
sub_50F7B0 endp



; Attributes: bp-based frame

sub_50F840 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_30]
add	ecx, 18h
call	sub_403850
mov	edx, [ebp+var_30]
add	edx, 30h
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_0]
add	eax, 30h
push	eax
mov	ecx, [ebp+var_2C]
call	sub_510410
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	eax, [edx+48h]
mov	[ecx+48h], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	eax, [edx+4Ch]
mov	[ecx+4Ch], eax
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_50F840 endp



; Attributes: bp-based frame

sub_50F8A0 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_5DDEF0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5254C0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50F8A0 endp



; Attributes: bp-based frame

sub_50F900 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_50F941
mov	ecx, 1
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50F941:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50F900 endp

align 10h


; Attributes: bp-based frame

sub_50F950 proc	near

var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_513870
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_50F99B
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50F99B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50F950 endp

align 10h


; Attributes: bp-based frame

sub_50F9B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_50F9F5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_515340
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_50F9F5:
mov	esp, ebp
pop	ebp
retn
sub_50F9B0 endp

align 10h


; Attributes: bp-based frame

sub_50FA00 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
push	eax
mov	ecx, [ebp+var_28]
call	sub_510260
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_20]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_28]
mov	[ecx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_50FA00 endp

align 10h


; Attributes: bp-based frame

sub_50FA70 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
push	eax
mov	ecx, [ebp+var_28]
call	sub_471350
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_50FA70 endp

align 10h


; Attributes: bp-based frame

sub_50FAE0 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 4
mov	[ebp+var_14], eax
xor	ecx, ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_20]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
call	sub_640690
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	10h
sub_50FAE0 endp

align 10h


; Attributes: bp-based frame

sub_50FB60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_2= byte ptr	-2
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
push	edx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_10]
call	sub_489990
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
lea	edx, [ebp+var_2]
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_14]
call	sub_517BF0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_50FB60 endp

align 10h


; Attributes: bp-based frame

sub_50FBE0 proc	near

var_64=	dword ptr -64h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_51D660
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_50FC2B
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_50FC2B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50FBE0 endp

align 10h


; Attributes: bp-based frame

sub_50FC40 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 0Ch
idiv	ecx
push	eax
mov	ecx, [ebp+var_5C]
call	sub_510260
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_54]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_50FCAF

loc_50FCA6:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_50FCAF:
cmp	[ebp+var_2C], 0
jle	short loc_50FCD9
mov	eax, [ebp+var_54]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_522A30
add	esp, 8
mov	edx, [ebp+var_54]
add	edx, 0Ch
mov	[ebp+var_54], edx
mov	eax, [ebp+var_28]
add	eax, 0Ch
mov	[ebp+var_28], eax
jmp	short loc_50FCA6

loc_50FCD9:
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_50FC40 endp

align 10h


; Attributes: bp-based frame

sub_50FCF0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_51D690
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50FCF0 endp

align 10h


; Attributes: bp-based frame

sub_50FD40 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503180
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_51D700
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50FD40 endp

align 10h


; Attributes: bp-based frame

sub_50FD80 proc	near

var_50=	dword ptr -50h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	1
mov	ecx, [ebp+var_50]
call	sub_4E1E10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_51D770
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50FD80 endp

align 10h


; Attributes: bp-based frame

sub_50FDC0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_503490
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_49C2D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50FDC0 endp

align 10h


; Attributes: bp-based frame

sub_50FE00 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_50FE00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 3Ch
mov	[ebp+var_48], ecx
xor	eax, eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_34]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_48]
call	sub_5E11A0
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
mov	edx, [ebp+var_48]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_48]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx
cmp	[ebp+var_38], 0
jz	short loc_50FF17
mov	edx, [ebp+var_48]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_48]
call	sub_512CE0
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_40], eax

loc_50FED4:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+8], 0
jz	short loc_50FEE8
mov	edx, [ebp+var_40]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
jmp	short loc_50FED4

loc_50FEE8:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx

loc_50FEFA:
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_50FF0E
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_44], ecx
jmp	short loc_50FEFA

loc_50FF0E:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_50FF17:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_50FE00 endp

align 10h


; Attributes: bp-based frame

sub_50FF40 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx		; void *
call	sub_5A74B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_50FF40 endp

align 10h


; Attributes: bp-based frame

sub_50FF80 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_510067
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_515260
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_510024:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_510038
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_510024

loc_510038:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_51004A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_51005E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_51004A

loc_51005E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_510067:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_50FF80 endp

align 10h


; Attributes: bp-based frame

sub_510080 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_510510
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_51D7E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_510080 endp

align 10h


; Attributes: bp-based frame

sub_5100C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5100C0 endp

align 10h


; Attributes: bp-based frame

sub_510100 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 15555555h
jbe	short loc_510126
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_510126:
cmp	[ebp+arg_0], 0
jz	short loc_51015A
mov	eax, [ebp+arg_0]
imul	eax, 0Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 0Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_51015C

loc_51015A:
xor	eax, eax

loc_51015C:
mov	esp, ebp
pop	ebp
retn	8
sub_510100 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_510170 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 0AAAAAAAh
jbe	short loc_510196
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_510196:
cmp	[ebp+arg_0], 0
jz	short loc_5101CA
mov	eax, [ebp+arg_0]
imul	eax, 18h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 18h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_5101CC

loc_5101CA:
xor	eax, eax

loc_5101CC:
mov	esp, ebp
pop	ebp
retn	8
sub_510170 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5101E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_51CAC0
mov	esp, ebp
pop	ebp
retn
sub_5101E0 endp

align 10h


; Attributes: bp-based frame

sub_510200 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 1FFFFFFFh
jbe	short loc_510226
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_510226:
cmp	[ebp+arg_0], 0
jz	short loc_510254
mov	eax, [ebp+arg_0]
shl	eax, 3
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_4]
shr	edx, 3
mov	eax, [ebp+arg_4]
mov	[eax], edx
mov	eax, [ebp+var_8]
jmp	short loc_510256

loc_510254:
xor	eax, eax

loc_510256:
mov	esp, ebp
pop	ebp
retn	8
sub_510200 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_510260 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_479650
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 0Ch
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_510260 endp

align 10h


; Attributes: bp-based frame

sub_5102D0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5103B7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_518690
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_510374:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_510388
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_510374

loc_510388:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_51039A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5103AE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_51039A

loc_5103AE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5103B7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5102D0 endp

align 10h


; Attributes: bp-based frame

sub_5103D0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_510570
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
add	edx, 4
mov	eax, [ebp+arg_0]
call	sub_409EC0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5103D0 endp

align 10h


; Attributes: bp-based frame

sub_510410 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5104F7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_51A630
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5104B4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5104C8
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5104B4

loc_5104C8:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5104DA:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5104EE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5104DA

loc_5104EE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5104F7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_510410 endp

align 10h


; Attributes: bp-based frame

sub_510510 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], (offset loc_129E410+2)
jbe	short loc_510536
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_510536:
cmp	[ebp+arg_0], 0
jz	short loc_51055F
mov	eax, [ebp+arg_0]
imul	eax, 0DCh
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_510566

loc_51055F:
mov	[ebp+var_C], 0

loc_510566:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_510510 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_510570 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1FFFFFFFh
jbe	short loc_510596
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_510596:
cmp	[ebp+arg_0], 0
jz	short loc_5105BC
mov	eax, [ebp+arg_0]
shl	eax, 3
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5105C3

loc_5105BC:
mov	[ebp+var_C], 0

loc_5105C3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_510570 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5105D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
and	eax, 0FFFFFFFCh
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_4E40B0
xor	ecx, ecx
and	ecx, 1
jz	short loc_51060E
mov	edx, [ebp+var_C]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51060E:
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0FFFFFFFEh
mov	esp, ebp
pop	ebp
retn
sub_5105D0 endp

align 10h


; Attributes: bp-based frame

sub_510620 proc	near

var_42=	word ptr -42h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
push	esi
mov	eax, [ebp+arg_0]
lea	esi, [ebp+var_8]
call	sub_404710
mov	[ebp+var_9], 1
lea	eax, [ebp+var_8]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_510736
cmp	[ebp+arg_0], 0
jnz	short loc_510658
mov	[ebp+var_40], 0
jmp	short loc_510666

loc_510658:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_40], eax

loc_510666:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D10
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_18], eax
xor	ecx, ecx
cmp	[ebp+var_28], 0
setnz	cl
mov	byte ptr [ebp+var_14], cl
lea	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_30], eax
mov	[ebp+var_2C], 0
mov	eax, [ebp+var_2C]
push	eax
call	sub_7803C0
add	esp, 4
push	eax
mov	ecx, [ebp+var_30]
call	sub_77FFD0
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_42], ax
mov	eax, [ebp+var_18]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
movzx	edx, [ebp+arg_4]
push	edx
movzx	eax, [ebp+var_42]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	ecx, [ebp+var_34]
mov	edx, [eax+20h]
call	edx
movzx	eax, [ebp+var_1C]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_9], al
lea	ecx, [ebp+var_10]
call	sub_77FF40
xor	ecx, ecx
jz	short loc_510736
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_405360

loc_510736:
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_510750
push	1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_402D20

loc_510750:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_8]
call	sub_404730
mov	eax, [ebp+var_24]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_510620 endp

align 10h


; Attributes: bp-based frame

sub_510770 proc	near

var_42=	word ptr -42h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 44h
push	esi
mov	eax, [ebp+arg_0]
lea	esi, [ebp+var_8]
call	sub_404710
mov	[ebp+var_9], 1
lea	eax, [ebp+var_8]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_51088B
cmp	[ebp+arg_0], 0
jnz	short loc_5107A8
mov	[ebp+var_40], 0
jmp	short loc_5107B6

loc_5107A8:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_40], eax

loc_5107B6:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D10
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_18], eax
xor	ecx, ecx
cmp	[ebp+var_28], 0
setnz	cl
mov	byte ptr [ebp+var_14], cl
lea	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_30], eax
mov	[ebp+var_2C], 0
mov	eax, [ebp+var_2C]
push	eax
call	sub_7803C0
add	esp, 4
push	eax
mov	ecx, [ebp+var_30]
call	sub_77FFD0
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_42], ax
mov	eax, [ebp+var_18]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
movzx	ecx, [ebp+var_42]
push	ecx
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
lea	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_34]
mov	edx, [eax]
mov	ecx, [ebp+var_34]
mov	eax, [edx+8]
call	eax
movzx	ecx, [ebp+var_1C]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_9], cl
lea	ecx, [ebp+var_10]
call	sub_77FF40
xor	edx, edx
jz	short loc_51088B
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360

loc_51088B:
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5108A5
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_5108A5:
mov	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_8]
call	sub_404730
mov	eax, [ebp+var_24]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_510770 endp

align 10h


; Attributes: bp-based frame

sub_5108C0 proc	near

var_42=	word ptr -42h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 44h
push	esi
mov	eax, [ebp+arg_0]
lea	esi, [ebp+var_8]
call	sub_404710
mov	[ebp+var_9], 1
lea	eax, [ebp+var_8]
call	sub_404760
movzx	eax, al
test	eax, eax
jz	loc_5109DB
cmp	[ebp+arg_0], 0
jnz	short loc_5108F8
mov	[ebp+var_40], 0
jmp	short loc_510906

loc_5108F8:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_40], eax

loc_510906:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D10
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_18], eax
xor	ecx, ecx
cmp	[ebp+var_28], 0
setnz	cl
mov	byte ptr [ebp+var_14], cl
lea	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_30], eax
mov	[ebp+var_2C], 0
mov	eax, [ebp+var_2C]
push	eax
call	sub_7803C0
add	esp, 4
push	eax
mov	ecx, [ebp+var_30]
call	sub_77FFD0
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405230
mov	[ebp+var_42], ax
mov	eax, [ebp+var_18]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
movzx	ecx, [ebp+var_42]
push	ecx
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
lea	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_34]
mov	edx, [eax]
mov	ecx, [ebp+var_34]
mov	eax, [edx+0Ch]
call	eax
movzx	ecx, [ebp+var_1C]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_9], cl
lea	ecx, [ebp+var_10]
call	sub_77FF40
xor	edx, edx
jz	short loc_5109DB
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360

loc_5109DB:
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5109F5
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_5109F5:
mov	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_8]
call	sub_404730
mov	eax, [ebp+var_24]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5108C0 endp

align 10h


; Attributes: bp-based frame

sub_510A10 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_34]
jnz	short loc_510A63
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_51D9F0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
call	sub_4044C0
mov	edx, [ebp+var_4]
mov	[eax], edx
mov	eax, [ebp+var_34]
call	sub_403030
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	eax, [ebp+var_34]
call	sub_403040
mov	edx, [ebp+var_4]
mov	[eax], edx
jmp	loc_510B32

loc_510A63:
cmp	[ebp+arg_10], 0
jnz	short loc_510A9F
cmp	[ebp+arg_C], 0
jnz	short loc_510A96
or	[ebp+var_C], 1
mov	eax, [ebp+arg_4]
call	sub_404540
mov	[ebp+var_20], eax
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_510A9F

loc_510A96:
mov	[ebp+var_38], 1
jmp	short loc_510AA6

loc_510A9F:
mov	[ebp+var_38], 0

loc_510AA6:
mov	dl, byte ptr [ebp+var_38]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_510AB8
and	[ebp+var_C], 0FFFFFFFEh

loc_510AB8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_510AFA
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_51D9F0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
call	sub_4044C0
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	eax, [ebp+var_34]
call	sub_4044C0
mov	edx, [ebp+arg_4]
cmp	edx, [eax]
jnz	short loc_510AF8
mov	eax, [ebp+var_34]
call	sub_4044C0
mov	ecx, [ebp+var_4]
mov	[eax], ecx

loc_510AF8:
jmp	short loc_510B32

loc_510AFA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_51D9F0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
call	sub_403040
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	eax, [ebp+var_34]
call	sub_403040
mov	edx, [ebp+arg_4]
cmp	edx, [eax]
jnz	short loc_510B32
mov	eax, [ebp+var_34]
call	sub_403040
mov	ecx, [ebp+var_4]
mov	[eax], ecx

loc_510B32:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_34]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_34]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_510A10 endp

align 10h


; Attributes: bp-based frame

sub_510B80 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_510B9A

loc_510B91:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_510B9A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_510BBD
mov	[ebp+var_8], 80h
push	2
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_5C7020
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_510B91

loc_510BBD:
mov	esp, ebp
pop	ebp
retn	8
sub_510B80 endp

align 10h


; Attributes: bp-based frame

sub_510BD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_510BEA

loc_510BE1:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_510BEA:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_510C1E
mov	[ebp+var_8], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_510C1C
mov	edx, 2
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_510C1C:
jmp	short loc_510BE1

loc_510C1E:
mov	esp, ebp
pop	ebp
retn	8
sub_510BD0 endp

align 10h


; Attributes: bp-based frame

sub_510C30 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_64]
cmp	[edx+24h], ecx
jbe	short loc_510CDB
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_510CB3
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_510CD6

loc_510CB3:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_510CD6:
jmp	loc_510D88

loc_510CDB:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_64]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5A9600
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_510D76
mov	ecx, [ebp+var_50]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_510D76:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_510D88:
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 2
imul	eax, 3Ch
mov	ecx, [ebp+var_64]
add	eax, [ecx+4]
mov	edx, [ebp+var_64]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_58], 80h
mov	eax, 2
imul	eax, 3Ch
mov	ecx, [ebp+var_5C]
add	eax, [ecx+4]
mov	edx, [ebp+var_5C]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_510C30 endp

align 10h


; Attributes: bp-based frame

sub_510E10 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_510E37
mov	edx, [ebp+var_58]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_510E37
mov	[ebp+var_5C], 1
jmp	short loc_510E3E

loc_510E37:
mov	[ebp+var_5C], 0

loc_510E3E:
movzx	ecx, byte ptr [ebp+var_5C]
test	ecx, ecx
jz	short loc_510E76
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [edx+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_11], dl
lea	eax, [ebp+var_11]
push	eax
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_58]
call	sub_510E10
jmp	loc_510FE4

loc_510E76:
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_4], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_510F52
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_4]
shl	edx, 3
mov	eax, [ebp+var_58]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_58]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_58]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_13], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
shl	eax, 3
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*8]
sub	eax, [ebp+var_30]
sar	eax, 3
mov	[ebp+var_2C], eax
jmp	short loc_510F35

loc_510F23:
mov	ecx, [ebp+var_30]
add	ecx, 8
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_510F35:
cmp	[ebp+var_2C], 0
jle	short loc_510F4D
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
jmp	short loc_510F23

loc_510F4D:
jmp	loc_510FE4

loc_510F52:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
push	edx
call	sub_51EEE0
add	esp, 0Ch
mov	ecx, [ebp+var_58]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_14], dl
mov	eax, [ebp+var_58]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_58]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_58]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_54]
sar	edx, 3
mov	[ebp+var_50], edx
jmp	short loc_510FCC

loc_510FBA:
mov	eax, [ebp+var_54]
add	eax, 8
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_50]
sub	ecx, 1
mov	[ebp+var_50], ecx

loc_510FCC:
cmp	[ebp+var_50], 0
jle	short loc_510FE4
mov	edx, [ebp+var_54]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
jmp	short loc_510FBA

loc_510FE4:
mov	esp, ebp
pop	ebp
retn	10h
sub_510E10 endp

align 10h


; Attributes: bp-based frame

sub_510FF0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_511017
mov	edx, [ebp+var_68]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_511017
mov	[ebp+var_6C], 1
jmp	short loc_51101E

loc_511017:
mov	[ebp+var_6C], 0

loc_51101E:
movzx	ecx, byte ptr [ebp+var_6C]
test	ecx, ecx
jz	short loc_511062
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [edx+4]
mov	[ebp+var_14], ecx
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_19]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_510FF0
jmp	loc_511227

loc_511062:
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_51114A
xor	eax, eax
mov	[ebp+var_1A], al
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_4]
shl	edx, 4
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+arg_4]
shl	edx, 4
mov	eax, [ebp+var_68]
add	edx, [eax+4]
mov	ecx, [ebp+var_68]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_1B], dl
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 4
mov	edx, [ebp+var_8]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A290
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_4]
shl	edx, 4
add	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
sar	edx, 4
mov	[ebp+var_34], edx
jmp	short loc_511121

loc_51110F:
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_34]
sub	ecx, 1
mov	[ebp+var_34], ecx

loc_511121:
cmp	[ebp+var_34], 0
jle	short loc_511145
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	short loc_51110F

loc_511145:
jmp	loc_511227

loc_51114A:
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
shl	edx, 4
add	edx, [ebp+var_54]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_54]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_3C]
sub	ecx, [ebp+var_54]
sar	ecx, 4
mov	[ebp+var_48], ecx
jmp	short loc_511188

loc_511176:
mov	edx, [ebp+var_48]
sub	edx, 1
mov	[ebp+var_48], edx
mov	eax, [ebp+var_44]
add	eax, 10h
mov	[ebp+var_44], eax

loc_511188:
cmp	[ebp+var_48], 0
jle	short loc_5111A0
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_44]
push	edx		; void *
call	sub_5F1820
add	esp, 8
jmp	short loc_511176

loc_5111A0:
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_3C]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_1C], dl
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_4]
shl	edx, 4
mov	eax, [ebp+var_68]
add	edx, [eax+4]
mov	ecx, [ebp+var_68]
mov	[ecx+4], edx
mov	edx, [ebp+arg_0]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_64]
sar	eax, 4
mov	[ebp+var_60], eax
jmp	short loc_511203

loc_5111F1:
mov	ecx, [ebp+var_64]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_60]
sub	edx, 1
mov	[ebp+var_60], edx

loc_511203:
cmp	[ebp+var_60], 0
jle	short loc_511227
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_64]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
jmp	short loc_5111F1

loc_511227:
mov	esp, ebp
pop	ebp
retn	10h
sub_510FF0 endp

align 10h


; Attributes: bp-based frame

sub_511230 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_35=	word ptr -35h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_511257
mov	edx, [ebp+var_6C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_511257
mov	[ebp+var_70], 1
jmp	short loc_51125E

loc_511257:
mov	[ebp+var_70], 0

loc_51125E:
movzx	ecx, byte ptr [ebp+var_70]
test	ecx, ecx
jz	short loc_51129C
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_30]
call	sub_403400
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_511230
lea	ecx, [ebp+var_30]
call	sub_407E50
jmp	loc_511339

loc_51129C:
mov	edx, [ebp+var_6C]
mov	eax, [edx+4]
sub	eax, 28h
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
add	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
jmp	short loc_5112C8

loc_5112B6:
mov	edx, [ebp+var_4]
sub	edx, 28h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
sub	eax, 28h
mov	[ebp+var_8], eax

loc_5112C8:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_0]
jb	short loc_511301
xor	edx, edx
mov	byte ptr [ebp+var_35+1], dl
mov	al, byte ptr [ebp+var_35+1]
mov	[ebp+var_32], al
xor	ecx, ecx
mov	byte ptr [ebp+var_35], cl
mov	dl, byte ptr [ebp+var_35]
mov	[ebp+var_33], dl
lea	eax, [ebp+var_33]
push	eax
mov	ecx, [ebp+var_8]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_44C1E0
add	esp, 0Ch
xor	eax, eax
mov	[ebp+var_5D], al
jmp	short loc_5112B6

loc_511301:
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
add	ecx, [ebp+arg_0]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_44FA00
add	esp, 14h
mov	eax, [ebp+arg_4]
imul	eax, 28h
mov	ecx, [ebp+var_6C]
add	eax, [ecx+4]
mov	edx, [ebp+var_6C]
mov	[edx+4], eax

loc_511339:
mov	esp, ebp
pop	ebp
retn	10h
sub_511230 endp

align 10h


; Attributes: bp-based frame

sub_511340 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_511367
mov	edx, [ebp+var_54]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_511367
mov	[ebp+var_58], 1
jmp	short loc_51136E

loc_511367:
mov	[ebp+var_58], 0

loc_51136E:
movzx	ecx, byte ptr [ebp+var_58]
test	ecx, ecx
jz	short loc_5113A4
mov	edx, [ebp+arg_8]
movss	xmm0, dword ptr	[edx]
movss	[ebp+var_C], xmm0
xor	eax, eax
mov	[ebp+var_D], al
lea	ecx, [ebp+var_D]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_54]
call	sub_511340
jmp	loc_511506

loc_5113A4:
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jbe	loc_51147A
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_4]
shl	eax, 2
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
sub	edx, eax
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_4]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_54]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_F], dl
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_8]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A290
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*4]
sub	ecx, [ebp+var_2C]
sar	ecx, 2
mov	[ebp+var_28], ecx
jmp	short loc_511463

loc_511451:
mov	edx, [ebp+var_2C]
add	edx, 4
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_28]
sub	eax, 1
mov	[ebp+var_28], eax

loc_511463:
cmp	[ebp+var_28], 0
jle	short loc_511475
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
jmp	short loc_511451

loc_511475:
jmp	loc_511506

loc_51147A:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
push	eax
call	sub_51F310
add	esp, 0Ch
mov	ecx, [ebp+var_54]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_10], dl
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_54]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_54]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_50]
sar	edx, 2
mov	[ebp+var_4C], edx
jmp	short loc_5114F4

loc_5114E2:
mov	eax, [ebp+var_50]
add	eax, 4
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_4C]
sub	ecx, 1
mov	[ebp+var_4C], ecx

loc_5114F4:
cmp	[ebp+var_4C], 0
jle	short loc_511506
mov	edx, [ebp+var_50]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
jmp	short loc_5114E2

loc_511506:
mov	esp, ebp
pop	ebp
retn	10h
sub_511340 endp

align 10h


; Attributes: bp-based frame

sub_511510 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_8]
sar	ecx, 2
mov	[ebp+var_4], ecx
jmp	short loc_511533

loc_51152A:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_511533:
cmp	[ebp+var_4], 0
jle	loc_511626
mov	eax, [ebp+arg_4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
sub	ecx, 1
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
movzx	eax, byte ptr [edx]
push	eax
call	[ebp+arg_C]
add	esp, 4
test	eax, eax
jz	short loc_51156D
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
jmp	loc_5116F0

loc_51156D:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax]
push	ecx
call	[ebp+arg_C]
add	esp, 4
test	eax, eax
jz	short loc_5115A6
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	loc_5116F0

loc_5115A6:
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 1
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx]
push	edx
call	[ebp+arg_C]
add	esp, 4
test	eax, eax
jz	short loc_5115DF
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
jmp	loc_5116F0

loc_5115DF:
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 1
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
movzx	eax, byte ptr [edx]
push	eax
call	[ebp+arg_C]
add	esp, 4
test	eax, eax
jz	short loc_511618
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
jmp	loc_5116F0

loc_511618:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax
jmp	loc_51152A

loc_511626:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
sub	edx, [ebp+arg_8]
mov	[ebp+var_2C], edx
cmp	[ebp+var_2C], 1
jz	short loc_5116B8
cmp	[ebp+var_2C], 2
jz	short loc_511682
cmp	[ebp+var_2C], 3
jz	short loc_51164C
jmp	loc_5116E5

loc_51164C:
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
sub	ecx, 1
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
movzx	eax, byte ptr [edx]
push	eax
call	[ebp+arg_C]
add	esp, 4
test	eax, eax
jz	short loc_511679
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
jmp	short loc_5116F0

loc_511679:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_511682:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
sub	edx, 1
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
movzx	ecx, byte ptr [eax]
push	ecx
call	[ebp+arg_C]
add	esp, 4
test	eax, eax
jz	short loc_5116AF
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_5116F0

loc_5116AF:
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_5116B8:
mov	edx, [ebp+arg_4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
sub	eax, 1
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
movzx	edx, byte ptr [ecx]
push	edx
call	[ebp+arg_C]
add	esp, 4
test	eax, eax
jz	short loc_5116E5
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_5116F0

loc_5116E5:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	eax, [ebp+arg_0]

loc_5116F0:
mov	esp, ebp
pop	ebp
retn
sub_511510 endp

align 10h


; Attributes: bp-based frame

sub_511700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_51171D

loc_511714:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_51171D:
cmp	[ebp+var_4], 0
jle	loc_5117C8
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
push	eax
lea	ecx, [ebp+arg_8]
call	sub_F58C90
movzx	ecx, al
test	ecx, ecx
jz	short loc_511745
mov	eax, [ebp+arg_0]
jmp	loc_51184B

loc_511745:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
push	ecx
lea	ecx, [ebp+arg_8]
call	sub_F58C90
movzx	edx, al
test	edx, edx
jz	short loc_51176C
mov	eax, [ebp+arg_0]
jmp	loc_51184B

loc_51176C:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
push	edx
lea	ecx, [ebp+arg_8]
call	sub_F58C90
movzx	eax, al
test	eax, eax
jz	short loc_511793
mov	eax, [ebp+arg_0]
jmp	loc_51184B

loc_511793:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
push	eax
lea	ecx, [ebp+arg_8]
call	sub_F58C90
movzx	ecx, al
test	ecx, ecx
jz	short loc_5117BA
mov	eax, [ebp+arg_0]
jmp	loc_51184B

loc_5117BA:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx
jmp	loc_511714

loc_5117C8:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 1
jz	short loc_51182D
cmp	[ebp+var_8], 2
jz	short loc_511809
cmp	[ebp+var_8], 3
jz	short loc_5117E5
jmp	short loc_511848

loc_5117E5:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
push	edx
lea	ecx, [ebp+arg_8]
call	sub_F58C90
movzx	eax, al
test	eax, eax
jz	short loc_511800
mov	eax, [ebp+arg_0]
jmp	short loc_51184B

loc_511800:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx

loc_511809:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
push	eax
lea	ecx, [ebp+arg_8]
call	sub_F58C90
movzx	ecx, al
test	ecx, ecx
jz	short loc_511824
mov	eax, [ebp+arg_0]
jmp	short loc_51184B

loc_511824:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx

loc_51182D:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
push	ecx
lea	ecx, [ebp+arg_8]
call	sub_F58C90
movzx	edx, al
test	edx, edx
jz	short loc_511848
mov	eax, [ebp+arg_0]
jmp	short loc_51184B

loc_511848:
mov	eax, [ebp+arg_4]

loc_51184B:
mov	esp, ebp
pop	ebp
retn
sub_511700 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_511850(void *)
sub_511850 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_4FF590
xor	ecx, ecx
and	ecx, 1
jz	short loc_511879
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_511879:
mov	esp, ebp
pop	ebp
retn
sub_511850 endp

align 10h


; Attributes: bp-based frame

sub_511880 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_50FD40
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_511880 endp

align 10h


; Attributes: bp-based frame

sub_511980 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_5119F0:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_511BB7
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_511A6A

loc_511A5A:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_511A6A:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_511AE6
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_511AE6
jmp	loc_511A5A

loc_511AE6:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_51DA40
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_5119F0

loc_511BB7:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_502C00
mov	esp, ebp
pop	ebp
retn	4
sub_511980 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_511C20(void *)
sub_511C20 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_4FF5D0
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_511C51
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_511C51:
mov	esp, ebp
pop	ebp
retn
sub_511C20 endp

align 10h


; Attributes: bp-based frame

sub_511C60 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_50FD80
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_511C60 endp

align 10h


; Attributes: bp-based frame

sub_511D60 proc	near

var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F4h
mov	[ebp+var_F0], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F0]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_511DD0:
mov	edx, [ebp+var_F0]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_511F89
mov	edx, [ebp+var_F0]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
push	edx
call	sub_5296E0
add	esp, 4
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
jmp	short loc_511E4B

loc_511E3B:
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_20], ecx

loc_511E4B:
lea	edx, [ebp+var_70]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_68]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_70]
setnz	cl
mov	[ebp+var_F1], cl
movzx	edx, [ebp+var_F1]
test	edx, edx
jz	short loc_511EB8
mov	eax, [ebp+var_2C]
add	eax, 4
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
call	sub_441C20
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_511EB8
jmp	short loc_511E3B

loc_511EB8:
mov	ecx, [ebp+var_24]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_90], eax
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_28], edx
push	ecx
mov	[ebp+var_98], esp
mov	eax, [ebp+var_20]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
push	ecx
mov	[ebp+var_9C], esp
mov	eax, [ebp+var_F0]
add	eax, 4
mov	ecx, [ebp+var_9C]
mov	[ecx], eax
mov	edx, [ebp+var_F0]
add	edx, 4
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	eax, [ebp+var_28]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
lea	ecx, [ebp+var_C]
call	sub_51DB30
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_24]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_511DD0

loc_511F89:
mov	eax, [ebp+var_F0]
add	eax, 4
mov	[ebp+var_E4], eax
xor	ecx, ecx
mov	[ebp+var_DA], cl
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E4]
mov	[edx], ecx
mov	eax, [ebp+var_E0]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_502C20
mov	esp, ebp
pop	ebp
retn	4
sub_511D60 endp

align 10h


; Attributes: bp-based frame

sub_511FF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_51F840
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_51F550
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_511FF0 endp

align 10h


; Attributes: bp-based frame

sub_512030 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_68]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_51F8D0
mov	edx, [ebp+var_68]
mov	[ebp+var_64], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_64]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_512030 endp



; Attributes: bp-based frame

sub_512060 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_512234
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5120C9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_51FB30
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51250B

loc_5120C9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_512112
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	loc_51250B
jmp	loc_51222F

loc_512112:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_512144
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51250B

loc_512144:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_51218E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	loc_51250B

loc_51218E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_512204
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5121DD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	loc_51250B
jmp	short loc_512202

loc_5121DD:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	loc_51250B

loc_512202:
jmp	short loc_51222F

loc_512204:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_51FB30
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51250B

loc_51222F:
jmp	loc_51250B

loc_512234:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5122C5
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_512295
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	loc_51250B
jmp	short loc_5122C0

loc_512295:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_51FB30
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51250B

loc_5122C0:
jmp	loc_51250B

loc_5122C5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_51232F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_51232F
mov	[ebp+var_C4], 1
jmp	short loc_512339

loc_51232F:
mov	[ebp+var_C4], 0

loc_512339:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51234E
and	[ebp+var_4C], 0FFFFFFFEh

loc_51234E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5123B0
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_512386
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	loc_51250B
jmp	short loc_5123AB

loc_512386:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	loc_51250B

loc_5123AB:
jmp	loc_51250B

loc_5123B0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5123FD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5123FD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_512449
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_512449
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_51243D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_512449

loc_51243D:
mov	[ebp+var_C8], 1
jmp	short loc_512453

loc_512449:
mov	[ebp+var_C8], 0

loc_512453:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_512468
and	[ebp+var_4C], 0FFFFFFFDh

loc_512468:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5124C1
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51249D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	short loc_51250B
jmp	short loc_5124BF

loc_51249D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_51F9F0
mov	eax, [ebp+arg_0]
jmp	short loc_51250B

loc_5124BF:
jmp	short loc_51250B

loc_5124C1:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5124DF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51250B
jmp	short loc_51250B

loc_5124DF:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_51FB30
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51250B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_512060 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_512520(void *)
sub_512520 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_4FEFD0
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_512551
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_512551:
mov	esp, ebp
pop	ebp
retn
sub_512520 endp

align 10h


; Attributes: bp-based frame

sub_512560 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_50FDC0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_512560 endp

align 10h


; Attributes: bp-based frame

sub_512660 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:flt_15AACC4
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_5126C8
jmp	loc_5127B9

loc_5126C8:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_51273C
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_51273A
jmp	short loc_5127B9

loc_51273A:
jmp	short loc_512748

loc_51273C:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_512748
jmp	short loc_5127B9

loc_512748:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_5127AB
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_5127A0
jmp	short loc_5127AB

loc_5127A0:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_512748

loc_5127AB:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_5127C0

loc_5127B9:
mov	esp, ebp
pop	ebp
retn
sub_512660 endp

align 10h


; Attributes: bp-based frame

sub_5127C0 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_512830:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5129F7
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_5128AA

loc_51289A:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_5128AA:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_512926
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_512926
jmp	loc_51289A

loc_512926:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_51DC20
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_512830

loc_5129F7:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_502CD0
mov	esp, ebp
pop	ebp
retn	4
sub_5127C0 endp

align 10h


; Attributes: bp-based frame

sub_512A60 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_512AA7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51DD10
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_512B5A

loc_512AA7:
cmp	[ebp+arg_10], 0
jnz	short loc_512ADF
cmp	[ebp+arg_C], 0
jnz	short loc_512AD6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_512ADF

loc_512AD6:
mov	[ebp+var_34], 1
jmp	short loc_512AE6

loc_512ADF:
mov	[ebp+var_34], 0

loc_512AE6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_512AF8
and	[ebp+var_C], 0FFFFFFFEh

loc_512AF8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_512B2E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_51DD10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_512B2C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_512B2C:
jmp	short loc_512B5A

loc_512B2E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51DD10
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_512B5A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_512B5A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_512A60 endp

align 10h


; Attributes: bp-based frame

sub_512BA0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_512BE7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_50F8A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_512C97

loc_512BE7:
cmp	[ebp+arg_10], 0
jnz	short loc_512C1C
cmp	[ebp+arg_C], 0
jnz	short loc_512C13
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_F5A2E0
movzx	ecx, al
test	ecx, ecx
jz	short loc_512C1C

loc_512C13:
mov	[ebp+var_34], 1
jmp	short loc_512C23

loc_512C1C:
mov	[ebp+var_34], 0

loc_512C23:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_512C35
and	[ebp+var_C], 0FFFFFFFEh

loc_512C35:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_512C6B
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_50F8A0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_512C69
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_512C69:
jmp	short loc_512C97

loc_512C6B:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_50F8A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_512C97
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_512C97:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_512BA0 endp

align 10h


; Attributes: bp-based frame

sub_512CE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_14]
call	sub_44D480
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_512D36
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_512CE0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_512D36:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_512D45:
cmp	[ebp+arg_0], 0
jz	short loc_512DB2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_14]
call	sub_44D480
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_512DA1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_14]
call	sub_512CE0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_512DA1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_512D45

loc_512DB2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_512CE0 endp

align 10h


; Attributes: bp-based frame

sub_512DC0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_50FF40
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_512DC0 endp

align 10h


; Attributes: bp-based frame

sub_512EC0 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:flt_15AACC4
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_512F28
jmp	loc_513019

loc_512F28:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_512F9C
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_512F9A
jmp	short loc_513019

loc_512F9A:
jmp	short loc_512FA8

loc_512F9C:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_512FA8
jmp	short loc_513019

loc_512FA8:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_51300B
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_513000
jmp	short loc_51300B

loc_513000:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_512FA8

loc_51300B:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_513020

loc_513019:
mov	esp, ebp
pop	ebp
retn
sub_512EC0 endp

align 10h


; Attributes: bp-based frame

sub_513020 proc	near

var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_F0], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F0]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_513090:
mov	edx, [ebp+var_F0]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_51328B
mov	edx, [ebp+var_F0]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
jmp	short loc_513104

loc_5130F4:
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_20], ecx

loc_513104:
lea	edx, [ebp+var_70]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_68]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_70]
setnz	cl
mov	[ebp+var_F1], cl
movzx	edx, [ebp+var_F1]
test	edx, edx
jz	loc_5131BA
mov	eax, [ebp+var_2C]
add	eax, 8
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_7C]
mov	[ebp+var_F8], ecx
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_F8]
mov	ecx, [ebp+var_FC]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_5131A0
mov	eax, [ebp+var_F8]
mov	ecx, [ebp+var_FC]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_5131A0
mov	[ebp+var_100], 1
jmp	short loc_5131AA

loc_5131A0:
mov	[ebp+var_100], 0

loc_5131AA:
movzx	eax, byte ptr [ebp+var_100]
test	eax, eax
jz	short loc_5131BA
jmp	loc_5130F4

loc_5131BA:
mov	ecx, [ebp+var_24]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_90], eax
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_28], edx
push	ecx
mov	[ebp+var_98], esp
mov	eax, [ebp+var_20]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
push	ecx
mov	[ebp+var_9C], esp
mov	eax, [ebp+var_F0]
add	eax, 4
mov	ecx, [ebp+var_9C]
mov	[ecx], eax
mov	edx, [ebp+var_F0]
add	edx, 4
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	eax, [ebp+var_28]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
lea	ecx, [ebp+var_C]
call	sub_51DD60
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_24]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_513090

loc_51328B:
mov	eax, [ebp+var_F0]
add	eax, 4
mov	[ebp+var_E4], eax
xor	ecx, ecx
mov	[ebp+var_DA], cl
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E4]
mov	[edx], ecx
mov	eax, [ebp+var_E0]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_502CF0
mov	esp, ebp
pop	ebp
retn	4
sub_513020 endp

align 10h


; Attributes: bp-based frame

sub_5132F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5070E0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_506AB0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 8
mov	esp, ebp
pop	ebp
retn	4
sub_5132F0 endp

align 10h


; Attributes: bp-based frame

sub_513330 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51351F
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_513399
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_51FE00
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_513821

loc_513399:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_5133E7
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	loc_513821
jmp	loc_51351A

loc_5133E7:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_51341E
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_513821

loc_51341E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_513468
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	loc_513821

loc_513468:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5134E9
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5134C2
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	loc_513821
jmp	short loc_5134E7

loc_5134C2:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	loc_513821

loc_5134E7:
jmp	short loc_51351A

loc_5134E9:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_51FE00
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_513821

loc_51351A:
jmp	loc_513821

loc_51351F:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_5135C1
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_51358B
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	loc_513821
jmp	short loc_5135BC

loc_51358B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_51FE00
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_513821

loc_5135BC:
jmp	loc_513821

loc_5135C1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_51363B
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_51363B
mov	[ebp+var_15C], 1
jmp	short loc_513645

loc_51363B:
mov	[ebp+var_15C], 0

loc_513645:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51365A
and	[ebp+var_4C], 0FFFFFFFEh

loc_51365A:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5136BC
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_513692
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	loc_513821
jmp	short loc_5136B7

loc_513692:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	loc_513821

loc_5136B7:
jmp	loc_513821

loc_5136BC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51370E
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_51370E:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_51375F
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_51375F
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_513753
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_51375F

loc_513753:
mov	[ebp+var_160], 1
jmp	short loc_513769

loc_51375F:
mov	[ebp+var_160], 0

loc_513769:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_51377E
and	[ebp+var_4C], 0FFFFFFFDh

loc_51377E:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5137D7
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5137B3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	short loc_513821
jmp	short loc_5137D5

loc_5137B3:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_51FCC0
mov	eax, [ebp+arg_0]
jmp	short loc_513821

loc_5137D5:
jmp	short loc_513821

loc_5137D7:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5137F5
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_513821
jmp	short loc_513821

loc_5137F5:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_51FE00
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_513821:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_513330 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_513830(void *)
sub_513830 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_46B570
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_51385F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51385F:
mov	esp, ebp
pop	ebp
retn
sub_513830 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_513870(void *)
sub_513870 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_50F410
xor	ecx, ecx
and	ecx, 1
jz	short loc_513899
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_513899:
mov	esp, ebp
pop	ebp
retn
sub_513870 endp

align 10h


; Attributes: bp-based frame

sub_5138A0 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:flt_15AACC4
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_513908
jmp	loc_5139F9

loc_513908:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_51397C
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_51397A
jmp	short loc_5139F9

loc_51397A:
jmp	short loc_513988

loc_51397C:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_513988
jmp	short loc_5139F9

loc_513988:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_5139EB
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_5139E0
jmp	short loc_5139EB

loc_5139E0:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_513988

loc_5139EB:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_520380

loc_5139F9:
mov	esp, ebp
pop	ebp
retn
sub_5138A0 endp

align 10h


; Attributes: bp-based frame

sub_513A00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5202F0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_51FFC0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 8
mov	esp, ebp
pop	ebp
retn	4
sub_513A00 endp

align 10h


; Attributes: bp-based frame

sub_513A40 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_513CF5
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_513AA9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5076F0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_514147

loc_513AA9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_513AF8
jb	short loc_513AEC
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_513AF8

loc_513AEC:
mov	[ebp+var_AC], 1
jmp	short loc_513B02

loc_513AF8:
mov	[ebp+var_AC], 0

loc_513B02:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_513B3D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	loc_514147
jmp	loc_513CF0

loc_513B3D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_513B8C
jb	short loc_513B80
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_513B8C

loc_513B80:
mov	[ebp+var_B8], 1
jmp	short loc_513B96

loc_513B8C:
mov	[ebp+var_B8], 0

loc_513B96:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_513BBA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_514147

loc_513BBA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_513C04
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	loc_514147

loc_513C04:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_513C53
jb	short loc_513C47
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_513C53

loc_513C47:
mov	[ebp+var_C4], 1
jmp	short loc_513C5D

loc_513C53:
mov	[ebp+var_C4], 0

loc_513C5D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_513CC5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_513C9E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	loc_514147
jmp	short loc_513CC3

loc_513C9E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	loc_514147

loc_513CC3:
jmp	short loc_513CF0

loc_513CC5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5076F0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_514147

loc_513CF0:
jmp	loc_514147

loc_513CF5:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_513DD1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_513D59
jb	short loc_513D4D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_513D59

loc_513D4D:
mov	[ebp+var_D0], 1
jmp	short loc_513D63

loc_513D59:
mov	[ebp+var_D0], 0

loc_513D63:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_513DA1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	loc_514147
jmp	short loc_513DCC

loc_513DA1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5076F0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_514147

loc_513DCC:
jmp	loc_514147

loc_513DD1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_513E3A
jb	short loc_513E2E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_513E3A

loc_513E2E:
mov	[ebp+var_DC], 1
jmp	short loc_513E44

loc_513E3A:
mov	[ebp+var_DC], 0

loc_513E44:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_513ECF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_513EAE
jb	short loc_513EA2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_513EAE

loc_513EA2:
mov	[ebp+var_E8], 1
jmp	short loc_513EB8

loc_513EAE:
mov	[ebp+var_E8], 0

loc_513EB8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_513ECF
mov	[ebp+var_EC], 1
jmp	short loc_513ED9

loc_513ECF:
mov	[ebp+var_EC], 0

loc_513ED9:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_513EEE
and	[ebp+var_4C], 0FFFFFFFEh

loc_513EEE:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_513F50
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_513F26
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	loc_514147
jmp	short loc_513F4B

loc_513F26:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	loc_514147

loc_513F4B:
jmp	loc_514147

loc_513F50:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_513FE8
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_513FD5
jb	short loc_513FC9
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_513FD5

loc_513FC9:
mov	[ebp+var_F8], 1
jmp	short loc_513FDF

loc_513FD5:
mov	[ebp+var_F8], 0

loc_513FDF:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_513FE8:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_514085
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_514085
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_514079
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_514064
jb	short loc_514058
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_514064

loc_514058:
mov	[ebp+var_104], 1
jmp	short loc_51406E

loc_514064:
mov	[ebp+var_104], 0

loc_51406E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_514085

loc_514079:
mov	[ebp+var_108], 1
jmp	short loc_51408F

loc_514085:
mov	[ebp+var_108], 0

loc_51408F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5140A4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5140A4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5140FD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5140D9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	short loc_514147
jmp	short loc_5140FB

loc_5140D9:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_519FB0
mov	eax, [ebp+arg_0]
jmp	short loc_514147

loc_5140FB:
jmp	short loc_514147

loc_5140FD:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_51411B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_514147
jmp	short loc_514147

loc_51411B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5076F0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_514147:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_513A40 endp

align 10h


; Attributes: bp-based frame

sub_514150 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_514197
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51DE50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_514274

loc_514197:
cmp	[ebp+arg_10], 0
jnz	short loc_5141F9
cmp	[ebp+arg_C], 0
jnz	short loc_5141F0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5141E1
jb	short loc_5141D8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5141E1

loc_5141D8:
mov	[ebp+var_3C], 1
jmp	short loc_5141E8

loc_5141E1:
mov	[ebp+var_3C], 0

loc_5141E8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5141F9

loc_5141F0:
mov	[ebp+var_40], 1
jmp	short loc_514200

loc_5141F9:
mov	[ebp+var_40], 0

loc_514200:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_514212
and	[ebp+var_C], 0FFFFFFFEh

loc_514212:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_514248
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51DE50
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_514246
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_514246:
jmp	short loc_514274

loc_514248:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51DE50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_514274
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_514274:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_514150 endp

align 10h


; Attributes: bp-based frame

sub_5142C0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_514575
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_514329
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_507B60
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5149C7

loc_514329:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_514378
jb	short loc_51436C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_514378

loc_51436C:
mov	[ebp+var_AC], 1
jmp	short loc_514382

loc_514378:
mov	[ebp+var_AC], 0

loc_514382:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5143BD
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	loc_5149C7
jmp	loc_514570

loc_5143BD:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_51440C
jb	short loc_514400
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_51440C

loc_514400:
mov	[ebp+var_B8], 1
jmp	short loc_514416

loc_51440C:
mov	[ebp+var_B8], 0

loc_514416:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_51443A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5149C7

loc_51443A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_514484
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	loc_5149C7

loc_514484:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5144D3
jb	short loc_5144C7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5144D3

loc_5144C7:
mov	[ebp+var_C4], 1
jmp	short loc_5144DD

loc_5144D3:
mov	[ebp+var_C4], 0

loc_5144DD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_514545
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51451E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	loc_5149C7
jmp	short loc_514543

loc_51451E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	loc_5149C7

loc_514543:
jmp	short loc_514570

loc_514545:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_507B60
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5149C7

loc_514570:
jmp	loc_5149C7

loc_514575:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_514651
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5145D9
jb	short loc_5145CD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5145D9

loc_5145CD:
mov	[ebp+var_D0], 1
jmp	short loc_5145E3

loc_5145D9:
mov	[ebp+var_D0], 0

loc_5145E3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_514621
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	loc_5149C7
jmp	short loc_51464C

loc_514621:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_507B60
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5149C7

loc_51464C:
jmp	loc_5149C7

loc_514651:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5146BA
jb	short loc_5146AE
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5146BA

loc_5146AE:
mov	[ebp+var_DC], 1
jmp	short loc_5146C4

loc_5146BA:
mov	[ebp+var_DC], 0

loc_5146C4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_51474F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_51472E
jb	short loc_514722
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_51472E

loc_514722:
mov	[ebp+var_E8], 1
jmp	short loc_514738

loc_51472E:
mov	[ebp+var_E8], 0

loc_514738:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_51474F
mov	[ebp+var_EC], 1
jmp	short loc_514759

loc_51474F:
mov	[ebp+var_EC], 0

loc_514759:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_51476E
and	[ebp+var_4C], 0FFFFFFFEh

loc_51476E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5147D0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5147A6
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	loc_5149C7
jmp	short loc_5147CB

loc_5147A6:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	loc_5149C7

loc_5147CB:
jmp	loc_5149C7

loc_5147D0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_514868
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_514855
jb	short loc_514849
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_514855

loc_514849:
mov	[ebp+var_F8], 1
jmp	short loc_51485F

loc_514855:
mov	[ebp+var_F8], 0

loc_51485F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_514868:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_514905
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_514905
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5148F9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5148E4
jb	short loc_5148D8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5148E4

loc_5148D8:
mov	[ebp+var_104], 1
jmp	short loc_5148EE

loc_5148E4:
mov	[ebp+var_104], 0

loc_5148EE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_514905

loc_5148F9:
mov	[ebp+var_108], 1
jmp	short loc_51490F

loc_514905:
mov	[ebp+var_108], 0

loc_51490F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_514924
and	[ebp+var_4C], 0FFFFFFFDh

loc_514924:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_51497D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_514959
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	short loc_5149C7
jmp	short loc_51497B

loc_514959:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_514150
mov	eax, [ebp+arg_0]
jmp	short loc_5149C7

loc_51497B:
jmp	short loc_5149C7

loc_51497D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_51499B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5149C7
jmp	short loc_5149C7

loc_51499B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_507B60
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5149C7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5142C0 endp

align 10h


; Attributes: bp-based frame

sub_5149D0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_514C85
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_514A39
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5207C0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5150D7

loc_514A39:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_514A88
jb	short loc_514A7C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_514A88

loc_514A7C:
mov	[ebp+var_AC], 1
jmp	short loc_514A92

loc_514A88:
mov	[ebp+var_AC], 0

loc_514A92:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_514ACD
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	loc_5150D7
jmp	loc_514C80

loc_514ACD:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_514B1C
jb	short loc_514B10
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_514B1C

loc_514B10:
mov	[ebp+var_B8], 1
jmp	short loc_514B26

loc_514B1C:
mov	[ebp+var_B8], 0

loc_514B26:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_514B4A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5150D7

loc_514B4A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_514B94
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	loc_5150D7

loc_514B94:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_514BE3
jb	short loc_514BD7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_514BE3

loc_514BD7:
mov	[ebp+var_C4], 1
jmp	short loc_514BED

loc_514BE3:
mov	[ebp+var_C4], 0

loc_514BED:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_514C55
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_514C2E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	loc_5150D7
jmp	short loc_514C53

loc_514C2E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	loc_5150D7

loc_514C53:
jmp	short loc_514C80

loc_514C55:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5207C0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5150D7

loc_514C80:
jmp	loc_5150D7

loc_514C85:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_514D61
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_514CE9
jb	short loc_514CDD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_514CE9

loc_514CDD:
mov	[ebp+var_D0], 1
jmp	short loc_514CF3

loc_514CE9:
mov	[ebp+var_D0], 0

loc_514CF3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_514D31
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	loc_5150D7
jmp	short loc_514D5C

loc_514D31:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5207C0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5150D7

loc_514D5C:
jmp	loc_5150D7

loc_514D61:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_514DCA
jb	short loc_514DBE
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_514DCA

loc_514DBE:
mov	[ebp+var_DC], 1
jmp	short loc_514DD4

loc_514DCA:
mov	[ebp+var_DC], 0

loc_514DD4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_514E5F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_514E3E
jb	short loc_514E32
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_514E3E

loc_514E32:
mov	[ebp+var_E8], 1
jmp	short loc_514E48

loc_514E3E:
mov	[ebp+var_E8], 0

loc_514E48:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_514E5F
mov	[ebp+var_EC], 1
jmp	short loc_514E69

loc_514E5F:
mov	[ebp+var_EC], 0

loc_514E69:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_514E7E
and	[ebp+var_4C], 0FFFFFFFEh

loc_514E7E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_514EE0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_514EB6
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	loc_5150D7
jmp	short loc_514EDB

loc_514EB6:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	loc_5150D7

loc_514EDB:
jmp	loc_5150D7

loc_514EE0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_514F78
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_514F65
jb	short loc_514F59
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_514F65

loc_514F59:
mov	[ebp+var_F8], 1
jmp	short loc_514F6F

loc_514F65:
mov	[ebp+var_F8], 0

loc_514F6F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_514F78:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_515015
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_515015
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_515009
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_514FF4
jb	short loc_514FE8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_514FF4

loc_514FE8:
mov	[ebp+var_104], 1
jmp	short loc_514FFE

loc_514FF4:
mov	[ebp+var_104], 0

loc_514FFE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_515015

loc_515009:
mov	[ebp+var_108], 1
jmp	short loc_51501F

loc_515015:
mov	[ebp+var_108], 0

loc_51501F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_515034
and	[ebp+var_4C], 0FFFFFFFDh

loc_515034:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_51508D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_515069
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	short loc_5150D7
jmp	short loc_51508B

loc_515069:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_520650
mov	eax, [ebp+arg_0]
jmp	short loc_5150D7

loc_51508B:
jmp	short loc_5150D7

loc_51508D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5150AB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5150D7
jmp	short loc_5150D7

loc_5150AB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5207C0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5150D7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5149D0 endp

align 10h


; Attributes: bp-based frame

sub_5150E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_520DE0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_520AF0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_5150E0 endp

align 10h


; Attributes: bp-based frame

sub_515120 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_515167
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_51DEA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51521B

loc_515167:
cmp	[ebp+arg_10], 0
jnz	short loc_5151A0
cmp	[ebp+arg_C], 0
jnz	short loc_515197
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5151A0

loc_515197:
mov	[ebp+var_44], 1
jmp	short loc_5151A7

loc_5151A0:
mov	[ebp+var_44], 0

loc_5151A7:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5151B9
and	[ebp+var_C], 0FFFFFFFEh

loc_5151B9:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5151EF
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_51DEA0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5151ED
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5151ED:
jmp	short loc_51521B

loc_5151EF:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_51DEA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_51521B
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_51521B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_515120 endp

align 10h


; Attributes: bp-based frame

sub_515260 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_51DEA0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5152B6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_515260
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5152B6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5152C5:
cmp	[ebp+arg_0], 0
jz	short loc_515332
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_51DEA0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_515321
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_515260
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_515321:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5152C5

loc_515332:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_515260 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_515340(void	*)
sub_515340 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_515349:
cmp	[ebp+arg_0], 0
jz	short loc_51539C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_515340
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_520F90
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_515394
mov	edx, 1
imul	edx, 174h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_515394:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_515349

loc_51539C:
mov	esp, ebp
pop	ebp
retn	4
sub_515340 endp

align 10h


; Attributes: bp-based frame

sub_5153B0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_510080
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5153B0 endp

align 10h


; Attributes: bp-based frame

sub_5154B0 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_515520:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5156E7
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_51559A

loc_51558A:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_51559A:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_515616
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_515616
jmp	loc_51558A

loc_515616:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_51DEF0
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_515520

loc_5156E7:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_51E890
mov	esp, ebp
pop	ebp
retn	4
sub_5154B0 endp

align 10h


; Attributes: bp-based frame

sub_515750 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51593F
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5157B9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_521110
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_515C41

loc_5157B9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_515807
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	loc_515C41
jmp	loc_51593A

loc_515807:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_51583E
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_515C41

loc_51583E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_515888
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	loc_515C41

loc_515888:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_515909
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5158E2
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	loc_515C41
jmp	short loc_515907

loc_5158E2:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	loc_515C41

loc_515907:
jmp	short loc_51593A

loc_515909:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_521110
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_515C41

loc_51593A:
jmp	loc_515C41

loc_51593F:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_5159E1
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_5159AB
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	loc_515C41
jmp	short loc_5159DC

loc_5159AB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_521110
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_515C41

loc_5159DC:
jmp	loc_515C41

loc_5159E1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_515A5B
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_515A5B
mov	[ebp+var_15C], 1
jmp	short loc_515A65

loc_515A5B:
mov	[ebp+var_15C], 0

loc_515A65:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_515A7A
and	[ebp+var_4C], 0FFFFFFFEh

loc_515A7A:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_515ADC
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_515AB2
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	loc_515C41
jmp	short loc_515AD7

loc_515AB2:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	loc_515C41

loc_515AD7:
jmp	loc_515C41

loc_515ADC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_515B2E
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_515B2E:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_515B7F
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_515B7F
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_515B73
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_515B7F

loc_515B73:
mov	[ebp+var_160], 1
jmp	short loc_515B89

loc_515B7F:
mov	[ebp+var_160], 0

loc_515B89:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_515B9E
and	[ebp+var_4C], 0FFFFFFFDh

loc_515B9E:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_515BF7
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_515BD3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	short loc_515C41
jmp	short loc_515BF5

loc_515BD3:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_520FD0
mov	eax, [ebp+arg_0]
jmp	short loc_515C41

loc_515BF5:
jmp	short loc_515C41

loc_515BF7:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_515C15
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_515C41
jmp	short loc_515C41

loc_515C15:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_521110
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_515C41:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_515750 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_515C50(void *)
sub_515C50 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_10FB7C0
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_515C7F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_515C7F:
mov	esp, ebp
pop	ebp
retn
sub_515C50 endp

align 10h


; Attributes: bp-based frame

sub_515C90 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_515CD7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_51DFE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_515D8B

loc_515CD7:
cmp	[ebp+arg_10], 0
jnz	short loc_515D10
cmp	[ebp+arg_C], 0
jnz	short loc_515D07
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_515D10

loc_515D07:
mov	[ebp+var_44], 1
jmp	short loc_515D17

loc_515D10:
mov	[ebp+var_44], 0

loc_515D17:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_515D29
and	[ebp+var_C], 0FFFFFFFEh

loc_515D29:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_515D5F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_51DFE0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_515D5D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_515D5D:
jmp	short loc_515D8B

loc_515D5F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_51DFE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_515D8B
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_515D8B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_515C90 endp

align 10h


; Attributes: bp-based frame

sub_515DD0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_51E030
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A9B20
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_515E53

loc_515E4A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_515E53:
cmp	[ebp+var_40], 0
jle	short loc_515E7D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5C72C0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 30h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 30h
mov	[ebp+var_3C], eax
jmp	short loc_515E4A

loc_515E7D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_515EA4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5C72C0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 30h
mov	[ebp+var_C], ecx
jmp	short loc_515EF9

loc_515EA4:
mov	edx, [ebp+arg_C]
imul	edx, 30h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_515EDB

loc_515EC9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 30h
mov	[ebp+var_68], eax

loc_515EDB:
cmp	[ebp+var_6C], 0
jle	short loc_515EF3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5C72C0
add	esp, 8
jmp	short loc_515EC9

loc_515EF3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_515EF9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_515F91
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_515F58

loc_515F4F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_515F58:
cmp	[ebp+var_80], 0
jle	short loc_515F8B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5C72C0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 30h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 30h
mov	[ebp+var_7C], eax
jmp	short loc_515F4F

loc_515F8B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_515F91:
mov	ecx, [ebp+var_CC]
call	sub_5A8CC0
mov	edx, [ebp+var_4]
imul	edx, 30h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_515DD0 endp

align 10h


; Attributes: bp-based frame

sub_515FE0 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_BC], ecx
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_516016
mov	edx, [ebp+var_BC]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_516016
mov	[ebp+var_C0], 1
jmp	short loc_516020

loc_516016:
mov	[ebp+var_C0], 0

loc_516020:
movzx	ecx, byte ptr [ebp+var_C0]
test	ecx, ecx
jz	short loc_516075
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	ecx, [edx+4]
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_8]
add	edx, 8
push	edx
lea	ecx, [ebp+var_30]
call	sub_403400
xor	eax, eax
mov	[ebp+var_39], al
lea	ecx, [ebp+var_39]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_BC]
call	sub_515FE0
lea	ecx, [ebp+var_30]
call	sub_407E50
jmp	loc_516375

loc_516075:
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5161D8
xor	edx, edx
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_BC]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
mov	[ebp+var_54], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 30h
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_50], eax
push	0
lea	ecx, [ebp+var_3D]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
call	sub_527530
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 30h
mov	eax, [ebp+var_BC]
add	edx, [eax+4]
mov	ecx, [ebp+var_BC]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_3B], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_68], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 30h
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_60], eax
jmp	short loc_51613C

loc_516133:
mov	edx, [ebp+var_60]
sub	edx, 1
mov	[ebp+var_60], edx

loc_51613C:
cmp	[ebp+var_60], 0
jle	short loc_516178
mov	eax, [ebp+var_64]
sub	eax, 30h
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_68]
sub	ecx, 30h
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_64]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_4023E0
jmp	short loc_516133

loc_516178:
mov	edx, [ebp+arg_0]
mov	[ebp+var_74], edx
mov	eax, [ebp+arg_4]
imul	eax, 30h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_74]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_70], eax
jmp	short loc_5161A9

loc_516197:
mov	edx, [ebp+var_74]
add	edx, 30h
mov	[ebp+var_74], edx
mov	eax, [ebp+var_70]
sub	eax, 1
mov	[ebp+var_70], eax

loc_5161A9:
cmp	[ebp+var_70], 0
jle	short loc_5161D3
mov	ecx, [ebp+var_74]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_8]
add	eax, 8
push	eax
mov	ecx, [ebp+var_74]
add	ecx, 8
call	sub_4023E0
jmp	short loc_516197

loc_5161D3:
jmp	loc_516375

loc_5161D8:
mov	ecx, [ebp+var_BC]
mov	edx, [ecx+4]
mov	[ebp+var_90], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
imul	eax, 30h
add	eax, [ebp+var_90]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_90]
mov	[ebp+var_80], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_84], eax
jmp	short loc_516233

loc_51621B:
mov	edx, [ebp+var_84]
sub	edx, 1
mov	[ebp+var_84], edx
mov	eax, [ebp+var_80]
add	eax, 30h
mov	[ebp+var_80], eax

loc_516233:
cmp	[ebp+var_84], 0
jle	short loc_51624E
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_80]
push	edx		; void *
call	sub_5C72C0
add	esp, 8
jmp	short loc_51621B

loc_51624E:
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+var_78]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_3C], dl
mov	eax, [ebp+var_BC]
mov	ecx, [eax+4]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_AC]
mov	[ebp+var_98], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_A8]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_9C], eax
jmp	short loc_5162AB

loc_51629C:
mov	edx, [ebp+var_9C]
sub	edx, 1
mov	[ebp+var_9C], edx

loc_5162AB:
cmp	[ebp+var_9C], 0
jle	short loc_5162EA
mov	eax, [ebp+var_A8]
push	eax		; int
mov	ecx, [ebp+var_98]
push	ecx		; void *
call	sub_5C72C0
add	esp, 8
mov	edx, [ebp+var_A8]
add	edx, 30h
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_98]
add	eax, 30h
mov	[ebp+var_98], eax
jmp	short loc_51629C

loc_5162EA:
mov	ecx, [ebp+var_4]
imul	ecx, 30h
mov	edx, [ebp+var_BC]
add	ecx, [edx+4]
mov	eax, [ebp+var_BC]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_B8], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_B8]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_B4], eax
jmp	short loc_516342

loc_516324:
mov	edx, [ebp+var_B8]
add	edx, 30h
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_B4]
sub	eax, 1
mov	[ebp+var_B4], eax

loc_516342:
cmp	[ebp+var_B4], 0
jle	short loc_516375
mov	ecx, [ebp+var_B8]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_8]
add	eax, 8
push	eax
mov	ecx, [ebp+var_B8]
add	ecx, 8
call	sub_4023E0
jmp	short loc_516324

loc_516375:
mov	esp, ebp
pop	ebp
retn	10h
sub_515FE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_516380(void *)
sub_516380 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_4FFDD0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5163A9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5163A9:
mov	esp, ebp
pop	ebp
retn
sub_516380 endp

align 10h


; Attributes: bp-based frame

sub_5163B0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_516590
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_516419
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_521410
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51687B

loc_516419:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_516466
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	loc_51687B
jmp	loc_51658B

loc_516466:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_51649C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51687B

loc_51649C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5164E6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	loc_51687B

loc_5164E6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_516560
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_516539
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	loc_51687B
jmp	short loc_51655E

loc_516539:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	loc_51687B

loc_51655E:
jmp	short loc_51658B

loc_516560:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_521410
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51687B

loc_51658B:
jmp	loc_51687B

loc_516590:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_516625
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5165F5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	loc_51687B
jmp	short loc_516620

loc_5165F5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_521410
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51687B

loc_516620:
jmp	loc_51687B

loc_516625:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_516697
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_516697
mov	[ebp+var_A4], 1
jmp	short loc_5166A1

loc_516697:
mov	[ebp+var_A4], 0

loc_5166A1:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5166B6
and	[ebp+var_4C], 0FFFFFFFEh

loc_5166B6:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_516718
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5166EE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	loc_51687B
jmp	short loc_516713

loc_5166EE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	loc_51687B

loc_516713:
jmp	loc_51687B

loc_516718:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_516769
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_516769:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5167B9
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5167B9
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5167AD
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5167B9

loc_5167AD:
mov	[ebp+var_A8], 1
jmp	short loc_5167C3

loc_5167B9:
mov	[ebp+var_A8], 0

loc_5167C3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5167D8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5167D8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_516831
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_51680D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	short loc_51687B
jmp	short loc_51682F

loc_51680D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5212D0
mov	eax, [ebp+arg_0]
jmp	short loc_51687B

loc_51682F:
jmp	short loc_51687B

loc_516831:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_51684F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51687B
jmp	short loc_51687B

loc_51684F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_521410
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51687B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5163B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_516890(void *)
sub_516890 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_487140
xor	ecx, ecx
and	ecx, 1
jz	short loc_5168B9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5168B9:
mov	esp, ebp
pop	ebp
retn
sub_516890 endp

align 10h


; Attributes: bp-based frame

sub_5168C0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_516AA0
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_516929
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5216E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B

loc_516929:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_516976
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B
jmp	loc_516A9B

loc_516976:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5169AC
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B

loc_5169AC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5169F6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B

loc_5169F6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_516A70
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_516A49
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B
jmp	short loc_516A6E

loc_516A49:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B

loc_516A6E:
jmp	short loc_516A9B

loc_516A70:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5216E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B

loc_516A9B:
jmp	loc_516D8B

loc_516AA0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_516B35
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_516B05
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B
jmp	short loc_516B30

loc_516B05:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5216E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B

loc_516B30:
jmp	loc_516D8B

loc_516B35:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_516BA7
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_516BA7
mov	[ebp+var_A4], 1
jmp	short loc_516BB1

loc_516BA7:
mov	[ebp+var_A4], 0

loc_516BB1:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_516BC6
and	[ebp+var_4C], 0FFFFFFFEh

loc_516BC6:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_516C28
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_516BFE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B
jmp	short loc_516C23

loc_516BFE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	loc_516D8B

loc_516C23:
jmp	loc_516D8B

loc_516C28:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_516C79
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_516C79:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_516CC9
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_516CC9
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_516CBD
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_516CC9

loc_516CBD:
mov	[ebp+var_A8], 1
jmp	short loc_516CD3

loc_516CC9:
mov	[ebp+var_A8], 0

loc_516CD3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_516CE8
and	[ebp+var_4C], 0FFFFFFFDh

loc_516CE8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_516D41
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_516D1D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	short loc_516D8B
jmp	short loc_516D3F

loc_516D1D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5215A0
mov	eax, [ebp+arg_0]
jmp	short loc_516D8B

loc_516D3F:
jmp	short loc_516D8B

loc_516D41:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_516D5F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_516D8B
jmp	short loc_516D8B

loc_516D5F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5216E0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_516D8B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5168C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_516DA0(void *)
sub_516DA0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_555750
xor	ecx, ecx
and	ecx, 1
jz	short loc_516DC9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_516DC9:
mov	esp, ebp
pop	ebp
retn
sub_516DA0 endp

align 10h


; Attributes: bp-based frame

sub_516DD0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_516FB0
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_516E39
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5219B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51729B

loc_516E39:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_516E86
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	loc_51729B
jmp	loc_516FAB

loc_516E86:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_516EBC
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51729B

loc_516EBC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_516F06
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	loc_51729B

loc_516F06:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_516F80
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_516F59
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	loc_51729B
jmp	short loc_516F7E

loc_516F59:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	loc_51729B

loc_516F7E:
jmp	short loc_516FAB

loc_516F80:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5219B0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51729B

loc_516FAB:
jmp	loc_51729B

loc_516FB0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_517045
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_517015
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	loc_51729B
jmp	short loc_517040

loc_517015:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5219B0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51729B

loc_517040:
jmp	loc_51729B

loc_517045:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5170B7
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5170B7
mov	[ebp+var_A4], 1
jmp	short loc_5170C1

loc_5170B7:
mov	[ebp+var_A4], 0

loc_5170C1:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5170D6
and	[ebp+var_4C], 0FFFFFFFEh

loc_5170D6:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_517138
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51710E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	loc_51729B
jmp	short loc_517133

loc_51710E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	loc_51729B

loc_517133:
jmp	loc_51729B

loc_517138:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_517189
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_517189:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5171D9
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5171D9
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5171CD
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5171D9

loc_5171CD:
mov	[ebp+var_A8], 1
jmp	short loc_5171E3

loc_5171D9:
mov	[ebp+var_A8], 0

loc_5171E3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5171F8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5171F8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_517251
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_51722D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	short loc_51729B
jmp	short loc_51724F

loc_51722D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_521870
mov	eax, [ebp+arg_0]
jmp	short loc_51729B

loc_51724F:
jmp	short loc_51729B

loc_517251:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_51726F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51729B
jmp	short loc_51729B

loc_51726F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5219B0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51729B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_516DD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5172B0(void *)
sub_5172B0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_555450
xor	ecx, ecx
and	ecx, 1
jz	short loc_5172D9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5172D9:
mov	esp, ebp
pop	ebp
retn
sub_5172B0 endp

align 10h


; Attributes: bp-based frame

sub_5172E0 proc	near

var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h

loc_5172E6:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 10h
jle	loc_51748A
cmp	[ebp+arg_C], 0
jnz	short loc_517321
movzx	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_521B40
add	esp, 10h
jmp	loc_51748A

loc_517321:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
mov	cl, [ebp+arg_10]
mov	[ebp+var_31], cl
mov	edx, [ebp+arg_4]
sub	edx, 0Ch
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cdq
sub	eax, edx
sar	eax, 1
imul	eax, 0Ch
add	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5173CA
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_30]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_517394
mov	eax, [ebp+var_2C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
jmp	loc_517422
jmp	short loc_5173C8

loc_517394:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_30]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5173BA
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_38], edx
jmp	short loc_517422
jmp	short loc_5173C8

loc_5173BA:
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_38], ecx
jmp	short loc_517422

loc_5173C8:
jmp	short loc_517422

loc_5173CA:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_30]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5173F0
mov	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_38], edx
jmp	short loc_517422
jmp	short loc_517422

loc_5173F0:
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_30]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_517416
mov	edx, [ebp+var_30]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_38], eax
jmp	short loc_517422
jmp	short loc_517422

loc_517416:
mov	ecx, [ebp+var_2C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
mov	[ebp+var_38], edx

loc_517422:
mov	eax, [ebp+var_38]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	eax, [eax+8]
mov	[ebp+var_8], eax
movzx	ecx, [ebp+arg_10]
push	ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+var_10]
mov	[edx], eax
mov	ecx, [ebp+var_C]
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_521B60
add	esp, 18h
mov	[ebp+var_4], eax
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5172E0
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_5172E6

loc_51748A:
mov	esp, ebp
pop	ebp
retn
sub_5172E0 endp

align 10h


; Attributes: bp-based frame

sub_517490 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 10h
jle	short loc_5174E8
movzx	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_0]
add	eax, 0C0h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_521BE0
add	esp, 10h
mov	dl, [ebp+arg_8]
mov	[ebp+var_1], dl
movzx	eax, [ebp+var_1]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 0C0h
push	edx
call	sub_5276A0
add	esp, 10h
jmp	short loc_5174FF

loc_5174E8:
movzx	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_521BE0
add	esp, 10h

loc_5174FF:
mov	esp, ebp
pop	ebp
retn
sub_517490 endp

align 10h


; Attributes: bp-based frame

sub_517510 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 2Ch

loc_517516:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 10h
jle	loc_5175F3
cmp	[ebp+arg_C], 0
jnz	short loc_51754C
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_521CA0
add	esp, 10h
jmp	loc_5175F3

loc_51754C:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cdq
sub	eax, edx
sar	eax, 1
shl	eax, 4
add	eax, [ebp+arg_0]
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_521CC0
add	esp, 10h
mov	ecx, [eax]
mov	[ebp+var_14], ecx
mov	edx, [eax+4]
mov	[ebp+var_10], edx
mov	ecx, [eax+8]
mov	[ebp+var_C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_8], edx
movzx	eax, [ebp+arg_10]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+var_10]
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_8]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_521D90
add	esp, 1Ch
mov	[ebp+var_4], eax
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_517510
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_517516

loc_5175F3:
mov	esp, ebp
pop	ebp
retn
sub_517510 endp

align 10h


; Attributes: bp-based frame

sub_517600 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 10h
jle	short loc_517654
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 100h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_521E20
add	esp, 10h
mov	cl, [ebp+arg_8]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 100h
push	ecx
call	sub_5278A0
add	esp, 10h
jmp	short loc_51766B

loc_517654:
movzx	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_521E20
add	esp, 10h

loc_51766B:
mov	esp, ebp
pop	ebp
retn
sub_517600 endp

align 10h


; Attributes: bp-based frame

sub_517670 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 24h

loc_517676:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	loc_517733
cmp	[ebp+arg_C], 0
jnz	short loc_5176AC
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_521F00
add	esp, 10h
jmp	loc_517733

loc_5176AC:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 8
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cdq
sub	eax, edx
sar	eax, 1
mov	edx, [ebp+arg_0]
lea	eax, [edx+eax*8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_521CC0
add	esp, 10h
mov	edx, [eax]
mov	eax, [eax+4]
mov	[ebp+var_C], edx
mov	[ebp+var_8], eax
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_521F20
add	esp, 14h
mov	[ebp+var_4], eax
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_517670
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_517676

loc_517733:
mov	esp, ebp
pop	ebp
retn
sub_517670 endp

align 10h


; Attributes: bp-based frame

sub_517740 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	short loc_517794
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 80h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_521FB0
add	esp, 10h
mov	cl, [ebp+arg_8]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 80h
push	ecx
call	sub_5279E0
add	esp, 10h
jmp	short loc_5177AB

loc_517794:
movzx	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_521FB0
add	esp, 10h

loc_5177AB:
mov	esp, ebp
pop	ebp
retn
sub_517740 endp

align 10h


; Attributes: bp-based frame

sub_5177B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5DE0D0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	[eax], edx
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5177B0 endp

align 10h


; Attributes: bp-based frame

sub_517810 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_517857
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E110
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51790A

loc_517857:
cmp	[ebp+arg_10], 0
jnz	short loc_51788F
cmp	[ebp+arg_C], 0
jnz	short loc_517886
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51788F

loc_517886:
mov	[ebp+var_34], 1
jmp	short loc_517896

loc_51788F:
mov	[ebp+var_34], 0

loc_517896:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5178A8
and	[ebp+var_C], 0FFFFFFFEh

loc_5178A8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5178DE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_51E110
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5178DC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5178DC:
jmp	short loc_51790A

loc_5178DE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E110
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_51790A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_51790A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_517810 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_517950(void *)
sub_517950 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_502550
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_42CA30
xor	edx, edx
and	edx, 1
jz	short loc_51798A
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51798A:
mov	esp, ebp
pop	ebp
retn
sub_517950 endp

align 10h


; Attributes: bp-based frame

sub_517990 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_38]
call	sub_527CF0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_5E9440
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_34], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_517990 endp

align 10h


; Attributes: bp-based frame

sub_517A00 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:flt_15AACC4
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_517A68
jmp	loc_517B59

loc_517A68:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_517ADC
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_517ADA
jmp	short loc_517B59

loc_517ADA:
jmp	short loc_517AE8

loc_517ADC:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_517AE8
jmp	short loc_517B59

loc_517AE8:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_517B4B
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_517B40
jmp	short loc_517B4B

loc_517B40:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_517AE8

loc_517B4B:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_522760

loc_517B59:
mov	esp, ebp
pop	ebp
retn
sub_517A00 endp

align 10h


; Attributes: bp-based frame

sub_517B60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_51CAC0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_517B60 endp



; Attributes: bp-based frame

sub_517BB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5226D0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_5223A0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 8
mov	esp, ebp
pop	ebp
retn	4
sub_517BB0 endp

align 10h


; Attributes: bp-based frame

sub_517BF0 proc	near

var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_34], eax
push	0
mov	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_51CAC0
mov	[ebp+var_20], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_24], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_48], edx
xor	eax, eax
mov	[ebp+var_3D], al
lea	ecx, [ebp+var_3D]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_68]
add	ecx, 4
call	sub_52A8B0
mov	[ebp+var_2C], 0
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_4C6F50
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_1C], edx
mov	[ebp+var_C], 0
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_422EC0
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_418C90
mov	[ebp+var_14], eax
jmp	short loc_517CE8

loc_517CD8:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_517CE8:
mov	edx, [ebp+var_1C]
xor	eax, eax
cmp	edx, [ebp+var_C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_517D30
jmp	short loc_517D0E

loc_517CFC:
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_18], eax

loc_517D0E:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_10]
jz	short loc_517D2E
mov	edx, [ebp+var_8]
mov	eax, [edx]
cmp	eax, [ebp+var_1C]
jnz	short loc_517D2A
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx], edx
jmp	short loc_517D2C

loc_517D2A:
jmp	short loc_517D2E

loc_517D2C:
jmp	short loc_517CFC

loc_517D2E:
jmp	short loc_517CD8

loc_517D30:
mov	[ebp+var_30], 0
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+18h]
mov	esp, ebp
pop	ebp
retn	4
sub_517BF0 endp

align 10h


; Attributes: bp-based frame

sub_517D70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwotimer ; "LWOTimer"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_517DD5
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_517DD5
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+4]
test	ecx, ecx
jz	short loc_517DD5
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_517DCE
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_517DD5

loc_517DCE:
mov	[ebp+var_10], 0

loc_517DD5:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_517D70 endp

align 10h


; Attributes: bp-based frame

sub_517DE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwogameobjprox ; "LWOGameObjProxy"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_517E45
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_517E45
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+4]
test	ecx, ecx
jz	short loc_517E45
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_517E3E
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_517E45

loc_517E3E:
mov	[ebp+var_10], 0

loc_517E45:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_517DE0 endp

align 10h


; Attributes: bp-based frame

sub_517E50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwogameobjinte ; "LWOGameObjInterface"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_517EB5
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_517EB5
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_517EB5
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_517EAE
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_517EB5

loc_517EAE:
mov	[ebp+var_10], 0

loc_517EB5:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_517E50 endp

align 10h


; Attributes: bp-based frame

sub_517EC0 proc	near

var_8A=	byte ptr -8Ah
var_7C=	dword ptr -7Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0

loc_517EE7:
lea	edx, [ebp+var_24]
mov	[ebp+var_20], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setnz	cl
mov	[ebp+var_8A], cl
movzx	edx, [ebp+var_8A]
test	edx, edx
jz	short loc_517F66
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
push	ecx
lea	ecx, [ebp+arg_4]
call	sub_4E8C30
movzx	edx, al
test	edx, edx
jz	short loc_517F5E
push	ecx
mov	[ebp+var_7C], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_501670

loc_517F5E:
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
jmp	short loc_517EE7

loc_517F66:
mov	esp, ebp
pop	ebp
retn
sub_517EC0 endp

align 10h


; Attributes: bp-based frame

sub_517F70 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_50F1D0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_479650
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_517FF3

loc_517FEA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_517FF3:
cmp	[ebp+var_40], 0
jle	short loc_51801D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_522A30
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 0Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 0Ch
mov	[ebp+var_3C], eax
jmp	short loc_517FEA

loc_51801D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_518044
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_522A30
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
mov	[ebp+var_C], ecx
jmp	short loc_518099

loc_518044:
mov	edx, [ebp+arg_C]
imul	edx, 0Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_51807B

loc_518069:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 0Ch
mov	[ebp+var_68], eax

loc_51807B:
cmp	[ebp+var_6C], 0
jle	short loc_518093
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_522A30
add	esp, 8
jmp	short loc_518069

loc_518093:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_518099:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_518131
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5180F8

loc_5180EF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5180F8:
cmp	[ebp+var_80], 0
jle	short loc_51812B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_522A30
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 0Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 0Ch
mov	[ebp+var_7C], eax
jmp	short loc_5180EF

loc_51812B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_518131:
mov	ecx, [ebp+var_CC]
call	sub_50F480
mov	edx, [ebp+var_4]
imul	edx, 0Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_517F70 endp

align 10h


; Attributes: bp-based frame

sub_518180 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_31=	byte ptr -31h
var_18=	byte ptr -18h
var_17=	byte ptr -17h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
mov	[ebp+var_B0], ecx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5181B6
mov	edx, [ebp+var_B0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5181B6
mov	[ebp+var_B4], 1
jmp	short loc_5181C0

loc_5181B6:
mov	[ebp+var_B4], 0

loc_5181C0:
movzx	ecx, byte ptr [ebp+var_B4]
test	ecx, ecx
jz	short loc_518204
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_14]
call	sub_50FA70
xor	eax, eax
mov	[ebp+var_15], al
lea	ecx, [ebp+var_15]
push	ecx
lea	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_B0]
call	sub_518180
lea	ecx, [ebp+var_14]
call	sub_555450
jmp	loc_5184B3

loc_518204:
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_51833B
xor	edx, edx
mov	[ebp+var_16], dl
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_44], eax
push	0
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
call	sub_527E80
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 0Ch
mov	eax, [ebp+var_B0]
add	edx, [eax+4]
mov	ecx, [ebp+var_B0]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_17], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_54], eax
jmp	short loc_5182CB

loc_5182C2:
mov	edx, [ebp+var_54]
sub	edx, 1
mov	[ebp+var_54], edx

loc_5182CB:
cmp	[ebp+var_54], 0
jle	short loc_5182F1
mov	eax, [ebp+var_58]
sub	eax, 0Ch
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_5C]
sub	ecx, 0Ch
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_58]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_503F10
jmp	short loc_5182C2

loc_5182F1:
mov	eax, [ebp+arg_0]
mov	[ebp+var_68], eax
mov	eax, [ebp+arg_4]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_68]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_64], eax
jmp	short loc_518322

loc_518310:
mov	edx, [ebp+var_68]
add	edx, 0Ch
mov	[ebp+var_68], edx
mov	eax, [ebp+var_64]
sub	eax, 1
mov	[ebp+var_64], eax

loc_518322:
cmp	[ebp+var_64], 0
jle	short loc_518336
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_503F10
jmp	short loc_518310

loc_518336:
jmp	loc_5184B3

loc_51833B:
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 0Ch
add	ecx, [ebp+var_84]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_84]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_6C]
sub	eax, [ebp+var_84]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_78], eax
jmp	short loc_51838D

loc_51837B:
mov	edx, [ebp+var_78]
sub	edx, 1
mov	[ebp+var_78], edx
mov	eax, [ebp+var_74]
add	eax, 0Ch
mov	[ebp+var_74], eax

loc_51838D:
cmp	[ebp+var_78], 0
jle	short loc_5183A5
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_74]
push	edx		; void *
call	sub_522A30
add	esp, 8
jmp	short loc_51837B

loc_5183A5:
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_6C]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_18], dl
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_A0]
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_9C]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_518402

loc_5183F3:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_518402:
cmp	[ebp+var_90], 0
jle	short loc_518441
mov	eax, [ebp+var_9C]
push	eax		; int
mov	ecx, [ebp+var_8C]
push	ecx		; void *
call	sub_522A30
add	esp, 8
mov	edx, [ebp+var_9C]
add	edx, 0Ch
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_8C]
add	eax, 0Ch
mov	[ebp+var_8C], eax
jmp	short loc_5183F3

loc_518441:
mov	ecx, [ebp+var_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_B0]
add	ecx, [edx+4]
mov	eax, [ebp+var_B0]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_AC]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_A8], eax
jmp	short loc_518499

loc_51847B:
mov	edx, [ebp+var_AC]
add	edx, 0Ch
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_A8]
sub	eax, 1
mov	[ebp+var_A8], eax

loc_518499:
cmp	[ebp+var_A8], 0
jle	short loc_5184B3
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_AC]
call	sub_503F10
jmp	short loc_51847B

loc_5184B3:
mov	esp, ebp
pop	ebp
retn	10h
sub_518180 endp

align 10h


; Attributes: bp-based frame

sub_5184C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_522DB0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_522AC0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_5184C0 endp

align 10h


; Attributes: bp-based frame

sub_518500 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_523130
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_522E40
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_518500 endp

align 10h


; Attributes: bp-based frame

sub_518540 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_518587
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E160
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51864B

loc_518587:
cmp	[ebp+arg_10], 0
jnz	short loc_5185D0
cmp	[ebp+arg_C], 0
jnz	short loc_5185C7
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_5185B8
mov	[ebp+var_34], 1
jmp	short loc_5185BF

loc_5185B8:
mov	[ebp+var_34], 0

loc_5185BF:
movzx	edx, byte ptr [ebp+var_34]
test	edx, edx
jz	short loc_5185D0

loc_5185C7:
mov	[ebp+var_38], 1
jmp	short loc_5185D7

loc_5185D0:
mov	[ebp+var_38], 0

loc_5185D7:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5185E9
and	[ebp+var_C], 0FFFFFFFEh

loc_5185E9:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_51861F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E160
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_51861D
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_51861D:
jmp	short loc_51864B

loc_51861F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E160
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_51864B
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_51864B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_518540 endp

align 10h


; Attributes: bp-based frame

sub_518690 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_51E160
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5186E6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_518690
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5186E6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5186F5:
cmp	[ebp+arg_0], 0
jz	short loc_518762
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_51E160
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_518751
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_518690
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_518751:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5186F5

loc_518762:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_518690 endp

align 10h


; Attributes: bp-based frame

sub_518770 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5189A4
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5187D9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_50B240
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_518D17

loc_5187D9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_5187FD
mov	[ebp+var_A4], 1
jmp	short loc_518807

loc_5187FD:
mov	[ebp+var_A4], 0

loc_518807:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_518842
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	loc_518D17
jmp	loc_51899F

loc_518842:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_518866
mov	[ebp+var_A8], 1
jmp	short loc_518870

loc_518866:
mov	[ebp+var_A8], 0

loc_518870:
mov	dl, byte ptr [ebp+var_A8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_518894
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_518D17

loc_518894:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5188DE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	loc_518D17

loc_5188DE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+arg_8]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_518902
mov	[ebp+var_AC], 1
jmp	short loc_51890C

loc_518902:
mov	[ebp+var_AC], 0

loc_51890C:
mov	cl, byte ptr [ebp+var_AC]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_518974
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51894D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	loc_518D17
jmp	short loc_518972

loc_51894D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	loc_518D17

loc_518972:
jmp	short loc_51899F

loc_518974:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_50B240
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_518D17

loc_51899F:
jmp	loc_518D17

loc_5189A4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_518A55
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_5189DD
mov	[ebp+var_B0], 1
jmp	short loc_5189E7

loc_5189DD:
mov	[ebp+var_B0], 0

loc_5189E7:
mov	dl, byte ptr [ebp+var_B0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_518A25
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	loc_518D17
jmp	short loc_518A50

loc_518A25:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_50B240
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_518D17

loc_518A50:
jmp	loc_518D17

loc_518A55:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+arg_8]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_518A93
mov	[ebp+var_B4], 1
jmp	short loc_518A9D

loc_518A93:
mov	[ebp+var_B4], 0

loc_518A9D:
mov	cl, byte ptr [ebp+var_B4]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_518AFD
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_84]
movss	xmm0, dword ptr	[ecx]
comiss	xmm0, dword ptr	[edx]
jbe	short loc_518ADC
mov	[ebp+var_B8], 1
jmp	short loc_518AE6

loc_518ADC:
mov	[ebp+var_B8], 0

loc_518AE6:
movzx	eax, byte ptr [ebp+var_B8]
test	eax, eax
jz	short loc_518AFD
mov	[ebp+var_BC], 1
jmp	short loc_518B07

loc_518AFD:
mov	[ebp+var_BC], 0

loc_518B07:
mov	cl, byte ptr [ebp+var_BC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_518B1C
and	[ebp+var_4C], 0FFFFFFFEh

loc_518B1C:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_518B7E
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_518B54
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	loc_518D17
jmp	short loc_518B79

loc_518B54:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	loc_518D17

loc_518B79:
jmp	loc_518D17

loc_518B7E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_518BEB
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_8C]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_518BD8
mov	[ebp+var_C0], 1
jmp	short loc_518BE2

loc_518BD8:
mov	[ebp+var_C0], 0

loc_518BE2:
mov	cl, byte ptr [ebp+var_C0]
mov	[ebp+var_11], cl

loc_518BEB:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_518C55
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_518C55
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_518C49
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
mov	ecx, [ebp+arg_8]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_518C34
mov	[ebp+var_C4], 1
jmp	short loc_518C3E

loc_518C34:
mov	[ebp+var_C4], 0

loc_518C3E:
movzx	edx, byte ptr [ebp+var_C4]
test	edx, edx
jz	short loc_518C55

loc_518C49:
mov	[ebp+var_C8], 1
jmp	short loc_518C5F

loc_518C55:
mov	[ebp+var_C8], 0

loc_518C5F:
mov	al, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_518C74
and	[ebp+var_4C], 0FFFFFFFDh

loc_518C74:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_518CCD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_518CA9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	short loc_518D17
jmp	short loc_518CCB

loc_518CA9:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_518540
mov	eax, [ebp+arg_0]
jmp	short loc_518D17

loc_518CCB:
jmp	short loc_518D17

loc_518CCD:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_518CEB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_518D17
jmp	short loc_518D17

loc_518CEB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_50B240
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_518D17:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_518770 endp

align 10h


; Attributes: bp-based frame

sub_518D20 proc	near

var_AC=	dword ptr -0ACh
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_523490
mov	esp, ebp
pop	ebp
retn	10h
sub_518D20 endp



; Attributes: bp-based frame

sub_518D50 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_5103D0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_518D50 endp

align 10h


; Attributes: bp-based frame

sub_518E50 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
call	nullsub_1
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_518EC5:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_51908C
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_518F3F

loc_518F2F:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_518F3F:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_518FBB
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_518FBB
jmp	loc_518F2F

loc_518FBB:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_51E1B0
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_518EC5

loc_51908C:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_502F40
mov	esp, ebp
pop	ebp
retn	4
sub_518E50 endp

align 10h


; Attributes: bp-based frame

sub_5190F0 proc	near

var_40=	dword ptr -40h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h

loc_5190F6:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 6
cmp	eax, 10h
jle	loc_5191AE
cmp	[ebp+arg_C], 0
jnz	short loc_51912C
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5237F0
add	esp, 10h
jmp	loc_5191AE

loc_51912C:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
movzx	eax, [ebp+arg_10]
push	eax
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, 40h
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 6
cdq
sub	eax, edx
sar	eax, 1
shl	eax, 6
add	eax, [ebp+arg_0]
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_523810
add	esp, 0FFFFFFD0h
mov	ecx, esp
push	eax
call	sub_44CC50
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_523940
add	esp, 4Ch
mov	[ebp+var_40], eax
mov	eax, [ebp+var_40]
mov	[ebp+var_4], eax
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5190F0
add	esp, 14h
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
jmp	loc_5190F6

loc_5191AE:
mov	esp, ebp
pop	ebp
retn
sub_5190F0 endp

align 10h


; Attributes: bp-based frame

sub_5191C0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 6
cmp	eax, 10h
jle	short loc_519214
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 400h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_523A60
add	esp, 10h
mov	cl, [ebp+arg_8]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 400h
push	ecx
call	sub_528B00
add	esp, 10h
jmp	short loc_51922B

loc_519214:
movzx	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_523A60
add	esp, 10h

loc_51922B:
mov	esp, ebp
pop	ebp
retn
sub_5191C0 endp

align 10h


; Attributes: bp-based frame

sub_519230 proc	near

var_8= byte ptr	-8
var_7= word ptr	-7
var_5= byte ptr	-5
var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0B0h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	byte ptr [ebp+var_7+1],	dl
mov	al, byte ptr [ebp+var_7+1]
mov	byte ptr [ebp+var_4+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_7], cl
mov	dl, byte ptr [ebp+var_7]
mov	[ebp+var_1], dl
xor	eax, eax
mov	[ebp+var_8], al
mov	cl, [ebp+var_8]
mov	byte ptr [ebp+var_4], cl
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_528B50
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_519230 endp

align 10h


; Attributes: bp-based frame

sub_519280 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_51E2B0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_407730
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_40], edx
jmp	short loc_5192F6

loc_5192E4:
mov	eax, [ebp+var_44]
sub	eax, 1
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_40]
add	ecx, 2
mov	[ebp+var_40], ecx

loc_5192F6:
cmp	[ebp+var_44], 0
jbe	short loc_51930A
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_4]
mov	cx, [eax]
mov	[edx], cx
jmp	short loc_5192E4

loc_51930A:
mov	edx, [ebp+var_40]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_519335
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_519335:
mov	ecx, [ebp+var_9C]
call	sub_51E3A0
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*2]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_98]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_519280 endp

align 10h


; Attributes: bp-based frame

sub_519380 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= word ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5193A7
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5193A7
mov	[ebp+var_40], 1
jmp	short loc_5193AE

loc_5193A7:
mov	[ebp+var_40], 0

loc_5193AE:
movzx	ecx, byte ptr [ebp+var_40]
test	ecx, ecx
jz	short loc_5193E2
mov	edx, [ebp+arg_8]
mov	ax, [edx]
mov	[ebp+var_C], ax
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_519380
jmp	loc_51954E

loc_5193E2:
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5194A8
xor	edx, edx
mov	[ebp+var_E], dl
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_4]
shl	edx, 1
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
sub	ecx, edx
push	ecx
call	sub_407C50
add	esp, 10h
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_3C]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_F], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
shl	eax, 1
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*2]
sub	eax, [ebp+var_20]
sar	eax, 1
mov	[ebp+var_1C], eax
jmp	short loc_51948F

loc_51947D:
mov	ecx, [ebp+var_20]
add	ecx, 2
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_1C]
sub	edx, 1
mov	[ebp+var_1C], edx

loc_51948F:
cmp	[ebp+var_1C], 0
jle	short loc_5194A3
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_8]
mov	dx, [ecx]
mov	[eax], dx
jmp	short loc_51947D

loc_5194A3:
jmp	loc_51954E

loc_5194A8:
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
mov	eax, [ebp+var_2C]
lea	ecx, [eax+edx*2]
mov	[ebp+var_24], ecx
push	0
lea	edx, [ebp+var_25]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
call	sub_44E3E0
add	esp, 14h
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_24]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_10], dl
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 10h
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*2]
mov	eax, [ebp+var_3C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_38]
sar	edx, 1
mov	[ebp+var_34], edx
jmp	short loc_51953A

loc_519528:
mov	eax, [ebp+var_38]
add	eax, 2
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_34]
sub	ecx, 1
mov	[ebp+var_34], ecx

loc_51953A:
cmp	[ebp+var_34], 0
jle	short loc_51954E
mov	edx, [ebp+var_38]
mov	eax, [ebp+arg_8]
mov	cx, [eax]
mov	[edx], cx
jmp	short loc_519528

loc_51954E:
mov	esp, ebp
pop	ebp
retn	10h
sub_519380 endp

align 10h


; Attributes: bp-based frame

sub_519560 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4442B0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_4DEED0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5195E3

loc_5195DA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5195E3:
cmp	[ebp+var_40], 0
jle	short loc_51960D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_52AA10
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 28h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 28h
mov	[ebp+var_3C], eax
jmp	short loc_5195DA

loc_51960D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_519634
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_52AA10
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 28h
mov	[ebp+var_C], ecx
jmp	short loc_519689

loc_519634:
mov	edx, [ebp+arg_C]
imul	edx, 28h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_51966B

loc_519659:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 28h
mov	[ebp+var_68], eax

loc_51966B:
cmp	[ebp+var_6C], 0
jle	short loc_519683
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_52AA10
add	esp, 8
jmp	short loc_519659

loc_519683:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_519689:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_519721
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5196E8

loc_5196DF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5196E8:
cmp	[ebp+var_80], 0
jle	short loc_51971B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_52AA10
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 28h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 28h
mov	[ebp+var_7C], eax
jmp	short loc_5196DF

loc_51971B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_519721:
mov	ecx, [ebp+var_CC]
call	sub_51E400
mov	edx, [ebp+var_4]
imul	edx, 28h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_519560 endp

align 10h


; Attributes: bp-based frame

sub_519770 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_39=	byte ptr -39h
var_34=	byte ptr -34h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0BCh
mov	[ebp+var_B8], ecx
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5197A6
mov	edx, [ebp+var_B8]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5197A6
mov	[ebp+var_BC], 1
jmp	short loc_5197B0

loc_5197A6:
mov	[ebp+var_BC], 0

loc_5197B0:
movzx	ecx, byte ptr [ebp+var_BC]
test	ecx, ecx
jz	short loc_5197FF
mov	edx, [ebp+arg_8]
mov	al, [edx]
mov	[ebp+var_30], al
mov	ecx, [ebp+arg_8]
add	ecx, 4
push	ecx
lea	ecx, [ebp+var_2C]
call	sub_51E710
xor	edx, edx
mov	[ebp+var_31], dl
lea	eax, [ebp+var_31]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_519770
lea	ecx, [ebp+var_30]
call	sub_4E9110
jmp	loc_519AE1

loc_5197FF:
mov	ecx, [ebp+var_B8]
mov	eax, [ecx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_B8]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_519956
xor	edx, edx
mov	[ebp+var_32], dl
mov	eax, [ebp+var_B8]
mov	ecx, [eax+4]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_B8]
mov	eax, [edx+4]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
mov	edx, [ebp+var_B8]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_4C], eax
push	0
lea	ecx, [ebp+var_39]
push	ecx
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
call	sub_528BC0
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 28h
mov	eax, [ebp+var_B8]
add	edx, [eax+4]
mov	ecx, [ebp+var_B8]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_33], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_60], edx
mov	eax, [ebp+var_60]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_5C], eax
jmp	short loc_5198C6

loc_5198BD:
mov	edx, [ebp+var_5C]
sub	edx, 1
mov	[ebp+var_5C], edx

loc_5198C6:
cmp	[ebp+var_5C], 0
jle	short loc_5198FC
mov	eax, [ebp+var_60]
sub	eax, 28h
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_64]
sub	ecx, 28h
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_60]
add	edx, 4
push	edx
mov	ecx, [ebp+var_64]
add	ecx, 4
call	sub_51D9B0
jmp	short loc_5198BD

loc_5198FC:
mov	eax, [ebp+arg_0]
mov	[ebp+var_70], eax
mov	eax, [ebp+arg_4]
imul	eax, 28h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_70]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_51992D

loc_51991B:
mov	edx, [ebp+var_70]
add	edx, 28h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_6C]
sub	eax, 1
mov	[ebp+var_6C], eax

loc_51992D:
cmp	[ebp+var_6C], 0
jle	short loc_519951
mov	ecx, [ebp+var_70]
mov	edx, [ebp+arg_8]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+arg_8]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_70]
add	ecx, 4
call	sub_51D9B0
jmp	short loc_51991B

loc_519951:
jmp	loc_519AE1

loc_519956:
mov	edx, [ebp+var_B8]
mov	eax, [edx+4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 28h
add	ecx, [ebp+var_8C]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_74]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5199A8

loc_519996:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx
mov	eax, [ebp+var_7C]
add	eax, 28h
mov	[ebp+var_7C], eax

loc_5199A8:
cmp	[ebp+var_80], 0
jle	short loc_5199C0
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_7C]
push	edx		; void *
call	sub_52AA10
add	esp, 8
jmp	short loc_519996

loc_5199C0:
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+var_74]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_34], dl
mov	eax, [ebp+var_B8]
mov	ecx, [eax+4]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A8]
mov	[ebp+var_94], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_A4]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_98], eax
jmp	short loc_519A1D

loc_519A0E:
mov	edx, [ebp+var_98]
sub	edx, 1
mov	[ebp+var_98], edx

loc_519A1D:
cmp	[ebp+var_98], 0
jle	short loc_519A5C
mov	eax, [ebp+var_A4]
push	eax		; int
mov	ecx, [ebp+var_94]
push	ecx		; void *
call	sub_52AA10
add	esp, 8
mov	edx, [ebp+var_A4]
add	edx, 28h
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_94]
add	eax, 28h
mov	[ebp+var_94], eax
jmp	short loc_519A0E

loc_519A5C:
mov	ecx, [ebp+var_4]
imul	ecx, 28h
mov	edx, [ebp+var_B8]
add	ecx, [edx+4]
mov	eax, [ebp+var_B8]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_B4], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_B4]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_B0], eax
jmp	short loc_519AB4

loc_519A96:
mov	edx, [ebp+var_B4]
add	edx, 28h
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_B0]
sub	eax, 1
mov	[ebp+var_B0], eax

loc_519AB4:
cmp	[ebp+var_B0], 0
jle	short loc_519AE1
mov	ecx, [ebp+var_B4]
mov	edx, [ebp+arg_8]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+arg_8]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_B4]
add	ecx, 4
call	sub_51D9B0
jmp	short loc_519A96

loc_519AE1:
mov	esp, ebp
pop	ebp
retn	10h
sub_519770 endp

align 10h


; Attributes: bp-based frame

sub_519AF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_519B10

loc_519B07:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_519B10:
cmp	[ebp+var_4], 0
jle	short loc_519B8C
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_519B2A
mov	eax, [ebp+arg_0]
jmp	loc_519BF4

loc_519B2A:
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_519B47
mov	eax, [ebp+arg_0]
jmp	loc_519BF4

loc_519B47:
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_519B64
mov	eax, [ebp+arg_0]
jmp	loc_519BF4

loc_519B64:
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_519B7E
mov	eax, [ebp+arg_0]
jmp	short loc_519BF4

loc_519B7E:
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
jmp	loc_519B07

loc_519B8C:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 1
jz	short loc_519BE0
cmp	[ebp+var_8], 2
jz	short loc_519BC6
cmp	[ebp+var_8], 3
jz	short loc_519BAC
jmp	short loc_519BF1

loc_519BAC:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_519BBD
mov	eax, [ebp+arg_0]
jmp	short loc_519BF4

loc_519BBD:
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+arg_0], ecx

loc_519BC6:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_519BD7
mov	eax, [ebp+arg_0]
jmp	short loc_519BF4

loc_519BD7:
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx

loc_519BE0:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_519BF1
mov	eax, [ebp+arg_0]
jmp	short loc_519BF4

loc_519BF1:
mov	eax, [ebp+arg_4]

loc_519BF4:
mov	esp, ebp
pop	ebp
retn
sub_519AF0 endp

align 10h


; Attributes: bp-based frame

sub_519C00 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_519C47
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E4A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_519CFA

loc_519C47:
cmp	[ebp+arg_10], 0
jnz	short loc_519C7F
cmp	[ebp+arg_C], 0
jnz	short loc_519C76
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_519C7F

loc_519C76:
mov	[ebp+var_34], 1
jmp	short loc_519C86

loc_519C7F:
mov	[ebp+var_34], 0

loc_519C86:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_519C98
and	[ebp+var_C], 0FFFFFFFEh

loc_519C98:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_519CCE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_51E4A0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_519CCC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_519CCC:
jmp	short loc_519CFA

loc_519CCE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E4A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_519CFA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_519CFA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_519C00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_519D40(void *)
sub_519D40 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_519D7D
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_519D7D:
mov	esp, ebp
pop	ebp
retn
sub_519D40 endp

align 10h


; Attributes: bp-based frame

sub_519D90 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_519DD7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_50FCF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_519E8A

loc_519DD7:
cmp	[ebp+arg_10], 0
jnz	short loc_519E0F
cmp	[ebp+arg_C], 0
jnz	short loc_519E06
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_519E0F

loc_519E06:
mov	[ebp+var_34], 1
jmp	short loc_519E16

loc_519E0F:
mov	[ebp+var_34], 0

loc_519E16:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_519E28
and	[ebp+var_C], 0FFFFFFFEh

loc_519E28:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_519E5E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_50FCF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_519E5C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_519E5C:
jmp	short loc_519E8A

loc_519E5E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_50FCF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_519E8A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_519E8A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_519D90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_519ED0(void *)
sub_519ED0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 24h
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_519EF9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_519EF9:
mov	esp, ebp
pop	ebp
retn
sub_519ED0 endp

align 10h


; Attributes: bp-based frame

sub_519F00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx

loc_519F04:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cmp	eax, 10h
jle	loc_519FAA
cmp	[ebp+arg_C], 0
jnz	short loc_519F36
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_523AC0
add	esp, 10h
jmp	short loc_519FAA

loc_519F36:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, 4
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C23C0
add	esp, 10h
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_523AE0
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_519F00
add	esp, 14h
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
jmp	loc_519F04

loc_519FAA:
mov	esp, ebp
pop	ebp
retn
sub_519F00 endp

align 10h


; Attributes: bp-based frame

sub_519FB0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_519FF7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E4F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51A0D4

loc_519FF7:
cmp	[ebp+arg_10], 0
jnz	short loc_51A059
cmp	[ebp+arg_C], 0
jnz	short loc_51A050
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_51A041
jb	short loc_51A038
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_51A041

loc_51A038:
mov	[ebp+var_3C], 1
jmp	short loc_51A048

loc_51A041:
mov	[ebp+var_3C], 0

loc_51A048:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_51A059

loc_51A050:
mov	[ebp+var_40], 1
jmp	short loc_51A060

loc_51A059:
mov	[ebp+var_40], 0

loc_51A060:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_51A072
and	[ebp+var_C], 0FFFFFFFEh

loc_51A072:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_51A0A8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E4F0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_51A0A6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_51A0A6:
jmp	short loc_51A0D4

loc_51A0A8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E4F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_51A0D4
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_51A0D4:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_519FB0 endp

align 10h


; Attributes: bp-based frame

sub_51A120 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_51A13A

loc_51A131:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_51A13A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_51A15D
mov	[ebp+var_8], 80h
push	0Ah
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_503490
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_51A131

loc_51A15D:
mov	esp, ebp
pop	ebp
retn	8
sub_51A120 endp

align 10h


; Attributes: bp-based frame

sub_51A170 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_51A18A

loc_51A181:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_51A18A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_51A1BE
mov	[ebp+var_8], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_51A1BC
mov	edx, 0Ah
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_51A1BC:
jmp	short loc_51A181

loc_51A1BE:
mov	esp, ebp
pop	ebp
retn	8
sub_51A170 endp

align 10h


; Attributes: bp-based frame

sub_51A1D0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_64]
cmp	[edx+24h], ecx
jbe	short loc_51A27B
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_51A253
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_51A276

loc_51A253:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_51A276:
jmp	loc_51A328

loc_51A27B:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_64]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5A9600
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_51A316
mov	ecx, [ebp+var_50]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_51A316:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_51A328:
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 0Ah
imul	eax, 0Ch
mov	ecx, [ebp+var_64]
add	eax, [ecx+4]
mov	edx, [ebp+var_64]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_58], 80h
mov	eax, 0Ah
imul	eax, 0Ch
mov	ecx, [ebp+var_5C]
add	eax, [ecx+4]
mov	edx, [ebp+var_5C]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_51A1D0 endp

align 10h


; Attributes: bp-based frame

sub_51A3B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_51A3F7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E540
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51A4AA

loc_51A3F7:
cmp	[ebp+arg_10], 0
jnz	short loc_51A42F
cmp	[ebp+arg_C], 0
jnz	short loc_51A426
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51A42F

loc_51A426:
mov	[ebp+var_34], 1
jmp	short loc_51A436

loc_51A42F:
mov	[ebp+var_34], 0

loc_51A436:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_51A448
and	[ebp+var_C], 0FFFFFFFEh

loc_51A448:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51A47E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_51E540
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_51A47C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_51A47C:
jmp	short loc_51A4AA

loc_51A47E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E540
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_51A4AA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_51A4AA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_51A3B0 endp

align 10h


; Attributes: bp-based frame

sub_51A4F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_51A537
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E590
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51A5EA

loc_51A537:
cmp	[ebp+arg_10], 0
jnz	short loc_51A56F
cmp	[ebp+arg_C], 0
jnz	short loc_51A566
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51A56F

loc_51A566:
mov	[ebp+var_34], 1
jmp	short loc_51A576

loc_51A56F:
mov	[ebp+var_34], 0

loc_51A576:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_51A588
and	[ebp+var_C], 0FFFFFFFEh

loc_51A588:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51A5BE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_51E590
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_51A5BC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_51A5BC:
jmp	short loc_51A5EA

loc_51A5BE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E590
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_51A5EA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_51A5EA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_51A4F0 endp

align 10h


; Attributes: bp-based frame

sub_51A630 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_51E910
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_51A686
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_51A630
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_51A686:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_51A695:
cmp	[ebp+arg_0], 0
jz	short loc_51A702
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_51E910
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_51A6F1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_51A630
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_51A6F1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_51A695

loc_51A702:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_51A630 endp

align 10h


; Attributes: bp-based frame

sub_51A710 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51A8E4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51A779
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_523D30
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB

loc_51A779:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_51A7C2
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB
jmp	loc_51A8DF

loc_51A7C2:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_51A7F4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB

loc_51A7F4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_51A83E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB

loc_51A83E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_51A8B4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51A88D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB
jmp	short loc_51A8B2

loc_51A88D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB

loc_51A8B2:
jmp	short loc_51A8DF

loc_51A8B4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523D30
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB

loc_51A8DF:
jmp	loc_51ABBB

loc_51A8E4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_51A975
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_51A945
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB
jmp	short loc_51A970

loc_51A945:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523D30
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB

loc_51A970:
jmp	loc_51ABBB

loc_51A975:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_51A9DF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_51A9DF
mov	[ebp+var_C4], 1
jmp	short loc_51A9E9

loc_51A9DF:
mov	[ebp+var_C4], 0

loc_51A9E9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51A9FE
and	[ebp+var_4C], 0FFFFFFFEh

loc_51A9FE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_51AA60
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51AA36
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB
jmp	short loc_51AA5B

loc_51AA36:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	loc_51ABBB

loc_51AA5B:
jmp	loc_51ABBB

loc_51AA60:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51AAAD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_51AAAD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_51AAF9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_51AAF9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_51AAED
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_51AAF9

loc_51AAED:
mov	[ebp+var_C8], 1
jmp	short loc_51AB03

loc_51AAF9:
mov	[ebp+var_C8], 0

loc_51AB03:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_51AB18
and	[ebp+var_4C], 0FFFFFFFDh

loc_51AB18:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_51AB71
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51AB4D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	short loc_51ABBB
jmp	short loc_51AB6F

loc_51AB4D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523BF0
mov	eax, [ebp+arg_0]
jmp	short loc_51ABBB

loc_51AB6F:
jmp	short loc_51ABBB

loc_51AB71:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_51AB8F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51ABBB
jmp	short loc_51ABBB

loc_51AB8F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_523D30
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51ABBB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51A710 endp

align 10h


; Attributes: bp-based frame

sub_51ABD0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51ADA4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51AC39
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_524000
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B

loc_51AC39:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_51AC82
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B
jmp	loc_51AD9F

loc_51AC82:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_51ACB4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B

loc_51ACB4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_51ACFE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B

loc_51ACFE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_51AD74
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51AD4D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B
jmp	short loc_51AD72

loc_51AD4D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B

loc_51AD72:
jmp	short loc_51AD9F

loc_51AD74:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_524000
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B

loc_51AD9F:
jmp	loc_51B07B

loc_51ADA4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_51AE35
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_51AE05
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B
jmp	short loc_51AE30

loc_51AE05:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_524000
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B

loc_51AE30:
jmp	loc_51B07B

loc_51AE35:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_51AE9F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_51AE9F
mov	[ebp+var_C4], 1
jmp	short loc_51AEA9

loc_51AE9F:
mov	[ebp+var_C4], 0

loc_51AEA9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51AEBE
and	[ebp+var_4C], 0FFFFFFFEh

loc_51AEBE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_51AF20
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51AEF6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B
jmp	short loc_51AF1B

loc_51AEF6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	loc_51B07B

loc_51AF1B:
jmp	loc_51B07B

loc_51AF20:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51AF6D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_51AF6D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_51AFB9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_51AFB9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_51AFAD
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_51AFB9

loc_51AFAD:
mov	[ebp+var_C8], 1
jmp	short loc_51AFC3

loc_51AFB9:
mov	[ebp+var_C8], 0

loc_51AFC3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_51AFD8
and	[ebp+var_4C], 0FFFFFFFDh

loc_51AFD8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_51B031
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51B00D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	short loc_51B07B
jmp	short loc_51B02F

loc_51B00D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_523EC0
mov	eax, [ebp+arg_0]
jmp	short loc_51B07B

loc_51B02F:
jmp	short loc_51B07B

loc_51B031:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_51B04F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51B07B
jmp	short loc_51B07B

loc_51B04F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_524000
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51B07B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51ABD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_51B090(void *)
sub_51B090 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_4EA460
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_51B0C1
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51B0C1:
mov	esp, ebp
pop	ebp
retn
sub_51B090 endp

align 10h


; Attributes: bp-based frame

sub_51B0D0 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_51B0EA

loc_51B0E1:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_51B0EA:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_51B10D
mov	[ebp+var_8], 80h
push	8
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_596830
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_51B0E1

loc_51B10D:
mov	esp, ebp
pop	ebp
retn	8
sub_51B0D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_51B120(void *)
sub_51B120 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_51B144
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51B144:
mov	esp, ebp
pop	ebp
retn
sub_51B120 endp

align 10h


; Attributes: bp-based frame

sub_51B150 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51B32D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51B1B9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5242D0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B613

loc_51B1B9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_51B205
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	loc_51B613
jmp	loc_51B328

loc_51B205:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_51B23A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B613

loc_51B23A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_51B284
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	loc_51B613

loc_51B284:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_51B2FD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51B2D6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	loc_51B613
jmp	short loc_51B2FB

loc_51B2D6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	loc_51B613

loc_51B2FB:
jmp	short loc_51B328

loc_51B2FD:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5242D0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B613

loc_51B328:
jmp	loc_51B613

loc_51B32D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_51B3C1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_51B391
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	loc_51B613
jmp	short loc_51B3BC

loc_51B391:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5242D0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51B613

loc_51B3BC:
jmp	loc_51B613

loc_51B3C1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_51B431
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_51B431
mov	[ebp+var_A4], 1
jmp	short loc_51B43B

loc_51B431:
mov	[ebp+var_A4], 0

loc_51B43B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51B450
and	[ebp+var_4C], 0FFFFFFFEh

loc_51B450:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_51B4B2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51B488
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	loc_51B613
jmp	short loc_51B4AD

loc_51B488:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	loc_51B613

loc_51B4AD:
jmp	loc_51B613

loc_51B4B2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51B502
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_51B502:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51B551
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_51B551
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_51B545
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_51B551

loc_51B545:
mov	[ebp+var_A8], 1
jmp	short loc_51B55B

loc_51B551:
mov	[ebp+var_A8], 0

loc_51B55B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_51B570
and	[ebp+var_4C], 0FFFFFFFDh

loc_51B570:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_51B5C9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_51B5A5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	short loc_51B613
jmp	short loc_51B5C7

loc_51B5A5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_524190
mov	eax, [ebp+arg_0]
jmp	short loc_51B613

loc_51B5C7:
jmp	short loc_51B613

loc_51B5C9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_51B5E7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51B613
jmp	short loc_51B613

loc_51B5E7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5242D0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51B613:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51B150 endp

align 10h


; Attributes: bp-based frame

sub_51B620 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_51B667
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E5E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51B72B

loc_51B667:
cmp	[ebp+arg_10], 0
jnz	short loc_51B6B0
cmp	[ebp+arg_C], 0
jnz	short loc_51B6A7
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_51B698
mov	[ebp+var_34], 1
jmp	short loc_51B69F

loc_51B698:
mov	[ebp+var_34], 0

loc_51B69F:
movzx	edx, byte ptr [ebp+var_34]
test	edx, edx
jz	short loc_51B6B0

loc_51B6A7:
mov	[ebp+var_38], 1
jmp	short loc_51B6B7

loc_51B6B0:
mov	[ebp+var_38], 0

loc_51B6B7:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_51B6C9
and	[ebp+var_C], 0FFFFFFFEh

loc_51B6C9:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_51B6FF
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E5E0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_51B6FD
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_51B6FD:
jmp	short loc_51B72B

loc_51B6FF:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E5E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_51B72B
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_51B72B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_51B620 endp

align 10h


; Attributes: bp-based frame

sub_51B770 proc	near

var_9C=	dword ptr -9Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
lea	eax, [ebp+var_1]
push	eax
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_14]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
call	sub_5245D0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51B770 endp

align 10h


; Attributes: bp-based frame

sub_51B7C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
push	ecx

loc_51B7C4:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	loc_51B8B9
cmp	[ebp+arg_C], 0
jnz	short loc_51B80B
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5246B0
add	esp, 18h
jmp	loc_51B8B9

loc_51B80B:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_10]
mov	[ecx], edx
mov	eax, [ebp+arg_14]
mov	[ecx+4], eax
mov	edx, [ebp+arg_18]
mov	[ecx+8], edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
sub	edx, 8
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cdq
sub	eax, edx
sar	eax, 1
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5246F0
add	esp, 18h
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5247D0
add	esp, 1Ch
mov	[ebp+var_4], eax
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_51B7C0
add	esp, 1Ch
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_51B7C4

loc_51B8B9:
mov	esp, ebp
pop	ebp
retn
sub_51B7C0 endp

align 10h


; Attributes: bp-based frame

sub_51B8C0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	short loc_51B92B
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
push	0
mov	eax, [ebp+arg_0]
add	eax, 80h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_524870
add	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_10]
mov	[edx+8], eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 80h
push	edx
call	sub_528F20
add	esp, 18h
jmp	short loc_51B953

loc_51B92B:
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_524870
add	esp, 18h

loc_51B953:
pop	ebp
retn
sub_51B8C0 endp

align 10h


; Attributes: bp-based frame

sub_51B960 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_51B9A7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E640
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51BA6B

loc_51B9A7:
cmp	[ebp+arg_10], 0
jnz	short loc_51B9F0
cmp	[ebp+arg_C], 0
jnz	short loc_51B9E7
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_51B9D8
mov	[ebp+var_34], 1
jmp	short loc_51B9DF

loc_51B9D8:
mov	[ebp+var_34], 0

loc_51B9DF:
movzx	edx, byte ptr [ebp+var_34]
test	edx, edx
jz	short loc_51B9F0

loc_51B9E7:
mov	[ebp+var_38], 1
jmp	short loc_51B9F7

loc_51B9F0:
mov	[ebp+var_38], 0

loc_51B9F7:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_51BA09
and	[ebp+var_C], 0FFFFFFFEh

loc_51BA09:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_51BA3F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_51E640
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_51BA3D
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_51BA3D:
jmp	short loc_51BA6B

loc_51BA3F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E640
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_51BA6B
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_51BA6B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_51B960 endp

align 10h


; Attributes: bp-based frame

sub_51BAB0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	al, [ebp+var_1]
mov	ecx, [ebp+arg_0]
mov	[ecx], al
lea	ecx, [ebp+var_1]
call	sub_42CA30
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_51BAB0 endp

align 10h


; Attributes: bp-based frame

sub_51BAD0 proc	near

var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 4Ch

loc_51BAD6:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_49], dl
movzx	eax, [ebp+var_49]
test	eax, eax
jz	loc_51BBD6
lea	ecx, [ebp+var_18]
mov	[ebp+var_14], ecx
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_14]
call	sub_4046E0
mov	edx, [ebp+arg_C]
xor	eax, eax
cmp	edx, [ebp+var_18]
setnz	al
mov	[ebp+var_4A], al
movzx	ecx, [ebp+var_4A]
test	ecx, ecx
jz	loc_51BBD6
mov	edx, [ebp+arg_C]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_1C]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_51BB65
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
jmp	short loc_51BBD1

loc_51BB65:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_C]
add	edx, 10h
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51BB9E
mov	edx, [ebp+arg_C]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax
jmp	short loc_51BBD1

loc_51BB9E:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
push	ecx
lea	ecx, [ebp+arg_14]
call	sub_51E690
mov	edx, [ebp+arg_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax

loc_51BBD1:
jmp	loc_51BAD6

loc_51BBD6:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	ecx, [ebp+arg_1C]
call	sub_42CA30
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_51BAD0 endp

align 10h


; Attributes: bp-based frame

sub_51BC10 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	eax, eax
jz	short loc_51BC2D
push	1
push	20h
lea	ecx, [ebp+arg_0]
push	ecx
mov	eax, [ebp+var_4]
call	sub_A49320
jmp	short loc_51BC3D

loc_51BC2D:
push	1
push	20h
lea	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
call	sub_A49320

loc_51BC3D:
mov	esp, ebp
pop	ebp
retn	4
sub_51BC10 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_51BC50(void	*)
sub_51BC50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
xor	eax, eax
jz	short loc_51BC70
push	1		; char
push	20h		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250
jmp	short loc_51BC80
jmp	short loc_51BC80

loc_51BC70:		; char
push	1
push	20h		; int
mov	edx, [ebp+arg_0]
push	edx		; void *
mov	esi, [ebp+var_4]
call	sub_A49250

loc_51BC80:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_51BC50 endp

align 10h


; Attributes: bp-based frame

sub_51BC90 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 2Ch

loc_51BC96:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
cmp	eax, 10h
jle	loc_51BFA6
cmp	[ebp+arg_C], 0
jnz	short loc_51BCD0
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_524940
add	esp, 10h
jmp	loc_51BFA6

loc_51BCD0:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
mov	ecx, [ebp+arg_4]
sub	ecx, 18h
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
cdq
sub	eax, edx
sar	eax, 1
imul	eax, 18h
add	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
mov	edx, [ebp+var_24]
sub	esp, 18h
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+arg_0]
sub	esp, 18h
mov	ecx, esp
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
call	[ebp+arg_10]
add	esp, 30h
test	eax, eax
jz	loc_51BE46
mov	ecx, [ebp+var_28]
sub	esp, 18h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_24]
sub	esp, 18h
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
call	[ebp+arg_10]
add	esp, 30h
test	eax, eax
jz	short loc_51BDCB
mov	eax, [ebp+var_24]
mov	[ebp+var_2C], eax
jmp	loc_51BF1C
jmp	short loc_51BE41

loc_51BDCB:
mov	ecx, [ebp+var_28]
sub	esp, 18h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+arg_0]
sub	esp, 18h
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
call	[ebp+arg_10]
add	esp, 30h
test	eax, eax
jz	short loc_51BE36
mov	eax, [ebp+var_28]
mov	[ebp+var_2C], eax
jmp	loc_51BF1C
jmp	short loc_51BE41

loc_51BE36:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
jmp	loc_51BF1C

loc_51BE41:
jmp	loc_51BF1C

loc_51BE46:
mov	edx, [ebp+var_28]
sub	esp, 18h
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+arg_0]
sub	esp, 18h
mov	ecx, esp
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
call	[ebp+arg_10]
add	esp, 30h
test	eax, eax
jz	short loc_51BEAE
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
jmp	short loc_51BF1C
jmp	short loc_51BF1C

loc_51BEAE:
mov	edx, [ebp+var_28]
sub	esp, 18h
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_24]
sub	esp, 18h
mov	ecx, esp
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
call	[ebp+arg_10]
add	esp, 30h
test	eax, eax
jz	short loc_51BF16
mov	ecx, [ebp+var_28]
mov	[ebp+var_2C], ecx
jmp	short loc_51BF1C
jmp	short loc_51BF1C

loc_51BF16:
mov	edx, [ebp+var_24]
mov	[ebp+var_2C], edx

loc_51BF1C:
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [eax+4]
mov	[ebp+var_1C], edx
mov	ecx, [eax+8]
mov	[ebp+var_18], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_14], edx
mov	ecx, [eax+10h]
mov	[ebp+var_10], ecx
mov	edx, [eax+14h]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_10]
push	eax
sub	esp, 18h
mov	ecx, esp
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
mov	edx, [ebp+var_10]
mov	[ecx+10h], edx
mov	eax, [ebp+var_C]
mov	[ecx+14h], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_524960
add	esp, 24h
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_51BC90
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_51BC96

loc_51BFA6:
mov	esp, ebp
pop	ebp
retn
sub_51BC90 endp

align 10h


; Attributes: bp-based frame

sub_51BFB0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
cmp	eax, 10h
jle	short loc_51BFFF
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_0]
add	eax, 180h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_524A70
add	esp, 10h
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 180h
push	ecx
call	sub_529230
add	esp, 10h
jmp	short loc_51C015

loc_51BFFF:
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_524A70
add	esp, 10h

loc_51C015:
pop	ebp
retn
sub_51BFB0 endp

align 10h


; Attributes: bp-based frame

sub_51C020 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51C200
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51C089
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_524BB0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB

loc_51C089:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_51C0D6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB
jmp	loc_51C1FB

loc_51C0D6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_51C10C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB

loc_51C10C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_51C156
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB

loc_51C156:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_51C1D0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51C1A9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB
jmp	short loc_51C1CE

loc_51C1A9:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB

loc_51C1CE:
jmp	short loc_51C1FB

loc_51C1D0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_524BB0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB

loc_51C1FB:
jmp	loc_51C4EB

loc_51C200:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_51C295
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_51C265
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB
jmp	short loc_51C290

loc_51C265:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_524BB0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB

loc_51C290:
jmp	loc_51C4EB

loc_51C295:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_51C307
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51C307
mov	[ebp+var_A4], 1
jmp	short loc_51C311

loc_51C307:
mov	[ebp+var_A4], 0

loc_51C311:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51C326
and	[ebp+var_4C], 0FFFFFFFEh

loc_51C326:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_51C388
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51C35E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB
jmp	short loc_51C383

loc_51C35E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	loc_51C4EB

loc_51C383:
jmp	loc_51C4EB

loc_51C388:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51C3D9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_51C3D9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51C429
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_51C429
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_51C41D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_51C429

loc_51C41D:
mov	[ebp+var_A8], 1
jmp	short loc_51C433

loc_51C429:
mov	[ebp+var_A8], 0

loc_51C433:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_51C448
and	[ebp+var_4C], 0FFFFFFFDh

loc_51C448:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_51C4A1
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_51C47D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	short loc_51C4EB
jmp	short loc_51C49F

loc_51C47D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_51A3B0
mov	eax, [ebp+arg_0]
jmp	short loc_51C4EB

loc_51C49F:
jmp	short loc_51C4EB

loc_51C4A1:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_51C4BF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51C4EB
jmp	short loc_51C4EB

loc_51C4BF:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_524BB0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51C4EB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51C020 endp

align 10h


; Attributes: bp-based frame

sub_51C500 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_20]
push	edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
call	sub_524E40
add	esp, 28h
mov	esp, ebp
pop	ebp
retn
sub_51C500 endp

align 10h


; Attributes: bp-based frame

sub_51C560 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_524EA0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_51C560 endp

align 10h


; Attributes: bp-based frame

sub_51C5A0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_51C5B3

loc_51C5AB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_51C5B3:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_51C62F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_34]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_38]
call	sub_489B50
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_34]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_14]
mov	[edx+4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	loc_51C5AB

loc_51C62F:
mov	esp, ebp
pop	ebp
retn	10h
sub_51C5A0 endp

align 10h


; Attributes: bp-based frame

sub_51C640 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_524F00
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_51C640 endp

align 10h


; Attributes: bp-based frame

sub_51C680 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	al, [ebp+arg_8]
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx-4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
sub	eax, 1
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_51C6B3:
cmp	[ebp+var_C], 0
jle	short loc_51C72D
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_10]
mov	[ebp+var_18], ecx
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jl	short loc_51C6F6
jg	short loc_51C6ED
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
cmp	edx, [ecx]
jbe	short loc_51C6F6

loc_51C6ED:
mov	[ebp+var_20], 1
jmp	short loc_51C6FD

loc_51C6F6:
mov	[ebp+var_20], 0

loc_51C6FD:
movzx	eax, byte ptr [ebp+var_20]
test	eax, eax
jz	short loc_51C72D
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	esi, [ebp+arg_0]
mov	eax, [esi+eax*4]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_51C6B3

loc_51C72D:
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax+edx*4], ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_51C680 endp

align 10h


; Attributes: bp-based frame

sub_51C740 proc	near

var_60=	dword ptr -60h
var_6= word ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	byte ptr [ebp+var_6+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_6]
call	sub_4E41C0
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_524F70
mov	esp, ebp
pop	ebp
retn	8
sub_51C740 endp

align 10h


; Attributes: bp-based frame

sub_51C780 proc	near

var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_6= word ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
cmp	dword ptr [eax], 0
jnz	short loc_51C796
or	eax, 0FFFFFFFFh
jmp	short loc_51C7CD

loc_51C796:
xor	ecx, ecx
mov	byte ptr [ebp+var_6+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_6], dl
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_6]
call	sub_4E41C0
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	eax, [ebp+var_18]
and	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_34]
call	sub_525210

loc_51C7CD:
mov	esp, ebp
pop	ebp
retn	4
sub_51C780 endp

align 10h


; Attributes: bp-based frame

sub_51C7E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 118h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_525350
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_51C7E0 endp

align 10h


; Attributes: bp-based frame

sub_51C820 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_51C838:
cmp	[ebp+var_8], 0
jz	short loc_51C876
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_F5A2E0
movzx	edx, al
test	edx, edx
jnz	short loc_51C86B
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_51C874

loc_51C86B:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_51C874:
jmp	short loc_51C838

loc_51C876:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_1C]
jz	short loc_51C8A0
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_F5A2E0
movzx	edx, al
test	edx, edx
jz	short loc_51C8A0
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax

loc_51C8A0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51C820 endp

align 10h


; Attributes: bp-based frame

sub_51C8B0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_51C8CC

loc_51C8C3:
mov	edx, [ebp+var_8]
add	edx, 30h
mov	[ebp+var_8], edx

loc_51C8CC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_51C8F9
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_51C8F7
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51C8F7:
jmp	short loc_51C8C3

loc_51C8F9:
mov	esp, ebp
pop	ebp
retn
sub_51C8B0 endp

align 10h


; Attributes: bp-based frame

sub_51C900 proc	near

var_5C=	dword ptr -5Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_5C], ecx
jmp	short loc_51C91C

loc_51C913:
mov	edx, [ebp+var_5C]
add	edx, 0Ch
mov	[ebp+var_5C], edx

loc_51C91C:
mov	eax, [ebp+var_5C]
cmp	eax, [ebp+arg_4]
jz	short loc_51C946
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_5C]
call	sub_555450
xor	edx, edx
and	edx, 1
jz	short loc_51C944
mov	eax, [ebp+var_5C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51C944:
jmp	short loc_51C913

loc_51C946:
mov	esp, ebp
pop	ebp
retn
sub_51C900 endp

align 10h


; Attributes: bp-based frame

sub_51C950 proc	near

var_104= dword ptr -104h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 104h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_104], ecx
jmp	short loc_51C978

loc_51C969:
mov	edx, [ebp+var_104]
add	edx, 28h
mov	[ebp+var_104], edx

loc_51C978:
mov	eax, [ebp+var_104]
cmp	eax, [ebp+arg_4]
jz	short loc_51C9AB
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_104]
call	sub_4E9110
xor	edx, edx
and	edx, 1
jz	short loc_51C9A9
mov	eax, [ebp+var_104]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51C9A9:
jmp	short loc_51C969

loc_51C9AB:
mov	esp, ebp
pop	ebp
retn
sub_51C950 endp

align 10h


; Attributes: bp-based frame

sub_51C9B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5253B0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_51C9B0 endp

align 10h


; Attributes: bp-based frame

sub_51C9E0 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_51C9F1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_51CA33
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_5253F0
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_51CA31
mov	ecx, 1
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_51CA31:
jmp	short loc_51C9F1

loc_51CA33:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_51C9E0 endp

align 10h


; Attributes: bp-based frame

sub_51CA50 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_51CA61:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_51CAA6
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_525430
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_51CAA4
mov	ecx, 1
imul	ecx, 0DCh
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_51CAA4:
jmp	short loc_51CA61

loc_51CAA6:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_51CA50 endp

align 10h


; Attributes: bp-based frame

sub_51CAC0 proc	near

var_64=	dword ptr -64h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_51CAD1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_51CB13
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_51D660
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_51CB11
mov	ecx, 1
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_51CB11:
jmp	short loc_51CAD1

loc_51CB13:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_51CAC0 endp

align 10h


; Attributes: bp-based frame

sub_51CB30 proc	near

var_60=	dword ptr -60h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_51CB41:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_51CB86
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_525460
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_51CB84
mov	ecx, 1
imul	ecx, 84h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_51CB84:
jmp	short loc_51CB41

loc_51CB86:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_51CB30 endp

align 10h


; Attributes: bp-based frame

sub_51CBA0 proc	near

var_68=	dword ptr -68h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_51CBB1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_51CBF3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_525490
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_51CBF1
mov	ecx, 1
imul	ecx, 14h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_51CBF1:
jmp	short loc_51CBB1

loc_51CBF3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_51CBA0 endp

align 10h


; Attributes: bp-based frame

sub_51CC10 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51CDF0
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51CC79
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_523300
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB

loc_51CC79:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_51CCC6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB
jmp	loc_51CDEB

loc_51CCC6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_51CCFC
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB

loc_51CCFC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_51CD46
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB

loc_51CD46:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_51CDC0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51CD99
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB
jmp	short loc_51CDBE

loc_51CD99:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB

loc_51CDBE:
jmp	short loc_51CDEB

loc_51CDC0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_523300
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB

loc_51CDEB:
jmp	loc_51D0DB

loc_51CDF0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_51CE85
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_51CE55
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB
jmp	short loc_51CE80

loc_51CE55:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_523300
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB

loc_51CE80:
jmp	loc_51D0DB

loc_51CE85:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_51CEF7
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51CEF7
mov	[ebp+var_A4], 1
jmp	short loc_51CF01

loc_51CEF7:
mov	[ebp+var_A4], 0

loc_51CF01:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51CF16
and	[ebp+var_4C], 0FFFFFFFEh

loc_51CF16:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_51CF78
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51CF4E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB
jmp	short loc_51CF73

loc_51CF4E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	loc_51D0DB

loc_51CF73:
jmp	loc_51D0DB

loc_51CF78:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51CFC9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_51CFC9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51D019
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_51D019
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_51D00D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_51D019

loc_51D00D:
mov	[ebp+var_A8], 1
jmp	short loc_51D023

loc_51D019:
mov	[ebp+var_A8], 0

loc_51D023:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_51D038
and	[ebp+var_4C], 0FFFFFFFDh

loc_51D038:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_51D091
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_51D06D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	short loc_51D0DB
jmp	short loc_51D08F

loc_51D06D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5231C0
mov	eax, [ebp+arg_0]
jmp	short loc_51D0DB

loc_51D08F:
jmp	short loc_51D0DB

loc_51D091:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_51D0AF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51D0DB
jmp	short loc_51D0DB

loc_51D0AF:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_523300
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51D0DB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51CC10 endp

align 10h


; Attributes: bp-based frame

sub_51D0F0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51D2D0
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51D159
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_523660
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB

loc_51D159:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_51D1A6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB
jmp	loc_51D2CB

loc_51D1A6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_51D1DC
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB

loc_51D1DC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_51D226
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB

loc_51D226:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_51D2A0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51D279
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB
jmp	short loc_51D29E

loc_51D279:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB

loc_51D29E:
jmp	short loc_51D2CB

loc_51D2A0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_523660
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB

loc_51D2CB:
jmp	loc_51D5BB

loc_51D2D0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_51D365
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_51D335
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB
jmp	short loc_51D360

loc_51D335:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_523660
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB

loc_51D360:
jmp	loc_51D5BB

loc_51D365:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_51D3D7
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51D3D7
mov	[ebp+var_A4], 1
jmp	short loc_51D3E1

loc_51D3D7:
mov	[ebp+var_A4], 0

loc_51D3E1:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51D3F6
and	[ebp+var_4C], 0FFFFFFFEh

loc_51D3F6:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_51D458
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51D42E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB
jmp	short loc_51D453

loc_51D42E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	loc_51D5BB

loc_51D453:
jmp	loc_51D5BB

loc_51D458:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51D4A9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_51D4A9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51D4F9
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_51D4F9
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_51D4ED
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_51D4F9

loc_51D4ED:
mov	[ebp+var_A8], 1
jmp	short loc_51D503

loc_51D4F9:
mov	[ebp+var_A8], 0

loc_51D503:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_51D518
and	[ebp+var_4C], 0FFFFFFFDh

loc_51D518:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_51D571
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_51D54D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	short loc_51D5BB
jmp	short loc_51D56F

loc_51D54D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_523520
mov	eax, [ebp+arg_0]
jmp	short loc_51D5BB

loc_51D56F:
jmp	short loc_51D5BB

loc_51D571:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_51D58F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51D5BB
jmp	short loc_51D5BB

loc_51D58F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_523660
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51D5BB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51D0F0 endp

align 10h


; Attributes: bp-based frame

sub_51D5D0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405D30
movzx	eax, al
test	eax, eax
jz	short loc_51D623
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405220
test	eax, eax
jz	short loc_51D619
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405220
mov	ecx, eax
call	sub_4047A0

loc_51D619:
push	1
mov	ecx, [ebp+arg_0]
call	sub_522170

loc_51D623:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405D30
movzx	eax, al
test	eax, eax
jnz	short loc_51D654
push	4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20
xor	al, al
jmp	short loc_51D656
jmp	short loc_51D656

loc_51D654:
mov	al, 1

loc_51D656:
pop	ebp
retn
sub_51D5D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_51D660(void *)
sub_51D660 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_4A9770
xor	ecx, ecx
and	ecx, 1
jz	short loc_51D689
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51D689:
mov	esp, ebp
pop	ebp
retn
sub_51D660 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_51D690(void *, int)
sub_51D690 proc	near

var_2C=	dword ptr -2Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_51D6E7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 8
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_4E9F60
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
jmp	short loc_51D6EE

loc_51D6E7:
mov	[ebp+var_2C], 0

loc_51D6EE:
mov	esp, ebp
pop	ebp
retn
sub_51D690 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_51D700(void *, int)
sub_51D700 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_51D75D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_14]
call	sub_5016E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_18], ecx
jmp	short loc_51D764

loc_51D75D:
mov	[ebp+var_18], 0

loc_51D764:
mov	esp, ebp
pop	ebp
retn
sub_51D700 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_51D770(void *, int)
sub_51D770 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	34h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_51D7C9
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+arg_4]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_5017A0
mov	ecx, [ebp+var_8]
mov	[ebp+var_40], ecx
jmp	short loc_51D7D0

loc_51D7C9:
mov	[ebp+var_40], 0

loc_51D7D0:
mov	esp, ebp
pop	ebp
retn
sub_51D770 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_51D7E0(void *, int)
sub_51D7E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0D8h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_51D83A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_4E6640
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_51D841

loc_51D83A:
mov	[ebp+var_C], 0

loc_51D841:
mov	esp, ebp
pop	ebp
retn
sub_51D7E0 endp

align 10h


; Attributes: bp-based frame

sub_51D850 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+28h]
fstp	dword ptr [ecx+28h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+2Ch]
mov	[eax+2Ch], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+2Eh]
mov	[eax+2Eh], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+34h]
mov	[edx+34h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+35h]
mov	[edx+35h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+36h]
mov	[edx+36h], cl
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+60h]
fstp	dword ptr [eax+60h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+64h]
fstp	dword ptr [edx+64h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+68h]
fstp	dword ptr [ecx+68h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51D850 endp

align 10h


; Attributes: bp-based frame

sub_51D900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 64h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_407E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_51D93C
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51D93C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51D900 endp

align 10h


; Attributes: bp-based frame

sub_51D950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_403850
mov	edx, [ebp+var_8]
add	edx, 30h
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+30h]
mov	edx, [eax+34h]
mov	eax, [ebp+var_4]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+38h]
mov	[ecx+38h], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_51D950 endp

align 10h


; Attributes: bp-based frame

sub_51D9B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_51EFC0
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_51EFC0
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_51EFC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51D9B0 endp



; Attributes: bp-based frame

sub_51D9F0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526500
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525530
add	esp, 8
mov	eax, [ebp+var_4]
call	sub_4044C0
mov	dword ptr [eax], 0
mov	eax, [ebp+var_4]
call	sub_403040
mov	dword ptr [eax], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51D9F0 endp

align 10h


; Attributes: bp-based frame

sub_51DA40 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_51DB2A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51DA9F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_51DB2A

loc_51DA9F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_5255A0
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_504FC0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_51DB2A:
mov	esp, ebp
pop	ebp
retn	10h
sub_51DA40 endp



; Attributes: bp-based frame

sub_51DB30 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_51DC1A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51DB8F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_51DC1A

loc_51DB8F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_5255F0
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_5053B0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_51DC1A:
mov	esp, ebp
pop	ebp
retn	10h
sub_51DB30 endp



; Attributes: bp-based frame

sub_51DC20 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_51DD0A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51DC7F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_51DD0A

loc_51DC7F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_525640
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_640F10
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_51DD0A:
mov	esp, ebp
pop	ebp
retn	10h
sub_51DC20 endp



; Attributes: bp-based frame

sub_51DD10 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5DDEF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525690
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51DD10 endp

align 10h


; Attributes: bp-based frame

sub_51DD60 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_51DE4A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51DDBF
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_51DE4A

loc_51DDBF:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_5256E0
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_506A50
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_51DE4A:
mov	esp, ebp
pop	ebp
retn	10h
sub_51DD60 endp



; Attributes: bp-based frame

sub_51DE50 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_503430
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525730
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51DE50 endp

align 10h


; Attributes: bp-based frame

sub_51DEA0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_51E830
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5257A0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51DEA0 endp

align 10h


; Attributes: bp-based frame

sub_51DEF0 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_51DFDA
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51DF4F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_51DFDA

loc_51DF4F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_525810
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_51CA50
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_51DFDA:
mov	esp, ebp
pop	ebp
retn	10h
sub_51DEF0 endp



; Attributes: bp-based frame

sub_51DFE0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5C7020
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525860
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51DFE0 endp

align 10h


; Attributes: bp-based frame

sub_51E030 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 5555555h
mov	[ebp+var_10], 5555555h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_51E06D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_51E073

loc_51E06D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_51E073:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_51E086
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_51E086:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 5555555h
mov	[ebp+var_1C], 5555555h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_51E0BC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_51E0C2

loc_51E0BC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_51E0C2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_51E0D2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_51E0FC

loc_51E0D2:
mov	[ebp+var_20], 5555555h
mov	[ebp+var_24], 5555555h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_51E0F0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_51E0F6

loc_51E0F0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_51E0F6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_51E0FC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E030 endp

align 10h


; Attributes: bp-based frame

sub_51E110 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5258F0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E110 endp

align 10h


; Attributes: bp-based frame

sub_51E160 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7FE0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E160 endp

align 10h


; Attributes: bp-based frame

sub_51E1B0 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_51E2A4
mov	[ebp+var_5], 1
call	nullsub_1
call	nullsub_1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51E219
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_51E2A4

loc_51E219:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_525960
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_50BAC0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_51E2A4:
mov	esp, ebp
pop	ebp
retn	10h
sub_51E1B0 endp

align 10h


; Attributes: bp-based frame

sub_51E2B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 1
mov	[ebp+var_8], edx
mov	[ebp+var_C], 7FFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_4076A0
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_51E2EE
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_51E2F4

loc_51E2EE:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_51E2F4:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_51E307
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_51E307:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 7FFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_4076A0
mov	[ebp+var_1C], eax
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_51E344
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_51E34A

loc_51E344:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_51E34A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_51E35A
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_51E38B

loc_51E35A:
mov	[ebp+var_20], 7FFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 8
call	sub_4076A0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_51E37F
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_51E385

loc_51E37F:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_51E385:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_51E38B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E2B0 endp

align 10h


; Attributes: bp-based frame

sub_51E3A0 proc	near

var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 1
push	ecx		; int
mov	edx, [ebp+var_50]
mov	eax, [edx]
push	eax		; void *
mov	ecx, [ebp+var_50]
add	ecx, 8
call	sub_407DE0
mov	esp, ebp
pop	ebp
retn
sub_51E3A0 endp

align 10h


; Attributes: bp-based frame

sub_51E400 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E9A0
add	esp, 8
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_9C]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_98], eax
mov	edx, [ebp+var_9C]
mov	eax, [edx]
mov	[ebp+var_94], eax
cmp	[ebp+var_94], 0
jz	short loc_51E497
mov	ecx, [ebp+var_98]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_94]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_51E497:
mov	esp, ebp
pop	ebp
retn
sub_51E400 endp

align 10h


; Attributes: bp-based frame

sub_51E4A0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_51E8B0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5259B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E4A0 endp

align 10h


; Attributes: bp-based frame

sub_51E4F0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525A20
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E4F0 endp

align 10h


; Attributes: bp-based frame

sub_51E540 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525AB0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E540 endp

align 10h


; Attributes: bp-based frame

sub_51E590 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525B20
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E590 endp

align 10h


; Attributes: bp-based frame

sub_51E5E0 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_526A40
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx]
fstp	dword ptr [ecx+10h]
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E5E0 endp

align 10h


; Attributes: bp-based frame

sub_51E640 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525BA0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E640 endp

align 10h


; Attributes: bp-based frame

sub_51E690 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
lea	eax, [ebp+var_18]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_24]
mov	ecx, [ecx+4]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_51EA00
lea	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	eax, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
add	ecx, 4
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
push	eax
call	sub_77E2F0
add	esp, 4
mov	ecx, [ebp+var_20]
mov	[ecx], eax
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	4
sub_51E690 endp

align 10h


; Attributes: bp-based frame

sub_51E710 proc	near

var_90=	dword ptr -90h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_90]
call	sub_51E770
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
push	ecx
mov	ecx, [ebp+var_90]
add	ecx, 0Ch
call	sub_51E770
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_90]
add	ecx, 18h
call	sub_51E770
mov	eax, [ebp+var_90]
mov	esp, ebp
pop	ebp
retn	4
sub_51E710 endp

align 10h


; Attributes: bp-based frame

sub_51E770 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
push	eax
mov	ecx, [ebp+var_50]
call	sub_51E960
call	nullsub_1
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_4C]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_28]
sub	eax, [ebp+var_44]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_34], eax
jmp	short loc_51E7E7

loc_51E7DE:
mov	edx, [ebp+var_34]
sub	edx, 1
mov	[ebp+var_34], edx

loc_51E7E7:
cmp	[ebp+var_34], 0
jle	short loc_51E811
mov	eax, [ebp+var_44]
push	eax		; int
mov	ecx, [ebp+var_30]
push	ecx		; void *
call	sub_452030
add	esp, 8
mov	edx, [ebp+var_44]
add	edx, 28h
mov	[ebp+var_44], edx
mov	eax, [ebp+var_30]
add	eax, 28h
mov	[ebp+var_30], eax
jmp	short loc_51E7DE

loc_51E811:
mov	ecx, [ebp+var_50]
mov	edx, [ebp+var_30]
mov	[ecx+4], edx
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_51E770 endp

align 10h


; Attributes: bp-based frame

sub_51E830 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], (offset loc_B02C0A+1)
jbe	short loc_51E856
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_51E856:
cmp	[ebp+arg_0], 0
jz	short loc_51E87F
mov	eax, [ebp+arg_0]
imul	eax, 174h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_51E886

loc_51E87F:
mov	[ebp+var_C], 0

loc_51E886:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_51E830 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_51E890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_51CA50
mov	esp, ebp
pop	ebp
retn
sub_51E890 endp

align 10h


; Attributes: bp-based frame

sub_51E8B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 25ED097h
jbe	short loc_51E8D6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_51E8D6:
cmp	[ebp+arg_0], 0
jz	short loc_51E8FC
mov	eax, [ebp+arg_0]
imul	eax, 6Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_51E903

loc_51E8FC:
mov	[ebp+var_C], 0

loc_51E903:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_51E8B0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_51E910 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5C7080
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_525C30
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51E910 endp

align 10h


; Attributes: bp-based frame

sub_51E960 proc	near

var_30=	dword ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_439BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_30]
add	ecx, 8
call	sub_444410
mov	ecx, [ebp+var_30]
mov	[ecx], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 28h
mov	eax, [ebp+var_30]
add	edx, [eax]
mov	ecx, [ebp+var_30]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_51E960 endp

align 10h


; Attributes: bp-based frame

sub_51EA00 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_51EBE0
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51EA69
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_48B660
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51EECB

loc_51EA69:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_51EAB6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	loc_51EECB
jmp	loc_51EBDB

loc_51EAB6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_51EAEC
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51EECB

loc_51EAEC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_51EB36
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	loc_51EECB

loc_51EB36:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_51EBB0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_51EB89
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	loc_51EECB
jmp	short loc_51EBAE

loc_51EB89:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	loc_51EECB

loc_51EBAE:
jmp	short loc_51EBDB

loc_51EBB0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_48B660
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51EECB

loc_51EBDB:
jmp	loc_51EECB

loc_51EBE0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_51EC75
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_51EC45
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	loc_51EECB
jmp	short loc_51EC70

loc_51EC45:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_48B660
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_51EECB

loc_51EC70:
jmp	loc_51EECB

loc_51EC75:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_51ECE7
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_51ECE7
mov	[ebp+var_A4], 1
jmp	short loc_51ECF1

loc_51ECE7:
mov	[ebp+var_A4], 0

loc_51ECF1:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_51ED06
and	[ebp+var_4C], 0FFFFFFFEh

loc_51ED06:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_51ED68
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_51ED3E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	loc_51EECB
jmp	short loc_51ED63

loc_51ED3E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	loc_51EECB

loc_51ED63:
jmp	loc_51EECB

loc_51ED68:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51EDB9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_51EDB9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_51EE09
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_51EE09
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_51EDFD
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_51EE09

loc_51EDFD:
mov	[ebp+var_A8], 1
jmp	short loc_51EE13

loc_51EE09:
mov	[ebp+var_A8], 0

loc_51EE13:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_51EE28
and	[ebp+var_4C], 0FFFFFFFDh

loc_51EE28:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_51EE81
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_51EE5D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	short loc_51EECB
jmp	short loc_51EE7F

loc_51EE5D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_493010
mov	eax, [ebp+arg_0]
jmp	short loc_51EECB

loc_51EE7F:
jmp	short loc_51EECB

loc_51EE81:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_51EE9F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_51EECB
jmp	short loc_51EECB

loc_51EE9F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_48B660
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_51EECB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_51EA00 endp

align 10h


; Attributes: bp-based frame

sub_51EEE0 proc	near

var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*8]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_10], ecx
jmp	short loc_51EF18

loc_51EF06:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_C], eax

loc_51EF18:
cmp	[ebp+var_10], 0
jle	short loc_51EF46
xor	ecx, ecx
mov	byte ptr [ebp+var_14+1], cl
mov	dl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], dl
xor	eax, eax
mov	byte ptr [ebp+var_14], al
mov	cl, byte ptr [ebp+var_14]
mov	[ebp+var_12], cl
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
jmp	short loc_51EF06

loc_51EF46:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_51EEE0 endp

align 10h


; Attributes: bp-based frame

sub_51EF50 proc	near

var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_51EF50 endp

align 10h


; Attributes: bp-based frame

sub_51EF90 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_526AA0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_51EF90 endp

align 10h


; Attributes: bp-based frame

sub_51EFC0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_CC]
jz	loc_51F2F8
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_51F09F
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_444C20
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_52A390
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_CC]
call	sub_525D80
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 28h
mov	eax, [ebp+var_CC]
add	edx, [eax]
mov	ecx, [ebp+var_CC]
mov	[ecx+8], edx
jmp	loc_51F2E1

loc_51F09F:
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_51F153
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_51F10C

loc_51F103:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_51F10C:
cmp	[ebp+var_68], 0
jle	short loc_51F132
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_4023E0
mov	ecx, [ebp+var_6C]
add	ecx, 28h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 28h
mov	[ebp+var_70], edx
jmp	short loc_51F103

loc_51F132:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_4434E0
add	esp, 8
jmp	loc_51F2E1

loc_51F153:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_CC]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
imul	eax, 28h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_9C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_A0]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_98]
mov	[ebp+var_90], eax
mov	eax, [ebp+var_9C]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8C], eax
jmp	short loc_51F1DB

loc_51F1CC:
mov	edx, [ebp+var_8C]
sub	edx, 1
mov	[ebp+var_8C], edx

loc_51F1DB:
cmp	[ebp+var_8C], 0
jle	short loc_51F216
mov	eax, [ebp+var_90]
push	eax
mov	ecx, [ebp+var_94]
call	sub_4023E0
mov	ecx, [ebp+var_90]
add	ecx, 28h
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_94]
add	edx, 28h
mov	[ebp+var_94], edx
jmp	short loc_51F1CC

loc_51F216:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_C8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
imul	eax, 28h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_C0], eax
mov	eax, [ebp+var_C0]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_A8], ecx
mov	eax, [ebp+var_C4]
sub	eax, [ebp+var_BC]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_AC], eax
jmp	short loc_51F2A2

loc_51F293:
mov	edx, [ebp+var_AC]
sub	edx, 1
mov	[ebp+var_AC], edx

loc_51F2A2:
cmp	[ebp+var_AC], 0
jle	short loc_51F2E1
mov	eax, [ebp+var_BC]
push	eax		; int
mov	ecx, [ebp+var_A8]
push	ecx		; void *
call	sub_452030
add	esp, 8
mov	edx, [ebp+var_BC]
add	edx, 28h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_A8]
add	eax, 28h
mov	[ebp+var_A8], eax
jmp	short loc_51F293

loc_51F2E1:
mov	ecx, [ebp+var_4]
imul	ecx, 28h
mov	edx, [ebp+var_CC]
add	ecx, [edx]
mov	eax, [ebp+var_CC]
mov	[eax+4], ecx

loc_51F2F8:
mov	eax, [ebp+var_CC]
mov	esp, ebp
pop	ebp
retn	4
sub_51EFC0 endp

align 10h


; Attributes: bp-based frame

sub_51F310 proc	near

var_14=	word ptr -14h
var_12=	word ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_10], ecx
jmp	short loc_51F348

loc_51F336:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_C], eax

loc_51F348:
cmp	[ebp+var_10], 0
jle	short loc_51F370
xor	ecx, ecx
mov	byte ptr [ebp+var_14+1], cl
mov	dl, byte ptr [ebp+var_14+1]
mov	byte ptr [ebp+var_12+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_14], al
mov	cl, byte ptr [ebp+var_14]
mov	byte ptr [ebp+var_12], cl
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
jmp	short loc_51F336

loc_51F370:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_51F310 endp

align 10h


; Attributes: bp-based frame

sub_51F380 proc	near

var_5C=	dword ptr -5Ch
var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_526B10
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_525E00
lea	ecx, [ebp+var_8]
call	sub_46B570
mov	esp, ebp
pop	ebp
retn	10h
sub_51F380 endp

align 10h


; Attributes: bp-based frame

sub_51F3D0 proc	near

var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_51F3E8:
cmp	[ebp+var_8], 0
jz	short loc_51F45A
lea	ecx, [ebp+var_25]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_24]
call	sub_407D30
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_48], edx
lea	eax, [ebp+var_24]
mov	ecx, [ebp+var_48]
call	sub_404510
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_9], al
lea	ecx, [ebp+var_24]
call	sub_407910
lea	ecx, [ebp+var_25]
call	nullsub_1
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_51F44F
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_51F458

loc_51F44F:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_51F458:
jmp	short loc_51F3E8

loc_51F45A:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_68]
jz	short loc_51F4AE
lea	ecx, [ebp+var_41]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_40]
call	sub_407D30
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
lea	ecx, [ebp+var_40]
call	sub_404510
mov	[ebp+var_26], al
lea	ecx, [ebp+var_40]
call	sub_407910
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	edx, [ebp+var_26]
test	edx, edx
jz	short loc_51F4AE
mov	eax, [ebp+var_68]
mov	[ebp+var_4], eax

loc_51F4AE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_51F3D0 endp

align 10h


; Attributes: bp-based frame

sub_51F4C0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_526BF0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_51F4C0 endp

align 10h


; Attributes: bp-based frame

sub_51F4F0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_51F50C

loc_51F503:
mov	edx, [ebp+var_8]
add	edx, 6Ch
mov	[ebp+var_8], edx

loc_51F50C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_51F541
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_51F53F
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_51F53F:
jmp	short loc_51F503

loc_51F541:
mov	esp, ebp
pop	ebp
retn
sub_51F4F0 endp

align 10h


; Attributes: bp-based frame

sub_51F550 proc	near

var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_D8], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
push	ecx
call	sub_5296E0
add	esp, 4
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setnz	dl
mov	[ebp+var_D9], dl
movzx	eax, [ebp+var_D9]
test	eax, eax
jz	loc_51F7EE
jmp	short loc_51F616

loc_51F60E:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_51F616:
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_DA], dl
movzx	eax, [ebp+var_DA]
test	eax, eax
jz	loc_51F6E4
mov	ecx, [ebp+arg_4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+var_84]
push	edx
call	sub_441C20
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_51F6DF
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_9C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ecx]
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_A0]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_51F834

loc_51F6DF:
jmp	loc_51F60E

loc_51F6E4:
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_B0], ecx
lea	edx, [ebp+var_B8]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D8]
add	ecx, 4
call	sub_526750
mov	[ebp+var_B4], eax
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_B8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+var_B4]
mov	[eax], ecx
mov	edx, [ebp+var_B4]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D8]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D8]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_C4]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_BC]
mov	[edx], eax
mov	ecx, [ebp+var_C4]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_51F834

loc_51F7EE:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D8]
call	sub_526C70
mov	[ebp+var_D4], eax
mov	eax, [ebp+var_D4]
mov	ecx, [eax]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_D0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_51F834:
mov	esp, ebp
pop	ebp
retn	8
sub_51F550 endp

align 10h


; Attributes: bp-based frame

sub_51F840 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_51F8A2
jmp	short loc_51F8BD

loc_51F8A2:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_526D70

loc_51F8BD:
mov	esp, ebp
pop	ebp
retn	4
sub_51F840 endp

align 10h


; Attributes: bp-based frame

sub_51F8D0 proc	near

var_62=	byte ptr -62h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_18], eax
mov	eax, [ebp+arg_4]
push	eax
call	sub_5296E0
add	esp, 4
xor	edx, edx
div	[ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_60]
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+eax*4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx+8]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_24]
mov	edx, [ecx+eax*4+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_8], eax
jmp	short loc_51F93F

loc_51F937:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_51F93F:
lea	eax, [ebp+var_34]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_34]
setnz	dl
mov	[ebp+var_61], dl
movzx	eax, [ebp+var_61]
test	eax, eax
jz	short loc_51F991
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_40], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
call	sub_441C20
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_51F991
jmp	short loc_51F937

loc_51F991:
lea	eax, [ebp+var_58]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_50]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_58]
setnz	dl
mov	[ebp+var_62], dl
movzx	eax, [ebp+var_62]
test	eax, eax
jz	short loc_51F9D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_51F9DC
jmp	short loc_51F9DC

loc_51F9D0:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_51F9DC:
mov	esp, ebp
pop	ebp
retn	8
sub_51F8D0 endp

align 10h


; Attributes: bp-based frame

sub_51F9F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_51FA37
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_525EB0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51FAE6

loc_51FA37:
cmp	[ebp+arg_10], 0
jnz	short loc_51FA6B
cmp	[ebp+arg_C], 0
jnz	short loc_51FA62
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_51FA6B

loc_51FA62:
mov	[ebp+var_34], 1
jmp	short loc_51FA72

loc_51FA6B:
mov	[ebp+var_34], 0

loc_51FA72:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_51FA84
and	[ebp+var_C], 0FFFFFFFEh

loc_51FA84:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_51FABA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_525EB0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_51FAB8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_51FAB8:
jmp	short loc_51FAE6

loc_51FABA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_525EB0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_51FAE6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_51FAE6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_51F9F0 endp

align 10h


; Attributes: bp-based frame

sub_51FB30 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_51FB4C:
cmp	[ebp+var_10], 0
jz	short loc_51FB93
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_51FB82
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_51FB8B

loc_51FB82:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_51FB8B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_51FB4C

loc_51FB93:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_51FC35
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_51FC26
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_51F9F0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_51FCAB
jmp	short loc_51FC35

loc_51FC26:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_51FC35:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_51FC90
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_51F9F0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_51FCAB

loc_51FC90:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_51FCAB:
mov	esp, ebp
pop	ebp
retn	8
sub_51FB30 endp

align 10h


; Attributes: bp-based frame

sub_51FCC0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_51FD07
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_525F00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_51FDBB

loc_51FD07:
cmp	[ebp+arg_10], 0
jnz	short loc_51FD40
cmp	[ebp+arg_C], 0
jnz	short loc_51FD37
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_51FD40

loc_51FD37:
mov	[ebp+var_44], 1
jmp	short loc_51FD47

loc_51FD40:
mov	[ebp+var_44], 0

loc_51FD47:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_51FD59
and	[ebp+var_C], 0FFFFFFFEh

loc_51FD59:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_51FD8F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_525F00
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_51FD8D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_51FD8D:
jmp	short loc_51FDBB

loc_51FD8F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_525F00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_51FDBB
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_51FDBB:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_51FCC0 endp

align 10h


; Attributes: bp-based frame

sub_51FE00 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_51FE28:
cmp	[ebp+var_10], 0
jz	short loc_51FE7D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_51FE66
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_51FE72

loc_51FE66:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_51FE72:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_51FE28

loc_51FE7D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_51FF2B
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_51FF1C
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_51FCC0
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_51FFAF
jmp	short loc_51FF2B

loc_51FF1C:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_51FF2B:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_51FF94
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_51FCC0
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_51FFAF

loc_51FF94:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_51FFAF:
mov	esp, ebp
pop	ebp
retn	8
sub_51FE00 endp

align 10h


; Attributes: bp-based frame

sub_51FFC0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	eax, [ecx]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setnz	dl
mov	[ebp+var_CD], dl
movzx	eax, [ebp+var_CD]
test	eax, eax
jz	loc_520299
jmp	short loc_52007F

loc_520077:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_52007F:
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_CE], dl
movzx	eax, [ebp+var_CE]
test	eax, eax
jz	loc_52018F
mov	ecx, [ebp+arg_4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_78]
mov	[ebp+var_D4], ecx
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_D8]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_520112
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_D8]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_520112
mov	[ebp+var_DC], 1
jmp	short loc_52011C

loc_520112:
mov	[ebp+var_DC], 0

loc_52011C:
movzx	eax, byte ptr [ebp+var_DC]
test	eax, eax
jz	short loc_52018A
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+var_88]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5202DF

loc_52018A:
jmp	loc_520077

loc_52018F:
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
lea	edx, [ebp+var_AC]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A4]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 4
call	sub_526790
mov	[ebp+var_A8], eax
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+var_A8]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_CC]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_B8]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B0]
mov	[edx], eax
mov	ecx, [ebp+var_B8]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_BC]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5202DF

loc_520299:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_527000
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5202DF:
mov	esp, ebp
pop	ebp
retn	8
sub_51FFC0 endp

align 10h


; Attributes: bp-based frame

sub_5202F0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_520352
jmp	short loc_52036D

loc_520352:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_520380

loc_52036D:
mov	esp, ebp
pop	ebp
retn	4
sub_5202F0 endp

align 10h


; Attributes: bp-based frame

sub_520380 proc	near

var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_F0], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F0]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_5203F0:
mov	edx, [ebp+var_F0]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5205EB
mov	edx, [ebp+var_F0]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
jmp	short loc_520464

loc_520454:
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_20], ecx

loc_520464:
lea	edx, [ebp+var_70]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_68]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_70]
setnz	cl
mov	[ebp+var_F1], cl
movzx	edx, [ebp+var_F1]
test	edx, edx
jz	loc_52051A
mov	eax, [ebp+var_2C]
add	eax, 8
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_7C]
mov	[ebp+var_F8], ecx
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_F8]
mov	ecx, [ebp+var_FC]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_520500
mov	eax, [ebp+var_F8]
mov	ecx, [ebp+var_FC]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_520500
mov	[ebp+var_100], 1
jmp	short loc_52050A

loc_520500:
mov	[ebp+var_100], 0

loc_52050A:
movzx	eax, byte ptr [ebp+var_100]
test	eax, eax
jz	short loc_52051A
jmp	loc_520454

loc_52051A:
mov	ecx, [ebp+var_24]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_90], eax
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_28], edx
push	ecx
mov	[ebp+var_98], esp
mov	eax, [ebp+var_20]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
push	ecx
mov	[ebp+var_9C], esp
mov	eax, [ebp+var_F0]
add	eax, 4
mov	ecx, [ebp+var_9C]
mov	[ecx], eax
mov	edx, [ebp+var_F0]
add	edx, 4
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	eax, [ebp+var_28]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
lea	ecx, [ebp+var_C]
call	sub_525F50
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_24]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_5203F0

loc_5205EB:
mov	eax, [ebp+var_F0]
add	eax, 4
mov	[ebp+var_E4], eax
xor	ecx, ecx
mov	[ebp+var_DA], cl
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E4]
mov	[edx], ecx
mov	eax, [ebp+var_E0]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_502D10
mov	esp, ebp
pop	ebp
retn	4
sub_520380 endp

align 10h


; Attributes: bp-based frame

sub_520650 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_520697
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_526040
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_520774

loc_520697:
cmp	[ebp+arg_10], 0
jnz	short loc_5206F9
cmp	[ebp+arg_C], 0
jnz	short loc_5206F0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5206E1
jb	short loc_5206D8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5206E1

loc_5206D8:
mov	[ebp+var_3C], 1
jmp	short loc_5206E8

loc_5206E1:
mov	[ebp+var_3C], 0

loc_5206E8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5206F9

loc_5206F0:
mov	[ebp+var_40], 1
jmp	short loc_520700

loc_5206F9:
mov	[ebp+var_40], 0

loc_520700:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_520712
and	[ebp+var_C], 0FFFFFFFEh

loc_520712:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_520748
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_526040
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_520746
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_520746:
jmp	short loc_520774

loc_520748:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_526040
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_520774
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_520774:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_520650 endp

align 10h


; Attributes: bp-based frame

sub_5207C0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5207DC:
cmp	[ebp+var_10], 0
jz	short loc_520853
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_520822
jb	short loc_520819
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_520822

loc_520819:
mov	[ebp+var_64], 1
jmp	short loc_520829

loc_520822:
mov	[ebp+var_64], 0

loc_520829:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_520842
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_52084B

loc_520842:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_52084B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5207DC

loc_520853:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5208F5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5208E6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_520650
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_52099B
jmp	short loc_5208F5

loc_5208E6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5208F5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_52092F
jb	short loc_520926
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_52092F

loc_520926:
mov	[ebp+var_78], 1
jmp	short loc_520936

loc_52092F:
mov	[ebp+var_78], 0

loc_520936:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_520980
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_520650
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_52099B

loc_520980:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_52099B:
mov	esp, ebp
pop	ebp
retn	8
sub_5207C0 endp

align 10h


; Attributes: bp-based frame

sub_5209B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5209F7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6F30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_520AAA

loc_5209F7:
cmp	[ebp+arg_10], 0
jnz	short loc_520A2F
cmp	[ebp+arg_C], 0
jnz	short loc_520A26
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_520A2F

loc_520A26:
mov	[ebp+var_34], 1
jmp	short loc_520A36

loc_520A2F:
mov	[ebp+var_34], 0

loc_520A36:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_520A48
and	[ebp+var_C], 0FFFFFFFEh

loc_520A48:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_520A7E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6F30
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_520A7C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_520A7C:
jmp	short loc_520AAA

loc_520A7E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6F30
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_520AAA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_520AAA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5209B0 endp

align 10h


; Attributes: bp-based frame

sub_520AF0 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_520D93
jmp	short loc_520BB5

loc_520BAD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_520BB5:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_520C89
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jz	short loc_520C84
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_520DD9

loc_520C84:
jmp	loc_520BAD

loc_520C89:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_5267D0
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_520DD9

loc_520D93:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_527190
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_520DD9:
mov	esp, ebp
pop	ebp
retn	8
sub_520AF0 endp

align 10h


; Attributes: bp-based frame

sub_520DE0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_520E42
jmp	short loc_520E5D

loc_520E42:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_527290

loc_520E5D:
mov	esp, ebp
pop	ebp
retn	4
sub_520DE0 endp

align 10h


; Attributes: bp-based frame

sub_520E70 proc	near

var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_18], eax
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
xor	edx, edx
div	[ebp+var_18]
mov	[ebp+var_C], edx
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_20]
mov	eax, [edx+ecx*4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_28]
mov	eax, [edx+ecx*4+4]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_8], ecx
jmp	short loc_520EDE

loc_520ED6:
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_520EDE:
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_30]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setnz	al
mov	[ebp+var_59], al
movzx	ecx, [ebp+var_59]
test	ecx, ecx
jz	short loc_520F33
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_44], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+var_58]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jnz	short loc_520F33
jmp	short loc_520ED6

loc_520F33:
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_50]
setnz	al
mov	[ebp+var_5A], al
movzx	ecx, [ebp+var_5A]
test	ecx, ecx
jz	short loc_520F72
mov	edx, [ebp+var_4]
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_54]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_520F7E
jmp	short loc_520F7E

loc_520F72:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	eax, [ebp+arg_0]

loc_520F7E:
mov	esp, ebp
pop	ebp
retn	8
sub_520E70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_520F90(void *)
sub_520F90 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_4E6240
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_520FBF
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_520FBF:
mov	esp, ebp
pop	ebp
retn
sub_520F90 endp

align 10h


; Attributes: bp-based frame

sub_520FD0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_521017
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_526110
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5210CB

loc_521017:
cmp	[ebp+arg_10], 0
jnz	short loc_521050
cmp	[ebp+arg_C], 0
jnz	short loc_521047
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_521050

loc_521047:
mov	[ebp+var_44], 1
jmp	short loc_521057

loc_521050:
mov	[ebp+var_44], 0

loc_521057:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_521069
and	[ebp+var_C], 0FFFFFFFEh

loc_521069:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_52109F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_526110
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_52109D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_52109D:
jmp	short loc_5210CB

loc_52109F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_526110
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5210CB
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5210CB:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_520FD0 endp

align 10h


; Attributes: bp-based frame

sub_521110 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_521138:
cmp	[ebp+var_10], 0
jz	short loc_52118D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_521176
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_521182

loc_521176:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_521182:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_521138

loc_52118D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_52123B
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_52122C
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_520FD0
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_5212BF
jmp	short loc_52123B

loc_52122C:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_52123B:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_5212A4
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_520FD0
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5212BF

loc_5212A4:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_5212BF:
mov	esp, ebp
pop	ebp
retn	8
sub_521110 endp

align 10h


; Attributes: bp-based frame

sub_5212D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_521317
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_526170
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5213CA

loc_521317:
cmp	[ebp+arg_10], 0
jnz	short loc_52134F
cmp	[ebp+arg_C], 0
jnz	short loc_521346
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52134F

loc_521346:
mov	[ebp+var_34], 1
jmp	short loc_521356

loc_52134F:
mov	[ebp+var_34], 0

loc_521356:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_521368
and	[ebp+var_C], 0FFFFFFFEh

loc_521368:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_52139E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_526170
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_52139C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_52139C:
jmp	short loc_5213CA

loc_52139E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_526170
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5213CA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5213CA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5212D0 endp

align 10h


; Attributes: bp-based frame

sub_521410 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_52142C:
cmp	[ebp+var_10], 0
jz	short loc_521477
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_521466
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_52146F

loc_521466:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_52146F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_52142C

loc_521477:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_521519
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_52150A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5212D0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_521593
jmp	short loc_521519

loc_52150A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_521519:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_521578
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5212D0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_521593

loc_521578:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_521593:
mov	esp, ebp
pop	ebp
retn	8
sub_521410 endp

align 10h


; Attributes: bp-based frame

sub_5215A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5215E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5261C0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_52169A

loc_5215E7:
cmp	[ebp+arg_10], 0
jnz	short loc_52161F
cmp	[ebp+arg_C], 0
jnz	short loc_521616
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52161F

loc_521616:
mov	[ebp+var_34], 1
jmp	short loc_521626

loc_52161F:
mov	[ebp+var_34], 0

loc_521626:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_521638
and	[ebp+var_C], 0FFFFFFFEh

loc_521638:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_52166E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5261C0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_52166C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_52166C:
jmp	short loc_52169A

loc_52166E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5261C0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_52169A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_52169A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5215A0 endp

align 10h


; Attributes: bp-based frame

sub_5216E0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5216FC:
cmp	[ebp+var_10], 0
jz	short loc_521747
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_521736
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_52173F

loc_521736:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_52173F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5216FC

loc_521747:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5217E9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5217DA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5215A0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_521863
jmp	short loc_5217E9

loc_5217DA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5217E9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_521848
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5215A0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_521863

loc_521848:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_521863:
mov	esp, ebp
pop	ebp
retn	8
sub_5216E0 endp

align 10h


; Attributes: bp-based frame

sub_521870 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5218B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_526210
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_52196A

loc_5218B7:
cmp	[ebp+arg_10], 0
jnz	short loc_5218EF
cmp	[ebp+arg_C], 0
jnz	short loc_5218E6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5218EF

loc_5218E6:
mov	[ebp+var_34], 1
jmp	short loc_5218F6

loc_5218EF:
mov	[ebp+var_34], 0

loc_5218F6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_521908
and	[ebp+var_C], 0FFFFFFFEh

loc_521908:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_52193E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_526210
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_52193C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_52193C:
jmp	short loc_52196A

loc_52193E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_526210
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_52196A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_52196A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_521870 endp

align 10h


; Attributes: bp-based frame

sub_5219B0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5219CC:
cmp	[ebp+var_10], 0
jz	short loc_521A17
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_521A06
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_521A0F

loc_521A06:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_521A0F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5219CC

loc_521A17:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_521AB9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_521AAA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_521870
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_521B33
jmp	short loc_521AB9

loc_521AAA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_521AB9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_521B18
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_521870
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_521B33

loc_521B18:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_521B33:
mov	esp, ebp
pop	ebp
retn	8
sub_5219B0 endp

align 10h


; Attributes: bp-based frame

sub_521B40 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_527590
add	esp, 14h
pop	ebp
retn
sub_521B40 endp



; Attributes: bp-based frame

sub_521B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h

loc_521B66:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_8]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521B85
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	[ebp+arg_0], ecx
jmp	short loc_521B66

loc_521B85:
mov	edx, [ebp+arg_4]
sub	edx, 0Ch
mov	[ebp+arg_4], edx

loc_521B8E:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [eax]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521BAD
mov	ecx, [ebp+arg_4]
sub	ecx, 0Ch
mov	[ebp+arg_4], ecx
jmp	short loc_521B8E

loc_521BAD:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_521BC0
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
jmp	short loc_521BDB

loc_521BC0:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4CF7E0
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 0Ch
mov	[ebp+arg_0], eax
jmp	short loc_521B66

loc_521BDB:
mov	esp, ebp
pop	ebp
retn
sub_521B60 endp

align 10h


; Attributes: bp-based frame

sub_521BE0 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_521BF3
jmp	loc_521C9A

loc_521BF3:
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
jmp	short loc_521C07

loc_521BFE:
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	[ebp+var_4], edx

loc_521C07:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	loc_521C9A
mov	cl, [ebp+arg_C]
mov	[ebp+var_1D], cl
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [edx+4]
mov	[ebp+var_18], ecx
mov	edx, [edx+8]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_1C]
xor	edx, edx
cmp	ecx, [eax]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521C6E
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F4430
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	[ecx+8], edx
jmp	short loc_521C95

loc_521C6E:
movzx	eax, [ebp+var_1D]
push	eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
push	eax
call	sub_52A620
add	esp, 14h

loc_521C95:
jmp	loc_521BFE

loc_521C9A:
mov	esp, ebp
pop	ebp
retn
sub_521BE0 endp

align 10h


; Attributes: bp-based frame

sub_521CA0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5276F0
add	esp, 14h
pop	ebp
retn
sub_521CA0 endp



; Attributes: bp-based frame

sub_521CC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_521D38
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521D06
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
jmp	loc_521D8B
jmp	short loc_521D36

loc_521D06:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	ecx, [edx+4]
xor	edx, edx
cmp	ecx, [eax+4]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521D2B
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
jmp	short loc_521D8B
jmp	short loc_521D36

loc_521D2B:
mov	edx, [ebp+arg_0]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
jmp	short loc_521D8B

loc_521D36:
jmp	short loc_521D8B

loc_521D38:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_521D5D
mov	edx, [ebp+arg_0]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
jmp	short loc_521D8B
jmp	short loc_521D8B

loc_521D5D:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_521D82
mov	edx, [ebp+arg_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
jmp	short loc_521D8B
jmp	short loc_521D8B

loc_521D82:
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]

loc_521D8B:
mov	esp, ebp
pop	ebp
retn
sub_521CC0 endp

align 10h


; Attributes: bp-based frame

sub_521D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h

loc_521D96:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
xor	edx, edx
cmp	ecx, [ebp+arg_C]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521DB6
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+arg_0], ecx
jmp	short loc_521D96

loc_521DB6:
mov	edx, [ebp+arg_4]
sub	edx, 10h
mov	[ebp+arg_4], edx

loc_521DBF:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_C]
xor	edx, edx
cmp	ecx, [eax+4]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521DDF
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
mov	[ebp+arg_4], ecx
jmp	short loc_521DBF

loc_521DDF:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_521DF2
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
jmp	short loc_521E0D

loc_521DF2:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_527800
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+arg_0], eax
jmp	short loc_521D96

loc_521E0D:
mov	esp, ebp
pop	ebp
retn
sub_521D90 endp

align 10h


; Attributes: bp-based frame

sub_521E20 proc	near

var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_521E33
jmp	loc_521EED

loc_521E33:
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+var_4], ecx
jmp	short loc_521E47

loc_521E3E:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4], edx

loc_521E47:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	loc_521EED
mov	cl, [ebp+arg_C]
mov	[ebp+var_21], cl
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [edx+4]
mov	[ebp+var_1C], ecx
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
xor	ecx, ecx
cmp	eax, [edx+4]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_521EBB
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5F4430
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
jmp	short loc_521EE8

loc_521EBB:
movzx	eax, [ebp+var_21]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_52A740
add	esp, 18h

loc_521EE8:
jmp	loc_521E3E

loc_521EED:
mov	esp, ebp
pop	ebp
retn
sub_521E20 endp

align 10h


; Attributes: bp-based frame

sub_521F00 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_527900
add	esp, 14h
pop	ebp
retn
sub_521F00 endp



; Attributes: bp-based frame

sub_521F20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch

loc_521F26:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
xor	edx, edx
cmp	ecx, [ebp+arg_C]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521F46
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+arg_0], ecx
jmp	short loc_521F26

loc_521F46:
mov	edx, [ebp+arg_4]
sub	edx, 8
mov	[ebp+arg_4], edx

loc_521F4F:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_C]
xor	edx, edx
cmp	ecx, [eax+4]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_521F6F
mov	ecx, [ebp+arg_4]
sub	ecx, 8
mov	[ebp+arg_4], ecx
jmp	short loc_521F4F

loc_521F6F:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_521F82
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
jmp	short loc_521F9D

loc_521F82:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_47F570
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+arg_0], eax
jmp	short loc_521F26

loc_521F9D:
mov	esp, ebp
pop	ebp
retn
sub_521F20 endp

align 10h


; Attributes: bp-based frame

sub_521FB0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_521FC3
jmp	loc_52204A

loc_521FC3:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_4], ecx
jmp	short loc_521FD7

loc_521FCE:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_521FD7:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_52204A
mov	cl, [ebp+arg_C]
mov	[ebp+var_19], cl
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [edx+4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
xor	ecx, ecx
cmp	eax, [edx+4]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52202F
mov	eax, [ebp+var_4]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5F4430
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
jmp	short loc_522048

loc_52202F:
movzx	eax, [ebp+var_19]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_52A850
add	esp, 10h

loc_522048:
jmp	short loc_521FCE

loc_52204A:
mov	esp, ebp
pop	ebp
retn
sub_521FB0 endp

align 10h


; Attributes: bp-based frame

sub_522050 proc	near

var_5E=	byte ptr -5Eh
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_1C], eax
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
xor	edx, edx
div	[ebp+var_1C]
mov	[ebp+var_C], edx
mov	edx, [ebp+var_5C]
mov	eax, [edx+8]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_24]
mov	eax, [edx+ecx*4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_2C]
mov	eax, [edx+ecx*4+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_8], ecx
jmp	short loc_5220BE

loc_5220B6:
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_5220BE:
lea	ecx, [ebp+var_3C]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_34]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_3C]
setnz	al
mov	[ebp+var_5D], al
movzx	ecx, [ebp+var_5D]
test	ecx, ecx
jz	short loc_52211B
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_48], edx
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_5C]
add	ecx, 1
call	sub_40A230
movzx	edx, al
test	edx, edx
jnz	short loc_52211B
jmp	short loc_5220B6

loc_52211B:
lea	eax, [ebp+var_54]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_4C]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_54]
setnz	dl
mov	[ebp+var_5E], dl
movzx	eax, [ebp+var_5E]
test	eax, eax
jz	short loc_52215A
mov	ecx, [ebp+var_4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_58]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_522166
jmp	short loc_522166

loc_52215A:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_522166:
mov	esp, ebp
pop	ebp
retn	8
sub_522050 endp

align 10h


; Attributes: bp-based frame

sub_522170 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	edx, [ebp+var_20]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D10
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5221AE
push	1
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	edx, [ebp+var_20]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D20
jmp	loc_52224F

loc_5221AE:
mov	ecx, [ebp+var_4]
call	sub_406880
mov	esi, eax
mov	ecx, [ebp+var_4]
call	sub_41ACE0
cmp	esi, eax
jz	short loc_522219
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	edx, [ebp+var_20]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_404490
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
add	ecx, [edx+4]
call	sub_404490
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_0]
push	ecx
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_20]
push	edx
call	sub_527A90
add	esp, 18h
jmp	short loc_52224F

loc_522219:
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	edx, [ebp+var_20]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_404490
mov	[ebp+var_1C], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_10], eax
movzx	ecx, [ebp+arg_0]
push	ecx
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_527BE0
add	esp, 14h

loc_52224F:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_522170 endp

align 10h


; Attributes: bp-based frame

sub_522260 proc	near

var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_18], eax
mov	eax, [ebp+arg_4]
mov	eax, [eax]
xor	edx, edx
div	[ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_54]
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+eax*4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+8]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_24]
mov	edx, [ecx+eax*4+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_8], eax
jmp	short loc_5222C8

loc_5222C0:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_5222C8:
lea	eax, [ebp+var_34]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_34]
setnz	dl
mov	[ebp+var_55], dl
movzx	eax, [ebp+var_55]
test	eax, eax
jz	short loc_522344
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_5C], eax
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_60]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_522330
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_60]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jnz	short loc_522330
mov	[ebp+var_64], 1
jmp	short loc_522337

loc_522330:
mov	[ebp+var_64], 0

loc_522337:
movzx	edx, byte ptr [ebp+var_64]
test	edx, edx
jnz	short loc_522344
jmp	loc_5222C0

loc_522344:
lea	eax, [ebp+var_4C]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_4C]
setnz	dl
mov	[ebp+var_65], dl
movzx	eax, [ebp+var_65]
test	eax, eax
jz	short loc_522383
mov	ecx, [ebp+var_4]
mov	[ebp+var_50], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_50]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_52238F
jmp	short loc_52238F

loc_522383:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_52238F:
mov	esp, ebp
pop	ebp
retn	8
sub_522260 endp

align 10h


; Attributes: bp-based frame

sub_5223A0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	eax, [ecx]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setnz	dl
mov	[ebp+var_CD], dl
movzx	eax, [ebp+var_CD]
test	eax, eax
jz	loc_522679
jmp	short loc_52245F

loc_522457:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_52245F:
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_CE], dl
movzx	eax, [ebp+var_CE]
test	eax, eax
jz	loc_52256F
mov	ecx, [ebp+arg_4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_78]
mov	[ebp+var_D4], ecx
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_D8]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_5224F2
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_D8]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_5224F2
mov	[ebp+var_DC], 1
jmp	short loc_5224FC

loc_5224F2:
mov	[ebp+var_DC], 0

loc_5224FC:
movzx	eax, byte ptr [ebp+var_DC]
test	eax, eax
jz	short loc_52256A
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+var_88]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5226BF

loc_52256A:
jmp	loc_522457

loc_52256F:
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
lea	edx, [ebp+var_AC]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A4]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 4
call	sub_5268A0
mov	[ebp+var_A8], eax
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+var_A8]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_CC]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_B8]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B0]
mov	[edx], eax
mov	ecx, [ebp+var_B8]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_BC]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5226BF

loc_522679:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_527D80
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5226BF:
mov	esp, ebp
pop	ebp
retn	8
sub_5223A0 endp

align 10h


; Attributes: bp-based frame

sub_5226D0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_522732
jmp	short loc_52274D

loc_522732:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_522760

loc_52274D:
mov	esp, ebp
pop	ebp
retn	4
sub_5226D0 endp

align 10h


; Attributes: bp-based frame

sub_522760 proc	near

var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_F0], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F0]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_5227D0:
mov	edx, [ebp+var_F0]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5229CB
mov	edx, [ebp+var_F0]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
jmp	short loc_522844

loc_522834:
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_20], ecx

loc_522844:
lea	edx, [ebp+var_70]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_68]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_70]
setnz	cl
mov	[ebp+var_F1], cl
movzx	edx, [ebp+var_F1]
test	edx, edx
jz	loc_5228FA
mov	eax, [ebp+var_2C]
add	eax, 8
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_7C]
mov	[ebp+var_F8], ecx
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_F8]
mov	ecx, [ebp+var_FC]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_5228E0
mov	eax, [ebp+var_F8]
mov	ecx, [ebp+var_FC]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_5228E0
mov	[ebp+var_100], 1
jmp	short loc_5228EA

loc_5228E0:
mov	[ebp+var_100], 0

loc_5228EA:
movzx	eax, byte ptr [ebp+var_100]
test	eax, eax
jz	short loc_5228FA
jmp	loc_522834

loc_5228FA:
mov	ecx, [ebp+var_24]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_90], eax
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_28], edx
push	ecx
mov	[ebp+var_98], esp
mov	eax, [ebp+var_20]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
push	ecx
mov	[ebp+var_9C], esp
mov	eax, [ebp+var_F0]
add	eax, 4
mov	ecx, [ebp+var_9C]
mov	[ecx], eax
mov	edx, [ebp+var_F0]
add	edx, 4
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	eax, [ebp+var_28]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
lea	ecx, [ebp+var_C]
call	sub_526260
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_24]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_5227D0

loc_5229CB:
mov	eax, [ebp+var_F0]
add	eax, 4
mov	[ebp+var_E4], eax
xor	ecx, ecx
mov	[ebp+var_DA], cl
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E4]
mov	[edx], ecx
mov	eax, [ebp+var_E0]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_5101E0
mov	esp, ebp
pop	ebp
retn	4
sub_522760 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_522A30(void *, int)
sub_522A30 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_522A77
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_50FA70
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_522A7E

loc_522A77:
mov	[ebp+var_28], 0

loc_522A7E:
mov	esp, ebp
pop	ebp
retn
sub_522A30 endp

align 10h


; Attributes: bp-based frame

sub_522A90 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_527EE0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_522A90 endp

align 10h


; Attributes: bp-based frame

sub_522AC0 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_522D63
jmp	short loc_522B85

loc_522B7D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_522B85:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_522C59
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jz	short loc_522C54
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_522DA9

loc_522C54:
jmp	loc_522B7D

loc_522C59:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_526900
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_522DA9

loc_522D63:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_527F60
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_522DA9:
mov	esp, ebp
pop	ebp
retn	8
sub_522AC0 endp

align 10h


; Attributes: bp-based frame

sub_522DB0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_522E12
jmp	short loc_522E2D

loc_522E12:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_528060

loc_522E2D:
mov	esp, ebp
pop	ebp
retn	4
sub_522DB0 endp

align 10h


; Attributes: bp-based frame

sub_522E40 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_5230E3
jmp	short loc_522F05

loc_522EFD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_522F05:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_522FD9
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jz	short loc_522FD4
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_523129

loc_522FD4:
jmp	loc_522EFD

loc_522FD9:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_526940
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_523129

loc_5230E3:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_528300
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_523129:
mov	esp, ebp
pop	ebp
retn	8
sub_522E40 endp

align 10h


; Attributes: bp-based frame

sub_523130 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_523192
jmp	short loc_5231AD

loc_523192:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_528400

loc_5231AD:
mov	esp, ebp
pop	ebp
retn	4
sub_523130 endp

align 10h


; Attributes: bp-based frame

sub_5231C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_523207
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_526350
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5232BA

loc_523207:
cmp	[ebp+arg_10], 0
jnz	short loc_52323F
cmp	[ebp+arg_C], 0
jnz	short loc_523236
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52323F

loc_523236:
mov	[ebp+var_34], 1
jmp	short loc_523246

loc_52323F:
mov	[ebp+var_34], 0

loc_523246:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_523258
and	[ebp+var_C], 0FFFFFFFEh

loc_523258:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_52328E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_526350
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_52328C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_52328C:
jmp	short loc_5232BA

loc_52328E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_526350
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5232BA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5232BA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5231C0 endp

align 10h


; Attributes: bp-based frame

sub_523300 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_52331C:
cmp	[ebp+var_10], 0
jz	short loc_523367
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_523356
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_52335F

loc_523356:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_52335F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_52331C

loc_523367:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_523409
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5233FA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5231C0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_523483
jmp	short loc_523409

loc_5233FA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_523409:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_523468
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5231C0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_523483

loc_523468:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_523483:
mov	esp, ebp
pop	ebp
retn	8
sub_523300 endp

align 10h


; Attributes: bp-based frame

sub_523490 proc	near

var_C0=	dword ptr -0C0h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_52351A
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+8]
sub	eax, [edx+4]
sar	eax, 2
cmp	eax, [ebp+var_4]
jb	short loc_5234FF
xor	ecx, ecx
mov	[ebp+var_5], cl
lea	edx, [ebp+var_5]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5286A0
jmp	short loc_52351A

loc_5234FF:
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5287F0

loc_52351A:
mov	esp, ebp
pop	ebp
retn	10h
sub_523490 endp



; Attributes: bp-based frame

sub_523520 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_523567
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5263A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_52361A

loc_523567:
cmp	[ebp+arg_10], 0
jnz	short loc_52359F
cmp	[ebp+arg_C], 0
jnz	short loc_523596
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52359F

loc_523596:
mov	[ebp+var_34], 1
jmp	short loc_5235A6

loc_52359F:
mov	[ebp+var_34], 0

loc_5235A6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5235B8
and	[ebp+var_C], 0FFFFFFFEh

loc_5235B8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5235EE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5263A0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5235EC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5235EC:
jmp	short loc_52361A

loc_5235EE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5263A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_52361A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_52361A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_523520 endp

align 10h


; Attributes: bp-based frame

sub_523660 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_52367C:
cmp	[ebp+var_10], 0
jz	short loc_5236C7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5236B6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5236BF

loc_5236B6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5236BF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_52367C

loc_5236C7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_523769
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_52375A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_523520
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5237E3
jmp	short loc_523769

loc_52375A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_523769:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5237C8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_523520
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5237E3

loc_5237C8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5237E3:
mov	esp, ebp
pop	ebp
retn	8
sub_523660 endp

align 10h


; Attributes: bp-based frame

sub_5237F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_528900
add	esp, 14h
pop	ebp
retn
sub_5237F0 endp



; Attributes: bp-based frame

sub_523810 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+4]
comiss	xmm0, dword ptr	[ecx+4]
jbe	short loc_523830
mov	[ebp+var_1C], 1
jmp	short loc_523837

loc_523830:
mov	[ebp+var_1C], 0

loc_523837:
movzx	edx, byte ptr [ebp+var_1C]
test	edx, edx
jz	short loc_5238BE
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[eax+4]
comiss	xmm0, dword ptr	[ecx+4]
jbe	short loc_523859
mov	[ebp+var_20], 1
jmp	short loc_523860

loc_523859:
mov	[ebp+var_20], 0

loc_523860:
movzx	edx, byte ptr [ebp+var_20]
test	edx, edx
jz	short loc_523878
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
jmp	loc_523933
jmp	short loc_5238BC

loc_523878:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+4]
comiss	xmm0, dword ptr	[edx+4]
jbe	short loc_523892
mov	[ebp+var_24], 1
jmp	short loc_523899

loc_523892:
mov	[ebp+var_24], 0

loc_523899:
movzx	eax, byte ptr [ebp+var_24]
test	eax, eax
jz	short loc_5238B1
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
jmp	loc_523933
jmp	short loc_5238BC

loc_5238B1:
mov	edx, [ebp+arg_0]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
jmp	short loc_523933

loc_5238BC:
jmp	short loc_523933

loc_5238BE:
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+4]
comiss	xmm0, dword ptr	[ecx+4]
jbe	short loc_5238D8
mov	[ebp+var_28], 1
jmp	short loc_5238DF

loc_5238D8:
mov	[ebp+var_28], 0

loc_5238DF:
movzx	edx, byte ptr [ebp+var_28]
test	edx, edx
jz	short loc_5238F4
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
jmp	short loc_523933
jmp	short loc_523933

loc_5238F4:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
comiss	xmm0, dword ptr	[edx+4]
jbe	short loc_52390E
mov	[ebp+var_2C], 1
jmp	short loc_523915

loc_52390E:
mov	[ebp+var_2C], 0

loc_523915:
movzx	eax, byte ptr [ebp+var_2C]
test	eax, eax
jz	short loc_52392A
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
jmp	short loc_523933
jmp	short loc_523933

loc_52392A:
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]

loc_523933:
mov	esp, ebp
pop	ebp
retn
sub_523810 endp

align 10h


; Attributes: bp-based frame

sub_523940 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_24=	byte ptr  2Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_523940
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D4h

loc_52395E:
mov	eax, [ebp+arg_0]
movss	xmm0, [ebp+arg_C]
comiss	xmm0, dword ptr	[eax+4]
jbe	short loc_523978
mov	[ebp+var_DC], 1
jmp	short loc_523982

loc_523978:
mov	[ebp+var_DC], 0

loc_523982:
movzx	ecx, byte ptr [ebp+var_DC]
test	ecx, ecx
jz	short loc_523998
mov	edx, [ebp+arg_0]
add	edx, 40h
mov	[ebp+arg_0], edx
jmp	short loc_52395E

loc_523998:
mov	eax, [ebp+arg_4]
sub	eax, 40h
mov	[ebp+arg_4], eax

loc_5239A1:
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
comiss	xmm0, [ebp+arg_C]
jbe	short loc_5239BB
mov	[ebp+var_E0], 1
jmp	short loc_5239C5

loc_5239BB:
mov	[ebp+var_E0], 0

loc_5239C5:
movzx	edx, byte ptr [ebp+var_E0]
test	edx, edx
jz	short loc_5239DB
mov	eax, [ebp+arg_4]
sub	eax, 40h
mov	[ebp+arg_4], eax
jmp	short loc_5239A1

loc_5239DB:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jb	short loc_523A0B
mov	edx, [ebp+arg_0]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_24]
call	sub_436CF0
mov	eax, [ebp+var_10]
jmp	short loc_523A46

loc_523A0B:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_519230
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 40h
mov	[ebp+arg_0], edx
jmp	loc_52395E
mov	[ebp+var_4], 2
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_24]
call	sub_436CF0

loc_523A46:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_523940 endp

align 10h


; Attributes: bp-based frame

sub_523A60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_523A70
jmp	short loc_523AB1

loc_523A70:
mov	ecx, [ebp+arg_0]
add	ecx, 40h
mov	[ebp+var_4], ecx
jmp	short loc_523A84

loc_523A7B:
mov	edx, [ebp+var_4]
add	edx, 40h
mov	[ebp+var_4], edx

loc_523A84:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_523AB1
movzx	ecx, [ebp+arg_C]
push	ecx
sub	esp, 40h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_44CC50
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_528A30
add	esp, 4Ch
jmp	short loc_523A7B

loc_523AB1:
mov	esp, ebp
pop	ebp
retn
sub_523A60 endp

align 10h


; Attributes: bp-based frame

sub_523AC0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_528C20
add	esp, 14h
pop	ebp
retn
sub_523AC0 endp

align 10h


; Attributes: bp-based frame

sub_523AE0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h

loc_523AE6:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
call	[ebp+arg_C]
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_523B08
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+arg_0], ecx
jmp	short loc_523AE6

loc_523B08:
mov	edx, [ebp+arg_4]
sub	edx, 4
mov	[ebp+arg_4], edx

loc_523B11:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	[ebp+arg_C]
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_523B33
mov	ecx, [ebp+arg_4]
sub	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_523B11

loc_523B33:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_523B40
mov	eax, [ebp+arg_0]
jmp	short loc_523B5B

loc_523B40:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_47F840
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
jmp	short loc_523AE6

loc_523B5B:
mov	esp, ebp
pop	ebp
retn
sub_523AE0 endp

align 10h


; Attributes: bp-based frame

sub_523B60 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_523B70
jmp	short loc_523BE2

loc_523B70:
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_523B84

loc_523B7B:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_523B84:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_523BE2
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	[ebp+arg_C]
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_523BCC
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F4430
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_14]
mov	[ecx], edx
jmp	short loc_523BE0

loc_523BCC:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_5CAC00
add	esp, 0Ch

loc_523BE0:
jmp	short loc_523B7B

loc_523BE2:
mov	esp, ebp
pop	ebp
retn
sub_523B60 endp

align 10h


; Attributes: bp-based frame

sub_523BF0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_523C37
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E910
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_523CE6

loc_523C37:
cmp	[ebp+arg_10], 0
jnz	short loc_523C6B
cmp	[ebp+arg_C], 0
jnz	short loc_523C62
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_523C6B

loc_523C62:
mov	[ebp+var_34], 1
jmp	short loc_523C72

loc_523C6B:
mov	[ebp+var_34], 0

loc_523C72:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_523C84
and	[ebp+var_C], 0FFFFFFFEh

loc_523C84:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_523CBA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_51E910
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_523CB8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_523CB8:
jmp	short loc_523CE6

loc_523CBA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_51E910
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_523CE6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_523CE6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_523BF0 endp

align 10h


; Attributes: bp-based frame

sub_523D30 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_523D4C:
cmp	[ebp+var_10], 0
jz	short loc_523D93
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_523D82
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_523D8B

loc_523D82:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_523D8B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_523D4C

loc_523D93:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_523E35
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_523E26
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_523BF0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_523EAB
jmp	short loc_523E35

loc_523E26:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_523E35:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_523E90
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_523BF0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_523EAB

loc_523E90:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_523EAB:
mov	esp, ebp
pop	ebp
retn	8
sub_523D30 endp

align 10h


; Attributes: bp-based frame

sub_523EC0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_523F07
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5263F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_523FB6

loc_523F07:
cmp	[ebp+arg_10], 0
jnz	short loc_523F3B
cmp	[ebp+arg_C], 0
jnz	short loc_523F32
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_523F3B

loc_523F32:
mov	[ebp+var_34], 1
jmp	short loc_523F42

loc_523F3B:
mov	[ebp+var_34], 0

loc_523F42:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_523F54
and	[ebp+var_C], 0FFFFFFFEh

loc_523F54:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_523F8A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5263F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_523F88
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_523F88:
jmp	short loc_523FB6

loc_523F8A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5263F0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_523FB6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_523FB6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_523EC0 endp

align 10h


; Attributes: bp-based frame

sub_524000 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_52401C:
cmp	[ebp+var_10], 0
jz	short loc_524063
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_524052
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_52405B

loc_524052:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_52405B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_52401C

loc_524063:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_524105
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5240F6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_523EC0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_52417B
jmp	short loc_524105

loc_5240F6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_524105:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_524160
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_523EC0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_52417B

loc_524160:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_52417B:
mov	esp, ebp
pop	ebp
retn	8
sub_524000 endp

align 10h


; Attributes: bp-based frame

sub_524190 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5241D7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_526440
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_524289

loc_5241D7:
cmp	[ebp+arg_10], 0
jnz	short loc_52420E
cmp	[ebp+arg_C], 0
jnz	short loc_524205
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_52420E

loc_524205:
mov	[ebp+var_34], 1
jmp	short loc_524215

loc_52420E:
mov	[ebp+var_34], 0

loc_524215:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_524227
and	[ebp+var_C], 0FFFFFFFEh

loc_524227:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_52425D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_526440
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_52425B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_52425B:
jmp	short loc_524289

loc_52425D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_526440
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_524289
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_524289:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_524190 endp

align 10h


; Attributes: bp-based frame

sub_5242D0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5242EC:
cmp	[ebp+var_10], 0
jz	short loc_524336
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_524325
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_52432E

loc_524325:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_52432E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5242EC

loc_524336:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5243D8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5243C9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_524190
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_524451
jmp	short loc_5243D8

loc_5243C9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5243D8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_524436
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_524190
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_524451

loc_524436:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_524451:
mov	esp, ebp
pop	ebp
retn	8
sub_5242D0 endp

align 10h


; Attributes: bp-based frame

sub_524460 proc	near

var_84=	dword ptr -84h
var_48=	dword ptr -48h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_524484:
cmp	[ebp+var_8], 0
jz	short loc_5244C6
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jnz	short loc_5244BB
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5244C4

loc_5244BB:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5244C4:
jmp	short loc_524484

loc_5244C6:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_84]
jz	short loc_5244FA
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5244FA
mov	edx, [ebp+var_84]
mov	[ebp+var_4], edx

loc_5244FA:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_524460 endp

align 10h


; Attributes: bp-based frame

sub_524510 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_524528:
cmp	[ebp+var_8], 0
jz	short loc_52457A
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	[ecx]
comiss	xmm0, dword ptr	[edx]
jbe	short loc_52454F
mov	[ebp+var_20], 1
jmp	short loc_524556

loc_52454F:
mov	[ebp+var_20], 0

loc_524556:
movzx	eax, byte ptr [ebp+var_20]
test	eax, eax
jnz	short loc_52456F
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_524578

loc_52456F:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_524578:
jmp	short loc_524528

loc_52457A:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_1C]
jz	short loc_5245B8
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_5245A3
mov	[ebp+var_24], 1
jmp	short loc_5245AA

loc_5245A3:
mov	[ebp+var_24], 0

loc_5245AA:
movzx	ecx, byte ptr [ebp+var_24]
test	ecx, ecx
jz	short loc_5245B8
mov	edx, [ebp+var_1C]
mov	[ebp+var_4], edx

loc_5245B8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_524510 endp

align 10h


; Attributes: bp-based frame

sub_5245D0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_38=	byte ptr -38h
var_34=	byte ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
lea	eax, [ebp+var_34]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_1D]
push	edx
lea	eax, [ebp+var_34]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
call	sub_5DE580
add	esp, 0Ch
mov	[ebp+var_A4], eax
mov	edx, [ebp+var_A4]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_A0]
add	ecx, 8
call	sub_50F3A0
mov	edx, [ebp+var_A0]
mov	[edx], eax
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*8]
mov	ecx, [ebp+var_A0]
mov	[ecx+8], eax
mov	edx, [ebp+var_A0]
mov	eax, [edx]
push	eax
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_50]
call	sub_4046E0
call	sub_528D20
add	esp, 0Ch
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A0]
mov	edx, [ebp+var_A8]
mov	[ecx+4], edx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5245D0 endp

align 10h


; Attributes: bp-based frame

sub_5246B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_528D70
add	esp, 1Ch
pop	ebp
retn
sub_5246B0 endp

align 10h


; Attributes: bp-based frame

sub_5246F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
lea	ecx, [ebp+arg_C]
call	sub_F62E00
movzx	eax, al
test	eax, eax
jz	short loc_524774
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
lea	ecx, [ebp+arg_C]
call	sub_F62E00
movzx	ecx, al
test	ecx, ecx
jz	short loc_524743
mov	eax, [ebp+arg_4]
jmp	loc_5247CB
jmp	short loc_524772

loc_524743:
mov	edx, [ebp+arg_8]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
lea	ecx, [ebp+arg_C]
call	sub_F62E00
movzx	edx, al
test	edx, edx
jz	short loc_52476D
mov	eax, [ebp+arg_8]
jmp	short loc_5247CB
jmp	short loc_524772

loc_52476D:
mov	eax, [ebp+arg_0]
jmp	short loc_5247CB

loc_524772:
jmp	short loc_5247CB

loc_524774:
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [eax]
push	edx
lea	ecx, [ebp+arg_C]
call	sub_F62E00
movzx	eax, al
test	eax, eax
jz	short loc_52479E
mov	eax, [ebp+arg_0]
jmp	short loc_5247CB
jmp	short loc_5247CB

loc_52479E:
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
lea	ecx, [ebp+arg_C]
call	sub_F62E00
movzx	ecx, al
test	ecx, ecx
jz	short loc_5247C8
mov	eax, [ebp+arg_8]
jmp	short loc_5247CB
jmp	short loc_5247CB

loc_5247C8:
mov	eax, [ebp+arg_4]

loc_5247CB:
pop	ebp
retn
sub_5246F0 endp

align 10h


; Attributes: bp-based frame

sub_5247D0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h

loc_5247D6:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
lea	ecx, [ebp+arg_10]
call	sub_F62E00
movzx	edx, al
test	edx, edx
jz	short loc_524802
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+arg_0], eax
jmp	short loc_5247D6

loc_524802:
mov	ecx, [ebp+arg_4]
sub	ecx, 8
mov	[ebp+arg_4], ecx

loc_52480B:
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+arg_10]
call	sub_F62E00
movzx	ecx, al
test	ecx, ecx
jz	short loc_524837
mov	edx, [ebp+arg_4]
sub	edx, 8
mov	[ebp+arg_4], edx
jmp	short loc_52480B

loc_524837:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jb	short loc_524844
mov	eax, [ebp+arg_0]
jmp	short loc_524862

loc_524844:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_528EB0
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+arg_0], eax
jmp	loc_5247D6

loc_524862:
mov	esp, ebp
pop	ebp
retn
sub_5247D0 endp

align 10h


; Attributes: bp-based frame

sub_524870 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_524883
jmp	loc_52493A

loc_524883:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_4], ecx
jmp	short loc_524897

loc_52488E:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_524897:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	loc_52493A
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_10]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_14]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ecx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	ecx, [ebp+var_24]
call	sub_F62E00
movzx	eax, al
test	eax, eax
jz	short loc_52490B
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F4430
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
jmp	short loc_524935

loc_52490B:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_20]
mov	[ecx+4], eax
mov	edx, [ebp+var_1C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_52ABB0
add	esp, 18h

loc_524935:
jmp	loc_52488E

loc_52493A:
mov	esp, ebp
pop	ebp
retn
sub_524870 endp

align 10h


; Attributes: bp-based frame

sub_524940 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_528FF0
add	esp, 14h
pop	ebp
retn
sub_524940 endp

align 10h


; Attributes: bp-based frame

sub_524960 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 28h

loc_524966:
sub	esp, 18h
mov	eax, esp
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
mov	ecx, [ebp+arg_10]
mov	[eax+8], ecx
mov	edx, [ebp+arg_14]
mov	[eax+0Ch], edx
mov	ecx, [ebp+arg_18]
mov	[eax+10h], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+14h], edx
mov	eax, [ebp+arg_0]
sub	esp, 18h
mov	ecx, esp
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
call	[ebp+arg_20]
add	esp, 30h
test	eax, eax
jz	short loc_5249CD
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+arg_0], ecx
jmp	short loc_524966

loc_5249CD:
mov	edx, [ebp+arg_4]
sub	edx, 18h
mov	[ebp+arg_4], edx

loc_5249D6:
mov	eax, [ebp+arg_4]
sub	esp, 18h
mov	ecx, esp
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
sub	esp, 18h
mov	ecx, esp
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
mov	eax, [ebp+arg_14]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_18]
mov	[ecx+10h], edx
mov	eax, [ebp+arg_1C]
mov	[ecx+14h], eax
call	[ebp+arg_20]
add	esp, 30h
test	eax, eax
jz	short loc_524A3D
mov	ecx, [ebp+arg_4]
sub	ecx, 18h
mov	[ebp+arg_4], ecx
jmp	short loc_5249D6

loc_524A3D:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_524A4A
mov	eax, [ebp+arg_0]
jmp	short loc_524A68

loc_524A4A:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_529170
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx
jmp	loc_524966

loc_524A68:
mov	esp, ebp
pop	ebp
retn
sub_524960 endp

align 10h


; Attributes: bp-based frame

sub_524A70 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_524A83
jmp	loc_524BA1

loc_524A83:
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_4], ecx
jmp	short loc_524A97

loc_524A8E:
mov	edx, [ebp+var_4]
add	edx, 18h
mov	[ebp+var_4], edx

loc_524A97:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	loc_524BA1
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ecx+4]
mov	[ebp+var_24], eax
mov	edx, [ecx+8]
mov	[ebp+var_20], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_1C], eax
mov	edx, [ecx+10h]
mov	[ebp+var_18], edx
mov	eax, [ecx+14h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
sub	esp, 18h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
sub	esp, 18h
mov	edx, esp
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	eax, [ebp+var_18]
mov	[edx+10h], eax
mov	ecx, [ebp+var_14]
mov	[edx+14h], ecx
call	[ebp+arg_C]
add	esp, 30h
test	eax, eax
jz	short loc_524B64
mov	edx, [ebp+var_4]
add	edx, 18h
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5F4430
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	eax, [ebp+var_18]
mov	[edx+10h], eax
mov	ecx, [ebp+var_14]
mov	[edx+14h], ecx
jmp	short loc_524B9C

loc_524B64:
mov	edx, [ebp+arg_C]
push	edx
sub	esp, 18h
mov	eax, esp
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_20]
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_18]
mov	[eax+10h], ecx
mov	edx, [ebp+var_14]
mov	[eax+14h], edx
mov	eax, [ebp+var_4]
push	eax
call	sub_52ACE0
add	esp, 20h

loc_524B9C:
jmp	loc_524A8E

loc_524BA1:
mov	esp, ebp
pop	ebp
retn
sub_524A70 endp

align 10h


; Attributes: bp-based frame

sub_524BB0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_524BCC:
cmp	[ebp+var_10], 0
jz	short loc_524C17
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_524C06
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_524C0F

loc_524C06:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_524C0F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_524BCC

loc_524C17:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_524CB9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_524CAA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_51A3B0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_524D33
jmp	short loc_524CB9

loc_524CAA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_524CB9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_524D18
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_51A3B0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_524D33

loc_524D18:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_524D33:
mov	esp, ebp
pop	ebp
retn	8
sub_524BB0 endp

align 10h


; Attributes: bp-based frame

sub_524D40 proc	near

var_BC=	dword ptr -0BCh
var_80=	dword ptr -80h
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	byte ptr -60h
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	byte ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0BCh
mov	[ebp+var_BC], ecx
mov	eax, [ebp+var_BC]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_524D64:
cmp	[ebp+var_8], 0
jz	short loc_524DD9
lea	ecx, [ebp+var_35]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_34]
call	sub_407810
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_68], ecx
lea	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_68]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_9], cl
lea	ecx, [ebp+var_34]
call	sub_407E50
lea	ecx, [ebp+var_35]
call	nullsub_1
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_524DCE
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_524DD7

loc_524DCE:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_524DD7:
jmp	short loc_524D64

loc_524DD9:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_BC]
jz	short loc_524E36
lea	ecx, [ebp+var_61]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_60]
call	sub_407810
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
push	edx
lea	eax, [ebp+var_60]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_36], al
lea	ecx, [ebp+var_60]
call	sub_407E50
lea	ecx, [ebp+var_61]
call	nullsub_1
movzx	ecx, [ebp+var_36]
test	ecx, ecx
jz	short loc_524E36
mov	edx, [ebp+var_BC]
mov	[ebp+var_4], edx

loc_524E36:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_524D40 endp

align 10h


; Attributes: bp-based frame

sub_524E40 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
jmp	short loc_524E50

loc_524E48:
lea	ecx, [ebp+arg_0]
call	sub_526490

loc_524E50:
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, [ebp+arg_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_524E95
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_10]
call	sub_407910
xor	edx, edx
and	edx, 1
jz	short loc_524E93
mov	eax, [ebp+var_10]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_524E93:
jmp	short loc_524E48

loc_524E95:
mov	esp, ebp
pop	ebp
retn
sub_524E40 endp

align 10h


; Attributes: bp-based frame

sub_524EA0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_524EB1

loc_524EA8:
mov	eax, [ebp+arg_0]
sub	eax, 48h
mov	[ebp+arg_0], eax

loc_524EB1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_524EF7
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 48h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
call	sub_10FB7C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_524EF5
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_524EF5:
jmp	short loc_524EA8

loc_524EF7:
mov	esp, ebp
pop	ebp
retn
sub_524EA0 endp

align 10h


; Attributes: bp-based frame

sub_524F00 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_524F11

loc_524F08:
mov	eax, [ebp+arg_0]
sub	eax, 6Ch
mov	[ebp+arg_0], eax

loc_524F11:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_524F5F
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 6Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_524F5D
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_524F5D:
jmp	short loc_524F08

loc_524F5F:
mov	esp, ebp
pop	ebp
retn
sub_524F00 endp

align 10h


; Attributes: bp-based frame

sub_524F70 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_526090
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	eax, [ebp+arg_8]
and	eax, [edx+4]
mov	[ebp+arg_8], eax
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	[edx], eax
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	edx, [ebp+var_50]
mov	eax, [edx]
lea	ecx, [eax+ecx+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	dword ptr [edx], 0FFFFFFFEh
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_525027
mov	edx, [ebp+var_8]
push	edx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jz	short loc_52501B
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_28]
call	sub_67AF90
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	eax, [ebp+var_28]
mov	ecx, [edx]
mov	[eax+4], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_54], edx
jmp	short loc_525022

loc_52501B:
mov	[ebp+var_54], 0

loc_525022:
jmp	loc_5251F7

loc_525027:
mov	eax, [ebp+var_4]
mov	[ebp+var_C], eax

loc_52502D:
mov	ecx, [ebp+var_C]
add	ecx, 1
mov	edx, [ebp+var_50]
mov	eax, [edx]
and	ecx, [eax+4]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	eax, [ebp+var_C]
shl	eax, 4
lea	ecx, [edx+eax+8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_2C]
xor	eax, eax
cmp	dword ptr [edx], 0FFFFFFFEh
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52502D
mov	edx, [ebp+var_C]
shl	edx, 4
mov	eax, [ebp+var_50]
mov	ecx, [eax]
lea	edx, [ecx+edx+8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
cmp	edx, [ebp+var_4]
jnz	loc_525121
mov	eax, [ebp+var_10]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jz	short loc_5250E8
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_20]
add	edx, 8
mov	[ebp+var_34], edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_34]
call	sub_67AF90
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_58], ecx
jmp	short loc_5250EF

loc_5250E8:
mov	[ebp+var_58], 0

loc_5250EF:
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_3C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_67A3D0
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	ecx, [ebp+var_3C]
mov	edx, [eax]
mov	[ecx+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
jmp	loc_5251F7

loc_525121:
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_14], ecx

loc_525130:
mov	edx, [ebp+var_14]
shl	edx, 4
mov	eax, [ebp+var_50]
mov	ecx, [eax]
lea	edx, [ecx+edx+8]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax]
cmp	ecx, [ebp+var_4]
jnz	short loc_5251BC
mov	edx, [ebp+var_10]
push	edx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jz	short loc_5251AB
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_24]
add	ecx, 8
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_44]
call	sub_67AF90
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_5C], eax
jmp	short loc_5251B2

loc_5251AB:
mov	[ebp+var_5C], 0

loc_5251B2:
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_C]
mov	[ecx], edx
jmp	short loc_5251C9

loc_5251BC:
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[ebp+var_14], ecx
jmp	loc_525130

loc_5251C9:
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_67A3D0
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4C]
mov	edx, [eax]
mov	[ecx+4], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0FFFFFFFFh

loc_5251F7:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx+4], edx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_524F70 endp

align 10h


; Attributes: bp-based frame

sub_525210 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	edx, [ebp+var_1C]
mov	eax, [edx]
lea	ecx, [eax+ecx+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	dword ptr [edx], 0FFFFFFFEh
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_525254
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_4]
jz	short loc_52525C

loc_525254:
or	eax, 0FFFFFFFFh
jmp	loc_52533D

loc_52525C:
mov	edx, 1
test	edx, edx
jz	loc_52533A
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	edx, [ebp+arg_4]
jnz	loc_525313
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
and	edx, 0FFFFFFFCh
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
and	edx, 0FFFFFFFCh
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_18]
add	ecx, 8
mov	[ebp+var_24], ecx

loc_5252B3:
mov	edx, [ebp+var_24]
mov	al, [edx]
mov	[ebp+var_25], al
mov	ecx, [ebp+var_20]
cmp	al, [ecx]
jnz	short loc_5252F0
cmp	[ebp+var_25], 0
jz	short loc_5252E7
mov	edx, [ebp+var_24]
mov	al, [edx+1]
mov	[ebp+var_26], al
mov	ecx, [ebp+var_20]
cmp	al, [ecx+1]
jnz	short loc_5252F0
add	[ebp+var_24], 2
add	[ebp+var_20], 2
cmp	[ebp+var_26], 0
jnz	short loc_5252B3

loc_5252E7:
mov	[ebp+var_2C], 0
jmp	short loc_5252F8

loc_5252F0:
sbb	edx, edx
sbb	edx, 0FFFFFFFFh
mov	[ebp+var_2C], edx

loc_5252F8:
mov	eax, [ebp+var_2C]
mov	[ebp+var_30], eax
xor	ecx, ecx
cmp	[ebp+var_30], 0
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_525313
mov	eax, [ebp+var_4]
jmp	short loc_52533D

loc_525313:
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0FFFFFFFFh
jnz	short loc_525323
jmp	short loc_52533A

loc_525323:
mov	edx, [ebp+var_4]
shl	edx, 4
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
lea	edx, [ecx+edx+8]
mov	[ebp+var_8], edx
jmp	loc_52525C

loc_52533A:
or	eax, 0FFFFFFFFh

loc_52533D:
mov	esp, ebp
pop	ebp
retn	8
sub_525210 endp

align 10h


; Attributes: bp-based frame

sub_525350 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 104h
jmp	short loc_525364

loc_52535B:
mov	eax, [ebp+arg_0]
sub	eax, 28h
mov	[ebp+arg_0], eax

loc_525364:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5253A7
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 28h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_4E9110
xor	ecx, ecx
and	ecx, 1
jz	short loc_5253A5
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5253A5:
jmp	short loc_52535B

loc_5253A7:
mov	esp, ebp
pop	ebp
retn
sub_525350 endp

align 10h


; Attributes: bp-based frame

sub_5253B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_529410
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5253B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5253F0(void *)
sub_5253F0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_50F9B0
call	nullsub_1
xor	edx, edx
and	edx, 1
jz	short loc_525424
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_525424:
mov	esp, ebp
pop	ebp
retn
sub_5253F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525430(void *)
sub_525430 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_4E65F0
xor	ecx, ecx
and	ecx, 1
jz	short loc_525457
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_525457:
mov	esp, ebp
pop	ebp
retn
sub_525430 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525460(void *)
sub_525460 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_4E8F20
xor	ecx, ecx
and	ecx, 1
jz	short loc_52548C
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52548C:
mov	esp, ebp
pop	ebp
retn
sub_525460 endp



; Attributes: bp-based frame

; int __cdecl sub_525490(void *)
sub_525490 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5254B9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5254B9:
mov	esp, ebp
pop	ebp
retn
sub_525490 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5254C0(void *, int)
sub_5254C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_525520
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
call	sub_401740
mov	eax, [ebp+arg_4]
add	eax, 0Ch
mov	ecx, [ebp+var_8]
call	sub_402700
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
jmp	short loc_525527

loc_525520:
mov	[ebp+var_C], 0

loc_525527:
mov	esp, ebp
pop	ebp
retn
sub_5254C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525530(void *, int)
sub_525530 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	24h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525593
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
mov	ecx, [ebp+var_8]
add	ecx, 18h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_52559A

loc_525593:
mov	[ebp+var_C], 0

loc_52559A:
mov	esp, ebp
pop	ebp
retn
sub_525530 endp

align 10h


; Attributes: bp-based frame

sub_5255A0 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_529470
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5255A0 endp

align 10h


; Attributes: bp-based frame

sub_5255F0 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_5294C0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5255F0 endp

align 10h


; Attributes: bp-based frame

sub_525640 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_529510
mov	esp, ebp
pop	ebp
retn	0Ch
sub_525640 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525690(void *, int)
sub_525690 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5256D4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_52A060
mov	[ebp+var_18], eax
jmp	short loc_5256DB

loc_5256D4:
mov	[ebp+var_18], 0

loc_5256DB:
mov	esp, ebp
pop	ebp
retn
sub_525690 endp

align 10h


; Attributes: bp-based frame

sub_5256E0 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_529560
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5256E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525730(void *, int)
sub_525730 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525790
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 0Ah
rep movsd
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_525797

loc_525790:
mov	[ebp+var_C], 0

loc_525797:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_525730 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5257A0(void *, int)
sub_5257A0 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	164h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5257FC
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+arg_4]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_4E62A0
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
jmp	short loc_525803

loc_5257FC:
mov	[ebp+var_3C], 0

loc_525803:
mov	esp, ebp
pop	ebp
retn
sub_5257A0 endp

align 10h


; Attributes: bp-based frame

sub_525810 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_5295B0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_525810 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525860(void *, int)
sub_525860 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5258B3
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+28h]
fstp	dword ptr [eax+28h]
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5258BA

loc_5258B3:
mov	[ebp+var_C], 0

loc_5258BA:
mov	esp, ebp
pop	ebp
retn
sub_525860 endp

align 10h


; Attributes: bp-based frame

sub_5258C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_529600
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5258C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5258F0(void *, int)
sub_5258F0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_52594D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_502450
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_525954

loc_52594D:
mov	[ebp+var_38], 0

loc_525954:
mov	esp, ebp
pop	ebp
retn
sub_5258F0 endp

align 10h


; Attributes: bp-based frame

sub_525960 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_529640
mov	esp, ebp
pop	ebp
retn	0Ch
sub_525960 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5259B0(void *, int)
sub_5259B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	5Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525A07
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_4E9860
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_525A0E

loc_525A07:
mov	[ebp+var_C], 0

loc_525A0E:
mov	esp, ebp
pop	ebp
retn
sub_5259B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525A20(void *, int)
sub_525A20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525A99
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_525AA0

loc_525A99:
mov	[ebp+var_C], 0

loc_525AA0:
mov	esp, ebp
pop	ebp
retn
sub_525A20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525AB0(void *, int)
sub_525AB0 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525B07
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_500750
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_525B0E

loc_525B07:
mov	[ebp+var_28], 0

loc_525B0E:
mov	esp, ebp
pop	ebp
retn
sub_525AB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525B20(void *, int)
sub_525B20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525B93
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
mov	eax, [ebp+var_8]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_525B9A

loc_525B93:
mov	[ebp+var_C], 0

loc_525B9A:
mov	esp, ebp
pop	ebp
retn
sub_525B20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525BA0(void *, int)
sub_525BA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525C23
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_10]
add	edx, 8
mov	eax, [ebp+var_C]
add	eax, 8
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_14], eax
jmp	short loc_525C2A

loc_525C23:
mov	[ebp+var_14], 0

loc_525C2A:
mov	esp, ebp
pop	ebp
retn
sub_525BA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_525C30(void *, int)
sub_525C30 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	4Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_525C74
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_52A2A0
mov	[ebp+var_14], eax
jmp	short loc_525C7B

loc_525C74:
mov	[ebp+var_14], 0

loc_525C7B:
mov	esp, ebp
pop	ebp
retn
sub_525C30 endp

align 10h


; Attributes: bp-based frame

sub_525C80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+28h]
fstp	dword ptr [ecx+28h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+2Ch]
mov	[eax+2Ch], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx+2Eh]
mov	[eax+2Eh], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+34h]
mov	[edx+34h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+35h]
mov	[edx+35h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+36h]
mov	[edx+36h], cl
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+60h]
fstp	dword ptr [eax+60h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+64h]
fstp	dword ptr [edx+64h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+68h]
fstp	dword ptr [ecx+68h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_525C80 endp

align 10h


; Attributes: bp-based frame

sub_525D30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_407910
mov	ecx, [ebp+var_8]
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_525D71
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_525D71:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_525D30 endp

align 10h


; Attributes: bp-based frame

sub_525D80 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_443260
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_525DF3
mov	ecx, [ebp+var_54]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_525DF3:
mov	esp, ebp
pop	ebp
retn
sub_525D80 endp

align 10h


; Attributes: bp-based frame

sub_525E00 proc	near

var_7C=	dword ptr -7Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_525EA6
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_525E61
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	short loc_525EA6

loc_525E61:
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_529690
mov	ecx, [ebp+arg_4]
call	sub_46B570

loc_525EA6:
mov	esp, ebp
pop	ebp
retn	8
sub_525E00 endp

align 10h


; Attributes: bp-based frame

sub_525EB0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526500
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_529740
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_525EB0 endp

align 10h


; Attributes: bp-based frame

sub_525F00 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_503430
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5297B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_525F00 endp

align 10h


; Attributes: bp-based frame

sub_525F50 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_52603A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_525FAF
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_52603A

loc_525FAF:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_529820
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_507280
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_52603A:
mov	esp, ebp
pop	ebp
retn	10h
sub_525F50 endp



; Attributes: bp-based frame

sub_526040 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_529870
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526040 endp

align 10h


; Attributes: bp-based frame

sub_526090 proc	near

var_F4=	dword ptr -0F4h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F4h
mov	[ebp+var_F4], ecx
mov	eax, [ebp+var_F4]
cmp	dword ptr [eax], 0
jnz	short loc_5260BD
push	8
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_F4]
call	sub_526560
jmp	short loc_5260FF

loc_5260BD:
mov	edx, [ebp+var_F4]
mov	eax, [edx]
mov	ecx, [eax]
imul	ecx, 5
mov	edx, [ebp+var_F4]
mov	eax, [edx]
mov	edx, [eax+4]
lea	eax, ds:4[edx*4]
cmp	ecx, eax
jbe	short loc_5260FF
mov	ecx, [ebp+var_F4]
mov	edx, [ecx]
mov	eax, [edx+4]
lea	ecx, [eax+eax+2]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_F4]
call	sub_526560

loc_5260FF:
mov	esp, ebp
pop	ebp
retn	4
sub_526090 endp

align 10h


; Attributes: bp-based frame

sub_526110 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5266F0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_52B170
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526110 endp



; Attributes: bp-based frame

sub_526170 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5298F0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526170 endp

align 10h


; Attributes: bp-based frame

sub_5261C0 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_529960
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5261C0 endp

align 10h


; Attributes: bp-based frame

sub_526210 proc	near

var_2C=	dword ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5299D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526210 endp

align 10h


; Attributes: bp-based frame

sub_526260 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_52634A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5262BF
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_52634A

loc_5262BF:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_529A40
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_51CAC0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_52634A:
mov	esp, ebp
pop	ebp
retn	10h
sub_526260 endp



; Attributes: bp-based frame

sub_526350 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_529A90
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526350 endp

align 10h


; Attributes: bp-based frame

sub_5263A0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_47E2E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5263A0 endp

align 10h


; Attributes: bp-based frame

sub_5263F0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_5BF290
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_529B00
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5263F0 endp

align 10h


; Attributes: bp-based frame

sub_526440 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_529B70
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526440 endp

align 10h


; Attributes: bp-based frame

sub_526490 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
add	ecx, 3Ch
mov	edx, [ebp+var_C]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+8]
jnz	short loc_5264F9
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 2
imul	ecx, 3Ch
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx], eax

loc_5264F9:
mov	esp, ebp
pop	ebp
retn
sub_526490 endp

align 10h


; Attributes: bp-based frame

sub_526500 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 4EC4EC4h
jbe	short loc_526526
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_526526:
cmp	[ebp+arg_0], 0
jz	short loc_52654C
mov	eax, [ebp+arg_0]
imul	eax, 34h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_526553

loc_52654C:
mov	[ebp+var_C], 0

loc_526553:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_526500 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_526560 proc	near

var_88=	dword ptr -88h
var_84=	qword ptr -84h
var_7C=	dword ptr -7Ch
var_5C=	dword ptr -5Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_7C], ecx
cmp	[ebp+arg_4], 0
jnz	short loc_52657F
mov	ecx, [ebp+var_7C]
call	sub_526810
jmp	loc_5266E7

loc_52657F:
cmp	[ebp+arg_4], 8
jnb	short loc_52658E
mov	[ebp+arg_4], 8
jmp	short loc_5265DD

loc_52658E:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	dword ptr [ebp+var_84],	eax
mov	dword ptr [ebp+var_84+4], 0
fild	[ebp+var_84]
push	ecx		; float
fstp	[esp+88h+var_88]
call	sub_4556D0
add	esp, 4
fdiv	ds:flt_15FCF30
fstp	[ebp+var_34]
movss	xmm0, [ebp+var_34]
addss	xmm0, ds:dword_1479C54
cvttss2si ecx, xmm0
mov	[ebp+var_10], ecx
mov	edx, 1
mov	ecx, [ebp+var_10]
shl	edx, cl
mov	[ebp+arg_4], edx

loc_5265DD:
mov	[ebp+var_C], 0
mov	[ebp+var_38], 2
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 4
add	ecx, 8
push	ecx
mov	edx, dword_1855FC0
mov	eax, [edx]
mov	ecx, dword_1855FC0
mov	edx, [eax+28h]
call	edx
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	edx, [ebp+var_C]
mov	[edx+4], ecx
mov	[ebp+var_8], 0
jmp	short loc_526636

loc_52662D:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_526636:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_4]
jnb	short loc_526651
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+var_C]
mov	dword ptr [eax+edx+8], 0FFFFFFFEh
jmp	short loc_52662D

loc_526651:
mov	ecx, [ebp+var_7C]
cmp	dword ptr [ecx], 0
jz	short loc_5266D0
mov	[ebp+var_8], 0
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
jmp	short loc_526676

loc_52666D:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_526676:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_5266BF
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+var_7C]
mov	eax, [edx]
lea	ecx, [eax+ecx+8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
xor	eax, eax
cmp	dword ptr [edx], 0FFFFFFFEh
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5266BD
mov	edx, [ebp+var_14]
add	edx, 8
push	edx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_C]
call	sub_529BE0
mov	ecx, [ebp+var_14]
call	sub_5105D0

loc_5266BD:
jmp	short loc_52666D

loc_5266BF:
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_401750

loc_5266D0:
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	[ebp+var_C], 0
lea	ecx, [ebp+var_C]
call	sub_526810

loc_5266E7:
mov	esp, ebp
pop	ebp
retn	8
sub_526560 endp

align 10h


; Attributes: bp-based frame

sub_5266F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 30C30C3h
jbe	short loc_526716
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_526716:
cmp	[ebp+arg_0], 0
jz	short loc_52673C
mov	eax, [ebp+arg_0]
imul	eax, 54h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_526743

loc_52673C:
mov	[ebp+var_C], 0

loc_526743:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5266F0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_526750 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_525860
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526750 endp

align 10h


; Attributes: bp-based frame

sub_526790 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx		; void *
call	sub_529C20
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526790 endp

align 10h


; Attributes: bp-based frame

sub_5267D0 proc	near

var_48=	dword ptr -48h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
push	1
mov	ecx, [ebp+var_48]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_529C90
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5267D0 endp

align 10h


; Attributes: bp-based frame

sub_526810 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
cmp	dword ptr [eax], 0
jz	short loc_52688E
mov	[ebp+var_8], 0
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
jmp	short loc_52683E

loc_526835:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_52683E:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+var_4]
ja	short loc_526874
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
lea	eax, [edx+eax+8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	dword ptr [ecx], 0FFFFFFFEh
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_526872
mov	ecx, [ebp+var_C]
call	sub_5105D0

loc_526872:
jmp	short loc_526835

loc_526874:
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
push	eax
call	sub_401750
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], 0

loc_52688E:
mov	esp, ebp
pop	ebp
retn
sub_526810 endp

align 10h


; Attributes: bp-based frame

sub_5268A0 proc	near

var_40=	dword ptr -40h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
push	1
mov	ecx, [ebp+var_40]
call	sub_49CAE0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 8
push	eax		; void *
call	sub_52B4C0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5268A0 endp

align 10h


; Attributes: bp-based frame

sub_526900 proc	near

var_64=	dword ptr -64h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
push	1
mov	ecx, [ebp+var_64]
call	sub_5269E0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_529D00
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526900 endp

align 10h


; Attributes: bp-based frame

sub_526940 proc	near

var_3C=	dword ptr -3Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_526A40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_529D70
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_526940 endp

align 10h


; Attributes: bp-based frame

sub_526980 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 7FFFFFFh
jbe	short loc_5269A6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5269A6:
cmp	[ebp+arg_0], 0
jz	short loc_5269CC
mov	eax, [ebp+arg_0]
shl	eax, 5
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5269D3

loc_5269CC:
mov	[ebp+var_C], 0

loc_5269D3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_526980 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5269E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1F07C1Fh
jbe	short loc_526A06
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_526A06:
cmp	[ebp+arg_0], 0
jz	short loc_526A2F
mov	eax, [ebp+arg_0]
imul	eax, 84h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_526A36

loc_526A2F:
mov	[ebp+var_C], 0

loc_526A36:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5269E0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_526A40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 0CCCCCCCh
jbe	short loc_526A66
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_526A66:
cmp	[ebp+arg_0], 0
jz	short loc_526A8C
mov	eax, [ebp+arg_0]
imul	eax, 14h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_526A93

loc_526A8C:
mov	[ebp+var_C], 0

loc_526A93:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_526A40 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_526AA0 proc	near

var_40=	dword ptr -40h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_40]
sar	eax, 6
mov	[ebp+var_10], eax
jmp	short loc_526ADF

loc_526AD6:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_526ADF:
cmp	[ebp+var_10], 0
jle	short loc_526B09
mov	edx, [ebp+var_40]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_4431D0
add	esp, 8
mov	ecx, [ebp+var_40]
add	ecx, 40h
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_C]
add	edx, 40h
mov	[ebp+var_C], edx
jmp	short loc_526AD6

loc_526B09:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_526AA0 endp



; Attributes: bp-based frame

sub_526B10 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[edx+4], ecx
lea	edx, [ebp+var_64]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_20]
call	sub_4046E0
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_68]
call	sub_51C5A0
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_526B10 endp

align 10h


; Attributes: bp-based frame

sub_526BA0 proc	near

var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_5]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_4]
call	sub_52A3C0
lea	eax, [ebp+var_4]
push	eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_48]
call	sub_529DE0
push	0
lea	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_4]
call	sub_5053B0
mov	esp, ebp
pop	ebp
retn	10h
sub_526BA0 endp

align 10h


; Attributes: bp-based frame

sub_526BF0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 6Ch
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_526C34

loc_526C2B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_526C34:
cmp	[ebp+var_10], 0
jle	short loc_526C5E
mov	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_50E850
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 6Ch
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
add	eax, 6Ch
mov	[ebp+var_C], eax
jmp	short loc_526C2B

loc_526C5E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_526BF0 endp

align 10h


; Attributes: bp-based frame

sub_526C70 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_526750
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_526C70 endp

align 10h


; Attributes: bp-based frame

sub_526D70 proc	near

var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F4h
mov	[ebp+var_F0], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F0]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_526DE0:
mov	edx, [ebp+var_F0]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_526F99
mov	edx, [ebp+var_F0]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
push	edx
call	sub_5296E0
add	esp, 4
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
jmp	short loc_526E5B

loc_526E4B:
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_20], ecx

loc_526E5B:
lea	edx, [ebp+var_70]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_68]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_70]
setnz	cl
mov	[ebp+var_F1], cl
movzx	edx, [ebp+var_F1]
test	edx, edx
jz	short loc_526EC8
mov	eax, [ebp+var_2C]
add	eax, 4
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
call	sub_441C20
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_526EC8
jmp	short loc_526E4B

loc_526EC8:
mov	ecx, [ebp+var_24]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_90], eax
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_28], edx
push	ecx
mov	[ebp+var_98], esp
mov	eax, [ebp+var_20]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
push	ecx
mov	[ebp+var_9C], esp
mov	eax, [ebp+var_F0]
add	eax, 4
mov	ecx, [ebp+var_9C]
mov	[ecx], eax
mov	edx, [ebp+var_F0]
add	edx, 4
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	eax, [ebp+var_28]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
lea	ecx, [ebp+var_C]
call	sub_529E80
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_24]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_526DE0

loc_526F99:
mov	eax, [ebp+var_F0]
add	eax, 4
mov	[ebp+var_E4], eax
xor	ecx, ecx
mov	[ebp+var_DA], cl
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E4]
mov	[edx], ecx
mov	eax, [ebp+var_E0]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_502CB0
mov	esp, ebp
pop	ebp
retn	4
sub_526D70 endp

align 10h


; Attributes: bp-based frame

sub_527000 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_526790
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_527000 endp

align 10h


; Attributes: bp-based frame

sub_527100 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_527118:
cmp	[ebp+var_8], 0
jz	short loc_527185
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
xor	edx, edx
mov	[ebp+var_10], ecx
mov	[ebp+var_C], edx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
cmp	eax, [ebp+var_C]
ja	short loc_52715A
jb	short loc_527151
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
cmp	edx, [ebp+var_10]
jnb	short loc_52715A

loc_527151:
mov	[ebp+var_24], 1
jmp	short loc_527161

loc_52715A:
mov	[ebp+var_24], 0

loc_527161:
movzx	eax, byte ptr [ebp+var_24]
test	eax, eax
jnz	short loc_52717A
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_527183

loc_52717A:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_527183:
jmp	short loc_527118

loc_527185:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_527100 endp

align 10h


; Attributes: bp-based frame

sub_527190 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_5267D0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_527190 endp

align 10h


; Attributes: bp-based frame

sub_527290 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_527300:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5274C7
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_52737A

loc_52736A:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_52737A:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_5273F6
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_5273F6
jmp	loc_52736A

loc_5273F6:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_529F70
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_527300

loc_5274C7:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_52A330
mov	esp, ebp
pop	ebp
retn	4
sub_527290 endp

align 10h


; Attributes: bp-based frame

sub_527530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_527558

loc_52754F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_527558:
cmp	[ebp+var_8], 0
jle	short loc_527582
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_5C72C0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 30h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 30h
mov	[ebp+var_4], eax
jmp	short loc_52754F

loc_527582:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_527530 endp

align 10h


; Attributes: bp-based frame

sub_527590 proc	near

var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52A580
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_5275BC

loc_5275B3:
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	[ebp+var_4], ecx

loc_5275BC:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	loc_52764B
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_527646
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [edx+4]
mov	[ebp+var_C], ecx
mov	edx, [edx+8]
mov	[ebp+var_8], edx
mov	al, [ebp+arg_10]
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
movzx	edx, [ebp+var_11]
push	edx
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
mov	[eax+8], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_52BB80
add	esp, 1Ch

loc_527646:
jmp	loc_5275B3

loc_52764B:
mov	al, [ebp+arg_10]
mov	[ebp+var_19], al
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx

loc_527657:
mov	eax, [ebp+var_18]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 1
jle	short loc_527690
mov	edx, [ebp+var_18]
mov	[ebp+var_20], edx
movzx	eax, [ebp+var_19]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52BCE0
add	esp, 0Ch
mov	eax, [ebp+var_18]
sub	eax, 0Ch
mov	[ebp+var_18], eax
jmp	short loc_527657

loc_527690:
mov	esp, ebp
pop	ebp
retn
sub_527590 endp

align 10h


; Attributes: bp-based frame

sub_5276A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5276B5

loc_5276AC:
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	[ebp+var_4], ecx

loc_5276B5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5276E8
movzx	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_52A620
add	esp, 14h
jmp	short loc_5276AC

loc_5276E8:
mov	esp, ebp
pop	ebp
retn
sub_5276A0 endp

align 10h


; Attributes: bp-based frame

sub_5276F0 proc	near

var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 24h
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52A690
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_52771C

loc_527713:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4], ecx

loc_52771C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	loc_5277BA
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5277B5
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [edx+4]
mov	[ebp+var_10], ecx
mov	eax, [edx+8]
mov	[ebp+var_C], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_8], ecx
mov	dl, [ebp+arg_10]
mov	[ebp+var_15], dl
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
movzx	ecx, [ebp+var_15]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 4
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_52BD70
add	esp, 20h

loc_5277B5:
jmp	loc_527713

loc_5277BA:
mov	cl, [ebp+arg_10]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_1C], edx

loc_5277C6:
mov	eax, [ebp+var_1C]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 1
jle	short loc_5277FA
mov	ecx, [ebp+var_1C]
mov	[ebp+var_24], ecx
movzx	edx, [ebp+var_1D]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52BEF0
add	esp, 0Ch
mov	edx, [ebp+var_1C]
sub	edx, 10h
mov	[ebp+var_1C], edx
jmp	short loc_5277C6

loc_5277FA:
mov	esp, ebp
pop	ebp
retn
sub_5276F0 endp

align 10h


; Attributes: bp-based frame

sub_527800 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	[ebp+var_6], dl
mov	al, [ebp+var_6]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_8+1],	cl
mov	dl, byte ptr [ebp+var_8+1]
mov	[ebp+var_1], dl
xor	eax, eax
mov	byte ptr [ebp+var_8], al
mov	cl, byte ptr [ebp+var_8]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ecx+4]
mov	[ebp+var_14], eax
mov	edx, [ecx+8]
mov	[ebp+var_10], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_1C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	[edx+4], ecx
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_C]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn
sub_527800 endp

align 10h


; Attributes: bp-based frame

sub_5278A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5278B5

loc_5278AC:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4], ecx

loc_5278B5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5278EE
movzx	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
sub	esp, 10h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_52A740
add	esp, 18h
jmp	short loc_5278AC

loc_5278EE:
mov	esp, ebp
pop	ebp
retn
sub_5278A0 endp

align 10h


; Attributes: bp-based frame

sub_527900 proc	near

var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52A7C0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_52792C

loc_527923:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_52792C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	short loc_527997
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
xor	eax, eax
cmp	edx, [ecx+4]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_527995
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_C], eax
mov	[ebp+var_8], ecx
mov	dl, [ebp+arg_10]
mov	[ebp+var_D], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_4]
mov	[eax], ecx
mov	[eax+4], edx
movzx	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_52BF80
add	esp, 18h

loc_527995:
jmp	short loc_527923

loc_527997:
mov	al, [ebp+arg_10]
mov	[ebp+var_15], al
mov	ecx, [ebp+arg_4]
mov	[ebp+var_14], ecx

loc_5279A3:
mov	edx, [ebp+var_14]
sub	edx, [ebp+arg_0]
sar	edx, 3
cmp	edx, 1
jle	short loc_5279D7
mov	eax, [ebp+var_14]
mov	[ebp+var_1C], eax
movzx	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_52C0B0
add	esp, 0Ch
mov	ecx, [ebp+var_14]
sub	ecx, 8
mov	[ebp+var_14], ecx
jmp	short loc_5279A3

loc_5279D7:
mov	esp, ebp
pop	ebp
retn
sub_527900 endp

align 10h


; Attributes: bp-based frame

sub_5279E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5279F5

loc_5279EC:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_5279F5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_527A1A
movzx	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_52A850
add	esp, 10h
jmp	short loc_5279EC

loc_527A1A:
mov	esp, ebp
pop	ebp
retn
sub_5279E0 endp

align 10h


; Attributes: bp-based frame

sub_527A20 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
sar	eax, 3
mov	[ebp+var_10], eax
jmp	short loc_527A5F

loc_527A56:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_527A5F:
cmp	[ebp+var_10], 0
jle	short loc_527A89
mov	edx, [ebp+var_1C]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_4E2FC0
add	esp, 8
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx
jmp	short loc_527A56

loc_527A89:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_527A20 endp



; Attributes: bp-based frame

sub_527A90 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
mov	[ebp+var_2], 0
mov	[ebp+var_1], 0

loc_527A9F:
mov	eax, [ebp+arg_4]
call	sub_4285F0
mov	esi, eax
mov	eax, [ebp+arg_4]
call	sub_4178E0
cmp	esi, eax
jz	loc_527B62
movzx	eax, [ebp+var_2]
test	eax, eax
jnz	loc_527B62
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jnz	loc_527B62
mov	eax, [ebp+arg_4]
call	sub_4285F0
mov	[ebp+var_14], eax
mov	eax, [ebp+arg_4]
call	sub_4178E0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
push	1
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx
mov	[ebp+var_8], eax
mov	eax, [ebp+arg_4]
call	sub_4178E0
mov	ecx, [ebp+var_8]
sub	ecx, eax
sar	ecx, 1
mov	eax, [ebp+arg_4]
call	sub_405260
mov	eax, [ebp+arg_4]
call	sub_4285F0
cmp	[ebp+var_8], eax
jz	short loc_527B46
movzx	eax, [ebp+arg_10]
test	eax, eax
jz	short loc_527B40
mov	ecx, 1
mov	eax, [ebp+arg_4]
call	sub_405260

loc_527B40:
mov	[ebp+var_1], 1
jmp	short loc_527B5D

loc_527B46:
mov	ecx, [ebp+arg_4]
call	sub_4052A0
movzx	ecx, ax
push	ecx
call	sub_405240
add	esp, 4
mov	[ebp+var_2], al

loc_527B5D:
jmp	loc_527A9F

loc_527B62:
xor	edx, edx
jz	short loc_527B7C
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
jmp	short loc_527BCD

loc_527B7C:
movzx	eax, [ebp+var_2]
test	eax, eax
jz	short loc_527BA5
movzx	ecx, [ebp+arg_14]
neg	ecx
sbb	ecx, ecx
and	ecx, 4
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_402D20
jmp	short loc_527BCD

loc_527BA5:
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_527BAF
jmp	short loc_527BCD

loc_527BAF:
movzx	edx, [ebp+arg_14]
push	edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_527BE0
add	esp, 14h

loc_527BCD:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_527A90 endp

align 10h


; Attributes: bp-based frame

sub_527BE0 proc	near

var_16=	word ptr -16h
var_14=	dword ptr -14h
var_C= word ptr	-0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_5], 0
mov	[ebp+var_4], 0

loc_527BF1:
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	loc_527CB7
mov	ecx, [ebp+arg_4]
call	sub_406B30
mov	[ebp+var_C], ax
movzx	ecx, [ebp+var_C]
push	ecx
call	sub_405240
add	esp, 4
movzx	edx, al
test	edx, edx
jz	short loc_527C37
mov	[ebp+var_5], 1
movzx	eax, [ebp+arg_10]
neg	eax
sbb	eax, eax
and	eax, 4
add	eax, 2
or	eax, [ebp+var_4]
mov	[ebp+var_4], eax
jmp	short loc_527CB2

loc_527C37:
lea	ecx, [ebp+var_C]
push	ecx
call	sub_4070A0
add	esp, 4
mov	[ebp+var_16], ax
mov	edx, [ebp+arg_8]
mov	[ebp+var_14], edx
movzx	eax, [ebp+var_16]
push	eax
push	1
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
mov	eax, [edx+8]
call	eax
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
add	ecx, 1
movzx	edx, cl
test	edx, edx
jz	short loc_527CB2
mov	[ebp+var_5], 1
movzx	eax, [ebp+arg_C]
test	eax, eax
jnz	short loc_527CB2
lea	ecx, [ebp+var_C]
push	ecx
call	sub_4070A0
add	esp, 4
movzx	edx, ax
push	edx
mov	ecx, [ebp+arg_4]
call	sub_4057D0
movzx	eax, ax
push	eax
call	sub_405240
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jz	short loc_527CB2
mov	edx, [ebp+var_4]
or	edx, 4
mov	[ebp+var_4], edx

loc_527CB2:
jmp	loc_527BF1

loc_527CB7:
xor	eax, eax
jz	short loc_527CCD
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405360

loc_527CCD:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20
mov	esp, ebp
pop	ebp
retn
sub_527BE0 endp

align 10h


; Attributes: bp-based frame

sub_527CF0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_527D08:
cmp	[ebp+var_8], 0
jz	short loc_527D73
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_527D48
jb	short loc_527D3F
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_527D48

loc_527D3F:
mov	[ebp+var_20], 1
jmp	short loc_527D4F

loc_527D48:
mov	[ebp+var_20], 0

loc_527D4F:
movzx	eax, byte ptr [ebp+var_20]
test	eax, eax
jz	short loc_527D68
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_527D71

loc_527D68:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_527D71:
jmp	short loc_527D08

loc_527D73:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_527CF0 endp

align 10h


; Attributes: bp-based frame

sub_527D80 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_5268A0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_527D80 endp

align 10h


; Attributes: bp-based frame

sub_527E80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_527EA8

loc_527E9F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_527EA8:
cmp	[ebp+var_8], 0
jle	short loc_527ED2
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_522A30
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 0Ch
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	[ebp+var_4], eax
jmp	short loc_527E9F

loc_527ED2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_527E80 endp

align 10h


; Attributes: bp-based frame

sub_527EE0 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_38]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_527F24

loc_527F1B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_527F24:
cmp	[ebp+var_10], 0
jle	short loc_527F4E
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_522A30
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 0Ch
mov	[ebp+var_38], edx
mov	eax, [ebp+var_C]
add	eax, 0Ch
mov	[ebp+var_C], eax
jmp	short loc_527F1B

loc_527F4E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_527EE0 endp

align 10h


; Attributes: bp-based frame

sub_527F60 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_526900
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_527F60 endp

align 10h


; Attributes: bp-based frame

sub_528060 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_5280D0:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_528297
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_52814A

loc_52813A:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_52814A:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_5281C6
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_5281C6
jmp	loc_52813A

loc_5281C6:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_52A0C0
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_5280D0

loc_528297:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_52A350
mov	esp, ebp
pop	ebp
retn	4
sub_528060 endp

align 10h


; Attributes: bp-based frame

sub_528300 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_526940
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_528300 endp

align 10h


; Attributes: bp-based frame

sub_528400 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_528470:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_528637
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_5284EA

loc_5284DA:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_5284EA:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_528566
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_528566
jmp	loc_5284DA

loc_528566:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_52A1B0
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_528470

loc_528637:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_52A370
mov	esp, ebp
pop	ebp
retn	4
sub_528400 endp

align 10h


; Attributes: bp-based frame

sub_5286A0 proc	near

var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_C]
jbe	loc_528755
xor	edx, edx
mov	[ebp+var_D], dl
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_C]
shl	ecx, 2
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_C]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_48]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_E], al
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_C]
shl	edx, 2
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A290
add	esp, 0Ch
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	loc_5287DB

loc_528755:
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+arg_C]
sub	ecx, [ebp+var_4]
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
lea	ecx, [eax+ecx*4]
mov	edx, [ebp+var_48]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch

loc_5287DB:
mov	esp, ebp
pop	ebp
retn	14h
sub_5286A0 endp

align 10h


; Attributes: bp-based frame

sub_5287F0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_B0], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_B0]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_B0]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_E], dl
mov	al, byte ptr [ebp+var_E]
mov	[ebp+var_45], al
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_44]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	[ebp+var_C], eax
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_10], cl
mov	dl, byte ptr [ebp+var_10]
mov	[ebp+var_51], dl
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_B0]
call	sub_444710
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_5287F0 endp

align 10h


; Attributes: bp-based frame

sub_528900 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_4C=	byte ptr -4Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_528900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 70h
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52A930
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
jmp	short loc_528941

loc_528938:
mov	ecx, [ebp+var_10]
add	ecx, 40h
mov	[ebp+var_10], ecx

loc_528941:
mov	edx, [ebp+var_10]
cmp	edx, [ebp+arg_8]
jnb	loc_5289E1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
movss	xmm0, dword ptr	[eax+4]
comiss	xmm0, dword ptr	[ecx+4]
jbe	short loc_528967
mov	[ebp+var_78], 1
jmp	short loc_52896E

loc_528967:
mov	[ebp+var_78], 0

loc_52896E:
movzx	edx, byte ptr [ebp+var_78]
test	edx, edx
jz	short loc_5289DC
mov	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_68]
call	sub_44CC50
mov	cl, [ebp+arg_10]
mov	[ebp+var_69], cl
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_10]
call	sub_44CDB0
movzx	eax, [ebp+var_69]
push	eax
sub	esp, 40h
mov	ecx, esp
lea	edx, [ebp+var_68]
push	edx
call	sub_44CC50
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 6
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C220
add	esp, 50h
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_4C]
call	sub_436CF0

loc_5289DC:
jmp	loc_528938

loc_5289E1:
mov	dl, [ebp+arg_10]
mov	[ebp+var_71], dl
mov	eax, [ebp+arg_4]
mov	[ebp+var_70], eax

loc_5289ED:
mov	ecx, [ebp+var_70]
sub	ecx, [ebp+arg_0]
sar	ecx, 6
cmp	ecx, 1
jle	short loc_528A21
mov	edx, [ebp+var_70]
mov	[ebp+var_7C], edx
movzx	eax, [ebp+var_71]
push	eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C340
add	esp, 0Ch
mov	eax, [ebp+var_70]
sub	eax, 40h
mov	[ebp+var_70], eax
jmp	short loc_5289ED

loc_528A21:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_528900 endp

align 10h


; Attributes: bp-based frame

sub_528A30 proc	near

var_94=	dword ptr -94h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= dword ptr  14h
arg_24=	byte ptr  2Ch
arg_48=	byte ptr  50h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_528A30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+4]
comiss	xmm0, [ebp+arg_C]
jbe	short loc_528A68
mov	[ebp+var_94], 1
jmp	short loc_528A72

loc_528A68:
mov	[ebp+var_94], 0

loc_528A72:
movzx	ecx, byte ptr [ebp+var_94]
test	ecx, ecx
jz	short loc_528AB1
xor	edx, edx
mov	[ebp+var_12], dl
mov	al, [ebp+var_12]
mov	[ebp+var_11], al
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 40h
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C370
add	esp, 10h
lea	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_44CDB0
jmp	short loc_528AD0

loc_528AB1:
movzx	eax, [ebp+arg_48]
push	eax
sub	esp, 40h
mov	ecx, esp
lea	edx, [ebp+arg_8]
push	edx
call	sub_44CC50
mov	eax, [ebp+arg_4]
push	eax
call	sub_52A960
add	esp, 48h

loc_528AD0:
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_24]
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_528A30 endp

align 10h


; Attributes: bp-based frame

sub_528B00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_528B17

loc_528B0E:
mov	ecx, [ebp+var_4]
add	ecx, 40h
mov	[ebp+var_4], ecx

loc_528B17:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_528B40
movzx	eax, [ebp+arg_C]
push	eax
sub	esp, 40h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_44CC50
mov	eax, [ebp+var_4]
push	eax
call	sub_52A960
add	esp, 48h
jmp	short loc_528B0E

loc_528B40:
mov	esp, ebp
pop	ebp
retn
sub_528B00 endp

align 10h


; Attributes: bp-based frame

sub_528B50 proc	near

var_4C=	byte ptr -4Ch
var_30=	byte ptr -30h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_528B50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_4C]
call	sub_44CC50
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_44CDB0
lea	edx, [ebp+var_4C]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_44CDB0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_30]
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_528B50 endp

align 10h


; Attributes: bp-based frame

sub_528BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_528BE8

loc_528BDF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_528BE8:
cmp	[ebp+var_8], 0
jle	short loc_528C12
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_52AA10
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 28h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 28h
mov	[ebp+var_4], eax
jmp	short loc_528BDF

loc_528C12:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_528BC0 endp

align 10h


; Attributes: bp-based frame

sub_528C20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52AA80
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_528C4B

loc_528C42:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_528C4B:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	short loc_528CA0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
push	eax
call	[ebp+arg_10]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_528C9E
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C3E0
add	esp, 14h

loc_528C9E:
jmp	short loc_528C42

loc_528CA0:
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx

loc_528CA6:
mov	eax, [ebp+var_C]
sub	eax, [ebp+arg_0]
sar	eax, 2
cmp	eax, 1
jle	short loc_528CD9
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C4F0
add	esp, 0Ch
mov	edx, [ebp+var_C]
sub	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_528CA6

loc_528CD9:
mov	esp, ebp
pop	ebp
retn
sub_528C20 endp

align 10h


; Attributes: bp-based frame

sub_528CE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_528CF5

loc_528CEC:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_528CF5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_528D15
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5CAC00
add	esp, 0Ch
jmp	short loc_528CEC

loc_528D15:
mov	esp, ebp
pop	ebp
retn
sub_528CE0 endp

align 10h


; Attributes: bp-based frame

sub_528D20 proc	near

var_60=	dword ptr -60h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_D], al
mov	cl, [ebp+var_D]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_18]
call	sub_4046E0
call	sub_52AAF0
add	esp, 10h
mov	[ebp+var_60], eax
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn
sub_528D20 endp

align 10h


; Attributes: bp-based frame

sub_528D70 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_52AB30
add	esp, 14h
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx
jmp	short loc_528DAD

loc_528DA4:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_528DAD:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_8]
jnb	loc_528E47
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx
mov	eax, [ecx]
push	eax
lea	ecx, [ebp+arg_10]
call	sub_F62E00
movzx	ecx, al
test	ecx, ecx
jz	short loc_528E42
mov	edx, [ebp+arg_10]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_14]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_18]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [edx+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 3
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_52C570
add	esp, 20h

loc_528E42:
jmp	loc_528DA4

loc_528E47:
mov	ecx, [ebp+arg_10]
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_24], edx
mov	eax, [ebp+arg_18]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_1C], ecx

loc_528E5F:
mov	edx, [ebp+var_1C]
sub	edx, [ebp+arg_0]
sar	edx, 3
cmp	edx, 1
jle	short loc_528EA4
mov	eax, [ebp+var_1C]
mov	[ebp+var_2C], eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_28]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_20]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C660
add	esp, 14h
mov	edx, [ebp+var_1C]
sub	edx, 8
mov	[ebp+var_1C], edx
jmp	short loc_528E5F

loc_528EA4:
mov	esp, ebp
pop	ebp
retn
sub_528D70 endp

align 10h


; Attributes: bp-based frame

sub_528EB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	[ebp+var_6], dl
mov	al, [ebp+var_6]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_8+1],	cl
mov	dl, byte ptr [ebp+var_8+1]
mov	[ebp+var_1], dl
xor	eax, eax
mov	byte ptr [ebp+var_8], al
mov	cl, byte ptr [ebp+var_8]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ecx+4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	[eax+4], edx
mov	esp, ebp
pop	ebp
retn
sub_528EB0 endp

align 10h


; Attributes: bp-based frame

sub_528F20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_528F35

loc_528F2C:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_528F35:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_528F6B
sub	esp, 0Ch
mov	eax, esp
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_10]
mov	[eax+4], edx
mov	ecx, [ebp+arg_14]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_52ABB0
add	esp, 18h
jmp	short loc_528F2C

loc_528F6B:
mov	esp, ebp
pop	ebp
retn
sub_528F20 endp

align 10h


; Attributes: bp-based frame

sub_528F70 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_528F88:
cmp	[ebp+var_8], 0
jz	short loc_528FDA
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	[ecx]
comiss	xmm0, dword ptr	[edx]
jbe	short loc_528FAF
mov	[ebp+var_18], 1
jmp	short loc_528FB6

loc_528FAF:
mov	[ebp+var_18], 0

loc_528FB6:
movzx	eax, byte ptr [ebp+var_18]
test	eax, eax
jnz	short loc_528FCF
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_528FD8

loc_528FCF:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_528FD8:
jmp	short loc_528F88

loc_528FDA:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_528F70 endp

align 10h


; Attributes: bp-based frame

sub_528FF0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52AC20
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_52901B

loc_529012:
mov	ecx, [ebp+var_4]
add	ecx, 18h
mov	[ebp+var_4], ecx

loc_52901B:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	loc_529125
mov	eax, [ebp+arg_0]
sub	esp, 18h
mov	ecx, esp
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_4]
sub	esp, 18h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
call	[ebp+arg_10]
add	esp, 30h
test	eax, eax
jz	loc_529120
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [edx+4]
mov	[ebp+var_1C], ecx
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_14], ecx
mov	eax, [edx+10h]
mov	[ebp+var_10], eax
mov	ecx, [edx+14h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+arg_10]
push	eax
sub	esp, 18h
mov	ecx, esp
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
mov	edx, [ebp+var_10]
mov	[ecx+10h], edx
mov	eax, [ebp+var_C]
mov	[ecx+14h], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C6D0
add	esp, 28h

loc_529120:
jmp	loc_529012

loc_529125:
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax

loc_52912B:
mov	eax, [ebp+var_24]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
cmp	eax, 1
jle	short loc_529163
mov	edx, [ebp+var_24]
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C900
add	esp, 0Ch
mov	eax, [ebp+var_24]
sub	eax, 18h
mov	[ebp+var_24], eax
jmp	short loc_52912B

loc_529163:
mov	esp, ebp
pop	ebp
retn
sub_528FF0 endp

align 10h


; Attributes: bp-based frame

sub_529170 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	[ebp+var_6], dl
mov	al, [ebp+var_6]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_8+1],	cl
mov	dl, byte ptr [ebp+var_8+1]
mov	[ebp+var_1], dl
xor	eax, eax
mov	byte ptr [ebp+var_8], al
mov	cl, byte ptr [ebp+var_8]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ecx+4]
mov	[ebp+var_1C], eax
mov	edx, [ecx+8]
mov	[ebp+var_18], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_14], eax
mov	edx, [ecx+10h]
mov	[ebp+var_10], edx
mov	eax, [ecx+14h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
mov	eax, [ebp+var_10]
mov	[edx+10h], eax
mov	ecx, [ebp+var_C]
mov	[edx+14h], ecx
mov	esp, ebp
pop	ebp
retn
sub_529170 endp

align 10h


; Attributes: bp-based frame

sub_529230 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_529245

loc_52923C:
mov	ecx, [ebp+var_4]
add	ecx, 18h
mov	[ebp+var_4], ecx

loc_529245:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_529289
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
sub	esp, 18h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_52ACE0
add	esp, 20h
jmp	short loc_52923C

loc_529289:
mov	esp, ebp
pop	ebp
retn
sub_529230 endp

align 10h


; Attributes: bp-based frame

sub_529290 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5292A7:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	loc_52933C
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4-4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	[ebp+var_28], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jl	short loc_5292FD
jg	short loc_5292F4
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_28]
mov	edx, [eax]
cmp	edx, [ecx]
jbe	short loc_5292FD

loc_5292F4:
mov	[ebp+var_2C], 1
jmp	short loc_529304

loc_5292FD:
mov	[ebp+var_2C], 0

loc_529304:
movzx	eax, byte ptr [ebp+var_2C]
test	eax, eax
jz	short loc_529315
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx

loc_529315:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	ecx, [esi+ecx*4]
mov	[eax+edx*4], ecx
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_8]
lea	ecx, [eax+eax+2]
mov	[ebp+var_8], ecx
jmp	loc_5292A7

loc_52933C:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jnz	short loc_529360
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	edx, [esi+edx*4-4]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_529360:
mov	cl, [ebp+arg_10]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_14], eax

loc_52937A:
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_4]
jle	short loc_5293F6
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_C]
mov	[ebp+var_30], ecx
mov	[ebp+var_34], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jl	short loc_5293BF
jg	short loc_5293B6
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_34]
mov	edx, [eax]
cmp	edx, [ecx]
jbe	short loc_5293BF

loc_5293B6:
mov	[ebp+var_38], 1
jmp	short loc_5293C6

loc_5293BF:
mov	[ebp+var_38], 0

loc_5293C6:
movzx	eax, byte ptr [ebp+var_38]
test	eax, eax
jz	short loc_5293F6
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	esi, [ebp+arg_0]
mov	eax, [esi+eax*4]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_14], eax
jmp	short loc_52937A

loc_5293F6:
mov	edx, [ebp+var_1C]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_C]
mov	[eax+edx*4], ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_529290 endp

align 10h


; Attributes: bp-based frame

sub_529410 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
jmp	short loc_529423

loc_529418:
mov	eax, [ebp+arg_0]
sub	eax, 94h
mov	[ebp+arg_0], eax

loc_529423:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_529468
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 94h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_4E97B0
xor	ecx, ecx
and	ecx, 1
jz	short loc_529466
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_529466:
jmp	short loc_529418

loc_529468:
mov	esp, ebp
pop	ebp
retn
sub_529410 endp

align 10h


; Attributes: bp-based frame

sub_529470 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52ADC0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_529470 endp

align 10h


; Attributes: bp-based frame

sub_5294C0 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52AE30
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5294C0 endp

align 10h


; Attributes: bp-based frame

sub_529510 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52AEA0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_529510 endp

align 10h


; Attributes: bp-based frame

sub_529560 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52AF10
mov	esp, ebp
pop	ebp
retn	0Ch
sub_529560 endp

align 10h


; Attributes: bp-based frame

sub_5295B0 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52AF80
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5295B0 endp

align 10h


; Attributes: bp-based frame

sub_529600 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_52AFF0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_529600 endp

align 10h


; Attributes: bp-based frame

sub_529640 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52B050
mov	esp, ebp
pop	ebp
retn	0Ch
sub_529640 endp

align 10h


; Attributes: bp-based frame

sub_529690 proc	near

var_78=	dword ptr -78h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_52B0C0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_529690 endp

align 10h


; Attributes: bp-based frame

sub_5296E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], 0
mov	ecx, [ebp+arg_0]
call	sub_402430
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
call	sub_404430
mov	[ebp+var_8], eax
mov	[ebp+var_10], 0
jmp	short loc_529715

loc_52970C:
mov	eax, [ebp+var_10]
add	eax, 1
mov	[ebp+var_10], eax

loc_529715:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_4]
jnb	short loc_529737
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_C]
lea	ecx, [eax+edx*4]
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_8]
movzx	edx, word ptr [eax+edx*2]
add	ecx, edx
mov	[ebp+var_C], ecx
jmp	short loc_52970C

loc_529737:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5296E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529740(void *, int)
sub_529740 proc	near

var_58=	dword ptr -58h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	24h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529799
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_4FEF20
mov	ecx, [ebp+var_8]
mov	[ebp+var_58], ecx
jmp	short loc_5297A0

loc_529799:
mov	[ebp+var_58], 0

loc_5297A0:
mov	esp, ebp
pop	ebp
retn
sub_529740 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5297B0(void *, int)
sub_5297B0 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529809
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+arg_4]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_4FF350
mov	ecx, [ebp+var_8]
mov	[ebp+var_74], ecx
jmp	short loc_529810

loc_529809:
mov	[ebp+var_74], 0

loc_529810:
mov	esp, ebp
pop	ebp
retn
sub_5297B0 endp

align 10h


; Attributes: bp-based frame

sub_529820 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_52B120
mov	esp, ebp
pop	ebp
retn	0Ch
sub_529820 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529870(void *, int)
sub_529870 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5298E3
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ecx+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5298EA

loc_5298E3:
mov	[ebp+var_C], 0

loc_5298EA:
mov	esp, ebp
pop	ebp
retn
sub_529870 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5298F0(void *, int)
sub_5298F0 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529947
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_50FA00
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_52994E

loc_529947:
mov	[ebp+var_28], 0

loc_52994E:
mov	esp, ebp
pop	ebp
retn
sub_5298F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529960(void *, int)
sub_529960 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5299B7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_4FFD40
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_5299BE

loc_5299B7:
mov	[ebp+var_28], 0

loc_5299BE:
mov	esp, ebp
pop	ebp
retn
sub_529960 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5299D0(void *, int)
sub_5299D0 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529A27
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_50FA70
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_529A2E

loc_529A27:
mov	[ebp+var_28], 0

loc_529A2E:
mov	esp, ebp
pop	ebp
retn
sub_5299D0 endp

align 10h


; Attributes: bp-based frame

sub_529A40 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_52B1E0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_529A40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529A90(void *, int)
sub_529A90 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529AED
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_5102D0
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_529AF4

loc_529AED:
mov	[ebp+var_38], 0

loc_529AF4:
mov	esp, ebp
pop	ebp
retn
sub_529A90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529B00(void *, int)
sub_529B00 proc	near

var_38=	dword ptr -38h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	68h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529B59
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_50F840
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_529B60

loc_529B59:
mov	[ebp+var_38], 0

loc_529B60:
mov	esp, ebp
pop	ebp
retn
sub_529B00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529B70(void *, int)
sub_529B70 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529BCD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_50FE00
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_529BD4

loc_529BCD:
mov	[ebp+var_38], 0

loc_529BD4:
mov	esp, ebp
pop	ebp
retn
sub_529B70 endp

align 10h


; Attributes: bp-based frame

sub_529BE0 proc	near

var_60=	dword ptr -60h
var_6= word ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	byte ptr [ebp+var_6+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_6]
call	sub_4E41C0
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_60]
call	sub_52B230
mov	esp, ebp
pop	ebp
retn	8
sub_529BE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529C20(void *, int)
sub_529C20 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529C83
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_4]
add	edx, 8
push	edx
mov	ecx, [ebp+var_14]
call	sub_50FB60
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_529C8A

loc_529C83:
mov	[ebp+var_18], 0

loc_529C8A:
mov	esp, ebp
pop	ebp
retn
sub_529C20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529C90(void *, int)
sub_529C90 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529CED
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_50FF80
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_529CF4

loc_529CED:
mov	[ebp+var_38], 0

loc_529CF4:
mov	esp, ebp
pop	ebp
retn
sub_529C90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529D00(void *, int)
sub_529D00 proc	near

var_5C=	dword ptr -5Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	80h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529D5A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_50F7B0
mov	eax, [ebp+var_8]
mov	[ebp+var_5C], eax
jmp	short loc_529D61

loc_529D5A:
mov	[ebp+var_5C], 0

loc_529D61:
mov	esp, ebp
pop	ebp
retn
sub_529D00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_529D70(void *, int)
sub_529D70 proc	near

var_2C=	dword ptr -2Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_529DC7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_44D270
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
jmp	short loc_529DCE

loc_529DC7:
mov	[ebp+var_2C], 0

loc_529DCE:
mov	esp, ebp
pop	ebp
retn
sub_529D70 endp

align 10h


; Attributes: bp-based frame

sub_529DE0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax], 0
jz	loc_529E78
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_529E2F
push	0
mov	edx, [ebp+arg_4]
push	edx
call	sub_77E480
add	esp, 8
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
call	sub_77E480
add	esp, 8
push	eax
call	sub_77E450
add	esp, 0Ch
jmp	short loc_529E78

loc_529E2F:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_52B540
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_5053B0

loc_529E78:
mov	esp, ebp
pop	ebp
retn	8
sub_529DE0 endp

align 10h


; Attributes: bp-based frame

sub_529E80 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_529F6A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_529EDF
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_529F6A

loc_529EDF:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_52B590
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_505EE0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_529F6A:
mov	esp, ebp
pop	ebp
retn	10h
sub_529E80 endp



; Attributes: bp-based frame

sub_529F70 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_52A05A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_529FCF
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_52A05A

loc_529FCF:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_52B5E0
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_51C9E0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_52A05A:
mov	esp, ebp
pop	ebp
retn	10h
sub_529F70 endp



; Attributes: bp-based frame

sub_52A060 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
call	sub_401740
mov	eax, [ebp+var_C]
add	eax, 8
mov	ecx, [ebp+var_4]
call	sub_402700
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_52A060 endp

align 10h


; Attributes: bp-based frame

sub_52A0C0 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_52A1AA
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_52A11F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_52A1AA

loc_52A11F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_52B630
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_51CB30
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_52A1AA:
mov	esp, ebp
pop	ebp
retn	10h
sub_52A0C0 endp



; Attributes: bp-based frame

sub_52A1B0 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_52A29A
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_52A20F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_52A29A

loc_52A20F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_52B680
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_51CBA0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_52A29A:
mov	esp, ebp
pop	ebp
retn	10h
sub_52A1B0 endp



; Attributes: bp-based frame

sub_52A2A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 18h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_8]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_403850
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax+30h]
mov	[edx+30h], ecx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_52A2A0 endp

align 10h


; Attributes: bp-based frame

sub_52A300 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
xor	eax, eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_52A300 endp

align 10h


; Attributes: bp-based frame

sub_52A330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_51C9E0
mov	esp, ebp
pop	ebp
retn
sub_52A330 endp

align 10h


; Attributes: bp-based frame

sub_52A350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_51CB30
mov	esp, ebp
pop	ebp
retn
sub_52A350 endp

align 10h


; Attributes: bp-based frame

sub_52A370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_51CBA0
mov	esp, ebp
pop	ebp
retn
sub_52A370 endp

align 10h


; Attributes: bp-based frame

sub_52A390 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52BA70
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_52A390 endp

align 10h


; Attributes: bp-based frame

sub_52A3C0 proc	near

var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
xor	eax, eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_38]
mov	dword ptr [ecx], 0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_52BAF0
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52A3C0 endp

align 10h


; Attributes: bp-based frame

sub_52A410 proc	near

var_7E=	byte ptr -7Eh
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	edx, [ebp+var_34]
lea	eax, [edx+ecx*4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_48]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_40]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
xor	eax, eax
cmp	edx, [ebp+var_48]
setz	al
mov	[ebp+var_7D], al
movzx	ecx, [ebp+var_7D]
test	ecx, ecx
jz	short loc_52A4A8
mov	edx, [ebp+arg_C]
mov	dword ptr [edx], 0
lea	eax, [ebp+var_54]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_54]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_50]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
jmp	loc_52A572

loc_52A4A8:
mov	eax, [ebp+var_18]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
sub	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_52A4C8

loc_52A4BF:
mov	eax, [ebp+var_C]
sub	eax, 4
mov	[ebp+var_C], eax

loc_52A4C8:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
jnz	short loc_52A4D4
jmp	short loc_52A4BF

loc_52A4D4:
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_C]
sub	edx, [ebp+var_58]
sar	edx, 2
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_10], ecx
jmp	short loc_52A521

loc_52A511:
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[ebp+var_14], edx

loc_52A521:
lea	eax, [ebp+var_6C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_64]
mov	[edx], eax
mov	ecx, [ebp+var_14]
xor	edx, edx
cmp	ecx, [ebp+var_6C]
setnz	dl
mov	[ebp+var_7E], dl
movzx	eax, [ebp+var_7E]
test	eax, eax
jz	short loc_52A54D
jmp	short loc_52A511

loc_52A54D:
lea	ecx, [ebp+var_7C]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_70]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_78]
mov	[eax], ecx
mov	eax, [ebp+arg_0]

loc_52A572:
mov	esp, ebp
pop	ebp
retn
sub_52A410 endp

align 10h


; Attributes: bp-based frame

sub_52A580 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	al, [ebp+arg_8]
mov	[ebp+var_15], al
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
cmp	eax, 2
jge	short loc_52A5A1
jmp	short loc_52A61C

loc_52A5A1:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_52A5C0:
mov	edx, [ebp+var_8]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [edx+4]
mov	[ebp+var_10], ecx
mov	edx, [edx+8]
mov	[ebp+var_C], edx
movzx	eax, [ebp+var_15]
push	eax
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+var_10]
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52BB80
add	esp, 1Ch
cmp	[ebp+var_8], 0
jnz	short loc_52A611
jmp	short loc_52A61C

loc_52A611:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_52A5C0

loc_52A61C:
mov	esp, ebp
pop	ebp
retn
sub_52A580 endp



; Attributes: bp-based frame

sub_52A620 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Ch
mov	[ebp+var_4], ecx

loc_52A633:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [edx]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52A66E
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
sub	edx, 0Ch
mov	[ebp+var_4], edx
jmp	short loc_52A633

loc_52A66E:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn
sub_52A620 endp

align 10h


; Attributes: bp-based frame

sub_52A690 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	al, [ebp+arg_8]
mov	[ebp+var_19], al
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
cmp	ecx, 2
jge	short loc_52A6AF
jmp	loc_52A731

loc_52A6AF:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_52A6C9:
mov	eax, [ebp+var_8]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [eax+4]
mov	[ebp+var_14], edx
mov	ecx, [eax+8]
mov	[ebp+var_10], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_C], edx
movzx	eax, [ebp+var_19]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_52BD70
add	esp, 20h
cmp	[ebp+var_8], 0
jnz	short loc_52A726
jmp	short loc_52A731

loc_52A726:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_52A6C9

loc_52A731:
mov	esp, ebp
pop	ebp
retn
sub_52A690 endp

align 10h


; Attributes: bp-based frame

sub_52A740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 10h
mov	[ebp+var_4], ecx

loc_52A753:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_8]
xor	ecx, ecx
cmp	eax, [edx+4]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52A795
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
sub	edx, 10h
mov	[ebp+var_4], edx
jmp	short loc_52A753

loc_52A795:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	esp, ebp
pop	ebp
retn
sub_52A740 endp

align 10h


; Attributes: bp-based frame

sub_52A7C0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	al, [ebp+arg_8]
mov	[ebp+var_11], al
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
cmp	ecx, 2
jge	short loc_52A7DC
jmp	short loc_52A83D

loc_52A7DC:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_52A7F6:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	[ebp+var_10], edx
mov	[ebp+var_C], eax
movzx	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_52BF80
add	esp, 18h
cmp	[ebp+var_8], 0
jnz	short loc_52A832
jmp	short loc_52A83D

loc_52A832:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_52A7F6

loc_52A83D:
mov	esp, ebp
pop	ebp
retn
sub_52A7C0 endp

align 10h


; Attributes: bp-based frame

sub_52A850 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 8
mov	[ebp+var_4], ecx

loc_52A863:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_8]
xor	ecx, ecx
cmp	eax, [edx+4]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52A899
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+arg_0]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
sub	edx, 8
mov	[ebp+var_4], edx
jmp	short loc_52A863

loc_52A899:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	esp, ebp
pop	ebp
retn
sub_52A850 endp

align 10h


; Attributes: bp-based frame

sub_52A8B0 proc	near

var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_5]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_4]
call	sub_52C110
lea	eax, [ebp+var_4]
push	eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_48]
call	sub_52B950
push	0
lea	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_4]
call	sub_51CAC0
mov	esp, ebp
pop	ebp
retn	10h
sub_52A8B0 endp

align 10h


; Attributes: bp-based frame

sub_52A900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_4]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_52A410
add	esp, 10h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_52A900 endp

align 10h


; Attributes: bp-based frame

sub_52A930 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	0
push	0
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C1A0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_52A930 endp

align 10h


; Attributes: bp-based frame

sub_52A960 proc	near

var_6C=	dword ptr -6Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h
arg_20=	byte ptr  28h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_52A960
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	eax, [ebp+arg_0]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 40h
mov	[ebp+var_10], ecx

loc_52A98A:
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	[edx+4]
comiss	xmm0, [ebp+arg_8]
jbe	short loc_52A9A1
mov	[ebp+var_6C], 1
jmp	short loc_52A9A8

loc_52A9A1:
mov	[ebp+var_6C], 0

loc_52A9A8:
movzx	eax, byte ptr [ebp+var_6C]
test	eax, eax
jz	short loc_52A9CD
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_44CDB0
mov	edx, [ebp+var_10]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_10]
sub	eax, 40h
mov	[ebp+var_10], eax
jmp	short loc_52A98A

loc_52A9CD:
lea	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_44CDB0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_20]
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_52A960 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_52AA10(void *, int)
sub_52AA10 proc	near

var_80=	dword ptr -80h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 80h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_52AA6A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_51E710
mov	eax, [ebp+var_8]
mov	[ebp+var_80], eax
jmp	short loc_52AA71

loc_52AA6A:
mov	[ebp+var_80], 0

loc_52AA71:
mov	esp, ebp
pop	ebp
retn
sub_52AA10 endp

align 10h


; Attributes: bp-based frame

sub_52AA80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cmp	eax, 2
jge	short loc_52AA96
jmp	short loc_52AAE5

loc_52AA96:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_52AAB0:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C3E0
add	esp, 14h
cmp	[ebp+var_8], 0
jnz	short loc_52AADA
jmp	short loc_52AAE5

loc_52AADA:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_52AAB0

loc_52AAE5:
mov	esp, ebp
pop	ebp
retn
sub_52AA80 endp

align 10h


; Attributes: bp-based frame

sub_52AAF0 proc	near

var_48=	dword ptr -48h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
push	0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_14]
call	sub_4046E0
call	sub_52C530
add	esp, 14h
mov	[ebp+var_48], eax
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn
sub_52AAF0 endp



; Attributes: bp-based frame

sub_52AB30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 2
jge	short loc_52AB46
jmp	short loc_52ABAC

loc_52AB46:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_52AB60:
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8+4]
push	eax
mov	ecx, [edx+ecx*8]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C570
add	esp, 20h
cmp	[ebp+var_8], 0
jnz	short loc_52ABA1
jmp	short loc_52ABAC

loc_52ABA1:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_52AB60

loc_52ABAC:
mov	esp, ebp
pop	ebp
retn
sub_52AB30 endp



; Attributes: bp-based frame

sub_52ABB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 8
mov	[ebp+var_4], ecx

loc_52ABC3:
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+arg_C]
call	sub_F62E00
movzx	ecx, al
test	ecx, ecx
jz	short loc_52AC05
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
sub	edx, 8
mov	[ebp+var_4], edx
jmp	short loc_52ABC3

loc_52AC05:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	esp, ebp
pop	ebp
retn
sub_52ABB0 endp

align 10h


; Attributes: bp-based frame

sub_52AC20 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
cmp	eax, 2
jge	short loc_52AC3E
jmp	loc_52ACDC

loc_52AC3E:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_52AC5D:
mov	edx, [ebp+var_8]
imul	edx, 18h
add	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [edx+4]
mov	[ebp+var_1C], ecx
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_14], ecx
mov	eax, [edx+10h]
mov	[ebp+var_10], eax
mov	ecx, [edx+14h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_8]
push	edx
sub	esp, 18h
mov	eax, esp
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_10]
mov	[eax+10h], ecx
mov	edx, [ebp+var_C]
mov	[eax+14h], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C6D0
add	esp, 28h
cmp	[ebp+var_8], 0
jnz	short loc_52ACD1
jmp	short loc_52ACDC

loc_52ACD1:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_52AC5D

loc_52ACDC:
mov	esp, ebp
pop	ebp
retn
sub_52AC20 endp



; Attributes: bp-based frame

sub_52ACE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 18h
mov	[ebp+var_4], ecx

loc_52ACF3:
mov	edx, [ebp+var_4]
sub	esp, 18h
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
sub	esp, 18h
mov	eax, esp
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	ecx, [ebp+arg_14]
mov	[eax+10h], ecx
mov	edx, [ebp+arg_18]
mov	[eax+14h], edx
call	[ebp+arg_1C]
add	esp, 30h
test	eax, eax
jz	short loc_52AD8B
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
sub	edx, 18h
mov	[ebp+var_4], edx
jmp	loc_52ACF3

loc_52AD8B:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	ecx, [ebp+arg_14]
mov	[eax+10h], ecx
mov	edx, [ebp+arg_18]
mov	[eax+14h], edx
mov	esp, ebp
pop	ebp
retn
sub_52ACE0 endp

align 10h


; Attributes: bp-based frame

sub_52ADC0 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52C9B0
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52B6D0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_504FC0
mov	esp, ebp
pop	ebp
retn	10h
sub_52ADC0 endp

align 10h


; Attributes: bp-based frame

sub_52AE30 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52CA10
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52B750
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_5053B0
mov	esp, ebp
pop	ebp
retn	10h
sub_52AE30 endp

align 10h


; Attributes: bp-based frame

sub_52AEA0 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52CA70
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52B7D0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_640F10
mov	esp, ebp
pop	ebp
retn	10h
sub_52AEA0 endp

align 10h


; Attributes: bp-based frame

sub_52AF10 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52CAD0
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52B850
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_506A50
mov	esp, ebp
pop	ebp
retn	10h
sub_52AF10 endp

align 10h


; Attributes: bp-based frame

sub_52AF80 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52CB30
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52B8D0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_51CA50
mov	esp, ebp
pop	ebp
retn	10h
sub_52AF80 endp

align 10h


; Attributes: bp-based frame

sub_52AFF0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_52B001

loc_52AFF8:
mov	eax, [ebp+arg_0]
sub	eax, 30h
mov	[ebp+arg_0], eax

loc_52B001:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_52B047
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 30h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_52B045
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52B045:
jmp	short loc_52AFF8

loc_52B047:
mov	esp, ebp
pop	ebp
retn
sub_52AFF0 endp

align 10h


; Attributes: bp-based frame

sub_52B050 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52CB90
call	nullsub_1
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52B9F0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_50BAC0
mov	esp, ebp
pop	ebp
retn	10h
sub_52B050 endp

align 10h


; Attributes: bp-based frame

sub_52B0C0 proc	near

var_6C=	dword ptr -6Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_52CBF0
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_525E00
lea	ecx, [ebp+var_8]
call	sub_46B570
mov	esp, ebp
pop	ebp
retn	10h
sub_52B0C0 endp

align 10h


; Attributes: bp-based frame

sub_52B120 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52CC80
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B120 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_52B170(void *, int)
sub_52B170 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	44h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_52B1CB
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403400
mov	edx, [ebp+arg_4]
add	edx, 28h
mov	[ebp+var_34], edx
mov	eax, [ebp+var_4]
add	eax, 28h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4694E0
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	cl, [eax+18h]
mov	[edx+18h], cl
mov	edx, [ebp+var_4]
mov	[ebp+var_38], edx
jmp	short loc_52B1D2

loc_52B1CB:
mov	[ebp+var_38], 0

loc_52B1D2:
mov	esp, ebp
pop	ebp
retn
sub_52B170 endp

align 10h


; Attributes: bp-based frame

sub_52B1E0 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52CCF0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B1E0 endp

align 10h


; Attributes: bp-based frame

sub_52B230 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_526090
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	eax, [ebp+arg_8]
and	eax, [edx+4]
mov	[ebp+arg_8], eax
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
mov	[edx], eax
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	edx, [ebp+var_50]
mov	eax, [edx]
lea	ecx, [eax+ecx+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	dword ptr [edx], 0FFFFFFFEh
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52B2E3
mov	edx, [ebp+var_8]
push	edx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jz	short loc_52B2D7
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_28]
call	sub_67AF90
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_54], eax
jmp	short loc_52B2DE

loc_52B2D7:
mov	[ebp+var_54], 0

loc_52B2DE:
jmp	loc_52B4AB

loc_52B2E3:
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx

loc_52B2E9:
mov	edx, [ebp+var_C]
add	edx, 1
mov	eax, [ebp+var_50]
mov	ecx, [eax]
and	edx, [ecx+4]
mov	[ebp+var_C], edx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
shl	ecx, 4
lea	edx, [eax+ecx+8]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	dword ptr [eax], 0FFFFFFFEh
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52B2E9
mov	eax, [ebp+var_C]
shl	eax, 4
mov	ecx, [ebp+var_50]
mov	edx, [ecx]
lea	eax, [edx+eax+8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
cmp	eax, [ebp+var_4]
jnz	loc_52B3D9
mov	ecx, [ebp+var_10]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jz	short loc_52B3A4
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_38], edx
mov	eax, [ebp+var_20]
add	eax, 8
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_67AF90
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_58], edx
jmp	short loc_52B3AB

loc_52B3A4:
mov	[ebp+var_58], 0

loc_52B3AB:
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_67A3D0
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	[edx], eax
jmp	loc_52B4AB

loc_52B3D9:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	[ebp+var_14], eax

loc_52B3E8:
mov	ecx, [ebp+var_14]
shl	ecx, 4
mov	edx, [ebp+var_50]
mov	eax, [edx]
lea	ecx, [eax+ecx+8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jnz	short loc_52B474
mov	ecx, [ebp+var_10]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jz	short loc_52B463
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_48], edx
mov	eax, [ebp+var_24]
add	eax, 8
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_44]
call	sub_67AF90
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_5C], edx
jmp	short loc_52B46A

loc_52B463:
mov	[ebp+var_5C], 0

loc_52B46A:
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
jmp	short loc_52B481

loc_52B474:
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_14], eax
jmp	loc_52B3E8

loc_52B481:
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_67A3D0
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0FFFFFFFFh

loc_52B4AB:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx+4], edx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B230 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_52B4C0(void *, int)
sub_52B4C0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_52B535
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_28]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_28]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_24]
add	ecx, 10h
call	sub_4FECB0
mov	edx, [ebp+var_4]
mov	[ebp+var_2C], edx
jmp	short loc_52B53C

loc_52B535:
mov	[ebp+var_2C], 0

loc_52B53C:
mov	esp, ebp
pop	ebp
retn
sub_52B4C0 endp



; Attributes: bp-based frame

sub_52B540 proc	near

var_88=	dword ptr -88h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_52CD60
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B540 endp

align 10h


; Attributes: bp-based frame

sub_52B590 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_52CDB0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B590 endp

align 10h


; Attributes: bp-based frame

sub_52B5E0 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_52CE00
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B5E0 endp

align 10h


; Attributes: bp-based frame

sub_52B630 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_52CE50
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B630 endp

align 10h


; Attributes: bp-based frame

sub_52B680 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_52CEA0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52B680 endp

align 10h


; Attributes: bp-based frame

sub_52B6D0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52B6F7
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52B740

loc_52B6F7:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_5255A0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_504FC0

loc_52B740:
mov	esp, ebp
pop	ebp
retn	8
sub_52B6D0 endp

align 10h


; Attributes: bp-based frame

sub_52B750 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52B777
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52B7C0

loc_52B777:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_5255F0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_5053B0

loc_52B7C0:
mov	esp, ebp
pop	ebp
retn	8
sub_52B750 endp

align 10h


; Attributes: bp-based frame

sub_52B7D0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52B7F7
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52B840

loc_52B7F7:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_525640
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_640F10

loc_52B840:
mov	esp, ebp
pop	ebp
retn	8
sub_52B7D0 endp

align 10h


; Attributes: bp-based frame

sub_52B850 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52B877
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52B8C0

loc_52B877:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_5256E0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_506A50

loc_52B8C0:
mov	esp, ebp
pop	ebp
retn	8
sub_52B850 endp

align 10h


; Attributes: bp-based frame

sub_52B8D0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52B8F7
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52B940

loc_52B8F7:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_525810
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_51CA50

loc_52B940:
mov	esp, ebp
pop	ebp
retn	8
sub_52B8D0 endp

align 10h


; Attributes: bp-based frame

sub_52B950 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax], 0
jz	loc_52B9E8
mov	[ebp+var_1], 1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_52B99F
push	0
mov	edx, [ebp+arg_4]
push	edx
call	sub_77E480
add	esp, 8
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
call	sub_77E480
add	esp, 8
push	eax
call	sub_77E450
add	esp, 0Ch
jmp	short loc_52B9E8

loc_52B99F:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_52CEF0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_51CAC0

loc_52B9E8:
mov	esp, ebp
pop	ebp
retn	8
sub_52B950 endp

align 10h


; Attributes: bp-based frame

sub_52B9F0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
call	nullsub_1
call	nullsub_1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52BA21
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52BA6A

loc_52BA21:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_525960
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_50BAC0

loc_52BA6A:
mov	esp, ebp
pop	ebp
retn	8
sub_52B9F0 endp



; Attributes: bp-based frame

sub_52BA70 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_20]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_52BAB4

loc_52BAAB:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_52BAB4:
cmp	[ebp+var_10], 0
jle	short loc_52BADE
mov	eax, [ebp+var_20]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_452030
add	esp, 8
mov	edx, [ebp+var_20]
add	edx, 28h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_C]
add	eax, 28h
mov	[ebp+var_C], eax
jmp	short loc_52BAAB

loc_52BADE:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_52BA70 endp

align 10h


; Attributes: bp-based frame

sub_52BAF0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_38], edx

loc_52BB0A:
mov	eax, [ebp+var_3C]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52BB70
mov	eax, [ebp+var_3C]
add	eax, 4
mov	[ebp+var_8], eax
push	1
mov	ecx, [ebp+var_40]
call	sub_4E1E10
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
push	ecx		; int
mov	edx, [ebp+var_C]
add	edx, 4
push	edx		; void *
call	sub_51D770
add	esp, 8
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
jmp	short loc_52BB0A

loc_52BB70:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52BAF0 endp

align 10h


; Attributes: bp-based frame

sub_52BB80 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	byte ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_52BB97:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_52BC03
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_8]
imul	edx, 0Ch
mov	eax, [ebp+arg_0]
mov	esi, [ebp+arg_0]
mov	edx, [eax+edx]
xor	eax, eax
cmp	edx, [esi+ecx]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52BBCF
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_52BBCF:
mov	eax, [ebp+var_8]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
imul	ecx, 0Ch
add	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_8]
lea	eax, [edx+edx+2]
mov	[ebp+var_8], eax
jmp	short loc_52BB97

loc_52BC03:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_52BC39
mov	edx, [ebp+var_8]
sub	edx, 1
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_52BC39:
mov	cl, [ebp+arg_18]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_52BC65:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_4]
jle	short loc_52BCC0
mov	ecx, [ebp+var_C]
imul	ecx, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx]
xor	ecx, ecx
cmp	eax, [ebp+var_1C]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52BCC0
mov	eax, [ebp+var_C]
imul	eax, 0Ch
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
imul	ecx, 0Ch
add	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_52BC65

loc_52BCC0:
mov	edx, [ebp+var_10]
imul	edx, 0Ch
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[edx+4], ecx
mov	eax, [ebp+var_14]
mov	[edx+8], eax
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_52BB80 endp

align 10h


; Attributes: bp-based frame

sub_52BCE0 proc	near

var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	al, [ebp+arg_8]
mov	[ebp+var_E], al
mov	ecx, [ebp+arg_4]
sub	ecx, 0Ch
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ecx+4]
mov	[ebp+var_8], eax
mov	ecx, [ecx+8]
mov	[ebp+var_4], ecx
mov	dl, [ebp+var_E]
mov	[ebp+var_D], dl
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
sub	ecx, 0Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
movzx	ecx, [ebp+var_D]
push	ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	[edx+4], ecx
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	eax, [ebp+arg_4]
sub	eax, 0Ch
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0Ch
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_52BB80
add	esp, 1Ch
mov	esp, ebp
pop	ebp
retn
sub_52BCE0 endp

align 10h


; Attributes: bp-based frame

sub_52BD70 proc	near

var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 24h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_52BD87:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_52BDFB
mov	ecx, [ebp+var_8]
sub	ecx, 1
shl	ecx, 4
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_0]
mov	esi, [ebp+arg_0]
mov	edx, [eax+edx+4]
xor	eax, eax
cmp	edx, [esi+ecx+4]
setnle	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52BDC1
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_52BDC1:
mov	eax, [ebp+var_8]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
shl	ecx, 4
add	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_8]
lea	eax, [edx+edx+2]
mov	[ebp+var_8], eax
jmp	short loc_52BD87

loc_52BDFB:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_52BE37
mov	edx, [ebp+var_8]
sub	edx, 1
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_52BE37:
mov	cl, [ebp+arg_1C]
mov	[ebp+var_21], cl
mov	edx, [ebp+arg_C]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_14]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_18]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_52BE69:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_4]
jle	short loc_52BECB
mov	edx, [ebp+var_C]
shl	edx, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+4]
xor	edx, edx
cmp	ecx, [ebp+var_1C]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_52BECB
mov	ecx, [ebp+var_C]
shl	ecx, 4
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_52BE69

loc_52BECB:
mov	eax, [ebp+var_10]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_18]
mov	[eax+8], ecx
mov	edx, [ebp+var_14]
mov	[eax+0Ch], edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_52BD70 endp



; Attributes: bp-based frame

sub_52BEF0 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	al, [ebp+arg_8]
mov	[ebp+var_12], al
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ecx+4]
mov	[ebp+var_C], eax
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_4], eax
mov	cl, [ebp+var_12]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
sub	eax, 10h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
movzx	eax, [ebp+var_11]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
sub	ecx, [ebp+arg_0]
sar	ecx, 4
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_52BD70
add	esp, 20h
mov	esp, ebp
pop	ebp
retn
sub_52BEF0 endp

align 10h


; Attributes: bp-based frame

sub_52BF80 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_52BF97:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_52BFF4
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	ecx, [edx+ecx*8+4]
xor	edx, edx
cmp	ecx, [esi+eax*8-4]
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_52BFC8
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx

loc_52BFC8:
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx*8]
mov	edx, [eax+edx*8+4]
mov	eax, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+eax*8], ecx
mov	[esi+eax*8+4], edx
mov	ecx, [ebp+var_8]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_8]
lea	eax, [edx+edx+2]
mov	[ebp+var_8], eax
jmp	short loc_52BF97

loc_52BFF4:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_52C020
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx*8-8]
mov	edx, [eax+edx*8-4]
mov	eax, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+eax*8], ecx
mov	[esi+eax*8+4], edx
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_52C020:
mov	dl, [ebp+arg_14]
mov	[ebp+var_19], dl
mov	eax, [ebp+arg_C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_52C046:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_4]
jle	short loc_52C097
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8+4]
xor	ecx, ecx
cmp	eax, [ebp+var_14]
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52C097
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	ecx, [ebp+var_10]
mov	esi, [ebp+arg_0]
mov	[esi+ecx*8], edx
mov	[esi+ecx*8+4], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_52C046

loc_52C097:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_18]
mov	[ecx+eax*8], edx
mov	edx, [ebp+var_14]
mov	[ecx+eax*8+4], edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_52BF80 endp

align 10h


; Attributes: bp-based frame

sub_52C0B0 proc	near

var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	al, [ebp+arg_8]
mov	[ebp+var_A], al
mov	ecx, [ebp+arg_4]
mov	edx, [ecx-8]
mov	eax, [ecx-4]
mov	[ebp+var_8], edx
mov	[ebp+var_4], eax
mov	cl, [ebp+var_A]
mov	[ebp+var_9], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+arg_4]
mov	[edx-8], eax
mov	[edx-4], ecx
movzx	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, 8
sub	eax, [ebp+arg_0]
sar	eax, 3
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52BF80
add	esp, 18h
mov	esp, ebp
pop	ebp
retn
sub_52C0B0 endp

align 10h


; Attributes: bp-based frame

sub_52C110 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
xor	eax, eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_44]
mov	dword ptr [ecx], 0
xor	edx, edx
mov	[ebp+var_D], dl
mov	eax, [ebp+arg_0]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_3C], ecx

loc_52C146:
mov	edx, [ebp+var_40]
xor	eax, eax
cmp	edx, [ebp+arg_4]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_52C192
mov	edx, [ebp+var_40]
add	edx, 8
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_44]
call	sub_5268A0
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_38]
mov	[ecx], edx
mov	eax, [ebp+var_38]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_40], edx
jmp	short loc_52C146

loc_52C192:
mov	eax, [ebp+var_44]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52C110 endp

align 10h


; Attributes: bp-based frame

sub_52C1A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 6
cmp	eax, 2
jge	short loc_52C1B6
jmp	short loc_52C210

loc_52C1B6:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 6
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_52C1D0:
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
shl	eax, 6
add	eax, [ebp+arg_0]
sub	esp, 40h
mov	ecx, esp
push	eax
call	sub_44CC50
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_52C220
add	esp, 50h
cmp	[ebp+var_8], 0
jnz	short loc_52C205
jmp	short loc_52C210

loc_52C205:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_52C1D0

loc_52C210:
mov	esp, ebp
pop	ebp
retn
sub_52C1A0 endp

align 10h


; Attributes: bp-based frame

sub_52C220 proc	near

var_78=	dword ptr -78h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_28=	byte ptr  30h
arg_4C=	byte ptr  54h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_52D040
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 6Ch
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_14], edx

loc_52C24C:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_8]
jge	short loc_52C2C1
mov	ecx, [ebp+var_14]
shl	ecx, 6
mov	edx, [ebp+var_14]
sub	edx, 1
shl	edx, 6
mov	eax, [ebp+arg_0]
mov	esi, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+edx+4]
comiss	xmm0, dword ptr	[esi+ecx+4]
jbe	short loc_52C27F
mov	[ebp+var_78], 1
jmp	short loc_52C286

loc_52C27F:
mov	[ebp+var_78], 0

loc_52C286:
movzx	ecx, byte ptr [ebp+var_78]
test	ecx, ecx
jz	short loc_52C297
mov	edx, [ebp+var_14]
sub	edx, 1
mov	[ebp+var_14], edx

loc_52C297:
mov	eax, [ebp+var_14]
shl	eax, 6
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 6
add	ecx, [ebp+arg_0]
call	sub_44CDB0
mov	ecx, [ebp+var_14]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_14]
lea	eax, [edx+edx+2]
mov	[ebp+var_14], eax
jmp	short loc_52C24C

loc_52C2C1:
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+arg_8]
jnz	short loc_52C2ED
mov	edx, [ebp+var_14]
sub	edx, 1
shl	edx, 6
add	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+arg_4]
shl	ecx, 6
add	ecx, [ebp+arg_0]
call	sub_44CDB0
mov	eax, [ebp+var_14]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_52C2ED:
movzx	ecx, [ebp+arg_4C]
push	ecx
sub	esp, 40h
mov	ecx, esp
lea	edx, [ebp+arg_C]
push	edx
call	sub_44CC50
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52D040
add	esp, 50h
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_28]
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_52C220 endp



; Attributes: bp-based frame

sub_52C340 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
movzx	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_52D110
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_52C340 endp

align 10h


; Attributes: bp-based frame

sub_52C370 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+arg_0]
sar	eax, 6
mov	[ebp+var_C], eax
jmp	short loc_52C3AF

loc_52C3A6:
mov	ecx, [ebp+var_C]
sub	ecx, 1
mov	[ebp+var_C], ecx

loc_52C3AF:
cmp	[ebp+var_C], 0
jle	short loc_52C3D5
mov	edx, [ebp+var_10]
sub	edx, 40h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
sub	eax, 40h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_44CDB0
jmp	short loc_52C3A6

loc_52C3D5:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_52C370 endp

align 10h


; Attributes: bp-based frame

sub_52C3E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_52C3F7:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_52C44E
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4-4]
push	eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*4]
push	eax
call	[ebp+arg_10]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_52C42A
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_52C42A:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	edx, [esi+edx*4]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_52C3F7

loc_52C44E:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_52C472
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	eax, [esi+eax*4-4]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_52C472:
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_52C486:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_4]
jle	short loc_52C4D1
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx*4]
push	ecx
call	[ebp+arg_10]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_52C4D1
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	esi, [ebp+arg_0]
mov	edx, [esi+edx*4]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_52C486

loc_52C4D1:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+ecx*4], eax
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_52C3E0 endp

align 10h


; Attributes: bp-based frame

sub_52C4F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax-4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx-4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 4
sub	ecx, [ebp+arg_0]
sar	ecx, 2
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C3E0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_52C4F0 endp

align 10h


; Attributes: bp-based frame

sub_52C530 proc	near

var_34=	dword ptr -34h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
call	sub_52D1B0
add	esp, 10h
mov	[ebp+var_34], eax
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_52C530 endp

align 10h


; Attributes: bp-based frame

sub_52C570 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_52C588:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_52C5F3
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx*8-4]
push	eax
mov	ecx, [edx+ecx*8-8]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx*8+4]
push	ecx
mov	edx, [eax+edx*8]
push	edx
lea	ecx, [ebp+arg_14]
call	sub_F62E00
movzx	eax, al
test	eax, eax
jz	short loc_52C5C7
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx

loc_52C5C7:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	edi, [esi+ecx*8]
mov	[eax+edx*8], edi
mov	ecx, [esi+ecx*8+4]
mov	[eax+edx*8+4], ecx
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_8]
lea	ecx, [eax+eax+2]
mov	[ebp+var_8], ecx
jmp	short loc_52C588

loc_52C5F3:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jnz	short loc_52C61F
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	esi, [ebp+arg_0]
mov	edi, [esi+edx*8-8]
mov	[ecx+eax*8], edi
mov	edx, [esi+edx*8-4]
mov	[ecx+eax*8+4], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_52C61F:
sub	esp, 0Ch
mov	ecx, esp
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+arg_18]
mov	[ecx+4], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52D250
add	esp, 20h
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_52C570 endp

align 10h


; Attributes: bp-based frame

sub_52C660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	ecx, [eax-8]
mov	[ebp+var_8], ecx
mov	edx, [eax-4]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax-8], edx
mov	ecx, [ecx+4]
mov	[eax-4], ecx
sub	esp, 0Ch
mov	edx, esp
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_C]
mov	[edx+4], ecx
mov	eax, [ebp+arg_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, 8
sub	eax, [ebp+arg_0]
sar	eax, 3
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C570
add	esp, 20h
mov	esp, ebp
pop	ebp
retn
sub_52C660 endp

align 10h


; Attributes: bp-based frame

sub_52C6D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_52C6E6:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	loc_52C7B1
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 18h
add	ecx, [ebp+arg_0]
sub	esp, 18h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_8]
imul	edx, 18h
add	edx, [ebp+arg_0]
sub	esp, 18h
mov	eax, esp
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
call	[ebp+arg_24]
add	esp, 30h
test	eax, eax
jz	short loc_52C768
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_52C768:
mov	ecx, [ebp+var_8]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
imul	edx, 18h
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_8]
lea	ecx, [eax+eax+2]
mov	[ebp+var_8], ecx
jmp	loc_52C6E6

loc_52C7B1:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jnz	short loc_52C7F9
mov	eax, [ebp+var_8]
sub	eax, 1
imul	eax, 18h
add	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_52C7F9:
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_52C80D:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_4]
jle	loc_52C8C8
sub	esp, 18h
mov	ecx, esp
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_10]
mov	[ecx+4], eax
mov	edx, [ebp+arg_14]
mov	[ecx+8], edx
mov	eax, [ebp+arg_18]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+10h], edx
mov	eax, [ebp+arg_20]
mov	[ecx+14h], eax
mov	ecx, [ebp+var_C]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
sub	esp, 18h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
call	[ebp+arg_24]
add	esp, 30h
test	eax, eax
jz	short loc_52C8C8
mov	edx, [ebp+var_C]
imul	edx, 18h
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_10]
imul	eax, 18h
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	loc_52C80D

loc_52C8C8:
mov	ecx, [ebp+var_10]
imul	ecx, 18h
add	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_10]
mov	[ecx+4], eax
mov	edx, [ebp+arg_14]
mov	[ecx+8], edx
mov	eax, [ebp+arg_18]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+10h], edx
mov	eax, [ebp+arg_20]
mov	[ecx+14h], eax
mov	esp, ebp
pop	ebp
retn
sub_52C6D0 endp

align 10h


; Attributes: bp-based frame

sub_52C900 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
sub	eax, 18h
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [eax+4]
mov	[ebp+var_14], edx
mov	ecx, [eax+8]
mov	[ebp+var_10], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_C], edx
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
mov	edx, [eax+14h]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
sub	ecx, 18h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
mov	ecx, [ebp+arg_8]
push	ecx
sub	esp, 18h
mov	edx, esp
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	[edx+4], ecx
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_C]
mov	[edx+0Ch], ecx
mov	eax, [ebp+var_8]
mov	[edx+10h], eax
mov	ecx, [ebp+var_4]
mov	[edx+14h], ecx
mov	eax, [ebp+arg_4]
sub	eax, 18h
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_52C6D0
add	esp, 28h
mov	esp, ebp
pop	ebp
retn
sub_52C900 endp

align 10h


; Attributes: bp-based frame

sub_52C9B0 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52D2E0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52C9B0 endp

align 10h


; Attributes: bp-based frame

sub_52CA10 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52D330
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CA10 endp

align 10h


; Attributes: bp-based frame

sub_52CA70 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52D380
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CA70 endp

align 10h


; Attributes: bp-based frame

sub_52CAD0 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52D3D0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CAD0 endp

align 10h


; Attributes: bp-based frame

sub_52CB30 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52D420
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CB30 endp

align 10h


; Attributes: bp-based frame

sub_52CB90 proc	near

var_60=	dword ptr -60h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_60]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_60]
push	edx
mov	ecx, [ebp+var_60]
call	sub_52D470
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CB90 endp

align 10h


; Attributes: bp-based frame

sub_52CBF0 proc	near

var_7C=	dword ptr -7Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	[eax+4], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_7C]
mov	ecx, [eax]
mov	[edx+4], ecx
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	[ebp+var_30], esp
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
call	sub_52D4C0
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CBF0 endp

align 10h


; Attributes: bp-based frame

sub_52CC80 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52D510
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52CF40
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_507280
mov	esp, ebp
pop	ebp
retn	10h
sub_52CC80 endp

align 10h


; Attributes: bp-based frame

sub_52CCF0 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52D570
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52CFC0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_51CAC0
mov	esp, ebp
pop	ebp
retn	10h
sub_52CCF0 endp

align 10h


; Attributes: bp-based frame

sub_52CD60 proc	near

var_6C=	dword ptr -6Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_6C]
call	sub_52D5D0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CD60 endp

align 10h


; Attributes: bp-based frame

sub_52CDB0 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52D640
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CDB0 endp

align 10h


; Attributes: bp-based frame

sub_52CE00 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52D6B0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CE00 endp

align 10h


; Attributes: bp-based frame

sub_52CE50 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52D720
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CE50 endp

align 10h


; Attributes: bp-based frame

sub_52CEA0 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_52D790
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CEA0 endp

align 10h


; Attributes: bp-based frame

sub_52CEF0 proc	near

var_88=	dword ptr -88h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_52D800
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52CEF0 endp

align 10h


; Attributes: bp-based frame

sub_52CF40 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52CF67
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52CFB0

loc_52CF67:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_529820
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_507280

loc_52CFB0:
mov	esp, ebp
pop	ebp
retn	8
sub_52CF40 endp

align 10h


; Attributes: bp-based frame

sub_52CFC0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52CFE7
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52D030

loc_52CFE7:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_529A40
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_51CAC0

loc_52D030:
mov	esp, ebp
pop	ebp
retn	8
sub_52CFC0 endp

align 10h


; Attributes: bp-based frame

sub_52D040 proc	near

var_6C=	dword ptr -6Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	dword ptr  18h
arg_28=	byte ptr  30h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_52D040
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_10], eax

loc_52D069:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_52D0CC
mov	ecx, [ebp+var_10]
shl	ecx, 6
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+arg_10]
comiss	xmm0, dword ptr	[edx+ecx+4]
jbe	short loc_52D08F
mov	[ebp+var_6C], 1
jmp	short loc_52D096

loc_52D08F:
mov	[ebp+var_6C], 0

loc_52D096:
movzx	eax, byte ptr [ebp+var_6C]
test	eax, eax
jz	short loc_52D0CC
mov	ecx, [ebp+var_10]
shl	ecx, 6
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+arg_4]
shl	ecx, 6
add	ecx, [ebp+arg_0]
call	sub_44CDB0
mov	edx, [ebp+var_10]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_10], eax
jmp	short loc_52D069

loc_52D0CC:
lea	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 6
add	ecx, [ebp+arg_0]
call	sub_44CDB0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_28]
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_52D040 endp

align 10h


; Attributes: bp-based frame

sub_52D110 proc	near

var_81=	byte ptr -81h
var_80=	byte ptr -80h
var_64=	byte ptr -64h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_52D110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
mov	eax, [ebp+arg_4]
sub	eax, 40h
push	eax
lea	ecx, [ebp+var_80]
call	sub_44CC50
mov	cl, [ebp+arg_C]
mov	[ebp+var_81], cl
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+arg_4]
sub	ecx, 40h
call	sub_44CDB0
movzx	eax, [ebp+var_81]
push	eax
sub	esp, 40h
mov	ecx, esp
lea	edx, [ebp+var_80]
push	edx
call	sub_44CC50
mov	eax, [ebp+arg_4]
sub	eax, 40h
sub	eax, [ebp+arg_0]
sar	eax, 6
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_52C220
add	esp, 50h
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_64]
call	sub_436CF0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_52D110 endp

align 10h


; Attributes: bp-based frame

sub_52D1B0 proc	near

var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
jmp	short loc_52D1D6

loc_52D1BE:
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_0], eax
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_52D1D6:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_21], dl
movzx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_52D23A
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+var_20], ecx
xor	edx, edx
mov	byte ptr [ebp+var_14+1], dl
mov	al, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], al
xor	ecx, ecx
mov	byte ptr [ebp+var_14], cl
mov	dl, byte ptr [ebp+var_14]
mov	[ebp+var_12], dl
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	edx, [eax+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	[eax+4], edx
jmp	short loc_52D1BE

loc_52D23A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_52D1B0 endp

align 10h


; Attributes: bp-based frame

sub_52D250 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_52D264:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_52D2C2
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8+4]
push	edx
mov	eax, [ecx+eax*8]
push	eax
lea	ecx, [ebp+arg_14]
call	sub_F62E00
movzx	ecx, al
test	ecx, ecx
jz	short loc_52D2C2
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	esi, [ebp+arg_0]
mov	edi, [esi+ecx*8]
mov	[eax+edx*8], edi
mov	ecx, [esi+ecx*8+4]
mov	[eax+edx*8+4], ecx
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_52D264

loc_52D2C2:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx+eax*8], edx
mov	edx, [ebp+arg_10]
mov	[ecx+eax*8+4], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_52D250 endp

align 10h


; Attributes: bp-based frame

sub_52D2E0 proc	near

var_50=	dword ptr -50h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_50]
call	sub_52DA50
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D2E0 endp

align 10h


; Attributes: bp-based frame

sub_52D330 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_52DAE0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D330 endp

align 10h


; Attributes: bp-based frame

sub_52D380 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_52DB70
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D380 endp

align 10h


; Attributes: bp-based frame

sub_52D3D0 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_52DC00
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D3D0 endp

align 10h


; Attributes: bp-based frame

sub_52D420 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_52DC90
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D420 endp

align 10h


; Attributes: bp-based frame

sub_52D470 proc	near

var_48=	dword ptr -48h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_48]
call	sub_52DD20
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D470 endp

align 10h


; Attributes: bp-based frame

sub_52D4C0 proc	near

var_60=	dword ptr -60h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_60]
call	sub_52DDB0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D4C0 endp

align 10h


; Attributes: bp-based frame

sub_52D510 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52DE60
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D510 endp

align 10h


; Attributes: bp-based frame

sub_52D570 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52DEB0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D570 endp

align 10h


; Attributes: bp-based frame

sub_52D5D0 proc	near

var_68=	dword ptr -68h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52CA10
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_68]
call	sub_529DE0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_5053B0
mov	esp, ebp
pop	ebp
retn	10h
sub_52D5D0 endp

align 10h


; Attributes: bp-based frame

sub_52D640 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52DF60
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52D850
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_505EE0
mov	esp, ebp
pop	ebp
retn	10h
sub_52D640 endp

align 10h


; Attributes: bp-based frame

sub_52D6B0 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52DFC0
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52D8D0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_51C9E0
mov	esp, ebp
pop	ebp
retn	10h
sub_52D6B0 endp

align 10h


; Attributes: bp-based frame

sub_52D720 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52E020
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52D950
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_51CB30
mov	esp, ebp
pop	ebp
retn	10h
sub_52D720 endp

align 10h


; Attributes: bp-based frame

sub_52D790 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52E080
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_52D9D0
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_51CBA0
mov	esp, ebp
pop	ebp
retn	10h
sub_52D790 endp

align 10h


; Attributes: bp-based frame

sub_52D800 proc	near

var_6C=	dword ptr -6Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_6C]
call	sub_52E0E0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52D800 endp

align 10h


; Attributes: bp-based frame

sub_52D850 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52D877
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52D8C0

loc_52D877:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_52B590
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_505EE0

loc_52D8C0:
mov	esp, ebp
pop	ebp
retn	8
sub_52D850 endp

align 10h


; Attributes: bp-based frame

sub_52D8D0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52D8F7
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52D940

loc_52D8F7:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_52B5E0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_51C9E0

loc_52D940:
mov	esp, ebp
pop	ebp
retn	8
sub_52D8D0 endp

align 10h


; Attributes: bp-based frame

sub_52D950 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52D977
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52D9C0

loc_52D977:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_52B630
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_51CB30

loc_52D9C0:
mov	esp, ebp
pop	ebp
retn	8
sub_52D950 endp

align 10h


; Attributes: bp-based frame

sub_52D9D0 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_52D9F7
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_52DA40

loc_52D9F7:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_52B680
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_51CBA0

loc_52DA40:
mov	esp, ebp
pop	ebp
retn	8
sub_52D9D0 endp

align 10h


; Attributes: bp-based frame

sub_52DA50 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx

loc_52DA59:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	short loc_52DAD7
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_503180
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_51D700
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52DA59

loc_52DAD7:
mov	esp, ebp
pop	ebp
retn	10h
sub_52DA50 endp

align 10h


; Attributes: bp-based frame

sub_52DAE0 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx

loc_52DAE9:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_52DB67
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_44]
call	sub_4E1E10
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_51D770
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52DAE9

loc_52DB67:
mov	esp, ebp
pop	ebp
retn	10h
sub_52DAE0 endp

align 10h


; Attributes: bp-based frame

sub_52DB70 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_52DB79:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_52DBF7
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_503490
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_49C2D0
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52DB79

loc_52DBF7:
mov	esp, ebp
pop	ebp
retn	10h
sub_52DB70 endp

align 10h


; Attributes: bp-based frame

sub_52DC00 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_52DC09:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_52DC87
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_5DDE90
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 8
push	eax		; void *
call	sub_5A74B0
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52DC09

loc_52DC87:
mov	esp, ebp
pop	ebp
retn	10h
sub_52DC00 endp

align 10h


; Attributes: bp-based frame

sub_52DC90 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_52DC99:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_52DD17
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_510510
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_51D7E0
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52DC99

loc_52DD17:
mov	esp, ebp
pop	ebp
retn	10h
sub_52DC90 endp

align 10h


; Attributes: bp-based frame

sub_52DD20 proc	near

var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_2C], ecx

loc_52DD29:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_52DDA2
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_510570
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
add	edx, 4
mov	eax, [ebp+var_14]
call	sub_409EC0
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+arg_4], ecx
jmp	short loc_52DD29

loc_52DDA2:
mov	esp, ebp
pop	ebp
retn	10h
sub_52DD20 endp

align 10h


; Attributes: bp-based frame

sub_52DDB0 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
jmp	short loc_52DDC3

loc_52DDBB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_52DDC3:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_45], dl
movzx	eax, [ebp+var_45]
test	eax, eax
jz	short loc_52DE54
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_40]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_44]
call	sub_489B50
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_20]
mov	[eax+4], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
jmp	loc_52DDBB

loc_52DE54:
mov	esp, ebp
pop	ebp
retn	10h
sub_52DDB0 endp

align 10h


; Attributes: bp-based frame

sub_52DE60 proc	near

var_50=	dword ptr -50h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_50]
call	sub_52E150
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52DE60 endp

align 10h


; Attributes: bp-based frame

sub_52DEB0 proc	near

var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_58]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
lea	edx, [ebp+var_5C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_60], eax

loc_52DEEC:
lea	ecx, [ebp+var_2C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_5C]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
mov	[ebp+var_65], al
movzx	ecx, [ebp+var_65]
test	ecx, ecx
jz	short loc_52DF50
mov	edx, [ebp+var_5C]
add	edx, 8
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_64]
call	sub_5268A0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_60]
mov	edx, [ebp+var_54]
mov	[ecx], edx
mov	eax, [ebp+var_54]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
jmp	short loc_52DEEC

loc_52DF50:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52DEB0 endp

align 10h


; Attributes: bp-based frame

sub_52DF60 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52E1E0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52DF60 endp

align 10h


; Attributes: bp-based frame

sub_52DFC0 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52E230
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52DFC0 endp

align 10h


; Attributes: bp-based frame

sub_52E020 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52E280
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52E020 endp

align 10h


; Attributes: bp-based frame

sub_52E080 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_52E2D0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52E080 endp

align 10h


; Attributes: bp-based frame

sub_52E0E0 proc	near

var_68=	dword ptr -68h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52D570
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_68]
call	sub_52B950
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_51CAC0
mov	esp, ebp
pop	ebp
retn	10h
sub_52E0E0 endp

align 10h


; Attributes: bp-based frame

sub_52E150 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx

loc_52E159:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	short loc_52E1D7
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_49CAE0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 8
push	eax		; void *
call	sub_529C20
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52E159

loc_52E1D7:
mov	esp, ebp
pop	ebp
retn	10h
sub_52E150 endp

align 10h


; Attributes: bp-based frame

sub_52E1E0 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_52E320
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52E1E0 endp

align 10h


; Attributes: bp-based frame

sub_52E230 proc	near

var_50=	dword ptr -50h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_50]
call	sub_52E3B0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52E230 endp

align 10h


; Attributes: bp-based frame

sub_52E280 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_52E440
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52E280 endp

align 10h


; Attributes: bp-based frame

sub_52E2D0 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_52E4D0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_52E2D0 endp

align 10h


; Attributes: bp-based frame

sub_52E320 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_52E329:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_52E3A7
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CAE0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_525860
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52E329

loc_52E3A7:
mov	esp, ebp
pop	ebp
retn	10h
sub_52E320 endp

align 10h


; Attributes: bp-based frame

sub_52E3B0 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx

loc_52E3B9:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_35], dl
movzx	eax, [ebp+var_35]
test	eax, eax
jz	short loc_52E437
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_526980
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_529C90
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52E3B9

loc_52E437:
mov	esp, ebp
pop	ebp
retn	10h
sub_52E3B0 endp

align 10h


; Attributes: bp-based frame

sub_52E440 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_52E449:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_52E4C7
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_5269E0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_529D00
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52E449

loc_52E4C7:
mov	esp, ebp
pop	ebp
retn	10h
sub_52E440 endp

align 10h


; Attributes: bp-based frame

sub_52E4D0 proc	near

var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx

loc_52E4D9:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_41], dl
movzx	eax, [ebp+var_41]
test	eax, eax
jz	short loc_52E557
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_40]
call	sub_526A40
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_529D70
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_52E4D9

loc_52E557:
mov	esp, ebp
pop	ebp
retn	10h
sub_52E4D0 endp

align 10h



sub_52E560 proc	near
sub	ecx, 28h
jmp	sub_4E73D0
sub_52E560 endp

align 10h


; Attributes: bp-based frame

sub_52E570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 0
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+1Ch], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+20h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+24h], 0
mov	edx, [ebp+var_4]
add	edx, 28h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
add	ecx, 34h
mov	edx, dword_17EE12C
mov	[ecx], edx
mov	eax, dword_17EE130
mov	[ecx+4], eax
mov	edx, dword_17EE134
mov	[ecx+8], edx
mov	eax, dword_17EE138
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+44h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+45h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+46h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+48h], 0
mov	ecx, [ebp+var_4]
add	ecx, 4Ch
call	sub_10FB830
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_52E570 endp

align 10h


; Attributes: bp-based frame

sub_52E640 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 1
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 1
mov	edx, [ebp+var_30]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_30]
mov	dword ptr [eax+0Ch], 0FFFFFFFFh
lea	eax, [ebp+var_1]
call	nullsub_1
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_30]
add	ecx, 10h
mov	[ebp+var_1C], ecx
xor	edx, edx
mov	[ebp+var_14], edx
mov	[ebp+var_10], edx
mov	[ebp+var_C], edx
mov	[ebp+var_8], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[eax+4], edx
mov	ecx, [ebp+var_C]
mov	[eax+8], ecx
mov	edx, [ebp+var_8]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_15]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_5E1170
mov	ecx, [ebp+var_1C]
call	sub_5E11A0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_2]
mov	eax, [ebp+var_1C]
mov	[eax+14h], dl
lea	ecx, [ebp+var_2]
call	sub_42CA30
call	nullsub_1
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+28h], 0
mov	edx, [ebp+var_30]
mov	dword ptr [edx+2Ch], 0
mov	eax, [ebp+var_30]
add	eax, 30h
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_24]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+var_30]
add	eax, 38h
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_28]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+var_30]
add	eax, 40h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+var_30]
mov	byte ptr [eax+48h], 0
mov	ecx, [ebp+var_30]
mov	byte ptr [ecx+49h], 0
mov	edx, [ebp+var_30]
mov	byte ptr [edx+4Ah], 0
mov	eax, [ebp+var_30]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_30]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+34h], xmm0
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn
sub_52E640 endp

align 10h


; Attributes: bp-based frame

sub_52E7B0 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	edx, [ebp+var_14]
mov	dword ptr [edx+38h], 0
mov	dword ptr [edx+3Ch], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+40h], 0
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 44h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 6Ch
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+94h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+98h], 0
mov	dword ptr [edx+9Ch], 0
mov	eax, [ebp+var_14]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0A0h], xmm0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_52E7B0 endp

align 10h


; Attributes: bp-based frame

sub_52E890 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_23=	byte ptr -23h
var_22=	byte ptr -22h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_52E890
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 58h
call	sub_402390
lea	ecx, [ebp+var_F]
call	nullsub_1
lea	ecx, [ebp+var_10]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 80h
call	sub_402390
lea	ecx, [ebp+var_10]
call	nullsub_1
mov	eax, [ebp+var_34]
add	eax, 0ACh
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_22]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_489C40
mov	edx, [ebp+var_28]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_23]
mov	ecx, [ebp+var_28]
mov	[ecx+14h], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_34]
add	edx, 0C4h
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_52E890 endp

align 10h


; Attributes: bp-based frame

sub_52E9A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_52E9C7
xor	eax, eax
jmp	short loc_52E9DB

loc_52E9C7:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_818EC0
add	esp, 0Ch

loc_52E9DB:
mov	esp, ebp
pop	ebp
retn
sub_52E9A0 endp

align 10h


; Attributes: bp-based frame

sub_52E9E0 proc	near

var_10=	dword ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	dword ptr [ebp+var_C], eax
mov	dword ptr [ebp+var_C+4], 0
fild	[ebp+var_C]
push	ecx
fstp	[esp+10h+var_10]
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_484620
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_52E9E0 endp

align 10h


; Attributes: bp-based frame

sub_52EA10 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [ebp+var_18]
push	edx
call	sub_433700
add	esp, 0Ch
push	0Ah		; Radix
push	0		; EndPtr
lea	ecx, [ebp+var_18]
call	sub_5F52F0
push	eax		; String
call	__strtoui64
add	esp, 0Ch
mov	[ebp+var_20], eax
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_18]
call	sub_407910
mov	eax, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn
sub_52EA10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_52EA70(int, unsigned __int64 Val)
sub_52EA70 proc	near

var_31=	byte ptr -31h
var_30=	byte ptr -30h
DstBuf=	byte ptr -18h
var_17=	dword ptr -17h
var_13=	dword ptr -13h
var_F= dword ptr -0Fh
var_B= dword ptr -0Bh
var_7= dword ptr -7
arg_0= dword ptr  8
Val= qword ptr	0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	al, ds:byte_146D660
mov	[ebp+DstBuf], al
xor	ecx, ecx
mov	[ebp+var_17], ecx
mov	[ebp+var_13], ecx
mov	[ebp+var_F], ecx
mov	[ebp+var_B], ecx
mov	[ebp+var_7], ecx
push	0Ah		; Radix
push	15h		; Size
lea	edx, [ebp+DstBuf]
push	edx		; DstBuf
mov	eax, dword ptr [ebp+Val+4]
push	eax
mov	ecx, dword ptr [ebp+Val]
push	ecx		; Val
call	__ui64toa_s
add	esp, 14h
lea	ecx, [ebp+var_31]
call	sub_401EF0
push	eax
lea	edx, [ebp+DstBuf]
push	edx
lea	ecx, [ebp+var_30]
call	sub_407D30
lea	ecx, [ebp+var_30]
call	sub_4042A0
push	eax
lea	ecx, [ebp+var_30]
call	sub_5F52F0
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B9D0
add	esp, 0Ch
lea	ecx, [ebp+var_30]
call	sub_407910
lea	ecx, [ebp+var_31]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_52EA70 endp

align 10h


; Attributes: bp-based frame

sub_52EAF0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [ebp+var_18]
push	edx
call	sub_433700
add	esp, 0Ch
push	0Ah		; Radix
push	0		; EndPtr
lea	ecx, [ebp+var_18]
call	sub_5F52F0
push	eax		; String
call	__strtoi64
add	esp, 0Ch
mov	[ebp+var_20], eax
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_18]
call	sub_407910
mov	eax, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn
sub_52EAF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_52EB50(int, __int64 Val)
sub_52EB50 proc	near

var_31=	byte ptr -31h
var_30=	byte ptr -30h
DstBuf=	byte ptr -18h
var_17=	dword ptr -17h
var_13=	dword ptr -13h
var_F= dword ptr -0Fh
var_B= dword ptr -0Bh
var_7= dword ptr -7
arg_0= dword ptr  8
Val= qword ptr	0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	al, ds:byte_146D660
mov	[ebp+DstBuf], al
xor	ecx, ecx
mov	[ebp+var_17], ecx
mov	[ebp+var_13], ecx
mov	[ebp+var_F], ecx
mov	[ebp+var_B], ecx
mov	[ebp+var_7], ecx
push	0Ah		; Radix
push	15h		; Size
lea	edx, [ebp+DstBuf]
push	edx		; DstBuf
mov	eax, dword ptr [ebp+Val+4]
push	eax
mov	ecx, dword ptr [ebp+Val]
push	ecx		; Val
call	__i64toa_s
add	esp, 14h
lea	ecx, [ebp+var_31]
call	sub_401EF0
push	eax
lea	edx, [ebp+DstBuf]
push	edx
lea	ecx, [ebp+var_30]
call	sub_407D30
lea	ecx, [ebp+var_30]
call	sub_4042A0
push	eax
lea	ecx, [ebp+var_30]
call	sub_5F52F0
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B9D0
add	esp, 0Ch
lea	ecx, [ebp+var_30]
call	sub_407910
lea	ecx, [ebp+var_31]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_52EB50 endp

align 10h


; Attributes: bp-based frame

sub_52EBD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= word ptr	 0Ch

push	ebp
mov	ebp, esp
push	ecx
movzx	eax, [ebp+arg_4]
cvtsi2ss xmm0, eax
push	ecx
movss	[esp+8+var_8], xmm0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_484620
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_52EBD0 endp

align 10h


; Attributes: bp-based frame

sub_52EC00 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 14h
call	sub_10125D0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 40h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_52EC00 endp

align 10h


; Attributes: bp-based frame

sub_52EC50 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_52EC50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 10h
call	sub_402390
lea	ecx, [ebp+var_D]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 38h
call	sub_402390
lea	ecx, [ebp+var_E]
call	nullsub_1
lea	ecx, [ebp+var_F]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 70h
call	sub_402390
lea	ecx, [ebp+var_F]
call	nullsub_1
mov	edx, [ebp+var_28]
add	edx, 98h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_20], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_52EC50 endp

align 10h


; Attributes: bp-based frame

sub_52ED50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax
neg	eax
sbb	eax, eax
add	eax, 1
movzx	ecx, al
test	ecx, ecx
jnz	short loc_52EDAF
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax+4]
call	edx
xor	ecx, ecx
cmp	eax, 7
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_52EDA6
mov	eax, [ebp+var_4]
mov	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+var_4]
mov	ecx, [edx+8]
call	sub_64AE50
test	eax, eax
jz	short loc_52EDAF

loc_52EDA6:
mov	[ebp+var_8], 0
jmp	short loc_52EDB6

loc_52EDAF:
mov	[ebp+var_8], 1

loc_52EDB6:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_52ED50 endp

align 10h


; Attributes: bp-based frame

sub_52EDC0 proc	near

var_A8=	dword ptr -0A8h
var_84=	dword ptr -84h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
mov	[ebp+var_84], 0
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
jmp	short loc_52EDEF

loc_52EDE6:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_52EDEF:
mov	eax, [ebp+var_A8]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C]
jz	short loc_52EE40
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_52EE3E
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [edx]
mov	eax, [edx+10h]
call	eax
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_52EE3E
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_A8]
add	ecx, 0Ch
call	sub_57D860
mov	edx, [ebp+var_4]
mov	ecx, [edx]
mov	[eax], ecx

loc_52EE3E:
jmp	short loc_52EDE6

loc_52EE40:
mov	esp, ebp
pop	ebp
retn
sub_52EDC0 endp

align 10h


; Attributes: bp-based frame

sub_52EE50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax]
sub	eax, [ecx+8]
mov	esp, ebp
pop	ebp
retn
sub_52EE50 endp

align 10h


; Attributes: bp-based frame

sub_52EE70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_3= byte ptr	-3
var_2= byte ptr	-2
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+var_10]
call	sub_489C40
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_3]
mov	eax, [ebp+var_10]
mov	[eax+14h], dl
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	ecx, [ebp+var_10]
add	ecx, 18h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	[eax+24h], ecx
mov	edx, [ebp+var_10]
mov	al, [ebp+arg_4]
mov	[edx+28h], al
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_52EE70 endp

align 10h


; Attributes: bp-based frame

sub_52EEF0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_52EEF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_18], eax
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	ecx, [ebp+var_24]
add	ecx, 0Ch
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_20]
add	ecx, 8
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	[eax+18h], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_52EEF0 endp

align 10h


; Attributes: bp-based frame

sub_52EFB0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_52EFE1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D660
mov	[ebp+var_C], eax
jmp	short loc_52EFE8

loc_52EFE1:
mov	[ebp+var_C], 0

loc_52EFE8:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_52EFB0 endp

align 10h


; Attributes: bp-based frame

sub_52F000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E1A0
mov	esp, ebp
pop	ebp
retn
sub_52F000 endp



; Attributes: bp-based frame

sub_52F010 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555A40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F010 endp

align 10h


; Attributes: bp-based frame

sub_52F030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E180
mov	esp, ebp
pop	ebp
retn
sub_52F030 endp



; Attributes: bp-based frame

sub_52F040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555AA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F040 endp

align 10h


; Attributes: bp-based frame

sub_52F060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E160
mov	esp, ebp
pop	ebp
retn
sub_52F060 endp



; Attributes: bp-based frame

sub_52F070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555B00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F070 endp

align 10h


; Attributes: bp-based frame

sub_52F090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3
mov	esp, ebp
pop	ebp
retn
sub_52F090 endp



; Attributes: bp-based frame

sub_52F0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E140
mov	esp, ebp
pop	ebp
retn
sub_52F0A0 endp



; Attributes: bp-based frame

sub_52F0B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555B60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F0B0 endp

align 10h


; Attributes: bp-based frame

sub_52F0D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E120
mov	esp, ebp
pop	ebp
retn
sub_52F0D0 endp



; Attributes: bp-based frame

sub_52F0E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555BC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F0E0 endp

align 10h


; Attributes: bp-based frame

sub_52F100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E100
mov	esp, ebp
pop	ebp
retn
sub_52F100 endp



; Attributes: bp-based frame

sub_52F110 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555C20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F110 endp

align 10h


; Attributes: bp-based frame

sub_52F130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E0E0
mov	esp, ebp
pop	ebp
retn
sub_52F130 endp



; Attributes: bp-based frame

sub_52F140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555C80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F140 endp

align 10h


; Attributes: bp-based frame

sub_52F160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E0C0
mov	esp, ebp
pop	ebp
retn
sub_52F160 endp



; Attributes: bp-based frame

sub_52F170 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555CE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F170 endp

align 10h


; Attributes: bp-based frame

sub_52F190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 8
mov	esp, ebp
pop	ebp
retn
sub_52F190 endp



; Attributes: bp-based frame

sub_52F1A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555D40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F1A0 endp

align 10h


; Attributes: bp-based frame

sub_52F1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E0A0
mov	esp, ebp
pop	ebp
retn
sub_52F1C0 endp



; Attributes: bp-based frame

sub_52F1D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555DA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F1D0 endp

align 10h


; Attributes: bp-based frame

sub_52F1F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E080
mov	esp, ebp
pop	ebp
retn
sub_52F1F0 endp



; Attributes: bp-based frame

sub_52F200 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555E00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F200 endp

align 10h


; Attributes: bp-based frame

sub_52F220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E060
mov	esp, ebp
pop	ebp
retn
sub_52F220 endp



; Attributes: bp-based frame

sub_52F230 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555E60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F230 endp

align 10h


; Attributes: bp-based frame

sub_52F250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E040
mov	esp, ebp
pop	ebp
retn
sub_52F250 endp



; Attributes: bp-based frame

sub_52F260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555EC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F260 endp

align 10h


; Attributes: bp-based frame

sub_52F280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E020
mov	esp, ebp
pop	ebp
retn
sub_52F280 endp



; Attributes: bp-based frame

sub_52F290 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555F20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F290 endp

align 10h


; Attributes: bp-based frame

sub_52F2B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7E000
mov	esp, ebp
pop	ebp
retn
sub_52F2B0 endp



; Attributes: bp-based frame

sub_52F2C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555F80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F2C0 endp

align 10h


; Attributes: bp-based frame

sub_52F2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DFE0
mov	esp, ebp
pop	ebp
retn
sub_52F2E0 endp



; Attributes: bp-based frame

sub_52F2F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_555FE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F2F0 endp

align 10h


; Attributes: bp-based frame

sub_52F310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 11h
mov	esp, ebp
pop	ebp
retn
sub_52F310 endp



; Attributes: bp-based frame

sub_52F320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DFC0
mov	esp, ebp
pop	ebp
retn
sub_52F320 endp



; Attributes: bp-based frame

sub_52F330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F330 endp

align 10h


; Attributes: bp-based frame

sub_52F350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DFA0
mov	esp, ebp
pop	ebp
retn
sub_52F350 endp



; Attributes: bp-based frame

sub_52F360 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5560A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F360 endp

align 10h


; Attributes: bp-based frame

sub_52F380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DF80
mov	esp, ebp
pop	ebp
retn
sub_52F380 endp



; Attributes: bp-based frame

sub_52F390 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F390 endp

align 10h


; Attributes: bp-based frame

sub_52F3B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DF30
mov	esp, ebp
pop	ebp
retn
sub_52F3B0 endp



; Attributes: bp-based frame

sub_52F3C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F3C0 endp

align 10h


; Attributes: bp-based frame

sub_52F3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 15h
mov	esp, ebp
pop	ebp
retn
sub_52F3E0 endp



; Attributes: bp-based frame

sub_52F3F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DEE0
mov	esp, ebp
pop	ebp
retn
sub_52F3F0 endp



; Attributes: bp-based frame

sub_52F400 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5561C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F400 endp

align 10h


; Attributes: bp-based frame

sub_52F420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DE90
mov	esp, ebp
pop	ebp
retn
sub_52F420 endp



; Attributes: bp-based frame

sub_52F430 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F430 endp

align 10h


; Attributes: bp-based frame

sub_52F450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DE40
mov	esp, ebp
pop	ebp
retn
sub_52F450 endp



; Attributes: bp-based frame

sub_52F460 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F460 endp

align 10h


; Attributes: bp-based frame

sub_52F480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DDF0
mov	esp, ebp
pop	ebp
retn
sub_52F480 endp



; Attributes: bp-based frame

sub_52F490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5562E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F490 endp

align 10h


; Attributes: bp-based frame

sub_52F4B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DDA0
mov	esp, ebp
pop	ebp
retn
sub_52F4B0 endp



; Attributes: bp-based frame

sub_52F4C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F4C0 endp

align 10h


; Attributes: bp-based frame

sub_52F4E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F01h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_52F4E0 endp

align 10h


; Attributes: bp-based frame

sub_52F500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DD80
mov	esp, ebp
pop	ebp
retn
sub_52F500 endp



; Attributes: bp-based frame

sub_52F510 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5563A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F510 endp

align 10h


; Attributes: bp-based frame

sub_52F530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DD60
mov	esp, ebp
pop	ebp
retn
sub_52F530 endp



; Attributes: bp-based frame

sub_52F540 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F540 endp

align 10h


; Attributes: bp-based frame

sub_52F560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DD10
mov	esp, ebp
pop	ebp
retn
sub_52F560 endp



; Attributes: bp-based frame

sub_52F570 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F570 endp

align 10h


; Attributes: bp-based frame

sub_52F590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DCF0
mov	esp, ebp
pop	ebp
retn
sub_52F590 endp



; Attributes: bp-based frame

sub_52F5A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5564C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F5A0 endp

align 10h


; Attributes: bp-based frame

sub_52F5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DCD0
mov	esp, ebp
pop	ebp
retn
sub_52F5C0 endp



; Attributes: bp-based frame

sub_52F5D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F5D0 endp

align 10h


; Attributes: bp-based frame

sub_52F5F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 22h
mov	esp, ebp
pop	ebp
retn
sub_52F5F0 endp



; Attributes: bp-based frame

sub_52F600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DCB0
mov	esp, ebp
pop	ebp
retn
sub_52F600 endp



; Attributes: bp-based frame

sub_52F610 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556580
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F610 endp

align 10h


; Attributes: bp-based frame

sub_52F630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DC90
mov	esp, ebp
pop	ebp
retn
sub_52F630 endp



; Attributes: bp-based frame

sub_52F640 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5565E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F640 endp

align 10h


; Attributes: bp-based frame

sub_52F660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DC70
mov	esp, ebp
pop	ebp
retn
sub_52F660 endp



; Attributes: bp-based frame

sub_52F670 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52F69E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52F69E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_52F670 endp

align 10h


; Attributes: bp-based frame

sub_52F6B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556640
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F6B0 endp

align 10h


; Attributes: bp-based frame

sub_52F6D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DC50
mov	esp, ebp
pop	ebp
retn
sub_52F6D0 endp



; Attributes: bp-based frame

sub_52F6E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5566B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F6E0 endp

align 10h


; Attributes: bp-based frame

sub_52F700 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1E42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_52F700 endp

align 10h


; Attributes: bp-based frame

sub_52F720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DC30
mov	esp, ebp
pop	ebp
retn
sub_52F720 endp



; Attributes: bp-based frame

sub_52F730 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5630
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 28h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52F785
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52F785:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_52F730 endp

align 10h


; Attributes: bp-based frame

sub_52F7A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556720
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F7A0 endp

align 10h


; Attributes: bp-based frame

sub_52F7C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5567B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F7C0 endp

align 10h


; Attributes: bp-based frame

sub_52F7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DC10
mov	esp, ebp
pop	ebp
retn
sub_52F7E0 endp



; Attributes: bp-based frame

sub_52F7F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52F829
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52F829:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_52F7F0 endp

align 10h


; Attributes: bp-based frame

sub_52F840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_52F840 endp

align 10h


; Attributes: bp-based frame

sub_52F870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556810
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F870 endp

align 10h


; Attributes: bp-based frame

sub_52F890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DBF0
mov	esp, ebp
pop	ebp
retn
sub_52F890 endp



; Attributes: bp-based frame

sub_52F8A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556880
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F8A0 endp

align 10h


; Attributes: bp-based frame

sub_52F8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DBD0
mov	esp, ebp
pop	ebp
retn
sub_52F8C0 endp



; Attributes: bp-based frame

sub_52F8D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5568E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F8D0 endp

align 10h


; Attributes: bp-based frame

sub_52F8F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DBB0
mov	esp, ebp
pop	ebp
retn
sub_52F8F0 endp



; Attributes: bp-based frame

sub_52F900 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556940
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F900 endp

align 10h


; Attributes: bp-based frame

sub_52F920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DB90
mov	esp, ebp
pop	ebp
retn
sub_52F920 endp



; Attributes: bp-based frame

sub_52F930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5569A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F930 endp

align 10h


; Attributes: bp-based frame

sub_52F950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DB40
mov	esp, ebp
pop	ebp
retn
sub_52F950 endp



; Attributes: bp-based frame

sub_52F960 proc	near

var_5C=	dword ptr -5Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 20h
call	sub_437300
mov	ecx, [ebp+var_5C]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52F990
mov	ecx, [ebp+var_5C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52F990:
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_52F960 endp

align 10h


; Attributes: bp-based frame

sub_52F9A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556A00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F9A0 endp

align 10h


; Attributes: bp-based frame

sub_52F9C0 proc	near

var_58=	dword ptr -58h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 18h
call	sub_468AA0
mov	ecx, [ebp+var_58]
call	sub_5E0AF0
mov	ecx, [ebp+var_58]
add	ecx, 14h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_52F9C0 endp

align 10h


; Attributes: bp-based frame

sub_52F9F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556A60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52F9F0 endp

align 10h


; Attributes: bp-based frame

sub_52FA10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DB20
mov	esp, ebp
pop	ebp
retn
sub_52FA10 endp



; Attributes: bp-based frame

sub_52FA20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556AC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FA20 endp

align 10h


; Attributes: bp-based frame

sub_52FA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DB00
mov	esp, ebp
pop	ebp
retn
sub_52FA40 endp



; Attributes: bp-based frame

sub_52FA50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556B20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FA50 endp

align 10h


; Attributes: bp-based frame

sub_52FA70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 35h
mov	esp, ebp
pop	ebp
retn
sub_52FA70 endp



; Attributes: bp-based frame

sub_52FA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DAE0
mov	esp, ebp
pop	ebp
retn
sub_52FA80 endp



; Attributes: bp-based frame

sub_52FA90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556B80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FA90 endp

align 10h


; Attributes: bp-based frame

sub_52FAB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DAC0
mov	esp, ebp
pop	ebp
retn
sub_52FAB0 endp



; Attributes: bp-based frame

sub_52FAC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 50h
call	sub_40ABB0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52FAF9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52FAF9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_52FAC0 endp

align 10h


; Attributes: bp-based frame

sub_52FB10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556BE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FB10 endp

align 10h


; Attributes: bp-based frame

sub_52FB30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556C40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FB30 endp

align 10h


; Attributes: bp-based frame

sub_52FB50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 38h
mov	esp, ebp
pop	ebp
retn
sub_52FB50 endp



; Attributes: bp-based frame

sub_52FB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DAA0
mov	esp, ebp
pop	ebp
retn
sub_52FB60 endp



; Attributes: bp-based frame

sub_52FB70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556CA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FB70 endp

align 10h


; Attributes: bp-based frame

sub_52FB90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DA80
mov	esp, ebp
pop	ebp
retn
sub_52FB90 endp



; Attributes: bp-based frame

sub_52FBA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556D00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FBA0 endp

align 10h


; Attributes: bp-based frame

sub_52FBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3Ah
mov	esp, ebp
pop	ebp
retn
sub_52FBC0 endp



; Attributes: bp-based frame

sub_52FBD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_4F4A30
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52FBF5
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52FBF5:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_52FBD0 endp

align 10h


; Attributes: bp-based frame

sub_52FC00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556D70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FC00 endp

align 10h


; Attributes: bp-based frame

sub_52FC20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556DE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FC20 endp

align 10h


; Attributes: bp-based frame

sub_52FC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DA60
mov	esp, ebp
pop	ebp
retn
sub_52FC40 endp



; Attributes: bp-based frame

sub_52FC50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556E40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FC50 endp

align 10h


; Attributes: bp-based frame

sub_52FC70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DA40
mov	esp, ebp
pop	ebp
retn
sub_52FC70 endp



; Attributes: bp-based frame

sub_52FC80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52FCAE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52FCAE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_52FC80 endp

align 10h


; Attributes: bp-based frame

sub_52FCC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556EA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FCC0 endp

align 10h


; Attributes: bp-based frame

sub_52FCE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7DA10
mov	esp, ebp
pop	ebp
retn
sub_52FCE0 endp



; Attributes: bp-based frame

sub_52FCF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556F10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FCF0 endp

align 10h


; Attributes: bp-based frame

sub_52FD10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3Fh
mov	esp, ebp
pop	ebp
retn
sub_52FD10 endp



; Attributes: bp-based frame

sub_52FD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D9F0
mov	esp, ebp
pop	ebp
retn
sub_52FD20 endp



; Attributes: bp-based frame

sub_52FD30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556F70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FD30 endp

align 10h


; Attributes: bp-based frame

sub_52FD50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D9D0
mov	esp, ebp
pop	ebp
retn
sub_52FD50 endp



; Attributes: bp-based frame

sub_52FD60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_556FD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FD60 endp

align 10h


; Attributes: bp-based frame

sub_52FD80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D9B0
mov	esp, ebp
pop	ebp
retn
sub_52FD80 endp



; Attributes: bp-based frame

sub_52FD90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557030
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FD90 endp

align 10h


; Attributes: bp-based frame

sub_52FDB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 42h
mov	esp, ebp
pop	ebp
retn
sub_52FDB0 endp



; Attributes: bp-based frame

sub_52FDC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557090
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FDC0 endp

align 10h


; Attributes: bp-based frame

sub_52FDE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5570F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FDE0 endp

align 10h


; Attributes: bp-based frame

sub_52FE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 45h
mov	esp, ebp
pop	ebp
retn
sub_52FE00 endp



; Attributes: bp-based frame

sub_52FE10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557150
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FE10 endp

align 10h


; Attributes: bp-based frame

sub_52FE30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D990
mov	esp, ebp
pop	ebp
retn
sub_52FE30 endp



; Attributes: bp-based frame

sub_52FE40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_42D310
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_52FE63
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_52FE63:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_52FE40 endp

align 10h


; Attributes: bp-based frame

sub_52FE70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_52FEA1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42DAB0
mov	[ebp+var_C], eax
jmp	short loc_52FEA8

loc_52FEA1:
mov	[ebp+var_C], 0

loc_52FEA8:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_52FE70 endp

align 10h


; Attributes: bp-based frame

sub_52FEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 47h
mov	esp, ebp
pop	ebp
retn
sub_52FEC0 endp



; Attributes: bp-based frame

sub_52FED0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D970
mov	esp, ebp
pop	ebp
retn
sub_52FED0 endp



; Attributes: bp-based frame

sub_52FEE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5571B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FEE0 endp

align 10h


; Attributes: bp-based frame

sub_52FF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 48h
mov	esp, ebp
pop	ebp
retn
sub_52FF00 endp



; Attributes: bp-based frame

sub_52FF10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D950
mov	esp, ebp
pop	ebp
retn
sub_52FF10 endp



; Attributes: bp-based frame

sub_52FF20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557210
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FF20 endp

align 10h


; Attributes: bp-based frame

sub_52FF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 49h
mov	esp, ebp
pop	ebp
retn
sub_52FF40 endp



; Attributes: bp-based frame

sub_52FF50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D930
mov	esp, ebp
pop	ebp
retn
sub_52FF50 endp



; Attributes: bp-based frame

sub_52FF60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557270
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FF60 endp

align 10h


; Attributes: bp-based frame

sub_52FF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4Ah
mov	esp, ebp
pop	ebp
retn
sub_52FF80 endp



; Attributes: bp-based frame

sub_52FF90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D910
mov	esp, ebp
pop	ebp
retn
sub_52FF90 endp



; Attributes: bp-based frame

sub_52FFA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5572D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FFA0 endp

align 10h


; Attributes: bp-based frame

sub_52FFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4Bh
mov	esp, ebp
pop	ebp
retn
sub_52FFC0 endp



; Attributes: bp-based frame

sub_52FFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D8F0
mov	esp, ebp
pop	ebp
retn
sub_52FFD0 endp



; Attributes: bp-based frame

sub_52FFE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557330
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_52FFE0 endp

align 10h


; Attributes: bp-based frame

sub_530000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D8D0
mov	esp, ebp
pop	ebp
retn
sub_530000 endp



; Attributes: bp-based frame

sub_530010 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557390
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530010 endp

align 10h


; Attributes: bp-based frame

sub_530030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D8B0
mov	esp, ebp
pop	ebp
retn
sub_530030 endp



; Attributes: bp-based frame

sub_530040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5573F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530040 endp

align 10h


; Attributes: bp-based frame

sub_530060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D890
mov	esp, ebp
pop	ebp
retn
sub_530060 endp



; Attributes: bp-based frame

sub_530070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557450
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530070 endp

align 10h


; Attributes: bp-based frame

sub_530090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D870
mov	esp, ebp
pop	ebp
retn
sub_530090 endp



; Attributes: bp-based frame

sub_5300A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5574B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5300A0 endp

align 10h


; Attributes: bp-based frame

sub_5300C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 50h
mov	esp, ebp
pop	ebp
retn
sub_5300C0 endp



; Attributes: bp-based frame

sub_5300D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D850
mov	esp, ebp
pop	ebp
retn
sub_5300D0 endp



; Attributes: bp-based frame

sub_5300E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557510
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5300E0 endp

align 10h


; Attributes: bp-based frame

sub_530100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D830
mov	esp, ebp
pop	ebp
retn
sub_530100 endp



; Attributes: bp-based frame

sub_530110 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557570
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530110 endp

align 10h


; Attributes: bp-based frame

sub_530130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D810
mov	esp, ebp
pop	ebp
retn
sub_530130 endp



; Attributes: bp-based frame

sub_530140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5575D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530140 endp

align 10h


; Attributes: bp-based frame

sub_530160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D7F0
mov	esp, ebp
pop	ebp
retn
sub_530160 endp



; Attributes: bp-based frame

sub_530170 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53019E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53019E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_530170 endp

align 10h


; Attributes: bp-based frame

sub_5301B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557630
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5301B0 endp

align 10h


; Attributes: bp-based frame

sub_5301D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D7D0
mov	esp, ebp
pop	ebp
retn
sub_5301D0 endp



; Attributes: bp-based frame

sub_5301E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5301E0 endp

align 10h


; Attributes: bp-based frame

sub_530210 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557690
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530210 endp

align 10h


; Attributes: bp-based frame

sub_530230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D7B0
mov	esp, ebp
pop	ebp
retn
sub_530230 endp



; Attributes: bp-based frame

sub_530240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_530270
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_530265
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_530265:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_530240 endp

align 10h


; Attributes: bp-based frame

sub_530270 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 70h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_530270 endp

align 10h


; Attributes: bp-based frame

sub_5302E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557700
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5302E0 endp

align 10h


; Attributes: bp-based frame

sub_530300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D790
mov	esp, ebp
pop	ebp
retn
sub_530300 endp



; Attributes: bp-based frame

sub_530310 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530310 endp

align 10h


; Attributes: bp-based frame

sub_530330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 57h
mov	esp, ebp
pop	ebp
retn
sub_530330 endp



; Attributes: bp-based frame

sub_530340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D770
mov	esp, ebp
pop	ebp
retn
sub_530340 endp



; Attributes: bp-based frame

sub_530350 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5577D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530350 endp

align 10h


; Attributes: bp-based frame

sub_530370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D720
mov	esp, ebp
pop	ebp
retn
sub_530370 endp



; Attributes: bp-based frame

sub_530380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530380 endp

align 10h


; Attributes: bp-based frame

sub_5303A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D700
mov	esp, ebp
pop	ebp
retn
sub_5303A0 endp



; Attributes: bp-based frame

sub_5303B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5303B0 endp

align 10h


; Attributes: bp-based frame

sub_5303D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D6E0
mov	esp, ebp
pop	ebp
retn
sub_5303D0 endp



; Attributes: bp-based frame

sub_5303E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5578F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5303E0 endp

align 10h


; Attributes: bp-based frame

sub_530400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D690
mov	esp, ebp
pop	ebp
retn
sub_530400 endp



; Attributes: bp-based frame

sub_530410 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530410 endp

align 10h


; Attributes: bp-based frame

sub_530430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5Fh
mov	esp, ebp
pop	ebp
retn
sub_530430 endp



; Attributes: bp-based frame

sub_530440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D670
mov	esp, ebp
pop	ebp
retn
sub_530440 endp



; Attributes: bp-based frame

sub_530450 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53047E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53047E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_530450 endp

align 10h


; Attributes: bp-based frame

sub_530490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5579C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530490 endp

align 10h


; Attributes: bp-based frame

sub_5304B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D650
mov	esp, ebp
pop	ebp
retn
sub_5304B0 endp



; Attributes: bp-based frame

sub_5304C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5304EE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5304EE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5304C0 endp

align 10h


; Attributes: bp-based frame

sub_530500 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557A20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530500 endp

align 10h


; Attributes: bp-based frame

sub_530520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D630
mov	esp, ebp
pop	ebp
retn
sub_530520 endp



; Attributes: bp-based frame

sub_530530 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557A80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530530 endp

align 10h


; Attributes: bp-based frame

sub_530550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 62h
mov	esp, ebp
pop	ebp
retn
sub_530550 endp



; Attributes: bp-based frame

sub_530560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D610
mov	esp, ebp
pop	ebp
retn
sub_530560 endp



; Attributes: bp-based frame

sub_530570 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557AE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530570 endp

align 10h


; Attributes: bp-based frame

sub_530590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D5F0
mov	esp, ebp
pop	ebp
retn
sub_530590 endp



; Attributes: bp-based frame

sub_5305A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557B40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5305A0 endp

align 10h


; Attributes: bp-based frame

sub_5305C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D5D0
mov	esp, ebp
pop	ebp
retn
sub_5305C0 endp



; Attributes: bp-based frame

sub_5305D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557BA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5305D0 endp

align 10h


; Attributes: bp-based frame

sub_5305F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 67h
mov	esp, ebp
pop	ebp
retn
sub_5305F0 endp



; Attributes: bp-based frame

sub_530600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D580
mov	esp, ebp
pop	ebp
retn
sub_530600 endp



; Attributes: bp-based frame

sub_530610 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557C00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530610 endp

align 10h


; Attributes: bp-based frame

sub_530630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6Fh
mov	esp, ebp
pop	ebp
retn
sub_530630 endp



; Attributes: bp-based frame

sub_530640 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557C60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530640 endp

align 10h


; Attributes: bp-based frame

sub_530660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 70h
mov	esp, ebp
pop	ebp
retn
sub_530660 endp



; Attributes: bp-based frame

sub_530670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D560
mov	esp, ebp
pop	ebp
retn
sub_530670 endp



; Attributes: bp-based frame

sub_530680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557CC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530680 endp

align 10h


; Attributes: bp-based frame

sub_5306A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D510
mov	esp, ebp
pop	ebp
retn
sub_5306A0 endp



; Attributes: bp-based frame

sub_5306B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557D20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5306B0 endp

align 10h


; Attributes: bp-based frame

sub_5306D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D4F0
mov	esp, ebp
pop	ebp
retn
sub_5306D0 endp



; Attributes: bp-based frame

sub_5306E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557D80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5306E0 endp

align 10h


; Attributes: bp-based frame

sub_530700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D4A0
mov	esp, ebp
pop	ebp
retn
sub_530700 endp



; Attributes: bp-based frame

sub_530710 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557DE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530710 endp

align 10h


; Attributes: bp-based frame

sub_530730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 74h
mov	esp, ebp
pop	ebp
retn
sub_530730 endp



; Attributes: bp-based frame

sub_530740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1840h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_530740 endp

align 10h


; Attributes: bp-based frame

sub_530760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D480
mov	esp, ebp
pop	ebp
retn
sub_530760 endp



; Attributes: bp-based frame

sub_530770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557E40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530770 endp

align 10h


; Attributes: bp-based frame

sub_530790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 75h
mov	esp, ebp
pop	ebp
retn
sub_530790 endp



; Attributes: bp-based frame

sub_5307A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5307CE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5307CE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5307A0 endp

align 10h


; Attributes: bp-based frame

sub_5307E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557EA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5307E0 endp

align 10h


; Attributes: bp-based frame

sub_530800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 76h
mov	esp, ebp
pop	ebp
retn
sub_530800 endp



; Attributes: bp-based frame

sub_530810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D460
mov	esp, ebp
pop	ebp
retn
sub_530810 endp



; Attributes: bp-based frame

sub_530820 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557F10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530820 endp

align 10h


; Attributes: bp-based frame

sub_530840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 77h
mov	esp, ebp
pop	ebp
retn
sub_530840 endp



; Attributes: bp-based frame

sub_530850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D440
mov	esp, ebp
pop	ebp
retn
sub_530850 endp



; Attributes: bp-based frame

sub_530860 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557F80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530860 endp

align 10h


; Attributes: bp-based frame

sub_530880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_557FE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530880 endp

align 10h


; Attributes: bp-based frame

sub_5308A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 79h
mov	esp, ebp
pop	ebp
retn
sub_5308A0 endp



; Attributes: bp-based frame

sub_5308B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5308B0 endp

align 10h


; Attributes: bp-based frame

sub_5308D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 7Ah
mov	esp, ebp
pop	ebp
retn
sub_5308D0 endp



; Attributes: bp-based frame

sub_5308E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5580A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5308E0 endp

align 10h


; Attributes: bp-based frame

sub_530900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 7Bh
mov	esp, ebp
pop	ebp
retn
sub_530900 endp



; Attributes: bp-based frame

sub_530910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D420
mov	esp, ebp
pop	ebp
retn
sub_530910 endp



; Attributes: bp-based frame

sub_530920 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530920 endp

align 10h


; Attributes: bp-based frame

sub_530940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D400
mov	esp, ebp
pop	ebp
retn
sub_530940 endp



; Attributes: bp-based frame

sub_530950 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530950 endp

align 10h


; Attributes: bp-based frame

sub_530970 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 7Dh
mov	esp, ebp
pop	ebp
retn
sub_530970 endp



; Attributes: bp-based frame

sub_530980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D3E0
mov	esp, ebp
pop	ebp
retn
sub_530980 endp



; Attributes: bp-based frame

sub_530990 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5581C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530990 endp

align 10h


; Attributes: bp-based frame

sub_5309B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 7Eh
mov	esp, ebp
pop	ebp
retn
sub_5309B0 endp



; Attributes: bp-based frame

sub_5309C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D3C0
mov	esp, ebp
pop	ebp
retn
sub_5309C0 endp



; Attributes: bp-based frame

sub_5309D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5309D0 endp

align 10h


; Attributes: bp-based frame

sub_5309F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 7Fh
mov	esp, ebp
pop	ebp
retn
sub_5309F0 endp



; Attributes: bp-based frame

sub_530A00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F44h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_530A00 endp

align 10h


; Attributes: bp-based frame

sub_530A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D3A0
mov	esp, ebp
pop	ebp
retn
sub_530A20 endp



; Attributes: bp-based frame

sub_530A30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530A30 endp

align 10h


; Attributes: bp-based frame

sub_530A50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D380
mov	esp, ebp
pop	ebp
retn
sub_530A50 endp



; Attributes: bp-based frame

sub_530A60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5582E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530A60 endp

align 10h


; Attributes: bp-based frame

sub_530A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 81h
mov	esp, ebp
pop	ebp
retn
sub_530A80 endp



; Attributes: bp-based frame

sub_530A90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D360
mov	esp, ebp
pop	ebp
retn
sub_530A90 endp



; Attributes: bp-based frame

sub_530AA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530AA0 endp

align 10h


; Attributes: bp-based frame

sub_530AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 82h
mov	esp, ebp
pop	ebp
retn
sub_530AC0 endp



; Attributes: bp-based frame

sub_530AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D340
mov	esp, ebp
pop	ebp
retn
sub_530AD0 endp



; Attributes: bp-based frame

sub_530AE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5583A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530AE0 endp

align 10h


; Attributes: bp-based frame

sub_530B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 83h
mov	esp, ebp
pop	ebp
retn
sub_530B00 endp



; Attributes: bp-based frame

sub_530B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D320
mov	esp, ebp
pop	ebp
retn
sub_530B10 endp



; Attributes: bp-based frame

sub_530B20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530B20 endp

align 10h


; Attributes: bp-based frame

sub_530B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 84h
mov	esp, ebp
pop	ebp
retn
sub_530B40 endp



; Attributes: bp-based frame

sub_530B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D300
mov	esp, ebp
pop	ebp
retn
sub_530B50 endp



; Attributes: bp-based frame

sub_530B60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530B60 endp

align 10h


; Attributes: bp-based frame

sub_530B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 85h
mov	esp, ebp
pop	ebp
retn
sub_530B80 endp



; Attributes: bp-based frame

sub_530B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D2E0
mov	esp, ebp
pop	ebp
retn
sub_530B90 endp



; Attributes: bp-based frame

sub_530BA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5584C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530BA0 endp

align 10h


; Attributes: bp-based frame

sub_530BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 86h
mov	esp, ebp
pop	ebp
retn
sub_530BC0 endp



; Attributes: bp-based frame

sub_530BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D2C0
mov	esp, ebp
pop	ebp
retn
sub_530BD0 endp



; Attributes: bp-based frame

sub_530BE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530BE0 endp

align 10h


; Attributes: bp-based frame

sub_530C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D2A0
mov	esp, ebp
pop	ebp
retn
sub_530C00 endp



; Attributes: bp-based frame

sub_530C10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558580
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530C10 endp

align 10h


; Attributes: bp-based frame

sub_530C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 89h
mov	esp, ebp
pop	ebp
retn
sub_530C30 endp



; Attributes: bp-based frame

sub_530C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D280
mov	esp, ebp
pop	ebp
retn
sub_530C40 endp



; Attributes: bp-based frame

sub_530C50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5585E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530C50 endp

align 10h


; Attributes: bp-based frame

sub_530C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 8Ah
mov	esp, ebp
pop	ebp
retn
sub_530C70 endp



; Attributes: bp-based frame

sub_530C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D210
mov	esp, ebp
pop	ebp
retn
sub_530C80 endp



; Attributes: bp-based frame

sub_530C90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558640
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530C90 endp

align 10h


; Attributes: bp-based frame

sub_530CB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 8Bh
mov	esp, ebp
pop	ebp
retn
sub_530CB0 endp



; Attributes: bp-based frame

sub_530CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D1F0
mov	esp, ebp
pop	ebp
retn
sub_530CC0 endp



; Attributes: bp-based frame

sub_530CD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5586A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530CD0 endp

align 10h


; Attributes: bp-based frame

sub_530CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 8Ch
mov	esp, ebp
pop	ebp
retn
sub_530CF0 endp



; Attributes: bp-based frame

sub_530D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D1D0
mov	esp, ebp
pop	ebp
retn
sub_530D00 endp



; Attributes: bp-based frame

sub_530D10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558700
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530D10 endp

align 10h


; Attributes: bp-based frame

sub_530D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 8Dh
mov	esp, ebp
pop	ebp
retn
sub_530D30 endp



; Attributes: bp-based frame

sub_530D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D160
mov	esp, ebp
pop	ebp
retn
sub_530D40 endp



; Attributes: bp-based frame

sub_530D50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558760
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530D50 endp

align 10h


; Attributes: bp-based frame

sub_530D70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 8Fh
mov	esp, ebp
pop	ebp
retn
sub_530D70 endp



; Attributes: bp-based frame

sub_530D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D140
mov	esp, ebp
pop	ebp
retn
sub_530D80 endp



; Attributes: bp-based frame

sub_530D90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5587C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530D90 endp

align 10h


; Attributes: bp-based frame

sub_530DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D120
mov	esp, ebp
pop	ebp
retn
sub_530DB0 endp



; Attributes: bp-based frame

sub_530DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558820
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530DC0 endp

align 10h


; Attributes: bp-based frame

sub_530DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 91h
mov	esp, ebp
pop	ebp
retn
sub_530DE0 endp



; Attributes: bp-based frame

sub_530DF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D100
mov	esp, ebp
pop	ebp
retn
sub_530DF0 endp



; Attributes: bp-based frame

sub_530E00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558880
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530E00 endp

align 10h


; Attributes: bp-based frame

sub_530E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 92h
mov	esp, ebp
pop	ebp
retn
sub_530E20 endp

; [0000000D BYTES: COLLAPSED FUNCTION sub_530E30. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_530E40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5588E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530E40 endp

align 10h


; Attributes: bp-based frame

sub_530E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 93h
mov	esp, ebp
pop	ebp
retn
sub_530E60 endp



; Attributes: bp-based frame

sub_530E70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558940
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530E70 endp

align 10h


; Attributes: bp-based frame

sub_530E90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 94h
mov	esp, ebp
pop	ebp
retn
sub_530E90 endp



; Attributes: bp-based frame

sub_530EA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5589A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530EA0 endp

align 10h


; Attributes: bp-based frame

sub_530EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 95h
mov	esp, ebp
pop	ebp
retn
sub_530EC0 endp



; Attributes: bp-based frame

sub_530ED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558A00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530ED0 endp

align 10h


; Attributes: bp-based frame

sub_530EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 96h
mov	esp, ebp
pop	ebp
retn
sub_530EF0 endp



; Attributes: bp-based frame

sub_530F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D0D0
mov	esp, ebp
pop	ebp
retn
sub_530F00 endp



; Attributes: bp-based frame

sub_530F10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558A60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530F10 endp

align 10h


; Attributes: bp-based frame

sub_530F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D0B0
mov	esp, ebp
pop	ebp
retn
sub_530F30 endp



; Attributes: bp-based frame

sub_530F40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558AC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530F40 endp

align 10h


; Attributes: bp-based frame

sub_530F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 99h
mov	esp, ebp
pop	ebp
retn
sub_530F60 endp



; Attributes: bp-based frame

sub_530F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D090
mov	esp, ebp
pop	ebp
retn
sub_530F70 endp



; Attributes: bp-based frame

sub_530F80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_530FB9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_530FB9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_530F80 endp

align 10h


; Attributes: bp-based frame

sub_530FD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558B20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_530FD0 endp

align 10h


; Attributes: bp-based frame

sub_530FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 9Ah
mov	esp, ebp
pop	ebp
retn
sub_530FF0 endp



; Attributes: bp-based frame

sub_531000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F04h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_531000 endp

align 10h


; Attributes: bp-based frame

sub_531020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D070
mov	esp, ebp
pop	ebp
retn
sub_531020 endp



; Attributes: bp-based frame

sub_531030 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558B90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531030 endp

align 10h


; Attributes: bp-based frame

sub_531050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 9Bh
mov	esp, ebp
pop	ebp
retn
sub_531050 endp



; Attributes: bp-based frame

sub_531060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D050
mov	esp, ebp
pop	ebp
retn
sub_531060 endp



; Attributes: bp-based frame

sub_531070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558BF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531070 endp

align 10h


; Attributes: bp-based frame

sub_531090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 9Ch
mov	esp, ebp
pop	ebp
retn
sub_531090 endp



; Attributes: bp-based frame

sub_5310A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7D000
mov	esp, ebp
pop	ebp
retn
sub_5310A0 endp



; Attributes: bp-based frame

sub_5310B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558C50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5310B0 endp

align 10h


; Attributes: bp-based frame

sub_5310D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 9Dh
mov	esp, ebp
pop	ebp
retn
sub_5310D0 endp



; Attributes: bp-based frame

sub_5310E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CFE0
mov	esp, ebp
pop	ebp
retn
sub_5310E0 endp



; Attributes: bp-based frame

sub_5310F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558CB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5310F0 endp

align 10h


; Attributes: bp-based frame

sub_531110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 9Fh
mov	esp, ebp
pop	ebp
retn
sub_531110 endp



; Attributes: bp-based frame

sub_531120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CF70
mov	esp, ebp
pop	ebp
retn
sub_531120 endp



; Attributes: bp-based frame

sub_531130 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558D10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531130 endp

align 10h


; Attributes: bp-based frame

sub_531150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A0h
mov	esp, ebp
pop	ebp
retn
sub_531150 endp



; Attributes: bp-based frame

sub_531160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CF50
mov	esp, ebp
pop	ebp
retn
sub_531160 endp



; Attributes: bp-based frame

sub_531170 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558D70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531170 endp

align 10h


; Attributes: bp-based frame

sub_531190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A2h
mov	esp, ebp
pop	ebp
retn
sub_531190 endp



; Attributes: bp-based frame

sub_5311A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558DD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5311A0 endp

align 10h


; Attributes: bp-based frame

sub_5311C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A3h
mov	esp, ebp
pop	ebp
retn
sub_5311C0 endp



; Attributes: bp-based frame

sub_5311D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_531214
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA90

loc_531214:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_531237
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_531237:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5311D0 endp

align 10h


; Attributes: bp-based frame

sub_531250 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558E30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531250 endp

align 10h


; Attributes: bp-based frame

sub_531270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A4h
mov	esp, ebp
pop	ebp
retn
sub_531270 endp



; Attributes: bp-based frame

sub_531280 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A4D20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_429100
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5312D5
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5312D5:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_531280 endp

align 10h


; Attributes: bp-based frame

sub_5312F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558EC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5312F0 endp

align 10h


; Attributes: bp-based frame

sub_531310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A5h
mov	esp, ebp
pop	ebp
retn
sub_531310 endp



; Attributes: bp-based frame

sub_531320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558F50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531320 endp

align 10h


; Attributes: bp-based frame

sub_531340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A6h
mov	esp, ebp
pop	ebp
retn
sub_531340 endp



; Attributes: bp-based frame

sub_531350 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_558FE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531350 endp

align 10h


; Attributes: bp-based frame

sub_531370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A7h
mov	esp, ebp
pop	ebp
retn
sub_531370 endp



; Attributes: bp-based frame

sub_531380 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6100h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_531380 endp

align 10h


; Attributes: bp-based frame

sub_5313A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CF20
mov	esp, ebp
pop	ebp
retn
sub_5313A0 endp



; Attributes: bp-based frame

sub_5313B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5313B0 endp

align 10h


; Attributes: bp-based frame

sub_5313D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CEF0
mov	esp, ebp
pop	ebp
retn
sub_5313D0 endp



; Attributes: bp-based frame

sub_5313E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5590A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5313E0 endp

align 10h


; Attributes: bp-based frame

sub_531400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A9h
mov	esp, ebp
pop	ebp
retn
sub_531400 endp



; Attributes: bp-based frame

sub_531410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CED0
mov	esp, ebp
pop	ebp
retn
sub_531410 endp



; Attributes: bp-based frame

sub_531420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_531461
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_531461:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_531420 endp

align 10h


; Attributes: bp-based frame

sub_531470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531470 endp

align 10h


; Attributes: bp-based frame

sub_531490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0AAh
mov	esp, ebp
pop	ebp
retn
sub_531490 endp



; Attributes: bp-based frame

sub_5314A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CEB0
mov	esp, ebp
pop	ebp
retn
sub_5314A0 endp



; Attributes: bp-based frame

sub_5314B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5314B0 endp

align 10h


; Attributes: bp-based frame

sub_5314D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0ABh
mov	esp, ebp
pop	ebp
retn
sub_5314D0 endp



; Attributes: bp-based frame

sub_5314E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CE90
mov	esp, ebp
pop	ebp
retn
sub_5314E0 endp



; Attributes: bp-based frame

sub_5314F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5591C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5314F0 endp

align 10h


; Attributes: bp-based frame

sub_531510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0ACh
mov	esp, ebp
pop	ebp
retn
sub_531510 endp



; Attributes: bp-based frame

sub_531520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CE70
mov	esp, ebp
pop	ebp
retn
sub_531520 endp



; Attributes: bp-based frame

sub_531530 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531530 endp

align 10h


; Attributes: bp-based frame

sub_531550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0ADh
mov	esp, ebp
pop	ebp
retn
sub_531550 endp



; Attributes: bp-based frame

sub_531560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CE50
mov	esp, ebp
pop	ebp
retn
sub_531560 endp



; Attributes: bp-based frame

sub_531570 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531570 endp

align 10h


; Attributes: bp-based frame

sub_531590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0AEh
mov	esp, ebp
pop	ebp
retn
sub_531590 endp



; Attributes: bp-based frame

sub_5315A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CE30
mov	esp, ebp
pop	ebp
retn
sub_5315A0 endp



; Attributes: bp-based frame

sub_5315B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5592E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5315B0 endp

align 10h


; Attributes: bp-based frame

sub_5315D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0AFh
mov	esp, ebp
pop	ebp
retn
sub_5315D0 endp



; Attributes: bp-based frame

sub_5315E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CE10
mov	esp, ebp
pop	ebp
retn
sub_5315E0 endp



; Attributes: bp-based frame

sub_5315F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5315F0 endp

align 10h


; Attributes: bp-based frame

sub_531610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CDF0
mov	esp, ebp
pop	ebp
retn
sub_531610 endp



; Attributes: bp-based frame

sub_531620 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5593A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531620 endp

align 10h


; Attributes: bp-based frame

sub_531640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B1h
mov	esp, ebp
pop	ebp
retn
sub_531640 endp



; Attributes: bp-based frame

sub_531650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CDD0
mov	esp, ebp
pop	ebp
retn
sub_531650 endp



; Attributes: bp-based frame

sub_531660 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531660 endp

align 10h


; Attributes: bp-based frame

sub_531680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B2h
mov	esp, ebp
pop	ebp
retn
sub_531680 endp



; Attributes: bp-based frame

sub_531690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CDB0
mov	esp, ebp
pop	ebp
retn
sub_531690 endp



; Attributes: bp-based frame

sub_5316A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5316A0 endp

align 10h


; Attributes: bp-based frame

sub_5316C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B3h
mov	esp, ebp
pop	ebp
retn
sub_5316C0 endp



; Attributes: bp-based frame

sub_5316D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CD90
mov	esp, ebp
pop	ebp
retn
sub_5316D0 endp



; Attributes: bp-based frame

sub_5316E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5594C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5316E0 endp

align 10h


; Attributes: bp-based frame

sub_531700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CD70
mov	esp, ebp
pop	ebp
retn
sub_531700 endp



; Attributes: bp-based frame

sub_531710 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531710 endp

align 10h


; Attributes: bp-based frame

sub_531730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B5h
mov	esp, ebp
pop	ebp
retn
sub_531730 endp



; Attributes: bp-based frame

sub_531740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CD50
mov	esp, ebp
pop	ebp
retn
sub_531740 endp



; Attributes: bp-based frame

sub_531750 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559580
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531750 endp

align 10h


; Attributes: bp-based frame

sub_531770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B6h
mov	esp, ebp
pop	ebp
retn
sub_531770 endp



; Attributes: bp-based frame

sub_531780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CD30
mov	esp, ebp
pop	ebp
retn
sub_531780 endp



; Attributes: bp-based frame

sub_531790 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5595E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531790 endp

align 10h


; Attributes: bp-based frame

sub_5317B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B7h
mov	esp, ebp
pop	ebp
retn
sub_5317B0 endp



; Attributes: bp-based frame

sub_5317C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CD10
mov	esp, ebp
pop	ebp
retn
sub_5317C0 endp



; Attributes: bp-based frame

sub_5317D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559640
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5317D0 endp

align 10h


; Attributes: bp-based frame

sub_5317F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B8h
mov	esp, ebp
pop	ebp
retn
sub_5317F0 endp



; Attributes: bp-based frame

sub_531800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CCF0
mov	esp, ebp
pop	ebp
retn
sub_531800 endp



; Attributes: bp-based frame

sub_531810 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5596A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531810 endp

align 10h


; Attributes: bp-based frame

sub_531830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B9h
mov	esp, ebp
pop	ebp
retn
sub_531830 endp



; Attributes: bp-based frame

sub_531840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CCD0
mov	esp, ebp
pop	ebp
retn
sub_531840 endp



; Attributes: bp-based frame

sub_531850 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559700
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531850 endp

align 10h


; Attributes: bp-based frame

sub_531870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0BAh
mov	esp, ebp
pop	ebp
retn
sub_531870 endp



; Attributes: bp-based frame

sub_531880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CCB0
mov	esp, ebp
pop	ebp
retn
sub_531880 endp



; Attributes: bp-based frame

sub_531890 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559760
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531890 endp

align 10h


; Attributes: bp-based frame

sub_5318B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0BBh
mov	esp, ebp
pop	ebp
retn
sub_5318B0 endp



; Attributes: bp-based frame

sub_5318C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CC90
mov	esp, ebp
pop	ebp
retn
sub_5318C0 endp



; Attributes: bp-based frame

sub_5318D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5597C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5318D0 endp

align 10h


; Attributes: bp-based frame

sub_5318F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0BCh
mov	esp, ebp
pop	ebp
retn
sub_5318F0 endp



; Attributes: bp-based frame

sub_531900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1940h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_531900 endp

align 10h


; Attributes: bp-based frame

sub_531920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CC70
mov	esp, ebp
pop	ebp
retn
sub_531920 endp



; Attributes: bp-based frame

sub_531930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559820
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531930 endp

align 10h


; Attributes: bp-based frame

sub_531950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0BEh
mov	esp, ebp
pop	ebp
retn
sub_531950 endp



; Attributes: bp-based frame

sub_531960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CC00
mov	esp, ebp
pop	ebp
retn
sub_531960 endp



; Attributes: bp-based frame

sub_531970 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559880
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531970 endp

align 10h


; Attributes: bp-based frame

sub_531990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C0h
mov	esp, ebp
pop	ebp
retn
sub_531990 endp



; Attributes: bp-based frame

sub_5319A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CB90
mov	esp, ebp
pop	ebp
retn
sub_5319A0 endp



; Attributes: bp-based frame

sub_5319B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5598E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5319B0 endp

align 10h


; Attributes: bp-based frame

sub_5319D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C1h
mov	esp, ebp
pop	ebp
retn
sub_5319D0 endp



; Attributes: bp-based frame

sub_5319E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CB70
mov	esp, ebp
pop	ebp
retn
sub_5319E0 endp



; Attributes: bp-based frame

sub_5319F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_531A22
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_409870
mov	[ebp+var_C], eax
jmp	short loc_531A29

loc_531A22:
mov	[ebp+var_C], 0

loc_531A29:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_5319F0 endp

align 10h


; Attributes: bp-based frame

sub_531A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C2h
mov	esp, ebp
pop	ebp
retn
sub_531A40 endp



; Attributes: bp-based frame

sub_531A50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CB50
mov	esp, ebp
pop	ebp
retn
sub_531A50 endp



; Attributes: bp-based frame

sub_531A60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559940
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531A60 endp

align 10h


; Attributes: bp-based frame

sub_531A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C4h
mov	esp, ebp
pop	ebp
retn
sub_531A80 endp



; Attributes: bp-based frame

sub_531A90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5599A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531A90 endp

align 10h


; Attributes: bp-based frame

sub_531AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C5h
mov	esp, ebp
pop	ebp
retn
sub_531AB0 endp



; Attributes: bp-based frame

sub_531AC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559A00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531AC0 endp

align 10h


; Attributes: bp-based frame

sub_531AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C6h
mov	esp, ebp
pop	ebp
retn
sub_531AE0 endp



; Attributes: bp-based frame

sub_531AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CB30
mov	esp, ebp
pop	ebp
retn
sub_531AF0 endp



; Attributes: bp-based frame

sub_531B00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_531B31
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D790
mov	[ebp+var_C], eax
jmp	short loc_531B38

loc_531B31:
mov	[ebp+var_C], 0

loc_531B38:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_531B00 endp

align 10h


; Attributes: bp-based frame

sub_531B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C7h
mov	esp, ebp
pop	ebp
retn
sub_531B50 endp



; Attributes: bp-based frame

sub_531B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CB10
mov	esp, ebp
pop	ebp
retn
sub_531B60 endp



; Attributes: bp-based frame

sub_531B70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559A60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531B70 endp

align 10h


; Attributes: bp-based frame

sub_531B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CAF0
mov	esp, ebp
pop	ebp
retn
sub_531B90 endp



; Attributes: bp-based frame

sub_531BA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559AC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531BA0 endp

align 10h


; Attributes: bp-based frame

sub_531BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C9h
mov	esp, ebp
pop	ebp
retn
sub_531BC0 endp



; Attributes: bp-based frame

sub_531BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CAD0
mov	esp, ebp
pop	ebp
retn
sub_531BD0 endp



; Attributes: bp-based frame

sub_531BE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559B20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531BE0 endp

align 10h


; Attributes: bp-based frame

sub_531C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0CAh
mov	esp, ebp
pop	ebp
retn
sub_531C00 endp



; Attributes: bp-based frame

sub_531C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CAB0
mov	esp, ebp
pop	ebp
retn
sub_531C10 endp



; Attributes: bp-based frame

sub_531C20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559B80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531C20 endp

align 10h


; Attributes: bp-based frame

sub_531C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0CBh
mov	esp, ebp
pop	ebp
retn
sub_531C40 endp



; Attributes: bp-based frame

sub_531C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CA90
mov	esp, ebp
pop	ebp
retn
sub_531C50 endp



; Attributes: bp-based frame

sub_531C60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559BE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531C60 endp

align 10h


; Attributes: bp-based frame

sub_531C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0CCh
mov	esp, ebp
pop	ebp
retn
sub_531C80 endp



; Attributes: bp-based frame

sub_531C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CA70
mov	esp, ebp
pop	ebp
retn
sub_531C90 endp



; Attributes: bp-based frame

sub_531CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559C40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531CA0 endp

align 10h


; Attributes: bp-based frame

sub_531CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0CDh
mov	esp, ebp
pop	ebp
retn
sub_531CC0 endp



; Attributes: bp-based frame

sub_531CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CA20
mov	esp, ebp
pop	ebp
retn
sub_531CD0 endp



; Attributes: bp-based frame

sub_531CE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559CA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531CE0 endp

align 10h


; Attributes: bp-based frame

sub_531D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0CFh
mov	esp, ebp
pop	ebp
retn
sub_531D00 endp



; Attributes: bp-based frame

sub_531D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7CA00
mov	esp, ebp
pop	ebp
retn
sub_531D10 endp



; Attributes: bp-based frame

sub_531D20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559D00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531D20 endp

align 10h


; Attributes: bp-based frame

sub_531D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0D1h
mov	esp, ebp
pop	ebp
retn
sub_531D40 endp



; Attributes: bp-based frame

sub_531D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C9E0
mov	esp, ebp
pop	ebp
retn
sub_531D50 endp



; Attributes: bp-based frame

sub_531D60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559D60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531D60 endp

align 10h


; Attributes: bp-based frame

sub_531D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0D3h
mov	esp, ebp
pop	ebp
retn
sub_531D80 endp



; Attributes: bp-based frame

sub_531D90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C9C0
mov	esp, ebp
pop	ebp
retn
sub_531D90 endp



; Attributes: bp-based frame

sub_531DA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559DC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531DA0 endp

align 10h


; Attributes: bp-based frame

sub_531DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0D5h
mov	esp, ebp
pop	ebp
retn
sub_531DC0 endp



; Attributes: bp-based frame

sub_531DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C9A0
mov	esp, ebp
pop	ebp
retn
sub_531DD0 endp



; Attributes: bp-based frame

sub_531DE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559E20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531DE0 endp

align 10h


; Attributes: bp-based frame

sub_531E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0D6h
mov	esp, ebp
pop	ebp
retn
sub_531E00 endp



; Attributes: bp-based frame

sub_531E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C980
mov	esp, ebp
pop	ebp
retn
sub_531E10 endp



; Attributes: bp-based frame

sub_531E20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559E80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531E20 endp

align 10h


; Attributes: bp-based frame

sub_531E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0D8h
mov	esp, ebp
pop	ebp
retn
sub_531E40 endp



; Attributes: bp-based frame

sub_531E50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C960
mov	esp, ebp
pop	ebp
retn
sub_531E50 endp



; Attributes: bp-based frame

sub_531E60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559EE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531E60 endp

align 10h


; Attributes: bp-based frame

sub_531E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0D9h
mov	esp, ebp
pop	ebp
retn
sub_531E80 endp



; Attributes: bp-based frame

sub_531E90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C940
mov	esp, ebp
pop	ebp
retn
sub_531E90 endp



; Attributes: bp-based frame

sub_531EA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559F40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531EA0 endp

align 10h


; Attributes: bp-based frame

sub_531EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0DAh
mov	esp, ebp
pop	ebp
retn
sub_531EC0 endp



; Attributes: bp-based frame

sub_531ED0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C8F0
mov	esp, ebp
pop	ebp
retn
sub_531ED0 endp



; Attributes: bp-based frame

sub_531EE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_559FA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531EE0 endp

align 10h


; Attributes: bp-based frame

sub_531F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0DBh
mov	esp, ebp
pop	ebp
retn
sub_531F00 endp



; Attributes: bp-based frame

sub_531F10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C8D0
mov	esp, ebp
pop	ebp
retn
sub_531F10 endp



; Attributes: bp-based frame

sub_531F20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A000
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531F20 endp

align 10h


; Attributes: bp-based frame

sub_531F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0DCh
mov	esp, ebp
pop	ebp
retn
sub_531F40 endp



; Attributes: bp-based frame

sub_531F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C8B0
mov	esp, ebp
pop	ebp
retn
sub_531F50 endp



; Attributes: bp-based frame

sub_531F60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A060
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531F60 endp

align 10h


; Attributes: bp-based frame

sub_531F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0DDh
mov	esp, ebp
pop	ebp
retn
sub_531F80 endp



; Attributes: bp-based frame

sub_531F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C890
mov	esp, ebp
pop	ebp
retn
sub_531F90 endp



; Attributes: bp-based frame

sub_531FA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A0C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531FA0 endp

align 10h


; Attributes: bp-based frame

sub_531FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0DEh
mov	esp, ebp
pop	ebp
retn
sub_531FC0 endp



; Attributes: bp-based frame

sub_531FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C870
mov	esp, ebp
pop	ebp
retn
sub_531FD0 endp



; Attributes: bp-based frame

sub_531FE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A120
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_531FE0 endp

align 10h


; Attributes: bp-based frame

sub_532000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C850
mov	esp, ebp
pop	ebp
retn
sub_532000 endp



; Attributes: bp-based frame

sub_532010 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53203E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53203E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_532010 endp

align 10h


; Attributes: bp-based frame

sub_532050 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A180
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532050 endp

align 10h


; Attributes: bp-based frame

sub_532070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E3h
mov	esp, ebp
pop	ebp
retn
sub_532070 endp



; Attributes: bp-based frame

sub_532080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C830
mov	esp, ebp
pop	ebp
retn
sub_532080 endp



; Attributes: bp-based frame

sub_532090 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_532090
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_4395C0
mov	byte ptr [ebp+var_4], 3
call	nullsub_1
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53210A
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53210A:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_532090 endp

align 10h


; Attributes: bp-based frame

sub_532120 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A1F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532120 endp

align 10h


; Attributes: bp-based frame

sub_532140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E5h
mov	esp, ebp
pop	ebp
retn
sub_532140 endp



; Attributes: bp-based frame

sub_532150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C800
mov	esp, ebp
pop	ebp
retn
sub_532150 endp



; Attributes: bp-based frame

sub_532160 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53218E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53218E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_532160 endp

align 10h


; Attributes: bp-based frame

sub_5321A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5321A0 endp

align 10h


; Attributes: bp-based frame

sub_5321C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E6h
mov	esp, ebp
pop	ebp
retn
sub_5321C0 endp



; Attributes: bp-based frame

sub_5321D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E03h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5321D0 endp

align 10h


; Attributes: bp-based frame

sub_5321F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C7E0
mov	esp, ebp
pop	ebp
retn
sub_5321F0 endp



; Attributes: bp-based frame

sub_532200 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A2F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532200 endp

align 10h


; Attributes: bp-based frame

sub_532220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E7h
mov	esp, ebp
pop	ebp
retn
sub_532220 endp



; Attributes: bp-based frame

sub_532230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C7C0
mov	esp, ebp
pop	ebp
retn
sub_532230 endp



; Attributes: bp-based frame

sub_532240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532240 endp

align 10h


; Attributes: bp-based frame

sub_532260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E9h
mov	esp, ebp
pop	ebp
retn
sub_532260 endp



; Attributes: bp-based frame

sub_532270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C7A0
mov	esp, ebp
pop	ebp
retn
sub_532270 endp



; Attributes: bp-based frame

sub_532280 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A3E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532280 endp

align 10h


; Attributes: bp-based frame

sub_5322A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0EAh
mov	esp, ebp
pop	ebp
retn
sub_5322A0 endp



; Attributes: bp-based frame

sub_5322B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C780
mov	esp, ebp
pop	ebp
retn
sub_5322B0 endp



; Attributes: bp-based frame

sub_5322C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A440
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5322C0 endp

align 10h


; Attributes: bp-based frame

sub_5322E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0EBh
mov	esp, ebp
pop	ebp
retn
sub_5322E0 endp



; Attributes: bp-based frame

sub_5322F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C760
mov	esp, ebp
pop	ebp
retn
sub_5322F0 endp



; Attributes: bp-based frame

sub_532300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A4A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532300 endp

align 10h


; Attributes: bp-based frame

sub_532320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0ECh
mov	esp, ebp
pop	ebp
retn
sub_532320 endp



; Attributes: bp-based frame

sub_532330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C740
mov	esp, ebp
pop	ebp
retn
sub_532330 endp



; Attributes: bp-based frame

sub_532340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A500
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532340 endp

align 10h


; Attributes: bp-based frame

sub_532360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0EDh
mov	esp, ebp
pop	ebp
retn
sub_532360 endp



; Attributes: bp-based frame

sub_532370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C720
mov	esp, ebp
pop	ebp
retn
sub_532370 endp



; Attributes: bp-based frame

sub_532380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A560
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532380 endp

align 10h


; Attributes: bp-based frame

sub_5323A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0EEh
mov	esp, ebp
pop	ebp
retn
sub_5323A0 endp



; Attributes: bp-based frame

sub_5323B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5323E9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5323E9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5323B0 endp

align 10h


; Attributes: bp-based frame

sub_532400 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A5C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532400 endp

align 10h


; Attributes: bp-based frame

sub_532420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0EFh
mov	esp, ebp
pop	ebp
retn
sub_532420 endp



; Attributes: bp-based frame

sub_532430 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_42D070
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_532453
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_532453:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_532430 endp

align 10h


; Attributes: bp-based frame

sub_532460 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_532491
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D6E0
mov	[ebp+var_C], eax
jmp	short loc_532498

loc_532491:
mov	[ebp+var_C], 0

loc_532498:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_532460 endp

align 10h


; Attributes: bp-based frame

sub_5324B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F0h
mov	esp, ebp
pop	ebp
retn
sub_5324B0 endp



; Attributes: bp-based frame

sub_5324C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_532506
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_532506:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5324C0 endp

align 10h


; Attributes: bp-based frame

sub_532520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A620
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532520 endp

align 10h


; Attributes: bp-based frame

sub_532540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F1h
mov	esp, ebp
pop	ebp
retn
sub_532540 endp



; Attributes: bp-based frame

sub_532550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C700
mov	esp, ebp
pop	ebp
retn
sub_532550 endp



; Attributes: bp-based frame

sub_532560 proc	near

var_48=	dword ptr -48h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
add	ecx, 54h
call	sub_555250
mov	ecx, [ebp+var_48]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_48]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53259B
mov	ecx, [ebp+var_48]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53259B:
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn	4
sub_532560 endp

align 10h


; Attributes: bp-based frame

sub_5325B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A6B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5325B0 endp

align 10h


; Attributes: bp-based frame

sub_5325D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F2h
mov	esp, ebp
pop	ebp
retn
sub_5325D0 endp



; Attributes: bp-based frame

sub_5325E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C6E0
mov	esp, ebp
pop	ebp
retn
sub_5325E0 endp



; Attributes: bp-based frame

sub_5325F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5325F0 endp

align 10h


; Attributes: bp-based frame

sub_532610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F3h
mov	esp, ebp
pop	ebp
retn
sub_532610 endp



; Attributes: bp-based frame

sub_532620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C6C0
mov	esp, ebp
pop	ebp
retn
sub_532620 endp



; Attributes: bp-based frame

sub_532630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A780
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532630 endp

align 10h


; Attributes: bp-based frame

sub_532650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F4h
mov	esp, ebp
pop	ebp
retn
sub_532650 endp



; Attributes: bp-based frame

sub_532660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C6A0
mov	esp, ebp
pop	ebp
retn
sub_532660 endp



; Attributes: bp-based frame

sub_532670 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A7E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532670 endp

align 10h


; Attributes: bp-based frame

sub_532690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F5h
mov	esp, ebp
pop	ebp
retn
sub_532690 endp



; Attributes: bp-based frame

sub_5326A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C680
mov	esp, ebp
pop	ebp
retn
sub_5326A0 endp



; Attributes: bp-based frame

sub_5326B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A840
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5326B0 endp

align 10h


; Attributes: bp-based frame

sub_5326D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F6h
mov	esp, ebp
pop	ebp
retn
sub_5326D0 endp



; Attributes: bp-based frame

sub_5326E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C660
mov	esp, ebp
pop	ebp
retn
sub_5326E0 endp



; Attributes: bp-based frame

sub_5326F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A8A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5326F0 endp

align 10h


; Attributes: bp-based frame

sub_532710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F7h
mov	esp, ebp
pop	ebp
retn
sub_532710 endp



; Attributes: bp-based frame

sub_532720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C640
mov	esp, ebp
pop	ebp
retn
sub_532720 endp



; Attributes: bp-based frame

sub_532730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A900
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532730 endp

align 10h


; Attributes: bp-based frame

sub_532750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F8h
mov	esp, ebp
pop	ebp
retn
sub_532750 endp



; Attributes: bp-based frame

sub_532760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C620
mov	esp, ebp
pop	ebp
retn
sub_532760 endp



; Attributes: bp-based frame

sub_532770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A960
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532770 endp

align 10h


; Attributes: bp-based frame

sub_532790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0F9h
mov	esp, ebp
pop	ebp
retn
sub_532790 endp



; Attributes: bp-based frame

sub_5327A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C600
mov	esp, ebp
pop	ebp
retn
sub_5327A0 endp



; Attributes: bp-based frame

sub_5327B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55A9C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5327B0 endp

align 10h


; Attributes: bp-based frame

sub_5327D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0FAh
mov	esp, ebp
pop	ebp
retn
sub_5327D0 endp



; Attributes: bp-based frame

sub_5327E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C5E0
mov	esp, ebp
pop	ebp
retn
sub_5327E0 endp



; Attributes: bp-based frame

sub_5327F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AA20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5327F0 endp

align 10h


; Attributes: bp-based frame

sub_532810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0FBh
mov	esp, ebp
pop	ebp
retn
sub_532810 endp



; Attributes: bp-based frame

sub_532820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C5C0
mov	esp, ebp
pop	ebp
retn
sub_532820 endp



; Attributes: bp-based frame

sub_532830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AAB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532830 endp

align 10h


; Attributes: bp-based frame

sub_532850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0FEh
mov	esp, ebp
pop	ebp
retn
sub_532850 endp



; Attributes: bp-based frame

sub_532860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C5A0
mov	esp, ebp
pop	ebp
retn
sub_532860 endp



; Attributes: bp-based frame

sub_532870 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 28h
call	sub_468AA0
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5328A0
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5328A0:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_532870 endp

align 10h


; Attributes: bp-based frame

sub_5328B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AB10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5328B0 endp

align 10h


; Attributes: bp-based frame

sub_5328D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0FFh
mov	esp, ebp
pop	ebp
retn
sub_5328D0 endp



; Attributes: bp-based frame

sub_5328E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AB70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5328E0 endp

align 10h


; Attributes: bp-based frame

sub_532900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 101h
mov	esp, ebp
pop	ebp
retn
sub_532900 endp



; Attributes: bp-based frame

sub_532910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C580
mov	esp, ebp
pop	ebp
retn
sub_532910 endp



; Attributes: bp-based frame

sub_532920 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55ABD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532920 endp

align 10h


; Attributes: bp-based frame

sub_532940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 102h
mov	esp, ebp
pop	ebp
retn
sub_532940 endp



; Attributes: bp-based frame

sub_532950 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AC30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532950 endp

align 10h


; Attributes: bp-based frame

sub_532970 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 103h
mov	esp, ebp
pop	ebp
retn
sub_532970 endp



; Attributes: bp-based frame

sub_532980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C530
mov	esp, ebp
pop	ebp
retn
sub_532980 endp



; Attributes: bp-based frame

sub_532990 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AC90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532990 endp

align 10h


; Attributes: bp-based frame

sub_5329B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 104h
mov	esp, ebp
pop	ebp
retn
sub_5329B0 endp



; Attributes: bp-based frame

sub_5329C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C510
mov	esp, ebp
pop	ebp
retn
sub_5329C0 endp



; Attributes: bp-based frame

sub_5329D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55ACF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5329D0 endp

align 10h


; Attributes: bp-based frame

sub_5329F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 105h
mov	esp, ebp
pop	ebp
retn
sub_5329F0 endp



; Attributes: bp-based frame

sub_532A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C4F0
mov	esp, ebp
pop	ebp
retn
sub_532A00 endp



; Attributes: bp-based frame

sub_532A10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AD50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532A10 endp

align 10h


; Attributes: bp-based frame

sub_532A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 106h
mov	esp, ebp
pop	ebp
retn
sub_532A30 endp



; Attributes: bp-based frame

sub_532A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C4D0
mov	esp, ebp
pop	ebp
retn
sub_532A40 endp



; Attributes: bp-based frame

sub_532A50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_532A81
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42DA70
mov	[ebp+var_C], eax
jmp	short loc_532A88

loc_532A81:
mov	[ebp+var_C], 0

loc_532A88:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_532A50 endp

align 10h


; Attributes: bp-based frame

sub_532AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 107h
mov	esp, ebp
pop	ebp
retn
sub_532AA0 endp



; Attributes: bp-based frame

sub_532AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C4B0
mov	esp, ebp
pop	ebp
retn
sub_532AB0 endp



; Attributes: bp-based frame

sub_532AC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55ADB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532AC0 endp

align 10h


; Attributes: bp-based frame

sub_532AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 108h
mov	esp, ebp
pop	ebp
retn
sub_532AE0 endp



; Attributes: bp-based frame

sub_532AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C490
mov	esp, ebp
pop	ebp
retn
sub_532AF0 endp



; Attributes: bp-based frame

sub_532B00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AE10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532B00 endp

align 10h


; Attributes: bp-based frame

sub_532B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 10Ah
mov	esp, ebp
pop	ebp
retn
sub_532B20 endp



; Attributes: bp-based frame

sub_532B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C470
mov	esp, ebp
pop	ebp
retn
sub_532B30 endp



; Attributes: bp-based frame

sub_532B40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AE70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532B40 endp

align 10h


; Attributes: bp-based frame

sub_532B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 10Bh
mov	esp, ebp
pop	ebp
retn
sub_532B60 endp



; Attributes: bp-based frame

sub_532B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C450
mov	esp, ebp
pop	ebp
retn
sub_532B70 endp



; Attributes: bp-based frame

sub_532B80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AED0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532B80 endp

align 10h


; Attributes: bp-based frame

sub_532BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 10Ch
mov	esp, ebp
pop	ebp
retn
sub_532BA0 endp



; Attributes: bp-based frame

sub_532BB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C430
mov	esp, ebp
pop	ebp
retn
sub_532BB0 endp



; Attributes: bp-based frame

sub_532BC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AF30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532BC0 endp

align 10h


; Attributes: bp-based frame

sub_532BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 10Dh
mov	esp, ebp
pop	ebp
retn
sub_532BE0 endp



; Attributes: bp-based frame

sub_532BF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 3940h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_532BF0 endp

align 10h


; Attributes: bp-based frame

sub_532C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C410
mov	esp, ebp
pop	ebp
retn
sub_532C10 endp



; Attributes: bp-based frame

sub_532C20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AF90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532C20 endp

align 10h


; Attributes: bp-based frame

sub_532C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 10Eh
mov	esp, ebp
pop	ebp
retn
sub_532C40 endp



; Attributes: bp-based frame

sub_532C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C3F0
mov	esp, ebp
pop	ebp
retn
sub_532C50 endp



; Attributes: bp-based frame

sub_532C60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55AFF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532C60 endp

align 10h


; Attributes: bp-based frame

sub_532C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 10Fh
mov	esp, ebp
pop	ebp
retn
sub_532C80 endp



; Attributes: bp-based frame

sub_532C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C3A0
mov	esp, ebp
pop	ebp
retn
sub_532C90 endp



; Attributes: bp-based frame

sub_532CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B050
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532CA0 endp

align 10h


; Attributes: bp-based frame

sub_532CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C380
mov	esp, ebp
pop	ebp
retn
sub_532CC0 endp



; Attributes: bp-based frame

sub_532CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_532D09
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_532D09:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_532CD0 endp

align 10h


; Attributes: bp-based frame

sub_532D20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B0C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532D20 endp

align 10h


; Attributes: bp-based frame

sub_532D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 111h
mov	esp, ebp
pop	ebp
retn
sub_532D40 endp



; Attributes: bp-based frame

sub_532D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C360
mov	esp, ebp
pop	ebp
retn
sub_532D50 endp



; Attributes: bp-based frame

sub_532D60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B130
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532D60 endp

align 10h


; Attributes: bp-based frame

sub_532D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 112h
mov	esp, ebp
pop	ebp
retn
sub_532D80 endp



; Attributes: bp-based frame

sub_532D90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C340
mov	esp, ebp
pop	ebp
retn
sub_532D90 endp



; Attributes: bp-based frame

sub_532DA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B190
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532DA0 endp

align 10h


; Attributes: bp-based frame

sub_532DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 113h
mov	esp, ebp
pop	ebp
retn
sub_532DC0 endp



; Attributes: bp-based frame

sub_532DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C320
mov	esp, ebp
pop	ebp
retn
sub_532DD0 endp



; Attributes: bp-based frame

sub_532DE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_532E0E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_532E0E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_532DE0 endp

align 10h


; Attributes: bp-based frame

sub_532E20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B1F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532E20 endp

align 10h


; Attributes: bp-based frame

sub_532E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C300
mov	esp, ebp
pop	ebp
retn
sub_532E40 endp



; Attributes: bp-based frame

sub_532E50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B250
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532E50 endp

align 10h


; Attributes: bp-based frame

sub_532E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 115h
mov	esp, ebp
pop	ebp
retn
sub_532E70 endp



; Attributes: bp-based frame

sub_532E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C2B0
mov	esp, ebp
pop	ebp
retn
sub_532E80 endp



; Attributes: bp-based frame

sub_532E90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B2B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532E90 endp

align 10h


; Attributes: bp-based frame

sub_532EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 116h
mov	esp, ebp
pop	ebp
retn
sub_532EB0 endp



; Attributes: bp-based frame

sub_532EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C240
mov	esp, ebp
pop	ebp
retn
sub_532EC0 endp



; Attributes: bp-based frame

sub_532ED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B310
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532ED0 endp

align 10h


; Attributes: bp-based frame

sub_532EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 117h
mov	esp, ebp
pop	ebp
retn
sub_532EF0 endp



; Attributes: bp-based frame

sub_532F00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B370
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532F00 endp

align 10h


; Attributes: bp-based frame

sub_532F20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B3D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532F20 endp

align 10h


; Attributes: bp-based frame

sub_532F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 119h
mov	esp, ebp
pop	ebp
retn
sub_532F40 endp



; Attributes: bp-based frame

sub_532F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C220
mov	esp, ebp
pop	ebp
retn
sub_532F50 endp



; Attributes: bp-based frame

sub_532F60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B430
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532F60 endp

align 10h


; Attributes: bp-based frame

sub_532F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 11Ah
mov	esp, ebp
pop	ebp
retn
sub_532F80 endp



; Attributes: bp-based frame

sub_532F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C200
mov	esp, ebp
pop	ebp
retn
sub_532F90 endp



; Attributes: bp-based frame

sub_532FA0 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 20h
call	sub_5552D0
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_532FD0
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_532FD0:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_532FA0 endp

align 10h


; Attributes: bp-based frame

sub_532FE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B490
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_532FE0 endp

align 10h


; Attributes: bp-based frame

sub_533000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 11Bh
mov	esp, ebp
pop	ebp
retn
sub_533000 endp



; Attributes: bp-based frame

sub_533010 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B4F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533010 endp

align 10h


; Attributes: bp-based frame

sub_533030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 11Ch
mov	esp, ebp
pop	ebp
retn
sub_533030 endp



; Attributes: bp-based frame

sub_533040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C1B0
mov	esp, ebp
pop	ebp
retn
sub_533040 endp



; Attributes: bp-based frame

sub_533050 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B550
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533050 endp

align 10h


; Attributes: bp-based frame

sub_533070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 11Dh
mov	esp, ebp
pop	ebp
retn
sub_533070 endp



; Attributes: bp-based frame

sub_533080 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B5B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533080 endp

align 10h


; Attributes: bp-based frame

sub_5330A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 11Eh
mov	esp, ebp
pop	ebp
retn
sub_5330A0 endp



; Attributes: bp-based frame

sub_5330B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B610
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5330B0 endp

align 10h


; Attributes: bp-based frame

sub_5330D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 11Fh
mov	esp, ebp
pop	ebp
retn
sub_5330D0 endp



; Attributes: bp-based frame

sub_5330E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C190
mov	esp, ebp
pop	ebp
retn
sub_5330E0 endp



; Attributes: bp-based frame

sub_5330F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B670
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5330F0 endp

align 10h


; Attributes: bp-based frame

sub_533110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 120h
mov	esp, ebp
pop	ebp
retn
sub_533110 endp



; Attributes: bp-based frame

sub_533120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C170
mov	esp, ebp
pop	ebp
retn
sub_533120 endp



; Attributes: bp-based frame

sub_533130 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 20h
call	sub_591390
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_533160
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_533160:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_533130 endp

align 10h


; Attributes: bp-based frame

sub_533170 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B6D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533170 endp

align 10h


; Attributes: bp-based frame

sub_533190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 121h
mov	esp, ebp
pop	ebp
retn
sub_533190 endp



; Attributes: bp-based frame

sub_5331A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B730
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5331A0 endp

align 10h


; Attributes: bp-based frame

sub_5331C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 122h
mov	esp, ebp
pop	ebp
retn
sub_5331C0 endp



; Attributes: bp-based frame

sub_5331D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C120
mov	esp, ebp
pop	ebp
retn
sub_5331D0 endp



; Attributes: bp-based frame

sub_5331E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B790
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5331E0 endp

align 10h


; Attributes: bp-based frame

sub_533200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 123h
mov	esp, ebp
pop	ebp
retn
sub_533200 endp



; Attributes: bp-based frame

sub_533210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C100
mov	esp, ebp
pop	ebp
retn
sub_533210 endp



; Attributes: bp-based frame

sub_533220 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B7F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533220 endp

align 10h


; Attributes: bp-based frame

sub_533240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 124h
mov	esp, ebp
pop	ebp
retn
sub_533240 endp



; Attributes: bp-based frame

sub_533250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C0E0
mov	esp, ebp
pop	ebp
retn
sub_533250 endp



; Attributes: bp-based frame

sub_533260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B850
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533260 endp

align 10h


; Attributes: bp-based frame

sub_533280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 125h
mov	esp, ebp
pop	ebp
retn
sub_533280 endp



; Attributes: bp-based frame

sub_533290 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B8B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533290 endp

align 10h


; Attributes: bp-based frame

sub_5332B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 126h
mov	esp, ebp
pop	ebp
retn
sub_5332B0 endp



; Attributes: bp-based frame

sub_5332C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5332C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 5
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_533339
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_533339:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5332C0 endp

align 10h


; Attributes: bp-based frame

sub_533350 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B910
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533350 endp

align 10h


; Attributes: bp-based frame

sub_533370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 127h
mov	esp, ebp
pop	ebp
retn
sub_533370 endp



; Attributes: bp-based frame

sub_533380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55B9A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533380 endp

align 10h


; Attributes: bp-based frame

sub_5333A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BA00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5333A0 endp

align 10h


; Attributes: bp-based frame

sub_5333C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 129h
mov	esp, ebp
pop	ebp
retn
sub_5333C0 endp



; Attributes: bp-based frame

sub_5333D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BA70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5333D0 endp

align 10h


; Attributes: bp-based frame

sub_5333F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 12Ah
mov	esp, ebp
pop	ebp
retn
sub_5333F0 endp



; Attributes: bp-based frame

sub_533400 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BAE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533400 endp

align 10h


; Attributes: bp-based frame

sub_533420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 12Bh
mov	esp, ebp
pop	ebp
retn
sub_533420 endp



; Attributes: bp-based frame

sub_533430 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 140h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_533430 endp

align 10h


; Attributes: bp-based frame

sub_533450 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BB40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533450 endp

align 10h


; Attributes: bp-based frame

sub_533470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 12Ch
mov	esp, ebp
pop	ebp
retn
sub_533470 endp



; Attributes: bp-based frame

sub_533480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C0B0
mov	esp, ebp
pop	ebp
retn
sub_533480 endp



; Attributes: bp-based frame

sub_533490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BBA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533490 endp

align 10h


; Attributes: bp-based frame

sub_5334B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 12Dh
mov	esp, ebp
pop	ebp
retn
sub_5334B0 endp



; Attributes: bp-based frame

sub_5334C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C060
mov	esp, ebp
pop	ebp
retn
sub_5334C0 endp



; Attributes: bp-based frame

sub_5334D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BC00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5334D0 endp

align 10h


; Attributes: bp-based frame

sub_5334F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 12Eh
mov	esp, ebp
pop	ebp
retn
sub_5334F0 endp



; Attributes: bp-based frame

sub_533500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7C040
mov	esp, ebp
pop	ebp
retn
sub_533500 endp



; Attributes: bp-based frame

sub_533510 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BC60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533510 endp

align 10h


; Attributes: bp-based frame

sub_533530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 12Fh
mov	esp, ebp
pop	ebp
retn
sub_533530 endp



; Attributes: bp-based frame

sub_533540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BFF0
mov	esp, ebp
pop	ebp
retn
sub_533540 endp



; Attributes: bp-based frame

sub_533550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BCC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533550 endp

align 10h


; Attributes: bp-based frame

sub_533570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BFD0
mov	esp, ebp
pop	ebp
retn
sub_533570 endp



; Attributes: bp-based frame

sub_533580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BD20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533580 endp

align 10h


; Attributes: bp-based frame

sub_5335A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 131h
mov	esp, ebp
pop	ebp
retn
sub_5335A0 endp



; Attributes: bp-based frame

sub_5335B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BFB0
mov	esp, ebp
pop	ebp
retn
sub_5335B0 endp



; Attributes: bp-based frame

sub_5335C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BD80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5335C0 endp

align 10h


; Attributes: bp-based frame

sub_5335E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 132h
mov	esp, ebp
pop	ebp
retn
sub_5335E0 endp



; Attributes: bp-based frame

sub_5335F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BF90
mov	esp, ebp
pop	ebp
retn
sub_5335F0 endp



; Attributes: bp-based frame

sub_533600 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BDE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533600 endp

align 10h


; Attributes: bp-based frame

sub_533620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 133h
mov	esp, ebp
pop	ebp
retn
sub_533620 endp



; Attributes: bp-based frame

sub_533630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BF70
mov	esp, ebp
pop	ebp
retn
sub_533630 endp



; Attributes: bp-based frame

sub_533640 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BE40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533640 endp

align 10h


; Attributes: bp-based frame

sub_533660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 134h
mov	esp, ebp
pop	ebp
retn
sub_533660 endp



; Attributes: bp-based frame

sub_533670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BF50
mov	esp, ebp
pop	ebp
retn
sub_533670 endp



; Attributes: bp-based frame

sub_533680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BEA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533680 endp

align 10h


; Attributes: bp-based frame

sub_5336A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 135h
mov	esp, ebp
pop	ebp
retn
sub_5336A0 endp



; Attributes: bp-based frame

sub_5336B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BF00
mov	esp, ebp
pop	ebp
retn
sub_5336B0 endp



; Attributes: bp-based frame

sub_5336C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BF00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5336C0 endp

align 10h


; Attributes: bp-based frame

sub_5336E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 136h
mov	esp, ebp
pop	ebp
retn
sub_5336E0 endp



; Attributes: bp-based frame

sub_5336F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BF60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5336F0 endp

align 10h


; Attributes: bp-based frame

sub_533710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 137h
mov	esp, ebp
pop	ebp
retn
sub_533710 endp



; Attributes: bp-based frame

sub_533720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BEE0
mov	esp, ebp
pop	ebp
retn
sub_533720 endp



; Attributes: bp-based frame

sub_533730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55BFC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533730 endp

align 10h


; Attributes: bp-based frame

sub_533750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 138h
mov	esp, ebp
pop	ebp
retn
sub_533750 endp



; Attributes: bp-based frame

sub_533760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BEC0
mov	esp, ebp
pop	ebp
retn
sub_533760 endp



; Attributes: bp-based frame

sub_533770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C020
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533770 endp

align 10h


; Attributes: bp-based frame

sub_533790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 139h
mov	esp, ebp
pop	ebp
retn
sub_533790 endp



; Attributes: bp-based frame

sub_5337A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C080
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5337A0 endp

align 10h


; Attributes: bp-based frame

sub_5337C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 13Ah
mov	esp, ebp
pop	ebp
retn
sub_5337C0 endp



; Attributes: bp-based frame

sub_5337D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BE70
mov	esp, ebp
pop	ebp
retn
sub_5337D0 endp



; Attributes: bp-based frame

sub_5337E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C0E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5337E0 endp

align 10h


; Attributes: bp-based frame

sub_533800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 13Bh
mov	esp, ebp
pop	ebp
retn
sub_533800 endp



; Attributes: bp-based frame

sub_533810 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C140
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533810 endp

align 10h


; Attributes: bp-based frame

sub_533830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 13Ch
mov	esp, ebp
pop	ebp
retn
sub_533830 endp



; Attributes: bp-based frame

sub_533840 proc	near

var_C0=	dword ptr -0C0h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_C0], ecx
mov	ecx, [ebp+var_C0]
call	sub_4E95D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_533871
mov	ecx, [ebp+var_C0]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_533871:
mov	eax, [ebp+var_C0]
mov	esp, ebp
pop	ebp
retn	4
sub_533840 endp

align 10h


; Attributes: bp-based frame

sub_533880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C1A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533880 endp

align 10h


; Attributes: bp-based frame

sub_5338A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 13Dh
mov	esp, ebp
pop	ebp
retn
sub_5338A0 endp



; Attributes: bp-based frame

sub_5338B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C200
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5338B0 endp

align 10h


; Attributes: bp-based frame

sub_5338D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 13Eh
mov	esp, ebp
pop	ebp
retn
sub_5338D0 endp



; Attributes: bp-based frame

sub_5338E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BE50
mov	esp, ebp
pop	ebp
retn
sub_5338E0 endp



; Attributes: bp-based frame

sub_5338F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C260
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5338F0 endp

align 10h


; Attributes: bp-based frame

sub_533910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 13Fh
mov	esp, ebp
pop	ebp
retn
sub_533910 endp



; Attributes: bp-based frame

sub_533920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BE30
mov	esp, ebp
pop	ebp
retn
sub_533920 endp



; Attributes: bp-based frame

sub_533930 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_46B570
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_533969
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_533969:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_533930 endp

align 10h


; Attributes: bp-based frame

sub_533980 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C2C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533980 endp

align 10h


; Attributes: bp-based frame

sub_5339A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 140h
mov	esp, ebp
pop	ebp
retn
sub_5339A0 endp



; Attributes: bp-based frame

sub_5339B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BE10
mov	esp, ebp
pop	ebp
retn
sub_5339B0 endp



; Attributes: bp-based frame

sub_5339C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C320
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5339C0 endp

align 10h


; Attributes: bp-based frame

sub_5339E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 141h
mov	esp, ebp
pop	ebp
retn
sub_5339E0 endp



; Attributes: bp-based frame

sub_5339F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BDF0
mov	esp, ebp
pop	ebp
retn
sub_5339F0 endp



; Attributes: bp-based frame

sub_533A00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C380
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533A00 endp

align 10h


; Attributes: bp-based frame

sub_533A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 142h
mov	esp, ebp
pop	ebp
retn
sub_533A20 endp



; Attributes: bp-based frame

sub_533A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BDD0
mov	esp, ebp
pop	ebp
retn
sub_533A30 endp



; Attributes: bp-based frame

sub_533A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_533A40 endp

align 10h


; Attributes: bp-based frame

sub_533A60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C3E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533A60 endp

align 10h


; Attributes: bp-based frame

sub_533A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 143h
mov	esp, ebp
pop	ebp
retn
sub_533A80 endp



; Attributes: bp-based frame

sub_533A90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BDB0
mov	esp, ebp
pop	ebp
retn
sub_533A90 endp



; Attributes: bp-based frame

sub_533AA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C440
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533AA0 endp

align 10h


; Attributes: bp-based frame

sub_533AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 144h
mov	esp, ebp
pop	ebp
retn
sub_533AC0 endp



; Attributes: bp-based frame

sub_533AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BD90
mov	esp, ebp
pop	ebp
retn
sub_533AD0 endp



; Attributes: bp-based frame

sub_533AE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C4A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533AE0 endp

align 10h


; Attributes: bp-based frame

sub_533B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 145h
mov	esp, ebp
pop	ebp
retn
sub_533B00 endp



; Attributes: bp-based frame

sub_533B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BD70
mov	esp, ebp
pop	ebp
retn
sub_533B10 endp



; Attributes: bp-based frame

sub_533B20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C500
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533B20 endp

align 10h


; Attributes: bp-based frame

sub_533B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 146h
mov	esp, ebp
pop	ebp
retn
sub_533B40 endp



; Attributes: bp-based frame

sub_533B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BD50
mov	esp, ebp
pop	ebp
retn
sub_533B50 endp



; Attributes: bp-based frame

sub_533B60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C560
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533B60 endp

align 10h


; Attributes: bp-based frame

sub_533B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 147h
mov	esp, ebp
pop	ebp
retn
sub_533B80 endp



; Attributes: bp-based frame

sub_533B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BD30
mov	esp, ebp
pop	ebp
retn
sub_533B90 endp



; Attributes: bp-based frame

sub_533BA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C5C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533BA0 endp

align 10h


; Attributes: bp-based frame

sub_533BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 148h
mov	esp, ebp
pop	ebp
retn
sub_533BC0 endp



; Attributes: bp-based frame

sub_533BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BD10
mov	esp, ebp
pop	ebp
retn
sub_533BD0 endp



; Attributes: bp-based frame

sub_533BE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C630
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533BE0 endp

align 10h


; Attributes: bp-based frame

sub_533C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 149h
mov	esp, ebp
pop	ebp
retn
sub_533C00 endp



; Attributes: bp-based frame

sub_533C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BCF0
mov	esp, ebp
pop	ebp
retn
sub_533C10 endp



; Attributes: bp-based frame

sub_533C20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C690
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533C20 endp

align 10h


; Attributes: bp-based frame

sub_533C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 14Ah
mov	esp, ebp
pop	ebp
retn
sub_533C40 endp



; Attributes: bp-based frame

sub_533C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BCA0
mov	esp, ebp
pop	ebp
retn
sub_533C50 endp



; Attributes: bp-based frame

sub_533C60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C6F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533C60 endp

align 10h


; Attributes: bp-based frame

sub_533C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 14Bh
mov	esp, ebp
pop	ebp
retn
sub_533C80 endp



; Attributes: bp-based frame

sub_533C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BC80
mov	esp, ebp
pop	ebp
retn
sub_533C90 endp



; Attributes: bp-based frame

sub_533CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C750
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533CA0 endp

align 10h


; Attributes: bp-based frame

sub_533CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 14Ch
mov	esp, ebp
pop	ebp
retn
sub_533CC0 endp



; Attributes: bp-based frame

sub_533CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BC60
mov	esp, ebp
pop	ebp
retn
sub_533CD0 endp



; Attributes: bp-based frame

sub_533CE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C7B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533CE0 endp

align 10h


; Attributes: bp-based frame

sub_533D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 14Dh
mov	esp, ebp
pop	ebp
retn
sub_533D00 endp



; Attributes: bp-based frame

sub_533D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BC40
mov	esp, ebp
pop	ebp
retn
sub_533D10 endp



; Attributes: bp-based frame

sub_533D20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C810
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533D20 endp

align 10h


; Attributes: bp-based frame

sub_533D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 14Eh
mov	esp, ebp
pop	ebp
retn
sub_533D40 endp



; Attributes: bp-based frame

sub_533D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BBF0
mov	esp, ebp
pop	ebp
retn
sub_533D50 endp



; Attributes: bp-based frame

sub_533D60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C870
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533D60 endp

align 10h


; Attributes: bp-based frame

sub_533D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 14Fh
mov	esp, ebp
pop	ebp
retn
sub_533D80 endp



; Attributes: bp-based frame

sub_533D90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BBD0
mov	esp, ebp
pop	ebp
retn
sub_533D90 endp



; Attributes: bp-based frame

sub_533DA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C8D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533DA0 endp

align 10h


; Attributes: bp-based frame

sub_533DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 150h
mov	esp, ebp
pop	ebp
retn
sub_533DC0 endp



; Attributes: bp-based frame

sub_533DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BBB0
mov	esp, ebp
pop	ebp
retn
sub_533DD0 endp



; Attributes: bp-based frame

sub_533DE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C930
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533DE0 endp

align 10h


; Attributes: bp-based frame

sub_533E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 151h
mov	esp, ebp
pop	ebp
retn
sub_533E00 endp



; Attributes: bp-based frame

sub_533E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BB90
mov	esp, ebp
pop	ebp
retn
sub_533E10 endp



; Attributes: bp-based frame

sub_533E20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C990
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533E20 endp

align 10h


; Attributes: bp-based frame

sub_533E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 152h
mov	esp, ebp
pop	ebp
retn
sub_533E40 endp



; Attributes: bp-based frame

sub_533E50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BB70
mov	esp, ebp
pop	ebp
retn
sub_533E50 endp



; Attributes: bp-based frame

sub_533E60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55C9F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533E60 endp

align 10h


; Attributes: bp-based frame

sub_533E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 153h
mov	esp, ebp
pop	ebp
retn
sub_533E80 endp



; Attributes: bp-based frame

sub_533E90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BB50
mov	esp, ebp
pop	ebp
retn
sub_533E90 endp



; Attributes: bp-based frame

sub_533EA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_533ED1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D7D0
mov	[ebp+var_C], eax
jmp	short loc_533ED8

loc_533ED1:
mov	[ebp+var_C], 0

loc_533ED8:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_533EA0 endp

align 10h


; Attributes: bp-based frame

sub_533EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 154h
mov	esp, ebp
pop	ebp
retn
sub_533EF0 endp



; Attributes: bp-based frame

sub_533F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BB30
mov	esp, ebp
pop	ebp
retn
sub_533F00 endp



; Attributes: bp-based frame

sub_533F10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CA50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533F10 endp

align 10h


; Attributes: bp-based frame

sub_533F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 155h
mov	esp, ebp
pop	ebp
retn
sub_533F30 endp



; Attributes: bp-based frame

sub_533F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BB10
mov	esp, ebp
pop	ebp
retn
sub_533F40 endp



; Attributes: bp-based frame

sub_533F50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_533F81
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D750
mov	[ebp+var_C], eax
jmp	short loc_533F88

loc_533F81:
mov	[ebp+var_C], 0

loc_533F88:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_533F50 endp

align 10h


; Attributes: bp-based frame

sub_533FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 156h
mov	esp, ebp
pop	ebp
retn
sub_533FA0 endp



; Attributes: bp-based frame

sub_533FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BAF0
mov	esp, ebp
pop	ebp
retn
sub_533FB0 endp



; Attributes: bp-based frame

sub_533FC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CAB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_533FC0 endp

align 10h


; Attributes: bp-based frame

sub_533FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 157h
mov	esp, ebp
pop	ebp
retn
sub_533FE0 endp



; Attributes: bp-based frame

sub_533FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BAD0
mov	esp, ebp
pop	ebp
retn
sub_533FF0 endp



; Attributes: bp-based frame

sub_534000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CB10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534000 endp

align 10h


; Attributes: bp-based frame

sub_534020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 158h
mov	esp, ebp
pop	ebp
retn
sub_534020 endp



; Attributes: bp-based frame

sub_534030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2900h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_534030 endp

align 10h


; Attributes: bp-based frame

sub_534050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BAB0
mov	esp, ebp
pop	ebp
retn
sub_534050 endp



; Attributes: bp-based frame

sub_534060 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_534091
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D950
mov	[ebp+var_C], eax
jmp	short loc_534098

loc_534091:
mov	[ebp+var_C], 0

loc_534098:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_534060 endp

align 10h


; Attributes: bp-based frame

sub_5340B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 159h
mov	esp, ebp
pop	ebp
retn
sub_5340B0 endp



; Attributes: bp-based frame

sub_5340C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BA90
mov	esp, ebp
pop	ebp
retn
sub_5340C0 endp



; Attributes: bp-based frame

sub_5340D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_534101
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D8D0
mov	[ebp+var_C], eax
jmp	short loc_534108

loc_534101:
mov	[ebp+var_C], 0

loc_534108:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_5340D0 endp

align 10h


; Attributes: bp-based frame

sub_534120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 15Ah
mov	esp, ebp
pop	ebp
retn
sub_534120 endp



; Attributes: bp-based frame

sub_534130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BA70
mov	esp, ebp
pop	ebp
retn
sub_534130 endp



; Attributes: bp-based frame

sub_534140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CB70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534140 endp

align 10h


; Attributes: bp-based frame

sub_534160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 15Bh
mov	esp, ebp
pop	ebp
retn
sub_534160 endp



; Attributes: bp-based frame

sub_534170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BA50
mov	esp, ebp
pop	ebp
retn
sub_534170 endp



; Attributes: bp-based frame

sub_534180 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CBD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534180 endp

align 10h


; Attributes: bp-based frame

sub_5341A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 15Ch
mov	esp, ebp
pop	ebp
retn
sub_5341A0 endp



; Attributes: bp-based frame

sub_5341B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CC30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5341B0 endp

align 10h


; Attributes: bp-based frame

sub_5341D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 15Dh
mov	esp, ebp
pop	ebp
retn
sub_5341D0 endp



; Attributes: bp-based frame

sub_5341E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BA30
mov	esp, ebp
pop	ebp
retn
sub_5341E0 endp



; Attributes: bp-based frame

sub_5341F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CC90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5341F0 endp

align 10h


; Attributes: bp-based frame

sub_534210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 15Eh
mov	esp, ebp
pop	ebp
retn
sub_534210 endp



; Attributes: bp-based frame

sub_534220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7BA10
mov	esp, ebp
pop	ebp
retn
sub_534220 endp



; Attributes: bp-based frame

sub_534230 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CCF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534230 endp

align 10h


; Attributes: bp-based frame

sub_534250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 15Fh
mov	esp, ebp
pop	ebp
retn
sub_534250 endp



; Attributes: bp-based frame

sub_534260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B9F0
mov	esp, ebp
pop	ebp
retn
sub_534260 endp



; Attributes: bp-based frame

sub_534270 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CD50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534270 endp

align 10h


; Attributes: bp-based frame

sub_534290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 160h
mov	esp, ebp
pop	ebp
retn
sub_534290 endp



; Attributes: bp-based frame

sub_5342A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7980h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5342A0 endp

align 10h


; Attributes: bp-based frame

sub_5342C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B9D0
mov	esp, ebp
pop	ebp
retn
sub_5342C0 endp



; Attributes: bp-based frame

sub_5342D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_534300
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5342F5
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5342F5:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5342D0 endp

align 10h


; Attributes: bp-based frame

sub_534300 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 38h
call	sub_10FB7C0
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_534300 endp

align 10h


; Attributes: bp-based frame

sub_534340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CDB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534340 endp

align 10h


; Attributes: bp-based frame

sub_534360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 161h
mov	esp, ebp
pop	ebp
retn
sub_534360 endp



; Attributes: bp-based frame

sub_534370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B9A0
mov	esp, ebp
pop	ebp
retn
sub_534370 endp



; Attributes: bp-based frame

sub_534380 proc	near

var_48=	dword ptr -48h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
call	sub_5343B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5343A5
mov	ecx, [ebp+var_48]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5343A5:
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn	4
sub_534380 endp

align 10h


; Attributes: bp-based frame

sub_5343B0 proc	near

var_50=	dword ptr -50h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 64h
call	sub_407E50
mov	ecx, [ebp+var_50]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_50]
add	ecx, 20h
call	sub_555350
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5343B0 endp

align 10h


; Attributes: bp-based frame

sub_5343F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CE10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5343F0 endp

align 10h


; Attributes: bp-based frame

sub_534410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 162h
mov	esp, ebp
pop	ebp
retn
sub_534410 endp



; Attributes: bp-based frame

sub_534420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B980
mov	esp, ebp
pop	ebp
retn
sub_534420 endp



; Attributes: bp-based frame

sub_534430 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CE80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534430 endp

align 10h


; Attributes: bp-based frame

sub_534450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 163h
mov	esp, ebp
pop	ebp
retn
sub_534450 endp



; Attributes: bp-based frame

sub_534460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B960
mov	esp, ebp
pop	ebp
retn
sub_534460 endp



; Attributes: bp-based frame

sub_534470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CEE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534470 endp

align 10h


; Attributes: bp-based frame

sub_534490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 164h
mov	esp, ebp
pop	ebp
retn
sub_534490 endp



; Attributes: bp-based frame

sub_5344A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B940
mov	esp, ebp
pop	ebp
retn
sub_5344A0 endp



; Attributes: bp-based frame

sub_5344B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CF40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5344B0 endp

align 10h


; Attributes: bp-based frame

sub_5344D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 165h
mov	esp, ebp
pop	ebp
retn
sub_5344D0 endp



; Attributes: bp-based frame

sub_5344E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B920
mov	esp, ebp
pop	ebp
retn
sub_5344E0 endp



; Attributes: bp-based frame

sub_5344F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55CFA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5344F0 endp

align 10h


; Attributes: bp-based frame

sub_534510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 166h
mov	esp, ebp
pop	ebp
retn
sub_534510 endp



; Attributes: bp-based frame

sub_534520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B900
mov	esp, ebp
pop	ebp
retn
sub_534520 endp



; Attributes: bp-based frame

sub_534530 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_534561
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_456390
mov	[ebp+var_C], eax
jmp	short loc_534568

loc_534561:
mov	[ebp+var_C], 0

loc_534568:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_534530 endp

align 10h


; Attributes: bp-based frame

sub_534580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 167h
mov	esp, ebp
pop	ebp
retn
sub_534580 endp



; Attributes: bp-based frame

sub_534590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B8E0
mov	esp, ebp
pop	ebp
retn
sub_534590 endp



; Attributes: bp-based frame

sub_5345A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D000
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5345A0 endp

align 10h


; Attributes: bp-based frame

sub_5345C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 168h
mov	esp, ebp
pop	ebp
retn
sub_5345C0 endp



; Attributes: bp-based frame

sub_5345D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B8C0
mov	esp, ebp
pop	ebp
retn
sub_5345D0 endp



; Attributes: bp-based frame

sub_5345E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D060
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5345E0 endp

align 10h


; Attributes: bp-based frame

sub_534600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 169h
mov	esp, ebp
pop	ebp
retn
sub_534600 endp



; Attributes: bp-based frame

sub_534610 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D0C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534610 endp

align 10h


; Attributes: bp-based frame

sub_534630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 16Ah
mov	esp, ebp
pop	ebp
retn
sub_534630 endp



; Attributes: bp-based frame

sub_534640 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D120
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534640 endp

align 10h


; Attributes: bp-based frame

sub_534660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 16Bh
mov	esp, ebp
pop	ebp
retn
sub_534660 endp



; Attributes: bp-based frame

sub_534670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B8A0
mov	esp, ebp
pop	ebp
retn
sub_534670 endp



; Attributes: bp-based frame

sub_534680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D180
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534680 endp

align 10h


; Attributes: bp-based frame

sub_5346A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 16Ch
mov	esp, ebp
pop	ebp
retn
sub_5346A0 endp



; Attributes: bp-based frame

sub_5346B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B880
mov	esp, ebp
pop	ebp
retn
sub_5346B0 endp



; Attributes: bp-based frame

sub_5346C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D1E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5346C0 endp

align 10h


; Attributes: bp-based frame

sub_5346E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 16Eh
mov	esp, ebp
pop	ebp
retn
sub_5346E0 endp



; Attributes: bp-based frame

sub_5346F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B860
mov	esp, ebp
pop	ebp
retn
sub_5346F0 endp



; Attributes: bp-based frame

sub_534700 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D240
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534700 endp

align 10h


; Attributes: bp-based frame

sub_534720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 16Fh
mov	esp, ebp
pop	ebp
retn
sub_534720 endp



; Attributes: bp-based frame

sub_534730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B840
mov	esp, ebp
pop	ebp
retn
sub_534730 endp



; Attributes: bp-based frame

sub_534740 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D2A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534740 endp

align 10h


; Attributes: bp-based frame

sub_534760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 170h
mov	esp, ebp
pop	ebp
retn
sub_534760 endp



; Attributes: bp-based frame

sub_534770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B820
mov	esp, ebp
pop	ebp
retn
sub_534770 endp



; Attributes: bp-based frame

sub_534780 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D300
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534780 endp

align 10h


; Attributes: bp-based frame

sub_5347A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 171h
mov	esp, ebp
pop	ebp
retn
sub_5347A0 endp



; Attributes: bp-based frame

sub_5347B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B7B0
mov	esp, ebp
pop	ebp
retn
sub_5347B0 endp



; Attributes: bp-based frame

sub_5347C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D360
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5347C0 endp

align 10h


; Attributes: bp-based frame

sub_5347E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 172h
mov	esp, ebp
pop	ebp
retn
sub_5347E0 endp



; Attributes: bp-based frame

sub_5347F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D3C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5347F0 endp

align 10h


; Attributes: bp-based frame

sub_534810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 173h
mov	esp, ebp
pop	ebp
retn
sub_534810 endp



; Attributes: bp-based frame

sub_534820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B790
mov	esp, ebp
pop	ebp
retn
sub_534820 endp



; Attributes: bp-based frame

sub_534830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D420
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534830 endp

align 10h


; Attributes: bp-based frame

sub_534850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 174h
mov	esp, ebp
pop	ebp
retn
sub_534850 endp



; Attributes: bp-based frame

sub_534860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B770
mov	esp, ebp
pop	ebp
retn
sub_534860 endp



; Attributes: bp-based frame

sub_534870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D480
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534870 endp

align 10h


; Attributes: bp-based frame

sub_534890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 175h
mov	esp, ebp
pop	ebp
retn
sub_534890 endp



; Attributes: bp-based frame

sub_5348A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B750
mov	esp, ebp
pop	ebp
retn
sub_5348A0 endp



; Attributes: bp-based frame

sub_5348B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D4E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5348B0 endp

align 10h


; Attributes: bp-based frame

sub_5348D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 176h
mov	esp, ebp
pop	ebp
retn
sub_5348D0 endp



; Attributes: bp-based frame

sub_5348E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B730
mov	esp, ebp
pop	ebp
retn
sub_5348E0 endp



; Attributes: bp-based frame

sub_5348F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D540
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5348F0 endp

align 10h


; Attributes: bp-based frame

sub_534910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 177h
mov	esp, ebp
pop	ebp
retn
sub_534910 endp



; Attributes: bp-based frame

sub_534920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B710
mov	esp, ebp
pop	ebp
retn
sub_534920 endp



; Attributes: bp-based frame

sub_534930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D5A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534930 endp

align 10h


; Attributes: bp-based frame

sub_534950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 178h
mov	esp, ebp
pop	ebp
retn
sub_534950 endp



; Attributes: bp-based frame

sub_534960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B6F0
mov	esp, ebp
pop	ebp
retn
sub_534960 endp



; Attributes: bp-based frame

sub_534970 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D600
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534970 endp

align 10h


; Attributes: bp-based frame

sub_534990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 17Ah
mov	esp, ebp
pop	ebp
retn
sub_534990 endp



; Attributes: bp-based frame

sub_5349A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B6D0
mov	esp, ebp
pop	ebp
retn
sub_5349A0 endp



; Attributes: bp-based frame

sub_5349B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D660
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5349B0 endp

align 10h


; Attributes: bp-based frame

sub_5349D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 17Bh
mov	esp, ebp
pop	ebp
retn
sub_5349D0 endp



; Attributes: bp-based frame

sub_5349E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B660
mov	esp, ebp
pop	ebp
retn
sub_5349E0 endp



; Attributes: bp-based frame

sub_5349F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D6C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5349F0 endp

align 10h


; Attributes: bp-based frame

sub_534A10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 17Ch
mov	esp, ebp
pop	ebp
retn
sub_534A10 endp



; Attributes: bp-based frame

sub_534A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B640
mov	esp, ebp
pop	ebp
retn
sub_534A20 endp



; Attributes: bp-based frame

sub_534A30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D720
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534A30 endp

align 10h


; Attributes: bp-based frame

sub_534A50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 17Dh
mov	esp, ebp
pop	ebp
retn
sub_534A50 endp



; Attributes: bp-based frame

sub_534A60 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 20h
call	sub_5553D0
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_534A90
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_534A90:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_534A60 endp

align 10h


; Attributes: bp-based frame

sub_534AA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D780
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534AA0 endp

align 10h


; Attributes: bp-based frame

sub_534AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 17Eh
mov	esp, ebp
pop	ebp
retn
sub_534AC0 endp



; Attributes: bp-based frame

sub_534AD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D7E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534AD0 endp

align 10h


; Attributes: bp-based frame

sub_534AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 17Fh
mov	esp, ebp
pop	ebp
retn
sub_534AF0 endp



; Attributes: bp-based frame

sub_534B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B620
mov	esp, ebp
pop	ebp
retn
sub_534B00 endp



; Attributes: bp-based frame

sub_534B10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D840
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534B10 endp

align 10h


; Attributes: bp-based frame

sub_534B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 181h
mov	esp, ebp
pop	ebp
retn
sub_534B30 endp



; Attributes: bp-based frame

sub_534B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B600
mov	esp, ebp
pop	ebp
retn
sub_534B40 endp



; Attributes: bp-based frame

sub_534B50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D8A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534B50 endp

align 10h


; Attributes: bp-based frame

sub_534B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 182h
mov	esp, ebp
pop	ebp
retn
sub_534B70 endp



; Attributes: bp-based frame

sub_534B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B5E0
mov	esp, ebp
pop	ebp
retn
sub_534B80 endp



; Attributes: bp-based frame

sub_534B90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D900
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534B90 endp

align 10h


; Attributes: bp-based frame

sub_534BB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 183h
mov	esp, ebp
pop	ebp
retn
sub_534BB0 endp



; Attributes: bp-based frame

sub_534BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B5C0
mov	esp, ebp
pop	ebp
retn
sub_534BC0 endp



; Attributes: bp-based frame

sub_534BD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D960
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534BD0 endp

align 10h


; Attributes: bp-based frame

sub_534BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 184h
mov	esp, ebp
pop	ebp
retn
sub_534BF0 endp



; Attributes: bp-based frame

sub_534C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B5A0
mov	esp, ebp
pop	ebp
retn
sub_534C00 endp



; Attributes: bp-based frame

sub_534C10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55D9C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534C10 endp

align 10h


; Attributes: bp-based frame

sub_534C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 185h
mov	esp, ebp
pop	ebp
retn
sub_534C30 endp



; Attributes: bp-based frame

sub_534C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B580
mov	esp, ebp
pop	ebp
retn
sub_534C40 endp



; Attributes: bp-based frame

sub_534C50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DA20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534C50 endp

align 10h


; Attributes: bp-based frame

sub_534C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 187h
mov	esp, ebp
pop	ebp
retn
sub_534C70 endp



; Attributes: bp-based frame

sub_534C80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DA80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534C80 endp

align 10h


; Attributes: bp-based frame

sub_534CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DAE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534CA0 endp

align 10h


; Attributes: bp-based frame

sub_534CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 189h
mov	esp, ebp
pop	ebp
retn
sub_534CC0 endp



; Attributes: bp-based frame

sub_534CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B560
mov	esp, ebp
pop	ebp
retn
sub_534CD0 endp



; Attributes: bp-based frame

sub_534CE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DB40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534CE0 endp

align 10h


; Attributes: bp-based frame

sub_534D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 18Bh
mov	esp, ebp
pop	ebp
retn
sub_534D00 endp



; Attributes: bp-based frame

sub_534D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B540
mov	esp, ebp
pop	ebp
retn
sub_534D10 endp



; Attributes: bp-based frame

sub_534D20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_42D0C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_534D43
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_534D43:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_534D20 endp

align 10h


; Attributes: bp-based frame

sub_534D50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_534D81
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D620
mov	[ebp+var_C], eax
jmp	short loc_534D88

loc_534D81:
mov	[ebp+var_C], 0

loc_534D88:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_534D50 endp

align 10h


; Attributes: bp-based frame

sub_534DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 18Ch
mov	esp, ebp
pop	ebp
retn
sub_534DA0 endp



; Attributes: bp-based frame

sub_534DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B520
mov	esp, ebp
pop	ebp
retn
sub_534DB0 endp



; Attributes: bp-based frame

sub_534DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DBA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534DC0 endp

align 10h


; Attributes: bp-based frame

sub_534DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 18Dh
mov	esp, ebp
pop	ebp
retn
sub_534DE0 endp



; Attributes: bp-based frame

sub_534DF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B500
mov	esp, ebp
pop	ebp
retn
sub_534DF0 endp



; Attributes: bp-based frame

sub_534E00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DC00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534E00 endp

align 10h


; Attributes: bp-based frame

sub_534E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 18Eh
mov	esp, ebp
pop	ebp
retn
sub_534E20 endp



; Attributes: bp-based frame

sub_534E30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B4E0
mov	esp, ebp
pop	ebp
retn
sub_534E30 endp



; Attributes: bp-based frame

sub_534E40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DC60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534E40 endp

align 10h


; Attributes: bp-based frame

sub_534E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 18Fh
mov	esp, ebp
pop	ebp
retn
sub_534E60 endp



; Attributes: bp-based frame

sub_534E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B4C0
mov	esp, ebp
pop	ebp
retn
sub_534E70 endp



; Attributes: bp-based frame

sub_534E80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DCC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534E80 endp

align 10h


; Attributes: bp-based frame

sub_534EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 191h
mov	esp, ebp
pop	ebp
retn
sub_534EA0 endp



; Attributes: bp-based frame

sub_534EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B4A0
mov	esp, ebp
pop	ebp
retn
sub_534EB0 endp



; Attributes: bp-based frame

sub_534EC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DD20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534EC0 endp

align 10h


; Attributes: bp-based frame

sub_534EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 192h
mov	esp, ebp
pop	ebp
retn
sub_534EE0 endp



; Attributes: bp-based frame

sub_534EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B480
mov	esp, ebp
pop	ebp
retn
sub_534EF0 endp



; Attributes: bp-based frame

sub_534F00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DD80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534F00 endp

align 10h


; Attributes: bp-based frame

sub_534F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 193h
mov	esp, ebp
pop	ebp
retn
sub_534F20 endp



; Attributes: bp-based frame

sub_534F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B460
mov	esp, ebp
pop	ebp
retn
sub_534F30 endp



; Attributes: bp-based frame

sub_534F40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DDE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534F40 endp

align 10h


; Attributes: bp-based frame

sub_534F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 194h
mov	esp, ebp
pop	ebp
retn
sub_534F60 endp



; Attributes: bp-based frame

sub_534F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_534F70 endp

align 10h


; Attributes: bp-based frame

sub_534F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B440
mov	esp, ebp
pop	ebp
retn
sub_534F90 endp



; Attributes: bp-based frame

sub_534FA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DE40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534FA0 endp

align 10h


; Attributes: bp-based frame

sub_534FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 195h
mov	esp, ebp
pop	ebp
retn
sub_534FC0 endp



; Attributes: bp-based frame

sub_534FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B3D0
mov	esp, ebp
pop	ebp
retn
sub_534FD0 endp



; Attributes: bp-based frame

sub_534FE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DEA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_534FE0 endp

align 10h


; Attributes: bp-based frame

sub_535000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 196h
mov	esp, ebp
pop	ebp
retn
sub_535000 endp



; Attributes: bp-based frame

sub_535010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B360
mov	esp, ebp
pop	ebp
retn
sub_535010 endp



; Attributes: bp-based frame

sub_535020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DF00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535020 endp

align 10h


; Attributes: bp-based frame

sub_535040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 197h
mov	esp, ebp
pop	ebp
retn
sub_535040 endp



; Attributes: bp-based frame

sub_535050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B2F0
mov	esp, ebp
pop	ebp
retn
sub_535050 endp



; Attributes: bp-based frame

sub_535060 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DF60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535060 endp

align 10h


; Attributes: bp-based frame

sub_535080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B2D0
mov	esp, ebp
pop	ebp
retn
sub_535080 endp



; Attributes: bp-based frame

sub_535090 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55DFC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535090 endp

align 10h


; Attributes: bp-based frame

sub_5350B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 199h
mov	esp, ebp
pop	ebp
retn
sub_5350B0 endp



; Attributes: bp-based frame

sub_5350C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B2B0
mov	esp, ebp
pop	ebp
retn
sub_5350C0 endp



; Attributes: bp-based frame

sub_5350D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E020
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5350D0 endp

align 10h


; Attributes: bp-based frame

sub_5350F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 19Ah
mov	esp, ebp
pop	ebp
retn
sub_5350F0 endp



; Attributes: bp-based frame

sub_535100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B290
mov	esp, ebp
pop	ebp
retn
sub_535100 endp



; Attributes: bp-based frame

sub_535110 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E080
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535110 endp

align 10h


; Attributes: bp-based frame

sub_535130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 19Bh
mov	esp, ebp
pop	ebp
retn
sub_535130 endp



; Attributes: bp-based frame

sub_535140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B270
mov	esp, ebp
pop	ebp
retn
sub_535140 endp



; Attributes: bp-based frame

sub_535150 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E0E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535150 endp

align 10h


; Attributes: bp-based frame

sub_535170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 19Ch
mov	esp, ebp
pop	ebp
retn
sub_535170 endp



; Attributes: bp-based frame

sub_535180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B250
mov	esp, ebp
pop	ebp
retn
sub_535180 endp



; Attributes: bp-based frame

sub_535190 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E140
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535190 endp

align 10h


; Attributes: bp-based frame

sub_5351B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 19Dh
mov	esp, ebp
pop	ebp
retn
sub_5351B0 endp



; Attributes: bp-based frame

sub_5351C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B230
mov	esp, ebp
pop	ebp
retn
sub_5351C0 endp



; Attributes: bp-based frame

sub_5351D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E1A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5351D0 endp

align 10h


; Attributes: bp-based frame

sub_5351F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 19Eh
mov	esp, ebp
pop	ebp
retn
sub_5351F0 endp



; Attributes: bp-based frame

sub_535200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B210
mov	esp, ebp
pop	ebp
retn
sub_535200 endp



; Attributes: bp-based frame

sub_535210 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E200
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535210 endp

align 10h


; Attributes: bp-based frame

sub_535230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 19Fh
mov	esp, ebp
pop	ebp
retn
sub_535230 endp



; Attributes: bp-based frame

sub_535240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B1F0
mov	esp, ebp
pop	ebp
retn
sub_535240 endp



; Attributes: bp-based frame

sub_535250 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E260
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535250 endp

align 10h


; Attributes: bp-based frame

sub_535270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B180
mov	esp, ebp
pop	ebp
retn
sub_535270 endp



; Attributes: bp-based frame

sub_535280 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433610
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 24h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5352FD
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5352FD:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_535280 endp



; Attributes: bp-based frame

sub_535310 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E2C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535310 endp

align 10h


; Attributes: bp-based frame

sub_535330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A1h
mov	esp, ebp
pop	ebp
retn
sub_535330 endp



; Attributes: bp-based frame

sub_535340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E320
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535340 endp

align 10h


; Attributes: bp-based frame

sub_535360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A2h
mov	esp, ebp
pop	ebp
retn
sub_535360 endp



; Attributes: bp-based frame

sub_535370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B160
mov	esp, ebp
pop	ebp
retn
sub_535370 endp



; Attributes: bp-based frame

sub_535380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E380
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535380 endp

align 10h


; Attributes: bp-based frame

sub_5353A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A3h
mov	esp, ebp
pop	ebp
retn
sub_5353A0 endp



; Attributes: bp-based frame

sub_5353B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B140
mov	esp, ebp
pop	ebp
retn
sub_5353B0 endp



; Attributes: bp-based frame

sub_5353C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E3E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5353C0 endp

align 10h


; Attributes: bp-based frame

sub_5353E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B0F0
mov	esp, ebp
pop	ebp
retn
sub_5353E0 endp



; Attributes: bp-based frame

sub_5353F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E440
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5353F0 endp

align 10h


; Attributes: bp-based frame

sub_535410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A5h
mov	esp, ebp
pop	ebp
retn
sub_535410 endp



; Attributes: bp-based frame

sub_535420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B0A0
mov	esp, ebp
pop	ebp
retn
sub_535420 endp



; Attributes: bp-based frame

sub_535430 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E4A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535430 endp

align 10h


; Attributes: bp-based frame

sub_535450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A6h
mov	esp, ebp
pop	ebp
retn
sub_535450 endp



; Attributes: bp-based frame

sub_535460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B080
mov	esp, ebp
pop	ebp
retn
sub_535460 endp



; Attributes: bp-based frame

sub_535470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E500
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535470 endp

align 10h


; Attributes: bp-based frame

sub_535490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A7h
mov	esp, ebp
pop	ebp
retn
sub_535490 endp



; Attributes: bp-based frame

sub_5354A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7B030
mov	esp, ebp
pop	ebp
retn
sub_5354A0 endp



; Attributes: bp-based frame

sub_5354B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E560
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5354B0 endp

align 10h


; Attributes: bp-based frame

sub_5354D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A8h
mov	esp, ebp
pop	ebp
retn
sub_5354D0 endp



; Attributes: bp-based frame

sub_5354E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AFE0
mov	esp, ebp
pop	ebp
retn
sub_5354E0 endp



; Attributes: bp-based frame

sub_5354F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E5C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5354F0 endp

align 10h


; Attributes: bp-based frame

sub_535510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A9h
mov	esp, ebp
pop	ebp
retn
sub_535510 endp



; Attributes: bp-based frame

sub_535520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AFC0
mov	esp, ebp
pop	ebp
retn
sub_535520 endp



; Attributes: bp-based frame

sub_535530 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E620
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535530 endp

align 10h


; Attributes: bp-based frame

sub_535550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1AAh
mov	esp, ebp
pop	ebp
retn
sub_535550 endp



; Attributes: bp-based frame

sub_535560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AFA0
mov	esp, ebp
pop	ebp
retn
sub_535560 endp



; Attributes: bp-based frame

sub_535570 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E680
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535570 endp

align 10h


; Attributes: bp-based frame

sub_535590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1ABh
mov	esp, ebp
pop	ebp
retn
sub_535590 endp



; Attributes: bp-based frame

sub_5355A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AF80
mov	esp, ebp
pop	ebp
retn
sub_5355A0 endp



; Attributes: bp-based frame

sub_5355B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E6E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5355B0 endp

align 10h


; Attributes: bp-based frame

sub_5355D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1ACh
mov	esp, ebp
pop	ebp
retn
sub_5355D0 endp



; Attributes: bp-based frame

sub_5355E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AF60
mov	esp, ebp
pop	ebp
retn
sub_5355E0 endp



; Attributes: bp-based frame

sub_5355F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E740
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5355F0 endp

align 10h


; Attributes: bp-based frame

sub_535610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1ADh
mov	esp, ebp
pop	ebp
retn
sub_535610 endp



; Attributes: bp-based frame

sub_535620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AF40
mov	esp, ebp
pop	ebp
retn
sub_535620 endp



; Attributes: bp-based frame

sub_535630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E7A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535630 endp

align 10h


; Attributes: bp-based frame

sub_535650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1AEh
mov	esp, ebp
pop	ebp
retn
sub_535650 endp



; Attributes: bp-based frame

sub_535660 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E800
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535660 endp

align 10h


; Attributes: bp-based frame

sub_535680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1AFh
mov	esp, ebp
pop	ebp
retn
sub_535680 endp



; Attributes: bp-based frame

sub_535690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AF20
mov	esp, ebp
pop	ebp
retn
sub_535690 endp



; Attributes: bp-based frame

sub_5356A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E860
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5356A0 endp

align 10h


; Attributes: bp-based frame

sub_5356C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B0h
mov	esp, ebp
pop	ebp
retn
sub_5356C0 endp



; Attributes: bp-based frame

sub_5356D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AF00
mov	esp, ebp
pop	ebp
retn
sub_5356D0 endp



; Attributes: bp-based frame

sub_5356E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E8C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5356E0 endp

align 10h


; Attributes: bp-based frame

sub_535700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B2h
mov	esp, ebp
pop	ebp
retn
sub_535700 endp



; Attributes: bp-based frame

sub_535710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AEE0
mov	esp, ebp
pop	ebp
retn
sub_535710 endp



; Attributes: bp-based frame

sub_535720 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E920
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535720 endp

align 10h


; Attributes: bp-based frame

sub_535740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp

loc_535743:
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B3h
mov	esp, ebp
pop	ebp
retn
sub_535740 endp



; Attributes: bp-based frame

sub_535750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AEC0
mov	esp, ebp
pop	ebp
retn
sub_535750 endp



; Attributes: bp-based frame

sub_535760 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E980
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535760 endp

align 10h


; Attributes: bp-based frame

sub_535780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B4h
mov	esp, ebp
pop	ebp
retn
sub_535780 endp



; Attributes: bp-based frame

sub_535790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AEA0
mov	esp, ebp
pop	ebp
retn
sub_535790 endp



; Attributes: bp-based frame

sub_5357A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55E9E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5357A0 endp

align 10h


; Attributes: bp-based frame

sub_5357C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B5h
mov	esp, ebp
pop	ebp
retn
sub_5357C0 endp



; Attributes: bp-based frame

sub_5357D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AE80
mov	esp, ebp
pop	ebp
retn
sub_5357D0 endp



; Attributes: bp-based frame

sub_5357E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EA40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5357E0 endp

align 10h


; Attributes: bp-based frame

sub_535800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B6h
mov	esp, ebp
pop	ebp
retn
sub_535800 endp



; Attributes: bp-based frame

sub_535810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AE60
mov	esp, ebp
pop	ebp
retn
sub_535810 endp



; Attributes: bp-based frame

sub_535820 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EAA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535820 endp

align 10h


; Attributes: bp-based frame

sub_535840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B7h
mov	esp, ebp
pop	ebp
retn
sub_535840 endp



; Attributes: bp-based frame

sub_535850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AE40
mov	esp, ebp
pop	ebp
retn
sub_535850 endp



; Attributes: bp-based frame

sub_535860 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EB00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535860 endp

align 10h


; Attributes: bp-based frame

sub_535880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B8h
mov	esp, ebp
pop	ebp
retn
sub_535880 endp



; Attributes: bp-based frame

sub_535890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AE20
mov	esp, ebp
pop	ebp
retn
sub_535890 endp



; Attributes: bp-based frame

sub_5358A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EB60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5358A0 endp

align 10h


; Attributes: bp-based frame

sub_5358C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1B9h
mov	esp, ebp
pop	ebp
retn
sub_5358C0 endp



; Attributes: bp-based frame

sub_5358D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AE00
mov	esp, ebp
pop	ebp
retn
sub_5358D0 endp



; Attributes: bp-based frame

sub_5358E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EBC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5358E0 endp

align 10h


; Attributes: bp-based frame

sub_535900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1BBh
mov	esp, ebp
pop	ebp
retn
sub_535900 endp



; Attributes: bp-based frame

sub_535910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7ADE0
mov	esp, ebp
pop	ebp
retn
sub_535910 endp



; Attributes: bp-based frame

sub_535920 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EC20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535920 endp

align 10h


; Attributes: bp-based frame

sub_535940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1BCh
mov	esp, ebp
pop	ebp
retn
sub_535940 endp



; Attributes: bp-based frame

sub_535950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AD90
mov	esp, ebp
pop	ebp
retn
sub_535950 endp



; Attributes: bp-based frame

sub_535960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53598E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53598E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_535960 endp

align 10h


; Attributes: bp-based frame

sub_5359A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EC80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5359A0 endp

align 10h


; Attributes: bp-based frame

sub_5359C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1BDh
mov	esp, ebp
pop	ebp
retn
sub_5359C0 endp



; Attributes: bp-based frame

sub_5359D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55ECE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5359D0 endp

align 10h


; Attributes: bp-based frame

sub_5359F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1BEh
mov	esp, ebp
pop	ebp
retn
sub_5359F0 endp



; Attributes: bp-based frame

sub_535A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AD70
mov	esp, ebp
pop	ebp
retn
sub_535A00 endp



; Attributes: bp-based frame

sub_535A10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_535A49
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_535A49:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_535A10 endp

align 10h


; Attributes: bp-based frame

sub_535A60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55ED40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535A60 endp

align 10h


; Attributes: bp-based frame

sub_535A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1BFh
mov	esp, ebp
pop	ebp
retn
sub_535A80 endp



; Attributes: bp-based frame

sub_535A90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EDA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535A90 endp

align 10h


; Attributes: bp-based frame

sub_535AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C0h
mov	esp, ebp
pop	ebp
retn
sub_535AB0 endp



; Attributes: bp-based frame

sub_535AC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6642h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_535AC0 endp

align 10h


; Attributes: bp-based frame

sub_535AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AD50
mov	esp, ebp
pop	ebp
retn
sub_535AE0 endp



; Attributes: bp-based frame

sub_535AF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EE00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535AF0 endp

align 10h


; Attributes: bp-based frame

sub_535B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C1h
mov	esp, ebp
pop	ebp
retn
sub_535B10 endp



; Attributes: bp-based frame

sub_535B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AD30
mov	esp, ebp
pop	ebp
retn
sub_535B20 endp



; Attributes: bp-based frame

sub_535B30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EE70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535B30 endp

align 10h


; Attributes: bp-based frame

sub_535B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C2h
mov	esp, ebp
pop	ebp
retn
sub_535B50 endp



; Attributes: bp-based frame

sub_535B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AD10
mov	esp, ebp
pop	ebp
retn
sub_535B60 endp



; Attributes: bp-based frame

sub_535B70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EEE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535B70 endp

align 10h


; Attributes: bp-based frame

sub_535B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C3h
mov	esp, ebp
pop	ebp
retn
sub_535B90 endp



; Attributes: bp-based frame

sub_535BA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EF40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535BA0 endp

align 10h


; Attributes: bp-based frame

sub_535BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C4h
mov	esp, ebp
pop	ebp
retn
sub_535BC0 endp



; Attributes: bp-based frame

sub_535BD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55EFA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535BD0 endp

align 10h


; Attributes: bp-based frame

sub_535BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C5h
mov	esp, ebp
pop	ebp
retn
sub_535BF0 endp



; Attributes: bp-based frame

sub_535C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7ACF0
mov	esp, ebp
pop	ebp
retn
sub_535C00 endp



; Attributes: bp-based frame

sub_535C10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F000
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535C10 endp

align 10h


; Attributes: bp-based frame

sub_535C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C6h
mov	esp, ebp
pop	ebp
retn
sub_535C30 endp



; Attributes: bp-based frame

sub_535C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7ACD0
mov	esp, ebp
pop	ebp
retn
sub_535C40 endp



; Attributes: bp-based frame

sub_535C50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F060
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535C50 endp

align 10h


; Attributes: bp-based frame

sub_535C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C7h
mov	esp, ebp
pop	ebp
retn
sub_535C70 endp



; Attributes: bp-based frame

sub_535C80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F0F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535C80 endp

align 10h


; Attributes: bp-based frame

sub_535CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C9h
mov	esp, ebp
pop	ebp
retn
sub_535CA0 endp



; Attributes: bp-based frame

sub_535CB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7ACB0
mov	esp, ebp
pop	ebp
retn
sub_535CB0 endp



; Attributes: bp-based frame

sub_535CC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 4Ch
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_535CEE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_535CEE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_535CC0 endp

align 10h


; Attributes: bp-based frame

sub_535D00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F150
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535D00 endp

align 10h


; Attributes: bp-based frame

sub_535D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1CAh
mov	esp, ebp
pop	ebp
retn
sub_535D20 endp



; Attributes: bp-based frame

sub_535D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AC90
mov	esp, ebp
pop	ebp
retn
sub_535D30 endp



; Attributes: bp-based frame

sub_535D40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_535D6E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_535D6E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_535D40 endp

align 10h


; Attributes: bp-based frame

sub_535D80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F1C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535D80 endp

align 10h


; Attributes: bp-based frame

sub_535DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1CBh
mov	esp, ebp
pop	ebp
retn
sub_535DA0 endp



; Attributes: bp-based frame

sub_535DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AC70
mov	esp, ebp
pop	ebp
retn
sub_535DB0 endp



; Attributes: bp-based frame

sub_535DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535DC0 endp

align 10h


; Attributes: bp-based frame

sub_535DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1CCh
mov	esp, ebp
pop	ebp
retn
sub_535DE0 endp



; Attributes: bp-based frame

sub_535DF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AC50
mov	esp, ebp
pop	ebp
retn
sub_535DF0 endp



; Attributes: bp-based frame

sub_535E00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535E00 endp

align 10h


; Attributes: bp-based frame

sub_535E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1CDh
mov	esp, ebp
pop	ebp
retn
sub_535E20 endp



; Attributes: bp-based frame

sub_535E30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F2E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535E30 endp

align 10h


; Attributes: bp-based frame

sub_535E50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1CEh
mov	esp, ebp
pop	ebp
retn
sub_535E50 endp



; Attributes: bp-based frame

sub_535E60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535E60 endp

align 10h


; Attributes: bp-based frame

sub_535E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1CFh
mov	esp, ebp
pop	ebp
retn
sub_535E80 endp



; Attributes: bp-based frame

sub_535E90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AC30
mov	esp, ebp
pop	ebp
retn
sub_535E90 endp



; Attributes: bp-based frame

sub_535EA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F3A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535EA0 endp

align 10h


; Attributes: bp-based frame

sub_535EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D0h
mov	esp, ebp
pop	ebp
retn
sub_535EC0 endp



; Attributes: bp-based frame

sub_535ED0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AC10
mov	esp, ebp
pop	ebp
retn
sub_535ED0 endp



; Attributes: bp-based frame

sub_535EE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535EE0 endp

align 10h


; Attributes: bp-based frame

sub_535F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D2h
mov	esp, ebp
pop	ebp
retn
sub_535F00 endp



; Attributes: bp-based frame

sub_535F10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7ABF0
mov	esp, ebp
pop	ebp
retn
sub_535F10 endp



; Attributes: bp-based frame

sub_535F20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535F20 endp

align 10h


; Attributes: bp-based frame

sub_535F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D3h
mov	esp, ebp
pop	ebp
retn
sub_535F40 endp



; Attributes: bp-based frame

sub_535F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7ABD0
mov	esp, ebp
pop	ebp
retn
sub_535F50 endp



; Attributes: bp-based frame

sub_535F60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F4C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535F60 endp

align 10h


; Attributes: bp-based frame

sub_535F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D4h
mov	esp, ebp
pop	ebp
retn
sub_535F80 endp



; Attributes: bp-based frame

sub_535F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7ABB0
mov	esp, ebp
pop	ebp
retn
sub_535F90 endp



; Attributes: bp-based frame

sub_535FA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535FA0 endp

align 10h


; Attributes: bp-based frame

sub_535FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D5h
mov	esp, ebp
pop	ebp
retn
sub_535FC0 endp



; Attributes: bp-based frame

sub_535FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AB90
mov	esp, ebp
pop	ebp
retn
sub_535FD0 endp



; Attributes: bp-based frame

sub_535FE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F580
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_535FE0 endp

align 10h


; Attributes: bp-based frame

sub_536000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D6h
mov	esp, ebp
pop	ebp
retn
sub_536000 endp



; Attributes: bp-based frame

sub_536010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AB70
mov	esp, ebp
pop	ebp
retn
sub_536010 endp



; Attributes: bp-based frame

sub_536020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F5E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536020 endp

align 10h


; Attributes: bp-based frame

sub_536040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D7h
mov	esp, ebp
pop	ebp
retn
sub_536040 endp



; Attributes: bp-based frame

sub_536050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AB50
mov	esp, ebp
pop	ebp
retn
sub_536050 endp



; Attributes: bp-based frame

sub_536060 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F640
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536060 endp

align 10h


; Attributes: bp-based frame

sub_536080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AB30
mov	esp, ebp
pop	ebp
retn
sub_536080 endp



; Attributes: bp-based frame

sub_536090 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5360C1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D890
mov	[ebp+var_C], eax
jmp	short loc_5360C8

loc_5360C1:
mov	[ebp+var_C], 0

loc_5360C8:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_536090 endp

align 10h


; Attributes: bp-based frame

sub_5360E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D9h
mov	esp, ebp
pop	ebp
retn
sub_5360E0 endp



; Attributes: bp-based frame

sub_5360F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AB10
mov	esp, ebp
pop	ebp
retn
sub_5360F0 endp



; Attributes: bp-based frame

sub_536100 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_536131
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D850
mov	[ebp+var_C], eax
jmp	short loc_536138

loc_536131:
mov	[ebp+var_C], 0

loc_536138:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_536100 endp

align 10h


; Attributes: bp-based frame

sub_536150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1DAh
mov	esp, ebp
pop	ebp
retn
sub_536150 endp



; Attributes: bp-based frame

sub_536160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AAF0
mov	esp, ebp
pop	ebp
retn
sub_536160 endp



; Attributes: bp-based frame

sub_536170 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F6A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536170 endp

align 10h


; Attributes: bp-based frame

sub_536190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1DBh
mov	esp, ebp
pop	ebp
retn
sub_536190 endp



; Attributes: bp-based frame

sub_5361A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AAD0
mov	esp, ebp
pop	ebp
retn
sub_5361A0 endp



; Attributes: bp-based frame

sub_5361B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F700
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5361B0 endp

align 10h


; Attributes: bp-based frame

sub_5361D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1DCh
mov	esp, ebp
pop	ebp
retn
sub_5361D0 endp



; Attributes: bp-based frame

sub_5361E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AAB0
mov	esp, ebp
pop	ebp
retn
sub_5361E0 endp



; Attributes: bp-based frame

sub_5361F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F760
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5361F0 endp

align 10h


; Attributes: bp-based frame

sub_536210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1DDh
mov	esp, ebp
pop	ebp
retn
sub_536210 endp



; Attributes: bp-based frame

sub_536220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AA90
mov	esp, ebp
pop	ebp
retn
sub_536220 endp



; Attributes: bp-based frame

sub_536230 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F7C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536230 endp

align 10h


; Attributes: bp-based frame

sub_536250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1DEh
mov	esp, ebp
pop	ebp
retn
sub_536250 endp



; Attributes: bp-based frame

sub_536260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AA70
mov	esp, ebp
pop	ebp
retn
sub_536260 endp



; Attributes: bp-based frame

sub_536270 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F820
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536270 endp

align 10h


; Attributes: bp-based frame

sub_536290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1DFh
mov	esp, ebp
pop	ebp
retn
sub_536290 endp



; Attributes: bp-based frame

sub_5362A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AA50
mov	esp, ebp
pop	ebp
retn
sub_5362A0 endp



; Attributes: bp-based frame

sub_5362B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F880
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5362B0 endp

align 10h


; Attributes: bp-based frame

sub_5362D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E0h
mov	esp, ebp
pop	ebp
retn
sub_5362D0 endp



; Attributes: bp-based frame

sub_5362E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7AA00
mov	esp, ebp
pop	ebp
retn
sub_5362E0 endp



; Attributes: bp-based frame

sub_5362F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F8E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5362F0 endp

align 10h


; Attributes: bp-based frame

sub_536310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E1h
mov	esp, ebp
pop	ebp
retn
sub_536310 endp



; Attributes: bp-based frame

sub_536320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A9E0
mov	esp, ebp
pop	ebp
retn
sub_536320 endp



; Attributes: bp-based frame

sub_536330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F940
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536330 endp

align 10h


; Attributes: bp-based frame

sub_536350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E2h
mov	esp, ebp
pop	ebp
retn
sub_536350 endp



; Attributes: bp-based frame

sub_536360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A990
mov	esp, ebp
pop	ebp
retn
sub_536360 endp



; Attributes: bp-based frame

sub_536370 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55F9A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536370 endp

align 10h


; Attributes: bp-based frame

sub_536390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E3h
mov	esp, ebp
pop	ebp
retn
sub_536390 endp



; Attributes: bp-based frame

sub_5363A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A970
mov	esp, ebp
pop	ebp
retn
sub_5363A0 endp



; Attributes: bp-based frame

sub_5363B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FA00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5363B0 endp

align 10h


; Attributes: bp-based frame

sub_5363D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E4h
mov	esp, ebp
pop	ebp
retn
sub_5363D0 endp



; Attributes: bp-based frame

sub_5363E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A950
mov	esp, ebp
pop	ebp
retn
sub_5363E0 endp



; Attributes: bp-based frame

sub_5363F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FA60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5363F0 endp

align 10h


; Attributes: bp-based frame

sub_536410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E5h
mov	esp, ebp
pop	ebp
retn
sub_536410 endp



; Attributes: bp-based frame

sub_536420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A930
mov	esp, ebp
pop	ebp
retn
sub_536420 endp



; Attributes: bp-based frame

sub_536430 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FAC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536430 endp

align 10h


; Attributes: bp-based frame

sub_536450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E6h
mov	esp, ebp
pop	ebp
retn
sub_536450 endp



; Attributes: bp-based frame

sub_536460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A910
mov	esp, ebp
pop	ebp
retn
sub_536460 endp



; Attributes: bp-based frame

sub_536470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FB20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536470 endp

align 10h


; Attributes: bp-based frame

sub_536490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E7h
mov	esp, ebp
pop	ebp
retn
sub_536490 endp



; Attributes: bp-based frame

sub_5364A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A8F0
mov	esp, ebp
pop	ebp
retn
sub_5364A0 endp



; Attributes: bp-based frame

sub_5364B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FB80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5364B0 endp

align 10h


; Attributes: bp-based frame

sub_5364D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E8h
mov	esp, ebp
pop	ebp
retn
sub_5364D0 endp



; Attributes: bp-based frame

sub_5364E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A8D0
mov	esp, ebp
pop	ebp
retn
sub_5364E0 endp



; Attributes: bp-based frame

sub_5364F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FBE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5364F0 endp

align 10h


; Attributes: bp-based frame

sub_536510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1E9h
mov	esp, ebp
pop	ebp
retn
sub_536510 endp



; Attributes: bp-based frame

sub_536520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A8B0
mov	esp, ebp
pop	ebp
retn
sub_536520 endp



; Attributes: bp-based frame

sub_536530 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FC40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536530 endp

align 10h


; Attributes: bp-based frame

sub_536550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1EAh
mov	esp, ebp
pop	ebp
retn
sub_536550 endp



; Attributes: bp-based frame

sub_536560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A890
mov	esp, ebp
pop	ebp
retn
sub_536560 endp



; Attributes: bp-based frame

sub_536570 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_46B570
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53659E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53659E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_536570 endp

align 10h


; Attributes: bp-based frame

sub_5365B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FCA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5365B0 endp

align 10h


; Attributes: bp-based frame

sub_5365D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1EBh
mov	esp, ebp
pop	ebp
retn
sub_5365D0 endp



; Attributes: bp-based frame

sub_5365E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A860
mov	esp, ebp
pop	ebp
retn
sub_5365E0 endp



; Attributes: bp-based frame

sub_5365F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FD00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5365F0 endp

align 10h


; Attributes: bp-based frame

sub_536610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1ECh
mov	esp, ebp
pop	ebp
retn
sub_536610 endp



; Attributes: bp-based frame

sub_536620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A840
mov	esp, ebp
pop	ebp
retn
sub_536620 endp



; Attributes: bp-based frame

sub_536630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FD60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536630 endp

align 10h


; Attributes: bp-based frame

sub_536650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1EDh
mov	esp, ebp
pop	ebp
retn
sub_536650 endp



; Attributes: bp-based frame

sub_536660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A820
mov	esp, ebp
pop	ebp
retn
sub_536660 endp



; Attributes: bp-based frame

sub_536670 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FDC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536670 endp

align 10h


; Attributes: bp-based frame

sub_536690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1EEh
mov	esp, ebp
pop	ebp
retn
sub_536690 endp



; Attributes: bp-based frame

sub_5366A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A800
mov	esp, ebp
pop	ebp
retn
sub_5366A0 endp



; Attributes: bp-based frame

sub_5366B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FE20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5366B0 endp

align 10h


; Attributes: bp-based frame

sub_5366D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1EFh
mov	esp, ebp
pop	ebp
retn
sub_5366D0 endp



; Attributes: bp-based frame

sub_5366E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A7E0
mov	esp, ebp
pop	ebp
retn
sub_5366E0 endp



; Attributes: bp-based frame

sub_5366F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_536729
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_536729:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5366F0 endp

align 10h


; Attributes: bp-based frame

sub_536740 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FE80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536740 endp

align 10h


; Attributes: bp-based frame

sub_536760 proc	near

var_AC=	dword ptr -0ACh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_5367A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_536791
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_536791:
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn	4
sub_536760 endp

align 10h


; Attributes: bp-based frame

sub_5367A0 proc	near

var_F4=	dword ptr -0F4h

push	ebp
mov	ebp, esp
sub	esp, 0F4h
mov	[ebp+var_F4], ecx
mov	ecx, [ebp+var_F4]
add	ecx, 3C8h
call	sub_407910
mov	ecx, [ebp+var_F4]
add	ecx, 3B0h
call	sub_407910
mov	ecx, [ebp+var_F4]
add	ecx, 3A4h
call	sub_437300
mov	ecx, [ebp+var_F4]
add	ecx, 398h
call	sub_437300
mov	ecx, [ebp+var_F4]
add	ecx, 38Ch
call	sub_437300
mov	ecx, [ebp+var_F4]
add	ecx, 380h
call	sub_437300
mov	ecx, [ebp+var_F4]
add	ecx, 374h
call	sub_437300
mov	ecx, [ebp+var_F4]
add	ecx, 34Ch
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 324h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 2FCh
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 2D4h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 2ACh
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 284h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 25Ch
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 234h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 20Ch
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 1E4h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 1BCh
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 194h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 16Ch
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 144h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 11Ch
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 110h
call	sub_468AA0
mov	ecx, [ebp+var_F4]
add	ecx, 104h
call	sub_436CF0
mov	ecx, [ebp+var_F4]
add	ecx, 0F8h
call	sub_436CF0
mov	ecx, [ebp+var_F4]
add	ecx, 0ECh
call	sub_436CF0
mov	ecx, [ebp+var_F4]
add	ecx, 0E0h
call	sub_436CF0
mov	ecx, [ebp+var_F4]
add	ecx, 9Ch
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 74h
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 4Ch
call	sub_407E50
mov	ecx, [ebp+var_F4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_F4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5367A0 endp

align 10h


; Attributes: bp-based frame

sub_5369D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FEE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5369D0 endp

align 10h


; Attributes: bp-based frame

sub_5369F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F1h
mov	esp, ebp
pop	ebp
retn
sub_5369F0 endp



; Attributes: bp-based frame

sub_536A00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FF50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536A00 endp

align 10h


; Attributes: bp-based frame

sub_536A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F2h
mov	esp, ebp
pop	ebp
retn
sub_536A20 endp



; Attributes: bp-based frame

sub_536A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A7C0
mov	esp, ebp
pop	ebp
retn
sub_536A30 endp



; Attributes: bp-based frame

sub_536A40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_55FFB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536A40 endp

align 10h


; Attributes: bp-based frame

sub_536A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F3h
mov	esp, ebp
pop	ebp
retn
sub_536A60 endp



; Attributes: bp-based frame

sub_536A70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A7A0
mov	esp, ebp
pop	ebp
retn
sub_536A70 endp



; Attributes: bp-based frame

sub_536A80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560010
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536A80 endp

align 10h


; Attributes: bp-based frame

sub_536AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F4h
mov	esp, ebp
pop	ebp
retn
sub_536AA0 endp



; Attributes: bp-based frame

sub_536AB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560070
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536AB0 endp

align 10h


; Attributes: bp-based frame

sub_536AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F5h
mov	esp, ebp
pop	ebp
retn
sub_536AD0 endp



; Attributes: bp-based frame

sub_536AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A780
mov	esp, ebp
pop	ebp
retn
sub_536AE0 endp



; Attributes: bp-based frame

sub_536AF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5600D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536AF0 endp

align 10h


; Attributes: bp-based frame

sub_536B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F6h
mov	esp, ebp
pop	ebp
retn
sub_536B10 endp



; Attributes: bp-based frame

sub_536B20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560130
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536B20 endp

align 10h


; Attributes: bp-based frame

sub_536B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F7h
mov	esp, ebp
pop	ebp
retn
sub_536B40 endp



; Attributes: bp-based frame

sub_536B50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560190
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536B50 endp

align 10h


; Attributes: bp-based frame

sub_536B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F8h
mov	esp, ebp
pop	ebp
retn
sub_536B70 endp



; Attributes: bp-based frame

sub_536B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A760
mov	esp, ebp
pop	ebp
retn
sub_536B80 endp



; Attributes: bp-based frame

sub_536B90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5601F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536B90 endp

align 10h


; Attributes: bp-based frame

sub_536BB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F9h
mov	esp, ebp
pop	ebp
retn
sub_536BB0 endp



; Attributes: bp-based frame

sub_536BC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2F42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_536BC0 endp

align 10h


; Attributes: bp-based frame

sub_536BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A740
mov	esp, ebp
pop	ebp
retn
sub_536BE0 endp



; Attributes: bp-based frame

sub_536BF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560250
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536BF0 endp

align 10h


; Attributes: bp-based frame

sub_536C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1FAh
mov	esp, ebp
pop	ebp
retn
sub_536C10 endp



; Attributes: bp-based frame

sub_536C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A720
mov	esp, ebp
pop	ebp
retn
sub_536C20 endp



; Attributes: bp-based frame

sub_536C30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5602B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536C30 endp

align 10h


; Attributes: bp-based frame

sub_536C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1FBh
mov	esp, ebp
pop	ebp
retn
sub_536C50 endp



; Attributes: bp-based frame

sub_536C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A700
mov	esp, ebp
pop	ebp
retn
sub_536C60 endp



; Attributes: bp-based frame

sub_536C70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560310
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536C70 endp

align 10h


; Attributes: bp-based frame

sub_536C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1FCh
mov	esp, ebp
pop	ebp
retn
sub_536C90 endp



; Attributes: bp-based frame

sub_536CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A6E0
mov	esp, ebp
pop	ebp
retn
sub_536CA0 endp



; Attributes: bp-based frame

sub_536CB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560370
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536CB0 endp

align 10h


; Attributes: bp-based frame

sub_536CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1FDh
mov	esp, ebp
pop	ebp
retn
sub_536CD0 endp



; Attributes: bp-based frame

sub_536CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A670
mov	esp, ebp
pop	ebp
retn
sub_536CE0 endp



; Attributes: bp-based frame

sub_536CF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5603D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536CF0 endp

align 10h


; Attributes: bp-based frame

sub_536D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1FEh
mov	esp, ebp
pop	ebp
retn
sub_536D10 endp



; Attributes: bp-based frame

sub_536D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A650
mov	esp, ebp
pop	ebp
retn
sub_536D20 endp



; Attributes: bp-based frame

sub_536D30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560430
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536D30 endp

align 10h


; Attributes: bp-based frame

sub_536D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1FFh
mov	esp, ebp
pop	ebp
retn
sub_536D50 endp



; Attributes: bp-based frame

sub_536D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A600
mov	esp, ebp
pop	ebp
retn
sub_536D60 endp



; Attributes: bp-based frame

sub_536D70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560490
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536D70 endp

align 10h


; Attributes: bp-based frame

sub_536D90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 200h
mov	esp, ebp
pop	ebp
retn
sub_536D90 endp



; Attributes: bp-based frame

sub_536DA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6641h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_536DA0 endp

align 10h


; Attributes: bp-based frame

sub_536DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A5B0
mov	esp, ebp
pop	ebp
retn
sub_536DC0 endp



; Attributes: bp-based frame

sub_536DD0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	eax, [eax+14h]
mov	[edx+14h], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
mov	ax, [edx+1Ch]
mov	[ecx+1Ch], ax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_0]
mov	al, [edx+24h]
mov	[ecx+24h], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
mov	edx, [ebp+var_34]
add	edx, 28h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 34h
mov	eax, [ebp+var_34]
add	eax, 34h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+44h]
mov	[eax+44h], dl
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+45h]
mov	[eax+45h], dl
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+46h]
mov	[eax+46h], dl
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+48h]
mov	[eax+48h], edx
mov	eax, [ebp+arg_0]
add	eax, 4Ch
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_34]
add	ecx, 4Ch
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_4694E0
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_30]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_536DD0 endp

align 10h


; Attributes: bp-based frame

sub_536EE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5604F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536EE0 endp

align 10h


; Attributes: bp-based frame

sub_536F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 201h
mov	esp, ebp
pop	ebp
retn
sub_536F00 endp



; Attributes: bp-based frame

sub_536F10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560550
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536F10 endp

align 10h


; Attributes: bp-based frame

sub_536F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 202h
mov	esp, ebp
pop	ebp
retn
sub_536F30 endp



; Attributes: bp-based frame

sub_536F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A590
mov	esp, ebp
pop	ebp
retn
sub_536F40 endp



; Attributes: bp-based frame

sub_536F50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 30h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_536F91
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_536F91:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_536F50 endp

align 10h


; Attributes: bp-based frame

sub_536FA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5605B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536FA0 endp

align 10h


; Attributes: bp-based frame

sub_536FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 203h
mov	esp, ebp
pop	ebp
retn
sub_536FC0 endp



; Attributes: bp-based frame

sub_536FD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 745h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_536FD0 endp

align 10h


; Attributes: bp-based frame

sub_536FF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560610
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_536FF0 endp

align 10h


; Attributes: bp-based frame

sub_537010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 204h
mov	esp, ebp
pop	ebp
retn
sub_537010 endp



; Attributes: bp-based frame

sub_537020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A570
mov	esp, ebp
pop	ebp
retn
sub_537020 endp



; Attributes: bp-based frame

sub_537030 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560680
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537030 endp

align 10h


; Attributes: bp-based frame

sub_537050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 205h
mov	esp, ebp
pop	ebp
retn
sub_537050 endp



; Attributes: bp-based frame

sub_537060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A550
mov	esp, ebp
pop	ebp
retn
sub_537060 endp



; Attributes: bp-based frame

sub_537070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5606F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537070 endp

align 10h


; Attributes: bp-based frame

sub_537090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 206h
mov	esp, ebp
pop	ebp
retn
sub_537090 endp



; Attributes: bp-based frame

sub_5370A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5E45h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5370A0 endp

align 10h


; Attributes: bp-based frame

sub_5370C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A530
mov	esp, ebp
pop	ebp
retn
sub_5370C0 endp



; Attributes: bp-based frame

sub_5370D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560750
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5370D0 endp

align 10h


; Attributes: bp-based frame

sub_5370F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 207h
mov	esp, ebp
pop	ebp
retn
sub_5370F0 endp



; Attributes: bp-based frame

sub_537100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A510
mov	esp, ebp
pop	ebp
retn
sub_537100 endp



; Attributes: bp-based frame

sub_537110 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5607C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537110 endp

align 10h


; Attributes: bp-based frame

sub_537130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 208h
mov	esp, ebp
pop	ebp
retn
sub_537130 endp



; Attributes: bp-based frame

sub_537140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A4F0
mov	esp, ebp
pop	ebp
retn
sub_537140 endp



; Attributes: bp-based frame

sub_537150 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560820
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537150 endp

align 10h


; Attributes: bp-based frame

sub_537170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 209h
mov	esp, ebp
pop	ebp
retn
sub_537170 endp



; Attributes: bp-based frame

sub_537180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A4D0
mov	esp, ebp
pop	ebp
retn
sub_537180 endp



; Attributes: bp-based frame

sub_537190 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560880
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537190 endp

align 10h


; Attributes: bp-based frame

sub_5371B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 20Ah
mov	esp, ebp
pop	ebp
retn
sub_5371B0 endp



; Attributes: bp-based frame

sub_5371C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5608E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5371C0 endp

align 10h


; Attributes: bp-based frame

sub_5371E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 20Bh
mov	esp, ebp
pop	ebp
retn
sub_5371E0 endp



; Attributes: bp-based frame

sub_5371F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A480
mov	esp, ebp
pop	ebp
retn
sub_5371F0 endp



; Attributes: bp-based frame

sub_537200 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560940
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537200 endp

align 10h


; Attributes: bp-based frame

sub_537220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 20Ch
mov	esp, ebp
pop	ebp
retn
sub_537220 endp



; Attributes: bp-based frame

sub_537230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A460
mov	esp, ebp
pop	ebp
retn
sub_537230 endp



; Attributes: bp-based frame

sub_537240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5609A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537240 endp

align 10h


; Attributes: bp-based frame

sub_537260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 20Dh
mov	esp, ebp
pop	ebp
retn
sub_537260 endp



; Attributes: bp-based frame

sub_537270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A440
mov	esp, ebp
pop	ebp
retn
sub_537270 endp



; Attributes: bp-based frame

sub_537280 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560A00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537280 endp

align 10h


; Attributes: bp-based frame

sub_5372A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 20Eh
mov	esp, ebp
pop	ebp
retn
sub_5372A0 endp



; Attributes: bp-based frame

sub_5372B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A420
mov	esp, ebp
pop	ebp
retn
sub_5372B0 endp



; Attributes: bp-based frame

sub_5372C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560A60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5372C0 endp

align 10h


; Attributes: bp-based frame

sub_5372E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 20Fh
mov	esp, ebp
pop	ebp
retn
sub_5372E0 endp



; Attributes: bp-based frame

sub_5372F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A400
mov	esp, ebp
pop	ebp
retn
sub_5372F0 endp



; Attributes: bp-based frame

sub_537300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560AC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537300 endp

align 10h


; Attributes: bp-based frame

sub_537320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 210h
mov	esp, ebp
pop	ebp
retn
sub_537320 endp



; Attributes: bp-based frame

sub_537330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A3E0
mov	esp, ebp
pop	ebp
retn
sub_537330 endp



; Attributes: bp-based frame

sub_537340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_537370
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_537363
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_537363:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_537340 endp

align 10h


; Attributes: bp-based frame

sub_537370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 80h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_537370 endp

align 10h


; Attributes: bp-based frame

sub_5373B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560B50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5373B0 endp

align 10h


; Attributes: bp-based frame

sub_5373D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 211h
mov	esp, ebp
pop	ebp
retn
sub_5373D0 endp



; Attributes: bp-based frame

sub_5373E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A3C0
mov	esp, ebp
pop	ebp
retn
sub_5373E0 endp



; Attributes: bp-based frame

sub_5373F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560BC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5373F0 endp

align 10h


; Attributes: bp-based frame

sub_537410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 212h
mov	esp, ebp
pop	ebp
retn
sub_537410 endp



; Attributes: bp-based frame

sub_537420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A3A0
mov	esp, ebp
pop	ebp
retn
sub_537420 endp



; Attributes: bp-based frame

sub_537430 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 4Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_537469
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_537469:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_537430 endp

align 10h


; Attributes: bp-based frame

sub_537480 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537480 endp

align 10h


; Attributes: bp-based frame

sub_5374A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 213h
mov	esp, ebp
pop	ebp
retn
sub_5374A0 endp



; Attributes: bp-based frame

sub_5374B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A380
mov	esp, ebp
pop	ebp
retn
sub_5374B0 endp



; Attributes: bp-based frame

sub_5374C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560CA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5374C0 endp

align 10h


; Attributes: bp-based frame

sub_5374E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 214h
mov	esp, ebp
pop	ebp
retn
sub_5374E0 endp



; Attributes: bp-based frame

sub_5374F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A360
mov	esp, ebp
pop	ebp
retn
sub_5374F0 endp



; Attributes: bp-based frame

sub_537500 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560D00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537500 endp

align 10h


; Attributes: bp-based frame

sub_537520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 215h
mov	esp, ebp
pop	ebp
retn
sub_537520 endp



; Attributes: bp-based frame

sub_537530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A340
mov	esp, ebp
pop	ebp
retn
sub_537530 endp



; Attributes: bp-based frame

sub_537540 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560D60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537540 endp

align 10h


; Attributes: bp-based frame

sub_537560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 216h
mov	esp, ebp
pop	ebp
retn
sub_537560 endp



; Attributes: bp-based frame

sub_537570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A320
mov	esp, ebp
pop	ebp
retn
sub_537570 endp



; Attributes: bp-based frame

sub_537580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560DC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537580 endp

align 10h


; Attributes: bp-based frame

sub_5375A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 217h
mov	esp, ebp
pop	ebp
retn
sub_5375A0 endp



; Attributes: bp-based frame

sub_5375B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A300
mov	esp, ebp
pop	ebp
retn
sub_5375B0 endp



; Attributes: bp-based frame

sub_5375C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560E20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5375C0 endp

align 10h


; Attributes: bp-based frame

sub_5375E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A2B0
mov	esp, ebp
pop	ebp
retn
sub_5375E0 endp



; Attributes: bp-based frame

sub_5375F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560E80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5375F0 endp

align 10h


; Attributes: bp-based frame

sub_537610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 219h
mov	esp, ebp
pop	ebp
retn
sub_537610 endp



; Attributes: bp-based frame

sub_537620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A290
mov	esp, ebp
pop	ebp
retn
sub_537620 endp



; Attributes: bp-based frame

sub_537630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560EE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537630 endp

align 10h


; Attributes: bp-based frame

sub_537650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 21Ah
mov	esp, ebp
pop	ebp
retn
sub_537650 endp



; Attributes: bp-based frame

sub_537660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A270
mov	esp, ebp
pop	ebp
retn
sub_537660 endp



; Attributes: bp-based frame

sub_537670 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560F40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537670 endp

align 10h


; Attributes: bp-based frame

sub_537690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 21Bh
mov	esp, ebp
pop	ebp
retn
sub_537690 endp



; Attributes: bp-based frame

sub_5376A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A250
mov	esp, ebp
pop	ebp
retn
sub_5376A0 endp



; Attributes: bp-based frame

sub_5376B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_560FA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5376B0 endp

align 10h


; Attributes: bp-based frame

sub_5376D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 21Ch
mov	esp, ebp
pop	ebp
retn
sub_5376D0 endp



; Attributes: bp-based frame

sub_5376E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A230
mov	esp, ebp
pop	ebp
retn
sub_5376E0 endp



; Attributes: bp-based frame

sub_5376F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561000
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5376F0 endp

align 10h


; Attributes: bp-based frame

sub_537710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 21Dh
mov	esp, ebp
pop	ebp
retn
sub_537710 endp



; Attributes: bp-based frame

sub_537720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A210
mov	esp, ebp
pop	ebp
retn
sub_537720 endp



; Attributes: bp-based frame

sub_537730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561060
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537730 endp

align 10h


; Attributes: bp-based frame

sub_537750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 21Eh
mov	esp, ebp
pop	ebp
retn
sub_537750 endp



; Attributes: bp-based frame

sub_537760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A1F0
mov	esp, ebp
pop	ebp
retn
sub_537760 endp



; Attributes: bp-based frame

sub_537770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5610C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537770 endp

align 10h


; Attributes: bp-based frame

sub_537790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 21Fh
mov	esp, ebp
pop	ebp
retn
sub_537790 endp



; Attributes: bp-based frame

sub_5377A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A1A0
mov	esp, ebp
pop	ebp
retn
sub_5377A0 endp



; Attributes: bp-based frame

sub_5377B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561120
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5377B0 endp

align 10h


; Attributes: bp-based frame

sub_5377D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 220h
mov	esp, ebp
pop	ebp
retn
sub_5377D0 endp



; Attributes: bp-based frame

sub_5377E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A180
mov	esp, ebp
pop	ebp
retn
sub_5377E0 endp



; Attributes: bp-based frame

sub_5377F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561180
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5377F0 endp

align 10h


; Attributes: bp-based frame

sub_537810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 221h
mov	esp, ebp
pop	ebp
retn
sub_537810 endp



; Attributes: bp-based frame

sub_537820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A160
mov	esp, ebp
pop	ebp
retn
sub_537820 endp



; Attributes: bp-based frame

sub_537830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5611E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537830 endp

align 10h


; Attributes: bp-based frame

sub_537850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 222h
mov	esp, ebp
pop	ebp
retn
sub_537850 endp



; Attributes: bp-based frame

sub_537860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A140
mov	esp, ebp
pop	ebp
retn
sub_537860 endp



; Attributes: bp-based frame

sub_537870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561250
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537870 endp

align 10h


; Attributes: bp-based frame

sub_537890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 223h
mov	esp, ebp
pop	ebp
retn
sub_537890 endp



; Attributes: bp-based frame

sub_5378A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A120
mov	esp, ebp
pop	ebp
retn
sub_5378A0 endp



; Attributes: bp-based frame

sub_5378B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5612B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5378B0 endp

align 10h


; Attributes: bp-based frame

sub_5378D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 224h
mov	esp, ebp
pop	ebp
retn
sub_5378D0 endp



; Attributes: bp-based frame

sub_5378E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A100
mov	esp, ebp
pop	ebp
retn
sub_5378E0 endp



; Attributes: bp-based frame

sub_5378F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561310
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5378F0 endp

align 10h


; Attributes: bp-based frame

sub_537910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 225h
mov	esp, ebp
pop	ebp
retn
sub_537910 endp



; Attributes: bp-based frame

sub_537920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A0E0
mov	esp, ebp
pop	ebp
retn
sub_537920 endp



; Attributes: bp-based frame

sub_537930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561370
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537930 endp

align 10h


; Attributes: bp-based frame

sub_537950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 226h
mov	esp, ebp
pop	ebp
retn
sub_537950 endp



; Attributes: bp-based frame

sub_537960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A0C0
mov	esp, ebp
pop	ebp
retn
sub_537960 endp



; Attributes: bp-based frame

sub_537970 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5613D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537970 endp

align 10h


; Attributes: bp-based frame

sub_537990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 227h
mov	esp, ebp
pop	ebp
retn
sub_537990 endp



; Attributes: bp-based frame

sub_5379A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A0A0
mov	esp, ebp
pop	ebp
retn
sub_5379A0 endp



; Attributes: bp-based frame

sub_5379B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561430
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5379B0 endp

align 10h


; Attributes: bp-based frame

sub_5379D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 228h
mov	esp, ebp
pop	ebp
retn
sub_5379D0 endp



; Attributes: bp-based frame

sub_5379E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A080
mov	esp, ebp
pop	ebp
retn
sub_5379E0 endp



; Attributes: bp-based frame

sub_5379F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561490
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5379F0 endp

align 10h


; Attributes: bp-based frame

sub_537A10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 229h
mov	esp, ebp
pop	ebp
retn
sub_537A10 endp



; Attributes: bp-based frame

sub_537A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A060
mov	esp, ebp
pop	ebp
retn
sub_537A20 endp



; Attributes: bp-based frame

sub_537A30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5614F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537A30 endp

align 10h


; Attributes: bp-based frame

sub_537A50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 22Ah
mov	esp, ebp
pop	ebp
retn
sub_537A50 endp



; Attributes: bp-based frame

sub_537A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A040
mov	esp, ebp
pop	ebp
retn
sub_537A60 endp



; Attributes: bp-based frame

sub_537A70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561550
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537A70 endp

align 10h


; Attributes: bp-based frame

sub_537A90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 22Bh
mov	esp, ebp
pop	ebp
retn
sub_537A90 endp



; Attributes: bp-based frame

sub_537AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D7A020
mov	esp, ebp
pop	ebp
retn
sub_537AA0 endp



; Attributes: bp-based frame

sub_537AB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5615B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537AB0 endp

align 10h


; Attributes: bp-based frame

sub_537AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 22Ch
mov	esp, ebp
pop	ebp
retn
sub_537AD0 endp



; Attributes: bp-based frame

sub_537AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79FD0
mov	esp, ebp
pop	ebp
retn
sub_537AE0 endp



; Attributes: bp-based frame

sub_537AF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_537AF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 4Ch
call	sub_10FB7C0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_537B58
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_537B58:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_537AF0 endp

align 10h


; Attributes: bp-based frame

sub_537B70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561610
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537B70 endp

align 10h


; Attributes: bp-based frame

sub_537B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 22Eh
mov	esp, ebp
pop	ebp
retn
sub_537B90 endp



; Attributes: bp-based frame

sub_537BA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5616B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537BA0 endp

align 10h


; Attributes: bp-based frame

sub_537BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 22Fh
mov	esp, ebp
pop	ebp
retn
sub_537BC0 endp



; Attributes: bp-based frame

sub_537BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79FB0
mov	esp, ebp
pop	ebp
retn
sub_537BD0 endp



; Attributes: bp-based frame

sub_537BE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537BE0 endp

align 10h


; Attributes: bp-based frame

sub_537C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 230h
mov	esp, ebp
pop	ebp
retn
sub_537C00 endp



; Attributes: bp-based frame

sub_537C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79F90
mov	esp, ebp
pop	ebp
retn
sub_537C10 endp



; Attributes: bp-based frame

sub_537C20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537C20 endp

align 10h


; Attributes: bp-based frame

sub_537C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 231h
mov	esp, ebp
pop	ebp
retn
sub_537C40 endp



; Attributes: bp-based frame

sub_537C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79F70
mov	esp, ebp
pop	ebp
retn
sub_537C50 endp



; Attributes: bp-based frame

sub_537C60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5617D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537C60 endp

align 10h


; Attributes: bp-based frame

sub_537C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 232h
mov	esp, ebp
pop	ebp
retn
sub_537C80 endp



; Attributes: bp-based frame

sub_537C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79F50
mov	esp, ebp
pop	ebp
retn
sub_537C90 endp



; Attributes: bp-based frame

sub_537CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537CA0 endp

align 10h


; Attributes: bp-based frame

sub_537CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 233h
mov	esp, ebp
pop	ebp
retn
sub_537CC0 endp



; Attributes: bp-based frame

sub_537CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79F30
mov	esp, ebp
pop	ebp
retn
sub_537CD0 endp



; Attributes: bp-based frame

sub_537CE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537CE0 endp

align 10h


; Attributes: bp-based frame

sub_537D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 234h
mov	esp, ebp
pop	ebp
retn
sub_537D00 endp



; Attributes: bp-based frame

sub_537D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79F10
mov	esp, ebp
pop	ebp
retn
sub_537D10 endp



; Attributes: bp-based frame

sub_537D20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5618F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537D20 endp

align 10h


; Attributes: bp-based frame

sub_537D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 235h
mov	esp, ebp
pop	ebp
retn
sub_537D40 endp



; Attributes: bp-based frame

sub_537D50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6644h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_537D50 endp

align 10h


; Attributes: bp-based frame

sub_537D70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79EF0
mov	esp, ebp
pop	ebp
retn
sub_537D70 endp



; Attributes: bp-based frame

sub_537D80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537D80 endp

align 10h


; Attributes: bp-based frame

sub_537DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 236h
mov	esp, ebp
pop	ebp
retn
sub_537DA0 endp



; Attributes: bp-based frame

sub_537DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79ED0
mov	esp, ebp
pop	ebp
retn
sub_537DB0 endp



; Attributes: bp-based frame

sub_537DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5619B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537DC0 endp

align 10h


; Attributes: bp-based frame

sub_537DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 237h
mov	esp, ebp
pop	ebp
retn
sub_537DE0 endp



; Attributes: bp-based frame

sub_537DF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79EB0
mov	esp, ebp
pop	ebp
retn
sub_537DF0 endp



; Attributes: bp-based frame

sub_537E00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561A10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537E00 endp

align 10h


; Attributes: bp-based frame

sub_537E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 238h
mov	esp, ebp
pop	ebp
retn
sub_537E20 endp



; Attributes: bp-based frame

sub_537E30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79E90
mov	esp, ebp
pop	ebp
retn
sub_537E30 endp



; Attributes: bp-based frame

sub_537E40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_537E70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_537E63
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_537E63:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_537E40 endp

align 10h


; Attributes: bp-based frame

sub_537E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A8h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_537E70 endp

align 10h


; Attributes: bp-based frame

sub_537EC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561A70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537EC0 endp

align 10h


; Attributes: bp-based frame

sub_537EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 239h
mov	esp, ebp
pop	ebp
retn
sub_537EE0 endp



; Attributes: bp-based frame

sub_537EF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_537EF0 endp

align 10h


; Attributes: bp-based frame

sub_537F10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79E70
mov	esp, ebp
pop	ebp
retn
sub_537F10 endp



; Attributes: bp-based frame

sub_537F20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561AE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537F20 endp

align 10h


; Attributes: bp-based frame

sub_537F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 23Ah
mov	esp, ebp
pop	ebp
retn
sub_537F40 endp



; Attributes: bp-based frame

sub_537F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79E50
mov	esp, ebp
pop	ebp
retn
sub_537F50 endp



; Attributes: bp-based frame

sub_537F60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561B40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537F60 endp

align 10h


; Attributes: bp-based frame

sub_537F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 23Bh
mov	esp, ebp
pop	ebp
retn
sub_537F80 endp



; Attributes: bp-based frame

sub_537F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79E30
mov	esp, ebp
pop	ebp
retn
sub_537F90 endp



; Attributes: bp-based frame

sub_537FA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561BA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537FA0 endp

align 10h


; Attributes: bp-based frame

sub_537FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 23Ch
mov	esp, ebp
pop	ebp
retn
sub_537FC0 endp



; Attributes: bp-based frame

sub_537FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79E10
mov	esp, ebp
pop	ebp
retn
sub_537FD0 endp



; Attributes: bp-based frame

sub_537FE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561C00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_537FE0 endp

align 10h


; Attributes: bp-based frame

sub_538000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 23Dh
mov	esp, ebp
pop	ebp
retn
sub_538000 endp



; Attributes: bp-based frame

sub_538010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79DF0
mov	esp, ebp
pop	ebp
retn
sub_538010 endp



; Attributes: bp-based frame

sub_538020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561C60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538020 endp

align 10h


; Attributes: bp-based frame

sub_538040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 23Eh
mov	esp, ebp
pop	ebp
retn
sub_538040 endp



; Attributes: bp-based frame

sub_538050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79DA0
mov	esp, ebp
pop	ebp
retn
sub_538050 endp



; Attributes: bp-based frame

sub_538060 proc	near

var_E8=	dword ptr -0E8h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0E8h
mov	[ebp+var_E8], ecx
mov	ecx, [ebp+var_E8]
call	sub_5380A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_538091
mov	ecx, [ebp+var_E8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_538091:
mov	eax, [ebp+var_E8]
mov	esp, ebp
pop	ebp
retn	4
sub_538060 endp

align 10h


; Attributes: bp-based frame

sub_5380A0 proc	near

var_10C= dword ptr -10Ch

push	ebp
mov	ebp, esp
sub	esp, 10Ch
mov	[ebp+var_10C], ecx
mov	ecx, [ebp+var_10C]
add	ecx, 38h
call	sub_436CF0
mov	ecx, [ebp+var_10C]
add	ecx, 2Ch
call	sub_436CF0
mov	ecx, [ebp+var_10C]
add	ecx, 20h
call	sub_436CF0
mov	ecx, [ebp+var_10C]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5380A0 endp

align 10h


; Attributes: bp-based frame

sub_5380F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561CC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5380F0 endp

align 10h


; Attributes: bp-based frame

sub_538110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 23Fh
mov	esp, ebp
pop	ebp
retn
sub_538110 endp



; Attributes: bp-based frame

sub_538120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79D70
mov	esp, ebp
pop	ebp
retn
sub_538120 endp



; Attributes: bp-based frame

sub_538130 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561D20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538130 endp

align 10h


; Attributes: bp-based frame

sub_538150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79D50
mov	esp, ebp
pop	ebp
retn
sub_538150 endp



; Attributes: bp-based frame

sub_538160 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561D80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538160 endp

align 10h


; Attributes: bp-based frame

sub_538180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 241h
mov	esp, ebp
pop	ebp
retn
sub_538180 endp



; Attributes: bp-based frame

sub_538190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79D30
mov	esp, ebp
pop	ebp
retn
sub_538190 endp



; Attributes: bp-based frame

sub_5381A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561DE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5381A0 endp

align 10h


; Attributes: bp-based frame

sub_5381C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 242h
mov	esp, ebp
pop	ebp
retn
sub_5381C0 endp



; Attributes: bp-based frame

sub_5381D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79D10
mov	esp, ebp
pop	ebp
retn
sub_5381D0 endp



; Attributes: bp-based frame

sub_5381E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561E40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5381E0 endp

align 10h


; Attributes: bp-based frame

sub_538200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 243h
mov	esp, ebp
pop	ebp
retn
sub_538200 endp



; Attributes: bp-based frame

sub_538210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79CF0
mov	esp, ebp
pop	ebp
retn
sub_538210 endp



; Attributes: bp-based frame

sub_538220 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561EA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538220 endp

align 10h


; Attributes: bp-based frame

sub_538240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 244h
mov	esp, ebp
pop	ebp
retn
sub_538240 endp



; Attributes: bp-based frame

sub_538250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79CD0
mov	esp, ebp
pop	ebp
retn
sub_538250 endp



; Attributes: bp-based frame

sub_538260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561F00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538260 endp

align 10h


; Attributes: bp-based frame

sub_538280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 245h
mov	esp, ebp
pop	ebp
retn
sub_538280 endp



; Attributes: bp-based frame

sub_538290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79CB0
mov	esp, ebp
pop	ebp
retn
sub_538290 endp



; Attributes: bp-based frame

sub_5382A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561F60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5382A0 endp

align 10h


; Attributes: bp-based frame

sub_5382C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 246h
mov	esp, ebp
pop	ebp
retn
sub_5382C0 endp



; Attributes: bp-based frame

sub_5382D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79C90
mov	esp, ebp
pop	ebp
retn
sub_5382D0 endp



; Attributes: bp-based frame

sub_5382E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_561FC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5382E0 endp

align 10h


; Attributes: bp-based frame

sub_538300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 247h
mov	esp, ebp
pop	ebp
retn
sub_538300 endp



; Attributes: bp-based frame

sub_538310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79C70
mov	esp, ebp
pop	ebp
retn
sub_538310 endp



; Attributes: bp-based frame

sub_538320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562020
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538320 endp

align 10h


; Attributes: bp-based frame

sub_538340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 248h
mov	esp, ebp
pop	ebp
retn
sub_538340 endp



; Attributes: bp-based frame

sub_538350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79C20
mov	esp, ebp
pop	ebp
retn
sub_538350 endp



; Attributes: bp-based frame

sub_538360 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562080
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538360 endp

align 10h


; Attributes: bp-based frame

sub_538380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 249h
mov	esp, ebp
pop	ebp
retn
sub_538380 endp



; Attributes: bp-based frame

sub_538390 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5620E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538390 endp

align 10h


; Attributes: bp-based frame

sub_5383B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 24Ah
mov	esp, ebp
pop	ebp
retn
sub_5383B0 endp



; Attributes: bp-based frame

sub_5383C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79C00
mov	esp, ebp
pop	ebp
retn
sub_5383C0 endp



; Attributes: bp-based frame

sub_5383D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562140
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5383D0 endp

align 10h


; Attributes: bp-based frame

sub_5383F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 24Bh
mov	esp, ebp
pop	ebp
retn
sub_5383F0 endp



; Attributes: bp-based frame

sub_538400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79BE0
mov	esp, ebp
pop	ebp
retn
sub_538400 endp



; Attributes: bp-based frame

sub_538410 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5621A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538410 endp

align 10h


; Attributes: bp-based frame

sub_538430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 24Ch
mov	esp, ebp
pop	ebp
retn
sub_538430 endp



; Attributes: bp-based frame

sub_538440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79BC0
mov	esp, ebp
pop	ebp
retn
sub_538440 endp



; Attributes: bp-based frame

sub_538450 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562200
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538450 endp

align 10h


; Attributes: bp-based frame

sub_538470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 24Dh
mov	esp, ebp
pop	ebp
retn
sub_538470 endp



; Attributes: bp-based frame

sub_538480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79BA0
mov	esp, ebp
pop	ebp
retn
sub_538480 endp



; Attributes: bp-based frame

sub_538490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562270
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538490 endp

align 10h


; Attributes: bp-based frame

sub_5384B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 24Eh
mov	esp, ebp
pop	ebp
retn
sub_5384B0 endp



; Attributes: bp-based frame

sub_5384C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79B80
mov	esp, ebp
pop	ebp
retn
sub_5384C0 endp



; Attributes: bp-based frame

sub_5384D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5622D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5384D0 endp

align 10h


; Attributes: bp-based frame

sub_5384F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 24Fh
mov	esp, ebp
pop	ebp
retn
sub_5384F0 endp



; Attributes: bp-based frame

sub_538500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79B60
mov	esp, ebp
pop	ebp
retn
sub_538500 endp



; Attributes: bp-based frame

sub_538510 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562330
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538510 endp

align 10h


; Attributes: bp-based frame

sub_538530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 250h
mov	esp, ebp
pop	ebp
retn
sub_538530 endp



; Attributes: bp-based frame

sub_538540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79B40
mov	esp, ebp
pop	ebp
retn
sub_538540 endp



; Attributes: bp-based frame

sub_538550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5623A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538550 endp

align 10h


; Attributes: bp-based frame

sub_538570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 251h
mov	esp, ebp
pop	ebp
retn
sub_538570 endp



; Attributes: bp-based frame

sub_538580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79AF0
mov	esp, ebp
pop	ebp
retn
sub_538580 endp



; Attributes: bp-based frame

sub_538590 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5385C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5385B3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5385B3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_538590 endp

align 10h


; Attributes: bp-based frame

sub_5385C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5385C0 endp

align 10h


; Attributes: bp-based frame

sub_538600 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538600 endp

align 10h


; Attributes: bp-based frame

sub_538620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 252h
mov	esp, ebp
pop	ebp
retn
sub_538620 endp



; Attributes: bp-based frame

sub_538630 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
add	ecx, 20h
call	sub_538670
mov	ecx, [ebp+var_20]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_538660
mov	ecx, [ebp+var_20]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_538660:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_538630 endp

align 10h


; Attributes: bp-based frame

sub_538670 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_538670
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_44]
add	ecx, 0C4h
call	sub_555150
mov	eax, [ebp+var_44]
add	eax, 0ACh
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
call	sub_579120
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_44]
add	ecx, 80h
call	sub_407E50
mov	ecx, [ebp+var_44]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_44]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_44]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_538670 endp

align 10h


; Attributes: bp-based frame

sub_538700 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562470
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538700 endp

align 10h


; Attributes: bp-based frame

sub_538720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 253h
mov	esp, ebp
pop	ebp
retn
sub_538720 endp



; Attributes: bp-based frame

sub_538730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5624E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538730 endp

align 10h


; Attributes: bp-based frame

sub_538750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 254h
mov	esp, ebp
pop	ebp
retn
sub_538750 endp



; Attributes: bp-based frame

sub_538760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79AD0
mov	esp, ebp
pop	ebp
retn
sub_538760 endp



; Attributes: bp-based frame

sub_538770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562540
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538770 endp

align 10h


; Attributes: bp-based frame

sub_538790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 258h
mov	esp, ebp
pop	ebp
retn
sub_538790 endp



; Attributes: bp-based frame

sub_5387A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79AB0
mov	esp, ebp
pop	ebp
retn
sub_5387A0 endp



; Attributes: bp-based frame

sub_5387B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5625A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5387B0 endp

align 10h


; Attributes: bp-based frame

sub_5387D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 259h
mov	esp, ebp
pop	ebp
retn
sub_5387D0 endp



; Attributes: bp-based frame

sub_5387E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79A90
mov	esp, ebp
pop	ebp
retn
sub_5387E0 endp



; Attributes: bp-based frame

sub_5387F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562600
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5387F0 endp

align 10h


; Attributes: bp-based frame

sub_538810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 25Ah
mov	esp, ebp
pop	ebp
retn
sub_538810 endp



; Attributes: bp-based frame

sub_538820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79A70
mov	esp, ebp
pop	ebp
retn
sub_538820 endp



; Attributes: bp-based frame

sub_538830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562660
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538830 endp

align 10h


; Attributes: bp-based frame

sub_538850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 25Bh
mov	esp, ebp
pop	ebp
retn
sub_538850 endp



; Attributes: bp-based frame

sub_538860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79A50
mov	esp, ebp
pop	ebp
retn
sub_538860 endp



; Attributes: bp-based frame

sub_538870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5626C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538870 endp

align 10h


; Attributes: bp-based frame

sub_538890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 25Ch
mov	esp, ebp
pop	ebp
retn
sub_538890 endp



; Attributes: bp-based frame

sub_5388A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79A30
mov	esp, ebp
pop	ebp
retn
sub_5388A0 endp



; Attributes: bp-based frame

sub_5388B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562720
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5388B0 endp

align 10h


; Attributes: bp-based frame

sub_5388D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 25Dh
mov	esp, ebp
pop	ebp
retn
sub_5388D0 endp



; Attributes: bp-based frame

sub_5388E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79A10
mov	esp, ebp
pop	ebp
retn
sub_5388E0 endp



; Attributes: bp-based frame

sub_5388F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562780
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5388F0 endp

align 10h


; Attributes: bp-based frame

sub_538910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 25Eh
mov	esp, ebp
pop	ebp
retn
sub_538910 endp



; Attributes: bp-based frame

sub_538920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D799F0
mov	esp, ebp
pop	ebp
retn
sub_538920 endp



; Attributes: bp-based frame

sub_538930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5627E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538930 endp

align 10h


; Attributes: bp-based frame

sub_538950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 25Fh
mov	esp, ebp
pop	ebp
retn
sub_538950 endp



; Attributes: bp-based frame

sub_538960 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562840
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538960 endp

align 10h


; Attributes: bp-based frame

sub_538980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D799D0
mov	esp, ebp
pop	ebp
retn
sub_538980 endp



; Attributes: bp-based frame

sub_538990 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5628D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538990 endp

align 10h


; Attributes: bp-based frame

sub_5389B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 261h
mov	esp, ebp
pop	ebp
retn
sub_5389B0 endp



; Attributes: bp-based frame

sub_5389C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D799B0
mov	esp, ebp
pop	ebp
retn
sub_5389C0 endp



; Attributes: bp-based frame

sub_5389D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562930
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5389D0 endp

align 10h


; Attributes: bp-based frame

sub_5389F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 262h
mov	esp, ebp
pop	ebp
retn
sub_5389F0 endp



; Attributes: bp-based frame

sub_538A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79990
mov	esp, ebp
pop	ebp
retn
sub_538A00 endp



; Attributes: bp-based frame

sub_538A10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562990
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538A10 endp

align 10h


; Attributes: bp-based frame

sub_538A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 263h
mov	esp, ebp
pop	ebp
retn
sub_538A30 endp



; Attributes: bp-based frame

sub_538A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79970
mov	esp, ebp
pop	ebp
retn
sub_538A40 endp



; Attributes: bp-based frame

sub_538A50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5629F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538A50 endp

align 10h


; Attributes: bp-based frame

sub_538A70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 264h
mov	esp, ebp
pop	ebp
retn
sub_538A70 endp



; Attributes: bp-based frame

sub_538A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79950
mov	esp, ebp
pop	ebp
retn
sub_538A80 endp



; Attributes: bp-based frame

sub_538A90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562A50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538A90 endp

align 10h


; Attributes: bp-based frame

sub_538AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 265h
mov	esp, ebp
pop	ebp
retn
sub_538AB0 endp



; Attributes: bp-based frame

sub_538AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79930
mov	esp, ebp
pop	ebp
retn
sub_538AC0 endp



; Attributes: bp-based frame

sub_538AD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562AB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538AD0 endp

align 10h


; Attributes: bp-based frame

sub_538AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 266h
mov	esp, ebp
pop	ebp
retn
sub_538AF0 endp



; Attributes: bp-based frame

sub_538B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79910
mov	esp, ebp
pop	ebp
retn
sub_538B00 endp



; Attributes: bp-based frame

sub_538B10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562B10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538B10 endp

align 10h


; Attributes: bp-based frame

sub_538B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 267h
mov	esp, ebp
pop	ebp
retn
sub_538B30 endp



; Attributes: bp-based frame

sub_538B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D798F0
mov	esp, ebp
pop	ebp
retn
sub_538B40 endp



; Attributes: bp-based frame

sub_538B50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562B70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538B50 endp

align 10h


; Attributes: bp-based frame

sub_538B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 268h
mov	esp, ebp
pop	ebp
retn
sub_538B70 endp



; Attributes: bp-based frame

sub_538B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D798D0
mov	esp, ebp
pop	ebp
retn
sub_538B80 endp



; Attributes: bp-based frame

sub_538B90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562BD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538B90 endp

align 10h


; Attributes: bp-based frame

sub_538BB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 269h
mov	esp, ebp
pop	ebp
retn
sub_538BB0 endp



; Attributes: bp-based frame

sub_538BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D798B0
mov	esp, ebp
pop	ebp
retn
sub_538BC0 endp



; Attributes: bp-based frame

sub_538BD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538BD0 endp

align 10h


; Attributes: bp-based frame

sub_538BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 26Ah
mov	esp, ebp
pop	ebp
retn
sub_538BF0 endp



; Attributes: bp-based frame

sub_538C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79890
mov	esp, ebp
pop	ebp
retn
sub_538C00 endp



; Attributes: bp-based frame

sub_538C10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562C90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538C10 endp

align 10h


; Attributes: bp-based frame

sub_538C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 26Bh
mov	esp, ebp
pop	ebp
retn
sub_538C30 endp



; Attributes: bp-based frame

sub_538C40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562CF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538C40 endp

align 10h


; Attributes: bp-based frame

sub_538C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 26Dh
mov	esp, ebp
pop	ebp
retn
sub_538C60 endp



; Attributes: bp-based frame

sub_538C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79870
mov	esp, ebp
pop	ebp
retn
sub_538C70 endp



; Attributes: bp-based frame

sub_538C80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562D50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538C80 endp

align 10h


; Attributes: bp-based frame

sub_538CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 26Eh
mov	esp, ebp
pop	ebp
retn
sub_538CA0 endp



; Attributes: bp-based frame

sub_538CB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79850
mov	esp, ebp
pop	ebp
retn
sub_538CB0 endp



; Attributes: bp-based frame

sub_538CC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562DB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538CC0 endp

align 10h


; Attributes: bp-based frame

sub_538CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 26Fh
mov	esp, ebp
pop	ebp
retn
sub_538CE0 endp



; Attributes: bp-based frame

sub_538CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79800
mov	esp, ebp
pop	ebp
retn
sub_538CF0 endp



; Attributes: bp-based frame

sub_538D00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562E10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538D00 endp

align 10h


; Attributes: bp-based frame

sub_538D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 270h
mov	esp, ebp
pop	ebp
retn
sub_538D20 endp



; Attributes: bp-based frame

sub_538D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79790
mov	esp, ebp
pop	ebp
retn
sub_538D30 endp



; Attributes: bp-based frame

sub_538D40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435140
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_538D95
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_538D95:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_538D40 endp

align 10h


; Attributes: bp-based frame

sub_538DB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562E70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538DB0 endp

align 10h


; Attributes: bp-based frame

sub_538DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 271h
mov	esp, ebp
pop	ebp
retn
sub_538DD0 endp



; Attributes: bp-based frame

sub_538DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79770
mov	esp, ebp
pop	ebp
retn
sub_538DE0 endp



; Attributes: bp-based frame

sub_538DF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562F00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538DF0 endp

align 10h


; Attributes: bp-based frame

sub_538E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 272h
mov	esp, ebp
pop	ebp
retn
sub_538E10 endp



; Attributes: bp-based frame

sub_538E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79750
mov	esp, ebp
pop	ebp
retn
sub_538E20 endp



; Attributes: bp-based frame

sub_538E30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562F60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538E30 endp

align 10h


; Attributes: bp-based frame

sub_538E50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 273h
mov	esp, ebp
pop	ebp
retn
sub_538E50 endp



; Attributes: bp-based frame

sub_538E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79730
mov	esp, ebp
pop	ebp
retn
sub_538E60 endp



; Attributes: bp-based frame

sub_538E70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_562FC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538E70 endp

align 10h


; Attributes: bp-based frame

sub_538E90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 274h
mov	esp, ebp
pop	ebp
retn
sub_538E90 endp



; Attributes: bp-based frame

sub_538EA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563020
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538EA0 endp

align 10h


; Attributes: bp-based frame

sub_538EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 275h
mov	esp, ebp
pop	ebp
retn
sub_538EC0 endp



; Attributes: bp-based frame

sub_538ED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563080
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538ED0 endp

align 10h


; Attributes: bp-based frame

sub_538EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 276h
mov	esp, ebp
pop	ebp
retn
sub_538EF0 endp



; Attributes: bp-based frame

sub_538F00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5630E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538F00 endp

align 10h


; Attributes: bp-based frame

sub_538F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 277h
mov	esp, ebp
pop	ebp
retn
sub_538F20 endp



; Attributes: bp-based frame

sub_538F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79710
mov	esp, ebp
pop	ebp
retn
sub_538F30 endp



; Attributes: bp-based frame

sub_538F40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_538F70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_538F63
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_538F63:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_538F40 endp

align 10h


; Attributes: bp-based frame

sub_538F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0C0h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 98h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 6Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_538F70 endp

align 10h


; Attributes: bp-based frame

sub_538FC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563140
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_538FC0 endp

align 10h


; Attributes: bp-based frame

sub_538FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 278h
mov	esp, ebp
pop	ebp
retn
sub_538FE0 endp



; Attributes: bp-based frame

sub_538FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D796F0
mov	esp, ebp
pop	ebp
retn
sub_538FF0 endp



; Attributes: bp-based frame

sub_539000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5631B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539000 endp

align 10h


; Attributes: bp-based frame

sub_539020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 279h
mov	esp, ebp
pop	ebp
retn
sub_539020 endp



; Attributes: bp-based frame

sub_539030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D796D0
mov	esp, ebp
pop	ebp
retn
sub_539030 endp



; Attributes: bp-based frame

sub_539040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_539070
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_539063
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_539063:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_539040 endp

align 10h


; Attributes: bp-based frame

sub_539070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A8h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 80h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_539070 endp

align 10h


; Attributes: bp-based frame

sub_5390C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563210
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5390C0 endp

align 10h


; Attributes: bp-based frame

sub_5390E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 27Ah
mov	esp, ebp
pop	ebp
retn
sub_5390E0 endp



; Attributes: bp-based frame

sub_5390F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D796B0
mov	esp, ebp
pop	ebp
retn
sub_5390F0 endp



; Attributes: bp-based frame

sub_539100 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539100 endp

align 10h


; Attributes: bp-based frame

sub_539120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 27Bh
mov	esp, ebp
pop	ebp
retn
sub_539120 endp



; Attributes: bp-based frame

sub_539130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79660
mov	esp, ebp
pop	ebp
retn
sub_539130 endp



; Attributes: bp-based frame

sub_539140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5632E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539140 endp

align 10h


; Attributes: bp-based frame

sub_539160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 27Ch
mov	esp, ebp
pop	ebp
retn
sub_539160 endp



; Attributes: bp-based frame

sub_539170 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539170 endp

align 10h


; Attributes: bp-based frame

sub_539190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 27Dh
mov	esp, ebp
pop	ebp
retn
sub_539190 endp



; Attributes: bp-based frame

sub_5391A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5633A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5391A0 endp

align 10h


; Attributes: bp-based frame

sub_5391C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 27Eh
mov	esp, ebp
pop	ebp
retn
sub_5391C0 endp



; Attributes: bp-based frame

sub_5391D0 proc	near

var_30=	dword ptr -30h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_539240
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5391F5
mov	ecx, [ebp+var_30]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5391F5:
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_5391D0 endp

align 10h


; Attributes: bp-based frame

sub_539200 proc	near

var_58=	dword ptr -58h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 98h
call	sub_4A9770
mov	ecx, [ebp+var_58]
add	ecx, 70h
call	sub_407E50
mov	ecx, [ebp+var_58]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_58]
add	ecx, 10h
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_539200 endp

align 10h


; Attributes: bp-based frame

sub_539240 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
add	eax, 0E8h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_10111A0
mov	ecx, [ebp+var_30]
add	ecx, 40h
call	sub_539200
mov	ecx, [ebp+var_30]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_539240 endp

align 10h


; Attributes: bp-based frame

sub_539290 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539290 endp

align 10h


; Attributes: bp-based frame

sub_5392B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 27Fh
mov	esp, ebp
pop	ebp
retn
sub_5392B0 endp



; Attributes: bp-based frame

sub_5392C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563470
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5392C0 endp

align 10h


; Attributes: bp-based frame

sub_5392E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 280h
mov	esp, ebp
pop	ebp
retn
sub_5392E0 endp



; Attributes: bp-based frame

sub_5392F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79640
mov	esp, ebp
pop	ebp
retn
sub_5392F0 endp



; Attributes: bp-based frame

sub_539300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5634D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539300 endp

align 10h


; Attributes: bp-based frame

sub_539320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 281h
mov	esp, ebp
pop	ebp
retn
sub_539320 endp



; Attributes: bp-based frame

sub_539330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79620
mov	esp, ebp
pop	ebp
retn
sub_539330 endp



; Attributes: bp-based frame

sub_539340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563530
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539340 endp

align 10h


; Attributes: bp-based frame

sub_539360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 282h
mov	esp, ebp
pop	ebp
retn
sub_539360 endp



; Attributes: bp-based frame

sub_539370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79600
mov	esp, ebp
pop	ebp
retn
sub_539370 endp



; Attributes: bp-based frame

sub_539380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539380 endp

align 10h


; Attributes: bp-based frame

sub_5393A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 283h
mov	esp, ebp
pop	ebp
retn
sub_5393A0 endp



; Attributes: bp-based frame

sub_5393B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D795E0
mov	esp, ebp
pop	ebp
retn
sub_5393B0 endp



; Attributes: bp-based frame

sub_5393C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5635F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5393C0 endp

align 10h


; Attributes: bp-based frame

sub_5393E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 284h
mov	esp, ebp
pop	ebp
retn
sub_5393E0 endp



; Attributes: bp-based frame

sub_5393F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5393F0 endp

align 10h


; Attributes: bp-based frame

sub_539410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 285h
mov	esp, ebp
pop	ebp
retn
sub_539410 endp



; Attributes: bp-based frame

sub_539420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D795C0
mov	esp, ebp
pop	ebp
retn
sub_539420 endp



; Attributes: bp-based frame

sub_539430 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5636B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539430 endp

align 10h


; Attributes: bp-based frame

sub_539450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 286h
mov	esp, ebp
pop	ebp
retn
sub_539450 endp



; Attributes: bp-based frame

sub_539460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D795A0
mov	esp, ebp
pop	ebp
retn
sub_539460 endp



; Attributes: bp-based frame

sub_539470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539470 endp

align 10h


; Attributes: bp-based frame

sub_539490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 287h
mov	esp, ebp
pop	ebp
retn
sub_539490 endp



; Attributes: bp-based frame

sub_5394A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79580
mov	esp, ebp
pop	ebp
retn
sub_5394A0 endp



; Attributes: bp-based frame

sub_5394B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5394B0 endp

align 10h


; Attributes: bp-based frame

sub_5394D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 288h
mov	esp, ebp
pop	ebp
retn
sub_5394D0 endp



; Attributes: bp-based frame

sub_5394E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79560
mov	esp, ebp
pop	ebp
retn
sub_5394E0 endp



; Attributes: bp-based frame

sub_5394F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53951E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53951E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5394F0 endp

align 10h


; Attributes: bp-based frame

sub_539530 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5637D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539530 endp

align 10h


; Attributes: bp-based frame

sub_539550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 289h
mov	esp, ebp
pop	ebp
retn
sub_539550 endp



; Attributes: bp-based frame

sub_539560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79540
mov	esp, ebp
pop	ebp
retn
sub_539560 endp



; Attributes: bp-based frame

sub_539570 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539570 endp

align 10h


; Attributes: bp-based frame

sub_539590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 28Ah
mov	esp, ebp
pop	ebp
retn
sub_539590 endp



; Attributes: bp-based frame

sub_5395A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79520
mov	esp, ebp
pop	ebp
retn
sub_5395A0 endp



; Attributes: bp-based frame

sub_5395B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5395B0 endp

align 10h


; Attributes: bp-based frame

sub_5395D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 28Bh
mov	esp, ebp
pop	ebp
retn
sub_5395D0 endp



; Attributes: bp-based frame

sub_5395E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79500
mov	esp, ebp
pop	ebp
retn
sub_5395E0 endp



; Attributes: bp-based frame

sub_5395F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5638F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5395F0 endp

align 10h


; Attributes: bp-based frame

sub_539610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 28Ch
mov	esp, ebp
pop	ebp
retn
sub_539610 endp



; Attributes: bp-based frame

sub_539620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D794E0
mov	esp, ebp
pop	ebp
retn
sub_539620 endp



; Attributes: bp-based frame

sub_539630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539630 endp

align 10h


; Attributes: bp-based frame

sub_539650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 28Dh
mov	esp, ebp
pop	ebp
retn
sub_539650 endp



; Attributes: bp-based frame

sub_539660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D794C0
mov	esp, ebp
pop	ebp
retn
sub_539660 endp



; Attributes: bp-based frame

sub_539670 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5639B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539670 endp

align 10h


; Attributes: bp-based frame

sub_539690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 28Eh
mov	esp, ebp
pop	ebp
retn
sub_539690 endp



; Attributes: bp-based frame

sub_5396A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D794A0
mov	esp, ebp
pop	ebp
retn
sub_5396A0 endp



; Attributes: bp-based frame

sub_5396B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563A10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5396B0 endp

align 10h


; Attributes: bp-based frame

sub_5396D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 28Fh
mov	esp, ebp
pop	ebp
retn
sub_5396D0 endp



; Attributes: bp-based frame

sub_5396E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79480
mov	esp, ebp
pop	ebp
retn
sub_5396E0 endp



; Attributes: bp-based frame

sub_5396F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563A70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5396F0 endp

align 10h


; Attributes: bp-based frame

sub_539710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 290h
mov	esp, ebp
pop	ebp
retn
sub_539710 endp



; Attributes: bp-based frame

sub_539720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79460
mov	esp, ebp
pop	ebp
retn
sub_539720 endp



; Attributes: bp-based frame

sub_539730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563AD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539730 endp

align 10h


; Attributes: bp-based frame

sub_539750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 291h
mov	esp, ebp
pop	ebp
retn
sub_539750 endp



; Attributes: bp-based frame

sub_539760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79440
mov	esp, ebp
pop	ebp
retn
sub_539760 endp



; Attributes: bp-based frame

sub_539770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563B30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539770 endp

align 10h


; Attributes: bp-based frame

sub_539790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 293h
mov	esp, ebp
pop	ebp
retn
sub_539790 endp



; Attributes: bp-based frame

sub_5397A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79420
mov	esp, ebp
pop	ebp
retn
sub_5397A0 endp



; Attributes: bp-based frame

sub_5397B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563B90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5397B0 endp

align 10h


; Attributes: bp-based frame

sub_5397D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 294h
mov	esp, ebp
pop	ebp
retn
sub_5397D0 endp



; Attributes: bp-based frame

sub_5397E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79400
mov	esp, ebp
pop	ebp
retn
sub_5397E0 endp



; Attributes: bp-based frame

sub_5397F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563BF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5397F0 endp

align 10h


; Attributes: bp-based frame

sub_539810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 295h
mov	esp, ebp
pop	ebp
retn
sub_539810 endp



; Attributes: bp-based frame

sub_539820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D793E0
mov	esp, ebp
pop	ebp
retn
sub_539820 endp



; Attributes: bp-based frame

sub_539830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563C50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539830 endp

align 10h


; Attributes: bp-based frame

sub_539850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 296h
mov	esp, ebp
pop	ebp
retn
sub_539850 endp



; Attributes: bp-based frame

sub_539860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79390
mov	esp, ebp
pop	ebp
retn
sub_539860 endp



; Attributes: bp-based frame

sub_539870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563CB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539870 endp

align 10h


; Attributes: bp-based frame

sub_539890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 297h
mov	esp, ebp
pop	ebp
retn
sub_539890 endp



; Attributes: bp-based frame

sub_5398A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79370
mov	esp, ebp
pop	ebp
retn
sub_5398A0 endp



; Attributes: bp-based frame

sub_5398B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563D10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5398B0 endp

align 10h


; Attributes: bp-based frame

sub_5398D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 298h
mov	esp, ebp
pop	ebp
retn
sub_5398D0 endp



; Attributes: bp-based frame

sub_5398E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79350
mov	esp, ebp
pop	ebp
retn
sub_5398E0 endp



; Attributes: bp-based frame

sub_5398F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563DA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5398F0 endp

align 10h


; Attributes: bp-based frame

sub_539910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 299h
mov	esp, ebp
pop	ebp
retn
sub_539910 endp



; Attributes: bp-based frame

sub_539920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79330
mov	esp, ebp
pop	ebp
retn
sub_539920 endp



; Attributes: bp-based frame

sub_539930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563E00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539930 endp

align 10h


; Attributes: bp-based frame

sub_539950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29Ah
mov	esp, ebp
pop	ebp
retn
sub_539950 endp



; Attributes: bp-based frame

sub_539960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79310
mov	esp, ebp
pop	ebp
retn
sub_539960 endp



; Attributes: bp-based frame

sub_539970 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563E60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539970 endp

align 10h


; Attributes: bp-based frame

sub_539990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29Bh
mov	esp, ebp
pop	ebp
retn
sub_539990 endp



; Attributes: bp-based frame

sub_5399A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D792F0
mov	esp, ebp
pop	ebp
retn
sub_5399A0 endp



; Attributes: bp-based frame

sub_5399B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563EC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5399B0 endp

align 10h


; Attributes: bp-based frame

sub_5399D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29Ch
mov	esp, ebp
pop	ebp
retn
sub_5399D0 endp



; Attributes: bp-based frame

sub_5399E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D792D0
mov	esp, ebp
pop	ebp
retn
sub_5399E0 endp



; Attributes: bp-based frame

sub_5399F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563F20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5399F0 endp

align 10h


; Attributes: bp-based frame

sub_539A10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29Dh
mov	esp, ebp
pop	ebp
retn
sub_539A10 endp



; Attributes: bp-based frame

sub_539A20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6140h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_539A20 endp

align 10h


; Attributes: bp-based frame

sub_539A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D792B0
mov	esp, ebp
pop	ebp
retn
sub_539A40 endp



; Attributes: bp-based frame

sub_539A50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563F80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539A50 endp

align 10h


; Attributes: bp-based frame

sub_539A70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29Eh
mov	esp, ebp
pop	ebp
retn
sub_539A70 endp



; Attributes: bp-based frame

sub_539A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79290
mov	esp, ebp
pop	ebp
retn
sub_539A80 endp



; Attributes: bp-based frame

sub_539A90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_563FE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539A90 endp

align 10h


; Attributes: bp-based frame

sub_539AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29Fh
mov	esp, ebp
pop	ebp
retn
sub_539AB0 endp



; Attributes: bp-based frame

sub_539AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79270
mov	esp, ebp
pop	ebp
retn
sub_539AC0 endp



; Attributes: bp-based frame

sub_539AD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539AD0 endp

align 10h


; Attributes: bp-based frame

sub_539AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A0h
mov	esp, ebp
pop	ebp
retn
sub_539AF0 endp



; Attributes: bp-based frame

sub_539B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79250
mov	esp, ebp
pop	ebp
retn
sub_539B00 endp



; Attributes: bp-based frame

sub_539B10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5640A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539B10 endp

align 10h


; Attributes: bp-based frame

sub_539B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A1h
mov	esp, ebp
pop	ebp
retn
sub_539B30 endp



; Attributes: bp-based frame

sub_539B40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6742h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_539B40 endp

align 10h


; Attributes: bp-based frame

sub_539B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79230
mov	esp, ebp
pop	ebp
retn
sub_539B60 endp



; Attributes: bp-based frame

sub_539B70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539B70 endp

align 10h


; Attributes: bp-based frame

sub_539B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A2h
mov	esp, ebp
pop	ebp
retn
sub_539B90 endp



; Attributes: bp-based frame

sub_539BA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2741h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_539BA0 endp

align 10h


; Attributes: bp-based frame

sub_539BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D791E0
mov	esp, ebp
pop	ebp
retn
sub_539BC0 endp



; Attributes: bp-based frame

sub_539BD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539BD0 endp

align 10h


; Attributes: bp-based frame

sub_539BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A3h
mov	esp, ebp
pop	ebp
retn
sub_539BF0 endp



; Attributes: bp-based frame

sub_539C00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5641C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539C00 endp

align 10h


; Attributes: bp-based frame

sub_539C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A4h
mov	esp, ebp
pop	ebp
retn
sub_539C20 endp



; Attributes: bp-based frame

sub_539C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D791C0
mov	esp, ebp
pop	ebp
retn
sub_539C30 endp



; Attributes: bp-based frame

sub_539C40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539C40 endp

align 10h


; Attributes: bp-based frame

sub_539C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A5h
mov	esp, ebp
pop	ebp
retn
sub_539C60 endp



; Attributes: bp-based frame

sub_539C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D791A0
mov	esp, ebp
pop	ebp
retn
sub_539C70 endp



; Attributes: bp-based frame

sub_539C80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539C80 endp

align 10h


; Attributes: bp-based frame

sub_539CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A6h
mov	esp, ebp
pop	ebp
retn
sub_539CA0 endp



; Attributes: bp-based frame

sub_539CB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79180
mov	esp, ebp
pop	ebp
retn
sub_539CB0 endp



; Attributes: bp-based frame

sub_539CC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5642E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539CC0 endp

align 10h


; Attributes: bp-based frame

sub_539CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A7h
mov	esp, ebp
pop	ebp
retn
sub_539CE0 endp



; Attributes: bp-based frame

sub_539CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79110
mov	esp, ebp
pop	ebp
retn
sub_539CF0 endp



; Attributes: bp-based frame

sub_539D00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539D00 endp

align 10h


; Attributes: bp-based frame

sub_539D20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5643A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539D20 endp

align 10h


; Attributes: bp-based frame

sub_539D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A9h
mov	esp, ebp
pop	ebp
retn
sub_539D40 endp



; Attributes: bp-based frame

sub_539D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D790F0
mov	esp, ebp
pop	ebp
retn
sub_539D50 endp



; Attributes: bp-based frame

sub_539D60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539D60 endp

align 10h


; Attributes: bp-based frame

sub_539D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2AAh
mov	esp, ebp
pop	ebp
retn
sub_539D80 endp



; Attributes: bp-based frame

sub_539D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6604h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_539D90 endp

align 10h


; Attributes: bp-based frame

sub_539DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D790D0
mov	esp, ebp
pop	ebp
retn
sub_539DB0 endp



; Attributes: bp-based frame

sub_539DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539DC0 endp

align 10h


; Attributes: bp-based frame

sub_539DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2ABh
mov	esp, ebp
pop	ebp
retn
sub_539DE0 endp



; Attributes: bp-based frame

sub_539DF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6602h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_539DF0 endp

align 10h


; Attributes: bp-based frame

sub_539E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D790B0
mov	esp, ebp
pop	ebp
retn
sub_539E10 endp



; Attributes: bp-based frame

sub_539E20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5644C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539E20 endp

align 10h


; Attributes: bp-based frame

sub_539E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2ACh
mov	esp, ebp
pop	ebp
retn
sub_539E40 endp



; Attributes: bp-based frame

sub_539E50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79090
mov	esp, ebp
pop	ebp
retn
sub_539E50 endp



; Attributes: bp-based frame

sub_539E60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539E60 endp

align 10h


; Attributes: bp-based frame

sub_539E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2AEh
mov	esp, ebp
pop	ebp
retn
sub_539E80 endp



; Attributes: bp-based frame

sub_539E90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6741h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_539E90 endp

align 10h


; Attributes: bp-based frame

sub_539EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79070
mov	esp, ebp
pop	ebp
retn
sub_539EB0 endp



; Attributes: bp-based frame

sub_539EC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539EC0 endp

align 10h


; Attributes: bp-based frame

sub_539EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2AFh
mov	esp, ebp
pop	ebp
retn
sub_539EE0 endp



; Attributes: bp-based frame

sub_539EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79050
mov	esp, ebp
pop	ebp
retn
sub_539EF0 endp



; Attributes: bp-based frame

sub_539F00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5645F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539F00 endp

align 10h


; Attributes: bp-based frame

sub_539F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B0h
mov	esp, ebp
pop	ebp
retn
sub_539F20 endp



; Attributes: bp-based frame

sub_539F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79030
mov	esp, ebp
pop	ebp
retn
sub_539F30 endp



; Attributes: bp-based frame

sub_539F40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_539F6E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_539F6E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_539F40 endp

align 10h


; Attributes: bp-based frame

sub_539F80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539F80 endp

align 10h


; Attributes: bp-based frame

sub_539FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B1h
mov	esp, ebp
pop	ebp
retn
sub_539FA0 endp



; Attributes: bp-based frame

sub_539FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D79010
mov	esp, ebp
pop	ebp
retn
sub_539FB0 endp



; Attributes: bp-based frame

sub_539FC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5646B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_539FC0 endp

align 10h


; Attributes: bp-based frame

sub_539FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B2h
mov	esp, ebp
pop	ebp
retn
sub_539FE0 endp



; Attributes: bp-based frame

sub_539FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78FF0
mov	esp, ebp
pop	ebp
retn
sub_539FF0 endp



; Attributes: bp-based frame

sub_53A000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A000 endp

align 10h


; Attributes: bp-based frame

sub_53A020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B3h
mov	esp, ebp
pop	ebp
retn
sub_53A020 endp



; Attributes: bp-based frame

sub_53A030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78FD0
mov	esp, ebp
pop	ebp
retn
sub_53A030 endp



; Attributes: bp-based frame

sub_53A040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A040 endp

align 10h


; Attributes: bp-based frame

sub_53A060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B4h
mov	esp, ebp
pop	ebp
retn
sub_53A060 endp



; Attributes: bp-based frame

sub_53A070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78FB0
mov	esp, ebp
pop	ebp
retn
sub_53A070 endp



; Attributes: bp-based frame

sub_53A080 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5647D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A080 endp

align 10h


; Attributes: bp-based frame

sub_53A0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B5h
mov	esp, ebp
pop	ebp
retn
sub_53A0A0 endp



; Attributes: bp-based frame

sub_53A0B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78F90
mov	esp, ebp
pop	ebp
retn
sub_53A0B0 endp



; Attributes: bp-based frame

sub_53A0C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A0C0 endp

align 10h


; Attributes: bp-based frame

sub_53A0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B6h
mov	esp, ebp
pop	ebp
retn
sub_53A0E0 endp



; Attributes: bp-based frame

sub_53A0F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78F70
mov	esp, ebp
pop	ebp
retn
sub_53A0F0 endp



; Attributes: bp-based frame

sub_53A100 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A100 endp

align 10h


; Attributes: bp-based frame

sub_53A120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B7h
mov	esp, ebp
pop	ebp
retn
sub_53A120 endp



; Attributes: bp-based frame

sub_53A130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78F20
mov	esp, ebp
pop	ebp
retn
sub_53A130 endp



; Attributes: bp-based frame

sub_53A140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5648F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A140 endp

align 10h


; Attributes: bp-based frame

sub_53A160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2B9h
mov	esp, ebp
pop	ebp
retn
sub_53A160 endp



; Attributes: bp-based frame

sub_53A170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78F00
mov	esp, ebp
pop	ebp
retn
sub_53A170 endp



; Attributes: bp-based frame

sub_53A180 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A180 endp

align 10h


; Attributes: bp-based frame

sub_53A1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2BAh
mov	esp, ebp
pop	ebp
retn
sub_53A1A0 endp



; Attributes: bp-based frame

sub_53A1B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78EE0
mov	esp, ebp
pop	ebp
retn
sub_53A1B0 endp



; Attributes: bp-based frame

sub_53A1C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5649B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A1C0 endp

align 10h


; Attributes: bp-based frame

sub_53A1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2BBh
mov	esp, ebp
pop	ebp
retn
sub_53A1E0 endp



; Attributes: bp-based frame

sub_53A1F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78EC0
mov	esp, ebp
pop	ebp
retn
sub_53A1F0 endp



; Attributes: bp-based frame

sub_53A200 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564A10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A200 endp

align 10h


; Attributes: bp-based frame

sub_53A220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2BCh
mov	esp, ebp
pop	ebp
retn
sub_53A220 endp



; Attributes: bp-based frame

sub_53A230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78EA0
mov	esp, ebp
pop	ebp
retn
sub_53A230 endp



; Attributes: bp-based frame

sub_53A240 proc	near

var_78=	dword ptr -78h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	ecx, [ebp+var_78]
call	sub_53A270
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53A265
mov	ecx, [ebp+var_78]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53A265:
mov	eax, [ebp+var_78]
mov	esp, ebp
pop	ebp
retn	4
sub_53A240 endp

align 10h


; Attributes: bp-based frame

sub_53A270 proc	near

var_8C=	dword ptr -8Ch

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_8C], ecx
mov	ecx, [ebp+var_8C]
add	ecx, 0A8h
call	sub_555250
mov	ecx, [ebp+var_8C]
add	ecx, 9Ch
call	sub_555250
mov	ecx, [ebp+var_8C]
add	ecx, 68h
call	sub_407E50
mov	ecx, [ebp+var_8C]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_53A270 endp

align 10h


; Attributes: bp-based frame

sub_53A2C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564A70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A2C0 endp

align 10h


; Attributes: bp-based frame

sub_53A2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2BDh
mov	esp, ebp
pop	ebp
retn
sub_53A2E0 endp



; Attributes: bp-based frame

sub_53A2F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78E80
mov	esp, ebp
pop	ebp
retn
sub_53A2F0 endp



; Attributes: bp-based frame

sub_53A300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564AE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A300 endp

align 10h


; Attributes: bp-based frame

sub_53A320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2BEh
mov	esp, ebp
pop	ebp
retn
sub_53A320 endp



; Attributes: bp-based frame

sub_53A330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78E60
mov	esp, ebp
pop	ebp
retn
sub_53A330 endp



; Attributes: bp-based frame

sub_53A340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564B40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A340 endp

align 10h


; Attributes: bp-based frame

sub_53A360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2BFh
mov	esp, ebp
pop	ebp
retn
sub_53A360 endp



; Attributes: bp-based frame

sub_53A370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78E40
mov	esp, ebp
pop	ebp
retn
sub_53A370 endp



; Attributes: bp-based frame

sub_53A380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564BA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A380 endp

align 10h


; Attributes: bp-based frame

sub_53A3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C0h
mov	esp, ebp
pop	ebp
retn
sub_53A3A0 endp



; Attributes: bp-based frame

sub_53A3B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564C00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A3B0 endp

align 10h


; Attributes: bp-based frame

sub_53A3D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C1h
mov	esp, ebp
pop	ebp
retn
sub_53A3D0 endp



; Attributes: bp-based frame

sub_53A3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78E20
mov	esp, ebp
pop	ebp
retn
sub_53A3E0 endp



; Attributes: bp-based frame

sub_53A3F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564C60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A3F0 endp

align 10h


; Attributes: bp-based frame

sub_53A410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C2h
mov	esp, ebp
pop	ebp
retn
sub_53A410 endp



; Attributes: bp-based frame

sub_53A420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78DB0
mov	esp, ebp
pop	ebp
retn
sub_53A420 endp



; Attributes: bp-based frame

sub_53A430 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 34h
call	sub_555570
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53A460
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53A460:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_53A430 endp

align 10h


; Attributes: bp-based frame

sub_53A470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564CC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A470 endp

align 10h


; Attributes: bp-based frame

sub_53A490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C3h
mov	esp, ebp
pop	ebp
retn
sub_53A490 endp



; Attributes: bp-based frame

sub_53A4A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564D20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A4A0 endp

align 10h


; Attributes: bp-based frame

sub_53A4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C4h
mov	esp, ebp
pop	ebp
retn
sub_53A4C0 endp



; Attributes: bp-based frame

sub_53A4D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564D80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A4D0 endp

align 10h


; Attributes: bp-based frame

sub_53A4F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C5h
mov	esp, ebp
pop	ebp
retn
sub_53A4F0 endp



; Attributes: bp-based frame

sub_53A500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78D90
mov	esp, ebp
pop	ebp
retn
sub_53A500 endp



; Attributes: bp-based frame

sub_53A510 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564DE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A510 endp

align 10h


; Attributes: bp-based frame

sub_53A530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C6h
mov	esp, ebp
pop	ebp
retn
sub_53A530 endp



; Attributes: bp-based frame

sub_53A540 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564E40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A540 endp

align 10h


; Attributes: bp-based frame

sub_53A560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C7h
mov	esp, ebp
pop	ebp
retn
sub_53A560 endp



; Attributes: bp-based frame

sub_53A570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78D50
mov	esp, ebp
pop	ebp
retn
sub_53A570 endp



; Attributes: bp-based frame

sub_53A580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564EA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A580 endp

align 10h


; Attributes: bp-based frame

sub_53A5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C8h
mov	esp, ebp
pop	ebp
retn
sub_53A5A0 endp



; Attributes: bp-based frame

sub_53A5B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78D30
mov	esp, ebp
pop	ebp
retn
sub_53A5B0 endp



; Attributes: bp-based frame

sub_53A5C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564F00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A5C0 endp

align 10h


; Attributes: bp-based frame

sub_53A5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2C9h
mov	esp, ebp
pop	ebp
retn
sub_53A5E0 endp



; Attributes: bp-based frame

sub_53A5F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78D10
mov	esp, ebp
pop	ebp
retn
sub_53A5F0 endp



; Attributes: bp-based frame

sub_53A600 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564F60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A600 endp

align 10h


; Attributes: bp-based frame

sub_53A620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2CAh
mov	esp, ebp
pop	ebp
retn
sub_53A620 endp



; Attributes: bp-based frame

sub_53A630 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 4100h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53A630 endp

align 10h


; Attributes: bp-based frame

sub_53A650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78CF0
mov	esp, ebp
pop	ebp
retn
sub_53A650 endp



; Attributes: bp-based frame

sub_53A660 proc	near

var_2C=	dword ptr -2Ch
var_1C=	dword ptr -1Ch
var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 14h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 3Ch
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 64h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 0ECh
call	sub_402390
lea	ecx, [ebp+var_4]
call	nullsub_1
mov	eax, [ebp+var_2C]
add	eax, 114h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+4], 0
push	0
lea	eax, [ebp+var_5]
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_489990
lea	ecx, [ebp+var_6]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 120h
call	sub_402390
lea	ecx, [ebp+var_6]
call	nullsub_1
lea	ecx, [ebp+var_7]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 148h
call	sub_402390
lea	ecx, [ebp+var_7]
call	nullsub_1
lea	ecx, [ebp+var_8]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 180h
call	sub_402390
lea	ecx, [ebp+var_8]
call	nullsub_1
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_53A660 endp

align 10h


; Attributes: bp-based frame

sub_53A770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_564FC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A770 endp

align 10h


; Attributes: bp-based frame

sub_53A790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2CBh
mov	esp, ebp
pop	ebp
retn
sub_53A790 endp



; Attributes: bp-based frame

sub_53A7A0 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 20h
call	sub_4EA560
mov	ecx, [ebp+var_2C]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53A7D0
mov	ecx, [ebp+var_2C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53A7D0:
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_53A7A0 endp

align 10h


; Attributes: bp-based frame

sub_53A7E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565030
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A7E0 endp

align 10h


; Attributes: bp-based frame

sub_53A800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2CCh
mov	esp, ebp
pop	ebp
retn
sub_53A800 endp



; Attributes: bp-based frame

sub_53A810 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5650A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A810 endp

align 10h


; Attributes: bp-based frame

sub_53A830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2CDh
mov	esp, ebp
pop	ebp
retn
sub_53A830 endp



; Attributes: bp-based frame

sub_53A840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78C80
mov	esp, ebp
pop	ebp
retn
sub_53A840 endp



; Attributes: bp-based frame

sub_53A850 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A850 endp

align 10h


; Attributes: bp-based frame

sub_53A870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2CFh
mov	esp, ebp
pop	ebp
retn
sub_53A870 endp



; Attributes: bp-based frame

sub_53A880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A880 endp

align 10h


; Attributes: bp-based frame

sub_53A8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D0h
mov	esp, ebp
pop	ebp
retn
sub_53A8A0 endp



; Attributes: bp-based frame

sub_53A8B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78C60
mov	esp, ebp
pop	ebp
retn
sub_53A8B0 endp



; Attributes: bp-based frame

sub_53A8C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5651C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A8C0 endp

align 10h


; Attributes: bp-based frame

sub_53A8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D1h
mov	esp, ebp
pop	ebp
retn
sub_53A8E0 endp



; Attributes: bp-based frame

sub_53A8F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78C40
mov	esp, ebp
pop	ebp
retn
sub_53A8F0 endp



; Attributes: bp-based frame

sub_53A900 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A900 endp

align 10h


; Attributes: bp-based frame

sub_53A920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D2h
mov	esp, ebp
pop	ebp
retn
sub_53A920 endp



; Attributes: bp-based frame

sub_53A930 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78C20
mov	esp, ebp
pop	ebp
retn
sub_53A930 endp



; Attributes: bp-based frame

sub_53A940 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_57D1E0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53A96E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53A96E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53A940 endp

align 10h


; Attributes: bp-based frame

sub_53A980 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A980 endp

align 10h


; Attributes: bp-based frame

sub_53A9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D3h
mov	esp, ebp
pop	ebp
retn
sub_53A9A0 endp



; Attributes: bp-based frame

sub_53A9B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5652E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A9B0 endp

align 10h


; Attributes: bp-based frame

sub_53A9D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D4h
mov	esp, ebp
pop	ebp
retn
sub_53A9D0 endp



; Attributes: bp-based frame

sub_53A9E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53A9E0 endp

align 10h


; Attributes: bp-based frame

sub_53AA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D5h
mov	esp, ebp
pop	ebp
retn
sub_53AA00 endp



; Attributes: bp-based frame

sub_53AA10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 645h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53AA10 endp

align 10h


; Attributes: bp-based frame

sub_53AA30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5653A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AA30 endp

align 10h


; Attributes: bp-based frame

sub_53AA50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D6h
mov	esp, ebp
pop	ebp
retn
sub_53AA50 endp



; Attributes: bp-based frame

sub_53AA60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AA60 endp

align 10h


; Attributes: bp-based frame

sub_53AA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D7h
mov	esp, ebp
pop	ebp
retn
sub_53AA80 endp



; Attributes: bp-based frame

sub_53AA90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78BE0
mov	esp, ebp
pop	ebp
retn
sub_53AA90 endp



; Attributes: bp-based frame

sub_53AAA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AAA0 endp

align 10h


; Attributes: bp-based frame

sub_53AAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D8h
mov	esp, ebp
pop	ebp
retn
sub_53AAC0 endp



; Attributes: bp-based frame

sub_53AAD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78BC0
mov	esp, ebp
pop	ebp
retn
sub_53AAD0 endp



; Attributes: bp-based frame

sub_53AAE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5654C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AAE0 endp

align 10h


; Attributes: bp-based frame

sub_53AB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2D9h
mov	esp, ebp
pop	ebp
retn
sub_53AB00 endp



; Attributes: bp-based frame

sub_53AB10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78BA0
mov	esp, ebp
pop	ebp
retn
sub_53AB10 endp



; Attributes: bp-based frame

sub_53AB20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AB20 endp

align 10h


; Attributes: bp-based frame

sub_53AB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2DAh
mov	esp, ebp
pop	ebp
retn
sub_53AB40 endp



; Attributes: bp-based frame

sub_53AB50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78B80
mov	esp, ebp
pop	ebp
retn
sub_53AB50 endp



; Attributes: bp-based frame

sub_53AB60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5655B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AB60 endp

align 10h


; Attributes: bp-based frame

sub_53AB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2DBh
mov	esp, ebp
pop	ebp
retn
sub_53AB80 endp



; Attributes: bp-based frame

sub_53AB90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78B60
mov	esp, ebp
pop	ebp
retn
sub_53AB90 endp



; Attributes: bp-based frame

sub_53ABA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565610
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53ABA0 endp

align 10h


; Attributes: bp-based frame

sub_53ABC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2DCh
mov	esp, ebp
pop	ebp
retn
sub_53ABC0 endp



; Attributes: bp-based frame

sub_53ABD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78B10
mov	esp, ebp
pop	ebp
retn
sub_53ABD0 endp



; Attributes: bp-based frame

sub_53ABE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565670
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53ABE0 endp

align 10h


; Attributes: bp-based frame

sub_53AC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2DDh
mov	esp, ebp
pop	ebp
retn
sub_53AC00 endp



; Attributes: bp-based frame

sub_53AC10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78AC0
mov	esp, ebp
pop	ebp
retn
sub_53AC10 endp



; Attributes: bp-based frame

sub_53AC20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5656D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AC20 endp

align 10h


; Attributes: bp-based frame

sub_53AC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2DEh
mov	esp, ebp
pop	ebp
retn
sub_53AC40 endp



; Attributes: bp-based frame

sub_53AC50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78AA0
mov	esp, ebp
pop	ebp
retn
sub_53AC50 endp



; Attributes: bp-based frame

sub_53AC60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565730
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AC60 endp

align 10h


; Attributes: bp-based frame

sub_53AC80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2DFh
mov	esp, ebp
pop	ebp
retn
sub_53AC80 endp



; Attributes: bp-based frame

sub_53AC90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78A50
mov	esp, ebp
pop	ebp
retn
sub_53AC90 endp



; Attributes: bp-based frame

sub_53ACA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565790
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53ACA0 endp

align 10h


; Attributes: bp-based frame

sub_53ACC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E0h
mov	esp, ebp
pop	ebp
retn
sub_53ACC0 endp



; Attributes: bp-based frame

sub_53ACD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78A30
mov	esp, ebp
pop	ebp
retn
sub_53ACD0 endp



; Attributes: bp-based frame

sub_53ACE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53AD19
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53AD19:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53ACE0 endp

align 10h


; Attributes: bp-based frame

sub_53AD30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5657F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AD30 endp

align 10h


; Attributes: bp-based frame

sub_53AD50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E1h
mov	esp, ebp
pop	ebp
retn
sub_53AD50 endp



; Attributes: bp-based frame

sub_53AD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78A10
mov	esp, ebp
pop	ebp
retn
sub_53AD60 endp



; Attributes: bp-based frame

sub_53AD70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565860
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AD70 endp

align 10h


; Attributes: bp-based frame

sub_53AD90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E2h
mov	esp, ebp
pop	ebp
retn
sub_53AD90 endp



; Attributes: bp-based frame

sub_53ADA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D789F0
mov	esp, ebp
pop	ebp
retn
sub_53ADA0 endp



; Attributes: bp-based frame

sub_53ADB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5658C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53ADB0 endp

align 10h


; Attributes: bp-based frame

sub_53ADD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E3h
mov	esp, ebp
pop	ebp
retn
sub_53ADD0 endp



; Attributes: bp-based frame

sub_53ADE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D789D0
mov	esp, ebp
pop	ebp
retn
sub_53ADE0 endp



; Attributes: bp-based frame

sub_53ADF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_10FB7C0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53AE45
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53AE45:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_53ADF0 endp

align 10h


; Attributes: bp-based frame

sub_53AE60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565920
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AE60 endp

align 10h


; Attributes: bp-based frame

sub_53AE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E4h
mov	esp, ebp
pop	ebp
retn
sub_53AE80 endp



; Attributes: bp-based frame

sub_53AE90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53AEC9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53AEC9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53AE90 endp

align 10h


; Attributes: bp-based frame

sub_53AEE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5659B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AEE0 endp

align 10h


; Attributes: bp-based frame

sub_53AF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E5h
mov	esp, ebp
pop	ebp
retn
sub_53AF00 endp



; Attributes: bp-based frame

sub_53AF10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565A10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AF10 endp

align 10h


; Attributes: bp-based frame

sub_53AF30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E7h
mov	esp, ebp
pop	ebp
retn
sub_53AF30 endp



; Attributes: bp-based frame

sub_53AF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78980
mov	esp, ebp
pop	ebp
retn
sub_53AF40 endp



; Attributes: bp-based frame

sub_53AF50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565A70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AF50 endp

align 10h


; Attributes: bp-based frame

sub_53AF70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E8h
mov	esp, ebp
pop	ebp
retn
sub_53AF70 endp



; Attributes: bp-based frame

sub_53AF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78930
mov	esp, ebp
pop	ebp
retn
sub_53AF80 endp



; Attributes: bp-based frame

sub_53AF90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565AD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AF90 endp

align 10h


; Attributes: bp-based frame

sub_53AFB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2E9h
mov	esp, ebp
pop	ebp
retn
sub_53AFB0 endp



; Attributes: bp-based frame

sub_53AFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D788E0
mov	esp, ebp
pop	ebp
retn
sub_53AFC0 endp



; Attributes: bp-based frame

sub_53AFD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565B30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53AFD0 endp

align 10h


; Attributes: bp-based frame

sub_53AFF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2EAh
mov	esp, ebp
pop	ebp
retn
sub_53AFF0 endp



; Attributes: bp-based frame

sub_53B000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D788C0
mov	esp, ebp
pop	ebp
retn
sub_53B000 endp



; Attributes: bp-based frame

sub_53B010 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565B90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B010 endp

align 10h


; Attributes: bp-based frame

sub_53B030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2EBh
mov	esp, ebp
pop	ebp
retn
sub_53B030 endp



; Attributes: bp-based frame

sub_53B040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D788A0
mov	esp, ebp
pop	ebp
retn
sub_53B040 endp



; Attributes: bp-based frame

sub_53B050 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565BF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B050 endp

align 10h


; Attributes: bp-based frame

sub_53B070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2ECh
mov	esp, ebp
pop	ebp
retn
sub_53B070 endp



; Attributes: bp-based frame

sub_53B080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78880
mov	esp, ebp
pop	ebp
retn
sub_53B080 endp



; Attributes: bp-based frame

sub_53B090 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565C50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B090 endp

align 10h


; Attributes: bp-based frame

sub_53B0B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2EDh
mov	esp, ebp
pop	ebp
retn
sub_53B0B0 endp



; Attributes: bp-based frame

sub_53B0C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565CC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B0C0 endp

align 10h


; Attributes: bp-based frame

sub_53B0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2EEh
mov	esp, ebp
pop	ebp
retn
sub_53B0E0 endp



; Attributes: bp-based frame

sub_53B0F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78860
mov	esp, ebp
pop	ebp
retn
sub_53B0F0 endp



; Attributes: bp-based frame

sub_53B100 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565D20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B100 endp

align 10h


; Attributes: bp-based frame

sub_53B120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2EFh
mov	esp, ebp
pop	ebp
retn
sub_53B120 endp



; Attributes: bp-based frame

sub_53B130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78840
mov	esp, ebp
pop	ebp
retn
sub_53B130 endp



; Attributes: bp-based frame

sub_53B140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565D80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B140 endp

align 10h


; Attributes: bp-based frame

sub_53B160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F0h
mov	esp, ebp
pop	ebp
retn
sub_53B160 endp



; Attributes: bp-based frame

sub_53B170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78820
mov	esp, ebp
pop	ebp
retn
sub_53B170 endp



; Attributes: bp-based frame

sub_53B180 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565DE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B180 endp

align 10h


; Attributes: bp-based frame

sub_53B1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F1h
mov	esp, ebp
pop	ebp
retn
sub_53B1A0 endp



; Attributes: bp-based frame

sub_53B1B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5100h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B1B0 endp

align 10h


; Attributes: bp-based frame

sub_53B1D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78800
mov	esp, ebp
pop	ebp
retn
sub_53B1D0 endp



; Attributes: bp-based frame

sub_53B1E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565E40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B1E0 endp

align 10h


; Attributes: bp-based frame

sub_53B200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F2h
mov	esp, ebp
pop	ebp
retn
sub_53B200 endp



; Attributes: bp-based frame

sub_53B210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 604h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B210 endp

align 10h


; Attributes: bp-based frame

sub_53B230 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565EA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B230 endp

align 10h


; Attributes: bp-based frame

sub_53B250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F3h
mov	esp, ebp
pop	ebp
retn
sub_53B250 endp



; Attributes: bp-based frame

sub_53B260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D787E0
mov	esp, ebp
pop	ebp
retn
sub_53B260 endp



; Attributes: bp-based frame

sub_53B270 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565F00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B270 endp

align 10h


; Attributes: bp-based frame

sub_53B290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F4h
mov	esp, ebp
pop	ebp
retn
sub_53B290 endp



; Attributes: bp-based frame

sub_53B2A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D787C0
mov	esp, ebp
pop	ebp
retn
sub_53B2A0 endp



; Attributes: bp-based frame

sub_53B2B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565F60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B2B0 endp

align 10h


; Attributes: bp-based frame

sub_53B2D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F5h
mov	esp, ebp
pop	ebp
retn
sub_53B2D0 endp



; Attributes: bp-based frame

sub_53B2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D787A0
mov	esp, ebp
pop	ebp
retn
sub_53B2E0 endp



; Attributes: bp-based frame

sub_53B2F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_565FC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B2F0 endp

align 10h


; Attributes: bp-based frame

sub_53B310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F8h
mov	esp, ebp
pop	ebp
retn
sub_53B310 endp



; Attributes: bp-based frame

sub_53B320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78730
mov	esp, ebp
pop	ebp
retn
sub_53B320 endp



; Attributes: bp-based frame

sub_53B330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566020
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B330 endp

align 10h


; Attributes: bp-based frame

sub_53B350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2F9h
mov	esp, ebp
pop	ebp
retn
sub_53B350 endp



; Attributes: bp-based frame

sub_53B360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78710
mov	esp, ebp
pop	ebp
retn
sub_53B360 endp



; Attributes: bp-based frame

sub_53B370 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566080
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B370 endp

align 10h


; Attributes: bp-based frame

sub_53B390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2FAh
mov	esp, ebp
pop	ebp
retn
sub_53B390 endp



; Attributes: bp-based frame

sub_53B3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D786F0
mov	esp, ebp
pop	ebp
retn
sub_53B3A0 endp



; Attributes: bp-based frame

sub_53B3B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5660E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B3B0 endp

align 10h


; Attributes: bp-based frame

sub_53B3D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2FBh
mov	esp, ebp
pop	ebp
retn
sub_53B3D0 endp



; Attributes: bp-based frame

sub_53B3E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7641h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B3E0 endp

align 10h


; Attributes: bp-based frame

sub_53B400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D786D0
mov	esp, ebp
pop	ebp
retn
sub_53B400 endp



; Attributes: bp-based frame

sub_53B410 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566140
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B410 endp

align 10h


; Attributes: bp-based frame

sub_53B430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2FCh
mov	esp, ebp
pop	ebp
retn
sub_53B430 endp



; Attributes: bp-based frame

sub_53B440 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6F45h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B440 endp

align 10h


; Attributes: bp-based frame

sub_53B460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D786B0
mov	esp, ebp
pop	ebp
retn
sub_53B460 endp



; Attributes: bp-based frame

sub_53B470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5661A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B470 endp

align 10h


; Attributes: bp-based frame

sub_53B490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2FDh
mov	esp, ebp
pop	ebp
retn
sub_53B490 endp



; Attributes: bp-based frame

sub_53B4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78690
mov	esp, ebp
pop	ebp
retn
sub_53B4A0 endp



; Attributes: bp-based frame

sub_53B4B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566210
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B4B0 endp

align 10h


; Attributes: bp-based frame

sub_53B4D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2FEh
mov	esp, ebp
pop	ebp
retn
sub_53B4D0 endp



; Attributes: bp-based frame

sub_53B4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78670
mov	esp, ebp
pop	ebp
retn
sub_53B4E0 endp



; Attributes: bp-based frame

sub_53B4F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B4F0 endp

align 10h


; Attributes: bp-based frame

sub_53B510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2FFh
mov	esp, ebp
pop	ebp
retn
sub_53B510 endp



; Attributes: bp-based frame

sub_53B520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5662E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B520 endp

align 10h


; Attributes: bp-based frame

sub_53B540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 300h
mov	esp, ebp
pop	ebp
retn
sub_53B540 endp



; Attributes: bp-based frame

sub_53B550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B550 endp

align 10h


; Attributes: bp-based frame

sub_53B570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 301h
mov	esp, ebp
pop	ebp
retn
sub_53B570 endp



; Attributes: bp-based frame

sub_53B580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5663D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B580 endp

align 10h


; Attributes: bp-based frame

sub_53B5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 302h
mov	esp, ebp
pop	ebp
retn
sub_53B5A0 endp



; Attributes: bp-based frame

sub_53B5B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F02h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B5B0 endp

align 10h


; Attributes: bp-based frame

sub_53B5D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78650
mov	esp, ebp
pop	ebp
retn
sub_53B5D0 endp



; Attributes: bp-based frame

sub_53B5E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566430
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B5E0 endp

align 10h


; Attributes: bp-based frame

sub_53B600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 303h
mov	esp, ebp
pop	ebp
retn
sub_53B600 endp



; Attributes: bp-based frame

sub_53B610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78630
mov	esp, ebp
pop	ebp
retn
sub_53B610 endp



; Attributes: bp-based frame

sub_53B620 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566490
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B620 endp

align 10h


; Attributes: bp-based frame

sub_53B640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 304h
mov	esp, ebp
pop	ebp
retn
sub_53B640 endp



; Attributes: bp-based frame

sub_53B650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78610
mov	esp, ebp
pop	ebp
retn
sub_53B650 endp



; Attributes: bp-based frame

sub_53B660 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_53B690
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53B683
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53B683:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53B660 endp

align 10h


; Attributes: bp-based frame

sub_53B690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 74h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_53B690 endp

align 10h


; Attributes: bp-based frame

sub_53B6D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5664F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B6D0 endp

align 10h


; Attributes: bp-based frame

sub_53B6F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 305h
mov	esp, ebp
pop	ebp
retn
sub_53B6F0 endp



; Attributes: bp-based frame

sub_53B700 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1601h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B700 endp

align 10h


; Attributes: bp-based frame

sub_53B720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D785F0
mov	esp, ebp
pop	ebp
retn
sub_53B720 endp



; Attributes: bp-based frame

sub_53B730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566560
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B730 endp

align 10h


; Attributes: bp-based frame

sub_53B750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 306h
mov	esp, ebp
pop	ebp
retn
sub_53B750 endp



; Attributes: bp-based frame

sub_53B760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D785D0
mov	esp, ebp
pop	ebp
retn
sub_53B760 endp



; Attributes: bp-based frame

sub_53B770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5665C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B770 endp

align 10h


; Attributes: bp-based frame

sub_53B790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 307h
mov	esp, ebp
pop	ebp
retn
sub_53B790 endp



; Attributes: bp-based frame

sub_53B7A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7601h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B7A0 endp

align 10h


; Attributes: bp-based frame

sub_53B7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78580
mov	esp, ebp
pop	ebp
retn
sub_53B7C0 endp



; Attributes: bp-based frame

sub_53B7D0 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 30h
call	sub_555660
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53B800
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53B800:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_53B7D0 endp

align 10h


; Attributes: bp-based frame

sub_53B810 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566620
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B810 endp

align 10h


; Attributes: bp-based frame

sub_53B830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 308h
mov	esp, ebp
pop	ebp
retn
sub_53B830 endp



; Attributes: bp-based frame

sub_53B840 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566680
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B840 endp

align 10h


; Attributes: bp-based frame

sub_53B860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 309h
mov	esp, ebp
pop	ebp
retn
sub_53B860 endp



; Attributes: bp-based frame

sub_53B870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5666E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B870 endp

align 10h


; Attributes: bp-based frame

sub_53B890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 30Ah
mov	esp, ebp
pop	ebp
retn
sub_53B890 endp



; Attributes: bp-based frame

sub_53B8A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566750
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B8A0 endp

align 10h


; Attributes: bp-based frame

sub_53B8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 30Bh
mov	esp, ebp
pop	ebp
retn
sub_53B8C0 endp



; Attributes: bp-based frame

sub_53B8D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5667B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B8D0 endp

align 10h


; Attributes: bp-based frame

sub_53B8F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 30Dh
mov	esp, ebp
pop	ebp
retn
sub_53B8F0 endp



; Attributes: bp-based frame

sub_53B900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0F41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B900 endp

align 10h


; Attributes: bp-based frame

sub_53B920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78560
mov	esp, ebp
pop	ebp
retn
sub_53B920 endp



; Attributes: bp-based frame

sub_53B930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566810
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B930 endp

align 10h


; Attributes: bp-based frame

sub_53B950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 30Fh
mov	esp, ebp
pop	ebp
retn
sub_53B950 endp



; Attributes: bp-based frame

sub_53B960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7940h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53B960 endp

align 10h


; Attributes: bp-based frame

sub_53B980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78540
mov	esp, ebp
pop	ebp
retn
sub_53B980 endp



; Attributes: bp-based frame

sub_53B990 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566870
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B990 endp

align 10h


; Attributes: bp-based frame

sub_53B9B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 310h
mov	esp, ebp
pop	ebp
retn
sub_53B9B0 endp



; Attributes: bp-based frame

sub_53B9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78520
mov	esp, ebp
pop	ebp
retn
sub_53B9C0 endp



; Attributes: bp-based frame

sub_53B9D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5668D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53B9D0 endp

align 10h


; Attributes: bp-based frame

sub_53B9F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 311h
mov	esp, ebp
pop	ebp
retn
sub_53B9F0 endp



; Attributes: bp-based frame

sub_53BA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78500
mov	esp, ebp
pop	ebp
retn
sub_53BA00 endp



; Attributes: bp-based frame

sub_53BA10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566930
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BA10 endp

align 10h


; Attributes: bp-based frame

sub_53BA30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 312h
mov	esp, ebp
pop	ebp
retn
sub_53BA30 endp



; Attributes: bp-based frame

sub_53BA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D784E0
mov	esp, ebp
pop	ebp
retn
sub_53BA40 endp



; Attributes: bp-based frame

sub_53BA50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566990
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BA50 endp

align 10h


; Attributes: bp-based frame

sub_53BA70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 313h
mov	esp, ebp
pop	ebp
retn
sub_53BA70 endp



; Attributes: bp-based frame

sub_53BA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D784C0
mov	esp, ebp
pop	ebp
retn
sub_53BA80 endp



; Attributes: bp-based frame

sub_53BA90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5669F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BA90 endp

align 10h


; Attributes: bp-based frame

sub_53BAB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 314h
mov	esp, ebp
pop	ebp
retn
sub_53BAB0 endp



; Attributes: bp-based frame

sub_53BAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D784A0
mov	esp, ebp
pop	ebp
retn
sub_53BAC0 endp



; Attributes: bp-based frame

sub_53BAD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566A50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BAD0 endp

align 10h


; Attributes: bp-based frame

sub_53BAF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 315h
mov	esp, ebp
pop	ebp
retn
sub_53BAF0 endp



; Attributes: bp-based frame

sub_53BB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78480
mov	esp, ebp
pop	ebp
retn
sub_53BB00 endp



; Attributes: bp-based frame

sub_53BB10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566AB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BB10 endp

align 10h


; Attributes: bp-based frame

sub_53BB30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 316h
mov	esp, ebp
pop	ebp
retn
sub_53BB30 endp



; Attributes: bp-based frame

sub_53BB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78460
mov	esp, ebp
pop	ebp
retn
sub_53BB40 endp



; Attributes: bp-based frame

sub_53BB50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566B10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BB50 endp

align 10h


; Attributes: bp-based frame

sub_53BB70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 317h
mov	esp, ebp
pop	ebp
retn
sub_53BB70 endp



; Attributes: bp-based frame

sub_53BB80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566B70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BB80 endp

align 10h


; Attributes: bp-based frame

sub_53BBA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 318h
mov	esp, ebp
pop	ebp
retn
sub_53BBA0 endp



; Attributes: bp-based frame

sub_53BBB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566BD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BBB0 endp

align 10h


; Attributes: bp-based frame

sub_53BBD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 319h
mov	esp, ebp
pop	ebp
retn
sub_53BBD0 endp



; Attributes: bp-based frame

sub_53BBE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BBE0 endp

align 10h


; Attributes: bp-based frame

sub_53BC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 31Ah
mov	esp, ebp
pop	ebp
retn
sub_53BC00 endp



; Attributes: bp-based frame

sub_53BC10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 705h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53BC10 endp

align 10h


; Attributes: bp-based frame

sub_53BC30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566C90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BC30 endp

align 10h


; Attributes: bp-based frame

sub_53BC50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 31Bh
mov	esp, ebp
pop	ebp
retn
sub_53BC50 endp



; Attributes: bp-based frame

sub_53BC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78440
mov	esp, ebp
pop	ebp
retn
sub_53BC60 endp



; Attributes: bp-based frame

sub_53BC70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566CF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BC70 endp

align 10h


; Attributes: bp-based frame

sub_53BC90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 31Ch
mov	esp, ebp
pop	ebp
retn
sub_53BC90 endp



; Attributes: bp-based frame

sub_53BCA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78420
mov	esp, ebp
pop	ebp
retn
sub_53BCA0 endp



; Attributes: bp-based frame

sub_53BCB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566D50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BCB0 endp

align 10h


; Attributes: bp-based frame

sub_53BCD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 31Dh
mov	esp, ebp
pop	ebp
retn
sub_53BCD0 endp



; Attributes: bp-based frame

sub_53BCE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53BCE0 endp

align 10h


; Attributes: bp-based frame

sub_53BD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78400
mov	esp, ebp
pop	ebp
retn
sub_53BD00 endp



; Attributes: bp-based frame

sub_53BD10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566DB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BD10 endp

align 10h


; Attributes: bp-based frame

sub_53BD30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 31Eh
mov	esp, ebp
pop	ebp
retn
sub_53BD30 endp



; Attributes: bp-based frame

sub_53BD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D783E0
mov	esp, ebp
pop	ebp
retn
sub_53BD40 endp



; Attributes: bp-based frame

sub_53BD50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566E10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BD50 endp

align 10h


; Attributes: bp-based frame

sub_53BD70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 31Fh
mov	esp, ebp
pop	ebp
retn
sub_53BD70 endp



; Attributes: bp-based frame

sub_53BD80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D783C0
mov	esp, ebp
pop	ebp
retn
sub_53BD80 endp



; Attributes: bp-based frame

sub_53BD90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566E70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BD90 endp

align 10h


; Attributes: bp-based frame

sub_53BDB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 320h
mov	esp, ebp
pop	ebp
retn
sub_53BDB0 endp



; Attributes: bp-based frame

sub_53BDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D783A0
mov	esp, ebp
pop	ebp
retn
sub_53BDC0 endp



; Attributes: bp-based frame

sub_53BDD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566ED0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BDD0 endp

align 10h


; Attributes: bp-based frame

sub_53BDF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 321h
mov	esp, ebp
pop	ebp
retn
sub_53BDF0 endp



; Attributes: bp-based frame

sub_53BE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78380
mov	esp, ebp
pop	ebp
retn
sub_53BE00 endp



; Attributes: bp-based frame

sub_53BE10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566F30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BE10 endp

align 10h


; Attributes: bp-based frame

sub_53BE30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 325h
mov	esp, ebp
pop	ebp
retn
sub_53BE30 endp



; Attributes: bp-based frame

sub_53BE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78360
mov	esp, ebp
pop	ebp
retn
sub_53BE40 endp



; Attributes: bp-based frame

sub_53BE50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566F90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BE50 endp

align 10h


; Attributes: bp-based frame

sub_53BE70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 326h
mov	esp, ebp
pop	ebp
retn
sub_53BE70 endp



; Attributes: bp-based frame

sub_53BE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78340
mov	esp, ebp
pop	ebp
retn
sub_53BE80 endp



; Attributes: bp-based frame

sub_53BE90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_566FF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BE90 endp

align 10h


; Attributes: bp-based frame

sub_53BEB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 327h
mov	esp, ebp
pop	ebp
retn
sub_53BEB0 endp



; Attributes: bp-based frame

sub_53BEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78320
mov	esp, ebp
pop	ebp
retn
sub_53BEC0 endp



; Attributes: bp-based frame

sub_53BED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567050
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BED0 endp

align 10h


; Attributes: bp-based frame

sub_53BEF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 328h
mov	esp, ebp
pop	ebp
retn
sub_53BEF0 endp



; Attributes: bp-based frame

sub_53BF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78300
mov	esp, ebp
pop	ebp
retn
sub_53BF00 endp



; Attributes: bp-based frame

sub_53BF10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5670B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BF10 endp

align 10h


; Attributes: bp-based frame

sub_53BF30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 329h
mov	esp, ebp
pop	ebp
retn
sub_53BF30 endp



; Attributes: bp-based frame

sub_53BF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D782E0
mov	esp, ebp
pop	ebp
retn
sub_53BF40 endp



; Attributes: bp-based frame

sub_53BF50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567110
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BF50 endp

align 10h


; Attributes: bp-based frame

sub_53BF70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 32Ch
mov	esp, ebp
pop	ebp
retn
sub_53BF70 endp



; Attributes: bp-based frame

sub_53BF80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567170
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BF80 endp

align 10h


; Attributes: bp-based frame

sub_53BFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 32Dh
mov	esp, ebp
pop	ebp
retn
sub_53BFA0 endp



; Attributes: bp-based frame

sub_53BFB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5671D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BFB0 endp

align 10h


; Attributes: bp-based frame

sub_53BFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 32Eh
mov	esp, ebp
pop	ebp
retn
sub_53BFD0 endp



; Attributes: bp-based frame

sub_53BFE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567230
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53BFE0 endp

align 10h


; Attributes: bp-based frame

sub_53C000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 32Fh
mov	esp, ebp
pop	ebp
retn
sub_53C000 endp



; Attributes: bp-based frame

sub_53C010 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567290
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C010 endp

align 10h


; Attributes: bp-based frame

sub_53C030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 330h
mov	esp, ebp
pop	ebp
retn
sub_53C030 endp



; Attributes: bp-based frame

sub_53C040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5672F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C040 endp

align 10h


; Attributes: bp-based frame

sub_53C060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 331h
mov	esp, ebp
pop	ebp
retn
sub_53C060 endp



; Attributes: bp-based frame

sub_53C070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D782C0
mov	esp, ebp
pop	ebp
retn
sub_53C070 endp



; Attributes: bp-based frame

sub_53C080 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53C0AE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53C0AE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53C080 endp

align 10h


; Attributes: bp-based frame

sub_53C0C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C0C0 endp

align 10h


; Attributes: bp-based frame

sub_53C0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 332h
mov	esp, ebp
pop	ebp
retn
sub_53C0E0 endp



; Attributes: bp-based frame

sub_53C0F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D782A0
mov	esp, ebp
pop	ebp
retn
sub_53C0F0 endp



; Attributes: bp-based frame

sub_53C100 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5673B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C100 endp

align 10h


; Attributes: bp-based frame

sub_53C120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 333h
mov	esp, ebp
pop	ebp
retn
sub_53C120 endp



; Attributes: bp-based frame

sub_53C130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78280
mov	esp, ebp
pop	ebp
retn
sub_53C130 endp



; Attributes: bp-based frame

sub_53C140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567410
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C140 endp

align 10h


; Attributes: bp-based frame

sub_53C160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 334h
mov	esp, ebp
pop	ebp
retn
sub_53C160 endp



; Attributes: bp-based frame

sub_53C170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78260
mov	esp, ebp
pop	ebp
retn
sub_53C170 endp



; Attributes: bp-based frame

sub_53C180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_42D160
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53C1A3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53C1A3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53C180 endp

align 10h


; Attributes: bp-based frame

sub_53C1B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_53C1E1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D990
mov	[ebp+var_C], eax
jmp	short loc_53C1E8

loc_53C1E1:
mov	[ebp+var_C], 0

loc_53C1E8:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_53C1B0 endp

align 10h


; Attributes: bp-based frame

sub_53C200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 335h
mov	esp, ebp
pop	ebp
retn
sub_53C200 endp



; Attributes: bp-based frame

sub_53C210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78240
mov	esp, ebp
pop	ebp
retn
sub_53C210 endp



; Attributes: bp-based frame

sub_53C220 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567470
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C220 endp

align 10h


; Attributes: bp-based frame

sub_53C240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 336h
mov	esp, ebp
pop	ebp
retn
sub_53C240 endp



; Attributes: bp-based frame

sub_53C250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78220
mov	esp, ebp
pop	ebp
retn
sub_53C250 endp



; Attributes: bp-based frame

sub_53C260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5674D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C260 endp

align 10h


; Attributes: bp-based frame

sub_53C280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 337h
mov	esp, ebp
pop	ebp
retn
sub_53C280 endp



; Attributes: bp-based frame

sub_53C290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78200
mov	esp, ebp
pop	ebp
retn
sub_53C290 endp



; Attributes: bp-based frame

sub_53C2A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567530
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C2A0 endp

align 10h


; Attributes: bp-based frame

sub_53C2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 338h
mov	esp, ebp
pop	ebp
retn
sub_53C2C0 endp



; Attributes: bp-based frame

sub_53C2D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D781E0
mov	esp, ebp
pop	ebp
retn
sub_53C2D0 endp



; Attributes: bp-based frame

sub_53C2E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C2E0 endp

align 10h


; Attributes: bp-based frame

sub_53C300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 339h
mov	esp, ebp
pop	ebp
retn
sub_53C300 endp



; Attributes: bp-based frame

sub_53C310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D781C0
mov	esp, ebp
pop	ebp
retn
sub_53C310 endp



; Attributes: bp-based frame

sub_53C320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5675F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C320 endp

align 10h


; Attributes: bp-based frame

sub_53C340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 33Ah
mov	esp, ebp
pop	ebp
retn
sub_53C340 endp



; Attributes: bp-based frame

sub_53C350 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C350 endp

align 10h


; Attributes: bp-based frame

sub_53C370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 33Bh
mov	esp, ebp
pop	ebp
retn
sub_53C370 endp



; Attributes: bp-based frame

sub_53C380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D781A0
mov	esp, ebp
pop	ebp
retn
sub_53C380 endp



; Attributes: bp-based frame

sub_53C390 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5676B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C390 endp

align 10h


; Attributes: bp-based frame

sub_53C3B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 33Ch
mov	esp, ebp
pop	ebp
retn
sub_53C3B0 endp



; Attributes: bp-based frame

sub_53C3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78180
mov	esp, ebp
pop	ebp
retn
sub_53C3C0 endp



; Attributes: bp-based frame

sub_53C3D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C3D0 endp

align 10h


; Attributes: bp-based frame

sub_53C3F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 33Dh
mov	esp, ebp
pop	ebp
retn
sub_53C3F0 endp



; Attributes: bp-based frame

sub_53C400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78160
mov	esp, ebp
pop	ebp
retn
sub_53C400 endp



; Attributes: bp-based frame

sub_53C410 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C410 endp

align 10h


; Attributes: bp-based frame

sub_53C430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 33Eh
mov	esp, ebp
pop	ebp
retn
sub_53C430 endp



; Attributes: bp-based frame

sub_53C440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78140
mov	esp, ebp
pop	ebp
retn
sub_53C440 endp



; Attributes: bp-based frame

sub_53C450 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5677D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C450 endp

align 10h


; Attributes: bp-based frame

sub_53C470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 33Fh
mov	esp, ebp
pop	ebp
retn
sub_53C470 endp



; Attributes: bp-based frame

sub_53C480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78120
mov	esp, ebp
pop	ebp
retn
sub_53C480 endp



; Attributes: bp-based frame

sub_53C490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C490 endp

align 10h


; Attributes: bp-based frame

sub_53C4B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 340h
mov	esp, ebp
pop	ebp
retn
sub_53C4B0 endp



; Attributes: bp-based frame

sub_53C4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78100
mov	esp, ebp
pop	ebp
retn
sub_53C4C0 endp



; Attributes: bp-based frame

sub_53C4D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C4D0 endp

align 10h


; Attributes: bp-based frame

sub_53C4F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 342h
mov	esp, ebp
pop	ebp
retn
sub_53C4F0 endp



; Attributes: bp-based frame

sub_53C500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D780E0
mov	esp, ebp
pop	ebp
retn
sub_53C500 endp



; Attributes: bp-based frame

sub_53C510 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5678F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C510 endp

align 10h


; Attributes: bp-based frame

sub_53C530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 343h
mov	esp, ebp
pop	ebp
retn
sub_53C530 endp



; Attributes: bp-based frame

sub_53C540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D780C0
mov	esp, ebp
pop	ebp
retn
sub_53C540 endp



; Attributes: bp-based frame

sub_53C550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C550 endp

align 10h


; Attributes: bp-based frame

sub_53C570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 344h
mov	esp, ebp
pop	ebp
retn
sub_53C570 endp



; Attributes: bp-based frame

sub_53C580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D780A0
mov	esp, ebp
pop	ebp
retn
sub_53C580 endp



; Attributes: bp-based frame

sub_53C590 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5679B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C590 endp

align 10h


; Attributes: bp-based frame

sub_53C5B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 345h
mov	esp, ebp
pop	ebp
retn
sub_53C5B0 endp



; Attributes: bp-based frame

sub_53C5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78080
mov	esp, ebp
pop	ebp
retn
sub_53C5C0 endp



; Attributes: bp-based frame

sub_53C5D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567A10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C5D0 endp

align 10h


; Attributes: bp-based frame

sub_53C5F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 346h
mov	esp, ebp
pop	ebp
retn
sub_53C5F0 endp



; Attributes: bp-based frame

sub_53C600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78060
mov	esp, ebp
pop	ebp
retn
sub_53C600 endp



; Attributes: bp-based frame

sub_53C610 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567A70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C610 endp

align 10h


; Attributes: bp-based frame

sub_53C630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 347h
mov	esp, ebp
pop	ebp
retn
sub_53C630 endp



; Attributes: bp-based frame

sub_53C640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78040
mov	esp, ebp
pop	ebp
retn
sub_53C640 endp



; Attributes: bp-based frame

sub_53C650 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567AD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C650 endp

align 10h


; Attributes: bp-based frame

sub_53C670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 348h
mov	esp, ebp
pop	ebp
retn
sub_53C670 endp



; Attributes: bp-based frame

sub_53C680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567B30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C680 endp

align 10h


; Attributes: bp-based frame

sub_53C6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 349h
mov	esp, ebp
pop	ebp
retn
sub_53C6A0 endp



; Attributes: bp-based frame

sub_53C6B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53C6DE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53C6DE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53C6B0 endp

align 10h


; Attributes: bp-based frame

sub_53C6F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567B90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C6F0 endp

align 10h


; Attributes: bp-based frame

sub_53C710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 34Ah
mov	esp, ebp
pop	ebp
retn
sub_53C710 endp



; Attributes: bp-based frame

sub_53C720 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567BF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C720 endp

align 10h


; Attributes: bp-based frame

sub_53C740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 34Bh
mov	esp, ebp
pop	ebp
retn
sub_53C740 endp



; Attributes: bp-based frame

sub_53C750 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567C50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C750 endp

align 10h


; Attributes: bp-based frame

sub_53C770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 34Ch
mov	esp, ebp
pop	ebp
retn
sub_53C770 endp



; Attributes: bp-based frame

sub_53C780 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 2Ch
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 54h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_53C780 endp

align 10h


; Attributes: bp-based frame

sub_53C7F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_53C7F0 endp

align 10h


; Attributes: bp-based frame

sub_53C820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_57D240
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53C84E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53C84E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53C820 endp

align 10h


; Attributes: bp-based frame

sub_53C860 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567CB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C860 endp

align 10h


; Attributes: bp-based frame

sub_53C880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 34Dh
mov	esp, ebp
pop	ebp
retn
sub_53C880 endp



; Attributes: bp-based frame

sub_53C890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 641h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53C890 endp

align 10h


; Attributes: bp-based frame

sub_53C8B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567D10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C8B0 endp

align 10h


; Attributes: bp-based frame

sub_53C8D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 350h
mov	esp, ebp
pop	ebp
retn
sub_53C8D0 endp



; Attributes: bp-based frame

sub_53C8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78020
mov	esp, ebp
pop	ebp
retn
sub_53C8E0 endp



; Attributes: bp-based frame

sub_53C8F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567D70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C8F0 endp

align 10h


; Attributes: bp-based frame

sub_53C910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 351h
mov	esp, ebp
pop	ebp
retn
sub_53C910 endp



; Attributes: bp-based frame

sub_53C920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D78000
mov	esp, ebp
pop	ebp
retn
sub_53C920 endp



; Attributes: bp-based frame

sub_53C930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567DD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C930 endp

align 10h


; Attributes: bp-based frame

sub_53C950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 352h
mov	esp, ebp
pop	ebp
retn
sub_53C950 endp



; Attributes: bp-based frame

sub_53C960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53C999
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53C999:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53C960 endp

align 10h


; Attributes: bp-based frame

sub_53C9B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567E30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53C9B0 endp

align 10h


; Attributes: bp-based frame

sub_53C9D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 353h
mov	esp, ebp
pop	ebp
retn
sub_53C9D0 endp



; Attributes: bp-based frame

sub_53C9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77FE0
mov	esp, ebp
pop	ebp
retn
sub_53C9E0 endp



; Attributes: bp-based frame

sub_53C9F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_4892A0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_4892A0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53CA29
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53CA29:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53C9F0 endp

align 10h


; Attributes: bp-based frame

sub_53CA40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567E90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CA40 endp

align 10h


; Attributes: bp-based frame

sub_53CA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 354h
mov	esp, ebp
pop	ebp
retn
sub_53CA60 endp



; Attributes: bp-based frame

sub_53CA70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77FA0
mov	esp, ebp
pop	ebp
retn
sub_53CA70 endp



; Attributes: bp-based frame

sub_53CA80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5791F0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53CAC1
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53CAC1:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_53CA80 endp

align 10h


; Attributes: bp-based frame

sub_53CAD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567EF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CAD0 endp

align 10h


; Attributes: bp-based frame

sub_53CAF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 355h
mov	esp, ebp
pop	ebp
retn
sub_53CAF0 endp



; Attributes: bp-based frame

sub_53CB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77F80
mov	esp, ebp
pop	ebp
retn
sub_53CB00 endp



; Attributes: bp-based frame

sub_53CB10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567F50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CB10 endp

align 10h


; Attributes: bp-based frame

sub_53CB30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 356h
mov	esp, ebp
pop	ebp
retn
sub_53CB30 endp



; Attributes: bp-based frame

sub_53CB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77F60
mov	esp, ebp
pop	ebp
retn
sub_53CB40 endp



; Attributes: bp-based frame

sub_53CB50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_567FB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CB50 endp

align 10h


; Attributes: bp-based frame

sub_53CB70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 357h
mov	esp, ebp
pop	ebp
retn
sub_53CB70 endp



; Attributes: bp-based frame

sub_53CB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77F40
mov	esp, ebp
pop	ebp
retn
sub_53CB80 endp



; Attributes: bp-based frame

sub_53CB90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568010
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CB90 endp

align 10h


; Attributes: bp-based frame

sub_53CBB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 358h
mov	esp, ebp
pop	ebp
retn
sub_53CBB0 endp



; Attributes: bp-based frame

sub_53CBC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568070
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CBC0 endp

align 10h


; Attributes: bp-based frame

sub_53CBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 359h
mov	esp, ebp
pop	ebp
retn
sub_53CBE0 endp



; Attributes: bp-based frame

sub_53CBF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53CC29
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53CC29:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53CBF0 endp

align 10h


; Attributes: bp-based frame

sub_53CC40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5680D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CC40 endp

align 10h


; Attributes: bp-based frame

sub_53CC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 35Ah
mov	esp, ebp
pop	ebp
retn
sub_53CC60 endp



; Attributes: bp-based frame

sub_53CC70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77F20
mov	esp, ebp
pop	ebp
retn
sub_53CC70 endp



; Attributes: bp-based frame

sub_53CC80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568130
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CC80 endp

align 10h


; Attributes: bp-based frame

sub_53CCA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 35Ch
mov	esp, ebp
pop	ebp
retn
sub_53CCA0 endp



; Attributes: bp-based frame

sub_53CCB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77ED0
mov	esp, ebp
pop	ebp
retn
sub_53CCB0 endp



; Attributes: bp-based frame

sub_53CCC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568190
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CCC0 endp

align 10h


; Attributes: bp-based frame

sub_53CCE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 35Dh
mov	esp, ebp
pop	ebp
retn
sub_53CCE0 endp



; Attributes: bp-based frame

sub_53CCF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77E80
mov	esp, ebp
pop	ebp
retn
sub_53CCF0 endp



; Attributes: bp-based frame

sub_53CD00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5681F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CD00 endp

align 10h


; Attributes: bp-based frame

sub_53CD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 35Eh
mov	esp, ebp
pop	ebp
retn
sub_53CD20 endp



; Attributes: bp-based frame

sub_53CD30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77E60
mov	esp, ebp
pop	ebp
retn
sub_53CD30 endp



; Attributes: bp-based frame

sub_53CD40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568250
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CD40 endp

align 10h


; Attributes: bp-based frame

sub_53CD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 35Fh
mov	esp, ebp
pop	ebp
retn
sub_53CD60 endp



; Attributes: bp-based frame

sub_53CD70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77E40
mov	esp, ebp
pop	ebp
retn
sub_53CD70 endp



; Attributes: bp-based frame

sub_53CD80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5682C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CD80 endp

align 10h


; Attributes: bp-based frame

sub_53CDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 361h
mov	esp, ebp
pop	ebp
retn
sub_53CDA0 endp



; Attributes: bp-based frame

sub_53CDB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77E20
mov	esp, ebp
pop	ebp
retn
sub_53CDB0 endp



; Attributes: bp-based frame

sub_53CDC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568330
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CDC0 endp

align 10h


; Attributes: bp-based frame

sub_53CDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 362h
mov	esp, ebp
pop	ebp
retn
sub_53CDE0 endp



; Attributes: bp-based frame

sub_53CDF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2601h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53CDF0 endp

align 10h


; Attributes: bp-based frame

sub_53CE10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77E00
mov	esp, ebp
pop	ebp
retn
sub_53CE10 endp



; Attributes: bp-based frame

sub_53CE20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5683A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CE20 endp

align 10h


; Attributes: bp-based frame

sub_53CE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 363h
mov	esp, ebp
pop	ebp
retn
sub_53CE40 endp



; Attributes: bp-based frame

sub_53CE50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568430
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CE50 endp

align 10h


; Attributes: bp-based frame

sub_53CE70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 364h
mov	esp, ebp
pop	ebp
retn
sub_53CE70 endp



; Attributes: bp-based frame

sub_53CE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77DE0
mov	esp, ebp
pop	ebp
retn
sub_53CE80 endp



; Attributes: bp-based frame

sub_53CE90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53CEBE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53CEBE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53CE90 endp

align 10h


; Attributes: bp-based frame

sub_53CED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568490
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CED0 endp

align 10h


; Attributes: bp-based frame

sub_53CEF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 366h
mov	esp, ebp
pop	ebp
retn
sub_53CEF0 endp



; Attributes: bp-based frame

sub_53CF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77DC0
mov	esp, ebp
pop	ebp
retn
sub_53CF00 endp



; Attributes: bp-based frame

sub_53CF10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5684F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CF10 endp

align 10h


; Attributes: bp-based frame

sub_53CF30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 367h
mov	esp, ebp
pop	ebp
retn
sub_53CF30 endp



; Attributes: bp-based frame

sub_53CF40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568550
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CF40 endp

align 10h


; Attributes: bp-based frame

sub_53CF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 369h
mov	esp, ebp
pop	ebp
retn
sub_53CF60 endp



; Attributes: bp-based frame

sub_53CF70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0E41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53CF70 endp

align 10h


; Attributes: bp-based frame

sub_53CF90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77DA0
mov	esp, ebp
pop	ebp
retn
sub_53CF90 endp



; Attributes: bp-based frame

sub_53CFA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5685B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53CFA0 endp

align 10h


; Attributes: bp-based frame

sub_53CFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 36Ah
mov	esp, ebp
pop	ebp
retn
sub_53CFC0 endp



; Attributes: bp-based frame

sub_53CFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77D80
mov	esp, ebp
pop	ebp
retn
sub_53CFD0 endp



; Attributes: bp-based frame

sub_53CFE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53D056
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53D056:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_53CFE0 endp

align 10h


; Attributes: bp-based frame

sub_53D070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568610
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D070 endp

align 10h


; Attributes: bp-based frame

sub_53D090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 36Bh
mov	esp, ebp
pop	ebp
retn
sub_53D090 endp



; Attributes: bp-based frame

sub_53D0A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 30h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53D116
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53D116:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_53D0A0 endp

align 10h


; Attributes: bp-based frame

sub_53D130 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568670
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D130 endp

align 10h


; Attributes: bp-based frame

sub_53D150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 36Dh
mov	esp, ebp
pop	ebp
retn
sub_53D150 endp



; Attributes: bp-based frame

sub_53D160 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5686D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D160 endp

align 10h


; Attributes: bp-based frame

sub_53D180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 36Eh
mov	esp, ebp
pop	ebp
retn
sub_53D180 endp



; Attributes: bp-based frame

sub_53D190 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5E42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53D190 endp

align 10h


; Attributes: bp-based frame

sub_53D1B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77D20
mov	esp, ebp
pop	ebp
retn
sub_53D1B0 endp



; Attributes: bp-based frame

sub_53D1C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568730
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D1C0 endp

align 10h


; Attributes: bp-based frame

sub_53D1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 36Fh
mov	esp, ebp
pop	ebp
retn
sub_53D1E0 endp



; Attributes: bp-based frame

sub_53D1F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77CD0
mov	esp, ebp
pop	ebp
retn
sub_53D1F0 endp



; Attributes: bp-based frame

sub_53D200 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568790
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D200 endp

align 10h


; Attributes: bp-based frame

sub_53D220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 370h
mov	esp, ebp
pop	ebp
retn
sub_53D220 endp



; Attributes: bp-based frame

sub_53D230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77CB0
mov	esp, ebp
pop	ebp
retn
sub_53D230 endp



; Attributes: bp-based frame

sub_53D240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5687F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D240 endp

align 10h


; Attributes: bp-based frame

sub_53D260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 373h
mov	esp, ebp
pop	ebp
retn
sub_53D260 endp



; Attributes: bp-based frame

sub_53D270 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2E01h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53D270 endp

align 10h


; Attributes: bp-based frame

sub_53D290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77C40
mov	esp, ebp
pop	ebp
retn
sub_53D290 endp



; Attributes: bp-based frame

sub_53D2A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568850
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D2A0 endp

align 10h


; Attributes: bp-based frame

sub_53D2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 374h
mov	esp, ebp
pop	ebp
retn
sub_53D2C0 endp



; Attributes: bp-based frame

sub_53D2D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77C20
mov	esp, ebp
pop	ebp
retn
sub_53D2D0 endp



; Attributes: bp-based frame

sub_53D2E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53D356
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53D356:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_53D2E0 endp

align 10h


; Attributes: bp-based frame

sub_53D370 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5688B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D370 endp

align 10h


; Attributes: bp-based frame

sub_53D390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 375h
mov	esp, ebp
pop	ebp
retn
sub_53D390 endp



; Attributes: bp-based frame

sub_53D3A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53D3CE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53D3CE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53D3A0 endp

align 10h


; Attributes: bp-based frame

sub_53D3E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568910
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D3E0 endp

align 10h


; Attributes: bp-based frame

sub_53D400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 376h
mov	esp, ebp
pop	ebp
retn
sub_53D400 endp



; Attributes: bp-based frame

sub_53D410 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568970
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D410 endp

align 10h


; Attributes: bp-based frame

sub_53D430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 377h
mov	esp, ebp
pop	ebp
retn
sub_53D430 endp



; Attributes: bp-based frame

sub_53D440 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5689D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D440 endp

align 10h


; Attributes: bp-based frame

sub_53D460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 378h
mov	esp, ebp
pop	ebp
retn
sub_53D460 endp



; Attributes: bp-based frame

sub_53D470 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 602h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53D470 endp

align 10h


; Attributes: bp-based frame

sub_53D490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568A30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D490 endp

align 10h


; Attributes: bp-based frame

sub_53D4B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 379h
mov	esp, ebp
pop	ebp
retn
sub_53D4B0 endp



; Attributes: bp-based frame

sub_53D4C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568A90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D4C0 endp

align 10h


; Attributes: bp-based frame

sub_53D4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 37Ah
mov	esp, ebp
pop	ebp
retn
sub_53D4E0 endp



; Attributes: bp-based frame

sub_53D4F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77C00
mov	esp, ebp
pop	ebp
retn
sub_53D4F0 endp



; Attributes: bp-based frame

sub_53D500 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568AF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D500 endp

align 10h


; Attributes: bp-based frame

sub_53D520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 37Bh
mov	esp, ebp
pop	ebp
retn
sub_53D520 endp



; Attributes: bp-based frame

sub_53D530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77BE0
mov	esp, ebp
pop	ebp
retn
sub_53D530 endp



; Attributes: bp-based frame

sub_53D540 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_5D2630
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53D56E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53D56E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53D540 endp

align 10h


; Attributes: bp-based frame

sub_53D580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568B50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D580 endp

align 10h


; Attributes: bp-based frame

sub_53D5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 37Ch
mov	esp, ebp
pop	ebp
retn
sub_53D5A0 endp



; Attributes: bp-based frame

sub_53D5B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568BB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D5B0 endp

align 10h


; Attributes: bp-based frame

sub_53D5D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 37Dh
mov	esp, ebp
pop	ebp
retn
sub_53D5D0 endp



; Attributes: bp-based frame

sub_53D5E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568C10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D5E0 endp

align 10h


; Attributes: bp-based frame

sub_53D600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 37Eh
mov	esp, ebp
pop	ebp
retn
sub_53D600 endp



; Attributes: bp-based frame

sub_53D610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77BC0
mov	esp, ebp
pop	ebp
retn
sub_53D610 endp



; Attributes: bp-based frame

sub_53D620 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568C70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D620 endp

align 10h


; Attributes: bp-based frame

sub_53D640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 37Fh
mov	esp, ebp
pop	ebp
retn
sub_53D640 endp



; Attributes: bp-based frame

sub_53D650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77BA0
mov	esp, ebp
pop	ebp
retn
sub_53D650 endp



; Attributes: bp-based frame

sub_53D660 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568CD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D660 endp

align 10h


; Attributes: bp-based frame

sub_53D680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 380h
mov	esp, ebp
pop	ebp
retn
sub_53D680 endp



; Attributes: bp-based frame

sub_53D690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77B80
mov	esp, ebp
pop	ebp
retn
sub_53D690 endp



; Attributes: bp-based frame

sub_53D6A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568D30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D6A0 endp

align 10h


; Attributes: bp-based frame

sub_53D6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 381h
mov	esp, ebp
pop	ebp
retn
sub_53D6C0 endp



; Attributes: bp-based frame

sub_53D6D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77B60
mov	esp, ebp
pop	ebp
retn
sub_53D6D0 endp



; Attributes: bp-based frame

sub_53D6E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568D90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D6E0 endp

align 10h


; Attributes: bp-based frame

sub_53D700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 382h
mov	esp, ebp
pop	ebp
retn
sub_53D700 endp



; Attributes: bp-based frame

sub_53D710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77B40
mov	esp, ebp
pop	ebp
retn
sub_53D710 endp



; Attributes: bp-based frame

sub_53D720 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568DF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D720 endp

align 10h


; Attributes: bp-based frame

sub_53D740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 383h
mov	esp, ebp
pop	ebp
retn
sub_53D740 endp



; Attributes: bp-based frame

sub_53D750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77B20
mov	esp, ebp
pop	ebp
retn
sub_53D750 endp



; Attributes: bp-based frame

sub_53D760 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568E50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D760 endp

align 10h


; Attributes: bp-based frame

sub_53D780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 384h
mov	esp, ebp
pop	ebp
retn
sub_53D780 endp



; Attributes: bp-based frame

sub_53D790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77B00
mov	esp, ebp
pop	ebp
retn
sub_53D790 endp



; Attributes: bp-based frame

sub_53D7A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568EB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D7A0 endp

align 10h


; Attributes: bp-based frame

sub_53D7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 385h
mov	esp, ebp
pop	ebp
retn
sub_53D7C0 endp



; Attributes: bp-based frame

sub_53D7D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77AE0
mov	esp, ebp
pop	ebp
retn
sub_53D7D0 endp



; Attributes: bp-based frame

sub_53D7E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568F10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D7E0 endp

align 10h


; Attributes: bp-based frame

sub_53D800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 386h
mov	esp, ebp
pop	ebp
retn
sub_53D800 endp



; Attributes: bp-based frame

sub_53D810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77A70
mov	esp, ebp
pop	ebp
retn
sub_53D810 endp



; Attributes: bp-based frame

sub_53D820 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568F70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D820 endp

align 10h


; Attributes: bp-based frame

sub_53D840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 387h
mov	esp, ebp
pop	ebp
retn
sub_53D840 endp



; Attributes: bp-based frame

sub_53D850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77A50
mov	esp, ebp
pop	ebp
retn
sub_53D850 endp



; Attributes: bp-based frame

sub_53D860 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_568FD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D860 endp

align 10h


; Attributes: bp-based frame

sub_53D880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 388h
mov	esp, ebp
pop	ebp
retn
sub_53D880 endp



; Attributes: bp-based frame

sub_53D890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77A30
mov	esp, ebp
pop	ebp
retn
sub_53D890 endp



; Attributes: bp-based frame

sub_53D8A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569030
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D8A0 endp

align 10h


; Attributes: bp-based frame

sub_53D8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 389h
mov	esp, ebp
pop	ebp
retn
sub_53D8C0 endp



; Attributes: bp-based frame

sub_53D8D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77A10
mov	esp, ebp
pop	ebp
retn
sub_53D8D0 endp



; Attributes: bp-based frame

sub_53D8E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569090
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D8E0 endp

align 10h


; Attributes: bp-based frame

sub_53D900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 38Ah
mov	esp, ebp
pop	ebp
retn
sub_53D900 endp



; Attributes: bp-based frame

sub_53D910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D779F0
mov	esp, ebp
pop	ebp
retn
sub_53D910 endp



; Attributes: bp-based frame

sub_53D920 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5690F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D920 endp

align 10h


; Attributes: bp-based frame

sub_53D940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 38Bh
mov	esp, ebp
pop	ebp
retn
sub_53D940 endp



; Attributes: bp-based frame

sub_53D950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D779D0
mov	esp, ebp
pop	ebp
retn
sub_53D950 endp



; Attributes: bp-based frame

sub_53D960 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569150
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D960 endp

align 10h


; Attributes: bp-based frame

sub_53D980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 38Dh
mov	esp, ebp
pop	ebp
retn
sub_53D980 endp



; Attributes: bp-based frame

sub_53D990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D779B0
mov	esp, ebp
pop	ebp
retn
sub_53D990 endp



; Attributes: bp-based frame

sub_53D9A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5691B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D9A0 endp

align 10h


; Attributes: bp-based frame

sub_53D9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 38Fh
mov	esp, ebp
pop	ebp
retn
sub_53D9C0 endp



; Attributes: bp-based frame

sub_53D9D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77990
mov	esp, ebp
pop	ebp
retn
sub_53D9D0 endp



; Attributes: bp-based frame

sub_53D9E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569210
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53D9E0 endp

align 10h


; Attributes: bp-based frame

sub_53DA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 390h
mov	esp, ebp
pop	ebp
retn
sub_53DA00 endp



; Attributes: bp-based frame

sub_53DA10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 24h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53DA69
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53DA69:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_53DA10 endp

align 10h


; Attributes: bp-based frame

sub_53DA80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569270
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DA80 endp

align 10h


; Attributes: bp-based frame

sub_53DAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 391h
mov	esp, ebp
pop	ebp
retn
sub_53DAA0 endp



; Attributes: bp-based frame

sub_53DAB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5692D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DAB0 endp

align 10h


; Attributes: bp-based frame

sub_53DAD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 392h
mov	esp, ebp
pop	ebp
retn
sub_53DAD0 endp



; Attributes: bp-based frame

sub_53DAE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569330
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DAE0 endp

align 10h


; Attributes: bp-based frame

sub_53DB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 393h
mov	esp, ebp
pop	ebp
retn
sub_53DB00 endp



; Attributes: bp-based frame

sub_53DB10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569390
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DB10 endp

align 10h


; Attributes: bp-based frame

sub_53DB30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 394h
mov	esp, ebp
pop	ebp
retn
sub_53DB30 endp



; Attributes: bp-based frame

sub_53DB40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5693F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DB40 endp

align 10h


; Attributes: bp-based frame

sub_53DB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 395h
mov	esp, ebp
pop	ebp
retn
sub_53DB60 endp



; Attributes: bp-based frame

sub_53DB70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 744h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53DB70 endp

align 10h


; Attributes: bp-based frame

sub_53DB90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569450
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DB90 endp

align 10h


; Attributes: bp-based frame

sub_53DBB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 396h
mov	esp, ebp
pop	ebp
retn
sub_53DBB0 endp



; Attributes: bp-based frame

sub_53DBC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5694B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DBC0 endp

align 10h


; Attributes: bp-based frame

sub_53DBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 397h
mov	esp, ebp
pop	ebp
retn
sub_53DBE0 endp



; Attributes: bp-based frame

sub_53DBF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569510
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DBF0 endp

align 10h


; Attributes: bp-based frame

sub_53DC10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 39Ah
mov	esp, ebp
pop	ebp
retn
sub_53DC10 endp



; Attributes: bp-based frame

sub_53DC20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569570
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DC20 endp

align 10h


; Attributes: bp-based frame

sub_53DC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 39Bh
mov	esp, ebp
pop	ebp
retn
sub_53DC40 endp



; Attributes: bp-based frame

sub_53DC50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5021C0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53DC91
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53DC91:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_53DC50 endp

align 10h


; Attributes: bp-based frame

sub_53DCA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5695D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DCA0 endp

align 10h


; Attributes: bp-based frame

sub_53DCC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 39Ch
mov	esp, ebp
pop	ebp
retn
sub_53DCC0 endp



; Attributes: bp-based frame

sub_53DCD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569630
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DCD0 endp

align 10h


; Attributes: bp-based frame

sub_53DCF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 39Dh
mov	esp, ebp
pop	ebp
retn
sub_53DCF0 endp



; Attributes: bp-based frame

sub_53DD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77930
mov	esp, ebp
pop	ebp
retn
sub_53DD00 endp



; Attributes: bp-based frame

sub_53DD10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569690
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DD10 endp

align 10h


; Attributes: bp-based frame

sub_53DD30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 39Eh
mov	esp, ebp
pop	ebp
retn
sub_53DD30 endp



; Attributes: bp-based frame

sub_53DD40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_53DD71
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D910
mov	[ebp+var_C], eax
jmp	short loc_53DD78

loc_53DD71:
mov	[ebp+var_C], 0

loc_53DD78:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_53DD40 endp

align 10h


; Attributes: bp-based frame

sub_53DD90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 39Fh
mov	esp, ebp
pop	ebp
retn
sub_53DD90 endp



; Attributes: bp-based frame

sub_53DDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77910
mov	esp, ebp
pop	ebp
retn
sub_53DDA0 endp



; Attributes: bp-based frame

sub_53DDB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5696F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DDB0 endp

align 10h


; Attributes: bp-based frame

sub_53DDD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A0h
mov	esp, ebp
pop	ebp
retn
sub_53DDD0 endp



; Attributes: bp-based frame

sub_53DDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D778F0
mov	esp, ebp
pop	ebp
retn
sub_53DDE0 endp



; Attributes: bp-based frame

sub_53DDF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569750
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DDF0 endp

align 10h


; Attributes: bp-based frame

sub_53DE10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A1h
mov	esp, ebp
pop	ebp
retn
sub_53DE10 endp



; Attributes: bp-based frame

sub_53DE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D778D0
mov	esp, ebp
pop	ebp
retn
sub_53DE20 endp



; Attributes: bp-based frame

sub_53DE30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5697B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DE30 endp

align 10h


; Attributes: bp-based frame

sub_53DE50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A2h
mov	esp, ebp
pop	ebp
retn
sub_53DE50 endp



; Attributes: bp-based frame

sub_53DE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D778B0
mov	esp, ebp
pop	ebp
retn
sub_53DE60 endp



; Attributes: bp-based frame

sub_53DE70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569810
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DE70 endp

align 10h


; Attributes: bp-based frame

sub_53DE90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A3h
mov	esp, ebp
pop	ebp
retn
sub_53DE90 endp



; Attributes: bp-based frame

sub_53DEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77890
mov	esp, ebp
pop	ebp
retn
sub_53DEA0 endp



; Attributes: bp-based frame

sub_53DEB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569870
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DEB0 endp

align 10h


; Attributes: bp-based frame

sub_53DED0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A4h
mov	esp, ebp
pop	ebp
retn
sub_53DED0 endp



; Attributes: bp-based frame

sub_53DEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77870
mov	esp, ebp
pop	ebp
retn
sub_53DEE0 endp



; Attributes: bp-based frame

sub_53DEF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5698D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DEF0 endp

align 10h


; Attributes: bp-based frame

sub_53DF10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A6h
mov	esp, ebp
pop	ebp
retn
sub_53DF10 endp



; Attributes: bp-based frame

sub_53DF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77850
mov	esp, ebp
pop	ebp
retn
sub_53DF20 endp



; Attributes: bp-based frame

sub_53DF30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569930
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DF30 endp

align 10h


; Attributes: bp-based frame

sub_53DF50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A7h
mov	esp, ebp
pop	ebp
retn
sub_53DF50 endp



; Attributes: bp-based frame

sub_53DF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77830
mov	esp, ebp
pop	ebp
retn
sub_53DF60 endp



; Attributes: bp-based frame

sub_53DF70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569990
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DF70 endp

align 10h


; Attributes: bp-based frame

sub_53DF90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A8h
mov	esp, ebp
pop	ebp
retn
sub_53DF90 endp



; Attributes: bp-based frame

sub_53DFA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5699F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DFA0 endp

align 10h


; Attributes: bp-based frame

sub_53DFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3A9h
mov	esp, ebp
pop	ebp
retn
sub_53DFC0 endp



; Attributes: bp-based frame

sub_53DFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77810
mov	esp, ebp
pop	ebp
retn
sub_53DFD0 endp



; Attributes: bp-based frame

sub_53DFE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569A50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53DFE0 endp

align 10h


; Attributes: bp-based frame

sub_53E000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3AAh
mov	esp, ebp
pop	ebp
retn
sub_53E000 endp



; Attributes: bp-based frame

sub_53E010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D777F0
mov	esp, ebp
pop	ebp
retn
sub_53E010 endp



; Attributes: bp-based frame

sub_53E020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569AB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E020 endp

align 10h


; Attributes: bp-based frame

sub_53E040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3ABh
mov	esp, ebp
pop	ebp
retn
sub_53E040 endp



; Attributes: bp-based frame

sub_53E050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D777D0
mov	esp, ebp
pop	ebp
retn
sub_53E050 endp



; Attributes: bp-based frame

sub_53E060 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569B10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E060 endp

align 10h


; Attributes: bp-based frame

sub_53E080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3ACh
mov	esp, ebp
pop	ebp
retn
sub_53E080 endp



; Attributes: bp-based frame

sub_53E090 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569B70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E090 endp

align 10h


; Attributes: bp-based frame

sub_53E0B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3ADh
mov	esp, ebp
pop	ebp
retn
sub_53E0B0 endp



; Attributes: bp-based frame

sub_53E0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D777B0
mov	esp, ebp
pop	ebp
retn
sub_53E0C0 endp



; Attributes: bp-based frame

sub_53E0D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569BD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E0D0 endp

align 10h


; Attributes: bp-based frame

sub_53E0F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3AEh
mov	esp, ebp
pop	ebp
retn
sub_53E0F0 endp



; Attributes: bp-based frame

sub_53E100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77790
mov	esp, ebp
pop	ebp
retn
sub_53E100 endp



; Attributes: bp-based frame

sub_53E110 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53E13E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53E13E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53E110 endp

align 10h


; Attributes: bp-based frame

sub_53E150 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E150 endp

align 10h


; Attributes: bp-based frame

sub_53E170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3AFh
mov	esp, ebp
pop	ebp
retn
sub_53E170 endp



; Attributes: bp-based frame

sub_53E180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53E1AE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53E1AE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53E180 endp

align 10h


; Attributes: bp-based frame

sub_53E1C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569C90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E1C0 endp

align 10h


; Attributes: bp-based frame

sub_53E1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B0h
mov	esp, ebp
pop	ebp
retn
sub_53E1E0 endp



; Attributes: bp-based frame

sub_53E1F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 180h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53E1F0 endp

align 10h


; Attributes: bp-based frame

sub_53E210 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569CF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E210 endp

align 10h


; Attributes: bp-based frame

sub_53E230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B1h
mov	esp, ebp
pop	ebp
retn
sub_53E230 endp



; Attributes: bp-based frame

sub_53E240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569D50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E240 endp

align 10h


; Attributes: bp-based frame

sub_53E260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B2h
mov	esp, ebp
pop	ebp
retn
sub_53E260 endp



; Attributes: bp-based frame

sub_53E270 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569DB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E270 endp

align 10h


; Attributes: bp-based frame

sub_53E290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B3h
mov	esp, ebp
pop	ebp
retn
sub_53E290 endp



; Attributes: bp-based frame

sub_53E2A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569E10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E2A0 endp

align 10h


; Attributes: bp-based frame

sub_53E2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B4h
mov	esp, ebp
pop	ebp
retn
sub_53E2C0 endp



; Attributes: bp-based frame

sub_53E2D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569E70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E2D0 endp

align 10h


; Attributes: bp-based frame

sub_53E2F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B5h
mov	esp, ebp
pop	ebp
retn
sub_53E2F0 endp



; Attributes: bp-based frame

sub_53E300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569ED0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E300 endp

align 10h


; Attributes: bp-based frame

sub_53E320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B6h
mov	esp, ebp
pop	ebp
retn
sub_53E320 endp



; Attributes: bp-based frame

sub_53E330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569F30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E330 endp

align 10h


; Attributes: bp-based frame

sub_53E350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B7h
mov	esp, ebp
pop	ebp
retn
sub_53E350 endp



; Attributes: bp-based frame

sub_53E360 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569F90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E360 endp

align 10h


; Attributes: bp-based frame

sub_53E380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B8h
mov	esp, ebp
pop	ebp
retn
sub_53E380 endp



; Attributes: bp-based frame

sub_53E390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77770
mov	esp, ebp
pop	ebp
retn
sub_53E390 endp



; Attributes: bp-based frame

sub_53E3A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_569FF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E3A0 endp

align 10h


; Attributes: bp-based frame

sub_53E3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3B9h
mov	esp, ebp
pop	ebp
retn
sub_53E3C0 endp



; Attributes: bp-based frame

sub_53E3D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77750
mov	esp, ebp
pop	ebp
retn
sub_53E3D0 endp



; Attributes: bp-based frame

sub_53E3E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A050
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E3E0 endp

align 10h


; Attributes: bp-based frame

sub_53E400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3BAh
mov	esp, ebp
pop	ebp
retn
sub_53E400 endp



; Attributes: bp-based frame

sub_53E410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77730
mov	esp, ebp
pop	ebp
retn
sub_53E410 endp



; Attributes: bp-based frame

sub_53E420 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A0B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E420 endp

align 10h


; Attributes: bp-based frame

sub_53E440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3BBh
mov	esp, ebp
pop	ebp
retn
sub_53E440 endp



; Attributes: bp-based frame

sub_53E450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77710
mov	esp, ebp
pop	ebp
retn
sub_53E450 endp



; Attributes: bp-based frame

sub_53E460 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A110
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E460 endp

align 10h


; Attributes: bp-based frame

sub_53E480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3BCh
mov	esp, ebp
pop	ebp
retn
sub_53E480 endp



; Attributes: bp-based frame

sub_53E490 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53E490 endp

align 10h


; Attributes: bp-based frame

sub_53E4B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D776F0
mov	esp, ebp
pop	ebp
retn
sub_53E4B0 endp



; Attributes: bp-based frame

sub_53E4C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A170
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E4C0 endp

align 10h


; Attributes: bp-based frame

sub_53E4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3BDh
mov	esp, ebp
pop	ebp
retn
sub_53E4E0 endp



; Attributes: bp-based frame

sub_53E4F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D776D0
mov	esp, ebp
pop	ebp
retn
sub_53E4F0 endp



; Attributes: bp-based frame

sub_53E500 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A1D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E500 endp

align 10h


; Attributes: bp-based frame

sub_53E520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3BEh
mov	esp, ebp
pop	ebp
retn
sub_53E520 endp



; Attributes: bp-based frame

sub_53E530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D776B0
mov	esp, ebp
pop	ebp
retn
sub_53E530 endp



; Attributes: bp-based frame

sub_53E540 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A230
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E540 endp

align 10h


; Attributes: bp-based frame

sub_53E560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3C1h
mov	esp, ebp
pop	ebp
retn
sub_53E560 endp



; Attributes: bp-based frame

sub_53E570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77690
mov	esp, ebp
pop	ebp
retn
sub_53E570 endp



; Attributes: bp-based frame

sub_53E580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A290
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E580 endp

align 10h


; Attributes: bp-based frame

sub_53E5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3C3h
mov	esp, ebp
pop	ebp
retn
sub_53E5A0 endp



; Attributes: bp-based frame

sub_53E5B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77670
mov	esp, ebp
pop	ebp
retn
sub_53E5B0 endp



; Attributes: bp-based frame

sub_53E5C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A2F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E5C0 endp

align 10h


; Attributes: bp-based frame

sub_53E5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3C7h
mov	esp, ebp
pop	ebp
retn
sub_53E5E0 endp



; Attributes: bp-based frame

sub_53E5F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77650
mov	esp, ebp
pop	ebp
retn
sub_53E5F0 endp



; Attributes: bp-based frame

sub_53E600 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E600 endp

align 10h


; Attributes: bp-based frame

sub_53E620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3CCh
mov	esp, ebp
pop	ebp
retn
sub_53E620 endp



; Attributes: bp-based frame

sub_53E630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77630
mov	esp, ebp
pop	ebp
retn
sub_53E630 endp



; Attributes: bp-based frame

sub_53E640 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_46B570
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53E66E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53E66E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53E640 endp

align 10h


; Attributes: bp-based frame

sub_53E680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A3B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E680 endp

align 10h


; Attributes: bp-based frame

sub_53E6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3CFh
mov	esp, ebp
pop	ebp
retn
sub_53E6A0 endp



; Attributes: bp-based frame

sub_53E6B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77610
mov	esp, ebp
pop	ebp
retn
sub_53E6B0 endp



; Attributes: bp-based frame

sub_53E6C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A410
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E6C0 endp

align 10h


; Attributes: bp-based frame

sub_53E6E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3D0h
mov	esp, ebp
pop	ebp
retn
sub_53E6E0 endp



; Attributes: bp-based frame

sub_53E6F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A470
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E6F0 endp

align 10h


; Attributes: bp-based frame

sub_53E710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3D1h
mov	esp, ebp
pop	ebp
retn
sub_53E710 endp



; Attributes: bp-based frame

sub_53E720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D775F0
mov	esp, ebp
pop	ebp
retn
sub_53E720 endp



; Attributes: bp-based frame

sub_53E730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A4D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E730 endp

align 10h


; Attributes: bp-based frame

sub_53E750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3D2h
mov	esp, ebp
pop	ebp
retn
sub_53E750 endp



; Attributes: bp-based frame

sub_53E760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D775D0
mov	esp, ebp
pop	ebp
retn
sub_53E760 endp



; Attributes: bp-based frame

sub_53E770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A530
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E770 endp

align 10h


; Attributes: bp-based frame

sub_53E790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3D4h
mov	esp, ebp
pop	ebp
retn
sub_53E790 endp



; Attributes: bp-based frame

sub_53E7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D775B0
mov	esp, ebp
pop	ebp
retn
sub_53E7A0 endp



; Attributes: bp-based frame

sub_53E7B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E7B0 endp

align 10h


; Attributes: bp-based frame

sub_53E7D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3D7h
mov	esp, ebp
pop	ebp
retn
sub_53E7D0 endp



; Attributes: bp-based frame

sub_53E7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77590
mov	esp, ebp
pop	ebp
retn
sub_53E7E0 endp



; Attributes: bp-based frame

sub_53E7F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A5F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E7F0 endp

align 10h


; Attributes: bp-based frame

sub_53E810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3D8h
mov	esp, ebp
pop	ebp
retn
sub_53E810 endp



; Attributes: bp-based frame

sub_53E820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77570
mov	esp, ebp
pop	ebp
retn
sub_53E820 endp



; Attributes: bp-based frame

sub_53E830 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53E869
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53E869:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53E830 endp

align 10h


; Attributes: bp-based frame

sub_53E880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E880 endp

align 10h


; Attributes: bp-based frame

sub_53E8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3D9h
mov	esp, ebp
pop	ebp
retn
sub_53E8A0 endp



; Attributes: bp-based frame

sub_53E8B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77550
mov	esp, ebp
pop	ebp
retn
sub_53E8B0 endp



; Attributes: bp-based frame

sub_53E8C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A6B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E8C0 endp

align 10h


; Attributes: bp-based frame

sub_53E8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3DAh
mov	esp, ebp
pop	ebp
retn
sub_53E8E0 endp



; Attributes: bp-based frame

sub_53E8F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77520
mov	esp, ebp
pop	ebp
retn
sub_53E8F0 endp



; Attributes: bp-based frame

sub_53E900 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E900 endp

align 10h


; Attributes: bp-based frame

sub_53E920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3DCh
mov	esp, ebp
pop	ebp
retn
sub_53E920 endp



; Attributes: bp-based frame

sub_53E930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E930 endp

align 10h


; Attributes: bp-based frame

sub_53E950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3DDh
mov	esp, ebp
pop	ebp
retn
sub_53E950 endp



; Attributes: bp-based frame

sub_53E960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6940h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53E960 endp

align 10h


; Attributes: bp-based frame

sub_53E980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D774D0
mov	esp, ebp
pop	ebp
retn
sub_53E980 endp



; Attributes: bp-based frame

sub_53E990 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A7D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E990 endp

align 10h


; Attributes: bp-based frame

sub_53E9B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3DEh
mov	esp, ebp
pop	ebp
retn
sub_53E9B0 endp



; Attributes: bp-based frame

sub_53E9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D774B0
mov	esp, ebp
pop	ebp
retn
sub_53E9C0 endp



; Attributes: bp-based frame

sub_53E9D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53E9D0 endp

align 10h


; Attributes: bp-based frame

sub_53E9F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3DFh
mov	esp, ebp
pop	ebp
retn
sub_53E9F0 endp



; Attributes: bp-based frame

sub_53EA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77490
mov	esp, ebp
pop	ebp
retn
sub_53EA00 endp



; Attributes: bp-based frame

sub_53EA10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 28h
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_53EA77
mov	edx, [ebp+var_1C]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53EA77:
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_53EA10 endp

align 10h


; Attributes: bp-based frame

sub_53EA90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EA90 endp

align 10h


; Attributes: bp-based frame

sub_53EAB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1E02h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53EAB0 endp

align 10h


; Attributes: bp-based frame

sub_53EAD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77470
mov	esp, ebp
pop	ebp
retn
sub_53EAD0 endp



; Attributes: bp-based frame

sub_53EAE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A8F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EAE0 endp

align 10h


; Attributes: bp-based frame

sub_53EB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E1h
mov	esp, ebp
pop	ebp
retn
sub_53EB00 endp



; Attributes: bp-based frame

sub_53EB10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1E01h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53EB10 endp

align 10h


; Attributes: bp-based frame

sub_53EB30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77450
mov	esp, ebp
pop	ebp
retn
sub_53EB30 endp



; Attributes: bp-based frame

sub_53EB40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EB40 endp

align 10h


; Attributes: bp-based frame

sub_53EB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E3h
mov	esp, ebp
pop	ebp
retn
sub_53EB60 endp



; Attributes: bp-based frame

sub_53EB70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1F01h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53EB70 endp

align 10h


; Attributes: bp-based frame

sub_53EB90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77430
mov	esp, ebp
pop	ebp
retn
sub_53EB90 endp



; Attributes: bp-based frame

sub_53EBA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56A9B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EBA0 endp

align 10h


; Attributes: bp-based frame

sub_53EBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E4h
mov	esp, ebp
pop	ebp
retn
sub_53EBC0 endp



; Attributes: bp-based frame

sub_53EBD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77410
mov	esp, ebp
pop	ebp
retn
sub_53EBD0 endp



; Attributes: bp-based frame

sub_53EBE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AA10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EBE0 endp

align 10h


; Attributes: bp-based frame

sub_53EC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E6h
mov	esp, ebp
pop	ebp
retn
sub_53EC00 endp



; Attributes: bp-based frame

sub_53EC10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 4601h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53EC10 endp

align 10h


; Attributes: bp-based frame

sub_53EC30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D773F0
mov	esp, ebp
pop	ebp
retn
sub_53EC30 endp



; Attributes: bp-based frame

sub_53EC40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AA70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EC40 endp

align 10h


; Attributes: bp-based frame

sub_53EC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E7h
mov	esp, ebp
pop	ebp
retn
sub_53EC60 endp



; Attributes: bp-based frame

sub_53EC70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AAD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EC70 endp

align 10h


; Attributes: bp-based frame

sub_53EC90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E8h
mov	esp, ebp
pop	ebp
retn
sub_53EC90 endp



; Attributes: bp-based frame

sub_53ECA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D773D0
mov	esp, ebp
pop	ebp
retn
sub_53ECA0 endp



; Attributes: bp-based frame

sub_53ECB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AB30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53ECB0 endp

align 10h


; Attributes: bp-based frame

sub_53ECD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E9h
mov	esp, ebp
pop	ebp
retn
sub_53ECD0 endp



; Attributes: bp-based frame

sub_53ECE0 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_53ED10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53ED05
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53ED05:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_53ECE0 endp

align 10h


; Attributes: bp-based frame

sub_53ED10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 78h
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_1C]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_53ED10 endp

align 10h


; Attributes: bp-based frame

sub_53ED90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AB90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53ED90 endp

align 10h


; Attributes: bp-based frame

sub_53EDB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3EAh
mov	esp, ebp
pop	ebp
retn
sub_53EDB0 endp



; Attributes: bp-based frame

sub_53EDC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AC00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EDC0 endp

align 10h


; Attributes: bp-based frame

sub_53EDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3EBh
mov	esp, ebp
pop	ebp
retn
sub_53EDE0 endp



; Attributes: bp-based frame

sub_53EDF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D773B0
mov	esp, ebp
pop	ebp
retn
sub_53EDF0 endp



; Attributes: bp-based frame

sub_53EE00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AC60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EE00 endp

align 10h


; Attributes: bp-based frame

sub_53EE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3ECh
mov	esp, ebp
pop	ebp
retn
sub_53EE20 endp



; Attributes: bp-based frame

sub_53EE30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77340
mov	esp, ebp
pop	ebp
retn
sub_53EE30 endp



; Attributes: bp-based frame

sub_53EE40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56ACC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EE40 endp

align 10h


; Attributes: bp-based frame

sub_53EE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3EDh
mov	esp, ebp
pop	ebp
retn
sub_53EE60 endp



; Attributes: bp-based frame

sub_53EE70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AD20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EE70 endp

align 10h


; Attributes: bp-based frame

sub_53EE90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3EEh
mov	esp, ebp
pop	ebp
retn
sub_53EE90 endp



; Attributes: bp-based frame

sub_53EEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77320
mov	esp, ebp
pop	ebp
retn
sub_53EEA0 endp



; Attributes: bp-based frame

sub_53EEB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AD80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EEB0 endp

align 10h


; Attributes: bp-based frame

sub_53EED0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F0h
mov	esp, ebp
pop	ebp
retn
sub_53EED0 endp



; Attributes: bp-based frame

sub_53EEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77300
mov	esp, ebp
pop	ebp
retn
sub_53EEE0 endp



; Attributes: bp-based frame

sub_53EEF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56ADE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EEF0 endp

align 10h


; Attributes: bp-based frame

sub_53EF10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F1h
mov	esp, ebp
pop	ebp
retn
sub_53EF10 endp



; Attributes: bp-based frame

sub_53EF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D772E0
mov	esp, ebp
pop	ebp
retn
sub_53EF20 endp



; Attributes: bp-based frame

sub_53EF30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_53EF61
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D5E0
mov	[ebp+var_C], eax
jmp	short loc_53EF68

loc_53EF61:
mov	[ebp+var_C], 0

loc_53EF68:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_53EF30 endp

align 10h


; Attributes: bp-based frame

sub_53EF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F2h
mov	esp, ebp
pop	ebp
retn
sub_53EF80 endp



; Attributes: bp-based frame

sub_53EF90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D772C0
mov	esp, ebp
pop	ebp
retn
sub_53EF90 endp



; Attributes: bp-based frame

sub_53EFA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AE40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EFA0 endp

align 10h


; Attributes: bp-based frame

sub_53EFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F3h
mov	esp, ebp
pop	ebp
retn
sub_53EFC0 endp



; Attributes: bp-based frame

sub_53EFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77270
mov	esp, ebp
pop	ebp
retn
sub_53EFD0 endp



; Attributes: bp-based frame

sub_53EFE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AEA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53EFE0 endp

align 10h


; Attributes: bp-based frame

sub_53F000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F4h
mov	esp, ebp
pop	ebp
retn
sub_53F000 endp



; Attributes: bp-based frame

sub_53F010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77250
mov	esp, ebp
pop	ebp
retn
sub_53F010 endp



; Attributes: bp-based frame

sub_53F020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AF00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F020 endp

align 10h


; Attributes: bp-based frame

sub_53F040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F5h
mov	esp, ebp
pop	ebp
retn
sub_53F040 endp



; Attributes: bp-based frame

sub_53F050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77210
mov	esp, ebp
pop	ebp
retn
sub_53F050 endp



; Attributes: bp-based frame

sub_53F060 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AF60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F060 endp

align 10h


; Attributes: bp-based frame

sub_53F080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F6h
mov	esp, ebp
pop	ebp
retn
sub_53F080 endp



; Attributes: bp-based frame

sub_53F090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D771F0
mov	esp, ebp
pop	ebp
retn
sub_53F090 endp



; Attributes: bp-based frame

sub_53F0A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56AFC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F0A0 endp

align 10h


; Attributes: bp-based frame

sub_53F0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F8h
mov	esp, ebp
pop	ebp
retn
sub_53F0C0 endp



; Attributes: bp-based frame

sub_53F0D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B050
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F0D0 endp

align 10h


; Attributes: bp-based frame

sub_53F0F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3F9h
mov	esp, ebp
pop	ebp
retn
sub_53F0F0 endp



; Attributes: bp-based frame

sub_53F100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D771D0
mov	esp, ebp
pop	ebp
retn
sub_53F100 endp



; Attributes: bp-based frame

sub_53F110 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B0B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F110 endp

align 10h


; Attributes: bp-based frame

sub_53F130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3FAh
mov	esp, ebp
pop	ebp
retn
sub_53F130 endp



; Attributes: bp-based frame

sub_53F140 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1F42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53F140 endp

align 10h


; Attributes: bp-based frame

sub_53F160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D771B0
mov	esp, ebp
pop	ebp
retn
sub_53F160 endp



; Attributes: bp-based frame

sub_53F170 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B110
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F170 endp

align 10h


; Attributes: bp-based frame

sub_53F190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3FBh
mov	esp, ebp
pop	ebp
retn
sub_53F190 endp



; Attributes: bp-based frame

sub_53F1A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53F1A0 endp

align 10h


; Attributes: bp-based frame

sub_53F1C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B170
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F1C0 endp

align 10h


; Attributes: bp-based frame

sub_53F1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3FCh
mov	esp, ebp
pop	ebp
retn
sub_53F1E0 endp



; Attributes: bp-based frame

sub_53F1F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B1D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F1F0 endp

align 10h


; Attributes: bp-based frame

sub_53F210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3FDh
mov	esp, ebp
pop	ebp
retn
sub_53F210 endp



; Attributes: bp-based frame

sub_53F220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77160
mov	esp, ebp
pop	ebp
retn
sub_53F220 endp



; Attributes: bp-based frame

sub_53F230 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_53F261
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D6A0
mov	[ebp+var_C], eax
jmp	short loc_53F268

loc_53F261:
mov	[ebp+var_C], 0

loc_53F268:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_53F230 endp

align 10h


; Attributes: bp-based frame

sub_53F280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3FEh
mov	esp, ebp
pop	ebp
retn
sub_53F280 endp



; Attributes: bp-based frame

sub_53F290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77140
mov	esp, ebp
pop	ebp
retn
sub_53F290 endp



; Attributes: bp-based frame

sub_53F2A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B230
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F2A0 endp

align 10h


; Attributes: bp-based frame

sub_53F2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3FFh
mov	esp, ebp
pop	ebp
retn
sub_53F2C0 endp



; Attributes: bp-based frame

sub_53F2D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77120
mov	esp, ebp
pop	ebp
retn
sub_53F2D0 endp



; Attributes: bp-based frame

sub_53F2E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B290
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F2E0 endp

align 10h


; Attributes: bp-based frame

sub_53F300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 400h
mov	esp, ebp
pop	ebp
retn
sub_53F300 endp



; Attributes: bp-based frame

sub_53F310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77100
mov	esp, ebp
pop	ebp
retn
sub_53F310 endp



; Attributes: bp-based frame

sub_53F320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B2F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F320 endp

align 10h


; Attributes: bp-based frame

sub_53F340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 401h
mov	esp, ebp
pop	ebp
retn
sub_53F340 endp



; Attributes: bp-based frame

sub_53F350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D770C0
mov	esp, ebp
pop	ebp
retn
sub_53F350 endp



; Attributes: bp-based frame

sub_53F360 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F360 endp

align 10h


; Attributes: bp-based frame

sub_53F380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 402h
mov	esp, ebp
pop	ebp
retn
sub_53F380 endp



; Attributes: bp-based frame

sub_53F390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D770A0
mov	esp, ebp
pop	ebp
retn
sub_53F390 endp



; Attributes: bp-based frame

sub_53F3A0 proc	near

var_74=	dword ptr -74h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	ecx, [ebp+var_74]
call	sub_53F430
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53F3C5
mov	ecx, [ebp+var_74]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53F3C5:
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_53F3A0 endp

align 10h


; Attributes: bp-based frame

sub_53F3D0 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_53F3D0 endp

align 10h


; Attributes: bp-based frame

sub_53F430 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_54=	dword ptr -54h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
add	eax, 468h
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
add	ecx, 1Ch
call	sub_555750
mov	ecx, [ebp+var_54]
add	ecx, 10h
call	sub_555750
mov	ecx, [ebp+var_84]
add	ecx, 430h
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_80]
add	ecx, 10h
call	sub_407E50
mov	ecx, [ebp+var_80]
add	ecx, 4
call	sub_5551D0
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_4E9490
mov	ecx, [ebp+var_84]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_53F430 endp

align 10h


; Attributes: bp-based frame

sub_53F4B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B3B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F4B0 endp

align 10h


; Attributes: bp-based frame

sub_53F4D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 409h
mov	esp, ebp
pop	ebp
retn
sub_53F4D0 endp



; Attributes: bp-based frame

sub_53F4E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B420
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F4E0 endp

align 10h


; Attributes: bp-based frame

sub_53F500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 40Dh
mov	esp, ebp
pop	ebp
retn
sub_53F500 endp



; Attributes: bp-based frame

sub_53F510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77050
mov	esp, ebp
pop	ebp
retn
sub_53F510 endp



; Attributes: bp-based frame

sub_53F520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B480
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F520 endp

align 10h


; Attributes: bp-based frame

sub_53F540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 40Eh
mov	esp, ebp
pop	ebp
retn
sub_53F540 endp



; Attributes: bp-based frame

sub_53F550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77030
mov	esp, ebp
pop	ebp
retn
sub_53F550 endp



; Attributes: bp-based frame

sub_53F560 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B4E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F560 endp

align 10h


; Attributes: bp-based frame

sub_53F580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 40Fh
mov	esp, ebp
pop	ebp
retn
sub_53F580 endp



; Attributes: bp-based frame

sub_53F590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D77010
mov	esp, ebp
pop	ebp
retn
sub_53F590 endp



; Attributes: bp-based frame

sub_53F5A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B540
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F5A0 endp

align 10h


; Attributes: bp-based frame

sub_53F5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 410h
mov	esp, ebp
pop	ebp
retn
sub_53F5C0 endp



; Attributes: bp-based frame

sub_53F5D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B5A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F5D0 endp

align 10h


; Attributes: bp-based frame

sub_53F5F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 412h
mov	esp, ebp
pop	ebp
retn
sub_53F5F0 endp



; Attributes: bp-based frame

sub_53F600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76FF0
mov	esp, ebp
pop	ebp
retn
sub_53F600 endp



; Attributes: bp-based frame

sub_53F610 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B610
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F610 endp

align 10h


; Attributes: bp-based frame

sub_53F630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 413h
mov	esp, ebp
pop	ebp
retn
sub_53F630 endp



; Attributes: bp-based frame

sub_53F640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76FD0
mov	esp, ebp
pop	ebp
retn
sub_53F640 endp



; Attributes: bp-based frame

sub_53F650 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B670
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F650 endp

align 10h


; Attributes: bp-based frame

sub_53F670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 414h
mov	esp, ebp
pop	ebp
retn
sub_53F670 endp



; Attributes: bp-based frame

sub_53F680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76FB0
mov	esp, ebp
pop	ebp
retn
sub_53F680 endp



; Attributes: bp-based frame

sub_53F690 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B6D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F690 endp

align 10h


; Attributes: bp-based frame

sub_53F6B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 415h
mov	esp, ebp
pop	ebp
retn
sub_53F6B0 endp



; Attributes: bp-based frame

sub_53F6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76F90
mov	esp, ebp
pop	ebp
retn
sub_53F6C0 endp



; Attributes: bp-based frame

sub_53F6D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B730
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F6D0 endp

align 10h


; Attributes: bp-based frame

sub_53F6F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 416h
mov	esp, ebp
pop	ebp
retn
sub_53F6F0 endp



; Attributes: bp-based frame

sub_53F700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76F70
mov	esp, ebp
pop	ebp
retn
sub_53F700 endp



; Attributes: bp-based frame

sub_53F710 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B790
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F710 endp

align 10h


; Attributes: bp-based frame

sub_53F730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 419h
mov	esp, ebp
pop	ebp
retn
sub_53F730 endp



; Attributes: bp-based frame

sub_53F740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76F50
mov	esp, ebp
pop	ebp
retn
sub_53F740 endp



; Attributes: bp-based frame

sub_53F750 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B7F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F750 endp

align 10h


; Attributes: bp-based frame

sub_53F770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 41Ah
mov	esp, ebp
pop	ebp
retn
sub_53F770 endp



; Attributes: bp-based frame

sub_53F780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76F30
mov	esp, ebp
pop	ebp
retn
sub_53F780 endp



; Attributes: bp-based frame

sub_53F790 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B850
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F790 endp

align 10h


; Attributes: bp-based frame

sub_53F7B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 41Ch
mov	esp, ebp
pop	ebp
retn
sub_53F7B0 endp



; Attributes: bp-based frame

sub_53F7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76F10
mov	esp, ebp
pop	ebp
retn
sub_53F7C0 endp



; Attributes: bp-based frame

sub_53F7D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B8B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F7D0 endp

align 10h


; Attributes: bp-based frame

sub_53F7F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 41Dh
mov	esp, ebp
pop	ebp
retn
sub_53F7F0 endp



; Attributes: bp-based frame

sub_53F800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76EF0
mov	esp, ebp
pop	ebp
retn
sub_53F800 endp



; Attributes: bp-based frame

sub_53F810 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B910
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F810 endp

align 10h


; Attributes: bp-based frame

sub_53F830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 41Eh
mov	esp, ebp
pop	ebp
retn
sub_53F830 endp



; Attributes: bp-based frame

sub_53F840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76ED0
mov	esp, ebp
pop	ebp
retn
sub_53F840 endp



; Attributes: bp-based frame

sub_53F850 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B970
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F850 endp

align 10h


; Attributes: bp-based frame

sub_53F870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 41Fh
mov	esp, ebp
pop	ebp
retn
sub_53F870 endp



; Attributes: bp-based frame

sub_53F880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53F8AE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53F8AE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53F880 endp

align 10h


; Attributes: bp-based frame

sub_53F8C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56B9D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F8C0 endp

align 10h


; Attributes: bp-based frame

sub_53F8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 420h
mov	esp, ebp
pop	ebp
retn
sub_53F8E0 endp



; Attributes: bp-based frame

sub_53F8F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BA40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F8F0 endp

align 10h


; Attributes: bp-based frame

sub_53F910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 421h
mov	esp, ebp
pop	ebp
retn
sub_53F910 endp



; Attributes: bp-based frame

sub_53F920 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BAA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F920 endp

align 10h


; Attributes: bp-based frame

sub_53F940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 425h
mov	esp, ebp
pop	ebp
retn
sub_53F940 endp



; Attributes: bp-based frame

sub_53F950 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BB10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F950 endp

align 10h


; Attributes: bp-based frame

sub_53F970 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 426h
mov	esp, ebp
pop	ebp
retn
sub_53F970 endp



; Attributes: bp-based frame

sub_53F980 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 701h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53F980 endp

align 10h


; Attributes: bp-based frame

sub_53F9A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BB80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F9A0 endp

align 10h


; Attributes: bp-based frame

sub_53F9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 427h
mov	esp, ebp
pop	ebp
retn
sub_53F9C0 endp



; Attributes: bp-based frame

sub_53F9D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BBF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53F9D0 endp

align 10h


; Attributes: bp-based frame

sub_53F9F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 428h
mov	esp, ebp
pop	ebp
retn
sub_53F9F0 endp



; Attributes: bp-based frame

sub_53FA00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BC50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FA00 endp

align 10h


; Attributes: bp-based frame

sub_53FA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 429h
mov	esp, ebp
pop	ebp
retn
sub_53FA20 endp



; Attributes: bp-based frame

sub_53FA30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BCB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FA30 endp

align 10h


; Attributes: bp-based frame

sub_53FA50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 42Ah
mov	esp, ebp
pop	ebp
retn
sub_53FA50 endp



; Attributes: bp-based frame

sub_53FA60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BD20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FA60 endp

align 10h


; Attributes: bp-based frame

sub_53FA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 42Bh
mov	esp, ebp
pop	ebp
retn
sub_53FA80 endp



; Attributes: bp-based frame

sub_53FA90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53FAB3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53FAB3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53FA90 endp

align 10h


; Attributes: bp-based frame

sub_53FAC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BD90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FAC0 endp

align 10h


; Attributes: bp-based frame

sub_53FAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 42Ch
mov	esp, ebp
pop	ebp
retn
sub_53FAE0 endp



; Attributes: bp-based frame

sub_53FAF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 703h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53FAF0 endp

align 10h


; Attributes: bp-based frame

sub_53FB10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BDF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FB10 endp

align 10h


; Attributes: bp-based frame

sub_53FB30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 42Dh
mov	esp, ebp
pop	ebp
retn
sub_53FB30 endp



; Attributes: bp-based frame

sub_53FB40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 743h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53FB40 endp

align 10h


; Attributes: bp-based frame

sub_53FB60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BE50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FB60 endp

align 10h


; Attributes: bp-based frame

sub_53FB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 42Eh
mov	esp, ebp
pop	ebp
retn
sub_53FB80 endp



; Attributes: bp-based frame

sub_53FB90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BEB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FB90 endp

align 10h


; Attributes: bp-based frame

sub_53FBB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 42Fh
mov	esp, ebp
pop	ebp
retn
sub_53FBB0 endp



; Attributes: bp-based frame

sub_53FBC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BF10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FBC0 endp

align 10h


; Attributes: bp-based frame

sub_53FBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 430h
mov	esp, ebp
pop	ebp
retn
sub_53FBE0 endp



; Attributes: bp-based frame

sub_53FBF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BF70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FBF0 endp

align 10h


; Attributes: bp-based frame

sub_53FC10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 431h
mov	esp, ebp
pop	ebp
retn
sub_53FC10 endp



; Attributes: bp-based frame

sub_53FC20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 704h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53FC20 endp

align 10h


; Attributes: bp-based frame

sub_53FC40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56BFD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FC40 endp

align 10h


; Attributes: bp-based frame

sub_53FC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 432h
mov	esp, ebp
pop	ebp
retn
sub_53FC60 endp



; Attributes: bp-based frame

sub_53FC70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C030
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FC70 endp

align 10h


; Attributes: bp-based frame

sub_53FC90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 433h
mov	esp, ebp
pop	ebp
retn
sub_53FC90 endp



; Attributes: bp-based frame

sub_53FCA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C090
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FCA0 endp

align 10h


; Attributes: bp-based frame

sub_53FCC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 434h
mov	esp, ebp
pop	ebp
retn
sub_53FCC0 endp



; Attributes: bp-based frame

sub_53FCD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76EB0
mov	esp, ebp
pop	ebp
retn
sub_53FCD0 endp



; Attributes: bp-based frame

sub_53FCE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C0F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FCE0 endp

align 10h


; Attributes: bp-based frame

sub_53FD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 435h
mov	esp, ebp
pop	ebp
retn
sub_53FD00 endp



; Attributes: bp-based frame

sub_53FD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5F41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_53FD10 endp

align 10h


; Attributes: bp-based frame

sub_53FD30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76E90
mov	esp, ebp
pop	ebp
retn
sub_53FD30 endp



; Attributes: bp-based frame

sub_53FD40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C150
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FD40 endp

align 10h


; Attributes: bp-based frame

sub_53FD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 436h
mov	esp, ebp
pop	ebp
retn
sub_53FD60 endp



; Attributes: bp-based frame

sub_53FD70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76E70
mov	esp, ebp
pop	ebp
retn
sub_53FD70 endp



; Attributes: bp-based frame

sub_53FD80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53FDAE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53FDAE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_53FD80 endp

align 10h


; Attributes: bp-based frame

sub_53FDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_53FDC0 endp

align 10h


; Attributes: bp-based frame

sub_53FDE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C1B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FDE0 endp

align 10h


; Attributes: bp-based frame

sub_53FE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 437h
mov	esp, ebp
pop	ebp
retn
sub_53FE00 endp



; Attributes: bp-based frame

sub_53FE10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76E50
mov	esp, ebp
pop	ebp
retn
sub_53FE10 endp



; Attributes: bp-based frame

sub_53FE20 proc	near

var_78=	dword ptr -78h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	ecx, [ebp+var_78]
call	sub_53FE50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_53FE45
mov	ecx, [ebp+var_78]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_53FE45:
mov	eax, [ebp+var_78]
mov	esp, ebp
pop	ebp
retn	4
sub_53FE20 endp

align 10h


; Attributes: bp-based frame

sub_53FE50 proc	near

var_8C=	dword ptr -8Ch

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_8C], ecx
mov	ecx, [ebp+var_8C]
add	ecx, 6Ch
call	sub_555250
mov	ecx, [ebp+var_8C]
add	ecx, 60h
call	sub_555250
mov	ecx, [ebp+var_8C]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_8C]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_53FE50 endp

align 10h


; Attributes: bp-based frame

sub_53FEA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FEA0 endp

align 10h


; Attributes: bp-based frame

sub_53FEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 438h
mov	esp, ebp
pop	ebp
retn
sub_53FEC0 endp



; Attributes: bp-based frame

sub_53FED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C290
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FED0 endp

align 10h


; Attributes: bp-based frame

sub_53FEF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 439h
mov	esp, ebp
pop	ebp
retn
sub_53FEF0 endp



; Attributes: bp-based frame

sub_53FF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76E30
mov	esp, ebp
pop	ebp
retn
sub_53FF00 endp



; Attributes: bp-based frame

sub_53FF10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C2F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FF10 endp

align 10h


; Attributes: bp-based frame

sub_53FF30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 43Ah
mov	esp, ebp
pop	ebp
retn
sub_53FF30 endp



; Attributes: bp-based frame

sub_53FF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76E10
mov	esp, ebp
pop	ebp
retn
sub_53FF40 endp



; Attributes: bp-based frame

sub_53FF50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FF50 endp

align 10h


; Attributes: bp-based frame

sub_53FF70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 43Bh
mov	esp, ebp
pop	ebp
retn
sub_53FF70 endp



; Attributes: bp-based frame

sub_53FF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76DF0
mov	esp, ebp
pop	ebp
retn
sub_53FF80 endp



; Attributes: bp-based frame

sub_53FF90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C3B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_53FF90 endp

align 10h


; Attributes: bp-based frame

sub_53FFB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 43Ch
mov	esp, ebp
pop	ebp
retn
sub_53FFB0 endp



; Attributes: bp-based frame

sub_53FFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76DD0
mov	esp, ebp
pop	ebp
retn
sub_53FFC0 endp



; Attributes: bp-based frame

sub_53FFD0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 20h
call	sub_487140
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_540000
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_540000:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_53FFD0 endp

align 10h


; Attributes: bp-based frame

sub_540010 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C410
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540010 endp

align 10h


; Attributes: bp-based frame

sub_540030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 43Dh
mov	esp, ebp
pop	ebp
retn
sub_540030 endp



; Attributes: bp-based frame

sub_540040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C470
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540040 endp

align 10h


; Attributes: bp-based frame

sub_540060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 43Eh
mov	esp, ebp
pop	ebp
retn
sub_540060 endp



; Attributes: bp-based frame

sub_540070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76DB0
mov	esp, ebp
pop	ebp
retn
sub_540070 endp



; Attributes: bp-based frame

sub_540080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_540080 endp

align 10h


; Attributes: bp-based frame

sub_5400A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C4D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5400A0 endp

align 10h


; Attributes: bp-based frame

sub_5400C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 43Fh
mov	esp, ebp
pop	ebp
retn
sub_5400C0 endp



; Attributes: bp-based frame

sub_5400D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76D90
mov	esp, ebp
pop	ebp
retn
sub_5400D0 endp



; Attributes: bp-based frame

sub_5400E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C530
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5400E0 endp

align 10h


; Attributes: bp-based frame

sub_540100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 440h
mov	esp, ebp
pop	ebp
retn
sub_540100 endp



; Attributes: bp-based frame

sub_540110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76D70
mov	esp, ebp
pop	ebp
retn
sub_540110 endp



; Attributes: bp-based frame

sub_540120 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540120 endp

align 10h


; Attributes: bp-based frame

sub_540140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 441h
mov	esp, ebp
pop	ebp
retn
sub_540140 endp



; Attributes: bp-based frame

sub_540150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5040h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_540150 endp

align 10h


; Attributes: bp-based frame

sub_540170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76D50
mov	esp, ebp
pop	ebp
retn
sub_540170 endp



; Attributes: bp-based frame

sub_540180 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C5F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540180 endp

align 10h


; Attributes: bp-based frame

sub_5401A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 442h
mov	esp, ebp
pop	ebp
retn
sub_5401A0 endp



; Attributes: bp-based frame

sub_5401B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5605h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5401B0 endp

align 10h


; Attributes: bp-based frame

sub_5401D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76D30
mov	esp, ebp
pop	ebp
retn
sub_5401D0 endp



; Attributes: bp-based frame

sub_5401E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5401E0 endp

align 10h


; Attributes: bp-based frame

sub_540200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 443h
mov	esp, ebp
pop	ebp
retn
sub_540200 endp



; Attributes: bp-based frame

sub_540210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5601h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_540210 endp

align 10h


; Attributes: bp-based frame

sub_540230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76D10
mov	esp, ebp
pop	ebp
retn
sub_540230 endp



; Attributes: bp-based frame

sub_540240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C6B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540240 endp

align 10h


; Attributes: bp-based frame

sub_540260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 444h
mov	esp, ebp
pop	ebp
retn
sub_540260 endp



; Attributes: bp-based frame

sub_540270 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540270 endp

align 10h


; Attributes: bp-based frame

sub_540290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 445h
mov	esp, ebp
pop	ebp
retn
sub_540290 endp



; Attributes: bp-based frame

sub_5402A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 605h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5402A0 endp

align 10h


; Attributes: bp-based frame

sub_5402C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5402C0 endp

align 10h


; Attributes: bp-based frame

sub_5402E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 446h
mov	esp, ebp
pop	ebp
retn
sub_5402E0 endp



; Attributes: bp-based frame

sub_5402F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C7D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5402F0 endp

align 10h


; Attributes: bp-based frame

sub_540310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 447h
mov	esp, ebp
pop	ebp
retn
sub_540310 endp



; Attributes: bp-based frame

sub_540320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540320 endp

align 10h


; Attributes: bp-based frame

sub_540340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 448h
mov	esp, ebp
pop	ebp
retn
sub_540340 endp



; Attributes: bp-based frame

sub_540350 proc	near

var_5C=	dword ptr -5Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 20h
call	sub_436CF0
mov	ecx, [ebp+var_5C]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_540380
mov	ecx, [ebp+var_5C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_540380:
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_540350 endp

align 10h


; Attributes: bp-based frame

sub_540390 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540390 endp

align 10h


; Attributes: bp-based frame

sub_5403B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 449h
mov	esp, ebp
pop	ebp
retn
sub_5403B0 endp



; Attributes: bp-based frame

sub_5403C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0F45h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5403C0 endp

align 10h


; Attributes: bp-based frame

sub_5403E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76CC0
mov	esp, ebp
pop	ebp
retn
sub_5403E0 endp



; Attributes: bp-based frame

sub_5403F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C8F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5403F0 endp

align 10h


; Attributes: bp-based frame

sub_540410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 45Ah
mov	esp, ebp
pop	ebp
retn
sub_540410 endp



; Attributes: bp-based frame

sub_540420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76CA0
mov	esp, ebp
pop	ebp
retn
sub_540420 endp



; Attributes: bp-based frame

sub_540430 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540430 endp

align 10h


; Attributes: bp-based frame

sub_540450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 45Bh
mov	esp, ebp
pop	ebp
retn
sub_540450 endp



; Attributes: bp-based frame

sub_540460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76C80
mov	esp, ebp
pop	ebp
retn
sub_540460 endp



; Attributes: bp-based frame

sub_540470 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56C9B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540470 endp

align 10h


; Attributes: bp-based frame

sub_540490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 45Ch
mov	esp, ebp
pop	ebp
retn
sub_540490 endp



; Attributes: bp-based frame

sub_5404A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76C60
mov	esp, ebp
pop	ebp
retn
sub_5404A0 endp



; Attributes: bp-based frame

sub_5404B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5404DE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5404DE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5404B0 endp

align 10h


; Attributes: bp-based frame

sub_5404F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5404F0 endp

align 10h


; Attributes: bp-based frame

sub_540510 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CA10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540510 endp

align 10h


; Attributes: bp-based frame

sub_540530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 45Dh
mov	esp, ebp
pop	ebp
retn
sub_540530 endp



; Attributes: bp-based frame

sub_540540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76C40
mov	esp, ebp
pop	ebp
retn
sub_540540 endp



; Attributes: bp-based frame

sub_540550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CA80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540550 endp

align 10h


; Attributes: bp-based frame

sub_540570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 45Eh
mov	esp, ebp
pop	ebp
retn
sub_540570 endp



; Attributes: bp-based frame

sub_540580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76C20
mov	esp, ebp
pop	ebp
retn
sub_540580 endp



; Attributes: bp-based frame

sub_540590 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CAE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540590 endp

align 10h


; Attributes: bp-based frame

sub_5405B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 45Fh
mov	esp, ebp
pop	ebp
retn
sub_5405B0 endp



; Attributes: bp-based frame

sub_5405C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76C00
mov	esp, ebp
pop	ebp
retn
sub_5405C0 endp



; Attributes: bp-based frame

sub_5405D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CB40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5405D0 endp

align 10h


; Attributes: bp-based frame

sub_5405F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 460h
mov	esp, ebp
pop	ebp
retn
sub_5405F0 endp



; Attributes: bp-based frame

sub_540600 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 5644h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_540600 endp

align 10h


; Attributes: bp-based frame

sub_540620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76BC0
mov	esp, ebp
pop	ebp
retn
sub_540620 endp



; Attributes: bp-based frame

sub_540630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CBA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540630 endp

align 10h


; Attributes: bp-based frame

sub_540650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 465h
mov	esp, ebp
pop	ebp
retn
sub_540650 endp



; Attributes: bp-based frame

sub_540660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76BA0
mov	esp, ebp
pop	ebp
retn
sub_540660 endp



; Attributes: bp-based frame

sub_540670 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CC00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540670 endp

align 10h


; Attributes: bp-based frame

sub_540690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 466h
mov	esp, ebp
pop	ebp
retn
sub_540690 endp



; Attributes: bp-based frame

sub_5406A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CC60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5406A0 endp

align 10h


; Attributes: bp-based frame

sub_5406C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 467h
mov	esp, ebp
pop	ebp
retn
sub_5406C0 endp



; Attributes: bp-based frame

sub_5406D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76B80
mov	esp, ebp
pop	ebp
retn
sub_5406D0 endp



; Attributes: bp-based frame

sub_5406E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CCC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5406E0 endp

align 10h


; Attributes: bp-based frame

sub_540700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 468h
mov	esp, ebp
pop	ebp
retn
sub_540700 endp



; Attributes: bp-based frame

sub_540710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76B60
mov	esp, ebp
pop	ebp
retn
sub_540710 endp



; Attributes: bp-based frame

sub_540720 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CD20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540720 endp

align 10h


; Attributes: bp-based frame

sub_540740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 469h
mov	esp, ebp
pop	ebp
retn
sub_540740 endp



; Attributes: bp-based frame

sub_540750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76B40
mov	esp, ebp
pop	ebp
retn
sub_540750 endp



; Attributes: bp-based frame

sub_540760 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CD80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540760 endp

align 10h


; Attributes: bp-based frame

sub_540780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 46Ah
mov	esp, ebp
pop	ebp
retn
sub_540780 endp



; Attributes: bp-based frame

sub_540790 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CDE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540790 endp

align 10h


; Attributes: bp-based frame

sub_5407B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 46Bh
mov	esp, ebp
pop	ebp
retn
sub_5407B0 endp



; Attributes: bp-based frame

sub_5407C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CE40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5407C0 endp

align 10h


; Attributes: bp-based frame

sub_5407E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 46Ch
mov	esp, ebp
pop	ebp
retn
sub_5407E0 endp



; Attributes: bp-based frame

sub_5407F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CEA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5407F0 endp

align 10h


; Attributes: bp-based frame

sub_540810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 46Dh
mov	esp, ebp
pop	ebp
retn
sub_540810 endp



; Attributes: bp-based frame

sub_540820 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CF00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540820 endp

align 10h


; Attributes: bp-based frame

sub_540840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 46Eh
mov	esp, ebp
pop	ebp
retn
sub_540840 endp



; Attributes: bp-based frame

sub_540850 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CF60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540850 endp

align 10h


; Attributes: bp-based frame

sub_540870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 46Fh
mov	esp, ebp
pop	ebp
retn
sub_540870 endp



; Attributes: bp-based frame

sub_540880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56CFC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540880 endp

align 10h


; Attributes: bp-based frame

sub_5408A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 470h
mov	esp, ebp
pop	ebp
retn
sub_5408A0 endp



; Attributes: bp-based frame

sub_5408B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_42E0F0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_409540
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5408E9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5408E9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5408B0 endp

align 10h


; Attributes: bp-based frame

sub_540900 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D020
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540900 endp

align 10h


; Attributes: bp-based frame

sub_540920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 471h
mov	esp, ebp
pop	ebp
retn
sub_540920 endp



; Attributes: bp-based frame

sub_540930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D080
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540930 endp

align 10h


; Attributes: bp-based frame

sub_540950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 472h
mov	esp, ebp
pop	ebp
retn
sub_540950 endp



; Attributes: bp-based frame

sub_540960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76B00
mov	esp, ebp
pop	ebp
retn
sub_540960 endp



; Attributes: bp-based frame

sub_540970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5409A9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5409A9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_540970 endp

align 10h


; Attributes: bp-based frame

sub_5409C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D0E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5409C0 endp

align 10h


; Attributes: bp-based frame

sub_5409E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 473h
mov	esp, ebp
pop	ebp
retn
sub_5409E0 endp



; Attributes: bp-based frame

sub_5409F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76AE0
mov	esp, ebp
pop	ebp
retn
sub_5409F0 endp



; Attributes: bp-based frame

sub_540A00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D150
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540A00 endp

align 10h


; Attributes: bp-based frame

sub_540A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 474h
mov	esp, ebp
pop	ebp
retn
sub_540A20 endp



; Attributes: bp-based frame

sub_540A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76AC0
mov	esp, ebp
pop	ebp
retn
sub_540A30 endp



; Attributes: bp-based frame

sub_540A40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D1B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540A40 endp

align 10h


; Attributes: bp-based frame

sub_540A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 475h
mov	esp, ebp
pop	ebp
retn
sub_540A60 endp



; Attributes: bp-based frame

sub_540A70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76AA0
mov	esp, ebp
pop	ebp
retn
sub_540A70 endp



; Attributes: bp-based frame

sub_540A80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D210
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540A80 endp

align 10h


; Attributes: bp-based frame

sub_540AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 476h
mov	esp, ebp
pop	ebp
retn
sub_540AA0 endp



; Attributes: bp-based frame

sub_540AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76A80
mov	esp, ebp
pop	ebp
retn
sub_540AB0 endp



; Attributes: bp-based frame

sub_540AC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D270
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540AC0 endp

align 10h


; Attributes: bp-based frame

sub_540AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 477h
mov	esp, ebp
pop	ebp
retn
sub_540AE0 endp



; Attributes: bp-based frame

sub_540AF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D2D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540AF0 endp

align 10h


; Attributes: bp-based frame

sub_540B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 478h
mov	esp, ebp
pop	ebp
retn
sub_540B10 endp



; Attributes: bp-based frame

sub_540B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76A60
mov	esp, ebp
pop	ebp
retn
sub_540B20 endp



; Attributes: bp-based frame

sub_540B30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D330
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540B30 endp

align 10h


; Attributes: bp-based frame

sub_540B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 479h
mov	esp, ebp
pop	ebp
retn
sub_540B50 endp



; Attributes: bp-based frame

sub_540B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76A40
mov	esp, ebp
pop	ebp
retn
sub_540B60 endp



; Attributes: bp-based frame

sub_540B70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D390
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540B70 endp

align 10h


; Attributes: bp-based frame

sub_540B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 47Ah
mov	esp, ebp
pop	ebp
retn
sub_540B90 endp



; Attributes: bp-based frame

sub_540BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76A20
mov	esp, ebp
pop	ebp
retn
sub_540BA0 endp



; Attributes: bp-based frame

sub_540BB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D3F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540BB0 endp

align 10h


; Attributes: bp-based frame

sub_540BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 47Bh
mov	esp, ebp
pop	ebp
retn
sub_540BD0 endp



; Attributes: bp-based frame

sub_540BE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 40h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_540BE0 endp

align 10h


; Attributes: bp-based frame

sub_540C00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D450
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540C00 endp

align 10h


; Attributes: bp-based frame

sub_540C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 47Ch
mov	esp, ebp
pop	ebp
retn
sub_540C20 endp



; Attributes: bp-based frame

sub_540C30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D4B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540C30 endp

align 10h


; Attributes: bp-based frame

sub_540C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 47Eh
mov	esp, ebp
pop	ebp
retn
sub_540C50 endp



; Attributes: bp-based frame

sub_540C60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D510
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540C60 endp

align 10h


; Attributes: bp-based frame

sub_540C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 47Fh
mov	esp, ebp
pop	ebp
retn
sub_540C80 endp



; Attributes: bp-based frame

sub_540C90 proc	near

var_98=	dword ptr -98h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	ecx, [ebp+var_98]
call	sub_540CD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_540CC1
mov	ecx, [ebp+var_98]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_540CC1:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_540C90 endp

align 10h


; Attributes: bp-based frame

sub_540CD0 proc	near

var_BC=	dword ptr -0BCh

push	ebp
mov	ebp, esp
sub	esp, 0BCh
mov	[ebp+var_BC], ecx
mov	ecx, [ebp+var_BC]
add	ecx, 64h
call	sub_555750
mov	ecx, [ebp+var_BC]
add	ecx, 58h
call	sub_487140
mov	ecx, [ebp+var_BC]
add	ecx, 4Ch
call	sub_436CF0
mov	ecx, [ebp+var_BC]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_BC]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_540CD0 endp

align 10h


; Attributes: bp-based frame

sub_540D30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D570
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540D30 endp

align 10h


; Attributes: bp-based frame

sub_540D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 480h
mov	esp, ebp
pop	ebp
retn
sub_540D50 endp



; Attributes: bp-based frame

sub_540D60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D5E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540D60 endp

align 10h


; Attributes: bp-based frame

sub_540D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 481h
mov	esp, ebp
pop	ebp
retn
sub_540D80 endp



; Attributes: bp-based frame

sub_540D90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D640
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540D90 endp

align 10h


; Attributes: bp-based frame

sub_540DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 482h
mov	esp, ebp
pop	ebp
retn
sub_540DB0 endp



; Attributes: bp-based frame

sub_540DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D6D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540DC0 endp

align 10h


; Attributes: bp-based frame

sub_540DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 483h
mov	esp, ebp
pop	ebp
retn
sub_540DE0 endp



; Attributes: bp-based frame

sub_540DF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D730
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540DF0 endp

align 10h


; Attributes: bp-based frame

sub_540E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 484h
mov	esp, ebp
pop	ebp
retn
sub_540E10 endp



; Attributes: bp-based frame

sub_540E20 proc	near

var_5C=	dword ptr -5Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 28h
call	sub_436CF0
mov	ecx, [ebp+var_5C]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_540E50
mov	ecx, [ebp+var_5C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_540E50:
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_540E20 endp

align 10h


; Attributes: bp-based frame

sub_540E60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D790
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540E60 endp

align 10h


; Attributes: bp-based frame

sub_540E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 485h
mov	esp, ebp
pop	ebp
retn
sub_540E80 endp



; Attributes: bp-based frame

sub_540E90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D7F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540E90 endp

align 10h


; Attributes: bp-based frame

sub_540EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 486h
mov	esp, ebp
pop	ebp
retn
sub_540EB0 endp



; Attributes: bp-based frame

sub_540EC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D850
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540EC0 endp

align 10h


; Attributes: bp-based frame

sub_540EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 488h
mov	esp, ebp
pop	ebp
retn
sub_540EE0 endp



; Attributes: bp-based frame

sub_540EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76A00
mov	esp, ebp
pop	ebp
retn
sub_540EF0 endp



; Attributes: bp-based frame

sub_540F00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D8B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540F00 endp

align 10h


; Attributes: bp-based frame

sub_540F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 489h
mov	esp, ebp
pop	ebp
retn
sub_540F20 endp



; Attributes: bp-based frame

sub_540F30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7100h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_540F30 endp

align 10h


; Attributes: bp-based frame

sub_540F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D769E0
mov	esp, ebp
pop	ebp
retn
sub_540F50 endp



; Attributes: bp-based frame

sub_540F60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D910
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540F60 endp

align 10h


; Attributes: bp-based frame

sub_540F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 48Ah
mov	esp, ebp
pop	ebp
retn
sub_540F80 endp



; Attributes: bp-based frame

sub_540F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D769C0
mov	esp, ebp
pop	ebp
retn
sub_540F90 endp



; Attributes: bp-based frame

sub_540FA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D970
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540FA0 endp

align 10h


; Attributes: bp-based frame

sub_540FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 48Bh
mov	esp, ebp
pop	ebp
retn
sub_540FC0 endp



; Attributes: bp-based frame

sub_540FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76980
mov	esp, ebp
pop	ebp
retn
sub_540FD0 endp



; Attributes: bp-based frame

sub_540FE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56D9D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_540FE0 endp

align 10h


; Attributes: bp-based frame

sub_541000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 48Ch
mov	esp, ebp
pop	ebp
retn
sub_541000 endp



; Attributes: bp-based frame

sub_541010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76960
mov	esp, ebp
pop	ebp
retn
sub_541010 endp



; Attributes: bp-based frame

sub_541020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DA30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541020 endp

align 10h


; Attributes: bp-based frame

sub_541040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 48Dh
mov	esp, ebp
pop	ebp
retn
sub_541040 endp



; Attributes: bp-based frame

sub_541050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76940
mov	esp, ebp
pop	ebp
retn
sub_541050 endp



; Attributes: bp-based frame

sub_541060 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DA90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541060 endp

align 10h


; Attributes: bp-based frame

sub_541080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 48Eh
mov	esp, ebp
pop	ebp
retn
sub_541080 endp



; Attributes: bp-based frame

sub_541090 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DAF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541090 endp

align 10h


; Attributes: bp-based frame

sub_5410B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 490h
mov	esp, ebp
pop	ebp
retn
sub_5410B0 endp



; Attributes: bp-based frame

sub_5410C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76920
mov	esp, ebp
pop	ebp
retn
sub_5410C0 endp



; Attributes: bp-based frame

sub_5410D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DB50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5410D0 endp

align 10h


; Attributes: bp-based frame

sub_5410F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 491h
mov	esp, ebp
pop	ebp
retn
sub_5410F0 endp



; Attributes: bp-based frame

sub_541100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76900
mov	esp, ebp
pop	ebp
retn
sub_541100 endp



; Attributes: bp-based frame

sub_541110 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DBB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541110 endp

align 10h


; Attributes: bp-based frame

sub_541130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 492h
mov	esp, ebp
pop	ebp
retn
sub_541130 endp



; Attributes: bp-based frame

sub_541140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D768E0
mov	esp, ebp
pop	ebp
retn
sub_541140 endp



; Attributes: bp-based frame

sub_541150 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DC10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541150 endp

align 10h


; Attributes: bp-based frame

sub_541170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 493h
mov	esp, ebp
pop	ebp
retn
sub_541170 endp



; Attributes: bp-based frame

sub_541180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D768C0
mov	esp, ebp
pop	ebp
retn
sub_541180 endp



; Attributes: bp-based frame

sub_541190 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DC70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541190 endp

align 10h


; Attributes: bp-based frame

sub_5411B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 494h
mov	esp, ebp
pop	ebp
retn
sub_5411B0 endp



; Attributes: bp-based frame

sub_5411C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 601h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5411C0 endp

align 10h


; Attributes: bp-based frame

sub_5411E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DCE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5411E0 endp

align 10h


; Attributes: bp-based frame

sub_541200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 495h
mov	esp, ebp
pop	ebp
retn
sub_541200 endp



; Attributes: bp-based frame

sub_541210 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DD40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541210 endp

align 10h


; Attributes: bp-based frame

sub_541230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 496h
mov	esp, ebp
pop	ebp
retn
sub_541230 endp



; Attributes: bp-based frame

sub_541240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DDA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541240 endp

align 10h


; Attributes: bp-based frame

sub_541260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 497h
mov	esp, ebp
pop	ebp
retn
sub_541260 endp



; Attributes: bp-based frame

sub_541270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76880
mov	esp, ebp
pop	ebp
retn
sub_541270 endp



; Attributes: bp-based frame

sub_541280 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DE00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541280 endp

align 10h


; Attributes: bp-based frame

sub_5412A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 499h
mov	esp, ebp
pop	ebp
retn
sub_5412A0 endp



; Attributes: bp-based frame

sub_5412B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76860
mov	esp, ebp
pop	ebp
retn
sub_5412B0 endp



; Attributes: bp-based frame

sub_5412C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DE60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5412C0 endp

align 10h


; Attributes: bp-based frame

sub_5412E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 49Ah
mov	esp, ebp
pop	ebp
retn
sub_5412E0 endp



; Attributes: bp-based frame

sub_5412F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76840
mov	esp, ebp
pop	ebp
retn
sub_5412F0 endp



; Attributes: bp-based frame

sub_541300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DEC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541300 endp

align 10h


; Attributes: bp-based frame

sub_541320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 49Bh
mov	esp, ebp
pop	ebp
retn
sub_541320 endp



; Attributes: bp-based frame

sub_541330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76820
mov	esp, ebp
pop	ebp
retn
sub_541330 endp



; Attributes: bp-based frame

sub_541340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DF20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541340 endp

align 10h


; Attributes: bp-based frame

sub_541360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 49Ch
mov	esp, ebp
pop	ebp
retn
sub_541360 endp



; Attributes: bp-based frame

sub_541370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76800
mov	esp, ebp
pop	ebp
retn
sub_541370 endp



; Attributes: bp-based frame

sub_541380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DF80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541380 endp

align 10h


; Attributes: bp-based frame

sub_5413A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 49Dh
mov	esp, ebp
pop	ebp
retn
sub_5413A0 endp



; Attributes: bp-based frame

sub_5413B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D767E0
mov	esp, ebp
pop	ebp
retn
sub_5413B0 endp



; Attributes: bp-based frame

sub_5413C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56DFE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5413C0 endp

align 10h


; Attributes: bp-based frame

sub_5413E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 49Eh
mov	esp, ebp
pop	ebp
retn
sub_5413E0 endp



; Attributes: bp-based frame

sub_5413F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D767C0
mov	esp, ebp
pop	ebp
retn
sub_5413F0 endp



; Attributes: bp-based frame

sub_541400 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541400 endp

align 10h


; Attributes: bp-based frame

sub_541420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 49Fh
mov	esp, ebp
pop	ebp
retn
sub_541420 endp



; Attributes: bp-based frame

sub_541430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D767A0
mov	esp, ebp
pop	ebp
retn
sub_541430 endp



; Attributes: bp-based frame

sub_541440 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_408B00
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_541479
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_541479:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_541440 endp

align 10h


; Attributes: bp-based frame

sub_541490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E0A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541490 endp

align 10h


; Attributes: bp-based frame

sub_5414B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A0h
mov	esp, ebp
pop	ebp
retn
sub_5414B0 endp



; Attributes: bp-based frame

sub_5414C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76780
mov	esp, ebp
pop	ebp
retn
sub_5414C0 endp



; Attributes: bp-based frame

sub_5414D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5414D0 endp

align 10h


; Attributes: bp-based frame

sub_5414F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A1h
mov	esp, ebp
pop	ebp
retn
sub_5414F0 endp



; Attributes: bp-based frame

sub_541500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76760
mov	esp, ebp
pop	ebp
retn
sub_541500 endp



; Attributes: bp-based frame

sub_541510 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541510 endp

align 10h


; Attributes: bp-based frame

sub_541530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A2h
mov	esp, ebp
pop	ebp
retn
sub_541530 endp



; Attributes: bp-based frame

sub_541540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76740
mov	esp, ebp
pop	ebp
retn
sub_541540 endp



; Attributes: bp-based frame

sub_541550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E1C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541550 endp

align 10h


; Attributes: bp-based frame

sub_541570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A3h
mov	esp, ebp
pop	ebp
retn
sub_541570 endp



; Attributes: bp-based frame

sub_541580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541580 endp

align 10h


; Attributes: bp-based frame

sub_5415A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A4h
mov	esp, ebp
pop	ebp
retn
sub_5415A0 endp



; Attributes: bp-based frame

sub_5415B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D766F0
mov	esp, ebp
pop	ebp
retn
sub_5415B0 endp



; Attributes: bp-based frame

sub_5415C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5415C0 endp

align 10h


; Attributes: bp-based frame

sub_5415E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A5h
mov	esp, ebp
pop	ebp
retn
sub_5415E0 endp



; Attributes: bp-based frame

sub_5415F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D766D0
mov	esp, ebp
pop	ebp
retn
sub_5415F0 endp



; Attributes: bp-based frame

sub_541600 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E2E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541600 endp

align 10h


; Attributes: bp-based frame

sub_541620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A6h
mov	esp, ebp
pop	ebp
retn
sub_541620 endp



; Attributes: bp-based frame

sub_541630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76680
mov	esp, ebp
pop	ebp
retn
sub_541630 endp



; Attributes: bp-based frame

sub_541640 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541640 endp

align 10h


; Attributes: bp-based frame

sub_541660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A7h
mov	esp, ebp
pop	ebp
retn
sub_541660 endp



; Attributes: bp-based frame

sub_541670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76660
mov	esp, ebp
pop	ebp
retn
sub_541670 endp



; Attributes: bp-based frame

sub_541680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E3A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541680 endp

align 10h


; Attributes: bp-based frame

sub_5416A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4A8h
mov	esp, ebp
pop	ebp
retn
sub_5416A0 endp



; Attributes: bp-based frame

sub_5416B0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 20h
call	sub_555450
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5416E0
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5416E0:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_5416B0 endp

align 10h


; Attributes: bp-based frame

sub_5416F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5416F0 endp

align 10h


; Attributes: bp-based frame

sub_541710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4ADh
mov	esp, ebp
pop	ebp
retn
sub_541710 endp



; Attributes: bp-based frame

sub_541720 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_541750
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_541743
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_541743:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_541720 endp

align 10h


; Attributes: bp-based frame

sub_541750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_541750 endp

align 10h


; Attributes: bp-based frame

sub_541790 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541790 endp

align 10h


; Attributes: bp-based frame

sub_5417B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4AEh
mov	esp, ebp
pop	ebp
retn
sub_5417B0 endp



; Attributes: bp-based frame

sub_5417C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76640
mov	esp, ebp
pop	ebp
retn
sub_5417C0 endp



; Attributes: bp-based frame

sub_5417D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E4D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5417D0 endp

align 10h


; Attributes: bp-based frame

sub_5417F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4AFh
mov	esp, ebp
pop	ebp
retn
sub_5417F0 endp



; Attributes: bp-based frame

sub_541800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76620
mov	esp, ebp
pop	ebp
retn
sub_541800 endp



; Attributes: bp-based frame

sub_541810 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E530
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541810 endp

align 10h


; Attributes: bp-based frame

sub_541830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B0h
mov	esp, ebp
pop	ebp
retn
sub_541830 endp



; Attributes: bp-based frame

sub_541840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76600
mov	esp, ebp
pop	ebp
retn
sub_541840 endp



; Attributes: bp-based frame

sub_541850 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541850 endp

align 10h


; Attributes: bp-based frame

sub_541870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B1h
mov	esp, ebp
pop	ebp
retn
sub_541870 endp



; Attributes: bp-based frame

sub_541880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D765E0
mov	esp, ebp
pop	ebp
retn
sub_541880 endp



; Attributes: bp-based frame

sub_541890 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E5F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541890 endp

align 10h


; Attributes: bp-based frame

sub_5418B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B2h
mov	esp, ebp
pop	ebp
retn
sub_5418B0 endp



; Attributes: bp-based frame

sub_5418C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76570
mov	esp, ebp
pop	ebp
retn
sub_5418C0 endp



; Attributes: bp-based frame

sub_5418D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5418D0 endp

align 10h


; Attributes: bp-based frame

sub_5418F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B3h
mov	esp, ebp
pop	ebp
retn
sub_5418F0 endp



; Attributes: bp-based frame

sub_541900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7900h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_541900 endp

align 10h


; Attributes: bp-based frame

sub_541920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76550
mov	esp, ebp
pop	ebp
retn
sub_541920 endp



; Attributes: bp-based frame

sub_541930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E6B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541930 endp

align 10h


; Attributes: bp-based frame

sub_541950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B4h
mov	esp, ebp
pop	ebp
retn
sub_541950 endp



; Attributes: bp-based frame

sub_541960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76450
mov	esp, ebp
pop	ebp
retn
sub_541960 endp



; Attributes: bp-based frame

sub_541970 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541970 endp

align 10h


; Attributes: bp-based frame

sub_541990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B5h
mov	esp, ebp
pop	ebp
retn
sub_541990 endp



; Attributes: bp-based frame

sub_5419A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76430
mov	esp, ebp
pop	ebp
retn
sub_5419A0 endp



; Attributes: bp-based frame

sub_5419B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5419B0 endp

align 10h


; Attributes: bp-based frame

sub_5419D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B6h
mov	esp, ebp
pop	ebp
retn
sub_5419D0 endp



; Attributes: bp-based frame

sub_5419E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E7D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5419E0 endp

align 10h


; Attributes: bp-based frame

sub_541A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B7h
mov	esp, ebp
pop	ebp
retn
sub_541A00 endp



; Attributes: bp-based frame

sub_541A10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541A10 endp

align 10h


; Attributes: bp-based frame

sub_541A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B8h
mov	esp, ebp
pop	ebp
retn
sub_541A30 endp



; Attributes: bp-based frame

sub_541A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76410
mov	esp, ebp
pop	ebp
retn
sub_541A40 endp



; Attributes: bp-based frame

sub_541A50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541A50 endp

align 10h


; Attributes: bp-based frame

sub_541A70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4B9h
mov	esp, ebp
pop	ebp
retn
sub_541A70 endp



; Attributes: bp-based frame

sub_541A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D763F0
mov	esp, ebp
pop	ebp
retn
sub_541A80 endp



; Attributes: bp-based frame

sub_541A90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E8F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541A90 endp

align 10h


; Attributes: bp-based frame

sub_541AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4BBh
mov	esp, ebp
pop	ebp
retn
sub_541AB0 endp



; Attributes: bp-based frame

sub_541AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D763D0
mov	esp, ebp
pop	ebp
retn
sub_541AC0 endp



; Attributes: bp-based frame

sub_541AD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541AD0 endp

align 10h


; Attributes: bp-based frame

sub_541AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4BDh
mov	esp, ebp
pop	ebp
retn
sub_541AF0 endp



; Attributes: bp-based frame

sub_541B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D763B0
mov	esp, ebp
pop	ebp
retn
sub_541B00 endp



; Attributes: bp-based frame

sub_541B10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56E9B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541B10 endp

align 10h


; Attributes: bp-based frame

sub_541B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C0h
mov	esp, ebp
pop	ebp
retn
sub_541B30 endp



; Attributes: bp-based frame

sub_541B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76390
mov	esp, ebp
pop	ebp
retn
sub_541B40 endp



; Attributes: bp-based frame

sub_541B50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EA10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541B50 endp

align 10h


; Attributes: bp-based frame

sub_541B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C1h
mov	esp, ebp
pop	ebp
retn
sub_541B70 endp



; Attributes: bp-based frame

sub_541B80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E44h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_541B80 endp

align 10h


; Attributes: bp-based frame

sub_541BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76370
mov	esp, ebp
pop	ebp
retn
sub_541BA0 endp



; Attributes: bp-based frame

sub_541BB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EA70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541BB0 endp

align 10h


; Attributes: bp-based frame

sub_541BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C2h
mov	esp, ebp
pop	ebp
retn
sub_541BD0 endp



; Attributes: bp-based frame

sub_541BE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EAD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541BE0 endp

align 10h


; Attributes: bp-based frame

sub_541C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C3h
mov	esp, ebp
pop	ebp
retn
sub_541C00 endp



; Attributes: bp-based frame

sub_541C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76350
mov	esp, ebp
pop	ebp
retn
sub_541C10 endp



; Attributes: bp-based frame

sub_541C20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EB30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541C20 endp

align 10h


; Attributes: bp-based frame

sub_541C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76330
mov	esp, ebp
pop	ebp
retn
sub_541C40 endp



; Attributes: bp-based frame

sub_541C50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EB90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541C50 endp

align 10h


; Attributes: bp-based frame

sub_541C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C5h
mov	esp, ebp
pop	ebp
retn
sub_541C70 endp



; Attributes: bp-based frame

sub_541C80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EBF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541C80 endp

align 10h


; Attributes: bp-based frame

sub_541CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C6h
mov	esp, ebp
pop	ebp
retn
sub_541CA0 endp



; Attributes: bp-based frame

sub_541CB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EC50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541CB0 endp

align 10h


; Attributes: bp-based frame

sub_541CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C7h
mov	esp, ebp
pop	ebp
retn
sub_541CD0 endp



; Attributes: bp-based frame

sub_541CE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2F44h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_541CE0 endp

align 10h


; Attributes: bp-based frame

sub_541D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76230
mov	esp, ebp
pop	ebp
retn
sub_541D00 endp



; Attributes: bp-based frame

sub_541D10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56ECB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541D10 endp

align 10h


; Attributes: bp-based frame

sub_541D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C8h
mov	esp, ebp
pop	ebp
retn
sub_541D30 endp



; Attributes: bp-based frame

sub_541D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76210
mov	esp, ebp
pop	ebp
retn
sub_541D40 endp



; Attributes: bp-based frame

sub_541D50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56ED10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541D50 endp

align 10h


; Attributes: bp-based frame

sub_541D70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C9h
mov	esp, ebp
pop	ebp
retn
sub_541D70 endp



; Attributes: bp-based frame

sub_541D80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 4940h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_541D80 endp

align 10h


; Attributes: bp-based frame

sub_541DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D761F0
mov	esp, ebp
pop	ebp
retn
sub_541DA0 endp



; Attributes: bp-based frame

sub_541DB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56ED70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541DB0 endp

align 10h


; Attributes: bp-based frame

sub_541DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4CAh
mov	esp, ebp
pop	ebp
retn
sub_541DD0 endp



; Attributes: bp-based frame

sub_541DE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EDD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541DE0 endp

align 10h


; Attributes: bp-based frame

sub_541E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4CBh
mov	esp, ebp
pop	ebp
retn
sub_541E00 endp



; Attributes: bp-based frame

sub_541E10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_541E3E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_541E3E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_541E10 endp

align 10h


; Attributes: bp-based frame

sub_541E50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EE30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541E50 endp

align 10h


; Attributes: bp-based frame

sub_541E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4CCh
mov	esp, ebp
pop	ebp
retn
sub_541E70 endp



; Attributes: bp-based frame

sub_541E80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EE90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541E80 endp

align 10h


; Attributes: bp-based frame

sub_541EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4CDh
mov	esp, ebp
pop	ebp
retn
sub_541EA0 endp



; Attributes: bp-based frame

sub_541EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D761D0
mov	esp, ebp
pop	ebp
retn
sub_541EB0 endp



; Attributes: bp-based frame

sub_541EC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EEF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541EC0 endp

align 10h


; Attributes: bp-based frame

sub_541EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4CEh
mov	esp, ebp
pop	ebp
retn
sub_541EE0 endp



; Attributes: bp-based frame

sub_541EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D761B0
mov	esp, ebp
pop	ebp
retn
sub_541EF0 endp



; Attributes: bp-based frame

sub_541F00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EF50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541F00 endp

align 10h


; Attributes: bp-based frame

sub_541F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4CFh
mov	esp, ebp
pop	ebp
retn
sub_541F20 endp



; Attributes: bp-based frame

sub_541F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76190
mov	esp, ebp
pop	ebp
retn
sub_541F30 endp



; Attributes: bp-based frame

sub_541F40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56EFB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541F40 endp

align 10h


; Attributes: bp-based frame

sub_541F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D0h
mov	esp, ebp
pop	ebp
retn
sub_541F60 endp



; Attributes: bp-based frame

sub_541F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76170
mov	esp, ebp
pop	ebp
retn
sub_541F70 endp



; Attributes: bp-based frame

sub_541F80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4DCDF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541F80 endp

align 10h


; Attributes: bp-based frame

sub_541FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D1h
mov	esp, ebp
pop	ebp
retn
sub_541FA0 endp



; Attributes: bp-based frame

sub_541FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76150
mov	esp, ebp
pop	ebp
retn
sub_541FB0 endp



; Attributes: bp-based frame

sub_541FC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F010
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_541FC0 endp

align 10h


; Attributes: bp-based frame

sub_541FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D2h
mov	esp, ebp
pop	ebp
retn
sub_541FE0 endp



; Attributes: bp-based frame

sub_541FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76100
mov	esp, ebp
pop	ebp
retn
sub_541FF0 endp



; Attributes: bp-based frame

sub_542000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F070
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542000 endp

align 10h


; Attributes: bp-based frame

sub_542020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D3h
mov	esp, ebp
pop	ebp
retn
sub_542020 endp



; Attributes: bp-based frame

sub_542030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D760E0
mov	esp, ebp
pop	ebp
retn
sub_542030 endp



; Attributes: bp-based frame

sub_542040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F0D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542040 endp

align 10h


; Attributes: bp-based frame

sub_542060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D4h
mov	esp, ebp
pop	ebp
retn
sub_542060 endp



; Attributes: bp-based frame

sub_542070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76090
mov	esp, ebp
pop	ebp
retn
sub_542070 endp



; Attributes: bp-based frame

sub_542080 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F130
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542080 endp

align 10h


; Attributes: bp-based frame

sub_5420A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D5h
mov	esp, ebp
pop	ebp
retn
sub_5420A0 endp



; Attributes: bp-based frame

sub_5420B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F190
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5420B0 endp

align 10h


; Attributes: bp-based frame

sub_5420D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D6h
mov	esp, ebp
pop	ebp
retn
sub_5420D0 endp



; Attributes: bp-based frame

sub_5420E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F1F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5420E0 endp

align 10h


; Attributes: bp-based frame

sub_542100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D7h
mov	esp, ebp
pop	ebp
retn
sub_542100 endp



; Attributes: bp-based frame

sub_542110 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F250
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542110 endp

align 10h


; Attributes: bp-based frame

sub_542130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D8h
mov	esp, ebp
pop	ebp
retn
sub_542130 endp



; Attributes: bp-based frame

sub_542140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76050
mov	esp, ebp
pop	ebp
retn
sub_542140 endp



; Attributes: bp-based frame

sub_542150 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F2B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542150 endp

align 10h


; Attributes: bp-based frame

sub_542170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4D9h
mov	esp, ebp
pop	ebp
retn
sub_542170 endp



; Attributes: bp-based frame

sub_542180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76030
mov	esp, ebp
pop	ebp
retn
sub_542180 endp



; Attributes: bp-based frame

sub_542190 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F310
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542190 endp

align 10h


; Attributes: bp-based frame

sub_5421B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4DAh
mov	esp, ebp
pop	ebp
retn
sub_5421B0 endp



; Attributes: bp-based frame

sub_5421C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F370
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5421C0 endp

align 10h


; Attributes: bp-based frame

sub_5421E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4DBh
mov	esp, ebp
pop	ebp
retn
sub_5421E0 endp



; Attributes: bp-based frame

sub_5421F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D76010
mov	esp, ebp
pop	ebp
retn
sub_5421F0 endp



; Attributes: bp-based frame

sub_542200 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F3D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542200 endp

align 10h


; Attributes: bp-based frame

sub_542220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4DCh
mov	esp, ebp
pop	ebp
retn
sub_542220 endp



; Attributes: bp-based frame

sub_542230 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1000h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_542230 endp

align 10h


; Attributes: bp-based frame

sub_542250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75FF0
mov	esp, ebp
pop	ebp
retn
sub_542250 endp



; Attributes: bp-based frame

sub_542260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F430
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542260 endp

align 10h


; Attributes: bp-based frame

sub_542280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4DDh
mov	esp, ebp
pop	ebp
retn
sub_542280 endp



; Attributes: bp-based frame

sub_542290 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F490
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542290 endp

align 10h


; Attributes: bp-based frame

sub_5422B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4DEh
mov	esp, ebp
pop	ebp
retn
sub_5422B0 endp



; Attributes: bp-based frame

sub_5422C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F4F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5422C0 endp

align 10h


; Attributes: bp-based frame

sub_5422E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4DFh
mov	esp, ebp
pop	ebp
retn
sub_5422E0 endp



; Attributes: bp-based frame

sub_5422F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1800h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5422F0 endp

align 10h


; Attributes: bp-based frame

sub_542310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75FD0
mov	esp, ebp
pop	ebp
retn
sub_542310 endp



; Attributes: bp-based frame

sub_542320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F550
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542320 endp

align 10h


; Attributes: bp-based frame

sub_542340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E0h
mov	esp, ebp
pop	ebp
retn
sub_542340 endp



; Attributes: bp-based frame

sub_542350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75FB0
mov	esp, ebp
pop	ebp
retn
sub_542350 endp



; Attributes: bp-based frame

sub_542360 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F5B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542360 endp

align 10h


; Attributes: bp-based frame

sub_542380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E1h
mov	esp, ebp
pop	ebp
retn
sub_542380 endp



; Attributes: bp-based frame

sub_542390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75F90
mov	esp, ebp
pop	ebp
retn
sub_542390 endp



; Attributes: bp-based frame

sub_5423A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F610
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5423A0 endp

align 10h


; Attributes: bp-based frame

sub_5423C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E2h
mov	esp, ebp
pop	ebp
retn
sub_5423C0 endp



; Attributes: bp-based frame

sub_5423D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75F70
mov	esp, ebp
pop	ebp
retn
sub_5423D0 endp



; Attributes: bp-based frame

sub_5423E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F670
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5423E0 endp

align 10h


; Attributes: bp-based frame

sub_542400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E3h
mov	esp, ebp
pop	ebp
retn
sub_542400 endp



; Attributes: bp-based frame

sub_542410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75F50
mov	esp, ebp
pop	ebp
retn
sub_542410 endp



; Attributes: bp-based frame

sub_542420 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F6D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542420 endp

align 10h


; Attributes: bp-based frame

sub_542440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E4h
mov	esp, ebp
pop	ebp
retn
sub_542440 endp



; Attributes: bp-based frame

sub_542450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75F30
mov	esp, ebp
pop	ebp
retn
sub_542450 endp



; Attributes: bp-based frame

sub_542460 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F730
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542460 endp

align 10h


; Attributes: bp-based frame

sub_542480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E6h
mov	esp, ebp
pop	ebp
retn
sub_542480 endp



; Attributes: bp-based frame

sub_542490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75F10
mov	esp, ebp
pop	ebp
retn
sub_542490 endp



; Attributes: bp-based frame

sub_5424A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F790
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5424A0 endp

align 10h


; Attributes: bp-based frame

sub_5424C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E7h
mov	esp, ebp
pop	ebp
retn
sub_5424C0 endp



; Attributes: bp-based frame

sub_5424D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75EF0
mov	esp, ebp
pop	ebp
retn
sub_5424D0 endp



; Attributes: bp-based frame

sub_5424E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F7F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5424E0 endp

align 10h


; Attributes: bp-based frame

sub_542500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E8h
mov	esp, ebp
pop	ebp
retn
sub_542500 endp



; Attributes: bp-based frame

sub_542510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75ED0
mov	esp, ebp
pop	ebp
retn
sub_542510 endp



; Attributes: bp-based frame

sub_542520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F850
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542520 endp

align 10h


; Attributes: bp-based frame

sub_542540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4E9h
mov	esp, ebp
pop	ebp
retn
sub_542540 endp



; Attributes: bp-based frame

sub_542550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F8B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542550 endp

align 10h


; Attributes: bp-based frame

sub_542570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4EAh
mov	esp, ebp
pop	ebp
retn
sub_542570 endp



; Attributes: bp-based frame

sub_542580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F910
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542580 endp

align 10h


; Attributes: bp-based frame

sub_5425A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4EBh
mov	esp, ebp
pop	ebp
retn
sub_5425A0 endp



; Attributes: bp-based frame

sub_5425B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F970
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5425B0 endp

align 10h


; Attributes: bp-based frame

sub_5425D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4ECh
mov	esp, ebp
pop	ebp
retn
sub_5425D0 endp



; Attributes: bp-based frame

sub_5425E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75E90
mov	esp, ebp
pop	ebp
retn
sub_5425E0 endp



; Attributes: bp-based frame

sub_5425F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56F9D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5425F0 endp

align 10h


; Attributes: bp-based frame

sub_542610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4F4h
mov	esp, ebp
pop	ebp
retn
sub_542610 endp



; Attributes: bp-based frame

sub_542620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75E70
mov	esp, ebp
pop	ebp
retn
sub_542620 endp



; Attributes: bp-based frame

sub_542630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FA30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542630 endp

align 10h


; Attributes: bp-based frame

sub_542650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4F5h
mov	esp, ebp
pop	ebp
retn
sub_542650 endp



; Attributes: bp-based frame

sub_542660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75E50
mov	esp, ebp
pop	ebp
retn
sub_542660 endp



; Attributes: bp-based frame

sub_542670 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FA90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542670 endp

align 10h


; Attributes: bp-based frame

sub_542690 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4F6h
mov	esp, ebp
pop	ebp
retn
sub_542690 endp



; Attributes: bp-based frame

sub_5426A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 940h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5426A0 endp

align 10h


; Attributes: bp-based frame

sub_5426C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75E30
mov	esp, ebp
pop	ebp
retn
sub_5426C0 endp



; Attributes: bp-based frame

sub_5426D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FAF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5426D0 endp

align 10h


; Attributes: bp-based frame

sub_5426F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4F7h
mov	esp, ebp
pop	ebp
retn
sub_5426F0 endp



; Attributes: bp-based frame

sub_542700 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FB50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542700 endp

align 10h


; Attributes: bp-based frame

sub_542720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4F9h
mov	esp, ebp
pop	ebp
retn
sub_542720 endp



; Attributes: bp-based frame

sub_542730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FBB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542730 endp

align 10h


; Attributes: bp-based frame

sub_542750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4FAh
mov	esp, ebp
pop	ebp
retn
sub_542750 endp



; Attributes: bp-based frame

sub_542760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75E10
mov	esp, ebp
pop	ebp
retn
sub_542760 endp



; Attributes: bp-based frame

sub_542770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FC10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542770 endp

align 10h


; Attributes: bp-based frame

sub_542790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4FBh
mov	esp, ebp
pop	ebp
retn
sub_542790 endp



; Attributes: bp-based frame

sub_5427A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75DF0
mov	esp, ebp
pop	ebp
retn
sub_5427A0 endp



; Attributes: bp-based frame

sub_5427B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FC70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5427B0 endp

align 10h


; Attributes: bp-based frame

sub_5427D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4FCh
mov	esp, ebp
pop	ebp
retn
sub_5427D0 endp



; Attributes: bp-based frame

sub_5427E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75DD0
mov	esp, ebp
pop	ebp
retn
sub_5427E0 endp



; Attributes: bp-based frame

sub_5427F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FCD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5427F0 endp

align 10h


; Attributes: bp-based frame

sub_542810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4FEh
mov	esp, ebp
pop	ebp
retn
sub_542810 endp



; Attributes: bp-based frame

sub_542820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75DB0
mov	esp, ebp
pop	ebp
retn
sub_542820 endp



; Attributes: bp-based frame

sub_542830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FD30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542830 endp

align 10h


; Attributes: bp-based frame

sub_542850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4FFh
mov	esp, ebp
pop	ebp
retn
sub_542850 endp



; Attributes: bp-based frame

sub_542860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75D90
mov	esp, ebp
pop	ebp
retn
sub_542860 endp



; Attributes: bp-based frame

sub_542870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FD90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542870 endp

align 10h


; Attributes: bp-based frame

sub_542890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 501h
mov	esp, ebp
pop	ebp
retn
sub_542890 endp



; Attributes: bp-based frame

sub_5428A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FDF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5428A0 endp

align 10h


; Attributes: bp-based frame

sub_5428C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 504h
mov	esp, ebp
pop	ebp
retn
sub_5428C0 endp



; Attributes: bp-based frame

sub_5428D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75D70
mov	esp, ebp
pop	ebp
retn
sub_5428D0 endp



; Attributes: bp-based frame

sub_5428E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FE50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5428E0 endp

align 10h


; Attributes: bp-based frame

sub_542900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 505h
mov	esp, ebp
pop	ebp
retn
sub_542900 endp



; Attributes: bp-based frame

sub_542910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75D50
mov	esp, ebp
pop	ebp
retn
sub_542910 endp



; Attributes: bp-based frame

sub_542920 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FEB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542920 endp

align 10h


; Attributes: bp-based frame

sub_542940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 506h
mov	esp, ebp
pop	ebp
retn
sub_542940 endp



; Attributes: bp-based frame

sub_542950 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75D30
mov	esp, ebp
pop	ebp
retn
sub_542950 endp



; Attributes: bp-based frame

sub_542960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_542990
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_542983
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_542983:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_542960 endp

align 10h


; Attributes: bp-based frame

sub_542990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0D4h
call	sub_10FB7C0
mov	eax, [ebp+var_4]
add	eax, 0CCh
call	sub_40ABB0
mov	ecx, [ebp+var_4]
add	ecx, 0A4h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_542990 endp

align 10h


; Attributes: bp-based frame

sub_5429D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FF10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5429D0 endp

align 10h


; Attributes: bp-based frame

sub_5429F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 507h
mov	esp, ebp
pop	ebp
retn
sub_5429F0 endp



; Attributes: bp-based frame

sub_542A00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FF80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542A00 endp

align 10h


; Attributes: bp-based frame

sub_542A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 508h
mov	esp, ebp
pop	ebp
retn
sub_542A20 endp



; Attributes: bp-based frame

sub_542A30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_542A61
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42D810
mov	[ebp+var_C], eax
jmp	short loc_542A68

loc_542A61:
mov	[ebp+var_C], 0

loc_542A68:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_542A30 endp

align 10h


; Attributes: bp-based frame

sub_542A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 509h
mov	esp, ebp
pop	ebp
retn
sub_542A80 endp



; Attributes: bp-based frame

sub_542A90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75D10
mov	esp, ebp
pop	ebp
retn
sub_542A90 endp



; Attributes: bp-based frame

sub_542AA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_56FFE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542AA0 endp

align 10h


; Attributes: bp-based frame

sub_542AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 50Ah
mov	esp, ebp
pop	ebp
retn
sub_542AC0 endp



; Attributes: bp-based frame

sub_542AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75CF0
mov	esp, ebp
pop	ebp
retn
sub_542AD0 endp



; Attributes: bp-based frame

sub_542AE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542AE0 endp

align 10h


; Attributes: bp-based frame

sub_542B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 50Bh
mov	esp, ebp
pop	ebp
retn
sub_542B00 endp



; Attributes: bp-based frame

sub_542B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75CD0
mov	esp, ebp
pop	ebp
retn
sub_542B10 endp



; Attributes: bp-based frame

sub_542B20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5700A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542B20 endp

align 10h


; Attributes: bp-based frame

sub_542B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 50Ch
mov	esp, ebp
pop	ebp
retn
sub_542B40 endp



; Attributes: bp-based frame

sub_542B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75CB0
mov	esp, ebp
pop	ebp
retn
sub_542B50 endp



; Attributes: bp-based frame

sub_542B60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542B60 endp

align 10h


; Attributes: bp-based frame

sub_542B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 50Dh
mov	esp, ebp
pop	ebp
retn
sub_542B80 endp



; Attributes: bp-based frame

sub_542B90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542B90 endp

align 10h


; Attributes: bp-based frame

sub_542BB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 50Eh
mov	esp, ebp
pop	ebp
retn
sub_542BB0 endp



; Attributes: bp-based frame

sub_542BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75C90
mov	esp, ebp
pop	ebp
retn
sub_542BC0 endp



; Attributes: bp-based frame

sub_542BD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5701C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542BD0 endp

align 10h


; Attributes: bp-based frame

sub_542BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 50Fh
mov	esp, ebp
pop	ebp
retn
sub_542BF0 endp



; Attributes: bp-based frame

sub_542C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75C70
mov	esp, ebp
pop	ebp
retn
sub_542C00 endp



; Attributes: bp-based frame

sub_542C10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542C10 endp

align 10h


; Attributes: bp-based frame

sub_542C30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 510h
mov	esp, ebp
pop	ebp
retn
sub_542C30 endp



; Attributes: bp-based frame

sub_542C40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6F44h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_542C40 endp

align 10h


; Attributes: bp-based frame

sub_542C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75C50
mov	esp, ebp
pop	ebp
retn
sub_542C60 endp



; Attributes: bp-based frame

sub_542C70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542C70 endp

align 10h


; Attributes: bp-based frame

sub_542C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 511h
mov	esp, ebp
pop	ebp
retn
sub_542C90 endp



; Attributes: bp-based frame

sub_542CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75C30
mov	esp, ebp
pop	ebp
retn
sub_542CA0 endp



; Attributes: bp-based frame

sub_542CB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5702E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542CB0 endp

align 10h


; Attributes: bp-based frame

sub_542CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 514h
mov	esp, ebp
pop	ebp
retn
sub_542CD0 endp



; Attributes: bp-based frame

sub_542CE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542CE0 endp

align 10h


; Attributes: bp-based frame

sub_542D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 515h
mov	esp, ebp
pop	ebp
retn
sub_542D00 endp



; Attributes: bp-based frame

sub_542D10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5703A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542D10 endp

align 10h


; Attributes: bp-based frame

sub_542D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 516h
mov	esp, ebp
pop	ebp
retn
sub_542D30 endp



; Attributes: bp-based frame

sub_542D40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542D40 endp

align 10h


; Attributes: bp-based frame

sub_542D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 517h
mov	esp, ebp
pop	ebp
retn
sub_542D60 endp



; Attributes: bp-based frame

sub_542D70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75C10
mov	esp, ebp
pop	ebp
retn
sub_542D70 endp



; Attributes: bp-based frame

sub_542D80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542D80 endp

align 10h


; Attributes: bp-based frame

sub_542DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 518h
mov	esp, ebp
pop	ebp
retn
sub_542DA0 endp



; Attributes: bp-based frame

sub_542DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75BF0
mov	esp, ebp
pop	ebp
retn
sub_542DB0 endp



; Attributes: bp-based frame

sub_542DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5704C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542DC0 endp

align 10h


; Attributes: bp-based frame

sub_542DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 519h
mov	esp, ebp
pop	ebp
retn
sub_542DE0 endp



; Attributes: bp-based frame

sub_542DF0 proc	near

var_AC=	dword ptr -0ACh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
add	ecx, 2Ch
call	sub_4A9770
mov	ecx, [ebp+var_AC]
add	ecx, 20h
call	sub_4A9770
mov	ecx, [ebp+var_AC]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_542E3D
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_542E3D:
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn	4
sub_542DF0 endp

align 10h


; Attributes: bp-based frame

sub_542E50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542E50 endp

align 10h


; Attributes: bp-based frame

sub_542E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 51Ah
mov	esp, ebp
pop	ebp
retn
sub_542E70 endp



; Attributes: bp-based frame

sub_542E80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570580
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542E80 endp

align 10h


; Attributes: bp-based frame

sub_542EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 51Bh
mov	esp, ebp
pop	ebp
retn
sub_542EA0 endp



; Attributes: bp-based frame

sub_542EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75BD0
mov	esp, ebp
pop	ebp
retn
sub_542EB0 endp



; Attributes: bp-based frame

sub_542EC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 4Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_579240
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_10FB7C0
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_542F24
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_542F24:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_542EC0 endp

align 10h


; Attributes: bp-based frame

sub_542F40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5705E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542F40 endp

align 10h


; Attributes: bp-based frame

sub_542F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 51Ch
mov	esp, ebp
pop	ebp
retn
sub_542F60 endp



; Attributes: bp-based frame

sub_542F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1642h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_542F70 endp

align 10h


; Attributes: bp-based frame

sub_542F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75BB0
mov	esp, ebp
pop	ebp
retn
sub_542F90 endp



; Attributes: bp-based frame

sub_542FA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570640
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542FA0 endp

align 10h


; Attributes: bp-based frame

sub_542FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 51Dh
mov	esp, ebp
pop	ebp
retn
sub_542FC0 endp



; Attributes: bp-based frame

sub_542FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75B90
mov	esp, ebp
pop	ebp
retn
sub_542FD0 endp



; Attributes: bp-based frame

sub_542FE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5706A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_542FE0 endp

align 10h


; Attributes: bp-based frame

sub_543000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 51Eh
mov	esp, ebp
pop	ebp
retn
sub_543000 endp



; Attributes: bp-based frame

sub_543010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75B70
mov	esp, ebp
pop	ebp
retn
sub_543010 endp



; Attributes: bp-based frame

sub_543020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570700
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543020 endp

align 10h


; Attributes: bp-based frame

sub_543040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 51Fh
mov	esp, ebp
pop	ebp
retn
sub_543040 endp



; Attributes: bp-based frame

sub_543050 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570760
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543050 endp

align 10h


; Attributes: bp-based frame

sub_543070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 520h
mov	esp, ebp
pop	ebp
retn
sub_543070 endp



; Attributes: bp-based frame

sub_543080 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5707C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543080 endp

align 10h


; Attributes: bp-based frame

sub_5430A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 521h
mov	esp, ebp
pop	ebp
retn
sub_5430A0 endp



; Attributes: bp-based frame

sub_5430B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75B50
mov	esp, ebp
pop	ebp
retn
sub_5430B0 endp



; Attributes: bp-based frame

sub_5430C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570820
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5430C0 endp

align 10h


; Attributes: bp-based frame

sub_5430E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 523h
mov	esp, ebp
pop	ebp
retn
sub_5430E0 endp



; Attributes: bp-based frame

sub_5430F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1980h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5430F0 endp

align 10h


; Attributes: bp-based frame

sub_543110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75B30
mov	esp, ebp
pop	ebp
retn
sub_543110 endp



; Attributes: bp-based frame

sub_543120 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570880
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543120 endp

align 10h


; Attributes: bp-based frame

sub_543140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 524h
mov	esp, ebp
pop	ebp
retn
sub_543140 endp



; Attributes: bp-based frame

sub_543150 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5708E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543150 endp

align 10h


; Attributes: bp-based frame

sub_543170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 525h
mov	esp, ebp
pop	ebp
retn
sub_543170 endp



; Attributes: bp-based frame

sub_543180 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570940
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543180 endp

align 10h


; Attributes: bp-based frame

sub_5431A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 526h
mov	esp, ebp
pop	ebp
retn
sub_5431A0 endp



; Attributes: bp-based frame

sub_5431B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5709A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5431B0 endp

align 10h


; Attributes: bp-based frame

sub_5431D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 527h
mov	esp, ebp
pop	ebp
retn
sub_5431D0 endp



; Attributes: bp-based frame

sub_5431E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75AE0
mov	esp, ebp
pop	ebp
retn
sub_5431E0 endp



; Attributes: bp-based frame

sub_5431F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570A00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5431F0 endp

align 10h


; Attributes: bp-based frame

sub_543210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 529h
mov	esp, ebp
pop	ebp
retn
sub_543210 endp



; Attributes: bp-based frame

sub_543220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75AC0
mov	esp, ebp
pop	ebp
retn
sub_543220 endp



; Attributes: bp-based frame

sub_543230 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570A60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543230 endp

align 10h


; Attributes: bp-based frame

sub_543250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 52Ah
mov	esp, ebp
pop	ebp
retn
sub_543250 endp



; Attributes: bp-based frame

sub_543260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75AA0
mov	esp, ebp
pop	ebp
retn
sub_543260 endp



; Attributes: bp-based frame

sub_543270 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570AC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543270 endp

align 10h


; Attributes: bp-based frame

sub_543290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 52Ch
mov	esp, ebp
pop	ebp
retn
sub_543290 endp



; Attributes: bp-based frame

sub_5432A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75A80
mov	esp, ebp
pop	ebp
retn
sub_5432A0 endp



; Attributes: bp-based frame

sub_5432B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570B20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5432B0 endp

align 10h


; Attributes: bp-based frame

sub_5432D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 52Eh
mov	esp, ebp
pop	ebp
retn
sub_5432D0 endp



; Attributes: bp-based frame

sub_5432E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75A60
mov	esp, ebp
pop	ebp
retn
sub_5432E0 endp



; Attributes: bp-based frame

sub_5432F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_1014910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_54331E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_54331E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5432F0 endp

align 10h


; Attributes: bp-based frame

sub_543330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570B80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543330 endp

align 10h


; Attributes: bp-based frame

sub_543350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 52Fh
mov	esp, ebp
pop	ebp
retn
sub_543350 endp



; Attributes: bp-based frame

sub_543360 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 100h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_543360 endp

align 10h


; Attributes: bp-based frame

sub_543380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570BE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543380 endp

align 10h


; Attributes: bp-based frame

sub_5433A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 531h
mov	esp, ebp
pop	ebp
retn
sub_5433A0 endp



; Attributes: bp-based frame

sub_5433B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75A40
mov	esp, ebp
pop	ebp
retn
sub_5433B0 endp



; Attributes: bp-based frame

sub_5433C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570C40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5433C0 endp

align 10h


; Attributes: bp-based frame

sub_5433E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 532h
mov	esp, ebp
pop	ebp
retn
sub_5433E0 endp



; Attributes: bp-based frame

sub_5433F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570CA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5433F0 endp

align 10h


; Attributes: bp-based frame

sub_543410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 534h
mov	esp, ebp
pop	ebp
retn
sub_543410 endp



; Attributes: bp-based frame

sub_543420 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570D00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543420 endp

align 10h


; Attributes: bp-based frame

sub_543440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 535h
mov	esp, ebp
pop	ebp
retn
sub_543440 endp



; Attributes: bp-based frame

sub_543450 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570D60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543450 endp

align 10h


; Attributes: bp-based frame

sub_543470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 536h
mov	esp, ebp
pop	ebp
retn
sub_543470 endp



; Attributes: bp-based frame

sub_543480 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570DC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543480 endp

align 10h


; Attributes: bp-based frame

sub_5434A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 537h
mov	esp, ebp
pop	ebp
retn
sub_5434A0 endp



; Attributes: bp-based frame

sub_5434B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75A00
mov	esp, ebp
pop	ebp
retn
sub_5434B0 endp



; Attributes: bp-based frame

sub_5434C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570E20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5434C0 endp

align 10h


; Attributes: bp-based frame

sub_5434E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 538h
mov	esp, ebp
pop	ebp
retn
sub_5434E0 endp



; Attributes: bp-based frame

sub_5434F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570E80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5434F0 endp

align 10h


; Attributes: bp-based frame

sub_543510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 539h
mov	esp, ebp
pop	ebp
retn
sub_543510 endp



; Attributes: bp-based frame

sub_543520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D759E0
mov	esp, ebp
pop	ebp
retn
sub_543520 endp



; Attributes: bp-based frame

sub_543530 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570EE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543530 endp

align 10h


; Attributes: bp-based frame

sub_543550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 53Ah
mov	esp, ebp
pop	ebp
retn
sub_543550 endp



; Attributes: bp-based frame

sub_543560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D759C0
mov	esp, ebp
pop	ebp
retn
sub_543560 endp



; Attributes: bp-based frame

sub_543570 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570F40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543570 endp

align 10h


; Attributes: bp-based frame

sub_543590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 53Bh
mov	esp, ebp
pop	ebp
retn
sub_543590 endp



; Attributes: bp-based frame

sub_5435A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D759A0
mov	esp, ebp
pop	ebp
retn
sub_5435A0 endp



; Attributes: bp-based frame

sub_5435B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_570FA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5435B0 endp

align 10h


; Attributes: bp-based frame

sub_5435D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 53Ch
mov	esp, ebp
pop	ebp
retn
sub_5435D0 endp



; Attributes: bp-based frame

sub_5435E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75940
mov	esp, ebp
pop	ebp
retn
sub_5435E0 endp



; Attributes: bp-based frame

sub_5435F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571000
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5435F0 endp

align 10h


; Attributes: bp-based frame

sub_543610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 53Dh
mov	esp, ebp
pop	ebp
retn
sub_543610 endp



; Attributes: bp-based frame

sub_543620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D758E0
mov	esp, ebp
pop	ebp
retn
sub_543620 endp



; Attributes: bp-based frame

sub_543630 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571060
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543630 endp

align 10h


; Attributes: bp-based frame

sub_543650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 53Eh
mov	esp, ebp
pop	ebp
retn
sub_543650 endp



; Attributes: bp-based frame

sub_543660 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5710C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543660 endp

align 10h


; Attributes: bp-based frame

sub_543680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 53Fh
mov	esp, ebp
pop	ebp
retn
sub_543680 endp



; Attributes: bp-based frame

sub_543690 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571120
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543690 endp

align 10h


; Attributes: bp-based frame

sub_5436B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 540h
mov	esp, ebp
pop	ebp
retn
sub_5436B0 endp



; Attributes: bp-based frame

sub_5436C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75880
mov	esp, ebp
pop	ebp
retn
sub_5436C0 endp



; Attributes: bp-based frame

sub_5436D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571180
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5436D0 endp

align 10h


; Attributes: bp-based frame

sub_5436F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 541h
mov	esp, ebp
pop	ebp
retn
sub_5436F0 endp



; Attributes: bp-based frame

sub_543700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75860
mov	esp, ebp
pop	ebp
retn
sub_543700 endp



; Attributes: bp-based frame

sub_543710 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5711E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543710 endp

align 10h


; Attributes: bp-based frame

sub_543730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 542h
mov	esp, ebp
pop	ebp
retn
sub_543730 endp



; Attributes: bp-based frame

sub_543740 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571240
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543740 endp

align 10h


; Attributes: bp-based frame

sub_543760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 543h
mov	esp, ebp
pop	ebp
retn
sub_543760 endp



; Attributes: bp-based frame

sub_543770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5712A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543770 endp

align 10h


; Attributes: bp-based frame

sub_543790 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 544h
mov	esp, ebp
pop	ebp
retn
sub_543790 endp



; Attributes: bp-based frame

sub_5437A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75810
mov	esp, ebp
pop	ebp
retn
sub_5437A0 endp



; Attributes: bp-based frame

sub_5437B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5437E9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5437E9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5437B0 endp

align 10h


; Attributes: bp-based frame

sub_543800 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571300
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543800 endp

align 10h


; Attributes: bp-based frame

sub_543820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 545h
mov	esp, ebp
pop	ebp
retn
sub_543820 endp



; Attributes: bp-based frame

sub_543830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D757F0
mov	esp, ebp
pop	ebp
retn
sub_543830 endp



; Attributes: bp-based frame

sub_543840 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571370
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543840 endp

align 10h


; Attributes: bp-based frame

sub_543860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 546h
mov	esp, ebp
pop	ebp
retn
sub_543860 endp



; Attributes: bp-based frame

sub_543870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D757D0
mov	esp, ebp
pop	ebp
retn
sub_543870 endp



; Attributes: bp-based frame

sub_543880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5438B9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5438B9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_543880 endp

align 10h


; Attributes: bp-based frame

sub_5438D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5713D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5438D0 endp

align 10h


; Attributes: bp-based frame

sub_5438F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 547h
mov	esp, ebp
pop	ebp
retn
sub_5438F0 endp



; Attributes: bp-based frame

sub_543900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D757B0
mov	esp, ebp
pop	ebp
retn
sub_543900 endp



; Attributes: bp-based frame

sub_543910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_543949
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_543949:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_543910 endp

align 10h


; Attributes: bp-based frame

sub_543960 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571430
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543960 endp

align 10h


; Attributes: bp-based frame

sub_543980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 548h
mov	esp, ebp
pop	ebp
retn
sub_543980 endp



; Attributes: bp-based frame

sub_543990 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E04h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_543990 endp

align 10h


; Attributes: bp-based frame

sub_5439B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75790
mov	esp, ebp
pop	ebp
retn
sub_5439B0 endp



; Attributes: bp-based frame

sub_5439C0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_3C]
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_3C]
add	ecx, 1Ch
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	eax, [ebp+var_3]
call	nullsub_1
mov	[ebp+var_38], eax
mov	eax, [ebp+var_3C]
add	eax, 44h
mov	[ebp+var_34], eax
xor	ecx, ecx
mov	[ebp+var_1C], ecx
mov	[ebp+var_18], ecx
mov	[ebp+var_14], ecx
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_30]
mov	[eax], ecx
mov	edx, [ebp+var_2C]
mov	[eax+4], edx
mov	ecx, [ebp+var_28]
mov	[eax+8], ecx
mov	edx, [ebp+var_24]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_34]
call	sub_5E11A0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+10h], 0
mov	cl, [ebp+var_4]
mov	edx, [ebp+var_34]
mov	[edx+14h], cl
lea	ecx, [ebp+var_4]
call	sub_42CA30
call	nullsub_1
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn
sub_5439C0 endp

align 10h


; Attributes: bp-based frame

sub_543A90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 44h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
call	sub_407E50
mov	ecx, [ebp+var_8]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_543A90 endp

align 10h


; Attributes: bp-based frame

sub_543AD0 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 24h
call	sub_5557D0
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_543B00
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_543B00:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_543AD0 endp

align 10h


; Attributes: bp-based frame

sub_543B10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571490
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543B10 endp

align 10h


; Attributes: bp-based frame

sub_543B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 549h
mov	esp, ebp
pop	ebp
retn
sub_543B30 endp



; Attributes: bp-based frame

sub_543B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75770
mov	esp, ebp
pop	ebp
retn
sub_543B40 endp



; Attributes: bp-based frame

sub_543B50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 3Ch
call	sub_543A90
mov	ecx, [ebp+var_8]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_543B8B
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_543B8B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_543B50 endp

align 10h


; Attributes: bp-based frame

sub_543BA0 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 3Ch
call	sub_543A90
mov	ecx, [ebp+var_8]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_543BA0 endp

align 10h


; Attributes: bp-based frame

sub_543BD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5714F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543BD0 endp

align 10h


; Attributes: bp-based frame

sub_543BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 54Ah
mov	esp, ebp
pop	ebp
retn
sub_543BF0 endp



; Attributes: bp-based frame

sub_543C00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 6000h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_543C00 endp

align 10h


; Attributes: bp-based frame

sub_543C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75750
mov	esp, ebp
pop	ebp
retn
sub_543C20 endp



; Attributes: bp-based frame

sub_543C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_543C60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_543C53
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_543C53:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_543C30 endp

align 10h


; Attributes: bp-based frame

sub_543C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_543C60 endp

align 10h


; Attributes: bp-based frame

sub_543CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571560
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543CA0 endp

align 10h


; Attributes: bp-based frame

sub_543CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 54Bh
mov	esp, ebp
pop	ebp
retn
sub_543CC0 endp



; Attributes: bp-based frame

sub_543CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E43h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_543CD0 endp

align 10h


; Attributes: bp-based frame

sub_543CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75730
mov	esp, ebp
pop	ebp
retn
sub_543CF0 endp



; Attributes: bp-based frame

sub_543D00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5715D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543D00 endp

align 10h


; Attributes: bp-based frame

sub_543D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 54Ch
mov	esp, ebp
pop	ebp
retn
sub_543D20 endp



; Attributes: bp-based frame

sub_543D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75710
mov	esp, ebp
pop	ebp
retn
sub_543D30 endp



; Attributes: bp-based frame

sub_543D40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_543D79
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_543D79:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_543D40 endp

align 10h


; Attributes: bp-based frame

sub_543D90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571630
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543D90 endp

align 10h


; Attributes: bp-based frame

sub_543DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 54Dh
mov	esp, ebp
pop	ebp
retn
sub_543DB0 endp



; Attributes: bp-based frame

sub_543DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D756F0
mov	esp, ebp
pop	ebp
retn
sub_543DC0 endp



; Attributes: bp-based frame

sub_543DD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571690
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543DD0 endp

align 10h


; Attributes: bp-based frame

sub_543DF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 552h
mov	esp, ebp
pop	ebp
retn
sub_543DF0 endp



; Attributes: bp-based frame

sub_543E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D756D0
mov	esp, ebp
pop	ebp
retn
sub_543E00 endp



; Attributes: bp-based frame

sub_543E10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5716F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543E10 endp

align 10h


; Attributes: bp-based frame

sub_543E30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 553h
mov	esp, ebp
pop	ebp
retn
sub_543E30 endp



; Attributes: bp-based frame

sub_543E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D756B0
mov	esp, ebp
pop	ebp
retn
sub_543E40 endp



; Attributes: bp-based frame

sub_543E50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571750
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543E50 endp

align 10h


; Attributes: bp-based frame

sub_543E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 554h
mov	esp, ebp
pop	ebp
retn
sub_543E70 endp



; Attributes: bp-based frame

sub_543E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75690
mov	esp, ebp
pop	ebp
retn
sub_543E80 endp



; Attributes: bp-based frame

sub_543E90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5717B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543E90 endp

align 10h


; Attributes: bp-based frame

sub_543EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 555h
mov	esp, ebp
pop	ebp
retn
sub_543EB0 endp



; Attributes: bp-based frame

sub_543EC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571810
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543EC0 endp

align 10h


; Attributes: bp-based frame

sub_543EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 556h
mov	esp, ebp
pop	ebp
retn
sub_543EE0 endp



; Attributes: bp-based frame

sub_543EF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571870
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543EF0 endp

align 10h


; Attributes: bp-based frame

sub_543F10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 55Ah
mov	esp, ebp
pop	ebp
retn
sub_543F10 endp



; Attributes: bp-based frame

sub_543F20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0F42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_543F20 endp

align 10h


; Attributes: bp-based frame

sub_543F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75670
mov	esp, ebp
pop	ebp
retn
sub_543F40 endp



; Attributes: bp-based frame

sub_543F50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5718D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543F50 endp

align 10h


; Attributes: bp-based frame

sub_543F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 55Bh
mov	esp, ebp
pop	ebp
retn
sub_543F70 endp



; Attributes: bp-based frame

sub_543F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75650
mov	esp, ebp
pop	ebp
retn
sub_543F80 endp



; Attributes: bp-based frame

sub_543F90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571930
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543F90 endp

align 10h


; Attributes: bp-based frame

sub_543FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 55Ch
mov	esp, ebp
pop	ebp
retn
sub_543FB0 endp



; Attributes: bp-based frame

sub_543FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75630
mov	esp, ebp
pop	ebp
retn
sub_543FC0 endp



; Attributes: bp-based frame

sub_543FD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571990
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_543FD0 endp

align 10h


; Attributes: bp-based frame

sub_543FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 565h
mov	esp, ebp
pop	ebp
retn
sub_543FF0 endp



; Attributes: bp-based frame

sub_544000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75610
mov	esp, ebp
pop	ebp
retn
sub_544000 endp



; Attributes: bp-based frame

sub_544010 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5719F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544010 endp

align 10h


; Attributes: bp-based frame

sub_544030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 566h
mov	esp, ebp
pop	ebp
retn
sub_544030 endp



; Attributes: bp-based frame

sub_544040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 4140h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_544040 endp

align 10h


; Attributes: bp-based frame

sub_544060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D755F0
mov	esp, ebp
pop	ebp
retn
sub_544060 endp



; Attributes: bp-based frame

sub_544070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571A50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544070 endp

align 10h


; Attributes: bp-based frame

sub_544090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 567h
mov	esp, ebp
pop	ebp
retn
sub_544090 endp



; Attributes: bp-based frame

sub_5440A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D755D0
mov	esp, ebp
pop	ebp
retn
sub_5440A0 endp



; Attributes: bp-based frame

sub_5440B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571AB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5440B0 endp

align 10h


; Attributes: bp-based frame

sub_5440D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 568h
mov	esp, ebp
pop	ebp
retn
sub_5440D0 endp



; Attributes: bp-based frame

sub_5440E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571B10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5440E0 endp

align 10h


; Attributes: bp-based frame

sub_544100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 569h
mov	esp, ebp
pop	ebp
retn
sub_544100 endp



; Attributes: bp-based frame

sub_544110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D755B0
mov	esp, ebp
pop	ebp
retn
sub_544110 endp



; Attributes: bp-based frame

sub_544120 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571B70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544120 endp

align 10h


; Attributes: bp-based frame

sub_544140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 56Ah
mov	esp, ebp
pop	ebp
retn
sub_544140 endp



; Attributes: bp-based frame

sub_544150 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571BD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544150 endp

align 10h


; Attributes: bp-based frame

sub_544170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 56Bh
mov	esp, ebp
pop	ebp
retn
sub_544170 endp



; Attributes: bp-based frame

sub_544180 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544180 endp

align 10h


; Attributes: bp-based frame

sub_5441A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 56Dh
mov	esp, ebp
pop	ebp
retn
sub_5441A0 endp



; Attributes: bp-based frame

sub_5441B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75590
mov	esp, ebp
pop	ebp
retn
sub_5441B0 endp



; Attributes: bp-based frame

sub_5441C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571C90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5441C0 endp

align 10h


; Attributes: bp-based frame

sub_5441E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 56Eh
mov	esp, ebp
pop	ebp
retn
sub_5441E0 endp



; Attributes: bp-based frame

sub_5441F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75570
mov	esp, ebp
pop	ebp
retn
sub_5441F0 endp



; Attributes: bp-based frame

sub_544200 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571CF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544200 endp

align 10h


; Attributes: bp-based frame

sub_544220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 570h
mov	esp, ebp
pop	ebp
retn
sub_544220 endp



; Attributes: bp-based frame

sub_544230 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571D50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544230 endp

align 10h


; Attributes: bp-based frame

sub_544250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 571h
mov	esp, ebp
pop	ebp
retn
sub_544250 endp



; Attributes: bp-based frame

sub_544260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571DB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544260 endp

align 10h


; Attributes: bp-based frame

sub_544280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 572h
mov	esp, ebp
pop	ebp
retn
sub_544280 endp



; Attributes: bp-based frame

sub_544290 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571E10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544290 endp

align 10h


; Attributes: bp-based frame

sub_5442B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 573h
mov	esp, ebp
pop	ebp
retn
sub_5442B0 endp



; Attributes: bp-based frame

sub_5442C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571E70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5442C0 endp

align 10h


; Attributes: bp-based frame

sub_5442E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 574h
mov	esp, ebp
pop	ebp
retn
sub_5442E0 endp



; Attributes: bp-based frame

sub_5442F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75550
mov	esp, ebp
pop	ebp
retn
sub_5442F0 endp



; Attributes: bp-based frame

sub_544300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571ED0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544300 endp

align 10h


; Attributes: bp-based frame

sub_544320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 575h
mov	esp, ebp
pop	ebp
retn
sub_544320 endp



; Attributes: bp-based frame

sub_544330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75530
mov	esp, ebp
pop	ebp
retn
sub_544330 endp



; Attributes: bp-based frame

sub_544340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571F30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544340 endp

align 10h


; Attributes: bp-based frame

sub_544360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 578h
mov	esp, ebp
pop	ebp
retn
sub_544360 endp



; Attributes: bp-based frame

sub_544370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75510
mov	esp, ebp
pop	ebp
retn
sub_544370 endp



; Attributes: bp-based frame

sub_544380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571F90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544380 endp

align 10h


; Attributes: bp-based frame

sub_5443A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 579h
mov	esp, ebp
pop	ebp
retn
sub_5443A0 endp



; Attributes: bp-based frame

sub_5443B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 840h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5443B0 endp

align 10h


; Attributes: bp-based frame

sub_5443D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D754F0
mov	esp, ebp
pop	ebp
retn
sub_5443D0 endp



; Attributes: bp-based frame

sub_5443E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_571FF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5443E0 endp

align 10h


; Attributes: bp-based frame

sub_544400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 57Ah
mov	esp, ebp
pop	ebp
retn
sub_544400 endp



; Attributes: bp-based frame

sub_544410 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F45h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_544410 endp

align 10h


; Attributes: bp-based frame

sub_544430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D754D0
mov	esp, ebp
pop	ebp
retn
sub_544430 endp



; Attributes: bp-based frame

sub_544440 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_42D2B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_544463
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_544463:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_544440 endp

align 10h


; Attributes: bp-based frame

sub_544470 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5444A4
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_42DA00
mov	[ebp+var_C], eax
jmp	short loc_5444AB

loc_5444A4:
mov	[ebp+var_C], 0

loc_5444AB:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_544470 endp

align 10h


; Attributes: bp-based frame

sub_5444C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 57Dh
mov	esp, ebp
pop	ebp
retn
sub_5444C0 endp



; Attributes: bp-based frame

sub_5444D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D754B0
mov	esp, ebp
pop	ebp
retn
sub_5444D0 endp



; Attributes: bp-based frame

sub_5444E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572050
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5444E0 endp

align 10h


; Attributes: bp-based frame

sub_544500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 57Eh
mov	esp, ebp
pop	ebp
retn
sub_544500 endp



; Attributes: bp-based frame

sub_544510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75490
mov	esp, ebp
pop	ebp
retn
sub_544510 endp



; Attributes: bp-based frame

sub_544520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5720B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544520 endp

align 10h


; Attributes: bp-based frame

sub_544540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 57Fh
mov	esp, ebp
pop	ebp
retn
sub_544540 endp



; Attributes: bp-based frame

sub_544550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75470
mov	esp, ebp
pop	ebp
retn
sub_544550 endp



; Attributes: bp-based frame

sub_544560 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572110
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544560 endp

align 10h


; Attributes: bp-based frame

sub_544580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 580h
mov	esp, ebp
pop	ebp
retn
sub_544580 endp



; Attributes: bp-based frame

sub_544590 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2702h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_544590 endp

align 10h


; Attributes: bp-based frame

sub_5445B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75450
mov	esp, ebp
pop	ebp
retn
sub_5445B0 endp



; Attributes: bp-based frame

sub_5445C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572180
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5445C0 endp

align 10h


; Attributes: bp-based frame

sub_5445E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 581h
mov	esp, ebp
pop	ebp
retn
sub_5445E0 endp



; Attributes: bp-based frame

sub_5445F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75430
mov	esp, ebp
pop	ebp
retn
sub_5445F0 endp



; Attributes: bp-based frame

sub_544600 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5721E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544600 endp

align 10h


; Attributes: bp-based frame

sub_544620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 582h
mov	esp, ebp
pop	ebp
retn
sub_544620 endp



; Attributes: bp-based frame

sub_544630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75410
mov	esp, ebp
pop	ebp
retn
sub_544630 endp



; Attributes: bp-based frame

sub_544640 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572240
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544640 endp

align 10h


; Attributes: bp-based frame

sub_544660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 583h
mov	esp, ebp
pop	ebp
retn
sub_544660 endp



; Attributes: bp-based frame

sub_544670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D753F0
mov	esp, ebp
pop	ebp
retn
sub_544670 endp



; Attributes: bp-based frame

sub_544680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5722A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544680 endp

align 10h


; Attributes: bp-based frame

sub_5446A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 584h
mov	esp, ebp
pop	ebp
retn
sub_5446A0 endp



; Attributes: bp-based frame

sub_5446B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2140h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5446B0 endp

align 10h


; Attributes: bp-based frame

sub_5446D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D753D0
mov	esp, ebp
pop	ebp
retn
sub_5446D0 endp



; Attributes: bp-based frame

sub_5446E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572300
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5446E0 endp

align 10h


; Attributes: bp-based frame

sub_544700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 585h
mov	esp, ebp
pop	ebp
retn
sub_544700 endp



; Attributes: bp-based frame

sub_544710 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572360
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544710 endp

align 10h


; Attributes: bp-based frame

sub_544730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 586h
mov	esp, ebp
pop	ebp
retn
sub_544730 endp



; Attributes: bp-based frame

sub_544740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D753B0
mov	esp, ebp
pop	ebp
retn
sub_544740 endp



; Attributes: bp-based frame

sub_544750 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5723C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544750 endp

align 10h


; Attributes: bp-based frame

sub_544770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 587h
mov	esp, ebp
pop	ebp
retn
sub_544770 endp



; Attributes: bp-based frame

sub_544780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75390
mov	esp, ebp
pop	ebp
retn
sub_544780 endp



; Attributes: bp-based frame

sub_544790 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572420
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544790 endp

align 10h


; Attributes: bp-based frame

sub_5447B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 588h
mov	esp, ebp
pop	ebp
retn
sub_5447B0 endp



; Attributes: bp-based frame

sub_5447C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75370
mov	esp, ebp
pop	ebp
retn
sub_5447C0 endp



; Attributes: bp-based frame

sub_5447D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572480
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5447D0 endp

align 10h


; Attributes: bp-based frame

sub_5447F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 58Ah
mov	esp, ebp
pop	ebp
retn
sub_5447F0 endp



; Attributes: bp-based frame

sub_544800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7840h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_544800 endp

align 10h


; Attributes: bp-based frame

sub_544820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75350
mov	esp, ebp
pop	ebp
retn
sub_544820 endp



; Attributes: bp-based frame

sub_544830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5724E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544830 endp

align 10h


; Attributes: bp-based frame

sub_544850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 58Bh
mov	esp, ebp
pop	ebp
retn
sub_544850 endp



; Attributes: bp-based frame

sub_544860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75330
mov	esp, ebp
pop	ebp
retn
sub_544860 endp



; Attributes: bp-based frame

sub_544870 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572540
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544870 endp

align 10h


; Attributes: bp-based frame

sub_544890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 58Dh
mov	esp, ebp
pop	ebp
retn
sub_544890 endp



; Attributes: bp-based frame

sub_5448A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5725A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5448A0 endp

align 10h


; Attributes: bp-based frame

sub_5448C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 58Eh
mov	esp, ebp
pop	ebp
retn
sub_5448C0 endp



; Attributes: bp-based frame

sub_5448D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572600
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5448D0 endp

align 10h


; Attributes: bp-based frame

sub_5448F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 58Fh
mov	esp, ebp
pop	ebp
retn
sub_5448F0 endp



; Attributes: bp-based frame

sub_544900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75310
mov	esp, ebp
pop	ebp
retn
sub_544900 endp



; Attributes: bp-based frame

sub_544910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_544949
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_544949:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_544910 endp

align 10h


; Attributes: bp-based frame

sub_544960 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572670
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544960 endp

align 10h


; Attributes: bp-based frame

sub_544980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 590h
mov	esp, ebp
pop	ebp
retn
sub_544980 endp



; Attributes: bp-based frame

sub_544990 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1100h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_544990 endp

align 10h


; Attributes: bp-based frame

sub_5449B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D752F0
mov	esp, ebp
pop	ebp
retn
sub_5449B0 endp



; Attributes: bp-based frame

sub_5449C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5726E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5449C0 endp

align 10h


; Attributes: bp-based frame

sub_5449E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 591h
mov	esp, ebp
pop	ebp
retn
sub_5449E0 endp



; Attributes: bp-based frame

sub_5449F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D752D0
mov	esp, ebp
pop	ebp
retn
sub_5449F0 endp



; Attributes: bp-based frame

sub_544A00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572740
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544A00 endp

align 10h


; Attributes: bp-based frame

sub_544A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 592h
mov	esp, ebp
pop	ebp
retn
sub_544A20 endp



; Attributes: bp-based frame

sub_544A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D752B0
mov	esp, ebp
pop	ebp
retn
sub_544A30 endp



; Attributes: bp-based frame

sub_544A40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5727A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544A40 endp

align 10h


; Attributes: bp-based frame

sub_544A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 596h
mov	esp, ebp
pop	ebp
retn
sub_544A60 endp



; Attributes: bp-based frame

sub_544A70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2100h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_544A70 endp

align 10h


; Attributes: bp-based frame

sub_544A90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75290
mov	esp, ebp
pop	ebp
retn
sub_544A90 endp



; Attributes: bp-based frame

sub_544AA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572800
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544AA0 endp

align 10h


; Attributes: bp-based frame

sub_544AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 597h
mov	esp, ebp
pop	ebp
retn
sub_544AC0 endp



; Attributes: bp-based frame

sub_544AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75270
mov	esp, ebp
pop	ebp
retn
sub_544AD0 endp



; Attributes: bp-based frame

sub_544AE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572860
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544AE0 endp

align 10h


; Attributes: bp-based frame

sub_544B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 598h
mov	esp, ebp
pop	ebp
retn
sub_544B00 endp



; Attributes: bp-based frame

sub_544B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75250
mov	esp, ebp
pop	ebp
retn
sub_544B10 endp



; Attributes: bp-based frame

sub_544B20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5728C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544B20 endp

align 10h


; Attributes: bp-based frame

sub_544B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 599h
mov	esp, ebp
pop	ebp
retn
sub_544B40 endp



; Attributes: bp-based frame

sub_544B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75230
mov	esp, ebp
pop	ebp
retn
sub_544B50 endp



; Attributes: bp-based frame

sub_544B60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572920
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544B60 endp

align 10h


; Attributes: bp-based frame

sub_544B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 59Ah
mov	esp, ebp
pop	ebp
retn
sub_544B80 endp



; Attributes: bp-based frame

sub_544B90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75210
mov	esp, ebp
pop	ebp
retn
sub_544B90 endp



; Attributes: bp-based frame

sub_544BA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572980
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544BA0 endp

align 10h


; Attributes: bp-based frame

sub_544BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 59Bh
mov	esp, ebp
pop	ebp
retn
sub_544BC0 endp



; Attributes: bp-based frame

sub_544BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D751F0
mov	esp, ebp
pop	ebp
retn
sub_544BD0 endp



; Attributes: bp-based frame

sub_544BE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5729E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544BE0 endp

align 10h


; Attributes: bp-based frame

sub_544C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 59Ch
mov	esp, ebp
pop	ebp
retn
sub_544C00 endp



; Attributes: bp-based frame

sub_544C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D751D0
mov	esp, ebp
pop	ebp
retn
sub_544C10 endp



; Attributes: bp-based frame

sub_544C20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572A40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544C20 endp

align 10h


; Attributes: bp-based frame

sub_544C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 59Dh
mov	esp, ebp
pop	ebp
retn
sub_544C40 endp



; Attributes: bp-based frame

sub_544C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D751B0
mov	esp, ebp
pop	ebp
retn
sub_544C50 endp



; Attributes: bp-based frame

sub_544C60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572AA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544C60 endp

align 10h


; Attributes: bp-based frame

sub_544C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 59Eh
mov	esp, ebp
pop	ebp
retn
sub_544C80 endp



; Attributes: bp-based frame

sub_544C90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 603h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_544C90 endp

align 10h


; Attributes: bp-based frame

sub_544CB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572B00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544CB0 endp

align 10h


; Attributes: bp-based frame

sub_544CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 59Fh
mov	esp, ebp
pop	ebp
retn
sub_544CD0 endp



; Attributes: bp-based frame

sub_544CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75190
mov	esp, ebp
pop	ebp
retn
sub_544CE0 endp



; Attributes: bp-based frame

sub_544CF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572B60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544CF0 endp

align 10h


; Attributes: bp-based frame

sub_544D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5A4h
mov	esp, ebp
pop	ebp
retn
sub_544D10 endp



; Attributes: bp-based frame

sub_544D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75170
mov	esp, ebp
pop	ebp
retn
sub_544D20 endp



; Attributes: bp-based frame

sub_544D30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572BC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544D30 endp

align 10h


; Attributes: bp-based frame

sub_544D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5A6h
mov	esp, ebp
pop	ebp
retn
sub_544D50 endp



; Attributes: bp-based frame

sub_544D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75150
mov	esp, ebp
pop	ebp
retn
sub_544D60 endp



; Attributes: bp-based frame

sub_544D70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572C20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544D70 endp

align 10h


; Attributes: bp-based frame

sub_544D90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5A7h
mov	esp, ebp
pop	ebp
retn
sub_544D90 endp



; Attributes: bp-based frame

sub_544DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75100
mov	esp, ebp
pop	ebp
retn
sub_544DA0 endp



; Attributes: bp-based frame

sub_544DB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572C80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544DB0 endp

align 10h


; Attributes: bp-based frame

sub_544DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5A8h
mov	esp, ebp
pop	ebp
retn
sub_544DD0 endp



; Attributes: bp-based frame

sub_544DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D750E0
mov	esp, ebp
pop	ebp
retn
sub_544DE0 endp



; Attributes: bp-based frame

sub_544DF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572CE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544DF0 endp

align 10h


; Attributes: bp-based frame

sub_544E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5A9h
mov	esp, ebp
pop	ebp
retn
sub_544E10 endp



; Attributes: bp-based frame

sub_544E20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572D40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544E20 endp

align 10h


; Attributes: bp-based frame

sub_544E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5AAh
mov	esp, ebp
pop	ebp
retn
sub_544E40 endp



; Attributes: bp-based frame

sub_544E50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572DA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544E50 endp

align 10h


; Attributes: bp-based frame

sub_544E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5ABh
mov	esp, ebp
pop	ebp
retn
sub_544E70 endp



; Attributes: bp-based frame

sub_544E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75070
mov	esp, ebp
pop	ebp
retn
sub_544E80 endp



; Attributes: bp-based frame

sub_544E90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572E00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544E90 endp

align 10h


; Attributes: bp-based frame

sub_544EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5AEh
mov	esp, ebp
pop	ebp
retn
sub_544EB0 endp



; Attributes: bp-based frame

sub_544EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75050
mov	esp, ebp
pop	ebp
retn
sub_544EC0 endp



; Attributes: bp-based frame

sub_544ED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572E60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544ED0 endp

align 10h


; Attributes: bp-based frame

sub_544EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5AFh
mov	esp, ebp
pop	ebp
retn
sub_544EF0 endp



; Attributes: bp-based frame

sub_544F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75030
mov	esp, ebp
pop	ebp
retn
sub_544F00 endp



; Attributes: bp-based frame

sub_544F10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572EC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544F10 endp

align 10h


; Attributes: bp-based frame

sub_544F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5B2h
mov	esp, ebp
pop	ebp
retn
sub_544F30 endp



; Attributes: bp-based frame

sub_544F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D75010
mov	esp, ebp
pop	ebp
retn
sub_544F40 endp



; Attributes: bp-based frame

sub_544F50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572F20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544F50 endp

align 10h


; Attributes: bp-based frame

sub_544F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5B3h
mov	esp, ebp
pop	ebp
retn
sub_544F70 endp



; Attributes: bp-based frame

sub_544F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74FF0
mov	esp, ebp
pop	ebp
retn
sub_544F80 endp



; Attributes: bp-based frame

sub_544F90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572F80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544F90 endp

align 10h


; Attributes: bp-based frame

sub_544FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5B4h
mov	esp, ebp
pop	ebp
retn
sub_544FB0 endp



; Attributes: bp-based frame

sub_544FC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_572FE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_544FC0 endp

align 10h


; Attributes: bp-based frame

sub_544FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5B5h
mov	esp, ebp
pop	ebp
retn
sub_544FE0 endp



; Attributes: bp-based frame

sub_544FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74FD0
mov	esp, ebp
pop	ebp
retn
sub_544FF0 endp



; Attributes: bp-based frame

sub_545000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545000 endp

align 10h


; Attributes: bp-based frame

sub_545020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5B6h
mov	esp, ebp
pop	ebp
retn
sub_545020 endp



; Attributes: bp-based frame

sub_545030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74FB0
mov	esp, ebp
pop	ebp
retn
sub_545030 endp



; Attributes: bp-based frame

sub_545040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5730A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545040 endp

align 10h


; Attributes: bp-based frame

sub_545060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5B7h
mov	esp, ebp
pop	ebp
retn
sub_545060 endp



; Attributes: bp-based frame

sub_545070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545070 endp

align 10h


; Attributes: bp-based frame

sub_545090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5BAh
mov	esp, ebp
pop	ebp
retn
sub_545090 endp



; Attributes: bp-based frame

sub_5450A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 741h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5450A0 endp

align 10h


; Attributes: bp-based frame

sub_5450C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5450C0 endp

align 10h


; Attributes: bp-based frame

sub_5450E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5BCh
mov	esp, ebp
pop	ebp
retn
sub_5450E0 endp



; Attributes: bp-based frame

sub_5450F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74F40
mov	esp, ebp
pop	ebp
retn
sub_5450F0 endp



; Attributes: bp-based frame

sub_545100 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5731C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545100 endp

align 10h


; Attributes: bp-based frame

sub_545120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5BDh
mov	esp, ebp
pop	ebp
retn
sub_545120 endp



; Attributes: bp-based frame

sub_545130 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545130 endp

align 10h


; Attributes: bp-based frame

sub_545150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5BEh
mov	esp, ebp
pop	ebp
retn
sub_545150 endp



; Attributes: bp-based frame

sub_545160 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545160 endp

align 10h


; Attributes: bp-based frame

sub_545180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5BFh
mov	esp, ebp
pop	ebp
retn
sub_545180 endp



; Attributes: bp-based frame

sub_545190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74F20
mov	esp, ebp
pop	ebp
retn
sub_545190 endp



; Attributes: bp-based frame

sub_5451A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5451D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5451C3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5451C3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5451A0 endp

align 10h


; Attributes: bp-based frame

sub_5451D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0B4h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 64h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5451D0 endp

align 10h


; Attributes: bp-based frame

sub_545220 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5732E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545220 endp

align 10h


; Attributes: bp-based frame

sub_545240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C0h
mov	esp, ebp
pop	ebp
retn
sub_545240 endp



; Attributes: bp-based frame

sub_545250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74F00
mov	esp, ebp
pop	ebp
retn
sub_545250 endp



; Attributes: bp-based frame

sub_545260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545260 endp

align 10h


; Attributes: bp-based frame

sub_545280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C1h
mov	esp, ebp
pop	ebp
retn
sub_545280 endp



; Attributes: bp-based frame

sub_545290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74EE0
mov	esp, ebp
pop	ebp
retn
sub_545290 endp



; Attributes: bp-based frame

sub_5452A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5733B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5452A0 endp

align 10h


; Attributes: bp-based frame

sub_5452C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C2h
mov	esp, ebp
pop	ebp
retn
sub_5452C0 endp



; Attributes: bp-based frame

sub_5452D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74EC0
mov	esp, ebp
pop	ebp
retn
sub_5452D0 endp



; Attributes: bp-based frame

sub_5452E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_545319
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_545319:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5452E0 endp

align 10h


; Attributes: bp-based frame

sub_545330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573410
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545330 endp

align 10h


; Attributes: bp-based frame

sub_545350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C3h
mov	esp, ebp
pop	ebp
retn
sub_545350 endp



; Attributes: bp-based frame

sub_545360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74EA0
mov	esp, ebp
pop	ebp
retn
sub_545360 endp



; Attributes: bp-based frame

sub_545370 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573480
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545370 endp

align 10h


; Attributes: bp-based frame

sub_545390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C4h
mov	esp, ebp
pop	ebp
retn
sub_545390 endp



; Attributes: bp-based frame

sub_5453A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E02h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5453A0 endp

align 10h


; Attributes: bp-based frame

sub_5453C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74E30
mov	esp, ebp
pop	ebp
retn
sub_5453C0 endp



; Attributes: bp-based frame

sub_5453D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5734E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5453D0 endp

align 10h


; Attributes: bp-based frame

sub_5453F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C5h
mov	esp, ebp
pop	ebp
retn
sub_5453F0 endp



; Attributes: bp-based frame

sub_545400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74E10
mov	esp, ebp
pop	ebp
retn
sub_545400 endp



; Attributes: bp-based frame

sub_545410 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573540
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545410 endp

align 10h


; Attributes: bp-based frame

sub_545430 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C6h
mov	esp, ebp
pop	ebp
retn
sub_545430 endp



; Attributes: bp-based frame

sub_545440 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5735A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545440 endp

align 10h


; Attributes: bp-based frame

sub_545460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C7h
mov	esp, ebp
pop	ebp
retn
sub_545460 endp



; Attributes: bp-based frame

sub_545470 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 702h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_545470 endp

align 10h


; Attributes: bp-based frame

sub_545490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573600
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545490 endp

align 10h


; Attributes: bp-based frame

sub_5454B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C8h
mov	esp, ebp
pop	ebp
retn
sub_5454B0 endp



; Attributes: bp-based frame

sub_5454C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573660
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5454C0 endp

align 10h


; Attributes: bp-based frame

sub_5454E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5C9h
mov	esp, ebp
pop	ebp
retn
sub_5454E0 endp



; Attributes: bp-based frame

sub_5454F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1E44h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5454F0 endp

align 10h


; Attributes: bp-based frame

sub_545510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74DD0
mov	esp, ebp
pop	ebp
retn
sub_545510 endp



; Attributes: bp-based frame

sub_545520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5736C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545520 endp

align 10h


; Attributes: bp-based frame

sub_545540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5CAh
mov	esp, ebp
pop	ebp
retn
sub_545540 endp



; Attributes: bp-based frame

sub_545550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74DB0
mov	esp, ebp
pop	ebp
retn
sub_545550 endp



; Attributes: bp-based frame

sub_545560 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573720
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545560 endp

align 10h


; Attributes: bp-based frame

sub_545580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5CBh
mov	esp, ebp
pop	ebp
retn
sub_545580 endp



; Attributes: bp-based frame

sub_545590 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573780
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545590 endp

align 10h


; Attributes: bp-based frame

sub_5455B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5CCh
mov	esp, ebp
pop	ebp
retn
sub_5455B0 endp



; Attributes: bp-based frame

sub_5455C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5737E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5455C0 endp

align 10h


; Attributes: bp-based frame

sub_5455E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5CDh
mov	esp, ebp
pop	ebp
retn
sub_5455E0 endp



; Attributes: bp-based frame

sub_5455F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 642h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5455F0 endp

align 10h


; Attributes: bp-based frame

sub_545610 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573840
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545610 endp

align 10h


; Attributes: bp-based frame

sub_545630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5CFh
mov	esp, ebp
pop	ebp
retn
sub_545630 endp



; Attributes: bp-based frame

sub_545640 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5738A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545640 endp

align 10h


; Attributes: bp-based frame

sub_545660 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573900
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545660 endp

align 10h


; Attributes: bp-based frame

sub_545680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D1h
mov	esp, ebp
pop	ebp
retn
sub_545680 endp



; Attributes: bp-based frame

sub_545690 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573960
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545690 endp

align 10h


; Attributes: bp-based frame

sub_5456B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D3h
mov	esp, ebp
pop	ebp
retn
sub_5456B0 endp



; Attributes: bp-based frame

sub_5456C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5739C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5456C0 endp

align 10h


; Attributes: bp-based frame

sub_5456E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D4h
mov	esp, ebp
pop	ebp
retn
sub_5456E0 endp



; Attributes: bp-based frame

sub_5456F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573A50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5456F0 endp

align 10h


; Attributes: bp-based frame

sub_545710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D5h
mov	esp, ebp
pop	ebp
retn
sub_545710 endp



; Attributes: bp-based frame

sub_545720 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573AB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545720 endp

align 10h


; Attributes: bp-based frame

sub_545740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D6h
mov	esp, ebp
pop	ebp
retn
sub_545740 endp



; Attributes: bp-based frame

sub_545750 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573B10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545750 endp

align 10h


; Attributes: bp-based frame

sub_545770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D7h
mov	esp, ebp
pop	ebp
retn
sub_545770 endp



; Attributes: bp-based frame

sub_545780 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 20h
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5457E7
mov	edx, [ebp+var_1C]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5457E7:
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_545780 endp

align 10h


; Attributes: bp-based frame

sub_545800 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573B70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545800 endp

align 10h


; Attributes: bp-based frame

sub_545820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D8h
mov	esp, ebp
pop	ebp
retn
sub_545820 endp



; Attributes: bp-based frame

sub_545830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573BD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545830 endp

align 10h


; Attributes: bp-based frame

sub_545850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D9h
mov	esp, ebp
pop	ebp
retn
sub_545850 endp



; Attributes: bp-based frame

sub_545860 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573C30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545860 endp

align 10h


; Attributes: bp-based frame

sub_545880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5DAh
mov	esp, ebp
pop	ebp
retn
sub_545880 endp



; Attributes: bp-based frame

sub_545890 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573C90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545890 endp

align 10h


; Attributes: bp-based frame

sub_5458B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5DCh
mov	esp, ebp
pop	ebp
retn
sub_5458B0 endp



; Attributes: bp-based frame

sub_5458C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573CF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5458C0 endp

align 10h


; Attributes: bp-based frame

sub_5458E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5DDh
mov	esp, ebp
pop	ebp
retn
sub_5458E0 endp



; Attributes: bp-based frame

sub_5458F0 proc	near

var_60=	dword ptr -60h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
call	sub_545920
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_545915
mov	ecx, [ebp+var_60]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_545915:
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn	4
sub_5458F0 endp

align 10h


; Attributes: bp-based frame

sub_545920 proc	near

var_6C=	dword ptr -6Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
add	ecx, 0A8h
call	sub_437300
mov	ecx, [ebp+var_6C]
add	ecx, 9Ch
call	sub_437300
mov	ecx, [ebp+var_6C]
add	ecx, 84h
call	sub_407910
mov	ecx, [ebp+var_6C]
add	ecx, 5Ch
call	sub_407E50
mov	ecx, [ebp+var_6C]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_6C]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_545920 endp

align 10h


; Attributes: bp-based frame

sub_545980 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573D50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545980 endp

align 10h


; Attributes: bp-based frame

sub_5459A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5DEh
mov	esp, ebp
pop	ebp
retn
sub_5459A0 endp



; Attributes: bp-based frame

sub_5459B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573DC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5459B0 endp

align 10h


; Attributes: bp-based frame

sub_5459D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5E1h
mov	esp, ebp
pop	ebp
retn
sub_5459D0 endp



; Attributes: bp-based frame

sub_5459E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74D50
mov	esp, ebp
pop	ebp
retn
sub_5459E0 endp



; Attributes: bp-based frame

sub_5459F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573E20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5459F0 endp

align 10h


; Attributes: bp-based frame

sub_545A10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5E2h
mov	esp, ebp
pop	ebp
retn
sub_545A10 endp



; Attributes: bp-based frame

sub_545A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74D30
mov	esp, ebp
pop	ebp
retn
sub_545A20 endp



; Attributes: bp-based frame

sub_545A30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573E80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545A30 endp

align 10h


; Attributes: bp-based frame

sub_545A50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5E3h
mov	esp, ebp
pop	ebp
retn
sub_545A50 endp



; Attributes: bp-based frame

sub_545A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74D10
mov	esp, ebp
pop	ebp
retn
sub_545A60 endp



; Attributes: bp-based frame

sub_545A70 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 20h
call	sub_5558F0
mov	ecx, [ebp+var_50]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_545AA0
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_545AA0:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_545A70 endp

align 10h


; Attributes: bp-based frame

sub_545AB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573EE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545AB0 endp

align 10h


; Attributes: bp-based frame

sub_545AD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5E6h
mov	esp, ebp
pop	ebp
retn
sub_545AD0 endp



; Attributes: bp-based frame

sub_545AE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573F40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545AE0 endp

align 10h


; Attributes: bp-based frame

sub_545B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5E7h
mov	esp, ebp
pop	ebp
retn
sub_545B00 endp



; Attributes: bp-based frame

sub_545B10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 742h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_545B10 endp

align 10h


; Attributes: bp-based frame

sub_545B30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_573FA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545B30 endp

align 10h


; Attributes: bp-based frame

sub_545B50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5E8h
mov	esp, ebp
pop	ebp
retn
sub_545B50 endp



; Attributes: bp-based frame

sub_545B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74CD0
mov	esp, ebp
pop	ebp
retn
sub_545B60 endp



; Attributes: bp-based frame

sub_545B70 proc	near

var_5C=	dword ptr -5Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 2Ch
call	sub_436CF0
mov	ecx, [ebp+var_5C]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_545BA0
mov	ecx, [ebp+var_5C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_545BA0:
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_545B70 endp

align 10h


; Attributes: bp-based frame

sub_545BB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574000
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545BB0 endp

align 10h


; Attributes: bp-based frame

sub_545BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5E9h
mov	esp, ebp
pop	ebp
retn
sub_545BD0 endp



; Attributes: bp-based frame

sub_545BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74CB0
mov	esp, ebp
pop	ebp
retn
sub_545BE0 endp



; Attributes: bp-based frame

sub_545BF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574060
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545BF0 endp

align 10h


; Attributes: bp-based frame

sub_545C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5EAh
mov	esp, ebp
pop	ebp
retn
sub_545C10 endp



; Attributes: bp-based frame

sub_545C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74C90
mov	esp, ebp
pop	ebp
retn
sub_545C20 endp



; Attributes: bp-based frame

sub_545C30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5740C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545C30 endp

align 10h


; Attributes: bp-based frame

sub_545C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5EBh
mov	esp, ebp
pop	ebp
retn
sub_545C50 endp



; Attributes: bp-based frame

sub_545C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74C70
mov	esp, ebp
pop	ebp
retn
sub_545C60 endp



; Attributes: bp-based frame

sub_545C70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574120
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545C70 endp

align 10h


; Attributes: bp-based frame

sub_545C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5ECh
mov	esp, ebp
pop	ebp
retn
sub_545C90 endp



; Attributes: bp-based frame

sub_545CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74C50
mov	esp, ebp
pop	ebp
retn
sub_545CA0 endp



; Attributes: bp-based frame

sub_545CB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574180
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545CB0 endp

align 10h


; Attributes: bp-based frame

sub_545CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5EDh
mov	esp, ebp
pop	ebp
retn
sub_545CD0 endp



; Attributes: bp-based frame

sub_545CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74C30
mov	esp, ebp
pop	ebp
retn
sub_545CE0 endp



; Attributes: bp-based frame

sub_545CF0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 28h
call	sub_4A9770
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_545D20
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_545D20:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_545CF0 endp

align 10h


; Attributes: bp-based frame

sub_545D30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5741E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545D30 endp

align 10h


; Attributes: bp-based frame

sub_545D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5EEh
mov	esp, ebp
pop	ebp
retn
sub_545D50 endp



; Attributes: bp-based frame

sub_545D60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574240
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545D60 endp

align 10h


; Attributes: bp-based frame

sub_545D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5EFh
mov	esp, ebp
pop	ebp
retn
sub_545D80 endp



; Attributes: bp-based frame

sub_545D90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5742A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545D90 endp

align 10h


; Attributes: bp-based frame

sub_545DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F0h
mov	esp, ebp
pop	ebp
retn
sub_545DB0 endp



; Attributes: bp-based frame

sub_545DC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 48702h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_545DC0 endp

align 10h


; Attributes: bp-based frame

sub_545DE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574300
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545DE0 endp

align 10h


; Attributes: bp-based frame

sub_545E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F1h
mov	esp, ebp
pop	ebp
retn
sub_545E00 endp



; Attributes: bp-based frame

sub_545E10 proc	near

var_AC=	dword ptr -0ACh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
add	ecx, 3Ch
call	sub_487140
mov	ecx, [ebp+var_AC]
add	ecx, 30h
call	sub_4A9770
mov	ecx, [ebp+var_AC]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_545E5D
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_545E5D:
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn	4
sub_545E10 endp

align 10h


; Attributes: bp-based frame

sub_545E70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574360
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545E70 endp

align 10h


; Attributes: bp-based frame

sub_545E90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F2h
mov	esp, ebp
pop	ebp
retn
sub_545E90 endp



; Attributes: bp-based frame

sub_545EA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5743C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545EA0 endp

align 10h


; Attributes: bp-based frame

sub_545EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F3h
mov	esp, ebp
pop	ebp
retn
sub_545EC0 endp



; Attributes: bp-based frame

sub_545ED0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574420
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545ED0 endp

align 10h


; Attributes: bp-based frame

sub_545EF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F4h
mov	esp, ebp
pop	ebp
retn
sub_545EF0 endp



; Attributes: bp-based frame

sub_545F00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574480
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545F00 endp

align 10h


; Attributes: bp-based frame

sub_545F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F5h
mov	esp, ebp
pop	ebp
retn
sub_545F20 endp



; Attributes: bp-based frame

sub_545F30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5744E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545F30 endp

align 10h


; Attributes: bp-based frame

sub_545F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F6h
mov	esp, ebp
pop	ebp
retn
sub_545F50 endp



; Attributes: bp-based frame

sub_545F60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574540
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545F60 endp

align 10h


; Attributes: bp-based frame

sub_545F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F7h
mov	esp, ebp
pop	ebp
retn
sub_545F80 endp



; Attributes: bp-based frame

sub_545F90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5745A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545F90 endp

align 10h


; Attributes: bp-based frame

sub_545FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F8h
mov	esp, ebp
pop	ebp
retn
sub_545FB0 endp



; Attributes: bp-based frame

sub_545FC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574600
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545FC0 endp

align 10h


; Attributes: bp-based frame

sub_545FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5F9h
mov	esp, ebp
pop	ebp
retn
sub_545FE0 endp



; Attributes: bp-based frame

sub_545FF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574660
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_545FF0 endp

align 10h


; Attributes: bp-based frame

sub_546010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5FAh
mov	esp, ebp
pop	ebp
retn
sub_546010 endp



; Attributes: bp-based frame

sub_546020 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5746C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546020 endp

align 10h


; Attributes: bp-based frame

sub_546040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5FBh
mov	esp, ebp
pop	ebp
retn
sub_546040 endp



; Attributes: bp-based frame

sub_546050 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574720
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546050 endp

align 10h


; Attributes: bp-based frame

sub_546070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5FCh
mov	esp, ebp
pop	ebp
retn
sub_546070 endp



; Attributes: bp-based frame

sub_546080 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574780
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546080 endp

align 10h


; Attributes: bp-based frame

sub_5460A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5FDh
mov	esp, ebp
pop	ebp
retn
sub_5460A0 endp



; Attributes: bp-based frame

sub_5460B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74C10
mov	esp, ebp
pop	ebp
retn
sub_5460B0 endp



; Attributes: bp-based frame

sub_5460C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5747E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5460C0 endp

align 10h


; Attributes: bp-based frame

sub_5460E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5FEh
mov	esp, ebp
pop	ebp
retn
sub_5460E0 endp



; Attributes: bp-based frame

sub_5460F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574840
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5460F0 endp

align 10h


; Attributes: bp-based frame

sub_546110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 600h
mov	esp, ebp
pop	ebp
retn
sub_546110 endp



; Attributes: bp-based frame

sub_546120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74BF0
mov	esp, ebp
pop	ebp
retn
sub_546120 endp



; Attributes: bp-based frame

sub_546130 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5748A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546130 endp

align 10h


; Attributes: bp-based frame

sub_546150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 601h
mov	esp, ebp
pop	ebp
retn
sub_546150 endp



; Attributes: bp-based frame

sub_546160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74BD0
mov	esp, ebp
pop	ebp
retn
sub_546160 endp



; Attributes: bp-based frame

sub_546170 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574900
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546170 endp

align 10h


; Attributes: bp-based frame

sub_546190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 602h
mov	esp, ebp
pop	ebp
retn
sub_546190 endp



; Attributes: bp-based frame

sub_5461A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74BB0
mov	esp, ebp
pop	ebp
retn
sub_5461A0 endp



; Attributes: bp-based frame

sub_5461B0 proc	near

var_B0=	dword ptr -0B0h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_B0], ecx
mov	ecx, [ebp+var_B0]
add	ecx, 2Ch
call	sub_4A9770
mov	ecx, [ebp+var_B0]
add	ecx, 20h
call	sub_437300
mov	ecx, [ebp+var_B0]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5461FD
mov	ecx, [ebp+var_B0]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5461FD:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn	4
sub_5461B0 endp

align 10h


; Attributes: bp-based frame

sub_546210 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574960
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546210 endp

align 10h


; Attributes: bp-based frame

sub_546230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 603h
mov	esp, ebp
pop	ebp
retn
sub_546230 endp



; Attributes: bp-based frame

sub_546240 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5749C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546240 endp

align 10h


; Attributes: bp-based frame

sub_546260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 604h
mov	esp, ebp
pop	ebp
retn
sub_546260 endp



; Attributes: bp-based frame

sub_546270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74B90
mov	esp, ebp
pop	ebp
retn
sub_546270 endp



; Attributes: bp-based frame

sub_546280 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574A20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546280 endp

align 10h


; Attributes: bp-based frame

sub_5462A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 605h
mov	esp, ebp
pop	ebp
retn
sub_5462A0 endp



; Attributes: bp-based frame

sub_5462B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74B70
mov	esp, ebp
pop	ebp
retn
sub_5462B0 endp



; Attributes: bp-based frame

sub_5462C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574A80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5462C0 endp

align 10h


; Attributes: bp-based frame

sub_5462E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 606h
mov	esp, ebp
pop	ebp
retn
sub_5462E0 endp



; Attributes: bp-based frame

sub_5462F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74B50
mov	esp, ebp
pop	ebp
retn
sub_5462F0 endp



; Attributes: bp-based frame

sub_546300 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574AE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546300 endp

align 10h


; Attributes: bp-based frame

sub_546320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60Ah
mov	esp, ebp
pop	ebp
retn
sub_546320 endp



; Attributes: bp-based frame

sub_546330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574B40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546330 endp

align 10h


; Attributes: bp-based frame

sub_546350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60Bh
mov	esp, ebp
pop	ebp
retn
sub_546350 endp



; Attributes: bp-based frame

sub_546360 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574BA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546360 endp

align 10h


; Attributes: bp-based frame

sub_546380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60Ch
mov	esp, ebp
pop	ebp
retn
sub_546380 endp



; Attributes: bp-based frame

sub_546390 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574C00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546390 endp

align 10h


; Attributes: bp-based frame

sub_5463B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60Dh
mov	esp, ebp
pop	ebp
retn
sub_5463B0 endp



; Attributes: bp-based frame

sub_5463C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74B30
mov	esp, ebp
pop	ebp
retn
sub_5463C0 endp



; Attributes: bp-based frame

sub_5463D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574C60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5463D0 endp

align 10h


; Attributes: bp-based frame

sub_5463F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60Eh
mov	esp, ebp
pop	ebp
retn
sub_5463F0 endp



; Attributes: bp-based frame

sub_546400 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574CC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546400 endp

align 10h


; Attributes: bp-based frame

sub_546420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60Fh
mov	esp, ebp
pop	ebp
retn
sub_546420 endp



; Attributes: bp-based frame

sub_546430 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574D20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546430 endp

align 10h


; Attributes: bp-based frame

sub_546450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 610h
mov	esp, ebp
pop	ebp
retn
sub_546450 endp



; Attributes: bp-based frame

sub_546460 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574D80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546460 endp

align 10h


; Attributes: bp-based frame

sub_546480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 611h
mov	esp, ebp
pop	ebp
retn
sub_546480 endp



; Attributes: bp-based frame

sub_546490 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 64h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5464C9
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5464C9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_546490 endp

align 10h


; Attributes: bp-based frame

sub_5464E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574DE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5464E0 endp

align 10h


; Attributes: bp-based frame

sub_546500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 612h
mov	esp, ebp
pop	ebp
retn
sub_546500 endp



; Attributes: bp-based frame

sub_546510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74AF0
mov	esp, ebp
pop	ebp
retn
sub_546510 endp



; Attributes: bp-based frame

sub_546520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574E50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546520 endp

align 10h


; Attributes: bp-based frame

sub_546540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 613h
mov	esp, ebp
pop	ebp
retn
sub_546540 endp



; Attributes: bp-based frame

sub_546550 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574EB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546550 endp

align 10h


; Attributes: bp-based frame

sub_546570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 615h
mov	esp, ebp
pop	ebp
retn
sub_546570 endp



; Attributes: bp-based frame

sub_546580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74AD0
mov	esp, ebp
pop	ebp
retn
sub_546580 endp



; Attributes: bp-based frame

sub_546590 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574F10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546590 endp

align 10h


; Attributes: bp-based frame

sub_5465B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 616h
mov	esp, ebp
pop	ebp
retn
sub_5465B0 endp



; Attributes: bp-based frame

sub_5465C0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 60h
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_546632
mov	edx, [ebp+var_1C]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_546632:
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5465C0 endp

align 10h


; Attributes: bp-based frame

sub_546650 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574F80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546650 endp

align 10h


; Attributes: bp-based frame

sub_546670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 617h
mov	esp, ebp
pop	ebp
retn
sub_546670 endp



; Attributes: bp-based frame

sub_546680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_574FF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546680 endp

align 10h


; Attributes: bp-based frame

sub_5466A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 619h
mov	esp, ebp
pop	ebp
retn
sub_5466A0 endp



; Attributes: bp-based frame

sub_5466B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575050
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5466B0 endp

align 10h


; Attributes: bp-based frame

sub_5466D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 61Ah
mov	esp, ebp
pop	ebp
retn
sub_5466D0 endp



; Attributes: bp-based frame

sub_5466E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74AB0
mov	esp, ebp
pop	ebp
retn
sub_5466E0 endp



; Attributes: bp-based frame

sub_5466F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5750B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5466F0 endp

align 10h


; Attributes: bp-based frame

sub_546710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 61Bh
mov	esp, ebp
pop	ebp
retn
sub_546710 endp



; Attributes: bp-based frame

sub_546720 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 2Ch
call	sub_555750
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_546750
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_546750:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_546720 endp

align 10h


; Attributes: bp-based frame

sub_546760 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575110
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546760 endp

align 10h


; Attributes: bp-based frame

sub_546780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 61Ch
mov	esp, ebp
pop	ebp
retn
sub_546780 endp



; Attributes: bp-based frame

sub_546790 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 644h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_546790 endp

align 10h


; Attributes: bp-based frame

sub_5467B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575170
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5467B0 endp

align 10h


; Attributes: bp-based frame

sub_5467D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 61Dh
mov	esp, ebp
pop	ebp
retn
sub_5467D0 endp



; Attributes: bp-based frame

sub_5467E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74A90
mov	esp, ebp
pop	ebp
retn
sub_5467E0 endp



; Attributes: bp-based frame

sub_5467F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5751D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5467F0 endp

align 10h


; Attributes: bp-based frame

sub_546810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 61Eh
mov	esp, ebp
pop	ebp
retn
sub_546810 endp



; Attributes: bp-based frame

sub_546820 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575230
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546820 endp

align 10h


; Attributes: bp-based frame

sub_546840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 61Fh
mov	esp, ebp
pop	ebp
retn
sub_546840 endp



; Attributes: bp-based frame

sub_546850 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1140h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_546850 endp

align 10h


; Attributes: bp-based frame

sub_546870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74A70
mov	esp, ebp
pop	ebp
retn
sub_546870 endp



; Attributes: bp-based frame

sub_546880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575290
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546880 endp

align 10h


; Attributes: bp-based frame

sub_5468A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 620h
mov	esp, ebp
pop	ebp
retn
sub_5468A0 endp



; Attributes: bp-based frame

sub_5468B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5752F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5468B0 endp

align 10h


; Attributes: bp-based frame

sub_5468D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 621h
mov	esp, ebp
pop	ebp
retn
sub_5468D0 endp



; Attributes: bp-based frame

sub_5468E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5468E0 endp

align 10h


; Attributes: bp-based frame

sub_546900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 622h
mov	esp, ebp
pop	ebp
retn
sub_546900 endp



; Attributes: bp-based frame

sub_546910 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5753B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546910 endp

align 10h


; Attributes: bp-based frame

sub_546930 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 623h
mov	esp, ebp
pop	ebp
retn
sub_546930 endp



; Attributes: bp-based frame

sub_546940 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_54696E
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_54696E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_546940 endp

align 10h


; Attributes: bp-based frame

sub_546980 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575410
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546980 endp

align 10h


; Attributes: bp-based frame

sub_5469A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 624h
mov	esp, ebp
pop	ebp
retn
sub_5469A0 endp



; Attributes: bp-based frame

sub_5469B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74A50
mov	esp, ebp
pop	ebp
retn
sub_5469B0 endp



; Attributes: bp-based frame

sub_5469C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575470
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5469C0 endp

align 10h


; Attributes: bp-based frame

sub_5469E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 625h
mov	esp, ebp
pop	ebp
retn
sub_5469E0 endp



; Attributes: bp-based frame

sub_5469F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7742h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5469F0 endp

align 10h


; Attributes: bp-based frame

sub_546A10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74A30
mov	esp, ebp
pop	ebp
retn
sub_546A10 endp



; Attributes: bp-based frame

sub_546A20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5754D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546A20 endp

align 10h


; Attributes: bp-based frame

sub_546A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 626h
mov	esp, ebp
pop	ebp
retn
sub_546A40 endp



; Attributes: bp-based frame

sub_546A50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74A10
mov	esp, ebp
pop	ebp
retn
sub_546A50 endp



; Attributes: bp-based frame

sub_546A60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575530
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546A60 endp

align 10h


; Attributes: bp-based frame

sub_546A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 627h
mov	esp, ebp
pop	ebp
retn
sub_546A80 endp



; Attributes: bp-based frame

sub_546A90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D749F0
mov	esp, ebp
pop	ebp
retn
sub_546A90 endp



; Attributes: bp-based frame

sub_546AA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_546ACE
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_546ACE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_546AA0 endp

align 10h


; Attributes: bp-based frame

sub_546AE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546AE0 endp

align 10h


; Attributes: bp-based frame

sub_546B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 628h
mov	esp, ebp
pop	ebp
retn
sub_546B00 endp



; Attributes: bp-based frame

sub_546B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D749D0
mov	esp, ebp
pop	ebp
retn
sub_546B10 endp



; Attributes: bp-based frame

sub_546B20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5755F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546B20 endp

align 10h


; Attributes: bp-based frame

sub_546B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 629h
mov	esp, ebp
pop	ebp
retn
sub_546B40 endp



; Attributes: bp-based frame

sub_546B50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E45h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_546B50 endp

align 10h


; Attributes: bp-based frame

sub_546B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D749B0
mov	esp, ebp
pop	ebp
retn
sub_546B70 endp



; Attributes: bp-based frame

sub_546B80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546B80 endp

align 10h


; Attributes: bp-based frame

sub_546BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 62Ah
mov	esp, ebp
pop	ebp
retn
sub_546BA0 endp



; Attributes: bp-based frame

sub_546BB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7800h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_546BB0 endp

align 10h


; Attributes: bp-based frame

sub_546BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74990
mov	esp, ebp
pop	ebp
retn
sub_546BD0 endp



; Attributes: bp-based frame

sub_546BE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5756B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546BE0 endp

align 10h


; Attributes: bp-based frame

sub_546C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 62Bh
mov	esp, ebp
pop	ebp
retn
sub_546C00 endp



; Attributes: bp-based frame

sub_546C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74970
mov	esp, ebp
pop	ebp
retn
sub_546C10 endp



; Attributes: bp-based frame

sub_546C20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_546C50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_546C43
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_546C43:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_546C20 endp

align 10h


; Attributes: bp-based frame

sub_546C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8Ch
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_546C50 endp

align 10h


; Attributes: bp-based frame

sub_546CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546CA0 endp

align 10h


; Attributes: bp-based frame

sub_546CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 62Ch
mov	esp, ebp
pop	ebp
retn
sub_546CC0 endp



; Attributes: bp-based frame

sub_546CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7E01h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_546CD0 endp

align 10h


; Attributes: bp-based frame

sub_546CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74950
mov	esp, ebp
pop	ebp
retn
sub_546CF0 endp



; Attributes: bp-based frame

sub_546D00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575780
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546D00 endp

align 10h


; Attributes: bp-based frame

sub_546D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 62Dh
mov	esp, ebp
pop	ebp
retn
sub_546D20 endp



; Attributes: bp-based frame

sub_546D30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5757E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546D30 endp

align 10h


; Attributes: bp-based frame

sub_546D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 635h
mov	esp, ebp
pop	ebp
retn
sub_546D50 endp



; Attributes: bp-based frame

sub_546D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74930
mov	esp, ebp
pop	ebp
retn
sub_546D60 endp



; Attributes: bp-based frame

sub_546D70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575840
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546D70 endp

align 10h


; Attributes: bp-based frame

sub_546D90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 636h
mov	esp, ebp
pop	ebp
retn
sub_546D90 endp



; Attributes: bp-based frame

sub_546DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74910
mov	esp, ebp
pop	ebp
retn
sub_546DA0 endp



; Attributes: bp-based frame

sub_546DB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5758A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546DB0 endp

align 10h


; Attributes: bp-based frame

sub_546DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 637h
mov	esp, ebp
pop	ebp
retn
sub_546DD0 endp



; Attributes: bp-based frame

sub_546DE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1F44h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_546DE0 endp

align 10h


; Attributes: bp-based frame

sub_546E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D748F0
mov	esp, ebp
pop	ebp
retn
sub_546E00 endp



; Attributes: bp-based frame

sub_546E10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575900
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546E10 endp

align 10h


; Attributes: bp-based frame

sub_546E30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 638h
mov	esp, ebp
pop	ebp
retn
sub_546E30 endp



; Attributes: bp-based frame

sub_546E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D748D0
mov	esp, ebp
pop	ebp
retn
sub_546E40 endp



; Attributes: bp-based frame

sub_546E50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575960
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546E50 endp

align 10h


; Attributes: bp-based frame

sub_546E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 63Ah
mov	esp, ebp
pop	ebp
retn
sub_546E70 endp



; Attributes: bp-based frame

sub_546E80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5759C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546E80 endp

align 10h


; Attributes: bp-based frame

sub_546EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 63Bh
mov	esp, ebp
pop	ebp
retn
sub_546EA0 endp



; Attributes: bp-based frame

sub_546EB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575A20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546EB0 endp

align 10h


; Attributes: bp-based frame

sub_546ED0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 63Ch
mov	esp, ebp
pop	ebp
retn
sub_546ED0 endp



; Attributes: bp-based frame

sub_546EE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_546F19
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_546F19:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_546EE0 endp

align 10h


; Attributes: bp-based frame

sub_546F30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575A80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546F30 endp

align 10h


; Attributes: bp-based frame

sub_546F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 63Eh
mov	esp, ebp
pop	ebp
retn
sub_546F50 endp



; Attributes: bp-based frame

sub_546F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D748B0
mov	esp, ebp
pop	ebp
retn
sub_546F60 endp



; Attributes: bp-based frame

sub_546F70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575AF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546F70 endp

align 10h


; Attributes: bp-based frame

sub_546F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 63Fh
mov	esp, ebp
pop	ebp
retn
sub_546F90 endp



; Attributes: bp-based frame

sub_546FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74890
mov	esp, ebp
pop	ebp
retn
sub_546FA0 endp



; Attributes: bp-based frame

sub_546FB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575B50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546FB0 endp

align 10h


; Attributes: bp-based frame

sub_546FD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 640h
mov	esp, ebp
pop	ebp
retn
sub_546FD0 endp



; Attributes: bp-based frame

sub_546FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74870
mov	esp, ebp
pop	ebp
retn
sub_546FE0 endp



; Attributes: bp-based frame

sub_546FF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575BB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_546FF0 endp

align 10h


; Attributes: bp-based frame

sub_547010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 642h
mov	esp, ebp
pop	ebp
retn
sub_547010 endp



; Attributes: bp-based frame

sub_547020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74850
mov	esp, ebp
pop	ebp
retn
sub_547020 endp



; Attributes: bp-based frame

sub_547030 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575C10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547030 endp

align 10h


; Attributes: bp-based frame

sub_547050 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 643h
mov	esp, ebp
pop	ebp
retn
sub_547050 endp



; Attributes: bp-based frame

sub_547060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74830
mov	esp, ebp
pop	ebp
retn
sub_547060 endp



; Attributes: bp-based frame

sub_547070 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575C70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547070 endp

align 10h


; Attributes: bp-based frame

sub_547090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 644h
mov	esp, ebp
pop	ebp
retn
sub_547090 endp



; Attributes: bp-based frame

sub_5470A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74810
mov	esp, ebp
pop	ebp
retn
sub_5470A0 endp



; Attributes: bp-based frame

sub_5470B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575CD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5470B0 endp

align 10h


; Attributes: bp-based frame

sub_5470D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 645h
mov	esp, ebp
pop	ebp
retn
sub_5470D0 endp



; Attributes: bp-based frame

sub_5470E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D747F0
mov	esp, ebp
pop	ebp
retn
sub_5470E0 endp



; Attributes: bp-based frame

sub_5470F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575D30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5470F0 endp

align 10h


; Attributes: bp-based frame

sub_547110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 646h
mov	esp, ebp
pop	ebp
retn
sub_547110 endp



; Attributes: bp-based frame

sub_547120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D747D0
mov	esp, ebp
pop	ebp
retn
sub_547120 endp



; Attributes: bp-based frame

sub_547130 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575D90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547130 endp

align 10h


; Attributes: bp-based frame

sub_547150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 647h
mov	esp, ebp
pop	ebp
retn
sub_547150 endp



; Attributes: bp-based frame

sub_547160 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575DF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547160 endp

align 10h


; Attributes: bp-based frame

sub_547180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 64Dh
mov	esp, ebp
pop	ebp
retn
sub_547180 endp



; Attributes: bp-based frame

sub_547190 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575E50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547190 endp

align 10h


; Attributes: bp-based frame

sub_5471B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 64Eh
mov	esp, ebp
pop	ebp
retn
sub_5471B0 endp



; Attributes: bp-based frame

sub_5471C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D747B0
mov	esp, ebp
pop	ebp
retn
sub_5471C0 endp



; Attributes: bp-based frame

sub_5471D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575EB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5471D0 endp

align 10h


; Attributes: bp-based frame

sub_5471F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 64Fh
mov	esp, ebp
pop	ebp
retn
sub_5471F0 endp



; Attributes: bp-based frame

sub_547200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74790
mov	esp, ebp
pop	ebp
retn
sub_547200 endp



; Attributes: bp-based frame

sub_547210 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575F10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547210 endp

align 10h


; Attributes: bp-based frame

sub_547230 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 650h
mov	esp, ebp
pop	ebp
retn
sub_547230 endp



; Attributes: bp-based frame

sub_547240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74740
mov	esp, ebp
pop	ebp
retn
sub_547240 endp



; Attributes: bp-based frame

sub_547250 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575F70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547250 endp

align 10h


; Attributes: bp-based frame

sub_547270 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 651h
mov	esp, ebp
pop	ebp
retn
sub_547270 endp



; Attributes: bp-based frame

sub_547280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74720
mov	esp, ebp
pop	ebp
retn
sub_547280 endp



; Attributes: bp-based frame

sub_547290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5472C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5472B3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5472B3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_547290 endp

align 10h


; Attributes: bp-based frame

sub_5472C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0F8h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0DCh
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0C4h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0ACh
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_5472C0 endp

align 10h


; Attributes: bp-based frame

sub_547330 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_575FE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547330 endp

align 10h


; Attributes: bp-based frame

sub_547350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 652h
mov	esp, ebp
pop	ebp
retn
sub_547350 endp



; Attributes: bp-based frame

sub_547360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74700
mov	esp, ebp
pop	ebp
retn
sub_547360 endp



; Attributes: bp-based frame

sub_547370 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576050
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547370 endp

align 10h


; Attributes: bp-based frame

sub_547390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 653h
mov	esp, ebp
pop	ebp
retn
sub_547390 endp



; Attributes: bp-based frame

sub_5473A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D746E0
mov	esp, ebp
pop	ebp
retn
sub_5473A0 endp



; Attributes: bp-based frame

sub_5473B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5760B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5473B0 endp

align 10h


; Attributes: bp-based frame

sub_5473D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 654h
mov	esp, ebp
pop	ebp
retn
sub_5473D0 endp



; Attributes: bp-based frame

sub_5473E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D746C0
mov	esp, ebp
pop	ebp
retn
sub_5473E0 endp



; Attributes: bp-based frame

sub_5473F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576110
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5473F0 endp

align 10h


; Attributes: bp-based frame

sub_547410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 655h
mov	esp, ebp
pop	ebp
retn
sub_547410 endp



; Attributes: bp-based frame

sub_547420 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576170
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547420 endp

align 10h


; Attributes: bp-based frame

sub_547440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 656h
mov	esp, ebp
pop	ebp
retn
sub_547440 endp



; Attributes: bp-based frame

sub_547450 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5761D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547450 endp

align 10h


; Attributes: bp-based frame

sub_547470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 657h
mov	esp, ebp
pop	ebp
retn
sub_547470 endp



; Attributes: bp-based frame

sub_547480 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576230
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547480 endp

align 10h


; Attributes: bp-based frame

sub_5474A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 65Bh
mov	esp, ebp
pop	ebp
retn
sub_5474A0 endp



; Attributes: bp-based frame

sub_5474B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576290
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5474B0 endp

align 10h


; Attributes: bp-based frame

sub_5474D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 65Dh
mov	esp, ebp
pop	ebp
retn
sub_5474D0 endp



; Attributes: bp-based frame

sub_5474E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74680
mov	esp, ebp
pop	ebp
retn
sub_5474E0 endp



; Attributes: bp-based frame

sub_5474F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5762F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5474F0 endp

align 10h


; Attributes: bp-based frame

sub_547510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 65Eh
mov	esp, ebp
pop	ebp
retn
sub_547510 endp



; Attributes: bp-based frame

sub_547520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74660
mov	esp, ebp
pop	ebp
retn
sub_547520 endp



; Attributes: bp-based frame

sub_547530 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576350
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547530 endp

align 10h


; Attributes: bp-based frame

sub_547550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 65Fh
mov	esp, ebp
pop	ebp
retn
sub_547550 endp



; Attributes: bp-based frame

sub_547560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74610
mov	esp, ebp
pop	ebp
retn
sub_547560 endp



; Attributes: bp-based frame

sub_547570 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5763B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547570 endp

align 10h


; Attributes: bp-based frame

sub_547590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 660h
mov	esp, ebp
pop	ebp
retn
sub_547590 endp



; Attributes: bp-based frame

sub_5475A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D745A0
mov	esp, ebp
pop	ebp
retn
sub_5475A0 endp



; Attributes: bp-based frame

sub_5475B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576410
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5475B0 endp

align 10h


; Attributes: bp-based frame

sub_5475D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 661h
mov	esp, ebp
pop	ebp
retn
sub_5475D0 endp



; Attributes: bp-based frame

sub_5475E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1F41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5475E0 endp

align 10h


; Attributes: bp-based frame

sub_547600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74540
mov	esp, ebp
pop	ebp
retn
sub_547600 endp



; Attributes: bp-based frame

sub_547610 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576470
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547610 endp

align 10h


; Attributes: bp-based frame

sub_547630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 662h
mov	esp, ebp
pop	ebp
retn
sub_547630 endp



; Attributes: bp-based frame

sub_547640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D744E0
mov	esp, ebp
pop	ebp
retn
sub_547640 endp



; Attributes: bp-based frame

sub_547650 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5764D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547650 endp

align 10h


; Attributes: bp-based frame

sub_547670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 663h
mov	esp, ebp
pop	ebp
retn
sub_547670 endp



; Attributes: bp-based frame

sub_547680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D744C0
mov	esp, ebp
pop	ebp
retn
sub_547680 endp



; Attributes: bp-based frame

sub_547690 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576530
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547690 endp

align 10h


; Attributes: bp-based frame

sub_5476B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 664h
mov	esp, ebp
pop	ebp
retn
sub_5476B0 endp



; Attributes: bp-based frame

sub_5476C0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 20h
call	sub_4A9770
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5476F0
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5476F0:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_5476C0 endp

align 10h


; Attributes: bp-based frame

sub_547700 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576590
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547700 endp

align 10h


; Attributes: bp-based frame

sub_547720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 665h
mov	esp, ebp
pop	ebp
retn
sub_547720 endp



; Attributes: bp-based frame

sub_547730 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5765F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547730 endp

align 10h


; Attributes: bp-based frame

sub_547750 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 666h
mov	esp, ebp
pop	ebp
retn
sub_547750 endp



; Attributes: bp-based frame

sub_547760 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576650
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547760 endp

align 10h


; Attributes: bp-based frame

sub_547780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 667h
mov	esp, ebp
pop	ebp
retn
sub_547780 endp



; Attributes: bp-based frame

sub_547790 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5766B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547790 endp

align 10h


; Attributes: bp-based frame

sub_5477B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 668h
mov	esp, ebp
pop	ebp
retn
sub_5477B0 endp



; Attributes: bp-based frame

sub_5477C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576710
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5477C0 endp

align 10h


; Attributes: bp-based frame

sub_5477E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 66Ah
mov	esp, ebp
pop	ebp
retn
sub_5477E0 endp



; Attributes: bp-based frame

sub_5477F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74450
mov	esp, ebp
pop	ebp
retn
sub_5477F0 endp



; Attributes: bp-based frame

sub_547800 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576770
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547800 endp

align 10h


; Attributes: bp-based frame

sub_547820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 66Ch
mov	esp, ebp
pop	ebp
retn
sub_547820 endp



; Attributes: bp-based frame

sub_547830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74430
mov	esp, ebp
pop	ebp
retn
sub_547830 endp



; Attributes: bp-based frame

sub_547840 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5767D0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547840 endp

align 10h


; Attributes: bp-based frame

sub_547860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 66Dh
mov	esp, ebp
pop	ebp
retn
sub_547860 endp



; Attributes: bp-based frame

sub_547870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74410
mov	esp, ebp
pop	ebp
retn
sub_547870 endp



; Attributes: bp-based frame

sub_547880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576830
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547880 endp

align 10h


; Attributes: bp-based frame

sub_5478A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 66Eh
mov	esp, ebp
pop	ebp
retn
sub_5478A0 endp



; Attributes: bp-based frame

sub_5478B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D743F0
mov	esp, ebp
pop	ebp
retn
sub_5478B0 endp



; Attributes: bp-based frame

sub_5478C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576890
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5478C0 endp

align 10h


; Attributes: bp-based frame

sub_5478E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 66Fh
mov	esp, ebp
pop	ebp
retn
sub_5478E0 endp



; Attributes: bp-based frame

sub_5478F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D743D0
mov	esp, ebp
pop	ebp
retn
sub_5478F0 endp



; Attributes: bp-based frame

sub_547900 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5768F0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547900 endp

align 10h


; Attributes: bp-based frame

sub_547920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 670h
mov	esp, ebp
pop	ebp
retn
sub_547920 endp



; Attributes: bp-based frame

sub_547930 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D743B0
mov	esp, ebp
pop	ebp
retn
sub_547930 endp



; Attributes: bp-based frame

sub_547940 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576950
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547940 endp

align 10h


; Attributes: bp-based frame

sub_547960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 671h
mov	esp, ebp
pop	ebp
retn
sub_547960 endp



; Attributes: bp-based frame

sub_547970 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74390
mov	esp, ebp
pop	ebp
retn
sub_547970 endp



; Attributes: bp-based frame

sub_547980 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5769B0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547980 endp

align 10h


; Attributes: bp-based frame

sub_5479A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 672h
mov	esp, ebp
pop	ebp
retn
sub_5479A0 endp



; Attributes: bp-based frame

sub_5479B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576A10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5479B0 endp

align 10h


; Attributes: bp-based frame

sub_5479D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 673h
mov	esp, ebp
pop	ebp
retn
sub_5479D0 endp



; Attributes: bp-based frame

sub_5479E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576A70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5479E0 endp

align 10h


; Attributes: bp-based frame

sub_547A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 674h
mov	esp, ebp
pop	ebp
retn
sub_547A00 endp



; Attributes: bp-based frame

sub_547A10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576AD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547A10 endp

align 10h


; Attributes: bp-based frame

sub_547A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 675h
mov	esp, ebp
pop	ebp
retn
sub_547A30 endp



; Attributes: bp-based frame

sub_547A40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576B30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547A40 endp

align 10h


; Attributes: bp-based frame

sub_547A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 676h
mov	esp, ebp
pop	ebp
retn
sub_547A60 endp



; Attributes: bp-based frame

sub_547A70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74370
mov	esp, ebp
pop	ebp
retn
sub_547A70 endp



; Attributes: bp-based frame

sub_547A80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576B90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547A80 endp

align 10h


; Attributes: bp-based frame

sub_547AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 677h
mov	esp, ebp
pop	ebp
retn
sub_547AA0 endp



; Attributes: bp-based frame

sub_547AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74350
mov	esp, ebp
pop	ebp
retn
sub_547AB0 endp



; Attributes: bp-based frame

sub_547AC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576BF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547AC0 endp

align 10h


; Attributes: bp-based frame

sub_547AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 678h
mov	esp, ebp
pop	ebp
retn
sub_547AE0 endp



; Attributes: bp-based frame

sub_547AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74330
mov	esp, ebp
pop	ebp
retn
sub_547AF0 endp



; Attributes: bp-based frame

sub_547B00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576C50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547B00 endp

align 10h


; Attributes: bp-based frame

sub_547B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 679h
mov	esp, ebp
pop	ebp
retn
sub_547B20 endp



; Attributes: bp-based frame

sub_547B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74310
mov	esp, ebp
pop	ebp
retn
sub_547B30 endp



; Attributes: bp-based frame

sub_547B40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_547B99
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_547B99:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_547B40 endp

align 10h


; Attributes: bp-based frame

sub_547BB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576CB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547BB0 endp

align 10h


; Attributes: bp-based frame

sub_547BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 67Ch
mov	esp, ebp
pop	ebp
retn
sub_547BD0 endp



; Attributes: bp-based frame

sub_547BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D742E0
mov	esp, ebp
pop	ebp
retn
sub_547BE0 endp



; Attributes: bp-based frame

sub_547BF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576D10
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547BF0 endp

align 10h


; Attributes: bp-based frame

sub_547C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 67Eh
mov	esp, ebp
pop	ebp
retn
sub_547C10 endp



; Attributes: bp-based frame

sub_547C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D742C0
mov	esp, ebp
pop	ebp
retn
sub_547C20 endp



; Attributes: bp-based frame

sub_547C30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576D70
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547C30 endp

align 10h


; Attributes: bp-based frame

sub_547C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 67Fh
mov	esp, ebp
pop	ebp
retn
sub_547C50 endp



; Attributes: bp-based frame

sub_547C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D742A0
mov	esp, ebp
pop	ebp
retn
sub_547C60 endp



; Attributes: bp-based frame

sub_547C70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576DD0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547C70 endp

align 10h


; Attributes: bp-based frame

sub_547C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 680h
mov	esp, ebp
pop	ebp
retn
sub_547C90 endp



; Attributes: bp-based frame

sub_547CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74280
mov	esp, ebp
pop	ebp
retn
sub_547CA0 endp



; Attributes: bp-based frame

sub_547CB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576E30
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547CB0 endp

align 10h


; Attributes: bp-based frame

sub_547CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 681h
mov	esp, ebp
pop	ebp
retn
sub_547CD0 endp



; Attributes: bp-based frame

sub_547CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74260
mov	esp, ebp
pop	ebp
retn
sub_547CE0 endp



; Attributes: bp-based frame

sub_547CF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576E90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547CF0 endp

align 10h


; Attributes: bp-based frame

sub_547D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 682h
mov	esp, ebp
pop	ebp
retn
sub_547D10 endp



; Attributes: bp-based frame

sub_547D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74240
mov	esp, ebp
pop	ebp
retn
sub_547D20 endp



; Attributes: bp-based frame

sub_547D30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576EF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547D30 endp

align 10h


; Attributes: bp-based frame

sub_547D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 683h
mov	esp, ebp
pop	ebp
retn
sub_547D50 endp



; Attributes: bp-based frame

sub_547D60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576F50
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547D60 endp

align 10h


; Attributes: bp-based frame

sub_547D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 684h
mov	esp, ebp
pop	ebp
retn
sub_547D80 endp



; Attributes: bp-based frame

sub_547D90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_576FB0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547D90 endp

align 10h


; Attributes: bp-based frame

sub_547DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 685h
mov	esp, ebp
pop	ebp
retn
sub_547DB0 endp



; Attributes: bp-based frame

sub_547DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74210
mov	esp, ebp
pop	ebp
retn
sub_547DC0 endp



; Attributes: bp-based frame

sub_547DD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577010
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547DD0 endp

align 10h


; Attributes: bp-based frame

sub_547DF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 686h
mov	esp, ebp
pop	ebp
retn
sub_547DF0 endp



; Attributes: bp-based frame

sub_547E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D741F0
mov	esp, ebp
pop	ebp
retn
sub_547E00 endp



; Attributes: bp-based frame

sub_547E10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_547E40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_547E33
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_547E33:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_547E10 endp

align 10h


; Attributes: bp-based frame

sub_547E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn
sub_547E40 endp

align 10h


; Attributes: bp-based frame

sub_547E80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577070
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547E80 endp

align 10h


; Attributes: bp-based frame

sub_547EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 687h
mov	esp, ebp
pop	ebp
retn
sub_547EA0 endp



; Attributes: bp-based frame

sub_547EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D741D0
mov	esp, ebp
pop	ebp
retn
sub_547EB0 endp



; Attributes: bp-based frame

sub_547EC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
push	eax
call	sub_4094B0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_547EE4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_547EE4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_547EC0 endp

align 10h


; Attributes: bp-based frame

sub_547EF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_8], ecx
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_547F22
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_4098E0
mov	[ebp+var_C], eax
jmp	short loc_547F29

loc_547F22:
mov	[ebp+var_C], 0

loc_547F29:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	8
sub_547EF0 endp

align 10h


; Attributes: bp-based frame

sub_547F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 688h
mov	esp, ebp
pop	ebp
retn
sub_547F40 endp



; Attributes: bp-based frame

sub_547F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D741B0
mov	esp, ebp
pop	ebp
retn
sub_547F50 endp



; Attributes: bp-based frame

sub_547F60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5770E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547F60 endp

align 10h


; Attributes: bp-based frame

sub_547F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 689h
mov	esp, ebp
pop	ebp
retn
sub_547F80 endp



; Attributes: bp-based frame

sub_547F90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577140
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547F90 endp

align 10h


; Attributes: bp-based frame

sub_547FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 68Ah
mov	esp, ebp
pop	ebp
retn
sub_547FB0 endp



; Attributes: bp-based frame

sub_547FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74190
mov	esp, ebp
pop	ebp
retn
sub_547FC0 endp



; Attributes: bp-based frame

sub_547FD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5771A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_547FD0 endp

align 10h


; Attributes: bp-based frame

sub_547FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 68Bh
mov	esp, ebp
pop	ebp
retn
sub_547FF0 endp



; Attributes: bp-based frame

sub_548000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577200
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548000 endp

align 10h


; Attributes: bp-based frame

sub_548020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 68Ch
mov	esp, ebp
pop	ebp
retn
sub_548020 endp



; Attributes: bp-based frame

sub_548030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74170
mov	esp, ebp
pop	ebp
retn
sub_548030 endp



; Attributes: bp-based frame

sub_548040 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577260
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548040 endp

align 10h


; Attributes: bp-based frame

sub_548060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 68Dh
mov	esp, ebp
pop	ebp
retn
sub_548060 endp



; Attributes: bp-based frame

sub_548070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74150
mov	esp, ebp
pop	ebp
retn
sub_548070 endp



; Attributes: bp-based frame

sub_548080 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5772C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548080 endp

align 10h


; Attributes: bp-based frame

sub_5480A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 68Eh
mov	esp, ebp
pop	ebp
retn
sub_5480A0 endp



; Attributes: bp-based frame

sub_5480B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74130
mov	esp, ebp
pop	ebp
retn
sub_5480B0 endp



; Attributes: bp-based frame

sub_5480C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577320
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5480C0 endp

align 10h


; Attributes: bp-based frame

sub_5480E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 68Fh
mov	esp, ebp
pop	ebp
retn
sub_5480E0 endp



; Attributes: bp-based frame

sub_5480F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577380
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5480F0 endp

align 10h


; Attributes: bp-based frame

sub_548110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 690h
mov	esp, ebp
pop	ebp
retn
sub_548110 endp



; Attributes: bp-based frame

sub_548120 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5773E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548120 endp

align 10h


; Attributes: bp-based frame

sub_548140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 691h
mov	esp, ebp
pop	ebp
retn
sub_548140 endp



; Attributes: bp-based frame

sub_548150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74110
mov	esp, ebp
pop	ebp
retn
sub_548150 endp



; Attributes: bp-based frame

sub_548160 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577440
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548160 endp

align 10h


; Attributes: bp-based frame

sub_548180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 692h
mov	esp, ebp
pop	ebp
retn
sub_548180 endp



; Attributes: bp-based frame

sub_548190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D740F0
mov	esp, ebp
pop	ebp
retn
sub_548190 endp



; Attributes: bp-based frame

sub_5481A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5774A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5481A0 endp

align 10h


; Attributes: bp-based frame

sub_5481C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 693h
mov	esp, ebp
pop	ebp
retn
sub_5481C0 endp



; Attributes: bp-based frame

sub_5481D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D740D0
mov	esp, ebp
pop	ebp
retn
sub_5481D0 endp



; Attributes: bp-based frame

sub_5481E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577500
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5481E0 endp

align 10h


; Attributes: bp-based frame

sub_548200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 694h
mov	esp, ebp
pop	ebp
retn
sub_548200 endp



; Attributes: bp-based frame

sub_548210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D740B0
mov	esp, ebp
pop	ebp
retn
sub_548210 endp



; Attributes: bp-based frame

sub_548220 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577560
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548220 endp

align 10h


; Attributes: bp-based frame

sub_548240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 695h
mov	esp, ebp
pop	ebp
retn
sub_548240 endp



; Attributes: bp-based frame

sub_548250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74090
mov	esp, ebp
pop	ebp
retn
sub_548250 endp



; Attributes: bp-based frame

sub_548260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5775C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548260 endp

align 10h


; Attributes: bp-based frame

sub_548280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 696h
mov	esp, ebp
pop	ebp
retn
sub_548280 endp



; Attributes: bp-based frame

sub_548290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74070
mov	esp, ebp
pop	ebp
retn
sub_548290 endp



; Attributes: bp-based frame

sub_5482A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577620
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5482A0 endp

align 10h


; Attributes: bp-based frame

sub_5482C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 697h
mov	esp, ebp
pop	ebp
retn
sub_5482C0 endp



; Attributes: bp-based frame

sub_5482D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74050
mov	esp, ebp
pop	ebp
retn
sub_5482D0 endp



; Attributes: bp-based frame

sub_5482E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577680
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5482E0 endp

align 10h


; Attributes: bp-based frame

sub_548300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 698h
mov	esp, ebp
pop	ebp
retn
sub_548300 endp



; Attributes: bp-based frame

sub_548310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74030
mov	esp, ebp
pop	ebp
retn
sub_548310 endp



; Attributes: bp-based frame

sub_548320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5776E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548320 endp

align 10h


; Attributes: bp-based frame

sub_548340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 699h
mov	esp, ebp
pop	ebp
retn
sub_548340 endp



; Attributes: bp-based frame

sub_548350 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D74010
mov	esp, ebp
pop	ebp
retn
sub_548350 endp



; Attributes: bp-based frame

sub_548360 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577740
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548360 endp

align 10h


; Attributes: bp-based frame

sub_548380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 69Ah
mov	esp, ebp
pop	ebp
retn
sub_548380 endp



; Attributes: bp-based frame

sub_548390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73FF0
mov	esp, ebp
pop	ebp
retn
sub_548390 endp



; Attributes: bp-based frame

sub_5483A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5777A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5483A0 endp

align 10h


; Attributes: bp-based frame

sub_5483C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 69Bh
mov	esp, ebp
pop	ebp
retn
sub_5483C0 endp



; Attributes: bp-based frame

sub_5483D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73FD0
mov	esp, ebp
pop	ebp
retn
sub_5483D0 endp



; Attributes: bp-based frame

sub_5483E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577800
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5483E0 endp

align 10h


; Attributes: bp-based frame

sub_548400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 69Ch
mov	esp, ebp
pop	ebp
retn
sub_548400 endp



; Attributes: bp-based frame

sub_548410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73F80
mov	esp, ebp
pop	ebp
retn
sub_548410 endp



; Attributes: bp-based frame

sub_548420 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577860
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548420 endp

align 10h


; Attributes: bp-based frame

sub_548440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 69Dh
mov	esp, ebp
pop	ebp
retn
sub_548440 endp



; Attributes: bp-based frame

sub_548450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73F60
mov	esp, ebp
pop	ebp
retn
sub_548450 endp



; Attributes: bp-based frame

sub_548460 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5778C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548460 endp

align 10h


; Attributes: bp-based frame

sub_548480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 69Eh
mov	esp, ebp
pop	ebp
retn
sub_548480 endp



; Attributes: bp-based frame

sub_548490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73F40
mov	esp, ebp
pop	ebp
retn
sub_548490 endp



; Attributes: bp-based frame

sub_5484A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577920
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5484A0 endp

align 10h


; Attributes: bp-based frame

sub_5484C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A0h
mov	esp, ebp
pop	ebp
retn
sub_5484C0 endp



; Attributes: bp-based frame

sub_5484D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73F20
mov	esp, ebp
pop	ebp
retn
sub_5484D0 endp



; Attributes: bp-based frame

sub_5484E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577980
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5484E0 endp

align 10h


; Attributes: bp-based frame

sub_548500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A1h
mov	esp, ebp
pop	ebp
retn
sub_548500 endp



; Attributes: bp-based frame

sub_548510 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73F00
mov	esp, ebp
pop	ebp
retn
sub_548510 endp



; Attributes: bp-based frame

sub_548520 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5779E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548520 endp

align 10h


; Attributes: bp-based frame

sub_548540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A2h
mov	esp, ebp
pop	ebp
retn
sub_548540 endp



; Attributes: bp-based frame

sub_548550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73EE0
mov	esp, ebp
pop	ebp
retn
sub_548550 endp



; Attributes: bp-based frame

sub_548560 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577A40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548560 endp

align 10h


; Attributes: bp-based frame

sub_548580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A3h
mov	esp, ebp
pop	ebp
retn
sub_548580 endp



; Attributes: bp-based frame

sub_548590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73EC0
mov	esp, ebp
pop	ebp
retn
sub_548590 endp



; Attributes: bp-based frame

sub_5485A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577AA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5485A0 endp

align 10h


; Attributes: bp-based frame

sub_5485C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A4h
mov	esp, ebp
pop	ebp
retn
sub_5485C0 endp



; Attributes: bp-based frame

sub_5485D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73EA0
mov	esp, ebp
pop	ebp
retn
sub_5485D0 endp



; Attributes: bp-based frame

sub_5485E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577B00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5485E0 endp

align 10h


; Attributes: bp-based frame

sub_548600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A5h
mov	esp, ebp
pop	ebp
retn
sub_548600 endp



; Attributes: bp-based frame

sub_548610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73E80
mov	esp, ebp
pop	ebp
retn
sub_548610 endp



; Attributes: bp-based frame

sub_548620 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577B60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548620 endp

align 10h


; Attributes: bp-based frame

sub_548640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A6h
mov	esp, ebp
pop	ebp
retn
sub_548640 endp



; Attributes: bp-based frame

sub_548650 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577BC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548650 endp

align 10h


; Attributes: bp-based frame

sub_548670 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A7h
mov	esp, ebp
pop	ebp
retn
sub_548670 endp



; Attributes: bp-based frame

sub_548680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577C20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548680 endp

align 10h


; Attributes: bp-based frame

sub_5486A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A8h
mov	esp, ebp
pop	ebp
retn
sub_5486A0 endp



; Attributes: bp-based frame

sub_5486B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73E60
mov	esp, ebp
pop	ebp
retn
sub_5486B0 endp



; Attributes: bp-based frame

sub_5486C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577C80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5486C0 endp

align 10h


; Attributes: bp-based frame

sub_5486E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6A9h
mov	esp, ebp
pop	ebp
retn
sub_5486E0 endp



; Attributes: bp-based frame

sub_5486F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73DF0
mov	esp, ebp
pop	ebp
retn
sub_5486F0 endp



; Attributes: bp-based frame

sub_548700 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577CE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548700 endp

align 10h


; Attributes: bp-based frame

sub_548720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6AAh
mov	esp, ebp
pop	ebp
retn
sub_548720 endp



; Attributes: bp-based frame

sub_548730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73DD0
mov	esp, ebp
pop	ebp
retn
sub_548730 endp



; Attributes: bp-based frame

sub_548740 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577D40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548740 endp

align 10h


; Attributes: bp-based frame

sub_548760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6ABh
mov	esp, ebp
pop	ebp
retn
sub_548760 endp



; Attributes: bp-based frame

sub_548770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73DB0
mov	esp, ebp
pop	ebp
retn
sub_548770 endp



; Attributes: bp-based frame

sub_548780 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577DA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548780 endp

align 10h


; Attributes: bp-based frame

sub_5487A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6ACh
mov	esp, ebp
pop	ebp
retn
sub_5487A0 endp



; Attributes: bp-based frame

sub_5487B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577E00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5487B0 endp

align 10h


; Attributes: bp-based frame

sub_5487D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6ADh
mov	esp, ebp
pop	ebp
retn
sub_5487D0 endp



; Attributes: bp-based frame

sub_5487E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1E41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5487E0 endp

align 10h


; Attributes: bp-based frame

sub_548800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73D50
mov	esp, ebp
pop	ebp
retn
sub_548800 endp



; Attributes: bp-based frame

sub_548810 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577E60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548810 endp

align 10h


; Attributes: bp-based frame

sub_548830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6AEh
mov	esp, ebp
pop	ebp
retn
sub_548830 endp



; Attributes: bp-based frame

sub_548840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73D30
mov	esp, ebp
pop	ebp
retn
sub_548840 endp



; Attributes: bp-based frame

sub_548850 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577EC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548850 endp

align 10h


; Attributes: bp-based frame

sub_548870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6AFh
mov	esp, ebp
pop	ebp
retn
sub_548870 endp



; Attributes: bp-based frame

sub_548880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73D10
mov	esp, ebp
pop	ebp
retn
sub_548880 endp



; Attributes: bp-based frame

sub_548890 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577F20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548890 endp

align 10h


; Attributes: bp-based frame

sub_5488B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B0h
mov	esp, ebp
pop	ebp
retn
sub_5488B0 endp



; Attributes: bp-based frame

sub_5488C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73CF0
mov	esp, ebp
pop	ebp
retn
sub_5488C0 endp



; Attributes: bp-based frame

sub_5488D0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577F80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5488D0 endp

align 10h


; Attributes: bp-based frame

sub_5488F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B1h
mov	esp, ebp
pop	ebp
retn
sub_5488F0 endp



; Attributes: bp-based frame

sub_548900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73CD0
mov	esp, ebp
pop	ebp
retn
sub_548900 endp



; Attributes: bp-based frame

sub_548910 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_577FE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548910 endp

align 10h


; Attributes: bp-based frame

sub_548930 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B2h
mov	esp, ebp
pop	ebp
retn
sub_548930 endp



; Attributes: bp-based frame

sub_548940 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2940h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_548940 endp

align 10h


; Attributes: bp-based frame

sub_548960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73CB0
mov	esp, ebp
pop	ebp
retn
sub_548960 endp



; Attributes: bp-based frame

sub_548970 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578040
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548970 endp

align 10h


; Attributes: bp-based frame

sub_548990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B3h
mov	esp, ebp
pop	ebp
retn
sub_548990 endp



; Attributes: bp-based frame

sub_5489A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73C90
mov	esp, ebp
pop	ebp
retn
sub_5489A0 endp



; Attributes: bp-based frame

sub_5489B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5780A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5489B0 endp

align 10h


; Attributes: bp-based frame

sub_5489D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B6h
mov	esp, ebp
pop	ebp
retn
sub_5489D0 endp



; Attributes: bp-based frame

sub_5489E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73C70
mov	esp, ebp
pop	ebp
retn
sub_5489E0 endp



; Attributes: bp-based frame

sub_5489F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578100
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5489F0 endp

align 10h


; Attributes: bp-based frame

sub_548A10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B7h
mov	esp, ebp
pop	ebp
retn
sub_548A10 endp



; Attributes: bp-based frame

sub_548A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73C50
mov	esp, ebp
pop	ebp
retn
sub_548A20 endp



; Attributes: bp-based frame

sub_548A30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578160
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548A30 endp

align 10h


; Attributes: bp-based frame

sub_548A50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B8h
mov	esp, ebp
pop	ebp
retn
sub_548A50 endp



; Attributes: bp-based frame

sub_548A60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 7F43h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_548A60 endp

align 10h


; Attributes: bp-based frame

sub_548A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73C30
mov	esp, ebp
pop	ebp
retn
sub_548A80 endp



; Attributes: bp-based frame

sub_548A90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5781C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548A90 endp

align 10h


; Attributes: bp-based frame

sub_548AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6B9h
mov	esp, ebp
pop	ebp
retn
sub_548AB0 endp



; Attributes: bp-based frame

sub_548AC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578220
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548AC0 endp

align 10h


; Attributes: bp-based frame

sub_548AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6BAh
mov	esp, ebp
pop	ebp
retn
sub_548AE0 endp



; Attributes: bp-based frame

sub_548AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73C10
mov	esp, ebp
pop	ebp
retn
sub_548AF0 endp



; Attributes: bp-based frame

sub_548B00 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578280
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548B00 endp

align 10h


; Attributes: bp-based frame

sub_548B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6BCh
mov	esp, ebp
pop	ebp
retn
sub_548B20 endp



; Attributes: bp-based frame

sub_548B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73BC0
mov	esp, ebp
pop	ebp
retn
sub_548B30 endp



; Attributes: bp-based frame

sub_548B40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5782E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548B40 endp

align 10h


; Attributes: bp-based frame

sub_548B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6BDh
mov	esp, ebp
pop	ebp
retn
sub_548B60 endp



; Attributes: bp-based frame

sub_548B70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73B70
mov	esp, ebp
pop	ebp
retn
sub_548B70 endp



; Attributes: bp-based frame

sub_548B80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578340
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548B80 endp

align 10h


; Attributes: bp-based frame

sub_548BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6BEh
mov	esp, ebp
pop	ebp
retn
sub_548BA0 endp



; Attributes: bp-based frame

sub_548BB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73B50
mov	esp, ebp
pop	ebp
retn
sub_548BB0 endp



; Attributes: bp-based frame

sub_548BC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5783A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548BC0 endp

align 10h


; Attributes: bp-based frame

sub_548BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6BFh
mov	esp, ebp
pop	ebp
retn
sub_548BE0 endp



; Attributes: bp-based frame

sub_548BF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2E44h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_548BF0 endp

align 10h


; Attributes: bp-based frame

sub_548C10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73B30
mov	esp, ebp
pop	ebp
retn
sub_548C10 endp



; Attributes: bp-based frame

sub_548C20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578400
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548C20 endp

align 10h


; Attributes: bp-based frame

sub_548C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6C0h
mov	esp, ebp
pop	ebp
retn
sub_548C40 endp



; Attributes: bp-based frame

sub_548C50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73B10
mov	esp, ebp
pop	ebp
retn
sub_548C50 endp



; Attributes: bp-based frame

sub_548C60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578460
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548C60 endp

align 10h


; Attributes: bp-based frame

sub_548C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6C2h
mov	esp, ebp
pop	ebp
retn
sub_548C80 endp



; Attributes: bp-based frame

sub_548C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73AF0
mov	esp, ebp
pop	ebp
retn
sub_548C90 endp



; Attributes: bp-based frame

sub_548CA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5784C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548CA0 endp

align 10h


; Attributes: bp-based frame

sub_548CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6C3h
mov	esp, ebp
pop	ebp
retn
sub_548CC0 endp



; Attributes: bp-based frame

sub_548CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73AD0
mov	esp, ebp
pop	ebp
retn
sub_548CD0 endp



; Attributes: bp-based frame

sub_548CE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578520
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548CE0 endp

align 10h


; Attributes: bp-based frame

sub_548D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6C6h
mov	esp, ebp
pop	ebp
retn
sub_548D00 endp



; Attributes: bp-based frame

sub_548D10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578580
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548D10 endp

align 10h


; Attributes: bp-based frame

sub_548D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6C7h
mov	esp, ebp
pop	ebp
retn
sub_548D30 endp



; Attributes: bp-based frame

sub_548D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73A90
mov	esp, ebp
pop	ebp
retn
sub_548D40 endp



; Attributes: bp-based frame

sub_548D50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5785E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548D50 endp

align 10h


; Attributes: bp-based frame

sub_548D70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6C8h
mov	esp, ebp
pop	ebp
retn
sub_548D70 endp



; Attributes: bp-based frame

sub_548D80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578640
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548D80 endp

align 10h


; Attributes: bp-based frame

sub_548DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6CBh
mov	esp, ebp
pop	ebp
retn
sub_548DA0 endp



; Attributes: bp-based frame

sub_548DB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73A40
mov	esp, ebp
pop	ebp
retn
sub_548DB0 endp



; Attributes: bp-based frame

sub_548DC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5786A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548DC0 endp

align 10h


; Attributes: bp-based frame

sub_548DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6CCh
mov	esp, ebp
pop	ebp
retn
sub_548DE0 endp



; Attributes: bp-based frame

sub_548DF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578700
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548DF0 endp

align 10h


; Attributes: bp-based frame

sub_548E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6CDh
mov	esp, ebp
pop	ebp
retn
sub_548E10 endp



; Attributes: bp-based frame

sub_548E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73A20
mov	esp, ebp
pop	ebp
retn
sub_548E20 endp



; Attributes: bp-based frame

sub_548E30 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578760
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548E30 endp

align 10h


; Attributes: bp-based frame

sub_548E50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6CEh
mov	esp, ebp
pop	ebp
retn
sub_548E50 endp



; Attributes: bp-based frame

sub_548E60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5787C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548E60 endp

align 10h


; Attributes: bp-based frame

sub_548E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D0h
mov	esp, ebp
pop	ebp
retn
sub_548E80 endp



; Attributes: bp-based frame

sub_548E90 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578820
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548E90 endp

align 10h


; Attributes: bp-based frame

sub_548EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D1h
mov	esp, ebp
pop	ebp
retn
sub_548EB0 endp



; Attributes: bp-based frame

sub_548EC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578880
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548EC0 endp

align 10h


; Attributes: bp-based frame

sub_548EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D2h
mov	esp, ebp
pop	ebp
retn
sub_548EE0 endp



; Attributes: bp-based frame

sub_548EF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5788E0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548EF0 endp

align 10h


; Attributes: bp-based frame

sub_548F10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D3h
mov	esp, ebp
pop	ebp
retn
sub_548F10 endp



; Attributes: bp-based frame

sub_548F20 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578940
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548F20 endp

align 10h


; Attributes: bp-based frame

sub_548F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D4h
mov	esp, ebp
pop	ebp
retn
sub_548F40 endp



; Attributes: bp-based frame

sub_548F50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5789A0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548F50 endp

align 10h


; Attributes: bp-based frame

sub_548F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D5h
mov	esp, ebp
pop	ebp
retn
sub_548F70 endp



; Attributes: bp-based frame

sub_548F80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578A00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548F80 endp

align 10h


; Attributes: bp-based frame

sub_548FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D6h
mov	esp, ebp
pop	ebp
retn
sub_548FA0 endp



; Attributes: bp-based frame

sub_548FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D739C0
mov	esp, ebp
pop	ebp
retn
sub_548FB0 endp



; Attributes: bp-based frame

sub_548FC0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578A60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_548FC0 endp

align 10h


; Attributes: bp-based frame

sub_548FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D7h
mov	esp, ebp
pop	ebp
retn
sub_548FE0 endp



; Attributes: bp-based frame

sub_548FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D739A0
mov	esp, ebp
pop	ebp
retn
sub_548FF0 endp



; Attributes: bp-based frame

sub_549000 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578AC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549000 endp

align 10h


; Attributes: bp-based frame

sub_549020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6D9h
mov	esp, ebp
pop	ebp
retn
sub_549020 endp



; Attributes: bp-based frame

sub_549030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73980
mov	esp, ebp
pop	ebp
retn
sub_549030 endp



; Attributes: bp-based frame

sub_549040 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_487140
mov	ecx, [ebp+var_58]
call	sub_4087D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_549070
mov	ecx, [ebp+var_58]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_549070:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_549040 endp

align 10h


; Attributes: bp-based frame

sub_549080 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578B20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549080 endp

align 10h


; Attributes: bp-based frame

sub_5490A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6DBh
mov	esp, ebp
pop	ebp
retn
sub_5490A0 endp



; Attributes: bp-based frame

sub_5490B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 1900h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5490B0 endp

align 10h


; Attributes: bp-based frame

sub_5490D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73950
mov	esp, ebp
pop	ebp
retn
sub_5490D0 endp



; Attributes: bp-based frame

sub_5490E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578B80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5490E0 endp

align 10h


; Attributes: bp-based frame

sub_549100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6DCh
mov	esp, ebp
pop	ebp
retn
sub_549100 endp



; Attributes: bp-based frame

sub_549110 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0E42h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_549110 endp

align 10h


; Attributes: bp-based frame

sub_549130 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73930
mov	esp, ebp
pop	ebp
retn
sub_549130 endp



; Attributes: bp-based frame

sub_549140 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578BE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549140 endp

align 10h


; Attributes: bp-based frame

sub_549160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6DDh
mov	esp, ebp
pop	ebp
retn
sub_549160 endp



; Attributes: bp-based frame

sub_549170 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 2E41h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_549170 endp

align 10h


; Attributes: bp-based frame

sub_549190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73910
mov	esp, ebp
pop	ebp
retn
sub_549190 endp



; Attributes: bp-based frame

sub_5491A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578C40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5491A0 endp

align 10h


; Attributes: bp-based frame

sub_5491C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6DEh
mov	esp, ebp
pop	ebp
retn
sub_5491C0 endp



; Attributes: bp-based frame

sub_5491D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D738C0
mov	esp, ebp
pop	ebp
retn
sub_5491D0 endp



; Attributes: bp-based frame

sub_5491E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578CA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5491E0 endp

align 10h


; Attributes: bp-based frame

sub_549200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6DFh
mov	esp, ebp
pop	ebp
retn
sub_549200 endp



; Attributes: bp-based frame

sub_549210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D738A0
mov	esp, ebp
pop	ebp
retn
sub_549210 endp



; Attributes: bp-based frame

sub_549220 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578D00
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549220 endp

align 10h


; Attributes: bp-based frame

sub_549240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E0h
mov	esp, ebp
pop	ebp
retn
sub_549240 endp



; Attributes: bp-based frame

sub_549250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73880
mov	esp, ebp
pop	ebp
retn
sub_549250 endp



; Attributes: bp-based frame

sub_549260 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578D60
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549260 endp

align 10h


; Attributes: bp-based frame

sub_549280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E1h
mov	esp, ebp
pop	ebp
retn
sub_549280 endp



; Attributes: bp-based frame

sub_549290 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73860
mov	esp, ebp
pop	ebp
retn
sub_549290 endp



; Attributes: bp-based frame

sub_5492A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578DC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5492A0 endp

align 10h


; Attributes: bp-based frame

sub_5492C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E2h
mov	esp, ebp
pop	ebp
retn
sub_5492C0 endp



; Attributes: bp-based frame

sub_5492D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73840
mov	esp, ebp
pop	ebp
retn
sub_5492D0 endp



; Attributes: bp-based frame

sub_5492E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578E20
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5492E0 endp

align 10h


; Attributes: bp-based frame

sub_549300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E3h
mov	esp, ebp
pop	ebp
retn
sub_549300 endp



; Attributes: bp-based frame

sub_549310 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578E80
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549310 endp

align 10h


; Attributes: bp-based frame

sub_549330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E4h
mov	esp, ebp
pop	ebp
retn
sub_549330 endp



; Attributes: bp-based frame

sub_549340 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578EE0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549340 endp

align 10h


; Attributes: bp-based frame

sub_549360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E5h
mov	esp, ebp
pop	ebp
retn
sub_549360 endp



; Attributes: bp-based frame

sub_549370 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73820
mov	esp, ebp
pop	ebp
retn
sub_549370 endp



; Attributes: bp-based frame

sub_549380 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578F40
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549380 endp

align 10h


; Attributes: bp-based frame

sub_5493A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E7h
mov	esp, ebp
pop	ebp
retn
sub_5493A0 endp



; Attributes: bp-based frame

sub_5493B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_578FA0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5493B0 endp

align 10h


; Attributes: bp-based frame

sub_5493D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E8h
mov	esp, ebp
pop	ebp
retn
sub_5493D0 endp



; Attributes: bp-based frame

sub_5493E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_579000
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_5493E0 endp

align 10h


; Attributes: bp-based frame

sub_549400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6E9h
mov	esp, ebp
pop	ebp
retn
sub_549400 endp



; Attributes: bp-based frame

sub_549410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73800
mov	esp, ebp
pop	ebp
retn
sub_549410 endp



; Attributes: bp-based frame

sub_549420 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_579060
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549420 endp

align 10h


; Attributes: bp-based frame

sub_549440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6EBh
mov	esp, ebp
pop	ebp
retn
sub_549440 endp



; Attributes: bp-based frame

sub_549450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73790
mov	esp, ebp
pop	ebp
retn
sub_549450 endp



; Attributes: bp-based frame

sub_549460 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5790C0
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_549460 endp

align 10h


; Attributes: bp-based frame

sub_549480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6ECh
mov	esp, ebp
pop	ebp
retn
sub_549480 endp



; Attributes: bp-based frame

sub_549490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
call	sub_D73770
mov	esp, ebp
pop	ebp
retn
sub_549490 endp



; Attributes: bp-based frame

sub_5494A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599C78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5494A0 endp



; Attributes: bp-based frame

sub_5494C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599C8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5494C0 endp



; Attributes: bp-based frame

sub_5494E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599CA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5494E0 endp



; Attributes: bp-based frame

sub_549500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599CB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549500 endp



; Attributes: bp-based frame

sub_549520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599CC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549520 endp



; Attributes: bp-based frame

sub_549540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599CDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549540 endp



; Attributes: bp-based frame

sub_549560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599CF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549560 endp



; Attributes: bp-based frame

sub_549580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549580 endp



; Attributes: bp-based frame

sub_5495A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5495A0 endp



; Attributes: bp-based frame

sub_5495C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5495C0 endp



; Attributes: bp-based frame

sub_5495E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5495E0 endp



; Attributes: bp-based frame

sub_549600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549600 endp



; Attributes: bp-based frame

sub_549620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549620 endp



; Attributes: bp-based frame

sub_549640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549640 endp



; Attributes: bp-based frame

sub_549660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599D90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549660 endp



; Attributes: bp-based frame

sub_549680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599DA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549680 endp



; Attributes: bp-based frame

sub_5496A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599DB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5496A0 endp



; Attributes: bp-based frame

sub_5496C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599DCC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5496C0 endp



; Attributes: bp-based frame

sub_5496E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599DE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5496E0 endp



; Attributes: bp-based frame

sub_549700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599DF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549700 endp



; Attributes: bp-based frame

sub_549720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549720 endp



; Attributes: bp-based frame

sub_549740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549740 endp



; Attributes: bp-based frame

sub_549760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549760 endp



; Attributes: bp-based frame

sub_549780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549780 endp



; Attributes: bp-based frame

sub_5497A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5497A0 endp



; Attributes: bp-based frame

sub_5497C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5497C0 endp



; Attributes: bp-based frame

sub_5497E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5497E0 endp



; Attributes: bp-based frame

sub_549800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599E94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549800 endp



; Attributes: bp-based frame

sub_549820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599EA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549820 endp



; Attributes: bp-based frame

sub_549840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599EBC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549840 endp



; Attributes: bp-based frame

sub_549860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599ED0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549860 endp



; Attributes: bp-based frame

sub_549880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599EE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549880 endp



; Attributes: bp-based frame

sub_5498A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599EF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5498A0 endp



; Attributes: bp-based frame

sub_5498C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5498C0 endp



; Attributes: bp-based frame

sub_5498E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5498E0 endp



; Attributes: bp-based frame

sub_549900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549900 endp



; Attributes: bp-based frame

sub_549920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549920 endp



; Attributes: bp-based frame

sub_549940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549940 endp



; Attributes: bp-based frame

sub_549960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549960 endp



; Attributes: bp-based frame

sub_549980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549980 endp



; Attributes: bp-based frame

sub_5499A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599F98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5499A0 endp



; Attributes: bp-based frame

sub_5499C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599FAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5499C0 endp



; Attributes: bp-based frame

sub_5499E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599FC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5499E0 endp



; Attributes: bp-based frame

sub_549A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599FD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549A00 endp



; Attributes: bp-based frame

sub_549A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599FE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549A20 endp



; Attributes: bp-based frame

sub_549A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1599FFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549A40 endp



; Attributes: bp-based frame

sub_549A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A010
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549A60 endp



; Attributes: bp-based frame

sub_549A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A024
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549A80 endp



; Attributes: bp-based frame

sub_549AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A038
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549AA0 endp



; Attributes: bp-based frame

sub_549AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A04C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549AC0 endp



; Attributes: bp-based frame

sub_549AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A060
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549AE0 endp



; Attributes: bp-based frame

sub_549B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A074
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549B00 endp



; Attributes: bp-based frame

sub_549B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A088
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549B20 endp



; Attributes: bp-based frame

sub_549B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A09C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549B40 endp



; Attributes: bp-based frame

sub_549B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A0B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549B60 endp



; Attributes: bp-based frame

sub_549B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A0C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549B80 endp



; Attributes: bp-based frame

sub_549BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A0D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549BA0 endp



; Attributes: bp-based frame

sub_549BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A0EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549BC0 endp



; Attributes: bp-based frame

sub_549BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A100
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549BE0 endp



; Attributes: bp-based frame

sub_549C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A114
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549C00 endp



; Attributes: bp-based frame

sub_549C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A128
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549C20 endp



; Attributes: bp-based frame

sub_549C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A13C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549C40 endp



; Attributes: bp-based frame

sub_549C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A150
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549C60 endp



; Attributes: bp-based frame

sub_549C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A164
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549C80 endp



; Attributes: bp-based frame

sub_549CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A178
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549CA0 endp



; Attributes: bp-based frame

sub_549CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A18C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549CC0 endp



; Attributes: bp-based frame

sub_549CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A1A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549CE0 endp



; Attributes: bp-based frame

sub_549D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A1B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549D00 endp



; Attributes: bp-based frame

sub_549D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A1C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549D20 endp



; Attributes: bp-based frame

sub_549D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A1DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549D40 endp



; Attributes: bp-based frame

sub_549D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A1F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549D60 endp



; Attributes: bp-based frame

sub_549D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A204
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549D80 endp



; Attributes: bp-based frame

sub_549DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A218
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549DA0 endp



; Attributes: bp-based frame

sub_549DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A22C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549DC0 endp



; Attributes: bp-based frame

sub_549DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A240
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549DE0 endp



; Attributes: bp-based frame

sub_549E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A254
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549E00 endp



; Attributes: bp-based frame

sub_549E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A268
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549E20 endp



; Attributes: bp-based frame

sub_549E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A27C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549E40 endp



; Attributes: bp-based frame

sub_549E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A290
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549E60 endp



; Attributes: bp-based frame

sub_549E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A2A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549E80 endp



; Attributes: bp-based frame

sub_549EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A2B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549EA0 endp



; Attributes: bp-based frame

sub_549EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A2CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549EC0 endp



; Attributes: bp-based frame

sub_549EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A2E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549EE0 endp



; Attributes: bp-based frame

sub_549F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A2F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549F00 endp



; Attributes: bp-based frame

sub_549F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A308
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549F20 endp



; Attributes: bp-based frame

sub_549F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A31C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549F40 endp



; Attributes: bp-based frame

sub_549F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A330
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549F60 endp



; Attributes: bp-based frame

sub_549F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A344
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549F80 endp



; Attributes: bp-based frame

sub_549FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A358
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549FA0 endp



; Attributes: bp-based frame

sub_549FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A36C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549FC0 endp



; Attributes: bp-based frame

sub_549FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A380
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_549FE0 endp



; Attributes: bp-based frame

sub_54A000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A394
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A000 endp



; Attributes: bp-based frame

sub_54A020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A3A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A020 endp



; Attributes: bp-based frame

sub_54A040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A3BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A040 endp



; Attributes: bp-based frame

sub_54A060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A3D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A060 endp



; Attributes: bp-based frame

sub_54A080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A3E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A080 endp



; Attributes: bp-based frame

sub_54A0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A3F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A0A0 endp



; Attributes: bp-based frame

sub_54A0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A40C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A0C0 endp



; Attributes: bp-based frame

sub_54A0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A420
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A0E0 endp



; Attributes: bp-based frame

sub_54A100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A434
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A100 endp



; Attributes: bp-based frame

sub_54A120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A448
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A120 endp



; Attributes: bp-based frame

sub_54A140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A45C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A140 endp



; Attributes: bp-based frame

sub_54A160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A470
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A160 endp



; Attributes: bp-based frame

sub_54A180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A484
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A180 endp



; Attributes: bp-based frame

sub_54A1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A498
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A1A0 endp



; Attributes: bp-based frame

sub_54A1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A4AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A1C0 endp



; Attributes: bp-based frame

sub_54A1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A4C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A1E0 endp



; Attributes: bp-based frame

sub_54A200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A4D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A200 endp



; Attributes: bp-based frame

sub_54A220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A4E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A220 endp



; Attributes: bp-based frame

sub_54A240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A4FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A240 endp



; Attributes: bp-based frame

sub_54A260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A510
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A260 endp



; Attributes: bp-based frame

sub_54A280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A524
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A280 endp



; Attributes: bp-based frame

sub_54A2A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A538
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A2A0 endp



; Attributes: bp-based frame

sub_54A2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A54C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A2C0 endp



; Attributes: bp-based frame

sub_54A2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A560
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A2E0 endp



; Attributes: bp-based frame

sub_54A300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A574
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A300 endp



; Attributes: bp-based frame

sub_54A320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A588
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A320 endp



; Attributes: bp-based frame

sub_54A340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A59C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A340 endp



; Attributes: bp-based frame

sub_54A360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A5B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A360 endp



; Attributes: bp-based frame

sub_54A380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A5C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A380 endp



; Attributes: bp-based frame

sub_54A3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A5D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A3A0 endp



; Attributes: bp-based frame

sub_54A3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A5EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A3C0 endp



; Attributes: bp-based frame

sub_54A3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A600
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A3E0 endp



; Attributes: bp-based frame

sub_54A400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A614
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A400 endp



; Attributes: bp-based frame

sub_54A420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A628
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A420 endp



; Attributes: bp-based frame

sub_54A440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A63C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A440 endp



; Attributes: bp-based frame

sub_54A460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A650
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A460 endp



; Attributes: bp-based frame

sub_54A480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A664
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A480 endp



; Attributes: bp-based frame

sub_54A4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A678
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A4A0 endp



; Attributes: bp-based frame

sub_54A4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A68C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A4C0 endp



; Attributes: bp-based frame

sub_54A4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A6A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A4E0 endp



; Attributes: bp-based frame

sub_54A500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A6B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A500 endp



; Attributes: bp-based frame

sub_54A520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A6C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A520 endp



; Attributes: bp-based frame

sub_54A540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A6DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A540 endp



; Attributes: bp-based frame

sub_54A560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A6F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A560 endp



; Attributes: bp-based frame

sub_54A580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A704
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A580 endp



; Attributes: bp-based frame

sub_54A5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A718
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A5A0 endp



; Attributes: bp-based frame

sub_54A5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A72C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A5C0 endp



; Attributes: bp-based frame

sub_54A5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A740
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A5E0 endp



; Attributes: bp-based frame

sub_54A600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A754
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A600 endp



; Attributes: bp-based frame

sub_54A620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A768
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A620 endp



; Attributes: bp-based frame

sub_54A640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A77C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A640 endp



; Attributes: bp-based frame

sub_54A660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A790
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A660 endp



; Attributes: bp-based frame

sub_54A680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A7A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A680 endp



; Attributes: bp-based frame

sub_54A6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A7B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A6A0 endp



; Attributes: bp-based frame

sub_54A6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A7CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A6C0 endp



; Attributes: bp-based frame

sub_54A6E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A7E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A6E0 endp



; Attributes: bp-based frame

sub_54A700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A7F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A700 endp



; Attributes: bp-based frame

sub_54A720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A808
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A720 endp



; Attributes: bp-based frame

sub_54A740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A81C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A740 endp



; Attributes: bp-based frame

sub_54A760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A830
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A760 endp



; Attributes: bp-based frame

sub_54A780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A844
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A780 endp



; Attributes: bp-based frame

sub_54A7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A858
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A7A0 endp



; Attributes: bp-based frame

sub_54A7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A86C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A7C0 endp



; Attributes: bp-based frame

sub_54A7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A880
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A7E0 endp



; Attributes: bp-based frame

sub_54A800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A894
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A800 endp



; Attributes: bp-based frame

sub_54A820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A8A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A820 endp



; Attributes: bp-based frame

sub_54A840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A8BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A840 endp



; Attributes: bp-based frame

sub_54A860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A8D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A860 endp



; Attributes: bp-based frame

sub_54A880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A8E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A880 endp



; Attributes: bp-based frame

sub_54A8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A8F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A8A0 endp



; Attributes: bp-based frame

sub_54A8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A90C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A8C0 endp



; Attributes: bp-based frame

sub_54A8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A920
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A8E0 endp



; Attributes: bp-based frame

sub_54A900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A934
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A900 endp



; Attributes: bp-based frame

sub_54A920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A948
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A920 endp



; Attributes: bp-based frame

sub_54A940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A95C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A940 endp



; Attributes: bp-based frame

sub_54A960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A970
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A960 endp



; Attributes: bp-based frame

sub_54A980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A984
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A980 endp



; Attributes: bp-based frame

sub_54A9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A998
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A9A0 endp



; Attributes: bp-based frame

sub_54A9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A9AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A9C0 endp



; Attributes: bp-based frame

sub_54A9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A9C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54A9E0 endp



; Attributes: bp-based frame

sub_54AA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A9D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AA00 endp



; Attributes: bp-based frame

sub_54AA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A9E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AA20 endp



; Attributes: bp-based frame

sub_54AA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159A9FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AA40 endp



; Attributes: bp-based frame

sub_54AA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AA60 endp



; Attributes: bp-based frame

sub_54AA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AA80 endp



; Attributes: bp-based frame

sub_54AAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AAA0 endp



; Attributes: bp-based frame

sub_54AAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AAC0 endp



; Attributes: bp-based frame

sub_54AAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AAE0 endp



; Attributes: bp-based frame

sub_54AB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AB00 endp



; Attributes: bp-based frame

sub_54AB20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AB20 endp



; Attributes: bp-based frame

sub_54AB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AA9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AB40 endp



; Attributes: bp-based frame

sub_54AB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AAB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AB60 endp



; Attributes: bp-based frame

sub_54AB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AAC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AB80 endp



; Attributes: bp-based frame

sub_54ABA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AAD8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ABA0 endp



; Attributes: bp-based frame

sub_54ABC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AAEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ABC0 endp



; Attributes: bp-based frame

sub_54ABE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ABE0 endp



; Attributes: bp-based frame

sub_54AC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AC00 endp



; Attributes: bp-based frame

sub_54AC20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AC20 endp



; Attributes: bp-based frame

sub_54AC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AC40 endp



; Attributes: bp-based frame

sub_54AC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AC60 endp



; Attributes: bp-based frame

sub_54AC80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AC80 endp



; Attributes: bp-based frame

sub_54ACA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ACA0 endp



; Attributes: bp-based frame

sub_54ACC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AB8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ACC0 endp



; Attributes: bp-based frame

sub_54ACE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ABA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ACE0 endp



; Attributes: bp-based frame

sub_54AD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ABB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AD00 endp



; Attributes: bp-based frame

sub_54AD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ABC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AD20 endp



; Attributes: bp-based frame

sub_54AD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ABDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AD40 endp



; Attributes: bp-based frame

sub_54AD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ABF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AD60 endp



; Attributes: bp-based frame

sub_54AD80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AD80 endp



; Attributes: bp-based frame

sub_54ADA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ADA0 endp



; Attributes: bp-based frame

sub_54ADC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ADC0 endp



; Attributes: bp-based frame

sub_54ADE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ADE0 endp



; Attributes: bp-based frame

sub_54AE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AE00 endp



; Attributes: bp-based frame

sub_54AE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AE20 endp



; Attributes: bp-based frame

sub_54AE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AE40 endp



; Attributes: bp-based frame

sub_54AE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AC90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AE60 endp



; Attributes: bp-based frame

sub_54AE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ACA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AE80 endp



; Attributes: bp-based frame

sub_54AEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ACB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AEA0 endp



; Attributes: bp-based frame

sub_54AEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ACCC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AEC0 endp



; Attributes: bp-based frame

sub_54AEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ACE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AEE0 endp



; Attributes: bp-based frame

sub_54AF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ACF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AF00 endp



; Attributes: bp-based frame

sub_54AF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AF20 endp



; Attributes: bp-based frame

sub_54AF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AF40 endp



; Attributes: bp-based frame

sub_54AF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AF60 endp



; Attributes: bp-based frame

sub_54AF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AF80 endp



; Attributes: bp-based frame

sub_54AFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AFA0 endp



; Attributes: bp-based frame

sub_54AFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AFC0 endp



; Attributes: bp-based frame

sub_54AFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54AFE0 endp



; Attributes: bp-based frame

sub_54B000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AD94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B000 endp



; Attributes: bp-based frame

sub_54B020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ADA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B020 endp



; Attributes: bp-based frame

sub_54B040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ADBC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B040 endp



; Attributes: bp-based frame

sub_54B060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ADD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B060 endp



; Attributes: bp-based frame

sub_54B080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ADE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B080 endp



; Attributes: bp-based frame

sub_54B0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ADF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B0A0 endp



; Attributes: bp-based frame

sub_54B0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B0C0 endp



; Attributes: bp-based frame

sub_54B0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B0E0 endp



; Attributes: bp-based frame

sub_54B100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B100 endp



; Attributes: bp-based frame

sub_54B120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B120 endp



; Attributes: bp-based frame

sub_54B140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B140 endp



; Attributes: bp-based frame

sub_54B160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B160 endp



; Attributes: bp-based frame

sub_54B180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B180 endp



; Attributes: bp-based frame

sub_54B1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AE98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B1A0 endp



; Attributes: bp-based frame

sub_54B1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AEAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B1C0 endp



; Attributes: bp-based frame

sub_54B1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AEC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B1E0 endp



; Attributes: bp-based frame

sub_54B200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AED4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B200 endp



; Attributes: bp-based frame

sub_54B220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AEE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B220 endp



; Attributes: bp-based frame

sub_54B240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AEFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B240 endp



; Attributes: bp-based frame

sub_54B260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B260 endp



; Attributes: bp-based frame

sub_54B280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B280 endp



; Attributes: bp-based frame

sub_54B2A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B2A0 endp



; Attributes: bp-based frame

sub_54B2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B2C0 endp



; Attributes: bp-based frame

sub_54B2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B2E0 endp



; Attributes: bp-based frame

sub_54B300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B300 endp



; Attributes: bp-based frame

sub_54B320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B320 endp



; Attributes: bp-based frame

sub_54B340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AF9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B340 endp



; Attributes: bp-based frame

sub_54B360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AFB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B360 endp



; Attributes: bp-based frame

sub_54B380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AFC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B380 endp



; Attributes: bp-based frame

sub_54B3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AFD8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B3A0 endp



; Attributes: bp-based frame

sub_54B3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159AFEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B3C0 endp



; Attributes: bp-based frame

sub_54B3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B000
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B3E0 endp



; Attributes: bp-based frame

sub_54B400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B014
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B400 endp



; Attributes: bp-based frame

sub_54B420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B028
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B420 endp



; Attributes: bp-based frame

sub_54B440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B03C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B440 endp



; Attributes: bp-based frame

sub_54B460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B050
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B460 endp



; Attributes: bp-based frame

sub_54B480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B064
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B480 endp



; Attributes: bp-based frame

sub_54B4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B078
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B4A0 endp



; Attributes: bp-based frame

sub_54B4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B08C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B4C0 endp



; Attributes: bp-based frame

sub_54B4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B0A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B4E0 endp



; Attributes: bp-based frame

sub_54B500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B0B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B500 endp



; Attributes: bp-based frame

sub_54B520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B0C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B520 endp



; Attributes: bp-based frame

sub_54B540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B0DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B540 endp



; Attributes: bp-based frame

sub_54B560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B0F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B560 endp



; Attributes: bp-based frame

sub_54B580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B104
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B580 endp



; Attributes: bp-based frame

sub_54B5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B118
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B5A0 endp



; Attributes: bp-based frame

sub_54B5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B12C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B5C0 endp



; Attributes: bp-based frame

sub_54B5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B140
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B5E0 endp



; Attributes: bp-based frame

sub_54B600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B154
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B600 endp



; Attributes: bp-based frame

sub_54B620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B168
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B620 endp



; Attributes: bp-based frame

sub_54B640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B17C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B640 endp



; Attributes: bp-based frame

sub_54B660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B190
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B660 endp



; Attributes: bp-based frame

sub_54B680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B1A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B680 endp



; Attributes: bp-based frame

sub_54B6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B1B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B6A0 endp



; Attributes: bp-based frame

sub_54B6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B1CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B6C0 endp



; Attributes: bp-based frame

sub_54B6E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B1E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B6E0 endp



; Attributes: bp-based frame

sub_54B700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B1F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B700 endp



; Attributes: bp-based frame

sub_54B720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B208
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B720 endp



; Attributes: bp-based frame

sub_54B740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B21C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B740 endp



; Attributes: bp-based frame

sub_54B760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B230
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B760 endp



; Attributes: bp-based frame

sub_54B780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B244
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B780 endp



; Attributes: bp-based frame

sub_54B7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B258
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B7A0 endp



; Attributes: bp-based frame

sub_54B7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B26C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B7C0 endp



; Attributes: bp-based frame

sub_54B7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B280
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B7E0 endp



; Attributes: bp-based frame

sub_54B800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B294
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B800 endp



; Attributes: bp-based frame

sub_54B820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B2A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B820 endp



; Attributes: bp-based frame

sub_54B840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B2BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B840 endp



; Attributes: bp-based frame

sub_54B860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B2D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B860 endp



; Attributes: bp-based frame

sub_54B880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B2E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B880 endp



; Attributes: bp-based frame

sub_54B8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B2F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B8A0 endp



; Attributes: bp-based frame

sub_54B8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B30C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B8C0 endp



; Attributes: bp-based frame

sub_54B8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B320
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B8E0 endp



; Attributes: bp-based frame

sub_54B900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B334
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B900 endp



; Attributes: bp-based frame

sub_54B920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B348
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B920 endp



; Attributes: bp-based frame

sub_54B940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B35C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B940 endp



; Attributes: bp-based frame

sub_54B960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B370
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B960 endp



; Attributes: bp-based frame

sub_54B980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B384
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B980 endp



; Attributes: bp-based frame

sub_54B9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B398
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B9A0 endp



; Attributes: bp-based frame

sub_54B9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B3AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B9C0 endp



; Attributes: bp-based frame

sub_54B9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B3C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54B9E0 endp



; Attributes: bp-based frame

sub_54BA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B3D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BA00 endp



; Attributes: bp-based frame

sub_54BA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B3E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BA20 endp



; Attributes: bp-based frame

sub_54BA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B3FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BA40 endp



; Attributes: bp-based frame

sub_54BA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B410
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BA60 endp



; Attributes: bp-based frame

sub_54BA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B424
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BA80 endp



; Attributes: bp-based frame

sub_54BAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B438
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BAA0 endp



; Attributes: bp-based frame

sub_54BAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B44C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BAC0 endp



; Attributes: bp-based frame

sub_54BAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B460
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BAE0 endp



; Attributes: bp-based frame

sub_54BB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B474
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BB00 endp



; Attributes: bp-based frame

sub_54BB20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B488
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BB20 endp



; Attributes: bp-based frame

sub_54BB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B49C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BB40 endp



; Attributes: bp-based frame

sub_54BB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B4B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BB60 endp



; Attributes: bp-based frame

sub_54BB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B4C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BB80 endp



; Attributes: bp-based frame

sub_54BBA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B4D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BBA0 endp



; Attributes: bp-based frame

sub_54BBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B4EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BBC0 endp



; Attributes: bp-based frame

sub_54BBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B500
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BBE0 endp



; Attributes: bp-based frame

sub_54BC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B514
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BC00 endp



; Attributes: bp-based frame

sub_54BC20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B528
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BC20 endp



; Attributes: bp-based frame

sub_54BC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B53C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BC40 endp



; Attributes: bp-based frame

sub_54BC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B550
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BC60 endp



; Attributes: bp-based frame

sub_54BC80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B564
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BC80 endp



; Attributes: bp-based frame

sub_54BCA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B578
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BCA0 endp



; Attributes: bp-based frame

sub_54BCC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B58C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BCC0 endp



; Attributes: bp-based frame

sub_54BCE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B5A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BCE0 endp



; Attributes: bp-based frame

sub_54BD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B5B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BD00 endp



; Attributes: bp-based frame

sub_54BD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B5C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BD20 endp



; Attributes: bp-based frame

sub_54BD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B5DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BD40 endp



; Attributes: bp-based frame

sub_54BD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B5F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BD60 endp



; Attributes: bp-based frame

sub_54BD80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B604
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BD80 endp



; Attributes: bp-based frame

sub_54BDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B618
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BDA0 endp



; Attributes: bp-based frame

sub_54BDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B62C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BDC0 endp



; Attributes: bp-based frame

sub_54BDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B640
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BDE0 endp



; Attributes: bp-based frame

sub_54BE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B654
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BE00 endp



; Attributes: bp-based frame

sub_54BE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B668
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BE20 endp



; Attributes: bp-based frame

sub_54BE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B67C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BE40 endp



; Attributes: bp-based frame

sub_54BE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B690
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BE60 endp



; Attributes: bp-based frame

sub_54BE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B6A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BE80 endp



; Attributes: bp-based frame

sub_54BEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B6B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BEA0 endp



; Attributes: bp-based frame

sub_54BEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B6CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BEC0 endp



; Attributes: bp-based frame

sub_54BEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B6E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BEE0 endp



; Attributes: bp-based frame

sub_54BF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B6F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BF00 endp



; Attributes: bp-based frame

sub_54BF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B708
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BF20 endp



; Attributes: bp-based frame

sub_54BF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B71C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BF40 endp



; Attributes: bp-based frame

sub_54BF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B730
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BF60 endp



; Attributes: bp-based frame

sub_54BF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B744
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BF80 endp



; Attributes: bp-based frame

sub_54BFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B758
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BFA0 endp



; Attributes: bp-based frame

sub_54BFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B76C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BFC0 endp



; Attributes: bp-based frame

sub_54BFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B780
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54BFE0 endp



; Attributes: bp-based frame

sub_54C000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B794
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C000 endp



; Attributes: bp-based frame

sub_54C020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B7A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C020 endp



; Attributes: bp-based frame

sub_54C040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B7BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C040 endp



; Attributes: bp-based frame

sub_54C060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B7D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C060 endp



; Attributes: bp-based frame

sub_54C080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B7E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C080 endp



; Attributes: bp-based frame

sub_54C0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B7F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C0A0 endp



; Attributes: bp-based frame

sub_54C0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B80C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C0C0 endp



; Attributes: bp-based frame

sub_54C0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B820
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C0E0 endp



; Attributes: bp-based frame

sub_54C100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B834
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C100 endp



; Attributes: bp-based frame

sub_54C120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B848
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C120 endp



; Attributes: bp-based frame

sub_54C140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B85C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C140 endp



; Attributes: bp-based frame

sub_54C160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B870
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C160 endp



; Attributes: bp-based frame

sub_54C180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B884
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C180 endp



; Attributes: bp-based frame

sub_54C1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B898
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C1A0 endp



; Attributes: bp-based frame

sub_54C1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B8AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C1C0 endp



; Attributes: bp-based frame

sub_54C1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B8C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C1E0 endp



; Attributes: bp-based frame

sub_54C200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B8D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C200 endp



; Attributes: bp-based frame

sub_54C220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B8E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C220 endp



; Attributes: bp-based frame

sub_54C240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B8FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C240 endp



; Attributes: bp-based frame

sub_54C260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B910
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C260 endp



; Attributes: bp-based frame

sub_54C280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B924
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C280 endp



; Attributes: bp-based frame

sub_54C2A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B938
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C2A0 endp



; Attributes: bp-based frame

sub_54C2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B94C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C2C0 endp



; Attributes: bp-based frame

sub_54C2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B960
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C2E0 endp



; Attributes: bp-based frame

sub_54C300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B974
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C300 endp



; Attributes: bp-based frame

sub_54C320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B988
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C320 endp



; Attributes: bp-based frame

sub_54C340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B99C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C340 endp



; Attributes: bp-based frame

sub_54C360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B9B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C360 endp



; Attributes: bp-based frame

sub_54C380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B9C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C380 endp



; Attributes: bp-based frame

sub_54C3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B9D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C3A0 endp



; Attributes: bp-based frame

sub_54C3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159B9EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C3C0 endp



; Attributes: bp-based frame

sub_54C3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C3E0 endp



; Attributes: bp-based frame

sub_54C400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C400 endp



; Attributes: bp-based frame

sub_54C420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C420 endp



; Attributes: bp-based frame

sub_54C440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C440 endp



; Attributes: bp-based frame

sub_54C460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C460 endp



; Attributes: bp-based frame

sub_54C480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C480 endp



; Attributes: bp-based frame

sub_54C4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C4A0 endp



; Attributes: bp-based frame

sub_54C4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BA8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C4C0 endp



; Attributes: bp-based frame

sub_54C4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BAA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C4E0 endp



; Attributes: bp-based frame

sub_54C500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BAB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C500 endp



; Attributes: bp-based frame

sub_54C520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BAC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C520 endp



; Attributes: bp-based frame

sub_54C540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BADC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C540 endp



; Attributes: bp-based frame

sub_54C560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BAF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C560 endp



; Attributes: bp-based frame

sub_54C580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C580 endp



; Attributes: bp-based frame

sub_54C5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C5A0 endp



; Attributes: bp-based frame

sub_54C5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C5C0 endp



; Attributes: bp-based frame

sub_54C5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C5E0 endp



; Attributes: bp-based frame

sub_54C600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C600 endp



; Attributes: bp-based frame

sub_54C620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C620 endp



; Attributes: bp-based frame

sub_54C640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C640 endp



; Attributes: bp-based frame

sub_54C660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BB90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C660 endp



; Attributes: bp-based frame

sub_54C680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BBA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C680 endp



; Attributes: bp-based frame

sub_54C6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BBB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C6A0 endp



; Attributes: bp-based frame

sub_54C6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BBCC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C6C0 endp



; Attributes: bp-based frame

sub_54C6E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BBE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C6E0 endp



; Attributes: bp-based frame

sub_54C700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BBF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C700 endp



; Attributes: bp-based frame

sub_54C720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C720 endp



; Attributes: bp-based frame

sub_54C740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C740 endp



; Attributes: bp-based frame

sub_54C760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C760 endp



; Attributes: bp-based frame

sub_54C780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C780 endp



; Attributes: bp-based frame

sub_54C7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C7A0 endp



; Attributes: bp-based frame

sub_54C7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C7C0 endp



; Attributes: bp-based frame

sub_54C7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C7E0 endp



; Attributes: bp-based frame

sub_54C800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BC94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C800 endp



; Attributes: bp-based frame

sub_54C820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BCA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C820 endp



; Attributes: bp-based frame

sub_54C840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BCBC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C840 endp



; Attributes: bp-based frame

sub_54C860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BCD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C860 endp



; Attributes: bp-based frame

sub_54C880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BCE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C880 endp



; Attributes: bp-based frame

sub_54C8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BCF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C8A0 endp



; Attributes: bp-based frame

sub_54C8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C8C0 endp



; Attributes: bp-based frame

sub_54C8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C8E0 endp



; Attributes: bp-based frame

sub_54C900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C900 endp



; Attributes: bp-based frame

sub_54C920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C920 endp



; Attributes: bp-based frame

sub_54C940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C940 endp



; Attributes: bp-based frame

sub_54C960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C960 endp



; Attributes: bp-based frame

sub_54C980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C980 endp



; Attributes: bp-based frame

sub_54C9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BD98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C9A0 endp



; Attributes: bp-based frame

sub_54C9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BDAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C9C0 endp



; Attributes: bp-based frame

sub_54C9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BDC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54C9E0 endp



; Attributes: bp-based frame

sub_54CA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BDD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CA00 endp



; Attributes: bp-based frame

sub_54CA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BDE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CA20 endp



; Attributes: bp-based frame

sub_54CA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BDFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CA40 endp



; Attributes: bp-based frame

sub_54CA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CA60 endp



; Attributes: bp-based frame

sub_54CA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CA80 endp



; Attributes: bp-based frame

sub_54CAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CAA0 endp



; Attributes: bp-based frame

sub_54CAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CAC0 endp



; Attributes: bp-based frame

sub_54CAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CAE0 endp



; Attributes: bp-based frame

sub_54CB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CB00 endp



; Attributes: bp-based frame

sub_54CB20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CB20 endp



; Attributes: bp-based frame

sub_54CB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BE9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CB40 endp



; Attributes: bp-based frame

sub_54CB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BEB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CB60 endp



; Attributes: bp-based frame

sub_54CB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BEC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CB80 endp



; Attributes: bp-based frame

sub_54CBA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BED8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CBA0 endp



; Attributes: bp-based frame

sub_54CBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BEEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CBC0 endp



; Attributes: bp-based frame

sub_54CBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CBE0 endp



; Attributes: bp-based frame

sub_54CC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CC00 endp



; Attributes: bp-based frame

sub_54CC20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CC20 endp



; Attributes: bp-based frame

sub_54CC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CC40 endp



; Attributes: bp-based frame

sub_54CC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CC60 endp



; Attributes: bp-based frame

sub_54CC80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CC80 endp



; Attributes: bp-based frame

sub_54CCA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CCA0 endp



; Attributes: bp-based frame

sub_54CCC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BF8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CCC0 endp



; Attributes: bp-based frame

sub_54CCE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BFA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CCE0 endp



; Attributes: bp-based frame

sub_54CD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BFB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CD00 endp



; Attributes: bp-based frame

sub_54CD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BFC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CD20 endp



; Attributes: bp-based frame

sub_54CD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BFDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CD40 endp



; Attributes: bp-based frame

sub_54CD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159BFF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CD60 endp



; Attributes: bp-based frame

sub_54CD80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C004
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CD80 endp



; Attributes: bp-based frame

sub_54CDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C018
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CDA0 endp



; Attributes: bp-based frame

sub_54CDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C02C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CDC0 endp



; Attributes: bp-based frame

sub_54CDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C040
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CDE0 endp



; Attributes: bp-based frame

sub_54CE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C054
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CE00 endp



; Attributes: bp-based frame

sub_54CE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C068
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CE20 endp



; Attributes: bp-based frame

sub_54CE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C07C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CE40 endp



; Attributes: bp-based frame

sub_54CE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C090
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CE60 endp



; Attributes: bp-based frame

sub_54CE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C0A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CE80 endp



; Attributes: bp-based frame

sub_54CEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C0B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CEA0 endp



; Attributes: bp-based frame

sub_54CEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C0CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CEC0 endp



; Attributes: bp-based frame

sub_54CEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C0E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CEE0 endp



; Attributes: bp-based frame

sub_54CF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C0F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CF00 endp



; Attributes: bp-based frame

sub_54CF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C108
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CF20 endp



; Attributes: bp-based frame

sub_54CF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C11C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CF40 endp



; Attributes: bp-based frame

sub_54CF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C130
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CF60 endp



; Attributes: bp-based frame

sub_54CF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C144
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CF80 endp



; Attributes: bp-based frame

sub_54CFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C158
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CFA0 endp



; Attributes: bp-based frame

sub_54CFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C16C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CFC0 endp



; Attributes: bp-based frame

sub_54CFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C180
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54CFE0 endp



; Attributes: bp-based frame

sub_54D000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C194
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D000 endp



; Attributes: bp-based frame

sub_54D020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C1A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D020 endp



; Attributes: bp-based frame

sub_54D040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C1BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D040 endp



; Attributes: bp-based frame

sub_54D060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C1D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D060 endp



; Attributes: bp-based frame

sub_54D080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C1E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D080 endp



; Attributes: bp-based frame

sub_54D0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C1F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D0A0 endp



; Attributes: bp-based frame

sub_54D0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C20C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D0C0 endp



; Attributes: bp-based frame

sub_54D0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C220
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D0E0 endp



; Attributes: bp-based frame

sub_54D100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C234
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D100 endp



; Attributes: bp-based frame

sub_54D120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C248
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D120 endp



; Attributes: bp-based frame

sub_54D140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C25C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D140 endp



; Attributes: bp-based frame

sub_54D160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C270
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D160 endp



; Attributes: bp-based frame

sub_54D180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C284
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D180 endp



; Attributes: bp-based frame

sub_54D1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C298
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D1A0 endp



; Attributes: bp-based frame

sub_54D1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C2AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D1C0 endp



; Attributes: bp-based frame

sub_54D1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C2C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D1E0 endp



; Attributes: bp-based frame

sub_54D200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C2D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D200 endp



; Attributes: bp-based frame

sub_54D220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C2E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D220 endp



; Attributes: bp-based frame

sub_54D240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C2FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D240 endp



; Attributes: bp-based frame

sub_54D260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C310
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D260 endp



; Attributes: bp-based frame

sub_54D280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C324
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D280 endp



; Attributes: bp-based frame

sub_54D2A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C338
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D2A0 endp



; Attributes: bp-based frame

sub_54D2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C34C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D2C0 endp



; Attributes: bp-based frame

sub_54D2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C360
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D2E0 endp



; Attributes: bp-based frame

sub_54D300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C374
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D300 endp



; Attributes: bp-based frame

sub_54D320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C388
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D320 endp



; Attributes: bp-based frame

sub_54D340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C39C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D340 endp



; Attributes: bp-based frame

sub_54D360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C3B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D360 endp



; Attributes: bp-based frame

sub_54D380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C3C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D380 endp



; Attributes: bp-based frame

sub_54D3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C3D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D3A0 endp



; Attributes: bp-based frame

sub_54D3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C3EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D3C0 endp



; Attributes: bp-based frame

sub_54D3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D3E0 endp



; Attributes: bp-based frame

sub_54D400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C414
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D400 endp



; Attributes: bp-based frame

sub_54D420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C428
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D420 endp



; Attributes: bp-based frame

sub_54D440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C43C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D440 endp



; Attributes: bp-based frame

sub_54D460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C450
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D460 endp



; Attributes: bp-based frame

sub_54D480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C464
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D480 endp



; Attributes: bp-based frame

sub_54D4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C478
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D4A0 endp



; Attributes: bp-based frame

sub_54D4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C48C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D4C0 endp



; Attributes: bp-based frame

sub_54D4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C4A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D4E0 endp



; Attributes: bp-based frame

sub_54D500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C4B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D500 endp



; Attributes: bp-based frame

sub_54D520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C4C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D520 endp



; Attributes: bp-based frame

sub_54D540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C4DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D540 endp



; Attributes: bp-based frame

sub_54D560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C4F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D560 endp



; Attributes: bp-based frame

sub_54D580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C504
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D580 endp



; Attributes: bp-based frame

sub_54D5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C518
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D5A0 endp



; Attributes: bp-based frame

sub_54D5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C52C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D5C0 endp



; Attributes: bp-based frame

sub_54D5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C540
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D5E0 endp



; Attributes: bp-based frame

sub_54D600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C554
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D600 endp



; Attributes: bp-based frame

sub_54D620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C568
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D620 endp



; Attributes: bp-based frame

sub_54D640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C57C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D640 endp



; Attributes: bp-based frame

sub_54D660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C590
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D660 endp



; Attributes: bp-based frame

sub_54D680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C5A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D680 endp



; Attributes: bp-based frame

sub_54D6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C5B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D6A0 endp



; Attributes: bp-based frame

sub_54D6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C5CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D6C0 endp



; Attributes: bp-based frame

sub_54D6E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C5E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D6E0 endp



; Attributes: bp-based frame

sub_54D700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C5F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D700 endp



; Attributes: bp-based frame

sub_54D720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C608
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D720 endp



; Attributes: bp-based frame

sub_54D740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C61C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D740 endp



; Attributes: bp-based frame

sub_54D760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C630
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D760 endp



; Attributes: bp-based frame

sub_54D780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C644
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D780 endp



; Attributes: bp-based frame

sub_54D7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C658
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D7A0 endp



; Attributes: bp-based frame

sub_54D7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C66C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D7C0 endp



; Attributes: bp-based frame

sub_54D7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C680
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D7E0 endp



; Attributes: bp-based frame

sub_54D800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C694
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D800 endp



; Attributes: bp-based frame

sub_54D820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C6A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D820 endp



; Attributes: bp-based frame

sub_54D840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C6BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D840 endp



; Attributes: bp-based frame

sub_54D860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C6D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D860 endp



; Attributes: bp-based frame

sub_54D880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C6E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D880 endp



; Attributes: bp-based frame

sub_54D8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C6F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D8A0 endp



; Attributes: bp-based frame

sub_54D8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C70C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D8C0 endp



; Attributes: bp-based frame

sub_54D8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C720
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D8E0 endp



; Attributes: bp-based frame

sub_54D900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C734
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D900 endp



; Attributes: bp-based frame

sub_54D920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C748
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D920 endp



; Attributes: bp-based frame

sub_54D940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C75C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D940 endp



; Attributes: bp-based frame

sub_54D960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C770
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D960 endp



; Attributes: bp-based frame

sub_54D980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C784
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D980 endp



; Attributes: bp-based frame

sub_54D9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C798
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D9A0 endp



; Attributes: bp-based frame

sub_54D9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C7AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D9C0 endp



; Attributes: bp-based frame

sub_54D9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C7C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54D9E0 endp



; Attributes: bp-based frame

sub_54DA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C7D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DA00 endp



; Attributes: bp-based frame

sub_54DA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C7E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DA20 endp



; Attributes: bp-based frame

sub_54DA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C7FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DA40 endp



; Attributes: bp-based frame

sub_54DA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C810
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DA60 endp



; Attributes: bp-based frame

sub_54DA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C824
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DA80 endp



; Attributes: bp-based frame

sub_54DAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C838
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DAA0 endp



; Attributes: bp-based frame

sub_54DAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C84C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DAC0 endp



; Attributes: bp-based frame

sub_54DAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C860
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DAE0 endp



; Attributes: bp-based frame

sub_54DB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C874
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DB00 endp



; Attributes: bp-based frame

sub_54DB20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C888
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DB20 endp



; Attributes: bp-based frame

sub_54DB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C89C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DB40 endp



; Attributes: bp-based frame

sub_54DB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C8B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DB60 endp



; Attributes: bp-based frame

sub_54DB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C8C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DB80 endp



; Attributes: bp-based frame

sub_54DBA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C8D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DBA0 endp



; Attributes: bp-based frame

sub_54DBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C8EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DBC0 endp



; Attributes: bp-based frame

sub_54DBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C900
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DBE0 endp



; Attributes: bp-based frame

sub_54DC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C914
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DC00 endp



; Attributes: bp-based frame

sub_54DC20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C928
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DC20 endp



; Attributes: bp-based frame

sub_54DC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C93C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DC40 endp



; Attributes: bp-based frame

sub_54DC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C950
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DC60 endp



; Attributes: bp-based frame

sub_54DC80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C964
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DC80 endp



; Attributes: bp-based frame

sub_54DCA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C978
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DCA0 endp



; Attributes: bp-based frame

sub_54DCC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C98C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DCC0 endp



; Attributes: bp-based frame

sub_54DCE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C9A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DCE0 endp



; Attributes: bp-based frame

sub_54DD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C9B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DD00 endp



; Attributes: bp-based frame

sub_54DD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C9C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DD20 endp



; Attributes: bp-based frame

sub_54DD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C9DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DD40 endp



; Attributes: bp-based frame

sub_54DD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159C9F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DD60 endp



; Attributes: bp-based frame

sub_54DD80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DD80 endp



; Attributes: bp-based frame

sub_54DDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DDA0 endp



; Attributes: bp-based frame

sub_54DDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DDC0 endp



; Attributes: bp-based frame

sub_54DDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DDE0 endp



; Attributes: bp-based frame

sub_54DE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DE00 endp



; Attributes: bp-based frame

sub_54DE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DE20 endp



; Attributes: bp-based frame

sub_54DE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DE40 endp



; Attributes: bp-based frame

sub_54DE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CA90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DE60 endp



; Attributes: bp-based frame

sub_54DE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CAA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DE80 endp



; Attributes: bp-based frame

sub_54DEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CAB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DEA0 endp



; Attributes: bp-based frame

sub_54DEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CACC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DEC0 endp



; Attributes: bp-based frame

sub_54DEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CAE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DEE0 endp



; Attributes: bp-based frame

sub_54DF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CAF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DF00 endp



; Attributes: bp-based frame

sub_54DF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DF20 endp



; Attributes: bp-based frame

sub_54DF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DF40 endp



; Attributes: bp-based frame

sub_54DF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DF60 endp



; Attributes: bp-based frame

sub_54DF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DF80 endp



; Attributes: bp-based frame

sub_54DFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DFA0 endp



; Attributes: bp-based frame

sub_54DFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DFC0 endp



; Attributes: bp-based frame

sub_54DFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54DFE0 endp



; Attributes: bp-based frame

sub_54E000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CB94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E000 endp



; Attributes: bp-based frame

sub_54E020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CBA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E020 endp



; Attributes: bp-based frame

sub_54E040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CBBC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E040 endp



; Attributes: bp-based frame

sub_54E060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CBD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E060 endp



; Attributes: bp-based frame

sub_54E080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CBE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E080 endp



; Attributes: bp-based frame

sub_54E0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CBF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E0A0 endp



; Attributes: bp-based frame

sub_54E0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E0C0 endp



; Attributes: bp-based frame

sub_54E0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E0E0 endp



; Attributes: bp-based frame

sub_54E100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E100 endp



; Attributes: bp-based frame

sub_54E120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E120 endp



; Attributes: bp-based frame

sub_54E140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E140 endp



; Attributes: bp-based frame

sub_54E160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E160 endp



; Attributes: bp-based frame

sub_54E180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E180 endp



; Attributes: bp-based frame

sub_54E1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CC98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E1A0 endp



; Attributes: bp-based frame

sub_54E1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CCAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E1C0 endp



; Attributes: bp-based frame

sub_54E1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CCC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E1E0 endp



; Attributes: bp-based frame

sub_54E200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CCD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E200 endp



; Attributes: bp-based frame

sub_54E220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CCE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E220 endp



; Attributes: bp-based frame

sub_54E240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CCFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E240 endp



; Attributes: bp-based frame

sub_54E260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E260 endp



; Attributes: bp-based frame

sub_54E280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E280 endp



; Attributes: bp-based frame

sub_54E2A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E2A0 endp



; Attributes: bp-based frame

sub_54E2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E2C0 endp



; Attributes: bp-based frame

sub_54E2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E2E0 endp



; Attributes: bp-based frame

sub_54E300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E300 endp



; Attributes: bp-based frame

sub_54E320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E320 endp



; Attributes: bp-based frame

sub_54E340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CD9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E340 endp



; Attributes: bp-based frame

sub_54E360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CDB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E360 endp



; Attributes: bp-based frame

sub_54E380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CDC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E380 endp



; Attributes: bp-based frame

sub_54E3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CDD8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E3A0 endp



; Attributes: bp-based frame

sub_54E3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CDEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E3C0 endp



; Attributes: bp-based frame

sub_54E3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E3E0 endp



; Attributes: bp-based frame

sub_54E400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E400 endp



; Attributes: bp-based frame

sub_54E420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E420 endp



; Attributes: bp-based frame

sub_54E440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E440 endp



; Attributes: bp-based frame

sub_54E460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E460 endp



; Attributes: bp-based frame

sub_54E480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E480 endp



; Attributes: bp-based frame

sub_54E4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E4A0 endp



; Attributes: bp-based frame

sub_54E4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CE8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E4C0 endp



; Attributes: bp-based frame

sub_54E4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CEA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E4E0 endp



; Attributes: bp-based frame

sub_54E500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CEB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E500 endp



; Attributes: bp-based frame

sub_54E520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CEC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E520 endp



; Attributes: bp-based frame

sub_54E540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CEDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E540 endp



; Attributes: bp-based frame

sub_54E560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CEF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E560 endp



; Attributes: bp-based frame

sub_54E580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E580 endp



; Attributes: bp-based frame

sub_54E5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E5A0 endp



; Attributes: bp-based frame

sub_54E5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E5C0 endp



; Attributes: bp-based frame

sub_54E5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E5E0 endp



; Attributes: bp-based frame

sub_54E600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E600 endp



; Attributes: bp-based frame

sub_54E620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E620 endp



; Attributes: bp-based frame

sub_54E640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E640 endp



; Attributes: bp-based frame

sub_54E660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CF90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E660 endp



; Attributes: bp-based frame

sub_54E680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CFA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E680 endp



; Attributes: bp-based frame

sub_54E6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CFB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E6A0 endp



; Attributes: bp-based frame

sub_54E6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CFCC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E6C0 endp



; Attributes: bp-based frame

sub_54E6E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CFE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E6E0 endp



; Attributes: bp-based frame

sub_54E700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159CFF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E700 endp



; Attributes: bp-based frame

sub_54E720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D008
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E720 endp



; Attributes: bp-based frame

sub_54E740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D01C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E740 endp



; Attributes: bp-based frame

sub_54E760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D030
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E760 endp



; Attributes: bp-based frame

sub_54E780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D044
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E780 endp



; Attributes: bp-based frame

sub_54E7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D058
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E7A0 endp



; Attributes: bp-based frame

sub_54E7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D06C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E7C0 endp



; Attributes: bp-based frame

sub_54E7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D080
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E7E0 endp



; Attributes: bp-based frame

sub_54E800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D094
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E800 endp



; Attributes: bp-based frame

sub_54E820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D0A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E820 endp



; Attributes: bp-based frame

sub_54E840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D0BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E840 endp



; Attributes: bp-based frame

sub_54E860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D0D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E860 endp



; Attributes: bp-based frame

sub_54E880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D0E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E880 endp



; Attributes: bp-based frame

sub_54E8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D0F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E8A0 endp



; Attributes: bp-based frame

sub_54E8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D10C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E8C0 endp



; Attributes: bp-based frame

sub_54E8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D120
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E8E0 endp



; Attributes: bp-based frame

sub_54E900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D134
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E900 endp



; Attributes: bp-based frame

sub_54E920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D148
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E920 endp



; Attributes: bp-based frame

sub_54E940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D15C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E940 endp



; Attributes: bp-based frame

sub_54E960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D170
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E960 endp



; Attributes: bp-based frame

sub_54E980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D184
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E980 endp



; Attributes: bp-based frame

sub_54E9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D198
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E9A0 endp



; Attributes: bp-based frame

sub_54E9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D1AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E9C0 endp



; Attributes: bp-based frame

sub_54E9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D1C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54E9E0 endp



; Attributes: bp-based frame

sub_54EA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D1D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EA00 endp



; Attributes: bp-based frame

sub_54EA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D1E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EA20 endp



; Attributes: bp-based frame

sub_54EA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D1FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EA40 endp



; Attributes: bp-based frame

sub_54EA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D210
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EA60 endp



; Attributes: bp-based frame

sub_54EA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D224
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EA80 endp



; Attributes: bp-based frame

sub_54EAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D238
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EAA0 endp



; Attributes: bp-based frame

sub_54EAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D24C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EAC0 endp



; Attributes: bp-based frame

sub_54EAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D260
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EAE0 endp



; Attributes: bp-based frame

sub_54EB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D274
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EB00 endp



; Attributes: bp-based frame

sub_54EB20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D288
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EB20 endp



; Attributes: bp-based frame

sub_54EB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D29C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EB40 endp



; Attributes: bp-based frame

sub_54EB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D2B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EB60 endp



; Attributes: bp-based frame

sub_54EB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D2C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EB80 endp



; Attributes: bp-based frame

sub_54EBA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D2D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EBA0 endp



; Attributes: bp-based frame

sub_54EBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D2EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EBC0 endp



; Attributes: bp-based frame

sub_54EBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D300
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EBE0 endp



; Attributes: bp-based frame

sub_54EC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D314
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EC00 endp



; Attributes: bp-based frame

sub_54EC20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D328
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EC20 endp



; Attributes: bp-based frame

sub_54EC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D33C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EC40 endp



; Attributes: bp-based frame

sub_54EC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D350
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EC60 endp



; Attributes: bp-based frame

sub_54EC80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D364
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EC80 endp



; Attributes: bp-based frame

sub_54ECA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D378
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ECA0 endp



; Attributes: bp-based frame

sub_54ECC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D38C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ECC0 endp



; Attributes: bp-based frame

sub_54ECE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D3A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ECE0 endp



; Attributes: bp-based frame

sub_54ED00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D3B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ED00 endp



; Attributes: bp-based frame

sub_54ED20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D3C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ED20 endp



; Attributes: bp-based frame

sub_54ED40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D3DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ED40 endp



; Attributes: bp-based frame

sub_54ED60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D3F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ED60 endp



; Attributes: bp-based frame

sub_54ED80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D404
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54ED80 endp



; Attributes: bp-based frame

sub_54EDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D418
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EDA0 endp



; Attributes: bp-based frame

sub_54EDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D42C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EDC0 endp



; Attributes: bp-based frame

sub_54EDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D440
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EDE0 endp



; Attributes: bp-based frame

sub_54EE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D454
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EE00 endp



; Attributes: bp-based frame

sub_54EE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D468
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EE20 endp



; Attributes: bp-based frame

sub_54EE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D47C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EE40 endp



; Attributes: bp-based frame

sub_54EE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D490
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EE60 endp



; Attributes: bp-based frame

sub_54EE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D4A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EE80 endp



; Attributes: bp-based frame

sub_54EEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D4B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EEA0 endp



; Attributes: bp-based frame

sub_54EEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D4CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EEC0 endp



; Attributes: bp-based frame

sub_54EEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D4E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EEE0 endp



; Attributes: bp-based frame

sub_54EF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D4F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EF00 endp



; Attributes: bp-based frame

sub_54EF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D508
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EF20 endp



; Attributes: bp-based frame

sub_54EF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D51C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EF40 endp



; Attributes: bp-based frame

sub_54EF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D530
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EF60 endp



; Attributes: bp-based frame

sub_54EF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D544
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EF80 endp



; Attributes: bp-based frame

sub_54EFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D558
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EFA0 endp



; Attributes: bp-based frame

sub_54EFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D56C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EFC0 endp



; Attributes: bp-based frame

sub_54EFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D580
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54EFE0 endp



; Attributes: bp-based frame

sub_54F000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D594
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F000 endp



; Attributes: bp-based frame

sub_54F020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D5A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F020 endp



; Attributes: bp-based frame

sub_54F040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D5BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F040 endp



; Attributes: bp-based frame

sub_54F060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D5D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F060 endp



; Attributes: bp-based frame

sub_54F080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D5E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F080 endp



; Attributes: bp-based frame

sub_54F0A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D5F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F0A0 endp



; Attributes: bp-based frame

sub_54F0C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D60C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F0C0 endp



; Attributes: bp-based frame

sub_54F0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D620
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F0E0 endp



; Attributes: bp-based frame

sub_54F100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D634
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F100 endp



; Attributes: bp-based frame

sub_54F120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D648
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F120 endp



; Attributes: bp-based frame

sub_54F140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D65C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F140 endp



; Attributes: bp-based frame

sub_54F160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D670
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F160 endp



; Attributes: bp-based frame

sub_54F180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D684
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F180 endp



; Attributes: bp-based frame

sub_54F1A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D698
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F1A0 endp



; Attributes: bp-based frame

sub_54F1C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D6AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F1C0 endp



; Attributes: bp-based frame

sub_54F1E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D6C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F1E0 endp



; Attributes: bp-based frame

sub_54F200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D6D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F200 endp



; Attributes: bp-based frame

sub_54F220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D6E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F220 endp



; Attributes: bp-based frame

sub_54F240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D6FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F240 endp



; Attributes: bp-based frame

sub_54F260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D710
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F260 endp



; Attributes: bp-based frame

sub_54F280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D724
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F280 endp



; Attributes: bp-based frame

sub_54F2A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D738
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F2A0 endp



; Attributes: bp-based frame

sub_54F2C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D74C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F2C0 endp



; Attributes: bp-based frame

sub_54F2E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D760
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F2E0 endp



; Attributes: bp-based frame

sub_54F300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D774
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F300 endp



; Attributes: bp-based frame

sub_54F320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D788
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F320 endp



; Attributes: bp-based frame

sub_54F340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D79C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F340 endp



; Attributes: bp-based frame

sub_54F360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D7B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F360 endp



; Attributes: bp-based frame

sub_54F380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D7C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F380 endp



; Attributes: bp-based frame

sub_54F3A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D7D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F3A0 endp



; Attributes: bp-based frame

sub_54F3C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D7EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F3C0 endp



; Attributes: bp-based frame

sub_54F3E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D800
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F3E0 endp



; Attributes: bp-based frame

sub_54F400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D814
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F400 endp



; Attributes: bp-based frame

sub_54F420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D828
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F420 endp



; Attributes: bp-based frame

sub_54F440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D83C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F440 endp



; Attributes: bp-based frame

sub_54F460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D850
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F460 endp



; Attributes: bp-based frame

sub_54F480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D864
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F480 endp



; Attributes: bp-based frame

sub_54F4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D878
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F4A0 endp



; Attributes: bp-based frame

sub_54F4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D88C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F4C0 endp



; Attributes: bp-based frame

sub_54F4E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D8A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F4E0 endp



; Attributes: bp-based frame

sub_54F500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D8B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F500 endp



; Attributes: bp-based frame

sub_54F520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D8C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F520 endp



; Attributes: bp-based frame

sub_54F540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D8DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F540 endp



; Attributes: bp-based frame

sub_54F560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D8F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F560 endp



; Attributes: bp-based frame

sub_54F580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D904
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F580 endp



; Attributes: bp-based frame

sub_54F5A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D918
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F5A0 endp



; Attributes: bp-based frame

sub_54F5C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D92C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F5C0 endp



; Attributes: bp-based frame

sub_54F5E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D940
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F5E0 endp



; Attributes: bp-based frame

sub_54F600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D954
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F600 endp



; Attributes: bp-based frame

sub_54F620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D968
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F620 endp



; Attributes: bp-based frame

sub_54F640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D97C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F640 endp



; Attributes: bp-based frame

sub_54F660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D990
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F660 endp



; Attributes: bp-based frame

sub_54F680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D9A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F680 endp



; Attributes: bp-based frame

sub_54F6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D9B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F6A0 endp



; Attributes: bp-based frame

sub_54F6C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D9CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F6C0 endp



; Attributes: bp-based frame

sub_54F6E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D9E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F6E0 endp



; Attributes: bp-based frame

sub_54F700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159D9F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F700 endp



; Attributes: bp-based frame

sub_54F720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F720 endp



; Attributes: bp-based frame

sub_54F740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F740 endp



; Attributes: bp-based frame

sub_54F760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F760 endp



; Attributes: bp-based frame

sub_54F780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F780 endp



; Attributes: bp-based frame

sub_54F7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F7A0 endp



; Attributes: bp-based frame

sub_54F7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F7C0 endp



; Attributes: bp-based frame

sub_54F7E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F7E0 endp



; Attributes: bp-based frame

sub_54F800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DA94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F800 endp



; Attributes: bp-based frame

sub_54F820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DAA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F820 endp



; Attributes: bp-based frame

sub_54F840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DABC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F840 endp



; Attributes: bp-based frame

sub_54F860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DAD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F860 endp



; Attributes: bp-based frame

sub_54F880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DAE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F880 endp



; Attributes: bp-based frame

sub_54F8A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DAF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F8A0 endp



; Attributes: bp-based frame

sub_54F8C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F8C0 endp



; Attributes: bp-based frame

sub_54F8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F8E0 endp



; Attributes: bp-based frame

sub_54F900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F900 endp



; Attributes: bp-based frame

sub_54F920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F920 endp



; Attributes: bp-based frame

sub_54F940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F940 endp



; Attributes: bp-based frame

sub_54F960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F960 endp



; Attributes: bp-based frame

sub_54F980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F980 endp



; Attributes: bp-based frame

sub_54F9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DB98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F9A0 endp



; Attributes: bp-based frame

sub_54F9C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DBAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F9C0 endp



; Attributes: bp-based frame

sub_54F9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DBC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54F9E0 endp



; Attributes: bp-based frame

sub_54FA00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DBD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FA00 endp



; Attributes: bp-based frame

sub_54FA20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DBE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FA20 endp



; Attributes: bp-based frame

sub_54FA40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DBFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FA40 endp



; Attributes: bp-based frame

sub_54FA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FA60 endp



; Attributes: bp-based frame

sub_54FA80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FA80 endp



; Attributes: bp-based frame

sub_54FAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FAA0 endp



; Attributes: bp-based frame

sub_54FAC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FAC0 endp



; Attributes: bp-based frame

sub_54FAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FAE0 endp



; Attributes: bp-based frame

sub_54FB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FB00 endp



; Attributes: bp-based frame

sub_54FB20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FB20 endp



; Attributes: bp-based frame

sub_54FB40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DC9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FB40 endp



; Attributes: bp-based frame

sub_54FB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DCB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FB60 endp



; Attributes: bp-based frame

sub_54FB80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DCC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FB80 endp



; Attributes: bp-based frame

sub_54FBA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DCD8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FBA0 endp



; Attributes: bp-based frame

sub_54FBC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DCEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FBC0 endp



; Attributes: bp-based frame

sub_54FBE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FBE0 endp



; Attributes: bp-based frame

sub_54FC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FC00 endp



; Attributes: bp-based frame

sub_54FC20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FC20 endp



; Attributes: bp-based frame

sub_54FC40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FC40 endp



; Attributes: bp-based frame

sub_54FC60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FC60 endp



; Attributes: bp-based frame

sub_54FC80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FC80 endp



; Attributes: bp-based frame

sub_54FCA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FCA0 endp



; Attributes: bp-based frame

sub_54FCC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DD8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FCC0 endp



; Attributes: bp-based frame

sub_54FCE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DDA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FCE0 endp



; Attributes: bp-based frame

sub_54FD00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DDB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FD00 endp



; Attributes: bp-based frame

sub_54FD20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DDC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FD20 endp



; Attributes: bp-based frame

sub_54FD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DDDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FD40 endp



; Attributes: bp-based frame

sub_54FD60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DDF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FD60 endp



; Attributes: bp-based frame

sub_54FD80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FD80 endp



; Attributes: bp-based frame

sub_54FDA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FDA0 endp



; Attributes: bp-based frame

sub_54FDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FDC0 endp



; Attributes: bp-based frame

sub_54FDE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FDE0 endp



; Attributes: bp-based frame

sub_54FE00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FE00 endp



; Attributes: bp-based frame

sub_54FE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FE20 endp



; Attributes: bp-based frame

sub_54FE40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FE40 endp



; Attributes: bp-based frame

sub_54FE60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DE90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FE60 endp



; Attributes: bp-based frame

sub_54FE80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DEA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FE80 endp



; Attributes: bp-based frame

sub_54FEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DEB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FEA0 endp



; Attributes: bp-based frame

sub_54FEC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DECC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FEC0 endp



; Attributes: bp-based frame

sub_54FEE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DEE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FEE0 endp



; Attributes: bp-based frame

sub_54FF00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DEF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FF00 endp



; Attributes: bp-based frame

sub_54FF20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FF20 endp



; Attributes: bp-based frame

sub_54FF40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FF40 endp



; Attributes: bp-based frame

sub_54FF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FF60 endp



; Attributes: bp-based frame

sub_54FF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FF80 endp



; Attributes: bp-based frame

sub_54FFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FFA0 endp



; Attributes: bp-based frame

sub_54FFC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FFC0 endp



; Attributes: bp-based frame

sub_54FFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_54FFE0 endp



; Attributes: bp-based frame

sub_550000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DF94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550000 endp



; Attributes: bp-based frame

sub_550020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DFA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550020 endp



; Attributes: bp-based frame

sub_550040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DFBC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550040 endp



; Attributes: bp-based frame

sub_550060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DFD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550060 endp



; Attributes: bp-based frame

sub_550080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DFE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550080 endp



; Attributes: bp-based frame

sub_5500A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159DFF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5500A0 endp



; Attributes: bp-based frame

sub_5500C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E00C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5500C0 endp



; Attributes: bp-based frame

sub_5500E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E020
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5500E0 endp



; Attributes: bp-based frame

sub_550100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E034
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550100 endp



; Attributes: bp-based frame

sub_550120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E048
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550120 endp



; Attributes: bp-based frame

sub_550140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E05C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550140 endp



; Attributes: bp-based frame

sub_550160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E070
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550160 endp



; Attributes: bp-based frame

sub_550180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E084
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550180 endp



; Attributes: bp-based frame

sub_5501A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E098
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5501A0 endp



; Attributes: bp-based frame

sub_5501C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E0AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5501C0 endp



; Attributes: bp-based frame

sub_5501E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E0C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5501E0 endp



; Attributes: bp-based frame

sub_550200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E0D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550200 endp



; Attributes: bp-based frame

sub_550220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E0E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550220 endp



; Attributes: bp-based frame

sub_550240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E0FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550240 endp



; Attributes: bp-based frame

sub_550260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E110
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550260 endp



; Attributes: bp-based frame

sub_550280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E124
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550280 endp



; Attributes: bp-based frame

sub_5502A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E138
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5502A0 endp



; Attributes: bp-based frame

sub_5502C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E14C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5502C0 endp



; Attributes: bp-based frame

sub_5502E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E160
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5502E0 endp



; Attributes: bp-based frame

sub_550300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E174
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550300 endp



; Attributes: bp-based frame

sub_550320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E188
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550320 endp



; Attributes: bp-based frame

sub_550340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E19C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550340 endp



; Attributes: bp-based frame

sub_550360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E1B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550360 endp



; Attributes: bp-based frame

sub_550380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E1C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550380 endp



; Attributes: bp-based frame

sub_5503A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E1D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5503A0 endp



; Attributes: bp-based frame

sub_5503C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E1EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5503C0 endp



; Attributes: bp-based frame

sub_5503E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E200
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5503E0 endp



; Attributes: bp-based frame

sub_550400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E214
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550400 endp



; Attributes: bp-based frame

sub_550420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E228
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550420 endp



; Attributes: bp-based frame

sub_550440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E23C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550440 endp



; Attributes: bp-based frame

sub_550460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E250
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550460 endp



; Attributes: bp-based frame

sub_550480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E264
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550480 endp



; Attributes: bp-based frame

sub_5504A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E278
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5504A0 endp



; Attributes: bp-based frame

sub_5504C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E28C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5504C0 endp



; Attributes: bp-based frame

sub_5504E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E2A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5504E0 endp



; Attributes: bp-based frame

sub_550500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E2B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550500 endp



; Attributes: bp-based frame

sub_550520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E2C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550520 endp



; Attributes: bp-based frame

sub_550540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E2DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550540 endp



; Attributes: bp-based frame

sub_550560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E2F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550560 endp



; Attributes: bp-based frame

sub_550580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E304
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550580 endp



; Attributes: bp-based frame

sub_5505A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E318
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5505A0 endp



; Attributes: bp-based frame

sub_5505C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E32C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5505C0 endp



; Attributes: bp-based frame

sub_5505E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E340
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5505E0 endp



; Attributes: bp-based frame

sub_550600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E354
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550600 endp



; Attributes: bp-based frame

sub_550620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E368
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550620 endp



; Attributes: bp-based frame

sub_550640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E37C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550640 endp



; Attributes: bp-based frame

sub_550660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E390
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550660 endp



; Attributes: bp-based frame

sub_550680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E3A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550680 endp



; Attributes: bp-based frame

sub_5506A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E3B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5506A0 endp



; Attributes: bp-based frame

sub_5506C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E3CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5506C0 endp



; Attributes: bp-based frame

sub_5506E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E3E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5506E0 endp



; Attributes: bp-based frame

sub_550700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E3F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550700 endp



; Attributes: bp-based frame

sub_550720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E408
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550720 endp



; Attributes: bp-based frame

sub_550740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E41C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550740 endp



; Attributes: bp-based frame

sub_550760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E430
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550760 endp



; Attributes: bp-based frame

sub_550780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E444
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550780 endp



; Attributes: bp-based frame

sub_5507A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E458
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5507A0 endp



; Attributes: bp-based frame

sub_5507C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E46C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5507C0 endp



; Attributes: bp-based frame

sub_5507E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E480
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5507E0 endp



; Attributes: bp-based frame

sub_550800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E494
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550800 endp



; Attributes: bp-based frame

sub_550820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E4A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550820 endp



; Attributes: bp-based frame

sub_550840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E4BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550840 endp



; Attributes: bp-based frame

sub_550860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E4D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550860 endp



; Attributes: bp-based frame

sub_550880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E4E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550880 endp



; Attributes: bp-based frame

sub_5508A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E4F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5508A0 endp



; Attributes: bp-based frame

sub_5508C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E50C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5508C0 endp



; Attributes: bp-based frame

sub_5508E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E520
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5508E0 endp



; Attributes: bp-based frame

sub_550900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E534
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550900 endp



; Attributes: bp-based frame

sub_550920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E548
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550920 endp



; Attributes: bp-based frame

sub_550940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E55C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550940 endp



; Attributes: bp-based frame

sub_550960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E570
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550960 endp



; Attributes: bp-based frame

sub_550980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E584
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550980 endp



; Attributes: bp-based frame

sub_5509A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E598
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5509A0 endp



; Attributes: bp-based frame

sub_5509C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E5AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5509C0 endp



; Attributes: bp-based frame

sub_5509E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E5C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5509E0 endp



; Attributes: bp-based frame

sub_550A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E5D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550A00 endp



; Attributes: bp-based frame

sub_550A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E5E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550A20 endp



; Attributes: bp-based frame

sub_550A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E5FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550A40 endp



; Attributes: bp-based frame

sub_550A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E610
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550A60 endp



; Attributes: bp-based frame

sub_550A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E624
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550A80 endp



; Attributes: bp-based frame

sub_550AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E638
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550AA0 endp



; Attributes: bp-based frame

sub_550AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E64C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550AC0 endp



; Attributes: bp-based frame

sub_550AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E660
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550AE0 endp



; Attributes: bp-based frame

sub_550B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E674
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550B00 endp



; Attributes: bp-based frame

sub_550B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E688
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550B20 endp



; Attributes: bp-based frame

sub_550B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E69C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550B40 endp



; Attributes: bp-based frame

sub_550B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E6B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550B60 endp



; Attributes: bp-based frame

sub_550B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E6C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550B80 endp



; Attributes: bp-based frame

sub_550BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E6D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550BA0 endp



; Attributes: bp-based frame

sub_550BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E6EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550BC0 endp



; Attributes: bp-based frame

sub_550BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E700
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550BE0 endp



; Attributes: bp-based frame

sub_550C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E714
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550C00 endp



; Attributes: bp-based frame

sub_550C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E728
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550C20 endp



; Attributes: bp-based frame

sub_550C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E73C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550C40 endp



; Attributes: bp-based frame

sub_550C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E750
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550C60 endp



; Attributes: bp-based frame

sub_550C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E764
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550C80 endp



; Attributes: bp-based frame

sub_550CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E778
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550CA0 endp



; Attributes: bp-based frame

sub_550CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E78C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550CC0 endp



; Attributes: bp-based frame

sub_550CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E7A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550CE0 endp



; Attributes: bp-based frame

sub_550D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E7B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550D00 endp



; Attributes: bp-based frame

sub_550D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E7C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550D20 endp



; Attributes: bp-based frame

sub_550D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E7DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550D40 endp



; Attributes: bp-based frame

sub_550D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E7F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550D60 endp



; Attributes: bp-based frame

sub_550D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E804
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550D80 endp



; Attributes: bp-based frame

sub_550DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E818
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550DA0 endp



; Attributes: bp-based frame

sub_550DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E82C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550DC0 endp



; Attributes: bp-based frame

sub_550DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E840
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550DE0 endp



; Attributes: bp-based frame

sub_550E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E854
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550E00 endp



; Attributes: bp-based frame

sub_550E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E868
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550E20 endp



; Attributes: bp-based frame

sub_550E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E87C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550E40 endp



; Attributes: bp-based frame

sub_550E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E890
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550E60 endp



; Attributes: bp-based frame

sub_550E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E8A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550E80 endp



; Attributes: bp-based frame

sub_550EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E8B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550EA0 endp



; Attributes: bp-based frame

sub_550EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E8CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550EC0 endp



; Attributes: bp-based frame

sub_550EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E8E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550EE0 endp



; Attributes: bp-based frame

sub_550F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E8F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550F00 endp



; Attributes: bp-based frame

sub_550F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E908
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550F20 endp



; Attributes: bp-based frame

sub_550F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E91C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550F40 endp



; Attributes: bp-based frame

sub_550F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E930
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550F60 endp



; Attributes: bp-based frame

sub_550F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E944
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550F80 endp



; Attributes: bp-based frame

sub_550FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E958
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550FA0 endp



; Attributes: bp-based frame

sub_550FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E96C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550FC0 endp



; Attributes: bp-based frame

sub_550FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E980
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_550FE0 endp



; Attributes: bp-based frame

sub_551000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E994
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551000 endp



; Attributes: bp-based frame

sub_551020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E9A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551020 endp



; Attributes: bp-based frame

sub_551040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E9BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551040 endp



; Attributes: bp-based frame

sub_551060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E9D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551060 endp



; Attributes: bp-based frame

sub_551080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E9E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551080 endp



; Attributes: bp-based frame

sub_5510A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159E9F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5510A0 endp



; Attributes: bp-based frame

sub_5510C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5510C0 endp



; Attributes: bp-based frame

sub_5510E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5510E0 endp



; Attributes: bp-based frame

sub_551100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551100 endp



; Attributes: bp-based frame

sub_551120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551120 endp



; Attributes: bp-based frame

sub_551140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551140 endp



; Attributes: bp-based frame

sub_551160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551160 endp



; Attributes: bp-based frame

sub_551180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551180 endp



; Attributes: bp-based frame

sub_5511A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EA98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5511A0 endp



; Attributes: bp-based frame

sub_5511C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EAAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5511C0 endp



; Attributes: bp-based frame

sub_5511E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EAC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5511E0 endp



; Attributes: bp-based frame

sub_551200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EAD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551200 endp



; Attributes: bp-based frame

sub_551220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EAE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551220 endp



; Attributes: bp-based frame

sub_551240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EAFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551240 endp



; Attributes: bp-based frame

sub_551260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551260 endp



; Attributes: bp-based frame

sub_551280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551280 endp



; Attributes: bp-based frame

sub_5512A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5512A0 endp



; Attributes: bp-based frame

sub_5512C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5512C0 endp



; Attributes: bp-based frame

sub_5512E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5512E0 endp



; Attributes: bp-based frame

sub_551300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551300 endp



; Attributes: bp-based frame

sub_551320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551320 endp



; Attributes: bp-based frame

sub_551340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EB9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551340 endp



; Attributes: bp-based frame

sub_551360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EBB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551360 endp



; Attributes: bp-based frame

sub_551380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EBC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551380 endp



; Attributes: bp-based frame

sub_5513A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EBD8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5513A0 endp



; Attributes: bp-based frame

sub_5513C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EBEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5513C0 endp



; Attributes: bp-based frame

sub_5513E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5513E0 endp



; Attributes: bp-based frame

sub_551400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551400 endp



; Attributes: bp-based frame

sub_551420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551420 endp



; Attributes: bp-based frame

sub_551440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551440 endp



; Attributes: bp-based frame

sub_551460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551460 endp



; Attributes: bp-based frame

sub_551480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551480 endp



; Attributes: bp-based frame

sub_5514A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5514A0 endp



; Attributes: bp-based frame

sub_5514C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EC8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5514C0 endp



; Attributes: bp-based frame

sub_5514E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ECA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5514E0 endp



; Attributes: bp-based frame

sub_551500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ECB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551500 endp



; Attributes: bp-based frame

sub_551520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ECC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551520 endp



; Attributes: bp-based frame

sub_551540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ECDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551540 endp



; Attributes: bp-based frame

sub_551560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ECF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551560 endp



; Attributes: bp-based frame

sub_551580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551580 endp



; Attributes: bp-based frame

sub_5515A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5515A0 endp



; Attributes: bp-based frame

sub_5515C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5515C0 endp



; Attributes: bp-based frame

sub_5515E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5515E0 endp



; Attributes: bp-based frame

sub_551600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551600 endp



; Attributes: bp-based frame

sub_551620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551620 endp



; Attributes: bp-based frame

sub_551640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551640 endp



; Attributes: bp-based frame

sub_551660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159ED90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551660 endp



; Attributes: bp-based frame

sub_551680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EDA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551680 endp



; Attributes: bp-based frame

sub_5516A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EDB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5516A0 endp



; Attributes: bp-based frame

sub_5516C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EDCC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5516C0 endp



; Attributes: bp-based frame

sub_5516E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EDE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5516E0 endp



; Attributes: bp-based frame

sub_551700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_159EDF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551700 endp



; Attributes: bp-based frame

sub_551720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D15C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551720 endp



; Attributes: bp-based frame

sub_551740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D170
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551740 endp



; Attributes: bp-based frame

sub_551760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D184
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551760 endp



; Attributes: bp-based frame

sub_551780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D198
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551780 endp



; Attributes: bp-based frame

sub_5517A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D1AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5517A0 endp



; Attributes: bp-based frame

sub_5517C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D1C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5517C0 endp



; Attributes: bp-based frame

sub_5517E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D1D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5517E0 endp



; Attributes: bp-based frame

sub_551800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D1E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551800 endp



; Attributes: bp-based frame

sub_551820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D1FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551820 endp



; Attributes: bp-based frame

sub_551840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D210
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551840 endp



; Attributes: bp-based frame

sub_551860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D224
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551860 endp



; Attributes: bp-based frame

sub_551880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D238
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551880 endp



; Attributes: bp-based frame

sub_5518A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D24C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5518A0 endp



; Attributes: bp-based frame

sub_5518C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D260
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5518C0 endp



; Attributes: bp-based frame

sub_5518E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D274
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5518E0 endp



; Attributes: bp-based frame

sub_551900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D288
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551900 endp



; Attributes: bp-based frame

sub_551920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D29C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551920 endp



; Attributes: bp-based frame

sub_551940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D2B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551940 endp



; Attributes: bp-based frame

sub_551960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D2C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551960 endp



; Attributes: bp-based frame

sub_551980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D2D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551980 endp



; Attributes: bp-based frame

sub_5519A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D2EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5519A0 endp



; Attributes: bp-based frame

sub_5519C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D300
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5519C0 endp



; Attributes: bp-based frame

sub_5519E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D314
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5519E0 endp



; Attributes: bp-based frame

sub_551A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D328
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551A00 endp



; Attributes: bp-based frame

sub_551A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D33C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551A20 endp



; Attributes: bp-based frame

sub_551A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D350
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551A40 endp



; Attributes: bp-based frame

sub_551A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D364
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551A60 endp



; Attributes: bp-based frame

sub_551A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D378
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551A80 endp



; Attributes: bp-based frame

sub_551AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D38C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551AA0 endp



; Attributes: bp-based frame

sub_551AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D3A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551AC0 endp



; Attributes: bp-based frame

sub_551AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D3B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551AE0 endp



; Attributes: bp-based frame

sub_551B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D3C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551B00 endp



; Attributes: bp-based frame

sub_551B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D3DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551B20 endp



; Attributes: bp-based frame

sub_551B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D3F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551B40 endp



; Attributes: bp-based frame

sub_551B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D404
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551B60 endp



; Attributes: bp-based frame

sub_551B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D418
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551B80 endp



; Attributes: bp-based frame

sub_551BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D42C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551BA0 endp



; Attributes: bp-based frame

sub_551BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D440
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551BC0 endp



; Attributes: bp-based frame

sub_551BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D454
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551BE0 endp



; Attributes: bp-based frame

sub_551C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D468
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551C00 endp



; Attributes: bp-based frame

sub_551C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D47C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551C20 endp



; Attributes: bp-based frame

sub_551C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D490
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551C40 endp



; Attributes: bp-based frame

sub_551C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D4A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551C60 endp



; Attributes: bp-based frame

sub_551C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D4B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551C80 endp



; Attributes: bp-based frame

sub_551CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D4CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551CA0 endp



; Attributes: bp-based frame

sub_551CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D4E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551CC0 endp



; Attributes: bp-based frame

sub_551CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D4F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551CE0 endp



; Attributes: bp-based frame

sub_551D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D508
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551D00 endp



; Attributes: bp-based frame

sub_551D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D51C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551D20 endp



; Attributes: bp-based frame

sub_551D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D530
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551D40 endp



; Attributes: bp-based frame

sub_551D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D544
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551D60 endp



; Attributes: bp-based frame

sub_551D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D558
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551D80 endp



; Attributes: bp-based frame

sub_551DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D56C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551DA0 endp



; Attributes: bp-based frame

sub_551DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D580
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551DC0 endp



; Attributes: bp-based frame

sub_551DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D594
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551DE0 endp



; Attributes: bp-based frame

sub_551E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D5A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551E00 endp



; Attributes: bp-based frame

sub_551E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D5BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551E20 endp



; Attributes: bp-based frame

sub_551E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D5D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551E40 endp



; Attributes: bp-based frame

sub_551E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D5E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551E60 endp



; Attributes: bp-based frame

sub_551E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D5F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551E80 endp



; Attributes: bp-based frame

sub_551EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D60C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551EA0 endp



; Attributes: bp-based frame

sub_551EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D620
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551EC0 endp



; Attributes: bp-based frame

sub_551EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D634
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551EE0 endp



; Attributes: bp-based frame

sub_551F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D648
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551F00 endp



; Attributes: bp-based frame

sub_551F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D65C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551F20 endp



; Attributes: bp-based frame

sub_551F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D670
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551F40 endp



; Attributes: bp-based frame

sub_551F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D684
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551F60 endp



; Attributes: bp-based frame

sub_551F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D698
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551F80 endp



; Attributes: bp-based frame

sub_551FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D6AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551FA0 endp



; Attributes: bp-based frame

sub_551FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D6C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551FC0 endp



; Attributes: bp-based frame

sub_551FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D6D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_551FE0 endp



; Attributes: bp-based frame

sub_552000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D6E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552000 endp



; Attributes: bp-based frame

sub_552020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D6FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552020 endp



; Attributes: bp-based frame

sub_552040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D710
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552040 endp



; Attributes: bp-based frame

sub_552060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D724
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552060 endp



; Attributes: bp-based frame

sub_552080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D738
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552080 endp



; Attributes: bp-based frame

sub_5520A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D74C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5520A0 endp



; Attributes: bp-based frame

sub_5520C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D760
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5520C0 endp



; Attributes: bp-based frame

sub_5520E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D774
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5520E0 endp



; Attributes: bp-based frame

sub_552100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D788
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552100 endp



; Attributes: bp-based frame

sub_552120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D79C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552120 endp



; Attributes: bp-based frame

sub_552140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D7B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552140 endp



; Attributes: bp-based frame

sub_552160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D7C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552160 endp



; Attributes: bp-based frame

sub_552180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D7D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552180 endp



; Attributes: bp-based frame

sub_5521A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D7EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5521A0 endp



; Attributes: bp-based frame

sub_5521C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D800
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5521C0 endp



; Attributes: bp-based frame

sub_5521E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D814
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5521E0 endp



; Attributes: bp-based frame

sub_552200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D828
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552200 endp



; Attributes: bp-based frame

sub_552220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D83C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552220 endp



; Attributes: bp-based frame

sub_552240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D850
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552240 endp



; Attributes: bp-based frame

sub_552260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D864
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552260 endp



; Attributes: bp-based frame

sub_552280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D878
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552280 endp



; Attributes: bp-based frame

sub_5522A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D88C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5522A0 endp



; Attributes: bp-based frame

sub_5522C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D8A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5522C0 endp



; Attributes: bp-based frame

sub_5522E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D8B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5522E0 endp



; Attributes: bp-based frame

sub_552300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D8C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552300 endp



; Attributes: bp-based frame

sub_552320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D8DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552320 endp



; Attributes: bp-based frame

sub_552340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D8F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552340 endp



; Attributes: bp-based frame

sub_552360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D904
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552360 endp



; Attributes: bp-based frame

sub_552380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D918
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552380 endp



; Attributes: bp-based frame

sub_5523A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D92C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5523A0 endp



; Attributes: bp-based frame

sub_5523C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D940
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5523C0 endp



; Attributes: bp-based frame

sub_5523E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D954
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5523E0 endp



; Attributes: bp-based frame

sub_552400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D968
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552400 endp



; Attributes: bp-based frame

sub_552420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D97C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552420 endp



; Attributes: bp-based frame

sub_552440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D990
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552440 endp



; Attributes: bp-based frame

sub_552460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D9A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552460 endp



; Attributes: bp-based frame

sub_552480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D9B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552480 endp



; Attributes: bp-based frame

sub_5524A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D9CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5524A0 endp



; Attributes: bp-based frame

sub_5524C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D9E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5524C0 endp



; Attributes: bp-based frame

sub_5524E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D9F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5524E0 endp



; Attributes: bp-based frame

sub_552500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552500 endp



; Attributes: bp-based frame

sub_552520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552520 endp



; Attributes: bp-based frame

sub_552540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552540 endp



; Attributes: bp-based frame

sub_552560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552560 endp



; Attributes: bp-based frame

sub_552580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552580 endp



; Attributes: bp-based frame

sub_5525A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5525A0 endp



; Attributes: bp-based frame

sub_5525C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5525C0 endp



; Attributes: bp-based frame

sub_5525E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DA94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5525E0 endp



; Attributes: bp-based frame

sub_552600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DAA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552600 endp



; Attributes: bp-based frame

sub_552620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DABC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552620 endp



; Attributes: bp-based frame

sub_552640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DAD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552640 endp



; Attributes: bp-based frame

sub_552660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DAE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552660 endp



; Attributes: bp-based frame

sub_552680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DAF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552680 endp



; Attributes: bp-based frame

sub_5526A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5526A0 endp



; Attributes: bp-based frame

sub_5526C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5526C0 endp



; Attributes: bp-based frame

sub_5526E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5526E0 endp



; Attributes: bp-based frame

sub_552700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552700 endp



; Attributes: bp-based frame

sub_552720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552720 endp



; Attributes: bp-based frame

sub_552740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552740 endp



; Attributes: bp-based frame

sub_552760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552760 endp



; Attributes: bp-based frame

sub_552780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DB98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552780 endp



; Attributes: bp-based frame

sub_5527A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DBAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5527A0 endp



; Attributes: bp-based frame

sub_5527C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DBC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5527C0 endp



; Attributes: bp-based frame

sub_5527E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DBD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5527E0 endp



; Attributes: bp-based frame

sub_552800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DBE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552800 endp



; Attributes: bp-based frame

sub_552820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DBFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552820 endp



; Attributes: bp-based frame

sub_552840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552840 endp



; Attributes: bp-based frame

sub_552860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552860 endp



; Attributes: bp-based frame

sub_552880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552880 endp



; Attributes: bp-based frame

sub_5528A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5528A0 endp



; Attributes: bp-based frame

sub_5528C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5528C0 endp



; Attributes: bp-based frame

sub_5528E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5528E0 endp



; Attributes: bp-based frame

sub_552900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552900 endp



; Attributes: bp-based frame

sub_552920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DC9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552920 endp



; Attributes: bp-based frame

sub_552940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DCB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552940 endp



; Attributes: bp-based frame

sub_552960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DCC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552960 endp



; Attributes: bp-based frame

sub_552980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DCD8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552980 endp



; Attributes: bp-based frame

sub_5529A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DCEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5529A0 endp



; Attributes: bp-based frame

sub_5529C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5529C0 endp



; Attributes: bp-based frame

sub_5529E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5529E0 endp



; Attributes: bp-based frame

sub_552A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552A00 endp



; Attributes: bp-based frame

sub_552A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552A20 endp



; Attributes: bp-based frame

sub_552A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552A40 endp



; Attributes: bp-based frame

sub_552A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552A60 endp



; Attributes: bp-based frame

sub_552A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552A80 endp



; Attributes: bp-based frame

sub_552AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DD8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552AA0 endp



; Attributes: bp-based frame

sub_552AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DDA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552AC0 endp



; Attributes: bp-based frame

sub_552AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DDB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552AE0 endp



; Attributes: bp-based frame

sub_552B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DDC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552B00 endp



; Attributes: bp-based frame

sub_552B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DDDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552B20 endp



; Attributes: bp-based frame

sub_552B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DDF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552B40 endp



; Attributes: bp-based frame

sub_552B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552B60 endp



; Attributes: bp-based frame

sub_552B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552B80 endp



; Attributes: bp-based frame

sub_552BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552BA0 endp



; Attributes: bp-based frame

sub_552BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552BC0 endp



; Attributes: bp-based frame

sub_552BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552BE0 endp



; Attributes: bp-based frame

sub_552C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552C00 endp



; Attributes: bp-based frame

sub_552C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552C20 endp



; Attributes: bp-based frame

sub_552C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DE90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552C40 endp



; Attributes: bp-based frame

sub_552C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DEA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552C60 endp



; Attributes: bp-based frame

sub_552C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DEB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552C80 endp



; Attributes: bp-based frame

sub_552CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DECC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552CA0 endp



; Attributes: bp-based frame

sub_552CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DEE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552CC0 endp



; Attributes: bp-based frame

sub_552CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DEF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552CE0 endp



; Attributes: bp-based frame

sub_552D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552D00 endp



; Attributes: bp-based frame

sub_552D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552D20 endp



; Attributes: bp-based frame

sub_552D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552D40 endp



; Attributes: bp-based frame

sub_552D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552D60 endp



; Attributes: bp-based frame

sub_552D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552D80 endp



; Attributes: bp-based frame

sub_552DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552DA0 endp



; Attributes: bp-based frame

sub_552DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552DC0 endp



; Attributes: bp-based frame

sub_552DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DF94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552DE0 endp



; Attributes: bp-based frame

sub_552E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DFA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552E00 endp



; Attributes: bp-based frame

sub_552E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DFBC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552E20 endp



; Attributes: bp-based frame

sub_552E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DFD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552E40 endp



; Attributes: bp-based frame

sub_552E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DFE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552E60 endp



; Attributes: bp-based frame

sub_552E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158DFF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552E80 endp



; Attributes: bp-based frame

sub_552EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E00C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552EA0 endp



; Attributes: bp-based frame

sub_552EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E020
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552EC0 endp



; Attributes: bp-based frame

sub_552EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E034
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552EE0 endp



; Attributes: bp-based frame

sub_552F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E048
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552F00 endp



; Attributes: bp-based frame

sub_552F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E05C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552F20 endp



; Attributes: bp-based frame

sub_552F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E070
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552F40 endp



; Attributes: bp-based frame

sub_552F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E084
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552F60 endp



; Attributes: bp-based frame

sub_552F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E098
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552F80 endp



; Attributes: bp-based frame

sub_552FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E0AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552FA0 endp



; Attributes: bp-based frame

sub_552FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E0C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552FC0 endp



; Attributes: bp-based frame

sub_552FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E0D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_552FE0 endp



; Attributes: bp-based frame

sub_553000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E0E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553000 endp



; Attributes: bp-based frame

sub_553020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E0FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553020 endp



; Attributes: bp-based frame

sub_553040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E110
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553040 endp



; Attributes: bp-based frame

sub_553060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E124
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553060 endp



; Attributes: bp-based frame

sub_553080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E138
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553080 endp



; Attributes: bp-based frame

sub_5530A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E14C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5530A0 endp



; Attributes: bp-based frame

sub_5530C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E160
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5530C0 endp



; Attributes: bp-based frame

sub_5530E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E174
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5530E0 endp



; Attributes: bp-based frame

sub_553100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E188
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553100 endp



; Attributes: bp-based frame

sub_553120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E19C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553120 endp



; Attributes: bp-based frame

sub_553140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E1B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553140 endp



; Attributes: bp-based frame

sub_553160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E1C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553160 endp



; Attributes: bp-based frame

sub_553180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E1D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553180 endp



; Attributes: bp-based frame

sub_5531A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E1EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5531A0 endp



; Attributes: bp-based frame

sub_5531C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E200
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5531C0 endp



; Attributes: bp-based frame

sub_5531E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E214
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5531E0 endp



; Attributes: bp-based frame

sub_553200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E228
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553200 endp



; Attributes: bp-based frame

sub_553220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E23C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553220 endp



; Attributes: bp-based frame

sub_553240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E250
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553240 endp



; Attributes: bp-based frame

sub_553260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E264
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553260 endp



; Attributes: bp-based frame

sub_553280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E278
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553280 endp



; Attributes: bp-based frame

sub_5532A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E28C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5532A0 endp



; Attributes: bp-based frame

sub_5532C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E2A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5532C0 endp



; Attributes: bp-based frame

sub_5532E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E2B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5532E0 endp



; Attributes: bp-based frame

sub_553300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E2C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553300 endp



; Attributes: bp-based frame

sub_553320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E2DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553320 endp



; Attributes: bp-based frame

sub_553340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E2F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553340 endp



; Attributes: bp-based frame

sub_553360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E304
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553360 endp



; Attributes: bp-based frame

sub_553380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E318
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553380 endp



; Attributes: bp-based frame

sub_5533A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E32C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5533A0 endp



; Attributes: bp-based frame

sub_5533C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E340
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5533C0 endp



; Attributes: bp-based frame

sub_5533E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E354
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5533E0 endp



; Attributes: bp-based frame

sub_553400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E368
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553400 endp



; Attributes: bp-based frame

sub_553420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E37C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553420 endp



; Attributes: bp-based frame

sub_553440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E390
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553440 endp



; Attributes: bp-based frame

sub_553460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E3A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553460 endp



; Attributes: bp-based frame

sub_553480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E3B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553480 endp



; Attributes: bp-based frame

sub_5534A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E3CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5534A0 endp



; Attributes: bp-based frame

sub_5534C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E3E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5534C0 endp



; Attributes: bp-based frame

sub_5534E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E3F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5534E0 endp



; Attributes: bp-based frame

sub_553500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E408
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553500 endp



; Attributes: bp-based frame

sub_553520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E41C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553520 endp



; Attributes: bp-based frame

sub_553540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E430
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553540 endp



; Attributes: bp-based frame

sub_553560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E444
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553560 endp



; Attributes: bp-based frame

sub_553580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E458
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553580 endp



; Attributes: bp-based frame

sub_5535A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E46C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5535A0 endp



; Attributes: bp-based frame

sub_5535C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E480
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5535C0 endp



; Attributes: bp-based frame

sub_5535E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E494
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5535E0 endp



; Attributes: bp-based frame

sub_553600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E4A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553600 endp



; Attributes: bp-based frame

sub_553620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E4BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553620 endp



; Attributes: bp-based frame

sub_553640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E4D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553640 endp



; Attributes: bp-based frame

sub_553660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E4E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553660 endp



; Attributes: bp-based frame

sub_553680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E4F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553680 endp



; Attributes: bp-based frame

sub_5536A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E50C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5536A0 endp



; Attributes: bp-based frame

sub_5536C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E520
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5536C0 endp



; Attributes: bp-based frame

sub_5536E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E534
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5536E0 endp



; Attributes: bp-based frame

sub_553700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E548
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553700 endp



; Attributes: bp-based frame

sub_553720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E55C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553720 endp



; Attributes: bp-based frame

sub_553740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E570
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553740 endp



; Attributes: bp-based frame

sub_553760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E584
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553760 endp



; Attributes: bp-based frame

sub_553780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E598
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553780 endp



; Attributes: bp-based frame

sub_5537A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E5AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5537A0 endp



; Attributes: bp-based frame

sub_5537C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E5C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5537C0 endp



; Attributes: bp-based frame

sub_5537E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E5D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5537E0 endp



; Attributes: bp-based frame

sub_553800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E5E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553800 endp



; Attributes: bp-based frame

sub_553820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E5FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553820 endp



; Attributes: bp-based frame

sub_553840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E610
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553840 endp



; Attributes: bp-based frame

sub_553860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E624
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553860 endp



; Attributes: bp-based frame

sub_553880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E638
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553880 endp



; Attributes: bp-based frame

sub_5538A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E64C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5538A0 endp



; Attributes: bp-based frame

sub_5538C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E660
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5538C0 endp



; Attributes: bp-based frame

sub_5538E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E674
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5538E0 endp



; Attributes: bp-based frame

sub_553900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E688
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553900 endp



; Attributes: bp-based frame

sub_553920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E69C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553920 endp



; Attributes: bp-based frame

sub_553940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E6B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553940 endp



; Attributes: bp-based frame

sub_553960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E6C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553960 endp



; Attributes: bp-based frame

sub_553980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E6D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553980 endp



; Attributes: bp-based frame

sub_5539A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E6EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5539A0 endp



; Attributes: bp-based frame

sub_5539C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E700
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5539C0 endp



; Attributes: bp-based frame

sub_5539E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E714
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5539E0 endp



; Attributes: bp-based frame

sub_553A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E728
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553A00 endp



; Attributes: bp-based frame

sub_553A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E73C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553A20 endp



; Attributes: bp-based frame

sub_553A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E750
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553A40 endp



; Attributes: bp-based frame

sub_553A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E764
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553A60 endp



; Attributes: bp-based frame

sub_553A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E778
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553A80 endp



; Attributes: bp-based frame

sub_553AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E78C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553AA0 endp



; Attributes: bp-based frame

sub_553AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E7A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553AC0 endp



; Attributes: bp-based frame

sub_553AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E7B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553AE0 endp



; Attributes: bp-based frame

sub_553B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E7C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553B00 endp



; Attributes: bp-based frame

sub_553B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E7DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553B20 endp



; Attributes: bp-based frame

sub_553B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E7F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553B40 endp



; Attributes: bp-based frame

sub_553B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E804
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553B60 endp



; Attributes: bp-based frame

sub_553B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E818
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553B80 endp



; Attributes: bp-based frame

sub_553BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E82C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553BA0 endp



; Attributes: bp-based frame

sub_553BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E840
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553BC0 endp



; Attributes: bp-based frame

sub_553BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E854
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553BE0 endp



; Attributes: bp-based frame

sub_553C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E868
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553C00 endp



; Attributes: bp-based frame

sub_553C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E87C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553C20 endp



; Attributes: bp-based frame

sub_553C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E890
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553C40 endp



; Attributes: bp-based frame

sub_553C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E8A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553C60 endp



; Attributes: bp-based frame

sub_553C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E8B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553C80 endp



; Attributes: bp-based frame

sub_553CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E8CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553CA0 endp



; Attributes: bp-based frame

sub_553CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E8E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553CC0 endp



; Attributes: bp-based frame

sub_553CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E8F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553CE0 endp



; Attributes: bp-based frame

sub_553D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E908
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553D00 endp



; Attributes: bp-based frame

sub_553D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E91C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553D20 endp



; Attributes: bp-based frame

sub_553D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E930
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553D40 endp



; Attributes: bp-based frame

sub_553D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E944
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553D60 endp



; Attributes: bp-based frame

sub_553D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E958
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553D80 endp



; Attributes: bp-based frame

sub_553DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E96C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553DA0 endp



; Attributes: bp-based frame

sub_553DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E980
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553DC0 endp



; Attributes: bp-based frame

sub_553DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E994
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553DE0 endp



; Attributes: bp-based frame

sub_553E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E9A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553E00 endp



; Attributes: bp-based frame

sub_553E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E9BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553E20 endp



; Attributes: bp-based frame

sub_553E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E9D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553E40 endp



; Attributes: bp-based frame

sub_553E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E9E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553E60 endp



; Attributes: bp-based frame

sub_553E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158E9F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553E80 endp



; Attributes: bp-based frame

sub_553EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553EA0 endp



; Attributes: bp-based frame

sub_553EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553EC0 endp



; Attributes: bp-based frame

sub_553EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553EE0 endp



; Attributes: bp-based frame

sub_553F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553F00 endp



; Attributes: bp-based frame

sub_553F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553F20 endp



; Attributes: bp-based frame

sub_553F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553F40 endp



; Attributes: bp-based frame

sub_553F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553F60 endp



; Attributes: bp-based frame

sub_553F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EA98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553F80 endp



; Attributes: bp-based frame

sub_553FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EAAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553FA0 endp



; Attributes: bp-based frame

sub_553FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EAC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553FC0 endp



; Attributes: bp-based frame

sub_553FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EAD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_553FE0 endp



; Attributes: bp-based frame

sub_554000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EAE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554000 endp



; Attributes: bp-based frame

sub_554020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EAFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554020 endp



; Attributes: bp-based frame

sub_554040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554040 endp



; Attributes: bp-based frame

sub_554060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB24
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554060 endp



; Attributes: bp-based frame

sub_554080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB38
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554080 endp



; Attributes: bp-based frame

sub_5540A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB4C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5540A0 endp



; Attributes: bp-based frame

sub_5540C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB60
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5540C0 endp



; Attributes: bp-based frame

sub_5540E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB74
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5540E0 endp



; Attributes: bp-based frame

sub_554100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB88
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554100 endp



; Attributes: bp-based frame

sub_554120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EB9C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554120 endp



; Attributes: bp-based frame

sub_554140 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EBB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554140 endp



; Attributes: bp-based frame

sub_554160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EBC4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554160 endp



; Attributes: bp-based frame

sub_554180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EBD8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554180 endp



; Attributes: bp-based frame

sub_5541A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EBEC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5541A0 endp



; Attributes: bp-based frame

sub_5541C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC00
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5541C0 endp



; Attributes: bp-based frame

sub_5541E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC14
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5541E0 endp



; Attributes: bp-based frame

sub_554200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC28
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554200 endp



; Attributes: bp-based frame

sub_554220 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC3C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554220 endp



; Attributes: bp-based frame

sub_554240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC50
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554240 endp



; Attributes: bp-based frame

sub_554260 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC64
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554260 endp



; Attributes: bp-based frame

sub_554280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC78
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554280 endp



; Attributes: bp-based frame

sub_5542A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EC8C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5542A0 endp



; Attributes: bp-based frame

sub_5542C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ECA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5542C0 endp



; Attributes: bp-based frame

sub_5542E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ECB4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5542E0 endp



; Attributes: bp-based frame

sub_554300 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ECC8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554300 endp



; Attributes: bp-based frame

sub_554320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ECDC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554320 endp



; Attributes: bp-based frame

sub_554340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ECF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554340 endp



; Attributes: bp-based frame

sub_554360 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED04
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554360 endp



; Attributes: bp-based frame

sub_554380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED18
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554380 endp



; Attributes: bp-based frame

sub_5543A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED2C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5543A0 endp



; Attributes: bp-based frame

sub_5543C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED40
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5543C0 endp



; Attributes: bp-based frame

sub_5543E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED54
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5543E0 endp



; Attributes: bp-based frame

sub_554400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED68
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554400 endp



; Attributes: bp-based frame

sub_554420 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED7C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554420 endp



; Attributes: bp-based frame

sub_554440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158ED90
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554440 endp



; Attributes: bp-based frame

sub_554460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EDA4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554460 endp



; Attributes: bp-based frame

sub_554480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EDB8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554480 endp



; Attributes: bp-based frame

sub_5544A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EDCC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5544A0 endp



; Attributes: bp-based frame

sub_5544C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EDE0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5544C0 endp



; Attributes: bp-based frame

sub_5544E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EDF4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5544E0 endp



; Attributes: bp-based frame

sub_554500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE08
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554500 endp



; Attributes: bp-based frame

sub_554520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE1C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554520 endp



; Attributes: bp-based frame

sub_554540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554540 endp



; Attributes: bp-based frame

sub_554560 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE44
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554560 endp



; Attributes: bp-based frame

sub_554580 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE58
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554580 endp



; Attributes: bp-based frame

sub_5545A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE6C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5545A0 endp



; Attributes: bp-based frame

sub_5545C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE80
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5545C0 endp



; Attributes: bp-based frame

sub_5545E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EE94
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5545E0 endp



; Attributes: bp-based frame

sub_554600 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EEA8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554600 endp



; Attributes: bp-based frame

sub_554620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EEBC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554620 endp



; Attributes: bp-based frame

sub_554640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EED0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554640 endp



; Attributes: bp-based frame

sub_554660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EEE4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554660 endp



; Attributes: bp-based frame

sub_554680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EEF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554680 endp



; Attributes: bp-based frame

sub_5546A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF0C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5546A0 endp



; Attributes: bp-based frame

sub_5546C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5546C0 endp



; Attributes: bp-based frame

sub_5546E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF34
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5546E0 endp



; Attributes: bp-based frame

sub_554700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF48
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554700 endp



; Attributes: bp-based frame

sub_554720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF5C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554720 endp



; Attributes: bp-based frame

sub_554740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF70
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554740 endp



; Attributes: bp-based frame

sub_554760 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF84
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554760 endp



; Attributes: bp-based frame

sub_554780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EF98
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554780 endp



; Attributes: bp-based frame

sub_5547A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EFAC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5547A0 endp



; Attributes: bp-based frame

sub_5547C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EFC0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5547C0 endp



; Attributes: bp-based frame

sub_5547E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EFD4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5547E0 endp



; Attributes: bp-based frame

sub_554800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EFE8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554800 endp



; Attributes: bp-based frame

sub_554820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158EFFC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554820 endp



; Attributes: bp-based frame

sub_554840 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F010
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554840 endp



; Attributes: bp-based frame

sub_554860 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F024
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554860 endp



; Attributes: bp-based frame

sub_554880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F038
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554880 endp



; Attributes: bp-based frame

sub_5548A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F04C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5548A0 endp



; Attributes: bp-based frame

sub_5548C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F060
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5548C0 endp



; Attributes: bp-based frame

sub_5548E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F074
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5548E0 endp



; Attributes: bp-based frame

sub_554900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F088
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554900 endp



; Attributes: bp-based frame

sub_554920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F09C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554920 endp



; Attributes: bp-based frame

sub_554940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F0B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554940 endp



; Attributes: bp-based frame

sub_554960 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F0C4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554960 endp



; Attributes: bp-based frame

sub_554980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F0D8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554980 endp



; Attributes: bp-based frame

sub_5549A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F0EC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5549A0 endp



; Attributes: bp-based frame

sub_5549C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F100
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5549C0 endp



; Attributes: bp-based frame

sub_5549E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F114
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5549E0 endp



; Attributes: bp-based frame

sub_554A00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F128
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554A00 endp



; Attributes: bp-based frame

sub_554A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F13C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554A20 endp



; Attributes: bp-based frame

sub_554A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F150
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554A40 endp



; Attributes: bp-based frame

sub_554A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F164
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554A60 endp



; Attributes: bp-based frame

sub_554A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F178
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554A80 endp



; Attributes: bp-based frame

sub_554AA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F18C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554AA0 endp



; Attributes: bp-based frame

sub_554AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F1A0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554AC0 endp



; Attributes: bp-based frame

sub_554AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F1B4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554AE0 endp



; Attributes: bp-based frame

sub_554B00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F1C8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554B00 endp



; Attributes: bp-based frame

sub_554B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F1DC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554B20 endp



; Attributes: bp-based frame

sub_554B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F1F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554B40 endp



; Attributes: bp-based frame

sub_554B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F204
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554B60 endp



; Attributes: bp-based frame

sub_554B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F218
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554B80 endp



; Attributes: bp-based frame

sub_554BA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F22C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554BA0 endp



; Attributes: bp-based frame

sub_554BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F240
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554BC0 endp



; Attributes: bp-based frame

sub_554BE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F254
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554BE0 endp



; Attributes: bp-based frame

sub_554C00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F268
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554C00 endp



; Attributes: bp-based frame

sub_554C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F27C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554C20 endp



; Attributes: bp-based frame

sub_554C40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F290
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554C40 endp



; Attributes: bp-based frame

sub_554C60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F2A4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554C60 endp



; Attributes: bp-based frame

sub_554C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F2B8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554C80 endp



; Attributes: bp-based frame

sub_554CA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F2CC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554CA0 endp



; Attributes: bp-based frame

sub_554CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F2E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554CC0 endp



; Attributes: bp-based frame

sub_554CE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F2F4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554CE0 endp



; Attributes: bp-based frame

sub_554D00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F308
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554D00 endp



; Attributes: bp-based frame

sub_554D20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F31C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554D20 endp



; Attributes: bp-based frame

sub_554D40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F330
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554D40 endp



; Attributes: bp-based frame

sub_554D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F344
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554D60 endp



; Attributes: bp-based frame

sub_554D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F358
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554D80 endp



; Attributes: bp-based frame

sub_554DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F36C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554DA0 endp



; Attributes: bp-based frame

sub_554DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F380
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554DC0 endp



; Attributes: bp-based frame

sub_554DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F394
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554DE0 endp



; Attributes: bp-based frame

sub_554E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F3A8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554E00 endp



; Attributes: bp-based frame

sub_554E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F3BC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554E20 endp



; Attributes: bp-based frame

sub_554E40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F3D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554E40 endp



; Attributes: bp-based frame

sub_554E60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F3E4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554E60 endp



; Attributes: bp-based frame

sub_554E80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F3F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554E80 endp



; Attributes: bp-based frame

sub_554EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F40C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554EA0 endp



; Attributes: bp-based frame

sub_554EC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F420
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554EC0 endp



; Attributes: bp-based frame

sub_554EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F434
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554EE0 endp



; Attributes: bp-based frame

sub_554F00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F448
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554F00 endp



; Attributes: bp-based frame

sub_554F20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F45C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554F20 endp



; Attributes: bp-based frame

sub_554F40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F470
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554F40 endp



; Attributes: bp-based frame

sub_554F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F484
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554F60 endp



; Attributes: bp-based frame

sub_554F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F498
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554F80 endp



; Attributes: bp-based frame

sub_554FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F4AC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554FA0 endp



; Attributes: bp-based frame

sub_554FC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F4C0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554FC0 endp



; Attributes: bp-based frame

sub_554FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F4D4
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_554FE0 endp



; Attributes: bp-based frame

sub_555000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F4E8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_555000 endp



; Attributes: bp-based frame

sub_555020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F4FC
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_555020 endp



; Attributes: bp-based frame

sub_555040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F510
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_555040 endp



; Attributes: bp-based frame

sub_555060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158F524
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_555060 endp



; Attributes: bp-based frame

sub_555080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D0F8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_555080 endp



; Attributes: bp-based frame

sub_5550A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D10C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5550A0 endp



; Attributes: bp-based frame

sub_5550C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D120
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5550C0 endp



; Attributes: bp-based frame

sub_5550E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D134
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5550E0 endp



; Attributes: bp-based frame

sub_555100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_158D148
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_555100 endp



; Attributes: bp-based frame

sub_555120 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158F538
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_555144
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_555144:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_555120 endp

align 10h


; Attributes: bp-based frame

sub_555150 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DA40
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5551C9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5551C9
mov	ecx, [ebp+var_4C]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5551C9:
mov	esp, ebp
pop	ebp
retn
sub_555150 endp

align 10h


; Attributes: bp-based frame

sub_5551D0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_51C9B0
add	esp, 8
mov	edx, [ebp+var_68]
cmp	dword ptr [edx], 0
jz	short loc_55524C
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 94h
idiv	ecx
mov	[ebp+var_64], eax
mov	edx, [ebp+var_68]
mov	eax, [edx]
mov	[ebp+var_60], eax
cmp	[ebp+var_60], 0
jz	short loc_55524C
mov	ecx, [ebp+var_64]
imul	ecx, 94h
push	ecx		; int
mov	edx, [ebp+var_60]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_55524C:
mov	esp, ebp
pop	ebp
retn
sub_5551D0 endp



; Attributes: bp-based frame

sub_555250 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DA70
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5552C9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5552C9
mov	ecx, [ebp+var_4C]
imul	ecx, 68h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5552C9:
mov	esp, ebp
pop	ebp
retn
sub_555250 endp

align 10h


; Attributes: bp-based frame

sub_5552D0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD180
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_555349
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_555349
mov	ecx, [ebp+var_4C]
imul	ecx, 50h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_555349:
mov	esp, ebp
pop	ebp
retn
sub_5552D0 endp

align 10h


; Attributes: bp-based frame

sub_555350 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DAA0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5553C9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 4Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5553C9
mov	ecx, [ebp+var_4C]
imul	ecx, 4Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5553C9:
mov	esp, ebp
pop	ebp
retn
sub_555350 endp

align 10h


; Attributes: bp-based frame

sub_5553D0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DAD0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_555444
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 6
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_555444
mov	edx, [ebp+var_4C]
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_555444:
mov	esp, ebp
pop	ebp
retn
sub_5553D0 endp

align 10h


; Attributes: bp-based frame

sub_555450 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_5554C4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_5554C4
mov	edx, [ebp+var_54]
shl	edx, 3
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5554C4:
mov	esp, ebp
pop	ebp
retn
sub_555450 endp

align 10h


; Attributes: bp-based frame

sub_5554D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+arg_0], edx
jnb	short loc_55552E
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_555513
jmp	short loc_55552C

loc_555513:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_55552C:
jmp	short loc_55555F

loc_55552E:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_57CF60

loc_55555F:
mov	esp, ebp
pop	ebp
retn	8
sub_5554D0 endp

align 10h


; Attributes: bp-based frame

sub_555570 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DB00
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5555E9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5555E9
mov	ecx, [ebp+var_4C]
imul	ecx, 70h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5555E9:
mov	esp, ebp
pop	ebp
retn
sub_555570 endp

align 10h


; Attributes: bp-based frame

sub_5555F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_55562B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_57DB30
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 70h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_555656

loc_55562B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_57CFD0

loc_555656:
mov	esp, ebp
pop	ebp
retn	4
sub_5555F0 endp

align 10h


; Attributes: bp-based frame

sub_555660 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DB80
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5556D9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5556D9
mov	ecx, [ebp+var_4C]
imul	ecx, 68h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5556D9:
mov	esp, ebp
pop	ebp
retn
sub_555660 endp

align 10h


; Attributes: bp-based frame

sub_5556E0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_579170
mov	esp, ebp
pop	ebp
retn	4
sub_5556E0 endp

align 10h


; Attributes: bp-based frame

sub_555710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4892A0
mov	esp, ebp
pop	ebp
retn
sub_555710 endp

align 10h


; Attributes: bp-based frame

sub_555730 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5791F0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_555730 endp

align 10h


; Attributes: bp-based frame

sub_555750 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_5557C4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 4
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_5557C4
mov	edx, [ebp+var_54]
shl	edx, 4
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5557C4:
mov	esp, ebp
pop	ebp
retn
sub_555750 endp

align 10h


; Attributes: bp-based frame

sub_5557D0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DBB0
add	esp, 8
mov	edx, [ebp+var_54]
cmp	dword ptr [edx], 0
jz	short loc_555849
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_54]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_555849
mov	ecx, [ebp+var_50]
imul	ecx, 5Ch
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_555849:
mov	esp, ebp
pop	ebp
retn
sub_5557D0 endp

align 10h


; Attributes: bp-based frame

sub_555850 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 5Ch
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_5558B3
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 5Ch
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_555898
jmp	short loc_5558B1

loc_555898:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_57CBD0

loc_5558B1:
jmp	short loc_5558E9

loc_5558B3:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_57D760

loc_5558E9:
mov	esp, ebp
pop	ebp
retn	8
sub_555850 endp

align 10h


; Attributes: bp-based frame

sub_5558F0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DBE0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_55596C
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_55596C
mov	ecx, [ebp+var_54]
imul	ecx, 0A8h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_55596C:
mov	esp, ebp
pop	ebp
retn
sub_5558F0 endp



; Attributes: bp-based frame

sub_555970 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0A8h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_5559D6
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 0A8h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_5559BB
jmp	short loc_5559D4

loc_5559BB:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_57CC70

loc_5559D4:
jmp	short loc_555A0C

loc_5559D6:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_57D7E0

loc_555A0C:
mov	esp, ebp
pop	ebp
retn	8
sub_555970 endp

align 10h


; Attributes: bp-based frame

sub_555A20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
lea	eax, [eax+edx*4]
mov	esp, ebp
pop	ebp
retn	4
sub_555A20 endp



; Attributes: bp-based frame

sub_555A40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555A91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0C00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555A98

loc_555A91:
mov	[ebp+var_8], 0

loc_555A98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555A40 endp

align 10h


; Attributes: bp-based frame

sub_555AA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555AF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0A70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555AF8

loc_555AF1:
mov	[ebp+var_8], 0

loc_555AF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555AA0 endp

align 10h


; Attributes: bp-based frame

sub_555B00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555B51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE08E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555B58

loc_555B51:
mov	[ebp+var_8], 0

loc_555B58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555B00 endp

align 10h


; Attributes: bp-based frame

sub_555B60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555BB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0770
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555BB8

loc_555BB1:
mov	[ebp+var_8], 0

loc_555BB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555B60 endp

align 10h


; Attributes: bp-based frame

sub_555BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555C11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555C18

loc_555C11:
mov	[ebp+var_8], 0

loc_555C18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555BC0 endp

align 10h


; Attributes: bp-based frame

sub_555C20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555C71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0490
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555C78

loc_555C71:
mov	[ebp+var_8], 0

loc_555C78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555C20 endp

align 10h


; Attributes: bp-based frame

sub_555C80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555CD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE02B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555CD8

loc_555CD1:
mov	[ebp+var_8], 0

loc_555CD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555C80 endp

align 10h


; Attributes: bp-based frame

sub_555CE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555D31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0200
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555D38

loc_555D31:
mov	[ebp+var_8], 0

loc_555D38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555CE0 endp

align 10h


; Attributes: bp-based frame

sub_555D40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555D91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE0050
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555D98

loc_555D91:
mov	[ebp+var_8], 0

loc_555D98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555D40 endp

align 10h


; Attributes: bp-based frame

sub_555DA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555DF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDFE70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555DF8

loc_555DF1:
mov	[ebp+var_8], 0

loc_555DF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555DA0 endp

align 10h


; Attributes: bp-based frame

sub_555E00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555E51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDFCE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555E58

loc_555E51:
mov	[ebp+var_8], 0

loc_555E58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555E00 endp

align 10h


; Attributes: bp-based frame

sub_555E60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555EB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDFB30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555EB8

loc_555EB1:
mov	[ebp+var_8], 0

loc_555EB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555E60 endp

align 10h


; Attributes: bp-based frame

sub_555EC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555F11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDF9A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555F18

loc_555F11:
mov	[ebp+var_8], 0

loc_555F18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555EC0 endp

align 10h


; Attributes: bp-based frame

sub_555F20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555F71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDF590
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555F78

loc_555F71:
mov	[ebp+var_8], 0

loc_555F78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555F20 endp

align 10h


; Attributes: bp-based frame

sub_555F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_555FD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDF450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_555FD8

loc_555FD1:
mov	[ebp+var_8], 0

loc_555FD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555F80 endp

align 10h


; Attributes: bp-based frame

sub_555FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDF390
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556038

loc_556031:
mov	[ebp+var_8], 0

loc_556038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_555FE0 endp

align 10h


; Attributes: bp-based frame

sub_556040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDF290
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556098

loc_556091:
mov	[ebp+var_8], 0

loc_556098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556040 endp

align 10h


; Attributes: bp-based frame

sub_5560A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5560F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDEB00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5560F8

loc_5560F1:
mov	[ebp+var_8], 0

loc_5560F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5560A0 endp

align 10h


; Attributes: bp-based frame

sub_556100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDEA90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556158

loc_556151:
mov	[ebp+var_8], 0

loc_556158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556100 endp

align 10h


; Attributes: bp-based frame

sub_556160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5561B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDEA20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5561B8

loc_5561B1:
mov	[ebp+var_8], 0

loc_5561B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556160 endp

align 10h


; Attributes: bp-based frame

sub_5561C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE9B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556218

loc_556211:
mov	[ebp+var_8], 0

loc_556218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5561C0 endp

align 10h


; Attributes: bp-based frame

sub_556220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE940
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556278

loc_556271:
mov	[ebp+var_8], 0

loc_556278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556220 endp

align 10h


; Attributes: bp-based frame

sub_556280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5562D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE8D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5562D8

loc_5562D1:
mov	[ebp+var_8], 0

loc_5562D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556280 endp

align 10h


; Attributes: bp-based frame

sub_5562E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556338

loc_556331:
mov	[ebp+var_8], 0

loc_556338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5562E0 endp

align 10h


; Attributes: bp-based frame

sub_556340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE620
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556398

loc_556391:
mov	[ebp+var_8], 0

loc_556398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556340 endp

align 10h


; Attributes: bp-based frame

sub_5563A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5563F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE580
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5563F8

loc_5563F1:
mov	[ebp+var_8], 0

loc_5563F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5563A0 endp

align 10h


; Attributes: bp-based frame

sub_556400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556458

loc_556451:
mov	[ebp+var_8], 0

loc_556458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556400 endp

align 10h


; Attributes: bp-based frame

sub_556460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5564B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDE440
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5564B8

loc_5564B1:
mov	[ebp+var_8], 0

loc_5564B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556460 endp

align 10h


; Attributes: bp-based frame

sub_5564C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDD9D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556518

loc_556511:
mov	[ebp+var_8], 0

loc_556518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5564C0 endp

align 10h


; Attributes: bp-based frame

sub_556520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556571
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDD910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556578

loc_556571:
mov	[ebp+var_8], 0

loc_556578:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556520 endp

align 10h


; Attributes: bp-based frame

sub_556580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5565D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDD850
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5565D8

loc_5565D1:
mov	[ebp+var_8], 0

loc_5565D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556580 endp

align 10h


; Attributes: bp-based frame

sub_5565E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556631
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDD7B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556638

loc_556631:
mov	[ebp+var_8], 0

loc_556638:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5565E0 endp

align 10h


; Attributes: bp-based frame

sub_556640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556694
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D6B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55669B

loc_556694:
mov	[ebp+var_8], 0

loc_55669B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556640 endp

align 10h


; Attributes: bp-based frame

sub_5566B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556704
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D5C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55670B

loc_556704:
mov	[ebp+var_8], 0

loc_55670B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5566B0 endp

align 10h


; Attributes: bp-based frame

sub_556720 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_556720
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_556798
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D40
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E7D510
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_55679F

loc_556798:
mov	[ebp+var_14], 0

loc_55679F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_556720 endp



; Attributes: bp-based frame

sub_5567B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556801
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDD3B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556808

loc_556801:
mov	[ebp+var_8], 0

loc_556808:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5567B0 endp

align 10h


; Attributes: bp-based frame

sub_556810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556864
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F22650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55686B

loc_556864:
mov	[ebp+var_8], 0

loc_55686B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556810 endp

align 10h


; Attributes: bp-based frame

sub_556880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5568D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5568D8

loc_5568D1:
mov	[ebp+var_8], 0

loc_5568D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556880 endp

align 10h


; Attributes: bp-based frame

sub_5568E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556931
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D3C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556938

loc_556931:
mov	[ebp+var_8], 0

loc_556938:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5568E0 endp

align 10h


; Attributes: bp-based frame

sub_556940 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556991
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDD060
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556998

loc_556991:
mov	[ebp+var_8], 0

loc_556998:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556940 endp

align 10h


; Attributes: bp-based frame

sub_5569A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5569F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDCFF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5569F8

loc_5569F1:
mov	[ebp+var_8], 0

loc_5569F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5569A0 endp

align 10h


; Attributes: bp-based frame

sub_556A00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556A51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A18
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E8C840
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556A58

loc_556A51:
mov	[ebp+var_8], 0

loc_556A58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556A00 endp

align 10h


; Attributes: bp-based frame

sub_556A60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556AB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A1C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_EF85E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556AB8

loc_556AB1:
mov	[ebp+var_8], 0

loc_556AB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556A60 endp

align 10h


; Attributes: bp-based frame

sub_556AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556B11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D300
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556B18

loc_556B11:
mov	[ebp+var_8], 0

loc_556B18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556AC0 endp

align 10h


; Attributes: bp-based frame

sub_556B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556B71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDCE60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556B78

loc_556B71:
mov	[ebp+var_8], 0

loc_556B78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556B20 endp

align 10h


; Attributes: bp-based frame

sub_556B80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556BD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDCBC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556BD8

loc_556BD1:
mov	[ebp+var_8], 0

loc_556BD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556B80 endp

align 10h


; Attributes: bp-based frame

sub_556BE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556C31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A20
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556C38

loc_556C31:
mov	[ebp+var_8], 0

loc_556C38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556BE0 endp

align 10h


; Attributes: bp-based frame

sub_556C40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556C91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDCAF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556C98

loc_556C91:
mov	[ebp+var_8], 0

loc_556C98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556C40 endp

align 10h


; Attributes: bp-based frame

sub_556CA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556CF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDCA20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556CF8

loc_556CF1:
mov	[ebp+var_8], 0

loc_556CF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556CA0 endp

align 10h


; Attributes: bp-based frame

sub_556D00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556D54
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581900
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E709C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556D5B

loc_556D54:
mov	[ebp+var_8], 0

loc_556D5B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556D00 endp

align 10h


; Attributes: bp-based frame

sub_556D70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556DC4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581900
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70940
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556DCB

loc_556DC4:
mov	[ebp+var_8], 0

loc_556DCB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556D70 endp

align 10h


; Attributes: bp-based frame

sub_556DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556E31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B08
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D190
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556E38

loc_556E31:
mov	[ebp+var_8], 0

loc_556E38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556DE0 endp

align 10h


; Attributes: bp-based frame

sub_556E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556E91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D0F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556E98

loc_556E91:
mov	[ebp+var_8], 0

loc_556E98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556E40 endp

align 10h


; Attributes: bp-based frame

sub_556EA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556EF4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581904
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7D010
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556EFB

loc_556EF4:
mov	[ebp+var_8], 0

loc_556EFB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556EA0 endp

align 10h


; Attributes: bp-based frame

sub_556F10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556F61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A48
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDC700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556F68

loc_556F61:
mov	[ebp+var_8], 0

loc_556F68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556F10 endp

align 10h


; Attributes: bp-based frame

sub_556F70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_556FC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDC580
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_556FC8

loc_556FC1:
mov	[ebp+var_8], 0

loc_556FC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556F70 endp

align 10h


; Attributes: bp-based frame

sub_556FD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557021
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDC1D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557028

loc_557021:
mov	[ebp+var_8], 0

loc_557028:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_556FD0 endp

align 10h


; Attributes: bp-based frame

sub_557030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557081
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F225D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557088

loc_557081:
mov	[ebp+var_8], 0

loc_557088:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557030 endp

align 10h


; Attributes: bp-based frame

sub_557090 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5570E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F22550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5570E8

loc_5570E1:
mov	[ebp+var_8], 0

loc_5570E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557090 endp

align 10h


; Attributes: bp-based frame

sub_5570F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557141
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F224D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557148

loc_557141:
mov	[ebp+var_8], 0

loc_557148:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5570F0 endp

align 10h


; Attributes: bp-based frame

sub_557150 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5571A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CF80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5571A8

loc_5571A1:
mov	[ebp+var_8], 0

loc_5571A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557150 endp

align 10h


; Attributes: bp-based frame

sub_5571B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557201
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CE60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557208

loc_557201:
mov	[ebp+var_8], 0

loc_557208:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5571B0 endp

align 10h


; Attributes: bp-based frame

sub_557210 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557261
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDC070
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557268

loc_557261:
mov	[ebp+var_8], 0

loc_557268:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557210 endp

align 10h


; Attributes: bp-based frame

sub_557270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5572C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBFD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5572C8

loc_5572C1:
mov	[ebp+var_8], 0

loc_5572C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557270 endp

align 10h


; Attributes: bp-based frame

sub_5572D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557321
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBF30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557328

loc_557321:
mov	[ebp+var_8], 0

loc_557328:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5572D0 endp

align 10h


; Attributes: bp-based frame

sub_557330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557381
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBE90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557388

loc_557381:
mov	[ebp+var_8], 0

loc_557388:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557330 endp

align 10h


; Attributes: bp-based frame

sub_557390 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5573E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBDF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5573E8

loc_5573E1:
mov	[ebp+var_8], 0

loc_5573E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557390 endp

align 10h


; Attributes: bp-based frame

sub_5573F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557441
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBD20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557448

loc_557441:
mov	[ebp+var_8], 0

loc_557448:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5573F0 endp

align 10h


; Attributes: bp-based frame

sub_557450 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5574A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBC50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5574A8

loc_5574A1:
mov	[ebp+var_8], 0

loc_5574A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557450 endp

align 10h


; Attributes: bp-based frame

sub_5574B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557501
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBB80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557508

loc_557501:
mov	[ebp+var_8], 0

loc_557508:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5574B0 endp

align 10h


; Attributes: bp-based frame

sub_557510 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557561
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDBA80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557568

loc_557561:
mov	[ebp+var_8], 0

loc_557568:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557510 endp

align 10h


; Attributes: bp-based frame

sub_557570 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5575C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDB9E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5575C8

loc_5575C1:
mov	[ebp+var_8], 0

loc_5575C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557570 endp

align 10h


; Attributes: bp-based frame

sub_5575D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557621
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDB8E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557628

loc_557621:
mov	[ebp+var_8], 0

loc_557628:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5575D0 endp

align 10h


; Attributes: bp-based frame

sub_557630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557681
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CD70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557688

loc_557681:
mov	[ebp+var_8], 0

loc_557688:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557630 endp

align 10h


; Attributes: bp-based frame

sub_557690 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5576E4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CCA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5576EB

loc_5576E4:
mov	[ebp+var_8], 0

loc_5576EB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557690 endp

align 10h


; Attributes: bp-based frame

sub_557700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557754
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A34
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CB70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55775B

loc_557754:
mov	[ebp+var_8], 0

loc_55775B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557700 endp

align 10h


; Attributes: bp-based frame

sub_557770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5577C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CAE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5577C8

loc_5577C1:
mov	[ebp+var_8], 0

loc_5577C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557770 endp

align 10h


; Attributes: bp-based frame

sub_5577D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDB500
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557828

loc_557821:
mov	[ebp+var_8], 0

loc_557828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5577D0 endp

align 10h


; Attributes: bp-based frame

sub_557830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B08
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CA10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557888

loc_557881:
mov	[ebp+var_8], 0

loc_557888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557830 endp

align 10h


; Attributes: bp-based frame

sub_557890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5578E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5578E8

loc_5578E1:
mov	[ebp+var_8], 0

loc_5578E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557890 endp

align 10h


; Attributes: bp-based frame

sub_5578F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDB2E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557948

loc_557941:
mov	[ebp+var_8], 0

loc_557948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5578F0 endp

align 10h


; Attributes: bp-based frame

sub_557950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5579A4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581908
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDADB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5579AB

loc_5579A4:
mov	[ebp+var_8], 0

loc_5579AB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557950 endp

align 10h


; Attributes: bp-based frame

sub_5579C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557A11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A38
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C8C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557A18

loc_557A11:
mov	[ebp+var_8], 0

loc_557A18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5579C0 endp

align 10h


; Attributes: bp-based frame

sub_557A20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557A71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A3C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C7F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557A78

loc_557A71:
mov	[ebp+var_8], 0

loc_557A78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557A20 endp

align 10h


; Attributes: bp-based frame

sub_557A80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557AD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDAC30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557AD8

loc_557AD1:
mov	[ebp+var_8], 0

loc_557AD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557A80 endp

align 10h


; Attributes: bp-based frame

sub_557AE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557B31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDAB30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557B38

loc_557B31:
mov	[ebp+var_8], 0

loc_557B38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557AE0 endp

align 10h


; Attributes: bp-based frame

sub_557B40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557B91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557B98

loc_557B91:
mov	[ebp+var_8], 0

loc_557B98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557B40 endp

align 10h


; Attributes: bp-based frame

sub_557BA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557BF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA8A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557BF8

loc_557BF1:
mov	[ebp+var_8], 0

loc_557BF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557BA0 endp

align 10h


; Attributes: bp-based frame

sub_557C00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557C51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557C58

loc_557C51:
mov	[ebp+var_8], 0

loc_557C58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557C00 endp

align 10h


; Attributes: bp-based frame

sub_557C60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557CB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA720
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557CB8

loc_557CB1:
mov	[ebp+var_8], 0

loc_557CB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557C60 endp

align 10h


; Attributes: bp-based frame

sub_557CC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557D11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA6B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557D18

loc_557D11:
mov	[ebp+var_8], 0

loc_557D18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557CC0 endp

align 10h


; Attributes: bp-based frame

sub_557D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557D71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA610
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557D78

loc_557D71:
mov	[ebp+var_8], 0

loc_557D78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557D20 endp

align 10h


; Attributes: bp-based frame

sub_557D80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557DD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA5A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557DD8

loc_557DD1:
mov	[ebp+var_8], 0

loc_557DD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557D80 endp

align 10h


; Attributes: bp-based frame

sub_557DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557E31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA530
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557E38

loc_557E31:
mov	[ebp+var_8], 0

loc_557E38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557DE0 endp

align 10h


; Attributes: bp-based frame

sub_557E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557E91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA4C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557E98

loc_557E91:
mov	[ebp+var_8], 0

loc_557E98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557E40 endp

align 10h


; Attributes: bp-based frame

sub_557EA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557EF4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A40
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C690
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557EFB

loc_557EF4:
mov	[ebp+var_8], 0

loc_557EFB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557EA0 endp

align 10h


; Attributes: bp-based frame

sub_557F10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557F64
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A44
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557F6B

loc_557F64:
mov	[ebp+var_8], 0

loc_557F6B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557F10 endp

align 10h


; Attributes: bp-based frame

sub_557F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_557FD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA290
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_557FD8

loc_557FD1:
mov	[ebp+var_8], 0

loc_557FD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557F80 endp

align 10h


; Attributes: bp-based frame

sub_557FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581910
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C470
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558038

loc_558031:
mov	[ebp+var_8], 0

loc_558038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_557FE0 endp

align 10h


; Attributes: bp-based frame

sub_558040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDA1E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558098

loc_558091:
mov	[ebp+var_8], 0

loc_558098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558040 endp

align 10h


; Attributes: bp-based frame

sub_5580A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5580F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD9FC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5580F8

loc_5580F1:
mov	[ebp+var_8], 0

loc_5580F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5580A0 endp

align 10h


; Attributes: bp-based frame

sub_558100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD9E10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558158

loc_558151:
mov	[ebp+var_8], 0

loc_558158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558100 endp

align 10h


; Attributes: bp-based frame

sub_558160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5581B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD9D40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5581B8

loc_5581B1:
mov	[ebp+var_8], 0

loc_5581B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558160 endp

align 10h


; Attributes: bp-based frame

sub_5581C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD9AD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558218

loc_558211:
mov	[ebp+var_8], 0

loc_558218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5581C0 endp

align 10h


; Attributes: bp-based frame

sub_558220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD9460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558278

loc_558271:
mov	[ebp+var_8], 0

loc_558278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558220 endp

align 10h


; Attributes: bp-based frame

sub_558280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5582D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD92B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5582D8

loc_5582D1:
mov	[ebp+var_8], 0

loc_5582D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558280 endp

align 10h


; Attributes: bp-based frame

sub_5582E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C3E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558338

loc_558331:
mov	[ebp+var_8], 0

loc_558338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5582E0 endp

align 10h


; Attributes: bp-based frame

sub_558340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558398

loc_558391:
mov	[ebp+var_8], 0

loc_558398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558340 endp

align 10h


; Attributes: bp-based frame

sub_5583A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5583F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD90C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5583F8

loc_5583F1:
mov	[ebp+var_8], 0

loc_5583F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5583A0 endp

align 10h


; Attributes: bp-based frame

sub_558400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD9000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558458

loc_558451:
mov	[ebp+var_8], 0

loc_558458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558400 endp

align 10h


; Attributes: bp-based frame

sub_558460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5584B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A48
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD8770
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5584B8

loc_5584B1:
mov	[ebp+var_8], 0

loc_5584B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558460 endp

align 10h


; Attributes: bp-based frame

sub_5584C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD86B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558518

loc_558511:
mov	[ebp+var_8], 0

loc_558518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5584C0 endp

align 10h


; Attributes: bp-based frame

sub_558520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558571
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD85F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558578

loc_558571:
mov	[ebp+var_8], 0

loc_558578:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558520 endp

align 10h


; Attributes: bp-based frame

sub_558580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5585D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD8250
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5585D8

loc_5585D1:
mov	[ebp+var_8], 0

loc_5585D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558580 endp

align 10h


; Attributes: bp-based frame

sub_5585E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558631
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD81E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558638

loc_558631:
mov	[ebp+var_8], 0

loc_558638:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5585E0 endp

align 10h


; Attributes: bp-based frame

sub_558640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558691
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7FA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558698

loc_558691:
mov	[ebp+var_8], 0

loc_558698:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558640 endp

align 10h


; Attributes: bp-based frame

sub_5586A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5586F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7D60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5586F8

loc_5586F1:
mov	[ebp+var_8], 0

loc_5586F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5586A0 endp

align 10h


; Attributes: bp-based frame

sub_558700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558751
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7CF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558758

loc_558751:
mov	[ebp+var_8], 0

loc_558758:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558700 endp

align 10h


; Attributes: bp-based frame

sub_558760 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5587B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7B80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5587B8

loc_5587B1:
mov	[ebp+var_8], 0

loc_5587B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558760 endp

align 10h


; Attributes: bp-based frame

sub_5587C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558811
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7A10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558818

loc_558811:
mov	[ebp+var_8], 0

loc_558818:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5587C0 endp

align 10h


; Attributes: bp-based frame

sub_558820 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558871
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD78A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558878

loc_558871:
mov	[ebp+var_8], 0

loc_558878:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558820 endp

align 10h


; Attributes: bp-based frame

sub_558880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5588D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7800
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5588D8

loc_5588D1:
mov	[ebp+var_8], 0

loc_5588D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558880 endp

align 10h


; Attributes: bp-based frame

sub_5588E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558931
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7760
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558938

loc_558931:
mov	[ebp+var_8], 0

loc_558938:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5588E0 endp

align 10h


; Attributes: bp-based frame

sub_558940 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558991
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD76B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558998

loc_558991:
mov	[ebp+var_8], 0

loc_558998:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558940 endp

align 10h


; Attributes: bp-based frame

sub_5589A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5589F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5589F8

loc_5589F1:
mov	[ebp+var_8], 0

loc_5589F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5589A0 endp

align 10h


; Attributes: bp-based frame

sub_558A00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558A51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158192C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E5FE10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558A58

loc_558A51:
mov	[ebp+var_8], 0

loc_558A58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558A00 endp

align 10h


; Attributes: bp-based frame

sub_558A60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558AB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7530
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558AB8

loc_558AB1:
mov	[ebp+var_8], 0

loc_558AB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558A60 endp

align 10h


; Attributes: bp-based frame

sub_558AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558B11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C2C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558B18

loc_558B11:
mov	[ebp+var_8], 0

loc_558B18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558AC0 endp

align 10h


; Attributes: bp-based frame

sub_558B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558B74
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158190C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C1E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558B7B

loc_558B74:
mov	[ebp+var_8], 0

loc_558B7B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558B20 endp

align 10h


; Attributes: bp-based frame

sub_558B90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558BE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581910
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7C090
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558BE8

loc_558BE1:
mov	[ebp+var_8], 0

loc_558BE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558B90 endp

align 10h


; Attributes: bp-based frame

sub_558BF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558C41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558C48

loc_558C41:
mov	[ebp+var_8], 0

loc_558C48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558BF0 endp

align 10h


; Attributes: bp-based frame

sub_558C50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558CA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD73C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558CA8

loc_558CA1:
mov	[ebp+var_8], 0

loc_558CA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558C50 endp

align 10h


; Attributes: bp-based frame

sub_558CB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558D01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558D08

loc_558D01:
mov	[ebp+var_8], 0

loc_558D08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558CB0 endp

align 10h


; Attributes: bp-based frame

sub_558D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558D61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558D68

loc_558D61:
mov	[ebp+var_8], 0

loc_558D68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558D10 endp

align 10h


; Attributes: bp-based frame

sub_558D70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558DC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD71D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558DC8

loc_558DC1:
mov	[ebp+var_8], 0

loc_558DC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558D70 endp

align 10h


; Attributes: bp-based frame

sub_558DD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_558E21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7160
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_558E28

loc_558E21:
mov	[ebp+var_8], 0

loc_558E28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558DD0 endp

align 10h


; Attributes: bp-based frame

sub_558E30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_558E30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_558EA8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D44
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E5F740
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_558EAF

loc_558EA8:
mov	[ebp+var_14], 0

loc_558EAF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_558E30 endp



; Attributes: bp-based frame

sub_558EC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_558EC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_558F38
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D48
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E5F6A0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_558F3F

loc_558F38:
mov	[ebp+var_14], 0

loc_558F3F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_558EC0 endp



; Attributes: bp-based frame

sub_558F50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_558FC8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DD70E0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_558FCF

loc_558FC8:
mov	[ebp+var_14], 0

loc_558FCF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_558F50 endp



; Attributes: bp-based frame

sub_558FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7070
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559038

loc_559031:
mov	[ebp+var_8], 0

loc_559038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_558FE0 endp

align 10h


; Attributes: bp-based frame

sub_559040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD7000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559098

loc_559091:
mov	[ebp+var_8], 0

loc_559098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559040 endp

align 10h


; Attributes: bp-based frame

sub_5590A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5590F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6EB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5590F8

loc_5590F1:
mov	[ebp+var_8], 0

loc_5590F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5590A0 endp

align 10h


; Attributes: bp-based frame

sub_559100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B7C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559158

loc_559151:
mov	[ebp+var_8], 0

loc_559158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559100 endp

align 10h


; Attributes: bp-based frame

sub_559160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5591B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6E10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5591B8

loc_5591B1:
mov	[ebp+var_8], 0

loc_5591B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559160 endp

align 10h


; Attributes: bp-based frame

sub_5591C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6D70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559218

loc_559211:
mov	[ebp+var_8], 0

loc_559218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5591C0 endp

align 10h


; Attributes: bp-based frame

sub_559220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559278

loc_559271:
mov	[ebp+var_8], 0

loc_559278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559220 endp

align 10h


; Attributes: bp-based frame

sub_559280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5592D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6C00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5592D8

loc_5592D1:
mov	[ebp+var_8], 0

loc_5592D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559280 endp

align 10h


; Attributes: bp-based frame

sub_5592E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6B80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559338

loc_559331:
mov	[ebp+var_8], 0

loc_559338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5592E0 endp

align 10h


; Attributes: bp-based frame

sub_559340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6B10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559398

loc_559391:
mov	[ebp+var_8], 0

loc_559398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559340 endp

align 10h


; Attributes: bp-based frame

sub_5593A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5593F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6A70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5593F8

loc_5593F1:
mov	[ebp+var_8], 0

loc_5593F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5593A0 endp

align 10h


; Attributes: bp-based frame

sub_559400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD69D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559458

loc_559451:
mov	[ebp+var_8], 0

loc_559458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559400 endp

align 10h


; Attributes: bp-based frame

sub_559460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5594B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6900
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5594B8

loc_5594B1:
mov	[ebp+var_8], 0

loc_5594B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559460 endp

align 10h


; Attributes: bp-based frame

sub_5594C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559518

loc_559511:
mov	[ebp+var_8], 0

loc_559518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5594C0 endp

align 10h


; Attributes: bp-based frame

sub_559520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559571
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD67F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559578

loc_559571:
mov	[ebp+var_8], 0

loc_559578:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559520 endp

align 10h


; Attributes: bp-based frame

sub_559580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5595D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6780
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5595D8

loc_5595D1:
mov	[ebp+var_8], 0

loc_5595D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559580 endp

align 10h


; Attributes: bp-based frame

sub_5595E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559631
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD66E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559638

loc_559631:
mov	[ebp+var_8], 0

loc_559638:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5595E0 endp

align 10h


; Attributes: bp-based frame

sub_559640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559691
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559698

loc_559691:
mov	[ebp+var_8], 0

loc_559698:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559640 endp

align 10h


; Attributes: bp-based frame

sub_5596A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5596F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6570
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5596F8

loc_5596F1:
mov	[ebp+var_8], 0

loc_5596F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5596A0 endp

align 10h


; Attributes: bp-based frame

sub_559700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559751
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD64D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559758

loc_559751:
mov	[ebp+var_8], 0

loc_559758:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559700 endp

align 10h


; Attributes: bp-based frame

sub_559760 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5597B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5597B8

loc_5597B1:
mov	[ebp+var_8], 0

loc_5597B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559760 endp

align 10h


; Attributes: bp-based frame

sub_5597C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559811
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD63E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559818

loc_559811:
mov	[ebp+var_8], 0

loc_559818:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5597C0 endp

align 10h


; Attributes: bp-based frame

sub_559820 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559871
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559878

loc_559871:
mov	[ebp+var_8], 0

loc_559878:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559820 endp

align 10h


; Attributes: bp-based frame

sub_559880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5598D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6300
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5598D8

loc_5598D1:
mov	[ebp+var_8], 0

loc_5598D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559880 endp

align 10h


; Attributes: bp-based frame

sub_5598E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559931
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD6140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559938

loc_559931:
mov	[ebp+var_8], 0

loc_559938:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5598E0 endp

align 10h


; Attributes: bp-based frame

sub_559940 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559991
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD5FF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559998

loc_559991:
mov	[ebp+var_8], 0

loc_559998:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559940 endp

align 10h


; Attributes: bp-based frame

sub_5599A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5599F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD5F70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5599F8

loc_5599F1:
mov	[ebp+var_8], 0

loc_5599F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5599A0 endp

align 10h


; Attributes: bp-based frame

sub_559A00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559A51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD5680
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559A58

loc_559A51:
mov	[ebp+var_8], 0

loc_559A58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559A00 endp

align 10h


; Attributes: bp-based frame

sub_559A60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559AB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD4F70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559AB8

loc_559AB1:
mov	[ebp+var_8], 0

loc_559AB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559A60 endp

align 10h


; Attributes: bp-based frame

sub_559AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559B11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD4DE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559B18

loc_559B11:
mov	[ebp+var_8], 0

loc_559B18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559AC0 endp

align 10h


; Attributes: bp-based frame

sub_559B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559B71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD47D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559B78

loc_559B71:
mov	[ebp+var_8], 0

loc_559B78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559B20 endp

align 10h


; Attributes: bp-based frame

sub_559B80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559BD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD46F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559BD8

loc_559BD1:
mov	[ebp+var_8], 0

loc_559BD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559B80 endp

align 10h


; Attributes: bp-based frame

sub_559BE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559C31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD4650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559C38

loc_559C31:
mov	[ebp+var_8], 0

loc_559C38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559BE0 endp

align 10h


; Attributes: bp-based frame

sub_559C40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559C91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD45E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559C98

loc_559C91:
mov	[ebp+var_8], 0

loc_559C98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559C40 endp

align 10h


; Attributes: bp-based frame

sub_559CA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559CF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD4540
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559CF8

loc_559CF1:
mov	[ebp+var_8], 0

loc_559CF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559CA0 endp

align 10h


; Attributes: bp-based frame

sub_559D00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559D51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD4370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559D58

loc_559D51:
mov	[ebp+var_8], 0

loc_559D58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559D00 endp

align 10h


; Attributes: bp-based frame

sub_559D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559DB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD4150
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559DB8

loc_559DB1:
mov	[ebp+var_8], 0

loc_559DB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559D60 endp

align 10h


; Attributes: bp-based frame

sub_559DC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559E11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD3C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559E18

loc_559E11:
mov	[ebp+var_8], 0

loc_559E18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559DC0 endp

align 10h


; Attributes: bp-based frame

sub_559E20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559E71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD3B50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559E78

loc_559E71:
mov	[ebp+var_8], 0

loc_559E78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559E20 endp

align 10h


; Attributes: bp-based frame

sub_559E80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559ED1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD3AB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559ED8

loc_559ED1:
mov	[ebp+var_8], 0

loc_559ED8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559E80 endp

align 10h


; Attributes: bp-based frame

sub_559EE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559F31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD3A10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559F38

loc_559F31:
mov	[ebp+var_8], 0

loc_559F38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559EE0 endp

align 10h


; Attributes: bp-based frame

sub_559F40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559F91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD39A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559F98

loc_559F91:
mov	[ebp+var_8], 0

loc_559F98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559F40 endp

align 10h


; Attributes: bp-based frame

sub_559FA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_559FF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD3900
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_559FF8

loc_559FF1:
mov	[ebp+var_8], 0

loc_559FF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_559FA0 endp

align 10h


; Attributes: bp-based frame

sub_55A000 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A051
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD37E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A058

loc_55A051:
mov	[ebp+var_8], 0

loc_55A058:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A000 endp

align 10h


; Attributes: bp-based frame

sub_55A060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A0B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD36C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A0B8

loc_55A0B1:
mov	[ebp+var_8], 0

loc_55A0B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A060 endp

align 10h


; Attributes: bp-based frame

sub_55A0C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A111
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD35A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A118

loc_55A111:
mov	[ebp+var_8], 0

loc_55A118:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A0C0 endp

align 10h


; Attributes: bp-based frame

sub_55A120 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A171
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD3180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A178

loc_55A171:
mov	[ebp+var_8], 0

loc_55A178:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A120 endp

align 10h


; Attributes: bp-based frame

sub_55A180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A1D4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A4C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F20FB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A1DB

loc_55A1D4:
mov	[ebp+var_8], 0

loc_55A1DB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A180 endp

align 10h


; Attributes: bp-based frame

sub_55A1F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_55A1F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_55A268
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E030
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E8BE20
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_55A26F

loc_55A268:
mov	[ebp+var_14], 0

loc_55A26F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_55A1F0 endp



; Attributes: bp-based frame

sub_55A280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A2D4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581914
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F20A30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A2DB

loc_55A2D4:
mov	[ebp+var_8], 0

loc_55A2DB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A280 endp

align 10h


; Attributes: bp-based frame

sub_55A2F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A341
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD2A00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A348

loc_55A341:
mov	[ebp+var_8], 0

loc_55A348:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A2F0 endp

align 10h


; Attributes: bp-based frame

sub_55A350 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_55A3C8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E040
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DD2630
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_55A3CF

loc_55A3C8:
mov	[ebp+var_14], 0

loc_55A3CF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_55A350 endp



; Attributes: bp-based frame

sub_55A3E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A431
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD2590
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A438

loc_55A431:
mov	[ebp+var_8], 0

loc_55A438:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A3E0 endp

align 10h


; Attributes: bp-based frame

sub_55A440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A491
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD24F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A498

loc_55A491:
mov	[ebp+var_8], 0

loc_55A498:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A440 endp

align 10h


; Attributes: bp-based frame

sub_55A4A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A4F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD2450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A4F8

loc_55A4F1:
mov	[ebp+var_8], 0

loc_55A4F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A4A0 endp

align 10h


; Attributes: bp-based frame

sub_55A500 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A551
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD23B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A558

loc_55A551:
mov	[ebp+var_8], 0

loc_55A558:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A500 endp

align 10h


; Attributes: bp-based frame

sub_55A560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A5B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A50
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BFF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A5B8

loc_55A5B1:
mov	[ebp+var_8], 0

loc_55A5B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A560 endp

align 10h


; Attributes: bp-based frame

sub_55A5C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A611
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A50
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BF50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A618

loc_55A611:
mov	[ebp+var_8], 0

loc_55A618:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A5C0 endp

align 10h


; Attributes: bp-based frame

sub_55A620 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_55A698
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DD2310
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_55A69F

loc_55A698:
mov	[ebp+var_14], 0

loc_55A69F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_55A620 endp



; Attributes: bp-based frame

sub_55A6B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A54
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BE80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A708

loc_55A701:
mov	[ebp+var_8], 0

loc_55A708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A6B0 endp

align 10h


; Attributes: bp-based frame

sub_55A710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A764
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BDE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A76B

loc_55A764:
mov	[ebp+var_8], 0

loc_55A76B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A710 endp

align 10h


; Attributes: bp-based frame

sub_55A780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A7D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD2000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A7D8

loc_55A7D1:
mov	[ebp+var_8], 0

loc_55A7D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A780 endp

align 10h


; Attributes: bp-based frame

sub_55A7E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A831
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1F10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A838

loc_55A831:
mov	[ebp+var_8], 0

loc_55A838:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A7E0 endp

align 10h


; Attributes: bp-based frame

sub_55A840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A891
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1E70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A898

loc_55A891:
mov	[ebp+var_8], 0

loc_55A898:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A840 endp

align 10h


; Attributes: bp-based frame

sub_55A8A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A8F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1D30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A8F8

loc_55A8F1:
mov	[ebp+var_8], 0

loc_55A8F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A8A0 endp

align 10h


; Attributes: bp-based frame

sub_55A900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A951
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1B10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A958

loc_55A951:
mov	[ebp+var_8], 0

loc_55A958:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A900 endp

align 10h


; Attributes: bp-based frame

sub_55A960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55A9B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1750
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55A9B8

loc_55A9B1:
mov	[ebp+var_8], 0

loc_55A9B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A960 endp

align 10h


; Attributes: bp-based frame

sub_55A9C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AA11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1630
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AA18

loc_55AA11:
mov	[ebp+var_8], 0

loc_55AA18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55A9C0 endp

align 10h


; Attributes: bp-based frame

sub_55AA20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_55AA98
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E040
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DD14F0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_55AA9F

loc_55AA98:
mov	[ebp+var_14], 0

loc_55AA9F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_55AA20 endp



; Attributes: bp-based frame

sub_55AAB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AB01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD12A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AB08

loc_55AB01:
mov	[ebp+var_8], 0

loc_55AB08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AAB0 endp

align 10h


; Attributes: bp-based frame

sub_55AB10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AB61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A58
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E57300
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AB68

loc_55AB61:
mov	[ebp+var_8], 0

loc_55AB68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AB10 endp

align 10h


; Attributes: bp-based frame

sub_55AB70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55ABC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1090
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55ABC8

loc_55ABC1:
mov	[ebp+var_8], 0

loc_55ABC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AB70 endp

align 10h


; Attributes: bp-based frame

sub_55ABD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AC21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD1010
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AC28

loc_55AC21:
mov	[ebp+var_8], 0

loc_55AC28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55ABD0 endp

align 10h


; Attributes: bp-based frame

sub_55AC30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AC81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0FA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AC88

loc_55AC81:
mov	[ebp+var_8], 0

loc_55AC88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AC30 endp

align 10h


; Attributes: bp-based frame

sub_55AC90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55ACE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0F00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55ACE8

loc_55ACE1:
mov	[ebp+var_8], 0

loc_55ACE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AC90 endp

align 10h


; Attributes: bp-based frame

sub_55ACF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AD41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0E60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AD48

loc_55AD41:
mov	[ebp+var_8], 0

loc_55AD48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55ACF0 endp

align 10h


; Attributes: bp-based frame

sub_55AD50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55ADA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BD50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55ADA8

loc_55ADA1:
mov	[ebp+var_8], 0

loc_55ADA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AD50 endp

align 10h


; Attributes: bp-based frame

sub_55ADB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AE01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AE08

loc_55AE01:
mov	[ebp+var_8], 0

loc_55AE08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55ADB0 endp

align 10h


; Attributes: bp-based frame

sub_55AE10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AE61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0BF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AE68

loc_55AE61:
mov	[ebp+var_8], 0

loc_55AE68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AE10 endp

align 10h


; Attributes: bp-based frame

sub_55AE70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AEC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0B50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AEC8

loc_55AEC1:
mov	[ebp+var_8], 0

loc_55AEC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AE70 endp

align 10h


; Attributes: bp-based frame

sub_55AED0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AF21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0810
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AF28

loc_55AF21:
mov	[ebp+var_8], 0

loc_55AF28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AED0 endp

align 10h


; Attributes: bp-based frame

sub_55AF30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AF81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0750
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AF88

loc_55AF81:
mov	[ebp+var_8], 0

loc_55AF88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AF30 endp

align 10h


; Attributes: bp-based frame

sub_55AF90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55AFE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD06B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55AFE8

loc_55AFE1:
mov	[ebp+var_8], 0

loc_55AFE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AF90 endp

align 10h


; Attributes: bp-based frame

sub_55AFF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B041
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B048

loc_55B041:
mov	[ebp+var_8], 0

loc_55B048:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55AFF0 endp

align 10h


; Attributes: bp-based frame

sub_55B050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B0A4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BCB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B0AB

loc_55B0A4:
mov	[ebp+var_8], 0

loc_55B0AB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B050 endp

align 10h


; Attributes: bp-based frame

sub_55B0C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B114
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BC10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B11B

loc_55B114:
mov	[ebp+var_8], 0

loc_55B11B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B0C0 endp

align 10h


; Attributes: bp-based frame

sub_55B130 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B181
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BB80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B188

loc_55B181:
mov	[ebp+var_8], 0

loc_55B188:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B130 endp

align 10h


; Attributes: bp-based frame

sub_55B190 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B1E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BAF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B1E8

loc_55B1E1:
mov	[ebp+var_8], 0

loc_55B1E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B190 endp

align 10h


; Attributes: bp-based frame

sub_55B1F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B241
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7BA60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B248

loc_55B241:
mov	[ebp+var_8], 0

loc_55B248:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B1F0 endp

align 10h


; Attributes: bp-based frame

sub_55B250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B2A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B2A8

loc_55B2A1:
mov	[ebp+var_8], 0

loc_55B2A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B250 endp

align 10h


; Attributes: bp-based frame

sub_55B2B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B301
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD03E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B308

loc_55B301:
mov	[ebp+var_8], 0

loc_55B308:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B2B0 endp

align 10h


; Attributes: bp-based frame

sub_55B310 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B361
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B9D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B368

loc_55B361:
mov	[ebp+var_8], 0

loc_55B368:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B310 endp

align 10h


; Attributes: bp-based frame

sub_55B370 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B3C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B08
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B3C8

loc_55B3C1:
mov	[ebp+var_8], 0

loc_55B3C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B370 endp

align 10h


; Attributes: bp-based frame

sub_55B3D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B421
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B428

loc_55B421:
mov	[ebp+var_8], 0

loc_55B428:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B3D0 endp

align 10h


; Attributes: bp-based frame

sub_55B430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B481
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B7F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B488

loc_55B481:
mov	[ebp+var_8], 0

loc_55B488:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B430 endp

align 10h


; Attributes: bp-based frame

sub_55B490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B4E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A5C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B750
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B4E8

loc_55B4E1:
mov	[ebp+var_8], 0

loc_55B4E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B490 endp

align 10h


; Attributes: bp-based frame

sub_55B4F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B541
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD02F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B548

loc_55B541:
mov	[ebp+var_8], 0

loc_55B548:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B4F0 endp

align 10h


; Attributes: bp-based frame

sub_55B550 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B5A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B5A8

loc_55B5A1:
mov	[ebp+var_8], 0

loc_55B5A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B550 endp

align 10h


; Attributes: bp-based frame

sub_55B5B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B601
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B6B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B608

loc_55B601:
mov	[ebp+var_8], 0

loc_55B608:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B5B0 endp

align 10h


; Attributes: bp-based frame

sub_55B610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B661
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B620
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B668

loc_55B661:
mov	[ebp+var_8], 0

loc_55B668:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B610 endp

align 10h


; Attributes: bp-based frame

sub_55B670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B6C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B590
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B6C8

loc_55B6C1:
mov	[ebp+var_8], 0

loc_55B6C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B670 endp

align 10h


; Attributes: bp-based frame

sub_55B6D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B721
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A60
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B4F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B728

loc_55B721:
mov	[ebp+var_8], 0

loc_55B728:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B6D0 endp

align 10h


; Attributes: bp-based frame

sub_55B730 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B781
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0170
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B788

loc_55B781:
mov	[ebp+var_8], 0

loc_55B788:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B730 endp

align 10h


; Attributes: bp-based frame

sub_55B790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B7E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B7E8

loc_55B7E1:
mov	[ebp+var_8], 0

loc_55B7E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B790 endp

align 10h


; Attributes: bp-based frame

sub_55B7F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B841
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B3D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B848

loc_55B841:
mov	[ebp+var_8], 0

loc_55B848:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B7F0 endp

align 10h


; Attributes: bp-based frame

sub_55B850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B8A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B340
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B8A8

loc_55B8A1:
mov	[ebp+var_8], 0

loc_55B8A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B850 endp

align 10h


; Attributes: bp-based frame

sub_55B8B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B901
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DD0050
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B908

loc_55B901:
mov	[ebp+var_8], 0

loc_55B908:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B8B0 endp

align 10h


; Attributes: bp-based frame

sub_55B910 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_55B910
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_55B988
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E034
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_F4ED80
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_55B98F

loc_55B988:
mov	[ebp+var_14], 0

loc_55B98F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_55B910 endp



; Attributes: bp-based frame

sub_55B9A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55B9F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B2A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55B9F8

loc_55B9F1:
mov	[ebp+var_8], 0

loc_55B9F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55B9A0 endp

align 10h


; Attributes: bp-based frame

sub_55BA00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BA54
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B200
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BA5B

loc_55BA54:
mov	[ebp+var_8], 0

loc_55BA5B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BA00 endp

align 10h


; Attributes: bp-based frame

sub_55BA70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BAC4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B160
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BACB

loc_55BAC4:
mov	[ebp+var_8], 0

loc_55BACB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BA70 endp

align 10h


; Attributes: bp-based frame

sub_55BAE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BB31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B0C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BB38

loc_55BB31:
mov	[ebp+var_8], 0

loc_55BB38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BAE0 endp

align 10h


; Attributes: bp-based frame

sub_55BB40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BB91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7B020
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BB98

loc_55BB91:
mov	[ebp+var_8], 0

loc_55BB98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BB40 endp

align 10h


; Attributes: bp-based frame

sub_55BBA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BBF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCFFE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BBF8

loc_55BBF1:
mov	[ebp+var_8], 0

loc_55BBF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BBA0 endp

align 10h


; Attributes: bp-based frame

sub_55BC00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BC51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7AF90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BC58

loc_55BC51:
mov	[ebp+var_8], 0

loc_55BC58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BC00 endp

align 10h


; Attributes: bp-based frame

sub_55BC60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BCB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCFF30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BCB8

loc_55BCB1:
mov	[ebp+var_8], 0

loc_55BCB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BC60 endp

align 10h


; Attributes: bp-based frame

sub_55BCC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BD11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCFC70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BD18

loc_55BD11:
mov	[ebp+var_8], 0

loc_55BD18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BCC0 endp

align 10h


; Attributes: bp-based frame

sub_55BD20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BD71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7AF00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BD78

loc_55BD71:
mov	[ebp+var_8], 0

loc_55BD78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BD20 endp

align 10h


; Attributes: bp-based frame

sub_55BD80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BDD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7AE70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BDD8

loc_55BDD1:
mov	[ebp+var_8], 0

loc_55BDD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BD80 endp

align 10h


; Attributes: bp-based frame

sub_55BDE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BE31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCFA40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BE38

loc_55BE31:
mov	[ebp+var_8], 0

loc_55BE38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BDE0 endp

align 10h


; Attributes: bp-based frame

sub_55BE40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BE91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF890
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BE98

loc_55BE91:
mov	[ebp+var_8], 0

loc_55BE98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BE40 endp

align 10h


; Attributes: bp-based frame

sub_55BEA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BEF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BEF8

loc_55BEF1:
mov	[ebp+var_8], 0

loc_55BEF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BEA0 endp

align 10h


; Attributes: bp-based frame

sub_55BF00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BF51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF7A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BF58

loc_55BF51:
mov	[ebp+var_8], 0

loc_55BF58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BF00 endp

align 10h


; Attributes: bp-based frame

sub_55BF60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55BFB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF570
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55BFB8

loc_55BFB1:
mov	[ebp+var_8], 0

loc_55BFB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BF60 endp

align 10h


; Attributes: bp-based frame

sub_55BFC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C011
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF480
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C018

loc_55C011:
mov	[ebp+var_8], 0

loc_55C018:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55BFC0 endp

align 10h


; Attributes: bp-based frame

sub_55C020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C071
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AF98
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E53AC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C078

loc_55C071:
mov	[ebp+var_8], 0

loc_55C078:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C020 endp

align 10h


; Attributes: bp-based frame

sub_55C080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C0D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF410
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C0D8

loc_55C0D1:
mov	[ebp+var_8], 0

loc_55C0D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C080 endp

align 10h


; Attributes: bp-based frame

sub_55C0E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C131
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF3A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C138

loc_55C131:
mov	[ebp+var_8], 0

loc_55C138:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C0E0 endp

align 10h


; Attributes: bp-based frame

sub_55C140 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C191
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF330
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C198

loc_55C191:
mov	[ebp+var_8], 0

loc_55C198:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C140 endp

align 10h


; Attributes: bp-based frame

sub_55C1A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C1F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581918
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F4E5E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C1F8

loc_55C1F1:
mov	[ebp+var_8], 0

loc_55C1F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C1A0 endp

align 10h


; Attributes: bp-based frame

sub_55C200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C251
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF260
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C258

loc_55C251:
mov	[ebp+var_8], 0

loc_55C258:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C200 endp

align 10h


; Attributes: bp-based frame

sub_55C260 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C2B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF190
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C2B8

loc_55C2B1:
mov	[ebp+var_8], 0

loc_55C2B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C260 endp

align 10h


; Attributes: bp-based frame

sub_55C2C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C311
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AF9C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7ADA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C318

loc_55C311:
mov	[ebp+var_8], 0

loc_55C318:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C2C0 endp

align 10h


; Attributes: bp-based frame

sub_55C320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C371
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCF0A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C378

loc_55C371:
mov	[ebp+var_8], 0

loc_55C378:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C320 endp

align 10h


; Attributes: bp-based frame

sub_55C380 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C3D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCEF10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C3D8

loc_55C3D1:
mov	[ebp+var_8], 0

loc_55C3D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C380 endp

align 10h


; Attributes: bp-based frame

sub_55C3E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C431
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7AD10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C438

loc_55C431:
mov	[ebp+var_8], 0

loc_55C438:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C3E0 endp

align 10h


; Attributes: bp-based frame

sub_55C440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C491
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7AC70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C498

loc_55C491:
mov	[ebp+var_8], 0

loc_55C498:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C440 endp

align 10h


; Attributes: bp-based frame

sub_55C4A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C4F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCED90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C4F8

loc_55C4F1:
mov	[ebp+var_8], 0

loc_55C4F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C4A0 endp

align 10h


; Attributes: bp-based frame

sub_55C500 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C551
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCECF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C558

loc_55C551:
mov	[ebp+var_8], 0

loc_55C558:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C500 endp

align 10h


; Attributes: bp-based frame

sub_55C560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C5B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7ABD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C5B8

loc_55C5B1:
mov	[ebp+var_8], 0

loc_55C5B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C560 endp

align 10h


; Attributes: bp-based frame

sub_55C5C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C614
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7AB30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C61B

loc_55C614:
mov	[ebp+var_8], 0

loc_55C61B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C5C0 endp

align 10h


; Attributes: bp-based frame

sub_55C630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C681
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCEB80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C688

loc_55C681:
mov	[ebp+var_8], 0

loc_55C688:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C630 endp

align 10h


; Attributes: bp-based frame

sub_55C690 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C6E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCEB10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C6E8

loc_55C6E1:
mov	[ebp+var_8], 0

loc_55C6E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C690 endp

align 10h


; Attributes: bp-based frame

sub_55C6F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C741
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCEA70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C748

loc_55C741:
mov	[ebp+var_8], 0

loc_55C748:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C6F0 endp

align 10h


; Attributes: bp-based frame

sub_55C750 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C7A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE9D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C7A8

loc_55C7A1:
mov	[ebp+var_8], 0

loc_55C7A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C750 endp

align 10h


; Attributes: bp-based frame

sub_55C7B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C801
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE930
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C808

loc_55C801:
mov	[ebp+var_8], 0

loc_55C808:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C7B0 endp

align 10h


; Attributes: bp-based frame

sub_55C810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C861
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE8C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C868

loc_55C861:
mov	[ebp+var_8], 0

loc_55C868:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C810 endp

align 10h


; Attributes: bp-based frame

sub_55C870 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C8C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE800
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C8C8

loc_55C8C1:
mov	[ebp+var_8], 0

loc_55C8C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C870 endp

align 10h


; Attributes: bp-based frame

sub_55C8D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C921
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C928

loc_55C921:
mov	[ebp+var_8], 0

loc_55C928:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C8D0 endp

align 10h


; Attributes: bp-based frame

sub_55C930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C981
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE480
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C988

loc_55C981:
mov	[ebp+var_8], 0

loc_55C988:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C930 endp

align 10h


; Attributes: bp-based frame

sub_55C990 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55C9E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE3B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55C9E8

loc_55C9E1:
mov	[ebp+var_8], 0

loc_55C9E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C990 endp

align 10h


; Attributes: bp-based frame

sub_55C9F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CA41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCE230
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CA48

loc_55CA41:
mov	[ebp+var_8], 0

loc_55CA48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55C9F0 endp

align 10h


; Attributes: bp-based frame

sub_55CA50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CAA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCDDD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CAA8

loc_55CAA1:
mov	[ebp+var_8], 0

loc_55CAA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CA50 endp

align 10h


; Attributes: bp-based frame

sub_55CAB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CB01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCDC30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CB08

loc_55CB01:
mov	[ebp+var_8], 0

loc_55CB08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CAB0 endp

align 10h


; Attributes: bp-based frame

sub_55CB10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CB61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCDB90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CB68

loc_55CB61:
mov	[ebp+var_8], 0

loc_55CB68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CB10 endp

align 10h


; Attributes: bp-based frame

sub_55CB70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CBC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD810
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CBC8

loc_55CBC1:
mov	[ebp+var_8], 0

loc_55CBC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CB70 endp

align 10h


; Attributes: bp-based frame

sub_55CBD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CC21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CC28

loc_55CC21:
mov	[ebp+var_8], 0

loc_55CC28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CBD0 endp

align 10h


; Attributes: bp-based frame

sub_55CC30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CC81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD720
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CC88

loc_55CC81:
mov	[ebp+var_8], 0

loc_55CC88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CC30 endp

align 10h


; Attributes: bp-based frame

sub_55CC90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CCE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD6B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CCE8

loc_55CCE1:
mov	[ebp+var_8], 0

loc_55CCE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CC90 endp

align 10h


; Attributes: bp-based frame

sub_55CCF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CD41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD590
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CD48

loc_55CD41:
mov	[ebp+var_8], 0

loc_55CD48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CCF0 endp

align 10h


; Attributes: bp-based frame

sub_55CD50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CDA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7AAA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CDA8

loc_55CDA1:
mov	[ebp+var_8], 0

loc_55CDA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CD50 endp

align 10h


; Attributes: bp-based frame

sub_55CDB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CE01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A68
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F203A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CE08

loc_55CE01:
mov	[ebp+var_8], 0

loc_55CE08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CDB0 endp

align 10h


; Attributes: bp-based frame

sub_55CE10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0B8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CE64
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A6C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A950
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CE6B

loc_55CE64:
mov	[ebp+var_8], 0

loc_55CE6B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CE10 endp

align 10h


; Attributes: bp-based frame

sub_55CE80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CED1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD2F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CED8

loc_55CED1:
mov	[ebp+var_8], 0

loc_55CED8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CE80 endp

align 10h


; Attributes: bp-based frame

sub_55CEE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CF31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCD1E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CF38

loc_55CF31:
mov	[ebp+var_8], 0

loc_55CF38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CEE0 endp

align 10h


; Attributes: bp-based frame

sub_55CF40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CF91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCCF60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CF98

loc_55CF91:
mov	[ebp+var_8], 0

loc_55CF98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CF40 endp

align 10h


; Attributes: bp-based frame

sub_55CFA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55CFF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCCCE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55CFF8

loc_55CFF1:
mov	[ebp+var_8], 0

loc_55CFF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55CFA0 endp

align 10h


; Attributes: bp-based frame

sub_55D000 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D051
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCCB20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D058

loc_55D051:
mov	[ebp+var_8], 0

loc_55D058:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D000 endp

align 10h


; Attributes: bp-based frame

sub_55D060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D0B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCCAA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D0B8

loc_55D0B1:
mov	[ebp+var_8], 0

loc_55D0B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D060 endp

align 10h


; Attributes: bp-based frame

sub_55D0C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D111
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCCA10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D118

loc_55D111:
mov	[ebp+var_8], 0

loc_55D118:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D0C0 endp

align 10h


; Attributes: bp-based frame

sub_55D120 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D171
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A870
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D178

loc_55D171:
mov	[ebp+var_8], 0

loc_55D178:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D120 endp

align 10h


; Attributes: bp-based frame

sub_55D180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D1D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCC510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D1D8

loc_55D1D1:
mov	[ebp+var_8], 0

loc_55D1D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D180 endp

align 10h


; Attributes: bp-based frame

sub_55D1E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D231
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCC2F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D238

loc_55D231:
mov	[ebp+var_8], 0

loc_55D238:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D1E0 endp

align 10h


; Attributes: bp-based frame

sub_55D240 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D291
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCC220
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D298

loc_55D291:
mov	[ebp+var_8], 0

loc_55D298:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D240 endp

align 10h


; Attributes: bp-based frame

sub_55D2A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D2F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCC120
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D2F8

loc_55D2F1:
mov	[ebp+var_8], 0

loc_55D2F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D2A0 endp

align 10h


; Attributes: bp-based frame

sub_55D300 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D351
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCC0B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D358

loc_55D351:
mov	[ebp+var_8], 0

loc_55D358:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D300 endp

align 10h


; Attributes: bp-based frame

sub_55D360 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D3B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCC040
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D3B8

loc_55D3B1:
mov	[ebp+var_8], 0

loc_55D3B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D360 endp

align 10h


; Attributes: bp-based frame

sub_55D3C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D411
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCBE20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D418

loc_55D411:
mov	[ebp+var_8], 0

loc_55D418:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D3C0 endp

align 10h


; Attributes: bp-based frame

sub_55D420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D471
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCBD20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D478

loc_55D471:
mov	[ebp+var_8], 0

loc_55D478:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D420 endp

align 10h


; Attributes: bp-based frame

sub_55D480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D4D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCBA90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D4D8

loc_55D4D1:
mov	[ebp+var_8], 0

loc_55D4D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D480 endp

align 10h


; Attributes: bp-based frame

sub_55D4E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D531
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCB840
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D538

loc_55D531:
mov	[ebp+var_8], 0

loc_55D538:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D4E0 endp

align 10h


; Attributes: bp-based frame

sub_55D540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D591
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCB5F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D598

loc_55D591:
mov	[ebp+var_8], 0

loc_55D598:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D540 endp

align 10h


; Attributes: bp-based frame

sub_55D5A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D5F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCB330
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D5F8

loc_55D5F1:
mov	[ebp+var_8], 0

loc_55D5F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D5A0 endp

align 10h


; Attributes: bp-based frame

sub_55D600 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D651
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCB1B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D658

loc_55D651:
mov	[ebp+var_8], 0

loc_55D658:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D600 endp

align 10h


; Attributes: bp-based frame

sub_55D660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D6B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCB140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D6B8

loc_55D6B1:
mov	[ebp+var_8], 0

loc_55D6B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D660 endp

align 10h


; Attributes: bp-based frame

sub_55D6C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D711
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCB070
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D718

loc_55D711:
mov	[ebp+var_8], 0

loc_55D718:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D6C0 endp

align 10h


; Attributes: bp-based frame

sub_55D720 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D771
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E4FEF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D778

loc_55D771:
mov	[ebp+var_8], 0

loc_55D778:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D720 endp

align 10h


; Attributes: bp-based frame

sub_55D780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D7D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A7D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D7D8

loc_55D7D1:
mov	[ebp+var_8], 0

loc_55D7D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D780 endp

align 10h


; Attributes: bp-based frame

sub_55D7E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D831
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DFBDC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D838

loc_55D831:
mov	[ebp+var_8], 0

loc_55D838:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D7E0 endp

align 10h


; Attributes: bp-based frame

sub_55D840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D891
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCAE60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D898

loc_55D891:
mov	[ebp+var_8], 0

loc_55D898:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D840 endp

align 10h


; Attributes: bp-based frame

sub_55D8A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D8F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCADE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D8F8

loc_55D8F1:
mov	[ebp+var_8], 0

loc_55D8F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D8A0 endp

align 10h


; Attributes: bp-based frame

sub_55D900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D951
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D958

loc_55D951:
mov	[ebp+var_8], 0

loc_55D958:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D900 endp

align 10h


; Attributes: bp-based frame

sub_55D960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55D9B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA740
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55D9B8

loc_55D9B1:
mov	[ebp+var_8], 0

loc_55D9B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D960 endp

align 10h


; Attributes: bp-based frame

sub_55D9C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DA11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA560
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DA18

loc_55DA11:
mov	[ebp+var_8], 0

loc_55DA18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55D9C0 endp

align 10h


; Attributes: bp-based frame

sub_55DA20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DA71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA3F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DA78

loc_55DA71:
mov	[ebp+var_8], 0

loc_55DA78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DA20 endp

align 10h


; Attributes: bp-based frame

sub_55DA80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DAD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DAD8

loc_55DAD1:
mov	[ebp+var_8], 0

loc_55DAD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DA80 endp

align 10h


; Attributes: bp-based frame

sub_55DAE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DB31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DB38

loc_55DB31:
mov	[ebp+var_8], 0

loc_55DB38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DAE0 endp

align 10h


; Attributes: bp-based frame

sub_55DB40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DB91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA1E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DB98

loc_55DB91:
mov	[ebp+var_8], 0

loc_55DB98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DB40 endp

align 10h


; Attributes: bp-based frame

sub_55DBA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DBF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DCA070
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DBF8

loc_55DBF1:
mov	[ebp+var_8], 0

loc_55DBF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DBA0 endp

align 10h


; Attributes: bp-based frame

sub_55DC00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DC51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9FD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DC58

loc_55DC51:
mov	[ebp+var_8], 0

loc_55DC58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DC00 endp

align 10h


; Attributes: bp-based frame

sub_55DC60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DCB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9E50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DCB8

loc_55DCB1:
mov	[ebp+var_8], 0

loc_55DCB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DC60 endp

align 10h


; Attributes: bp-based frame

sub_55DCC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DD11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9CD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DD18

loc_55DD11:
mov	[ebp+var_8], 0

loc_55DD18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DCC0 endp

align 10h


; Attributes: bp-based frame

sub_55DD20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DD71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9B00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DD78

loc_55DD71:
mov	[ebp+var_8], 0

loc_55DD78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DD20 endp

align 10h


; Attributes: bp-based frame

sub_55DD80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DDD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9930
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DDD8

loc_55DDD1:
mov	[ebp+var_8], 0

loc_55DDD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DD80 endp

align 10h


; Attributes: bp-based frame

sub_55DDE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DE31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9760
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DE38

loc_55DE31:
mov	[ebp+var_8], 0

loc_55DE38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DDE0 endp

align 10h


; Attributes: bp-based frame

sub_55DE40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DE91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC96F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DE98

loc_55DE91:
mov	[ebp+var_8], 0

loc_55DE98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DE40 endp

align 10h


; Attributes: bp-based frame

sub_55DEA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DEF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9680
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DEF8

loc_55DEF1:
mov	[ebp+var_8], 0

loc_55DEF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DEA0 endp

align 10h


; Attributes: bp-based frame

sub_55DF00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DF51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9610
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DF58

loc_55DF51:
mov	[ebp+var_8], 0

loc_55DF58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DF00 endp

align 10h


; Attributes: bp-based frame

sub_55DF60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55DFB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9490
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55DFB8

loc_55DFB1:
mov	[ebp+var_8], 0

loc_55DFB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DF60 endp

align 10h


; Attributes: bp-based frame

sub_55DFC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E011
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC9320
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E018

loc_55E011:
mov	[ebp+var_8], 0

loc_55E018:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55DFC0 endp

align 10h


; Attributes: bp-based frame

sub_55E020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E071
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC91B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E078

loc_55E071:
mov	[ebp+var_8], 0

loc_55E078:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E020 endp

align 10h


; Attributes: bp-based frame

sub_55E080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E0D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC8BE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E0D8

loc_55E0D1:
mov	[ebp+var_8], 0

loc_55E0D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E080 endp

align 10h


; Attributes: bp-based frame

sub_55E0E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E131
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC8880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E138

loc_55E131:
mov	[ebp+var_8], 0

loc_55E138:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E0E0 endp

align 10h


; Attributes: bp-based frame

sub_55E140 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E191
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC8710
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E198

loc_55E191:
mov	[ebp+var_8], 0

loc_55E198:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E140 endp

align 10h


; Attributes: bp-based frame

sub_55E1A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E1F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC85F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E1F8

loc_55E1F1:
mov	[ebp+var_8], 0

loc_55E1F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E1A0 endp

align 10h


; Attributes: bp-based frame

sub_55E200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E251
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC8500
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E258

loc_55E251:
mov	[ebp+var_8], 0

loc_55E258:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E200 endp

align 10h


; Attributes: bp-based frame

sub_55E260 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E2B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC8490
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E2B8

loc_55E2B1:
mov	[ebp+var_8], 0

loc_55E2B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E260 endp

align 10h


; Attributes: bp-based frame

sub_55E2C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E311
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E4BA20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E318

loc_55E311:
mov	[ebp+var_8], 0

loc_55E318:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E2C0 endp

align 10h


; Attributes: bp-based frame

sub_55E320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E371
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC82E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E378

loc_55E371:
mov	[ebp+var_8], 0

loc_55E378:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E320 endp

align 10h


; Attributes: bp-based frame

sub_55E380 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E3D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC8160
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E3D8

loc_55E3D1:
mov	[ebp+var_8], 0

loc_55E3D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E380 endp

align 10h


; Attributes: bp-based frame

sub_55E3E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E431
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC80F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E438

loc_55E431:
mov	[ebp+var_8], 0

loc_55E438:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E3E0 endp

align 10h


; Attributes: bp-based frame

sub_55E440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E491
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC8080
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E498

loc_55E491:
mov	[ebp+var_8], 0

loc_55E498:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E440 endp

align 10h


; Attributes: bp-based frame

sub_55E4A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E4F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7FE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E4F8

loc_55E4F1:
mov	[ebp+var_8], 0

loc_55E4F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E4A0 endp

align 10h


; Attributes: bp-based frame

sub_55E500 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E551
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7F70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E558

loc_55E551:
mov	[ebp+var_8], 0

loc_55E558:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E500 endp

align 10h


; Attributes: bp-based frame

sub_55E560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E5B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7F00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E5B8

loc_55E5B1:
mov	[ebp+var_8], 0

loc_55E5B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E560 endp

align 10h


; Attributes: bp-based frame

sub_55E5C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E611
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC79F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E618

loc_55E611:
mov	[ebp+var_8], 0

loc_55E618:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E5C0 endp

align 10h


; Attributes: bp-based frame

sub_55E620 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E671
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7870
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E678

loc_55E671:
mov	[ebp+var_8], 0

loc_55E678:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E620 endp

align 10h


; Attributes: bp-based frame

sub_55E680 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E6D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC76A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E6D8

loc_55E6D1:
mov	[ebp+var_8], 0

loc_55E6D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E680 endp

align 10h


; Attributes: bp-based frame

sub_55E6E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E731
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7520
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E738

loc_55E731:
mov	[ebp+var_8], 0

loc_55E738:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E6E0 endp

align 10h


; Attributes: bp-based frame

sub_55E740 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E791
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7480
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E798

loc_55E791:
mov	[ebp+var_8], 0

loc_55E798:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E740 endp

align 10h


; Attributes: bp-based frame

sub_55E7A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E7F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DFA680
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E7F8

loc_55E7F1:
mov	[ebp+var_8], 0

loc_55E7F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E7A0 endp

align 10h


; Attributes: bp-based frame

sub_55E800 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E851
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7340
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E858

loc_55E851:
mov	[ebp+var_8], 0

loc_55E858:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E800 endp

align 10h


; Attributes: bp-based frame

sub_55E860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E8B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A730
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E8B8

loc_55E8B1:
mov	[ebp+var_8], 0

loc_55E8B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E860 endp

align 10h


; Attributes: bp-based frame

sub_55E8C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E911
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E918

loc_55E911:
mov	[ebp+var_8], 0

loc_55E918:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E8C0 endp

align 10h


; Attributes: bp-based frame

sub_55E920 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E971
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC71A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E978

loc_55E971:
mov	[ebp+var_8], 0

loc_55E978:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E920 endp

align 10h


; Attributes: bp-based frame

sub_55E980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55E9D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7100
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55E9D8

loc_55E9D1:
mov	[ebp+var_8], 0

loc_55E9D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E980 endp

align 10h


; Attributes: bp-based frame

sub_55E9E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EA31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC7060
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EA38

loc_55EA31:
mov	[ebp+var_8], 0

loc_55EA38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55E9E0 endp

align 10h


; Attributes: bp-based frame

sub_55EA40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EA91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6FC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EA98

loc_55EA91:
mov	[ebp+var_8], 0

loc_55EA98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EA40 endp

align 10h


; Attributes: bp-based frame

sub_55EAA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EAF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6F20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EAF8

loc_55EAF1:
mov	[ebp+var_8], 0

loc_55EAF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EAA0 endp

align 10h


; Attributes: bp-based frame

sub_55EB00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EB51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6E80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EB58

loc_55EB51:
mov	[ebp+var_8], 0

loc_55EB58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EB00 endp

align 10h


; Attributes: bp-based frame

sub_55EB60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EBB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6DB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EBB8

loc_55EBB1:
mov	[ebp+var_8], 0

loc_55EBB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EB60 endp

align 10h


; Attributes: bp-based frame

sub_55EBC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EC11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6D10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EC18

loc_55EC11:
mov	[ebp+var_8], 0

loc_55EC18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EBC0 endp

align 10h


; Attributes: bp-based frame

sub_55EC20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EC71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EC78

loc_55EC71:
mov	[ebp+var_8], 0

loc_55EC78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EC20 endp

align 10h


; Attributes: bp-based frame

sub_55EC80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55ECD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A7C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A690
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55ECD8

loc_55ECD1:
mov	[ebp+var_8], 0

loc_55ECD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EC80 endp

align 10h


; Attributes: bp-based frame

sub_55ECE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55ED31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A5D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55ED38

loc_55ED31:
mov	[ebp+var_8], 0

loc_55ED38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55ECE0 endp

align 10h


; Attributes: bp-based frame

sub_55ED40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55ED91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A80
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A530
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55ED98

loc_55ED91:
mov	[ebp+var_8], 0

loc_55ED98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55ED40 endp

align 10h


; Attributes: bp-based frame

sub_55EDA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EDF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6690
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EDF8

loc_55EDF1:
mov	[ebp+var_8], 0

loc_55EDF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EDA0 endp

align 10h


; Attributes: bp-based frame

sub_55EE00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EE54
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A84
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EE5B

loc_55EE54:
mov	[ebp+var_8], 0

loc_55EE5B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EE00 endp

align 10h


; Attributes: bp-based frame

sub_55EE70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EEC4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A88
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A1A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EECB

loc_55EEC4:
mov	[ebp+var_8], 0

loc_55EECB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EE70 endp

align 10h


; Attributes: bp-based frame

sub_55EEE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EF31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EF38

loc_55EF31:
mov	[ebp+var_8], 0

loc_55EF38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EEE0 endp

align 10h


; Attributes: bp-based frame

sub_55EF40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EF91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6580
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EF98

loc_55EF91:
mov	[ebp+var_8], 0

loc_55EF98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EF40 endp

align 10h


; Attributes: bp-based frame

sub_55EFA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55EFF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC64E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55EFF8

loc_55EFF1:
mov	[ebp+var_8], 0

loc_55EFF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55EFA0 endp

align 10h


; Attributes: bp-based frame

sub_55F000 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F051
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6440
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F058

loc_55F051:
mov	[ebp+var_8], 0

loc_55F058:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F000 endp

align 10h


; Attributes: bp-based frame

sub_55F060 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_55F0D8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DC63D0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_55F0DF

loc_55F0D8:
mov	[ebp+var_14], 0

loc_55F0DF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_55F060 endp



; Attributes: bp-based frame

sub_55F0F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F141
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6330
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F148

loc_55F141:
mov	[ebp+var_8], 0

loc_55F148:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F0F0 endp

align 10h


; Attributes: bp-based frame

sub_55F150 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F1A4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A8C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7A060
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F1AB

loc_55F1A4:
mov	[ebp+var_8], 0

loc_55F1AB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F150 endp

align 10h


; Attributes: bp-based frame

sub_55F1C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A90
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79D60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F218

loc_55F211:
mov	[ebp+var_8], 0

loc_55F218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F1C0 endp

align 10h


; Attributes: bp-based frame

sub_55F220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6290
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F278

loc_55F271:
mov	[ebp+var_8], 0

loc_55F278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F220 endp

align 10h


; Attributes: bp-based frame

sub_55F280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F2D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6200
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F2D8

loc_55F2D1:
mov	[ebp+var_8], 0

loc_55F2D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F280 endp

align 10h


; Attributes: bp-based frame

sub_55F2E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC6170
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F338

loc_55F331:
mov	[ebp+var_8], 0

loc_55F338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F2E0 endp

align 10h


; Attributes: bp-based frame

sub_55F340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC60D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F398

loc_55F391:
mov	[ebp+var_8], 0

loc_55F398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F340 endp

align 10h


; Attributes: bp-based frame

sub_55F3A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F3F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5E20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F3F8

loc_55F3F1:
mov	[ebp+var_8], 0

loc_55F3F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F3A0 endp

align 10h


; Attributes: bp-based frame

sub_55F400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5D10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F458

loc_55F451:
mov	[ebp+var_8], 0

loc_55F458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F400 endp

align 10h


; Attributes: bp-based frame

sub_55F460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F4B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5C70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F4B8

loc_55F4B1:
mov	[ebp+var_8], 0

loc_55F4B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F460 endp

align 10h


; Attributes: bp-based frame

sub_55F4C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5BA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F518

loc_55F511:
mov	[ebp+var_8], 0

loc_55F518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F4C0 endp

align 10h


; Attributes: bp-based frame

sub_55F520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F571
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC59F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F578

loc_55F571:
mov	[ebp+var_8], 0

loc_55F578:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F520 endp

align 10h


; Attributes: bp-based frame

sub_55F580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F5D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5920
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F5D8

loc_55F5D1:
mov	[ebp+var_8], 0

loc_55F5D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F580 endp

align 10h


; Attributes: bp-based frame

sub_55F5E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F631
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5770
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F638

loc_55F631:
mov	[ebp+var_8], 0

loc_55F638:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F5E0 endp

align 10h


; Attributes: bp-based frame

sub_55F640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F691
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC55C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F698

loc_55F691:
mov	[ebp+var_8], 0

loc_55F698:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F640 endp

align 10h


; Attributes: bp-based frame

sub_55F6A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F6F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5170
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F6F8

loc_55F6F1:
mov	[ebp+var_8], 0

loc_55F6F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F6A0 endp

align 10h


; Attributes: bp-based frame

sub_55F700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F751
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC5030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F758

loc_55F751:
mov	[ebp+var_8], 0

loc_55F758:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F700 endp

align 10h


; Attributes: bp-based frame

sub_55F760 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F7B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4E10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F7B8

loc_55F7B1:
mov	[ebp+var_8], 0

loc_55F7B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F760 endp

align 10h


; Attributes: bp-based frame

sub_55F7C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F811
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4D70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F818

loc_55F811:
mov	[ebp+var_8], 0

loc_55F818:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F7C0 endp

align 10h


; Attributes: bp-based frame

sub_55F820 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F871
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4CD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F878

loc_55F871:
mov	[ebp+var_8], 0

loc_55F878:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F820 endp

align 10h


; Attributes: bp-based frame

sub_55F880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F8D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4C60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F8D8

loc_55F8D1:
mov	[ebp+var_8], 0

loc_55F8D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F880 endp

align 10h


; Attributes: bp-based frame

sub_55F8E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F931
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A94
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F938

loc_55F931:
mov	[ebp+var_8], 0

loc_55F938:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F8E0 endp

align 10h


; Attributes: bp-based frame

sub_55F940 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F991
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4B10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F998

loc_55F991:
mov	[ebp+var_8], 0

loc_55F998:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F940 endp

align 10h


; Attributes: bp-based frame

sub_55F9A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55F9F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4A40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55F9F8

loc_55F9F1:
mov	[ebp+var_8], 0

loc_55F9F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55F9A0 endp

align 10h


; Attributes: bp-based frame

sub_55FA00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FA51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FA58

loc_55FA51:
mov	[ebp+var_8], 0

loc_55FA58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FA00 endp

align 10h


; Attributes: bp-based frame

sub_55FA60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FAB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4870
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FAB8

loc_55FAB1:
mov	[ebp+var_8], 0

loc_55FAB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FA60 endp

align 10h


; Attributes: bp-based frame

sub_55FAC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FB11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC46F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FB18

loc_55FB11:
mov	[ebp+var_8], 0

loc_55FB18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FAC0 endp

align 10h


; Attributes: bp-based frame

sub_55FB20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FB71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4570
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FB78

loc_55FB71:
mov	[ebp+var_8], 0

loc_55FB78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FB20 endp

align 10h


; Attributes: bp-based frame

sub_55FB80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FBD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FBD8

loc_55FBD1:
mov	[ebp+var_8], 0

loc_55FBD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FB80 endp

align 10h


; Attributes: bp-based frame

sub_55FBE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FC31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC43B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FC38

loc_55FC31:
mov	[ebp+var_8], 0

loc_55FC38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FBE0 endp

align 10h


; Attributes: bp-based frame

sub_55FC40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FC91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC42E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FC98

loc_55FC91:
mov	[ebp+var_8], 0

loc_55FC98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FC40 endp

align 10h


; Attributes: bp-based frame

sub_55FCA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FCF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A98
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70260
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FCF8

loc_55FCF1:
mov	[ebp+var_8], 0

loc_55FCF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FCA0 endp

align 10h


; Attributes: bp-based frame

sub_55FD00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FD51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4170
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FD58

loc_55FD51:
mov	[ebp+var_8], 0

loc_55FD58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FD00 endp

align 10h


; Attributes: bp-based frame

sub_55FD60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FDB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC40D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FDB8

loc_55FDB1:
mov	[ebp+var_8], 0

loc_55FDB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FD60 endp

align 10h


; Attributes: bp-based frame

sub_55FDC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FE11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC4030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FE18

loc_55FE11:
mov	[ebp+var_8], 0

loc_55FE18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FDC0 endp

align 10h


; Attributes: bp-based frame

sub_55FE20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FE71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79C10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FE78

loc_55FE71:
mov	[ebp+var_8], 0

loc_55FE78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FE20 endp

align 10h


; Attributes: bp-based frame

sub_55FE80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FED1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A9C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79B60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FED8

loc_55FED1:
mov	[ebp+var_8], 0

loc_55FED8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FE80 endp

align 10h


; Attributes: bp-based frame

sub_55FEE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	400h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FF34
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AA0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E8A020
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FF3B

loc_55FF34:
mov	[ebp+var_8], 0

loc_55FF3B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FEE0 endp

align 10h


; Attributes: bp-based frame

sub_55FF50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_55FFA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3DC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_55FFA8

loc_55FFA1:
mov	[ebp+var_8], 0

loc_55FFA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FF50 endp

align 10h


; Attributes: bp-based frame

sub_55FFB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560001
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3CB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560008

loc_560001:
mov	[ebp+var_8], 0

loc_560008:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_55FFB0 endp

align 10h


; Attributes: bp-based frame

sub_560010 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560061
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3BB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560068

loc_560061:
mov	[ebp+var_8], 0

loc_560068:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560010 endp

align 10h


; Attributes: bp-based frame

sub_560070 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5600C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3930
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5600C8

loc_5600C1:
mov	[ebp+var_8], 0

loc_5600C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560070 endp

align 10h


; Attributes: bp-based frame

sub_5600D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560121
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC38B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560128

loc_560121:
mov	[ebp+var_8], 0

loc_560128:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5600D0 endp

align 10h


; Attributes: bp-based frame

sub_560130 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560181
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3840
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560188

loc_560181:
mov	[ebp+var_8], 0

loc_560188:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560130 endp

align 10h


; Attributes: bp-based frame

sub_560190 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5601E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC37A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5601E8

loc_5601E1:
mov	[ebp+var_8], 0

loc_5601E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560190 endp

align 10h


; Attributes: bp-based frame

sub_5601F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560241
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3620
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560248

loc_560241:
mov	[ebp+var_8], 0

loc_560248:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5601F0 endp

align 10h


; Attributes: bp-based frame

sub_560250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5602A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC35A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5602A8

loc_5602A1:
mov	[ebp+var_8], 0

loc_5602A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560250 endp

align 10h


; Attributes: bp-based frame

sub_5602B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560301
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC34A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560308

loc_560301:
mov	[ebp+var_8], 0

loc_560308:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5602B0 endp

align 10h


; Attributes: bp-based frame

sub_560310 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560361
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3400
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560368

loc_560361:
mov	[ebp+var_8], 0

loc_560368:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560310 endp

align 10h


; Attributes: bp-based frame

sub_560370 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5603C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3390
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5603C8

loc_5603C1:
mov	[ebp+var_8], 0

loc_5603C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560370 endp

align 10h


; Attributes: bp-based frame

sub_5603D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560421
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3220
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560428

loc_560421:
mov	[ebp+var_8], 0

loc_560428:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5603D0 endp

align 10h


; Attributes: bp-based frame

sub_560430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560481
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC31B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560488

loc_560481:
mov	[ebp+var_8], 0

loc_560488:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560430 endp

align 10h


; Attributes: bp-based frame

sub_560490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5604E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5604E8

loc_5604E1:
mov	[ebp+var_8], 0

loc_5604E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560490 endp

align 10h


; Attributes: bp-based frame

sub_5604F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560541
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AA4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F4A030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560548

loc_560541:
mov	[ebp+var_8], 0

loc_560548:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5604F0 endp

align 10h


; Attributes: bp-based frame

sub_560550 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5605A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC3000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5605A8

loc_5605A1:
mov	[ebp+var_8], 0

loc_5605A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560550 endp

align 10h


; Attributes: bp-based frame

sub_5605B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560601
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AA8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560608

loc_560601:
mov	[ebp+var_8], 0

loc_560608:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5605B0 endp

align 10h


; Attributes: bp-based frame

sub_560610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560664
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79A40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56066B

loc_560664:
mov	[ebp+var_8], 0

loc_56066B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560610 endp

align 10h


; Attributes: bp-based frame

sub_560680 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5606D4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79920
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5606DB

loc_5606D4:
mov	[ebp+var_8], 0

loc_5606DB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560680 endp

align 10h


; Attributes: bp-based frame

sub_5606F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560741
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79890
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560748

loc_560741:
mov	[ebp+var_8], 0

loc_560748:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5606F0 endp

align 10h


; Attributes: bp-based frame

sub_560750 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5607A4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E797E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5607AB

loc_5607A4:
mov	[ebp+var_8], 0

loc_5607AB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560750 endp

align 10h


; Attributes: bp-based frame

sub_5607C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560811
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC2760
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560818

loc_560811:
mov	[ebp+var_8], 0

loc_560818:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5607C0 endp

align 10h


; Attributes: bp-based frame

sub_560820 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560871
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC26C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560878

loc_560871:
mov	[ebp+var_8], 0

loc_560878:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560820 endp

align 10h


; Attributes: bp-based frame

sub_560880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5608D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC2650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5608D8

loc_5608D1:
mov	[ebp+var_8], 0

loc_5608D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560880 endp

align 10h


; Attributes: bp-based frame

sub_5608E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560931
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC25E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560938

loc_560931:
mov	[ebp+var_8], 0

loc_560938:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5608E0 endp

align 10h


; Attributes: bp-based frame

sub_560940 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560991
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC24E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560998

loc_560991:
mov	[ebp+var_8], 0

loc_560998:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560940 endp

align 10h


; Attributes: bp-based frame

sub_5609A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5609F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC23C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5609F8

loc_5609F1:
mov	[ebp+var_8], 0

loc_5609F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5609A0 endp

align 10h


; Attributes: bp-based frame

sub_560A00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560A51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC2320
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560A58

loc_560A51:
mov	[ebp+var_8], 0

loc_560A58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560A00 endp

align 10h


; Attributes: bp-based frame

sub_560A60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560AB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC1A90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560AB8

loc_560AB1:
mov	[ebp+var_8], 0

loc_560AB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560A60 endp

align 10h


; Attributes: bp-based frame

sub_560AC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_560B38
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DC19C0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_560B3F

loc_560B38:
mov	[ebp+var_14], 0

loc_560B3F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_560AC0 endp



; Attributes: bp-based frame

sub_560B50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0B8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560BA4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560BAB

loc_560BA4:
mov	[ebp+var_8], 0

loc_560BAB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560B50 endp

align 10h


; Attributes: bp-based frame

sub_560BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560C14
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560C1B

loc_560C14:
mov	[ebp+var_8], 0

loc_560C1B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560BC0 endp

align 10h


; Attributes: bp-based frame

sub_560C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560C84
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E795A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560C8B

loc_560C84:
mov	[ebp+var_8], 0

loc_560C8B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560C30 endp

align 10h


; Attributes: bp-based frame

sub_560CA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560CF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC16A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560CF8

loc_560CF1:
mov	[ebp+var_8], 0

loc_560CF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560CA0 endp

align 10h


; Attributes: bp-based frame

sub_560D00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560D51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC1600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560D58

loc_560D51:
mov	[ebp+var_8], 0

loc_560D58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560D00 endp

align 10h


; Attributes: bp-based frame

sub_560D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560DB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BA0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E794F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560DB8

loc_560DB1:
mov	[ebp+var_8], 0

loc_560DB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560D60 endp

align 10h


; Attributes: bp-based frame

sub_560DC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560E11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC1440
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560E18

loc_560E11:
mov	[ebp+var_8], 0

loc_560E18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560DC0 endp

align 10h


; Attributes: bp-based frame

sub_560E20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560E71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC13D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560E78

loc_560E71:
mov	[ebp+var_8], 0

loc_560E78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560E20 endp

align 10h


; Attributes: bp-based frame

sub_560E80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560ED1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC10A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560ED8

loc_560ED1:
mov	[ebp+var_8], 0

loc_560ED8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560E80 endp

align 10h


; Attributes: bp-based frame

sub_560EE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560F31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC0DF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560F38

loc_560F31:
mov	[ebp+var_8], 0

loc_560F38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560EE0 endp

align 10h


; Attributes: bp-based frame

sub_560F40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560F91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC0D50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560F98

loc_560F91:
mov	[ebp+var_8], 0

loc_560F98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560F40 endp

align 10h


; Attributes: bp-based frame

sub_560FA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_560FF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC0BE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_560FF8

loc_560FF1:
mov	[ebp+var_8], 0

loc_560FF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_560FA0 endp

align 10h


; Attributes: bp-based frame

sub_561000 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561051
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC0A70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561058

loc_561051:
mov	[ebp+var_8], 0

loc_561058:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561000 endp

align 10h


; Attributes: bp-based frame

sub_561060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5610B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC09B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5610B8

loc_5610B1:
mov	[ebp+var_8], 0

loc_5610B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561060 endp

align 10h


; Attributes: bp-based frame

sub_5610C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561111
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC0940
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561118

loc_561111:
mov	[ebp+var_8], 0

loc_561118:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5610C0 endp

align 10h


; Attributes: bp-based frame

sub_561120 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561171
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC0880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561178

loc_561171:
mov	[ebp+var_8], 0

loc_561178:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561120 endp

align 10h


; Attributes: bp-based frame

sub_561180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5611D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DC0700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5611D8

loc_5611D1:
mov	[ebp+var_8], 0

loc_5611D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561180 endp

align 10h


; Attributes: bp-based frame

sub_5611E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561234
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56123B

loc_561234:
mov	[ebp+var_8], 0

loc_56123B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5611E0 endp

align 10h


; Attributes: bp-based frame

sub_561250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5612A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBFDE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5612A8

loc_5612A1:
mov	[ebp+var_8], 0

loc_5612A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561250 endp

align 10h


; Attributes: bp-based frame

sub_5612B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561301
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBFCD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561308

loc_561301:
mov	[ebp+var_8], 0

loc_561308:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5612B0 endp

align 10h


; Attributes: bp-based frame

sub_561310 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561361
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBFBF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561368

loc_561361:
mov	[ebp+var_8], 0

loc_561368:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561310 endp

align 10h


; Attributes: bp-based frame

sub_561370 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5613C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF990
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5613C8

loc_5613C1:
mov	[ebp+var_8], 0

loc_5613C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561370 endp

align 10h


; Attributes: bp-based frame

sub_5613D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561421
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF8C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561428

loc_561421:
mov	[ebp+var_8], 0

loc_561428:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5613D0 endp

align 10h


; Attributes: bp-based frame

sub_561430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561481
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF7E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561488

loc_561481:
mov	[ebp+var_8], 0

loc_561488:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561430 endp

align 10h


; Attributes: bp-based frame

sub_561490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5614E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5614E8

loc_5614E1:
mov	[ebp+var_8], 0

loc_5614E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561490 endp

align 10h


; Attributes: bp-based frame

sub_5614F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561541
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF610
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561548

loc_561541:
mov	[ebp+var_8], 0

loc_561548:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5614F0 endp

align 10h


; Attributes: bp-based frame

sub_561550 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5615A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5615A8

loc_5615A1:
mov	[ebp+var_8], 0

loc_5615A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561550 endp

align 10h


; Attributes: bp-based frame

sub_5615B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561601
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF4E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561608

loc_561601:
mov	[ebp+var_8], 0

loc_561608:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5615B0 endp

align 10h


; Attributes: bp-based frame

sub_561610 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_561610
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	0B0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_56168B
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E038
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_F32F70
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_561692

loc_56168B:
mov	[ebp+var_14], 0

loc_561692:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_561610 endp

align 10h


; Attributes: bp-based frame

sub_5616B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBF440
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561708

loc_561701:
mov	[ebp+var_8], 0

loc_561708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5616B0 endp

align 10h


; Attributes: bp-based frame

sub_561710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E793B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561768

loc_561761:
mov	[ebp+var_8], 0

loc_561768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561710 endp

align 10h


; Attributes: bp-based frame

sub_561770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5617C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBED60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5617C8

loc_5617C1:
mov	[ebp+var_8], 0

loc_5617C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561770 endp

align 10h


; Attributes: bp-based frame

sub_5617D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBECC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561828

loc_561821:
mov	[ebp+var_8], 0

loc_561828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5617D0 endp

align 10h


; Attributes: bp-based frame

sub_561830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBEC20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561888

loc_561881:
mov	[ebp+var_8], 0

loc_561888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561830 endp

align 10h


; Attributes: bp-based frame

sub_561890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5618E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBEB00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5618E8

loc_5618E1:
mov	[ebp+var_8], 0

loc_5618E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561890 endp

align 10h


; Attributes: bp-based frame

sub_5618F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBE980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561948

loc_561941:
mov	[ebp+var_8], 0

loc_561948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5618F0 endp

align 10h


; Attributes: bp-based frame

sub_561950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5619A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBE800
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5619A8

loc_5619A1:
mov	[ebp+var_8], 0

loc_5619A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561950 endp

align 10h


; Attributes: bp-based frame

sub_5619B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561A01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBE730
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561A08

loc_561A01:
mov	[ebp+var_8], 0

loc_561A08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5619B0 endp

align 10h


; Attributes: bp-based frame

sub_561A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561A61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79310
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561A68

loc_561A61:
mov	[ebp+var_8], 0

loc_561A68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561A10 endp

align 10h


; Attributes: bp-based frame

sub_561A70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0D8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561AC4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599ABC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1ECE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561ACB

loc_561AC4:
mov	[ebp+var_8], 0

loc_561ACB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561A70 endp

align 10h


; Attributes: bp-based frame

sub_561AE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561B31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBE1C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561B38

loc_561B31:
mov	[ebp+var_8], 0

loc_561B38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561AE0 endp

align 10h


; Attributes: bp-based frame

sub_561B40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561B91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBE120
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561B98

loc_561B91:
mov	[ebp+var_8], 0

loc_561B98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561B40 endp

align 10h


; Attributes: bp-based frame

sub_561BA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561BF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBE060
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561BF8

loc_561BF1:
mov	[ebp+var_8], 0

loc_561BF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561BA0 endp

align 10h


; Attributes: bp-based frame

sub_561C00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561C51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBDF20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561C58

loc_561C51:
mov	[ebp+var_8], 0

loc_561C58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561C00 endp

align 10h


; Attributes: bp-based frame

sub_561C60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561CB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBDEB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561CB8

loc_561CB1:
mov	[ebp+var_8], 0

loc_561CB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561C60 endp

align 10h


; Attributes: bp-based frame

sub_561CC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561D11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AC0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E3F980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561D18

loc_561D11:
mov	[ebp+var_8], 0

loc_561D18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561CC0 endp

align 10h


; Attributes: bp-based frame

sub_561D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561D71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBDBD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561D78

loc_561D71:
mov	[ebp+var_8], 0

loc_561D78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561D20 endp

align 10h


; Attributes: bp-based frame

sub_561D80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561DD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBDA60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561DD8

loc_561DD1:
mov	[ebp+var_8], 0

loc_561DD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561D80 endp

align 10h


; Attributes: bp-based frame

sub_561DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561E31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD9C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561E38

loc_561E31:
mov	[ebp+var_8], 0

loc_561E38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561DE0 endp

align 10h


; Attributes: bp-based frame

sub_561E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561E91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD920
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561E98

loc_561E91:
mov	[ebp+var_8], 0

loc_561E98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561E40 endp

align 10h


; Attributes: bp-based frame

sub_561EA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561EF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561EF8

loc_561EF1:
mov	[ebp+var_8], 0

loc_561EF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561EA0 endp

align 10h


; Attributes: bp-based frame

sub_561F00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561F51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79270
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561F58

loc_561F51:
mov	[ebp+var_8], 0

loc_561F58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561F00 endp

align 10h


; Attributes: bp-based frame

sub_561F60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_561FB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BBC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E791D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_561FB8

loc_561FB1:
mov	[ebp+var_8], 0

loc_561FB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561F60 endp

align 10h


; Attributes: bp-based frame

sub_561FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562011
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD6E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562018

loc_562011:
mov	[ebp+var_8], 0

loc_562018:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_561FC0 endp

align 10h


; Attributes: bp-based frame

sub_562020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562071
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD670
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562078

loc_562071:
mov	[ebp+var_8], 0

loc_562078:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562020 endp

align 10h


; Attributes: bp-based frame

sub_562080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5620D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5620D8

loc_5620D1:
mov	[ebp+var_8], 0

loc_5620D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562080 endp

align 10h


; Attributes: bp-based frame

sub_5620E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562131
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79130
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562138

loc_562131:
mov	[ebp+var_8], 0

loc_562138:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5620E0 endp

align 10h


; Attributes: bp-based frame

sub_562140 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562191
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B08
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E79020
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562198

loc_562191:
mov	[ebp+var_8], 0

loc_562198:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562140 endp

align 10h


; Attributes: bp-based frame

sub_5621A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5621F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78F70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5621F8

loc_5621F1:
mov	[ebp+var_8], 0

loc_5621F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5621A0 endp

align 10h


; Attributes: bp-based frame

sub_562200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562254
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78ED0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56225B

loc_562254:
mov	[ebp+var_8], 0

loc_56225B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562200 endp

align 10h


; Attributes: bp-based frame

sub_562270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5622C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5622C8

loc_5622C1:
mov	[ebp+var_8], 0

loc_5622C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562270 endp

align 10h


; Attributes: bp-based frame

sub_5622D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562321
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DF59C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562328

loc_562321:
mov	[ebp+var_8], 0

loc_562328:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5622D0 endp

align 10h


; Attributes: bp-based frame

sub_562330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562384
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78E30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56238B

loc_562384:
mov	[ebp+var_8], 0

loc_56238B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562330 endp

align 10h


; Attributes: bp-based frame

sub_5623A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5623F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5623F8

loc_5623F1:
mov	[ebp+var_8], 0

loc_5623F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5623A0 endp

align 10h


; Attributes: bp-based frame

sub_562400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0B8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562454
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AC4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78D40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56245B

loc_562454:
mov	[ebp+var_8], 0

loc_56245B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562400 endp

align 10h


; Attributes: bp-based frame

sub_562470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	100h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5624C4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AC8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_ECAD30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5624CB

loc_5624C4:
mov	[ebp+var_8], 0

loc_5624CB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562470 endp

align 10h


; Attributes: bp-based frame

sub_5624E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562531
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD1B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562538

loc_562531:
mov	[ebp+var_8], 0

loc_562538:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5624E0 endp

align 10h


; Attributes: bp-based frame

sub_562540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562591
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD110
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562598

loc_562591:
mov	[ebp+var_8], 0

loc_562598:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562540 endp

align 10h


; Attributes: bp-based frame

sub_5625A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5625F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBD070
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5625F8

loc_5625F1:
mov	[ebp+var_8], 0

loc_5625F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5625A0 endp

align 10h


; Attributes: bp-based frame

sub_562600 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562651
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBCF60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562658

loc_562651:
mov	[ebp+var_8], 0

loc_562658:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562600 endp

align 10h


; Attributes: bp-based frame

sub_562660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5626B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBCDE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5626B8

loc_5626B1:
mov	[ebp+var_8], 0

loc_5626B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562660 endp

align 10h


; Attributes: bp-based frame

sub_5626C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562711
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBCD10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562718

loc_562711:
mov	[ebp+var_8], 0

loc_562718:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5626C0 endp

align 10h


; Attributes: bp-based frame

sub_562720 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562771
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBC790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562778

loc_562771:
mov	[ebp+var_8], 0

loc_562778:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562720 endp

align 10h


; Attributes: bp-based frame

sub_562780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5627D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBC200
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5627D8

loc_5627D1:
mov	[ebp+var_8], 0

loc_5627D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562780 endp

align 10h


; Attributes: bp-based frame

sub_5627E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562831
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBC0A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562838

loc_562831:
mov	[ebp+var_8], 0

loc_562838:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5627E0 endp

align 10h


; Attributes: bp-based frame

sub_562840 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_5628B8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DBBFD0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_5628BF

loc_5628B8:
mov	[ebp+var_14], 0

loc_5628BF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_562840 endp



; Attributes: bp-based frame

sub_5628D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562921
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBBE00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562928

loc_562921:
mov	[ebp+var_8], 0

loc_562928:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5628D0 endp

align 10h


; Attributes: bp-based frame

sub_562930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562981
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBBD60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562988

loc_562981:
mov	[ebp+var_8], 0

loc_562988:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562930 endp

align 10h


; Attributes: bp-based frame

sub_562990 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5629E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBBC90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5629E8

loc_5629E1:
mov	[ebp+var_8], 0

loc_5629E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562990 endp

align 10h


; Attributes: bp-based frame

sub_5629F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562A41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBBBC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562A48

loc_562A41:
mov	[ebp+var_8], 0

loc_562A48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5629F0 endp

align 10h


; Attributes: bp-based frame

sub_562A50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562AA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBBAF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562AA8

loc_562AA1:
mov	[ebp+var_8], 0

loc_562AA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562A50 endp

align 10h


; Attributes: bp-based frame

sub_562AB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562B01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB9F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562B08

loc_562B01:
mov	[ebp+var_8], 0

loc_562B08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562AB0 endp

align 10h


; Attributes: bp-based frame

sub_562B10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562B61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB8F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562B68

loc_562B61:
mov	[ebp+var_8], 0

loc_562B68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562B10 endp

align 10h


; Attributes: bp-based frame

sub_562B70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562BC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562BC8

loc_562BC1:
mov	[ebp+var_8], 0

loc_562BC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562B70 endp

align 10h


; Attributes: bp-based frame

sub_562BD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562C21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB720
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562C28

loc_562C21:
mov	[ebp+var_8], 0

loc_562C28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562BD0 endp

align 10h


; Attributes: bp-based frame

sub_562C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562C81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB620
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562C88

loc_562C81:
mov	[ebp+var_8], 0

loc_562C88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562C30 endp

align 10h


; Attributes: bp-based frame

sub_562C90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562CE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C68
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70020
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562CE8

loc_562CE1:
mov	[ebp+var_8], 0

loc_562CE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562C90 endp

align 10h


; Attributes: bp-based frame

sub_562CF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562D41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562D48

loc_562D41:
mov	[ebp+var_8], 0

loc_562D48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562CF0 endp

align 10h


; Attributes: bp-based frame

sub_562D50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562DA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB470
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562DA8

loc_562DA1:
mov	[ebp+var_8], 0

loc_562DA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562D50 endp

align 10h


; Attributes: bp-based frame

sub_562DB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562E01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB400
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562E08

loc_562E01:
mov	[ebp+var_8], 0

loc_562E08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562DB0 endp

align 10h


; Attributes: bp-based frame

sub_562E10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562E61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB390
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562E68

loc_562E61:
mov	[ebp+var_8], 0

loc_562E68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562E10 endp

align 10h


; Attributes: bp-based frame

sub_562E70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_562E70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_562EE8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E03C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_E78CA0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_562EEF

loc_562EE8:
mov	[ebp+var_14], 0

loc_562EEF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_562E70 endp



; Attributes: bp-based frame

sub_562F00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562F51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB1F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562F58

loc_562F51:
mov	[ebp+var_8], 0

loc_562F58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562F00 endp

align 10h


; Attributes: bp-based frame

sub_562F60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_562FB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB120
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_562FB8

loc_562FB1:
mov	[ebp+var_8], 0

loc_562FB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562F60 endp

align 10h


; Attributes: bp-based frame

sub_562FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563011
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB0A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563018

loc_563011:
mov	[ebp+var_8], 0

loc_563018:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_562FC0 endp

align 10h


; Attributes: bp-based frame

sub_563020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563071
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBB020
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563078

loc_563071:
mov	[ebp+var_8], 0

loc_563078:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563020 endp

align 10h


; Attributes: bp-based frame

sub_563080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5630D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBAFA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5630D8

loc_5630D1:
mov	[ebp+var_8], 0

loc_5630D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563080 endp

align 10h


; Attributes: bp-based frame

sub_5630E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563131
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBADF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563138

loc_563131:
mov	[ebp+var_8], 0

loc_563138:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5630E0 endp

align 10h


; Attributes: bp-based frame

sub_563140 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	108h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563194
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599ACC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78B30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56319B

loc_563194:
mov	[ebp+var_8], 0

loc_56319B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563140 endp

align 10h


; Attributes: bp-based frame

sub_5631B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563201
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBAAC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563208

loc_563201:
mov	[ebp+var_8], 0

loc_563208:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5631B0 endp

align 10h


; Attributes: bp-based frame

sub_563210 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0E8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563264
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AD0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78A20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56326B

loc_563264:
mov	[ebp+var_8], 0

loc_56326B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563210 endp

align 10h


; Attributes: bp-based frame

sub_563280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5632D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBA900
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5632D8

loc_5632D1:
mov	[ebp+var_8], 0

loc_5632D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563280 endp

align 10h


; Attributes: bp-based frame

sub_5632E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBA880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563338

loc_563331:
mov	[ebp+var_8], 0

loc_563338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5632E0 endp

align 10h


; Attributes: bp-based frame

sub_563340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBA540
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563398

loc_563391:
mov	[ebp+var_8], 0

loc_563398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563340 endp

align 10h


; Attributes: bp-based frame

sub_5633A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5633F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DBA280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5633F8

loc_5633F1:
mov	[ebp+var_8], 0

loc_5633F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5633A0 endp

align 10h


; Attributes: bp-based frame

sub_563400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	168h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563454
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AD4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E88640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56345B

loc_563454:
mov	[ebp+var_8], 0

loc_56345B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563400 endp

align 10h


; Attributes: bp-based frame

sub_563470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5634C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB9D20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5634C8

loc_5634C1:
mov	[ebp+var_8], 0

loc_5634C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563470 endp

align 10h


; Attributes: bp-based frame

sub_5634D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563521
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB99C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563528

loc_563521:
mov	[ebp+var_8], 0

loc_563528:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5634D0 endp

align 10h


; Attributes: bp-based frame

sub_563530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563581
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB98F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563588

loc_563581:
mov	[ebp+var_8], 0

loc_563588:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563530 endp

align 10h


; Attributes: bp-based frame

sub_563590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5635E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB9820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5635E8

loc_5635E1:
mov	[ebp+var_8], 0

loc_5635E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563590 endp

align 10h


; Attributes: bp-based frame

sub_5635F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C5C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E3C610
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563648

loc_563641:
mov	[ebp+var_8], 0

loc_563648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5635F0 endp

align 10h


; Attributes: bp-based frame

sub_563650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5636A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB96E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5636A8

loc_5636A1:
mov	[ebp+var_8], 0

loc_5636A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563650 endp

align 10h


; Attributes: bp-based frame

sub_5636B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB95A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563708

loc_563701:
mov	[ebp+var_8], 0

loc_563708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5636B0 endp

align 10h


; Attributes: bp-based frame

sub_563710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB9460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563768

loc_563761:
mov	[ebp+var_8], 0

loc_563768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563710 endp

align 10h


; Attributes: bp-based frame

sub_563770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5637C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB8F20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5637C8

loc_5637C1:
mov	[ebp+var_8], 0

loc_5637C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563770 endp

align 10h


; Attributes: bp-based frame

sub_5637D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AD8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1DCF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563828

loc_563821:
mov	[ebp+var_8], 0

loc_563828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5637D0 endp

align 10h


; Attributes: bp-based frame

sub_563830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB8DF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563888

loc_563881:
mov	[ebp+var_8], 0

loc_563888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563830 endp

align 10h


; Attributes: bp-based frame

sub_563890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5638E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB8D20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5638E8

loc_5638E1:
mov	[ebp+var_8], 0

loc_5638E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563890 endp

align 10h


; Attributes: bp-based frame

sub_5638F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563948

loc_563941:
mov	[ebp+var_8], 0

loc_563948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5638F0 endp

align 10h


; Attributes: bp-based frame

sub_563950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5639A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB8B60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5639A8

loc_5639A1:
mov	[ebp+var_8], 0

loc_5639A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563950 endp

align 10h


; Attributes: bp-based frame

sub_5639B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563A01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB8AC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563A08

loc_563A01:
mov	[ebp+var_8], 0

loc_563A08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5639B0 endp

align 10h


; Attributes: bp-based frame

sub_563A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563A61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB89F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563A68

loc_563A61:
mov	[ebp+var_8], 0

loc_563A68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563A10 endp

align 10h


; Attributes: bp-based frame

sub_563A70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563AC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BBC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E788D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563AC8

loc_563AC1:
mov	[ebp+var_8], 0

loc_563AC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563A70 endp

align 10h


; Attributes: bp-based frame

sub_563AD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563B21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB88A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563B28

loc_563B21:
mov	[ebp+var_8], 0

loc_563B28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563AD0 endp

align 10h


; Attributes: bp-based frame

sub_563B30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563B81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB8680
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563B88

loc_563B81:
mov	[ebp+var_8], 0

loc_563B88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563B30 endp

align 10h


; Attributes: bp-based frame

sub_563B90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563BE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB83A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563BE8

loc_563BE1:
mov	[ebp+var_8], 0

loc_563BE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563B90 endp

align 10h


; Attributes: bp-based frame

sub_563BF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563C41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B04
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB76D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563C48

loc_563C41:
mov	[ebp+var_8], 0

loc_563C48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563BF0 endp

align 10h


; Attributes: bp-based frame

sub_563C50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563CA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB7660
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563CA8

loc_563CA1:
mov	[ebp+var_8], 0

loc_563CA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563C50 endp

align 10h


; Attributes: bp-based frame

sub_563CB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563D01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB7550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563D08

loc_563D01:
mov	[ebp+var_8], 0

loc_563D08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563CB0 endp

align 10h


; Attributes: bp-based frame

sub_563D10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_563D88
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DB74B0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_563D8F

loc_563D88:
mov	[ebp+var_14], 0

loc_563D8F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_563D10 endp



; Attributes: bp-based frame

sub_563DA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563DF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB7410
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563DF8

loc_563DF1:
mov	[ebp+var_8], 0

loc_563DF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563DA0 endp

align 10h


; Attributes: bp-based frame

sub_563E00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563E51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB7290
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563E58

loc_563E51:
mov	[ebp+var_8], 0

loc_563E58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563E00 endp

align 10h


; Attributes: bp-based frame

sub_563E60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563EB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB7180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563EB8

loc_563EB1:
mov	[ebp+var_8], 0

loc_563EB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563E60 endp

align 10h


; Attributes: bp-based frame

sub_563EC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563F11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6FA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563F18

loc_563F11:
mov	[ebp+var_8], 0

loc_563F18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563EC0 endp

align 10h


; Attributes: bp-based frame

sub_563F20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563F71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6F00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563F78

loc_563F71:
mov	[ebp+var_8], 0

loc_563F78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563F20 endp

align 10h


; Attributes: bp-based frame

sub_563F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_563FD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6E60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_563FD8

loc_563FD1:
mov	[ebp+var_8], 0

loc_563FD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563F80 endp

align 10h


; Attributes: bp-based frame

sub_563FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6D90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564038

loc_564031:
mov	[ebp+var_8], 0

loc_564038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_563FE0 endp

align 10h


; Attributes: bp-based frame

sub_564040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6CC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564098

loc_564091:
mov	[ebp+var_8], 0

loc_564098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564040 endp

align 10h


; Attributes: bp-based frame

sub_5640A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5640F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB69C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5640F8

loc_5640F1:
mov	[ebp+var_8], 0

loc_5640F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5640A0 endp

align 10h


; Attributes: bp-based frame

sub_564100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6950
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564158

loc_564151:
mov	[ebp+var_8], 0

loc_564158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564100 endp

align 10h


; Attributes: bp-based frame

sub_564160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5641B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BE4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DF4540
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5641B8

loc_5641B1:
mov	[ebp+var_8], 0

loc_5641B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564160 endp

align 10h


; Attributes: bp-based frame

sub_5641C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB67B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564218

loc_564211:
mov	[ebp+var_8], 0

loc_564218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5641C0 endp

align 10h


; Attributes: bp-based frame

sub_564220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6710
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564278

loc_564271:
mov	[ebp+var_8], 0

loc_564278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564220 endp

align 10h


; Attributes: bp-based frame

sub_564280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5642D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78840
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5642D8

loc_5642D1:
mov	[ebp+var_8], 0

loc_5642D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564280 endp

align 10h


; Attributes: bp-based frame

sub_5642E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564338

loc_564331:
mov	[ebp+var_8], 0

loc_564338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5642E0 endp

align 10h


; Attributes: bp-based frame

sub_564340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599ADC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E3A200
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564398

loc_564391:
mov	[ebp+var_8], 0

loc_564398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564340 endp

align 10h


; Attributes: bp-based frame

sub_5643A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5643F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5643F8

loc_5643F1:
mov	[ebp+var_8], 0

loc_5643F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5643A0 endp

align 10h


; Attributes: bp-based frame

sub_564400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6310
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564458

loc_564451:
mov	[ebp+var_8], 0

loc_564458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564400 endp

align 10h


; Attributes: bp-based frame

sub_564460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5644B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5644B8

loc_5644B1:
mov	[ebp+var_8], 0

loc_5644B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564460 endp

align 10h


; Attributes: bp-based frame

sub_5644C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78660
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564518

loc_564511:
mov	[ebp+var_8], 0

loc_564518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5644C0 endp

align 10h


; Attributes: bp-based frame

sub_564520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564574
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E785B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56457B

loc_564574:
mov	[ebp+var_8], 0

loc_56457B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564520 endp

align 10h


; Attributes: bp-based frame

sub_564590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5645E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB6000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5645E8

loc_5645E1:
mov	[ebp+var_8], 0

loc_5645E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564590 endp

align 10h


; Attributes: bp-based frame

sub_5645F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5F00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564648

loc_564641:
mov	[ebp+var_8], 0

loc_564648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5645F0 endp

align 10h


; Attributes: bp-based frame

sub_564650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5646A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BBC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5646A8

loc_5646A1:
mov	[ebp+var_8], 0

loc_5646A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564650 endp

align 10h


; Attributes: bp-based frame

sub_5646B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5D50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564708

loc_564701:
mov	[ebp+var_8], 0

loc_564708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5646B0 endp

align 10h


; Attributes: bp-based frame

sub_564710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5C80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564768

loc_564761:
mov	[ebp+var_8], 0

loc_564768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564710 endp

align 10h


; Attributes: bp-based frame

sub_564770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5647C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5AD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5647C8

loc_5647C1:
mov	[ebp+var_8], 0

loc_5647C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564770 endp

align 10h


; Attributes: bp-based frame

sub_5647D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5920
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564828

loc_564821:
mov	[ebp+var_8], 0

loc_564828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5647D0 endp

align 10h


; Attributes: bp-based frame

sub_564830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5850
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564888

loc_564881:
mov	[ebp+var_8], 0

loc_564888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564830 endp

align 10h


; Attributes: bp-based frame

sub_564890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5648E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB57E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5648E8

loc_5648E1:
mov	[ebp+var_8], 0

loc_5648E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564890 endp

align 10h


; Attributes: bp-based frame

sub_5648F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78470
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564948

loc_564941:
mov	[ebp+var_8], 0

loc_564948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5648F0 endp

align 10h


; Attributes: bp-based frame

sub_564950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5649A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E783D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5649A8

loc_5649A1:
mov	[ebp+var_8], 0

loc_5649A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564950 endp

align 10h


; Attributes: bp-based frame

sub_5649B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564A01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5100
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564A08

loc_564A01:
mov	[ebp+var_8], 0

loc_564A08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5649B0 endp

align 10h


; Attributes: bp-based frame

sub_564A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564A61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB5010
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564A68

loc_564A61:
mov	[ebp+var_8], 0

loc_564A68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564A10 endp

align 10h


; Attributes: bp-based frame

sub_564A70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0C8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564AC4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78230
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564ACB

loc_564AC4:
mov	[ebp+var_8], 0

loc_564ACB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564A70 endp

align 10h


; Attributes: bp-based frame

sub_564AE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564B31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB48C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564B38

loc_564B31:
mov	[ebp+var_8], 0

loc_564B38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564AE0 endp

align 10h


; Attributes: bp-based frame

sub_564B40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564B91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB4780
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564B98

loc_564B91:
mov	[ebp+var_8], 0

loc_564B98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564B40 endp

align 10h


; Attributes: bp-based frame

sub_564BA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564BF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB4700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564BF8

loc_564BF1:
mov	[ebp+var_8], 0

loc_564BF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564BA0 endp

align 10h


; Attributes: bp-based frame

sub_564C00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564C51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB4580
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564C58

loc_564C51:
mov	[ebp+var_8], 0

loc_564C58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564C00 endp

align 10h


; Attributes: bp-based frame

sub_564C60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564CB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB4510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564CB8

loc_564CB1:
mov	[ebp+var_8], 0

loc_564CB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564C60 endp

align 10h


; Attributes: bp-based frame

sub_564CC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564D11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AEC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E88180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564D18

loc_564D11:
mov	[ebp+var_8], 0

loc_564D18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564CC0 endp

align 10h


; Attributes: bp-based frame

sub_564D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564D71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB44A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564D78

loc_564D71:
mov	[ebp+var_8], 0

loc_564D78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564D20 endp

align 10h


; Attributes: bp-based frame

sub_564D80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564DD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB40A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564DD8

loc_564DD1:
mov	[ebp+var_8], 0

loc_564DD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564D80 endp

align 10h


; Attributes: bp-based frame

sub_564DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564E31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB4030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564E38

loc_564E31:
mov	[ebp+var_8], 0

loc_564E38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564DE0 endp

align 10h


; Attributes: bp-based frame

sub_564E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564E91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3F60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564E98

loc_564E91:
mov	[ebp+var_8], 0

loc_564E98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564E40 endp

align 10h


; Attributes: bp-based frame

sub_564EA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564EF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3E90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564EF8

loc_564EF1:
mov	[ebp+var_8], 0

loc_564EF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564EA0 endp

align 10h


; Attributes: bp-based frame

sub_564F00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564F51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AF0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564F58

loc_564F51:
mov	[ebp+var_8], 0

loc_564F58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564F00 endp

align 10h


; Attributes: bp-based frame

sub_564F60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_564FB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3D30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_564FB8

loc_564FB1:
mov	[ebp+var_8], 0

loc_564FB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564F60 endp

align 10h


; Attributes: bp-based frame

sub_564FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	1F0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565014
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B00
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E88100
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56501B

loc_565014:
mov	[ebp+var_8], 0

loc_56501B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_564FC0 endp

align 10h


; Attributes: bp-based frame

sub_565030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	1F0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565084
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B00
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E88080
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56508B

loc_565084:
mov	[ebp+var_8], 0

loc_56508B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565030 endp

align 10h


; Attributes: bp-based frame

sub_5650A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5650F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3CC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5650F8

loc_5650F1:
mov	[ebp+var_8], 0

loc_5650F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5650A0 endp

align 10h


; Attributes: bp-based frame

sub_565100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B6C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E780C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565158

loc_565151:
mov	[ebp+var_8], 0

loc_565158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565100 endp

align 10h


; Attributes: bp-based frame

sub_565160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5651B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3BC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5651B8

loc_5651B1:
mov	[ebp+var_8], 0

loc_5651B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565160 endp

align 10h


; Attributes: bp-based frame

sub_5651C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3970
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565218

loc_565211:
mov	[ebp+var_8], 0

loc_565218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5651C0 endp

align 10h


; Attributes: bp-based frame

sub_565220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB34B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565278

loc_565271:
mov	[ebp+var_8], 0

loc_565278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565220 endp

align 10h


; Attributes: bp-based frame

sub_565280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5652D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AF4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DF3740
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5652D8

loc_5652D1:
mov	[ebp+var_8], 0

loc_5652D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565280 endp

align 10h


; Attributes: bp-based frame

sub_5652E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565338

loc_565331:
mov	[ebp+var_8], 0

loc_565338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5652E0 endp

align 10h


; Attributes: bp-based frame

sub_565340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3110
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565398

loc_565391:
mov	[ebp+var_8], 0

loc_565398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565340 endp

align 10h


; Attributes: bp-based frame

sub_5653A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5653F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB30A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5653F8

loc_5653F1:
mov	[ebp+var_8], 0

loc_5653F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5653A0 endp

align 10h


; Attributes: bp-based frame

sub_565400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB3000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565458

loc_565451:
mov	[ebp+var_8], 0

loc_565458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565400 endp

align 10h


; Attributes: bp-based frame

sub_565460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5654B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E78020
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5654B8

loc_5654B1:
mov	[ebp+var_8], 0

loc_5654B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565460 endp

align 10h


; Attributes: bp-based frame

sub_5654C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2EF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565518

loc_565511:
mov	[ebp+var_8], 0

loc_565518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5654C0 endp

align 10h


; Attributes: bp-based frame

sub_565520 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_565598
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E040
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DB2DA0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_56559F

loc_565598:
mov	[ebp+var_14], 0

loc_56559F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_565520 endp



; Attributes: bp-based frame

sub_5655B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565601
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2D00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565608

loc_565601:
mov	[ebp+var_8], 0

loc_565608:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5655B0 endp

align 10h


; Attributes: bp-based frame

sub_565610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565661
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565668

loc_565661:
mov	[ebp+var_8], 0

loc_565668:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565610 endp

align 10h


; Attributes: bp-based frame

sub_565670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5656C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2C20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5656C8

loc_5656C1:
mov	[ebp+var_8], 0

loc_5656C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565670 endp

align 10h


; Attributes: bp-based frame

sub_5656D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565721
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77F90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565728

loc_565721:
mov	[ebp+var_8], 0

loc_565728:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5656D0 endp

align 10h


; Attributes: bp-based frame

sub_565730 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565781
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2B50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565788

loc_565781:
mov	[ebp+var_8], 0

loc_565788:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565730 endp

align 10h


; Attributes: bp-based frame

sub_565790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5657E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2A80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5657E8

loc_5657E1:
mov	[ebp+var_8], 0

loc_5657E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565790 endp

align 10h


; Attributes: bp-based frame

sub_5657F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565844
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AF8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77EC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56584B

loc_565844:
mov	[ebp+var_8], 0

loc_56584B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5657F0 endp

align 10h


; Attributes: bp-based frame

sub_565860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5658B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5658B8

loc_5658B1:
mov	[ebp+var_8], 0

loc_5658B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565860 endp

align 10h


; Attributes: bp-based frame

sub_5658C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565911
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB27A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565918

loc_565911:
mov	[ebp+var_8], 0

loc_565918:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5658C0 endp

align 10h


; Attributes: bp-based frame

sub_565920 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_565920
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_565998
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D50
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_F1D6E0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_56599F

loc_565998:
mov	[ebp+var_14], 0

loc_56599F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_565920 endp



; Attributes: bp-based frame

sub_5659B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565A01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AFC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1D650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565A08

loc_565A01:
mov	[ebp+var_8], 0

loc_565A08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5659B0 endp

align 10h


; Attributes: bp-based frame

sub_565A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565A61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2730
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565A68

loc_565A61:
mov	[ebp+var_8], 0

loc_565A68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565A10 endp

align 10h


; Attributes: bp-based frame

sub_565A70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565AC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB26C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565AC8

loc_565AC1:
mov	[ebp+var_8], 0

loc_565AC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565A70 endp

align 10h


; Attributes: bp-based frame

sub_565AD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565B21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565B28

loc_565B21:
mov	[ebp+var_8], 0

loc_565B28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565AD0 endp

align 10h


; Attributes: bp-based frame

sub_565B30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565B81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB24E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565B88

loc_565B81:
mov	[ebp+var_8], 0

loc_565B88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565B30 endp

align 10h


; Attributes: bp-based frame

sub_565B90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565BE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2420
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565BE8

loc_565BE1:
mov	[ebp+var_8], 0

loc_565BE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565B90 endp

align 10h


; Attributes: bp-based frame

sub_565BF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565C41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2360
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565C48

loc_565C41:
mov	[ebp+var_8], 0

loc_565C48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565BF0 endp

align 10h


; Attributes: bp-based frame

sub_565C50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	1F0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565CA4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B00
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E87F30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565CAB

loc_565CA4:
mov	[ebp+var_8], 0

loc_565CAB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565C50 endp

align 10h


; Attributes: bp-based frame

sub_565CC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565D11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB2000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565D18

loc_565D11:
mov	[ebp+var_8], 0

loc_565D18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565CC0 endp

align 10h


; Attributes: bp-based frame

sub_565D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565D71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB1EC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565D78

loc_565D71:
mov	[ebp+var_8], 0

loc_565D78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565D20 endp

align 10h


; Attributes: bp-based frame

sub_565D80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565DD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB1DD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565DD8

loc_565DD1:
mov	[ebp+var_8], 0

loc_565DD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565D80 endp

align 10h


; Attributes: bp-based frame

sub_565DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565E31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB1D50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565E38

loc_565E31:
mov	[ebp+var_8], 0

loc_565E38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565DE0 endp

align 10h


; Attributes: bp-based frame

sub_565E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565E91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB1C00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565E98

loc_565E91:
mov	[ebp+var_8], 0

loc_565E98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565E40 endp

align 10h


; Attributes: bp-based frame

sub_565EA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565EF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB1A90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565EF8

loc_565EF1:
mov	[ebp+var_8], 0

loc_565EF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565EA0 endp

align 10h


; Attributes: bp-based frame

sub_565F00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565F51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77E30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565F58

loc_565F51:
mov	[ebp+var_8], 0

loc_565F58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565F00 endp

align 10h


; Attributes: bp-based frame

sub_565F60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_565FB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB1980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_565FB8

loc_565FB1:
mov	[ebp+var_8], 0

loc_565FB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565F60 endp

align 10h


; Attributes: bp-based frame

sub_565FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566011
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB1910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566018

loc_566011:
mov	[ebp+var_8], 0

loc_566018:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_565FC0 endp

align 10h


; Attributes: bp-based frame

sub_566020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566071
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B04
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB0C50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566078

loc_566071:
mov	[ebp+var_8], 0

loc_566078:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566020 endp

align 10h


; Attributes: bp-based frame

sub_566080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5660D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B08
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77D40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5660D8

loc_5660D1:
mov	[ebp+var_8], 0

loc_5660D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566080 endp

align 10h


; Attributes: bp-based frame

sub_5660E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566131
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566138

loc_566131:
mov	[ebp+var_8], 0

loc_566138:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5660E0 endp

align 10h


; Attributes: bp-based frame

sub_566140 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566191
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77BE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566198

loc_566191:
mov	[ebp+var_8], 0

loc_566198:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566140 endp

align 10h


; Attributes: bp-based frame

sub_5661A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0C8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5661F4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158191C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77AB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5661FB

loc_5661F4:
mov	[ebp+var_8], 0

loc_5661FB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5661A0 endp

align 10h


; Attributes: bp-based frame

sub_566210 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566264
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77A00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56626B

loc_566264:
mov	[ebp+var_8], 0

loc_56626B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566210 endp

align 10h


; Attributes: bp-based frame

sub_566280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5662D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB0550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5662D8

loc_5662D1:
mov	[ebp+var_8], 0

loc_5662D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566280 endp

align 10h


; Attributes: bp-based frame

sub_5662E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB0310
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566338

loc_566331:
mov	[ebp+var_8], 0

loc_566338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5662E0 endp

align 10h


; Attributes: bp-based frame

sub_566340 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_5663B8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_155E044
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DB0260
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_5663BF

loc_5663B8:
mov	[ebp+var_14], 0

loc_5663BF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_566340 endp



; Attributes: bp-based frame

sub_5663D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566421
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77940
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566428

loc_566421:
mov	[ebp+var_8], 0

loc_566428:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5663D0 endp

align 10h


; Attributes: bp-based frame

sub_566430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566481
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DB00A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566488

loc_566481:
mov	[ebp+var_8], 0

loc_566488:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566430 endp

align 10h


; Attributes: bp-based frame

sub_566490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5664E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E778B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5664E8

loc_5664E1:
mov	[ebp+var_8], 0

loc_5664E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566490 endp

align 10h


; Attributes: bp-based frame

sub_5664F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566544
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B18
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1CB40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56654B

loc_566544:
mov	[ebp+var_8], 0

loc_56654B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5664F0 endp

align 10h


; Attributes: bp-based frame

sub_566560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5665B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5665B8

loc_5665B1:
mov	[ebp+var_8], 0

loc_5665B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566560 endp

align 10h


; Attributes: bp-based frame

sub_5665C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566611
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAFFB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566618

loc_566611:
mov	[ebp+var_8], 0

loc_566618:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5665C0 endp

align 10h


; Attributes: bp-based frame

sub_566620 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566671
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B1C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F2E220
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566678

loc_566671:
mov	[ebp+var_8], 0

loc_566678:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566620 endp

align 10h


; Attributes: bp-based frame

sub_566680 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5666D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAFEA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5666D8

loc_5666D1:
mov	[ebp+var_8], 0

loc_5666D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566680 endp

align 10h


; Attributes: bp-based frame

sub_5666E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	1F8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566734
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B20
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E87AB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56673B

loc_566734:
mov	[ebp+var_8], 0

loc_56673B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5666E0 endp

align 10h


; Attributes: bp-based frame

sub_566750 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5667A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAFE30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5667A8

loc_5667A1:
mov	[ebp+var_8], 0

loc_5667A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566750 endp

align 10h


; Attributes: bp-based frame

sub_5667B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566801
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1CA30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566808

loc_566801:
mov	[ebp+var_8], 0

loc_566808:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5667B0 endp

align 10h


; Attributes: bp-based frame

sub_566810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566861
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566868

loc_566861:
mov	[ebp+var_8], 0

loc_566868:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566810 endp

align 10h


; Attributes: bp-based frame

sub_566870 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5668C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5668C8

loc_5668C1:
mov	[ebp+var_8], 0

loc_5668C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566870 endp

align 10h


; Attributes: bp-based frame

sub_5668D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566921
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAFD10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566928

loc_566921:
mov	[ebp+var_8], 0

loc_566928:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5668D0 endp

align 10h


; Attributes: bp-based frame

sub_566930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566981
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAFC40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566988

loc_566981:
mov	[ebp+var_8], 0

loc_566988:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566930 endp

align 10h


; Attributes: bp-based frame

sub_566990 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5669E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAFB70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5669E8

loc_5669E1:
mov	[ebp+var_8], 0

loc_5669E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566990 endp

align 10h


; Attributes: bp-based frame

sub_5669F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566A41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAFAA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566A48

loc_566A41:
mov	[ebp+var_8], 0

loc_566A48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5669F0 endp

align 10h


; Attributes: bp-based frame

sub_566A50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566AA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAF8A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566AA8

loc_566AA1:
mov	[ebp+var_8], 0

loc_566AA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566A50 endp

align 10h


; Attributes: bp-based frame

sub_566AB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566B01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAF780
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566B08

loc_566B01:
mov	[ebp+var_8], 0

loc_566B08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566AB0 endp

align 10h


; Attributes: bp-based frame

sub_566B10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566B61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAF6F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566B68

loc_566B61:
mov	[ebp+var_8], 0

loc_566B68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566B10 endp

align 10h


; Attributes: bp-based frame

sub_566B70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566BC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAF660
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566BC8

loc_566BC1:
mov	[ebp+var_8], 0

loc_566BC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566B70 endp

align 10h


; Attributes: bp-based frame

sub_566BD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566C21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAF100
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566C28

loc_566C21:
mov	[ebp+var_8], 0

loc_566C28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566BD0 endp

align 10h


; Attributes: bp-based frame

sub_566C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566C81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAEED0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566C88

loc_566C81:
mov	[ebp+var_8], 0

loc_566C88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566C30 endp

align 10h


; Attributes: bp-based frame

sub_566C90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566CE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAEE60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566CE8

loc_566CE1:
mov	[ebp+var_8], 0

loc_566CE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566C90 endp

align 10h


; Attributes: bp-based frame

sub_566CF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566D41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAEDD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566D48

loc_566D41:
mov	[ebp+var_8], 0

loc_566D48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566CF0 endp

align 10h


; Attributes: bp-based frame

sub_566D50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566DA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77660
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566DA8

loc_566DA1:
mov	[ebp+var_8], 0

loc_566DA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566D50 endp

align 10h


; Attributes: bp-based frame

sub_566DB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566E01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAEC80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566E08

loc_566E01:
mov	[ebp+var_8], 0

loc_566E08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566DB0 endp

align 10h


; Attributes: bp-based frame

sub_566E10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566E61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAEB90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566E68

loc_566E61:
mov	[ebp+var_8], 0

loc_566E68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566E10 endp

align 10h


; Attributes: bp-based frame

sub_566E70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566EC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAEAF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566EC8

loc_566EC1:
mov	[ebp+var_8], 0

loc_566EC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566E70 endp

align 10h


; Attributes: bp-based frame

sub_566ED0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566F21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAEA00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566F28

loc_566F21:
mov	[ebp+var_8], 0

loc_566F28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566ED0 endp

align 10h


; Attributes: bp-based frame

sub_566F30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566F81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566F88

loc_566F81:
mov	[ebp+var_8], 0

loc_566F88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566F30 endp

align 10h


; Attributes: bp-based frame

sub_566F90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_566FE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE6E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_566FE8

loc_566FE1:
mov	[ebp+var_8], 0

loc_566FE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566F90 endp

align 10h


; Attributes: bp-based frame

sub_566FF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567041
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567048

loc_567041:
mov	[ebp+var_8], 0

loc_567048:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_566FF0 endp

align 10h


; Attributes: bp-based frame

sub_567050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5670A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE420
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5670A8

loc_5670A1:
mov	[ebp+var_8], 0

loc_5670A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567050 endp

align 10h


; Attributes: bp-based frame

sub_5670B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567101
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE210
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567108

loc_567101:
mov	[ebp+var_8], 0

loc_567108:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5670B0 endp

align 10h


; Attributes: bp-based frame

sub_567110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567161
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE1A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567168

loc_567161:
mov	[ebp+var_8], 0

loc_567168:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567110 endp

align 10h


; Attributes: bp-based frame

sub_567170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5671C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE130
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5671C8

loc_5671C1:
mov	[ebp+var_8], 0

loc_5671C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567170 endp

align 10h


; Attributes: bp-based frame

sub_5671D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567221
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAE030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567228

loc_567221:
mov	[ebp+var_8], 0

loc_567228:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5671D0 endp

align 10h


; Attributes: bp-based frame

sub_567230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567281
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E775C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567288

loc_567281:
mov	[ebp+var_8], 0

loc_567288:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567230 endp

align 10h


; Attributes: bp-based frame

sub_567290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5672E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DADFA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5672E8

loc_5672E1:
mov	[ebp+var_8], 0

loc_5672E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567290 endp

align 10h


; Attributes: bp-based frame

sub_5672F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567341
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77520
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567348

loc_567341:
mov	[ebp+var_8], 0

loc_567348:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5672F0 endp

align 10h


; Attributes: bp-based frame

sub_567350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5673A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77480
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5673A8

loc_5673A1:
mov	[ebp+var_8], 0

loc_5673A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567350 endp

align 10h


; Attributes: bp-based frame

sub_5673B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567401
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E773F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567408

loc_567401:
mov	[ebp+var_8], 0

loc_567408:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5673B0 endp

align 10h


; Attributes: bp-based frame

sub_567410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567461
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77360
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567468

loc_567461:
mov	[ebp+var_8], 0

loc_567468:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567410 endp

align 10h


; Attributes: bp-based frame

sub_567470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5674C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B34
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E771C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5674C8

loc_5674C1:
mov	[ebp+var_8], 0

loc_5674C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567470 endp

align 10h


; Attributes: bp-based frame

sub_5674D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567521
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DADDD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567528

loc_567521:
mov	[ebp+var_8], 0

loc_567528:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5674D0 endp

align 10h


; Attributes: bp-based frame

sub_567530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567581
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E5DC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77110
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567588

loc_567581:
mov	[ebp+var_8], 0

loc_567588:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567530 endp

align 10h


; Attributes: bp-based frame

sub_567590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5675E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77070
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5675E8

loc_5675E1:
mov	[ebp+var_8], 0

loc_5675E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567590 endp

align 10h


; Attributes: bp-based frame

sub_5675F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B38
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76FC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567648

loc_567641:
mov	[ebp+var_8], 0

loc_567648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5675F0 endp

align 10h


; Attributes: bp-based frame

sub_567650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5676A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E5DC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76F10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5676A8

loc_5676A1:
mov	[ebp+var_8], 0

loc_5676A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567650 endp

align 10h


; Attributes: bp-based frame

sub_5676B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E5DC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76E70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567708

loc_567701:
mov	[ebp+var_8], 0

loc_567708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5676B0 endp

align 10h


; Attributes: bp-based frame

sub_567710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76DD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567768

loc_567761:
mov	[ebp+var_8], 0

loc_567768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567710 endp

align 10h


; Attributes: bp-based frame

sub_567770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5677C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E5DC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76D20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5677C8

loc_5677C1:
mov	[ebp+var_8], 0

loc_5677C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567770 endp

align 10h


; Attributes: bp-based frame

sub_5677D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567828

loc_567821:
mov	[ebp+var_8], 0

loc_567828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5677D0 endp

align 10h


; Attributes: bp-based frame

sub_567830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76C00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567888

loc_567881:
mov	[ebp+var_8], 0

loc_567888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567830 endp

align 10h


; Attributes: bp-based frame

sub_567890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5678E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76B70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5678E8

loc_5678E1:
mov	[ebp+var_8], 0

loc_5678E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567890 endp

align 10h


; Attributes: bp-based frame

sub_5678F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76AE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567948

loc_567941:
mov	[ebp+var_8], 0

loc_567948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5678F0 endp

align 10h


; Attributes: bp-based frame

sub_567950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5679A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76A40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5679A8

loc_5679A1:
mov	[ebp+var_8], 0

loc_5679A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567950 endp

align 10h


; Attributes: bp-based frame

sub_5679B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567A01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E5DC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E769A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567A08

loc_567A01:
mov	[ebp+var_8], 0

loc_567A08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5679B0 endp

align 10h


; Attributes: bp-based frame

sub_567A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567A61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DADD00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567A68

loc_567A61:
mov	[ebp+var_8], 0

loc_567A68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567A10 endp

align 10h


; Attributes: bp-based frame

sub_567A70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567AC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DADC30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567AC8

loc_567AC1:
mov	[ebp+var_8], 0

loc_567AC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567A70 endp

align 10h


; Attributes: bp-based frame

sub_567AD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567B21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DADAD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567B28

loc_567B21:
mov	[ebp+var_8], 0

loc_567B28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567AD0 endp

align 10h


; Attributes: bp-based frame

sub_567B30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567B81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DADA40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567B88

loc_567B81:
mov	[ebp+var_8], 0

loc_567B88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567B30 endp

align 10h


; Attributes: bp-based frame

sub_567B90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567BE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B3C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E768D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567BE8

loc_567BE1:
mov	[ebp+var_8], 0

loc_567BE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567B90 endp

align 10h


; Attributes: bp-based frame

sub_567BF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567C41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAD930
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567C48

loc_567C41:
mov	[ebp+var_8], 0

loc_567C48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567BF0 endp

align 10h


; Attributes: bp-based frame

sub_567C50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567CA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAD850
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567CA8

loc_567CA1:
mov	[ebp+var_8], 0

loc_567CA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567C50 endp

align 10h


; Attributes: bp-based frame

sub_567CB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567D01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B40
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E83730
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567D08

loc_567D01:
mov	[ebp+var_8], 0

loc_567D08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567CB0 endp

align 10h


; Attributes: bp-based frame

sub_567D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567D61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B6C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76310
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567D68

loc_567D61:
mov	[ebp+var_8], 0

loc_567D68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567D10 endp

align 10h


; Attributes: bp-based frame

sub_567D70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567DC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAD500
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567DC8

loc_567DC1:
mov	[ebp+var_8], 0

loc_567DC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567D70 endp

align 10h


; Attributes: bp-based frame

sub_567DD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567E21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567E28

loc_567E21:
mov	[ebp+var_8], 0

loc_567E28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567DD0 endp

align 10h


; Attributes: bp-based frame

sub_567E30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567E81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B44
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E761D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567E88

loc_567E81:
mov	[ebp+var_8], 0

loc_567E88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567E30 endp

align 10h


; Attributes: bp-based frame

sub_567E90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567EE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B48
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DF02B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567EE8

loc_567EE1:
mov	[ebp+var_8], 0

loc_567EE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567E90 endp

align 10h


; Attributes: bp-based frame

sub_567EF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567F41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B4C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E6FFA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567F48

loc_567F41:
mov	[ebp+var_8], 0

loc_567F48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567EF0 endp

align 10h


; Attributes: bp-based frame

sub_567F50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_567FA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAD260
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_567FA8

loc_567FA1:
mov	[ebp+var_8], 0

loc_567FA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567F50 endp

align 10h


; Attributes: bp-based frame

sub_567FB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568001
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAD0B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568008

loc_568001:
mov	[ebp+var_8], 0

loc_568008:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_567FB0 endp

align 10h


; Attributes: bp-based frame

sub_568010 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568061
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAD040
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568068

loc_568061:
mov	[ebp+var_8], 0

loc_568068:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568010 endp

align 10h


; Attributes: bp-based frame

sub_568070 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5680C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5680C8

loc_5680C1:
mov	[ebp+var_8], 0

loc_5680C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568070 endp

align 10h


; Attributes: bp-based frame

sub_5680D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568121
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B50
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1C0C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568128

loc_568121:
mov	[ebp+var_8], 0

loc_568128:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5680D0 endp

align 10h


; Attributes: bp-based frame

sub_568130 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568181
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DACF90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568188

loc_568181:
mov	[ebp+var_8], 0

loc_568188:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568130 endp

align 10h


; Attributes: bp-based frame

sub_568190 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5681E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DACF20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5681E8

loc_5681E1:
mov	[ebp+var_8], 0

loc_5681E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568190 endp

align 10h


; Attributes: bp-based frame

sub_5681F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568241
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DACDE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568248

loc_568241:
mov	[ebp+var_8], 0

loc_568248:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5681F0 endp

align 10h


; Attributes: bp-based frame

sub_568250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5682A4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B54
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E76050
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5682AB

loc_5682A4:
mov	[ebp+var_8], 0

loc_5682AB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568250 endp

align 10h


; Attributes: bp-based frame

sub_5682C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568314
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75F90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56831B

loc_568314:
mov	[ebp+var_8], 0

loc_56831B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5682C0 endp

align 10h


; Attributes: bp-based frame

sub_568330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568384
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AB0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75ED0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56838B

loc_568384:
mov	[ebp+var_8], 0

loc_56838B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568330 endp

align 10h


; Attributes: bp-based frame

sub_5683A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_568418
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DACA90
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_56841F

loc_568418:
mov	[ebp+var_14], 0

loc_56841F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5683A0 endp



; Attributes: bp-based frame

sub_568430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568481
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC8C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568488

loc_568481:
mov	[ebp+var_8], 0

loc_568488:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568430 endp

align 10h


; Attributes: bp-based frame

sub_568490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5684E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BA0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75E30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5684E8

loc_5684E1:
mov	[ebp+var_8], 0

loc_5684E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568490 endp

align 10h


; Attributes: bp-based frame

sub_5684F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568541
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75DA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568548

loc_568541:
mov	[ebp+var_8], 0

loc_568548:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5684F0 endp

align 10h


; Attributes: bp-based frame

sub_568550 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5685A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75D00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5685A8

loc_5685A1:
mov	[ebp+var_8], 0

loc_5685A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568550 endp

align 10h


; Attributes: bp-based frame

sub_5685B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568601
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75C60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568608

loc_568601:
mov	[ebp+var_8], 0

loc_568608:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5685B0 endp

align 10h


; Attributes: bp-based frame

sub_568610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568661
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B58
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F41BE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568668

loc_568661:
mov	[ebp+var_8], 0

loc_568668:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568610 endp

align 10h


; Attributes: bp-based frame

sub_568670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5686C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B5C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F41860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5686C8

loc_5686C1:
mov	[ebp+var_8], 0

loc_5686C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568670 endp

align 10h


; Attributes: bp-based frame

sub_5686D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568721
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC850
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568728

loc_568721:
mov	[ebp+var_8], 0

loc_568728:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5686D0 endp

align 10h


; Attributes: bp-based frame

sub_568730 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568781
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC7E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568788

loc_568781:
mov	[ebp+var_8], 0

loc_568788:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568730 endp

align 10h


; Attributes: bp-based frame

sub_568790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5687E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5687E8

loc_5687E1:
mov	[ebp+var_8], 0

loc_5687E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568790 endp

align 10h


; Attributes: bp-based frame

sub_5687F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568841
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC690
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568848

loc_568841:
mov	[ebp+var_8], 0

loc_568848:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5687F0 endp

align 10h


; Attributes: bp-based frame

sub_568850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5688A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC580
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5688A8

loc_5688A1:
mov	[ebp+var_8], 0

loc_5688A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568850 endp

align 10h


; Attributes: bp-based frame

sub_5688B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568901
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B60
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F417D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568908

loc_568901:
mov	[ebp+var_8], 0

loc_568908:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5688B0 endp

align 10h


; Attributes: bp-based frame

sub_568910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568961
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C5C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E30970
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568968

loc_568961:
mov	[ebp+var_8], 0

loc_568968:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568910 endp

align 10h


; Attributes: bp-based frame

sub_568970 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5689C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5689C8

loc_5689C1:
mov	[ebp+var_8], 0

loc_5689C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568970 endp

align 10h


; Attributes: bp-based frame

sub_5689D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568A21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC3E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568A28

loc_568A21:
mov	[ebp+var_8], 0

loc_568A28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5689D0 endp

align 10h


; Attributes: bp-based frame

sub_568A30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568A81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568A88

loc_568A81:
mov	[ebp+var_8], 0

loc_568A88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568A30 endp

align 10h


; Attributes: bp-based frame

sub_568A90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568AE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75BD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568AE8

loc_568AE1:
mov	[ebp+var_8], 0

loc_568AE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568A90 endp

align 10h


; Attributes: bp-based frame

sub_568AF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568B41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75B40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568B48

loc_568B41:
mov	[ebp+var_8], 0

loc_568B48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568AF0 endp

align 10h


; Attributes: bp-based frame

sub_568B50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568BA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581920
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E308C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568BA8

loc_568BA1:
mov	[ebp+var_8], 0

loc_568BA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568B50 endp

align 10h


; Attributes: bp-based frame

sub_568BB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568C01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581924
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E30840
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568C08

loc_568C01:
mov	[ebp+var_8], 0

loc_568C08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568BB0 endp

align 10h


; Attributes: bp-based frame

sub_568C10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568C61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC1F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568C68

loc_568C61:
mov	[ebp+var_8], 0

loc_568C68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568C10 endp

align 10h


; Attributes: bp-based frame

sub_568C70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568CC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75A40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568CC8

loc_568CC1:
mov	[ebp+var_8], 0

loc_568CC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568C70 endp

align 10h


; Attributes: bp-based frame

sub_568CD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568D21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC150
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568D28

loc_568D21:
mov	[ebp+var_8], 0

loc_568D28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568CD0 endp

align 10h


; Attributes: bp-based frame

sub_568D30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568D81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAC0B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568D88

loc_568D81:
mov	[ebp+var_8], 0

loc_568D88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568D30 endp

align 10h


; Attributes: bp-based frame

sub_568D90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568DE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DABF50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568DE8

loc_568DE1:
mov	[ebp+var_8], 0

loc_568DE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568D90 endp

align 10h


; Attributes: bp-based frame

sub_568DF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568E41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DABDF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568E48

loc_568E41:
mov	[ebp+var_8], 0

loc_568E48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568DF0 endp

align 10h


; Attributes: bp-based frame

sub_568E50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568EA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DABD20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568EA8

loc_568EA1:
mov	[ebp+var_8], 0

loc_568EA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568E50 endp

align 10h


; Attributes: bp-based frame

sub_568EB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568F01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAB910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568F08

loc_568F01:
mov	[ebp+var_8], 0

loc_568F08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568EB0 endp

align 10h


; Attributes: bp-based frame

sub_568F10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568F61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAB8A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568F68

loc_568F61:
mov	[ebp+var_8], 0

loc_568F68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568F10 endp

align 10h


; Attributes: bp-based frame

sub_568F70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_568FC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAB790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_568FC8

loc_568FC1:
mov	[ebp+var_8], 0

loc_568FC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568F70 endp

align 10h


; Attributes: bp-based frame

sub_568FD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569021
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAB6F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569028

loc_569021:
mov	[ebp+var_8], 0

loc_569028:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_568FD0 endp

align 10h


; Attributes: bp-based frame

sub_569030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569081
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAB570
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569088

loc_569081:
mov	[ebp+var_8], 0

loc_569088:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569030 endp

align 10h


; Attributes: bp-based frame

sub_569090 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5690E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAB270
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5690E8

loc_5690E1:
mov	[ebp+var_8], 0

loc_5690E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569090 endp

align 10h


; Attributes: bp-based frame

sub_5690F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569141
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAB0B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569148

loc_569141:
mov	[ebp+var_8], 0

loc_569148:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5690F0 endp

align 10h


; Attributes: bp-based frame

sub_569150 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5691A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAAF30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5691A8

loc_5691A1:
mov	[ebp+var_8], 0

loc_5691A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569150 endp

align 10h


; Attributes: bp-based frame

sub_5691B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569201
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAADB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569208

loc_569201:
mov	[ebp+var_8], 0

loc_569208:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5691B0 endp

align 10h


; Attributes: bp-based frame

sub_569210 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569261
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAACD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569268

loc_569261:
mov	[ebp+var_8], 0

loc_569268:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569210 endp

align 10h


; Attributes: bp-based frame

sub_569270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5692C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B68
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DEE9E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5692C8

loc_5692C1:
mov	[ebp+var_8], 0

loc_5692C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569270 endp

align 10h


; Attributes: bp-based frame

sub_5692D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569321
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAAB10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569328

loc_569321:
mov	[ebp+var_8], 0

loc_569328:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5692D0 endp

align 10h


; Attributes: bp-based frame

sub_569330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569381
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B6C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E759A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569388

loc_569381:
mov	[ebp+var_8], 0

loc_569388:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569330 endp

align 10h


; Attributes: bp-based frame

sub_569390 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5693E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E758E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5693E8

loc_5693E1:
mov	[ebp+var_8], 0

loc_5693E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569390 endp

align 10h


; Attributes: bp-based frame

sub_5693F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569441
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75850
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569448

loc_569441:
mov	[ebp+var_8], 0

loc_569448:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5693F0 endp

align 10h


; Attributes: bp-based frame

sub_569450 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5694A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DEE520
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5694A8

loc_5694A1:
mov	[ebp+var_8], 0

loc_5694A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569450 endp

align 10h


; Attributes: bp-based frame

sub_5694B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569501
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAA860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569508

loc_569501:
mov	[ebp+var_8], 0

loc_569508:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5694B0 endp

align 10h


; Attributes: bp-based frame

sub_569510 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569561
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAA730
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569568

loc_569561:
mov	[ebp+var_8], 0

loc_569568:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569510 endp

align 10h


; Attributes: bp-based frame

sub_569570 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5695C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E757B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5695C8

loc_5695C1:
mov	[ebp+var_8], 0

loc_5695C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569570 endp

align 10h


; Attributes: bp-based frame

sub_5695D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569621
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581928
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E2E6F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569628

loc_569621:
mov	[ebp+var_8], 0

loc_569628:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5695D0 endp

align 10h


; Attributes: bp-based frame

sub_569630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569681
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAA6C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569688

loc_569681:
mov	[ebp+var_8], 0

loc_569688:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569630 endp

align 10h


; Attributes: bp-based frame

sub_569690 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5696E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAA640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5696E8

loc_5696E1:
mov	[ebp+var_8], 0

loc_5696E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569690 endp

align 10h


; Attributes: bp-based frame

sub_5696F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569741
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAA4A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569748

loc_569741:
mov	[ebp+var_8], 0

loc_569748:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5696F0 endp

align 10h


; Attributes: bp-based frame

sub_569750 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5697A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DAA390
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5697A8

loc_5697A1:
mov	[ebp+var_8], 0

loc_5697A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569750 endp

align 10h


; Attributes: bp-based frame

sub_5697B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569801
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA9CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569808

loc_569801:
mov	[ebp+var_8], 0

loc_569808:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5697B0 endp

align 10h


; Attributes: bp-based frame

sub_569810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569861
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA9A20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569868

loc_569861:
mov	[ebp+var_8], 0

loc_569868:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569810 endp

align 10h


; Attributes: bp-based frame

sub_569870 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5698C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA9780
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5698C8

loc_5698C1:
mov	[ebp+var_8], 0

loc_5698C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569870 endp

align 10h


; Attributes: bp-based frame

sub_5698D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569921
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8F70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569928

loc_569921:
mov	[ebp+var_8], 0

loc_569928:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5698D0 endp

align 10h


; Attributes: bp-based frame

sub_569930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569981
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8DF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569988

loc_569981:
mov	[ebp+var_8], 0

loc_569988:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569930 endp

align 10h


; Attributes: bp-based frame

sub_569990 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5699E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8CC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5699E8

loc_5699E1:
mov	[ebp+var_8], 0

loc_5699E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569990 endp

align 10h


; Attributes: bp-based frame

sub_5699F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569A41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8BD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569A48

loc_569A41:
mov	[ebp+var_8], 0

loc_569A48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5699F0 endp

align 10h


; Attributes: bp-based frame

sub_569A50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569AA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8B30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569AA8

loc_569AA1:
mov	[ebp+var_8], 0

loc_569AA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569A50 endp

align 10h


; Attributes: bp-based frame

sub_569AB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569B01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8A60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569B08

loc_569B01:
mov	[ebp+var_8], 0

loc_569B08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569AB0 endp

align 10h


; Attributes: bp-based frame

sub_569B10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569B61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B7C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E6FEA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569B68

loc_569B61:
mov	[ebp+var_8], 0

loc_569B68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569B10 endp

align 10h


; Attributes: bp-based frame

sub_569B70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569BC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8990
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569BC8

loc_569BC1:
mov	[ebp+var_8], 0

loc_569BC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569B70 endp

align 10h


; Attributes: bp-based frame

sub_569BD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569C21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569C28

loc_569C21:
mov	[ebp+var_8], 0

loc_569C28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569BD0 endp

align 10h


; Attributes: bp-based frame

sub_569C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569C81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1C040
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569C88

loc_569C81:
mov	[ebp+var_8], 0

loc_569C88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569C30 endp

align 10h


; Attributes: bp-based frame

sub_569C90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569CE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B80
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1BFB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569CE8

loc_569CE1:
mov	[ebp+var_8], 0

loc_569CE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569C90 endp

align 10h


; Attributes: bp-based frame

sub_569CF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569D41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8810
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569D48

loc_569D41:
mov	[ebp+var_8], 0

loc_569D48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569CF0 endp

align 10h


; Attributes: bp-based frame

sub_569D50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569DA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569DA8

loc_569DA1:
mov	[ebp+var_8], 0

loc_569DA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569D50 endp

align 10h


; Attributes: bp-based frame

sub_569DB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569E01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8720
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569E08

loc_569E01:
mov	[ebp+var_8], 0

loc_569E08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569DB0 endp

align 10h


; Attributes: bp-based frame

sub_569E10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569E61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8610
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569E68

loc_569E61:
mov	[ebp+var_8], 0

loc_569E68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569E10 endp

align 10h


; Attributes: bp-based frame

sub_569E70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569EC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA85A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569EC8

loc_569EC1:
mov	[ebp+var_8], 0

loc_569EC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569E70 endp

align 10h


; Attributes: bp-based frame

sub_569ED0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569F21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B84
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DEE1A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569F28

loc_569F21:
mov	[ebp+var_8], 0

loc_569F28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569ED0 endp

align 10h


; Attributes: bp-based frame

sub_569F30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569F81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8530
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569F88

loc_569F81:
mov	[ebp+var_8], 0

loc_569F88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569F30 endp

align 10h


; Attributes: bp-based frame

sub_569F90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_569FE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA83C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_569FE8

loc_569FE1:
mov	[ebp+var_8], 0

loc_569FE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569F90 endp

align 10h


; Attributes: bp-based frame

sub_569FF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A041
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A048

loc_56A041:
mov	[ebp+var_8], 0

loc_56A048:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_569FF0 endp

align 10h


; Attributes: bp-based frame

sub_56A050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A0A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA8180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A0A8

loc_56A0A1:
mov	[ebp+var_8], 0

loc_56A0A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A050 endp

align 10h


; Attributes: bp-based frame

sub_56A0B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A101
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA80E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A108

loc_56A101:
mov	[ebp+var_8], 0

loc_56A108:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A0B0 endp

align 10h


; Attributes: bp-based frame

sub_56A110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A161
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA7CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A168

loc_56A161:
mov	[ebp+var_8], 0

loc_56A168:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A110 endp

align 10h


; Attributes: bp-based frame

sub_56A170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A1C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA7530
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A1C8

loc_56A1C1:
mov	[ebp+var_8], 0

loc_56A1C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A170 endp

align 10h


; Attributes: bp-based frame

sub_56A1D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A221
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA7460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A228

loc_56A221:
mov	[ebp+var_8], 0

loc_56A228:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A1D0 endp

align 10h


; Attributes: bp-based frame

sub_56A230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A281
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA72E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A288

loc_56A281:
mov	[ebp+var_8], 0

loc_56A288:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A230 endp

align 10h


; Attributes: bp-based frame

sub_56A290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A2E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA71E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A2E8

loc_56A2E1:
mov	[ebp+var_8], 0

loc_56A2E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A290 endp

align 10h


; Attributes: bp-based frame

sub_56A2F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A341
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA70C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A348

loc_56A341:
mov	[ebp+var_8], 0

loc_56A348:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A2F0 endp

align 10h


; Attributes: bp-based frame

sub_56A350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A3A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6FF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A3A8

loc_56A3A1:
mov	[ebp+var_8], 0

loc_56A3A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A350 endp

align 10h


; Attributes: bp-based frame

sub_56A3B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A401
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B88
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E6FDF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A408

loc_56A401:
mov	[ebp+var_8], 0

loc_56A408:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A3B0 endp

align 10h


; Attributes: bp-based frame

sub_56A410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A461
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75720
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A468

loc_56A461:
mov	[ebp+var_8], 0

loc_56A468:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A410 endp

align 10h


; Attributes: bp-based frame

sub_56A470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A4C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6EF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A4C8

loc_56A4C1:
mov	[ebp+var_8], 0

loc_56A4C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A470 endp

align 10h


; Attributes: bp-based frame

sub_56A4D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A521
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6E20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A528

loc_56A521:
mov	[ebp+var_8], 0

loc_56A528:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A4D0 endp

align 10h


; Attributes: bp-based frame

sub_56A530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A581
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6BE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A588

loc_56A581:
mov	[ebp+var_8], 0

loc_56A588:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A530 endp

align 10h


; Attributes: bp-based frame

sub_56A590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A5E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6B40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A5E8

loc_56A5E1:
mov	[ebp+var_8], 0

loc_56A5E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A590 endp

align 10h


; Attributes: bp-based frame

sub_56A5F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6A70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A648

loc_56A641:
mov	[ebp+var_8], 0

loc_56A648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A5F0 endp

align 10h


; Attributes: bp-based frame

sub_56A650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A6A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E5E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1BF20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A6A8

loc_56A6A1:
mov	[ebp+var_8], 0

loc_56A6A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A650 endp

align 10h


; Attributes: bp-based frame

sub_56A6B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1BEA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A708

loc_56A701:
mov	[ebp+var_8], 0

loc_56A708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A6B0 endp

align 10h


; Attributes: bp-based frame

sub_56A710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA69C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A768

loc_56A761:
mov	[ebp+var_8], 0

loc_56A768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A710 endp

align 10h


; Attributes: bp-based frame

sub_56A770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A7C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6950
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A7C8

loc_56A7C1:
mov	[ebp+var_8], 0

loc_56A7C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A770 endp

align 10h


; Attributes: bp-based frame

sub_56A7D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A828

loc_56A821:
mov	[ebp+var_8], 0

loc_56A828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A7D0 endp

align 10h


; Attributes: bp-based frame

sub_56A830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA66C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A888

loc_56A881:
mov	[ebp+var_8], 0

loc_56A888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A830 endp

align 10h


; Attributes: bp-based frame

sub_56A890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A8E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B8C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E29DD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A8E8

loc_56A8E1:
mov	[ebp+var_8], 0

loc_56A8E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A890 endp

align 10h


; Attributes: bp-based frame

sub_56A8F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6490
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A948

loc_56A941:
mov	[ebp+var_8], 0

loc_56A948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A8F0 endp

align 10h


; Attributes: bp-based frame

sub_56A950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56A9A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA6380
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56A9A8

loc_56A9A1:
mov	[ebp+var_8], 0

loc_56A9A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A950 endp

align 10h


; Attributes: bp-based frame

sub_56A9B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AA01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B90
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E29A00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AA08

loc_56AA01:
mov	[ebp+var_8], 0

loc_56AA08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56A9B0 endp

align 10h


; Attributes: bp-based frame

sub_56AA10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AA61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA5D70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AA68

loc_56AA61:
mov	[ebp+var_8], 0

loc_56AA68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AA10 endp

align 10h


; Attributes: bp-based frame

sub_56AA70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AAC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA5760
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AAC8

loc_56AAC1:
mov	[ebp+var_8], 0

loc_56AAC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AA70 endp

align 10h


; Attributes: bp-based frame

sub_56AAD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AB21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA55E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AB28

loc_56AB21:
mov	[ebp+var_8], 0

loc_56AB28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AAD0 endp

align 10h


; Attributes: bp-based frame

sub_56AB30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AB81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B8C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E298A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AB88

loc_56AB81:
mov	[ebp+var_8], 0

loc_56AB88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AB30 endp

align 10h


; Attributes: bp-based frame

sub_56AB90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56ABE4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B94
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56ABEB

loc_56ABE4:
mov	[ebp+var_8], 0

loc_56ABEB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AB90 endp

align 10h


; Attributes: bp-based frame

sub_56AC00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AC51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA5510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AC58

loc_56AC51:
mov	[ebp+var_8], 0

loc_56AC58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AC00 endp

align 10h


; Attributes: bp-based frame

sub_56AC60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56ACB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA54A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56ACB8

loc_56ACB1:
mov	[ebp+var_8], 0

loc_56ACB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AC60 endp

align 10h


; Attributes: bp-based frame

sub_56ACC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AD11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B98
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E296F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AD18

loc_56AD11:
mov	[ebp+var_8], 0

loc_56AD18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56ACC0 endp

align 10h


; Attributes: bp-based frame

sub_56AD20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AD71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA53D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AD78

loc_56AD71:
mov	[ebp+var_8], 0

loc_56AD78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AD20 endp

align 10h


; Attributes: bp-based frame

sub_56AD80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56ADD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA52C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56ADD8

loc_56ADD1:
mov	[ebp+var_8], 0

loc_56ADD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AD80 endp

align 10h


; Attributes: bp-based frame

sub_56ADE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AE31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA5220
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AE38

loc_56AE31:
mov	[ebp+var_8], 0

loc_56AE38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56ADE0 endp

align 10h


; Attributes: bp-based frame

sub_56AE40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AE91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA50C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AE98

loc_56AE91:
mov	[ebp+var_8], 0

loc_56AE98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AE40 endp

align 10h


; Attributes: bp-based frame

sub_56AEA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AEF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75560
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AEF8

loc_56AEF1:
mov	[ebp+var_8], 0

loc_56AEF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AEA0 endp

align 10h


; Attributes: bp-based frame

sub_56AF00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AF51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA5050
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AF58

loc_56AF51:
mov	[ebp+var_8], 0

loc_56AF58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AF00 endp

align 10h


; Attributes: bp-based frame

sub_56AF60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56AFB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4FD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56AFB8

loc_56AFB1:
mov	[ebp+var_8], 0

loc_56AFB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56AF60 endp

align 10h


; Attributes: bp-based frame

sub_56AFC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_56B038
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_DA4F50
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_56B03F

loc_56B038:
mov	[ebp+var_14], 0

loc_56B03F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_56AFC0 endp



; Attributes: bp-based frame

sub_56B050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B0A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4EB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B0A8

loc_56B0A1:
mov	[ebp+var_8], 0

loc_56B0A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B050 endp

align 10h


; Attributes: bp-based frame

sub_56B0B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B101
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4D00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B108

loc_56B101:
mov	[ebp+var_8], 0

loc_56B108:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B0B0 endp

align 10h


; Attributes: bp-based frame

sub_56B110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B161
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B168

loc_56B161:
mov	[ebp+var_8], 0

loc_56B168:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B110 endp

align 10h


; Attributes: bp-based frame

sub_56B170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B1C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4C10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B1C8

loc_56B1C1:
mov	[ebp+var_8], 0

loc_56B1C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B170 endp

align 10h


; Attributes: bp-based frame

sub_56B1D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B221
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4BA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B228

loc_56B221:
mov	[ebp+var_8], 0

loc_56B228:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B1D0 endp

align 10h


; Attributes: bp-based frame

sub_56B230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B281
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4A30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B288

loc_56B281:
mov	[ebp+var_8], 0

loc_56B288:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B230 endp

align 10h


; Attributes: bp-based frame

sub_56B290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B2E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA49B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B2E8

loc_56B2E1:
mov	[ebp+var_8], 0

loc_56B2E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B290 endp

align 10h


; Attributes: bp-based frame

sub_56B2F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B341
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4940
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B348

loc_56B341:
mov	[ebp+var_8], 0

loc_56B348:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B2F0 endp

align 10h


; Attributes: bp-based frame

sub_56B350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B3A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA48A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B3A8

loc_56B3A1:
mov	[ebp+var_8], 0

loc_56B3A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B350 endp

align 10h


; Attributes: bp-based frame

sub_56B3B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	4C8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B404
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B9C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_EB0730
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B40B

loc_56B404:
mov	[ebp+var_8], 0

loc_56B40B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B3B0 endp

align 10h


; Attributes: bp-based frame

sub_56B420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B471
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4830
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B478

loc_56B471:
mov	[ebp+var_8], 0

loc_56B478:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B420 endp

align 10h


; Attributes: bp-based frame

sub_56B480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B4D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA46A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B4D8

loc_56B4D1:
mov	[ebp+var_8], 0

loc_56B4D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B480 endp

align 10h


; Attributes: bp-based frame

sub_56B4E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B531
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B538

loc_56B531:
mov	[ebp+var_8], 0

loc_56B538:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B4E0 endp

align 10h


; Attributes: bp-based frame

sub_56B540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B591
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158192C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E27770
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B598

loc_56B591:
mov	[ebp+var_8], 0

loc_56B598:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B540 endp

align 10h


; Attributes: bp-based frame

sub_56B5A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B5F4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AF8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75490
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B5FB

loc_56B5F4:
mov	[ebp+var_8], 0

loc_56B5FB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B5A0 endp

align 10h


; Attributes: bp-based frame

sub_56B610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B661
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4290
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B668

loc_56B661:
mov	[ebp+var_8], 0

loc_56B668:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B610 endp

align 10h


; Attributes: bp-based frame

sub_56B670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B6C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA4110
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B6C8

loc_56B6C1:
mov	[ebp+var_8], 0

loc_56B6C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B670 endp

align 10h


; Attributes: bp-based frame

sub_56B6D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B721
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E753F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B728

loc_56B721:
mov	[ebp+var_8], 0

loc_56B728:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B6D0 endp

align 10h


; Attributes: bp-based frame

sub_56B730 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B781
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BA0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B788

loc_56B781:
mov	[ebp+var_8], 0

loc_56B788:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B730 endp

align 10h


; Attributes: bp-based frame

sub_56B790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B7E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA3E80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B7E8

loc_56B7E1:
mov	[ebp+var_8], 0

loc_56B7E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B790 endp

align 10h


; Attributes: bp-based frame

sub_56B7F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B841
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA3D10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B848

loc_56B841:
mov	[ebp+var_8], 0

loc_56B848:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B7F0 endp

align 10h


; Attributes: bp-based frame

sub_56B850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B8A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA3B80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B8A8

loc_56B8A1:
mov	[ebp+var_8], 0

loc_56B8A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B850 endp

align 10h


; Attributes: bp-based frame

sub_56B8B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B901
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E752A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B908

loc_56B901:
mov	[ebp+var_8], 0

loc_56B908:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B8B0 endp

align 10h


; Attributes: bp-based frame

sub_56B910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B961
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA39F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B968

loc_56B961:
mov	[ebp+var_8], 0

loc_56B968:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B910 endp

align 10h


; Attributes: bp-based frame

sub_56B970 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56B9C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A48
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA3420
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56B9C8

loc_56B9C1:
mov	[ebp+var_8], 0

loc_56B9C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B970 endp

align 10h


; Attributes: bp-based frame

sub_56B9D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BA24
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BA4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75160
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BA2B

loc_56BA24:
mov	[ebp+var_8], 0

loc_56BA2B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56B9D0 endp

align 10h


; Attributes: bp-based frame

sub_56BA40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BA91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A48
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA2DB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BA98

loc_56BA91:
mov	[ebp+var_8], 0

loc_56BA98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BA40 endp

align 10h


; Attributes: bp-based frame

sub_56BAA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BAF4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BA8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA2520
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BAFB

loc_56BAF4:
mov	[ebp+var_8], 0

loc_56BAFB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BAA0 endp

align 10h


; Attributes: bp-based frame

sub_56BB10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BB64
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BB0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA1C70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BB6B

loc_56BB64:
mov	[ebp+var_8], 0

loc_56BB6B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BB10 endp

align 10h


; Attributes: bp-based frame

sub_56BB80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BBD4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581908
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA1490
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BBDB

loc_56BBD4:
mov	[ebp+var_8], 0

loc_56BBDB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BB80 endp

align 10h


; Attributes: bp-based frame

sub_56BBF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BC41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA1380
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BC48

loc_56BC41:
mov	[ebp+var_8], 0

loc_56BC48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BBF0 endp

align 10h


; Attributes: bp-based frame

sub_56BC50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BCA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA1270
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BCA8

loc_56BCA1:
mov	[ebp+var_8], 0

loc_56BCA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BC50 endp

align 10h


; Attributes: bp-based frame

sub_56BCB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BD04
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BB0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA1130
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BD0B

loc_56BD04:
mov	[ebp+var_8], 0

loc_56BD0B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BCB0 endp

align 10h


; Attributes: bp-based frame

sub_56BD20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BD74
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581908
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA1000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BD7B

loc_56BD74:
mov	[ebp+var_8], 0

loc_56BD7B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BD20 endp

align 10h


; Attributes: bp-based frame

sub_56BD90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BDE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA0AD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BDE8

loc_56BDE1:
mov	[ebp+var_8], 0

loc_56BDE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BD90 endp

align 10h


; Attributes: bp-based frame

sub_56BDF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BE41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA05A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BE48

loc_56BE41:
mov	[ebp+var_8], 0

loc_56BE48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BDF0 endp

align 10h


; Attributes: bp-based frame

sub_56BE50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BEA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA03D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BEA8

loc_56BEA1:
mov	[ebp+var_8], 0

loc_56BEA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BE50 endp

align 10h


; Attributes: bp-based frame

sub_56BEB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BF01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9FF10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BF08

loc_56BF01:
mov	[ebp+var_8], 0

loc_56BF08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BEB0 endp

align 10h


; Attributes: bp-based frame

sub_56BF10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BF61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9FDE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BF68

loc_56BF61:
mov	[ebp+var_8], 0

loc_56BF68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BF10 endp

align 10h


; Attributes: bp-based frame

sub_56BF70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56BFC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9F920
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56BFC8

loc_56BFC1:
mov	[ebp+var_8], 0

loc_56BFC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BF70 endp

align 10h


; Attributes: bp-based frame

sub_56BFD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C021
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9F840
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C028

loc_56C021:
mov	[ebp+var_8], 0

loc_56C028:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56BFD0 endp

align 10h


; Attributes: bp-based frame

sub_56C030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C081
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9F6E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C088

loc_56C081:
mov	[ebp+var_8], 0

loc_56C088:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C030 endp

align 10h


; Attributes: bp-based frame

sub_56C090 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C0E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9F630
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C0E8

loc_56C0E1:
mov	[ebp+var_8], 0

loc_56C0E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C090 endp

align 10h


; Attributes: bp-based frame

sub_56C0F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C141
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9F4E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C148

loc_56C141:
mov	[ebp+var_8], 0

loc_56C148:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C0F0 endp

align 10h


; Attributes: bp-based frame

sub_56C150 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C1A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9F170
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C1A8

loc_56C1A1:
mov	[ebp+var_8], 0

loc_56C1A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C150 endp

align 10h


; Attributes: bp-based frame

sub_56C1B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C204
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BB4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E75070
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C20B

loc_56C204:
mov	[ebp+var_8], 0

loc_56C20B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C1B0 endp

align 10h


; Attributes: bp-based frame

sub_56C220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C274
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BB8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74F50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C27B

loc_56C274:
mov	[ebp+var_8], 0

loc_56C27B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C220 endp

align 10h


; Attributes: bp-based frame

sub_56C290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C2E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74EC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C2E8

loc_56C2E1:
mov	[ebp+var_8], 0

loc_56C2E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C290 endp

align 10h


; Attributes: bp-based frame

sub_56C2F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C341
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9EE90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C348

loc_56C341:
mov	[ebp+var_8], 0

loc_56C348:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C2F0 endp

align 10h


; Attributes: bp-based frame

sub_56C350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C3A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9EDA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C3A8

loc_56C3A1:
mov	[ebp+var_8], 0

loc_56C3A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C350 endp

align 10h


; Attributes: bp-based frame

sub_56C3B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C401
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B04
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9E7A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C408

loc_56C401:
mov	[ebp+var_8], 0

loc_56C408:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C3B0 endp

align 10h


; Attributes: bp-based frame

sub_56C410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C461
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158192C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E24940
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C468

loc_56C461:
mov	[ebp+var_8], 0

loc_56C468:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C410 endp

align 10h


; Attributes: bp-based frame

sub_56C470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C4C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9E710
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C4C8

loc_56C4C1:
mov	[ebp+var_8], 0

loc_56C4C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C470 endp

align 10h


; Attributes: bp-based frame

sub_56C4D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C521
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BBC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74E10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C528

loc_56C521:
mov	[ebp+var_8], 0

loc_56C528:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C4D0 endp

align 10h


; Attributes: bp-based frame

sub_56C530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C581
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74BF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C588

loc_56C581:
mov	[ebp+var_8], 0

loc_56C588:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C530 endp

align 10h


; Attributes: bp-based frame

sub_56C590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C5E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9E5D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C5E8

loc_56C5E1:
mov	[ebp+var_8], 0

loc_56C5E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C590 endp

align 10h


; Attributes: bp-based frame

sub_56C5F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9E320
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C648

loc_56C641:
mov	[ebp+var_8], 0

loc_56C648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C5F0 endp

align 10h


; Attributes: bp-based frame

sub_56C650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C6A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9DF50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C6A8

loc_56C6A1:
mov	[ebp+var_8], 0

loc_56C6A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C650 endp

align 10h


; Attributes: bp-based frame

sub_56C6B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9DED0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C708

loc_56C701:
mov	[ebp+var_8], 0

loc_56C708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C6B0 endp

align 10h


; Attributes: bp-based frame

sub_56C710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9DB00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C768

loc_56C761:
mov	[ebp+var_8], 0

loc_56C768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C710 endp

align 10h


; Attributes: bp-based frame

sub_56C770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C7C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D8D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C7C8

loc_56C7C1:
mov	[ebp+var_8], 0

loc_56C7C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C770 endp

align 10h


; Attributes: bp-based frame

sub_56C7D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C828

loc_56C821:
mov	[ebp+var_8], 0

loc_56C828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C7D0 endp

align 10h


; Attributes: bp-based frame

sub_56C830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D750
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C888

loc_56C881:
mov	[ebp+var_8], 0

loc_56C888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C830 endp

align 10h


; Attributes: bp-based frame

sub_56C890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C8E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BC0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E24440
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C8E8

loc_56C8E1:
mov	[ebp+var_8], 0

loc_56C8E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C890 endp

align 10h


; Attributes: bp-based frame

sub_56C8F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D4E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C948

loc_56C941:
mov	[ebp+var_8], 0

loc_56C948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C8F0 endp

align 10h


; Attributes: bp-based frame

sub_56C950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56C9A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56C9A8

loc_56C9A1:
mov	[ebp+var_8], 0

loc_56C9A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C950 endp

align 10h


; Attributes: bp-based frame

sub_56C9B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CA01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D3F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CA08

loc_56CA01:
mov	[ebp+var_8], 0

loc_56CA08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56C9B0 endp

align 10h


; Attributes: bp-based frame

sub_56CA10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CA64
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BC4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74A00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CA6B

loc_56CA64:
mov	[ebp+var_8], 0

loc_56CA6B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CA10 endp

align 10h


; Attributes: bp-based frame

sub_56CA80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CAD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D220
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CAD8

loc_56CAD1:
mov	[ebp+var_8], 0

loc_56CAD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CA80 endp

align 10h


; Attributes: bp-based frame

sub_56CAE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CB31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74970
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CB38

loc_56CB31:
mov	[ebp+var_8], 0

loc_56CB38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CAE0 endp

align 10h


; Attributes: bp-based frame

sub_56CB40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CB91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9D1B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CB98

loc_56CB91:
mov	[ebp+var_8], 0

loc_56CB98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CB40 endp

align 10h


; Attributes: bp-based frame

sub_56CBA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CBF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9CFB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CBF8

loc_56CBF1:
mov	[ebp+var_8], 0

loc_56CBF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CBA0 endp

align 10h


; Attributes: bp-based frame

sub_56CC00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CC51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9CF30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CC58

loc_56CC51:
mov	[ebp+var_8], 0

loc_56CC58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CC00 endp

align 10h


; Attributes: bp-based frame

sub_56CC60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CCB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9CE60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CCB8

loc_56CCB1:
mov	[ebp+var_8], 0

loc_56CCB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CC60 endp

align 10h


; Attributes: bp-based frame

sub_56CCC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CD11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BBC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E748D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CD18

loc_56CD11:
mov	[ebp+var_8], 0

loc_56CD18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CCC0 endp

align 10h


; Attributes: bp-based frame

sub_56CD20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CD71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9CAA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CD78

loc_56CD71:
mov	[ebp+var_8], 0

loc_56CD78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CD20 endp

align 10h


; Attributes: bp-based frame

sub_56CD80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CDD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74830
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CDD8

loc_56CDD1:
mov	[ebp+var_8], 0

loc_56CDD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CD80 endp

align 10h


; Attributes: bp-based frame

sub_56CDE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CE31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CE38

loc_56CE31:
mov	[ebp+var_8], 0

loc_56CE38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CDE0 endp

align 10h


; Attributes: bp-based frame

sub_56CE40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CE91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9CA30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CE98

loc_56CE91:
mov	[ebp+var_8], 0

loc_56CE98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CE40 endp

align 10h


; Attributes: bp-based frame

sub_56CEA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CEF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C9C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CEF8

loc_56CEF1:
mov	[ebp+var_8], 0

loc_56CEF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CEA0 endp

align 10h


; Attributes: bp-based frame

sub_56CF00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CF51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C950
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CF58

loc_56CF51:
mov	[ebp+var_8], 0

loc_56CF58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CF00 endp

align 10h


; Attributes: bp-based frame

sub_56CF60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56CFB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C8E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56CFB8

loc_56CFB1:
mov	[ebp+var_8], 0

loc_56CFB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CF60 endp

align 10h


; Attributes: bp-based frame

sub_56CFC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D011
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C870
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D018

loc_56D011:
mov	[ebp+var_8], 0

loc_56D018:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56CFC0 endp

align 10h


; Attributes: bp-based frame

sub_56D020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D071
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BC8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E82650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D078

loc_56D071:
mov	[ebp+var_8], 0

loc_56D078:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D020 endp

align 10h


; Attributes: bp-based frame

sub_56D080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D0D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C7D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D0D8

loc_56D0D1:
mov	[ebp+var_8], 0

loc_56D0D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D080 endp

align 10h


; Attributes: bp-based frame

sub_56D0E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D134
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BCC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1BE00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D13B

loc_56D134:
mov	[ebp+var_8], 0

loc_56D13B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D0E0 endp

align 10h


; Attributes: bp-based frame

sub_56D150 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D1A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C660
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D1A8

loc_56D1A1:
mov	[ebp+var_8], 0

loc_56D1A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D150 endp

align 10h


; Attributes: bp-based frame

sub_56D1B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D201
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D208

loc_56D201:
mov	[ebp+var_8], 0

loc_56D208:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D1B0 endp

align 10h


; Attributes: bp-based frame

sub_56D210 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D261
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C470
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D268

loc_56D261:
mov	[ebp+var_8], 0

loc_56D268:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D210 endp

align 10h


; Attributes: bp-based frame

sub_56D270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D2C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C400
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D2C8

loc_56D2C1:
mov	[ebp+var_8], 0

loc_56D2C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D270 endp

align 10h


; Attributes: bp-based frame

sub_56D2D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D321
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581930
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74570
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D328

loc_56D321:
mov	[ebp+var_8], 0

loc_56D328:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D2D0 endp

align 10h


; Attributes: bp-based frame

sub_56D330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D381
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581930
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D388

loc_56D381:
mov	[ebp+var_8], 0

loc_56D388:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D330 endp

align 10h


; Attributes: bp-based frame

sub_56D390 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D3E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C360
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D3E8

loc_56D3E1:
mov	[ebp+var_8], 0

loc_56D3E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D390 endp

align 10h


; Attributes: bp-based frame

sub_56D3F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D441
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C2C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D448

loc_56D441:
mov	[ebp+var_8], 0

loc_56D448:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D3F0 endp

align 10h


; Attributes: bp-based frame

sub_56D450 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D4A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BD0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E742A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D4A8

loc_56D4A1:
mov	[ebp+var_8], 0

loc_56D4A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D450 endp

align 10h


; Attributes: bp-based frame

sub_56D4B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D501
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74200
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D508

loc_56D501:
mov	[ebp+var_8], 0

loc_56D508:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D4B0 endp

align 10h


; Attributes: bp-based frame

sub_56D510 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D561
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BD4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E74140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D568

loc_56D561:
mov	[ebp+var_8], 0

loc_56D568:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D510 endp

align 10h


; Attributes: bp-based frame

sub_56D570 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D5C4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BD8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73FE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D5CB

loc_56D5C4:
mov	[ebp+var_8], 0

loc_56D5CB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D570 endp

align 10h


; Attributes: bp-based frame

sub_56D5E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D631
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D638

loc_56D631:
mov	[ebp+var_8], 0

loc_56D638:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D5E0 endp

align 10h


; Attributes: bp-based frame

sub_56D640 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_56D6B8
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_D9C1D0
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_56D6BF

loc_56D6B8:
mov	[ebp+var_14], 0

loc_56D6BF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_56D640 endp



; Attributes: bp-based frame

sub_56D6D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D721
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9C0A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D728

loc_56D721:
mov	[ebp+var_8], 0

loc_56D728:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D6D0 endp

align 10h


; Attributes: bp-based frame

sub_56D730 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D781
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9BFF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D788

loc_56D781:
mov	[ebp+var_8], 0

loc_56D788:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D730 endp

align 10h


; Attributes: bp-based frame

sub_56D790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D7E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BDC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E22D00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D7E8

loc_56D7E1:
mov	[ebp+var_8], 0

loc_56D7E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D790 endp

align 10h


; Attributes: bp-based frame

sub_56D7F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D841
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9BDC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D848

loc_56D841:
mov	[ebp+var_8], 0

loc_56D848:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D7F0 endp

align 10h


; Attributes: bp-based frame

sub_56D850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D8A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73F40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D8A8

loc_56D8A1:
mov	[ebp+var_8], 0

loc_56D8A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D850 endp

align 10h


; Attributes: bp-based frame

sub_56D8B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D901
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B78
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73EA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D908

loc_56D901:
mov	[ebp+var_8], 0

loc_56D908:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D8B0 endp

align 10h


; Attributes: bp-based frame

sub_56D910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D961
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9BCE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D968

loc_56D961:
mov	[ebp+var_8], 0

loc_56D968:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D910 endp

align 10h


; Attributes: bp-based frame

sub_56D970 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56D9C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9BC70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56D9C8

loc_56D9C1:
mov	[ebp+var_8], 0

loc_56D9C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D970 endp

align 10h


; Attributes: bp-based frame

sub_56D9D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DA21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73E10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DA28

loc_56DA21:
mov	[ebp+var_8], 0

loc_56DA28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56D9D0 endp

align 10h


; Attributes: bp-based frame

sub_56DA30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DA81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9BB00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DA88

loc_56DA81:
mov	[ebp+var_8], 0

loc_56DA88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DA30 endp

align 10h


; Attributes: bp-based frame

sub_56DA90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DAE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9BA20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DAE8

loc_56DAE1:
mov	[ebp+var_8], 0

loc_56DAE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DA90 endp

align 10h


; Attributes: bp-based frame

sub_56DAF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DB41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73D80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DB48

loc_56DB41:
mov	[ebp+var_8], 0

loc_56DB48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DAF0 endp

align 10h


; Attributes: bp-based frame

sub_56DB50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DBA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9B860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DBA8

loc_56DBA1:
mov	[ebp+var_8], 0

loc_56DBA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DB50 endp

align 10h


; Attributes: bp-based frame

sub_56DBB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DC01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9B6E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DC08

loc_56DC01:
mov	[ebp+var_8], 0

loc_56DC08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DBB0 endp

align 10h


; Attributes: bp-based frame

sub_56DC10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DC61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9B610
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DC68

loc_56DC61:
mov	[ebp+var_8], 0

loc_56DC68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DC10 endp

align 10h


; Attributes: bp-based frame

sub_56DC70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DCC4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BE0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73CC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DCCB

loc_56DCC4:
mov	[ebp+var_8], 0

loc_56DCCB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DC70 endp

align 10h


; Attributes: bp-based frame

sub_56DCE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DD31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9B4E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DD38

loc_56DD31:
mov	[ebp+var_8], 0

loc_56DD38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DCE0 endp

align 10h


; Attributes: bp-based frame

sub_56DD40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DD91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9B470
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DD98

loc_56DD91:
mov	[ebp+var_8], 0

loc_56DD98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DD40 endp

align 10h


; Attributes: bp-based frame

sub_56DDA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DDF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73BF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DDF8

loc_56DDF1:
mov	[ebp+var_8], 0

loc_56DDF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DDA0 endp

align 10h


; Attributes: bp-based frame

sub_56DE00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DE51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9B1F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DE58

loc_56DE51:
mov	[ebp+var_8], 0

loc_56DE58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DE00 endp

align 10h


; Attributes: bp-based frame

sub_56DE60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DEB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73B40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DEB8

loc_56DEB1:
mov	[ebp+var_8], 0

loc_56DEB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DE60 endp

align 10h


; Attributes: bp-based frame

sub_56DEC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DF11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73A90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DF18

loc_56DF11:
mov	[ebp+var_8], 0

loc_56DF18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DEC0 endp

align 10h


; Attributes: bp-based frame

sub_56DF20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DF71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E739E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DF78

loc_56DF71:
mov	[ebp+var_8], 0

loc_56DF78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DF20 endp

align 10h


; Attributes: bp-based frame

sub_56DF80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56DFD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73950
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56DFD8

loc_56DFD1:
mov	[ebp+var_8], 0

loc_56DFD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DF80 endp

align 10h


; Attributes: bp-based frame

sub_56DFE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E738B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E038

loc_56E031:
mov	[ebp+var_8], 0

loc_56E038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56DFE0 endp

align 10h


; Attributes: bp-based frame

sub_56E040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9AF00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E098

loc_56E091:
mov	[ebp+var_8], 0

loc_56E098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E040 endp

align 10h


; Attributes: bp-based frame

sub_56E0A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E0F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A1C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_EA6550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E0F8

loc_56E0F1:
mov	[ebp+var_8], 0

loc_56E0F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E0A0 endp

align 10h


; Attributes: bp-based frame

sub_56E100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A1C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_EA62C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E158

loc_56E151:
mov	[ebp+var_8], 0

loc_56E158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E100 endp

align 10h


; Attributes: bp-based frame

sub_56E160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E1B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9ADF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E1B8

loc_56E1B1:
mov	[ebp+var_8], 0

loc_56E1B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E160 endp

align 10h


; Attributes: bp-based frame

sub_56E1C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BC0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E213F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E218

loc_56E211:
mov	[ebp+var_8], 0

loc_56E218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E1C0 endp

align 10h


; Attributes: bp-based frame

sub_56E220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9AD80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E278

loc_56E271:
mov	[ebp+var_8], 0

loc_56E278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E220 endp

align 10h


; Attributes: bp-based frame

sub_56E280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E2D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E2D8

loc_56E2D1:
mov	[ebp+var_8], 0

loc_56E2D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E280 endp

align 10h


; Attributes: bp-based frame

sub_56E2E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9ACD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E338

loc_56E331:
mov	[ebp+var_8], 0

loc_56E338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E2E0 endp

align 10h


; Attributes: bp-based frame

sub_56E340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73780
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E398

loc_56E391:
mov	[ebp+var_8], 0

loc_56E398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E340 endp

align 10h


; Attributes: bp-based frame

sub_56E3A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E3F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9AB70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E3F8

loc_56E3F1:
mov	[ebp+var_8], 0

loc_56E3F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E3A0 endp

align 10h


; Attributes: bp-based frame

sub_56E400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BE4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE9CC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E458

loc_56E451:
mov	[ebp+var_8], 0

loc_56E458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E400 endp

align 10h


; Attributes: bp-based frame

sub_56E460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E4B4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E736A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E4BB

loc_56E4B4:
mov	[ebp+var_8], 0

loc_56E4BB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E460 endp

align 10h


; Attributes: bp-based frame

sub_56E4D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E521
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E528

loc_56E521:
mov	[ebp+var_8], 0

loc_56E528:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E4D0 endp

align 10h


; Attributes: bp-based frame

sub_56E530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E581
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73560
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E588

loc_56E581:
mov	[ebp+var_8], 0

loc_56E588:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E530 endp

align 10h


; Attributes: bp-based frame

sub_56E590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E5E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A900
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E5E8

loc_56E5E1:
mov	[ebp+var_8], 0

loc_56E5E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E590 endp

align 10h


; Attributes: bp-based frame

sub_56E5F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A890
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E648

loc_56E641:
mov	[ebp+var_8], 0

loc_56E648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E5F0 endp

align 10h


; Attributes: bp-based frame

sub_56E650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E6A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A7F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E6A8

loc_56E6A1:
mov	[ebp+var_8], 0

loc_56E6A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E650 endp

align 10h


; Attributes: bp-based frame

sub_56E6B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A6C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E708

loc_56E701:
mov	[ebp+var_8], 0

loc_56E708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E6B0 endp

align 10h


; Attributes: bp-based frame

sub_56E710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A5F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E768

loc_56E761:
mov	[ebp+var_8], 0

loc_56E768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E710 endp

align 10h


; Attributes: bp-based frame

sub_56E770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E7C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A4E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E7C8

loc_56E7C1:
mov	[ebp+var_8], 0

loc_56E7C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E770 endp

align 10h


; Attributes: bp-based frame

sub_56E7D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E828

loc_56E821:
mov	[ebp+var_8], 0

loc_56E828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E7D0 endp

align 10h


; Attributes: bp-based frame

sub_56E830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A340
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E888

loc_56E881:
mov	[ebp+var_8], 0

loc_56E888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E830 endp

align 10h


; Attributes: bp-based frame

sub_56E890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E8E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E8E8

loc_56E8E1:
mov	[ebp+var_8], 0

loc_56E8E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E890 endp

align 10h


; Attributes: bp-based frame

sub_56E8F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A1A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E948

loc_56E941:
mov	[ebp+var_8], 0

loc_56E948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E8F0 endp

align 10h


; Attributes: bp-based frame

sub_56E950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56E9A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BEC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E734A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56E9A8

loc_56E9A1:
mov	[ebp+var_8], 0

loc_56E9A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E950 endp

align 10h


; Attributes: bp-based frame

sub_56E9B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EA01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D9A000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EA08

loc_56EA01:
mov	[ebp+var_8], 0

loc_56EA08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56E9B0 endp

align 10h


; Attributes: bp-based frame

sub_56EA10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EA61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99EF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EA68

loc_56EA61:
mov	[ebp+var_8], 0

loc_56EA68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EA10 endp

align 10h


; Attributes: bp-based frame

sub_56EA70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EAC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99E10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EAC8

loc_56EAC1:
mov	[ebp+var_8], 0

loc_56EAC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EA70 endp

align 10h


; Attributes: bp-based frame

sub_56EAD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EB21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99D70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EB28

loc_56EB21:
mov	[ebp+var_8], 0

loc_56EB28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EAD0 endp

align 10h


; Attributes: bp-based frame

sub_56EB30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EB81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D999E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EB88

loc_56EB81:
mov	[ebp+var_8], 0

loc_56EB88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EB30 endp

align 10h


; Attributes: bp-based frame

sub_56EB90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EBE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158192C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E1FC90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EBE8

loc_56EBE1:
mov	[ebp+var_8], 0

loc_56EBE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EB90 endp

align 10h


; Attributes: bp-based frame

sub_56EBF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EC41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99970
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EC48

loc_56EC41:
mov	[ebp+var_8], 0

loc_56EC48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EBF0 endp

align 10h


; Attributes: bp-based frame

sub_56EC50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56ECA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99870
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56ECA8

loc_56ECA1:
mov	[ebp+var_8], 0

loc_56ECA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EC50 endp

align 10h


; Attributes: bp-based frame

sub_56ECB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56ED01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99770
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56ED08

loc_56ED01:
mov	[ebp+var_8], 0

loc_56ED08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56ECB0 endp

align 10h


; Attributes: bp-based frame

sub_56ED10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56ED61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56ED68

loc_56ED61:
mov	[ebp+var_8], 0

loc_56ED68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56ED10 endp

align 10h


; Attributes: bp-based frame

sub_56ED70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EDC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D99680
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EDC8

loc_56EDC1:
mov	[ebp+var_8], 0

loc_56EDC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56ED70 endp

align 10h


; Attributes: bp-based frame

sub_56EDD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EE21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D995A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EE28

loc_56EE21:
mov	[ebp+var_8], 0

loc_56EE28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EDD0 endp

align 10h


; Attributes: bp-based frame

sub_56EE30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EE81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156AFA0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E1FA50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EE88

loc_56EE81:
mov	[ebp+var_8], 0

loc_56EE88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EE30 endp

align 10h


; Attributes: bp-based frame

sub_56EE90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EEE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73400
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EEE8

loc_56EEE1:
mov	[ebp+var_8], 0

loc_56EEE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EE90 endp

align 10h


; Attributes: bp-based frame

sub_56EEF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EF41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D991C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EF48

loc_56EF41:
mov	[ebp+var_8], 0

loc_56EF48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EEF0 endp

align 10h


; Attributes: bp-based frame

sub_56EF50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56EFA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D990B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56EFA8

loc_56EFA1:
mov	[ebp+var_8], 0

loc_56EFA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EF50 endp

align 10h


; Attributes: bp-based frame

sub_56EFB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F001
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98DF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F008

loc_56F001:
mov	[ebp+var_8], 0

loc_56F008:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56EFB0 endp

align 10h


; Attributes: bp-based frame

sub_56F010 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F061
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98CB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F068

loc_56F061:
mov	[ebp+var_8], 0

loc_56F068:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F010 endp

align 10h


; Attributes: bp-based frame

sub_56F070 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F0C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98B90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F0C8

loc_56F0C1:
mov	[ebp+var_8], 0

loc_56F0C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F070 endp

align 10h


; Attributes: bp-based frame

sub_56F0D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F121
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98B20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F128

loc_56F121:
mov	[ebp+var_8], 0

loc_56F128:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F0D0 endp

align 10h


; Attributes: bp-based frame

sub_56F130 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F181
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98AB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F188

loc_56F181:
mov	[ebp+var_8], 0

loc_56F188:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F130 endp

align 10h


; Attributes: bp-based frame

sub_56F190 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F1E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98A40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F1E8

loc_56F1E1:
mov	[ebp+var_8], 0

loc_56F1E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F190 endp

align 10h


; Attributes: bp-based frame

sub_56F1F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F241
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D989D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F248

loc_56F241:
mov	[ebp+var_8], 0

loc_56F248:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F1F0 endp

align 10h


; Attributes: bp-based frame

sub_56F250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F2A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F2A8

loc_56F2A1:
mov	[ebp+var_8], 0

loc_56F2A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F250 endp

align 10h


; Attributes: bp-based frame

sub_56F2B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F301
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98850
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F308

loc_56F301:
mov	[ebp+var_8], 0

loc_56F308:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F2B0 endp

align 10h


; Attributes: bp-based frame

sub_56F310 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F361
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D987D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F368

loc_56F361:
mov	[ebp+var_8], 0

loc_56F368:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F310 endp

align 10h


; Attributes: bp-based frame

sub_56F370 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F3C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D986C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F3C8

loc_56F3C1:
mov	[ebp+var_8], 0

loc_56F3C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F370 endp

align 10h


; Attributes: bp-based frame

sub_56F3D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F421
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581930
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F428

loc_56F421:
mov	[ebp+var_8], 0

loc_56F428:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F3D0 endp

align 10h


; Attributes: bp-based frame

sub_56F430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F481
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F488

loc_56F481:
mov	[ebp+var_8], 0

loc_56F488:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F430 endp

align 10h


; Attributes: bp-based frame

sub_56F490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F4E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D985B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F4E8

loc_56F4E1:
mov	[ebp+var_8], 0

loc_56F4E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F490 endp

align 10h


; Attributes: bp-based frame

sub_56F4F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F541
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BF0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F548

loc_56F541:
mov	[ebp+var_8], 0

loc_56F548:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F4F0 endp

align 10h


; Attributes: bp-based frame

sub_56F550 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F5A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D984F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F5A8

loc_56F5A1:
mov	[ebp+var_8], 0

loc_56F5A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F550 endp

align 10h


; Attributes: bp-based frame

sub_56F5B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F601
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D983D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F608

loc_56F601:
mov	[ebp+var_8], 0

loc_56F608:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F5B0 endp

align 10h


; Attributes: bp-based frame

sub_56F610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F661
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D982E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F668

loc_56F661:
mov	[ebp+var_8], 0

loc_56F668:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F610 endp

align 10h


; Attributes: bp-based frame

sub_56F670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F6C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D981C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F6C8

loc_56F6C1:
mov	[ebp+var_8], 0

loc_56F6C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F670 endp

align 10h


; Attributes: bp-based frame

sub_56F6D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F721
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D98040
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F728

loc_56F721:
mov	[ebp+var_8], 0

loc_56F728:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F6D0 endp

align 10h


; Attributes: bp-based frame

sub_56F730 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F781
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D97AA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F788

loc_56F781:
mov	[ebp+var_8], 0

loc_56F788:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F730 endp

align 10h


; Attributes: bp-based frame

sub_56F790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F7E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D97920
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F7E8

loc_56F7E1:
mov	[ebp+var_8], 0

loc_56F7E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F790 endp

align 10h


; Attributes: bp-based frame

sub_56F7F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F841
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D97850
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F848

loc_56F841:
mov	[ebp+var_8], 0

loc_56F848:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F7F0 endp

align 10h


; Attributes: bp-based frame

sub_56F850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F8A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D97370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F8A8

loc_56F8A1:
mov	[ebp+var_8], 0

loc_56F8A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F850 endp

align 10h


; Attributes: bp-based frame

sub_56F8B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F901
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D97240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F908

loc_56F901:
mov	[ebp+var_8], 0

loc_56F908:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F8B0 endp

align 10h


; Attributes: bp-based frame

sub_56F910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F961
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D971D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F968

loc_56F961:
mov	[ebp+var_8], 0

loc_56F968:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F910 endp

align 10h


; Attributes: bp-based frame

sub_56F970 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56F9C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56F9C8

loc_56F9C1:
mov	[ebp+var_8], 0

loc_56F9C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F970 endp

align 10h


; Attributes: bp-based frame

sub_56F9D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FA21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96DC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FA28

loc_56FA21:
mov	[ebp+var_8], 0

loc_56FA28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56F9D0 endp

align 10h


; Attributes: bp-based frame

sub_56FA30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FA81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96D20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FA88

loc_56FA81:
mov	[ebp+var_8], 0

loc_56FA88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FA30 endp

align 10h


; Attributes: bp-based frame

sub_56FA90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FAE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96CB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FAE8

loc_56FAE1:
mov	[ebp+var_8], 0

loc_56FAE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FA90 endp

align 10h


; Attributes: bp-based frame

sub_56FAF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FB41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96C40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FB48

loc_56FB41:
mov	[ebp+var_8], 0

loc_56FB48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FAF0 endp

align 10h


; Attributes: bp-based frame

sub_56FB50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FBA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96B10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FBA8

loc_56FBA1:
mov	[ebp+var_8], 0

loc_56FBA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FB50 endp

align 10h


; Attributes: bp-based frame

sub_56FBB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FC01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96AA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FC08

loc_56FC01:
mov	[ebp+var_8], 0

loc_56FC08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FBB0 endp

align 10h


; Attributes: bp-based frame

sub_56FC10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FC61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96A00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FC68

loc_56FC61:
mov	[ebp+var_8], 0

loc_56FC68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FC10 endp

align 10h


; Attributes: bp-based frame

sub_56FC70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FCC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96890
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FCC8

loc_56FCC1:
mov	[ebp+var_8], 0

loc_56FCC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FC70 endp

align 10h


; Attributes: bp-based frame

sub_56FCD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FD21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96780
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FD28

loc_56FD21:
mov	[ebp+var_8], 0

loc_56FD28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FCD0 endp

align 10h


; Attributes: bp-based frame

sub_56FD30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FD81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96670
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FD88

loc_56FD81:
mov	[ebp+var_8], 0

loc_56FD88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FD30 endp

align 10h


; Attributes: bp-based frame

sub_56FD90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FDE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D965F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FDE8

loc_56FDE1:
mov	[ebp+var_8], 0

loc_56FDE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FD90 endp

align 10h


; Attributes: bp-based frame

sub_56FDF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FE41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96520
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FE48

loc_56FE41:
mov	[ebp+var_8], 0

loc_56FE48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FDF0 endp

align 10h


; Attributes: bp-based frame

sub_56FE50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FEA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96430
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FEA8

loc_56FEA1:
mov	[ebp+var_8], 0

loc_56FEA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FE50 endp

align 10h


; Attributes: bp-based frame

sub_56FEB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FF01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96390
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FF08

loc_56FF01:
mov	[ebp+var_8], 0

loc_56FF08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FEB0 endp

align 10h


; Attributes: bp-based frame

sub_56FF10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	108h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FF64
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BF4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1B5C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FF6B

loc_56FF64:
mov	[ebp+var_8], 0

loc_56FF6B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FF10 endp

align 10h


; Attributes: bp-based frame

sub_56FF80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_56FFD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96310
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_56FFD8

loc_56FFD1:
mov	[ebp+var_8], 0

loc_56FFD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FF80 endp

align 10h


; Attributes: bp-based frame

sub_56FFE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96100
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570038

loc_570031:
mov	[ebp+var_8], 0

loc_570038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_56FFE0 endp

align 10h


; Attributes: bp-based frame

sub_570040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D96030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570098

loc_570091:
mov	[ebp+var_8], 0

loc_570098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570040 endp

align 10h


; Attributes: bp-based frame

sub_5700A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5700F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D95F90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5700F8

loc_5700F1:
mov	[ebp+var_8], 0

loc_5700F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5700A0 endp

align 10h


; Attributes: bp-based frame

sub_570100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D95F10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570158

loc_570151:
mov	[ebp+var_8], 0

loc_570158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570100 endp

align 10h


; Attributes: bp-based frame

sub_570160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5701B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D95E70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5701B8

loc_5701B1:
mov	[ebp+var_8], 0

loc_5701B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570160 endp

align 10h


; Attributes: bp-based frame

sub_5701C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581934
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73060
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570218

loc_570211:
mov	[ebp+var_8], 0

loc_570218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5701C0 endp

align 10h


; Attributes: bp-based frame

sub_570220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D95610
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570278

loc_570271:
mov	[ebp+var_8], 0

loc_570278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570220 endp

align 10h


; Attributes: bp-based frame

sub_570280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5702D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D95370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5702D8

loc_5702D1:
mov	[ebp+var_8], 0

loc_5702D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570280 endp

align 10h


; Attributes: bp-based frame

sub_5702E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D95190
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570338

loc_570331:
mov	[ebp+var_8], 0

loc_570338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5702E0 endp

align 10h


; Attributes: bp-based frame

sub_570340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94FE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570398

loc_570391:
mov	[ebp+var_8], 0

loc_570398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570340 endp

align 10h


; Attributes: bp-based frame

sub_5703A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5703F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72FD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5703F8

loc_5703F1:
mov	[ebp+var_8], 0

loc_5703F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5703A0 endp

align 10h


; Attributes: bp-based frame

sub_570400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94F40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570458

loc_570451:
mov	[ebp+var_8], 0

loc_570458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570400 endp

align 10h


; Attributes: bp-based frame

sub_570460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5704B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94EA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5704B8

loc_5704B1:
mov	[ebp+var_8], 0

loc_5704B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570460 endp

align 10h


; Attributes: bp-based frame

sub_5704C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94DC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570518

loc_570511:
mov	[ebp+var_8], 0

loc_570518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5704C0 endp

align 10h


; Attributes: bp-based frame

sub_570520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570571
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BF8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E1A9E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570578

loc_570571:
mov	[ebp+var_8], 0

loc_570578:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570520 endp

align 10h


; Attributes: bp-based frame

sub_570580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5705D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94C10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5705D8

loc_5705D1:
mov	[ebp+var_8], 0

loc_5705D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570580 endp

align 10h


; Attributes: bp-based frame

sub_5705E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570631
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BFC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F277F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570638

loc_570631:
mov	[ebp+var_8], 0

loc_570638:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5705E0 endp

align 10h


; Attributes: bp-based frame

sub_570640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570691
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94AD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570698

loc_570691:
mov	[ebp+var_8], 0

loc_570698:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570640 endp

align 10h


; Attributes: bp-based frame

sub_5706A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5706F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C00
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1B360
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5706F8

loc_5706F1:
mov	[ebp+var_8], 0

loc_5706F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5706A0 endp

align 10h


; Attributes: bp-based frame

sub_570700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570751
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94A30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570758

loc_570751:
mov	[ebp+var_8], 0

loc_570758:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570700 endp

align 10h


; Attributes: bp-based frame

sub_570760 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5707B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D949C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5707B8

loc_5707B1:
mov	[ebp+var_8], 0

loc_5707B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570760 endp

align 10h


; Attributes: bp-based frame

sub_5707C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570811
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D948F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570818

loc_570811:
mov	[ebp+var_8], 0

loc_570818:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5707C0 endp

align 10h


; Attributes: bp-based frame

sub_570820 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570871
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570878

loc_570871:
mov	[ebp+var_8], 0

loc_570878:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570820 endp

align 10h


; Attributes: bp-based frame

sub_570880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5708D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D94280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5708D8

loc_5708D1:
mov	[ebp+var_8], 0

loc_5708D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570880 endp

align 10h


; Attributes: bp-based frame

sub_5708E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570931
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93C80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570938

loc_570931:
mov	[ebp+var_8], 0

loc_570938:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5708E0 endp

align 10h


; Attributes: bp-based frame

sub_570940 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570991
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93BF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570998

loc_570991:
mov	[ebp+var_8], 0

loc_570998:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570940 endp

align 10h


; Attributes: bp-based frame

sub_5709A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5709F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93B80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5709F8

loc_5709F1:
mov	[ebp+var_8], 0

loc_5709F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5709A0 endp

align 10h


; Attributes: bp-based frame

sub_570A00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570A51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93AE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570A58

loc_570A51:
mov	[ebp+var_8], 0

loc_570A58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570A00 endp

align 10h


; Attributes: bp-based frame

sub_570A60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570AB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93A10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570AB8

loc_570AB1:
mov	[ebp+var_8], 0

loc_570AB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570A60 endp

align 10h


; Attributes: bp-based frame

sub_570AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570B11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72EC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570B18

loc_570B11:
mov	[ebp+var_8], 0

loc_570B18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570AC0 endp

align 10h


; Attributes: bp-based frame

sub_570B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570B71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93920
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570B78

loc_570B71:
mov	[ebp+var_8], 0

loc_570B78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570B20 endp

align 10h


; Attributes: bp-based frame

sub_570B80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570BD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C04
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E19DC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570BD8

loc_570BD1:
mov	[ebp+var_8], 0

loc_570BD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570B80 endp

align 10h


; Attributes: bp-based frame

sub_570BE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570C31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93880
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570C38

loc_570C31:
mov	[ebp+var_8], 0

loc_570C38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570BE0 endp

align 10h


; Attributes: bp-based frame

sub_570C40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570C91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93720
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570C98

loc_570C91:
mov	[ebp+var_8], 0

loc_570C98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570C40 endp

align 10h


; Attributes: bp-based frame

sub_570CA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570CF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D936B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570CF8

loc_570CF1:
mov	[ebp+var_8], 0

loc_570CF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570CA0 endp

align 10h


; Attributes: bp-based frame

sub_570D00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570D51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D935F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570D58

loc_570D51:
mov	[ebp+var_8], 0

loc_570D58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570D00 endp

align 10h


; Attributes: bp-based frame

sub_570D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570DB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570DB8

loc_570DB1:
mov	[ebp+var_8], 0

loc_570DB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570D60 endp

align 10h


; Attributes: bp-based frame

sub_570DC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570E11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D930A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570E18

loc_570E11:
mov	[ebp+var_8], 0

loc_570E18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570DC0 endp

align 10h


; Attributes: bp-based frame

sub_570E20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570E71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D93010
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570E78

loc_570E71:
mov	[ebp+var_8], 0

loc_570E78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570E20 endp

align 10h


; Attributes: bp-based frame

sub_570E80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570ED1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92F70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570ED8

loc_570ED1:
mov	[ebp+var_8], 0

loc_570ED8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570E80 endp

align 10h


; Attributes: bp-based frame

sub_570EE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570F31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92D20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570F38

loc_570F31:
mov	[ebp+var_8], 0

loc_570F38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570EE0 endp

align 10h


; Attributes: bp-based frame

sub_570F40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570F91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92C80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570F98

loc_570F91:
mov	[ebp+var_8], 0

loc_570F98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570F40 endp

align 10h


; Attributes: bp-based frame

sub_570FA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_570FF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92C10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_570FF8

loc_570FF1:
mov	[ebp+var_8], 0

loc_570FF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_570FA0 endp

align 10h


; Attributes: bp-based frame

sub_571000 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571051
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92BA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571058

loc_571051:
mov	[ebp+var_8], 0

loc_571058:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571000 endp

align 10h


; Attributes: bp-based frame

sub_571060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5710B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92B30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5710B8

loc_5710B1:
mov	[ebp+var_8], 0

loc_5710B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571060 endp

align 10h


; Attributes: bp-based frame

sub_5710C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571111
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92AC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571118

loc_571111:
mov	[ebp+var_8], 0

loc_571118:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5710C0 endp

align 10h


; Attributes: bp-based frame

sub_571120 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571171
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D928A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571178

loc_571171:
mov	[ebp+var_8], 0

loc_571178:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571120 endp

align 10h


; Attributes: bp-based frame

sub_571180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5711D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92750
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5711D8

loc_5711D1:
mov	[ebp+var_8], 0

loc_5711D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571180 endp

align 10h


; Attributes: bp-based frame

sub_5711E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571231
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92530
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571238

loc_571231:
mov	[ebp+var_8], 0

loc_571238:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5711E0 endp

align 10h


; Attributes: bp-based frame

sub_571240 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571291
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D923E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571298

loc_571291:
mov	[ebp+var_8], 0

loc_571298:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571240 endp

align 10h


; Attributes: bp-based frame

sub_5712A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5712F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5712F8

loc_5712F1:
mov	[ebp+var_8], 0

loc_5712F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5712A0 endp

align 10h


; Attributes: bp-based frame

sub_571300 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571354
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C08
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1A960
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57135B

loc_571354:
mov	[ebp+var_8], 0

loc_57135B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571300 endp

align 10h


; Attributes: bp-based frame

sub_571370 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5713C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D92000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5713C8

loc_5713C1:
mov	[ebp+var_8], 0

loc_5713C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571370 endp

align 10h


; Attributes: bp-based frame

sub_5713D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571421
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571428

loc_571421:
mov	[ebp+var_8], 0

loc_571428:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5713D0 endp

align 10h


; Attributes: bp-based frame

sub_571430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571481
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72AC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571488

loc_571481:
mov	[ebp+var_8], 0

loc_571488:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571430 endp

align 10h


; Attributes: bp-based frame

sub_571490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5714E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E80250
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5714E8

loc_5714E1:
mov	[ebp+var_8], 0

loc_5714E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571490 endp

align 10h


; Attributes: bp-based frame

sub_5714F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0A8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571544
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C18
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E801B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57154B

loc_571544:
mov	[ebp+var_8], 0

loc_57154B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5714F0 endp

align 10h


; Attributes: bp-based frame

sub_571560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5715B4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C1C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E729F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5715BB

loc_5715B4:
mov	[ebp+var_8], 0

loc_5715BB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571560 endp

align 10h


; Attributes: bp-based frame

sub_5715D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571621
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91F60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571628

loc_571621:
mov	[ebp+var_8], 0

loc_571628:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5715D0 endp

align 10h


; Attributes: bp-based frame

sub_571630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571681
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C20
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E727C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571688

loc_571681:
mov	[ebp+var_8], 0

loc_571688:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571630 endp

align 10h


; Attributes: bp-based frame

sub_571690 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5716E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91DB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5716E8

loc_5716E1:
mov	[ebp+var_8], 0

loc_5716E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571690 endp

align 10h


; Attributes: bp-based frame

sub_5716F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571741
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91BC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571748

loc_571741:
mov	[ebp+var_8], 0

loc_571748:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5716F0 endp

align 10h


; Attributes: bp-based frame

sub_571750 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5717A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91B20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5717A8

loc_5717A1:
mov	[ebp+var_8], 0

loc_5717A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571750 endp

align 10h


; Attributes: bp-based frame

sub_5717B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571801
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91AA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571808

loc_571801:
mov	[ebp+var_8], 0

loc_571808:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5717B0 endp

align 10h


; Attributes: bp-based frame

sub_571810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571861
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91890
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571868

loc_571861:
mov	[ebp+var_8], 0

loc_571868:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571810 endp

align 10h


; Attributes: bp-based frame

sub_571870 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5718C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91650
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5718C8

loc_5718C1:
mov	[ebp+var_8], 0

loc_5718C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571870 endp

align 10h


; Attributes: bp-based frame

sub_5718D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571921
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91410
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571928

loc_571921:
mov	[ebp+var_8], 0

loc_571928:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5718D0 endp

align 10h


; Attributes: bp-based frame

sub_571930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571981
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D911D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571988

loc_571981:
mov	[ebp+var_8], 0

loc_571988:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571930 endp

align 10h


; Attributes: bp-based frame

sub_571990 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5719E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D910D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5719E8

loc_5719E1:
mov	[ebp+var_8], 0

loc_5719E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571990 endp

align 10h


; Attributes: bp-based frame

sub_5719F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571A41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D91050
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571A48

loc_571A41:
mov	[ebp+var_8], 0

loc_571A48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5719F0 endp

align 10h


; Attributes: bp-based frame

sub_571A50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571AA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90FD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571AA8

loc_571AA1:
mov	[ebp+var_8], 0

loc_571AA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571A50 endp

align 10h


; Attributes: bp-based frame

sub_571AB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571B01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90F40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571B08

loc_571B01:
mov	[ebp+var_8], 0

loc_571B08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571AB0 endp

align 10h


; Attributes: bp-based frame

sub_571B10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571B61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90EC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571B68

loc_571B61:
mov	[ebp+var_8], 0

loc_571B68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571B10 endp

align 10h


; Attributes: bp-based frame

sub_571B70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571BC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90E40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571BC8

loc_571BC1:
mov	[ebp+var_8], 0

loc_571BC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571B70 endp

align 10h


; Attributes: bp-based frame

sub_571BD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571C21

loc_571BE9:
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72730
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571C28

loc_571C21:
mov	[ebp+var_8], 0

loc_571C28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571BD0 endp

align 10h


; Attributes: bp-based frame

sub_571C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571C81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F1A8E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571C88

loc_571C81:
mov	[ebp+var_8], 0

loc_571C88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571C30 endp

align 10h


; Attributes: bp-based frame

sub_571C90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571CE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72670
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571CE8

loc_571CE1:
mov	[ebp+var_8], 0

loc_571CE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571C90 endp

align 10h


; Attributes: bp-based frame

sub_571CF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571D41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571D48

loc_571D41:
mov	[ebp+var_8], 0

loc_571D48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571CF0 endp

align 10h


; Attributes: bp-based frame

sub_571D50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571DA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90B60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571DA8

loc_571DA1:
mov	[ebp+var_8], 0

loc_571DA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571D50 endp

align 10h


; Attributes: bp-based frame

sub_571DB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571E01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90AD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571E08

loc_571E01:
mov	[ebp+var_8], 0

loc_571E08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571DB0 endp

align 10h


; Attributes: bp-based frame

sub_571E10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571E61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D909B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571E68

loc_571E61:
mov	[ebp+var_8], 0

loc_571E68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571E10 endp

align 10h


; Attributes: bp-based frame

sub_571E70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571EC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90940
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571EC8

loc_571EC1:
mov	[ebp+var_8], 0

loc_571EC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571E70 endp

align 10h


; Attributes: bp-based frame

sub_571ED0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571F21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D908B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571F28

loc_571F21:
mov	[ebp+var_8], 0

loc_571F28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571ED0 endp

align 10h


; Attributes: bp-based frame

sub_571F30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571F81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90820
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571F88

loc_571F81:
mov	[ebp+var_8], 0

loc_571F88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571F30 endp

align 10h


; Attributes: bp-based frame

sub_571F90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_571FE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_571FE8

loc_571FE1:
mov	[ebp+var_8], 0

loc_571FE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571F90 endp

align 10h


; Attributes: bp-based frame

sub_571FF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572041
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90680
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572048

loc_572041:
mov	[ebp+var_8], 0

loc_572048:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_571FF0 endp

align 10h


; Attributes: bp-based frame

sub_572050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5720A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90400
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5720A8

loc_5720A1:
mov	[ebp+var_8], 0

loc_5720A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572050 endp

align 10h


; Attributes: bp-based frame

sub_5720B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572101
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90360
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572108

loc_572101:
mov	[ebp+var_8], 0

loc_572108:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5720B0 endp

align 10h


; Attributes: bp-based frame

sub_572110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572164
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E724F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57216B

loc_572164:
mov	[ebp+var_8], 0

loc_57216B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572110 endp

align 10h


; Attributes: bp-based frame

sub_572180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5721D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90180
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5721D8

loc_5721D1:
mov	[ebp+var_8], 0

loc_5721D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572180 endp

align 10h


; Attributes: bp-based frame

sub_5721E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572231
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D900E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572238

loc_572231:
mov	[ebp+var_8], 0

loc_572238:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5721E0 endp

align 10h


; Attributes: bp-based frame

sub_572240 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572291
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D90010
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572298

loc_572291:
mov	[ebp+var_8], 0

loc_572298:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572240 endp

align 10h


; Attributes: bp-based frame

sub_5722A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5722F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8FF40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5722F8

loc_5722F1:
mov	[ebp+var_8], 0

loc_5722F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5722A0 endp

align 10h


; Attributes: bp-based frame

sub_572300 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572351
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8FEC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572358

loc_572351:
mov	[ebp+var_8], 0

loc_572358:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572300 endp

align 10h


; Attributes: bp-based frame

sub_572360 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5723B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8FDC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5723B8

loc_5723B1:
mov	[ebp+var_8], 0

loc_5723B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572360 endp

align 10h


; Attributes: bp-based frame

sub_5723C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572411
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8FCC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572418

loc_572411:
mov	[ebp+var_8], 0

loc_572418:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5723C0 endp

align 10h


; Attributes: bp-based frame

sub_572420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	68h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572471
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72440
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572478

loc_572471:
mov	[ebp+var_8], 0

loc_572478:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572420 endp

align 10h


; Attributes: bp-based frame

sub_572480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5724D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8FB60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5724D8

loc_5724D1:
mov	[ebp+var_8], 0

loc_5724D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572480 endp

align 10h


; Attributes: bp-based frame

sub_5724E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572531
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F9E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572538

loc_572531:
mov	[ebp+var_8], 0

loc_572538:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5724E0 endp

align 10h


; Attributes: bp-based frame

sub_572540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572591
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F960
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572598

loc_572591:
mov	[ebp+var_8], 0

loc_572598:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572540 endp

align 10h


; Attributes: bp-based frame

sub_5725A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5725F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E723B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5725F8

loc_5725F1:
mov	[ebp+var_8], 0

loc_5725F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5725A0 endp

align 10h


; Attributes: bp-based frame

sub_572600 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572654
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E722F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57265B

loc_572654:
mov	[ebp+var_8], 0

loc_57265B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572600 endp

align 10h


; Attributes: bp-based frame

sub_572670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5726C4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72230
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5726CB

loc_5726C4:
mov	[ebp+var_8], 0

loc_5726CB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572670 endp

align 10h


; Attributes: bp-based frame

sub_5726E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572731
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F8C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572738

loc_572731:
mov	[ebp+var_8], 0

loc_572738:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5726E0 endp

align 10h


; Attributes: bp-based frame

sub_572740 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572791
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F840
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572798

loc_572791:
mov	[ebp+var_8], 0

loc_572798:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572740 endp

align 10h


; Attributes: bp-based frame

sub_5727A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5727F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F7A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5727F8

loc_5727F1:
mov	[ebp+var_8], 0

loc_5727F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5727A0 endp

align 10h


; Attributes: bp-based frame

sub_572800 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572851
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572858

loc_572851:
mov	[ebp+var_8], 0

loc_572858:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572800 endp

align 10h


; Attributes: bp-based frame

sub_572860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5728B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F660
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5728B8

loc_5728B1:
mov	[ebp+var_8], 0

loc_5728B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572860 endp

align 10h


; Attributes: bp-based frame

sub_5728C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572911
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581910
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E720E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572918

loc_572911:
mov	[ebp+var_8], 0

loc_572918:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5728C0 endp

align 10h


; Attributes: bp-based frame

sub_572920 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572971
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F590
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572978

loc_572971:
mov	[ebp+var_8], 0

loc_572978:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572920 endp

align 10h


; Attributes: bp-based frame

sub_572980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5729D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8F090
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5729D8

loc_5729D1:
mov	[ebp+var_8], 0

loc_5729D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572980 endp

align 10h


; Attributes: bp-based frame

sub_5729E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572A31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8EEB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572A38

loc_572A31:
mov	[ebp+var_8], 0

loc_572A38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5729E0 endp

align 10h


; Attributes: bp-based frame

sub_572A40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572A91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8EDC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572A98

loc_572A91:
mov	[ebp+var_8], 0

loc_572A98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572A40 endp

align 10h


; Attributes: bp-based frame

sub_572AA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572AF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8EB20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572AF8

loc_572AF1:
mov	[ebp+var_8], 0

loc_572AF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572AA0 endp

align 10h


; Attributes: bp-based frame

sub_572B00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572B51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8EA50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572B58

loc_572B51:
mov	[ebp+var_8], 0

loc_572B58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572B00 endp

align 10h


; Attributes: bp-based frame

sub_572B60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572BB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E9B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572BB8

loc_572BB1:
mov	[ebp+var_8], 0

loc_572BB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572B60 endp

align 10h


; Attributes: bp-based frame

sub_572BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572C11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572C18

loc_572C11:
mov	[ebp+var_8], 0

loc_572C18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572BC0 endp

align 10h


; Attributes: bp-based frame

sub_572C20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572C71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E8A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572C78

loc_572C71:
mov	[ebp+var_8], 0

loc_572C78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572C20 endp

align 10h


; Attributes: bp-based frame

sub_572C80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572CD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572CD8

loc_572CD1:
mov	[ebp+var_8], 0

loc_572CD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572C80 endp

align 10h


; Attributes: bp-based frame

sub_572CE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572D31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E5D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572D38

loc_572D31:
mov	[ebp+var_8], 0

loc_572D38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572CE0 endp

align 10h


; Attributes: bp-based frame

sub_572D40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572D91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E550
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572D98

loc_572D91:
mov	[ebp+var_8], 0

loc_572D98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572D40 endp

align 10h


; Attributes: bp-based frame

sub_572DA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572DF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E4E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572DF8

loc_572DF1:
mov	[ebp+var_8], 0

loc_572DF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572DA0 endp

align 10h


; Attributes: bp-based frame

sub_572E00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572E51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E72020
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572E58

loc_572E51:
mov	[ebp+var_8], 0

loc_572E58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572E00 endp

align 10h


; Attributes: bp-based frame

sub_572E60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572EB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572EB8

loc_572EB1:
mov	[ebp+var_8], 0

loc_572EB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572E60 endp

align 10h


; Attributes: bp-based frame

sub_572EC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572F11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E300
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572F18

loc_572F11:
mov	[ebp+var_8], 0

loc_572F18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572EC0 endp

align 10h


; Attributes: bp-based frame

sub_572F20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572F71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E0C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572F78

loc_572F71:
mov	[ebp+var_8], 0

loc_572F78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572F20 endp

align 10h


; Attributes: bp-based frame

sub_572F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_572FD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8E050
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_572FD8

loc_572FD1:
mov	[ebp+var_8], 0

loc_572FD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572F80 endp

align 10h


; Attributes: bp-based frame

sub_572FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8DF80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573038

loc_573031:
mov	[ebp+var_8], 0

loc_573038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_572FE0 endp

align 10h


; Attributes: bp-based frame

sub_573040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8DEC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573098

loc_573091:
mov	[ebp+var_8], 0

loc_573098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573040 endp

align 10h


; Attributes: bp-based frame

sub_5730A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5730F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8DD90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5730F8

loc_5730F1:
mov	[ebp+var_8], 0

loc_5730F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5730A0 endp

align 10h


; Attributes: bp-based frame

sub_573100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8D930
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573158

loc_573151:
mov	[ebp+var_8], 0

loc_573158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573100 endp

align 10h


; Attributes: bp-based frame

sub_573160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5731B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8D8C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5731B8

loc_5731B1:
mov	[ebp+var_8], 0

loc_5731B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573160 endp

align 10h


; Attributes: bp-based frame

sub_5731C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8D830
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573218

loc_573211:
mov	[ebp+var_8], 0

loc_573218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5731C0 endp

align 10h


; Attributes: bp-based frame

sub_573220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8D7A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573278

loc_573271:
mov	[ebp+var_8], 0

loc_573278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573220 endp

align 10h


; Attributes: bp-based frame

sub_573280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5732D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B08
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71F70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5732D8

loc_5732D1:
mov	[ebp+var_8], 0

loc_5732D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573280 endp

align 10h


; Attributes: bp-based frame

sub_5732E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0F8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573334
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71E20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57333B

loc_573334:
mov	[ebp+var_8], 0

loc_57333B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5732E0 endp

align 10h


; Attributes: bp-based frame

sub_573350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5733A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8D190
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5733A8

loc_5733A1:
mov	[ebp+var_8], 0

loc_5733A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573350 endp

align 10h


; Attributes: bp-based frame

sub_5733B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573401
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8D080
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573408

loc_573401:
mov	[ebp+var_8], 0

loc_573408:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5733B0 endp

align 10h


; Attributes: bp-based frame

sub_573410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573464
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71D30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57346B

loc_573464:
mov	[ebp+var_8], 0

loc_57346B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573410 endp

align 10h


; Attributes: bp-based frame

sub_573480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5734D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8CEC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5734D8

loc_5734D1:
mov	[ebp+var_8], 0

loc_5734D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573480 endp

align 10h


; Attributes: bp-based frame

sub_5734E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573531
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71CA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573538

loc_573531:
mov	[ebp+var_8], 0

loc_573538:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5734E0 endp

align 10h


; Attributes: bp-based frame

sub_573540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573591
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8CD80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573598

loc_573591:
mov	[ebp+var_8], 0

loc_573598:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573540 endp

align 10h


; Attributes: bp-based frame

sub_5735A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5735F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8CD10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5735F8

loc_5735F1:
mov	[ebp+var_8], 0

loc_5735F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5735A0 endp

align 10h


; Attributes: bp-based frame

sub_573600 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573651
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C930
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573658

loc_573651:
mov	[ebp+var_8], 0

loc_573658:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573600 endp

align 10h


; Attributes: bp-based frame

sub_573660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5736B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C740
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5736B8

loc_5736B1:
mov	[ebp+var_8], 0

loc_5736B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573660 endp

align 10h


; Attributes: bp-based frame

sub_5736C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573711
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C6A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573718

loc_573711:
mov	[ebp+var_8], 0

loc_573718:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5736C0 endp

align 10h


; Attributes: bp-based frame

sub_573720 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573771
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C630
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573778

loc_573771:
mov	[ebp+var_8], 0

loc_573778:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573720 endp

align 10h


; Attributes: bp-based frame

sub_573780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5737D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C590
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5737D8

loc_5737D1:
mov	[ebp+var_8], 0

loc_5737D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573780 endp

align 10h


; Attributes: bp-based frame

sub_5737E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573831
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C420
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573838

loc_573831:
mov	[ebp+var_8], 0

loc_573838:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5737E0 endp

align 10h


; Attributes: bp-based frame

sub_573840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573891
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573898

loc_573891:
mov	[ebp+var_8], 0

loc_573898:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573840 endp

align 10h


; Attributes: bp-based frame

sub_5738A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5738F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C2E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5738F8

loc_5738F1:
mov	[ebp+var_8], 0

loc_5738F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5738A0 endp

align 10h


; Attributes: bp-based frame

sub_573900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573951
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C270
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573958

loc_573951:
mov	[ebp+var_8], 0

loc_573958:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573900 endp

align 10h


; Attributes: bp-based frame

sub_573960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5739B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C200
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5739B8

loc_5739B1:
mov	[ebp+var_8], 0

loc_5739B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573960 endp

align 10h


; Attributes: bp-based frame

sub_5739C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5739C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_573A38
mov	ecx, 138Bh
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573D4C
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_D8C190
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
jmp	short loc_573A3F

loc_573A38:
mov	[ebp+var_14], 0

loc_573A3F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5739C0 endp



; Attributes: bp-based frame

sub_573A50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573AA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C120
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573AA8

loc_573AA1:
mov	[ebp+var_8], 0

loc_573AA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573A50 endp

align 10h


; Attributes: bp-based frame

sub_573AB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573B01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C0B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573B08

loc_573B01:
mov	[ebp+var_8], 0

loc_573B08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573AB0 endp

align 10h


; Attributes: bp-based frame

sub_573B10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573B61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8C040
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573B68

loc_573B61:
mov	[ebp+var_8], 0

loc_573B68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573B10 endp

align 10h


; Attributes: bp-based frame

sub_573B70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573BC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B90
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E13A00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573BC8

loc_573BC1:
mov	[ebp+var_8], 0

loc_573BC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573B70 endp

align 10h


; Attributes: bp-based frame

sub_573BD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573C21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BF90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573C28

loc_573C21:
mov	[ebp+var_8], 0

loc_573C28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573BD0 endp

align 10h


; Attributes: bp-based frame

sub_573C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573C81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BE60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573C88

loc_573C81:
mov	[ebp+var_8], 0

loc_573C88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573C30 endp

align 10h


; Attributes: bp-based frame

sub_573C90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573CE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BDF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573CE8

loc_573CE1:
mov	[ebp+var_8], 0

loc_573CE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573C90 endp

align 10h


; Attributes: bp-based frame

sub_573CF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573D41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BD80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573D48

loc_573D41:
mov	[ebp+var_8], 0

loc_573D48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573CF0 endp

align 10h


; Attributes: bp-based frame

sub_573D50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0C8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573DA4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7F2D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573DAB

loc_573DA4:
mov	[ebp+var_8], 0

loc_573DAB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573D50 endp

align 10h


; Attributes: bp-based frame

sub_573DC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573E11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BC80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573E18

loc_573E11:
mov	[ebp+var_8], 0

loc_573E18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573DC0 endp

align 10h


; Attributes: bp-based frame

sub_573E20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573E71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BBE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573E78

loc_573E71:
mov	[ebp+var_8], 0

loc_573E78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573E20 endp

align 10h


; Attributes: bp-based frame

sub_573E80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573ED1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71C00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573ED8

loc_573ED1:
mov	[ebp+var_8], 0

loc_573ED8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573E80 endp

align 10h


; Attributes: bp-based frame

sub_573EE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573F31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C34
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7F230
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573F38

loc_573F31:
mov	[ebp+var_8], 0

loc_573F38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573EE0 endp

align 10h


; Attributes: bp-based frame

sub_573F40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573F91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BB00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573F98

loc_573F91:
mov	[ebp+var_8], 0

loc_573F98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573F40 endp

align 10h


; Attributes: bp-based frame

sub_573FA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_573FF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E13530
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_573FF8

loc_573FF1:
mov	[ebp+var_8], 0

loc_573FF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_573FA0 endp

align 10h


; Attributes: bp-based frame

sub_574000 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574051
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C38
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E13310
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574058

loc_574051:
mov	[ebp+var_8], 0

loc_574058:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574000 endp

align 10h


; Attributes: bp-based frame

sub_574060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5740B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8BA30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5740B8

loc_5740B1:
mov	[ebp+var_8], 0

loc_5740B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574060 endp

align 10h


; Attributes: bp-based frame

sub_5740C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574111
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8B960
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574118

loc_574111:
mov	[ebp+var_8], 0

loc_574118:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5740C0 endp

align 10h


; Attributes: bp-based frame

sub_574120 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574171
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8B740
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574178

loc_574171:
mov	[ebp+var_8], 0

loc_574178:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574120 endp

align 10h


; Attributes: bp-based frame

sub_574180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5741D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8B5A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5741D8

loc_5741D1:
mov	[ebp+var_8], 0

loc_5741D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574180 endp

align 10h


; Attributes: bp-based frame

sub_5741E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574231
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599ADC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E12B70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574238

loc_574231:
mov	[ebp+var_8], 0

loc_574238:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5741E0 endp

align 10h


; Attributes: bp-based frame

sub_574240 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574291
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8B380
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574298

loc_574291:
mov	[ebp+var_8], 0

loc_574298:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574240 endp

align 10h


; Attributes: bp-based frame

sub_5742A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5742F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8B210
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5742F8

loc_5742F1:
mov	[ebp+var_8], 0

loc_5742F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5742A0 endp

align 10h


; Attributes: bp-based frame

sub_574300 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574351
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8AFA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574358

loc_574351:
mov	[ebp+var_8], 0

loc_574358:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574300 endp

align 10h


; Attributes: bp-based frame

sub_574360 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5743B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C3C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E12A40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5743B8

loc_5743B1:
mov	[ebp+var_8], 0

loc_5743B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574360 endp

align 10h


; Attributes: bp-based frame

sub_5743C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574411
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8ACC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574418

loc_574411:
mov	[ebp+var_8], 0

loc_574418:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5743C0 endp

align 10h


; Attributes: bp-based frame

sub_574420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574471
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8AC50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574478

loc_574471:
mov	[ebp+var_8], 0

loc_574478:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574420 endp

align 10h


; Attributes: bp-based frame

sub_574480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5744D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8ABD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5744D8

loc_5744D1:
mov	[ebp+var_8], 0

loc_5744D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574480 endp

align 10h


; Attributes: bp-based frame

sub_5744E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574531
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8AB60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574538

loc_574531:
mov	[ebp+var_8], 0

loc_574538:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5744E0 endp

align 10h


; Attributes: bp-based frame

sub_574540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574591
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8AAE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574598

loc_574591:
mov	[ebp+var_8], 0

loc_574598:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574540 endp

align 10h


; Attributes: bp-based frame

sub_5745A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5745F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8AA60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5745F8

loc_5745F1:
mov	[ebp+var_8], 0

loc_5745F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5745A0 endp

align 10h


; Attributes: bp-based frame

sub_574600 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574651
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A9E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574658

loc_574651:
mov	[ebp+var_8], 0

loc_574658:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574600 endp

align 10h


; Attributes: bp-based frame

sub_574660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5746B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E12970
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5746B8

loc_5746B1:
mov	[ebp+var_8], 0

loc_5746B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574660 endp

align 10h


; Attributes: bp-based frame

sub_5746C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574711
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A960
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574718

loc_574711:
mov	[ebp+var_8], 0

loc_574718:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5746C0 endp

align 10h


; Attributes: bp-based frame

sub_574720 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574771
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A8F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574778

loc_574771:
mov	[ebp+var_8], 0

loc_574778:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574720 endp

align 10h


; Attributes: bp-based frame

sub_574780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5747D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A780
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5747D8

loc_5747D1:
mov	[ebp+var_8], 0

loc_5747D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574780 endp

align 10h


; Attributes: bp-based frame

sub_5747E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574831
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A700
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574838

loc_574831:
mov	[ebp+var_8], 0

loc_574838:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5747E0 endp

align 10h


; Attributes: bp-based frame

sub_574840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574891
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A5B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574898

loc_574891:
mov	[ebp+var_8], 0

loc_574898:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574840 endp

align 10h


; Attributes: bp-based frame

sub_5748A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5748F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5748F8

loc_5748F1:
mov	[ebp+var_8], 0

loc_5748F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5748A0 endp

align 10h


; Attributes: bp-based frame

sub_574900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574951
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A430
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574958

loc_574951:
mov	[ebp+var_8], 0

loc_574958:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574900 endp

align 10h


; Attributes: bp-based frame

sub_574960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5749B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C40
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7F100
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5749B8

loc_5749B1:
mov	[ebp+var_8], 0

loc_5749B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574960 endp

align 10h


; Attributes: bp-based frame

sub_5749C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574A11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A360
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574A18

loc_574A11:
mov	[ebp+var_8], 0

loc_574A18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5749C0 endp

align 10h


; Attributes: bp-based frame

sub_574A20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574A71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71B70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574A78

loc_574A71:
mov	[ebp+var_8], 0

loc_574A78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574A20 endp

align 10h


; Attributes: bp-based frame

sub_574A80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574AD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A280
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574AD8

loc_574AD1:
mov	[ebp+var_8], 0

loc_574AD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574A80 endp

align 10h


; Attributes: bp-based frame

sub_574AE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574B31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A1A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574B38

loc_574B31:
mov	[ebp+var_8], 0

loc_574B38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574AE0 endp

align 10h


; Attributes: bp-based frame

sub_574B40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574B91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8A030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574B98

loc_574B91:
mov	[ebp+var_8], 0

loc_574B98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574B40 endp

align 10h


; Attributes: bp-based frame

sub_574BA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574BF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89FB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574BF8

loc_574BF1:
mov	[ebp+var_8], 0

loc_574BF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574BA0 endp

align 10h


; Attributes: bp-based frame

sub_574C00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574C51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89E60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574C58

loc_574C51:
mov	[ebp+var_8], 0

loc_574C58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574C00 endp

align 10h


; Attributes: bp-based frame

sub_574C60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574CB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89DF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574CB8

loc_574CB1:
mov	[ebp+var_8], 0

loc_574CB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574C60 endp

align 10h


; Attributes: bp-based frame

sub_574CC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574D11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89BB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574D18

loc_574D11:
mov	[ebp+var_8], 0

loc_574D18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574CC0 endp

align 10h


; Attributes: bp-based frame

sub_574D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574D71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89930
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574D78

loc_574D71:
mov	[ebp+var_8], 0

loc_574D78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574D20 endp

align 10h


; Attributes: bp-based frame

sub_574D80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574DD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D898C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574DD8

loc_574DD1:
mov	[ebp+var_8], 0

loc_574DD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574D80 endp

align 10h


; Attributes: bp-based frame

sub_574DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0B0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574E34
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C44
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71A60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574E3B

loc_574E34:
mov	[ebp+var_8], 0

loc_574E3B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574DE0 endp

align 10h


; Attributes: bp-based frame

sub_574E50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574EA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89570
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574EA8

loc_574EA1:
mov	[ebp+var_8], 0

loc_574EA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574E50 endp

align 10h


; Attributes: bp-based frame

sub_574EB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574F01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D893F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574F08

loc_574F01:
mov	[ebp+var_8], 0

loc_574F08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574EB0 endp

align 10h


; Attributes: bp-based frame

sub_574F10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	90h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574F64
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C48
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E718D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574F6B

loc_574F64:
mov	[ebp+var_8], 0

loc_574F6B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574F10 endp

align 10h


; Attributes: bp-based frame

sub_574F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	88h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_574FD4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C4C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71750
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_574FDB

loc_574FD4:
mov	[ebp+var_8], 0

loc_574FDB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574F80 endp

align 10h


; Attributes: bp-based frame

sub_574FF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575041
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71630
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575048

loc_575041:
mov	[ebp+var_8], 0

loc_575048:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_574FF0 endp

align 10h


; Attributes: bp-based frame

sub_575050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5750A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5750A8

loc_5750A1:
mov	[ebp+var_8], 0

loc_5750A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575050 endp

align 10h


; Attributes: bp-based frame

sub_5750B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575101
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71450
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575108

loc_575101:
mov	[ebp+var_8], 0

loc_575108:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5750B0 endp

align 10h


; Attributes: bp-based frame

sub_575110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575161
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C50
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DE4190
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575168

loc_575161:
mov	[ebp+var_8], 0

loc_575168:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575110 endp

align 10h


; Attributes: bp-based frame

sub_575170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5751C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89250
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5751C8

loc_5751C1:
mov	[ebp+var_8], 0

loc_5751C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575170 endp

align 10h


; Attributes: bp-based frame

sub_5751D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575221
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89130
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575228

loc_575221:
mov	[ebp+var_8], 0

loc_575228:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5751D0 endp

align 10h


; Attributes: bp-based frame

sub_575230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575281
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D890B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575288

loc_575281:
mov	[ebp+var_8], 0

loc_575288:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575230 endp

align 10h


; Attributes: bp-based frame

sub_575290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5752E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D89040
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5752E8

loc_5752E1:
mov	[ebp+var_8], 0

loc_5752E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575290 endp

align 10h


; Attributes: bp-based frame

sub_5752F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575341
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88FD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575348

loc_575341:
mov	[ebp+var_8], 0

loc_575348:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5752F0 endp

align 10h


; Attributes: bp-based frame

sub_575350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5753A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88F60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5753A8

loc_5753A1:
mov	[ebp+var_8], 0

loc_5753A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575350 endp

align 10h


; Attributes: bp-based frame

sub_5753B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575401
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88ED0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575408

loc_575401:
mov	[ebp+var_8], 0

loc_575408:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5753B0 endp

align 10h


; Attributes: bp-based frame

sub_575410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	70h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575461
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C54
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71380
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575468

loc_575461:
mov	[ebp+var_8], 0

loc_575468:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575410 endp

align 10h


; Attributes: bp-based frame

sub_575470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5754C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88DC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5754C8

loc_5754C1:
mov	[ebp+var_8], 0

loc_5754C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575470 endp

align 10h


; Attributes: bp-based frame

sub_5754D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575521
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88CF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575528

loc_575521:
mov	[ebp+var_8], 0

loc_575528:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5754D0 endp

align 10h


; Attributes: bp-based frame

sub_575530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575581
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88C20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575588

loc_575581:
mov	[ebp+var_8], 0

loc_575588:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575530 endp

align 10h


; Attributes: bp-based frame

sub_575590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5755E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71230
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5755E8

loc_5755E1:
mov	[ebp+var_8], 0

loc_5755E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575590 endp

align 10h


; Attributes: bp-based frame

sub_5755F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88B10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575648

loc_575641:
mov	[ebp+var_8], 0

loc_575648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5755F0 endp

align 10h


; Attributes: bp-based frame

sub_575650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5756A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88A70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5756A8

loc_5756A1:
mov	[ebp+var_8], 0

loc_5756A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575650 endp

align 10h


; Attributes: bp-based frame

sub_5756B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88770
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575708

loc_575701:
mov	[ebp+var_8], 0

loc_575708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5756B0 endp

align 10h


; Attributes: bp-based frame

sub_575710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	0C0h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575764
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C58
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F19AA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57576B

loc_575764:
mov	[ebp+var_8], 0

loc_57576B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575710 endp

align 10h


; Attributes: bp-based frame

sub_575780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5757D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C5C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E10900
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5757D8

loc_5757D1:
mov	[ebp+var_8], 0

loc_5757D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575780 endp

align 10h


; Attributes: bp-based frame

sub_5757E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575831
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D885F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575838

loc_575831:
mov	[ebp+var_8], 0

loc_575838:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5757E0 endp

align 10h


; Attributes: bp-based frame

sub_575840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575891
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88580
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575898

loc_575891:
mov	[ebp+var_8], 0

loc_575898:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575840 endp

align 10h


; Attributes: bp-based frame

sub_5758A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5758F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D882D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5758F8

loc_5758F1:
mov	[ebp+var_8], 0

loc_5758F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5758A0 endp

align 10h


; Attributes: bp-based frame

sub_575900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575951
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88250
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575958

loc_575951:
mov	[ebp+var_8], 0

loc_575958:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575900 endp

align 10h


; Attributes: bp-based frame

sub_575960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5759B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D88100
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5759B8

loc_5759B1:
mov	[ebp+var_8], 0

loc_5759B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575960 endp

align 10h


; Attributes: bp-based frame

sub_5759C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575A11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87FB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575A18

loc_575A11:
mov	[ebp+var_8], 0

loc_575A18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5759C0 endp

align 10h


; Attributes: bp-based frame

sub_575A20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575A71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87F40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575A78

loc_575A71:
mov	[ebp+var_8], 0

loc_575A78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575A20 endp

align 10h


; Attributes: bp-based frame

sub_575A80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575AD4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C60
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_F19980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575ADB

loc_575AD4:
mov	[ebp+var_8], 0

loc_575ADB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575A80 endp

align 10h


; Attributes: bp-based frame

sub_575AF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575B41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87EC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575B48

loc_575B41:
mov	[ebp+var_8], 0

loc_575B48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575AF0 endp

align 10h


; Attributes: bp-based frame

sub_575B50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575BA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87E20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575BA8

loc_575BA1:
mov	[ebp+var_8], 0

loc_575BA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575B50 endp

align 10h


; Attributes: bp-based frame

sub_575BB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575C01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87D80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575C08

loc_575C01:
mov	[ebp+var_8], 0

loc_575C08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575BB0 endp

align 10h


; Attributes: bp-based frame

sub_575C10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575C61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87D00
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575C68

loc_575C61:
mov	[ebp+var_8], 0

loc_575C68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575C10 endp

align 10h


; Attributes: bp-based frame

sub_575C70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575CC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575CC8

loc_575CC1:
mov	[ebp+var_8], 0

loc_575CC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575C70 endp

align 10h


; Attributes: bp-based frame

sub_575CD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575D21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87C10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575D28

loc_575D21:
mov	[ebp+var_8], 0

loc_575D28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575CD0 endp

align 10h


; Attributes: bp-based frame

sub_575D30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575D81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87710
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575D88

loc_575D81:
mov	[ebp+var_8], 0

loc_575D88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575D30 endp

align 10h


; Attributes: bp-based frame

sub_575D90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575DE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87680
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575DE8

loc_575DE1:
mov	[ebp+var_8], 0

loc_575DE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575D90 endp

align 10h


; Attributes: bp-based frame

sub_575DF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575E41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575E48

loc_575E41:
mov	[ebp+var_8], 0

loc_575E48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575DF0 endp

align 10h


; Attributes: bp-based frame

sub_575E50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575EA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D874E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575EA8

loc_575EA1:
mov	[ebp+var_8], 0

loc_575EA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575E50 endp

align 10h


; Attributes: bp-based frame

sub_575EB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575F01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E711A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575F08

loc_575F01:
mov	[ebp+var_8], 0

loc_575F08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575EB0 endp

align 10h


; Attributes: bp-based frame

sub_575F10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575F61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87410
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575F68

loc_575F61:
mov	[ebp+var_8], 0

loc_575F68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575F10 endp

align 10h


; Attributes: bp-based frame

sub_575F70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_575FC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87300
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_575FC8

loc_575FC1:
mov	[ebp+var_8], 0

loc_575FC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575F70 endp

db 11h dup(0CCh)


; Attributes: bp-based frame

sub_575FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	128h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576034
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C64
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E71000
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_57603B

loc_576034:
mov	[ebp+var_8], 0

loc_57603B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_575FE0 endp

align 10h


; Attributes: bp-based frame

sub_576050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5760A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87260
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5760A8

loc_5760A1:
mov	[ebp+var_8], 0

loc_5760A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576050 endp

align 10h


; Attributes: bp-based frame

sub_5760B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576101
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D871C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576108

loc_576101:
mov	[ebp+var_8], 0

loc_576108:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5760B0 endp

align 10h


; Attributes: bp-based frame

sub_576110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576161
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D87150
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576168

loc_576161:
mov	[ebp+var_8], 0

loc_576168:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576110 endp

align 10h


; Attributes: bp-based frame

sub_576170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5761C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D870E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5761C8

loc_5761C1:
mov	[ebp+var_8], 0

loc_5761C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576170 endp

align 10h


; Attributes: bp-based frame

sub_5761D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576221
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86E60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576228

loc_576221:
mov	[ebp+var_8], 0

loc_576228:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5761D0 endp

align 10h


; Attributes: bp-based frame

sub_576230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576281
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86DE0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576288

loc_576281:
mov	[ebp+var_8], 0

loc_576288:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576230 endp

align 10h


; Attributes: bp-based frame

sub_576290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5762E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86D10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5762E8

loc_5762E1:
mov	[ebp+var_8], 0

loc_5762E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576290 endp

align 10h


; Attributes: bp-based frame

sub_5762F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576341
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86C40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576348

loc_576341:
mov	[ebp+var_8], 0

loc_576348:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5762F0 endp

align 10h


; Attributes: bp-based frame

sub_576350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5763A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86BD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5763A8

loc_5763A1:
mov	[ebp+var_8], 0

loc_5763A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576350 endp

align 10h


; Attributes: bp-based frame

sub_5763B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576401
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86B60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576408

loc_576401:
mov	[ebp+var_8], 0

loc_576408:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5763B0 endp

align 10h


; Attributes: bp-based frame

sub_576410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576461
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86AF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576468

loc_576461:
mov	[ebp+var_8], 0

loc_576468:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576410 endp

align 10h


; Attributes: bp-based frame

sub_576470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5764C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86A80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5764C8

loc_5764C1:
mov	[ebp+var_8], 0

loc_5764C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576470 endp

align 10h


; Attributes: bp-based frame

sub_5764D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576521
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D869B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576528

loc_576521:
mov	[ebp+var_8], 0

loc_576528:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5764D0 endp

align 10h


; Attributes: bp-based frame

sub_576530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576581
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D868D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576588

loc_576581:
mov	[ebp+var_8], 0

loc_576588:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576530 endp

align 10h


; Attributes: bp-based frame

sub_576590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5765E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E0DF70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5765E8

loc_5765E1:
mov	[ebp+var_8], 0

loc_5765E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576590 endp

align 10h


; Attributes: bp-based frame

sub_5765F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576641
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576648

loc_576641:
mov	[ebp+var_8], 0

loc_576648:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5765F0 endp

align 10h


; Attributes: bp-based frame

sub_576650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5766A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D867F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5766A8

loc_5766A1:
mov	[ebp+var_8], 0

loc_5766A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576650 endp

align 10h


; Attributes: bp-based frame

sub_5766B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576701
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D866A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576708

loc_576701:
mov	[ebp+var_8], 0

loc_576708:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5766B0 endp

align 10h


; Attributes: bp-based frame

sub_576710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576761
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86630
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576768

loc_576761:
mov	[ebp+var_8], 0

loc_576768:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576710 endp

align 10h


; Attributes: bp-based frame

sub_576770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5767C1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86520
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5767C8

loc_5767C1:
mov	[ebp+var_8], 0

loc_5767C8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576770 endp

align 10h


; Attributes: bp-based frame

sub_5767D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576821
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86430
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576828

loc_576821:
mov	[ebp+var_8], 0

loc_576828:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5767D0 endp

align 10h


; Attributes: bp-based frame

sub_576830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576881
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D86390
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576888

loc_576881:
mov	[ebp+var_8], 0

loc_576888:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576830 endp

align 10h


; Attributes: bp-based frame

sub_576890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5768E1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85DB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5768E8

loc_5768E1:
mov	[ebp+var_8], 0

loc_5768E8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576890 endp

align 10h


; Attributes: bp-based frame

sub_5768F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576941
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85BC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576948

loc_576941:
mov	[ebp+var_8], 0

loc_576948:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5768F0 endp

align 10h


; Attributes: bp-based frame

sub_576950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5769A1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70F60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5769A8

loc_5769A1:
mov	[ebp+var_8], 0

loc_5769A8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576950 endp

align 10h


; Attributes: bp-based frame

sub_5769B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576A01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599ADC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E0C9E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576A08

loc_576A01:
mov	[ebp+var_8], 0

loc_576A08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5769B0 endp

align 10h


; Attributes: bp-based frame

sub_576A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576A61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85B50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576A68

loc_576A61:
mov	[ebp+var_8], 0

loc_576A68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576A10 endp

align 10h


; Attributes: bp-based frame

sub_576A70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576AC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85AB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576AC8

loc_576AC1:
mov	[ebp+var_8], 0

loc_576AC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576A70 endp

align 10h


; Attributes: bp-based frame

sub_576AD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576B21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85A30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576B28

loc_576B21:
mov	[ebp+var_8], 0

loc_576B28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576AD0 endp

align 10h


; Attributes: bp-based frame

sub_576B30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576B81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576B88

loc_576B81:
mov	[ebp+var_8], 0

loc_576B88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576B30 endp

align 10h


; Attributes: bp-based frame

sub_576B90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576BE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D857F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576BE8

loc_576BE1:
mov	[ebp+var_8], 0

loc_576BE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576B90 endp

align 10h


; Attributes: bp-based frame

sub_576BF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576C41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D856D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576C48

loc_576C41:
mov	[ebp+var_8], 0

loc_576C48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576BF0 endp

align 10h


; Attributes: bp-based frame

sub_576C50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576CA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85630
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576CA8

loc_576CA1:
mov	[ebp+var_8], 0

loc_576CA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576C50 endp

align 10h


; Attributes: bp-based frame

sub_576CB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576D01
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C68
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E6F960
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576D08

loc_576D01:
mov	[ebp+var_8], 0

loc_576D08:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576CB0 endp

align 10h


; Attributes: bp-based frame

sub_576D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576D61
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85520
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576D68

loc_576D61:
mov	[ebp+var_8], 0

loc_576D68:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576D10 endp

align 10h


; Attributes: bp-based frame

sub_576D70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576DC1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85480
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576DC8

loc_576DC1:
mov	[ebp+var_8], 0

loc_576DC8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576D70 endp

align 10h


; Attributes: bp-based frame

sub_576DD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576E21
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85370
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576E28

loc_576E21:
mov	[ebp+var_8], 0

loc_576E28:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576DD0 endp

align 10h


; Attributes: bp-based frame

sub_576E30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576E81
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D85150
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576E88

loc_576E81:
mov	[ebp+var_8], 0

loc_576E88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576E30 endp

align 10h


; Attributes: bp-based frame

sub_576E90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576EE1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A24
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D84980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576EE8

loc_576EE1:
mov	[ebp+var_8], 0

loc_576EE8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576E90 endp

align 10h


; Attributes: bp-based frame

sub_576EF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576F41
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D846D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576F48

loc_576F41:
mov	[ebp+var_8], 0

loc_576F48:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576EF0 endp

align 10h


; Attributes: bp-based frame

sub_576F50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_576FA1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D84640
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_576FA8

loc_576FA1:
mov	[ebp+var_8], 0

loc_576FA8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576F50 endp

align 10h


; Attributes: bp-based frame

sub_576FB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577001
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E0B510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577008

loc_577001:
mov	[ebp+var_8], 0

loc_577008:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_576FB0 endp

align 10h


; Attributes: bp-based frame

sub_577010 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577061
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D845A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577068

loc_577061:
mov	[ebp+var_8], 0

loc_577068:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577010 endp

align 10h


; Attributes: bp-based frame

sub_577070 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	80h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5770C4
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C6C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70D30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5770CB

loc_5770C4:
mov	[ebp+var_8], 0

loc_5770CB:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577070 endp

align 10h


; Attributes: bp-based frame

sub_5770E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577131
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D84460
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577138

loc_577131:
mov	[ebp+var_8], 0

loc_577138:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5770E0 endp

align 10h


; Attributes: bp-based frame

sub_577140 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577191
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D84240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577198

loc_577191:
mov	[ebp+var_8], 0

loc_577198:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577140 endp

align 10h


; Attributes: bp-based frame

sub_5771A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5771F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D841D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5771F8

loc_5771F1:
mov	[ebp+var_8], 0

loc_5771F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5771A0 endp

align 10h


; Attributes: bp-based frame

sub_577200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577251
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83FB0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577258

loc_577251:
mov	[ebp+var_8], 0

loc_577258:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577200 endp

align 10h


; Attributes: bp-based frame

sub_577260 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5772B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83DC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5772B8

loc_5772B1:
mov	[ebp+var_8], 0

loc_5772B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577260 endp

align 10h


; Attributes: bp-based frame

sub_5772C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577311
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83AD0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577318

loc_577311:
mov	[ebp+var_8], 0

loc_577318:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5772C0 endp

align 10h


; Attributes: bp-based frame

sub_577320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577371
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83A60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577378

loc_577371:
mov	[ebp+var_8], 0

loc_577378:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577320 endp

align 10h


; Attributes: bp-based frame

sub_577380 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5773D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D839F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5773D8

loc_5773D1:
mov	[ebp+var_8], 0

loc_5773D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577380 endp

align 10h


; Attributes: bp-based frame

sub_5773E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577431
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83950
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577438

loc_577431:
mov	[ebp+var_8], 0

loc_577438:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5773E0 endp

align 10h


; Attributes: bp-based frame

sub_577440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577491
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D838B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577498

loc_577491:
mov	[ebp+var_8], 0

loc_577498:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577440 endp

align 10h


; Attributes: bp-based frame

sub_5774A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5774F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83810
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5774F8

loc_5774F1:
mov	[ebp+var_8], 0

loc_5774F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5774A0 endp

align 10h


; Attributes: bp-based frame

sub_577500 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577551
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83750
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577558

loc_577551:
mov	[ebp+var_8], 0

loc_577558:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577500 endp

align 10h


; Attributes: bp-based frame

sub_577560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5775B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83690
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5775B8

loc_5775B1:
mov	[ebp+var_8], 0

loc_5775B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577560 endp

align 10h


; Attributes: bp-based frame

sub_5775C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577611
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D835D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577618

loc_577611:
mov	[ebp+var_8], 0

loc_577618:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5775C0 endp

align 10h


; Attributes: bp-based frame

sub_577620 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577671
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83510
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577678

loc_577671:
mov	[ebp+var_8], 0

loc_577678:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577620 endp

align 10h


; Attributes: bp-based frame

sub_577680 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5776D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D83240
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5776D8

loc_5776D1:
mov	[ebp+var_8], 0

loc_5776D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577680 endp

align 10h


; Attributes: bp-based frame

sub_5776E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577731
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D830C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577738

loc_577731:
mov	[ebp+var_8], 0

loc_577738:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5776E0 endp

align 10h


; Attributes: bp-based frame

sub_577740 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577791
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155845C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D82C50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577798

loc_577791:
mov	[ebp+var_8], 0

loc_577798:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577740 endp

align 10h


; Attributes: bp-based frame

sub_5777A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5777F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D82A90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5777F8

loc_5777F1:
mov	[ebp+var_8], 0

loc_5777F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5777A0 endp

align 10h


; Attributes: bp-based frame

sub_577800 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577851
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D82A20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577858

loc_577851:
mov	[ebp+var_8], 0

loc_577858:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577800 endp

align 10h


; Attributes: bp-based frame

sub_577860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5778B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D829A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5778B8

loc_5778B1:
mov	[ebp+var_8], 0

loc_5778B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577860 endp

align 10h


; Attributes: bp-based frame

sub_5778C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577911
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B28
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D824A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577918

loc_577911:
mov	[ebp+var_8], 0

loc_577918:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5778C0 endp

align 10h


; Attributes: bp-based frame

sub_577920 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577971
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D823D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577978

loc_577971:
mov	[ebp+var_8], 0

loc_577978:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577920 endp

align 10h


; Attributes: bp-based frame

sub_577980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5779D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D82300
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5779D8

loc_5779D1:
mov	[ebp+var_8], 0

loc_5779D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577980 endp

align 10h


; Attributes: bp-based frame

sub_5779E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577A31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D82220
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577A38

loc_577A31:
mov	[ebp+var_8], 0

loc_577A38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5779E0 endp

align 10h


; Attributes: bp-based frame

sub_577A40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577A91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D82140
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577A98

loc_577A91:
mov	[ebp+var_8], 0

loc_577A98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577A40 endp

align 10h


; Attributes: bp-based frame

sub_577AA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577AF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D82060
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577AF8

loc_577AF1:
mov	[ebp+var_8], 0

loc_577AF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577AA0 endp

align 10h


; Attributes: bp-based frame

sub_577B00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577B51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81FF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577B58

loc_577B51:
mov	[ebp+var_8], 0

loc_577B58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577B00 endp

align 10h


; Attributes: bp-based frame

sub_577B60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	48h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577BB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B7C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E6F860
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577BB8

loc_577BB1:
mov	[ebp+var_8], 0

loc_577BB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577B60 endp

align 10h


; Attributes: bp-based frame

sub_577BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577C11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81F50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577C18

loc_577C11:
mov	[ebp+var_8], 0

loc_577C18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577BC0 endp

align 10h


; Attributes: bp-based frame

sub_577C20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577C71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81D90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577C78

loc_577C71:
mov	[ebp+var_8], 0

loc_577C78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577C20 endp

align 10h


; Attributes: bp-based frame

sub_577C80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577CD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81D20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577CD8

loc_577CD1:
mov	[ebp+var_8], 0

loc_577CD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577C80 endp

align 10h


; Attributes: bp-based frame

sub_577CE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577D31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81BA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577D38

loc_577D31:
mov	[ebp+var_8], 0

loc_577D38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577CE0 endp

align 10h


; Attributes: bp-based frame

sub_577D40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577D91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D819F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577D98

loc_577D91:
mov	[ebp+var_8], 0

loc_577D98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577D40 endp

align 10h


; Attributes: bp-based frame

sub_577DA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577DF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81980
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577DF8

loc_577DF1:
mov	[ebp+var_8], 0

loc_577DF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577DA0 endp

align 10h


; Attributes: bp-based frame

sub_577E00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577E51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81910
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577E58

loc_577E51:
mov	[ebp+var_8], 0

loc_577E58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577E00 endp

align 10h


; Attributes: bp-based frame

sub_577E60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577EB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81790
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577EB8

loc_577EB1:
mov	[ebp+var_8], 0

loc_577EB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577E60 endp

align 10h


; Attributes: bp-based frame

sub_577EC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577F11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D816F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577F18

loc_577F11:
mov	[ebp+var_8], 0

loc_577F18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577EC0 endp

align 10h


; Attributes: bp-based frame

sub_577F20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577F71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81620
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577F78

loc_577F71:
mov	[ebp+var_8], 0

loc_577F78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577F20 endp

align 10h


; Attributes: bp-based frame

sub_577F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_577FD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81350
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_577FD8

loc_577FD1:
mov	[ebp+var_8], 0

loc_577FD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577F80 endp

align 10h


; Attributes: bp-based frame

sub_577FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578031
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D812B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578038

loc_578031:
mov	[ebp+var_8], 0

loc_578038:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_577FE0 endp

align 10h


; Attributes: bp-based frame

sub_578040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578091
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D811C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578098

loc_578091:
mov	[ebp+var_8], 0

loc_578098:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578040 endp

align 10h


; Attributes: bp-based frame

sub_5780A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5780F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D81040
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5780F8

loc_5780F1:
mov	[ebp+var_8], 0

loc_5780F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5780A0 endp

align 10h


; Attributes: bp-based frame

sub_578100 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578151
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80DF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578158

loc_578151:
mov	[ebp+var_8], 0

loc_578158:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578100 endp

align 10h


; Attributes: bp-based frame

sub_578160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5781B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80BA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5781B8

loc_5781B1:
mov	[ebp+var_8], 0

loc_5781B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578160 endp

align 10h


; Attributes: bp-based frame

sub_5781C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578211
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80B30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578218

loc_578211:
mov	[ebp+var_8], 0

loc_578218:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5781C0 endp

align 10h


; Attributes: bp-based frame

sub_578220 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578271
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80A90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578278

loc_578271:
mov	[ebp+var_8], 0

loc_578278:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578220 endp

align 10h


; Attributes: bp-based frame

sub_578280 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5782D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80A20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5782D8

loc_5782D1:
mov	[ebp+var_8], 0

loc_5782D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578280 endp

align 10h


; Attributes: bp-based frame

sub_5782E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578331
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D809B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578338

loc_578331:
mov	[ebp+var_8], 0

loc_578338:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5782E0 endp

align 10h


; Attributes: bp-based frame

sub_578340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578391
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D807F0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578398

loc_578391:
mov	[ebp+var_8], 0

loc_578398:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578340 endp

align 10h


; Attributes: bp-based frame

sub_5783A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5783F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80630
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5783F8

loc_5783F1:
mov	[ebp+var_8], 0

loc_5783F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5783A0 endp

align 10h


; Attributes: bp-based frame

sub_578400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578451
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80560
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578458

loc_578451:
mov	[ebp+var_8], 0

loc_578458:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578400 endp

align 10h


; Attributes: bp-based frame

sub_578460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5784B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B0C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70C90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5784B8

loc_5784B1:
mov	[ebp+var_8], 0

loc_5784B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578460 endp

align 10h


; Attributes: bp-based frame

sub_5784C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578511
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D803D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578518

loc_578511:
mov	[ebp+var_8], 0

loc_578518:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5784C0 endp

align 10h


; Attributes: bp-based frame

sub_578520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578571
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80360
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578578

loc_578571:
mov	[ebp+var_8], 0

loc_578578:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578520 endp

align 10h


; Attributes: bp-based frame

sub_578580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5785D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D801B0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5785D8

loc_5785D1:
mov	[ebp+var_8], 0

loc_5785D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578580 endp

align 10h


; Attributes: bp-based frame

sub_5785E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578631
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D80130
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578638

loc_578631:
mov	[ebp+var_8], 0

loc_578638:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5785E0 endp

align 10h


; Attributes: bp-based frame

sub_578640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578691
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D800C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578698

loc_578691:
mov	[ebp+var_8], 0

loc_578698:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578640 endp

align 10h


; Attributes: bp-based frame

sub_5786A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5786F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70BF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5786F8

loc_5786F1:
mov	[ebp+var_8], 0

loc_5786F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5786A0 endp

align 10h


; Attributes: bp-based frame

sub_578700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578751
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7FDF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578758

loc_578751:
mov	[ebp+var_8], 0

loc_578758:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578700 endp

align 10h


; Attributes: bp-based frame

sub_578760 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	60h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5787B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B2C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70B60
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5787B8

loc_5787B1:
mov	[ebp+var_8], 0

loc_5787B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578760 endp

align 10h


; Attributes: bp-based frame

sub_5787C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578811
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7FD80
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578818

loc_578811:
mov	[ebp+var_8], 0

loc_578818:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5787C0 endp

align 10h


; Attributes: bp-based frame

sub_578820 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578871
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7FD10
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578878

loc_578871:
mov	[ebp+var_8], 0

loc_578878:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578820 endp

align 10h


; Attributes: bp-based frame

sub_578880 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5788D1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7FCA0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5788D8

loc_5788D1:
mov	[ebp+var_8], 0

loc_5788D8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578880 endp

align 10h


; Attributes: bp-based frame

sub_5788E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578931
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7FC30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578938

loc_578931:
mov	[ebp+var_8], 0

loc_578938:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5788E0 endp

align 10h


; Attributes: bp-based frame

sub_578940 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578991
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7FBC0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578998

loc_578991:
mov	[ebp+var_8], 0

loc_578998:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578940 endp

align 10h


; Attributes: bp-based frame

sub_5789A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5789F1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7FB50
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5789F8

loc_5789F1:
mov	[ebp+var_8], 0

loc_5789F8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5789A0 endp

align 10h


; Attributes: bp-based frame

sub_578A00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	50h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578A51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558468
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7F540
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578A58

loc_578A51:
mov	[ebp+var_8], 0

loc_578A58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578A00 endp

align 10h


; Attributes: bp-based frame

sub_578A60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578AB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7F4C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578AB8

loc_578AB1:
mov	[ebp+var_8], 0

loc_578AB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578A60 endp

align 10h


; Attributes: bp-based frame

sub_578AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	78h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578B11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C70
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E70A40
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578B18

loc_578B11:
mov	[ebp+var_8], 0

loc_578B18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578AC0 endp

align 10h


; Attributes: bp-based frame

sub_578B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578B71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599C74
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E065C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578B78

loc_578B71:
mov	[ebp+var_8], 0

loc_578B78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578B20 endp

align 10h


; Attributes: bp-based frame

sub_578B80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578BD1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7F1E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578BD8

loc_578BD1:
mov	[ebp+var_8], 0

loc_578BD8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578B80 endp

align 10h


; Attributes: bp-based frame

sub_578BE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578C31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7F0A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578C38

loc_578C31:
mov	[ebp+var_8], 0

loc_578C38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578BE0 endp

align 10h


; Attributes: bp-based frame

sub_578C40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578C91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7F030
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578C98

loc_578C91:
mov	[ebp+var_8], 0

loc_578C98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578C40 endp

align 10h


; Attributes: bp-based frame

sub_578CA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578CF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7EF30
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578CF8

loc_578CF1:
mov	[ebp+var_8], 0

loc_578CF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578CA0 endp

align 10h


; Attributes: bp-based frame

sub_578D00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578D51
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7EE90
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578D58

loc_578D51:
mov	[ebp+var_8], 0

loc_578D58:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578D00 endp

align 10h


; Attributes: bp-based frame

sub_578D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578DB1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7ED70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578DB8

loc_578DB1:
mov	[ebp+var_8], 0

loc_578DB8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578D60 endp

align 10h


; Attributes: bp-based frame

sub_578DC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578E11
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7EA70
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578E18

loc_578E11:
mov	[ebp+var_8], 0

loc_578E18:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578DC0 endp

align 10h


; Attributes: bp-based frame

sub_578E20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578E71
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E9E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578E78

loc_578E71:
mov	[ebp+var_8], 0

loc_578E78:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578E20 endp

align 10h


; Attributes: bp-based frame

sub_578E80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578ED1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E970
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578ED8

loc_578ED1:
mov	[ebp+var_8], 0

loc_578ED8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578E80 endp

align 10h


; Attributes: bp-based frame

sub_578EE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578F31
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E870
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578F38

loc_578F31:
mov	[ebp+var_8], 0

loc_578F38:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578EE0 endp

align 10h


; Attributes: bp-based frame

sub_578F40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578F91
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E600
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578F98

loc_578F91:
mov	[ebp+var_8], 0

loc_578F98:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578F40 endp

align 10h


; Attributes: bp-based frame

sub_578FA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_578FF1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E3D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_578FF8

loc_578FF1:
mov	[ebp+var_8], 0

loc_578FF8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_578FA0 endp

align 10h


; Attributes: bp-based frame

sub_579000 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_579051
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558450
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E2D0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_579058

loc_579051:
mov	[ebp+var_8], 0

loc_579058:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_579000 endp

align 10h


; Attributes: bp-based frame

sub_579060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5790B1
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599AE8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E260
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5790B8

loc_5790B1:
mov	[ebp+var_8], 0

loc_5790B8:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_579060 endp

align 10h


; Attributes: bp-based frame

sub_5790C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_579111
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D7E1C0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_579118

loc_579111:
mov	[ebp+var_8], 0

loc_579118:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5790C0 endp

align 10h


; Attributes: bp-based frame

sub_579120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_579165
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_57CD10
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_579165:
mov	esp, ebp
pop	ebp
retn
sub_579120 endp

align 10h


; Attributes: bp-based frame

sub_579170 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_490D70
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_57DC10
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_579170 endp

align 10h


; Attributes: bp-based frame

sub_5791F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_579235
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_57D2B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_579235:
mov	esp, ebp
pop	ebp
retn
sub_5791F0 endp

align 10h


; Attributes: bp-based frame

sub_579240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_579285
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_57D510
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_579285:
mov	esp, ebp
pop	ebp
retn
sub_579240 endp

align 10h


; Attributes: bp-based frame

sub_579290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BAC
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DDF590
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_579290 endp



; Attributes: bp-based frame

sub_5792D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599A30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E7CCA0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5792D0 endp



; Attributes: bp-based frame

sub_579310 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599B14
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E77940
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_579310 endp



; Attributes: bp-based frame

sub_579350 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581908
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_DA1000
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_579350 endp



; Attributes: bp-based frame

sub_579390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1599BF0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_E73280
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_579390 endp



; Attributes: bp-based frame

sub_5793D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D8D080
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5793D0 endp



; Attributes: bp-based frame

sub_579410 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 138Bh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1558464
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_D841D0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_579410 endp



; Attributes: bp-based frame

sub_579450 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579496
push	80h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579496:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579450 endp

align 10h


; Attributes: bp-based frame

sub_5794A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5794E6
push	80h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_5794E6:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5794A0 endp

align 10h


; Attributes: bp-based frame

sub_5794F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57BE60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57951A
push	80h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57951A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5794F0 endp

align 10h


; Attributes: bp-based frame

sub_579530 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
add	eax, 10h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
add	ecx, 20h
call	sub_437300
mov	ecx, [ebp+var_38]
call	sub_4087D0
mov	ecx, [ebp+var_3C]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579573
push	40h
mov	edx, [ebp+var_3C]
push	edx
call	sub_1111040
add	esp, 8

loc_579573:
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_579530 endp

align 10h


; Attributes: bp-based frame

sub_579580 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57BEA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5795A7
push	70h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_5795A7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579580 endp



; Attributes: bp-based frame

sub_5795B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57BEE0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5795D7
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_5795D7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5795B0 endp



; Attributes: bp-based frame

sub_5795E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579610
push	60h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_579610:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5795E0 endp

align 10h


; Attributes: bp-based frame

sub_579620 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579663
push	50h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579663:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579620 endp

align 10h


; Attributes: bp-based frame

sub_579670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5796B3
push	78h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_5796B3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579670 endp

align 10h


; Attributes: bp-based frame

sub_5796C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C3E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5796EA
push	98h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_5796EA:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5796C0 endp

align 10h


; Attributes: bp-based frame

sub_579700 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_530270
mov	ecx, [ebp+var_8]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579735
push	98h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_579735:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579700 endp

align 10h


; Attributes: bp-based frame

sub_579740 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579783
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579783:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579740 endp

align 10h


; Attributes: bp-based frame

sub_579790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5797D3
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_5797D3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579790 endp

align 10h


; Attributes: bp-based frame

sub_5797E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579826
push	90h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579826:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5797E0 endp

align 10h


; Attributes: bp-based frame

sub_579830 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579876
push	98h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579876:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579830 endp

align 10h


; Attributes: bp-based frame

sub_579880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5798B0
push	68h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5798B0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_579880 endp

align 10h


; Attributes: bp-based frame

sub_5798C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579906
push	90h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579906:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5798C0 endp

align 10h


; Attributes: bp-based frame

sub_579910 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57BF20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579937
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_579937:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579910 endp



; Attributes: bp-based frame

sub_579940 proc	near

var_30=	dword ptr -30h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_57BF60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579967
push	78h
mov	ecx, [ebp+var_30]
push	ecx
call	sub_1111040
add	esp, 8

loc_579967:
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_579940 endp



; Attributes: bp-based frame

sub_579970 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 28h
call	sub_468AA0
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5799B3
push	48h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_5799B3:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_579970 endp

align 10h


; Attributes: bp-based frame

sub_5799C0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 20h
call	sub_5552D0
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579A03
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_579A03:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_5799C0 endp

align 10h


; Attributes: bp-based frame

sub_579A10 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 20h
call	sub_591390
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579A53
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_579A53:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_579A10 endp

align 10h


; Attributes: bp-based frame

sub_579A60 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C3E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579A8A
push	80h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_579A8A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579A60 endp

align 10h


; Attributes: bp-based frame

sub_579AA0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_534300
mov	ecx, [ebp+var_8]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579AD2
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_579AD2:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579AA0 endp

align 10h


; Attributes: bp-based frame

sub_579AE0 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 10h
call	sub_5343B0
mov	ecx, [ebp+var_2C]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579B15
push	0B8h
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_1111040
add	esp, 8

loc_579B15:
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_579AE0 endp

align 10h


; Attributes: bp-based frame

sub_579B20 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 20h
call	sub_4A9770
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579B63
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_579B63:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_579B20 endp

align 10h


; Attributes: bp-based frame

sub_579B70 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 20h
call	sub_5553D0
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579BB3
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_579BB3:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_579B70 endp

align 10h


; Attributes: bp-based frame

sub_579BC0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57BFA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579BE7
push	50h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_579BE7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_579BC0 endp



; Attributes: bp-based frame

sub_579BF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579C33
push	70h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579C33:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579BF0 endp

align 10h


; Attributes: bp-based frame

sub_579C40 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C030
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579C67
push	50h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_579C67:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579C40 endp



; Attributes: bp-based frame

sub_579C70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579CB6
push	0A0h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579CB6:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579C70 endp

align 10h


; Attributes: bp-based frame

sub_579CC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579D06
push	0A8h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579D06:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579CC0 endp

align 10h


; Attributes: bp-based frame

sub_579D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 4Ch
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579D56
push	88h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579D56:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579D10 endp

align 10h


; Attributes: bp-based frame

sub_579D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579DA3
push	60h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579DA3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579D60 endp

align 10h


; Attributes: bp-based frame

sub_579DB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579DF3
push	70h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579DF3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579DB0 endp

align 10h


; Attributes: bp-based frame

sub_579E00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_46B570
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579E43
push	38h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579E43:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579E00 endp

align 10h


; Attributes: bp-based frame

sub_579E50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C070
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579E77
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_579E77:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579E50 endp



; Attributes: bp-based frame

sub_579E80 proc	near

var_4C=	dword ptr -4Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_4C]
add	ecx, 10h
call	sub_5367A0
mov	ecx, [ebp+var_4C]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579EB5
push	400h
mov	ecx, [ebp+var_4C]
push	ecx
call	sub_1111040
add	esp, 8

loc_579EB5:
mov	eax, [ebp+var_4C]
mov	esp, ebp
pop	ebp
retn	4
sub_579E80 endp

align 10h


; Attributes: bp-based frame

sub_579EC0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C0B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579EE7
push	48h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_579EE7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_579EC0 endp



; Attributes: bp-based frame

sub_579EF0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C140
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579F17
push	58h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_579F17:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_579EF0 endp



; Attributes: bp-based frame

sub_579F20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_579F66
push	88h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_579F66:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579F20 endp

align 10h


; Attributes: bp-based frame

sub_579F70 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C3E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579F9A
push	88h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_579F9A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579F70 endp

align 10h


; Attributes: bp-based frame

sub_579FB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_537370
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_579FE3
push	0B8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_579FE3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_579FB0 endp

align 10h


; Attributes: bp-based frame

sub_579FF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C190
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A01A
push	88h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A01A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_579FF0 endp

align 10h


; Attributes: bp-based frame

sub_57A030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_537E70
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A063
push	0D8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A063:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A030 endp

align 10h


; Attributes: bp-based frame

sub_57A070 proc	near

var_7C=	dword ptr -7Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_7C]
add	ecx, 10h
call	sub_5380A0
mov	ecx, [ebp+var_7C]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A0A2
push	58h
mov	ecx, [ebp+var_7C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A0A2:
mov	eax, [ebp+var_7C]
mov	esp, ebp
pop	ebp
retn	4
sub_57A070 endp

align 10h


; Attributes: bp-based frame

sub_57A0B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5385C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A0E3
push	0B8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A0E3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A0B0 endp

align 10h


; Attributes: bp-based frame

sub_57A0F0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_538670
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+var_20]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A136
push	100h
mov	edx, [ebp+var_20]
push	edx
call	sub_1111040
add	esp, 8

loc_57A136:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_57A0F0 endp

align 10h


; Attributes: bp-based frame

sub_57A140 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_538F70
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A173
push	108h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A173:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A140 endp

align 10h


; Attributes: bp-based frame

sub_57A180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_539070
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A1B3
push	0E8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A1B3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A180 endp

align 10h


; Attributes: bp-based frame

sub_57A1C0 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
add	ecx, 10h
call	sub_539240
mov	ecx, [ebp+var_20]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A1F5
push	168h
mov	ecx, [ebp+var_20]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A1F5:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_57A1C0 endp

align 10h


; Attributes: bp-based frame

sub_57A200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A243
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A243:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A200 endp

align 10h


; Attributes: bp-based frame

sub_57A250 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 28h
call	sub_4A9770
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A293
push	48h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57A293:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57A250 endp

align 10h


; Attributes: bp-based frame

sub_57A2A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A2E3
push	70h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A2E3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A2A0 endp

align 10h


; Attributes: bp-based frame

sub_57A2F0 proc	near

var_54=	dword ptr -54h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
add	ecx, 10h
call	sub_53A270
mov	ecx, [ebp+var_54]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A325
push	0C8h
mov	ecx, [ebp+var_54]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A325:
mov	eax, [ebp+var_54]
mov	esp, ebp
pop	ebp
retn	4
sub_57A2F0 endp

align 10h


; Attributes: bp-based frame

sub_57A330 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A360
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A360:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A330 endp

align 10h


; Attributes: bp-based frame

sub_57A370 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 34h
call	sub_555570
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A3B3
push	50h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57A3B3:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57A370 endp

align 10h


; Attributes: bp-based frame

sub_57A3C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A403
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A403:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A3C0 endp

align 10h


; Attributes: bp-based frame

sub_57A410 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_57D1E0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A453
push	38h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A453:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A410 endp

align 10h


; Attributes: bp-based frame

sub_57A460 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C1D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A48A
push	80h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A48A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A460 endp

align 10h


; Attributes: bp-based frame

sub_57A4A0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C210
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A4C7
push	70h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A4C7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A4A0 endp



; Attributes: bp-based frame

sub_57A4D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_4EA560
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+var_20]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A516
push	1F0h
mov	edx, [ebp+var_20]
push	edx
call	sub_1111040
add	esp, 8

loc_57A516:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_57A4D0 endp

align 10h


; Attributes: bp-based frame

sub_57A520 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A550
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A550:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A520 endp

align 10h


; Attributes: bp-based frame

sub_57A560 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A590
push	78h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A590:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A560 endp

align 10h


; Attributes: bp-based frame

sub_57A5A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A5E3
push	70h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A5E3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A5A0 endp

align 10h


; Attributes: bp-based frame

sub_57A5F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A633
push	60h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A633:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A5F0 endp

align 10h


; Attributes: bp-based frame

sub_57A640 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A683
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A683:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A640 endp

align 10h


; Attributes: bp-based frame

sub_57A690 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A6D3
push	70h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A6D3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A690 endp

align 10h


; Attributes: bp-based frame

sub_57A6E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_53B690
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A713
push	0A0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A713:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A6E0 endp

align 10h


; Attributes: bp-based frame

sub_57A720 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 30h
call	sub_555660
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A763
push	50h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57A763:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57A720 endp

align 10h


; Attributes: bp-based frame

sub_57A770 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 20h
call	sub_4EA560
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+var_20]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A7B6
push	1F8h
mov	edx, [ebp+var_20]
push	edx
call	sub_1111040
add	esp, 8

loc_57A7B6:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_57A770 endp

align 10h


; Attributes: bp-based frame

sub_57A7C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A803
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A803:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A7C0 endp

align 10h


; Attributes: bp-based frame

sub_57A810 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A840
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A840:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A810 endp

align 10h


; Attributes: bp-based frame

sub_57A850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A893
push	60h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A893:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A850 endp

align 10h


; Attributes: bp-based frame

sub_57A8A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A8D0
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A8D0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57A8A0 endp

align 10h


; Attributes: bp-based frame

sub_57A8E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A923
push	50h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A923:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A8E0 endp

align 10h


; Attributes: bp-based frame

sub_57A930 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C290
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57A957
push	70h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57A957:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A930 endp



; Attributes: bp-based frame

sub_57A960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A9A3
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A9A3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A960 endp

align 10h


; Attributes: bp-based frame

sub_57A9B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57A9F3
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57A9F3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57A9B0 endp

align 10h


; Attributes: bp-based frame

sub_57AA00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_57D240
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57AA43
push	48h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57AA43:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AA00 endp

align 10h


; Attributes: bp-based frame

sub_57AA50 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C2D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AA77
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AA77:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AA50 endp



; Attributes: bp-based frame

sub_57AA80 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C310
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AAA7
push	60h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AAA7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AA80 endp



; Attributes: bp-based frame

sub_57AAB0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C350
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AAD7
push	48h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AAD7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57AAB0 endp



; Attributes: bp-based frame

sub_57AAE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C3A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AB07
push	78h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AB07:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AAE0 endp



; Attributes: bp-based frame

sub_57AB10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C3E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AB3A
push	0A0h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AB3A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AB10 endp

align 10h


; Attributes: bp-based frame

sub_57AB50 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C420
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AB77
push	50h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AB77:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57AB50 endp



; Attributes: bp-based frame

sub_57AB80 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C4B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57ABA7
push	58h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57ABA7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57AB80 endp



; Attributes: bp-based frame

sub_57ABB0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C0B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57ABD7
push	50h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57ABD7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57ABB0 endp



; Attributes: bp-based frame

sub_57ABE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57AC23
push	48h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57AC23:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57ABE0 endp

align 10h


; Attributes: bp-based frame

sub_57AC30 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C540
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AC57
push	50h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AC57:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57AC30 endp



; Attributes: bp-based frame

sub_57AC60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57ACA3
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57ACA3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AC60 endp

align 10h


; Attributes: bp-based frame

sub_57ACB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57ACF3
push	78h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57ACF3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57ACB0 endp

align 10h


; Attributes: bp-based frame

sub_57AD00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57AD43
push	60h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57AD43:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AD00 endp

align 10h


; Attributes: bp-based frame

sub_57AD50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57AD93
push	50h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57AD93:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AD50 endp

align 10h


; Attributes: bp-based frame

sub_57ADA0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C5B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57ADC7
push	48h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57ADC7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57ADA0 endp



; Attributes: bp-based frame

sub_57ADD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57AE13
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57AE13:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57ADD0 endp

align 10h


; Attributes: bp-based frame

sub_57AE20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_5D2630
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57AE63
push	38h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57AE63:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AE20 endp

align 10h


; Attributes: bp-based frame

sub_57AE70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_46B570
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57AEB3
push	40h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57AEB3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AE70 endp

align 10h


; Attributes: bp-based frame

sub_57AEC0 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_57C600
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AEE7
push	58h
mov	ecx, [ebp+var_14]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AEE7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_57AEC0 endp



; Attributes: bp-based frame

sub_57AEF0 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_57C680
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AF17
push	48h
mov	ecx, [ebp+var_14]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AF17:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_57AEF0 endp



; Attributes: bp-based frame

sub_57AF20 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_53ED10
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AF55
push	0A0h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AF55:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_57AF20 endp

align 10h


; Attributes: bp-based frame

sub_57AF60 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_57C680
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AF87
push	50h
mov	ecx, [ebp+var_14]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AF87:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_57AF60 endp



; Attributes: bp-based frame

sub_57AF90 proc	near

var_3C=	dword ptr -3Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
add	ecx, 10h
call	sub_53F430
mov	ecx, [ebp+var_3C]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57AFC5
push	4C8h
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57AFC5:
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_57AF90 endp

align 10h


; Attributes: bp-based frame

sub_57AFD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B013
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B013:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57AFD0 endp

align 10h


; Attributes: bp-based frame

sub_57B020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B066
push	98h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B066:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B020 endp

align 10h


; Attributes: bp-based frame

sub_57B070 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_4087D0
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B0CE
push	80h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_57B0CE:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_57B070 endp

align 10h


; Attributes: bp-based frame

sub_57B0F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B120
push	70h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B120:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57B0F0 endp

align 10h


; Attributes: bp-based frame

sub_57B130 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B163
push	88h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B163:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57B130 endp

align 10h


; Attributes: bp-based frame

sub_57B170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B1B6
push	88h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B1B6:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B170 endp

align 10h


; Attributes: bp-based frame

sub_57B1C0 proc	near

var_54=	dword ptr -54h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
add	ecx, 10h
call	sub_53FE50
mov	ecx, [ebp+var_54]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B1F5
push	90h
mov	ecx, [ebp+var_54]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B1F5:
mov	eax, [ebp+var_54]
mov	esp, ebp
pop	ebp
retn	4
sub_57B1C0 endp

align 10h


; Attributes: bp-based frame

sub_57B200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B243
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B243:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B200 endp

align 10h


; Attributes: bp-based frame

sub_57B250 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
add	eax, 10h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
add	ecx, 20h
call	sub_436CF0
mov	ecx, [ebp+var_38]
call	sub_4087D0
mov	ecx, [ebp+var_3C]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B293
push	40h
mov	edx, [ebp+var_3C]
push	edx
call	sub_1111040
add	esp, 8

loc_57B293:
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_57B250 endp

align 10h


; Attributes: bp-based frame

sub_57B2A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B2E6
push	88h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B2E6:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B2A0 endp

align 10h


; Attributes: bp-based frame

sub_57B2F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C720
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B317
push	50h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B317:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B2F0 endp



; Attributes: bp-based frame

sub_57B320 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C760
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B34A
push	80h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B34A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B320 endp

align 10h


; Attributes: bp-based frame

sub_57B360 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B3A3
push	58h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B3A3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B360 endp

align 10h


; Attributes: bp-based frame

sub_57B3B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B3F3
push	60h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B3F3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B3B0 endp

align 10h


; Attributes: bp-based frame

sub_57B400 proc	near

var_6C=	dword ptr -6Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
add	ecx, 10h
call	sub_540CD0
mov	ecx, [ebp+var_6C]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B435
push	80h
mov	ecx, [ebp+var_6C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B435:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn	4
sub_57B400 endp

align 10h


; Attributes: bp-based frame

sub_57B440 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
add	eax, 10h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
add	ecx, 28h
call	sub_436CF0
mov	ecx, [ebp+var_38]
call	sub_4087D0
mov	ecx, [ebp+var_3C]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B483
push	48h
mov	edx, [ebp+var_3C]
push	edx
call	sub_1111040
add	esp, 8

loc_57B483:
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_57B440 endp

align 10h


; Attributes: bp-based frame

sub_57B490 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C3E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B4BA
push	90h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B4BA:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B490 endp

align 10h


; Attributes: bp-based frame

sub_57B4D0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 20h
call	sub_555450
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B513
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57B513:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57B4D0 endp

align 10h


; Attributes: bp-based frame

sub_57B520 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_541750
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B553
push	0A0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B553:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57B520 endp

align 10h


; Attributes: bp-based frame

sub_57B560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B5A3
push	78h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B5A3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B560 endp

align 10h


; Attributes: bp-based frame

sub_57B5B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B5F3
push	68h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B5F3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B5B0 endp

align 10h


; Attributes: bp-based frame

sub_57B600 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_542990
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B633
push	108h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B633:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57B600 endp

align 10h


; Attributes: bp-based frame

sub_57B640 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
call	sub_57C7A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B667
push	48h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B667:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_57B640 endp



; Attributes: bp-based frame

sub_57B670 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57C7E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B697
push	78h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B697:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57B670 endp



; Attributes: bp-based frame

sub_57B6A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B6E3
push	50h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B6E3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B6A0 endp

align 10h


; Attributes: bp-based frame

sub_57B6F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_1014910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B733
push	38h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57B733:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B6F0 endp

align 10h


; Attributes: bp-based frame

sub_57B740 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C850
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B76A
push	80h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B76A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B740 endp

align 10h


; Attributes: bp-based frame

sub_57B780 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C290
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B7A7
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B7A7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B780 endp



; Attributes: bp-based frame

sub_57B7B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C890
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B7D7
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B7D7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B7B0 endp



; Attributes: bp-based frame

sub_57B7E0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 24h
call	sub_5557D0
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57B823
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57B823:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57B7E0 endp

align 10h


; Attributes: bp-based frame

sub_57B830 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_543BA0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B865
push	0A8h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B865:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B830 endp

align 10h


; Attributes: bp-based frame

sub_57B870 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_543C60
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B8A3
push	90h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B8A3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57B870 endp

align 10h


; Attributes: bp-based frame

sub_57B8B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C8D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B8D7
push	68h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B8D7:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B8B0 endp



; Attributes: bp-based frame

sub_57B8E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C910
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B90A
push	88h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B90A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B8E0 endp

align 10h


; Attributes: bp-based frame

sub_57B920 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5451D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B953
push	0F8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B953:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57B920 endp

align 10h


; Attributes: bp-based frame

sub_57B960 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57C950
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B98A
push	90h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B98A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57B960 endp

align 10h


; Attributes: bp-based frame

sub_57B9A0 proc	near

var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
add	ecx, 10h
call	sub_545920
mov	ecx, [ebp+var_34]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57B9D5
push	0C8h
mov	ecx, [ebp+var_34]
push	ecx
call	sub_1111040
add	esp, 8

loc_57B9D5:
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	4
sub_57B9A0 endp

align 10h


; Attributes: bp-based frame

sub_57B9E0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 20h
call	sub_5558F0
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57BA23
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57BA23:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57B9E0 endp

align 10h


; Attributes: bp-based frame

sub_57BA30 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
add	eax, 10h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
add	ecx, 2Ch
call	sub_436CF0
mov	ecx, [ebp+var_38]
call	sub_4087D0
mov	ecx, [ebp+var_3C]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57BA73
push	48h
mov	edx, [ebp+var_3C]
push	edx
call	sub_1111040
add	esp, 8

loc_57BA73:
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_57BA30 endp

align 10h


; Attributes: bp-based frame

sub_57BA80 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
call	sub_57C990
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BAA7
push	58h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BAA7:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_57BA80 endp



; Attributes: bp-based frame

sub_57BAB0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
call	sub_57C9D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BAD7
push	48h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BAD7:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_57BAB0 endp



; Attributes: bp-based frame

sub_57BAE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57CA10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BB0A
push	0B0h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BB0A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57BAE0 endp

align 10h


; Attributes: bp-based frame

sub_57BB20 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_57CA50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BB4A
push	90h
mov	ecx, [ebp+var_14]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BB4A:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_57BB20 endp

align 10h


; Attributes: bp-based frame

sub_57BB60 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_57CA50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BB8A
push	88h
mov	ecx, [ebp+var_14]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BB8A:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_57BB60 endp

align 10h


; Attributes: bp-based frame

sub_57BBA0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 2Ch
call	sub_555750
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57BBE3
push	48h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57BBE3:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57BBA0 endp

align 10h


; Attributes: bp-based frame

sub_57BBF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57BC33
push	70h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57BC33:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57BBF0 endp

align 10h


; Attributes: bp-based frame

sub_57BC40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_546C50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BC73
push	0C0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BC73:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57BC40 endp

align 10h


; Attributes: bp-based frame

sub_57BC80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57BCC3
push	38h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57BCC3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57BC80 endp

align 10h


; Attributes: bp-based frame

sub_57BCD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_57CAD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BCFA
push	98h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BCFA:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57BCD0 endp

align 10h


; Attributes: bp-based frame

sub_57BD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5472C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BD43
push	128h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BD43:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57BD10 endp

align 10h


; Attributes: bp-based frame

sub_57BD50 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_57CB10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BD77
push	48h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BD77:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57BD50 endp



; Attributes: bp-based frame

sub_57BD80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_547E40
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_57BDB3
push	80h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_57BDB3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57BD80 endp

align 10h


; Attributes: bp-based frame

sub_57BDC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57BE03
push	78h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_57BE03:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57BDC0 endp

align 10h


; Attributes: bp-based frame

sub_57BE10 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
add	ecx, 24h
call	sub_487140
mov	ecx, [ebp+var_34]
call	sub_4087D0
mov	ecx, [ebp+var_38]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_57BE53
push	40h
mov	edx, [ebp+var_38]
push	edx
call	sub_1111040
add	esp, 8

loc_57BE53:
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_57BE10 endp

align 10h


; Attributes: bp-based frame

sub_57BE60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57BE60 endp

align 10h


; Attributes: bp-based frame

sub_57BEA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_408B00
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57BEA0 endp

align 10h


; Attributes: bp-based frame

sub_57BEE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
add	eax, 50h
call	sub_40ABB0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57BEE0 endp

align 10h


; Attributes: bp-based frame

sub_57BF20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57BF20 endp

align 10h


; Attributes: bp-based frame

sub_57BF60 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
add	eax, 10h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
add	ecx, 54h
call	sub_555250
mov	ecx, [ebp+var_2C]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_2C]
call	sub_4087D0
mov	ecx, [ebp+var_30]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57BF60 endp

align 10h


; Attributes: bp-based frame

sub_57BFA0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_433610
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 24h
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57BFA0 endp

align 10h


; Attributes: bp-based frame

sub_57C030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C030 endp

align 10h


; Attributes: bp-based frame

sub_57C070 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C070 endp

align 10h


; Attributes: bp-based frame

sub_57C0B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 20h
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57C0B0 endp

align 10h


; Attributes: bp-based frame

sub_57C140 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 30h
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+var_C]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C140 endp

align 10h


; Attributes: bp-based frame

sub_57C190 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 4Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C190 endp

align 10h


; Attributes: bp-based frame

sub_57C1D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C1D0 endp

align 10h


; Attributes: bp-based frame

sub_57C210 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C210 endp

align 10h


; Attributes: bp-based frame

sub_57C250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C250 endp

align 10h


; Attributes: bp-based frame

sub_57C290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C290 endp

align 10h


; Attributes: bp-based frame

sub_57C2D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C2D0 endp

align 10h


; Attributes: bp-based frame

sub_57C310 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_4892A0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_4892A0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C310 endp

align 10h


; Attributes: bp-based frame

sub_57C350 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 20h
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5791F0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+var_C]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C350 endp

align 10h


; Attributes: bp-based frame

sub_57C3A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C3A0 endp

align 10h


; Attributes: bp-based frame

sub_57C3E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C3E0 endp

align 10h


; Attributes: bp-based frame

sub_57C420 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 28h
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57C420 endp

align 10h


; Attributes: bp-based frame

sub_57C4B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57C4B0 endp

align 10h


; Attributes: bp-based frame

sub_57C540 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 24h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57C540 endp

align 10h


; Attributes: bp-based frame

sub_57C5B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 20h
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_4087D0
mov	ecx, [ebp+var_C]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C5B0 endp

align 10h


; Attributes: bp-based frame

sub_57C600 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 28h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+var_20]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57C600 endp

align 10h


; Attributes: bp-based frame

sub_57C680 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 20h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+var_20]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57C680 endp

align 10h


; Attributes: bp-based frame

sub_57C700 proc	near

var_54=	dword ptr -54h

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
add	ecx, 10h
call	sub_53FE50
mov	ecx, [ebp+var_54]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C700 endp



; Attributes: bp-based frame

sub_57C720 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_42E0F0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_409540
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C720 endp

align 10h


; Attributes: bp-based frame

sub_57C760 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C760 endp

align 10h


; Attributes: bp-based frame

sub_57C7A0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
add	ecx, 2Ch
call	sub_4A9770
mov	ecx, [ebp+var_5C]
add	ecx, 20h
call	sub_4A9770
mov	ecx, [ebp+var_5C]
call	sub_4087D0
mov	ecx, [ebp+var_60]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C7A0 endp

align 10h


; Attributes: bp-based frame

sub_57C7E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_579240
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_10FB7C0
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57C7E0 endp

align 10h


; Attributes: bp-based frame

sub_57C850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C850 endp

align 10h


; Attributes: bp-based frame

sub_57C890 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C890 endp

align 10h


; Attributes: bp-based frame

sub_57C8D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C8D0 endp

align 10h


; Attributes: bp-based frame

sub_57C910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C910 endp

align 10h


; Attributes: bp-based frame

sub_57C950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C950 endp

align 10h


; Attributes: bp-based frame

sub_57C990 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
add	ecx, 3Ch
call	sub_487140
mov	ecx, [ebp+var_5C]
add	ecx, 30h
call	sub_4A9770
mov	ecx, [ebp+var_5C]
call	sub_4087D0
mov	ecx, [ebp+var_60]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C990 endp

align 10h


; Attributes: bp-based frame

sub_57C9D0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
add	ecx, 2Ch
call	sub_4A9770
mov	ecx, [ebp+var_60]
add	ecx, 20h
call	sub_437300
mov	ecx, [ebp+var_60]
call	sub_4087D0
mov	ecx, [ebp+var_64]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57C9D0 endp

align 10h


; Attributes: bp-based frame

sub_57CA10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 64h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57CA10 endp

align 10h


; Attributes: bp-based frame

sub_57CA50 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 60h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_1C]
call	sub_4087D0
mov	ecx, [ebp+var_20]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57CA50 endp

align 10h


; Attributes: bp-based frame

sub_57CAD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_10FB7C0
mov	ecx, [ebp+var_4]
call	sub_4087D0
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_57CAD0 endp

align 10h


; Attributes: bp-based frame

sub_57CB10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 20h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_4087D0
mov	ecx, [ebp+var_18]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_57CB10 endp

align 10h


; Attributes: bp-based frame

sub_57CB80 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_4], eax
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_57CB80 endp

align 10h


; Attributes: bp-based frame

sub_57CBD0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_57CC0F

loc_57CC06:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_57CC0F:
cmp	[ebp+var_C], 0
jle	short loc_57CC35
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_57FB00
mov	ecx, [ebp+var_14]
add	ecx, 5Ch
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
add	edx, 5Ch
mov	[ebp+var_18], edx
jmp	short loc_57CC06

loc_57CC35:
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_2C], edx
push	0
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_57F7E0
add	esp, 0Ch
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_57CBD0 endp

align 10h


; Attributes: bp-based frame

sub_57CC70 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_57CCAF

loc_57CCA6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_57CCAF:
cmp	[ebp+var_C], 0
jle	short loc_57CCDB
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_57FB60
mov	ecx, [ebp+var_10]
add	ecx, 0A8h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 0A8h
mov	[ebp+var_14], edx
jmp	short loc_57CCA6

loc_57CCDB:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_57DC90
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_57CC70 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_57CD10(void	*)
sub_57CD10 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_57CD19:
cmp	[ebp+arg_0], 0
jz	short loc_57CD69
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_57CD10
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7BA0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_57CD61
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_57CD61:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_57CD19

loc_57CD69:
mov	esp, ebp
pop	ebp
retn	4
sub_57CD10 endp

align 10h


; Attributes: bp-based frame

sub_57CD70 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_57CD8C:
cmp	[ebp+var_10], 0
jz	short loc_57CE03
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_57CDD2
jb	short loc_57CDC9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_57CDD2

loc_57CDC9:
mov	[ebp+var_64], 1
jmp	short loc_57CDD9

loc_57CDD2:
mov	[ebp+var_64], 0

loc_57CDD9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_57CDF2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_57CDFB

loc_57CDF2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_57CDFB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_57CD8C

loc_57CE03:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_57CEA5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_57CE96
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_57DE60
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_57CF4B
jmp	short loc_57CEA5

loc_57CE96:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_57CEA5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_57CEDF
jb	short loc_57CED6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_57CEDF

loc_57CED6:
mov	[ebp+var_78], 1
jmp	short loc_57CEE6

loc_57CEDF:
mov	[ebp+var_78], 0

loc_57CEE6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_57CF30
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_57DE60
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_57CF4B

loc_57CF30:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_57CF4B:
mov	esp, ebp
pop	ebp
retn	8
sub_57CD70 endp

align 10h


; Attributes: bp-based frame

sub_57CF60 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_57CFC1
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 3
cmp	edx, [ebp+arg_4]
jb	short loc_57CFA2
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_57DFD0
jmp	short loc_57CFC1

loc_57CFA2:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_50AB50

loc_57CFC1:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_57CF60 endp

align 10h


; Attributes: bp-based frame

sub_57CFD0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A96D0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_57DD50
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_57D053

loc_57D04A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_57D053:
cmp	[ebp+var_40], 0
jle	short loc_57D07D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_57DB30
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 70h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 70h
mov	[ebp+var_3C], eax
jmp	short loc_57D04A

loc_57D07D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_57D0A4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_57DB30
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 70h
mov	[ebp+var_C], ecx
jmp	short loc_57D0F9

loc_57D0A4:
mov	edx, [ebp+arg_C]
imul	edx, 70h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_57D0DB

loc_57D0C9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 70h
mov	[ebp+var_68], eax

loc_57D0DB:
cmp	[ebp+var_6C], 0
jle	short loc_57D0F3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_57DB30
add	esp, 8
jmp	short loc_57D0C9

loc_57D0F3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_57D0F9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_57D191
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_57D158

loc_57D14F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_57D158:
cmp	[ebp+var_80], 0
jle	short loc_57D18B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_57DB30
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 70h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 70h
mov	[ebp+var_7C], eax
jmp	short loc_57D14F

loc_57D18B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_57D191:
mov	ecx, [ebp+var_CC]
call	sub_57DCD0
mov	edx, [ebp+var_4]
imul	edx, 70h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_57CFD0 endp

align 10h


; Attributes: bp-based frame

sub_57D1E0 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_57D1F1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_57D229
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_57D227
mov	ecx, 1
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_57D227:
jmp	short loc_57D1F1

loc_57D229:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_57D1E0 endp

align 10h


; Attributes: bp-based frame

sub_57D240 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_57D251:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_57D299
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
push	0
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_5CA320
cmp	[ebp+var_8], 0
jz	short loc_57D297
mov	ecx, 1
imul	ecx, 0A0h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_57D297:
jmp	short loc_57D251

loc_57D299:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_57D240 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_57D2B0(void	*)
sub_57D2B0 proc	near

var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_57D2B9:
cmp	[ebp+arg_0], 0
jz	short loc_57D30C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_57D2B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_580570
cmp	[ebp+arg_0], 0
jz	short loc_57D304
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_57D304:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_57D2B9

loc_57D30C:
mov	esp, ebp
pop	ebp
retn	4
sub_57D2B0 endp

align 10h


; Attributes: bp-based frame

sub_57D320 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_57D33C:
cmp	[ebp+var_10], 0
jz	short loc_57D3B3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_57D382
jb	short loc_57D379
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_57D382

loc_57D379:
mov	[ebp+var_64], 1
jmp	short loc_57D389

loc_57D382:
mov	[ebp+var_64], 0

loc_57D389:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_57D3A2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_57D3AB

loc_57D3A2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_57D3AB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_57D33C

loc_57D3B3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_57D455
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_57D446
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_57E1F0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_57D4FB
jmp	short loc_57D455

loc_57D446:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_57D455:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_57D48F
jb	short loc_57D486
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_57D48F

loc_57D486:
mov	[ebp+var_78], 1
jmp	short loc_57D496

loc_57D48F:
mov	[ebp+var_78], 0

loc_57D496:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_57D4E0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_57E1F0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_57D4FB

loc_57D4E0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_57D4FB:
mov	esp, ebp
pop	ebp
retn	8
sub_57D320 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_57D510(void	*)
sub_57D510 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_57D519:
cmp	[ebp+arg_0], 0
jz	short loc_57D569
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_57D510
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_57E4D0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_57D561
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_57D561:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_57D519

loc_57D569:
mov	esp, ebp
pop	ebp
retn	4
sub_57D510 endp

align 10h


; Attributes: bp-based frame

sub_57D570 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_57D58C:
cmp	[ebp+var_10], 0
jz	short loc_57D603
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_57D5D2
jb	short loc_57D5C9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_57D5D2

loc_57D5C9:
mov	[ebp+var_64], 1
jmp	short loc_57D5D9

loc_57D5D2:
mov	[ebp+var_64], 0

loc_57D5D9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_57D5F2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_57D5FB

loc_57D5F2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_57D5FB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_57D58C

loc_57D603:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_57D6A5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_57D696
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_57E360
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_57D74B
jmp	short loc_57D6A5

loc_57D696:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_57D6A5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_57D6DF
jb	short loc_57D6D6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_57D6DF

loc_57D6D6:
mov	[ebp+var_78], 1
jmp	short loc_57D6E6

loc_57D6DF:
mov	[ebp+var_78], 0

loc_57D6E6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_57D730
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_57E360
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_57D74B

loc_57D730:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_57D74B:
mov	esp, ebp
pop	ebp
retn	8
sub_57D570 endp

align 10h


; Attributes: bp-based frame

sub_57D760 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_57D7CB
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 5Ch
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_57D7A7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_57E710
jmp	short loc_57D7CB

loc_57D7A7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_57E500

loc_57D7CB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_57D760 endp

align 10h


; Attributes: bp-based frame

sub_57D7E0 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_57D84B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 0A8h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_57D827
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_57ECF0
jmp	short loc_57D84B

loc_57D827:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_57EAD0

loc_57D84B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_57D7E0 endp

align 10h


; Attributes: bp-based frame

sub_57D860 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_9C], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5C97A0
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_9D], al
movzx	ecx, [ebp+var_9D]
test	ecx, ecx
jnz	short loc_57D930
or	[ebp+var_78], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_78], 2
or	[ebp+var_78], 4
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_9C]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	eax, [ebp+var_88]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jnz	short loc_57D930
mov	[ebp+var_A4], 0
jmp	short loc_57D93A

loc_57D930:
mov	[ebp+var_A4], 1

loc_57D93A:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_78]
and	eax, 4
jz	short loc_57D957
and	[ebp+var_78], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_57D957:
mov	ecx, [ebp+var_78]
and	ecx, 2
jz	short loc_57D96B
and	[ebp+var_78], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_57D96B:
mov	edx, [ebp+var_78]
and	edx, 1
jz	short loc_57D97F
and	[ebp+var_78], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_57D97F:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_57DA2C
mov	[ebp+var_50], 0
lea	ecx, [ebp+var_69]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp+var_68]
call	sub_407D30
lea	eax, [ebp+var_68]
push	eax
lea	ecx, [ebp+var_4C]
call	sub_403850
mov	ecx, [ebp+var_50]
mov	[ebp+var_34], ecx
lea	edx, [ebp+var_98]
mov	[ebp+var_8C], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	eax, [ebp+var_4C]
push	eax
push	ecx
mov	[ebp+var_94], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_94]
call	sub_4046E0
lea	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_57F0F0
lea	edx, [ebp+var_74]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_4C]
call	sub_407910
lea	ecx, [ebp+var_68]
call	sub_407910
lea	ecx, [ebp+var_69]
call	nullsub_1

loc_57DA2C:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_57D860 endp

align 10h


; Attributes: bp-based frame

sub_57DA40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F5B0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DA40 endp

align 10h


; Attributes: bp-based frame

sub_57DA70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F5F0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DA70 endp

align 10h


; Attributes: bp-based frame

sub_57DAA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F630
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DAA0 endp

align 10h


; Attributes: bp-based frame

sub_57DAD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F670
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DAD0 endp

align 10h


; Attributes: bp-based frame

sub_57DB00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F6B0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DB00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_57DB30(void *, int)
sub_57DB30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	70h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_57DB74
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_57F960
mov	[ebp+var_C], eax
jmp	short loc_57DB7B

loc_57DB74:
mov	[ebp+var_C], 0

loc_57DB7B:
mov	esp, ebp
pop	ebp
retn
sub_57DB30 endp

align 10h


; Attributes: bp-based frame

sub_57DB80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F6F0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DB80 endp

align 10h


; Attributes: bp-based frame

sub_57DBB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F730
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DBB0 endp

align 10h


; Attributes: bp-based frame

sub_57DBE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_57F770
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DBE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_57DC10(void *, int)
sub_57DC10 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	98h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_57DC57
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_57FA00
mov	[ebp+var_C], eax
jmp	short loc_57DC5E

loc_57DC57:
mov	[ebp+var_C], 0

loc_57DC5E:
mov	esp, ebp
pop	ebp
retn
sub_57DC10 endp

align 10h


; Attributes: bp-based frame

sub_57DC70 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_57F7E0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_57DC70 endp

align 10h


; Attributes: bp-based frame

sub_57DC90 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_57DCAF

loc_57DCA3:
mov	edx, [ebp+var_8]
add	edx, 0A8h
mov	[ebp+var_8], edx

loc_57DCAF:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_57DCC8
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	ecx, [ebp+var_8]
call	sub_5806F0
jmp	short loc_57DCA3

loc_57DCC8:
mov	esp, ebp
pop	ebp
retn
sub_57DC90 endp

align 10h


; Attributes: bp-based frame

sub_57DCD0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DB00
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_57DD43
mov	ecx, [ebp+var_4C]
imul	ecx, 70h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_57DD43:
mov	esp, ebp
pop	ebp
retn
sub_57DCD0 endp

align 10h


; Attributes: bp-based frame

sub_57DD50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 2492492h
jbe	short loc_57DD7B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_57DD7B:
cmp	[ebp+arg_0], 0
jz	short loc_57DDB2
mov	ecx, [ebp+arg_0]
imul	ecx, 70h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 70h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_57DDB9

loc_57DDB2:
mov	[ebp+var_10], 0

loc_57DDB9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_57DD50 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_57DDD0 proc	near

var_34=	dword ptr -34h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_34]
add	ecx, 8
call	sub_536DD0
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	8
sub_57DDD0 endp

align 10h


; Attributes: bp-based frame

sub_57DE10 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 8
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_4694E0
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_4]
mov	al, [edx+18h]
mov	[ecx+18h], al
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	8
sub_57DE10 endp

align 10h


; Attributes: bp-based frame

sub_57DE60 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_57DEA7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_57FC30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_57DF84

loc_57DEA7:
cmp	[ebp+arg_10], 0
jnz	short loc_57DF09
cmp	[ebp+arg_C], 0
jnz	short loc_57DF00
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_57DEF1
jb	short loc_57DEE8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_57DEF1

loc_57DEE8:
mov	[ebp+var_3C], 1
jmp	short loc_57DEF8

loc_57DEF1:
mov	[ebp+var_3C], 0

loc_57DEF8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_57DF09

loc_57DF00:
mov	[ebp+var_40], 1
jmp	short loc_57DF10

loc_57DF09:
mov	[ebp+var_40], 0

loc_57DF10:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_57DF22
and	[ebp+var_C], 0FFFFFFFEh

loc_57DF22:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_57DF58
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_57FC30
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_57DF56
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_57DF56:
jmp	short loc_57DF84

loc_57DF58:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_57FC30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_57DF84
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_57DF84:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_57DE60 endp

align 10h


; Attributes: bp-based frame

sub_57DFD0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_57DFF7
mov	edx, [ebp+var_60]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_57DFF7
mov	[ebp+var_64], 1
jmp	short loc_57DFFE

loc_57DFF7:
mov	[ebp+var_64], 0

loc_57DFFE:
movzx	ecx, byte ptr [ebp+var_64]
test	ecx, ecx
jz	short loc_57E036
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_10], eax
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_11], dl
lea	eax, [ebp+var_11]
push	eax
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_57DFD0
jmp	loc_57E1E3

loc_57E036:
mov	ecx, [ebp+var_60]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_4], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_57E112
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_60]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_4]
shl	edx, 3
mov	eax, [ebp+var_60]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_60]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_60]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_13], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
shl	eax, 3
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*8]
sub	eax, [ebp+var_30]
sar	eax, 3
mov	[ebp+var_2C], eax
jmp	short loc_57E0F5

loc_57E0E3:
mov	ecx, [ebp+var_30]
add	ecx, 8
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_57E0F5:
cmp	[ebp+var_2C], 0
jle	short loc_57E10D
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_30]
mov	[eax], ecx
mov	[eax+4], edx
jmp	short loc_57E0E3

loc_57E10D:
jmp	loc_57E1E3

loc_57E112:
mov	ecx, [ebp+var_60]
mov	edx, [ecx+4]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
mov	ecx, [ebp+var_4C]
lea	edx, [ecx+eax*8]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_4C]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_34]
sub	ecx, [ebp+var_4C]
sar	ecx, 3
mov	[ebp+var_40], ecx
jmp	short loc_57E150

loc_57E13E:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx
mov	eax, [ebp+var_3C]
add	eax, 8
mov	[ebp+var_3C], eax

loc_57E150:
cmp	[ebp+var_40], 0
jle	short loc_57E168
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5A7AA0
add	esp, 8
jmp	short loc_57E13E

loc_57E168:
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_34]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_14], dl
mov	eax, [ebp+var_60]
mov	ecx, [eax+4]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_60]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_60]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_5C]
sar	edx, 3
mov	[ebp+var_58], edx
jmp	short loc_57E1CB

loc_57E1B9:
mov	eax, [ebp+var_5C]
add	eax, 8
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_58]
sub	ecx, 1
mov	[ebp+var_58], ecx

loc_57E1CB:
cmp	[ebp+var_58], 0
jle	short loc_57E1E3
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_5C]
mov	[edx], eax
mov	[edx+4], ecx
jmp	short loc_57E1B9

loc_57E1E3:
mov	esp, ebp
pop	ebp
retn	10h
sub_57DFD0 endp

align 10h


; Attributes: bp-based frame

sub_57E1F0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_57E237
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_57FC80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_57E314

loc_57E237:
cmp	[ebp+arg_10], 0
jnz	short loc_57E299
cmp	[ebp+arg_C], 0
jnz	short loc_57E290
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_57E281
jb	short loc_57E278
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_57E281

loc_57E278:
mov	[ebp+var_3C], 1
jmp	short loc_57E288

loc_57E281:
mov	[ebp+var_3C], 0

loc_57E288:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_57E299

loc_57E290:
mov	[ebp+var_40], 1
jmp	short loc_57E2A0

loc_57E299:
mov	[ebp+var_40], 0

loc_57E2A0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_57E2B2
and	[ebp+var_C], 0FFFFFFFEh

loc_57E2B2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_57E2E8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_57FC80
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_57E2E6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_57E2E6:
jmp	short loc_57E314

loc_57E2E8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_57FC80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_57E314
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_57E314:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_57E1F0 endp

align 10h


; Attributes: bp-based frame

sub_57E360 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_57E3A7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_57FCD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_57E484

loc_57E3A7:
cmp	[ebp+arg_10], 0
jnz	short loc_57E409
cmp	[ebp+arg_C], 0
jnz	short loc_57E400
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_57E3F1
jb	short loc_57E3E8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_57E3F1

loc_57E3E8:
mov	[ebp+var_3C], 1
jmp	short loc_57E3F8

loc_57E3F1:
mov	[ebp+var_3C], 0

loc_57E3F8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_57E409

loc_57E400:
mov	[ebp+var_40], 1
jmp	short loc_57E410

loc_57E409:
mov	[ebp+var_40], 0

loc_57E410:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_57E422
and	[ebp+var_C], 0FFFFFFFEh

loc_57E422:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_57E458
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_57FCD0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_57E456
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_57E456:
jmp	short loc_57E484

loc_57E458:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_57FCD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_57E484
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_57E484:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_57E360 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_57E4D0(void *)
sub_57E4D0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_10FB7C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_57E4F7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_57E4F7:
mov	esp, ebp
pop	ebp
retn
sub_57E4D0 endp

align 10h


; Attributes: bp-based frame

sub_57E500 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5D5E30
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5D5F90
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_57E583

loc_57E57A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_57E583:
cmp	[ebp+var_40], 0
jle	short loc_57E5AD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_57FF60
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 5Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 5Ch
mov	[ebp+var_3C], eax
jmp	short loc_57E57A

loc_57E5AD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_57E5D4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_57FF60
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 5Ch
mov	[ebp+var_C], ecx
jmp	short loc_57E629

loc_57E5D4:
mov	edx, [ebp+arg_C]
imul	edx, 5Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_57E60B

loc_57E5F9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 5Ch
mov	[ebp+var_68], eax

loc_57E60B:
cmp	[ebp+var_6C], 0
jle	short loc_57E623
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_57FF60
add	esp, 8
jmp	short loc_57E5F9

loc_57E623:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_57E629:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_57E6C1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_57E688

loc_57E67F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_57E688:
cmp	[ebp+var_80], 0
jle	short loc_57E6BB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_57FF60
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 5Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 5Ch
mov	[ebp+var_7C], eax
jmp	short loc_57E67F

loc_57E6BB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_57E6C1:
mov	ecx, [ebp+var_CC]
call	sub_5C69A0
mov	edx, [ebp+var_4]
imul	edx, 5Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_57E500 endp

align 10h


; Attributes: bp-based frame

sub_57E710 proc	near

var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F0=	dword ptr -0F0h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CC=	dword ptr -0CCh
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_71=	byte ptr -71h
var_6C=	byte ptr -6Ch
var_6B=	byte ptr -6Bh
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_4C=	byte ptr -4Ch
var_24=	byte ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_FC], ecx
mov	eax, [ebp+var_FC]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_57E746
mov	edx, [ebp+var_FC]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_57E746
mov	[ebp+var_100], 1
jmp	short loc_57E750

loc_57E746:
mov	[ebp+var_100], 0

loc_57E750:
movzx	ecx, byte ptr [ebp+var_100]
test	ecx, ecx
jz	short loc_57E7A4
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_68]
call	sub_57F830
xor	eax, eax
mov	[ebp+var_69], al
lea	ecx, [ebp+var_69]
push	ecx
lea	edx, [ebp+var_68]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_FC]
call	sub_57E710
lea	ecx, [ebp+var_24]
call	sub_484400
lea	ecx, [ebp+var_4C]
call	sub_407E50
lea	ecx, [ebp+var_68]
call	sub_407910
jmp	loc_57EAC8

loc_57E7A4:
mov	edx, [ebp+var_FC]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_FC]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_57E92F
xor	edx, edx
mov	[ebp+var_6A], dl
mov	eax, [ebp+var_FC]
mov	ecx, [eax+4]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_FC]
mov	eax, [edx+4]
mov	[ebp+var_88], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 5Ch
mov	edx, [ebp+var_FC]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_84], eax
push	0
lea	ecx, [ebp+var_71]
push	ecx
mov	edx, [ebp+var_8C]
push	edx
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
call	sub_5805C0
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 5Ch
mov	eax, [ebp+var_FC]
add	edx, [eax+4]
mov	ecx, [ebp+var_FC]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_6B], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 5Ch
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_94], eax
jmp	short loc_57E88F

loc_57E880:
mov	edx, [ebp+var_94]
sub	edx, 1
mov	[ebp+var_94], edx

loc_57E88F:
cmp	[ebp+var_94], 0
jle	short loc_57E8CA
mov	eax, [ebp+var_9C]
sub	eax, 5Ch
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_A0]
sub	ecx, 5Ch
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_9C]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57FB00
jmp	short loc_57E880

loc_57E8CA:
mov	eax, [ebp+arg_0]
mov	[ebp+var_B0], eax
mov	eax, [ebp+arg_4]
imul	eax, 5Ch
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_B0]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_A8], eax
jmp	short loc_57E910

loc_57E8F2:
mov	edx, [ebp+var_B0]
add	edx, 5Ch
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_A8]
sub	eax, 1
mov	[ebp+var_A8], eax

loc_57E910:
cmp	[ebp+var_A8], 0
jle	short loc_57E92A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_B0]
call	sub_57FB00
jmp	short loc_57E8F2

loc_57E92A:
jmp	loc_57EAC8

loc_57E92F:
mov	edx, [ebp+var_FC]
mov	eax, [edx+4]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 5Ch
add	ecx, [ebp+var_CC]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_CC]
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_B4]
sub	eax, [ebp+var_CC]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_C0], eax
jmp	short loc_57E999

loc_57E97B:
mov	edx, [ebp+var_C0]
sub	edx, 1
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_BC]
add	eax, 5Ch
mov	[ebp+var_BC], eax

loc_57E999:
cmp	[ebp+var_C0], 0
jle	short loc_57E9B7
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_BC]
push	edx		; void *
call	sub_57FF60
add	esp, 8
jmp	short loc_57E97B

loc_57E9B7:
mov	eax, [ebp+var_FC]
mov	ecx, [ebp+var_B4]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_6C], dl
mov	eax, [ebp+var_FC]
mov	ecx, [eax+4]
mov	[ebp+var_E8], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E8]
mov	[ebp+var_D4], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_E4]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_D8], eax
jmp	short loc_57EA17

loc_57EA08:
mov	edx, [ebp+var_D8]
sub	edx, 1
mov	[ebp+var_D8], edx

loc_57EA17:
cmp	[ebp+var_D8], 0
jle	short loc_57EA56
mov	eax, [ebp+var_E4]
push	eax		; int
mov	ecx, [ebp+var_D4]
push	ecx		; void *
call	sub_57FF60
add	esp, 8
mov	edx, [ebp+var_E4]
add	edx, 5Ch
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_D4]
add	eax, 5Ch
mov	[ebp+var_D4], eax
jmp	short loc_57EA08

loc_57EA56:
mov	ecx, [ebp+var_4]
imul	ecx, 5Ch
mov	edx, [ebp+var_FC]
add	ecx, [edx+4]
mov	eax, [ebp+var_FC]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_F8], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_F8]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_F0], eax
jmp	short loc_57EAAE

loc_57EA90:
mov	edx, [ebp+var_F8]
add	edx, 5Ch
mov	[ebp+var_F8], edx
mov	eax, [ebp+var_F0]
sub	eax, 1
mov	[ebp+var_F0], eax

loc_57EAAE:
cmp	[ebp+var_F0], 0
jle	short loc_57EAC8
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_F8]
call	sub_57FB00
jmp	short loc_57EA90

loc_57EAC8:
mov	esp, ebp
pop	ebp
retn	10h
sub_57E710 endp

align 10h


; Attributes: bp-based frame

sub_57EAD0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_57FD30
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A92E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_57EB53

loc_57EB4A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_57EB53:
cmp	[ebp+var_40], 0
jle	short loc_57EB82
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_580740
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 0A8h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 0A8h
mov	[ebp+var_3C], eax
jmp	short loc_57EB4A

loc_57EB82:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_57EBAC
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_580740
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 0A8h
mov	[ebp+var_C], ecx
jmp	short loc_57EC06

loc_57EBAC:
mov	edx, [ebp+arg_C]
imul	edx, 0A8h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_57EBE8

loc_57EBD4:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 0A8h
mov	[ebp+var_68], eax

loc_57EBE8:
cmp	[ebp+var_6C], 0
jle	short loc_57EC00
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_580740
add	esp, 8
jmp	short loc_57EBD4

loc_57EC00:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_57EC06:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_57ECA3
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_57EC65

loc_57EC5C:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_57EC65:
cmp	[ebp+var_80], 0
jle	short loc_57EC9D
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_580740
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 0A8h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 0A8h
mov	[ebp+var_7C], eax
jmp	short loc_57EC5C

loc_57EC9D:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_57ECA3:
mov	ecx, [ebp+var_CC]
call	sub_57FE10
mov	edx, [ebp+var_4]
imul	edx, 0A8h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_57EAD0 endp

align 10h


; Attributes: bp-based frame

sub_57ECF0 proc	near

var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_124= dword ptr -124h
var_120= dword ptr -120h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_108= dword ptr -108h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_B5=	byte ptr -0B5h
var_B4=	byte ptr -0B4h
var_B3=	byte ptr -0B3h
var_B2=	byte ptr -0B2h
var_B1=	byte ptr -0B1h
var_B0=	byte ptr -0B0h
var_A0=	byte ptr -0A0h
var_6C=	byte ptr -6Ch
var_44=	byte ptr -44h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 138h
mov	[ebp+var_134], ecx
mov	eax, [ebp+var_134]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_57ED26
mov	edx, [ebp+var_134]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_57ED26
mov	[ebp+var_138], 1
jmp	short loc_57ED30

loc_57ED26:
mov	[ebp+var_138], 0

loc_57ED30:
movzx	ecx, byte ptr [ebp+var_138]
test	ecx, ecx
jz	short loc_57ED93
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_B0]
call	sub_57F890
xor	eax, eax
mov	[ebp+var_B1], al
lea	ecx, [ebp+var_B1]
push	ecx
lea	edx, [ebp+var_B0]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_134]
call	sub_57ECF0
lea	ecx, [ebp+var_44]
call	sub_407E50
lea	ecx, [ebp+var_6C]
call	sub_407E50
lea	ecx, [ebp+var_A0]
call	sub_407E50
jmp	loc_57F0E7

loc_57ED93:
mov	edx, [ebp+var_134]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_134]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_57EF3B
xor	edx, edx
mov	[ebp+var_B2], dl
mov	eax, [ebp+var_134]
mov	ecx, [eax+4]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_134]
mov	eax, [edx+4]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0A8h
mov	edx, [ebp+var_134]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_C8], eax
push	0
lea	ecx, [ebp+var_B5]
push	ecx
mov	edx, [ebp+var_D0]
push	edx
mov	eax, [ebp+var_CC]
push	eax
mov	ecx, [ebp+var_C8]
push	ecx
call	sub_580620
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 0A8h
mov	eax, [ebp+var_134]
add	edx, [eax+4]
mov	ecx, [ebp+var_134]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_B3], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 0A8h
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_DC]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_D8], eax
jmp	short loc_57EE90

loc_57EE81:
mov	edx, [ebp+var_D8]
sub	edx, 1
mov	[ebp+var_D8], edx

loc_57EE90:
cmp	[ebp+var_D8], 0
jle	short loc_57EED0
mov	eax, [ebp+var_DC]
sub	eax, 0A8h
mov	[ebp+var_DC], eax
mov	ecx, [ebp+var_E0]
sub	ecx, 0A8h
mov	[ebp+var_E0], ecx
mov	edx, [ebp+var_DC]
push	edx
mov	ecx, [ebp+var_E0]
call	sub_57FB60
jmp	short loc_57EE81

loc_57EED0:
mov	eax, [ebp+arg_0]
mov	[ebp+var_EC], eax
mov	eax, [ebp+arg_4]
imul	eax, 0A8h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_EC]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_E8], eax
jmp	short loc_57EF1C

loc_57EEFB:
mov	edx, [ebp+var_EC]
add	edx, 0A8h
mov	[ebp+var_EC], edx
mov	eax, [ebp+var_E8]
sub	eax, 1
mov	[ebp+var_E8], eax

loc_57EF1C:
cmp	[ebp+var_E8], 0
jle	short loc_57EF36
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_57FB60
jmp	short loc_57EEFB

loc_57EF36:
jmp	loc_57F0E7

loc_57EF3B:
mov	edx, [ebp+var_134]
mov	eax, [edx+4]
mov	[ebp+var_108], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 0A8h
add	ecx, [ebp+var_108]
mov	[ebp+var_F0], ecx
mov	edx, [ebp+var_108]
mov	[ebp+var_F8], edx
mov	eax, [ebp+var_F0]
sub	eax, [ebp+var_108]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_FC], eax
jmp	short loc_57EFAA

loc_57EF8A:
mov	edx, [ebp+var_FC]
sub	edx, 1
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_F8]
add	eax, 0A8h
mov	[ebp+var_F8], eax

loc_57EFAA:
cmp	[ebp+var_FC], 0
jle	short loc_57EFC8
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_F8]
push	edx		; void *
call	sub_580740
add	esp, 8
jmp	short loc_57EF8A

loc_57EFC8:
mov	eax, [ebp+var_134]
mov	ecx, [ebp+var_F0]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_B4], dl
mov	eax, [ebp+var_134]
mov	ecx, [eax+4]
mov	[ebp+var_124], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_120], edx
mov	eax, [ebp+var_124]
mov	[ebp+var_110], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_120]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_114], eax
jmp	short loc_57F02B

loc_57F01C:
mov	edx, [ebp+var_114]
sub	edx, 1
mov	[ebp+var_114], edx

loc_57F02B:
cmp	[ebp+var_114], 0
jle	short loc_57F06F
mov	eax, [ebp+var_120]
push	eax		; int
mov	ecx, [ebp+var_110]
push	ecx		; void *
call	sub_580740
add	esp, 8
mov	edx, [ebp+var_120]
add	edx, 0A8h
mov	[ebp+var_120], edx
mov	eax, [ebp+var_110]
add	eax, 0A8h
mov	[ebp+var_110], eax
jmp	short loc_57F01C

loc_57F06F:
mov	ecx, [ebp+var_4]
imul	ecx, 0A8h
mov	edx, [ebp+var_134]
add	ecx, [edx+4]
mov	eax, [ebp+var_134]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_130], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_130]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_12C], eax
jmp	short loc_57F0CD

loc_57F0AC:
mov	edx, [ebp+var_130]
add	edx, 0A8h
mov	[ebp+var_130], edx
mov	eax, [ebp+var_12C]
sub	eax, 1
mov	[ebp+var_12C], eax

loc_57F0CD:
cmp	[ebp+var_12C], 0
jle	short loc_57F0E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_130]
call	sub_57FB60
jmp	short loc_57F0AC

loc_57F0E7:
mov	esp, ebp
pop	ebp
retn	10h
sub_57ECF0 endp

align 10h


; Attributes: bp-based frame

sub_57F0F0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_57F2C4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_57F159
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_57FFB0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B

loc_57F159:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_57F1A2
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B
jmp	loc_57F2BF

loc_57F1A2:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_57F1D4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B

loc_57F1D4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_57F21E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B

loc_57F21E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_57F294
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_57F26D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B
jmp	short loc_57F292

loc_57F26D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B

loc_57F292:
jmp	short loc_57F2BF

loc_57F294:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_57FFB0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B

loc_57F2BF:
jmp	loc_57F59B

loc_57F2C4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_57F355
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_57F325
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B
jmp	short loc_57F350

loc_57F325:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_57FFB0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B

loc_57F350:
jmp	loc_57F59B

loc_57F355:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_57F3BF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_57F3BF
mov	[ebp+var_C4], 1
jmp	short loc_57F3C9

loc_57F3BF:
mov	[ebp+var_C4], 0

loc_57F3C9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_57F3DE
and	[ebp+var_4C], 0FFFFFFFEh

loc_57F3DE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_57F440
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_57F416
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B
jmp	short loc_57F43B

loc_57F416:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	loc_57F59B

loc_57F43B:
jmp	loc_57F59B

loc_57F440:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_57F48D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_57F48D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_57F4D9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_57F4D9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_57F4CD
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_57F4D9

loc_57F4CD:
mov	[ebp+var_C8], 1
jmp	short loc_57F4E3

loc_57F4D9:
mov	[ebp+var_C8], 0

loc_57F4E3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_57F4F8
and	[ebp+var_4C], 0FFFFFFFDh

loc_57F4F8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_57F551
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_57F52D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	short loc_57F59B
jmp	short loc_57F54F

loc_57F52D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_474FC0
mov	eax, [ebp+arg_0]
jmp	short loc_57F59B

loc_57F54F:
jmp	short loc_57F59B

loc_57F551:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_57F56F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_57F59B
jmp	short loc_57F59B

loc_57F56F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_57FFB0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_57F59B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_57F0F0 endp

align 10h


; Attributes: bp-based frame

sub_57F5B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_580140
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_57F5B0 endp

align 10h


; Attributes: bp-based frame

sub_57F5F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5801A0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_57F5F0 endp

align 10h


; Attributes: bp-based frame

sub_57F630 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_580270
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_57F630 endp

align 10h


; Attributes: bp-based frame

sub_57F670 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5802D0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_57F670 endp

align 10h


; Attributes: bp-based frame

sub_57F6B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_580330
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_57F6B0 endp

align 10h


; Attributes: bp-based frame

sub_57F6F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5803A0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_57F6F0 endp

align 10h


; Attributes: bp-based frame

sub_57F730 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_580430
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_57F730 endp

align 10h


; Attributes: bp-based frame

sub_57F770 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_57F7A5

loc_57F799:
mov	ecx, [ebp+var_24]
sub	ecx, 0A8h
mov	[ebp+var_24], ecx

loc_57F7A5:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_57F7DA
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 0A8h
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_5806F0
jmp	short loc_57F799

loc_57F7DA:
mov	esp, ebp
pop	ebp
retn
sub_57F770 endp

align 10h


; Attributes: bp-based frame

sub_57F7E0 proc	near

var_C= dword ptr -0Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
jmp	short loc_57F7FC

loc_57F7F3:
mov	edx, [ebp+var_C]
add	edx, 5Ch
mov	[ebp+var_C], edx

loc_57F7FC:
mov	eax, [ebp+var_C]
cmp	eax, [ebp+arg_4]
jz	short loc_57F826
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_C]
call	sub_543A90
xor	edx, edx
and	edx, 1
jz	short loc_57F824
mov	eax, [ebp+var_C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_57F824:
jmp	short loc_57F7F3

loc_57F826:
mov	esp, ebp
pop	ebp
retn
sub_57F7E0 endp

align 10h


; Attributes: bp-based frame

sub_57F830 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
call	sub_403850
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+18h]
mov	[ecx+18h], al
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_30]
add	ecx, 1Ch
call	sub_403400
mov	edx, [ebp+var_30]
add	edx, 44h
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_0]
add	eax, 44h
push	eax
mov	ecx, [ebp+var_2C]
call	sub_501020
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_57F830 endp

align 10h


; Attributes: bp-based frame

sub_57F890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_403400
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	eax, [eax+3Ch]
mov	[edx+3Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+40h]
mov	[ecx+40h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 44h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 6Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 6Ch
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+94h]
mov	[eax+94h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+98h]
mov	[eax+98h], edx
mov	ecx, [ecx+9Ch]
mov	[eax+9Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0A0h]
fstp	dword ptr [edx+0A0h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57F890 endp

align 10h


; Attributes: bp-based frame

sub_57F960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 14h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_10111B0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+3Ch]
mov	[edx+3Ch], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+3Dh]
mov	[edx+3Dh], cl
mov	edx, [ebp+arg_0]
add	edx, 40h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+68h]
mov	[eax+68h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+6Ch]
mov	[eax+6Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57F960 endp

align 10h


; Attributes: bp-based frame

sub_57FA00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 54h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+7Ch]
fstp	dword ptr [eax+7Ch]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+80h]
mov	[edx+80h], ecx
mov	eax, [eax+84h]
mov	[edx+84h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+88h]
mov	[ecx+88h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+89h]
mov	[ecx+89h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+8Ah]
mov	[ecx+8Ah], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+8Bh]
mov	[ecx+8Bh], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+8Ch]
mov	[ecx+8Ch], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	[ecx+90h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+94h]
fstp	dword ptr [ecx+94h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57FA00 endp

align 10h


; Attributes: bp-based frame

sub_57FB00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4022F0
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+18h]
mov	[ecx+18h], al
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
call	sub_4023E0
mov	edx, [ebp+var_8]
add	edx, 44h
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
add	eax, 44h
push	eax
mov	ecx, [ebp+var_4]
call	sub_503940
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_57FB00 endp

align 10h


; Attributes: bp-based frame

sub_57FB60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	eax, [eax+3Ch]
mov	[edx+3Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+40h]
mov	[ecx+40h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 44h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 6Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 6Ch
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+94h]
mov	[eax+94h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+98h]
mov	[eax+98h], edx
mov	ecx, [ecx+9Ch]
mov	[eax+9Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0A0h]
fstp	dword ptr [edx+0A0h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57FB60 endp

align 10h


; Attributes: bp-based frame

sub_57FC30 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_57FE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_580490
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57FC30 endp

align 10h


; Attributes: bp-based frame

sub_57FC80 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_580500
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57FC80 endp

align 10h


; Attributes: bp-based frame

sub_57FCD0 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_4E1E10
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_580680
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57FCD0 endp



; Attributes: bp-based frame

sub_57FD30 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], offset unk_1861861
mov	[ebp+var_10], offset unk_1861861
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_57FD6D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_57FD73

loc_57FD6D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_57FD73:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_57FD86
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_57FD86:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], offset unk_1861861
mov	[ebp+var_1C], offset unk_1861861
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_57FDBC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_57FDC2

loc_57FDBC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_57FDC2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_57FDD2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_57FDFC

loc_57FDD2:
mov	[ebp+var_20], offset unk_1861861
mov	[ebp+var_24], offset unk_1861861
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_57FDF0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_57FDF6

loc_57FDF0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_57FDF6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_57FDFC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_57FD30 endp

align 10h


; Attributes: bp-based frame

sub_57FE10 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DBE0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_57FE86
mov	ecx, [ebp+var_54]
imul	ecx, 0A8h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_57FE86:
mov	esp, ebp
pop	ebp
retn
sub_57FE10 endp

align 10h


; Attributes: bp-based frame

sub_57FE90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1FFFFFFh
jbe	short loc_57FEB6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_57FEB6:
cmp	[ebp+arg_0], 0
jz	short loc_57FEDC
mov	eax, [ebp+arg_0]
shl	eax, 7
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_57FEE3

loc_57FEDC:
mov	[ebp+var_C], 0

loc_57FEE3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_57FE90 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_57FEF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 2C8590Bh
jbe	short loc_57FF16
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_57FF16:
cmp	[ebp+arg_0], 0
jz	short loc_57FF4A
mov	eax, [ebp+arg_0]
imul	eax, 5Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 5Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_57FF4C

loc_57FF4A:
xor	eax, eax

loc_57FF4C:
mov	esp, ebp
pop	ebp
retn	8
sub_57FEF0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

; int __cdecl sub_57FF60(void *, int)
sub_57FF60 proc	near

var_38=	dword ptr -38h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	5Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_57FFA4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_57F830
mov	[ebp+var_38], eax
jmp	short loc_57FFAB

loc_57FFA4:
mov	[ebp+var_38], 0

loc_57FFAB:
mov	esp, ebp
pop	ebp
retn
sub_57FF60 endp

align 10h


; Attributes: bp-based frame

sub_57FFB0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_57FFCC:
cmp	[ebp+var_10], 0
jz	short loc_580013
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_580002
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx

loc_580000:
jmp	short loc_58000B

loc_580002:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_58000B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_57FFCC

loc_580013:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5800B5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5800A6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_474FC0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_58012B
jmp	short loc_5800B5

loc_5800A6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5800B5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_580110
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_474FC0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_58012B

loc_580110:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_58012B:
mov	esp, ebp
pop	ebp
retn	8
sub_57FFB0 endp

align 10h


; Attributes: bp-based frame

sub_580140 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_580151

loc_580148:
mov	eax, [ebp+arg_0]
sub	eax, 34h
mov	[ebp+arg_0], eax

loc_580151:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_580194
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 34h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_580192
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_580192:
jmp	short loc_580148

loc_580194:
mov	esp, ebp
pop	ebp
retn
sub_580140 endp

align 10h


; Attributes: bp-based frame

sub_5801A0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5801B1

loc_5801A8:
mov	eax, [ebp+arg_0]
sub	eax, 68h
mov	[ebp+arg_0], eax

loc_5801B1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_580202
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 68h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_580200
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_580200:
jmp	short loc_5801A8

loc_580202:
mov	esp, ebp
pop	ebp
retn
sub_5801A0 endp

align 10h


; Attributes: bp-based frame

sub_580210 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_580221

loc_580218:
mov	eax, [ebp+arg_0]
sub	eax, 50h
mov	[ebp+arg_0], eax

loc_580221:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_580267
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 50h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_580265
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_580265:
jmp	short loc_580218

loc_580267:
mov	esp, ebp
pop	ebp
retn
sub_580210 endp

align 10h


; Attributes: bp-based frame

sub_580270 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_580281

loc_580278:
mov	eax, [ebp+arg_0]
sub	eax, 4Ch
mov	[ebp+arg_0], eax

loc_580281:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5802C7
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 4Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5802C5
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5802C5:
jmp	short loc_580278

loc_5802C7:
mov	esp, ebp
pop	ebp
retn
sub_580270 endp

align 10h


; Attributes: bp-based frame

sub_5802D0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5802E1

loc_5802D8:
mov	eax, [ebp+arg_0]
sub	eax, 40h
mov	[ebp+arg_0], eax

loc_5802E1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_580324
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 40h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_580322
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_580322:
jmp	short loc_5802D8

loc_580324:
mov	esp, ebp
pop	ebp
retn
sub_5802D0 endp

align 10h


; Attributes: bp-based frame

sub_580330 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_580341

loc_580338:
mov	eax, [ebp+arg_0]
sub	eax, 70h
mov	[ebp+arg_0], eax

loc_580341:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_580392
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 70h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 40h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_10111A0
xor	ecx, ecx
and	ecx, 1
jz	short loc_580390
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_580390:
jmp	short loc_580338

loc_580392:
mov	esp, ebp
pop	ebp
retn
sub_580330 endp

align 10h


; Attributes: bp-based frame

sub_5803A0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C5350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
jmp	short loc_5803C6

loc_5803BD:
mov	eax, [ebp+arg_0]
sub	eax, 68h
mov	[ebp+arg_0], eax

loc_5803C6:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_58041A
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 68h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
call	sub_10FB7C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_580418
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_580418:
jmp	short loc_5803BD

loc_58041A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5803A0 endp

align 10h


; Attributes: bp-based frame

sub_580430 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
jmp	short loc_580441

loc_580438:
mov	eax, [ebp+arg_0]
sub	eax, 5Ch
mov	[ebp+arg_0], eax

loc_580441:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_580484
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_543A90
xor	ecx, ecx
and	ecx, 1
jz	short loc_580482
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_580482:
jmp	short loc_580438

loc_580484:
mov	esp, ebp
pop	ebp
retn
sub_580430 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_580490(void *, int)
sub_580490 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	70h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5804ED
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_536DD0
mov	edx, [ebp+var_8]
mov	[ebp+var_3C], edx
jmp	short loc_5804F4

loc_5804ED:
mov	[ebp+var_3C], 0

loc_5804F4:
mov	esp, ebp
pop	ebp
retn
sub_580490 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_580500(void *, int)
sub_580500 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_580557
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	al, [edx+8]
mov	[ecx+8], al
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_58055E

loc_580557:
mov	[ebp+var_C], 0

loc_58055E:
mov	esp, ebp
pop	ebp
retn
sub_580500 endp

align 10h


; Attributes: bp-based frame

sub_580570 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5E0AF0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5805B1
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5805B1:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_580570 endp

align 10h


; Attributes: bp-based frame

sub_5805C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5805E8

loc_5805DF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5805E8:
cmp	[ebp+var_8], 0
jle	short loc_580612
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_57FF60
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 5Ch
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 5Ch
mov	[ebp+var_4], eax
jmp	short loc_5805DF

loc_580612:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5805C0 endp

align 10h


; Attributes: bp-based frame

sub_580620 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_580648

loc_58063F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_580648:
cmp	[ebp+var_8], 0
jle	short loc_580677
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_580740
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 0A8h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 0A8h
mov	[ebp+var_4], eax
jmp	short loc_58063F

loc_580677:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_580620 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_580680(void *, int)
sub_580680 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5806DF
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_30]
call	sub_4694E0
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_34]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_4]
mov	[ebp+var_38], eax
jmp	short loc_5806E6

loc_5806DF:
mov	[ebp+var_38], 0

loc_5806E6:
mov	esp, ebp
pop	ebp
retn
sub_580680 endp

align 10h


; Attributes: bp-based frame

sub_5806F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 6Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58072C
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58072C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5806F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_580740(void *, int)
sub_580740 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0A8h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_580787
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_57F890
mov	[ebp+var_C], eax
jmp	short loc_58078E

loc_580787:
mov	[ebp+var_C], 0

loc_58078E:
mov	esp, ebp
pop	ebp
retn
sub_580740 endp

align 10h


; Attributes: bp-based frame

sub_5807A0 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_4]
call	sub_418670
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_24]
add	eax, 94h
call	sub_41ECD0
lea	ecx, [ebp+var_8]
call	sub_429100
lea	ecx, [ebp+var_4]
call	sub_429100
mov	esp, ebp
pop	ebp
retn	4
sub_5807A0 endp

align 10h


; Attributes: bp-based frame

sub_5807F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
fld	dword ptr [eax+30h]
fsub	dword ptr [ecx+2Ch]
mov	edx, [ebp+var_4]
fdiv	dword ptr [edx+28h]
mov	esp, ebp
pop	ebp
retn
sub_5807F0 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION std::_Mpunct<wchar_t>::do_frac_digits(void). PRESS KEYPAD	"+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_580830 proc	near

var_10=	dword ptr -10h
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+1Ch]
cmp	ecx, [ebp+arg_0]
jnz	short loc_580849
mov	al, 1
jmp	short loc_580883

loc_580849:
mov	edx, [ebp+arg_0]
cmp	edx, ds:dword_1543DB8
jz	short loc_580871
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 78h
mov	esi, [ebp+arg_0]
call	sub_4147B0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_580871
xor	al, al
jmp	short loc_580883

loc_580871:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+28h], 1
mov	al, 1

loc_580883:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_580830 endp

align 10h


; Attributes: bp-based frame

sub_580890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+0ECh]
mov	esp, ebp
pop	ebp
retn
sub_580890 endp

align 10h


; Attributes: bp-based frame

sub_5808B0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], offset aNone_0 ; "none"
mov	[ebp+var_54], offset aChest ; "chest"
mov	[ebp+var_50], offset aMission ;	"mission"
mov	[ebp+var_4C], offset name ; "mail"
mov	[ebp+var_48], offset aCurrency ; "currency"
mov	[ebp+var_44], offset aAchievement ; "achievement"
mov	[ebp+var_40], offset aTrade ; "trade"
mov	[ebp+var_3C], offset aQuickbuild ; "quickbuild"
mov	[ebp+var_38], offset aDeletion ; "deletion"
mov	[ebp+var_34], offset aVendor ; "vendor"
mov	[ebp+var_30], offset aActivity ; "activity"
mov	[ebp+var_2C], offset aPickup ; "pickup"
mov	[ebp+var_28], offset aBrick ; "brick"
mov	[ebp+var_24], offset aProperty ; "property"
mov	[ebp+var_20], offset aModeration ; "moderation"
mov	[ebp+var_1C], offset aExhibit ;	"exhibit"
mov	[ebp+var_18], offset aInventory	; "inventory"
mov	[ebp+var_14], offset aClaimcode	; "claimcode"
mov	[ebp+var_10], offset aConsumption ; "consumption"
mov	[ebp+var_C], offset aCrafting ;	"crafting"
mov	[ebp+var_8], offset aLevelreward ; "levelreward"
mov	[ebp+var_4], offset aRelocate ;	"relocate"
cmp	[ebp+arg_0], 16h
jnb	short loc_580961
mov	eax, [ebp+arg_0]
mov	eax, [ebp+eax*4+var_58]
jmp	short loc_580964
jmp	short loc_580964

loc_580961:
mov	eax, [ebp+var_58]

loc_580964:
mov	esp, ebp
pop	ebp
retn
sub_5808B0 endp

align 10h


; Attributes: bp-based frame

sub_580970 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_14]
add	eax, 24h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+30h], 1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_580970 endp

align 10h


; Attributes: bp-based frame

sub_5809F0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 139Fh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B6BA4
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+28h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5809F0 endp

align 10h


; Attributes: bp-based frame

sub_580A50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_580A80
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_580A80:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_580A50 endp

align 10h


; Attributes: bp-based frame

sub_580A90 proc	near

var_34=	dword ptr -34h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
push	3Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_580AB6
mov	ecx, [ebp+var_4]
call	sub_4E3690
mov	[ebp+var_34], eax
jmp	short loc_580ABD

loc_580AB6:
mov	[ebp+var_34], 0

loc_580ABD:
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_580A90 endp

align 10h


; Attributes: bp-based frame

sub_580AD0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 8
call	sub_4A9770
mov	ecx, [ebp+var_58]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_580B02
push	14h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_580B02:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_580AD0 endp

align 10h


; Attributes: bp-based frame

sub_580B10 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 13AAh
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6BAC
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 28h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 40h
call	sub_4022A0
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_580B10 endp

align 10h


; Attributes: bp-based frame

sub_580B90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_580BC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_580BB5
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_580BB5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_580B90 endp

align 10h


; Attributes: bp-based frame

sub_580BC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_580BC0 endp

align 10h


; Attributes: bp-based frame

sub_580C00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	18h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_580C4F
mov	ecx, 13BCh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 1
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
jmp	short loc_580C56

loc_580C4F:
mov	[ebp+var_8], 0

loc_580C56:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_580C00 endp

align 10h


; Attributes: bp-based frame

sub_580C60 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+4], 0FFFFFFFFh
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	edx, [ebp+var_10]
mov	dword ptr [edx+5Ch], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+60h], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+64h], 0
mov	edx, [ebp+var_10]
mov	byte ptr [edx+65h], 1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_580C60 endp

align 10h


; Attributes: bp-based frame

sub_580CE0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	byte ptr -14h
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+8], xmm0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+34h], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+38h], 0FFFFFFFFh
push	ecx
fldz
fstp	[esp+20h+var_20]
push	ecx
fldz
fstp	[esp+24h+var_24]
push	ecx
fldz
fstp	[esp+28h+var_28]
push	ecx
fldz
fstp	[esp+2Ch+var_2C]
mov	ecx, [ebp+var_1C]
add	ecx, 3Ch
call	sub_40A410
push	ecx
fld1
fstp	[esp+20h+var_20]
push	ecx
fld1
fstp	[esp+24h+var_24]
push	ecx
fld1
fstp	[esp+28h+var_28]
push	ecx
fld1
fstp	[esp+2Ch+var_2C]
lea	ecx, [ebp+var_14]
call	sub_40A410
mov	edx, [ebp+var_1C]
add	edx, 3Ch
mov	ecx, [eax]
mov	[edx], ecx
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_580CE0 endp

align 10h


; Attributes: bp-based frame

sub_580DB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_10]
add	eax, 28h
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	edx, [ebp+var_C]
mov	[edx], cx
xor	eax, eax
mov	ecx, [ebp+var_C]
mov	[ecx+2], ax
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_580DB0 endp

align 10h


; Attributes: bp-based frame

sub_580E00 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+10h], 0FFFFFFFFh
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 14h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	dword ptr [eax+3Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_580E00 endp

align 10h


; Attributes: bp-based frame

sub_580E60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154CB6C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	ecx, [edx+14h]
mov	edx, [ebp+var_4]
mov	[edx+10h], eax
mov	[edx+14h], ecx
mov	ecx, [ebp+arg_0]
call	sub_4089A0
movzx	eax, al
test	eax, eax
jz	short loc_580EC9
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+8]
call	sub_64AF60

loc_580EC9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_580E60 endp

align 10h


; Attributes: bp-based frame

sub_580EE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	9
mov	ecx, [ebp+var_4]
call	sub_455F40
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6BF8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_580EE0 endp

align 10h


; Attributes: bp-based frame

sub_580F10 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
add	ecx, 140h
lea	eax, [ebp+var_8]
call	sub_4046E0
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 140h
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	eax, eax
cmp	ecx, [ebp+var_8]
setnz	al
mov	esp, ebp
pop	ebp
retn	8
sub_580F10 endp

align 10h


; Attributes: bp-based frame

sub_580F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+18Ch]
mov	esp, ebp
pop	ebp
retn
sub_580F60 endp

align 10h


; Attributes: bp-based frame

sub_580F80 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+0Ch]
xor	eax, eax
cmp	edx, [ecx+0Ch]
setl	al
pop	ebp
retn
sub_580F80 endp

align 10h


; Attributes: bp-based frame

sub_580FA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_580FA0 endp

align 10h


; Attributes: bp-based frame

sub_580FC0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1BFAh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B6C90
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
add	ecx, 30h
call	sub_401EF0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_580FC0 endp

align 10h


; Attributes: bp-based frame

sub_581010 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581040
push	3Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581040:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581010 endp

align 10h


; Attributes: bp-based frame

sub_581050 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1BFBh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B6C94
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
add	ecx, 30h
call	sub_401EF0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_581050 endp

align 10h


; Attributes: bp-based frame

sub_5810A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5810D0
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5810D0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5810A0 endp

align 10h


; Attributes: bp-based frame

sub_5810E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1BA2h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B6C98
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_C]
add	ecx, 14h
call	sub_401EF0
mov	ecx, [ebp+var_C]
add	ecx, 24h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
add	eax, 14h
mov	ecx, dword_17EE12C
mov	[eax], ecx
mov	edx, dword_17EE130
mov	[eax+4], edx
mov	ecx, dword_17EE134
mov	[eax+8], ecx
mov	edx, dword_17EE138
mov	[eax+0Ch], edx
mov	eax, [ebp+var_C]
add	eax, 24h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, dword_1891308
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, dword_189130C
mov	[eax+4], ecx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5810E0 endp



; Attributes: bp-based frame

sub_5811A0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1C3Bh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B6C9C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+30h], 0FFFFFFFFh
mov	edx, [ebp+var_C]
mov	dword ptr [edx+34h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5811A0 endp

align 10h


; Attributes: bp-based frame

sub_581200 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581230
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581230:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581200 endp

align 10h


; Attributes: bp-based frame

sub_581240 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1C63h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_4], ecx
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
xor	edx, edx
mov	eax, [ebp+var_8]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_8]
mov	[edx+2], cx
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_C], ecx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	edx, [ebp+var_C]
mov	[edx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	ecx, [ebp+var_C]
mov	[ecx+2], ax
xor	edx, edx
and	edx, 0FFFFh
xor	eax, eax
and	eax, 0
mov	ecx, [ebp+var_C]
mov	[ecx], dx
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_10], edx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_10]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_10]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_10]
mov	[edx], ax
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_581240 endp

align 10h


; Attributes: bp-based frame

sub_581340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D00AD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581368
push	0B0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581368:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581340 endp

align 10h


; Attributes: bp-based frame

sub_581380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 66h
mov	esp, ebp
pop	ebp
retn
sub_581380 endp



; Attributes: bp-based frame

sub_581390 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+46h]
test	ecx, ecx
jz	short loc_5813AC
fld	ds:flt_15134E4
jmp	short loc_5813C3
jmp	short loc_5813C3

loc_5813AC:
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+44h]
test	eax, eax
jz	short loc_5813C1
fld	ds:flt_1513510
jmp	short loc_5813C3
jmp	short loc_5813C3

loc_5813C1:
fldz

loc_5813C3:
mov	esp, ebp
pop	ebp
retn
sub_581390 endp

align 10h


; Attributes: bp-based frame

sub_5813D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 36B4h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 1
mov	eax, [ebp+var_4]
mov	dword ptr [eax+10h], 1
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 1
mov	edx, [ebp+var_4]
mov	dword ptr [edx+18h], 1
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5813D0 endp

align 10h


; Attributes: bp-based frame

sub_581430 proc	near

var_18=	dword ptr -18h
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, 3713h
mov	eax, [ebp+var_18]
call	sub_401100
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_15B6DB8
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 2Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 54h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 80h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 0A8h
call	sub_402390
lea	ecx, [ebp+var_4]
call	nullsub_1
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+18h], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+1Ch], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+28h], 0
push	offset szReferrer
mov	ecx, [ebp+var_18]
add	ecx, 2Ch
call	sub_402400
push	offset szReferrer
mov	ecx, [ebp+var_18]
add	ecx, 54h
call	sub_402400
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+7Ch], 0
push	offset szReferrer
mov	ecx, [ebp+var_18]
add	ecx, 80h
call	sub_402400
push	offset szReferrer
mov	ecx, [ebp+var_18]
add	ecx, 0A8h
call	sub_402400
mov	edx, [ebp+var_18]
mov	dword ptr [edx+0D0h], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+0D8h], 0
mov	dword ptr [eax+0DCh], 0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_581430 endp

align 10h


; Attributes: bp-based frame

sub_5815A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5815E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5815C8
push	0E0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5815C8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5815A0 endp

align 10h


; Attributes: bp-based frame

sub_5815E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A8h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 80h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_5815E0 endp

align 10h


; Attributes: bp-based frame

sub_581630 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movss	xmm0, [ebp+arg_0]
movss	dword ptr [eax+170h], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_581630 endp

align 10h


; Attributes: bp-based frame

sub_581650 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+120h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_581697
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+120h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax+14h]
call	edx
test	eax, eax
jz	short loc_581697
mov	[ebp+var_14], 1
jmp	short loc_58169E

loc_581697:
mov	[ebp+var_14], 0

loc_58169E:
mov	al, byte ptr [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_581650 endp

align 10h


; Attributes: bp-based frame

sub_5816B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, 36F7h
mov	eax, [ebp+var_18]
call	sub_401100
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_15B6DBC
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 20h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_18]
add	ecx, 3Ch
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
add	eax, 3Ch
mov	[ebp+var_14], eax
xor	ecx, ecx
jz	short loc_58172D
xor	ecx, ecx
call	sub_64A420

loc_58172D:
mov	edx, [ebp+var_14]
cmp	dword ptr [edx], 0
jz	short loc_58173F
mov	eax, [ebp+var_14]
mov	ecx, [eax]
call	sub_64A430

loc_58173F:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	byte ptr [edx+39h], 0
mov	eax, [ebp+var_18]
mov	byte ptr [eax+38h], 0
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+3Bh], 0
mov	edx, [ebp+var_18]
mov	byte ptr [edx+3Ah], 1
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_5816B0 endp

align 10h


; Attributes: bp-based frame

sub_581770 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_5817A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581797
push	40h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_581797:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_581770 endp



; Attributes: bp-based frame

sub_5817A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 3Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5817C4
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_64A430

loc_5817C4:
mov	ecx, [ebp+var_8]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_8]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_5817A0 endp

align 10h


; Attributes: bp-based frame

sub_5817F0 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_14], ecx
mov	ecx, 36F8h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6DC0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	esi, [ebp+var_14]
add	esi, 24h
xor	eax, eax
call	sub_41DF90
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 48h
call	sub_4022A0
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+60h], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+21h], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+20h], 0
mov	ecx, [ebp+var_14]
add	ecx, 24h
push	ecx
xor	eax, eax
call	sub_420330
mov	edx, [ebp+var_14]
mov	dword ptr [edx+28h], 0
mov	dword ptr [edx+2Ch], 0
mov	eax, [ebp+var_14]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5817F0 endp



; Attributes: bp-based frame

sub_5818B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5818E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5818D5
push	68h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5818D5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5818B0 endp

align 10h


; Attributes: bp-based frame

sub_5818E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_429100
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_5818E0 endp

align 10h


; Attributes: bp-based frame

sub_581920 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 3728h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B6DC4
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+14h], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+13h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+12h], 0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+11h], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+10h], 0
mov	ecx, [ebp+var_C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+20h], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1Ch], xmm0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+28h], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	dword ptr [eax+2Ch], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+30h], 0FFFFFFFFh
mov	edx, [ebp+var_C]
mov	dword ptr [edx+5Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_581920 endp

align 10h


; Attributes: bp-based frame

sub_581A00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581A30
push	60h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581A30:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581A00 endp

align 10h


; Attributes: bp-based frame

sub_581A40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_16 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581A68
push	0C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581A68:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581A40 endp

align 10h


; Attributes: bp-based frame

sub_581A80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6C00
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_581AA4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_581AA4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581A80 endp

align 10h


; Attributes: bp-based frame

sub_581AB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_581AFF
mov	ecx, 271Ah
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6E00
mov	esi, [ebp+var_4]
add	esi, 8
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 6Dh
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_581B06

loc_581AFF:
mov	[ebp+var_8], 0

loc_581B06:
mov	eax, [ebp+var_8]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_581AB0 endp

align 10h


; Attributes: bp-based frame

sub_581B10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581B40
push	10h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581B40:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581B10 endp

align 10h


; Attributes: bp-based frame

sub_581B50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 271Eh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6E04
mov	ecx, [ebp+var_4]
add	ecx, 218h
call	sub_401EF0
push	ecx
fldz
fstp	[esp+8+var_8]
push	ecx
fldz
fstp	[esp+0Ch+var_C]
push	ecx
fldz
fstp	[esp+10h+var_10]
push	ecx
fldz
fstp	[esp+14h+var_14]
mov	ecx, [ebp+var_4]
add	ecx, 228h
call	sub_40A410
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+0Ch], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_581B50 endp

align 10h


; Attributes: bp-based frame

sub_581BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	248h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_581BE9
mov	ecx, [ebp+var_4]
call	sub_581B50
mov	[ebp+var_8], eax
jmp	short loc_581BF0

loc_581BE9:
mov	[ebp+var_8], 0

loc_581BF0:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_581BC0 endp

align 10h


; Attributes: bp-based frame

sub_581C00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581C28
push	248h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581C28:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581C00 endp

align 10h


; Attributes: bp-based frame

sub_581C40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_581C7E
mov	ecx, 273Fh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_581C85

loc_581C7E:
mov	[ebp+var_8], 0

loc_581C85:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_581C40 endp

align 10h


; Attributes: bp-based frame

sub_581C90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	ecx, 2753h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6E08
mov	esi, [ebp+var_4]
add	esi, 8
xor	eax, eax
call	sub_41DF90
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx
xor	eax, eax
call	sub_420330
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0FFFFFFFFh
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_581C90 endp

align 10h


; Attributes: bp-based frame

sub_581CF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	14h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_581D16
mov	ecx, [ebp+var_4]
call	sub_581C90
mov	[ebp+var_8], eax
jmp	short loc_581D1D

loc_581D16:
mov	[ebp+var_8], 0

loc_581D1D:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_581CF0 endp

align 10h


; Attributes: bp-based frame

sub_581D30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_429100
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581D60
push	14h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581D60:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581D30 endp

align 10h


; Attributes: bp-based frame

sub_581D70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, 2760h
mov	eax, [ebp+var_8]
call	sub_401100
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15B6E0C
mov	ecx, [ebp+var_8]
add	ecx, 14h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
add	eax, 18h
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
add	edx, 24h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_8]
mov	byte ptr [edx+10h], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_581D70 endp

align 10h


; Attributes: bp-based frame

sub_581E30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_581E55
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_581E55:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_581E30 endp

align 10h


; Attributes: bp-based frame

sub_581E60 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_581E60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 24h
mov	[ebp+var_30], ecx
mov	ecx, 7D9h
mov	eax, [ebp+var_30]
call	sub_401100
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_15B6E10
mov	ecx, [ebp+var_30]
add	ecx, 8
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_20]
mov	[edx+10h], eax
mov	ecx, [ebp+var_20]
add	ecx, 14h
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	[ebp+var_4], 1
push	10h
mov	ecx, [ebp+var_20]
call	sub_4407A0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_20]
call	sub_439260
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_30]
add	ecx, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
call	sub_401740
mov	eax, [ebp+var_24]
call	sub_401740
mov	edx, [ebp+var_30]
mov	byte ptr [edx+20h], 1
mov	eax, [ebp+var_30]
mov	byte ptr [eax+21h], 1
mov	ecx, [ebp+var_30]
mov	byte ptr [ecx+22h], 0
mov	edx, [ebp+var_30]
add	edx, 24h
mov	[ebp+var_2C], edx
xor	eax, eax
jnz	short loc_581F2C
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+4], 0
jmp	short loc_581F3E

loc_581F2C:
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+4], offset sub_595CE0
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx

loc_581F3E:
mov	[ebp+var_28], 0
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+30h], 0
mov	dword ptr [ecx+34h], 0
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_581E60 endp

align 10h


; Attributes: bp-based frame

sub_581F70 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
push	38h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_581F96
mov	ecx, [ebp+var_4]
call	sub_581E60
mov	[ebp+var_28], eax
jmp	short loc_581F9D

loc_581F96:
mov	[ebp+var_28], 0

loc_581F9D:
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn
sub_581F70 endp

align 10h


; Attributes: bp-based frame

sub_581FB0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_582019
push	38h
mov	edx, [ebp+var_1C]
push	edx
call	sub_1111040
add	esp, 8

loc_582019:
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_581FB0 endp

align 10h


; Attributes: bp-based frame

sub_582030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	40h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_582072
mov	ecx, 7D1h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6E14
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_D8EB20
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_582079

loc_582072:
mov	[ebp+var_8], 0

loc_582079:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_582030 endp



; Attributes: bp-based frame

sub_582080 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_4087D0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5820B0
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5820B0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_582080 endp

align 10h


; Attributes: bp-based frame

sub_5820C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_582101
mov	ecx, 7D4h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_582108

loc_582101:
mov	[ebp+var_8], 0

loc_582108:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5820C0 endp

align 10h


; Attributes: bp-based frame

sub_582110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 7DCh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E564
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_401EF0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+10h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582110 endp

align 10h


; Attributes: bp-based frame

sub_582170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_582196
mov	ecx, [ebp+var_4]
call	sub_582110
mov	[ebp+var_8], eax
jmp	short loc_58219D

loc_582196:
mov	[ebp+var_8], 0

loc_58219D:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_582170 endp

align 10h


; Attributes: bp-based frame

sub_5821B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 7F4h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5821B0 endp

align 10h


; Attributes: bp-based frame

sub_582210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_582235
push	1Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_582235:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_582210 endp

align 10h


; Attributes: bp-based frame

sub_582240 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_582240
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
mov	ecx, 7F6h
mov	eax, [ebp+var_34]
call	sub_401100
mov	eax, [ebp+var_34]
mov	dword ptr [eax], offset	off_15B6E18
mov	ecx, [ebp+var_34]
add	ecx, 8
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
push	0
lea	ecx, [ebp+var_D]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_489990
mov	edx, [ebp+var_34]
add	edx, 14h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	[eax+10h], ecx
mov	edx, [ebp+var_20]
push	edx
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 14h
call	sub_4AC3C0
mov	[ebp+var_4], 0
push	10h
mov	ecx, [ebp+var_20]
call	sub_4407A0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_20]
call	sub_439260
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_34]
add	ecx, 2Ch
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_28]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_28]
add	ecx, 8
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_34]
add	eax, 38h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_30]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_30]
add	eax, 8
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_582240 endp

align 10h


; Attributes: bp-based frame

sub_582360 proc	near

var_B4=	dword ptr -0B4h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B4h
mov	[ebp+var_B4], ecx
mov	ecx, [ebp+var_B4]
call	sub_5823A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_582393
push	44h
mov	ecx, [ebp+var_B4]
push	ecx
call	sub_1111040
add	esp, 8

loc_582393:
mov	eax, [ebp+var_B4]
mov	esp, ebp
pop	ebp
retn	4
sub_582360 endp

align 10h


; Attributes: bp-based frame

sub_5823A0 proc	near

var_C0=	dword ptr -0C0h
var_78=	dword ptr -78h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5823A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B4h
mov	[ebp+var_C0], ecx
mov	ecx, [ebp+var_C0]
add	ecx, 38h
call	sub_468AA0
mov	ecx, [ebp+var_C0]
add	ecx, 2Ch
call	sub_468AA0
mov	eax, [ebp+var_C0]
add	eax, 14h
mov	[ebp+var_78], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_78]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C0]
add	ecx, 8
call	sub_58EF90
mov	ecx, [ebp+var_C0]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5823A0 endp

align 10h


; Attributes: bp-based frame

sub_582440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 450h
mov	esp, ebp
pop	ebp
retn
sub_582440 endp



; Attributes: bp-based frame

sub_582450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4
mov	esp, ebp
pop	ebp
retn
sub_582450 endp



; Attributes: bp-based frame

sub_582460 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	edx, [edx+24h]
mov	[ecx+24h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	ecx, [ecx+3Ch]
mov	[eax+3Ch], ecx
mov	edx, [ebp+arg_0]
add	edx, 40h
mov	eax, [ebp+var_4]
add	eax, 40h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4Ch]
mov	[eax+4Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+50h]
mov	[eax+50h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+58h]
mov	[eax+58h], edx
mov	ecx, [ecx+5Ch]
mov	[eax+5Ch], ecx
mov	edx, [ebp+arg_0]
add	edx, 60h
mov	eax, [ebp+var_4]
add	eax, 60h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+6Ch]
mov	[eax+6Ch], dl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_582460 endp

align 10h


; Attributes: bp-based frame

sub_582570 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2B22h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B7098
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+10h], 0
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+30h], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+34h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+38h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_582570 endp

align 10h


; Attributes: bp-based frame

sub_5825F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_582620
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_582620:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5825F0 endp

align 10h


; Attributes: bp-based frame

sub_582630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+20h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+18h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582630 endp

align 10h


; Attributes: bp-based frame

sub_5826A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 7
mov	esp, ebp
pop	ebp
retn
sub_5826A0 endp



; Attributes: bp-based frame

sub_5826B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	eax, dword_17EE12C
mov	[edx], eax
mov	ecx, dword_17EE130
mov	[edx+4], ecx
mov	eax, dword_17EE134
mov	[edx+8], eax
mov	ecx, dword_17EE138
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
add	edx, 1Ch
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
add	ecx, 28h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+34h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+35h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+36h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+38h], 0
mov	dword ptr [eax+3Ch], 0
mov	ecx, [ebp+var_4]
add	ecx, 40h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
add	eax, 4Ch
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5826B0 endp

align 10h


; Attributes: bp-based frame

sub_5827B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 44h
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5827B0 endp

align 10h


; Attributes: bp-based frame

sub_5827E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 70h
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5827E0 endp

align 10h


; Attributes: bp-based frame

sub_582810 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 7Ch
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_582810 endp

align 10h


; Attributes: bp-based frame

sub_582840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+60h]
test	ecx, ecx
jnz	short loc_582868
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+61h]
test	eax, eax
jnz	short loc_582868
mov	[ebp+var_8], 1
jmp	short loc_58286F

loc_582868:
mov	[ebp+var_8], 0

loc_58286F:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_582840 endp

align 10h


; Attributes: bp-based frame

sub_582880 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+1], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+2], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+3], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+4], 0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_15FCD38
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15FCD34
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582880 endp

align 10h


; Attributes: bp-based frame

sub_5828F0 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+1], 1
mov	edx, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+var_14]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+var_14]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+10h], 0FFFFFFFFh
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 14h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 3Ch
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 64h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5828F0 endp

align 10h


; Attributes: bp-based frame

sub_5829A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+18h], 0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+1Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1577A6C
movss	dword ptr [edx+20h], xmm0
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5829A0 endp



; Attributes: bp-based frame

sub_582A20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 30h
mov	esp, ebp
pop	ebp
retn
sub_582A20 endp



; Attributes: bp-based frame

sub_582A30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 198h
mov	esp, ebp
pop	ebp
retn
sub_582A30 endp



; Attributes: bp-based frame

sub_582A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0Ah
mov	esp, ebp
pop	ebp
retn	8
sub_582A40 endp

align 10h


; Attributes: bp-based frame

sub_582A60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29h
mov	esp, ebp
pop	ebp
retn
sub_582A60 endp



; Attributes: bp-based frame

sub_582A70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C000E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_582A98
push	0B8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_582A98:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_582A70 endp

align 10h


; Attributes: bp-based frame

sub_582AB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 55h
mov	esp, ebp
pop	ebp
retn
sub_582AB0 endp



; Attributes: bp-based frame

sub_582AC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0D0h
mov	esp, ebp
pop	ebp
retn
sub_582AC0 endp



; Attributes: bp-based frame

sub_582AD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C000E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_582AF8
push	0D0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_582AF8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_582AD0 endp

align 10h


; Attributes: bp-based frame

sub_582B10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3Ch
mov	esp, ebp
pop	ebp
retn
sub_582B10 endp



; Attributes: bp-based frame

sub_582B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	232Eh
mov	ecx, [ebp+var_4]
call	sub_42CD70
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C020C
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+10h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+18h], 1
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582B20 endp

align 10h


; Attributes: bp-based frame

sub_582B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	2334h
mov	ecx, [ebp+var_4]
call	sub_42CD70
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B4300
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_401EF0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+18h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+34h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+38h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582B80 endp

align 10h


; Attributes: bp-based frame

sub_582BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	2335h
mov	ecx, [ebp+var_4]
call	sub_42CD70
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B4300
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+30h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+24h], 0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+28h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+2Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+34h], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+38h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582BF0 endp

align 10h


; Attributes: bp-based frame

sub_582C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	233Ah
mov	ecx, [ebp+var_4]
call	sub_42CD70
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A08
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+14h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582C80 endp

align 10h


; Attributes: bp-based frame

sub_582CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	esp, ebp
pop	ebp
retn
sub_582CD0 endp

align 10h


; Attributes: bp-based frame

sub_582CF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	233Fh
mov	ecx, [ebp+var_4]
call	sub_42CD70
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B4300
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_401EF0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+2Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582CF0 endp

align 10h


; Attributes: bp-based frame

sub_582D50 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	234Dh
mov	ecx, [ebp+var_C]
call	sub_42CD70
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B4308
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
add	ecx, 38h
call	sub_401EF0
mov	ecx, [ebp+var_C]
add	ecx, 44h
call	sub_401EF0
push	offset aBadfilename ; "badfilename"
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_402400
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+34h], 0
mov	edx, [ebp+var_C]
add	edx, 38h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_C]
add	ecx, 44h
mov	edx, dword_17EE12C
mov	[ecx], edx
mov	eax, dword_17EE130
mov	[ecx+4], eax
mov	edx, dword_17EE134
mov	[ecx+8], edx
mov	eax, dword_17EE138
mov	[ecx+0Ch], eax
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_582D50 endp

align 10h


; Attributes: bp-based frame

sub_582E10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_582E40
push	54h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_582E40:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_582E10 endp

align 10h


; Attributes: bp-based frame

sub_582E50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	235Bh
mov	ecx, [ebp+var_4]
call	sub_42CD70
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B430C
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+28h], 0
mov	edx, [ebp+var_4]
add	edx, 18h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1577A70
movss	dword ptr [eax+24h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_582E50 endp

align 10h


; Attributes: bp-based frame

sub_582EE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_582F05
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_582F05:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_582EE0 endp

align 10h


; Attributes: bp-based frame

sub_582F10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	esp, ebp
pop	ebp
retn
sub_582F10 endp



; Attributes: bp-based frame

sub_582F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	esp, ebp
pop	ebp
retn
sub_582F60 endp



; Attributes: bp-based frame

sub_582FB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3E0h
mov	esp, ebp
pop	ebp
retn
sub_582FB0 endp



; Attributes: bp-based frame

sub_582FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+60h]
test	ecx, ecx
jnz	short loc_583004
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+61h]
test	eax, eax
jnz	short loc_583004
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx+2A4h]
test	edx, edx
jz	short loc_583004
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+2A5h]
test	ecx, ecx
jz	short loc_583004
mov	[ebp+var_8], 1
jmp	short loc_58300B

loc_583004:
mov	[ebp+var_8], 0

loc_58300B:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_582FC0 endp

align 10h


; Attributes: bp-based frame

sub_583020 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_583048
push	0A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_583048:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_583020 endp

align 10h


; Attributes: bp-based frame

sub_583060 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 1C0h
call	sub_10E91C0
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_583096
push	1E0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_583096:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_583060 endp

align 10h


; Attributes: bp-based frame

sub_5830A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 27h
mov	esp, ebp
pop	ebp
retn
sub_5830A0 endp



; Attributes: bp-based frame

sub_5830B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B0h
mov	esp, ebp
pop	ebp
retn
sub_5830B0 endp



; Attributes: bp-based frame

sub_5830C0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset szReferrer
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx+38h], edx
mov	eax, [ebp+var_8]
mov	byte ptr [eax+3Ch], 0
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+3Dh], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+40h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+44h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+48h], 0
mov	edx, [ebp+var_8]
mov	byte ptr [edx+4Ch], 0
mov	eax, [ebp+var_8]
mov	byte ptr [eax+4Dh], 0
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+4Eh], 0
mov	edx, [ebp+var_8]
mov	byte ptr [edx+4Fh], 0
mov	eax, [ebp+var_8]
mov	byte ptr [eax+50h], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5830C0 endp

align 10h


; Attributes: bp-based frame

sub_583170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BB9h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B457C
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_583170 endp

align 10h


; Attributes: bp-based frame

sub_5831E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_583205
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_583205:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5831E0 endp

align 10h


; Attributes: bp-based frame

sub_583210 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0BBBh
mov	ecx, [ebp+var_C]
call	sub_42CCA0
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B4580
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
add	ecx, 38h
call	sub_401EF0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+0Ch], 1
push	offset szReferrer
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_402400
mov	edx, [ebp+var_C]
add	edx, 38h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+44h], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+48h], xmm0
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+4Ch], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+50h], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+54h], xmm0
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+58h], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+5Ch], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+60h], xmm0
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+64h], xmm0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_583210 endp

align 10h


; Attributes: bp-based frame

sub_583330 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_583360
push	68h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_583360:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_583330 endp

align 10h


; Attributes: bp-based frame

sub_583370 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
push	0BC7h
mov	ecx, [ebp+var_14]
call	sub_42CCA0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B4584
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 5Ch
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+88h], 0
mov	dword ptr [ecx+8Ch], 0
mov	edx, [ebp+var_14]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+90h], xmm0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+94h], 1
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+95h], 0
mov	edx, [ebp+var_14]
movss	xmm0, ds:dword_1577A70
movss	dword ptr [edx+98h], xmm0
mov	eax, [ebp+var_14]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+9Ch], xmm0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0A0h], 0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_583370 endp

align 10h


; Attributes: bp-based frame

sub_583460 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5834A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_583488
push	0A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_583488:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_583460 endp

align 10h


; Attributes: bp-based frame

sub_5834A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 5Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	esp, ebp
pop	ebp
retn
sub_5834A0 endp

align 10h


; Attributes: bp-based frame

sub_5834E0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
push	0BC8h
mov	ecx, [ebp+var_10]
call	sub_42CCA0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15B4588
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	ecx, [ebp+var_10]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+5Ch], xmm0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5834E0 endp

align 10h


; Attributes: bp-based frame

sub_583550 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58358B
push	60h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58358B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_583550 endp

align 10h


; Attributes: bp-based frame

sub_5835A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	esp, ebp
pop	ebp
retn
sub_5835A0 endp

align 10h


; Attributes: bp-based frame

sub_5835D0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0BD6h
mov	ecx, [ebp+var_C]
call	sub_42CCA0
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_1581B4C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5835D0 endp

align 10h


; Attributes: bp-based frame

sub_583620 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0BEFh
mov	ecx, [ebp+var_C]
call	sub_42CCA0
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B458C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+34h], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+38h], xmm0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+3Ch], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+43h], 0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+42h], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+41h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+40h], 0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+44h], 1
mov	eax, [ebp+var_C]
mov	byte ptr [eax+45h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+46h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_583620 endp

align 10h


; Attributes: bp-based frame

sub_5836C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5836F0
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5836F0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5836C0 endp

align 10h


; Attributes: bp-based frame

sub_583700 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_456120
mov	esp, ebp
pop	ebp
retn
sub_583700 endp

align 10h


; Attributes: bp-based frame

sub_583720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BF7h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B4300
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_583720 endp



; Attributes: bp-based frame

sub_583770 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_583795
push	3Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_583795:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_583770 endp

align 10h


; Attributes: bp-based frame

sub_5837A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BF8h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E608
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5837A0 endp

align 10h


; Attributes: bp-based frame

sub_5837E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0C03h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A08
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5837E0 endp

align 10h


; Attributes: bp-based frame

sub_583810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0C10h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E608
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_583810 endp

align 10h


; Attributes: bp-based frame

sub_583850 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_70=	dword ptr -70h
var_68=	qword ptr -68h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	qword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_80]
call	sub_49F270
mov	eax, [ebp+var_80]
mov	dword ptr [eax], offset	off_15B4608
mov	ecx, [ebp+var_80]
mov	edx, [ebp+arg_0]
mov	[ecx+30h], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_80]
add	ecx, 10h
call	sub_402310
mov	ecx, [ebp+var_80]
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_10]
call	sub_402CA0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_583912
mov	edx, dword ptr [ebp+arg_14]
or	edx, dword ptr [ebp+arg_14+4]
jz	short loc_583912
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1599B08
mov	eax, dword ptr [ebp+arg_14]
mov	dword ptr [ebp+var_68],	eax
mov	ecx, dword ptr [ebp+arg_14+4]
mov	dword ptr [ebp+var_68+4], ecx
lea	ecx, [ebp+var_60]
call	sub_E77D40
mov	edx, [ebp+arg_10]
push	edx
lea	ecx, [ebp+var_40]
call	sub_4023E0
lea	eax, [ebp+var_70]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_60]
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_7C]
add	ecx, 20h
call	sub_407E50
mov	ecx, [ebp+var_7C]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110

loc_583912:
mov	eax, [ebp+var_80]
mov	esp, ebp
pop	ebp
retn	1Ch
sub_583850 endp

align 10h


; Attributes: bp-based frame

sub_583920 proc	near

var_8C=	dword ptr -8Ch
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_3C=	dword ptr -3Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58C6C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 80h
push	esi
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	ecx, [eax+30h]
sub	ecx, 1
mov	edx, [ebp+var_8C]
mov	[edx+30h], ecx
push	offset aUpdateracestar ; "UpdateRaceStarting"
lea	ecx, [ebp+var_64]
call	sub_110E550
mov	eax, [ebp+var_8C]
mov	ecx, [eax+30h]
push	ecx
push	offset aTime_0	; "time"
mov	edx, [ebp+var_3C]
lea	ecx, [ebp+var_3C]
mov	eax, [edx+30h]
call	eax
mov	esi, eax
call	sub_401930
lea	ecx, [ebp+var_64]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	edx, [ebp+var_8C]
cmp	dword ptr [edx+30h], 0
jle	short loc_583A03
lea	ecx, [ebp+var_74]
call	sub_49F360
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_68], xmm0
mov	eax, [ebp+var_8C]
mov	[ebp+var_6C], eax
lea	ecx, [ebp+var_74]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_78], 0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_401110
lea	edx, [ebp+var_64]
push	edx
call	sub_4093F0
mov	eax, [ebp+var_78]
jmp	short loc_583A21
jmp	short loc_583A18

loc_583A03:
mov	[ebp+var_7C], 1
lea	eax, [ebp+var_64]
push	eax
call	sub_4093F0
mov	eax, [ebp+var_7C]
jmp	short loc_583A21

loc_583A18:
lea	ecx, [ebp+var_64]
push	ecx
call	sub_4093F0

loc_583A21:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_583920 endp



; Attributes: bp-based frame

sub_583A30 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_49F270
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15B4614
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+30h], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_14]
mov	[eax+38h], ecx
mov	edx, [ebp+arg_18]
mov	[eax+3Ch], edx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 40h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_402310
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_C]
mov	[ecx+0Ch], eax
cmp	[ebp+arg_10], 0
jz	short loc_583AB1
mov	ecx, [ebp+arg_10]
push	ecx
mov	ecx, [ebp+var_10]
add	ecx, 40h
call	sub_402400

loc_583AB1:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	1Ch
sub_583A30 endp

align 10h


; Attributes: bp-based frame

sub_583AC0 proc	near

var_134= dword ptr -134h
var_130= dword ptr -130h
var_128= dword ptr -128h
var_124= dword ptr -124h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_74=	byte ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_3C=	dword ptr -3Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58C6C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 128h
push	esi
mov	[ebp+var_130], ecx
push	offset aUpdateracestar ; "UpdateRaceStarting"
lea	ecx, [ebp+var_64]
call	sub_110E550
push	3
push	offset aTime_0	; "time"
mov	eax, [ebp+var_3C]
lea	ecx, [ebp+var_3C]
mov	edx, [eax+30h]
call	edx
mov	esi, eax
call	sub_401930
lea	eax, [ebp+var_64]
push	eax
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_74]
call	sub_49F360
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_68], xmm0
push	38h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_A8], eax
cmp	[ebp+var_A8], 0
jz	short loc_583B93
mov	ecx, [ebp+var_130]
mov	edx, [ecx+3Ch]
push	edx
mov	eax, [ecx+38h]
push	eax
mov	ecx, [ebp+var_130]
add	ecx, 40h
push	ecx
mov	edx, [ebp+var_130]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [edx+8]
push	ecx
push	offset aStartrace ; "startRace"
mov	edx, [ebp+var_130]
mov	eax, [edx+30h]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_583850
mov	[ebp+var_134], eax
jmp	short loc_583B9D

loc_583B93:
mov	[ebp+var_134], 0

loc_583B9D:
mov	ecx, [ebp+var_134]
mov	[ebp+var_6C], ecx
lea	edx, [ebp+var_74]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_130]
mov	ecx, [eax+8]
mov	[ebp+var_128], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_124], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_A4]
call	sub_401100
mov	[ebp+var_A4], offset off_1599AE8
mov	eax, [ebp+var_128]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_124]
mov	[ebp+var_98], ecx
lea	ecx, [ebp+var_94]
call	sub_D800C0
lea	edx, [ebp+var_A4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_AC], 1
lea	ecx, [ebp+var_94]
call	sub_4087D0
lea	ecx, [ebp+var_A4]
call	sub_401110
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_401110
lea	eax, [ebp+var_64]
push	eax
call	sub_4093F0
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_583AC0 endp

align 10h


; Attributes: bp-based frame

sub_583C80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 40h
call	sub_407E50
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1573C10
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_583CDD
mov	edx, [ebp+var_10]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_583CDD:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_583C80 endp



; Attributes: bp-based frame

sub_583CF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D5DB60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_583D18
push	1A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_583D18:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_583CF0 endp

align 10h


; Attributes: bp-based frame

sub_583D30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A4h
mov	esp, ebp
pop	ebp
retn
sub_583D30 endp



; Attributes: bp-based frame

sub_583D40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+68h]
test	ecx, ecx
jnz	short loc_583D89
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+6Ah]
test	eax, eax
jnz	short loc_583D89
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx+69h]
test	edx, edx
jnz	short loc_583D89
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+6Fh]
test	ecx, ecx
jnz	short loc_583D89
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+6Bh]
test	eax, eax
jnz	short loc_583D89
mov	[ebp+var_8], 1
jmp	short loc_583D90

loc_583D89:
mov	[ebp+var_8], 0

loc_583D90:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_583D40 endp

align 10h


; Attributes: bp-based frame

sub_583DA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+180h], 0
setnz	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn
sub_583DA0 endp

align 10h


; Attributes: bp-based frame

sub_583DC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+184h], 0
setnz	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn
sub_583DC0 endp

align 10h


; Attributes: bp-based frame

sub_583DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+188h], 0
setnz	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn
sub_583DE0 endp

align 10h


; Attributes: bp-based frame

sub_583E00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
imul	eax, 90h
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax+3Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_8]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_583E65
mov	edx, [ebp+arg_0]
imul	edx, 90h
mov	eax, [ebp+var_10]
mov	ecx, [eax+edx+30h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+edx*4]
mov	[ebp+var_14], ecx
jmp	short loc_583E6C

loc_583E65:
mov	[ebp+var_14], 1

loc_583E6C:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_583E00 endp

align 10h


; Attributes: bp-based frame

sub_583E80 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
imul	eax, 90h
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax+60h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_8]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_583EE5
mov	edx, [ebp+arg_0]
imul	edx, 90h
mov	eax, [ebp+var_10]
mov	ecx, [eax+edx+54h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+edx*4]
mov	[ebp+var_14], ecx
jmp	short loc_583EEC

loc_583EE5:
mov	[ebp+var_14], 1

loc_583EEC:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_583E80 endp

align 10h


; Attributes: bp-based frame

sub_583F00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
imul	eax, 90h
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax+84h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_8]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_583F68
mov	edx, [ebp+arg_0]
imul	edx, 90h
mov	eax, [ebp+var_10]
mov	ecx, [eax+edx+78h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+edx*4]
mov	[ebp+var_14], ecx
jmp	short loc_583F6F

loc_583F68:
mov	[ebp+var_14], 1

loc_583F6F:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_583F00 endp

align 10h


; Attributes: bp-based frame

sub_583F80 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_14]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+var_14]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0FFFFFFFFh
mov	edx, [ebp+var_14]
mov	dword ptr [edx+14h], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	dword ptr [eax+48h], 0
mov	dword ptr [eax+4Ch], 0
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+50h], 0
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 54h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_583F80 endp

align 10h


; Attributes: bp-based frame

sub_584050 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_C]
movss	xmm0, ds:dword_1577A70
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+10h], 1
mov	edx, [ebp+var_C]
mov	byte ptr [edx+11h], 0
mov	eax, [ebp+var_C]
mov	byte ptr [eax+12h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+13h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+14h], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+1Ch], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 20h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	edx, [ebp+var_C]
mov	dword ptr [edx+48h], 1
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_584050 endp



; Attributes: bp-based frame

sub_584100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+10h], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+14h], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+18h], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	dword ptr [edx+1Ch], 0
mov	eax, [ebp+var_4]
add	eax, 20h
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_584100 endp

align 10h
; [0000000A BYTES: COLLAPSED FUNCTION unknown_libname_11. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_584190 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	[ebp+var_10], ecx
xor	eax, eax
mov	esi, [ebp+var_10]
call	sub_41DF90
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_10]
mov	byte ptr [eax+24h], 0
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+25h], 0
mov	eax, [ebp+var_10]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_584190 endp

align 10h
; [0000000A BYTES: COLLAPSED FUNCTION unknown_libname_12. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_584230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+8], 0
jnz	short loc_584246
xor	al, al
jmp	short loc_584287

loc_584246:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
mov	edx, [edx]
mov	eax, [edx]
call	eax
cmp	eax, 2
jz	short loc_58427D
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
mov	edx, [edx]
mov	eax, [edx]
call	eax
cmp	eax, 59h
jz	short loc_58427D
mov	[ebp+var_8], 0
jmp	short loc_584284

loc_58427D:
mov	[ebp+var_8], 1

loc_584284:
mov	al, byte ptr [ebp+var_8]

loc_584287:
mov	esp, ebp
pop	ebp
retn
sub_584230 endp

align 10h
; [0000000A BYTES: COLLAPSED FUNCTION sub_584290. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5842A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C0D9E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5842C8
push	1A4h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5842C8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5842A0 endp

align 10h


; Attributes: bp-based frame

sub_5842E0 proc	near

var_218= dword ptr -218h
var_F8=	byte ptr -0F8h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 218h
mov	[ebp+var_218], ecx
lea	ecx, [ebp+var_F8]
call	sub_F1B5C0
mov	[ebp+var_D8], 9
movss	xmm0, ds:dword_15136A4
movss	[ebp+var_D4], xmm0
movss	xmm0, ds:dword_15136A8
movss	[ebp+var_C8], xmm0
mov	eax, dword_1890DE4
mov	[ebp+var_B8], eax
mov	ecx, dword_1890DE8
mov	[ebp+var_B4], ecx
mov	edx, dword_1890DEC
mov	[ebp+var_B0], edx
mov	eax, dword_1890DF0
mov	[ebp+var_AC], eax
movss	xmm0, ds:dword_15136AC
movss	[ebp+var_C4], xmm0
movss	xmm0, ds:dword_15136B0
movss	[ebp+var_D0], xmm0
movss	xmm0, ds:dword_15136B4
movss	[ebp+var_CC], xmm0
lea	ecx, [ebp+var_F8]
push	ecx
mov	ecx, [ebp+var_218]
call	sub_5843B0
lea	ecx, [ebp+var_F8]
call	sub_542990
mov	esp, ebp
pop	ebp
retn
sub_5842E0 endp

align 10h


; Attributes: bp-based frame

sub_5843B0 proc	near

var_148= dword ptr -148h
var_138= dword ptr -138h
var_128= dword ptr -128h
var_114= dword ptr -114h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_84=	byte ptr -84h
var_68=	byte ptr -68h
var_24=	byte ptr -24h
var_23=	byte ptr -23h
var_20=	byte ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 138h
push	esi
push	edi
mov	[ebp+var_138], ecx
lea	ecx, [ebp+var_100]
call	sub_49FB90
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	[ebp+var_F8], ecx
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+24h]
movss	[ebp+var_F4], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+28h]
movss	[ebp+var_E4], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+2Ch]
movss	[ebp+var_E0], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+34h]
movss	[ebp+var_D8], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+30h]
movss	[ebp+var_DC], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+38h]
movss	[ebp+var_D4], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+3Ch]
movss	[ebp+var_D0], xmm0
mov	eax, [ebp+arg_0]
add	eax, 40h
mov	ecx, [eax]
mov	[ebp+var_CC], ecx
mov	edx, [eax+4]
mov	[ebp+var_C8], edx
mov	ecx, [eax+8]
mov	[ebp+var_C4], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_C0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+50h]
mov	[ebp+var_BC], ecx
mov	esi, [ebp+arg_0]
add	esi, 54h
mov	ecx, 0Dh
lea	edi, [ebp+var_B8]
rep movsd
mov	esi, [ebp+arg_0]
add	esi, 88h
mov	ecx, 7
lea	edi, [ebp+var_84]
rep movsd
mov	edx, [ebp+arg_0]
add	edx, 0A4h
push	edx
lea	ecx, [ebp+var_68]
call	sub_4023E0
mov	eax, [ebp+arg_0]
mov	cl, [eax+0D0h]
mov	[ebp+var_24], cl
mov	edx, [ebp+arg_0]
mov	al, [edx+0D1h]
mov	[ebp+var_23], al
mov	ecx, [ebp+arg_0]
add	ecx, 0D4h
call	sub_10E9530
test	eax, eax
jle	short loc_5844F8
push	0
push	0
lea	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+arg_0]
add	ecx, 0D4h
call	sub_10FE7F0

loc_5844F8:
mov	edx, [ebp+arg_0]
mov	eax, [edx+0F0h]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_138]
cmp	dword ptr [ecx+0ACh], 270Fh
jnz	loc_584675
mov	edx, [ebp+var_138]
mov	eax, [edx+4Ch]
mov	[ebp+var_104], eax

loc_584529:
mov	ecx, [ebp+var_138]
mov	edx, [ecx+50h]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_104]
cmp	eax, [ebp+var_114]
jz	loc_584670
cmp	[ebp+var_F8], 9
jnz	short loc_584572
mov	eax, [ebp+var_104]
call	sub_420D20
push	eax
call	sub_BF3D50
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	loc_58465C

loc_584572:
call	sub_49FD50
mov	[ebp+var_108], eax
lea	edx, [ebp+var_100]
push	edx
mov	ecx, [ebp+var_108]
call	sub_584730
mov	eax, [ebp+var_108]
add	eax, 10h
mov	[ebp+var_128], eax
mov	ecx, [ebp+var_128]
mov	edx, [ebp+var_104]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_5845F0
mov	ecx, [ebp+var_128]
cmp	dword ptr [ecx], 0
jz	short loc_5845C8
mov	edx, [ebp+var_128]
mov	ecx, [edx]
call	sub_40AA90

loc_5845C8:
mov	eax, [ebp+var_128]
mov	ecx, [ebp+var_104]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_128]
cmp	dword ptr [eax], 0
jz	short loc_5845F0
mov	ecx, [ebp+var_128]
mov	ecx, [ecx]
call	sub_40AA80

loc_5845F0:
lea	ecx, [ebp+var_20]
call	sub_10E9530
test	eax, eax
jle	short loc_584615
push	0
push	0
mov	edx, [ebp+var_108]
add	edx, 0E0h
push	edx
lea	ecx, [ebp+var_20]
call	sub_10FE7F0

loc_584615:
mov	eax, [ebp+var_138]
movzx	ecx, byte ptr [eax+72h]
test	ecx, ecx
jz	short loc_584644
mov	edx, [ebp+var_108]
push	edx		; int
push	ecx		; float
fld	ds:flt_15FDB3C
fstp	[esp+148h+var_148]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330

loc_584642:
jmp	short loc_58465C

loc_584644:
lea	eax, [ebp+var_108]
push	eax
mov	ecx, [ebp+var_138]
add	ecx, 0BCh
call	sub_468D70

loc_58465C:
mov	ecx, [ebp+var_104]
add	ecx, 4
mov	[ebp+var_104], ecx
jmp	loc_584529

loc_584670:
jmp	loc_584716

loc_584675:
call	sub_49FD50
mov	[ebp+var_10C], eax
lea	edx, [ebp+var_100]
push	edx
mov	ecx, [ebp+var_10C]
call	sub_584730
mov	eax, [ebp+var_138]
add	eax, 48h
push	eax
mov	ecx, [ebp+var_10C]
add	ecx, 10h
call	sub_4AD130
lea	ecx, [ebp+var_20]
call	sub_10E9530
test	eax, eax
jle	short loc_5846CF
push	0
push	0
mov	ecx, [ebp+var_10C]
add	ecx, 0E0h
push	ecx
lea	ecx, [ebp+var_20]
call	sub_10FE7F0

loc_5846CF:
mov	edx, [ebp+var_138]
movzx	eax, byte ptr [edx+72h]
test	eax, eax
jz	short loc_5846FE
mov	ecx, [ebp+var_10C]
push	ecx		; int
push	ecx		; float
fld	ds:flt_15FDB3C
fstp	[esp+148h+var_148]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330
jmp	short loc_584716

loc_5846FE:
lea	edx, [ebp+var_10C]
push	edx
mov	ecx, [ebp+var_138]
add	ecx, 0BCh
call	sub_468D70

loc_584716:
lea	ecx, [ebp+var_100]
call	sub_49FE00
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5843B0 endp

align 10h


; Attributes: bp-based frame

sub_584730 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
push	edi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+var_8], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_5847AB
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_58478F
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_58478F:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5847AB
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_5847AB:
mov	edx, [ebp+arg_0]
add	edx, 14h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_1C]
add	eax, 14h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_5847F7
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_5847DB
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_40AA90

loc_5847DB:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_5847F7
mov	ecx, [ebp+var_C]
mov	ecx, [ecx]
call	sub_40AA80

loc_5847F7:
mov	edx, [ebp+var_1C]
mov	eax, [ebp+arg_0]
mov	cl, [eax+18h]
mov	[edx+18h], cl
mov	edx, [ebp+var_1C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+1Ch]
fstp	dword ptr [edx+1Ch]
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+20h]
fstp	dword ptr [ecx+20h]
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+24h]
fstp	dword ptr [eax+24h]
mov	edx, [ebp+var_1C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+28h]
fstp	dword ptr [edx+28h]
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+2Ch]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	edx, [ebp+arg_0]
add	edx, 34h
mov	eax, [ebp+var_1C]
add	eax, 34h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+44h]
mov	[eax+44h], edx
mov	esi, [ebp+arg_0]
add	esi, 48h
mov	edi, [ebp+var_1C]
add	edi, 48h
mov	ecx, 0Dh
rep movsd
mov	esi, [ebp+arg_0]
add	esi, 7Ch
mov	edi, [ebp+var_1C]
add	edi, 7Ch
mov	ecx, 7
rep movsd
mov	eax, [ebp+arg_0]
add	eax, 98h
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 98h
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 0C0h
push	ecx
mov	edi, [ebp+var_1C]
add	edi, 0C0h
call	sub_418760
mov	edx, [ebp+arg_0]
add	edx, 0C4h
push	edx
mov	ecx, [ebp+var_1C]
add	ecx, 0C4h
call	sub_4022F0
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0DCh]
mov	[eax+0DCh], dl
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0DDh]
mov	[eax+0DDh], dl
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0DEh]
mov	[eax+0DEh], dl
mov	eax, [ebp+arg_0]
add	eax, 0E0h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
add	ecx, 0E0h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_14]
call	sub_46B470
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0FCh]
mov	[eax+0FCh], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0FCh]
mov	[eax+0FCh], edx
mov	eax, [ebp+var_1C]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_584730 endp

align 10h


; Attributes: bp-based frame

sub_584980 proc	near

var_10C= dword ptr -10Ch
var_101= byte ptr -101h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	byte ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_B8=	dword ptr -0B8h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	byte ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_64=	byte ptr -64h
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_584980
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0F8h
mov	[ebp+var_100], ecx
mov	eax, [ebp+var_100]
cmp	dword ptr [eax+0ACh], 270Fh
jnz	loc_584AA8
mov	ecx, [ebp+var_100]
mov	edx, [ecx+4Ch]
mov	[ebp+var_10], edx

loc_5849C6:
mov	eax, [ebp+var_100]
mov	ecx, [eax+50h]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_AC]
jz	loc_584AA3
call	sub_49FD50
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ebp+var_10]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_584A44
mov	ecx, [ebp+var_B8]
cmp	dword ptr [ecx], 0
jz	short loc_584A1F
mov	edx, [ebp+var_B8]
mov	ecx, [edx]
call	sub_40AA90

loc_584A1F:
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B8]
cmp	dword ptr [eax], 0
jz	short loc_584A44
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
call	sub_40AA80

loc_584A44:
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	byte ptr [ecx+18h], 1
mov	edx, [ebp+var_100]
movzx	eax, byte ptr [edx+72h]
test	eax, eax
jz	short loc_584A80
mov	ecx, [ebp+var_14]
push	ecx		; int
push	ecx		; float
fld	ds:flt_15FDB3C
fstp	[esp+10Ch+var_10C]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330
jmp	short loc_584A95

loc_584A80:
lea	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_100]
add	ecx, 0BCh
call	sub_468D70

loc_584A95:
mov	eax, [ebp+var_10]
add	eax, 4
mov	[ebp+var_10], eax
jmp	loc_5849C6

loc_584AA3:
jmp	loc_584B6E

loc_584AA8:
call	sub_49FD50
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_100]
add	ecx, 48h
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_18]
add	edx, 10h
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_CC]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_584B1D
mov	eax, [ebp+var_C8]
cmp	dword ptr [eax], 0
jz	short loc_584AF5
mov	ecx, [ebp+var_C8]
mov	ecx, [ecx]
call	sub_40AA90

loc_584AF5:
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_C8]
cmp	dword ptr [edx], 0
jz	short loc_584B1D
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
call	sub_40AA80

loc_584B1D:
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	byte ptr [eax+18h], 1
mov	ecx, [ebp+var_100]
movzx	edx, byte ptr [ecx+72h]
test	edx, edx
jz	short loc_584B59
mov	eax, [ebp+var_18]
push	eax		; int
push	ecx		; float
fld	ds:flt_15FDB3C
fstp	[esp+10Ch+var_10C]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330
jmp	short loc_584B6E

loc_584B59:
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_100]
add	ecx, 0BCh
call	sub_468D70

loc_584B6E:
movzx	edx, [ebp+arg_4]
test	edx, edx
jz	loc_584DB2
lea	ecx, [ebp+var_54]
call	sub_E8BE20
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_100]
mov	edx, [ecx+4]
mov	eax, [ebp+var_100]
mov	ecx, [eax+4]
mov	edx, [edx]
mov	eax, [edx]
call	eax
test	eax, eax
jz	loc_584D7C
mov	ecx, [ebp+var_24]
mov	[ebp+var_D4], ecx
cmp	[ebp+var_D4], 0
jz	loc_584D7C
mov	[ebp+var_58], 0
mov	edx, [ebp+var_2C]
mov	[ebp+var_D8], edx
mov	ecx, [ebp+var_D8]
lea	eax, [ebp+var_9C]
call	sub_4046E0
mov	eax, [ebp+var_9C]
mov	[ebp+var_58], eax
jmp	short loc_584C11

loc_584BE8:
lea	ecx, [ebp+var_58]
push	ecx
lea	ecx, [ebp+var_DC]
call	sub_4ABD70
lea	ecx, [ebp+var_58]
call	sub_487D40
lea	edx, [ebp+var_DC]
push	edx
lea	ecx, [ebp+var_A0]
call	sub_4ABD70

loc_584C11:
lea	ecx, [ebp+var_34]
lea	eax, [ebp+var_A8]
call	sub_4046E0
lea	eax, [ebp+var_E4]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_A8]
mov	eax, [ebp+var_E0]
call	sub_4046E0
mov	ecx, [ebp+var_58]
xor	edx, edx
cmp	ecx, [ebp+var_E4]
setnz	dl
mov	[ebp+var_101], dl
movzx	eax, [ebp+var_101]
test	eax, eax
jz	loc_584D7C
mov	ecx, [ebp+var_58]
mov	edx, [ecx+3Ch]
push	edx
mov	eax, [ecx+38h]
push	eax
lea	ecx, [ebp+var_94]
call	sub_42D6E0
lea	ecx, [ebp+var_94]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	eax, [ebp+var_64]
call	sub_420D20
test	eax, eax
jz	loc_584D6C
call	sub_49FD50
mov	[ebp+var_98], eax
lea	edx, [ebp+var_64]
mov	[ebp+var_F4], edx
mov	eax, [ebp+var_98]
add	eax, 10h
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_584D0F
mov	ecx, [ebp+var_F0]
cmp	dword ptr [ecx], 0
jz	short loc_584CE7
mov	edx, [ebp+var_F0]
mov	ecx, [edx]
call	sub_40AA90

loc_584CE7:
mov	eax, [ebp+var_F0]
mov	ecx, [ebp+var_F4]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_F0]
cmp	dword ptr [eax], 0
jz	short loc_584D0F
mov	ecx, [ebp+var_F0]
mov	ecx, [ecx]
call	sub_40AA80

loc_584D0F:
mov	edx, [ebp+var_98]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	ecx, [ebp+var_98]
mov	byte ptr [ecx+18h], 1
mov	edx, [ebp+var_100]
movzx	eax, byte ptr [edx+72h]
test	eax, eax
jz	short loc_584D54
mov	ecx, [ebp+var_98]
push	ecx		; int
push	ecx		; float
fld	ds:flt_15FDB3C
fstp	[esp+10Ch+var_10C]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330
jmp	short loc_584D6C

loc_584D54:
lea	edx, [ebp+var_98]
push	edx
mov	ecx, [ebp+var_100]
add	ecx, 0BCh
call	sub_468D70

loc_584D6C:
lea	ecx, [ebp+var_94]
call	sub_42D000
jmp	loc_584BE8

loc_584D7C:
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	eax, [ebp+var_34]
mov	[ebp+var_FC], eax
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_FC]
call	sub_437440
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_54]
call	sub_4087D0

loc_584DB2:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_584980 endp

align 10h


; Attributes: bp-based frame

sub_584DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 188h
mov	esp, ebp
pop	ebp
retn
sub_584DD0 endp



; Attributes: bp-based frame

sub_584DE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 100h
mov	esp, ebp
pop	ebp
retn
sub_584DE0 endp

align 10h


; Attributes: bp-based frame

sub_584E00 proc	near

var_24=	dword ptr -24h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
lea	ecx, [ebp+var_19]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_18]
call	sub_4022A0
lea	ecx, [ebp+var_19]
call	nullsub_1
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 1
mov	[ebp+var_24], ecx
cmp	[ebp+var_24], 0Dh ; switch 14 cases
ja	short loc_584E81 ; default
			; jumptable 00584E3E cases 1-8,11
mov	edx, [ebp+var_24]
movzx	eax, ds:byte_584EC0[edx]
jmp	ds:off_584EAC[eax*4] ; switch jump

loc_584E45:		; jumptable 00584E3E case 9
push	offset aVendor_0
lea	ecx, [ebp+var_18]
call	sub_402310
jmp	short loc_584E8E

loc_584E54:		; jumptable 00584E3E case 10
push	offset aBuyback
lea	ecx, [ebp+var_18]
call	sub_402310
jmp	short loc_584E8E

loc_584E63:		; jumptable 00584E3E case 12
push	offset aDonation
lea	ecx, [ebp+var_18]
call	sub_402310
jmp	short loc_584E8E

loc_584E72:		; jumptable 00584E3E cases 0,13
push	offset aBank
lea	ecx, [ebp+var_18]
call	sub_402310
jmp	short loc_584E8E

loc_584E81:		; default
push	offset aBackpack ; jumptable 00584E3E cases 1-8,11
lea	ecx, [ebp+var_18]
call	sub_402310

loc_584E8E:
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_403850
lea	ecx, [ebp+var_18]
call	sub_407910
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_584E00 endp

align 4
off_584EAC dd offset loc_584E72	; jump table for switch	statement
dd offset loc_584E45
dd offset loc_584E54
dd offset loc_584E63
dd offset loc_584E81
byte_584EC0 db	    0,	   4,	  4,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     1,     2,     4
db	3,     0
align 10h


; Attributes: bp-based frame

sub_584ED0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	byte ptr [eax],	0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 4
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+2Ch], 6
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_584ED0 endp

align 10h


; Attributes: bp-based frame

sub_584F10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	cl, [eax+0DCh]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_584F3A
mov	eax, [ebp+var_C]
add	eax, 188h
mov	[ebp+var_10], eax
jmp	short loc_584F46

loc_584F3A:
mov	ecx, [ebp+var_C]
add	ecx, 100h
mov	[ebp+var_10], ecx

loc_584F46:
mov	edx, [ebp+var_10]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_584F10 endp

align 10h


; Attributes: bp-based frame

sub_584F60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+1A1h]
mov	esp, ebp
pop	ebp
retn
sub_584F60 endp

align 10h


; Attributes: bp-based frame

sub_584F80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+1A0h]
mov	esp, ebp
pop	ebp
retn
sub_584F80 endp

align 10h


; Attributes: bp-based frame

sub_584FA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_584FE8
push	50h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_584FE8:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_584FA0 endp

align 10h


; Attributes: bp-based frame

sub_585000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 18h
mov	esp, ebp
pop	ebp
retn
sub_585000 endp



; Attributes: bp-based frame

sub_585010 proc	near

var_44=	dword ptr -44h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 44h
cmp	dword_18898A8, 0
jnz	short loc_58505D
push	30h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_58504D
mov	ecx, [ebp+var_4]
call	sub_5920F0
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_5920F0
mov	eax, [ebp+var_4]
mov	[ebp+var_44], eax
jmp	short loc_585054

loc_58504D:
mov	[ebp+var_44], 0

loc_585054:
mov	ecx, [ebp+var_44]
mov	dword_18898A8, ecx

loc_58505D:
mov	eax, dword_18898A8
mov	esp, ebp
pop	ebp
retn
sub_585010 endp

align 10h


; Attributes: bp-based frame

sub_585070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1_Locimp@locale@std@@MAE@XZ_0	; std::locale::_Locimp::~_Locimp(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_585098
push	98h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_585098:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_585070 endp

align 10h


; Attributes: bp-based frame

sub_5850B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5850F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5850D8
push	0D0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5850D8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5850B0 endp

align 10h


; Attributes: bp-based frame

sub_5850F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0A4h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 78h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 5Ch
call	sub_4892A0
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_5850F0 endp

align 10h


; Attributes: bp-based frame

sub_585130 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 4
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+1Ch], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_585130 endp

align 10h


; Attributes: bp-based frame

sub_585180 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B4590
mov	ecx, [ebp+var_C]
add	ecx, 4
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_2]
push	edx
mov	ecx, [ebp+var_8]
call	sub_489C40
mov	eax, [ebp+var_8]
mov	dword ptr [eax+10h], 0
mov	cl, [ebp+var_3]
mov	edx, [ebp+var_8]
mov	[edx+14h], cl
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
call	sub_407D30
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_585180 endp

align 10h


; Attributes: bp-based frame

sub_5851F0 proc	near

var_34=	dword ptr -34h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_34]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx+34h], 0
mov	edx, [ebp+var_34]
mov	dword ptr [edx+38h], 0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+3Ch], 0
mov	ecx, [ebp+var_34]
mov	byte ptr [ecx+40h], 0
mov	edx, [ebp+var_34]
mov	byte ptr [edx+41h], 0
mov	eax, [ebp+var_34]
mov	byte ptr [eax+42h], 0
mov	ecx, [ebp+var_34]
mov	byte ptr [ecx+43h], 0
mov	edx, [ebp+var_34]
mov	byte ptr [edx+44h], 0
mov	eax, [ebp+var_34]
mov	byte ptr [eax+45h], 0
mov	ecx, [ebp+var_34]
mov	byte ptr [ecx+46h], 0
mov	edx, [ebp+var_34]
mov	byte ptr [edx+47h], 0
mov	eax, [ebp+var_34]
mov	byte ptr [eax+48h], 0
mov	ecx, [ebp+var_34]
mov	byte ptr [ecx+49h], 0
mov	edx, [ebp+var_34]
mov	byte ptr [edx+4Ah], 0
mov	eax, [ebp+var_34]
mov	dword ptr [eax+50h], 0
mov	dword ptr [eax+54h], 0
mov	ecx, [ebp+var_34]
add	ecx, 58h
call	sub_5D0370
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_5851F0 endp

align 10h


; Attributes: bp-based frame

sub_5852D0 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
call	sub_585310
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5852FA
push	0C8h
mov	ecx, [ebp+var_18]
push	ecx
call	sub_1111040
add	esp, 8

loc_5852FA:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_5852D0 endp

align 10h


; Attributes: bp-based frame

sub_585310 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_585310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
add	eax, 0A8h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_46A7D0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_24]
add	ecx, 8Ch
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_593F30
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_24]
add	edx, 74h
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_18]
call	sub_5E0AF0
mov	ecx, [ebp+var_18]
add	ecx, 14h
call	nullsub_1
mov	eax, [ebp+var_24]
add	eax, 5Ch
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
call	sub_593F30
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_24]
add	ecx, 44h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_593F30
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_24]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_585310 endp

align 10h


; Attributes: bp-based frame

sub_5853E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 58h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_593E70
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_8]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_5853E0 endp

align 10h


; Attributes: bp-based frame

sub_585420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_4022F0
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+30h]
fstp	dword ptr [edx+30h]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+34h]
mov	[ecx+34h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+38h]
mov	[ecx+38h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+3Ch]
mov	[ecx+3Ch], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+40h]
mov	[ecx+40h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+41h]
mov	[ecx+41h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+42h]
mov	[ecx+42h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+43h]
mov	[ecx+43h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+44h]
mov	[ecx+44h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+45h]
mov	[ecx+45h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+46h]
mov	[ecx+46h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+47h]
mov	[ecx+47h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+48h]
mov	[ecx+48h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+49h]
mov	[ecx+49h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	al, [edx+4Ah]
mov	[ecx+4Ah], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+50h]
mov	[ecx+50h], eax
mov	edx, [edx+54h]
mov	[ecx+54h], edx
mov	eax, [ebp+var_8]
add	eax, 58h
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 58h
push	ecx
mov	ecx, [ebp+var_4]
call	sub_59DEA0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_585420 endp

align 10h


; Attributes: bp-based frame

sub_585530 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403400
mov	eax, [ebp+arg_0]
add	eax, 30h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 30h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_8]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403850
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax+1Ch]
mov	[edx+1Ch], ecx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_585530 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5855B0(float, int)
sub_5855B0 proc	near

var_4C=	qword ptr -4Ch
var_44=	dword ptr -44h
var_3E=	word ptr -3Eh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_3C], ecx
lea	ecx, [ebp+var_30]
call	sub_D8BC80
fld	[ebp+arg_0]
fnstcw	[ebp+var_3E]
movzx	eax, [ebp+var_3E]
or	eax, 0C00h
mov	[ebp+var_44], eax
fldcw	word ptr [ebp+var_44]
fistp	[ebp+var_4C]
fldcw	[ebp+var_3E]
mov	eax, dword ptr [ebp+var_4C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+70h]
mov	[ebp+var_38], edx
mov	eax, [ecx+74h]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_34]
mov	[ebp+var_C], edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	ecx, [ebp+arg_4]
mov	eax, [edx]
call	eax
lea	ecx, [ebp+var_30]
call	sub_4087D0
mov	esp, ebp
pop	ebp
retn	8
sub_5855B0 endp

align 10h


; Attributes: bp-based frame

sub_585620 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
mov	esp, ebp
pop	ebp
retn	10h
sub_585620 endp

align 10h


; Attributes: bp-based frame

sub_585640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 72h
mov	esp, ebp
pop	ebp
retn
sub_585640 endp



; Attributes: bp-based frame

sub_585650 proc	near

var_4C=	dword ptr -4Ch

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
push	0
push	0FFFFFFFFh
mov	ecx, [ebp+var_4C]
call	sub_4A03C0
mov	eax, [ebp+var_4C]
mov	dword ptr [eax], offset	off_15B6F00
mov	ecx, [ebp+var_4C]
add	ecx, 44h
call	sub_590F40
mov	eax, [ebp+var_4C]
mov	esp, ebp
pop	ebp
retn
sub_585650 endp



; Attributes: bp-based frame

sub_585680 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_5021C0
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5856B0
push	5Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5856B0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_585680 endp

align 10h


; Attributes: bp-based frame

sub_5856C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 71h
mov	esp, ebp
pop	ebp
retn
sub_5856C0 endp



; Attributes: bp-based frame

sub_5856D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C22DC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5856F8
push	90h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5856F8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5856D0 endp

align 10h


; Attributes: bp-based frame

sub_585710 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 90h
mov	esp, ebp
pop	ebp
retn
sub_585710 endp



; Attributes: bp-based frame

sub_585720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_585720 endp

align 10h


; Attributes: bp-based frame

sub_585770 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_585770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+4], 0
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_1C], eax
mov	edx, [ebp+var_20]
add	edx, 8
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
push	offset sub_585720
push	4
push	18h
mov	ecx, [ebp+var_20]
add	ecx, 14h
push	ecx
call	sub_4078B0
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_585770 endp

align 10h


; Attributes: bp-based frame

sub_585820 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_10]
call	sub_402400
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, offset a__16 ; "_"
call	sub_402CB0
mov	edx, [ebp+arg_10]
push	edx
mov	edx, [ebp+arg_8]
call	sub_402CB0
mov	eax, [ebp+arg_10]
push	eax
mov	edx, offset a__16 ; "_"
call	sub_402CB0
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
call	sub_402CB0
mov	edx, [ebp+arg_10]
push	edx
mov	edx, offset a__16 ; "_"
call	sub_402CB0
mov	eax, [ebp+arg_10]
push	eax
mov	edx, [ebp+arg_4]
call	sub_402CB0
mov	ecx, [ebp+arg_10]
push	ecx
call	sub_455FE0
add	esp, 4
pop	ebp
retn
sub_585820 endp

align 10h


; Attributes: bp-based frame

sub_585890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5858B5
push	0Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5858B5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_585890 endp

align 10h


; Attributes: bp-based frame

sub_5858C0 proc	near

var_140= dword ptr -140h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= byte ptr -120h
var_F8=	dword ptr -0F8h
var_C8=	byte ptr -0C8h
var_A0=	dword ptr -0A0h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 140h
push	esi
mov	[ebp+var_140], ecx
mov	eax, [ebp+var_140]
mov	ecx, [eax+8]
mov	[ebp+var_12C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_128], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	eax, [ebp+var_12C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_128]
mov	[ebp+var_64], ecx
lea	ecx, [ebp+var_60]
call	sub_DDD7B0
lea	edx, [ebp+var_70]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_140]
mov	ecx, [eax+8]
mov	[ebp+var_134], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_130], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_134]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_130]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DA6B40
lea	edx, [ebp+var_38]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	eax, [ebp+var_40]
test	eax, eax
jz	loc_585A38
movzx	ecx, [ebp+var_8]
test	ecx, ecx
jnz	loc_585A38
push	offset aToggleoptionsm ; "ToggleOptionsMenu"
lea	ecx, [ebp+var_C8]
call	sub_110E550
push	offset aVisible	; "visible"
mov	edx, [ebp+var_A0]
lea	ecx, [ebp+var_A0]
mov	eax, [edx+30h]
call	eax
xor	cl, cl
mov	esi, eax
call	sub_401900
lea	ecx, [ebp+var_C8]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
push	offset aTogglerespawnd ; "ToggleRespawnDialog"
lea	ecx, [ebp+var_120]
call	sub_110E550
push	offset aVisible	; "visible"
mov	edx, [ebp+var_F8]
lea	ecx, [ebp+var_F8]
mov	eax, [edx+30h]
call	eax
mov	cl, 1
mov	esi, eax
call	sub_401900
lea	ecx, [ebp+var_120]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	edx, [ebp+var_120]
push	edx
call	sub_4093F0
lea	eax, [ebp+var_C8]
push	eax
call	sub_4093F0

loc_585A38:
mov	[ebp+var_124], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
mov	eax, [ebp+var_124]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5858C0 endp

align 10h


; Attributes: bp-based frame

sub_585A70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C72140
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_585A98
push	270h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_585A98:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_585A70 endp

align 10h


; Attributes: bp-based frame

sub_585AB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cx, [eax+0Ch]
mov	[edx+0Ch], cx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cx, [eax+0Eh]
mov	[edx+0Eh], cx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
add	edx, 14h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_4023E0
mov	eax, [ebp+arg_0]
add	eax, 3Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 64h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 64h
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
mov	[edx+90h], ecx
mov	eax, [eax+94h]
mov	[edx+94h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+98h]
mov	[ecx+98h], eax
mov	edx, [edx+9Ch]
mov	[ecx+9Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0A0h]
mov	[eax+0A0h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0A4h]
mov	[eax+0A4h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0A8h]
mov	[eax+0A8h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0ACh]
mov	[eax+0ACh], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0B0h]
mov	[eax+0B0h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0B4h]
mov	[eax+0B4h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0B8h]
mov	[eax+0B8h], edx
mov	ecx, [ecx+0BCh]
mov	[eax+0BCh], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0C0h]
mov	[edx+0C0h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0C4h]
mov	[edx+0C4h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0C8h]
mov	[edx+0C8h], ecx
mov	eax, [eax+0CCh]
mov	[edx+0CCh], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+0D0h]
mov	[ecx+0D0h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+0D4h]
mov	[ecx+0D4h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+0D8h]
mov	[ecx+0D8h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0DCh]
fstp	dword ptr [ecx+0DCh]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0E0h]
fstp	dword ptr [eax+0E0h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0E4h]
fstp	dword ptr [edx+0E4h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0E8h]
fstp	dword ptr [ecx+0E8h]
mov	eax, [ebp+arg_0]
add	eax, 0ECh
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0ECh
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 114h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 114h
call	sub_4ACB50
mov	edx, [ebp+arg_0]
add	edx, 120h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 120h
call	sub_4023E0
mov	eax, [ebp+arg_0]
add	eax, 148h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 148h
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+170h]
mov	[ecx+170h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+174h]
mov	[ecx+174h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+178h]
mov	[ecx+178h], eax
mov	edx, [edx+17Ch]
mov	[ecx+17Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 180h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 180h
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1A8h]
mov	[ecx+1A8h], eax
mov	edx, [edx+1ACh]
mov	[ecx+1ACh], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1B0h]
mov	[eax+1B0h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B8h]
mov	[eax+1B8h], edx
mov	ecx, [ecx+1BCh]
mov	[eax+1BCh], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_585AB0 endp

align 10h


; Attributes: bp-based frame

sub_585DD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 44h
mov	esp, ebp
pop	ebp
retn
sub_585DD0 endp



; Attributes: bp-based frame

sub_585DE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C0CA40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_585E03
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_585E03:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_585DE0 endp

align 10h


; Attributes: bp-based frame

sub_585E10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 78h
mov	esp, ebp
pop	ebp
retn
sub_585E10 endp



; Attributes: bp-based frame

sub_585E20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_435070
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 5Ch
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_F62C70
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_585E98
push	78h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_585E98:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_585E20 endp

align 10h


; Attributes: bp-based frame

sub_585EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 110h
mov	esp, ebp
pop	ebp
retn
sub_585EB0 endp



; Attributes: bp-based frame

sub_585EC0 proc	near

var_60=	dword ptr -60h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
call	sub_585F00
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_585EEA
push	110h
mov	ecx, [ebp+var_60]
push	ecx
call	sub_1111040
add	esp, 8

loc_585EEA:
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn	4
sub_585EC0 endp

align 10h


; Attributes: bp-based frame

sub_585F00 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
add	eax, 74h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_407E50
mov	ecx, [ebp+var_60]
add	ecx, 48h
call	sub_436CF0
mov	ecx, [ebp+var_60]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_585F00 endp

align 10h


; Attributes: bp-based frame

sub_585F40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_585F65
push	50h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_585F65:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_585F40 endp

align 10h


; Attributes: bp-based frame

sub_585F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 56h
mov	esp, ebp
pop	ebp
retn
sub_585F70 endp



; Attributes: bp-based frame

sub_585F80 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_585FB0
push	1
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx]
call	eax
mov	[ebp+var_38], eax
jmp	short loc_585FB7

loc_585FB0:
mov	[ebp+var_38], 0

loc_585FB7:
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_585FE8
push	1
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
call	edx
mov	[ebp+var_3C], eax
jmp	short loc_585FEF

loc_585FE8:
mov	[ebp+var_3C], 0

loc_585FEF:
mov	eax, [ebp+var_34]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_34]
mov	edx, [ecx+8]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_586021
push	1
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	ecx, [ebp+var_14]
mov	eax, [edx]
call	eax
mov	[ebp+var_40], eax
jmp	short loc_586028

loc_586021:
mov	[ebp+var_40], 0

loc_586028:
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_34]
mov	eax, [edx+0Ch]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_1C], ecx
cmp	[ebp+var_1C], 0
jz	short loc_58605A
push	1
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
call	edx
mov	[ebp+var_44], eax
jmp	short loc_586061

loc_58605A:
mov	[ebp+var_44], 0

loc_586061:
mov	eax, [ebp+var_34]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_34]
mov	edx, [ecx+10h]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jz	short loc_586093
push	1
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	ecx, [ebp+var_24]
mov	eax, [edx]
call	eax
mov	[ebp+var_48], eax
jmp	short loc_58609A

loc_586093:
mov	[ebp+var_48], 0

loc_58609A:
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_34]
mov	eax, [edx+14h]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5860CC
push	1
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	ecx, [ebp+var_2C]
mov	edx, [eax]
call	edx
mov	[ebp+var_4C], eax
jmp	short loc_5860D3

loc_5860CC:
mov	[ebp+var_4C], 0

loc_5860D3:
mov	eax, [ebp+var_34]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_585F80 endp

align 10h


; Attributes: bp-based frame

sub_5860F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1Fh
mov	esp, ebp
pop	ebp
retn
sub_5860F0 endp



; Attributes: bp-based frame

sub_586100 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [eax+30h]
mov	[ebp+var_44], ecx
mov	edx, [eax+34h]
mov	[ebp+var_40], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_44]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DA8CC0
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_38]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_3C], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn
sub_586100 endp

align 10h


; Attributes: bp-based frame

sub_586180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C21DC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5861A8
push	3E0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5861A8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586180 endp

align 10h


; Attributes: bp-based frame

sub_5861C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+20h]
fstp	dword ptr [ecx+20h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+24h]
fstp	dword ptr [eax+24h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+28h]
fstp	dword ptr [edx+28h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+2Ch]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5861C0 endp

align 10h


; Attributes: bp-based frame

sub_586250 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	edx, [edx+24h]
mov	[ecx+24h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	ecx, [ecx+34h]
mov	[eax+34h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586250 endp

align 10h


; Attributes: bp-based frame

sub_5862E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6Bh
mov	esp, ebp
pop	ebp
retn
sub_5862E0 endp



; Attributes: bp-based frame

sub_5862F0 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+4], 0
xor	edx, edx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[eax], edx
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+64h], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+1Ch], 0
xor	ecx, ecx
mov	edx, [ebp+var_8]
add	edx, 24h
mov	[edx], ecx
mov	[edx+4], ecx
mov	[edx+8], ecx
mov	[edx+0Ch], ecx
mov	[edx+10h], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax+38h], 0
mov	eax, [ebp+var_8]
add	eax, 3Ch
call	sub_402440
mov	eax, [ebp+var_8]
add	eax, 68h
call	sub_402440
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+90h], 0
mov	esp, ebp
pop	ebp
retn
sub_5862F0 endp

align 10h


; Attributes: bp-based frame

sub_586390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C21280
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5863B8
push	158h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5863B8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586390 endp

align 10h


; Attributes: bp-based frame

sub_5863D0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 3Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 68h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5863D0 endp

align 10h


; Attributes: bp-based frame

sub_586420 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_586445
push	7Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_586445:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586420 endp

align 10h


; Attributes: bp-based frame

sub_586450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3Bh
mov	esp, ebp
pop	ebp
retn
sub_586450 endp



; Attributes: bp-based frame

sub_586460 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 44h
call	sub_4A9770
mov	ecx, [ebp+var_58]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_586492
push	58h
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_586492:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_586460 endp

align 10h


; Attributes: bp-based frame

sub_5864A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 46h
mov	esp, ebp
pop	ebp
retn
sub_5864A0 endp



; Attributes: bp-based frame

sub_5864B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_14]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EC670
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B7130
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4FF700
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5864B0 endp

align 10h


; Attributes: bp-based frame

sub_586520 proc	near

var_6C=	dword ptr -6Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
add	ecx, 20h
call	sub_58F5B0
mov	ecx, [ebp+var_6C]
add	ecx, 4
call	sub_58F560
mov	eax, [ebp+var_6C]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_6C]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	esp, ebp
pop	ebp
retn
sub_586520 endp

align 10h


; Attributes: bp-based frame

sub_586560 proc	near

var_6C=	dword ptr -6Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
call	sub_586520
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_586585
mov	ecx, [ebp+var_6C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_586585:
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn	4
sub_586560 endp

align 10h


; Attributes: bp-based frame

sub_586590 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
mov	ecx, [eax+8]
mov	[ebp+var_4C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_48], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_40]
call	sub_401100
mov	[ebp+var_40], offset off_1558450
mov	eax, [ebp+var_4C]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_48]
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_30]
call	sub_DC4E10
mov	edx, [ebp+var_50]
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx+30h]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_40]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_44], 1
lea	ecx, [ebp+var_30]
call	sub_4087D0
lea	ecx, [ebp+var_40]
call	sub_401110
mov	eax, [ebp+var_44]
mov	esp, ebp
pop	ebp
retn
sub_586590 endp

align 10h


; Attributes: bp-based frame

sub_586620 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax+30h]
mov	[ebp+var_3C], ecx
mov	edx, [eax+34h]
mov	[ebp+var_38], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_30]
call	sub_401100
mov	[ebp+var_30], offset off_1599AE8
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_20]
call	sub_DCE8C0
lea	edx, [ebp+var_30]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_34], 1
lea	ecx, [ebp+var_20]
call	sub_4087D0
lea	ecx, [ebp+var_30]
call	sub_401110
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_586620 endp



; Attributes: bp-based frame

; int __stdcall	sub_586690(int,	int, float, char)
sub_586690 proc	near

var_14=	qword ptr -14h
var_C= dword ptr -0Ch
var_6= word ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_158181C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 1
mov	edx, [ebp+var_4]
mov	dword ptr [edx+14h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 0FFFFFFFFh
fld	[ebp+arg_8]
fmul	ds:flt_15BF168
fnstcw	[ebp+var_6]
movzx	eax, [ebp+var_6]
or	eax, 0C00h
mov	[ebp+var_C], eax
fldcw	word ptr [ebp+var_C]
fistp	[ebp+var_14]
fldcw	[ebp+var_6]
mov	ecx, dword ptr [ebp+var_14]
mov	edx, [ebp+var_4]
mov	[edx+1Ch], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+20h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+24h], 1
mov	edx, [ebp+var_4]
mov	byte ptr [edx+25h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+26h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+27h], 1
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15B5048
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_C]
mov	[eax+28h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	10h
sub_586690 endp

align 10h


; Attributes: bp-based frame

sub_586740 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= byte ptr	-8
var_7= byte ptr	-7

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	ecx, [eax+8]
mov	[ebp+var_40], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_3C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_40]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DD0C90
mov	[ebp+var_8], 1
mov	edx, [ebp+var_44]
mov	al, [edx+28h]
mov	[ebp+var_7], al
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_586740 endp

align 10h


; Attributes: bp-based frame

sub_5867C0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= byte ptr	-8
var_7= byte ptr	-7

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	ecx, [eax+8]
mov	[ebp+var_40], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_3C], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_40]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DD0C90
mov	[ebp+var_8], 0
mov	edx, [ebp+var_44]
mov	al, [edx+28h]
mov	[ebp+var_7], al
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_5867C0 endp

align 10h


; Attributes: bp-based frame

sub_586840 proc	near

var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [eax+8]
push	edx
lea	ecx, [ebp+var_38]
call	sub_42D6E0
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	eax, [ebp+var_8]
call	sub_420D20
test	eax, eax
jz	loc_58694C
call	sub_49FD50
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_8]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_3C]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_4C]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_5868CF
mov	eax, [ebp+var_48]
cmp	dword ptr [eax], 0
jz	short loc_5868B3
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
call	sub_40AA90

loc_5868B3:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_48]
cmp	dword ptr [edx], 0
jz	short loc_5868CF
mov	eax, [ebp+var_48]
mov	ecx, [eax]
call	sub_40AA80

loc_5868CF:
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+8], 4
mov	edx, [ebp+var_3C]
add	edx, 34h
mov	eax, dword_17EE158
mov	[edx], eax
mov	ecx, dword_17EE15C
mov	[edx+4], ecx
mov	eax, dword_17EE160
mov	[edx+8], eax
mov	ecx, dword_17EE164
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_3C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1Ch], xmm0
mov	eax, [ebp+var_3C]
movss	xmm0, ds:dword_1479C58
movss	dword ptr [eax+20h], xmm0
mov	ecx, [ebp+var_3C]
movss	xmm0, ds:dword_15FDA6C
movss	dword ptr [ecx+0Ch], xmm0
mov	edx, [ebp+var_3C]
push	edx		; int
push	ecx		; float
fld	ds:flt_15FDB3C
fstp	[esp+58h+var_58]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330

loc_58694C:
lea	ecx, [ebp+var_38]
call	sub_42D000
mov	esp, ebp
pop	ebp
retn
sub_586840 endp

align 10h


; Attributes: bp-based frame

sub_586960 proc	near

var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [eax+8]
push	edx
lea	ecx, [ebp+var_38]
call	sub_42D6E0
lea	eax, [ebp+var_38]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	eax, [ebp+var_8]
call	sub_420D20
test	eax, eax
jz	short loc_586A18
call	sub_49FD50
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_8]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_3C]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_4C]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_5869EB
mov	eax, [ebp+var_48]
cmp	dword ptr [eax], 0
jz	short loc_5869CF
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
call	sub_40AA90

loc_5869CF:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_48]
cmp	dword ptr [edx], 0
jz	short loc_5869EB
mov	eax, [ebp+var_48]
mov	ecx, [eax]
call	sub_40AA80

loc_5869EB:
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx+8], 4
mov	edx, [ebp+var_3C]
mov	byte ptr [edx+18h], 1
mov	eax, [ebp+var_3C]
push	eax		; int
push	ecx		; float
fld	ds:flt_15FDB3C
fstp	[esp+58h+var_58]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330

loc_586A18:
lea	ecx, [ebp+var_38]
call	sub_42D000
mov	esp, ebp
pop	ebp
retn	4
sub_586960 endp

align 10h


; Attributes: bp-based frame

sub_586A30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C44F20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_586A58
push	260h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_586A58:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586A30 endp

align 10h


; Attributes: bp-based frame

sub_586A70 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_30]
add	eax, 10h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_501020
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+28h]
mov	[edx+28h], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2Ch]
mov	[edx+2Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
mov	ecx, [edx+34h]
mov	edx, [ebp+var_30]
mov	[edx+30h], eax
mov	[edx+34h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	edx, [eax+3Ch]
mov	eax, [ebp+var_30]
mov	[eax+38h], ecx
mov	[eax+3Ch], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+40h]
mov	eax, [ecx+44h]
mov	ecx, [ebp+var_30]
mov	[ecx+40h], edx
mov	[ecx+44h], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	cl, [eax+48h]
mov	[edx+48h], cl
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	cl, [eax+49h]
mov	[edx+49h], cl
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	cl, [eax+4Ah]
mov	[edx+4Ah], cl
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_586A70 endp

align 10h


; Attributes: bp-based frame

sub_586B40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
call	sub_503940
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+28h]
mov	[edx+28h], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2Ch]
mov	[edx+2Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
mov	ecx, [edx+34h]
mov	edx, [ebp+var_8]
mov	[edx+30h], eax
mov	[edx+34h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	edx, [eax+3Ch]
mov	eax, [ebp+var_8]
mov	[eax+38h], ecx
mov	[eax+3Ch], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+40h]
mov	eax, [ecx+44h]
mov	ecx, [ebp+var_8]
mov	[ecx+40h], edx
mov	[ecx+44h], eax
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+48h]
mov	[edx+48h], cl
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+49h]
mov	[edx+49h], cl
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+4Ah]
mov	[edx+4Ah], cl
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_586B40 endp

align 10h


; Attributes: bp-based frame

sub_586C10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18]
call	sub_58F4E0
mov	ecx, [ebp+var_18]
add	ecx, 1Ch
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_14]
call	sub_58F4E0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_586C10 endp

align 10h


; Attributes: bp-based frame

sub_586C50 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_58F4E0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_586C50 endp

align 10h


; Attributes: bp-based frame

sub_586C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 64h
mov	esp, ebp
pop	ebp
retn
sub_586C70 endp



; Attributes: bp-based frame

sub_586C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E4h
mov	esp, ebp
pop	ebp
retn
sub_586C80 endp



; Attributes: bp-based frame

sub_586C90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C20CD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_586CB8
push	0E4h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_586CB8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586C90 endp

align 10h


; Attributes: bp-based frame

sub_586CD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_586CD0 endp

align 10h


; Attributes: bp-based frame

sub_586CF0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_586CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 80h
mov	[ebp+var_88], ecx
mov	ecx, 1397h
lea	eax, [ebp+var_1C]
call	sub_401100
mov	[ebp+var_4], 0
mov	[ebp+var_1C], offset off_155E05C
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_88]
mov	ecx, [eax+30h]
mov	[ebp+var_14], ecx
mov	edx, [eax+34h]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_1C]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	ecx, al
test	ecx, ecx
jz	loc_586E94
mov	edx, [ebp+var_88]
mov	eax, [edx+30h]
mov	[ebp+var_74], eax
mov	ecx, [edx+34h]
mov	[ebp+var_70], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_54]
call	sub_401100
mov	[ebp+var_54], offset off_1558464
mov	edx, [ebp+var_74]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_70]
mov	[ebp+var_48], eax
lea	ecx, [ebp+var_44]
call	sub_DD46F0
mov	[ebp+var_24], 0
mov	ecx, [ebp+var_88]
movss	xmm0, dword ptr	[ecx+38h]
movss	[ebp+var_20], xmm0
lea	edx, [ebp+var_54]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_64]
call	sub_49F360
mov	eax, [ebp+var_88]
movss	xmm0, dword ptr	[eax+38h]
addss	xmm0, ds:dword_15FCCC0
movss	[ebp+var_58], xmm0
push	38h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_68], eax
cmp	[ebp+var_68], 0
jz	short loc_586E49
mov	ecx, [ebp+var_88]
mov	edx, [ecx+30h]
mov	[ebp+var_84], edx
mov	eax, [ecx+34h]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_68]
call	sub_49F270
mov	ecx, [ebp+var_68]
mov	dword ptr [ecx], offset	off_15806A0
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_84]
mov	[edx+30h], eax
mov	ecx, [ebp+var_80]
mov	[edx+34h], ecx
mov	edx, [ebp+var_68]
mov	[ebp+var_8C], edx
jmp	short loc_586E53

loc_586E49:
mov	[ebp+var_8C], 0

loc_586E53:
mov	eax, [ebp+var_8C]
mov	[ebp+var_5C], eax
lea	ecx, [ebp+var_64]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_64]
call	sub_401110
lea	ecx, [ebp+var_44]
call	sub_4087D0
lea	ecx, [ebp+var_54]
call	sub_401110

loc_586E94:
mov	[ebp+var_6C], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_1C]
call	sub_401110
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_586CF0 endp

align 10h


; Attributes: bp-based frame

sub_586ED0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= byte ptr	-8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [eax+30h]
mov	[ebp+var_44], ecx
mov	edx, [eax+34h]
mov	[ebp+var_40], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_44]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DD46F0
mov	[ebp+var_8], 1
movss	xmm0, dword_17E9A74
movss	[ebp+var_4], xmm0
lea	edx, [ebp+var_38]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_3C], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn
sub_586ED0 endp

align 10h


; Attributes: bp-based frame

sub_586F60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BFE130
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_586F88
push	90h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_586F88:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586F60 endp

align 10h


; Attributes: bp-based frame

sub_586FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C20980
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_586FC8
push	0E0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_586FC8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586FA0 endp

align 10h


; Attributes: bp-based frame

sub_586FE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0Ah
mov	esp, ebp
pop	ebp
retn
sub_586FE0 endp



; Attributes: bp-based frame

sub_586FF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C9D090
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_587018
push	2A0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_587018:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_586FF0 endp

align 10h


; Attributes: bp-based frame

sub_587030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_17 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_587055
push	78h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_587055:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_587030 endp

align 10h


; Attributes: bp-based frame

sub_587060 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BFDDD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_587085
push	74h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_587085:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_587060 endp

align 10h


; Attributes: bp-based frame

sub_587090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 51h
mov	esp, ebp
pop	ebp
retn
sub_587090 endp



; Attributes: bp-based frame

sub_5870A0 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 44h
call	sub_5552D0
mov	ecx, [ebp+var_50]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5870D2
push	54h
mov	ecx, [ebp+var_50]
push	ecx
call	sub_1111040
add	esp, 8

loc_5870D2:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_5870A0 endp

align 10h


; Attributes: bp-based frame

sub_5870E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
mov	[ecx+30h], eax
mov	edx, [edx+34h]
mov	[ecx+34h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+38h]
mov	[eax+38h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+40h]
mov	[eax+40h], edx
mov	ecx, [ecx+44h]
mov	[eax+44h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+48h]
mov	[edx+48h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5870E0 endp

align 10h


; Attributes: bp-based frame

sub_587150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
mov	[ecx+30h], eax
mov	edx, [edx+34h]
mov	[ecx+34h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+38h]
mov	[eax+38h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+40h]
mov	[eax+40h], edx
mov	ecx, [ecx+44h]
mov	[eax+44h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+48h]
mov	[edx+48h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_587150 endp

align 10h


; Attributes: bp-based frame

sub_5871C0 proc	near

var_2C=	dword ptr -2Ch
var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 58h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_4]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 80h
call	sub_402390
lea	ecx, [ebp+var_4]
call	nullsub_1
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0A8h], xmm0
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0ACh], xmm0
mov	eax, [ebp+var_2C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0B0h], xmm0
lea	ecx, [ebp+var_5]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 0B4h
call	sub_4022A0
lea	ecx, [ebp+var_5]
call	nullsub_1
lea	ecx, [ebp+var_6]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 0CCh
call	sub_4022A0
lea	ecx, [ebp+var_6]
call	nullsub_1
lea	ecx, [ebp+var_7]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 0E4h
call	sub_4022A0
lea	ecx, [ebp+var_7]
call	nullsub_1
lea	ecx, [ebp+var_8]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_2C]
add	ecx, 0FCh
call	sub_4022A0
lea	ecx, [ebp+var_8]
call	nullsub_1
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+114h], 0FFFFFFFFh
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+118h], 0FFFFFFFFh
mov	eax, [ebp+var_2C]
mov	byte ptr [eax+11Ch], 0
mov	ecx, [ebp+var_2C]
mov	byte ptr [ecx+11Dh], 0
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_5871C0 endp

align 10h


; Attributes: bp-based frame

sub_587340 proc	near

var_4= dword ptr -4
arg_0= word ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cx, [ebp+arg_0]
mov	[eax+8], cx
mov	esp, ebp
pop	ebp
retn	4
sub_587340 endp

align 10h


; Attributes: bp-based frame

sub_587360 proc	near

var_4= dword ptr -4
arg_0= word ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cx, [ebp+arg_0]
mov	[eax+0Ah], cx
mov	esp, ebp
pop	ebp
retn	4
sub_587360 endp

align 10h


; Attributes: bp-based frame

sub_587380 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+10h]
call	eax
mov	esp, ebp
pop	ebp
retn	8
sub_587380 endp

align 10h


; Attributes: bp-based frame

sub_5873A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 32D6h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E564
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+1Ch], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+20h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+28h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+2Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5873A0 endp

align 10h


; Attributes: bp-based frame

sub_587460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 32DAh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F0
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_42B290
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+20h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_587460 endp

align 10h


; Attributes: bp-based frame

sub_5874A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_42B3C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5874D0
push	24h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5874D0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5874A0 endp

align 10h


; Attributes: bp-based frame

sub_5874E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 32DDh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F4
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+10h], 1
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+11h], 1
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5874E0 endp

align 10h


; Attributes: bp-based frame

sub_587530 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32DEh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5108
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587530 endp

align 10h


; Attributes: bp-based frame

sub_587590 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32DFh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5108
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587590 endp

align 10h


; Attributes: bp-based frame

sub_5875F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_587620
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_587620:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5875F0 endp

align 10h


; Attributes: bp-based frame

sub_587630 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 32E0h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F8
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_587630 endp

align 10h


; Attributes: bp-based frame

sub_5876A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 32E1h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F8
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5876A0 endp

align 10h


; Attributes: bp-based frame

sub_587710 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32E2h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5104
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+28h], xmm0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587710 endp

align 10h


; Attributes: bp-based frame

sub_587780 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	esp, ebp
pop	ebp
retn
sub_587780 endp

align 10h


; Attributes: bp-based frame

sub_5877A0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32E5h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B50FC
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_42B290
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 24h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
push	offset unk_1890F84
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	eax, [ebp+var_C]
mov	edx, [eax+10h]
mov	eax, [edx+4]
call	eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+40h], 0
mov	dword ptr [ecx+44h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+48h], 0
mov	dword ptr [edx+4Ch], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5877A0 endp

align 10h


; Attributes: bp-based frame

sub_587840 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_42B3C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58787B
push	50h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58787B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_587840 endp

align 10h


; Attributes: bp-based frame

sub_587890 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32E6h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5100
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_42B290
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 24h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
push	offset unk_1890F84
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	eax, [ebp+var_C]
mov	edx, [eax+10h]
mov	eax, [edx+4]
call	eax
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+3Ch], 1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587890 endp

align 10h


; Attributes: bp-based frame

sub_587910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_42B3C0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58794B
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58794B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_587910 endp

align 10h


; Attributes: bp-based frame

sub_587960 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32F0h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5104
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0FFFFFFFFh
mov	eax, [ebp+var_C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [eax+28h], xmm0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587960 endp

align 10h


; Attributes: bp-based frame

sub_5879D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_587A00
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_587A00:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5879D0 endp

align 10h


; Attributes: bp-based frame

sub_587A10 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32F1h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5104
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	byte ptr [eax+28h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587A10 endp

align 10h


; Attributes: bp-based frame

sub_587A70 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32F2h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5108
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587A70 endp

align 10h


; Attributes: bp-based frame

sub_587AD0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32F3h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5104
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0FFFFFFFFh
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+28h], xmm0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_587AD0 endp

align 10h


; Attributes: bp-based frame

sub_587B40 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax+30h]
mov	[ebp+var_3C], ecx
mov	edx, [eax+34h]
mov	[ebp+var_38], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_30]
call	sub_401100
mov	[ebp+var_30], offset off_1599AE8
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_20]
call	sub_DC25E0
lea	edx, [ebp+var_30]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_34], 1
lea	ecx, [ebp+var_20]
call	sub_4087D0
lea	ecx, [ebp+var_30]
call	sub_401110
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_587B40 endp



; Attributes: bp-based frame

sub_587BB0 proc	near

var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= byte ptr -194h
var_184= byte ptr -184h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= byte ptr -16Ch
var_15C= byte ptr -15Ch
var_14C= dword ptr -14Ch
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= byte ptr -13Ch
var_118= dword ptr -118h
var_114= byte ptr -114h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	byte ptr -0E4h
var_BC=	dword ptr -0BCh
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_5C=	dword ptr -5Ch
var_54=	byte ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_587BB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 234h
push	esi
mov	[ebp+var_22C], ecx
mov	eax, [ebp+var_22C]
mov	ecx, [eax+3Ch]
mov	[ebp+var_230], ecx
cmp	[ebp+var_230], 0
jz	short loc_587C0C
cmp	[ebp+var_230], 1
jz	loc_588265
cmp	[ebp+var_230], 2
jz	loc_5884E8
jmp	loc_588568

loc_587C0C:
mov	edx, [ebp+var_22C]
mov	eax, [edx+30h]
mov	[ebp+var_1A0], eax
mov	ecx, [edx+34h]
mov	[ebp+var_19C], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_44]
call	sub_401100
mov	[ebp+var_44], offset off_1558464
mov	edx, [ebp+var_1A0]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_19C]
mov	[ebp+var_38], eax
lea	ecx, [ebp+var_34]
call	sub_D95E70
lea	ecx, [ebp+var_44]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
movzx	edx, [ebp+var_14]
test	edx, edx
jnz	short loc_587C84
mov	eax, [ebp+var_22C]
movss	xmm0, dword ptr	[eax+4Ch]
comiss	xmm0, ds:dword_1577A6C
jbe	loc_588084

loc_587C84:
mov	ecx, [ebp+var_22C]
mov	edx, [ecx+8]
mov	[ebp+var_1A8], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_1A4], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_8C]
call	sub_401100
mov	[ebp+var_8C], offset off_1558464
mov	ecx, [ebp+var_1A8]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_1A4]
mov	[ebp+var_80], edx
lea	ecx, [ebp+var_7C]
call	sub_DABD20
mov	[ebp+var_5C], 3E8h
lea	eax, [ebp+var_8C]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	ecx, 274Eh
lea	eax, [ebp+var_F4]
call	sub_401100
mov	[ebp+var_F4], offset off_156E570
mov	[ebp+var_EC], 0
mov	[ebp+var_EC], 3E8h
lea	ecx, [ebp+var_F4]
push	ecx
push	0Fh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
push	offset aPushgamestate ;	"pushGameState"
lea	ecx, [ebp+var_E4]
call	sub_110E550
push	offset aState	; "state"
mov	edx, [ebp+var_BC]
lea	ecx, [ebp+var_BC]
mov	eax, [edx+30h]
call	eax
mov	ecx, offset aCelebration ; "Celebration"
mov	esi, eax
call	sub_401A00
push	offset aContext	; "context"
mov	edx, [ebp+var_BC]
lea	ecx, [ebp+var_BC]
mov	eax, [edx+30h]
call	eax
mov	[ebp+var_234], eax
mov	ecx, [ebp+var_22C]
mov	edx, [ecx+38h]
mov	eax, [edx+160h]
push	eax
push	offset aLot_0	; "LOT"
mov	ecx, [ebp+var_234]
mov	edx, [ecx]
mov	ecx, [ebp+var_234]
mov	eax, [edx+30h]
call	eax
mov	esi, eax
call	sub_401930
lea	ecx, [ebp+var_E4]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
call	sub_482550
mov	[ebp+var_E8], eax
push	ecx
fld1
fstp	[esp+248h+var_248]
push	ecx
fldz
fstp	[esp+24Ch+var_24C]
push	ecx
fldz
fstp	[esp+250h+var_250]
push	ecx
fldz
fstp	[esp+254h+var_254]
lea	ecx, [ebp+var_15C]
call	sub_40A410
mov	edx, [ebp+var_E8]
add	edx, 0Ch
mov	ecx, [eax]
mov	[edx], ecx
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
push	ecx
fldz
fstp	[esp+248h+var_248]
push	ecx
fldz
fstp	[esp+24Ch+var_24C]
push	ecx
fldz
fstp	[esp+250h+var_250]
push	ecx
fldz
fstp	[esp+254h+var_254]
lea	ecx, [ebp+var_16C]
call	sub_40A410
mov	ecx, [ebp+var_E8]
add	ecx, 1Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_E8]
mov	edx, [ebp+var_22C]
fld	dword ptr [edx+40h]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+var_E8]
mov	byte ptr [eax+30h], 0
mov	ecx, [ebp+var_E8]
push	ecx		; int
push	ecx		; float
fld	ds:dword_156F414
fstp	[esp+24Ch+var_24C]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330
lea	ecx, [ebp+var_54]
call	sub_49F360
mov	edx, [ebp+var_22C]
movss	xmm0, dword ptr	[edx+44h]
mulss	xmm0, ds:dword_14EF16C
mov	eax, [ebp+var_22C]
movss	xmm1, dword ptr	[eax+48h]
subss	xmm1, xmm0
mov	ecx, [ebp+var_22C]
subss	xmm1, dword ptr	[ecx+40h]
movss	[ebp+var_48], xmm1
push	50h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_170], eax
cmp	[ebp+var_170], 0
jz	loc_58801A
mov	edx, [ebp+var_22C]
mov	eax, [edx+8]
mov	[ebp+var_1CC], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_1C8], ecx
mov	edx, [ebp+var_22C]
mov	eax, [edx+30h]
mov	[ebp+var_1C4], eax
mov	ecx, [edx+34h]
mov	[ebp+var_1C0], ecx
mov	edx, [ebp+var_22C]
mov	eax, [edx+38h]
mov	[ebp+var_1BC], eax
mov	ecx, [ebp+var_22C]
movss	xmm0, dword ptr	[ecx+40h]
movss	[ebp+var_1B8], xmm0
mov	edx, [ebp+var_22C]
movss	xmm0, dword ptr	[edx+44h]
movss	[ebp+var_1B4], xmm0
mov	eax, [ebp+var_22C]
movss	xmm0, dword ptr	[eax+48h]
movss	[ebp+var_1B0], xmm0
mov	ecx, [ebp+var_170]
call	sub_49F270
mov	ecx, [ebp+var_170]
mov	dword ptr [ecx], offset	off_15B4F00
mov	edx, [ebp+var_170]
mov	eax, [ebp+var_1CC]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C8]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_170]
mov	eax, [ebp+var_1C4]
mov	[edx+30h], eax
mov	ecx, [ebp+var_1C0]
mov	[edx+34h], ecx
mov	edx, [ebp+var_170]
mov	eax, [ebp+var_1BC]
mov	[edx+38h], eax
mov	ecx, [ebp+var_170]
mov	dword ptr [ecx+3Ch], 1
mov	edx, [ebp+var_170]
movss	xmm0, [ebp+var_1B8]
movss	dword ptr [edx+40h], xmm0
mov	eax, [ebp+var_170]
movss	xmm0, [ebp+var_1B4]
movss	dword ptr [eax+44h], xmm0
mov	ecx, [ebp+var_170]
movss	xmm0, [ebp+var_1B0]
movss	dword ptr [ecx+48h], xmm0
mov	edx, [ebp+var_170]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+4Ch], xmm0
mov	eax, [ebp+var_170]
mov	[ebp+var_238], eax
jmp	short loc_588024

loc_58801A:
mov	[ebp+var_238], 0

loc_588024:
mov	ecx, [ebp+var_238]
mov	[ebp+var_4C], ecx
lea	edx, [ebp+var_54]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_54]
call	sub_401110
lea	eax, [ebp+var_E4]
push	eax
call	sub_4093F0
lea	ecx, [ebp+var_F4]
call	sub_401110
lea	ecx, [ebp+var_7C]
call	sub_4087D0
lea	ecx, [ebp+var_8C]
call	sub_401110
jmp	loc_588250

loc_588084:
lea	ecx, [ebp+var_104]
call	sub_49F360
movss	xmm0, dword_17E66B0
movss	[ebp+var_F8], xmm0
push	50h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_174], eax
cmp	[ebp+var_174], 0
jz	loc_58820C
mov	ecx, [ebp+var_22C]
mov	edx, [ecx+8]
mov	[ebp+var_1F8], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_1F4], eax
mov	ecx, [ebp+var_22C]
mov	edx, [ecx+30h]
mov	[ebp+var_1F0], edx
mov	eax, [ecx+34h]
mov	[ebp+var_1EC], eax
mov	ecx, [ebp+var_22C]
mov	edx, [ecx+38h]
mov	[ebp+var_1E8], edx
mov	eax, [ebp+var_22C]
movss	xmm0, dword ptr	[eax+40h]
movss	[ebp+var_1E4], xmm0
mov	ecx, [ebp+var_22C]
movss	xmm0, dword ptr	[ecx+44h]
movss	[ebp+var_1E0], xmm0
mov	edx, [ebp+var_22C]
movss	xmm0, dword ptr	[edx+48h]
movss	[ebp+var_1DC], xmm0
mov	eax, [ebp+var_22C]
movss	xmm0, dword ptr	[eax+4Ch]
addss	xmm0, dword_17E66B0
movss	[ebp+var_1D8], xmm0
mov	ecx, [ebp+var_174]
call	sub_49F270
mov	ecx, [ebp+var_174]
mov	dword ptr [ecx], offset	off_15B4F00
mov	edx, [ebp+var_174]
mov	eax, [ebp+var_1F8]
mov	[edx+8], eax
mov	ecx, [ebp+var_1F4]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_174]
mov	eax, [ebp+var_1F0]
mov	[edx+30h], eax
mov	ecx, [ebp+var_1EC]
mov	[edx+34h], ecx
mov	edx, [ebp+var_174]
mov	eax, [ebp+var_1E8]
mov	[edx+38h], eax
mov	ecx, [ebp+var_174]
mov	dword ptr [ecx+3Ch], 0
mov	edx, [ebp+var_174]
movss	xmm0, [ebp+var_1E4]
movss	dword ptr [edx+40h], xmm0
mov	eax, [ebp+var_174]
movss	xmm0, [ebp+var_1E0]
movss	dword ptr [eax+44h], xmm0
mov	ecx, [ebp+var_174]
movss	xmm0, [ebp+var_1DC]
movss	dword ptr [ecx+48h], xmm0
mov	edx, [ebp+var_174]
movss	xmm0, [ebp+var_1D8]
movss	dword ptr [edx+4Ch], xmm0
mov	eax, [ebp+var_174]
mov	[ebp+var_23C], eax
jmp	short loc_588216

loc_58820C:
mov	[ebp+var_23C], 0

loc_588216:
mov	ecx, [ebp+var_23C]
mov	[ebp+var_FC], ecx
lea	edx, [ebp+var_104]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_104]
call	sub_401110

loc_588250:
lea	ecx, [ebp+var_34]
call	sub_4087D0
lea	ecx, [ebp+var_44]
call	sub_401110
jmp	loc_588568

loc_588265:
call	sub_482550
mov	[ebp+var_118], eax
push	ecx
fldz
fstp	[esp+248h+var_248]
push	ecx
fldz
fstp	[esp+24Ch+var_24C]
push	ecx
fldz
fstp	[esp+250h+var_250]
push	ecx
fldz
fstp	[esp+254h+var_254]
lea	ecx, [ebp+var_184]
call	sub_40A410
mov	ecx, [ebp+var_118]
add	ecx, 0Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
push	ecx
fld1
fstp	[esp+248h+var_248]
push	ecx
fldz
fstp	[esp+24Ch+var_24C]
push	ecx
fldz
fstp	[esp+250h+var_250]
push	ecx
fldz
fstp	[esp+254h+var_254]
lea	ecx, [ebp+var_194]
call	sub_40A410
mov	ecx, [ebp+var_118]
add	ecx, 1Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_118]
mov	edx, [ebp+var_22C]
fld	dword ptr [edx+44h]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+var_118]
mov	byte ptr [eax+30h], 0
mov	ecx, [ebp+var_118]
push	ecx		; int
push	ecx		; float
fld	ds:dword_156F414
fstp	[esp+24Ch+var_24C]
push	0Fh		; int
call	sub_110D4C0
mov	ecx, eax
call	sub_110D330
lea	ecx, [ebp+var_114]
call	sub_49F360
mov	edx, [ebp+var_22C]
movss	xmm0, dword ptr	[edx+44h]
movss	[ebp+var_108], xmm0
push	50h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_198], eax
cmp	[ebp+var_198], 0
jz	loc_58849F
mov	eax, [ebp+var_22C]
mov	ecx, [eax+8]
mov	[ebp+var_220], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_21C], edx
mov	eax, [ebp+var_22C]
mov	ecx, [eax+30h]
mov	[ebp+var_218], ecx
mov	edx, [eax+34h]
mov	[ebp+var_214], edx
mov	eax, [ebp+var_22C]
mov	ecx, [eax+38h]
mov	[ebp+var_210], ecx
mov	edx, [ebp+var_22C]
movss	xmm0, dword ptr	[edx+40h]
movss	[ebp+var_20C], xmm0
mov	eax, [ebp+var_22C]
movss	xmm0, dword ptr	[eax+44h]
movss	[ebp+var_208], xmm0
mov	ecx, [ebp+var_22C]
movss	xmm0, dword ptr	[ecx+48h]
movss	[ebp+var_204], xmm0
mov	ecx, [ebp+var_198]
call	sub_49F270
mov	edx, [ebp+var_198]
mov	dword ptr [edx], offset	off_15B4F00
mov	eax, [ebp+var_198]
mov	ecx, [ebp+var_220]
mov	[eax+8], ecx
mov	edx, [ebp+var_21C]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_198]
mov	ecx, [ebp+var_218]
mov	[eax+30h], ecx
mov	edx, [ebp+var_214]
mov	[eax+34h], edx
mov	eax, [ebp+var_198]
mov	ecx, [ebp+var_210]
mov	[eax+38h], ecx
mov	edx, [ebp+var_198]
mov	dword ptr [edx+3Ch], 2
mov	eax, [ebp+var_198]
movss	xmm0, [ebp+var_20C]
movss	dword ptr [eax+40h], xmm0
mov	ecx, [ebp+var_198]
movss	xmm0, [ebp+var_208]
movss	dword ptr [ecx+44h], xmm0
mov	edx, [ebp+var_198]
movss	xmm0, [ebp+var_204]
movss	dword ptr [edx+48h], xmm0
mov	eax, [ebp+var_198]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+4Ch], xmm0
mov	ecx, [ebp+var_198]
mov	[ebp+var_240], ecx
jmp	short loc_5884A9

loc_58849F:
mov	[ebp+var_240], 0

loc_5884A9:
mov	edx, [ebp+var_240]
mov	[ebp+var_10C], edx
lea	eax, [ebp+var_114]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_114]
call	sub_401110
jmp	loc_588568

loc_5884E8:
mov	ecx, [ebp+var_22C]
mov	edx, [ecx+8]
mov	[ebp+var_228], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_224], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_14C]
call	sub_401100
mov	[ebp+var_14C], offset off_1599AE8
mov	ecx, [ebp+var_228]
mov	[ebp+var_144], ecx
mov	edx, [ebp+var_224]
mov	[ebp+var_140], edx
lea	ecx, [ebp+var_13C]
call	sub_D86B60
lea	eax, [ebp+var_14C]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_13C]
call	sub_4087D0
lea	ecx, [ebp+var_14C]
call	sub_401110

loc_588568:
mov	eax, 1
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_587BB0 endp

align 10h


; Attributes: bp-based frame

sub_588580 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_5906F0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_18]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_5885C1
mov	eax, [ebp+var_18]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5885C1:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_588580 endp

align 10h


; Attributes: bp-based frame

sub_5885D0 proc	near

var_84=	dword ptr -84h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
mov	ecx, [ebp+var_84]
call	sub_5886A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_588606
push	1F0h
mov	ecx, [ebp+var_84]
push	ecx
call	sub_1111040
add	esp, 8

loc_588606:
mov	eax, [ebp+var_84]
mov	esp, ebp
pop	ebp
retn	4
sub_5885D0 endp

align 10h


; Attributes: bp-based frame

sub_588620 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0FCh
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0E4h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0CCh
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0B4h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 80h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_588620 endp

align 10h


; Attributes: bp-based frame

sub_5886A0 proc	near

var_90=	dword ptr -90h
var_64=	dword ptr -64h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5886A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
add	eax, 1D4h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_594850
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_90]
add	ecx, 1C8h
call	sub_436CF0
mov	ecx, [ebp+var_90]
add	ecx, 1BCh
call	sub_5D2630
mov	ecx, [ebp+var_90]
add	ecx, 1B4h
call	sub_429100
mov	ecx, [ebp+var_90]
add	ecx, 1A8h
call	sub_590A80
mov	ecx, [ebp+var_90]
add	ecx, 190h
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_64]
call	sub_5946E0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_90]
add	ecx, 184h
call	sub_4A9770
mov	ecx, [ebp+var_90]
add	ecx, 17Ch
call	sub_59F960
mov	ecx, [ebp+var_90]
add	ecx, 174h
call	sub_402750
mov	ecx, [ebp+var_90]
add	ecx, 16Ch
call	sub_59F8F0
mov	ecx, [ebp+var_90]
add	ecx, 48h
call	sub_588620
mov	ecx, [ebp+var_90]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5886A0 endp

align 10h


; Attributes: bp-based frame

sub_5887C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_5887C0 endp

align 10h


; Attributes: bp-based frame

sub_5887E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 20h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	edx, [ebp+arg_0]
add	edx, 3Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+64h]
fstp	dword ptr [eax+64h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
mov	[edx+68h], ecx
mov	eax, [eax+6Ch]
mov	[edx+6Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+70h]
fstp	dword ptr [ecx+70h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+74h]
mov	[eax+74h], dl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5887E0 endp

align 10h


; Attributes: bp-based frame

sub_5888A0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5888A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_28]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_28]
add	edx, 8
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_28]
add	ecx, 0Ch
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_28]
add	eax, 18h
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_24]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_24]
add	eax, 8
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5888A0 endp

align 10h


; Attributes: bp-based frame

sub_588970 proc	near

var_F0=	dword ptr -0F0h

push	ebp
mov	ebp, esp
sub	esp, 0F0h
mov	[ebp+var_F0], ecx
mov	ecx, [ebp+var_F0]
add	ecx, 18h
call	sub_590860
mov	ecx, [ebp+var_F0]
add	ecx, 0Ch
call	sub_4A9770
mov	ecx, [ebp+var_F0]
call	sub_555750
mov	esp, ebp
pop	ebp
retn
sub_588970 endp

align 10h


; Attributes: bp-based frame

sub_5889B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_509250
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_503F10
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_59F630
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5889B0 endp



; Attributes: bp-based frame

sub_5889F0 proc	near

var_60=	dword ptr -60h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_60]
call	sub_4FFD40
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
push	ecx
mov	ecx, [ebp+var_60]
add	ecx, 0Ch
call	sub_4FECB0
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_60]
add	ecx, 18h
call	sub_5907B0
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn	4
sub_5889F0 endp

align 10h


; Attributes: bp-based frame

sub_588A40 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	esi, [ebp+var_C]
add	esi, 0Ch
xor	eax, eax
call	sub_41DF90
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_588A40 endp

align 10h


; Attributes: bp-based frame

sub_588A80 proc	near

var_18=	dword ptr -18h
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_18]
add	ecx, 2Ch
call	sub_5888A0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_588A80 endp

align 10h


; Attributes: bp-based frame

sub_588AC0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
add	eax, 2Ch
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
add	ecx, 18h
call	sub_590860
mov	ecx, [ebp+var_8C]
add	ecx, 0Ch
call	sub_4A9770
mov	ecx, [ebp+var_8C]
call	sub_555750
mov	ecx, [ebp+var_90]
add	ecx, 4
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_588AC0 endp

align 10h


; Attributes: bp-based frame

sub_588B20 proc	near

var_60=	dword ptr -60h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_60]
add	ecx, 4
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_60]
add	ecx, 2Ch
call	sub_5889F0
mov	edx, [ebp+var_60]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+50h]
fstp	dword ptr [edx+50h]
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn	4
sub_588B20 endp

align 10h


; Attributes: bp-based frame

sub_588B70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+arg_0]
add	eax, 30h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 58h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 80h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 80h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0A8h]
fstp	dword ptr [eax+0A8h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0ACh]
fstp	dword ptr [edx+0ACh]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+0B0h]
fstp	dword ptr [ecx+0B0h]
mov	eax, [ebp+arg_0]
add	eax, 0B4h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0B4h
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 0CCh
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 0CCh
call	sub_4022F0
mov	edx, [ebp+arg_0]
add	edx, 0E4h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 0E4h
call	sub_4022F0
mov	eax, [ebp+arg_0]
add	eax, 0FCh
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0FCh
call	sub_4022F0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+114h]
mov	[ecx+114h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+118h]
mov	[ecx+118h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+11Ch]
mov	[ecx+11Ch], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+11Dh]
mov	[ecx+11Dh], al
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_588B70 endp

align 10h


; Attributes: bp-based frame

sub_588CC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_18 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_588CE8
push	238h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_588CE8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_588CC0 endp

align 10h


; Attributes: bp-based frame

sub_588D00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_588D25
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_588D25:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_588D00 endp

align 10h


; Attributes: bp-based frame

sub_588D30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 24h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_588D30 endp

align 10h


; Attributes: bp-based frame

sub_588DA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+21h]
mov	[ecx+21h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+22h]
mov	[ecx+22h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	edx, [edx+2Ch]
mov	[ecx+2Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	ecx, [ecx+3Ch]
mov	[eax+3Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+40h]
mov	[edx+40h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+44h]
mov	[edx+44h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+48h]
mov	[edx+48h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+50h]
mov	[edx+50h], ecx
mov	eax, [eax+54h]
mov	[edx+54h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+58h]
mov	[ecx+58h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+5Ch]
mov	[ecx+5Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+60h]
mov	[ecx+60h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+61h]
mov	[ecx+61h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+64h]
mov	[ecx+64h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 68h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 68h
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
mov	[edx+90h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+94h]
mov	[edx+94h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+98h]
mov	[edx+98h], ecx
mov	edx, [ebp+arg_0]
add	edx, 9Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 9Ch
call	sub_597C20
mov	eax, [ebp+arg_0]
add	eax, 0A8h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0A8h
call	sub_597C20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_588DA0 endp

align 10h


; Attributes: bp-based frame

sub_588F30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BFD880
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_588F58
push	80h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_588F58:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_588F30 endp

align 10h


; Attributes: bp-based frame

sub_588F70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 52h
mov	esp, ebp
pop	ebp
retn
sub_588F70 endp



; Attributes: bp-based frame

sub_588F80 proc	near

var_30=	dword ptr -30h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
add	ecx, 48h
call	sub_538670
mov	ecx, [ebp+var_30]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_588FB5
push	118h
mov	ecx, [ebp+var_30]
push	ecx
call	sub_1111040
add	esp, 8

loc_588FB5:
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_588F80 endp

align 10h


; Attributes: bp-based frame

sub_588FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+arg_0]
add	eax, 30h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 30h
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 58h
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 58h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 80h
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 80h
call	sub_4023E0
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0A8h]
mov	[eax+0A8h], edx
mov	eax, [ebp+var_8]
add	eax, 0ACh
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0ACh
push	ecx
mov	ecx, [ebp+var_4]
call	sub_596A10
mov	edx, [ebp+arg_0]
add	edx, 0C4h
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 0C4h
call	sub_596F10
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_588FC0 endp

align 10h


; Attributes: bp-based frame

sub_589080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403400
mov	ecx, [ebp+var_8]
add	ecx, 28h
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_4]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_589080 endp



; Attributes: bp-based frame

sub_5890D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_4]
mov	[ecx+28h], edx
mov	[ecx+2Ch], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+31h]
mov	[edx+31h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5890D0 endp

align 10h


; Attributes: bp-based frame

sub_589120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5D0h
mov	esp, ebp
pop	ebp
retn
sub_589120 endp



; Attributes: bp-based frame

sub_589130 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= dword ptr -8
var_4= byte ptr	-4

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
mov	ecx, [eax+8]
mov	[ebp+var_7C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_78], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_70]
call	sub_401100
mov	[ebp+var_70], offset off_1558464
mov	eax, [ebp+var_7C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_78]
mov	[ebp+var_64], ecx
lea	ecx, [ebp+var_60]
call	sub_DCEA70
mov	edx, [ebp+var_88]
mov	eax, [edx+30h]
mov	[ebp+var_40], eax
lea	ecx, [ebp+var_70]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	edx, [ebp+var_88]
mov	eax, [edx+8]
mov	[ebp+var_84], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_80], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	edx, [ebp+var_84]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_2C], eax
lea	ecx, [ebp+var_28]
call	sub_D96310
mov	[ebp+var_8], 4
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_38]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_74], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
lea	ecx, [ebp+var_60]
call	sub_4087D0
lea	ecx, [ebp+var_70]
call	sub_401110
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn
sub_589130 endp

align 10h


; Attributes: bp-based frame

sub_589230 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [eax+8]
mov	[ebp+var_44], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_40], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_44]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DC2650
mov	[ebp+var_8], 0
lea	edx, [ebp+var_38]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_3C], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn
sub_589230 endp

align 10h


; Attributes: bp-based frame

sub_5892B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_501FF0
call	nullsub_1
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_1581938
mov	edx, [ebp+var_8]
push	edx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	esp, ebp
pop	ebp
retn
sub_5892B0 endp

align 10h


; Attributes: bp-based frame

sub_5892F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_5892B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_589315
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_589315:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5892F0 endp

align 10h


; Attributes: bp-based frame

sub_589320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C67BC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_589348
push	5D0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_589348:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_589320 endp

align 10h


; Attributes: bp-based frame

sub_589360 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
cmp	dword ptr [eax], 0
jz	short loc_589385
mov	ecx, [ebp+var_30]
mov	ecx, [ecx]
call	sub_40AA80

loc_589385:
mov	edx, [ebp+var_30]
add	edx, 4
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_2C]
call	sub_594950
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_589360 endp

align 10h


; Attributes: bp-based frame

sub_5893B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1_Locimp@locale@std@@MAE@XZ_1	; std::locale::_Locimp::~_Locimp(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5893D3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5893D3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5893B0 endp

align 10h


; Attributes: bp-based frame

sub_5893E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+arg_0]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_4022F0
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+48h]
mov	[edx+48h], ecx
mov	eax, [eax+4Ch]
mov	[edx+4Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+50h]
mov	[ecx+50h], al
mov	ecx, [ebp+arg_0]
add	ecx, 54h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5893E0 endp

align 10h


; Attributes: bp-based frame

sub_589490 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_407910
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_429100
mov	esp, ebp
pop	ebp
retn
sub_589490 endp

align 10h


; Attributes: bp-based frame

sub_5894E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+10h]
mov	[eax+10h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+11h]
mov	[eax+11h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+12h]
mov	[eax+12h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+13h]
mov	[eax+13h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Ch]
mov	[eax+1Ch], dl
mov	eax, [ebp+arg_0]
add	eax, 20h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+48h]
mov	[ecx+48h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+4Ch]
mov	[ecx+4Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5894E0 endp

align 10h


; Attributes: bp-based frame

sub_5895A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+arg_0]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_403850
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+48h]
mov	[edx+48h], ecx
mov	eax, [eax+4Ch]
mov	[edx+4Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+50h]
mov	[ecx+50h], al
mov	ecx, [ebp+arg_0]
add	ecx, 54h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_403400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5895A0 endp

align 10h


; Attributes: bp-based frame

sub_589650 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 60h
mov	esp, ebp
pop	ebp
retn
sub_589650 endp



; Attributes: bp-based frame

sub_589660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 54h
mov	esp, ebp
pop	ebp
retn
sub_589660 endp



; Attributes: bp-based frame

sub_589670 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 44h
call	sub_591390
mov	ecx, [ebp+var_50]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5896A2
push	54h
mov	ecx, [ebp+var_50]
push	ecx
call	sub_1111040
add	esp, 8

loc_5896A2:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_589670 endp

align 10h


; Attributes: bp-based frame

sub_5896B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 63h
mov	esp, ebp
pop	ebp
retn
sub_5896B0 endp



; Attributes: bp-based frame

sub_5896C0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_18=	dword ptr -18h
var_14=	dword ptr -14h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	ecx, [eax+30h]
mov	[ebp+var_54], ecx
mov	edx, [eax+34h]
mov	[ebp+var_50], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_48]
call	sub_401100
mov	[ebp+var_48], offset off_155845C
mov	eax, [ebp+var_54]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_50]
mov	[ebp+var_3C], ecx
lea	ecx, [ebp+var_38]
call	sub_DCC510
mov	edx, [ebp+var_58]
mov	eax, [edx+38h]
mov	[ebp+var_18], eax
mov	ecx, [edx+3Ch]
mov	[ebp+var_14], ecx
lea	edx, [ebp+var_48]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_4C], 1
lea	ecx, [ebp+var_38]
call	sub_4087D0
lea	ecx, [ebp+var_48]
call	sub_401110
mov	eax, [ebp+var_4C]
mov	esp, ebp
pop	ebp
retn
sub_5896C0 endp

align 10h


; Attributes: bp-based frame

sub_589740 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_49F310
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15B56E8
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], offset	off_1573C10
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
add	ecx, 10h
call	sub_407910
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_58979B
mov	eax, [ebp+var_10]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58979B:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_589740 endp

align 10h


; Attributes: bp-based frame

sub_5897B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C0BDC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5897D8
push	130h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5897D8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5897B0 endp

align 10h


; Attributes: bp-based frame

sub_5897F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 10h
mov	esp, ebp
pop	ebp
retn
sub_5897F0 endp



; Attributes: bp-based frame

sub_589800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4
sub_589800 endp

align 10h


; Attributes: bp-based frame

sub_589810 proc	near

var_3C=	dword ptr -3Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EC670
mov	edx, [ebp+var_3C]
mov	dword ptr [edx], offset	off_15B4808
mov	ecx, [ebp+var_3C]
add	ecx, 4
call	sub_4FF700
mov	ecx, [ebp+var_3C]
add	ecx, 20h
call	sub_4FF700
mov	ecx, [ebp+var_3C]
add	ecx, 3Ch
call	sub_4FF700
mov	ecx, [ebp+var_3C]
add	ecx, 58h
call	sub_58FE10
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn
sub_589810 endp

align 10h


; Attributes: bp-based frame

sub_589870 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
add	eax, 58h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_593990
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_30]
add	ecx, 3Ch
call	sub_58FDC0
mov	ecx, [ebp+var_30]
add	ecx, 20h
call	sub_58FDC0
mov	ecx, [ebp+var_30]
add	ecx, 4
call	sub_58FD70
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx], offset	off_1581938
mov	edx, [ebp+var_30]
push	edx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	esp, ebp
pop	ebp
retn
sub_589870 endp

align 10h


; Attributes: bp-based frame

sub_5898E0 proc	near

var_28=	dword ptr -28h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
call	sub_589870
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_589905
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_589905:
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_5898E0 endp

align 10h


; Attributes: bp-based frame

sub_589910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D556F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_589938
push	188h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_589938:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_589910 endp

align 10h


; Attributes: bp-based frame

sub_589950 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	eax, [eax+14h]
mov	[edx+14h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	ax, [edx+1Ch]
mov	[ecx+1Ch], ax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx+24h]
mov	[ecx+24h], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
mov	edx, [ebp+var_C]
add	edx, 28h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_0]
add	edx, 34h
mov	eax, [ebp+var_C]
add	eax, 34h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+44h]
mov	[eax+44h], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+45h]
mov	[eax+45h], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+46h]
mov	[eax+46h], dl
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+48h]
mov	[eax+48h], edx
mov	eax, [ebp+arg_0]
add	eax, 4Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 4Ch
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_4]
call	sub_46B470
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_589950 endp

align 10h


; Attributes: bp-based frame

sub_589A60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D64AD0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_589A88
push	1A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_589A88:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_589A60 endp

align 10h


; Attributes: bp-based frame

sub_589AA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	edx, [edx+24h]
mov	[ecx+24h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	ecx, [ecx+2Ch]
mov	[eax+2Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+30h]
mov	[edx+30h], ecx
mov	eax, [eax+34h]
mov	[edx+34h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+38h]
mov	[ecx+38h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+3Ch]
mov	[ecx+3Ch], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+3Dh]
mov	[ecx+3Dh], al
mov	ecx, [ebp+arg_0]
add	ecx, 40h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_589B70
mov	edx, [ebp+arg_0]
add	edx, 0E8h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 0E8h
call	sub_589C20
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_589AA0 endp



; Attributes: bp-based frame

sub_589B70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+60h]
mov	[eax+60h], edx
mov	ecx, [ecx+64h]
mov	[eax+64h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
mov	[edx+68h], ecx
mov	eax, [eax+6Ch]
mov	[edx+6Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 70h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 98h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 98h
call	sub_503F10
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_589B70 endp

align 10h


; Attributes: bp-based frame

sub_589C20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 14h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_1011130
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+3Ch]
mov	[edx+3Ch], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+3Dh]
mov	[edx+3Dh], cl
mov	edx, [ebp+arg_0]
add	edx, 40h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 40h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+68h]
mov	[eax+68h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+6Ch]
mov	[eax+6Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_589C20 endp

align 10h


; Attributes: bp-based frame

sub_589CC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_589CFD
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
sub	eax, 4
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
xor	ecx, ecx
mov	[ebp+var_1], cl

loc_589CFD:
mov	esp, ebp
pop	ebp
retn
sub_589CC0 endp

align 10h


; Attributes: bp-based frame

sub_589D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	3Fh
mov	ecx, [ebp+var_4]
add	ecx, 114h
mov	eax, [ebp+var_4]
mov	edx, [eax+114h]
mov	eax, [edx+8]
call	eax
push	0
mov	ecx, [ebp+var_4]
add	ecx, 12Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+12Ch]
mov	edx, [eax+8]
call	edx
mov	esp, ebp
pop	ebp
retn
sub_589D10 endp

align 10h


; Attributes: bp-based frame

sub_589D50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	ecx, [ebp+var_4]
add	ecx, 114h
mov	eax, [ebp+var_4]
mov	edx, [eax+114h]
mov	eax, [edx+8]
call	eax
push	0FFh
mov	ecx, [ebp+var_4]
add	ecx, 12Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+12Ch]
mov	edx, [eax+8]
call	edx
mov	esp, ebp
pop	ebp
retn
sub_589D50 endp



; Attributes: bp-based frame

sub_589D90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+118h], 0
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_589DCE
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+118h], 3Fh
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_589DCE
mov	[ebp+var_8], 1
jmp	short loc_589DD5

loc_589DCE:
mov	[ebp+var_8], 0

loc_589DD5:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_589D90 endp

align 10h


; Attributes: bp-based frame

sub_589DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+130h], 0
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_589E21
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+130h], 0FFh
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_589E21
mov	[ebp+var_8], 1
jmp	short loc_589E28

loc_589E21:
mov	[ebp+var_8], 0

loc_589E28:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_589DE0 endp

align 10h


; Attributes: bp-based frame

sub_589E30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+118h], 0
setnle	cl
movzx	edx, cl
test	edx, edx
jz	short loc_589E6E
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+118h], 3Fh
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_589E6E
mov	[ebp+var_8], 1
jmp	short loc_589E75

loc_589E6E:
mov	[ebp+var_8], 0

loc_589E75:
movzx	eax, byte ptr [ebp+var_8]
test	eax, eax
jnz	short loc_589ECD
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	dword ptr [ecx+130h], 0
setnle	dl
movzx	eax, dl
test	eax, eax
jz	short loc_589EB5
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	dword ptr [ecx+130h], 0FFh
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_589EB5
mov	[ebp+var_C], 1
jmp	short loc_589EBC

loc_589EB5:
mov	[ebp+var_C], 0

loc_589EBC:
movzx	ecx, byte ptr [ebp+var_C]
test	ecx, ecx
jnz	short loc_589ECD
mov	[ebp+var_10], 0
jmp	short loc_589ED4

loc_589ECD:
mov	[ebp+var_10], 1

loc_589ED4:
mov	al, byte ptr [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_589E30 endp

align 10h


; Attributes: bp-based frame

sub_589EE0 proc	near

var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	byte ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	byte ptr -0A4h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_4C=	byte ptr -4Ch
var_44=	byte ptr -44h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_589EE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0F8h
mov	[ebp+var_100], ecx
mov	eax, [ebp+var_100]
mov	ecx, [eax+34h]
push	ecx
mov	edx, [eax+30h]
push	edx
lea	ecx, [ebp+var_44]
call	sub_42D6E0
lea	eax, [ebp+var_44]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	eax, [ebp+var_14]
call	sub_420D20
test	eax, eax
jz	loc_58A0A7
mov	ecx, [ebp+var_100]
mov	edx, [ecx+8]
mov	[ebp+var_D4], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_D0], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_7C]
call	sub_401100
mov	[ebp+var_7C], offset off_1599C5C
mov	ecx, [ebp+var_D4]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_D0]
mov	[ebp+var_70], edx
lea	ecx, [ebp+var_6C]
call	sub_E10900
lea	eax, [ebp+var_14]
mov	[ebp+var_DC], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_DC]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_589FE6
mov	edx, [ebp+var_D8]
cmp	dword ptr [edx], 0
jz	short loc_589FBE
mov	eax, [ebp+var_D8]
mov	ecx, [eax]
call	sub_40AA90

loc_589FBE:
mov	ecx, [ebp+var_D8]
mov	edx, [ebp+var_DC]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_D8]
cmp	dword ptr [ecx], 0
jz	short loc_589FE6
mov	edx, [ebp+var_D8]
mov	ecx, [edx]
call	sub_40AA80

loc_589FE6:
lea	eax, [ebp+var_7C]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	ecx, [ebp+var_100]
mov	edx, [ecx+8]
mov	[ebp+var_E4], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_E0], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_B4]
call	sub_401100
mov	[ebp+var_B4], offset off_1558464
mov	ecx, [ebp+var_E4]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_E0]
mov	[ebp+var_A8], edx
lea	ecx, [ebp+var_A4]
call	sub_DD73C0
lea	eax, [ebp+var_B4]
push	eax
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_A4]
call	sub_4087D0
lea	ecx, [ebp+var_B4]
call	sub_401110
lea	ecx, [ebp+var_6C]
mov	[ebp+var_E8], ecx
mov	ecx, [ebp+var_E8]
add	ecx, 20h
call	sub_429100
mov	ecx, [ebp+var_E8]
call	sub_4087D0
lea	ecx, [ebp+var_7C]
call	sub_401110
jmp	loc_58A1A8

loc_58A0A7:
lea	ecx, [ebp+var_C4]
call	sub_49F360
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_B8], xmm0
push	38h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_C8], eax
cmp	[ebp+var_C8], 0
jz	loc_58A164
mov	edx, [ebp+var_100]
mov	eax, [edx+8]
mov	[ebp+var_FC], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_F8], ecx
mov	edx, [ebp+var_100]
mov	eax, [edx+30h]
mov	[ebp+var_F4], eax
mov	ecx, [edx+34h]
mov	[ebp+var_F0], ecx
mov	ecx, [ebp+var_C8]
call	sub_49F270
mov	edx, [ebp+var_C8]
mov	dword ptr [edx], offset	off_15B53F0
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_F4]
mov	[eax+30h], ecx
mov	edx, [ebp+var_F0]
mov	[eax+34h], edx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_FC]
mov	[eax+8], ecx
mov	edx, [ebp+var_F8]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_C8]
mov	[ebp+var_104], eax
jmp	short loc_58A16E

loc_58A164:
mov	[ebp+var_104], 0

loc_58A16E:
mov	ecx, [ebp+var_104]
mov	[ebp+var_BC], ecx
lea	edx, [ebp+var_C4]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_C4]
call	sub_401110

loc_58A1A8:
mov	[ebp+var_CC], 1
lea	ecx, [ebp+var_44]
call	sub_42D000
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_589EE0 endp

align 10h


; Attributes: bp-based frame

sub_58A1D0 proc	near

var_B0=	dword ptr -0B0h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_B0], ecx
mov	ecx, [ebp+var_B0]
call	sub_58A220
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A206
push	130h
mov	ecx, [ebp+var_B0]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A206:
mov	eax, [ebp+var_B0]
mov	esp, ebp
pop	ebp
retn	4
sub_58A1D0 endp

align 10h


; Attributes: bp-based frame

sub_58A220 proc	near

var_B0=	dword ptr -0B0h

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_B0], ecx
mov	ecx, [ebp+var_B0]
add	ecx, 100h
call	sub_407E50
mov	ecx, [ebp+var_B0]
add	ecx, 0E8h
call	sub_4A9770
mov	ecx, [ebp+var_B0]
add	ecx, 0DCh
call	sub_436CF0
mov	ecx, [ebp+var_B0]
add	ecx, 4Ch
call	sub_407E50
mov	ecx, [ebp+var_B0]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58A220 endp

align 10h


; Attributes: bp-based frame

sub_58A280 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 88h
mov	esp, ebp
pop	ebp
retn
sub_58A280 endp



; Attributes: bp-based frame

sub_58A290 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 58h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_F62C70
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_58A2EE
push	88h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_58A2EE:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_58A290 endp

align 10h


; Attributes: bp-based frame

sub_58A310 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6Dh
mov	esp, ebp
pop	ebp
retn
sub_58A310 endp



; Attributes: bp-based frame

sub_58A320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 25h
mov	esp, ebp
pop	ebp
retn
sub_58A320 endp



; Attributes: bp-based frame

sub_58A330 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_14]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EC670
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B5460
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 14h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_58A330 endp

align 10h


; Attributes: bp-based frame

sub_58A3B0 proc	near

var_50=	dword ptr -50h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
add	ecx, 14h
call	sub_407E50
mov	ecx, [ebp+var_50]
add	ecx, 4
call	sub_591390
mov	eax, [ebp+var_50]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_50]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	esp, ebp
pop	ebp
retn
sub_58A3B0 endp

align 10h


; Attributes: bp-based frame

sub_58A3F0 proc	near

var_50=	dword ptr -50h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_50]
call	sub_58A3B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A415
mov	ecx, [ebp+var_50]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58A415:
mov	eax, [ebp+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_58A3F0 endp

align 10h


; Attributes: bp-based frame

sub_58A420 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BFC990
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A445
push	50h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A445:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58A420 endp

align 10h


; Attributes: bp-based frame

sub_58A450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 53h
mov	esp, ebp
pop	ebp
retn
sub_58A450 endp



; Attributes: bp-based frame

sub_58A460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0E0h
mov	esp, ebp
pop	ebp
retn
sub_58A460 endp



; Attributes: bp-based frame

sub_58A470 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C0B410
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A498
push	0E0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A498:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58A470 endp

align 10h


; Attributes: bp-based frame

sub_58A4B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A4D8
push	90h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A4D8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58A4B0 endp

align 10h
; [0000000F BYTES: COLLAPSED FUNCTION unknown_libname_13. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_58A500 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D1BE50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A528
push	0C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A528:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58A500 endp

align 10h


; Attributes: bp-based frame

sub_58A540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 128h
mov	esp, ebp
pop	ebp
retn
sub_58A540 endp



; Attributes: bp-based frame

sub_58A550 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
add	ecx, 8Ch
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_30]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_34]
add	ecx, 8Ch
call	sub_5C3120
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_30]
setnz	al
mov	[ebp+var_35], al
mov	al, [ebp+var_35]
mov	esp, ebp
pop	ebp
retn	4
sub_58A550 endp

align 10h


; Attributes: bp-based frame

sub_58A5C0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+4], 0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_58A5C0 endp

align 10h


; Attributes: bp-based frame

sub_58A620 proc	near

var_64=	dword ptr -64h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	dword ptr [eax], offset	off_15B5700
mov	ecx, [ebp+var_64]
add	ecx, 110h
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489010
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_64]
add	ecx, 0E4h
call	sub_407E50
mov	edx, [ebp+var_64]
add	edx, 8Ch
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_8]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_64]
add	ecx, 64h
call	sub_407E50
mov	ecx, [ebp+var_64]
add	ecx, 44h
call	sub_436CF0
mov	ecx, [ebp+var_64]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58A620 endp

align 10h


; Attributes: bp-based frame

sub_58A6B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 130h
mov	esp, ebp
pop	ebp
retn
sub_58A6B0 endp



; Attributes: bp-based frame

sub_58A6C0 proc	near

var_64=	dword ptr -64h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_64]
call	sub_58A620
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A6EA
push	130h
mov	ecx, [ebp+var_64]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A6EA:
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	4
sub_58A6C0 endp

align 10h


; Attributes: bp-based frame

sub_58A700 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_CD93E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A728
push	128h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A728:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58A700 endp

align 10h


; Attributes: bp-based frame

sub_58A740 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 4
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 2Ch
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_58A740 endp

align 10h


; Attributes: bp-based frame

sub_58A790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_502210
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_1581938
mov	edx, [ebp+var_8]
push	edx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	esp, ebp
pop	ebp
retn
sub_58A790 endp

align 10h


; Attributes: bp-based frame

sub_58A7E0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_58A790
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A805
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58A805:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_58A7E0 endp

align 10h


; Attributes: bp-based frame

sub_58A810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 26h
mov	esp, ebp
pop	ebp
retn
sub_58A810 endp



; Attributes: bp-based frame

sub_58A820 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0C8h
mov	esp, ebp
pop	ebp
retn
sub_58A820 endp



; Attributes: bp-based frame

sub_58A830 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 50h
call	sub_F77990
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A863
push	0C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A863:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58A830 endp

align 10h


; Attributes: bp-based frame

sub_58A870 proc	near

var_DC=	dword ptr -0DCh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	ecx, [ebp+var_DC]
call	sub_58A8C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A8A6
push	108h
mov	ecx, [ebp+var_DC]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A8A6:
mov	eax, [ebp+var_DC]
mov	esp, ebp
pop	ebp
retn	4
sub_58A870 endp

align 10h


; Attributes: bp-based frame

sub_58A8C0 proc	near

var_108= dword ptr -108h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_108], ecx
mov	ecx, [ebp+var_108]
add	ecx, 0F0h
call	sub_407910
mov	ecx, [ebp+var_108]
add	ecx, 0D8h
call	sub_407910
mov	ecx, [ebp+var_108]
add	ecx, 0C0h
call	sub_407910
mov	ecx, [ebp+var_108]
add	ecx, 94h
call	sub_58F210
mov	ecx, [ebp+var_108]
add	ecx, 88h
call	sub_436CF0
mov	ecx, [ebp+var_108]
add	ecx, 70h
call	sub_58F190
mov	ecx, [ebp+var_108]
add	ecx, 64h
call	sub_58F0A0
mov	ecx, [ebp+var_108]
add	ecx, 44h
call	sub_BEBF00
mov	ecx, [ebp+var_108]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58A8C0 endp

align 10h


; Attributes: bp-based frame

sub_58A960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C5F240
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58A988
push	450h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58A988:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58A960 endp

align 10h


; Attributes: bp-based frame

sub_58A9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_58A9A0 endp

align 10h


; Attributes: bp-based frame

sub_58A9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 3Dh
mov	esp, ebp
pop	ebp
retn
sub_58A9E0 endp



; Attributes: bp-based frame

sub_58A9F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2A8h
mov	esp, ebp
pop	ebp
retn
sub_58A9F0 endp



; Attributes: bp-based frame

sub_58AA00 proc	near

var_9C=	dword ptr -9Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	ecx, [ebp+var_9C]
call	sub_58AA50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58AA36
push	0A8h
mov	ecx, [ebp+var_9C]
push	ecx
call	sub_1111040
add	esp, 8

loc_58AA36:
mov	eax, [ebp+var_9C]
mov	esp, ebp
pop	ebp
retn	4
sub_58AA00 endp

align 10h


; Attributes: bp-based frame

sub_58AA50 proc	near

var_9C=	dword ptr -9Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	ecx, [ebp+var_9C]
add	ecx, 9Ch
call	sub_58F210
mov	ecx, [ebp+var_9C]
add	ecx, 84h
call	sub_591560
mov	ecx, [ebp+var_9C]
add	ecx, 50h
call	sub_407E50
mov	ecx, [ebp+var_9C]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58AA50 endp

align 10h


; Attributes: bp-based frame

sub_58AAA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_401EF0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_58AAA0 endp

align 10h


; Attributes: bp-based frame

sub_58AAE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C19B20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58AB08
push	0F0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58AB08:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58AAE0 endp

align 10h


; Attributes: bp-based frame

sub_58AB20 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
add	eax, 4
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
add	ecx, 34h
call	sub_10111A0
mov	ecx, [ebp+var_1C]
add	ecx, 1Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_58AB93
mov	eax, [ebp+var_20]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58AB93:
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_58AB20 endp

align 10h


; Attributes: bp-based frame

sub_58ABB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1Ch
mov	esp, ebp
pop	ebp
retn
sub_58ABB0 endp



; Attributes: bp-based frame

sub_58ABC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58ABE5
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58ABE5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58ABC0 endp

align 10h


; Attributes: bp-based frame

sub_58ABF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 4Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58AC23
push	94h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58AC23:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58ABF0 endp

align 10h


; Attributes: bp-based frame

sub_58AC30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 61h
mov	esp, ebp
pop	ebp
retn
sub_58AC30 endp



; Attributes: bp-based frame

sub_58AC40 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 2Ch
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 54h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_58AC40 endp

align 10h


; Attributes: bp-based frame

sub_58ACB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C8BEC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58ACD8
push	80h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58ACD8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58ACB0 endp

align 10h


; Attributes: bp-based frame

sub_58ACF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 94h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_F6DBF0
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58AD31
push	0C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58AD31:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58ACF0 endp

align 10h


; Attributes: bp-based frame

sub_58AD40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	edx, [edx+24h]
mov	[ecx+24h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	ecx, [ecx+2Ch]
mov	[eax+2Ch], ecx
mov	edx, [ebp+arg_0]
add	edx, 30h
mov	eax, [ebp+var_4]
add	eax, 30h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+40h]
mov	[eax+40h], edx
mov	ecx, [ecx+44h]
mov	[eax+44h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58AD40 endp

align 10h


; Attributes: bp-based frame

sub_58ADE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58AE08
push	84h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58AE08:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58ADE0 endp

align 10h


; Attributes: bp-based frame

sub_58AE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1Ah
mov	esp, ebp
pop	ebp
retn
sub_58AE20 endp



; Attributes: bp-based frame

sub_58AE30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C09970
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58AE58
push	0C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58AE58:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58AE30 endp

align 10h


; Attributes: bp-based frame

sub_58AE70 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_8C=	dword ptr -8Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	eax, [ebp+var_DC]
mov	ecx, [eax+30h]
mov	[ebp+var_CC], ecx
mov	edx, [eax+34h]
mov	[ebp+var_C8], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_CC]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DB98F0
lea	edx, [ebp+var_38]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	eax, [ebp+var_DC]
mov	ecx, [eax+38h]
cmp	ecx, [ebp+var_8]
jnz	loc_58AF8D
mov	edx, [ebp+var_DC]
mov	eax, [edx+30h]
mov	[ebp+var_D4], eax
mov	ecx, [edx+34h]
mov	[ebp+var_D0], ecx
mov	ecx, 138Bh
lea	eax, [ebp+var_C0]
call	sub_401100
mov	[ebp+var_C0], offset off_1599A8C
mov	edx, [ebp+var_D4]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_D0]
mov	[ebp+var_B4], eax
lea	ecx, [ebp+var_B0]
call	sub_E7A060
mov	[ebp+var_8C], 0
lea	ecx, [ebp+var_C0]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	edx, [ebp+var_B0]
mov	[ebp+var_D8], edx
mov	ecx, [ebp+var_D8]
add	ecx, 4Ch
call	sub_407910
mov	ecx, [ebp+var_D8]
call	sub_4087D0
lea	ecx, [ebp+var_C0]
call	sub_401110

loc_58AF8D:
mov	[ebp+var_C4], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	eax, [ebp+var_C4]
mov	esp, ebp
pop	ebp
retn
sub_58AE70 endp

align 10h


; Attributes: bp-based frame

sub_58AFC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C8B230
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58AFE5
push	70h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58AFE5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58AFC0 endp

align 10h


; Attributes: bp-based frame

sub_58AFF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1_Locimp@locale@std@@UAE@XZ_2	; std::locale::_Locimp::~_Locimp(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B018
push	348h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58B018:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58AFF0 endp

align 10h


; Attributes: bp-based frame

sub_58B030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2Fh
mov	esp, ebp
pop	ebp
retn
sub_58B030 endp



; Attributes: bp-based frame

sub_58B040 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [eax+30h]
mov	[ebp+var_44], ecx
mov	edx, [eax+34h]
mov	[ebp+var_40], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_38]
call	sub_401100
mov	[ebp+var_38], offset off_1558464
mov	eax, [ebp+var_44]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_2C], ecx
lea	ecx, [ebp+var_28]
call	sub_DC2650
mov	[ebp+var_8], 0
lea	edx, [ebp+var_38]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_3C], 1
lea	ecx, [ebp+var_28]
call	sub_4087D0
lea	ecx, [ebp+var_38]
call	sub_401110
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn
sub_58B040 endp

align 10h


; Attributes: bp-based frame

sub_58B0C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C09850
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B0E8
push	238h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58B0E8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B0C0 endp

align 10h


; Attributes: bp-based frame

sub_58B100 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 98h
mov	esp, ebp
pop	ebp
retn
sub_58B100 endp



; Attributes: bp-based frame

sub_58B110 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1_Locimp@locale@std@@UAE@XZ_1	; std::locale::_Locimp::~_Locimp(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B138
push	98h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58B138:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B110 endp

align 10h


; Attributes: bp-based frame

sub_58B150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 19h
mov	esp, ebp
pop	ebp
retn
sub_58B150 endp



; Attributes: bp-based frame

sub_58B160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 118h
mov	esp, ebp
pop	ebp
retn
sub_58B160 endp



; Attributes: bp-based frame

sub_58B170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+0D0h]
and	ecx, 2
setnz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_58B195
mov	ecx, [ebp+var_4]
call	sub_C5C480

loc_58B195:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0D0h]
and	edx, 4
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_58B1B3
mov	ecx, [ebp+var_4]
call	sub_C5C4C0

loc_58B1B3:
mov	edx, [ebp+var_4]
mov	eax, [edx+0D0h]
and	eax, 0FFFFFFFAh
or	eax, 2
mov	ecx, [ebp+var_4]
mov	[ecx+0D0h], eax
mov	esp, ebp
pop	ebp
retn
sub_58B170 endp

align 10h


; Attributes: bp-based frame

sub_58B1D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+0D0h]
and	ecx, 2
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_58B1F5
mov	ecx, [ebp+var_4]
call	sub_C5C460

loc_58B1F5:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0D0h]
and	edx, 4
setnz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_58B213
mov	ecx, [ebp+var_4]
call	sub_C5C4A0

loc_58B213:
mov	edx, [ebp+var_4]
mov	eax, [edx+0D0h]
and	eax, 0FFFFFFFCh
or	eax, 4
mov	ecx, [ebp+var_4]
mov	[ecx+0D0h], eax
mov	esp, ebp
pop	ebp
retn
sub_58B1D0 endp

align 10h


; Attributes: bp-based frame

sub_58B230 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C095F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B258
push	0F4h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58B258:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B230 endp

align 10h


; Attributes: bp-based frame

sub_58B270 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C09290
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B293
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58B293:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B270 endp

align 10h


; Attributes: bp-based frame

sub_58B2A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C17B60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B2C3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58B2C3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B2A0 endp

align 10h


; Attributes: bp-based frame

sub_58B2D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C17A70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B2F3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58B2F3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B2D0 endp

align 10h


; Attributes: bp-based frame

sub_58B300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D4F170
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B323
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58B323:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B300 endp

align 10h


; Attributes: bp-based frame

sub_58B330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6Ah
mov	esp, ebp
pop	ebp
retn
sub_58B330 endp



; Attributes: bp-based frame

sub_58B340 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1F0h
mov	esp, ebp
pop	ebp
retn
sub_58B340 endp



; Attributes: bp-based frame

sub_58B350 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_17=	byte ptr -17h
var_16=	byte ptr -16h

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
mov	ecx, [eax+30h]
mov	[ebp+var_5C], ecx
mov	edx, [eax+34h]
mov	[ebp+var_58], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_50]
call	sub_401100
mov	[ebp+var_50], offset off_1558468
mov	eax, [ebp+var_5C]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_44], ecx
lea	ecx, [ebp+var_40]
call	sub_DD5680
mov	[ebp+var_1C], 1
mov	[ebp+var_1A], 1
mov	[ebp+var_19], 1
mov	[ebp+var_18], 1
mov	[ebp+var_17], 1
mov	[ebp+var_16], 1
mov	[ebp+var_20], 1
lea	edx, [ebp+var_50]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_54], 1
lea	ecx, [ebp+var_40]
call	sub_4087D0
lea	ecx, [ebp+var_50]
call	sub_401110
mov	eax, [ebp+var_54]
mov	esp, ebp
pop	ebp
retn
sub_58B350 endp

align 10h


; Attributes: bp-based frame

sub_58B3E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C174F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B408
push	1F0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58B408:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B3E0 endp

align 10h


; Attributes: bp-based frame

sub_58B420 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BF9A20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B445
push	50h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58B445:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B420 endp

align 10h


; Attributes: bp-based frame

sub_58B450 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 58h
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], 0FFFFFFFFh
push	offset szReferrer
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402400
push	offset szReferrer
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_402400
push	offset szReferrer
mov	ecx, [ebp+var_14]
add	ecx, 58h
call	sub_402400
mov	edx, [ebp+var_14]
mov	dword ptr [edx+80h], 1Eh
mov	eax, [ebp+var_14]
mov	dword ptr [eax+84h], 2
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+88h], 2
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8Ch], 1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_58B450 endp

align 10h


; Attributes: bp-based frame

sub_58B530 proc	near

var_10=	dword ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 18h
call	sub_433150
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+10h], 0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_58B530 endp

align 10h


; Attributes: bp-based frame

sub_58B590 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 260h
mov	esp, ebp
pop	ebp
retn
sub_58B590 endp



; Attributes: bp-based frame

sub_58B5A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_49F270
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15B5FB0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+30h], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+38h], ecx
mov	edx, [ebp+arg_8]
mov	[eax+3Ch], edx
mov	eax, [ebp+var_10]
mov	cl, [ebp+arg_C]
mov	[eax+40h], cl
mov	edx, [ebp+var_10]
mov	byte ptr [edx+41h], 1
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_10]
mov	[eax+44h], ecx
mov	edx, [ebp+var_10]
add	edx, 48h
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_18]
mov	[edx+4], ecx
mov	eax, [ebp+arg_1C]
mov	[edx+8], eax
push	28h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_58B62F
push	0
mov	ecx, [ebp+var_10]
mov	edx, [ecx+3Ch]
push	edx
mov	eax, [ecx+38h]
push	eax
mov	ecx, [ebp+var_4]
call	sub_F5D280
mov	[ebp+var_14], eax
jmp	short loc_58B636

loc_58B62F:
mov	[ebp+var_14], 0

loc_58B636:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+34h], edx
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	20h
sub_58B5A0 endp

align 10h


; Attributes: bp-based frame

sub_58B650 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58CDC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_15B5FB0
mov	ecx, [ebp+var_18]
mov	edx, [ecx+34h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_58B69F
push	1
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	ecx, [ebp+var_10]
mov	eax, [edx]
call	eax
mov	[ebp+var_1C], eax
jmp	short loc_58B6A6

loc_58B69F:
mov	[ebp+var_1C], 0

loc_58B6A6:
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], offset	off_1573C10
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58B650 endp

align 10h


; Attributes: bp-based frame

sub_58B6E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+41h], 0
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+30h], 0
jz	short loc_58B741
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+34h], 0
jz	short loc_58B741
mov	eax, [ebp+var_4]
mov	ecx, [eax+34h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_8]
mov	ecx, [edx+18h]
or	ecx, [eax+1Ch]
jz	short loc_58B722
mov	[ebp+var_C], 1
jmp	short loc_58B729

loc_58B722:
mov	[ebp+var_C], 0

loc_58B729:
movzx	edx, byte ptr [ebp+var_C]
test	edx, edx
jz	short loc_58B741
mov	eax, [ebp+var_4]
mov	ecx, [eax+30h]
mov	dword ptr [ecx+16Ch], 0

loc_58B741:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_58B6E0 endp

align 10h


; Attributes: bp-based frame

sub_58B750 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_10=	byte ptr -10h

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
cmp	dword ptr [eax+30h], 0
jz	loc_58B85A
mov	ecx, [ebp+var_4C]
movzx	edx, byte ptr [ecx+41h]
test	edx, edx
jz	loc_58B85A
mov	eax, [ebp+var_4C]
cmp	dword ptr [eax+34h], 0
jz	loc_58B85A
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+34h]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+18h]
or	edx, [ecx+1Ch]
jz	short loc_58B7A2
mov	[ebp+var_54], 1
jmp	short loc_58B7A9

loc_58B7A2:
mov	[ebp+var_54], 0

loc_58B7A9:
movzx	eax, byte ptr [ebp+var_54]
test	eax, eax
jz	loc_58B85A
mov	ecx, [ebp+var_4C]
movzx	edx, byte ptr [ecx+40h]
test	edx, edx
jz	short loc_58B83F
mov	eax, [ebp+var_4C]
mov	ecx, [eax+30h]
call	sub_C5BA10
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+38h]
mov	[ebp+var_48], edx
mov	eax, [ecx+3Ch]
mov	[ebp+var_44], eax
mov	ecx, 138Bh
lea	eax, [ebp+var_40]
call	sub_401100
mov	[ebp+var_40], offset off_1558450
mov	ecx, [ebp+var_48]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_34], edx
lea	ecx, [ebp+var_30]
call	sub_DB69C0
mov	eax, [ebp+var_4C]
add	eax, 48h
lea	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
lea	ecx, [ebp+var_40]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	ecx, [ebp+var_30]
call	sub_4087D0
lea	ecx, [ebp+var_40]
call	sub_401110
jmp	short loc_58B84A

loc_58B83F:
mov	edx, [ebp+var_4C]
mov	ecx, [edx+30h]
call	sub_CCAF90

loc_58B84A:
mov	eax, [ebp+var_4C]
mov	ecx, [eax+30h]
mov	dword ptr [ecx+16Ch], 0

loc_58B85A:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_58B750 endp

align 10h


; Attributes: bp-based frame

sub_58B870 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_58B650
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B895
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58B895:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_58B870 endp

align 10h


; Attributes: bp-based frame

sub_58B8A0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax+30h]
mov	[ebp+var_3C], ecx
mov	edx, [eax+34h]
mov	[ebp+var_38], edx
mov	ecx, 138Bh
lea	eax, [ebp+var_30]
call	sub_401100
mov	[ebp+var_30], offset off_1599AE8
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_24], ecx
lea	ecx, [ebp+var_20]
call	sub_DA4BA0
lea	edx, [ebp+var_30]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_34], 1
lea	ecx, [ebp+var_20]
call	sub_4087D0
lea	ecx, [ebp+var_30]
call	sub_401110
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_58B8A0 endp



; Attributes: bp-based frame

sub_58B910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_CCD490
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58B938
push	260h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58B938:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B910 endp

align 10h


; Attributes: bp-based frame

sub_58B950 proc	near

var_24=	dword ptr -24h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edx+0Ch]
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_0]
mov	al, [edx+10h]
mov	[ecx+10h], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_24]
add	ecx, 18h
call	sub_44CC50
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	4
sub_58B950 endp

align 10h


; Attributes: bp-based frame

sub_58B9B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 58h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+80h]
mov	[eax+80h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+84h]
mov	[eax+84h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+88h]
mov	[eax+88h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8Ch]
mov	[eax+8Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58B9B0 endp

align 10h


; Attributes: bp-based frame

sub_58BA60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6Ch
mov	esp, ebp
pop	ebp
retn
sub_58BA60 endp



; Attributes: bp-based frame

sub_58BA70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C09220
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58BA98
push	158h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58BA98:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BA70 endp

align 10h


; Attributes: bp-based frame

sub_58BAB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 6Eh
mov	esp, ebp
pop	ebp
retn
sub_58BAB0 endp



; Attributes: bp-based frame

sub_58BAC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BF9610
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58BAE5
push	60h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58BAE5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BAC0 endp

align 10h


; Attributes: bp-based frame

sub_58BAF0 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 5Ch
call	sub_402390
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_58BAF0 endp

align 10h


; Attributes: bp-based frame

sub_58BB60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_403400
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+58h]
mov	[edx+58h], ecx
mov	edx, [ebp+arg_0]
add	edx, 5Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 5Ch
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+84h]
mov	[eax+84h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+88h]
mov	[eax+88h], edx
mov	ecx, [ecx+8Ch]
mov	[eax+8Ch], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BB60 endp

align 10h


; Attributes: bp-based frame

sub_58BC00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 69h
mov	esp, ebp
pop	ebp
retn
sub_58BC00 endp



; Attributes: bp-based frame

sub_58BC10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C091C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58BC38
push	180h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58BC38:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BC10 endp

align 10h


; Attributes: bp-based frame

sub_58BC50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 100h
mov	esp, ebp
pop	ebp
retn
sub_58BC50 endp



; Attributes: bp-based frame

sub_58BC60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BF8F20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58BC88
push	100h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58BC88:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BC60 endp

align 10h


; Attributes: bp-based frame

sub_58BCA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 240h
mov	esp, ebp
pop	ebp
retn
sub_58BCA0 endp



; Attributes: bp-based frame

sub_58BCB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C14E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58BCD8
push	240h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58BCD8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BCB0 endp

align 10h


; Attributes: bp-based frame

sub_58BCF0 proc	near

var_68=	dword ptr -68h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_68]
call	sub_58BD70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58BD1A
push	2E8h
mov	ecx, [ebp+var_68]
push	ecx
call	sub_1111040
add	esp, 8

loc_58BD1A:
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	4
sub_58BCF0 endp

align 10h


; Attributes: bp-based frame

sub_58BD30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset sub_401EF0
push	2
push	0Ch
mov	eax, [ebp+var_4]
push	eax
call	sub_4078B0
push	offset sub_401EF0
push	2
push	10h
mov	ecx, [ebp+var_4]
add	ecx, 18h
push	ecx
call	sub_4078B0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_58BD30 endp

align 10h


; Attributes: bp-based frame

sub_58BD70 proc	near

var_84=	dword ptr -84h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58BD70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
add	eax, 2CCh
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_84]
add	ecx, 2B4h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_5935F0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_84]
add	edx, 29Ch
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_18]
call	sub_5935F0
mov	ecx, [ebp+var_18]
add	ecx, 14h
call	sub_42CA30
mov	eax, [ebp+var_84]
add	eax, 264h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
call	sub_5021C0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_84]
add	ecx, 24Ch
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_5935F0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_84]
add	edx, 248h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
cmp	dword ptr [eax], 0
jz	short loc_58BE66
mov	ecx, [ebp+var_24]
mov	ecx, [ecx]
call	sub_40AA90

loc_58BE66:
mov	edx, [ebp+var_84]
add	edx, 244h
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
cmp	dword ptr [eax], 0
jz	short loc_58BE87
mov	ecx, [ebp+var_28]
mov	ecx, [ecx]
call	sub_40AA90

loc_58BE87:
mov	ecx, [ebp+var_84]
add	ecx, 194h
call	sub_429100
mov	edx, [ebp+var_84]
mov	dword ptr [edx+18Ch], offset off_15B53D0
mov	ecx, [ebp+var_84]
add	ecx, 160h
call	sub_10111A0
mov	ecx, [ebp+var_84]
add	ecx, 138h
call	sub_10111A0
mov	eax, [ebp+var_84]
add	eax, 134h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
cmp	dword ptr [ecx], 0
jz	short loc_58BEEA
mov	edx, [ebp+var_2C]
mov	ecx, [edx]
call	sub_40AA90

loc_58BEEA:
mov	eax, [ebp+var_84]
mov	dword ptr [eax+12Ch], offset off_15B53D0
mov	ecx, [ebp+var_84]
mov	dword ptr [ecx+114h], offset off_15B53D0
mov	ecx, [ebp+var_84]
add	ecx, 0D8h
call	sub_591140
mov	ecx, [ebp+var_84]
add	ecx, 48h
call	sub_1104760
mov	ecx, [ebp+var_84]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58BD70 endp

align 10h


; Attributes: bp-based frame

sub_58BF50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B53D0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_58BF74
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58BF74:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BF50 endp

align 10h


; Attributes: bp-based frame

sub_58BF80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2Bh
mov	esp, ebp
pop	ebp
retn
sub_58BF80 endp



; Attributes: bp-based frame

sub_58BF90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_CC2E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58BFB8
push	168h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58BFB8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58BF90 endp

align 10h


; Attributes: bp-based frame

sub_58BFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2Dh
mov	esp, ebp
pop	ebp
retn
sub_58BFD0 endp



; Attributes: bp-based frame

sub_58BFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+0D0h]
test	ecx, ecx
jz	short loc_58BFFF
fld	ds:flt_151351C
jmp	short loc_58C005
jmp	short loc_58C005

loc_58BFFF:
fld	ds:flt_1479FAC

loc_58C005:
mov	esp, ebp
pop	ebp
retn
sub_58BFE0 endp

align 10h


; Attributes: bp-based frame

sub_58C010 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C14480
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58C038
push	0E0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58C038:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C010 endp

align 10h


; Attributes: bp-based frame

sub_58C050 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_154CB4C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	edx, [edx+0Ch]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	edx, [ebp+var_4]
mov	[edx+14h], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	ecx, [ecx+1Ch]
mov	[eax+1Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15960AC
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+20h]
mov	[eax+20h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+24h]
mov	[eax+24h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+28h]
mov	[eax+28h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	ecx, [ecx+34h]
mov	[eax+34h], ecx
mov	edx, [ebp+arg_0]
add	edx, 38h
mov	eax, [ebp+var_4]
add	eax, 38h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+44h]
mov	[eax+44h], dl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C050 endp

align 10h


; Attributes: bp-based frame

sub_58C110 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 7Ch
mov	esp, ebp
pop	ebp
retn
sub_58C110 endp



; Attributes: bp-based frame

sub_58C120 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58C150
push	7Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58C150:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C120 endp

align 10h


; Attributes: bp-based frame

sub_58C160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4Eh
mov	esp, ebp
pop	ebp
retn
sub_58C160 endp



; Attributes: bp-based frame

sub_58C170 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0A8h
mov	esp, ebp
pop	ebp
retn
sub_58C170 endp



; Attributes: bp-based frame

sub_58C180 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58C180
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_44]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+var_44]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+var_44]
mov	dword ptr [eax+0Ch], 0
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_44]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_14]
call	sub_43A150
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+10h], 0
mov	cl, [ebp+var_E]
mov	edx, [ebp+var_14]
mov	[edx+14h], cl
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
call	nullsub_1
mov	eax, [ebp+var_44]
mov	dword ptr [eax+28h], 0
mov	ecx, [ebp+var_44]
add	ecx, 2Ch
mov	[ebp+var_40], ecx
xor	edx, edx
mov	[ebp+var_28], edx
mov	[ebp+var_24], edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_3C]
mov	[ecx], edx
mov	eax, [ebp+var_38]
mov	[ecx+4], eax
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_40]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	[eax+8], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_40]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	dword ptr [ecx+10h], 0
mov	dl, [ebp+var_10]
mov	eax, [ebp+var_40]
mov	[eax+14h], dl
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_44]
mov	dword ptr [ecx+44h], 0FFFFFFFFh
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58C180 endp

align 10h


; Attributes: bp-based frame

sub_58C2E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C7FDA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58C308
push	0A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58C308:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C2E0 endp

align 10h


; Attributes: bp-based frame

sub_58C320 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58C320
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_38], eax
xor	eax, eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_34]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	[edx+0Ch], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_3C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_3C]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_3C]
mov	[eax+0Ch], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_E]
mov	ecx, [ebp+var_3C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 5
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
call	nullsub_1
call	nullsub_1
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58C320 endp

align 10h


; Attributes: bp-based frame

sub_58C410 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58C410
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 2Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_14]
call	sub_439A20
mov	byte ptr [ebp+var_4], 2
call	nullsub_1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58C410 endp

align 10h


; Attributes: bp-based frame

sub_58C4A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
call	sub_59A260
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+28h]
mov	[edx+28h], ecx
mov	edx, [ebp+var_C]
add	edx, 2Ch
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
add	eax, 2Ch
push	eax
mov	ecx, [ebp+var_8]
call	sub_48A080
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+44h]
mov	[ecx+44h], eax
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_58C4A0 endp

align 10h


; Attributes: bp-based frame

sub_58C530 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D0B300
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58C558
push	198h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58C558:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C530 endp

align 10h


; Attributes: bp-based frame

sub_58C570 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5830C0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+58h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+5Ch], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+60h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+64h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+68h], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+6Ch], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+70h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+74h], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+78h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+7Ch], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+80h], 0
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+84h], xmm0
mov	eax, [ebp+var_8]
fldz
fstp	qword ptr [eax+88h]
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+90h], 0
mov	edx, [ebp+var_8]
add	edx, 94h
mov	eax, dword_1889A64
mov	[edx], eax
mov	ecx, dword_1889A68
mov	[edx+4], ecx
mov	eax, dword_1889A6C
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0A0h], xmm0
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0A4h], xmm0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
push	offset szReferrer
mov	ecx, [ebp+var_8]
add	ecx, 0A8h
call	sub_407810
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
push	offset szReferrer
mov	ecx, [ebp+var_8]
add	ecx, 0D0h
call	sub_407810
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_58C570 endp

align 10h


; Attributes: bp-based frame

sub_58C6C0 proc	near

var_8C=	dword ptr -8Ch
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_3C=	dword ptr -3Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58C6C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 80h
push	esi
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	ecx, [eax+30h]
sub	ecx, 1
mov	edx, [ebp+var_8C]
mov	[edx+30h], ecx
push	offset aUpdateracewron ; "UpdateRaceWrongWay"
lea	ecx, [ebp+var_64]
call	sub_110E550
mov	eax, [ebp+var_8C]
mov	ecx, [eax+30h]
push	ecx
push	offset aTime_0	; "time"
mov	edx, [ebp+var_3C]
lea	ecx, [ebp+var_3C]
mov	eax, [edx+30h]
call	eax
mov	esi, eax
call	sub_401930
lea	ecx, [ebp+var_64]
push	ecx
push	0Eh
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	edx, [ebp+var_8C]
cmp	dword ptr [edx+30h], 0
jle	short loc_58C7A3
lea	ecx, [ebp+var_74]
call	sub_49F360
movss	xmm0, ds:dword_1479C54
movss	[ebp+var_68], xmm0
mov	eax, [ebp+var_8C]
mov	[ebp+var_6C], eax
lea	ecx, [ebp+var_74]
push	ecx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
mov	[ebp+var_78], 0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_401110
lea	edx, [ebp+var_64]
push	edx
call	sub_4093F0
mov	eax, [ebp+var_78]
jmp	short loc_58C7C1
jmp	short loc_58C7B8

loc_58C7A3:
mov	[ebp+var_7C], 1
lea	eax, [ebp+var_64]
push	eax
call	sub_4093F0
mov	eax, [ebp+var_7C]
jmp	short loc_58C7C1

loc_58C7B8:
lea	ecx, [ebp+var_64]
push	ecx
call	sub_4093F0

loc_58C7C1:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_58C6C0 endp



; Attributes: bp-based frame

sub_58C7D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D5E9E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58C7F8
push	1E0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58C7F8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C7D0 endp

align 10h


; Attributes: bp-based frame

sub_58C810 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 58h
mov	esp, ebp
pop	ebp
retn
sub_58C810 endp



; Attributes: bp-based frame

sub_58C820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58C845
push	58h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58C845:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C820 endp

align 10h


; Attributes: bp-based frame

sub_58C850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6400
mov	ecx, [ebp+var_4]
add	ecx, 1A0h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 170h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 144h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 11Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0F4h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0CCh
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0A4h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 7Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58C850 endp

align 10h


; Attributes: bp-based frame

sub_58C8F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 68h
mov	esp, ebp
pop	ebp
retn
sub_58C8F0 endp



; Attributes: bp-based frame

sub_58C900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1C8h
mov	esp, ebp
pop	ebp
retn
sub_58C900 endp



; Attributes: bp-based frame

sub_58C910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_58C850
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58C938
push	1C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58C938:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58C910 endp

align 10h


; Attributes: bp-based frame

sub_58C950 proc	near

var_48=	dword ptr -48h
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_48]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EC670
mov	edx, [ebp+var_48]
mov	dword ptr [edx], offset	off_15B54B0
mov	eax, [ebp+var_48]
add	eax, 4
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_1]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_489C40
mov	edx, [ebp+var_8]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_2]
mov	ecx, [ebp+var_8]
mov	[ecx+14h], al
lea	ecx, [ebp+var_2]
call	sub_42CA30
mov	ecx, [ebp+var_48]
add	ecx, 1Ch
call	sub_58FE10
mov	ecx, [ebp+var_48]
add	ecx, 34h
call	sub_58FE10
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn
sub_58C950 endp

align 10h


; Attributes: bp-based frame

sub_58C9D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 34h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_502780
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_502080
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_42CA30
mov	edx, [ebp+var_10]
add	edx, 4
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
call	sub_502080
mov	ecx, [ebp+var_C]
add	ecx, 14h
call	sub_42CA30
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_10]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	esp, ebp
pop	ebp
retn
sub_58C9D0 endp

align 10h


; Attributes: bp-based frame

sub_58CA50 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_58C9D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CA75
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58CA75:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_58CA50 endp

align 10h


; Attributes: bp-based frame

sub_58CA80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BF8220
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CAA5
push	44h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CAA5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CA80 endp

align 10h


; Attributes: bp-based frame

sub_58CAB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 218h
mov	esp, ebp
pop	ebp
retn
sub_58CAB0 endp



; Attributes: bp-based frame

sub_58CAC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C06A60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CAE8
push	218h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CAE8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CAC0 endp

align 10h


; Attributes: bp-based frame

sub_58CB00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 43h
mov	esp, ebp
pop	ebp
retn
sub_58CB00 endp



; Attributes: bp-based frame

sub_58CB10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1A0h
mov	esp, ebp
pop	ebp
retn
sub_58CB10 endp



; Attributes: bp-based frame

sub_58CB20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_58CB60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CB48
push	110h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CB48:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CB20 endp

align 10h


; Attributes: bp-based frame

sub_58CB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0E4h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 0BCh
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 94h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 6Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58CB60 endp

align 10h


; Attributes: bp-based frame

sub_58CBC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C13280
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CBE8
push	1A0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CBE8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CBC0 endp

align 10h


; Attributes: bp-based frame

sub_58CC00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CC25
push	44h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CC25:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CC00 endp

align 10h


; Attributes: bp-based frame

sub_58CC30 proc	near

var_60=	dword ptr -60h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_60]
call	sub_58CC70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CC5A
push	120h
mov	ecx, [ebp+var_60]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CC5A:
mov	eax, [ebp+var_60]
mov	esp, ebp
pop	ebp
retn	4
sub_58CC30 endp

align 10h


; Attributes: bp-based frame

sub_58CC70 proc	near

var_6C=	dword ptr -6Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_6C]
add	ecx, 0E0h
call	sub_437300
mov	ecx, [ebp+var_6C]
add	ecx, 0D4h
call	sub_437300
mov	ecx, [ebp+var_6C]
add	ecx, 0B8h
call	sub_407910
mov	ecx, [ebp+var_6C]
add	ecx, 90h
call	sub_407E50
mov	ecx, [ebp+var_6C]
add	ecx, 68h
call	sub_407E50
mov	ecx, [ebp+var_6C]
add	ecx, 48h
call	sub_1104760
mov	ecx, [ebp+var_6C]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58CC70 endp

align 10h
; [00000010 BYTES: COLLAPSED FUNCTION unknown_libname_14. PRESS	KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_58CCF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 0B4h
mov	esp, ebp
pop	ebp
retn
sub_58CCF0 endp



; Attributes: bp-based frame

sub_58CD00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_CB54A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CD28
push	0B4h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CD28:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CD00 endp

align 10h


; Attributes: bp-based frame

sub_58CD40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 1D8h
mov	esp, ebp
pop	ebp
retn
sub_58CD40 endp



; Attributes: bp-based frame

sub_58CD50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_49F270
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15B62F0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+30h], edx
push	28h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_58CD9D
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_F5D280
mov	[ebp+var_14], eax
jmp	short loc_58CDA4

loc_58CD9D:
mov	[ebp+var_14], 0

loc_58CDA4:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_14]
mov	[edx+34h], eax
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_58CD50 endp

align 10h


; Attributes: bp-based frame

sub_58CDC0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58CDC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_15B62F0
mov	ecx, [ebp+var_18]
mov	edx, [ecx+34h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_58CE0F
push	1
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	ecx, [ebp+var_10]
mov	eax, [edx]
call	eax
mov	[ebp+var_1C], eax
jmp	short loc_58CE16

loc_58CE0F:
mov	[ebp+var_1C], 0

loc_58CE16:
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], offset	off_1573C10
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58CDC0 endp

align 10h


; Attributes: bp-based frame

sub_58CE50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+34h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_8]
mov	ecx, [edx+18h]
or	ecx, [eax+1Ch]
jz	short loc_58CE79
mov	[ebp+var_C], 1
jmp	short loc_58CE80

loc_58CE79:
mov	[ebp+var_C], 0

loc_58CE80:
movzx	edx, byte ptr [ebp+var_C]
test	edx, edx
jz	short loc_58CEA9
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+30h], 0
jz	short loc_58CEA9
mov	ecx, [ebp+var_4]
mov	edx, [ecx+30h]
mov	byte ptr [edx+108h], 0
mov	eax, [ebp+var_4]
mov	ecx, [eax+30h]
call	sub_BD8D80

loc_58CEA9:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_58CE50 endp

align 10h


; Attributes: bp-based frame

sub_58CEC0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_58CDC0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CEE5
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58CEE5:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_58CEC0 endp

align 10h


; Attributes: bp-based frame

sub_58CEF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D07180
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CF18
push	1D8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CF18:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CEF0 endp

align 10h


; Attributes: bp-based frame

sub_58CF30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4Ch
mov	esp, ebp
pop	ebp
retn
sub_58CF30 endp



; Attributes: bp-based frame

sub_58CF40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C067C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58CF68
push	2A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58CF68:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58CF40 endp

align 10h


; Attributes: bp-based frame

sub_58CF80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_5C=	dword ptr  64h
arg_60=	dword ptr  68h
arg_64=	dword ptr  6Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_64]
mov	[edx+4], eax
mov	ecx, [ebp+arg_5C]
add	ecx, 9C40h
mov	edx, [ebp+var_4]
mov	[edx+8], ecx
mov	edi, [ebp+var_4]
add	edi, 10h
mov	ecx, 16h
lea	esi, [ebp+arg_4]
rep movsd
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_60]
mov	[eax+68h], ecx
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	68h
sub_58CF80 endp

align 10h


; Attributes: bp-based frame

sub_58CFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 9
mov	esp, ebp
pop	ebp
retn
sub_58CFD0 endp



; Attributes: bp-based frame

sub_58CFE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 180h
mov	esp, ebp
pop	ebp
retn
sub_58CFE0 endp



; Attributes: bp-based frame

sub_58CFF0 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_5920A0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_18]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_58D031
mov	eax, [ebp+var_18]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58D031:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_58CFF0 endp

align 10h


; Attributes: bp-based frame

sub_58D040 proc	near

var_48=	dword ptr -48h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_48]
call	sub_58D080
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58D06A
push	180h
mov	ecx, [ebp+var_48]
push	ecx
call	sub_1111040
add	esp, 8

loc_58D06A:
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn	4
sub_58D040 endp

align 10h


; Attributes: bp-based frame

sub_58D080 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58D080
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 160h
call	sub_594900
mov	eax, [ebp+var_5C]
add	eax, 108h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_595500
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_5C]
add	ecx, 100h
call	sub_5D2630
mov	ecx, [ebp+var_5C]
add	ecx, 0E8h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_489010
mov	ecx, [ebp+var_14]
add	ecx, 14h
call	sub_42CA30
mov	edx, [ebp+var_5C]
add	edx, 0D0h
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_18]
call	sub_595440
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_5C]
add	eax, 0B8h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
call	sub_595440
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_5C]
add	ecx, 0A0h
call	sub_46A7D0
mov	ecx, [ebp+var_5C]
add	ecx, 98h
call	sub_409540
mov	ecx, [ebp+var_5C]
add	ecx, 8Ch
call	sub_555450
mov	ecx, [ebp+var_5C]
add	ecx, 74h
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_50]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_50]
add	ecx, 14h
call	sub_42CA30
mov	[ebp+var_4], 5
mov	[ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_5C]
add	edx, 5Ch
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_54]
call	sub_595380
mov	ecx, [ebp+var_54]
add	ecx, 14h
call	sub_42CA30
mov	eax, [ebp+var_5C]
add	eax, 44h
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
call	sub_595380
mov	ecx, [ebp+var_58]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_5C]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58D080 endp

align 10h


; Attributes: bp-based frame

sub_58D200 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
add	ecx, 48h
call	sub_407E50
mov	ecx, [ebp+var_5C]
add	ecx, 34h
call	sub_436CF0
mov	ecx, [ebp+var_5C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_58D200 endp

align 10h


; Attributes: bp-based frame

sub_58D240 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_5A6360
mov	esp, ebp
pop	ebp
retn
sub_58D240 endp

align 10h


; Attributes: bp-based frame

sub_58D260 proc	near
push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, dword_1971490
and	eax, 1
jnz	short loc_58D2BB
mov	ecx, dword_1971490
or	ecx, 1
mov	dword_1971490, ecx
mov	dword_1971470, offset off_1581938
push	offset dword_1971470
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EC670
mov	dword_1971470, offset off_15B67A0
mov	ecx, offset unk_1971474
call	sub_4FF700
push	offset sub_14159C0 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_58D2BB:
mov	eax, offset dword_1971470
mov	esp, ebp
pop	ebp
retn
sub_58D260 endp

align 10h


; Attributes: bp-based frame

sub_58D2D0 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_5923A0
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_18]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_58D311
mov	eax, [ebp+var_18]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58D311:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_58D2D0 endp

align 10h


; Attributes: bp-based frame

sub_58D320 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 59h
mov	esp, ebp
pop	ebp
retn
sub_58D320 endp



; Attributes: bp-based frame

sub_58D330 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4C4h
mov	esp, ebp
pop	ebp
retn
sub_58D330 endp



; Attributes: bp-based frame

sub_58D340 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
add	eax, 48h
call	sub_420D20
test	eax, eax
jz	loc_58D3E4
mov	eax, [ebp+var_24]
add	eax, 48h
call	sub_420D20
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
mov	ecx, [eax+0E4h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_58D3E4
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
cvttss2si eax, [ebp+var_18]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
imul	eax, [ebp+var_8]
cdq
and	edx, 1FFh
add	eax, edx
sar	eax, 9
mov	[ebp+var_8], eax
mov	[ebp+var_C], 1
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_C]
push	edx
call	sub_406950
add	esp, 8
mov	eax, [eax]
mov	[ebp+var_8], eax
mov	[ebp+var_10], 1Eh
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_10]
push	edx
call	sub_405D40
add	esp, 8
mov	eax, [eax]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
jmp	short loc_58D3E9

loc_58D3E4:
mov	eax, 1

loc_58D3E9:
mov	esp, ebp
pop	ebp
retn
sub_58D340 endp

align 10h


; Attributes: bp-based frame

sub_58D3F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+0Ch]
call	sub_C29D80
mov	esp, ebp
pop	ebp
retn	10h
sub_58D3F0 endp

align 10h


; Attributes: bp-based frame

sub_58D420 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+110h]
xor	edx, edx
cmp	ecx, ds:dword_1543DB8
setnz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_58D45F
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, ds:dword_1543DB8
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_58D45F
mov	al, 1
jmp	short loc_58D4D8

loc_58D45F:
mov	edx, [ebp+var_4]
mov	eax, [edx+10Ch]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_58D473
jmp	short loc_58D4C3

loc_58D473:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+114h]
xor	eax, eax
cmp	edx, ds:dword_1543DB8
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_58D49E
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
cmp	ecx, [eax+114h]
jz	short loc_58D4B7

loc_58D49E:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
cmp	ecx, [eax+110h]
jz	short loc_58D4B7
mov	[ebp+var_C], 1
jmp	short loc_58D4BE

loc_58D4B7:
mov	[ebp+var_C], 0

loc_58D4BE:
mov	al, byte ptr [ebp+var_C]
jmp	short loc_58D4D8

loc_58D4C3:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax+114h]
setnz	dl
mov	al, dl

loc_58D4D8:
mov	esp, ebp
pop	ebp
retn
sub_58D420 endp

align 10h


; Attributes: bp-based frame

sub_58D4E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+110h]
xor	edx, edx
cmp	ecx, ds:dword_1543DB8
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_58D514
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [ecx]
cmp	eax, [edx+110h]
jz	short loc_58D548

loc_58D514:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+114h]
xor	eax, eax
cmp	edx, ds:dword_1543DB8
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_58D53F
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
cmp	ecx, [eax+114h]
jz	short loc_58D548

loc_58D53F:
mov	[ebp+var_8], 0
jmp	short loc_58D54F

loc_58D548:
mov	[ebp+var_8], 1

loc_58D54F:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_58D4E0 endp

align 10h


; Attributes: bp-based frame

sub_58D560 proc	near

var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 4
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_1C]
add	ecx, 2Ch
call	sub_4E4EB0
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 0A8h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+104h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+100h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0FCh], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0F8h], xmm0
mov	ecx, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0F4h], xmm0
mov	edx, [ebp+var_1C]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [edx+108h], xmm0
mov	eax, [ebp+var_1C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+9Ch], xmm0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+10Ch], 0
mov	ecx, [ebp+var_1C]
call	sub_58D760
mov	edx, [ebp+var_1C]
mov	eax, ds:dword_1543DB8
mov	[edx], eax
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_58D560 endp

align 10h


; Attributes: bp-based frame

sub_58D660 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 2Ch
call	sub_525C80
mov	ecx, [ebp+var_8]
movss	xmm0, [ebp+arg_4]
movss	dword ptr [ecx+98h], xmm0
mov	edx, [ebp+var_8]
mov	eax, ds:dword_1543DB8
mov	[edx+110h], eax
mov	ecx, [ebp+var_8]
mov	edx, ds:dword_1543DB8
mov	[ecx+114h], edx
mov	eax, [ebp+var_8]
mov	byte ptr [eax+118h], 0
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+119h], 0
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_4023E0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+10Ch], 0
mov	eax, [ebp+var_8]
add	eax, 0A8h
call	sub_402440
mov	ecx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0A0h], xmm0
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0A4h], xmm0
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+9Ch], xmm0
mov	ecx, [ebp+var_8]
mov	dl, [ebp+arg_C]
mov	[ecx+0D0h], dl
mov	eax, [ebp+var_8]
mov	dword ptr [eax+0D4h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+0D8h], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0DCh], 0
mov	esp, ebp
pop	ebp
retn	10h
sub_58D660 endp

align 10h


; Attributes: bp-based frame

sub_58D760 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
push	offset unk_188EF88
mov	ecx, [ebp+var_8]
add	ecx, 2Ch
call	sub_525C80
mov	eax, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+98h], xmm0
mov	ecx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0A0h], xmm0
mov	eax, [ebp+var_8]
add	eax, 0A8h
call	sub_402440
mov	edx, [ebp+var_8]
mov	eax, ds:dword_1543DB8
mov	[edx+114h], eax
mov	ecx, [ebp+var_8]
mov	edx, ds:dword_1543DB8
mov	[ecx+110h], edx
mov	eax, [ebp+var_8]
mov	byte ptr [eax+119h], 0
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+118h], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0D4h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+0D8h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+0DCh], 0
mov	eax, [ebp+var_8]
add	eax, 4
call	sub_402440
mov	edx, [ebp+var_8]
mov	byte ptr [edx+0D0h], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+10Ch], 0
mov	ecx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+0A4h], xmm0
mov	edx, [ebp+var_8]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+9Ch], xmm0
mov	esp, ebp
pop	ebp
retn
sub_58D760 endp



; Attributes: bp-based frame

sub_58D850 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6BF8
mov	ecx, [ebp+var_4]
call	sub_4017E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_58D87C
mov	edx, [ebp+var_4]
push	edx
call	sub_4026E0
add	esp, 4

loc_58D87C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58D850 endp

align 10h


; Attributes: bp-based frame

sub_58D890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_11A9A50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58D8B5
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58D8B5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58D890 endp

align 10h


; Attributes: bp-based frame

sub_58D8C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C525E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58D8E8
push	4C4h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58D8E8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58D8C0 endp

align 10h


; Attributes: bp-based frame

sub_58D900 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 0A8h
call	sub_407E50
mov	eax, [ebp+var_8]
add	eax, 2Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_58D900 endp

align 10h


; Attributes: bp-based frame

sub_58D950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58D950 endp

align 10h


; Attributes: bp-based frame

sub_58D990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5Ah
mov	esp, ebp
pop	ebp
retn
sub_58D990 endp



; Attributes: bp-based frame

sub_58D9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 36h
mov	esp, ebp
pop	ebp
retn
sub_58D9A0 endp



; Attributes: bp-based frame

sub_58D9B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_58D9E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58D9D5
push	60h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58D9D5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58D9B0 endp

align 10h


; Attributes: bp-based frame

sub_58D9E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_5A6A00
mov	ecx, [ebp+var_4]
add	ecx, 4Ch
call	sub_59F960
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_5A6A70
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58D9E0 endp

align 10h


; Attributes: bp-based frame

sub_58DA20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+24h]
mov	[ecx+24h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_4022F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DA20 endp

align 10h


; Attributes: bp-based frame

sub_58DAA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+24h]
mov	[ecx+24h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+40h]
fstp	dword ptr [edx+40h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DAA0 endp

align 10h


; Attributes: bp-based frame

sub_58DB30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+24h]
mov	[ecx+24h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 28h
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+40h]
mov	[edx+40h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DB30 endp

align 10h


; Attributes: bp-based frame

sub_58DBC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+arg_0]
add	ecx, 24h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_4022F0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DBC0 endp

align 10h


; Attributes: bp-based frame

sub_58DC30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+arg_0]
add	ecx, 24h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_4022F0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+3Ch]
mov	[edx+3Ch], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DC30 endp

align 10h


; Attributes: bp-based frame

sub_58DCB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4Dh
mov	esp, ebp
pop	ebp
retn
sub_58DCB0 endp



; Attributes: bp-based frame

sub_58DCC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 114h
mov	esp, ebp
pop	ebp
retn
sub_58DCC0 endp



; Attributes: bp-based frame

sub_58DCD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_58DD10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58DCF8
push	114h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58DCF8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DCD0 endp

align 10h


; Attributes: bp-based frame

sub_58DD10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 104h
call	sub_59F960
mov	ecx, [ebp+var_4]
add	ecx, 0FCh
call	sub_5A6A00
mov	ecx, [ebp+var_4]
add	ecx, 0F4h
call	sub_5A6A00
mov	ecx, [ebp+var_4]
add	ecx, 0ECh
call	sub_59F960
mov	ecx, [ebp+var_4]
add	ecx, 0E4h
call	sub_5A6A70
mov	ecx, [ebp+var_4]
add	ecx, 0CCh
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 0A4h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 90h
call	sub_42B3C0
mov	ecx, [ebp+var_4]
add	ecx, 7Ch
call	sub_42B3C0
mov	ecx, [ebp+var_4]
add	ecx, 60h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	esp, ebp
pop	ebp
retn
sub_58DD10 endp

align 10h


; Attributes: bp-based frame

sub_58DDC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 4Fh
mov	esp, ebp
pop	ebp
retn
sub_58DDC0 endp



; Attributes: bp-based frame

sub_58DDD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C0ECA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58DDF8
push	118h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58DDF8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DDD0 endp

align 10h


; Attributes: bp-based frame

sub_58DE10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 37h
mov	esp, ebp
pop	ebp
retn
sub_58DE10 endp



; Attributes: bp-based frame

sub_58DE20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_595A80
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58DE50
push	5Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58DE50:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DE20 endp

align 10h


; Attributes: bp-based frame

sub_58DE60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_595A80
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_42B3C0
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58DE9B
push	74h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58DE9B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DE60 endp

align 10h


; Attributes: bp-based frame

sub_58DEB0 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 60h
call	sub_58EEA0
mov	ecx, [ebp+var_58]
add	ecx, 44h
call	sub_10FB7C0
mov	ecx, [ebp+var_58]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58DEED
push	6Ch
mov	ecx, [ebp+var_58]
push	ecx
call	sub_1111040
add	esp, 8

loc_58DEED:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_58DEB0 endp

align 10h


; Attributes: bp-based frame

sub_58DF00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 44h
call	sub_4892A0
mov	ecx, [ebp+var_4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58DF30
push	64h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58DF30:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58DF00 endp

align 10h


; Attributes: bp-based frame

sub_58DF40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4A5110
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58DF88
push	44h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_58DF88:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_58DF40 endp

align 10h


; Attributes: bp-based frame

sub_58DFA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5Bh
mov	esp, ebp
pop	ebp
retn
sub_58DFA0 endp



; Attributes: bp-based frame

sub_58DFB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 44h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5021C0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_F62C70
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_58DFF3
push	5Ch
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_58DFF3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_58DFB0 endp

align 10h


; Attributes: bp-based frame

sub_58E000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_D04430
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E023
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_58E023:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E000 endp

align 10h


; Attributes: bp-based frame

sub_58E030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BF75F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E055
push	48h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58E055:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E030 endp

align 10h


; Attributes: bp-based frame

sub_58E060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5Ch
mov	esp, ebp
pop	ebp
retn
sub_58E060 endp



; Attributes: bp-based frame

sub_58E070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 80h
mov	esp, ebp
pop	ebp
retn
sub_58E070 endp



; Attributes: bp-based frame

sub_58E080 proc	near

var_A4=	dword ptr -0A4h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
mov	ecx, [ebp+var_A4]
add	ecx, 64h
call	sub_4A9770
mov	ecx, [ebp+var_A4]
add	ecx, 58h
call	sub_5553D0
mov	ecx, [ebp+var_A4]
call	sub_F62C70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E0D2
push	80h
mov	ecx, [ebp+var_A4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58E0D2:
mov	eax, [ebp+var_A4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E080 endp

align 10h


; Attributes: bp-based frame

sub_58E0E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5Dh
mov	esp, ebp
pop	ebp
retn
sub_58E0E0 endp



; Attributes: bp-based frame

sub_58E0F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C005F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E115
push	54h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58E115:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E0F0 endp

align 10h


; Attributes: bp-based frame

sub_58E120 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 5Eh
mov	esp, ebp
pop	ebp
retn
sub_58E120 endp



; Attributes: bp-based frame

sub_58E130 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
call	sub_58E170
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E15A
push	90h
mov	ecx, [ebp+var_C]
push	ecx
call	sub_1111040
add	esp, 8

loc_58E15A:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_58E130 endp

align 10h


; Attributes: bp-based frame

sub_58E170 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58E170
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 74h
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 58h
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 6
mov	[ebp+var_4], 8
mov	ecx, [ebp+var_14]
call	sub_439610
mov	byte ptr [ebp+var_4], 9
mov	byte ptr [ebp+var_4], 7
mov	[ebp+var_4], 0Ah
mov	[ebp+var_4], 0Bh
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_F62C70
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_58E170 endp

align 10h


; Attributes: bp-based frame

sub_58E220 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C0E120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E248
push	0A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58E248:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E220 endp

align 10h


; Attributes: bp-based frame

sub_58E260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+21h]
mov	[ecx+21h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+22h]
mov	[ecx+22h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+24h]
fstp	dword ptr [ecx+24h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+28h]
fstp	dword ptr [eax+28h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+2Ch]
fstp	dword ptr [edx+2Ch]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
mov	[ecx+30h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+34h]
mov	[ecx+34h], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E260 endp

align 10h


; Attributes: bp-based frame

sub_58E310 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	edx, [edx+2Ch]
mov	[ecx+2Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E310 endp

align 10h


; Attributes: bp-based frame

sub_58E380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 2Eh
mov	esp, ebp
pop	ebp
retn
sub_58E380 endp



; Attributes: bp-based frame

sub_58E390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C00400
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E3B8
push	300h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58E3B8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E390 endp

align 10h


; Attributes: bp-based frame

sub_58E3D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_C0E0C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_58E3F8
push	0C8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_58E3F8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_58E3D0 endp

align 10h


; Attributes: bp-based frame

sub_58E410 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_1], 0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+var_8]
call	sub_61ED00
sub	eax, 1
push	eax
call	sub_405ED0
add	esp, 8
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_8]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn
sub_58E410 endp

align 10h


; Attributes: bp-based frame

sub_58E450 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58E450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20h
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax+10h], ecx
mov	edx, [ebp+var_2C]
add	edx, 14h
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
add	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_444170
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_58E450 endp

align 10h


; Attributes: bp-based frame

sub_58E4D0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_4ABDF0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58E4D0 endp

align 10h


; Attributes: bp-based frame

sub_58E530 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58E593
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	[ebp+var_5], cl
mov	dl, [ebp+var_5]
mov	[ebp+var_3], dl
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
add	edx, 10h
mov	eax, [ebp+var_10]
mov	[eax+4], edx
jmp	short loc_58E5B3

loc_58E593:
xor	ecx, ecx
mov	[ebp+var_1], cl
push	1
push	1
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_5AEAA0

loc_58E5B3:
mov	esp, ebp
pop	ebp
retn	4
sub_58E530 endp

align 10h


; Attributes: bp-based frame

sub_58E5C0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_592AF0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58E5C0 endp

align 10h


; Attributes: bp-based frame

sub_58E620 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58E67B
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_5BB580
add	esp, 0Ch
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 34h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_58E6A6

loc_58E67B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_596CE0

loc_58E6A6:
mov	esp, ebp
pop	ebp
retn	4
sub_58E620 endp

align 10h


; Attributes: bp-based frame

sub_58E6B0 proc	near

var_30=	dword ptr -30h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_58E6D4
jmp	short loc_58E6ED

loc_58E6D4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_595AD0

loc_58E6ED:
mov	esp, ebp
pop	ebp
retn
sub_58E6B0 endp

align 10h


; Attributes: bp-based frame

sub_58E700 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_18], eax
mov	[ebp+var_14], 80h
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 18h
idiv	ecx
mov	ecx, eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	edx, [edx]
sub	edx, [eax+4]
mov	eax, edx
cdq
mov	esi, 18h
idiv	esi
mov	edx, [ebp+var_18]
mov	edx, [edx+0Ch]
sub	edx, [ebp+var_4]
sar	edx, 2
sub	edx, 1
imul	edx, 5
add	edx, eax
add	edx, ecx
mov	eax, edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_58E700 endp

align 10h


; Attributes: bp-based frame

sub_58E780 proc	near

var_64=	dword ptr -64h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_64]
add	eax, 10h
mov	ecx, [ebp+var_C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_10]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
call	sub_5A6DE0
add	esp, 20h
mov	ecx, [ebp+var_64]
call	sub_597190
mov	esp, ebp
pop	ebp
retn
sub_58E780 endp

align 10h


; Attributes: bp-based frame

sub_58E7F0 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
cmp	edx, [ecx+14h]
jz	short loc_58E827
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
sub	ecx, 18h
mov	edx, [ebp+var_8]
mov	[edx+10h], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
push	ecx
call	sub_404B20
add	esp, 4
jmp	short loc_58E83E

loc_58E827:
mov	ecx, [ebp+var_8]
call	sub_597510
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
push	eax
call	sub_404B20
add	esp, 4

loc_58E83E:
mov	esp, ebp
pop	ebp
retn
sub_58E7F0 endp

align 10h


; Attributes: bp-based frame

sub_58E850 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_592C70
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58E850 endp

align 10h


; Attributes: bp-based frame

sub_58E8B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58E8EB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A6E40
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 68h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_58E916

loc_58E8EB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_597A10

loc_58E916:
mov	esp, ebp
pop	ebp
retn	4
sub_58E8B0 endp

align 10h


; Attributes: bp-based frame

sub_58E920 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58E95B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A6E90
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 50h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_58E986

loc_58E95B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_598000

loc_58E986:
mov	esp, ebp
pop	ebp
retn	4
sub_58E920 endp

align 10h


; Attributes: bp-based frame

sub_58E990 proc	near

var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_58E9B4
jmp	short loc_58E9CD

loc_58E9B4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_595B30

loc_58E9CD:
mov	esp, ebp
pop	ebp
retn
sub_58E990 endp

align 10h


; Attributes: bp-based frame

sub_58E9E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58EA1B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5C72C0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 30h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_58EA46

loc_58EA1B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_515DD0

loc_58EA46:
mov	esp, ebp
pop	ebp
retn	4
sub_58E9E0 endp

align 10h


; Attributes: bp-based frame

sub_58EA50 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_592E50
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_58EA50 endp

align 10h


; Attributes: bp-based frame

sub_58EA70 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_592F50
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58EA70 endp

align 10h


; Attributes: bp-based frame

sub_58EAD0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58EB0B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5C7430
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 4Ch
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_58EB36

loc_58EB0B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5990E0

loc_58EB36:
mov	esp, ebp
pop	ebp
retn	4
sub_58EAD0 endp

align 10h


; Attributes: bp-based frame

sub_58EB40 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58EB7B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A6EE0
add	esp, 8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 40h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_58EBA6

loc_58EB7B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_5992F0

loc_58EBA6:
mov	esp, ebp
pop	ebp
retn	4
sub_58EB40 endp

align 10h


; Attributes: bp-based frame

sub_58EBB0 proc	near

var_2C=	dword ptr -2Ch
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_58EBD4
jmp	short loc_58EBED

loc_58EBD4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_595BD0

loc_58EBED:
mov	esp, ebp
pop	ebp
retn
sub_58EBB0 endp

align 10h


; Attributes: bp-based frame

sub_58EC00 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58EC3B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A6F30
add	esp, 8
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 68h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_58EC66

loc_58EC3B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5997E0

loc_58EC66:
mov	esp, ebp
pop	ebp
retn	4
sub_58EC00 endp

align 10h


; Attributes: bp-based frame

sub_58EC70 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 4
cmp	[ebp+arg_0], edx
jnb	short loc_58ECCE
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
shl	ecx, 4
add	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_4]
jnz	short loc_58ECB3
jmp	short loc_58ECCC

loc_58ECB3:
xor	eax, eax
mov	[ebp+var_9], al
lea	ecx, [ebp+var_9]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_58ECCC:
jmp	short loc_58ECFF

loc_58ECCE:
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_34]
call	sub_59A1F0

loc_58ECFF:
mov	esp, ebp
pop	ebp
retn	8
sub_58EC70 endp

align 10h


; Attributes: bp-based frame

sub_58ED10 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 5Ch
idiv	ecx
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5931F0
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_68]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_64]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_58ED7F

loc_58ED76:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_58ED7F:
cmp	[ebp+var_2C], 0
jle	short loc_58EDA9
mov	eax, [ebp+var_64]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_57FF60
add	esp, 8
mov	edx, [ebp+var_64]
add	edx, 5Ch
mov	[ebp+var_64], edx
mov	eax, [ebp+var_28]
add	eax, 5Ch
mov	[ebp+var_28], eax
jmp	short loc_58ED76

loc_58EDA9:
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_6C]
mov	esp, ebp
pop	ebp
retn	4
sub_58ED10 endp

align 10h


; Attributes: bp-based frame

sub_58EDC0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_30]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58EDFB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_57FF60
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
add	ecx, 5Ch
mov	edx, [ebp+var_30]
mov	[edx+4], ecx
jmp	short loc_58EE26

loc_58EDFB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_2C], edx
xor	eax, eax
mov	[ebp+var_25], al
push	1
push	1
lea	ecx, [ebp+var_25]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
call	sub_57E500

loc_58EE26:
mov	esp, ebp
pop	ebp
retn	4
sub_58EDC0 endp

align 10h


; Attributes: bp-based frame

sub_58EE30 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58EE6B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5F1820
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 10h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_58EE8B

loc_58EE6B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5AEAA0

loc_58EE8B:
mov	esp, ebp
pop	ebp
retn	4
sub_58EE30 endp

align 10h


; Attributes: bp-based frame

sub_58EEA0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD1B0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_58EF19
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_58EF19
mov	ecx, [ebp+var_54]
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58EF19:
mov	esp, ebp
pop	ebp
retn
sub_58EEA0 endp

align 10h


; Attributes: bp-based frame

sub_58EF20 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58EF5B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_40]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A6F80
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
add	ecx, 1Ch
mov	edx, [ebp+var_40]
mov	[edx+4], ecx
jmp	short loc_58EF86

loc_58EF5B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_40]
mov	edx, [ecx+4]
mov	[ebp+var_3C], edx
xor	eax, eax
mov	[ebp+var_35], al
push	1
push	1
lea	ecx, [ebp+var_35]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_59A6A0

loc_58EF86:
mov	esp, ebp
pop	ebp
retn	4
sub_58EF20 endp

align 10h


; Attributes: bp-based frame

sub_58EF90 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD1E0
add	esp, 8
mov	edx, [ebp+var_5C]
cmp	dword ptr [edx], 0
jz	short loc_58F009
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_5C]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_58], eax
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_54], eax
cmp	[ebp+var_54], 0
jz	short loc_58F009
mov	ecx, [ebp+var_58]
imul	ecx, 5Ch
push	ecx		; int
mov	edx, [ebp+var_54]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58F009:
mov	esp, ebp
pop	ebp
retn
sub_58EF90 endp

align 10h


; Attributes: bp-based frame

sub_58F010 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58F06B
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_5BB670
add	esp, 0Ch
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 5Ch
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_58F096

loc_58F06B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_59A9E0

loc_58F096:
mov	esp, ebp
pop	ebp
retn	4
sub_58F010 endp

align 10h


; Attributes: bp-based frame

sub_58F0A0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A6FE0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_58F11C
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_58F11C
mov	ecx, [ebp+var_4C]
imul	ecx, 0A8h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58F11C:
mov	esp, ebp
pop	ebp
retn
sub_58F0A0 endp



; Attributes: bp-based frame

sub_58F120 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58F15E
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7010
add	esp, 8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 0A8h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_58F189

loc_58F15E:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_59AE90

loc_58F189:
mov	esp, ebp
pop	ebp
retn	4
sub_58F120 endp

align 10h


; Attributes: bp-based frame

sub_58F190 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_58F204
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 5
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_58F204
mov	edx, [ebp+var_54]
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_58F204:
mov	esp, ebp
pop	ebp
retn
sub_58F190 endp

align 10h


; Attributes: bp-based frame

sub_58F210 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD230
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_58F289
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_58F289
mov	ecx, [ebp+var_4C]
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58F289:
mov	esp, ebp
pop	ebp
retn
sub_58F210 endp

align 10h


; Attributes: bp-based frame

sub_58F290 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58F2EB
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; void *
call	sub_5CA8E0
add	esp, 0Ch
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 24h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_58F316

loc_58F2EB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_59B0B0

loc_58F316:
mov	esp, ebp
pop	ebp
retn	4
sub_58F290 endp

align 10h


; Attributes: bp-based frame

sub_58F320 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_58F394
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 6
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_58F394
mov	edx, [ebp+var_54]
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_58F394:
mov	esp, ebp
pop	ebp
retn
sub_58F320 endp

align 10h


; Attributes: bp-based frame

sub_58F3A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 6
cmp	[ebp+arg_0], edx
jnb	short loc_58F3FE
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
shl	ecx, 6
add	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_4]
jnz	short loc_58F3E3
jmp	short loc_58F3FC

loc_58F3E3:
xor	eax, eax
mov	[ebp+var_9], al
lea	ecx, [ebp+var_9]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_58F3FC:
jmp	short loc_58F42F

loc_58F3FE:
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_34]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 6
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_34]
call	sub_59B2E0

loc_58F42F:
mov	esp, ebp
pop	ebp
retn	8
sub_58F3A0 endp

align 10h


; Attributes: bp-based frame

sub_58F440 proc	near

var_38=	dword ptr -38h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
lea	eax, [ebp+var_4]
mov	ecx, [ebp+var_38]
call	sub_402EB0
lea	eax, [ebp+var_8]
mov	ecx, [ebp+var_38]
call	sub_4046E0

loc_58F45F:
lea	eax, [ebp+var_1C]
lea	ecx, [ebp+var_8]
call	sub_402EB0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_1C]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_58F4D2
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_58F4CA
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_436B00

loc_58F4CA:
mov	edx, [ebp+var_C]
mov	[ebp+var_4], edx
jmp	short loc_58F45F

loc_58F4D2:
mov	esp, ebp
pop	ebp
retn	4
sub_58F440 endp

align 10h


; Attributes: bp-based frame

sub_58F4E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_2= byte ptr	-2
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
push	edx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_10]
call	sub_489990
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
call	nullsub_1
lea	edx, [ebp+var_2]
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_403050
lea	ecx, [ebp+var_2]
call	nullsub_1
call	nullsub_1
mov	eax, [ebp+var_14]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_14]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+18h], xmm0
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_14]
call	sub_59BB20
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_58F4E0 endp



; Attributes: bp-based frame

sub_58F560 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_59C090
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_59BCA0
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_58F560 endp

align 10h


; Attributes: bp-based frame

sub_58F5B0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_58F62C
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 124h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_58F62C
mov	ecx, [ebp+var_54]
imul	ecx, 124h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58F62C:
mov	esp, ebp
pop	ebp
retn
sub_58F5B0 endp



; Attributes: bp-based frame

sub_58F630 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
xor	eax, eax
mov	[ebp+var_D], al
cmp	[ebp+var_C], 0
jz	short loc_58F681
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58F681:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58F630 endp

align 10h


; Attributes: bp-based frame

sub_58F6A0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
push	eax
mov	ecx, [ebp+var_20]
call	sub_5934E0
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_20]
mov	[ecx+4], eax
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_58F6A0 endp

align 10h


; Attributes: bp-based frame

sub_58F710 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
lea	eax, [ebp+var_84]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_98]
add	ecx, 10h
mov	edx, [ebp+var_C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_94]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_84]
mov	[edx], eax
mov	ecx, [ebp+var_80]
mov	[edx+4], ecx
mov	eax, [ebp+var_7C]
mov	[edx+8], eax
mov	ecx, [ebp+var_78]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_74]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[eax+4], edx
mov	ecx, [ebp+var_8C]
mov	[eax+8], ecx
mov	edx, [ebp+var_88]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_21], al
lea	ecx, [ebp+var_44]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_64]
mov	[edx], eax
mov	ecx, [ebp+var_60]
mov	[edx+4], ecx
mov	eax, [ebp+var_5C]
mov	[edx+8], eax
mov	ecx, [ebp+var_58]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_70]
mov	[eax+4], edx
mov	ecx, [ebp+var_6C]
mov	[eax+8], ecx
mov	edx, [ebp+var_68]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_98]
call	sub_59C2C0
mov	esp, ebp
pop	ebp
retn
sub_58F710 endp

align 10h


; Attributes: bp-based frame

sub_58F820 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+18h]
sub	ecx, 4
mov	edx, [ebp+var_C]
cmp	[edx+10h], ecx
jz	short loc_58F874
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
xor	edx, edx
mov	[ebp+var_3], dl
mov	al, [ebp+var_3]
mov	[ebp+var_1], al
xor	ecx, ecx
mov	[ebp+var_4], cl
mov	dl, [ebp+var_4]
mov	[ebp+var_2], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
add	ecx, 4
mov	edx, [ebp+var_C]
mov	[edx+10h], ecx
jmp	short loc_58F880

loc_58F874:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_59C460

loc_58F880:
mov	esp, ebp
pop	ebp
retn	4
sub_58F820 endp

align 10h


; Attributes: bp-based frame

sub_58F890 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_4AC540
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58F890 endp

align 10h


; Attributes: bp-based frame

sub_58F8F0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_489890
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58F8F0 endp

align 10h


; Attributes: bp-based frame

sub_58F950 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58F98B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_50E9D0
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 18h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_58F9AB

loc_58F98B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_50CF10

loc_58F9AB:
mov	esp, ebp
pop	ebp
retn	4
sub_58F950 endp

align 10h


; Attributes: bp-based frame

sub_58F9C0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FDA0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_58FA34
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_58FA34
mov	edx, [ebp+var_4C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_58FA34:
mov	esp, ebp
pop	ebp
retn
sub_58F9C0 endp

align 10h


; Attributes: bp-based frame

sub_58FA40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58FA7B
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx
call	sub_470230
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_58FAA6

loc_58FA7B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_4771D0

loc_58FAA6:
mov	esp, ebp
pop	ebp
retn	4
sub_58FA40 endp

align 10h


; Attributes: bp-based frame

sub_58FAB0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5C5D30
add	esp, 8
mov	edx, [ebp+var_54]
cmp	dword ptr [edx], 0
jz	short loc_58FB2C
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_54]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_58FB2C
mov	ecx, [ebp+var_50]
imul	ecx, 88h
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58FB2C:
mov	esp, ebp
pop	ebp
retn
sub_58FAB0 endp



; Attributes: bp-based frame

sub_58FB30 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 88h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_58FB96
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 88h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_58FB7B
jmp	short loc_58FB94

loc_58FB7B:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_595D30

loc_58FB94:
jmp	short loc_58FBCC

loc_58FB96:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_59C6D0

loc_58FBCC:
mov	esp, ebp
pop	ebp
retn	8
sub_58FB30 endp

align 10h


; Attributes: bp-based frame

sub_58FBE0 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_38]
call	sub_593790
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58FBE0 endp

align 10h


; Attributes: bp-based frame

sub_58FC40 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_595E40
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A7D40
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_58FC40 endp

align 10h


; Attributes: bp-based frame

sub_58FCC0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_58FC40
mov	esp, ebp
pop	ebp
retn	4
sub_58FCC0 endp

align 10h


; Attributes: bp-based frame

sub_58FCF0 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_5A7390
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_58FD4E
mov	ecx, 1
imul	ecx, 88h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58FD4E:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_58FCF0 endp

align 10h


; Attributes: bp-based frame

sub_58FD70 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_50B030
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_51CB30
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_58FD70 endp

align 10h


; Attributes: bp-based frame

sub_58FDC0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_50B080
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_51CBA0
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_58FDC0 endp

align 10h


; Attributes: bp-based frame

sub_58FE10 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_2]
mov	ecx, [ebp+var_2C]
mov	[ecx+14h], al
lea	ecx, [ebp+var_2]
call	sub_42CA30
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_58FE10 endp

align 10h


; Attributes: bp-based frame

sub_58FEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_593BD0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	esp, ebp
pop	ebp
retn
sub_58FEA0 endp

align 10h


; Attributes: bp-based frame

sub_58FEC0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A73C0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_58FF39
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_58FF39
mov	ecx, [ebp+var_4C]
imul	ecx, 70h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_58FF39:
mov	esp, ebp
pop	ebp
retn
sub_58FEC0 endp

align 10h


; Attributes: bp-based frame

sub_58FF40 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_58FF7B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A73F0
add	esp, 8
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 70h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_58FFA6

loc_58FF7B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_59D920

loc_58FFA6:
mov	esp, ebp
pop	ebp
retn	4
sub_58FF40 endp

align 10h


; Attributes: bp-based frame

sub_58FFB0 proc	near

var_3C=	dword ptr -3Ch
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_58FFD4
jmp	short loc_58FFED

loc_58FFD4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_595EA0

loc_58FFED:
mov	esp, ebp
pop	ebp
retn
sub_58FFB0 endp

align 10h


; Attributes: bp-based frame

sub_590000 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_593DB0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590000 endp

align 10h


; Attributes: bp-based frame

sub_590060 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_593E70
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_590060 endp

align 10h


; Attributes: bp-based frame

sub_590080 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_59DFF0
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_59DF80
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_590080 endp

align 10h


; Attributes: bp-based frame

sub_5900D0 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_593EC0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5900D0 endp

align 10h


; Attributes: bp-based frame

sub_590130 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_593F80
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590130 endp

align 10h


; Attributes: bp-based frame

sub_590190 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_594040
mov	esp, ebp
pop	ebp
retn	4
sub_590190 endp

align 10h


; Attributes: bp-based frame

sub_5901C0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7450
add	esp, 8
mov	edx, [ebp+var_A8]
cmp	dword ptr [edx], 0
jz	short loc_590260
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_A8]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 74h
idiv	ecx
mov	[ebp+var_A4], eax
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_A0], eax
cmp	[ebp+var_A0], 0
jz	short loc_590260
mov	ecx, [ebp+var_A4]
imul	ecx, 74h
push	ecx		; int
mov	edx, [ebp+var_A0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_590260:
mov	esp, ebp
pop	ebp
retn
sub_5901C0 endp

align 10h


; Attributes: bp-based frame

sub_590270 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_38]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5902CB
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_2C]
push	edx		; void *
call	sub_5BBA60
add	esp, 0Ch
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
add	ecx, 74h
mov	edx, [ebp+var_38]
mov	[edx+4], ecx
jmp	short loc_5902F6

loc_5902CB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	[ebp+var_34], edx
xor	eax, eax
mov	[ebp+var_2D], al
push	1
push	1
lea	ecx, [ebp+var_2D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_38]
call	sub_59E740

loc_5902F6:
mov	esp, ebp
pop	ebp
retn	4
sub_590270 endp

align 10h


; Attributes: bp-based frame

sub_590300 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
lea	eax, [ebp+var_34]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_596020
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_14]
mov	[eax+4], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_590300 endp

align 10h


; Attributes: bp-based frame

sub_590380 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	eax, [ebp+var_30]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_596020
mov	[ebp+var_18], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_590380 endp

align 10h


; Attributes: bp-based frame

sub_5903F0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_42BCF0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5903F0 endp

align 10h


; Attributes: bp-based frame

sub_590450 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_59ECD0
mov	esp, ebp
pop	ebp
retn
sub_590450 endp

align 10h


; Attributes: bp-based frame

sub_590470 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_594100
mov	esp, ebp
pop	ebp
retn	4
sub_590470 endp

align 10h


; Attributes: bp-based frame

sub_5904A0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_594180
mov	esp, ebp
pop	ebp
retn	4
sub_5904A0 endp

align 10h


; Attributes: bp-based frame

sub_5904D0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_2]
mov	ecx, [ebp+var_2C]
mov	[ecx+14h], al
call	nullsub_1
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_5904D0 endp

align 10h


; Attributes: bp-based frame

sub_590560 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_594260
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590560 endp

align 10h


; Attributes: bp-based frame

sub_5905C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0C8h
idiv	ecx
mov	esp, ebp
pop	ebp
retn
sub_5905C0 endp

align 10h


; Attributes: bp-based frame

sub_5905E0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7480
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_59065C
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 0C8h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_59065C
mov	ecx, [ebp+var_4C]
imul	ecx, 0C8h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59065C:
mov	esp, ebp
pop	ebp
retn
sub_5905E0 endp



; Attributes: bp-based frame

sub_590660 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5943E0
mov	esp, ebp
pop	ebp
retn	4
sub_590660 endp

align 10h


; Attributes: bp-based frame

sub_590690 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_5944B0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590690 endp

align 10h


; Attributes: bp-based frame

sub_5906F0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_508240
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_51C9E0
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_5906F0 endp

align 10h


; Attributes: bp-based frame

sub_590740 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_59077B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A74B0
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 10h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_59079B

loc_59077B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5AEAA0

loc_59079B:
mov	esp, ebp
pop	ebp
retn	4
sub_590740 endp

align 10h


; Attributes: bp-based frame

sub_5907B0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
push	eax
mov	ecx, [ebp+var_40]
call	sub_471350
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_1C]
sub	ecx, [ebp+var_38]
sar	ecx, 3
mov	[ebp+var_2C], ecx
jmp	short loc_590815

loc_59080C:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_590815:
cmp	[ebp+var_2C], 0
jle	short loc_59083F
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_5A7520
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 8
mov	[ebp+var_38], edx
mov	eax, [ebp+var_28]
add	eax, 8
mov	[ebp+var_28], eax
jmp	short loc_59080C

loc_59083F:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_5907B0 endp

align 10h


; Attributes: bp-based frame

sub_590860 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD260
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5908D4
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_5908D4
mov	edx, [ebp+var_4C]
shl	edx, 3
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5908D4:
mov	esp, ebp
pop	ebp
retn
sub_590860 endp

align 10h


; Attributes: bp-based frame

sub_5908E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_59091B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7520
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_590946

loc_59091B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_59F430

loc_590946:
mov	esp, ebp
pop	ebp
retn	4
sub_5908E0 endp

align 10h


; Attributes: bp-based frame

sub_590950 proc	near

var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_38]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_594570
mov	esp, ebp
pop	ebp
retn	4
sub_590950 endp

align 10h


; Attributes: bp-based frame

sub_590980 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_5A7590
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_5909DB
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5909DB:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590980 endp

align 10h


; Attributes: bp-based frame

sub_5909F0 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5945F0
mov	esp, ebp
pop	ebp
retn	4
sub_5909F0 endp

align 10h


; Attributes: bp-based frame

sub_590A20 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_594670
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590A20 endp

align 10h


; Attributes: bp-based frame

sub_590A80 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A75F0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_590AF9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_590AF9
mov	ecx, [ebp+var_4C]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_590AF9:
mov	esp, ebp
pop	ebp
retn
sub_590A80 endp

align 10h


; Attributes: bp-based frame

sub_590B00 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_590B3B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7620
add	esp, 8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 30h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_590B66

loc_590B3B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_59FC20

loc_590B66:
mov	esp, ebp
pop	ebp
retn	4
sub_590B00 endp

align 10h


; Attributes: bp-based frame

sub_590B70 proc	near

var_3C=	dword ptr -3Ch
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_590B94
jmp	short loc_590BAD

loc_590B94:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_596070

loc_590BAD:
mov	esp, ebp
pop	ebp
retn
sub_590B70 endp

align 10h


; Attributes: bp-based frame

sub_590BC0 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_5947E0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590BC0 endp

align 10h


; Attributes: bp-based frame

sub_590C20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx]
fstp	dword ptr [ecx+18h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_590C20 endp

align 10h


; Attributes: bp-based frame

sub_590C50 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_594950
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_590C50 endp

align 10h


; Attributes: bp-based frame

sub_590C70 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_24]
call	sub_594AB0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590C70 endp

align 10h


; Attributes: bp-based frame

sub_590CD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx+0Ch]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_5A76C0
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
sub	eax, 8
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
xor	ecx, ecx
mov	[ebp+var_9], cl
mov	esp, ebp
pop	ebp
retn
sub_590CD0 endp

align 10h


; Attributes: bp-based frame

sub_590D30 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_4811F0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_590D30 endp

align 10h


; Attributes: bp-based frame

sub_590D90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+18h]
sub	ecx, 4
mov	edx, [ebp+var_C]
cmp	[edx+10h], ecx
jz	short loc_590DE4
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
xor	edx, edx
mov	[ebp+var_3], dl
mov	al, [ebp+var_3]
mov	[ebp+var_1], al
xor	ecx, ecx
mov	[ebp+var_4], cl
mov	dl, [ebp+var_4]
mov	[ebp+var_2], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_C]
mov	eax, [edx+10h]
add	eax, 4
mov	ecx, [ebp+var_C]
mov	[ecx+10h], eax
jmp	short loc_590DF0

loc_590DE4:
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C]
call	sub_5A0970

loc_590DF0:
mov	esp, ebp
pop	ebp
retn	4
sub_590D90 endp

align 10h


; Attributes: bp-based frame

sub_590E00 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD290
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_590E74
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 7
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_590E74
mov	edx, [ebp+var_54]
shl	edx, 7
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_590E74:
mov	esp, ebp
pop	ebp
retn
sub_590E00 endp

align 10h


; Attributes: bp-based frame

sub_590E80 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_590EBE
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A76F0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 80h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_590EE9

loc_590EBE:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A1260

loc_590EE9:
mov	esp, ebp
pop	ebp
retn	4
sub_590E80 endp

align 10h


; Attributes: bp-based frame

sub_590EF0 proc	near

var_30=	dword ptr -30h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_590F14
jmp	short loc_590F2D

loc_590F14:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5961A0

loc_590F2D:
mov	esp, ebp
pop	ebp
retn
sub_590EF0 endp

align 10h


; Attributes: bp-based frame

sub_590F40 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_2]
mov	ecx, [ebp+var_2C]
mov	[ecx+14h], al
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_590F40 endp

align 10h


; Attributes: bp-based frame

sub_590FD0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A77B0
add	esp, 8
mov	edx, [ebp+var_54]
cmp	dword ptr [edx], 0
jz	short loc_591049
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_54]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_591049
mov	ecx, [ebp+var_50]
imul	ecx, 70h
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591049:
mov	esp, ebp
pop	ebp
retn
sub_590FD0 endp

align 10h


; Attributes: bp-based frame

sub_591050 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_59108B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5C8DF0
add	esp, 8
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 70h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_5910B6

loc_59108B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5A1F70

loc_5910B6:
mov	esp, ebp
pop	ebp
retn	4
sub_591050 endp

align 10h


; Attributes: bp-based frame

sub_5910C0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_591139
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_591139
mov	ecx, [ebp+var_54]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591139:
mov	esp, ebp
pop	ebp
retn
sub_5910C0 endp

align 10h


; Attributes: bp-based frame

sub_591140 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD2C0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_5911B4
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_54], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 0
jz	short loc_5911B4
mov	edx, [ebp+var_54]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_50]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5911B4:
mov	esp, ebp
pop	ebp
retn
sub_591140 endp

align 10h


; Attributes: bp-based frame

sub_5911C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5911FB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_591226

loc_5911FB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A2BB0

loc_591226:
mov	esp, ebp
pop	ebp
retn	4
sub_5911C0 endp

align 10h


; Attributes: bp-based frame

sub_591230 proc	near

var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_591254
jmp	short loc_59126D

loc_591254:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_5962A0

loc_59126D:
mov	esp, ebp
pop	ebp
retn
sub_591230 endp

align 10h


; Attributes: bp-based frame

sub_591280 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_1], 0
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
and	ecx, [ebp+arg_0]
jnz	short loc_59129C
mov	[ebp+var_1], 1

loc_59129C:
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
or	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	[ecx+4], eax
mov	al, [ebp+var_1]
mov	esp, ebp
pop	ebp
retn	4
sub_591280 endp

align 10h


; Attributes: bp-based frame

sub_5912C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
and	ecx, [ebp+arg_0]
jz	short loc_5912E8
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
and	eax, [ebp+arg_4]
jnz	short loc_5912E8
mov	[ebp+var_8], 1
jmp	short loc_5912EF

loc_5912E8:
mov	[ebp+var_8], 0

loc_5912EF:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	8
sub_5912C0 endp

align 10h


; Attributes: bp-based frame

sub_591300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+4], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_591300 endp

align 10h


; Attributes: bp-based frame

sub_591320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
sub	eax, 1
mov	ecx, [ebp+var_4]
cmp	[ecx+4], eax
jnz	short loc_591342
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+4], eax
mov	al, 1
jmp	short loc_591344

loc_591342:
xor	al, al

loc_591344:
mov	esp, ebp
pop	ebp
retn	4
sub_591320 endp

align 10h


; Attributes: bp-based frame

sub_591350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
cmp	ecx, [ebp+arg_0]
jl	short loc_591378
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
cmp	eax, [ebp+arg_4]
jge	short loc_591378
mov	[ebp+var_8], 1
jmp	short loc_59137F

loc_591378:
mov	[ebp+var_8], 0

loc_59137F:
mov	al, byte ptr [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	8
sub_591350 endp

align 10h


; Attributes: bp-based frame

sub_591390 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5258C0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_591409
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_591409
mov	ecx, [ebp+var_4C]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591409:
mov	esp, ebp
pop	ebp
retn
sub_591390 endp

align 10h


; Attributes: bp-based frame

sub_591410 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_59144B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A77E0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 64h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_591476

loc_59144B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A3330

loc_591476:
mov	esp, ebp
pop	ebp
retn	4
sub_591410 endp

align 10h


; Attributes: bp-based frame

sub_591480 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5914BB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_49C2D0
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_5914DB

loc_5914BB:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_50AB50

loc_5914DB:
mov	esp, ebp
pop	ebp
retn	4
sub_591480 endp

align 10h


; Attributes: bp-based frame

sub_5914F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_591533
mov	ecx, [ebp+var_4]
call	sub_F7DB50
mov	eax, 1
and	eax, 1
jz	short loc_59152B
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_59152B:
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx
jmp	short loc_59153A

loc_591533:
mov	[ebp+var_10], 0

loc_59153A:
mov	esp, ebp
pop	ebp
retn
sub_5914F0 endp

align 10h


; Attributes: bp-based frame

sub_591540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5935F0
mov	esp, ebp
pop	ebp
retn
sub_591540 endp

align 10h


; Attributes: bp-based frame

sub_591560 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_5915D9
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5915D9
mov	ecx, [ebp+var_54]
imul	ecx, 48h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5915D9:
mov	esp, ebp
pop	ebp
retn
sub_591560 endp

align 10h


; Attributes: bp-based frame

sub_5915E0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 48h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_591643
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 48h
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_591628
jmp	short loc_591641

loc_591628:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_591641:
jmp	short loc_591679

loc_591643:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5A4260

loc_591679:
mov	esp, ebp
pop	ebp
retn	8
sub_5915E0 endp

align 10h


; Attributes: bp-based frame

sub_591680 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5C62A0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5916F4
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_5916F4
mov	edx, [ebp+var_4C]
shl	edx, 3
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5916F4:
mov	esp, ebp
pop	ebp
retn
sub_591680 endp

align 10h


; Attributes: bp-based frame

sub_591700 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+arg_0], edx
jnb	short loc_59175E
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_591743
jmp	short loc_59175C

loc_591743:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_596350

loc_59175C:
jmp	short loc_59178F

loc_59175E:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5A42D0

loc_59178F:
mov	esp, ebp
pop	ebp
retn	8
sub_591700 endp

align 10h


; Attributes: bp-based frame

sub_5917A0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD320
add	esp, 8
mov	edx, [ebp+var_68]
cmp	dword ptr [edx], 0
jz	short loc_591819
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_68]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_64], eax
mov	edx, [ebp+var_68]
mov	eax, [edx]
mov	[ebp+var_60], eax
cmp	[ebp+var_60], 0
jz	short loc_591819
mov	ecx, [ebp+var_64]
imul	ecx, 60h
push	ecx		; int
mov	edx, [ebp+var_60]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591819:
mov	esp, ebp
pop	ebp
retn
sub_5917A0 endp

align 10h


; Attributes: bp-based frame

sub_591820 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_59185B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7830
add	esp, 8
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 60h
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_591886

loc_59185B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5A4340

loc_591886:
mov	esp, ebp
pop	ebp
retn	4
sub_591820 endp

align 10h


; Attributes: bp-based frame

sub_591890 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 5
push	eax
mov	ecx, [ebp+var_28]
call	sub_594F50
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_591890 endp

align 10h


; Attributes: bp-based frame

sub_591900 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= word ptr	-5
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
push	edi
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_591956
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	byte ptr [ebp+var_3+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	byte ptr [ebp+var_3], dl
mov	esi, [ebp+arg_0]
mov	ecx, 8
mov	edi, [ebp+var_C]
rep movsd
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 20h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_591976

loc_591956:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_4DF2C0

loc_591976:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_591900 endp

align 10h


; Attributes: bp-based frame

sub_591980 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7880
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_5919F9
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 7Ch
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5919F9
mov	ecx, [ebp+var_54]
imul	ecx, 7Ch
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5919F9:
mov	esp, ebp
pop	ebp
retn
sub_591980 endp

align 10h


; Attributes: bp-based frame

sub_591A00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_591A3B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A78B0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 7Ch
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_591A66

loc_591A3B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A4550

loc_591A66:
mov	esp, ebp
pop	ebp
retn	4
sub_591A00 endp

align 10h


; Attributes: bp-based frame

sub_591A70 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_591AD9
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 0
jz	short loc_591AB4
push	1
mov	eax, [ebp+var_C]
mov	edx, [eax]
mov	ecx, [ebp+var_C]
mov	eax, [edx]
call	eax
mov	[ebp+var_18], eax
jmp	short loc_591ABB

loc_591AB4:
mov	[ebp+var_18], 0

loc_591ABB:
mov	ecx, 1
and	ecx, 1
jz	short loc_591AD1
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_591AD1:
mov	eax, [ebp+var_4]
mov	[ebp+var_1C], eax
jmp	short loc_591AE0

loc_591AD9:
mov	[ebp+var_1C], 0

loc_591AE0:
mov	esp, ebp
pop	ebp
retn
sub_591A70 endp

align 10h


; Attributes: bp-based frame

sub_591AF0 proc	near

var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_591B14
jmp	short loc_591B2D

loc_591B14:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_28]
call	sub_57CB80

loc_591B2D:
mov	esp, ebp
pop	ebp
retn
sub_591AF0 endp

align 10h


; Attributes: bp-based frame

sub_591B40 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7900
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_591BB9
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_591BB9
mov	ecx, [ebp+var_54]
imul	ecx, 68h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591BB9:
mov	esp, ebp
pop	ebp
retn
sub_591B40 endp

align 10h


; Attributes: bp-based frame

sub_591BC0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7930
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_591C3C
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 90h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_591C3C
mov	ecx, [ebp+var_54]
imul	ecx, 90h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591C3C:
mov	esp, ebp
pop	ebp
retn
sub_591BC0 endp



; Attributes: bp-based frame

sub_591C40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_591C7E
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7960
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 90h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_591CA9

loc_591C7E:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A4BB0

loc_591CA9:
mov	esp, ebp
pop	ebp
retn	4
sub_591C40 endp

align 10h


; Attributes: bp-based frame

sub_591CB0 proc	near

var_30=	dword ptr -30h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_591CD4
jmp	short loc_591CED

loc_591CD4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5963C0

loc_591CED:
mov	esp, ebp
pop	ebp
retn
sub_591CB0 endp

align 10h


; Attributes: bp-based frame

sub_591D00 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A79C0
add	esp, 8
mov	edx, [ebp+var_AC]
cmp	dword ptr [edx], 0
jz	short loc_591DA0
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_AC]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_A8], eax
mov	edx, [ebp+var_AC]
mov	eax, [edx]
mov	[ebp+var_A4], eax
cmp	[ebp+var_A4], 0
jz	short loc_591DA0
mov	ecx, [ebp+var_A8]
imul	ecx, 58h
push	ecx		; int
mov	edx, [ebp+var_A4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591DA0:
mov	esp, ebp
pop	ebp
retn
sub_591D00 endp

align 10h


; Attributes: bp-based frame

sub_591DB0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_591DEB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5C98A0
add	esp, 8
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
add	ecx, 58h
mov	edx, [ebp+var_2C]
mov	[edx+4], ecx
jmp	short loc_591E16

loc_591DEB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_28], edx
xor	eax, eax
mov	[ebp+var_21], al
push	1
push	1
lea	ecx, [ebp+var_21]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_5A4DD0

loc_591E16:
mov	esp, ebp
pop	ebp
retn	4
sub_591DB0 endp

align 10h


; Attributes: bp-based frame

sub_591E20 proc	near

var_90=	dword ptr -90h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_591E50
jmp	short loc_591E6C

loc_591E50:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_90]
call	sub_596460

loc_591E6C:
mov	esp, ebp
pop	ebp
retn
sub_591E20 endp



; Attributes: bp-based frame

sub_591E70 proc	near

var_48=	dword ptr -48h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_48]
call	sub_594FC0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_591E70 endp

align 10h


; Attributes: bp-based frame

sub_591ED0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A79F0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_591F4C
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 98h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_591F4C
mov	ecx, [ebp+var_54]
imul	ecx, 98h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_591F4C:
mov	esp, ebp
pop	ebp
retn
sub_591ED0 endp



; Attributes: bp-based frame

sub_591F50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_591F8E
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_57DC10
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 98h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_591FB9

loc_591F8E:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A54F0

loc_591FB9:
mov	esp, ebp
pop	ebp
retn	4
sub_591F50 endp

align 10h


; Attributes: bp-based frame

sub_591FC0 proc	near

var_4C=	dword ptr -4Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4C]
call	sub_5951D0
mov	esp, ebp
pop	ebp
retn	4
sub_591FC0 endp

align 10h


; Attributes: bp-based frame

sub_592000 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_5A7A20
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_59205B
mov	ecx, 1
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59205B:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592000 endp

align 10h


; Attributes: bp-based frame

sub_592070 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_592000
mov	esp, ebp
pop	ebp
retn
sub_592070 endp



; Attributes: bp-based frame

sub_5920A0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_508970
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_51CA50
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_5920A0 endp

align 10h


; Attributes: bp-based frame

sub_5920F0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5920F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 2Ch
mov	[ebp+var_38], ecx
xor	eax, eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_34]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_38]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_38]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_38]
mov	[ecx+8], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_38]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_38]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_E]
mov	ecx, [ebp+var_38]
mov	[ecx+14h], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5920F0 endp

align 10h


; Attributes: bp-based frame

sub_5921B0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_595250
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5921B0 endp

align 10h


; Attributes: bp-based frame

sub_592210 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_58A290
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_5952C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_592210 endp



; Attributes: bp-based frame

sub_592250 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_595310
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592250 endp

align 10h


; Attributes: bp-based frame

sub_5922B0 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_5953D0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5922B0 endp

align 10h


; Attributes: bp-based frame

sub_592310 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_595490
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592310 endp

align 10h


; Attributes: bp-based frame

sub_592370 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
add	eax, 10h
mov	esp, ebp
pop	ebp
retn
sub_592370 endp

align 10h


; Attributes: bp-based frame

sub_5923A0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
call	sub_5A6360
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_402DB0
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_20], eax
push	0
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_504FC0
mov	ecx, [ebp+var_24]
add	ecx, 1
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_5923A0 endp

align 10h


; Attributes: bp-based frame

sub_5923F0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
lea	eax, [ebp+var_38]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_3C]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_596690
mov	[ebp+var_18], eax
mov	edx, [ebp+var_38]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_5923F0 endp

align 10h


; Attributes: bp-based frame

sub_592460 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_5A7B00
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_5924BB
mov	ecx, 1
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5924BB:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592460 endp

align 10h


; Attributes: bp-based frame

sub_5924D0 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_592460
mov	esp, ebp
pop	ebp
retn
sub_5924D0 endp



; Attributes: bp-based frame

sub_592500 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_595550
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592500 endp

align 10h


; Attributes: bp-based frame

sub_592560 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_595610
mov	esp, ebp
pop	ebp
retn	4
sub_592560 endp

align 10h


; Attributes: bp-based frame

sub_592590 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_5A7B40
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_5925EB
mov	ecx, 1
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5925EB:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592590 endp

align 10h


; Attributes: bp-based frame

sub_592600 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_59265B
mov	ecx, 1
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59265B:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592600 endp

align 10h


; Attributes: bp-based frame

sub_592670 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_5BBE10
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_592670 endp

align 10h


; Attributes: bp-based frame

sub_592730 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_595740
mov	esp, ebp
pop	ebp
retn	4
sub_592730 endp

align 10h


; Attributes: bp-based frame

sub_592760 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
add	eax, 8
push	eax		; void *
call	sub_5A8180
add	esp, 4
cmp	[ebp+var_C], 0
jz	short loc_5927BB
mov	ecx, 1
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5927BB:
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592760 endp

align 10h


; Attributes: bp-based frame

sub_5927D0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_5BBE70
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_5927D0 endp

align 10h


; Attributes: bp-based frame

sub_592890 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5957C0
mov	esp, ebp
pop	ebp
retn	4
sub_592890 endp

align 10h


; Attributes: bp-based frame

sub_5928C0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_5BBED0
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_5928C0 endp

align 10h


; Attributes: bp-based frame

sub_592980 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_595840
mov	esp, ebp
pop	ebp
retn	4
sub_592980 endp

align 10h


; Attributes: bp-based frame

sub_5929B0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_5959B0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5929B0 endp

align 10h


; Attributes: bp-based frame

sub_592A10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ecx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+24h]
mov	[ecx+24h], al
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_592A10 endp

align 10h


; Attributes: bp-based frame

sub_592A60 proc	near

var_38=	dword ptr -38h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_38]
cmp	dword ptr [eax], 0
jz	short loc_592A85
mov	ecx, [ebp+var_38]
mov	ecx, [ecx]
call	sub_40AA80

loc_592A85:
mov	edx, [ebp+var_38]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	edx, [edx+0Ch]
mov	[ecx+0Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_38]
add	ecx, 10h
call	sub_593720
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ecx+1Ch], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_0]
mov	al, [edx+24h]
mov	[ecx+24h], al
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_0]
mov	al, [edx+25h]
mov	[ecx+25h], al
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_592A60 endp

align 10h


; Attributes: bp-based frame

sub_592AF0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7BA0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_592B47
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_592B47:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_592AF0 endp

align 10h


; Attributes: bp-based frame

sub_592B60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
add	edx, 24h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_597200
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_592B60 endp

align 10h


; Attributes: bp-based frame

sub_592C00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
add	ecx, 18h
mov	edx, [ebp+var_C]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+8]
jnz	short loc_592C69
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 5
imul	ecx, 18h
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx], eax

loc_592C69:
mov	esp, ebp
pop	ebp
retn
sub_592C00 endp

align 10h


; Attributes: bp-based frame

sub_592C70 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_44A070
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_592CC7
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_592CC7:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_592C70 endp

align 10h


; Attributes: bp-based frame

sub_592CE0 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 50h
cmp	edx, [ebp+var_8]
jz	short loc_592D5C
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
add	ecx, 50h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_592D36

loc_592D2D:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_592D36:
cmp	[ebp+var_10], 0
jle	short loc_592D5C
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_587150
mov	ecx, [ebp+var_14]
add	ecx, 50h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
add	edx, 50h
mov	[ebp+var_18], edx
jmp	short loc_592D2D

loc_592D5C:
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
sub	ecx, 50h
mov	edx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
push	ecx		; void *
call	sub_5A7B70
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592CE0 endp

align 10h


; Attributes: bp-based frame

sub_592D90 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 30h
cmp	edx, [ebp+var_8]
jz	short loc_592E22
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
add	ecx, 30h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_592DE6

loc_592DDD:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_592DE6:
cmp	[ebp+var_10], 0
jle	short loc_592E22
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_14]
add	edx, 8
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+var_14]
add	eax, 30h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
add	ecx, 30h
mov	[ebp+var_18], ecx
jmp	short loc_592DDD

loc_592E22:
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
sub	eax, 30h
mov	ecx, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
push	eax		; void *
call	sub_5A7BA0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_592D90 endp

align 10h


; Attributes: bp-based frame

sub_592E50 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_592F37
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_598BC0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_592EF4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_592F08
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_592EF4

loc_592F08:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_592F1A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_592F2E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_592F1A

loc_592F2E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_592F37:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_592E50 endp

align 10h


; Attributes: bp-based frame

sub_592F50 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_44A0D0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_592FA7
mov	edx, 1
shl	edx, 7
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_592FA7:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_592F50 endp

align 10h


; Attributes: bp-based frame

sub_592FC0 proc	near

var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_38]
jz	short loc_593009
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_38]
call	sub_592F50
mov	eax, 1
jmp	short loc_59300B

loc_593009:
xor	eax, eax

loc_59300B:
mov	esp, ebp
pop	ebp
retn	4
sub_592FC0 endp

align 10h


; Attributes: bp-based frame

sub_593020 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 4Ch
cmp	edx, [ebp+var_8]
jz	short loc_59309C
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
add	ecx, 4Ch
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 4Ch
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_593076

loc_59306D:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_593076:
cmp	[ebp+var_10], 0
jle	short loc_59309C
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BDA60
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
add	edx, 4Ch
mov	[ebp+var_18], edx
jmp	short loc_59306D

loc_59309C:
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
sub	ecx, 4Ch
mov	edx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
push	ecx		; void *
call	sub_5A7BD0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_593020 endp

align 10h


; Attributes: bp-based frame

sub_5930D0 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 40h
cmp	edx, [ebp+var_8]
jz	short loc_593118
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
push	0
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 40h
push	eax
call	sub_5BBF30
add	esp, 14h

loc_593118:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
sub	edx, 40h
mov	eax, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_51B120
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5930D0 endp

align 10h


; Attributes: bp-based frame

sub_593140 proc	near

var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 5Ch
cmp	edx, [ebp+var_8]
jz	short loc_5931BC
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
add	ecx, 5Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_18]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_593196

loc_59318D:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_593196:
cmp	[ebp+var_10], 0
jle	short loc_5931BC
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_57FB00
mov	ecx, [ebp+var_18]
add	ecx, 5Ch
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 5Ch
mov	[ebp+var_1C], edx
jmp	short loc_59318D

loc_5931BC:
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
sub	ecx, 5Ch
mov	edx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
push	ecx		; void *
call	sub_5A7C00
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_593140 endp

align 10h


; Attributes: bp-based frame

sub_5931F0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_5D5F90
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 5Ch
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_5931F0 endp

align 10h


; Attributes: bp-based frame

sub_593260 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_4504F0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_5932A9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_595C40
mov	eax, 1
jmp	short loc_5932AB

loc_5932A9:
xor	eax, eax

loc_5932AB:
mov	esp, ebp
pop	ebp
retn	4
sub_593260 endp

align 10h


; Attributes: bp-based frame

sub_5932C0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5933A7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_59A340
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_593364:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_593378
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_593364

loc_593378:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_59338A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_59339E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_59338A

loc_59339E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5933A7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5932C0 endp

align 10h


; Attributes: bp-based frame

sub_5933C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593405
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59A610
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593405:
mov	esp, ebp
pop	ebp
retn
sub_5933C0 endp

align 10h


; Attributes: bp-based frame

sub_593410 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_593459
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_489890
mov	eax, 1
jmp	short loc_59345B

loc_593459:
xor	eax, eax

loc_59345B:
mov	esp, ebp
pop	ebp
retn	4
sub_593410 endp

align 10h


; Attributes: bp-based frame

sub_593470 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 20h
cmp	edx, [ebp+var_8]
jz	short loc_5934B2
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 20h
push	edx
call	sub_406610
add	esp, 0Ch

loc_5934B2:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
sub	ecx, 20h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_593470 endp

align 10h


; Attributes: bp-based frame

sub_5934E0 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_489990
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_4DEED0
mov	edx, [ebp+var_14]
mov	[edx], eax
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
imul	eax, 28h
mov	ecx, [ebp+var_14]
add	eax, [ecx]
mov	edx, [ebp+var_14]
mov	[edx+8], eax
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_5934E0 endp

align 10h


; Attributes: bp-based frame

sub_593550 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
add	edx, 24h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_59C320
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_593550 endp

align 10h


; Attributes: bp-based frame

sub_5935F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593635
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59C5C0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593635:
mov	esp, ebp
pop	ebp
retn
sub_5935F0 endp

align 10h


; Attributes: bp-based frame

sub_593640 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 18h
cmp	edx, [ebp+var_8]
jz	short loc_593682
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
call	sub_406610
add	esp, 0Ch

loc_593682:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
sub	ecx, 18h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_593640 endp

align 10h


; Attributes: bp-based frame

sub_5936B0 proc	near

var_20=	dword ptr -20h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
cmp	edx, [ebp+var_8]
jz	short loc_5936F0
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 4
push	edx
call	sub_5A7C70
add	esp, 10h

loc_5936F0:
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
sub	ecx, 4
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
push	ecx
call	sub_475F30
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5936B0 endp

align 10h


; Attributes: bp-based frame

sub_593720 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 88h
idiv	ecx
push	eax
mov	ecx, [ebp+var_40]
call	sub_595DD0
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
push	0
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_20]
push	eax
call	sub_5BBFC0
add	esp, 14h
mov	ecx, [ebp+var_40]
mov	[ecx+4], eax
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_593720 endp



; Attributes: bp-based frame

sub_593790 proc	near

var_40=	dword ptr -40h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_40]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_40]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7D00
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5937E7
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5937E7:
mov	ecx, [ebp+var_40]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_40]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_593790 endp

align 10h


; Attributes: bp-based frame

sub_593800 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593845
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59C750
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593845:
mov	esp, ebp
pop	ebp
retn
sub_593800 endp

align 10h


; Attributes: bp-based frame

sub_593850 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_593899
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_469EC0
mov	eax, 1
jmp	short loc_59389B

loc_593899:
xor	eax, eax

loc_59389B:
mov	esp, ebp
pop	ebp
retn	4
sub_593850 endp

align 10h


; Attributes: bp-based frame

sub_5938B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5938F5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59C9A0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5938F5:
mov	esp, ebp
pop	ebp
retn
sub_5938B0 endp

align 10h


; Attributes: bp-based frame

sub_593900 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_595E40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 8
push	ecx		; void *
call	sub_5A7D40
add	esp, 8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_593900 endp

align 10h


; Attributes: bp-based frame

sub_593940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593985
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59CC00
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593985:
mov	esp, ebp
pop	ebp
retn
sub_593940 endp

align 10h


; Attributes: bp-based frame

sub_593990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5939D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59D1B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5939D5:
mov	esp, ebp
pop	ebp
retn
sub_593990 endp

align 10h


; Attributes: bp-based frame

sub_5939E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_593AC7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_59D210
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_593A84:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_593A98
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_593A84

loc_593A98:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_593AAA:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_593ABE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_593AAA

loc_593ABE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_593AC7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5939E0 endp

align 10h


; Attributes: bp-based frame

sub_593AE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593B25
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59D2F0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593B25:
mov	esp, ebp
pop	ebp
retn
sub_593AE0 endp

align 10h


; Attributes: bp-based frame

sub_593B30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593B75
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59D4E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593B75:
mov	esp, ebp
pop	ebp
retn
sub_593B30 endp

align 10h


; Attributes: bp-based frame

sub_593B80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593BC5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59D6D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593BC5:
mov	esp, ebp
pop	ebp
retn
sub_593B80 endp

align 10h


; Attributes: bp-based frame

sub_593BD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593C15
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59D8C0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593C15:
mov	esp, ebp
pop	ebp
retn
sub_593BD0 endp

align 10h


; Attributes: bp-based frame

sub_593C20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593C65
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59DB30
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593C65:
mov	esp, ebp
pop	ebp
retn
sub_593C20 endp

align 10h


; Attributes: bp-based frame

sub_593C70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593CB5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59DB90
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593CB5:
mov	esp, ebp
pop	ebp
retn
sub_593C70 endp

align 10h


; Attributes: bp-based frame

sub_593CC0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593D05
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59DBF0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593D05:
mov	esp, ebp
pop	ebp
retn
sub_593CC0 endp

align 10h


; Attributes: bp-based frame

sub_593D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593D55
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59DC50
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593D55:
mov	esp, ebp
pop	ebp
retn
sub_593D10 endp

align 10h


; Attributes: bp-based frame

sub_593D60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593DA5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59DCC0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593DA5:
mov	esp, ebp
pop	ebp
retn
sub_593D60 endp

align 10h


; Attributes: bp-based frame

sub_593DB0 proc	near

var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5BDB40
cmp	[ebp+var_4], 0
jz	short loc_593E0A
mov	edx, 1
imul	edx, 64h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_593E0A:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_593DB0 endp

align 10h


; Attributes: bp-based frame

sub_593E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593E65
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59DD30
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593E65:
mov	esp, ebp
pop	ebp
retn
sub_593E20 endp

align 10h


; Attributes: bp-based frame

sub_593E70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593EB5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59DE40
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593EB5:
mov	esp, ebp
pop	ebp
retn
sub_593E70 endp

align 10h


; Attributes: bp-based frame

sub_593EC0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7DB0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_593F1A
mov	edx, 1
imul	edx, 88h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_593F1A:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_593EC0 endp

align 10h


; Attributes: bp-based frame

sub_593F30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_593F75
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59E040
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_593F75:
mov	esp, ebp
pop	ebp
retn
sub_593F30 endp

align 10h


; Attributes: bp-based frame

sub_593F80 proc	near

var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5BDB90
cmp	[ebp+var_4], 0
jz	short loc_593FDA
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_593FDA:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_593F80 endp

align 10h


; Attributes: bp-based frame

sub_593FF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594035
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59E6D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594035:
mov	esp, ebp
pop	ebp
retn
sub_593FF0 endp

align 10h


; Attributes: bp-based frame

sub_594040 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_596830
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A7AA0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_594040 endp

align 10h


; Attributes: bp-based frame

sub_5940C0 proc	near

var_88=	dword ptr -88h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5940DC
mov	eax, [ebp+arg_0]
jmp	short loc_5940F8

loc_5940DC:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_88]
call	sub_595F70

loc_5940F8:
mov	esp, ebp
pop	ebp
retn	8
sub_5940C0 endp

align 10h


; Attributes: bp-based frame

sub_594100 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5967D0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A8240
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_594100 endp

align 10h


; Attributes: bp-based frame

sub_594180 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5DDE90
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A82A0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_594180 endp

align 10h


; Attributes: bp-based frame

sub_594200 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_594249
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_489890
mov	eax, 1
jmp	short loc_59424B

loc_594249:
xor	eax, eax

loc_59424B:
mov	esp, ebp
pop	ebp
retn	4
sub_594200 endp

align 10h


; Attributes: bp-based frame

sub_594260 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7DE0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5942B7
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5942B7:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_594260 endp

align 10h


; Attributes: bp-based frame

sub_5942D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594315
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59EEC0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594315:
mov	esp, ebp
pop	ebp
retn
sub_5942D0 endp

align 10h


; Attributes: bp-based frame

sub_594320 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 0C8h
cmp	edx, [ebp+var_8]
jz	short loc_5943A8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0C8h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 0C8h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_59437C

loc_594373:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_59437C:
cmp	[ebp+var_10], 0
jle	short loc_5943A8
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BDBE0
mov	ecx, [ebp+var_14]
add	ecx, 0C8h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
add	edx, 0C8h
mov	[ebp+var_18], edx
jmp	short loc_594373

loc_5943A8:
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
sub	ecx, 0C8h
mov	edx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
push	ecx		; void *
call	sub_5A7E50
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_594320 endp

align 10h


; Attributes: bp-based frame

sub_5943E0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_596830
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_47E2E0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5943E0 endp

align 10h


; Attributes: bp-based frame

sub_594460 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
xor	eax, eax
mov	[ebp+var_8], eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[eax+4], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_594460 endp

align 10h


; Attributes: bp-based frame

sub_5944B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7E80
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_594507
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_594507:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5944B0 endp

align 10h


; Attributes: bp-based frame

sub_594520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594565
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59F2D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594565:
mov	esp, ebp
pop	ebp
retn
sub_594520 endp

align 10h


; Attributes: bp-based frame

sub_594570 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
push	1
mov	ecx, [ebp+var_2C]
call	sub_596830
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A8310
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_594570 endp

align 10h


; Attributes: bp-based frame

sub_5945F0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503180
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A83C0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5945F0 endp

align 10h


; Attributes: bp-based frame

sub_594670 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7EB0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5946C7
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5946C7:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_594670 endp

align 10h


; Attributes: bp-based frame

sub_5946E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594725
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59F9D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594725:
mov	esp, ebp
pop	ebp
retn
sub_5946E0 endp

align 10h


; Attributes: bp-based frame

sub_594730 proc	near

var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 30h
cmp	edx, [ebp+var_8]
jz	short loc_5947AC
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
add	ecx, 30h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_24]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_594786

loc_59477D:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_594786:
cmp	[ebp+var_10], 0
jle	short loc_5947AC
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5BDCA0
mov	ecx, [ebp+var_1C]
add	ecx, 30h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_20]
add	edx, 30h
mov	[ebp+var_20], edx
jmp	short loc_59477D

loc_5947AC:
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
sub	ecx, 30h
mov	edx, [ebp+var_2C]
mov	[edx+4], ecx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
push	ecx		; void *
call	sub_5A7EE0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_594730 endp

align 10h


; Attributes: bp-based frame

sub_5947E0 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_28]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_28]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7F20
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_594837
mov	edx, 1
imul	edx, 7Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_594837:
mov	ecx, [ebp+var_28]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_28]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5947E0 endp

align 10h


; Attributes: bp-based frame

sub_594850 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594895
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_59FE30
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594895:
mov	esp, ebp
pop	ebp
retn
sub_594850 endp

align 10h


; Attributes: bp-based frame

sub_5948A0 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_5948E9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_501200
mov	eax, 1
jmp	short loc_5948EB

loc_5948E9:
xor	eax, eax

loc_5948EB:
mov	esp, ebp
pop	ebp
retn	4
sub_5948A0 endp

align 10h


; Attributes: bp-based frame

sub_594900 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594945
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A0060
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594945:
mov	esp, ebp
pop	ebp
retn
sub_594900 endp

align 10h


; Attributes: bp-based frame

sub_594950 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_594A37
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5A05A0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5949F4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_594A08
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5949F4

loc_594A08:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_594A1A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_594A2E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_594A1A

loc_594A2E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_594A37:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_594950 endp

align 10h


; Attributes: bp-based frame

sub_594A50 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BC040
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_594A99
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_489890
mov	eax, 1
jmp	short loc_594A9B

loc_594A99:
xor	eax, eax

loc_594A9B:
mov	esp, ebp
pop	ebp
retn	4
sub_594A50 endp

align 10h


; Attributes: bp-based frame

sub_594AB0 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_14]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7F60
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_594B07
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_594B07:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_14]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_594AB0 endp

align 10h


; Attributes: bp-based frame

sub_594B20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594B65
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A0680
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594B65:
mov	esp, ebp
pop	ebp
retn
sub_594B20 endp

align 10h


; Attributes: bp-based frame

sub_594B70 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_594BAB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7FE0
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_594BCB

loc_594BAB:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_50AB50

loc_594BCB:
mov	esp, ebp
pop	ebp
retn	4
sub_594B70 endp

align 10h


; Attributes: bp-based frame

sub_594BE0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_594C2D
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_594C2D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_594BE0 endp

align 10h


; Attributes: bp-based frame

sub_594C50 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_84], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_84]
call	sub_5A8040
lea	edx, [ebp+var_54]
mov	[ebp+var_34], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_58]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
lea	ecx, [ebp+var_39]
push	ecx
lea	edx, [ebp+var_54]
push	edx
lea	eax, [ebp+var_58]
push	eax
call	sub_5DE580
add	esp, 0Ch
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_C], ecx
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_5C]
call	sub_4046E0
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	ecx, [ebp+var_84]
call	sub_596110
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_594C50 endp

align 10h


; Attributes: bp-based frame

sub_594CF0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 7
push	eax
mov	ecx, [ebp+var_40]
call	sub_596230
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_1C]
sub	ecx, [ebp+var_38]
sar	ecx, 7
mov	[ebp+var_2C], ecx
jmp	short loc_594D55

loc_594D4C:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_594D55:
cmp	[ebp+var_2C], 0
jle	short loc_594D84
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_5A76F0
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 80h
mov	[ebp+var_38], edx
mov	eax, [ebp+var_28]
add	eax, 80h
mov	[ebp+var_28], eax
jmp	short loc_594D4C

loc_594D84:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_594CF0 endp

align 10h


; Attributes: bp-based frame

sub_594DA0 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_594DE9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_501200
mov	eax, 1
jmp	short loc_594DEB

loc_594DE9:
xor	eax, eax

loc_594DEB:
mov	esp, ebp
pop	ebp
retn	4
sub_594DA0 endp

align 10h


; Attributes: bp-based frame

sub_594E00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_594E45
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A2F80
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_594E45:
mov	esp, ebp
pop	ebp
retn
sub_594E00 endp

align 10h


; Attributes: bp-based frame

sub_594E50 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_594F37
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5A40F0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_594EF4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_594F08
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_594EF4

loc_594F08:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_594F1A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_594F2E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_594F1A

loc_594F2E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_594F37:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_594E50 endp

align 10h


; Attributes: bp-based frame

sub_594F50 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4DEF50
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
shl	edx, 5
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_594F50 endp

align 10h


; Attributes: bp-based frame

sub_594FC0 proc	near

var_68=	dword ptr -68h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_68]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_68]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A80B0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_595017
mov	edx, 1
imul	edx, 70h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_595017:
mov	ecx, [ebp+var_68]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_68]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_594FC0 endp

align 10h


; Attributes: bp-based frame

sub_595030 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_595075
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A4FE0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_595075:
mov	esp, ebp
pop	ebp
retn
sub_595030 endp

align 10h


; Attributes: bp-based frame

sub_595080 proc	near

var_28=	dword ptr -28h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_595096
mov	eax, [ebp+arg_0]
jmp	short loc_5950AF

loc_595096:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_596510

loc_5950AF:
mov	esp, ebp
pop	ebp
retn	8
sub_595080 endp

align 10h


; Attributes: bp-based frame

sub_5950C0 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_524460
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_595109
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_5965B0
mov	eax, 1
jmp	short loc_59510B

loc_595109:
xor	eax, eax

loc_59510B:
mov	esp, ebp
pop	ebp
retn	4
sub_5950C0 endp

align 10h


; Attributes: bp-based frame

sub_595120 proc	near

var_3C=	dword ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5BC040
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_3C]
jz	short loc_595169
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_3C]
call	sub_596620
mov	eax, 1
jmp	short loc_59516B

loc_595169:
xor	eax, eax

loc_59516B:
mov	esp, ebp
pop	ebp
retn	4
sub_595120 endp

align 10h


; Attributes: bp-based frame

sub_595180 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5951C5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A5710
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5951C5:
mov	esp, ebp
pop	ebp
retn
sub_595180 endp

align 10h


; Attributes: bp-based frame

sub_5951D0 proc	near

var_3C=	dword ptr -3Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_503180
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A8510
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5951D0 endp

align 10h


; Attributes: bp-based frame

sub_595250 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_5952A0
mov	edx, 1
imul	edx, 88h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5952A0:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_595250 endp

align 10h


; Attributes: bp-based frame

sub_5952C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_595305
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A5A10
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_595305:
mov	esp, ebp
pop	ebp
retn
sub_5952C0 endp

align 10h


; Attributes: bp-based frame

sub_595310 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_59535D
mov	edx, 1
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59535D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_595310 endp

align 10h


; Attributes: bp-based frame

sub_595380 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5953C5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A5C00
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5953C5:
mov	esp, ebp
pop	ebp
retn
sub_595380 endp

align 10h


; Attributes: bp-based frame

sub_5953D0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A8120
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_595427
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_595427:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5953D0 endp

align 10h


; Attributes: bp-based frame

sub_595440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_595485
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A5FF0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_595485:
mov	esp, ebp
pop	ebp
retn
sub_595440 endp

align 10h


; Attributes: bp-based frame

sub_595490 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+var_4], 0
jz	short loc_5954DD
mov	edx, 1
imul	edx, 78h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5954DD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_595490 endp

align 10h


; Attributes: bp-based frame

sub_595500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_595545
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A61E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_595545:
mov	esp, ebp
pop	ebp
retn
sub_595500 endp

align 10h


; Attributes: bp-based frame

sub_595550 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5F07D0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5955A7
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5955A7:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_595550 endp

align 10h


; Attributes: bp-based frame

sub_5955C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_595605
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A6420
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_595605:
mov	esp, ebp
pop	ebp
retn
sub_5955C0 endp

align 10h


; Attributes: bp-based frame

sub_595610 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5DDE90
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A8570
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595610 endp

align 10h


; Attributes: bp-based frame

sub_595690 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BC040
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_5956D9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_5966E0
mov	eax, 1
jmp	short loc_5956DB

loc_5956D9:
xor	eax, eax

loc_5956DB:
mov	esp, ebp
pop	ebp
retn	4
sub_595690 endp

align 10h


; Attributes: bp-based frame

sub_5956F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_595735
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A6570
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_595735:
mov	esp, ebp
pop	ebp
retn
sub_5956F0 endp

align 10h


; Attributes: bp-based frame

sub_595740 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_526980
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A85F0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595740 endp

align 10h


; Attributes: bp-based frame

sub_5957C0 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5DDEF0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5A8650
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5957C0 endp

align 10h


; Attributes: bp-based frame

sub_595840 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_503180
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5C9FC0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595840 endp

align 10h


; Attributes: bp-based frame

sub_5958C0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_59599B
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5A6AE0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_595958:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_59596C
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_595958

loc_59596C:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_59597E:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_595992
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_59597E

loc_595992:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_59599B:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5958C0 endp



; Attributes: bp-based frame

sub_5959B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A8180
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_595A07
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_595A07:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5959B0 endp

align 10h


; Attributes: bp-based frame

sub_595A20 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BC0D0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_595A69
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_5959B0
mov	eax, 1
jmp	short loc_595A6B

loc_595A69:
xor	eax, eax

loc_595A6B:
mov	esp, ebp
pop	ebp
retn	4
sub_595A20 endp

align 10h


; Attributes: bp-based frame

sub_595A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_595AC5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5A6BC0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_595AC5:
mov	esp, ebp
pop	ebp
retn
sub_595A80 endp

align 10h


; Attributes: bp-based frame

sub_595AD0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_5], al
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5A81B0
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
push	0
mov	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5BC170
add	esp, 0Ch
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595AD0 endp

align 10h


; Attributes: bp-based frame

sub_595B30 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_595B6F

loc_595B66:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_595B6F:
cmp	[ebp+var_C], 0
jle	short loc_595B95
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_587150
mov	ecx, [ebp+var_10]
add	ecx, 50h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 50h
mov	[ebp+var_14], edx
jmp	short loc_595B66

loc_595B95:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
push	0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC1C0
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595B30 endp

align 10h


; Attributes: bp-based frame

sub_595BD0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
push	0
lea	eax, [ebp+var_6]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_5BBF30
add	esp, 14h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC210
add	esp, 0Ch
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595BD0 endp

align 10h


; Attributes: bp-based frame

sub_595C40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4054E0
cmp	[ebp+var_4], 0
jz	short loc_595C93
mov	ecx, 1
imul	ecx, 38h
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_595C93:
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
sub	ecx, 1
mov	edx, [ebp+var_C]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_595C40 endp

align 10h


; Attributes: bp-based frame

sub_595CB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	[ebp+var_4]
add	esp, 8
mov	esp, ebp
pop	ebp
retn	8
sub_595CB0 endp

align 10h


; Attributes: bp-based frame

sub_595CE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	[ebp+var_4]
add	esp, 10h
mov	esp, ebp
pop	ebp
retn	10h
sub_595CE0 endp

align 10h


; Attributes: bp-based frame

sub_595D10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_59BCA0
mov	esp, ebp
pop	ebp
retn
sub_595D10 endp

align 10h


; Attributes: bp-based frame

sub_595D30 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_18]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_595D6F

loc_595D66:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_595D6F:
cmp	[ebp+var_C], 0
jle	short loc_595D9B
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_5BDD40
mov	ecx, [ebp+var_18]
add	ecx, 88h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 88h
mov	[ebp+var_1C], edx
jmp	short loc_595D66

loc_595D9B:
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
mov	[ebp+var_30], edx
push	0
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC260
add	esp, 0Ch
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595D30 endp

align 10h


; Attributes: bp-based frame

sub_595DD0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_596750
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 88h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_595DD0 endp

align 10h


; Attributes: bp-based frame

sub_595E40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1E1E1E1h
jbe	short loc_595E66
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_595E66:
cmp	[ebp+arg_0], 0
jz	short loc_595E8F
mov	eax, [ebp+arg_0]
imul	eax, 88h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_595E96

loc_595E8F:
mov	[ebp+var_C], 0

loc_595E96:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_595E40 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_595EA0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_18]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_595EDF

loc_595ED6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_595EDF:
cmp	[ebp+var_C], 0
jle	short loc_595F11
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_589950
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	al, [edx+68h]
mov	[ecx+68h], al
mov	ecx, [ebp+var_18]
add	ecx, 70h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 70h
mov	[ebp+var_1C], edx
jmp	short loc_595ED6

loc_595F11:
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_2C], edx
push	0
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC2B0
add	esp, 0Ch
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595EA0 endp

align 10h


; Attributes: bp-based frame

sub_595F50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
call	sub_59DF80
mov	esp, ebp
pop	ebp
retn
sub_595F50 endp

align 10h


; Attributes: bp-based frame

sub_595F70 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 74h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_595FB8

loc_595FAF:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_595FB8:
cmp	[ebp+var_C], 0
jle	short loc_595FDE
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BDDC0
mov	ecx, [ebp+var_14]
add	ecx, 74h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
add	edx, 74h
mov	[ebp+var_18], edx
jmp	short loc_595FAF

loc_595FDE:
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
mov	[ebp+var_80], edx
push	0
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC330
add	esp, 0Ch
mov	edx, [ebp+var_84]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_595F70 endp

align 10h


; Attributes: bp-based frame

sub_596020 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_503490
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	ax, [edx]
mov	[ecx+8], ax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_596020 endp

align 10h


; Attributes: bp-based frame

sub_596070 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_18]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5960AF

loc_5960A6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5960AF:
cmp	[ebp+var_C], 0
jle	short loc_5960D5
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_5BDCA0
mov	ecx, [ebp+var_18]
add	ecx, 30h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
add	edx, 30h
mov	[ebp+var_1C], edx
jmp	short loc_5960A6

loc_5960D5:
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_2C], edx
push	0
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC380
add	esp, 0Ch
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_596070 endp

align 10h


; Attributes: bp-based frame

sub_596110 proc	near

var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
cmp	ecx, [eax+8]
jnz	short loc_596136
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_24]
jnz	short loc_596136
mov	ecx, [ebp+var_24]
call	sub_4892A0
jmp	short loc_596190

loc_596136:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_596190
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_14]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_14]
mov	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_24]
call	sub_4AC540
jmp	short loc_596136

loc_596190:
mov	esp, ebp
pop	ebp
retn	8
sub_596110 endp

align 10h


; Attributes: bp-based frame

sub_5961A0 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_10]
sar	edx, 7
mov	[ebp+var_C], edx
jmp	short loc_5961DA

loc_5961D1:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_5961DA:
cmp	[ebp+var_C], 0
jle	short loc_596205
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_5893E0
mov	edx, [ebp+var_10]
add	edx, 80h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
add	eax, 80h
mov	[ebp+var_14], eax
jmp	short loc_5961D1

loc_596205:
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5A8420
add	esp, 8
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5961A0 endp



; Attributes: bp-based frame

sub_596230 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_596890
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
shl	edx, 7
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_596230 endp

align 10h


; Attributes: bp-based frame

sub_5962A0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_10]
sar	edx, 2
mov	[ebp+var_C], edx
jmp	short loc_5962DA

loc_5962D1:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_5962DA:
cmp	[ebp+var_C], 0
jle	short loc_5962FE
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_10]
add	ecx, 4
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 4
mov	[ebp+var_14], edx
jmp	short loc_5962D1

loc_5962FE:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
xor	eax, eax
mov	[ebp+var_19], al
mov	ecx, [ebp+var_4]
mov	[ebp+var_20], ecx
jmp	short loc_596323

loc_59631A:
mov	edx, [ebp+var_20]
add	edx, 4
mov	[ebp+var_20], edx

loc_596323:
mov	eax, [ebp+var_20]
cmp	eax, [ebp+var_24]
jz	short loc_596332
xor	ecx, ecx
mov	[ebp+var_1A], cl
jmp	short loc_59631A

loc_596332:
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5962A0 endp

align 10h


; Attributes: bp-based frame

sub_596350 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
push	0
lea	eax, [ebp+var_6]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_5BC3E0
add	esp, 14h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
push	0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC480
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_596350 endp

align 10h


; Attributes: bp-based frame

sub_5963C0 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 90h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5963FF

loc_5963F6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5963FF:
cmp	[ebp+var_C], 0
jle	short loc_59642B
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_58B9B0
mov	ecx, [ebp+var_10]
add	ecx, 90h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 90h
mov	[ebp+var_14], edx
jmp	short loc_5963F6

loc_59642B:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5A8460
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5963C0 endp

align 10h


; Attributes: bp-based frame

sub_596460 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5964A8

loc_59649F:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5964A8:
cmp	[ebp+var_C], 0
jle	short loc_5964CE
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5BDF30
mov	ecx, [ebp+var_10]
add	ecx, 58h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 58h
mov	[ebp+var_14], edx
jmp	short loc_59649F

loc_5964CE:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
mov	[ebp+var_80], edx
push	0
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5BC4D0
add	esp, 0Ch
mov	edx, [ebp+var_84]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_596460 endp

align 10h


; Attributes: bp-based frame

sub_596510 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 98h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_59654F

loc_596546:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_59654F:
cmp	[ebp+var_C], 0
jle	short loc_59657B
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5BDF90
mov	ecx, [ebp+var_10]
add	ecx, 98h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 98h
mov	[ebp+var_14], edx
jmp	short loc_596546

loc_59657B:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5A84A0
add	esp, 8
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_596510 endp

align 10h


; Attributes: bp-based frame

sub_5965B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_51B120
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_596607
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_596607:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5965B0 endp

align 10h


; Attributes: bp-based frame

sub_596620 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_14]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A84E0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_596677
mov	edx, 1
imul	edx, 5Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_596677:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_14]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_596620 endp

align 10h


; Attributes: bp-based frame

sub_596690 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_526500
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 8
push	eax		; void *
call	sub_5BC560
add	esp, 0Ch
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_596690 endp

align 10h


; Attributes: bp-based frame

sub_5966E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7B70
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_596737
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_596737:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5966E0 endp

align 10h


; Attributes: bp-based frame

sub_596750 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 1E1E1E1h
jbe	short loc_59677B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_59677B:
cmp	[ebp+arg_0], 0
jz	short loc_5967B5
mov	ecx, [ebp+arg_0]
imul	ecx, 88h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 88h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5967BC

loc_5967B5:
mov	[ebp+var_10], 0

loc_5967BC:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_596750 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5967D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1A41A41h
jbe	short loc_5967F6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5967F6:
cmp	[ebp+arg_0], 0
jz	short loc_59681F
mov	eax, [ebp+arg_0]
imul	eax, 9Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_596826

loc_59681F:
mov	[ebp+var_C], 0

loc_596826:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5967D0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_596830 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 0FFFFFFFh
jbe	short loc_596856
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_596856:
cmp	[ebp+arg_0], 0
jz	short loc_59687C
mov	eax, [ebp+arg_0]
shl	eax, 4
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_596883

loc_59687C:
mov	[ebp+var_C], 0

loc_596883:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_596830 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_596890 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 1FFFFFFh
jbe	short loc_5968BB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5968BB:
cmp	[ebp+arg_0], 0
jz	short loc_5968EC
mov	ecx, [ebp+arg_0]
shl	ecx, 7
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
shr	eax, 7
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_5968F3

loc_5968EC:
mov	[ebp+var_10], 0

loc_5968F3:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_596890 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_596900 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 3
cmp	edx, [ebp+arg_0]
jnb	loc_5969FD
mov	[ebp+var_C], 1FFFFFFFh
mov	[ebp+var_10], 1FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_596941
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
jmp	short loc_596947

loc_596941:
mov	edx, [ebp+var_C]
mov	[ebp+var_80], edx

loc_596947:
mov	eax, [ebp+var_80]
cmp	eax, [ebp+arg_0]
jnb	short loc_596957
mov	ecx, [ebp+var_7C]
call	sub_5BD210

loc_596957:
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_7C]
cmp	dword ptr [ecx], 0
jz	short loc_5969BB
mov	edx, [ebp+var_7C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_30], edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_7C]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_14], eax
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
call	sub_51EF50
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_7C]
call	sub_50F330
jmp	short loc_5969D1

loc_5969BB:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_7C]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax

loc_5969D1:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*8]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	ecx, [ebp+var_7C]
mov	[ecx+4], eax
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_78]
mov	[edx+8], eax

loc_5969FD:
mov	esp, ebp
pop	ebp
retn	4
sub_596900 endp

align 10h


; Attributes: bp-based frame

sub_596A10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_596AE7
mov	ecx, [ebp+var_14]
call	sub_579120
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_596A70
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_596AE7

loc_596A70:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5AC2D0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_596A98:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_596AAC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_596A98

loc_596AAC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_596ABE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_596AD2
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_596ABE

loc_596AD2:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_596AE7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_596A10 endp



; Attributes: bp-based frame

sub_596AF0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_596B0C:
cmp	[ebp+var_10], 0
jz	short loc_596B83
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_596B52
jb	short loc_596B49
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_596B52

loc_596B49:
mov	[ebp+var_64], 1
jmp	short loc_596B59

loc_596B52:
mov	[ebp+var_64], 0

loc_596B59:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_596B72
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_596B7B

loc_596B72:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_596B7B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_596B0C

loc_596B83:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_596C25
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_596C16
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5AC160
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_596CCB
jmp	short loc_596C25

loc_596C16:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_596C25:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_596C5F
jb	short loc_596C56
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_596C5F

loc_596C56:
mov	[ebp+var_78], 1
jmp	short loc_596C66

loc_596C5F:
mov	[ebp+var_78], 0

loc_596C66:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_596CB0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5AC160
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_596CCB

loc_596CB0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_596CCB:
mov	esp, ebp
pop	ebp
retn	8
sub_596AF0 endp

align 10h


; Attributes: bp-based frame

sub_596CE0 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_55=	word ptr -55h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_5A87A0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_5A8900
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_D0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_596D63

loc_596D5A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_596D63:
cmp	[ebp+var_40], 0
jle	short loc_596D8D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5C7120
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 34h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 34h
mov	[ebp+var_3C], eax
jmp	short loc_596D5A

loc_596D8D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_596DCE
xor	edx, edx
mov	byte ptr [ebp+var_55+1], dl
mov	al, byte ptr [ebp+var_55+1]
mov	[ebp+var_52], al
xor	ecx, ecx
mov	byte ptr [ebp+var_55], cl
mov	dl, byte ptr [ebp+var_55]
mov	[ebp+var_53], dl
lea	eax, [ebp+var_53]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_5BB580
add	esp, 0Ch
mov	eax, [ebp+var_C]
add	eax, 34h
mov	[ebp+var_C], eax
jmp	short loc_596E23

loc_596DCE:
mov	ecx, [ebp+arg_C]
imul	ecx, 34h
add	ecx, [ebp+var_C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_64]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_70], eax
jmp	short loc_596E05

loc_596DF3:
mov	edx, [ebp+var_70]
sub	edx, 1
mov	[ebp+var_70], edx
mov	eax, [ebp+var_6C]
add	eax, 34h
mov	[ebp+var_6C], eax

loc_596E05:
cmp	[ebp+var_70], 0
jle	short loc_596E1D
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_6C]
push	edx		; void *
call	sub_5C7120
add	esp, 8
jmp	short loc_596DF3

loc_596E1D:
mov	eax, [ebp+var_64]
mov	[ebp+var_C], eax

loc_596E23:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_596EC7
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_95], cl
mov	edx, [ebp+var_D0]
mov	eax, [edx+4]
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_94]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_84], eax
jmp	short loc_596E8B

loc_596E7C:
mov	edx, [ebp+var_84]
sub	edx, 1
mov	[ebp+var_84], edx

loc_596E8B:
cmp	[ebp+var_84], 0
jle	short loc_596EC1
mov	eax, [ebp+var_90]
push	eax		; int
mov	ecx, [ebp+var_80]
push	ecx		; void *
call	sub_5C7120
add	esp, 8
mov	edx, [ebp+var_90]
add	edx, 34h
mov	[ebp+var_90], edx
mov	eax, [ebp+var_80]
add	eax, 34h
mov	[ebp+var_80], eax
jmp	short loc_596E7C

loc_596EC1:
mov	ecx, [ebp+var_80]
mov	[ebp+var_C], ecx

loc_596EC7:
mov	ecx, [ebp+var_D0]
call	sub_5A8880
mov	edx, [ebp+var_4]
imul	edx, 34h
add	edx, [ebp+var_8]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_D0]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_CC]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_596CE0 endp

align 10h


; Attributes: bp-based frame

sub_596F10 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_99=	byte ptr -99h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_C0]
jz	loc_597177
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_C0]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_596FEF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_C0]
add	ecx, 8
call	sub_5AB2F0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5BF2F0
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C0]
call	sub_5A8880
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 34h
mov	eax, [ebp+var_C0]
add	edx, [eax]
mov	ecx, [ebp+var_C0]
mov	[ecx+8], edx
jmp	loc_597160

loc_596FEF:
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_C0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_5970B1
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_C0]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_59705C

loc_597053:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_59705C:
cmp	[ebp+var_68], 0
jle	short loc_597082
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5890D0
mov	ecx, [ebp+var_6C]
add	ecx, 34h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 34h
mov	[ebp+var_70], edx
jmp	short loc_597053

loc_597082:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5BC170
add	esp, 0Ch
jmp	loc_597160

loc_5970B1:
xor	edx, edx
mov	[ebp+var_12], dl
lea	eax, [ebp+var_12]
push	eax
mov	ecx, [ebp+var_C0]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_C0]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
imul	eax, 34h
mov	edx, [ebp+arg_0]
add	eax, [edx]
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_5A81B0
add	esp, 10h
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_C0]
mov	ecx, [eax+4]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 34h
idiv	ecx
imul	eax, 34h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_B4], eax
push	0
lea	eax, [ebp+var_99]
push	eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+var_B8]
push	edx
mov	eax, [ebp+var_B4]
push	eax
call	sub_5BF340
add	esp, 14h

loc_597160:
mov	ecx, [ebp+var_4]
imul	ecx, 34h
mov	edx, [ebp+var_C0]
add	ecx, [edx]
mov	eax, [ebp+var_C0]
mov	[eax+4], ecx

loc_597177:
mov	eax, [ebp+var_C0]
mov	esp, ebp
pop	ebp
retn	4
sub_596F10 endp

align 10h


; Attributes: bp-based frame

sub_597190 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+20h], 0
jz	short loc_5971E6
mov	ecx, [ebp+var_C]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_5ACB10
mov	edx, [ebp+var_C]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+20h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_5971E6
mov	eax, [ebp+var_8]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5971E6:
mov	ecx, [ebp+var_C]
add	ecx, 24h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_597190 endp

align 10h


; Attributes: bp-based frame

sub_597200 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	[ebp+var_18], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 5
div	ecx
add	eax, 1
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
add	edx, 2
mov	[ebp+var_10], edx
mov	[ebp+var_14], 8
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_14]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_40]
mov	eax, [eax]
mov	[edx+24h], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+24h]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 20h
call	sub_5A9600
mov	ecx, [ebp+var_40]
mov	[ecx+20h], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+24h]
sub	eax, [ebp+var_8]
shr	eax, 1
mov	ecx, [ebp+var_40]
mov	edx, [ecx+20h]
lea	eax, [edx+eax*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
lea	eax, [edx+ecx*4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_40]
call	sub_5ACAC0
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_2C], 80h
mov	edx, 5
imul	edx, 18h
mov	eax, [ebp+var_40]
add	edx, [eax+4]
mov	ecx, [ebp+var_40]
mov	[ecx+8], edx
mov	edx, [ebp+var_C]
sub	edx, 4
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
add	eax, 10h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_30], 80h
mov	eax, 5
imul	eax, 18h
mov	ecx, [ebp+var_34]
add	eax, [ecx+4]
mov	edx, [ebp+var_34]
mov	[edx+8], eax
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [ecx+4]
mov	[eax], edx
mov	[ebp+var_3C], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 5
div	ecx
imul	edx, 18h
mov	eax, [ebp+var_40]
add	edx, [eax+14h]
mov	ecx, [ebp+var_40]
mov	[ecx+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_597200 endp

align 10h


; Attributes: bp-based frame

sub_597340 proc	near

var_3C=	dword ptr -3Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_597360

loc_597357:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_597360:
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_4]
cmp	ecx, [eax+1Ch]
jnb	short loc_5973BA
mov	[ebp+var_8], 80h
mov	edx, 5
imul	edx, 18h
mov	eax, [ebp+var_4]
add	edx, [eax]
push	edx
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
push	edx
call	sub_4B7700
add	esp, 8
mov	[ebp+var_14], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
cmp	[ebp+var_18], 0
jz	short loc_5973B8
mov	edx, 5
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_18]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5973B8:
jmp	short loc_597357

loc_5973BA:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_3C]
mov	eax, [ecx+0Ch]
cmp	eax, [edx+1Ch]
jz	short loc_597420
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+8]
push	edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax]
push	ecx
call	sub_4B7700
add	esp, 8
mov	edx, [ebp+var_3C]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+14h]
push	edx
call	sub_4B7700
add	esp, 8
mov	[ebp+var_2C], 80h
mov	eax, [ebp+var_3C]
mov	ecx, [eax+14h]
mov	[ebp+var_30], ecx
cmp	[ebp+var_30], 0
jz	short loc_59741E
mov	edx, 5
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_30]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59741E:
jmp	short loc_597435

loc_597420:
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax]
push	ecx
call	sub_4B7700
add	esp, 8

loc_597435:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
add	eax, 10h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	esp, ebp
pop	ebp
retn
sub_597340 endp

align 10h


; Attributes: bp-based frame

sub_597460 proc	near

var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+0Ch]
sub	edx, [ecx+20h]
sar	edx, 2
cmp	edx, 1
jnb	short loc_597489
push	1
push	1
mov	ecx, [ebp+var_28]
call	sub_5ACB70

loc_597489:
mov	[ebp+var_4], 80h
push	5
mov	ecx, [ebp+var_28]
add	ecx, 24h
call	sub_5A8980
mov	ecx, [ebp+var_28]
mov	edx, [ecx+0Ch]
mov	[edx-4], eax
mov	eax, [ebp+var_28]
mov	ecx, [eax+0Ch]
sub	ecx, 4
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_18]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_14], 80h
mov	ecx, 5
imul	ecx, 18h
mov	edx, [ebp+var_28]
add	ecx, [edx+4]
mov	eax, [ebp+var_28]
mov	[eax+8], ecx
mov	ecx, [ebp+var_28]
mov	edx, [ecx+8]
sub	edx, 18h
mov	eax, [ebp+var_28]
mov	[eax], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_28]
mov	ecx, [ecx]
call	sub_405760
mov	esp, ebp
pop	ebp
retn	4
sub_597460 endp

align 10h


; Attributes: bp-based frame

sub_597510 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_18]
mov	ecx, [eax+14h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_597544
mov	edx, 5
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_597544:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
sub	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_C], 80h
mov	eax, 5
imul	eax, 18h
mov	ecx, [ebp+var_10]
add	eax, [ecx+4]
mov	edx, [ebp+var_10]
mov	[edx+8], eax
mov	eax, [ebp+var_18]
mov	ecx, [eax+18h]
sub	ecx, 18h
mov	edx, [ebp+var_18]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn
sub_597510 endp

align 10h


; Attributes: bp-based frame

sub_5975A0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A0], ecx
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A0]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
cmp	eax, [ebp+arg_0]
jnb	loc_5976E3
mov	[ebp+var_C], 6666666h
mov	[ebp+var_10], 6666666h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5975F2
mov	eax, [ebp+var_10]
mov	[ebp+var_A4], eax
jmp	short loc_5975FB

loc_5975F2:
mov	ecx, [ebp+var_C]
mov	[ebp+var_A4], ecx

loc_5975FB:
mov	edx, [ebp+var_A4]
cmp	edx, [ebp+arg_0]
jnb	short loc_597611
mov	ecx, [ebp+var_A0]
call	sub_5BD210

loc_597611:
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A0]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_A0]
cmp	dword ptr [edx], 0
jz	short loc_59768F
mov	eax, [ebp+var_A0]
mov	ecx, [eax+4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx]
mov	[ebp+var_48], eax
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
add	ecx, 8
call	sub_444410
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_48]
push	edx
call	sub_52A390
add	esp, 0Ch
mov	eax, [ebp+var_14]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_A0]
call	sub_525D80
jmp	short loc_5976A8

loc_59768F:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
add	ecx, 8
call	sub_444410
mov	[ebp+var_8], eax

loc_5976A8:
mov	eax, [ebp+arg_0]
imul	eax, 28h
add	eax, [ebp+var_8]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_A0]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]
imul	eax, 28h
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_A0]
mov	[ecx+4], eax
mov	edx, [ebp+var_A0]
mov	eax, [ebp+var_9C]
mov	[edx+8], eax

loc_5976E3:
mov	esp, ebp
pop	ebp
retn	4
sub_5975A0 endp

align 10h


; Attributes: bp-based frame

sub_5976F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_5977C7
mov	ecx, [ebp+var_14]
call	sub_4395C0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_597750
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_5977C7

loc_597750:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5ACEE0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_597778:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_59778C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_597778

loc_59778C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_59779E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5977B2
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_59779E

loc_5977B2:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_5977C7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5976F0 endp



; Attributes: bp-based frame

sub_5977D0 proc	near

var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5977D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A0h
mov	[ebp+var_9C], ecx
mov	eax, [ebp+var_9C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_59780D:
cmp	[ebp+var_1C], 0
jz	short loc_597891
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_41]
mov	[ebp+var_A0], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_1C]
add	edx, 10h
mov	[ebp+var_40], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_597877
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_A4], ecx
jmp	short loc_597883

loc_597877:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_A4], eax

loc_597883:
mov	ecx, [ebp+var_A4]
mov	[ebp+var_1C], ecx
jmp	loc_59780D

loc_597891:
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_10]
call	sub_4046E0
movzx	edx, [ebp+var_11]
test	edx, edx
jz	loc_59793F
mov	eax, [ebp+var_9C]
mov	ecx, [eax+8]
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_60]
mov	[ebp+var_5C], edx
mov	ecx, [ebp+var_28]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_60]
setz	cl
mov	[ebp+var_A5], cl
movzx	edx, [ebp+var_A5]
test	edx, edx
jz	short loc_597930
mov	[ebp+var_29], 1
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_18]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5ACD50
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_29]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5979F5
jmp	short loc_59793F

loc_597930:
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_59793F:
mov	edx, [ebp+var_10]
mov	[ebp+var_70], edx
lea	eax, [ebp+var_69]
mov	[ebp+var_AC], eax
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_70]
add	ecx, 10h
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_68]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_5979DA
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_9C]
call	sub_5ACD50
mov	[ebp+var_98], eax
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5979F5

loc_5979DA:
mov	[ebp+var_39], 0
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_5979F5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_5977D0 endp

align 10h


; Attributes: bp-based frame

sub_597A10 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A89E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A8B40
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_597A93

loc_597A8A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_597A93:
cmp	[ebp+var_40], 0
jle	short loc_597ABD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 68h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 68h
mov	[ebp+var_3C], eax
jmp	short loc_597A8A

loc_597ABD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_597AE4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A6E40
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 68h
mov	[ebp+var_C], ecx
jmp	short loc_597B39

loc_597AE4:
mov	edx, [ebp+arg_C]
imul	edx, 68h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_597B1B

loc_597B09:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 68h
mov	[ebp+var_68], eax

loc_597B1B:
cmp	[ebp+var_6C], 0
jle	short loc_597B33
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A6E40
add	esp, 8
jmp	short loc_597B09

loc_597B33:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_597B39:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_597BD1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_597B98

loc_597B8F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_597B98:
cmp	[ebp+var_80], 0
jle	short loc_597BCB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 68h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 68h
mov	[ebp+var_7C], eax
jmp	short loc_597B8F

loc_597BCB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_597BD1:
mov	ecx, [ebp+var_CC]
call	sub_5A8AC0
mov	edx, [ebp+var_4]
imul	edx, 68h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_597A10 endp

align 10h


; Attributes: bp-based frame

sub_597C20 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_CC]
jz	loc_597F68
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 68h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_597CFF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AB360
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5BF3C0
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_CC]
call	sub_5A8AC0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 68h
mov	eax, [ebp+var_CC]
add	edx, [eax]
mov	ecx, [ebp+var_CC]
mov	[ecx+8], edx
jmp	loc_597F51

loc_597CFF:
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 68h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_597DC1
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_597D6C

loc_597D63:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_597D6C:
cmp	[ebp+var_68], 0
jle	short loc_597D92
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5C6760
mov	ecx, [ebp+var_6C]
add	ecx, 68h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 68h
mov	[ebp+var_70], edx
jmp	short loc_597D63

loc_597D92:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5BF3F0
add	esp, 0Ch
jmp	loc_597F51

loc_597DC1:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 68h
idiv	ecx
imul	eax, 68h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A0], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	eax, [ebp+var_A0]
sub	eax, [ebp+var_94]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_597E4B

loc_597E3C:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_597E4B:
cmp	[ebp+var_90], 0
jle	short loc_597E86
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_98]
call	sub_5C6760
mov	ecx, [ebp+var_94]
add	ecx, 68h
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
add	edx, 68h
mov	[ebp+var_98], edx
jmp	short loc_597E3C

loc_597E86:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_C8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 68h
idiv	ecx
imul	eax, 68h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_C0], eax
mov	eax, [ebp+var_C0]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_C4]
sub	eax, [ebp+var_BC]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_B0], eax
jmp	short loc_597F12

loc_597F03:
mov	edx, [ebp+var_B0]
sub	edx, 1
mov	[ebp+var_B0], edx

loc_597F12:
cmp	[ebp+var_B0], 0
jle	short loc_597F51
mov	eax, [ebp+var_BC]
push	eax		; int
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_BC]
add	edx, 68h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_AC]
add	eax, 68h
mov	[ebp+var_AC], eax
jmp	short loc_597F03

loc_597F51:
mov	ecx, [ebp+var_4]
imul	ecx, 68h
mov	edx, [ebp+var_CC]
add	ecx, [edx]
mov	eax, [ebp+var_CC]
mov	[eax+4], ecx

loc_597F68:
mov	eax, [ebp+var_CC]
mov	esp, ebp
pop	ebp
retn	4
sub_597C20 endp

align 10h


; Attributes: bp-based frame

sub_597F80 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_597FEB
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 68h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_597FC7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5ACFC0
jmp	short loc_597FEB

loc_597FC7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_597A10

loc_597FEB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_597F80 endp

align 10h


; Attributes: bp-based frame

sub_598000 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_498C20
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A8C40
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_598083

loc_59807A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_598083:
cmp	[ebp+var_40], 0
jle	short loc_5980AD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A6E90
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 50h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 50h
mov	[ebp+var_3C], eax
jmp	short loc_59807A

loc_5980AD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5980D4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A6E90
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 50h
mov	[ebp+var_C], ecx
jmp	short loc_598129

loc_5980D4:
mov	edx, [ebp+arg_C]
imul	edx, 50h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59810B

loc_5980F9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 50h
mov	[ebp+var_68], eax

loc_59810B:
cmp	[ebp+var_6C], 0
jle	short loc_598123
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A6E90
add	esp, 8
jmp	short loc_5980F9

loc_598123:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_598129:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5981C1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_598188

loc_59817F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_598188:
cmp	[ebp+var_80], 0
jle	short loc_5981BB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A6E90
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 50h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 50h
mov	[ebp+var_7C], eax
jmp	short loc_59817F

loc_5981BB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5981C1:
mov	ecx, [ebp+var_CC]
call	sub_5A8BC0
mov	edx, [ebp+var_4]
imul	edx, 50h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_598000 endp

align 10h


; Attributes: bp-based frame

sub_598210 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_CC]
jz	loc_598558
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_5982EF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_489F70
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5BF450
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_CC]
call	sub_5A8BC0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 50h
mov	eax, [ebp+var_CC]
add	edx, [eax]
mov	ecx, [ebp+var_CC]
mov	[ecx+8], edx
jmp	loc_598541

loc_5982EF:
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_5983B1
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_59835C

loc_598353:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_59835C:
cmp	[ebp+var_68], 0
jle	short loc_598382
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_587150
mov	ecx, [ebp+var_6C]
add	ecx, 50h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 50h
mov	[ebp+var_70], edx
jmp	short loc_598353

loc_598382:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5BC1C0
add	esp, 0Ch
jmp	loc_598541

loc_5983B1:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
imul	eax, 50h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A0], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	eax, [ebp+var_A0]
sub	eax, [ebp+var_94]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_59843B

loc_59842C:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_59843B:
cmp	[ebp+var_90], 0
jle	short loc_598476
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_98]
call	sub_587150
mov	ecx, [ebp+var_94]
add	ecx, 50h
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
add	edx, 50h
mov	[ebp+var_98], edx
jmp	short loc_59842C

loc_598476:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx+4]
mov	[ebp+var_C8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
imul	eax, 50h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_C0], eax
mov	eax, [ebp+var_C0]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_C4]
sub	eax, [ebp+var_BC]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_B0], eax
jmp	short loc_598502

loc_5984F3:
mov	edx, [ebp+var_B0]
sub	edx, 1
mov	[ebp+var_B0], edx

loc_598502:
cmp	[ebp+var_B0], 0
jle	short loc_598541
mov	eax, [ebp+var_BC]
push	eax		; int
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	sub_5A6E90
add	esp, 8
mov	edx, [ebp+var_BC]
add	edx, 50h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_AC]
add	eax, 50h
mov	[ebp+var_AC], eax
jmp	short loc_5984F3

loc_598541:
mov	ecx, [ebp+var_4]
imul	ecx, 50h
mov	edx, [ebp+var_CC]
add	ecx, [edx]
mov	eax, [ebp+var_CC]
mov	[eax+4], ecx

loc_598558:
mov	eax, [ebp+var_CC]
mov	esp, ebp
pop	ebp
retn	4
sub_598210 endp

align 10h


; Attributes: bp-based frame

sub_598570 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_90]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, [ebp+arg_0]
jnb	loc_5986C2
mov	[ebp+var_C], 3333333h
mov	[ebp+var_10], 3333333h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5985C2
mov	eax, [ebp+var_10]
mov	[ebp+var_94], eax
jmp	short loc_5985CB

loc_5985C2:
mov	ecx, [ebp+var_C]
mov	[ebp+var_94], ecx

loc_5985CB:
mov	edx, [ebp+var_94]
cmp	edx, [ebp+arg_0]
jnb	short loc_5985E1
mov	ecx, [ebp+var_90]
call	sub_5BD210

loc_5985E1:
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_90]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_90]
cmp	dword ptr [edx], 0
jz	short loc_59866E
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx]
mov	[ebp+var_44], eax
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_5A8C40
mov	[ebp+var_14], eax
xor	eax, eax
mov	[ebp+var_26], al
mov	cl, [ebp+var_26]
mov	[ebp+var_25], cl
lea	edx, [ebp+var_25]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_44]
push	edx
call	sub_5C7240
add	esp, 10h
mov	eax, [ebp+var_14]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_90]
call	sub_5A8BC0
jmp	short loc_598687

loc_59866E:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_5A8C40
mov	[ebp+var_8], eax

loc_598687:
mov	eax, [ebp+arg_0]
imul	eax, 50h
add	eax, [ebp+var_8]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]
imul	eax, 50h
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx+8], eax

loc_5986C2:
mov	esp, ebp
pop	ebp
retn	4
sub_598570 endp

align 10h


; Attributes: bp-based frame

sub_5986D0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_CC]
jz	loc_598A46
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 30h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_5987AF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AB3D0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5BF480
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_CC]
call	sub_5A8CC0
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 30h
mov	eax, [ebp+var_CC]
add	edx, [eax]
mov	ecx, [ebp+var_CC]
mov	[ecx+8], edx
jmp	loc_598A2F

loc_5987AF:
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 30h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_598887
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_59881C

loc_598813:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_59881C:
cmp	[ebp+var_68], 0
jle	short loc_598858
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_6C]
add	edx, 8
push	edx
mov	ecx, [ebp+var_70]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+var_6C]
add	eax, 30h
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_70]
add	ecx, 30h
mov	[ebp+var_70], ecx
jmp	short loc_598813

loc_598858:
mov	edx, [ebp+var_70]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax+4]
mov	[ebp+var_88], ecx
push	0
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_51C8B0
add	esp, 0Ch
jmp	loc_598A2F

loc_598887:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_CC]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 30h
idiv	ecx
imul	eax, 30h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A0], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	eax, [ebp+var_A0]
sub	eax, [ebp+var_94]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_59890F

loc_598900:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_59890F:
cmp	[ebp+var_90], 0
jle	short loc_598966
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_94]
add	edx, 8
push	edx
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_4023E0
mov	eax, [ebp+var_94]
add	eax, 30h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
add	ecx, 30h
mov	[ebp+var_98], ecx
jmp	short loc_598900

loc_598966:
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax+4]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_CC]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 30h
idiv	ecx
imul	eax, 30h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_C0], eax
mov	eax, [ebp+var_C0]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_C4]
sub	eax, [ebp+var_BC]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_B0], eax
jmp	short loc_5989F0

loc_5989E1:
mov	edx, [ebp+var_B0]
sub	edx, 1
mov	[ebp+var_B0], edx

loc_5989F0:
cmp	[ebp+var_B0], 0
jle	short loc_598A2F
mov	eax, [ebp+var_BC]
push	eax		; int
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	sub_5C72C0
add	esp, 8
mov	edx, [ebp+var_BC]
add	edx, 30h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_AC]
add	eax, 30h
mov	[ebp+var_AC], eax
jmp	short loc_5989E1

loc_598A2F:
mov	ecx, [ebp+var_4]
imul	ecx, 30h
mov	edx, [ebp+var_CC]
add	ecx, [edx]
mov	eax, [ebp+var_CC]
mov	[eax+4], ecx

loc_598A46:
mov	eax, [ebp+var_CC]
mov	esp, ebp
pop	ebp
retn	4
sub_5986D0 endp

align 10h


; Attributes: bp-based frame

sub_598A60 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_90]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
cmp	eax, [ebp+arg_0]
jnb	loc_598BB2
mov	[ebp+var_C], 5555555h
mov	[ebp+var_10], 5555555h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_598AB2
mov	eax, [ebp+var_10]
mov	[ebp+var_94], eax
jmp	short loc_598ABB

loc_598AB2:
mov	ecx, [ebp+var_C]
mov	[ebp+var_94], ecx

loc_598ABB:
mov	edx, [ebp+var_94]
cmp	edx, [ebp+arg_0]
jnb	short loc_598AD1
mov	ecx, [ebp+var_90]
call	sub_5BD210

loc_598AD1:
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_90]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_90]
cmp	dword ptr [edx], 0
jz	short loc_598B5E
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx]
mov	[ebp+var_44], eax
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_5A9B20
mov	[ebp+var_14], eax
xor	eax, eax
mov	[ebp+var_26], al
mov	cl, [ebp+var_26]
mov	[ebp+var_25], cl
lea	edx, [ebp+var_25]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_44]
push	edx
call	sub_5C7330
add	esp, 10h
mov	eax, [ebp+var_14]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_90]
call	sub_5A8CC0
jmp	short loc_598B77

loc_598B5E:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_5A9B20
mov	[ebp+var_8], eax

loc_598B77:
mov	eax, [ebp+arg_0]
imul	eax, 30h
add	eax, [ebp+var_8]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]
imul	eax, 30h
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx+8], eax

loc_598BB2:
mov	esp, ebp
pop	ebp
retn	4
sub_598A60 endp

align 10h


; Attributes: bp-based frame

sub_598BC0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_57FC30
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_598C16
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_598BC0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_598C16:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_598C25:
cmp	[ebp+arg_0], 0
jz	short loc_598C92
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_57FC30
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_598C81
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_598BC0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_598C81:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_598C25

loc_598C92:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_598BC0 endp

align 10h


; Attributes: bp-based frame

sub_598CA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_598D77
mov	ecx, [ebp+var_14]
call	sub_439610
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_598D00
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_598D77

loc_598D00:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_598BC0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_598D28:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_598D3C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_598D28

loc_598D3C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_598D4E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_598D62
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_598D4E

loc_598D62:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_598D77:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_598CA0 endp



; Attributes: bp-based frame

sub_598D80 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_DC]
jz	loc_5990C8
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 48h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_598E5F
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_DC]
add	ecx, 8
call	sub_5034F0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5BF4B0
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_DC]
call	sub_50EF40
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 48h
mov	eax, [ebp+var_DC]
add	edx, [eax]
mov	ecx, [ebp+var_DC]
mov	[ecx+8], edx
jmp	loc_5990B1

loc_598E5F:
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 48h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_598F21
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_598ECC

loc_598EC3:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_598ECC:
cmp	[ebp+var_68], 0
jle	short loc_598EF2
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5C67F0
mov	ecx, [ebp+var_6C]
add	ecx, 48h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 48h
mov	[ebp+var_70], edx
jmp	short loc_598EC3

loc_598EF2:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5BF4E0
add	esp, 0Ch
jmp	loc_5990B1

loc_598F21:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 48h
idiv	ecx
imul	eax, 48h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_A8], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A4]
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_A8]
sub	eax, [ebp+var_9C]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_90], eax
jmp	short loc_598FAB

loc_598F9C:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_598FAB:
cmp	[ebp+var_90], 0
jle	short loc_598FE6
mov	eax, [ebp+var_9C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C67F0
mov	ecx, [ebp+var_9C]
add	ecx, 48h
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A0]
add	edx, 48h
mov	[ebp+var_A0], edx
jmp	short loc_598F9C

loc_598FE6:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+4]
mov	[ebp+var_D8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_D4], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 48h
idiv	ecx
imul	eax, 48h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_D0], eax
mov	eax, [ebp+var_D0]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_D8]
mov	[ebp+var_B4], ecx
mov	eax, [ebp+var_D4]
sub	eax, [ebp+var_CC]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_B8], eax
jmp	short loc_599072

loc_599063:
mov	edx, [ebp+var_B8]
sub	edx, 1
mov	[ebp+var_B8], edx

loc_599072:
cmp	[ebp+var_B8], 0
jle	short loc_5990B1
mov	eax, [ebp+var_CC]
push	eax		; int
mov	ecx, [ebp+var_B4]
push	ecx		; void *
call	sub_50E780
add	esp, 8
mov	edx, [ebp+var_CC]
add	edx, 48h
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_B4]
add	eax, 48h
mov	[ebp+var_B4], eax
jmp	short loc_599063

loc_5990B1:
mov	ecx, [ebp+var_4]
imul	ecx, 48h
mov	edx, [ebp+var_DC]
add	ecx, [edx]
mov	eax, [ebp+var_DC]
mov	[eax+4], ecx

loc_5990C8:
mov	eax, [ebp+var_DC]
mov	esp, ebp
pop	ebp
retn	4
sub_598D80 endp

align 10h


; Attributes: bp-based frame

sub_5990E0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A8D40
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A8EA0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 4Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_599163

loc_59915A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_599163:
cmp	[ebp+var_40], 0
jle	short loc_59918D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5C7430
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 4Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 4Ch
mov	[ebp+var_3C], eax
jmp	short loc_59915A

loc_59918D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5991B4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5C7430
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 4Ch
mov	[ebp+var_C], ecx
jmp	short loc_599209

loc_5991B4:
mov	edx, [ebp+arg_C]
imul	edx, 4Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 4Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5991EB

loc_5991D9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 4Ch
mov	[ebp+var_68], eax

loc_5991EB:
cmp	[ebp+var_6C], 0
jle	short loc_599203
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5C7430
add	esp, 8
jmp	short loc_5991D9

loc_599203:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_599209:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5992A1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 4Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_599268

loc_59925F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_599268:
cmp	[ebp+var_80], 0
jle	short loc_59929B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5C7430
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 4Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 4Ch
mov	[ebp+var_7C], eax
jmp	short loc_59925F

loc_59929B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5992A1:
mov	ecx, [ebp+var_CC]
call	sub_5A8E20
mov	edx, [ebp+var_4]
imul	edx, 4Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5990E0 endp

align 10h


; Attributes: bp-based frame

sub_5992F0 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_5A8F20
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_5BE350
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_D0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 6
mov	[ebp+var_40], edx
jmp	short loc_59936E

loc_599365:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_59936E:
cmp	[ebp+var_40], 0
jle	short loc_599398
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5A6EE0
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 40h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 40h
mov	[ebp+var_3C], ecx
jmp	short loc_599365

loc_599398:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5993BF
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5A6EE0
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 40h
mov	[ebp+var_C], edx
jmp	short loc_59940F

loc_5993BF:
mov	eax, [ebp+arg_C]
shl	eax, 6
add	eax, [ebp+var_C]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_64]
sub	edx, [ebp+var_C]
sar	edx, 6
mov	[ebp+var_70], edx
jmp	short loc_5993F1

loc_5993DF:
mov	eax, [ebp+var_70]
sub	eax, 1
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_6C]
add	ecx, 40h
mov	[ebp+var_6C], ecx

loc_5993F1:
cmp	[ebp+var_70], 0
jle	short loc_599409
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_6C]
push	eax		; void *
call	sub_5A6EE0
add	esp, 8
jmp	short loc_5993DF

loc_599409:
mov	ecx, [ebp+var_64]
mov	[ebp+var_C], ecx

loc_59940F:
movzx	edx, [ebp+arg_10]
test	edx, edx
jnz	loc_5994AE
xor	eax, eax
mov	[ebp+var_F], al
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	dl, [ebp+var_10]
mov	[ebp+var_95], dl
mov	eax, [ebp+var_D0]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_94]
sub	ecx, [ebp+var_90]
sar	ecx, 6
mov	[ebp+var_84], ecx
jmp	short loc_599472

loc_599463:
mov	edx, [ebp+var_84]
sub	edx, 1
mov	[ebp+var_84], edx

loc_599472:
cmp	[ebp+var_84], 0
jle	short loc_5994A8
mov	eax, [ebp+var_90]
push	eax		; int
mov	ecx, [ebp+var_80]
push	ecx		; void *
call	sub_5A6EE0
add	esp, 8
mov	edx, [ebp+var_90]
add	edx, 40h
mov	[ebp+var_90], edx
mov	eax, [ebp+var_80]
add	eax, 40h
mov	[ebp+var_80], eax
jmp	short loc_599463

loc_5994A8:
mov	ecx, [ebp+var_80]
mov	[ebp+var_C], ecx

loc_5994AE:
mov	ecx, [ebp+var_D0]
call	sub_5A8FF0
mov	edx, [ebp+var_4]
shl	edx, 6
add	edx, [ebp+var_8]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_D0]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_CC]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5992F0 endp

align 10h


; Attributes: bp-based frame

sub_599500 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_C8]
jz	loc_5997C5
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 6
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ebp+var_C8]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 6
cmp	[ebp+var_4], eax
jbe	loc_5995D3
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_5AB440
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_5BF530
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C8]
call	sub_5A8FF0
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 6
mov	edx, [ebp+var_C8]
add	ecx, [edx]
mov	eax, [ebp+var_C8]
mov	[eax+8], ecx
jmp	loc_5997AE

loc_5995D3:
mov	ecx, [ebp+var_C8]
mov	edx, [ebp+var_C8]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 6
cmp	eax, [ebp+var_4]
jb	loc_599689
xor	ecx, ecx
mov	[ebp+var_11], cl
mov	edx, [ebp+var_C8]
mov	eax, [edx]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_78]
sub	ecx, [ebp+var_6C]
sar	ecx, 6
mov	[ebp+var_68], ecx
jmp	short loc_599634

loc_59962B:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_599634:
cmp	[ebp+var_68], 0
jle	short loc_59965A
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5BDAE0
mov	ecx, [ebp+var_6C]
add	ecx, 40h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 40h
mov	[ebp+var_70], edx
jmp	short loc_59962B

loc_59965A:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5BC210
add	esp, 0Ch
jmp	loc_5997AE

loc_599689:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_C8]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 6
shl	ecx, 6
mov	edx, [ebp+arg_0]
add	ecx, [edx]
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_94], ecx
push	0
lea	edx, [ebp+var_89]
push	edx
mov	eax, [ebp+var_9C]
push	eax
mov	ecx, [ebp+var_98]
push	ecx
mov	edx, [ebp+var_94]
push	edx
call	sub_5BBF30
add	esp, 14h
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+4]
mov	[ebp+var_C4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_C8]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 6
shl	ecx, 6
mov	edx, [ebp+arg_0]
add	ecx, [edx]
mov	[ebp+var_BC], ecx
mov	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C4]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_C0]
sub	edx, [ebp+var_B8]
sar	edx, 6
mov	[ebp+var_A8], edx
jmp	short loc_59976F

loc_599760:
mov	eax, [ebp+var_A8]
sub	eax, 1
mov	[ebp+var_A8], eax

loc_59976F:
cmp	[ebp+var_A8], 0
jle	short loc_5997AE
mov	ecx, [ebp+var_B8]
push	ecx		; int
mov	edx, [ebp+var_A4]
push	edx		; void *
call	sub_5A6EE0
add	esp, 8
mov	eax, [ebp+var_B8]
add	eax, 40h
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_A4]
add	ecx, 40h
mov	[ebp+var_A4], ecx
jmp	short loc_599760

loc_5997AE:
mov	edx, [ebp+var_4]
shl	edx, 6
mov	eax, [ebp+var_C8]
add	edx, [eax]
mov	ecx, [ebp+var_C8]
mov	[ecx+4], edx

loc_5997C5:
mov	eax, [ebp+var_C8]
mov	esp, ebp
pop	ebp
retn	4
sub_599500 endp

align 10h


; Attributes: bp-based frame

sub_5997E0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A89E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A8B40
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_599863

loc_59985A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_599863:
cmp	[ebp+var_40], 0
jle	short loc_59988D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A6F30
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 68h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 68h
mov	[ebp+var_3C], eax
jmp	short loc_59985A

loc_59988D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5998B4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A6F30
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 68h
mov	[ebp+var_C], ecx
jmp	short loc_599909

loc_5998B4:
mov	edx, [ebp+arg_C]
imul	edx, 68h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5998EB

loc_5998D9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 68h
mov	[ebp+var_68], eax

loc_5998EB:
cmp	[ebp+var_6C], 0
jle	short loc_599903
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A6F30
add	esp, 8
jmp	short loc_5998D9

loc_599903:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_599909:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5999A1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_599968

loc_59995F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_599968:
cmp	[ebp+var_80], 0
jle	short loc_59999B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A6F30
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 68h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 68h
mov	[ebp+var_7C], eax
jmp	short loc_59995F

loc_59999B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5999A1:
mov	ecx, [ebp+var_CC]
call	sub_5A9060
mov	edx, [ebp+var_4]
imul	edx, 68h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5997E0 endp

align 10h


; Attributes: bp-based frame

sub_5999F0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_90], ecx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_90]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 68h
idiv	ecx
cmp	eax, [ebp+arg_0]
jnb	loc_599B42
mov	[ebp+var_C], 2762762h
mov	[ebp+var_10], 2762762h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_599A42
mov	eax, [ebp+var_10]
mov	[ebp+var_94], eax
jmp	short loc_599A4B

loc_599A42:
mov	ecx, [ebp+var_C]
mov	[ebp+var_94], ecx

loc_599A4B:
mov	edx, [ebp+var_94]
cmp	edx, [ebp+arg_0]
jnb	short loc_599A61
mov	ecx, [ebp+var_90]
call	sub_5BD210

loc_599A61:
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_90]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_90]
cmp	dword ptr [edx], 0
jz	short loc_599AEE
mov	eax, [ebp+var_90]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx]
mov	[ebp+var_44], eax
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_5A8B40
mov	[ebp+var_14], eax
xor	eax, eax
mov	[ebp+var_26], al
mov	cl, [ebp+var_26]
mov	[ebp+var_25], cl
lea	edx, [ebp+var_25]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_44]
push	edx
call	sub_5C74F0
add	esp, 10h
mov	eax, [ebp+var_14]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_90]
call	sub_5A9060
jmp	short loc_599B07

loc_599AEE:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_90]
add	ecx, 8
call	sub_5A8B40
mov	[ebp+var_8], eax

loc_599B07:
mov	eax, [ebp+arg_0]
imul	eax, 68h
add	eax, [ebp+var_8]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_90]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]
imul	eax, 68h
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_90]
mov	[ecx+4], eax
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx+8], eax

loc_599B42:
mov	esp, ebp
pop	ebp
retn	4
sub_5999F0 endp

align 10h


; Attributes: bp-based frame

sub_599B50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_599C27
mov	ecx, [ebp+var_14]
call	sub_4892A0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_599BB0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_599C27

loc_599BB0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5ADD10
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_599BD8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_599BEC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_599BD8

loc_599BEC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_599BFE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_599C12
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_599BFE

loc_599C12:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_599C27:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_599B50 endp



; Attributes: bp-based frame

sub_599C30 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_599C4C:
cmp	[ebp+var_10], 0
jz	short loc_599C9B
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+arg_4]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_599C8A
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_5C], ecx
jmp	short loc_599C93

loc_599C8A:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_5C], eax

loc_599C93:
mov	ecx, [ebp+var_5C]
mov	[ebp+var_10], ecx
jmp	short loc_599C4C

loc_599C9B:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_599D3D
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_5D], cl
movzx	edx, [ebp+var_5D]
test	edx, edx
jz	short loc_599D2E
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5ADBD0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_599DBB
jmp	short loc_599D3D

loc_599D2E:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_599D3D:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_4C]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_599DA0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5ADBD0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_599DBB

loc_599DA0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_599DBB:
mov	esp, ebp
pop	ebp
retn	8
sub_599C30 endp

align 10h


; Attributes: bp-based frame

sub_599DD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_599EA7
mov	ecx, [ebp+var_14]
call	sub_5791F0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_599E30
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_599EA7

loc_599E30:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5ADDF0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_599E58:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_599E6C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_599E58

loc_599E6C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_599E7E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_599E92
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_599E7E

loc_599E92:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_599EA7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_599DD0 endp



; Attributes: bp-based frame

sub_599EB0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_599EC8:
cmp	[ebp+var_8], 0
jz	short loc_599F0D
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_599F02
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_599F0B

loc_599F02:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_599F0B:
jmp	short loc_599EC8

loc_599F0D:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_5209B0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_599EB0 endp



; Attributes: bp-based frame

sub_599F30 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_45=	byte ptr -45h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 70h
push	esi
mov	[ebp+var_70], ecx
mov	eax, [ebp+var_70]
cmp	eax, [ebp+arg_0]
jz	loc_59A042
lea	eax, [ebp+var_C]
mov	ecx, [ebp+var_70]
call	sub_402EB0
lea	eax, [ebp+var_8]
mov	ecx, [ebp+var_70]
call	sub_4046E0
lea	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
call	sub_402EB0
lea	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
call	sub_4046E0

loc_599F72:
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_8]
call	sub_402EB0
lea	ecx, [ebp+var_C]
call	sub_409650
movzx	ecx, al
test	ecx, ecx
jz	short loc_599FD5
mov	edx, [ebp+var_10]
push	edx
lea	ecx, [ebp+var_4]
call	sub_409650
movzx	eax, al
test	eax, eax
jz	short loc_599FD5
mov	ecx, [ebp+var_4]
mov	[ebp+var_30], ecx
lea	eax, [ebp+var_4]
call	sub_405E90
mov	edx, [ebp+var_30]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
add	eax, 8
mov	[ebp+var_34], eax
lea	eax, [ebp+var_18]
lea	edx, [ebp+var_C]
call	sub_409A50
call	sub_4028D0
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[eax], edx
jmp	short loc_599F72

loc_599FD5:
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_59A007
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_8]
call	sub_402EB0
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_C]
call	sub_402EB0
lea	esi, [ebp+var_28]
call	sub_409600
jmp	short loc_59A042

loc_59A007:
lea	eax, [ebp+var_64]
lea	ecx, [ebp+var_8]
call	sub_402EB0
mov	eax, [ebp+var_10]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_68], ecx
xor	edx, edx
mov	[ebp+var_45], dl
lea	eax, [ebp+var_45]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
mov	edx, [ebp+var_68]
push	edx
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_64]
call	sub_402EB0
mov	ecx, [ebp+var_70]
call	sub_5BF830

loc_59A042:
mov	eax, [ebp+var_70]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_599F30 endp

align 10h


; Attributes: bp-based frame

sub_59A050 proc	near

var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_74=	dword ptr -74h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A0h
mov	[ebp+var_9C], ecx
mov	eax, [ebp+var_9C]
cmp	eax, [ebp+arg_0]
jz	loc_59A1DA
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_10]
call	sub_4046E0

loc_59A0B0:
lea	edx, [ebp+var_3C]
mov	[ebp+var_38], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_3C]
setnz	cl
mov	[ebp+var_9D], cl
movzx	edx, [ebp+var_9D]
test	edx, edx
jz	short loc_59A13F
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_59A13F
mov	eax, [ebp+var_4]
mov	[ebp+var_40], eax
lea	eax, [ebp+var_4]
call	sub_405E90
mov	ecx, [ebp+var_40]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_18]
call	sub_4ABD70
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4023E0
jmp	loc_59A0B0

loc_59A13F:
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_10]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_59A180
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_9C]
call	sub_5A90E0
jmp	short loc_59A1DA

loc_59A180:
lea	eax, [ebp+var_90]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	ecx, [ebp+var_10]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_94], edx
xor	eax, eax
mov	[ebp+var_69], al
lea	ecx, [ebp+var_69]
push	ecx
mov	edx, [ebp+var_98]
push	edx
mov	eax, [ebp+var_94]
push	eax
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_90]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
call	sub_5BF890

loc_59A1DA:
mov	eax, [ebp+var_9C]
mov	esp, ebp
pop	ebp
retn	4
sub_59A050 endp

align 10h


; Attributes: bp-based frame

sub_59A1F0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_59A251
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 4
cmp	edx, [ebp+arg_4]
jb	short loc_59A232
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5AEBB0
jmp	short loc_59A251

loc_59A232:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5AEAA0

loc_59A251:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_59A1F0 endp

align 10h


; Attributes: bp-based frame

sub_59A260 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_59A337
mov	ecx, [ebp+var_14]
call	sub_439A20
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_59A2C0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_59A337

loc_59A2C0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_512CE0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_59A2E8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_59A2FC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_59A2E8

loc_59A2FC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_59A30E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_59A322
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_59A30E

loc_59A322:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_59A337:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_59A260 endp



; Attributes: bp-based frame

sub_59A340 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AAF00
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_59A396
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_59A340
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_59A396:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_59A3A5:
cmp	[ebp+arg_0], 0
jz	short loc_59A412
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AAF00
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_59A401
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_59A340
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_59A401:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_59A3A5

loc_59A412:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_59A340 endp

align 10h


; Attributes: bp-based frame

sub_59A420 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59A43C:
cmp	[ebp+var_10], 0
jz	short loc_59A4B3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_59A482
jb	short loc_59A479
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_59A482

loc_59A479:
mov	[ebp+var_64], 1
jmp	short loc_59A489

loc_59A482:
mov	[ebp+var_64], 0

loc_59A489:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_59A4A2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_59A4AB

loc_59A4A2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_59A4AB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_59A43C

loc_59A4B3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_59A555
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_59A546
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C3BC0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_59A5FB
jmp	short loc_59A555

loc_59A546:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59A555:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_59A58F
jb	short loc_59A586
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_59A58F

loc_59A586:
mov	[ebp+var_78], 1
jmp	short loc_59A596

loc_59A58F:
mov	[ebp+var_78], 0

loc_59A596:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_59A5E0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C3BC0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_59A5FB

loc_59A5E0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_59A5FB:
mov	esp, ebp
pop	ebp
retn	8
sub_59A420 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59A610(void	*)
sub_59A610 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59A619:
cmp	[ebp+arg_0], 0
jz	short loc_59A669
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59A610
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5AF600
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59A661
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59A661:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59A619

loc_59A669:
mov	esp, ebp
pop	ebp
retn	4
sub_59A610 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59A670(float)
sub_59A670 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
fld	[ebp+arg_0]
sub	esp, 8
fstp	[esp+0Ch+var_C]
mov	eax, [ebp+var_4]
push	eax		; int
call	sub_4BCFC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn	4
sub_59A670 endp

align 10h


; Attributes: bp-based frame

sub_59A6A0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_470590
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_4706F0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_59A723

loc_59A71A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_59A723:
cmp	[ebp+var_40], 0
jle	short loc_59A74D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A6F80
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 1Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 1Ch
mov	[ebp+var_3C], eax
jmp	short loc_59A71A

loc_59A74D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_59A774
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A6F80
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
mov	[ebp+var_C], ecx
jmp	short loc_59A7C9

loc_59A774:
mov	edx, [ebp+arg_C]
imul	edx, 1Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59A7AB

loc_59A799:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 1Ch
mov	[ebp+var_68], eax

loc_59A7AB:
cmp	[ebp+var_6C], 0
jle	short loc_59A7C3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A6F80
add	esp, 8
jmp	short loc_59A799

loc_59A7C3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59A7C9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59A861
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_59A828

loc_59A81F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_59A828:
cmp	[ebp+var_80], 0
jle	short loc_59A85B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A6F80
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 1Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 1Ch
mov	[ebp+var_7C], eax
jmp	short loc_59A81F

loc_59A85B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_59A861:
mov	ecx, [ebp+var_CC]
call	sub_5A9160
mov	edx, [ebp+var_4]
imul	edx, 1Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_59A6A0 endp

align 10h


; Attributes: bp-based frame

sub_59A8B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_59A91C
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_59A8DB

loc_59A8D3:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_59A8DB:
cmp	[ebp+var_8], 1
jz	short loc_59A8EC
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_59A8D3

loc_59A8EC:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5AF670
add	esp, 14h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5AF760
add	esp, 0Ch

loc_59A91C:
mov	esp, ebp
pop	ebp
retn
sub_59A8B0 endp



; Attributes: bp-based frame

sub_59A920 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_59A920
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_59A94D:
cmp	[ebp+var_14], 0
jz	short loc_59A9AE
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_1C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_15], dl
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_59A9A3
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
mov	[ebp+var_14], edx
jmp	short loc_59A9AC

loc_59A9A3:
mov	eax, [ebp+var_14]
mov	ecx, [eax+0Ch]
mov	[ebp+var_14], ecx

loc_59A9AC:
jmp	short loc_59A94D

loc_59A9AE:
push	0
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_24]
call	sub_5AF7D0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_59A920 endp

align 10h


; Attributes: bp-based frame

sub_59A9E0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_55=	word ptr -55h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5D5E30
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5D5F90
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_59AA63

loc_59AA5A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_59AA63:
cmp	[ebp+var_40], 0
jle	short loc_59AA8D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5C7730
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 5Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 5Ch
mov	[ebp+var_3C], eax
jmp	short loc_59AA5A

loc_59AA8D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_59AACE
xor	edx, edx
mov	byte ptr [ebp+var_55+1], dl
mov	al, byte ptr [ebp+var_55+1]
mov	[ebp+var_52], al
xor	ecx, ecx
mov	byte ptr [ebp+var_55], cl
mov	dl, byte ptr [ebp+var_55]
mov	[ebp+var_53], dl
lea	eax, [ebp+var_53]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_5BB670
add	esp, 0Ch
mov	eax, [ebp+var_C]
add	eax, 5Ch
mov	[ebp+var_C], eax
jmp	short loc_59AB23

loc_59AACE:
mov	ecx, [ebp+arg_C]
imul	ecx, 5Ch
add	ecx, [ebp+var_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59AB05

loc_59AAF3:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 5Ch
mov	[ebp+var_68], eax

loc_59AB05:
cmp	[ebp+var_6C], 0
jle	short loc_59AB1D
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5C7730
add	esp, 8
jmp	short loc_59AAF3

loc_59AB1D:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59AB23:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59ABBB
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_59AB82

loc_59AB79:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_59AB82:
cmp	[ebp+var_80], 0
jle	short loc_59ABB5
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5C7730
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 5Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 5Ch
mov	[ebp+var_7C], eax
jmp	short loc_59AB79

loc_59ABB5:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_59ABBB:
mov	ecx, [ebp+var_CC]
call	sub_5A91E0
mov	edx, [ebp+var_4]
imul	edx, 5Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_59A9E0 endp

align 10h


; Attributes: bp-based frame

sub_59AC10 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_99=	byte ptr -99h
var_88=	dword ptr -88h
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0BCh
mov	[ebp+var_BC], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_BC]
jz	loc_59AE82
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_BC]
mov	eax, [ebp+var_BC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 5Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_59ACEF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_BC]
add	ecx, 8
call	sub_57FEF0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5BFE60
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_BC]
call	sub_5A91E0
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 5Ch
mov	eax, [ebp+var_BC]
add	edx, [eax]
mov	ecx, [ebp+var_BC]
mov	[ecx+8], edx
jmp	loc_59AE6B

loc_59ACEF:
mov	edx, [ebp+var_BC]
mov	eax, [ebp+var_BC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 5Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_59ADBA
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_59AD5C

loc_59AD53:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_59AD5C:
cmp	[ebp+var_68], 0
jle	short loc_59AD82
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5C68B0
mov	ecx, [ebp+var_6C]
add	ecx, 5Ch
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 5Ch
mov	[ebp+var_70], edx
jmp	short loc_59AD53

loc_59AD82:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
xor	eax, eax
mov	[ebp+var_7D], al
lea	ecx, [ebp+var_7D]
push	ecx
push	0
mov	edx, [ebp+var_88]
push	edx		; int
mov	eax, [ebp+var_10]
push	eax		; void *
call	sub_5C7770
add	esp, 10h
jmp	loc_59AE6B

loc_59ADBA:
xor	ecx, ecx
mov	[ebp+var_12], cl
lea	edx, [ebp+var_12]
push	edx
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_BC]
mov	eax, [ebp+var_BC]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 5Ch
idiv	ecx
imul	eax, 5Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_5B0060
add	esp, 10h
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_BC]
mov	ecx, [eax+4]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_BC]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 5Ch
idiv	ecx
imul	eax, 5Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_B0], eax
push	0
lea	eax, [ebp+var_99]
push	eax
mov	ecx, [ebp+var_B8]
push	ecx
mov	edx, [ebp+var_B4]
push	edx
mov	eax, [ebp+var_B0]
push	eax
call	sub_5BFEB0
add	esp, 14h

loc_59AE6B:
mov	ecx, [ebp+var_4]
imul	ecx, 5Ch
mov	edx, [ebp+var_BC]
add	ecx, [edx]
mov	eax, [ebp+var_BC]
mov	[eax+4], ecx

loc_59AE82:
mov	eax, [ebp+var_BC]
mov	esp, ebp
pop	ebp
retn	4
sub_59AC10 endp

align 10h


; Attributes: bp-based frame

sub_59AE90 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_57FD30
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A92E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_59AF13

loc_59AF0A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_59AF13:
cmp	[ebp+var_40], 0
jle	short loc_59AF42
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A7010
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 0A8h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 0A8h
mov	[ebp+var_3C], eax
jmp	short loc_59AF0A

loc_59AF42:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_59AF6C
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A7010
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 0A8h
mov	[ebp+var_C], ecx
jmp	short loc_59AFC6

loc_59AF6C:
mov	edx, [ebp+arg_C]
imul	edx, 0A8h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59AFA8

loc_59AF94:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 0A8h
mov	[ebp+var_68], eax

loc_59AFA8:
cmp	[ebp+var_6C], 0
jle	short loc_59AFC0
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A7010
add	esp, 8
jmp	short loc_59AF94

loc_59AFC0:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59AFC6:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59B063
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_59B025

loc_59B01C:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_59B025:
cmp	[ebp+var_80], 0
jle	short loc_59B05D
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A7010
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 0A8h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 0A8h
mov	[ebp+var_7C], eax
jmp	short loc_59B01C

loc_59B05D:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_59B063:
mov	ecx, [ebp+var_CC]
call	sub_5A9260
mov	edx, [ebp+var_4]
imul	edx, 0A8h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_59AE90 endp

align 10h


; Attributes: bp-based frame

sub_59B0B0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_55=	word ptr -55h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4B87E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_498DE0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_59B133

loc_59B12A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_59B133:
cmp	[ebp+var_40], 0
jle	short loc_59B15D
mov	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_5C7800
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 24h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 24h
mov	[ebp+var_3C], eax
jmp	short loc_59B12A

loc_59B15D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_59B19E
xor	edx, edx
mov	byte ptr [ebp+var_55+1], dl
mov	al, byte ptr [ebp+var_55+1]
mov	[ebp+var_52], al
xor	ecx, ecx
mov	byte ptr [ebp+var_55], cl
mov	dl, byte ptr [ebp+var_55]
mov	[ebp+var_53], dl
lea	eax, [ebp+var_53]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_5CA8E0
add	esp, 0Ch
mov	eax, [ebp+var_C]
add	eax, 24h
mov	[ebp+var_C], eax
jmp	short loc_59B1F3

loc_59B19E:
mov	ecx, [ebp+arg_C]
imul	ecx, 24h
add	ecx, [ebp+var_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59B1D5

loc_59B1C3:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 24h
mov	[ebp+var_68], eax

loc_59B1D5:
cmp	[ebp+var_6C], 0
jle	short loc_59B1ED
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_5C7800
add	esp, 8
jmp	short loc_59B1C3

loc_59B1ED:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59B1F3:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59B28B
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_59B252

loc_59B249:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_59B252:
cmp	[ebp+var_80], 0
jle	short loc_59B285
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_7C]
push	ecx
call	sub_5C7800
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 24h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 24h
mov	[ebp+var_7C], eax
jmp	short loc_59B249

loc_59B285:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_59B28B:
mov	ecx, [ebp+var_CC]
call	sub_5A9360
mov	edx, [ebp+var_4]
imul	edx, 24h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_59B0B0 endp

align 10h


; Attributes: bp-based frame

sub_59B2E0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_59B341
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 6
cmp	edx, [ebp+arg_4]
jb	short loc_59B322
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5B01C0
jmp	short loc_59B341

loc_59B322:
xor	edx, edx
mov	[ebp+var_2], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5B00C0

loc_59B341:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_59B2E0 endp

align 10h


; Attributes: bp-based frame

sub_59B350 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_59B375
xor	al, al
jmp	loc_59B4CE

loc_59B375:
xor	ecx, ecx
cmp	ecx, 0Ch
jz	short loc_59B386
mov	edx, 0Ch
cmp	edx, 0Fh
jl	short loc_59B38D

loc_59B386:
xor	al, al
jmp	loc_59B4CE

loc_59B38D:
mov	[ebp+var_4], 0Ch
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_59B3F9
xor	al, al
jmp	loc_59B4CE

loc_59B3F9:		; size_t
push	18h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_59B467
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B6C00
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6DC8
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B6DC8
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6DE4
mov	ecx, [ebp+var_14]
mov	[ebp+var_8C], ecx
jmp	short loc_59B471

loc_59B467:
mov	[ebp+var_8C], 0

loc_59B471:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 0Ch
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_59B4CC
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_59B4CC:
mov	al, 1

loc_59B4CE:
mov	esp, ebp
pop	ebp
retn	4
sub_59B350 endp

align 10h


; Attributes: bp-based frame

sub_59B4E0 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_59B505
xor	al, al
jmp	loc_59B65E

loc_59B505:
xor	ecx, ecx
cmp	ecx, 0Dh
jz	short loc_59B516
mov	edx, 0Dh
cmp	edx, 0Fh
jl	short loc_59B51D

loc_59B516:
xor	al, al
jmp	loc_59B65E

loc_59B51D:
mov	[ebp+var_4], 0Dh
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_59B589
xor	al, al
jmp	loc_59B65E

loc_59B589:		; size_t
push	18h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_59B5F7
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B6C00
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6DC8
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B6DC8
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6FA0
mov	ecx, [ebp+var_14]
mov	[ebp+var_8C], ecx
jmp	short loc_59B601

loc_59B5F7:
mov	[ebp+var_8C], 0

loc_59B601:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 0Dh
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_59B65C
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_59B65C:
mov	al, 1

loc_59B65E:
mov	esp, ebp
pop	ebp
retn	4
sub_59B4E0 endp

align 10h


; Attributes: bp-based frame

sub_59B670 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_59B695
xor	al, al
jmp	loc_59B7EE

loc_59B695:
xor	ecx, ecx
cmp	ecx, 0Eh
jz	short loc_59B6A6
mov	edx, 0Eh
cmp	edx, 0Fh
jl	short loc_59B6AD

loc_59B6A6:
xor	al, al
jmp	loc_59B7EE

loc_59B6AD:
mov	[ebp+var_4], 0Eh
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_59B719
xor	al, al
jmp	loc_59B7EE

loc_59B719:		; size_t
push	18h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_59B787
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B6C00
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6DC8
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx], offset	off_15B6DC8
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15B6FBC
mov	ecx, [ebp+var_14]
mov	[ebp+var_8C], ecx
jmp	short loc_59B791

loc_59B787:
mov	[ebp+var_8C], 0

loc_59B791:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 0Eh
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_59B7EC
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_59B7EC:
mov	al, 1

loc_59B7EE:
mov	esp, ebp
pop	ebp
retn	4
sub_59B670 endp

align 10h


; Attributes: bp-based frame

sub_59B800 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_4]
mov	dword ptr [eax], 0
mov	[ebp+var_5], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_30]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_30]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_2C]
mov	[ebp+var_28], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_2C]
setnz	cl
mov	[ebp+var_31], cl
movzx	edx, [ebp+var_31]
test	edx, edx
jz	short loc_59B877
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	edx, [ecx+14h]
mov	[eax], edx
mov	[ebp+var_5], 1

loc_59B877:
mov	al, [ebp+var_5]
mov	esp, ebp
pop	ebp
retn	8
sub_59B800 endp



; Attributes: bp-based frame

sub_59B880 proc	near

var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_59B880
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D8h
mov	[ebp+var_CC], ecx
mov	[ebp+var_98], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5E9440
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_CC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_A4]
mov	[ebp+var_A0], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_A0]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_A4]
setz	al
mov	[ebp+var_CD], al
movzx	ecx, [ebp+var_CD]
test	ecx, ecx
jnz	loc_59B9A5
or	[ebp+var_98], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_CC]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_A8]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_59B984
jb	short loc_59B978
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_59B984

loc_59B978:
mov	[ebp+var_DC], 1
jmp	short loc_59B98E

loc_59B984:
mov	[ebp+var_DC], 0

loc_59B98E:
movzx	ecx, byte ptr [ebp+var_DC]
test	ecx, ecx
jnz	short loc_59B9A5
mov	[ebp+var_E0], 0
jmp	short loc_59B9AF

loc_59B9A5:
mov	[ebp+var_E0], 1

loc_59B9AF:
mov	dl, byte ptr [ebp+var_E0]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_98]
and	eax, 1
jz	short loc_59B9D8
and	[ebp+var_98], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_59B9D8:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_59BAFE
lea	ecx, [ebp+var_A9]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_84]
call	sub_402390
lea	ecx, [ebp+var_A9]
call	nullsub_1
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_5C], eax
mov	ecx, [edx+4]
mov	[ebp+var_58], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_B4]
movss	xmm0, [ebp+var_88]
movss	dword ptr [edx+4], xmm0
lea	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_B4]
add	ecx, 8
call	sub_403400
lea	ecx, [ebp+var_C4]
mov	[ebp+var_B8], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_B8]
call	sub_4046E0
lea	edx, [ebp+var_5C]
push	edx
push	ecx
mov	[ebp+var_C0], esp
mov	ecx, [ebp+var_C4]
mov	eax, [ebp+var_C0]
call	sub_4046E0
lea	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5AF950
lea	ecx, [ebp+var_94]
mov	[ebp+var_E4], ecx
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_54]
mov	[ebp+var_C8], ecx
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_407E50
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_84]
call	sub_407E50

loc_59BAFE:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_59B880 endp

align 10h


; Attributes: bp-based frame

sub_59BB20 proc	near

var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_34], eax
push	0
mov	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_50BAC0
mov	[ebp+var_20], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_24], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_48], edx
xor	eax, eax
mov	[ebp+var_3D], al
lea	ecx, [ebp+var_3D]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_68]
add	ecx, 4
call	sub_5C7840
mov	[ebp+var_2C], 0
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_4C6F50
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_1C], edx
mov	[ebp+var_C], 0
mov	eax, [ebp+var_68]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_422EC0
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_68]
add	ecx, 8
call	sub_418C90
mov	[ebp+var_14], eax
jmp	short loc_59BC18

loc_59BC08:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59BC18:
mov	edx, [ebp+var_1C]
xor	eax, eax
cmp	edx, [ebp+var_C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_59BC60
jmp	short loc_59BC3E

loc_59BC2C:
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_18], eax

loc_59BC3E:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_10]
jz	short loc_59BC5E
mov	edx, [ebp+var_8]
mov	eax, [edx]
cmp	eax, [ebp+var_1C]
jnz	short loc_59BC5A
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx], edx
jmp	short loc_59BC5C

loc_59BC5A:
jmp	short loc_59BC5E

loc_59BC5C:
jmp	short loc_59BC2C

loc_59BC5E:
jmp	short loc_59BC08

loc_59BC60:
mov	[ebp+var_30], 0
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_18]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+18h]
mov	esp, ebp
pop	ebp
retn	4
sub_59BB20 endp

align 10h


; Attributes: bp-based frame

sub_59BCA0 proc	near

var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59BCB1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_59BCF3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_5B0680
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_59BCF1
mov	ecx, 1
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59BCF1:
jmp	short loc_59BCB1

loc_59BCF3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_59BCA0 endp

align 10h


; Attributes: bp-based frame

sub_59BD10 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_59BFB3
jmp	short loc_59BDD5

loc_59BDCD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_59BDD5:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_59BEA9
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 1
call	sub_40A230
movzx	eax, al
test	eax, eax
jz	short loc_59BEA4
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_94]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_8C]
mov	[eax], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ecx]
mov	[ebp+var_98], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_98]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_59BFF9

loc_59BEA4:
jmp	loc_59BDCD

loc_59BEA9:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_5AB4A0
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_59BFF9

loc_59BFB3:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_5B06C0
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_59BFF9:
mov	esp, ebp
pop	ebp
retn	8
sub_59BD10 endp

align 10h


; Attributes: bp-based frame

sub_59C000 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_59C062
jmp	short loc_59C07D

loc_59C062:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_5B07C0

loc_59C07D:
mov	esp, ebp
pop	ebp
retn	4
sub_59C000 endp

align 10h


; Attributes: bp-based frame

sub_59C090 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_59BCA0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_59C090 endp



; Attributes: bp-based frame

sub_59C0E0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59C0F1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_59C133
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_50E910
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_59C131
mov	ecx, 1
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59C131:
jmp	short loc_59C0F1

loc_59C133:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_59C0E0 endp

align 10h


; Attributes: bp-based frame

sub_59C150 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59C161:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_59C1A9
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
push	0
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_51D900
cmp	[ebp+var_8], 0
jz	short loc_59C1A7
mov	ecx, 1
imul	ecx, 94h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59C1A7:
jmp	short loc_59C161

loc_59C1A9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_59C150 endp

align 10h


; Attributes: bp-based frame

sub_59C1C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_59C2B4
mov	[ebp+var_4], 0
jmp	short loc_59C1F3

loc_59C1EA:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_59C1F3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+var_4], edx
jnb	loc_59C2B4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+eax*8]
mov	eax, [edx+4]
mov	[ebp+var_18], eax

loc_59C227:
mov	ecx, [ebp+var_18]
mov	dl, [ecx]
mov	[ebp+var_19], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax]
jnz	short loc_59C264
cmp	[ebp+var_19], 0
jz	short loc_59C25B
mov	ecx, [ebp+var_18]
mov	dl, [ecx+1]
mov	[ebp+var_1A], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax+1]
jnz	short loc_59C264
add	[ebp+var_18], 2
add	[ebp+var_14], 2
cmp	[ebp+var_1A], 0
jnz	short loc_59C227

loc_59C25B:
mov	[ebp+var_20], 0
jmp	short loc_59C26C

loc_59C264:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_20], ecx

loc_59C26C:
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
cmp	[ebp+var_24], 0
jnz	short loc_59C2AF
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+eax*8+4]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+eax*8]
push	edx
call	sub_770070
add	esp, 10h
jmp	short loc_59C2B4

loc_59C2AF:
jmp	loc_59C1EA

loc_59C2B4:
mov	esp, ebp
pop	ebp
retn
sub_59C1C0 endp

align 10h


; Attributes: bp-based frame

sub_59C2C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+20h], 0
jz	short loc_59C316
mov	ecx, [ebp+var_C]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_4C3FE0
mov	edx, [ebp+var_C]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+20h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_59C316
mov	eax, [ebp+var_8]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_59C316:
mov	esp, ebp
pop	ebp
retn
sub_59C2C0 endp

align 10h


; Attributes: bp-based frame

sub_59C320 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	[ebp+var_18], 80h
mov	eax, [ebp+arg_0]
shr	eax, 5
add	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_10], ecx
mov	[ebp+var_14], 8
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_14]
push	eax
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_40]
mov	edx, [eax]
mov	[ecx+24h], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
push	ecx
mov	ecx, [ebp+var_40]
add	ecx, 20h
call	sub_5A9600
mov	edx, [ebp+var_40]
mov	[edx+20h], eax
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_40]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5E6E90
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_2C], 80h
mov	eax, 20h
shl	eax, 2
mov	ecx, [ebp+var_40]
add	eax, [ecx+4]
mov	edx, [ebp+var_40]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
sub	eax, 4
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_40]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_30], 80h
mov	ecx, 20h
shl	ecx, 2
mov	edx, [ebp+var_34]
add	ecx, [edx+4]
mov	eax, [ebp+var_34]
mov	[eax+8], ecx
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ecx], eax
mov	[ebp+var_3C], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax+14h]
lea	edx, [ecx+edx*4]
mov	eax, [ebp+var_40]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_59C320 endp

align 10h


; Attributes: bp-based frame

sub_59C460 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_28]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_59C498
push	0
push	1
mov	ecx, [ebp+var_28]
call	sub_5B7570

loc_59C498:
mov	[ebp+var_4], 80h
push	20h
mov	ecx, [ebp+var_28]
add	ecx, 24h
call	sub_5A9600
mov	ecx, [ebp+var_28]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	ecx, [eax+10h]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_13], dl
mov	al, [ebp+var_13]
mov	[ebp+var_11], al
xor	ecx, ecx
mov	[ebp+var_14], cl
mov	dl, [ebp+var_14]
mov	[ebp+var_12], dl
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax+1Ch]
add	ecx, 4
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
add	edx, 10h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_1C], 80h
mov	edx, 20h
shl	edx, 2
mov	eax, [ebp+var_20]
add	edx, [eax+4]
mov	ecx, [ebp+var_20]
mov	[ecx+8], edx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_28]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_59C460 endp

align 10h


; Attributes: bp-based frame

sub_59C540 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_59C558:
cmp	[ebp+var_8], 0
jz	short loc_59C59C
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_59C591
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_59C59A

loc_59C591:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_59C59A:
jmp	short loc_59C558

loc_59C59C:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_5B0A60
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_59C540 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59C5C0(void	*)
sub_59C5C0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59C5C9:
cmp	[ebp+arg_0], 0
jz	short loc_59C60F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59C5C0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_59C607
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59C607:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59C5C9

loc_59C60F:
mov	esp, ebp
pop	ebp
retn	4
sub_59C5C0 endp

align 10h


; Attributes: bp-based frame

sub_59C620 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B0BA0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_59C620 endp

align 10h


; Attributes: bp-based frame

sub_59C650 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B0DE0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_59C650 endp

align 10h


; Attributes: bp-based frame

sub_59C680 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jz	short loc_59C6BD
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_59C6A3
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA90

loc_59C6A3:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_59C6BD
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_59C6BD:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_59C680 endp

align 10h


; Attributes: bp-based frame

sub_59C6D0 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_59C73B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 88h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_59C717
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5B1260
jmp	short loc_59C73B

loc_59C717:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5B1020

loc_59C73B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_59C6D0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59C750(void	*)
sub_59C750 proc	near

var_40=	dword ptr -40h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx

loc_59C759:
cmp	[ebp+arg_0], 0
jz	short loc_59C7A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_40]
call	sub_59C750
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7D00
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59C7A1
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59C7A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59C759

loc_59C7A9:
mov	esp, ebp
pop	ebp
retn	4
sub_59C750 endp

align 10h


; Attributes: bp-based frame

sub_59C7B0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59C7CC:
cmp	[ebp+var_10], 0
jz	short loc_59C843
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_59C812
jb	short loc_59C809
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_59C812

loc_59C809:
mov	[ebp+var_64], 1
jmp	short loc_59C819

loc_59C812:
mov	[ebp+var_64], 0

loc_59C819:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_59C832
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_59C83B

loc_59C832:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_59C83B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_59C7CC

loc_59C843:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_59C8E5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_59C8D6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B1550
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_59C98B
jmp	short loc_59C8E5

loc_59C8D6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59C8E5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_59C91F
jb	short loc_59C916
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_59C91F

loc_59C916:
mov	[ebp+var_78], 1
jmp	short loc_59C926

loc_59C91F:
mov	[ebp+var_78], 0

loc_59C926:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_59C970
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B1550
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_59C98B

loc_59C970:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_59C98B:
mov	esp, ebp
pop	ebp
retn	8
sub_59C7B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59C9A0(void	*)
sub_59C9A0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59C9A9:
cmp	[ebp+arg_0], 0
jz	short loc_59C9EF
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59C9A0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_59C9E7
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59C9E7:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59C9A9

loc_59C9EF:
mov	esp, ebp
pop	ebp
retn	4
sub_59C9A0 endp

align 10h


; Attributes: bp-based frame

sub_59CA00 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59CA1C:
cmp	[ebp+var_10], 0
jz	short loc_59CA67
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_59CA56
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_59CA5F

loc_59CA56:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_59CA5F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_59CA1C

loc_59CA67:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_59CB09
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_59CAFA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B16C0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_59CB83
jmp	short loc_59CB09

loc_59CAFA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59CB09:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_59CB68
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B16C0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_59CB83

loc_59CB68:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_59CB83:
mov	esp, ebp
pop	ebp
retn	8
sub_59CA00 endp

align 10h


; Attributes: bp-based frame

sub_59CB90 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59CBA1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_59CBE6
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5A7390
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_59CBE4
mov	ecx, 1
imul	ecx, 88h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59CBE4:
jmp	short loc_59CBA1

loc_59CBE6:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_59CB90 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59CC00(void	*)
sub_59CC00 proc	near

var_58=	dword ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx

loc_59CC09:
cmp	[ebp+arg_0], 0
jz	short loc_59CC59
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_58]
call	sub_59CC00
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B1940
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59CC51
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59CC51:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59CC09

loc_59CC59:
mov	esp, ebp
pop	ebp
retn	4
sub_59CC00 endp

align 10h


; Attributes: bp-based frame

sub_59CC60 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59CC7C:
cmp	[ebp+var_10], 0
jz	short loc_59CCC7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_59CCB6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_59CCBF

loc_59CCB6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_59CCBF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_59CC7C

loc_59CCC7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_59CD69
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_59CD5A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B1800
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_59CDE3
jmp	short loc_59CD69

loc_59CD5A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59CD69:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_59CDC8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B1800
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_59CDE3

loc_59CDC8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_59CDE3:
mov	esp, ebp
pop	ebp
retn	8
sub_59CC60 endp

align 10h


; Attributes: bp-based frame

sub_59CDF0 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_59CE15
xor	al, al
jmp	loc_59CF26

loc_59CE15:
xor	ecx, ecx
cmp	ecx, 2
jz	short loc_59CE26
mov	edx, 2
cmp	edx, 0Fh
jl	short loc_59CE2D

loc_59CE26:
xor	al, al
jmp	loc_59CF26

loc_59CE2D:
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_59CE99
xor	al, al
jmp	loc_59CF26

loc_59CE99:		; size_t
push	80h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_59CEBF
mov	ecx, [ebp+var_14]
call	sub_C0CB30
mov	[ebp+var_8C], eax
jmp	short loc_59CEC9

loc_59CEBF:
mov	[ebp+var_8C], 0

loc_59CEC9:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 2
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_59CF24
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_59CF24:
mov	al, 1

loc_59CF26:
mov	esp, ebp
pop	ebp
retn	4
sub_59CDF0 endp

align 10h


; Attributes: bp-based frame

sub_59CF30 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_59CF55
xor	al, al
jmp	loc_59D066

loc_59CF55:
xor	ecx, ecx
cmp	ecx, 1
jz	short loc_59CF66
mov	edx, 1
cmp	edx, 0Fh
jl	short loc_59CF6D

loc_59CF66:
xor	al, al
jmp	loc_59D066

loc_59CF6D:
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_59CFD9
xor	al, al
jmp	loc_59D066

loc_59CFD9:		; size_t
push	0A8h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_59CFFF
mov	ecx, [ebp+var_14]
call	sub_C96980
mov	[ebp+var_8C], eax
jmp	short loc_59D009

loc_59CFFF:
mov	[ebp+var_8C], 0

loc_59D009:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 1
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_59D064
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_59D064:
mov	al, 1

loc_59D066:
mov	esp, ebp
pop	ebp
retn	4
sub_59CF30 endp

align 10h


; Attributes: bp-based frame

sub_59D070 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_59D095
xor	al, al
jmp	loc_59D1A3

loc_59D095:
xor	ecx, ecx
cmp	ecx, 3
jz	short loc_59D0A6
mov	edx, 3
cmp	edx, 0Fh
jl	short loc_59D0AD

loc_59D0A6:
xor	al, al
jmp	loc_59D1A3

loc_59D0AD:
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_59D119
xor	al, al
jmp	loc_59D1A3

loc_59D119:		; size_t
push	64h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_59D13C
mov	ecx, [ebp+var_14]
call	sub_C009B0
mov	[ebp+var_8C], eax
jmp	short loc_59D146

loc_59D13C:
mov	[ebp+var_8C], 0

loc_59D146:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 3
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_59D1A1
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_59D1A1:
mov	al, 1

loc_59D1A3:
mov	esp, ebp
pop	ebp
retn	4
sub_59D070 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59D1B0(void	*)
sub_59D1B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59D1B9:
cmp	[ebp+arg_0], 0
jz	short loc_59D209
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59D1B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B1970
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59D201
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59D201:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59D1B9

loc_59D209:
mov	esp, ebp
pop	ebp
retn	4
sub_59D1B0 endp

align 10h


; Attributes: bp-based frame

sub_59D210 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AAFA0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_59D266
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_59D210
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_59D266:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_59D275:
cmp	[ebp+arg_0], 0
jz	short loc_59D2E2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AAFA0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_59D2D1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_59D210
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_59D2D1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_59D275

loc_59D2E2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_59D210 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59D2F0(void	*)
sub_59D2F0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_59D2F9:
cmp	[ebp+arg_0], 0
jz	short loc_59D349
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_59D2F0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B1AE0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59D341
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59D341:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59D2F9

loc_59D349:
mov	esp, ebp
pop	ebp
retn	4
sub_59D2F0 endp

align 10h


; Attributes: bp-based frame

sub_59D350 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59D36C:
cmp	[ebp+var_10], 0
jz	short loc_59D3B7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_59D3A6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_59D3AF

loc_59D3A6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_59D3AF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_59D36C

loc_59D3B7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_59D459
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_59D44A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B19A0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_59D4D3
jmp	short loc_59D459

loc_59D44A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59D459:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_59D4B8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B19A0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_59D4D3

loc_59D4B8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_59D4D3:
mov	esp, ebp
pop	ebp
retn	8
sub_59D350 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59D4E0(void	*)
sub_59D4E0 proc	near

var_58=	dword ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx

loc_59D4E9:
cmp	[ebp+arg_0], 0
jz	short loc_59D539
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_58]
call	sub_59D4E0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B1CA0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59D531
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59D531:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59D4E9

loc_59D539:
mov	esp, ebp
pop	ebp
retn	4
sub_59D4E0 endp

align 10h


; Attributes: bp-based frame

sub_59D540 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59D55C:
cmp	[ebp+var_10], 0
jz	short loc_59D5A7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_59D596
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_59D59F

loc_59D596:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_59D59F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_59D55C

loc_59D5A7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_59D649
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_59D63A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B1B60
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_59D6C3
jmp	short loc_59D649

loc_59D63A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59D649:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_59D6A8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B1B60
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_59D6C3

loc_59D6A8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_59D6C3:
mov	esp, ebp
pop	ebp
retn	8
sub_59D540 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59D6D0(void	*)
sub_59D6D0 proc	near

var_40=	dword ptr -40h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx

loc_59D6D9:
cmp	[ebp+arg_0], 0
jz	short loc_59D729
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_40]
call	sub_59D6D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B1E10
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59D721
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59D721:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59D6D9

loc_59D729:
mov	esp, ebp
pop	ebp
retn	4
sub_59D6D0 endp

align 10h


; Attributes: bp-based frame

sub_59D730 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59D74C:
cmp	[ebp+var_10], 0
jz	short loc_59D797
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_59D786
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_59D78F

loc_59D786:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_59D78F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_59D74C

loc_59D797:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_59D839
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_59D82A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B1CD0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_59D8B3
jmp	short loc_59D839

loc_59D82A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59D839:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_59D898
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B1CD0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_59D8B3

loc_59D898:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_59D8B3:
mov	esp, ebp
pop	ebp
retn	8
sub_59D730 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59D8C0(void	*)
sub_59D8C0 proc	near

var_64=	dword ptr -64h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx

loc_59D8C9:
cmp	[ebp+arg_0], 0
jz	short loc_59D919
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_64]
call	sub_59D8C0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_525490
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59D911
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59D911:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59D8C9

loc_59D919:
mov	esp, ebp
pop	ebp
retn	4
sub_59D8C0 endp

align 10h


; Attributes: bp-based frame

sub_59D920 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A96D0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_57DD50
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_59D9A3

loc_59D99A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_59D9A3:
cmp	[ebp+var_40], 0
jle	short loc_59D9CD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A73F0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 70h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 70h
mov	[ebp+var_3C], eax
jmp	short loc_59D99A

loc_59D9CD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_59D9F4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A73F0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 70h
mov	[ebp+var_C], ecx
jmp	short loc_59DA49

loc_59D9F4:
mov	edx, [ebp+arg_C]
imul	edx, 70h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59DA2B

loc_59DA19:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 70h
mov	[ebp+var_68], eax

loc_59DA2B:
cmp	[ebp+var_6C], 0
jle	short loc_59DA43
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A73F0
add	esp, 8
jmp	short loc_59DA19

loc_59DA43:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59DA49:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59DAE1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_59DAA8

loc_59DA9F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_59DAA8:
cmp	[ebp+var_80], 0
jle	short loc_59DADB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A73F0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 70h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 70h
mov	[ebp+var_7C], eax
jmp	short loc_59DA9F

loc_59DADB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_59DAE1:
mov	ecx, [ebp+var_CC]
call	sub_5A97B0
mov	edx, [ebp+var_4]
imul	edx, 70h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_59D920 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59DB30(void	*)
sub_59DB30 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59DB39:
cmp	[ebp+arg_0], 0
jz	short loc_59DB89
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59DB30
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B2320
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59DB81
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59DB81:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59DB39

loc_59DB89:
mov	esp, ebp
pop	ebp
retn	4
sub_59DB30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59DB90(void	*)
sub_59DB90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59DB99:
cmp	[ebp+arg_0], 0
jz	short loc_59DBE9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59DB90
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B2860
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59DBE1
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59DBE1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59DB99

loc_59DBE9:
mov	esp, ebp
pop	ebp
retn	4
sub_59DB90 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59DBF0(void	*)
sub_59DBF0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59DBF9:
cmp	[ebp+arg_0], 0
jz	short loc_59DC49
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59DBF0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7B70
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59DC41
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59DC41:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59DBF9

loc_59DC49:
mov	esp, ebp
pop	ebp
retn	4
sub_59DBF0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59DC50(void	*)
sub_59DC50 proc	near

var_34=	dword ptr -34h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx

loc_59DC59:
cmp	[ebp+arg_0], 0
jz	short loc_59DCAC
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_34]
call	sub_59DC50
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B2D80
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59DCA4
mov	edx, 1
imul	edx, 0C0h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59DCA4:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59DC59

loc_59DCAC:
mov	esp, ebp
pop	ebp
retn	4
sub_59DC50 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59DCC0(void	*)
sub_59DCC0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_59DCC9:
cmp	[ebp+arg_0], 0
jz	short loc_59DD1C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_59DCC0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B2DB0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59DD14
mov	edx, 1
imul	edx, 88h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59DD14:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59DCC9

loc_59DD1C:
mov	esp, ebp
pop	ebp
retn	4
sub_59DCC0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59DD30(void	*)
sub_59DD30 proc	near

var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_59DD39:
cmp	[ebp+arg_0], 0
jz	short loc_59DD8C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_59DD30
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_5BDB40
cmp	[ebp+arg_0], 0
jz	short loc_59DD84
mov	edx, 1
imul	edx, 64h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59DD84:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59DD39

loc_59DD8C:
mov	esp, ebp
pop	ebp
retn	4
sub_59DD30 endp

align 10h


; Attributes: bp-based frame

sub_59DDA0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_59DDB8:
cmp	[ebp+var_8], 0
jz	short loc_59DE10
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_59DDE5
mov	[ebp+var_1C], 1
jmp	short loc_59DDEC

loc_59DDE5:
mov	[ebp+var_1C], 0

loc_59DDEC:
mov	cl, byte ptr [ebp+var_1C]
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_59DE05
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_59DE0E

loc_59DE05:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_59DE0E:
jmp	short loc_59DDB8

loc_59DE10:
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5B2E00
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_59DDA0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59DE40(void	*)
sub_59DE40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59DE49:
cmp	[ebp+arg_0], 0
jz	short loc_59DE99
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59DE40
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B34F0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59DE91
mov	edx, 1
imul	edx, 48h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59DE91:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59DE49

loc_59DE99:
mov	esp, ebp
pop	ebp
retn	4
sub_59DE40 endp

align 10h


; Attributes: bp-based frame

sub_59DEA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_59DF77
mov	ecx, [ebp+var_14]
call	sub_593E70
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_59DF00
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_59DF77

loc_59DF00:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5B2F50
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_59DF28:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_59DF3C
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_59DF28

loc_59DF3C:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_59DF4E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_59DF62
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_59DF4E

loc_59DF62:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_59DF77:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_59DEA0 endp



; Attributes: bp-based frame

sub_59DF80 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59DF91:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_59DFD3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_59DFD1
mov	ecx, 1
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59DFD1:
jmp	short loc_59DF91

loc_59DFD3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_59DF80 endp

align 10h


; Attributes: bp-based frame

sub_59DFF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_59DF80
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_59DFF0 endp



; Attributes: bp-based frame

; int __stdcall	sub_59E040(void	*)
sub_59E040 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_59E049:
cmp	[ebp+arg_0], 0
jz	short loc_59E09C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_59E040
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7DB0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59E094
mov	edx, 1
imul	edx, 88h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59E094:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59E049

loc_59E09C:
mov	esp, ebp
pop	ebp
retn	4
sub_59E040 endp

align 10h


; Attributes: bp-based frame

sub_59E0B0 proc	near

var_90=	dword ptr -90h
var_8A=	byte ptr -8Ah
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	byte ptr -4Ch
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_88], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	ecx, [ebp+var_88]
call	sub_5C1310
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_68]
mov	[ebp+var_14], edx
lea	eax, [ebp+var_84]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_84]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_78]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_80]
setz	al
mov	[ebp+var_89], al
mov	cl, [ebp+var_89]
mov	[ebp+var_8A], cl
movzx	edx, [ebp+var_8A]
test	edx, edx
jz	short loc_59E19E
mov	[ebp+var_34], 0
or	[ebp+var_54], 1
lea	ecx, [ebp+var_4D]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_4C]
call	sub_407D30
or	[ebp+var_54], 2
or	[ebp+var_54], 4
lea	ecx, [ebp+var_4C]
push	ecx
lea	ecx, [ebp+var_30]
call	sub_403850
mov	edx, [ebp+var_34]
mov	[ebp+var_18], edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_88]
call	sub_5B3530
add	eax, 18h
mov	[ebp+var_90], eax
jmp	short loc_59E1AA

loc_59E19E:
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
mov	[ebp+var_90], ecx

loc_59E1AA:
mov	edx, [ebp+var_90]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_54]
and	ecx, 4
jz	short loc_59E1CD
and	[ebp+var_54], 0FFFFFFFBh
lea	ecx, [ebp+var_30]
call	sub_407910

loc_59E1CD:
mov	edx, [ebp+var_54]
and	edx, 2
jz	short loc_59E1E1
and	[ebp+var_54], 0FFFFFFFDh
lea	ecx, [ebp+var_4C]
call	sub_407910

loc_59E1E1:
mov	eax, [ebp+var_54]
and	eax, 1
jz	short loc_59E1F5
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_4D]
call	nullsub_1

loc_59E1F5:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_59E0B0 endp

align 10h


; Attributes: bp-based frame

sub_59E200 proc	near

var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_151= byte ptr -151h
var_150= dword ptr -150h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_138= dword ptr -138h
var_134= dword ptr -134h
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= byte ptr -114h
var_10C= byte ptr -10Ch
var_9C=	dword ptr -9Ch
var_94=	byte ptr -94h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 150h
mov	[ebp+var_150], ecx
mov	[ebp+var_118], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_150]
call	sub_5DE010
mov	[ebp+var_11C], eax
mov	ecx, [ebp+var_11C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_150]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_124]
mov	[ebp+var_120], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_120]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_124]
setz	al
mov	[ebp+var_151], al
movzx	ecx, [ebp+var_151]
test	ecx, ecx
jnz	short loc_59E2DB
or	[ebp+var_118], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_128], edx
mov	eax, [ebp+var_150]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_128]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_59E2DB
mov	[ebp+var_158], 0
jmp	short loc_59E2E5

loc_59E2DB:
mov	[ebp+var_158], 1

loc_59E2E5:
mov	cl, byte ptr [ebp+var_158]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_118]
and	edx, 1
jz	short loc_59E30E
and	[ebp+var_118], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_59E30E:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_59E3C0
lea	ecx, [ebp+var_10C]
call	sub_5851F0
mov	[ebp+var_134], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_134]
push	eax
lea	ecx, [ebp+var_94]
call	sub_5AACF0
lea	ecx, [ebp+var_144]
mov	[ebp+var_138], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_138]
call	sub_4046E0
lea	edx, [ebp+var_9C]
push	edx
push	ecx
mov	[ebp+var_140], esp
mov	ecx, [ebp+var_144]
mov	eax, [ebp+var_140]
call	sub_4046E0
lea	eax, [ebp+var_114]
push	eax
mov	ecx, [ebp+var_150]
call	sub_5B3570
lea	ecx, [ebp+var_114]
mov	[ebp+var_15C], ecx
mov	edx, [ebp+var_15C]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_9C]
call	sub_5A86C0
lea	ecx, [ebp+var_10C]
call	sub_5853E0

loc_59E3C0:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_59E200 endp

align 10h


; Attributes: bp-based frame

sub_59E3E0 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AD=	byte ptr -0ADh
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_6C=	byte ptr -6Ch
var_68=	byte ptr -68h
var_4C=	byte ptr -4Ch
var_34=	byte ptr -34h
var_30=	byte ptr -30h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B8h
mov	[ebp+var_AC], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_5C9500
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_AC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_AD], al
movzx	ecx, [ebp+var_AD]
test	ecx, ecx
jnz	short loc_59E491
or	[ebp+var_78], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_88], edx
mov	eax, [ebp+var_AC]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_59E491
mov	[ebp+var_B4], 0
jmp	short loc_59E49B

loc_59E491:
mov	[ebp+var_B4], 1

loc_59E49B:
mov	al, byte ptr [ebp+var_B4]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_78]
and	ecx, 1
jz	short loc_59E4B8
and	[ebp+var_78], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_59E4B8:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_59E592
lea	ecx, [ebp+var_6C]
call	sub_585130
mov	[ebp+var_98], eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_4C]
call	sub_403850
lea	ecx, [ebp+var_34]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_98]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_98]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_94]
add	ecx, 4
call	sub_403850
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_98]
mov	ecx, [eax+1Ch]
mov	[edx+1Ch], ecx
lea	edx, [ebp+var_A8]
mov	[ebp+var_9C], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_9C]
call	sub_4046E0
lea	eax, [ebp+var_4C]
push	eax
push	ecx
mov	[ebp+var_A4], esp
mov	ecx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
call	sub_4046E0
lea	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_AC]
call	sub_5B3030
lea	edx, [ebp+var_74]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_B8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_30]
call	sub_407910
lea	ecx, [ebp+var_4C]
call	sub_407910
lea	ecx, [ebp+var_68]
call	sub_407910

loc_59E592:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_59E3E0 endp

align 10h


; Attributes: bp-based frame

sub_59E5A0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_74], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_74]
call	sub_5C9500
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_74]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_75], al
movzx	ecx, [ebp+var_75]
test	ecx, ecx
jnz	short loc_59E630
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_74]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_50]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_59E630
mov	[ebp+var_7C], 0
jmp	short loc_59E637

loc_59E630:
mov	[ebp+var_7C], 1

loc_59E637:
mov	al, byte ptr [ebp+var_7C]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_40]
and	ecx, 1
jz	short loc_59E651
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_59E651:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_59E6B8
mov	[ebp+var_34], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_30]
call	sub_403850
mov	ecx, [ebp+var_34]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_70]
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_30]
push	eax
push	ecx
mov	[ebp+var_6C], esp
mov	ecx, [ebp+var_70]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_57F0F0
lea	edx, [ebp+var_3C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_30]
call	sub_407910

loc_59E6B8:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_59E5A0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59E6D0(void	*)
sub_59E6D0 proc	near

var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_59E6D9:
cmp	[ebp+arg_0], 0
jz	short loc_59E72C
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_59E6D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_5BDB90
cmp	[ebp+arg_0], 0
jz	short loc_59E724
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59E724:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59E6D9

loc_59E72C:
mov	esp, ebp
pop	ebp
retn	4
sub_59E6D0 endp

align 10h


; Attributes: bp-based frame

sub_59E740 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_55=	word ptr -55h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A9830
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A99B0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 74h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_59E7C3

loc_59E7BA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_59E7C3:
cmp	[ebp+var_40], 0
jle	short loc_59E7ED
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5C7C90
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 74h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 74h
mov	[ebp+var_3C], eax
jmp	short loc_59E7BA

loc_59E7ED:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_59E82E
xor	edx, edx
mov	byte ptr [ebp+var_55+1], dl
mov	al, byte ptr [ebp+var_55+1]
mov	[ebp+var_52], al
xor	ecx, ecx
mov	byte ptr [ebp+var_55], cl
mov	dl, byte ptr [ebp+var_55]
mov	[ebp+var_53], dl
lea	eax, [ebp+var_53]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_5BBA60
add	esp, 0Ch
mov	eax, [ebp+var_C]
add	eax, 74h
mov	[ebp+var_C], eax
jmp	short loc_59E883

loc_59E82E:
mov	ecx, [ebp+arg_C]
imul	ecx, 74h
add	ecx, [ebp+var_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 74h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59E865

loc_59E853:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 74h
mov	[ebp+var_68], eax

loc_59E865:
cmp	[ebp+var_6C], 0
jle	short loc_59E87D
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5C7C90
add	esp, 8
jmp	short loc_59E853

loc_59E87D:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59E883:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59E91B
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 74h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_59E8E2

loc_59E8D9:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_59E8E2:
cmp	[ebp+var_80], 0
jle	short loc_59E915
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5C7C90
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 74h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 74h
mov	[ebp+var_7C], eax
jmp	short loc_59E8D9

loc_59E915:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_59E91B:
mov	ecx, [ebp+var_CC]
call	sub_5A9910
mov	edx, [ebp+var_4]
imul	edx, 74h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_59E740 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_59E970(wchar_t *DstBuf, size_t MaxCount, wchar_t *Format, char)
sub_59E970 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
MaxCount= dword	ptr  0Ch
Format=	dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_C]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
mov	eax, [ebp+MaxCount]
push	eax		; MaxCount
push	104h		; SizeInWords
mov	ecx, [ebp+DstBuf]
push	ecx		; DstBuf
call	__vsnwprintf_s
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_59E970 endp

align 10h


; Attributes: bp-based frame

sub_59E9A0 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9A=	byte ptr -9Ah
var_99=	byte ptr -99h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_6C=	byte ptr -6Ch
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C4h
mov	[ebp+var_B8], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_5C7CD0
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_B8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_B9], al
movzx	ecx, [ebp+var_B9]
test	ecx, ecx
jnz	short loc_59EA56
or	[ebp+var_78], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_88], edx
mov	eax, [ebp+var_B8]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_59EA56
mov	[ebp+var_C0], 0
jmp	short loc_59EA60

loc_59EA56:
mov	[ebp+var_C0], 1

loc_59EA60:
mov	dl, byte ptr [ebp+var_C0]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_78]
and	eax, 1
jz	short loc_59EA7A
and	[ebp+var_78], 0FFFFFFFEh
call	nullsub_1

loc_59EA7A:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_59EB67
lea	edx, [ebp+var_99]
push	edx
lea	ecx, [ebp+var_6C]
call	sub_489C40
mov	[ebp+var_5C], 0
mov	al, [ebp+var_9A]
mov	[ebp+var_58], al
lea	ecx, [ebp+var_9A]
call	sub_42CA30
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_54]
call	sub_403400
lea	edx, [ebp+var_2C]
mov	[ebp+var_A0], edx
lea	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5AB5E0
lea	ecx, [ebp+var_B0]
mov	[ebp+var_A4], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_A4]
call	sub_4046E0
lea	edx, [ebp+var_54]
push	edx
push	ecx
mov	[ebp+var_AC], esp
mov	ecx, [ebp+var_B0]
mov	eax, [ebp+var_AC]
call	sub_4046E0
lea	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_5B3A40
lea	ecx, [ebp+var_74]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_C4]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_2C]
mov	[ebp+var_B4], ecx
mov	ecx, [ebp+var_B4]
call	sub_46A7D0
mov	ecx, [ebp+var_B4]
add	ecx, 14h
call	sub_42CA30
lea	ecx, [ebp+var_54]
call	sub_407E50
lea	ecx, [ebp+var_6C]
call	sub_46A7D0
lea	ecx, [ebp+var_58]
call	sub_42CA30

loc_59EB67:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_59E9A0 endp

align 10h


; Attributes: bp-based frame

sub_59EB80 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_58], ecx
mov	[ebp+var_34], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C7D40
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_40]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_40]
setz	al
mov	[ebp+var_59], al
movzx	ecx, [ebp+var_59]
test	ecx, ecx
jnz	short loc_59EC11
or	[ebp+var_34], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_44], edx
mov	eax, [ebp+var_58]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_44]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_59EC11
mov	[ebp+var_60], 0
jmp	short loc_59EC18

loc_59EC11:
mov	[ebp+var_60], 1

loc_59EC18:
mov	cl, byte ptr [ebp+var_60]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_34]
and	edx, 1
jz	short loc_59EC32
and	[ebp+var_34], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_59EC32:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_59EC8C
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_48], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_20]
push	eax
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+var_54]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B4020
lea	edx, [ebp+var_30]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59EC8C:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_59EB80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_59ECA0(wchar_t *Dst, wchar_t *Format,	char)
sub_59ECA0 proc	near

ArgList= dword ptr -4
Dst= dword ptr	8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	400h		; SizeInWords
mov	eax, [ebp+Dst]
push	eax		; Dst
call	_vswprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_59ECA0 endp

align 10h


; Attributes: bp-based frame

sub_59ECD0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59ECE1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_59ED26
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5B4500
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_59ED24
mov	ecx, 1
imul	ecx, 9Ch
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59ED24:
jmp	short loc_59ECE1

loc_59ED26:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_59ECD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_59ED40(char *DstBuf, char *Format, char)
sub_59ED40 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	80h		; SizeInBytes
mov	eax, [ebp+DstBuf]
push	eax		; DstBuf
call	_vsprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_59ED40 endp

align 10h


; Attributes: bp-based frame

sub_59ED70 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59ED81:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_59EDB9
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_59EDB7
mov	ecx, 1
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59EDB7:
jmp	short loc_59ED81

loc_59EDB9:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_59ED70 endp

align 10h


; Attributes: bp-based frame

sub_59EDD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 10h
push	0
lea	eax, [ebp+var_1]
push	eax
call	sub_51BAB0
add	esp, 8
movzx	ecx, byte ptr [eax]
push	ecx
sub	esp, 8
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
add	ecx, 4
mov	[ebp+var_C], ecx
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5B4620
add	esp, 20h
lea	ecx, [ebp+var_1]
call	sub_42CA30
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_59EDD0 endp

align 10h


; Attributes: bp-based frame

sub_59EE40 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
lea	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_28]
mov	[ebp+var_14], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_14]
call	sub_4046E0

loc_59EE68:
lea	edx, [ebp+var_20]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_24]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	eax, [ebp+var_28]
xor	ecx, ecx
cmp	eax, [ebp+var_20]
setnz	cl
mov	[ebp+var_29], cl
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_59EEAD
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_C]
mov	edx, [eax+10h]
cmp	edx, [ecx]
jz	short loc_59EEAD
mov	eax, [ebp+var_28]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_28], eax
jmp	short loc_59EE68

loc_59EEAD:
mov	ecx, [ebp+var_28]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_59EE40 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59EEC0(void	*)
sub_59EEC0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_59EEC9:
cmp	[ebp+arg_0], 0
jz	short loc_59EF19
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_59EEC0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7DE0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59EF11
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59EF11:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59EEC9

loc_59EF19:
mov	esp, ebp
pop	ebp
retn	4
sub_59EEC0 endp

align 10h


; Attributes: bp-based frame

sub_59EF20 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A6=	byte ptr -0A6h
var_A5=	byte ptr -0A5h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_78=	byte ptr -78h
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	byte ptr -60h
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_59EF20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C4h
mov	[ebp+var_C4], ecx
mov	[ebp+var_84], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_5C7CD0
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_C4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_8C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_90]
setz	al
mov	[ebp+var_C5], al
movzx	ecx, [ebp+var_C5]
test	ecx, ecx
jnz	short loc_59EFFD
or	[ebp+var_84], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+var_C4]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_59EFFD
mov	[ebp+var_CC], 0
jmp	short loc_59F007

loc_59EFFD:
mov	[ebp+var_CC], 1

loc_59F007:
mov	dl, byte ptr [ebp+var_CC]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_84]
and	eax, 1
jz	short loc_59F027
and	[ebp+var_84], 0FFFFFFFEh
call	nullsub_1

loc_59F027:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_59F11D
lea	edx, [ebp+var_A5]
push	edx
lea	ecx, [ebp+var_78]
call	sub_489C40
mov	[ebp+var_68], 0
mov	al, [ebp+var_A6]
mov	[ebp+var_64], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_60]
call	sub_403400
lea	edx, [ebp+var_38]
mov	[ebp+var_AC], edx
lea	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_5AB6E0
lea	ecx, [ebp+var_BC]
mov	[ebp+var_B0], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_B0]
call	sub_4046E0
lea	edx, [ebp+var_60]
push	edx
push	ecx
mov	[ebp+var_B8], esp
mov	ecx, [ebp+var_BC]
mov	eax, [ebp+var_B8]
call	sub_4046E0
lea	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_5B4760
lea	ecx, [ebp+var_80]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_D0]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_38]
mov	[ebp+var_C0], ecx
mov	ecx, [ebp+var_C0]
call	sub_5935F0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_60]
call	sub_407E50
lea	ecx, [ebp+var_78]
call	sub_5935F0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh

loc_59F11D:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_59EF20 endp

align 10h


; Attributes: bp-based frame

sub_59F140 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
mov	[ebp+var_6C], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5E9440
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jnz	short loc_59F210
or	[ebp+var_48], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_6C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_58]
mov	[ebp+var_74], edx
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_78]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_59F1F8
jb	short loc_59F1EF
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_59F1F8

loc_59F1EF:
mov	[ebp+var_7C], 1
jmp	short loc_59F1FF

loc_59F1F8:
mov	[ebp+var_7C], 0

loc_59F1FF:
movzx	ecx, byte ptr [ebp+var_7C]
test	ecx, ecx
jnz	short loc_59F210
mov	[ebp+var_80], 0
jmp	short loc_59F217

loc_59F210:
mov	[ebp+var_80], 1

loc_59F217:
mov	dl, byte ptr [ebp+var_80]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_48]
and	eax, 1
jz	short loc_59F237
and	[ebp+var_48], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_59F237:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_59F2AB
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_34], eax
mov	ecx, [edx+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[ebp+var_2C], edx
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_68]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	edx, [ebp+var_34]
push	edx
push	ecx
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5B4D90
lea	ecx, [ebp+var_44]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_84]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_59F2AB:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_59F140 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59F2D0(void	*)
sub_59F2D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59F2D9:
cmp	[ebp+arg_0], 0
jz	short loc_59F329
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59F2D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7E80
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59F321
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59F321:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59F2D9

loc_59F329:
mov	esp, ebp
pop	ebp
retn	4
sub_59F2D0 endp

align 10h


; Attributes: bp-based frame

sub_59F330 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_59F348:
cmp	[ebp+var_8], 0
jz	short loc_59F38D
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_59F382
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_59F38B

loc_59F382:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_59F38B:
jmp	short loc_59F348

loc_59F38D:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_5B54A0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_59F330 endp



; Attributes: bp-based frame

sub_59F3B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_59F421
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_4], 0
jmp	short loc_59F3E0

loc_59F3D8:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_59F3E0:
cmp	[ebp+var_8], 1
jz	short loc_59F3F1
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_59F3D8

loc_59F3F1:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B55E0
add	esp, 14h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B56B0
add	esp, 0Ch

loc_59F421:
mov	esp, ebp
pop	ebp
retn
sub_59F3B0 endp

align 10h


; Attributes: bp-based frame

sub_59F430 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 3
mov	[ebp+var_40], edx
jmp	short loc_59F4AE

loc_59F4A5:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_59F4AE:
cmp	[ebp+var_40], 0
jle	short loc_59F4D8
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5A7520
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 8
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 8
mov	[ebp+var_3C], ecx
jmp	short loc_59F4A5

loc_59F4D8:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_59F4FF
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5A7520
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx
jmp	short loc_59F54F

loc_59F4FF:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*8]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 3
mov	[ebp+var_6C], ecx
jmp	short loc_59F531

loc_59F51F:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 8
mov	[ebp+var_68], eax

loc_59F531:
cmp	[ebp+var_6C], 0
jle	short loc_59F549
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A7520
add	esp, 8
jmp	short loc_59F51F

loc_59F549:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59F54F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59F5E2
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 3
mov	[ebp+var_80], eax
jmp	short loc_59F5A9

loc_59F5A0:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_59F5A9:
cmp	[ebp+var_80], 0
jle	short loc_59F5DC
mov	edx, [ebp+var_8C]
push	edx		; int
mov	eax, [ebp+var_7C]
push	eax		; void *
call	sub_5A7520
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 8
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 8
mov	[ebp+var_7C], edx
jmp	short loc_59F5A0

loc_59F5DC:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_59F5E2:
mov	ecx, [ebp+var_CC]
call	sub_5A9A30
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_59F430 endp

align 10h


; Attributes: bp-based frame

sub_59F630 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_C0]
jz	loc_59F8D8
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 3
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 3
cmp	[ebp+var_4], eax
jbe	loc_59F703
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_C0]
add	ecx, 8
call	sub_510200
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_5C2190
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C0]
call	sub_5A9A30
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [edx+eax*8]
mov	edx, [ebp+var_C0]
mov	[edx+8], ecx
jmp	loc_59F8C1

loc_59F703:
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_C0]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	edx, [ebp+var_4]
jb	loc_59F7C5
xor	eax, eax
mov	[ebp+var_11], al
mov	ecx, [ebp+var_C0]
mov	edx, [ecx]
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_7C]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_74]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
sar	eax, 3
mov	[ebp+var_68], eax
jmp	short loc_59F764

loc_59F75B:
mov	ecx, [ebp+var_68]
sub	ecx, 1
mov	[ebp+var_68], ecx

loc_59F764:
cmp	[ebp+var_68], 0
jle	short loc_59F796
mov	edx, [ebp+var_6C]
push	edx
mov	ecx, [ebp+var_70]
call	sub_4AD130
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_6C]
add	eax, 8
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_70]
add	ecx, 8
mov	[ebp+var_70], ecx
jmp	short loc_59F75B

loc_59F796:
mov	edx, [ebp+var_70]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+4]
mov	[ebp+var_88], ecx
push	0
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_5C21C0
add	esp, 0Ch
jmp	loc_59F8C1

loc_59F7C5:
xor	ecx, ecx
mov	[ebp+var_12], cl
lea	edx, [ebp+var_12]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+var_C0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 3
mov	edx, [ebp+arg_0]
mov	eax, [edx]
lea	ecx, [eax+ecx*8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_5B5720
add	esp, 10h
xor	ecx, ecx
mov	[ebp+var_13], cl
mov	edx, [ebp+var_C0]
mov	eax, [edx+4]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+var_C0]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
lea	edx, [ecx+edx*8]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_B4]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_B8]
sub	edx, [ebp+var_B0]
sar	edx, 3
mov	[ebp+var_A4], edx
jmp	short loc_59F882

loc_59F873:
mov	eax, [ebp+var_A4]
sub	eax, 1
mov	[ebp+var_A4], eax

loc_59F882:
cmp	[ebp+var_A4], 0
jle	short loc_59F8C1
mov	ecx, [ebp+var_B0]
push	ecx		; int
mov	edx, [ebp+var_A0]
push	edx		; void *
call	sub_5A7520
add	esp, 8
mov	eax, [ebp+var_B0]
add	eax, 8
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_A0]
add	ecx, 8
mov	[ebp+var_A0], ecx
jmp	short loc_59F873

loc_59F8C1:
mov	edx, [ebp+var_C0]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_C0]
mov	[eax+4], edx

loc_59F8D8:
mov	eax, [ebp+var_C0]
mov	esp, ebp
pop	ebp
retn	4
sub_59F630 endp

align 10h


; Attributes: bp-based frame

sub_59F8F0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59F901:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_59F943
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5A7590
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_59F941
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59F941:
jmp	short loc_59F901

loc_59F943:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_59F8F0 endp

align 10h


; Attributes: bp-based frame

sub_59F960 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_59F971:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_59F9B3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_59F9B1
mov	ecx, 1
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_59F9B1:
jmp	short loc_59F971

loc_59F9B3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_59F960 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59F9D0(void	*)
sub_59F9D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_59F9D9:
cmp	[ebp+arg_0], 0
jz	short loc_59FA29
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_59F9D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7EB0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59FA21
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59FA21:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59F9D9

loc_59FA29:
mov	esp, ebp
pop	ebp
retn	4
sub_59F9D0 endp

align 10h


; Attributes: bp-based frame

sub_59FA30 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59FA4C:
cmp	[ebp+var_10], 0
jz	short loc_59FAC3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_59FA92
jb	short loc_59FA89
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_59FA92

loc_59FA89:
mov	[ebp+var_64], 1
jmp	short loc_59FA99

loc_59FA92:
mov	[ebp+var_64], 0

loc_59FA99:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_59FAB2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_59FABB

loc_59FAB2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_59FABB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_59FA4C

loc_59FAC3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_59FB65
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_59FB56
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B57E0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_59FC0B
jmp	short loc_59FB65

loc_59FB56:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59FB65:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_59FB9F
jb	short loc_59FB96
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_59FB9F

loc_59FB96:
mov	[ebp+var_78], 1
jmp	short loc_59FBA6

loc_59FB9F:
mov	[ebp+var_78], 0

loc_59FBA6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_59FBF0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B57E0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_59FC0B

loc_59FBF0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_59FC0B:
mov	esp, ebp
pop	ebp
retn	8
sub_59FA30 endp

align 10h


; Attributes: bp-based frame

sub_59FC20 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_51E030
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5A9B20
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_59FCA3

loc_59FC9A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_59FCA3:
cmp	[ebp+var_40], 0
jle	short loc_59FCCD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A7620
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 30h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 30h
mov	[ebp+var_3C], eax
jmp	short loc_59FC9A

loc_59FCCD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_59FCF4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A7620
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 30h
mov	[ebp+var_C], ecx
jmp	short loc_59FD49

loc_59FCF4:
mov	edx, [ebp+arg_C]
imul	edx, 30h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_59FD2B

loc_59FD19:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 30h
mov	[ebp+var_68], eax

loc_59FD2B:
cmp	[ebp+var_6C], 0
jle	short loc_59FD43
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A7620
add	esp, 8
jmp	short loc_59FD19

loc_59FD43:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_59FD49:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_59FDE1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_59FDA8

loc_59FD9F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_59FDA8:
cmp	[ebp+var_80], 0
jle	short loc_59FDDB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A7620
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 30h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 30h
mov	[ebp+var_7C], eax
jmp	short loc_59FD9F

loc_59FDDB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_59FDE1:
mov	ecx, [ebp+var_CC]
call	sub_5A9AA0
mov	edx, [ebp+var_4]
imul	edx, 30h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_59FC20 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_59FE30(void	*)
sub_59FE30 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx

loc_59FE39:
cmp	[ebp+arg_0], 0
jz	short loc_59FE89
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_28]
call	sub_59FE30
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7F20
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_59FE81
mov	edx, 1
imul	edx, 7Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_59FE81:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_59FE39

loc_59FE89:
mov	esp, ebp
pop	ebp
retn	4
sub_59FE30 endp

align 10h


; Attributes: bp-based frame

sub_59FE90 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_59FEAC:
cmp	[ebp+var_10], 0
jz	short loc_59FEF3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_59FEE2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_59FEEB

loc_59FEE2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_59FEEB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_59FEAC

loc_59FEF3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_59FF95
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_59FF86
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5B5950
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5A000B
jmp	short loc_59FF95

loc_59FF86:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_59FF95:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_59FFF0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5B5950
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5A000B

loc_59FFF0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5A000B:
mov	esp, ebp
pop	ebp
retn	8
sub_59FE90 endp

align 10h


; Attributes: bp-based frame

sub_5A0020 proc	near

arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 8Ch
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
lea	ecx, [ebp+arg_1C]
push	ecx
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_588B20
lea	ecx, [ebp+arg_4]
call	sub_407910
lea	ecx, [ebp+arg_1C]
call	sub_588AC0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5A0020 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A0060(void	*)
sub_5A0060 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5A0069:
cmp	[ebp+arg_0], 0
jz	short loc_5A00AF
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5A0060
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_5A00A7
mov	edx, 1
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A00A7:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A0069

loc_5A00AF:
mov	esp, ebp
pop	ebp
retn	4
sub_5A0060 endp

align 10h


; Attributes: bp-based frame

sub_5A00C0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A00DC:
cmp	[ebp+var_10], 0
jz	short loc_5A0153
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A0122
jb	short loc_5A0119
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A0122

loc_5A0119:
mov	[ebp+var_64], 1
jmp	short loc_5A0129

loc_5A0122:
mov	[ebp+var_64], 0

loc_5A0129:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5A0142
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5A014B

loc_5A0142:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5A014B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5A00DC

loc_5A0153:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A01F5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5A01E6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B5B20
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5A029B
jmp	short loc_5A01F5

loc_5A01E6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A01F5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5A022F
jb	short loc_5A0226
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5A022F

loc_5A0226:
mov	[ebp+var_78], 1
jmp	short loc_5A0236

loc_5A022F:
mov	[ebp+var_78], 0

loc_5A0236:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5A0280
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B5B20
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5A029B

loc_5A0280:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5A029B:
mov	esp, ebp
pop	ebp
retn	8
sub_5A00C0 endp

align 10h


; Attributes: bp-based frame

sub_5A02B0 proc	near

var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E1=	byte ptr -0E1h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	byte ptr -0A0h
var_98=	byte ptr -98h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ECh
mov	[ebp+var_E0], ecx
mov	[ebp+var_A4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_5E9440
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A8]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_E0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_B0]
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_AC]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_B0]
setz	al
mov	[ebp+var_E1], al
movzx	ecx, [ebp+var_E1]
test	ecx, ecx
jnz	loc_5A03D5
or	[ebp+var_A4], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_E0]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_B4]
mov	[ebp+var_E8], edx
mov	[ebp+var_EC], eax
mov	ecx, [ebp+var_E8]
mov	edx, [ebp+var_EC]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A03B4
jb	short loc_5A03A8
mov	ecx, [ebp+var_E8]
mov	edx, [ebp+var_EC]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A03B4

loc_5A03A8:
mov	[ebp+var_F0], 1
jmp	short loc_5A03BE

loc_5A03B4:
mov	[ebp+var_F0], 0

loc_5A03BE:
movzx	ecx, byte ptr [ebp+var_F0]
test	ecx, ecx
jnz	short loc_5A03D5
mov	[ebp+var_F4], 0
jmp	short loc_5A03DF

loc_5A03D5:
mov	[ebp+var_F4], 1

loc_5A03DF:
mov	dl, byte ptr [ebp+var_F4]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_A4]
and	eax, 1
jz	short loc_5A0408
and	[ebp+var_A4], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A0408:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5A050A
lea	ecx, [ebp+var_98]
call	sub_580DB0
mov	[ebp+var_CC], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_64], eax
mov	ecx, [edx+4]
mov	[ebp+var_60], ecx
lea	edx, [ebp+var_5C]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_403400
mov	ecx, [ebp+var_C8]
add	ecx, 28h
mov	[ebp+var_C4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_C4]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_CC]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_CC]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
lea	eax, [ebp+var_DC]
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_D0]
call	sub_4046E0
lea	ecx, [ebp+var_64]
push	ecx
push	ecx
mov	[ebp+var_D8], esp
mov	ecx, [ebp+var_DC]
mov	eax, [ebp+var_D8]
call	sub_4046E0
lea	edx, [ebp+var_A0]
push	edx
mov	ecx, [ebp+var_E0]
call	sub_5AC3B0
lea	eax, [ebp+var_A0]
mov	[ebp+var_F8], eax
mov	ecx, [ebp+var_F8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	ecx, [ebp+var_5C]
call	sub_407E50
lea	ecx, [ebp+var_98]
call	sub_407E50

loc_5A050A:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A02B0 endp



; Attributes: bp-based frame

sub_5A0520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_5A0591
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_4], 0
jmp	short loc_5A0550

loc_5A0548:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_5A0550:
cmp	[ebp+var_8], 1
jz	short loc_5A0561
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5A0548

loc_5A0561:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B5CF0
add	esp, 14h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B5E00
add	esp, 0Ch

loc_5A0591:
mov	esp, ebp
pop	ebp
retn
sub_5A0520 endp

align 10h


; Attributes: bp-based frame

sub_5A05A0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AAFF0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5A05F6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5A05A0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5A05F6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5A0605:
cmp	[ebp+arg_0], 0
jz	short loc_5A0672
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AAFF0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5A0661
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A05A0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5A0661:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5A0605

loc_5A0672:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5A05A0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A0680(void	*)
sub_5A0680 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx

loc_5A0689:
cmp	[ebp+arg_0], 0
jz	short loc_5A06D9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_14]
call	sub_5A0680
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7F60
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5A06D1
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A06D1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A0689

loc_5A06D9:
mov	esp, ebp
pop	ebp
retn	4
sub_5A0680 endp

align 10h


; Attributes: bp-based frame

sub_5A06E0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A06FC:
cmp	[ebp+var_10], 0
jz	short loc_5A0773
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A0742
jb	short loc_5A0739
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A0742

loc_5A0739:
mov	[ebp+var_64], 1
jmp	short loc_5A0749

loc_5A0742:
mov	[ebp+var_64], 0

loc_5A0749:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5A0762
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5A076B

loc_5A0762:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5A076B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5A06FC

loc_5A0773:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A0815
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5A0806
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B6340
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5A08BB
jmp	short loc_5A0815

loc_5A0806:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A0815:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5A084F
jb	short loc_5A0846
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5A084F

loc_5A0846:
mov	[ebp+var_78], 1
jmp	short loc_5A0856

loc_5A084F:
mov	[ebp+var_78], 0

loc_5A0856:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5A08A0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B6340
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5A08BB

loc_5A08A0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5A08BB:
mov	esp, ebp
pop	ebp
retn	8
sub_5A06E0 endp

align 10h


; Attributes: bp-based frame

sub_5A08D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5A08E8:
cmp	[ebp+var_8], 0
jz	short loc_5A0940
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_5A0915
mov	[ebp+var_1C], 1
jmp	short loc_5A091C

loc_5A0915:
mov	[ebp+var_1C], 0

loc_5A091C:
mov	cl, byte ptr [ebp+var_1C]
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_5A0935
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5A093E

loc_5A0935:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5A093E:
jmp	short loc_5A08E8

loc_5A0940:
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_51B620
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5A08D0 endp

align 10h


; Attributes: bp-based frame

sub_5A0970 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_28]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_5A09A8
push	0
push	1
mov	ecx, [ebp+var_28]
call	sub_5B7570

loc_5A09A8:
mov	[ebp+var_4], 80h
push	20h
mov	ecx, [ebp+var_28]
add	ecx, 24h
call	sub_5A9600
mov	ecx, [ebp+var_28]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	ecx, [eax+10h]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_13], dl
mov	al, [ebp+var_13]
mov	[ebp+var_11], al
xor	ecx, ecx
mov	[ebp+var_14], cl
mov	dl, [ebp+var_14]
mov	[ebp+var_12], dl
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_28]
mov	eax, [edx+1Ch]
add	eax, 4
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
add	ecx, 10h
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_24]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_1C], 80h
mov	ecx, 20h
shl	ecx, 2
mov	edx, [ebp+var_20]
add	ecx, [edx+4]
mov	eax, [ebp+var_20]
mov	[eax+8], ecx
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	eax, [edx+14h]
mov	[ecx+10h], eax
mov	esp, ebp
pop	ebp
retn	4
sub_5A0970 endp

align 10h


; Attributes: bp-based frame

sub_5A0A50 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	[ebp+var_44], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C7D40
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_69], al
movzx	ecx, [ebp+var_69]
test	ecx, ecx
jnz	short loc_5A0AE1
or	[ebp+var_44], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_68]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5A0AE1
mov	[ebp+var_70], 0
jmp	short loc_5A0AE8

loc_5A0AE1:
mov	[ebp+var_70], 1

loc_5A0AE8:
mov	cl, byte ptr [ebp+var_70]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_44]
and	edx, 1
jz	short loc_5A0B02
and	[ebp+var_44], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_5A0B02:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A0B78
xor	ecx, ecx
mov	[ebp+var_38], ecx
mov	[ebp+var_34], ecx
mov	[ebp+var_30], ecx
mov	[ebp+var_2C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_24]
mov	edx, [ebp+var_38]
mov	[ecx], edx
mov	eax, [ebp+var_34]
mov	[ecx+4], eax
mov	edx, [ebp+var_30]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5B7090
lea	ecx, [ebp+var_40]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_5A0B78:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5A0A50 endp

align 10h


; Attributes: bp-based frame

sub_5A0B90 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	byte ptr -3Ch
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5DE010
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_71], al
movzx	ecx, [ebp+var_71]
test	ecx, ecx
jnz	short loc_5A0C35
or	[ebp+var_48], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_70]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_58]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5A0C35
mov	[ebp+var_78], 0
jmp	short loc_5A0C3C

loc_5A0C35:
mov	[ebp+var_78], 1

loc_5A0C3C:
mov	cl, byte ptr [ebp+var_78]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_48]
and	edx, 1
jz	short loc_5A0C5C
and	[ebp+var_48], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A0C5C:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5A0CCB
lea	ecx, [ebp+var_3C]
call	sub_401EF0
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_5C]
lea	ecx, [ebp+var_2C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
lea	ecx, [ebp+var_6C]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	edx, [ebp+var_30]
push	edx
push	ecx
mov	[ebp+var_68], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5B5E70
lea	ecx, [ebp+var_44]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_5A0CCB:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A0B90 endp

align 10h


; Attributes: bp-based frame

sub_5A0CF0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B5=	byte ptr -0B5h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_86=	byte ptr -86h
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_68=	byte ptr -68h
var_64=	byte ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A0CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C0h
push	esi
mov	[ebp+var_B4], ecx
mov	[ebp+var_74], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B4]
call	sub_5E9440
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_B4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_80]
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_7C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_80]
setz	al
mov	[ebp+var_B5], al
movzx	ecx, [ebp+var_B5]
test	ecx, ecx
jnz	loc_5A0DFE
or	[ebp+var_74], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_B4]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_84]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A0DDD
jb	short loc_5A0DD1
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A0DDD

loc_5A0DD1:
mov	[ebp+var_C4], 1
jmp	short loc_5A0DE7

loc_5A0DDD:
mov	[ebp+var_C4], 0

loc_5A0DE7:
movzx	ecx, byte ptr [ebp+var_C4]
test	ecx, ecx
jnz	short loc_5A0DFE
mov	[ebp+var_C8], 0
jmp	short loc_5A0E08

loc_5A0DFE:
mov	[ebp+var_C8], 1

loc_5A0E08:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_74]
and	eax, 1
jz	short loc_5A0E2B
and	[ebp+var_74], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A0E2B:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5A0F74
xor	eax, eax
lea	esi, [ebp+var_68]
call	sub_41DF90
lea	edx, [ebp+var_64]
mov	[ebp+var_8C], edx
lea	eax, [ebp+var_85]
push	eax
lea	ecx, [ebp+var_86]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_489470
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_4C], eax
mov	ecx, [edx+4]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_94], edx
lea	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_94]
call	sub_5D2F10
mov	ecx, [ebp+var_94]
add	ecx, 4
mov	[ebp+var_90], ecx
lea	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_90]
call	sub_594950
lea	eax, [ebp+var_A4]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_98]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
push	ecx
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
call	sub_4046E0
lea	edx, [ebp+var_70]
push	edx
mov	ecx, [ebp+var_B4]
call	sub_5B64B0
lea	eax, [ebp+var_70]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_44]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_AC]
add	ecx, 4
mov	[ebp+var_A8], ecx
mov	ecx, [ebp+var_A8]
call	sub_5935F0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_AC]
call	sub_429100
lea	edx, [ebp+var_64]
mov	[ebp+var_B0], edx
mov	ecx, [ebp+var_B0]
call	sub_5935F0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_68]
call	sub_429100

loc_5A0F74:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5A0CF0 endp

align 10h


; Attributes: bp-based frame

sub_5A0F90 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5DE010
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jnz	short loc_5A1035
or	[ebp+var_48], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_6C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_58]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5A1035
mov	[ebp+var_74], 0
jmp	short loc_5A103C

loc_5A1035:
mov	[ebp+var_74], 1

loc_5A103C:
mov	cl, byte ptr [ebp+var_74]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_48]
and	edx, 1
jz	short loc_5A105C
and	[ebp+var_48], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A105C:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5A10C4
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_28], ecx
lea	edx, [ebp+var_68]
mov	[ebp+var_5C], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	eax, [ebp+var_34]
push	eax
push	ecx
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_5B6BC0
lea	edx, [ebp+var_44]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_5A10C4:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A0F90 endp

align 10h


; Attributes: bp-based frame

sub_5A10E0 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 78h
mov	[ebp+var_6C], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5E9440
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jnz	short loc_5A11B0
or	[ebp+var_48], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_6C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_58]
mov	[ebp+var_74], edx
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_78]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A1198
jb	short loc_5A118F
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_78]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A1198

loc_5A118F:
mov	[ebp+var_7C], 1
jmp	short loc_5A119F

loc_5A1198:
mov	[ebp+var_7C], 0

loc_5A119F:
movzx	ecx, byte ptr [ebp+var_7C]
test	ecx, ecx
jnz	short loc_5A11B0
mov	[ebp+var_80], 0
jmp	short loc_5A11B7

loc_5A11B0:
mov	[ebp+var_80], 1

loc_5A11B7:
mov	dl, byte ptr [ebp+var_80]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_48]
and	eax, 1
jz	short loc_5A11D7
and	[ebp+var_48], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A11D7:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5A1245
xor	edx, edx
mov	[ebp+var_3C], edx
mov	[ebp+var_38], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	edx, [eax+4]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_38]
mov	[ebp+var_2C], eax
mov	[ebp+var_28], ecx
lea	edx, [ebp+var_68]
mov	[ebp+var_5C], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	eax, [ebp+var_34]
push	eax
push	ecx
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_6C]
call	sub_5B4D90
lea	edx, [ebp+var_44]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_5A1245:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A10E0 endp

align 10h


; Attributes: bp-based frame

sub_5A1260 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A9C00
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_596890
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 7
mov	[ebp+var_40], edx
jmp	short loc_5A12DE

loc_5A12D5:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5A12DE:
cmp	[ebp+var_40], 0
jle	short loc_5A130D
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5A76F0
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 80h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 80h
mov	[ebp+var_3C], ecx
jmp	short loc_5A12D5

loc_5A130D:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5A1337
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5A76F0
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 80h
mov	[ebp+var_C], edx
jmp	short loc_5A138A

loc_5A1337:
mov	eax, [ebp+arg_C]
shl	eax, 7
add	eax, [ebp+var_C]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_60]
sub	edx, [ebp+var_C]
sar	edx, 7
mov	[ebp+var_6C], edx
jmp	short loc_5A136C

loc_5A1357:
mov	eax, [ebp+var_6C]
sub	eax, 1
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_68]
add	ecx, 80h
mov	[ebp+var_68], ecx

loc_5A136C:
cmp	[ebp+var_6C], 0
jle	short loc_5A1384
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_68]
push	eax		; void *
call	sub_5A76F0
add	esp, 8
jmp	short loc_5A1357

loc_5A1384:
mov	ecx, [ebp+var_60]
mov	[ebp+var_C], ecx

loc_5A138A:
movzx	edx, [ebp+arg_10]
test	edx, edx
jnz	loc_5A1422
xor	eax, eax
mov	[ebp+var_F], al
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	dl, [ebp+var_10]
mov	[ebp+var_91], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_90]
sub	ecx, [ebp+var_8C]
sar	ecx, 7
mov	[ebp+var_80], ecx
jmp	short loc_5A13E4

loc_5A13DB:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A13E4:
cmp	[ebp+var_80], 0
jle	short loc_5A141C
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A76F0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 80h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 80h
mov	[ebp+var_7C], eax
jmp	short loc_5A13DB

loc_5A141C:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A1422:
mov	ecx, [ebp+var_CC]
call	sub_5A9CD0
mov	edx, [ebp+var_4]
shl	edx, 7
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A1260 endp

align 10h


; Attributes: bp-based frame

sub_5A1470 proc	near

var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_3C=	byte ptr -3Ch
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A1470
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
lea	ecx, [ebp+var_5C]
call	sub_433310
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_54]
call	sub_402310
mov	ecx, [ebp+arg_8]
mov	[ebp+var_20], ecx
mov	[ebp+var_24], 0
lea	edx, [ebp+var_5C]
push	edx
push	4
call	sub_110D4C0
mov	ecx, eax
call	sub_110D370
lea	eax, [ebp+var_18]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
cmp	dword ptr [ecx+4], 0
jz	short loc_5A14E2
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_60]
push	edx
call	sub_48DA20
add	esp, 10h

loc_5A14E2:
mov	[ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_3C]
call	sub_407910
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_54]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_5C]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A1470 endp

align 10h


; Attributes: bp-based frame

sub_5A1520 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_84], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_5C7D40
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_84]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jnz	short loc_5A15C9
or	[ebp+var_58], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_68], edx
mov	eax, [ebp+var_84]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_68]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5A15C9
mov	[ebp+var_8C], 0
jmp	short loc_5A15D3

loc_5A15C9:
mov	[ebp+var_8C], 1

loc_5A15D3:
mov	cl, byte ptr [ebp+var_8C]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_58]
and	edx, 1
jz	short loc_5A15E8
and	[ebp+var_58], 0FFFFFFFEh

loc_5A15E8:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A167B
lea	ecx, [ebp+var_49]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_48]
call	sub_4022A0
mov	[ebp+var_70], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_70]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_403850
lea	ecx, [ebp+var_80]
mov	[ebp+var_74], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_74]
call	sub_4046E0
lea	edx, [ebp+var_30]
push	edx
push	ecx
mov	[ebp+var_7C], esp
mov	ecx, [ebp+var_80]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_84]
call	sub_5B7750
lea	ecx, [ebp+var_54]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_90]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_2C]
call	sub_407910
lea	ecx, [ebp+var_48]
call	sub_407910
lea	ecx, [ebp+var_49]
call	nullsub_1

loc_5A167B:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5A1520 endp

align 10h


; Attributes: bp-based frame

sub_5A1690 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	[ebp+var_44], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5E9440
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_69], al
movzx	ecx, [ebp+var_69]
test	ecx, ecx
jnz	short loc_5A1760
or	[ebp+var_44], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_68]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
mov	[ebp+var_70], edx
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_74]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A1748
jb	short loc_5A173F
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_74]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A1748

loc_5A173F:
mov	[ebp+var_78], 1
jmp	short loc_5A174F

loc_5A1748:
mov	[ebp+var_78], 0

loc_5A174F:
movzx	ecx, byte ptr [ebp+var_78]
test	ecx, ecx
jnz	short loc_5A1760
mov	[ebp+var_7C], 0
jmp	short loc_5A1767

loc_5A1760:
mov	[ebp+var_7C], 1

loc_5A1767:
mov	dl, byte ptr [ebp+var_7C]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_44]
and	eax, 1
jz	short loc_5A1787
and	[ebp+var_44], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A1787:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5A17E5
mov	[ebp+var_35], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_34], eax
mov	ecx, [edx+4]
mov	[ebp+var_30], ecx
mov	dl, [ebp+var_35]
mov	[ebp+var_2C], dl
lea	eax, [ebp+var_64]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	edx, [ebp+var_40]
push	edx
mov	ecx, [ebp+var_68]
call	sub_5AE390
lea	eax, [ebp+var_40]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
mov	edx, [ecx]
mov	[ebp+var_10], edx

loc_5A17E5:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A1690 endp

align 10h


; Attributes: bp-based frame

sub_5A1800 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_C]
jnz	short loc_5A1816
mov	ecx, [ebp+arg_8]
cmp	ecx, [ebp+arg_10]
jz	short loc_5A1852

loc_5A1816:
mov	eax, [ebp+arg_0]
call	sub_A494B0
mov	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
xor	ecx, ecx
jz	short loc_5A1840
push	1
push	40h
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
call	sub_A49320
jmp	short loc_5A1850

loc_5A1840:
push	1
push	40h
lea	eax, [ebp+var_8]
push	eax
mov	eax, [ebp+arg_0]
call	sub_A49320

loc_5A1850:
jmp	short loc_5A185A

loc_5A1852:
mov	eax, [ebp+arg_0]
call	sub_A494F0

loc_5A185A:
mov	esp, ebp
pop	ebp
retn
sub_5A1800 endp

align 10h


; Attributes: bp-based frame

sub_5A1860 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_5A18A2
mov	eax, [ebp+arg_0]
call	sub_A494B0
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx
xor	edx, edx
jz	short loc_5A1890
push	1
push	20h
lea	eax, [ebp+var_4]
push	eax
mov	eax, [ebp+arg_0]
call	sub_A49320
jmp	short loc_5A18A0

loc_5A1890:
push	1
push	20h
lea	ecx, [ebp+var_4]
push	ecx
mov	eax, [ebp+arg_0]
call	sub_A49320

loc_5A18A0:
jmp	short loc_5A18AA

loc_5A18A2:
mov	eax, [ebp+arg_0]
call	sub_A494F0

loc_5A18AA:
mov	esp, ebp
pop	ebp
retn
sub_5A1860 endp

align 10h


; Attributes: bp-based frame

sub_5A18B0 proc	near

var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= word ptr	 0Ch
arg_8= word ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
movzx	eax, [ebp+arg_4]
movzx	ecx, [ebp+arg_8]
cmp	eax, ecx
jz	short loc_5A18F8
mov	eax, [ebp+arg_0]
call	sub_A494B0
mov	dx, [ebp+arg_4]
mov	[ebp+var_2], dx
xor	eax, eax
jz	short loc_5A18E6
push	1
push	10h
lea	ecx, [ebp+var_2]
push	ecx
mov	eax, [ebp+arg_0]
call	sub_A49320
jmp	short loc_5A18F6

loc_5A18E6:
push	1
push	10h
lea	edx, [ebp+var_2]
push	edx
mov	eax, [ebp+arg_0]
call	sub_A49320

loc_5A18F6:
jmp	short loc_5A1900

loc_5A18F8:
mov	eax, [ebp+arg_0]
call	sub_A494F0

loc_5A1900:
mov	esp, ebp
pop	ebp
retn
sub_5A18B0 endp

align 10h


; Attributes: bp-based frame

sub_5A1910 proc	near

var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	eax, dword ptr [ebp+arg_4]
mov	dword ptr [ebp+var_8], eax
mov	ecx, dword ptr [ebp+arg_4+4]
mov	dword ptr [ebp+var_8+4], ecx
mov	edx, [ebp+arg_0]
call	sub_A49470
movzx	edx, al
test	edx, edx
jz	short loc_5A195A
xor	eax, eax
jz	short loc_5A194A
push	1		; char
push	40h		; int
lea	ecx, [ebp+var_8]
push	ecx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250
jmp	short loc_5A195A
jmp	short loc_5A195A

loc_5A194A:		; char
push	1
push	40h		; int
lea	edx, [ebp+var_8]
push	edx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250

loc_5A195A:
mov	eax, dword ptr [ebp+var_8]
mov	edx, dword ptr [ebp+var_8+4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5A1910 endp

align 10h


; Attributes: bp-based frame

sub_5A1970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_0]
call	sub_A49470
movzx	ecx, al
test	ecx, ecx
jz	short loc_5A19B2
xor	edx, edx
jz	short loc_5A19A2
push	1		; char
push	20h		; int
lea	eax, [ebp+var_4]
push	eax		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250
jmp	short loc_5A19B2
jmp	short loc_5A19B2

loc_5A19A2:		; char
push	1
push	20h		; int
lea	ecx, [ebp+var_4]
push	ecx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250

loc_5A19B2:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5A1970 endp

align 10h


; Attributes: bp-based frame

sub_5A19C0 proc	near

var_4= word ptr	-4
arg_0= dword ptr  8
arg_4= word ptr	 0Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	ax, [ebp+arg_4]
mov	[ebp+var_4], ax
mov	edx, [ebp+arg_0]
call	sub_A49470
movzx	ecx, al
test	ecx, ecx
jz	short loc_5A1A04
xor	edx, edx
jz	short loc_5A19F4
push	1		; char
push	10h		; int
lea	eax, [ebp+var_4]
push	eax		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250
jmp	short loc_5A1A04
jmp	short loc_5A1A04

loc_5A19F4:		; char
push	1
push	10h		; int
lea	ecx, [ebp+var_4]
push	ecx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250

loc_5A1A04:
mov	ax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5A19C0 endp

align 10h


; Attributes: bp-based frame

sub_5A1A10 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5A1B04
mov	[ebp+var_4], 0
jmp	short loc_5A1A43

loc_5A1A3A:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_5A1A43:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
cmp	[ebp+var_4], edx
jnb	loc_5A1B04
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+eax*8]
mov	eax, [edx+4]
mov	[ebp+var_18], eax

loc_5A1A77:
mov	ecx, [ebp+var_18]
mov	dl, [ecx]
mov	[ebp+var_19], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax]
jnz	short loc_5A1AB4
cmp	[ebp+var_19], 0
jz	short loc_5A1AAB
mov	ecx, [ebp+var_18]
mov	dl, [ecx+1]
mov	[ebp+var_1A], dl
mov	eax, [ebp+var_14]
cmp	dl, [eax+1]
jnz	short loc_5A1AB4
add	[ebp+var_18], 2
add	[ebp+var_14], 2
cmp	[ebp+var_1A], 0
jnz	short loc_5A1A77

loc_5A1AAB:
mov	[ebp+var_20], 0
jmp	short loc_5A1ABC

loc_5A1AB4:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_20], ecx

loc_5A1ABC:
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
cmp	[ebp+var_24], 0
jnz	short loc_5A1AFF
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+eax*8+4]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+eax*8]
push	edx
call	sub_76FFE0
add	esp, 10h
jmp	short loc_5A1B04

loc_5A1AFF:
jmp	loc_5A1A3A

loc_5A1B04:
mov	esp, ebp
pop	ebp
retn
sub_5A1A10 endp

align 10h


; Attributes: bp-based frame

sub_5A1B10 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_51], al
movzx	ecx, [ebp+var_51]
test	ecx, ecx
jnz	short loc_5A1BA1
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_50]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5A1BA1
mov	[ebp+var_58], 0
jmp	short loc_5A1BA8

loc_5A1BA1:
mov	[ebp+var_58], 1

loc_5A1BA8:
mov	cl, byte ptr [ebp+var_58]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_5A1BBA
and	[ebp+var_2C], 0FFFFFFFEh

loc_5A1BBA:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A1C15
mov	[ebp+var_20], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5B7C30
lea	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_5A1C15:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5A1B10 endp

align 10h


; Attributes: bp-based frame

sub_5A1C30 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 38h
lea	eax, [ebp+var_5]
push	eax
sub	esp, 18h
mov	[ebp+var_10], esp
lea	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_403850
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5B8110
add	esp, 24h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5A1C30 endp

align 10h


; Attributes: bp-based frame

sub_5A1C80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_5A1CEE
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_5A1CAB

loc_5A1CA3:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_5A1CAB:
cmp	[ebp+var_8], 1
jz	short loc_5A1CBC
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5A1CA3

loc_5A1CBC:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B8300
add	esp, 14h
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B83F0
add	esp, 0Ch

loc_5A1CEE:
mov	esp, ebp
pop	ebp
retn
sub_5A1C80 endp

align 10h


; Attributes: bp-based frame

sub_5A1D00 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_135= byte ptr -135h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_FC=	byte ptr -0FCh
var_B0=	byte ptr -0B0h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A1D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 140h
mov	[ebp+var_134], ecx
mov	[ebp+var_108], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_134]
call	sub_5E9440
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_134]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_114]
mov	[ebp+var_110], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_110]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_114]
setz	al
mov	[ebp+var_135], al
movzx	ecx, [ebp+var_135]
test	ecx, ecx
jnz	loc_5A1E25
or	[ebp+var_108], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_134]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_118]
mov	[ebp+var_13C], edx
mov	[ebp+var_140], eax
mov	ecx, [ebp+var_13C]
mov	edx, [ebp+var_140]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A1E04
jb	short loc_5A1DF8
mov	ecx, [ebp+var_13C]
mov	edx, [ebp+var_140]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A1E04

loc_5A1DF8:
mov	[ebp+var_144], 1
jmp	short loc_5A1E0E

loc_5A1E04:
mov	[ebp+var_144], 0

loc_5A1E0E:
movzx	ecx, byte ptr [ebp+var_144]
test	ecx, ecx
jnz	short loc_5A1E25
mov	[ebp+var_148], 0
jmp	short loc_5A1E2F

loc_5A1E25:
mov	[ebp+var_148], 1

loc_5A1E2F:
mov	dl, byte ptr [ebp+var_148]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_108]
and	eax, 1
jz	short loc_5A1E58
and	[ebp+var_108], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A1E58:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5A1F4C
lea	ecx, [ebp+var_FC]
call	sub_52E570
mov	[ebp+var_11C], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_94], eax
mov	ecx, [edx+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_11C]
push	edx
lea	ecx, [ebp+var_8C]
call	sub_536DD0
lea	eax, [ebp+var_12C]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_120]
call	sub_4046E0
lea	ecx, [ebp+var_94]
push	ecx
push	ecx
mov	[ebp+var_128], esp
mov	ecx, [ebp+var_12C]
mov	eax, [ebp+var_128]
call	sub_4046E0
lea	edx, [ebp+var_104]
push	edx
mov	ecx, [ebp+var_134]
call	sub_5AD380
lea	eax, [ebp+var_104]
mov	[ebp+var_14C], eax
mov	ecx, [ebp+var_14C]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_8C]
mov	[ebp+var_130], eax
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_130]
add	ecx, 4Ch
call	sub_10FB7C0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_B0]
call	sub_10FB7C0

loc_5A1F4C:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A1D00 endp

align 10h


; Attributes: bp-based frame

sub_5A1F70 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A96D0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_57DD50
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5A1FF3

loc_5A1FEA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5A1FF3:
cmp	[ebp+var_40], 0
jle	short loc_5A201D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5C8DF0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 70h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 70h
mov	[ebp+var_3C], eax
jmp	short loc_5A1FEA

loc_5A201D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5A2044
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5C8DF0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 70h
mov	[ebp+var_C], ecx
jmp	short loc_5A2099

loc_5A2044:
mov	edx, [ebp+arg_C]
imul	edx, 70h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5A207B

loc_5A2069:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 70h
mov	[ebp+var_68], eax

loc_5A207B:
cmp	[ebp+var_6C], 0
jle	short loc_5A2093
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5C8DF0
add	esp, 8
jmp	short loc_5A2069

loc_5A2093:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A2099:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A2131
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5A20F8

loc_5A20EF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A20F8:
cmp	[ebp+var_80], 0
jle	short loc_5A212B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5C8DF0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 70h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 70h
mov	[ebp+var_7C], eax
jmp	short loc_5A20EF

loc_5A212B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A2131:
mov	ecx, [ebp+var_CC]
call	sub_5A9DB0
mov	edx, [ebp+var_4]
imul	edx, 70h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A1F70 endp

align 10h


; Attributes: bp-based frame

sub_5A2180 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	esp, ebp
pop	ebp
retn	4
sub_5A2180 endp

align 10h


; Attributes: bp-based frame

sub_5A21D0 proc	near

var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_111= byte ptr -111h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_C5=	byte ptr -0C5h
var_C4=	byte ptr -0C4h
var_99=	byte ptr -99h
var_98=	byte ptr -98h
var_80=	byte ptr -80h
var_58=	byte ptr -58h
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 11Ch
mov	[ebp+var_110], ecx
mov	[ebp+var_D4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_110]
call	sub_5C8E60
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_110]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_E0]
mov	[ebp+var_DC], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_DC]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_E0]
setz	al
mov	[ebp+var_111], al
movzx	ecx, [ebp+var_111]
test	ecx, ecx
jnz	short loc_5A22BD
or	[ebp+var_D4], 1
lea	ecx, [ebp+var_3D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_3C]
call	sub_407810
or	[ebp+var_D4], 2
or	[ebp+var_D4], 4
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_E4], ecx
mov	edx, [ebp+var_110]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_E4]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jnz	short loc_5A22BD
mov	[ebp+var_118], 0
jmp	short loc_5A22C7

loc_5A22BD:
mov	[ebp+var_118], 1

loc_5A22C7:
mov	cl, byte ptr [ebp+var_118]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_D4]
and	edx, 4
jz	short loc_5A22E7
and	[ebp+var_D4], 0FFFFFFFBh
call	nullsub_1

loc_5A22E7:
mov	eax, [ebp+var_D4]
and	eax, 2
jz	short loc_5A2301
and	[ebp+var_D4], 0FFFFFFFDh
lea	ecx, [ebp+var_3C]
call	sub_407E50

loc_5A2301:
mov	ecx, [ebp+var_D4]
and	ecx, 1
jz	short loc_5A231B
and	[ebp+var_D4], 0FFFFFFFEh
lea	ecx, [ebp+var_3D]
call	nullsub_1

loc_5A231B:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A241A
lea	ecx, [ebp+var_C5]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_C4]
call	sub_407810
lea	ecx, [ebp+var_99]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_98]
call	sub_4022A0
mov	[ebp+var_FC], eax
lea	edx, [ebp+var_C4]
push	edx
lea	ecx, [ebp+var_80]
call	sub_403400
mov	eax, [ebp+var_FC]
push	eax
lea	ecx, [ebp+var_58]
call	sub_403850
lea	ecx, [ebp+var_10C]
mov	[ebp+var_100], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_100]
call	sub_4046E0
lea	edx, [ebp+var_80]
push	edx
push	ecx
mov	[ebp+var_108], esp
mov	ecx, [ebp+var_10C]
mov	eax, [ebp+var_108]
call	sub_4046E0
lea	eax, [ebp+var_D0]
push	eax
mov	ecx, [ebp+var_110]
call	sub_5B2360
lea	ecx, [ebp+var_D0]
mov	[ebp+var_11C], ecx
mov	edx, [ebp+var_11C]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_58]
call	sub_407910
lea	ecx, [ebp+var_80]
call	sub_407E50
lea	ecx, [ebp+var_98]
call	sub_407910
lea	ecx, [ebp+var_99]
call	nullsub_1
lea	ecx, [ebp+var_C4]
call	sub_407E50
lea	ecx, [ebp+var_C5]
call	nullsub_1

loc_5A241A:
mov	eax, [ebp+var_4]
add	eax, 38h
mov	esp, ebp
pop	ebp
retn	4
sub_5A21D0 endp

align 10h


; Attributes: bp-based frame

sub_5A2430 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_7D=	byte ptr -7Dh
var_7C=	byte ptr -7Ch
var_54=	byte ptr -54h
var_3C=	byte ptr -3Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C4h
mov	[ebp+var_B8], ecx
mov	[ebp+var_8C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_5C9500
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_B8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_98]
mov	[ebp+var_94], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_94]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_98]
setz	al
mov	[ebp+var_B9], al
movzx	ecx, [ebp+var_B9]
test	ecx, ecx
jnz	short loc_5A24F3
or	[ebp+var_8C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_B8]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5A24F3
mov	[ebp+var_C0], 0
jmp	short loc_5A24FD

loc_5A24F3:
mov	[ebp+var_C0], 1

loc_5A24FD:
mov	al, byte ptr [ebp+var_C0]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_8C]
and	ecx, 1
jz	short loc_5A2520
and	[ebp+var_8C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A2520:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A25DD
lea	ecx, [ebp+var_7D]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_7C]
call	sub_402390
mov	[ebp+var_A4], eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_54]
call	sub_403850
mov	ecx, [ebp+var_A4]
push	ecx
lea	ecx, [ebp+var_3C]
call	sub_403400
lea	edx, [ebp+var_B4]
mov	[ebp+var_A8], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_A8]
call	sub_4046E0
lea	eax, [ebp+var_54]
push	eax
push	ecx
mov	[ebp+var_B0], esp
mov	ecx, [ebp+var_B4]
mov	eax, [ebp+var_B0]
call	sub_4046E0
lea	ecx, [ebp+var_88]
push	ecx
mov	ecx, [ebp+var_B8]
call	sub_5B1E60
lea	edx, [ebp+var_88]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_3C]
call	sub_407E50
lea	ecx, [ebp+var_54]
call	sub_407910
lea	ecx, [ebp+var_7C]
call	sub_407E50
lea	ecx, [ebp+var_7D]
call	nullsub_1

loc_5A25DD:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A2430 endp

align 10h


; Attributes: bp-based frame

sub_5A25F0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_A4], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_5C7D40
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_A4]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_A5], al
movzx	ecx, [ebp+var_A5]
test	ecx, ecx
jnz	short loc_5A26A5
or	[ebp+var_78], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_88], edx
mov	eax, [ebp+var_A4]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_88]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5A26A5
mov	[ebp+var_AC], 0
jmp	short loc_5A26AF

loc_5A26A5:
mov	[ebp+var_AC], 1

loc_5A26AF:
mov	cl, byte ptr [ebp+var_AC]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_78]
and	edx, 1
jz	short loc_5A26C4
and	[ebp+var_78], 0FFFFFFFEh

loc_5A26C4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A276F
lea	ecx, [ebp+var_69]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_68]
call	sub_402390
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_90]
push	eax
lea	ecx, [ebp+var_3C]
call	sub_403400
lea	ecx, [ebp+var_A0]
mov	[ebp+var_94], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_94]
call	sub_4046E0
lea	edx, [ebp+var_40]
push	edx
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_A0]
mov	eax, [ebp+var_9C]
call	sub_4046E0
lea	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_5B28A0
lea	ecx, [ebp+var_74]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_B0]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_3C]
call	sub_407E50
lea	ecx, [ebp+var_68]
call	sub_407E50
lea	ecx, [ebp+var_69]
call	nullsub_1

loc_5A276F:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5A25F0 endp

align 10h


; Attributes: bp-based frame

sub_5A2780 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_68=	byte ptr -68h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_A0], ecx
mov	[ebp+var_74], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E9440
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_A0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_80]
mov	[ebp+var_7C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_7C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_80]
setz	al
mov	[ebp+var_A1], al
movzx	ecx, [ebp+var_A1]
test	ecx, ecx
jnz	loc_5A288D
or	[ebp+var_74], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_A0]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_84]
mov	[ebp+var_A8], edx
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_AC]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A286C
jb	short loc_5A2860
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_AC]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A286C

loc_5A2860:
mov	[ebp+var_B0], 1
jmp	short loc_5A2876

loc_5A286C:
mov	[ebp+var_B0], 0

loc_5A2876:
movzx	ecx, byte ptr [ebp+var_B0]
test	ecx, ecx
jnz	short loc_5A288D
mov	[ebp+var_B4], 0
jmp	short loc_5A2897

loc_5A288D:
mov	[ebp+var_B4], 1

loc_5A2897:
mov	dl, byte ptr [ebp+var_B4]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_74]
and	eax, 1
jz	short loc_5A28BA
and	[ebp+var_74], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A28BA:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5A2978
lea	ecx, [ebp+var_68]
call	sub_10FB830
mov	[ebp+var_8C], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_4C], eax
mov	ecx, [edx+4]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_88]
call	sub_4694E0
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_8C]
mov	al, [edx+18h]
mov	[ecx+18h], al
lea	ecx, [ebp+var_9C]
mov	[ebp+var_90], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_90]
call	sub_4046E0
lea	edx, [ebp+var_4C]
push	edx
push	ecx
mov	[ebp+var_98], esp
mov	ecx, [ebp+var_9C]
mov	eax, [ebp+var_98]
call	sub_4046E0
lea	eax, [ebp+var_70]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5AEDB0
lea	ecx, [ebp+var_70]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_B8]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_44]
call	sub_10FB7C0
lea	ecx, [ebp+var_68]
call	sub_10FB7C0

loc_5A2978:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A2780 endp

align 10h


; Attributes: bp-based frame

sub_5A2990 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
jmp	short loc_5A29A7

loc_5A2998:
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax

loc_5A29A7:
lea	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_C]
setnz	al
mov	[ebp+var_35], al
movzx	ecx, [ebp+var_35]
test	ecx, ecx
jz	short loc_5A29E8
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
add	eax, 28h
push	eax
lea	ecx, [ebp+arg_C]
call	sub_5A9E30
jmp	short loc_5A2998

loc_5A29E8:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5A2990 endp

align 10h


; Attributes: bp-based frame

sub_5A2A10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_0]
push	eax
call	sub_4077F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
call	sub_402430
cmp	[ebp+var_4], eax
jnz	loc_5A2ABA
mov	ecx, [ebp+arg_4]
call	sub_404430
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
jmp	short loc_5A2A70

loc_5A2A55:
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 2
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax

loc_5A2A70:
cmp	[ebp+var_10], 0
jbe	short loc_5A2AA4
mov	ecx, [ebp+var_8]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax]
cmp	edx, ecx
jz	short loc_5A2AA2
mov	edx, [ebp+var_8]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+var_C]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	eax, edx
setnl	cl
lea	ecx, [ecx+ecx-1]
mov	[ebp+var_14], ecx
jmp	short loc_5A2AAB

loc_5A2AA2:
jmp	short loc_5A2A55

loc_5A2AA4:
mov	[ebp+var_14], 0

loc_5A2AAB:
cmp	[ebp+var_14], 0
jnz	short loc_5A2ABA
mov	[ebp+var_1C], 1
jmp	short loc_5A2AC1

loc_5A2ABA:
mov	[ebp+var_1C], 0

loc_5A2AC1:
mov	al, byte ptr [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_5A2A10 endp

align 10h


; Attributes: bp-based frame

sub_5A2AD0 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	byte ptr -0ACh
var_6C=	byte ptr -6Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A2AD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A8h
push	1
push	10h
lea	ecx, [ebp+var_AC]
call	sub_43E7B0
mov	eax, [ebp+arg_8]
mov	[ebp+var_B0], eax
jmp	short loc_5A2B17

loc_5A2B08:
mov	ecx, [ebp+var_B0]
add	ecx, 8
mov	[ebp+var_B0], ecx

loc_5A2B17:
mov	edx, [ebp+var_B0]
cmp	edx, [ebp+arg_C]
jz	short loc_5A2B57
mov	eax, [ebp+var_B0]
cmp	eax, [ebp+arg_8]
jz	short loc_5A2B3D
movzx	ecx, [ebp+arg_4]
push	ecx
lea	ecx, [ebp+var_AC]
call	sub_447B30

loc_5A2B3D:
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
push	eax
mov	ecx, [edx]
push	ecx
lea	ecx, [ebp+var_AC]
call	?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z ; std::locale::_Locimp::_Addfac(std::locale::facet *,uint)
jmp	short loc_5A2B08

loc_5A2B57:
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_AC]
call	sub_4367C0
lea	ecx, [ebp+var_6C]
call	sub_43E870
lea	eax, [ebp+var_6C]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
mov	dword ptr [ecx], offset	off_1446274
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_B4]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A2AD0 endp

align 10h


; Attributes: bp-based frame

sub_5A2BB0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 2
mov	[ebp+var_40], edx
jmp	short loc_5A2C2E

loc_5A2C25:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5A2C2E:
cmp	[ebp+var_40], 0
jle	short loc_5A2C58
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 4
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 4
mov	[ebp+var_3C], ecx
jmp	short loc_5A2C25

loc_5A2C58:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5A2C7F
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_4B6FE0
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_5A2CCF

loc_5A2C7F:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 2
mov	[ebp+var_6C], ecx
jmp	short loc_5A2CB1

loc_5A2C9F:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_68], eax

loc_5A2CB1:
cmp	[ebp+var_6C], 0
jle	short loc_5A2CC9
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_4B6FE0
add	esp, 8
jmp	short loc_5A2C9F

loc_5A2CC9:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A2CCF:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A2D62
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 2
mov	[ebp+var_80], eax
jmp	short loc_5A2D29

loc_5A2D20:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_5A2D29:
cmp	[ebp+var_80], 0
jle	short loc_5A2D5C
mov	edx, [ebp+var_8C]
push	edx		; int
mov	eax, [ebp+var_7C]
push	eax		; void *
call	sub_4B6FE0
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 4
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 4
mov	[ebp+var_7C], edx
jmp	short loc_5A2D20

loc_5A2D5C:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_5A2D62:
mov	ecx, [ebp+var_CC]
call	sub_4B80F0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5A2BB0 endp

align 10h


; Attributes: bp-based frame

sub_5A2DB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
call	sub_401740
mov	eax, [ebp+arg_8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5A2DB0 endp

align 10h


; Attributes: bp-based frame

sub_5A2DF0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A2E0C:
cmp	[ebp+var_10], 0
jz	short loc_5A2E57
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A2E46
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5A2E4F

loc_5A2E46:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5A2E4F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5A2E0C

loc_5A2E57:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A2EF9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5A2EEA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B8E50
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5A2F73
jmp	short loc_5A2EF9

loc_5A2EEA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A2EF9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5A2F58
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B8E50
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5A2F73

loc_5A2F58:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5A2F73:
mov	esp, ebp
pop	ebp
retn	8
sub_5A2DF0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A2F80(void	*)
sub_5A2F80 proc	near

var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5A2F89:
cmp	[ebp+arg_0], 0
jz	short loc_5A2FDC
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5A2F80
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_5C6950
cmp	[ebp+arg_0], 0
jz	short loc_5A2FD4
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A2FD4:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A2F89

loc_5A2FDC:
mov	esp, ebp
pop	ebp
retn	4
sub_5A2F80 endp

align 10h


; Attributes: bp-based frame

sub_5A2FF0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7A=	byte ptr -7Ah
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_5C=	byte ptr -5Ch
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_98], ecx
mov	[ebp+var_68], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_98]
call	sub_5C9500
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_74]
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_74]
setz	al
mov	[ebp+var_99], al
movzx	ecx, [ebp+var_99]
test	ecx, ecx
jnz	short loc_5A3095
or	[ebp+var_68], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_78], edx
mov	eax, [ebp+var_98]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5A3095
mov	[ebp+var_A0], 0
jmp	short loc_5A309F

loc_5A3095:
mov	[ebp+var_A0], 1

loc_5A309F:
mov	al, byte ptr [ebp+var_A0]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_68]
and	ecx, 1
jz	short loc_5A30BC
and	[ebp+var_68], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A30BC:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A319A
lea	eax, [ebp+var_79]
push	eax
lea	ecx, [ebp+var_5C]
call	sub_489C40
mov	[ebp+var_4C], 0
mov	cl, [ebp+var_7A]
mov	[ebp+var_48], cl
lea	ecx, [ebp+var_7A]
call	nullsub_1
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_44]
call	sub_403850
lea	eax, [ebp+var_2C]
mov	[ebp+var_80], eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	ecx, [ebp+var_80]
call	sub_5AB7E0
lea	edx, [ebp+var_90]
mov	[ebp+var_84], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	eax, [ebp+var_44]
push	eax
push	ecx
mov	[ebp+var_8C], esp
mov	ecx, [ebp+var_90]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	ecx, [ebp+var_64]
push	ecx
mov	ecx, [ebp+var_98]
call	sub_5B8F90
lea	edx, [ebp+var_64]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_94], edx
mov	ecx, [ebp+var_94]
call	sub_5AB040
mov	ecx, [ebp+var_94]
add	ecx, 14h
call	nullsub_1
lea	ecx, [ebp+var_44]
call	sub_407910
lea	ecx, [ebp+var_5C]
call	sub_5AB040
lea	ecx, [ebp+var_48]
call	nullsub_1

loc_5A319A:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A2FF0 endp

align 10h


; Attributes: bp-based frame

sub_5A31B0 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_38=	byte ptr -38h
var_20=	byte ptr -20h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0C4h
mov	[ebp+var_B8], ecx
mov	[ebp+var_54], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_5C9500
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_B8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_60]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_60]
setz	al
mov	[ebp+var_B9], al
movzx	ecx, [ebp+var_B9]
test	ecx, ecx
jnz	short loc_5A3255
or	[ebp+var_54], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_B8]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5A3255
mov	[ebp+var_C0], 0
jmp	short loc_5A325F

loc_5A3255:
mov	[ebp+var_C0], 1

loc_5A325F:
mov	al, byte ptr [ebp+var_C0]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_54]
and	ecx, 1
jz	short loc_5A327C
and	[ebp+var_54], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A327C:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A331B
mov	[ebp+var_44], 0
mov	[ebp+var_40], 0
push	0
lea	eax, [ebp+var_45]
push	eax
lea	ecx, [ebp+var_3C]
call	sub_489990
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_38]
call	sub_403850
lea	edx, [ebp+var_44]
push	edx
lea	ecx, [ebp+var_20]
call	sub_5AB090
lea	eax, [ebp+var_74]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	ecx, [ebp+var_38]
push	ecx
push	ecx
mov	[ebp+var_70], esp
mov	ecx, [ebp+var_74]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	edx, [ebp+var_50]
push	edx
mov	ecx, [ebp+var_B8]
call	sub_5BC720
lea	eax, [ebp+var_50]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_20]
call	sub_5A9FB0
lea	ecx, [ebp+var_38]
call	sub_407910
lea	ecx, [ebp+var_44]
call	sub_5A9FB0

loc_5A331B:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A31B0 endp

align 10h


; Attributes: bp-based frame

sub_5A3330 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5A9ED0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AA0B0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5A33B3

loc_5A33AA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5A33B3:
cmp	[ebp+var_40], 0
jle	short loc_5A33DD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A77E0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 64h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 64h
mov	[ebp+var_3C], eax
jmp	short loc_5A33AA

loc_5A33DD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5A3404
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A77E0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 64h
mov	[ebp+var_C], ecx
jmp	short loc_5A3459

loc_5A3404:
mov	edx, [ebp+arg_C]
imul	edx, 64h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5A343B

loc_5A3429:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 64h
mov	[ebp+var_68], eax

loc_5A343B:
cmp	[ebp+var_6C], 0
jle	short loc_5A3453
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A77E0
add	esp, 8
jmp	short loc_5A3429

loc_5A3453:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A3459:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A34F1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5A34B8

loc_5A34AF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A34B8:
cmp	[ebp+var_80], 0
jle	short loc_5A34EB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A77E0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 64h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 64h
mov	[ebp+var_7C], eax
jmp	short loc_5A34AF

loc_5A34EB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A34F1:
mov	ecx, [ebp+var_CC]
call	sub_5AA030
mov	edx, [ebp+var_4]
imul	edx, 64h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A3330 endp

align 10h


; Attributes: bp-based frame

sub_5A3540 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_5A35CD
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_C], eax
mov	[ebp+var_8], 0
jmp	short loc_5A3570

loc_5A3568:
mov	edx, [ebp+var_C]
sar	edx, 1
mov	[ebp+var_C], edx

loc_5A3570:
cmp	[ebp+var_C], 1
jz	short loc_5A3581
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_5A3568

loc_5A3581:
push	0
lea	ecx, [ebp+var_1]
push	ecx
call	sub_4761F0
add	esp, 8
movzx	edx, byte ptr [eax]
push	edx
mov	eax, [ebp+var_8]
shl	eax, 1
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5B9450
add	esp, 14h
push	0
lea	eax, [ebp+var_2]
push	eax
call	sub_4761F0
add	esp, 8
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5B9520
add	esp, 0Ch

loc_5A35CD:
mov	esp, ebp
pop	ebp
retn
sub_5A3540 endp

align 10h


; Attributes: bp-based frame

sub_5A35E0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7A=	byte ptr -7Ah
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_5C=	byte ptr -5Ch
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_98], ecx
mov	[ebp+var_68], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_98]
call	sub_5C9500
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_74]
mov	[ebp+var_70], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_74]
setz	al
mov	[ebp+var_99], al
movzx	ecx, [ebp+var_99]
test	ecx, ecx
jnz	short loc_5A3685
or	[ebp+var_68], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_78], edx
mov	eax, [ebp+var_98]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5A3685
mov	[ebp+var_A0], 0
jmp	short loc_5A368F

loc_5A3685:
mov	[ebp+var_A0], 1

loc_5A368F:
mov	al, byte ptr [ebp+var_A0]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_68]
and	ecx, 1
jz	short loc_5A36AC
and	[ebp+var_68], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A36AC:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A378A
lea	eax, [ebp+var_79]
push	eax
lea	ecx, [ebp+var_5C]
call	sub_489C40
mov	[ebp+var_4C], 0
mov	cl, [ebp+var_7A]
mov	[ebp+var_48], cl
lea	ecx, [ebp+var_7A]
call	nullsub_1
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_44]
call	sub_403850
lea	eax, [ebp+var_2C]
mov	[ebp+var_80], eax
lea	ecx, [ebp+var_5C]
push	ecx
mov	ecx, [ebp+var_80]
call	sub_5AB950
lea	edx, [ebp+var_90]
mov	[ebp+var_84], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	eax, [ebp+var_44]
push	eax
push	ecx
mov	[ebp+var_8C], esp
mov	ecx, [ebp+var_90]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	ecx, [ebp+var_64]
push	ecx
mov	ecx, [ebp+var_98]
call	sub_5ADED0
lea	edx, [ebp+var_64]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_94], edx
mov	ecx, [ebp+var_94]
call	sub_5E0AF0
mov	ecx, [ebp+var_94]
add	ecx, 14h
call	nullsub_1
lea	ecx, [ebp+var_44]
call	sub_407910
lea	ecx, [ebp+var_5C]
call	sub_5E0AF0
lea	ecx, [ebp+var_48]
call	nullsub_1

loc_5A378A:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A35E0 endp

align 10h


; Attributes: bp-based frame

sub_5A37A0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_74], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_74]
call	sub_5C9500
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_74]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_75], al
movzx	ecx, [ebp+var_75]
test	ecx, ecx
jnz	short loc_5A3830
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_74]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_50]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5A3830
mov	[ebp+var_7C], 0
jmp	short loc_5A3837

loc_5A3830:
mov	[ebp+var_7C], 1

loc_5A3837:
mov	al, byte ptr [ebp+var_7C]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_40]
and	ecx, 1
jz	short loc_5A3851
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A3851:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5A38B5
mov	[ebp+var_31], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_30]
call	sub_403850
mov	cl, [ebp+var_31]
mov	[ebp+var_18], cl
lea	edx, [ebp+var_70]
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_30]
push	eax
push	ecx
mov	[ebp+var_6C], esp
mov	ecx, [ebp+var_70]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_5BCCC0
lea	edx, [ebp+var_3C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_30]
call	sub_407910

loc_5A38B5:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A37A0 endp

align 10h


; Attributes: bp-based frame

sub_5A38D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_5A393C
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
jmp	short loc_5A38FB

loc_5A38F3:
mov	edx, [ebp+var_8]
sar	edx, 1
mov	[ebp+var_8], edx

loc_5A38FB:
cmp	[ebp+var_8], 1
jz	short loc_5A390C
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5A38F3

loc_5A390C:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_4]
shl	edx, 1
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B95A0
add	esp, 14h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B9680
add	esp, 0Ch

loc_5A393C:
mov	esp, ebp
pop	ebp
retn
sub_5A38D0 endp



; Attributes: bp-based frame

sub_5A3940 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B2=	byte ptr -0B2h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_91=	byte ptr -91h
var_90=	byte ptr -90h
var_78=	byte ptr -78h
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	byte ptr -60h
var_48=	byte ptr -48h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_CC], ecx
mov	[ebp+var_A0], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5C97A0
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_CC]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_AC]
mov	[ebp+var_A8], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_A8]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_AC]
setz	al
mov	[ebp+var_CD], al
movzx	ecx, [ebp+var_CD]
test	ecx, ecx
jnz	short loc_5A3A28
or	[ebp+var_A0], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_A0], 2
or	[ebp+var_A0], 4
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_CC]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	eax, [ebp+var_B0]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5A3A28
mov	[ebp+var_D4], 0
jmp	short loc_5A3A32

loc_5A3A28:
mov	[ebp+var_D4], 1

loc_5A3A32:
mov	dl, byte ptr [ebp+var_D4]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_A0]
and	eax, 4
jz	short loc_5A3A55
and	[ebp+var_A0], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A3A55:
mov	ecx, [ebp+var_A0]
and	ecx, 2
jz	short loc_5A3A6F
and	[ebp+var_A0], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_5A3A6F:
mov	edx, [ebp+var_A0]
and	edx, 1
jz	short loc_5A3A89
and	[ebp+var_A0], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_5A3A89:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A3B98
lea	ecx, [ebp+var_91]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp+var_90]
call	sub_407D30
lea	eax, [ebp+var_B1]
push	eax
lea	ecx, [ebp+var_78]
call	sub_489C40
mov	[ebp+var_68], 0
mov	cl, [ebp+var_B2]
mov	[ebp+var_64], cl
lea	ecx, [ebp+var_B2]
call	nullsub_1
lea	edx, [ebp+var_90]
push	edx
lea	ecx, [ebp+var_60]
call	sub_403850
lea	eax, [ebp+var_48]
mov	[ebp+var_B8], eax
lea	ecx, [ebp+var_78]
push	ecx
mov	ecx, [ebp+var_B8]
call	sub_5AB7E0
lea	edx, [ebp+var_C8]
mov	[ebp+var_BC], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_BC]
call	sub_4046E0
lea	eax, [ebp+var_60]
push	eax
push	ecx
mov	[ebp+var_C4], esp
mov	ecx, [ebp+var_C8]
mov	eax, [ebp+var_C4]
call	sub_4046E0
lea	ecx, [ebp+var_9C]
push	ecx
mov	ecx, [ebp+var_CC]
call	sub_5B8F90
lea	edx, [ebp+var_9C]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_48]
call	sub_5A9EB0
lea	ecx, [ebp+var_60]
call	sub_407910
lea	ecx, [ebp+var_78]
call	sub_5AB040
lea	ecx, [ebp+var_64]
call	nullsub_1
lea	ecx, [ebp+var_90]
call	sub_407910
lea	ecx, [ebp+var_91]
call	nullsub_1

loc_5A3B98:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A3940 endp

align 10h


; Attributes: bp-based frame

sub_5A3BB0 proc	near

var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_7D=	byte ptr -7Dh
var_7C=	byte ptr -7Ch
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_3C=	byte ptr -3Ch
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0FCh
mov	[ebp+var_F0], ecx
mov	[ebp+var_8C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_F0]
call	sub_5C97A0
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_F0]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_98]
mov	[ebp+var_94], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_94]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_98]
setz	al
mov	[ebp+var_F1], al
movzx	ecx, [ebp+var_F1]
test	ecx, ecx
jnz	short loc_5A3C98
or	[ebp+var_8C], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_8C], 2
or	[ebp+var_8C], 4
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_F0]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	eax, [ebp+var_9C]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5A3C98
mov	[ebp+var_F8], 0
jmp	short loc_5A3CA2

loc_5A3C98:
mov	[ebp+var_F8], 1

loc_5A3CA2:
mov	dl, byte ptr [ebp+var_F8]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_8C]
and	eax, 4
jz	short loc_5A3CC5
and	[ebp+var_8C], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A3CC5:
mov	ecx, [ebp+var_8C]
and	ecx, 2
jz	short loc_5A3CDF
and	[ebp+var_8C], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_5A3CDF:
mov	edx, [ebp+var_8C]
and	edx, 1
jz	short loc_5A3CF9
and	[ebp+var_8C], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_5A3CF9:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A3DD7
lea	ecx, [ebp+var_7D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp+var_7C]
call	sub_407D30
mov	[ebp+var_60], 0
mov	[ebp+var_5C], 0
push	0
lea	eax, [ebp+var_61]
push	eax
lea	ecx, [ebp+var_58]
call	sub_489990
lea	ecx, [ebp+var_7C]
push	ecx
lea	ecx, [ebp+var_54]
call	sub_403850
lea	edx, [ebp+var_60]
push	edx
lea	ecx, [ebp+var_3C]
call	sub_5AB090
lea	eax, [ebp+var_AC]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_A0]
call	sub_4046E0
lea	ecx, [ebp+var_54]
push	ecx
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_AC]
mov	eax, [ebp+var_A8]
call	sub_4046E0
lea	edx, [ebp+var_88]
push	edx
mov	ecx, [ebp+var_F0]
call	sub_5BC720
lea	eax, [ebp+var_88]
mov	[ebp+var_FC], eax
mov	ecx, [ebp+var_FC]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_3C]
call	sub_5A9FB0
lea	ecx, [ebp+var_54]
call	sub_407910
lea	ecx, [ebp+var_60]
call	sub_5A9FB0
lea	ecx, [ebp+var_7C]
call	sub_407910
lea	ecx, [ebp+var_7D]
call	nullsub_1

loc_5A3DD7:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A3BB0 endp

align 10h


; Attributes: bp-based frame

sub_5A3DF0 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_51], al
movzx	ecx, [ebp+var_51]
test	ecx, ecx
jnz	short loc_5A3E81
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_50]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5A3E81
mov	[ebp+var_58], 0
jmp	short loc_5A3E88

loc_5A3E81:
mov	[ebp+var_58], 1

loc_5A3E88:
mov	cl, byte ptr [ebp+var_58]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_5A3EA2
and	[ebp+var_2C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	sub_42CA30

loc_5A3EA2:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A3EFD
mov	[ebp+var_20], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5B7C30
lea	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_5A3EFD:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5A3DF0 endp

align 10h


; Attributes: bp-based frame

sub_5A3F10 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_4D=	byte ptr -4Dh
var_4C=	byte ptr -4Ch
var_34=	byte ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_9C], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5C97A0
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_9D], al
movzx	ecx, [ebp+var_9D]
test	ecx, ecx
jnz	short loc_5A3FE0
or	[ebp+var_78], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_78], 2
or	[ebp+var_78], 4
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_9C]
mov	al, [edx+14h]
mov	[ebp+var_11], al
mov	eax, [ebp+var_88]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5A3FE0
mov	[ebp+var_A4], 0
jmp	short loc_5A3FEA

loc_5A3FE0:
mov	[ebp+var_A4], 1

loc_5A3FEA:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_78]
and	eax, 4
jz	short loc_5A4007
and	[ebp+var_78], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5A4007:
mov	ecx, [ebp+var_78]
and	ecx, 2
jz	short loc_5A401B
and	[ebp+var_78], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_5A401B:
mov	edx, [ebp+var_78]
and	edx, 1
jz	short loc_5A402F
and	[ebp+var_78], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_5A402F:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A40D9
mov	[ebp+var_4D], 0
lea	ecx, [ebp+var_69]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp+var_68]
call	sub_407D30
lea	eax, [ebp+var_68]
push	eax
lea	ecx, [ebp+var_4C]
call	sub_403850
mov	cl, [ebp+var_4D]
mov	[ebp+var_34], cl
lea	edx, [ebp+var_98]
mov	[ebp+var_8C], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	eax, [ebp+var_4C]
push	eax
push	ecx
mov	[ebp+var_94], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_94]
call	sub_4046E0
lea	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_9C]
call	sub_5BCCC0
lea	edx, [ebp+var_74]
mov	[ebp+var_A8], edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_4C]
call	sub_407910
lea	ecx, [ebp+var_68]
call	sub_407910
lea	ecx, [ebp+var_69]
call	nullsub_1

loc_5A40D9:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5A3F10 endp

align 10h


; Attributes: bp-based frame

sub_5A40F0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AB140
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5A4146
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5A40F0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5A4146:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5A4155:
cmp	[ebp+arg_0], 0
jz	short loc_5A41C2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AB140
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5A41B1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A40F0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5A41B1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5A4155

loc_5A41C2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5A40F0 endp

align 10h


; Attributes: bp-based frame

sub_5A41D0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5A41E8:
cmp	[ebp+var_8], 0
jz	short loc_5A4231
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setl	cl
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_5A4226
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5A422F

loc_5A4226:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5A422F:
jmp	short loc_5A41E8

loc_5A4231:
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5B96F0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5A41D0 endp

align 10h


; Attributes: bp-based frame

sub_5A4260 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_5A42C6
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 48h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_5A42A7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5B9930
jmp	short loc_5A42C6

loc_5A42A7:
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5B9830

loc_5A42C6:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5A4260 endp

align 10h


; Attributes: bp-based frame

sub_5A42D0 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_5A4336
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 3
cmp	edx, [ebp+arg_4]
jb	short loc_5A4312
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5B9D90
jmp	short loc_5A4336

loc_5A4312:
xor	edx, edx
mov	byte ptr [ebp+var_3+1],	dl
xor	eax, eax
mov	byte ptr [ebp+var_3], al
push	0
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_3]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5B9B80

loc_5A4336:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5A42D0 endp

align 10h


; Attributes: bp-based frame

sub_5A4340 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5AA130
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AA290
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5A43C3

loc_5A43BA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5A43C3:
cmp	[ebp+var_40], 0
jle	short loc_5A43ED
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A7830
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 60h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 60h
mov	[ebp+var_3C], eax
jmp	short loc_5A43BA

loc_5A43ED:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5A4414
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A7830
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 60h
mov	[ebp+var_C], ecx
jmp	short loc_5A4469

loc_5A4414:
mov	edx, [ebp+arg_C]
imul	edx, 60h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5A444B

loc_5A4439:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 60h
mov	[ebp+var_68], eax

loc_5A444B:
cmp	[ebp+var_6C], 0
jle	short loc_5A4463
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A7830
add	esp, 8
jmp	short loc_5A4439

loc_5A4463:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A4469:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A4501
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5A44C8

loc_5A44BF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A44C8:
cmp	[ebp+var_80], 0
jle	short loc_5A44FB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A7830
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 60h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 60h
mov	[ebp+var_7C], eax
jmp	short loc_5A44BF

loc_5A44FB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A4501:
mov	ecx, [ebp+var_CC]
call	sub_5AA210
mov	edx, [ebp+var_4]
imul	edx, 60h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A4340 endp

align 10h


; Attributes: bp-based frame

sub_5A4550 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5AA3E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AA540
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 7Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5A45D3

loc_5A45CA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5A45D3:
cmp	[ebp+var_40], 0
jle	short loc_5A45FD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A78B0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 7Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 7Ch
mov	[ebp+var_3C], eax
jmp	short loc_5A45CA

loc_5A45FD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5A4624
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A78B0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 7Ch
mov	[ebp+var_C], ecx
jmp	short loc_5A4679

loc_5A4624:
mov	edx, [ebp+arg_C]
imul	edx, 7Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 7Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5A465B

loc_5A4649:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 7Ch
mov	[ebp+var_68], eax

loc_5A465B:
cmp	[ebp+var_6C], 0
jle	short loc_5A4673
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A78B0
add	esp, 8
jmp	short loc_5A4649

loc_5A4673:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A4679:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A4711
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 7Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5A46D8

loc_5A46CF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A46D8:
cmp	[ebp+var_80], 0
jle	short loc_5A470B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A78B0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 7Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 7Ch
mov	[ebp+var_7C], eax
jmp	short loc_5A46CF

loc_5A470B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A4711:
mov	ecx, [ebp+var_CC]
call	sub_5AA4C0
mov	edx, [ebp+var_4]
imul	edx, 7Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A4550 endp

align 10h


; Attributes: bp-based frame

sub_5A4760 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_5A4785
xor	al, al
jmp	loc_5A4896

loc_5A4785:
xor	ecx, ecx
cmp	ecx, 4
jz	short loc_5A4796
mov	edx, 4
cmp	edx, 0Fh
jl	short loc_5A479D

loc_5A4796:
xor	al, al
jmp	loc_5A4896

loc_5A479D:
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_5A4809
xor	al, al
jmp	loc_5A4896

loc_5A4809:		; size_t
push	120h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_5A482F
mov	ecx, [ebp+var_14]
call	sub_C17B80
mov	[ebp+var_8C], eax
jmp	short loc_5A4839

loc_5A482F:
mov	[ebp+var_8C], 0

loc_5A4839:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 4
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_5A4894
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_5A4894:
mov	al, 1

loc_5A4896:
mov	esp, ebp
pop	ebp
retn	4
sub_5A4760 endp

align 10h


; Attributes: bp-based frame

sub_5A48A0 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_5A48C5
xor	al, al
jmp	loc_5A49D6

loc_5A48C5:
xor	ecx, ecx
cmp	ecx, 5
jz	short loc_5A48D6
mov	edx, 5
cmp	edx, 0Fh
jl	short loc_5A48DD

loc_5A48D6:
xor	al, al
jmp	loc_5A49D6

loc_5A48DD:
mov	[ebp+var_4], 5
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_5A4949
xor	al, al
jmp	loc_5A49D6

loc_5A4949:		; size_t
push	14Ch
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_5A496F
mov	ecx, [ebp+var_14]
call	sub_C179B0
mov	[ebp+var_8C], eax
jmp	short loc_5A4979

loc_5A496F:
mov	[ebp+var_8C], 0

loc_5A4979:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 5
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_5A49D4
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_5A49D4:
mov	al, 1

loc_5A49D6:
mov	esp, ebp
pop	ebp
retn	4
sub_5A48A0 endp

align 10h


; Attributes: bp-based frame

sub_5A49E0 proc	near

var_8C=	dword ptr -8Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_60=	dword ptr -60h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_84], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_5A4A05
xor	al, al
jmp	loc_5A4B16

loc_5A4A05:
xor	ecx, ecx
cmp	ecx, 6
jz	short loc_5A4A16
mov	edx, 6
cmp	edx, 0Fh
jl	short loc_5A4A1D

loc_5A4A16:
xor	al, al
jmp	loc_5A4B16

loc_5A4A1D:
mov	[ebp+var_4], 6
mov	ecx, [ebp+var_84]
add	ecx, 28h
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5C3120
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+var_8]
xor	eax, eax
cmp	edx, [ebp+var_34]
setnz	al
mov	[ebp+var_85], al
movzx	ecx, [ebp+var_85]
test	ecx, ecx
jz	short loc_5A4A89
xor	al, al
jmp	loc_5A4B16

loc_5A4A89:		; size_t
push	144h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_5A4AAF
mov	ecx, [ebp+var_14]
call	sub_C17A90
mov	[ebp+var_8C], eax
jmp	short loc_5A4AB9

loc_5A4AAF:
mov	[ebp+var_8C], 0

loc_5A4AB9:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	[ebp+var_18], 6
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_84]
add	ecx, 28h
call	sub_5B0400
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [ebp+var_84]
cmp	dword ptr [edx+4], 0
jz	short loc_5A4B14
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_84]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+0Ch]
call	eax

loc_5A4B14:
mov	al, 1

loc_5A4B16:
mov	esp, ebp
pop	ebp
retn	4
sub_5A49E0 endp

align 10h


; Attributes: bp-based frame

sub_5A4B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
cmp	[ebp+arg_8], 0
jz	short loc_5A4B58
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	unk_155DFFC
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+10h], offset unk_155DF94
mov	ecx, [ebp+var_8]
add	ecx, 68h
call	sub_403170
or	[ebp+var_4], 1

loc_5A4B58:
push	0
push	0
mov	ecx, [ebp+var_8]
call	sub_43FED0
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
mov	dword ptr [edx+ecx], offset off_155DFF8
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_5B4C60
mov	edx, [ebp+var_8]
add	edx, 18h
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4031E0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5A4B20 endp

align 10h


; Attributes: bp-based frame

sub_5A4BB0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5AA5C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AA720
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 90h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5A4C33

loc_5A4C2A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5A4C33:
cmp	[ebp+var_40], 0
jle	short loc_5A4C62
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A7960
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 90h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 90h
mov	[ebp+var_3C], eax
jmp	short loc_5A4C2A

loc_5A4C62:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5A4C8C
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A7960
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 90h
mov	[ebp+var_C], ecx
jmp	short loc_5A4CE6

loc_5A4C8C:
mov	edx, [ebp+arg_C]
imul	edx, 90h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 90h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5A4CC8

loc_5A4CB4:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 90h
mov	[ebp+var_68], eax

loc_5A4CC8:
cmp	[ebp+var_6C], 0
jle	short loc_5A4CE0
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5A7960
add	esp, 8
jmp	short loc_5A4CB4

loc_5A4CE0:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A4CE6:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A4D83
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 90h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5A4D45

loc_5A4D3C:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A4D45:
cmp	[ebp+var_80], 0
jle	short loc_5A4D7D
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5A7960
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 90h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 90h
mov	[ebp+var_7C], eax
jmp	short loc_5A4D3C

loc_5A4D7D:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A4D83:
mov	ecx, [ebp+var_CC]
call	sub_5AA6A0
mov	edx, [ebp+var_4]
imul	edx, 90h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A4BB0 endp

align 10h


; Attributes: bp-based frame

sub_5A4DD0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5AA7A0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AA920
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5A4E53

loc_5A4E4A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5A4E53:
cmp	[ebp+var_40], 0
jle	short loc_5A4E7D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5C98A0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 58h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 58h
mov	[ebp+var_3C], eax
jmp	short loc_5A4E4A

loc_5A4E7D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5A4EA4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5C98A0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 58h
mov	[ebp+var_C], ecx
jmp	short loc_5A4EF9

loc_5A4EA4:
mov	edx, [ebp+arg_C]
imul	edx, 58h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5A4EDB

loc_5A4EC9:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 58h
mov	[ebp+var_68], eax

loc_5A4EDB:
cmp	[ebp+var_6C], 0
jle	short loc_5A4EF3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5C98A0
add	esp, 8
jmp	short loc_5A4EC9

loc_5A4EF3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A4EF9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A4F91
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5A4F58

loc_5A4F4F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A4F58:
cmp	[ebp+var_80], 0
jle	short loc_5A4F8B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5C98A0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 58h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 58h
mov	[ebp+var_7C], eax
jmp	short loc_5A4F4F

loc_5A4F8B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A4F91:
mov	ecx, [ebp+var_CC]
call	sub_5AA880
mov	edx, [ebp+var_4]
imul	edx, 58h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A4DD0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A4FE0(void	*)
sub_5A4FE0 proc	near

var_68=	dword ptr -68h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx

loc_5A4FE9:
cmp	[ebp+arg_0], 0
jz	short loc_5A5039
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_68]
call	sub_5A4FE0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A80B0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5A5031
mov	edx, 1
imul	edx, 70h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A5031:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A4FE9

loc_5A5039:
mov	esp, ebp
pop	ebp
retn	4
sub_5A4FE0 endp

align 10h


; Attributes: bp-based frame

sub_5A5040 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A505C:
cmp	[ebp+var_10], 0
jz	short loc_5A50D3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A50A2
jb	short loc_5A5099
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A50A2

loc_5A5099:
mov	[ebp+var_64], 1
jmp	short loc_5A50A9

loc_5A50A2:
mov	[ebp+var_64], 0

loc_5A50A9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5A50C2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5A50CB

loc_5A50C2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5A50CB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5A505C

loc_5A50D3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A5175
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5A5166
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5BA050
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5A521B
jmp	short loc_5A5175

loc_5A5166:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A5175:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5A51AF
jb	short loc_5A51A6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5A51AF

loc_5A51A6:
mov	[ebp+var_78], 1
jmp	short loc_5A51B6

loc_5A51AF:
mov	[ebp+var_78], 0

loc_5A51B6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5A5200
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5BA050
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5A521B

loc_5A5200:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5A521B:
mov	esp, ebp
pop	ebp
retn	8
sub_5A5040 endp

align 10h


; Attributes: bp-based frame

sub_5A5230 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BA1C0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5A5230 endp

align 10h


; Attributes: bp-based frame

sub_5A5260 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_51], al
movzx	ecx, [ebp+var_51]
test	ecx, ecx
jnz	short loc_5A52F1
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_50]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5A52F1
mov	[ebp+var_58], 0
jmp	short loc_5A52F8

loc_5A52F1:
mov	[ebp+var_58], 1

loc_5A52F8:
mov	cl, byte ptr [ebp+var_58]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_5A5312
and	[ebp+var_2C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)

loc_5A5312:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A536D
mov	[ebp+var_20], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5B7C30
lea	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_5A536D:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5A5260 endp

align 10h


; Attributes: bp-based frame

sub_5A5380 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 74h
mov	[ebp+var_68], ecx
mov	[ebp+var_44], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5E9440
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_68]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_4C]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_69], al
movzx	ecx, [ebp+var_69]
test	ecx, ecx
jnz	short loc_5A5450
or	[ebp+var_44], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_68]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
mov	[ebp+var_70], edx
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_74]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5A5438
jb	short loc_5A542F
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_74]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5A5438

loc_5A542F:
mov	[ebp+var_78], 1
jmp	short loc_5A543F

loc_5A5438:
mov	[ebp+var_78], 0

loc_5A543F:
movzx	ecx, byte ptr [ebp+var_78]
test	ecx, ecx
jnz	short loc_5A5450
mov	[ebp+var_7C], 0
jmp	short loc_5A5457

loc_5A5450:
mov	[ebp+var_7C], 1

loc_5A5457:
mov	dl, byte ptr [ebp+var_7C]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_44]
and	eax, 1
jz	short loc_5A5477
and	[ebp+var_44], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A5477:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5A54D8
mov	[ebp+var_38], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_34], eax
mov	ecx, [edx+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_2C], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
push	ecx
mov	[ebp+var_60], esp
mov	ecx, [ebp+var_64]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	edx, [ebp+var_40]
push	edx
mov	ecx, [ebp+var_68]
call	sub_5B8740
lea	eax, [ebp+var_40]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
mov	edx, [ecx]
mov	[ebp+var_10], edx

loc_5A54D8:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A5380 endp

align 10h


; Attributes: bp-based frame

sub_5A54F0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5AA9E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AAB40
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 98h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5A5573

loc_5A556A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5A5573:
cmp	[ebp+var_40], 0
jle	short loc_5A55A2
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_57DC10
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 98h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 98h
mov	[ebp+var_3C], eax
jmp	short loc_5A556A

loc_5A55A2:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5A55CC
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_57DC10
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 98h
mov	[ebp+var_C], ecx
jmp	short loc_5A5626

loc_5A55CC:
mov	edx, [ebp+arg_C]
imul	edx, 98h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 98h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5A5608

loc_5A55F4:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 98h
mov	[ebp+var_68], eax

loc_5A5608:
cmp	[ebp+var_6C], 0
jle	short loc_5A5620
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_57DC10
add	esp, 8
jmp	short loc_5A55F4

loc_5A5620:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5A5626:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5A56C3
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 98h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5A5685

loc_5A567C:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5A5685:
cmp	[ebp+var_80], 0
jle	short loc_5A56BD
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_57DC10
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 98h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 98h
mov	[ebp+var_7C], eax
jmp	short loc_5A567C

loc_5A56BD:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5A56C3:
mov	ecx, [ebp+var_CC]
call	sub_5AAAC0
mov	edx, [ebp+var_4]
imul	edx, 98h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5A54F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A5710(void	*)
sub_5A5710 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx

loc_5A5719:
cmp	[ebp+arg_0], 0
jz	short loc_5A5769
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_14]
call	sub_5A5710
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A84E0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5A5761
mov	edx, 1
imul	edx, 5Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A5761:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A5719

loc_5A5769:
mov	esp, ebp
pop	ebp
retn	4
sub_5A5710 endp

align 10h


; Attributes: bp-based frame

sub_5A5770 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5A5781:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_5A57C3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5A7A20
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_5A57C1
mov	ecx, 1
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A57C1:
jmp	short loc_5A5781

loc_5A57C3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_5A5770 endp

align 10h


; Attributes: bp-based frame

sub_5A57E0 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_109= byte ptr -109h
var_108= dword ptr -108h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	byte ptr -0BCh
var_B4=	byte ptr -0B4h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 108h
mov	[ebp+var_108], ecx
mov	[ebp+var_C0], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_108]
call	sub_5DE010
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_C4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_108]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_CC]
mov	[ebp+var_C8], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_C8]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_CC]
setz	al
mov	[ebp+var_109], al
movzx	ecx, [ebp+var_109]
test	ecx, ecx
jnz	short loc_5A58BB
or	[ebp+var_C0], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_D0], edx
mov	eax, [ebp+var_108]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_D0]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5A58BB
mov	[ebp+var_110], 0
jmp	short loc_5A58C5

loc_5A58BB:
mov	[ebp+var_110], 1

loc_5A58C5:
mov	cl, byte ptr [ebp+var_110]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_C0]
and	edx, 1
jz	short loc_5A58EE
and	[ebp+var_C0], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5A58EE:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5A5994
lea	ecx, [ebp+var_B4]
call	sub_58C180
mov	[ebp+var_E4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_E4]
push	eax
lea	ecx, [ebp+var_68]
call	sub_5AAE00
lea	ecx, [ebp+var_F4]
mov	[ebp+var_E8], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_E8]
call	sub_4046E0
lea	edx, [ebp+var_6C]
push	edx
push	ecx
mov	[ebp+var_F0], esp
mov	ecx, [ebp+var_F4]
mov	eax, [ebp+var_F0]
call	sub_4046E0
lea	eax, [ebp+var_BC]
push	eax
mov	ecx, [ebp+var_108]
call	sub_5BA390
lea	ecx, [ebp+var_BC]
mov	[ebp+var_114], ecx
mov	edx, [ebp+var_114]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_68]
call	sub_58C410
lea	ecx, [ebp+var_B4]
call	sub_58C410

loc_5A5994:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A57E0 endp

align 10h


; Attributes: bp-based frame

sub_5A59B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_9], al
mov	cl, [ebp+var_9]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 8
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+var_14]
add	edx, 4
mov	[ebp+var_10], edx
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5BA860
add	esp, 18h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5A59B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A5A10(void	*)
sub_5A5A10 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5A5A19:
cmp	[ebp+arg_0], 0
jz	short loc_5A5A62
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5A5A10
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_5A5A5A
mov	edx, 1
imul	edx, 88h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A5A5A:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A5A19

loc_5A5A62:
mov	esp, ebp
pop	ebp
retn	4
sub_5A5A10 endp

align 10h


; Attributes: bp-based frame

sub_5A5A70 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A5A8C:
cmp	[ebp+var_10], 0
jz	short loc_5A5AD6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A5AC5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5A5ACE

loc_5A5AC5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5A5ACE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5A5A8C

loc_5A5AD6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A5B78
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5A5B69
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5BA920
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5A5BF1
jmp	short loc_5A5B78

loc_5A5B69:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A5B78:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5A5BD6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5BA920
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5A5BF1

loc_5A5BD6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5A5BF1:
mov	esp, ebp
pop	ebp
retn	8
sub_5A5A70 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A5C00(void	*)
sub_5A5C00 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5A5C09:
cmp	[ebp+arg_0], 0
jz	short loc_5A5C4F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5A5C00
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_5A5C47
mov	edx, 1
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A5C47:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A5C09

loc_5A5C4F:
mov	esp, ebp
pop	ebp
retn	4
sub_5A5C00 endp

align 10h


; Attributes: bp-based frame

sub_5A5C60 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A5C7C:
cmp	[ebp+var_10], 0
jz	short loc_5A5CC7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A5CB6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5A5CBF

loc_5A5CB6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5A5CBF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5A5C7C

loc_5A5CC7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A5D69
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5A5D5A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5BAB40
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5A5DE3
jmp	short loc_5A5D69

loc_5A5D5A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A5D69:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5A5DC8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5BAB40
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5A5DE3

loc_5A5DC8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5A5DE3:
mov	esp, ebp
pop	ebp
retn	8
sub_5A5C60 endp

align 10h


; Attributes: bp-based frame

sub_5A5DF0 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A5E0C:
cmp	[ebp+var_10], 0
jz	short loc_5A5E90
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_5A5E35
mov	ecx, [ebp+var_34]
movzx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_5A5E5C

loc_5A5E35:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+var_34]
movzx	eax, byte ptr [edx]
cmp	ecx, eax
jnz	short loc_5A5E53
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_34]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jl	short loc_5A5E5C

loc_5A5E53:
mov	[ebp+var_5C], 0
jmp	short loc_5A5E63

loc_5A5E5C:
mov	[ebp+var_5C], 1

loc_5A5E63:
mov	cl, byte ptr [ebp+var_5C]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5A5E7C
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_60], ecx
jmp	short loc_5A5E85

loc_5A5E7C:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_60], eax

loc_5A5E85:
mov	ecx, [ebp+var_60]
mov	[ebp+var_10], ecx
jmp	loc_5A5E0C

loc_5A5E90:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5A5F32
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_61], cl
movzx	edx, [ebp+var_61]
test	edx, edx
jz	short loc_5A5F23
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5BAC80
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5A5FE2
jmp	short loc_5A5F32

loc_5A5F23:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A5F32:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_5A5F4F
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_5A5F76

loc_5A5F4F:
mov	ecx, [ebp+var_4C]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
cmp	edx, ecx
jnz	short loc_5A5F6D
mov	edx, [ebp+var_4C]
mov	eax, [ebp+arg_4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jl	short loc_5A5F76

loc_5A5F6D:
mov	[ebp+var_68], 0
jmp	short loc_5A5F7D

loc_5A5F76:
mov	[ebp+var_68], 1

loc_5A5F7D:
mov	dl, byte ptr [ebp+var_68]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5A5FC7
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5BAC80
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5A5FE2

loc_5A5FC7:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5A5FE2:
mov	esp, ebp
pop	ebp
retn	8
sub_5A5DF0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A5FF0(void	*)
sub_5A5FF0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5A5FF9:
cmp	[ebp+arg_0], 0
jz	short loc_5A6049
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5A5FF0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A8120
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5A6041
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A6041:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A5FF9

loc_5A6049:
mov	esp, ebp
pop	ebp
retn	4
sub_5A5FF0 endp

align 10h


; Attributes: bp-based frame

sub_5A6050 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A606C:
cmp	[ebp+var_10], 0
jz	short loc_5A60B6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A60A5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5A60AE

loc_5A60A5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5A60AE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5A606C

loc_5A60B6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A6158
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5A6149
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5BADF0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5A61D1
jmp	short loc_5A6158

loc_5A6149:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A6158:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5A61B6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5BADF0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5A61D1

loc_5A61B6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5A61D1:
mov	esp, ebp
pop	ebp
retn	8
sub_5A6050 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A61E0(void	*)
sub_5A61E0 proc	near

var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5A61E9:
cmp	[ebp+arg_0], 0
jz	short loc_5A622F
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5A61E0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
xor	ecx, ecx
mov	[ebp+var_5], cl
cmp	[ebp+arg_0], 0
jz	short loc_5A6227
mov	edx, 1
imul	edx, 78h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A6227:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A61E9

loc_5A622F:
mov	esp, ebp
pop	ebp
retn	4
sub_5A61E0 endp

align 10h


; Attributes: bp-based frame

sub_5A6240 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5A6258:
cmp	[ebp+var_8], 0
jz	short loc_5A629D
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5A6292
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5A629B

loc_5A6292:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5A629B:
jmp	short loc_5A6258

loc_5A629D:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_5BAF30
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5A6240 endp



; Attributes: bp-based frame

sub_5A62C0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5A62D8:
cmp	[ebp+var_8], 0
jz	short loc_5A6330
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[edx]
comiss	xmm0, dword ptr	[eax]
jbe	short loc_5A6305
mov	[ebp+var_1C], 1
jmp	short loc_5A630C

loc_5A6305:
mov	[ebp+var_1C], 0

loc_5A630C:
mov	cl, byte ptr [ebp+var_1C]
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_5A6325
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5A632E

loc_5A6325:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5A632E:
jmp	short loc_5A62D8

loc_5A6330:
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5BB070
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5A62C0 endp

align 10h


; Attributes: bp-based frame

sub_5A6360 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_504FC0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_5A6360 endp



; Attributes: bp-based frame

sub_5A63B0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5A63C1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_5A6403
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5A7B00
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_5A6401
mov	ecx, 1
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A6401:
jmp	short loc_5A63C1

loc_5A6403:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_5A63B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A6420(void	*)
sub_5A6420 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5A6429:
cmp	[ebp+arg_0], 0
jz	short loc_5A6479
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5A6420
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5F07D0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5A6471
mov	edx, 1
imul	edx, 50h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A6471:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A6429

loc_5A6479:
mov	esp, ebp
pop	ebp
retn	4
sub_5A6420 endp

align 10h


; Attributes: bp-based frame

sub_5A6480 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5A6498:
cmp	[ebp+var_8], 0
jz	short loc_5A64DC
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5A64D1
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5A64DA

loc_5A64D1:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5A64DA:
jmp	short loc_5A6498

loc_5A64DC:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_5BB1C0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5A6480 endp

align 10h


; Attributes: bp-based frame

sub_5A6500 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5A6511:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_5A6553
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5A7B40
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_5A6551
mov	ecx, 1
imul	ecx, 18h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A6551:
jmp	short loc_5A6511

loc_5A6553:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_5A6500 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A6570(void	*)
sub_5A6570 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5A6579:
cmp	[ebp+arg_0], 0
jz	short loc_5A65C9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5A6570
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A7B70
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5A65C1
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A65C1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A6579

loc_5A65C9:
mov	esp, ebp
pop	ebp
retn	4
sub_5A6570 endp

align 10h


; Attributes: bp-based frame

sub_5A65D0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A65EC:
cmp	[ebp+var_10], 0
jz	short loc_5A6636
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5A6625
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5A662E

loc_5A6625:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5A662E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5A65EC

loc_5A6636:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5A66D8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5A66C9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5BB300
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5A6751
jmp	short loc_5A66D8

loc_5A66C9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A66D8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5A6736
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5BB300
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5A6751

loc_5A6736:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5A6751:
mov	esp, ebp
pop	ebp
retn	8
sub_5A65D0 endp

align 10h


; Attributes: bp-based frame

sub_5A6760 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DD=	byte ptr -0DDh
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	byte ptr -0ACh
var_A1=	byte ptr -0A1h
var_A0=	byte ptr -0A0h
var_85=	byte ptr -85h
var_84=	byte ptr -84h
var_6C=	byte ptr -6Ch
var_54=	byte ptr -54h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A6760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	[ebp+var_B0], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_5C98F0
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_DC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_BC]
mov	[ebp+var_B8], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_B8]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_BC]
setz	al
mov	[ebp+var_DD], al
movzx	ecx, [ebp+var_DD]
test	ecx, ecx
jnz	short loc_5A685E
or	[ebp+var_B0], 1
lea	ecx, [ebp+var_39]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_38]
call	sub_407D30
or	[ebp+var_B0], 2
or	[ebp+var_B0], 4
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_C0], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_DC]
call	sub_444490
mov	eax, [ebp+var_C0]
lea	ecx, [ebp+var_38]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5A685E
mov	[ebp+var_E4], 0
jmp	short loc_5A6868

loc_5A685E:
mov	[ebp+var_E4], 1

loc_5A6868:
mov	al, byte ptr [ebp+var_E4]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_B0]
and	ecx, 4
jz	short loc_5A688B
and	[ebp+var_B0], 0FFFFFFFBh
lea	ecx, [ebp+var_1D]
call	nullsub_1

loc_5A688B:
mov	edx, [ebp+var_B0]
and	edx, 2
jz	short loc_5A68A5
and	[ebp+var_B0], 0FFFFFFFDh
lea	ecx, [ebp+var_38]
call	sub_407910

loc_5A68A5:
mov	eax, [ebp+var_B0]
and	eax, 1
jz	short loc_5A68BF
and	[ebp+var_B0], 0FFFFFFFEh
lea	ecx, [ebp+var_39]
call	nullsub_1

loc_5A68BF:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5A69E0
lea	ecx, [ebp+var_A1]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_A0]
call	sub_407D30
lea	ecx, [ebp+var_85]
call	sub_401EF0
push	eax
lea	ecx, [ebp+var_84]
call	sub_4022A0
mov	[ebp+var_C8], eax
lea	eax, [ebp+var_A0]
push	eax
lea	ecx, [ebp+var_6C]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_C8]
push	ecx
lea	ecx, [ebp+var_54]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	edx, [ebp+var_D8]
mov	[ebp+var_CC], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_CC]
call	sub_4046E0
lea	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_D4], esp
mov	ecx, [ebp+var_D8]
mov	eax, [ebp+var_D4]
call	sub_4046E0
lea	ecx, [ebp+var_AC]
push	ecx
mov	ecx, [ebp+var_DC]
call	sub_44C2A0
lea	edx, [ebp+var_AC]
mov	[ebp+var_E8], edx
mov	eax, [ebp+var_E8]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 3
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_54]
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_6C]
call	sub_407910
lea	ecx, [ebp+var_84]
call	sub_407910
lea	ecx, [ebp+var_85]
call	nullsub_1
lea	ecx, [ebp+var_A0]
call	sub_407910
lea	ecx, [ebp+var_A1]
call	nullsub_1

loc_5A69E0:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5A6760 endp

align 10h


; Attributes: bp-based frame

sub_5A6A00 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5A6A11:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_5A6A53
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5A8180
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_5A6A51
mov	ecx, 1
shl	ecx, 5
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A6A51:
jmp	short loc_5A6A11

loc_5A6A53:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_5A6A00 endp

align 10h


; Attributes: bp-based frame

sub_5A6A70 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5A6A81:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_5A6AC3
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+var_8], 0
jz	short loc_5A6AC1
mov	ecx, 1
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A6AC1:
jmp	short loc_5A6A81

loc_5A6AC3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_5A6A70 endp

align 10h


; Attributes: bp-based frame

sub_5A6AE0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AB290
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5A6B36
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5A6AE0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5A6B36:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5A6B45:
cmp	[ebp+arg_0], 0
jz	short loc_5A6BB2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AB290
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5A6BA1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5A6AE0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5A6BA1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5A6B45

loc_5A6BB2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5A6AE0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5A6BC0(void	*)
sub_5A6BC0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5A6BC9:
cmp	[ebp+arg_0], 0
jz	short loc_5A6C19
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5A6BC0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5A8180
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5A6C11
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5A6C11:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5A6BC9

loc_5A6C19:
mov	esp, ebp
pop	ebp
retn	4
sub_5A6BC0 endp

align 10h


; Attributes: bp-based frame

sub_5A6C20 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5A6C3C:
cmp	[ebp+var_10], 0
jz	short loc_5A6C89
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
mov	edx, [eax]
mov	ecx, [ebp+arg_4]
mov	eax, [edx+10h]
call	eax
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5A6C78
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_5C], eax
jmp	short loc_5A6C81

loc_5A6C78:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_5C], edx

loc_5A6C81:
mov	eax, [ebp+var_5C]
mov	[ebp+var_10], eax
jmp	short loc_5A6C3C

loc_5A6C89:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_5A6D2B
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_5D], al
movzx	ecx, [ebp+var_5D]
test	ecx, ecx
jz	short loc_5A6D1C
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_58]
call	sub_5BB440
mov	[ebp+var_48], eax
mov	eax, [ebp+var_48]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_5A6DA7
jmp	short loc_5A6D2B

loc_5A6D1C:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5A6D2B:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+10h]
call	eax
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_5A6D8C
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_58]
call	sub_5BB440
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5A6DA7

loc_5A6D8C:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_5A6DA7:
mov	esp, ebp
pop	ebp
retn	8
sub_5A6C20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A6DB0(wchar_t *DstBuf, size_t MaxCount, wchar_t *Format, char)
sub_5A6DB0 proc	near

ArgList= dword ptr -4
DstBuf=	dword ptr  8
MaxCount= dword	ptr  0Ch
Format=	dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_C]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
mov	eax, [ebp+MaxCount]
push	eax		; MaxCount
push	201h		; SizeInWords
mov	ecx, [ebp+DstBuf]
push	ecx		; DstBuf
call	__vsnwprintf_s
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5A6DB0 endp

align 10h


; Attributes: bp-based frame

sub_5A6DE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 50h
push	0
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
call	sub_5BB5F0
add	esp, 24h
mov	esp, ebp
pop	ebp
retn
sub_5A6DE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A6E40(void *, int)
sub_5A6E40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	68h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A6E84
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD540
mov	[ebp+var_C], eax
jmp	short loc_5A6E8B

loc_5A6E84:
mov	[ebp+var_C], 0

loc_5A6E8B:
mov	esp, ebp
pop	ebp
retn
sub_5A6E40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A6E90(void *, int)
sub_5A6E90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	50h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A6ED4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5870E0
mov	[ebp+var_C], eax
jmp	short loc_5A6EDB

loc_5A6ED4:
mov	[ebp+var_C], 0

loc_5A6EDB:
mov	esp, ebp
pop	ebp
retn
sub_5A6E90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A6EE0(void *, int)
sub_5A6EE0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A6F24
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD6D0
mov	[ebp+var_10], eax
jmp	short loc_5A6F2B

loc_5A6F24:
mov	[ebp+var_10], 0

loc_5A6F2B:
mov	esp, ebp
pop	ebp
retn
sub_5A6EE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A6F30(void *, int)
sub_5A6F30 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	68h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A6F74
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_536DD0
mov	[ebp+var_3C], eax
jmp	short loc_5A6F7B

loc_5A6F74:
mov	[ebp+var_3C], 0

loc_5A6F7B:
mov	esp, ebp
pop	ebp
retn
sub_5A6F30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A6F80(void *, int)
sub_5A6F80 proc	near

var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A6FD3
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_4694E0
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_34], eax
jmp	short loc_5A6FDA

loc_5A6FD3:
mov	[ebp+var_34], 0

loc_5A6FDA:
mov	esp, ebp
pop	ebp
retn
sub_5A6F80 endp

align 10h


; Attributes: bp-based frame

sub_5A6FE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BB700
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A6FE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7010(void *, int)
sub_5A7010 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0A8h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7057
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD740
mov	[ebp+var_10], eax
jmp	short loc_5A705E

loc_5A7057:
mov	[ebp+var_10], 0

loc_5A705E:
mov	esp, ebp
pop	ebp
retn
sub_5A7010 endp

align 10h


; Attributes: bp-based frame

sub_5A7070 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
lea	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
call	sub_402EB0
lea	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
call	sub_4046E0
lea	eax, [ebp+var_20]
lea	ecx, [ebp+var_8]
call	sub_402EB0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_20]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5A70B6
lea	ecx, [ebp+arg_4]
call	nullsub_1
jmp	loc_5A7142

loc_5A70B6:
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_C]
call	sub_4046E0

loc_5A70C1:
lea	eax, [ebp+var_C]
call	sub_405E90
lea	eax, [ebp+var_24]
lea	ecx, [ebp+var_8]
call	sub_402EB0
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5A713A
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_40A9E0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5A712C
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_30]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_436B00
jmp	short loc_5A7132

loc_5A712C:
mov	eax, [ebp+var_C]
mov	[ebp+var_4], eax

loc_5A7132:
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
jmp	short loc_5A70C1

loc_5A713A:
lea	ecx, [ebp+arg_4]
call	nullsub_1

loc_5A7142:
mov	esp, ebp
pop	ebp
retn
sub_5A7070 endp

align 10h


; Attributes: bp-based frame

sub_5A7150 proc	near

var_2AC= dword ptr -2ACh
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_219= byte ptr -219h
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= byte ptr -210h
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= byte ptr -200h
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 2ACh
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jz	short loc_5A716F
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jnz	short loc_5A717C

loc_5A716F:
lea	ecx, [ebp+arg_4]
call	nullsub_1
jmp	loc_5A737F

loc_5A717C:
lea	edx, [ebp+var_210]
push	edx
call	sub_402710
lea	ecx, [ebp+var_219]
call	nullsub_1
mov	[ebp+var_204], 40h
lea	eax, [ebp+var_210]
push	eax
lea	ecx, [ebp+var_200]
call	sub_5AAC70
mov	[ebp+var_208], 0

loc_5A71B9:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+arg_0]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5A72F7
push	ecx
mov	eax, esp
mov	ecx, [ebp+arg_0]
call	sub_402EB0
mov	edx, [ebp+arg_0]
push	edx
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_210]
call	sub_402EB0
lea	ecx, [ebp+var_210]
call	sub_5A94E0
mov	[ebp+var_214], 0

loc_5A7203:
mov	eax, [ebp+var_214]
cmp	eax, [ebp+var_208]
jge	loc_5A72A9
mov	ecx, [ebp+var_214]
lea	edx, [ebp+ecx*8+var_200]
mov	[ebp+var_258], edx
mov	eax, [ebp+var_258]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+var_258]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5A72A9
movzx	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_210]
push	edx
mov	eax, [ebp+var_214]
lea	ecx, [ebp+eax*8+var_200]
push	ecx
call	sub_5BB740
add	esp, 0Ch
mov	edx, [ebp+var_214]
mov	[ebp+var_25C], edx
mov	eax, [ebp+var_25C]
lea	ecx, [ebp+eax*8+var_200]
mov	[ebp+var_2AC], ecx
mov	edx, [ebp+var_2AC]
push	edx
lea	ecx, [ebp+var_210]
call	sub_5A93E0
mov	eax, [ebp+var_214]
add	eax, 1
mov	[ebp+var_214], eax
jmp	loc_5A7203

loc_5A72A9:
mov	ecx, [ebp+var_214]
lea	edx, [ebp+ecx*8+var_200]
push	edx
lea	ecx, [ebp+var_210]
call	sub_5A93E0
mov	eax, [ebp+var_214]
cmp	eax, [ebp+var_208]
jnz	short loc_5A72F2
mov	ecx, [ebp+var_208]
add	ecx, 1
mov	[ebp+var_208], ecx
cmp	[ebp+var_208], 40h
jl	short loc_5A72F2
push	offset aListSort ; "list::sort"
call	sub_77ED00

loc_5A72F2:
jmp	loc_5A71B9

loc_5A72F7:
mov	[ebp+var_218], 1
jmp	short loc_5A7312

loc_5A7303:
mov	edx, [ebp+var_218]
add	edx, 1
mov	[ebp+var_218], edx

loc_5A7312:
mov	eax, [ebp+var_218]
cmp	eax, [ebp+var_208]
jge	short loc_5A734B
movzx	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_218]
lea	eax, [ebp+edx*8+var_208]
push	eax
mov	ecx, [ebp+var_218]
lea	edx, [ebp+ecx*8+var_200]
push	edx
call	sub_5BB740
add	esp, 0Ch
jmp	short loc_5A7303

loc_5A734B:
mov	eax, [ebp+var_208]
lea	ecx, [ebp+eax*8+var_208]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_5A93E0
lea	ecx, [ebp+var_200]
call	sub_5AACC0
lea	ecx, [ebp+var_210]
call	sub_402750
lea	ecx, [ebp+arg_4]
call	nullsub_1

loc_5A737F:
mov	esp, ebp
pop	ebp
retn
sub_5A7150 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7390(void *)
sub_5A7390 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 50h
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A73B7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A73B7:
mov	esp, ebp
pop	ebp
retn
sub_5A7390 endp

align 10h


; Attributes: bp-based frame

sub_5A73C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BB9E0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A73C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A73F0(void *, int)
sub_5A73F0 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	70h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7443
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_536DD0
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+68h]
mov	[eax+68h], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_3C], eax
jmp	short loc_5A744A

loc_5A7443:
mov	[ebp+var_3C], 0

loc_5A744A:
mov	esp, ebp
pop	ebp
retn
sub_5A73F0 endp

align 10h


; Attributes: bp-based frame

sub_5A7450 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBA20
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A7450 endp

align 10h


; Attributes: bp-based frame

sub_5A7480 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBAD0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A7480 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A74B0(void *, int)
sub_5A74B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7507
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5A750E

loc_5A7507:
mov	[ebp+var_C], 0

loc_5A750E:
mov	esp, ebp
pop	ebp
retn
sub_5A74B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7520(void *, int)
sub_5A7520 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7583
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5A756F
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA80

loc_5A756F:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5A758A

loc_5A7583:
mov	[ebp+var_C], 0

loc_5A758A:
mov	esp, ebp
pop	ebp
retn
sub_5A7520 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7590(void *)
sub_5A7590 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A7590
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A75DA
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A75DA:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A7590 endp

align 10h


; Attributes: bp-based frame

sub_5A75F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBB10
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A75F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7620(void *, int)
sub_5A7620 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7664
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD850
mov	[ebp+var_10], eax
jmp	short loc_5A766B

loc_5A7664:
mov	[ebp+var_10], 0

loc_5A766B:
mov	esp, ebp
pop	ebp
retn
sub_5A7620 endp

align 10h


; Attributes: bp-based frame

sub_5A7670 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 20h
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 8
mov	[ebp+var_C], ecx
sub	esp, 8
mov	[ebp+var_8], esp
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx+4], eax
push	0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
sub	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C5570
add	esp, 18h
mov	esp, ebp
pop	ebp
retn
sub_5A7670 endp

align 10h


; Attributes: bp-based frame

sub_5A76C0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
movzx	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5BBB50
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5A76C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A76F0(void *, int)
sub_5A76F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	80h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7737
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5895A0
mov	[ebp+var_C], eax
jmp	short loc_5A773E

loc_5A7737:
mov	[ebp+var_C], 0

loc_5A773E:
mov	esp, ebp
pop	ebp
retn
sub_5A76F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7750(void *, int)
sub_5A7750 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A779A
mov	esi, [ebp+arg_4]
mov	ecx, 8
mov	edi, [ebp+var_8]
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5A77A1

loc_5A779A:
mov	[ebp+var_C], 0

loc_5A77A1:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5A7750 endp

align 10h


; Attributes: bp-based frame

sub_5A77B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBBD0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A77B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A77E0(void *, int)
sub_5A77E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	64h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7824
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD5D0
mov	[ebp+var_C], eax
jmp	short loc_5A782B

loc_5A7824:
mov	[ebp+var_C], 0

loc_5A782B:
mov	esp, ebp
pop	ebp
retn
sub_5A77E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7830(void *, int)
sub_5A7830 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	60h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7874
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD8D0
mov	[ebp+var_14], eax
jmp	short loc_5A787B

loc_5A7874:
mov	[ebp+var_14], 0

loc_5A787B:
mov	esp, ebp
pop	ebp
retn
sub_5A7830 endp

align 10h


; Attributes: bp-based frame

sub_5A7880 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBC10
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A7880 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A78B0(void *, int)
sub_5A78B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	7Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A78F4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD960
mov	[ebp+var_C], eax
jmp	short loc_5A78FB

loc_5A78F4:
mov	[ebp+var_C], 0

loc_5A78FB:
mov	esp, ebp
pop	ebp
retn
sub_5A78B0 endp

align 10h


; Attributes: bp-based frame

sub_5A7900 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBC80
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A7900 endp

align 10h


; Attributes: bp-based frame

sub_5A7930 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBCF0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A7930 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7960(void *, int)
sub_5A7960 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	90h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A79A7
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD9B0
mov	[ebp+var_C], eax
jmp	short loc_5A79AE

loc_5A79A7:
mov	[ebp+var_C], 0

loc_5A79AE:
mov	esp, ebp
pop	ebp
retn
sub_5A7960 endp

align 10h


; Attributes: bp-based frame

sub_5A79C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBD60
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A79C0 endp

align 10h


; Attributes: bp-based frame

sub_5A79F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5BBDA0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5A79F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7A20(void *)
sub_5A7A20 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A7A20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+arg_0]
call	sub_439A20
mov	byte ptr [ebp+var_4], 1
call	nullsub_1
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7A85
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7A85:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A7A20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7AA0(void *, int)
sub_5A7AA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7AEB
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_8]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5A7AF2

loc_5A7AEB:
mov	[ebp+var_C], 0

loc_5A7AF2:
mov	esp, ebp
pop	ebp
retn
sub_5A7AA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7B00(void *)
sub_5A7B00 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_429100
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7B2F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7B2F:
mov	esp, ebp
pop	ebp
retn
sub_5A7B00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7B40(void *)
sub_5A7B40 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7B64
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7B64:
mov	esp, ebp
pop	ebp
retn
sub_5A7B40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7B70(void *)
sub_5A7B70 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7B97
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7B97:
mov	esp, ebp
pop	ebp
retn
sub_5A7B70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7BA0(void *)
sub_5A7BA0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7BC7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7BC7:
mov	esp, ebp
pop	ebp
retn
sub_5A7BA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7BD0(void *)
sub_5A7BD0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7BF7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7BF7:
mov	esp, ebp
pop	ebp
retn
sub_5A7BD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7C00(void *)
sub_5A7C00 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_543A90
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7C26
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7C26:
mov	esp, ebp
pop	ebp
retn
sub_5A7C00 endp

align 10h


; Attributes: bp-based frame

sub_5A7C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_8], 0
jnz	short loc_5A7C4B
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
jmp	short loc_5A7C5C

loc_5A7C4B:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx

loc_5A7C5C:
mov	edx, [ebp+arg_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5A7C30 endp



; Attributes: bp-based frame

sub_5A7C70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_C]
sar	edx, 2
mov	[ebp+var_8], edx
jmp	short loc_5A7C99

loc_5A7C90:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_5A7C99:
cmp	[ebp+var_8], 0
jle	short loc_5A7CED
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_5A7CD9
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_5A7CBD
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA90

loc_5A7CBD:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_5A7CD9
mov	ecx, [ebp+var_10]
mov	ecx, [ecx]
call	sub_40AA80

loc_5A7CD9:
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_5A7C90

loc_5A7CED:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5A7C70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7D00(void *)
sub_5A7D00 proc	near

var_58=	dword ptr -58h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 10h
call	sub_58FAB0
mov	ecx, [ebp+var_58]
call	sub_429100
xor	edx, edx
and	edx, 1
jz	short loc_5A7D3A
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7D3A:
mov	esp, ebp
pop	ebp
retn
sub_5A7D00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7D40(void *, int)
sub_5A7D40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	80h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A7D9F
mov	esi, [ebp+arg_4]
mov	ecx, 0Ch
mov	edi, [ebp+var_8]
rep movsd
mov	edx, [ebp+arg_4]
add	edx, 30h
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 30h
call	sub_5BE090
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5A7DA6

loc_5A7D9F:
mov	[ebp+var_C], 0

loc_5A7DA6:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5A7D40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7DB0(void *)
sub_5A7DB0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_5853E0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7DD9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7DD9:
mov	esp, ebp
pop	ebp
retn
sub_5A7DB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7DE0(void *)
sub_5A7DE0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A8120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5A7E3A
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7E3A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A7DE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7E50(void *)
sub_5A7E50 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_5BE150
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7E74
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7E74:
mov	esp, ebp
pop	ebp
retn
sub_5A7E50 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7E80(void *)
sub_5A7E80 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7EA7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7EA7:
mov	esp, ebp
pop	ebp
retn
sub_5A7E80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7EB0(void *)
sub_5A7EB0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7ED7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7ED7:
mov	esp, ebp
pop	ebp
retn
sub_5A7EB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7EE0(void *)
sub_5A7EE0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7F12
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7F12:
mov	esp, ebp
pop	ebp
retn
sub_5A7EE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7F20(void *)
sub_5A7F20 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_588AC0
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A7F51
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7F51:
mov	esp, ebp
pop	ebp
retn
sub_5A7F20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7F60(void *)
sub_5A7F60 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A8120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
add	edx, 4
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_14]
call	sub_5935F0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
call	sub_429100
xor	eax, eax
and	eax, 1
jz	short loc_5A7FC3
mov	ecx, [ebp+arg_0]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A7FC3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A7F60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A7FE0(void *, int)
sub_5A7FE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A8031
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5A8038

loc_5A8031:
mov	[ebp+var_C], 0

loc_5A8038:
mov	esp, ebp
pop	ebp
retn
sub_5A7FE0 endp

align 10h


; Attributes: bp-based frame

sub_5A8040 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_38]
call	sub_5C5810
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_528F70
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_34], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5A8040 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A80B0(void *)
sub_5A80B0 proc	near

var_6C=	dword ptr -6Ch
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5BC4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
add	ecx, 20h
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_6C]
add	ecx, 1Ch
call	sub_436CF0
xor	edx, edx
and	edx, 1
jz	short loc_5A810C
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A810C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A80B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A8120(void *)
sub_5A8120 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5A8120
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	ecx, [ebp+var_14]
call	sub_5952C0
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_5A8172
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A8172:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A8120 endp



; Attributes: bp-based frame

; int __cdecl sub_5A8180(void *)
sub_5A8180 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_42B3C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A81A4
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A81A4:
mov	esp, ebp
pop	ebp
retn
sub_5A8180 endp

align 10h


; Attributes: bp-based frame

sub_5A81B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5A81DE

loc_5A81D5:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5A81DE:
cmp	[ebp+var_8], 0
jle	short loc_5A822E
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_10]
call	sub_4023E0
mov	ecx, [ebp+var_C]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_10]
mov	[ecx+28h], edx
mov	[ecx+2Ch], eax
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	cl, [eax+31h]
mov	[edx+31h], cl
mov	edx, [ebp+var_C]
add	edx, 34h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, 34h
mov	[ebp+var_10], eax
jmp	short loc_5A81D5

loc_5A822E:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5A81B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A8240(void *, int)
sub_5A8240 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	94h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A8287
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BDE50
mov	[ebp+var_C], eax
jmp	short loc_5A828E

loc_5A8287:
mov	[ebp+var_C], 0

loc_5A828E:
mov	esp, ebp
pop	ebp
retn
sub_5A8240 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A82A0(void *, int)
sub_5A82A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A82FD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	edx, [edx+0Ch]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5A8304

loc_5A82FD:
mov	[ebp+var_C], 0

loc_5A8304:
mov	esp, ebp
pop	ebp
retn
sub_5A82A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A8310(void *, int)
sub_5A8310 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset unknown_libname_479 ; Microsoft VisualC 2-9/net runtime
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_5A839E
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_14]
add	edx, 4
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax], edx
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_5A8388
mov	ecx, [ebp+var_18]
mov	ecx, [ecx]
call	sub_40AA80

loc_5A8388:
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_14]
mov	[ebp+var_1C], edx
jmp	short loc_5A83A5

loc_5A839E:
mov	[ebp+var_1C], 0

loc_5A83A5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5A8310 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A83C0(void *, int)
sub_5A83C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A8413
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+18h]
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5A841A

loc_5A8413:
mov	[ebp+var_C], 0

loc_5A841A:
mov	esp, ebp
pop	ebp
retn
sub_5A83C0 endp

align 10h


; Attributes: bp-based frame

sub_5A8420 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5A843F

loc_5A8433:
mov	edx, [ebp+var_8]
add	edx, 80h
mov	[ebp+var_8], edx

loc_5A843F:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5A8458
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	ecx, [ebp+var_8]
call	sub_5CA2D0
jmp	short loc_5A8433

loc_5A8458:
mov	esp, ebp
pop	ebp
retn
sub_5A8420 endp

align 10h


; Attributes: bp-based frame

sub_5A8460 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5A847F

loc_5A8473:
mov	edx, [ebp+var_8]
add	edx, 90h
mov	[ebp+var_8], edx

loc_5A847F:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5A8498
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	ecx, [ebp+var_8]
call	sub_5CA370
jmp	short loc_5A8473

loc_5A8498:
mov	esp, ebp
pop	ebp
retn
sub_5A8460 endp

align 10h


; Attributes: bp-based frame

sub_5A84A0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5A84BF

loc_5A84B3:
mov	edx, [ebp+var_8]
add	edx, 98h
mov	[ebp+var_8], edx

loc_5A84BF:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5A84D8
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	ecx, [ebp+var_8]
call	sub_5CA320
jmp	short loc_5A84B3

loc_5A84D8:
mov	esp, ebp
pop	ebp
retn
sub_5A84A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A84E0(void *)
sub_5A84E0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_58C410
xor	ecx, ecx
and	ecx, 1
jz	short loc_5A8509
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5A8509:
mov	esp, ebp
pop	ebp
retn
sub_5A84E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A8510(void *, int)
sub_5A8510 proc	near

var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A8563
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_50FE00
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_34], eax
jmp	short loc_5A856A

loc_5A8563:
mov	[ebp+var_34], 0

loc_5A856A:
mov	esp, ebp
pop	ebp
retn
sub_5A8510 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A8570(void *, int)
sub_5A8570 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A85D9
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5A85BF
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA80

loc_5A85BF:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	edx, [edx+0Ch]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5A85E0

loc_5A85D9:
mov	[ebp+var_C], 0

loc_5A85E0:
mov	esp, ebp
pop	ebp
retn
sub_5A8570 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A85F0(void *, int)
sub_5A85F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A8643
mov	eax, [ebp+arg_4]
mov	esi, [ebp+var_8]
call	sub_42B380
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5A864A

loc_5A8643:
mov	[ebp+var_C], 0

loc_5A864A:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5A85F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5A8650(void *, int)
sub_5A8650 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5A86AF
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+1Ch]
fstp	dword ptr [eax+1Ch]
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5A86B6

loc_5A86AF:
mov	[ebp+var_C], 0

loc_5A86B6:
mov	esp, ebp
pop	ebp
retn
sub_5A8650 endp

align 10h


; Attributes: bp-based frame

sub_5A86C0 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_5853E0
mov	esp, ebp
pop	ebp
retn
sub_5A86C0 endp

align 10h


; Attributes: bp-based frame

sub_5A86E0 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 4
call	sub_403850
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ecx+1Ch], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 24h
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 24h
call	sub_4FFD40
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_0]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_5A86E0 endp

align 10h


; Attributes: bp-based frame

sub_5A8750 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_30]
add	eax, 0Ch
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_5AB190
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_5A8750 endp

align 10h


; Attributes: bp-based frame

sub_5A87A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 4EC4EC4h
mov	[ebp+var_10], 4EC4EC4h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5A87DD
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5A87E3

loc_5A87DD:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5A87E3:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5A87F6
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A87F6:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 4EC4EC4h
mov	[ebp+var_1C], 4EC4EC4h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5A882C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5A8832

loc_5A882C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5A8832:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5A8842
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5A886C

loc_5A8842:
mov	[ebp+var_20], 4EC4EC4h
mov	[ebp+var_24], 4EC4EC4h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5A8860
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5A8866

loc_5A8860:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5A8866:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5A886C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A87A0 endp

align 10h


; Attributes: bp-based frame

sub_5A8880 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DA40
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A88F3
mov	ecx, [ebp+var_4C]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A88F3:
mov	esp, ebp
pop	ebp
retn
sub_5A8880 endp

align 10h


; Attributes: bp-based frame

sub_5A8900 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 4EC4EC4h
jbe	short loc_5A892B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A892B:
cmp	[ebp+arg_0], 0
jz	short loc_5A8962
mov	ecx, [ebp+arg_0]
imul	ecx, 34h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 34h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5A8969

loc_5A8962:
mov	[ebp+var_10], 0

loc_5A8969:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5A8900 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A8980 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_4568F0
cmp	[ebp+arg_0], eax
jbe	short loc_5A89AA
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A89AA:
cmp	[ebp+arg_0], 0
jz	short loc_5A89D0
mov	eax, [ebp+arg_0]
imul	eax, 18h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5A89D7

loc_5A89D0:
mov	[ebp+var_C], 0

loc_5A89D7:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5A8980 endp	; sp-analysis failed



; Attributes: bp-based frame

sub_5A89E0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 2762762h
mov	[ebp+var_10], 2762762h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5A8A1D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5A8A23

loc_5A8A1D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5A8A23:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5A8A36
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A8A36:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 2762762h
mov	[ebp+var_1C], 2762762h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5A8A6C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5A8A72

loc_5A8A6C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5A8A72:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5A8A82
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5A8AAC

loc_5A8A82:
mov	[ebp+var_20], 2762762h
mov	[ebp+var_24], 2762762h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5A8AA0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5A8AA6

loc_5A8AA0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5A8AA6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5A8AAC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A89E0 endp

align 10h


; Attributes: bp-based frame

sub_5A8AC0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DA70
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A8B33
mov	ecx, [ebp+var_4C]
imul	ecx, 68h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A8B33:
mov	esp, ebp
pop	ebp
retn
sub_5A8AC0 endp

align 10h


; Attributes: bp-based frame

sub_5A8B40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 2762762h
jbe	short loc_5A8B6B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A8B6B:
cmp	[ebp+arg_0], 0
jz	short loc_5A8BA2
mov	ecx, [ebp+arg_0]
imul	ecx, 68h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 68h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5A8BA9

loc_5A8BA2:
mov	[ebp+var_10], 0

loc_5A8BA9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5A8B40 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A8BC0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD180
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A8C33
mov	ecx, [ebp+var_4C]
imul	ecx, 50h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A8C33:
mov	esp, ebp
pop	ebp
retn
sub_5A8BC0 endp

align 10h


; Attributes: bp-based frame

sub_5A8C40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 3333333h
jbe	short loc_5A8C6B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A8C6B:
cmp	[ebp+arg_0], 0
jz	short loc_5A8CA2
mov	ecx, [ebp+arg_0]
imul	ecx, 50h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 50h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5A8CA9

loc_5A8CA2:
mov	[ebp+var_10], 0

loc_5A8CA9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5A8C40 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A8CC0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5258C0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A8D33
mov	ecx, [ebp+var_4C]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A8D33:
mov	esp, ebp
pop	ebp
retn
sub_5A8CC0 endp

align 10h


; Attributes: bp-based frame

sub_5A8D40 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 4Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 35E50D7h
mov	[ebp+var_10], 35E50D7h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5A8D7D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5A8D83

loc_5A8D7D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5A8D83:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5A8D96
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A8D96:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 35E50D7h
mov	[ebp+var_1C], 35E50D7h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5A8DCC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5A8DD2

loc_5A8DCC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5A8DD2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5A8DE2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5A8E0C

loc_5A8DE2:
mov	[ebp+var_20], 35E50D7h
mov	[ebp+var_24], 35E50D7h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5A8E00
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5A8E06

loc_5A8E00:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5A8E06:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5A8E0C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A8D40 endp

align 10h


; Attributes: bp-based frame

sub_5A8E20 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DAA0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 4Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A8E93
mov	ecx, [ebp+var_4C]
imul	ecx, 4Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A8E93:
mov	esp, ebp
pop	ebp
retn
sub_5A8E20 endp

align 10h


; Attributes: bp-based frame

sub_5A8EA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 35E50D7h
jbe	short loc_5A8ECB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A8ECB:
cmp	[ebp+arg_0], 0
jz	short loc_5A8F02
mov	ecx, [ebp+arg_0]
imul	ecx, 4Ch
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 4Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5A8F09

loc_5A8F02:
mov	[ebp+var_10], 0

loc_5A8F09:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5A8EA0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A8F20 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 6
mov	[ebp+var_8], edx
mov	[ebp+var_C], 3FFFFFFh
mov	[ebp+var_10], 3FFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_5A8F58
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_5A8F5E

loc_5A8F58:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_5A8F5E:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_5A8F71
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A8F71:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 3FFFFFFh
mov	[ebp+var_1C], 3FFFFFFh
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_5A8FA7
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_5A8FAD

loc_5A8FA7:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_5A8FAD:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_5A8FBD
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_5A8FE7

loc_5A8FBD:
mov	[ebp+var_20], 3FFFFFFh
mov	[ebp+var_24], 3FFFFFFh
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_5A8FDB
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_5A8FE1

loc_5A8FDB:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_5A8FE1:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_5A8FE7:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A8F20 endp



; Attributes: bp-based frame

sub_5A8FF0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DAD0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 6
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A905C
mov	ecx, [ebp+var_4C]
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A905C:
mov	esp, ebp
pop	ebp
retn
sub_5A8FF0 endp



; Attributes: bp-based frame

sub_5A9060 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DB80
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A90D3
mov	ecx, [ebp+var_4C]
imul	ecx, 68h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A90D3:
mov	esp, ebp
pop	ebp
retn
sub_5A9060 endp

align 10h


; Attributes: bp-based frame

sub_5A90E0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_5A90E9:
lea	eax, [ebp+var_14]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_14]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_5A9140
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_436890
jmp	short loc_5A90E9

loc_5A9140:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5A90E0 endp

align 10h


; Attributes: bp-based frame

sub_5A9160 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD1B0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 1Ch
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5A91D3
mov	ecx, [ebp+var_54]
imul	ecx, 1Ch
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A91D3:
mov	esp, ebp
pop	ebp
retn
sub_5A9160 endp

align 10h


; Attributes: bp-based frame

sub_5A91E0 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD1E0
add	esp, 8
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_5C]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_58], eax
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_54], eax
cmp	[ebp+var_54], 0
jz	short loc_5A9253
mov	ecx, [ebp+var_58]
imul	ecx, 5Ch
push	ecx		; int
mov	edx, [ebp+var_54]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A9253:
mov	esp, ebp
pop	ebp
retn
sub_5A91E0 endp

align 10h


; Attributes: bp-based frame

sub_5A9260 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A6FE0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 0A8h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A92D6
mov	ecx, [ebp+var_4C]
imul	ecx, 0A8h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A92D6:
mov	esp, ebp
pop	ebp
retn
sub_5A9260 endp

align 10h


; Attributes: bp-based frame

sub_5A92E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], offset unk_1861861
jbe	short loc_5A930B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A930B:
cmp	[ebp+arg_0], 0
jz	short loc_5A9345
mov	ecx, [ebp+arg_0]
imul	ecx, 0A8h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 0A8h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5A934C

loc_5A9345:
mov	[ebp+var_10], 0

loc_5A934C:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5A92E0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A9360 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD230
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 24h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A93D3
mov	ecx, [ebp+var_4C]
imul	ecx, 24h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A93D3:
mov	esp, ebp
pop	ebp
retn
sub_5A9360 endp

align 10h


; Attributes: bp-based frame

sub_5A93E0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_3= byte ptr	-3
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_0]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5A9427
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
xor	eax, eax
cmp	edx, [ebp+var_28]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5A9416
jmp	loc_5A94D9

loc_5A9416:
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_28]
call	sub_5AAF50
jmp	loc_5A94D9

loc_5A9427:
mov	eax, [ebp+var_28]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+var_28]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5A944C
mov	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_5AAF50
jmp	loc_5A94D9

loc_5A944C:
xor	edx, edx
mov	[ebp+var_3], dl
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_C], ecx
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_28]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 4
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx]
add	eax, 4
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx

loc_5A94D9:
mov	esp, ebp
pop	ebp
retn	4
sub_5A93E0 endp

align 10h


; Attributes: bp-based frame

sub_5A94E0 proc	near

var_58=	dword ptr -58h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_18=	byte ptr -18h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+arg_8]
lea	eax, [ebp+var_4]
call	sub_4046E0
lea	eax, [ebp+var_4]
call	sub_405E90
lea	eax, [ebp+var_24]
lea	ecx, [ebp+arg_8]
call	sub_402EB0
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_5A9536
lea	eax, [ebp+var_28]
lea	ecx, [ebp+var_4]
call	sub_402EB0
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, [ebp+var_28]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5A953B

loc_5A9536:
jmp	loc_5A95F0

loc_5A953B:
mov	[ebp+var_D], 1
lea	ecx, [ebp+var_F]
call	nullsub_1
lea	ecx, [ebp+var_E]
call	nullsub_1
movzx	eax, [ebp+var_D]
test	eax, eax
jz	short loc_5A9570
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E410
add	esp, 0Ch
jmp	loc_5A95F0

loc_5A9570:
mov	ecx, [ebp+arg_8]
add	ecx, 8
mov	[ebp+var_2C], ecx
lea	edx, [ebp+var_40]
mov	[ebp+var_30], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_439D80
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	eax, [edx+4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_38]
mov	[ecx], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_34]
mov	[eax+4], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_3C]
mov	[edx], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_3C]
mov	[ecx+4], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_44]
call	sub_4046E0
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_436B00

loc_5A95F0:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5A94E0 endp

align 10h


; Attributes: bp-based frame

sub_5A9600 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 3FFFFFFFh
jbe	short loc_5A9626
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A9626:
cmp	[ebp+arg_0], 0
jz	short loc_5A964C
mov	eax, [ebp+arg_0]
shl	eax, 2
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5A9653

loc_5A964C:
mov	[ebp+var_C], 0

loc_5A9653:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5A9600 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A9660 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_46FDA0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A96CC
mov	ecx, [ebp+var_4C]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A96CC:
mov	esp, ebp
pop	ebp
retn
sub_5A9660 endp



; Attributes: bp-based frame

sub_5A96D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 2492492h
mov	[ebp+var_10], 2492492h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5A970D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5A9713

loc_5A970D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5A9713:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5A9726
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A9726:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 2492492h
mov	[ebp+var_1C], 2492492h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5A975C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5A9762

loc_5A975C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5A9762:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5A9772
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5A979C

loc_5A9772:
mov	[ebp+var_20], 2492492h
mov	[ebp+var_24], 2492492h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5A9790
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5A9796

loc_5A9790:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5A9796:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5A979C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A96D0 endp

align 10h


; Attributes: bp-based frame

sub_5A97B0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A73C0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A9823
mov	ecx, [ebp+var_4C]
imul	ecx, 70h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A9823:
mov	esp, ebp
pop	ebp
retn
sub_5A97B0 endp

align 10h


; Attributes: bp-based frame

sub_5A9830 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 74h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 234F72Ch
mov	[ebp+var_10], 234F72Ch
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5A986D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5A9873

loc_5A986D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5A9873:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5A9886
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A9886:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 234F72Ch
mov	[ebp+var_1C], 234F72Ch
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5A98BC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5A98C2

loc_5A98BC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5A98C2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5A98D2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5A98FC

loc_5A98D2:
mov	[ebp+var_20], 234F72Ch
mov	[ebp+var_24], 234F72Ch
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5A98F0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5A98F6

loc_5A98F0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5A98F6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5A98FC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A9830 endp

align 10h


; Attributes: bp-based frame

sub_5A9910 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7450
add	esp, 8
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 74h
idiv	ecx
mov	[ebp+var_A4], eax
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_A0], eax
cmp	[ebp+var_A0], 0
jz	short loc_5A99A7
mov	ecx, [ebp+var_A4]
imul	ecx, 74h
push	ecx		; int
mov	edx, [ebp+var_A0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A99A7:
mov	esp, ebp
pop	ebp
retn
sub_5A9910 endp

align 10h


; Attributes: bp-based frame

sub_5A99B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 234F72Ch
jbe	short loc_5A99DB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A99DB:
cmp	[ebp+arg_0], 0
jz	short loc_5A9A12
mov	ecx, [ebp+arg_0]
imul	ecx, 74h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 74h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5A9A19

loc_5A9A12:
mov	[ebp+var_10], 0

loc_5A9A19:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5A99B0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A9A30 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD260
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A9A9C
mov	ecx, [ebp+var_4C]
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A9A9C:
mov	esp, ebp
pop	ebp
retn
sub_5A9A30 endp



; Attributes: bp-based frame

sub_5A9AA0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A75F0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5A9B13
mov	ecx, [ebp+var_4C]
imul	ecx, 30h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A9B13:
mov	esp, ebp
pop	ebp
retn
sub_5A9AA0 endp

align 10h


; Attributes: bp-based frame

sub_5A9B20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 5555555h
jbe	short loc_5A9B4B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5A9B4B:
cmp	[ebp+arg_0], 0
jz	short loc_5A9B82
mov	ecx, [ebp+arg_0]
imul	ecx, 30h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 30h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5A9B89

loc_5A9B82:
mov	[ebp+var_10], 0

loc_5A9B89:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5A9B20 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5A9BA0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_34]
add	edx, 8
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
cmp	dword ptr [eax], 0
jz	short loc_5A9BDE
mov	ecx, [ebp+var_30]
mov	ecx, [ecx]
call	sub_40AA80

loc_5A9BDE:
mov	edx, [ebp+var_30]
add	edx, 4
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_2C]
call	sub_594950
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	8
sub_5A9BA0 endp

align 10h


; Attributes: bp-based frame

sub_5A9C00 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 7
mov	[ebp+var_8], edx
mov	[ebp+var_C], 1FFFFFFh
mov	[ebp+var_10], 1FFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_5A9C38
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_5A9C3E

loc_5A9C38:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_5A9C3E:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_5A9C51
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A9C51:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 1FFFFFFh
mov	[ebp+var_1C], 1FFFFFFh
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_5A9C87
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_5A9C8D

loc_5A9C87:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_5A9C8D:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_5A9C9D
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_5A9CC7

loc_5A9C9D:
mov	[ebp+var_20], 1FFFFFFh
mov	[ebp+var_24], 1FFFFFFh
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_5A9CBB
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_5A9CC1

loc_5A9CBB:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_5A9CC1:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_5A9CC7:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A9C00 endp



; Attributes: bp-based frame

sub_5A9CD0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD290
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 7
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5A9D3C
mov	ecx, [ebp+var_54]
shl	ecx, 7
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A9D3C:
mov	esp, ebp
pop	ebp
retn
sub_5A9CD0 endp



; Attributes: bp-based frame

sub_5A9D40 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_30]
add	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_592E50
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	8
sub_5A9D40 endp

align 10h


; Attributes: bp-based frame

sub_5A9D80 proc	near

var_64=	dword ptr -64h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 4
call	sub_58ED10
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	8
sub_5A9D80 endp

align 10h


; Attributes: bp-based frame

sub_5A9DB0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A77B0
add	esp, 8
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_54]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 70h
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_5A9E23
mov	ecx, [ebp+var_50]
imul	ecx, 70h
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5A9E23:
mov	esp, ebp
pop	ebp
retn
sub_5A9DB0 endp

align 10h


; Attributes: bp-based frame

sub_5A9E30 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_24], ecx
lea	eax, [ebp+var_18]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_24]
mov	ecx, [ecx+4]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_18]
mov	eax, [ebp+var_14]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_5ABA50
lea	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	eax, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_24]
add	ecx, 4
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
push	eax
call	sub_77E2F0
add	esp, 4
mov	ecx, [ebp+var_20]
mov	[ecx], eax
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	4
sub_5A9E30 endp

align 10h


; Attributes: bp-based frame

sub_5A9EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5AB040
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_5A9EB0 endp

align 10h


; Attributes: bp-based frame

sub_5A9ED0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 28F5C28h
mov	[ebp+var_10], 28F5C28h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5A9F0D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5A9F13

loc_5A9F0D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5A9F13:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5A9F26
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5A9F26:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 28F5C28h
mov	[ebp+var_1C], 28F5C28h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5A9F5C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5A9F62

loc_5A9F5C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5A9F62:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5A9F72
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5A9F9C

loc_5A9F72:
mov	[ebp+var_20], 28F5C28h
mov	[ebp+var_24], 28F5C28h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5A9F90
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5A9F96

loc_5A9F90:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5A9F96:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5A9F9C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5A9ED0 endp

align 10h


; Attributes: bp-based frame

sub_5A9FB0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD2F0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5AA029
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5AA029
mov	ecx, [ebp+var_4C]
imul	ecx, 64h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5AA029:
mov	esp, ebp
pop	ebp
retn
sub_5A9FB0 endp

align 10h


; Attributes: bp-based frame

sub_5AA030 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD2F0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5AA0A3
mov	ecx, [ebp+var_4C]
imul	ecx, 64h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5AA0A3:
mov	esp, ebp
pop	ebp
retn
sub_5AA030 endp

align 10h


; Attributes: bp-based frame

sub_5AA0B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 28F5C28h
jbe	short loc_5AA0DB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AA0DB:
cmp	[ebp+arg_0], 0
jz	short loc_5AA112
mov	ecx, [ebp+arg_0]
imul	ecx, 64h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 64h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5AA119

loc_5AA112:
mov	[ebp+var_10], 0

loc_5AA119:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5AA0B0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AA130 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 2AAAAAAh
mov	[ebp+var_10], 2AAAAAAh
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5AA16D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5AA173

loc_5AA16D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5AA173:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5AA186
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5AA186:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 2AAAAAAh
mov	[ebp+var_1C], 2AAAAAAh
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5AA1BC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5AA1C2

loc_5AA1BC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5AA1C2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5AA1D2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5AA1FC

loc_5AA1D2:
mov	[ebp+var_20], 2AAAAAAh
mov	[ebp+var_24], 2AAAAAAh
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5AA1F0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5AA1F6

loc_5AA1F0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5AA1F6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5AA1FC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AA130 endp

align 10h


; Attributes: bp-based frame

sub_5AA210 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5BD320
add	esp, 8
mov	edx, [ebp+var_68]
mov	eax, [ebp+var_68]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_64], eax
mov	edx, [ebp+var_68]
mov	eax, [edx]
mov	[ebp+var_60], eax
cmp	[ebp+var_60], 0
jz	short loc_5AA283
mov	ecx, [ebp+var_64]
imul	ecx, 60h
push	ecx		; int
mov	edx, [ebp+var_60]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5AA283:
mov	esp, ebp
pop	ebp
retn
sub_5AA210 endp

align 10h


; Attributes: bp-based frame

sub_5AA290 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 2AAAAAAh
jbe	short loc_5AA2BB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AA2BB:
cmp	[ebp+arg_0], 0
jz	short loc_5AA2F2
mov	ecx, [ebp+arg_0]
imul	ecx, 60h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 60h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5AA2F9

loc_5AA2F2:
mov	[ebp+var_10], 0

loc_5AA2F9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5AA290 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AA310 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 5
mov	[ebp+var_8], edx
mov	[ebp+var_C], 7FFFFFFh
mov	[ebp+var_10], 7FFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_5AA348
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_5AA34E

loc_5AA348:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_5AA34E:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_5AA361
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5AA361:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 7FFFFFFh
mov	[ebp+var_1C], 7FFFFFFh
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_5AA397
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_5AA39D

loc_5AA397:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_5AA39D:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_5AA3AD
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_5AA3D7

loc_5AA3AD:
mov	[ebp+var_20], 7FFFFFFh
mov	[ebp+var_24], 7FFFFFFh
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_5AA3CB
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_5AA3D1

loc_5AA3CB:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_5AA3D1:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_5AA3D7:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AA310 endp



; Attributes: bp-based frame

sub_5AA3E0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 7Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 2108421h
mov	[ebp+var_10], 2108421h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5AA41D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5AA423

loc_5AA41D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5AA423:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5AA436
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5AA436:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 2108421h
mov	[ebp+var_1C], 2108421h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5AA46C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5AA472

loc_5AA46C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5AA472:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5AA482
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5AA4AC

loc_5AA482:
mov	[ebp+var_20], 2108421h
mov	[ebp+var_24], 2108421h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5AA4A0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5AA4A6

loc_5AA4A0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5AA4A6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5AA4AC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AA3E0 endp

align 10h


; Attributes: bp-based frame

sub_5AA4C0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7880
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 7Ch
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5AA533
mov	ecx, [ebp+var_54]
imul	ecx, 7Ch
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5AA533:
mov	esp, ebp
pop	ebp
retn
sub_5AA4C0 endp

align 10h


; Attributes: bp-based frame

sub_5AA540 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 2108421h
jbe	short loc_5AA56B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AA56B:
cmp	[ebp+arg_0], 0
jz	short loc_5AA5A2
mov	ecx, [ebp+arg_0]
imul	ecx, 7Ch
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 7Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5AA5A9

loc_5AA5A2:
mov	[ebp+var_10], 0

loc_5AA5A9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5AA540 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AA5C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 90h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 1C71C71h
mov	[ebp+var_10], 1C71C71h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5AA5FD
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5AA603

loc_5AA5FD:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5AA603:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5AA616
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5AA616:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 1C71C71h
mov	[ebp+var_1C], 1C71C71h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5AA64C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5AA652

loc_5AA64C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5AA652:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5AA662
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5AA68C

loc_5AA662:
mov	[ebp+var_20], 1C71C71h
mov	[ebp+var_24], 1C71C71h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5AA680
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5AA686

loc_5AA680:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5AA686:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5AA68C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AA5C0 endp

align 10h


; Attributes: bp-based frame

sub_5AA6A0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A7930
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 90h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5AA716
mov	ecx, [ebp+var_54]
imul	ecx, 90h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5AA716:
mov	esp, ebp
pop	ebp
retn
sub_5AA6A0 endp

align 10h


; Attributes: bp-based frame

sub_5AA720 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 1C71C71h
jbe	short loc_5AA74B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AA74B:
cmp	[ebp+arg_0], 0
jz	short loc_5AA785
mov	ecx, [ebp+arg_0]
imul	ecx, 90h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 90h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5AA78C

loc_5AA785:
mov	[ebp+var_10], 0

loc_5AA78C:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5AA720 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AA7A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 2E8BA2Eh
mov	[ebp+var_10], 2E8BA2Eh
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5AA7DD
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5AA7E3

loc_5AA7DD:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5AA7E3:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5AA7F6
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5AA7F6:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 2E8BA2Eh
mov	[ebp+var_1C], 2E8BA2Eh
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5AA82C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5AA832

loc_5AA82C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5AA832:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5AA842
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5AA86C

loc_5AA842:
mov	[ebp+var_20], 2E8BA2Eh
mov	[ebp+var_24], 2E8BA2Eh
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5AA860
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5AA866

loc_5AA860:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5AA866:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5AA86C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AA7A0 endp

align 10h


; Attributes: bp-based frame

sub_5AA880 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_AC]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A79C0
add	esp, 8
mov	edx, [ebp+var_AC]
mov	eax, [ebp+var_AC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 58h
idiv	ecx
mov	[ebp+var_A8], eax
mov	edx, [ebp+var_AC]
mov	eax, [edx]
mov	[ebp+var_A4], eax
cmp	[ebp+var_A4], 0
jz	short loc_5AA917
mov	ecx, [ebp+var_A8]
imul	ecx, 58h
push	ecx		; int
mov	edx, [ebp+var_A4]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5AA917:
mov	esp, ebp
pop	ebp
retn
sub_5AA880 endp

align 10h


; Attributes: bp-based frame

sub_5AA920 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 2E8BA2Eh
jbe	short loc_5AA94B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AA94B:
cmp	[ebp+arg_0], 0
jz	short loc_5AA982
mov	ecx, [ebp+arg_0]
imul	ecx, 58h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 58h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5AA989

loc_5AA982:
mov	[ebp+var_10], 0

loc_5AA989:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5AA920 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AA9A0 proc	near

var_24=	dword ptr -24h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_58B950
mov	eax, [ebp+var_24]
mov	esp, ebp
pop	ebp
retn	8
sub_5AA9A0 endp

align 10h


; Attributes: bp-based frame

sub_5AA9E0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 98h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 1AF286Bh
mov	[ebp+var_10], 1AF286Bh
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5AAA1D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5AAA23

loc_5AAA1D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5AAA23:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5AAA36
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5AAA36:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 1AF286Bh
mov	[ebp+var_1C], 1AF286Bh
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5AAA6C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5AAA72

loc_5AAA6C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5AAA72:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5AAA82
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5AAAAC

loc_5AAA82:
mov	[ebp+var_20], 1AF286Bh
mov	[ebp+var_24], 1AF286Bh
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5AAAA0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5AAAA6

loc_5AAAA0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5AAAA6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5AAAAC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AA9E0 endp

align 10h


; Attributes: bp-based frame

sub_5AAAC0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5A79F0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 98h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5AAB36
mov	ecx, [ebp+var_54]
imul	ecx, 98h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5AAB36:
mov	esp, ebp
pop	ebp
retn
sub_5AAAC0 endp

align 10h


; Attributes: bp-based frame

sub_5AAB40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 1AF286Bh
jbe	short loc_5AAB6B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AAB6B:
cmp	[ebp+arg_0], 0
jz	short loc_5AABA5
mov	ecx, [ebp+arg_0]
imul	ecx, 98h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 98h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5AABAC

loc_5AABA5:
mov	[ebp+var_10], 0

loc_5AABAC:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5AAB40 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AABC0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_34]
add	eax, 4
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_30]
add	ecx, 0Ch
mov	[ebp+var_2C], ecx
mov	edx, [ebp+arg_4]
add	edx, 0Ch
push	edx
mov	ecx, [ebp+var_2C]
call	sub_5AB190
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	8
sub_5AABC0 endp

align 10h


; Attributes: bp-based frame

sub_5AAC20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403400
mov	ecx, [ebp+var_8]
add	ecx, 28h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_5AAC5A
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_5AAC5A:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	8
sub_5AAC20 endp

align 10h


; Attributes: bp-based frame

sub_5AAC70 proc	near

var_68=	dword ptr -68h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	[ebp+var_4], 0
jmp	short loc_5AAC8B

loc_5AAC82:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_5AAC8B:
cmp	[ebp+var_4], 40h
jnb	short loc_5AACA9
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_68]
lea	ecx, [eax+edx*8]
push	ecx		; void *
call	sub_5BD350
add	esp, 8
jmp	short loc_5AAC82

loc_5AACA9:
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	4
sub_5AAC70 endp

align 10h


; Attributes: bp-based frame

sub_5AACC0 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0
mov	eax, [ebp+var_C]
add	eax, 200h
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_5C5B60
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5AACC0 endp

align 10h


; Attributes: bp-based frame

sub_5AACF0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_30]
add	ecx, 18h
call	sub_403850
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+30h]
fstp	dword ptr [edx+30h]
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	eax, [edx+34h]
mov	[ecx+34h], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	eax, [edx+38h]
mov	[ecx+38h], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	eax, [edx+3Ch]
mov	[ecx+3Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+40h]
mov	[ecx+40h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+41h]
mov	[ecx+41h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+42h]
mov	[ecx+42h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+43h]
mov	[ecx+43h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+44h]
mov	[ecx+44h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+45h]
mov	[ecx+45h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+46h]
mov	[ecx+46h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+47h]
mov	[ecx+47h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+48h]
mov	[ecx+48h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+49h]
mov	[ecx+49h], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	al, [edx+4Ah]
mov	[ecx+4Ah], al
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	eax, [edx+50h]
mov	[ecx+50h], eax
mov	edx, [edx+54h]
mov	[ecx+54h], edx
mov	eax, [ebp+var_30]
add	eax, 58h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
add	ecx, 58h
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_5AB4E0
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	4
sub_5AACF0 endp

align 10h


; Attributes: bp-based frame

sub_5AAE00 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_5C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_5C]
add	eax, 10h
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_50FE00
mov	edx, [ebp+var_5C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+28h]
mov	[edx+28h], ecx
mov	edx, [ebp+var_5C]
add	edx, 2Ch
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_0]
add	eax, 2Ch
push	eax
mov	ecx, [ebp+var_58]
call	sub_490C70
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+44h]
mov	[ecx+44h], eax
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_5AAE00 endp

align 10h


; Attributes: bp-based frame

sub_5AAE90 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_5D6180
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
shl	edx, 4
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_5AAE90 endp

align 10h


; Attributes: bp-based frame

sub_5AAF00 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5A74B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AAF00 endp

align 10h


; Attributes: bp-based frame

sub_5AAF50 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	eax, [ebp+var_8]
call	sub_409A10
mov	esp, ebp
pop	ebp
retn	4
sub_5AAF50 endp

align 10h


; Attributes: bp-based frame

sub_5AAFA0 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5BD3A0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AAFA0 endp

align 10h


; Attributes: bp-based frame

sub_5AAFF0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5BD410
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AAFF0 endp

align 10h


; Attributes: bp-based frame

sub_5AB040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5AB085
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5BC6C0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5AB085:
mov	esp, ebp
pop	ebp
retn
sub_5AB040 endp

align 10h


; Attributes: bp-based frame

sub_5AB090 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 64h
idiv	ecx
push	eax
mov	ecx, [ebp+var_40]
call	sub_5AB8E0
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_38]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_5AB0FF

loc_5AB0F6:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_5AB0FF:
cmp	[ebp+var_2C], 0
jle	short loc_5AB129
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_5A77E0
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 64h
mov	[ebp+var_38], edx
mov	eax, [ebp+var_28]
add	eax, 64h
mov	[ebp+var_28], eax
jmp	short loc_5AB0F6

loc_5AB129:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB090 endp

align 10h


; Attributes: bp-based frame

sub_5AB140 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5BD480
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB140 endp

align 10h


; Attributes: bp-based frame

sub_5AB190 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5AB277
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5BAA60
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5AB234:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5AB248
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5AB234

loc_5AB248:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5AB25A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5AB26E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5AB25A

loc_5AB26E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5AB277:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB190 endp

align 10h


; Attributes: bp-based frame

sub_5AB290 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CA80
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5C5BB0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB290 endp



; Attributes: bp-based frame

sub_5AB2F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 4EC4EC4h
jbe	short loc_5AB316
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AB316:
cmp	[ebp+arg_0], 0
jz	short loc_5AB34A
mov	eax, [ebp+arg_0]
imul	eax, 34h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 34h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_5AB34C

loc_5AB34A:
xor	eax, eax

loc_5AB34C:
mov	esp, ebp
pop	ebp
retn	8
sub_5AB2F0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AB360 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 2762762h
jbe	short loc_5AB386
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AB386:
cmp	[ebp+arg_0], 0
jz	short loc_5AB3BA
mov	eax, [ebp+arg_0]
imul	eax, 68h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 68h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_5AB3BC

loc_5AB3BA:
xor	eax, eax

loc_5AB3BC:
mov	esp, ebp
pop	ebp
retn	8
sub_5AB360 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AB3D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 5555555h
jbe	short loc_5AB3F6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AB3F6:
cmp	[ebp+arg_0], 0
jz	short loc_5AB42A
mov	eax, [ebp+arg_0]
imul	eax, 30h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 30h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_5AB42C

loc_5AB42A:
xor	eax, eax

loc_5AB42C:
mov	esp, ebp
pop	ebp
retn	8
sub_5AB3D0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AB440 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 3FFFFFFh
jbe	short loc_5AB466
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5AB466:
cmp	[ebp+arg_0], 0
jz	short loc_5AB494
mov	eax, [ebp+arg_0]
shl	eax, 6
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_4]
shr	edx, 6
mov	eax, [ebp+arg_4]
mov	[eax], edx
mov	eax, [ebp+var_8]
jmp	short loc_5AB496

loc_5AB494:
xor	eax, eax

loc_5AB496:
mov	esp, ebp
pop	ebp
retn	8
sub_5AB440 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5AB4A0 proc	near

var_38=	dword ptr -38h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
push	1
mov	ecx, [ebp+var_38]
call	sub_503430
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_5BD4F0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB4A0 endp

align 10h


; Attributes: bp-based frame

sub_5AB4E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5AB5C7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5B2F50
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5AB584:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5AB598
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5AB584

loc_5AB598:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5AB5AA:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5AB5BE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5AB5AA

loc_5AB5BE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5AB5C7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB4E0 endp

align 10h


; Attributes: bp-based frame

sub_5AB5E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5AB6C7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5B3F40
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5AB684:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5AB698
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5AB684

loc_5AB698:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5AB6AA:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5AB6BE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5AB6AA

loc_5AB6BE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5AB6C7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB5E0 endp

align 10h


; Attributes: bp-based frame

sub_5AB6E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5AB7C7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5B4CB0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5AB784:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5AB798
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5AB784

loc_5AB798:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5AB7AA:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5AB7BE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5AB7AA

loc_5AB7BE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5AB7C7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB6E0 endp

align 10h


; Attributes: bp-based frame

sub_5AB7E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5AB8C7
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5BC5E0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5AB884:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5AB898
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5AB884

loc_5AB898:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5AB8AA:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5AB8BE
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5AB8AA

loc_5AB8BE:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5AB8C7:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB7E0 endp

align 10h


; Attributes: bp-based frame

sub_5AB8E0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_5AA0B0
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 64h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_5AB8E0 endp

align 10h


; Attributes: bp-based frame

sub_5AB950 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5ABA37
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5BCBE0
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5AB9F4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5ABA08
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5AB9F4

loc_5ABA08:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5ABA1A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5ABA2E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5ABA1A

loc_5ABA2E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5ABA37:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5AB950 endp

align 10h


; Attributes: bp-based frame

sub_5ABA50 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5ABD05
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5ABAB9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_48A160
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AC157

loc_5ABAB9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5ABB08
jb	short loc_5ABAFC
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5ABB08

loc_5ABAFC:
mov	[ebp+var_AC], 1
jmp	short loc_5ABB12

loc_5ABB08:
mov	[ebp+var_AC], 0

loc_5ABB12:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5ABB4D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	loc_5AC157
jmp	loc_5ABD00

loc_5ABB4D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5ABB9C
jb	short loc_5ABB90
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5ABB9C

loc_5ABB90:
mov	[ebp+var_B8], 1
jmp	short loc_5ABBA6

loc_5ABB9C:
mov	[ebp+var_B8], 0

loc_5ABBA6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5ABBCA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AC157

loc_5ABBCA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5ABC14
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	loc_5AC157

loc_5ABC14:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5ABC63
jb	short loc_5ABC57
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5ABC63

loc_5ABC57:
mov	[ebp+var_C4], 1
jmp	short loc_5ABC6D

loc_5ABC63:
mov	[ebp+var_C4], 0

loc_5ABC6D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5ABCD5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5ABCAE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	loc_5AC157
jmp	short loc_5ABCD3

loc_5ABCAE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	loc_5AC157

loc_5ABCD3:
jmp	short loc_5ABD00

loc_5ABCD5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_48A160
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AC157

loc_5ABD00:
jmp	loc_5AC157

loc_5ABD05:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5ABDE1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5ABD69
jb	short loc_5ABD5D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5ABD69

loc_5ABD5D:
mov	[ebp+var_D0], 1
jmp	short loc_5ABD73

loc_5ABD69:
mov	[ebp+var_D0], 0

loc_5ABD73:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5ABDB1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	loc_5AC157
jmp	short loc_5ABDDC

loc_5ABDB1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_48A160
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AC157

loc_5ABDDC:
jmp	loc_5AC157

loc_5ABDE1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5ABE4A
jb	short loc_5ABE3E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5ABE4A

loc_5ABE3E:
mov	[ebp+var_DC], 1
jmp	short loc_5ABE54

loc_5ABE4A:
mov	[ebp+var_DC], 0

loc_5ABE54:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5ABEDF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5ABEBE
jb	short loc_5ABEB2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5ABEBE

loc_5ABEB2:
mov	[ebp+var_E8], 1
jmp	short loc_5ABEC8

loc_5ABEBE:
mov	[ebp+var_E8], 0

loc_5ABEC8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5ABEDF
mov	[ebp+var_EC], 1
jmp	short loc_5ABEE9

loc_5ABEDF:
mov	[ebp+var_EC], 0

loc_5ABEE9:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5ABEFE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5ABEFE:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5ABF60
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5ABF36
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	loc_5AC157
jmp	short loc_5ABF5B

loc_5ABF36:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	loc_5AC157

loc_5ABF5B:
jmp	loc_5AC157

loc_5ABF60:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5ABFF8
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5ABFE5
jb	short loc_5ABFD9
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5ABFE5

loc_5ABFD9:
mov	[ebp+var_F8], 1
jmp	short loc_5ABFEF

loc_5ABFE5:
mov	[ebp+var_F8], 0

loc_5ABFEF:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5ABFF8:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5AC095
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5AC095
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5AC089
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AC074
jb	short loc_5AC068
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AC074

loc_5AC068:
mov	[ebp+var_104], 1
jmp	short loc_5AC07E

loc_5AC074:
mov	[ebp+var_104], 0

loc_5AC07E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5AC095

loc_5AC089:
mov	[ebp+var_108], 1
jmp	short loc_5AC09F

loc_5AC095:
mov	[ebp+var_108], 0

loc_5AC09F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5AC0B4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5AC0B4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5AC10D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AC0E9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	short loc_5AC157
jmp	short loc_5AC10B

loc_5AC0E9:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_491100
mov	eax, [ebp+arg_0]
jmp	short loc_5AC157

loc_5AC10B:
jmp	short loc_5AC157

loc_5AC10D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5AC12B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5AC157
jmp	short loc_5AC157

loc_5AC12B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_48A160
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5AC157:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5ABA50 endp

align 10h


; Attributes: bp-based frame

sub_5AC160 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5AC1A7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE190
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5AC284

loc_5AC1A7:
cmp	[ebp+arg_10], 0
jnz	short loc_5AC209
cmp	[ebp+arg_C], 0
jnz	short loc_5AC200
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AC1F1
jb	short loc_5AC1E8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AC1F1

loc_5AC1E8:
mov	[ebp+var_3C], 1
jmp	short loc_5AC1F8

loc_5AC1F1:
mov	[ebp+var_3C], 0

loc_5AC1F8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5AC209

loc_5AC200:
mov	[ebp+var_40], 1
jmp	short loc_5AC210

loc_5AC209:
mov	[ebp+var_40], 0

loc_5AC210:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5AC222
and	[ebp+var_C], 0FFFFFFFEh

loc_5AC222:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5AC258
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE190
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5AC256
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5AC256:
jmp	short loc_5AC284

loc_5AC258:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE190
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5AC284
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5AC284:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5AC160 endp

align 10h


; Attributes: bp-based frame

sub_5AC2D0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BE190
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5AC326
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5AC2D0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5AC326:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5AC335:
cmp	[ebp+arg_0], 0
jz	short loc_5AC3A2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BE190
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5AC391
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5AC2D0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5AC391:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5AC335

loc_5AC3A2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5AC2D0 endp

align 10h


; Attributes: bp-based frame

sub_5AC3B0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5AC665
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AC419
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_596AF0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7

loc_5AC419:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AC468
jb	short loc_5AC45C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AC468

loc_5AC45C:
mov	[ebp+var_AC], 1
jmp	short loc_5AC472

loc_5AC468:
mov	[ebp+var_AC], 0

loc_5AC472:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5AC4AD
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7
jmp	loc_5AC660

loc_5AC4AD:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AC4FC
jb	short loc_5AC4F0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AC4FC

loc_5AC4F0:
mov	[ebp+var_B8], 1
jmp	short loc_5AC506

loc_5AC4FC:
mov	[ebp+var_B8], 0

loc_5AC506:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5AC52A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7

loc_5AC52A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5AC574
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7

loc_5AC574:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AC5C3
jb	short loc_5AC5B7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AC5C3

loc_5AC5B7:
mov	[ebp+var_C4], 1
jmp	short loc_5AC5CD

loc_5AC5C3:
mov	[ebp+var_C4], 0

loc_5AC5CD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5AC635
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AC60E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7
jmp	short loc_5AC633

loc_5AC60E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7

loc_5AC633:
jmp	short loc_5AC660

loc_5AC635:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_596AF0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7

loc_5AC660:
jmp	loc_5ACAB7

loc_5AC665:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5AC741
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AC6C9
jb	short loc_5AC6BD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AC6C9

loc_5AC6BD:
mov	[ebp+var_D0], 1
jmp	short loc_5AC6D3

loc_5AC6C9:
mov	[ebp+var_D0], 0

loc_5AC6D3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5AC711
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7
jmp	short loc_5AC73C

loc_5AC711:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_596AF0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7

loc_5AC73C:
jmp	loc_5ACAB7

loc_5AC741:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AC7AA
jb	short loc_5AC79E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AC7AA

loc_5AC79E:
mov	[ebp+var_DC], 1
jmp	short loc_5AC7B4

loc_5AC7AA:
mov	[ebp+var_DC], 0

loc_5AC7B4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5AC83F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5AC81E
jb	short loc_5AC812
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5AC81E

loc_5AC812:
mov	[ebp+var_E8], 1
jmp	short loc_5AC828

loc_5AC81E:
mov	[ebp+var_E8], 0

loc_5AC828:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5AC83F
mov	[ebp+var_EC], 1
jmp	short loc_5AC849

loc_5AC83F:
mov	[ebp+var_EC], 0

loc_5AC849:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5AC85E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5AC85E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5AC8C0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5AC896
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7
jmp	short loc_5AC8BB

loc_5AC896:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	loc_5ACAB7

loc_5AC8BB:
jmp	loc_5ACAB7

loc_5AC8C0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5AC958
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AC945
jb	short loc_5AC939
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AC945

loc_5AC939:
mov	[ebp+var_F8], 1
jmp	short loc_5AC94F

loc_5AC945:
mov	[ebp+var_F8], 0

loc_5AC94F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5AC958:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5AC9F5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5AC9F5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5AC9E9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AC9D4
jb	short loc_5AC9C8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AC9D4

loc_5AC9C8:
mov	[ebp+var_104], 1
jmp	short loc_5AC9DE

loc_5AC9D4:
mov	[ebp+var_104], 0

loc_5AC9DE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5AC9F5

loc_5AC9E9:
mov	[ebp+var_108], 1
jmp	short loc_5AC9FF

loc_5AC9F5:
mov	[ebp+var_108], 0

loc_5AC9FF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5ACA14
and	[ebp+var_4C], 0FFFFFFFDh

loc_5ACA14:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5ACA6D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5ACA49
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	short loc_5ACAB7
jmp	short loc_5ACA6B

loc_5ACA49:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5AC160
mov	eax, [ebp+arg_0]
jmp	short loc_5ACAB7

loc_5ACA6B:
jmp	short loc_5ACAB7

loc_5ACA6D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5ACA8B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5ACAB7
jmp	short loc_5ACAB7

loc_5ACA8B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_596AF0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5ACAB7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5AC3B0 endp

align 10h


; Attributes: bp-based frame

sub_5ACAC0 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5ACADA

loc_5ACAD1:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_5ACADA:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_5ACAFD
mov	[ebp+var_8], 80h
push	5
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_5A8980
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_5ACAD1

loc_5ACAFD:
mov	esp, ebp
pop	ebp
retn	8
sub_5ACAC0 endp

align 10h


; Attributes: bp-based frame

sub_5ACB10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5ACB2A

loc_5ACB21:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_5ACB2A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_5ACB5E
mov	[ebp+var_8], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_5ACB5C
mov	edx, 5
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5ACB5C:
jmp	short loc_5ACB21

loc_5ACB5E:
mov	esp, ebp
pop	ebp
retn	8
sub_5ACB10 endp

align 10h


; Attributes: bp-based frame

sub_5ACB70 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_64]
cmp	[edx+24h], ecx
jbe	short loc_5ACC1B
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_5ACBF3
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_5ACC16

loc_5ACBF3:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_5ACC16:
jmp	loc_5ACCC8

loc_5ACC1B:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_64]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5A9600
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_5ACCB6
mov	ecx, [ebp+var_50]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5ACCB6:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_5ACCC8:
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 5
imul	eax, 18h
mov	ecx, [ebp+var_64]
add	eax, [ecx+4]
mov	edx, [ebp+var_64]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_58], 80h
mov	eax, 5
imul	eax, 18h
mov	ecx, [ebp+var_5C]
add	eax, [ecx+4]
mov	edx, [ebp+var_5C]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_5ACB70 endp

align 10h


; Attributes: bp-based frame

sub_5ACD50 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ACD50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
mov	[ebp+var_4C], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4C]
jnz	short loc_5ACDAC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_5BE1E0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_5ACE89

loc_5ACDAC:
cmp	[ebp+arg_10], 0
jnz	short loc_5ACE00
cmp	[ebp+arg_C], 0
jnz	short loc_5ACDF7
or	[ebp+var_18], 1
lea	edx, [ebp+var_25]
mov	[ebp+var_50], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_24], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5ACE00

loc_5ACDF7:
mov	[ebp+var_54], 1
jmp	short loc_5ACE07

loc_5ACE00:
mov	[ebp+var_54], 0

loc_5ACE07:
mov	cl, byte ptr [ebp+var_54]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_18]
and	edx, 1
jz	short loc_5ACE27
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh

loc_5ACE27:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5ACE5D
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_5BE1E0
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5ACE5B
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx

loc_5ACE5B:
jmp	short loc_5ACE89

loc_5ACE5D:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_5BE1E0
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4C]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5ACE89
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx

loc_5ACE89:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4C]
add	edx, 4
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_4C]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_5ACD50 endp

align 10h


; Attributes: bp-based frame

sub_5ACEE0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BE1E0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5ACF36
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5ACEE0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5ACF36:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5ACF45:
cmp	[ebp+arg_0], 0
jz	short loc_5ACFB2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BE1E0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5ACFA1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5ACEE0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5ACFA1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5ACF45

loc_5ACFB2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5ACEE0 endp

align 10h


; Attributes: bp-based frame

sub_5ACFC0 proc	near

var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C8=	dword ptr -0C8h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_75=	byte ptr -75h
var_74=	byte ptr -74h
var_73=	byte ptr -73h
var_72=	byte ptr -72h
var_71=	byte ptr -71h
var_70=	byte ptr -70h
var_64=	byte ptr -64h
var_3C=	byte ptr -3Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
mov	eax, [ebp+var_F4]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5ACFF6
mov	edx, [ebp+var_F4]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5ACFF6
mov	[ebp+var_F8], 1
jmp	short loc_5AD000

loc_5ACFF6:
mov	[ebp+var_F8], 0

loc_5AD000:
movzx	ecx, byte ptr [ebp+var_F8]
test	ecx, ecx
jz	short loc_5AD04C
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_70]
call	sub_5BD540
xor	eax, eax
mov	[ebp+var_71], al
lea	ecx, [ebp+var_71]
push	ecx
lea	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_F4]
call	sub_5ACFC0
lea	ecx, [ebp+var_3C]
call	sub_407E50
lea	ecx, [ebp+var_64]
call	sub_407E50
jmp	loc_5AD370

loc_5AD04C:
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5AD1D7
xor	edx, edx
mov	[ebp+var_72], dl
mov	eax, [ebp+var_F4]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 68h
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_88], eax
push	0
lea	ecx, [ebp+var_75]
push	ecx
mov	edx, [ebp+var_90]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_88]
push	ecx
call	sub_5C7160
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 68h
mov	eax, [ebp+var_F4]
add	edx, [eax+4]
mov	ecx, [ebp+var_F4]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_73], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 68h
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_98], eax
jmp	short loc_5AD137

loc_5AD128:
mov	edx, [ebp+var_98]
sub	edx, 1
mov	[ebp+var_98], edx

loc_5AD137:
cmp	[ebp+var_98], 0
jle	short loc_5AD172
mov	eax, [ebp+var_9C]
sub	eax, 68h
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_A0]
sub	ecx, 68h
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_9C]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C6760
jmp	short loc_5AD128

loc_5AD172:
mov	eax, [ebp+arg_0]
mov	[ebp+var_AC], eax
mov	eax, [ebp+arg_4]
imul	eax, 68h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_AC]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_A8], eax
jmp	short loc_5AD1B8

loc_5AD19A:
mov	edx, [ebp+var_AC]
add	edx, 68h
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_A8]
sub	eax, 1
mov	[ebp+var_A8], eax

loc_5AD1B8:
cmp	[ebp+var_A8], 0
jle	short loc_5AD1D2
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_AC]
call	sub_5C6760
jmp	short loc_5AD19A

loc_5AD1D2:
jmp	loc_5AD370

loc_5AD1D7:
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 68h
add	ecx, [ebp+var_C8]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_C8]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_B0]
sub	eax, [ebp+var_C8]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_BC], eax
jmp	short loc_5AD241

loc_5AD223:
mov	edx, [ebp+var_BC]
sub	edx, 1
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_B8]
add	eax, 68h
mov	[ebp+var_B8], eax

loc_5AD241:
cmp	[ebp+var_BC], 0
jle	short loc_5AD25F
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_B8]
push	edx		; void *
call	sub_5A6E40
add	esp, 8
jmp	short loc_5AD223

loc_5AD25F:
mov	eax, [ebp+var_F4]
mov	ecx, [ebp+var_B0]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_74], dl
mov	eax, [ebp+var_F4]
mov	ecx, [eax+4]
mov	[ebp+var_E4], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_E0], edx
mov	eax, [ebp+var_E4]
mov	[ebp+var_D0], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_E0]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_D4], eax
jmp	short loc_5AD2BF

loc_5AD2B0:
mov	edx, [ebp+var_D4]
sub	edx, 1
mov	[ebp+var_D4], edx

loc_5AD2BF:
cmp	[ebp+var_D4], 0
jle	short loc_5AD2FE
mov	eax, [ebp+var_E0]
push	eax		; int
mov	ecx, [ebp+var_D0]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_E0]
add	edx, 68h
mov	[ebp+var_E0], edx
mov	eax, [ebp+var_D0]
add	eax, 68h
mov	[ebp+var_D0], eax
jmp	short loc_5AD2B0

loc_5AD2FE:
mov	ecx, [ebp+var_4]
imul	ecx, 68h
mov	edx, [ebp+var_F4]
add	ecx, [edx+4]
mov	eax, [ebp+var_F4]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_F0], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_F0]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_EC], eax
jmp	short loc_5AD356

loc_5AD338:
mov	edx, [ebp+var_F0]
add	edx, 68h
mov	[ebp+var_F0], edx
mov	eax, [ebp+var_EC]
sub	eax, 1
mov	[ebp+var_EC], eax

loc_5AD356:
cmp	[ebp+var_EC], 0
jle	short loc_5AD370
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_F0]
call	sub_5C6760
jmp	short loc_5AD338

loc_5AD370:
mov	esp, ebp
pop	ebp
retn	10h
sub_5ACFC0 endp

align 10h


; Attributes: bp-based frame

sub_5AD380 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5AD635
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AD3E9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57CD70
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87

loc_5AD3E9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AD438
jb	short loc_5AD42C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AD438

loc_5AD42C:
mov	[ebp+var_AC], 1
jmp	short loc_5AD442

loc_5AD438:
mov	[ebp+var_AC], 0

loc_5AD442:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5AD47D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87
jmp	loc_5AD630

loc_5AD47D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AD4CC
jb	short loc_5AD4C0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AD4CC

loc_5AD4C0:
mov	[ebp+var_B8], 1
jmp	short loc_5AD4D6

loc_5AD4CC:
mov	[ebp+var_B8], 0

loc_5AD4D6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5AD4FA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87

loc_5AD4FA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5AD544
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87

loc_5AD544:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AD593
jb	short loc_5AD587
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AD593

loc_5AD587:
mov	[ebp+var_C4], 1
jmp	short loc_5AD59D

loc_5AD593:
mov	[ebp+var_C4], 0

loc_5AD59D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5AD605
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AD5DE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87
jmp	short loc_5AD603

loc_5AD5DE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87

loc_5AD603:
jmp	short loc_5AD630

loc_5AD605:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57CD70
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87

loc_5AD630:
jmp	loc_5ADA87

loc_5AD635:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5AD711
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AD699
jb	short loc_5AD68D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AD699

loc_5AD68D:
mov	[ebp+var_D0], 1
jmp	short loc_5AD6A3

loc_5AD699:
mov	[ebp+var_D0], 0

loc_5AD6A3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5AD6E1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87
jmp	short loc_5AD70C

loc_5AD6E1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57CD70
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87

loc_5AD70C:
jmp	loc_5ADA87

loc_5AD711:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AD77A
jb	short loc_5AD76E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AD77A

loc_5AD76E:
mov	[ebp+var_DC], 1
jmp	short loc_5AD784

loc_5AD77A:
mov	[ebp+var_DC], 0

loc_5AD784:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5AD80F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5AD7EE
jb	short loc_5AD7E2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5AD7EE

loc_5AD7E2:
mov	[ebp+var_E8], 1
jmp	short loc_5AD7F8

loc_5AD7EE:
mov	[ebp+var_E8], 0

loc_5AD7F8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5AD80F
mov	[ebp+var_EC], 1
jmp	short loc_5AD819

loc_5AD80F:
mov	[ebp+var_EC], 0

loc_5AD819:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5AD82E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5AD82E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5AD890
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5AD866
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87
jmp	short loc_5AD88B

loc_5AD866:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	loc_5ADA87

loc_5AD88B:
jmp	loc_5ADA87

loc_5AD890:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5AD928
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AD915
jb	short loc_5AD909
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AD915

loc_5AD909:
mov	[ebp+var_F8], 1
jmp	short loc_5AD91F

loc_5AD915:
mov	[ebp+var_F8], 0

loc_5AD91F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5AD928:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5AD9C5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5AD9C5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5AD9B9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AD9A4
jb	short loc_5AD998
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AD9A4

loc_5AD998:
mov	[ebp+var_104], 1
jmp	short loc_5AD9AE

loc_5AD9A4:
mov	[ebp+var_104], 0

loc_5AD9AE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5AD9C5

loc_5AD9B9:
mov	[ebp+var_108], 1
jmp	short loc_5AD9CF

loc_5AD9C5:
mov	[ebp+var_108], 0

loc_5AD9CF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5AD9E4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5AD9E4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5ADA3D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5ADA19
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	short loc_5ADA87
jmp	short loc_5ADA3B

loc_5ADA19:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57DE60
mov	eax, [ebp+arg_0]
jmp	short loc_5ADA87

loc_5ADA3B:
jmp	short loc_5ADA87

loc_5ADA3D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5ADA5B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5ADA87
jmp	short loc_5ADA87

loc_5ADA5B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57CD70
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5ADA87:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5AD380 endp

align 10h


; Attributes: bp-based frame

sub_5ADA90 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5ADAD7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE230
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5ADB8A

loc_5ADAD7:
cmp	[ebp+arg_10], 0
jnz	short loc_5ADB0F
cmp	[ebp+arg_C], 0
jnz	short loc_5ADB06
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5ADB0F

loc_5ADB06:
mov	[ebp+var_34], 1
jmp	short loc_5ADB16

loc_5ADB0F:
mov	[ebp+var_34], 0

loc_5ADB16:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5ADB28
and	[ebp+var_C], 0FFFFFFFEh

loc_5ADB28:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5ADB5E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE230
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5ADB5C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5ADB5C:
jmp	short loc_5ADB8A

loc_5ADB5E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE230
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5ADB8A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5ADB8A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5ADA90 endp

align 10h


; Attributes: bp-based frame

sub_5ADBD0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5ADC17
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE280
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5ADCCE

loc_5ADC17:
cmp	[ebp+arg_10], 0
jnz	short loc_5ADC53
cmp	[ebp+arg_C], 0
jnz	short loc_5ADC4A
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+arg_8]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5ADC53

loc_5ADC4A:
mov	[ebp+var_34], 1
jmp	short loc_5ADC5A

loc_5ADC53:
mov	[ebp+var_34], 0

loc_5ADC5A:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5ADC6C
and	[ebp+var_C], 0FFFFFFFEh

loc_5ADC6C:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5ADCA2
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE280
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5ADCA0
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5ADCA0:
jmp	short loc_5ADCCE

loc_5ADCA2:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE280
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5ADCCE
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5ADCCE:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5ADBD0 endp

align 10h


; Attributes: bp-based frame

sub_5ADD10 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BE280
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5ADD66
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5ADD10
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5ADD66:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5ADD75:
cmp	[ebp+arg_0], 0
jz	short loc_5ADDE2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BE280
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5ADDD1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5ADD10
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5ADDD1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5ADD75

loc_5ADDE2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5ADD10 endp

align 10h


; Attributes: bp-based frame

sub_5ADDF0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BEFD0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5ADE46
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5ADDF0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5ADE46:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5ADE55:
cmp	[ebp+arg_0], 0
jz	short loc_5ADEC2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BEFD0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5ADEB1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5ADDF0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5ADEB1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5ADE55

loc_5ADEC2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5ADDF0 endp

align 10h


; Attributes: bp-based frame

sub_5ADED0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5AE0A4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5ADF39
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5BF6A0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B

loc_5ADF39:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5ADF82
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B
jmp	loc_5AE09F

loc_5ADF82:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5ADFB4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B

loc_5ADFB4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5ADFFE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B

loc_5ADFFE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5AE074
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AE04D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B
jmp	short loc_5AE072

loc_5AE04D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B

loc_5AE072:
jmp	short loc_5AE09F

loc_5AE074:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5BF6A0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B

loc_5AE09F:
jmp	loc_5AE37B

loc_5AE0A4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5AE135
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5AE105
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B
jmp	short loc_5AE130

loc_5AE105:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5BF6A0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B

loc_5AE130:
jmp	loc_5AE37B

loc_5AE135:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5AE19F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AE19F
mov	[ebp+var_C4], 1
jmp	short loc_5AE1A9

loc_5AE19F:
mov	[ebp+var_C4], 0

loc_5AE1A9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5AE1BE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5AE1BE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5AE220
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5AE1F6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B
jmp	short loc_5AE21B

loc_5AE1F6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	loc_5AE37B

loc_5AE21B:
jmp	loc_5AE37B

loc_5AE220:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5AE26D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5AE26D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5AE2B9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5AE2B9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5AE2AD
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AE2B9

loc_5AE2AD:
mov	[ebp+var_C8], 1
jmp	short loc_5AE2C3

loc_5AE2B9:
mov	[ebp+var_C8], 0

loc_5AE2C3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5AE2D8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5AE2D8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5AE331
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5AE30D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	short loc_5AE37B
jmp	short loc_5AE32F

loc_5AE30D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5BF560
mov	eax, [ebp+arg_0]
jmp	short loc_5AE37B

loc_5AE32F:
jmp	short loc_5AE37B

loc_5AE331:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5AE34F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5AE37B
jmp	short loc_5AE37B

loc_5AE34F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5BF6A0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5AE37B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5ADED0 endp

align 10h


; Attributes: bp-based frame

sub_5AE390 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5AE645
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AE3F9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57D320
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97

loc_5AE3F9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AE448
jb	short loc_5AE43C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AE448

loc_5AE43C:
mov	[ebp+var_AC], 1
jmp	short loc_5AE452

loc_5AE448:
mov	[ebp+var_AC], 0

loc_5AE452:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5AE48D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97
jmp	loc_5AE640

loc_5AE48D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AE4DC
jb	short loc_5AE4D0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AE4DC

loc_5AE4D0:
mov	[ebp+var_B8], 1
jmp	short loc_5AE4E6

loc_5AE4DC:
mov	[ebp+var_B8], 0

loc_5AE4E6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5AE50A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97

loc_5AE50A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5AE554
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97

loc_5AE554:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AE5A3
jb	short loc_5AE597
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AE5A3

loc_5AE597:
mov	[ebp+var_C4], 1
jmp	short loc_5AE5AD

loc_5AE5A3:
mov	[ebp+var_C4], 0

loc_5AE5AD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5AE615
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AE5EE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97
jmp	short loc_5AE613

loc_5AE5EE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97

loc_5AE613:
jmp	short loc_5AE640

loc_5AE615:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57D320
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97

loc_5AE640:
jmp	loc_5AEA97

loc_5AE645:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5AE721
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AE6A9
jb	short loc_5AE69D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AE6A9

loc_5AE69D:
mov	[ebp+var_D0], 1
jmp	short loc_5AE6B3

loc_5AE6A9:
mov	[ebp+var_D0], 0

loc_5AE6B3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5AE6F1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97
jmp	short loc_5AE71C

loc_5AE6F1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57D320
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97

loc_5AE71C:
jmp	loc_5AEA97

loc_5AE721:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AE78A
jb	short loc_5AE77E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AE78A

loc_5AE77E:
mov	[ebp+var_DC], 1
jmp	short loc_5AE794

loc_5AE78A:
mov	[ebp+var_DC], 0

loc_5AE794:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5AE81F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5AE7FE
jb	short loc_5AE7F2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5AE7FE

loc_5AE7F2:
mov	[ebp+var_E8], 1
jmp	short loc_5AE808

loc_5AE7FE:
mov	[ebp+var_E8], 0

loc_5AE808:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5AE81F
mov	[ebp+var_EC], 1
jmp	short loc_5AE829

loc_5AE81F:
mov	[ebp+var_EC], 0

loc_5AE829:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5AE83E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5AE83E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5AE8A0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5AE876
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97
jmp	short loc_5AE89B

loc_5AE876:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	loc_5AEA97

loc_5AE89B:
jmp	loc_5AEA97

loc_5AE8A0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5AE938
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AE925
jb	short loc_5AE919
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AE925

loc_5AE919:
mov	[ebp+var_F8], 1
jmp	short loc_5AE92F

loc_5AE925:
mov	[ebp+var_F8], 0

loc_5AE92F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5AE938:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5AE9D5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5AE9D5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5AE9C9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AE9B4
jb	short loc_5AE9A8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AE9B4

loc_5AE9A8:
mov	[ebp+var_104], 1
jmp	short loc_5AE9BE

loc_5AE9B4:
mov	[ebp+var_104], 0

loc_5AE9BE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5AE9D5

loc_5AE9C9:
mov	[ebp+var_108], 1
jmp	short loc_5AE9DF

loc_5AE9D5:
mov	[ebp+var_108], 0

loc_5AE9DF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5AE9F4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5AE9F4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5AEA4D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AEA29
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	short loc_5AEA97
jmp	short loc_5AEA4B

loc_5AEA29:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E1F0
mov	eax, [ebp+arg_0]
jmp	short loc_5AEA97

loc_5AEA4B:
jmp	short loc_5AEA97

loc_5AEA4D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5AEA6B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5AEA97
jmp	short loc_5AEA97

loc_5AEA6B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57D320
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5AEA97:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5AE390 endp

align 10h


; Attributes: bp-based frame

sub_5AEAA0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5E75C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_5D6180
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_5AEB16

loc_5AEB04:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 10h
mov	[ebp+var_38], ecx

loc_5AEB16:
cmp	[ebp+var_3C], 0
jbe	short loc_5AEB3A
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	short loc_5AEB04

loc_5AEB3A:
mov	eax, [ebp+var_38]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_5AEB65
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_5AEB65:
mov	ecx, [ebp+var_9C]
call	sub_5ED2E0
mov	eax, [ebp+var_4]
shl	eax, 4
add	eax, [ebp+var_8]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5AEAA0 endp

align 10h


; Attributes: bp-based frame

sub_5AEBB0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5AEBD7
mov	edx, [ebp+var_64]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5AEBD7
mov	[ebp+var_68], 1
jmp	short loc_5AEBDE

loc_5AEBD7:
mov	[ebp+var_68], 0

loc_5AEBDE:
movzx	ecx, byte ptr [ebp+var_68]
test	ecx, ecx
jz	short loc_5AEC22
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [edx+4]
mov	[ebp+var_14], ecx
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_19]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
call	sub_5AEBB0
jmp	loc_5AEDA8

loc_5AEC22:
mov	ecx, [ebp+var_64]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_5AED0A
xor	eax, eax
mov	[ebp+var_1A], al
mov	ecx, [ebp+var_64]
mov	edx, [ecx+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_4]
shl	edx, 4
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+arg_4]
shl	edx, 4
mov	eax, [ebp+var_64]
add	edx, [eax+4]
mov	ecx, [ebp+var_64]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_1B], dl
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 4
mov	edx, [ebp+var_8]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A290
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_4]
shl	edx, 4
add	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
sar	edx, 4
mov	[ebp+var_34], edx
jmp	short loc_5AECE1

loc_5AECCF:
mov	eax, [ebp+var_38]
add	eax, 10h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_34]
sub	ecx, 1
mov	[ebp+var_34], ecx

loc_5AECE1:
cmp	[ebp+var_34], 0
jle	short loc_5AED05
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	short loc_5AECCF

loc_5AED05:
jmp	loc_5AEDA8

loc_5AED0A:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+4]
push	eax
call	sub_5BF8F0
add	esp, 0Ch
mov	ecx, [ebp+var_64]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_1C], dl
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_4]
shl	edx, 4
mov	eax, [ebp+var_64]
add	edx, [eax+4]
mov	ecx, [ebp+var_64]
mov	[ecx+4], edx
mov	edx, [ebp+arg_0]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_60]
sar	eax, 4
mov	[ebp+var_5C], eax
jmp	short loc_5AED84

loc_5AED72:
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_5C]
sub	edx, 1
mov	[ebp+var_5C], edx

loc_5AED84:
cmp	[ebp+var_5C], 0
jle	short loc_5AEDA8
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_60]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
jmp	short loc_5AED72

loc_5AEDA8:
mov	esp, ebp
pop	ebp
retn	10h
sub_5AEBB0 endp

align 10h


; Attributes: bp-based frame

sub_5AEDB0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5AF065
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AEE19
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57D570
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7

loc_5AEE19:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AEE68
jb	short loc_5AEE5C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AEE68

loc_5AEE5C:
mov	[ebp+var_AC], 1
jmp	short loc_5AEE72

loc_5AEE68:
mov	[ebp+var_AC], 0

loc_5AEE72:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5AEEAD
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7
jmp	loc_5AF060

loc_5AEEAD:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AEEFC
jb	short loc_5AEEF0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AEEFC

loc_5AEEF0:
mov	[ebp+var_B8], 1
jmp	short loc_5AEF06

loc_5AEEFC:
mov	[ebp+var_B8], 0

loc_5AEF06:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5AEF2A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7

loc_5AEF2A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5AEF74
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7

loc_5AEF74:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AEFC3
jb	short loc_5AEFB7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AEFC3

loc_5AEFB7:
mov	[ebp+var_C4], 1
jmp	short loc_5AEFCD

loc_5AEFC3:
mov	[ebp+var_C4], 0

loc_5AEFCD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5AF035
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AF00E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7
jmp	short loc_5AF033

loc_5AF00E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7

loc_5AF033:
jmp	short loc_5AF060

loc_5AF035:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57D570
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7

loc_5AF060:
jmp	loc_5AF4B7

loc_5AF065:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5AF141
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AF0C9
jb	short loc_5AF0BD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AF0C9

loc_5AF0BD:
mov	[ebp+var_D0], 1
jmp	short loc_5AF0D3

loc_5AF0C9:
mov	[ebp+var_D0], 0

loc_5AF0D3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5AF111
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7
jmp	short loc_5AF13C

loc_5AF111:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57D570
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7

loc_5AF13C:
jmp	loc_5AF4B7

loc_5AF141:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AF1AA
jb	short loc_5AF19E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AF1AA

loc_5AF19E:
mov	[ebp+var_DC], 1
jmp	short loc_5AF1B4

loc_5AF1AA:
mov	[ebp+var_DC], 0

loc_5AF1B4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5AF23F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5AF21E
jb	short loc_5AF212
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5AF21E

loc_5AF212:
mov	[ebp+var_E8], 1
jmp	short loc_5AF228

loc_5AF21E:
mov	[ebp+var_E8], 0

loc_5AF228:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5AF23F
mov	[ebp+var_EC], 1
jmp	short loc_5AF249

loc_5AF23F:
mov	[ebp+var_EC], 0

loc_5AF249:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5AF25E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5AF25E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5AF2C0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5AF296
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7
jmp	short loc_5AF2BB

loc_5AF296:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	loc_5AF4B7

loc_5AF2BB:
jmp	loc_5AF4B7

loc_5AF2C0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5AF358
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AF345
jb	short loc_5AF339
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AF345

loc_5AF339:
mov	[ebp+var_F8], 1
jmp	short loc_5AF34F

loc_5AF345:
mov	[ebp+var_F8], 0

loc_5AF34F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5AF358:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5AF3F5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5AF3F5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5AF3E9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AF3D4
jb	short loc_5AF3C8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AF3D4

loc_5AF3C8:
mov	[ebp+var_104], 1
jmp	short loc_5AF3DE

loc_5AF3D4:
mov	[ebp+var_104], 0

loc_5AF3DE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5AF3F5

loc_5AF3E9:
mov	[ebp+var_108], 1
jmp	short loc_5AF3FF

loc_5AF3F5:
mov	[ebp+var_108], 0

loc_5AF3FF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5AF414
and	[ebp+var_4C], 0FFFFFFFDh

loc_5AF414:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5AF46D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AF449
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	short loc_5AF4B7
jmp	short loc_5AF46B

loc_5AF449:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_57E360
mov	eax, [ebp+arg_0]
jmp	short loc_5AF4B7

loc_5AF46B:
jmp	short loc_5AF4B7

loc_5AF46D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5AF48B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5AF4B7
jmp	short loc_5AF4B7

loc_5AF48B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_57D570
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5AF4B7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5AEDB0 endp

align 10h


; Attributes: bp-based frame

sub_5AF4C0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_5AF507
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6F80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5AF5BB

loc_5AF507:
cmp	[ebp+arg_10], 0
jnz	short loc_5AF540
cmp	[ebp+arg_C], 0
jnz	short loc_5AF537
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5AF540

loc_5AF537:
mov	[ebp+var_44], 1
jmp	short loc_5AF547

loc_5AF540:
mov	[ebp+var_44], 0

loc_5AF547:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5AF559
and	[ebp+var_C], 0FFFFFFFEh

loc_5AF559:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5AF58F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5C6F80
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5AF58D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5AF58D:
jmp	short loc_5AF5BB

loc_5AF58F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6F80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5AF5BB
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5AF5BB:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5AF4C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5AF600(void *)
sub_5AF600 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5AF600
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_407910
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5AF656
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5AF656:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5AF600 endp

align 10h


; Attributes: bp-based frame

sub_5AF670 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h

loc_5AF676:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 10h
jle	loc_5AF74F
cmp	[ebp+arg_C], 0
jnz	short loc_5AF6AB
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5BF990
add	esp, 10h
jmp	loc_5AF74F

loc_5AF6AB:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cdq
sub	eax, edx
sar	eax, 1
shl	eax, 4
add	eax, [ebp+arg_0]
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C4860
add	esp, 10h
mov	ecx, [eax]
mov	[ebp+var_14], ecx
mov	edx, [eax+4]
mov	[ebp+var_10], edx
mov	ecx, [eax+8]
mov	[ebp+var_C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_10]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+var_10]
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_8]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5BF9B0
add	esp, 1Ch
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5AF670
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_5AF676

loc_5AF74F:
mov	esp, ebp
pop	ebp
retn
sub_5AF670 endp

align 10h


; Attributes: bp-based frame

sub_5AF760 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 10h
jle	short loc_5AF7AA
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 100h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BFA30
add	esp, 10h
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 100h
push	eax
call	sub_5C76D0
add	esp, 10h
jmp	short loc_5AF7C0

loc_5AF7AA:
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BFA30
add	esp, 10h

loc_5AF7C0:
pop	ebp
retn
sub_5AF760 endp

align 10h


; Attributes: bp-based frame

sub_5AF7D0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5AF7D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_3C], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_3C]
jnz	short loc_5AF82C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_5C6F30
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_5AF8FB

loc_5AF82C:
cmp	[ebp+arg_10], 0
jnz	short loc_5AF872
cmp	[ebp+arg_C], 0
jnz	short loc_5AF869
or	[ebp+var_18], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_24], edx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_24]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AF872

loc_5AF869:
mov	[ebp+var_40], 1
jmp	short loc_5AF879

loc_5AF872:
mov	[ebp+var_40], 0

loc_5AF879:
mov	dl, byte ptr [ebp+var_40]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_18]
and	eax, 1
jz	short loc_5AF899
and	[ebp+var_18], 0FFFFFFFEh
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh

loc_5AF899:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5AF8CF
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_5C6F30
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5AF8CD
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx

loc_5AF8CD:
jmp	short loc_5AF8FB

loc_5AF8CF:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5C6F30
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5AF8FB
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax

loc_5AF8FB:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_3C]
add	eax, 4
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_3C]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_3C]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_5AF7D0 endp

align 10h


; Attributes: bp-based frame

sub_5AF950 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5AFC05
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5AF9B9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5BFC70
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B0057

loc_5AF9B9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AFA08
jb	short loc_5AF9FC
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AFA08

loc_5AF9FC:
mov	[ebp+var_AC], 1
jmp	short loc_5AFA12

loc_5AFA08:
mov	[ebp+var_AC], 0

loc_5AFA12:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5AFA4D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	loc_5B0057
jmp	loc_5AFC00

loc_5AFA4D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AFA9C
jb	short loc_5AFA90
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AFA9C

loc_5AFA90:
mov	[ebp+var_B8], 1
jmp	short loc_5AFAA6

loc_5AFA9C:
mov	[ebp+var_B8], 0

loc_5AFAA6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5AFACA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B0057

loc_5AFACA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5AFB14
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	loc_5B0057

loc_5AFB14:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AFB63
jb	short loc_5AFB57
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AFB63

loc_5AFB57:
mov	[ebp+var_C4], 1
jmp	short loc_5AFB6D

loc_5AFB63:
mov	[ebp+var_C4], 0

loc_5AFB6D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5AFBD5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AFBAE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	loc_5B0057
jmp	short loc_5AFBD3

loc_5AFBAE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	loc_5B0057

loc_5AFBD3:
jmp	short loc_5AFC00

loc_5AFBD5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5BFC70
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B0057

loc_5AFC00:
jmp	loc_5B0057

loc_5AFC05:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5AFCE1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AFC69
jb	short loc_5AFC5D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AFC69

loc_5AFC5D:
mov	[ebp+var_D0], 1
jmp	short loc_5AFC73

loc_5AFC69:
mov	[ebp+var_D0], 0

loc_5AFC73:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5AFCB1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	loc_5B0057
jmp	short loc_5AFCDC

loc_5AFCB1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5BFC70
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B0057

loc_5AFCDC:
jmp	loc_5B0057

loc_5AFCE1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AFD4A
jb	short loc_5AFD3E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AFD4A

loc_5AFD3E:
mov	[ebp+var_DC], 1
jmp	short loc_5AFD54

loc_5AFD4A:
mov	[ebp+var_DC], 0

loc_5AFD54:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5AFDDF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5AFDBE
jb	short loc_5AFDB2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5AFDBE

loc_5AFDB2:
mov	[ebp+var_E8], 1
jmp	short loc_5AFDC8

loc_5AFDBE:
mov	[ebp+var_E8], 0

loc_5AFDC8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5AFDDF
mov	[ebp+var_EC], 1
jmp	short loc_5AFDE9

loc_5AFDDF:
mov	[ebp+var_EC], 0

loc_5AFDE9:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5AFDFE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5AFDFE:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5AFE60
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5AFE36
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	loc_5B0057
jmp	short loc_5AFE5B

loc_5AFE36:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	loc_5B0057

loc_5AFE5B:
jmp	loc_5B0057

loc_5AFE60:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5AFEF8
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5AFEE5
jb	short loc_5AFED9
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5AFEE5

loc_5AFED9:
mov	[ebp+var_F8], 1
jmp	short loc_5AFEEF

loc_5AFEE5:
mov	[ebp+var_F8], 0

loc_5AFEEF:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5AFEF8:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5AFF95
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5AFF95
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5AFF89
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5AFF74
jb	short loc_5AFF68
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5AFF74

loc_5AFF68:
mov	[ebp+var_104], 1
jmp	short loc_5AFF7E

loc_5AFF74:
mov	[ebp+var_104], 0

loc_5AFF7E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5AFF95

loc_5AFF89:
mov	[ebp+var_108], 1
jmp	short loc_5AFF9F

loc_5AFF95:
mov	[ebp+var_108], 0

loc_5AFF9F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5AFFB4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5AFFB4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5B000D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5AFFE9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	short loc_5B0057
jmp	short loc_5B000B

loc_5AFFE9:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5BFB00
mov	eax, [ebp+arg_0]
jmp	short loc_5B0057

loc_5B000B:
jmp	short loc_5B0057

loc_5B000D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5B002B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B0057
jmp	short loc_5B0057

loc_5B002B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5BFC70
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B0057:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5AF950 endp

align 10h


; Attributes: bp-based frame

sub_5B0060 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5B008E

loc_5B0085:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5B008E:
cmp	[ebp+var_8], 0
jle	short loc_5B00B4
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5C68B0
mov	ecx, [ebp+var_1C]
add	ecx, 5Ch
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_20]
add	edx, 5Ch
mov	[ebp+var_20], edx
jmp	short loc_5B0085

loc_5B00B4:
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_5B0060 endp

align 10h


; Attributes: bp-based frame

sub_5B00C0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
push	esi
push	edi
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5A8F20
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_5BE350
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_5B0138

loc_5B0126:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 40h
mov	[ebp+var_38], ecx

loc_5B0138:
cmp	[ebp+var_3C], 0
jbe	short loc_5B014D
mov	esi, [ebp+arg_4]
mov	ecx, 10h
mov	edi, [ebp+var_38]
rep movsd
jmp	short loc_5B0126

loc_5B014D:
mov	edx, [ebp+var_38]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_5B0178
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_5B0178:
mov	ecx, [ebp+var_9C]
call	sub_5BE2E0
mov	edx, [ebp+var_4]
shl	edx, 6
add	edx, [ebp+var_8]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_5B00C0 endp



; Attributes: bp-based frame

sub_5B01C0 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_4B=	byte ptr -4Bh
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0D4h
push	esi
push	edi
mov	[ebp+var_D0], ecx
mov	eax, [ebp+var_D0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5B01F8
mov	edx, [ebp+var_D0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5B01F8
mov	[ebp+var_D4], 1
jmp	short loc_5B0202

loc_5B01F8:
mov	[ebp+var_D4], 0

loc_5B0202:
movzx	ecx, byte ptr [ebp+var_D4]
test	ecx, ecx
jz	short loc_5B023F
mov	esi, [ebp+arg_8]
mov	ecx, 10h
lea	edi, [ebp+var_48]
rep movsd
xor	edx, edx
mov	[ebp+var_49], dl
lea	eax, [ebp+var_49]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_5B01C0
jmp	loc_5B03EC

loc_5B023F:
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 6
mov	[ebp+var_4], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_5B032D
xor	eax, eax
mov	[ebp+var_4A], al
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+4]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_4]
shl	edx, 6
mov	eax, [ebp+var_D0]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_50]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+arg_4]
shl	edx, 6
mov	eax, [ebp+var_D0]
add	edx, [eax+4]
mov	ecx, [ebp+var_D0]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_4B], dl
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 6
mov	edx, [ebp+var_8]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A290
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ebp+var_68], ecx
mov	edx, [ebp+arg_4]
shl	edx, 6
add	edx, [ebp+arg_0]
sub	edx, [ebp+var_68]
sar	edx, 6
mov	[ebp+var_64], edx
jmp	short loc_5B0313

loc_5B0301:
mov	eax, [ebp+var_68]
add	eax, 40h
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_64]
sub	ecx, 1
mov	[ebp+var_64], ecx

loc_5B0313:
cmp	[ebp+var_64], 0
jle	short loc_5B0328
mov	esi, [ebp+arg_8]
mov	ecx, 10h
mov	edi, [ebp+var_68]
rep movsd
jmp	short loc_5B0301

loc_5B0328:
jmp	loc_5B03EC

loc_5B032D:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_D0]
mov	edx, [ecx+4]
push	edx
call	sub_5BFF30
add	esp, 0Ch
mov	ecx, [ebp+var_D0]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_4C], dl
mov	eax, [ebp+var_D0]
mov	ecx, [eax+4]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+var_C0]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_4]
shl	edx, 6
mov	eax, [ebp+var_D0]
add	edx, [eax+4]
mov	ecx, [ebp+var_D0]
mov	[ecx+4], edx
mov	edx, [ebp+arg_0]
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_CC]
sar	eax, 6
mov	[ebp+var_C8], eax
jmp	short loc_5B03D1

loc_5B03B3:
mov	ecx, [ebp+var_CC]
add	ecx, 40h
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
sub	edx, 1
mov	[ebp+var_C8], edx

loc_5B03D1:
cmp	[ebp+var_C8], 0
jle	short loc_5B03EC
mov	esi, [ebp+arg_8]
mov	ecx, 10h
mov	edi, [ebp+var_CC]
rep movsd
jmp	short loc_5B03B3

loc_5B03EC:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_5B01C0 endp

align 10h


; Attributes: bp-based frame

sub_5B0400 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_5C7D40
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_5D], al
movzx	ecx, [ebp+var_5D]
test	ecx, ecx
jnz	short loc_5B04A6
or	[ebp+var_38], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_5C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5B04A6
mov	[ebp+var_64], 0
jmp	short loc_5B04AD

loc_5B04A6:
mov	[ebp+var_64], 1

loc_5B04AD:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_38]
and	edx, 1
jz	short loc_5B04CD
and	[ebp+var_38], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5B04CD:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5B0528
mov	[ebp+var_2C], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_2C]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_58]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_58]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_5B7C30
lea	ecx, [ebp+var_34]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_68]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_5B0528:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5B0400 endp

align 10h


; Attributes: bp-based frame

sub_5B0540 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B0587
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE960
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B063A

loc_5B0587:
cmp	[ebp+arg_10], 0
jnz	short loc_5B05BF
cmp	[ebp+arg_C], 0
jnz	short loc_5B05B6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B05BF

loc_5B05B6:
mov	[ebp+var_34], 1
jmp	short loc_5B05C6

loc_5B05BF:
mov	[ebp+var_34], 0

loc_5B05C6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B05D8
and	[ebp+var_C], 0FFFFFFFEh

loc_5B05D8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B060E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE960
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B060C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B060C:
jmp	short loc_5B063A

loc_5B060E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE960
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B063A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B063A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B0540 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B0680(void *)
sub_5B0680 proc	near

var_3C=	dword ptr -3Ch
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
add	ecx, 1Ch
call	sub_5000F0
mov	ecx, [ebp+var_3C]
call	sub_5000F0
xor	edx, edx
and	edx, 1
jz	short loc_5B06BA
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B06BA:
mov	esp, ebp
pop	ebp
retn
sub_5B0680 endp

align 10h


; Attributes: bp-based frame

sub_5B06C0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_5AB4A0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B06C0 endp

align 10h


; Attributes: bp-based frame

sub_5B07C0 proc	near

var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F8h
mov	[ebp+var_F4], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_5B0830:
mov	edx, [ebp+var_F4]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5B09F7
mov	edx, [ebp+var_F4]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_68]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
jmp	short loc_5B08AA

loc_5B089A:
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	[ebp+var_20], edx

loc_5B08AA:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_5B0926
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_80]
push	edx
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_F4]
add	ecx, 1
call	sub_40A230
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B0926
jmp	loc_5B089A

loc_5B0926:
mov	edx, [ebp+var_24]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_40]
push	eax
call	sub_52A410
add	esp, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_90]
mov	[ebp+var_28], eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_20]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_98]
mov	[edx], eax
push	ecx
mov	[ebp+var_A0], esp
mov	ecx, [ebp+var_F4]
add	ecx, 4
mov	edx, [ebp+var_A0]
mov	[edx], ecx
mov	eax, [ebp+var_F4]
add	eax, 4
push	eax
push	ecx
mov	[ebp+var_A8], esp
mov	ecx, [ebp+var_28]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
lea	ecx, [ebp+var_C]
call	sub_5BE3C0
lea	ecx, [ebp+var_8]
push	ecx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	edx, [ebp+var_24]
lea	eax, [eax+edx*4+4]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_5B0830

loc_5B09F7:
mov	eax, [ebp+var_F4]
add	eax, 4
mov	[ebp+var_E8], eax
xor	ecx, ecx
mov	[ebp+var_DE], cl
mov	edx, [ebp+var_E8]
mov	eax, [edx]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E8]
mov	[edx], ecx
mov	eax, [ebp+var_E4]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F4]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_595D10
mov	esp, ebp
pop	ebp
retn	4
sub_5B07C0 endp

align 10h


; Attributes: bp-based frame

sub_5B0A60 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B0AA7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_498D00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B0B59

loc_5B0AA7:
cmp	[ebp+arg_10], 0
jnz	short loc_5B0ADE
cmp	[ebp+arg_C], 0
jnz	short loc_5B0AD5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B0ADE

loc_5B0AD5:
mov	[ebp+var_34], 1
jmp	short loc_5B0AE5

loc_5B0ADE:
mov	[ebp+var_34], 0

loc_5B0AE5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B0AF7
and	[ebp+var_C], 0FFFFFFFEh

loc_5B0AF7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B0B2D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_498D00
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B0B2B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B0B2B:
jmp	short loc_5B0B59

loc_5B0B2D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_498D00
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B0B59
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B0B59:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B0A60 endp

align 10h


; Attributes: bp-based frame

sub_5B0BA0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_5B0BC5

loc_5B0BBC:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_5B0BC5:
cmp	[ebp+var_4], 0
jle	loc_5B0CE4
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
cmp	edx, [ebp+arg_8]
jnz	short loc_5B0BF3
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5B0BF3
mov	[ebp+var_C], 1
jmp	short loc_5B0BFA

loc_5B0BF3:
mov	[ebp+var_C], 0

loc_5B0BFA:
movzx	edx, byte ptr [ebp+var_C]
test	edx, edx
jz	short loc_5B0C0A
mov	eax, [ebp+arg_0]
jmp	loc_5B0DD0

loc_5B0C0A:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+arg_8]
jnz	short loc_5B0C37
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
cmp	edx, [ebp+arg_C]
jnz	short loc_5B0C37
mov	[ebp+var_14], 1
jmp	short loc_5B0C3E

loc_5B0C37:
mov	[ebp+var_14], 0

loc_5B0C3E:
movzx	eax, byte ptr [ebp+var_14]
test	eax, eax
jz	short loc_5B0C4E
mov	eax, [ebp+arg_0]
jmp	loc_5B0DD0

loc_5B0C4E:
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_8]
jnz	short loc_5B0C7B
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
cmp	eax, [ebp+arg_C]
jnz	short loc_5B0C7B
mov	[ebp+var_1C], 1
jmp	short loc_5B0C82

loc_5B0C7B:
mov	[ebp+var_1C], 0

loc_5B0C82:
movzx	ecx, byte ptr [ebp+var_1C]
test	ecx, ecx
jz	short loc_5B0C92
mov	eax, [ebp+arg_0]
jmp	loc_5B0DD0

loc_5B0C92:
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
cmp	edx, [ebp+arg_8]
jnz	short loc_5B0CBF
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5B0CBF
mov	[ebp+var_24], 1
jmp	short loc_5B0CC6

loc_5B0CBF:
mov	[ebp+var_24], 0

loc_5B0CC6:
movzx	edx, byte ptr [ebp+var_24]
test	edx, edx
jz	short loc_5B0CD6
mov	eax, [ebp+arg_0]
jmp	loc_5B0DD0

loc_5B0CD6:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax
jmp	loc_5B0BBC

loc_5B0CE4:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_28], eax
cmp	[ebp+var_28], 1
jz	loc_5B0D95
cmp	[ebp+var_28], 2
jz	short loc_5B0D54
cmp	[ebp+var_28], 3
jz	short loc_5B0D10
jmp	loc_5B0DCD

loc_5B0D10:
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_8]
jnz	short loc_5B0D34
mov	edx, [ebp+var_2C]
mov	eax, [edx+4]
cmp	eax, [ebp+arg_C]
jnz	short loc_5B0D34
mov	[ebp+var_30], 1
jmp	short loc_5B0D3B

loc_5B0D34:
mov	[ebp+var_30], 0

loc_5B0D3B:
movzx	ecx, byte ptr [ebp+var_30]
test	ecx, ecx
jz	short loc_5B0D4B
mov	eax, [ebp+arg_0]
jmp	loc_5B0DD0

loc_5B0D4B:
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx

loc_5B0D54:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
cmp	edx, [ebp+arg_8]
jnz	short loc_5B0D78
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5B0D78
mov	[ebp+var_38], 1
jmp	short loc_5B0D7F

loc_5B0D78:
mov	[ebp+var_38], 0

loc_5B0D7F:
movzx	edx, byte ptr [ebp+var_38]
test	edx, edx
jz	short loc_5B0D8C
mov	eax, [ebp+arg_0]
jmp	short loc_5B0DD0

loc_5B0D8C:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax

loc_5B0D95:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx]
cmp	eax, [ebp+arg_8]
jnz	short loc_5B0DB9
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+4]
cmp	edx, [ebp+arg_C]
jnz	short loc_5B0DB9
mov	[ebp+var_40], 1
jmp	short loc_5B0DC0

loc_5B0DB9:
mov	[ebp+var_40], 0

loc_5B0DC0:
movzx	eax, byte ptr [ebp+var_40]
test	eax, eax
jz	short loc_5B0DCD
mov	eax, [ebp+arg_0]
jmp	short loc_5B0DD0

loc_5B0DCD:
mov	eax, [ebp+arg_4]

loc_5B0DD0:
mov	esp, ebp
pop	ebp
retn
sub_5B0BA0 endp

align 10h


; Attributes: bp-based frame

sub_5B0DE0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_5B0E05

loc_5B0DFC:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_5B0E05:
cmp	[ebp+var_4], 0
jle	loc_5B0F28
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
cmp	edx, [ebp+arg_8]
jnz	short loc_5B0E34
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5B0E34
mov	[ebp+var_C], 1
jmp	short loc_5B0E3B

loc_5B0E34:
mov	[ebp+var_C], 0

loc_5B0E3B:
movzx	edx, byte ptr [ebp+var_C]
test	edx, edx
jz	short loc_5B0E4B
mov	eax, [ebp+arg_0]
jmp	loc_5B1017

loc_5B0E4B:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
cmp	eax, [ebp+arg_8]
jnz	short loc_5B0E79
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
cmp	edx, [ebp+arg_C]
jnz	short loc_5B0E79
mov	[ebp+var_14], 1
jmp	short loc_5B0E80

loc_5B0E79:
mov	[ebp+var_14], 0

loc_5B0E80:
movzx	eax, byte ptr [ebp+var_14]
test	eax, eax
jz	short loc_5B0E90
mov	eax, [ebp+arg_0]
jmp	loc_5B1017

loc_5B0E90:
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_5B0EBE
mov	edx, [ebp+var_18]
mov	eax, [edx+0Ch]
cmp	eax, [ebp+arg_C]
jnz	short loc_5B0EBE
mov	[ebp+var_1C], 1
jmp	short loc_5B0EC5

loc_5B0EBE:
mov	[ebp+var_1C], 0

loc_5B0EC5:
movzx	ecx, byte ptr [ebp+var_1C]
test	ecx, ecx
jz	short loc_5B0ED5
mov	eax, [ebp+arg_0]
jmp	loc_5B1017

loc_5B0ED5:
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+8]
cmp	edx, [ebp+arg_8]
jnz	short loc_5B0F03
mov	eax, [ebp+var_20]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5B0F03
mov	[ebp+var_24], 1
jmp	short loc_5B0F0A

loc_5B0F03:
mov	[ebp+var_24], 0

loc_5B0F0A:
movzx	edx, byte ptr [ebp+var_24]
test	edx, edx
jz	short loc_5B0F1A
mov	eax, [ebp+arg_0]
jmp	loc_5B1017

loc_5B0F1A:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax
jmp	loc_5B0DFC

loc_5B0F28:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_28], eax
cmp	[ebp+var_28], 1
jz	loc_5B0FDB
cmp	[ebp+var_28], 2
jz	short loc_5B0F99
cmp	[ebp+var_28], 3
jz	short loc_5B0F54
jmp	loc_5B1014

loc_5B0F54:
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_5B0F79
mov	edx, [ebp+var_2C]
mov	eax, [edx+0Ch]
cmp	eax, [ebp+arg_C]
jnz	short loc_5B0F79
mov	[ebp+var_30], 1
jmp	short loc_5B0F80

loc_5B0F79:
mov	[ebp+var_30], 0

loc_5B0F80:
movzx	ecx, byte ptr [ebp+var_30]
test	ecx, ecx
jz	short loc_5B0F90
mov	eax, [ebp+arg_0]
jmp	loc_5B1017

loc_5B0F90:
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx

loc_5B0F99:
mov	eax, [ebp+arg_0]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+8]
cmp	edx, [ebp+arg_8]
jnz	short loc_5B0FBE
mov	eax, [ebp+var_34]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5B0FBE
mov	[ebp+var_38], 1
jmp	short loc_5B0FC5

loc_5B0FBE:
mov	[ebp+var_38], 0

loc_5B0FC5:
movzx	edx, byte ptr [ebp+var_38]
test	edx, edx
jz	short loc_5B0FD2
mov	eax, [ebp+arg_0]
jmp	short loc_5B1017

loc_5B0FD2:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax

loc_5B0FDB:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx+8]
cmp	eax, [ebp+arg_8]
jnz	short loc_5B1000
mov	ecx, [ebp+var_3C]
mov	edx, [ecx+0Ch]
cmp	edx, [ebp+arg_C]
jnz	short loc_5B1000
mov	[ebp+var_40], 1
jmp	short loc_5B1007

loc_5B1000:
mov	[ebp+var_40], 0

loc_5B1007:
movzx	eax, byte ptr [ebp+var_40]
test	eax, eax
jz	short loc_5B1014
mov	eax, [ebp+arg_0]
jmp	short loc_5B1017

loc_5B1014:
mov	eax, [ebp+arg_4]

loc_5B1017:
mov	esp, ebp
pop	ebp
retn
sub_5B0DE0 endp

align 10h


; Attributes: bp-based frame

sub_5B1020 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_55=	word ptr -55h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5BE4B0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_596750
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5B10A3

loc_5B109A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5B10A3:
cmp	[ebp+var_40], 0
jle	short loc_5B10D2
mov	eax, [ebp+var_4C]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_5C57D0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 88h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 88h
mov	[ebp+var_3C], eax
jmp	short loc_5B109A

loc_5B10D2:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5B1115
xor	edx, edx
mov	byte ptr [ebp+var_55+1], dl
mov	al, byte ptr [ebp+var_55+1]
mov	[ebp+var_52], al
xor	ecx, ecx
mov	byte ptr [ebp+var_55], cl
mov	dl, byte ptr [ebp+var_55]
mov	[ebp+var_53], dl
lea	eax, [ebp+var_53]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_5C9B60
add	esp, 0Ch
mov	eax, [ebp+var_C]
add	eax, 88h
mov	[ebp+var_C], eax
jmp	short loc_5B116F

loc_5B1115:
mov	ecx, [ebp+arg_C]
imul	ecx, 88h
add	ecx, [ebp+var_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5B1151

loc_5B113D:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 88h
mov	[ebp+var_68], eax

loc_5B1151:
cmp	[ebp+var_6C], 0
jle	short loc_5B1169
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_5C57D0
add	esp, 8
jmp	short loc_5B113D

loc_5B1169:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5B116F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5B120C
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5B11CE

loc_5B11C5:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5B11CE:
cmp	[ebp+var_80], 0
jle	short loc_5B1206
mov	eax, [ebp+var_8C]
push	eax
mov	ecx, [ebp+var_7C]
push	ecx
call	sub_5C57D0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 88h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 88h
mov	[ebp+var_7C], eax
jmp	short loc_5B11C5

loc_5B1206:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5B120C:
mov	ecx, [ebp+var_CC]
call	sub_5BE590
mov	edx, [ebp+var_4]
imul	edx, 88h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5B1020 endp

align 10h


; Attributes: bp-based frame

sub_5B1260 proc	near

var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_114= dword ptr -114h
var_10C= dword ptr -10Ch
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_D9=	byte ptr -0D9h
var_D8=	dword ptr -0D8h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_9D=	byte ptr -9Dh
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_93=	byte ptr -93h
var_92=	byte ptr -92h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_88=	byte ptr -88h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 128h
mov	[ebp+var_124], ecx
mov	eax, [ebp+var_124]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5B1296
mov	edx, [ebp+var_124]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5B1296
mov	[ebp+var_128], 1
jmp	short loc_5B12A0

loc_5B1296:
mov	[ebp+var_128], 0

loc_5B12A0:
movzx	ecx, byte ptr [ebp+var_128]
test	ecx, ecx
jz	loc_5B1337
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_90], eax
lea	ecx, [ebp+var_8C]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+var_98]
cmp	dword ptr [edx], 0
jz	short loc_5B12EC
mov	eax, [ebp+var_98]
mov	ecx, [eax]
call	sub_40AA80

loc_5B12EC:
mov	ecx, [ebp+arg_8]
add	ecx, 8
push	ecx
lea	ecx, [ebp+var_88]
call	sub_5895A0
xor	edx, edx
mov	[ebp+var_91], dl
lea	eax, [ebp+var_91]
push	eax
lea	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_124]
call	sub_5B1260
lea	ecx, [ebp+var_90]
call	sub_589490
jmp	loc_5B153F

loc_5B1337:
mov	ecx, [ebp+var_124]
mov	eax, [ecx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_124]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5B1437
xor	edx, edx
mov	[ebp+var_92], dl
mov	eax, [ebp+var_124]
mov	ecx, [eax+4]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_124]
mov	eax, [edx+4]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 88h
mov	edx, [ebp+var_124]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_B0], eax
push	0
lea	ecx, [ebp+var_9D]
push	ecx
mov	edx, [ebp+var_B8]
push	edx
mov	eax, [ebp+var_B4]
push	eax
mov	ecx, [ebp+var_B0]
push	ecx
call	sub_5BBFC0
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 88h
mov	eax, [ebp+var_124]
add	edx, [eax+4]
mov	ecx, [ebp+var_124]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_93], dl
lea	eax, [ebp+var_93]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
imul	edx, 88h
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C00A0
add	esp, 10h
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
imul	eax, 88h
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C0100
add	esp, 0Ch
jmp	loc_5B153F

loc_5B1437:
mov	edx, [ebp+var_124]
mov	eax, [edx+4]
mov	[ebp+var_F0], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 88h
add	ecx, [ebp+var_F0]
mov	[ebp+var_D8], ecx
push	0
lea	edx, [ebp+var_D9]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_D8]
push	ecx
mov	edx, [ebp+var_F0]
push	edx
call	sub_5C7890
add	esp, 14h
mov	eax, [ebp+var_124]
mov	ecx, [ebp+var_D8]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_94], dl
mov	eax, [ebp+var_124]
mov	ecx, [eax+4]
mov	[ebp+var_10C], ecx
push	0
lea	edx, [ebp+var_F1]
push	edx
mov	eax, [ebp+var_10C]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5BBFC0
add	esp, 14h
mov	eax, [ebp+var_4]
imul	eax, 88h
mov	ecx, [ebp+var_124]
add	eax, [ecx+4]
mov	edx, [ebp+var_124]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	[ebp+var_120], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_120]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_114], eax
jmp	short loc_5B1525

loc_5B1504:
mov	edx, [ebp+var_120]
add	edx, 88h
mov	[ebp+var_120], edx
mov	eax, [ebp+var_114]
sub	eax, 1
mov	[ebp+var_114], eax

loc_5B1525:
cmp	[ebp+var_114], 0
jle	short loc_5B153F
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_120]
call	sub_5BDD40
jmp	short loc_5B1504

loc_5B153F:
mov	esp, ebp
pop	ebp
retn	10h
sub_5B1260 endp

align 10h


; Attributes: bp-based frame

sub_5B1550 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B1597
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE610
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B1674

loc_5B1597:
cmp	[ebp+arg_10], 0
jnz	short loc_5B15F9
cmp	[ebp+arg_C], 0
jnz	short loc_5B15F0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B15E1
jb	short loc_5B15D8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B15E1

loc_5B15D8:
mov	[ebp+var_3C], 1
jmp	short loc_5B15E8

loc_5B15E1:
mov	[ebp+var_3C], 0

loc_5B15E8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5B15F9

loc_5B15F0:
mov	[ebp+var_40], 1
jmp	short loc_5B1600

loc_5B15F9:
mov	[ebp+var_40], 0

loc_5B1600:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5B1612
and	[ebp+var_C], 0FFFFFFFEh

loc_5B1612:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5B1648
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE610
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5B1646
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5B1646:
jmp	short loc_5B1674

loc_5B1648:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE610
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5B1674
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5B1674:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B1550 endp

align 10h


; Attributes: bp-based frame

sub_5B16C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B1707
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE660
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B17BA

loc_5B1707:
cmp	[ebp+arg_10], 0
jnz	short loc_5B173F
cmp	[ebp+arg_C], 0
jnz	short loc_5B1736
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B173F

loc_5B1736:
mov	[ebp+var_34], 1
jmp	short loc_5B1746

loc_5B173F:
mov	[ebp+var_34], 0

loc_5B1746:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B1758
and	[ebp+var_C], 0FFFFFFFEh

loc_5B1758:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B178E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE660
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B178C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B178C:
jmp	short loc_5B17BA

loc_5B178E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE660
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B17BA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B17BA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B16C0 endp

align 10h


; Attributes: bp-based frame

sub_5B1800 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B1847
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE6B0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B18FA

loc_5B1847:
cmp	[ebp+arg_10], 0
jnz	short loc_5B187F
cmp	[ebp+arg_C], 0
jnz	short loc_5B1876
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B187F

loc_5B1876:
mov	[ebp+var_34], 1
jmp	short loc_5B1886

loc_5B187F:
mov	[ebp+var_34], 0

loc_5B1886:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B1898
and	[ebp+var_C], 0FFFFFFFEh

loc_5B1898:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B18CE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE6B0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B18CC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B18CC:
jmp	short loc_5B18FA

loc_5B18CE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE6B0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B18FA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B18FA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B1800 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B1940(void *)
sub_5B1940 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_590E00
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B1969
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B1969:
mov	esp, ebp
pop	ebp
retn
sub_5B1940 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B1970(void *)
sub_5B1970 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_5021C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B1997
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B1997:
mov	esp, ebp
pop	ebp
retn
sub_5B1970 endp

align 10h


; Attributes: bp-based frame

sub_5B19A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B19E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5AAFA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B1A9A

loc_5B19E7:
cmp	[ebp+arg_10], 0
jnz	short loc_5B1A1F
cmp	[ebp+arg_C], 0
jnz	short loc_5B1A16
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B1A1F

loc_5B1A16:
mov	[ebp+var_34], 1
jmp	short loc_5B1A26

loc_5B1A1F:
mov	[ebp+var_34], 0

loc_5B1A26:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B1A38
and	[ebp+var_C], 0FFFFFFFEh

loc_5B1A38:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B1A6E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5AAFA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B1A6C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B1A6C:
jmp	short loc_5B1A9A

loc_5B1A6E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AAFA0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B1A9A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B1A9A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B19A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B1AE0(void *)
sub_5B1AE0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5B1AE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_439610
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_4], 4
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_5B1B4F
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B1B4F:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5B1AE0 endp

align 10h


; Attributes: bp-based frame

sub_5B1B60 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B1BA7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE700
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B1C5A

loc_5B1BA7:
cmp	[ebp+arg_10], 0
jnz	short loc_5B1BDF
cmp	[ebp+arg_C], 0
jnz	short loc_5B1BD6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B1BDF

loc_5B1BD6:
mov	[ebp+var_34], 1
jmp	short loc_5B1BE6

loc_5B1BDF:
mov	[ebp+var_34], 0

loc_5B1BE6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B1BF8
and	[ebp+var_C], 0FFFFFFFEh

loc_5B1BF8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B1C2E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE700
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B1C2C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B1C2C:
jmp	short loc_5B1C5A

loc_5B1C2E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE700
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B1C5A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B1C5A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B1B60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B1CA0(void *)
sub_5B1CA0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_5557D0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B1CC9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B1CC9:
mov	esp, ebp
pop	ebp
retn
sub_5B1CA0 endp

align 10h


; Attributes: bp-based frame

sub_5B1CD0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B1D17
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE750
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B1DCA

loc_5B1D17:
cmp	[ebp+arg_10], 0
jnz	short loc_5B1D4F
cmp	[ebp+arg_C], 0
jnz	short loc_5B1D46
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B1D4F

loc_5B1D46:
mov	[ebp+var_34], 1
jmp	short loc_5B1D56

loc_5B1D4F:
mov	[ebp+var_34], 0

loc_5B1D56:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B1D68
and	[ebp+var_C], 0FFFFFFFEh

loc_5B1D68:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B1D9E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE750
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B1D9C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B1D9C:
jmp	short loc_5B1DCA

loc_5B1D9E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE750
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B1DCA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B1DCA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B1CD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B1E10(void *)
sub_5B1E10 proc	near

var_5C=	dword ptr -5Ch
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
add	ecx, 24h
call	sub_555750
mov	ecx, [ebp+var_5C]
add	ecx, 4
call	sub_407910
xor	edx, edx
and	edx, 1
jz	short loc_5B1E4D
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B1E4D:
mov	esp, ebp
pop	ebp
retn
sub_5B1E10 endp

align 10h


; Attributes: bp-based frame

sub_5B1E60 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B2034
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B1EC9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C0290
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B230B

loc_5B1EC9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5B1F12
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	loc_5B230B
jmp	loc_5B202F

loc_5B1F12:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5B1F44
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B230B

loc_5B1F44:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5B1F8E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	loc_5B230B

loc_5B1F8E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B2004
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B1FDD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	loc_5B230B
jmp	short loc_5B2002

loc_5B1FDD:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	loc_5B230B

loc_5B2002:
jmp	short loc_5B202F

loc_5B2004:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0290
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B230B

loc_5B202F:
jmp	loc_5B230B

loc_5B2034:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5B20C5
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5B2095
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	loc_5B230B
jmp	short loc_5B20C0

loc_5B2095:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0290
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B230B

loc_5B20C0:
jmp	loc_5B230B

loc_5B20C5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5B212F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B212F
mov	[ebp+var_C4], 1
jmp	short loc_5B2139

loc_5B212F:
mov	[ebp+var_C4], 0

loc_5B2139:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B214E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B214E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B21B0
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B2186
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	loc_5B230B
jmp	short loc_5B21AB

loc_5B2186:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	loc_5B230B

loc_5B21AB:
jmp	loc_5B230B

loc_5B21B0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B21FD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5B21FD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5B2249
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5B2249
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5B223D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B2249

loc_5B223D:
mov	[ebp+var_C8], 1
jmp	short loc_5B2253

loc_5B2249:
mov	[ebp+var_C8], 0

loc_5B2253:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5B2268
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B2268:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5B22C1
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B229D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	short loc_5B230B
jmp	short loc_5B22BF

loc_5B229D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0150
mov	eax, [ebp+arg_0]
jmp	short loc_5B230B

loc_5B22BF:
jmp	short loc_5B230B

loc_5B22C1:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5B22DF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B230B
jmp	short loc_5B230B

loc_5B22DF:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C0290
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B230B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B1E60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B2320(void *)
sub_5B2320 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_407E50
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B234F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B234F:
mov	esp, ebp
pop	ebp
retn
sub_5B2320 endp

align 10h


; Attributes: bp-based frame

sub_5B2360 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B254F
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B23C9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C0560
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2851

loc_5B23C9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_5B2417
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	loc_5B2851
jmp	loc_5B254A

loc_5B2417:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_5B244E
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2851

loc_5B244E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_5B2498
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	loc_5B2851

loc_5B2498:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B2519
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B24F2
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	loc_5B2851
jmp	short loc_5B2517

loc_5B24F2:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	loc_5B2851

loc_5B2517:
jmp	short loc_5B254A

loc_5B2519:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C0560
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2851

loc_5B254A:
jmp	loc_5B2851

loc_5B254F:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_5B25F1
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_5B25BB
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	loc_5B2851
jmp	short loc_5B25EC

loc_5B25BB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C0560
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2851

loc_5B25EC:
jmp	loc_5B2851

loc_5B25F1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_5B266B
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B266B
mov	[ebp+var_15C], 1
jmp	short loc_5B2675

loc_5B266B:
mov	[ebp+var_15C], 0

loc_5B2675:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B268A
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B268A:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B26EC
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B26C2
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	loc_5B2851
jmp	short loc_5B26E7

loc_5B26C2:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	loc_5B2851

loc_5B26E7:
jmp	loc_5B2851

loc_5B26EC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B273E
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_5B273E:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_5B278F
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5B278F
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_5B2783
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5B278F

loc_5B2783:
mov	[ebp+var_160], 1
jmp	short loc_5B2799

loc_5B278F:
mov	[ebp+var_160], 0

loc_5B2799:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5B27AE
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B27AE:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5B2807
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B27E3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	short loc_5B2851
jmp	short loc_5B2805

loc_5B27E3:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5C0420
mov	eax, [ebp+arg_0]
jmp	short loc_5B2851

loc_5B2805:
jmp	short loc_5B2851

loc_5B2807:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5B2825
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B2851
jmp	short loc_5B2851

loc_5B2825:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C0560
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B2851:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B2360 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B2860(void *)
sub_5B2860 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 28h
call	sub_407910
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B288F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B288F:
mov	esp, ebp
pop	ebp
retn
sub_5B2860 endp

align 10h


; Attributes: bp-based frame

sub_5B28A0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B2A80
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B2909
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C0860
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B

loc_5B2909:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B2956
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B
jmp	loc_5B2A7B

loc_5B2956:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B298C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B

loc_5B298C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B29D6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B

loc_5B29D6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B2A50
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B2A29
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B
jmp	short loc_5B2A4E

loc_5B2A29:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B

loc_5B2A4E:
jmp	short loc_5B2A7B

loc_5B2A50:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C0860
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B

loc_5B2A7B:
jmp	loc_5B2D6B

loc_5B2A80:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B2B15
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B2AE5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B
jmp	short loc_5B2B10

loc_5B2AE5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C0860
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B

loc_5B2B10:
jmp	loc_5B2D6B

loc_5B2B15:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B2B87
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B2B87
mov	[ebp+var_A4], 1
jmp	short loc_5B2B91

loc_5B2B87:
mov	[ebp+var_A4], 0

loc_5B2B91:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B2BA6
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B2BA6:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B2C08
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B2BDE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B
jmp	short loc_5B2C03

loc_5B2BDE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	loc_5B2D6B

loc_5B2C03:
jmp	loc_5B2D6B

loc_5B2C08:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B2C59
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_5B2C59:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B2CA9
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B2CA9
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B2C9D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B2CA9

loc_5B2C9D:
mov	[ebp+var_A8], 1
jmp	short loc_5B2CB3

loc_5B2CA9:
mov	[ebp+var_A8], 0

loc_5B2CB3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B2CC8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B2CC8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B2D21
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B2CFD
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	short loc_5B2D6B
jmp	short loc_5B2D1F

loc_5B2CFD:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C0720
mov	eax, [ebp+arg_0]
jmp	short loc_5B2D6B

loc_5B2D1F:
jmp	short loc_5B2D6B

loc_5B2D21:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B2D3F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B2D6B
jmp	short loc_5B2D6B

loc_5B2D3F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C0860
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B2D6B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B28A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B2D80(void *)
sub_5B2D80 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_539200
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B2DA9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B2DA9:
mov	esp, ebp
pop	ebp
retn
sub_5B2D80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B2DB0(void *)
sub_5B2DB0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 40h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 14h
call	sub_10111A0
xor	edx, edx
and	edx, 1
jz	short loc_5B2DED
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B2DED:
mov	esp, ebp
pop	ebp
retn
sub_5B2DB0 endp

align 10h


; Attributes: bp-based frame

sub_5B2E00 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B2E47
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE7A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B2F0B

loc_5B2E47:
cmp	[ebp+arg_10], 0
jnz	short loc_5B2E90
cmp	[ebp+arg_C], 0
jnz	short loc_5B2E87
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_5B2E78
mov	[ebp+var_34], 1
jmp	short loc_5B2E7F

loc_5B2E78:
mov	[ebp+var_34], 0

loc_5B2E7F:
movzx	edx, byte ptr [ebp+var_34]
test	edx, edx
jz	short loc_5B2E90

loc_5B2E87:
mov	[ebp+var_38], 1
jmp	short loc_5B2E97

loc_5B2E90:
mov	[ebp+var_38], 0

loc_5B2E97:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5B2EA9
and	[ebp+var_C], 0FFFFFFFEh

loc_5B2EA9:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5B2EDF
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE7A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5B2EDD
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5B2EDD:
jmp	short loc_5B2F0B

loc_5B2EDF:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE7A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5B2F0B
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5B2F0B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B2E00 endp

align 10h


; Attributes: bp-based frame

sub_5B2F50 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF090
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5B2FA6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5B2F50
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B2FA6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5B2FB5:
cmp	[ebp+arg_0], 0
jz	short loc_5B3022
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF090
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5B3011
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5B2F50
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5B3011:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5B2FB5

loc_5B3022:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5B2F50 endp

align 10h


; Attributes: bp-based frame

sub_5B3030 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B3204
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B3099
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C0B30
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB

loc_5B3099:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5B30E2
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB
jmp	loc_5B31FF

loc_5B30E2:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5B3114
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB

loc_5B3114:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5B315E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB

loc_5B315E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B31D4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B31AD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB
jmp	short loc_5B31D2

loc_5B31AD:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB

loc_5B31D2:
jmp	short loc_5B31FF

loc_5B31D4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0B30
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB

loc_5B31FF:
jmp	loc_5B34DB

loc_5B3204:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5B3295
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5B3265
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB
jmp	short loc_5B3290

loc_5B3265:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C0B30
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB

loc_5B3290:
jmp	loc_5B34DB

loc_5B3295:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5B32FF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B32FF
mov	[ebp+var_C4], 1
jmp	short loc_5B3309

loc_5B32FF:
mov	[ebp+var_C4], 0

loc_5B3309:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B331E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B331E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B3380
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B3356
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB
jmp	short loc_5B337B

loc_5B3356:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	loc_5B34DB

loc_5B337B:
jmp	loc_5B34DB

loc_5B3380:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B33CD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5B33CD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5B3419
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5B3419
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5B340D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B3419

loc_5B340D:
mov	[ebp+var_C8], 1
jmp	short loc_5B3423

loc_5B3419:
mov	[ebp+var_C8], 0

loc_5B3423:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5B3438
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B3438:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5B3491
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B346D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	short loc_5B34DB
jmp	short loc_5B348F

loc_5B346D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C09F0
mov	eax, [ebp+arg_0]
jmp	short loc_5B34DB

loc_5B348F:
jmp	short loc_5B34DB

loc_5B3491:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5B34AF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B34DB
jmp	short loc_5B34DB

loc_5B34AF:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C0B30
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B34DB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B3030 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B34F0(void *)
sub_5B34F0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
call	sub_407910
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B351F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B351F:
mov	esp, ebp
pop	ebp
retn
sub_5B34F0 endp

align 10h


; Attributes: bp-based frame

sub_5B3530 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5C0FB0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_5C0CC0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_5B3530 endp

align 10h


; Attributes: bp-based frame

sub_5B3570 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B374D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B35D9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C1180
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33

loc_5B35D9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B3625
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33
jmp	loc_5B3748

loc_5B3625:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B365A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33

loc_5B365A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B36A4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33

loc_5B36A4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B371D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B36F6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33
jmp	short loc_5B371B

loc_5B36F6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33

loc_5B371B:
jmp	short loc_5B3748

loc_5B371D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C1180
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33

loc_5B3748:
jmp	loc_5B3A33

loc_5B374D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B37E1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B37B1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33
jmp	short loc_5B37DC

loc_5B37B1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C1180
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33

loc_5B37DC:
jmp	loc_5B3A33

loc_5B37E1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B3851
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B3851
mov	[ebp+var_A4], 1
jmp	short loc_5B385B

loc_5B3851:
mov	[ebp+var_A4], 0

loc_5B385B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B3870
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B3870:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B38D2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B38A8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33
jmp	short loc_5B38CD

loc_5B38A8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	loc_5B3A33

loc_5B38CD:
jmp	loc_5B3A33

loc_5B38D2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B3922
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5B3922:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B3971
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B3971
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B3965
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5B3971

loc_5B3965:
mov	[ebp+var_A8], 1
jmp	short loc_5B397B

loc_5B3971:
mov	[ebp+var_A8], 0

loc_5B397B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B3990
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B3990:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B39E9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B39C5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	short loc_5B3A33
jmp	short loc_5B39E7

loc_5B39C5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C1040
mov	eax, [ebp+arg_0]
jmp	short loc_5B3A33

loc_5B39E7:
jmp	short loc_5B3A33

loc_5B39E9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B3A07
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B3A33
jmp	short loc_5B3A33

loc_5B3A07:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C1180
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B3A33:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B3570 endp

align 10h


; Attributes: bp-based frame

sub_5B3A40 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B3C2F
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B3AA9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1700
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31

loc_5B3AA9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_5B3AF7
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31
jmp	loc_5B3C2A

loc_5B3AF7:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_5B3B2E
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31

loc_5B3B2E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_5B3B78
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31

loc_5B3B78:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B3BF9
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B3BD2
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31
jmp	short loc_5B3BF7

loc_5B3BD2:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31

loc_5B3BF7:
jmp	short loc_5B3C2A

loc_5B3BF9:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C1700
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31

loc_5B3C2A:
jmp	loc_5B3F31

loc_5B3C2F:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_5B3CD1
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_5B3C9B
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31
jmp	short loc_5B3CCC

loc_5B3C9B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1700
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31

loc_5B3CCC:
jmp	loc_5B3F31

loc_5B3CD1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_5B3D4B
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B3D4B
mov	[ebp+var_15C], 1
jmp	short loc_5B3D55

loc_5B3D4B:
mov	[ebp+var_15C], 0

loc_5B3D55:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B3D6A
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B3D6A:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B3DCC
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B3DA2
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31
jmp	short loc_5B3DC7

loc_5B3DA2:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	loc_5B3F31

loc_5B3DC7:
jmp	loc_5B3F31

loc_5B3DCC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B3E1E
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_5B3E1E:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_5B3E6F
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5B3E6F
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_5B3E63
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5B3E6F

loc_5B3E63:
mov	[ebp+var_160], 1
jmp	short loc_5B3E79

loc_5B3E6F:
mov	[ebp+var_160], 0

loc_5B3E79:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5B3E8E
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B3E8E:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5B3EE7
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B3EC3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	short loc_5B3F31
jmp	short loc_5B3EE5

loc_5B3EC3:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5C15C0
mov	eax, [ebp+arg_0]
jmp	short loc_5B3F31

loc_5B3EE5:
jmp	short loc_5B3F31

loc_5B3EE7:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5B3F05
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B3F31
jmp	short loc_5B3F31

loc_5B3F05:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1700
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B3F31:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B3A40 endp

align 10h


; Attributes: bp-based frame

sub_5B3F40 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF0E0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5B3F96
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5B3F40
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B3F96:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5B3FA5:
cmp	[ebp+arg_0], 0
jz	short loc_5B4012
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF0E0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5B4001
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5B3F40
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5B4001:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5B3FA5

loc_5B4012:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5B3F40 endp

align 10h


; Attributes: bp-based frame

sub_5B4020 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B4200
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B4089
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C1A00
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB

loc_5B4089:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B40D6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB
jmp	loc_5B41FB

loc_5B40D6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B410C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB

loc_5B410C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B4156
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB

loc_5B4156:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B41D0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B41A9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB
jmp	short loc_5B41CE

loc_5B41A9:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB

loc_5B41CE:
jmp	short loc_5B41FB

loc_5B41D0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C1A00
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB

loc_5B41FB:
jmp	loc_5B44EB

loc_5B4200:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B4295
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B4265
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB
jmp	short loc_5B4290

loc_5B4265:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C1A00
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB

loc_5B4290:
jmp	loc_5B44EB

loc_5B4295:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B4307
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B4307
mov	[ebp+var_A4], 1
jmp	short loc_5B4311

loc_5B4307:
mov	[ebp+var_A4], 0

loc_5B4311:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B4326
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B4326:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B4388
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B435E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB
jmp	short loc_5B4383

loc_5B435E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	loc_5B44EB

loc_5B4383:
jmp	loc_5B44EB

loc_5B4388:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B43D9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_5B43D9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B4429
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B4429
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B441D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B4429

loc_5B441D:
mov	[ebp+var_A8], 1
jmp	short loc_5B4433

loc_5B4429:
mov	[ebp+var_A8], 0

loc_5B4433:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B4448
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B4448:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B44A1
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B447D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	short loc_5B44EB
jmp	short loc_5B449F

loc_5B447D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C18C0
mov	eax, [ebp+arg_0]
jmp	short loc_5B44EB

loc_5B449F:
jmp	short loc_5B44EB

loc_5B44A1:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B44BF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B44EB
jmp	short loc_5B44EB

loc_5B44BF:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C1A00
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B44EB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B4020 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5B4500(void *)
sub_5B4500 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 68h
call	sub_407E50
mov	ecx, [ebp+arg_0]
add	ecx, 3Ch
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B4532
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B4532:
mov	esp, ebp
pop	ebp
retn
sub_5B4500 endp

align 10h


; Attributes: bp-based frame

sub_5B4540 proc	near

var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+10h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_14]
jnz	loc_5B460E
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_4]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_24], edx
jmp	short loc_5B45C9

loc_5B45AB:
mov	eax, [ebp+var_24]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_2C], eax

loc_5B45C9:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_28]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B45F9
mov	edx, [ebp+var_24]
add	edx, 10h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_2C]
mov	edx, [eax]
cmp	edx, [ecx+10h]
jz	short loc_5B45F7
mov	[ebp+var_2D], 0
jmp	short loc_5B45FD

loc_5B45F7:
jmp	short loc_5B45AB

loc_5B45F9:
mov	[ebp+var_2D], 1

loc_5B45FD:
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5B460E
mov	[ebp+var_34], 1
jmp	short loc_5B4615

loc_5B460E:
mov	[ebp+var_34], 0

loc_5B4615:
mov	al, byte ptr [ebp+var_34]
mov	esp, ebp
pop	ebp
retn
sub_5B4540 endp

align 10h


; Attributes: bp-based frame

sub_5B4620 proc	near

var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 30h

loc_5B4626:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	loc_5B46FC
mov	eax, [ebp+arg_C]
xor	ecx, ecx
cmp	eax, [ebp+arg_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	loc_5B46FC
mov	eax, [ebp+arg_C]
add	eax, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B468B
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
jmp	short loc_5B46F7

loc_5B468B:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_C]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5B46C4
mov	eax, [ebp+arg_C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax
jmp	short loc_5B46F7

loc_5B46C4:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
push	edx
lea	ecx, [ebp+arg_14]
call	sub_51E690
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_C]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax

loc_5B46F7:
jmp	loc_5B4626

loc_5B46FC:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_30], ecx
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_30]
call	sub_4046E0
lea	ecx, [ebp+arg_1C]
call	sub_42CA30
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5B4620 endp

align 10h


; Attributes: bp-based frame

sub_5B4730 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_60]
push	ecx
mov	ecx, [ebp+var_64]
call	sub_520E70
mov	edx, [ebp+var_60]
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_5C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5B4730 endp



; Attributes: bp-based frame

sub_5B4760 proc	near

var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B494F
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B47C9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1CD0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51

loc_5B47C9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_5B4817
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51
jmp	loc_5B494A

loc_5B4817:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_5B484E
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51

loc_5B484E:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_158]
jnz	short loc_5B4898
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51

loc_5B4898:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B4919
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B48F2
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51
jmp	short loc_5B4917

loc_5B48F2:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51

loc_5B4917:
jmp	short loc_5B494A

loc_5B4919:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C1CD0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51

loc_5B494A:
jmp	loc_5B4C51

loc_5B494F:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_5B49F1
mov	ecx, [ebp+var_158]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_5B49BB
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51
jmp	short loc_5B49EC

loc_5B49BB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1CD0
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51

loc_5B49EC:
jmp	loc_5B4C51

loc_5B49F1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_5B4A6B
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_D4]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B4A6B
mov	[ebp+var_15C], 1
jmp	short loc_5B4A75

loc_5B4A6B:
mov	[ebp+var_15C], 0

loc_5B4A75:
mov	dl, byte ptr [ebp+var_15C]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B4A8A
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B4A8A:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B4AEC
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B4AC2
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51
jmp	short loc_5B4AE7

loc_5B4AC2:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	loc_5B4C51

loc_5B4AE7:
jmp	loc_5B4C51

loc_5B4AEC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B4B3E
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_EC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_EC]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_5B4B3E:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_5B4B8F
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5B4B8F
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_158]
jz	short loc_5B4B83
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_118], edx
mov	eax, [ebp+var_118]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5B4B8F

loc_5B4B83:
mov	[ebp+var_160], 1
jmp	short loc_5B4B99

loc_5B4B8F:
mov	[ebp+var_160], 0

loc_5B4B99:
mov	al, byte ptr [ebp+var_160]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5B4BAE
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B4BAE:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5B4C07
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B4BE3
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	short loc_5B4C51
jmp	short loc_5B4C05

loc_5B4BE3:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5C1B90
mov	eax, [ebp+arg_0]
jmp	short loc_5B4C51

loc_5B4C05:
jmp	short loc_5B4C51

loc_5B4C07:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5B4C25
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B4C51
jmp	short loc_5B4C51

loc_5B4C25:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5C1CD0
mov	[ebp+var_154], eax
mov	ecx, [ebp+var_154]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B4C51:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B4760 endp

align 10h


; Attributes: bp-based frame

sub_5B4C60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_404940
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155DFB4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+20h], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 24h
call	sub_403400
mov	ecx, [ebp+var_4]
call	sub_448BD0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5B4C60 endp

align 10h


; Attributes: bp-based frame

sub_5B4CB0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5C6E30
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5B4D06
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5B4CB0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B4D06:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5B4D15:
cmp	[ebp+arg_0], 0
jz	short loc_5B4D82
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5C6E30
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5B4D71
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5B4CB0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5B4D71:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5B4D15

loc_5B4D82:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5B4CB0 endp

align 10h


; Attributes: bp-based frame

sub_5B4D90 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B5045
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B4DF9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_503D20
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497

loc_5B4DF9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B4E48
jb	short loc_5B4E3C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B4E48

loc_5B4E3C:
mov	[ebp+var_AC], 1
jmp	short loc_5B4E52

loc_5B4E48:
mov	[ebp+var_AC], 0

loc_5B4E52:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5B4E8D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497
jmp	loc_5B5040

loc_5B4E8D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B4EDC
jb	short loc_5B4ED0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B4EDC

loc_5B4ED0:
mov	[ebp+var_B8], 1
jmp	short loc_5B4EE6

loc_5B4EDC:
mov	[ebp+var_B8], 0

loc_5B4EE6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5B4F0A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497

loc_5B4F0A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5B4F54
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497

loc_5B4F54:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B4FA3
jb	short loc_5B4F97
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B4FA3

loc_5B4F97:
mov	[ebp+var_C4], 1
jmp	short loc_5B4FAD

loc_5B4FA3:
mov	[ebp+var_C4], 0

loc_5B4FAD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B5015
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B4FEE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497
jmp	short loc_5B5013

loc_5B4FEE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497

loc_5B5013:
jmp	short loc_5B5040

loc_5B5015:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_503D20
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497

loc_5B5040:
jmp	loc_5B5497

loc_5B5045:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B5121
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B50A9
jb	short loc_5B509D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B50A9

loc_5B509D:
mov	[ebp+var_D0], 1
jmp	short loc_5B50B3

loc_5B50A9:
mov	[ebp+var_D0], 0

loc_5B50B3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5B50F1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497
jmp	short loc_5B511C

loc_5B50F1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_503D20
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497

loc_5B511C:
jmp	loc_5B5497

loc_5B5121:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B518A
jb	short loc_5B517E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B518A

loc_5B517E:
mov	[ebp+var_DC], 1
jmp	short loc_5B5194

loc_5B518A:
mov	[ebp+var_DC], 0

loc_5B5194:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5B521F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5B51FE
jb	short loc_5B51F2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5B51FE

loc_5B51F2:
mov	[ebp+var_E8], 1
jmp	short loc_5B5208

loc_5B51FE:
mov	[ebp+var_E8], 0

loc_5B5208:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5B521F
mov	[ebp+var_EC], 1
jmp	short loc_5B5229

loc_5B521F:
mov	[ebp+var_EC], 0

loc_5B5229:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5B523E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B523E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5B52A0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B5276
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497
jmp	short loc_5B529B

loc_5B5276:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	loc_5B5497

loc_5B529B:
jmp	loc_5B5497

loc_5B52A0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5B5338
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B5325
jb	short loc_5B5319
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B5325

loc_5B5319:
mov	[ebp+var_F8], 1
jmp	short loc_5B532F

loc_5B5325:
mov	[ebp+var_F8], 0

loc_5B532F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5B5338:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5B53D5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5B53D5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5B53C9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B53B4
jb	short loc_5B53A8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B53B4

loc_5B53A8:
mov	[ebp+var_104], 1
jmp	short loc_5B53BE

loc_5B53B4:
mov	[ebp+var_104], 0

loc_5B53BE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5B53D5

loc_5B53C9:
mov	[ebp+var_108], 1
jmp	short loc_5B53DF

loc_5B53D5:
mov	[ebp+var_108], 0

loc_5B53DF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5B53F4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B53F4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5B544D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B5429
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	short loc_5B5497
jmp	short loc_5B544B

loc_5B5429:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2FB0
mov	eax, [ebp+arg_0]
jmp	short loc_5B5497

loc_5B544B:
jmp	short loc_5B5497

loc_5B544D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5B546B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B5497
jmp	short loc_5B5497

loc_5B546B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_503D20
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B5497:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B4D90 endp

align 10h


; Attributes: bp-based frame

sub_5B54A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B54E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE7F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B559A

loc_5B54E7:
cmp	[ebp+arg_10], 0
jnz	short loc_5B551F
cmp	[ebp+arg_C], 0
jnz	short loc_5B5516
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B551F

loc_5B5516:
mov	[ebp+var_34], 1
jmp	short loc_5B5526

loc_5B551F:
mov	[ebp+var_34], 0

loc_5B5526:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B5538
and	[ebp+var_C], 0FFFFFFFEh

loc_5B5538:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B556E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE7F0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B556C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B556C:
jmp	short loc_5B559A

loc_5B556E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE7F0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B559A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B559A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B54A0 endp

align 10h


; Attributes: bp-based frame

sub_5B55E0 proc	near

var_34=	dword ptr -34h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h

loc_5B55E6:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, 10h
jle	loc_5B56A4
cmp	[ebp+arg_C], 0
jnz	short loc_5B5620
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C1F20
add	esp, 10h
jmp	loc_5B56A4

loc_5B5620:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, 50h
push	eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
cdq
sub	eax, edx
sar	eax, 1
imul	eax, 50h
add	eax, [ebp+arg_0]
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C1F40
add	esp, 0FFFFFFC0h
mov	ecx, esp
push	eax
call	sub_5870E0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C2060
add	esp, 5Ch
mov	[ebp+var_34], eax
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5B55E0
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_5B55E6

loc_5B56A4:
mov	esp, ebp
pop	ebp
retn
sub_5B55E0 endp

align 10h


; Attributes: bp-based frame

sub_5B56B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, 10h
jle	short loc_5B56FF
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_0]
add	eax, 500h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C2130
add	esp, 10h
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 500h
push	ecx
call	sub_5C7FA0
add	esp, 10h
jmp	short loc_5B5715

loc_5B56FF:
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C2130
add	esp, 10h

loc_5B5715:
pop	ebp
retn
sub_5B56B0 endp

align 10h


; Attributes: bp-based frame

sub_5B5720 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_C]
sar	edx, 3
mov	[ebp+var_8], edx
jmp	short loc_5B5749

loc_5B5740:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_5B5749:
cmp	[ebp+var_8], 0
jle	short loc_5B57A9
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_5B5789
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_5B576D
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA90

loc_5B576D:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_5B5789
mov	ecx, [ebp+var_10]
mov	ecx, [ecx]
call	sub_40AA80

loc_5B5789:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_10], eax
jmp	short loc_5B5740

loc_5B57A9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5B5720 endp



; Attributes: bp-based frame

; int __cdecl sub_5B57B0(void *)
sub_5B57B0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5B57D4
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5B57D4:
mov	esp, ebp
pop	ebp
retn
sub_5B57B0 endp

align 10h


; Attributes: bp-based frame

sub_5B57E0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B5827
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE840
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B5904

loc_5B5827:
cmp	[ebp+arg_10], 0
jnz	short loc_5B5889
cmp	[ebp+arg_C], 0
jnz	short loc_5B5880
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B5871
jb	short loc_5B5868
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B5871

loc_5B5868:
mov	[ebp+var_3C], 1
jmp	short loc_5B5878

loc_5B5871:
mov	[ebp+var_3C], 0

loc_5B5878:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5B5889

loc_5B5880:
mov	[ebp+var_40], 1
jmp	short loc_5B5890

loc_5B5889:
mov	[ebp+var_40], 0

loc_5B5890:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5B58A2
and	[ebp+var_C], 0FFFFFFFEh

loc_5B58A2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5B58D8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE840
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5B58D6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5B58D6:
jmp	short loc_5B5904

loc_5B58D8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE840
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5B5904
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5B5904:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B57E0 endp

align 10h


; Attributes: bp-based frame

sub_5B5950 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B5997
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE890
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B5A46

loc_5B5997:
cmp	[ebp+arg_10], 0
jnz	short loc_5B59CB
cmp	[ebp+arg_C], 0
jnz	short loc_5B59C2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5B59CB

loc_5B59C2:
mov	[ebp+var_34], 1
jmp	short loc_5B59D2

loc_5B59CB:
mov	[ebp+var_34], 0

loc_5B59D2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5B59E4
and	[ebp+var_C], 0FFFFFFFEh

loc_5B59E4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5B5A1A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE890
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5B5A18
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5B5A18:
jmp	short loc_5B5A46

loc_5B5A1A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE890
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5B5A46
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5B5A46:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B5950 endp

align 10h


; Attributes: bp-based frame

sub_5B5A90 proc	near

var_AC=	dword ptr -0ACh
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_5C2210
mov	esp, ebp
pop	ebp
retn	10h
sub_5B5A90 endp



; Attributes: bp-based frame

sub_5B5AC0 proc	near

var_AC=	dword ptr -0ACh
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_5C22A0
mov	esp, ebp
pop	ebp
retn	10h
sub_5B5AC0 endp



; Attributes: bp-based frame

sub_5B5AF0 proc	near

var_DC=	dword ptr -0DCh
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_5C2330
mov	esp, ebp
pop	ebp
retn	10h
sub_5B5AF0 endp



; Attributes: bp-based frame

sub_5B5B20 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B5B67
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E1BA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B5C44

loc_5B5B67:
cmp	[ebp+arg_10], 0
jnz	short loc_5B5BC9
cmp	[ebp+arg_C], 0
jnz	short loc_5B5BC0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B5BB1
jb	short loc_5B5BA8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B5BB1

loc_5B5BA8:
mov	[ebp+var_3C], 1
jmp	short loc_5B5BB8

loc_5B5BB1:
mov	[ebp+var_3C], 0

loc_5B5BB8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5B5BC9

loc_5B5BC0:
mov	[ebp+var_40], 1
jmp	short loc_5B5BD0

loc_5B5BC9:
mov	[ebp+var_40], 0

loc_5B5BD0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5B5BE2
and	[ebp+var_C], 0FFFFFFFEh

loc_5B5BE2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5B5C18
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4E1BA0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5B5C16
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5B5C16:
jmp	short loc_5B5C44

loc_5B5C18:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4E1BA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5B5C44
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5B5C44:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B5B20 endp

align 10h


; Attributes: bp-based frame

sub_5B5C90 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 2
cmp	eax, 10h
jle	short loc_5B5CD5
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 40h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_523B60
add	esp, 10h
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 40h
push	eax
call	sub_528CE0
add	esp, 10h
jmp	short loc_5B5CEB

loc_5B5CD5:
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_523B60
add	esp, 10h

loc_5B5CEB:
pop	ebp
retn
sub_5B5C90 endp

align 10h


; Attributes: bp-based frame

sub_5B5CF0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 58h

loc_5B5CF6:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, 10h
jle	loc_5B5DF3
cmp	[ebp+arg_C], 0
jnz	short loc_5B5D30
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C2470
add	esp, 10h
jmp	loc_5B5DF3

loc_5B5D30:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, 34h
push	eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
cdq
sub	eax, edx
sar	eax, 1
imul	eax, 34h
add	eax, [ebp+arg_0]
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C2490
add	esp, 10h
mov	[ebp+var_54], eax
sub	esp, 34h
mov	[ebp+var_50], esp
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_50]
call	sub_403400
mov	ecx, [ebp+var_50]
add	ecx, 28h
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_4C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_54]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_54]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C27F0
add	esp, 40h
mov	[ebp+var_58], eax
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5B5CF0
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_5B5CF6

loc_5B5DF3:
mov	esp, ebp
pop	ebp
retn
sub_5B5CF0 endp

align 10h


; Attributes: bp-based frame

sub_5B5E00 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, 10h
jle	short loc_5B5E4F
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_0]
add	eax, 340h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C2980
add	esp, 10h
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 340h
push	ecx
call	sub_5C8BC0
add	esp, 10h
jmp	short loc_5B5E65

loc_5B5E4F:
mov	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C2980
add	esp, 10h

loc_5B5E65:
pop	ebp
retn
sub_5B5E00 endp

align 10h


; Attributes: bp-based frame

sub_5B5E70 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B604D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B5ED9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2B50
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6333

loc_5B5ED9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B5F25
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	loc_5B6333
jmp	loc_5B6048

loc_5B5F25:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B5F5A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6333

loc_5B5F5A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B5FA4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	loc_5B6333

loc_5B5FA4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B601D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B5FF6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	loc_5B6333
jmp	short loc_5B601B

loc_5B5FF6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	loc_5B6333

loc_5B601B:
jmp	short loc_5B6048

loc_5B601D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2B50
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6333

loc_5B6048:
jmp	loc_5B6333

loc_5B604D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B60E1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B60B1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	loc_5B6333
jmp	short loc_5B60DC

loc_5B60B1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2B50
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6333

loc_5B60DC:
jmp	loc_5B6333

loc_5B60E1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B6151
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B6151
mov	[ebp+var_A4], 1
jmp	short loc_5B615B

loc_5B6151:
mov	[ebp+var_A4], 0

loc_5B615B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B6170
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B6170:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B61D2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B61A8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	loc_5B6333
jmp	short loc_5B61CD

loc_5B61A8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	loc_5B6333

loc_5B61CD:
jmp	loc_5B6333

loc_5B61D2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B6222
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5B6222:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B6271
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B6271
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B6265
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5B6271

loc_5B6265:
mov	[ebp+var_A8], 1
jmp	short loc_5B627B

loc_5B6271:
mov	[ebp+var_A8], 0

loc_5B627B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B6290
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B6290:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B62E9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B62C5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	short loc_5B6333
jmp	short loc_5B62E7

loc_5B62C5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2A10
mov	eax, [ebp+arg_0]
jmp	short loc_5B6333

loc_5B62E7:
jmp	short loc_5B6333

loc_5B62E9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B6307
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B6333
jmp	short loc_5B6333

loc_5B6307:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2B50
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B6333:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B5E70 endp

align 10h


; Attributes: bp-based frame

sub_5B6340 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B6387
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE910
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B6464

loc_5B6387:
cmp	[ebp+arg_10], 0
jnz	short loc_5B63E9
cmp	[ebp+arg_C], 0
jnz	short loc_5B63E0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B63D1
jb	short loc_5B63C8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B63D1

loc_5B63C8:
mov	[ebp+var_3C], 1
jmp	short loc_5B63D8

loc_5B63D1:
mov	[ebp+var_3C], 0

loc_5B63D8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5B63E9

loc_5B63E0:
mov	[ebp+var_40], 1
jmp	short loc_5B63F0

loc_5B63E9:
mov	[ebp+var_40], 0

loc_5B63F0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5B6402
and	[ebp+var_C], 0FFFFFFFEh

loc_5B6402:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5B6438
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE910
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5B6436
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5B6436:
jmp	short loc_5B6464

loc_5B6438:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE910
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5B6464
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5B6464:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B6340 endp

align 10h


; Attributes: bp-based frame

sub_5B64B0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B6765
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B6519
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5A06E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7

loc_5B6519:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B6568
jb	short loc_5B655C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B6568

loc_5B655C:
mov	[ebp+var_AC], 1
jmp	short loc_5B6572

loc_5B6568:
mov	[ebp+var_AC], 0

loc_5B6572:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5B65AD
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7
jmp	loc_5B6760

loc_5B65AD:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B65FC
jb	short loc_5B65F0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B65FC

loc_5B65F0:
mov	[ebp+var_B8], 1
jmp	short loc_5B6606

loc_5B65FC:
mov	[ebp+var_B8], 0

loc_5B6606:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5B662A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7

loc_5B662A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5B6674
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7

loc_5B6674:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B66C3
jb	short loc_5B66B7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B66C3

loc_5B66B7:
mov	[ebp+var_C4], 1
jmp	short loc_5B66CD

loc_5B66C3:
mov	[ebp+var_C4], 0

loc_5B66CD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B6735
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B670E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7
jmp	short loc_5B6733

loc_5B670E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7

loc_5B6733:
jmp	short loc_5B6760

loc_5B6735:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5A06E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7

loc_5B6760:
jmp	loc_5B6BB7

loc_5B6765:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B6841
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B67C9
jb	short loc_5B67BD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B67C9

loc_5B67BD:
mov	[ebp+var_D0], 1
jmp	short loc_5B67D3

loc_5B67C9:
mov	[ebp+var_D0], 0

loc_5B67D3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5B6811
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7
jmp	short loc_5B683C

loc_5B6811:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5A06E0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7

loc_5B683C:
jmp	loc_5B6BB7

loc_5B6841:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B68AA
jb	short loc_5B689E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B68AA

loc_5B689E:
mov	[ebp+var_DC], 1
jmp	short loc_5B68B4

loc_5B68AA:
mov	[ebp+var_DC], 0

loc_5B68B4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5B693F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5B691E
jb	short loc_5B6912

loc_5B6900:
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5B691E

loc_5B6912:
mov	[ebp+var_E8], 1
jmp	short loc_5B6928

loc_5B691E:
mov	[ebp+var_E8], 0

loc_5B6928:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5B693F
mov	[ebp+var_EC], 1
jmp	short loc_5B6949

loc_5B693F:
mov	[ebp+var_EC], 0

loc_5B6949:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5B695E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B695E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5B69C0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B6996
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7
jmp	short loc_5B69BB

loc_5B6996:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	loc_5B6BB7

loc_5B69BB:
jmp	loc_5B6BB7

loc_5B69C0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5B6A58
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B6A45
jb	short loc_5B6A39
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B6A45

loc_5B6A39:
mov	[ebp+var_F8], 1
jmp	short loc_5B6A4F

loc_5B6A45:
mov	[ebp+var_F8], 0

loc_5B6A4F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5B6A58:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5B6AF5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5B6AF5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5B6AE9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B6AD4
jb	short loc_5B6AC8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B6AD4

loc_5B6AC8:
mov	[ebp+var_104], 1
jmp	short loc_5B6ADE

loc_5B6AD4:
mov	[ebp+var_104], 0

loc_5B6ADE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5B6AF5

loc_5B6AE9:
mov	[ebp+var_108], 1
jmp	short loc_5B6AFF

loc_5B6AF5:
mov	[ebp+var_108], 0

loc_5B6AFF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5B6B14
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B6B14:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5B6B6D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B6B49
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	short loc_5B6BB7
jmp	short loc_5B6B6B

loc_5B6B49:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5B6340
mov	eax, [ebp+arg_0]
jmp	short loc_5B6BB7

loc_5B6B6B:
jmp	short loc_5B6BB7

loc_5B6B6D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5B6B8B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B6BB7
jmp	short loc_5B6BB7

loc_5B6B8B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5A06E0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B6BB7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B64B0 endp

align 10h


; Attributes: bp-based frame

sub_5B6BC0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B6D9D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B6C29
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2E20
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083

loc_5B6C29:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B6C75
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083
jmp	loc_5B6D98

loc_5B6C75:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B6CAA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083

loc_5B6CAA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B6CF4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083

loc_5B6CF4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B6D6D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B6D46
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083
jmp	short loc_5B6D6B

loc_5B6D46:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083

loc_5B6D6B:
jmp	short loc_5B6D98

loc_5B6D6D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2E20
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083

loc_5B6D98:
jmp	loc_5B7083

loc_5B6D9D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B6E31
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B6E01
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083
jmp	short loc_5B6E2C

loc_5B6E01:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2E20
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083

loc_5B6E2C:
jmp	loc_5B7083

loc_5B6E31:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B6EA1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B6EA1
mov	[ebp+var_A4], 1
jmp	short loc_5B6EAB

loc_5B6EA1:
mov	[ebp+var_A4], 0

loc_5B6EAB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B6EC0
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B6EC0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B6F22
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B6EF8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083
jmp	short loc_5B6F1D

loc_5B6EF8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	loc_5B7083

loc_5B6F1D:
jmp	loc_5B7083

loc_5B6F22:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B6F72
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5B6F72:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B6FC1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B6FC1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B6FB5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5B6FC1

loc_5B6FB5:
mov	[ebp+var_A8], 1
jmp	short loc_5B6FCB

loc_5B6FC1:
mov	[ebp+var_A8], 0

loc_5B6FCB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B6FE0
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B6FE0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B7039
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B7015
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	short loc_5B7083
jmp	short loc_5B7037

loc_5B7015:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C2CE0
mov	eax, [ebp+arg_0]
jmp	short loc_5B7083

loc_5B7037:
jmp	short loc_5B7083

loc_5B7039:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B7057
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B7083
jmp	short loc_5B7083

loc_5B7057:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C2E20
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B7083:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B6BC0 endp

align 10h


; Attributes: bp-based frame

sub_5B7090 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B7270
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B70F9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E1490
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B755B

loc_5B70F9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B7146
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	loc_5B755B
jmp	loc_5B726B

loc_5B7146:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B717C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B755B

loc_5B717C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B71C6
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	loc_5B755B

loc_5B71C6:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B7240
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B7219
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	loc_5B755B
jmp	short loc_5B723E

loc_5B7219:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	loc_5B755B

loc_5B723E:
jmp	short loc_5B726B

loc_5B7240:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E1490
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B755B

loc_5B726B:
jmp	loc_5B755B

loc_5B7270:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B7305
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B72D5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	loc_5B755B
jmp	short loc_5B7300

loc_5B72D5:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E1490
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B755B

loc_5B7300:
jmp	loc_5B755B

loc_5B7305:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B7377
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B7377
mov	[ebp+var_A4], 1
jmp	short loc_5B7381

loc_5B7377:
mov	[ebp+var_A4], 0

loc_5B7381:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B7396
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B7396:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B73F8
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B73CE
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	loc_5B755B
jmp	short loc_5B73F3

loc_5B73CE:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	loc_5B755B

loc_5B73F3:
jmp	loc_5B755B

loc_5B73F8:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B7449
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_5B7449:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B7499
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B7499
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B748D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B7499

loc_5B748D:
mov	[ebp+var_A8], 1
jmp	short loc_5B74A3

loc_5B7499:
mov	[ebp+var_A8], 0

loc_5B74A3:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B74B8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B74B8:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B7511
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B74ED
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	short loc_5B755B
jmp	short loc_5B750F

loc_5B74ED:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E3F90
mov	eax, [ebp+arg_0]
jmp	short loc_5B755B

loc_5B750F:
jmp	short loc_5B755B

loc_5B7511:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B752F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B755B
jmp	short loc_5B755B

loc_5B752F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E1490
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B755B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B7090 endp

align 10h


; Attributes: bp-based frame

sub_5B7570 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_64]
cmp	[edx+24h], ecx
jbe	short loc_5B761B
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_5B75F3
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_5B7616

loc_5B75F3:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_5B7616:
jmp	loc_5B76C8

loc_5B761B:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_64]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5A9600
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_5B76B6
mov	ecx, [ebp+var_50]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5B76B6:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_5B76C8:
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 20h
shl	eax, 2
mov	ecx, [ebp+var_64]
add	eax, [ecx+4]
mov	edx, [ebp+var_64]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_58], 80h
mov	eax, 20h
shl	eax, 2
mov	ecx, [ebp+var_5C]
add	eax, [ecx+4]
mov	edx, [ebp+var_5C]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_5B7570 endp

align 10h


; Attributes: bp-based frame

sub_5B7750 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B7930
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B77B9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_48B470
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B

loc_5B77B9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B7806
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B
jmp	loc_5B792B

loc_5B7806:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B783C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B

loc_5B783C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B7886
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B

loc_5B7886:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B7900
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B78D9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B
jmp	short loc_5B78FE

loc_5B78D9:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B

loc_5B78FE:
jmp	short loc_5B792B

loc_5B7900:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_48B470
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B

loc_5B792B:
jmp	loc_5B7C1B

loc_5B7930:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B79C5
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B7995
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B
jmp	short loc_5B79C0

loc_5B7995:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_48B470
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B

loc_5B79C0:
jmp	loc_5B7C1B

loc_5B79C5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B7A37
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B7A37
mov	[ebp+var_A4], 1
jmp	short loc_5B7A41

loc_5B7A37:
mov	[ebp+var_A4], 0

loc_5B7A41:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B7A56
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B7A56:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B7AB8
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B7A8E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B
jmp	short loc_5B7AB3

loc_5B7A8E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	loc_5B7C1B

loc_5B7AB3:
jmp	loc_5B7C1B

loc_5B7AB8:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B7B09
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_5B7B09:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B7B59
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B7B59
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B7B4D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B7B59

loc_5B7B4D:
mov	[ebp+var_A8], 1
jmp	short loc_5B7B63

loc_5B7B59:
mov	[ebp+var_A8], 0

loc_5B7B63:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B7B78
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B7B78:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B7BD1
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B7BAD
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	short loc_5B7C1B
jmp	short loc_5B7BCF

loc_5B7BAD:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C31B0
mov	eax, [ebp+arg_0]
jmp	short loc_5B7C1B

loc_5B7BCF:
jmp	short loc_5B7C1B

loc_5B7BD1:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B7BEF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B7C1B
jmp	short loc_5B7C1B

loc_5B7BEF:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_48B470
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B7C1B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B7750 endp

align 10h


; Attributes: bp-based frame

sub_5B7C30 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B7E10
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B7C99
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_509850
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB

loc_5B7C99:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5B7CE6
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB
jmp	loc_5B7E0B

loc_5B7CE6:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5B7D1C
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB

loc_5B7D1C:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5B7D66
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB

loc_5B7D66:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B7DE0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B7DB9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB
jmp	short loc_5B7DDE

loc_5B7DB9:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB

loc_5B7DDE:
jmp	short loc_5B7E0B

loc_5B7DE0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_509850
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB

loc_5B7E0B:
jmp	loc_5B80FB

loc_5B7E10:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B7EA5
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5B7E75
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB
jmp	short loc_5B7EA0

loc_5B7E75:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_509850
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB

loc_5B7EA0:
jmp	loc_5B80FB

loc_5B7EA5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5B7F17
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B7F17
mov	[ebp+var_A4], 1
jmp	short loc_5B7F21

loc_5B7F17:
mov	[ebp+var_A4], 0

loc_5B7F21:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B7F36
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B7F36:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B7F98
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B7F6E
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB
jmp	short loc_5B7F93

loc_5B7F6E:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	loc_5B80FB

loc_5B7F93:
jmp	loc_5B80FB

loc_5B7F98:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B7FE9
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
mov	[ebp+var_11], al

loc_5B7FE9:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B8039
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5B8039
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5B802D
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B8039

loc_5B802D:
mov	[ebp+var_A8], 1
jmp	short loc_5B8043

loc_5B8039:
mov	[ebp+var_A8], 0

loc_5B8043:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5B8058
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B8058:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5B80B1
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B808D
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	short loc_5B80FB
jmp	short loc_5B80AF

loc_5B808D:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5209B0
mov	eax, [ebp+arg_0]
jmp	short loc_5B80FB

loc_5B80AF:
jmp	short loc_5B80FB

loc_5B80B1:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5B80CF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B80FB
jmp	short loc_5B80FB

loc_5B80CF:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_509850
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B80FB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B7C30 endp

align 10h


; Attributes: bp-based frame

sub_5B8110 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 5Ch
idiv	ecx
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_5B8135

loc_5B812C:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_5B8135:
cmp	[ebp+var_4], 0
jle	loc_5B821C
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5B816C
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_8]
jmp	loc_5B82F2

loc_5B816C:
mov	ecx, [ebp+arg_0]
add	ecx, 5Ch
mov	[ebp+arg_0], ecx
lea	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A9E0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B81A2
mov	edx, [ebp+arg_0]
mov	[ebp+var_C], edx
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_C]
jmp	loc_5B82F2

loc_5B81A2:
mov	eax, [ebp+arg_0]
add	eax, 5Ch
mov	[ebp+arg_0], eax
lea	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5B81D8
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10], ecx
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_10]
jmp	loc_5B82F2

loc_5B81D8:
mov	edx, [ebp+arg_0]
add	edx, 5Ch
mov	[ebp+arg_0], edx
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5B820E
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_14]
jmp	loc_5B82F2

loc_5B820E:
mov	ecx, [ebp+arg_0]
add	ecx, 5Ch
mov	[ebp+arg_0], ecx
jmp	loc_5B812C

loc_5B821C:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_28], eax
cmp	[ebp+var_28], 1
jz	short loc_5B82AD
cmp	[ebp+var_28], 2
jz	short loc_5B827A
cmp	[ebp+var_28], 3
jz	short loc_5B8244
jmp	loc_5B82D7

loc_5B8244:
lea	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A9E0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B8271
mov	edx, [ebp+arg_0]
mov	[ebp+var_18], edx
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_18]
jmp	loc_5B82F2

loc_5B8271:
mov	eax, [ebp+arg_0]
add	eax, 5Ch
mov	[ebp+arg_0], eax

loc_5B827A:
lea	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5B82A4
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_1C]
jmp	short loc_5B82F2

loc_5B82A4:
mov	edx, [ebp+arg_0]
add	edx, 5Ch
mov	[ebp+arg_0], edx

loc_5B82AD:
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5B82D7
mov	eax, [ebp+arg_0]
mov	[ebp+var_20], eax
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_20]
jmp	short loc_5B82F2

loc_5B82D7:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_24], ecx
lea	ecx, [ebp+arg_8]
call	sub_407910
mov	eax, [ebp+var_24]
jmp	short loc_5B82F2
lea	ecx, [ebp+arg_8]
call	sub_407910

loc_5B82F2:
mov	esp, ebp
pop	ebp
retn
sub_5B8110 endp

align 10h


; Attributes: bp-based frame

sub_5B8300 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h

loc_5B8306:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 10h
jle	loc_5B83E3
cmp	[ebp+arg_C], 0
jnz	short loc_5B833C
movzx	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C3520
add	esp, 10h
jmp	loc_5B83E3

loc_5B833C:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cdq
sub	eax, edx
sar	eax, 1
shl	eax, 4
add	eax, [ebp+arg_0]
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C3540
add	esp, 10h
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [eax+4]
mov	[ebp+var_14], edx
mov	ecx, [eax+8]
mov	[ebp+var_10], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C3600
add	esp, 1Ch
mov	[ebp+var_4], eax
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5B8300
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_5B8306

loc_5B83E3:
mov	esp, ebp
pop	ebp
retn
sub_5B8300 endp

align 10h


; Attributes: bp-based frame

sub_5B83F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 10h
jle	short loc_5B843C
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 100h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C3690
add	esp, 10h
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 100h
push	eax
call	sub_5C8D90
add	esp, 10h
jmp	short loc_5B8453

loc_5B843C:
movzx	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C3690
add	esp, 10h

loc_5B8453:
pop	ebp
retn
sub_5B83F0 endp

align 10h


; Attributes: bp-based frame

sub_5B8460 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_20]
sub	edx, [ebp+var_1C]
sar	edx, 4
mov	[ebp+var_4], edx

loc_5B847E:
cmp	[ebp+var_4], 0
jle	loc_5B85B1
mov	eax, [ebp+var_4]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_C]
movzx	ecx, word ptr [eax+0Eh]
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+0Eh]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B84DE
mov	ecx, [ebp+var_C]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_4]
sub	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_4], eax
jmp	loc_5B85AC

loc_5B84DE:
mov	ecx, [ebp+var_C]
movzx	edx, word ptr [ecx+0Eh]
mov	eax, [ebp+arg_C]
movzx	ecx, word ptr [eax+0Eh]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B8505
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
jmp	loc_5B85AC

loc_5B8505:
mov	eax, [ebp+arg_18]
push	eax
movzx	ecx, [ebp+arg_14]
push	ecx
movzx	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5C3770
add	esp, 18h
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_C]
movzx	ecx, word ptr [eax+0Eh]
mov	edx, [ebp+var_10]
movzx	eax, word ptr [edx+0Eh]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B855C
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_5B85C5

loc_5B855C:
mov	edx, [ebp+var_4]
shl	edx, 4
add	edx, [ebp+arg_4]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_18]
push	ecx
movzx	edx, [ebp+arg_14]
push	edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_5C3800
add	esp, 18h
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_5B85C5

loc_5B85AC:
jmp	loc_5B847E

loc_5B85B1:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]

loc_5B85C5:
mov	esp, ebp
pop	ebp
retn
sub_5B8460 endp

align 10h


; Attributes: bp-based frame

sub_5B85D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_20]
sub	edx, [ebp+var_1C]
sar	edx, 4
mov	[ebp+var_4], edx

loc_5B85EE:
cmp	[ebp+var_4], 0
jle	loc_5B871E
mov	eax, [ebp+var_4]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_C]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+0Ch]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B864D
mov	ecx, [ebp+var_C]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_4]
sub	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_4], eax
jmp	loc_5B8719

loc_5B864D:
mov	ecx, [ebp+var_C]
movzx	edx, word ptr [ecx+0Ch]
mov	eax, [ebp+arg_C]
movzx	ecx, word ptr [eax]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B8673
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
jmp	loc_5B8719

loc_5B8673:
mov	eax, [ebp+arg_18]
push	eax
movzx	ecx, [ebp+arg_14]
push	ecx
movzx	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5C3890
add	esp, 18h
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_C]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_10]
movzx	eax, word ptr [edx+0Ch]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B86C9
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_5B8732

loc_5B86C9:
mov	edx, [ebp+var_4]
shl	edx, 4
add	edx, [ebp+arg_4]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_18]
push	ecx
movzx	edx, [ebp+arg_14]
push	edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_5C3920
add	esp, 18h
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_5B8732

loc_5B8719:
jmp	loc_5B85EE

loc_5B871E:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]

loc_5B8732:
mov	esp, ebp
pop	ebp
retn
sub_5B85D0 endp

align 10h


; Attributes: bp-based frame

sub_5B8740 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B89F5
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B87A9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_59A420
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47

loc_5B87A9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B87F8
jb	short loc_5B87EC
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B87F8

loc_5B87EC:
mov	[ebp+var_AC], 1
jmp	short loc_5B8802

loc_5B87F8:
mov	[ebp+var_AC], 0

loc_5B8802:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5B883D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47
jmp	loc_5B89F0

loc_5B883D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B888C
jb	short loc_5B8880
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B888C

loc_5B8880:
mov	[ebp+var_B8], 1
jmp	short loc_5B8896

loc_5B888C:
mov	[ebp+var_B8], 0

loc_5B8896:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5B88BA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47

loc_5B88BA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5B8904
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47

loc_5B8904:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B8953
jb	short loc_5B8947
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B8953

loc_5B8947:
mov	[ebp+var_C4], 1
jmp	short loc_5B895D

loc_5B8953:
mov	[ebp+var_C4], 0

loc_5B895D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B89C5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B899E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47
jmp	short loc_5B89C3

loc_5B899E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47

loc_5B89C3:
jmp	short loc_5B89F0

loc_5B89C5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_59A420
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47

loc_5B89F0:
jmp	loc_5B8E47

loc_5B89F5:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5B8AD1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B8A59
jb	short loc_5B8A4D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B8A59

loc_5B8A4D:
mov	[ebp+var_D0], 1
jmp	short loc_5B8A63

loc_5B8A59:
mov	[ebp+var_D0], 0

loc_5B8A63:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5B8AA1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47
jmp	short loc_5B8ACC

loc_5B8AA1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_59A420
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47

loc_5B8ACC:
jmp	loc_5B8E47

loc_5B8AD1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B8B3A
jb	short loc_5B8B2E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B8B3A

loc_5B8B2E:
mov	[ebp+var_DC], 1
jmp	short loc_5B8B44

loc_5B8B3A:
mov	[ebp+var_DC], 0

loc_5B8B44:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5B8BCF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5B8BAE
jb	short loc_5B8BA2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5B8BAE

loc_5B8BA2:
mov	[ebp+var_E8], 1
jmp	short loc_5B8BB8

loc_5B8BAE:
mov	[ebp+var_E8], 0

loc_5B8BB8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5B8BCF
mov	[ebp+var_EC], 1
jmp	short loc_5B8BD9

loc_5B8BCF:
mov	[ebp+var_EC], 0

loc_5B8BD9:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5B8BEE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B8BEE:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5B8C50
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5B8C26
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47
jmp	short loc_5B8C4B

loc_5B8C26:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	loc_5B8E47

loc_5B8C4B:
jmp	loc_5B8E47

loc_5B8C50:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5B8CE8
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5B8CD5
jb	short loc_5B8CC9
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5B8CD5

loc_5B8CC9:
mov	[ebp+var_F8], 1
jmp	short loc_5B8CDF

loc_5B8CD5:
mov	[ebp+var_F8], 0

loc_5B8CDF:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5B8CE8:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5B8D85
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5B8D85
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5B8D79
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5B8D64
jb	short loc_5B8D58
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5B8D64

loc_5B8D58:
mov	[ebp+var_104], 1
jmp	short loc_5B8D6E

loc_5B8D64:
mov	[ebp+var_104], 0

loc_5B8D6E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5B8D85

loc_5B8D79:
mov	[ebp+var_108], 1
jmp	short loc_5B8D8F

loc_5B8D85:
mov	[ebp+var_108], 0

loc_5B8D8F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5B8DA4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B8DA4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5B8DFD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B8DD9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	short loc_5B8E47
jmp	short loc_5B8DFB

loc_5B8DD9:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C3BC0
mov	eax, [ebp+arg_0]
jmp	short loc_5B8E47

loc_5B8DFB:
jmp	short loc_5B8E47

loc_5B8DFD:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5B8E1B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B8E47
jmp	short loc_5B8E47

loc_5B8E1B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_59A420
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B8E47:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B8740 endp

align 10h


; Attributes: bp-based frame

sub_5B8E50 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B8E97
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE9B0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B8F4A

loc_5B8E97:
cmp	[ebp+arg_10], 0
jnz	short loc_5B8ECF
cmp	[ebp+arg_C], 0
jnz	short loc_5B8EC6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B8ECF

loc_5B8EC6:
mov	[ebp+var_34], 1
jmp	short loc_5B8ED6

loc_5B8ECF:
mov	[ebp+var_34], 0

loc_5B8ED6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5B8EE8
and	[ebp+var_C], 0FFFFFFFEh

loc_5B8EE8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5B8F1E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE9B0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5B8F1C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5B8F1C:
jmp	short loc_5B8F4A

loc_5B8F1E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE9B0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5B8F4A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5B8F4A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B8E50 endp

align 10h


; Attributes: bp-based frame

sub_5B8F90 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5B9164
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B8FF9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C3F10
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B

loc_5B8FF9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5B9042
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B
jmp	loc_5B915F

loc_5B9042:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5B9074
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B

loc_5B9074:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5B90BE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B

loc_5B90BE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5B9134
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5B910D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B
jmp	short loc_5B9132

loc_5B910D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B

loc_5B9132:
jmp	short loc_5B915F

loc_5B9134:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C3F10
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B

loc_5B915F:
jmp	loc_5B943B

loc_5B9164:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5B91F5
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5B91C5
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B
jmp	short loc_5B91F0

loc_5B91C5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C3F10
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B

loc_5B91F0:
jmp	loc_5B943B

loc_5B91F5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5B925F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B925F
mov	[ebp+var_C4], 1
jmp	short loc_5B9269

loc_5B925F:
mov	[ebp+var_C4], 0

loc_5B9269:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5B927E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5B927E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5B92E0
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B92B6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B
jmp	short loc_5B92DB

loc_5B92B6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	loc_5B943B

loc_5B92DB:
jmp	loc_5B943B

loc_5B92E0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5B932D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5B932D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5B9379
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5B9379
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5B936D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5B9379

loc_5B936D:
mov	[ebp+var_C8], 1
jmp	short loc_5B9383

loc_5B9379:
mov	[ebp+var_C8], 0

loc_5B9383:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5B9398
and	[ebp+var_4C], 0FFFFFFFDh

loc_5B9398:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5B93F1
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5B93CD
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	short loc_5B943B
jmp	short loc_5B93EF

loc_5B93CD:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C3DD0
mov	eax, [ebp+arg_0]
jmp	short loc_5B943B

loc_5B93EF:
jmp	short loc_5B943B

loc_5B93F1:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5B940F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5B943B
jmp	short loc_5B943B

loc_5B940F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C3F10
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5B943B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5B8F90 endp

align 10h


; Attributes: bp-based frame

sub_5B9450 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 24h

loc_5B9456:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
cmp	eax, 10h
jle	loc_5B9518
cmp	[ebp+arg_C], 0
jnz	short loc_5B9491
movzx	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C4370
add	esp, 10h
jmp	loc_5B9518

loc_5B9491:
mov	eax, [ebp+arg_C]
sub	eax, 1
mov	[ebp+arg_C], eax
movzx	ecx, [ebp+arg_10]
push	ecx
movzx	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_4]
sub	eax, 64h
push	eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
cdq
sub	eax, edx
sar	eax, 1
imul	eax, 64h
add	eax, [ebp+arg_0]
push	eax
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C4390
add	esp, 0FFFFFFACh
mov	ecx, esp
push	eax
call	sub_5BD5D0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C4460
add	esp, 70h
mov	[ebp+var_24], eax
mov	edx, [ebp+var_24]
mov	[ebp+var_4], edx
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5B9450
add	esp, 14h
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
jmp	loc_5B9456

loc_5B9518:
mov	esp, ebp
pop	ebp
retn
sub_5B9450 endp

align 10h


; Attributes: bp-based frame

sub_5B9520 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
cmp	eax, 10h
jle	short loc_5B9578
movzx	edx, [ebp+arg_8]
push	edx
push	0
mov	eax, [ebp+arg_0]
add	eax, 640h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C4510
add	esp, 10h
mov	dl, [ebp+arg_8]
mov	[ebp+var_1], dl
movzx	eax, [ebp+var_1]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 640h
push	edx
call	sub_5C94B0
add	esp, 10h
jmp	short loc_5B958F

loc_5B9578:
movzx	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C4510
add	esp, 10h

loc_5B958F:
mov	esp, ebp
pop	ebp
retn
sub_5B9520 endp

align 10h


; Attributes: bp-based frame

sub_5B95A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h

loc_5B95A6:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	loc_5B9671
cmp	[ebp+arg_C], 0
jnz	short loc_5B95DB
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C4840
add	esp, 10h
jmp	loc_5B9671

loc_5B95DB:
mov	edx, [ebp+arg_C]
sub	edx, 1
mov	[ebp+arg_C], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, 8
push	edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cdq
sub	eax, edx
sar	eax, 1
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C4860
add	esp, 10h
mov	[ebp+var_10], eax
sub	esp, 8
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C4900
add	esp, 14h
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5B95A0
add	esp, 14h
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
jmp	loc_5B95A6

loc_5B9671:
mov	esp, ebp
pop	ebp
retn
sub_5B95A0 endp

align 10h


; Attributes: bp-based frame

sub_5B9680 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 10h
jle	short loc_5B96CA
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_0]
add	edx, 80h
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C4980
add	esp, 10h
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 80h
push	eax
call	sub_5C9740
add	esp, 10h
jmp	short loc_5B96E0

loc_5B96CA:
mov	ecx, [ebp+arg_8]
push	ecx
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C4980
add	esp, 10h

loc_5B96E0:
pop	ebp
retn
sub_5B9680 endp

align 10h


; Attributes: bp-based frame

sub_5B96F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5B9737
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5AB140
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5B97EE

loc_5B9737:
cmp	[ebp+arg_10], 0
jnz	short loc_5B9773
cmp	[ebp+arg_C], 0
jnz	short loc_5B976A
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5B9773

loc_5B976A:
mov	[ebp+var_34], 1
jmp	short loc_5B977A

loc_5B9773:
mov	[ebp+var_34], 0

loc_5B977A:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5B978C
and	[ebp+var_C], 0FFFFFFFEh

loc_5B978C:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5B97C2
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5AB140
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5B97C0
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5B97C0:
jmp	short loc_5B97EE

loc_5B97C2:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5AB140
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5B97EE
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5B97EE:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5B96F0 endp

align 10h


; Attributes: bp-based frame

sub_5B9830 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
push	esi
push	edi
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5BEA00
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_5BEB60
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_5B98A8

loc_5B9896:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 48h
mov	[ebp+var_38], ecx

loc_5B98A8:
cmp	[ebp+var_3C], 0
jbe	short loc_5B98BD
mov	esi, [ebp+arg_4]
mov	ecx, 12h
mov	edi, [ebp+var_38]
rep movsd
jmp	short loc_5B9896

loc_5B98BD:
mov	edx, [ebp+var_38]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_5B98E8
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_5B98E8:
mov	ecx, [ebp+var_9C]
call	sub_5BEAE0
mov	edx, [ebp+var_4]
imul	edx, 48h
add	edx, [ebp+var_8]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_5B9830 endp



; Attributes: bp-based frame

sub_5B9930 proc	near

var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D0=	dword ptr -0D0h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	byte ptr -50h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0E4h
push	esi
push	edi
mov	[ebp+var_E0], ecx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5B9968
mov	edx, [ebp+var_E0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5B9968
mov	[ebp+var_E4], 1
jmp	short loc_5B9972

loc_5B9968:
mov	[ebp+var_E4], 0

loc_5B9972:
movzx	ecx, byte ptr [ebp+var_E4]
test	ecx, ecx
jz	short loc_5B99AF
mov	esi, [ebp+arg_8]
mov	ecx, 12h
lea	edi, [ebp+var_50]
rep movsd
xor	edx, edx
mov	[ebp+var_51], dl
lea	eax, [ebp+var_51]
push	eax
lea	ecx, [ebp+var_50]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_5B9930
jmp	loc_5B9B6B

loc_5B99AF:
mov	ecx, [ebp+var_E0]
mov	eax, [ecx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_E0]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5B9AA7
xor	edx, edx
mov	[ebp+var_52], dl
mov	eax, [ebp+var_E0]
mov	ecx, [eax+4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_E0]
mov	eax, [edx+4]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 48h
mov	edx, [ebp+var_E0]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_60]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
mov	eax, [ebp+var_58]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
imul	ecx, 48h
mov	edx, [ebp+var_E0]
add	ecx, [edx+4]
mov	eax, [ebp+var_E0]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[ebp+var_53], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
imul	eax, 48h
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_70], eax
mov	eax, [ebp+arg_4]
imul	eax, 48h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_70]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5B9A8D

loc_5B9A7B:
mov	edx, [ebp+var_70]
add	edx, 48h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_6C]
sub	eax, 1
mov	[ebp+var_6C], eax

loc_5B9A8D:
cmp	[ebp+var_6C], 0
jle	short loc_5B9AA2
mov	esi, [ebp+arg_8]
mov	ecx, 12h
mov	edi, [ebp+var_70]
rep movsd
jmp	short loc_5B9A7B

loc_5B9AA2:
jmp	loc_5B9B6B

loc_5B9AA7:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_E0]
mov	ecx, [eax+4]
push	ecx
call	sub_5C4A90
add	esp, 0Ch
mov	edx, [ebp+var_E0]
mov	[edx+4], eax
xor	eax, eax
mov	[ebp+var_54], al
mov	ecx, [ebp+var_E0]
mov	edx, [ecx+4]
mov	[ebp+var_D0], edx
mov	eax, [ebp+var_D0]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_4]
imul	eax, 48h
mov	ecx, [ebp+var_E0]
add	eax, [ecx+4]
mov	edx, [ebp+var_E0]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	[ebp+var_DC], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_DC]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_D8], eax
jmp	short loc_5B9B50

loc_5B9B32:
mov	edx, [ebp+var_DC]
add	edx, 48h
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_D8]
sub	eax, 1
mov	[ebp+var_D8], eax

loc_5B9B50:
cmp	[ebp+var_D8], 0
jle	short loc_5B9B6B
mov	esi, [ebp+arg_8]
mov	ecx, 12h
mov	edi, [ebp+var_DC]
rep movsd
jmp	short loc_5B9B32

loc_5B9B6B:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_5B9930 endp

align 10h


; Attributes: bp-based frame

sub_5B9B80 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0D0h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D0]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_D0]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 3
mov	[ebp+var_40], edx
jmp	short loc_5B9BFE

loc_5B9BF5:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5B9BFE:
cmp	[ebp+var_40], 0
jle	short loc_5B9C28
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_4701B0
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 8
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 8
mov	[ebp+var_3C], ecx
jmp	short loc_5B9BF5

loc_5B9C28:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5B9C4F
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_4701B0
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx
jmp	short loc_5B9C9F

loc_5B9C4F:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*8]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_64]
sub	ecx, [ebp+var_C]
sar	ecx, 3
mov	[ebp+var_70], ecx
jmp	short loc_5B9C81

loc_5B9C6F:
mov	edx, [ebp+var_70]
sub	edx, 1
mov	[ebp+var_70], edx
mov	eax, [ebp+var_6C]
add	eax, 8
mov	[ebp+var_6C], eax

loc_5B9C81:
cmp	[ebp+var_70], 0
jle	short loc_5B9C99
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_6C]
push	edx		; void *
call	sub_4701B0
add	esp, 8
jmp	short loc_5B9C6F

loc_5B9C99:
mov	eax, [ebp+var_64]
mov	[ebp+var_C], eax

loc_5B9C9F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5B9D3E
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_95], cl
mov	edx, [ebp+var_D0]
mov	eax, [edx+4]
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_94]
sub	eax, [ebp+var_90]
sar	eax, 3
mov	[ebp+var_84], eax
jmp	short loc_5B9D02

loc_5B9CF3:
mov	ecx, [ebp+var_84]
sub	ecx, 1
mov	[ebp+var_84], ecx

loc_5B9D02:
cmp	[ebp+var_84], 0
jle	short loc_5B9D38
mov	edx, [ebp+var_90]
push	edx		; int
mov	eax, [ebp+var_80]
push	eax		; void *
call	sub_4701B0
add	esp, 8
mov	ecx, [ebp+var_90]
add	ecx, 8
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_80]
add	edx, 8
mov	[ebp+var_80], edx
jmp	short loc_5B9CF3

loc_5B9D38:
mov	eax, [ebp+var_80]
mov	[ebp+var_C], eax

loc_5B9D3E:
mov	ecx, [ebp+var_D0]
call	sub_5BEBE0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_D0]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_D0]
mov	eax, [ebp+var_CC]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5B9B80 endp

align 10h


; Attributes: bp-based frame

sub_5B9D90 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5B9DC6
mov	edx, [ebp+var_AC]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5B9DC6
mov	[ebp+var_B0], 1
jmp	short loc_5B9DD0

loc_5B9DC6:
mov	[ebp+var_B0], 0

loc_5B9DD0:
movzx	ecx, byte ptr [ebp+var_B0]
test	ecx, ecx
jz	short loc_5B9E33
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+var_18]
cmp	dword ptr [edx], 0
jz	short loc_5B9E06
mov	eax, [ebp+var_18]
mov	ecx, [eax]
call	sub_40AA80

loc_5B9E06:
xor	ecx, ecx
mov	[ebp+var_11], cl
lea	edx, [ebp+var_11]
push	edx
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_AC]
call	sub_5B9D90
lea	ecx, [ebp+var_C]
call	sub_429100
jmp	loc_5BA049

loc_5B9E33:
mov	eax, [ebp+var_AC]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_AC]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5B9F45
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_AC]
mov	ecx, [eax+4]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_AC]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 3
mov	edx, [ebp+var_AC]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_2C], eax
push	0
lea	ecx, [ebp+var_19]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5C9840
add	esp, 14h
mov	edx, [ebp+var_AC]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_AC]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_13], cl
mov	edx, [ebp+var_8]
mov	[ebp+var_44], edx
mov	eax, [ebp+arg_4]
shl	eax, 3
mov	ecx, [ebp+var_8]
sub	ecx, eax
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_3C], edx
jmp	short loc_5B9EF0

loc_5B9EE7:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax

loc_5B9EF0:
cmp	[ebp+var_3C], 0
jle	short loc_5B9F26
mov	ecx, [ebp+var_40]
sub	ecx, 8
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
sub	edx, 8
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_40]
add	eax, 4
push	eax
mov	ecx, [ebp+var_44]
add	ecx, 4
call	sub_4AD130
jmp	short loc_5B9EE7

loc_5B9F26:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C4B10
add	esp, 0Ch
jmp	loc_5BA049

loc_5B9F45:
mov	eax, [ebp+var_AC]
mov	ecx, [eax+4]
mov	[ebp+var_74], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
mov	eax, [ebp+var_74]
lea	ecx, [eax+edx*8]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_74]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_5C]
sub	eax, [ebp+var_74]
sar	eax, 3
mov	[ebp+var_68], eax
jmp	short loc_5B9F86

loc_5B9F74:
mov	ecx, [ebp+var_68]
sub	ecx, 1
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_64]
add	edx, 8
mov	[ebp+var_64], edx

loc_5B9F86:
cmp	[ebp+var_68], 0
jle	short loc_5B9F9E
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_64]
push	ecx		; void *
call	sub_4701B0
add	esp, 8
jmp	short loc_5B9F74

loc_5B9F9E:
mov	edx, [ebp+var_AC]
mov	eax, [ebp+var_5C]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_14], cl
mov	edx, [ebp+var_AC]
mov	eax, [edx+4]
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_94]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_90]
sar	eax, 3
mov	[ebp+var_80], eax
jmp	short loc_5B9FEA

loc_5B9FE1:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_5B9FEA:
cmp	[ebp+var_80], 0
jle	short loc_5BA01D
mov	edx, [ebp+var_90]
push	edx		; int
mov	eax, [ebp+var_7C]
push	eax		; void *
call	sub_4701B0
add	esp, 8
mov	ecx, [ebp+var_90]
add	ecx, 8
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_7C]
add	edx, 8
mov	[ebp+var_7C], edx
jmp	short loc_5B9FE1

loc_5BA01D:
mov	eax, [ebp+var_AC]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*8]
mov	ecx, [ebp+var_AC]
mov	[ecx+4], eax
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C4B10
add	esp, 0Ch

loc_5BA049:
mov	esp, ebp
pop	ebp
retn	10h
sub_5B9D90 endp

align 10h


; Attributes: bp-based frame

sub_5BA050 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BA097
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEC50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BA174

loc_5BA097:
cmp	[ebp+arg_10], 0
jnz	short loc_5BA0F9
cmp	[ebp+arg_C], 0
jnz	short loc_5BA0F0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5BA0E1
jb	short loc_5BA0D8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5BA0E1

loc_5BA0D8:
mov	[ebp+var_3C], 1
jmp	short loc_5BA0E8

loc_5BA0E1:
mov	[ebp+var_3C], 0

loc_5BA0E8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5BA0F9

loc_5BA0F0:
mov	[ebp+var_40], 1
jmp	short loc_5BA100

loc_5BA0F9:
mov	[ebp+var_40], 0

loc_5BA100:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5BA112
and	[ebp+var_C], 0FFFFFFFEh

loc_5BA112:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5BA148
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BEC50
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5BA146
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5BA146:
jmp	short loc_5BA174

loc_5BA148:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEC50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5BA174
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5BA174:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BA050 endp

align 10h


; Attributes: bp-based frame

sub_5BA1C0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_5BA1E0

loc_5BA1D7:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_5BA1E0:
cmp	[ebp+var_4], 0
jle	loc_5BA2CB
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[ebp+var_8], edx
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_5BA218
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jnz	short loc_5BA218
mov	eax, [ebp+arg_0]
jmp	loc_5BA384

loc_5BA218:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_5BA24F
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jnz	short loc_5BA24F
mov	eax, [ebp+arg_0]
jmp	loc_5BA384

loc_5BA24F:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[ebp+var_18], edx
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_5BA286
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jnz	short loc_5BA286
mov	eax, [ebp+arg_0]
jmp	loc_5BA384

loc_5BA286:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[ebp+var_20], edx
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_24]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_5BA2BD
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_24]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jnz	short loc_5BA2BD
mov	eax, [ebp+arg_0]
jmp	loc_5BA384

loc_5BA2BD:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+arg_0], ecx
jmp	loc_5BA1D7

loc_5BA2CB:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_28], edx
cmp	[ebp+var_28], 1
jz	short loc_5BA356
cmp	[ebp+var_28], 2
jz	short loc_5BA322
cmp	[ebp+var_28], 3
jz	short loc_5BA2EE
jmp	loc_5BA381

loc_5BA2EE:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_2C], eax
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_30]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_5BA319
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_30]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jnz	short loc_5BA319
mov	eax, [ebp+arg_0]
jmp	short loc_5BA384

loc_5BA319:
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx

loc_5BA322:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_5BA34D
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jnz	short loc_5BA34D
mov	eax, [ebp+arg_0]
jmp	short loc_5BA384

loc_5BA34D:
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx

loc_5BA356:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_3C], eax
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_40]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_5BA381
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_40]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jnz	short loc_5BA381
mov	eax, [ebp+arg_0]
jmp	short loc_5BA384

loc_5BA381:
mov	eax, [ebp+arg_4]

loc_5BA384:
mov	esp, ebp
pop	ebp
retn
sub_5BA1C0 endp

align 10h


; Attributes: bp-based frame

sub_5BA390 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5BA56D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BA3F9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C4E80
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BA853

loc_5BA3F9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5BA445
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	loc_5BA853
jmp	loc_5BA568

loc_5BA445:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5BA47A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BA853

loc_5BA47A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5BA4C4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	loc_5BA853

loc_5BA4C4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5BA53D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5BA516
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	loc_5BA853
jmp	short loc_5BA53B

loc_5BA516:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	loc_5BA853

loc_5BA53B:
jmp	short loc_5BA568

loc_5BA53D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C4E80
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BA853

loc_5BA568:
jmp	loc_5BA853

loc_5BA56D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5BA601
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5BA5D1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	loc_5BA853
jmp	short loc_5BA5FC

loc_5BA5D1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C4E80
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BA853

loc_5BA5FC:
jmp	loc_5BA853

loc_5BA601:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5BA671
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BA671
mov	[ebp+var_A4], 1
jmp	short loc_5BA67B

loc_5BA671:
mov	[ebp+var_A4], 0

loc_5BA67B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5BA690
and	[ebp+var_4C], 0FFFFFFFEh

loc_5BA690:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5BA6F2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5BA6C8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	loc_5BA853
jmp	short loc_5BA6ED

loc_5BA6C8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	loc_5BA853

loc_5BA6ED:
jmp	loc_5BA853

loc_5BA6F2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5BA742
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5BA742:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5BA791
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5BA791
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5BA785
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5BA791

loc_5BA785:
mov	[ebp+var_A8], 1
jmp	short loc_5BA79B

loc_5BA791:
mov	[ebp+var_A8], 0

loc_5BA79B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5BA7B0
and	[ebp+var_4C], 0FFFFFFFDh

loc_5BA7B0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5BA809
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5BA7E5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	short loc_5BA853
jmp	short loc_5BA807

loc_5BA7E5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C4D40
mov	eax, [ebp+arg_0]
jmp	short loc_5BA853

loc_5BA807:
jmp	short loc_5BA853

loc_5BA809:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5BA827
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5BA853
jmp	short loc_5BA853

loc_5BA827:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5C4E80
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5BA853:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5BA390 endp

align 10h


; Attributes: bp-based frame

sub_5BA860 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
lea	eax, [ebp+var_40]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+var_10]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
mov	[ebp+var_44], ecx
jmp	short loc_5BA89F

loc_5BA890:
mov	edx, [ebp+var_44]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_44], eax

loc_5BA89F:
mov	eax, [ebp+var_44]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5BA8C8
mov	eax, [ebp+var_44]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
push	ecx
lea	ecx, [ebp+var_40]
call	sub_5A9E30
jmp	short loc_5BA890

loc_5BA8C8:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_3C]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5BA860 endp

align 10h


; Attributes: bp-based frame

sub_5BA8F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[edx], ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5BA8F0 endp

align 10h


; Attributes: bp-based frame

sub_5BA920 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BA967
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BECA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BAA19

loc_5BA967:
cmp	[ebp+arg_10], 0
jnz	short loc_5BA99E
cmp	[ebp+arg_C], 0
jnz	short loc_5BA995
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BA99E

loc_5BA995:
mov	[ebp+var_34], 1
jmp	short loc_5BA9A5

loc_5BA99E:
mov	[ebp+var_34], 0

loc_5BA9A5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5BA9B7
and	[ebp+var_C], 0FFFFFFFEh

loc_5BA9B7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BA9ED
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BECA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5BA9EB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5BA9EB:
jmp	short loc_5BAA19

loc_5BA9ED:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BECA0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5BAA19
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BAA19:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BA920 endp

align 10h


; Attributes: bp-based frame

sub_5BAA60 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BECA0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5BAAB6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5BAA60
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BAAB6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5BAAC5:
cmp	[ebp+arg_0], 0
jz	short loc_5BAB32
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BECA0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5BAB21
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BAA60
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5BAB21:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5BAAC5

loc_5BAB32:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5BAA60 endp

align 10h


; Attributes: bp-based frame

sub_5BAB40 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BAB87
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BECF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BAC3A

loc_5BAB87:
cmp	[ebp+arg_10], 0
jnz	short loc_5BABBF
cmp	[ebp+arg_C], 0
jnz	short loc_5BABB6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BABBF

loc_5BABB6:
mov	[ebp+var_34], 1
jmp	short loc_5BABC6

loc_5BABBF:
mov	[ebp+var_34], 0

loc_5BABC6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5BABD8
and	[ebp+var_C], 0FFFFFFFEh

loc_5BABD8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BAC0E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BECF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5BAC0C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5BAC0C:
jmp	short loc_5BAC3A

loc_5BAC0E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BECF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5BAC3A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BAC3A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BAB40 endp

align 10h


; Attributes: bp-based frame

sub_5BAC80 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BACC7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BED40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BADAE

loc_5BACC7:
cmp	[ebp+arg_10], 0
jnz	short loc_5BAD33
cmp	[ebp+arg_C], 0
jnz	short loc_5BAD2A
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_5BACF4
mov	edx, [ebp+var_18]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_5BAD1B

loc_5BACF4:
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+var_18]
movzx	ecx, byte ptr [eax]
cmp	edx, ecx
jnz	short loc_5BAD12
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_18]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jl	short loc_5BAD1B

loc_5BAD12:
mov	[ebp+var_34], 0
jmp	short loc_5BAD22

loc_5BAD1B:
mov	[ebp+var_34], 1

loc_5BAD22:
movzx	edx, byte ptr [ebp+var_34]
test	edx, edx
jz	short loc_5BAD33

loc_5BAD2A:
mov	[ebp+var_38], 1
jmp	short loc_5BAD3A

loc_5BAD33:
mov	[ebp+var_38], 0

loc_5BAD3A:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5BAD4C
and	[ebp+var_C], 0FFFFFFFEh

loc_5BAD4C:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5BAD82
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BED40
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5BAD80
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5BAD80:
jmp	short loc_5BADAE

loc_5BAD82:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BED40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5BADAE
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5BADAE:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BAC80 endp

align 10h


; Attributes: bp-based frame

sub_5BADF0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BAE37
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BED90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BAEE9

loc_5BAE37:
cmp	[ebp+arg_10], 0
jnz	short loc_5BAE6E
cmp	[ebp+arg_C], 0
jnz	short loc_5BAE65
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BAE6E

loc_5BAE65:
mov	[ebp+var_34], 1
jmp	short loc_5BAE75

loc_5BAE6E:
mov	[ebp+var_34], 0

loc_5BAE75:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5BAE87
and	[ebp+var_C], 0FFFFFFFEh

loc_5BAE87:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BAEBD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BED90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5BAEBB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5BAEBB:
jmp	short loc_5BAEE9

loc_5BAEBD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BED90
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5BAEE9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BAEE9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BADF0 endp

align 10h


; Attributes: bp-based frame

sub_5BAF30 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BAF77
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEDE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BB02A

loc_5BAF77:
cmp	[ebp+arg_10], 0
jnz	short loc_5BAFAF
cmp	[ebp+arg_C], 0
jnz	short loc_5BAFA6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BAFAF

loc_5BAFA6:
mov	[ebp+var_34], 1
jmp	short loc_5BAFB6

loc_5BAFAF:
mov	[ebp+var_34], 0

loc_5BAFB6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5BAFC8
and	[ebp+var_C], 0FFFFFFFEh

loc_5BAFC8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BAFFE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BEDE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5BAFFC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5BAFFC:
jmp	short loc_5BB02A

loc_5BAFFE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BEDE0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5BB02A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BB02A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BAF30 endp

align 10h


; Attributes: bp-based frame

sub_5BB070 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BB0B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEE30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BB17B

loc_5BB0B7:
cmp	[ebp+arg_10], 0
jnz	short loc_5BB100
cmp	[ebp+arg_C], 0
jnz	short loc_5BB0F7
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
movss	xmm0, dword ptr	[eax]
comiss	xmm0, dword ptr	[ecx]
jbe	short loc_5BB0E8
mov	[ebp+var_34], 1
jmp	short loc_5BB0EF

loc_5BB0E8:
mov	[ebp+var_34], 0

loc_5BB0EF:
movzx	edx, byte ptr [ebp+var_34]
test	edx, edx
jz	short loc_5BB100

loc_5BB0F7:
mov	[ebp+var_38], 1
jmp	short loc_5BB107

loc_5BB100:
mov	[ebp+var_38], 0

loc_5BB107:
mov	al, byte ptr [ebp+var_38]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5BB119
and	[ebp+var_C], 0FFFFFFFEh

loc_5BB119:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5BB14F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BEE30
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5BB14D
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5BB14D:
jmp	short loc_5BB17B

loc_5BB14F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEE30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5BB17B
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5BB17B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BB070 endp

align 10h


; Attributes: bp-based frame

sub_5BB1C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BB207
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEE80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BB2B9

loc_5BB207:
cmp	[ebp+arg_10], 0
jnz	short loc_5BB23E
cmp	[ebp+arg_C], 0
jnz	short loc_5BB235
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BB23E

loc_5BB235:
mov	[ebp+var_34], 1
jmp	short loc_5BB245

loc_5BB23E:
mov	[ebp+var_34], 0

loc_5BB245:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5BB257
and	[ebp+var_C], 0FFFFFFFEh

loc_5BB257:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BB28D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BEE80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5BB28B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5BB28B:
jmp	short loc_5BB2B9

loc_5BB28D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BEE80
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5BB2B9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BB2B9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BB1C0 endp

align 10h


; Attributes: bp-based frame

sub_5BB300 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BB347
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEEE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BB3F9

loc_5BB347:
cmp	[ebp+arg_10], 0
jnz	short loc_5BB37E
cmp	[ebp+arg_C], 0
jnz	short loc_5BB375
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BB37E

loc_5BB375:
mov	[ebp+var_34], 1
jmp	short loc_5BB385

loc_5BB37E:
mov	[ebp+var_34], 0

loc_5BB385:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5BB397
and	[ebp+var_C], 0FFFFFFFEh

loc_5BB397:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BB3CD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BEEE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5BB3CB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5BB3CB:
jmp	short loc_5BB3F9

loc_5BB3CD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BEEE0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5BB3F9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BB3F9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BB300 endp

align 10h


; Attributes: bp-based frame

sub_5BB440 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BB487
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5AB290
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BB53C

loc_5BB487:
cmp	[ebp+arg_10], 0
jnz	short loc_5BB4C1
cmp	[ebp+arg_C], 0
jnz	short loc_5BB4B8
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
mov	ecx, [ebp+arg_8]
mov	eax, [edx+10h]
call	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BB4C1

loc_5BB4B8:
mov	[ebp+var_34], 1
jmp	short loc_5BB4C8

loc_5BB4C1:
mov	[ebp+var_34], 0

loc_5BB4C8:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5BB4DA
and	[ebp+var_C], 0FFFFFFFEh

loc_5BB4DA:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BB510
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5AB290
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5BB50E
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5BB50E:
jmp	short loc_5BB53C

loc_5BB510:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AB290
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5BB53C
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BB53C:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BB440 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BB580(void *, int)
sub_5BB580 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	34h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5BB5E3
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403400
mov	edx, [ebp+var_4]
add	edx, 28h
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	al, [edx+31h]
mov	[ecx+31h], al
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
jmp	short loc_5BB5EA

loc_5BB5E3:
mov	[ebp+var_C], 0

loc_5BB5EA:
mov	esp, ebp
pop	ebp
retn
sub_5BB580 endp

align 10h


; Attributes: bp-based frame

sub_5BB5F0 proc	near

var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_30]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_40]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
jmp	short loc_5BB645

loc_5BB63D:
lea	ecx, [ebp+var_40]
call	sub_592C00

loc_5BB645:
mov	eax, [ebp+var_40]
xor	ecx, ecx
cmp	eax, [ebp+var_30]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5BB666
xor	eax, eax
mov	[ebp+var_15], al
mov	ecx, [ebp+var_40]
call	sub_63CCE0
jmp	short loc_5BB63D

loc_5BB666:
mov	esp, ebp
pop	ebp
retn
sub_5BB5F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BB670(void *, int)
sub_5BB670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax		; void *
push	5Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5BB6F1
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_4]
add	edx, 0Ch
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_4]
add	eax, 1Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_440830
mov	ecx, [ebp+arg_4]
add	ecx, 34h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_10111B0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_5BB6F8

loc_5BB6F1:
mov	[ebp+var_8], 0

loc_5BB6F8:
mov	esp, ebp
pop	ebp
retn
sub_5BB670 endp

align 10h


; Attributes: bp-based frame

sub_5BB700 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C51E0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BB700 endp

align 10h


; Attributes: bp-based frame

sub_5BB740 proc	near

var_A8=	dword ptr -0A8h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_34=	byte ptr -34h
var_17=	byte ptr -17h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
lea	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
call	sub_402EB0
lea	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
call	sub_4046E0
lea	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
call	sub_402EB0
lea	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
call	sub_4046E0
mov	[ebp+var_15], 1
lea	ecx, [ebp+var_17]
call	nullsub_1
lea	ecx, [ebp+var_16]
call	nullsub_1
movzx	eax, [ebp+var_15]
test	eax, eax
jz	loc_5BB865

loc_5BB795:
lea	eax, [ebp+var_48]
lea	ecx, [ebp+var_8]
call	sub_402EB0
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_48]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5BB82F
lea	eax, [ebp+var_4C]
lea	ecx, [ebp+var_10]
call	sub_402EB0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_4C]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5BB82F
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_54], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_54]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5BB822
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_14]
call	sub_4046E0
lea	eax, [ebp+var_14]
call	sub_405E90
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_77E410
add	esp, 0Ch
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
jmp	short loc_5BB82A

loc_5BB822:
lea	eax, [ebp+var_C]
call	sub_405E90

loc_5BB82A:
jmp	loc_5BB795

loc_5BB82F:
lea	eax, [ebp+var_58]
lea	ecx, [ebp+var_10]
call	sub_402EB0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_58]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BB860
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77E410
add	esp, 0Ch

loc_5BB860:
jmp	loc_5BB9C6

loc_5BB865:
lea	eax, [ebp+var_5C]
lea	ecx, [ebp+var_8]
call	sub_402EB0
mov	edx, [ebp+var_C]
xor	eax, eax
cmp	edx, [ebp+var_5C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	loc_5BB953
lea	eax, [ebp+var_60]
lea	ecx, [ebp+var_10]
call	sub_402EB0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_60]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	loc_5BB953
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_64], edx
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_68], eax
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_68]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BB946
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_6C], edx
lea	eax, [ebp+var_80]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_70]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_439D80
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_80]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_78]
mov	ecx, [eax+4]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_78]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_74]
mov	[ecx+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_7C]
mov	[eax], ecx
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_7C]
mov	[edx+4], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_34]
call	sub_4046E0
lea	ecx, [ebp+var_34]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_C], eax
jmp	short loc_5BB94E

loc_5BB946:
lea	eax, [ebp+var_C]
call	sub_405E90

loc_5BB94E:
jmp	loc_5BB865

loc_5BB953:
lea	eax, [ebp+var_84]
lea	ecx, [ebp+var_10]
call	sub_402EB0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_84]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5BB9BD
push	ecx
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_88]
call	sub_4046E0
push	ecx
mov	[ebp+var_8C], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_8C]
call	sub_4046E0
push	ecx
mov	[ebp+var_90], esp
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_90]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
call	sub_5C52A0

loc_5BB9BD:
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_403A10

loc_5BB9C6:
lea	ecx, [ebp+arg_8]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_5BB740 endp

align 10h


; Attributes: bp-based frame

sub_5BB9E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5350
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BB9E0 endp

align 10h


; Attributes: bp-based frame

sub_5BBA20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C53E0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BBA20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BBA60(void *, int)
sub_5BBA60 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
push	esi
push	edi
mov	eax, [ebp+arg_0]
push	eax		; void *
push	74h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5BBAC2
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_44D270
mov	esi, [ebp+arg_4]
add	esi, 14h
mov	edi, [ebp+var_4]
add	edi, 14h
mov	ecx, 18h
rep movsd
mov	edx, [ebp+var_4]
mov	[ebp+var_28], edx
jmp	short loc_5BBAC9

loc_5BBAC2:
mov	[ebp+var_28], 0

loc_5BBAC9:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5BBA60 endp

align 10h


; Attributes: bp-based frame

sub_5BBAD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5440
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BBAD0 endp

align 10h


; Attributes: bp-based frame

sub_5BBB10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5500
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BBB10 endp

align 10h


; Attributes: bp-based frame

sub_5BBB50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
sub	eax, 8
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_1C]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+arg_4]
mov	[ecx-8], edx
mov	[ecx-4], eax
movzx	edx, [ebp+arg_C]
push	edx
sub	esp, 8
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
movss	xmm0, [ebp+var_1C]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	[ecx+4], edx
mov	eax, [ebp+arg_4]
sub	eax, 8
sub	eax, [ebp+arg_0]
sar	eax, 3
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C9A40
add	esp, 18h
mov	esp, ebp
pop	ebp
retn
sub_5BBB50 endp

align 10h


; Attributes: bp-based frame

sub_5BBBD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5630
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BBBD0 endp

align 10h


; Attributes: bp-based frame

sub_5BBC10 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5BBC42

loc_5BBC39:
mov	ecx, [ebp+var_24]
sub	ecx, 7Ch
mov	[ebp+var_24], ecx

loc_5BBC42:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BBC74
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 7Ch
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_5CA320
jmp	short loc_5BBC39

loc_5BBC74:
mov	esp, ebp
pop	ebp
retn
sub_5BBC10 endp

align 10h


; Attributes: bp-based frame

sub_5BBC80 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5BBCB2

loc_5BBCA9:
mov	ecx, [ebp+var_24]
sub	ecx, 68h
mov	[ebp+var_24], ecx

loc_5BBCB2:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BBCE8
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 68h
mov	[ebp+var_1C], ecx
push	0
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
call	edx
jmp	short loc_5BBCA9

loc_5BBCE8:
mov	esp, ebp
pop	ebp
retn
sub_5BBC80 endp

align 10h


; Attributes: bp-based frame

sub_5BBCF0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5BBD25

loc_5BBD19:
mov	ecx, [ebp+var_24]
sub	ecx, 90h
mov	[ebp+var_24], ecx

loc_5BBD25:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BBD5A
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 90h
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_5CA370
jmp	short loc_5BBD19

loc_5BBD5A:
mov	esp, ebp
pop	ebp
retn
sub_5BBCF0 endp

align 10h


; Attributes: bp-based frame

sub_5BBD60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 78h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5730
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BBD60 endp

align 10h


; Attributes: bp-based frame

sub_5BBDA0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5BBDD5

loc_5BBDC9:
mov	ecx, [ebp+var_24]
sub	ecx, 98h
mov	[ebp+var_24], ecx

loc_5BBDD5:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BBE0A
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 98h
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_5CA320
jmp	short loc_5BBDC9

loc_5BBE0A:
mov	esp, ebp
pop	ebp
retn
sub_5BBDA0 endp

align 10h


; Attributes: bp-based frame

sub_5BBE10 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_5BBE23

loc_5BBE1B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_5BBE23:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5BBE5F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_595740
jmp	short loc_5BBE1B

loc_5BBE5F:
mov	esp, ebp
pop	ebp
retn	10h
sub_5BBE10 endp

align 10h


; Attributes: bp-based frame

sub_5BBE70 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_5BBE83

loc_5BBE7B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_5BBE83:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5BBEBF
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_5957C0
jmp	short loc_5BBE7B

loc_5BBEBF:
mov	esp, ebp
pop	ebp
retn	10h
sub_5BBE70 endp

align 10h


; Attributes: bp-based frame

sub_5BBED0 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_5BBEE3

loc_5BBEDB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_5BBEE3:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5BBF1F
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_595840
jmp	short loc_5BBEDB

loc_5BBF1F:
mov	esp, ebp
pop	ebp
retn	10h
sub_5BBED0 endp

align 10h


; Attributes: bp-based frame

sub_5BBF30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 6
mov	[ebp+var_4], eax
jmp	short loc_5BBF4B

loc_5BBF42:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_5BBF4B:
cmp	[ebp+var_4], 0
jle	short loc_5BBFAD
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+arg_8]
call	sub_4023E0
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	ecx, [ecx+2Ch]
mov	[eax+2Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
mov	ecx, [edx+34h]
mov	edx, [ebp+arg_8]
mov	[edx+30h], eax
mov	[edx+34h], ecx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+38h]
mov	[eax+38h], dl
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+39h]
mov	[eax+39h], dl
mov	eax, [ebp+arg_0]
add	eax, 40h
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_8]
add	ecx, 40h
mov	[ebp+arg_8], ecx
jmp	short loc_5BBF42

loc_5BBFAD:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_5BBF30 endp

align 10h


; Attributes: bp-based frame

sub_5BBFC0 proc	near

var_C= word ptr	-0Ch
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5BBFE8

loc_5BBFDF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5BBFE8:
cmp	[ebp+var_8], 0
jle	short loc_5BC032
xor	eax, eax
mov	byte ptr [ebp+var_C+1],	al
mov	cl, byte ptr [ebp+var_C+1]
mov	[ebp+var_9], cl
xor	edx, edx
mov	byte ptr [ebp+var_C], dl
mov	al, byte ptr [ebp+var_C]
mov	[ebp+var_A], al
lea	ecx, [ebp+var_A]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_5C9B60
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 88h
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
add	edx, 88h
mov	[ebp+var_4], edx
jmp	short loc_5BBFDF

loc_5BC032:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5BBFC0 endp

align 10h


; Attributes: bp-based frame

sub_5BC040 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5BC058:
cmp	[ebp+var_8], 0
jz	short loc_5BC098
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jnz	short loc_5BC08D
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5BC096

loc_5BC08D:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5BC096:
jmp	short loc_5BC058

loc_5BC098:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_1C]
jz	short loc_5BC0C4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_14]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jz	short loc_5BC0C4
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax

loc_5BC0C4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BC040 endp

align 10h


; Attributes: bp-based frame

sub_5BC0D0 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5BC0E8:
cmp	[ebp+var_8], 0
jz	short loc_5BC12B
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
mov	edx, [eax+10h]
call	edx
movzx	eax, al
test	eax, eax
jnz	short loc_5BC120
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5BC129

loc_5BC120:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5BC129:
jmp	short loc_5BC0E8

loc_5BC12B:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_1C]
jz	short loc_5BC15A
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	edx, [eax]
mov	ecx, [ebp+arg_0]
mov	eax, [edx+10h]
call	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BC15A
mov	edx, [ebp+var_1C]
mov	[ebp+var_4], edx

loc_5BC15A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BC0D0 endp

align 10h


; Attributes: bp-based frame

sub_5BC170 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5BC18C

loc_5BC183:
mov	edx, [ebp+var_8]
add	edx, 34h
mov	[ebp+var_8], edx

loc_5BC18C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC1B6
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5BC1B4
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC1B4:
jmp	short loc_5BC183

loc_5BC1B6:
mov	esp, ebp
pop	ebp
retn
sub_5BC170 endp

align 10h


; Attributes: bp-based frame

sub_5BC1C0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5BC1DC

loc_5BC1D3:
mov	edx, [ebp+var_8]
add	edx, 50h
mov	[ebp+var_8], edx

loc_5BC1DC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC209
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5BC207
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC207:
jmp	short loc_5BC1D3

loc_5BC209:
mov	esp, ebp
pop	ebp
retn
sub_5BC1C0 endp

align 10h


; Attributes: bp-based frame

sub_5BC210 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5BC22C

loc_5BC223:
mov	edx, [ebp+var_8]
add	edx, 40h
mov	[ebp+var_8], edx

loc_5BC22C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC256
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5BC254
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC254:
jmp	short loc_5BC223

loc_5BC256:
mov	esp, ebp
pop	ebp
retn
sub_5BC210 endp

align 10h


; Attributes: bp-based frame

sub_5BC260 proc	near

var_C= dword ptr -0Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
jmp	short loc_5BC27F

loc_5BC273:
mov	edx, [ebp+var_C]
add	edx, 88h
mov	[ebp+var_C], edx

loc_5BC27F:
mov	eax, [ebp+var_C]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC2A9
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_C]
call	sub_589490
xor	edx, edx
and	edx, 1
jz	short loc_5BC2A7
mov	eax, [ebp+var_C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC2A7:
jmp	short loc_5BC273

loc_5BC2A9:
mov	esp, ebp
pop	ebp
retn
sub_5BC260 endp

align 10h


; Attributes: bp-based frame

sub_5BC2B0 proc	near

var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C5350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
jmp	short loc_5BC2E1

loc_5BC2D8:
mov	edx, [ebp+var_14]
add	edx, 70h
mov	[ebp+var_14], edx

loc_5BC2E1:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC31C
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
call	sub_10FB7C0
xor	edx, edx
and	edx, 1
jz	short loc_5BC31A
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC31A:
jmp	short loc_5BC2D8

loc_5BC31C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5BC2B0 endp

align 10h


; Attributes: bp-based frame

sub_5BC330 proc	near

var_60=	dword ptr -60h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_60], ecx
jmp	short loc_5BC34C

loc_5BC343:
mov	edx, [ebp+var_60]
add	edx, 74h
mov	[ebp+var_60], edx

loc_5BC34C:
mov	eax, [ebp+var_60]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC379
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_60]
add	ecx, 8
call	sub_436CF0
xor	edx, edx
and	edx, 1
jz	short loc_5BC377
mov	eax, [ebp+var_60]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC377:
jmp	short loc_5BC343

loc_5BC379:
mov	esp, ebp
pop	ebp
retn
sub_5BC330 endp

align 10h


; Attributes: bp-based frame

sub_5BC380 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5BC39C

loc_5BC393:
mov	edx, [ebp+var_8]
add	edx, 30h
mov	[ebp+var_8], edx

loc_5BC39C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC3D4
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_429100
xor	edx, edx
and	edx, 1
jz	short loc_5BC3D2
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC3D2:
jmp	short loc_5BC393

loc_5BC3D4:
mov	esp, ebp
pop	ebp
retn
sub_5BC380 endp

align 10h


; Attributes: bp-based frame

sub_5BC3E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
mov	[ebp+var_4], eax
jmp	short loc_5BC3FD

loc_5BC3F4:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_5BC3FD:
cmp	[ebp+var_4], 0
jle	short loc_5BC46D
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_8]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [ecx]
cmp	eax, [edx]
jz	short loc_5BC459
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_5BC43D
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_40AA90

loc_5BC43D:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_5BC459
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA80

loc_5BC459:
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
add	eax, 8
mov	[ebp+arg_8], eax
jmp	short loc_5BC3F4

loc_5BC46D:
mov	eax, [ebp+arg_8]
mov	esp, ebp
pop	ebp
retn
sub_5BC3E0 endp

align 10h


; Attributes: bp-based frame

sub_5BC480 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5BC49C

loc_5BC493:
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_8], edx

loc_5BC49C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC4C9
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_429100
xor	edx, edx
and	edx, 1
jz	short loc_5BC4C7
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC4C7:
jmp	short loc_5BC493

loc_5BC4C9:
mov	esp, ebp
pop	ebp
retn
sub_5BC480 endp

align 10h


; Attributes: bp-based frame

sub_5BC4D0 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5BC4D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_70], ecx
jmp	short loc_5BC501

loc_5BC4F8:
mov	edx, [ebp+var_70]
add	edx, 58h
mov	[ebp+var_70], edx

loc_5BC501:
mov	eax, [ebp+var_70]
cmp	eax, [ebp+arg_4]
jz	short loc_5BC54C
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+var_70]
add	edx, 18h
mov	[ebp+var_6C], edx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_6C]
add	ecx, 1Ch
call	sub_436CF0
xor	eax, eax
and	eax, 1
jz	short loc_5BC54A
mov	ecx, [ebp+var_70]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BC54A:
jmp	short loc_5BC4F8

loc_5BC54C:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5BC4D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BC560(void *, int)
sub_5BC560 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5BC5B7
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403400
mov	edx, [ebp+var_4]
add	edx, 28h
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
mov	[eax], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_5BC5AF
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA80

loc_5BC5AF:
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
jmp	short loc_5BC5BE

loc_5BC5B7:
mov	[ebp+var_C], 0

loc_5BC5BE:
mov	esp, ebp
pop	ebp
retn
sub_5BC560 endp

align 10h


; Attributes: bp-based frame

sub_5BC5D0 proc	near

var_1= byte ptr	-1

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	al, [ebp+var_1]
mov	esp, ebp
pop	ebp
retn
sub_5BC5D0 endp



; Attributes: bp-based frame

sub_5BC5E0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF190
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5BC636
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5BC5E0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BC636:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5BC645:
cmp	[ebp+arg_0], 0
jz	short loc_5BC6B2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF190
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5BC6A1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BC5E0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5BC6A1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5BC645

loc_5BC6B2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5BC5E0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5BC6C0(void	*)
sub_5BC6C0 proc	near

var_3C=	dword ptr -3Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx

loc_5BC6C9:
cmp	[ebp+arg_0], 0
jz	short loc_5BC719
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_3C]
call	sub_5BC6C0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5890
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5BC711
mov	edx, 1
imul	edx, 34h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5BC711:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5BC6C9

loc_5BC719:
mov	esp, ebp
pop	ebp
retn	4
sub_5BC6C0 endp

align 10h


; Attributes: bp-based frame

sub_5BC720 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5BC8F4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BC789
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C41E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB

loc_5BC789:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5BC7D2
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB
jmp	loc_5BC8EF

loc_5BC7D2:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5BC804
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB

loc_5BC804:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5BC84E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB

loc_5BC84E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5BC8C4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5BC89D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB
jmp	short loc_5BC8C2

loc_5BC89D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB

loc_5BC8C2:
jmp	short loc_5BC8EF

loc_5BC8C4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C41E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB

loc_5BC8EF:
jmp	loc_5BCBCB

loc_5BC8F4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5BC985
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5BC955
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB
jmp	short loc_5BC980

loc_5BC955:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C41E0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB

loc_5BC980:
jmp	loc_5BCBCB

loc_5BC985:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5BC9EF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BC9EF
mov	[ebp+var_C4], 1
jmp	short loc_5BC9F9

loc_5BC9EF:
mov	[ebp+var_C4], 0

loc_5BC9F9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5BCA0E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5BCA0E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5BCA70
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5BCA46
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB
jmp	short loc_5BCA6B

loc_5BCA46:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	loc_5BCBCB

loc_5BCA6B:
jmp	loc_5BCBCB

loc_5BCA70:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5BCABD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5BCABD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5BCB09
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5BCB09
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5BCAFD
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BCB09

loc_5BCAFD:
mov	[ebp+var_C8], 1
jmp	short loc_5BCB13

loc_5BCB09:
mov	[ebp+var_C8], 0

loc_5BCB13:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5BCB28
and	[ebp+var_4C], 0FFFFFFFDh

loc_5BCB28:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5BCB81
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5BCB5D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	short loc_5BCBCB
jmp	short loc_5BCB7F

loc_5BCB5D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C40A0
mov	eax, [ebp+arg_0]
jmp	short loc_5BCBCB

loc_5BCB7F:
jmp	short loc_5BCBCB

loc_5BCB81:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5BCB9F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5BCBCB
jmp	short loc_5BCBCB

loc_5BCB9F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C41E0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5BCBCB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5BC720 endp

align 10h


; Attributes: bp-based frame

sub_5BCBE0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF1E0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5BCC36
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5BCBE0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5BCC36:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5BCC45:
cmp	[ebp+arg_0], 0
jz	short loc_5BCCB2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BF1E0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5BCCA1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5BCBE0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5BCCA1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5BCC45

loc_5BCCB2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5BCBE0 endp

align 10h


; Attributes: bp-based frame

sub_5BCCC0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5BCE94
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BCD29
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C46B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B

loc_5BCD29:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5BCD72
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B
jmp	loc_5BCE8F

loc_5BCD72:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5BCDA4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B

loc_5BCDA4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5BCDEE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B

loc_5BCDEE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5BCE64
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5BCE3D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B
jmp	short loc_5BCE62

loc_5BCE3D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B

loc_5BCE62:
jmp	short loc_5BCE8F

loc_5BCE64:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C46B0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B

loc_5BCE8F:
jmp	loc_5BD16B

loc_5BCE94:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5BCF25
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5BCEF5
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B
jmp	short loc_5BCF20

loc_5BCEF5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C46B0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B

loc_5BCF20:
jmp	loc_5BD16B

loc_5BCF25:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5BCF8F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BCF8F
mov	[ebp+var_C4], 1
jmp	short loc_5BCF99

loc_5BCF8F:
mov	[ebp+var_C4], 0

loc_5BCF99:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5BCFAE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5BCFAE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5BD010
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5BCFE6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B
jmp	short loc_5BD00B

loc_5BCFE6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	loc_5BD16B

loc_5BD00B:
jmp	loc_5BD16B

loc_5BD010:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5BD05D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5BD05D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5BD0A9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5BD0A9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5BD09D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BD0A9

loc_5BD09D:
mov	[ebp+var_C8], 1
jmp	short loc_5BD0B3

loc_5BD0A9:
mov	[ebp+var_C8], 0

loc_5BD0B3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5BD0C8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5BD0C8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5BD121
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5BD0FD
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	short loc_5BD16B
jmp	short loc_5BD11F

loc_5BD0FD:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C4570
mov	eax, [ebp+arg_0]
jmp	short loc_5BD16B

loc_5BD11F:
jmp	short loc_5BD16B

loc_5BD121:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5BD13F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5BD16B
jmp	short loc_5BD16B

loc_5BD13F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5C46B0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5BD16B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5BCCC0 endp

align 10h


; Attributes: bp-based frame

sub_5BD180 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C58D0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD180 endp

align 10h


; Attributes: bp-based frame

sub_5BD1B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5910
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD1B0 endp

align 10h


; Attributes: bp-based frame

sub_5BD1E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5980
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD1E0 endp

align 10h


; Attributes: noreturn bp-based	frame

sub_5BD210 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset aVector	; "vector"
call	sub_77EC70
sub_5BD210 endp

mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_5BD230 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C59C0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD230 endp

align 10h


; Attributes: bp-based frame

sub_5BD260 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5A00
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD260 endp

align 10h


; Attributes: bp-based frame

sub_5BD290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5A40
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD290 endp

align 10h


; Attributes: bp-based frame

sub_5BD2C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5F1F50
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD2C0 endp

align 10h


; Attributes: bp-based frame

sub_5BD2F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5AB0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD2F0 endp

align 10h


; Attributes: bp-based frame

sub_5BD320 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5AF0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5BD320 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BD350(void *, int)
sub_5BD350 proc	near

var_64=	dword ptr -64h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5BD394
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5C6A80
mov	[ebp+var_64], eax
jmp	short loc_5BD39B

loc_5BD394:
mov	[ebp+var_64], 0

loc_5BD39B:
mov	esp, ebp
pop	ebp
retn
sub_5BD350 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BD3A0(void *, int)
sub_5BD3A0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5BD3FD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 4
push	eax
mov	ecx, [ebp+var_34]
call	sub_592E50
mov	ecx, [ebp+var_8]
mov	[ebp+var_38], ecx
jmp	short loc_5BD404

loc_5BD3FD:
mov	[ebp+var_38], 0

loc_5BD404:
mov	esp, ebp
pop	ebp
retn
sub_5BD3A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BD410(void *, int)
sub_5BD410 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5BD471
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
mov	eax, [ebp+var_8]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5BD478

loc_5BD471:
mov	[ebp+var_C], 0

loc_5BD478:
mov	esp, ebp
pop	ebp
retn
sub_5BD410 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BD480(void *, int)
sub_5BD480 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5BD4E1
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+arg_4]
add	edx, 4
mov	eax, [ebp+var_8]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5BD4E8

loc_5BD4E1:
mov	[ebp+var_C], 0

loc_5BD4E8:
mov	esp, ebp
pop	ebp
retn
sub_5BD480 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5BD4F0(void *, int)
sub_5BD4F0 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	3Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5BD534
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5C6CF0
mov	[ebp+var_28], eax
jmp	short loc_5BD53B

loc_5BD534:
mov	[ebp+var_28], 0

loc_5BD53B:
mov	esp, ebp
pop	ebp
retn
sub_5BD4F0 endp

align 10h


; Attributes: bp-based frame

sub_5BD540 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 34h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_403400
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+5Ch]
mov	[edx+5Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
mov	[edx+60h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+64h]
mov	[edx+64h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+65h]
mov	[edx+65h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD540 endp

align 10h


; Attributes: bp-based frame

sub_5BD5D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_403400
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+54h]
mov	[edx+54h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+55h]
mov	[edx+55h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+58h]
mov	[edx+58h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+5Ch]
mov	[edx+5Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
mov	[edx+60h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD5D0 endp

align 10h


; Attributes: bp-based frame

sub_5BD650 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+arg_0]
add	edx, 0Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+34h]
mov	[eax+34h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	eax, [ebp+arg_0]
add	eax, 3Ch
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD650 endp

align 10h


; Attributes: bp-based frame

sub_5BD6D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403400
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	edx, [edx+2Ch]
mov	[ecx+2Ch], edx
mov	eax, [ebp+var_8]
add	eax, 30h
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
mov	eax, [ecx+34h]
mov	ecx, [ebp+var_4]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+38h]
mov	[edx+38h], cl
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+39h]
mov	[edx+39h], cl
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD6D0 endp

align 10h


; Attributes: bp-based frame

sub_5BD740 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
push	edi
mov	[ebp+var_8], ecx
mov	esi, [ebp+arg_0]
mov	ecx, 8
mov	edi, [ebp+var_8]
rep movsd
mov	esi, [ebp+arg_0]
add	esi, 20h
mov	edi, [ebp+var_8]
add	edi, 20h
mov	ecx, 8
rep movsd
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+40h]
mov	[eax+40h], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+48h]
mov	[eax+48h], edx
mov	ecx, [ecx+4Ch]
mov	[eax+4Ch], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+50h]
mov	[edx+50h], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+54h]
mov	[edx+54h], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+58h]
mov	[edx+58h], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
mov	[edx+60h], ecx
mov	eax, [eax+64h]
mov	[edx+64h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+68h]
mov	[ecx+68h], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+6Ch]
mov	[ecx+6Ch], eax
mov	ecx, [ebp+var_8]
add	ecx, 70h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+70h]
mov	[edx], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_5BD7FD
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_5BD7FD:
mov	ecx, [ebp+arg_0]
add	ecx, 74h
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 74h
call	sub_403850
mov	edx, [ebp+arg_0]
add	edx, 8Ch
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8Ch
call	sub_403850
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+0A4h]
mov	[eax+0A4h], dl
mov	eax, [ebp+var_8]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5BD740 endp

align 10h


; Attributes: bp-based frame

sub_5BD850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+8]
fstp	dword ptr [edx+8]
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	[edx], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_5BD89B
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_5BD89B:
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_403850
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+28h]
mov	[edx+28h], cl
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD850 endp

align 10h


; Attributes: bp-based frame

sub_5BD8D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_440830
mov	edx, [ebp+var_8]
add	edx, 34h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_10111B0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD8D0 endp

align 10h


; Attributes: bp-based frame

sub_5BD960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 54h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_403400
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD960 endp



; Attributes: bp-based frame

sub_5BD9B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 58h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+80h]
mov	[eax+80h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+84h]
mov	[eax+84h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+88h]
mov	[eax+88h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8Ch]
mov	[eax+8Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BD9B0 endp

align 10h


; Attributes: bp-based frame

sub_5BDA60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+arg_0]
add	edx, 0Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+34h]
mov	[eax+34h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	eax, [ebp+arg_0]
add	eax, 3Ch
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDA60 endp

align 10h


; Attributes: bp-based frame

sub_5BDAE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	edx, [edx+2Ch]
mov	[ecx+2Ch], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+30h]
mov	edx, [eax+34h]
mov	eax, [ebp+var_4]
mov	[eax+30h], ecx
mov	[eax+34h], edx
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+38h]
mov	[ecx+38h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+39h]
mov	[ecx+39h], al
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDAE0 endp

align 10h


; Attributes: bp-based frame

sub_5BDB40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5BDB7C
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BDB7C:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDB40 endp

align 10h


; Attributes: bp-based frame

sub_5BDB90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 28h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_46A7D0
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	sub_42CA30
mov	ecx, [ebp+var_8]
call	sub_407E50
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5BDBD1
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BDBD1:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDB90 endp

align 10h


; Attributes: bp-based frame

sub_5BDBE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+60h]
mov	[eax+60h], edx
mov	ecx, [ecx+64h]
mov	[eax+64h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
mov	[edx+68h], ecx
mov	eax, [eax+6Ch]
mov	[edx+6Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 70h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 98h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 98h
call	sub_1011130
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0C0h]
mov	[eax+0C0h], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDBE0 endp

align 10h


; Attributes: bp-based frame

sub_5BDCA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+8]
fstp	dword ptr [edx+8]
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 0Ch
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_5BDD11
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5BDCF5
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA90

loc_5BDCF5:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_5BDD11
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA80

loc_5BDD11:
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022F0
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	cl, [eax+28h]
mov	[edx+28h], cl
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDCA0 endp

align 10h


; Attributes: bp-based frame

sub_5BDD40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
cmp	ecx, [eax]
jz	short loc_5BDD9F
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_5BDD83
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_40AA90

loc_5BDD83:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5BDD9F
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_5BDD9F:
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_5893E0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDD40 endp

align 10h


; Attributes: bp-based frame

sub_5BDDC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_440360
mov	[ebp+var_4], 0
jmp	short loc_5BDE03

loc_5BDDFA:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_5BDE03:
cmp	[ebp+var_4], 4
jnb	short loc_5BDE47
mov	edx, [ebp+var_4]
imul	edx, 18h
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx+14h]
mov	edx, [ebp+var_4]
imul	edx, 18h
mov	eax, [ebp+var_8]
lea	edx, [eax+edx+14h]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	eax, [ecx+10h]
mov	[edx+10h], eax
mov	ecx, [ecx+14h]
mov	[edx+14h], ecx
jmp	short loc_5BDDFA

loc_5BDE47:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDDC0 endp



; Attributes: bp-based frame

sub_5BDE50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	eax, [eax+10h]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ecx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	[ecx+20h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 24h
mov	edx, [ebp+var_4]
add	edx, 24h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	eax, [ecx+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ecx+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	edx, [ebp+arg_0]
add	edx, 3Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+64h]
mov	[eax+64h], edx
mov	eax, [ebp+arg_0]
add	eax, 68h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 68h
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	[ecx+90h], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDE50 endp

align 10h


; Attributes: bp-based frame

sub_5BDF30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edx+0Ch]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+10h]
mov	[ecx+10h], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_44CDB0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDF30 endp

align 10h


; Attributes: bp-based frame

sub_5BDF90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_4023E0
mov	edx, [ebp+arg_0]
add	edx, 54h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+7Ch]
fstp	dword ptr [eax+7Ch]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+80h]
mov	[edx+80h], ecx
mov	eax, [eax+84h]
mov	[edx+84h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+88h]
mov	[ecx+88h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+89h]
mov	[ecx+89h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+8Ah]
mov	[ecx+8Ah], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+8Bh]
mov	[ecx+8Bh], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+8Ch]
mov	[ecx+8Ch], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	[ecx+90h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+94h]
fstp	dword ptr [ecx+94h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BDF90 endp

align 10h


; Attributes: bp-based frame

sub_5BE090 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+10h]
mov	[eax+10h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+11h]
mov	[eax+11h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+12h]
mov	[eax+12h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+13h]
mov	[eax+13h], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1Ch]
mov	[eax+1Ch], dl
mov	eax, [ebp+arg_0]
add	eax, 20h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+48h]
mov	[ecx+48h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+4Ch]
mov	[ecx+4Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE090 endp

align 10h


; Attributes: bp-based frame

sub_5BE150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 98h
call	sub_10111A0
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5BE150 endp

align 10h


; Attributes: bp-based frame

sub_5BE190 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5BEF70
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5C20
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE190 endp

align 10h


; Attributes: bp-based frame

sub_5BE1E0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_503430
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5C70
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE1E0 endp

align 10h


; Attributes: bp-based frame

sub_5BE230 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5B30
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE230 endp

align 10h


; Attributes: bp-based frame

sub_5BE280 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_526A40
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	ax, [edx]
mov	[ecx+10h], ax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE280 endp

align 10h


; Attributes: bp-based frame

sub_5BE2E0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 6
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5BE34C
mov	ecx, [ebp+var_54]
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5BE34C:
mov	esp, ebp
pop	ebp
retn
sub_5BE2E0 endp



; Attributes: bp-based frame

sub_5BE350 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 3FFFFFFh
jbe	short loc_5BE37B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5BE37B:
cmp	[ebp+arg_0], 0
jz	short loc_5BE3AC
mov	ecx, [ebp+arg_0]
shl	ecx, 6
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
shr	eax, 6
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_5BE3B3

loc_5BE3AC:
mov	[ebp+var_10], 0

loc_5BE3B3:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5BE350 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5BE3C0 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_5BE4AA
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5BE41F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_5BE4AA

loc_5BE41F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_5C5CE0
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_59BCA0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_5BE4AA:
mov	esp, ebp
pop	ebp
retn	10h
sub_5BE3C0 endp



; Attributes: bp-based frame

sub_5BE4B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 1E1E1E1h
mov	[ebp+var_10], 1E1E1E1h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5BE4ED
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5BE4F3

loc_5BE4ED:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5BE4F3:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5BE506
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5BE506:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 1E1E1E1h
mov	[ebp+var_1C], 1E1E1E1h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5BE53C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5BE542

loc_5BE53C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5BE542:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5BE552
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5BE57C

loc_5BE552:
mov	[ebp+var_20], 1E1E1E1h
mov	[ebp+var_24], 1E1E1E1h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5BE570
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5BE576

loc_5BE570:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5BE576:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5BE57C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE4B0 endp

align 10h


; Attributes: bp-based frame

sub_5BE590 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5C5D30
add	esp, 8
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_54]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_5BE606
mov	ecx, [ebp+var_50]
imul	ecx, 88h
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5BE606:
mov	esp, ebp
pop	ebp
retn
sub_5BE590 endp

align 10h


; Attributes: bp-based frame

sub_5BE610 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_503430
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5D60
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE610 endp

align 10h


; Attributes: bp-based frame

sub_5BE660 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5DD0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE660 endp

align 10h


; Attributes: bp-based frame

sub_5BE6B0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5E40
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE6B0 endp

align 10h


; Attributes: bp-based frame

sub_5BE700 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5EB0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE700 endp

align 10h


; Attributes: bp-based frame

sub_5BE750 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5F20
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE750 endp

align 10h


; Attributes: bp-based frame

sub_5BE7A0 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5BF030
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C5F90
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE7A0 endp

align 10h


; Attributes: bp-based frame

sub_5BE7F0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5C7020
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6000
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE7F0 endp

align 10h


; Attributes: bp-based frame

sub_5BE840 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6070
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE840 endp

align 10h


; Attributes: bp-based frame

sub_5BE890 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5BF130
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C60E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE890 endp

align 10h


; Attributes: bp-based frame

sub_5BE8E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+18h]
fstp	dword ptr [ecx+18h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE8E0 endp

align 10h


; Attributes: bp-based frame

sub_5BE910 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_4E1E10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C61D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE910 endp

align 10h


; Attributes: bp-based frame

sub_5BE960 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526A40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_4B6FE0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE960 endp

align 10h


; Attributes: bp-based frame

sub_5BE9B0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDEF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6220
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BE9B0 endp

align 10h


; Attributes: bp-based frame

sub_5BEA00 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 38E38E3h
mov	[ebp+var_10], 38E38E3h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5BEA3D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5BEA43

loc_5BEA3D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5BEA43:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5BEA56
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5BEA56:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 38E38E3h
mov	[ebp+var_1C], 38E38E3h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5BEA8C
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5BEA92

loc_5BEA8C:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5BEA92:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5BEAA2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5BEACC

loc_5BEAA2:
mov	[ebp+var_20], 38E38E3h
mov	[ebp+var_24], 38E38E3h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5BEAC0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5BEAC6

loc_5BEAC0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5BEAC6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5BEACC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEA00 endp

align 10h


; Attributes: bp-based frame

sub_5BEAE0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5BEB53
mov	ecx, [ebp+var_54]
imul	ecx, 48h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5BEB53:
mov	esp, ebp
pop	ebp
retn
sub_5BEAE0 endp

align 10h


; Attributes: bp-based frame

sub_5BEB60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 38E38E3h
jbe	short loc_5BEB8B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5BEB8B:
cmp	[ebp+arg_0], 0
jz	short loc_5BEBC2
mov	ecx, [ebp+arg_0]
imul	ecx, 48h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 48h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5BEBC9

loc_5BEBC2:
mov	[ebp+var_10], 0

loc_5BEBC9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5BEB60 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5BEBE0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5C62A0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5BEC4C
mov	ecx, [ebp+var_4C]
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5BEC4C:
mov	esp, ebp
pop	ebp
retn
sub_5BEBE0 endp



; Attributes: bp-based frame

sub_5BEC50 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5BF230
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C62D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEC50 endp

align 10h


; Attributes: bp-based frame

sub_5BECA0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_595E40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6340
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BECA0 endp

align 10h


; Attributes: bp-based frame

sub_5BECF0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526500
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C63B0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BECF0 endp

align 10h


; Attributes: bp-based frame

sub_5BED40 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6420
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BED40 endp

align 10h


; Attributes: bp-based frame

sub_5BED90 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_4E1E10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6490
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BED90 endp

align 10h


; Attributes: bp-based frame

sub_5BEDE0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5BF290
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C64E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEDE0 endp

align 10h


; Attributes: bp-based frame

sub_5BEE30 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDEF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6550
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEE30 endp

align 10h


; Attributes: bp-based frame

sub_5BEE80 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5BEF70
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5C9D20
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEE80 endp



; Attributes: bp-based frame

sub_5BEEE0 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_503430
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5C9DA0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEEE0 endp



; Attributes: bp-based frame

sub_5BEF40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+18h], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEF40 endp

align 10h


; Attributes: bp-based frame

sub_5BEF70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 3333333h
jbe	short loc_5BEF96
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5BEF96:
cmp	[ebp+arg_0], 0
jz	short loc_5BEFBC
mov	eax, [ebp+arg_0]
imul	eax, 50h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5BEFC3

loc_5BEFBC:
mov	[ebp+var_C], 0

loc_5BEFC3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEF70 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5BEFD0 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_503430
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5C9E10
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BEFD0 endp



; Attributes: bp-based frame

sub_5BF030 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 28F5C28h
jbe	short loc_5BF056
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5BF056:
cmp	[ebp+arg_0], 0
jz	short loc_5BF07C
mov	eax, [ebp+arg_0]
imul	eax, 64h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5BF083

loc_5BF07C:
mov	[ebp+var_C], 0

loc_5BF083:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF030 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5BF090 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C65D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF090 endp

align 10h


; Attributes: bp-based frame

sub_5BF0E0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA20
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6620
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF0E0 endp

align 10h


; Attributes: bp-based frame

sub_5BF130 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 2108421h
jbe	short loc_5BF156
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5BF156:
cmp	[ebp+arg_0], 0
jz	short loc_5BF17C
mov	eax, [ebp+arg_0]
imul	eax, 7Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5BF183

loc_5BF17C:
mov	[ebp+var_C], 0

loc_5BF183:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF130 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5BF190 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526500
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6690
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF190 endp

align 10h


; Attributes: bp-based frame

sub_5BF1E0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C6700
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF1E0 endp

align 10h


; Attributes: bp-based frame

sub_5BF230 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 2492492h
jbe	short loc_5BF256
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5BF256:
cmp	[ebp+arg_0], 0
jz	short loc_5BF27C
mov	eax, [ebp+arg_0]
imul	eax, 70h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5BF283

loc_5BF27C:
mov	[ebp+var_C], 0

loc_5BF283:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF230 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5BF290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 2222222h
jbe	short loc_5BF2B6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5BF2B6:
cmp	[ebp+arg_0], 0
jz	short loc_5BF2DC
mov	eax, [ebp+arg_0]
imul	eax, 78h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5BF2E3

loc_5BF2DC:
mov	[ebp+var_C], 0

loc_5BF2E3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5BF290 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5BF2F0 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BF340
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5BF2F0 endp

align 10h


; Attributes: bp-based frame

sub_5BF340 proc	near

var_C= word ptr	-0Ch
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5BF368

loc_5BF35F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5BF368:
cmp	[ebp+var_8], 0
jle	short loc_5BF3AC
xor	eax, eax
mov	byte ptr [ebp+var_C+1],	al
mov	cl, byte ptr [ebp+var_C+1]
mov	[ebp+var_9], cl
xor	edx, edx
mov	byte ptr [ebp+var_C], dl
mov	al, byte ptr [ebp+var_C]
mov	[ebp+var_A], al
lea	ecx, [ebp+var_A]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_5BB580
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 34h
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
add	edx, 34h
mov	[ebp+var_4], edx
jmp	short loc_5BF35F

loc_5BF3AC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5BF340 endp

align 10h


; Attributes: bp-based frame

sub_5BF3C0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C71C0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BF3C0 endp

align 10h


; Attributes: bp-based frame

sub_5BF3F0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5BF40C

loc_5BF403:
mov	edx, [ebp+var_8]
add	edx, 68h
mov	[ebp+var_8], edx

loc_5BF40C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5BF444
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5BF442
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BF442:
jmp	short loc_5BF403

loc_5BF444:
mov	esp, ebp
pop	ebp
retn
sub_5BF3F0 endp

align 10h


; Attributes: bp-based frame

sub_5BF450 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C7240
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BF450 endp

align 10h


; Attributes: bp-based frame

sub_5BF480 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C7330
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BF480 endp

align 10h


; Attributes: bp-based frame

sub_5BF4B0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C73B0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BF4B0 endp

align 10h


; Attributes: bp-based frame

sub_5BF4E0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5BF4FC

loc_5BF4F3:
mov	edx, [ebp+var_8]
add	edx, 48h
mov	[ebp+var_8], edx

loc_5BF4FC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5BF529
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 1Ch
call	sub_10FB7C0
xor	edx, edx
and	edx, 1
jz	short loc_5BF527
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5BF527:
jmp	short loc_5BF4F3

loc_5BF529:
mov	esp, ebp
pop	ebp
retn
sub_5BF4E0 endp

align 10h


; Attributes: bp-based frame

sub_5BF530 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C7480
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5BF530 endp

align 10h


; Attributes: bp-based frame

sub_5BF560 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BF5A7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEFD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BF656

loc_5BF5A7:
cmp	[ebp+arg_10], 0
jnz	short loc_5BF5DB
cmp	[ebp+arg_C], 0
jnz	short loc_5BF5D2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5BF5DB

loc_5BF5D2:
mov	[ebp+var_34], 1
jmp	short loc_5BF5E2

loc_5BF5DB:
mov	[ebp+var_34], 0

loc_5BF5E2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5BF5F4
and	[ebp+var_C], 0FFFFFFFEh

loc_5BF5F4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5BF62A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BEFD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5BF628
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5BF628:
jmp	short loc_5BF656

loc_5BF62A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BEFD0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5BF656
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5BF656:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BF560 endp

align 10h


; Attributes: bp-based frame

sub_5BF6A0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5BF6BC:
cmp	[ebp+var_10], 0
jz	short loc_5BF703
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5BF6F2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5BF6FB

loc_5BF6F2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5BF6FB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5BF6BC

loc_5BF703:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5BF7A5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5BF796
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5BF560
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5BF81B
jmp	short loc_5BF7A5

loc_5BF796:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5BF7A5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5BF800
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5BF560
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5BF81B

loc_5BF800:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5BF81B:
mov	esp, ebp
pop	ebp
retn	8
sub_5BF6A0 endp

align 10h


; Attributes: bp-based frame

sub_5BF830 proc	near

var_38=	dword ptr -38h
var_8= byte ptr	-8
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
lea	eax, [ebp+var_8]
call	sub_409A10
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
push	ecx
mov	eax, esp
lea	ecx, [ebp+var_8]
call	sub_402EB0
lea	ecx, [ebp+var_8]
call	sub_4793C0
call	nullsub_1
lea	edx, [ebp+var_8]
push	edx
push	ecx
mov	eax, esp
lea	ecx, [ebp+arg_0]
call	sub_402EB0
mov	ecx, [ebp+var_38]
call	sub_4794F0
lea	ecx, [ebp+var_8]
call	sub_409540
mov	esp, ebp
pop	ebp
retn	10h
sub_5BF830 endp

align 10h


; Attributes: bp-based frame

sub_5BF890 proc	near

var_74=	dword ptr -74h
var_30=	dword ptr -30h
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_74]
call	sub_443FB0
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_8]
call	sub_5C7570
call	nullsub_1
lea	eax, [ebp+var_8]
push	eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_4524D0
lea	ecx, [ebp+var_8]
call	sub_42E0F0
mov	esp, ebp
pop	ebp
retn	10h
sub_5BF890 endp

align 10h


; Attributes: bp-based frame

sub_5BF8F0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	word ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
sub	edx, [ebp+arg_0]
sar	edx, 4
mov	[ebp+var_10], edx
jmp	short loc_5BF928

loc_5BF916:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_C], ecx

loc_5BF928:
cmp	[ebp+var_10], 0
jle	short loc_5BF97D
xor	edx, edx
mov	byte ptr [ebp+var_14+1], dl
mov	al, byte ptr [ebp+var_14+1]
mov	byte ptr [ebp+var_12+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_14], cl
mov	dl, byte ptr [ebp+var_14]
mov	byte ptr [ebp+var_12], dl
mov	eax, [ebp+var_C]
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0
jz	short loc_5BF974
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_18]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
jmp	short loc_5BF97B

loc_5BF974:
mov	[ebp+var_1C], 0

loc_5BF97B:
jmp	short loc_5BF916

loc_5BF97D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5BF8F0 endp

align 10h


; Attributes: bp-based frame

sub_5BF990 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C75D0
add	esp, 14h
pop	ebp
retn
sub_5BF990 endp

align 10h


; Attributes: bp-based frame

sub_5BF9B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 20h

loc_5BF9B6:
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	[ebp+arg_18]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5BF9D6
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+arg_0], eax
jmp	short loc_5BF9B6

loc_5BF9D6:
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
mov	[ebp+arg_4], ecx

loc_5BF9DF:
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+arg_8]
push	eax
call	[ebp+arg_18]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5BF9FF
mov	edx, [ebp+arg_4]
sub	edx, 10h
mov	[ebp+arg_4], edx
jmp	short loc_5BF9DF

loc_5BF9FF:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jb	short loc_5BFA0C
mov	eax, [ebp+arg_0]
jmp	short loc_5BFA27

loc_5BFA0C:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_527800
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+arg_0], eax
jmp	short loc_5BF9B6

loc_5BFA27:
mov	esp, ebp
pop	ebp
retn
sub_5BF9B0 endp

align 10h


; Attributes: bp-based frame

sub_5BFA30 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5BFA43
jmp	loc_5BFAF6

loc_5BFA43:
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+var_4], ecx
jmp	short loc_5BFA57

loc_5BFA4E:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4], edx

loc_5BFA57:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	loc_5BFAF6
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ecx+4]
mov	[ebp+var_1C], eax
mov	edx, [ecx+8]
mov	[ebp+var_18], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [ebp+var_20]
push	edx
call	[ebp+arg_C]
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5BFAC5
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F4430
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
jmp	short loc_5BFAF1

loc_5BFAC5:
mov	ecx, [ebp+arg_C]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_5CA860
add	esp, 18h

loc_5BFAF1:
jmp	loc_5BFA4E

loc_5BFAF6:
mov	esp, ebp
pop	ebp
retn
sub_5BFA30 endp

align 10h


; Attributes: bp-based frame

sub_5BFB00 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5BFB47
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6A20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5BFC24

loc_5BFB47:
cmp	[ebp+arg_10], 0
jnz	short loc_5BFBA9
cmp	[ebp+arg_C], 0
jnz	short loc_5BFBA0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5BFB91
jb	short loc_5BFB88
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5BFB91

loc_5BFB88:
mov	[ebp+var_3C], 1
jmp	short loc_5BFB98

loc_5BFB91:
mov	[ebp+var_3C], 0

loc_5BFB98:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5BFBA9

loc_5BFBA0:
mov	[ebp+var_40], 1
jmp	short loc_5BFBB0

loc_5BFBA9:
mov	[ebp+var_40], 0

loc_5BFBB0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5BFBC2
and	[ebp+var_C], 0FFFFFFFEh

loc_5BFBC2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5BFBF8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6A20
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5BFBF6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5BFBF6:
jmp	short loc_5BFC24

loc_5BFBF8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6A20
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5BFC24
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5BFC24:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5BFB00 endp

align 10h


; Attributes: bp-based frame

sub_5BFC70 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5BFC8C:
cmp	[ebp+var_10], 0
jz	short loc_5BFD03
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5BFCD2
jb	short loc_5BFCC9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5BFCD2

loc_5BFCC9:
mov	[ebp+var_64], 1
jmp	short loc_5BFCD9

loc_5BFCD2:
mov	[ebp+var_64], 0

loc_5BFCD9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5BFCF2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5BFCFB

loc_5BFCF2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5BFCFB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5BFC8C

loc_5BFD03:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5BFDA5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5BFD96
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5BFB00
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5BFE4B
jmp	short loc_5BFDA5

loc_5BFD96:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5BFDA5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5BFDDF
jb	short loc_5BFDD6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5BFDDF

loc_5BFDD6:
mov	[ebp+var_78], 1
jmp	short loc_5BFDE6

loc_5BFDDF:
mov	[ebp+var_78], 0

loc_5BFDE6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5BFE30
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5BFB00
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5BFE4B

loc_5BFE30:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5BFE4B:
mov	esp, ebp
pop	ebp
retn	8
sub_5BFC70 endp

align 10h


; Attributes: bp-based frame

sub_5BFE60 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5BFEB0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5BFE60 endp

align 10h


; Attributes: bp-based frame

sub_5BFEB0 proc	near

var_C= word ptr	-0Ch
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5BFED8

loc_5BFECF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5BFED8:
cmp	[ebp+var_8], 0
jle	short loc_5BFF1C
xor	eax, eax
mov	byte ptr [ebp+var_C+1],	al
mov	cl, byte ptr [ebp+var_C+1]
mov	[ebp+var_9], cl
xor	edx, edx
mov	byte ptr [ebp+var_C], dl
mov	al, byte ptr [ebp+var_C]
mov	[ebp+var_A], al
lea	ecx, [ebp+var_A]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_5BB670
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 5Ch
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
add	edx, 5Ch
mov	[ebp+var_4], edx
jmp	short loc_5BFECF

loc_5BFF1C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5BFEB0 endp

align 10h


; Attributes: bp-based frame

sub_5BFF30 proc	near

var_54=	byte ptr -54h
var_14=	word ptr -14h
var_12=	word ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 54h
push	esi
push	edi
mov	eax, [ebp+arg_4]
shl	eax, 6
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
sub	edx, [ebp+arg_0]
sar	edx, 6
mov	[ebp+var_10], edx
jmp	short loc_5BFF6A

loc_5BFF58:
mov	eax, [ebp+var_10]
sub	eax, 1
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
add	ecx, 40h
mov	[ebp+var_C], ecx

loc_5BFF6A:
cmp	[ebp+var_10], 0
jle	short loc_5BFFA2
xor	edx, edx
mov	byte ptr [ebp+var_14+1], dl
mov	al, byte ptr [ebp+var_14+1]
mov	byte ptr [ebp+var_12+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_14], cl
mov	dl, byte ptr [ebp+var_14]
mov	byte ptr [ebp+var_12], dl
mov	esi, [ebp+arg_8]
mov	ecx, 10h
lea	edi, [ebp+var_54]
rep movsd
mov	ecx, 10h
lea	esi, [ebp+var_54]
mov	edi, [ebp+var_C]
rep movsd
jmp	short loc_5BFF58

loc_5BFFA2:
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5BFF30 endp

align 10h


; Attributes: bp-based frame

sub_5BFFB0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5BFFC8:
cmp	[ebp+var_8], 0
jz	short loc_5C0033
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], ecx
mov	[ebp+var_24], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5C0008
jb	short loc_5BFFFF
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5C0008

loc_5BFFFF:
mov	[ebp+var_28], 1
jmp	short loc_5C000F

loc_5C0008:
mov	[ebp+var_28], 0

loc_5C000F:
movzx	eax, byte ptr [ebp+var_28]
test	eax, eax
jnz	short loc_5C0028
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5C0031

loc_5C0028:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5C0031:
jmp	short loc_5BFFC8

loc_5C0033:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_1C]
jz	short loc_5C008A
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	[ebp+var_2C], edx
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_30]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5C0075
jb	short loc_5C006C
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_30]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5C0075

loc_5C006C:
mov	[ebp+var_34], 1
jmp	short loc_5C007C

loc_5C0075:
mov	[ebp+var_34], 0

loc_5C007C:
movzx	ecx, byte ptr [ebp+var_34]
test	ecx, ecx
jz	short loc_5C008A
mov	edx, [ebp+var_1C]
mov	[ebp+var_4], edx

loc_5C008A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5BFFB0 endp

align 10h


; Attributes: bp-based frame

sub_5C00A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_8]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5C00CE

loc_5C00C5:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5C00CE:
cmp	[ebp+var_8], 0
jle	short loc_5C00F9
mov	eax, [ebp+var_14]
sub	eax, 88h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
sub	ecx, 88h
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_18]
call	sub_5BDD40
jmp	short loc_5C00C5

loc_5C00F9:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_5C00A0 endp



; Attributes: bp-based frame

sub_5C0100 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5C0134

loc_5C011F:
mov	edx, [ebp+var_14]
add	edx, 88h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_5C0134:
cmp	[ebp+var_8], 0
jle	short loc_5C0148
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_5BDD40
jmp	short loc_5C011F

loc_5C0148:
mov	esp, ebp
pop	ebp
retn
sub_5C0100 endp

align 10h


; Attributes: bp-based frame

sub_5C0150 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C0197
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6B00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C0246

loc_5C0197:
cmp	[ebp+arg_10], 0
jnz	short loc_5C01CB
cmp	[ebp+arg_C], 0
jnz	short loc_5C01C2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5C01CB

loc_5C01C2:
mov	[ebp+var_34], 1
jmp	short loc_5C01D2

loc_5C01CB:
mov	[ebp+var_34], 0

loc_5C01D2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5C01E4
and	[ebp+var_C], 0FFFFFFFEh

loc_5C01E4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C021A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6B00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5C0218
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5C0218:
jmp	short loc_5C0246

loc_5C021A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6B00
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5C0246
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5C0246:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C0150 endp

align 10h


; Attributes: bp-based frame

sub_5C0290 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C02AC:
cmp	[ebp+var_10], 0
jz	short loc_5C02F3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C02E2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5C02EB

loc_5C02E2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5C02EB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5C02AC

loc_5C02F3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5C0395
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5C0386
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C0150
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5C040B
jmp	short loc_5C0395

loc_5C0386:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C0395:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5C03F0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5C0150
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5C040B

loc_5C03F0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5C040B:
mov	esp, ebp
pop	ebp
retn	8
sub_5C0290 endp

align 10h


; Attributes: bp-based frame

sub_5C0420 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_5C0467
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6B50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C051B

loc_5C0467:
cmp	[ebp+arg_10], 0
jnz	short loc_5C04A0
cmp	[ebp+arg_C], 0
jnz	short loc_5C0497
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C04A0

loc_5C0497:
mov	[ebp+var_44], 1
jmp	short loc_5C04A7

loc_5C04A0:
mov	[ebp+var_44], 0

loc_5C04A7:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5C04B9
and	[ebp+var_C], 0FFFFFFFEh

loc_5C04B9:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C04EF
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5C6B50
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5C04ED
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5C04ED:
jmp	short loc_5C051B

loc_5C04EF:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6B50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5C051B
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5C051B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C0420 endp

align 10h


; Attributes: bp-based frame

sub_5C0560 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C0588:
cmp	[ebp+var_10], 0
jz	short loc_5C05DD
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C05C6
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_5C05D2

loc_5C05C6:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_5C05D2:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_5C0588

loc_5C05DD:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_5C068B
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_5C067C
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5C0420
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_5C070F
jmp	short loc_5C068B

loc_5C067C:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C068B:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_5C06F4
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5C0420
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5C070F

loc_5C06F4:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_5C070F:
mov	esp, ebp
pop	ebp
retn	8
sub_5C0560 endp

align 10h


; Attributes: bp-based frame

sub_5C0720 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C0767
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6BA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C081A

loc_5C0767:
cmp	[ebp+arg_10], 0
jnz	short loc_5C079F
cmp	[ebp+arg_C], 0
jnz	short loc_5C0796
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C079F

loc_5C0796:
mov	[ebp+var_34], 1
jmp	short loc_5C07A6

loc_5C079F:
mov	[ebp+var_34], 0

loc_5C07A6:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5C07B8
and	[ebp+var_C], 0FFFFFFFEh

loc_5C07B8:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C07EE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6BA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5C07EC
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5C07EC:
jmp	short loc_5C081A

loc_5C07EE:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6BA0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5C081A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5C081A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C0720 endp

align 10h


; Attributes: bp-based frame

sub_5C0860 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C087C:
cmp	[ebp+var_10], 0
jz	short loc_5C08C7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C08B6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5C08BF

loc_5C08B6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5C08BF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5C087C

loc_5C08C7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5C0969
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5C095A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C0720
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5C09E3
jmp	short loc_5C0969

loc_5C095A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C0969:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5C09C8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C0720
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5C09E3

loc_5C09C8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5C09E3:
mov	esp, ebp
pop	ebp
retn	8
sub_5C0860 endp

align 10h


; Attributes: bp-based frame

sub_5C09F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C0A37
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BF090
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C0AE6

loc_5C0A37:
cmp	[ebp+arg_10], 0
jnz	short loc_5C0A6B
cmp	[ebp+arg_C], 0
jnz	short loc_5C0A62
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5C0A6B

loc_5C0A62:
mov	[ebp+var_34], 1
jmp	short loc_5C0A72

loc_5C0A6B:
mov	[ebp+var_34], 0

loc_5C0A72:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5C0A84
and	[ebp+var_C], 0FFFFFFFEh

loc_5C0A84:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C0ABA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BF090
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5C0AB8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5C0AB8:
jmp	short loc_5C0AE6

loc_5C0ABA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BF090
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5C0AE6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5C0AE6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C09F0 endp

align 10h


; Attributes: bp-based frame

sub_5C0B30 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C0B4C:
cmp	[ebp+var_10], 0
jz	short loc_5C0B93
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C0B82
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5C0B8B

loc_5C0B82:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5C0B8B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5C0B4C

loc_5C0B93:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5C0C35
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5C0C26
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C09F0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5C0CAB
jmp	short loc_5C0C35

loc_5C0C26:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C0C35:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5C0C90
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5C09F0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5C0CAB

loc_5C0C90:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5C0CAB:
mov	esp, ebp
pop	ebp
retn	8
sub_5C0B30 endp

align 10h


; Attributes: bp-based frame

sub_5C0CC0 proc	near

var_D4=	dword ptr -0D4h
var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
push	ecx
call	sub_5CC830
add	esp, 4
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setnz	dl
mov	[ebp+var_CD], dl
movzx	eax, [ebp+var_CD]
test	eax, eax
jz	loc_5C0F5E
jmp	short loc_5C0D86

loc_5C0D7E:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_5C0D86:
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_CE], dl
movzx	eax, [ebp+var_CE]
test	eax, eax
jz	loc_5C0E54
mov	ecx, [ebp+arg_4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+var_84]
push	edx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5C0E4F
mov	[ebp+var_15], 0
lea	ecx, [ebp+var_90]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+var_88]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_15]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5C0FA4

loc_5C0E4F:
jmp	loc_5C0D7E

loc_5C0E54:
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
lea	edx, [ebp+var_AC]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A4]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 4
call	sub_5C70E0
mov	[ebp+var_A8], eax
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_AC]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+var_A8]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_CC]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_CC]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_B8]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_B0]
mov	[edx], eax
mov	ecx, [ebp+var_B8]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C0], edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_BC]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5C0FA4

loc_5C0F5E:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_CC]
call	sub_5C7900
mov	[ebp+var_C8], eax
mov	eax, [ebp+var_C8]
mov	ecx, [eax]
mov	[ebp+var_C4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5C0FA4:
mov	esp, ebp
pop	ebp
retn	8
sub_5C0CC0 endp

align 10h


; Attributes: bp-based frame

sub_5C0FB0 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_5C1012
jmp	short loc_5C102D

loc_5C1012:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_5C7A00

loc_5C102D:
mov	esp, ebp
pop	ebp
retn	4
sub_5C0FB0 endp

align 10h


; Attributes: bp-based frame

sub_5C1040 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C1087
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6BF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C1139

loc_5C1087:
cmp	[ebp+arg_10], 0
jnz	short loc_5C10BE
cmp	[ebp+arg_C], 0
jnz	short loc_5C10B5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C10BE

loc_5C10B5:
mov	[ebp+var_34], 1
jmp	short loc_5C10C5

loc_5C10BE:
mov	[ebp+var_34], 0

loc_5C10C5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5C10D7
and	[ebp+var_C], 0FFFFFFFEh

loc_5C10D7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C110D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6BF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5C110B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5C110B:
jmp	short loc_5C1139

loc_5C110D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6BF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5C1139
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5C1139:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C1040 endp

align 10h


; Attributes: bp-based frame

sub_5C1180 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C119C:
cmp	[ebp+var_10], 0
jz	short loc_5C11E6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C11D5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5C11DE

loc_5C11D5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5C11DE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5C119C

loc_5C11E6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5C1288
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5C1279
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C1040
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5C1301
jmp	short loc_5C1288

loc_5C1279:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C1288:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5C12E6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C1040
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5C1301

loc_5C12E6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5C1301:
mov	esp, ebp
pop	ebp
retn	8
sub_5C1180 endp

align 10h


; Attributes: bp-based frame

sub_5C1310 proc	near

var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_78], ecx
mov	[ebp+var_38], 0
mov	ecx, [ebp+var_78]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_3C], eax
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_78]
call	sub_5CA9A0
mov	[ebp+var_C], eax
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_40]
mov	eax, [edx+ecx*4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_48]
mov	eax, [edx+ecx*4+4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_8], ecx
jmp	short loc_5C1388

loc_5C1380:
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_5C1388:
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_50]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_58]
setnz	al
mov	[ebp+var_79], al
movzx	ecx, [ebp+var_79]
test	ecx, ecx
jz	short loc_5C13FE
or	[ebp+var_38], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_38], 2
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
lea	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_64]
push	eax
call	sub_40A9E0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5C13FE
mov	[ebp+var_80], 1
jmp	short loc_5C1405

loc_5C13FE:
mov	[ebp+var_80], 0

loc_5C1405:
mov	dl, byte ptr [ebp+var_80]
mov	[ebp+var_D], dl
mov	eax, [ebp+var_38]
and	eax, 2
jz	short loc_5C141F
and	[ebp+var_38], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_5C141F:
mov	ecx, [ebp+var_38]
and	ecx, 1
jz	short loc_5C1433
and	[ebp+var_38], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_5C1433:
movzx	edx, [ebp+var_D]
test	edx, edx
jz	short loc_5C1440
jmp	loc_5C1380

loc_5C1440:
lea	eax, [ebp+var_70]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_70]
setnz	dl
mov	[ebp+var_81], dl
movzx	eax, [ebp+var_81]
test	eax, eax
jz	short loc_5C1485
mov	ecx, [ebp+var_4]
mov	[ebp+var_74], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_74]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_5C1491
jmp	short loc_5C1491

loc_5C1485:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_5C1491:
mov	esp, ebp
pop	ebp
retn	8
sub_5C1310 endp

align 10h


; Attributes: bp-based frame

sub_5C14A0 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_18], eax
mov	eax, [ebp+arg_4]
push	eax
call	sub_5CC830
add	esp, 4
xor	edx, edx
div	[ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_54]
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+eax*4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+8]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_24]
mov	edx, [ecx+eax*4+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_8], eax
jmp	short loc_5C150F

loc_5C1507:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_5C150F:
lea	eax, [ebp+var_34]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_34]
setnz	dl
mov	[ebp+var_55], dl
movzx	eax, [ebp+var_55]
test	eax, eax
jz	short loc_5C1561
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_40], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jnz	short loc_5C1561
jmp	short loc_5C1507

loc_5C1561:
lea	eax, [ebp+var_4C]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_4C]
setnz	dl
mov	[ebp+var_56], dl
movzx	eax, [ebp+var_56]
test	eax, eax
jz	short loc_5C15A0
mov	ecx, [ebp+var_4]
mov	[ebp+var_50], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_50]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_5C15AC
jmp	short loc_5C15AC

loc_5C15A0:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_5C15AC:
mov	esp, ebp
pop	ebp
retn	8
sub_5C14A0 endp

align 10h


; Attributes: bp-based frame

sub_5C15C0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_5C1607
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6C90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C16BB

loc_5C1607:
cmp	[ebp+arg_10], 0
jnz	short loc_5C1640
cmp	[ebp+arg_C], 0
jnz	short loc_5C1637
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C1640

loc_5C1637:
mov	[ebp+var_44], 1
jmp	short loc_5C1647

loc_5C1640:
mov	[ebp+var_44], 0

loc_5C1647:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5C1659
and	[ebp+var_C], 0FFFFFFFEh

loc_5C1659:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C168F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5C6C90
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5C168D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5C168D:
jmp	short loc_5C16BB

loc_5C168F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6C90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5C16BB
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5C16BB:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C15C0 endp

align 10h


; Attributes: bp-based frame

sub_5C1700 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C1728:
cmp	[ebp+var_10], 0
jz	short loc_5C177D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C1766
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_5C1772

loc_5C1766:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_5C1772:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_5C1728

loc_5C177D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_5C182B
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_5C181C
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5C15C0
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_5C18AF
jmp	short loc_5C182B

loc_5C181C:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C182B:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_5C1894
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5C15C0
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5C18AF

loc_5C1894:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_5C18AF:
mov	esp, ebp
pop	ebp
retn	8
sub_5C1700 endp

align 10h


; Attributes: bp-based frame

sub_5C18C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C1907
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BF0E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C19BA

loc_5C1907:
cmp	[ebp+arg_10], 0
jnz	short loc_5C193F
cmp	[ebp+arg_C], 0
jnz	short loc_5C1936
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C193F

loc_5C1936:
mov	[ebp+var_34], 1
jmp	short loc_5C1946

loc_5C193F:
mov	[ebp+var_34], 0

loc_5C1946:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5C1958
and	[ebp+var_C], 0FFFFFFFEh

loc_5C1958:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C198E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BF0E0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5C198C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5C198C:
jmp	short loc_5C19BA

loc_5C198E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BF0E0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5C19BA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5C19BA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C18C0 endp

align 10h


; Attributes: bp-based frame

sub_5C1A00 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C1A1C:
cmp	[ebp+var_10], 0
jz	short loc_5C1A67
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C1A56
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5C1A5F

loc_5C1A56:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5C1A5F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5C1A1C

loc_5C1A67:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5C1B09
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5C1AFA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C18C0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5C1B83
jmp	short loc_5C1B09

loc_5C1AFA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C1B09:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5C1B68
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C18C0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5C1B83

loc_5C1B68:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5C1B83:
mov	esp, ebp
pop	ebp
retn	8
sub_5C1A00 endp

align 10h


; Attributes: bp-based frame

sub_5C1B90 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_40], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jnz	short loc_5C1BD7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6D50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C1C8B

loc_5C1BD7:
cmp	[ebp+arg_10], 0
jnz	short loc_5C1C10
cmp	[ebp+arg_C], 0
jnz	short loc_5C1C07
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C1C10

loc_5C1C07:
mov	[ebp+var_44], 1
jmp	short loc_5C1C17

loc_5C1C10:
mov	[ebp+var_44], 0

loc_5C1C17:
mov	al, byte ptr [ebp+var_44]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5C1C29
and	[ebp+var_C], 0FFFFFFFEh

loc_5C1C29:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C1C5F
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5C6D50
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5C1C5D
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5C1C5D:
jmp	short loc_5C1C8B

loc_5C1C5F:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5C6D50
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5C1C8B
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5C1C8B:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_40]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_40]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C1B90 endp

align 10h


; Attributes: bp-based frame

sub_5C1CD0 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C1CF8:
cmp	[ebp+var_10], 0
jz	short loc_5C1D4D
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C1D36
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_5C1D42

loc_5C1D36:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_90], edx

loc_5C1D42:
mov	eax, [ebp+var_90]
mov	[ebp+var_10], eax
jmp	short loc_5C1CF8

loc_5C1D4D:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_5C1DFB
mov	edx, [ebp+var_8C]
mov	eax, [edx+8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_91], al
movzx	ecx, [ebp+var_91]
test	ecx, ecx
jz	short loc_5C1DEC
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5C1B90
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_5C1E7F
jmp	short loc_5C1DFB

loc_5C1DEC:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C1DFB:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_5C]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_5C1E64
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_8C]
call	sub_5C1B90
mov	[ebp+var_88], eax
mov	eax, [ebp+var_88]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5C1E7F

loc_5C1E64:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_5C1E7F:
mov	esp, ebp
pop	ebp
retn	8
sub_5C1CD0 endp

align 10h


; Attributes: bp-based frame

sub_5C1E90 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 0C8h
idiv	ecx
mov	[ebp+var_4], eax
lea	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_44]
add	ecx, 8
call	sub_5C6DB0
mov	ecx, [ebp+var_44]
mov	[ecx], eax
mov	edx, [ebp+var_4]
imul	edx, 0C8h
mov	eax, [ebp+var_44]
add	edx, [eax]
mov	ecx, [ebp+var_44]
mov	[ecx+8], edx
mov	edx, [ebp+var_44]
mov	eax, [edx]
mov	[ebp+var_40], eax
xor	ecx, ecx
mov	[ebp+var_22], cl
mov	dl, [ebp+var_22]
mov	[ebp+var_21], dl
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CA9F0
add	esp, 10h
mov	ecx, [ebp+var_44]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5C1E90 endp

align 10h


; Attributes: bp-based frame

sub_5C1F20 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C7DB0
add	esp, 14h
pop	ebp
retn
sub_5C1F20 endp

align 10h


; Attributes: bp-based frame

sub_5C1F40 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
sub	esp, 50h
mov	ecx, esp
mov	eax, [ebp+arg_4]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+arg_0]
push	edx
call	sub_5870E0
call	[ebp+arg_C]
add	esp, 0A0h
mov	[ebp+var_2C], eax
cmp	[ebp+var_2C], 0
jz	short loc_5C1FE8
sub	esp, 50h
mov	ecx, esp
mov	eax, [ebp+arg_8]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+arg_4]
push	edx
call	sub_5870E0
call	[ebp+arg_C]
add	esp, 0A0h
mov	[ebp+var_30], eax
cmp	[ebp+var_30], 0
jz	short loc_5C1FAC
mov	eax, [ebp+arg_4]
jmp	loc_5C2055
jmp	short loc_5C1FE6

loc_5C1FAC:
sub	esp, 50h
mov	ecx, esp
mov	eax, [ebp+arg_8]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+arg_0]
push	edx
call	sub_5870E0
call	[ebp+arg_C]
add	esp, 0A0h
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 0
jz	short loc_5C1FE1
mov	eax, [ebp+arg_8]
jmp	short loc_5C2055
jmp	short loc_5C1FE6

loc_5C1FE1:
mov	eax, [ebp+arg_0]
jmp	short loc_5C2055

loc_5C1FE6:
jmp	short loc_5C2055

loc_5C1FE8:
sub	esp, 50h
mov	ecx, esp
mov	eax, [ebp+arg_8]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+arg_0]
push	edx
call	sub_5870E0
call	[ebp+arg_C]
add	esp, 0A0h
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 0
jz	short loc_5C201D
mov	eax, [ebp+arg_0]
jmp	short loc_5C2055
jmp	short loc_5C2055

loc_5C201D:
sub	esp, 50h
mov	ecx, esp
mov	eax, [ebp+arg_8]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+arg_4]
push	edx
call	sub_5870E0
call	[ebp+arg_C]
add	esp, 0A0h
mov	[ebp+var_3C], eax
cmp	[ebp+var_3C], 0
jz	short loc_5C2052
mov	eax, [ebp+arg_8]
jmp	short loc_5C2055
jmp	short loc_5C2055

loc_5C2052:
mov	eax, [ebp+arg_4]

loc_5C2055:
mov	esp, ebp
pop	ebp
retn
sub_5C1F40 endp

align 10h


; Attributes: bp-based frame

sub_5C2060 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_14=	dword ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= byte ptr	 14h
arg_58=	dword ptr  60h

push	ebp
mov	ebp, esp
sub	esp, 74h

loc_5C2066:
sub	esp, 50h
mov	ecx, esp
lea	eax, [ebp+arg_8]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+arg_0]
push	edx
call	sub_5870E0
call	[ebp+arg_58]
add	esp, 0A0h
mov	[ebp+var_70], eax
cmp	[ebp+var_70], 0
jz	short loc_5C209F
mov	eax, [ebp+arg_0]
add	eax, 50h
mov	[ebp+arg_0], eax
jmp	short loc_5C2066

loc_5C209F:
mov	ecx, [ebp+arg_4]
sub	ecx, 50h
mov	[ebp+arg_4], ecx

loc_5C20A8:
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+arg_4]
push	edx
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
lea	eax, [ebp+arg_8]
push	eax
call	sub_5870E0
call	[ebp+arg_58]
add	esp, 0A0h
mov	[ebp+var_74], eax
cmp	[ebp+var_74], 0
jz	short loc_5C20E1
mov	ecx, [ebp+arg_4]
sub	ecx, 50h
mov	[ebp+arg_4], ecx
jmp	short loc_5C20A8

loc_5C20E1:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_5C20FC
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	eax, [ebp+var_14]
jmp	short loc_5C2122

loc_5C20FC:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C7EB0
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 50h
mov	[ebp+arg_0], eax
jmp	loc_5C2066
lea	ecx, [ebp+arg_C]
call	sub_407E50

loc_5C2122:
mov	esp, ebp
pop	ebp
retn
sub_5C2060 endp

align 10h


; Attributes: bp-based frame

sub_5C2130 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5C2140
jmp	short loc_5C2180

loc_5C2140:
mov	ecx, [ebp+arg_0]
add	ecx, 50h
mov	[ebp+var_4], ecx
jmp	short loc_5C2154

loc_5C214B:
mov	edx, [ebp+var_4]
add	edx, 50h
mov	[ebp+var_4], edx

loc_5C2154:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_5C2180
mov	ecx, [ebp+arg_C]
push	ecx
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_5870E0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C7F00
add	esp, 5Ch
jmp	short loc_5C214B

loc_5C2180:
mov	esp, ebp
pop	ebp
retn
sub_5C2130 endp

align 10h


; Attributes: bp-based frame

sub_5C2190 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBBC0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C2190 endp

align 10h


; Attributes: bp-based frame

sub_5C21C0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5C21DC

loc_5C21D3:
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_8], edx

loc_5C21DC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5C2206
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_429100
xor	edx, edx
and	edx, 1
jz	short loc_5C2204
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C2204:
jmp	short loc_5C21D3

loc_5C2206:
mov	esp, ebp
pop	ebp
retn
sub_5C21C0 endp

align 10h


; Attributes: bp-based frame

sub_5C2210 proc	near

var_C0=	dword ptr -0C0h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_5C229A
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
sar	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+8]
sub	eax, [edx+4]
sar	eax, 4
cmp	eax, [ebp+var_4]
jb	short loc_5C227F
xor	ecx, ecx
mov	[ebp+var_5], cl
lea	edx, [ebp+var_5]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C8050
jmp	short loc_5C229A

loc_5C227F:
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C81A0

loc_5C229A:
mov	esp, ebp
pop	ebp
retn	10h
sub_5C2210 endp



; Attributes: bp-based frame

sub_5C22A0 proc	near

var_C0=	dword ptr -0C0h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_C0], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_5C232A
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
sar	eax, 3
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C0]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+8]
sub	eax, [edx+4]
sar	eax, 3
cmp	eax, [ebp+var_4]
jb	short loc_5C230F
xor	ecx, ecx
mov	[ebp+var_5], cl
lea	edx, [ebp+var_5]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5C82B0
jmp	short loc_5C232A

loc_5C230F:
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5C8400

loc_5C232A:
mov	esp, ebp
pop	ebp
retn	10h
sub_5C22A0 endp



; Attributes: bp-based frame

sub_5C2330 proc	near

var_100= dword ptr -100h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_100], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_5C23BA
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
sar	eax, 3
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_100]
mov	edx, [ebp+var_100]
mov	eax, [ecx+8]
sub	eax, [edx+4]
sar	eax, 3
cmp	eax, [ebp+var_4]
jb	short loc_5C239F
xor	ecx, ecx
mov	[ebp+var_5], cl
lea	edx, [ebp+var_5]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_100]
call	sub_5C8510
jmp	short loc_5C23BA

loc_5C239F:
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_100]
call	sub_5C8700

loc_5C23BA:
mov	esp, ebp
pop	ebp
retn	10h
sub_5C2330 endp



; Attributes: bp-based frame

sub_5C23C0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	[ebp+arg_C]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C2423
mov	edx, [ebp+arg_8]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
push	edx
call	[ebp+arg_C]
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5C23FC
mov	eax, [ebp+arg_4]
jmp	short loc_5C2466
jmp	short loc_5C2421

loc_5C23FC:
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	[ebp+arg_C]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C241C
mov	eax, [ebp+arg_8]
jmp	short loc_5C2466
jmp	short loc_5C2421

loc_5C241C:
mov	eax, [ebp+arg_0]
jmp	short loc_5C2466

loc_5C2421:
jmp	short loc_5C2466

loc_5C2423:
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	[ebp+arg_C]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C2443
mov	eax, [ebp+arg_0]
jmp	short loc_5C2466
jmp	short loc_5C2466

loc_5C2443:
mov	edx, [ebp+arg_8]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
push	edx
call	[ebp+arg_C]
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5C2463
mov	eax, [ebp+arg_8]
jmp	short loc_5C2466
jmp	short loc_5C2466

loc_5C2463:
mov	eax, [ebp+arg_4]

loc_5C2466:
pop	ebp
retn
sub_5C23C0 endp

align 10h


; Attributes: bp-based frame

sub_5C2470 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C88B0
add	esp, 14h
pop	ebp
retn
sub_5C2470 endp

align 10h


; Attributes: bp-based frame

sub_5C2490 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8Ch
sub	esp, 34h
mov	[ebp+var_30], esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_30]
call	sub_403400
mov	ecx, [ebp+var_30]
add	ecx, 28h
mov	[ebp+var_2C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_2C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
sub	esp, 34h
mov	[ebp+var_38], esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_403400
mov	ecx, [ebp+var_38]
add	ecx, 28h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_34]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_C]
add	esp, 68h
mov	[ebp+var_7C], eax
cmp	[ebp+var_7C], 0
jz	loc_5C268C
sub	esp, 34h
mov	[ebp+var_40], esp
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_403400
mov	ecx, [ebp+var_40]
add	ecx, 28h
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_3C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
sub	esp, 34h
mov	[ebp+var_48], esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_48]
call	sub_403400
mov	ecx, [ebp+var_48]
add	ecx, 28h
mov	[ebp+var_44], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_44]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_48]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_C]
add	esp, 68h
mov	[ebp+var_80], eax
cmp	[ebp+var_80], 0
jz	short loc_5C25D8
mov	eax, [ebp+arg_4]
jmp	loc_5C27DD
jmp	loc_5C2687

loc_5C25D8:
sub	esp, 34h
mov	[ebp+var_50], esp
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_50]
call	sub_403400
mov	ecx, [ebp+var_50]
add	ecx, 28h
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_4C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_50]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
sub	esp, 34h
mov	[ebp+var_58], esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_58]
call	sub_403400
mov	ecx, [ebp+var_58]
add	ecx, 28h
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_54]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_C]
add	esp, 68h
mov	[ebp+var_84], eax
cmp	[ebp+var_84], 0
jz	short loc_5C267F
mov	eax, [ebp+arg_8]
jmp	loc_5C27DD
jmp	short loc_5C2687

loc_5C267F:
mov	eax, [ebp+arg_0]
jmp	loc_5C27DD

loc_5C2687:
jmp	loc_5C27DD

loc_5C268C:
sub	esp, 34h
mov	[ebp+var_60], esp
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_60]
call	sub_403400
mov	ecx, [ebp+var_60]
add	ecx, 28h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_5C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_60]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
sub	esp, 34h
mov	[ebp+var_68], esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_403400
mov	ecx, [ebp+var_68]
add	ecx, 28h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_64]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_68]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_C]
add	esp, 68h
mov	[ebp+var_88], eax
cmp	[ebp+var_88], 0
jz	short loc_5C2736
mov	eax, [ebp+arg_0]
jmp	loc_5C27DD
jmp	loc_5C27DD

loc_5C2736:
sub	esp, 34h
mov	[ebp+var_70], esp
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_70]
call	sub_403400
mov	ecx, [ebp+var_70]
add	ecx, 28h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_6C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
sub	esp, 34h
mov	[ebp+var_78], esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_78]
call	sub_403400
mov	ecx, [ebp+var_78]
add	ecx, 28h
mov	[ebp+var_74], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_74]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_78]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_C]
add	esp, 68h
mov	[ebp+var_8C], eax
cmp	[ebp+var_8C], 0
jz	short loc_5C27DA
mov	eax, [ebp+arg_8]
jmp	short loc_5C27DD
jmp	short loc_5C27DD

loc_5C27DA:
mov	eax, [ebp+arg_4]

loc_5C27DD:
mov	esp, ebp
pop	ebp
retn
sub_5C2490 endp

align 10h


; Attributes: bp-based frame

sub_5C27F0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch
arg_38=	byte ptr  40h
arg_39=	byte ptr  41h
arg_3C=	dword ptr  44h

push	ebp
mov	ebp, esp
sub	esp, 7Ch

loc_5C27F6:
sub	esp, 34h
mov	[ebp+var_1C], esp
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_403400
mov	ecx, [ebp+var_1C]
add	ecx, 28h
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_30]
mov	eax, [ebp+arg_34]
mov	ecx, [ebp+var_18]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_1C]
mov	al, [ebp+arg_38]
mov	[edx+30h], al
mov	ecx, [ebp+var_1C]
mov	dl, [ebp+arg_39]
mov	[ecx+31h], dl
sub	esp, 34h
mov	[ebp+var_24], esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_24]
call	sub_403400
mov	ecx, [ebp+var_24]
add	ecx, 28h
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_20]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_3C]
add	esp, 68h
mov	[ebp+var_78], eax
cmp	[ebp+var_78], 0
jz	short loc_5C2892
mov	eax, [ebp+arg_0]
add	eax, 34h
mov	[ebp+arg_0], eax
jmp	loc_5C27F6

loc_5C2892:
mov	ecx, [ebp+arg_4]
sub	ecx, 34h
mov	[ebp+arg_4], ecx

loc_5C289B:
sub	esp, 34h
mov	[ebp+var_2C], esp
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_403400
mov	eax, [ebp+var_2C]
add	eax, 28h
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_28]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_4]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_4]
mov	cl, [eax+31h]
mov	[edx+31h], cl
sub	esp, 34h
mov	[ebp+var_34], esp
lea	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_34]
call	sub_403400
mov	eax, [ebp+var_34]
add	eax, 28h
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_30]
mov	edx, [ebp+arg_34]
mov	eax, [ebp+var_30]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_34]
mov	dl, [ebp+arg_38]
mov	[ecx+30h], dl
mov	eax, [ebp+var_34]
mov	cl, [ebp+arg_39]
mov	[eax+31h], cl
call	[ebp+arg_3C]
add	esp, 68h
mov	[ebp+var_7C], eax
cmp	[ebp+var_7C], 0
jz	short loc_5C2937
mov	edx, [ebp+arg_4]
sub	edx, 34h
mov	[ebp+arg_4], edx
jmp	loc_5C289B

loc_5C2937:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jb	short loc_5C2952
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
lea	ecx, [ebp+arg_8]
call	sub_407E50
mov	eax, [ebp+var_14]
jmp	short loc_5C2978

loc_5C2952:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C8A30
add	esp, 8
mov	ecx, [ebp+arg_0]
add	ecx, 34h
mov	[ebp+arg_0], ecx
jmp	loc_5C27F6
lea	ecx, [ebp+arg_8]
call	sub_407E50

loc_5C2978:
mov	esp, ebp
pop	ebp
retn
sub_5C27F0 endp

align 10h


; Attributes: bp-based frame

sub_5C2980 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5C2990
jmp	short loc_5C2A06

loc_5C2990:
mov	ecx, [ebp+arg_0]
add	ecx, 34h
mov	[ebp+var_4], ecx
jmp	short loc_5C29A4

loc_5C299B:
mov	edx, [ebp+var_4]
add	edx, 34h
mov	[ebp+var_4], edx

loc_5C29A4:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_5C2A06
mov	ecx, [ebp+arg_C]
push	ecx
sub	esp, 34h
mov	[ebp+var_10], esp
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_403400
mov	eax, [ebp+var_10]
add	eax, 28h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_C]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_4]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_4]
mov	cl, [eax+31h]
mov	[edx+31h], cl
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C8A80
add	esp, 40h
jmp	short loc_5C299B

loc_5C2A06:
mov	esp, ebp
pop	ebp
retn
sub_5C2980 endp

align 10h


; Attributes: bp-based frame

sub_5C2A10 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C2A57
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5AAFF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C2B09

loc_5C2A57:
cmp	[ebp+arg_10], 0
jnz	short loc_5C2A8E
cmp	[ebp+arg_C], 0
jnz	short loc_5C2A85
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C2A8E

loc_5C2A85:
mov	[ebp+var_34], 1
jmp	short loc_5C2A95

loc_5C2A8E:
mov	[ebp+var_34], 0

loc_5C2A95:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5C2AA7
and	[ebp+var_C], 0FFFFFFFEh

loc_5C2AA7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C2ADD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5AAFF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5C2ADB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5C2ADB:
jmp	short loc_5C2B09

loc_5C2ADD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AAFF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5C2B09
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5C2B09:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C2A10 endp

align 10h


; Attributes: bp-based frame

sub_5C2B50 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C2B6C:
cmp	[ebp+var_10], 0
jz	short loc_5C2BB6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C2BA5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5C2BAE

loc_5C2BA5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5C2BAE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5C2B6C

loc_5C2BB6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5C2C58
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5C2C49
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C2A10
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5C2CD1
jmp	short loc_5C2C58

loc_5C2C49:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C2C58:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5C2CB6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C2A10
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5C2CD1

loc_5C2CB6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5C2CD1:
mov	esp, ebp
pop	ebp
retn	8
sub_5C2B50 endp

align 10h


; Attributes: bp-based frame

sub_5C2CE0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C2D27
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BE230
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C2DD9

loc_5C2D27:
cmp	[ebp+arg_10], 0
jnz	short loc_5C2D5E
cmp	[ebp+arg_C], 0
jnz	short loc_5C2D55
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C2D5E

loc_5C2D55:
mov	[ebp+var_34], 1
jmp	short loc_5C2D65

loc_5C2D5E:
mov	[ebp+var_34], 0

loc_5C2D65:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5C2D77
and	[ebp+var_C], 0FFFFFFFEh

loc_5C2D77:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C2DAD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BE230
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5C2DAB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5C2DAB:
jmp	short loc_5C2DD9

loc_5C2DAD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5BE230
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5C2DD9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5C2DD9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C2CE0 endp

align 10h


; Attributes: bp-based frame

sub_5C2E20 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C2E3C:
cmp	[ebp+var_10], 0
jz	short loc_5C2E86
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C2E75
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5C2E7E

loc_5C2E75:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5C2E7E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5C2E3C

loc_5C2E86:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5C2F28
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5C2F19
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C2CE0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5C2FA1
jmp	short loc_5C2F28

loc_5C2F19:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C2F28:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5C2F86
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C2CE0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5C2FA1

loc_5C2F86:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5C2FA1:
mov	esp, ebp
pop	ebp
retn	8
sub_5C2E20 endp

align 10h


; Attributes: bp-based frame

sub_5C2FB0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C2FF7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6E30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C30D4

loc_5C2FF7:
cmp	[ebp+arg_10], 0
jnz	short loc_5C3059
cmp	[ebp+arg_C], 0
jnz	short loc_5C3050
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5C3041
jb	short loc_5C3038
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5C3041

loc_5C3038:
mov	[ebp+var_3C], 1
jmp	short loc_5C3048

loc_5C3041:
mov	[ebp+var_3C], 0

loc_5C3048:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5C3059

loc_5C3050:
mov	[ebp+var_40], 1
jmp	short loc_5C3060

loc_5C3059:
mov	[ebp+var_40], 0

loc_5C3060:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5C3072
and	[ebp+var_C], 0FFFFFFFEh

loc_5C3072:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C30A8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6E30
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5C30A6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5C30A6:
jmp	short loc_5C30D4

loc_5C30A8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6E30
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5C30D4
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5C30D4:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C2FB0 endp

align 10h


; Attributes: bp-based frame

sub_5C3120 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C3138:
cmp	[ebp+var_8], 0
jz	short loc_5C3179
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_5C316E
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5C3177

loc_5C316E:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5C3177:
jmp	short loc_5C3138

loc_5C3179:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_1C]
jz	short loc_5C31A6
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_14]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5C31A6
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax

loc_5C31A6:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C3120 endp

align 10h


; Attributes: bp-based frame

sub_5C31B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C31F7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6E80
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C32AA

loc_5C31F7:
cmp	[ebp+arg_10], 0
jnz	short loc_5C322F
cmp	[ebp+arg_C], 0
jnz	short loc_5C3226
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C322F

loc_5C3226:
mov	[ebp+var_34], 1
jmp	short loc_5C3236

loc_5C322F:
mov	[ebp+var_34], 0

loc_5C3236:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5C3248
and	[ebp+var_C], 0FFFFFFFEh

loc_5C3248:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C327E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6E80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5C327C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5C327C:
jmp	short loc_5C32AA

loc_5C327E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6E80
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5C32AA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5C32AA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C31B0 endp

align 10h


; Attributes: bp-based frame

sub_5C32F0 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_B2=	byte ptr -0B2h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_92=	byte ptr -92h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_80=	dword ptr -80h
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_20]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_DC]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 5Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_5C33C9
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
xor	ecx, ecx
mov	[ebp+var_25], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_DC]
add	ecx, 8
call	sub_57FEF0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C8C40
add	esp, 0Ch
mov	ecx, [ebp+var_24]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_DC]
call	sub_5C69A0
mov	edx, [ebp+var_8]
imul	edx, 5Ch
add	edx, [ebp+var_C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_4]
imul	edx, 5Ch
add	edx, [ebp+var_C]
mov	eax, [ebp+var_DC]
mov	[eax+4], edx
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_68]
mov	[ecx+8], edx
jmp	loc_5C3515

loc_5C33C9:
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_DC]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 5Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_5C343F
mov	edx, [ebp+var_DC]
mov	eax, [edx]
mov	[ebp+var_80], eax
xor	ecx, ecx
mov	[ebp+var_6A], cl
mov	dl, [ebp+var_6A]
mov	[ebp+var_69], dl
lea	eax, [ebp+var_69]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CAEC0
add	esp, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_57DC70
add	esp, 8
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
jmp	loc_5C3515

loc_5C343F:
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_DC]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
imul	edx, 5Ch
add	edx, [ebp+var_14]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_AC], edx
xor	eax, eax
mov	[ebp+var_92], al
mov	cl, [ebp+var_92]
mov	[ebp+var_91], cl
lea	edx, [ebp+var_91]
push	edx
mov	eax, [ebp+var_B0]
push	eax
mov	ecx, [ebp+var_AC]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CAEC0
add	esp, 10h
mov	eax, [ebp+var_DC]
mov	ecx, [eax+4]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_D4], edx
xor	eax, eax
mov	[ebp+var_B2], al
mov	cl, [ebp+var_B2]
mov	[ebp+var_B1], cl
lea	edx, [ebp+var_B1]
push	edx
mov	eax, [ebp+var_D8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_D4]
push	edx
call	sub_5CAF40
add	esp, 10h
mov	ecx, [ebp+var_DC]
mov	[ecx+4], eax

loc_5C3515:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5C32F0 endp

align 10h


; Attributes: bp-based frame

sub_5C3520 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C8C70
add	esp, 14h
pop	ebp
retn
sub_5C3520 endp



; Attributes: bp-based frame

sub_5C3540 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
movzx	ecx, word ptr [eax+0Eh]
mov	edx, [ebp+arg_0]
movzx	eax, word ptr [edx+0Eh]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C35AC
mov	ecx, [ebp+arg_8]
movzx	edx, word ptr [ecx+0Eh]
mov	eax, [ebp+arg_4]
movzx	ecx, word ptr [eax+0Eh]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C3582
mov	eax, [ebp+arg_4]
jmp	short loc_5C35F5
jmp	short loc_5C35AA

loc_5C3582:
mov	edx, [ebp+arg_8]
movzx	eax, word ptr [edx+0Eh]
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx+0Eh]
xor	ecx, ecx
cmp	edx, eax
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5C35A5
mov	eax, [ebp+arg_8]
jmp	short loc_5C35F5
jmp	short loc_5C35AA

loc_5C35A5:
mov	eax, [ebp+arg_0]
jmp	short loc_5C35F5

loc_5C35AA:
jmp	short loc_5C35F5

loc_5C35AC:
mov	eax, [ebp+arg_8]
movzx	ecx, word ptr [eax+0Eh]
mov	edx, [ebp+arg_0]
movzx	eax, word ptr [edx+0Eh]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C35CF
mov	eax, [ebp+arg_0]
jmp	short loc_5C35F5
jmp	short loc_5C35F5

loc_5C35CF:
mov	ecx, [ebp+arg_8]
movzx	edx, word ptr [ecx+0Eh]
mov	eax, [ebp+arg_4]
movzx	ecx, word ptr [eax+0Eh]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C35F2
mov	eax, [ebp+arg_8]
jmp	short loc_5C35F5
jmp	short loc_5C35F5

loc_5C35F2:
mov	eax, [ebp+arg_4]

loc_5C35F5:
pop	ebp
retn
sub_5C3540 endp

align 10h


; Attributes: bp-based frame

sub_5C3600 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_16=	word ptr  1Eh

push	ebp
mov	ebp, esp
sub	esp, 20h

loc_5C3606:
movzx	eax, [ebp+arg_16]
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx+0Eh]
xor	ecx, ecx
cmp	edx, eax
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5C362A
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+arg_0], eax
jmp	short loc_5C3606

loc_5C362A:
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
mov	[ebp+arg_4], ecx

loc_5C3633:
mov	edx, [ebp+arg_4]
movzx	eax, word ptr [edx+0Eh]
movzx	ecx, [ebp+arg_16]
xor	edx, edx
cmp	ecx, eax
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C3657
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
mov	[ebp+arg_4], ecx
jmp	short loc_5C3633

loc_5C3657:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_5C3664
mov	eax, [ebp+arg_0]
jmp	short loc_5C367F

loc_5C3664:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_527800
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+arg_0], edx
jmp	short loc_5C3606

loc_5C367F:
mov	esp, ebp
pop	ebp
retn
sub_5C3600 endp

align 10h


; Attributes: bp-based frame

sub_5C3690 proc	near

var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5C36A3
jmp	loc_5C3761

loc_5C36A3:
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+var_4], ecx
jmp	short loc_5C36B7

loc_5C36AE:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4], edx

loc_5C36B7:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	loc_5C3761
mov	cl, [ebp+arg_C]
mov	[ebp+var_21], cl
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [edx+4]
mov	[ebp+var_1C], ecx
mov	eax, [edx+8]
mov	[ebp+var_18], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
movzx	eax, word ptr [edx+0Eh]
movzx	ecx, word ptr [ebp+var_14+2]
xor	edx, edx
cmp	ecx, eax
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C372F
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F4430
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
jmp	short loc_5C375C

loc_5C372F:
movzx	ecx, [ebp+var_21]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_5CB060
add	esp, 18h

loc_5C375C:
jmp	loc_5C36AE

loc_5C3761:
mov	esp, ebp
pop	ebp
retn
sub_5C3690 endp

align 10h


; Attributes: bp-based frame

sub_5C3770 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_14]
sar	edx, 4
mov	[ebp+var_4], edx

loc_5C378E:
cmp	[ebp+var_4], 0
jle	short loc_5C37EF
mov	eax, [ebp+var_4]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_8]
movzx	ecx, word ptr [eax+0Eh]
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+0Eh]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C37E7
mov	ecx, [ebp+var_C]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
sub	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5C37ED

loc_5C37E7:
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx

loc_5C37ED:
jmp	short loc_5C378E

loc_5C37EF:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5C3770 endp

align 10h


; Attributes: bp-based frame

sub_5C3800 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_14]
sar	edx, 4
mov	[ebp+var_4], edx

loc_5C381E:
cmp	[ebp+var_4], 0
jle	short loc_5C387F
mov	eax, [ebp+var_4]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax+0Eh]
mov	edx, [ebp+arg_8]
movzx	eax, word ptr [edx+0Eh]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C3862
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
jmp	short loc_5C387D

loc_5C3862:
mov	edx, [ebp+var_C]
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_5C387D:
jmp	short loc_5C381E

loc_5C387F:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5C3800 endp

align 10h


; Attributes: bp-based frame

sub_5C3890 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_14]
sar	edx, 4
mov	[ebp+var_4], edx

loc_5C38AE:
cmp	[ebp+var_4], 0
jle	short loc_5C390E
mov	eax, [ebp+var_4]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_8]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_C]
movzx	eax, word ptr [edx+0Ch]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C3906
mov	ecx, [ebp+var_C]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
sub	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5C390C

loc_5C3906:
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx

loc_5C390C:
jmp	short loc_5C38AE

loc_5C390E:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5C3890 endp

align 10h


; Attributes: bp-based frame

sub_5C3920 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_14]
sar	edx, 4
mov	[ebp+var_4], edx

loc_5C393E:
cmp	[ebp+var_4], 0
jle	short loc_5C399E
mov	eax, [ebp+var_4]
sar	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax+0Ch]
mov	edx, [ebp+arg_8]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C3981
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
jmp	short loc_5C399C

loc_5C3981:
mov	edx, [ebp+var_C]
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_4]
sub	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_5C399C:
jmp	short loc_5C393E

loc_5C399E:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5C3920 endp

align 10h


; Attributes: bp-based frame

sub_5C39B0 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C39C8:
cmp	[ebp+var_8], 0
jz	short loc_5C3A10
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+var_C]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5C3A05
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5C3A0E

loc_5C3A05:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5C3A0E:
jmp	short loc_5C39C8

loc_5C3A10:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_24]
jz	short loc_5C3A44
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C3A44
mov	edx, [ebp+var_24]
mov	[ebp+var_4], edx

loc_5C3A44:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C39B0 endp

align 10h


; Attributes: bp-based frame

sub_5C3A50 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	byte ptr -6Ch
var_42=	byte ptr -42h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C4BD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C4h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+var_C8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_5C3A89:
cmp	[ebp+var_14], 0
jz	loc_5C3B25
lea	ecx, [ebp+var_41]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_40]
call	sub_407810
lea	edx, [ebp+var_75]
mov	[ebp+var_CC], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_74], eax
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+var_74]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_15], al
lea	ecx, [ebp+var_40]
call	sub_407E50
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	ecx, [ebp+var_15]
test	ecx, ecx
jz	short loc_5C3B17
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_5C3B20

loc_5C3B17:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_5C3B20:
jmp	loc_5C3A89

loc_5C3B25:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_C8]
jz	short loc_5C3BAB
lea	ecx, [ebp+var_6D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_6C]
call	sub_407810
lea	ecx, [ebp+var_8D]
mov	[ebp+var_D0], ecx
mov	[ebp+var_4], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_8C]
push	eax
lea	ecx, [ebp+var_6C]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_42], al
lea	ecx, [ebp+var_6C]
call	sub_407E50
lea	ecx, [ebp+var_6D]
call	nullsub_1
movzx	edx, [ebp+var_42]
test	edx, edx
jz	short loc_5C3BAB
mov	eax, [ebp+var_C8]
mov	[ebp+var_10], eax

loc_5C3BAB:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5C3A50 endp

align 10h


; Attributes: bp-based frame

sub_5C3BC0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C3C07
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5AAF00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C3CE4

loc_5C3C07:
cmp	[ebp+arg_10], 0
jnz	short loc_5C3C69
cmp	[ebp+arg_C], 0
jnz	short loc_5C3C60
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5C3C51
jb	short loc_5C3C48
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5C3C51

loc_5C3C48:
mov	[ebp+var_3C], 1
jmp	short loc_5C3C58

loc_5C3C51:
mov	[ebp+var_3C], 0

loc_5C3C58:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5C3C69

loc_5C3C60:
mov	[ebp+var_40], 1
jmp	short loc_5C3C70

loc_5C3C69:
mov	[ebp+var_40], 0

loc_5C3C70:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5C3C82
and	[ebp+var_C], 0FFFFFFFEh

loc_5C3C82:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C3CB8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AAF00
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5C3CB6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5C3CB6:
jmp	short loc_5C3CE4

loc_5C3CB8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5AAF00
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5C3CE4
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5C3CE4:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C3BC0 endp

align 10h


; Attributes: bp-based frame

sub_5C3D30 proc	near

var_104= dword ptr -104h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 104h
mov	[ebp+var_104], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_5C3DC6
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_104]
mov	eax, [ebp+var_104]
mov	ecx, [edx+8]
sub	ecx, [eax+4]
mov	eax, ecx
cdq
mov	ecx, 68h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_5C3DAB
xor	edx, edx
mov	[ebp+var_5], dl
lea	eax, [ebp+var_5]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_104]
call	sub_5C8F00
jmp	short loc_5C3DC6

loc_5C3DAB:
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_104]
call	sub_5C9160

loc_5C3DC6:
mov	esp, ebp
pop	ebp
retn	10h
sub_5C3D30 endp

align 10h


; Attributes: bp-based frame

sub_5C3DD0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C3E17
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6ED0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C3EC6

loc_5C3E17:
cmp	[ebp+arg_10], 0
jnz	short loc_5C3E4B
cmp	[ebp+arg_C], 0
jnz	short loc_5C3E42
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5C3E4B

loc_5C3E42:
mov	[ebp+var_34], 1
jmp	short loc_5C3E52

loc_5C3E4B:
mov	[ebp+var_34], 0

loc_5C3E52:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5C3E64
and	[ebp+var_C], 0FFFFFFFEh

loc_5C3E64:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C3E9A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6ED0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5C3E98
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5C3E98:
jmp	short loc_5C3EC6

loc_5C3E9A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6ED0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5C3EC6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5C3EC6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C3DD0 endp

align 10h


; Attributes: bp-based frame

sub_5C3F10 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C3F2C:
cmp	[ebp+var_10], 0
jz	short loc_5C3F73
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C3F62
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5C3F6B

loc_5C3F62:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5C3F6B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5C3F2C

loc_5C3F73:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5C4015
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5C4006
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C3DD0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5C408B
jmp	short loc_5C4015

loc_5C4006:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C4015:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5C4070
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5C3DD0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5C408B

loc_5C4070:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5C408B:
mov	esp, ebp
pop	ebp
retn	8
sub_5C3F10 endp

align 10h


; Attributes: bp-based frame

sub_5C40A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C40E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BF190
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C4196

loc_5C40E7:
cmp	[ebp+arg_10], 0
jnz	short loc_5C411B
cmp	[ebp+arg_C], 0
jnz	short loc_5C4112
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5C411B

loc_5C4112:
mov	[ebp+var_34], 1
jmp	short loc_5C4122

loc_5C411B:
mov	[ebp+var_34], 0

loc_5C4122:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5C4134
and	[ebp+var_C], 0FFFFFFFEh

loc_5C4134:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C416A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BF190
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5C4168
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5C4168:
jmp	short loc_5C4196

loc_5C416A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BF190
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5C4196
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5C4196:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C40A0 endp

align 10h


; Attributes: bp-based frame

sub_5C41E0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C41FC:
cmp	[ebp+var_10], 0
jz	short loc_5C4243
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C4232
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5C423B

loc_5C4232:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5C423B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5C41FC

loc_5C4243:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5C42E5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5C42D6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C40A0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5C435B
jmp	short loc_5C42E5

loc_5C42D6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C42E5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5C4340
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5C40A0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5C435B

loc_5C4340:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5C435B:
mov	esp, ebp
pop	ebp
retn	8
sub_5C41E0 endp

align 10h


; Attributes: bp-based frame

sub_5C4370 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
movzx	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C9310
add	esp, 14h
pop	ebp
retn
sub_5C4370 endp



; Attributes: bp-based frame

sub_5C4390 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+60h]
xor	eax, eax
cmp	edx, [ecx+60h]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C4408
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
mov	ecx, [edx+60h]
xor	edx, edx
cmp	ecx, [eax+60h]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C43D6
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
jmp	loc_5C445B
jmp	short loc_5C4406

loc_5C43D6:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	ecx, [edx+60h]
xor	edx, edx
cmp	ecx, [eax+60h]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C43FB
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
jmp	short loc_5C445B
jmp	short loc_5C4406

loc_5C43FB:
mov	edx, [ebp+arg_0]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
jmp	short loc_5C445B

loc_5C4406:
jmp	short loc_5C445B

loc_5C4408:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	edx, [eax+60h]
xor	eax, eax
cmp	edx, [ecx+60h]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C442D
mov	edx, [ebp+arg_0]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
jmp	short loc_5C445B
jmp	short loc_5C445B

loc_5C442D:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
mov	edx, [eax+60h]
xor	eax, eax
cmp	edx, [ecx+60h]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C4452
mov	edx, [ebp+arg_8]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
jmp	short loc_5C445B
jmp	short loc_5C445B

loc_5C4452:
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]

loc_5C445B:
mov	esp, ebp
pop	ebp
retn
sub_5C4390 endp

align 10h


; Attributes: bp-based frame

sub_5C4460 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h
arg_34=	byte ptr  3Ch
arg_68=	dword ptr  70h

push	ebp
mov	ebp, esp
sub	esp, 70h

loc_5C4466:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
xor	edx, edx
cmp	ecx, [ebp+arg_68]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C4486
mov	ecx, [ebp+arg_0]
add	ecx, 64h
mov	[ebp+arg_0], ecx
jmp	short loc_5C4466

loc_5C4486:
mov	edx, [ebp+arg_4]
sub	edx, 64h
mov	[ebp+arg_4], edx

loc_5C448F:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_68]
xor	edx, edx
cmp	ecx, [eax+60h]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C44AF
mov	ecx, [ebp+arg_4]
sub	ecx, 64h
mov	[ebp+arg_4], ecx
jmp	short loc_5C448F

loc_5C44AF:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jb	short loc_5C44D2
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
lea	ecx, [ebp+arg_34]
call	sub_407E50
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	eax, [ebp+var_4]
jmp	short loc_5C4500

loc_5C44D2:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C93D0
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 64h
mov	[ebp+arg_0], eax
jmp	loc_5C4466
lea	ecx, [ebp+arg_34]
call	sub_407E50
lea	ecx, [ebp+arg_C]
call	sub_407E50

loc_5C4500:
mov	esp, ebp
pop	ebp
retn
sub_5C4460 endp

align 10h


; Attributes: bp-based frame

sub_5C4510 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5C4520
jmp	short loc_5C4561

loc_5C4520:
mov	ecx, [ebp+arg_0]
add	ecx, 64h
mov	[ebp+var_4], ecx
jmp	short loc_5C4534

loc_5C452B:
mov	edx, [ebp+var_4]
add	edx, 64h
mov	[ebp+var_4], edx

loc_5C4534:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_5C4561
movzx	ecx, [ebp+arg_C]
push	ecx
sub	esp, 64h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_5BD5D0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5C9420
add	esp, 70h
jmp	short loc_5C452B

loc_5C4561:
mov	esp, ebp
pop	ebp
retn
sub_5C4510 endp

align 10h


; Attributes: bp-based frame

sub_5C4570 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C45B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BF1E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C4666

loc_5C45B7:
cmp	[ebp+arg_10], 0
jnz	short loc_5C45EB
cmp	[ebp+arg_C], 0
jnz	short loc_5C45E2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5C45EB

loc_5C45E2:
mov	[ebp+var_34], 1
jmp	short loc_5C45F2

loc_5C45EB:
mov	[ebp+var_34], 0

loc_5C45F2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5C4604
and	[ebp+var_C], 0FFFFFFFEh

loc_5C4604:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C463A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5BF1E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5C4638
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5C4638:
jmp	short loc_5C4666

loc_5C463A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5BF1E0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5C4666
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5C4666:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C4570 endp

align 10h


; Attributes: bp-based frame

sub_5C46B0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C46CC:
cmp	[ebp+var_10], 0
jz	short loc_5C4713
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5C4702
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5C470B

loc_5C4702:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5C470B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5C46CC

loc_5C4713:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5C47B5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5C47A6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5C4570
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5C482B
jmp	short loc_5C47B5

loc_5C47A6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C47B5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5C4810
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5C4570
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5C482B

loc_5C4810:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5C482B:
mov	esp, ebp
pop	ebp
retn	8
sub_5C46B0 endp

align 10h


; Attributes: bp-based frame

sub_5C4840 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C9560
add	esp, 14h
pop	ebp
retn
sub_5C4840 endp

align 10h


; Attributes: bp-based frame

sub_5C4860 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	[ebp+arg_C]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C48B7
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	[ebp+arg_C]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C4894
mov	eax, [ebp+arg_4]
jmp	short loc_5C48F2
jmp	short loc_5C48B5

loc_5C4894:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	[ebp+arg_C]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C48B0
mov	eax, [ebp+arg_8]
jmp	short loc_5C48F2
jmp	short loc_5C48B5

loc_5C48B0:
mov	eax, [ebp+arg_0]
jmp	short loc_5C48F2

loc_5C48B5:
jmp	short loc_5C48F2

loc_5C48B7:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	[ebp+arg_C]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C48D3
mov	eax, [ebp+arg_0]
jmp	short loc_5C48F2
jmp	short loc_5C48F2

loc_5C48D3:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	[ebp+arg_C]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C48EF
mov	eax, [ebp+arg_8]
jmp	short loc_5C48F2
jmp	short loc_5C48F2

loc_5C48EF:
mov	eax, [ebp+arg_4]

loc_5C48F2:
pop	ebp
retn
sub_5C4860 endp

align 10h


; Attributes: bp-based frame

sub_5C4900 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h

loc_5C4906:
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	[ebp+arg_10]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C4926
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+arg_0], eax
jmp	short loc_5C4906

loc_5C4926:
mov	ecx, [ebp+arg_4]
sub	ecx, 8
mov	[ebp+arg_4], ecx

loc_5C492F:
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+arg_8]
push	eax
call	[ebp+arg_10]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C494F
mov	edx, [ebp+arg_4]
sub	edx, 8
mov	[ebp+arg_4], edx
jmp	short loc_5C492F

loc_5C494F:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jb	short loc_5C495C
mov	eax, [ebp+arg_0]
jmp	short loc_5C4977

loc_5C495C:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5C9650
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+arg_0], eax
jmp	short loc_5C4906

loc_5C4977:
mov	esp, ebp
pop	ebp
retn
sub_5C4900 endp

align 10h


; Attributes: bp-based frame

sub_5C4980 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5C4990
jmp	short loc_5C49DE

loc_5C4990:
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_4], ecx
jmp	short loc_5C49A4

loc_5C499B:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_5C49A4:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_4]
jz	short loc_5C49DE
mov	ecx, [ebp+arg_C]
push	ecx
sub	esp, 8
mov	[ebp+var_C], esp
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C96D0
add	esp, 14h
jmp	short loc_5C499B

loc_5C49DE:
mov	esp, ebp
pop	ebp
retn
sub_5C4980 endp

align 10h


; Attributes: bp-based frame

sub_5C49F0 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C4A08:
cmp	[ebp+var_8], 0
jz	short loc_5C4A4D
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+var_C]
movzx	ecx, byte ptr [eax]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5C4A42
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5C4A4B

loc_5C4A42:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5C4A4B:
jmp	short loc_5C4A08

loc_5C4A4D:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_1C]
jz	short loc_5C4A7E
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C4A7E
mov	ecx, [ebp+var_1C]
mov	[ebp+var_4], ecx

loc_5C4A7E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C49F0 endp

align 10h


; Attributes: bp-based frame

sub_5C4A90 proc	near

var_5C=	byte ptr -5Ch
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
push	esi
push	edi
mov	eax, [ebp+arg_4]
imul	eax, 48h
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5C4ACF

loc_5C4ABD:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
add	eax, 48h
mov	[ebp+var_C], eax

loc_5C4ACF:
cmp	[ebp+var_10], 0
jle	short loc_5C4B07
xor	ecx, ecx
mov	byte ptr [ebp+var_14+1], cl
mov	dl, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], dl
xor	eax, eax
mov	byte ptr [ebp+var_14], al
mov	cl, byte ptr [ebp+var_14]
mov	[ebp+var_12], cl
mov	esi, [ebp+arg_8]
mov	ecx, 12h
lea	edi, [ebp+var_5C]
rep movsd
mov	ecx, 12h
lea	esi, [ebp+var_5C]
mov	edi, [ebp+var_C]
rep movsd
jmp	short loc_5C4ABD

loc_5C4B07:
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C4A90 endp



; Attributes: bp-based frame

sub_5C4B10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_14]
sar	ecx, 3
mov	[ebp+var_8], ecx
jmp	short loc_5C4B3C

loc_5C4B2A:
mov	edx, [ebp+var_14]
add	edx, 8
mov	[ebp+var_14], edx
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_5C4B3C:
cmp	[ebp+var_8], 0
jle	short loc_5C4B9A
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_8]
add	ecx, 4
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 4
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_5C4B98
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_5C4B7C
mov	ecx, [ebp+var_C]
mov	ecx, [ecx]
call	sub_40AA90

loc_5C4B7C:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_5C4B98
mov	eax, [ebp+var_C]
mov	ecx, [eax]
call	sub_40AA80

loc_5C4B98:
jmp	short loc_5C4B2A

loc_5C4B9A:
mov	esp, ebp
pop	ebp
retn
sub_5C4B10 endp

align 10h


; Attributes: bp-based frame

sub_5C4BA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	eax, [ebp+arg_0]
add	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5C4BA0 endp

align 10h


; Attributes: bp-based frame

sub_5C4BD0 proc	near

var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	byte ptr -6Ch
var_42=	byte ptr -42h
var_41=	byte ptr -41h
var_40=	byte ptr -40h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C4BD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C4h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+var_C8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_5C4C09:
cmp	[ebp+var_14], 0
jz	loc_5C4CA3
lea	ecx, [ebp+var_41]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_40]
call	sub_407810
lea	ecx, [ebp+var_75]
mov	[ebp+var_CC], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_74], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_74]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_15], dl
lea	ecx, [ebp+var_40]
call	sub_407E50
lea	ecx, [ebp+var_41]
call	nullsub_1
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_5C4C95
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_5C4C9E

loc_5C4C95:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_5C4C9E:
jmp	loc_5C4C09

loc_5C4CA3:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C8]
jz	short loc_5C4D27
lea	ecx, [ebp+var_6D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_6C]
call	sub_407810
lea	edx, [ebp+var_8D]
mov	[ebp+var_D0], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_8C], eax
mov	[ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_8C]
push	ecx
lea	edx, [ebp+var_6C]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_42], al
lea	ecx, [ebp+var_6C]
call	sub_407E50
lea	ecx, [ebp+var_6D]
call	nullsub_1
movzx	eax, [ebp+var_42]
test	eax, eax
jz	short loc_5C4D27
mov	ecx, [ebp+var_C8]
mov	[ebp+var_10], ecx

loc_5C4D27:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5C4BD0 endp

align 10h


; Attributes: bp-based frame

sub_5C4D40 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5C4D87
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5C6FD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5C4E39

loc_5C4D87:
cmp	[ebp+arg_10], 0
jnz	short loc_5C4DBE
cmp	[ebp+arg_C], 0
jnz	short loc_5C4DB5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C4DBE

loc_5C4DB5:
mov	[ebp+var_34], 1
jmp	short loc_5C4DC5

loc_5C4DBE:
mov	[ebp+var_34], 0

loc_5C4DC5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5C4DD7
and	[ebp+var_C], 0FFFFFFFEh

loc_5C4DD7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5C4E0D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5C6FD0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5C4E0B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5C4E0B:
jmp	short loc_5C4E39

loc_5C4E0D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5C6FD0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5C4E39
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5C4E39:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5C4D40 endp

align 10h


; Attributes: bp-based frame

sub_5C4E80 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5C4E9C:
cmp	[ebp+var_10], 0
jz	short loc_5C4EE6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5C4ED5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5C4EDE

loc_5C4ED5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5C4EDE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5C4E9C

loc_5C4EE6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5C4F88
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5C4F79
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5C4D40
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5C5001
jmp	short loc_5C4F88

loc_5C4F79:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5C4F88:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5C4FE6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C4D40
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5C5001

loc_5C4FE6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5C5001:
mov	esp, ebp
pop	ebp
retn	8
sub_5C4E80 endp

align 10h


; Attributes: bp-based frame

sub_5C5010 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C5028:
cmp	[ebp+var_8], 0
jz	short loc_5C509D
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
movzx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_5C504B
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_5C5072

loc_5C504B:
mov	edx, [ebp+var_C]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
cmp	eax, edx
jnz	short loc_5C5069
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jl	short loc_5C5072

loc_5C5069:
mov	[ebp+var_20], 0
jmp	short loc_5C5079

loc_5C5072:
mov	[ebp+var_20], 1

loc_5C5079:
movzx	eax, byte ptr [ebp+var_20]
test	eax, eax
jnz	short loc_5C5092
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5C509B

loc_5C5092:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5C509B:
jmp	short loc_5C5028

loc_5C509D:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_1C]
jz	short loc_5C50FE
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_5C50C2
mov	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_5C50E9

loc_5C50C2:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+var_14]
movzx	eax, byte ptr [edx]
cmp	ecx, eax
jnz	short loc_5C50E0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_14]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jl	short loc_5C50E9

loc_5C50E0:
mov	[ebp+var_24], 0
jmp	short loc_5C50F0

loc_5C50E9:
mov	[ebp+var_24], 1

loc_5C50F0:
movzx	ecx, byte ptr [ebp+var_24]
test	ecx, ecx
jz	short loc_5C50FE
mov	edx, [ebp+var_1C]
mov	[ebp+var_4], edx

loc_5C50FE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C5010 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5110(void *)
sub_5C5110 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	eax, eax
and	eax, 1
jz	short loc_5C512E
mov	ecx, [ebp+arg_0]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C512E:
pop	ebp
retn
sub_5C5110 endp



; Attributes: bp-based frame

sub_5C5130 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C5130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
jmp	short loc_5C5156

loc_5C514D:
mov	eax, [ebp+arg_0]
sub	eax, 5Ch
mov	[ebp+arg_0], eax

loc_5C5156:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C51C9
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 5Ch
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 34h
call	sub_10111A0
mov	ecx, [ebp+var_14]
add	ecx, 1Ch
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_20]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_5C51C7
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C51C7:
jmp	short loc_5C514D

loc_5C51C9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5C5130 endp

align 10h


; Attributes: bp-based frame

sub_5C51E0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5C51F3

loc_5C51E8:
mov	eax, [ebp+arg_0]
sub	eax, 0A8h
mov	[ebp+arg_0], eax

loc_5C51F3:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C5238
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 0A8h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_BFBB70
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C5236
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5236:
jmp	short loc_5C51E8

loc_5C5238:
mov	esp, ebp
pop	ebp
retn
sub_5C51E0 endp

align 10h


; Attributes: bp-based frame

sub_5C5240 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5C5251

loc_5C5248:
mov	eax, [ebp+arg_0]
sub	eax, 24h
mov	[ebp+arg_0], eax

loc_5C5251:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C5297
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 24h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C5295
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5295:
jmp	short loc_5C5248

loc_5C5297:
mov	esp, ebp
pop	ebp
retn
sub_5C5240 endp

align 10h


; Attributes: bp-based frame

sub_5C52A0 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_5C99D0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5C52A0 endp

align 10h


; Attributes: bp-based frame

sub_5C52F0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
jmp	short loc_5C5303

loc_5C52F8:
mov	eax, [ebp+arg_0]
sub	eax, 88h
mov	[ebp+arg_0], eax

loc_5C5303:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C5348
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 88h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_589490
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C5346
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5346:
jmp	short loc_5C52F8

loc_5C5348:
mov	esp, ebp
pop	ebp
retn
sub_5C52F0 endp

align 10h


; Attributes: bp-based frame

sub_5C5350 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C5350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
jmp	short loc_5C5376

loc_5C536D:
mov	eax, [ebp+arg_0]
sub	eax, 70h
mov	[ebp+arg_0], eax

loc_5C5376:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C53CA
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 70h
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
add	ecx, 4Ch
call	sub_10FB7C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C53C8
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C53C8:
jmp	short loc_5C536D

loc_5C53CA:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5C5350 endp

align 10h


; Attributes: bp-based frame

sub_5C53E0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
jmp	short loc_5C53F1

loc_5C53E8:
mov	eax, [ebp+arg_0]
sub	eax, 74h
mov	[ebp+arg_0], eax

loc_5C53F1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C5437
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 74h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_436CF0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C5435
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5435:
jmp	short loc_5C53E8

loc_5C5437:
mov	esp, ebp
pop	ebp
retn
sub_5C53E0 endp

align 10h


; Attributes: bp-based frame

sub_5C5440 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5C5453

loc_5C5448:
mov	eax, [ebp+arg_0]
sub	eax, 0C8h
mov	[ebp+arg_0], eax

loc_5C5453:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C5498
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 0C8h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_5BE150
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C5496
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5496:
jmp	short loc_5C5448

loc_5C5498:
mov	esp, ebp
pop	ebp
retn
sub_5C5440 endp

align 10h


; Attributes: bp-based frame

sub_5C54A0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5C54B1

loc_5C54A8:
mov	eax, [ebp+arg_0]
sub	eax, 8
mov	[ebp+arg_0], eax

loc_5C54B1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C54F4
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C54F2
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C54F2:
jmp	short loc_5C54A8

loc_5C54F4:
mov	esp, ebp
pop	ebp
retn
sub_5C54A0 endp

align 10h


; Attributes: bp-based frame

sub_5C5500 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5C5511

loc_5C5508:
mov	eax, [ebp+arg_0]
sub	eax, 30h
mov	[ebp+arg_0], eax

loc_5C5511:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C5562
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 30h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C5560
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5560:
jmp	short loc_5C5508

loc_5C5562:
mov	esp, ebp
pop	ebp
retn
sub_5C5500 endp

align 10h


; Attributes: bp-based frame

sub_5C5570 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_5C5585:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_5C560A
lea	ecx, [ebp+var_14]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
movss	xmm0, [ebp+arg_C]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_10]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
movss	xmm0, [ebp+var_14]
comiss	xmm0, dword ptr	[eax+edx*8]
jbe	short loc_5C55C2
mov	[ebp+var_18], 1
jmp	short loc_5C55C9

loc_5C55C2:
mov	[ebp+var_18], 0

loc_5C55C9:
mov	cl, byte ptr [ebp+var_18]
mov	[ebp+var_19], cl
movzx	edx, [ebp+var_19]
test	edx, edx
jz	short loc_5C560A
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	ecx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+ecx*8], edx
mov	[esi+ecx*8+4], eax
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	loc_5C5585

loc_5C560A:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx+eax*8], edx
mov	edx, [ebp+arg_10]
mov	[ecx+eax*8+4], edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C5570 endp

align 10h


; Attributes: bp-based frame

sub_5C5630 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C5630
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
jmp	short loc_5C5656

loc_5C564D:
mov	eax, [ebp+arg_0]
sub	eax, 70h
mov	[ebp+arg_0], eax

loc_5C5656:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C56B3
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 70h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
add	ecx, 4Ch
call	sub_10FB7C0
xor	edx, edx
and	edx, 1
jz	short loc_5C56B1
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C56B1:
jmp	short loc_5C564D

loc_5C56B3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5C5630 endp

align 10h


; Attributes: bp-based frame

sub_5C56D0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5C56E1

loc_5C56D8:
mov	eax, [ebp+arg_0]
sub	eax, 8
mov	[ebp+arg_0], eax

loc_5C56E1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C5727
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_429100
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C5725
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5725:
jmp	short loc_5C56D8

loc_5C5727:
mov	esp, ebp
pop	ebp
retn
sub_5C56D0 endp

align 10h


; Attributes: bp-based frame

sub_5C5730 proc	near

var_70=	dword ptr -70h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C5730
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
jmp	short loc_5C5756

loc_5C574D:
mov	eax, [ebp+arg_0]
sub	eax, 58h
mov	[ebp+arg_0], eax

loc_5C5756:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C57BA
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 58h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 18h
mov	[ebp+var_70], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_70]
add	ecx, 1Ch
call	sub_436CF0
xor	edx, edx
and	edx, 1
jz	short loc_5C57B8
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C57B8:
jmp	short loc_5C574D

loc_5C57BA:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5C5730 endp

align 10h


; Attributes: bp-based frame

sub_5C57D0 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_5C9B60
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5C57D0 endp

align 10h


; Attributes: bp-based frame

sub_5C5810 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C5828:
cmp	[ebp+var_8], 0
jz	short loc_5C587A
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx]
comiss	xmm0, dword ptr	[edx]
jbe	short loc_5C584F
mov	[ebp+var_18], 1
jmp	short loc_5C5856

loc_5C584F:
mov	[ebp+var_18], 0

loc_5C5856:
movzx	eax, byte ptr [ebp+var_18]
test	eax, eax
jz	short loc_5C586F
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5C5878

loc_5C586F:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5C5878:
jmp	short loc_5C5828

loc_5C587A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C5810 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5890(void *)
sub_5C5890 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_5A9FB0
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C58C1
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C58C1:
mov	esp, ebp
pop	ebp
retn
sub_5C5890 endp

align 10h


; Attributes: bp-based frame

sub_5C58D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_580210
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C58D0 endp

align 10h


; Attributes: bp-based frame

sub_5C5910 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
push	esi
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5C5943

loc_5C593A:
mov	ecx, [ebp+var_24]
sub	ecx, 1Ch
mov	[ebp+var_24], ecx

loc_5C5943:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C5975
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 1Ch
mov	[ebp+var_1C], ecx
push	0
mov	esi, [ebp+var_1C]
call	sub_402230
jmp	short loc_5C593A

loc_5C5975:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C5910 endp

align 10h


; Attributes: bp-based frame

sub_5C5980 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5130
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C5980 endp

align 10h


; Attributes: bp-based frame

sub_5C59C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C5240
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C59C0 endp

align 10h


; Attributes: bp-based frame

sub_5C5A00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C54A0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C5A00 endp

align 10h


; Attributes: bp-based frame

sub_5C5A40 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5C5A75

loc_5C5A69:
mov	ecx, [ebp+var_24]
sub	ecx, 80h
mov	[ebp+var_24], ecx

loc_5C5A75:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C5AAA
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 80h
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_5CA2D0
jmp	short loc_5C5A69

loc_5C5AAA:
mov	esp, ebp
pop	ebp
retn
sub_5C5A40 endp

align 10h


; Attributes: bp-based frame

sub_5C5AB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C9BE0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C5AB0 endp

align 10h


; Attributes: bp-based frame

sub_5C5AF0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_30]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_34]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5C5B22

loc_5C5B19:
mov	ecx, [ebp+var_34]
sub	ecx, 60h
mov	[ebp+var_34], ecx

loc_5C5B22:
mov	edx, [ebp+var_34]
xor	eax, eax
cmp	edx, [ebp+var_30]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C5B54
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_34]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 60h
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_58AB20
jmp	short loc_5C5B19

loc_5C5B54:
mov	esp, ebp
pop	ebp
retn
sub_5C5AF0 endp

align 10h


; Attributes: bp-based frame

sub_5C5B60 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5C5B7C

loc_5C5B73:
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_8], edx

loc_5C5B7C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5C5BA6
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
call	sub_402750
xor	edx, edx
and	edx, 1
jz	short loc_5C5BA4
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C5BA4:
jmp	short loc_5C5B73

loc_5C5BA6:
mov	esp, ebp
pop	ebp
retn
sub_5C5B60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5BB0(void *, int)
sub_5C5BB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	eax, [ebp+arg_0]
push	eax		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5C5C09
mov	eax, [ebp+arg_4]
mov	esi, [ebp+var_4]
call	sub_42B380
mov	ecx, [ebp+arg_4]
add	ecx, 14h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
add	edx, 14h
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_10], eax
jmp	short loc_5C5C10

loc_5C5C09:
mov	[ebp+var_10], 0

loc_5C5C10:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C5BB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5C20(void *, int)
sub_5C5C20 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5C64
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5CA660
mov	[ebp+var_18], eax
jmp	short loc_5C5C6B

loc_5C5C64:
mov	[ebp+var_18], 0

loc_5C5C6B:
mov	esp, ebp
pop	ebp
retn
sub_5C5C20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5C70(void *, int)
sub_5C5C70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5CC9
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	ecx, [ecx+2Ch]
mov	[eax+2Ch], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C5CD0

loc_5C5CC9:
mov	[ebp+var_C], 0

loc_5C5CD0:
mov	esp, ebp
pop	ebp
retn
sub_5C5C70 endp

align 10h


; Attributes: bp-based frame

sub_5C5CE0 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_5C9C50
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5C5CE0 endp

align 10h


; Attributes: bp-based frame

sub_5C5D30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C9CA0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5C5D30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5D60(void *, int)
sub_5C5D60 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5DBD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_592A60
mov	edx, [ebp+var_8]
mov	[ebp+var_40], edx
jmp	short loc_5C5DC4

loc_5C5DBD:
mov	[ebp+var_40], 0

loc_5C5DC4:
mov	esp, ebp
pop	ebp
retn
sub_5C5D60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5DD0(void *, int)
sub_5C5DD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5E2A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 0Ch
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C5E31

loc_5C5E2A:
mov	[ebp+var_C], 0

loc_5C5E31:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C5DD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5E40(void *, int)
sub_5C5E40 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5E97
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_594CF0
mov	eax, [ebp+var_8]
mov	[ebp+var_40], eax
jmp	short loc_5C5E9E

loc_5C5E97:
mov	[ebp+var_40], 0

loc_5C5E9E:
mov	esp, ebp
pop	ebp
retn
sub_5C5E40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5EB0(void *, int)
sub_5C5EB0 proc	near

var_58=	dword ptr -58h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5F07
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_58ED10
mov	eax, [ebp+var_8]
mov	[ebp+var_58], eax
jmp	short loc_5C5F0E

loc_5C5F07:
mov	[ebp+var_58], 0

loc_5C5F0E:
mov	esp, ebp
pop	ebp
retn
sub_5C5EB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5F20(void *, int)
sub_5C5F20 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5F77
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_5A86E0
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_5C5F7E

loc_5C5F77:
mov	[ebp+var_28], 0

loc_5C5F7E:
mov	esp, ebp
pop	ebp
retn
sub_5C5F20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C5F90(void *, int)
sub_5C5F90 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	54h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C5FE7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+arg_4]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_585530
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
jmp	short loc_5C5FEE

loc_5C5FE7:
mov	[ebp+var_14], 0

loc_5C5FEE:
mov	esp, ebp
pop	ebp
retn
sub_5C5F90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6000(void *, int)
sub_5C6000 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6057
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_592A10
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5C605E

loc_5C6057:
mov	[ebp+var_C], 0

loc_5C605E:
mov	esp, ebp
pop	ebp
retn
sub_5C6000 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6070(void *, int)
sub_5C6070 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C60CD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_403850
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C60D4

loc_5C60CD:
mov	[ebp+var_C], 0

loc_5C60D4:
mov	esp, ebp
pop	ebp
retn
sub_5C6070 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C60E0(void *, int)
sub_5C60E0 proc	near

var_60=	dword ptr -60h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	6Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6139
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_588B20
mov	ecx, [ebp+var_8]
mov	[ebp+var_60], ecx
jmp	short loc_5C6140

loc_5C6139:
mov	[ebp+var_60], 0

loc_5C6140:
mov	esp, ebp
pop	ebp
retn
sub_5C60E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6150(void *, int)
sub_5C6150 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C61B7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C61BE

loc_5C61B7:
mov	[ebp+var_C], 0

loc_5C61BE:
mov	esp, ebp
pop	ebp
retn
sub_5C6150 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C61D0(void *, int)
sub_5C61D0 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6214
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5CA6E0
mov	[ebp+var_40], eax
jmp	short loc_5C621B

loc_5C6214:
mov	[ebp+var_40], 0

loc_5C621B:
mov	esp, ebp
pop	ebp
retn
sub_5C61D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6220(void *, int)
sub_5C6220 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6287
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 8
mov	eax, [ebp+var_8]
add	eax, 8
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5C628E

loc_5C6287:
mov	[ebp+var_C], 0

loc_5C628E:
mov	esp, ebp
pop	ebp
retn
sub_5C6220 endp

align 10h


; Attributes: bp-based frame

sub_5C62A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C9CE0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5C62A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C62D0(void *, int)
sub_5C62D0 proc	near

var_2C=	dword ptr -2Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	60h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C632D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_58B950
mov	edx, [ebp+var_8]
mov	[ebp+var_2C], edx
jmp	short loc_5C6334

loc_5C632D:
mov	[ebp+var_2C], 0

loc_5C6334:
mov	esp, ebp
pop	ebp
retn
sub_5C62D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6340(void *, int)
sub_5C6340 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	78h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C639A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 1Ch
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C63A1

loc_5C639A:
mov	[ebp+var_C], 0

loc_5C63A1:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C6340 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C63B0(void *, int)
sub_5C63B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	24h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C640A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	esi, [ebp+arg_4]
add	esi, 4
mov	edi, [ebp+var_8]
add	edi, 4
mov	ecx, 8
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C6411

loc_5C640A:
mov	[ebp+var_C], 0

loc_5C6411:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C63B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6420(void *, int)
sub_5C6420 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6477
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_8]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C647E

loc_5C6477:
mov	[ebp+var_C], 0

loc_5C647E:
mov	esp, ebp
pop	ebp
retn
sub_5C6420 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6490(void *, int)
sub_5C6490 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C64D4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5CA750
mov	[ebp+var_40], eax
jmp	short loc_5C64DB

loc_5C64D4:
mov	[ebp+var_40], 0

loc_5C64DB:
mov	esp, ebp
pop	ebp
retn
sub_5C6490 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C64E0(void *, int)
sub_5C64E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	68h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C653A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 18h
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C6541

loc_5C653A:
mov	[ebp+var_C], 0

loc_5C6541:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C64E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6550(void *, int)
sub_5C6550 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C65B7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C65BE

loc_5C65B7:
mov	[ebp+var_C], 0

loc_5C65BE:
mov	esp, ebp
pop	ebp
retn
sub_5C6550 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C65D0(void *, int)
sub_5C65D0 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6614
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5CA600
mov	[ebp+var_14], eax
jmp	short loc_5C661B

loc_5C6614:
mov	[ebp+var_14], 0

loc_5C661B:
mov	esp, ebp
pop	ebp
retn
sub_5C65D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6620(void *, int)
sub_5C6620 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6677
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	ecx, [edx+8]
mov	edx, [ebp+var_8]
mov	[edx+4], eax
mov	[edx+8], ecx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5C667E

loc_5C6677:
mov	[ebp+var_C], 0

loc_5C667E:
mov	esp, ebp
pop	ebp
retn
sub_5C6620 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6690(void *, int)
sub_5C6690 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	24h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C66E9
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_5AB090
mov	ecx, [ebp+var_8]
mov	[ebp+var_40], ecx
jmp	short loc_5C66F0

loc_5C66E9:
mov	[ebp+var_40], 0

loc_5C66F0:
mov	esp, ebp
pop	ebp
retn
sub_5C6690 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C6700(void *, int)
sub_5C6700 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C6753
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+18h]
mov	[eax+18h], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5C675A

loc_5C6753:
mov	[ebp+var_C], 0

loc_5C675A:
mov	esp, ebp
pop	ebp
retn
sub_5C6700 endp

align 10h


; Attributes: bp-based frame

sub_5C6760 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 34h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+5Ch]
mov	[edx+5Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
mov	[edx+60h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+64h]
mov	[edx+64h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+65h]
mov	[edx+65h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6760 endp

align 10h


; Attributes: bp-based frame

sub_5C67F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	edx, [ebp+arg_0]
add	edx, 1Ch
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
add	eax, 1Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_46B470
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	cl, [eax+18h]
mov	[edx+18h], cl
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	cl, [eax+38h]
mov	[edx+38h], cl
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+40h]
mov	[edx+40h], ecx
mov	eax, [eax+44h]
mov	[edx+44h], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+40h]
mov	[ecx+40h], eax
mov	edx, [edx+44h]
mov	[ecx+44h], edx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5C67F0 endp

align 10h


; Attributes: bp-based frame

sub_5C68B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 0Ch
mov	edx, [ebp+var_14]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
add	edx, 1Ch
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
add	eax, 1Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_C]
jz	short loc_5C692D
mov	edx, [ebp+var_10]
mov	eax, [edx+10h]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+14h]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_4408D0

loc_5C692D:
mov	edx, [ebp+arg_0]
add	edx, 34h
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 34h
call	sub_1011130
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5C68B0 endp

align 10h


; Attributes: bp-based frame

sub_5C6950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5AB040
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
call	sub_407910
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5C6991
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C6991:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6950 endp

align 10h


; Attributes: bp-based frame

sub_5C69A0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_57DBB0
add	esp, 8
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_54]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_50], eax
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_5C6A13
mov	ecx, [ebp+var_50]
imul	ecx, 5Ch
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5C6A13:
mov	esp, ebp
pop	ebp
retn
sub_5C69A0 endp

align 10h


; Attributes: bp-based frame

sub_5C6A20 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CBA0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5CB330
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6A20 endp



; Attributes: bp-based frame

sub_5C6A80 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_2C=	dword ptr -2Ch
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
call	sub_409A10
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_50]
mov	ecx, [ebp+var_5C]
call	sub_402EB0
mov	edx, [ebp+var_8]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_54], eax
xor	ecx, ecx
mov	[ebp+var_21], cl
lea	edx, [ebp+var_21]
push	edx
mov	eax, [ebp+var_58]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_50]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_5CB3B0
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6A80 endp

align 10h


; Attributes: bp-based frame

sub_5C6B00 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5BEF70
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C9E70
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6B00 endp

align 10h


; Attributes: bp-based frame

sub_5C6B50 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5BEF70
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C9EE0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6B50 endp

align 10h


; Attributes: bp-based frame

sub_5C6BA0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5C7020
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5A70
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6BA0 endp

align 10h


; Attributes: bp-based frame

sub_5C6BF0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_595E40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C9F50
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6BF0 endp

align 10h


; Attributes: bp-based frame

sub_5C6C40 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5C9FC0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6C40 endp

align 10h


; Attributes: bp-based frame

sub_5C6C90 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_5BEF70
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5CB450
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6C90 endp



; Attributes: bp-based frame

sub_5C6CF0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
add	ecx, 4
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_18]
call	sub_58F4E0
mov	eax, [ebp+var_18]
add	eax, 1Ch
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_14]
call	sub_58F4E0
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6CF0 endp

align 10h


; Attributes: bp-based frame

sub_5C6D50 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_5BEF70
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5CB4B0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6D50 endp



; Attributes: bp-based frame

sub_5C6DB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], offset unk_147AE14
jbe	short loc_5C6DDB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5C6DDB:
cmp	[ebp+arg_0], 0
jz	short loc_5C6E15
mov	ecx, [ebp+arg_0]
imul	ecx, 0C8h
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 0C8h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5C6E1C

loc_5C6E15:
mov	[ebp+var_10], 0

loc_5C6E1C:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5C6DB0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5C6E30 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5CA020
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6E30 endp

align 10h


; Attributes: bp-based frame

sub_5C6E80 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5CA110
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6E80 endp

align 10h


; Attributes: bp-based frame

sub_5C6ED0 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_503430
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5CB510
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6ED0 endp



; Attributes: bp-based frame

sub_5C6F30 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_49C2D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6F30 endp

align 10h


; Attributes: bp-based frame

sub_5C6F80 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5C7020
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5CA180
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6F80 endp

align 10h


; Attributes: bp-based frame

sub_5C6FD0 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5C7080
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5CA1E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C6FD0 endp

align 10h


; Attributes: bp-based frame

sub_5C7020 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 4444444h
jbe	short loc_5C7046
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5C7046:
cmp	[ebp+arg_0], 0
jz	short loc_5C706C
mov	eax, [ebp+arg_0]
imul	eax, 3Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C7073

loc_5C706C:
mov	[ebp+var_C], 0

loc_5C7073:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5C7020 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5C7080 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 2C8590Bh
jbe	short loc_5C70A6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5C70A6:
cmp	[ebp+arg_0], 0
jz	short loc_5C70CC
mov	eax, [ebp+arg_0]
imul	eax, 5Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C70D3

loc_5C70CC:
mov	[ebp+var_C], 0

loc_5C70D3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5C7080 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5C70E0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; void *
call	sub_5C9FC0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C70E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C7120(void *, int)
sub_5C7120 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_5BB580
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5C7120 endp

align 10h


; Attributes: bp-based frame

sub_5C7160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5C7188

loc_5C717F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5C7188:
cmp	[ebp+var_8], 0
jle	short loc_5C71B2
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 68h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 68h
mov	[ebp+var_4], eax
jmp	short loc_5C717F

loc_5C71B2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5C7160 endp

align 10h


; Attributes: bp-based frame

sub_5C71C0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5C7204

loc_5C71FB:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5C7204:
cmp	[ebp+var_10], 0
jle	short loc_5C722E
mov	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 68h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
add	eax, 68h
mov	[ebp+var_C], eax
jmp	short loc_5C71FB

loc_5C722E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5C71C0 endp

align 10h


; Attributes: bp-based frame

sub_5C7240 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5C7284

loc_5C727B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5C7284:
cmp	[ebp+var_10], 0
jle	short loc_5C72AE
mov	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5A6E90
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 50h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
add	eax, 50h
mov	[ebp+var_C], eax
jmp	short loc_5C727B

loc_5C72AE:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5C7240 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C72C0(void *, int)
sub_5C72C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C731D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_403400
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5C7324

loc_5C731D:
mov	[ebp+var_C], 0

loc_5C7324:
mov	esp, ebp
pop	ebp
retn
sub_5C72C0 endp

align 10h


; Attributes: bp-based frame

sub_5C7330 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 30h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5C7374

loc_5C736B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5C7374:
cmp	[ebp+var_10], 0
jle	short loc_5C739E
mov	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5C72C0
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 30h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
add	eax, 30h
mov	[ebp+var_C], eax
jmp	short loc_5C736B

loc_5C739E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5C7330 endp

align 10h


; Attributes: bp-based frame

sub_5C73B0 proc	near

var_4C=	dword ptr -4Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 48h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5C73F4

loc_5C73EB:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5C73F4:
cmp	[ebp+var_10], 0
jle	short loc_5C741E
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_50E780
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 48h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_C]
add	eax, 48h
mov	[ebp+var_C], eax
jmp	short loc_5C73EB

loc_5C741E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5C73B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C7430(void *, int)
sub_5C7430 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	4Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C7474
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5BD650
mov	[ebp+var_C], eax
jmp	short loc_5C747B

loc_5C7474:
mov	[ebp+var_C], 0

loc_5C747B:
mov	esp, ebp
pop	ebp
retn
sub_5C7430 endp

align 10h


; Attributes: bp-based frame

sub_5C7480 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_20]
sar	eax, 6
mov	[ebp+var_10], eax
jmp	short loc_5C74BF

loc_5C74B6:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_5C74BF:
cmp	[ebp+var_10], 0
jle	short loc_5C74E9
mov	edx, [ebp+var_20]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A6EE0
add	esp, 8
mov	ecx, [ebp+var_20]
add	ecx, 40h
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_C]
add	edx, 40h
mov	[ebp+var_C], edx
jmp	short loc_5C74B6

loc_5C74E9:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5C7480 endp



; Attributes: bp-based frame

sub_5C74F0 proc	near

var_4C=	dword ptr -4Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5C7534

loc_5C752B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5C7534:
cmp	[ebp+var_10], 0
jle	short loc_5C755E
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5A6F30
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 68h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_C]
add	eax, 68h
mov	[ebp+var_C], eax
jmp	short loc_5C752B

loc_5C755E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5C74F0 endp

align 10h


; Attributes: bp-based frame

sub_5C7570 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_18=	dword ptr -18h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_40]
call	sub_594460
lea	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_C]
call	sub_4046E0
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_3C]
mov	eax, [ebp+var_18]
call	sub_4046E0
mov	ecx, [ebp+var_40]
call	sub_452300
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5C7570 endp

align 10h


; Attributes: bp-based frame

sub_5C75D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CA7C0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_5C75FB

loc_5C75F2:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4], ecx

loc_5C75FB:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	loc_5C768F
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	[ebp+arg_10]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C768A
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_14], ecx
mov	edx, [eax+4]
mov	[ebp+var_10], edx
mov	ecx, [eax+8]
mov	[ebp+var_C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_10]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_0]
sar	edx, 4
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CB690
add	esp, 20h

loc_5C768A:
jmp	loc_5C75F2

loc_5C768F:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx

loc_5C7695:
mov	edx, [ebp+var_18]
sub	edx, [ebp+arg_0]
sar	edx, 4
cmp	edx, 1
jle	short loc_5C76C8
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CB810
add	esp, 0Ch
mov	ecx, [ebp+var_18]
sub	ecx, 10h
mov	[ebp+var_18], ecx
jmp	short loc_5C7695

loc_5C76C8:
mov	esp, ebp
pop	ebp
retn
sub_5C75D0 endp

align 10h


; Attributes: bp-based frame

sub_5C76D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5C76E5

loc_5C76DC:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4], ecx

loc_5C76E5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5C771D
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
sub	esp, 10h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_5CA860
add	esp, 18h
jmp	short loc_5C76DC

loc_5C771D:
mov	esp, ebp
pop	ebp
retn
sub_5C76D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C7730(void *, int)
sub_5C7730 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_5BB670
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5C7730 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C7770(void *, int)
sub_5C7770 proc	near

var_1C=	dword ptr -1Ch
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C7770
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
jmp	short loc_5C7796

loc_5C778D:
mov	eax, [ebp+arg_0]
add	eax, 5Ch
mov	[ebp+arg_0], eax

loc_5C7796:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jz	short loc_5C77F0
xor	edx, edx
mov	[ebp+var_D], dl
mov	ecx, [ebp+arg_0]
add	ecx, 34h
call	sub_10111A0
mov	eax, [ebp+arg_0]
add	eax, 1Ch
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_1C]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C77EE
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C77EE:
jmp	short loc_5C778D

loc_5C77F0:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5C7770 endp

align 10h


; Attributes: bp-based frame

sub_5C7800 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_5CA8E0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5C7800 endp

align 10h


; Attributes: bp-based frame

sub_5C7840 proc	near

var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_5]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [ebp+var_4]
call	sub_5CA950
call	nullsub_1
lea	eax, [ebp+var_4]
push	eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_48]
call	sub_5CA460
push	0
lea	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_4]
call	sub_50BAC0
mov	esp, ebp
pop	ebp
retn	10h
sub_5C7840 endp

align 10h


; Attributes: bp-based frame

sub_5C7890 proc	near

var_C= word ptr	-0Ch
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 88h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5C78C3

loc_5C78AF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
add	eax, 88h
mov	[ebp+var_4], eax

loc_5C78C3:
cmp	[ebp+var_8], 0
jle	short loc_5C78F5
xor	ecx, ecx
mov	byte ptr [ebp+var_C+1],	cl
mov	dl, byte ptr [ebp+var_C+1]
mov	[ebp+var_9], dl
xor	eax, eax
mov	byte ptr [ebp+var_C], al
mov	cl, byte ptr [ebp+var_C]
mov	[ebp+var_A], cl
lea	edx, [ebp+var_A]
push	edx
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_5C9B60
add	esp, 0Ch
jmp	short loc_5C78AF

loc_5C78F5:
mov	esp, ebp
pop	ebp
retn
sub_5C7890 endp

align 10h


; Attributes: bp-based frame

sub_5C7900 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_5C70E0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5C7900 endp

align 10h


; Attributes: bp-based frame

sub_5C7A00 proc	near

var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DA=	byte ptr -0DAh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_40=	byte ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0F4h
mov	[ebp+var_F0], ecx
lea	eax, [ebp+var_2D]
push	eax
mov	ecx, [ebp+var_F0]
add	ecx, 4
call	sub_642970
lea	ecx, [ebp+var_2D]
push	ecx
lea	ecx, [ebp+var_C]
call	sub_52A300
mov	[ebp+var_34], 0
lea	edx, [ebp+var_2E]
push	edx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_604B20
push	eax
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_18]
call	sub_4045A0
lea	ecx, [ebp+var_2E]
call	nullsub_1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0

loc_5C7A70:
mov	edx, [ebp+var_F0]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_5C7C29
mov	edx, [ebp+var_F0]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
push	edx
call	sub_5CC830
add	esp, 4
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
jmp	short loc_5C7AEB

loc_5C7ADB:
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[ebp+var_20], ecx

loc_5C7AEB:
lea	edx, [ebp+var_70]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+var_68]
mov	[ecx], edx
mov	eax, [ebp+var_2C]
xor	ecx, ecx
cmp	eax, [ebp+var_70]
setnz	cl
mov	[ebp+var_F1], cl
movzx	edx, [ebp+var_F1]
test	edx, edx
jz	short loc_5C7B58
mov	eax, [ebp+var_2C]
add	eax, 4
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_7C]
push	ecx
mov	edx, [ebp+var_88]
push	edx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5C7B58
jmp	short loc_5C7ADB

loc_5C7B58:
mov	ecx, [ebp+var_24]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_18]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_90], eax
mov	eax, [ebp+var_90]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_28], edx
push	ecx
mov	[ebp+var_98], esp
mov	eax, [ebp+var_20]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_94]
mov	[ecx], edx
push	ecx
mov	[ebp+var_9C], esp
mov	eax, [ebp+var_F0]
add	eax, 4
mov	ecx, [ebp+var_9C]
mov	[ecx], eax
mov	edx, [ebp+var_F0]
add	edx, 4
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	eax, [ebp+var_28]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
lea	ecx, [ebp+var_C]
call	sub_5CA510
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_24]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_18]
call	sub_422EC0
mov	ecx, [ebp+var_1C]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_5C7A70

loc_5C7C29:
mov	eax, [ebp+var_F0]
add	eax, 4
mov	[ebp+var_E4], eax
xor	ecx, ecx
mov	[ebp+var_DA], cl
mov	edx, [ebp+var_E4]
mov	eax, [edx]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_E4]
mov	[edx], ecx
mov	eax, [ebp+var_E0]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_F0]
add	ecx, 8
call	sub_404640
lea	ecx, [ebp+var_18]
call	sub_402DB0
lea	ecx, [ebp+var_C]
call	sub_595F50
mov	esp, ebp
pop	ebp
retn	4
sub_5C7A00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C7C90(void *, int)
sub_5C7C90 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_5BBA60
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5C7C90 endp

align 10h


; Attributes: bp-based frame

sub_5C7CD0 proc	near

var_48=	dword ptr -48h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C7CE8:
cmp	[ebp+var_8], 0
jz	short loc_5C7D2A
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jnz	short loc_5C7D1F
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5C7D28

loc_5C7D1F:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5C7D28:
jmp	short loc_5C7CE8

loc_5C7D2A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C7CD0 endp

align 10h


; Attributes: bp-based frame

sub_5C7D40 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C7D58:
cmp	[ebp+var_8], 0
jz	short loc_5C7D99
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_5C7D8E
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5C7D97

loc_5C7D8E:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5C7D97:
jmp	short loc_5C7D58

loc_5C7D99:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C7D40 endp

align 10h


; Attributes: bp-based frame

sub_5C7DB0 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	byte ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CAA70
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_5C7DDB

loc_5C7DD2:
mov	ecx, [ebp+var_4]
add	ecx, 50h
mov	[ebp+var_4], ecx

loc_5C7DDB:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	loc_5C7E69
sub	esp, 50h
mov	ecx, esp
mov	eax, [ebp+arg_0]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_5870E0
call	[ebp+arg_10]
add	esp, 0A0h
mov	[ebp+var_6C], eax
cmp	[ebp+var_6C], 0
jz	short loc_5C7E64
mov	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_64]
call	sub_5870E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_587150
mov	edx, [ebp+arg_10]
push	edx
sub	esp, 50h
mov	ecx, esp
lea	eax, [ebp+var_64]
push	eax
call	sub_5870E0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CB9B0
add	esp, 60h
lea	ecx, [ebp+var_60]
call	sub_407E50

loc_5C7E64:
jmp	loc_5C7DD2

loc_5C7E69:
mov	eax, [ebp+arg_4]
mov	[ebp+var_68], eax

loc_5C7E6F:
mov	eax, [ebp+var_68]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, 1
jle	short loc_5C7EA7
mov	edx, [ebp+var_68]
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+var_70]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBAA0
add	esp, 0Ch
mov	eax, [ebp+var_68]
sub	eax, 50h
mov	[ebp+var_68], eax
jmp	short loc_5C7E6F

loc_5C7EA7:
mov	esp, ebp
pop	ebp
retn
sub_5C7DB0 endp

align 10h


; Attributes: bp-based frame

sub_5C7EB0 proc	near

var_8= byte ptr	-8
var_7= word ptr	-7
var_5= byte ptr	-5
var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	byte ptr [ebp+var_7+1],	dl
mov	al, byte ptr [ebp+var_7+1]
mov	byte ptr [ebp+var_4+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_7], cl
mov	dl, byte ptr [ebp+var_7]
mov	[ebp+var_1], dl
xor	eax, eax
mov	[ebp+var_8], al
mov	cl, [ebp+var_8]
mov	byte ptr [ebp+var_4], cl
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CBAC0
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_5C7EB0 endp

align 10h


; Attributes: bp-based frame

sub_5C7F00 proc	near

var_24=	dword ptr -24h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= byte ptr	 14h
arg_58=	dword ptr  60h

push	ebp
mov	ebp, esp
sub	esp, 24h
sub	esp, 50h
mov	ecx, esp
mov	eax, [ebp+arg_0]
push	eax
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
lea	edx, [ebp+arg_8]
push	edx
call	sub_5870E0
call	[ebp+arg_58]
add	esp, 0A0h
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jz	short loc_5C7F68
xor	eax, eax
mov	[ebp+var_E], al
mov	cl, [ebp+var_E]
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 50h
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBB00
add	esp, 10h
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_587150
jmp	short loc_5C7F86

loc_5C7F68:
mov	ecx, [ebp+arg_58]
push	ecx
sub	esp, 50h
mov	ecx, esp
lea	edx, [ebp+arg_8]
push	edx
call	sub_5870E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_5CAAA0
add	esp, 58h

loc_5C7F86:
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5C7F00 endp

align 10h


; Attributes: bp-based frame

sub_5C7FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5C7FB7

loc_5C7FAE:
mov	ecx, [ebp+var_4]
add	ecx, 50h
mov	[ebp+var_4], ecx

loc_5C7FB7:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5C7FDF
mov	eax, [ebp+arg_C]
push	eax
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_5870E0
mov	eax, [ebp+var_4]
push	eax
call	sub_5CAAA0
add	esp, 58h
jmp	short loc_5C7FAE

loc_5C7FDF:
mov	esp, ebp
pop	ebp
retn
sub_5C7FA0 endp

align 10h


; Attributes: bp-based frame

sub_5C7FF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_8], ecx
jmp	short loc_5C8013

loc_5C800A:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5C8013:
cmp	[ebp+var_8], 0
jle	short loc_5C803D
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_5A7520
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_4], eax
jmp	short loc_5C800A

loc_5C803D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5C7FF0 endp

align 10h


; Attributes: bp-based frame

sub_5C8050 proc	near

var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_C]
jbe	loc_5C8105
xor	edx, edx
mov	[ebp+var_D], dl
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_C]
shl	ecx, 4
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+arg_C]
shl	ecx, 4
mov	edx, [ebp+var_48]
add	ecx, [edx+4]
mov	eax, [ebp+var_48]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_C]
shl	eax, 4
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
jmp	loc_5C818B

loc_5C8105:
mov	eax, [ebp+arg_4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
shl	ecx, 4
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	eax, [ebp+arg_C]
sub	eax, [ebp+var_4]
shl	eax, 4
mov	ecx, [ebp+var_48]
add	eax, [ecx+4]
mov	edx, [ebp+var_48]
mov	[edx+4], eax
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_4]
shl	eax, 4
mov	ecx, [ebp+var_48]
add	eax, [ecx+4]
mov	edx, [ebp+var_48]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5E8DC0
add	esp, 0Ch

loc_5C818B:
mov	esp, ebp
pop	ebp
retn	14h
sub_5C8050 endp

align 10h


; Attributes: bp-based frame

sub_5C81A0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_5E75C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A4]
add	ecx, 8
call	sub_5D6180
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_E], dl
mov	al, byte ptr [ebp+var_E]
mov	[ebp+var_39], al
mov	ecx, [ebp+var_A4]
mov	edx, [ecx]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_38]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	[ebp+var_C], eax
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_10], cl
mov	dl, byte ptr [ebp+var_10]
mov	[ebp+var_45], dl
mov	eax, [ebp+var_A4]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_A4]
call	sub_5ED2E0
mov	edx, [ebp+var_4]
shl	edx, 4
add	edx, [ebp+var_8]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_A0]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	10h
sub_5C81A0 endp

align 10h


; Attributes: bp-based frame

sub_5C82B0 proc	near

var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_C]
jbe	loc_5C8365
xor	edx, edx
mov	[ebp+var_D], dl
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_C]
shl	ecx, 3
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_C]
lea	ecx, [edx+eax*8]
mov	edx, [ebp+var_48]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_E], al
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_C]
shl	edx, 3
mov	eax, [ebp+var_8]
sub	eax, edx
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A290
add	esp, 0Ch
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	loc_5C83EB

loc_5C8365:
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*8]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+arg_C]
sub	ecx, [ebp+var_4]
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
lea	ecx, [eax+ecx*8]
mov	edx, [ebp+var_48]
mov	[edx+4], ecx
xor	eax, eax
mov	[ebp+var_F], al
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*8]
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch

loc_5C83EB:
mov	esp, ebp
pop	ebp
retn	14h
sub_5C82B0 endp

align 10h


; Attributes: bp-based frame

sub_5C8400 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A4]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_E], dl
mov	al, byte ptr [ebp+var_E]
mov	[ebp+var_39], al
mov	ecx, [ebp+var_A4]
mov	edx, [ecx]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_38]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_51EF50
add	esp, 0Ch
mov	[ebp+var_C], eax
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_10], cl
mov	dl, byte ptr [ebp+var_10]
mov	[ebp+var_45], dl
mov	eax, [ebp+var_A4]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_A4]
call	sub_50F330
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*8]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_A4]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A0]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_5C8400 endp

align 10h


; Attributes: bp-based frame

sub_5C8510 proc	near

var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_4F=	byte ptr -4Fh
var_4E=	byte ptr -4Eh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_A4], ecx
mov	eax, [ebp+var_A4]
mov	ecx, [eax+4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_A4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_C]
jbe	loc_5C85F9
xor	edx, edx
mov	[ebp+var_D], dl
mov	eax, [ebp+var_A4]
mov	ecx, [eax+4]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_A4]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_C]
shl	ecx, 3
mov	edx, [ebp+var_A4]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_20], eax
push	0
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_5C7FF0
add	esp, 14h
mov	edx, [ebp+var_A4]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_C]
lea	edx, [eax+ecx*8]
mov	eax, [ebp+var_A4]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_E], cl
lea	edx, [ebp+var_E]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_C]
shl	ecx, 3
mov	edx, [ebp+var_8]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CAB20
add	esp, 10h
xor	ecx, ecx
mov	[ebp+var_3A], cl
mov	dl, [ebp+var_3A]
mov	[ebp+var_39], dl
lea	eax, [ebp+var_39]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	sub_5CBB80
add	esp, 10h
jmp	loc_5C86FA

loc_5C85F9:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
lea	ecx, [eax+edx*8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_A4]
mov	eax, [edx+4]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_6C], ecx
xor	edx, edx
mov	[ebp+var_4F], dl
mov	al, [ebp+var_4F]
mov	[ebp+var_4E], al
lea	ecx, [ebp+var_4E]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
call	sub_5CBBC0
add	esp, 10h
mov	edx, [ebp+arg_C]
sub	edx, [ebp+var_4]
mov	eax, [ebp+var_A4]
mov	ecx, [eax+4]
lea	edx, [ecx+edx*8]
mov	eax, [ebp+var_A4]
mov	[eax+4], edx
xor	ecx, ecx
mov	[ebp+var_F], cl
mov	edx, [ebp+var_A4]
mov	eax, [edx+4]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_88]
sar	eax, 3
mov	[ebp+var_7C], eax
jmp	short loc_5C869B

loc_5C8692:
mov	ecx, [ebp+var_7C]
sub	ecx, 1
mov	[ebp+var_7C], ecx

loc_5C869B:
cmp	[ebp+var_7C], 0
jle	short loc_5C86CE
mov	edx, [ebp+var_88]
push	edx		; int
mov	eax, [ebp+var_78]
push	eax		; void *
call	sub_5A7520
add	esp, 8
mov	ecx, [ebp+var_88]
add	ecx, 8
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_78]
add	edx, 8
mov	[ebp+var_78], edx
jmp	short loc_5C8692

loc_5C86CE:
mov	eax, [ebp+var_A4]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*8]
mov	ecx, [ebp+var_A4]
mov	[ecx+4], eax
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5CABB0
add	esp, 0Ch

loc_5C86FA:
mov	esp, ebp
pop	ebp
retn	14h
sub_5C8510 endp



; Attributes: bp-based frame

sub_5C8700 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D8]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 3
mov	[ebp+var_40], edx
jmp	short loc_5C877E

loc_5C8775:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5C877E:
cmp	[ebp+var_40], 0
jle	short loc_5C87A8
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5A7520
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 8
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 8
mov	[ebp+var_3C], ecx
jmp	short loc_5C8775

loc_5C87A8:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
xor	eax, eax
mov	[ebp+var_53], al
mov	cl, [ebp+var_53]
mov	[ebp+var_52], cl
lea	edx, [ebp+var_52]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5CBBC0
add	esp, 10h
mov	[ebp+var_C], eax
xor	eax, eax
mov	[ebp+var_F], al
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	dl, [ebp+var_10]
mov	[ebp+var_89], dl
mov	eax, [ebp+var_D8]
mov	ecx, [eax+4]
mov	[ebp+var_88], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_88]
sub	ecx, [ebp+var_84]
sar	ecx, 3
mov	[ebp+var_78], ecx
jmp	short loc_5C8822

loc_5C8819:
mov	edx, [ebp+var_78]
sub	edx, 1
mov	[ebp+var_78], edx

loc_5C8822:
cmp	[ebp+var_78], 0
jle	short loc_5C8855
mov	eax, [ebp+var_84]
push	eax		; int
mov	ecx, [ebp+var_74]
push	ecx		; void *
call	sub_5A7520
add	esp, 8
mov	edx, [ebp+var_84]
add	edx, 8
mov	[ebp+var_84], edx
mov	eax, [ebp+var_74]
add	eax, 8
mov	[ebp+var_74], eax
jmp	short loc_5C8819

loc_5C8855:
mov	ecx, [ebp+var_74]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_D8]
call	sub_5A9A30
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*8]
mov	[ebp+var_D4], ecx
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ebp+var_C]
mov	[ecx+4], edx
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_D4]
mov	[eax+8], ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_5C8700 endp

align 10h


; Attributes: bp-based frame

sub_5C88B0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CAC60
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_5C88DB

loc_5C88D2:
mov	ecx, [ebp+var_4]
add	ecx, 34h
mov	[ebp+var_4], ecx

loc_5C88DB:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	loc_5C89E1
sub	esp, 34h
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18]
call	sub_403400
mov	ecx, [ebp+var_18]
add	ecx, 28h
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_14]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
sub	esp, 34h
mov	[ebp+var_20], esp
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_20]
call	sub_403400
mov	ecx, [ebp+var_20]
add	ecx, 28h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_1C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_4]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_4]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_10]
add	esp, 68h
mov	[ebp+var_3C], eax
cmp	[ebp+var_3C], 0
jz	short loc_5C89DC
push	0
mov	eax, [ebp+arg_10]
push	eax
sub	esp, 34h
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_403400
mov	edx, [ebp+var_28]
add	edx, 28h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+var_24]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	al, [edx+31h]
mov	[ecx+31h], al
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CAC90
add	esp, 48h

loc_5C89DC:
jmp	loc_5C88D2

loc_5C89E1:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_38], ecx

loc_5C89E7:
mov	eax, [ebp+var_38]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, 1
jle	short loc_5C8A1F
mov	edx, [ebp+var_38]
mov	[ebp+var_40], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBF00
add	esp, 0Ch
mov	eax, [ebp+var_38]
sub	eax, 34h
mov	[ebp+var_38], eax
jmp	short loc_5C89E7

loc_5C8A1F:
mov	esp, ebp
pop	ebp
retn
sub_5C88B0 endp

align 10h


; Attributes: bp-based frame

sub_5C8A30 proc	near

var_8= byte ptr	-8
var_7= word ptr	-7
var_5= byte ptr	-5
var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	byte ptr [ebp+var_7+1],	dl
mov	al, byte ptr [ebp+var_7+1]
mov	byte ptr [ebp+var_4+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_7], cl
mov	dl, byte ptr [ebp+var_7]
mov	[ebp+var_1], dl
xor	eax, eax
mov	[ebp+var_8], al
mov	cl, [ebp+var_8]
mov	byte ptr [ebp+var_4], cl
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CBF20
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_5C8A30 endp

align 10h


; Attributes: bp-based frame

sub_5C8A80 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_30=	dword ptr  38h
arg_34=	dword ptr  3Ch
arg_38=	byte ptr  40h
arg_39=	byte ptr  41h
arg_3C=	dword ptr  44h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
sub	esp, 34h
mov	[ebp+var_14], esp
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
call	sub_403400
mov	ecx, [ebp+var_14]
add	ecx, 28h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_10]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
sub	esp, 34h
mov	[ebp+var_1C], esp
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_403400
mov	ecx, [ebp+var_1C]
add	ecx, 28h
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_30]
mov	eax, [ebp+arg_34]
mov	ecx, [ebp+var_18]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_1C]
mov	al, [ebp+arg_38]
mov	[edx+30h], al
mov	ecx, [ebp+var_1C]
mov	dl, [ebp+arg_39]
mov	[ecx+31h], dl
call	[ebp+arg_3C]
add	esp, 68h
mov	[ebp+var_3C], eax
cmp	[ebp+var_3C], 0
jz	short loc_5C8B5A
mov	eax, [ebp+arg_4]
add	eax, 34h
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CAD40
add	esp, 0Ch
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4023E0
mov	ecx, [ebp+arg_30]
mov	edx, [ebp+arg_34]
mov	eax, [ebp+arg_0]
mov	[eax+28h], ecx
mov	[eax+2Ch], edx
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+arg_38]
mov	[ecx+30h], dl
mov	eax, [ebp+arg_0]
mov	cl, [ebp+arg_39]
mov	[eax+31h], cl
jmp	short loc_5C8BA5

loc_5C8B5A:
mov	edx, [ebp+arg_3C]
push	edx
sub	esp, 34h
mov	[ebp+var_38], esp
lea	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_38]
call	sub_403400
mov	ecx, [ebp+var_38]
add	ecx, 28h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_30]
mov	eax, [ebp+arg_34]
mov	ecx, [ebp+var_34]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_38]
mov	al, [ebp+arg_38]
mov	[edx+30h], al
mov	ecx, [ebp+var_38]
mov	dl, [ebp+arg_39]
mov	[ecx+31h], dl
mov	eax, [ebp+arg_4]
push	eax
call	sub_5CAD90
add	esp, 3Ch

loc_5C8BA5:
lea	ecx, [ebp+arg_8]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5C8A80 endp

align 10h


; Attributes: bp-based frame

sub_5C8BC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5C8BD7

loc_5C8BCE:
mov	ecx, [ebp+var_4]
add	ecx, 34h
mov	[ebp+var_4], ecx

loc_5C8BD7:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5C8C35
mov	eax, [ebp+arg_C]
push	eax
sub	esp, 34h
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_403400
mov	edx, [ebp+var_10]
add	edx, 28h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+var_C]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_4]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_4]
mov	al, [edx+31h]
mov	[ecx+31h], al
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5CAD90
add	esp, 3Ch
jmp	short loc_5C8BCE

loc_5C8C35:
mov	esp, ebp
pop	ebp
retn
sub_5C8BC0 endp

align 10h


; Attributes: bp-based frame

sub_5C8C40 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CAF40
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C8C40 endp

align 10h


; Attributes: bp-based frame

sub_5C8C70 proc	near

var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 28h
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CAFC0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_5C8C9C

loc_5C8C93:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4], ecx

loc_5C8C9C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	loc_5C8D3E
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax+0Eh]
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+0Eh]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C8D39
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ecx+4]
mov	[ebp+var_14], eax
mov	edx, [ecx+8]
mov	[ebp+var_10], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_C], eax
mov	cl, [ebp+arg_10]
mov	[ebp+var_19], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
movzx	eax, [ebp+var_19]
push	eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBFD0
add	esp, 20h

loc_5C8D39:
jmp	loc_5C8C93

loc_5C8D3E:
mov	al, [ebp+arg_10]
mov	[ebp+var_21], al
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx

loc_5C8D4A:
mov	edx, [ebp+var_20]
sub	edx, [ebp+arg_0]
sar	edx, 4
cmp	edx, 1
jle	short loc_5C8D7E
mov	eax, [ebp+var_20]
mov	[ebp+var_28], eax
movzx	ecx, [ebp+var_21]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CC160
add	esp, 0Ch
mov	ecx, [ebp+var_20]
sub	ecx, 10h
mov	[ebp+var_20], ecx
jmp	short loc_5C8D4A

loc_5C8D7E:
mov	esp, ebp
pop	ebp
retn
sub_5C8C70 endp

align 10h


; Attributes: bp-based frame

sub_5C8D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5C8DA5

loc_5C8D9C:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4], ecx

loc_5C8DA5:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5C8DDE
movzx	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
sub	esp, 10h
mov	edx, esp
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_5CB060
add	esp, 18h
jmp	short loc_5C8D9C

loc_5C8DDE:
mov	esp, ebp
pop	ebp
retn
sub_5C8D90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C8DF0(void *, int)
sub_5C8DF0 proc	near

var_3C=	dword ptr -3Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	70h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C8E47
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 8
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_536DD0
mov	eax, [ebp+var_8]
mov	[ebp+var_3C], eax
jmp	short loc_5C8E4E

loc_5C8E47:
mov	[ebp+var_3C], 0

loc_5C8E4E:
mov	esp, ebp
pop	ebp
retn
sub_5C8DF0 endp

align 10h


; Attributes: bp-based frame

sub_5C8E60 proc	near

var_78=	dword ptr -78h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	byte ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C8E78:
cmp	[ebp+var_8], 0
jz	short loc_5C8EEF
lea	ecx, [ebp+var_35]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_407810
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_3C], edx
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_9], dl
lea	ecx, [ebp+var_34]
call	sub_407E50
lea	ecx, [ebp+var_35]
call	nullsub_1
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5C8EE4
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5C8EED

loc_5C8EE4:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5C8EED:
jmp	short loc_5C8E78

loc_5C8EEF:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C8E60 endp

align 10h


; Attributes: bp-based frame

sub_5C8F00 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_8E=	byte ptr -8Eh
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_4F=	byte ptr -4Fh
var_4E=	byte ptr -4Eh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
mov	eax, [ebp+var_A8]
mov	eax, [eax+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_C]
jbe	loc_5C9024
xor	edx, edx
mov	[ebp+var_D], dl
mov	eax, [ebp+var_A8]
mov	ecx, [eax+4]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_C]
imul	ecx, 68h
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_20], eax
push	0
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_5C7160
add	esp, 14h
mov	edx, [ebp+arg_C]
imul	edx, 68h
mov	eax, [ebp+var_A8]
add	edx, [eax+4]
mov	ecx, [ebp+var_A8]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_E], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_C]
imul	ecx, 68h
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_30], eax
jmp	short loc_5C8FD6

loc_5C8FCD:
mov	edx, [ebp+var_30]
sub	edx, 1
mov	[ebp+var_30], edx

loc_5C8FD6:
cmp	[ebp+var_30], 0
jle	short loc_5C8FFC
mov	eax, [ebp+var_34]
sub	eax, 68h
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
sub	ecx, 68h
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_38]
call	sub_5C6760
jmp	short loc_5C8FCD

loc_5C8FFC:
xor	eax, eax
mov	[ebp+var_3A], al
mov	cl, [ebp+var_3A]
mov	[ebp+var_39], cl
lea	edx, [ebp+var_39]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5CC1F0
add	esp, 10h
jmp	loc_5C9151

loc_5C9024:
mov	eax, [ebp+arg_4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
imul	ecx, 68h
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_6C], ecx
xor	edx, edx
mov	[ebp+var_4F], dl
mov	al, [ebp+var_4F]
mov	[ebp+var_4E], al
lea	ecx, [ebp+var_4E]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
call	sub_5C71C0
add	esp, 10h
mov	edx, [ebp+arg_C]
sub	edx, [ebp+var_4]
imul	edx, 68h
mov	eax, [ebp+var_A8]
add	edx, [eax+4]
mov	ecx, [ebp+var_A8]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_F], dl
mov	eax, [ebp+var_A8]
mov	ecx, [eax+4]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_8C]
mov	[ebp+var_78], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_88]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_7C], eax
jmp	short loc_5C90CB

loc_5C90C2:
mov	edx, [ebp+var_7C]
sub	edx, 1
mov	[ebp+var_7C], edx

loc_5C90CB:
cmp	[ebp+var_7C], 0
jle	short loc_5C90FE
mov	eax, [ebp+var_88]
push	eax		; int
mov	ecx, [ebp+var_78]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_88]
add	edx, 68h
mov	[ebp+var_88], edx
mov	eax, [ebp+var_78]
add	eax, 68h
mov	[ebp+var_78], eax
jmp	short loc_5C90C2

loc_5C90FE:
mov	ecx, [ebp+var_4]
imul	ecx, 68h
mov	edx, [ebp+var_A8]
add	ecx, [edx+4]
mov	eax, [ebp+var_A8]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	[ebp+var_A4], ecx
xor	edx, edx
mov	[ebp+var_8E], dl
mov	al, [ebp+var_8E]
mov	[ebp+var_8D], al
lea	ecx, [ebp+var_8D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_A4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5CC1F0
add	esp, 10h

loc_5C9151:
mov	esp, ebp
pop	ebp
retn	14h
sub_5C8F00 endp

align 10h


; Attributes: bp-based frame

sub_5C9160 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D8]
call	sub_5A89E0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_5A8B40
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5C91E3

loc_5C91DA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5C91E3:
cmp	[ebp+var_40], 0
jle	short loc_5C920D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 68h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 68h
mov	[ebp+var_3C], eax
jmp	short loc_5C91DA

loc_5C920D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
xor	edx, edx
mov	[ebp+var_53], dl
mov	al, [ebp+var_53]
mov	[ebp+var_52], al
lea	ecx, [ebp+var_52]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5C71C0
add	esp, 10h
mov	[ebp+var_C], eax
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_89], cl
mov	edx, [ebp+var_D8]
mov	eax, [edx+4]
mov	[ebp+var_88], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_84], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_88]
sub	eax, [ebp+var_84]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_78], eax
jmp	short loc_5C928C

loc_5C9283:
mov	edx, [ebp+var_78]
sub	edx, 1
mov	[ebp+var_78], edx

loc_5C928C:
cmp	[ebp+var_78], 0
jle	short loc_5C92BF
mov	eax, [ebp+var_84]
push	eax		; int
mov	ecx, [ebp+var_74]
push	ecx		; void *
call	sub_5A6E40
add	esp, 8
mov	edx, [ebp+var_84]
add	edx, 68h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_74]
add	eax, 68h
mov	[ebp+var_74], eax
jmp	short loc_5C9283

loc_5C92BF:
mov	ecx, [ebp+var_74]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_D8]
call	sub_5A8AC0
mov	edx, [ebp+var_4]
imul	edx, 68h
add	edx, [ebp+var_8]
mov	[ebp+var_D4], edx
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ebp+var_D4]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	10h
sub_5C9160 endp

align 10h


; Attributes: bp-based frame

sub_5C9310 proc	near

var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h
movzx	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CB0E0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_5C933C

loc_5C9333:
mov	ecx, [ebp+var_4]
add	ecx, 64h
mov	[ebp+var_4], ecx

loc_5C933C:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	short loc_5C9387
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+60h]
xor	eax, eax
cmp	edx, [ecx+60h]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5C9385
push	0
movzx	edx, [ebp+arg_10]
push	edx
sub	esp, 64h
mov	ecx, esp
mov	eax, [ebp+var_4]
push	eax
call	sub_5BD5D0
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CB110
add	esp, 78h

loc_5C9385:
jmp	short loc_5C9333

loc_5C9387:
mov	cl, [ebp+arg_10]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx

loc_5C9393:
mov	eax, [ebp+var_10]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
cmp	eax, 1
jle	short loc_5C93CC
mov	edx, [ebp+var_10]
mov	[ebp+var_18], edx
movzx	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC3E0
add	esp, 0Ch
mov	eax, [ebp+var_10]
sub	eax, 64h
mov	[ebp+var_10], eax
jmp	short loc_5C9393

loc_5C93CC:
mov	esp, ebp
pop	ebp
retn
sub_5C9310 endp



; Attributes: bp-based frame

sub_5C93D0 proc	near

var_8= byte ptr	-8
var_7= word ptr	-7
var_5= byte ptr	-5
var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	byte ptr [ebp+var_7+1],	dl
mov	al, byte ptr [ebp+var_7+1]
mov	byte ptr [ebp+var_4+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_7], cl
mov	dl, byte ptr [ebp+var_7]
mov	[ebp+var_1], dl
xor	eax, eax
mov	[ebp+var_8], al
mov	cl, [ebp+var_8]
mov	byte ptr [ebp+var_4], cl
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CC430
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_5C93D0 endp

align 10h


; Attributes: bp-based frame

sub_5C9420 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= byte ptr	 14h
arg_34=	byte ptr  3Ch
arg_68=	dword ptr  70h
arg_6C=	byte ptr  74h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_68]
xor	edx, edx
cmp	ecx, [eax+60h]
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C946F
xor	ecx, ecx
mov	[ebp+var_6], cl
mov	dl, [ebp+var_6]
mov	[ebp+var_5], dl
lea	eax, [ebp+var_5]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 64h
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CC470
add	esp, 10h
lea	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_5CA250
jmp	short loc_5C948E

loc_5C946F:
movzx	edx, [ebp+arg_6C]
push	edx
sub	esp, 64h
mov	ecx, esp
lea	eax, [ebp+arg_8]
push	eax
call	sub_5BD5D0
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_5CB170
add	esp, 6Ch

loc_5C948E:
lea	ecx, [ebp+arg_34]
call	sub_407E50
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5C9420 endp

align 10h


; Attributes: bp-based frame

sub_5C94B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= byte ptr	 14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5C94C7

loc_5C94BE:
mov	ecx, [ebp+var_4]
add	ecx, 64h
mov	[ebp+var_4], ecx

loc_5C94C7:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5C94F0
movzx	eax, [ebp+arg_C]
push	eax
sub	esp, 64h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_5BD5D0
mov	eax, [ebp+var_4]
push	eax
call	sub_5CB170
add	esp, 6Ch
jmp	short loc_5C94BE

loc_5C94F0:
mov	esp, ebp
pop	ebp
retn
sub_5C94B0 endp

align 10h


; Attributes: bp-based frame

sub_5C9500 proc	near

var_24=	dword ptr -24h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_24]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C9518:
cmp	[ebp+var_8], 0
jz	short loc_5C9555
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5C954A
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5C9553

loc_5C954A:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5C9553:
jmp	short loc_5C9518

loc_5C9555:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C9500 endp

align 10h


; Attributes: bp-based frame

sub_5C9560 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CB1E0
add	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_5C958B

loc_5C9582:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_5C958B:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnb	short loc_5C960C
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	[ebp+arg_10]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C9607
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_4]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+arg_10]
push	edx
sub	esp, 8
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_1C]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC580
add	esp, 18h

loc_5C9607:
jmp	loc_5C9582

loc_5C960C:
mov	eax, [ebp+arg_4]
mov	[ebp+var_20], eax

loc_5C9612:
mov	ecx, [ebp+var_20]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
cmp	ecx, 1
jle	short loc_5C9645
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+var_24]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC6C0
add	esp, 0Ch
mov	eax, [ebp+var_20]
sub	eax, 8
mov	[ebp+var_20], eax
jmp	short loc_5C9612

loc_5C9645:
mov	esp, ebp
pop	ebp
retn
sub_5C9560 endp

align 10h


; Attributes: bp-based frame

sub_5C9650 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	[ebp+var_5], al
mov	cl, [ebp+var_5]
mov	[ebp+var_2], cl
xor	edx, edx
mov	[ebp+var_6], dl
mov	al, [ebp+var_6]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_8+1],	cl
mov	dl, byte ptr [ebp+var_8+1]
mov	[ebp+var_1], dl
xor	eax, eax
mov	byte ptr [ebp+var_8], al
mov	cl, byte ptr [ebp+var_8]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_14]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	[eax+4], edx
mov	esp, ebp
pop	ebp
retn
sub_5C9650 endp

align 10h


; Attributes: bp-based frame

sub_5C96D0 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+arg_8]
push	ecx
call	[ebp+arg_10]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5C9712
mov	eax, [ebp+arg_4]
add	eax, 8
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5F4430
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_C]
mov	[eax+4], edx
jmp	short loc_5C9739

loc_5C9712:
mov	eax, [ebp+arg_10]
push	eax
sub	esp, 8
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_C]
mov	[eax+4], ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5CB210
add	esp, 10h

loc_5C9739:
mov	esp, ebp
pop	ebp
retn
sub_5C96D0 endp

align 10h


; Attributes: bp-based frame

sub_5C9740 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5C9757

loc_5C974E:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_4], ecx

loc_5C9757:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_5C978D
mov	eax, [ebp+arg_C]
push	eax
sub	esp, 8
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5CB210
add	esp, 10h
jmp	short loc_5C974E

loc_5C978D:
mov	esp, ebp
pop	ebp
retn
sub_5C9740 endp

align 10h


; Attributes: bp-based frame

sub_5C97A0 proc	near

var_44=	dword ptr -44h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5C97B8:
cmp	[ebp+var_8], 0
jz	short loc_5C982A
lea	ecx, [ebp+var_25]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_24]
call	sub_407D30
mov	edx, [ebp+var_8]
add	edx, 10h
mov	[ebp+var_2C], edx
lea	eax, [ebp+var_24]
mov	ecx, [ebp+var_2C]
call	sub_404510
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_9], al
lea	ecx, [ebp+var_24]
call	sub_407910
lea	ecx, [ebp+var_25]
call	nullsub_1
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_5C981F
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5C9828

loc_5C981F:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5C9828:
jmp	short loc_5C97B8

loc_5C982A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5C97A0 endp

align 10h


; Attributes: bp-based frame

sub_5C9840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_8], ecx
jmp	short loc_5C9863

loc_5C985A:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5C9863:
cmp	[ebp+var_8], 0
jle	short loc_5C988D
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_4701B0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_4], eax
jmp	short loc_5C985A

loc_5C988D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5C9840 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C98A0(void *, int)
sub_5C98A0 proc	near

var_2C=	dword ptr -2Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	58h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C98E4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_58B950
mov	[ebp+var_2C], eax
jmp	short loc_5C98EB

loc_5C98E4:
mov	[ebp+var_2C], 0

loc_5C98EB:
mov	esp, ebp
pop	ebp
retn
sub_5C98A0 endp

align 10h


; Attributes: bp-based frame

sub_5C98F0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5C98F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
mov	[ebp+var_50], ecx
mov	eax, [ebp+var_50]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_5C991D:
cmp	[ebp+var_14], 0
jz	loc_5C99AF
lea	ecx, [ebp+var_31]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_30]
call	sub_407D30
lea	ecx, [ebp+var_39]
mov	[ebp+var_54], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_38], edx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
lea	eax, [ebp+var_30]
mov	ecx, [ebp+var_38]
call	sub_404510
movzx	eax, al
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_15], al
lea	ecx, [ebp+var_30]
call	sub_407910
lea	ecx, [ebp+var_31]
call	nullsub_1
movzx	ecx, [ebp+var_15]
test	ecx, ecx
jz	short loc_5C99A1
mov	edx, [ebp+var_14]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
mov	[ebp+var_14], ecx
jmp	short loc_5C99AA

loc_5C99A1:
mov	edx, [ebp+var_14]
mov	eax, [edx+0Ch]
mov	[ebp+var_14], eax

loc_5C99AA:
jmp	loc_5C991D

loc_5C99AF:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5C98F0 endp

align 10h


; Attributes: bp-based frame

sub_5C99D0 proc	near

var_5C=	dword ptr -5Ch
var_40=	dword ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_9= byte ptr	-9
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_9]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
lea	ecx, [ebp+var_8]
call	sub_5CB270
lea	ecx, [ebp+var_9]
call	nullsub_1
lea	ecx, [ebp+var_8]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
call	sub_5CA3C0
lea	ecx, [ebp+var_8]
call	sub_402750
mov	esp, ebp
pop	ebp
retn	10h
sub_5C99D0 endp

align 10h


; Attributes: bp-based frame

sub_5C9A40 proc	near

var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5C9A57:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	loc_5C9AF3
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*8-8]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_20]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_20]
comiss	xmm0, dword ptr	[edx+ecx*8]
jbe	short loc_5C9AA6
mov	[ebp+var_3C], 1
jmp	short loc_5C9AAD

loc_5C9AA6:
mov	[ebp+var_3C], 0

loc_5C9AAD:
mov	al, byte ptr [ebp+var_3C]
mov	[ebp+var_3D], al
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5C9AC4
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5C9AC4:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	ecx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+ecx*8], edx
mov	[esi+ecx*8+4], eax
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_8]
lea	ecx, [eax+eax+2]
mov	[ebp+var_8], ecx
jmp	loc_5C9A57

loc_5C9AF3:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jnz	short loc_5C9B1F
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8-8]
mov	eax, [ecx+eax*8-4]
mov	ecx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+ecx*8], edx
mov	[esi+ecx*8+4], eax
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_5C9B1F:
movzx	eax, [ebp+arg_14]
push	eax
sub	esp, 8
mov	[ebp+var_24], esp
mov	ecx, [ebp+var_24]
movss	xmm0, [ebp+arg_C]
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_24]
mov	eax, [ebp+arg_10]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5C5570
add	esp, 18h
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5C9A40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9B60(void *, int)
sub_5C9B60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	88h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5C9BCA
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5C9BB0
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_40AA80

loc_5C9BB0:
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_5895A0
mov	edx, [ebp+var_4]
mov	[ebp+var_C], edx
jmp	short loc_5C9BD1

loc_5C9BCA:
mov	[ebp+var_C], 0

loc_5C9BD1:
mov	esp, ebp
pop	ebp
retn
sub_5C9B60 endp

align 10h


; Attributes: bp-based frame

sub_5C9BE0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5C9BF1

loc_5C9BE8:
mov	eax, [ebp+arg_0]
sub	eax, 64h
mov	[ebp+arg_0], eax

loc_5C9BF1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5C9C42
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 64h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5C9C40
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5C9C40:
jmp	short loc_5C9BE8

loc_5C9C42:
mov	esp, ebp
pop	ebp
retn
sub_5C9BE0 endp

align 10h


; Attributes: bp-based frame

sub_5C9C50 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_5CB2C0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5C9C50 endp

align 10h


; Attributes: bp-based frame

sub_5C9CA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C52F0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C9CA0 endp

align 10h


; Attributes: bp-based frame

sub_5C9CE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5C56D0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5C9CE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9D20(void *, int)
sub_5C9D20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5C9D8F
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
add	edx, 8
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_403400
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_10], eax
jmp	short loc_5C9D96

loc_5C9D8F:
mov	[ebp+var_10], 0

loc_5C9D96:
mov	esp, ebp
pop	ebp
retn
sub_5C9D20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9DA0(void *, int)
sub_5C9DA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5C9DF9
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_8]
call	sub_403400
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	al, [edx+28h]
mov	[ecx+28h], al
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
jmp	short loc_5C9E00

loc_5C9DF9:
mov	[ebp+var_10], 0

loc_5C9E00:
mov	esp, ebp
pop	ebp
retn
sub_5C9DA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9E10(void *, int)
sub_5C9E10 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5C9E59
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+var_4]
add	edx, 18h
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AB950
mov	ecx, [ebp+var_4]
mov	[ebp+var_34], ecx
jmp	short loc_5C9E60

loc_5C9E59:
mov	[ebp+var_34], 0

loc_5C9E60:
mov	esp, ebp
pop	ebp
retn
sub_5C9E10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9E70(void *, int)
sub_5C9E70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C9EC9
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_403400
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5C9ED0

loc_5C9EC9:
mov	[ebp+var_C], 0

loc_5C9ED0:
mov	esp, ebp
pop	ebp
retn
sub_5C9E70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9EE0(void *, int)
sub_5C9EE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C9F39
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+arg_4]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_403850
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5C9F40

loc_5C9F39:
mov	[ebp+var_C], 0

loc_5C9F40:
mov	esp, ebp
pop	ebp
retn
sub_5C9EE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9F50(void *, int)
sub_5C9F50 proc	near

var_38=	dword ptr -38h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	78h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5C9FA7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 8
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_5AACF0
mov	eax, [ebp+var_8]
mov	[ebp+var_38], eax
jmp	short loc_5C9FAE

loc_5C9FA7:
mov	[ebp+var_38], 0

loc_5C9FAE:
mov	esp, ebp
pop	ebp
retn
sub_5C9F50 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5C9FC0(void *, int)
sub_5C9FC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CA013
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5CA01A

loc_5CA013:
mov	[ebp+var_C], 0

loc_5CA01A:
mov	esp, ebp
pop	ebp
retn
sub_5C9FC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CA020(void *, int)
sub_5CA020 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CA07D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	eax, [ecx+0Ch]
mov	ecx, [ebp+var_8]
mov	[ecx+8], edx
mov	[ecx+0Ch], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5CA084

loc_5CA07D:
mov	[ebp+var_C], 0

loc_5CA084:
mov	esp, ebp
pop	ebp
retn
sub_5CA020 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CA090(void *, int)
sub_5CA090 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CA0F7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
mov	eax, [ebp+var_8]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5CA0FE

loc_5CA0F7:
mov	[ebp+var_C], 0

loc_5CA0FE:
mov	esp, ebp
pop	ebp
retn
sub_5CA090 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CA110(void *, int)
sub_5CA110 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CA167
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_403850
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5CA16E

loc_5CA167:
mov	[ebp+var_C], 0

loc_5CA16E:
mov	esp, ebp
pop	ebp
retn
sub_5CA110 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CA180(void *, int)
sub_5CA180 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CA1D3
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5CA1DA

loc_5CA1D3:
mov	[ebp+var_C], 0

loc_5CA1DA:
mov	esp, ebp
pop	ebp
retn
sub_5CA180 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CA1E0(void *, int)
sub_5CA1E0 proc	near

var_64=	dword ptr -64h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	4Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CA237
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_5AAE00
mov	eax, [ebp+var_8]
mov	[ebp+var_64], eax
jmp	short loc_5CA23E

loc_5CA237:
mov	[ebp+var_64], 0

loc_5CA23E:
mov	esp, ebp
pop	ebp
retn
sub_5CA1E0 endp

align 10h


; Attributes: bp-based frame

sub_5CA250 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+54h]
mov	[edx+54h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+55h]
mov	[edx+55h], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+58h]
mov	[edx+58h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+5Ch]
mov	[edx+5Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
mov	[edx+60h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA250 endp

align 10h


; Attributes: bp-based frame

sub_5CA2D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_407910
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CA30C
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CA30C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA2D0 endp

align 10h


; Attributes: bp-based frame

sub_5CA320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 54h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 2Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_407E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CA35C
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CA35C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA320 endp

align 10h


; Attributes: bp-based frame

sub_5CA370 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 58h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CA3AC
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CA3AC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA370 endp

align 10h


; Attributes: bp-based frame

sub_5CA3C0 proc	near

var_6C=	dword ptr -6Ch
var_1C=	dword ptr -1Ch
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5CA459
mov	[ebp+var_1], 1
lea	ecx, [ebp+var_3]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	nullsub_1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_5CA423
lea	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
call	sub_4046E0
mov	edx, [eax]
push	edx
lea	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
call	sub_402EB0
mov	eax, [eax]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E410
add	esp, 0Ch
jmp	short loc_5CA459

loc_5CA423:
push	ecx
mov	eax, esp
mov	ecx, [ebp+arg_4]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	ecx, [ebp+arg_4]
call	sub_402EB0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
call	sub_5C52A0
mov	edx, [ebp+arg_4]
push	edx
call	sub_403A10

loc_5CA459:
mov	esp, ebp
pop	ebp
retn	8
sub_5CA3C0 endp

align 10h


; Attributes: bp-based frame

sub_5CA460 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax], 0
jz	loc_5CA502
mov	[ebp+var_1], 1
call	nullsub_1
call	nullsub_1
movzx	ecx, [ebp+var_1]
test	ecx, ecx
jz	short loc_5CA4B9
push	0
mov	edx, [ebp+arg_4]
push	edx
call	sub_77E480
add	esp, 8
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
call	sub_77E480
add	esp, 8
push	eax
call	sub_77E450
add	esp, 0Ch
jmp	short loc_5CA502

loc_5CA4B9:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_5CB570
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_50BAC0

loc_5CA502:
mov	esp, ebp
pop	ebp
retn	8
sub_5CA460 endp

align 10h


; Attributes: bp-based frame

sub_5CA510 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_5CA5FA
mov	[ebp+var_5], 1
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5CA56F
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E450
add	esp, 0Ch
jmp	loc_5CA5FA

loc_5CA56F:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_34], eax
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
push	ecx
mov	[ebp+var_38], esp
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_3C]
mov	[edx], eax
push	ecx
mov	[ebp+var_44], esp
mov	ecx, [ebp+arg_0]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_40]
mov	[edx], eax
mov	ecx, [ebp+var_7C]
call	sub_5CB5C0
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+arg_C], edx
lea	eax, [ebp+var_74]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_68]
mov	[eax], ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_59DF80
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	[ebp+var_20], ecx

loc_5CA5FA:
mov	esp, ebp
pop	ebp
retn	10h
sub_5CA510 endp



; Attributes: bp-based frame

sub_5CA600 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
add	edx, 18h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_8]
add	edx, 4
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403850
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA600 endp

align 10h


; Attributes: bp-based frame

sub_5CA660 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_403400
mov	edx, [ebp+var_8]
add	edx, 28h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+var_4]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	al, [edx+31h]
mov	[ecx+31h], al
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA660 endp

align 10h


; Attributes: bp-based frame

sub_5CA6E0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
mov	[ebp+var_34], edx
mov	eax, [ebp+var_38]
add	eax, 8
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_30]
cmp	dword ptr [ecx], 0
jz	short loc_5CA727
mov	edx, [ebp+var_30]
mov	ecx, [edx]
call	sub_40AA80

loc_5CA727:
mov	eax, [ebp+var_30]
add	eax, 4
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_34]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_594950
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA6E0 endp

align 10h


; Attributes: bp-based frame

sub_5CA750 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_38]
add	ecx, 4
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	edx, [ebp+var_30]
add	edx, 0Ch
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_2C]
call	sub_5AB190
mov	eax, [ebp+var_38]
mov	esp, ebp
pop	ebp
retn	4
sub_5CA750 endp

align 10h


; Attributes: bp-based frame

sub_5CA7C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 2
jge	short loc_5CA7D9
jmp	loc_5CA85A

loc_5CA7D9:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_5CA7F3:
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [edx+4]
mov	[ebp+var_14], ecx
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_8]
push	edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_C]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CB690
add	esp, 20h
cmp	[ebp+var_8], 0
jnz	short loc_5CA84F
jmp	short loc_5CA85A

loc_5CA84F:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_5CA7F3

loc_5CA85A:
mov	esp, ebp
pop	ebp
retn
sub_5CA7C0 endp

align 10h


; Attributes: bp-based frame

sub_5CA860 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 10h
mov	[ebp+var_4], ecx

loc_5CA873:
mov	edx, [ebp+var_4]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	[ebp+arg_14]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CA8B5
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_4]
sub	ecx, 10h
mov	[ebp+var_4], ecx
jmp	short loc_5CA873

loc_5CA8B5:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn
sub_5CA860 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CA8E0(void *, int)
sub_5CA8E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax		; void *
push	24h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CA939
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_4]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_403850
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+1Ch]
mov	[edx+1Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	cl, [eax+20h]
mov	[edx+20h], cl
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_5CA940

loc_5CA939:
mov	[ebp+var_8], 0

loc_5CA940:
mov	esp, ebp
pop	ebp
retn
sub_5CA8E0 endp

align 10h


; Attributes: bp-based frame

sub_5CA950 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
xor	eax, eax
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx], 0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5CB8A0
mov	eax, [ebp+var_34]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CA950 endp

align 10h


; Attributes: bp-based frame

sub_5CA9A0 proc	near

var_34=	dword ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_1D]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_1C]
call	sub_407D30
lea	ecx, [ebp+var_1C]
push	ecx
call	sub_5CC830
add	esp, 4
xor	edx, edx
div	[ebp+arg_4]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_1C]
call	sub_407910
lea	ecx, [ebp+var_1D]
call	nullsub_1
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5CA9A0 endp

align 10h


; Attributes: bp-based frame

sub_5CA9F0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
cdq
mov	ecx, 0C8h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5CAA34

loc_5CAA2B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5CAA34:
cmp	[ebp+var_10], 0
jle	short loc_5CAA63
mov	eax, [ebp+var_1C]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5CCFE0
add	esp, 8
mov	edx, [ebp+var_1C]
add	edx, 0C8h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
add	eax, 0C8h
mov	[ebp+var_C], eax
jmp	short loc_5CAA2B

loc_5CAA63:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CA9F0 endp

align 10h


; Attributes: bp-based frame

sub_5CAA70 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	0
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CB930
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5CAA70 endp

align 10h


; Attributes: bp-based frame

sub_5CAAA0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= byte ptr	 10h
arg_54=	dword ptr  5Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 50h
mov	[ebp+var_4], ecx

loc_5CAAB5:
sub	esp, 50h
mov	ecx, esp
mov	edx, [ebp+var_4]
push	edx
call	sub_5870E0
sub	esp, 50h
mov	ecx, esp
lea	eax, [ebp+arg_4]
push	eax
call	sub_5870E0
call	[ebp+arg_54]
add	esp, 0A0h
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_5CAB00
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_587150
mov	edx, [ebp+var_4]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
sub	eax, 50h
mov	[ebp+var_4], eax
jmp	short loc_5CAAB5

loc_5CAB00:
lea	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_587150
lea	ecx, [ebp+arg_8]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CAAA0 endp

align 10h


; Attributes: bp-based frame

sub_5CAB20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
sub	edx, [ebp+arg_0]
sar	edx, 3
mov	[ebp+var_8], edx
jmp	short loc_5CAB49

loc_5CAB40:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_5CAB49:
cmp	[ebp+var_8], 0
jle	short loc_5CABA9
mov	ecx, [ebp+var_C]
sub	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
sub	edx, 8
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_5CAB9B
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jz	short loc_5CAB7F
mov	ecx, [ebp+var_10]
mov	ecx, [ecx]
call	sub_40AA90

loc_5CAB7F:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_5CAB9B
mov	eax, [ebp+var_10]
mov	ecx, [eax]
call	sub_40AA80

loc_5CAB9B:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx+4], eax
jmp	short loc_5CAB40

loc_5CABA9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5CAB20 endp



; Attributes: bp-based frame

sub_5CABB0 proc	near

var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5B5720
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5CABB0 endp

align 10h


; Attributes: bp-based frame

sub_5CAC00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 4
mov	[ebp+var_4], ecx

loc_5CAC13:
mov	edx, [ebp+var_4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	[ebp+arg_8]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5CAC45
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_4]
sub	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_5CAC13

loc_5CAC45:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	esp, ebp
pop	ebp
retn
sub_5CAC00 endp

align 10h


; Attributes: bp-based frame

sub_5CAC60 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
push	0
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBC30
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5CAC60 endp

align 10h


; Attributes: bp-based frame

sub_5CAC90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_34=	dword ptr  3Ch
arg_38=	dword ptr  40h
arg_3C=	byte ptr  44h
arg_3D=	byte ptr  45h
arg_40=	dword ptr  48h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_4023E0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+arg_8]
mov	[ecx+28h], edx
mov	[ecx+2Ch], eax
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+31h]
mov	[edx+31h], cl
mov	edx, [ebp+arg_40]
push	edx
sub	esp, 34h
mov	[ebp+var_C], esp
lea	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C]
call	sub_403400
mov	ecx, [ebp+var_C]
add	ecx, 28h
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_34]
mov	eax, [ebp+arg_38]
mov	ecx, [ebp+var_8]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
mov	al, [ebp+arg_3C]
mov	[edx+30h], al
mov	ecx, [ebp+var_C]
mov	dl, [ebp+arg_3D]
mov	[ecx+31h], dl
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBCF0
add	esp, 44h
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CAC90 endp

align 10h


; Attributes: bp-based frame

sub_5CAD40 proc	near

var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CCB90
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5CAD40 endp

align 10h


; Attributes: bp-based frame

sub_5CAD90 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h
arg_34=	byte ptr  3Ch
arg_35=	byte ptr  3Dh
arg_38=	dword ptr  40h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 34h
mov	[ebp+var_4], ecx

loc_5CADA5:
sub	esp, 34h
mov	[ebp+var_14], esp
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_14]
call	sub_403400
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_10]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_4]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_4]
mov	cl, [eax+31h]
mov	[edx+31h], cl
sub	esp, 34h
mov	[ebp+var_1C], esp
lea	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_403400
mov	eax, [ebp+var_1C]
add	eax, 28h
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_2C]
mov	edx, [ebp+arg_30]
mov	eax, [ebp+var_18]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_1C]
mov	dl, [ebp+arg_34]
mov	[ecx+30h], dl
mov	eax, [ebp+var_1C]
mov	cl, [ebp+arg_35]
mov	[eax+31h], cl
call	[ebp+arg_38]
add	esp, 68h
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jz	short loc_5CAE7D
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_4023E0
mov	eax, [ebp+var_4]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+arg_0]
mov	[eax+28h], ecx
mov	[eax+2Ch], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	al, [edx+31h]
mov	[ecx+31h], al
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
sub	edx, 34h
mov	[ebp+var_4], edx
jmp	loc_5CADA5

loc_5CAE7D:
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4023E0
mov	ecx, [ebp+arg_2C]
mov	edx, [ebp+arg_30]
mov	eax, [ebp+arg_0]
mov	[eax+28h], ecx
mov	[eax+2Ch], edx
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+arg_34]
mov	[ecx+30h], dl
mov	eax, [ebp+arg_0]
mov	cl, [ebp+arg_35]
mov	[eax+31h], cl
lea	ecx, [ebp+arg_4]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CAD90 endp

align 10h


; Attributes: bp-based frame

sub_5CAEC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_14]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5CAF04

loc_5CAEFB:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5CAF04:
cmp	[ebp+var_C], 0
jle	short loc_5CAF2A
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_57FB00
mov	ecx, [ebp+var_14]
add	ecx, 5Ch
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
add	edx, 5Ch
mov	[ebp+var_18], edx
jmp	short loc_5CAEFB

loc_5CAF2A:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_5CAEC0 endp

align 10h


; Attributes: bp-based frame

sub_5CAF40 proc	near

var_48=	dword ptr -48h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_48], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_48]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5CAF84

loc_5CAF7B:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5CAF84:
cmp	[ebp+var_10], 0
jle	short loc_5CAFAE
mov	eax, [ebp+var_48]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_57FF60
add	esp, 8
mov	edx, [ebp+var_48]
add	edx, 5Ch
mov	[ebp+var_48], edx
mov	eax, [ebp+var_C]
add	eax, 5Ch
mov	[ebp+var_C], eax
jmp	short loc_5CAF7B

loc_5CAFAE:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CAF40 endp

align 10h


; Attributes: bp-based frame

sub_5CAFC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 4
cmp	eax, 2
jge	short loc_5CAFD9
jmp	loc_5CB05B

loc_5CAFD9:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_5CAFF3:
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [edx+4]
mov	[ebp+var_14], ecx
mov	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [edx+0Ch]
mov	[ebp+var_C], ecx
movzx	edx, [ebp+arg_8]
push	edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	[eax+4], edx
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_C]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CBFD0
add	esp, 20h
cmp	[ebp+var_8], 0
jnz	short loc_5CB050
jmp	short loc_5CB05B

loc_5CB050:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_5CAFF3

loc_5CB05B:
mov	esp, ebp
pop	ebp
retn
sub_5CAFC0 endp

align 10h


; Attributes: bp-based frame

sub_5CB060 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_12=	word ptr  1Ah

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 10h
mov	[ebp+var_4], ecx

loc_5CB073:
mov	edx, [ebp+var_4]
movzx	eax, word ptr [edx+0Eh]
movzx	ecx, [ebp+arg_12]
xor	edx, edx
cmp	ecx, eax
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5CB0B9
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
sub	eax, 10h
mov	[ebp+var_4], eax
jmp	short loc_5CB073

loc_5CB0B9:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+18h]
mov	[ecx+0Ch], eax
mov	esp, ebp
pop	ebp
retn
sub_5CB060 endp

align 10h


; Attributes: bp-based frame

sub_5CB0E0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	0
push	0
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC270
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5CB0E0 endp

align 10h


; Attributes: bp-based frame

sub_5CB110 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	byte ptr  18h
arg_38=	byte ptr  40h
arg_70=	byte ptr  78h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_5CA250
movzx	ecx, [ebp+arg_70]
push	ecx
sub	esp, 64h
mov	ecx, esp
lea	edx, [ebp+arg_C]
push	edx
call	sub_5BD5D0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC2F0
add	esp, 74h
lea	ecx, [ebp+arg_38]
call	sub_407E50
lea	ecx, [ebp+arg_10]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CB110 endp

align 10h


; Attributes: bp-based frame

sub_5CB170 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= byte ptr	 10h
arg_30=	byte ptr  38h
arg_64=	dword ptr  6Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 64h
mov	[ebp+var_4], ecx

loc_5CB183:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_64]
xor	ecx, ecx
cmp	eax, [edx+60h]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5CB1B5
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_5CA250
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
sub	edx, 64h
mov	[ebp+var_4], edx
jmp	short loc_5CB183

loc_5CB1B5:
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_5CA250
lea	ecx, [ebp+arg_30]
call	sub_407E50
lea	ecx, [ebp+arg_8]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CB170 endp

align 10h


; Attributes: bp-based frame

sub_5CB1E0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
push	0
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC4F0
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5CB1E0 endp

align 10h


; Attributes: bp-based frame

sub_5CB210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 8
mov	[ebp+var_4], ecx

loc_5CB223:
mov	edx, [ebp+var_4]
push	edx
lea	eax, [ebp+arg_4]
push	eax
call	[ebp+arg_C]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CB259
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+arg_0]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_4]
sub	ecx, 8
mov	[ebp+var_4], ecx
jmp	short loc_5CB223

loc_5CB259:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	esp, ebp
pop	ebp
retn
sub_5CB210 endp

align 10h


; Attributes: bp-based frame

sub_5CB270 proc	near

var_68=	dword ptr -68h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
call	sub_409A10
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_68]
call	sub_402EB0
mov	ecx, [ebp+var_68]
call	sub_5CC6E0
mov	eax, [ebp+var_68]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CB270 endp

align 10h


; Attributes: bp-based frame

sub_5CB2C0 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_5CC730
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_5CB610
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_59BCA0
mov	esp, ebp
pop	ebp
retn	10h
sub_5CB2C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CB330(void *, int)
sub_5CB330 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	38h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CB39F
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	edx, [edx+4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_403400
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx
jmp	short loc_5CB3A6

loc_5CB39F:
mov	[ebp+var_10], 0

loc_5CB3A6:
mov	esp, ebp
pop	ebp
retn
sub_5CB330 endp

align 10h


; Attributes: bp-based frame

sub_5CB3B0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
jmp	short loc_5CB3C3

loc_5CB3BB:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_5CB3C3:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+arg_4]
call	sub_409650
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CB442
lea	eax, [ebp+arg_4]
call	sub_4028D0
mov	[ebp+var_20], eax
lea	edx, [ebp+var_1C]
mov	[ebp+var_C], edx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_24]
call	sub_439D80
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_10]
mov	[eax+4], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	[ecx+4], edx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	loc_5CB3BB

loc_5CB442:
mov	esp, ebp
pop	ebp
retn	10h
sub_5CB3B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CB450(void *, int)
sub_5CB450 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CB499
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403400
mov	edx, [ebp+var_4]
add	edx, 28h
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AB5E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_34], ecx
jmp	short loc_5CB4A0

loc_5CB499:
mov	[ebp+var_34], 0

loc_5CB4A0:
mov	esp, ebp
pop	ebp
retn
sub_5CB450 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CB4B0(void *, int)
sub_5CB4B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CB4F9
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403400
mov	edx, [ebp+var_4]
add	edx, 28h
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
add	eax, 28h
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AB6E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_34], ecx
jmp	short loc_5CB500

loc_5CB4F9:
mov	[ebp+var_34], 0

loc_5CB500:
mov	esp, ebp
pop	ebp
retn
sub_5CB4B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CB510(void *, int)
sub_5CB510 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CB559
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+var_4]
add	edx, 18h
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_30]
call	sub_5AB7E0
mov	ecx, [ebp+var_4]
mov	[ebp+var_34], ecx
jmp	short loc_5CB560

loc_5CB559:
mov	[ebp+var_34], 0

loc_5CB560:
mov	esp, ebp
pop	ebp
retn
sub_5CB510 endp

align 10h


; Attributes: bp-based frame

sub_5CB570 proc	near

var_88=	dword ptr -88h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_88], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_5CC790
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CB570 endp

align 10h


; Attributes: bp-based frame

sub_5CB5C0 proc	near

var_84=	dword ptr -84h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_84]
call	sub_5CC7E0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CB5C0 endp

align 10h


; Attributes: bp-based frame

sub_5CB610 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_5CB637
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_5CB680

loc_5CB637:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_5C5CE0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_59BCA0

loc_5CB680:
mov	esp, ebp
pop	ebp
retn	8
sub_5CB610 endp

align 10h


; Attributes: bp-based frame

sub_5CB690 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5CB6A6:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_5CB715
mov	ecx, [ebp+var_8]
sub	ecx, 1
shl	ecx, 4
add	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+arg_0]
push	edx
call	[ebp+arg_1C]
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5CB6DB
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx

loc_5CB6DB:
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_5CB6A6

loc_5CB715:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_5CB751
mov	ecx, [ebp+var_8]
sub	ecx, 1
shl	ecx, 4
add	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_5CB751:
mov	eax, [ebp+arg_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_10]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_14]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_18]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_5CB77D:
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_4]
jle	short loc_5CB7DE
lea	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_C]
shl	ecx, 4
add	ecx, [ebp+arg_0]
push	ecx
call	[ebp+arg_1C]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5CB7DE
mov	eax, [ebp+var_C]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
shl	ecx, 4
add	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_5CB77D

loc_5CB7DE:
mov	edx, [ebp+var_10]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn
sub_5CB690 endp

align 10h


; Attributes: bp-based frame

sub_5CB810 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
sub	eax, 10h
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_8]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_10]
mov	[edx], eax
mov	ecx, [ebp+var_C]
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_4]
sub	edx, 10h
sub	edx, [ebp+arg_0]
sar	edx, 4
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CB690
add	esp, 20h
mov	esp, ebp
pop	ebp
retn
sub_5CB810 endp

align 10h


; Attributes: bp-based frame

sub_5CB8A0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx

loc_5CB8BA:
mov	eax, [ebp+var_24]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5CB91B
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_8], eax
push	1
mov	ecx, [ebp+var_28]
call	sub_510570
mov	[ebp+var_C], eax
mov	edx, [ebp+var_C]
add	edx, 4
mov	eax, [ebp+var_8]
call	sub_409EC0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_24], eax
jmp	short loc_5CB8BA

loc_5CB91B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CB8A0 endp

align 10h


; Attributes: bp-based frame

sub_5CB930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
cmp	eax, 2
jge	short loc_5CB94B
jmp	short loc_5CB9A9

loc_5CB94B:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_5CB96A:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
imul	eax, 50h
add	eax, [ebp+arg_0]
sub	esp, 50h
mov	ecx, esp
push	eax
call	sub_5870E0
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CB9B0
add	esp, 60h
cmp	[ebp+var_8], 0
jnz	short loc_5CB99E
jmp	short loc_5CB9A9

loc_5CB99E:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_5CB96A

loc_5CB9A9:
mov	esp, ebp
pop	ebp
retn
sub_5CB930 endp

align 10h


; Attributes: bp-based frame

sub_5CB9B0 proc	near

var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	byte ptr  18h
arg_5C=	dword ptr  64h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5CB9C6:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_5CBA40
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 50h
add	ecx, [ebp+arg_0]
sub	esp, 50h
mov	edx, esp
push	ecx
mov	ecx, edx
call	sub_5870E0
mov	eax, [ebp+var_8]
imul	eax, 50h
add	eax, [ebp+arg_0]
sub	esp, 50h
mov	ecx, esp
push	eax
call	sub_5870E0
call	[ebp+arg_5C]
add	esp, 0A0h
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jz	short loc_5CBA16
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx

loc_5CBA16:
mov	edx, [ebp+var_8]
imul	edx, 50h
add	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+arg_4]
imul	ecx, 50h
add	ecx, [ebp+arg_0]
call	sub_587150
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_5CB9C6

loc_5CBA40:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_5CBA6C
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 50h
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+arg_4]
imul	ecx, 50h
add	ecx, [ebp+arg_0]
call	sub_587150
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_5CBA6C:
mov	eax, [ebp+arg_5C]
push	eax
sub	esp, 50h
mov	ecx, esp
lea	edx, [ebp+arg_C]
push	edx
call	sub_5870E0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC890
add	esp, 60h
lea	ecx, [ebp+arg_10]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CB9B0 endp

align 10h


; Attributes: bp-based frame

sub_5CBAA0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC930
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5CBAA0 endp



; Attributes: bp-based frame

sub_5CBAC0 proc	near

var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_50]
call	sub_5870E0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_587150
lea	edx, [ebp+var_50]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_587150
lea	ecx, [ebp+var_4C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CBAC0 endp

align 10h


; Attributes: bp-based frame

sub_5CBB00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5CBB44

loc_5CBB3B:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5CBB44:
cmp	[ebp+var_C], 0
jle	short loc_5CBB6A
mov	eax, [ebp+var_10]
sub	eax, 50h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
sub	ecx, 50h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_14]
call	sub_587150
jmp	short loc_5CBB3B

loc_5CBB6A:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5CBB00 endp

align 10h


; Attributes: bp-based frame

sub_5CBB80 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5B5720
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5CBB80 endp

align 10h


; Attributes: bp-based frame

sub_5CBBC0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_1C]
sar	eax, 3
mov	[ebp+var_10], eax
jmp	short loc_5CBBFF

loc_5CBBF6:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_5CBBFF:
cmp	[ebp+var_10], 0
jle	short loc_5CBC29
mov	edx, [ebp+var_1C]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5A7520
add	esp, 8
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx
jmp	short loc_5CBBF6

loc_5CBC29:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CBBC0 endp



; Attributes: bp-based frame

sub_5CBC30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, 2
jge	short loc_5CBC4E
jmp	loc_5CBCE8

loc_5CBC4E:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_5CBC6D:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
imul	eax, 34h
add	eax, [ebp+arg_0]
mov	[ebp+var_18], eax
sub	esp, 34h
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403400
mov	edx, [ebp+var_14]
add	edx, 28h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+var_10]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_18]
mov	al, [edx+31h]
mov	[ecx+31h], al
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CBCF0
add	esp, 44h
cmp	[ebp+var_8], 0
jnz	short loc_5CBCDD
jmp	short loc_5CBCE8

loc_5CBCDD:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_5CBC6D

loc_5CBCE8:
mov	esp, ebp
pop	ebp
retn
sub_5CBC30 endp

align 10h


; Attributes: bp-based frame

sub_5CBCF0 proc	near

var_68=	dword ptr -68h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_34=	dword ptr  3Ch
arg_38=	dword ptr  40h
arg_3C=	byte ptr  44h
arg_3D=	byte ptr  45h
arg_40=	dword ptr  48h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5CBD06:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	loc_5CBE30
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 34h
add	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx
sub	esp, 34h
mov	[ebp+var_1C], esp
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_403400
mov	eax, [ebp+var_1C]
add	eax, 28h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_18]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_20]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_20]
mov	cl, [eax+31h]
mov	[edx+31h], cl
mov	edx, [ebp+var_8]
imul	edx, 34h
add	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx
sub	esp, 34h
mov	[ebp+var_28], esp
mov	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_28]
call	sub_403400
mov	ecx, [ebp+var_28]
add	ecx, 28h
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_24]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_2C]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_2C]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
call	[ebp+arg_40]
add	esp, 68h
mov	[ebp+var_68], eax
cmp	[ebp+var_68], 0
jz	short loc_5CBDCD
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_5CBDCD:
mov	ecx, [ebp+var_8]
imul	ecx, 34h
add	ecx, [ebp+arg_0]
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
imul	edx, 34h
add	edx, [ebp+arg_0]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_30]
call	sub_4023E0
mov	ecx, [ebp+var_34]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_30]
mov	[ecx+28h], edx
mov	[ecx+2Ch], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	cl, [eax+31h]
mov	[edx+31h], cl
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_8]
lea	ecx, [eax+eax+2]
mov	[ebp+var_8], ecx
jmp	loc_5CBD06

loc_5CBE30:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jnz	short loc_5CBE92
mov	eax, [ebp+var_8]
sub	eax, 1
imul	eax, 34h
add	eax, [ebp+arg_0]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 34h
add	ecx, [ebp+arg_0]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_38]
call	sub_4023E0
mov	eax, [ebp+var_3C]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+var_38]
mov	[eax+28h], ecx
mov	[eax+2Ch], edx
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_3C]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_3C]
mov	al, [edx+31h]
mov	[ecx+31h], al
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+arg_4], ecx

loc_5CBE92:
mov	edx, [ebp+arg_40]
push	edx
sub	esp, 34h
mov	[ebp+var_44], esp
lea	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_44]
call	sub_403400
mov	ecx, [ebp+var_44]
add	ecx, 28h
mov	[ebp+var_40], ecx
mov	edx, [ebp+arg_34]
mov	eax, [ebp+arg_38]
mov	ecx, [ebp+var_40]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_44]
mov	al, [ebp+arg_3C]
mov	[edx+30h], al
mov	ecx, [ebp+var_44]
mov	dl, [ebp+arg_3D]
mov	[ecx+31h], dl
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC9A0
add	esp, 44h
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CBCF0 endp

align 10h


; Attributes: bp-based frame

sub_5CBF00 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CCB10
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5CBF00 endp



; Attributes: bp-based frame

sub_5CBF20 proc	near

var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_34]
call	sub_403400
lea	ecx, [ebp+var_C]
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_38]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+arg_0]
mov	cl, [eax+30h]
mov	[ebp+var_4], cl
mov	edx, [ebp+arg_0]
mov	al, [edx+31h]
mov	[ebp+var_3], al
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_4023E0
mov	edx, [ebp+arg_4]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+arg_0]
mov	[edx+28h], eax
mov	[edx+2Ch], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_4023E0
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[eax+28h], ecx
mov	[eax+2Ch], edx
mov	ecx, [ebp+arg_4]
mov	dl, [ebp+var_4]
mov	[ecx+30h], dl
mov	eax, [ebp+arg_4]
mov	cl, [ebp+var_3]
mov	[eax+31h], cl
lea	ecx, [ebp+var_34]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CBF20 endp

align 10h


; Attributes: bp-based frame

sub_5CBFD0 proc	near

var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5CBFE6:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_5CC05E
mov	ecx, [ebp+var_8]
sub	ecx, 1
shl	ecx, 4
mov	edx, [ebp+arg_0]
movzx	eax, word ptr [edx+ecx+0Eh]
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_0]
movzx	ecx, word ptr [edx+ecx+0Eh]
xor	edx, edx
cmp	ecx, eax
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5CC024
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx

loc_5CC024:
mov	edx, [ebp+var_8]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_8]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx
jmp	short loc_5CBFE6

loc_5CC05E:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jnz	short loc_5CC09A
mov	ecx, [ebp+var_8]
sub	ecx, 1
shl	ecx, 4
add	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_5CC09A:
mov	al, [ebp+arg_1C]
mov	[ebp+var_21], al
mov	ecx, [ebp+arg_C]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_14]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_18]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax

loc_5CC0CC:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_4]
jle	short loc_5CC132
movzx	ecx, word ptr [ebp+var_14+2]
mov	edx, [ebp+var_C]
shl	edx, 4
mov	eax, [ebp+arg_0]
movzx	edx, word ptr [eax+edx+0Eh]
xor	eax, eax
cmp	edx, ecx
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CC132
mov	edx, [ebp+var_C]
shl	edx, 4
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_10]
shl	eax, 4
add	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_C], eax
jmp	short loc_5CC0CC

loc_5CC132:
mov	ecx, [ebp+var_10]
shl	ecx, 4
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	[ecx+4], eax
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	[ecx+0Ch], eax
mov	esp, ebp
pop	ebp
retn
sub_5CBFD0 endp

align 10h


; Attributes: bp-based frame

sub_5CC160 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
sub	eax, 10h
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
sub	ecx, 10h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
movzx	ecx, [ebp+arg_8]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_10]
mov	[edx], eax
mov	ecx, [ebp+var_C]
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_4]
sub	edx, 10h
sub	edx, [ebp+arg_0]
sar	edx, 4
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CBFD0
add	esp, 20h
mov	esp, ebp
pop	ebp
retn
sub_5CC160 endp

align 10h


; Attributes: bp-based frame

sub_5CC1F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 68h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5CC234

loc_5CC22B:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5CC234:
cmp	[ebp+var_C], 0
jle	short loc_5CC25A
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5C6760
mov	ecx, [ebp+var_10]
add	ecx, 68h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 68h
mov	[ebp+var_14], edx
jmp	short loc_5CC22B

loc_5CC25A:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5CC1F0 endp

align 10h


; Attributes: bp-based frame

sub_5CC270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
cmp	eax, 2
jge	short loc_5CC28B
jmp	short loc_5CC2EA

loc_5CC28B:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_5CC2AA:
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
imul	eax, 64h
add	eax, [ebp+arg_0]
sub	esp, 64h
mov	ecx, esp
push	eax
call	sub_5BD5D0
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CC2F0
add	esp, 74h
cmp	[ebp+var_8], 0
jnz	short loc_5CC2DF
jmp	short loc_5CC2EA

loc_5CC2DF:
mov	ecx, [ebp+var_8]
sub	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_5CC2AA

loc_5CC2EA:
mov	esp, ebp
pop	ebp
retn
sub_5CC270 endp

align 10h


; Attributes: bp-based frame

sub_5CC2F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	byte ptr  18h
arg_38=	byte ptr  40h
arg_70=	byte ptr  78h

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5CC307:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_5CC36B
mov	ecx, [ebp+var_8]
sub	ecx, 1
imul	ecx, 64h
mov	edx, [ebp+var_8]
imul	edx, 64h
mov	eax, [ebp+arg_0]
mov	esi, [ebp+arg_0]
mov	edx, [eax+edx+60h]
xor	eax, eax
cmp	edx, [esi+ecx+60h]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CC341
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5CC341:
mov	eax, [ebp+var_8]
imul	eax, 64h
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_4]
imul	ecx, 64h
add	ecx, [ebp+arg_0]
call	sub_5CA250
mov	ecx, [ebp+var_8]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+var_8]
lea	eax, [edx+edx+2]
mov	[ebp+var_8], eax
jmp	short loc_5CC307

loc_5CC36B:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jnz	short loc_5CC397
mov	edx, [ebp+var_8]
sub	edx, 1
imul	edx, 64h
add	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+arg_4]
imul	ecx, 64h
add	ecx, [ebp+arg_0]
call	sub_5CA250
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_5CC397:
movzx	ecx, [ebp+arg_70]
push	ecx
sub	esp, 64h
mov	ecx, esp
lea	edx, [ebp+arg_C]
push	edx
call	sub_5BD5D0
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CCC20
add	esp, 74h
lea	ecx, [ebp+arg_38]
call	sub_407E50
lea	ecx, [ebp+arg_10]
call	sub_407E50
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5CC2F0 endp

align 10h


; Attributes: bp-based frame

sub_5CC3E0 proc	near

var_9= byte ptr	-9
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	al, [ebp+arg_8]
mov	[ebp+var_9], al
push	0
movzx	ecx, [ebp+var_9]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, 64h
sub	esp, 64h
mov	ecx, esp
push	edx
call	sub_5BD5D0
mov	eax, [ebp+arg_4]
sub	eax, 64h
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 64h
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CB110
add	esp, 78h
mov	esp, ebp
pop	ebp
retn
sub_5CC3E0 endp

align 10h


; Attributes: bp-based frame

sub_5CC430 proc	near

var_68=	byte ptr -68h
var_64=	byte ptr -64h
var_3C=	byte ptr -3Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_68]
call	sub_5BD5D0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_5CA250
lea	edx, [ebp+var_68]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_5CA250
lea	ecx, [ebp+var_3C]
call	sub_407E50
lea	ecx, [ebp+var_64]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CC430 endp

align 10h


; Attributes: bp-based frame

sub_5CC470 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5CC4B4

loc_5CC4AB:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5CC4B4:
cmp	[ebp+var_C], 0
jle	short loc_5CC4DA
mov	eax, [ebp+var_10]
sub	eax, 64h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
sub	ecx, 64h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_14]
call	sub_5CA250
jmp	short loc_5CC4AB

loc_5CC4DA:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5CC470 endp

align 10h


; Attributes: bp-based frame

sub_5CC4F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
sar	eax, 3
cmp	eax, 2
jge	short loc_5CC506
jmp	short loc_5CC573

loc_5CC506:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 3
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
sub	eax, 2
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_8], eax

loc_5CC520:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*8]
mov	[ebp+var_14], edx
sub	esp, 8
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CC580
add	esp, 18h
cmp	[ebp+var_8], 0
jnz	short loc_5CC568
jmp	short loc_5CC573

loc_5CC568:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_5CC520

loc_5CC573:
mov	esp, ebp
pop	ebp
retn
sub_5CC4F0 endp

align 10h


; Attributes: bp-based frame

sub_5CC580 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
lea	edx, [ecx+ecx+2]
mov	[ebp+var_8], edx

loc_5CC597:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_5CC5F6
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*8-8]
push	eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*8]
push	eax
call	[ebp+arg_14]
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CC5CA
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5CC5CA:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	ecx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+ecx*8], edx
mov	[esi+ecx*8+4], eax
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_8]
lea	ecx, [eax+eax+2]
mov	[ebp+var_8], ecx
jmp	short loc_5CC597

loc_5CC5F6:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jnz	short loc_5CC622
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8-8]
mov	eax, [ecx+eax*8-4]
mov	ecx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
mov	[esi+ecx*8], edx
mov	[esi+ecx*8+4], eax
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+arg_4], edx

loc_5CC622:
lea	eax, [ebp+var_1C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_10]
mov	[eax+4], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_14], eax

loc_5CC64D:
mov	eax, [ebp+var_20]
cmp	eax, [ebp+var_4]
jle	short loc_5CC6A0
lea	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*8]
push	ecx
call	[ebp+arg_14]
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5CC6A0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	ecx, [ebp+var_20]
mov	esi, [ebp+arg_0]
mov	[esi+ecx*8], edx
mov	[esi+ecx*8+4], eax
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_14], eax
jmp	short loc_5CC64D

loc_5CC6A0:
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_1C]
mov	[ecx+eax*8], edx
mov	edx, [ebp+var_18]
mov	[ecx+eax*8+4], edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5CC580 endp

align 10h


; Attributes: bp-based frame

sub_5CC6C0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CCCB0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5CC6C0 endp



; Attributes: bp-based frame

sub_5CC6E0 proc	near

var_48=	dword ptr -48h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
mov	ecx, [ebp+var_48]
call	sub_5CCD30
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CC6E0 endp

align 10h


; Attributes: bp-based frame

sub_5CC730 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_5CCDD0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CC730 endp

align 10h


; Attributes: bp-based frame

sub_5CC790 proc	near

var_6C=	dword ptr -6Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
mov	[ebp+var_6C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_6C]
call	sub_5CCE80
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CC790 endp

align 10h


; Attributes: bp-based frame

sub_5CC7E0 proc	near

var_74=	dword ptr -74h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_5CCEF0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CC7E0 endp

align 10h


; Attributes: bp-based frame

sub_5CC830 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], 0
mov	ecx, [ebp+arg_0]
call	sub_4042A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
call	sub_5F52F0
mov	[ebp+var_8], eax
mov	[ebp+var_10], 0
jmp	short loc_5CC865

loc_5CC85C:
mov	eax, [ebp+var_10]
add	eax, 1
mov	[ebp+var_10], eax

loc_5CC865:
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_4]
jnb	short loc_5CC886
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_C]
lea	ecx, [eax+edx*4]
mov	edx, [ebp+var_8]
add	edx, [ebp+var_10]
movzx	eax, byte ptr [edx]
add	ecx, eax
mov	[ebp+var_C], ecx
jmp	short loc_5CC85C

loc_5CC886:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CC830 endp

align 10h


; Attributes: bp-based frame

sub_5CC890 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	byte ptr  18h
arg_5C=	dword ptr  64h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_5CC8A4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_5CC90E
sub	esp, 50h
mov	ecx, esp
lea	edx, [ebp+arg_C]
push	edx
call	sub_5870E0
mov	eax, [ebp+var_4]
imul	eax, 50h
add	eax, [ebp+arg_0]
sub	esp, 50h
mov	ecx, esp
push	eax
call	sub_5870E0
call	[ebp+arg_5C]
add	esp, 0A0h
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_5CC90E
mov	ecx, [ebp+var_4]
imul	ecx, 50h
add	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+arg_4]
imul	ecx, 50h
add	ecx, [ebp+arg_0]
call	sub_587150
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5CC8A4

loc_5CC90E:
lea	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_4]
imul	ecx, 50h
add	ecx, [ebp+arg_0]
call	sub_587150
lea	ecx, [ebp+arg_10]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CC890 endp

align 10h


; Attributes: bp-based frame

sub_5CC930 proc	near

var_58=	byte ptr -58h
var_54=	byte ptr -54h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	eax, [ebp+arg_4]
sub	eax, 50h
push	eax
lea	ecx, [ebp+var_58]
call	sub_5870E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+arg_4]
sub	ecx, 50h
call	sub_587150
mov	edx, [ebp+arg_C]
push	edx
sub	esp, 50h
mov	ecx, esp
lea	eax, [ebp+var_58]
push	eax
call	sub_5870E0
mov	eax, [ebp+arg_4]
sub	eax, 50h
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 50h
idiv	ecx
push	eax
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_5CB9B0
add	esp, 60h
lea	ecx, [ebp+var_54]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CC930 endp

align 10h


; Attributes: bp-based frame

sub_5CC9A0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_34=	dword ptr  3Ch
arg_38=	dword ptr  40h
arg_3C=	byte ptr  44h
arg_3D=	byte ptr  45h
arg_40=	dword ptr  48h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_5CC9B4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	loc_5CCAC1
sub	esp, 34h
mov	[ebp+var_14], esp
lea	ecx, [ebp+arg_C]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403400
mov	edx, [ebp+var_14]
add	edx, 28h
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_34]
mov	ecx, [ebp+arg_38]
mov	edx, [ebp+var_10]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_14]
mov	cl, [ebp+arg_3C]
mov	[eax+30h], cl
mov	edx, [ebp+var_14]
mov	al, [ebp+arg_3D]
mov	[edx+31h], al
mov	ecx, [ebp+var_4]
imul	ecx, 34h
add	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx
sub	esp, 34h
mov	[ebp+var_1C], esp
mov	edx, [ebp+var_20]
push	edx
mov	ecx, [ebp+var_1C]
call	sub_403400
mov	eax, [ebp+var_1C]
add	eax, 28h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_18]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_20]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_20]
mov	cl, [eax+31h]
mov	[edx+31h], cl
call	[ebp+arg_40]
add	esp, 68h
mov	[ebp+var_30], eax
cmp	[ebp+var_30], 0
jz	short loc_5CCAC1
mov	edx, [ebp+var_4]
imul	edx, 34h
add	edx, [ebp+arg_0]
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_4]
imul	eax, 34h
add	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_4023E0
mov	edx, [ebp+var_28]
mov	eax, [edx+28h]
mov	ecx, [edx+2Ch]
mov	edx, [ebp+var_24]
mov	[edx+28h], eax
mov	[edx+2Ch], ecx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_28]
mov	dl, [ecx+30h]
mov	[eax+30h], dl
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_28]
mov	dl, [ecx+31h]
mov	[eax+31h], dl
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	loc_5CC9B4

loc_5CCAC1:
mov	ecx, [ebp+arg_4]
imul	ecx, 34h
add	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
lea	edx, [ebp+arg_C]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_4023E0
mov	eax, [ebp+arg_34]
mov	ecx, [ebp+arg_38]
mov	edx, [ebp+var_2C]
mov	[edx+28h], eax
mov	[edx+2Ch], ecx
mov	eax, [ebp+var_2C]
mov	cl, [ebp+arg_3C]
mov	[eax+30h], cl
mov	edx, [ebp+var_2C]
mov	al, [ebp+arg_3D]
mov	[edx+31h], al
lea	ecx, [ebp+arg_C]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CC9A0 endp

align 10h


; Attributes: bp-based frame

sub_5CCB10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	0
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_4]
sub	ecx, 34h
mov	[ebp+var_10], ecx
sub	esp, 34h
mov	[ebp+var_C], esp
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_C]
call	sub_403400
mov	eax, [ebp+var_C]
add	eax, 28h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+28h]
mov	eax, [ecx+2Ch]
mov	ecx, [ebp+var_8]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	cl, [eax+30h]
mov	[edx+30h], cl
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
mov	cl, [eax+31h]
mov	[edx+31h], cl
mov	edx, [ebp+arg_4]
sub	edx, 34h
push	edx
mov	eax, [ebp+arg_4]
sub	eax, 34h
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5CAC90
add	esp, 48h
mov	esp, ebp
pop	ebp
retn
sub_5CCB10 endp

align 10h


; Attributes: bp-based frame

sub_5CCB90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5CCBBE

loc_5CCBB5:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5CCBBE:
cmp	[ebp+var_8], 0
jle	short loc_5CCC0E
mov	eax, [ebp+var_C]
sub	eax, 34h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
sub	ecx, 34h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_10]
call	sub_4023E0
mov	eax, [ebp+var_C]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
mov	eax, [ebp+var_10]
mov	[eax+28h], ecx
mov	[eax+2Ch], edx
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	al, [edx+30h]
mov	[ecx+30h], al
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	al, [edx+31h]
mov	[ecx+31h], al
jmp	short loc_5CCBB5

loc_5CCC0E:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5CCB90 endp

align 10h


; Attributes: bp-based frame

sub_5CCC20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	byte ptr  18h
arg_38=	byte ptr  40h
arg_6C=	dword ptr  74h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax

loc_5CCC32:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jle	short loc_5CCC84
mov	ecx, [ebp+var_4]
imul	ecx, 64h
mov	edx, [ebp+arg_0]
mov	eax, [edx+ecx+60h]
xor	ecx, ecx
cmp	eax, [ebp+arg_6C]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5CCC84
mov	eax, [ebp+var_4]
imul	eax, 64h
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_4]
imul	ecx, 64h
add	ecx, [ebp+arg_0]
call	sub_5CA250
mov	ecx, [ebp+var_4]
mov	[ebp+arg_4], ecx
mov	eax, [ebp+arg_4]
sub	eax, 1
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
jmp	short loc_5CCC32

loc_5CCC84:
lea	edx, [ebp+arg_C]
push	edx
mov	ecx, [ebp+arg_4]
imul	ecx, 64h
add	ecx, [ebp+arg_0]
call	sub_5CA250
lea	ecx, [ebp+arg_38]
call	sub_407E50
lea	ecx, [ebp+arg_10]
call	sub_407E50
mov	esp, ebp
pop	ebp
retn
sub_5CCC20 endp

align 10h


; Attributes: bp-based frame

sub_5CCCB0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
sub	eax, 8
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_1C]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+arg_4]
mov	[edx-8], eax
mov	[edx-4], ecx
mov	eax, [ebp+arg_C]
push	eax
sub	esp, 8
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_1C]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	[eax+4], ecx
mov	edx, [ebp+arg_4]
sub	edx, 8
sub	edx, [ebp+arg_0]
sar	edx, 3
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_5CC580
add	esp, 18h
mov	esp, ebp
pop	ebp
retn
sub_5CCCB0 endp

align 10h


; Attributes: bp-based frame

sub_5CCD30 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
jmp	short loc_5CCD43

loc_5CCD3B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_5CCD43:
lea	eax, [ebp+var_10]
lea	ecx, [ebp+arg_8]
call	sub_402EB0
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5CCDCA
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_28]
mov	[ebp+var_18], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_18]
call	sub_4046E0
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_439D80
mov	[ebp+var_24], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_1C]
mov	[edx+4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	[eax+4], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_C]
call	sub_4046E0
jmp	loc_5CCD3B

loc_5CCDCA:
mov	esp, ebp
pop	ebp
retn	10h
sub_5CCD30 endp



; Attributes: bp-based frame

sub_5CCDD0 proc	near

var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_58]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
lea	edx, [ebp+var_5C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_60], eax

loc_5CCE0C:
lea	ecx, [ebp+var_2C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_5C]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
mov	[ebp+var_65], al
movzx	ecx, [ebp+var_65]
test	ecx, ecx
jz	short loc_5CCE70
mov	edx, [ebp+var_5C]
add	edx, 4
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_64]
call	sub_5AB4A0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_60]
mov	edx, [ebp+var_54]
mov	[ecx], edx
mov	eax, [ebp+var_54]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
jmp	short loc_5CCE0C

loc_5CCE70:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CCDD0 endp

align 10h


; Attributes: bp-based frame

sub_5CCE80 proc	near

var_68=	dword ptr -68h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_52CB90
call	nullsub_1
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_68]
call	sub_5CA460
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_50BAC0
mov	esp, ebp
pop	ebp
retn	10h
sub_5CCE80 endp

align 10h


; Attributes: bp-based frame

sub_5CCEF0 proc	near

var_70=	dword ptr -70h
var_40=	dword ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_5]
push	eax
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	[edx], eax
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_4]
call	sub_5CD040
lea	ecx, [ebp+var_4]
push	ecx
push	ecx
mov	[ebp+var_40], esp
mov	edx, [ebp+var_40]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_70]
call	sub_5CCF60
push	0
lea	ecx, [ebp+var_4]
push	ecx
lea	ecx, [ebp+var_4]
call	sub_59DF80
mov	esp, ebp
pop	ebp
retn	10h
sub_5CCEF0 endp

align 10h


; Attributes: bp-based frame

sub_5CCF60 proc	near

var_5C=	dword ptr -5Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	[ebp+var_1], 1
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_5CCF87
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E910
add	esp, 8
jmp	short loc_5CCFD0

loc_5CCF87:
push	ecx
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	ecx, [ebp+var_5C]
call	sub_5CB5C0
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_59DF80

loc_5CCFD0:
mov	esp, ebp
pop	ebp
retn	8
sub_5CCF60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5CCFE0(void *, int)
sub_5CCFE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0C8h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CD027
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5CD0F0
mov	[ebp+var_C], eax
jmp	short loc_5CD02E

loc_5CD027:
mov	[ebp+var_C], 0

loc_5CD02E:
mov	esp, ebp
pop	ebp
retn
sub_5CCFE0 endp

align 10h


; Attributes: bp-based frame

sub_5CD040 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
xor	eax, eax
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx], 0
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	[ebp+var_24], esp
mov	edx, [ebp+arg_0]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_20]
mov	[eax], ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+var_64]
call	sub_5CD0A0
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CD040 endp

align 10h


; Attributes: bp-based frame

sub_5CD0A0 proc	near

var_4C=	dword ptr -4Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4C], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_5CD1B0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CD0A0 endp

align 10h


; Attributes: bp-based frame

sub_5CD0F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 38h
call	sub_403400
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+60h]
mov	[eax+60h], edx
mov	ecx, [ecx+64h]
mov	[eax+64h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
mov	[edx+68h], ecx
mov	eax, [eax+6Ch]
mov	[edx+6Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 70h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 70h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 98h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 98h
call	sub_10111B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0C0h]
mov	[eax+0C0h], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CD0F0 endp

align 10h


; Attributes: bp-based frame

sub_5CD1B0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx

loc_5CD1B9:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_5CD237
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+var_14], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526980
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx		; int
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; void *
call	sub_5C9FC0
add	esp, 8
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+arg_4], eax
jmp	short loc_5CD1B9

loc_5CD237:
mov	esp, ebp
pop	ebp
retn	10h
sub_5CD1B0 endp

align 10h



sub_5CD240 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+4Ch]
sub_5CD240 endp

align 10h



sub_5CD250 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+5Ch]
sub_5CD250 endp

align 10h



sub_5CD260 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+9Ch]
sub_5CD260 endp

align 10h



sub_5CD270 proc	near
sub	ecx, 0B4h
jmp	sub_58CEF0
sub_5CD270 endp

align 10h



sub_5CD280 proc	near
sub	ecx, 10h
jmp	sub_585DE0
sub_5CD280 endp

align 10h



sub_5CD290 proc	near
sub	ecx, 48h
jmp	sub_58BC10
sub_5CD290 endp

align 10h



sub_5CD2A0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+50h]
sub_5CD2A0 endp

align 10h



sub_5CD2B0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+60h]
sub_5CD2B0 endp

align 10h



sub_5CD2C0 proc	near
sub	ecx, 44h
jmp	sub_58ACF0
sub_5CD2C0 endp

align 10h



sub_5CD2D0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+0A0h]
sub_5CD2D0 endp

align 10h



sub_5CD2E0 proc	near
sub	ecx, 10h
jmp	sub_58E000
sub_5CD2E0 endp

align 10h



sub_5CD2F0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+54h]
sub_5CD2F0 endp

align 10h



sub_5CD300 proc	near
sub	ecx, 48h
jmp	sub_586390
sub_5CD300 endp

align 10h



sub_5CD310 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+64h]
sub_5CD310 endp

align 10h



sub_5CD320 proc	near
sub	ecx, 114h
jmp	sub_58CBC0
sub_5CD320 endp

align 10h



sub_5CD330 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+74h]
sub_5CD330 endp

align 10h



sub_5CD340 proc	near
sub	ecx, 48h
jmp	sub_58CC30
sub_5CD340 endp

align 10h



sub_5CD350 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+0A4h]
sub_5CD350 endp

align 10h



sub_5CD360 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+48h]
sub_5CD360 endp

align 10h



sub_5CD370 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+58h]
sub_5CD370 endp

align 10h



sub_5CD380 proc	near
sub	ecx, 48h
jmp	sub_58E220
sub_5CD380 endp

align 10h



sub_5CD390 proc	near
sub	ecx, 10Ch
jmp	sub_58A960
sub_5CD390 endp

align 10h



sub_5CD3A0 proc	near
sub	ecx, 48h
jmp	sub_58BCF0
sub_5CD3A0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5CD3B0(char	*)
sub_5CD3B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jnz	short loc_5CD3CB
cmp	[ebp+arg_0], 0
jz	short loc_5CD3CB
mov	al, 1
jmp	short loc_5CD407

loc_5CD3CB:
cmp	[ebp+arg_0], 0
jz	short loc_5CD3EB
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_5CD3EB
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_5CD3EB
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jnz	short loc_5CD3EF

loc_5CD3EB:
xor	al, al
jmp	short loc_5CD407

loc_5CD3EF:
mov	eax, [ebp+arg_0]
push	eax		; char *
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
push	edx		; char *
call	_strstr
add	esp, 8
neg	eax
sbb	eax, eax
neg	eax

loc_5CD407:
mov	esp, ebp
pop	ebp
retn	4
sub_5CD3B0 endp

align 10h


; Attributes: bp-based frame

sub_5CD410 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
push	0
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5CD46F
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CD451
mov	ecx, [ebp+var_8]
call	sub_1164350
mov	[ebp+var_10], eax
jmp	short loc_5CD458

loc_5CD451:
mov	[ebp+var_10], 0

loc_5CD458:
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
push	0
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
call	sub_40FBD0

loc_5CD46F:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
call	sub_41EE60
mov	esp, ebp
pop	ebp
retn	4
sub_5CD410 endp



; Attributes: bp-based frame

sub_5CD480 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
push	0
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
call	sub_412500
mov	eax, [eax]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5CD4DF
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5CD4C1
mov	ecx, [ebp+var_8]
call	sub_1164350
mov	[ebp+var_10], eax
jmp	short loc_5CD4C8

loc_5CD4C1:
mov	[ebp+var_10], 0

loc_5CD4C8:
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
push	0
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
call	sub_40FBD0

loc_5CD4DF:
mov	eax, [ebp+arg_0]
push	eax
mov	eax, [ebp+var_4]
call	sub_41EE40
mov	esp, ebp
pop	ebp
retn	4
sub_5CD480 endp

align 10h


; Attributes: bp-based frame

sub_5CD500 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	[ebp+var_8], 0
jmp	short loc_5CD51B

loc_5CD512:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_5CD51B:
mov	eax, [ebp+var_14]
add	eax, 8A8h
call	sub_412510
cmp	[ebp+var_8], eax
jnb	short loc_5CD54E
mov	eax, [ebp+var_14]
add	eax, 8A8h
mov	edx, [ebp+var_8]
call	sub_417900
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jnz	short loc_5CD54C
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
jmp	short loc_5CD555

loc_5CD54C:
jmp	short loc_5CD512

loc_5CD54E:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5CD555:
cmp	[ebp+var_4], 0FFFFFFFFh
jnz	short loc_5CD55F
xor	al, al
jmp	short loc_5CD585

loc_5CD55F:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8A8h
call	sub_5D21B0
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 8B8h
call	sub_5D21B0
mov	al, 1

loc_5CD585:
mov	esp, ebp
pop	ebp
retn	4
sub_5CD500 endp

align 10h


; Attributes: bp-based frame

sub_5CD590 proc	near

var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	[ebp+var_8], 0
jmp	short loc_5CD5AB

loc_5CD5A2:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_5CD5AB:
mov	eax, [ebp+var_14]
add	eax, 8C8h
call	sub_412510
cmp	[ebp+var_8], eax
jnb	short loc_5CD5DE
mov	eax, [ebp+var_14]
add	eax, 8C8h
mov	edx, [ebp+var_8]
call	sub_417900
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jnz	short loc_5CD5DC
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
jmp	short loc_5CD5E5

loc_5CD5DC:
jmp	short loc_5CD5A2

loc_5CD5DE:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5CD5E5:
cmp	[ebp+var_4], 0FFFFFFFFh
jnz	short loc_5CD5EF
xor	al, al
jmp	short loc_5CD615

loc_5CD5EF:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 8C8h
call	sub_5D21B0
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 8D8h
call	sub_5D21B0
mov	al, 1

loc_5CD615:
mov	esp, ebp
pop	ebp
retn	4
sub_5CD590 endp

align 10h


; Attributes: bp-based frame

sub_5CD620 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax], 0
jz	short loc_5CD63B
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax

loc_5CD63B:
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+4], 0
jz	short loc_5CD650
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx+4], ecx

loc_5CD650:
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5CD665
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx

loc_5CD665:
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5CD67A
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_5CD67A:
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+14h], 0
jz	short loc_5CD68F
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14h]
mov	[edx+14h], ecx

loc_5CD68F:
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+18h], 0
jz	short loc_5CD6A4
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+18h]
mov	[eax+18h], edx

loc_5CD6A4:
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+8], 0
jz	short loc_5CD6B9
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ecx+8], eax

loc_5CD6B9:
mov	esi, [ebp+var_4]
mov	ecx, 7
mov	edi, [ebp+arg_0]
rep movsd
mov	eax, [ebp+arg_0]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_5CD620 endp

align 10h


; Attributes: bp-based frame

sub_5CD6E0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 36B2h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CD6E0 endp

align 10h


; Attributes: bp-based frame

sub_5CD730 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	20h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CD756
mov	ecx, [ebp+var_4]
call	sub_5CD6E0
mov	[ebp+var_10], eax
jmp	short loc_5CD75D

loc_5CD756:
mov	[ebp+var_10], 0

loc_5CD75D:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5CD730 endp

align 10h


; Attributes: bp-based frame

sub_5CD770 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 36B6h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C82FC
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CD770 endp

align 10h


; Attributes: bp-based frame

sub_5CD7C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CD801
mov	ecx, 36BAh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_5CD808

loc_5CD801:
mov	[ebp+var_8], 0

loc_5CD808:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CD7C0 endp

align 10h


; Attributes: bp-based frame

sub_5CD810 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CD847
mov	ecx, 3706h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A0C
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5CD84E

loc_5CD847:
mov	[ebp+var_8], 0

loc_5CD84E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CD810 endp

align 10h


; Attributes: bp-based frame

sub_5CD860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CD897
mov	ecx, 3709h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A0C
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5CD89E

loc_5CD897:
mov	[ebp+var_8], 0

loc_5CD89E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CD860 endp

align 10h


; Attributes: bp-based frame

sub_5CD8B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_64A3F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CD8D3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CD8D3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CD8B0 endp

align 10h


; Attributes: bp-based frame

sub_5CD8E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	5
mov	ecx, [ebp+var_4]
call	sub_455F40
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC234
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CD8E0 endp

align 10h


; Attributes: bp-based frame

sub_5CD910 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	8
mov	ecx, [ebp+var_4]
call	sub_455F40
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC234
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CD910 endp

align 10h


; Attributes: bp-based frame

sub_5CD940 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 400h
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 400h
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 1
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 30h
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+10h], 2
mov	edx, [ebp+var_4]
mov	dword ptr [edx+14h], 100h
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 200h
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CD940 endp

align 10h


; Attributes: bp-based frame

sub_5CD9A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	1Eh
mov	ecx, [ebp+var_4]
call	sub_455F40
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC228
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CD9A0 endp

align 10h


; Attributes: bp-based frame

sub_5CD9D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0Ah
mov	ecx, [ebp+var_4]
call	sub_455F40
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC23C
mov	dword_1856510, 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15BC24C
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CD9D0 endp

align 10h


; Attributes: bp-based frame

sub_5CDA10 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+14h], 1
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 1
mov	eax, [ebp+var_4]
mov	dword ptr [eax+24h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+1Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+30h], 0
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [edx+2Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+28h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CDA10 endp

align 10h


; Attributes: bp-based frame

sub_5CDAB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_C]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_10]
mov	[edx+10h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_14]
mov	[ecx+14h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_18]
mov	[eax+30h], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+20h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+18h], 0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+2Ch], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+28h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	1Ch
sub_5CDAB0 endp

align 10h


; Attributes: bp-based frame

sub_5CDB50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
Value= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	[ebp+Value], 0FFFFFFFFh
mov	eax, [ebp+Value]
push	eax		; Value
mov	ecx, [ebp+var_14]
add	ecx, 4
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
mov	[ebp+Value], eax
mov	edx, [ebp+Value]
sub	edx, 1
jnz	short loc_5CDBA8
mov	eax, [ebp+var_14]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_5CDBA1
push	1
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
call	edx
mov	[ebp+var_18], eax
jmp	short loc_5CDBA8

loc_5CDBA1:
mov	[ebp+var_18], 0

loc_5CDBA8:
mov	esp, ebp
pop	ebp
retn
sub_5CDB50 endp

align 10h


; Attributes: bp-based frame

sub_5CDBB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC268
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5CDBD4
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CDBD4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDBB0 endp

align 10h


; Attributes: bp-based frame

sub_5CDBE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0
push	0
push	0
push	0FFFFFFFFh
push	2000h
push	2000h
push	10h
push	0
mov	ecx, [ebp+var_4]
call	sub_4082A0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax+1Ch], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:dword_15FCCC0
movss	dword ptr [edx+20h], xmm0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+24h], 0FFFFFFFFh
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+28h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDBE0 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION streambuf::egptr(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5CDC60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+120h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_5CDCA4
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+120h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax+18h]
call	edx
call	__ftol2_sse
mov	[ebp+var_14], eax
jmp	short loc_5CDCAB

loc_5CDCA4:
mov	[ebp+var_14], 0

loc_5CDCAB:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5CDC60 endp

align 10h


; Attributes: bp-based frame

sub_5CDCC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+120h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_5CDD04
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+120h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax+1Ch]
call	edx
call	__ftol2_sse
mov	[ebp+var_14], eax
jmp	short loc_5CDD0B

loc_5CDD04:
mov	[ebp+var_14], 0

loc_5CDD0B:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5CDCC0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5CDD20(wchar_t *Src, int)
sub_5CDD20 proc	near

var_C= dword ptr -0Ch
Dst= dword ptr -8
hMem= dword ptr	-4
Src= dword ptr	8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0		; hWndNewOwner
call	ds:OpenClipboard
test	eax, eax
jz	short loc_5CDD98
call	ds:EmptyClipboard
mov	eax, [ebp+arg_4]
lea	ecx, [eax+eax+2]
push	ecx		; dwBytes
push	2000h		; uFlags
call	ds:GlobalAlloc
mov	[ebp+hMem], eax
mov	edx, [ebp+hMem]
push	edx		; hMem
call	ds:GlobalLock
mov	[ebp+Dst], eax
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax		; MaxCount
mov	ecx, [ebp+Src]
push	ecx		; Src
mov	edx, [ebp+arg_4]
add	edx, 1
push	edx		; SizeInWords
mov	eax, [ebp+Dst]
push	eax		; Dst
call	_wcsncpy_s
add	esp, 10h
mov	ecx, [ebp+hMem]
push	ecx		; hMem
call	ds:GlobalUnlock
mov	edx, [ebp+hMem]
push	edx		; hMem
push	0Dh		; uFormat
call	ds:SetClipboardData
call	ds:CloseClipboard

loc_5CDD98:
mov	esp, ebp
pop	ebp
retn	8
sub_5CDD20 endp

align 10h


; Attributes: bp-based frame

sub_5CDDA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC280
mov	ecx, [ebp+var_4]
call	sub_64A3F0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5CDDC9
mov	edx, [ebp+var_4]
push	edx
call	sub_401750

loc_5CDDC9:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDDA0 endp

align 10h


; Attributes: bp-based frame

sub_5CDDE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC218
mov	ecx, [ebp+var_4]
call	sub_4017E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5CDE0C
mov	edx, [ebp+var_4]
push	edx
call	sub_4026E0
add	esp, 4

loc_5CDE0C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDDE0 endp

align 10h


; Attributes: bp-based frame

sub_5CDE20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	1Ch
mov	ecx, [ebp+var_C]
call	sub_455F40
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC218
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], offset	off_15BC298
mov	edx, [ebp+var_C]
add	edx, 0Ch
mov	[ebp+var_8], edx
cmp	[ebp+arg_0], 0
jz	short loc_5CDE69
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
add	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+4], edx

loc_5CDE69:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
cmp	[ebp+arg_0], 0
jz	short loc_5CDE7F
mov	ecx, [ebp+arg_0]
call	sub_64A400

loc_5CDE7F:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDE20 endp

align 10h


; Attributes: bp-based frame

sub_5CDE90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BC298
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx], 0
jz	short loc_5CDEBD
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_64A400

loc_5CDEBD:
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_15BC218
mov	ecx, [ebp+var_8]
call	sub_4017E0
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_5CDEE2
mov	eax, [ebp+var_8]
push	eax
call	sub_4026E0
add	esp, 4

loc_5CDEE2:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDE90 endp

align 10h


; Attributes: bp-based frame

sub_5CDEF0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_C= byte ptr	-0Ch
var_A= byte ptr	-0Ah
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_28]
call	sub_580E60
mov	[ebp+var_28], offset off_154CAB0
mov	[ebp+var_C], 0
mov	[ebp+var_A], 0
push	1
lea	ecx, [ebp+var_28]
call	sub_F8E6B0
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_4E4760
lea	ecx, [ebp+var_28]
call	sub_408B00
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDEF0 endp

align 10h


; Attributes: bp-based frame

sub_5CDF40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 373Bh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC2A8
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_8], eax
xor	ecx, ecx
jz	short loc_5CDF85
xor	ecx, ecx
call	sub_64A420

loc_5CDF85:
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5CDF97
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_64A430

loc_5CDF97:
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CDF40 endp

align 10h


; Attributes: bp-based frame

sub_5CDFB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5CDFD4
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_64A430

loc_5CDFD4:
mov	ecx, [ebp+var_8]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CDFF2
push	0Ch
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CDFF2:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5CDFB0 endp

align 10h


; Attributes: bp-based frame

sub_5CE000 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 36BCh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC2AC
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+114h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+10h], 0
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax+218h], dx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CE000 endp

align 10h


; Attributes: bp-based frame

sub_5CE060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	618h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CE089
mov	ecx, [ebp+var_4]
call	sub_5CE000
mov	[ebp+var_8], eax
jmp	short loc_5CE090

loc_5CE089:
mov	[ebp+var_8], 0

loc_5CE090:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CE060 endp

align 10h


; Attributes: bp-based frame

sub_5CE0A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CE0C8
push	618h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CE0C8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE0A0 endp

align 10h


; Attributes: bp-based frame

sub_5CE0E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	310h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CE135
mov	ecx, 36BDh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC2B0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+110h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+0Ch], 0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5CE13C

loc_5CE135:
mov	[ebp+var_8], 0

loc_5CE13C:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CE0E0 endp

align 10h


; Attributes: bp-based frame

sub_5CE150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CE178
push	310h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CE178:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE150 endp

align 10h


; Attributes: bp-based frame

sub_5CE190 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 36BEh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC2B4
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+110h], 1
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+118h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+114h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [eax+120h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+11Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+128h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+124h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CE190 endp

align 10h


; Attributes: bp-based frame

sub_5CE250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	12Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CE279
mov	ecx, [ebp+var_4]
call	sub_5CE190
mov	[ebp+var_8], eax
jmp	short loc_5CE280

loc_5CE279:
mov	[ebp+var_8], 0

loc_5CE280:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CE250 endp

align 10h


; Attributes: bp-based frame

sub_5CE290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CE2B8
push	12Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CE2B8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE290 endp

align 10h


; Attributes: bp-based frame

sub_5CE2D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	114h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CE325
mov	ecx, 36BFh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC2B8
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+10h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5CE32C

loc_5CE325:
mov	[ebp+var_8], 0

loc_5CE32C:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CE2D0 endp

align 10h


; Attributes: bp-based frame

sub_5CE340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CE368
push	114h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CE368:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE340 endp

align 10h


; Attributes: bp-based frame

sub_5CE380 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 3733h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE380 endp

align 10h


; Attributes: bp-based frame

sub_5CE3D0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 3734h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE3D0 endp

align 10h


; Attributes: bp-based frame

sub_5CE420 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 3735h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE420 endp

align 10h


; Attributes: bp-based frame

sub_5CE470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+104h]
mov	esp, ebp
pop	ebp
retn
sub_5CE470 endp

align 10h


; Attributes: bp-based frame

sub_5CE490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwouiinterface ; "LWOUIInterface"
mov	esp, ebp
pop	ebp
retn
sub_5CE490 endp



; Attributes: bp-based frame

sub_5CE4A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1513344
mov	esp, ebp
pop	ebp
retn
sub_5CE4A0 endp



; Attributes: bp-based frame

sub_5CE4B0 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5D24F0
mov	esp, ebp
pop	ebp
retn	4
sub_5CE4B0 endp

align 10h


; Attributes: bp-based frame

sub_5CE4D0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32EDh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156B01C
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
movss	xmm0, dword_18919EC
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE4D0 endp

align 10h


; Attributes: bp-based frame

sub_5CE530 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0BDAh
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC370
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+20h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+18h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+10h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CE530 endp

align 10h


; Attributes: bp-based frame

sub_5CE5C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CE5E5
push	24h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CE5E5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE5C0 endp

align 10h


; Attributes: bp-based frame

sub_5CE5F0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1BCDh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B6C98
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+1Ch], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+18h], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+14h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+24h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+28h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CE5F0 endp

align 10h


; Attributes: bp-based frame

sub_5CE690 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1C62h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_156B038
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_4], ecx
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
xor	edx, edx
mov	eax, [ebp+var_8]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_8]
mov	[edx+2], cx
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_C], ecx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	edx, [ebp+var_C]
mov	[edx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	ecx, [ebp+var_C]
mov	[ecx+2], ax
xor	edx, edx
and	edx, 0FFFFh
xor	eax, eax
and	eax, 0
mov	ecx, [ebp+var_C]
mov	[ecx], dx
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_10], edx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_10]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_10]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_10]
mov	[edx], ax
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5CE690 endp

align 10h


; Attributes: bp-based frame

sub_5CE790 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CE7B5
push	4Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CE7B5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE790 endp

align 10h


; Attributes: bp-based frame

sub_5CE7C0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1F52h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C0198
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE7C0 endp

align 10h


; Attributes: bp-based frame

sub_5CE810 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 1F53h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C0198
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE810 endp

align 10h


; Attributes: bp-based frame

sub_5CE860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	14h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CE8A2
mov	ecx, 2712h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F4
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_401EF0
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5CE8A9

loc_5CE8A2:
mov	[ebp+var_8], 0

loc_5CE8A9:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CE860 endp



; Attributes: bp-based frame

sub_5CE8B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5CE8D6
mov	ecx, [ebp+var_4]
call	sub_42C810
mov	[ebp+var_8], eax
jmp	short loc_5CE8DD

loc_5CE8D6:
mov	[ebp+var_8], 0

loc_5CE8DD:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CE8B0 endp

align 10h


; Attributes: bp-based frame

sub_5CE8F0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 0FA8h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C0198
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE8F0 endp

align 10h


; Attributes: bp-based frame

sub_5CE940 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CE970
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CE970:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE940 endp

align 10h


; Attributes: bp-based frame

sub_5CE980 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 0FADh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CE980 endp

align 10h


; Attributes: bp-based frame

sub_5CE9D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CEA00
push	20h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CEA00:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CE9D0 endp

align 10h


; Attributes: bp-based frame

sub_5CEA10 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2B01h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_156E568
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_4], ecx
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 1
mov	edx, [ebp+var_C]
mov	byte ptr [edx+9], 1
mov	eax, [ebp+var_C]
mov	byte ptr [eax+0Ah], 1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+0Bh], 1
mov	edx, [ebp+var_C]
mov	byte ptr [edx+0Ch], 1
mov	eax, [ebp+var_C]
mov	byte ptr [eax+0Dh], 1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+0Eh], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+18h], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+1Ch], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+24h], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+28h], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+2Ch], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+30h], 0
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_8], eax
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_8]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_8]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_8]
mov	[edx], ax
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CEA10 endp

align 10h


; Attributes: bp-based frame

sub_5CEB20 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2B19h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CEB20 endp

align 10h


; Attributes: bp-based frame

sub_5CEB70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 0
push	10h		; nVirtKey
call	ds:GetKeyState
cwde
and	eax, 8000h
jz	short loc_5CEB94
mov	ecx, [ebp+var_4]
or	ecx, 4
mov	[ebp+var_4], ecx

loc_5CEB94:		; nVirtKey
push	11h
call	ds:GetKeyState
movsx	edx, ax
and	edx, 8000h
jz	short loc_5CEBB0
mov	eax, [ebp+var_4]
or	eax, 1
mov	[ebp+var_4], eax

loc_5CEBB0:		; nVirtKey
push	12h
call	ds:GetKeyState
movsx	ecx, ax
and	ecx, 8000h
jz	short loc_5CEBCC
mov	edx, [ebp+var_4]
or	edx, 2
mov	[ebp+var_4], edx

loc_5CEBCC:		; nVirtKey
push	90h
call	ds:GetKeyState
cwde
and	eax, 1
jz	short loc_5CEBE6
mov	ecx, [ebp+var_4]
or	ecx, 8
mov	[ebp+var_4], ecx

loc_5CEBE6:		; nVirtKey
push	14h
call	ds:GetKeyState
movsx	edx, ax
and	edx, 1
jz	short loc_5CEBFF
mov	eax, [ebp+var_4]
or	eax, 10h
mov	[ebp+var_4], eax

loc_5CEBFF:		; nVirtKey
push	91h
call	ds:GetKeyState
movsx	ecx, ax
and	ecx, 1
jz	short loc_5CEC1B
mov	edx, [ebp+var_4]
or	edx, 20h
mov	[ebp+var_4], edx

loc_5CEC1B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CEB70 endp

align 10h


; Attributes: bp-based frame

sub_5CEC30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 760h
mov	esp, ebp
pop	ebp
retn
sub_5CEC30 endp



; Attributes: bp-based frame

sub_5CEC40 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_C]
add	ecx, 4
mov	edx, dword_1889A64
mov	[ecx], edx
mov	eax, dword_1889A68
mov	[ecx+4], eax
mov	edx, dword_1889A6C
mov	[ecx+8], edx
mov	eax, [ebp+var_C]
add	eax, 10h
mov	ecx, dword_1889A64
mov	[eax], ecx
mov	edx, dword_1889A68
mov	[eax+4], edx
mov	ecx, dword_1889A6C
mov	[eax+8], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 1Ch
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	edx, [ebp+var_C]
mov	dword ptr [edx+34h], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	dword ptr [eax+38h], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+3Ch], 0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+40h], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CEC40 endp

align 10h


; Attributes: bp-based frame

sub_5CECE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	al, 1
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CECE0 endp

align 10h


; Attributes: bp-based frame

sub_5CECF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	al, al
mov	esp, ebp
pop	ebp
retn	10h
sub_5CECF0 endp

align 10h


; Attributes: bp-based frame

sub_5CED00 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
xor	eax, eax
mov	esp, ebp
pop	ebp
retn	4
sub_5CED00 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5CED10(char	*Src, int)
sub_5CED10 proc	near

var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_8= dword ptr -8
SizeInBytes= dword ptr -4
Src= dword ptr	8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
push	esi
push	edi
mov	[ebp+var_28], ecx
mov	eax, [ebp+Src]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
add	ecx, 1
mov	[ebp+var_30], ecx

loc_5CED2A:
mov	edx, [ebp+var_2C]
mov	al, [edx]
mov	[ebp+var_31], al
add	[ebp+var_2C], 1
cmp	[ebp+var_31], 0
jnz	short loc_5CED2A
mov	ecx, [ebp+var_2C]
sub	ecx, [ebp+var_30]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
add	edx, 1
mov	[ebp+SizeInBytes], edx
mov	eax, [ebp+SizeInBytes]
push	eax		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+Src]
push	eax		; Src
mov	ecx, [ebp+SizeInBytes]
push	ecx		; SizeInBytes
mov	edx, [ebp+var_28]
mov	eax, [edx+4]
push	eax		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	ecx, [ebp+var_28]
mov	edx, [ebp+arg_4]
mov	[ecx+8], edx
mov	eax, [ebp+arg_4]
mov	ecx, off_17E85A0[eax*4]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_28]
add	ecx, 28h
call	sub_5CD620
mov	esi, [ebp+var_28]
add	esi, 28h
mov	edi, [ebp+var_28]
add	edi, 0Ch
mov	ecx, 7
rep movsd
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_5CED10 endp

align 10h


; Attributes: bp-based frame

sub_5CEDC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BC144
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx+4], 0
jz	short loc_5CEDF0
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_5CEDF0:
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_5CEE04
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CEE04:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5CEDC0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5CEE10(char	*Src, int, int)
sub_5CEE10 proc	near

Dst= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
Src= dword ptr	8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+Dst], ecx
mov	eax, [ebp+Dst]
mov	ecx, [ebp+arg_4]
mov	[eax+104h], ecx
mov	edx, [ebp+Dst]
mov	eax, [ebp+arg_8]
mov	[edx+108h], eax
mov	ecx, [ebp+Dst]
mov	byte ptr [ecx+10Ch], 0
mov	edx, [ebp+Dst]
add	edx, 110h
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 3
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+44h], 6
mov	edx, [ebp+var_4]
mov	dword ptr [edx+48h], 6
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+50h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+54h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+58h], 0
xor	ecx, ecx
jz	short loc_5CEEA7
push	40h		; MaxCount
push	0		; Src
push	40h		; SizeInBytes
mov	edx, [ebp+var_4]
add	edx, 4
push	edx		; Dst
call	_strncpy_s
add	esp, 10h
jmp	short loc_5CEEBA

loc_5CEEA7:		; size_t
push	40h
push	0		; int
mov	eax, [ebp+var_4]
add	eax, 4
push	eax		; void *
call	_memset
add	esp, 0Ch

loc_5CEEBA:
mov	ecx, [ebp+Dst]
add	ecx, 16Ch
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 3
mov	eax, [ebp+var_8]
mov	dword ptr [eax+44h], 6
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+48h], 6
mov	edx, [ebp+var_8]
mov	dword ptr [edx+4Ch], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+50h], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+54h], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+58h], 0
xor	eax, eax
jz	short loc_5CEF26
push	40h		; MaxCount
push	0		; Src
push	40h		; SizeInBytes
mov	ecx, [ebp+var_8]
add	ecx, 4
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h
jmp	short loc_5CEF39

loc_5CEF26:		; size_t
push	40h
push	0		; int
mov	edx, [ebp+var_8]
add	edx, 4
push	edx		; void *
call	_memset
add	esp, 0Ch

loc_5CEF39:
cmp	[ebp+Src], 0
jz	short loc_5CEF59
push	104h		; MaxCount
mov	eax, [ebp+Src]
push	eax		; Src
push	104h		; SizeInBytes
mov	ecx, [ebp+Dst]
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h

loc_5CEF59:
mov	edx, [ebp+Dst]
mov	dword ptr [edx+110h], 2
mov	eax, [ebp+Dst]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CEE10 endp

align 10h


; Attributes: bp-based frame

sub_5CEF70 proc	near
push	ebp
mov	ebp, esp
mov	eax, dword_1970A2C
and	eax, 1
jnz	short loc_5CEFA3
mov	ecx, dword_1970A2C
or	ecx, 1
mov	dword_1970A2C, ecx
mov	ecx, offset unk_1970A0C
call	sub_BBDCE0
push	offset sub_1415BB0 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_5CEFA3:
mov	eax, offset unk_1970A0C
pop	ebp
retn
sub_5CEF70 endp

align 10h


; Attributes: bp-based frame

sub_5CEFB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [eax+10h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, ds:dword_15439C8
movss	dword ptr [ecx+0Ch], xmm0
xor	edx, edx
jz	short loc_5CF00B
xor	ecx, ecx
call	sub_64A420

loc_5CF00B:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5CF01D
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_64A430

loc_5CF01D:
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+18h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CEFB0 endp

align 10h


; Attributes: bp-based frame

sub_5CF050 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B91000
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF078
push	11Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CF078:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF050 endp

align 10h


; Attributes: bp-based frame

sub_5CF090 proc	near
push	ebp
mov	ebp, esp
mov	eax, dword_197081C
and	eax, 1
jnz	short loc_5CF0C3
mov	ecx, dword_197081C
or	ecx, 1
mov	dword_197081C, ecx
mov	ecx, offset unk_1970804
call	sub_BB6F20
push	offset sub_1415BC0 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_5CF0C3:
mov	eax, offset unk_1970804
pop	ebp
retn
sub_5CF090 endp

align 10h


; Attributes: bp-based frame

sub_5CF0D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B8C900
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF0F8
push	760h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CF0F8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF0D0 endp

align 10h


; Attributes: bp-based frame

sub_5CF110 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 34h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5CF110 endp

align 10h


; Attributes: bp-based frame

sub_5CF160 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
xor	eax, eax
mov	esi, [ebp+var_4]
call	sub_41DF90
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5CF160 endp

align 10h


; Attributes: bp-based frame

sub_5CF180 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
imul	eax, 90h
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax+3Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_8]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CF1E5
mov	edx, [ebp+arg_0]
imul	edx, 90h
mov	eax, [ebp+var_10]
mov	ecx, [eax+edx+24h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+edx*4]
mov	[ebp+var_14], ecx
jmp	short loc_5CF1EC

loc_5CF1E5:
mov	[ebp+var_14], 0Ah

loc_5CF1EC:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_5CF180 endp

align 10h


; Attributes: bp-based frame

sub_5CF200 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
imul	eax, 90h
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax+60h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_8]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CF265
mov	edx, [ebp+arg_0]
imul	edx, 90h
mov	eax, [ebp+var_10]
mov	ecx, [eax+edx+48h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+edx*4]
mov	[ebp+var_14], ecx
jmp	short loc_5CF26C

loc_5CF265:
mov	[ebp+var_14], 0Ah

loc_5CF26C:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_5CF200 endp

align 10h


; Attributes: bp-based frame

sub_5CF280 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
imul	eax, 90h
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax+84h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 0Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_8]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5CF2E8
mov	edx, [ebp+arg_0]
imul	edx, 90h
mov	eax, [ebp+var_10]
mov	ecx, [eax+edx+6Ch]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+edx*4]
mov	[ebp+var_14], ecx
jmp	short loc_5CF2EF

loc_5CF2E8:
mov	[ebp+var_14], 0Ah

loc_5CF2EF:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_5CF280 endp

align 10h


; Attributes: bp-based frame

sub_5CF300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B90380
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF323
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CF323:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF300 endp

align 10h


; Attributes: bp-based frame

sub_5CF330 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B90330
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF353
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CF353:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF330 endp

align 10h


; Attributes: bp-based frame

sub_5CF360 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B90160
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF383
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CF383:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF360 endp

align 10h


; Attributes: bp-based frame

sub_5CF390 proc	near

var_14=	dword ptr -14h
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_14]
push	eax
call	sub_402710
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn
sub_5CF390 endp

align 10h


; Attributes: bp-based frame

sub_5CF3C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B95CF0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF3E3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CF3E3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF3C0 endp

align 10h


; Attributes: bp-based frame

sub_5CF3F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 34h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_403400
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+5Ch]
mov	[edx+5Ch], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF3F0 endp

align 10h


; Attributes: bp-based frame

sub_5CF460 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 34h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 34h
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+5Ch]
mov	[edx+5Ch], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF460 endp

align 10h


; Attributes: bp-based frame

sub_5CF4D0 proc	near

var_54=	dword ptr -54h
var_28=	byte ptr -28h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
lea	ecx, [ebp+var_28]
call	sub_4E46D0
cmp	[ebp+arg_C], 0
jbe	short loc_5CF4F3
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_28]
call	sub_5CDEF0

loc_5CF4F3:
mov	ecx, [ebp+arg_C]
push	ecx
lea	edx, [ebp+var_28]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_54]
mov	ecx, [edx+0Ch]
call	sub_BA4C40
lea	ecx, [ebp+var_28]
call	sub_408B00
mov	esp, ebp
pop	ebp
retn	10h
sub_5CF4D0 endp

align 10h


; Attributes: bp-based frame

sub_5CF520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5CF55C
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [edx]
mov	eax, [edx+14h]
call	eax
test	eax, eax
jz	short loc_5CF55C
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [edx]
mov	eax, [edx+14h]
call	eax
mov	[ebp+var_8], eax
jmp	short loc_5CF563

loc_5CF55C:
mov	[ebp+var_8], 0

loc_5CF563:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CF520 endp

align 10h


; Attributes: bp-based frame

sub_5CF570 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_455F10
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_155F500
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15BC210
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15BC210
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC280
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5CF570 endp

align 10h


; Attributes: bp-based frame

sub_5CF5B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
call	sub_5D1920
mov	ecx, [ebp+var_4]
add	ecx, 14h
call	nullsub_1
mov	ecx, [ebp+var_8]
call	sub_4017E0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5CF5F1
mov	edx, [ebp+var_8]
push	edx
call	sub_4026E0
add	esp, 4

loc_5CF5F1:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF5B0 endp

align 10h


; Attributes: bp-based frame

sub_5CF600 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_6C7100
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF623
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4026E0
add	esp, 4

loc_5CF623:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF600 endp

align 10h


; Attributes: bp-based frame

sub_5CF630 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B864B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF650
mov	ecx, [ebp+var_4]
push	ecx
call	sub_401750

loc_5CF650:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF630 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION unknown_libname_15. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5CF680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+14h]
mov	esp, ebp
pop	ebp
retn
sub_5CF680 endp

align 10h


; Attributes: bp-based frame

sub_5CF6A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax+10h]
cdq
mov	esp, ebp
pop	ebp
retn
sub_5CF6A0 endp

align 10h


; Attributes: bp-based frame

sub_5CF6C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CF6C0 endp

align 10h


; Attributes: bp-based frame

sub_5CF6F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	esp, ebp
pop	ebp
retn
sub_5CF6F0 endp

align 10h


; Attributes: bp-based frame

sub_5CF720 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax+14h], 0
xor	al, al
mov	esp, ebp
pop	ebp
retn
sub_5CF720 endp

align 10h


; Attributes: bp-based frame

sub_5CF740 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
push	ecx		; char
push	offset aTryingToChange ; "Trying to ChangeSize() on lwoGFile %S"
push	2		; int
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED8B0
add	esp, 14h
xor	al, al
mov	esp, ebp
pop	ebp
retn	4
sub_5CF740 endp

align 10h


; Attributes: bp-based frame

sub_5CF770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
push	ecx		; char
push	offset aTryingToCopyfr ; "Trying to CopyFromStream() on	lwoGFile "...
push	2		; int
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED8B0
add	esp, 14h
xor	eax, eax
mov	esp, ebp
pop	ebp
retn	8
sub_5CF770 endp

align 10h


; Attributes: bp-based frame

sub_5CF7A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
push	ecx		; char
push	offset aTryingToWriteO ; "Trying to Write() on lwoGFile	%S"
push	2		; int
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED8B0
add	esp, 14h
xor	eax, eax
mov	esp, ebp
pop	ebp
retn	8
sub_5CF7A0 endp

align 10h


; Attributes: bp-based frame

sub_5CF7D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B837E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF7F3
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4026E0
add	esp, 4

loc_5CF7F3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF7D0 endp

align 10h


; Attributes: bp-based frame

sub_5CF800 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	0		; lpName
push	1		; lMaximumCount
push	0		; lInitialCount
push	0		; lpSemaphoreAttributes
call	ds:CreateSemaphoreW
mov	ecx, [ebp+var_C]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	byte ptr [edx+4], 0
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5CF852
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_5CF852:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5CF800 endp

align 10h


; Attributes: bp-based frame

sub_5CF860 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
push	ecx		; hObject
call	ds:CloseHandle
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_5CF8AC
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5CF8AC
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax

loc_5CF8AC:
mov	esp, ebp
pop	ebp
retn
sub_5CF860 endp



; Attributes: bp-based frame

sub_5CF8B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 18h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_5CF8F6
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
sub	edx, 1
mov	eax, [ebp+var_8]
mov	[eax], edx
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jnz	short loc_5CF8F6
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
call	sub_401750

loc_5CF8F6:
mov	ecx, [ebp+var_10]
call	sub_407910
mov	esp, ebp
pop	ebp
retn
sub_5CF8B0 endp

align 10h


; Attributes: bp-based frame

sub_5CF910 proc	near

var_14=	dword ptr -14h
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 18h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
lea	ecx, [ebp+var_3]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 30h
call	sub_4022A0
lea	ecx, [ebp+var_3]
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5CF910 endp

align 10h


; Attributes: bp-based frame

sub_5CF980 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_403850
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 18h
call	sub_403850
mov	edx, [ebp+arg_0]
add	edx, 30h
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_403850
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF980 endp



; Attributes: bp-based frame

sub_5CF9C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B8AC10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CF9E8
push	190h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CF9E8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CF9C0 endp

align 10h


; Attributes: bp-based frame

sub_5CFA00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B8F4E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFA28
push	1B0h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CFA28:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFA00 endp

align 10h


; Attributes: bp-based frame

sub_5CFA40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B93400
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFA68
push	204h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CFA68:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFA40 endp

align 10h


; Attributes: bp-based frame

sub_5CFA80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
push	4
mov	ecx, [ebp+var_8]
call	sub_455F40
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_15BC268
mov	edx, [ebp+var_8]
mov	dword ptr [edx], offset	off_15BC1B4
mov	eax, [ebp+var_8]
mov	dword ptr [eax+0Ch], offset off_15BC0FC
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], offset	off_15BC0F4
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], offset off_15BC0FC
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5CFA80 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5CFAE0(int,	char *Format, va_list ArgList)
sub_5CFAE0 proc	near

var_4054= dword	ptr -4054h
var_4050= dword	ptr -4050h
var_404C= byte ptr -404Ch
var_4021= byte ptr -4021h
var_4020= byte ptr -4020h
var_4009= byte ptr -4009h
DstBuf=	byte ptr -4008h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
Format=	dword ptr  0Ch
ArgList= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, 4054h
call	__alloca_probe
mov	[ebp+var_4050],	ecx
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_0]
and	eax, 0Fh
mov	[ebp+var_4054],	eax
jz	short loc_5CFB1C
cmp	[ebp+var_4054],	1
jz	short loc_5CFB25
cmp	[ebp+var_4054],	2
jz	short loc_5CFB2E
jmp	short loc_5CFB35

loc_5CFB1C:
mov	[ebp+var_4], 3
jmp	short loc_5CFB35

loc_5CFB25:
mov	[ebp+var_4], 3
jmp	short loc_5CFB35

loc_5CFB2E:
mov	[ebp+var_4], 2

loc_5CFB35:
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	4000h		; SizeInBytes
lea	eax, [ebp+DstBuf]
push	eax		; DstBuf
call	_vsprintf_s
add	esp, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+ecx+var_4009], 0
lea	ecx, [ebp+var_4021]
call	sub_401EF0
push	eax
lea	edx, [ebp+DstBuf]
push	edx
lea	ecx, [ebp+var_4020]
call	sub_407D30
push	2
mov	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_4020]
push	ecx
lea	edx, [ebp+var_404C]
push	edx
call	sub_10EF240
add	esp, 8
call	sub_412770
push	eax
call	sub_10FF860
mov	ecx, eax
call	sub_10ED7C0
lea	ecx, [ebp+var_404C]
call	sub_407E50
lea	ecx, [ebp+var_4020]
call	sub_407910
lea	ecx, [ebp+var_4021]
call	nullsub_1
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5CFAE0 endp

align 10h


; Attributes: bp-based frame

sub_5CFBE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC1B4
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0Ch], offset off_15BC0FC
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], offset off_15BC268
mov	ecx, [ebp+var_4]
call	sub_4017E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFC20
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4026E0
add	esp, 4

loc_5CFC20:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFBE0 endp

align 10h


; Attributes: bp-based frame

sub_5CFC30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B83060
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFC53
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CFC53:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFC30 endp

align 10h


; Attributes: bp-based frame

sub_5CFC60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BA3780
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFC83
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CFC83:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFC60 endp

align 10h


; Attributes: bp-based frame

sub_5CFC90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BA30A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFCB5
push	74h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CFCB5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFC90 endp

align 10h


; Attributes: bp-based frame

sub_5CFCC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B8A200
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFCE3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CFCE3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFCC0 endp

align 10h


; Attributes: bp-based frame

sub_5CFCF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4017E0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFD13
mov	ecx, [ebp+var_4]
push	ecx
call	sub_4026E0
add	esp, 4

loc_5CFD13:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFCF0 endp

align 10h


; Attributes: bp-based frame

sub_5CFD20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	[ebp+var_4], 0
jmp	short loc_5CFD60

loc_5CFD57:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_5CFD60:
cmp	[ebp+var_4], 104h
jnb	short loc_5CFD7D
mov	ecx, [ebp+var_10]
add	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
add	edx, [ebp+var_4]
mov	al, [edx+10h]
mov	[ecx+10h], al
jmp	short loc_5CFD57

loc_5CFD7D:
mov	[ebp+var_8], 0
jmp	short loc_5CFD8F

loc_5CFD86:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_5CFD8F:
cmp	[ebp+var_8], 104h
jnb	short loc_5CFDB2
mov	edx, [ebp+var_10]
add	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
add	eax, [ebp+var_8]
mov	cl, [eax+114h]
mov	[edx+114h], cl
jmp	short loc_5CFD86

loc_5CFDB2:
mov	[ebp+var_C], 0
jmp	short loc_5CFDC4

loc_5CFDBB:
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_C], edx

loc_5CFDC4:
cmp	[ebp+var_C], 200h
jnb	short loc_5CFDEB
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	esi, [ebp+arg_0]
mov	dx, [esi+edx*2+218h]
mov	[ecx+eax*2+218h], dx
jmp	short loc_5CFDBB

loc_5CFDEB:
mov	eax, [ebp+var_10]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5CFD20 endp

align 10h


; Attributes: bp-based frame

sub_5CFE00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_5CFE27
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
call	sub_64A420

loc_5CFE27:
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_5CFE39
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_64A430

loc_5CFE39:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+4]
fstp	dword ptr [ecx+4]
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edx+0Ch]
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+10h]
fstp	dword ptr [ecx+10h]
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+14h]
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+18h]
fstp	dword ptr [edx+18h]
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFE00 endp

align 10h


; Attributes: bp-based frame

sub_5CFEA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	[ebp+var_4], 0
jmp	short loc_5CFED3

loc_5CFECA:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_5CFED3:
cmp	[ebp+var_4], 104h
jnb	short loc_5CFEF0
mov	ecx, [ebp+var_C]
add	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
add	edx, [ebp+var_4]
mov	al, [edx+0Ch]
mov	[ecx+0Ch], al
jmp	short loc_5CFECA

loc_5CFEF0:
mov	[ebp+var_8], 0
jmp	short loc_5CFF02

loc_5CFEF9:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_5CFF02:
cmp	[ebp+var_8], 200h
jnb	short loc_5CFF25
mov	edx, [ebp+var_C]
add	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
add	eax, [ebp+var_8]
mov	cl, [eax+110h]
mov	[edx+110h], cl
jmp	short loc_5CFEF9

loc_5CFF25:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFEA0 endp

align 10h


; Attributes: bp-based frame

sub_5CFF30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_11A9A50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFF55
push	4
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5CFF55:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFF30 endp

align 10h


; Attributes: bp-based frame

sub_5CFF60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B858F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5CFF83
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5CFF83:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFF60 endp

align 10h


; Attributes: bp-based frame

sub_5CFF90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1]
mov	[eax+1], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+2]
mov	[eax+2], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+3]
mov	[eax+3], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+4]
mov	[eax+4], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_5D2690
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5CFF90 endp

align 10h


; Attributes: bp-based frame

sub_5D0000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BB17B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5D0023
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D0023:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D0000 endp

align 10h


; Attributes: bp-based frame

sub_5D0030 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_20]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EC670
mov	edx, [ebp+var_20]
mov	dword ptr [edx], offset	off_15BC430
mov	eax, [ebp+var_20]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_C]
add	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_20]
add	edx, 10h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
add	edx, 8
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
add	ecx, 1Ch
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_1C]
add	ecx, 8
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_5D0030 endp

align 10h


; Attributes: bp-based frame

sub_5D00F0 proc	near

var_D8=	dword ptr -0D8h

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D8], ecx
mov	ecx, [ebp+var_D8]
add	ecx, 1Ch
call	sub_5D0770
mov	ecx, [ebp+var_D8]
add	ecx, 10h
call	sub_5D0680
mov	ecx, [ebp+var_D8]
add	ecx, 4
call	sub_5D0680
mov	eax, [ebp+var_D8]
mov	dword ptr [eax], offset	off_1581938
mov	ecx, [ebp+var_D8]
push	ecx
call	sub_10ECEC0
mov	ecx, eax
call	sub_10EB890
mov	esp, ebp
pop	ebp
retn
sub_5D00F0 endp

align 10h


; Attributes: bp-based frame

sub_5D0150 proc	near

var_BC=	dword ptr -0BCh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0BCh
mov	[ebp+var_BC], ecx
mov	ecx, [ebp+var_BC]
call	sub_5D00F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5D0181
mov	ecx, [ebp+var_BC]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D0181:
mov	eax, [ebp+var_BC]
mov	esp, ebp
pop	ebp
retn	4
sub_5D0150 endp

align 10h


; Attributes: bp-based frame

sub_5D0190 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_403400
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_403400
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+58h]
mov	[edx+58h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D0190 endp

align 10h


; Attributes: bp-based frame

sub_5D01F0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 30h
call	sub_402390
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5D01F0 endp

align 10h


; Attributes: bp-based frame

sub_5D0240 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_BCF920
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5D0268
push	5C4h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5D0268:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D0240 endp

align 10h


; Attributes: bp-based frame

sub_5D0280 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_407D10
add	esp, 4
add	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_61ED00
push	eax
mov	ecx, [ebp+var_14]
call	sub_5F52F0
push	eax
call	sub_4051D0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn	4
sub_5D0280 endp

align 10h


; Attributes: bp-based frame

sub_5D02C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
cmp	dword ptr [eax+4], 1
jnz	short loc_5D02DF
mov	ecx, [ebp+var_34]
call	sub_5D0FC0
jmp	loc_5D0364

loc_5D02DF:
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
lea	ecx, [edx+eax*4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
cmp	dword ptr [edx], 0
jz	short loc_5D02FF
mov	eax, [ebp+var_24]
mov	ecx, [eax]
call	sub_64A430

loc_5D02FF:
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D0312
mov	edx, [ebp+var_24]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D0312:
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
sub	ecx, 1
sub	ecx, [ebp+arg_0]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_30]
shl	ecx, 2
push	ecx
mov	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_28]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	ecx, [ebp+var_34]
mov	edx, [ecx+4]
sub	edx, 1
mov	eax, [ebp+var_34]
mov	[eax+4], edx

loc_5D0364:
mov	esp, ebp
pop	ebp
retn	4
sub_5D02C0 endp

align 10h


; Attributes: bp-based frame

sub_5D0370 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_2C]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+10h], 0
mov	al, [ebp+var_2]
mov	ecx, [ebp+var_2C]
mov	[ecx+14h], al
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_5D0370 endp

align 10h


; Attributes: bp-based frame

sub_5D0400 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_5D10E0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5D0400 endp

align 10h


; Attributes: bp-based frame

sub_5D0460 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
lea	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
call	sub_402EB0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_439D80
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+4], edx
mov	ecx, [ebp+var_14]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_5D0460 endp

align 10h


; Attributes: bp-based frame

sub_5D04D0 proc	near

var_44=	dword ptr -44h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_44]
call	sub_5D1360
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5D04D0 endp

align 10h


; Attributes: bp-based frame

sub_5D0530 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_24]
call	sub_58F630
mov	esp, ebp
pop	ebp
retn
sub_5D0530 endp



; Attributes: bp-based frame

sub_5D0560 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_5D05BE
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_5D05A3
jmp	short loc_5D05BC

loc_5D05A3:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_5D05BC:
jmp	short loc_5D05EF

loc_5D05BE:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_46BD80

loc_5D05EF:
mov	esp, ebp
pop	ebp
retn	8
sub_5D0560 endp

align 10h


; Attributes: bp-based frame

sub_5D0600 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
lea	eax, [ebp+var_34]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_489850
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_14]
mov	[eax+4], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_1C]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_5D0600 endp

align 10h


; Attributes: bp-based frame

sub_5D0680 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5D59F0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5D06F9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5D06F9
mov	ecx, [ebp+var_4C]
imul	ecx, 5Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D06F9:
mov	esp, ebp
pop	ebp
retn
sub_5D0680 endp

align 10h


; Attributes: bp-based frame

sub_5D0700 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5D073B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5D5A20
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 5Ch
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_5D0766

loc_5D073B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5D2A80

loc_5D0766:
mov	esp, ebp
pop	ebp
retn	4
sub_5D0700 endp

align 10h


; Attributes: bp-based frame

sub_5D0770 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5DB250
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5D07E9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5D07E9
mov	ecx, [ebp+var_4C]
imul	ecx, 2Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D07E9:
mov	esp, ebp
pop	ebp
retn
sub_5D0770 endp

align 10h


; Attributes: bp-based frame

sub_5D07F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5D082B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5D5A70
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 2Ch
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_5D0856

loc_5D082B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5D2C90

loc_5D0856:
mov	esp, ebp
pop	ebp
retn	4
sub_5D07F0 endp

align 10h


; Attributes: bp-based frame

sub_5D0860 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_5D15A0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5D0860 endp

align 10h


; Attributes: bp-based frame

sub_5D08C0 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_3C=	dword ptr -3Ch
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_20]
mov	[eax+4], edx
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	ecx, [ebp+arg_0]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_74]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	eax, [ebp+var_30]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_6C], edx
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_6C]
push	eax
push	ecx
mov	[ebp+var_3C], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	ecx, [ebp+var_74]
call	sub_5DB060
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_5D08C0 endp

align 10h


; Attributes: bp-based frame

sub_5D0980 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5D1720
mov	esp, ebp
pop	ebp
retn	4
sub_5D0980 endp

align 10h


; Attributes: bp-based frame

sub_5D09B0 proc	near

var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_40]
lea	eax, [ebp+var_8]
call	sub_4046E0

loc_5D09D7:
lea	edx, [ebp+var_24]
mov	[ebp+var_20], edx
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setnz	cl
mov	[ebp+var_41], cl
movzx	edx, [ebp+var_41]
test	edx, edx
jz	short loc_5D0A72
mov	ecx, [ebp+var_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
lea	eax, [ebp+var_C]
call	sub_405E90
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_28]
mov	eax, [ecx]
cmp	eax, [edx]
jnz	short loc_5D0A3D
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_28]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jnz	short loc_5D0A3D
mov	[ebp+var_48], 1
jmp	short loc_5D0A44

loc_5D0A3D:
mov	[ebp+var_48], 0

loc_5D0A44:
movzx	ecx, byte ptr [ebp+var_48]
test	ecx, ecx
jz	short loc_5D0A67
push	ecx
mov	[ebp+var_2C], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_2C]
call	sub_4046E0
lea	edx, [ebp+var_18]
push	edx
mov	ecx, [ebp+var_40]
call	sub_501670

loc_5D0A67:
mov	eax, [ebp+var_C]
mov	[ebp+var_4], eax
jmp	loc_5D09D7

loc_5D0A72:
mov	esp, ebp
pop	ebp
retn	4
sub_5D09B0 endp

align 10h


; Attributes: bp-based frame

sub_5D0A80 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
push	eax
mov	ecx, [ebp+var_40]
call	sub_46AAF0
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_1C]
sub	ecx, [ebp+var_38]
sar	ecx, 2
mov	[ebp+var_2C], ecx
jmp	short loc_5D0AE5

loc_5D0ADC:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_5D0AE5:
cmp	[ebp+var_2C], 0
jle	short loc_5D0B0F
mov	eax, [ebp+var_38]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_5DD850
add	esp, 8
mov	edx, [ebp+var_38]
add	edx, 4
mov	[ebp+var_38], edx
mov	eax, [ebp+var_28]
add	eax, 4
mov	[ebp+var_28], eax
jmp	short loc_5D0ADC

loc_5D0B0F:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn	4
sub_5D0A80 endp

align 10h


; Attributes: bp-based frame

sub_5D0B30 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5DB280
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5D0BA4
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_5D0BA4
mov	edx, [ebp+var_4C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D0BA4:
mov	esp, ebp
pop	ebp
retn
sub_5D0B30 endp

align 10h


; Attributes: bp-based frame

sub_5D0BB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5D0BEB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5DD850
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_5D0C16

loc_5D0BEB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5D3AF0

loc_5D0C16:
mov	esp, ebp
pop	ebp
retn	4
sub_5D0BB0 endp

align 10h


; Attributes: bp-based frame

sub_5D0C20 proc	near

var_3C=	dword ptr -3Ch
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_3C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_5D0C44
jmp	short loc_5D0C5D

loc_5D0C44:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_5D1E40

loc_5D0C5D:
mov	esp, ebp
pop	ebp
retn
sub_5D0C20 endp

align 10h


; Attributes: bp-based frame

sub_5D0C70 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5DB2B0
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5D0CE9
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5D0CE9
mov	ecx, [ebp+var_4C]
imul	ecx, 60h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D0CE9:
mov	esp, ebp
pop	ebp
retn
sub_5D0C70 endp

align 10h


; Attributes: bp-based frame

sub_5D0CF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5D0D2B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5D5AE0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 60h
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_5D0D56

loc_5D0D2B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5D4390

loc_5D0D56:
mov	esp, ebp
pop	ebp
retn	4
sub_5D0CF0 endp

align 10h


; Attributes: bp-based frame

sub_5D0D60 proc	near

var_34=	dword ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
lea	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5D1830
mov	esp, ebp
pop	ebp
retn	4
sub_5D0D60 endp

align 10h


; Attributes: bp-based frame

sub_5D0D90 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_28]
call	sub_5D18B0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5D0D90 endp

align 10h


; Attributes: bp-based frame

sub_5D0DF0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5D0E79
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	dword ptr [ecx+4], 0
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5D0E3C
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
jmp	short loc_5D0E79

loc_5D0E3C:
mov	edx, [ebp+var_1C]
cmp	dword ptr [edx], 0
jz	short loc_5D0E70
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
sub	eax, 1
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
cmp	dword ptr [edx], 0
jnz	short loc_5D0E70
mov	eax, [ebp+var_18]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_401750

loc_5D0E70:
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], 0

loc_5D0E79:
cmp	[ebp+var_4], 0
jz	short loc_5D0E8E
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
add	ecx, 1
mov	edx, [ebp+var_4]
mov	[edx+4], ecx

loc_5D0E8E:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5D0DF0 endp

align 10h


; Attributes: bp-based frame

sub_5D0EA0 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5D0EDB
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5D5B30
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 10h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_5D0EFB

loc_5D0EDB:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5AEAA0

loc_5D0EFB:
mov	esp, ebp
pop	ebp
retn	4
sub_5D0EA0 endp

align 10h


; Attributes: bp-based frame

sub_5D0F10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_64A3F0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5D0F30
mov	ecx, [ebp+var_4]
push	ecx
call	sub_401750

loc_5D0F30:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D0F10 endp

align 10h


; Attributes: bp-based frame

sub_5D0F40 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 4
cmp	edx, [ebp+var_8]
jz	short loc_5D0F82
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 4
push	edx
call	sub_406610
add	esp, 0Ch

loc_5D0F82:
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
sub	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
call	nullsub_1
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5D0F40 endp

align 10h


; Attributes: bp-based frame

sub_5D0FA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4564C0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BC270
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5D0FA0 endp

align 10h


; Attributes: bp-based frame

sub_5D0FC0 proc	near

var_54=	dword ptr -54h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
mov	eax, [ebp+var_54]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
push	0
mov	edx, [ebp+var_54]
push	edx
mov	ecx, [ebp+var_54]
call	sub_5D1B60
cmp	[ebp+var_4], 0
jnb	short loc_5D1000
xor	eax, eax
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
lea	ecx, [edx+eax*4]
push	ecx
call	sub_5D2140
add	esp, 8

loc_5D1000:
mov	esp, ebp
pop	ebp
retn
sub_5D0FC0 endp

align 10h


; Attributes: bp-based frame

sub_5D1010 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_4C], ecx
mov	eax, [ebp+var_4C]
mov	ecx, [eax+4]
add	ecx, 1
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	ecx, [ebp+var_4C]
call	sub_5D1B60
mov	eax, [ebp+var_4C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4C]
mov	eax, [edx]
lea	ecx, [eax+ecx*4-4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_48]
push	edx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_44], eax
cmp	[ebp+var_44], 0
jz	short loc_5D107C
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_5D106A
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx]
call	sub_64A420

loc_5D106A:
mov	edx, [ebp+var_44]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_50], edx
jmp	short loc_5D1083

loc_5D107C:
mov	[ebp+var_50], 0

loc_5D1083:
mov	esp, ebp
pop	ebp
retn	4
sub_5D1010 endp

align 10h


; Attributes: bp-based frame

sub_5D1090 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D10D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D2310
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D10D5:
mov	esp, ebp
pop	ebp
retn
sub_5D1090 endp

align 10h


; Attributes: bp-based frame

sub_5D10E0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5BA0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D1137
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D1137:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D10E0 endp

align 10h


; Attributes: bp-based frame

sub_5D1150 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1195
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D2370
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1195:
mov	esp, ebp
pop	ebp
retn
sub_5D1150 endp

align 10h


; Attributes: bp-based frame

sub_5D11A0 proc	near

var_78=	dword ptr -78h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_78]
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_78]
jz	short loc_5D11E9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_78]
call	sub_5D1C10
mov	eax, 1
jmp	short loc_5D11EB

loc_5D11E9:
xor	eax, eax

loc_5D11EB:
mov	esp, ebp
pop	ebp
retn	4
sub_5D11A0 endp

align 10h


; Attributes: bp-based frame

sub_5D1200 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1245
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D23D0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1245:
mov	esp, ebp
pop	ebp
retn
sub_5D1200 endp

align 10h


; Attributes: bp-based frame

sub_5D1250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1295
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D2430
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1295:
mov	esp, ebp
pop	ebp
retn
sub_5D1250 endp

align 10h


; Attributes: bp-based frame

sub_5D12A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D12E5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D2490
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D12E5:
mov	esp, ebp
pop	ebp
retn
sub_5D12A0 endp

align 10h


; Attributes: bp-based frame

sub_5D12F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D1347
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D1347:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D12F0 endp

align 10h


; Attributes: bp-based frame

sub_5D1360 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
mov	eax, [ebp+var_60]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_60]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_60]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5BE0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D13B7
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D13B7:
mov	ecx, [ebp+var_60]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_60]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D1360 endp

align 10h


; Attributes: bp-based frame

sub_5D13D0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1415
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D28B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1415:
mov	esp, ebp
pop	ebp
retn
sub_5D13D0 endp

align 10h


; Attributes: bp-based frame

sub_5D1420 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BFFB0
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_5D1469
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_5D1C80
mov	eax, 1
jmp	short loc_5D146B

loc_5D1469:
xor	eax, eax

loc_5D146B:
mov	esp, ebp
pop	ebp
retn	4
sub_5D1420 endp

align 10h


; Attributes: bp-based frame

sub_5D1480 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D14C5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D2A20
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D14C5:
mov	esp, ebp
pop	ebp
retn
sub_5D1480 endp

align 10h


; Attributes: bp-based frame

sub_5D14D0 proc	near

var_2C=	dword ptr -2Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5D14E6
mov	eax, [ebp+arg_0]
jmp	short loc_5D14FF

loc_5D14E6:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_5D1CF0

loc_5D14FF:
mov	esp, ebp
pop	ebp
retn	8
sub_5D14D0 endp

align 10h


; Attributes: bp-based frame

sub_5D1510 proc	near

var_2C=	dword ptr -2Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5D1526
mov	eax, [ebp+arg_0]
jmp	short loc_5D153F

loc_5D1526:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_5D1D90

loc_5D153F:
mov	esp, ebp
pop	ebp
retn	8
sub_5D1510 endp

align 10h


; Attributes: bp-based frame

sub_5D1550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1595
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D2EA0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1595:
mov	esp, ebp
pop	ebp
retn
sub_5D1550 endp

align 10h


; Attributes: bp-based frame

sub_5D15A0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5C10
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D15F7
mov	edx, 1
imul	edx, 44h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D15F7:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D15A0 endp

align 10h


; Attributes: bp-based frame

sub_5D1610 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1655
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D35C0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1655:
mov	esp, ebp
pop	ebp
retn
sub_5D1610 endp

align 10h


; Attributes: bp-based frame

sub_5D1660 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D16A5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D3700
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D16A5:
mov	esp, ebp
pop	ebp
retn
sub_5D1660 endp

align 10h


; Attributes: bp-based frame

sub_5D16B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D1707
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D1707:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D16B0 endp

align 10h


; Attributes: bp-based frame

sub_5D1720 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_596830
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_4E2FC0
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D1720 endp

align 10h


; Attributes: bp-based frame

sub_5D17A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D17E5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D42B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D17E5:
mov	esp, ebp
pop	ebp
retn
sub_5D17A0 endp

align 10h


; Attributes: bp-based frame

sub_5D17F0 proc	near

var_2C=	dword ptr -2Ch
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5D1806
mov	eax, [ebp+arg_0]
jmp	short loc_5D181F

loc_5D1806:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_5D1EA0

loc_5D181F:
mov	esp, ebp
pop	ebp
retn	8
sub_5D17F0 endp

align 10h


; Attributes: bp-based frame

sub_5D1830 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_5DDE90
mov	[ebp+var_10], eax
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx		; void *
call	sub_5D5B30
add	esp, 8
mov	edx, [ebp+var_10]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	ecx, [ebp+var_C]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D1830 endp

align 10h


; Attributes: bp-based frame

sub_5D18B0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_18]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5C60
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D1907
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D1907:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_18]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D18B0 endp

align 10h


; Attributes: bp-based frame

sub_5D1920 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1965
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D4830
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1965:
mov	esp, ebp
pop	ebp
retn
sub_5D1920 endp

align 10h


; Attributes: bp-based frame

sub_5D1970 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 10h
cmp	edx, [ebp+var_8]
jz	short loc_5D19B2
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 10h
push	edx
call	sub_406610
add	esp, 0Ch

loc_5D19B2:
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
sub	ecx, 10h
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5D1970 endp

align 10h


; Attributes: bp-based frame

sub_5D19E0 proc	near

var_20=	dword ptr -20h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jnz	short loc_5D19F6
mov	eax, [ebp+arg_0]
jmp	short loc_5D1A0F

loc_5D19F6:
xor	ecx, ecx
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_57CB80

loc_5D1A0F:
mov	esp, ebp
pop	ebp
retn	8
sub_5D19E0 endp

align 10h


; Attributes: bp-based frame

sub_5D1A20 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_47C590
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_5D1A69
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_5D12F0
mov	eax, 1
jmp	short loc_5D1A6B

loc_5D1A69:
xor	eax, eax

loc_5D1A6B:
mov	esp, ebp
pop	ebp
retn	4
sub_5D1A20 endp

align 10h


; Attributes: bp-based frame

sub_5D1A80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5D1AC5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5D4C40
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5D1AC5:
mov	esp, ebp
pop	ebp
retn
sub_5D1A80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D1AD0(void *, int)
sub_5D1AD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4-4]
mov	[ebp+arg_0], edx
mov	[ebp+var_4], 0
jmp	short loc_5D1AFC

loc_5D1AEA:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
sub	ecx, 4
mov	[ebp+arg_0], ecx

loc_5D1AFC:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_5D1B2B
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_5D1B16
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx]
call	sub_64A430

loc_5D1B16:
xor	edx, edx
and	edx, 1
jz	short loc_5D1B29
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D1B29:
jmp	short loc_5D1AEA

loc_5D1B2B:
mov	esp, ebp
pop	ebp
retn
sub_5D1AD0 endp

align 10h


; Attributes: bp-based frame

sub_5D1B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_4017A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5D1B50
mov	ecx, [ebp+var_4]
push	ecx
call	sub_401750

loc_5D1B50:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D1B30 endp

align 10h


; Attributes: bp-based frame

sub_5D1B60 proc	near

var_74=	dword ptr -74h
var_40=	dword ptr -40h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
mov	eax, [ebp+var_74]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnb	short loc_5D1BBA
mov	eax, [ebp+var_4]
sub	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_74]
mov	edx, [ecx]
mov	eax, [ebp+arg_4]
lea	ecx, [edx+eax*4]
push	ecx		; void *
call	sub_5D1AD0
add	esp, 8
mov	edx, [ebp+var_74]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
shr	ecx, 1
cmp	[ebp+arg_4], ecx
jnb	short loc_5D1BB8
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_74]
call	sub_5D1F40

loc_5D1BB8:
jmp	short loc_5D1BE1

loc_5D1BBA:
mov	ecx, [ebp+var_74]
mov	edx, [ecx+8]
mov	[ebp+var_40], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_40]
jb	short loc_5D1BE1
mov	ecx, [ebp+arg_4]
shr	ecx, 2
add	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_74]
call	sub_5D1F40

loc_5D1BE1:
mov	eax, [ebp+var_74]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	esp, ebp
pop	ebp
retn	8
sub_5D1B60 endp



; Attributes: bp-based frame

sub_5D1BF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	[ebp+var_4]
add	esp, 4
mov	esp, ebp
pop	ebp
retn	4
sub_5D1BF0 endp

align 10h


; Attributes: bp-based frame

sub_5D1C10 proc	near

var_58=	dword ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_58]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_58]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5C90
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D1C67
mov	edx, 1
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D1C67:
mov	ecx, [ebp+var_58]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_58]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D1C10 endp

align 10h


; Attributes: bp-based frame

sub_5D1C80 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5CC0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5D1CD7
mov	edx, 1
imul	edx, 60h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D1CD7:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5D1C80 endp

align 10h


; Attributes: bp-based frame

sub_5D1CF0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5D1D2F

loc_5D1D26:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5D1D2F:
cmp	[ebp+var_C], 0
jle	short loc_5D1D55
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5DB2E0
mov	ecx, [ebp+var_10]
add	ecx, 5Ch
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 5Ch
mov	[ebp+var_14], edx
jmp	short loc_5D1D26

loc_5D1D55:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
push	0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5DB0E0
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D1CF0 endp

align 10h


; Attributes: bp-based frame

sub_5D1D90 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5D1DCF

loc_5D1DC6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5D1DCF:
cmp	[ebp+var_C], 0
jle	short loc_5D1E05
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_10]
add	eax, 4
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_4023E0
mov	ecx, [ebp+var_10]
add	ecx, 2Ch
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 2Ch
mov	[ebp+var_14], edx
jmp	short loc_5D1DC6

loc_5D1E05:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
push	0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5DB140
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D1D90 endp

align 10h


; Attributes: bp-based frame

sub_5D1E40 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
xor	eax, eax
mov	[ebp+var_5], al
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5D5CF0
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
push	0
mov	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5DB190
add	esp, 0Ch
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D1E40 endp

align 10h


; Attributes: bp-based frame

sub_5D1EA0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5D1EDF

loc_5D1ED6:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5D1EDF:
cmp	[ebp+var_C], 0
jle	short loc_5D1F05
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5CF460
mov	ecx, [ebp+var_10]
add	ecx, 60h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 60h
mov	[ebp+var_14], edx
jmp	short loc_5D1ED6

loc_5D1F05:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx+4]
mov	[ebp+var_24], edx
push	0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5DB1F0
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D1EA0 endp

align 10h


; Attributes: bp-based frame

sub_5D1F40 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_34], ecx
xor	eax, eax
jz	short loc_5D1F63
mov	ecx, [ebp+var_34]
mov	edx, [ecx+8]
mov	[ebp+var_10], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_10]
jnb	short loc_5D1F63
jmp	loc_5D212D

loc_5D1F63:
cmp	[ebp+arg_4], 0
jnb	short loc_5D1F70
mov	[ebp+arg_4], 0

loc_5D1F70:
cmp	[ebp+arg_4], 0
jnz	short loc_5D1FA7
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx], 0
jz	short loc_5D1F98
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_401750
mov	edx, [ebp+var_34]
mov	dword ptr [edx], 0

loc_5D1F98:
mov	eax, [ebp+var_34]
mov	dword ptr [eax+8], 0
jmp	loc_5D212D

loc_5D1FA7:
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
lea	eax, [edx+ecx-1]
xor	edx, edx
div	[ebp+var_4]
imul	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	eax, [ebp+var_34]
cmp	dword ptr [eax], 0
jz	loc_5D20FA
mov	ecx, 1
test	ecx, ecx
jz	short loc_5D2008
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, dword_1855FC0
mov	edx, [eax]
mov	ecx, dword_1855FC0
mov	eax, [edx+2Ch]
call	eax
mov	ecx, [ebp+var_34]
mov	[ecx], eax
jmp	loc_5D20F8

loc_5D2008:
mov	[ebp+var_1C], 2
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
shl	eax, 2
push	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	ecx, dword_1855FC0
mov	eax, [edx+28h]
call	eax
mov	[ebp+var_8], eax
mov	[ebp+var_C], 0
jmp	short loc_5D2042

loc_5D2039:
mov	ecx, [ebp+var_C]
add	ecx, 1
mov	[ebp+var_C], ecx

loc_5D2042:
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_C]
cmp	eax, [edx+4]
jnb	loc_5D20DF
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	eax, [ebp+var_C]
lea	ecx, [edx+eax*4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
push	ecx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jz	short loc_5D20A0
mov	edx, [ebp+var_24]
cmp	dword ptr [edx], 0
jz	short loc_5D208E
mov	eax, [ebp+var_24]
mov	ecx, [eax]
call	sub_64A420

loc_5D208E:
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_38], ecx
jmp	short loc_5D20A7

loc_5D20A0:
mov	[ebp+var_38], 0

loc_5D20A7:
mov	edx, [ebp+var_34]
mov	eax, [edx]
mov	ecx, [ebp+var_C]
lea	edx, [eax+ecx*4]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_28]
cmp	dword ptr [eax], 0
jz	short loc_5D20C7
mov	ecx, [ebp+var_28]
mov	ecx, [ecx]
call	sub_64A430

loc_5D20C7:
xor	edx, edx
and	edx, 1
jz	short loc_5D20DA
mov	eax, [ebp+var_28]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D20DA:
jmp	loc_5D2039

loc_5D20DF:
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_401750
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_8]
mov	[ecx], edx

loc_5D20F8:
jmp	short loc_5D2124

loc_5D20FA:
mov	[ebp+var_30], 2
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
push	ecx
mov	edx, dword_1855FC0
mov	eax, [edx]
mov	ecx, dword_1855FC0
mov	edx, [eax+28h]
call	edx
mov	ecx, [ebp+var_34]
mov	[ecx], eax

loc_5D2124:
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_4]
mov	[edx+8], eax

loc_5D212D:
mov	esp, ebp
pop	ebp
retn	8
sub_5D1F40 endp

align 10h


; Attributes: bp-based frame

sub_5D2140 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	[ebp+var_8], 0
jmp	short loc_5D2167

loc_5D2155:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_5D2167:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jnb	short loc_5D21A0
mov	ecx, [ebp+var_4]
push	ecx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_5D2197
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5D219E

loc_5D2197:
mov	[ebp+var_10], 0

loc_5D219E:
jmp	short loc_5D2155

loc_5D21A0:
mov	esp, ebp
pop	ebp
retn
sub_5D2140 endp

align 10h


; Attributes: bp-based frame

sub_5D21B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
movzx	ecx, word ptr [eax+0Ah]
cmp	[ebp+arg_0], ecx
jb	short loc_5D21C9
xor	eax, eax
jmp	short loc_5D2227

loc_5D21C9:
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+ecx*4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	dword ptr [ecx+edx*4], 0
cmp	[ebp+var_4], 0
jz	short loc_5D2200
mov	eax, [ebp+var_8]
mov	cx, [eax+0Ch]
sub	cx, 1
mov	edx, [ebp+var_8]
mov	[edx+0Ch], cx

loc_5D2200:
mov	eax, [ebp+var_8]
movzx	ecx, word ptr [eax+0Ah]
sub	ecx, 1
movzx	edx, cx
cmp	[ebp+arg_0], edx
jnz	short loc_5D2224
mov	eax, [ebp+var_8]
mov	cx, [eax+0Ah]
sub	cx, 1
mov	edx, [ebp+var_8]
mov	[edx+0Ah], cx

loc_5D2224:
mov	eax, [ebp+var_4]

loc_5D2227:
mov	esp, ebp
pop	ebp
retn	4
sub_5D21B0 endp

align 10h


; Attributes: bp-based frame

sub_5D2230 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_5D2307
mov	ecx, [ebp+var_14]
call	sub_5E0AF0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5D2290
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_5D2307

loc_5D2290:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5D64E0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_5D22B8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_5D22CC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_5D22B8

loc_5D22CC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_5D22DE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5D22F2
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_5D22DE

loc_5D22F2:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_5D2307:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5D2230 endp



; Attributes: bp-based frame

; int __stdcall	sub_5D2310(void	*)
sub_5D2310 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5D2319:
cmp	[ebp+arg_0], 0
jz	short loc_5D2369
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5D2310
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D6A80
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D2361
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D2361:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D2319

loc_5D2369:
mov	esp, ebp
pop	ebp
retn	4
sub_5D2310 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D2370(void	*)
sub_5D2370 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5D2379:
cmp	[ebp+arg_0], 0
jz	short loc_5D23C9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5D2370
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5BA0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D23C1
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D23C1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D2379

loc_5D23C9:
mov	esp, ebp
pop	ebp
retn	4
sub_5D2370 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D23D0(void	*)
sub_5D23D0 proc	near

var_58=	dword ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx

loc_5D23D9:
cmp	[ebp+arg_0], 0
jz	short loc_5D2429
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_58]
call	sub_5D23D0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5C90
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D2421
mov	edx, 1
imul	edx, 28h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D2421:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D23D9

loc_5D2429:
mov	esp, ebp
pop	ebp
retn	4
sub_5D23D0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D2430(void	*)
sub_5D2430 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5D2439:
cmp	[ebp+arg_0], 0
jz	short loc_5D2489
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5D2430
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D7B80
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D2481
mov	edx, 1
shl	edx, 6
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D2481:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D2439

loc_5D2489:
mov	esp, ebp
pop	ebp
retn	4
sub_5D2430 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D2490(void	*)
sub_5D2490 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5D2499:
cmp	[ebp+arg_0], 0
jz	short loc_5D24E9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5D2490
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D8090
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D24E1
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D24E1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D2499

loc_5D24E9:
mov	esp, ebp
pop	ebp
retn	4
sub_5D2490 endp

align 10h


; Attributes: bp-based frame

sub_5D24F0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_20], ecx
push	4
mov	eax, [ebp+arg_0]
push	eax
call	sub_81BDF0
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_20], 0
jz	short loc_5D251B
mov	ecx, [ebp+var_20]
sub	ecx, 28h
mov	[ebp+var_24], ecx
jmp	short loc_5D2522

loc_5D251B:
mov	[ebp+var_24], 0

loc_5D2522:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_24]
mov	[edx], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx]
mov	ecx, [ebp+var_20]
mov	eax, [edx+4]
call	eax
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7D0
add	esp, 8
push	0FFFFFFFEh
mov	edx, [ebp+arg_0]
push	edx
call	sub_481E90
add	esp, 8
mov	esp, ebp
pop	ebp
retn	4
sub_5D24F0 endp

align 10h


; Attributes: bp-based frame

sub_5D2560 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_48=	dword ptr -48h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	byte ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
push	esi
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_8]
mov	ecx, [ebp+var_70]
call	sub_402EB0
mov	[ebp+var_4], 0
jmp	short loc_5D258F

loc_5D257E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_5D258F:
lea	eax, [ebp+var_10]
mov	ecx, [ebp+var_70]
call	sub_4046E0
lea	edx, [ebp+var_24]
mov	ecx, eax
mov	eax, edx
call	sub_402EB0
mov	eax, [ebp+var_8]
xor	ecx, ecx
cmp	eax, [ebp+var_24]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5D25C2
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_0]
jnb	short loc_5D25C2
jmp	short loc_5D257E

loc_5D25C2:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnz	short loc_5D25F2
push	ecx
mov	eax, esp
mov	ecx, [ebp+var_70]
call	sub_4046E0
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_28]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_70]
call	sub_5D5DC0
jmp	short loc_5D2625

loc_5D25F2:
mov	esi, [ebp+arg_0]
sub	esi, [ebp+var_4]
lea	eax, [ebp+var_68]
mov	ecx, [ebp+var_70]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	ecx, [ebp+var_70]
call	sub_5D6400
mov	[ebp+var_6C], esi

loc_5D2625:
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_5D2560 endp

align 10h


; Attributes: bp-based frame

sub_5D2630 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5D2641:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_5D2679
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_5D2677
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D2677:
jmp	short loc_5D2641

loc_5D2679:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_5D2630 endp

align 10h


; Attributes: bp-based frame

sub_5D2690 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_5D2897
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 2
cmp	[ebp+var_4], eax
jbe	loc_5D2763
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_5D6480
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_51EF50
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_98]
call	sub_444710
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [edx+eax*4]
mov	edx, [ebp+var_98]
mov	[edx+8], ecx
jmp	loc_5D2880

loc_5D2763:
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_98]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	edx, [ebp+var_4]
jb	short loc_5D27CA
xor	eax, eax
mov	[ebp+var_11], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_70]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+var_68]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
xor	eax, eax
mov	[ebp+var_71], al
jmp	loc_5D2880

loc_5D27CA:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
lea	eax, [edx+eax*4]
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	edx, [ebp+var_80]
push	edx
call	sub_406610
add	esp, 0Ch
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx+4]
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_90]
push	eax
mov	ecx, [ebp+var_8C]
push	ecx
call	sub_407C50
add	esp, 0Ch

loc_5D2880:
mov	edx, [ebp+var_98]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	eax, [ebp+var_98]
mov	[eax+4], edx

loc_5D2897:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_5D2690 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D28B0(void	*)
sub_5D28B0 proc	near

var_60=	dword ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx

loc_5D28B9:
cmp	[ebp+arg_0], 0
jz	short loc_5D2909
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_60]
call	sub_5D28B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5BE0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D2901
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D2901:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D28B9

loc_5D2909:
mov	esp, ebp
pop	ebp
retn	4
sub_5D28B0 endp

align 10h


; Attributes: bp-based frame

sub_5D2910 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_98], ecx
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	[ebp+var_4], 0
jmp	short loc_5D294F

loc_5D293E:
lea	eax, [ebp+var_8]
call	sub_405E90
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_5D294F:
mov	ecx, [ebp+var_98]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	eax, [ebp+var_2C]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_8]
xor	edx, edx
cmp	ecx, [ebp+var_2C]
setnz	dl
mov	[ebp+var_99], dl
movzx	eax, [ebp+var_99]
test	eax, eax
jz	short loc_5D2994
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jnb	short loc_5D2994
jmp	short loc_5D293E

loc_5D2994:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jnz	short loc_5D29CE
push	ecx
mov	[ebp+var_30], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	[ebp+var_34], esp
mov	ecx, [ebp+var_8]
mov	eax, [ebp+var_34]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_98]
call	sub_490040
jmp	short loc_5D2A19

loc_5D29CE:
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_4]
mov	[ebp+var_94], ecx
lea	edx, [ebp+var_90]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_94]
push	ecx
push	ecx
mov	[ebp+var_5C], esp
mov	ecx, [ebp+var_90]
mov	eax, [ebp+var_5C]
call	sub_4046E0
mov	ecx, [ebp+var_98]
call	sub_470D60

loc_5D2A19:
mov	esp, ebp
pop	ebp
retn	8
sub_5D2910 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D2A20(void	*)
sub_5D2A20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5D2A29:
cmp	[ebp+arg_0], 0
jz	short loc_5D2A79
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5D2A20
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5CC0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D2A71
mov	edx, 1
imul	edx, 60h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D2A71:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D2A29

loc_5D2A79:
mov	esp, ebp
pop	ebp
retn	4
sub_5D2A20 endp

align 10h


; Attributes: bp-based frame

sub_5D2A80 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5D5E30
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5D5F90
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5D2B03

loc_5D2AFA:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5D2B03:
cmp	[ebp+var_40], 0
jle	short loc_5D2B2D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5D5A20
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 5Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 5Ch
mov	[ebp+var_3C], eax
jmp	short loc_5D2AFA

loc_5D2B2D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5D2B54
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5D5A20
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 5Ch
mov	[ebp+var_C], ecx
jmp	short loc_5D2BA9

loc_5D2B54:
mov	edx, [ebp+arg_C]
imul	edx, 5Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5D2B8B

loc_5D2B79:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 5Ch
mov	[ebp+var_68], eax

loc_5D2B8B:
cmp	[ebp+var_6C], 0
jle	short loc_5D2BA3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5D5A20
add	esp, 8
jmp	short loc_5D2B79

loc_5D2BA3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5D2BA9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5D2C41
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5D2C08

loc_5D2BFF:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5D2C08:
cmp	[ebp+var_80], 0
jle	short loc_5D2C3B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5D5A20
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 5Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 5Ch
mov	[ebp+var_7C], eax
jmp	short loc_5D2BFF

loc_5D2C3B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5D2C41:
mov	ecx, [ebp+var_CC]
call	sub_5D5F10
mov	edx, [ebp+var_4]
imul	edx, 5Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5D2A80 endp

align 10h


; Attributes: bp-based frame

sub_5D2C90 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5E3850
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5E0ED0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5D2D13

loc_5D2D0A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5D2D13:
cmp	[ebp+var_40], 0
jle	short loc_5D2D3D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5D5A70
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 2Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 2Ch
mov	[ebp+var_3C], eax
jmp	short loc_5D2D0A

loc_5D2D3D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5D2D64
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5D5A70
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 2Ch
mov	[ebp+var_C], ecx
jmp	short loc_5D2DB9

loc_5D2D64:
mov	edx, [ebp+arg_C]
imul	edx, 2Ch
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5D2D9B

loc_5D2D89:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 2Ch
mov	[ebp+var_68], eax

loc_5D2D9B:
cmp	[ebp+var_6C], 0
jle	short loc_5D2DB3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5D5A70
add	esp, 8
jmp	short loc_5D2D89

loc_5D2DB3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5D2DB9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5D2E51
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5D2E18

loc_5D2E0F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5D2E18:
cmp	[ebp+var_80], 0
jle	short loc_5D2E4B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5D5A70
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 2Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 2Ch
mov	[ebp+var_7C], eax
jmp	short loc_5D2E0F

loc_5D2E4B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5D2E51:
mov	ecx, [ebp+var_CC]
call	sub_5D6010
mov	edx, [ebp+var_4]
imul	edx, 2Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5D2C90 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D2EA0(void	*)
sub_5D2EA0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5D2EA9:
cmp	[ebp+arg_0], 0
jz	short loc_5D2EFC
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5D2EA0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D2EF4
mov	edx, 1
imul	edx, 1F4h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D2EF4:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D2EA9

loc_5D2EFC:
mov	esp, ebp
pop	ebp
retn	4
sub_5D2EA0 endp

align 10h


; Attributes: bp-based frame

sub_5D2F10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5D2F33
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_5D2F33:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D2F10 endp

align 10h


; Attributes: bp-based frame

sub_5D2F40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_5D3017
mov	ecx, [ebp+var_14]
call	sub_5021C0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5D2FA0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_5D3017

loc_5D2FA0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5D9630
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_5D2FC8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_5D2FDC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_5D2FC8

loc_5D2FDC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_5D2FEE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5D3002
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_5D2FEE

loc_5D3002:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_5D3017:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5D2F40 endp



; Attributes: bp-based frame

sub_5D3020 proc	near

var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1C5= byte ptr -1C5h
var_1C4= dword ptr -1C4h
var_1B9= byte ptr -1B9h
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_169= byte ptr -169h
var_168= dword ptr -168h
var_161= byte ptr -161h
var_159= byte ptr -159h
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E1=	byte ptr -0E1h
var_E0=	dword ptr -0E0h
var_D9=	byte ptr -0D9h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 218h
mov	[ebp+var_214], ecx
mov	ecx, [ebp+var_214]
call	sub_4A8270
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_214]
jz	loc_5D35A7
mov	ecx, [ebp+arg_0]
call	sub_4A8270
cmp	[ebp+var_4], eax
jb	loc_5D3244
sub	esp, 10h
mov	[ebp+var_CC], esp
mov	ecx, [ebp+var_214]
add	ecx, 10h
mov	edx, [ebp+var_CC]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_10C]
mov	[ebp+var_D0], edx
mov	eax, [ebp+var_214]
mov	ecx, [ebp+var_D0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	edx, [ecx]
mov	[ebp+var_30], edx
mov	eax, [ecx+4]
mov	[ebp+var_2C], eax
mov	edx, [ecx+8]
mov	[ebp+var_28], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_40], edx
mov	eax, [ecx+4]
mov	[ebp+var_3C], eax
mov	edx, [ecx+8]
mov	[ebp+var_38], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_130], ecx
mov	edx, [ebp+var_2C]
mov	[ebp+var_12C], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_128], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_124], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_120], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_11C], eax
mov	ecx, [ebp+var_38]
mov	[ebp+var_118], ecx
mov	edx, [ebp+var_34]
mov	[ebp+var_114], edx
sub	esp, 10h
mov	[ebp+var_110], esp
xor	eax, eax
mov	[ebp+var_D9], al
mov	cl, [ebp+var_D9]
mov	[ebp+var_D1], cl
lea	edx, [ebp+var_FC]
mov	[ebp+var_E0], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_10C]
mov	[eax], ecx
mov	edx, [ebp+var_108]
mov	[eax+4], edx
mov	ecx, [ebp+var_104]
mov	[eax+8], ecx
mov	edx, [ebp+var_100]
mov	[eax+0Ch], edx
push	0
lea	eax, [ebp+var_E1]
push	eax
sub	esp, 10h
mov	[ebp+var_EC], esp
mov	ecx, [ebp+var_EC]
mov	edx, [ebp+var_FC]
mov	[ecx], edx
mov	eax, [ebp+var_F8]
mov	[ecx+4], eax
mov	edx, [ebp+var_F4]
mov	[ecx+8], edx
mov	eax, [ebp+var_F0]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_130]
mov	[ecx], edx
mov	eax, [ebp+var_12C]
mov	[ecx+4], eax
mov	edx, [ebp+var_128]
mov	[ecx+8], edx
mov	eax, [ebp+var_124]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	ecx, esp
mov	edx, [ebp+var_120]
mov	[ecx], edx
mov	eax, [ebp+var_11C]
mov	[ecx+4], eax
mov	edx, [ebp+var_118]
mov	[ecx+8], edx
mov	eax, [ebp+var_114]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_110]
push	ecx
call	sub_4D47C0
add	esp, 3Ch
mov	edx, [ebp+var_110]
mov	[ebp+var_218], edx
lea	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_214]
call	sub_4AB0F0
jmp	loc_5D35A7

loc_5D3244:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_60], edx
mov	eax, [ecx+4]
mov	[ebp+var_5C], eax
mov	edx, [ecx+8]
mov	[ebp+var_58], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_154], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_150], edx
mov	eax, [ebp+var_58]
mov	[ebp+var_14C], eax
mov	ecx, [ebp+var_54]
mov	[ebp+var_148], ecx
mov	edx, [ebp+var_4]
push	edx
lea	ecx, [ebp+var_154]
call	sub_4AC610
mov	eax, [ebp+var_154]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_150]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_148]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_194]
mov	[ebp+var_158], ecx
mov	edx, [ebp+var_214]
mov	eax, [ebp+var_158]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_74], ecx
mov	edx, [eax+4]
mov	[ebp+var_70], edx
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_1B4], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_1B0], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_1AC], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_1A8], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_1A4], ecx
mov	edx, [ebp+var_70]
mov	[ebp+var_1A0], edx
mov	eax, [ebp+var_6C]
mov	[ebp+var_19C], eax
mov	ecx, [ebp+var_68]
mov	[ebp+var_198], ecx
xor	edx, edx
mov	[ebp+var_161], dl
mov	al, [ebp+var_161]
mov	[ebp+var_159], al
lea	ecx, [ebp+var_184]
mov	[ebp+var_168], ecx
mov	edx, [ebp+var_168]
mov	eax, [ebp+var_194]
mov	[edx], eax
mov	ecx, [ebp+var_190]
mov	[edx+4], ecx
mov	eax, [ebp+var_18C]
mov	[edx+8], eax
mov	ecx, [ebp+var_188]
mov	[edx+0Ch], ecx
push	0
lea	edx, [ebp+var_169]
push	edx
sub	esp, 10h
mov	[ebp+var_174], esp
mov	eax, [ebp+var_174]
mov	ecx, [ebp+var_184]
mov	[eax], ecx
mov	edx, [ebp+var_180]
mov	[eax+4], edx
mov	ecx, [ebp+var_17C]
mov	[eax+8], ecx
mov	edx, [ebp+var_178]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_1B4]
mov	[eax], ecx
mov	edx, [ebp+var_1B0]
mov	[eax+4], edx
mov	ecx, [ebp+var_1AC]
mov	[eax+8], ecx
mov	edx, [ebp+var_1A8]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	eax, esp
mov	ecx, [ebp+var_1A4]
mov	[eax], ecx
mov	edx, [ebp+var_1A0]
mov	[eax+4], edx
mov	ecx, [ebp+var_19C]
mov	[eax+8], ecx
mov	edx, [ebp+var_198]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_84]
push	eax
call	sub_4D47C0
add	esp, 3Ch
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ecx+4]
mov	[ebp+var_90], eax
mov	edx, [ecx+8]
mov	[ebp+var_8C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_88], eax
lea	ecx, [ebp+var_1F0]
mov	[ebp+var_1B8], ecx
mov	edx, [ebp+var_214]
add	edx, 10h
mov	eax, [ebp+var_1B8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_94]
mov	[ebp+var_210], eax
mov	ecx, [ebp+var_90]
mov	[ebp+var_20C], ecx
mov	edx, [ebp+var_8C]
mov	[ebp+var_208], edx
mov	eax, [ebp+var_88]
mov	[ebp+var_204], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_200], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_1FC], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_1F8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1F4], ecx
xor	edx, edx
mov	[ebp+var_1B9], dl
lea	eax, [ebp+var_1E0]
mov	[ebp+var_1C4], eax
mov	ecx, [ebp+var_1C4]
mov	edx, [ebp+var_1F0]
mov	[ecx], edx
mov	eax, [ebp+var_1EC]
mov	[ecx+4], eax
mov	edx, [ebp+var_1E8]
mov	[ecx+8], edx
mov	eax, [ebp+var_1E4]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_1C5]
push	ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_210]
mov	[edx], eax
mov	ecx, [ebp+var_20C]
mov	[edx+4], ecx
mov	eax, [ebp+var_208]
mov	[edx+8], eax
mov	ecx, [ebp+var_204]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	eax, [ebp+var_200]
mov	[edx], eax
mov	ecx, [ebp+var_1FC]
mov	[edx+4], ecx
mov	eax, [ebp+var_1F8]
mov	[edx+8], eax
mov	ecx, [ebp+var_1F4]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_1D0], esp
mov	edx, [ebp+var_1D0]
mov	eax, [ebp+var_1E0]
mov	[edx], eax
mov	ecx, [ebp+var_1DC]
mov	[edx+4], ecx
mov	eax, [ebp+var_1D8]
mov	[edx+8], eax
mov	ecx, [ebp+var_1D4]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_214]
call	sub_4CC4A0

loc_5D35A7:
mov	eax, [ebp+var_214]
mov	esp, ebp
pop	ebp
retn	4
sub_5D3020 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D35C0(void	*)
sub_5D35C0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5D35C9:
cmp	[ebp+arg_0], 0
jz	short loc_5D3619
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5D35C0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5C10
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D3611
mov	edx, 1
imul	edx, 44h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D3611:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D35C9

loc_5D3619:
mov	esp, ebp
pop	ebp
retn	4
sub_5D35C0 endp

align 10h


; Attributes: bp-based frame

sub_5D3620 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_5D36F7
mov	ecx, [ebp+var_14]
call	sub_5D1610
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5D3680
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_5D36F7

loc_5D3680:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5D9BE0
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_5D36A8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_5D36BC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_5D36A8

loc_5D36BC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_5D36CE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5D36E2
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_5D36CE

loc_5D36E2:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_5D36F7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5D3620 endp



; Attributes: bp-based frame

; int __stdcall	sub_5D3700(void	*)
sub_5D3700 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5D3709:
cmp	[ebp+arg_0], 0
jz	short loc_5D3759
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5D3700
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5DA720
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D3751
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D3751:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D3709

loc_5D3759:
mov	esp, ebp
pop	ebp
retn	4
sub_5D3700 endp

align 10h


; Attributes: bp-based frame

sub_5D3760 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_5D3837
mov	ecx, [ebp+var_14]
call	sub_5D1660
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5D37C0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_5D3837

loc_5D37C0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5DA180
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_5D37E8:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_5D37FC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_5D37E8

loc_5D37FC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_5D380E:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5D3822
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_5D380E

loc_5D3822:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_5D3837:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5D3760 endp



; Attributes: bp-based frame

sub_5D3840 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3C=	byte ptr -3Ch
var_34=	byte ptr -34h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	[ebp+var_7C], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_5C9500
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_7D], al
movzx	ecx, [ebp+var_7D]
test	ecx, ecx
jnz	short loc_5D38D3
or	[ebp+var_4C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_7C]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5D38D3
mov	[ebp+var_84], 0
jmp	short loc_5D38DD

loc_5D38D3:
mov	[ebp+var_84], 1

loc_5D38DD:
mov	al, byte ptr [ebp+var_84]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_5D38FA
and	[ebp+var_4C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D38FA:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5D399E
xor	eax, eax
mov	[ebp+var_64], eax
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
push	ecx
mov	edx, [ebp+var_64]
push	edx
lea	eax, [ebp+var_65]
push	eax
lea	ecx, [ebp+var_3C]
call	sub_4899B0
lea	ecx, [ebp+var_3C]
call	sub_471130
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_403850
lea	edx, [ebp+var_3C]
push	edx
lea	ecx, [ebp+var_1C]
call	sub_5D08C0
lea	eax, [ebp+var_78]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	ecx, [ebp+var_34]
push	ecx
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_78]
mov	eax, [ebp+var_74]
call	sub_4046E0
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_7C]
call	sub_5D7BD0
lea	eax, [ebp+var_48]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_1C]
call	sub_46B570
lea	ecx, [ebp+var_34]
call	sub_407910
lea	ecx, [ebp+var_3C]
call	sub_46B570

loc_5D399E:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5D3840 endp

align 10h


; Attributes: bp-based frame

sub_5D39B0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_3C=	byte ptr -3Ch
var_34=	byte ptr -34h
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_74], ecx
mov	[ebp+var_48], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_74]
call	sub_5C9500
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_74]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_54]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_54]
setz	al
mov	[ebp+var_75], al
movzx	ecx, [ebp+var_75]
test	ecx, ecx
jnz	short loc_5D3A40
or	[ebp+var_48], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_74]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_58]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5D3A40
mov	[ebp+var_7C], 0
jmp	short loc_5D3A47

loc_5D3A40:
mov	[ebp+var_7C], 1

loc_5D3A47:
mov	al, byte ptr [ebp+var_7C]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_48]
and	ecx, 1
jz	short loc_5D3A61
and	[ebp+var_48], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D3A61:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5D3ADF
lea	eax, [ebp+var_3C]
call	sub_401740
mov	[ebp+var_60], eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_34]
call	sub_403850
lea	ecx, [ebp+var_1C]
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
call	sub_401740
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_5C]
call	sub_402700
lea	edx, [ebp+var_70]
mov	[ebp+var_64], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_34]
push	eax
push	ecx
mov	[ebp+var_6C], esp
mov	ecx, [ebp+var_70]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_5D80D0
lea	edx, [ebp+var_44]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_34]
call	sub_407910

loc_5D3ADF:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5D39B0 endp

align 10h


; Attributes: bp-based frame

sub_5D3AF0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 2
mov	[ebp+var_40], edx
jmp	short loc_5D3B6E

loc_5D3B65:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5D3B6E:
cmp	[ebp+var_40], 0
jle	short loc_5D3B98
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5DD850
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 4
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 4
mov	[ebp+var_3C], ecx
jmp	short loc_5D3B65

loc_5D3B98:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5D3BBF
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5DD850
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_5D3C0F

loc_5D3BBF:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 2
mov	[ebp+var_6C], ecx
jmp	short loc_5D3BF1

loc_5D3BDF:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 4
mov	[ebp+var_68], eax

loc_5D3BF1:
cmp	[ebp+var_6C], 0
jle	short loc_5D3C09
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5DD850
add	esp, 8
jmp	short loc_5D3BDF

loc_5D3C09:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5D3C0F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5D3CA2
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 2
mov	[ebp+var_80], eax
jmp	short loc_5D3C69

loc_5D3C60:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_5D3C69:
cmp	[ebp+var_80], 0
jle	short loc_5D3C9C
mov	edx, [ebp+var_8C]
push	edx		; int
mov	eax, [ebp+var_7C]
push	eax		; void *
call	sub_5DD850
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 4
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 4
mov	[ebp+var_7C], edx
jmp	short loc_5D3C60

loc_5D3C9C:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_5D3CA2:
mov	ecx, [ebp+var_CC]
call	sub_5D6090
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5D3AF0 endp

align 10h


; Attributes: bp-based frame

sub_5D3CF0 proc	near

var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E0h
mov	[ebp+var_D4], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_5E9440
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_D4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_D5], al
movzx	ecx, [ebp+var_D5]
test	ecx, ecx
jnz	loc_5D3DF7
or	[ebp+var_58], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_68], edx
mov	eax, [ebp+var_D4]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_68]
mov	[ebp+var_DC], edx
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_E0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D3DD6
jb	short loc_5D3DCA
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_E0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D3DD6

loc_5D3DCA:
mov	[ebp+var_E4], 1
jmp	short loc_5D3DE0

loc_5D3DD6:
mov	[ebp+var_E4], 0

loc_5D3DE0:
movzx	ecx, byte ptr [ebp+var_E4]
test	ecx, ecx
jnz	short loc_5D3DF7
mov	[ebp+var_E8], 0
jmp	short loc_5D3E01

loc_5D3DF7:
mov	[ebp+var_E8], 1

loc_5D3E01:
mov	dl, byte ptr [ebp+var_E8]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_58]
and	eax, 1
jz	short loc_5D3E24
and	[ebp+var_58], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5D3E24:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5D3EBD
mov	[ebp+var_48], 0
mov	[ebp+var_44], 0
push	0
lea	edx, [ebp+var_49]
push	edx
lea	ecx, [ebp+var_40]
call	sub_489990
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [eax+4]
mov	[ebp+var_38], edx
lea	eax, [ebp+var_48]
push	eax
lea	ecx, [ebp+var_34]
call	sub_5D0A80
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	edx, [ebp+var_3C]
push	edx
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_78]
mov	eax, [ebp+var_74]
call	sub_4046E0
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_5D6FA0
lea	ecx, [ebp+var_54]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_EC]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_34]
call	sub_5D0B30
lea	ecx, [ebp+var_48]
call	sub_5D0B30

loc_5D3EBD:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5D3CF0 endp

align 10h


; Attributes: bp-based frame

sub_5D3EE0 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_70=	byte ptr -70h
var_68=	byte ptr -68h
var_60=	byte ptr -60h
var_48=	dword ptr -48h
var_40=	byte ptr -40h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0BCh
mov	[ebp+var_B0], ecx
mov	[ebp+var_7C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B0]
call	sub_5DE010
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_B0]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_88]
mov	[ebp+var_84], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_84]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_88]
setz	al
mov	[ebp+var_B1], al
movzx	ecx, [ebp+var_B1]
test	ecx, ecx
jnz	short loc_5D3F9A
or	[ebp+var_7C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_B0]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8C]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5D3F9A
mov	[ebp+var_B8], 0
jmp	short loc_5D3FA4

loc_5D3F9A:
mov	[ebp+var_B8], 1

loc_5D3FA4:
mov	cl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_7C]
and	edx, 1
jz	short loc_5D3FB9
and	[ebp+var_7C], 0FFFFFFFEh

loc_5D3FB9:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5D4078
lea	ecx, [ebp+var_70]
call	sub_5D5D80
mov	[ebp+var_98], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_98]
push	eax
lea	ecx, [ebp+var_40]
call	sub_5D61F0
lea	ecx, [ebp+var_A8]
mov	[ebp+var_9C], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_9C]
call	sub_4046E0
lea	edx, [ebp+var_48]
push	edx
push	ecx
mov	[ebp+var_A4], esp
mov	ecx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
call	sub_4046E0
lea	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_B0]
call	sub_5D76B0
lea	ecx, [ebp+var_78]
mov	[ebp+var_BC], ecx
mov	edx, [ebp+var_BC]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_40]
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_AC]
add	ecx, 8
call	sub_429100
lea	ecx, [ebp+var_60]
call	sub_407910
lea	ecx, [ebp+var_68]
call	sub_429100

loc_5D4078:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_5D3EE0 endp

align 10h


; Attributes: bp-based frame

sub_5D4090 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_58], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5DE010
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_59], al
movzx	ecx, [ebp+var_59]
test	ecx, ecx
jnz	short loc_5D4120
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_58]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5D4120
mov	[ebp+var_60], 0
jmp	short loc_5D4127

loc_5D4120:
mov	[ebp+var_60], 1

loc_5D4127:
mov	cl, byte ptr [ebp+var_60]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_5D4139
and	[ebp+var_2C], 0FFFFFFFEh

loc_5D4139:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5D41D4
mov	[ebp+var_20], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_18]
mov	[ebp+var_40], eax
cmp	[ebp+var_20], 0
jz	short loc_5D4168
mov	ecx, [ebp+var_20]
call	sub_64A420

loc_5D4168:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_20]
mov	[ecx], edx
lea	eax, [ebp+var_50]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_44]
call	sub_4046E0
lea	ecx, [ebp+var_1C]
push	ecx
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_50]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_58]
call	sub_5D6AD0
lea	eax, [ebp+var_28]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_18]
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
cmp	dword ptr [ecx], 0
jz	short loc_5D41C6
mov	edx, [ebp+var_54]
mov	ecx, [edx]
call	sub_64A430

loc_5D41C6:
cmp	[ebp+var_20], 0
jz	short loc_5D41D4
mov	ecx, [ebp+var_20]
call	sub_64A430

loc_5D41D4:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5D4090 endp



; Attributes: bp-based frame

sub_5D41E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwouiinterface ; "LWOUIInterface"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_5DA760
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1513344 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5D41E0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D42B0(void	*)
sub_5D42B0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5D42B9:
cmp	[ebp+arg_0], 0
jz	short loc_5D4309
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5D42B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5DA910
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D4301
mov	edx, 1
imul	edx, 74h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D4301:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D42B9

loc_5D4309:
mov	esp, ebp
pop	ebp
retn	4
sub_5D42B0 endp

align 10h


; Attributes: bp-based frame

sub_5D4310 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5D4328:
cmp	[ebp+var_8], 0
jz	short loc_5D436D
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5D4362
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5D436B

loc_5D4362:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5D436B:
jmp	short loc_5D4328

loc_5D436D:
push	0
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
call	sub_5DA7D0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5D4310 endp



; Attributes: bp-based frame

sub_5D4390 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5AA130
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5AA290
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5D4413

loc_5D440A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5D4413:
cmp	[ebp+var_40], 0
jle	short loc_5D443D
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5D5AE0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 60h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 60h
mov	[ebp+var_3C], eax
jmp	short loc_5D440A

loc_5D443D:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5D4464
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5D5AE0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 60h
mov	[ebp+var_C], ecx
jmp	short loc_5D44B9

loc_5D4464:
mov	edx, [ebp+arg_C]
imul	edx, 60h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5D449B

loc_5D4489:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 60h
mov	[ebp+var_68], eax

loc_5D449B:
cmp	[ebp+var_6C], 0
jle	short loc_5D44B3
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5D5AE0
add	esp, 8
jmp	short loc_5D4489

loc_5D44B3:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5D44B9:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5D4551
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5D4518

loc_5D450F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5D4518:
cmp	[ebp+var_80], 0
jle	short loc_5D454B
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5D5AE0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 60h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 60h
mov	[ebp+var_7C], eax
jmp	short loc_5D450F

loc_5D454B:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5D4551:
mov	ecx, [ebp+var_CC]
call	sub_5D6100
mov	edx, [ebp+var_4]
imul	edx, 60h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5D4390 endp

align 10h


; Attributes: bp-based frame

sub_5D45A0 proc	near

var_94=	dword ptr -94h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5D45A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_94]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_94]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_94]
add	edx, 8
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
xor	ecx, ecx
mov	[ebp+var_D], cl
lea	edx, [ebp+var_D]
push	edx
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_24]
call	sub_4046E0
mov	ecx, [ebp+var_94]
call	sub_5DA960
mov	eax, [ebp+var_94]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D45A0 endp

align 10h


; Attributes: bp-based frame

sub_5D4650 proc	near

var_404= dword ptr -404h
var_400= dword ptr -400h
var_3F9= byte ptr -3F9h
var_3F8= dword ptr -3F8h
var_3F4= dword ptr -3F4h
var_3F0= dword ptr -3F0h
var_3E8= dword ptr -3E8h
var_3E4= dword ptr -3E4h
var_3E0= dword ptr -3E0h
var_3DC= dword ptr -3DCh
var_3D8= dword ptr -3D8h
var_3D4= dword ptr -3D4h
var_3D0= dword ptr -3D0h
var_3CC= byte ptr -3CCh
var_3C4= dword ptr -3C4h
var_3C0= byte ptr -3C0h
var_1F8= byte ptr -1F8h
var_1E0= byte ptr -1E0h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 404h
push	esi
push	edi
mov	[ebp+var_3F8], ecx
mov	[ebp+var_3D0], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3F8]
call	sub_5C9500
mov	[ebp+var_3D4], eax
mov	ecx, [ebp+var_3D4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_3F8]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_3DC]
mov	[ebp+var_3D8], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_3D8]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_3DC]
setz	al
mov	[ebp+var_3F9], al
movzx	ecx, [ebp+var_3F9]
test	ecx, ecx
jnz	short loc_5D4715
or	[ebp+var_3D0], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3E0], edx
mov	eax, [ebp+var_3F8]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_3E0]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5D4715
mov	[ebp+var_400], 0
jmp	short loc_5D471F

loc_5D4715:
mov	[ebp+var_400], 1

loc_5D471F:
mov	al, byte ptr [ebp+var_400]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_3D0]
and	ecx, 1
jz	short loc_5D4742
and	[ebp+var_3D0], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D4742:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5D4815
mov	[ebp+var_3C4], 0
push	0		; int
push	0		; int
push	0		; Src
lea	ecx, [ebp+var_3C0]
call	sub_5CEE10
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_1F8]
call	sub_403850
lea	ecx, [ebp+var_1E0]
mov	[ebp+var_3E4], ecx
mov	edx, [ebp+var_3E4]
mov	eax, [ebp+var_3C4]
mov	[edx], eax
lea	esi, [ebp+var_3C0]
mov	edi, [ebp+var_3E4]
add	edi, 4
mov	ecx, 72h
rep movsd
lea	ecx, [ebp+var_3F4]
mov	[ebp+var_3E8], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_3E8]
call	sub_4046E0
lea	edx, [ebp+var_1F8]
push	edx
push	ecx
mov	[ebp+var_3F0], esp
mov	ecx, [ebp+var_3F4]
mov	eax, [ebp+var_3F0]
call	sub_4046E0
lea	eax, [ebp+var_3CC]
push	eax
mov	ecx, [ebp+var_3F8]
call	sub_5D9170
lea	ecx, [ebp+var_3CC]
mov	[ebp+var_404], ecx
mov	edx, [ebp+var_404]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_1F8]
call	sub_407910

loc_5D4815:
mov	eax, [ebp+var_4]
add	eax, 28h
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5D4650 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D4830(void	*)
sub_5D4830 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx

loc_5D4839:
cmp	[ebp+arg_0], 0
jz	short loc_5D4889
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_18]
call	sub_5D4830
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5D5C60
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D4881
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D4881:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D4839

loc_5D4889:
mov	esp, ebp
pop	ebp
retn	4
sub_5D4830 endp

align 10h


; Attributes: bp-based frame

sub_5D4890 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5D48AC:
cmp	[ebp+var_10], 0
jz	short loc_5D48F3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5D48E2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5D48EB

loc_5D48E2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5D48EB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5D48AC

loc_5D48F3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5D4995
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5D4986
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DAA20
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5D4A0B
jmp	short loc_5D4995

loc_5D4986:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5D4995:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5D49F0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DAA20
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5D4A0B

loc_5D49F0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5D4A0B:
mov	esp, ebp
pop	ebp
retn	8
sub_5D4890 endp

align 10h


; Attributes: bp-based frame

sub_5D4A20 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_34=	byte ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0B0h
mov	[ebp+var_A4], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A4]
call	sub_5DE140
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_A4]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_A5], al
movzx	ecx, [ebp+var_A5]
test	ecx, ecx
jnz	short loc_5D4AEE
or	[ebp+var_78], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_78], 2
or	[ebp+var_78], 4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_A4]
mov	dl, [ecx+14h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_88]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_5D4AEE
mov	[ebp+var_AC], 0
jmp	short loc_5D4AF8

loc_5D4AEE:
mov	[ebp+var_AC], 1

loc_5D4AF8:
mov	cl, byte ptr [ebp+var_AC]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_78]
and	edx, 4
jz	short loc_5D4B15
and	[ebp+var_78], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D4B15:
mov	eax, [ebp+var_78]
and	eax, 2
jz	short loc_5D4B29
and	[ebp+var_78], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_5D4B29:
mov	ecx, [ebp+var_78]
and	ecx, 1
jz	short loc_5D4B3D
and	[ebp+var_78], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_5D4B3D:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5D4C33
lea	ecx, [ebp+var_69]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_68]
call	sub_407D30
mov	[ebp+var_50], 0
lea	ecx, [ebp+var_68]
push	ecx
lea	ecx, [ebp+var_4C]
call	sub_403850
lea	edx, [ebp+var_34]
mov	[ebp+var_8C], edx
cmp	[ebp+var_50], 0
jz	short loc_5D4B88
mov	ecx, [ebp+var_50]
call	sub_64A420

loc_5D4B88:
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+var_50]
mov	[eax], ecx
lea	edx, [ebp+var_9C]
mov	[ebp+var_90], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_90]
call	sub_4046E0
lea	eax, [ebp+var_4C]
push	eax
push	ecx
mov	[ebp+var_98], esp
mov	ecx, [ebp+var_9C]
mov	eax, [ebp+var_98]
call	sub_4046E0
lea	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_A4]
call	sub_5D65C0
lea	edx, [ebp+var_74]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_B0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_34]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
cmp	dword ptr [eax], 0
jz	short loc_5D4C0D
mov	ecx, [ebp+var_A0]
mov	ecx, [ecx]
call	sub_666B00

loc_5D4C0D:
lea	ecx, [ebp+var_4C]
call	sub_407910
cmp	[ebp+var_50], 0
jz	short loc_5D4C23
mov	ecx, [ebp+var_50]
call	sub_666B00

loc_5D4C23:
lea	ecx, [ebp+var_68]
call	sub_407910
lea	ecx, [ebp+var_69]
call	nullsub_1

loc_5D4C33:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5D4A20 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5D4C40(void	*)
sub_5D4C40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5D4C49:
cmp	[ebp+arg_0], 0
jz	short loc_5D4C99
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5D4C40
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5D4C91
mov	edx, 1
imul	edx, 30h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5D4C91:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5D4C49

loc_5D4C99:
mov	esp, ebp
pop	ebp
retn	4
sub_5D4C40 endp

align 10h


; Attributes: bp-based frame

sub_5D4CA0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8Ch
mov	[ebp+var_80], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_80]
call	sub_5C9500
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_80]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_81], al
movzx	ecx, [ebp+var_81]
test	ecx, ecx
jnz	short loc_5D4D39
or	[ebp+var_4C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_80]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5D4D39
mov	[ebp+var_88], 0
jmp	short loc_5D4D43

loc_5D4D39:
mov	[ebp+var_88], 1

loc_5D4D43:
mov	al, byte ptr [ebp+var_88]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_5D4D60
and	[ebp+var_4C], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D4D60:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5D4DDA
mov	[ebp+var_40], 0
mov	[ebp+var_3C], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_38]
call	sub_403850
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_3C]
mov	[ebp+var_20], ecx
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_70]
call	sub_4046E0
lea	ecx, [ebp+var_38]
push	ecx
push	ecx
mov	[ebp+var_78], esp
mov	ecx, [ebp+var_7C]
mov	eax, [ebp+var_78]
call	sub_4046E0
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_80]
call	sub_5DAB60
lea	eax, [ebp+var_48]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_38]
call	sub_407910

loc_5D4DDA:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5D4CA0 endp

align 10h


; Attributes: bp-based frame

sub_5D4DF0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	byte ptr -0A4h
var_99=	byte ptr -99h
var_98=	byte ptr -98h
var_80=	dword ptr -80h
var_64=	byte ptr -64h
var_4C=	byte ptr -4Ch
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_D4], ecx
mov	[ebp+var_A8], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_5DE140
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_AC]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_D4]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_B4]
mov	[ebp+var_B0], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_B0]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_B4]
setz	al
mov	[ebp+var_D5], al
movzx	ecx, [ebp+var_D5]
test	ecx, ecx
jnz	short loc_5D4ED6
or	[ebp+var_A8], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_A8], 2
or	[ebp+var_A8], 4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_D4]
mov	dl, [ecx+14h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_B8]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_5D4ED6
mov	[ebp+var_DC], 0
jmp	short loc_5D4EE0

loc_5D4ED6:
mov	[ebp+var_DC], 1

loc_5D4EE0:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_A8]
and	edx, 4
jz	short loc_5D4F03
and	[ebp+var_A8], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D4F03:
mov	eax, [ebp+var_A8]
and	eax, 2
jz	short loc_5D4F1D
and	[ebp+var_A8], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_5D4F1D:
mov	ecx, [ebp+var_A8]
and	ecx, 1
jz	short loc_5D4F37
and	[ebp+var_A8], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_5D4F37:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5D5036
lea	ecx, [ebp+var_99]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_98]
call	sub_407D30
lea	ecx, [ebp+var_80]
call	sub_5CEFB0
mov	[ebp+var_BC], eax
lea	ecx, [ebp+var_98]
push	ecx
lea	ecx, [ebp+var_64]
call	sub_403850
mov	edx, [ebp+var_BC]
push	edx
lea	ecx, [ebp+var_4C]
call	sub_5D6270
lea	eax, [ebp+var_CC]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_C0]
call	sub_4046E0
lea	ecx, [ebp+var_64]
push	ecx
push	ecx
mov	[ebp+var_C8], esp
mov	ecx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
call	sub_4046E0
lea	edx, [ebp+var_A4]
push	edx
mov	ecx, [ebp+var_D4]
call	sub_5D9CC0
lea	eax, [ebp+var_A4]
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_4C]
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_D0]
cmp	dword ptr [ecx], 0
jz	short loc_5D500A
mov	edx, [ebp+var_D0]
mov	ecx, [edx]
call	sub_64A430

loc_5D500A:
lea	ecx, [ebp+var_64]
call	sub_407910
cmp	[ebp+var_80], 0
jz	short loc_5D5020
mov	ecx, [ebp+var_80]
call	sub_64A430

loc_5D5020:
lea	ecx, [ebp+var_98]
call	sub_407910
lea	ecx, [ebp+var_99]
call	nullsub_1

loc_5D5036:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5D4DF0 endp

align 10h


; Attributes: bp-based frame

sub_5D5050 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_69=	byte ptr -69h
var_68=	byte ptr -68h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_9C], ecx
mov	[ebp+var_78], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5DE140
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_84]
mov	[ebp+var_80], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_80]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_84]
setz	al
mov	[ebp+var_9D], al
movzx	ecx, [ebp+var_9D]
test	ecx, ecx
jnz	short loc_5D511E
or	[ebp+var_78], 1
lea	ecx, [ebp+var_2D]
call	sub_401EF0
push	eax
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_2C]
call	sub_407D30
or	[ebp+var_78], 2
or	[ebp+var_78], 4
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_9C]
mov	dl, [ecx+14h]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_88]
lea	ecx, [ebp+var_2C]
call	sub_404510
movzx	eax, al
test	eax, eax
jnz	short loc_5D511E
mov	[ebp+var_A4], 0
jmp	short loc_5D5128

loc_5D511E:
mov	[ebp+var_A4], 1

loc_5D5128:
mov	cl, byte ptr [ebp+var_A4]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_78]
and	edx, 4
jz	short loc_5D5145
and	[ebp+var_78], 0FFFFFFFBh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D5145:
mov	eax, [ebp+var_78]
and	eax, 2
jz	short loc_5D5159
and	[ebp+var_78], 0FFFFFFFDh
lea	ecx, [ebp+var_2C]
call	sub_407910

loc_5D5159:
mov	ecx, [ebp+var_78]
and	ecx, 1
jz	short loc_5D516D
and	[ebp+var_78], 0FFFFFFFEh
lea	ecx, [ebp+var_2D]
call	nullsub_1

loc_5D516D:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5D5218
mov	[ebp+var_50], 0
lea	ecx, [ebp+var_69]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_68]
call	sub_407D30
lea	ecx, [ebp+var_68]
push	ecx
lea	ecx, [ebp+var_4C]
call	sub_403850
mov	edx, [ebp+var_50]
mov	[ebp+var_34], edx
lea	eax, [ebp+var_98]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
push	ecx
push	ecx
mov	[ebp+var_94], esp
mov	ecx, [ebp+var_98]
mov	eax, [ebp+var_94]
call	sub_4046E0
lea	edx, [ebp+var_74]
push	edx
mov	ecx, [ebp+var_9C]
call	sub_57F0F0
lea	eax, [ebp+var_74]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ecx]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_4C]
call	sub_407910
lea	ecx, [ebp+var_68]
call	sub_407910
lea	ecx, [ebp+var_69]
call	nullsub_1

loc_5D5218:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	esp, ebp
pop	ebp
retn	4
sub_5D5050 endp

align 10h


; Attributes: bp-based frame

sub_5D5230 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_50], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5DE010
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_51], al
movzx	ecx, [ebp+var_51]
test	ecx, ecx
jnz	short loc_5D52C0
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_50]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5D52C0
mov	[ebp+var_58], 0
jmp	short loc_5D52C7

loc_5D52C0:
mov	[ebp+var_58], 1

loc_5D52C7:
mov	cl, byte ptr [ebp+var_58]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_5D52D9
and	[ebp+var_2C], 0FFFFFFFEh

loc_5D52D9:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5D5334
mov	[ebp+var_20], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_40]
call	sub_4046E0
lea	edx, [ebp+var_1C]
push	edx
push	ecx
mov	[ebp+var_48], esp
mov	ecx, [ebp+var_4C]
mov	eax, [ebp+var_48]
call	sub_4046E0
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_50]
call	sub_5D9710
lea	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_5D5334:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5D5230 endp



; Attributes: bp-based frame

sub_5D5340 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_34=	byte ptr -34h
var_30=	byte ptr -30h
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 78h
push	esi
mov	[ebp+var_6C], ecx
mov	[ebp+var_40], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5C9500
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_6C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jnz	short loc_5D53CE
or	[ebp+var_40], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_6C]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	eax, [ebp+var_50]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	edx, al
test	edx, edx
jnz	short loc_5D53CE
mov	[ebp+var_74], 0
jmp	short loc_5D53D5

loc_5D53CE:
mov	[ebp+var_74], 1

loc_5D53D5:
mov	al, byte ptr [ebp+var_74]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_40]
and	ecx, 1
jz	short loc_5D53EF
and	[ebp+var_40], 0FFFFFFFEh
lea	ecx, [ebp+var_11]
call	nullsub_1

loc_5D53EF:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5D548C
xor	eax, eax
lea	esi, [ebp+var_34]
call	sub_41DF90
mov	[ebp+var_58], eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_30]
call	sub_403850
lea	ecx, [ebp+var_18]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_54]
cmp	dword ptr [edx], 0
jz	short loc_5D5436
mov	eax, [ebp+var_54]
mov	ecx, [eax]
call	sub_40AA80

loc_5D5436:
lea	ecx, [ebp+var_68]
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_5C]
call	sub_4046E0
lea	edx, [ebp+var_30]
push	edx
push	ecx
mov	[ebp+var_64], esp
mov	ecx, [ebp+var_68]
mov	eax, [ebp+var_64]
call	sub_4046E0
lea	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_6C]
call	sub_5DA260
lea	ecx, [ebp+var_3C]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_18]
call	sub_429100
lea	ecx, [ebp+var_30]
call	sub_407910
lea	ecx, [ebp+var_34]
call	sub_429100

loc_5D548C:
mov	eax, [ebp+var_4]
add	eax, 28h
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5D5340 endp

align 10h


; Attributes: bp-based frame

sub_5D54A0 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+arg_4]
jz	short loc_5D54B7
mov	ecx, [ebp+arg_8]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5D54BF

loc_5D54B7:
mov	eax, [ebp+arg_0]
jmp	loc_5D5623

loc_5D54BF:
mov	edx, [ebp+arg_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5D552B

loc_5D54D6:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jz	short loc_5D5523
mov	eax, [ebp+arg_8]
mov	cl, [eax]
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ebp+var_D], al
movzx	ecx, [ebp+var_E]
push	ecx		; int
call	_tolower
add	esp, 4
mov	esi, eax
movzx	edx, [ebp+var_D]
push	edx		; int
call	_tolower
add	esp, 4
xor	ecx, ecx
cmp	eax, esi
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_5D5523
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
jmp	short loc_5D54D6

loc_5D5523:
mov	eax, [ebp+arg_0]
jmp	loc_5D5623

loc_5D552B:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+arg_4]
jz	short loc_5D5578
mov	edx, [ebp+arg_8]
mov	al, [edx]
mov	[ebp+var_10], al
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[ebp+var_F], dl
movzx	eax, [ebp+var_10]
push	eax		; int
call	_tolower
add	esp, 4
mov	esi, eax
movzx	ecx, [ebp+var_F]
push	ecx		; int
call	_tolower
add	esp, 4
xor	edx, edx
cmp	eax, esi
setz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5D5578
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
jmp	short loc_5D552B

loc_5D5578:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+arg_4]
jnz	short loc_5D5588
mov	eax, [ebp+arg_4]
jmp	loc_5D5623

loc_5D5588:
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
cmp	eax, [ebp+arg_4]
jnz	short loc_5D55AA
mov	eax, [ebp+arg_4]
jmp	short loc_5D5623

loc_5D55AA:
mov	ecx, [ebp+var_8]
mov	dl, [ecx]
mov	[ebp+var_12], dl
mov	eax, [ebp+var_C]
mov	cl, [eax]
mov	[ebp+var_11], cl
movzx	edx, [ebp+var_12]
push	edx		; int
call	_tolower
add	esp, 4
mov	esi, eax
movzx	eax, [ebp+var_11]
push	eax		; int
call	_tolower
add	esp, 4
xor	ecx, ecx
cmp	eax, esi
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5D5612
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_C]
jnz	short loc_5D55FA
mov	eax, [ebp+arg_0]
jmp	short loc_5D5623

loc_5D55FA:
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
cmp	eax, [ebp+arg_4]
jnz	short loc_5D5610
mov	eax, [ebp+arg_4]
jmp	short loc_5D5623

loc_5D5610:
jmp	short loc_5D55AA

loc_5D5612:
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
jmp	loc_5D552B
mov	eax, [ebp+arg_0]

loc_5D5623:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5D54A0 endp

align 10h


; Attributes: bp-based frame

sub_5D5630 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DD=	byte ptr -0DDh
var_DC=	dword ptr -0DCh
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_48=	byte ptr -48h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0DCh
mov	[ebp+var_DC], ecx
mov	[ebp+var_60], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_5DE010
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_DC]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_6C]
mov	[ebp+var_68], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_68]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_6C]
setz	al
mov	[ebp+var_DD], al
movzx	ecx, [ebp+var_DD]
test	ecx, ecx
jnz	short loc_5D56ED
or	[ebp+var_60], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_DC]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_70]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5D56ED
mov	[ebp+var_E4], 0
jmp	short loc_5D56F7

loc_5D56ED:
mov	[ebp+var_E4], 1

loc_5D56F7:
mov	cl, byte ptr [ebp+var_E4]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_60]
and	edx, 1
jz	short loc_5D571A
and	[ebp+var_60], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5D571A:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5D57AF
lea	ecx, [ebp+var_48]
mov	[ebp+var_78], ecx
lea	edx, [ebp+var_71]
push	edx
mov	ecx, [ebp+var_78]
call	sub_5E0080
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
lea	edx, [ebp+var_54]
push	edx
lea	ecx, [ebp+var_38]
call	sub_5D62F0
lea	eax, [ebp+var_88]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_7C]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
push	ecx
push	ecx
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_88]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	edx, [ebp+var_5C]
push	edx
mov	ecx, [ebp+var_DC]
call	sub_5D8590
lea	eax, [ebp+var_5C]
mov	[ebp+var_E8], eax
mov	ecx, [ebp+var_E8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	ecx, [ebp+var_2C]
call	sub_468AA0
lea	ecx, [ebp+var_48]
call	sub_468AA0

loc_5D57AF:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5D5630 endp

align 10h


; Attributes: bp-based frame

sub_5D57D0 proc	near

var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_B8=	byte ptr -0B8h
var_9C=	byte ptr -9Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_50=	byte ptr -50h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 100h
mov	[ebp+var_F4], ecx
mov	[ebp+var_C4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_F4]
call	sub_5E9440
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_F4]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_D0]
mov	[ebp+var_CC], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_CC]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_D0]
setz	al
mov	[ebp+var_F5], al
movzx	ecx, [ebp+var_F5]
test	ecx, ecx
jnz	loc_5D58F5
or	[ebp+var_C4], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_D4], edx
mov	eax, [ebp+var_F4]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_D4]
mov	[ebp+var_FC], edx
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_FC]
mov	edx, [ebp+var_100]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D58D4
jb	short loc_5D58C8
mov	ecx, [ebp+var_FC]
mov	edx, [ebp+var_100]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D58D4

loc_5D58C8:
mov	[ebp+var_104], 1
jmp	short loc_5D58DE

loc_5D58D4:
mov	[ebp+var_104], 0

loc_5D58DE:
movzx	ecx, byte ptr [ebp+var_104]
test	ecx, ecx
jnz	short loc_5D58F5
mov	[ebp+var_108], 0
jmp	short loc_5D58FF

loc_5D58F5:
mov	[ebp+var_108], 1

loc_5D58FF:
mov	dl, byte ptr [ebp+var_108]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_C4]
and	eax, 1
jz	short loc_5D5928
and	[ebp+var_C4], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5D5928:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5D59D4
lea	ecx, [ebp+var_B8]
call	sub_5CEC40
mov	[ebp+var_E0], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_74], eax
mov	ecx, [edx+4]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_E0]
push	edx
lea	ecx, [ebp+var_6C]
call	sub_5D6360
lea	eax, [ebp+var_F0]
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_E4]
call	sub_4046E0
lea	ecx, [ebp+var_74]
push	ecx
push	ecx
mov	[ebp+var_EC], esp
mov	ecx, [ebp+var_F0]
mov	eax, [ebp+var_EC]
call	sub_4046E0
lea	edx, [ebp+var_C0]
push	edx
mov	ecx, [ebp+var_F4]
call	sub_5D8A60
lea	eax, [ebp+var_C0]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	ecx, [ebp+var_50]
call	sub_407910
lea	ecx, [ebp+var_9C]
call	sub_407910

loc_5D59D4:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5D57D0 endp

align 10h


; Attributes: bp-based frame

sub_5D59F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DB020
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5D59F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5A20(void *, int)
sub_5D5A20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	5Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5D5A64
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5D0190
mov	[ebp+var_C], eax
jmp	short loc_5D5A6B

loc_5D5A64:
mov	[ebp+var_C], 0

loc_5D5A6B:
mov	esp, ebp
pop	ebp
retn
sub_5D5A20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5A70(void *, int)
sub_5D5A70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5D5AC7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_403400
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5D5ACE

loc_5D5AC7:
mov	[ebp+var_C], 0

loc_5D5ACE:
mov	esp, ebp
pop	ebp
retn
sub_5D5A70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5AE0(void *, int)
sub_5D5AE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	60h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5D5B24
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5CF3F0
mov	[ebp+var_C], eax
jmp	short loc_5D5B2B

loc_5D5B24:
mov	[ebp+var_C], 0

loc_5D5B2B:
mov	esp, ebp
pop	ebp
retn
sub_5D5AE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5B30(void *, int)
sub_5D5B30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5D5B87
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5D5B8E

loc_5D5B87:
mov	[ebp+var_C], 0

loc_5D5B8E:
mov	esp, ebp
pop	ebp
retn
sub_5D5B30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5BA0(void *)
sub_5D5BA0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5D5BC6
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_64A430

loc_5D5BC6:
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D5BD9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D5BD9:
mov	esp, ebp
pop	ebp
retn
sub_5D5BA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5BE0(void *)
sub_5D5BE0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_468AA0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D5C09
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D5C09:
mov	esp, ebp
pop	ebp
retn
sub_5D5BE0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5C10(void *)
sub_5D5C10 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5D5C36
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_64A430

loc_5D5C36:
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D5C51
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D5C51:
mov	esp, ebp
pop	ebp
retn
sub_5D5C10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5C60(void *)
sub_5D5C60 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
call	sub_5CF8B0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D5C86
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D5C86:
mov	esp, ebp
pop	ebp
retn
sub_5D5C60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5C90(void *)
sub_5D5C90 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_5D0B30
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D5CB9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D5CB9:
mov	esp, ebp
pop	ebp
retn
sub_5D5C90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D5CC0(void *)
sub_5D5CC0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 24h
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D5CE7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D5CE7:
mov	esp, ebp
pop	ebp
retn
sub_5D5CC0 endp

align 10h


; Attributes: bp-based frame

sub_5D5CF0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_18]
sar	edx, 2
mov	[ebp+var_8], edx
jmp	short loc_5D5D19

loc_5D5D10:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_5D5D19:
cmp	[ebp+var_8], 0
jle	short loc_5D5D73
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 0
jz	short loc_5D5D3D
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
call	sub_64A420

loc_5D5D3D:
mov	edx, [ebp+var_1C]
cmp	dword ptr [edx], 0
jz	short loc_5D5D4F
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
call	sub_64A430

loc_5D5D4F:
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_18]
add	edx, 4
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
add	eax, 4
mov	[ebp+var_1C], eax
jmp	short loc_5D5D10

loc_5D5D73:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn
sub_5D5CF0 endp

align 10h


; Attributes: bp-based frame

sub_5D5D80 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
mov	[ebp+var_C], ecx
mov	esi, [ebp+var_C]
add	esi, 8
xor	eax, eax
call	sub_41DF90
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5D5D80 endp

align 10h


; Attributes: bp-based frame

sub_5D5DC0 proc	near

var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx

loc_5D5DC9:
lea	eax, [ebp+var_10]
lea	ecx, [ebp+arg_8]
call	sub_402EB0
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+var_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5D5E16
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_14]
call	sub_4046E0
lea	eax, [ebp+arg_4]
call	sub_405E90
mov	ecx, [ebp+var_14]
mov	eax, [ebp+var_18]
call	sub_4046E0
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_436B00
jmp	short loc_5D5DC9

loc_5D5E16:
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D5DC0 endp

align 10h


; Attributes: bp-based frame

sub_5D5E30 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 2C8590Bh
mov	[ebp+var_10], 2C8590Bh
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5D5E6D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5D5E73

loc_5D5E6D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5D5E73:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5D5E86
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5D5E86:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 2C8590Bh
mov	[ebp+var_1C], 2C8590Bh
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5D5EBC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5D5EC2

loc_5D5EBC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5D5EC2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5D5ED2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5D5EFC

loc_5D5ED2:
mov	[ebp+var_20], 2C8590Bh
mov	[ebp+var_24], 2C8590Bh
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5D5EF0
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5D5EF6

loc_5D5EF0:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5D5EF6:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5D5EFC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D5E30 endp

align 10h


; Attributes: bp-based frame

sub_5D5F10 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5D59F0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 5Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5D5F83
mov	ecx, [ebp+var_4C]
imul	ecx, 5Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D5F83:
mov	esp, ebp
pop	ebp
retn
sub_5D5F10 endp

align 10h


; Attributes: bp-based frame

sub_5D5F90 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 2C8590Bh
jbe	short loc_5D5FBB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5D5FBB:
cmp	[ebp+arg_0], 0
jz	short loc_5D5FF2
mov	ecx, [ebp+arg_0]
imul	ecx, 5Ch
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 5Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5D5FF9

loc_5D5FF2:
mov	[ebp+var_10], 0

loc_5D5FF9:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5D5F90 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5D6010 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5DB250
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5D6083
mov	ecx, [ebp+var_4C]
imul	ecx, 2Ch
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D6083:
mov	esp, ebp
pop	ebp
retn
sub_5D6010 endp

align 10h


; Attributes: bp-based frame

sub_5D6090 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5DB280
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5D60FC
mov	ecx, [ebp+var_4C]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D60FC:
mov	esp, ebp
pop	ebp
retn
sub_5D6090 endp



; Attributes: bp-based frame

sub_5D6100 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5DB2B0
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 60h
idiv	ecx
mov	[ebp+var_4C], eax
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5D6173
mov	ecx, [ebp+var_4C]
imul	ecx, 60h
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5D6173:
mov	esp, ebp
pop	ebp
retn
sub_5D6100 endp

align 10h


; Attributes: bp-based frame

sub_5D6180 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 0FFFFFFFh
jbe	short loc_5D61AB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5D61AB:
cmp	[ebp+arg_0], 0
jz	short loc_5D61DC
mov	ecx, [ebp+arg_0]
shl	ecx, 4
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
shr	eax, 4
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_5D61E3

loc_5D61DC:
mov	[ebp+var_10], 0

loc_5D61E3:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5D6180 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5D61F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax], edx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5D622F
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_5D622F:
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+0Ch]
mov	[edx+0Ch], cl
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	cl, [eax+0Dh]
mov	[edx+0Dh], cl
mov	edx, [ebp+arg_0]
add	edx, 10h
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_403850
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5D61F0 endp

align 10h


; Attributes: bp-based frame

sub_5D6270 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 0
jz	short loc_5D6289
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx]
call	sub_64A420

loc_5D6289:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+10h]
fstp	dword ptr [edx+10h]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+14h]
fstp	dword ptr [ecx+14h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+18h]
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D6270 endp

align 10h


; Attributes: bp-based frame

sub_5D62F0 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1]
mov	[eax+1], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+2]
mov	[eax+2], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+3]
mov	[eax+3], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+4]
mov	[eax+4], dl
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 0Ch
call	sub_4710C0
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_5D62F0 endp

align 10h


; Attributes: bp-based frame

sub_5D6360 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+arg_0]
add	edx, 4
mov	eax, [ebp+var_4]
add	eax, 4
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
add	ecx, 1Ch
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_403850
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+34h]
mov	[edx+34h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
mov	[edx+38h], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+3Ch]
mov	[edx+3Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax+40h]
mov	[edx+40h], cl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5D6360 endp

align 10h


; Attributes: bp-based frame

sub_5D6400 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
jmp	short loc_5D6414

loc_5D640B:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_5D6414:
cmp	[ebp+arg_4], 0
jbe	short loc_5D6478
lea	ecx, [ebp+var_1C]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_20]
call	sub_439D80
mov	[ebp+var_18], eax
mov	eax, [ebp+var_1C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_18]
mov	[eax+4], ecx
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
jmp	short loc_5D640B

loc_5D6478:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D6400 endp

align 10h


; Attributes: bp-based frame

sub_5D6480 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 3FFFFFFFh
jbe	short loc_5D64A6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5D64A6:
cmp	[ebp+arg_0], 0
jz	short loc_5D64D4
mov	eax, [ebp+arg_0]
shl	eax, 2
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_4]
shr	edx, 2
mov	eax, [ebp+arg_4]
mov	[eax], edx
mov	eax, [ebp+var_8]
jmp	short loc_5D64D6

loc_5D64D4:
xor	eax, eax

loc_5D64D6:
mov	esp, ebp
pop	ebp
retn	8
sub_5D6480 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5D64E0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5C6C40
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5D6536
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5D64E0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5D6536:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5D6545:
cmp	[ebp+arg_0], 0
jz	short loc_5D65B2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5C6C40
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5D65A1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5D64E0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5D65A1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5D6545

loc_5D65B2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5D64E0 endp

align 10h


; Attributes: bp-based frame

sub_5D65C0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D6794
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D6629
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DB5E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B

loc_5D6629:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5D6672
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B
jmp	loc_5D678F

loc_5D6672:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5D66A4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B

loc_5D66A4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5D66EE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B

loc_5D66EE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D6764
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D673D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B
jmp	short loc_5D6762

loc_5D673D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B

loc_5D6762:
jmp	short loc_5D678F

loc_5D6764:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DB5E0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B

loc_5D678F:
jmp	loc_5D6A6B

loc_5D6794:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5D6825
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5D67F5
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B
jmp	short loc_5D6820

loc_5D67F5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DB5E0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B

loc_5D6820:
jmp	loc_5D6A6B

loc_5D6825:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5D688F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D688F
mov	[ebp+var_C4], 1
jmp	short loc_5D6899

loc_5D688F:
mov	[ebp+var_C4], 0

loc_5D6899:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D68AE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D68AE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D6910
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D68E6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B
jmp	short loc_5D690B

loc_5D68E6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	loc_5D6A6B

loc_5D690B:
jmp	loc_5D6A6B

loc_5D6910:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D695D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5D695D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5D69A9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5D69A9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5D699D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D69A9

loc_5D699D:
mov	[ebp+var_C8], 1
jmp	short loc_5D69B3

loc_5D69A9:
mov	[ebp+var_C8], 0

loc_5D69B3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5D69C8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D69C8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5D6A21
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D69FD
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	short loc_5D6A6B
jmp	short loc_5D6A1F

loc_5D69FD:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DB4A0
mov	eax, [ebp+arg_0]
jmp	short loc_5D6A6B

loc_5D6A1F:
jmp	short loc_5D6A6B

loc_5D6A21:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5D6A3F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D6A6B
jmp	short loc_5D6A6B

loc_5D6A3F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DB5E0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D6A6B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D65C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D6A80(void *)
sub_5D6A80 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5D6AA6
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_666B00

loc_5D6AA6:
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D6AC1
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D6AC1:
mov	esp, ebp
pop	ebp
retn
sub_5D6A80 endp

align 10h


; Attributes: bp-based frame

sub_5D6AD0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D6CAD
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D6B39
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DB8B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93

loc_5D6B39:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5D6B85
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93
jmp	loc_5D6CA8

loc_5D6B85:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5D6BBA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93

loc_5D6BBA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5D6C04
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93

loc_5D6C04:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D6C7D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D6C56
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93
jmp	short loc_5D6C7B

loc_5D6C56:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93

loc_5D6C7B:
jmp	short loc_5D6CA8

loc_5D6C7D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DB8B0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93

loc_5D6CA8:
jmp	loc_5D6F93

loc_5D6CAD:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5D6D41
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5D6D11
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93
jmp	short loc_5D6D3C

loc_5D6D11:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DB8B0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93

loc_5D6D3C:
jmp	loc_5D6F93

loc_5D6D41:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5D6DB1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D6DB1
mov	[ebp+var_A4], 1
jmp	short loc_5D6DBB

loc_5D6DB1:
mov	[ebp+var_A4], 0

loc_5D6DBB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D6DD0
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D6DD0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D6E32
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D6E08
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93
jmp	short loc_5D6E2D

loc_5D6E08:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	loc_5D6F93

loc_5D6E2D:
jmp	loc_5D6F93

loc_5D6E32:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D6E82
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5D6E82:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D6ED1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5D6ED1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5D6EC5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5D6ED1

loc_5D6EC5:
mov	[ebp+var_A8], 1
jmp	short loc_5D6EDB

loc_5D6ED1:
mov	[ebp+var_A8], 0

loc_5D6EDB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5D6EF0
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D6EF0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5D6F49
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5D6F25
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	short loc_5D6F93
jmp	short loc_5D6F47

loc_5D6F25:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DB770
mov	eax, [ebp+arg_0]
jmp	short loc_5D6F93

loc_5D6F47:
jmp	short loc_5D6F93

loc_5D6F49:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5D6F67
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D6F93
jmp	short loc_5D6F93

loc_5D6F67:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DB8B0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D6F93:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D6AD0 endp

align 10h


; Attributes: bp-based frame

sub_5D6FA0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D7255
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D7009
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBBB0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7

loc_5D7009:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D7058
jb	short loc_5D704C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D7058

loc_5D704C:
mov	[ebp+var_AC], 1
jmp	short loc_5D7062

loc_5D7058:
mov	[ebp+var_AC], 0

loc_5D7062:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5D709D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7
jmp	loc_5D7250

loc_5D709D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D70EC
jb	short loc_5D70E0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D70EC

loc_5D70E0:
mov	[ebp+var_B8], 1
jmp	short loc_5D70F6

loc_5D70EC:
mov	[ebp+var_B8], 0

loc_5D70F6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5D711A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7

loc_5D711A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5D7164
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7

loc_5D7164:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D71B3
jb	short loc_5D71A7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D71B3

loc_5D71A7:
mov	[ebp+var_C4], 1
jmp	short loc_5D71BD

loc_5D71B3:
mov	[ebp+var_C4], 0

loc_5D71BD:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D7225
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D71FE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7
jmp	short loc_5D7223

loc_5D71FE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7

loc_5D7223:
jmp	short loc_5D7250

loc_5D7225:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBBB0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7

loc_5D7250:
jmp	loc_5D76A7

loc_5D7255:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5D7331
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D72B9
jb	short loc_5D72AD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D72B9

loc_5D72AD:
mov	[ebp+var_D0], 1
jmp	short loc_5D72C3

loc_5D72B9:
mov	[ebp+var_D0], 0

loc_5D72C3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5D7301
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7
jmp	short loc_5D732C

loc_5D7301:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBBB0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7

loc_5D732C:
jmp	loc_5D76A7

loc_5D7331:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D739A
jb	short loc_5D738E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D739A

loc_5D738E:
mov	[ebp+var_DC], 1
jmp	short loc_5D73A4

loc_5D739A:
mov	[ebp+var_DC], 0

loc_5D73A4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5D742F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5D740E
jb	short loc_5D7402
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5D740E

loc_5D7402:
mov	[ebp+var_E8], 1
jmp	short loc_5D7418

loc_5D740E:
mov	[ebp+var_E8], 0

loc_5D7418:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5D742F
mov	[ebp+var_EC], 1
jmp	short loc_5D7439

loc_5D742F:
mov	[ebp+var_EC], 0

loc_5D7439:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5D744E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D744E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5D74B0
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5D7486
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7
jmp	short loc_5D74AB

loc_5D7486:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	loc_5D76A7

loc_5D74AB:
jmp	loc_5D76A7

loc_5D74B0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5D7548
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D7535
jb	short loc_5D7529
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D7535

loc_5D7529:
mov	[ebp+var_F8], 1
jmp	short loc_5D753F

loc_5D7535:
mov	[ebp+var_F8], 0

loc_5D753F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5D7548:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5D75E5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5D75E5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5D75D9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D75C4
jb	short loc_5D75B8
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D75C4

loc_5D75B8:
mov	[ebp+var_104], 1
jmp	short loc_5D75CE

loc_5D75C4:
mov	[ebp+var_104], 0

loc_5D75CE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5D75E5

loc_5D75D9:
mov	[ebp+var_108], 1
jmp	short loc_5D75EF

loc_5D75E5:
mov	[ebp+var_108], 0

loc_5D75EF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5D7604
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D7604:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5D765D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D7639
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	short loc_5D76A7
jmp	short loc_5D765B

loc_5D7639:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBA40
mov	eax, [ebp+arg_0]
jmp	short loc_5D76A7

loc_5D765B:
jmp	short loc_5D76A7

loc_5D765D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5D767B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D76A7
jmp	short loc_5D76A7

loc_5D767B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBBB0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D76A7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D6FA0 endp

align 10h


; Attributes: bp-based frame

sub_5D76B0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D788D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D7719
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBEE0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73

loc_5D7719:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5D7765
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73
jmp	loc_5D7888

loc_5D7765:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5D779A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73

loc_5D779A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5D77E4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73

loc_5D77E4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D785D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D7836
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73
jmp	short loc_5D785B

loc_5D7836:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73

loc_5D785B:
jmp	short loc_5D7888

loc_5D785D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBEE0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73

loc_5D7888:
jmp	loc_5D7B73

loc_5D788D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5D7921
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5D78F1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73
jmp	short loc_5D791C

loc_5D78F1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBEE0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73

loc_5D791C:
jmp	loc_5D7B73

loc_5D7921:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5D7991
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D7991
mov	[ebp+var_A4], 1
jmp	short loc_5D799B

loc_5D7991:
mov	[ebp+var_A4], 0

loc_5D799B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D79B0
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D79B0:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D7A12
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D79E8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73
jmp	short loc_5D7A0D

loc_5D79E8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	loc_5D7B73

loc_5D7A0D:
jmp	loc_5D7B73

loc_5D7A12:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D7A62
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5D7A62:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D7AB1
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5D7AB1
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5D7AA5
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5D7AB1

loc_5D7AA5:
mov	[ebp+var_A8], 1
jmp	short loc_5D7ABB

loc_5D7AB1:
mov	[ebp+var_A8], 0

loc_5D7ABB:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5D7AD0
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D7AD0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5D7B29
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5D7B05
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	short loc_5D7B73
jmp	short loc_5D7B27

loc_5D7B05:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DBDA0
mov	eax, [ebp+arg_0]
jmp	short loc_5D7B73

loc_5D7B27:
jmp	short loc_5D7B73

loc_5D7B29:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5D7B47
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D7B73
jmp	short loc_5D7B73

loc_5D7B47:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DBEE0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D7B73:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D76B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D7B80(void *)
sub_5D7B80 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_407910
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_429100
xor	edx, edx
and	edx, 1
jz	short loc_5D7BBD
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D7BBD:
mov	esp, ebp
pop	ebp
retn
sub_5D7B80 endp

align 10h


; Attributes: bp-based frame

sub_5D7BD0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D7DA4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D7C39
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC1B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D807B

loc_5D7C39:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5D7C82
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	loc_5D807B
jmp	loc_5D7D9F

loc_5D7C82:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5D7CB4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D807B

loc_5D7CB4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5D7CFE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	loc_5D807B

loc_5D7CFE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D7D74
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D7D4D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	loc_5D807B
jmp	short loc_5D7D72

loc_5D7D4D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	loc_5D807B

loc_5D7D72:
jmp	short loc_5D7D9F

loc_5D7D74:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC1B0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D807B

loc_5D7D9F:
jmp	loc_5D807B

loc_5D7DA4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5D7E35
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5D7E05
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	loc_5D807B
jmp	short loc_5D7E30

loc_5D7E05:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC1B0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D807B

loc_5D7E30:
jmp	loc_5D807B

loc_5D7E35:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5D7E9F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D7E9F
mov	[ebp+var_C4], 1
jmp	short loc_5D7EA9

loc_5D7E9F:
mov	[ebp+var_C4], 0

loc_5D7EA9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D7EBE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D7EBE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D7F20
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D7EF6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	loc_5D807B
jmp	short loc_5D7F1B

loc_5D7EF6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	loc_5D807B

loc_5D7F1B:
jmp	loc_5D807B

loc_5D7F20:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D7F6D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5D7F6D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5D7FB9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5D7FB9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5D7FAD
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D7FB9

loc_5D7FAD:
mov	[ebp+var_C8], 1
jmp	short loc_5D7FC3

loc_5D7FB9:
mov	[ebp+var_C8], 0

loc_5D7FC3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5D7FD8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D7FD8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5D8031
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D800D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	short loc_5D807B
jmp	short loc_5D802F

loc_5D800D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC070
mov	eax, [ebp+arg_0]
jmp	short loc_5D807B

loc_5D802F:
jmp	short loc_5D807B

loc_5D8031:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5D804F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D807B
jmp	short loc_5D807B

loc_5D804F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DC1B0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D807B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D7BD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5D8090(void *)
sub_5D8090 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_46B570
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5D80BF
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5D80BF:
mov	esp, ebp
pop	ebp
retn
sub_5D8090 endp

align 10h


; Attributes: bp-based frame

sub_5D80D0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D82A4
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D8139
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC480
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D857B

loc_5D8139:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5D8182
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	loc_5D857B
jmp	loc_5D829F

loc_5D8182:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5D81B4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D857B

loc_5D81B4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5D81FE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	loc_5D857B

loc_5D81FE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D8274
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D824D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	loc_5D857B
jmp	short loc_5D8272

loc_5D824D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	loc_5D857B

loc_5D8272:
jmp	short loc_5D829F

loc_5D8274:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC480
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D857B

loc_5D829F:
jmp	loc_5D857B

loc_5D82A4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5D8335
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5D8305
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	loc_5D857B
jmp	short loc_5D8330

loc_5D8305:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC480
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D857B

loc_5D8330:
jmp	loc_5D857B

loc_5D8335:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5D839F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D839F
mov	[ebp+var_C4], 1
jmp	short loc_5D83A9

loc_5D839F:
mov	[ebp+var_C4], 0

loc_5D83A9:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D83BE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D83BE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D8420
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D83F6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	loc_5D857B
jmp	short loc_5D841B

loc_5D83F6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	loc_5D857B

loc_5D841B:
jmp	loc_5D857B

loc_5D8420:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D846D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5D846D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5D84B9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5D84B9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5D84AD
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D84B9

loc_5D84AD:
mov	[ebp+var_C8], 1
jmp	short loc_5D84C3

loc_5D84B9:
mov	[ebp+var_C8], 0

loc_5D84C3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5D84D8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D84D8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5D8531
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D850D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	short loc_5D857B
jmp	short loc_5D852F

loc_5D850D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DC340
mov	eax, [ebp+arg_0]
jmp	short loc_5D857B

loc_5D852F:
jmp	short loc_5D857B

loc_5D8531:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5D854F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D857B
jmp	short loc_5D857B

loc_5D854F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DC480
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D857B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D80D0 endp

align 10h


; Attributes: bp-based frame

sub_5D8590 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D876D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D85F9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DC750
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53

loc_5D85F9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5D8645
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53
jmp	loc_5D8768

loc_5D8645:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5D867A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53

loc_5D867A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5D86C4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53

loc_5D86C4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D873D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D8716
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53
jmp	short loc_5D873B

loc_5D8716:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53

loc_5D873B:
jmp	short loc_5D8768

loc_5D873D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DC750
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53

loc_5D8768:
jmp	loc_5D8A53

loc_5D876D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5D8801
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5D87D1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53
jmp	short loc_5D87FC

loc_5D87D1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC750
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53

loc_5D87FC:
jmp	loc_5D8A53

loc_5D8801:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5D8871
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D8871
mov	[ebp+var_A4], 1
jmp	short loc_5D887B

loc_5D8871:
mov	[ebp+var_A4], 0

loc_5D887B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D8890
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D8890:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D88F2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D88C8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53
jmp	short loc_5D88ED

loc_5D88C8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	loc_5D8A53

loc_5D88ED:
jmp	loc_5D8A53

loc_5D88F2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D8942
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5D8942:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D8991
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5D8991
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5D8985
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5D8991

loc_5D8985:
mov	[ebp+var_A8], 1
jmp	short loc_5D899B

loc_5D8991:
mov	[ebp+var_A8], 0

loc_5D899B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5D89B0
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D89B0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5D8A09
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5D89E5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	short loc_5D8A53
jmp	short loc_5D8A07

loc_5D89E5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DC610
mov	eax, [ebp+arg_0]
jmp	short loc_5D8A53

loc_5D8A07:
jmp	short loc_5D8A53

loc_5D8A09:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5D8A27
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D8A53
jmp	short loc_5D8A53

loc_5D8A27:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DC750
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D8A53:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D8590 endp

align 10h


; Attributes: bp-based frame

sub_5D8A60 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D8D15
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D8AC9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DCA50
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167

loc_5D8AC9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D8B18
jb	short loc_5D8B0C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D8B18

loc_5D8B0C:
mov	[ebp+var_AC], 1
jmp	short loc_5D8B22

loc_5D8B18:
mov	[ebp+var_AC], 0

loc_5D8B22:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5D8B5D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167
jmp	loc_5D8D10

loc_5D8B5D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D8BAC
jb	short loc_5D8BA0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D8BAC

loc_5D8BA0:
mov	[ebp+var_B8], 1
jmp	short loc_5D8BB6

loc_5D8BAC:
mov	[ebp+var_B8], 0

loc_5D8BB6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5D8BDA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167

loc_5D8BDA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5D8C24
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167

loc_5D8C24:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D8C73
jb	short loc_5D8C67
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D8C73

loc_5D8C67:
mov	[ebp+var_C4], 1
jmp	short loc_5D8C7D

loc_5D8C73:
mov	[ebp+var_C4], 0

loc_5D8C7D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D8CE5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D8CBE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167
jmp	short loc_5D8CE3

loc_5D8CBE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167

loc_5D8CE3:
jmp	short loc_5D8D10

loc_5D8CE5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DCA50
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167

loc_5D8D10:
jmp	loc_5D9167

loc_5D8D15:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5D8DF1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D8D79
jb	short loc_5D8D6D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D8D79

loc_5D8D6D:
mov	[ebp+var_D0], 1
jmp	short loc_5D8D83

loc_5D8D79:
mov	[ebp+var_D0], 0

loc_5D8D83:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5D8DC1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167
jmp	short loc_5D8DEC

loc_5D8DC1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DCA50
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167

loc_5D8DEC:
jmp	loc_5D9167

loc_5D8DF1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D8E5A
jb	short loc_5D8E4E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D8E5A

loc_5D8E4E:
mov	[ebp+var_DC], 1
jmp	short loc_5D8E64

loc_5D8E5A:
mov	[ebp+var_DC], 0

loc_5D8E64:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5D8EEF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5D8ECE
jb	short loc_5D8EC2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5D8ECE

loc_5D8EC2:
mov	[ebp+var_E8], 1
jmp	short loc_5D8ED8

loc_5D8ECE:
mov	[ebp+var_E8], 0

loc_5D8ED8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5D8EEF
mov	[ebp+var_EC], 1
jmp	short loc_5D8EF9

loc_5D8EEF:
mov	[ebp+var_EC], 0

loc_5D8EF9:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5D8F0E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D8F0E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5D8F70
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5D8F46
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167
jmp	short loc_5D8F6B

loc_5D8F46:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9167

loc_5D8F6B:
jmp	loc_5D9167

loc_5D8F70:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5D9008
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5D8FF5
jb	short loc_5D8FE9
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5D8FF5

loc_5D8FE9:
mov	[ebp+var_F8], 1
jmp	short loc_5D8FFF

loc_5D8FF5:
mov	[ebp+var_F8], 0

loc_5D8FFF:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5D9008:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5D90A5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5D90A5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5D9099
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5D9084
jb	short loc_5D9078
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5D9084

loc_5D9078:
mov	[ebp+var_104], 1
jmp	short loc_5D908E

loc_5D9084:
mov	[ebp+var_104], 0

loc_5D908E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5D90A5

loc_5D9099:
mov	[ebp+var_108], 1
jmp	short loc_5D90AF

loc_5D90A5:
mov	[ebp+var_108], 0

loc_5D90AF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5D90C4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D90C4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5D911D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D90F9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D9167
jmp	short loc_5D911B

loc_5D90F9:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5DC8E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D9167

loc_5D911B:
jmp	short loc_5D9167

loc_5D911D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5D913B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D9167
jmp	short loc_5D9167

loc_5D913B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5DCA50
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D9167:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D8A60 endp

align 10h


; Attributes: bp-based frame

sub_5D9170 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D9344
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D91D9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DCD80
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D961B

loc_5D91D9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5D9222
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	loc_5D961B
jmp	loc_5D933F

loc_5D9222:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5D9254
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D961B

loc_5D9254:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5D929E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	loc_5D961B

loc_5D929E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D9314
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D92ED
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	loc_5D961B
jmp	short loc_5D9312

loc_5D92ED:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	loc_5D961B

loc_5D9312:
jmp	short loc_5D933F

loc_5D9314:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCD80
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D961B

loc_5D933F:
jmp	loc_5D961B

loc_5D9344:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5D93D5
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5D93A5
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	loc_5D961B
jmp	short loc_5D93D0

loc_5D93A5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCD80
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D961B

loc_5D93D0:
jmp	loc_5D961B

loc_5D93D5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5D943F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D943F
mov	[ebp+var_C4], 1
jmp	short loc_5D9449

loc_5D943F:
mov	[ebp+var_C4], 0

loc_5D9449:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D945E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D945E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D94C0
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D9496
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	loc_5D961B
jmp	short loc_5D94BB

loc_5D9496:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	loc_5D961B

loc_5D94BB:
jmp	loc_5D961B

loc_5D94C0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D950D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5D950D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5D9559
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5D9559
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5D954D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D9559

loc_5D954D:
mov	[ebp+var_C8], 1
jmp	short loc_5D9563

loc_5D9559:
mov	[ebp+var_C8], 0

loc_5D9563:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5D9578
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D9578:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5D95D1
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D95AD
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	short loc_5D961B
jmp	short loc_5D95CF

loc_5D95AD:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCC40
mov	eax, [ebp+arg_0]
jmp	short loc_5D961B

loc_5D95CF:
jmp	short loc_5D961B

loc_5D95D1:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5D95EF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D961B
jmp	short loc_5D961B

loc_5D95EF:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DCD80
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D961B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D9170 endp

align 10h


; Attributes: bp-based frame

sub_5D9630 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5C6F30
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5D9686
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5D9630
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5D9686:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5D9695:
cmp	[ebp+arg_0], 0
jz	short loc_5D9702
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5C6F30
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5D96F1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5D9630
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5D96F1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5D9695

loc_5D9702:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5D9630 endp

align 10h


; Attributes: bp-based frame

sub_5D9710 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D98ED
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D9779
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_46CAB0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3

loc_5D9779:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5D97C5
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3
jmp	loc_5D98E8

loc_5D97C5:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5D97FA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3

loc_5D97FA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5D9844
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3

loc_5D9844:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D98BD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D9896
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3
jmp	short loc_5D98BB

loc_5D9896:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3

loc_5D98BB:
jmp	short loc_5D98E8

loc_5D98BD:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_46CAB0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3

loc_5D98E8:
jmp	loc_5D9BD3

loc_5D98ED:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5D9981
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5D9951
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3
jmp	short loc_5D997C

loc_5D9951:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_46CAB0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3

loc_5D997C:
jmp	loc_5D9BD3

loc_5D9981:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5D99F1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D99F1
mov	[ebp+var_A4], 1
jmp	short loc_5D99FB

loc_5D99F1:
mov	[ebp+var_A4], 0

loc_5D99FB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D9A10
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D9A10:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5D9A72
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D9A48
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3
jmp	short loc_5D9A6D

loc_5D9A48:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	loc_5D9BD3

loc_5D9A6D:
jmp	loc_5D9BD3

loc_5D9A72:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D9AC2
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5D9AC2:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5D9B11
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5D9B11
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5D9B05
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5D9B11

loc_5D9B05:
mov	[ebp+var_A8], 1
jmp	short loc_5D9B1B

loc_5D9B11:
mov	[ebp+var_A8], 0

loc_5D9B1B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5D9B30
and	[ebp+var_4C], 0FFFFFFFDh

loc_5D9B30:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5D9B89
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5D9B65
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	short loc_5D9BD3
jmp	short loc_5D9B87

loc_5D9B65:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_474E80
mov	eax, [ebp+arg_0]
jmp	short loc_5D9BD3

loc_5D9B87:
jmp	short loc_5D9BD3

loc_5D9B89:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5D9BA7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5D9BD3
jmp	short loc_5D9BD3

loc_5D9BA7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_46CAB0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5D9BD3:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D9710 endp

align 10h


; Attributes: bp-based frame

sub_5D9BE0 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5DB3F0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5D9C36
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5D9BE0
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5D9C36:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5D9C45:
cmp	[ebp+arg_0], 0
jz	short loc_5D9CB2
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5DB3F0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5D9CA1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5D9BE0
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5D9CA1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5D9C45

loc_5D9CB2:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5D9BE0 endp

align 10h


; Attributes: bp-based frame

sub_5D9CC0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5D9E94
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D9D29
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD050
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B

loc_5D9D29:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5D9D72
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B
jmp	loc_5D9E8F

loc_5D9D72:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5D9DA4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B

loc_5D9DA4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5D9DEE
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B

loc_5D9DEE:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5D9E64
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5D9E3D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B
jmp	short loc_5D9E62

loc_5D9E3D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B

loc_5D9E62:
jmp	short loc_5D9E8F

loc_5D9E64:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD050
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B

loc_5D9E8F:
jmp	loc_5DA16B

loc_5D9E94:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5D9F25
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5D9EF5
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B
jmp	short loc_5D9F20

loc_5D9EF5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD050
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B

loc_5D9F20:
jmp	loc_5DA16B

loc_5D9F25:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5D9F8F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5D9F8F
mov	[ebp+var_C4], 1
jmp	short loc_5D9F99

loc_5D9F8F:
mov	[ebp+var_C4], 0

loc_5D9F99:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5D9FAE
and	[ebp+var_4C], 0FFFFFFFEh

loc_5D9FAE:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5DA010
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5D9FE6
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B
jmp	short loc_5DA00B

loc_5D9FE6:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	loc_5DA16B

loc_5DA00B:
jmp	loc_5DA16B

loc_5DA010:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5DA05D
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5DA05D:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5DA0A9
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5DA0A9
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5DA09D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DA0A9

loc_5DA09D:
mov	[ebp+var_C8], 1
jmp	short loc_5DA0B3

loc_5DA0A9:
mov	[ebp+var_C8], 0

loc_5DA0B3:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5DA0C8
and	[ebp+var_4C], 0FFFFFFFDh

loc_5DA0C8:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5DA121
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5DA0FD
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	short loc_5DA16B
jmp	short loc_5DA11F

loc_5DA0FD:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DCF10
mov	eax, [ebp+arg_0]
jmp	short loc_5DA16B

loc_5DA11F:
jmp	short loc_5DA16B

loc_5DA121:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5DA13F
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5DA16B
jmp	short loc_5DA16B

loc_5DA13F:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DD050
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5DA16B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5D9CC0 endp

align 10h


; Attributes: bp-based frame

sub_5DA180 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_4796D0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5DA1D6
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5DA180
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5DA1D6:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5DA1E5:
cmp	[ebp+arg_0], 0
jz	short loc_5DA252
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_4796D0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5DA241
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5DA180
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5DA241:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5DA1E5

loc_5DA252:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5DA180 endp

align 10h


; Attributes: bp-based frame

sub_5DA260 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5DA434
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DA2C9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_46BED0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B

loc_5DA2C9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5DA312
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B
jmp	loc_5DA42F

loc_5DA312:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5DA344
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B

loc_5DA344:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5DA38E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B

loc_5DA38E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5DA404
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5DA3DD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B
jmp	short loc_5DA402

loc_5DA3DD:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B

loc_5DA402:
jmp	short loc_5DA42F

loc_5DA404:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_46BED0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B

loc_5DA42F:
jmp	loc_5DA70B

loc_5DA434:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5DA4C5
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5DA495
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B
jmp	short loc_5DA4C0

loc_5DA495:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_46BED0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B

loc_5DA4C0:
jmp	loc_5DA70B

loc_5DA4C5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5DA52F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DA52F
mov	[ebp+var_C4], 1
jmp	short loc_5DA539

loc_5DA52F:
mov	[ebp+var_C4], 0

loc_5DA539:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5DA54E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5DA54E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5DA5B0
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5DA586
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B
jmp	short loc_5DA5AB

loc_5DA586:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	loc_5DA70B

loc_5DA5AB:
jmp	loc_5DA70B

loc_5DA5B0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5DA5FD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5DA5FD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5DA649
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5DA649
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5DA63D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DA649

loc_5DA63D:
mov	[ebp+var_C8], 1
jmp	short loc_5DA653

loc_5DA649:
mov	[ebp+var_C8], 0

loc_5DA653:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5DA668
and	[ebp+var_4C], 0FFFFFFFDh

loc_5DA668:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5DA6C1
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5DA69D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	short loc_5DA70B
jmp	short loc_5DA6BF

loc_5DA69D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD1E0
mov	eax, [ebp+arg_0]
jmp	short loc_5DA70B

loc_5DA6BF:
jmp	short loc_5DA70B

loc_5DA6C1:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5DA6DF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5DA70B
jmp	short loc_5DA70B

loc_5DA6DF:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_46BED0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5DA70B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5DA260 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DA720(void *)
sub_5DA720 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_429100
mov	ecx, [ebp+arg_0]
call	sub_407910
xor	ecx, ecx
and	ecx, 1
jz	short loc_5DA74F
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DA74F:
mov	esp, ebp
pop	ebp
retn
sub_5DA720 endp

align 10h


; Attributes: bp-based frame

sub_5DA760 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwouiinterface ; "LWOUIInterface"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5DA7C5
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5DA7C5
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_5DA7C5
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5DA7BE
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_5DA7C5

loc_5DA7BE:
mov	[ebp+var_10], 0

loc_5DA7C5:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_5DA760 endp

align 10h


; Attributes: bp-based frame

sub_5DA7D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DA817
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DB340
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DA8CA

loc_5DA817:
cmp	[ebp+arg_10], 0
jnz	short loc_5DA84F
cmp	[ebp+arg_C], 0
jnz	short loc_5DA846
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DA84F

loc_5DA846:
mov	[ebp+var_34], 1
jmp	short loc_5DA856

loc_5DA84F:
mov	[ebp+var_34], 0

loc_5DA856:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5DA868
and	[ebp+var_C], 0FFFFFFFEh

loc_5DA868:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5DA89E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DB340
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5DA89C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5DA89C:
jmp	short loc_5DA8CA

loc_5DA89E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5DB340
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5DA8CA
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5DA8CA:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DA7D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DA910(void *)
sub_5DA910 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5DA94D
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DA94D:
mov	esp, ebp
pop	ebp
retn
sub_5DA910 endp

align 10h


; Attributes: bp-based frame

sub_5DA960 proc	near

var_9C=	dword ptr -9Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_9C], ecx
lea	eax, [ebp+var_1]
push	eax
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_14]
call	sub_4046E0
mov	ecx, [ebp+var_9C]
call	sub_5DD3D0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5DA960 endp

align 10h


; Attributes: bp-based frame

sub_5DA9B0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_38]
call	sub_5DE0D0
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	ecx, [ebp+var_8]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+var_34], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5DA9B0 endp

align 10h


; Attributes: bp-based frame

sub_5DAA20 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DAA67
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DB390
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DAB16

loc_5DAA67:
cmp	[ebp+arg_10], 0
jnz	short loc_5DAA9B
cmp	[ebp+arg_C], 0
jnz	short loc_5DAA92
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DAA9B

loc_5DAA92:
mov	[ebp+var_34], 1
jmp	short loc_5DAAA2

loc_5DAA9B:
mov	[ebp+var_34], 0

loc_5DAAA2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DAAB4
and	[ebp+var_C], 0FFFFFFFEh

loc_5DAAB4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DAAEA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DB390
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DAAE8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DAAE8:
jmp	short loc_5DAB16

loc_5DAAEA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DB390
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DAB16
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DAB16:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DAA20 endp

align 10h


; Attributes: bp-based frame

sub_5DAB60 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_A4=	dword ptr -0A4h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_C0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_C0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5DAD34
mov	edx, [ebp+var_C0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DABC9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD5F0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B

loc_5DABC9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5DAC12
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B
jmp	loc_5DAD2F

loc_5DAC12:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_5C]
call	sub_404510
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5DAC44
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B

loc_5DAC44:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_C0]
jnz	short loc_5DAC8E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B

loc_5DAC8E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5DAD04
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5DACDD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B
jmp	short loc_5DAD02

loc_5DACDD:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B

loc_5DAD02:
jmp	short loc_5DAD2F

loc_5DAD04:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD5F0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B

loc_5DAD2F:
jmp	loc_5DB00B

loc_5DAD34:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_C0]
jnz	loc_5DADC5
mov	ecx, [ebp+var_C0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_70]
call	sub_404510
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5DAD95
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B
jmp	short loc_5DADC0

loc_5DAD95:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD5F0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B

loc_5DADC0:
jmp	loc_5DB00B

loc_5DADC5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+arg_8]
call	sub_404510
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5DAE2F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_84]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DAE2F
mov	[ebp+var_C4], 1
jmp	short loc_5DAE39

loc_5DAE2F:
mov	[ebp+var_C4], 0

loc_5DAE39:
mov	dl, byte ptr [ebp+var_C4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5DAE4E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5DAE4E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5DAEB0
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5DAE86
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B
jmp	short loc_5DAEAB

loc_5DAE86:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	loc_5DB00B

loc_5DAEAB:
jmp	loc_5DB00B

loc_5DAEB0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5DAEFD
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8C]
call	sub_404510
mov	[ebp+var_11], al

loc_5DAEFD:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5DAF49
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5DAF49
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C0]
jz	short loc_5DAF3D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DAF49

loc_5DAF3D:
mov	[ebp+var_C8], 1
jmp	short loc_5DAF53

loc_5DAF49:
mov	[ebp+var_C8], 0

loc_5DAF53:
mov	dl, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5DAF68
and	[ebp+var_4C], 0FFFFFFFDh

loc_5DAF68:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5DAFC1
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5DAF9D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	short loc_5DB00B
jmp	short loc_5DAFBF

loc_5DAF9D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C0]
call	sub_5DD4B0
mov	eax, [ebp+arg_0]
jmp	short loc_5DB00B

loc_5DAFBF:
jmp	short loc_5DB00B

loc_5DAFC1:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5DAFDF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5DB00B
jmp	short loc_5DB00B

loc_5DAFDF:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_C0]
call	sub_5DD5F0
mov	[ebp+var_BC], eax
mov	eax, [ebp+var_BC]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5DB00B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5DAB60 endp

align 10h


; Attributes: bp-based frame

sub_5DB020 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DD780
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5DB020 endp

align 10h


; Attributes: bp-based frame

sub_5DB060 proc	near

var_38=	dword ptr -38h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
jmp	short loc_5DB073

loc_5DB06B:
lea	eax, [ebp+arg_4]
call	sub_405E90

loc_5DB073:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5DB0AF
mov	eax, [ebp+arg_4]
add	eax, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
lea	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_5D1720
jmp	short loc_5DB06B

loc_5DB0AF:
mov	esp, ebp
pop	ebp
retn	10h
sub_5DB060 endp

align 10h


; Attributes: bp-based frame

sub_5DB0C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	esp, ebp
pop	ebp
retn	8
sub_5DB0C0 endp

align 10h


; Attributes: bp-based frame

sub_5DB0E0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5DB0FC

loc_5DB0F3:
mov	edx, [ebp+var_8]
add	edx, 5Ch
mov	[ebp+var_8], edx

loc_5DB0FC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5DB134
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5DB132
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DB132:
jmp	short loc_5DB0F3

loc_5DB134:
mov	esp, ebp
pop	ebp
retn
sub_5DB0E0 endp

align 10h


; Attributes: bp-based frame

sub_5DB140 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5DB15C

loc_5DB153:
mov	edx, [ebp+var_8]
add	edx, 2Ch
mov	[ebp+var_8], edx

loc_5DB15C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5DB189
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5DB187
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DB187:
jmp	short loc_5DB153

loc_5DB189:
mov	esp, ebp
pop	ebp
retn
sub_5DB140 endp

align 10h


; Attributes: bp-based frame

sub_5DB190 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5DB1AC

loc_5DB1A3:
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx

loc_5DB1AC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5DB1E0
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5DB1CB
mov	eax, [ebp+var_8]
mov	ecx, [eax]
call	sub_64A430

loc_5DB1CB:
xor	ecx, ecx
and	ecx, 1
jz	short loc_5DB1DE
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DB1DE:
jmp	short loc_5DB1A3

loc_5DB1E0:
mov	esp, ebp
pop	ebp
retn
sub_5DB190 endp

align 10h


; Attributes: bp-based frame

sub_5DB1F0 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5DB20C

loc_5DB203:
mov	edx, [ebp+var_8]
add	edx, 60h
mov	[ebp+var_8], edx

loc_5DB20C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5DB244
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5DB242
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DB242:
jmp	short loc_5DB203

loc_5DB244:
mov	esp, ebp
pop	ebp
retn
sub_5DB1F0 endp

align 10h


; Attributes: bp-based frame

sub_5DB250 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DD9A0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5DB250 endp

align 10h


; Attributes: bp-based frame

sub_5DB280 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DD9E0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5DB280 endp

align 10h


; Attributes: bp-based frame

sub_5DB2B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DDA20
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5DB2B0 endp

align 10h


; Attributes: bp-based frame

sub_5DB2E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
add	eax, 8
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_4023E0
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 30h
call	sub_4023E0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+58h]
mov	[edx+58h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DB2E0 endp

align 10h


; Attributes: bp-based frame

sub_5DB340 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DB440
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DDA60
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DB340 endp

align 10h


; Attributes: bp-based frame

sub_5DB390 proc	near

var_28=	dword ptr -28h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
mov	ecx, [ebp+var_28]
call	sub_49CA80
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5DE1E0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DB390 endp



; Attributes: bp-based frame

sub_5DB3F0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_489EA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DDAD0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DB3F0 endp

align 10h


; Attributes: bp-based frame

sub_5DB440 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 234F72Ch
jbe	short loc_5DB466
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5DB466:
cmp	[ebp+arg_0], 0
jz	short loc_5DB48C
mov	eax, [ebp+arg_0]
imul	eax, 74h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5DB493

loc_5DB48C:
mov	[ebp+var_C], 0

loc_5DB493:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5DB440 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5DB4A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DB4E7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDB40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DB596

loc_5DB4E7:
cmp	[ebp+arg_10], 0
jnz	short loc_5DB51B
cmp	[ebp+arg_C], 0
jnz	short loc_5DB512
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DB51B

loc_5DB512:
mov	[ebp+var_34], 1
jmp	short loc_5DB522

loc_5DB51B:
mov	[ebp+var_34], 0

loc_5DB522:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DB534
and	[ebp+var_C], 0FFFFFFFEh

loc_5DB534:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DB56A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDB40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DB568
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DB568:
jmp	short loc_5DB596

loc_5DB56A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDB40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DB596
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DB596:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DB4A0 endp

align 10h


; Attributes: bp-based frame

sub_5DB5E0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DB5FC:
cmp	[ebp+var_10], 0
jz	short loc_5DB643
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DB632
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5DB63B

loc_5DB632:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5DB63B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5DB5FC

loc_5DB643:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DB6E5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5DB6D6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DB4A0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DB75B
jmp	short loc_5DB6E5

loc_5DB6D6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DB6E5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DB740
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DB4A0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DB75B

loc_5DB740:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DB75B:
mov	esp, ebp
pop	ebp
retn	8
sub_5DB5E0 endp

align 10h


; Attributes: bp-based frame

sub_5DB770 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DB7B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDBA0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DB869

loc_5DB7B7:
cmp	[ebp+arg_10], 0
jnz	short loc_5DB7EE
cmp	[ebp+arg_C], 0
jnz	short loc_5DB7E5
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DB7EE

loc_5DB7E5:
mov	[ebp+var_34], 1
jmp	short loc_5DB7F5

loc_5DB7EE:
mov	[ebp+var_34], 0

loc_5DB7F5:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5DB807
and	[ebp+var_C], 0FFFFFFFEh

loc_5DB807:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5DB83D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDBA0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5DB83B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5DB83B:
jmp	short loc_5DB869

loc_5DB83D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5DDBA0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5DB869
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5DB869:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DB770 endp

align 10h


; Attributes: bp-based frame

sub_5DB8B0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DB8CC:
cmp	[ebp+var_10], 0
jz	short loc_5DB916
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DB905
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5DB90E

loc_5DB905:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5DB90E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5DB8CC

loc_5DB916:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5DB9B8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5DB9A9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5DB770
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5DBA31
jmp	short loc_5DB9B8

loc_5DB9A9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DB9B8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5DBA16
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5DB770
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5DBA31

loc_5DBA16:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5DBA31:
mov	esp, ebp
pop	ebp
retn	8
sub_5DB8B0 endp

align 10h


; Attributes: bp-based frame

sub_5DBA40 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DBA87
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDBF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DBB64

loc_5DBA87:
cmp	[ebp+arg_10], 0
jnz	short loc_5DBAE9
cmp	[ebp+arg_C], 0
jnz	short loc_5DBAE0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5DBAD1
jb	short loc_5DBAC8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5DBAD1

loc_5DBAC8:
mov	[ebp+var_3C], 1
jmp	short loc_5DBAD8

loc_5DBAD1:
mov	[ebp+var_3C], 0

loc_5DBAD8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5DBAE9

loc_5DBAE0:
mov	[ebp+var_40], 1
jmp	short loc_5DBAF0

loc_5DBAE9:
mov	[ebp+var_40], 0

loc_5DBAF0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5DBB02
and	[ebp+var_C], 0FFFFFFFEh

loc_5DBB02:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DBB38
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5DDBF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5DBB36
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5DBB36:
jmp	short loc_5DBB64

loc_5DBB38:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDBF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5DBB64
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5DBB64:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DBA40 endp

align 10h


; Attributes: bp-based frame

sub_5DBBB0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DBBCC:
cmp	[ebp+var_10], 0
jz	short loc_5DBC43
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5DBC12
jb	short loc_5DBC09
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5DBC12

loc_5DBC09:
mov	[ebp+var_64], 1
jmp	short loc_5DBC19

loc_5DBC12:
mov	[ebp+var_64], 0

loc_5DBC19:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DBC32
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5DBC3B

loc_5DBC32:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5DBC3B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5DBBCC

loc_5DBC43:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DBCE5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5DBCD6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5DBA40
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DBD8B
jmp	short loc_5DBCE5

loc_5DBCD6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DBCE5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5DBD1F
jb	short loc_5DBD16
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5DBD1F

loc_5DBD16:
mov	[ebp+var_78], 1
jmp	short loc_5DBD26

loc_5DBD1F:
mov	[ebp+var_78], 0

loc_5DBD26:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DBD70
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5DBA40
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DBD8B

loc_5DBD70:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DBD8B:
mov	esp, ebp
pop	ebp
retn	8
sub_5DBBB0 endp

align 10h


; Attributes: bp-based frame

sub_5DBDA0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DBDE7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDC40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DBE99

loc_5DBDE7:
cmp	[ebp+arg_10], 0
jnz	short loc_5DBE1E
cmp	[ebp+arg_C], 0
jnz	short loc_5DBE15
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DBE1E

loc_5DBE15:
mov	[ebp+var_34], 1
jmp	short loc_5DBE25

loc_5DBE1E:
mov	[ebp+var_34], 0

loc_5DBE25:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5DBE37
and	[ebp+var_C], 0FFFFFFFEh

loc_5DBE37:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5DBE6D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDC40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5DBE6B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5DBE6B:
jmp	short loc_5DBE99

loc_5DBE6D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5DDC40
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5DBE99
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5DBE99:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DBDA0 endp

align 10h


; Attributes: bp-based frame

sub_5DBEE0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DBEFC:
cmp	[ebp+var_10], 0
jz	short loc_5DBF46
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DBF35
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5DBF3E

loc_5DBF35:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5DBF3E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5DBEFC

loc_5DBF46:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5DBFE8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5DBFD9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5DBDA0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5DC061
jmp	short loc_5DBFE8

loc_5DBFD9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DBFE8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5DC046
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5DBDA0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5DC061

loc_5DC046:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5DC061:
mov	esp, ebp
pop	ebp
retn	8
sub_5DBEE0 endp

align 10h


; Attributes: bp-based frame

sub_5DC070 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DC0B7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDC90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DC166

loc_5DC0B7:
cmp	[ebp+arg_10], 0
jnz	short loc_5DC0EB
cmp	[ebp+arg_C], 0
jnz	short loc_5DC0E2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DC0EB

loc_5DC0E2:
mov	[ebp+var_34], 1
jmp	short loc_5DC0F2

loc_5DC0EB:
mov	[ebp+var_34], 0

loc_5DC0F2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DC104
and	[ebp+var_C], 0FFFFFFFEh

loc_5DC104:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DC13A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDC90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DC138
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DC138:
jmp	short loc_5DC166

loc_5DC13A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDC90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DC166
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DC166:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DC070 endp

align 10h


; Attributes: bp-based frame

sub_5DC1B0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DC1CC:
cmp	[ebp+var_10], 0
jz	short loc_5DC213
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DC202
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5DC20B

loc_5DC202:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5DC20B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5DC1CC

loc_5DC213:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DC2B5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5DC2A6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DC070
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DC32B
jmp	short loc_5DC2B5

loc_5DC2A6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DC2B5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DC310
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DC070
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DC32B

loc_5DC310:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DC32B:
mov	esp, ebp
pop	ebp
retn	8
sub_5DC1B0 endp

align 10h


; Attributes: bp-based frame

sub_5DC340 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DC387
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDCE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DC436

loc_5DC387:
cmp	[ebp+arg_10], 0
jnz	short loc_5DC3BB
cmp	[ebp+arg_C], 0
jnz	short loc_5DC3B2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DC3BB

loc_5DC3B2:
mov	[ebp+var_34], 1
jmp	short loc_5DC3C2

loc_5DC3BB:
mov	[ebp+var_34], 0

loc_5DC3C2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DC3D4
and	[ebp+var_C], 0FFFFFFFEh

loc_5DC3D4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DC40A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDCE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DC408
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DC408:
jmp	short loc_5DC436

loc_5DC40A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDCE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DC436
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DC436:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DC340 endp

align 10h


; Attributes: bp-based frame

sub_5DC480 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DC49C:
cmp	[ebp+var_10], 0
jz	short loc_5DC4E3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DC4D2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5DC4DB

loc_5DC4D2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5DC4DB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5DC49C

loc_5DC4E3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DC585
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5DC576
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DC340
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DC5FB
jmp	short loc_5DC585

loc_5DC576:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DC585:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DC5E0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DC340
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DC5FB

loc_5DC5E0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DC5FB:
mov	esp, ebp
pop	ebp
retn	8
sub_5DC480 endp

align 10h


; Attributes: bp-based frame

sub_5DC610 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DC657
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDD40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DC709

loc_5DC657:
cmp	[ebp+arg_10], 0
jnz	short loc_5DC68E
cmp	[ebp+arg_C], 0
jnz	short loc_5DC685
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5DC68E

loc_5DC685:
mov	[ebp+var_34], 1
jmp	short loc_5DC695

loc_5DC68E:
mov	[ebp+var_34], 0

loc_5DC695:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5DC6A7
and	[ebp+var_C], 0FFFFFFFEh

loc_5DC6A7:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5DC6DD
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDD40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5DC6DB
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5DC6DB:
jmp	short loc_5DC709

loc_5DC6DD:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5DDD40
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5DC709
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5DC709:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DC610 endp

align 10h


; Attributes: bp-based frame

sub_5DC750 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DC76C:
cmp	[ebp+var_10], 0
jz	short loc_5DC7B6
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DC7A5
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5DC7AE

loc_5DC7A5:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5DC7AE:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5DC76C

loc_5DC7B6:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5DC858
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5DC849
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5DC610
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5DC8D1
jmp	short loc_5DC858

loc_5DC849:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DC858:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5DC8B6
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5DC610
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5DC8D1

loc_5DC8B6:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5DC8D1:
mov	esp, ebp
pop	ebp
retn	8
sub_5DC750 endp

align 10h


; Attributes: bp-based frame

sub_5DC8E0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DC927
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDD90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DCA04

loc_5DC927:
cmp	[ebp+arg_10], 0
jnz	short loc_5DC989
cmp	[ebp+arg_C], 0
jnz	short loc_5DC980
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5DC971
jb	short loc_5DC968
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5DC971

loc_5DC968:
mov	[ebp+var_3C], 1
jmp	short loc_5DC978

loc_5DC971:
mov	[ebp+var_3C], 0

loc_5DC978:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5DC989

loc_5DC980:
mov	[ebp+var_40], 1
jmp	short loc_5DC990

loc_5DC989:
mov	[ebp+var_40], 0

loc_5DC990:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5DC9A2
and	[ebp+var_C], 0FFFFFFFEh

loc_5DC9A2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DC9D8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5DDD90
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5DC9D6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5DC9D6:
jmp	short loc_5DCA04

loc_5DC9D8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDD90
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5DCA04
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5DCA04:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DC8E0 endp

align 10h


; Attributes: bp-based frame

sub_5DCA50 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DCA6C:
cmp	[ebp+var_10], 0
jz	short loc_5DCAE3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5DCAB2
jb	short loc_5DCAA9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5DCAB2

loc_5DCAA9:
mov	[ebp+var_64], 1
jmp	short loc_5DCAB9

loc_5DCAB2:
mov	[ebp+var_64], 0

loc_5DCAB9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DCAD2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5DCADB

loc_5DCAD2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5DCADB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5DCA6C

loc_5DCAE3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DCB85
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5DCB76
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5DC8E0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DCC2B
jmp	short loc_5DCB85

loc_5DCB76:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DCB85:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5DCBBF
jb	short loc_5DCBB6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5DCBBF

loc_5DCBB6:
mov	[ebp+var_78], 1
jmp	short loc_5DCBC6

loc_5DCBBF:
mov	[ebp+var_78], 0

loc_5DCBC6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DCC10
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5DC8E0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DCC2B

loc_5DCC10:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DCC2B:
mov	esp, ebp
pop	ebp
retn	8
sub_5DCA50 endp

align 10h


; Attributes: bp-based frame

sub_5DCC40 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DCC87
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDDE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DCD36

loc_5DCC87:
cmp	[ebp+arg_10], 0
jnz	short loc_5DCCBB
cmp	[ebp+arg_C], 0
jnz	short loc_5DCCB2
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DCCBB

loc_5DCCB2:
mov	[ebp+var_34], 1
jmp	short loc_5DCCC2

loc_5DCCBB:
mov	[ebp+var_34], 0

loc_5DCCC2:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DCCD4
and	[ebp+var_C], 0FFFFFFFEh

loc_5DCCD4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DCD0A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDDE0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DCD08
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DCD08:
jmp	short loc_5DCD36

loc_5DCD0A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDDE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DCD36
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DCD36:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DCC40 endp

align 10h


; Attributes: bp-based frame

sub_5DCD80 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DCD9C:
cmp	[ebp+var_10], 0
jz	short loc_5DCDE3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DCDD2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5DCDDB

loc_5DCDD2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5DCDDB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5DCD9C

loc_5DCDE3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DCE85
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5DCE76
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DCC40
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DCEFB
jmp	short loc_5DCE85

loc_5DCE76:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DCE85:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DCEE0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DCC40
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DCEFB

loc_5DCEE0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DCEFB:
mov	esp, ebp
pop	ebp
retn	8
sub_5DCD80 endp

align 10h


; Attributes: bp-based frame

sub_5DCF10 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DCF57
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DB3F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DD006

loc_5DCF57:
cmp	[ebp+arg_10], 0
jnz	short loc_5DCF8B
cmp	[ebp+arg_C], 0
jnz	short loc_5DCF82
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DCF8B

loc_5DCF82:
mov	[ebp+var_34], 1
jmp	short loc_5DCF92

loc_5DCF8B:
mov	[ebp+var_34], 0

loc_5DCF92:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DCFA4
and	[ebp+var_C], 0FFFFFFFEh

loc_5DCFA4:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DCFDA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DB3F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DCFD8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DCFD8:
jmp	short loc_5DD006

loc_5DCFDA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DB3F0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DD006
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DD006:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DCF10 endp

align 10h


; Attributes: bp-based frame

sub_5DD050 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DD06C:
cmp	[ebp+var_10], 0
jz	short loc_5DD0B3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DD0A2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5DD0AB

loc_5DD0A2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5DD0AB:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5DD06C

loc_5DD0B3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DD155
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5DD146
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DCF10
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DD1CB
jmp	short loc_5DD155

loc_5DD146:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DD155:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DD1B0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DCF10
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DD1CB

loc_5DD1B0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DD1CB:
mov	esp, ebp
pop	ebp
retn	8
sub_5DD050 endp

align 10h


; Attributes: bp-based frame

sub_5DD1E0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DD227
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4796D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DD2D6

loc_5DD227:
cmp	[ebp+arg_10], 0
jnz	short loc_5DD25B
cmp	[ebp+arg_C], 0
jnz	short loc_5DD252
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DD25B

loc_5DD252:
mov	[ebp+var_34], 1
jmp	short loc_5DD262

loc_5DD25B:
mov	[ebp+var_34], 0

loc_5DD262:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DD274
and	[ebp+var_C], 0FFFFFFFEh

loc_5DD274:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DD2AA
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_4796D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DD2A8
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DD2A8:
jmp	short loc_5DD2D6

loc_5DD2AA:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_4796D0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DD2D6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DD2D6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DD1E0 endp

align 10h


; Attributes: bp-based frame

sub_5DD320 proc	near

var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5DD338:
cmp	[ebp+var_8], 0
jz	short loc_5DD384
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
cmp	edx, [ebp+var_C]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5DD379
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5DD382

loc_5DD379:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5DD382:
jmp	short loc_5DD338

loc_5DD384:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_2C]
jz	short loc_5DD3BC
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_10]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5DD3BC
mov	ecx, [ebp+var_2C]
mov	[ebp+var_4], ecx

loc_5DD3BC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DD320 endp

align 10h


; Attributes: bp-based frame

sub_5DD3D0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_38=	byte ptr -38h
var_34=	byte ptr -34h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
lea	eax, [ebp+var_34]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_18]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_1D]
push	edx
lea	eax, [ebp+var_34]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
call	sub_5DE580
add	esp, 0Ch
mov	[ebp+var_A4], eax
mov	edx, [ebp+var_A4]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_A0]
add	ecx, 8
call	sub_50F3A0
mov	edx, [ebp+var_A0]
mov	[edx], eax
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*8]
mov	ecx, [ebp+var_A0]
mov	[ecx+8], eax
mov	edx, [ebp+var_A0]
mov	eax, [edx]
push	eax
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_4C]
call	sub_4046E0
push	ecx
mov	[ebp+var_50], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_50]
call	sub_4046E0
call	sub_5DE080
add	esp, 0Ch
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A0]
mov	edx, [ebp+var_A8]
mov	[ecx+4], edx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5DD3D0 endp

align 10h


; Attributes: bp-based frame

sub_5DD4B0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5DD4F7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDE40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5DD5A6

loc_5DD4F7:
cmp	[ebp+arg_10], 0
jnz	short loc_5DD52B
cmp	[ebp+arg_C], 0
jnz	short loc_5DD522
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_8]
call	sub_404510
movzx	eax, al
test	eax, eax
jz	short loc_5DD52B

loc_5DD522:
mov	[ebp+var_34], 1
jmp	short loc_5DD532

loc_5DD52B:
mov	[ebp+var_34], 0

loc_5DD532:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5DD544
and	[ebp+var_C], 0FFFFFFFEh

loc_5DD544:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5DD57A
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5DDE40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5DD578
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5DD578:
jmp	short loc_5DD5A6

loc_5DD57A:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5DDE40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5DD5A6
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5DD5A6:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5DD4B0 endp

align 10h


; Attributes: bp-based frame

sub_5DD5F0 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5DD60C:
cmp	[ebp+var_10], 0
jz	short loc_5DD653
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
call	sub_404510
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5DD642
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5DD64B

loc_5DD642:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5DD64B:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5DD60C

loc_5DD653:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5DD6F5
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5DD6E6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5DD4B0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5DD76B
jmp	short loc_5DD6F5

loc_5DD6E6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5DD6F5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4C]
call	sub_404510
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5DD750
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5DD4B0
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5DD76B

loc_5DD750:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5DD76B:
mov	esp, ebp
pop	ebp
retn	8
sub_5DD5F0 endp

align 10h


; Attributes: bp-based frame

sub_5DD780 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5DD791

loc_5DD788:
mov	eax, [ebp+arg_0]
sub	eax, 5Ch
mov	[ebp+arg_0], eax

loc_5DD791:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5DD7E2
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 30h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5DD7E0
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DD7E0:
jmp	short loc_5DD788

loc_5DD7E2:
mov	esp, ebp
pop	ebp
retn
sub_5DD780 endp

align 10h


; Attributes: bp-based frame

sub_5DD7F0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5DD801

loc_5DD7F8:
mov	eax, [ebp+arg_0]
sub	eax, 2Ch
mov	[ebp+arg_0], eax

loc_5DD801:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5DD847
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 2Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5DD845
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DD845:
jmp	short loc_5DD7F8

loc_5DD847:
mov	esp, ebp
pop	ebp
retn
sub_5DD7F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DD850(void *, int)
sub_5DD850 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DD8A7
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx], 0
jz	short loc_5DD895
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
call	sub_64A420

loc_5DD895:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5DD8AE

loc_5DD8A7:
mov	[ebp+var_C], 0

loc_5DD8AE:
mov	esp, ebp
pop	ebp
retn
sub_5DD850 endp

align 10h


; Attributes: bp-based frame

sub_5DD8C0 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5DD8D1

loc_5DD8C8:
mov	eax, [ebp+arg_0]
sub	eax, 4
mov	[ebp+arg_0], eax

loc_5DD8D1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5DD91E
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_5DD909
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_64A430

loc_5DD909:
xor	eax, eax
and	eax, 1
jz	short loc_5DD91C
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DD91C:
jmp	short loc_5DD8C8

loc_5DD91E:
mov	esp, ebp
pop	ebp
retn
sub_5DD8C0 endp

align 10h


; Attributes: bp-based frame

sub_5DD930 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5DD941

loc_5DD938:
mov	eax, [ebp+arg_0]
sub	eax, 60h
mov	[ebp+arg_0], eax

loc_5DD941:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5DD992
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 60h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 34h
call	sub_407E50
mov	ecx, [ebp+var_8]
add	ecx, 0Ch
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5DD990
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DD990:
jmp	short loc_5DD938

loc_5DD992:
mov	esp, ebp
pop	ebp
retn
sub_5DD930 endp

align 10h


; Attributes: bp-based frame

sub_5DD9A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DD7F0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5DD9A0 endp

align 10h


; Attributes: bp-based frame

sub_5DD9E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DD8C0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5DD9E0 endp

align 10h


; Attributes: bp-based frame

sub_5DDA20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5DD930
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5DDA20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DDA60(void *, int)
sub_5DDA60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	64h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DDAB7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_5CF3F0
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5DDABE

loc_5DDAB7:
mov	[ebp+var_C], 0

loc_5DDABE:
mov	esp, ebp
pop	ebp
retn
sub_5DDA60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DDAD0(void *, int)
sub_5DDAD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	34h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DDB29
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_5D6270
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5DDB30

loc_5DDB29:
mov	[ebp+var_C], 0

loc_5DDB30:
mov	esp, ebp
pop	ebp
retn
sub_5DDAD0 endp

align 10h


; Attributes: bp-based frame

sub_5DDB40 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_49CA80
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5DE630
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDB40 endp



; Attributes: bp-based frame

sub_5DDBA0 proc	near

var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5DDE90
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DE260
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDBA0 endp

align 10h


; Attributes: bp-based frame

sub_5DDBF0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_5DDEF0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DE2E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDBF0 endp

align 10h


; Attributes: bp-based frame

sub_5DDC40 proc	near

var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_503430
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DE350
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDC40 endp

align 10h


; Attributes: bp-based frame

sub_5DDC90 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DE3C0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDC90 endp

align 10h


; Attributes: bp-based frame

sub_5DDCE0 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_49CAE0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5DE6A0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDCE0 endp



; Attributes: bp-based frame

sub_5DDD40 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CA80
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DE430
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDD40 endp

align 10h


; Attributes: bp-based frame

sub_5DDD90 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5DDF50
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DE4A0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDD90 endp

align 10h


; Attributes: bp-based frame

sub_5DDDE0 proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
mov	ecx, [ebp+var_24]
call	sub_5DDFB0
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5DE700
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDDE0 endp



; Attributes: bp-based frame

sub_5DDE40 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_49CAE0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5DE510
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDE40 endp

align 10h


; Attributes: bp-based frame

sub_5DDE90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 0AAAAAAAh
jbe	short loc_5DDEB6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5DDEB6:
cmp	[ebp+arg_0], 0
jz	short loc_5DDEDC
mov	eax, [ebp+arg_0]
imul	eax, 18h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5DDEE3

loc_5DDEDC:
mov	[ebp+var_C], 0

loc_5DDEE3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDE90 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5DDEF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 6666666h
jbe	short loc_5DDF16
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5DDF16:
cmp	[ebp+arg_0], 0
jz	short loc_5DDF3C
mov	eax, [ebp+arg_0]
imul	eax, 28h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5DDF43

loc_5DDF3C:
mov	[ebp+var_C], 0

loc_5DDF43:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDEF0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5DDF50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 2AAAAAAh
jbe	short loc_5DDF76
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5DDF76:
cmp	[ebp+arg_0], 0
jz	short loc_5DDF9C
mov	eax, [ebp+arg_0]
imul	eax, 60h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5DDFA3

loc_5DDF9C:
mov	[ebp+var_C], 0

loc_5DDFA3:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDF50 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5DDFB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], (offset loc_83126B+3)
jbe	short loc_5DDFD6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5DDFD6:
cmp	[ebp+arg_0], 0
jz	short loc_5DDFFF
mov	eax, [ebp+arg_0]
imul	eax, 1F4h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5DE006

loc_5DDFFF:
mov	[ebp+var_C], 0

loc_5DE006:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5DDFB0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5DE010 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5DE028:
cmp	[ebp+var_8], 0
jz	short loc_5DE068
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
movzx	edx, cl
test	edx, edx
jnz	short loc_5DE05D
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5DE066

loc_5DE05D:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5DE066:
jmp	short loc_5DE028

loc_5DE068:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DE010 endp

align 10h


; Attributes: bp-based frame

sub_5DE080 proc	near

var_58=	dword ptr -58h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_D], al
mov	cl, [ebp+var_D]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_18]
call	sub_4046E0
call	sub_5DE5F0
add	esp, 10h
mov	[ebp+var_58], eax
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn
sub_5DE080 endp

align 10h


; Attributes: bp-based frame

sub_5DE0D0 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5DE0E8:
cmp	[ebp+var_8], 0
jz	short loc_5DE129
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5DE11E
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	[ebp+var_8], edx
jmp	short loc_5DE127

loc_5DE11E:
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_8], ecx

loc_5DE127:
jmp	short loc_5DE0E8

loc_5DE129:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DE0D0 endp

align 10h


; Attributes: bp-based frame

sub_5DE140 proc	near

var_44=	dword ptr -44h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5DE158:
cmp	[ebp+var_8], 0
jz	short loc_5DE1C8
lea	ecx, [ebp+var_25]
call	sub_401EF0
push	eax
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_24]
call	sub_407D30
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_2C], ecx
lea	eax, [ebp+var_24]
mov	ecx, [ebp+var_2C]
call	sub_404510
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_9], dl
lea	ecx, [ebp+var_24]
call	sub_407910
lea	ecx, [ebp+var_25]
call	nullsub_1
movzx	eax, [ebp+var_9]
test	eax, eax
jz	short loc_5DE1BD
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5DE1C6

loc_5DE1BD:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5DE1C6:
jmp	short loc_5DE158

loc_5DE1C8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DE140 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE1E0(void *, int)
sub_5DE1E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5DE24A
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+arg_4]
add	edx, 18h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
add	eax, 18h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_5DE238
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+var_8]
mov	[eax], edx

loc_5DE238:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_14], ecx
jmp	short loc_5DE251

loc_5DE24A:
mov	[ebp+var_14], 0

loc_5DE251:
mov	esp, ebp
pop	ebp
retn
sub_5DE1E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE260(void *, int)
sub_5DE260 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DE2D3
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_5DE2C1
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_64A420

loc_5DE2C1:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_14], eax
jmp	short loc_5DE2DA

loc_5DE2D3:
mov	[ebp+var_14], 0

loc_5DE2DA:
mov	esp, ebp
pop	ebp
retn
sub_5DE260 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE2E0(void *, int)
sub_5DE2E0 proc	near

var_40=	dword ptr -40h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DE33D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_5D0A80
mov	edx, [ebp+var_8]
mov	[ebp+var_40], edx
jmp	short loc_5DE344

loc_5DE33D:
mov	[ebp+var_40], 0

loc_5DE344:
mov	esp, ebp
pop	ebp
retn
sub_5DE2E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE350(void *, int)
sub_5DE350 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	30h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DE3A7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 8
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_5D61F0
mov	eax, [ebp+var_8]
mov	[ebp+var_10], eax
jmp	short loc_5DE3AE

loc_5DE3A7:
mov	[ebp+var_10], 0

loc_5DE3AE:
mov	esp, ebp
pop	ebp
retn
sub_5DE350 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE3C0(void *, int)
sub_5DE3C0 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DE419
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_8]
add	ecx, 18h
call	sub_5D08C0
mov	ecx, [ebp+var_8]
mov	[ebp+var_74], ecx
jmp	short loc_5DE420

loc_5DE419:
mov	[ebp+var_74], 0

loc_5DE420:
mov	esp, ebp
pop	ebp
retn
sub_5DE3C0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE430(void *, int)
sub_5DE430 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DE487
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_5D62F0
mov	eax, [ebp+var_8]
mov	[ebp+var_28], eax
jmp	short loc_5DE48E

loc_5DE487:
mov	[ebp+var_28], 0

loc_5DE48E:
mov	esp, ebp
pop	ebp
retn
sub_5DE430 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE4A0(void *, int)
sub_5DE4A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	50h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DE4FD
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_5D6360
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5DE504

loc_5DE4FD:
mov	[ebp+var_C], 0

loc_5DE504:
mov	esp, ebp
pop	ebp
retn
sub_5DE4A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE510(void *, int)
sub_5DE510 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5DE569
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_403850
mov	eax, [ebp+arg_4]
mov	ecx, [eax+18h]
mov	edx, [eax+1Ch]
mov	eax, [ebp+var_8]
mov	[eax+18h], ecx
mov	[eax+1Ch], edx
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
jmp	short loc_5DE570

loc_5DE569:
mov	[ebp+var_C], 0

loc_5DE570:
mov	esp, ebp
pop	ebp
retn
sub_5DE510 endp

align 10h


; Attributes: bp-based frame

sub_5DE580 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_8], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
lea	eax, [ebp+var_4]
call	sub_4046E0

loc_5DE59A:
lea	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	ecx, [edx]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_14]
setnz	cl
mov	[ebp+var_15], cl
movzx	edx, [ebp+var_15]
test	edx, edx
jz	short loc_5DE5DD
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_5DE59A

loc_5DE5DD:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5DE580 endp

align 10h


; Attributes: bp-based frame

sub_5DE5F0 proc	near

var_40=	dword ptr -40h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
push	0
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
push	ecx
mov	[ebp+var_14], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_14]
call	sub_4046E0
call	sub_5DE780
add	esp, 14h
mov	[ebp+var_40], eax
mov	eax, [ebp+var_40]
mov	esp, ebp
pop	ebp
retn
sub_5DE5F0 endp



; Attributes: bp-based frame

; int __cdecl sub_5DE630(void *, int)
sub_5DE630 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	1Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5DE68F
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+arg_4]
add	edx, 18h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
add	eax, 18h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx], 0
jz	short loc_5DE67D
mov	edx, [ebp+var_C]
mov	ecx, [edx]
call	sub_64A420

loc_5DE67D:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_10], eax
jmp	short loc_5DE696

loc_5DE68F:
mov	[ebp+var_10], 0

loc_5DE696:
mov	esp, ebp
pop	ebp
retn
sub_5DE630 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE6A0(void *, int)
sub_5DE6A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5DE6F0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+var_4]
add	edx, 18h
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
call	sub_401740
mov	eax, [ebp+arg_4]
add	eax, 18h
mov	ecx, [ebp+var_8]
call	sub_402700
mov	eax, [ebp+var_4]
mov	[ebp+var_C], eax
jmp	short loc_5DE6F7

loc_5DE6F0:
mov	[ebp+var_C], 0

loc_5DE6F7:
mov	esp, ebp
pop	ebp
retn
sub_5DE6A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5DE700(void *, int)
sub_5DE700 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
push	esi
push	edi
mov	eax, [ebp+arg_0]
push	eax		; void *
push	1E4h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5DE765
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_403850
mov	edx, [ebp+arg_4]
add	edx, 18h
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
add	eax, 18h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ecx], eax
mov	esi, [ebp+var_C]
add	esi, 4
mov	edi, [ebp+var_8]
add	edi, 4
mov	ecx, 72h
rep movsd
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
jmp	short loc_5DE76C

loc_5DE765:
mov	[ebp+var_10], 0

loc_5DE76C:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5DE700 endp

align 10h


; Attributes: bp-based frame

sub_5DE780 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
call	sub_5DE7C0
add	esp, 10h
mov	[ebp+var_2C], eax
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_5DE780 endp

align 10h


; Attributes: bp-based frame

sub_5DE7C0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
jmp	short loc_5DE7E6

loc_5DE7CE:
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_0], eax
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_5DE7E6:
lea	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+var_10]
setnz	dl
mov	[ebp+var_19], dl
movzx	eax, [ebp+var_19]
test	eax, eax
jz	short loc_5DE83E
mov	ecx, [ebp+arg_0]
add	ecx, 10h
mov	[ebp+var_18], ecx
xor	edx, edx
mov	byte ptr [ebp+var_14+1], dl
mov	al, byte ptr [ebp+var_14+1]
mov	[ebp+var_11], al
xor	ecx, ecx
mov	byte ptr [ebp+var_14], cl
mov	dl, byte ptr [ebp+var_14]
mov	[ebp+var_12], dl
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
jmp	short loc_5DE7CE

loc_5DE83E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5DE7C0 endp

align 10h



sub_5DE850 proc	near
sub	ecx, 34h
jmp	sub_5CF050
sub_5DE850 endp

align 10h



sub_5DE860 proc	near
sub	ecx, 0Ch
jmp	sub_5CFBE0
sub_5DE860 endp

align 10h



sub_5DE870 proc	near
sub	ecx, 194h
jmp	sub_5CFA40
sub_5DE870 endp

align 10h



sub_5DE880 proc	near
sub	ecx, 28h
jmp	sub_5CF050
sub_5DE880 endp

align 10h



sub_5DE890 proc	near
sub	ecx, 48h
jmp	sub_5CF0D0
sub_5DE890 endp

align 10h


; Attributes: bp-based frame

sub_5DE8A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx]
fstp	dword ptr [ecx+eax*4]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+4]
fstp	dword ptr [ecx+eax*4+0Ch]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+eax*4+18h]
mov	esp, ebp
pop	ebp
retn	8
sub_5DE8A0 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5DE900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1160E70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DE925
push	10h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DE925:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DE900 endp

align 10h


; Attributes: bp-based frame

sub_5DE930 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_0]
setz	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn	8
sub_5DE930 endp

align 10h


; Attributes: bp-based frame

sub_5DE950 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5DE96D
mov	ecx, [ebp+var_4]
call	sub_40AA80

loc_5DE96D:
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_5E2090
cmp	[ebp+var_4], 0
jz	short loc_5DE98B
mov	ecx, [ebp+var_4]
call	sub_40AA90

loc_5DE98B:
mov	esp, ebp
pop	ebp
retn	4
sub_5DE950 endp

align 10h


; Attributes: bp-based frame

sub_5DE9A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 0
jz	short loc_5DE9C2
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
call	sub_40AA80

loc_5DE9C2:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5DE9A0 endp

align 10h


; Attributes: bp-based frame

sub_5DE9D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [eax+0Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_14], ecx
jmp	short loc_5DE9FC

loc_5DE9F3:
mov	edx, [ebp+var_14]
add	edx, 4
mov	[ebp+var_14], edx

loc_5DE9FC:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_4]
jz	short loc_5DEA16
mov	ecx, [ebp+var_14]
push	ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_5E2090
jmp	short loc_5DE9F3

loc_5DEA16:
mov	esp, ebp
pop	ebp
retn	4
sub_5DE9D0 endp

align 10h


; Attributes: bp-based frame

sub_5DEA20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_5DEA41
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
call	sub_40AA80

loc_5DEA41:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEA20 endp

align 10h


; Attributes: bp-based frame

sub_5DEA50 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
add	ecx, 4
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_C]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_20]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_14]
add	eax, 8
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_20]
add	edx, 1Ch
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_1C]
add	edx, 8
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn
sub_5DEA50 endp

align 10h


; Attributes: bp-based frame

sub_5DEB00 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 7D8h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C0198
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5DEB00 endp

align 10h


; Attributes: bp-based frame

sub_5DEB50 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 7F1h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C019C
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_1014960
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18h], 0
mov	dword ptr [eax+1Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5DEB50 endp

align 10h


; Attributes: bp-based frame

sub_5DEBB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_1014910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEBE0
push	28h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DEBE0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEBB0 endp

align 10h


; Attributes: bp-based frame

sub_5DEBF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_5D2630
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEC20
push	10h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DEC20:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEBF0 endp

align 10h


; Attributes: bp-based frame

sub_5DEC30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B5D090
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEC55
push	68h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DEC55:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEC30 endp

align 10h


; Attributes: bp-based frame

sub_5DEC60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_429300
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEC85
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DEC85:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEC60 endp

align 10h


; Attributes: bp-based frame

sub_5DEC90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B5A170
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DECB5
push	18h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DECB5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEC90 endp

align 10h


; Attributes: bp-based frame

sub_5DECC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B5CF80
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DECE5
push	54h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DECE5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DECC0 endp

align 10h


; Attributes: bp-based frame

sub_5DECF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DED15
push	0Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DED15:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DECF0 endp

align 10h


; Attributes: bp-based frame

sub_5DED20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	0C06h
mov	ecx, [ebp+var_4]
call	sub_42CCA0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C020C
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_401EF0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+18h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+19h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5DED20 endp

align 10h


; Attributes: bp-based frame

sub_5DED60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DED85
push	1Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DED85:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DED60 endp

align 10h


; Attributes: bp-based frame

sub_5DED90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_456120
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEDB5
push	18h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DEDB5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DED90 endp

align 10h


; Attributes: bp-based frame

sub_5DEDC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_15 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEDE3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DEDE3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEDC0 endp

align 10h


; Attributes: bp-based frame

sub_5DEDF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146CC4C
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DEE14
mov	edx, [ebp+var_4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DEE14:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEDF0 endp

align 10h


; Attributes: bp-based frame

sub_5DEE20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15FBD68
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_5E0BF0
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_489340
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_429100
mov	esp, ebp
pop	ebp
retn
sub_5DEE20 endp

align 10h


; Attributes: bp-based frame

sub_5DEE60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
push	ecx
mov	[ebp+var_8], esp
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
mov	[eax], edx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_5DEE8A
mov	ecx, [ebp+var_8]
mov	ecx, [ecx]
call	sub_40AA80

loc_5DEE8A:
mov	edx, [ebp+arg_0]
push	edx
call	sub_645BF0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEE60 endp

align 10h


; Attributes: bp-based frame

sub_5DEEA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5E0BF0
mov	esp, ebp
pop	ebp
retn
sub_5DEEA0 endp

align 10h


; Attributes: bp-based frame

sub_5DEEC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B54060
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEEE5
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DEEE5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEEC0 endp

align 10h


; Attributes: bp-based frame

sub_5DEEF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5DEE20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DEF13
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DEF13:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEEF0 endp

align 10h


; Attributes: bp-based frame

sub_5DEF20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFCA8
mov	ecx, [ebp+var_4]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DEF4E
push	1Ch
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_5DEF4E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEF20 endp

align 10h


; Attributes: bp-based frame

sub_5DEF60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFCFC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DEF86
push	8
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_5DEF86:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DEF60 endp

align 10h


; Attributes: bp-based frame

sub_5DEF90 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	off_15BFD04
mov	ecx, [ebp+var_18]
mov	byte ptr [ecx+4], 1
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
add	ecx, 14h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 8
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
mov	dword ptr [eax+20h], 0
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_5DEF90 endp

align 10h


; Attributes: bp-based frame

sub_5DF020 proc	near

var_AC=	dword ptr -0ACh

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_AC]
mov	dword ptr [eax], offset	off_15BFD04
push	3
mov	ecx, [ebp+var_AC]
call	sub_10E9D40
mov	ecx, [ebp+var_AC]
add	ecx, 14h
call	sub_468AA0
mov	ecx, [ebp+var_AC]
add	ecx, 8
call	sub_468AA0
mov	esp, ebp
pop	ebp
retn
sub_5DF020 endp

align 10h


; Attributes: bp-based frame

sub_5DF070 proc	near

var_AC=	dword ptr -0ACh
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	[ebp+var_AC], ecx
mov	ecx, [ebp+var_AC]
call	sub_5DF020
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DF0A1
mov	ecx, [ebp+var_AC]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DF0A1:
mov	eax, [ebp+var_AC]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF070 endp

align 10h


; Attributes: bp-based frame

sub_5DF0B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFCFC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF0D6
push	0Ch
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF0D6:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF0B0 endp

align 10h


; Attributes: bp-based frame

sub_5DF0E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [eax+20Ch]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5DF134
mov	edx, [ebp+var_18]
mov	eax, [edx+20Ch]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_B54290
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
call	sub_B67620
cmp	[ebp+var_4], 0
jz	short loc_5DF134
mov	ecx, [ebp+var_4]
call	sub_40AA90

loc_5DF134:
mov	esp, ebp
pop	ebp
retn
sub_5DF0E0 endp

align 10h


; Attributes: bp-based frame

sub_5DF140 proc	near

var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_8= byte ptr	-8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_B583C0
push	eax
mov	ecx, [ebp+var_20]
call	sub_B61960
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1C]
call	sub_5021C0
lea	ecx, [ebp+var_8]
call	sub_42CA30
mov	al, [ebp+var_1]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF140 endp

align 10h


; Attributes: bp-based frame

sub_5DF180 proc	near

var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_8= byte ptr	-8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_B58250
push	eax
mov	ecx, [ebp+var_20]
call	sub_B61960
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1C]
call	sub_5021C0
lea	ecx, [ebp+var_8]
call	sub_42CA30
mov	al, [ebp+var_1]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF180 endp

align 10h


; Attributes: bp-based frame

sub_5DF1C0 proc	near

var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_8= byte ptr	-8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_B583C0
push	eax
mov	ecx, [ebp+var_20]
call	sub_B54F60
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1C]
call	sub_5021C0
lea	ecx, [ebp+var_8]
call	sub_42CA30
mov	al, [ebp+var_1]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF1C0 endp

align 10h


; Attributes: bp-based frame

sub_5DF200 proc	near

var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_B583C0
push	eax
mov	ecx, [ebp+var_20]
call	sub_B54DD0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_1C]
call	sub_5021C0
lea	ecx, [ebp+var_8]
call	sub_42CA30
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF200 endp

align 10h


; Attributes: bp-based frame

sub_5DF240 proc	near

var_44=	dword ptr -44h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_1D]
push	eax
lea	ecx, [ebp+var_18]
call	sub_489C40
mov	[ebp+var_8], 0
mov	cl, [ebp+var_1E]
mov	[ebp+var_4], cl
mov	edx, [ebp+var_44]
mov	eax, [edx+1Ch]
mov	[ebp+var_2C], eax
push	0
push	0
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_2C]
call	sub_B5AE20
cmp	[ebp+var_1C], 0
jz	short loc_5DF291
lea	edx, [ebp+var_1C]
push	edx
lea	eax, [ebp+var_28]
push	eax
lea	ecx, [ebp+var_18]
call	sub_5E2090

loc_5DF291:
lea	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_5E0880
cmp	[ebp+var_1C], 0
jz	short loc_5DF2AB
mov	ecx, [ebp+var_1C]
call	sub_40AA90

loc_5DF2AB:
lea	ecx, [ebp+var_18]
call	sub_5E0830
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF240 endp

align 10h


; Attributes: bp-based frame

sub_5DF2C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFCA8
mov	ecx, [ebp+var_4]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF2EE
push	20h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF2EE:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF2C0 endp

align 10h


; Attributes: bp-based frame

sub_5DF300 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, [ebp+var_30]
call	sub_411F60
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_15BFCA8
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_30]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_8]
mov	[edx+18h], eax
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx], offset	off_15BFD10
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_0]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx], offset	off_15BFD90
mov	edx, [ebp+var_30]
mov	byte ptr [edx+20h], 0
mov	ecx, [ebp+var_30]
add	ecx, 24h
call	sub_401EF0
mov	ecx, [ebp+var_30]
add	ecx, 2Ch
call	sub_401EF0
mov	ecx, [ebp+var_30]
add	ecx, 34h
call	sub_102DDA0
mov	eax, [ebp+var_30]
add	eax, 4Ch
mov	[ebp+var_2C], eax
xor	ecx, ecx
mov	[ebp+var_14], ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_C], ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_20]
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_2C]
call	sub_5E11A0
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+10h], 0
mov	cl, [ebp+var_2]
mov	edx, [ebp+var_2C]
mov	[edx+14h], cl
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5DF300 endp

align 10h


; Attributes: bp-based frame

sub_5DF400 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+20h]
mov	esp, ebp
pop	ebp
retn
sub_5DF400 endp

align 10h


; Attributes: bp-based frame

sub_5DF420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_411F60
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BFCA8
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_8]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx+18h], 4
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BFD10
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_0]
mov	[ecx+1Ch], edx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BFEF0
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_401EF0
mov	ecx, [ebp+var_8]
add	ecx, 40h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5DF4AD
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
call	sub_40AA80

loc_5DF4AD:
mov	ecx, [ebp+var_8]
add	ecx, 48h
call	sub_401EF0
mov	ecx, [ebp+var_8]
add	ecx, 54h
call	sub_401EF0
mov	ecx, [ebp+var_8]
add	ecx, 60h
call	sub_401EF0
mov	ecx, [ebp+var_8]
add	ecx, 6Ch
call	sub_401EF0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	8
sub_5DF420 endp

align 10h


; Attributes: bp-based frame

sub_5DF4F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 40h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5DF514
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_5DF514:
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BFCA8
mov	ecx, [ebp+var_8]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF53B
push	78h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF53B:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF4F0 endp

align 10h


; Attributes: bp-based frame

sub_5DF550 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B5DEE0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DF575
push	64h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DF575:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF550 endp

align 10h


; Attributes: bp-based frame

sub_5DF580 proc	near

var_58=	dword ptr -58h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 24h
call	sub_468AA0
mov	ecx, [ebp+var_58]
add	ecx, 0Ch
call	sub_5E0830
mov	eax, [ebp+var_58]
mov	dword ptr [eax], offset	off_15BFCFC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF5BE
push	30h
mov	edx, [ebp+var_58]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF5BE:
mov	eax, [ebp+var_58]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF580 endp

align 10h


; Attributes: bp-based frame

sub_5DF5D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
push	6
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5DF300
mov	edx, [ebp+var_10]
mov	dword ptr [edx], offset	off_15BFFA8
mov	eax, [ebp+var_10]
add	eax, 64h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_5DF618
mov	eax, [ebp+var_C]
mov	ecx, [eax]
call	sub_40AA80

loc_5DF618:
mov	ecx, [ebp+var_10]
add	ecx, 68h
call	sub_401EF0
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5DF5D0 endp

align 10h


; Attributes: bp-based frame

sub_5DF630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 64h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5DF654
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_5DF654:
mov	ecx, [ebp+var_8]
call	sub_B5DEE0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DF672
push	74h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DF672:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF630 endp

align 10h


; Attributes: bp-based frame

sub_5DF680 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_411F60
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFCA8
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
add	edx, 8
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+18h], 7
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFD10
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+1Ch], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C0000
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+20h], 0
mov	dword ptr [ecx+24h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5DF680 endp

align 10h


; Attributes: bp-based frame

sub_5DF700 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFCA8
mov	ecx, [ebp+var_4]
call	sub_429300
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF72E
push	28h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF72E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF700 endp

align 10h


; Attributes: bp-based frame

sub_5DF740 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4338C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 30h
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
add	ecx, 18h
call	sub_5E0830
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx], offset	off_15BFCFC
mov	edx, [ebp+arg_0]
and	edx, 1
jz	short loc_5DF7B5
push	68h
mov	eax, [ebp+var_1C]
push	eax
call	sub_1111040
add	esp, 8

loc_5DF7B5:
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5DF740 endp

align 10h


; Attributes: bp-based frame

sub_5DF7D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B59360
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DF7F5
push	6Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DF7F5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF7D0 endp

align 10h


; Attributes: bp-based frame

sub_5DF800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B5F3B0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DF828
push	3F8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DF828:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF800 endp

align 10h


; Attributes: bp-based frame

sub_5DF840 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [ebp+var_4]
mov	[ecx+14h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+18h], ecx
mov	eax, [eax+1Ch]
mov	[edx+1Ch], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	al, [edx+20h]
mov	[ecx+20h], al
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	edx, [edx+2Ch]
mov	[ecx+2Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+34h]
mov	[eax+34h], dl
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF840 endp

align 10h


; Attributes: bp-based frame

sub_5DF8D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_5E0830
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15BFCFC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF901
push	24h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF901:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF8D0 endp

align 10h


; Attributes: bp-based frame

sub_5DF910 proc	near

var_94=	dword ptr -94h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
mov	ecx, [ebp+var_94]
add	ecx, 18h
call	sub_5E0560
mov	ecx, [ebp+var_94]
add	ecx, 0Ch
call	sub_5E0560
mov	eax, [ebp+var_94]
mov	dword ptr [eax], offset	off_15BFCFC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF960
push	24h
mov	edx, [ebp+var_94]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF960:
mov	eax, [ebp+var_94]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF910 endp

align 10h


; Attributes: bp-based frame

sub_5DF970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B53A00
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DF995
push	10h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DF995:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF970 endp

align 10h


; Attributes: bp-based frame

sub_5DF9A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5DF9C4
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_5DF9C4:
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BFCFC
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5DF9E3
push	10h
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_5DF9E3:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF9A0 endp

align 10h


; Attributes: bp-based frame

sub_5DF9F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_5DFA20
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DFA17
push	40h
mov	ecx, [ebp+var_8]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DFA17:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5DF9F0 endp



; Attributes: bp-based frame

sub_5DFA20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 28h
call	sub_5E0830
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_5E0830
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5DFA5A
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_5DFA5A:
mov	eax, [ebp+var_8]
mov	dword ptr [eax], offset	off_15BFCFC
mov	esp, ebp
pop	ebp
retn
sub_5DFA20 endp

align 10h


; Attributes: bp-based frame

sub_5DFA70 proc	near

var_1C=	dword ptr -1Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_648150
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], offset	off_15C00A0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+38h], offset off_15C00AC
push	offset sub_5920F0
push	3
push	18h
mov	ecx, [ebp+var_1C]
add	ecx, 0B0h
push	ecx
call	sub_4078B0
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+0F8h], 0
mov	esi, [ebp+var_1C]
add	esi, 0FCh
call	sub_41DCE0
mov	eax, [ebp+var_1C]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5DFA70 endp

align 10h


; Attributes: bp-based frame

sub_5DFAE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5DFB50
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DFB03
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5DFB03:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DFAE0 endp

align 10h
; [00000040 BYTES: COLLAPSED FUNCTION std::strstreambuf::strstreambuf(char *,int,char *). PRESS	KEYPAD "+" TO EXPAND]
; [00000039 BYTES: COLLAPSED FUNCTION sub_5DFB50. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5DFB90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
call	sub_B6C450
xor	eax, eax
mov	esp, ebp
pop	ebp
retn	4
sub_5DFB90 endp

align 10h


; Attributes: bp-based frame

sub_5DFBB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1110FE0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DFBD5
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DFBD5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DFBB0 endp

align 10h


; Attributes: bp-based frame

sub_5DFBE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B636D0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5DFC08
push	1B8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5DFC08:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5DFBE0 endp

align 10h


; Attributes: bp-based frame

sub_5DFC20 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5DFC20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
lea	ecx, [ebp+var_D]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_34]
add	ecx, 4
call	sub_4022A0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	eax, [ebp+var_34]
add	eax, 1Ch
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_20]
mov	[ecx+10h], edx
mov	eax, [ebp+var_20]
push	eax
lea	ecx, [ebp+var_E]
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 14h
call	sub_4AC3C0
mov	[ebp+var_4], 0
push	10h
mov	ecx, [ebp+var_20]
call	sub_4407A0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_20]
call	sub_439260
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_34]
add	edx, 34h
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_30]
mov	[eax+10h], ecx
mov	edx, [ebp+var_30]
add	edx, 14h
mov	[ebp+var_24], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_30]
mov	[eax], ecx
mov	[ebp+var_4], 3
push	10h
mov	ecx, [ebp+var_30]
call	sub_4407A0
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_30]
call	sub_439260
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5DFC20 endp

align 10h


; Attributes: bp-based frame

sub_5DFD10 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5DFD10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
add	eax, 34h
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_18]
call	sub_4392A0
mov	[ebp+var_4], 2
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 1Ch
mov	[ebp+var_24], ecx
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
mov	ecx, [ebp+var_24]
call	sub_4392A0
mov	[ebp+var_4], 5
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_28]
add	ecx, 4
call	sub_407910
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5DFD10 endp

align 10h


; Attributes: bp-based frame

sub_5DFDB0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4CE480
add	esp, 8
mov	edx, [ebp+var_50]
cmp	dword ptr [edx], 0
jz	short loc_5DFE24
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_50]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_5DFE24
mov	edx, [ebp+var_4C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5DFE24:
mov	esp, ebp
pop	ebp
retn
sub_5DFDB0 endp

align 10h


; Attributes: bp-based frame

sub_5DFE30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5DFE6B
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
push	edx
call	sub_470230
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_18]
mov	[edx+4], ecx
jmp	short loc_5DFE96

loc_5DFE6B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_18]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
xor	eax, eax
mov	[ebp+var_D], al
push	1
push	1
lea	ecx, [ebp+var_D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_18]
call	sub_475AD0

loc_5DFE96:
mov	esp, ebp
pop	ebp
retn	4
sub_5DFE30 endp

align 10h


; Attributes: bp-based frame

sub_5DFEA0 proc	near

var_30=	dword ptr -30h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	eax, [ebp+var_30]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_5DFEC4
jmp	short loc_5DFEDD

loc_5DFEC4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5E0DD0

loc_5DFEDD:
mov	esp, ebp
pop	ebp
retn
sub_5DFEA0 endp

align 10h


; Attributes: bp-based frame

sub_5DFEF0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 34h
idiv	ecx
push	eax
mov	ecx, [ebp+var_28]
call	sub_5E0980
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_28]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_20]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+var_28]
mov	[ecx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_5DFEF0 endp

align 10h


; Attributes: bp-based frame

sub_5DFF60 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
cmp	dword ptr [edx], 0
jz	short loc_5DFFD9
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_58]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5DFFD9
mov	ecx, [ebp+var_54]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5DFFD9:
mov	esp, ebp
pop	ebp
retn
sub_5DFF60 endp

align 10h


; Attributes: bp-based frame

sub_5DFFE0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_5E0043
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 34h
add	eax, [ebp+var_8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
cmp	ecx, [ebp+var_4]
jnz	short loc_5E0028
jmp	short loc_5E0041

loc_5E0028:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_28]
push	edx
mov	ecx, [ebp+var_34]
call	sub_57CB80

loc_5E0041:
jmp	short loc_5E0079

loc_5E0043:
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5E1730

loc_5E0079:
mov	esp, ebp
pop	ebp
retn	8
sub_5DFFE0 endp

align 10h


; Attributes: bp-based frame

sub_5E0080 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5E0080 endp

align 10h


; Attributes: bp-based frame

sub_5E00C0 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A0h
mov	[ebp+var_A0], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E3580
add	esp, 8
mov	edx, [ebp+var_A0]
cmp	dword ptr [edx], 0
jz	short loc_5E0160
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+var_A0]
mov	eax, [eax+8]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_A0]
mov	eax, [edx]
mov	[ebp+var_98], eax
cmp	[ebp+var_98], 0
jz	short loc_5E0160
mov	ecx, [ebp+var_9C]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_98]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E0160:
mov	esp, ebp
pop	ebp
retn
sub_5E00C0 endp

align 10h


; Attributes: bp-based frame

sub_5E0170 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_5E01D3
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 28h
add	eax, [ebp+var_8]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_5E01B8
jmp	short loc_5E01D1

loc_5E01B8:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_5E0E30

loc_5E01D1:
jmp	short loc_5E0209

loc_5E01D3:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_38], eax
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_38]
push	edx
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5E17A0

loc_5E0209:
mov	esp, ebp
pop	ebp
retn	8
sub_5E0170 endp

align 10h


; Attributes: bp-based frame

sub_5E0210 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 2Ch
idiv	ecx
push	eax
mov	ecx, [ebp+var_5C]
call	sub_5E09F0
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_58], edx
push	0
lea	eax, [ebp+var_21]
push	eax
mov	ecx, [ebp+var_58]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_20]
push	eax
call	sub_5E6F60
add	esp, 14h
mov	ecx, [ebp+var_5C]
mov	[ecx+4], eax
mov	eax, [ebp+var_5C]
mov	esp, ebp
pop	ebp
retn	4
sub_5E0210 endp



; Attributes: bp-based frame

sub_5E0280 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_38]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5E02DB
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_2C]
push	edx		; void *
call	sub_5E6FE0
add	esp, 0Ch
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
add	ecx, 2Ch
mov	edx, [ebp+var_38]
mov	[edx+4], ecx
jmp	short loc_5E0306

loc_5E02DB:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_38]
mov	edx, [ecx+4]
mov	[ebp+var_34], edx
xor	eax, eax
mov	[ebp+var_2D], al
push	1
push	1
lea	ecx, [ebp+var_2D]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_38]
call	sub_5E1820

loc_5E0306:
mov	esp, ebp
pop	ebp
retn	4
sub_5E0280 endp

align 10h


; Attributes: bp-based frame

sub_5E0310 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	[ebp+var_74], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
push	eax
mov	ecx, [ebp+var_74]
call	sub_5AAE90
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_74]
mov	ecx, [eax]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_1C]
sub	ecx, [ebp+var_6C]
sar	ecx, 4
mov	[ebp+var_2C], ecx
jmp	short loc_5E0375

loc_5E036C:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_5E0375:
cmp	[ebp+var_2C], 0
jle	short loc_5E039F
mov	eax, [ebp+var_6C]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_5E7F10
add	esp, 8
mov	edx, [ebp+var_6C]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_28]
add	eax, 10h
mov	[ebp+var_28], eax
jmp	short loc_5E036C

loc_5E039F:
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_74]
mov	esp, ebp
pop	ebp
retn	4
sub_5E0310 endp

align 10h


; Attributes: bp-based frame

sub_5E03C0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_94]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E8F20
add	esp, 8
mov	edx, [ebp+var_94]
cmp	dword ptr [edx], 0
jz	short loc_5E045B
mov	eax, [ebp+var_94]
mov	ecx, [ebp+var_94]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 4
mov	[ebp+var_90], edx
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	[ebp+var_8C], ecx
cmp	[ebp+var_8C], 0
jz	short loc_5E045B
mov	edx, [ebp+var_90]
shl	edx, 4
push	edx		; int
mov	eax, [ebp+var_8C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E045B:
mov	esp, ebp
pop	ebp
retn
sub_5E03C0 endp

align 10h


; Attributes: bp-based frame

sub_5E0460 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 4
cmp	[ebp+arg_0], edx
jnb	short loc_5E04BE
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
shl	ecx, 4
add	ecx, [ebp+var_8]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
cmp	edx, [ebp+var_4]
jnz	short loc_5E04A3
jmp	short loc_5E04BC

loc_5E04A3:
xor	eax, eax
mov	[ebp+var_9], al
lea	ecx, [ebp+var_9]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5E0F50

loc_5E04BC:
jmp	short loc_5E04EF

loc_5E04BE:
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_40]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+4]
mov	[ebp+var_3C], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_38]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_40]
call	sub_5E2020

loc_5E04EF:
mov	esp, ebp
pop	ebp
retn	8
sub_5E0460 endp

align 10h


; Attributes: bp-based frame

sub_5E0500 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_5E0830
mov	esp, ebp
pop	ebp
retn
sub_5E0500 endp

align 10h


; Attributes: bp-based frame

sub_5E0520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
add	ecx, 4
mov	edx, [ebp+var_4]
mov	[edx], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E0520 endp

align 10h


; Attributes: bp-based frame

sub_5E0540 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_489340
mov	esp, ebp
pop	ebp
retn
sub_5E0540 endp

align 10h


; Attributes: bp-based frame

sub_5E0560 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E35B0
add	esp, 8
mov	edx, [ebp+var_54]
cmp	dword ptr [edx], 0
jz	short loc_5E05D4
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_54]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_50], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_4C], ecx
cmp	[ebp+var_4C], 0
jz	short loc_5E05D4
mov	edx, [ebp+var_50]
shl	edx, 3
push	edx		; int
mov	eax, [ebp+var_4C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E05D4:
mov	esp, ebp
pop	ebp
retn
sub_5E0560 endp

align 10h


; Attributes: bp-based frame

sub_5E05E0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_5= word ptr	-5
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_20]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5E063B
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	[ebp+var_14], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	[ebp+var_2], al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	[ebp+var_3], dl
lea	eax, [ebp+var_3]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_5E70E0
add	esp, 0Ch
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_20]
mov	[edx+4], ecx
jmp	short loc_5E0666

loc_5E063B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
xor	eax, eax
mov	[ebp+var_15], al
push	1
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
call	sub_5E2A10

loc_5E0666:
mov	esp, ebp
pop	ebp
retn	4
sub_5E05E0 endp

align 10h


; Attributes: bp-based frame

sub_5E0670 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
movzx	eax, [ebp+arg_0]
test	eax, eax
jz	short loc_5E06A8
mov	ecx, [ebp+var_4]
mov	esi, [ecx]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, 1
mov	ecx, edx
shl	eax, cl
or	eax, [esi]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[edx], eax
jmp	short loc_5E06D0

loc_5E06A8:
mov	eax, [ebp+var_4]
mov	esi, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [ecx+4]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, 1
mov	ecx, edx
shl	eax, cl
not	eax
and	eax, [esi]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[edx], eax

loc_5E06D0:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5E0670 endp

align 10h


; Attributes: bp-based frame

sub_5E06E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	esi, [eax]
mov	ecx, [ebp+arg_0]
mov	eax, [ecx+4]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, 1
mov	ecx, edx
shl	eax, cl
and	eax, [esi]
jz	short loc_5E0731
mov	ecx, [ebp+var_4]
mov	esi, [ecx]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, 1
mov	ecx, edx
shl	eax, cl
or	eax, [esi]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[edx], eax
jmp	short loc_5E0759

loc_5E0731:
mov	eax, [ebp+var_4]
mov	esi, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [ecx+4]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, 1
mov	ecx, edx
shl	eax, cl
not	eax
and	eax, [esi]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[edx], eax

loc_5E0759:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5E06E0 endp

align 10h


; Attributes: bp-based frame

sub_5E0770 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
add	ecx, 8
mov	edx, [ebp+var_4]
mov	[edx], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E0770 endp

align 10h


; Attributes: bp-based frame

sub_5E0790 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
cmp	[ebp+arg_0], edx
jnb	short loc_5E07EE
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
cmp	ecx, [ebp+var_4]
jnz	short loc_5E07D3
jmp	short loc_5E07EC

loc_5E07D3:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_34]
push	edx
mov	ecx, [ebp+var_40]
call	sub_5E10E0

loc_5E07EC:
jmp	short loc_5E081F

loc_5E07EE:
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_40]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_38], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+var_40]
call	sub_5E3080

loc_5E081F:
mov	esp, ebp
pop	ebp
retn	8
sub_5E0790 endp

align 10h


; Attributes: bp-based frame

sub_5E0830 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5E0875
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5E1430
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5E0875:
mov	esp, ebp
pop	ebp
retn
sub_5E0830 endp

align 10h


; Attributes: bp-based frame

sub_5E0880 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5E0967
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5E2230
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5E0924:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5E0938
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5E0924

loc_5E0938:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5E094A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5E095E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5E094A

loc_5E095E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5E0967:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5E0880 endp

align 10h


; Attributes: bp-based frame

sub_5E0980 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_5A8900
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 34h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_5E0980 endp

align 10h


; Attributes: bp-based frame

sub_5E09F0 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp+var_24], ecx
mov	eax, [ebp+var_24]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_24]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_24]
add	edx, 8
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_5E0ED0
mov	ecx, [ebp+var_24]
mov	[ecx], eax
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 2Ch
mov	eax, [ebp+var_24]
add	edx, [eax]
mov	ecx, [ebp+var_24]
mov	[ecx+8], edx
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_5E09F0 endp

align 10h


; Attributes: bp-based frame

sub_5E0A90 proc	near

var_44=	dword ptr -44h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_44]
call	sub_5E7160
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_44]
jz	short loc_5E0AD9
push	ecx
mov	[ebp+var_38], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	ecx, [ebp+var_44]
call	sub_5E1010
mov	eax, 1
jmp	short loc_5E0ADB

loc_5E0AD9:
xor	eax, eax

loc_5E0ADB:
mov	esp, ebp
pop	ebp
retn	4
sub_5E0A90 endp

align 10h


; Attributes: bp-based frame

sub_5E0AF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5E0B35
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5E23F0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5E0B35:
mov	esp, ebp
pop	ebp
retn
sub_5E0AF0 endp

align 10h


; Attributes: bp-based frame

sub_5E0B40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5E0B85
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5E2450
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5E0B85:
mov	esp, ebp
pop	ebp
retn
sub_5E0B40 endp

align 10h


; Attributes: bp-based frame

sub_5E0B90 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5C3120
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_5E0BD9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_4AC540
mov	eax, 1
jmp	short loc_5E0BDB

loc_5E0BD9:
xor	eax, eax

loc_5E0BDB:
mov	esp, ebp
pop	ebp
retn	4
sub_5E0B90 endp

align 10h


; Attributes: bp-based frame

sub_5E0BF0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5E0C35
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5E29B0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5E0C35:
mov	esp, ebp
pop	ebp
retn
sub_5E0BF0 endp

align 10h


; Attributes: bp-based frame

sub_5E0C40 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
xor	eax, eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+var_3C]
call	sub_5E11A0
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	cl, [eax+14h]
mov	edx, [ebp+var_3C]
mov	[edx+14h], cl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0
jz	short loc_5E0D27
mov	edx, [ebp+var_3C]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_5D9630
mov	ecx, [ebp+var_3C]
mov	[ecx+4], eax
mov	edx, [ebp+var_3C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax

loc_5E0CE4:
mov	ecx, [ebp+var_34]
cmp	dword ptr [ecx+8], 0
jz	short loc_5E0CF8
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	[ebp+var_34], eax
jmp	short loc_5E0CE4

loc_5E0CF8:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+var_34]
mov	[ecx+8], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+4]
mov	[ebp+var_38], ecx

loc_5E0D0A:
mov	edx, [ebp+var_38]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5E0D1E
mov	eax, [ebp+var_38]
mov	ecx, [eax+0Ch]
mov	[ebp+var_38], ecx
jmp	short loc_5E0D0A

loc_5E0D1E:
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax

loc_5E0D27:
mov	ecx, [ebp+var_3C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	eax, [ebp+var_3C]
mov	esp, ebp
pop	ebp
retn	4
sub_5E0C40 endp

align 10h


; Attributes: bp-based frame

sub_5E0D40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_4]
shr	eax, 5
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
mov	eax, [ebp+var_4]
mov	[eax], edx
mov	eax, [ebp+arg_4]
xor	edx, edx
mov	ecx, 20h
div	ecx
mov	eax, [ebp+var_4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5E0D40 endp

align 10h


; Attributes: bp-based frame

sub_5E0D80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5E0DC5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5E2E50
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5E0DC5:
mov	esp, ebp
pop	ebp
retn
sub_5E0D80 endp

align 10h


; Attributes: bp-based frame

sub_5E0DD0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_5], al
lea	ecx, [ebp+var_5]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5A7C70
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
push	0
mov	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_4C6BD0
add	esp, 0Ch
mov	ecx, [ebp+var_24]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E0DD0 endp

align 10h


; Attributes: bp-based frame

sub_5E0E30 proc	near

var_120= dword ptr -120h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 120h
mov	[ebp+var_120], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_120]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_18]
sub	eax, [ebp+var_10]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_5E0E78

loc_5E0E6F:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_5E0E78:
cmp	[ebp+var_C], 0
jle	short loc_5E0E9E
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5E72E0
mov	ecx, [ebp+var_10]
add	ecx, 28h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
add	edx, 28h
mov	[ebp+var_14], edx
jmp	short loc_5E0E6F

loc_5E0E9E:
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_120]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_5E3620
add	esp, 8
mov	ecx, [ebp+var_120]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E0E30 endp

align 10h


; Attributes: bp-based frame

sub_5E0ED0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 5D1745Dh
jbe	short loc_5E0EFB
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5E0EFB:
cmp	[ebp+arg_0], 0
jz	short loc_5E0F32
mov	ecx, [ebp+arg_0]
imul	ecx, 2Ch
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
xor	edx, edx
mov	ecx, 2Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_5E0F39

loc_5E0F32:
mov	[ebp+var_10], 0

loc_5E0F39:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5E0ED0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5E0F50 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_94]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_10]
sar	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_5E0F93

loc_5E0F8A:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_5E0F93:
cmp	[ebp+var_C], 0
jle	short loc_5E0FC9
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_10]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 4
call	sub_5E7AA0
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_14], eax
jmp	short loc_5E0F8A

loc_5E0FC9:
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_94]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
push	0
mov	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_5E7210
add	esp, 0Ch
mov	eax, [ebp+var_94]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E0F50 endp

align 10h


; Attributes: bp-based frame

sub_5E1010 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx
call	sub_5E3670
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5E1067
mov	edx, 1
imul	edx, 14h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E1067:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5E1010 endp

align 10h


; Attributes: bp-based frame

sub_5E1080 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 4
mov	esp, ebp
pop	ebp
retn
sub_5E1080 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION type_info::raw_name(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5E10C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E10C0 endp

align 10h


; Attributes: bp-based frame

sub_5E10E0 proc	near

var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_30]
mov	edx, [ecx+4]
mov	[ebp+var_20], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_20]
sub	edx, [ebp+var_18]
sar	edx, 2
mov	[ebp+var_C], edx
jmp	short loc_5E111A

loc_5E1111:
mov	eax, [ebp+var_C]
sub	eax, 1
mov	[ebp+var_C], eax

loc_5E111A:
cmp	[ebp+var_C], 0
jle	short loc_5E1140
mov	ecx, [ebp+var_18]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_4AC7F0
mov	edx, [ebp+var_18]
add	edx, 4
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
add	eax, 4
mov	[ebp+var_1C], eax
jmp	short loc_5E1111

loc_5E1140:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5E36B0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E10E0 endp

align 10h


; Attributes: bp-based frame

sub_5E1170 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E1170 endp

align 10h


; Attributes: bp-based frame

sub_5E11A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	esp, ebp
pop	ebp
retn
sub_5E11A0 endp

align 10h


; Attributes: bp-based frame

sub_5E11D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 5D1745Dh
jbe	short loc_5E11F6
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5E11F6:
cmp	[ebp+arg_0], 0
jz	short loc_5E122A
mov	eax, [ebp+arg_0]
imul	eax, 2Ch
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 2Ch
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_5E122C

loc_5E122A:
xor	eax, eax

loc_5E122C:
mov	esp, ebp
pop	ebp
retn	8
sub_5E11D0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5E1240 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_94], ecx
mov	eax, [ebp+var_94]
mov	ecx, [ebp+var_94]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
cmp	edx, [ebp+arg_0]
jnb	loc_5E1379
mov	[ebp+var_C], 3FFFFFFFh
mov	[ebp+var_10], 3FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_5E128D
mov	ecx, [ebp+var_10]
mov	[ebp+var_98], ecx
jmp	short loc_5E1296

loc_5E128D:
mov	edx, [ebp+var_C]
mov	[ebp+var_98], edx

loc_5E1296:
mov	eax, [ebp+var_98]
cmp	eax, [ebp+arg_0]
jnb	short loc_5E12AC
mov	ecx, [ebp+var_94]
call	sub_5BD210

loc_5E12AC:
mov	ecx, [ebp+var_94]
mov	edx, [ebp+var_94]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_94]
cmp	dword ptr [ecx], 0
jz	short loc_5E1325
mov	edx, [ebp+var_94]
mov	eax, [edx+4]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_94]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_14], eax
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
call	sub_51EF50
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_94]
call	sub_444710
jmp	short loc_5E133E

loc_5E1325:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_94]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_8], eax

loc_5E133E:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	ecx, [ebp+var_94]
mov	[ecx+4], eax
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_90]
mov	[edx+8], eax

loc_5E1379:
mov	esp, ebp
pop	ebp
retn	4
sub_5E1240 endp

align 10h


; Attributes: bp-based frame

sub_5E1380 proc	near

var_34=	dword ptr -34h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E1380
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	[eax+10h], ecx
mov	edx, [ebp+var_34]
add	edx, 14h
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_34]
mov	[eax], ecx
mov	[ebp+var_4], 1
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_15], 0
mov	[ebp+var_14], 0
jmp	short loc_5E13E3

loc_5E13DA:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_5E13E3:
movzx	eax, [ebp+var_15]
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_14]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_5E1400
jmp	short loc_5E13DA

loc_5E1400:
mov	eax, [ebp+arg_0]
add	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_444170
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_5E1380 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E1430(void	*)
sub_5E1430 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5E1439:
cmp	[ebp+arg_0], 0
jz	short loc_5E1489
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5E1430
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
call	sub_5E3670
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5E1481
mov	edx, 1
imul	edx, 14h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E1481:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5E1439

loc_5E1489:
mov	esp, ebp
pop	ebp
retn	4
sub_5E1430 endp

align 10h


; Attributes: bp-based frame

sub_5E1490 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5E14AC:
cmp	[ebp+var_10], 0
jz	short loc_5E14F7
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5E14E6
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5E14EF

loc_5E14E6:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5E14EF:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5E14AC

loc_5E14F7:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5E1599
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5E158A
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5E3F90
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5E1613
jmp	short loc_5E1599

loc_5E158A:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5E1599:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5E15F8
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5E3F90
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5E1613

loc_5E15F8:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5E1613:
mov	esp, ebp
pop	ebp
retn	8
sub_5E1490 endp

align 10h


; Attributes: bp-based frame

sub_5E1620 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_7C], ecx
mov	eax, [ebp+var_7C]
mov	ecx, [ebp+var_7C]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
cmp	edx, [ebp+arg_0]
jnb	loc_5E171D
mov	[ebp+var_C], 3FFFFFFFh
mov	[ebp+var_10], 3FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_5E1661
mov	ecx, [ebp+var_10]
mov	[ebp+var_80], ecx
jmp	short loc_5E1667

loc_5E1661:
mov	edx, [ebp+var_C]
mov	[ebp+var_80], edx

loc_5E1667:
mov	eax, [ebp+var_80]
cmp	eax, [ebp+arg_0]
jnb	short loc_5E1677
mov	ecx, [ebp+var_7C]
call	sub_5BD210

loc_5E1677:
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_7C]
cmp	dword ptr [ecx], 0
jz	short loc_5E16DB
mov	edx, [ebp+var_7C]
mov	eax, [edx+4]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ecx]
mov	[ebp+var_30], edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_7C]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_14], eax
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
call	sub_51EF50
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_7C]
call	sub_444710
jmp	short loc_5E16F1

loc_5E16DB:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_7C]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax

loc_5E16F1:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	ecx, [ebp+var_7C]
mov	[ecx+4], eax
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_78]
mov	[edx+8], eax

loc_5E171D:
mov	esp, ebp
pop	ebp
retn	4
sub_5E1620 endp

align 10h


; Attributes: bp-based frame

sub_5E1730 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_5E1796
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_5E1777
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5E41D0
jmp	short loc_5E1796

loc_5E1777:
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_2]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5E40D0

loc_5E1796:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E1730 endp

align 10h


; Attributes: bp-based frame

sub_5E17A0 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_5E180B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 28h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_5E17E7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5E4620
jmp	short loc_5E180B

loc_5E17E7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_5E4410

loc_5E180B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E17A0 endp

align 10h


; Attributes: bp-based frame

sub_5E1820 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_55=	word ptr -55h
var_53=	byte ptr -53h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5E3850
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5E0ED0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5E18A3

loc_5E189A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5E18A3:
cmp	[ebp+var_40], 0
jle	short loc_5E18CD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5E8E00
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 2Ch
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 2Ch
mov	[ebp+var_3C], eax
jmp	short loc_5E189A

loc_5E18CD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5E190E
xor	edx, edx
mov	byte ptr [ebp+var_55+1], dl
mov	al, byte ptr [ebp+var_55+1]
mov	[ebp+var_52], al
xor	ecx, ecx
mov	byte ptr [ebp+var_55], cl
mov	dl, byte ptr [ebp+var_55]
mov	[ebp+var_53], dl
lea	eax, [ebp+var_53]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_C]
push	edx		; void *
call	sub_5E6FE0
add	esp, 0Ch
mov	eax, [ebp+var_C]
add	eax, 2Ch
mov	[ebp+var_C], eax
jmp	short loc_5E1963

loc_5E190E:
mov	ecx, [ebp+arg_C]
imul	ecx, 2Ch
add	ecx, [ebp+var_C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5E1945

loc_5E1933:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 2Ch
mov	[ebp+var_68], eax

loc_5E1945:
cmp	[ebp+var_6C], 0
jle	short loc_5E195D
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5E8E00
add	esp, 8
jmp	short loc_5E1933

loc_5E195D:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5E1963:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5E19FB
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5E19C2

loc_5E19B9:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5E19C2:
cmp	[ebp+var_80], 0
jle	short loc_5E19F5
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5E8E00
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 2Ch
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 2Ch
mov	[ebp+var_7C], eax
jmp	short loc_5E19B9

loc_5E19F5:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5E19FB:
mov	ecx, [ebp+var_CC]
call	sub_5E3930
mov	edx, [ebp+var_4]
imul	edx, 2Ch
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5E1820 endp

align 10h


; Attributes: bp-based frame

sub_5E1A50 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_99=	byte ptr -99h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D8], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_D8]
jz	loc_5E1CB7
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_D8]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 2Ch
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_5E1B2F
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_5E11D0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5E7E40
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D8]
call	sub_5E3930
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 2Ch
mov	eax, [ebp+var_D8]
add	edx, [eax]
mov	ecx, [ebp+var_D8]
mov	[ecx+8], edx
jmp	loc_5E1CA0

loc_5E1B2F:
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_D8]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 2Ch
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_5E1BF1
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_D8]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_5E1B9C

loc_5E1B93:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_5E1B9C:
cmp	[ebp+var_68], 0
jle	short loc_5E1BC2
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_434010
mov	ecx, [ebp+var_6C]
add	ecx, 2Ch
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 2Ch
mov	[ebp+var_70], edx
jmp	short loc_5E1B93

loc_5E1BC2:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5E7E90
add	esp, 0Ch
jmp	loc_5E1CA0

loc_5E1BF1:
xor	edx, edx
mov	[ebp+var_12], dl
lea	eax, [ebp+var_12]
push	eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_D8]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 2Ch
idiv	ecx
imul	eax, 2Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_5E4960
add	esp, 10h
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_D8]
mov	ecx, [eax+4]
mov	[ebp+var_D4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 2Ch
idiv	ecx
imul	eax, 2Ch
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_CC], eax
push	0
lea	eax, [ebp+var_99]
push	eax
mov	ecx, [ebp+var_D4]
push	ecx
mov	edx, [ebp+var_D0]
push	edx
mov	eax, [ebp+var_CC]
push	eax
call	sub_5E6F60
add	esp, 14h

loc_5E1CA0:
mov	ecx, [ebp+var_4]
imul	ecx, 2Ch
mov	edx, [ebp+var_D8]
add	ecx, [edx]
mov	eax, [ebp+var_D8]
mov	[eax+4], ecx

loc_5E1CB7:
mov	eax, [ebp+var_D8]
mov	esp, ebp
pop	ebp
retn	4
sub_5E1A50 endp

align 10h


; Attributes: bp-based frame

sub_5E1CD0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0E0h
mov	[ebp+var_E0], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_E0]
jz	loc_5E200E
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ebp+var_E0]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 4
cmp	[ebp+var_4], eax
jbe	loc_5E1DA3
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
xor	ecx, ecx
mov	[ebp+var_19], cl
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_E0]
add	ecx, 8
call	sub_503560
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+var_2C]
push	eax
call	sub_5E7F80
add	esp, 0Ch
mov	ecx, [ebp+var_18]
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_E0]
call	sub_5E39D0
mov	edx, [ebp+var_E0]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+var_E0]
add	ecx, [edx]
mov	eax, [ebp+var_E0]
mov	[eax+8], ecx
jmp	loc_5E1FF7

loc_5E1DA3:
mov	ecx, [ebp+var_E0]
mov	edx, [ebp+var_E0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 4
cmp	eax, [ebp+var_4]
jb	loc_5E1E69
xor	ecx, ecx
mov	[ebp+var_11], cl
mov	edx, [ebp+var_E0]
mov	eax, [edx]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_74]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_78]
sub	ecx, [ebp+var_6C]
sar	ecx, 4
mov	[ebp+var_68], ecx
jmp	short loc_5E1E04

loc_5E1DFB:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_5E1E04:
cmp	[ebp+var_68], 0
jle	short loc_5E1E3A
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_6C]
add	eax, 4
push	eax
mov	ecx, [ebp+var_70]
add	ecx, 4
call	sub_5E7AA0
mov	ecx, [ebp+var_6C]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 10h
mov	[ebp+var_70], edx
jmp	short loc_5E1DFB

loc_5E1E3A:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_E0]
mov	edx, [ecx+4]
mov	[ebp+var_88], edx
push	0
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5E7210
add	esp, 0Ch
jmp	loc_5E1FF7

loc_5E1E69:
xor	edx, edx
mov	[ebp+var_12], dl
mov	eax, [ebp+var_E0]
mov	ecx, [eax]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_E0]
mov	eax, [ebp+var_E0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 4
shl	ecx, 4
mov	edx, [ebp+arg_0]
add	ecx, [edx]
mov	[ebp+var_A0], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_A0]
sub	ecx, [ebp+var_94]
sar	ecx, 4
mov	[ebp+var_90], ecx
jmp	short loc_5E1EE7

loc_5E1ED8:
mov	edx, [ebp+var_90]
sub	edx, 1
mov	[ebp+var_90], edx

loc_5E1EE7:
cmp	[ebp+var_90], 0
jle	short loc_5E1F38
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_94]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_94]
add	eax, 4
push	eax
mov	ecx, [ebp+var_98]
add	ecx, 4
call	sub_5E7AA0
mov	ecx, [ebp+var_94]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
add	edx, 10h
mov	[ebp+var_98], edx
jmp	short loc_5E1ED8

loc_5E1F38:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_E0]
mov	edx, [ecx+4]
mov	[ebp+var_DC], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_E0]
mov	eax, [ebp+var_E0]
mov	ecx, [edx+4]
sub	ecx, [eax]
sar	ecx, 4
shl	ecx, 4
mov	edx, [ebp+arg_0]
add	ecx, [edx]
mov	[ebp+var_D4], ecx
mov	eax, [ebp+var_D4]
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_DC]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_D8]
sub	edx, [ebp+var_D0]
sar	edx, 4
mov	[ebp+var_B0], edx
jmp	short loc_5E1FB8

loc_5E1FA9:
mov	eax, [ebp+var_B0]
sub	eax, 1
mov	[ebp+var_B0], eax

loc_5E1FB8:
cmp	[ebp+var_B0], 0
jle	short loc_5E1FF7
mov	ecx, [ebp+var_D0]
push	ecx		; int
mov	edx, [ebp+var_AC]
push	edx		; void *
call	sub_5E7F10
add	esp, 8
mov	eax, [ebp+var_D0]
add	eax, 10h
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_AC]
add	ecx, 10h
mov	[ebp+var_AC], ecx
jmp	short loc_5E1FA9

loc_5E1FF7:
mov	edx, [ebp+var_4]
shl	edx, 4
mov	eax, [ebp+var_E0]
add	edx, [eax]
mov	ecx, [ebp+var_E0]
mov	[ecx+4], edx

loc_5E200E:
mov	eax, [ebp+var_E0]
mov	esp, ebp
pop	ebp
retn	4
sub_5E1CD0 endp

align 10h


; Attributes: bp-based frame

sub_5E2020 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_5E2086
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 4
cmp	edx, [ebp+arg_4]
jb	short loc_5E2062
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5E4C10
jmp	short loc_5E2086

loc_5E2062:
xor	edx, edx
mov	byte ptr [ebp+var_3+1],	dl
xor	eax, eax
mov	byte ptr [ebp+var_3], al
push	0
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_3]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5E4A10

loc_5E2086:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E2020 endp

align 10h


; Attributes: bp-based frame

sub_5E2090 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5E20AC:
cmp	[ebp+var_10], 0
jz	short loc_5E2102
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_3C]
cmp	eax, [ebp+var_40]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5E20F1
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_6C], ecx
jmp	short loc_5E20FA

loc_5E20F1:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_6C], eax

loc_5E20FA:
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
jmp	short loc_5E20AC

loc_5E2102:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5E21A4
mov	eax, [ebp+var_68]
mov	ecx, [eax+8]
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_4C]
mov	[ebp+var_48], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_4C]
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_5E2195
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_68]
call	sub_5E3E40
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5E2229
jmp	short loc_5E21A4

loc_5E2195:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5E21A4:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
cmp	ecx, [ebp+var_60]
sbb	edx, edx
neg	edx
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5E220E
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_5E3E40
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5E2229

loc_5E220E:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5E2229:
mov	esp, ebp
pop	ebp
retn	8
sub_5E2090 endp

align 10h


; Attributes: bp-based frame

sub_5E2230 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5E3D40
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_5E2286
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5E2230
mov	edx, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5E2286:
mov	eax, [ebp+var_4]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[ebp+arg_0], edx

loc_5E2295:
cmp	[ebp+arg_0], 0
jz	short loc_5E2302
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
call	sub_5E3D40
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_5E22F1
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5E2230
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_5E22F1:
mov	edx, [ebp+var_8]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_5E2295

loc_5E2302:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_5E2230 endp

align 10h


; Attributes: bp-based frame

sub_5E2310 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
cmp	eax, [ebp+arg_0]
jz	loc_5E23E7
mov	ecx, [ebp+var_14]
call	sub_5E0830
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_14]
mov	[ecx+14h], al
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_5E2370
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	[edx+8], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_5E23E7

loc_5E2370:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_14]
call	sub_5E2230
mov	ecx, [ebp+var_14]
mov	[ecx+4], eax
mov	edx, [ebp+var_14]
mov	eax, [edx+4]
mov	[ebp+var_C], eax

loc_5E2398:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+8], 0
jz	short loc_5E23AC
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
jmp	short loc_5E2398

loc_5E23AC:
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_C]
mov	[ecx+8], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx

loc_5E23BE:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_5E23D2
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_10], ecx
jmp	short loc_5E23BE

loc_5E23D2:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax

loc_5E23E7:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_5E2310 endp



; Attributes: bp-based frame

; int __stdcall	sub_5E23F0(void	*)
sub_5E23F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5E23F9:
cmp	[ebp+arg_0], 0
jz	short loc_5E2449
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5E23F0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5B57B0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5E2441
mov	edx, 1
imul	edx, 2Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E2441:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5E23F9

loc_5E2449:
mov	esp, ebp
pop	ebp
retn	4
sub_5E23F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E2450(void	*)
sub_5E2450 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5E2459:
cmp	[ebp+arg_0], 0
jz	short loc_5E24A9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5E2450
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5E5440
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5E24A1
mov	edx, 1
imul	edx, 18h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E24A1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5E2459

loc_5E24A9:
mov	esp, ebp
pop	ebp
retn	4
sub_5E2450 endp

align 10h


; Attributes: bp-based frame

sub_5E24B0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5E24CC:
cmp	[ebp+var_10], 0
jz	short loc_5E2517
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5E2506
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5E250F

loc_5E2506:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5E250F:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5E24CC

loc_5E2517:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5E25B9
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5E25AA
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5B0540
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5E2633
jmp	short loc_5E25B9

loc_5E25AA:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5E25B9:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setl	cl
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5E2618
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5B0540
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5E2633

loc_5E2618:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5E2633:
mov	esp, ebp
pop	ebp
retn	8
sub_5E24B0 endp

align 10h


; Attributes: bp-based frame

sub_5E2640 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_146D57C
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E2640 endp

align 10h


; Attributes: bp-based frame

sub_5E2680 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_146D57C
mov	ecx, [ebp+var_C]
call	sub_5E3A70
mov	esp, ebp
pop	ebp
retn
sub_5E2680 endp

align 10h


; Attributes: bp-based frame

sub_5E26A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5E26A0 endp

align 10h


; Attributes: bp-based frame

sub_5E26D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5E26D0 endp

align 10h


; Attributes: bp-based frame

sub_5E2700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5E272E
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_5E272E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5E2700 endp

align 10h


; Attributes: bp-based frame

sub_5E2740 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_0]
jz	short loc_5E27A6
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_5E2781
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5E2781
mov	eax, [ebp+var_4]
mov	edx, [eax]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax

loc_5E2781:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_5E27A6
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_5E27A6:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5E2740 endp

align 10h


; Attributes: bp-based frame

sub_5E27B0 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	[ebp+var_38], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
call	sub_5DE010
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_64]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_44]
mov	[ebp+var_40], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_44]
setz	al
mov	[ebp+var_65], al
movzx	ecx, [ebp+var_65]
test	ecx, ecx
jnz	short loc_5E2855
or	[ebp+var_38], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_48], edx
mov	eax, [ebp+var_64]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_48]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5E2855
mov	[ebp+var_6C], 0
jmp	short loc_5E285C

loc_5E2855:
mov	[ebp+var_6C], 1

loc_5E285C:
mov	cl, byte ptr [ebp+var_6C]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_38]
and	edx, 1
jz	short loc_5E287C
and	[ebp+var_38], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5E287C:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5E292F
mov	[ebp+var_2C], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_24]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	eax, [ebp+var_4C]
cmp	dword ptr [eax], 0
jz	short loc_5E28BD
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	edx, [edx]
mov	eax, [edx]
call	eax

loc_5E28BD:
lea	ecx, [ebp+var_5C]
mov	[ebp+var_50], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_50]
call	sub_4046E0
lea	edx, [ebp+var_28]
push	edx
push	ecx
mov	[ebp+var_58], esp
mov	ecx, [ebp+var_5C]
mov	eax, [ebp+var_58]
call	sub_4046E0
lea	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_64]
call	sub_5E4F70
lea	ecx, [ebp+var_34]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_70]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_60]
cmp	dword ptr [edx], 0
jz	short loc_5E291C
mov	eax, [ebp+var_60]
mov	ecx, [eax]
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+4]
call	eax

loc_5E291C:
cmp	[ebp+var_2C], 0
jz	short loc_5E292F
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	edx, [eax+4]
call	edx

loc_5E292F:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5E27B0 endp

align 10h


; Attributes: bp-based frame

sub_5E2950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_5E299E
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5E297C
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [edx]
mov	eax, [edx+4]
call	eax

loc_5E297C:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5E299E
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	ecx, [ecx]
mov	edx, [eax]
mov	eax, [edx]
call	eax

loc_5E299E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E2950 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E29B0(void	*)
sub_5E29B0 proc	near

var_7C=	dword ptr -7Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_7C], ecx

loc_5E29B9:
cmp	[ebp+arg_0], 0
jz	short loc_5E2A09
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_7C]
call	sub_5E29B0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5E5490
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5E2A01
mov	edx, 1
imul	edx, 54h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E2A01:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5E29B9

loc_5E2A09:
mov	esp, ebp
pop	ebp
retn	4
sub_5E29B0 endp

align 10h


; Attributes: bp-based frame

sub_5E2A10 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4B89C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_50F3A0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 3
mov	[ebp+var_40], edx
jmp	short loc_5E2A8E

loc_5E2A85:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5E2A8E:
cmp	[ebp+var_40], 0
jle	short loc_5E2AB8
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5E35E0
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 8
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 8
mov	[ebp+var_3C], ecx
jmp	short loc_5E2A85

loc_5E2AB8:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5E2ADF
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5E35E0
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx
jmp	short loc_5E2B2F

loc_5E2ADF:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*8]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_60]
sub	ecx, [ebp+var_C]
sar	ecx, 3
mov	[ebp+var_6C], ecx
jmp	short loc_5E2B11

loc_5E2AFF:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 8
mov	[ebp+var_68], eax

loc_5E2B11:
cmp	[ebp+var_6C], 0
jle	short loc_5E2B29
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5E35E0
add	esp, 8
jmp	short loc_5E2AFF

loc_5E2B29:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5E2B2F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5E2BC2
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
sar	eax, 3
mov	[ebp+var_80], eax
jmp	short loc_5E2B89

loc_5E2B80:
mov	ecx, [ebp+var_80]
sub	ecx, 1
mov	[ebp+var_80], ecx

loc_5E2B89:
cmp	[ebp+var_80], 0
jle	short loc_5E2BBC
mov	edx, [ebp+var_8C]
push	edx		; int
mov	eax, [ebp+var_7C]
push	eax		; void *
call	sub_5E35E0
add	esp, 8
mov	ecx, [ebp+var_8C]
add	ecx, 8
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_7C]
add	edx, 8
mov	[ebp+var_7C], edx
jmp	short loc_5E2B80

loc_5E2BBC:
mov	eax, [ebp+var_7C]
mov	[ebp+var_C], eax

loc_5E2BC2:
mov	ecx, [ebp+var_CC]
call	sub_5E3BA0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C8]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5E2A10 endp

align 10h


; Attributes: bp-based frame

sub_5E2C10 proc	near

var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	ecx
mov	[ebp+var_C], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_C]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_28]
call	sub_5E55B0
mov	esp, ebp
pop	ebp
retn	8
sub_5E2C10 endp

align 10h


; Attributes: bp-based frame

sub_5E2C50 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_58], ecx
mov	[ebp+var_2C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5C7D40
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_58]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
mov	[ebp+var_59], al
movzx	ecx, [ebp+var_59]
test	ecx, ecx
jnz	short loc_5E2CE1
or	[ebp+var_2C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_58]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_3C]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setl	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_5E2CE1
mov	[ebp+var_60], 0
jmp	short loc_5E2CE8

loc_5E2CE1:
mov	[ebp+var_60], 1

loc_5E2CE8:
mov	cl, byte ptr [ebp+var_60]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_2C]
and	edx, 1
jz	short loc_5E2CFA
and	[ebp+var_2C], 0FFFFFFFEh

loc_5E2CFA:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5E2DA7
mov	[ebp+var_20], 0
cmp	[ebp+var_20], 0
jz	short loc_5E2D1B
mov	ecx, [ebp+var_20]
call	sub_40AA80

loc_5E2D1B:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_18]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_20]
mov	[ecx], edx
mov	eax, [ebp+var_40]
cmp	dword ptr [eax], 0
jz	short loc_5E2D43
mov	ecx, [ebp+var_40]
mov	ecx, [ecx]
call	sub_40AA80

loc_5E2D43:
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_44]
call	sub_4046E0
lea	eax, [ebp+var_1C]
push	eax
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_50]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_4954A0
lea	edx, [ebp+var_28]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
cmp	dword ptr [eax], 0
jz	short loc_5E2D99
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
call	sub_40AA90

loc_5E2D99:
cmp	[ebp+var_20], 0
jz	short loc_5E2DA7
mov	ecx, [ebp+var_20]
call	sub_40AA90

loc_5E2DA7:
mov	eax, [ebp+var_4]
add	eax, 14h
mov	esp, ebp
pop	ebp
retn	4
sub_5E2C50 endp

align 10h


; Attributes: bp-based frame

sub_5E2DC0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_38]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_5E7160
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_8]
setz	dl
movzx	eax, dl
neg	eax
sbb	eax, eax
add	eax, 1
mov	esp, ebp
pop	ebp
retn	4
sub_5E2DC0 endp

align 10h


; Attributes: bp-based frame

sub_5E2E10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 0
jz	short loc_5E2E3B
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
call	sub_40AA80

loc_5E2E3B:
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5E2E10 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E2E50(void	*)
sub_5E2E50 proc	near

var_58=	dword ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx

loc_5E2E59:
cmp	[ebp+arg_0], 0
jz	short loc_5E2EA9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_58]
call	sub_5E2E50
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5E5AE0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5E2EA1
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E2EA1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5E2E59

loc_5E2EA9:
mov	esp, ebp
pop	ebp
retn	4
sub_5E2E50 endp

align 10h


; Attributes: bp-based frame

sub_5E2EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_5E2ED0
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [edx]
mov	eax, [edx+4]
call	eax

loc_5E2ED0:
mov	esp, ebp
pop	ebp
retn
sub_5E2EB0 endp

align 10h


; Attributes: bp-based frame

sub_5E2EE0 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0C8h
mov	[ebp+var_C8], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_5DE010
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_C8]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_C9], al
movzx	ecx, [ebp+var_C9]
test	ecx, ecx
jnz	short loc_5E2F9D
or	[ebp+var_4C], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_C8]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_5C]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jnz	short loc_5E2F9D
mov	[ebp+var_D0], 0
jmp	short loc_5E2FA7

loc_5E2F9D:
mov	[ebp+var_D0], 1

loc_5E2FA7:
mov	cl, byte ptr [ebp+var_D0]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5E2FCA
and	[ebp+var_4C], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5E2FCA:
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5E305D
mov	[ebp+var_3C], 0
mov	[ebp+var_38], 0
push	0
lea	ecx, [ebp+var_3D]
push	ecx
lea	ecx, [ebp+var_34]
call	sub_489990
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_3C]
push	ecx
lea	ecx, [ebp+var_2C]
call	sub_5E3D90
lea	edx, [ebp+var_6C]
mov	[ebp+var_60], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_60]
call	sub_4046E0
lea	eax, [ebp+var_30]
push	eax
push	ecx
mov	[ebp+var_68], esp
mov	ecx, [ebp+var_6C]
mov	eax, [ebp+var_68]
call	sub_4046E0
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_C8]
call	sub_5E5610
lea	edx, [ebp+var_48]
mov	[ebp+var_D4], edx
mov	eax, [ebp+var_D4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	ecx, [ebp+var_2C]
call	sub_5E3C10
lea	ecx, [ebp+var_3C]
call	sub_5E3C10

loc_5E305D:
mov	eax, [ebp+var_10]
add	eax, 14h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5E2EE0 endp

align 10h


; Attributes: bp-based frame

sub_5E3080 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_5E30E6
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+8]
sub	edx, [ecx+4]
sar	edx, 2
cmp	edx, [ebp+arg_4]
jb	short loc_5E30C2
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5E5D20
jmp	short loc_5E30E6

loc_5E30C2:
xor	edx, edx
mov	byte ptr [ebp+var_3+1],	dl
xor	eax, eax
mov	byte ptr [ebp+var_3], al
push	0
mov	ecx, [ebp+arg_4]
push	ecx
lea	edx, [ebp+var_3]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_5E5B10

loc_5E30E6:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E3080 endp

align 10h


; Attributes: bp-based frame

sub_5E30F0 proc	near

var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_14D= byte ptr -14Dh
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_138= dword ptr -138h
var_134= dword ptr -134h
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= byte ptr -114h
var_10C= byte ptr -10Ch
var_F8=	byte ptr -0F8h
var_CC=	byte ptr -0CCh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 158h
mov	[ebp+var_14C], ecx
mov	[ebp+var_118], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14C]
call	sub_5E9440
mov	[ebp+var_11C], eax
mov	ecx, [ebp+var_11C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_14C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_124]
mov	[ebp+var_120], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_120]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_124]
setz	al
mov	[ebp+var_14D], al
movzx	ecx, [ebp+var_14D]
test	ecx, ecx
jnz	loc_5E3215
or	[ebp+var_118], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_128], edx
mov	eax, [ebp+var_14C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_128]
mov	[ebp+var_154], edx
mov	[ebp+var_158], eax
mov	ecx, [ebp+var_154]
mov	edx, [ebp+var_158]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E31F4
jb	short loc_5E31E8
mov	ecx, [ebp+var_154]
mov	edx, [ebp+var_158]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E31F4

loc_5E31E8:
mov	[ebp+var_15C], 1
jmp	short loc_5E31FE

loc_5E31F4:
mov	[ebp+var_15C], 0

loc_5E31FE:
movzx	ecx, byte ptr [ebp+var_15C]
test	ecx, ecx
jnz	short loc_5E3215
mov	[ebp+var_160], 0
jmp	short loc_5E321F

loc_5E3215:
mov	[ebp+var_160], 1

loc_5E321F:
mov	dl, byte ptr [ebp+var_160]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_118]
and	eax, 1
jz	short loc_5E3248
and	[ebp+var_118], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5E3248:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5E332B
lea	ecx, [ebp+var_10C]
call	sub_52EC00
mov	[ebp+var_134], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_9C], eax
mov	ecx, [edx+4]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_134]
push	edx
lea	ecx, [ebp+var_94]
call	sub_57F960
lea	eax, [ebp+var_144]
mov	[ebp+var_138], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_138]
call	sub_4046E0
lea	ecx, [ebp+var_9C]
push	ecx
push	ecx
mov	[ebp+var_140], esp
mov	ecx, [ebp+var_144]
mov	eax, [ebp+var_140]
call	sub_4046E0
lea	edx, [ebp+var_114]
push	edx
mov	ecx, [ebp+var_14C]
call	sub_5E6780
lea	eax, [ebp+var_114]
mov	[ebp+var_164], eax
mov	ecx, [ebp+var_164]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_94]
mov	[ebp+var_148], eax
mov	ecx, [ebp+var_148]
add	ecx, 40h
call	sub_407E50
mov	ecx, [ebp+var_148]
add	ecx, 14h
call	sub_10111A0
lea	ecx, [ebp+var_CC]
call	sub_407E50
lea	ecx, [ebp+var_F8]
call	sub_10111A0

loc_5E332B:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5E30F0 endp

align 10h


; Attributes: bp-based frame

sub_5E3350 proc	near

var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1E9= byte ptr -1E9h
var_1E8= dword ptr -1E8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= byte ptr -184h
var_17C= byte ptr -17Ch
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	byte ptr -0CCh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1F4h
mov	[ebp+var_1E8], ecx
mov	[ebp+var_188], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1E8]
call	sub_5E9440
mov	[ebp+var_18C], eax
mov	ecx, [ebp+var_18C]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1E8]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_194]
mov	[ebp+var_190], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_190]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_194]
setz	al
mov	[ebp+var_1E9], al
movzx	ecx, [ebp+var_1E9]
test	ecx, ecx
jnz	loc_5E3475
or	[ebp+var_188], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_198], edx
mov	eax, [ebp+var_1E8]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_198]
mov	[ebp+var_1F0], edx
mov	[ebp+var_1F4], eax
mov	ecx, [ebp+var_1F0]
mov	edx, [ebp+var_1F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E3454
jb	short loc_5E3448
mov	ecx, [ebp+var_1F0]
mov	edx, [ebp+var_1F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E3454

loc_5E3448:
mov	[ebp+var_1F8], 1
jmp	short loc_5E345E

loc_5E3454:
mov	[ebp+var_1F8], 0

loc_5E345E:
movzx	ecx, byte ptr [ebp+var_1F8]
test	ecx, ecx
jnz	short loc_5E3475
mov	[ebp+var_1FC], 0
jmp	short loc_5E347F

loc_5E3475:
mov	[ebp+var_1FC], 1

loc_5E347F:
mov	dl, byte ptr [ebp+var_1FC]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_188]
and	eax, 1
jz	short loc_5E34A8
and	[ebp+var_188], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5E34A8:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5E3563
lea	ecx, [ebp+var_17C]
call	sub_52EC50
mov	[ebp+var_1A4], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_D4], eax
mov	ecx, [edx+4]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_1A4]
push	edx
lea	ecx, [ebp+var_CC]
call	sub_5E3C90
lea	eax, [ebp+var_1B4]
mov	[ebp+var_1A8], eax
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_1A8]
call	sub_4046E0
lea	ecx, [ebp+var_D4]
push	ecx
push	ecx
mov	[ebp+var_1B0], esp
mov	ecx, [ebp+var_1B4]
mov	eax, [ebp+var_1B0]
call	sub_4046E0
lea	edx, [ebp+var_184]
push	edx
mov	ecx, [ebp+var_1E8]
call	sub_5E6070
lea	eax, [ebp+var_184]
mov	[ebp+var_200], eax
mov	ecx, [ebp+var_200]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	ecx, [ebp+var_CC]
call	sub_539200
lea	ecx, [ebp+var_17C]
call	sub_539200

loc_5E3563:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5E3350 endp

align 10h


; Attributes: bp-based frame

sub_5E3580 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 130h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5E6EE0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E3580 endp

align 10h


; Attributes: bp-based frame

sub_5E35B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 30h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5E70A0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E35B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E35E0(void *, int)
sub_5E35E0 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_5E70E0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E35E0 endp

align 10h


; Attributes: bp-based frame

sub_5E3620 proc	near

var_104= dword ptr -104h
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 104h
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_104], ecx
jmp	short loc_5E3648

loc_5E3639:
mov	edx, [ebp+var_104]
add	edx, 28h
mov	[ebp+var_104], edx

loc_5E3648:
mov	eax, [ebp+var_104]
cmp	eax, [ebp+arg_4]
jz	short loc_5E3667
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	ecx, [ebp+var_104]
call	sub_5E9730
jmp	short loc_5E3639

loc_5E3667:
mov	esp, ebp
pop	ebp
retn
sub_5E3620 endp

align 10h


; Attributes: bp-based frame

sub_5E3670 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 0
jz	short loc_5E368B
mov	edx, [ebp+arg_0]
mov	ecx, [edx]
call	sub_40AA90

loc_5E368B:
xor	eax, eax
and	eax, 1
jz	short loc_5E36A0
push	4
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E36A0:
mov	esp, ebp
pop	ebp
retn
sub_5E3670 endp

align 10h


; Attributes: bp-based frame

sub_5E36B0 proc	near

var_C= dword ptr -0Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
jmp	short loc_5E36CC

loc_5E36C3:
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx

loc_5E36CC:
mov	eax, [ebp+var_C]
cmp	eax, [ebp+arg_4]
jz	short loc_5E36E5
xor	ecx, ecx
mov	[ebp+var_2], cl
push	0
mov	ecx, [ebp+var_C]
call	sub_5E9790
jmp	short loc_5E36C3

loc_5E36E5:
mov	esp, ebp
pop	ebp
retn
sub_5E36B0 endp

align 10h


; Attributes: bp-based frame

sub_5E36F0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_146D57C
mov	ecx, [ebp+var_C]
call	sub_5E3A70
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5E371E
mov	edx, [ebp+var_C]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E371E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5E36F0 endp

align 10h


; Attributes: bp-based frame

sub_5E3730 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C00CC
mov	ecx, [ebp+var_C]
call	sub_5E3AC0
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5E375E
mov	edx, [ebp+var_C]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E375E:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5E3730 endp

align 10h


; Attributes: bp-based frame

sub_5E3770 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_50], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_50]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_4CE480
add	esp, 8
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5E37DC
mov	ecx, [ebp+var_4C]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E37DC:
mov	esp, ebp
pop	ebp
retn
sub_5E3770 endp



; Attributes: bp-based frame

sub_5E37E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 3FFFFFFFh
jbe	short loc_5E380B
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5E380B:
cmp	[ebp+arg_0], 0
jz	short loc_5E383C
mov	ecx, [ebp+arg_0]
shl	ecx, 2
mov	[ebp+var_8], ecx
lea	edx, [ebp+var_8]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_8]
shr	eax, 2
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
jmp	short loc_5E3843

loc_5E383C:
mov	[ebp+var_10], 0

loc_5E3843:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn	8
sub_5E37E0 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5E3850 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 5D1745Dh
mov	[ebp+var_10], 5D1745Dh
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_5E388D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_5E3893

loc_5E388D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_5E3893:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_5E38A6
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5E38A6:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+arg_0]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_8]
add	edx, [eax]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 5D1745Dh
mov	[ebp+var_1C], 5D1745Dh
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_5E38DC
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
jmp	short loc_5E38E2

loc_5E38DC:
mov	edx, [ebp+var_18]
mov	[ebp+var_30], edx

loc_5E38E2:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_30]
ja	short loc_5E38F2
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_5E391C

loc_5E38F2:
mov	[ebp+var_20], 5D1745Dh
mov	[ebp+var_24], 5D1745Dh
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_5E3910
mov	eax, [ebp+var_24]
mov	[ebp+var_34], eax
jmp	short loc_5E3916

loc_5E3910:
mov	ecx, [ebp+var_20]
mov	[ebp+var_34], ecx

loc_5E3916:
mov	edx, [ebp+var_34]
mov	[ebp+var_4], edx

loc_5E391C:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E3850 endp

align 10h


; Attributes: bp-based frame

sub_5E3930 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A8]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_443290
add	esp, 8
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_A4], eax
mov	edx, [ebp+var_A8]
mov	eax, [edx]
mov	[ebp+var_A0], eax
cmp	[ebp+var_A0], 0
jz	short loc_5E39C7
mov	ecx, [ebp+var_A4]
imul	ecx, 2Ch
push	ecx		; int
mov	edx, [ebp+var_A0]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E39C7:
mov	esp, ebp
pop	ebp
retn
sub_5E3930 endp

align 10h


; Attributes: bp-based frame

sub_5E39D0 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_94]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E8F20
add	esp, 8
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_94]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 4
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_94]
mov	eax, [edx]
mov	[ebp+var_8C], eax
cmp	[ebp+var_8C], 0
jz	short loc_5E3A60
mov	ecx, [ebp+var_90]
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_8C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E3A60:
mov	esp, ebp
pop	ebp
retn
sub_5E39D0 endp

align 10h


; Attributes: bp-based frame

sub_5E3A70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+4], 0
jz	short loc_5E3AB8
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx
jmp	short loc_5E3A96

loc_5E3A8D:
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax

loc_5E3A96:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
cmp	edx, [ecx+8]
jz	short loc_5E3AA3
jmp	short loc_5E3A8D

loc_5E3AA3:
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_5E3AB8:
mov	esp, ebp
pop	ebp
retn
sub_5E3A70 endp

align 10h


; Attributes: bp-based frame

sub_5E3AC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+4], 0
jz	short loc_5E3B08
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx
jmp	short loc_5E3AE6

loc_5E3ADD:
mov	eax, [ebp+var_8]
add	eax, 0Ch
mov	[ebp+var_8], eax

loc_5E3AE6:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
cmp	edx, [ecx+8]
jz	short loc_5E3AF3
jmp	short loc_5E3ADD

loc_5E3AF3:
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_5E3B08:
mov	esp, ebp
pop	ebp
retn
sub_5E3AC0 endp

align 10h


; Attributes: bp-based frame

sub_5E3B10 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
add	eax, 0Ch
pop	ebp
retn
sub_5E3B10 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E3B20(void	*, int)
sub_5E3B20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
cmp	[ebp+arg_0], 0
jz	short loc_5E3B40
mov	eax, [ebp+arg_4]
imul	eax, 18h
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5E3B40:
mov	esp, ebp
pop	ebp
retn	8
sub_5E3B20 endp

align 10h


; Attributes: bp-based frame

sub_5E3B50 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
add	eax, 8
pop	ebp
retn
sub_5E3B50 endp

align 10h


; Attributes: bp-based frame

sub_5E3B60 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
add	eax, 10h
pop	ebp
retn
sub_5E3B60 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E3B70(void	*, int)
sub_5E3B70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
cmp	[ebp+arg_0], 0
jz	short loc_5E3B90
mov	eax, [ebp+arg_4]
imul	eax, 54h
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5E3B90:
mov	esp, ebp
pop	ebp
retn	8
sub_5E3B70 endp

align 10h


; Attributes: bp-based frame

sub_5E3BA0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_54], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_54]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E35B0
add	esp, 8
mov	edx, [ebp+var_54]
mov	eax, [ebp+var_54]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_5E3C0C
mov	ecx, [ebp+var_50]
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E3C0C:
mov	esp, ebp
pop	ebp
retn
sub_5E3BA0 endp



; Attributes: bp-based frame

sub_5E3C10 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E8F50
add	esp, 8
mov	edx, [ebp+var_5C]
cmp	dword ptr [edx], 0
jz	short loc_5E3C84
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_5C]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
cmp	[ebp+var_54], 0
jz	short loc_5E3C84
mov	edx, [ebp+var_58]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_54]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5E3C84:
mov	esp, ebp
pop	ebp
retn
sub_5E3C10 endp

align 10h


; Attributes: bp-based frame

sub_5E3C90 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[edx+8], ecx
mov	eax, [eax+0Ch]
mov	[edx+0Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 10h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 38h
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 38h
call	sub_403400
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+60h]
mov	[eax+60h], edx
mov	ecx, [ecx+64h]
mov	[eax+64h], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
mov	[edx+68h], ecx
mov	eax, [eax+6Ch]
mov	[edx+6Ch], eax
mov	ecx, [ebp+arg_0]
add	ecx, 70h
push	ecx
mov	ecx, [ebp+var_20]
add	ecx, 70h
call	sub_403400
mov	edx, [ebp+arg_0]
add	edx, 98h
push	edx
mov	ecx, [ebp+var_20]
add	ecx, 98h
call	sub_4FECB0
mov	eax, [ebp+var_20]
mov	esp, ebp
pop	ebp
retn	4
sub_5E3C90 endp

align 10h


; Attributes: bp-based frame

sub_5E3D40 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_526A40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx
call	sub_470230
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E3D40 endp

align 10h


; Attributes: bp-based frame

sub_5E3D90 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
push	eax
mov	ecx, [ebp+var_44]
call	sub_46AAF0
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_44]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_40]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_1C]
sub	ecx, [ebp+var_3C]
sar	ecx, 2
mov	[ebp+var_2C], ecx
jmp	short loc_5E3DF5

loc_5E3DEC:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_5E3DF5:
cmp	[ebp+var_2C], 0
jle	short loc_5E3E1F
mov	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_28]
push	ecx
call	sub_5E8690
add	esp, 8
mov	edx, [ebp+var_3C]
add	edx, 4
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_28]
add	eax, 4
mov	[ebp+var_28], eax
jmp	short loc_5E3DEC

loc_5E3E1F:
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_44]
mov	esp, ebp
pop	ebp
retn	4
sub_5E3D90 endp

align 10h


; Attributes: bp-based frame

sub_5E3E40 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_38], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_38]
jnz	short loc_5E3E87
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_5E3D40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5E3F45

loc_5E3E87:
cmp	[ebp+arg_10], 0
jnz	short loc_5E3ECA
cmp	[ebp+arg_C], 0
jnz	short loc_5E3EC1
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_20]
cmp	ecx, [ebp+var_24]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5E3ECA

loc_5E3EC1:
mov	[ebp+var_3C], 1
jmp	short loc_5E3ED1

loc_5E3ECA:
mov	[ebp+var_3C], 0

loc_5E3ED1:
mov	cl, byte ptr [ebp+var_3C]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5E3EE3
and	[ebp+var_C], 0FFFFFFFEh

loc_5E3EE3:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5E3F19
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_5E3D40
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5E3F17
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5E3F17:
jmp	short loc_5E3F45

loc_5E3F19:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_38]
call	sub_5E3D40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5E3F45
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5E3F45:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_38]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_38]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_38]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E3E40 endp

align 10h


; Attributes: bp-based frame

sub_5E3F90 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5E3FD7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E73A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5E408A

loc_5E3FD7:
cmp	[ebp+arg_10], 0
jnz	short loc_5E400F
cmp	[ebp+arg_C], 0
jnz	short loc_5E4006
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E400F

loc_5E4006:
mov	[ebp+var_34], 1
jmp	short loc_5E4016

loc_5E400F:
mov	[ebp+var_34], 0

loc_5E4016:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5E4028
and	[ebp+var_C], 0FFFFFFFEh

loc_5E4028:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5E405E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5E73A0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5E405C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5E405C:
jmp	short loc_5E408A

loc_5E405E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5E73A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5E408A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5E408A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E3F90 endp

align 10h


; Attributes: bp-based frame

sub_5E40D0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 9Ch
push	esi
push	edi
mov	[ebp+var_9C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_5A87A0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_9C]
add	ecx, 8
call	sub_5A8900
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_38], edx
jmp	short loc_5E4148

loc_5E4136:
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_38]
add	ecx, 34h
mov	[ebp+var_38], ecx

loc_5E4148:
cmp	[ebp+var_3C], 0
jbe	short loc_5E415D
mov	esi, [ebp+arg_4]
mov	ecx, 0Dh
mov	edi, [ebp+var_38]
rep movsd
jmp	short loc_5E4136

loc_5E415D:
mov	edx, [ebp+var_38]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_5E4188
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_9C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_5E4188:
mov	ecx, [ebp+var_9C]
call	sub_5E73F0
mov	edx, [ebp+var_4]
imul	edx, 34h
add	edx, [ebp+var_8]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_9C]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_5E40D0 endp



; Attributes: bp-based frame

sub_5E41D0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3F=	byte ptr -3Fh
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8Ch
push	esi
push	edi
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5E4208
mov	edx, [ebp+var_88]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5E4208
mov	[ebp+var_8C], 1
jmp	short loc_5E4212

loc_5E4208:
mov	[ebp+var_8C], 0

loc_5E4212:
movzx	ecx, byte ptr [ebp+var_8C]
test	ecx, ecx
jz	short loc_5E424F
mov	esi, [ebp+arg_8]
mov	ecx, 0Dh
lea	edi, [ebp+var_3C]
rep movsd
xor	edx, edx
mov	[ebp+var_3D], dl
lea	eax, [ebp+var_3D]
push	eax
lea	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_88]
call	sub_5E41D0
jmp	loc_5E43F9

loc_5E424F:
mov	ecx, [ebp+var_88]
mov	eax, [ecx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_88]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5E4347
xor	edx, edx
mov	[ebp+var_3E], dl
mov	eax, [ebp+var_88]
mov	ecx, [eax+4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_88]
mov	eax, [edx+4]
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 34h
mov	edx, [ebp+var_88]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_48]
push	edx
mov	eax, [ebp+var_44]
push	eax
call	sub_407C50
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
imul	ecx, 34h
mov	edx, [ebp+var_88]
add	ecx, [edx+4]
mov	eax, [ebp+var_88]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[ebp+var_3F], cl
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
imul	eax, 34h
mov	ecx, [ebp+var_8]
sub	ecx, eax
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_5C], eax
mov	eax, [ebp+arg_4]
imul	eax, 34h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_5C]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_58], eax
jmp	short loc_5E432D

loc_5E431B:
mov	edx, [ebp+var_5C]
add	edx, 34h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_58]
sub	eax, 1
mov	[ebp+var_58], eax

loc_5E432D:
cmp	[ebp+var_58], 0
jle	short loc_5E4342
mov	esi, [ebp+arg_8]
mov	ecx, 0Dh
mov	edi, [ebp+var_5C]
rep movsd
jmp	short loc_5E431B

loc_5E4342:
jmp	loc_5E43F9

loc_5E4347:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_88]
mov	ecx, [eax+4]
push	ecx
call	sub_5E7A10
add	esp, 0Ch
mov	edx, [ebp+var_88]
mov	[edx+4], eax
xor	eax, eax
mov	[ebp+var_40], al
mov	ecx, [ebp+var_88]
mov	edx, [ecx+4]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_407C50
add	esp, 0Ch
mov	eax, [ebp+var_4]
imul	eax, 34h
mov	ecx, [ebp+var_88]
add	eax, [ecx+4]
mov	edx, [ebp+var_88]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	[ebp+var_84], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_84]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5E43E1

loc_5E43C9:
mov	edx, [ebp+var_84]
add	edx, 34h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_80]
sub	eax, 1
mov	[ebp+var_80], eax

loc_5E43E1:
cmp	[ebp+var_80], 0
jle	short loc_5E43F9
mov	esi, [ebp+arg_8]
mov	ecx, 0Dh
mov	edi, [ebp+var_84]
rep movsd
jmp	short loc_5E43C9

loc_5E43F9:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_5E41D0 endp

align 10h


; Attributes: bp-based frame

sub_5E4410 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_4442B0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_4DEED0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
sub	eax, [ebp+var_4C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_40], eax
jmp	short loc_5E4493

loc_5E448A:
mov	edx, [ebp+var_40]
sub	edx, 1
mov	[ebp+var_40], edx

loc_5E4493:
cmp	[ebp+var_40], 0
jle	short loc_5E44BD
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_3C]
push	ecx		; void *
call	sub_5E7DF0
add	esp, 8
mov	edx, [ebp+var_4C]
add	edx, 28h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_3C]
add	eax, 28h
mov	[ebp+var_3C], eax
jmp	short loc_5E448A

loc_5E44BD:
mov	ecx, [ebp+var_3C]
mov	[ebp+var_C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5E44E4
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5E7DF0
add	esp, 8
mov	ecx, [ebp+var_C]
add	ecx, 28h
mov	[ebp+var_C], ecx
jmp	short loc_5E4539

loc_5E44E4:
mov	edx, [ebp+arg_C]
imul	edx, 28h
add	edx, [ebp+var_C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_68], eax
mov	eax, [ebp+var_60]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_6C], eax
jmp	short loc_5E451B

loc_5E4509:
mov	edx, [ebp+var_6C]
sub	edx, 1
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
add	eax, 28h
mov	[ebp+var_68], eax

loc_5E451B:
cmp	[ebp+var_6C], 0
jle	short loc_5E4533
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	edx, [ebp+var_68]
push	edx		; void *
call	sub_5E7DF0
add	esp, 8
jmp	short loc_5E4509

loc_5E4533:
mov	eax, [ebp+var_60]
mov	[ebp+var_C], eax

loc_5E4539:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5E45D1
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_91], cl
mov	edx, [ebp+var_CC]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_90]
sub	eax, [ebp+var_8C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5E4598

loc_5E458F:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5E4598:
cmp	[ebp+var_80], 0
jle	short loc_5E45CB
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5E7DF0
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 28h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 28h
mov	[ebp+var_7C], eax
jmp	short loc_5E458F

loc_5E45CB:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5E45D1:
mov	ecx, [ebp+var_CC]
call	sub_5E7520
mov	edx, [ebp+var_4]
imul	edx, 28h
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5E4410 endp

align 10h


; Attributes: bp-based frame

sub_5E4620 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_4D=	byte ptr -4Dh
var_34=	byte ptr -34h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_C8], ecx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5E4656
mov	edx, [ebp+var_C8]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5E4656
mov	[ebp+var_CC], 1
jmp	short loc_5E4660

loc_5E4656:
mov	[ebp+var_CC], 0

loc_5E4660:
movzx	ecx, byte ptr [ebp+var_CC]
test	ecx, ecx
jz	short loc_5E46B4
mov	edx, [ebp+arg_8]
push	edx
lea	ecx, [ebp+var_30]
call	sub_5E7280
xor	eax, eax
mov	[ebp+var_31], al
lea	ecx, [ebp+var_31]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_C8]
call	sub_5E4620
lea	ecx, [ebp+var_14]
call	sub_5DFF60
lea	ecx, [ebp+var_20]
call	sub_468AA0
lea	ecx, [ebp+var_2C]
call	sub_468AA0
jmp	loc_5E4952

loc_5E46B4:
mov	edx, [ebp+var_C8]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_C8]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_4]
jbe	loc_5E47FA
xor	edx, edx
mov	[ebp+var_32], dl
mov	eax, [ebp+var_C8]
mov	ecx, [eax+4]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_C8]
mov	eax, [edx+4]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
mov	edx, [ebp+var_C8]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_60], eax
push	0
lea	ecx, [ebp+var_4D]
push	ecx
mov	edx, [ebp+var_68]
push	edx
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+var_60]
push	ecx
call	sub_5E9310
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 28h
mov	eax, [ebp+var_C8]
add	edx, [eax+4]
mov	ecx, [ebp+var_C8]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_33], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_70], eax
jmp	short loc_5E477B

loc_5E4772:
mov	edx, [ebp+var_70]
sub	edx, 1
mov	[ebp+var_70], edx

loc_5E477B:
cmp	[ebp+var_70], 0
jle	short loc_5E47A1
mov	eax, [ebp+var_74]
sub	eax, 28h
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_78]
sub	ecx, 28h
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_74]
push	edx
mov	ecx, [ebp+var_78]
call	sub_5E72E0
jmp	short loc_5E4772

loc_5E47A1:
mov	eax, [ebp+arg_0]
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_4]
imul	eax, 28h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_84]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_80], eax
jmp	short loc_5E47DE

loc_5E47C6:
mov	edx, [ebp+var_84]
add	edx, 28h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_80]
sub	eax, 1
mov	[ebp+var_80], eax

loc_5E47DE:
cmp	[ebp+var_80], 0
jle	short loc_5E47F5
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_84]
call	sub_5E72E0
jmp	short loc_5E47C6

loc_5E47F5:
jmp	loc_5E4952

loc_5E47FA:
mov	edx, [ebp+var_C8]
mov	eax, [edx+4]
mov	[ebp+var_9C], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
imul	ecx, 28h
add	ecx, [ebp+var_9C]
mov	[ebp+var_88], ecx
push	0
lea	edx, [ebp+var_89]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_88]
push	ecx
mov	edx, [ebp+var_9C]
push	edx
call	sub_5E92C0
add	esp, 14h
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_88]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_34], dl
mov	eax, [ebp+var_C8]
mov	ecx, [eax+4]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_B8]
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_B4]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_A8], eax
jmp	short loc_5E48A1

loc_5E4892:
mov	edx, [ebp+var_A8]
sub	edx, 1
mov	[ebp+var_A8], edx

loc_5E48A1:
cmp	[ebp+var_A8], 0
jle	short loc_5E48E0
mov	eax, [ebp+var_B4]
push	eax		; int
mov	ecx, [ebp+var_A4]
push	ecx		; void *
call	sub_5E7DF0
add	esp, 8
mov	edx, [ebp+var_B4]
add	edx, 28h
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_A4]
add	eax, 28h
mov	[ebp+var_A4], eax
jmp	short loc_5E4892

loc_5E48E0:
mov	ecx, [ebp+var_4]
imul	ecx, 28h
mov	edx, [ebp+var_C8]
add	ecx, [edx+4]
mov	eax, [ebp+var_C8]
mov	[eax+4], ecx
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C4], ecx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_C4]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_C0], eax
jmp	short loc_5E4938

loc_5E491A:
mov	edx, [ebp+var_C4]
add	edx, 28h
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C0]
sub	eax, 1
mov	[ebp+var_C0], eax

loc_5E4938:
cmp	[ebp+var_C0], 0
jle	short loc_5E4952
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_C4]
call	sub_5E72E0
jmp	short loc_5E491A

loc_5E4952:
mov	esp, ebp
pop	ebp
retn	10h
sub_5E4620 endp

align 10h


; Attributes: bp-based frame

sub_5E4960 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5E498E

loc_5E4985:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5E498E:
cmp	[ebp+var_8], 0
jle	short loc_5E49FE
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
mov	edx, [ebp+var_10]
add	edx, 0Ch
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_C]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_440360
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	eax, [ebp+var_C]
add	eax, 2Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 2Ch
mov	[ebp+var_10], ecx
jmp	short loc_5E4985

loc_5E49FE:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5E4960 endp

align 10h


; Attributes: bp-based frame

sub_5E4A10 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0CCh
mov	[ebp+var_CC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_CC]
call	sub_5E75C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_CC]
add	ecx, 8
call	sub_5D6180
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_CC]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 4
mov	[ebp+var_40], edx
jmp	short loc_5E4A8E

loc_5E4A85:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5E4A8E:
cmp	[ebp+var_40], 0
jle	short loc_5E4AB8
mov	ecx, [ebp+var_4C]
push	ecx		; int
mov	edx, [ebp+var_3C]
push	edx		; void *
call	sub_5E7F10
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 10h
mov	[ebp+var_3C], ecx
jmp	short loc_5E4A85

loc_5E4AB8:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5E4ADF
mov	eax, [ebp+arg_4]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5E7F10
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_C], edx
jmp	short loc_5E4B2F

loc_5E4ADF:
mov	eax, [ebp+arg_C]
shl	eax, 4
add	eax, [ebp+var_C]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_60]
sub	edx, [ebp+var_C]
sar	edx, 4
mov	[ebp+var_6C], edx
jmp	short loc_5E4B11

loc_5E4AFF:
mov	eax, [ebp+var_6C]
sub	eax, 1
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_68]
add	ecx, 10h
mov	[ebp+var_68], ecx

loc_5E4B11:
cmp	[ebp+var_6C], 0
jle	short loc_5E4B29
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+var_68]
push	eax		; void *
call	sub_5E7F10
add	esp, 8
jmp	short loc_5E4AFF

loc_5E4B29:
mov	ecx, [ebp+var_60]
mov	[ebp+var_C], ecx

loc_5E4B2F:
movzx	edx, [ebp+arg_10]
test	edx, edx
jnz	loc_5E4BC2
xor	eax, eax
mov	[ebp+var_F], al
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	dl, [ebp+var_10]
mov	[ebp+var_91], dl
mov	eax, [ebp+var_CC]
mov	ecx, [eax+4]
mov	[ebp+var_90], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_90]
sub	ecx, [ebp+var_8C]
sar	ecx, 4
mov	[ebp+var_80], ecx
jmp	short loc_5E4B89

loc_5E4B80:
mov	edx, [ebp+var_80]
sub	edx, 1
mov	[ebp+var_80], edx

loc_5E4B89:
cmp	[ebp+var_80], 0
jle	short loc_5E4BBC
mov	eax, [ebp+var_8C]
push	eax		; int
mov	ecx, [ebp+var_7C]
push	ecx		; void *
call	sub_5E7F10
add	esp, 8
mov	edx, [ebp+var_8C]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_7C]
add	eax, 10h
mov	[ebp+var_7C], eax
jmp	short loc_5E4B80

loc_5E4BBC:
mov	ecx, [ebp+var_7C]
mov	[ebp+var_C], ecx

loc_5E4BC2:
mov	ecx, [ebp+var_CC]
call	sub_5E39D0
mov	edx, [ebp+var_4]
shl	edx, 4
add	edx, [ebp+var_8]
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_CC]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_CC]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_CC]
mov	edx, [ebp+var_C8]
mov	[ecx+8], edx
mov	esp, ebp
pop	ebp
retn	14h
sub_5E4A10 endp

align 10h


; Attributes: bp-based frame

sub_5E4C10 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_35=	byte ptr -35h
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0B8h
mov	[ebp+var_B4], ecx
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5E4C46
mov	edx, [ebp+var_B4]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5E4C46
mov	[ebp+var_B8], 1
jmp	short loc_5E4C50

loc_5E4C46:
mov	[ebp+var_B8], 0

loc_5E4C50:
movzx	ecx, byte ptr [ebp+var_B8]
test	ecx, ecx
jz	short loc_5E4C9F
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_8]
add	ecx, 4
push	ecx
lea	ecx, [ebp+var_14]
call	sub_5E7470
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_19]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_B4]
call	sub_5E4C10
lea	ecx, [ebp+var_14]
call	sub_5E00C0
jmp	loc_5E4F63

loc_5E4C9F:
mov	ecx, [ebp+var_B4]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_B4]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_5E4DE7
xor	eax, eax
mov	[ebp+var_1A], al
mov	ecx, [ebp+var_B4]
mov	edx, [ecx+4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_B4]
mov	ecx, [eax+4]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
shl	edx, 4
mov	eax, [ebp+var_B4]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_48], ecx
push	0
lea	edx, [ebp+var_35]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_48]
push	edx
call	sub_5E9370
add	esp, 14h
mov	eax, [ebp+arg_4]
shl	eax, 4
mov	ecx, [ebp+var_B4]
add	eax, [ecx+4]
mov	edx, [ebp+var_B4]
mov	[edx+4], eax
xor	eax, eax
mov	[ebp+var_1B], al
mov	ecx, [ebp+var_8]
mov	[ebp+var_60], ecx
mov	edx, [ebp+arg_4]
shl	edx, 4
mov	eax, [ebp+var_8]
sub	eax, edx
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_58], ecx
jmp	short loc_5E4D5C

loc_5E4D53:
mov	edx, [ebp+var_58]
sub	edx, 1
mov	[ebp+var_58], edx

loc_5E4D5C:
cmp	[ebp+var_58], 0
jle	short loc_5E4D92
mov	eax, [ebp+var_5C]
sub	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_60]
sub	ecx, 10h
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_5C]
add	edx, 4
push	edx
mov	ecx, [ebp+var_60]
add	ecx, 4
call	sub_5E7AA0
jmp	short loc_5E4D53

loc_5E4D92:
mov	eax, [ebp+arg_0]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 4
add	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_6C]
sar	ecx, 4
mov	[ebp+var_68], ecx
jmp	short loc_5E4DBE

loc_5E4DAC:
mov	edx, [ebp+var_6C]
add	edx, 10h
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_68]
sub	eax, 1
mov	[ebp+var_68], eax

loc_5E4DBE:
cmp	[ebp+var_68], 0
jle	short loc_5E4DE2
mov	ecx, [ebp+var_6C]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_8]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_6C]
add	ecx, 4
call	sub_5E7AA0
jmp	short loc_5E4DAC

loc_5E4DE2:
jmp	loc_5E4F63

loc_5E4DE7:
mov	edx, [ebp+var_B4]
mov	eax, [edx+4]
mov	[ebp+var_88], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_4]
shl	ecx, 4
add	ecx, [ebp+var_88]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_88]
mov	[ebp+var_78], edx
mov	eax, [ebp+var_70]
sub	eax, [ebp+var_88]
sar	eax, 4
mov	[ebp+var_7C], eax
jmp	short loc_5E4E34

loc_5E4E22:
mov	ecx, [ebp+var_7C]
sub	ecx, 1
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_78]
add	edx, 10h
mov	[ebp+var_78], edx

loc_5E4E34:
cmp	[ebp+var_7C], 0
jle	short loc_5E4E4C
mov	eax, [ebp+arg_8]
push	eax		; int
mov	ecx, [ebp+var_78]
push	ecx		; void *
call	sub_5E7F10
add	esp, 8
jmp	short loc_5E4E22

loc_5E4E4C:
mov	edx, [ebp+var_B4]
mov	eax, [ebp+var_70]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_1C], cl
mov	edx, [ebp+var_B4]
mov	eax, [edx+4]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_A0]
sar	eax, 4
mov	[ebp+var_94], eax
jmp	short loc_5E4EA4

loc_5E4E95:
mov	ecx, [ebp+var_94]
sub	ecx, 1
mov	[ebp+var_94], ecx

loc_5E4EA4:
cmp	[ebp+var_94], 0
jle	short loc_5E4EE3
mov	edx, [ebp+var_A0]
push	edx		; int
mov	eax, [ebp+var_90]
push	eax		; void *
call	sub_5E7F10
add	esp, 8
mov	ecx, [ebp+var_A0]
add	ecx, 10h
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_90]
add	edx, 10h
mov	[ebp+var_90], edx
jmp	short loc_5E4E95

loc_5E4EE3:
mov	eax, [ebp+var_4]
shl	eax, 4
mov	ecx, [ebp+var_B4]
add	eax, [ecx+4]
mov	edx, [ebp+var_B4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_B0]
sar	ecx, 4
mov	[ebp+var_AC], ecx
jmp	short loc_5E4F36

loc_5E4F18:
mov	edx, [ebp+var_B0]
add	edx, 10h
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_AC]
sub	eax, 1
mov	[ebp+var_AC], eax

loc_5E4F36:
cmp	[ebp+var_AC], 0
jle	short loc_5E4F63
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_8]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_B0]
add	ecx, 4
call	sub_5E7AA0
jmp	short loc_5E4F18

loc_5E4F63:
mov	esp, ebp
pop	ebp
retn	10h
sub_5E4C10 endp

align 10h


; Attributes: bp-based frame

sub_5E4F70 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5E514D
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E4FD9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E80F0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433

loc_5E4FD9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5E5025
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433
jmp	loc_5E5148

loc_5E5025:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5E505A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433

loc_5E505A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5E50A4
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433

loc_5E50A4:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5E511D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5E50F6
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433
jmp	short loc_5E511B

loc_5E50F6:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433

loc_5E511B:
jmp	short loc_5E5148

loc_5E511D:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E80F0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433

loc_5E5148:
jmp	loc_5E5433

loc_5E514D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5E51E1
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5E51B1
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433
jmp	short loc_5E51DC

loc_5E51B1:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E80F0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433

loc_5E51DC:
jmp	loc_5E5433

loc_5E51E1:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5E5251
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E5251
mov	[ebp+var_A4], 1
jmp	short loc_5E525B

loc_5E5251:
mov	[ebp+var_A4], 0

loc_5E525B:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5E5270
and	[ebp+var_4C], 0FFFFFFFEh

loc_5E5270:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5E52D2
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5E52A8
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433
jmp	short loc_5E52CD

loc_5E52A8:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	loc_5E5433

loc_5E52CD:
jmp	loc_5E5433

loc_5E52D2:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5E5322
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5E5322:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5E5371
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5E5371
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5E5365
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5E5371

loc_5E5365:
mov	[ebp+var_A8], 1
jmp	short loc_5E537B

loc_5E5371:
mov	[ebp+var_A8], 0

loc_5E537B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5E5390
and	[ebp+var_4C], 0FFFFFFFDh

loc_5E5390:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5E53E9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5E53C5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	short loc_5E5433
jmp	short loc_5E53E7

loc_5E53C5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E7FB0
mov	eax, [ebp+arg_0]
jmp	short loc_5E5433

loc_5E53E7:
jmp	short loc_5E5433

loc_5E53E9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5E5407
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5E5433
jmp	short loc_5E5433

loc_5E5407:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E80F0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5E5433:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E4F70 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E5440(void *)
sub_5E5440 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5E546F
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx+4]
call	eax

loc_5E546F:
xor	ecx, ecx
and	ecx, 1
jz	short loc_5E5482
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E5482:
mov	esp, ebp
pop	ebp
retn
sub_5E5440 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E5490(void *)
sub_5E5490 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 13Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_5E8FE0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5E54BC
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E54BC:
mov	esp, ebp
pop	ebp
retn
sub_5E5490 endp



; Attributes: bp-based frame

sub_5E54C0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+10h]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_4]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
sub	eax, [ebp+var_10]
cmp	edx, eax
jnz	loc_5E5599
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[ebp+var_20], edx
mov	[ebp+var_24], 0
jmp	short loc_5E5534

loc_5E552B:
mov	eax, [ebp+var_24]
add	eax, 1
mov	[ebp+var_24], eax

loc_5E5534:
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+var_18]
cmp	[ebp+var_24], ecx
jnb	short loc_5E5583
mov	edx, [ebp+var_1C]
add	edx, [ebp+var_24]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+var_20]
add	ecx, [ebp+var_24]
movzx	edx, byte ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_5E5581
mov	eax, [ebp+var_20]
add	eax, [ebp+var_24]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+var_1C]
add	edx, [ebp+var_24]
movzx	eax, byte ptr [edx]
xor	edx, edx
cmp	ecx, eax
setnl	dl
lea	edx, [edx+edx-1]
mov	[ebp+var_28], edx
jmp	short loc_5E558A

loc_5E5581:
jmp	short loc_5E552B

loc_5E5583:
mov	[ebp+var_28], 0

loc_5E558A:
cmp	[ebp+var_28], 0
jnz	short loc_5E5599
mov	[ebp+var_2C], 1
jmp	short loc_5E55A0

loc_5E5599:
mov	[ebp+var_2C], 0

loc_5E55A0:
mov	al, byte ptr [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn
sub_5E54C0 endp

align 10h


; Attributes: bp-based frame

sub_5E55B0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_18], ecx
jmp	short loc_5E55CA

loc_5E55BB:
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_0], eax

loc_5E55CA:
lea	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	edx, [ebp+var_14]
setnz	al
mov	[ebp+var_19], al
movzx	ecx, [ebp+var_19]
test	ecx, ecx
jz	short loc_5E5606
mov	edx, [ebp+arg_0]
add	edx, 10h
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_18]
call	sub_5E2090
jmp	short loc_5E55BB

loc_5E5606:
mov	esp, ebp
pop	ebp
retn	8
sub_5E55B0 endp

align 10h


; Attributes: bp-based frame

sub_5E5610 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5E57ED
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E5679
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8500
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3

loc_5E5679:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_5E56C5
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3
jmp	loc_5E57E8

loc_5E56C5:
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+arg_8]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_5E56FA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3

loc_5E56FA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_5E5744
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3

loc_5E5744:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_64]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5E57BD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5E5796
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3
jmp	short loc_5E57BB

loc_5E5796:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3

loc_5E57BB:
jmp	short loc_5E57E8

loc_5E57BD:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8500
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3

loc_5E57E8:
jmp	loc_5E5AD3

loc_5E57ED:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5E5881
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_5E5851
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3
jmp	short loc_5E587C

loc_5E5851:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8500
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3

loc_5E587C:
jmp	loc_5E5AD3

loc_5E5881:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_7C]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_5E58F1
or	[ebp+var_4C], 1
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E58F1
mov	[ebp+var_A4], 1
jmp	short loc_5E58FB

loc_5E58F1:
mov	[ebp+var_A4], 0

loc_5E58FB:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5E5910
and	[ebp+var_4C], 0FFFFFFFEh

loc_5E5910:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5E5972
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5E5948
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3
jmp	short loc_5E596D

loc_5E5948:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	loc_5E5AD3

loc_5E596D:
jmp	loc_5E5AD3

loc_5E5972:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5E59C2
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+var_8C]
mov	ecx, [ebp+arg_8]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
mov	[ebp+var_11], al

loc_5E59C2:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5E5A11
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5E5A11
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A0]
jz	short loc_5E5A05
or	[ebp+var_4C], 2
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5E5A11

loc_5E5A05:
mov	[ebp+var_A8], 1
jmp	short loc_5E5A1B

loc_5E5A11:
mov	[ebp+var_A8], 0

loc_5E5A1B:
mov	cl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5E5A30
and	[ebp+var_4C], 0FFFFFFFDh

loc_5E5A30:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5E5A89
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5E5A65
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	short loc_5E5AD3
jmp	short loc_5E5A87

loc_5E5A65:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E83C0
mov	eax, [ebp+arg_0]
jmp	short loc_5E5AD3

loc_5E5A87:
jmp	short loc_5E5AD3

loc_5E5A89:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5E5AA7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5E5AD3
jmp	short loc_5E5AD3

loc_5E5AA7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8500
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5E5AD3:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E5610 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E5AE0(void *)
sub_5E5AE0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 4
call	sub_5E3C10
xor	ecx, ecx
and	ecx, 1
jz	short loc_5E5B09
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E5B09:
mov	esp, ebp
pop	ebp
retn
sub_5E5AE0 endp

align 10h


; Attributes: bp-based frame

sub_5E5B10 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_D4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_D4]
call	sub_42F940
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_D4]
add	ecx, 8
call	sub_5E37E0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	[ebp+var_D], cl
xor	edx, edx
mov	[ebp+var_E], dl
mov	al, [ebp+var_E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_D4]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_4C]
sar	edx, 2
mov	[ebp+var_40], edx
jmp	short loc_5E5B8E

loc_5E5B85:
mov	eax, [ebp+var_40]
sub	eax, 1
mov	[ebp+var_40], eax

loc_5E5B8E:
cmp	[ebp+var_40], 0
jle	short loc_5E5BB8
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_5E8690
add	esp, 8
mov	eax, [ebp+var_4C]
add	eax, 4
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_3C]
add	ecx, 4
mov	[ebp+var_3C], ecx
jmp	short loc_5E5B85

loc_5E5BB8:
mov	edx, [ebp+var_3C]
mov	[ebp+var_C], edx
cmp	[ebp+arg_C], 1
jnz	short loc_5E5BDF
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_5E8690
add	esp, 8
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	short loc_5E5C2F

loc_5E5BDF:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
lea	edx, [ecx+eax*4]
mov	[ebp+var_64], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_64]
sub	ecx, [ebp+var_C]
sar	ecx, 2
mov	[ebp+var_70], ecx
jmp	short loc_5E5C11

loc_5E5BFF:
mov	edx, [ebp+var_70]
sub	edx, 1
mov	[ebp+var_70], edx
mov	eax, [ebp+var_6C]
add	eax, 4
mov	[ebp+var_6C], eax

loc_5E5C11:
cmp	[ebp+var_70], 0
jle	short loc_5E5C29
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
call	sub_5E8690
add	esp, 8
jmp	short loc_5E5BFF

loc_5E5C29:
mov	eax, [ebp+var_64]
mov	[ebp+var_C], eax

loc_5E5C2F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	loc_5E5CCE
xor	edx, edx
mov	[ebp+var_F], dl
xor	eax, eax
mov	[ebp+var_10], al
mov	cl, [ebp+var_10]
mov	[ebp+var_99], cl
mov	edx, [ebp+var_D4]
mov	eax, [edx+4]
mov	[ebp+var_98], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_98]
sub	eax, [ebp+var_94]
sar	eax, 2
mov	[ebp+var_84], eax
jmp	short loc_5E5C92

loc_5E5C83:
mov	ecx, [ebp+var_84]
sub	ecx, 1
mov	[ebp+var_84], ecx

loc_5E5C92:
cmp	[ebp+var_84], 0
jle	short loc_5E5CC8
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_80]
push	eax
call	sub_5E8690
add	esp, 8
mov	ecx, [ebp+var_94]
add	ecx, 4
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_80]
add	edx, 4
mov	[ebp+var_80], edx
jmp	short loc_5E5C83

loc_5E5CC8:
mov	eax, [ebp+var_80]
mov	[ebp+var_C], eax

loc_5E5CCE:
mov	ecx, [ebp+var_D4]
call	sub_5E7690
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*4]
mov	[ebp+var_D0], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_D4]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_D4]
mov	eax, [ebp+var_D0]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5E5B10 endp

align 10h


; Attributes: bp-based frame

sub_5E5D20 proc	near

var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0B4h
mov	[ebp+var_B0], ecx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_5E5D56
mov	edx, [ebp+var_B0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_5E5D56
mov	[ebp+var_B4], 1
jmp	short loc_5E5D60

loc_5E5D56:
mov	[ebp+var_B4], 0

loc_5E5D60:
movzx	ecx, byte ptr [ebp+var_B4]
test	ecx, ecx
jz	short loc_5E5DDB
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_5E5D8C
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_5E5D8C:
xor	eax, eax
mov	[ebp+var_D], al
lea	ecx, [ebp+var_D]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_B0]
call	sub_5E5D20
cmp	[ebp+var_C], 0
jz	short loc_5E5DD6
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5E5DD6
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
mov	eax, [edx+4]
call	eax

loc_5E5DD6:
jmp	loc_5E6060

loc_5E5DDB:
mov	ecx, [ebp+var_B0]
mov	edx, [ecx+4]
sub	edx, [ebp+arg_0]
sar	edx, 2
mov	[ebp+var_4], edx
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jbe	loc_5E5F03
xor	eax, eax
mov	[ebp+var_E], al
mov	ecx, [ebp+var_B0]
mov	edx, [ecx+4]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
shl	edx, 2
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
sub	ecx, edx
mov	[ebp+var_2C], ecx
push	0
lea	edx, [ebp+var_19]
push	edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
call	sub_5E94D0
add	esp, 14h
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_4]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_B0]
mov	[ecx+4], eax
xor	edx, edx
mov	[ebp+var_F], dl
mov	eax, [ebp+var_8]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+arg_4]
shl	ecx, 2
mov	edx, [ebp+var_8]
sub	edx, ecx
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
sub	eax, [ebp+arg_0]
sar	eax, 2
mov	[ebp+var_3C], eax
jmp	short loc_5E5E98

loc_5E5E8F:
mov	ecx, [ebp+var_3C]
sub	ecx, 1
mov	[ebp+var_3C], ecx

loc_5E5E98:
cmp	[ebp+var_3C], 0
jle	short loc_5E5EBE
mov	edx, [ebp+var_48]
sub	edx, 4
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
sub	eax, 4
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_4C]
call	sub_4AC7F0
jmp	short loc_5E5E8F

loc_5E5EBE:
mov	edx, [ebp+arg_0]
mov	[ebp+var_60], edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax*4]
sub	edx, [ebp+var_60]
sar	edx, 2
mov	[ebp+var_54], edx
jmp	short loc_5E5EEA

loc_5E5ED8:
mov	eax, [ebp+var_60]
add	eax, 4
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_54]
sub	ecx, 1
mov	[ebp+var_54], ecx

loc_5E5EEA:
cmp	[ebp+var_54], 0
jle	short loc_5E5EFE
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_60]
call	sub_4AC7F0
jmp	short loc_5E5ED8

loc_5E5EFE:
jmp	loc_5E6060

loc_5E5F03:
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_4]
mov	eax, [ebp+var_7C]
lea	ecx, [eax+edx*4]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_7C]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_64]
sub	eax, [ebp+var_7C]
sar	eax, 2
mov	[ebp+var_70], eax
jmp	short loc_5E5F44

loc_5E5F32:
mov	ecx, [ebp+var_70]
sub	ecx, 1
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_6C]
add	edx, 4
mov	[ebp+var_6C], edx

loc_5E5F44:
cmp	[ebp+var_70], 0
jle	short loc_5E5F5C
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
call	sub_5E8690
add	esp, 8
jmp	short loc_5E5F32

loc_5E5F5C:
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_64]
mov	[edx+4], eax
xor	ecx, ecx
mov	[ebp+var_10], cl
mov	edx, [ebp+var_B0]
mov	eax, [edx+4]
mov	[ebp+var_98], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_98]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_94]
sar	eax, 2
mov	[ebp+var_88], eax
jmp	short loc_5E5FB4

loc_5E5FA5:
mov	ecx, [ebp+var_88]
sub	ecx, 1
mov	[ebp+var_88], ecx

loc_5E5FB4:
cmp	[ebp+var_88], 0
jle	short loc_5E5FF3
mov	edx, [ebp+var_94]
push	edx
mov	eax, [ebp+var_84]
push	eax
call	sub_5E8690
add	esp, 8
mov	ecx, [ebp+var_94]
add	ecx, 4
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_84]
add	edx, 4
mov	[ebp+var_84], edx
jmp	short loc_5E5FA5

loc_5E5FF3:
mov	eax, [ebp+var_B0]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	eax, [ecx+edx*4]
mov	ecx, [ebp+var_B0]
mov	[ecx+4], eax
mov	edx, [ebp+arg_0]
mov	[ebp+var_AC], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_AC]
sar	eax, 2
mov	[ebp+var_A0], eax
jmp	short loc_5E6046

loc_5E6028:
mov	ecx, [ebp+var_AC]
add	ecx, 4
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_A0]
sub	edx, 1
mov	[ebp+var_A0], edx

loc_5E6046:
cmp	[ebp+var_A0], 0
jle	short loc_5E6060
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_AC]
call	sub_4AC7F0
jmp	short loc_5E6028

loc_5E6060:
mov	esp, ebp
pop	ebp
retn	10h
sub_5E5D20 endp

align 10h


; Attributes: bp-based frame

sub_5E6070 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5E6325
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E60D9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8870
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6777

loc_5E60D9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E6128
jb	short loc_5E611C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E6128

loc_5E611C:
mov	[ebp+var_AC], 1
jmp	short loc_5E6132

loc_5E6128:
mov	[ebp+var_AC], 0

loc_5E6132:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5E616D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	loc_5E6777
jmp	loc_5E6320

loc_5E616D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E61BC
jb	short loc_5E61B0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E61BC

loc_5E61B0:
mov	[ebp+var_B8], 1
jmp	short loc_5E61C6

loc_5E61BC:
mov	[ebp+var_B8], 0

loc_5E61C6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5E61EA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6777

loc_5E61EA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5E6234
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	loc_5E6777

loc_5E6234:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E6283
jb	short loc_5E6277
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E6283

loc_5E6277:
mov	[ebp+var_C4], 1
jmp	short loc_5E628D

loc_5E6283:
mov	[ebp+var_C4], 0

loc_5E628D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5E62F5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5E62CE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	loc_5E6777
jmp	short loc_5E62F3

loc_5E62CE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	loc_5E6777

loc_5E62F3:
jmp	short loc_5E6320

loc_5E62F5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8870
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6777

loc_5E6320:
jmp	loc_5E6777

loc_5E6325:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5E6401
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E6389
jb	short loc_5E637D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E6389

loc_5E637D:
mov	[ebp+var_D0], 1
jmp	short loc_5E6393

loc_5E6389:
mov	[ebp+var_D0], 0

loc_5E6393:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5E63D1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	loc_5E6777
jmp	short loc_5E63FC

loc_5E63D1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8870
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6777

loc_5E63FC:
jmp	loc_5E6777

loc_5E6401:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E646A
jb	short loc_5E645E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E646A

loc_5E645E:
mov	[ebp+var_DC], 1
jmp	short loc_5E6474

loc_5E646A:
mov	[ebp+var_DC], 0

loc_5E6474:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5E64FF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5E64DE
jb	short loc_5E64D2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5E64DE

loc_5E64D2:
mov	[ebp+var_E8], 1
jmp	short loc_5E64E8

loc_5E64DE:
mov	[ebp+var_E8], 0

loc_5E64E8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5E64FF
mov	[ebp+var_EC], 1
jmp	short loc_5E6509

loc_5E64FF:
mov	[ebp+var_EC], 0

loc_5E6509:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5E651E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5E651E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5E6580
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5E6556
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	loc_5E6777
jmp	short loc_5E657B

loc_5E6556:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	loc_5E6777

loc_5E657B:
jmp	loc_5E6777

loc_5E6580:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5E6618
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E6605
jb	short loc_5E65F9
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E6605

loc_5E65F9:
mov	[ebp+var_F8], 1
jmp	short loc_5E660F

loc_5E6605:
mov	[ebp+var_F8], 0

loc_5E660F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5E6618:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5E66B5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5E66B5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5E66A9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E6694
jb	short loc_5E6688
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E6694

loc_5E6688:
mov	[ebp+var_104], 1
jmp	short loc_5E669E

loc_5E6694:
mov	[ebp+var_104], 0

loc_5E669E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5E66B5

loc_5E66A9:
mov	[ebp+var_108], 1
jmp	short loc_5E66BF

loc_5E66B5:
mov	[ebp+var_108], 0

loc_5E66BF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5E66D4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5E66D4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5E672D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5E6709
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	short loc_5E6777
jmp	short loc_5E672B

loc_5E6709:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8700
mov	eax, [ebp+arg_0]
jmp	short loc_5E6777

loc_5E672B:
jmp	short loc_5E6777

loc_5E672D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5E674B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5E6777
jmp	short loc_5E6777

loc_5E674B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8870
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5E6777:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E6070 endp

align 10h


; Attributes: bp-based frame

sub_5E6780 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5E6A35
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E67E9
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8BD0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87

loc_5E67E9:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E6838
jb	short loc_5E682C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E6838

loc_5E682C:
mov	[ebp+var_AC], 1
jmp	short loc_5E6842

loc_5E6838:
mov	[ebp+var_AC], 0

loc_5E6842:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5E687D
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87
jmp	loc_5E6A30

loc_5E687D:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E68CC
jb	short loc_5E68C0
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E68CC

loc_5E68C0:
mov	[ebp+var_B8], 1
jmp	short loc_5E68D6

loc_5E68CC:
mov	[ebp+var_B8], 0

loc_5E68D6:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5E68FA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87

loc_5E68FA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5E6944
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87

loc_5E6944:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E6993
jb	short loc_5E6987
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E6993

loc_5E6987:
mov	[ebp+var_C4], 1
jmp	short loc_5E699D

loc_5E6993:
mov	[ebp+var_C4], 0

loc_5E699D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5E6A05
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5E69DE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87
jmp	short loc_5E6A03

loc_5E69DE:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87

loc_5E6A03:
jmp	short loc_5E6A30

loc_5E6A05:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8BD0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87

loc_5E6A30:
jmp	loc_5E6E87

loc_5E6A35:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5E6B11
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E6A99
jb	short loc_5E6A8D
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E6A99

loc_5E6A8D:
mov	[ebp+var_D0], 1
jmp	short loc_5E6AA3

loc_5E6A99:
mov	[ebp+var_D0], 0

loc_5E6AA3:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5E6AE1
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87
jmp	short loc_5E6B0C

loc_5E6AE1:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8BD0
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87

loc_5E6B0C:
jmp	loc_5E6E87

loc_5E6B11:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E6B7A
jb	short loc_5E6B6E
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E6B7A

loc_5E6B6E:
mov	[ebp+var_DC], 1
jmp	short loc_5E6B84

loc_5E6B7A:
mov	[ebp+var_DC], 0

loc_5E6B84:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5E6C0F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5E6BEE
jb	short loc_5E6BE2
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5E6BEE

loc_5E6BE2:
mov	[ebp+var_E8], 1
jmp	short loc_5E6BF8

loc_5E6BEE:
mov	[ebp+var_E8], 0

loc_5E6BF8:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5E6C0F
mov	[ebp+var_EC], 1
jmp	short loc_5E6C19

loc_5E6C0F:
mov	[ebp+var_EC], 0

loc_5E6C19:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5E6C2E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5E6C2E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5E6C90
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5E6C66
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87
jmp	short loc_5E6C8B

loc_5E6C66:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	loc_5E6E87

loc_5E6C8B:
jmp	loc_5E6E87

loc_5E6C90:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5E6D28
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E6D15
jb	short loc_5E6D09
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E6D15

loc_5E6D09:
mov	[ebp+var_F8], 1
jmp	short loc_5E6D1F

loc_5E6D15:
mov	[ebp+var_F8], 0

loc_5E6D1F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5E6D28:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5E6DC5
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5E6DC5
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5E6DB9
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E6DA4
jb	short loc_5E6D98
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E6DA4

loc_5E6D98:
mov	[ebp+var_104], 1
jmp	short loc_5E6DAE

loc_5E6DA4:
mov	[ebp+var_104], 0

loc_5E6DAE:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5E6DC5

loc_5E6DB9:
mov	[ebp+var_108], 1
jmp	short loc_5E6DCF

loc_5E6DC5:
mov	[ebp+var_108], 0

loc_5E6DCF:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5E6DE4
and	[ebp+var_4C], 0FFFFFFFDh

loc_5E6DE4:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5E6E3D
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5E6E19
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	short loc_5E6E87
jmp	short loc_5E6E3B

loc_5E6E19:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5E8A60
mov	eax, [ebp+arg_0]
jmp	short loc_5E6E87

loc_5E6E3B:
jmp	short loc_5E6E87

loc_5E6E3D:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5E6E5B
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5E6E87
jmp	short loc_5E6E87

loc_5E6E5B:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5E8BD0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5E6E87:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5E6780 endp

align 10h


; Attributes: bp-based frame

sub_5E6E90 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5E6EAA

loc_5E6EA1:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_5E6EAA:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_5E6ECD
mov	[ebp+var_8], 80h
push	20h
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_5A9600
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_5E6EA1

loc_5E6ECD:
mov	esp, ebp
pop	ebp
retn	8
sub_5E6E90 endp

align 10h


; Attributes: bp-based frame

sub_5E6EE0 proc	near

var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 120h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_11C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_120]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5E6F21

loc_5E6F12:
mov	ecx, [ebp+var_120]
sub	ecx, 28h
mov	[ebp+var_120], ecx

loc_5E6F21:
mov	edx, [ebp+var_120]
xor	eax, eax
cmp	edx, [ebp+var_11C]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E6F5C
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_120]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 28h
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_5E9730
jmp	short loc_5E6F12

loc_5E6F5C:
mov	esp, ebp
pop	ebp
retn
sub_5E6EE0 endp



; Attributes: bp-based frame

sub_5E6F60 proc	near

var_C= word ptr	-0Ch
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 2Ch
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5E6F88

loc_5E6F7F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5E6F88:
cmp	[ebp+var_8], 0
jle	short loc_5E6FCC
xor	eax, eax
mov	byte ptr [ebp+var_C+1],	al
mov	cl, byte ptr [ebp+var_C+1]
mov	[ebp+var_9], cl
xor	edx, edx
mov	byte ptr [ebp+var_C], dl
mov	al, byte ptr [ebp+var_C]
mov	[ebp+var_A], al
lea	ecx, [ebp+var_A]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_5E6FE0
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 2Ch
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
add	edx, 2Ch
mov	[ebp+var_4], edx
jmp	short loc_5E6F7F

loc_5E6FCC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E6F60 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E6FE0(void *, int)
sub_5E6FE0 proc	near

var_34=	dword ptr -34h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E6FE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_5E707E
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	ecx, [ecx+8]
mov	[edx+8], ecx
mov	edx, [ebp+arg_4]
add	edx, 0Ch
mov	eax, [ebp+var_10]
add	eax, 0Ch
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_4]
add	eax, 1Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 1Ch
call	sub_44D270
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_4]
mov	eax, [edx+28h]
mov	[ecx+28h], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	[ebp+var_34], ecx
jmp	short loc_5E7085

loc_5E707E:
mov	[ebp+var_34], 0

loc_5E7085:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5E6FE0 endp

align 10h


; Attributes: bp-based frame

sub_5E70A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 20h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5E8EA0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5E70A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E70E0(void *, int)
sub_5E70E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5E7147
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5E7119
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA80

loc_5E7119:
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ecx], eax
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_5E713F
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_40AA80

loc_5E713F:
mov	eax, [ebp+var_4]
mov	[ebp+var_C], eax
jmp	short loc_5E714E

loc_5E7147:
mov	[ebp+var_C], 0

loc_5E714E:
mov	esp, ebp
pop	ebp
retn
sub_5E70E0 endp

align 10h


; Attributes: bp-based frame

sub_5E7160 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_2C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5E7178:
cmp	[ebp+var_8], 0
jz	short loc_5E71C4
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_14]
cmp	edx, [ebp+var_18]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5E71B9
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5E71C2

loc_5E71B9:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5E71C2:
jmp	short loc_5E7178

loc_5E71C4:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_2C]
jz	short loc_5E71FC
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_28]
sbb	edx, edx
neg	edx
movzx	eax, dl
test	eax, eax
jz	short loc_5E71FC
mov	ecx, [ebp+var_2C]
mov	[ebp+var_4], ecx

loc_5E71FC:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E7160 endp

align 10h


; Attributes: bp-based frame

sub_5E7210 proc	near

var_8C=	dword ptr -8Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8C], ecx
jmp	short loc_5E7238

loc_5E7229:
mov	edx, [ebp+var_8C]
add	edx, 10h
mov	[ebp+var_8C], edx

loc_5E7238:
mov	eax, [ebp+var_8C]
cmp	eax, [ebp+arg_4]
jz	short loc_5E726E
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8C]
add	ecx, 4
call	sub_5E00C0
xor	edx, edx
and	edx, 1
jz	short loc_5E726C
mov	eax, [ebp+var_8C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E726C:
jmp	short loc_5E7229

loc_5E726E:
mov	esp, ebp
pop	ebp
retn
sub_5E7210 endp

align 10h


; Attributes: bp-based frame

sub_5E7280 proc	near

var_48=	dword ptr -48h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_48]
add	ecx, 4
call	sub_4710C0
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_48]
add	ecx, 10h
call	sub_4710C0
mov	edx, [ebp+arg_0]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_48]
add	ecx, 1Ch
call	sub_5DFEF0
mov	eax, [ebp+var_48]
mov	esp, ebp
pop	ebp
retn	4
sub_5E7280 endp

align 10h


; Attributes: bp-based frame

sub_5E72E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 4
call	sub_5D2690
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_5D2690
mov	edx, [ebp+arg_0]
add	edx, 1Ch
push	edx
mov	ecx, [ebp+var_4]
add	ecx, 1Ch
call	sub_5E77E0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E72E0 endp



; Attributes: bp-based frame

sub_5E7330 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 1
push	eax
mov	ecx, [ebp+var_28]
call	sub_489500
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_28]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	sub_407C50
add	esp, 0Ch
mov	edx, [ebp+var_28]
mov	[edx+4], eax
mov	eax, [ebp+var_28]
mov	esp, ebp
pop	ebp
retn	4
sub_5E7330 endp

align 10h


; Attributes: bp-based frame

sub_5E73A0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_503180
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5CA090
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E73A0 endp

align 10h


; Attributes: bp-based frame

sub_5E73F0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_54], eax
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5E7463
mov	ecx, [ebp+var_54]
imul	ecx, 34h
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E7463:
mov	esp, ebp
pop	ebp
retn
sub_5E73F0 endp

align 10h


; Attributes: bp-based frame

sub_5E7470 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
push	eax
mov	ecx, [ebp+var_70]
call	sub_5E7700
xor	edx, edx
mov	[ebp+var_2], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_1C]
sub	eax, [ebp+var_68]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_2C], eax
jmp	short loc_5E74DF

loc_5E74D6:
mov	edx, [ebp+var_2C]
sub	edx, 1
mov	[ebp+var_2C], edx

loc_5E74DF:
cmp	[ebp+var_2C], 0
jle	short loc_5E7509
mov	eax, [ebp+var_68]
push	eax		; int
mov	ecx, [ebp+var_28]
push	ecx		; void *
call	sub_5E7DF0
add	esp, 8
mov	edx, [ebp+var_68]
add	edx, 28h
mov	[ebp+var_68], edx
mov	eax, [ebp+var_28]
add	eax, 28h
mov	[ebp+var_28], eax
jmp	short loc_5E74D6

loc_5E7509:
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_28]
mov	[ecx+4], edx
mov	eax, [ebp+var_70]
mov	esp, ebp
pop	ebp
retn	4
sub_5E7470 endp

align 10h


; Attributes: bp-based frame

sub_5E7520 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A0h
mov	[ebp+var_A0], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E3580
add	esp, 8
mov	edx, [ebp+var_A0]
mov	eax, [ebp+var_A0]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_A0]
mov	eax, [edx]
mov	[ebp+var_98], eax
cmp	[ebp+var_98], 0
jz	short loc_5E75B7
mov	ecx, [ebp+var_9C]
imul	ecx, 28h
push	ecx		; int
mov	edx, [ebp+var_98]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E75B7:
mov	esp, ebp
pop	ebp
retn
sub_5E7520 endp

align 10h


; Attributes: bp-based frame

sub_5E75C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 4
mov	[ebp+var_8], edx
mov	[ebp+var_C], 0FFFFFFFh
mov	[ebp+var_10], 0FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_5E75F8
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_5E75FE

loc_5E75F8:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_5E75FE:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_5E7611
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_5E7611:
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+arg_0]
push	edx
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_8]
add	ecx, [eax]
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 0FFFFFFFh
mov	[ebp+var_1C], 0FFFFFFFh
mov	edx, [ebp+var_1C]
cmp	edx, [ebp+var_18]
jnb	short loc_5E7647
mov	eax, [ebp+var_1C]
mov	[ebp+var_30], eax
jmp	short loc_5E764D

loc_5E7647:
mov	ecx, [ebp+var_18]
mov	[ebp+var_30], ecx

loc_5E764D:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_30]
ja	short loc_5E765D
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jnb	short loc_5E7687

loc_5E765D:
mov	[ebp+var_20], 0FFFFFFFh
mov	[ebp+var_24], 0FFFFFFFh
mov	ecx, [ebp+var_24]
cmp	ecx, [ebp+var_20]
jnb	short loc_5E767B
mov	edx, [ebp+var_24]
mov	[ebp+var_34], edx
jmp	short loc_5E7681

loc_5E767B:
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax

loc_5E7681:
mov	ecx, [ebp+var_34]
mov	[ebp+var_4], ecx

loc_5E7687:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E75C0 endp



; Attributes: bp-based frame

sub_5E7690 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_5E8F50
add	esp, 8
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_5C]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_54], eax
cmp	[ebp+var_54], 0
jz	short loc_5E76FC
mov	ecx, [ebp+var_58]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_54]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5E76FC:
mov	esp, ebp
pop	ebp
retn
sub_5E7690 endp



; Attributes: bp-based frame

sub_5E7700 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+var_18]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
add	edx, 8
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_4DEED0
mov	ecx, [ebp+var_18]
mov	[ecx], eax
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	edx, [ebp+arg_0]
imul	edx, 28h
mov	eax, [ebp+var_18]
add	edx, [eax]
mov	ecx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	8
sub_5E7700 endp

align 10h


; Attributes: bp-based frame

sub_5E7770 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_0], 6666666h
jbe	short loc_5E7796
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5E7796:
cmp	[ebp+arg_0], 0
jz	short loc_5E77CA
mov	eax, [ebp+arg_0]
imul	eax, 28h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 28h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_5E77CC

loc_5E77CA:
xor	eax, eax

loc_5E77CC:
mov	esp, ebp
pop	ebp
retn	8
sub_5E7770 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5E77E0 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_98]
jz	loc_5E7A04
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_5E78BF
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_98]
add	ecx, 8
call	sub_5AB2F0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_51EF50
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_98]
call	sub_5E73F0
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 34h
mov	eax, [ebp+var_98]
add	edx, [eax]
mov	ecx, [ebp+var_98]
mov	[ecx+8], edx
jmp	loc_5E79ED

loc_5E78BF:
mov	edx, [ebp+var_98]
mov	eax, [ebp+var_98]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 34h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_5E792D
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax]
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_70]
push	eax
mov	ecx, [ebp+var_6C]
push	ecx
mov	edx, [ebp+var_68]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_10], eax
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
mov	[ebp+var_78], ecx
xor	edx, edx
mov	[ebp+var_71], dl
jmp	loc_5E79ED

loc_5E792D:
xor	eax, eax
mov	[ebp+var_12], al
mov	ecx, [ebp+var_98]
mov	edx, [ecx]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_98]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 34h
idiv	ecx
imul	eax, 34h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_84], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+var_80]
push	ecx
call	sub_406610
add	esp, 0Ch
xor	edx, edx
mov	[ebp+var_13], dl
mov	eax, [ebp+var_98]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_98]
mov	edx, [ebp+var_98]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 34h
idiv	ecx
imul	eax, 34h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+var_8C]
push	edx
call	sub_407C50
add	esp, 0Ch

loc_5E79ED:
mov	eax, [ebp+var_4]
imul	eax, 34h
mov	ecx, [ebp+var_98]
add	eax, [ecx]
mov	edx, [ebp+var_98]
mov	[edx+4], eax

loc_5E7A04:
mov	eax, [ebp+var_98]
mov	esp, ebp
pop	ebp
retn	4
sub_5E77E0 endp



; Attributes: bp-based frame

sub_5E7A10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	word ptr -12h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
push	edi
mov	eax, [ebp+arg_4]
imul	eax, 34h
add	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 34h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5E7A4F

loc_5E7A3D:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx
mov	eax, [ebp+var_C]
add	eax, 34h
mov	[ebp+var_C], eax

loc_5E7A4F:
cmp	[ebp+var_10], 0
jle	short loc_5E7A95
xor	ecx, ecx
mov	byte ptr [ebp+var_14+1], cl
mov	dl, byte ptr [ebp+var_14+1]
mov	byte ptr [ebp+var_12+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_14], al
mov	cl, byte ptr [ebp+var_14]
mov	byte ptr [ebp+var_12], cl
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 0
jz	short loc_5E7A8C
mov	esi, [ebp+arg_8]
mov	ecx, 0Dh
mov	edi, [ebp+var_18]
rep movsd
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
jmp	short loc_5E7A93

loc_5E7A8C:
mov	[ebp+var_1C], 0

loc_5E7A93:
jmp	short loc_5E7A3D

loc_5E7A95:
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5E7A10 endp

align 10h


; Attributes: bp-based frame

sub_5E7AA0 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D8], ecx
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_D8]
jz	loc_5E7DD8
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_D8]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
cmp	[ebp+var_4], eax
jbe	loc_5E7B7F
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_20], ecx
xor	edx, edx
mov	[ebp+var_19], dl
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_D8]
add	ecx, 8
call	sub_5E7770
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_5E97F0
add	esp, 0Ch
mov	edx, [ebp+var_18]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D8]
call	sub_5E7520
mov	eax, [ebp+var_D8]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_8]
imul	edx, 28h
mov	eax, [ebp+var_D8]
add	edx, [eax]
mov	ecx, [ebp+var_D8]
mov	[ecx+8], edx
jmp	loc_5E7DC1

loc_5E7B7F:
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_D8]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	loc_5E7C33
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_D8]
mov	ecx, [eax]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_7C]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_78]
sub	eax, [ebp+var_6C]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_68], eax
jmp	short loc_5E7BEC

loc_5E7BE3:
mov	edx, [ebp+var_68]
sub	edx, 1
mov	[ebp+var_68], edx

loc_5E7BEC:
cmp	[ebp+var_68], 0
jle	short loc_5E7C12
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+var_70]
call	sub_5E72E0
mov	ecx, [ebp+var_6C]
add	ecx, 28h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
add	edx, 28h
mov	[ebp+var_70], edx
jmp	short loc_5E7BE3

loc_5E7C12:
mov	eax, [ebp+var_70]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_5E3620
add	esp, 8
jmp	loc_5E7DC1

loc_5E7C33:
xor	ecx, ecx
mov	[ebp+var_12], cl
mov	edx, [ebp+var_D8]
mov	eax, [edx]
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
imul	eax, 28h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_9C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_A0]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_98]
mov	[ebp+var_90], eax
mov	eax, [ebp+var_9C]
sub	eax, [ebp+var_90]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8C], eax
jmp	short loc_5E7CBB

loc_5E7CAC:
mov	edx, [ebp+var_8C]
sub	edx, 1
mov	[ebp+var_8C], edx

loc_5E7CBB:
cmp	[ebp+var_8C], 0
jle	short loc_5E7CF6
mov	eax, [ebp+var_90]
push	eax
mov	ecx, [ebp+var_94]
call	sub_5E72E0
mov	ecx, [ebp+var_90]
add	ecx, 28h
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_94]
add	edx, 28h
mov	[ebp+var_94], edx
jmp	short loc_5E7CAC

loc_5E7CF6:
xor	eax, eax
mov	[ebp+var_13], al
mov	ecx, [ebp+var_D8]
mov	edx, [ecx+4]
mov	[ebp+var_D4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_D8]
mov	eax, [ebp+var_D8]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
imul	eax, 28h
mov	edx, [ebp+arg_0]
add	eax, [edx]
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_D4]
mov	[ebp+var_A8], ecx
mov	eax, [ebp+var_D0]
sub	eax, [ebp+var_C8]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_AC], eax
jmp	short loc_5E7D82

loc_5E7D73:
mov	edx, [ebp+var_AC]
sub	edx, 1
mov	[ebp+var_AC], edx

loc_5E7D82:
cmp	[ebp+var_AC], 0
jle	short loc_5E7DC1
mov	eax, [ebp+var_C8]
push	eax		; int
mov	ecx, [ebp+var_A8]
push	ecx		; void *
call	sub_5E7DF0
add	esp, 8
mov	edx, [ebp+var_C8]
add	edx, 28h
mov	[ebp+var_C8], edx
mov	eax, [ebp+var_A8]
add	eax, 28h
mov	[ebp+var_A8], eax
jmp	short loc_5E7D73

loc_5E7DC1:
mov	ecx, [ebp+var_4]
imul	ecx, 28h
mov	edx, [ebp+var_D8]
add	ecx, [edx]
mov	eax, [ebp+var_D8]
mov	[eax+4], ecx

loc_5E7DD8:
mov	eax, [ebp+var_D8]
mov	esp, ebp
pop	ebp
retn	4
sub_5E7AA0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E7DF0(void *, int)
sub_5E7DF0 proc	near

var_48=	dword ptr -48h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5E7E34
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5E7280
mov	[ebp+var_48], eax
jmp	short loc_5E7E3B

loc_5E7E34:
mov	[ebp+var_48], 0

loc_5E7E3B:
mov	esp, ebp
pop	ebp
retn
sub_5E7DF0 endp

align 10h


; Attributes: bp-based frame

sub_5E7E40 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5E6F60
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5E7E40 endp

align 10h


; Attributes: bp-based frame

sub_5E7E90 proc	near

var_6C=	dword ptr -6Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E7E90
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_6C], ecx
jmp	short loc_5E7EC1

loc_5E7EB8:
mov	edx, [ebp+var_6C]
add	edx, 2Ch
mov	[ebp+var_6C], edx

loc_5E7EC1:
mov	eax, [ebp+var_6C]
cmp	eax, [ebp+arg_4]
jz	short loc_5E7EFC
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_6C]
add	ecx, 1Ch
call	sub_436CF0
xor	edx, edx
and	edx, 1
jz	short loc_5E7EFA
mov	eax, [ebp+var_6C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E7EFA:
jmp	short loc_5E7EB8

loc_5E7EFC:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5E7E90 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E7F10(void *, int)
sub_5E7F10 proc	near

var_64=	dword ptr -64h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5E7F67
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_5E7470
mov	eax, [ebp+var_8]
mov	[ebp+var_64], eax
jmp	short loc_5E7F6E

loc_5E7F67:
mov	[ebp+var_64], 0

loc_5E7F6E:
mov	esp, ebp
pop	ebp
retn
sub_5E7F10 endp

align 10h


; Attributes: bp-based frame

sub_5E7F80 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5E93D0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5E7F80 endp

align 10h


; Attributes: bp-based frame

sub_5E7FB0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5E7FF7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E9040
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5E80A9

loc_5E7FF7:
cmp	[ebp+arg_10], 0
jnz	short loc_5E802E
cmp	[ebp+arg_C], 0
jnz	short loc_5E8025
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E802E

loc_5E8025:
mov	[ebp+var_34], 1
jmp	short loc_5E8035

loc_5E802E:
mov	[ebp+var_34], 0

loc_5E8035:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5E8047
and	[ebp+var_C], 0FFFFFFFEh

loc_5E8047:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5E807D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5E9040
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5E807B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5E807B:
jmp	short loc_5E80A9

loc_5E807D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5E9040
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5E80A9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5E80A9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E7FB0 endp

align 10h


; Attributes: bp-based frame

sub_5E80F0 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5E810C:
cmp	[ebp+var_10], 0
jz	short loc_5E8156
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5E8145
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5E814E

loc_5E8145:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5E814E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5E810C

loc_5E8156:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5E81F8
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5E81E9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5E7FB0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5E8271
jmp	short loc_5E81F8

loc_5E81E9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5E81F8:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5E8256
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5E7FB0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5E8271

loc_5E8256:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5E8271:
mov	esp, ebp
pop	ebp
retn	8
sub_5E80F0 endp

align 10h


; Attributes: bp-based frame

sub_5E8280 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5E82C7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_47EE10
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5E837A

loc_5E82C7:
cmp	[ebp+arg_10], 0
jnz	short loc_5E82FF
cmp	[ebp+arg_C], 0
jnz	short loc_5E82F6
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E82FF

loc_5E82F6:
mov	[ebp+var_34], 1
jmp	short loc_5E8306

loc_5E82FF:
mov	[ebp+var_34], 0

loc_5E8306:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5E8318
and	[ebp+var_C], 0FFFFFFFEh

loc_5E8318:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5E834E
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_47EE10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5E834C
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5E834C:
jmp	short loc_5E837A

loc_5E834E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_47EE10
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5E837A
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5E837A:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E8280 endp

align 10h


; Attributes: bp-based frame

sub_5E83C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5E8407
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E90A0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5E84B9

loc_5E8407:
cmp	[ebp+arg_10], 0
jnz	short loc_5E843E
cmp	[ebp+arg_C], 0
jnz	short loc_5E8435
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	edx, [eax]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E843E

loc_5E8435:
mov	[ebp+var_34], 1
jmp	short loc_5E8445

loc_5E843E:
mov	[ebp+var_34], 0

loc_5E8445:
mov	dl, byte ptr [ebp+var_34]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5E8457
and	[ebp+var_C], 0FFFFFFFEh

loc_5E8457:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5E848D
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5E90A0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5E848B
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5E848B:
jmp	short loc_5E84B9

loc_5E848D:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5E90A0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5E84B9
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5E84B9:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_30]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_30]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E83C0 endp

align 10h


; Attributes: bp-based frame

sub_5E8500 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5E851C:
cmp	[ebp+var_10], 0
jz	short loc_5E8566
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	ecx, [edx]
cmp	ecx, [eax]
sbb	edx, edx
neg	edx
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5E8555
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_5C], edx
jmp	short loc_5E855E

loc_5E8555:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_5C], ecx

loc_5E855E:
mov	edx, [ebp+var_5C]
mov	[ebp+var_10], edx
jmp	short loc_5E851C

loc_5E8566:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_5E8608
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_5D], dl
movzx	eax, [ebp+var_5D]
test	eax, eax
jz	short loc_5E85F9
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5E83C0
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_5E8681
jmp	short loc_5E8608

loc_5E85F9:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5E8608:
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
cmp	eax, [edx]
sbb	ecx, ecx
neg	ecx
mov	[ebp+var_25], cl
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_5E8666
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5E83C0
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_5E8681

loc_5E8666:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_5E8681:
mov	esp, ebp
pop	ebp
retn	8
sub_5E8500 endp

align 10h


; Attributes: bp-based frame

sub_5E8690 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5E86E7
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5E86DF
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_5E86DF:
mov	eax, [ebp+var_8]
mov	[ebp+var_10], eax
jmp	short loc_5E86EE

loc_5E86E7:
mov	[ebp+var_10], 0

loc_5E86EE:
mov	esp, ebp
pop	ebp
retn
sub_5E8690 endp

align 10h


; Attributes: bp-based frame

sub_5E8700 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5E8747
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E90F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5E8824

loc_5E8747:
cmp	[ebp+arg_10], 0
jnz	short loc_5E87A9
cmp	[ebp+arg_C], 0
jnz	short loc_5E87A0
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E8791
jb	short loc_5E8788
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E8791

loc_5E8788:
mov	[ebp+var_3C], 1
jmp	short loc_5E8798

loc_5E8791:
mov	[ebp+var_3C], 0

loc_5E8798:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5E87A9

loc_5E87A0:
mov	[ebp+var_40], 1
jmp	short loc_5E87B0

loc_5E87A9:
mov	[ebp+var_40], 0

loc_5E87B0:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5E87C2
and	[ebp+var_C], 0FFFFFFFEh

loc_5E87C2:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5E87F8
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5E90F0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5E87F6
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5E87F6:
jmp	short loc_5E8824

loc_5E87F8:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E90F0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5E8824
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5E8824:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E8700 endp

align 10h


; Attributes: bp-based frame

sub_5E8870 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5E888C:
cmp	[ebp+var_10], 0
jz	short loc_5E8903
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E88D2
jb	short loc_5E88C9
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E88D2

loc_5E88C9:
mov	[ebp+var_64], 1
jmp	short loc_5E88D9

loc_5E88D2:
mov	[ebp+var_64], 0

loc_5E88D9:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5E88F2
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5E88FB

loc_5E88F2:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5E88FB:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5E888C

loc_5E8903:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5E89A5
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5E8996
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5E8700
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5E8A4B
jmp	short loc_5E89A5

loc_5E8996:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5E89A5:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E89DF
jb	short loc_5E89D6
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E89DF

loc_5E89D6:
mov	[ebp+var_78], 1
jmp	short loc_5E89E6

loc_5E89DF:
mov	[ebp+var_78], 0

loc_5E89E6:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5E8A30
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5E8700
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5E8A4B

loc_5E8A30:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5E8A4B:
mov	esp, ebp
pop	ebp
retn	8
sub_5E8870 endp

align 10h


; Attributes: bp-based frame

sub_5E8A60 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5E8AA7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E9140
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5E8B84

loc_5E8AA7:
cmp	[ebp+arg_10], 0
jnz	short loc_5E8B09
cmp	[ebp+arg_C], 0
jnz	short loc_5E8B00
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E8AF1
jb	short loc_5E8AE8
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E8AF1

loc_5E8AE8:
mov	[ebp+var_3C], 1
jmp	short loc_5E8AF8

loc_5E8AF1:
mov	[ebp+var_3C], 0

loc_5E8AF8:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5E8B09

loc_5E8B00:
mov	[ebp+var_40], 1
jmp	short loc_5E8B10

loc_5E8B09:
mov	[ebp+var_40], 0

loc_5E8B10:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5E8B22
and	[ebp+var_C], 0FFFFFFFEh

loc_5E8B22:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5E8B58
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5E9140
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5E8B56
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5E8B56:
jmp	short loc_5E8B84

loc_5E8B58:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5E9140
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5E8B84
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5E8B84:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5E8A60 endp

align 10h


; Attributes: bp-based frame

sub_5E8BD0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5E8BEC:
cmp	[ebp+var_10], 0
jz	short loc_5E8C63
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5E8C32
jb	short loc_5E8C29
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5E8C32

loc_5E8C29:
mov	[ebp+var_64], 1
jmp	short loc_5E8C39

loc_5E8C32:
mov	[ebp+var_64], 0

loc_5E8C39:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5E8C52
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5E8C5B

loc_5E8C52:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5E8C5B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5E8BEC

loc_5E8C63:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5E8D05
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5E8CF6
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5E8A60
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5E8DAB
jmp	short loc_5E8D05

loc_5E8CF6:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5E8D05:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5E8D3F
jb	short loc_5E8D36
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5E8D3F

loc_5E8D36:
mov	[ebp+var_78], 1
jmp	short loc_5E8D46

loc_5E8D3F:
mov	[ebp+var_78], 0

loc_5E8D46:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5E8D90
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5E8A60
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5E8DAB

loc_5E8D90:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5E8DAB:
mov	esp, ebp
pop	ebp
retn	8
sub_5E8BD0 endp

align 10h


; Attributes: bp-based frame

sub_5E8DC0 proc	near

var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E8DC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E8E00(void *, int)
sub_5E8E00 proc	near

var_4= word ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	[ebp+var_2], al
lea	ecx, [ebp+var_2]
push	ecx
mov	edx, [ebp+arg_4]
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_5E6FE0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E8E00 endp

align 10h


; Attributes: bp-based frame

sub_5E8E40 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8Ch
jmp	short loc_5E8E54

loc_5E8E4B:
mov	eax, [ebp+arg_0]
sub	eax, 10h
mov	[ebp+arg_0], eax

loc_5E8E54:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5E8E9A
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 10h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_5E00C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5E8E98
mov	edx, [ebp+var_8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E8E98:
jmp	short loc_5E8E4B

loc_5E8E9A:
mov	esp, ebp
pop	ebp
retn
sub_5E8E40 endp

align 10h


; Attributes: bp-based frame

sub_5E8EA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
jmp	short loc_5E8EB1

loc_5E8EA8:
mov	eax, [ebp+arg_0]
sub	eax, 8
mov	[ebp+arg_0], eax

loc_5E8EB1:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5E8F19
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 8
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
cmp	dword ptr [edx], 0
jz	short loc_5E8EF2
mov	eax, [ebp+var_C]
mov	ecx, [eax]
call	sub_40AA90

loc_5E8EF2:
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_5E8F04
mov	edx, [ebp+var_8]
mov	ecx, [edx]
call	sub_40AA90

loc_5E8F04:
xor	eax, eax
and	eax, 1
jz	short loc_5E8F17
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E8F17:
jmp	short loc_5E8EA8

loc_5E8F19:
mov	esp, ebp
pop	ebp
retn
sub_5E8EA0 endp

align 10h


; Attributes: bp-based frame

sub_5E8F20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 98h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5E9530
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E8F20 endp

align 10h


; Attributes: bp-based frame

sub_5E8F50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5E9570
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5E8F50 endp

align 10h


; Attributes: bp-based frame

sub_5E8F80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5E8FA4
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_40AA90

loc_5E8FA4:
mov	esp, ebp
pop	ebp
retn
sub_5E8F80 endp

align 10h


; Attributes: bp-based frame

sub_5E8FB0 proc	near

var_13C= dword ptr -13Ch

push	ebp
mov	ebp, esp
sub	esp, 13Ch
mov	[ebp+var_13C], ecx
mov	ecx, [ebp+var_13C]
add	ecx, 8
call	sub_5E8FE0
mov	esp, ebp
pop	ebp
retn
sub_5E8FB0 endp

align 10h


; Attributes: bp-based frame

sub_5E8FE0 proc	near

var_160= dword ptr -160h

push	ebp
mov	ebp, esp
sub	esp, 160h
mov	[ebp+var_160], ecx
mov	ecx, [ebp+var_160]
add	ecx, 30h
call	sub_488200
mov	ecx, [ebp+var_160]
add	ecx, 24h
call	sub_555450
mov	ecx, [ebp+var_160]
add	ecx, 18h
call	sub_555750
mov	ecx, [ebp+var_160]
add	ecx, 0Ch
call	sub_487140
mov	ecx, [ebp+var_160]
call	sub_487140
mov	esp, ebp
pop	ebp
retn
sub_5E8FE0 endp

align 10h


; Attributes: bp-based frame

sub_5E9040 proc	near

var_20=	dword ptr -20h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
push	1
mov	ecx, [ebp+var_20]
call	sub_5DDE90
mov	[ebp+var_4], eax
xor	eax, eax
mov	[ebp+var_13], al
mov	cl, [ebp+var_13]
mov	[ebp+var_11], cl
xor	edx, edx
mov	[ebp+var_14], dl
mov	al, [ebp+var_14]
mov	[ebp+var_12], al
lea	ecx, [ebp+var_12]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; void *
call	sub_5E9820
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9040 endp



; Attributes: bp-based frame

sub_5E90A0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5E95E0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E90A0 endp

align 10h


; Attributes: bp-based frame

sub_5E90F0 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_5E9230
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5E9650
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E90F0 endp

align 10h


; Attributes: bp-based frame

sub_5E9140 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_595E40
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5E96C0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9140 endp

align 10h


; Attributes: bp-based frame

sub_5E9190 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_5E91D3
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_5E91D3
mov	eax, [ebp+var_8]
shl	eax, 4
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5E91D3:
mov	esp, ebp
pop	ebp
retn
sub_5E9190 endp

align 10h


; Attributes: bp-based frame

sub_5E91E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0
jz	short loc_5E9223
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 3
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_5E9223
mov	eax, [ebp+var_8]
shl	eax, 3
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5E9223:
mov	esp, ebp
pop	ebp
retn
sub_5E91E0 endp

align 10h


; Attributes: bp-based frame

sub_5E9230 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], (offset off_1555554+1)
jbe	short loc_5E9256
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5E9256:
cmp	[ebp+arg_0], 0
jz	short loc_5E927F
mov	eax, [ebp+arg_0]
imul	eax, 0C0h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5E9286

loc_5E927F:
mov	[ebp+var_C], 0

loc_5E9286:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9230 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E9290(void	*, int)
sub_5E9290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
cmp	[ebp+arg_0], 0
jz	short loc_5E92B0
mov	eax, [ebp+arg_4]
shl	eax, 4
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5E92B0:
mov	esp, ebp
pop	ebp
retn	8
sub_5E9290 endp

align 10h


; Attributes: bp-based frame

sub_5E92C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5E92F1

loc_5E92DF:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
add	eax, 28h
mov	[ebp+var_4], eax

loc_5E92F1:
cmp	[ebp+var_8], 0
jle	short loc_5E9309
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	sub_5E7DF0
add	esp, 8
jmp	short loc_5E92DF

loc_5E9309:
mov	esp, ebp
pop	ebp
retn
sub_5E92C0 endp

align 10h


; Attributes: bp-based frame

sub_5E9310 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8], eax
jmp	short loc_5E9338

loc_5E932F:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5E9338:
cmp	[ebp+var_8], 0
jle	short loc_5E9362
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_5E7DF0
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 28h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 28h
mov	[ebp+var_4], eax
jmp	short loc_5E932F

loc_5E9362:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E9310 endp

align 10h


; Attributes: bp-based frame

sub_5E9370 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 4
mov	[ebp+var_8], ecx
jmp	short loc_5E9393

loc_5E938A:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5E9393:
cmp	[ebp+var_8], 0
jle	short loc_5E93BD
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_5E7F10
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_4], eax
jmp	short loc_5E938A

loc_5E93BD:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E9370 endp

align 10h


; Attributes: bp-based frame

sub_5E93D0 proc	near

var_60=	dword ptr -60h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_60], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_60]
sar	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_5E940F

loc_5E9406:
mov	ecx, [ebp+var_10]
sub	ecx, 1
mov	[ebp+var_10], ecx

loc_5E940F:
cmp	[ebp+var_10], 0
jle	short loc_5E9439
mov	edx, [ebp+var_60]
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_5E7F10
add	esp, 8
mov	ecx, [ebp+var_60]
add	ecx, 10h
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_C], edx
jmp	short loc_5E9406

loc_5E9439:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5E93D0 endp



; Attributes: bp-based frame

sub_5E9440 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5E9458:
cmp	[ebp+var_8], 0
jz	short loc_5E94C3
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5E9498
jb	short loc_5E948F
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5E9498

loc_5E948F:
mov	[ebp+var_20], 1
jmp	short loc_5E949F

loc_5E9498:
mov	[ebp+var_20], 0

loc_5E949F:
movzx	eax, byte ptr [ebp+var_20]
test	eax, eax
jnz	short loc_5E94B8
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5E94C1

loc_5E94B8:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5E94C1:
jmp	short loc_5E9458

loc_5E94C3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9440 endp

align 10h


; Attributes: bp-based frame

sub_5E94D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_8], ecx
jmp	short loc_5E94F3

loc_5E94EA:
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx

loc_5E94F3:
cmp	[ebp+var_8], 0
jle	short loc_5E951D
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5E8690
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
jmp	short loc_5E94EA

loc_5E951D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E94D0 endp

align 10h


; Attributes: bp-based frame

sub_5E9530 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A0h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_5E8E40
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5E9530 endp

align 10h


; Attributes: bp-based frame

sub_5E9570 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_24]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_28]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5E95A2

loc_5E9599:
mov	ecx, [ebp+var_28]
sub	ecx, 4
mov	[ebp+var_28], ecx

loc_5E95A2:
mov	edx, [ebp+var_28]
xor	eax, eax
cmp	edx, [ebp+var_24]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5E95D4
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_28]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 4
mov	[ebp+var_1C], ecx
push	0
mov	ecx, [ebp+var_1C]
call	sub_5E9790
jmp	short loc_5E9599

loc_5E95D4:
mov	esp, ebp
pop	ebp
retn
sub_5E9570 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E95E0(void *, int)
sub_5E95E0 proc	near

var_44=	dword ptr -44h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5E9637
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_8]
add	ecx, 4
call	sub_5E3D90
mov	eax, [ebp+var_8]
mov	[ebp+var_44], eax
jmp	short loc_5E963E

loc_5E9637:
mov	[ebp+var_44], 0

loc_5E963E:
mov	esp, ebp
pop	ebp
retn
sub_5E95E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E9650(void *, int)
sub_5E9650 proc	near

var_28=	dword ptr -28h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0B0h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5E96B0
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_5E3C90
mov	edx, [ebp+var_8]
mov	[ebp+var_28], edx
jmp	short loc_5E96B7

loc_5E96B0:
mov	[ebp+var_28], 0

loc_5E96B7:
mov	esp, ebp
pop	ebp
retn
sub_5E9650 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E96C0(void *, int)
sub_5E96C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	78h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5E971D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_57F960
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5E9724

loc_5E971D:
mov	[ebp+var_C], 0

loc_5E9724:
mov	esp, ebp
pop	ebp
retn
sub_5E96C0 endp

align 10h


; Attributes: bp-based frame

sub_5E9730 proc	near

var_100= dword ptr -100h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_100], ecx
mov	ecx, [ebp+var_100]
add	ecx, 1Ch
call	sub_5DFF60
mov	ecx, [ebp+var_100]
add	ecx, 10h
call	sub_468AA0
mov	ecx, [ebp+var_100]
add	ecx, 4
call	sub_468AA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9780
mov	ecx, [ebp+var_100]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5E9780:
mov	eax, [ebp+var_100]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9730 endp

align 10h


; Attributes: bp-based frame

sub_5E9790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
cmp	dword ptr [eax], 0
jz	short loc_5E97C7
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5E97C7
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	eax, [edx+4]
call	eax

loc_5E97C7:
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5E97DD
push	4
mov	edx, [ebp+var_8]
push	edx
call	sub_1111040
add	esp, 8

loc_5E97DD:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9790 endp

align 10h


; Attributes: bp-based frame

sub_5E97F0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_5E9890
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5E97F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E9820(void *, int)
sub_5E9820 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	eax		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5E987D
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+var_8]
cmp	dword ptr [edx], 0
jz	short loc_5E9875
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	edx, [ecx]
mov	ecx, eax
mov	eax, [edx]
call	eax

loc_5E9875:
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
jmp	short loc_5E9884

loc_5E987D:
mov	[ebp+var_C], 0

loc_5E9884:
mov	esp, ebp
pop	ebp
retn
sub_5E9820 endp

align 10h


; Attributes: bp-based frame

sub_5E9890 proc	near

var_58=	dword ptr -58h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
xor	eax, eax
mov	[ebp+var_3], al
mov	cl, [ebp+var_3]
mov	[ebp+var_1], cl
xor	edx, edx
mov	[ebp+var_4], dl
mov	al, [ebp+var_4]
mov	[ebp+var_2], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_58], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
sub	eax, [ebp+var_58]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_10], eax
jmp	short loc_5E98D4

loc_5E98CB:
mov	edx, [ebp+var_10]
sub	edx, 1
mov	[ebp+var_10], edx

loc_5E98D4:
cmp	[ebp+var_10], 0
jle	short loc_5E98FE
mov	eax, [ebp+var_58]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	sub_5E7DF0
add	esp, 8
mov	edx, [ebp+var_58]
add	edx, 28h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_C]
add	eax, 28h
mov	[ebp+var_C], eax
jmp	short loc_5E98CB

loc_5E98FE:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5E9890 endp

align 10h


; Attributes: bp-based frame

sub_5E9910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_8]
add	eax, 8
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403400
mov	ecx, [ebp+var_4]
or	ecx, 1
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9910 endp

align 10h


; Attributes: bp-based frame

sub_5E9950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B437A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9975
push	6Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E9975:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9950 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E9980(int, int, float, int)
sub_5E9980 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E9980
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_18], 0
push	0A8h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_5E99DB
mov	eax, [ebp+arg_C]
push	eax		; int
push	ecx		; float
fld	[ebp+arg_8]
fstp	[esp+24h+var_24]
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	ecx, [ebp+var_14]
call	sub_B472E0
mov	[ebp+var_1C], eax
jmp	short loc_5E99E2

loc_5E99DB:
mov	[ebp+var_1C], 0

loc_5E99E2:
mov	edx, [ebp+var_1C]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_5E9A09
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
call	sub_40AA80

loc_5E9A09:
mov	ecx, [ebp+var_18]
or	ecx, 1
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5E9980 endp

align 10h


; Attributes: bp-based frame

sub_5E9A30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B437A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9A58
push	0A8h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E9A58:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9A30 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E9A70(int, int, float, int)
sub_5E9A70 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E9A70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_18], 0
push	9Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_5E9ACB
mov	eax, [ebp+arg_C]
push	eax		; int
push	ecx		; float
fld	[ebp+arg_8]
fstp	[esp+24h+var_24]
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	ecx, [ebp+var_14]
call	sub_B470A0
mov	[ebp+var_1C], eax
jmp	short loc_5E9AD2

loc_5E9ACB:
mov	[ebp+var_1C], 0

loc_5E9AD2:
mov	edx, [ebp+var_1C]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_5E9AF9
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
call	sub_40AA80

loc_5E9AF9:
mov	ecx, [ebp+var_18]
or	ecx, 1
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5E9A70 endp

align 10h


; Attributes: bp-based frame

sub_5E9B20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B437A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9B48
push	9Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E9B48:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9B20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E9B60(int, int, float, int)
sub_5E9B60 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E9C50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_18], 0
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_5E9BBB
mov	eax, [ebp+arg_C]
push	eax		; int
push	ecx		; float
fld	[ebp+arg_8]
fstp	[esp+24h+var_24]
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	ecx, [ebp+var_14]
call	sub_B46E40
mov	[ebp+var_1C], eax
jmp	short loc_5E9BC2

loc_5E9BBB:
mov	[ebp+var_1C], 0

loc_5E9BC2:
mov	edx, [ebp+var_1C]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_5E9BE9
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
call	sub_40AA80

loc_5E9BE9:
mov	ecx, [ebp+var_18]
or	ecx, 1
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5E9B60 endp

align 10h


; Attributes: bp-based frame

sub_5E9C10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B437A0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9C38
push	98h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E9C38:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9C10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5E9C50(int, int, float, int)
sub_5E9C50 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E9C50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_18], 0
push	98h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_5E9CAB
mov	eax, [ebp+arg_C]
push	eax		; int
push	ecx		; float
fld	[ebp+arg_8]
fstp	[esp+24h+var_24]
mov	ecx, [ebp+arg_4]
push	ecx		; int
mov	ecx, [ebp+var_14]
call	sub_B492E0
mov	[ebp+var_1C], eax
jmp	short loc_5E9CB2

loc_5E9CAB:
mov	[ebp+var_1C], 0

loc_5E9CB2:
mov	edx, [ebp+var_1C]
mov	[ebp+var_10], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_5E9CD9
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
call	sub_40AA80

loc_5E9CD9:
mov	ecx, [ebp+var_18]
or	ecx, 1
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5E9C50 endp

align 10h


; Attributes: bp-based frame

sub_5E9D00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B44450
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9D28
push	98h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E9D28:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9D00 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5E9D40(float)
sub_5E9D40 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
push	ecx		; float
fld	dword ptr [eax+150h]
fstp	[esp+20h+var_20]
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+24h+var_24]
mov	ecx, [ebp+var_1C]
add	ecx, 1C0h
lea	eax, [ebp+var_C]
call	sub_40F920
mov	ecx, eax
lea	eax, [ebp+var_18]
call	sub_40F920
mov	edx, [ebp+var_1C]
add	edx, 19Ch
mov	ecx, eax
mov	eax, edx
call	sub_40FED0
mov	esp, ebp
pop	ebp
retn	4
sub_5E9D40 endp



; Attributes: bp-based frame

; int __stdcall	sub_5E9D90(float)
sub_5E9D90 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
push	ecx		; float
fld	dword ptr [eax+150h]
fstp	[esp+20h+var_20]
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+24h+var_24]
mov	ecx, [ebp+var_1C]
add	ecx, 1B4h
lea	eax, [ebp+var_C]
call	sub_40F920
mov	ecx, eax
lea	eax, [ebp+var_18]
call	sub_40F920
mov	edx, [ebp+var_1C]
add	edx, 19Ch
mov	ecx, eax
mov	eax, edx
call	sub_40FED0
mov	esp, ebp
pop	ebp
retn	4
sub_5E9D90 endp



; Attributes: bp-based frame

; int __stdcall	sub_5E9DE0(float)
sub_5E9DE0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= byte ptr	-0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
push	ecx		; float
fld	dword ptr [eax+150h]
fstp	[esp+20h+var_20]
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+24h+var_24]
mov	ecx, [ebp+var_1C]
add	ecx, 1A8h
lea	eax, [ebp+var_C]
call	sub_40F920
mov	ecx, eax
lea	eax, [ebp+var_18]
call	sub_40F920
mov	edx, [ebp+var_1C]
add	edx, 19Ch
mov	ecx, eax
mov	eax, edx
call	sub_40FED0
mov	esp, ebp
pop	ebp
retn	4
sub_5E9DE0 endp



; Attributes: bp-based frame

sub_5E9E30 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 0C07h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15B50F4
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+10h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E9E30 endp

align 10h


; Attributes: bp-based frame

sub_5E9E80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9EA5
push	14h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E9EA5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5E9E80 endp

align 10h


; Attributes: bp-based frame

sub_5E9EB0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 0C08h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_15B50F4
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+0Ch], xmm0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+10h], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5E9EB0 endp

align 10h


; Attributes: bp-based frame

sub_5E9F00 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5E9F00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_14], ecx
mov	ecx, 0FA9h
mov	eax, [ebp+var_14]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15C163C
lea	ecx, [ebp+var_D]
call	sub_401EF0
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_1C], ecx
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_1C]
push	edx
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402390
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_D]
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5E9F00 endp

align 10h


; Attributes: bp-based frame

sub_5E9F90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5E9FE3
push	30h
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_5E9FE3:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5E9F90 endp

align 10h


; Attributes: bp-based frame

sub_5EA000 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EA000 endp

align 10h


; Attributes: bp-based frame

sub_5EA050 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
mov	ecx, 234Bh
mov	eax, [ebp+var_30]
call	sub_401100
mov	eax, [ebp+var_30]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_30]
mov	dword ptr [edx], offset	off_15C1640
mov	eax, [ebp+var_30]
add	eax, 18h
mov	[ebp+var_2C], eax
xor	ecx, ecx
mov	[ebp+var_14], ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_C], ecx
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_28], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_2C]
mov	ecx, [ebp+var_28]
mov	[eax], ecx
mov	edx, [ebp+var_24]
mov	[eax+4], edx
mov	ecx, [ebp+var_20]
mov	[eax+8], ecx
mov	edx, [ebp+var_1C]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_2C]
mov	byte ptr [eax],	0
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_2C]
mov	[edx+8], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_2C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_2C]
mov	dword ptr [eax+10h], 0
mov	cl, [ebp+var_2]
mov	edx, [ebp+var_2C]
mov	[edx+14h], cl
lea	ecx, [ebp+var_2]
call	sub_438430
mov	eax, [ebp+var_30]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+var_30]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn
sub_5EA050 endp

align 10h


; Attributes: bp-based frame

sub_5EA130 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_438430
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5EA19A
push	30h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_5EA19A:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5EA130 endp

align 10h


; Attributes: bp-based frame

sub_5EA1B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 18h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_438430
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_401110
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EA1B0 endp

align 10h


; Attributes: bp-based frame

sub_5EA220 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA220
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	[ebp+var_10], ecx
mov	ecx, 2722h
mov	eax, [ebp+var_10]
call	sub_401100
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15C1644
mov	esi, [ebp+var_10]
add	esi, 8
xor	eax, eax
call	sub_41DF90
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
xor	eax, eax
call	sub_420330
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5EA220 endp

align 10h


; Attributes: bp-based frame

sub_5EA2A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA2A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_5EA2E2
mov	ecx, [ebp+var_14]
call	sub_5EA220
mov	[ebp+var_18], eax
jmp	short loc_5EA2E9

loc_5EA2E2:
mov	[ebp+var_18], 0

loc_5EA2E9:
mov	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EA2A0 endp

align 10h


; Attributes: bp-based frame

sub_5EA310 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA000
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_10]
add	eax, 8
call	sub_40ABB0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA363
push	0Ch
mov	ecx, [ebp+var_10]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA363:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5EA310 endp

align 10h


; Attributes: bp-based frame

sub_5EA380 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA380
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_5EAF70
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EA380 endp

align 10h


; Attributes: bp-based frame

sub_5EA3D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
add	eax, 190h
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [eax+8]
mov	[ecx+8], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA3D0 endp

align 10h


; Attributes: bp-based frame

sub_5EA400 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B49060
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA428
push	330h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA428:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA400 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5EA440(float)
sub_5EA440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	ecx		; float
fld	[ebp+arg_0]
fstp	[esp+8+var_8]
mov	ecx, [ebp+var_4]
call	sub_B3B1D0
mov	esp, ebp
pop	ebp
retn	4
sub_5EA440 endp

align 10h


; Attributes: bp-based frame

sub_5EA460 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_0]
mov	[eax+35Dh], cl
mov	esp, ebp
pop	ebp
retn	4
sub_5EA460 endp

align 10h


; Attributes: bp-based frame

sub_5EA480 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B47650
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA4A8
push	360h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA4A8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA480 endp

align 10h


; Attributes: bp-based frame

sub_5EA4C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 1B64h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1581810
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+10h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+20h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+1Ch], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [eax+18h], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [ecx+14h], xmm0
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	ds:xmmword_1479F30
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5EA4C0 endp

align 10h


; Attributes: bp-based frame

sub_5EA570 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	28h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5EA596
mov	ecx, [ebp+var_8]
call	sub_5EA4C0
mov	[ebp+var_C], eax
jmp	short loc_5EA59D

loc_5EA596:
mov	[ebp+var_C], 0

loc_5EA59D:
mov	eax, [ebp+var_C]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5EA570 endp

align 10h


; Attributes: bp-based frame

sub_5EA5B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B48E10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA5D8
push	358h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA5D8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA5B0 endp

align 10h


; Attributes: bp-based frame

sub_5EA5F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B48D70
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA618
push	230h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA618:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA5F0 endp

align 10h


; Attributes: bp-based frame

sub_5EA630 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 190h
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [eax+4]
mov	[ebp+var_8], edx
mov	eax, [eax+8]
mov	[ebp+var_4], eax
fld	[ebp+var_8]
mov	ecx, [ebp+var_10]
fadd	dword ptr [ecx+330h]
fstp	[ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	[edx+4], ecx
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA630 endp

align 10h


; Attributes: bp-based frame

sub_5EA680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
movzx	eax, byte ptr [eax+39Ch]
neg	eax
sbb	eax, eax
add	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_5EA680 endp

align 10h


; Attributes: bp-based frame

sub_5EA6A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA6A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 35Ch
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	ecx, [ebp+var_10]
add	ecx, 14h
call	sub_438430
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_B47650
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5EA70F
push	3B0h
mov	edx, [ebp+var_14]
push	edx
call	sub_1111040
add	esp, 8

loc_5EA70F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5EA6A0 endp

align 10h


; Attributes: bp-based frame

sub_5EA730 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B48BB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA758
push	330h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA758:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA730 endp

align 10h


; Attributes: bp-based frame

sub_5EA770 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_14 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA798
push	360h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA798:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA770 endp

align 10h


; Attributes: bp-based frame

sub_5EA7B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwocamerainter ; "LWOCameraInterface"
mov	esp, ebp
pop	ebp
retn
sub_5EA7B0 endp



; Attributes: bp-based frame

sub_5EA7C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1513148
mov	esp, ebp
pop	ebp
retn
sub_5EA7C0 endp



; Attributes: bp-based frame

sub_5EA7D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B43A10
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA7F5
push	68h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA7F5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA7D0 endp

align 10h


; Attributes: bp-based frame

sub_5EA800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B47A60
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA828
push	368h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA828:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA800 endp

align 10h


; Attributes: bp-based frame

sub_5EA840 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B49720
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA868
push	358h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA868:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA840 endp

align 10h


; Attributes: bp-based frame

sub_5EA880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B49680
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EA8A8
push	330h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EA8A8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EA880 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5EA8C0(LPCWSTR lpFileName, int, int)
sub_5EA8C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA8C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_8], 0
jz	short loc_5EA912
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	unk_155DFA4
mov	ecx, [ebp+var_18]
add	ecx, 98h
call	sub_403170
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_5EA912:
push	0
push	0
mov	ecx, [ebp+var_18]
call	sub_4032A0
mov	[ebp+var_4], 1
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_18]
mov	dword ptr [edx+ecx], offset off_14463D0
mov	ecx, [ebp+var_18]
add	ecx, 8
call	sub_403330
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_18]
add	eax, 8
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
add	ecx, [edx+4]
call	sub_4031E0
mov	eax, [ebp+var_18]
add	eax, 8
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
or	ecx, 10h
push	ecx		; int
mov	edx, [ebp+lpFileName]
push	edx		; lpFileName
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_77F500
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, [ebp+var_14]
jnz	short loc_5EA99A
push	4
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
add	ecx, [edx+4]
call	sub_402D20

loc_5EA99A:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5EA8C0 endp

align 10h


; Attributes: bp-based frame

sub_5EA9C0 proc	near

var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_20]
call	sub_5EAEA0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5EA9C0 endp

align 10h


; Attributes: bp-based frame

sub_5EAA20 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EAA20
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 50h
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_4CE480
add	esp, 8
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_5C]
cmp	dword ptr [ecx], 0
jz	short loc_5EAAC1
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_5C]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 2
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_54], eax
cmp	[ebp+var_54], 0
jz	short loc_5EAAC1
mov	ecx, [ebp+var_58]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_54]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5EAAC1:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EAA20 endp

align 10h


; Attributes: bp-based frame

sub_5EAAE0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5EAB1B
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
push	edx
call	sub_5EB830
add	esp, 8
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
add	ecx, 4
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
jmp	short loc_5EAB46

loc_5EAB1B:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_18], edx
xor	eax, eax
mov	[ebp+var_11], al
push	1
push	1
lea	ecx, [ebp+var_11]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_5EB3B0

loc_5EAB46:
mov	esp, ebp
pop	ebp
retn	4
sub_5EAAE0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5EAB50(LPCWSTR lpFileName, int, int)
sub_5EAB50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EAB50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_8], 0
jz	short loc_5EABA2
mov	eax, [ebp+var_18]
mov	dword ptr [eax], offset	unk_1573BF8
mov	ecx, [ebp+var_18]
add	ecx, 0A0h
call	sub_403170
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_5EABA2:
push	0
push	0
mov	ecx, [ebp+var_18]
call	sub_402E20
mov	[ebp+var_4], 1
mov	edx, [ebp+var_18]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_18]
mov	dword ptr [edx+ecx], offset off_14463C8
mov	ecx, [ebp+var_18]
add	ecx, 10h
call	sub_403330
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_18]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
add	ecx, [edx+4]
call	sub_4031E0
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_4]
or	ecx, 8
push	ecx		; int
mov	edx, [ebp+lpFileName]
push	edx		; lpFileName
mov	ecx, [ebp+var_14]
add	ecx, 20h
call	sub_77F500
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, [ebp+var_14]
jnz	short loc_5EAC2A
push	4
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	ecx, [ebp+var_18]
add	ecx, [edx+4]
call	sub_402D20

loc_5EAC2A:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5EAB50 endp

align 10h


; Attributes: bp-based frame

sub_5EAC50 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	dword ptr [eax+10h], 0
setz	cl
movzx	edx, cl
test	edx, edx
jz	loc_5EAD41
mov	eax, [ebp+var_44]
xor	ecx, ecx
cmp	dword ptr [eax+10h], 0
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5EAC88
jmp	loc_5EAE99

loc_5EAC88:
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ecx+4]
mov	[ebp+var_10], eax
mov	edx, [ecx+8]
mov	[ebp+var_C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_10]
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	[edx+8], eax
mov	ecx, [ebp+var_8]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+4], 0
jz	short loc_5EACF2
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx

loc_5EACF2:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+var_44]
jnz	short loc_5EAD06
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[edx+0Ch], eax

loc_5EAD06:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
cmp	edx, [ebp+var_44]
jnz	short loc_5EAD1A
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	[eax+8], ecx

loc_5EAD1A:
mov	edx, [ebp+var_44]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_44]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_44]
mov	edx, [ebp+var_44]
mov	[ecx+8], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_44]
mov	[eax+0Ch], ecx
jmp	loc_5EAE39

loc_5EAD41:
mov	edx, [ebp+var_44]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EAD6A
mov	edx, [ebp+var_44]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_5EAC50
jmp	loc_5EAE99
jmp	loc_5EAE39

loc_5EAD6A:
xor	eax, eax
mov	[ebp+var_15], al
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_28], edx
mov	eax, [ecx+4]
mov	[ebp+var_24], eax
mov	edx, [ecx+8]
mov	[ebp+var_20], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_44]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+var_24]
mov	[edx+4], ecx
mov	eax, [ebp+var_20]
mov	[edx+8], eax
mov	ecx, [ebp+var_1C]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+4], 0
jz	short loc_5EADD4
mov	eax, [ebp+var_44]
mov	ecx, [eax+4]
mov	edx, [ebp+var_44]
mov	[ecx+4], edx

loc_5EADD4:
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+arg_0]
jnz	short loc_5EADE8
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_5EADE8:
mov	ecx, [ebp+var_44]
mov	edx, [ecx+8]
cmp	edx, [ebp+arg_0]
jnz	short loc_5EADFC
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_44]
mov	[eax+8], ecx

loc_5EADFC:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+4], 0
jz	short loc_5EAE11
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx

loc_5EAE11:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
cmp	ecx, [ebp+var_44]
jnz	short loc_5EAE25
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[edx+0Ch], eax

loc_5EAE25:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
cmp	edx, [ebp+var_44]
jnz	short loc_5EAE39
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	[eax+8], ecx

loc_5EAE39:
mov	edx, [ebp+arg_0]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+var_44]
add	eax, 10h
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
add	edx, 14h
mov	[ebp+var_40], edx
mov	eax, [ebp+var_44]
add	eax, 14h
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	dl, [ecx]
mov	[ebp+var_35], dl
mov	eax, [ebp+var_40]
mov	cl, [eax]
mov	edx, [ebp+var_3C]
mov	[edx], cl
mov	eax, [ebp+var_40]
mov	cl, [ebp+var_35]
mov	[eax], cl
lea	ecx, [ebp+var_35]
call	sub_438430

loc_5EAE99:
mov	esp, ebp
pop	ebp
retn	4
sub_5EAC50 endp

align 10h


; Attributes: bp-based frame

sub_5EAEA0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_10]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5EB8C0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5EAEF7
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EAEF7:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5EAEA0 endp

align 10h


; Attributes: bp-based frame

sub_5EAF10 proc	near

var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_38]
call	sub_524460
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_38]
jz	short loc_5EAF59
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_38]
call	sub_5EAEA0
mov	eax, 1
jmp	short loc_5EAF5B

loc_5EAF59:
xor	eax, eax

loc_5EAF5B:
mov	esp, ebp
pop	ebp
retn	4
sub_5EAF10 endp

align 10h


; Attributes: bp-based frame

sub_5EAF70 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5EAFB5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5EB040
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5EAFB5:
mov	esp, ebp
pop	ebp
retn
sub_5EAF70 endp

align 10h


; Attributes: bp-based frame

sub_5EAFC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42E130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_5EB01F
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
mov	eax, [ecx+8]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_5EB01F
mov	eax, [ebp+var_14]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5EB01F:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EAFC0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5EB040(void	*)
sub_5EB040 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_5EB049:
cmp	[ebp+arg_0], 0
jz	short loc_5EB099
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_10]
call	sub_5EB040
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5EB8C0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5EB091
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EB091:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5EB049

loc_5EB099:
mov	esp, ebp
pop	ebp
retn	4
sub_5EB040 endp

align 10h


; Attributes: bp-based frame

sub_5EB0A0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EB0A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0A4h
mov	[ebp+var_A0], ecx
mov	[ebp+var_5C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5C7CD0
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_A0]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_68]
setz	al
mov	[ebp+var_A1], al
movzx	ecx, [ebp+var_A1]
test	ecx, ecx
jnz	short loc_5EB16D
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F3820
mov	[ebp+var_A8], eax
mov	eax, [ebp+var_5C]
or	eax, 1
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5EB16D
mov	[ebp+var_AC], 0
jmp	short loc_5EB177

loc_5EB16D:
mov	[ebp+var_AC], 1

loc_5EB177:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_5C]
and	eax, 1
jz	short loc_5EB191
and	[ebp+var_5C], 0FFFFFFFEh
call	nullsub_1

loc_5EB191:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5EB2AA
mov	[ebp+var_50], 0
cmp	[ebp+var_50], 0
jz	short loc_5EB1B2
mov	ecx, [ebp+var_50]
call	sub_40AA80

loc_5EB1B2:
lea	edx, [ebp+var_50]
mov	[ebp+var_84], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_4C]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_24]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	eax, [ebp+var_84]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_80]
cmp	dword ptr [edx], 0
jz	short loc_5EB1F7
mov	eax, [ebp+var_80]
mov	ecx, [eax]
call	sub_40AA80

loc_5EB1F7:
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_98], ecx
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_94]
mov	[ebp+var_88], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_88]
call	sub_4046E0
mov	eax, [ebp+var_98]
push	eax
push	ecx
mov	[ebp+var_90], esp
mov	ecx, [ebp+var_94]
mov	eax, [ebp+var_90]
call	sub_4046E0
lea	ecx, [ebp+var_58]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5EB9A0
lea	edx, [ebp+var_58]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_B0]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	byte ptr [ebp+var_4], 3
lea	edx, [ebp+var_24]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
cmp	dword ptr [eax], 0
jz	short loc_5EB289
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
call	sub_40AA90

loc_5EB289:
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_4C]
call	sub_407E50
mov	[ebp+var_4], 0FFFFFFFFh
cmp	[ebp+var_50], 0
jz	short loc_5EB2AA
mov	ecx, [ebp+var_50]
call	sub_40AA90

loc_5EB2AA:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5EB0A0 endp



; Attributes: bp-based frame

sub_5EB2C0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EB2C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
push	0
lea	eax, [ebp+var_D]
push	eax
call	sub_5EBEF0
add	esp, 8
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	[ebp+var_44], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_44]
movzx	eax, byte ptr [edx]
push	eax
sub	esp, 8
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	ecx, [ebp+var_2C]
add	ecx, 4
mov	[ebp+var_28], ecx
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_28]
call	sub_4046E0
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_30], edx
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_30]
call	sub_4046E0
push	ecx
mov	eax, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_C]
mov	eax, [ebp+var_34]
call	sub_4046E0
push	ecx
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_38], ecx
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_38]
call	sub_4046E0
push	ecx
mov	edx, esp
mov	[ebp+var_24], esp
mov	[ebp+var_3C], edx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_3C]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
call	sub_5EBF10
add	esp, 20h
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_D]
call	sub_438430
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EB2C0 endp

align 10h


; Attributes: bp-based frame

sub_5EB3B0 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_78=	dword ptr -78h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_49=	byte ptr -49h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EB3B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0BCh
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_C4], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_C4]
call	sub_42F940
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_C4]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_18], eax
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
xor	ecx, ecx
mov	byte ptr [ebp+var_1E+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_1E], dl
mov	al, byte ptr [ebp+var_1E]
mov	[ebp+var_51], al
mov	ecx, [ebp+var_C4]
mov	edx, [ecx]
mov	[ebp+var_50], edx
push	0
lea	eax, [ebp+var_49]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_50]
push	eax
call	sub_5ECC00
add	esp, 14h
mov	[ebp+var_C8], eax
mov	ecx, [ebp+var_C8]
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_C], 1
jnz	short loc_5EB478
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_1C]
push	eax
call	sub_5EB830
add	esp, 8
mov	ecx, [ebp+var_1C]
add	ecx, 4
mov	[ebp+var_1C], ecx
jmp	short loc_5EB4A4

loc_5EB478:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+var_1C]
lea	ecx, [eax+edx*4]
mov	[ebp+var_64], ecx
push	0
lea	edx, [ebp+var_65]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_5EC9D0
add	esp, 14h
mov	eax, [ebp+var_64]
mov	[ebp+var_1C], eax

loc_5EB4A4:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_5EB4F1
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_6D], cl
mov	edx, [ebp+var_C4]
mov	eax, [edx+4]
mov	[ebp+var_6C], eax
push	0
lea	ecx, [ebp+var_66]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_6C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5ECC00
add	esp, 14h
mov	[ebp+var_CC], eax
mov	edx, [ebp+var_CC]
mov	[ebp+var_1C], edx

loc_5EB4F1:
jmp	short loc_5EB53A

loc_5EB4F3:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
call	sub_4C6BD0
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	[ebp+var_78], edx
cmp	[ebp+var_18], 0
jz	short loc_5EB524
mov	eax, [ebp+var_78]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5EB524:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5EB541
retn

loc_5EB53A:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5EB541:
mov	ecx, [ebp+var_C4]
call	sub_5E3770
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
lea	ecx, [eax+edx*4]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+var_C4]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [ebp+var_C0]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_5EB3B0 endp

align 10h


; Attributes: bp-based frame

sub_5EB5A0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 7Ch
mov	[ebp+var_78], ecx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_78]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 2
cmp	edx, [ebp+arg_0]
jnb	loc_5EB675
mov	[ebp+var_C], 3FFFFFFFh
mov	[ebp+var_10], 3FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_5EB5DE
mov	ecx, [ebp+var_10]
mov	[ebp+var_7C], ecx
jmp	short loc_5EB5E4

loc_5EB5DE:
mov	edx, [ebp+var_C]
mov	[ebp+var_7C], edx

loc_5EB5E4:
mov	eax, [ebp+var_7C]
cmp	eax, [ebp+arg_0]
jnb	short loc_5EB5F4
mov	ecx, [ebp+var_78]
call	sub_5BD210

loc_5EB5F4:
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_78]
mov	eax, [ecx+4]
sub	eax, [edx]
sar	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_78]
cmp	dword ptr [ecx], 0
jz	short loc_5EB633
mov	edx, [ebp+var_78]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_78]
mov	edx, [ecx]
push	edx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_78]
call	sub_5EC140
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_78]
call	sub_5E3770
jmp	short loc_5EB649

loc_5EB633:
lea	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_78]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_8], eax

loc_5EB649:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
lea	edx, [ecx+eax*4]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4]
mov	edx, [ebp+var_78]
mov	[edx+4], ecx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_74]
mov	[eax+8], ecx

loc_5EB675:
mov	esp, ebp
pop	ebp
retn	4
sub_5EB5A0 endp

align 10h


; Attributes: bp-based frame

sub_5EB680 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwocamerainter ; "LWOCameraInterface"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_5EC1F0
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1513148 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5EB680 endp

align 10h


; Attributes: bp-based frame

sub_5EB750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_5EC260
add	esp, 8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EB750 endp



; Attributes: bp-based frame

sub_5EB770 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_5EC450
add	esp, 8
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
mov	eax, [edx+ecx+0Ch]
and	eax, 5
neg	eax
sbb	eax, eax
neg	eax
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EB7AD
mov	eax, [ebp+var_10]
jmp	short loc_5EB7EA

loc_5EB7AD:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jz	short loc_5EB7DF
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jz	short loc_5EB7DF
push	4
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	edx, [ebp+var_10]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_402D20
jmp	short loc_5EB7E7

loc_5EB7DF:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	[eax], ecx

loc_5EB7E7:
mov	eax, [ebp+var_10]

loc_5EB7EA:
mov	esp, ebp
pop	ebp
retn	4
sub_5EB770 endp



; Attributes: bp-based frame

sub_5EB7F0 proc	near

var_3C=	dword ptr -3Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_4844A0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
or	ecx, 1
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5EB7F0 endp

align 10h


; Attributes: bp-based frame

sub_5EB830 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EB830
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_5EB898
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_18]
cmp	dword ptr [edx], 0
jz	short loc_5EB890
mov	eax, [ebp+var_18]
mov	ecx, [eax]
call	sub_40AA80

loc_5EB890:
mov	ecx, [ebp+var_18]
mov	[ebp+var_1C], ecx
jmp	short loc_5EB89F

loc_5EB898:
mov	[ebp+var_1C], 0

loc_5EB89F:
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EB830 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5EB8C0(void *)
sub_5EB8C0 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EB8C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 28h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
cmp	dword ptr [edx], 0
jz	short loc_5EB902
mov	eax, [ebp+var_14]
mov	ecx, [eax]
call	sub_40AA90

loc_5EB902:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+arg_0]
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5EB924
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5EB924:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EB8C0 endp

align 10h


; Attributes: bp-based frame

sub_5EB940 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EB940
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 0
jz	short loc_5EB980
mov	edx, [ebp+var_10]
mov	ecx, [edx]
call	sub_40AA90

loc_5EB980:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
call	sub_407E50
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EB940 endp

align 10h


; Attributes: bp-based frame

sub_5EB9A0 proc	near

var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 180h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5EBBAA
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EBA09
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5EC790
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3

loc_5EBA09:
lea	edx, [ebp+var_1E]
mov	[ebp+var_15C], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5EBA60
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3
jmp	loc_5EBBA5

loc_5EBA60:
lea	edx, [ebp+var_1F]
mov	[ebp+var_160], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5EBAA0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3

loc_5EBAA0:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_158]
jnz	short loc_5EBAEA
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3

loc_5EBAEA:
lea	ecx, [ebp+var_21]
mov	[ebp+var_164], ecx
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5EBB74
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5EBB4D
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3
jmp	short loc_5EBB72

loc_5EBB4D:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3

loc_5EBB72:
jmp	short loc_5EBBA5

loc_5EBB74:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5EC790
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3

loc_5EBBA5:
jmp	loc_5EBEE3

loc_5EBBAA:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_5EBC55
lea	ecx, [ebp+var_2E]
mov	[ebp+var_168], ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
add	eax, 10h
mov	[ebp+var_A0], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_A0]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5EBC1F
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_158]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3
jmp	short loc_5EBC50

loc_5EBC1F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5EC790
mov	[ebp+var_B8], eax
mov	edx, [ebp+var_B8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3

loc_5EBC50:
jmp	loc_5EBEE3

loc_5EBC55:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_39]
mov	[ebp+var_16C], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_BC]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5EBCE6
lea	eax, [ebp+var_3B]
mov	[ebp+var_170], eax
mov	ecx, [ebp+var_4C]
or	ecx, 1
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_D4], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_D4]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5EBCE6
mov	[ebp+var_174], 1
jmp	short loc_5EBCF0

loc_5EBCE6:
mov	[ebp+var_174], 0

loc_5EBCF0:
mov	al, byte ptr [ebp+var_174]
mov	[ebp+var_3A], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_5EBD05
and	[ebp+var_4C], 0FFFFFFFEh

loc_5EBD05:
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	short loc_5EBD67
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5EBD3D
mov	ecx, [ebp+var_C]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3
jmp	short loc_5EBD62

loc_5EBD3D:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	loc_5EBEE3

loc_5EBD62:
jmp	loc_5EBEE3

loc_5EBD67:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	ecx, [ebp+var_6]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_11], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_5EBDC2
lea	eax, [ebp+var_3C]
mov	[ebp+var_178], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_EC], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_5EBDC2:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5EBE21
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5EBE21
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_158]
jz	short loc_5EBE15
lea	ecx, [ebp+var_3E]
mov	[ebp+var_17C], ecx
mov	edx, [ebp+var_4C]
or	edx, 2
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_118], eax
mov	ecx, [ebp+var_118]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5EBE21

loc_5EBE15:
mov	[ebp+var_180], 1
jmp	short loc_5EBE2B

loc_5EBE21:
mov	[ebp+var_180], 0

loc_5EBE2B:
mov	cl, byte ptr [ebp+var_180]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5EBE40
and	[ebp+var_4C], 0FFFFFFFDh

loc_5EBE40:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5EBE99
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5EBE75
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	short loc_5EBEE3
jmp	short loc_5EBE97

loc_5EBE75:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_5EC640
mov	eax, [ebp+arg_0]
jmp	short loc_5EBEE3

loc_5EBE97:
jmp	short loc_5EBEE3

loc_5EBE99:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5EBEB7
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5EBEE3
jmp	short loc_5EBEE3

loc_5EBEB7:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_5EC790
mov	[ebp+var_154], eax
mov	edx, [ebp+var_154]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5EBEE3:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5EB9A0 endp

align 10h


; Attributes: bp-based frame

sub_5EBEF0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	al, [ebp+var_1]
mov	ecx, [ebp+arg_0]
mov	[ecx], al
lea	ecx, [ebp+var_1]
call	sub_438430
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5EBEF0 endp

align 10h


; Attributes: bp-based frame

sub_5EBF10 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7E=	byte ptr -7Eh
var_7D=	byte ptr -7Dh
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EBF10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8Ch
mov	[ebp+var_4], 0

loc_5EBF35:
lea	eax, [ebp+var_28]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_24]
call	sub_4046E0
mov	ecx, [ebp+arg_4]
xor	edx, edx
cmp	ecx, [ebp+var_28]
setnz	dl
mov	[ebp+var_7D], dl
movzx	eax, [ebp+var_7D]
test	eax, eax
jz	loc_5EC0C2
lea	ecx, [ebp+var_30]
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_2C]
call	sub_4046E0
mov	edx, [ebp+arg_C]
xor	eax, eax
cmp	edx, [ebp+var_30]
setnz	al
mov	[ebp+var_7E], al
movzx	ecx, [ebp+var_7E]
test	ecx, ecx
jz	loc_5EC0C2
mov	edx, [ebp+arg_C]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_34]
mov	[ebp+var_84], ecx
mov	[ebp+var_88], edx
mov	eax, [ebp+var_84]
mov	ecx, [ebp+var_88]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5EBFE3
jb	short loc_5EBFD7
mov	eax, [ebp+var_84]
mov	ecx, [ebp+var_88]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5EBFE3

loc_5EBFD7:
mov	[ebp+var_8C], 1
jmp	short loc_5EBFED

loc_5EBFE3:
mov	[ebp+var_8C], 0

loc_5EBFED:
movzx	eax, byte ptr [ebp+var_8C]
test	eax, eax
jz	short loc_5EC021
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
push	edx
lea	ecx, [ebp+arg_14]
call	sub_5A9E30
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
jmp	loc_5EC0BD

loc_5EC021:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_C]
add	edx, 10h
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_4C]
mov	[ebp+var_90], eax
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_94]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5EC079
jb	short loc_5EC06D
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_94]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5EC079

loc_5EC06D:
mov	[ebp+var_98], 1
jmp	short loc_5EC083

loc_5EC079:
mov	[ebp+var_98], 0

loc_5EC083:
movzx	edx, byte ptr [ebp+var_98]
test	edx, edx
jz	short loc_5EC09F
mov	eax, [ebp+arg_C]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax
jmp	short loc_5EC0BD

loc_5EC09F:
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	edx, [ebp+arg_C]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_C], eax

loc_5EC0BD:
jmp	loc_5EBF35

loc_5EC0C2:
sub	esp, 8
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+var_58]
add	eax, 4
mov	[ebp+var_54], eax
mov	ecx, [ebp+arg_18]
mov	eax, [ebp+var_54]
call	sub_4046E0
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_5C]
call	sub_4046E0
push	ecx
mov	edx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_60], edx
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_60]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
call	sub_5EC960
add	esp, 14h
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+arg_1C]
call	sub_438430
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EBF10 endp

align 10h


; Attributes: bp-based frame

sub_5EC140 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EC140
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_40]
add	ecx, 8
call	sub_44D330
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_5ECA80
add	esp, 0Ch
mov	eax, [ebp+var_14]
jmp	short loc_5EC1DB

loc_5EC19D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
cmp	[ebp+var_14], 0
jz	short loc_5EC1BE
mov	edx, [ebp+var_3C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EC1BE:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5EC1DB
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_5EC1DB:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5EC140 endp

align 10h


; Attributes: bp-based frame

sub_5EC1F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwocamerainter ; "LWOCameraInterface"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EC255
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5EC255
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_5EC255
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5EC24E
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_5EC255

loc_5EC24E:
mov	[ebp+var_10], 0

loc_5EC255:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_5EC1F0 endp

align 10h


; Attributes: bp-based frame

sub_5EC260 proc	near

var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EC260
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 54h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], 0
xor	eax, eax
jnz	short loc_5EC2B5
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_406880
and	eax, 1000h
jz	short loc_5EC2B5
mov	eax, [ebp+arg_0]
push	eax
call	sub_51D5D0
add	esp, 4
mov	[ebp+var_5D], al
jmp	short loc_5EC2C4

loc_5EC2B5:
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4050F0
add	esp, 4
mov	[ebp+var_5D], al

loc_5EC2C4:
mov	dl, [ebp+var_5D]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0
lea	eax, [ebp+var_11]
call	sub_4046F0
movzx	eax, al
test	eax, eax
jz	loc_5EC41A
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_5EC2F7
mov	[ebp+var_5C], 0
jmp	short loc_5EC305

loc_5EC2F7:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_5C], eax

loc_5EC305:
lea	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_50]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
mov	dword ptr [eax], 0
xor	ecx, ecx
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	edx, [ebp+var_38]
mov	[edx+6], cl
mov	eax, [ebp+var_38]
mov	byte ptr [eax+7], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D10
mov	[ebp+var_3C], eax
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setz	cl
mov	byte ptr [ebp+var_22], cl
mov	byte ptr [ebp+var_22+1], 0
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803A0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_58], eax
mov	ecx, [ebp-24h]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_5C]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx]
mov	ecx, [ebp+var_48]
mov	eax, [edx+18h]
call	eax
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_1C]
call	sub_77FF40
jmp	short loc_5EC3F9

loc_5EC3DA:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_5EC400
retn

loc_5EC3F9:
mov	[ebp+var_4], 0

loc_5EC400:
cmp	[ebp+var_18], 0
jz	short loc_5EC41A
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_5EC41A:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_11]
call	nullsub_1
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_5EC260 endp

align 10h


; Attributes: bp-based frame

sub_5EC450 proc	near

var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EC450
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 54h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], 0
xor	eax, eax
jnz	short loc_5EC4A5
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_406880
and	eax, 1000h
jz	short loc_5EC4A5
mov	eax, [ebp+arg_0]
push	eax
call	sub_51D5D0
add	esp, 4
mov	[ebp+var_5D], al
jmp	short loc_5EC4B4

loc_5EC4A5:
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4050F0
add	esp, 4
mov	[ebp+var_5D], al

loc_5EC4B4:
mov	dl, [ebp+var_5D]
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0
lea	eax, [ebp+var_11]
call	sub_4046F0
movzx	eax, al
test	eax, eax
jz	loc_5EC60A
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_5EC4E7
mov	[ebp+var_5C], 0
jmp	short loc_5EC4F5

loc_5EC4E7:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
add	eax, [edx+4]
mov	[ebp+var_5C], eax

loc_5EC4F5:
lea	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
call	sub_4325E0
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	[ebp+var_44], ecx
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_50]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
mov	dword ptr [eax], 0
xor	ecx, ecx
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	edx, [ebp+var_38]
mov	[edx+6], cl
mov	eax, [ebp+var_38]
mov	byte ptr [eax+7], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D10
mov	[ebp+var_3C], eax
mov	eax, [ebp+var_3C]
mov	[ebp+var_28], eax
xor	ecx, ecx
cmp	[ebp+var_3C], 0
setz	cl
mov	byte ptr [ebp+var_22], cl
mov	byte ptr [ebp+var_22+1], 0
mov	[ebp+var_40], 0
mov	edx, [ebp+var_40]
push	edx
call	sub_7803A0
add	esp, 4
push	eax
mov	ecx, [ebp+var_44]
call	sub_77FFD0
mov	[ebp+var_48], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_58], eax
mov	ecx, [ebp-24h]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_5C]
push	ecx
mov	edx, [ebp+var_4C]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx]
mov	ecx, [ebp+var_48]
mov	eax, [edx+28h]
call	eax
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_1C]
call	sub_77FF40
jmp	short loc_5EC5E9

loc_5EC5CA:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_5EC5F0
retn

loc_5EC5E9:
mov	[ebp+var_4], 0

loc_5EC5F0:
cmp	[ebp+var_18], 0
jz	short loc_5EC60A
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_5EC60A:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_11]
call	nullsub_1
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_5EC450 endp

align 10h


; Attributes: bp-based frame

sub_5EC640 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_28], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_28]
jnz	short loc_5EC687
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_28]
call	sub_5ECAD0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5EC746

loc_5EC687:
cmp	[ebp+arg_10], 0
jnz	short loc_5EC6CB
cmp	[ebp+arg_C], 0
jnz	short loc_5EC6C2
lea	edx, [ebp+var_6]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_C]
or	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EC6CB

loc_5EC6C2:
mov	[ebp+var_30], 1
jmp	short loc_5EC6D2

loc_5EC6CB:
mov	[ebp+var_30], 0

loc_5EC6D2:
mov	dl, byte ptr [ebp+var_30]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_C]
and	eax, 1
jz	short loc_5EC6E4
and	[ebp+var_C], 0FFFFFFFEh

loc_5EC6E4:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5EC71A
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_28]
call	sub_5ECAD0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+8]
jnz	short loc_5EC718
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx

loc_5EC718:
jmp	short loc_5EC746

loc_5EC71A:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_28]
call	sub_5ECAD0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+0Ch]
jnz	short loc_5EC746
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax

loc_5EC746:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_28]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E4A0
add	esp, 8
mov	edx, [ebp+var_28]
mov	eax, [edx+10h]
add	eax, 1
mov	ecx, [ebp+var_28]
mov	[ecx+10h], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5EC640 endp

align 10h


; Attributes: bp-based frame

sub_5EC790 proc	near

var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 9Ch
mov	[ebp+var_8C], ecx
mov	eax, [ebp+var_8C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5EC7B8:
cmp	[ebp+var_10], 0
jz	short loc_5EC816
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_11]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5EC7FF
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_94], ecx
jmp	short loc_5EC80B

loc_5EC7FF:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_94], eax

loc_5EC80B:
mov	ecx, [ebp+var_94]
mov	[ebp+var_10], ecx
jmp	short loc_5EC7B8

loc_5EC816:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5EC8C4
mov	eax, [ebp+var_8C]
mov	ecx, [eax+8]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_4C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_54]
mov	[ebp+var_50], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_50]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_54]
setz	cl
mov	[ebp+var_95], cl
movzx	edx, [ebp+var_95]
test	edx, edx
jz	short loc_5EC8B5
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_8C]
call	sub_5EC640
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5EC951
jmp	short loc_5EC8C4

loc_5EC8B5:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5EC8C4:
lea	edx, [ebp+var_26]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_4]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_25], al
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5EC936
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_8C]
call	sub_5EC640
mov	[ebp+var_88], eax
mov	edx, [ebp+var_88]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5EC951

loc_5EC936:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5EC951:
mov	esp, ebp
pop	ebp
retn	8
sub_5EC790 endp

align 10h


; Attributes: bp-based frame

sub_5EC960 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 68h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 8
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
add	edx, 4
mov	[ebp+var_18], edx
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_18]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_20]
call	sub_4046E0
push	ecx
mov	[ebp+var_24], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_24]
call	sub_4046E0
mov	eax, [ebp+arg_0]
push	eax
call	sub_5ECBA0
add	esp, 18h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5EC960 endp

align 10h


; Attributes: bp-based frame

sub_5EC9D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EC9D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_5ECA1F

loc_5ECA0D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax

loc_5ECA1F:
cmp	[ebp+var_18], 0
jle	short loc_5ECA37
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_5EB830
add	esp, 8
jmp	short loc_5ECA0D

loc_5ECA37:
jmp	short loc_5ECA61

loc_5ECA39:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_4C6BD0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5ECA68
retn

loc_5ECA61:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5ECA68:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_5EC9D0 endp

align 10h


; Attributes: bp-based frame

sub_5ECA80 proc	near

var_7= byte ptr	-7
var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
push	0
lea	eax, [ebp+var_7]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5ECC00
add	esp, 14h
mov	esp, ebp
pop	ebp
retn
sub_5ECA80 endp

align 10h


; Attributes: bp-based frame

sub_5ECAD0 proc	near

var_40=	dword ptr -40h
var_30=	byte ptr -30h
var_2F=	byte ptr -2Fh
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ECAD0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
push	1
mov	ecx, [ebp+var_40]
call	sub_4517E0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	[ebp+var_2F], al
mov	cl, [ebp+var_2F]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	[ebp+var_30], dl
mov	al, [ebp+var_30]
mov	[ebp+var_2E], al
lea	ecx, [ebp+var_2E]
push	ecx
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_14]
add	eax, 10h
push	eax		; void *
call	sub_5ECD40
add	esp, 0Ch
jmp	short loc_5ECB69

loc_5ECB38:
cmp	[ebp+var_14], 0
jz	short loc_5ECB53
mov	ecx, 1
imul	ecx, 3Ch
push	ecx		; int
mov	edx, [ebp+var_14]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5ECB53:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5ECB70
retn

loc_5ECB69:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5ECB70:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5ECAD0 endp

align 10h


; Attributes: bp-based frame

sub_5ECBA0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 54h
push	0
lea	eax, [ebp+var_1]
push	eax
sub	esp, 8
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_14]
call	sub_4046E0
push	ecx
mov	[ebp+var_1C], esp
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_1C]
call	sub_4046E0
push	ecx
mov	[ebp+var_20], esp
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+var_20]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5ECCC0
add	esp, 1Ch
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5ECBA0 endp

align 10h


; Attributes: bp-based frame

sub_5ECC00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ECC00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+arg_0]
sar	ecx, 2
mov	[ebp+var_18], ecx
jmp	short loc_5ECC46

loc_5ECC3D:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_5ECC46:
cmp	[ebp+var_18], 0
jle	short loc_5ECC70
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_5EB830
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 4
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_14], eax
jmp	short loc_5ECC3D

loc_5ECC70:
mov	eax, [ebp+var_14]
jmp	short loc_5ECCA4

loc_5ECC75:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_4C6BD0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5ECCA4
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_5ECCA4:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_5ECC00 endp

align 10h


; Attributes: bp-based frame

sub_5ECCC0 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 38h
jmp	short loc_5ECCD7

loc_5ECCC8:
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax

loc_5ECCD7:
lea	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	ecx, [ebp+arg_8]
mov	eax, [ebp+var_8]
call	sub_4046E0
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+var_C]
setnz	al
mov	[ebp+var_35], al
movzx	ecx, [ebp+var_35]
test	ecx, ecx
jz	short loc_5ECD15
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+arg_C]
call	sub_5A9E30
jmp	short loc_5ECCC8

loc_5ECD15:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_10]
mov	eax, [ebp+var_34]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5ECCC0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5ECD40(void *, int)
sub_5ECD40 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ECD40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
push	eax		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_5ECDBB
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_403400
mov	byte ptr [ebp+var_4], 1
mov	edx, [ebp+var_14]
add	edx, 28h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
mov	[eax], edx
mov	eax, [ebp+var_18]
cmp	dword ptr [eax], 0
jz	short loc_5ECDAF
mov	ecx, [ebp+var_18]
mov	ecx, [ecx]
call	sub_40AA80

loc_5ECDAF:
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_14]
mov	[ebp+var_1C], edx
jmp	short loc_5ECDC2

loc_5ECDBB:
mov	[ebp+var_1C], 0

loc_5ECDC2:
mov	eax, [ebp+var_1C]
mov	[ebp+var_10], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5ECD40 endp

align 10h



sub_5ECDE0 proc	near
sub	ecx, 28h
jmp	sub_5EA7D0
sub_5ECDE0 endp

align 10h


; Attributes: bp-based frame

sub_5ECDF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_1226E90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5ECE18
push	428h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5ECE18:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5ECDF0 endp

align 10h


; Attributes: bp-based frame

sub_5ECE30 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ECF80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_5C]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
lea	edx, [ebp+var_60]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_54]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_5C]
mov	[edx], eax
lea	ecx, [ebp+var_58]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_60]
mov	[edx], eax
xor	ecx, ecx
mov	[ebp+var_35], cl
lea	edx, [ebp+var_4C]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_54]
mov	[eax], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_58]
mov	[eax], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_6C]
cmp	dword ptr [edx], 0
jz	short loc_5ECEF9
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_6C]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 4
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_64], ecx
cmp	[ebp+var_64], 0
jz	short loc_5ECEF9
mov	edx, [ebp+var_68]
shl	edx, 4
push	edx		; int
mov	eax, [ebp+var_64]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5ECEF9:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5ECE30 endp

align 10h


; Attributes: bp-based frame

sub_5ECF10 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5ECF4B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5F1820
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 10h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_5ECF6B

loc_5ECF4B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5ED0D0

loc_5ECF6B:
mov	esp, ebp
pop	ebp
retn	4
sub_5ECF10 endp

align 10h


; Attributes: bp-based frame

sub_5ECF80 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5ECF80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_6C], ecx
lea	eax, [ebp+var_5C]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
lea	edx, [ebp+var_60]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
lea	ecx, [ebp+var_54]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_5C]
mov	[edx], eax
lea	ecx, [ebp+var_58]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_60]
mov	[edx], eax
xor	ecx, ecx
mov	[ebp+var_35], cl
lea	edx, [ebp+var_4C]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_54]
mov	[eax], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_58]
mov	[eax], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_6C]
cmp	dword ptr [edx], 0
jz	short loc_5ED049
mov	eax, [ebp+var_6C]
mov	ecx, [ebp+var_6C]
mov	edx, [eax+8]
sub	edx, [ecx]
sar	edx, 5
mov	[ebp+var_68], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_64], ecx
cmp	[ebp+var_64], 0
jz	short loc_5ED049
mov	edx, [ebp+var_68]
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_64]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5ED049:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5ECF80 endp

align 10h


; Attributes: bp-based frame

sub_5ED060 proc	near

var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_5ED09B
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx		; void *
call	sub_5A7750
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
add	ecx, 20h
mov	edx, [ebp+var_10]
mov	[edx+4], ecx
jmp	short loc_5ED0BB

loc_5ED09B:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_5ED1E0

loc_5ED0BB:
mov	esp, ebp
pop	ebp
retn	4
sub_5ED060 endp

align 10h


; Attributes: bp-based frame

sub_5ED0D0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_5E75C0
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A8]
add	ecx, 8
call	sub_5ED350
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_44], edx
jmp	short loc_5ED146

loc_5ED134:
mov	eax, [ebp+var_48]
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
add	ecx, 10h
mov	[ebp+var_44], ecx

loc_5ED146:
cmp	[ebp+var_48], 0
jbe	short loc_5ED16A
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_44]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	short loc_5ED134

loc_5ED16A:
mov	eax, [ebp+var_44]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_5ED195
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_A8]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_5ED195:
mov	ecx, [ebp+var_A8]
call	sub_5ED2E0
mov	eax, [ebp+var_4]
shl	eax, 4
add	eax, [ebp+var_8]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5ED0D0 endp

align 10h


; Attributes: bp-based frame

sub_5ED1E0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
push	esi
push	edi
mov	[ebp+var_A8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_5AA310
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_A8]
add	ecx, 8
call	sub_4B8410
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx]
push	eax
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_44], edx
jmp	short loc_5ED258

loc_5ED246:
mov	eax, [ebp+var_48]
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
add	ecx, 20h
mov	[ebp+var_44], ecx

loc_5ED258:
cmp	[ebp+var_48], 0
jbe	short loc_5ED26D
mov	esi, [ebp+arg_4]
mov	ecx, 8
mov	edi, [ebp+var_44]
rep movsd
jmp	short loc_5ED246

loc_5ED26D:
mov	edx, [ebp+var_44]
mov	[ebp+var_C], edx
movzx	eax, [ebp+arg_10]
test	eax, eax
jnz	short loc_5ED298
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_406610
add	esp, 0Ch
mov	[ebp+var_C], eax

loc_5ED298:
mov	ecx, [ebp+var_A8]
call	sub_4E1B30
mov	edx, [ebp+var_4]
shl	edx, 5
add	edx, [ebp+var_8]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A8]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_C]
mov	[edx+4], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ebp+var_A4]
mov	[ecx+8], edx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_5ED1E0 endp



; Attributes: bp-based frame

sub_5ED2E0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_58], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_58]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 4
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx]
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_5ED34C
mov	ecx, [ebp+var_54]
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_50]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5ED34C:
mov	esp, ebp
pop	ebp
retn
sub_5ED2E0 endp



; Attributes: bp-based frame

sub_5ED350 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
xor	eax, eax
mov	[ebp+var_1], al
cmp	[ebp+arg_0], 0FFFFFFFh
jbe	short loc_5ED37D
lea	ecx, [ebp+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5ED37D:
cmp	[ebp+arg_0], 0
jz	short loc_5ED3AE
mov	edx, [ebp+arg_0]
shl	edx, 4
mov	[ebp+var_8], edx
lea	eax, [ebp+var_8]
push	eax
call	sub_407BB0
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
shr	ecx, 4
mov	edx, [ebp+arg_4]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	[ebp+var_1C], eax
jmp	short loc_5ED3B5

loc_5ED3AE:
mov	[ebp+var_1C], 0

loc_5ED3B5:
mov	eax, [ebp+var_1C]
mov	esp, ebp
pop	ebp
retn	8
sub_5ED350 endp

align 10h


; Attributes: bp-based frame

sub_5ED3C0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 3Ch
push	esi
mov	[ebp+var_3C], ecx
xor	eax, eax
jz	short loc_5ED3E5
push	1		; char
push	20h		; int
lea	ecx, [ebp+var_8]
push	ecx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250
mov	[ebp+var_19], al
jmp	short loc_5ED3F8
jmp	short loc_5ED3F8

loc_5ED3E5:		; char
push	1
push	20h		; int
lea	edx, [ebp+var_8]
push	edx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250
mov	[ebp+var_19], al

loc_5ED3F8:
movzx	eax, [ebp+var_19]
test	eax, eax
jnz	short loc_5ED404
xor	al, al
jmp	short loc_5ED469

loc_5ED404:
mov	ecx, [ebp+var_8]
sub	ecx, 4
shr	ecx, 4
mov	[ebp+var_4], ecx
mov	[ebp+var_18], 0
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0
mov	[ebp+var_C], 0
lea	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_4FEE80
cmp	[ebp+var_4], 0
jbe	short loc_5ED467
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[ebp+var_38], edx
push	1		; char
mov	eax, [ebp+var_4]
shl	eax, 4
shl	eax, 3
push	eax		; int
xor	ecx, ecx
shl	ecx, 4
add	ecx, [ebp+var_38]
push	ecx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250

loc_5ED467:
mov	al, 1

loc_5ED469:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5ED3C0 endp



; Attributes: bp-based frame

sub_5ED470 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+304h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+300h], 0
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax+30Ah], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+308h], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+30Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+310h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+314h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+318h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+31Ch], 0
mov	esp, ebp
pop	ebp
retn
sub_5ED470 endp

align 10h


; Attributes: bp-based frame

sub_5ED4F0 proc	near

var_4C=	dword ptr -4Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
push	esi
mov	[ebp+var_4C], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4C]
cmp	edx, [ebp+var_4]
jz	short loc_5ED550
xor	eax, eax
jz	short loc_5ED529
push	1		; char
push	0FB8h		; int
mov	ecx, [ebp+var_4C]
push	ecx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250
mov	[ebp+var_5], al
jmp	short loc_5ED53F
jmp	short loc_5ED53F

loc_5ED529:		; char
push	1
push	0FB8h		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250
mov	[ebp+var_5], al

loc_5ED53F:
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5ED54E
xor	al, al
jmp	loc_5ED5ED

loc_5ED54E:
jmp	short loc_5ED55D

loc_5ED550:
mov	ecx, 1F7h
mov	eax, [ebp+arg_0]
call	sub_A496C0

loc_5ED55D:
mov	ecx, [ebp+var_4C]
movzx	edx, word ptr [ecx+1F5h]
test	edx, edx
jz	short loc_5ED5E1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
sub	edx, [ecx+8]
add	edx, 7
shr	edx, 3
mov	eax, [ebp+var_4C]
movzx	ecx, word ptr [eax+1F5h]
shl	ecx, 1
cmp	edx, ecx
jnb	short loc_5ED590
xor	al, al
jmp	short loc_5ED5ED

loc_5ED590:
mov	edx, [ebp+var_4C]
movzx	eax, word ptr [edx+1F5h]
mov	[ebp+var_C], eax
call	sub_61ED10
movzx	ecx, ax
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_4389B0
mov	ecx, [ebp+arg_4]
call	sub_404430
xor	ecx, ecx
shl	ecx, 1
add	eax, ecx
mov	[ebp+var_10], eax
push	1		; char
mov	edx, [ebp+var_4C]
movzx	eax, word ptr [edx+1F5h]
shl	eax, 1
shl	eax, 3
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
mov	esi, [ebp+arg_0]
call	sub_A49250

loc_5ED5E1:
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+arg_8]
call	sub_5ED3C0

loc_5ED5ED:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5ED4F0 endp

align 10h


; Attributes: bp-based frame

sub_5ED600 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 13C7h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15BC1B0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5ED600 endp

align 10h


; Attributes: bp-based frame

sub_5ED650 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5ED675
push	8
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5ED675:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5ED650 endp

align 10h


; Attributes: bp-based frame

sub_5ED680 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, 2B07h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15B50F8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+14h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+18h], 0FFFFFFFFh
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_5ED680 endp

align 10h


; Attributes: bp-based frame

sub_5ED6E0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 2B08h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C82F0
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
push	offset aMaps	; "maps/"
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_402400
mov	eax, [ebp+var_C]
mov	byte ptr [eax+38h], 0
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+39h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+3Ch], 0FFFFFFFFh
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5ED6E0 endp

align 10h


; Attributes: bp-based frame

sub_5ED760 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5ED790
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5ED790:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5ED760 endp

align 10h


; Attributes: bp-based frame

sub_5ED7A0 proc	near

var_10=	dword ptr -10h
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	ecx, 2B1Ch
mov	eax, [ebp+var_10]
call	sub_401100
mov	eax, [ebp+var_10]
mov	dword ptr [eax], offset	off_15C82F4
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
lea	ecx, [ebp+var_2]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 20h
call	sub_4022A0
lea	ecx, [ebp+var_2]
call	nullsub_1
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5ED7A0 endp

align 10h


; Attributes: bp-based frame

sub_5ED800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 20h
call	sub_407910
mov	ecx, [ebp+var_4]
add	ecx, 8
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5ED83B
push	38h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5ED83B:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5ED800 endp

align 10h


; Attributes: bp-based frame

sub_5ED850 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5ED877
mov	eax, [ebp+var_4]
push	eax
call	sub_408FB0
mov	[ebp+var_8], eax
jmp	short loc_5ED87E

loc_5ED877:
mov	[ebp+var_8], 0

loc_5ED87E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5ED850 endp

align 10h


; Attributes: bp-based frame

sub_5ED890 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 1C2Eh
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15583C8
mov	ecx, [ebp+var_14]
add	ecx, 0Ch
mov	[ebp+var_4], ecx
xor	edx, edx
mov	eax, [ebp+var_4]
mov	[eax], dx
xor	ecx, ecx
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
add	ecx, 14h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [ebp+var_14]
add	edx, 0Ch
mov	[ebp+var_C], edx
xor	eax, eax
xor	edx, edx
mov	cl, 20h
call	__allshr
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
xor	eax, eax
xor	edx, edx
mov	cl, 10h
call	__allshr
and	eax, 0FFFFh
and	edx, 0
mov	edx, [ebp+var_C]
mov	[edx+2], ax
xor	eax, eax
and	eax, 0FFFFh
xor	ecx, ecx
and	ecx, 0
mov	edx, [ebp+var_C]
mov	[edx], ax
mov	eax, [ebp+var_14]
add	eax, 14h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, dword_1892E24
mov	[ecx], edx
mov	eax, [ebp+var_10]
mov	ecx, dword_1892E28
mov	[eax+4], ecx
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5ED890 endp

align 10h


; Attributes: bp-based frame

sub_5ED970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5ED995
push	20h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5ED995:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5ED970 endp

align 10h


; Attributes: bp-based frame

sub_5ED9A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	??1strstreambuf@@UAE@XZ_12 ; strstreambuf::~strstreambuf(void)
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5ED9C3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5ED9C3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5ED9A0 endp

align 10h


; Attributes: bp-based frame

sub_5ED9D0 proc	near

var_14=	dword ptr -14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	ecx, 36B5h
mov	eax, [ebp+var_14]
call	sub_401100
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	off_15C82F8
push	offset sub_5EDAB0
push	4
push	0E0h
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx
call	sub_4078B0
mov	edx, [ebp+var_14]
mov	byte ptr [edx+9], 0
mov	eax, [ebp+var_14]
mov	byte ptr [eax+8], 0
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5ED9D0 endp

align 10h


; Attributes: bp-based frame

sub_5EDA20 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
push	390h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDA49
mov	ecx, [ebp+var_4]
call	sub_5ED9D0
mov	[ebp+var_18], eax
jmp	short loc_5EDA50

loc_5EDA49:
mov	[ebp+var_18], 0

loc_5EDA50:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_5EDA20 endp

align 10h


; Attributes: bp-based frame

sub_5EDA60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
push	offset sub_5EDAE0
push	4
push	0E0h
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax
call	sub_40F3E0
mov	ecx, [ebp+var_4]
call	sub_401110
mov	ecx, [ebp+arg_0]
and	ecx, 1
jz	short loc_5EDAA0
push	390h
mov	edx, [ebp+var_4]
push	edx
call	sub_1111040
add	esp, 8

loc_5EDAA0:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EDA60 endp

align 10h


; Attributes: bp-based frame

sub_5EDAB0 proc	near

var_14=	dword ptr -14h
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
lea	eax, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_14]
add	eax, 0D8h
push	eax
call	sub_409500
call	nullsub_1
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5EDAB0 endp

align 10h


; Attributes: bp-based frame

sub_5EDAE0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0D8h
call	sub_409540
mov	esp, ebp
pop	ebp
retn
sub_5EDAE0 endp

align 10h


; Attributes: bp-based frame

sub_5EDB00 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	34h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDB26
mov	ecx, [ebp+var_4]
call	sub_5CD770
mov	[ebp+var_10], eax
jmp	short loc_5EDB2D

loc_5EDB26:
mov	[ebp+var_10], 0

loc_5EDB2D:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5EDB00 endp

align 10h


; Attributes: bp-based frame

sub_5EDB40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDB81
mov	ecx, 36B7h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0FFFFFFFFh
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_5EDB88

loc_5EDB81:
mov	[ebp+var_8], 0

loc_5EDB88:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5EDB40 endp

align 10h


; Attributes: bp-based frame

sub_5EDB90 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 36B8h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C0198
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5EDB90 endp

align 10h


; Attributes: bp-based frame

sub_5EDBE0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
push	30h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDC06
mov	ecx, [ebp+var_4]
call	sub_5EDB90
mov	[ebp+var_10], eax
jmp	short loc_5EDC0D

loc_5EDC06:
mov	[ebp+var_10], 0

loc_5EDC0D:
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5EDBE0 endp

align 10h


; Attributes: bp-based frame

sub_5EDC20 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
push	58h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDC46
mov	ecx, [ebp+var_4]
call	sub_4A3820
mov	[ebp+var_14], eax
jmp	short loc_5EDC4D

loc_5EDC46:
mov	[ebp+var_14], 0

loc_5EDC4D:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_5EDC20 endp

align 10h


; Attributes: bp-based frame

sub_5EDC60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	0Ch
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDC9E
mov	ecx, 370Eh
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_156E570
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_5EDCA5

loc_5EDC9E:
mov	[ebp+var_8], 0

loc_5EDCA5:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5EDC60 endp

align 10h


; Attributes: bp-based frame

sub_5EDCB0 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 370Ch
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C82FC
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_402390
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+8], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5EDCB0 endp

align 10h


; Attributes: bp-based frame

sub_5EDD00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407E50
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EDD30
push	34h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EDD30:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EDD00 endp

align 10h


; Attributes: bp-based frame

sub_5EDD40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDD77
mov	ecx, 3722h
mov	eax, [ebp+var_4]
call	sub_401100
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_15C8A0C
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
jmp	short loc_5EDD7E

loc_5EDD77:
mov	[ebp+var_8], 0

loc_5EDD7E:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5EDD40 endp

align 10h


; Attributes: bp-based frame

sub_5EDD90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
push	8
call	sub_11110D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5EDDB7
mov	eax, [ebp+var_4]
push	eax
call	sub_408EB0
mov	[ebp+var_8], eax
jmp	short loc_5EDDBE

loc_5EDDB7:
mov	[ebp+var_8], 0

loc_5EDDBE:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_5EDD90 endp

align 10h


; Attributes: bp-based frame

sub_5EDDD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EDDF8
push	88h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EDDF8:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EDDD0 endp

align 10h


; Attributes: bp-based frame

sub_5EDE10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B356C0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EDE33
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5EDE33:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EDE10 endp

align 10h


; Attributes: bp-based frame

sub_5EDE40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B22110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5EDE65
push	34h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5EDE65:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5EDE40 endp

align 10h


; Attributes: bp-based frame

sub_5EDE70 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_18], eax
mov	[ebp+var_14], 80h
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_10]
sar	ecx, 6
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	edx, [edx]
sub	edx, [eax+4]
sar	edx, 6
mov	eax, [ebp+var_18]
mov	eax, [eax+0Ch]
sub	eax, [ebp+var_4]
sar	eax, 2
sub	eax, 1
imul	eax, 2
add	eax, edx
add	eax, ecx
mov	esp, ebp
pop	ebp
retn
sub_5EDE70 endp

align 10h


; Attributes: bp-based frame

sub_5EDEE0 proc	near

var_68=	dword ptr -68h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_68], ecx
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_68]
add	eax, 10h
mov	ecx, [ebp+var_C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_68]
mov	edx, [ebp+var_10]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
call	sub_5EEEF0
add	esp, 20h
mov	ecx, [ebp+var_68]
call	sub_5EE3C0
mov	esp, ebp
pop	ebp
retn
sub_5EDEE0 endp

align 10h


; Attributes: bp-based frame

sub_5EDF50 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+18h]
sub	ecx, 40h
mov	edx, [ebp+var_C]
cmp	[edx+10h], ecx
jz	short loc_5EDF8E
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_5EEF50
add	esp, 8
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
add	ecx, 40h
mov	edx, [ebp+var_C]
mov	[edx+10h], ecx
jmp	short loc_5EDF9A

loc_5EDF8E:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_5EE8E0

loc_5EDF9A:
mov	esp, ebp
pop	ebp
retn	4
sub_5EDF50 endp



; Attributes: bp-based frame

sub_5EDFA0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_5EE1E0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5EDFA0 endp

align 10h


; Attributes: bp-based frame

sub_5EE000 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_5EE2A0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5EE000 endp

align 10h


; Attributes: bp-based frame

sub_5EE060 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
lea	eax, [ebp+var_30]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_34]
mov	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_5EE310
mov	[ebp+var_18], eax
mov	edx, [ebp+var_30]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
lea	eax, [ebp+var_8]
call	sub_4046E0
mov	esp, ebp
pop	ebp
retn	4
sub_5EE060 endp

align 10h


; Attributes: bp-based frame

sub_5EE0D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_14]
add	ecx, 10h
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_8]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
add	eax, 20h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_14]
add	edx, 24h
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_5EE420
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	8
sub_5EE0D0 endp

align 10h


; Attributes: bp-based frame

sub_5EE170 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
add	ecx, 40h
mov	edx, [ebp+var_C]
mov	[edx], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+8]
jnz	short loc_5EE1D9
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 2
shl	ecx, 6
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx], eax

loc_5EE1D9:
mov	esp, ebp
pop	ebp
retn
sub_5EE170 endp

align 10h


; Attributes: bp-based frame

sub_5EE1E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5EEFA0
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5EE237
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EE237:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5EE1E0 endp

align 10h


; Attributes: bp-based frame

sub_5EE250 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_5EE295
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_5EE9A0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_5EE295:
mov	esp, ebp
pop	ebp
retn
sub_5EE250 endp

align 10h


; Attributes: bp-based frame

sub_5EE2A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
mov	edx, [ebp+var_C]
add	edx, 4
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E650
add	esp, 10h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_50EB00
add	esp, 4
cmp	[ebp+var_4], 0
jz	short loc_5EE2F7
mov	edx, 1
shl	edx, 5
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EE2F7:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
sub	edx, 1
mov	eax, [ebp+var_C]
mov	[eax+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5EE2A0 endp

align 10h


; Attributes: bp-based frame

sub_5EE310 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_12=	word ptr -12h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
push	edi
mov	[ebp+var_18], ecx
push	1
mov	ecx, [ebp+var_18]
call	sub_5EE360
mov	[ebp+var_4], eax
xor	eax, eax
mov	byte ptr [ebp+var_14+1], al
mov	cl, byte ptr [ebp+var_14+1]
mov	byte ptr [ebp+var_12+1], cl
xor	edx, edx
mov	byte ptr [ebp+var_14], dl
mov	al, byte ptr [ebp+var_14]
mov	byte ptr [ebp+var_12], al
mov	esi, [ebp+arg_0]
mov	edi, [ebp+var_4]
add	edi, 8
mov	ecx, 24h
rep movsd
mov	eax, [ebp+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5EE310 endp

align 10h


; Attributes: bp-based frame

sub_5EE360 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
cmp	[ebp+arg_0], 1AF286Bh
jbe	short loc_5EE386
push	offset aOutOfMemory ; "out of memory\n"
call	_puts
add	esp, 4
push	1		; uExitCode
call	$LN32_0

loc_5EE386:
cmp	[ebp+arg_0], 0
jz	short loc_5EE3AF
mov	eax, [ebp+arg_0]
imul	eax, 98h
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5EE3B6

loc_5EE3AF:
mov	[ebp+var_C], 0

loc_5EE3B6:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_5EE360 endp	; sp-analysis failed

align 10h


; Attributes: bp-based frame

sub_5EE3C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+20h], 0
jz	short loc_5EE416
mov	ecx, [ebp+var_C]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_5EF160
mov	edx, [ebp+var_C]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+20h]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 0
jz	short loc_5EE416
mov	eax, [ebp+var_8]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5EE416:
mov	esp, ebp
pop	ebp
retn
sub_5EE3C0 endp

align 10h


; Attributes: bp-based frame

sub_5EE420 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	[ebp+var_18], 80h
mov	eax, [ebp+arg_0]
shr	eax, 1
add	eax, 1
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_10], ecx
mov	[ebp+var_14], 8
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_14]
push	eax
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_40]
mov	edx, [eax]
mov	[ecx+24h], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
push	ecx
mov	ecx, [ebp+var_40]
add	ecx, 20h
call	sub_5A9600
mov	edx, [ebp+var_40]
mov	[edx+20h], eax
mov	eax, [ebp+var_40]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_40]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_40]
call	sub_5EF110
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_2C], 80h
mov	eax, 2
shl	eax, 6
mov	ecx, [ebp+var_40]
add	eax, [ecx+4]
mov	edx, [ebp+var_40]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
sub	eax, 4
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_40]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_30], 80h
mov	ecx, 2
shl	ecx, 6
mov	edx, [ebp+var_34]
add	ecx, [edx+4]
mov	eax, [ebp+var_34]
mov	[eax+8], ecx
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_40]
mov	eax, [edx+4]
mov	[ecx], eax
mov	[ebp+var_3C], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 2
div	ecx
shl	edx, 6
mov	eax, [ebp+var_40]
add	edx, [eax+14h]
mov	ecx, [ebp+var_40]
mov	[ecx+10h], edx
mov	esp, ebp
pop	ebp
retn	4
sub_5EE420 endp

align 10h


; Attributes: bp-based frame

sub_5EE560 proc	near

var_128= dword ptr -128h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_68=	dword ptr -68h
var_5C=	byte ptr -5Ch
var_40=	byte ptr -40h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 128h
mov	[ebp+var_128], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_10]
call	sub_5EE170
mov	ecx, [ebp+var_128]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ecx+4]
mov	[ebp+var_20], eax
mov	edx, [ecx+8]
mov	[ebp+var_1C], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_18], eax
mov	[ebp+var_68], 80h
mov	ecx, [ebp+var_1C]
sub	ecx, [ebp+var_24]
sar	ecx, 6
mov	edx, [ebp+arg_4]
sub	edx, [ebp+arg_8]
sar	edx, 6
mov	eax, [ebp+arg_10]
sub	eax, [ebp+var_18]
sar	eax, 2
sub	eax, 1
imul	eax, 2
add	eax, edx
add	eax, ecx
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_128]
call	sub_5EDE70
shr	eax, 1
cmp	[ebp+var_14], eax
jnb	loc_5EE695
sub	esp, 10h
mov	[ebp+var_84], esp
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_10]
mov	[ecx], edx
mov	eax, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_88], esp
mov	ecx, [ebp+var_88]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_8C], esp
mov	ecx, [ebp+var_128]
mov	edx, [ebp+var_8C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_40]
push	edx
call	sub_5EF4D0
add	esp, 34h
mov	eax, [ebp+var_128]
mov	ecx, [eax]
push	ecx		; void *
call	sub_5F07D0
add	esp, 4
mov	ecx, [ebp+var_128]
call	sub_5EF250
jmp	loc_5EE726

loc_5EE695:
sub	esp, 10h
mov	[ebp+var_B4], esp
mov	edx, [ebp+var_B4]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
mov	[edx+4], ecx
mov	eax, [ebp+arg_C]
mov	[edx+8], eax
mov	ecx, [ebp+arg_10]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	[ebp+var_B8], esp
mov	edx, [ebp+var_128]
add	edx, 10h
mov	eax, [ebp+var_B8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_BC], esp
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_C]
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	[eax+0Ch], edx
lea	eax, [ebp+var_5C]
push	eax
call	sub_5EF560
add	esp, 34h
mov	ecx, [ebp+var_128]
call	sub_5EEFD0

loc_5EE726:
mov	ecx, [ebp+var_128]
mov	edx, [ecx]
mov	[ebp+var_10C], edx
mov	eax, [ecx+4]
mov	[ebp+var_108], eax
mov	edx, [ecx+8]
mov	[ebp+var_104], edx
mov	eax, [ecx+0Ch]
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_14]
push	ecx
lea	ecx, [ebp+var_10C]
call	sub_5EF030
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_10C]
mov	[edx], eax
mov	ecx, [ebp+var_108]
mov	[edx+4], ecx
mov	eax, [ebp+var_104]
mov	[edx+8], eax
mov	ecx, [ebp+var_100]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	18h
sub_5EE560 endp

align 10h


; Attributes: bp-based frame

sub_5EE790 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+var_5C]
mov	ecx, [eax+0Ch]
add	ecx, 4
mov	[ebp+var_4], ecx
jmp	short loc_5EE7B0

loc_5EE7A7:
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx

loc_5EE7B0:
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_4]
cmp	ecx, [eax+1Ch]
jnb	short loc_5EE818
mov	[ebp+var_8], 80h
mov	edx, 2
shl	edx, 6
mov	eax, [ebp+var_4]
add	edx, [eax]
mov	[ebp+var_18], edx
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_14], edx
push	0
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_5F0970
add	esp, 0Ch
mov	[ebp+var_1C], 80h
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jz	short loc_5EE816
mov	ecx, 2
shl	ecx, 6
push	ecx		; int
mov	edx, [ebp+var_20]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5EE816:
jmp	short loc_5EE7A7

loc_5EE818:
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_5C]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+1Ch]
jz	short loc_5EE89A
mov	eax, [ebp+var_5C]
mov	ecx, [eax+8]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_2C], eax
push	0
mov	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
call	sub_5F0970
add	esp, 0Ch
mov	eax, [ebp+var_5C]
mov	ecx, [eax+10h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+14h]
mov	[ebp+var_3C], eax
push	0
mov	ecx, [ebp+var_40]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
call	sub_5F0970
add	esp, 0Ch
mov	[ebp+var_44], 80h
mov	eax, [ebp+var_5C]
mov	ecx, [eax+14h]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_5EE898
mov	edx, 2
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EE898:
jmp	short loc_5EE8BD

loc_5EE89A:
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+10h]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
push	0
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_54]
push	eax
call	sub_5F0970
add	esp, 0Ch

loc_5EE8BD:
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_5C]
add	edx, 10h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn
sub_5EE790 endp



; Attributes: bp-based frame

sub_5EE8E0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_28]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_28]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_5EE918
push	0
push	1
mov	ecx, [ebp+var_28]
call	sub_5EF2F0

loc_5EE918:
mov	[ebp+var_4], 80h
push	2
mov	ecx, [ebp+var_28]
add	ecx, 24h
call	sub_503430
mov	ecx, [ebp+var_28]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_28]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_5EEF50
add	esp, 8
mov	eax, [ebp+var_28]
mov	ecx, [eax+1Ch]
add	ecx, 4
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
add	edx, 10h
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_24]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_1C], 80h
mov	edx, 2
shl	edx, 6
mov	eax, [ebp+var_20]
add	edx, [eax+4]
mov	ecx, [ebp+var_20]
mov	[ecx+8], edx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_28]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5EE8E0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5EE9A0(void	*)
sub_5EE9A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx

loc_5EE9A9:
cmp	[ebp+arg_0], 0
jz	short loc_5EE9F9
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_C]
call	sub_5EE9A0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_5EEFA0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_5EE9F1
mov	edx, 1
imul	edx, 38h
push	edx		; int
mov	eax, [ebp+arg_0]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EE9F1:
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
jmp	short loc_5EE9A9

loc_5EE9F9:
mov	esp, ebp
pop	ebp
retn	4
sub_5EE9A0 endp

align 10h


; Attributes: bp-based frame

sub_5EEA00 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	[ebp+var_5C], ecx
mov	[ebp+var_30], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_5F1580
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_5C]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_3C]
setz	al
mov	[ebp+var_5D], al
movzx	ecx, [ebp+var_5D]
test	ecx, ecx
jnz	short loc_5EEA92
or	[ebp+var_30], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_40], edx
mov	eax, [ebp+var_5C]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_11]
call	sub_42BEE0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5EEA92
mov	[ebp+var_64], 0
jmp	short loc_5EEA99

loc_5EEA92:
mov	[ebp+var_64], 1

loc_5EEA99:
mov	dl, byte ptr [ebp+var_64]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_30]
and	eax, 1
jz	short loc_5EEAAB
and	[ebp+var_30], 0FFFFFFFEh

loc_5EEAAB:
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5EEB0C
mov	[ebp+var_24], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[ebp+var_20], eax
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_24]
mov	[ebp+var_18], edx
lea	eax, [ebp+var_58]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	ecx, [ebp+var_20]
push	ecx
push	ecx
mov	[ebp+var_54], esp
mov	ecx, [ebp+var_58]
mov	eax, [ebp+var_54]
call	sub_4046E0
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_5F0200
lea	eax, [ebp+var_2C]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_5EEB0C:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	esp, ebp
pop	ebp
retn	4
sub_5EEA00 endp

align 10h


; Attributes: bp-based frame

sub_5EEB20 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3C=	byte ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_4DE750
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_7C], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_5E9440
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_7C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
mov	[ebp+var_54], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_54]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_58]
setz	al
mov	[ebp+var_7D], al
movzx	ecx, [ebp+var_7D]
test	ecx, ecx
jnz	short loc_5EEC11
or	[ebp+var_4C], 1
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_7C]
mov	cl, [eax+14h]
mov	[ebp+var_1D], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_5C]
mov	[ebp+var_84], edx
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_88]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5EEBF0
jb	short loc_5EEBE4
mov	ecx, [ebp+var_84]
mov	edx, [ebp+var_88]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5EEBF0

loc_5EEBE4:
mov	[ebp+var_8C], 1
jmp	short loc_5EEBFA

loc_5EEBF0:
mov	[ebp+var_8C], 0

loc_5EEBFA:
movzx	ecx, byte ptr [ebp+var_8C]
test	ecx, ecx
jnz	short loc_5EEC11
mov	[ebp+var_90], 0
jmp	short loc_5EEC1B

loc_5EEC11:
mov	[ebp+var_90], 1

loc_5EEC1B:
mov	dl, byte ptr [ebp+var_90]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5EEC3E
and	[ebp+var_4C], 0FFFFFFFEh
mov	[ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_5EEC3E:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5EECDC
xor	edx, edx
mov	[ebp+var_64], edx
mov	[ebp+var_60], edx
mov	eax, [ebp+var_60]
push	eax
mov	ecx, [ebp+var_64]
push	ecx
lea	edx, [ebp+var_65]
push	edx
lea	ecx, [ebp+var_3C]
call	sub_4899B0
lea	ecx, [ebp+var_3C]
call	sub_471130
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_34], ecx
mov	edx, [eax+4]
mov	[ebp+var_30], edx
lea	eax, [ebp+var_3C]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_479590
lea	ecx, [ebp+var_78]
mov	[ebp+var_6C], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_6C]
call	sub_4046E0
lea	edx, [ebp+var_34]
push	edx
push	ecx
mov	[ebp+var_74], esp
mov	ecx, [ebp+var_78]
mov	eax, [ebp+var_74]
call	sub_4046E0
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_7C]
call	sub_5EFAF0
lea	ecx, [ebp+var_48]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [edx]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_2C]
call	sub_5D2630
lea	ecx, [ebp+var_3C]
call	sub_5D2630

loc_5EECDC:
mov	eax, [ebp+var_10]
add	eax, 18h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5EEB20 endp

align 10h


; Attributes: bp-based frame

sub_5EED00 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_5EED11:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_10]
jz	short loc_5EED4C
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_5EED4A
mov	ecx, 1
imul	ecx, 98h
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5EED4A:
jmp	short loc_5EED11

loc_5EED4C:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn
sub_5EED00 endp

align 10h


; Attributes: bp-based frame

sub_5EED70 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_60=	byte ptr -60h
var_40=	word ptr -40h
var_38=	byte ptr -38h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A0h
push	esi
push	edi
mov	[ebp+var_94], ecx
mov	[ebp+var_6C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_5F15F0
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_94]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_78]
mov	[ebp+var_74], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_74]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_78]
setz	al
mov	[ebp+var_95], al
movzx	ecx, [ebp+var_95]
test	ecx, ecx
jnz	short loc_5EEE1F
or	[ebp+var_6C], 1
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_7C], edx
mov	eax, [ebp+var_94]
mov	cl, [eax+14h]
mov	[ebp+var_11], cl
mov	edx, [ebp+var_7C]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_5EEE1F
mov	[ebp+var_9C], 0
jmp	short loc_5EEE29

loc_5EEE1F:
mov	[ebp+var_9C], 1

loc_5EEE29:
mov	al, byte ptr [ebp+var_9C]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_6C]
and	ecx, 1
jz	short loc_5EEE3E
and	[ebp+var_6C], 0FFFFFFFEh

loc_5EEE3E:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5EEED5
lea	ecx, [ebp+var_60]
call	sub_10E91D0
mov	[ebp+var_80], eax
mov	eax, [ebp+arg_0]
mov	cx, [eax]
mov	[ebp+var_40], cx
mov	esi, [ebp+var_80]
lea	edi, [ebp+var_38]
mov	ecx, 8
rep movsd
lea	edx, [ebp+var_90]
mov	[ebp+var_84], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_84]
call	sub_4046E0
lea	eax, [ebp+var_40]
push	eax
push	ecx
mov	[ebp+var_8C], esp
mov	ecx, [ebp+var_90]
mov	eax, [ebp+var_8C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
push	ecx
mov	ecx, [ebp+var_94]
call	sub_5EF5F0
lea	edx, [ebp+var_68]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
lea	ecx, [ebp+var_38]
call	sub_10E91C0
lea	ecx, [ebp+var_60]
call	sub_10E91C0

loc_5EEED5:
mov	eax, [ebp+var_4]
add	eax, 18h
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_5EED70 endp

align 10h


; Attributes: bp-based frame

sub_5EEEF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 54h
push	0
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
call	sub_5F0730
add	esp, 24h
mov	esp, ebp
pop	ebp
retn
sub_5EEEF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5EEF50(void *, int)
sub_5EEF50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	40h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5EEF94
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_8]
call	sub_5F0800
mov	[ebp+var_C], eax
jmp	short loc_5EEF9B

loc_5EEF94:
mov	[ebp+var_C], 0

loc_5EEF9B:
mov	esp, ebp
pop	ebp
retn
sub_5EEF50 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5EEFA0(void *)
sub_5EEFA0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 8
call	sub_10E91C0
xor	ecx, ecx
and	ecx, 1
jz	short loc_5EEFC7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5EEFC7:
mov	esp, ebp
pop	ebp
retn
sub_5EEFA0 endp

align 10h


; Attributes: bp-based frame

sub_5EEFD0 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [eax+10h]
cmp	edx, [ecx+14h]
jz	short loc_5EF007
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
sub	ecx, 40h
mov	edx, [ebp+var_8]
mov	[edx+10h], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
push	ecx		; void *
call	sub_5F07D0
add	esp, 4
jmp	short loc_5EF01E

loc_5EF007:
mov	ecx, [ebp+var_8]
call	sub_5EF1C0
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
push	eax		; void *
call	sub_5F07D0
add	esp, 4

loc_5EF01E:
mov	esp, ebp
pop	ebp
retn
sub_5EEFD0 endp

align 10h


; Attributes: bp-based frame

sub_5EF030 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
mov	[ebp+var_10], 80h
mov	[ebp+var_8], 2
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax]
sub	edx, [ecx+4]
sar	edx, 6
add	edx, [ebp+arg_0]
mov	[ebp+var_4], edx
js	short loc_5EF07A
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_8]
jge	short loc_5EF07A
mov	ecx, [ebp+arg_0]
shl	ecx, 6
mov	edx, [ebp+var_1C]
add	ecx, [edx]
mov	eax, [ebp+var_1C]
mov	[eax], ecx
jmp	loc_5EF100

loc_5EF07A:
cmp	[ebp+var_4], 0
jle	short loc_5EF08D
mov	eax, [ebp+var_4]
xor	edx, edx
div	[ebp+var_8]
mov	[ebp+var_20], eax
jmp	short loc_5EF0A2

loc_5EF08D:
mov	eax, [ebp+var_4]
neg	eax
sub	eax, 1
xor	edx, edx
div	[ebp+var_8]
neg	eax
sub	eax, 1
mov	[ebp+var_20], eax

loc_5EF0A2:
mov	ecx, [ebp+var_20]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	ecx, [ebp+var_C]
lea	edx, [eax+ecx*4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_14], 80h
mov	edx, 2
shl	edx, 6
mov	eax, [ebp+var_1C]
add	edx, [eax+4]
mov	ecx, [ebp+var_1C]
mov	[ecx+8], edx
mov	edx, [ebp+var_C]
imul	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
sub	eax, edx
shl	eax, 6
mov	ecx, [ebp+var_1C]
add	eax, [ecx+4]
mov	edx, [ebp+var_1C]
mov	[edx], eax

loc_5EF100:
mov	esp, ebp
pop	ebp
retn	4
sub_5EF030 endp

align 10h


; Attributes: bp-based frame

sub_5EF110 proc	near

var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5EF12A

loc_5EF121:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_5EF12A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_5EF14D
mov	[ebp+var_8], 80h
push	2
mov	ecx, [ebp+var_18]
add	ecx, 24h
call	sub_503430
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_5EF121

loc_5EF14D:
mov	esp, ebp
pop	ebp
retn	8
sub_5EF110 endp

align 10h


; Attributes: bp-based frame

sub_5EF160 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5EF17A

loc_5EF171:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_5EF17A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_5EF1AE
mov	[ebp+var_8], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_5EF1AC
mov	edx, 2
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EF1AC:
jmp	short loc_5EF171

loc_5EF1AE:
mov	esp, ebp
pop	ebp
retn	8
sub_5EF160 endp

align 10h


; Attributes: bp-based frame

sub_5EF1C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_18]
mov	ecx, [eax+14h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5EF1F4
mov	edx, 2
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EF1F4:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
sub	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_C], 80h
mov	eax, 2
shl	eax, 6
mov	ecx, [ebp+var_10]
add	eax, [ecx+4]
mov	edx, [ebp+var_10]
mov	[edx+8], eax
mov	eax, [ebp+var_18]
mov	ecx, [eax+18h]
sub	ecx, 40h
mov	edx, [ebp+var_18]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn
sub_5EF1C0 endp

align 10h


; Attributes: bp-based frame

sub_5EF250 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+8]
sub	ecx, 40h
mov	edx, [ebp+var_14]
cmp	[edx], ecx
jz	short loc_5EF278
mov	eax, [ebp+var_14]
mov	ecx, [eax]
add	ecx, 40h
mov	edx, [ebp+var_14]
mov	[edx], ecx
jmp	short loc_5EF2E9

loc_5EF278:
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5EF2A3
mov	edx, 2
shl	edx, 6
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5EF2A3:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
add	edx, 4
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_C], 80h
mov	edx, 2
shl	edx, 6
mov	eax, [ebp+var_14]
add	edx, [eax+4]
mov	ecx, [ebp+var_14]
mov	[ecx+8], edx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[edx], ecx

loc_5EF2E9:
mov	esp, ebp
pop	ebp
retn
sub_5EF250 endp

align 10h


; Attributes: bp-based frame

sub_5EF2F0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_64]
cmp	[edx+24h], ecx
jbe	short loc_5EF39B
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_5EF373
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_5EF396

loc_5EF373:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_5EF396:
jmp	loc_5EF448

loc_5EF39B:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_64]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_64]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5A9600
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jz	short loc_5EF436
mov	ecx, [ebp+var_50]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_4C]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5EF436:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_5EF448:
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 2
shl	eax, 6
mov	ecx, [ebp+var_64]
add	eax, [ecx+4]
mov	edx, [ebp+var_64]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_58], 80h
mov	eax, 2
shl	eax, 6
mov	ecx, [ebp+var_5C]
add	eax, [ecx+4]
mov	edx, [ebp+var_5C]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_5EF2F0 endp

align 10h


; Attributes: bp-based frame

sub_5EF4D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 68h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 10h
mov	[ebp+var_18], esp
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
mov	edx, [ebp+arg_18]
mov	[eax+4], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_20]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_20], esp
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F0870
add	esp, 38h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5EF4D0 endp

align 10h


; Attributes: bp-based frame

sub_5EF560 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 68h
xor	eax, eax
mov	[ebp+var_11], al
mov	cl, [ebp+var_11]
mov	[ebp+var_1], cl
lea	edx, [ebp+var_1]
push	edx
sub	esp, 10h
mov	[ebp+var_18], esp
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_24]
mov	[eax], ecx
mov	edx, [ebp+arg_28]
mov	[eax+4], edx
mov	ecx, [ebp+arg_2C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_30]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
mov	edx, [ebp+arg_18]
mov	[eax+4], edx
mov	ecx, [ebp+arg_1C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_20]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_20], esp
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	[eax+4], edx
mov	ecx, [ebp+arg_C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_10]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F08F0
add	esp, 38h
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5EF560 endp

align 10h


; Attributes: bp-based frame

sub_5EF5F0 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5EF7DC
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EF659
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F0B00
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB

loc_5EF659:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+arg_8]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5EF6AA
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB
jmp	loc_5EF7D7

loc_5EF6AA:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_8]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_5C]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5EF6E4
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB

loc_5EF6E4:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5EF72E
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB

loc_5EF72E:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+arg_8]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setl	cl
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5EF7AC
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5EF785
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB
jmp	short loc_5EF7AA

loc_5EF785:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB

loc_5EF7AA:
jmp	short loc_5EF7D7

loc_5EF7AC:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F0B00
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB

loc_5EF7D7:
jmp	loc_5EFADB

loc_5EF7DC:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5EF875
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+arg_8]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_70]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5EF845
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB
jmp	short loc_5EF870

loc_5EF845:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F0B00
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB

loc_5EF870:
jmp	loc_5EFADB

loc_5EF875:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_7C]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+arg_8]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setl	cl
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5EF8EF
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+arg_8]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+var_84]
movzx	ecx, word ptr [eax]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EF8EF
mov	[ebp+var_A4], 1
jmp	short loc_5EF8F9

loc_5EF8EF:
mov	[ebp+var_A4], 0

loc_5EF8F9:
mov	dl, byte ptr [ebp+var_A4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5EF90E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5EF90E:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5EF970
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5EF946
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB
jmp	short loc_5EF96B

loc_5EF946:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	loc_5EFADB

loc_5EF96B:
jmp	loc_5EFADB

loc_5EF970:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5EF9C5
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_8]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_8C]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
mov	[ebp+var_11], dl

loc_5EF9C5:
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5EFA19
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	short loc_5EFA19
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_A0]
jz	short loc_5EFA0D
or	[ebp+var_4C], 2
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_94], eax
mov	ecx, [ebp+var_94]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+arg_8]
movzx	ecx, word ptr [eax]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EFA19

loc_5EFA0D:
mov	[ebp+var_A8], 1
jmp	short loc_5EFA23

loc_5EFA19:
mov	[ebp+var_A8], 0

loc_5EFA23:
mov	dl, byte ptr [ebp+var_A8]
mov	[ebp+var_3D], dl
mov	eax, [ebp+var_4C]
and	eax, 2
jz	short loc_5EFA38
and	[ebp+var_4C], 0FFFFFFFDh

loc_5EFA38:
movzx	ecx, [ebp+var_3D]
test	ecx, ecx
jz	short loc_5EFA91
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5EFA6D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	short loc_5EFADB
jmp	short loc_5EFA8F

loc_5EFA6D:
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F09C0
mov	eax, [ebp+arg_0]
jmp	short loc_5EFADB

loc_5EFA8F:
jmp	short loc_5EFADB

loc_5EFA91:
movzx	edx, [ebp+var_6]
movzx	eax, [ebp+var_11]
cmp	edx, eax
jnz	short loc_5EFAAF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5EFADB
jmp	short loc_5EFADB

loc_5EFAAF:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_48]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F0B00
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5EFADB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5EF5F0 endp

align 10h


; Attributes: bp-based frame

sub_5EFAF0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 108h
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5EFDA5
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5EFB59
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F0E10
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7

loc_5EFB59:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_54]
mov	[ebp+var_A4], eax
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5EFBA8
jb	short loc_5EFB9C
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A8]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5EFBA8

loc_5EFB9C:
mov	[ebp+var_AC], 1
jmp	short loc_5EFBB2

loc_5EFBA8:
mov	[ebp+var_AC], 0

loc_5EFBB2:
mov	dl, byte ptr [ebp+var_AC]
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5EFBED
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7
jmp	loc_5EFDA0

loc_5EFBED:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_5C]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_B0], eax
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5EFC3C
jb	short loc_5EFC30
mov	edx, [ebp+var_B0]
mov	eax, [ebp+var_B4]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5EFC3C

loc_5EFC30:
mov	[ebp+var_B8], 1
jmp	short loc_5EFC46

loc_5EFC3C:
mov	[ebp+var_B8], 0

loc_5EFC46:
mov	dl, byte ptr [ebp+var_B8]
mov	[ebp+var_5], dl
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5EFC6A
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7

loc_5EFC6A:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_A0]
jnz	short loc_5EFCB4
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7

loc_5EFCB4:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_64]
mov	[ebp+var_BC], edx
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5EFD03
jb	short loc_5EFCF7
mov	ecx, [ebp+var_BC]
mov	edx, [ebp+var_C0]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5EFD03

loc_5EFCF7:
mov	[ebp+var_C4], 1
jmp	short loc_5EFD0D

loc_5EFD03:
mov	[ebp+var_C4], 0

loc_5EFD0D:
mov	cl, byte ptr [ebp+var_C4]
mov	[ebp+var_20], cl
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5EFD75
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5EFD4E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7
jmp	short loc_5EFD73

loc_5EFD4E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7

loc_5EFD73:
jmp	short loc_5EFDA0

loc_5EFD75:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F0E10
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7

loc_5EFDA0:
jmp	loc_5F01F7

loc_5EFDA5:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_5EFE81
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_8]
mov	[ebp+var_C8], eax
mov	[ebp+var_CC], ecx
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5EFE09
jb	short loc_5EFDFD
mov	edx, [ebp+var_C8]
mov	eax, [ebp+var_CC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5EFE09

loc_5EFDFD:
mov	[ebp+var_D0], 1
jmp	short loc_5EFE13

loc_5EFE09:
mov	[ebp+var_D0], 0

loc_5EFE13:
mov	dl, byte ptr [ebp+var_D0]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5EFE51
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7
jmp	short loc_5EFE7C

loc_5EFE51:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F0E10
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7

loc_5EFE7C:
jmp	loc_5F01F7

loc_5EFE81:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_7C]
mov	[ebp+var_D4], edx
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5EFEEA
jb	short loc_5EFEDE
mov	ecx, [ebp+var_D4]
mov	edx, [ebp+var_D8]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5EFEEA

loc_5EFEDE:
mov	[ebp+var_DC], 1
jmp	short loc_5EFEF4

loc_5EFEEA:
mov	[ebp+var_DC], 0

loc_5EFEF4:
mov	cl, byte ptr [ebp+var_DC]
mov	[ebp+var_6], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5EFF7F
or	[ebp+var_4C], 1
mov	eax, [ebp+var_C]
add	eax, 10h
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	edx, [ebp+arg_8]
mov	[ebp+var_E0], ecx
mov	[ebp+var_E4], edx
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
ja	short loc_5EFF5E
jb	short loc_5EFF52
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+var_E4]
mov	edx, [eax]
cmp	edx, [ecx]
jnb	short loc_5EFF5E

loc_5EFF52:
mov	[ebp+var_E8], 1
jmp	short loc_5EFF68

loc_5EFF5E:
mov	[ebp+var_E8], 0

loc_5EFF68:
movzx	eax, byte ptr [ebp+var_E8]
test	eax, eax
jz	short loc_5EFF7F
mov	[ebp+var_EC], 1
jmp	short loc_5EFF89

loc_5EFF7F:
mov	[ebp+var_EC], 0

loc_5EFF89:
mov	cl, byte ptr [ebp+var_EC]
mov	[ebp+var_3A], cl
mov	edx, [ebp+var_4C]
and	edx, 1
jz	short loc_5EFF9E
and	[ebp+var_4C], 0FFFFFFFEh

loc_5EFF9E:
movzx	eax, [ebp+var_3A]
test	eax, eax
jz	short loc_5F0000
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5EFFD6
mov	edx, [ebp+var_C]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7
jmp	short loc_5EFFFB

loc_5EFFD6:
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	loc_5F01F7

loc_5EFFFB:
jmp	loc_5F01F7

loc_5F0000:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_10]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	edx, [ebp+var_6]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_11], dl
movzx	eax, [ebp+var_6]
test	eax, eax
jnz	short loc_5F0098
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_8C]
mov	eax, [ebp+arg_8]
mov	[ebp+var_F0], edx
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5F0085
jb	short loc_5F0079
mov	ecx, [ebp+var_F0]
mov	edx, [ebp+var_F4]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5F0085

loc_5F0079:
mov	[ebp+var_F8], 1
jmp	short loc_5F008F

loc_5F0085:
mov	[ebp+var_F8], 0

loc_5F008F:
mov	cl, byte ptr [ebp+var_F8]
mov	[ebp+var_11], cl

loc_5F0098:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	loc_5F0135
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_5F0135
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_5F0129
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_94], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_94]
mov	[ebp+var_FC], eax
mov	[ebp+var_100], ecx
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5F0114
jb	short loc_5F0108
mov	edx, [ebp+var_FC]
mov	eax, [ebp+var_100]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5F0114

loc_5F0108:
mov	[ebp+var_104], 1
jmp	short loc_5F011E

loc_5F0114:
mov	[ebp+var_104], 0

loc_5F011E:
movzx	edx, byte ptr [ebp+var_104]
test	edx, edx
jz	short loc_5F0135

loc_5F0129:
mov	[ebp+var_108], 1
jmp	short loc_5F013F

loc_5F0135:
mov	[ebp+var_108], 0

loc_5F013F:
mov	al, byte ptr [ebp+var_108]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5F0154
and	[ebp+var_4C], 0FFFFFFFDh

loc_5F0154:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5F01AD
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5F0189
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	short loc_5F01F7
jmp	short loc_5F01AB

loc_5F0189:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_5F0CA0
mov	eax, [ebp+arg_0]
jmp	short loc_5F01F7

loc_5F01AB:
jmp	short loc_5F01F7

loc_5F01AD:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5F01CB
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5F01F7
jmp	short loc_5F01F7

loc_5F01CB:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_5F0E10
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5F01F7:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5EFAF0 endp

align 10h


; Attributes: bp-based frame

sub_5F0200 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_CC=	dword ptr -0CCh
var_BC=	dword ptr -0BCh
var_AC=	dword ptr -0ACh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_74=	dword ptr -74h
var_64=	dword ptr -64h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3D=	byte ptr -3Dh
var_3A=	byte ptr -3Ah
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0E8h
mov	[ebp+var_E0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_E0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5F03FB
mov	edx, [ebp+var_E0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5F0269
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_5F1140
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F071B

loc_5F0269:
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_1D], al
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_5F02BD
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	loc_5F071B
jmp	loc_5F03F6

loc_5F02BD:
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_64]
push	eax
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jnz	short loc_5F02FA
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F071B

loc_5F02FA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	edx, [ebp+var_4]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_E0]
jnz	short loc_5F0344
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	loc_5F071B

loc_5F0344:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5F03C5
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5F039E
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	loc_5F071B
jmp	short loc_5F03C3

loc_5F039E:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	loc_5F071B

loc_5F03C3:
jmp	short loc_5F03F6

loc_5F03C5:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_E0]
call	sub_5F1140
mov	[ebp+var_84], eax
mov	edx, [ebp+var_84]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F071B

loc_5F03F6:
jmp	loc_5F071B

loc_5F03FB:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_E0]
jnz	loc_5F04A3
mov	ecx, [ebp+var_E0]
mov	edx, [ecx+0Ch]
add	edx, 10h
mov	[ebp+var_88], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_88]
push	ecx
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_2D], al
movzx	edx, [ebp+var_2D]
test	edx, edx
jz	short loc_5F046D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_E0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	loc_5F071B
jmp	short loc_5F049E

loc_5F046D:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_5F1140
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F071B

loc_5F049E:
jmp	loc_5F071B

loc_5F04A3:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	edx, [ebp+var_C]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_6], al
movzx	eax, [ebp+var_6]
test	eax, eax
jz	short loc_5F0529
or	[ebp+var_4C], 1
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_AC], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_AC]
push	eax
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
movzx	ecx, al
test	ecx, ecx
jz	short loc_5F0529
mov	[ebp+var_E4], 1
jmp	short loc_5F0533

loc_5F0529:
mov	[ebp+var_E4], 0

loc_5F0533:
mov	dl, byte ptr [ebp+var_E4]
mov	[ebp+var_3A], dl
mov	eax, [ebp+var_4C]
and	eax, 1
jz	short loc_5F0548
and	[ebp+var_4C], 0FFFFFFFEh

loc_5F0548:
movzx	ecx, [ebp+var_3A]
test	ecx, ecx
jz	short loc_5F05AA
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_5F0580
mov	eax, [ebp+var_C]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	loc_5F071B
jmp	short loc_5F05A5

loc_5F0580:
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	loc_5F071B

loc_5F05A5:
jmp	loc_5F071B

loc_5F05AA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	eax, [ebp+var_6]
neg	eax
sbb	eax, eax
add	eax, 1
mov	[ebp+var_11], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5F0602
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_BC], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_BC]
push	ecx
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_11], al

loc_5F0602:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_5F0659
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_5F0659
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_E0]
jz	short loc_5F064D
or	[ebp+var_4C], 2
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_CC], edx
mov	eax, [ebp+var_CC]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_E0]
add	ecx, 14h
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jz	short loc_5F0659

loc_5F064D:
mov	[ebp+var_E8], 1
jmp	short loc_5F0663

loc_5F0659:
mov	[ebp+var_E8], 0

loc_5F0663:
mov	al, byte ptr [ebp+var_E8]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_5F0678
and	[ebp+var_4C], 0FFFFFFFDh

loc_5F0678:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_5F06D1
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5F06AD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	short loc_5F071B
jmp	short loc_5F06CF

loc_5F06AD:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_E0]
call	sub_5F1000
mov	eax, [ebp+arg_0]
jmp	short loc_5F071B

loc_5F06CF:
jmp	short loc_5F071B

loc_5F06D1:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_5F06EF
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5F071B
jmp	short loc_5F071B

loc_5F06EF:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_E0]
call	sub_5F1140
mov	[ebp+var_DC], eax
mov	ecx, [ebp+var_DC]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5F071B:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5F0200 endp

align 10h


; Attributes: bp-based frame

sub_5F0730 proc	near

var_44=	dword ptr -44h
var_34=	dword ptr -34h
var_24=	dword ptr -24h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 44h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_34]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	ecx, [ebp+arg_14]
mov	[edx+4], ecx
mov	eax, [ebp+arg_18]
mov	[edx+8], eax
mov	ecx, [ebp+arg_1C]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
jmp	short loc_5F0785

loc_5F077D:
lea	ecx, [ebp+var_44]
call	sub_5EE170

loc_5F0785:
mov	eax, [ebp+var_44]
xor	ecx, ecx
cmp	eax, [ebp+var_34]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5F07C2
xor	eax, eax
mov	[ebp+var_15], al
mov	ecx, [ebp+var_44]
mov	[ebp+var_24], ecx
mov	ecx, [ebp+var_24]
add	ecx, 10h
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5F07C0
mov	eax, [ebp+var_24]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F07C0:
jmp	short loc_5F077D

loc_5F07C2:
mov	esp, ebp
pop	ebp
retn
sub_5F0730 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5F07D0(void *)
sub_5F07D0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
add	ecx, 10h
call	sub_407E50
xor	ecx, ecx
and	ecx, 1
jz	short loc_5F07F7
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F07F7:
mov	esp, ebp
pop	ebp
retn
sub_5F07D0 endp

align 10h


; Attributes: bp-based frame

sub_5F0800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx]
mov	[eax], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_403400
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+38h]
mov	[ecx+38h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+3Ch]
mov	[ecx+3Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F0800 endp

align 10h


; Attributes: bp-based frame

sub_5F0870 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 48h
push	0
lea	eax, [ebp+var_1]
push	eax
sub	esp, 10h
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+arg_18]
mov	[ecx+4], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_20]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5F1420
add	esp, 3Ch
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5F0870 endp

align 10h


; Attributes: bp-based frame

sub_5F08F0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 48h
push	0
lea	eax, [ebp+var_1]
push	eax
sub	esp, 10h
mov	[ebp+var_14], esp
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
mov	eax, [ebp+arg_18]
mov	[ecx+4], eax
mov	edx, [ebp+arg_1C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_20]
mov	[ecx+0Ch], eax
sub	esp, 10h
mov	[ebp+var_1C], esp
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
mov	[ecx+4], eax
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_10]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_5F14D0
add	esp, 3Ch
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5F08F0 endp

align 10h


; Attributes: bp-based frame

sub_5F0970 proc	near

var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_5F098C

loc_5F0983:
mov	edx, [ebp+var_8]
add	edx, 40h
mov	[ebp+var_8], edx

loc_5F098C:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_4]
jz	short loc_5F09B9
xor	ecx, ecx
mov	[ebp+var_2], cl
mov	ecx, [ebp+var_8]
add	ecx, 10h
call	sub_407E50
xor	edx, edx
and	edx, 1
jz	short loc_5F09B7
mov	eax, [ebp+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F09B7:
jmp	short loc_5F0983

loc_5F09B9:
mov	esp, ebp
pop	ebp
retn
sub_5F0970 endp

align 10h


; Attributes: bp-based frame

sub_5F09C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5F0A07
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5F1380
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5F0ABE

loc_5F0A07:
cmp	[ebp+arg_10], 0
jnz	short loc_5F0A43
cmp	[ebp+arg_C], 0
jnz	short loc_5F0A3A
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+arg_8]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5F0A43

loc_5F0A3A:
mov	[ebp+var_34], 1
jmp	short loc_5F0A4A

loc_5F0A43:
mov	[ebp+var_34], 0

loc_5F0A4A:
mov	cl, byte ptr [ebp+var_34]
mov	[ebp+var_5], cl
mov	edx, [ebp+var_C]
and	edx, 1
jz	short loc_5F0A5C
and	[ebp+var_C], 0FFFFFFFEh

loc_5F0A5C:
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_5F0A92
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5F1380
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8]
jnz	short loc_5F0A90
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx

loc_5F0A90:
jmp	short loc_5F0ABE

loc_5F0A92:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_30]
call	sub_5F1380
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+0Ch]
jnz	short loc_5F0ABE
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx

loc_5F0ABE:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_77E4A0
add	esp, 8
mov	ecx, [ebp+var_30]
mov	edx, [ecx+10h]
add	edx, 1
mov	eax, [ebp+var_30]
mov	[eax+10h], edx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5F09C0 endp

align 10h


; Attributes: bp-based frame

sub_5F0B00 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5F0B1C:
cmp	[ebp+var_10], 0
jz	short loc_5F0B6B
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
movzx	eax, word ptr [edx]
mov	ecx, [ebp+arg_4]
movzx	edx, word ptr [ecx]
xor	ecx, ecx
cmp	edx, eax
setl	cl
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5F0B5A
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_5C], ecx
jmp	short loc_5F0B63

loc_5F0B5A:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_5C], eax

loc_5F0B63:
mov	ecx, [ebp+var_5C]
mov	[ebp+var_10], ecx
jmp	short loc_5F0B1C

loc_5F0B6B:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5F0C0D
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_5D], cl
movzx	edx, [ebp+var_5D]
test	edx, edx
jz	short loc_5F0BFE
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5F09C0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5F0C8B
jmp	short loc_5F0C0D

loc_5F0BFE:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5F0C0D:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_4]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+var_4C]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5F0C70
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5F09C0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5F0C8B

loc_5F0C70:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5F0C8B:
mov	esp, ebp
pop	ebp
retn	8
sub_5F0B00 endp

align 10h


; Attributes: bp-based frame

sub_5F0CA0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_30], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_30]
jnz	short loc_5F0CE7
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5F13D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5F0DC4

loc_5F0CE7:
cmp	[ebp+arg_10], 0
jnz	short loc_5F0D49
cmp	[ebp+arg_C], 0
jnz	short loc_5F0D40
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5F0D31
jb	short loc_5F0D28
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_38]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5F0D31

loc_5F0D28:
mov	[ebp+var_3C], 1
jmp	short loc_5F0D38

loc_5F0D31:
mov	[ebp+var_3C], 0

loc_5F0D38:
movzx	edx, byte ptr [ebp+var_3C]
test	edx, edx
jz	short loc_5F0D49

loc_5F0D40:
mov	[ebp+var_40], 1
jmp	short loc_5F0D50

loc_5F0D49:
mov	[ebp+var_40], 0

loc_5F0D50:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5F0D62
and	[ebp+var_C], 0FFFFFFFEh

loc_5F0D62:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5F0D98
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_30]
call	sub_5F13D0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5F0D96
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5F0D96:
jmp	short loc_5F0DC4

loc_5F0D98:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_30]
call	sub_5F13D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5F0DC4
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5F0DC4:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_30]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_30]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5F0CA0 endp

align 10h


; Attributes: bp-based frame

sub_5F0E10 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5F0E2C:
cmp	[ebp+var_10], 0
jz	short loc_5F0EA3
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_34]
mov	[ebp+var_5C], edx
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
ja	short loc_5F0E72
jb	short loc_5F0E69
mov	ecx, [ebp+var_5C]
mov	edx, [ebp+var_60]
mov	eax, [ecx]
cmp	eax, [edx]
jnb	short loc_5F0E72

loc_5F0E69:
mov	[ebp+var_64], 1
jmp	short loc_5F0E79

loc_5F0E72:
mov	[ebp+var_64], 0

loc_5F0E79:
mov	cl, byte ptr [ebp+var_64]
mov	[ebp+var_5], cl
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5F0E92
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_68], ecx
jmp	short loc_5F0E9B

loc_5F0E92:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	[ebp+var_68], eax

loc_5F0E9B:
mov	ecx, [ebp+var_68]
mov	[ebp+var_10], ecx
jmp	short loc_5F0E2C

loc_5F0EA3:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	edx, [ebp+var_5]
test	edx, edx
jz	loc_5F0F45
mov	eax, [ebp+var_58]
mov	ecx, [eax+8]
mov	[ebp+var_3C], ecx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	edx, [ebp+var_44]
mov	[ebp+var_40], edx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	eax, [ebp+var_44]
setz	cl
mov	[ebp+var_69], cl
movzx	edx, [ebp+var_69]
test	edx, edx
jz	short loc_5F0F36
mov	[ebp+var_1D], 1
push	0
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_58]
call	sub_5F0CA0
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_1D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	loc_5F0FEB
jmp	short loc_5F0F45

loc_5F0F36:
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5F0F45:
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_70], eax
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
ja	short loc_5F0F7F
jb	short loc_5F0F76
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_74]
mov	ecx, [edx]
cmp	ecx, [eax]
jnb	short loc_5F0F7F

loc_5F0F76:
mov	[ebp+var_78], 1
jmp	short loc_5F0F86

loc_5F0F7F:
mov	[ebp+var_78], 0

loc_5F0F86:
mov	dl, byte ptr [ebp+var_78]
mov	[ebp+var_25], dl
movzx	eax, [ebp+var_25]
test	eax, eax
jz	short loc_5F0FD0
mov	[ebp+var_27], 1
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_5F0CA0
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_27]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	short loc_5F0FEB

loc_5F0FD0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_2D]
mov	[edx+4], al
mov	eax, [ebp+arg_0]

loc_5F0FEB:
mov	esp, ebp
pop	ebp
retn	8
sub_5F0E10 endp

align 10h


; Attributes: bp-based frame

sub_5F1000 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_38], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_38]
jnz	short loc_5F1047
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_49C7E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_5F10FE

loc_5F1047:
cmp	[ebp+arg_10], 0
jnz	short loc_5F1083
cmp	[ebp+arg_C], 0
jnz	short loc_5F107A
or	[ebp+var_C], 1
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_38]
add	ecx, 14h
call	sub_42BEE0
movzx	edx, al
test	edx, edx
jz	short loc_5F1083

loc_5F107A:
mov	[ebp+var_3C], 1
jmp	short loc_5F108A

loc_5F1083:
mov	[ebp+var_3C], 0

loc_5F108A:
mov	al, byte ptr [ebp+var_3C]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_5F109C
and	[ebp+var_C], 0FFFFFFFEh

loc_5F109C:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_5F10D2
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_38]
call	sub_49C7E0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_5F10D0
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_5F10D0:
jmp	short loc_5F10FE

loc_5F10D2:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_38]
call	sub_49C7E0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_38]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_5F10FE
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_5F10FE:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_38]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_38]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_38]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	14h
sub_5F1000 endp

align 10h


; Attributes: bp-based frame

sub_5F1140 proc	near

var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_68], ecx
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_5F115C:
cmp	[ebp+var_10], 0
jz	short loc_5F11AB
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_68]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_5], al
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	short loc_5F119A
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_6C], eax
jmp	short loc_5F11A3

loc_5F119A:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_6C], edx

loc_5F11A3:
mov	eax, [ebp+var_6C]
mov	[ebp+var_10], eax
jmp	short loc_5F115C

loc_5F11AB:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	ecx, [ebp+var_5]
test	ecx, ecx
jz	loc_5F124D
mov	edx, [ebp+var_68]
mov	eax, [edx+8]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_4C]
mov	[ebp+var_48], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_48]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_4C]
setz	al
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jz	short loc_5F123E
mov	[ebp+var_1D], 1
push	0
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_24]
push	edx
mov	ecx, [ebp+var_68]
call	sub_5F1000
mov	[ebp+var_50], eax
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_1D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_5F12CB
jmp	short loc_5F124D

loc_5F123E:
mov	eax, [ebp+var_4]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_5F124D:
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_68]
add	ecx, 14h
call	sub_42BEE0
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_5F12B0
mov	[ebp+var_27], 1
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_2C]
push	edx
mov	ecx, [ebp+var_68]
call	sub_5F1000
mov	[ebp+var_64], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_27]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_5F12CB

loc_5F12B0:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_2D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_5F12CB:
mov	esp, ebp
pop	ebp
retn	8
sub_5F1140 endp

align 10h


; Attributes: bp-based frame

sub_5F12E0 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5F12F8:
cmp	[ebp+var_8], 0
jz	short loc_5F133D
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5F1332
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5F133B

loc_5F1332:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5F133B:
jmp	short loc_5F12F8

loc_5F133D:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_1C]
jz	short loc_5F136E
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
movzx	ecx, word ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, word ptr [edx]
xor	edx, edx
cmp	eax, ecx
setl	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5F136E
mov	ecx, [ebp+var_1C]
mov	[ebp+var_4], ecx

loc_5F136E:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F12E0 endp

align 10h


; Attributes: bp-based frame

sub_5F1380 proc	near

var_1C=	dword ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
push	1
mov	ecx, [ebp+var_1C]
call	sub_4E1E10
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5F1660
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F1380 endp

align 10h


; Attributes: bp-based frame

sub_5F13D0 proc	near

var_30=	dword ptr -30h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_30], ecx
push	1
mov	ecx, [ebp+var_30]
call	sub_526980
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 10h
push	ecx		; void *
call	sub_5F16D0
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0Ch], 0
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F13D0 endp

align 10h


; Attributes: bp-based frame

sub_5F1420 proc	near

var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_8], eax
mov	[ebp+var_18], 80h
mov	ecx, [ebp+var_C]
sub	ecx, [ebp+var_14]
sar	ecx, 6
mov	edx, [ebp+arg_14]
sub	edx, [ebp+arg_18]
sar	edx, 6
mov	eax, [ebp+arg_20]
sub	eax, [ebp+var_8]
sar	eax, 2
sub	eax, 1
imul	eax, 2
add	eax, edx
add	eax, ecx
mov	[ebp+var_4], eax
jmp	short loc_5F1478

loc_5F146F:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_5F1478:
cmp	[ebp+var_4], 0
jle	short loc_5F14A2
lea	ecx, [ebp+arg_14]
call	sub_5F17B0
mov	edx, [ebp+arg_14]
mov	[ebp+var_24], edx
lea	ecx, [ebp+arg_24]
call	sub_5F17B0
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_24]
call	sub_5F1740
jmp	short loc_5F146F

loc_5F14A2:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5F1420 endp

align 10h


; Attributes: bp-based frame

sub_5F14D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h
arg_2C=	dword ptr  34h
arg_30=	dword ptr  38h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_10]
mov	[ebp+var_8], eax
mov	[ebp+var_18], 80h
mov	ecx, [ebp+var_C]
sub	ecx, [ebp+var_14]
sar	ecx, 6
mov	edx, [ebp+arg_14]
sub	edx, [ebp+arg_18]
sar	edx, 6
mov	eax, [ebp+arg_20]
sub	eax, [ebp+var_8]
sar	eax, 2
sub	eax, 1
imul	eax, 2
add	eax, edx
add	eax, ecx
mov	[ebp+var_4], eax
jmp	short loc_5F1528

loc_5F151F:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_5F1528:
cmp	[ebp+var_4], 0
jle	short loc_5F1552
mov	edx, [ebp+arg_4]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+arg_24]
call	sub_5F1740
lea	ecx, [ebp+arg_4]
call	sub_5EE170
lea	ecx, [ebp+arg_24]
call	sub_5EE170
jmp	short loc_5F151F

loc_5F1552:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_24]
mov	[ecx], edx
mov	eax, [ebp+arg_28]
mov	[ecx+4], eax
mov	edx, [ebp+arg_2C]
mov	[ecx+8], edx
mov	eax, [ebp+arg_30]
mov	[ecx+0Ch], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_5F14D0 endp

align 10h


; Attributes: bp-based frame

sub_5F1580 proc	near

var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5F1598:
cmp	[ebp+var_8], 0
jz	short loc_5F15DD
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_1C]
add	ecx, 14h
call	sub_42BEE0
movzx	eax, al
test	eax, eax
jnz	short loc_5F15D2
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
jmp	short loc_5F15DB

loc_5F15D2:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
mov	[ebp+var_8], edx

loc_5F15DB:
jmp	short loc_5F1598

loc_5F15DD:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F1580 endp

align 10h


; Attributes: bp-based frame

sub_5F15F0 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_5F1608:
cmp	[ebp+var_8], 0
jz	short loc_5F164D
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx]
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax]
xor	eax, eax
cmp	ecx, edx
setl	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5F1642
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_5F164B

loc_5F1642:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_5F164B:
jmp	short loc_5F1608

loc_5F164D:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F15F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5F1660(void *, int)
sub_5F1660 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5F16BC
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	cx, [eax]
mov	[edx], cx
mov	esi, [ebp+arg_4]
add	esi, 8
mov	edi, [ebp+var_8]
add	edi, 8
mov	ecx, 8
rep movsd
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
jmp	short loc_5F16C3

loc_5F16BC:
mov	[ebp+var_C], 0

loc_5F16C3:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5F1660 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5F16D0(void *, int)
sub_5F16D0 proc	near

var_74=	dword ptr -74h
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 74h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5F172D
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 8
push	ecx
mov	ecx, [ebp+var_8]
add	ecx, 8
call	sub_479590
mov	edx, [ebp+var_8]
mov	[ebp+var_74], edx
jmp	short loc_5F1734

loc_5F172D:
mov	[ebp+var_74], 0

loc_5F1734:
mov	esp, ebp
pop	ebp
retn
sub_5F16D0 endp

align 10h


; Attributes: bp-based frame

sub_5F1740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	dx, [ecx]
mov	[eax], dx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
call	sub_4023E0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+38h]
mov	[ecx+38h], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+3Ch]
mov	[ecx+3Ch], eax
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F1740 endp

align 10h


; Attributes: bp-based frame

sub_5F17B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+4]
jnz	short loc_5F180C
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 2
shl	ecx, 6
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ecx], eax

loc_5F180C:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
sub	edx, 40h
mov	eax, [ebp+var_C]
mov	[eax], edx
mov	esp, ebp
pop	ebp
retn
sub_5F17B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5F1820(void *, int)
sub_5F1820 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_5F1877
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_5F187E

loc_5F1877:
mov	[ebp+var_C], 0

loc_5F187E:
mov	esp, ebp
pop	ebp
retn
sub_5F1820 endp

align 10h


; Attributes: bp-based frame

sub_5F1890 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5F1890 endp

align 10h


; Attributes: bp-based frame

sub_5F18A0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset aLwosoundinterf ; "LWOSoundInterface"
mov	esp, ebp
pop	ebp
retn
sub_5F18A0 endp



; Attributes: bp-based frame

sub_5F18B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, offset off_1512FC4
mov	esp, ebp
pop	ebp
retn
sub_5F18B0 endp



; Attributes: bp-based frame

sub_5F18C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+118h]
and	al, 1
mov	esp, ebp
pop	ebp
retn
sub_5F18C0 endp

align 10h


; Attributes: bp-based frame

sub_5F18E0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	al, [eax+64h]
and	al, 1
mov	esp, ebp
pop	ebp
retn
sub_5F18E0 endp

align 10h


; Attributes: bp-based frame

sub_5F1900 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32E8h
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15B5100
mov	ecx, [ebp+var_C]
add	ecx, 10h
call	sub_42B290
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 24h
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+0Ch], 0
push	offset unk_1893634
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	eax, [ebp+var_C]
mov	edx, [eax+10h]
mov	eax, [edx+4]
call	eax
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+3Ch], 0
mov	edx, [ebp+var_C]
mov	byte ptr [edx+3Dh], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5F1900 endp

align 10h


; Attributes: bp-based frame

sub_5F1990 proc	near

var_C= dword ptr -0Ch
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	ecx, 32EBh
mov	eax, [ebp+var_C]
call	sub_401100
mov	eax, [ebp+var_C]
mov	dword ptr [eax], offset	off_15C8A10
lea	ecx, [ebp+var_1]
call	sub_401EF0
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 0Ch
call	sub_4022A0
lea	ecx, [ebp+var_1]
call	nullsub_1
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+8], 0
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_5F1990 endp

align 10h


; Attributes: bp-based frame

sub_5F19E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
call	sub_407910
mov	ecx, [ebp+var_4]
call	sub_401110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5F1A10
push	24h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5F1A10:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F19E0 endp

align 10h


; Attributes: bp-based frame

sub_5F1A20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B1EFA0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5F1A45
push	7Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5F1A45:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F1A20 endp

align 10h


; Attributes: bp-based frame

sub_5F1A50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B1F630
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5F1A73
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F1A73:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F1A50 endp

align 10h


; Attributes: bp-based frame

sub_5F1A80 proc	near

var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_5F1AA4
jmp	short loc_5F1ABD

loc_5F1AA4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_28]
call	sub_4ABE60

loc_5F1ABD:
mov	esp, ebp
pop	ebp
retn
sub_5F1A80 endp

align 10h
; [00000010 BYTES: COLLAPSED FUNCTION unknown_libname_16. PRESS	KEYPAD "+" TO EXPAND]
; [00000011 BYTES: COLLAPSED FUNCTION sub_5F1AE0. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5F1B00 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_5F1C60
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5F1B00 endp

align 10h


; Attributes: bp-based frame

sub_5F1B30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 50h
push	3
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
push	offset aLwosoundinterf ; "LWOSoundInterface"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81A7F0
add	esp, 8
push	offset a__index	; "__index"
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432A50
add	esp, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [ebp+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset a__gc	; "__gc"
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
push	0
push	offset sub_5F1DD0
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C050
add	esp, 0Ch
push	0FFFFFFFDh
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
push	offset off_1512FC4 ; int
push	0		; char *
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_81AAC0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5F1B30 endp

align 10h


; Attributes: bp-based frame

sub_5F1C00 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
call	sub_401740
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+arg_0]
pop	ebp
retn
sub_5F1C00 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_5F1C30(void	*, int)
sub_5F1C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
cmp	[ebp+arg_0], 0
jz	short loc_5F1C50
mov	eax, [ebp+arg_4]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5F1C50:
mov	esp, ebp
pop	ebp
retn	8
sub_5F1C30 endp

align 10h


; Attributes: bp-based frame

sub_5F1C60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
sar	eax, 2
mov	[ebp+var_4], eax
jmp	short loc_5F1C85

loc_5F1C7C:
mov	edx, [ebp+var_4]
sub	edx, 1
mov	[ebp+var_4], edx

loc_5F1C85:
cmp	[ebp+var_4], 0
jle	loc_5F1D34
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5F1CAE
mov	eax, [ebp+arg_0]
jmp	loc_5F1DC2

loc_5F1CAE:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5F1CD6
mov	eax, [ebp+arg_0]
jmp	loc_5F1DC2

loc_5F1CD6:
mov	ecx, [ebp+arg_0]
add	ecx, 18h
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A9E0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5F1CFE
mov	eax, [ebp+arg_0]
jmp	loc_5F1DC2

loc_5F1CFE:
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5F1D26
mov	eax, [ebp+arg_0]
jmp	loc_5F1DC2

loc_5F1D26:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax
jmp	loc_5F1C7C

loc_5F1D34:
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 1
jz	short loc_5F1DA3
cmp	[ebp+var_8], 2
jz	short loc_5F1D7E
cmp	[ebp+var_8], 3
jz	short loc_5F1D59
jmp	short loc_5F1DBF

loc_5F1D59:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_40A9E0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jz	short loc_5F1D75
mov	eax, [ebp+arg_0]
jmp	short loc_5F1DC2

loc_5F1D75:
mov	edx, [ebp+arg_0]
add	edx, 18h
mov	[ebp+arg_0], edx

loc_5F1D7E:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_40A9E0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5F1D9A
mov	eax, [ebp+arg_0]
jmp	short loc_5F1DC2

loc_5F1D9A:
mov	eax, [ebp+arg_0]
add	eax, 18h
mov	[ebp+arg_0], eax

loc_5F1DA3:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A9E0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5F1DBF
mov	eax, [ebp+arg_0]
jmp	short loc_5F1DC2

loc_5F1DBF:
mov	eax, [ebp+arg_4]

loc_5F1DC2:
mov	esp, ebp
pop	ebp
retn
sub_5F1C60 endp

align 10h


; Attributes: bp-based frame

sub_5F1DD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
push	offset aLwosoundinterf ; "LWOSoundInterface"
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_B18710
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_5F1E35
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_5F1E35
mov	edx, [ebp+var_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2Ch]
test	ecx, ecx
jz	short loc_5F1E35
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5F1E2E
push	1
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	ecx, [ebp+var_8]
mov	edx, [eax]
call	edx
mov	[ebp+var_10], eax
jmp	short loc_5F1E35

loc_5F1E2E:
mov	[ebp+var_10], 0

loc_5F1E35:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_5F1DD0 endp

align 10h


; Attributes: bp-based frame

sub_5F1E40 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_4], eax
lea	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_456860
mov	ecx, [ebp+var_1C]
mov	[ecx], eax
mov	edx, [ebp+var_4]
imul	edx, 18h
mov	eax, [ebp+var_1C]
add	edx, [eax]
mov	ecx, [ebp+var_1C]
mov	[ecx+8], edx
mov	edx, [ebp+var_1C]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4C7B00
add	esp, 0Ch
mov	ecx, [ebp+var_1C]
mov	[ecx+4], eax
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5F1E40 endp

align 10h


; Attributes: bp-based frame

sub_5F1EC0 proc	near

var_3C=	dword ptr -3Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_5F1F44
mov	ecx, [ebp+arg_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_C]
cdq
mov	ecx, 18h
idiv	ecx
mov	[ebp+var_4], eax
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_3C]
mov	ecx, [edx+8]
sub	ecx, [eax+4]
mov	eax, ecx
cdq
mov	ecx, 18h
idiv	ecx
cmp	eax, [ebp+var_4]
jb	short loc_5F1F2C
xor	edx, edx
mov	[ebp+var_5], dl
lea	eax, [ebp+var_5]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_3C]
call	sub_5F1FB0
jmp	short loc_5F1F44

loc_5F1F2C:
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_3C]
call	sub_5F2030

loc_5F1F44:
mov	esp, ebp
pop	ebp
retn	10h
sub_5F1EC0 endp

align 10h


; Attributes: bp-based frame

sub_5F1F50 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_20]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx], eax
lea	ecx, [ebp+var_24]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
jmp	short loc_5F1F82

loc_5F1F79:
mov	ecx, [ebp+var_24]
sub	ecx, 4
mov	[ebp+var_24], ecx

loc_5F1F82:
mov	edx, [ebp+var_24]
xor	eax, eax
cmp	edx, [ebp+var_20]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5F1FAA
xor	edx, edx
mov	[ebp+var_15], dl
mov	eax, [ebp+var_24]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 4
mov	[ebp+var_1C], ecx
jmp	short loc_5F1F79

loc_5F1FAA:
mov	esp, ebp
pop	ebp
retn
sub_5F1F50 endp

align 10h


; Attributes: bp-based frame

sub_5F1FB0 proc	near

var_14=	dword ptr -14h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
sub	ecx, 18h
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_C]
imul	edx, 18h
add	edx, [ebp+var_8]
mov	[ebp+var_4], edx
jmp	short loc_5F1FE5

loc_5F1FD3:
mov	eax, [ebp+var_4]
sub	eax, 18h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
sub	ecx, 18h
mov	[ebp+var_8], ecx

loc_5F1FE5:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_0]
jb	short loc_5F2004
mov	eax, [ebp+var_8]
push	eax		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	sub_456A70
add	esp, 8
xor	edx, edx
mov	[ebp+var_9], dl
jmp	short loc_5F1FD3

loc_5F2004:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4C7B00
add	esp, 0Ch
mov	eax, [ebp+arg_C]
imul	eax, 18h
mov	ecx, [ebp+var_14]
add	eax, [ecx+4]
mov	edx, [ebp+var_14]
mov	[edx+4], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_5F1FB0 endp



; Attributes: bp-based frame

sub_5F2030 proc	near

var_1C=	dword ptr -1Ch
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_456770
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_1C]
add	ecx, 8
call	sub_456860
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
xor	ecx, ecx
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_E], dl
lea	eax, [ebp+var_E+1]
push	eax
movzx	ecx, byte ptr [ebp+var_E]
push	ecx
mov	edx, [ebp+var_8]
push	edx		; void *
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
push	edx		; int
call	sub_456970
add	esp, 14h
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4C7B00
add	esp, 0Ch
mov	[ebp+var_C], eax
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_10], cl
lea	edx, [ebp+var_10+1]
push	edx
movzx	eax, byte ptr [ebp+var_10]
push	eax
mov	ecx, [ebp+var_C]
push	ecx		; void *
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
push	eax		; int
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_456970
add	esp, 14h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_1C]
call	sub_4567E0
mov	edx, [ebp+var_4]
imul	edx, 18h
add	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_1C]
call	sub_458870
mov	esp, ebp
pop	ebp
retn	10h
sub_5F2030 endp

align 10h


; Attributes: bp-based frame

sub_5F2100 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
jmp	short loc_5F2111

loc_5F2108:
mov	eax, [ebp+arg_0]
sub	eax, 4
mov	[ebp+arg_0], eax

loc_5F2111:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_5F2139
xor	ecx, ecx
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 4
mov	[ebp+var_8], eax
jmp	short loc_5F2108

loc_5F2139:
mov	esp, ebp
pop	ebp
retn
sub_5F2100 endp

align 10h
; [00000005 BYTES: COLLAPSED FUNCTION __initp_misc_winxfltr. PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_5F2150 proc	near
sub	ecx, 28h
jmp	sub_5F1A20
sub_5F2150 endp

align 10h


; Attributes: bp-based frame

sub_5F2160 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_5F2188
or	eax, 0FFFFFFFFh
jmp	short loc_5F21B0

loc_5F2188:
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
cmp	[ebp+var_1C], 9
jz	short loc_5F219C
cmp	[ebp+var_1C], 0Ah
jnz	short loc_5F21A7

loc_5F219C:
mov	[ebp+var_20], 6
jmp	short loc_5F21AD
jmp	short loc_5F21AD

loc_5F21A7:
mov	edx, [ebp+var_1C]
mov	[ebp+var_20], edx

loc_5F21AD:
mov	eax, [ebp+var_20]

loc_5F21B0:
mov	esp, ebp
pop	ebp
retn
sub_5F2160 endp

align 10h


; Attributes: bp-based frame

sub_5F21C0 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_5F21E7
xor	eax, eax
jmp	short loc_5F220C

loc_5F21E7:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0Ah
jz	short loc_5F21F7
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 9
jnz	short loc_5F2202

loc_5F21F7:
mov	[ebp+var_1C], 1
jmp	short loc_5F2209
jmp	short loc_5F2209

loc_5F2202:
mov	[ebp+var_1C], 0

loc_5F2209:
mov	eax, [ebp+var_1C]

loc_5F220C:
mov	esp, ebp
pop	ebp
retn
sub_5F21C0 endp



; Attributes: bp-based frame

sub_5F2210 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_5F2239
xor	eax, eax
jmp	short loc_5F226E
jmp	short loc_5F226E

loc_5F2239:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 7
jnz	short loc_5F2251
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
add	edx, 10h
mov	[ebp+var_1C], edx
jmp	short loc_5F226B
jmp	short loc_5F2264

loc_5F2251:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 2
jnz	short loc_5F2264
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
jmp	short loc_5F226B

loc_5F2264:
mov	[ebp+var_1C], 0

loc_5F226B:
mov	eax, [ebp+var_1C]

loc_5F226E:
mov	esp, ebp
pop	ebp
retn
sub_5F2210 endp

align 10h


; Attributes: bp-based frame

sub_5F2280 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
cmp	[ebp+arg_4], 0
jl	short loc_5F22CD
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+20h]
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*8]
mov	[ebp+var_4], edx
jmp	short loc_5F22AF

loc_5F22A6:
mov	eax, [ebp+var_8]
add	eax, 8
mov	[ebp+var_8], eax

loc_5F22AF:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnb	short loc_5F22C2
mov	edx, [ebp+var_8]
mov	dword ptr [edx], 0
jmp	short loc_5F22A6

loc_5F22C2:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax+1Ch], ecx
jmp	short loc_5F22E7

loc_5F22CD:
mov	edx, [ebp+arg_0]
add	edx, 1Ch
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ebp+arg_4]
lea	eax, [ecx+edx*8+8]
mov	ecx, [ebp+var_C]
mov	[ecx], eax

loc_5F22E7:
mov	esp, ebp
pop	ebp
retn
sub_5F2280 endp

align 10h


; Attributes: bp-based frame

sub_5F22F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
mov	[ebp+var_4], ecx
cmp	[ebp+arg_4], 0
jle	short loc_5F231F
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
sub	eax, [edx+20h]
sar	eax, 3
sub	eax, [ebp+arg_4]
add	eax, 1
neg	eax
mov	[ebp+var_8], eax
jmp	short loc_5F2325

loc_5F231F:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx

loc_5F2325:
cmp	[ebp+var_8], 0
jge	short loc_5F2351
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	ecx, [eax+edx*8+8]
mov	edx, [eax+edx*8+0Ch]
mov	eax, [ebp+var_8]
mov	esi, [ebp+var_4]
mov	[esi+eax*8], ecx
mov	[esi+eax*8+4], edx
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_5F2325

loc_5F2351:
mov	edx, [ebp+var_4]
sub	edx, 8
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5F22F0 endp

align 10h


; Attributes: bp-based frame

sub_5F2370 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_8], eax
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_10], eax
cmp	[ebp+var_4], 0
jnz	short loc_5F23B0
cmp	[ebp+var_C], 0
jz	short loc_5F23B6

loc_5F23B0:
xor	eax, eax
jmp	short loc_5F23CA
jmp	short loc_5F23CA

loc_5F23B6:
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_819120
add	esp, 0Ch

loc_5F23CA:
mov	esp, ebp
pop	ebp
retn
sub_5F2370 endp

align 10h


; Attributes: bp-based frame

sub_5F23D0 proc	near

var_24=	dword ptr -24h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_81C070
add	esp, 8
cmp	[ebp+arg_4], 0
jge	short loc_5F23FE
cmp	[ebp+arg_4], 0FFFFD8F0h
jle	short loc_5F23FE
mov	[ebp+var_24], 1
jmp	short loc_5F2405

loc_5F23FE:
mov	[ebp+var_24], 0

loc_5F2405:
mov	edx, [ebp+arg_4]
sub	edx, [ebp+var_24]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_481EF0
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_5F23D0 endp

align 10h


; Attributes: bp-based frame

sub_5F2430 proc	near

var_34=	dword ptr -34h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 34h
push	2
mov	eax, [ebp+arg_0]
push	eax
call	sub_81B6A0
add	esp, 8
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_81C070
add	esp, 8
push	0FFFFFFFEh
mov	eax, [ebp+arg_0]
push	eax
call	sub_4E3E50
add	esp, 8
cmp	[ebp+arg_4], 0
jge	short loc_5F247A
cmp	[ebp+arg_4], 0FFFFD8F0h
jle	short loc_5F247A
mov	[ebp+var_34], 1
jmp	short loc_5F2481

loc_5F247A:
mov	[ebp+var_34], 0

loc_5F2481:
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_34]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_432C50
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_5F2430 endp

align 10h


; Attributes: bp-based frame

sub_5F24A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_4328D0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_8], 0
jz	short loc_5F24C7
xor	eax, eax
jmp	short loc_5F24FD

loc_5F24C7:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_819230
add	esp, 0Ch
test	eax, eax
jz	short loc_5F24FB
mov	edx, [ebp+var_C]
add	edx, 8
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
mov	eax, 1
jmp	short loc_5F24FD

loc_5F24FB:
xor	eax, eax

loc_5F24FD:
mov	esp, ebp
pop	ebp
retn
sub_5F24A0 endp

align 10h


; Attributes: bp-based frame

sub_5F2510 proc	near

var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
push	eax
call	sub_5F2280
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_5F2510 endp

align 10h


; Attributes: bp-based frame

sub_5F2540 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B19660
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5F2565
push	40h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5F2565:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F2540 endp

align 10h


; Attributes: bp-based frame

sub_5F2570 proc	near

var_78=	dword ptr -78h

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
mov	ecx, [ebp+var_78]
call	sub_5F2840
mov	esp, ebp
pop	ebp
retn
sub_5F2570 endp

align 10h
; [00000014 BYTES: COLLAPSED FUNCTION std::locale::facet::~facet(void).	PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_5F25B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B18D90
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5F25D5
push	30h
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_5F25D5:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F25B0 endp

align 10h


; Attributes: bp-based frame

sub_5F25E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B18580
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5F2603
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F2603:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F25E0 endp

align 10h


; Attributes: bp-based frame

sub_5F2610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_B19B40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_5F2633
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F2633:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_5F2610 endp

align 10h


; Attributes: bp-based frame

sub_5F2640 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5EA380
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_5028E0
mov	byte ptr [ebp+var_4], 0
call	nullsub_1
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5F2640 endp

align 10h


; Attributes: bp-based frame

sub_5F2690 proc	near

var_98=	dword ptr -98h

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
mov	ecx, [ebp+var_98]
call	sub_5F2730
mov	esp, ebp
pop	ebp
retn
sub_5F2690 endp

align 10h


; Attributes: bp-based frame

sub_5F26B0 proc	near

var_64=	dword ptr -64h

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_64]
call	sub_58E780
mov	esp, ebp
pop	ebp
retn
sub_5F26B0 endp

align 10h


; Attributes: bp-based frame

sub_5F26D0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
push	ecx
mov	[ebp+var_10], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_1C]
call	sub_5965B0
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_5F26D0 endp

align 10h


; Attributes: bp-based frame

sub_5F2730 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_98], ecx
lea	eax, [ebp+var_84]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_98]
add	ecx, 10h
mov	edx, [ebp+var_C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_94]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_98]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_84]
mov	[edx], eax
mov	ecx, [ebp+var_80]
mov	[edx+4], ecx
mov	eax, [ebp+var_7C]
mov	[edx+8], eax
mov	ecx, [ebp+var_78]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_74]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_94]
mov	[eax], ecx
mov	edx, [ebp+var_90]
mov	[eax+4], edx
mov	ecx, [ebp+var_8C]
mov	[eax+8], ecx
mov	edx, [ebp+var_88]
mov	[eax+0Ch], edx
xor	eax, eax
mov	[ebp+var_21], al
lea	ecx, [ebp+var_44]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_64]
mov	[edx], eax
mov	ecx, [ebp+var_60]
mov	[edx+4], ecx
mov	eax, [ebp+var_5C]
mov	[edx+8], eax
mov	ecx, [ebp+var_58]
mov	[edx+0Ch], ecx
lea	edx, [ebp+var_54]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_70]
mov	[eax+4], edx
mov	ecx, [ebp+var_6C]
mov	[eax+8], ecx
mov	edx, [ebp+var_68]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_98]
call	sub_5F2CE0
mov	esp, ebp
pop	ebp
retn
sub_5F2730 endp

align 10h


; Attributes: bp-based frame

sub_5F2840 proc	near

var_78=	dword ptr -78h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 78h
mov	[ebp+var_78], ecx
sub	esp, 10h
mov	eax, esp
mov	[ebp+var_4], esp
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_78]
add	ecx, 10h
mov	edx, [ebp+var_C]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
sub	esp, 10h
mov	edx, esp
mov	[ebp+var_8], esp
mov	[ebp+var_10], edx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_10]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
call	sub_5F3710
add	esp, 20h
mov	ecx, [ebp+var_78]
call	sub_5F3100
mov	esp, ebp
pop	ebp
retn
sub_5F2840 endp

align 10h


; Attributes: bp-based frame

sub_5F28B0 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+18h]
sub	ecx, 10h
mov	edx, [ebp+var_10]
cmp	[edx+10h], ecx
jz	short loc_5F28EE
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_10]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_5F3770
add	esp, 8
mov	eax, [ebp+var_10]
mov	ecx, [eax+10h]
add	ecx, 10h
mov	edx, [ebp+var_10]
mov	[edx+10h], ecx
jmp	short loc_5F28FA

loc_5F28EE:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_10]
call	sub_5F2F30

loc_5F28FA:
mov	esp, ebp
pop	ebp
retn	4
sub_5F28B0 endp



; Attributes: bp-based frame

sub_5F2900 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [eax+10h]
cmp	edx, [ecx+14h]
jz	short loc_5F2936
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
sub	ecx, 10h
mov	edx, [ebp+var_14]
mov	[edx+10h], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_8], ecx
xor	edx, edx
mov	[ebp+var_1], dl
jmp	short loc_5F294C

loc_5F2936:
mov	ecx, [ebp+var_14]
call	sub_5F3070
mov	eax, [ebp+var_14]
mov	ecx, [eax+10h]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	[ebp+var_9], dl

loc_5F294C:
mov	esp, ebp
pop	ebp
retn
sub_5F2900 endp



; Attributes: bp-based frame

sub_5F2950 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
mov	edx, [eax+0Ch]
mov	[ebp+var_4], edx
lea	ecx, [ebp+var_10]
call	sub_5F2C70
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_5F2950 endp

align 10h


; Attributes: bp-based frame

sub_5F2990 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	edx, [eax+10h]
xor	eax, eax
cmp	edx, [ecx]
setz	al
mov	esp, ebp
pop	ebp
retn
sub_5F2990 endp

align 10h


; Attributes: bp-based frame

sub_5F29B0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+18h]
sub	ecx, 0Ch
mov	edx, [ebp+var_C]
cmp	[edx+10h], ecx
jz	short loc_5F29EE
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_C]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_50E940
add	esp, 8
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
add	ecx, 0Ch
mov	edx, [ebp+var_C]
mov	[edx+10h], ecx
jmp	short loc_5F29FA

loc_5F29EE:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
call	sub_5F3360

loc_5F29FA:
mov	esp, ebp
pop	ebp
retn	4
sub_5F29B0 endp



; Attributes: bp-based frame

sub_5F2A00 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_1C]
mov	edx, [eax+10h]
cmp	edx, [ecx+14h]
jz	short loc_5F2A37
mov	eax, [ebp+var_1C]
mov	ecx, [eax+10h]
sub	ecx, 0Ch
mov	edx, [ebp+var_1C]
mov	[edx+10h], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+10h]
push	ecx		; void *
call	sub_5F37E0
add	esp, 4
jmp	short loc_5F2A4E

loc_5F2A37:
mov	ecx, [ebp+var_1C]
call	sub_5F34A0
mov	edx, [ebp+var_1C]
mov	eax, [edx+10h]
push	eax		; void *
call	sub_5F37E0
add	esp, 4

loc_5F2A4E:
mov	esp, ebp
pop	ebp
retn
sub_5F2A00 endp

align 10h


; Attributes: bp-based frame

sub_5F2A60 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F2B30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_20]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_20]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_20]
add	eax, 20h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 0
mov	edx, [ebp+var_20]
add	edx, 24h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_5F2D70
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_5F2A60 endp

align 10h


; Attributes: bp-based frame

sub_5F2B30 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F2B30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_20]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_20]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_20]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_20]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_20]
add	ecx, 10h
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_20]
add	eax, 20h
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 0
mov	edx, [ebp+var_20]
add	edx, 24h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], 0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_20]
call	sub_5F3190
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_5F2B30 endp

align 10h


; Attributes: bp-based frame

sub_5F2C00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+4]
jnz	short loc_5F2C5C
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 8
shl	ecx, 4
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ecx], eax

loc_5F2C5C:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
sub	edx, 10h
mov	eax, [ebp+var_C]
mov	[eax], edx
mov	esp, ebp
pop	ebp
retn
sub_5F2C00 endp

align 10h


; Attributes: bp-based frame

sub_5F2C70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_C]
mov	edx, [eax]
cmp	edx, [ecx+4]
jnz	short loc_5F2CCC
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_8]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_4], 80h
mov	ecx, 0Ah
imul	ecx, 0Ch
mov	edx, [ebp+var_C]
add	ecx, [edx+4]
mov	eax, [ebp+var_C]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ecx], eax

loc_5F2CCC:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
sub	edx, 0Ch
mov	eax, [ebp+var_C]
mov	[eax], edx
mov	esp, ebp
pop	ebp
retn
sub_5F2C70 endp

align 10h


; Attributes: bp-based frame

sub_5F2CE0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F3100
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+20h], 0
jz	short loc_5F2D52
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_5F3F00
mov	edx, [ebp+var_18]
mov	eax, [edx+24h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+20h]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_5F2D52
mov	eax, [ebp+var_14]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5F2D52:
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5F2CE0 endp

align 10h


; Attributes: bp-based frame

sub_5F2D70 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F2D70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 54h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_64], ecx
mov	[ebp+var_28], 80h
mov	eax, [ebp+arg_0]
shr	eax, 3
add	eax, 1
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
add	ecx, 2
mov	[ebp+var_20], ecx
mov	[ebp+var_24], 8
lea	edx, [ebp+var_20]
push	edx
lea	eax, [ebp+var_24]
push	eax
call	sub_4049A0
add	esp, 8
mov	ecx, [ebp+var_64]
mov	edx, [eax]
mov	[ecx+24h], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
push	ecx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5F3840
mov	edx, [ebp+var_64]
mov	[edx+20h], eax
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_18]
shr	ecx, 1
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_64]
call	sub_5F3E50
jmp	short loc_5F2E79

loc_5F2E24:
mov	ecx, [ebp+var_64]
mov	edx, [ecx+24h]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+20h]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_5F2E4F
mov	edx, [ebp+var_4C]
shl	edx, 2
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5F2E4F:
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_64]
mov	dword ptr [edx+24h], 0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5F2E80
retn

loc_5F2E79:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5F2E80:
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_14]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_50], 80h
mov	edx, 8
shl	edx, 4
mov	eax, [ebp+var_64]
add	edx, [eax+4]
mov	ecx, [ebp+var_64]
mov	[ecx+8], edx
mov	edx, [ebp+var_1C]
sub	edx, 4
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_64]
add	eax, 10h
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
mov	edx, [ebp+var_5C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_5C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_54], 80h
mov	eax, 8
shl	eax, 4
mov	ecx, [ebp+var_58]
add	eax, [ecx+4]
mov	edx, [ebp+var_58]
mov	[edx+8], eax
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	edx, [ecx+4]
mov	[eax], edx
mov	[ebp+var_60], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 8
div	ecx
shl	edx, 4
mov	eax, [ebp+var_64]
add	edx, [eax+14h]
mov	ecx, [ebp+var_64]
mov	[ecx+10h], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5F2D70 endp



; Attributes: bp-based frame

sub_5F2F30 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F2F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 40h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_50], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_50]
mov	edx, [ebp+var_50]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_50]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_5F2F84
push	0
push	1
mov	ecx, [ebp+var_50]
call	sub_5F3F60

loc_5F2F84:
mov	[ebp+var_14], 80h
push	8
mov	ecx, [ebp+var_50]
add	ecx, 24h
call	sub_644220
mov	ecx, [ebp+var_50]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_50]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_5F3770
add	esp, 8
mov	eax, [ebp+var_50]
mov	ecx, [eax+1Ch]
add	ecx, 4
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_50]
add	edx, 10h
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+var_44]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_44]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_3C], 80h
mov	edx, 8
shl	edx, 4
mov	eax, [ebp+var_40]
add	edx, [eax+4]
mov	ecx, [ebp+var_40]
mov	[ecx+8], edx
mov	edx, [ebp+var_50]
mov	eax, [ebp+var_50]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
jmp	short loc_5F3051

loc_5F300D:
mov	[ebp+var_48], 80h
mov	edx, [ebp+var_50]
mov	eax, [edx+1Ch]
mov	ecx, [eax+4]
mov	[ebp+var_4C], ecx
cmp	[ebp+var_4C], 0
jz	short loc_5F303B
mov	edx, 8
shl	edx, 4
push	edx		; int
mov	eax, [ebp+var_4C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5F303B:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5F3058
retn

loc_5F3051:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5F3058:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5F2F30 endp

align 10h


; Attributes: bp-based frame

sub_5F3070 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_18]
mov	ecx, [eax+14h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5F30A4
mov	edx, 8
shl	edx, 4
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5F30A4:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
sub	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_C], 80h
mov	eax, 8
shl	eax, 4
mov	ecx, [ebp+var_10]
add	eax, [ecx+4]
mov	edx, [ebp+var_10]
mov	[edx+8], eax
mov	eax, [ebp+var_18]
mov	ecx, [eax+18h]
sub	ecx, 10h
mov	edx, [ebp+var_18]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn
sub_5F3070 endp

align 10h


; Attributes: bp-based frame

sub_5F3100 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F3100
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+20h], 0
jz	short loc_5F3172
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_51A170
mov	edx, [ebp+var_18]
mov	eax, [edx+24h]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+20h]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jz	short loc_5F3172
mov	eax, [ebp+var_14]
shl	eax, 2
push	eax		; int
mov	ecx, [ebp+var_10]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_5F3172:
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5F3100 endp

align 10h


; Attributes: bp-based frame

sub_5F3190 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F3190
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 54h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_64], ecx
mov	[ebp+var_28], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 0Ah
div	ecx
add	eax, 1
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
add	edx, 2
mov	[ebp+var_20], edx
mov	[ebp+var_24], 8
lea	eax, [ebp+var_20]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_64]
mov	eax, [eax]
mov	[edx+24h], eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+24h]
push	edx
mov	ecx, [ebp+var_64]
add	ecx, 20h
call	sub_5F3840
mov	ecx, [ebp+var_64]
mov	[ecx+20h], eax
mov	edx, [ebp+var_64]
mov	eax, [edx+24h]
sub	eax, [ebp+var_18]
shr	eax, 1
mov	ecx, [ebp+var_64]
mov	edx, [ecx+20h]
lea	eax, [edx+eax*4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
lea	eax, [edx+ecx*4]
mov	[ebp+var_1C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_14]
push	edx
mov	ecx, [ebp+var_64]
call	sub_5F4140
jmp	short loc_5F329F

loc_5F324A:
mov	eax, [ebp+var_64]
mov	ecx, [eax+24h]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+20h]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_5F3275
mov	ecx, [ebp+var_4C]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_48]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5F3275:
mov	eax, [ebp+var_64]
mov	dword ptr [eax+20h], 0
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx+24h], 0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5F32A6
retn

loc_5F329F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5F32A6:
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_14]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ecx+4], eax
mov	[ebp+var_50], 80h
mov	ecx, 0Ah
imul	ecx, 0Ch
mov	edx, [ebp+var_64]
add	ecx, [edx+4]
mov	eax, [ebp+var_64]
mov	[eax+8], ecx
mov	ecx, [ebp+var_1C]
sub	ecx, 4
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_64]
add	edx, 10h
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [ebp+var_5C]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_58]
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_54], 80h
mov	edx, 0Ah
imul	edx, 0Ch
mov	eax, [ebp+var_58]
add	edx, [eax+4]
mov	ecx, [ebp+var_58]
mov	[ecx+8], edx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	[ebp+var_60], 80h
mov	eax, [ebp+arg_0]
xor	edx, edx
mov	ecx, 0Ah
div	ecx
imul	edx, 0Ch
mov	eax, [ebp+var_64]
add	edx, [eax+14h]
mov	ecx, [ebp+var_64]
mov	[ecx+10h], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5F3190 endp

align 10h


; Attributes: bp-based frame

sub_5F3360 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F3360
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_4C], ecx
mov	eax, 1
add	eax, 1
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_4C]
mov	ecx, [ecx+1Ch]
sub	ecx, [edx+20h]
sar	ecx, 2
mov	edx, [ebp+var_4C]
mov	edx, [edx+24h]
sub	edx, ecx
cmp	eax, edx
jbe	short loc_5F33B4
push	0
push	1
mov	ecx, [ebp+var_4C]
call	sub_5F41F0

loc_5F33B4:
mov	[ebp+var_14], 80h
push	0Ah
mov	ecx, [ebp+var_4C]
add	ecx, 24h
call	sub_5F38A0
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+1Ch]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_4C]
mov	edx, [ecx+10h]
push	edx		; void *
call	sub_50E940
add	esp, 8
mov	eax, [ebp+var_4C]
mov	ecx, [eax+1Ch]
add	ecx, 4
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_4C]
add	edx, 10h
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_40]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_3C]
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[edx+4], ecx
mov	[ebp+var_38], 80h
mov	edx, 0Ah
imul	edx, 0Ch
mov	eax, [ebp+var_3C]
add	edx, [eax+4]
mov	ecx, [ebp+var_3C]
mov	[ecx+8], edx
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_4C]
mov	ecx, [eax+14h]
mov	[edx+10h], ecx
jmp	short loc_5F3481

loc_5F343D:
mov	[ebp+var_44], 80h
mov	edx, [ebp+var_4C]
mov	eax, [edx+1Ch]
mov	ecx, [eax+4]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	short loc_5F346B
mov	edx, 0Ah
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_48]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5F346B:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5F3488
retn

loc_5F3481:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5F3488:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5F3360 endp

align 10h


; Attributes: bp-based frame

sub_5F34A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 80h
mov	eax, [ebp+var_18]
mov	ecx, [eax+14h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_5F34D4
mov	edx, 0Ah
imul	edx, 0Ch
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5F34D4:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+1Ch]
sub	edx, 4
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
add	eax, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_C], 80h
mov	eax, 0Ah
imul	eax, 0Ch
mov	ecx, [ebp+var_10]
add	eax, [ecx+4]
mov	edx, [ebp+var_10]
mov	[edx+8], eax
mov	eax, [ebp+var_18]
mov	ecx, [eax+18h]
sub	ecx, 0Ch
mov	edx, [ebp+var_18]
mov	[edx+10h], ecx
mov	esp, ebp
pop	ebp
retn
sub_5F34A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5F3530(wchar_t *Dst, wchar_t *Format,	char)
sub_5F3530 proc	near

ArgList= dword ptr -4
Dst= dword ptr	8
Format=	dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
push	ecx
lea	eax, [ebp+arg_8]
mov	[ebp+ArgList], eax
mov	ecx, [ebp+ArgList]
push	ecx		; ArgList
mov	edx, [ebp+Format]
push	edx		; Format
push	100h		; SizeInWords
mov	eax, [ebp+Dst]
push	eax		; Dst
call	_vswprintf_s
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_5F3530 endp

align 10h


; Attributes: bp-based frame

sub_5F3560 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F3560
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_A8], ecx
mov	[ebp+var_5C], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A8]
call	sub_5C7CD0
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	ecx, [ebp+var_A8]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	ecx, [ebp+var_68]
mov	[ebp+var_64], ecx
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_64]
call	sub_4046E0
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_68]
setz	al
mov	[ebp+var_A9], al
movzx	ecx, [ebp+var_A9]
test	ecx, ecx
jnz	short loc_5F362D
lea	edx, [ebp+var_1D]
push	edx
mov	ecx, [ebp+var_A8]
call	sub_5F3820
mov	[ebp+var_B0], eax
mov	eax, [ebp+var_5C]
or	eax, 1
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_430BA0
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_5F362D
mov	[ebp+var_B4], 0
jmp	short loc_5F3637

loc_5F362D:
mov	[ebp+var_B4], 1

loc_5F3637:
mov	dl, byte ptr [ebp+var_B4]
mov	[ebp+var_11], dl
mov	eax, [ebp+var_5C]
and	eax, 1
jz	short loc_5F3651
and	[ebp+var_5C], 0FFFFFFFEh
call	nullsub_1

loc_5F3651:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_5F36F1
mov	[ebp+var_50], 0
mov	edx, [ebp+arg_0]
push	edx
lea	ecx, [ebp+var_4C]
call	sub_403400
mov	eax, [ebp+var_50]
mov	[ebp+var_24], eax
lea	ecx, [ebp+var_4C]
mov	[ebp+var_A4], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_A0]
mov	[ebp+var_94], edx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_94]
call	sub_4046E0
mov	eax, [ebp+var_A4]
push	eax
push	ecx
mov	[ebp+var_9C], esp
mov	ecx, [ebp+var_A0]
mov	eax, [ebp+var_9C]
call	sub_4046E0
lea	ecx, [ebp+var_58]
push	ecx
mov	ecx, [ebp+var_A8]
call	sub_5F3900
lea	edx, [ebp+var_58]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_B8]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_4C]
call	sub_407E50

loc_5F36F1:
mov	eax, [ebp+var_10]
add	eax, 38h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_5F3560 endp

align 10h


; Attributes: bp-based frame

sub_5F3710 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
push	0
sub	esp, 10h
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
call	sub_5F43D0
add	esp, 24h
mov	esp, ebp
pop	ebp
retn
sub_5F3710 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5F3770(void *, int)
sub_5F3770 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_5F37C7
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	eax, [eax+4]
mov	[edx+4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ecx+8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
jmp	short loc_5F37CE

loc_5F37C7:
mov	[ebp+var_10], 0

loc_5F37CE:
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	esp, ebp
pop	ebp
retn
sub_5F3770 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_5F37E0(void *)
sub_5F37E0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_5F2280
add	esp, 8
xor	edx, edx
and	edx, 1
jz	short loc_5F3813
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F3813:
mov	esp, ebp
pop	ebp
retn
sub_5F37E0 endp

align 10h


; Attributes: bp-based frame

sub_5F3820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_42FA10
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_5F3820 endp

align 10h


; Attributes: bp-based frame

sub_5F3840 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 3FFFFFFFh
jbe	short loc_5F3868
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F3868:
cmp	[ebp+arg_0], 0
jz	short loc_5F388E
mov	ecx, [ebp+arg_0]
shl	ecx, 2
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_5F3895

loc_5F388E:
mov	[ebp+var_18], 0

loc_5F3895:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_5F3840 endp

align 10h


; Attributes: bp-based frame

sub_5F38A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 15555555h
jbe	short loc_5F38C8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F38C8:
cmp	[ebp+arg_0], 0
jz	short loc_5F38EE
mov	ecx, [ebp+arg_0]
imul	ecx, 0Ch
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_5F38F5

loc_5F38EE:
mov	[ebp+var_18], 0

loc_5F38F5:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_5F38A0 endp

align 10h


; Attributes: bp-based frame

sub_5F3900 proc	near

var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_118= dword ptr -118h
var_EC=	dword ptr -0ECh
var_D4=	dword ptr -0D4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 180h
mov	[ebp+var_158], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_158]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_5F3B0A
mov	edx, [ebp+var_158]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_5F3969
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_158]
call	sub_4314E0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43

loc_5F3969:
lea	edx, [ebp+var_1E]
mov	[ebp+var_15C], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_1D], al
movzx	eax, [ebp+var_1D]
test	eax, eax
jz	short loc_5F39C0
push	0
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43
jmp	loc_5F3B05

loc_5F39C0:
lea	edx, [ebp+var_1F]
mov	[ebp+var_160], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jnz	short loc_5F3A00
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43

loc_5F3A00:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_158]
jnz	short loc_5F3A4A
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43

loc_5F3A4A:
lea	ecx, [ebp+var_21]
mov	[ebp+var_164], ecx
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_84], edx
mov	eax, [ebp+var_84]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_5F3AD4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5F3AAD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43
jmp	short loc_5F3AD2

loc_5F3AAD:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43

loc_5F3AD2:
jmp	short loc_5F3B05

loc_5F3AD4:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_4314E0
mov	[ebp+var_9C], eax
mov	edx, [ebp+var_9C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43

loc_5F3B05:
jmp	loc_5F3E43

loc_5F3B0A:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_158]
jnz	loc_5F3BB5
lea	ecx, [ebp+var_2E]
mov	[ebp+var_168], ecx
mov	edx, [ebp+var_158]
mov	eax, [edx+0Ch]
add	eax, 10h
mov	[ebp+var_A0], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_A0]
push	edx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_2D], al
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_5F3B7F
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_158]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43
jmp	short loc_5F3BB0

loc_5F3B7F:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_4314E0
mov	[ebp+var_B8], eax
mov	edx, [ebp+var_B8]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43

loc_5F3BB0:
jmp	loc_5F3E43

loc_5F3BB5:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	eax, [ebp+var_C]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_39]
mov	[ebp+var_16C], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_BC], edx
mov	eax, [ebp+var_BC]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_430BA0
add	esp, 8
mov	[ebp+var_6], al
movzx	edx, [ebp+var_6]
test	edx, edx
jz	short loc_5F3C46
lea	eax, [ebp+var_3B]
mov	[ebp+var_170], eax
mov	ecx, [ebp+var_4C]
or	ecx, 1
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_C]
add	edx, 10h
mov	[ebp+var_D4], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_D4]
push	ecx
call	sub_430BA0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_5F3C46
mov	[ebp+var_174], 1
jmp	short loc_5F3C50

loc_5F3C46:
mov	[ebp+var_174], 0

loc_5F3C50:
mov	al, byte ptr [ebp+var_174]
mov	[ebp+var_3A], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_5F3C65
and	[ebp+var_4C], 0FFFFFFFEh

loc_5F3C65:
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	short loc_5F3CC7
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_5F3C9D
mov	ecx, [ebp+var_C]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43
jmp	short loc_5F3CC2

loc_5F3C9D:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	loc_5F3E43

loc_5F3CC2:
jmp	loc_5F3E43

loc_5F3CC7:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	ecx, [ebp+var_6]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_11], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_5F3D22
lea	eax, [ebp+var_3C]
mov	[ebp+var_178], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_EC], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_EC]
push	eax
call	sub_430BA0
add	esp, 8
mov	[ebp+var_11], al

loc_5F3D22:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jnz	short loc_5F3D81
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_5F3D81
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_158]
jz	short loc_5F3D75
lea	ecx, [ebp+var_3E]
mov	[ebp+var_17C], ecx
mov	edx, [ebp+var_4C]
or	edx, 2
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_118], eax
mov	ecx, [ebp+var_118]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_430BA0
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_5F3D81

loc_5F3D75:
mov	[ebp+var_180], 1
jmp	short loc_5F3D8B

loc_5F3D81:
mov	[ebp+var_180], 0

loc_5F3D8B:
mov	cl, byte ptr [ebp+var_180]
mov	[ebp+var_3D], cl
mov	edx, [ebp+var_4C]
and	edx, 2
jz	short loc_5F3DA0
and	[ebp+var_4C], 0FFFFFFFDh

loc_5F3DA0:
movzx	eax, [ebp+var_3D]
test	eax, eax
jz	short loc_5F3DF9
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_5F3DD5
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	short loc_5F3E43
jmp	short loc_5F3DF7

loc_5F3DD5:
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_158]
call	sub_431390
mov	eax, [ebp+arg_0]
jmp	short loc_5F3E43

loc_5F3DF7:
jmp	short loc_5F3E43

loc_5F3DF9:
movzx	ecx, [ebp+var_6]
movzx	edx, [ebp+var_11]
cmp	ecx, edx
jnz	short loc_5F3E17
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_5F3E43
jmp	short loc_5F3E43

loc_5F3E17:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_48]
push	ecx
mov	ecx, [ebp+var_158]
call	sub_4314E0
mov	[ebp+var_154], eax
mov	edx, [ebp+var_154]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_5F3E43:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5F3900 endp

align 10h


; Attributes: bp-based frame

sub_5F3E50 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F3E50
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
jmp	short loc_5F3E8D

loc_5F3E84:
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_14], ecx

loc_5F3E8D:
mov	edx, [ebp+var_14]
cmp	edx, [ebp+arg_4]
jnb	short loc_5F3EB6
mov	[ebp+var_18], 80h
push	8
mov	ecx, [ebp+var_34]
add	ecx, 24h
call	sub_644220
mov	[ebp+var_38], eax
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_38]
mov	[eax], ecx
jmp	short loc_5F3E84

loc_5F3EB6:
jmp	short loc_5F3EDE

loc_5F3EB8:
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5F3F00
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5F3EE5
retn

loc_5F3EDE:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5F3EE5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_5F3E50 endp

align 10h


; Attributes: bp-based frame

sub_5F3F00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
jmp	short loc_5F3F1A

loc_5F3F11:
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx

loc_5F3F1A:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jnb	short loc_5F3F4E
mov	[ebp+var_8], 80h
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jz	short loc_5F3F4C
mov	edx, 8
shl	edx, 4
push	edx		; int
mov	eax, [ebp+var_C]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5F3F4C:
jmp	short loc_5F3F11

loc_5F3F4E:
mov	esp, ebp
pop	ebp
retn	8
sub_5F3F00 endp

align 10h


; Attributes: bp-based frame

sub_5F3F60 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_70]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_70]
cmp	[edx+24h], ecx
jbe	short loc_5F400B
mov	eax, [ebp+var_70]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_70]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_5F3FE3
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_70]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_5F4006

loc_5F3FE3:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_5F4006:
jmp	loc_5F40B8

loc_5F400B:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_70]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_70]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_70]
add	ecx, 20h
call	sub_5F3840
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_70]
mov	ecx, [eax+24h]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+20h]
mov	[ebp+var_58], eax
cmp	[ebp+var_58], 0
jz	short loc_5F40A6
mov	ecx, [ebp+var_5C]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_58]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5F40A6:
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_5F40B8:
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_60], 80h
mov	eax, 8
shl	eax, 4
mov	ecx, [ebp+var_70]
add	eax, [ecx+4]
mov	edx, [ebp+var_70]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
add	eax, 10h
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	edx, [ebp+var_6C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_64], 80h
mov	eax, 8
shl	eax, 4
mov	ecx, [ebp+var_68]
add	eax, [ecx+4]
mov	edx, [ebp+var_68]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_5F3F60 endp

align 10h


; Attributes: bp-based frame

sub_5F4140 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F4140
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
jmp	short loc_5F417D

loc_5F4174:
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_14], ecx

loc_5F417D:
mov	edx, [ebp+var_14]
cmp	edx, [ebp+arg_4]
jnb	short loc_5F41A6
mov	[ebp+var_18], 80h
push	0Ah
mov	ecx, [ebp+var_34]
add	ecx, 24h
call	sub_5F38A0
mov	[ebp+var_38], eax
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_38]
mov	[eax], ecx
jmp	short loc_5F4174

loc_5F41A6:
jmp	short loc_5F41CE

loc_5F41A8:
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_51A170
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5F41D5
retn

loc_5F41CE:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5F41D5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_5F4140 endp

align 10h


; Attributes: bp-based frame

sub_5F41F0 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_70], ecx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_70]
mov	edx, [eax+1Ch]
sub	edx, [ecx+0Ch]
sar	edx, 2
add	edx, 1
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
shl	ecx, 1
mov	edx, [ebp+var_70]
cmp	[edx+24h], ecx
jbe	short loc_5F429B
mov	eax, [ebp+var_70]
mov	ecx, [eax+24h]
sub	ecx, [ebp+var_8]
shr	ecx, 1
mov	edx, [ebp+var_70]
mov	eax, [edx+20h]
lea	ecx, [eax+ecx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+0Ch]
jnb	short loc_5F4273
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+1Ch]
add	edx, 4
push	edx
mov	eax, [ebp+var_70]
mov	ecx, [eax+0Ch]
push	ecx
call	sub_5E8DC0
add	esp, 0Ch
jmp	short loc_5F4296

loc_5F4273:
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5F4430
add	esp, 0Ch

loc_5F4296:
jmp	loc_5F4348

loc_5F429B:
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_70]
add	ecx, 24h
push	ecx
call	sub_4049A0
add	esp, 8
mov	edx, [ebp+var_70]
mov	ecx, [edx+24h]
mov	edx, [eax]
lea	eax, [ecx+edx+2]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_70]
add	ecx, 20h
call	sub_5F3840
mov	[ebp+var_14], eax
mov	edx, [ebp+var_10]
sub	edx, [ebp+var_8]
shr	edx, 1
mov	eax, [ebp+var_14]
lea	ecx, [eax+edx*4]
movzx	edx, [ebp+arg_4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_0]
lea	eax, [ecx+edx*4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+1Ch]
add	eax, 4
push	eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+0Ch]
push	edx
call	sub_5E8DC0
add	esp, 0Ch
mov	eax, [ebp+var_70]
mov	ecx, [eax+24h]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_70]
mov	eax, [edx+20h]
mov	[ebp+var_58], eax
cmp	[ebp+var_58], 0
jz	short loc_5F4336
mov	ecx, [ebp+var_5C]
shl	ecx, 2
push	ecx		; int
mov	edx, [ebp+var_58]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_5F4336:
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_14]
mov	[eax+20h], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_10]
mov	[edx+24h], eax

loc_5F4348:
mov	ecx, [ebp+var_70]
mov	edx, [ebp+var_4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_60], 80h
mov	eax, 0Ah
imul	eax, 0Ch
mov	ecx, [ebp+var_70]
add	eax, [ecx+4]
mov	edx, [ebp+var_70]
mov	[edx+8], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax*4-4]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
add	eax, 10h
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_68]
mov	edx, [ebp+var_6C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[eax+4], edx
mov	[ebp+var_64], 80h
mov	eax, 0Ah
imul	eax, 0Ch
mov	ecx, [ebp+var_68]
add	eax, [ecx+4]
mov	edx, [ebp+var_68]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_5F41F0 endp

align 10h


; Attributes: bp-based frame

sub_5F43D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_20]
push	edx
sub	esp, 10h
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_14]
mov	[eax+4], edx
mov	ecx, [ebp+arg_18]
mov	[eax+8], ecx
mov	edx, [ebp+arg_1C]
mov	[eax+0Ch], edx
sub	esp, 10h
mov	[ebp+var_14], esp
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
mov	[eax+4], edx
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
mov	edx, [ebp+arg_C]
mov	[eax+0Ch], edx
call	sub_5F4470
add	esp, 28h
mov	esp, ebp
pop	ebp
retn
sub_5F43D0 endp

align 10h


; Attributes: bp-based frame

sub_5F4430 proc	near

var_6= word ptr	-6
var_4= byte ptr	-4
var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_2], al
mov	cl, [ebp+var_2]
mov	[ebp+var_1], cl
xor	edx, edx
mov	byte ptr [ebp+var_6+1],	dl
mov	al, byte ptr [ebp+var_6+1]
mov	[ebp+var_3], al
xor	ecx, ecx
mov	byte ptr [ebp+var_6], cl
mov	dl, byte ptr [ebp+var_6]
mov	[ebp+var_4], dl
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_40A290
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_5F4430 endp

align 10h


; Attributes: bp-based frame

sub_5F4470 proc	near

var_18=	dword ptr -18h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h
jmp	short loc_5F4480

loc_5F4478:
lea	ecx, [ebp+arg_0]
call	sub_502710

loc_5F4480:
mov	eax, [ebp+arg_0]
xor	ecx, ecx
cmp	eax, [ebp+arg_10]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_5F44C7
xor	eax, eax
mov	[ebp+var_1], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx]
push	edx
call	sub_5F2280
add	esp, 8
xor	eax, eax
and	eax, 1
jz	short loc_5F44C5
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F44C5:
jmp	short loc_5F4478

loc_5F44C7:
mov	esp, ebp
pop	ebp
retn
sub_5F4470 endp

align 10h


; Attributes: bp-based frame

sub_5F44D0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F44D0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_4517E0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_5F4580
add	esp, 8
jmp	short loc_5F454F

loc_5F451E:
cmp	[ebp+var_14], 0
jz	short loc_5F4539
mov	edx, 1
imul	edx, 3Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_5F4539:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_5F4556
retn

loc_5F454F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_5F4556:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5F44D0 endp



; Attributes: bp-based frame

; int __cdecl sub_5F4580(void *, int)
sub_5F4580 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_5F4580
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	2Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_5F45EF
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_403400
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
jmp	short loc_5F45F6

loc_5F45EF:
mov	[ebp+var_1C], 0

loc_5F45F6:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_5F4580 endp

align 10h



sub_5F4620 proc	near
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, [edi+4]
test	esi, esi
jz	short loc_5F4642
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F4642
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F4642:
mov	esi, [edi]
test	esi, esi
jz	short loc_5F465B
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F465B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F465B:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	44h
push	3
push	edi
call	eax
pop	esi
mov	eax, edi
pop	ebx
retn
sub_5F4620 endp

align 10h



sub_5F4680 proc	near
push	ebx
push	esi
mov	esi, eax
xor	eax, eax
xor	ebx, ebx
mov	dword ptr [esi], offset	off_15C903C
cmp	ax, [esi+0Ah]
jnb	short loc_5F46B2
push	edi

loc_5F4695:
push	ebx
mov	ecx, esi
call	sub_46B2F0
mov	edi, [eax]
test	edi, edi
jz	short loc_5F46A8
call	sub_5F4620

loc_5F46A8:
movzx	ecx, word ptr [esi+0Ah]
inc	ebx
cmp	ebx, ecx
jb	short loc_5F4695
pop	edi

loc_5F46B2:
mov	dword ptr [esi], offset	off_1554C5C
mov	esi, [esi+4]
test	esi, esi
jz	short loc_5F46D3
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	9
push	esi
call	edx

loc_5F46D3:
pop	esi
pop	ebx
retn
sub_5F4680 endp

align 10h



sub_5F46E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

add	eax, eax
sub	esp, 8
add	eax, eax
jnz	short loc_5F46EE
mov	eax, 1

loc_5F46EE:
push	0
push	0FFFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
add	esp, 8
retn
sub_5F46E0 endp




sub_5F4720 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_5F4680
test	[esp+4+arg_0], 1
jz	short loc_5F4748
test	esi, esi
jz	short loc_5F4748
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_5F4748:
mov	eax, esi
pop	esi
retn	4
sub_5F4720 endp

align 10h



sub_5F4750 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 38h
mov	ecx, [esp+38h+arg_0]
fld	dword ptr [edx]
fsub	dword ptr [ecx]
push	ebx
mov	ebx, [esp+3Ch+arg_10]
push	ebp
fstp	[esp+40h+var_24]
mov	ebp, [esp+40h+arg_14]
fld	dword ptr [edx+4]
fsub	dword ptr [ecx+4]
fstp	[esp+40h+var_20]
fld	dword ptr [edx+8]
fsub	dword ptr [ecx+8]
fstp	[esp+40h+var_1C]
fld	dword ptr [eax]
fsub	dword ptr [ecx]
fstp	[esp+40h+var_30]
fld	dword ptr [eax+4]
fsub	dword ptr [ecx+4]
fstp	[esp+40h+var_2C]
fld	dword ptr [eax+8]
fsub	dword ptr [ecx+8]
fstp	[esp+40h+var_28]
fld	dword ptr [esi+4]
fld	[esp+40h+var_28]
fld	st
fmulp	st(2), st
fld	dword ptr [esi+8]
fld	[esp+40h+var_2C]
fld	st
fmulp	st(2), st
fxch	st(3)
fsubrp	st(1), st
fstp	[esp+40h+var_18]
fld	dword ptr [esi+8]
fld	[esp+40h+var_30]
fld	st
fmulp	st(2), st
fld	dword ptr [esi]
fmulp	st(3), st
fxch	st(1)
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+40h+var_14]
fld	dword ptr [esi]
fmulp	st(2), st
fmul	dword ptr [esi+4]
fsubp	st(1), st
fstp	[esp+40h+var_10]
fld	[esp+40h+var_14]
fld	st
fld	[esp+40h+var_20]
fld	st
fmulp	st(2), st
fld	[esp+40h+var_18]
fld	st
fld	[esp+40h+var_24]
fld	st
fmulp	st(2), st
fxch	st(4)
faddp	st(1), st
fld	[esp+40h+var_10]
fld	st
fmul	[esp+40h+var_1C]
faddp	st(2), st
fxch	st(1)
fstp	[esp+40h+arg_0]
fld	ds:flt_1479B68
fld	[esp+40h+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	loc_5F499A
fstp	st
fld	dword ptr [edi]
fsub	dword ptr [ecx]
fstp	[esp+40h+var_18]
fld	dword ptr [edi+4]
fsub	dword ptr [ecx+4]
fstp	[esp+40h+var_14]
fld	dword ptr [edi+8]
fsub	dword ptr [ecx+8]
fstp	[esp+40h+var_10]
fld	[esp+40h+var_14]
fld	st
fmulp	st(6), st
fld	[esp+40h+var_18]
fld	st
fmulp	st(4), st
fxch	st(6)
faddp	st(3), st
fld	[esp+40h+var_10]
fld	st
fmulp	st(3), st
fxch	st(3)
faddp	st(2), st
fxch	st(1)
fstp	[esp+40h+var_38]
fld	[esp+40h+var_38]
fst	dword ptr [ebx]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	loc_5F4974
fld	[esp+40h+arg_0]
fcompp
fnstsw	ax
test	ah, 5
jnp	loc_5F4988
fld	st
fmul	[esp+40h+var_1C]
fld	st(2)
fmul	st, st(4)
fsubp	st(1), st
fstp	[esp+40h+var_18]
fld	st(3)
fmulp	st(2), st
fld	[esp+40h+var_1C]
fmul	st, st(5)
fsubp	st(2), st
fxch	st(1)
fstp	[esp+40h+var_14]
fxch	st(3)
fmulp	st(1), st
fxch	st(2)
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+40h+var_10]
fld	[esp+40h+var_14]
fld	st
fmul	dword ptr [esi+4]
fld	[esp+40h+var_18]
fld	st
fmul	dword ptr [esi]
faddp	st(2), st
fld	dword ptr [esi+8]
fld	[esp+40h+var_10]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
fst	dword ptr [ebp+0]
fldz
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_5F4950
fld	[esp+40h+var_38]
faddp	st(2), st
fld	[esp+40h+arg_0]
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 5
jnp	short loc_5F4962
fld	[esp+40h+var_30]
mov	ecx, [esp+40h+arg_C]
fmulp	st(3), st
fld	[esp+40h+var_2C]
fmulp	st(5), st
fxch	st(2)
faddp	st(4), st
fld	[esp+40h+var_28]
fmulp	st(3), st
fxch	st(3)
faddp	st(2), st
fxch	st(1)
fstp	[esp+40h+arg_0]
fld	[esp+40h+arg_0]
fst	dword ptr [ecx]
fcompp
fnstsw	ax
test	ah, 5
jp	loc_5F4AB6
pop	ebp
fstp	st
xor	al, al
pop	ebx
add	esp, 38h
retn

loc_5F4950:
fstp	st(1)
pop	ebp
fstp	st
xor	al, al
fstp	st(2)
pop	ebx
fstp	st(1)
fstp	st
add	esp, 38h
retn

loc_5F4962:
fstp	st
pop	ebp
fstp	st(3)
xor	al, al
fstp	st
pop	ebx
fstp	st
fstp	st
add	esp, 38h
retn

loc_5F4974:
fstp	st(1)
pop	ebp
fstp	st(4)
xor	al, al
fstp	st
pop	ebx
fstp	st
fstp	st
fstp	st
add	esp, 38h
retn

loc_5F4988:
fstp	st
pop	ebp
fstp	st(3)
xor	al, al
fstp	st(2)
pop	ebx
fstp	st(1)
fstp	st
add	esp, 38h
retn

loc_5F499A:
fstp	st(3)
fstp	st(3)
fld	ds:flt_15FD248
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_5F4B68
cmp	[esp+40h+arg_4], 0
jnz	loc_5F4B68
fld	dword ptr [edi]
fsub	dword ptr [ecx]
fstp	[esp+40h+var_18]
fld	dword ptr [edi+4]
fsub	dword ptr [ecx+4]
fstp	[esp+40h+var_14]
fld	dword ptr [edi+8]
fsub	dword ptr [ecx+8]
fstp	[esp+40h+var_10]
fld	[esp+40h+var_14]
fmulp	st(4), st
fmul	[esp+40h+var_18]
faddp	st(3), st
fld	[esp+40h+var_10]
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+40h+var_38]
fld	[esp+40h+var_38]
fst	dword ptr [ebx]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 5
jnp	loc_5F4B6C
fcompp
fnstsw	ax
test	ah, 5
jnp	loc_5F4B70
lea	eax, [esp+40h+var_18]
push	eax
lea	ecx, [esp+44h+var_24]
lea	eax, [esp+44h+var_C]
call	sub_40F530
fld	[esp+40h+var_8]
fld	st
fmul	dword ptr [esi+4]
fld	dword ptr [esi]
fld	[esp+40h+var_C]
fld	st
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	dword ptr [esi+8]
fld	[esp+40h+var_4]
fld	st
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
fst	dword ptr [ebp+0]
fldz
fcom	st(1)
fnstsw	ax
test	ah, 5
jnp	loc_5F4B44
fld	[esp+40h+var_38]
faddp	st(2), st
fld	[esp+40h+arg_0]
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jz	loc_5F4B56
fld	[esp+40h+var_2C]
mov	ecx, [esp+40h+arg_C]
fmulp	st(5), st
fld	[esp+40h+var_30]
fmulp	st(4), st
fxch	st(4)
faddp	st(3), st
fld	[esp+40h+var_28]
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+40h+arg_0]
fld	[esp+40h+arg_0]
fst	dword ptr [ecx]
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	loc_5F4B6E

loc_5F4AB6:
fld1
mov	eax, [esp+40h+arg_8]
fdivrp	st(1), st
fstp	[esp+40h+arg_0]
fld	dword ptr [ebx]
fld	[esp+40h+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [ebx]
fld	dword ptr [ebp+0]
fmul	st, st(1)
fstp	dword ptr [ebp+0]
pop	ebp
pop	ebx
fmul	dword ptr [ecx]
fstp	[esp+38h+arg_0]
fld	[esp+38h+arg_0]
fst	dword ptr [ecx]
fstp	[esp+38h+arg_0]
fld	dword ptr [esi]
fld	[esp+38h+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+38h+var_18]
fld	dword ptr [esi+4]
fmul	st, st(1)
fstp	[esp+38h+var_14]
fmul	dword ptr [esi+8]
fstp	[esp+38h+var_10]
fld	dword ptr [edi]
fadd	[esp+38h+var_18]
fstp	[esp+38h+var_24]
mov	edx, [esp+38h+var_24]
fld	dword ptr [edi+4]
fadd	[esp+38h+var_14]
fstp	[esp+38h+var_20]
mov	ecx, [esp+38h+var_20]
fld	[esp+38h+var_10]
fadd	dword ptr [edi+8]
mov	[eax], edx
mov	[eax+4], ecx
fstp	[esp+38h+var_1C]
mov	edx, [esp+38h+var_1C]
mov	[eax+8], edx
mov	al, 1
add	esp, 38h
retn

loc_5F4B44:
fstp	st(1)
pop	ebp
fstp	st(3)
xor	al, al
fstp	st(1)
pop	ebx
fstp	st
fstp	st
add	esp, 38h
retn

loc_5F4B56:
fstp	st(4)
pop	ebp
fstp	st(2)
xor	al, al
fstp	st
pop	ebx
fstp	st(1)
fstp	st
add	esp, 38h
retn

loc_5F4B68:
fstp	st(3)
fstp	st(2)

loc_5F4B6C:
fstp	st

loc_5F4B6E:
fstp	st

loc_5F4B70:
pop	ebp
xor	al, al
pop	ebx
add	esp, 38h
retn
sub_5F4750 endp

align 10h



sub_5F4B80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, [ebx]
push	edi
mov	edi, eax
cmp	esi, edi
jz	short loc_5F4BBD
test	esi, esi
jz	short loc_5F4BAD
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F4BAD
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F4BAD:
mov	[ebx], edi
test	edi, edi
jz	short loc_5F4BBD
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_5F4BBD:
mov	esi, [ebx+4]
test	esi, esi
jz	short loc_5F4BDE
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F4BD7
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F4BD7:
mov	dword ptr [ebx+4], 0

loc_5F4BDE:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_5F4B80 endp

align 10h



sub_5F4BF0 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	esi
mov	esi, eax
movzx	ecx, word ptr [esi+0Ah]
mov	eax, [esi+10h]
push	edi
cmp	eax, ecx
jnb	short loc_5F4C27
push	eax
mov	ecx, esi
call	sub_46B2F0
mov	edi, [eax]
push	edi
mov	eax, ebx
call	sub_5F4B80
inc	dword ptr [esi+10h]
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4

loc_5F4C27:
mov	edx, dword_1889574
mov	ecx, [edx]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	edx, [esp+30h+arg_0]
push	edx
mov	[esp+34h+arg_0], 4
mov	[esp+34h+var_10], 44h
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+34h+var_10]
push	edx
call	eax
mov	edi, eax
test	edi, edi
jnz	short loc_5F4C78
lea	ecx, [esp+1Ch+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [esp+20h+var_C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F4C78:
fldz
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
fst	dword ptr [edi+34h]
fst	dword ptr [edi+38h]
push	edi
fst	dword ptr [edi+3Ch]
mov	eax, ebx
fstp	dword ptr [edi+40h]
call	sub_5F4B80
movzx	ebx, word ptr [esi+0Ah]
movzx	edx, word ptr [esi+8]
mov	[esp+1Ch+arg_0], edi
cmp	ebx, edx
jb	short loc_5F4CB6
movzx	edx, word ptr [esi+0Eh]
add	edx, ebx
call	sub_41CB00

loc_5F4CB6:
push	esi
lea	edx, [esp+20h+arg_0]
mov	ecx, ebx
call	sub_410350
inc	dword ptr [esi+10h]
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_5F4BF0 endp




sub_5F4CD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_B17C40
test	[esp+4+arg_0], 1
jz	short loc_5F4CF6
test	esi, esi
jz	short loc_5F4CF6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	50h
push	3
push	esi
call	eax

loc_5F4CF6:
mov	eax, esi
pop	esi
retn	4
sub_5F4CD0 endp

align 10h



sub_5F4D00 proc	near
mov	eax, offset off_17EFC94
retn
sub_5F4D00 endp

align 10h



sub_5F4D10 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C909C
jz	short loc_5F4D33
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_5F4D33:
mov	eax, esi
pop	esi
retn	4
sub_5F4D10 endp

align 10h



sub_5F4D40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 40h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F4D91
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F4D91:
call	sub_B0B910
add	esp, 14h
retn
sub_5F4D40 endp

align 10h



sub_5F4DA0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C909C
jz	short loc_5F4DC3
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4
push	3
push	esi
call	eax

loc_5F4DC3:
mov	eax, esi
pop	esi
retn	4
sub_5F4DA0 endp

align 10h



sub_5F4DD0 proc	near
mov	dword ptr [esi], offset	off_15C90FC
mov	ecx, [eax+4]
mov	[esi+4], ecx
mov	edx, [eax+8]
mov	[esi+8], edx
mov	ecx, [eax+0Ch]
mov	[esi+0Ch], ecx
mov	edx, [eax+10h]
mov	[esi+10h], edx
mov	ecx, [eax+14h]
mov	[esi+14h], ecx
mov	edx, [eax+18h]
mov	[esi+18h], edx
fld	dword ptr [eax+1Ch]
fstp	dword ptr [esi+1Ch]
fld	dword ptr [eax+38h]
mov	eax, esi
fstp	dword ptr [esi+38h]
call	sub_5F4E10
mov	eax, esi
retn
sub_5F4DD0 endp




sub_5F4E10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 1Ch
fld	dword ptr [eax+1Ch]
fsub	dword ptr [eax+38h]
fstp	[esp+1Ch+var_1C]
fld	[esp+1Ch+var_1C]
fst	[esp+1Ch+var_1C]
fld	dword ptr [eax+10h]
fld	[esp+1Ch+var_1C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_18]
fld	dword ptr [eax+14h]
fmul	st, st(1)
fstp	[esp+1Ch+var_14]
fmul	dword ptr [eax+18h]
fstp	[esp+1Ch+var_10]
fld	dword ptr [eax+4]
fsub	[esp+1Ch+var_18]
fstp	[esp+1Ch+var_C]
mov	ecx, [esp+1Ch+var_C]
fld	dword ptr [eax+8]
fsub	[esp+1Ch+var_14]
fstp	[esp+1Ch+var_8]
mov	edx, [esp+1Ch+var_8]
fld	dword ptr [eax+0Ch]
mov	[eax+20h], ecx
fsub	[esp+1Ch+var_10]
mov	[eax+24h], edx
fstp	[esp+1Ch+var_4]
mov	ecx, [esp+1Ch+var_4]
mov	[eax+28h], ecx
fstp	[esp+1Ch+var_1C]
fld	dword ptr [eax+10h]
fld	[esp+1Ch+var_1C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_C]
fld	dword ptr [eax+14h]
fmul	st, st(1)
fstp	[esp+1Ch+var_8]
fmul	dword ptr [eax+18h]
fstp	[esp+1Ch+var_4]
fld	[esp+1Ch+var_C]
fld	ds:dbl_15FCD70
fmul	st(1), st
fxch	st(1)
fstp	[esp+1Ch+var_18]
mov	edx, [esp+1Ch+var_18]
fld	[esp+1Ch+var_8]
mov	[eax+2Ch], edx
fmul	st, st(1)
fstp	[esp+1Ch+var_14]
mov	ecx, [esp+1Ch+var_14]
mov	[eax+30h], ecx
fmul	[esp+1Ch+var_4]
fstp	[esp+1Ch+var_10]
mov	edx, [esp+1Ch+var_10]
mov	[eax+34h], edx
add	esp, 1Ch
retn
sub_5F4E10 endp

align 10h



sub_5F4EE0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C909C
jz	short loc_5F4F03
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_5F4F03:
mov	eax, esi
pop	esi
retn	4
sub_5F4EE0 endp

align 10h



sub_5F4F10 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	esi
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 3Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F4F62
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F4F62:
mov	edx, dword_17EE0FC
fld1
sub	esp, 0Ch
mov	ecx, esp
mov	[ecx], edx
mov	edx, dword_17EE100
mov	[ecx+4], edx
mov	edx, dword_17EE104
mov	[ecx+8], edx
mov	edx, dword_1889A64
sub	esp, 0Ch
mov	ecx, esp
mov	[ecx], edx
mov	edx, dword_1889A68
mov	[ecx+4], edx
mov	edx, dword_1889A6C
sub	esp, 8
mov	[ecx+8], edx
fst	[esp+38h+var_34]
mov	esi, eax
fstp	[esp+38h+var_38]
call	sub_B0A710
pop	esi
add	esp, 14h
retn
sub_5F4F10 endp

align 10h



sub_5F4FC0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C909C
jz	short loc_5F4FE3
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_5F4FE3:
mov	eax, esi
pop	esi
retn	4
sub_5F4FC0 endp

align 10h


; Attributes: bp-based frame

sub_5F4FF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
fldz
push	edi
mov	edi, eax
mov	dword ptr [edi], offset	off_15C912C
mov	eax, dword_1889A64
mov	[edi+4], eax
mov	ecx, dword_1889A68
mov	[edi+8], ecx
mov	edx, dword_1889A6C
fstp	dword ptr [edi+10h]
mov	[edi+0Ch], edx
mov	eax, dword_1889A64
mov	[edi+14h], eax
mov	ecx, dword_1889A68
mov	[edi+18h], ecx
mov	edx, dword_1889A6C
mov	[edi+1Ch], edx
fld	dword_17EE108
fmul	dword_1889A64
mov	eax, dword_17EE108
fld	dword_17EE10C
mov	ecx, dword_17EE10C
fmul	dword_1889A68
mov	edx, dword_17EE110
mov	[esp+18h+var_10], eax
lea	eax, [esp+18h+var_10]
faddp	st(1), st
mov	[esp+18h+var_C], ecx
fld	dword_17EE110
mov	[esp+18h+var_8], edx
fmul	dword_1889A6C
faddp	st(1), st
fstp	[esp+18h+var_4]
call	sub_B0A160
mov	eax, edi
pop	edi
mov	esp, ebp
pop	ebp
retn
sub_5F4FF0 endp

align 10h



sub_5F50A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 20h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F50F1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F50F1:
call	sub_5F4FF0
add	esp, 14h
retn
sub_5F50A0 endp

align 10h



sub_5F5100 proc	near
fldz
push	edi
mov	edi, eax
mov	dword ptr [edi], offset	off_15C912C
mov	eax, dword_1889A64
mov	[edi+4], eax
mov	ecx, dword_1889A68
mov	[edi+8], ecx
mov	edx, dword_1889A6C
fstp	dword ptr [edi+10h]
lea	eax, [esi+4]
mov	[edi+0Ch], edx
call	sub_B0A160
mov	ecx, [esi+14h]
lea	eax, [esi+14h]
mov	[edi+14h], ecx
mov	edx, [eax+4]
mov	[edi+18h], edx
mov	eax, [eax+8]
mov	[edi+1Ch], eax
mov	eax, edi
pop	edi
retn
sub_5F5100 endp

align 10h



sub_5F5150 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C909C
jz	short loc_5F5173
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_5F5173:
mov	eax, esi
pop	esi
retn	4
sub_5F5150 endp

align 10h



sub_5F5180 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 14h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F51D1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F51D1:
fld1
mov	dword ptr [eax], offset	off_15C915C
mov	ecx, dword_1889A64
mov	[eax+4], ecx
mov	edx, dword_1889A68
mov	[eax+8], edx
mov	ecx, dword_1889A6C
fstp	dword ptr [eax+10h]
mov	[eax+0Ch], ecx
add	esp, 14h
retn
sub_5F5180 endp

align 10h



sub_5F5200 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C918C
call	sub_B06690
mov	eax, [esi+8]
mov	dword ptr [esi+4], offset off_1554C5C
test	eax, eax
jz	short loc_5F5230
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F5230:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_15C909C
jz	short loc_5F5251
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_5F5251:
mov	eax, esi
pop	esi
retn	4
sub_5F5200 endp

align 10h



sub_5F5260 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
mov	dword ptr [ebp+0], offset off_15C918C
push	esi
lea	esi, [ebp+4]
push	edi
xor	eax, eax
xor	edx, edx
mov	ecx, 1
xor	edi, edi
mov	[esi+8], ax
mov	[esi+0Eh], cx
mov	[esi+0Ah], dx
mov	[esi+0Ch], ax
mov	[esi+4], edi
mov	dword ptr [esi], offset	off_1554C5C
movzx	edx, word ptr [ebx+0Eh]
call	sub_41CB00
xor	ecx, ecx
cmp	cx, [ebx+0Eh]
jnb	short loc_5F52DA
jmp	short loc_5F52B0
align 10h

loc_5F52B0:
mov	edx, [ebx+8]
mov	ecx, [edx+edi*4]
test	ecx, ecx
jz	short loc_5F52D1
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
push	esi
lea	edx, [esp+14h+arg_4]
mov	ecx, edi
mov	[esp+14h+arg_4], eax
call	sub_410350

loc_5F52D1:
movzx	eax, word ptr [ebx+0Eh]
inc	edi
cmp	edi, eax
jb	short loc_5F52B0

loc_5F52DA:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	8
sub_5F5260 endp

align 10h



sub_5F52F0 proc	near
mov	eax, [ecx+14h]
retn
sub_5F52F0 endp

align 10h



sub_5F5300 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15C91BC
test	ecx, ecx
jz	short loc_5F5318
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5F5318:
test	[esp+4+arg_0], 1
jz	short loc_5F5332
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_5F5332:
mov	eax, esi
pop	esi
retn	4
sub_5F5300 endp

align 10h



sub_5F5340 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C91E0
jz	short loc_5F5363
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	50h
push	3
push	esi
call	eax

loc_5F5363:
mov	eax, esi
pop	esi
retn	4
sub_5F5340 endp

align 10h



sub_5F5370 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C91E0
jz	short loc_5F5393
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_5F5393:
mov	eax, esi
pop	esi
retn	4
sub_5F5370 endp

align 10h



sub_5F53A0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C91E0
jz	short loc_5F53C3
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_5F53C3:
mov	eax, esi
pop	esi
retn	4
sub_5F53A0 endp

align 10h



sub_5F53D0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C91E0
jz	short loc_5F53F3
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4Ch
push	3
push	esi
call	eax

loc_5F53F3:
mov	eax, esi
pop	esi
retn	4
sub_5F53D0 endp

align 10h



sub_5F5400 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C91E0
jz	short loc_5F5423
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	6Ch
push	3
push	esi
call	eax

loc_5F5423:
mov	eax, esi
pop	esi
retn	4
sub_5F5400 endp

align 10h



sub_5F5430 proc	near
cmp	dword ptr [eax+80h], 0
jnz	short loc_5F5445
cmp	dword ptr [eax+84h], 0
jnz	short loc_5F5445
xor	eax, eax
retn

loc_5F5445:
mov	eax, 1
retn
sub_5F5430 endp

align 10h



sub_5F5450 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+80h]
mov	dword ptr [esi], offset	off_15C9258
test	ecx, ecx
jz	short loc_5F547D
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
mov	ecx, [esi+84h]
test	ecx, ecx
jz	short loc_5F547D
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5F547D:
test	[esp+4+arg_0], 1
jz	short loc_5F549A
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8Ch
push	3
push	esi
call	eax

loc_5F549A:
mov	eax, esi
pop	esi
retn	4
sub_5F5450 endp




sub_5F54A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+80h]
mov	dword ptr [esi], offset	off_15C9258
test	ecx, ecx
jz	short loc_5F54CD
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
mov	ecx, [esi+84h]
test	ecx, ecx
jz	short loc_5F54CD
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5F54CD:
test	[esp+4+arg_0], 1
jz	short loc_5F54EA
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	98h
push	3
push	esi
call	eax

loc_5F54EA:
mov	eax, esi
pop	esi
retn	4
sub_5F54A0 endp




sub_5F54F0 proc	near

arg_0= dword ptr  4

mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax+8], edx
mov	dword ptr [eax], 0
mov	ecx, [esi+8]
mov	[eax+4], ecx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_5F5520
mov	[ecx], eax
inc	dword ptr [esi+0Ch]
mov	[esi+8], eax
retn	4

loc_5F5520:
inc	dword ptr [esi+0Ch]
mov	[esi+4], eax
mov	[esi+8], eax
retn	4
sub_5F54F0 endp

align 10h



sub_5F5530 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_B03050
test	[esp+4+arg_0], 1
jz	short loc_5F5556
test	esi, esi
jz	short loc_5F5556
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_5F5556:
mov	eax, esi
pop	esi
retn	4
sub_5F5530 endp

align 10h



sub_5F5560 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_B02A80
test	[esp+4+arg_0], 1
jz	short loc_5F5586
test	esi, esi
jz	short loc_5F5586
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_5F5586:
mov	eax, esi
pop	esi
retn	4
sub_5F5560 endp

align 10h



sub_5F5590 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_5F6B40
test	[esp+4+arg_0], 1
jz	short loc_5F55B6
test	esi, esi
jz	short loc_5F55B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_5F55B6:
mov	eax, esi
pop	esi
retn	4
sub_5F5590 endp

align 10h



sub_5F55C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, dword_1889574
mov	dword ptr [eax+8], 0
mov	ecx, [ecx]
mov	edx, [ecx]
push	0Ch
push	3
push	eax
mov	eax, [edx+8]
call	eax
retn	4
sub_5F55C0 endp

align 10h



sub_5F55F0 proc	near
push	esi
mov	esi, eax
mov	eax, [edx]
mov	ecx, [esi+4]
push	edi
cmp	eax, ecx
jnz	short loc_5F5642
mov	eax, [eax]
mov	[edx], eax
mov	eax, [ecx]
mov	[esi+4], eax
test	eax, eax
jz	short loc_5F5626
mov	dword ptr [eax+4], 0
mov	edx, [esi]
mov	edi, [ecx+8]
mov	eax, [edx+8]
push	ecx
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	esi
retn

loc_5F5626:
mov	edx, [esi]
mov	eax, [edx+8]
mov	dword ptr [esi+8], 0
mov	edi, [ecx+8]
push	ecx
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	esi
retn

loc_5F5642:
cmp	eax, [esi+8]
jnz	short loc_5F5655
mov	dword ptr [edx], 0
call	sub_417580
pop	edi
pop	esi
retn

loc_5F5655:
mov	edi, [eax+4]
mov	ecx, [eax]
mov	[edx], ecx
test	edi, edi
jz	short loc_5F5662
mov	[edi], ecx

loc_5F5662:
test	ecx, ecx
jz	short loc_5F5669
mov	[ecx+4], edi

loc_5F5669:
mov	edx, [esi]
mov	edi, [eax+8]
push	eax
mov	eax, [edx+8]
mov	ecx, esi
call	eax
dec	dword ptr [esi+0Ch]
mov	eax, edi
pop	edi
pop	esi
retn
sub_5F55F0 endp

align 10h



sub_5F5680 proc	near
mov	edx, [ecx+4]
xor	eax, eax
push	esi
test	edx, edx
jbe	short loc_5F569D
mov	esi, [ecx+8]
mov	ecx, esi
nop

loc_5F5690:
cmp	dword ptr [ecx], 0
jnz	short loc_5F56A1
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_5F5690

loc_5F569D:
xor	eax, eax
pop	esi
retn

loc_5F56A1:
mov	eax, [esi+eax*4]
pop	esi
retn
sub_5F5680 endp

align 10h



sub_5F56B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	dword ptr [esi+8], 0
call	sub_410460
pop	esi
retn	4
sub_5F56B0 endp

align 10h



sub_5F56D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1220450
test	[esp+4+arg_0], 1
jz	short loc_5F56F6
test	esi, esi
jz	short loc_5F56F6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_5F56F6:
mov	eax, esi
pop	esi
retn	4
sub_5F56D0 endp

align 10h



sub_5F5700 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_B01640
test	[esp+4+arg_0], 1
jz	short loc_5F5726
test	esi, esi
jz	short loc_5F5726
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	48h
push	3
push	esi
call	eax

loc_5F5726:
mov	eax, esi
pop	esi
retn	4
sub_5F5700 endp

align 10h



; int __thiscall sub_5F5730(void *, char)
sub_5F5730 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_15C92E8
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
test	[esp+4+arg_0], 1
mov	dword_188991C, 0
jz	short loc_5F575E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F575E:
mov	eax, esi
pop	esi
retn	4
sub_5F5730 endp

align 10h



sub_5F5770 proc	near
mov	eax, 10h
push	esi

loc_5F5776:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_5F5797
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_5F5776
xor	eax, eax
xor	edx, edx
test	eax, eax
setz	dl
pop	esi
mov	eax, edx
retn

loc_5F5797:
movzx	eax, byte ptr [edx]
movzx	esi, byte ptr [ecx]
sub	eax, esi
jnz	short loc_5F57C3
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_5F57C3
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_5F57C3
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_5F57C3:
sar	eax, 1Fh
or	eax, 1
xor	edx, edx
test	eax, eax
setz	dl
pop	esi
mov	eax, edx
retn
sub_5F5770 endp

align 10h



sub_5F57E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C9340
call	sub_1184260
test	[esp+4+arg_0], 1
jz	short loc_5F5808
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	74h
push	3
push	esi
call	eax

loc_5F5808:
mov	eax, esi
pop	esi
retn	4
sub_5F57E0 endp

align 10h



sub_5F5810 proc	near
mov	eax, [ecx+28h]
retn
sub_5F5810 endp

align 10h



sub_5F5820 proc	near
mov	eax, offset off_17EFCB8
retn
sub_5F5820 endp

align 10h



sub_5F5830 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	ebx, ecx
mov	esi, [ebx+28h]
push	edi
mov	edi, [esp+0Ch+arg_0]
cmp	esi, edi
jz	short loc_5F586C
test	esi, esi
jz	short loc_5F585B
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F585B
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F585B:
mov	[ebx+28h], edi
test	edi, edi
jz	short loc_5F586C
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_5F586C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5F5830 endp

align 10h



sub_5F5880 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AE1C10
test	[esp+4+arg_0], 1
jz	short loc_5F58A6
test	esi, esi
jz	short loc_5F58A6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	38h
push	3
push	esi
call	eax

loc_5F58A6:
mov	eax, esi
pop	esi
retn	4
sub_5F5880 endp

align 10h



sub_5F58B0 proc	near
mov	eax, offset off_17EFD00
retn
sub_5F58B0 endp

align 10h



sub_5F58C0 proc	near
push	ebx
push	esi
push	edi
mov	esi, eax
call	sub_116E800
fld	ds:flt_1543C88
fstp	dword ptr [esi+14h]
lea	edi, [esi+34h]
fld	ds:flt_1543C18
push	0
mov	ecx, edi
fstp	dword ptr [esi+18h]
mov	dword ptr [esi], offset	off_15C93E0
call	sub_46B5D0
mov	ebx, [edi]
test	ebx, ebx
jz	short loc_5F5911
lea	eax, [ebx+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F590B
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_5F590B:
mov	dword ptr [edi], 0

loc_5F5911:
fldz
mov	ecx, 0FFBFh
and	[esi+8], cx
fst	dword ptr [esi+14h]
pop	edi
fstp	dword ptr [esi+18h]
mov	eax, esi
pop	esi
pop	ebx
retn
sub_5F58C0 endp

align 10h



sub_5F5930 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AF93F0
test	[esp+4+arg_0], 1
jz	short loc_5F5956
test	esi, esi
jz	short loc_5F5956
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_5F5956:
mov	eax, esi
pop	esi
retn	4
sub_5F5930 endp

align 10h



sub_5F5960 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5F5990
test	[esp+4+arg_0], 1
jz	short loc_5F5986
test	edi, edi
jz	short loc_5F5986
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	edi
call	eax

loc_5F5986:
mov	eax, edi
pop	edi
retn	4
sub_5F5960 endp

align 10h



sub_5F5990 proc	near
mov	ecx, [edi+1Ch]
test	ecx, ecx
jz	short loc_5F599E
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx

loc_5F599E:
mov	eax, [edi+18h]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
lea	esi, [edi+18h]
test	eax, eax
jz	short loc_5F59C9
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F59C8
push	esi
mov	eax, ebx
call	sub_1171F60

loc_5F59C8:
pop	ebx

loc_5F59C9:
lea	esi, [edi+0Ch]
push	esi
call	sub_5FAED0
mov	eax, [esi]
test	eax, eax
jz	short loc_5F5A04
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_40AC00
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_5F5A04
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_5F5A04:
mov	dword ptr [edi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
retn
sub_5F5990 endp

align 10h



sub_5F5A20 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
dec	dword ptr [esi+8]
mov	ebx, [esi+8]
push	edi
mov	edi, [esi]
mov	ecx, [edi+ebp*4]
cmp	ecx, [edi+ebx*4]
jz	short loc_5F5A55
test	ecx, ecx
jz	short loc_5F5A45
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx

loc_5F5A45:
mov	ecx, [edi+ebx*4]
mov	[edi+ebp*4], ecx
test	ecx, ecx
jz	short loc_5F5A55
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_5F5A55:
mov	ecx, [esi]
mov	eax, [esi+8]
lea	esi, [ecx+eax*4]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_5F5A70
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax
mov	dword ptr [esi], 0

loc_5F5A70:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_5F5A20 endp

align 10h



sub_5F5A80 proc	near

arg_0= dword ptr  4

mov	eax, [esi+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
cmp	[esi+8], eax
jnz	short loc_5F5AA2
test	eax, eax
jbe	short loc_5F5A96
add	eax, eax
jmp	short loc_5F5A9B

loc_5F5A96:
mov	eax, 1

loc_5F5A9B:
push	eax
push	esi
call	sub_5F5AE0

loc_5F5AA2:
mov	eax, [esi+8]
mov	ecx, [esi]
lea	edi, [ecx+eax*4]
inc	eax
mov	[esi+8], eax
mov	ecx, [edi]
cmp	ecx, [ebx]
jz	short loc_5F5ACD
test	ecx, ecx
jz	short loc_5F5ABF
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax

loc_5F5ABF:
mov	ecx, [ebx]
mov	[edi], ecx
test	ecx, ecx
jz	short loc_5F5ACD
mov	edx, [ecx]
mov	eax, [edx]
call	eax

loc_5F5ACD:
pop	edi
pop	ebx
retn	4
sub_5F5A80 endp

align 10h



sub_5F5AE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
cmp	ebx, [esi+4]
jz	loc_5F5B89
push	ebp
push	edi
test	ebx, ebx
jbe	short loc_5F5B4E
mov	edi, ebx
call	sub_5FB570
xor	ebp, ebp
mov	edi, eax
cmp	[esi+8], ebp
jbe	short loc_5F5B50
lea	esp, [esp+0]

loc_5F5B10:
mov	esi, [esi]
lea	ebx, ds:0[ebp*4]
mov	ecx, [ebx+edi]
add	esi, ebx
cmp	ecx, [esi]
jz	short loc_5F5B3C
test	ecx, ecx
jz	short loc_5F5B2D
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx

loc_5F5B2D:
mov	ecx, [esi]
mov	[ebx+edi], ecx
test	ecx, ecx
jz	short loc_5F5B3C
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_5F5B3C:
mov	eax, [esp+10h+arg_0]
inc	ebp
mov	esi, eax
cmp	ebp, [eax+8]
jb	short loc_5F5B10
mov	ebx, [esp+10h+arg_4]
jmp	short loc_5F5B50

loc_5F5B4E:
xor	edi, edi

loc_5F5B50:
mov	eax, [esi]
test	eax, eax
jz	short loc_5F5B82
mov	ecx, [eax-4]
lea	ebp, [eax-4]
push	offset sub_40AC00
push	ecx
push	4
push	eax
call	sub_40F3E0
test	ebp, ebp
jz	short loc_5F5B82
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	ebp
call	edx

loc_5F5B82:
mov	[esi], edi
pop	edi
mov	[esi+4], ebx
pop	ebp

loc_5F5B89:
pop	esi
pop	ebx
retn	8
sub_5F5AE0 endp

align 10h



sub_5F5B90 proc	near
sub	ecx, 8
jmp	sub_5F5960
sub_5F5B90 endp

align 10h



sub_5F5BA0 proc	near
mov	eax, 10h
push	esi

loc_5F5BA6:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_5F5BC7
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_5F5BA6
xor	eax, eax
xor	edx, edx
test	eax, eax
setz	dl
mov	al, dl
pop	esi
retn

loc_5F5BC7:
movzx	eax, byte ptr [edx]
movzx	esi, byte ptr [ecx]
sub	eax, esi
jnz	short loc_5F5BF3
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_5F5BF3
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_5F5BF3
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_5F5BF3:
sar	eax, 1Fh
or	eax, 1
xor	edx, edx
test	eax, eax
setz	dl
mov	al, dl
pop	esi
retn
sub_5F5BA0 endp

align 10h



; int __thiscall sub_5F5C10(void *, char)
sub_5F5C10 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C9720
jz	short loc_5F5C29
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5F5C29:
mov	eax, esi
pop	esi
retn	4
sub_5F5C10 endp

align 10h



sub_5F5C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
mov	esi, dword_1894F64
push	edi
test	esi, esi
jz	short loc_5F5C52
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedIncrement
mov	esi, dword_1894F64

loc_5F5C52:
mov	eax, offset sub_5F5CB0
mov	[esp+10h+var_4], esi
test	eax, eax
jz	short loc_5F5C85
mov	edi, [ebx+8]
push	esi
call	sub_5F69E0
mov	edi, [ebx+10h]
push	esi
call	sub_5F6A80
push	0
call	sub_5F5CB0
mov	edi, [ebx+0Ch]
add	esp, 4
push	eax
push	esi
call	sub_5F8EC0

loc_5F5C85:
test	esi, esi
jz	short loc_5F5CA8
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F5CA8
lea	ecx, [esp+10h+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F5CA8:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_5F5C30 endp

align 10h



sub_5F5CB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	edi
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 348h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
mov	edi, eax
test	edi, edi
jnz	short loc_5F5D04
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F5D04:
push	esi
mov	esi, edi
call	sub_AE39E0
lea	esi, [edi+1Ch]
mov	dword ptr [edi], offset	off_15CA56C
call	sub_5F9860
mov	dword ptr [esi], offset	off_15C9910
add	esi, 10h
call	sub_5F9D20
mov	dword ptr [esi], offset	off_15CA5E0
pop	esi
mov	dword ptr [edi+3Ch], 0
mov	dword ptr [edi+40h], 0
mov	eax, edi
pop	edi
add	esp, 14h
retn
sub_5F5CB0 endp

align 10h



sub_5F5D50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
mov	esi, dword_1894F5C
push	edi
test	esi, esi
jz	short loc_5F5D72
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedIncrement
mov	esi, dword_1894F5C

loc_5F5D72:
mov	eax, offset sub_5F5DE0
mov	[esp+10h+var_4], esi
test	eax, eax
jz	short loc_5F5DAF
mov	edi, [ebx+8]
push	offset sub_5F5DE0
push	esi
call	sub_5F8EC0
mov	edi, [ebx+10h]
push	offset sub_5F5F30
push	esi
call	sub_5F8EC0
push	0
call	sub_5F5DE0
mov	edi, [ebx+0Ch]
add	esp, 4
push	eax
push	esi
call	sub_5F8EC0

loc_5F5DAF:
test	esi, esi
jz	short loc_5F5DD2
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F5DD2
lea	ecx, [esp+10h+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F5DD2:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_5F5D50 endp

align 10h



sub_5F5DE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 34h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F5E31
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F5E31:
push	edi
mov	edi, eax
call	sub_AE4260
pop	edi
add	esp, 14h
retn
sub_5F5DE0 endp

align 10h



sub_5F5E40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
mov	esi, dword_1894F44
push	edi
test	esi, esi
jz	short loc_5F5E62
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedIncrement
mov	esi, dword_1894F44

loc_5F5E62:
mov	eax, offset sub_5F5ED0
mov	[esp+10h+var_4], esi
test	eax, eax
jz	short loc_5F5E9F
mov	edi, [ebx+8]
push	offset sub_5F5ED0
push	esi
call	sub_5F8EC0
mov	edi, [ebx+10h]
push	offset sub_5F5F30
push	esi
call	sub_5F8EC0
push	0
call	sub_5F5ED0
mov	edi, [ebx+0Ch]
add	esp, 4
push	eax
push	esi
call	sub_5F8EC0

loc_5F5E9F:
test	esi, esi
jz	short loc_5F5EC2
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F5EC2
lea	ecx, [esp+10h+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F5EC2:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_5F5E40 endp

align 10h



sub_5F5ED0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 440h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F5F21
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F5F21:
push	eax
call	sub_AE6E80
add	esp, 14h
retn
sub_5F5ED0 endp

align 10h



sub_5F5F30 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
test	ecx, ecx
jz	short locret_5F5F40
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

locret_5F5F40:
retn
sub_5F5F30 endp

align 10h



sub_5F5F50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
mov	esi, dword_1894F58
push	edi
test	esi, esi
jz	short loc_5F5F72
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedIncrement
mov	esi, dword_1894F58

loc_5F5F72:
mov	eax, offset sub_5F5FE0
mov	[esp+10h+var_4], esi
test	eax, eax
jz	short loc_5F5FAF
mov	edi, [ebx+8]
push	offset sub_5F5FE0
push	esi
call	sub_5F8EC0
mov	edi, [ebx+10h]
push	offset sub_5F5F30
push	esi
call	sub_5F8EC0
push	0
call	sub_5F5FE0
mov	edi, [ebx+0Ch]
add	esp, 4
push	eax
push	esi
call	sub_5F8EC0

loc_5F5FAF:
test	esi, esi
jz	short loc_5F5FD2
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F5FD2
lea	ecx, [esp+10h+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F5FD2:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_5F5F50 endp

align 10h



sub_5F5FE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 5Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F6031
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F6031:
push	edi
mov	edi, eax
call	sub_AE5540
pop	edi
add	esp, 14h
retn
sub_5F5FE0 endp

align 10h



sub_5F6040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNiactorcompone ; "NiActorComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F6090
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F608B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F608B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F608B:
pop	edi
pop	esi
pop	ecx
retn
sub_5F6040 endp

align 10h



sub_5F6090 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 24h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F60E1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F60E1:
push	esi
mov	esi, eax
call	sub_5F7440
pop	esi
test	eax, eax
jz	short loc_5F60F5
add	eax, 8
add	esp, 14h
retn

loc_5F60F5:
xor	eax, eax
add	esp, 14h
retn
sub_5F6090 endp

align 10h



sub_5F6100 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNicameracompon ; "NiCameraComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F6150
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F614B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F614B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F614B:
pop	edi
pop	esi
pop	ecx
retn
sub_5F6100 endp

align 10h



sub_5F6150 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 20h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F61A1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F61A1:
push	eax
call	sub_AF5700
test	eax, eax
jz	short loc_5F61B2
add	eax, 8
add	esp, 14h
retn

loc_5F61B2:
xor	eax, eax
add	esp, 14h
retn
sub_5F6150 endp

align 10h



sub_5F61C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNigeneralcompo ; "NiGeneralComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F6210
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F620B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F620B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F620B:
pop	edi
pop	esi
pop	ecx
retn
sub_5F61C0 endp

align 10h



sub_5F6210 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 30h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F6261
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F6261:
push	esi
mov	esi, eax
call	sub_5F7340
pop	esi
test	eax, eax
jz	short loc_5F6275
add	eax, 8
add	esp, 14h
retn

loc_5F6275:
xor	eax, eax
add	esp, 14h
retn
sub_5F6210 endp

align 10h



sub_5F6280 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNiinheritedtra ; "NiInheritedTransformationComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F62D0
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F62CB
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F62CB
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F62CB:
pop	edi
pop	esi
pop	ecx
retn
sub_5F6280 endp

align 10h



sub_5F62D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 54h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F6321
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F6321:
push	eax
call	sub_AF3510
test	eax, eax
jz	short loc_5F6332
add	eax, 8
add	esp, 14h
retn

loc_5F6332:
xor	eax, eax
add	esp, 14h
retn
sub_5F62D0 endp

align 10h



sub_5F6340 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNilightcompone ; "NiLightComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F6390
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F638B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F638B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F638B:
pop	edi
pop	esi
pop	ecx
retn
sub_5F6340 endp

align 10h



sub_5F6390 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 68h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F63E1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F63E1:
push	edi
mov	edi, eax
call	sub_5F7190
pop	edi
test	eax, eax
jz	short loc_5F63F5
add	eax, 8
add	esp, 14h
retn

loc_5F63F5:
xor	eax, eax
add	esp, 14h
retn
sub_5F6390 endp

align 10h



sub_5F6400 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNiscenegraphco ; "NiSceneGraphComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F6450
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F644B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F644B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F644B:
pop	edi
pop	esi
pop	ecx
retn
sub_5F6400 endp

align 10h



sub_5F6450 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 1Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F64A1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F64A1:
push	esi
mov	esi, eax
call	sub_5F7000
pop	esi
test	eax, eax
jz	short loc_5F64B5
add	eax, 8
add	esp, 14h
retn

loc_5F64B5:
xor	eax, eax
add	esp, 14h
retn
sub_5F6450 endp

align 10h



sub_5F64C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNishadowgene_0 ; "NiShadowGeneratorComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F6510
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F650B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F650B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F650B:
pop	edi
pop	esi
pop	ecx
retn
sub_5F64C0 endp

align 10h



sub_5F6510 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 4Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F6561
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F6561:
push	edi
mov	edi, eax
call	sub_5F6EB0
pop	edi
test	eax, eax
jz	short loc_5F6575
add	eax, 8
add	esp, 14h
retn

loc_5F6575:
xor	eax, eax
add	esp, 14h
retn
sub_5F6510 endp

align 10h



sub_5F6580 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNitransformati ; "NiTransformationComponent"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F65D0
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F65CB
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F65CB
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F65CB:
pop	edi
pop	esi
pop	ecx
retn
sub_5F6580 endp

align 10h



sub_5F65D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 40h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F6621
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F6621:
push	eax
call	sub_5F6CC0
test	eax, eax
jz	short loc_5F6632
add	eax, 8
add	esp, 14h
retn

loc_5F6632:
xor	eax, eax
add	esp, 14h
retn
sub_5F65D0 endp

align 10h



sub_5F6640 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
push	offset aNigeneralentit ; "NiGeneralEntity"
call	sub_1172180
add	esp, 4
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
mov	edi, [eax+8]
push	offset sub_5F6690
push	esi
mov	[esp+14h+var_4], esi
call	sub_5F8EC0
test	esi, esi
jz	short loc_5F668B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F668B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5F668B:
pop	edi
pop	esi
pop	ecx
retn
sub_5F6640 endp

align 10h



sub_5F6690 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], 4
mov	[esp+2Ch+var_10], 34h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+2Ch+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F66E1
lea	ecx, [esp+14h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+18h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F66E1:
push	esi
mov	esi, eax
call	sub_AF8FE0
pop	esi
test	eax, eax
jz	short loc_5F66F5
add	eax, 8
add	esp, 14h
retn

loc_5F66F5:
xor	eax, eax
add	esp, 14h
retn
sub_5F6690 endp

align 10h



sub_5F6700 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 1Ch
push	esi
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
mov	dword ptr [edi+4], 0
call	ds:InterlockedIncrement
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	1
mov	dword ptr [edi], offset	off_15C9908
mov	ecx, [eax]
push	1
lea	eax, [esp+34h+var_1C]
push	eax
mov	[esp+38h+var_1C], 4
mov	[esp+38h+var_18], 14h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_18]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_5F6772
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F6772:
call	sub_5F9860
mov	ecx, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	1
mov	byte ptr [esi+10h], 1
mov	dword ptr [esi], offset	off_15CA4E4
mov	[edi+8], esi
mov	ecx, [ecx]
push	1
lea	eax, [esp+34h+var_14]
push	eax
mov	[esp+38h+var_14], 4
mov	[esp+38h+var_10], 14h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_10]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_5F67D5
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F67D5:
call	sub_5F9860
mov	ecx, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	1
mov	byte ptr [esi+10h], 1
mov	dword ptr [esi], offset	off_15CA4E4
mov	[edi+0Ch], esi
mov	ecx, [ecx]
push	1
lea	eax, [esp+34h+var_18]
push	eax
mov	[esp+38h+var_18], 4
mov	[esp+38h+var_1C], 14h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+38h+var_1C]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_5F6838
lea	ecx, [esp+20h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+24h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F6838:
call	sub_5F9860
mov	byte ptr [esi+10h], 1
mov	dword ptr [esi], offset	off_15CA4E4
mov	[edi+10h], esi
mov	eax, edi
pop	esi
add	esp, 1Ch
retn
sub_5F6700 endp

align 10h



sub_5F6860 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
mov	esi, [ebx+8]
push	edi
xor	edi, edi
mov	dword ptr [ebx], offset	off_15C9908
cmp	esi, edi
jz	short loc_5F688E
call	sub_418AE0
mov	ecx, [ebx+8]
cmp	ecx, edi
jz	short loc_5F688B
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5F688B:
mov	[ebx+8], edi

loc_5F688E:
mov	ecx, [ebx+0Ch]
cmp	ecx, edi
jz	loc_5F6966
mov	edx, [ecx+4]
xor	eax, eax
cmp	edx, edi
jbe	short loc_5F68B7
mov	esi, [ecx+8]
mov	ecx, esi

loc_5F68A7:
cmp	[ecx], edi
jnz	loc_5F699E
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_5F68A7

loc_5F68B7:
xor	eax, eax

loc_5F68B9:
push	ebp
mov	ebp, eax
cmp	eax, edi
jz	loc_5F694B

loc_5F68C4:
mov	eax, [ebp+8]
mov	edi, [ebp+4]
mov	ebp, [ebp+0]
mov	esi, [ebx+0Ch]
mov	[esp+14h+var_4], eax
test	ebp, ebp
jnz	short loc_5F6920
mov	edx, edi
mov	cl, [edx]
xor	eax, eax
test	cl, cl
jz	short loc_5F68F8

loc_5F68E2:
mov	ebp, eax
shl	ebp, 5
movsx	ecx, cl
add	ebp, eax
add	ebp, ecx
mov	cl, [edx+1]
inc	edx
mov	eax, ebp
test	cl, cl
jnz	short loc_5F68E2

loc_5F68F8:
mov	ecx, [esi+4]
xor	edx, edx
div	ecx
inc	edx
cmp	edx, ecx
jnb	short loc_5F691E
mov	eax, [esi+8]
lea	eax, [eax+edx*4]
lea	ebx, [ebx+0]

loc_5F6910:
mov	ebp, [eax]
test	ebp, ebp
jnz	short loc_5F6920
inc	edx
add	eax, 4
cmp	edx, ecx
jb	short loc_5F6910

loc_5F691E:
xor	ebp, ebp

loc_5F6920:
mov	esi, [ebx+10h]
lea	ecx, [esp+14h+arg_0]
push	ecx
mov	[esp+18h+arg_0], 0
call	sub_5F8F60
mov	edx, [esp+14h+var_4]
push	edx
call	[esp+18h+arg_0]
add	esp, 4
test	ebp, ebp
jnz	loc_5F68C4
xor	edi, edi

loc_5F694B:
mov	esi, [ebx+0Ch]
call	sub_418AE0
mov	ecx, [ebx+0Ch]
pop	ebp
cmp	ecx, edi
jz	short loc_5F6963
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5F6963:
mov	[ebx+0Ch], edi

loc_5F6966:
mov	esi, [ebx+10h]
cmp	esi, edi
jz	short loc_5F6984
call	sub_418AE0
mov	ecx, [ebx+10h]
cmp	ecx, edi
jz	short loc_5F6981
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5F6981:
mov	[ebx+10h], edi

loc_5F6984:
pop	edi
pop	esi
mov	dword ptr [ebx], offset	off_154EE18
pop	ebx
add	esp, 4
mov	[esp+arg_0], offset Addend
jmp	ds:InterlockedDecrement

loc_5F699E:
mov	eax, [esi+eax*4]
jmp	loc_5F68B9
sub_5F6860 endp

align 10h



sub_5F69B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_5F6860
test	[esp+4+arg_0], 1
jz	short loc_5F69D7
test	esi, esi
jz	short loc_5F69D7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_5F69D7:
mov	eax, esi
pop	esi
retn	4
sub_5F69B0 endp

align 10h



sub_5F69E0 proc	near

arg_0= dword ptr  4

mov	eax, [edi+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	eax
mov	edx, ebx
call	sub_411670
mov	ecx, [edi+8]
mov	ebp, eax
mov	esi, [ecx+ebp*4]
add	esp, 4
test	esi, esi
jz	short loc_5F6A35

loc_5F6A01:
mov	ecx, [esi+4]
mov	eax, ebx

loc_5F6A06:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_5F6A26
test	dl, dl
jz	short loc_5F6A22
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_5F6A26
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_5F6A06

loc_5F6A22:
xor	eax, eax
jmp	short loc_5F6A2B

loc_5F6A26:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_5F6A2B:
test	eax, eax
jz	short loc_5F6A67
mov	esi, [esi]
test	esi, esi
jnz	short loc_5F6A01

loc_5F6A35:
mov	edx, [edi]
mov	eax, [edx+0Ch]
mov	ecx, edi
call	eax
mov	edx, [edi]
push	offset sub_5F5CB0
mov	esi, eax
mov	eax, [edx+4]
push	ebx
push	esi
mov	ecx, edi
call	eax
mov	ecx, [edi+8]
mov	edx, [ecx+ebp*4]
mov	[esi], edx
mov	eax, [edi+8]
mov	[eax+ebp*4], esi
inc	dword ptr [edi+0Ch]
pop	esi
pop	ebp
pop	ebx
retn	4

loc_5F6A67:
mov	dword ptr [esi+8], offset sub_5F5CB0
pop	esi
pop	ebp
pop	ebx
retn	4
sub_5F69E0 endp

align 10h



sub_5F6A80 proc	near

arg_0= dword ptr  4

mov	eax, [edi+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	eax
mov	edx, ebx
call	sub_411670
mov	ecx, [edi+8]
mov	ebp, eax
mov	esi, [ecx+ebp*4]
add	esp, 4
test	esi, esi
jz	short loc_5F6AD5

loc_5F6AA1:
mov	ecx, [esi+4]
mov	eax, ebx

loc_5F6AA6:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_5F6AC6
test	dl, dl
jz	short loc_5F6AC2
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_5F6AC6
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_5F6AA6

loc_5F6AC2:
xor	eax, eax
jmp	short loc_5F6ACB

loc_5F6AC6:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_5F6ACB:
test	eax, eax
jz	short loc_5F6B07
mov	esi, [esi]
test	esi, esi
jnz	short loc_5F6AA1

loc_5F6AD5:
mov	edx, [edi]
mov	eax, [edx+0Ch]
mov	ecx, edi
call	eax
mov	edx, [edi]
push	offset sub_5F5F30
mov	esi, eax
mov	eax, [edx+4]
push	ebx
push	esi
mov	ecx, edi
call	eax
mov	ecx, [edi+8]
mov	edx, [ecx+ebp*4]
mov	[esi], edx
mov	eax, [edi+8]
mov	[eax+ebp*4], esi
inc	dword ptr [edi+0Ch]
pop	esi
pop	ebp
pop	ebx
retn	4

loc_5F6B07:
mov	dword ptr [esi+8], offset sub_5F5F30
pop	esi
pop	ebp
pop	ebx
retn	4
sub_5F6A80 endp

align 10h



sub_5F6B20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_8]
mov	[eax+4], ecx
mov	[eax+8], edx
retn	0Ch
sub_5F6B20 endp

align 10h



sub_5F6B40 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_15CA4E4
jz	short loc_5F6B8D
push	ebx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_5F6B8C
push	edi

loc_5F6B58:
mov	eax, [esi+8]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_5F6B85

loc_5F6B62:
mov	eax, edi
mov	eax, [eax+4]
mov	edi, [edi]
test	eax, eax
jz	short loc_5F6B81
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F6B81:
test	edi, edi
jnz	short loc_5F6B62

loc_5F6B85:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_5F6B58
pop	edi

loc_5F6B8C:
pop	ebx

loc_5F6B8D:
mov	dword ptr [esi], offset	off_15C9910
call	sub_418AE0
mov	dword ptr [esi], offset	off_15C9924
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_5F6BBE
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_5F6BBE:
pop	esi
retn
sub_5F6B40 endp




sub_5F6BC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C9924
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5F6BE9
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F6BE9:
test	[esp+4+arg_0], 1
jz	short loc_5F6C04
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5F6C04:
mov	eax, esi
pop	esi
retn	4
sub_5F6BC0 endp

align 10h



sub_5F6C10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15C9910
call	sub_418AE0
mov	dword ptr [esi], offset	off_15C9924
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5F6C44
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F6C44:
test	[esp+4+arg_0], 1
jz	short loc_5F6C5F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5F6C5F:
mov	eax, esi
pop	esi
retn	4
sub_5F6C10 endp

align 10h



sub_5F6C70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_5F6CA5
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_5F6CA5:
mov	eax, esi
pop	esi
retn	4
sub_5F6C70 endp

align 10h



sub_5F6CB0 proc	near
sub	ecx, 8
jmp	sub_5F6C70
sub_5F6CB0 endp

align 10h



sub_5F6CC0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	offset Addend	; lpAddend
mov	dword ptr [ebx], offset	off_154EE18
mov	dword ptr [ebx+4], 0
call	ds:InterlockedIncrement
fld1
mov	dword ptr [ebx+8], offset off_15C9958
mov	dword ptr [ebx], offset	off_15CA09C
mov	dword ptr [ebx+8], offset off_15CA0A8
mov	eax, dword_1889A64
mov	[ebx+0Ch], eax
mov	ecx, dword_1889A68
mov	[ebx+10h], ecx
mov	edx, dword_1889A6C
lea	edi, [ebx+18h]
mov	[ebx+14h], edx
mov	ecx, 9
mov	esi, offset unk_17EE184
rep movsd
fstp	dword ptr [ebx+3Ch]
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	4
sub_5F6CC0 endp

align 10h



sub_5F6D30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_5F6DB0
test	[esp+4+arg_0], 1
jz	short loc_5F6D56
test	esi, esi
jz	short loc_5F6D56
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4Ch
push	3
push	esi
call	eax

loc_5F6D56:
mov	eax, esi
pop	esi
retn	4
sub_5F6D30 endp

align 10h



sub_5F6D60 proc	near
mov	eax, [esi+10h]
test	eax, eax
jz	short locret_5F6DA9
push	edi
lea	edi, [eax+10h]
call	sub_41C620
mov	edi, [esi+10h]
add	edi, 20h
call	sub_41C620
mov	eax, [esi+10h]
call	sub_115EDF0
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_5F6DA8
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F6DA1
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F6DA1:
mov	dword ptr [esi+10h], 0

loc_5F6DA8:
pop	edi

locret_5F6DA9:
retn
sub_5F6D60 endp

align 10h



sub_5F6DB0 proc	near
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_15C9F64
mov	dword ptr [esi+8], offset off_15C9F70
call	sub_5F6D60
mov	eax, [esi+3Ch]
mov	ebp, ds:InterlockedDecrement
lea	edi, [esi+3Ch]
test	eax, eax
jz	short loc_5F6DF0
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F6DEF
push	edi
mov	eax, ebx
call	sub_1171F60

loc_5F6DEF:
pop	ebx

loc_5F6DF0:
mov	eax, [esi+30h]
mov	edi, offset off_1554C5C
mov	[esi+2Ch], edi
test	eax, eax
jz	short loc_5F6E13
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F6E13:
mov	eax, [esi+20h]
mov	[esi+1Ch], edi
test	eax, eax
jz	short loc_5F6E31
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F6E31:
mov	edi, [esi+18h]
test	edi, edi
jz	short loc_5F6E4B
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F6E4B
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F6E4B:
mov	edi, [esi+14h]
test	edi, edi
jz	short loc_5F6E65
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F6E65
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F6E65:
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_5F6E7F
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F6E7F
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F6E7F:
mov	dword ptr [esi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	edi
pop	esi
pop	ebp
retn
sub_5F6DB0 endp

align 10h



sub_5F6EA0 proc	near
sub	ecx, 8
jmp	sub_5F6D30
sub_5F6EA0 endp

align 10h



sub_5F6EB0 proc	near
push	ebx
push	esi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
mov	[edi+4], ebx
call	ds:InterlockedIncrement
mov	dword ptr [edi+8], offset off_15C9958
mov	dword ptr [edi], offset	off_15C9F64
mov	dword ptr [edi+8], offset off_15C9F70
mov	[edi+0Ch], ebx
mov	[edi+10h], ebx
mov	[edi+14h], ebx
push	8
lea	esi, [edi+1Ch]
xor	eax, eax
mov	[edi+18h], ebx
call	sub_5F70F0
push	8
lea	esi, [edi+2Ch]
xor	eax, eax
call	sub_5F70F0
push	offset aNistandardshad ; "NiStandardShadowTechnique"
call	sub_1172180
fldz
mov	[edi+3Ch], eax
fstp	dword ptr [edi+40h]
mov	eax, 400h
add	esp, 4
mov	[edi+44h], ax
mov	al, 1
pop	esi
mov	[edi+46h], al
mov	[edi+47h], bl
mov	[edi+48h], bl
mov	[edi+49h], al
mov	[edi+4Ah], al
mov	eax, edi
pop	ebx
retn
sub_5F6EB0 endp

align 10h



sub_5F6F40 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5F6F70
test	[esp+4+arg_0], 1
jz	short loc_5F6F66
test	edi, edi
jz	short loc_5F6F66
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	edi
call	eax

loc_5F6F66:
mov	eax, edi
pop	edi
retn	4
sub_5F6F40 endp

align 10h



sub_5F6F70 proc	near
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, [edi+18h]
test	esi, esi
jz	short loc_5F6F92
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F6F92
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F6F92:
mov	esi, [edi+14h]
test	esi, esi
jz	short loc_5F6FAC
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F6FAC
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F6FAC:
mov	eax, [edi+10h]
lea	esi, [edi+10h]
test	eax, eax
jz	short loc_5F6FCF
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F6FCE
push	esi
mov	eax, ebx
call	sub_1171F60

loc_5F6FCE:
pop	ebx

loc_5F6FCF:
mov	dword ptr [edi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
retn
sub_5F6F70 endp

align 10h



sub_5F6FF0 proc	near
sub	ecx, 8
jmp	sub_5F6F40
sub_5F6FF0 endp

align 10h



sub_5F7000 proc	near
push	ebx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	dword ptr [esi+8], offset off_15C9958
mov	[esi+0Ch], bl
mov	dword ptr [esi], offset	off_15C9E2C
mov	dword ptr [esi+8], offset off_15C9E38
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	eax, esi
pop	ebx
retn
sub_5F7000 endp

align 10h



sub_5F7040 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_5F7070
test	[esp+4+arg_0], 1
jz	short loc_5F7066
test	esi, esi
jz	short loc_5F7066
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	68h
push	3
push	esi
call	eax

loc_5F7066:
mov	eax, esi
pop	esi
retn	4
sub_5F7040 endp

align 10h



sub_5F7070 proc	near
lea	ecx, [esi+64h]
call	sub_46B550
mov	eax, [esi+58h]
mov	dword ptr [esi+54h], offset off_1554C5C
test	eax, eax
jz	short loc_5F709A
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F709A:
mov	eax, [esi+10h]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	edi
lea	edi, [esi+10h]
test	eax, eax
jz	short loc_5F70C5
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F70C4
push	edi
mov	eax, ebx
call	sub_1171F60

loc_5F70C4:
pop	ebx

loc_5F70C5:
mov	dword ptr [esi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	edi
pop	ebp
retn
sub_5F7070 endp

align 10h



sub_5F70E0 proc	near
sub	ecx, 8
jmp	sub_5F7040
sub_5F70E0 endp

align 10h



sub_5F70F0 proc	near

arg_0= word ptr	 4

mov	cx, [esp+arg_0]
mov	[esi+0Eh], cx
xor	edx, edx
xor	ecx, ecx
mov	dword ptr [esi], offset	off_1554C5C
mov	[esi+8], ax
mov	[esi+0Ah], dx
mov	[esi+0Ch], cx
test	ax, ax
jbe	short loc_5F712A
movzx	eax, ax
call	sub_5F46E0
mov	[esi+4], eax
mov	eax, esi
mov	dword ptr [esi], offset	off_1554C5C
retn	4

loc_5F712A:
mov	[esi+4], ecx
mov	eax, esi
mov	dword ptr [esi], offset	off_1554C5C
retn	4
sub_5F70F0 endp

align 10h



sub_5F7140 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	dword ptr [esi], offset	off_1554C5C
test	eax, eax
jz	short loc_5F7164
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F7164:
test	[esp+4+arg_0], 1
jz	short loc_5F717F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5F717F:
mov	eax, esi
pop	esi
retn	4
sub_5F7140 endp

align 10h



sub_5F7190 proc	near
push	esi
mov	esi, ds:InterlockedIncrement
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
mov	dword ptr [edi+4], 0
call	esi ; InterlockedIncrement
mov	dword ptr [edi+8], offset off_15C9958
mov	dword ptr [edi], offset	off_15C9CF4
mov	dword ptr [edi+8], offset off_15C9D00
mov	byte ptr [edi+0Ch], 0
mov	eax, dword_1894DAC
test	eax, eax
jz	short loc_5F71D7
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	esi ; InterlockedIncrement
mov	eax, dword_1894DAC

loc_5F71D7:
fld1
mov	[edi+10h], eax
fst	dword ptr [edi+14h]
push	8
mov	eax, dword_1889A70
mov	[edi+18h], eax
mov	ecx, dword_1889A74
mov	[edi+1Ch], ecx
mov	edx, dword_1889A78
mov	[edi+20h], edx
mov	eax, dword_17EE13C
mov	[edi+24h], eax
mov	ecx, dword_17EE140
mov	[edi+28h], ecx
mov	edx, dword_17EE144
mov	[edi+2Ch], edx
mov	eax, dword_17EE13C
mov	[edi+30h], eax
mov	ecx, dword_17EE140
mov	[edi+34h], ecx
mov	edx, dword_17EE144
fst	dword ptr [edi+3Ch]
fldz
lea	esi, [edi+54h]
fst	dword ptr [edi+40h]
xor	eax, eax
fstp	dword ptr [edi+44h]
mov	[edi+38h], edx
fld	ds:flt_15FD8C4
fstp	dword ptr [edi+48h]
fld	ds:flt_15FD8C0
fstp	dword ptr [edi+4Ch]
fstp	dword ptr [edi+50h]
call	sub_5F70F0
push	0
lea	ecx, [edi+64h]
call	sub_46B5D0
mov	eax, edi
pop	esi
retn
sub_5F7190 endp

align 10h



sub_5F7270 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_5F72A0
test	[esp+4+arg_0], 1
jz	short loc_5F7296
test	esi, esi
jz	short loc_5F7296
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	30h
push	3
push	esi
call	eax

loc_5F7296:
mov	eax, esi
pop	esi
retn	4
sub_5F7270 endp

align 10h



sub_5F72A0 proc	near
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_15C9BBC
mov	dword ptr [esi+8], offset off_15C9BC8
mov	edi, [esi+1Ch]
test	edi, edi
jz	short loc_5F72D2
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F72D2
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F72D2:
lea	edi, [esi+10h]
push	edi
call	sub_426DB0
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_5F72E8
push	3
call	sub_479940

loc_5F72E8:
mov	eax, [esi+0Ch]
lea	edi, [esi+0Ch]
test	eax, eax
jz	short loc_5F730B
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F730A
push	edi
mov	eax, ebx
call	sub_1171F60

loc_5F730A:
pop	ebx

loc_5F730B:
mov	dword ptr [esi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	edi
pop	esi
pop	ebp
retn
sub_5F72A0 endp

align 10h



sub_5F7330 proc	near
sub	ecx, 8
jmp	sub_5F7270
sub_5F7330 endp

align 10h



sub_5F7340 proc	near
push	edi
xor	edi, edi
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], edi
call	ds:InterlockedIncrement
mov	dword ptr [esi+8], offset off_15C9958
mov	dword ptr [esi], offset	off_15C9BBC
mov	dword ptr [esi+8], offset off_15C9BC8
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
xor	eax, eax
mov	[esi+1Ch], edi
mov	[esi+20h], eax
mov	[esi+24h], eax
mov	[esi+28h], eax
mov	[esi+2Ch], eax
mov	eax, esi
pop	edi
retn
sub_5F7340 endp

align 10h



sub_5F7390 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5F73C0
test	[esp+4+arg_0], 1
jz	short loc_5F73B6
test	edi, edi
jz	short loc_5F73B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	24h
push	3
push	edi
call	eax

loc_5F73B6:
mov	eax, edi
pop	edi
retn	4
sub_5F7390 endp

align 10h



sub_5F73C0 proc	near
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
mov	esi, [edi+20h]
test	esi, esi
jz	short loc_5F73E2
lea	eax, [esi+4]
push	eax		; lpAddend
call	ebp ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F73E2
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F73E2:
lea	ecx, [edi+1Ch]
call	sub_46B550
mov	eax, [edi+10h]
lea	esi, [edi+10h]
test	eax, eax
jz	short loc_5F740D
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F740C
push	esi
mov	eax, ebx
call	sub_1171F60

loc_5F740C:
pop	ebx

loc_5F740D:
mov	dword ptr [edi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [edi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
retn
sub_5F73C0 endp

align 10h



sub_5F7430 proc	near
sub	ecx, 8
jmp	sub_5F7390
sub_5F7430 endp

align 10h



sub_5F7440 proc	near
push	ebx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	dword ptr [esi+8], offset off_15C9958
mov	dword ptr [esi], offset	off_15C9A84
mov	dword ptr [esi+8], offset off_15C9A90
mov	[esi+0Ch], bl
mov	[esi+10h], ebx
push	ebx
lea	ecx, [esi+1Ch]
mov	dword ptr [esi+14h], 0FFFFFFFEh
mov	[esi+18h], bl
call	sub_46B5D0
mov	[esi+20h], ebx
mov	eax, esi
pop	ebx
retn
sub_5F7440 endp

align 10h



sub_5F7490 proc	near

arg_0= byte ptr	 4

test	byte ptr [esi+0Ch], 8
push	ebx
mov	bl, [esp+4+arg_0]
jnz	short loc_5F74A9
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_5F74A9
call	sub_5F7620
jmp	short loc_5F74AC

loc_5F74A9:
mov	al, [esi+18h]

loc_5F74AC:
xor	ecx, ecx
test	al, al
setnz	cl
movzx	edx, bl
cmp	ecx, edx
jz	short loc_5F74F1
push	edi
lea	edi, [esi+1Ch]
mov	ecx, edi
mov	[esi+18h], bl
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
test	eax, eax
jz	short loc_5F74DD
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, eax
call	?do_frac_digits@?$_Mpunct@_W@std@@MBEHXZ ; std::_Mpunct<wchar_t>::do_frac_digits(void)
mov	[esi+14h], eax

loc_5F74DD:
push	0
mov	ecx, edi
call	sub_59C680
mov	al, [esi+0Ch]
and	al, 0FEh
or	al, 8
mov	[esi+0Ch], al
pop	edi

loc_5F74F1:
pop	ebx
retn	4
sub_5F7490 endp

align 10h



sub_5F7500 proc	near
push	edi
mov	edi, eax
mov	eax, esi
call	sub_5F75B0
cmp	eax, edi
jz	short loc_5F7535
mov	[esi+14h], edi
lea	edi, [esi+1Ch]
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
test	eax, eax
jz	short loc_5F7531
mov	eax, [esi+14h]
push	eax
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, eax
call	sub_580830

loc_5F7531:
or	byte ptr [esi+0Ch], 4

loc_5F7535:
pop	edi
retn
sub_5F7500 endp

align 10h



sub_5F7540 proc	near

arg_0= dword ptr  4

test	byte ptr [edi+0Ch], 2
push	ebx
mov	ebx, [esp+4+arg_0]
jnz	short loc_5F7559
mov	eax, [edi+20h]
test	eax, eax
jz	short loc_5F7559
call	sub_5F7600
jmp	short loc_5F755C

loc_5F7559:
lea	eax, [edi+10h]

loc_5F755C:
mov	eax, [eax]
cmp	eax, [ebx]
jz	short loc_5F75A9
push	esi
lea	esi, [edi+10h]
mov	eax, ebx
call	sub_4114A0
lea	esi, [edi+1Ch]
mov	ecx, esi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
test	eax, eax
jz	short loc_5F758C
mov	ecx, esi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, eax
call	?do_frac_digits@?$_Mpunct@_W@std@@MBEHXZ ; std::_Mpunct<wchar_t>::do_frac_digits(void)
mov	[edi+14h], eax

loc_5F758C:
push	0
mov	ecx, esi
call	sub_59C680
mov	cl, [edi+0Ch]
and	cl, 0FEh
or	cl, 2
mov	dword ptr [edi+14h], 0FFFFFFFEh
mov	[edi+0Ch], cl
pop	esi

loc_5F75A9:
pop	ebx
retn	4
sub_5F7540 endp

align 10h



sub_5F75B0 proc	near
push	esi
mov	esi, eax
mov	cl, 4
push	edi
test	[esi+0Ch], cl
jnz	short loc_5F75CE
jmp	short loc_5F75C0
align 10h

loc_5F75C0:
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_5F75CE
mov	esi, eax
test	[esi+0Ch], cl
jz	short loc_5F75C0

loc_5F75CE:
lea	edi, [esi+1Ch]
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
test	eax, eax
jz	short loc_5F75EC
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
pop	edi
mov	ecx, eax
pop	esi
jmp	?do_frac_digits@?$_Mpunct@_W@std@@MBEHXZ ; std::_Mpunct<wchar_t>::do_frac_digits(void)

loc_5F75EC:
mov	eax, [esi+14h]
pop	edi
pop	esi
retn
sub_5F75B0 endp

align 10h



sub_5F7600 proc	near
mov	dl, 2
test	[eax+0Ch], dl
jnz	short loc_5F7615

loc_5F7607:
mov	ecx, [eax+20h]
test	ecx, ecx
jz	short loc_5F7615
mov	eax, ecx
test	[eax+0Ch], dl
jz	short loc_5F7607

loc_5F7615:
add	eax, 10h
retn
sub_5F7600 endp

align 10h



sub_5F7620 proc	near
mov	dl, 8
test	[eax+0Ch], dl
jnz	short loc_5F7635

loc_5F7627:
mov	ecx, [eax+20h]
test	ecx, ecx
jz	short loc_5F7635
mov	eax, ecx
test	[eax+0Ch], dl
jz	short loc_5F7627

loc_5F7635:
mov	al, [eax+18h]
retn
sub_5F7620 endp

align 10h



sub_5F7640 proc	near
push	ebx
mov	bl, [esi+0Ch]
test	bl, 2
jnz	short loc_5F7657
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_5F7657
call	sub_5F7600
jmp	short loc_5F765A

loc_5F7657:
lea	eax, [esi+10h]

loc_5F765A:
mov	eax, [eax]
cmp	eax, [esi+10h]
jnz	short loc_5F769F
test	bl, 8
jnz	short loc_5F7674
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_5F7674
call	sub_5F7620
jmp	short loc_5F7677

loc_5F7674:
mov	al, [esi+18h]

loc_5F7677:
movzx	edx, byte ptr [esi+18h]
xor	ecx, ecx
test	al, al
setnz	cl
cmp	ecx, edx
jnz	short loc_5F769F
lea	ecx, [esi+1Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
test	eax, eax
jnz	short loc_5F769B
mov	al, [esi+0Ch]
not	al
and	al, 1
pop	ebx
retn

loc_5F769B:
xor	al, al
pop	ebx
retn

loc_5F769F:
mov	al, 1
pop	ebx
retn
sub_5F7640 endp

align 10h



sub_5F76B0 proc	near

arg_0= byte ptr	 4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h
arg_14=	byte ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	byte ptr  20h
arg_20=	byte ptr  24h
arg_24=	byte ptr  28h
arg_28=	byte ptr  2Ch
arg_2C=	byte ptr  30h
arg_30=	byte ptr  34h
arg_34=	byte ptr  38h
arg_38=	byte ptr  3Ch

mov	dl, [esp+arg_0]
mov	[eax], cl
mov	cl, [esp+arg_4]
mov	[eax+1], dl
mov	dl, [esp+arg_8]
mov	[eax+2], cl
mov	cl, [esp+arg_C]
mov	[eax+3], dl
mov	dl, [esp+arg_10]
mov	[eax+4], cl
mov	cl, [esp+arg_14]
mov	[eax+5], dl
mov	dl, [esp+arg_18]
mov	[eax+6], cl
mov	cl, [esp+arg_1C]
mov	[eax+7], dl
mov	dl, [esp+arg_20]
mov	[eax+8], cl
mov	cl, [esp+arg_24]
mov	[eax+9], dl
mov	dl, [esp+arg_28]
mov	[eax+0Ah], cl
mov	cl, [esp+arg_2C]
mov	[eax+0Bh], dl
mov	dl, [esp+arg_30]
mov	[eax+0Ch], cl
mov	cl, [esp+arg_34]
mov	[eax+0Dh], dl
mov	dl, [esp+arg_38]
mov	[eax+0Eh], cl
mov	[eax+0Fh], dl
retn	3Ch
sub_5F76B0 endp

align 10h



sub_5F7720 proc	near
push	ebx
push	ebp
mov	ebp, ds:InterlockedIncrement
push	edi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	edi, eax
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ebp ; InterlockedIncrement
mov	dword ptr [esi+8], offset off_15C9958
mov	dword ptr [esi], offset	off_15C9A84
mov	dword ptr [esi+8], offset off_15C9A90
mov	[esi+0Ch], bl
mov	[esi+10h], ebx
push	ebx
lea	ecx, [esi+1Ch]
mov	dword ptr [esi+14h], 0FFFFFFFEh
mov	[esi+18h], bl
call	sub_46B5D0
mov	[esi+20h], edi
cmp	edi, ebx
jz	short loc_5F7777
add	edi, 4
push	edi		; lpAddend
call	ebp ; InterlockedIncrement

loc_5F7777:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
retn
sub_5F7720 endp

align 10h



sub_5F7780 proc	near

arg_0= byte ptr	 4

push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_5F77A5
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F77A5
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F77A5:
mov	dword ptr [esi+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
test	[esp+0Ch+arg_0], 1
jz	short loc_5F77D4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	20h
push	3
push	esi
call	eax

loc_5F77D4:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_5F7780 endp

align 10h



sub_5F77E0 proc	near
sub	ecx, 8
jmp	sub_5F7780
sub_5F77E0 endp

align 10h



sub_5F77F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_5F7820
test	[esp+4+arg_0], 1
jz	short loc_5F7817
test	esi, esi
jz	short loc_5F7817
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	54h
push	3
push	esi
call	eax

loc_5F7817:
mov	eax, esi
pop	esi
retn	4
sub_5F77F0 endp

align 10h



sub_5F7820 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+14h]
push	ebp
mov	ebp, ds:InterlockedDecrement
push	esi
lea	esi, [ebx+14h]
test	eax, eax
jz	short loc_5F7850
push	edi
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F784F
push	esi
mov	eax, edi
call	sub_1171F60

loc_5F784F:
pop	edi

loc_5F7850:
mov	dword ptr [ebx+8], offset off_15C9720
push	offset Addend	; lpAddend
mov	dword ptr [ebx], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
pop	ebx
retn	4
sub_5F7820 endp

align 10h



sub_5F7870 proc	near
sub	ecx, 8
jmp	sub_5F77F0
sub_5F7870 endp

align 10h



sub_5F7880 proc	near
cmp	word ptr [eax+0Ah], 0
jbe	short locret_5F78A9
mov	edx, [eax+4]
push	esi
jmp	short loc_5F7890
align 10h

loc_5F7890:
movzx	ecx, word ptr [eax+0Ah]
movzx	esi, cx
cmp	dword ptr [edx+esi*4-4], 0
jnz	short loc_5F78A8
dec	ecx
mov	[eax+0Ah], cx
test	cx, cx
ja	short loc_5F7890

loc_5F78A8:
pop	esi

locret_5F78A9:
retn
sub_5F7880 endp

align 10h



sub_5F78B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
lea	esi, [ebx+30h]
mov	ecx, edi
mov	edx, esi
call	sub_410220
test	al, al
jz	short loc_5F78DA
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	edx, [edi+8]
or	byte ptr [ebx+0Ch], 2
mov	[esi+8], edx

loc_5F78DA:
pop	esi
pop	ebx
retn	4
sub_5F78B0 endp

align 10h



sub_5F78E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
lea	esi, [ebx+24h]
mov	ecx, edi
mov	edx, esi
call	sub_410220
test	al, al
jz	short loc_5F790A
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	edx, [edi+8]
or	byte ptr [ebx+0Ch], 2
mov	[esi+8], edx

loc_5F790A:
pop	esi
pop	ebx
retn	4
sub_5F78E0 endp

align 10h



sub_5F7910 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
lea	esi, [ebp+64h]
mov	ecx, esi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
test	eax, eax
jz	loc_5F79F9
push	ebx
push	edi
mov	ecx, esi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
mov	esi, [edi+0CCh]
add	edi, 0C0h
test	esi, esi
jbe	short loc_5F7951
mov	eax, esi
call	sub_5F46E0
mov	ebx, eax
jmp	short loc_5F7953

loc_5F7951:
xor	ebx, ebx

loc_5F7953:
mov	edi, [edi+4]
mov	eax, esi
xor	esi, esi
mov	[esp+1Ch+var_C], ebx
mov	[esp+1Ch+var_8], eax
mov	[esp+1Ch+var_4], esi
test	edi, edi
jz	short loc_5F79AF
lea	ebx, [ebx+0]

loc_5F7970:
lea	ebp, [edi+8]
mov	edi, [edi]
cmp	esi, eax
jnz	short loc_5F799C
test	eax, eax
jbe	short loc_5F7981
add	eax, eax
jmp	short loc_5F7986

loc_5F7981:
mov	eax, 1

loc_5F7986:
push	eax
lea	esi, [esp+20h+var_C]
call	sub_410400
mov	esi, [esp+1Ch+var_4]
mov	eax, [esp+1Ch+var_8]
mov	ebx, [esp+1Ch+var_C]

loc_5F799C:
mov	ecx, [ebp+0]
mov	[ebx+esi*4], ecx
inc	esi
mov	[esp+1Ch+var_4], esi
test	edi, edi
jnz	short loc_5F7970
mov	ebp, [esp+1Ch+arg_0]

loc_5F79AF:
lea	ecx, [ebp+64h]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
call	sub_1138B70
xor	edi, edi
test	esi, esi
jbe	short loc_5F79D1

loc_5F79C4:
mov	ecx, [ebx+edi*4]
call	sub_1167270
inc	edi
cmp	edi, esi
jb	short loc_5F79C4

loc_5F79D1:
push	0
lea	ecx, [ebp+64h]
call	sub_59C680
and	byte ptr [ebp+0Ch], 0FEh
test	ebx, ebx
jz	short loc_5F79F7
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	9
push	ebx
call	edx

loc_5F79F7:
pop	edi
pop	ebx

loc_5F79F9:
pop	esi
pop	ebp
add	esp, 0Ch
retn	4
sub_5F7910 endp

align 10h



; int __stdcall	sub_5F7A10(float)
sub_5F7A10 proc	near

arg_0= dword ptr  4

fld	dword ptr [ecx+4Ch]
fld	[esp+arg_0]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_5F7A2E
fstp	dword ptr [ecx+4Ch]
or	byte ptr [ecx+0Ch], 2
retn	4

loc_5F7A2E:
fstp	st
retn	4
sub_5F7A10 endp

align 10h



; int __stdcall	sub_5F7A40(float)
sub_5F7A40 proc	near

arg_0= dword ptr  4

fld	dword ptr [ecx+48h]
fld	[esp+arg_0]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_5F7A5E
fstp	dword ptr [ecx+48h]
or	byte ptr [ecx+0Ch], 2
retn	4

loc_5F7A5E:
fstp	st
retn	4
sub_5F7A40 endp

align 10h



; int __stdcall	sub_5F7A70(int,	float, int, int, float,	float, float, float, float, float, int,	int)
sub_5F7A70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h
arg_28=	dword ptr  2Ch
arg_2C=	dword ptr  30h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_C]
push	esi
push	offset Addend	; lpAddend
mov	esi, eax
mov	dword ptr [edi], offset	off_154EE18
mov	dword ptr [edi+4], 0
call	ds:InterlockedIncrement
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [edi+8], offset off_15C9958
mov	dword ptr [edi], offset	off_15C9CF4
mov	dword ptr [edi+8], offset off_15C9D00
mov	byte ptr [edi+0Ch], 0
mov	eax, [eax]
test	eax, eax
jz	short loc_5F7AC1
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_5F7AC1:
mov	ecx, [esp+0Ch+arg_0]
fld	[esp+0Ch+arg_4]
mov	edx, [ecx]
mov	[edi+10h], edx
fstp	dword ptr [edi+14h]
mov	eax, [ebx]
fld	[esp+0Ch+arg_10]
mov	[edi+18h], eax
mov	ecx, [ebx+4]
mov	[edi+1Ch], ecx
mov	edx, [ebx+8]
mov	[edi+20h], edx
mov	eax, [ebp+0]
mov	[edi+24h], eax
mov	ecx, [ebp+4]
mov	[edi+28h], ecx
mov	edx, [ebp+8]
mov	[edi+2Ch], edx
mov	eax, [esi]
mov	[edi+30h], eax
mov	ecx, [esi+4]
mov	eax, [esp+0Ch+arg_2C]
mov	[edi+34h], ecx
mov	edx, [esi+8]
fstp	dword ptr [edi+3Ch]
fld	[esp+0Ch+arg_14]
push	eax
mov	eax, [esp+10h+arg_28]
fstp	dword ptr [edi+40h]
fld	[esp+10h+arg_18]
lea	esi, [edi+54h]
fstp	dword ptr [edi+44h]
mov	[edi+38h], edx
fld	[esp+10h+arg_1C]
fstp	dword ptr [edi+48h]
fld	[esp+10h+arg_20]
fstp	dword ptr [edi+4Ch]
fld	[esp+10h+arg_24]
fstp	dword ptr [edi+50h]
call	sub_5F70F0
push	0
lea	ecx, [edi+64h]
call	sub_46B5D0
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
retn	30h
sub_5F7A70 endp

align 10h



sub_5F7B60 proc	near

arg_0= dword ptr  4

test	byte ptr [edi+0Ch], 2
push	ebx
mov	ebx, [esp+4+arg_0]
jnz	short loc_5F7B79
mov	eax, [edi+18h]
test	eax, eax
jz	short loc_5F7B79
call	sub_5F7BD0
jmp	short loc_5F7B7C

loc_5F7B79:
lea	eax, [edi+10h]

loc_5F7B7C:
mov	eax, [eax]
cmp	eax, [ebx]
jz	short loc_5F7BBF
push	esi
lea	esi, [edi+10h]
mov	eax, ebx
call	sub_4114A0
mov	esi, [edi+14h]
test	esi, esi
jz	short loc_5F7BB2
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F7BAB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F7BAB:
mov	dword ptr [edi+14h], 0

loc_5F7BB2:
mov	cl, [edi+0Ch]
and	cl, 0FEh
or	cl, 2
mov	[edi+0Ch], cl
pop	esi

loc_5F7BBF:
pop	ebx
retn	4
sub_5F7B60 endp

align 10h



sub_5F7BD0 proc	near
mov	dl, 2
test	[eax+0Ch], dl
jnz	short loc_5F7BE5

loc_5F7BD7:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F7BE5
mov	eax, ecx
test	[eax+0Ch], dl
jz	short loc_5F7BD7

loc_5F7BE5:
add	eax, 10h
retn
sub_5F7BD0 endp

align 10h



sub_5F7BF0 proc	near
push	ebx
push	ebp
mov	ebp, ds:InterlockedIncrement
push	edi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	edi, eax
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ebp ; InterlockedIncrement
mov	dword ptr [esi+8], offset off_15C9958
mov	dword ptr [esi], offset	off_15C9E2C
mov	dword ptr [esi+8], offset off_15C9E38
mov	[esi+0Ch], bl
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], edi
cmp	edi, ebx
jz	short loc_5F7C37
add	edi, 4
push	edi		; lpAddend
call	ebp ; InterlockedIncrement

loc_5F7C37:
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
retn
sub_5F7BF0 endp

align 10h



sub_5F7C40 proc	near

arg_0= dword ptr  4

mov	eax, [edi+0Ch]
shr	eax, 7
push	ebx
mov	ebx, [esp+4+arg_0]
test	al, 1
jnz	short loc_5F7C5D
mov	eax, [edi+18h]
test	eax, eax
jz	short loc_5F7C5D
call	sub_5F80A0
jmp	short loc_5F7C60

loc_5F7C5D:
lea	eax, [edi+3Ch]

loc_5F7C60:
mov	ecx, [eax]
cmp	ecx, [ebx]
jz	short loc_5F7C79
push	esi
lea	esi, [edi+3Ch]
mov	eax, ebx
call	sub_4114A0
or	dword ptr [edi+0Ch], 81h
pop	esi

loc_5F7C79:
pop	ebx
retn	4
sub_5F7C40 endp

align 10h



sub_5F7C80 proc	near

arg_0= word ptr	 4

push	ebx
mov	bx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 5
test	al, 1
jnz	short loc_5F7CA7
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7CA7
call	sub_5F82D0
movzx	eax, ax
jmp	short loc_5F7CAB

loc_5F7CA7:
movzx	eax, word ptr [esi+44h]

loc_5F7CAB:
cmp	ax, bx
jz	short loc_5F7CBF
or	edi, 20h
mov	[esi+44h], bx
mov	[esi+0Ch], edi
call	sub_5F6D60

loc_5F7CBF:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5F7C80 endp

align 10h



sub_5F7CD0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 0Ah
test	al, 1
jnz	short loc_5F7CF0
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7CF0
call	sub_5F8130
jmp	short loc_5F7CF3

loc_5F7CF0:
mov	al, [esi+4Ah]

loc_5F7CF3:
cmp	al, bl
jz	short loc_5F7D03
or	edi, 401h
mov	[esi+4Ah], bl
mov	[esi+0Ch], edi

loc_5F7D03:
pop	edi
pop	ebx
retn	4
sub_5F7CD0 endp

align 10h



sub_5F7D10 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 8
test	al, 1
jnz	short loc_5F7D30
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7D30
call	sub_5F80D0
jmp	short loc_5F7D33

loc_5F7D30:
mov	al, [esi+49h]

loc_5F7D33:
cmp	al, bl
jz	short loc_5F7D43
or	edi, 101h
mov	[esi+49h], bl
mov	[esi+0Ch], edi

loc_5F7D43:
pop	edi
pop	ebx
retn	4
sub_5F7D10 endp

align 10h



sub_5F7D50 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 6
test	al, 1
jnz	short loc_5F7D73
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7D73
call	sub_5F82A0
jmp	short loc_5F7D76

loc_5F7D73:
mov	al, [esi+48h]

loc_5F7D76:
cmp	al, bl
jz	short loc_5F7D88
or	edi, 40h
mov	[esi+48h], bl
mov	[esi+0Ch], edi
call	sub_5F6D60

loc_5F7D88:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5F7D50 endp

align 10h



sub_5F7D90 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 4
test	al, 1
jnz	short loc_5F7DB0
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7DB0
call	sub_5F8070
jmp	short loc_5F7DB3

loc_5F7DB0:
mov	al, [esi+47h]

loc_5F7DB3:
cmp	al, bl
jz	short loc_5F7DC0
or	edi, 11h
mov	[esi+47h], bl
mov	[esi+0Ch], edi

loc_5F7DC0:
pop	edi
pop	ebx
retn	4
sub_5F7D90 endp

align 10h



sub_5F7DD0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 3
test	al, 1
jnz	short loc_5F7DF3
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7DF3
call	sub_5F8300
jmp	short loc_5F7DF6

loc_5F7DF3:
mov	al, [esi+46h]

loc_5F7DF6:
cmp	al, bl
jz	short loc_5F7E0C
or	edi, 8
mov	[esi+46h], bl
mov	[esi+0Ch], edi
test	bl, bl
jnz	short loc_5F7E0C
call	sub_5F6D60

loc_5F7E0C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5F7DD0 endp

align 10h



; int __stdcall	sub_5F7E20(float)
sub_5F7E20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 9
test	al, 1
jnz	short loc_5F7E3C
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7E3C
call	sub_5F8100
jmp	short loc_5F7E3F

loc_5F7E3C:
fld	dword ptr [esi+40h]

loc_5F7E3F:
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	[esp+8+arg_0]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_5F7E69
or	edi, 201h
fstp	dword ptr [esi+40h]
mov	[esi+0Ch], edi
pop	edi
pop	ecx
retn	4

loc_5F7E69:
fstp	st
pop	edi
pop	ecx
retn	4
sub_5F7E20 endp




sub_5F7E70 proc	near

var_4= dword ptr -4

push	ecx
push	edi
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 3
test	al, 1
jnz	short loc_5F7E8C
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7E8C
call	sub_5F8300
jmp	short loc_5F7E8F

loc_5F7E8C:
mov	al, [esi+46h]

loc_5F7E8F:
mov	ecx, edi
shr	ecx, 4
mov	[esi+46h], al
test	cl, 1
jnz	short loc_5F7EAA
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7EAA
call	sub_5F8070
jmp	short loc_5F7EAD

loc_5F7EAA:
mov	al, [esi+47h]

loc_5F7EAD:
mov	edx, edi
shr	edx, 5
mov	[esi+47h], al
test	dl, 1
jnz	short loc_5F7ECB
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7ECB
call	sub_5F82D0
movzx	eax, ax
jmp	short loc_5F7ECF

loc_5F7ECB:
movzx	eax, word ptr [esi+44h]

loc_5F7ECF:
mov	[esi+44h], ax
mov	eax, edi
shr	eax, 6
test	al, 1
jnz	short loc_5F7EEA
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7EEA
call	sub_5F82A0
jmp	short loc_5F7EED

loc_5F7EEA:
mov	al, [esi+48h]

loc_5F7EED:
mov	ecx, edi
shr	ecx, 7
mov	[esi+48h], al
test	cl, 1
jnz	short loc_5F7F08
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7F08
call	sub_5F80A0
jmp	short loc_5F7F0B

loc_5F7F08:
lea	eax, [esi+3Ch]

loc_5F7F0B:
push	ebx
mov	ebx, [eax]
cmp	[esi+3Ch], ebx
lea	edi, [esi+3Ch]
jz	short loc_5F7F49
test	ebx, ebx
jz	short loc_5F7F24
lea	edx, [ebx-8]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_5F7F24:
mov	eax, [edi]
test	eax, eax
jz	short loc_5F7F47
push	ebp
movzx	ebp, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F7F46
push	edi
mov	eax, ebp
call	sub_1171F60

loc_5F7F46:
pop	ebp

loc_5F7F47:
mov	[edi], ebx

loc_5F7F49:
mov	edi, [esi+0Ch]
mov	eax, edi
shr	eax, 8
pop	ebx
test	al, 1
jnz	short loc_5F7F64
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7F64
call	sub_5F80D0
jmp	short loc_5F7F67

loc_5F7F64:
mov	al, [esi+49h]

loc_5F7F67:
mov	ecx, edi
shr	ecx, 9
mov	[esi+49h], al
test	cl, 1
jnz	short loc_5F7F82
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7F82
call	sub_5F8100
jmp	short loc_5F7F85

loc_5F7F82:
fld	dword ptr [esi+40h]

loc_5F7F85:
mov	edx, edi
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
shr	edx, 0Ah
fstp	dword ptr [esi+40h]
pop	edi
test	dl, 1
jnz	short loc_5F7FAC
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_5F7FAC
call	sub_5F8130
mov	[esi+4Ah], al
pop	ecx
retn

loc_5F7FAC:
mov	al, [esi+4Ah]
mov	[esi+4Ah], al
pop	ecx
retn
sub_5F7E70 endp

align 10h



sub_5F7FC0 proc	near
push	edi
mov	edi, [esi+0Ch]
test	edi, edi
jz	short loc_5F7FF6
mov	eax, [esi+4Ch]
test	eax, eax
jz	short loc_5F7FF6
mov	al, [eax+0ADh]
test	al, al
jz	short loc_5F7FF6
movzx	eax, al
call	sub_422730
mov	cl, [esi+8]
shr	cl, 4
test	cl, 1
jnz	short loc_5F7FEF
add	eax, 3

loc_5F7FEF:
fld	dword ptr [edi+eax*4+20h]
fstp	dword ptr [esi+54h]

loc_5F7FF6:
pop	edi
retn
sub_5F7FC0 endp

align 10h



sub_5F8000 proc	near
mov	edx, dword_188951C
push	esi
mov	esi, eax
xor	eax, eax
jmp	short loc_5F8010
align 10h

loc_5F8010:
mov	ecx, [edx+eax*4]
test	ecx, ecx
jz	short loc_5F801E
mov	ecx, [ecx+4]
cmp	ecx, [esi]
jz	short loc_5F8063

loc_5F801E:
inc	eax
cmp	eax, 4
jb	short loc_5F8010
xor	esi, esi

loc_5F8026:
mov	[edi+0Ch], esi
test	esi, esi
jz	short loc_5F805B
mov	eax, [edi+4Ch]
test	eax, eax
jz	short loc_5F805B
mov	al, [eax+0ADh]
test	al, al
jz	short loc_5F805B
movzx	eax, al
call	sub_422730
mov	dl, [edi+8]
shr	dl, 4
test	dl, 1
jnz	short loc_5F8054
add	eax, 3

loc_5F8054:
fld	dword ptr [esi+eax*4+20h]
fstp	dword ptr [edi+54h]

loc_5F805B:
mov	eax, edi
pop	esi
jmp	sub_1137DF0

loc_5F8063:
mov	esi, [edx+eax*4]
jmp	short loc_5F8026
sub_5F8000 endp

align 10h



sub_5F8070 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 4
test	cl, 1
jnz	short loc_5F8094
jmp	short loc_5F8080
align 10h

loc_5F8080:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F8094
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 4
test	dl, 1
jz	short loc_5F8080

loc_5F8094:
mov	al, [eax+47h]
retn
sub_5F8070 endp

align 10h



sub_5F80A0 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 7
test	cl, 1
jnz	short loc_5F80C4
jmp	short loc_5F80B0
align 10h

loc_5F80B0:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F80C4
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 7
test	dl, 1
jz	short loc_5F80B0

loc_5F80C4:
add	eax, 3Ch
retn
sub_5F80A0 endp

align 10h



sub_5F80D0 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 8
test	cl, 1
jnz	short loc_5F80F4
jmp	short loc_5F80E0
align 10h

loc_5F80E0:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F80F4
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 8
test	dl, 1
jz	short loc_5F80E0

loc_5F80F4:
mov	al, [eax+49h]
retn
sub_5F80D0 endp

align 10h



sub_5F8100 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 9
test	cl, 1
jnz	short loc_5F8124
jmp	short loc_5F8110
align 10h

loc_5F8110:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F8124
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 9
test	dl, 1
jz	short loc_5F8110

loc_5F8124:
fld	dword ptr [eax+40h]
retn
sub_5F8100 endp

align 10h



sub_5F8130 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 0Ah
test	cl, 1
jnz	short loc_5F8154
jmp	short loc_5F8140
align 10h

loc_5F8140:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F8154
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 0Ah
test	dl, 1
jz	short loc_5F8140

loc_5F8154:
mov	al, [eax+4Ah]
retn
sub_5F8130 endp

align 10h



sub_5F8160 proc	near
test	byte ptr [esi+0Ch], 1
jnz	short loc_5F81D3
mov	eax, esi
call	sub_5F8300
cmp	al, [esi+46h]
jnz	short loc_5F81D3
mov	eax, esi
call	sub_5F8070
cmp	al, [esi+47h]
jnz	short loc_5F81D3
mov	eax, esi
call	sub_5F82D0
cmp	ax, [esi+44h]
jnz	short loc_5F81D3
mov	eax, esi
call	sub_5F82A0
cmp	al, [esi+48h]
jnz	short loc_5F81D3
mov	eax, esi
call	sub_5F80A0
mov	eax, [eax]
cmp	eax, [esi+3Ch]
jnz	short loc_5F81D3
mov	eax, esi
call	sub_5F80D0
cmp	al, [esi+49h]
jnz	short loc_5F81D3
mov	eax, esi
call	sub_5F8100
fld	dword ptr [esi+40h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_5F81D3
mov	eax, esi
call	sub_5F8130
cmp	al, [esi+4Ah]
jnz	short loc_5F81D3
xor	eax, eax
retn

loc_5F81D3:
mov	eax, 1
retn
sub_5F8160 endp

align 10h



sub_5F81E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, eax
cmp	dword ptr [esi+10h], 0
jz	short loc_5F81F1
call	sub_5F6D60

loc_5F81F1:
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 68h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
test	eax, eax
jnz	short loc_5F823F
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F823F:
mov	ecx, [esp+18h+arg_0]
push	ebx
push	edi
push	ecx
call	sub_1138040
mov	ebx, [esi+10h]
mov	edi, eax
cmp	ebx, edi
jz	short loc_5F8280
test	ebx, ebx
jz	short loc_5F826F
lea	edx, [ebx+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F826F
mov	eax, [ebx]
mov	edx, [eax+4]
mov	ecx, ebx
call	edx

loc_5F826F:
mov	[esi+10h], edi
test	edi, edi
jz	short loc_5F8280
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_5F8280:
mov	esi, [esi+10h]
call	sub_115F040
pop	edi
pop	ebx
pop	esi
add	esp, 14h
retn	4
sub_5F81E0 endp

align 10h



sub_5F82A0 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 6
test	cl, 1
jnz	short loc_5F82C4
jmp	short loc_5F82B0
align 10h

loc_5F82B0:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F82C4
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 6
test	dl, 1
jz	short loc_5F82B0

loc_5F82C4:
mov	al, [eax+48h]
retn
sub_5F82A0 endp

align 10h



sub_5F82D0 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 5
test	cl, 1
jnz	short loc_5F82F4
jmp	short loc_5F82E0
align 10h

loc_5F82E0:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F82F4
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 5
test	dl, 1
jz	short loc_5F82E0

loc_5F82F4:
mov	ax, [eax+44h]
retn
sub_5F82D0 endp

align 10h



sub_5F8300 proc	near
mov	ecx, [eax+0Ch]
shr	ecx, 3
test	cl, 1
jnz	short loc_5F8324
jmp	short loc_5F8310
align 10h

loc_5F8310:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5F8324
mov	eax, ecx
mov	edx, [eax+0Ch]
shr	edx, 3
test	dl, 1
jz	short loc_5F8310

loc_5F8324:
mov	al, [eax+46h]
retn
sub_5F8300 endp

align 10h



sub_5F8330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, ds:InterlockedIncrement
push	esi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	esi, eax
mov	dword ptr [edi], offset	off_154EE18
mov	[edi+4], ebx
call	ebp ; InterlockedIncrement
mov	dword ptr [edi+8], offset off_15C9958
mov	dword ptr [edi], offset	off_15C9F64
mov	dword ptr [edi+8], offset off_15C9F70
mov	[edi+0Ch], ebx
mov	[edi+10h], ebx
mov	[edi+14h], ebx
mov	[edi+18h], esi
cmp	esi, ebx
jz	short loc_5F8377
add	esi, 4
push	esi		; lpAddend
call	ebp ; InterlockedIncrement

loc_5F8377:
mov	eax, [esp+0Ch+arg_4]
push	eax
mov	eax, [esp+10h+arg_0]
lea	esi, [edi+1Ch]
call	sub_5F70F0
mov	ecx, [esp+0Ch+arg_C]
mov	eax, [esp+0Ch+arg_8]
push	ecx
lea	esi, [edi+2Ch]
call	sub_5F70F0
push	offset aNistandardshad ; "NiStandardShadowTechnique"
call	sub_1172180
fldz
mov	[edi+3Ch], eax
fstp	dword ptr [edi+40h]
add	esp, 4
mov	al, 1
pop	esi
mov	edx, 400h
pop	ebp
mov	[edi+46h], al
mov	[edi+47h], bl
mov	[edi+48h], bl
mov	[edi+49h], al
mov	[edi+4Ah], al
mov	[edi+44h], dx
mov	eax, edi
pop	ebx
retn	10h
sub_5F8330 endp




; int __stdcall	sub_5F83D0(int,	int, float)
sub_5F83D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	offset Addend	; lpAddend
mov	esi, eax
mov	dword ptr [ebx], offset	off_154EE18
mov	dword ptr [ebx+4], 0
call	ds:InterlockedIncrement
fld	[esp+0Ch+arg_8]
mov	dword ptr [ebx+8], offset off_15C9958
mov	dword ptr [ebx], offset	off_15CA09C
mov	dword ptr [ebx+8], offset off_15CA0A8
mov	eax, [esi]
mov	[ebx+0Ch], eax
mov	ecx, [esi+4]
mov	[ebx+10h], ecx
mov	edx, [esi+8]
mov	esi, [esp+0Ch+arg_4]
lea	edi, [ebx+18h]
mov	[ebx+14h], edx
mov	ecx, 9
rep movsd
fstp	dword ptr [ebx+3Ch]
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	0Ch
sub_5F83D0 endp

align 10h



sub_5F8440 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	eax, [esi+4]
push	edi
cmp	[esi+8], eax
jnz	short loc_5F8465
test	eax, eax
jbe	short loc_5F8459
add	eax, eax
jmp	short loc_5F845E

loc_5F8459:
mov	eax, 1

loc_5F845E:
push	eax
push	esi
call	sub_5F87F0

loc_5F8465:
mov	eax, [esi+8]
mov	ecx, [esi]
lea	edi, [ecx+eax*4]
inc	eax
mov	[esi+8], eax
mov	esi, [edi]
cmp	esi, [ebx]
jz	short loc_5F84AA
test	esi, esi
jz	short loc_5F8492
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F8492
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_5F8492:
mov	eax, [ebx]
mov	[edi], eax
test	eax, eax
jz	short loc_5F84AA
pop	edi
pop	esi
add	eax, 4
pop	ebx
mov	[esp+arg_0], eax
jmp	ds:InterlockedIncrement

loc_5F84AA:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5F8440 endp




sub_5F84B0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, eax
dec	dword ptr [esi+8]
mov	eax, [esp+0Ch+arg_0]
mov	ebp, [esi+8]
push	edi
mov	edi, [esi]
mov	ebx, [edi+eax*4]
cmp	ebx, [edi+ebp*4]
jz	short loc_5F84FD
test	ebx, ebx
jz	short loc_5F84E5
lea	ecx, [ebx+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F84E5
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_5F84E5:
mov	ebp, [edi+ebp*4]
mov	ecx, [esp+10h+arg_0]
mov	[edi+ecx*4], ebp
test	ebp, ebp
jz	short loc_5F84FD
add	ebp, 4
push	ebp		; lpAddend
call	ds:InterlockedIncrement

loc_5F84FD:
mov	edx, [esi+8]
mov	eax, [esi]
mov	esi, [eax+edx*4]
lea	edi, [eax+edx*4]
test	esi, esi
jz	short loc_5F8529
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F8523
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F8523:
mov	dword ptr [edi], 0

loc_5F8529:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_5F84B0 endp




; int __stdcall	sub_5F8530(void	*Src, int)
sub_5F8530 proc	near

var_4= dword ptr -4
Src= dword ptr	4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+Src]
push	esi
mov	esi, eax
movzx	eax, word ptr [esi+2Ah]
xor	ebx, ebx
mov	[esp+10h+Src], ebx
cmp	edi, eax
jnb	short loc_5F857C
mov	ecx, [esi+24h]
mov	eax, [ecx+edi*4]
mov	[esp+10h+Src], eax
cmp	eax, ebx
jz	short loc_5F857C
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax
lea	ecx, [esp+10h+var_4]
push	ecx
push	edi
lea	ecx, [esi+20h]
mov	[esp+18h+var_4], ebx
call	sub_46B100

loc_5F857C:
cmp	ebp, ebx
jz	short loc_5F85D2
mov	ebx, [esp+10h+arg_4]
add	ebx, ebx
add	ebx, ebx
push	ebx
call	sub_1227DA0
push	ebx		; MaxCount
push	ebp		; Src
push	ebx		; DstSize
push	eax		; Dst
mov	[esp+24h+Src], eax
mov	[esp+24h+arg_4], ebx
call	_memcpy_s
add	esp, 14h
lea	edx, [esp+10h+Src]
push	edx
push	edi
lea	ecx, [esi+20h]
call	sub_471490
movzx	eax, word ptr [esi+38h]
add	esi, 30h
cmp	edi, eax
jb	short loc_5F85C6
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_5F85C6:
push	esi
lea	edx, [esp+14h+arg_4]
mov	ecx, edi
call	sub_410350

loc_5F85D2:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_5F8530 endp

align 10h



; int __stdcall	sub_5F85E0(void	*Src)
sub_5F85E0 proc	near

var_4= dword ptr -4
Src= dword ptr	4

push	ecx
push	ebp
mov	ebp, [esp+8+Src]
push	esi
mov	esi, eax
movzx	eax, word ptr [esi+2Ah]
mov	[esp+0Ch+Src], 0
cmp	edi, eax
jnb	short loc_5F8631
mov	ecx, [esi+24h]
mov	eax, [ecx+edi*4]
mov	[esp+0Ch+Src], eax
test	eax, eax
jz	short loc_5F8631
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax
lea	ecx, [esp+0Ch+var_4]
push	ecx
push	edi
lea	ecx, [esi+20h]
mov	[esp+14h+var_4], 0
call	sub_46B100

loc_5F8631:
test	ebp, ebp
jz	short loc_5F8686
push	1
call	sub_1227DA0
push	1		; MaxCount
push	ebp		; Src
push	1		; DstSize
push	eax		; Dst
mov	[esp+20h+Src], eax
mov	[esp+20h+var_4], 1
call	_memcpy_s
add	esp, 14h
lea	edx, [esp+0Ch+Src]
push	edx
push	edi
lea	ecx, [esi+20h]
call	sub_471490
movzx	eax, word ptr [esi+38h]
add	esi, 30h
cmp	edi, eax
jb	short loc_5F867A
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_5F867A:
push	esi
lea	edx, [esp+10h+var_4]
mov	ecx, edi
call	sub_410350

loc_5F8686:
pop	esi
pop	ebp
pop	ecx
retn	4
sub_5F85E0 endp

align 10h



; int __stdcall	sub_5F8690(void	*Src)
sub_5F8690 proc	near

var_4= dword ptr -4
Src= dword ptr	4

push	ecx
push	ebp
mov	ebp, [esp+8+Src]
push	esi
mov	esi, eax
movzx	eax, word ptr [esi+2Ah]
mov	[esp+0Ch+Src], 0
cmp	edi, eax
jnb	short loc_5F86E1
mov	ecx, [esi+24h]
mov	eax, [ecx+edi*4]
mov	[esp+0Ch+Src], eax
test	eax, eax
jz	short loc_5F86E1
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax
lea	ecx, [esp+0Ch+var_4]
push	ecx
push	edi
lea	ecx, [esi+20h]
mov	[esp+14h+var_4], 0
call	sub_46B100

loc_5F86E1:
test	ebp, ebp
jz	short loc_5F8736
push	4
call	sub_1227DA0
push	4		; MaxCount
push	ebp		; Src
push	4		; DstSize
push	eax		; Dst
mov	[esp+20h+Src], eax
mov	[esp+20h+var_4], 4
call	_memcpy_s
add	esp, 14h
lea	edx, [esp+0Ch+Src]
push	edx
push	edi
lea	ecx, [esi+20h]
call	sub_471490
movzx	eax, word ptr [esi+38h]
add	esi, 30h
cmp	edi, eax
jb	short loc_5F872A
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_5F872A:
push	esi
lea	edx, [esp+10h+var_4]
mov	ecx, edi
call	sub_410350

loc_5F8736:
pop	esi
pop	ebp
pop	ecx
retn	4
sub_5F8690 endp

align 10h



; int __stdcall	sub_5F8740(void	*Src)
sub_5F8740 proc	near

var_4= dword ptr -4
Src= dword ptr	4

push	ecx
push	ebp
mov	ebp, [esp+8+Src]
push	esi
mov	esi, eax
movzx	eax, word ptr [esi+2Ah]
mov	[esp+0Ch+Src], 0
cmp	edi, eax
jnb	short loc_5F8791
mov	ecx, [esi+24h]
mov	eax, [ecx+edi*4]
mov	[esp+0Ch+Src], eax
test	eax, eax
jz	short loc_5F8791
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax
lea	ecx, [esp+0Ch+var_4]
push	ecx
push	edi
lea	ecx, [esi+20h]
mov	[esp+14h+var_4], 0
call	sub_46B100

loc_5F8791:
test	ebp, ebp
jz	short loc_5F87E6
push	2
call	sub_1227DA0
push	2		; MaxCount
push	ebp		; Src
push	2		; DstSize
push	eax		; Dst
mov	[esp+20h+Src], eax
mov	[esp+20h+var_4], 2
call	_memcpy_s
add	esp, 14h
lea	edx, [esp+0Ch+Src]
push	edx
push	edi
lea	ecx, [esi+20h]
call	sub_471490
movzx	eax, word ptr [esi+38h]
add	esi, 30h
cmp	edi, eax
jb	short loc_5F87DA
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_5F87DA:
push	esi
lea	edx, [esp+10h+var_4]
mov	ecx, edi
call	sub_410350

loc_5F87E6:
pop	esi
pop	ebp
pop	ecx
retn	4
sub_5F8740 endp

align 10h



sub_5F87F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
cmp	edi, [esi+4]
jz	loc_5F8890
push	ebp
test	edi, edi
jbe	short loc_5F887B
call	sub_5FB570
mov	ebp, eax
xor	eax, eax
mov	[esp+10h+var_4], eax
cmp	[esi+8], eax
jbe	short loc_5F887D
push	ebx
lea	esp, [esp+0]

loc_5F8820:
mov	esi, [esi]
lea	ebx, ds:0[eax*4]
mov	edi, [ebx+ebp]
add	esi, ebx
cmp	edi, [esi]
jz	short loc_5F8860
test	edi, edi
jz	short loc_5F884D
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F884D
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F884D:
mov	esi, [esi]
mov	[ebx+ebp], esi
test	esi, esi
jz	short loc_5F8860
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_5F8860:
mov	eax, [esp+14h+var_4]
mov	ecx, [esp+14h+arg_0]
inc	eax
mov	[esp+14h+var_4], eax
mov	esi, ecx
cmp	eax, [ecx+8]
jb	short loc_5F8820
mov	edi, [esp+14h+arg_4]
pop	ebx
jmp	short loc_5F887D

loc_5F887B:
xor	ebp, ebp

loc_5F887D:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_5F888A
push	3
call	sub_479940

loc_5F888A:
mov	[esi], ebp
mov	[esi+4], edi
pop	ebp

loc_5F8890:
pop	edi
pop	esi
pop	ecx
retn	8
sub_5F87F0 endp

align 10h



sub_5F88A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
xor	ebx, ebx
cmp	[edi+1Ch], bl
jz	short loc_5F8920
push	ebp
movzx	ebp, word ptr [edi+2Ah]
push	esi
mov	esi, [esp+14h+arg_0]
cmp	esi, ebp
jnb	short loc_5F8909
lea	esp, [esp+0]

loc_5F88C0:
movzx	eax, word ptr [edi+2Ah]
mov	[esp+14h+var_8], ebx
cmp	esi, eax
jnb	short loc_5F8900
mov	ecx, [edi+24h]
mov	eax, [ecx+esi*4]
mov	[esp+14h+var_8], eax
cmp	eax, ebx
jz	short loc_5F8900
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax
lea	ecx, [esp+14h+var_4]
push	ecx
push	esi
lea	ecx, [edi+20h]
mov	[esp+1Ch+var_4], ebx
call	sub_46B100

loc_5F8900:
inc	esi
cmp	esi, ebp
jb	short loc_5F88C0
mov	esi, [esp+14h+arg_0]

loc_5F8909:
push	esi
lea	ecx, [edi+20h]
call	sub_479BC0
mov	edx, [esp+14h+arg_0]
lea	esi, [edi+30h]
call	sub_41CB00
pop	esi
pop	ebp

loc_5F8920:
pop	ebx
add	esp, 8
retn	4
sub_5F88A0 endp

align 10h



sub_5F8930 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
add	esi, 18h
cmp	[esi], edi
jz	short loc_5F8970
test	edi, edi
jz	short loc_5F894B
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_5F894B:
mov	eax, [esi]
test	eax, eax
jz	short loc_5F896E
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F896D
push	esi
mov	eax, ebx
call	sub_1171F60

loc_5F896D:
pop	ebx

loc_5F896E:
mov	[esi], edi

loc_5F8970:
pop	edi
pop	esi
retn
sub_5F8930 endp

align 10h



sub_5F8980 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
add	esi, 10h
cmp	[esi], edi
jz	short loc_5F89C0
test	edi, edi
jz	short loc_5F899B
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_5F899B:
mov	eax, [esi]
test	eax, eax
jz	short loc_5F89BE
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F89BD
push	esi
mov	eax, ebx
call	sub_1171F60

loc_5F89BD:
pop	ebx

loc_5F89BE:
mov	[esi], edi

loc_5F89C0:
pop	edi
pop	esi
retn
sub_5F8980 endp

align 10h



sub_5F89D0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
add	esi, 0Ch
cmp	[esi], edi
jz	short loc_5F8A10
test	edi, edi
jz	short loc_5F89EB
lea	ecx, [edi-8]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_5F89EB:
mov	eax, [esi]
test	eax, eax
jz	short loc_5F8A0E
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5F8A0D
push	esi
mov	eax, ebx
call	sub_1171F60

loc_5F8A0D:
pop	ebx

loc_5F8A0E:
mov	[esi], edi

loc_5F8A10:
pop	edi
pop	esi
retn
sub_5F89D0 endp

align 10h



sub_5F8A20 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+18h]
push	esi
xor	eax, eax
push	edi
test	edx, edx
jbe	short loc_5F8A43
mov	esi, [esp+8+arg_0]
mov	esi, [esi]
mov	ecx, [ecx+10h]

loc_5F8A34:
mov	edi, [ecx]
cmp	[edi+8], esi
jz	short loc_5F8A46
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_5F8A34

loc_5F8A43:
or	eax, 0FFFFFFFFh

loc_5F8A46:
pop	edi
pop	esi
retn	4
sub_5F8A20 endp

align 10h



sub_5F8A50 proc	near
push	esi
mov	esi, [eax+18h]
xor	ecx, ecx
push	edi
test	esi, esi
jbe	short loc_5F8A6F
mov	edi, [edx]
mov	edx, [eax+10h]

loc_5F8A60:
mov	eax, [edx]
cmp	[eax+8], edi
jz	short loc_5F8A71
inc	ecx
add	edx, 4
cmp	ecx, esi
jb	short loc_5F8A60

loc_5F8A6F:
xor	eax, eax

loc_5F8A71:
pop	edi
pop	esi
retn
sub_5F8A50 endp

align 10h



sub_5F8A80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12910E0
test	[esp+4+arg_0], 1
jz	short loc_5F8AA6
test	esi, esi
jz	short loc_5F8AA6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_5F8AA6:
mov	eax, esi
pop	esi
retn	4
sub_5F8A80 endp

align 10h



sub_5F8AB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

push	ebx
mov	ebx, ds:InterlockedIncrement
push	ebp
mov	ebp, [esp+8+arg_0]
push	edi
push	offset Addend	; lpAddend
mov	edi, eax
mov	dword ptr [esi], offset	off_154EE18
mov	dword ptr [esi+4], 0
call	ebx ; InterlockedIncrement
mov	dword ptr [esi], offset	off_15CA444
mov	eax, [edi]
test	eax, eax
jz	short loc_5F8AE5
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedIncrement

loc_5F8AE5:
mov	eax, [edi]
mov	[esi+8], eax
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_5F8AF7
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedIncrement

loc_5F8AF7:
mov	ecx, [ebp+0]
mov	edi, [esp+0Ch+arg_4]
mov	[esi+0Ch], ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_5F8B0D
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedIncrement

loc_5F8B0D:
mov	edx, [edi]
mov	edi, [esp+0Ch+arg_8]
mov	[esi+10h], edx
mov	eax, [edi]
test	eax, eax
jz	short loc_5F8B22
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedIncrement

loc_5F8B22:
mov	eax, [edi]
mov	edi, [esp+0Ch+arg_C]
mov	[esi+14h], eax
mov	eax, [edi]
test	eax, eax
jz	short loc_5F8B37
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebx ; InterlockedIncrement

loc_5F8B37:
mov	ecx, [edi]
mov	dl, [esp+0Ch+arg_10]
mov	[esi+18h], ecx
mov	[esi+1Ch], dl
xor	eax, eax
mov	[esi+28h], ax
xor	edx, edx
mov	[esi+2Ah], dx
mov	[esi+2Ch], ax
mov	[esi+24h], eax
mov	dword ptr [esi+20h], offset off_1554C5C
mov	ecx, 1
mov	[esi+2Eh], cx
mov	edx, 1
pop	edi
xor	ecx, ecx
mov	[esi+3Eh], dx
xor	edx, edx
pop	ebp
mov	[esi+34h], eax
mov	[esi+38h], cx
mov	[esi+3Ah], cx
mov	[esi+3Ch], dx
mov	dword ptr [esi+30h], offset off_1554C5C
mov	eax, esi
pop	ebx
retn	14h
sub_5F8AB0 endp

align 10h



; int __stdcall	sub_5F8BA0(void	*Src, rsize_t MaxCount)
sub_5F8BA0 proc	near

var_4= dword ptr -4
Src= dword ptr	4
MaxCount= dword	ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+MaxCount]
push	esi
mov	esi, eax
movzx	eax, word ptr [esi+2Ah]
mov	[esp+0Ch+MaxCount], 0
cmp	edi, eax
jnb	short loc_5F8BF1
mov	ecx, [esi+24h]
mov	eax, [ecx+edi*4]
mov	[esp+0Ch+MaxCount], eax
test	eax, eax
jz	short loc_5F8BF1
mov	edx, dword_1889574
mov	ecx, [edx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax
lea	ecx, [esp+0Ch+var_4]
push	ecx
push	edi
lea	ecx, [esi+20h]
mov	[esp+14h+var_4], 0
call	sub_46B100

loc_5F8BF1:
cmp	[esp+0Ch+Src], 0
jz	short loc_5F8C46
push	ebx
call	sub_1227DA0
mov	edx, [esp+10h+Src]
push	ebx		; MaxCount
push	edx		; Src
push	ebx		; DstSize
push	eax		; Dst
mov	[esp+20h+MaxCount], eax
mov	[esp+20h+var_4], ebx
call	_memcpy_s
add	esp, 14h
lea	eax, [esp+0Ch+MaxCount]
push	eax
push	edi
lea	ecx, [esi+20h]
call	sub_471490
movzx	ecx, word ptr [esi+38h]
add	esi, 30h
cmp	edi, ecx
jb	short loc_5F8C3A
movzx	edx, word ptr [esi+0Eh]
add	edx, edi
call	sub_41CB00

loc_5F8C3A:
push	esi
lea	edx, [esp+10h+var_4]
mov	ecx, edi
call	sub_410350

loc_5F8C46:
pop	esi
pop	ebx
pop	ecx
retn	8
sub_5F8BA0 endp

align 10h



sub_5F8C50 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, dword_1889574
mov	ecx, [eax]
push	ebx
mov	ebx, [esp+14h+arg_0]
push	esi
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+arg_0]
push	eax
mov	[esp+30h+arg_0], 4
mov	[esp+30h+var_10], 40h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_5F8CA9
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F8CA9:
movzx	ecx, byte ptr [ebx+1Ch]
push	ebp
push	edi
push	ecx
lea	edx, [ebx+18h]
push	edx
lea	eax, [ebx+14h]
push	eax
lea	ecx, [ebx+10h]
push	ecx
lea	edx, [ebx+0Ch]
push	edx
lea	eax, [ebx+8]
call	sub_5F8AB0
movzx	esi, word ptr [ebx+2Ah]
xor	edi, edi
mov	ebp, eax
test	esi, esi
jbe	short loc_5F8CEE

loc_5F8CD4:
mov	eax, [ebx+34h]
mov	ecx, [eax+edi*4]
mov	edx, [ebx+24h]
mov	eax, [edx+edi*4]
push	ecx		; MaxCount
push	eax		; Src
mov	eax, ebp
call	sub_5F8BA0
inc	edi
cmp	edi, esi
jb	short loc_5F8CD4

loc_5F8CEE:
pop	edi
mov	eax, ebp
pop	ebp
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_5F8C50 endp

align 10h



sub_5F8D00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, ds:InterlockedIncrement
push	edi
push	offset Addend	; lpAddend
mov	edi, eax
mov	dword ptr [esi], offset	off_154EE18
mov	dword ptr [esi+4], 0
call	ebp ; InterlockedIncrement
mov	dword ptr [esi+8], offset off_15C9958
mov	dword ptr [esi], offset	off_15C9BBC
mov	dword ptr [esi+8], offset off_15C9BC8
mov	eax, [ebx]
test	eax, eax
jz	short loc_5F8D43
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebp ; InterlockedIncrement

loc_5F8D43:
mov	eax, [ebx]
mov	[esi+0Ch], eax
test	edi, edi
jbe	short loc_5F8D56
call	sub_5FB570
mov	[esi+10h], eax
jmp	short loc_5F8D5D

loc_5F8D56:
mov	dword ptr [esi+10h], 0

loc_5F8D5D:
mov	eax, [esp+0Ch+arg_8]
mov	[esi+14h], edi
mov	dword ptr [esi+18h], 0
mov	[esi+1Ch], eax
test	eax, eax
jz	short loc_5F8D78
add	eax, 4
push	eax		; lpAddend
call	ebp ; InterlockedIncrement

loc_5F8D78:
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [eax]
mov	[esi+20h], ecx
mov	edx, [eax+4]
mov	[esi+24h], edx
mov	ecx, [eax+8]
pop	edi
mov	[esi+28h], ecx
mov	edx, [eax+0Ch]
pop	ebp
mov	[esi+2Ch], edx
mov	eax, esi
pop	ebx
retn	0Ch
sub_5F8D00 endp

align 10h



sub_5F8DA0 proc	near

arg_0= byte ptr	 4

push	esi
push	0
mov	esi, ecx
push	0
mov	dword ptr [esi], offset	off_15CA44C
call	sub_AE64E0
lea	ecx, [esi+30h]
call	sub_1171CB0
lea	ecx, [esi+1Ch]
call	sub_5F6B40
lea	ecx, [esi+8]
call	sub_5F9310
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_5F8DF8
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	440h
push	3
push	esi
call	eax

loc_5F8DF8:
mov	eax, esi
pop	esi
retn	4
sub_5F8DA0 endp

align 10h



sub_5F8E00 proc	near
mov	eax, [edi]
test	eax, eax
jz	short loc_5F8E34
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_5F8E33
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_5F8E33:
pop	esi

loc_5F8E34:
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax
mov	eax, edi
retn
sub_5F8E00 endp

align 10h



sub_5F8E50 proc	near

arg_0= dword ptr  4

push	ebx
push	edi
mov	edi, eax
mov	eax, [esi+4]
push	eax
mov	edx, edi
call	sub_411670
mov	ecx, [esi+8]
mov	eax, [ecx+eax*4]
add	esp, 4
test	eax, eax
jz	short loc_5F8EA4
lea	esp, [esp+0]

loc_5F8E70:
mov	edx, [eax+4]
mov	ecx, edi

loc_5F8E75:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_5F8E95
test	bl, bl
jz	short loc_5F8E91
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_5F8E95
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_5F8E75

loc_5F8E91:
xor	ecx, ecx
jmp	short loc_5F8E9A

loc_5F8E95:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_5F8E9A:
test	ecx, ecx
jz	short loc_5F8EAB
mov	eax, [eax]
test	eax, eax
jnz	short loc_5F8E70

loc_5F8EA4:
pop	edi
xor	al, al
pop	ebx
retn	4

loc_5F8EAB:
mov	edi, [esp+8+arg_0]
add	eax, 8
push	eax
call	sub_418760
pop	edi
mov	al, 1
pop	ebx
retn	4
sub_5F8E50 endp

align 10h



sub_5F8EC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [edi+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	eax
mov	edx, ebx
call	sub_411670
mov	ecx, [edi+8]
mov	ebp, eax
mov	esi, [ecx+ebp*4]
add	esp, 4
test	esi, esi
jz	short loc_5F8F15

loc_5F8EE1:
mov	ecx, [esi+4]
mov	eax, ebx

loc_5F8EE6:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_5F8F06
test	dl, dl
jz	short loc_5F8F02
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_5F8F06
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_5F8EE6

loc_5F8F02:
xor	eax, eax
jmp	short loc_5F8F0B

loc_5F8F06:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_5F8F0B:
test	eax, eax
jz	short loc_5F8F47
mov	esi, [esi]
test	esi, esi
jnz	short loc_5F8EE1

loc_5F8F15:
mov	eax, [edi]
mov	edx, [eax+0Ch]
mov	ecx, edi
call	edx
mov	ecx, [esp+0Ch+arg_4]
push	ecx
mov	esi, eax
mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
push	esi
mov	ecx, edi
call	edx
mov	eax, [edi+8]
mov	ecx, [eax+ebp*4]
mov	[esi], ecx
mov	edx, [edi+8]
mov	[edx+ebp*4], esi
inc	dword ptr [edi+0Ch]
pop	esi
pop	ebp
pop	ebx
retn	8

loc_5F8F47:
mov	edx, [esp+0Ch+arg_4]
mov	[esi+8], edx
pop	esi
pop	ebp
pop	ebx
retn	8
sub_5F8EC0 endp

align 10h



sub_5F8F60 proc	near

arg_0= dword ptr  4

mov	eax, [esi+4]
push	ebx
push	eax
mov	edx, edi
call	sub_411670
mov	ecx, [esi+8]
mov	eax, [ecx+eax*4]
add	esp, 4
test	eax, eax
jz	short loc_5F8FB4
lea	esp, [esp+0]

loc_5F8F80:
mov	edx, [eax+4]
mov	ecx, edi

loc_5F8F85:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_5F8FA5
test	bl, bl
jz	short loc_5F8FA1
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_5F8FA5
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_5F8F85

loc_5F8FA1:
xor	ecx, ecx
jmp	short loc_5F8FAA

loc_5F8FA5:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_5F8FAA:
test	ecx, ecx
jz	short loc_5F8FBA
mov	eax, [eax]
test	eax, eax
jnz	short loc_5F8F80

loc_5F8FB4:
xor	al, al
pop	ebx
retn	4

loc_5F8FBA:
mov	edx, [eax+8]
mov	eax, [esp+4+arg_0]
mov	[eax], edx
mov	al, 1
pop	ebx
retn	4
sub_5F8F60 endp

align 10h



sub_5F8FD0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [eax+8]
xor	ecx, ecx
push	edi
test	esi, esi
jbe	short loc_5F9001
mov	edi, [ebx]
mov	edx, [eax]

loc_5F8FE4:
cmp	[edx], edi
jz	short loc_5F8FFC
inc	ecx
add	edx, 4
cmp	ecx, esi
jb	short loc_5F8FE4
push	ebx
call	sub_5FAB70
pop	edi
pop	esi
pop	ebx
retn	4

loc_5F8FFC:
cmp	ecx, 0FFFFFFFFh
jnz	short loc_5F9007

loc_5F9001:
push	ebx
call	sub_5FAB70

loc_5F9007:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5F8FD0 endp

align 10h



sub_5F9010 proc	near

arg_0= dword ptr  4

cmp	byte ptr [ecx+10h], 0
jz	short locret_5F9035
mov	eax, [esp+arg_0]
mov	eax, [eax+4]
test	eax, eax
jz	short locret_5F9035
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

locret_5F9035:
retn	4
sub_5F9010 endp

align 10h



sub_5F9040 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_5F9310
test	[esp+4+arg_0], 1
jz	short loc_5F9066
test	esi, esi
jz	short loc_5F9066
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_5F9066:
mov	eax, esi
pop	esi
retn	4
sub_5F9040 endp

align 10h



; int __stdcall	sub_5F9070(int,	char *Src, int)
sub_5F9070 proc	near

arg_0= dword ptr  4
Src= dword ptr	8
arg_8= dword ptr  0Ch

cmp	byte ptr [ecx+10h], 0
push	ebx
push	esi
push	edi
jz	short loc_5F90A8
mov	ebx, [esp+0Ch+Src]
mov	eax, ebx
lea	edx, [eax+1]

loc_5F9082:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_5F9082
sub	eax, edx
lea	esi, [eax+1]
push	esi
call	sub_1227DA0
mov	edi, [esp+10h+arg_0]
push	ebx		; Src
push	esi		; SizeInBytes
push	eax		; Dst
mov	[edi+4], eax
call	_strcpy_s
add	esp, 10h
jmp	short loc_5F90B3

loc_5F90A8:
mov	edi, [esp+0Ch+arg_0]
mov	eax, [esp+0Ch+Src]
mov	[edi+4], eax

loc_5F90B3:
mov	esi, [edi+8]
mov	eax, [esp+0Ch+arg_8]
mov	ebx, ds:InterlockedDecrement
cmp	esi, eax
jz	short loc_5F90F4
test	esi, esi
jz	short loc_5F90DF
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F90DB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F90DB:
mov	eax, [esp+0Ch+arg_8]

loc_5F90DF:
mov	[edi+8], eax
test	eax, eax
jz	short loc_5F910D
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement
mov	eax, [esp+0Ch+arg_8]

loc_5F90F4:
test	eax, eax
jz	short loc_5F910D
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F910D
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F910D:
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_5F9070 endp

align 10h



sub_5F9120 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA484
call	sub_418AE0
mov	dword ptr [esi], offset	off_1550880
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5F9154
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F9154:
test	[esp+4+arg_0], 1
jz	short loc_5F916F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5F916F:
mov	eax, esi
pop	esi
retn	4
sub_5F9120 endp

align 10h



sub_5F9180 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	esi
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_5F91D4
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F91D4:
push	edi
mov	dword ptr [esi+8], 0
mov	edi, [esi+8]
test	edi, edi
jz	short loc_5F9201
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F91FA
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F91FA:
mov	dword ptr [esi+8], 0

loc_5F9201:
pop	edi
mov	eax, esi
pop	esi
add	esp, 14h
retn
sub_5F9180 endp

align 10h


; Attributes: thunk

sub_5F9210 proc	near
jmp	sub_5F9180
sub_5F9210 endp

align 10h



sub_5F9220 proc	near
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_5F923F
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F923F
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F923F:
pop	edi
test	esi, esi
jz	short loc_5F9258
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_5F9258:
mov	eax, esi
retn
sub_5F9220 endp

align 10h



sub_5F9260 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_5F928B
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5F9284
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5F9284:
mov	dword ptr [esi+8], 0

loc_5F928B:
test	esi, esi
jz	short loc_5F9294
call	sub_5F9220

loc_5F9294:
pop	edi
pop	esi
retn	4
sub_5F9260 endp

align 10h



sub_5F92A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, ds:InterlockedDecrement
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	[edi+4], eax
mov	esi, [edi+8]
mov	eax, [esp+0Ch+arg_8]
cmp	esi, eax
jz	short loc_5F92EF
test	esi, esi
jz	short loc_5F92DA
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F92D6
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F92D6:
mov	eax, [esp+0Ch+arg_8]

loc_5F92DA:
mov	[edi+8], eax
test	eax, eax
jz	short loc_5F9308
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement
mov	eax, [esp+0Ch+arg_8]

loc_5F92EF:
test	eax, eax
jz	short loc_5F9308
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_5F9308
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_5F9308:
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_5F92A0 endp

align 10h



sub_5F9310 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_15CA498
jz	short loc_5F935D
push	ebx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_5F935C
push	edi

loc_5F9328:
mov	eax, [esi+8]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_5F9355

loc_5F9332:
mov	eax, edi
mov	eax, [eax+4]
mov	edi, [edi]
test	eax, eax
jz	short loc_5F9351
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F9351:
test	edi, edi
jnz	short loc_5F9332

loc_5F9355:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_5F9328
pop	edi

loc_5F935C:
pop	ebx

loc_5F935D:
mov	dword ptr [esi], offset	off_15CA484
call	sub_418AE0
mov	dword ptr [esi], offset	off_1550880
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_5F938E
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_5F938E:
pop	esi
retn
sub_5F9310 endp




sub_5F9390 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AE5830
test	[esp+4+arg_0], 1
jz	short loc_5F93B6
test	esi, esi
jz	short loc_5F93B6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	5Ch
push	3
push	esi
call	eax

loc_5F93B6:
mov	eax, esi
pop	esi
retn	4
sub_5F9390 endp

align 10h



sub_5F93C0 proc	near
mov	eax, [edi]
test	eax, eax
jz	short loc_5F93F4
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_46B550
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_5F93F3
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_5F93F3:
pop	esi

loc_5F93F4:
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax
mov	eax, edi
retn
sub_5F93C0 endp

align 10h



sub_5F9410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+4]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
push	eax
mov	edx, ebp
call	sub_411670
mov	ecx, [ebx+8]
mov	esi, [ecx+eax*4]
add	esp, 4
mov	[esp+10h+arg_4], eax
test	esi, esi
jz	short loc_5F946F

loc_5F9438:
mov	ecx, [esi+4]
mov	eax, ebp
lea	ecx, [ecx+0]

loc_5F9440:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_5F9460
test	dl, dl
jz	short loc_5F945C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_5F9460
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_5F9440

loc_5F945C:
xor	eax, eax
jmp	short loc_5F9465

loc_5F9460:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_5F9465:
test	eax, eax
jz	short loc_5F94B9
mov	esi, [esi]
test	esi, esi
jnz	short loc_5F9438

loc_5F946F:
mov	eax, [ebx]
mov	edx, [eax+0Ch]
mov	ecx, ebx
call	edx
mov	edi, [ebx]
push	ecx
mov	esi, eax
lea	eax, [esp+14h+arg_8]
mov	ecx, esp
push	eax
add	edi, 4
call	sub_5D2F10
mov	edx, [edi]
push	ebp
push	esi
mov	ecx, ebx
call	edx
mov	ecx, [ebx+8]
mov	eax, [esp+10h+arg_4]
mov	edx, [ecx+eax*4]
mov	[esi], edx
mov	ecx, [ebx+8]
mov	[ecx+eax*4], esi
inc	dword ptr [ebx+0Ch]
lea	ecx, [esp+10h+arg_8]
call	sub_46B550
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_5F94B9:
lea	edx, [esp+10h+arg_8]
push	edx
lea	ecx, [esi+8]
call	sub_4AD130
lea	ecx, [esp+10h+arg_8]
call	sub_46B550
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_5F9410 endp

align 10h



sub_5F94E0 proc	near

arg_0= dword ptr  4

mov	eax, [edi+4]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	eax
mov	edx, ebp
call	sub_411670
mov	ecx, [edi+8]
mov	esi, [ecx+eax*4]
lea	ebx, [ecx+eax*4]
add	esp, 4
test	esi, esi
jz	loc_5F95A1
mov	ecx, [esi+4]
mov	eax, ebp
jmp	short loc_5F9510
align 10h

loc_5F9510:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_5F9530
test	dl, dl
jz	short loc_5F952C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_5F9530
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_5F9510

loc_5F952C:
xor	eax, eax
jmp	short loc_5F9535

loc_5F9530:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_5F9535:
test	eax, eax
jnz	short loc_5F955C
mov	edx, [esi]
mov	[ebx], edx
mov	eax, [edi]
mov	edx, [eax+8]
push	esi
mov	ecx, edi
call	edx
mov	eax, [edi]
mov	edx, [eax+10h]
push	esi
mov	ecx, edi
call	edx
dec	dword ptr [edi+0Ch]
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4

loc_5F955C:
mov	ebx, esi
mov	esi, [esi]
test	esi, esi
jz	short loc_5F95A1

loc_5F9564:
mov	ecx, [esi+4]
mov	eax, ebp
lea	esp, [esp+0]

loc_5F9570:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_5F9590
test	dl, dl
jz	short loc_5F958C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_5F9590
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_5F9570

loc_5F958C:
xor	eax, eax
jmp	short loc_5F9595

loc_5F9590:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_5F9595:
test	eax, eax
jz	short loc_5F95A9
mov	ebx, esi
mov	esi, [esi]
test	esi, esi
jnz	short loc_5F9564

loc_5F95A1:
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	4

loc_5F95A9:
mov	eax, [esi]
mov	[ebx], eax
mov	edx, [edi]
mov	eax, [edx+8]
push	esi
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	eax, [edx+10h]
push	esi
mov	ecx, edi
call	eax
dec	dword ptr [edi+0Ch]
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4
sub_5F94E0 endp

align 10h



sub_5F95D0 proc	near

arg_0= dword ptr  4

mov	eax, [esi+4]
push	ebx
push	eax
mov	edx, edi
call	sub_411670
mov	ecx, [esi+8]
mov	eax, [ecx+eax*4]
add	esp, 4
test	eax, eax
jz	short loc_5F9624
lea	esp, [esp+0]

loc_5F95F0:
mov	edx, [eax+4]
mov	ecx, edi

loc_5F95F5:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_5F9615
test	bl, bl
jz	short loc_5F9611
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_5F9615
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_5F95F5

loc_5F9611:
xor	ecx, ecx
jmp	short loc_5F961A

loc_5F9615:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_5F961A:
test	ecx, ecx
jz	short loc_5F962A
mov	eax, [eax]
test	eax, eax
jnz	short loc_5F95F0

loc_5F9624:
xor	al, al
pop	ebx
retn	4

loc_5F962A:
mov	ecx, [esp+4+arg_0]
add	eax, 8
push	eax
call	sub_4AD130
mov	al, 1
pop	ebx
retn	4
sub_5F95D0 endp

align 10h



sub_5F9640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [ebp+0]
mov	eax, [esi+4]
lea	edx, [esi+8]
mov	[ecx], eax
mov	ecx, [esp+0Ch+arg_8]
push	edx
call	sub_4AD130
mov	eax, [esi]
test	eax, eax
jz	short loc_5F966F
pop	esi
mov	[ebp+0], eax
pop	ebp
pop	ebx
retn	0Ch

loc_5F966F:
mov	edx, [esi+4]
push	edi
mov	edi, [ebx+4]
push	edi
call	sub_411670
inc	eax
add	esp, 4
cmp	eax, edi
jnb	short loc_5F969E
mov	ecx, [ebx+8]
lea	ecx, [ecx+eax*4]
lea	ebx, [ebx+0]

loc_5F9690:
mov	edx, [ecx]
test	edx, edx
jnz	short loc_5F96AC
inc	eax
add	ecx, 4
cmp	eax, edi
jb	short loc_5F9690

loc_5F969E:
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebp
pop	ebx
retn	0Ch

loc_5F96AC:
pop	edi
pop	esi
mov	[ebp+0], edx
pop	ebp
pop	ebx
retn	0Ch
sub_5F9640 endp

align 10h



sub_5F96C0 proc	near

arg_0= dword ptr  4

mov	edx, [esi+8]
push	ebx
mov	ebx, [esp+4+arg_0]
xor	eax, eax
push	edi
test	edx, edx
jbe	short loc_5F96E6
mov	edi, [ebx]
mov	ecx, [esi]

loc_5F96D3:
cmp	[ecx], edi
jz	short loc_5F96E1
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_5F96D3
jmp	short loc_5F96E6

loc_5F96E1:
cmp	eax, 0FFFFFFFFh
jnz	short loc_5F9712

loc_5F96E6:
mov	eax, [esi+4]
cmp	edx, eax
jnz	short loc_5F9700
test	eax, eax
jbe	short loc_5F96F5
add	eax, eax
jmp	short loc_5F96FA

loc_5F96F5:
mov	eax, 1

loc_5F96FA:
push	esi
call	sub_5F9770

loc_5F9700:
mov	eax, [esi+8]
mov	ecx, [esi]
lea	ecx, [ecx+eax*4]
inc	eax
push	ebx
mov	[esi+8], eax
call	sub_4AD130

loc_5F9712:
pop	edi
pop	ebx
retn	4
sub_5F96C0 endp

align 10h



sub_5F9720 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_5F9763
push	esi
push	offset sub_45CCE0
push	edi
lea	esi, [eax+4]
push	4
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_5F9763:
xor	eax, eax
retn
sub_5F9720 endp

align 10h



sub_5F9770 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, eax
cmp	edi, [ebx+4]
jz	short loc_5F97E7
push	ebp
push	esi
test	edi, edi
jbe	short loc_5F97AD
call	sub_5F9720
xor	esi, esi
mov	ebp, eax
cmp	[ebx+8], esi
jbe	short loc_5F97AF

loc_5F9791:
mov	ecx, [ebx]
lea	eax, ds:0[esi*4]
add	ecx, eax
push	ecx
lea	ecx, [eax+ebp]
call	sub_4AD130
inc	esi
cmp	esi, [ebx+8]
jb	short loc_5F9791
jmp	short loc_5F97AF

loc_5F97AD:
xor	ebp, ebp

loc_5F97AF:
mov	eax, [ebx]
test	eax, eax
jz	short loc_5F97E0
mov	edx, [eax-4]
lea	esi, [eax-4]
push	offset sub_46B550
push	edx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_5F97E0
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	esi
call	eax

loc_5F97E0:
pop	esi
mov	[ebx], ebp
mov	[ebx+4], edi
pop	ebp

loc_5F97E7:
pop	edi
pop	ebx
retn	4
sub_5F9770 endp

align 10h



sub_5F97F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_15CA520
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_5F97F0 endp

align 10h



sub_5F9860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_15C9924
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_5F9860 endp

align 10h



sub_5F98D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_5F9B10
test	[esp+4+arg_0], 1
jz	short loc_5F98F6
test	esi, esi
jz	short loc_5F98F6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	14h
push	3
push	esi
call	eax

loc_5F98F6:
mov	eax, esi
pop	esi
retn	4
sub_5F98D0 endp

align 10h



; int __stdcall	sub_5F9900(int,	char *Src, char)
sub_5F9900 proc	near

arg_0= dword ptr  4
Src= dword ptr	8
arg_8= byte ptr	 0Ch

cmp	byte ptr [ecx+10h], 0
push	edi
jz	short loc_5F993A
push	ebx
mov	ebx, [esp+8+Src]
mov	eax, ebx
push	esi
lea	edx, [eax+1]

loc_5F9912:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_5F9912
sub	eax, edx
lea	esi, [eax+1]
push	esi
call	sub_1227DA0
mov	edi, [esp+10h+arg_0]
push	ebx		; Src
push	esi		; SizeInBytes
push	eax		; Dst
mov	[edi+4], eax
call	_strcpy_s
add	esp, 10h
pop	esi
pop	ebx
jmp	short loc_5F9945

loc_5F993A:
mov	edi, [esp+4+arg_0]
mov	eax, [esp+4+Src]
mov	[edi+4], eax

loc_5F9945:
lea	ecx, [esp+4+arg_8]
push	ecx
lea	ecx, [edi+8]
call	sub_4AD130
lea	ecx, [esp+4+arg_8]
call	sub_46B550
pop	edi
retn	0Ch
sub_5F9900 endp

align 10h



sub_5F9960 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA4F8
call	sub_418AE0
mov	dword ptr [esi], offset	off_15CA520
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5F9994
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F9994:
test	[esp+4+arg_0], 1
jz	short loc_5F99AF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5F99AF:
mov	eax, esi
pop	esi
retn	4
sub_5F9960 endp

align 10h



sub_5F99C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	esi
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_5F9A14
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5F9A14:
push	edi
lea	edi, [esi+8]
push	0
mov	ecx, edi
call	sub_46B5D0
push	0
mov	ecx, edi
call	sub_59C680
pop	edi
mov	eax, esi
pop	esi
add	esp, 14h
retn
sub_5F99C0 endp

align 10h


; Attributes: thunk

sub_5F9A40 proc	near
jmp	sub_5F99C0
sub_5F9A40 endp

align 10h



sub_5F9A50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
lea	edi, [esi+8]
push	0
mov	ecx, edi
call	sub_59C680
test	esi, esi
jz	short loc_5F9A80
mov	ecx, edi
call	sub_46B550
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_5F9A80:
pop	edi
pop	esi
retn	4
sub_5F9A50 endp

align 10h



sub_5F9A90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA520
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5F9AB9
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F9AB9:
test	[esp+4+arg_0], 1
jz	short loc_5F9AD4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5F9AD4:
mov	eax, esi
pop	esi
retn	4
sub_5F9A90 endp

align 10h



sub_5F9AE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
lea	edx, [esp+arg_8]
mov	[eax+4], ecx
push	edx
lea	ecx, [eax+8]
call	sub_4AD130
lea	ecx, [esp+arg_8]
call	sub_46B550
retn	0Ch
sub_5F9AE0 endp

align 10h



sub_5F9B10 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_15CA50C
jz	short loc_5F9B5D
push	ebx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_5F9B5C
push	edi

loc_5F9B28:
mov	eax, [esi+8]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_5F9B55

loc_5F9B32:
mov	eax, edi
mov	eax, [eax+4]
mov	edi, [edi]
test	eax, eax
jz	short loc_5F9B51
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5F9B51:
test	edi, edi
jnz	short loc_5F9B32

loc_5F9B55:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_5F9B28
pop	edi

loc_5F9B5C:
pop	ebx

loc_5F9B5D:
mov	dword ptr [esi], offset	off_15CA4F8
call	sub_418AE0
mov	dword ptr [esi], offset	off_15CA520
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_5F9B8E
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_5F9B8E:
pop	esi
retn
sub_5F9B10 endp




sub_5F9B90 proc	near

arg_0= byte ptr	 4

push	esi
push	0
mov	esi, ecx
push	0
mov	dword ptr [esi], offset	off_15CA534
call	sub_AE42B0
lea	ecx, [esi+1Ch]
call	sub_5F6B40
lea	ecx, [esi+8]
call	sub_5F6B40
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_5F9BDD
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	esi
call	eax

loc_5F9BDD:
mov	eax, esi
pop	esi
retn	4
sub_5F9B90 endp

align 10h



sub_5F9BF0 proc	near
mov	eax, [edi]
test	eax, eax
jz	short loc_5F9C24
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	sub_40F3E0
test	esi, esi
jz	short loc_5F9C23
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_5F9C23:
pop	esi

loc_5F9C24:
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	edi
call	eax
mov	eax, edi
retn
sub_5F9BF0 endp

align 10h



sub_5F9C40 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [eax+8]
xor	ecx, ecx
push	edi
test	esi, esi
jbe	short loc_5F9C71
mov	edi, [ebx]
mov	edx, [eax]

loc_5F9C54:
cmp	[edx], edi
jz	short loc_5F9C6C
inc	ecx
add	edx, 4
cmp	ecx, esi
jb	short loc_5F9C54
push	ebx
call	sub_4205A0
pop	edi
pop	esi
pop	ebx
retn	4

loc_5F9C6C:
cmp	ecx, 0FFFFFFFFh
jnz	short loc_5F9C77

loc_5F9C71:
push	ebx
call	sub_4205A0

loc_5F9C77:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5F9C40 endp

align 10h



sub_5F9C80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_125F8C0
test	[esp+4+arg_0], 1
jz	short loc_5F9CA9
test	esi, esi
jz	short loc_5F9CA9
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	348h
push	3
push	esi
call	eax

loc_5F9CA9:
mov	eax, esi
pop	esi
retn	4
sub_5F9C80 endp

align 10h



sub_5F9CB0 proc	near
push	esi
push	edi
mov	edi, eax
lea	esi, [edi+10h]
mov	dword ptr [esi], offset	off_15CA5E0
call	sub_418AE0
mov	dword ptr [esi], offset	off_15CA5F4
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_5F9CE7
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_5F9CE7:
mov	esi, edi
mov	dword ptr [edi], offset	off_15C9910
call	sub_418AE0
mov	dword ptr [edi], offset	off_15C9924
call	sub_418AE0
mov	edi, [edi+8]
test	edi, edi
jz	short loc_5F9D1A
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	edi
call	eax

loc_5F9D1A:
pop	edi
pop	esi
retn
sub_5F9CB0 endp

align 10h



sub_5F9D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_15CA5F4
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_5F9D20 endp

align 10h



sub_5F9D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [ecx]
mov	eax, [eax+90h]
push	edx
lea	edx, [esp+8+arg_4]
push	edx
lea	edx, [esp+0Ch+var_4]
push	edx
mov	edx, [esp+10h+arg_4]
push	edx
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+var_4]
mov	eax, [esp+4+arg_0]
push	ecx
push	edx
add	eax, 3Ch
call	sub_AE2DA0
pop	ecx
retn	8
sub_5F9D90 endp

align 10h


; Attributes: bp-based frame

sub_5F9DD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
fldz
mov	eax, [ecx]
mov	eax, [eax+9Ch]
fst	[esp+14h+var_10]
push	esi
fst	[esp+18h+var_C]
push	edx
fst	[esp+1Ch+var_8]
lea	edx, [esp+1Ch+var_10]
fstp	[esp+1Ch+var_4]
push	edx
mov	edx, [ebp+arg_4]
push	edx
call	eax
mov	ecx, [ebp+arg_0]
add	ecx, 3Ch
push	ecx
lea	esi, [esp+1Ch+var_10]
call	sub_AE2E10
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_5F9DD0 endp

align 10h



sub_5F9E20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
fldz
mov	eax, [ecx]
mov	eax, [eax+0A0h]
fst	[esp+0Ch+var_C]
push	esi
fst	[esp+10h+var_8]
push	edx
fstp	[esp+14h+var_4]
lea	edx, [esp+14h+var_C]
push	edx
mov	edx, [esp+18h+arg_4]
push	edx
call	eax
mov	ecx, [esp+10h+arg_0]
add	ecx, 3Ch
push	ecx
lea	esi, [esp+14h+var_C]
call	sub_AE2EC0
pop	esi
add	esp, 0Ch
retn	8
sub_5F9E20 endp

align 10h


; Attributes: bp-based frame

sub_5F9E60 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ecx]
mov	eax, [eax+0A8h]
sub	esp, 14h
push	esi
push	edx
lea	edx, [esp+1Ch+var_10]
push	edx
mov	edx, [ebp+arg_4]
push	edx
call	eax
mov	ecx, [ebp+arg_0]
add	ecx, 3Ch
push	ecx
lea	esi, [esp+1Ch+var_10]
call	sub_AE3050
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_5F9E60 endp

align 10h


; Attributes: bp-based frame

sub_5F9EA0 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ecx]
mov	eax, [eax+0B0h]
sub	esp, 0Ch
push	esi
push	edx
lea	edx, [esp+14h+var_8]
push	edx
mov	edx, [ebp+arg_4]
push	edx
call	eax
mov	ecx, [ebp+arg_0]
add	ecx, 3Ch
push	ecx
lea	esi, [esp+14h+var_8]
call	sub_AE31A0
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_5F9EA0 endp

align 10h



sub_5F9EE0 proc	near

var_215= byte ptr -215h
Src= dword ptr -214h
var_210= dword ptr -210h
Dst= byte ptr -20Ch
var_108= dword ptr -108h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 218h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+218h+var_4], eax
push	ebx
mov	ebx, [esp+21Ch+arg_4]
push	ebp
mov	ebp, [esp+220h+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi]
push	ebx
lea	ecx, [esp+22Ch+Src]
mov	edi, edx
mov	edx, [eax+0B4h]
push	ecx
push	edi
mov	ecx, esi
mov	[esp+234h+Src],	0
call	edx
cmp	[esp+228h+Src],	0
jz	loc_5FA02E
mov	eax, [esi]
mov	edx, [eax+80h]
lea	ecx, [esp+228h+var_215]
push	ecx
push	ebx
push	edi
mov	ecx, esi
call	edx
cmp	[esp+228h+var_215], 0
mov	ebx, ds:InterlockedDecrement
jz	loc_5F9FFE
mov	ecx, [esp+228h+Src] ; Src
lea	eax, [esp+228h+var_108]
lea	edx, [ebp+44h]	; Src
push	eax		; int
call	sub_1110160
add	esp, 4
test	eax, eax
jnz	short loc_5F9FA7
mov	ecx, [esp+228h+Src]
push	ecx		; Src
lea	edx, [esp+22Ch+Dst]
push	104h		; SizeInBytes
push	edx		; Dst
call	_strcpy_s
lea	eax, [esp+234h+Dst]
push	eax
call	sub_110FDF0
lea	ecx, [esp+238h+Dst]
push	ecx		; Src
lea	edx, [esp+23Ch+var_108]
push	104h		; SizeInBytes
push	edx		; Dst
call	_strcpy_s
add	esp, 1Ch

loc_5F9FA7:		; "TRUE"
push	offset aTrue_3
lea	edi, [ebp+3Ch]
push	offset aAsset_0	; "Asset"
mov	eax, edi
call	sub_AE3610
lea	eax, [esp+228h+var_108]
push	eax
call	sub_1172180
add	esp, 4
mov	esi, eax
lea	ecx, [esp+228h+var_210]
push	ecx
mov	eax, edi
mov	[esp+22Ch+var_210], esi
call	sub_AE3240
test	esi, esi
jz	short loc_5FA00B
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA00B
lea	edx, [esp+228h+var_210]
push	edx
mov	eax, edi
call	sub_1171F60
jmp	short loc_5FA00B

loc_5F9FFE:
lea	eax, [esp+228h+Src]
push	eax
lea	eax, [ebp+3Ch]
call	sub_AE3240

loc_5FA00B:
mov	eax, [esp+228h+Src]
test	eax, eax
jz	short loc_5FA02E
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA02E
lea	ecx, [esp+228h+Src]
push	ecx
mov	eax, esi
call	sub_1171F60

loc_5FA02E:
mov	ecx, [esp+228h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 218h
retn	8
sub_5F9EE0 endp

align 10h



sub_5FA050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
mov	eax, [eax+94h]
push	esi
mov	esi, [esp+4+arg_0]
push	edx
lea	edx, [esp+8+arg_0]
push	edx
mov	edx, [esp+0Ch+arg_4]
push	edx
mov	[esp+10h+arg_0], 0
call	eax
mov	ecx, [esp+4+arg_0]
test	ecx, ecx
jnz	short loc_5FA0B0
mov	ecx, [esi+40h]
cmp	dword ptr [ecx+8], 0
jnz	short loc_5FA08D
mov	eax, [esi+3Ch]
call	sub_40B040
jmp	short loc_5FA098

loc_5FA08D:
mov	esi, ecx
mov	edx, [esi+8]
mov	eax, [esi]
mov	eax, [eax+edx*4-4]

loc_5FA098:
test	eax, eax
jz	short loc_5FA0E3
push	offset aNull	; "NULL"
push	eax
mov	ecx, offset aReflinkid_0 ; "RefLinkID"
call	sub_40BF60
pop	esi
retn	8

loc_5FA0B0:
xor	edx, edx
mov	eax, ecx
div	dword ptr [esi+20h]
mov	eax, [esi+24h]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_5FA0E3

loc_5FA0C1:
cmp	ecx, [edx+4]
jz	short loc_5FA0D0
mov	edx, [edx]
test	edx, edx
jnz	short loc_5FA0C1
pop	esi
retn	8

loc_5FA0D0:
mov	edx, [edx+8]
push	edi
push	edx
lea	eax, [esi+3Ch]
mov	edi, offset aReflinkid_0 ; "RefLinkID"
call	sub_AE3650
pop	edi

loc_5FA0E3:
pop	esi
retn	8
sub_5FA050 endp

align 10h



sub_5FA0F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
fldz
push	ebx
mov	ebx, [esp+18h+arg_0]
fst	[esp+18h+var_14]
fst	[esp+18h+var_10]
push	esi
fst	[esp+1Ch+var_C]
add	eax, 3Ch
lea	esi, [esp+1Ch+var_14]
fstp	[esp+1Ch+var_8]
call	sub_AE2450
test	al, al
jz	short loc_5FA178
test	ebx, ebx
jnz	short loc_5FA125
mov	[esp+1Ch+arg_0], ebx
jmp	short loc_5FA132

loc_5FA125:
push	ebx
call	sub_1172180
add	esp, 4
mov	[esp+1Ch+arg_0], eax

loc_5FA132:
mov	ecx, [esp+1Ch+arg_4]
mov	eax, [edi]
push	ecx
lea	edx, [esp+20h+var_14]
push	edx
mov	edx, [eax+0DCh]
lea	ecx, [esp+24h+arg_0]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+1Ch+arg_0]
test	eax, eax
jz	short loc_5FA176
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA176
lea	eax, [esp+1Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA176:
mov	al, bl

loc_5FA178:
pop	esi
pop	ebx
add	esp, 14h
retn	8
sub_5FA0F0 endp




sub_5FA180 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
fldz
push	ebx
mov	ebx, [esp+10h+arg_0]
fst	[esp+10h+var_C]
push	esi
fst	[esp+14h+var_8]
add	eax, 3Ch
fstp	[esp+14h+var_4]
lea	esi, [esp+14h+var_C]
call	sub_AE24B0
test	al, al
jz	short loc_5FA204
test	ebx, ebx
jnz	short loc_5FA1B1
mov	[esp+14h+arg_0], ebx
jmp	short loc_5FA1BE

loc_5FA1B1:
push	ebx
call	sub_1172180
add	esp, 4
mov	[esp+14h+arg_0], eax

loc_5FA1BE:
mov	ecx, [esp+14h+arg_4]
mov	eax, [edi]
push	ecx
lea	edx, [esp+18h+var_C]
push	edx
mov	edx, [eax+0E0h]
lea	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+14h+arg_0]
test	eax, eax
jz	short loc_5FA202
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA202
lea	eax, [esp+14h+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA202:
mov	al, bl

loc_5FA204:
pop	esi
pop	ebx
add	esp, 0Ch
retn	8
sub_5FA180 endp

align 10h



sub_5FA210 proc	near

var_24=	byte ptr -24h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	esi
mov	esi, eax
lea	eax, [esp+28h+var_24]
push	eax
mov	eax, [esp+2Ch+arg_0]
add	eax, 3Ch
call	sub_AE2510
test	al, al
jz	short loc_5FA28A
test	edi, edi
jnz	short loc_5FA235
mov	[esp+28h+arg_0], edi
jmp	short loc_5FA242

loc_5FA235:
push	edi
call	sub_1172180
add	esp, 4
mov	[esp+28h+arg_0], eax

loc_5FA242:
mov	eax, [esp+28h+arg_4]
mov	edx, [esi]
mov	edx, [edx+0E4h]
push	ebx
push	eax
lea	ecx, [esp+30h+var_24]
push	ecx
lea	eax, [esp+34h+arg_0]
push	eax
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+2Ch+arg_0]
test	eax, eax
jz	short loc_5FA287
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA287
lea	eax, [esp+2Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA287:
mov	al, bl
pop	ebx

loc_5FA28A:
pop	esi
add	esp, 24h
retn	8
sub_5FA210 endp

align 10h



sub_5FA2A0 proc	near

var_14=	byte ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_0]
push	esi
add	eax, 3Ch
lea	esi, [esp+1Ch+var_14]
call	sub_AE2620
test	al, al
jz	short loc_5FA316
test	ebx, ebx
jnz	short loc_5FA2C3
mov	[esp+1Ch+arg_0], ebx
jmp	short loc_5FA2D0

loc_5FA2C3:
push	ebx
call	sub_1172180
add	esp, 4
mov	[esp+1Ch+arg_0], eax

loc_5FA2D0:
mov	ecx, [esp+1Ch+arg_4]
mov	eax, [edi]
push	ecx
lea	edx, [esp+20h+var_14]
push	edx
mov	edx, [eax+0E8h]
lea	ecx, [esp+24h+arg_0]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+1Ch+arg_0]
test	eax, eax
jz	short loc_5FA314
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA314
lea	eax, [esp+1Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA314:
mov	al, bl

loc_5FA316:
pop	esi
pop	ebx
add	esp, 14h
retn	8
sub_5FA2A0 endp

align 10h



sub_5FA320 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
push	esi
add	eax, 3Ch
lea	esi, [esp+14h+var_C]
call	sub_AE2680
test	al, al
jz	short loc_5FA396
test	ebx, ebx
jnz	short loc_5FA343
mov	[esp+14h+arg_0], ebx
jmp	short loc_5FA350

loc_5FA343:
push	ebx
call	sub_1172180
add	esp, 4
mov	[esp+14h+arg_0], eax

loc_5FA350:
mov	ecx, [esp+14h+arg_4]
mov	eax, [edi]
push	ecx
lea	edx, [esp+18h+var_C]
push	edx
mov	edx, [eax+0ECh]
lea	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+14h+arg_0]
test	eax, eax
jz	short loc_5FA394
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA394
lea	eax, [esp+14h+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA394:
mov	al, bl

loc_5FA396:
pop	esi
pop	ebx
add	esp, 0Ch
retn	8
sub_5FA320 endp

align 10h



sub_5FA3A0 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
push	esi
add	eax, 3Ch
lea	esi, [esp+14h+var_C]
call	sub_AE26E0
test	al, al
jz	short loc_5FA416
test	ebx, ebx
jnz	short loc_5FA3C3
mov	[esp+14h+arg_0], ebx
jmp	short loc_5FA3D0

loc_5FA3C3:
push	ebx
call	sub_1172180
add	esp, 4
mov	[esp+14h+arg_0], eax

loc_5FA3D0:
mov	ecx, [esp+14h+arg_4]
mov	eax, [edi]
push	ecx
lea	edx, [esp+18h+var_C]
push	edx
mov	edx, [eax+0F0h]
lea	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+14h+arg_0]
test	eax, eax
jz	short loc_5FA414
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA414
lea	eax, [esp+14h+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA414:
mov	al, bl

loc_5FA416:
pop	esi
pop	ebx
add	esp, 0Ch
retn	8
sub_5FA3A0 endp

align 10h



sub_5FA420 proc	near

var_114= dword ptr -114h
Src= dword ptr -110h
var_10C= dword ptr -10Ch
Dst= byte ptr -108h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 114h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+114h+var_4], eax
mov	eax, [esp+114h+arg_8]
push	ebx
mov	ebx, [esp+118h+arg_0]
mov	ecx, [ebx+40h]
push	ebp
mov	ebp, [esp+11Ch+arg_4]
mov	[esp+11Ch+Src],	0
cmp	dword ptr [ecx+8], 0
push	esi
mov	[esp+120h+var_114], eax
jnz	short loc_5FA46B
mov	eax, [ebx+3Ch]
call	sub_40B040
jmp	short loc_5FA476

loc_5FA46B:
mov	eax, ecx
mov	edx, [eax+8]
mov	eax, [eax]
mov	eax, [eax+edx*4-4]

loc_5FA476:
mov	ecx, [eax+18h]
test	ecx, ecx
jz	short loc_5FA490
mov	edx, [ecx]
mov	eax, [edx+30h]
call	eax
test	eax, eax
jz	short loc_5FA490
mov	eax, [eax+20h]
add	eax, 8
jmp	short loc_5FA492

loc_5FA490:
xor	eax, eax

loc_5FA492:
mov	esi, [esp+120h+Src]
push	edi
cmp	esi, eax
jz	short loc_5FA4CF
push	eax
mov	[esp+128h+var_10C], esi
call	sub_1172180
add	esp, 4
mov	[esp+124h+Src],	eax
test	esi, esi
jz	short loc_5FA4CF
movzx	edi, word ptr [esi-2]
add	esi, 0FFFFFFF8h
push	esi		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA4CF
lea	ecx, [esp+124h+var_10C]
push	ecx
mov	eax, edi
call	sub_1171F60

loc_5FA4CF:
mov	edx, [ebx+40h]
cmp	dword ptr [edx+8], 0
jnz	short loc_5FA4E2
mov	eax, [ebx+3Ch]
call	sub_40B040
jmp	short loc_5FA4ED

loc_5FA4E2:
mov	eax, edx
mov	ecx, [eax+8]
mov	edx, [eax]
mov	eax, [edx+ecx*4-4]

loc_5FA4ED:
lea	edi, [eax+2Ch]
mov	esi, offset aAsset_0 ; "Asset"
call	sub_40D340
xor	edi, edi
cmp	eax, edi
jz	loc_5FA5C3
mov	eax, [eax+18h]
add	eax, 8
cmp	eax, edi
jz	loc_5FA5C3
push	offset aTrue_3	; "TRUE"
push	eax		; char *
call	__stricmp
add	esp, 8
test	eax, eax
jnz	loc_5FA5C3
mov	eax, [esp+124h+Src]
push	eax		; Src
lea	ecx, [esp+128h+Dst]
push	104h		; SizeInBytes
push	ecx		; Dst
call	_strcpy_s
lea	edx, [esp+130h+Dst]
push	edx
call	sub_110FDF0
add	esp, 10h
lea	esi, [esp+124h+Dst]
call	sub_11104F0
test	al, al
jz	short loc_5FA562
add	ebx, 44h
push	ebx
call	sub_11100E0
add	esp, 4

loc_5FA562:
lea	eax, [esp+124h+Dst]
push	eax
call	sub_1172180
mov	[esp+128h+var_10C], eax
mov	eax, [esp+128h+var_114]
add	esp, 4
cmp	eax, edi
jnz	short loc_5FA581
mov	[esp+124h+var_114], edi
jmp	short loc_5FA58E

loc_5FA581:
push	eax
call	sub_1172180
add	esp, 4
mov	[esp+124h+var_114], eax

loc_5FA58E:
mov	eax, [esp+124h+arg_C]
mov	edx, [ebp+0]
mov	edx, [edx+0F4h]
push	eax
lea	ecx, [esp+128h+var_10C]
push	ecx
lea	eax, [esp+12Ch+var_114]
push	eax
mov	ecx, ebp
call	edx
lea	ecx, [esp+124h+var_114]
mov	bl, al
call	sub_41A470
lea	ecx, [esp+124h+var_10C]
call	sub_41A470
jmp	short loc_5FA626

loc_5FA5C3:
mov	eax, [esp+124h+var_114]
cmp	eax, edi
jnz	short loc_5FA5D1
mov	[esp+124h+var_114], edi
jmp	short loc_5FA5DE

loc_5FA5D1:
push	eax
call	sub_1172180
add	esp, 4
mov	[esp+124h+var_114], eax

loc_5FA5DE:
mov	ecx, [esp+124h+arg_C]
mov	eax, [ebp+0]
push	ecx
lea	edx, [esp+128h+Src]
push	edx
mov	edx, [eax+0F4h]
lea	ecx, [esp+12Ch+var_114]
push	ecx
mov	ecx, ebp
call	edx
mov	bl, al
mov	eax, [esp+124h+var_114]
cmp	eax, edi
jz	short loc_5FA626
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA626
lea	eax, [esp+124h+var_114]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA626:
mov	eax, [esp+124h+Src]
cmp	eax, edi
pop	edi
jz	short loc_5FA64E
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA64E
lea	ecx, [esp+120h+Src]
push	ecx
mov	eax, esi
call	sub_1171F60

loc_5FA64E:
mov	ecx, [esp+120h+var_4]
pop	esi
pop	ebp
mov	al, bl
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 114h
retn	10h
sub_5FA420 endp

align 10h



sub_5FA670 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, eax
lea	eax, [esp+8+var_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
add	eax, 3Ch
call	sub_AE2790
test	al, al
jz	short loc_5FA6E8
test	edi, edi
jnz	short loc_5FA693
mov	[esp+8+arg_0], edi
jmp	short loc_5FA6A0

loc_5FA693:
push	edi
call	sub_1172180
add	esp, 4
mov	[esp+8+arg_0], eax

loc_5FA6A0:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+var_4]
mov	edx, [esi]
mov	edx, [edx+0F8h]
push	ebx
push	eax
push	ecx
lea	eax, [esp+14h+arg_0]
push	eax
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+0Ch+arg_0]
test	eax, eax
jz	short loc_5FA6E5
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA6E5
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA6E5:
mov	al, bl
pop	ebx

loc_5FA6E8:
pop	esi
pop	ecx
retn	8
sub_5FA670 endp

align 10h



sub_5FA6F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, eax
lea	eax, [esp+8+var_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
add	eax, 3Ch
call	sub_AE27F0
test	al, al
jz	short loc_5FA768
test	edi, edi
jnz	short loc_5FA713
mov	[esp+8+arg_0], edi
jmp	short loc_5FA720

loc_5FA713:
push	edi
call	sub_1172180
add	esp, 4
mov	[esp+8+arg_0], eax

loc_5FA720:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+var_4]
mov	edx, [esi]
mov	edx, [edx+0FCh]
push	ebx
push	eax
push	ecx
lea	eax, [esp+14h+arg_0]
push	eax
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+0Ch+arg_0]
test	eax, eax
jz	short loc_5FA765
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA765
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA765:
mov	al, bl
pop	ebx

loc_5FA768:
pop	esi
pop	ecx
retn	8
sub_5FA6F0 endp

align 10h



sub_5FA770 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, eax
lea	eax, [esp+8+var_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
add	eax, 3Ch
call	sub_AE2850
test	al, al
jz	short loc_5FA7E8
test	edi, edi
jnz	short loc_5FA793
mov	[esp+8+arg_0], edi
jmp	short loc_5FA7A0

loc_5FA793:
push	edi
call	sub_1172180
add	esp, 4
mov	[esp+8+arg_0], eax

loc_5FA7A0:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+var_4]
mov	edx, [esi]
mov	edx, [edx+100h]
push	ebx
push	eax
push	ecx
lea	eax, [esp+14h+arg_0]
push	eax
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+0Ch+arg_0]
test	eax, eax
jz	short loc_5FA7E5
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA7E5
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA7E5:
mov	al, bl
pop	ebx

loc_5FA7E8:
pop	esi
pop	ecx
retn	8
sub_5FA770 endp

align 10h



sub_5FA7F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, eax
lea	eax, [esp+8+var_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
add	eax, 3Ch
call	sub_AE28B0
test	al, al
jz	short loc_5FA868
test	edi, edi
jnz	short loc_5FA813
mov	[esp+8+arg_0], edi
jmp	short loc_5FA820

loc_5FA813:
push	edi
call	sub_1172180
add	esp, 4
mov	[esp+8+arg_0], eax

loc_5FA820:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+var_4]
mov	edx, [esi]
mov	edx, [edx+104h]
push	ebx
push	eax
push	ecx
lea	eax, [esp+14h+arg_0]
push	eax
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+0Ch+arg_0]
test	eax, eax
jz	short loc_5FA865
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA865
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA865:
mov	al, bl
pop	ebx

loc_5FA868:
pop	esi
pop	ecx
retn	8
sub_5FA7F0 endp

align 10h



sub_5FA870 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
push	edi
add	eax, 3Ch
lea	edi, [esp+10h+var_4]
mov	esi, ecx
call	sub_AE2910
test	al, al
jz	short loc_5FA8E7
test	ebx, ebx
jnz	short loc_5FA894
mov	[esp+10h+arg_0], ebx
jmp	short loc_5FA8A1

loc_5FA894:
push	ebx
call	sub_1172180
add	esp, 4
mov	[esp+10h+arg_0], eax

loc_5FA8A1:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+var_4]
mov	eax, [esi]
push	ecx
push	edx
mov	edx, [eax+108h]
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+10h+arg_0]
test	eax, eax
jz	short loc_5FA8E5
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA8E5
lea	eax, [esp+10h+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA8E5:
mov	al, bl

loc_5FA8E7:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8
sub_5FA870 endp

align 10h



sub_5FA8F0 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, eax
lea	eax, [esp+8+var_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
add	eax, 3Ch
call	sub_AE2980
test	al, al
jz	short loc_5FA96B
test	edi, edi
jnz	short loc_5FA913
mov	[esp+8+arg_0], edi
jmp	short loc_5FA920

loc_5FA913:
push	edi
call	sub_1172180
add	esp, 4
mov	[esp+8+arg_0], eax

loc_5FA920:
mov	eax, [esp+8+arg_4]
fld	[esp+8+var_4]
mov	edx, [esi]
mov	edx, [edx+10Ch]
push	ebx
push	eax
push	ecx
lea	ecx, [esp+14h+arg_0]
fstp	[esp+14h+var_14]
push	ecx
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+0Ch+arg_0]
test	eax, eax
jz	short loc_5FA968
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA968
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FA968:
mov	al, bl
pop	ebx

loc_5FA96B:
pop	esi
pop	ecx
retn	8
sub_5FA8F0 endp




sub_5FA970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, ecx
test	eax, eax
jnz	short loc_5FA97F
mov	[esp+0Ch+var_4], eax
jmp	short loc_5FA98C

loc_5FA97F:
push	eax
call	sub_1172180
add	esp, 4
mov	[esp+0Ch+var_4], eax

loc_5FA98C:
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [esi]
mov	eax, [eax+0D8h]
push	ecx
push	0
lea	edx, [esp+14h+var_4]
push	edx
mov	ecx, esi
call	eax
mov	bl, al
mov	eax, [esp+0Ch+var_4]
test	eax, eax
jz	short loc_5FA9CD
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FA9CD
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	eax, esi
call	sub_1171F60

loc_5FA9CD:
pop	esi
mov	al, bl
pop	ebx
pop	ecx
retn	4
sub_5FA970 endp

align 10h



sub_5FA9E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, eax
push	edi
lea	eax, [esp+10h+arg_0]
mov	edi, ecx
push	eax
mov	eax, edi
call	sub_125C910
test	al, al
jnz	short loc_5FAA07
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_5FAA07:
mov	eax, [esp+10h+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_5FAA2E
test	ebx, ebx
jnz	short loc_5FAA1C
push	ebp
mov	[esp+14h+arg_4], ebx
push	ebx
jmp	short loc_5FAA53

loc_5FAA1C:
push	ebx
call	sub_1172180
add	esp, 4
push	ebp
mov	[esp+14h+arg_4], eax
push	0
jmp	short loc_5FAA53

loc_5FAA2E:
lea	ecx, [edi+1Ch]
mov	edi, eax
call	sub_AE3830
mov	edi, eax
test	ebx, ebx
jnz	short loc_5FAA44
mov	[esp+10h+arg_4], ebx
jmp	short loc_5FAA51

loc_5FAA44:
push	ebx
call	sub_1172180
add	esp, 4
mov	[esp+10h+arg_4], eax

loc_5FAA51:
push	ebp
push	edi

loc_5FAA53:
mov	edx, [esi]
mov	edx, [edx+0D4h]
lea	eax, [esp+18h+arg_4]
push	eax
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+10h+arg_4]
test	eax, eax
jz	short loc_5FAA8D
movzx	esi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FAA8D
lea	eax, [esp+10h+arg_4]
push	eax
mov	eax, esi
call	sub_1171F60

loc_5FAA8D:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
retn	8
sub_5FA9E0 endp

align 10h



sub_5FAAA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
cmp	edi, [esi+4]
jz	loc_5FAB64
push	ebx
push	ebp
test	edi, edi
jbe	short loc_5FAB2A
call	sub_5FB570
mov	ebp, eax
xor	eax, eax
mov	[esp+14h+var_4], eax
cmp	[esi+8], eax
jbe	short loc_5FAB2C
lea	esp, [esp+0]

loc_5FAAD0:
mov	esi, [esi]
lea	ebx, ds:0[eax*4]
mov	edi, [ebx+ebp]
add	esi, ebx
cmp	edi, [esi]
jz	short loc_5FAB10
test	edi, edi
jz	short loc_5FAAFD
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5FAAFD
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5FAAFD:
mov	esi, [esi]
mov	[ebx+ebp], esi
test	esi, esi
jz	short loc_5FAB10
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_5FAB10:
mov	eax, [esp+14h+var_4]
mov	ecx, [esp+14h+arg_0]
inc	eax
mov	[esp+14h+var_4], eax
mov	esi, ecx
cmp	eax, [ecx+8]
jb	short loc_5FAAD0
mov	edi, [esp+14h+arg_4]
jmp	short loc_5FAB2C

loc_5FAB2A:
xor	ebp, ebp

loc_5FAB2C:
mov	eax, [esi]
test	eax, eax
jz	short loc_5FAB5D
mov	edx, [eax-4]
lea	ebx, [eax-4]
push	offset sub_429100
push	edx
push	4
push	eax
call	$LN21_0
test	ebx, ebx
jz	short loc_5FAB5D
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	ebx
call	eax

loc_5FAB5D:
mov	[esi], ebp
pop	ebp
mov	[esi+4], edi
pop	ebx

loc_5FAB64:
pop	edi
pop	esi
pop	ecx
retn	8
sub_5FAAA0 endp

align 10h



sub_5FAB70 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	eax, [esi+4]
push	edi
cmp	[esi+8], eax
jnz	short loc_5FAB95
test	eax, eax
jbe	short loc_5FAB89
add	eax, eax
jmp	short loc_5FAB8E

loc_5FAB89:
mov	eax, 1

loc_5FAB8E:
push	eax
push	esi
call	sub_5FAAA0

loc_5FAB95:
mov	eax, [esi+8]
mov	ecx, [esi]
lea	edi, [ecx+eax*4]
inc	eax
mov	[esi+8], eax
mov	esi, [edi]
cmp	esi, [ebx]
jz	short loc_5FABDA
test	esi, esi
jz	short loc_5FABC2
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5FABC2
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_5FABC2:
mov	eax, [ebx]
mov	[edi], eax
test	eax, eax
jz	short loc_5FABDA
pop	edi
pop	esi
add	eax, 4
pop	ebx
mov	[esp+arg_0], eax
jmp	ds:InterlockedIncrement

loc_5FABDA:
pop	edi
pop	esi
pop	ebx
retn	4
sub_5FAB70 endp




sub_5FABE0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	edx, [ebp+30h]
xor	eax, eax
push	esi
test	edx, edx
jbe	short loc_5FAC05
mov	ebx, [edi+8]
mov	ecx, [ebp+28h]

loc_5FABF6:
mov	esi, [ecx]
cmp	[esi+8], ebx
jz	short loc_5FAC47
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_5FABF6

loc_5FAC05:
mov	[esp+0Ch+arg_0], edi
test	edi, edi
jz	short loc_5FAC17
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_5FAC17:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
lea	eax, [ebp+28h]
call	sub_5FAB70
test	edi, edi
jz	short loc_5FAC3F
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5FAC3F
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_5FAC3F:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4

loc_5FAC47:
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	4
sub_5FABE0 endp

align 10h



sub_5FAC50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_5FAC80
test	[esp+4+arg_0], 1
jz	short loc_5FAC77
test	esi, esi
jz	short loc_5FAC77
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	18h
push	3
push	esi
call	eax

loc_5FAC77:
mov	eax, esi
pop	esi
retn	4
sub_5FAC50 endp

align 10h



sub_5FAC80 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [ebp+0Ch]
push	esi
call	sub_5FAED0
mov	eax, [esi]
test	eax, eax
jz	short loc_5FACC2
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_40AC00
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_5FACC2
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_5FACC2:
mov	eax, [ebp+8]
mov	ebx, ds:InterlockedDecrement
lea	esi, [ebp+8]
test	eax, eax
jz	short loc_5FACEB
push	edi
movzx	edi, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebx ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FACEA
push	esi
mov	eax, edi
call	sub_1171F60

loc_5FACEA:
pop	edi

loc_5FACEB:		; lpAddend
push	offset Addend
mov	dword ptr [ebp+0], offset off_154EE18
call	ebx ; InterlockedDecrement
pop	esi
pop	ebp
pop	ebx
retn	4
sub_5FAC80 endp

align 10h



sub_5FAD00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
cmp	ebx, [esi+4]
jz	loc_5FADA9
push	ebp
push	edi
test	ebx, ebx
jbe	short loc_5FAD6E
mov	edi, ebx
call	sub_5FB570
xor	ebp, ebp
mov	edi, eax
cmp	[esi+8], ebp
jbe	short loc_5FAD70
lea	esp, [esp+0]

loc_5FAD30:
mov	esi, [esi]
lea	ebx, ds:0[ebp*4]
mov	ecx, [ebx+edi]
add	esi, ebx
cmp	ecx, [esi]
jz	short loc_5FAD5C
test	ecx, ecx
jz	short loc_5FAD4D
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx

loc_5FAD4D:
mov	ecx, [esi]
mov	[ebx+edi], ecx
test	ecx, ecx
jz	short loc_5FAD5C
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_5FAD5C:
mov	eax, [esp+10h+arg_0]
inc	ebp
mov	esi, eax
cmp	ebp, [eax+8]
jb	short loc_5FAD30
mov	ebx, [esp+10h+arg_4]
jmp	short loc_5FAD70

loc_5FAD6E:
xor	edi, edi

loc_5FAD70:
mov	eax, [esi]
test	eax, eax
jz	short loc_5FADA2
mov	ecx, [eax-4]
lea	ebp, [eax-4]
push	offset sub_40AC00
push	ecx
push	4
push	eax
call	$LN21_0
test	ebp, ebp
jz	short loc_5FADA2
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	ebp
call	edx

loc_5FADA2:
mov	[esi], edi
pop	edi
mov	[esi+4], ebx
pop	ebp

loc_5FADA9:
pop	esi
pop	ebx
retn	8
sub_5FAD00 endp

align 10h



sub_5FADB0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FADE0
test	[esp+4+arg_0], 1
jz	short loc_5FADD6
test	edi, edi
jz	short loc_5FADD6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	34h
push	3
push	edi
call	eax

loc_5FADD6:
mov	eax, edi
pop	edi
retn	4
sub_5FADB0 endp

align 10h



sub_5FADE0 proc	near
push	ebp
push	esi
lea	esi, [edi+28h]
push	esi
call	sub_426DB0
mov	eax, [esi]
test	eax, eax
jz	short loc_5FAE1D
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_429100
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_5FAE1D
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_5FAE1D:
lea	esi, [edi+18h]
mov	dword ptr [esi], offset	off_15CA5B8
call	sub_418AE0
mov	dword ptr [esi], offset	off_15CA5CC
call	sub_418AE0
mov	esi, [esi+8]
test	esi, esi
jz	short loc_5FAE50
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_5FAE50:
lea	esi, [edi+0Ch]
push	esi
call	sub_5FAED0
mov	eax, [esi]
test	eax, eax
jz	short loc_5FAE8B
mov	ecx, [eax-4]
lea	esi, [eax-4]
push	offset sub_40AC00
push	ecx
push	4
push	eax
call	$LN21_0
test	esi, esi
jz	short loc_5FAE8B
mov	edx, dword_1889574
mov	ecx, [edx]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0FFFFFFFFh
push	4
push	esi
call	edx

loc_5FAE8B:
mov	eax, [edi+8]
mov	ebp, ds:InterlockedDecrement
lea	esi, [edi+8]
test	eax, eax
jz	short loc_5FAEB4
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ebp ; InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FAEB3
push	esi
mov	eax, ebx
call	sub_1171F60

loc_5FAEB3:
pop	ebx

loc_5FAEB4:		; lpAddend
push	offset Addend
mov	dword ptr [edi], offset	off_154EE18
call	ebp ; InterlockedDecrement
pop	esi
pop	ebp
retn
sub_5FADE0 endp

align 10h



sub_5FAED0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
xor	edi, edi
cmp	[ebx+4], edi
jbe	short loc_5FAF0C
push	esi
mov	edi, edi

loc_5FAEE0:
mov	eax, [ebx]
mov	ecx, [eax+edi*4]
lea	esi, [eax+edi*4]
test	ecx, ecx
jz	short loc_5FAEF9
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax
mov	dword ptr [esi], 0

loc_5FAEF9:
inc	edi
cmp	edi, [ebx+4]
jb	short loc_5FAEE0
pop	esi
pop	edi
mov	dword ptr [ebx+8], 0
pop	ebx
retn	4

loc_5FAF0C:
mov	[ebx+8], edi
pop	edi
pop	ebx
retn	4
sub_5FAED0 endp

align 10h



sub_5FAF20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, dword_1889574
push	0
push	0FFFFFFFFh
push	0
push	0
mov	dword ptr [esi], offset	off_15CA5CC
mov	dword ptr [esi+4], 25h
mov	dword ptr [esi+0Ch], 0
mov	ecx, [eax]
push	5
lea	eax, [esp+1Ch+var_8]
push	eax
mov	[esp+20h+var_8], 4
mov	[esp+20h+var_4], 94h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+20h+var_4]
push	eax
call	edx
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
mov	eax, esi
add	esp, 14h
retn
sub_5FAF20 endp

align 10h



sub_5FAF90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA5B8
call	sub_418AE0
mov	dword ptr [esi], offset	off_15CA5CC
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5FAFC4
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5FAFC4:
test	[esp+4+arg_0], 1
jz	short loc_5FAFDF
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5FAFDF:
mov	eax, esi
pop	esi
retn	4
sub_5FAF90 endp

align 10h



sub_5FAFF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	byte ptr [esi+8], 0
call	sub_410460
pop	esi
retn	4
sub_5FAFF0 endp

align 10h



sub_5FB010 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA5CC
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5FB039
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5FB039:
test	[esp+4+arg_0], 1
jz	short loc_5FB054
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5FB054:
mov	eax, esi
pop	esi
retn	4
sub_5FB010 endp

align 10h



sub_5FB060 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
mov	dl, [esp+arg_8]
mov	[eax+4], ecx
mov	[eax+8], dl
retn	0Ch
sub_5FB060 endp

align 10h



sub_5FB080 proc	near
push	ebx
push	ebp
mov	ebp, ds:InterlockedIncrement
push	esi
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	esi, eax
mov	dword ptr [edi], offset	off_154EE18
mov	[edi+4], ebx
call	ebp ; InterlockedIncrement
mov	dword ptr [edi], offset	off_15CA5B0
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_5FB0AF
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ebp ; InterlockedIncrement

loc_5FB0AF:
mov	eax, [esi]
mov	[edi+8], eax
lea	esi, [edi+18h]
mov	[edi+0Ch], ebx
mov	[edi+10h], ebx
mov	[edi+14h], ebx
call	sub_5FAF20
mov	dword ptr [esi], offset	off_15CA5B8
pop	esi
pop	ebp
mov	[edi+28h], ebx
mov	[edi+2Ch], ebx
mov	[edi+30h], ebx
mov	eax, edi
pop	ebx
retn
sub_5FB080 endp

align 10h



sub_5FB0E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA5E0
call	sub_418AE0
mov	dword ptr [esi], offset	off_15CA5F4
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5FB114
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5FB114:
test	[esp+4+arg_0], 1
jz	short loc_5FB12F
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5FB12F:
mov	eax, esi
pop	esi
retn	4
sub_5FB0E0 endp

align 10h



sub_5FB140 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 14h
mov	eax, dword_1889574
mov	ecx, [eax]
push	esi
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+2Ch+var_14]
push	eax
mov	[esp+30h+var_14], 4
mov	[esp+30h+var_10], 0Ch
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+30h+var_10]
push	eax
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_5FB194
lea	ecx, [esp+18h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+1Ch+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_5FB194:
mov	dword ptr [esi+8], 0
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_5FB1B0
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax
mov	dword ptr [esi+8], 0

loc_5FB1B0:
mov	eax, esi
pop	esi
add	esp, 14h
retn
sub_5FB140 endp

align 10h


; Attributes: thunk

sub_5FB1C0 proc	near
jmp	sub_5FB140
sub_5FB1C0 endp

align 10h



sub_5FB1D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_5FB1EA
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
mov	dword ptr [esi+8], 0

loc_5FB1EA:
test	esi, esi
jz	short loc_5FB20F
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_5FB1FC
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx

loc_5FB1FC:
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_5FB20F:
pop	esi
retn	4
sub_5FB1D0 endp

align 10h



sub_5FB220 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA5F4
call	sub_418AE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_5FB249
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5FB249:
test	[esp+4+arg_0], 1
jz	short loc_5FB264
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5FB264:
mov	eax, esi
pop	esi
retn	4
sub_5FB220 endp

align 10h



sub_5FB270 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_8]
push	esi
mov	esi, [esp+4+arg_0]
mov	[esi+4], eax
mov	eax, [esi+8]
cmp	eax, ecx
jz	short loc_5FB2A9
test	eax, eax
jz	short loc_5FB298
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
call	eax
mov	ecx, [esp+4+arg_8]

loc_5FB298:
mov	[esi+8], ecx
test	ecx, ecx
jz	short loc_5FB2B4
mov	edx, [ecx]
mov	eax, [edx]
call	eax
mov	ecx, [esp+4+arg_8]

loc_5FB2A9:
test	ecx, ecx
jz	short loc_5FB2B4
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax

loc_5FB2B4:
pop	esi
retn	0Ch
sub_5FB270 endp

align 10h


; Attributes: thunk

sub_5FB2C0 proc	near
jmp	sub_41F7F0
sub_5FB2C0 endp

align 10h



sub_5FB2D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+4]
mov	dword ptr [esi], offset	off_15CA610
mov	eax, [edi]
test	eax, eax
jz	short loc_5FB300
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FB2FF
push	edi
mov	eax, ebx
call	sub_1171F60

loc_5FB2FF:
pop	ebx

loc_5FB300:
test	[esp+8+arg_0], 1
jz	short loc_5FB31A
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5FB31A:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_5FB2D0 endp

align 10h



sub_5FB330 proc	near
mov	eax, offset off_17EFCCC
retn
sub_5FB330 endp

align 10h



sub_5FB340 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+4]
mov	dword ptr [esi], offset	off_15CA610
mov	eax, [edi]
test	eax, eax
jz	short loc_5FB370
push	ebx
movzx	ebx, word ptr [eax-2]
lea	ecx, [eax-8]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_5FB36F
push	edi
mov	eax, ebx
call	sub_1171F60

loc_5FB36F:
pop	ebx

loc_5FB370:
test	[esp+8+arg_0], 1
jz	short loc_5FB38A
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	8
push	3
push	esi
call	eax

loc_5FB38A:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_5FB340 endp

align 10h



sub_5FB3A0 proc	near
mov	eax, offset off_17EFCD4
retn
sub_5FB3A0 endp

align 10h



sub_5FB3B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_121FF00
test	[esp+4+arg_0], 1
jz	short loc_5FB3D6
test	esi, esi
jz	short loc_5FB3D6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax

loc_5FB3D6:
mov	eax, esi
pop	esi
retn	4
sub_5FB3B0 endp

align 10h



sub_5FB3E0 proc	near
mov	eax, offset off_17EFCDC
retn
sub_5FB3E0 endp

align 10h



sub_5FB3F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AE3EE0
test	[esp+4+arg_0], 1
jz	short loc_5FB416
test	esi, esi
jz	short loc_5FB416
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5FB416:
mov	eax, esi
pop	esi
retn	4
sub_5FB3F0 endp

align 10h



sub_5FB420 proc	near
mov	eax, offset off_17EFCE4
retn
sub_5FB420 endp

align 10h



sub_5FB430 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AE3A30
test	[esp+4+arg_0], 1
jz	short loc_5FB456
test	esi, esi
jz	short loc_5FB456
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1Ch
push	3
push	esi
call	eax

loc_5FB456:
mov	eax, esi
pop	esi
retn	4
sub_5FB430 endp

align 10h



sub_5FB460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	edx, edx
mov	eax, ebp
div	dword ptr [esi+4]
mov	eax, [esi+8]
push	edi
mov	ebx, edx
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_5FB48B
lea	ebx, [ebx+0]

loc_5FB480:
cmp	ebp, [edi+4]
jz	short loc_5FB4DE
mov	edi, [edi]
test	edi, edi
jnz	short loc_5FB480

loc_5FB48B:
mov	edx, [esi]
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
push	ecx
mov	ecx, [esp+0Ch+arg_8]
mov	edi, eax
mov	eax, esp
mov	[eax], ecx
mov	ecx, [esp+0Ch+arg_8]
test	ecx, ecx
jz	short loc_5FB4AD
mov	edx, [ecx]
mov	eax, [edx]
call	eax

loc_5FB4AD:
mov	edx, [esi]
mov	eax, [edx+4]
push	ebp
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esi+8]
mov	edx, [ecx+ebx*4]
mov	[edi], edx
mov	eax, [esi+8]
mov	[eax+ebx*4], edi
inc	dword ptr [esi+0Ch]

loc_5FB4C9:
mov	ecx, [esp+0Ch+arg_4]

loc_5FB4CD:
test	ecx, ecx
jz	short loc_5FB4D8
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax

loc_5FB4D8:
pop	edi
pop	ebp
pop	ebx
retn	8

loc_5FB4DE:
mov	eax, [edi+8]
mov	ecx, [esp+0Ch+arg_4]
cmp	eax, ecx
jz	short loc_5FB4CD
test	eax, eax
jz	short loc_5FB4FA
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
call	eax
mov	ecx, [esp+0Ch+arg_4]

loc_5FB4FA:
mov	[edi+8], ecx
mov	ecx, [esp+0Ch+arg_4]
test	ecx, ecx
jz	short loc_5FB4D8
mov	edx, [ecx]
mov	eax, [edx]
call	eax
jmp	short loc_5FB4C9
sub_5FB460 endp

align 10h



sub_5FB510 proc	near

arg_0= dword ptr  4

xor	edx, edx
mov	eax, edi
div	dword ptr [ecx+4]
mov	eax, [ecx+8]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [eax+edx*4]
test	esi, esi
jz	short loc_5FB532

loc_5FB527:
cmp	edi, [esi+4]
jz	short loc_5FB539
mov	esi, [esi]
test	esi, esi
jnz	short loc_5FB527

loc_5FB532:
pop	esi
xor	al, al
pop	ebx
retn	4

loc_5FB539:
mov	ecx, [ebx]
cmp	ecx, [esi+8]
jz	short loc_5FB55A
test	ecx, ecx
jz	short loc_5FB54B
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax

loc_5FB54B:
mov	ecx, [esi+8]
mov	[ebx], ecx
test	ecx, ecx
jz	short loc_5FB55A
mov	edx, [ecx]
mov	eax, [edx]
call	eax

loc_5FB55A:
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_5FB510 endp

align 10h



sub_5FB570 proc	near
xor	ecx, ecx
mov	eax, edi
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_5FB5B3
push	esi
push	offset sub_41E200
push	edi
lea	esi, [eax+4]
push	4
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
retn

loc_5FB5B3:
xor	eax, eax
retn
sub_5FB570 endp

align 10h



sub_5FB5C0 proc	near
mov	eax, [esi]
test	eax, eax
jz	short loc_5FB5DA
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_5FB5DA:
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0Ch
push	3
push	esi
call	eax
mov	eax, esi
retn
sub_5FB5C0 endp

align 10h



sub_5FB600 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
call	ds:InterlockedDecrement
test	[esp+4+arg_0], 1
jz	short loc_5FB631
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	94h
push	3
push	esi
call	eax

loc_5FB631:
mov	eax, esi
pop	esi
retn	4
sub_5FB600 endp

align 10h



sub_5FB640 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+24h]
mov	dword ptr [esi], offset	off_1551248
test	ecx, ecx
jz	short loc_5FB658
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5FB658:
call	sub_41A8E0
mov	ecx, esi
call	sub_123E740
test	[esp+4+arg_0], 1
jz	short loc_5FB67E
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	3Ch
push	3
push	esi
call	eax

loc_5FB67E:
mov	eax, esi
pop	esi
retn	4
sub_5FB640 endp

align 10h



sub_5FB690 proc	near
mov	eax, offset off_17EFCEC
retn
sub_5FB690 endp

align 10h



sub_5FB6A0 proc	near
mov	eax, [ecx+24h]
test	eax, eax
jz	short loc_5FB6AB
mov	eax, [eax+0Ch]
retn

loc_5FB6AB:
mov	eax, [ecx+30h]
retn
sub_5FB6A0 endp

align 10h



sub_5FB6B0 proc	near
mov	eax, [ecx+24h]
test	eax, eax
jz	short loc_5FB6BB
mov	eax, [eax+10h]
retn

loc_5FB6BB:
mov	eax, [ecx+34h]
retn
sub_5FB6B0 endp

align 10h



sub_5FB6C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AE1EF0
test	[esp+4+arg_0], 1
jz	short loc_5FB6E6
test	esi, esi
jz	short loc_5FB6E6
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	6Ch
push	3
push	esi
call	eax

loc_5FB6E6:
mov	eax, esi
pop	esi
retn	4
sub_5FB6C0 endp

align 10h



sub_5FB6F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_5FB71B
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5FB714
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_5FB714:
mov	dword ptr [esi+8], 0

loc_5FB71B:
call	sub_410460
pop	edi
pop	esi
retn	4
sub_5FB6F0 endp

align 10h



sub_5FB730 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CA734
jz	short loc_5FB753
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	10h
push	3
push	esi
call	eax

loc_5FB753:
mov	eax, esi
pop	esi
retn	4
sub_5FB730 endp

align 10h



sub_5FB760 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12904E0
test	[esp+4+arg_0], 1
jz	short loc_5FB789
test	esi, esi
jz	short loc_5FB789
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	178h
push	3
push	esi
call	eax

loc_5FB789:
mov	eax, esi
pop	esi
retn	4
sub_5FB760 endp

align 10h



sub_5FB790 proc	near
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_5FB79E
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_5FB79E:
push	esi
mov	esi, [edi+13Ch]
test	esi, esi
jz	short loc_5FB7C3
mov	eax, esi
call	sub_1290410
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	40h
push	3
push	esi
call	eax

loc_5FB7C3:
lea	ecx, [edi+10h]
call	sub_46B550
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	140h
push	3
push	edi
call	eax
mov	eax, edi
pop	esi
retn
sub_5FB790 endp

align 10h



sub_5FB7F0 proc	near
mov	ecx, [eax]
test	ecx, ecx
setnz	al
push	ebp
test	al, al
jz	short loc_5FB820
xor	edx, edx
xor	eax, eax
cmp	dx, [esi+0Ah]
jnb	short loc_5FB820
mov	ebp, [esi+4]
lea	esp, [esp+0]

loc_5FB810:
movzx	edx, ax
cmp	[ebp+edx*4+0], ecx
jz	short loc_5FB825
inc	eax
cmp	ax, [esi+0Ah]
jb	short loc_5FB810

loc_5FB820:
or	eax, 0FFFFFFFFh
pop	ebp
retn

loc_5FB825:
push	ebx
push	edi
movzx	edi, ax
mov	ebx, [ebp+edi*4+0]
test	ebx, ebx
jz	short loc_5FB851
lea	eax, [ebx+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5FB849
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_5FB849:
mov	dword ptr [ebp+edi*4+0], 0

loc_5FB851:
movzx	eax, word ptr [esi+0Ah]
movzx	edx, ax
mov	ecx, 0FFFFh
add	[esi+0Ch], cx
dec	edx
cmp	edi, edx
jnz	short loc_5FB86B
dec	eax
mov	[esi+0Ah], ax

loc_5FB86B:
mov	eax, edi
pop	edi
pop	ebx
pop	ebp
retn
sub_5FB7F0 endp

align 10h



sub_5FB880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
movzx	eax, word ptr [ebx+0Ch]
movzx	ecx, word ptr [ebx+0Ah]
cmp	ax, cx
jz	loc_5FB9D0
push	ebp
xor	ebp, ebp
push	esi
push	edi
cmp	ax, bp
jz	short loc_5FB8E5
xor	eax, eax
mov	[esp+14h+arg_0], ebp
cmp	ax, cx
jnb	short loc_5FB8E5
lea	esp, [esp+0]

loc_5FB8B0:
mov	eax, [ebx+4]
movzx	ecx, bp
mov	esi, [eax+ecx*4]
lea	edi, [eax+ecx*4]
test	esi, esi
setnz	cl
test	cl, cl
jz	short loc_5FB8DE
movzx	edx, word ptr [esp+14h+arg_0]
cmp	[eax+edx*4], esi
lea	eax, [eax+edx*4]
jz	short loc_5FB8DA
push	edi
mov	edi, eax
call	sub_418760

loc_5FB8DA:
inc	[esp+14h+arg_0]

loc_5FB8DE:
inc	ebp
cmp	bp, [ebx+0Ah]
jb	short loc_5FB8B0

loc_5FB8E5:
movzx	eax, word ptr [ebx+0Ch]
mov	esi, [ebx+4]
mov	[esp+14h+arg_0], esi
mov	[ebx+0Ah], ax
mov	[ebx+8], ax
test	ax, ax
jbe	short loc_5FB976
movzx	edi, ax
call	sub_5FB570
mov	[ebx+4], eax
xor	eax, eax
xor	ecx, ecx
mov	[esp+14h+var_4], eax
cmp	cx, [ebx+0Ah]
jnb	short loc_5FB97D

loc_5FB916:
mov	edi, [ebx+4]
mov	edx, [esp+14h+arg_0]
movzx	esi, ax
add	esi, esi
add	esi, esi
mov	ebp, [edi+esi]
add	edi, esi
cmp	ebp, [esi+edx]
jz	short loc_5FB961
test	ebp, ebp
jz	short loc_5FB94A
lea	eax, [ebp+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5FB94A
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax

loc_5FB94A:
mov	ecx, [esp+14h+arg_0]
mov	esi, [esi+ecx]
mov	[edi], esi
test	esi, esi
jz	short loc_5FB961
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_5FB961:
mov	eax, [esp+14h+var_4]
inc	eax
mov	[esp+14h+var_4], eax
cmp	ax, [ebx+0Ah]
jb	short loc_5FB916
mov	esi, [esp+14h+arg_0]
jmp	short loc_5FB97D

loc_5FB976:
mov	dword ptr [ebx+4], 0

loc_5FB97D:
test	esi, esi
jz	short loc_5FB9CD
mov	ebx, [esi-4]
lea	ebp, [esi-4]
lea	edi, [esi+ebx*4]
sub	ebx, 1
js	short loc_5FB9B6
nop

loc_5FB990:
mov	esi, [edi-4]
sub	edi, 4
test	esi, esi
jz	short loc_5FB9B1
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_5FB9B1
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_5FB9B1:
sub	ebx, 1
jns	short loc_5FB990

loc_5FB9B6:
test	ebp, ebp
jz	short loc_5FB9CD
mov	eax, dword_1889574
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	4
push	ebp
call	eax

loc_5FB9CD:
pop	edi
pop	esi
pop	ebp

loc_5FB9D0:
pop	ebx
pop	ecx
retn	4
sub_5FB880 endp

align 10h



sub_5FB9E0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
add	esi, 4
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi]
mov	ebx, eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_5FBA21
push	ebp
push	edi
lea	edi, [ecx+4]
mov	ebp, eax
jmp	short loc_5FBA10
align 10h

loc_5FBA10:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	ebp, 1
jnz	short loc_5FBA10
pop	edi
pop	ebp

loc_5FBA21:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_5FBA47
mov	edx, [ebx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_5FBA47:
mov	ecx, [esp+0Ch+arg_0]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD3ED0
pop	esi
pop	ebx
pop	ecx
retn	4
sub_5FB9E0 endp

align 10h



sub_5FBA70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
push	edi
lea	esi, [ebx+1Ch]
push	esi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ecx, eax
mov	eax, [esi+4]
mov	[esp+10h+var_4], ecx
test	eax, eax
jle	short loc_5FBAB3
push	ebp
mov	ebp, eax
lea	esp, [esp+0]

loc_5FBAA0:
push	edi
call	sub_5FB9E0
add	edi, 10h
sub	ebp, 1
jnz	short loc_5FBAA0
mov	ecx, [esp+14h+var_4]
pop	ebp

loc_5FBAB3:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_5FBAD4
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
shl	eax, 4
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FBAD4:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, [ebx+18h]
test	ecx, ecx
jz	short loc_5FBAED
call	sub_AD6020

loc_5FBAED:
mov	ecx, ebx
mov	dword ptr [ebx+18h], 0
call	sub_4DA650
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_5FBA70 endp

align 10h



; int __stdcall	sub_5FBB10(float, int)
sub_5FBB10 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx+18h]
fld	[esp+arg_0]
mov	edx, [esp+arg_4]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
push	edx
push	ecx
fstp	[esp+8+var_8]
call	eax
retn	8
sub_5FBB10 endp

align 10h



; int __stdcall	sub_5FBB30(float, float, int, int)
sub_5FBB30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_C]
fld	[esp+arg_4]
mov	ecx, [ecx+18h]
mov	eax, [ecx]
mov	eax, [eax+10h]
push	edx
mov	edx, [esp+4+arg_8]
push	edx
sub	esp, 8
fstp	[esp+10h+var_C]
fld	[esp+10h+arg_0]
fstp	[esp+10h+var_10]
call	eax
retn	10h
sub_5FBB30 endp

align 10h



sub_5FBB60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FBB90
test	[esp+4+arg_0], 1
jz	short loc_5FBB8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FBB8A:
mov	eax, edi
pop	edi
retn	4
sub_5FBB60 endp




sub_5FBB90 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+6Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FBBC7
mov	ecx, [esi]
push	ebp
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_5FBBC7:
push	edi
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_5FBA70
pop	esi
pop	ecx
retn
sub_5FBB90 endp

align 10h



sub_5FBBE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+54h]
call	sub_AD3ED0
lea	ecx, [esi+50h]
call	sub_4D6C60
lea	ecx, [esi+8]
call	sub_AD3ED0
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_5FBC24
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FBC24:
mov	eax, esi
pop	esi
retn	4
sub_5FBBE0 endp

align 10h



sub_5FBC30 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FBC60
test	[esp+4+arg_0], 1
jz	short loc_5FBC5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FBC5A:
mov	eax, edi
pop	edi
retn	4
sub_5FBC30 endp




sub_5FBC60 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+64h]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FBC97
mov	ecx, [esi]
push	ebp
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_5FBC97:
push	edi
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_5FBA70
pop	esi
pop	ecx
retn
sub_5FBC60 endp

align 10h



sub_5FBCB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1290200
test	[esp+4+arg_0], 1
jz	short loc_5FBCDA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FBCDA:
mov	eax, esi
pop	esi
retn	4
sub_5FBCB0 endp




sub_5FBCE0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_ADE8D0
test	[esp+4+arg_0], 1
jz	short loc_5FBD0A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FBD0A:
mov	eax, edi
pop	edi
retn	4
sub_5FBCE0 endp




sub_5FBD10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_5FBD50
test	[esp+4+arg_0], 1
jz	short loc_5FBD3B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FBD3B:
mov	eax, esi
pop	esi
retn	4
sub_5FBD10 endp

align 10h



sub_5FBD50 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
add	esi, 3Ch
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [esi+4]
mov	ebp, [esi]
mov	ecx, eax
xor	edi, edi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_5FBD9E
mov	edi, edi

loc_5FBD80:
mov	ecx, [ebp+edi*8+0]
test	ecx, ecx
jz	short loc_5FBD8D
call	sub_AD6020

loc_5FBD8D:
mov	dword ptr [ebp+edi*8+0], 0
inc	edi
cmp	edi, ebx
jl	short loc_5FBD80
mov	ecx, [esp+18h+var_4]

loc_5FBD9E:
mov	eax, [esi+8]
mov	ebp, 80000000h
mov	dword ptr [esi+4], 0
test	ebp, eax
jnz	short loc_5FBDC7
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FBDC7:
mov	ebx, [esp+18h+arg_0]
mov	dword ptr [esi], 0
mov	[esi+8], ebp
lea	esi, [ebx+30h]
push	esi
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ecx, eax
mov	eax, [esi+4]
mov	[esp+18h+var_4], ecx
test	eax, eax
jle	short loc_5FBE0F
mov	ebp, eax

loc_5FBDF7:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 4
sub	ebp, 1
jnz	short loc_5FBDF7
mov	ecx, [esp+18h+var_4]
mov	ebp, 80000000h

loc_5FBE0F:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	ebp, eax
jnz	short loc_5FBE31
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FBE31:
mov	dword ptr [esi], 0
mov	[esi+8], ebp
lea	esi, [ebx+24h]
push	esi
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	ebp, edx
jnz	short loc_5FBE73
mov	edi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*2]
mov	edx, [esi]
shl	ecx, 4
push	ecx
mov	ecx, eax
mov	eax, [edi+10h]
push	edx
call	eax

loc_5FBE73:
mov	dword ptr [esi], 0
mov	[esi+8], ebp
lea	esi, [ebx+18h]
push	esi
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ecx, eax
mov	eax, [esi+4]
mov	[esp+18h+var_4], ecx
test	eax, eax
jle	short loc_5FBEB8
mov	ebp, eax
nop

loc_5FBEA0:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	ebp, 1
jnz	short loc_5FBEA0
mov	ecx, [esp+18h+var_4]
mov	ebp, 80000000h

loc_5FBEB8:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	ebp, eax
jnz	short loc_5FBEDC
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FBEDC:
mov	dword ptr [esi], 0
mov	[esi+8], ebp
lea	esi, [ebx+0Ch]
push	esi
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	ebp, edx
jnz	short loc_5FBF1A
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_5FBF1A:
lea	ecx, [ebx+8]
mov	dword ptr [esi], 0
mov	[esi+8], ebp
call	sub_AD3ED0
mov	ecx, ebx
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_5FBD50 endp

align 10h



sub_5FBF40 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FBF70
test	[esp+4+arg_0], 1
jz	short loc_5FBF6A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FBF6A:
mov	eax, edi
pop	edi
retn	4
sub_5FBF40 endp




sub_5FBF70 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	esi
lea	esi, [edi+34h]
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
push	esi
lea	ecx, [esp+1Ch+var_11]
mov	[esp+1Ch+var_11], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FBFC6
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_5FBFC6:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, edi
call	sub_4DA650
mov	ecx, [esp+18h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 14h
retn
sub_5FBF70 endp

align 10h



sub_5FC000 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_128FF50
test	[esp+4+arg_0], 1
jz	short loc_5FC02A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FC02A:
mov	eax, esi
pop	esi
retn	4
sub_5FC000 endp




sub_5FC030 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FC060
test	[esp+4+arg_0], 1
jz	short loc_5FC05A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FC05A:
mov	eax, edi
pop	edi
retn	4
sub_5FC030 endp




sub_5FC060 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
lea	esi, [edi+1Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FC097
and	edx, 3FFFFFFFh
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_5FC097:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FC0D0
and	edx, 3FFFFFFFh
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_5FC0D0:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_5FC0E5
call	sub_AD6020

loc_5FC0E5:
lea	ecx, [edi+8]
mov	[edi+0Ch], ebx
call	sub_AD3ED0
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_5FC060 endp

align 10h



sub_5FC100 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FC130
test	[esp+4+arg_0], 1
jz	short loc_5FC12A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FC12A:
mov	eax, edi
pop	edi
retn	4
sub_5FC100 endp




sub_5FC130 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
lea	esi, [edi+34h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FC163
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_5FC163:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+28h]
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FC1A0
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*2]
shl	edx, 4
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_5FC1A0:
push	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
call	sub_5FBA70
pop	esi
pop	ebx
add	esp, 8
retn
sub_5FC130 endp

align 10h



sub_5FC1C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_129EE10
test	[esp+4+arg_0], 1
jz	short loc_5FC1EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FC1EA:
mov	eax, esi
pop	esi
retn	4
sub_5FC1C0 endp




sub_5FC1F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_5FC230
test	[esp+4+arg_0], 1
jz	short loc_5FC21B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FC21B:
mov	eax, esi
pop	esi
retn	4
sub_5FC1F0 endp

align 10h



sub_5FC230 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
add	esi, 38h
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [esi+4]
mov	ebp, [esi]
mov	ecx, eax
xor	edi, edi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_5FC27E
mov	edi, edi

loc_5FC260:
mov	ecx, [ebp+edi*4+0]
test	ecx, ecx
jz	short loc_5FC26D
call	sub_AD6020

loc_5FC26D:
mov	dword ptr [ebp+edi*4+0], 0
inc	edi
cmp	edi, ebx
jl	short loc_5FC260
mov	ecx, [esp+18h+var_4]

loc_5FC27E:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_5FC2A0
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FC2A0:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	esi, [esp+18h+arg_0]
add	esi, 2Ch
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [esi+4]
mov	ebp, [esi]
mov	ecx, eax
xor	edi, edi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_5FC2F2

loc_5FC2D4:
mov	ecx, [ebp+edi*4+0]
test	ecx, ecx
jz	short loc_5FC2E1
call	sub_AD6020

loc_5FC2E1:
mov	dword ptr [ebp+edi*4+0], 0
inc	edi
cmp	edi, ebx
jl	short loc_5FC2D4
mov	ecx, [esp+18h+var_4]

loc_5FC2F2:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_5FC314
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FC314:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	esi, [esp+18h+arg_0]
add	esi, 20h
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [esi+4]
mov	ebp, [esi]
mov	ecx, eax
xor	edi, edi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_5FC366

loc_5FC348:
mov	ecx, [ebp+edi*4+0]
test	ecx, ecx
jz	short loc_5FC355
call	sub_AD6020

loc_5FC355:
mov	dword ptr [ebp+edi*4+0], 0
inc	edi
cmp	edi, ebx
jl	short loc_5FC348
mov	ecx, [esp+18h+var_4]

loc_5FC366:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_5FC388
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FC388:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	esi, [esp+18h+arg_0]
add	esi, 14h
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [esi+4]
mov	ebp, [esi]
mov	ecx, eax
xor	edi, edi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_5FC3DE
lea	esp, [esp+0]

loc_5FC3C0:
mov	ecx, [ebp+edi*4+0]
test	ecx, ecx
jz	short loc_5FC3CD
call	sub_AD6020

loc_5FC3CD:
mov	dword ptr [ebp+edi*4+0], 0
inc	edi
cmp	edi, ebx
jl	short loc_5FC3C0
mov	ecx, [esp+18h+var_4]

loc_5FC3DE:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_5FC400
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_5FC400:
mov	edi, [esp+18h+arg_0]
add	edi, 8
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [edi+4]
mov	ebp, [edi]
mov	ecx, eax
xor	esi, esi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_5FC452

loc_5FC434:
mov	ecx, [ebp+esi*4+0]
test	ecx, ecx
jz	short loc_5FC441
call	sub_AD6020

loc_5FC441:
mov	dword ptr [ebp+esi*4+0], 0
inc	esi
cmp	esi, ebx
jl	short loc_5FC434
mov	ecx, [esp+18h+var_4]

loc_5FC452:
mov	eax, [edi+8]
mov	dword ptr [edi+4], 0
test	eax, eax
js	short loc_5FC474
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [edi]
push	eax
call	edx

loc_5FC474:
mov	ecx, [esp+18h+arg_0]
mov	dword ptr [edi], 0
mov	dword ptr [edi+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_5FC230 endp

align 10h



sub_5FC4A0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FC4D5
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_5FC4D5:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	ecx
retn
sub_5FC4A0 endp

align 10h



sub_5FC4F0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], cl
retn
sub_5FC4F0 endp

align 10h



; int __stdcall	sub_5FC500(float, int)
sub_5FC500 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esi]
mov	edx, [eax+20h]
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	ecx, esi
call	edx
fld	[esp+0Ch+arg_0]
fdiv	dword ptr [esi+0Ch]
mov	ecx, eax
dec	ecx
mov	eax, ecx
mov	[esp+0Ch+arg_4], eax
fild	[esp+0Ch+arg_4]
test	eax, eax
jge	short loc_5FC52F
fadd	ds:flt_15FCC08

loc_5FC52F:
fmulp	st(1), st
dec	ecx
fstp	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_4]
fnstcw	word ptr [esp+0Ch+arg_4]
movzx	eax, word ptr [esp+0Ch+arg_4]
fld	st
or	eax, 0C00h
mov	[esp+0Ch+arg_0], eax
fldcw	word ptr [esp+0Ch+arg_0]
fistp	[esp+0Ch+var_8]
mov	eax, dword ptr [esp+0Ch+var_8]
mov	[edi], eax
fldcw	word ptr [esp+0Ch+arg_4]
cmp	eax, ecx
jbe	short loc_5FC573
fstp	st
mov	[edi], ecx
fld1
fstp	dword ptr [ebx]
pop	ebx
add	esp, 8
retn	8

loc_5FC573:
mov	[esp+0Ch+arg_4], eax
fild	[esp+0Ch+arg_4]
test	eax, eax
jge	short loc_5FC585
fadd	ds:flt_15FCC08

loc_5FC585:
fsubp	st(1), st
fstp	dword ptr [ebx]
pop	ebx
add	esp, 8
retn	8
sub_5FC500 endp




sub_5FC590 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_128FFB0
test	[esp+4+arg_0], 1
jz	short loc_5FC5BA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FC5BA:
mov	eax, esi
pop	esi
retn	4
sub_5FC590 endp



; Attributes: bp-based frame

sub_5FC5C0 proc	near

var_44=	dword ptr -44h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 4Ch
push	esi
mov	esi, ecx
movaps	xmm0, xmmword ptr [esi]
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm0, xmm1, 4Eh
addps	xmm0, xmm1
movaps	xmm1, xmm0
lea	eax, [esp+50h+var_30]
shufps	xmm1, xmm0, 0B1h
addps	xmm1, xmm0
push	eax
lea	ecx, [esp+54h+var_40]
movaps	[esp+54h+var_30], xmm1
call	sub_4D5050
fldz
movaps	xmm1, [esp+50h+var_40]
fstp	[esp+50h+var_44]
fld	dword ptr off_17E66B4
xorps	xmm0, xmm0
movss	xmm2, [esp+50h+var_44]
movss	xmm0, xmm2
movaps	xmm2, xmm0
movaps	xmm0, [esp+50h+var_40]
fstp	[esp+50h+var_44]
movss	xmm4, [esp+50h+var_44]
fld	ds:dword_1479C58
movaps	xmm3, xmm0
fstp	[esp+50h+var_44]
cmpeqss	xmm3, xmm2
rsqrtss	xmm1, xmm1
mulss	xmm0, xmm1
mulss	xmm0, xmm1
xorps	xmm2, xmm2
movss	xmm2, xmm4
movss	xmm4, [esp+50h+var_44]
subss	xmm2, xmm0
xorps	xmm0, xmm0
movss	xmm0, xmm4
lea	ecx, [esp+50h+var_20]
mulss	xmm0, xmm1
mulss	xmm0, xmm2
push	ecx
andnps	xmm3, xmm0
lea	ecx, [esp+54h+var_10]
movaps	[esp+54h+var_20], xmm3
call	sub_4D5050
movaps	xmm0, [esp+50h+var_10]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [esi]
mulps	xmm1, xmm0
movaps	xmmword	ptr [esi], xmm1
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5FC5C0 endp

align 10h



sub_5FC6A0 proc	near

arg_0= dword ptr  4

movzx	ecx, cl
mov	edx, ecx
not	ecx
mov	eax, ecx
sar	eax, 4
and	eax, ecx
and	edx, 0Fh
and	eax, 0Fh
push	ebx
mov	ebx, [esp+4+arg_0]
test	dl, 1
jz	short loc_5FC6C2
fld	dword ptr [edi]
jmp	short loc_5FC6C8

loc_5FC6C2:
test	al, 1
jz	short loc_5FC6CA
fld	dword ptr [ebx]

loc_5FC6C8:
fstp	dword ptr [esi]

loc_5FC6CA:
test	dl, 2
jz	short loc_5FC6D4
fld	dword ptr [edi+4]
jmp	short loc_5FC6DB

loc_5FC6D4:
test	al, 2
jz	short loc_5FC6DE
fld	dword ptr [ebx+4]

loc_5FC6DB:
fstp	dword ptr [esi+4]

loc_5FC6DE:
test	dl, 4
jz	short loc_5FC6E8
fld	dword ptr [edi+8]
jmp	short loc_5FC6EF

loc_5FC6E8:
test	al, 4
jz	short loc_5FC6F2
fld	dword ptr [ebx+8]

loc_5FC6EF:
fstp	dword ptr [esi+8]

loc_5FC6F2:
test	dl, 8
jz	short loc_5FC6FF
fld	dword ptr [edi+0Ch]
pop	ebx
fstp	dword ptr [esi+0Ch]
retn

loc_5FC6FF:
test	al, 8
jz	short loc_5FC709
fld	dword ptr [ebx+0Ch]
fstp	dword ptr [esi+0Ch]

loc_5FC709:
pop	ebx
retn
sub_5FC6A0 endp

align 10h



sub_5FC710 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
cmp	bl, [ecx+edi+1]
jb	short loc_5FC71F
mov	eax, ecx
pop	ebx
retn

loc_5FC71F:
cmp	bl, [edi]
jbe	short loc_5FC752
push	ebp
push	esi
lea	esi, [ecx+1]
mov	ebp, eax
add	eax, esi

loc_5FC72C:
cdq
sub	eax, edx
sar	eax, 1
mov	cl, [eax+edi]
cmp	bl, cl
jb	short loc_5FC742
cmp	bl, [eax+edi+1]
jb	short loc_5FC750
cmp	bl, cl
jnb	short loc_5FC749

loc_5FC742:
mov	esi, eax
lea	eax, [esi+ebp]
jmp	short loc_5FC72C

loc_5FC749:
mov	ebp, eax
lea	eax, [esi+ebp]
jmp	short loc_5FC72C

loc_5FC750:
pop	esi
pop	ebp

loc_5FC752:
pop	ebx
retn
sub_5FC710 endp

align 10h



; int __stdcall	sub_5FC760(float, int, int, int)
sub_5FC760 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esi+30h]
push	ebx
push	edi
dec	ecx
xor	edx, edx
mov	edi, eax
div	ecx
mov	ebx, [esp+8+arg_4]
push	0
push	eax
mov	[ebx], eax
call	sub_4DDC50
mov	ecx, [esi+2Ch]
dec	ecx
add	esp, 8
cmp	eax, ecx
mov	[ebx], eax
jl	short loc_5FC789
mov	eax, ecx

loc_5FC789:
mov	edx, [esi+30h]
lea	ecx, [edx-1]
imul	ecx, eax
sub	edi, ecx
mov	[esp+8+arg_4], edi
mov	[ebx], eax
fild	[esp+8+arg_4]
test	edi, edi
jge	short loc_5FC7A8
fadd	ds:flt_15FCC08

loc_5FC7A8:
fadd	[esp+8+arg_0]
mov	eax, [esp+8+arg_8]
dec	edx
pop	edi
fstp	[esp+4+arg_4]
pop	ebx
fld	[esp+arg_4]
fmul	dword ptr [esi+40h]
fstp	[esp+arg_4]
fld	[esp+arg_4]
mov	[esp+arg_4], edx
mov	edx, [esp+arg_C]
fst	dword ptr [eax]
fmul	dword ptr [esi+3Ch]
fimul	[esp+arg_4]
fnstcw	word ptr [esp+arg_4]
movzx	eax, word ptr [esp+arg_4]
or	eax, 0C00h
mov	[esp+arg_0], eax
fldcw	word ptr [esp+arg_0]
fistp	[esp+arg_0]
mov	cl, byte ptr [esp+arg_0]
mov	[edx], cl
fldcw	word ptr [esp+arg_4]
retn	10h
sub_5FC760 endp

align 10h


; Attributes: bp-based frame

sub_5FC800 proc	near

var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
movaps	xmm1, xmmword ptr [ecx]
movaps	xmm0, xmmword ptr [eax]
push	esi
mov	esi, [ebp+arg_0]
lea	edx, [esp+20h+var_10]
mulss	xmm0, xmm1
push	edx
mov	ecx, esi
movaps	[esp+24h+var_10], xmm0
call	sub_4D5050
mov	eax, esi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5FC800 endp

align 10h


; Attributes: bp-based frame

sub_5FC840 proc	near

var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
movaps	xmm1, xmmword ptr [ecx]
movaps	xmm0, xmmword ptr [eax]
push	esi
mov	esi, [ebp+arg_0]
lea	edx, [esp+20h+var_10]
addss	xmm0, xmm1
push	edx
mov	ecx, esi
movaps	[esp+24h+var_10], xmm0
call	sub_4D5050
mov	eax, esi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5FC840 endp

align 10h


; Attributes: bp-based frame

sub_5FC880 proc	near

var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 1Ch
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
movaps	xmm1, xmmword ptr [ecx]
movaps	xmm0, xmmword ptr [eax]
push	esi
mov	esi, [ebp+arg_0]
lea	edx, [esp+20h+var_10]
divss	xmm0, xmm1
push	edx
mov	ecx, esi
movaps	[esp+24h+var_10], xmm0
call	sub_4D5050
mov	eax, esi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_5FC880 endp

align 10h



sub_5FC8C0 proc	near
movaps	xmm0, xmmword ptr [edi]
lea	eax, [edi+10h]
push	eax
lea	ecx, [esi+10h]
movaps	xmmword	ptr [esi], xmm0
call	sub_4D67E0
movaps	xmm0, xmmword ptr [edi+20h]
movaps	xmmword	ptr [esi+20h], xmm0
mov	eax, esi
retn
sub_5FC8C0 endp

align 10h


; Attributes: bp-based frame

sub_5FC8E0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, [ebp+arg_0]
movaps	xmm1, xmmword ptr [eax]
rcpps	xmm0, xmm1
movaps	xmm2, xmm0
mulps	xmm2, xmm1
movaps	xmm1, xmm0
mulps	xmm2, xmm0
addps	xmm1, xmm0
subps	xmm1, xmm2
movaps	xmmword	ptr [ecx], xmm1
mov	esp, ebp
pop	ebp
retn	4
sub_5FC8E0 endp

align 10h


; Attributes: bp-based frame

sub_5FC910 proc	near

var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 30h
movaps	xmm0, xmmword ptr [edi]
movaps	xmm1, xmmword ptr [esi]
movaps	xmm3, xmm0
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0D2h
shufps	xmm3, xmm0, 0C9h
mulps	xmm3, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0D2h
shufps	xmm1, xmm1, 0C9h
lea	eax, [esp+30h+var_20]
mulps	xmm2, xmm1
subps	xmm2, xmm3
shufps	xmm0, xmm0, 0FFh
push	eax
lea	ecx, [esp+34h+var_10]
movaps	[esp+34h+var_30], xmm2
movaps	[esp+34h+var_20], xmm0
call	sub_4D5050
movaps	xmm1, [esp+30h+var_10]
movaps	xmm0, xmmword ptr [esi]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0
movaps	xmm1, [esp+30h+var_30]
lea	ecx, [esp+30h+var_10]
mulps	xmm2, xmm0
push	ecx
subps	xmm1, xmm2
shufps	xmm0, xmm0, 0FFh
lea	ecx, [esp+34h+var_20]
movaps	[esp+34h+var_30], xmm1
movaps	[esp+34h+var_10], xmm0
call	sub_4D5050
movaps	xmm1, xmmword ptr [edi]
movaps	xmm0, [esp+30h+var_20]
shufps	xmm0, xmm0, 0
mulps	xmm0, xmm1
addps	xmm0, [esp+30h+var_30]
movaps	[esp+30h+var_30], xmm0
movaps	xmm0, xmmword ptr [esi]
mulps	xmm1, xmm0
movaps	xmm0, xmm1
shufps	xmm0, xmm1, 4Eh
addps	xmm0, xmm1
movaps	xmm1, xmm0
lea	edx, [esp+30h+var_10]
shufps	xmm1, xmm0, 0B1h
addps	xmm1, xmm0
push	edx
lea	ecx, [esp+34h+var_20]
movaps	[esp+34h+var_10], xmm1
call	sub_4D5050
movaps	xmm0, [esp+30h+var_30]
movaps	xmm1, [esp+30h+var_20]
mov	eax, [ebp+arg_0]
movaps	xmm2, xmm0
shufps	xmm1, xmm1, 0
unpckhps xmm0, xmm1
shufps	xmm2, xmm0, 0C4h
movaps	xmmword	ptr [eax], xmm2
mov	esp, ebp
pop	ebp
retn	4
sub_5FC910 endp

align 10h



sub_5FCA00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_129ECD0
test	[esp+4+arg_0], 1
jz	short loc_5FCA2B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FCA2B:
mov	eax, esi
pop	esi
retn	4
sub_5FCA00 endp

align 10h



sub_5FCA40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_121FA80
test	[esp+4+arg_0], 1
jz	short loc_5FCA6A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FCA6A:
mov	eax, esi
pop	esi
retn	4
sub_5FCA40 endp




sub_5FCA70 proc	near
sub	ecx, 8
jmp	sub_5FCA40
sub_5FCA70 endp

align 10h



sub_5FCA80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_ADB8E0
test	[esp+4+arg_0], 1
jz	short loc_5FCAAA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FCAAA:
mov	eax, esi
pop	esi
retn	4
sub_5FCA80 endp




sub_5FCAB0 proc	near
push	esi
mov	esi, ecx
push	edi
xorps	xmm0, xmm0
lea	edi, [esi+50h]
mov	ecx, edi
movaps	xmmword	ptr [esi+10h], xmm0
movaps	xmmword	ptr [esi+20h], xmm0
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fldz
fst	dword ptr [esi+40h]
push	0
fstp	dword ptr [esi+44h]
mov	ecx, edi
fld	ds:dword_15439C8
mov	dword ptr [esi+4Ch], 2000h
fstp	dword ptr [esi+48h]
call	sub_4D4F20
lea	edi, [esi+54h]
mov	ecx, edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld	ds:dword_1479C58
fstp	dword ptr [esi]
push	1
fld	ds:flt_15AEAE8
mov	ecx, edi
fstp	dword ptr [esi+4]
fld	ds:dword_156F414
fstp	dword ptr [esi+8]
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
retn
sub_5FCAB0 endp

align 10h



sub_5FCB20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_ADB3F0
test	[esp+4+arg_0], 1
jz	short loc_5FCB4A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FCB4A:
mov	eax, esi
pop	esi
retn	4
sub_5FCB20 endp




sub_5FCB50 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+0Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_10], edi
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FCBA8
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FCBA8:
mov	ebp, 80000000h
mov	[esi], ebx
mov	[esi+8], ebp
mov	[esp+24h+var_4], ebx
push	edi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_5FCBDF
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_5FCBDF:
mov	[edi], ebx
mov	[edi+8], ebp
mov	[esp+24h+var_4], 0FFFFFFFFh
mov	ecx, [esp+24h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_5FCB50 endp

align 10h



sub_5FCC00 proc	near
mov	eax, ecx
xor	edx, edx
mov	ecx, 80000000h
mov	[eax+8], ecx
mov	[eax], edx
mov	[eax+4], edx
mov	[eax+14h], ecx
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	ecx, 7FFFFFFFh
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+18h], edx
retn
sub_5FCC00 endp

align 10h


; Attributes: bp-based frame

sub_5FCC30 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	ecx
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
push	edi
mov	esi, eax
mov	eax, [esi]
lea	edi, [ebx+10h]
mov	ecx, edi
mov	[ebx], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm0, xmmword ptr [esi+20h]
movaps	xmm1, xmmword ptr [esi+30h]
movaps	xmm2, xmmword ptr [esi+40h]
movaps	xmm3, xmmword ptr [esi+10h]
movaps	xmmword	ptr [edi], xmm3
movaps	xmmword	ptr [edi+10h], xmm0
movaps	xmmword	ptr [edi+20h], xmm1
movaps	xmmword	ptr [edi+30h], xmm2
add	esi, 50h
lea	edi, [ebx+50h]
mov	ecx, 18h
rep movsd
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5FCC30 endp

align 10h


; Attributes: bp-based frame

sub_5FCC90 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, [ebp+arg_0]
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, xmmword ptr [eax+10h]
movaps	xmm4, xmmword ptr [eax+20h]
mov	eax, [ebp+arg_4]
movaps	xmm2, xmm0
unpcklps xmm2, xmm1
unpckhps xmm0, xmm1
movaps	xmm3, xmm2
movlhps	xmm3, xmm4
movaps	xmm5, xmm0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, xmm3
movhlps	xmm1, xmm2
shufps	xmm1, xmm4, 0D4h
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 55h
mulps	xmm2, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
mulps	xmm1, xmm3
addps	xmm2, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0AAh
shufps	xmm5, xmm4, 0E4h
mulps	xmm1, xmm5
addps	xmm2, xmm1
movaps	xmmword	ptr [ecx], xmm2
mov	esp, ebp
pop	ebp
retn	8
sub_5FCC90 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_ADB0D0

loc_5FCD00:
push	ecx
push	esi
mov	esi, eax
add	esi, 0Ch
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FCD35
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_5FCD35:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_ADB0D0
align 10h



sub_5FCD50 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FCD80
test	[esp+4+arg_0], 1
jz	short loc_5FCD7A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FCD7A:
mov	eax, edi
pop	edi
retn	4
sub_5FCD50 endp




sub_5FCD80 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FCDBA
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
shl	edx, 5
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_5FCDBA:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_5FCD80 endp

align 10h



sub_5FCDE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+68h]
test	ecx, ecx
jz	short loc_5FCDEF
call	sub_AD6020

loc_5FCDEF:
mov	dword ptr [esi+68h], 0
mov	ecx, [esi+5Ch]
test	ecx, ecx
jz	short loc_5FCE02
call	sub_AD6020

loc_5FCE02:
mov	dword ptr [esi+5Ch], 0
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_5FCE15
call	sub_AD6020

loc_5FCE15:
mov	ecx, esi
mov	dword ptr [esi+18h], 0
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_5FCE45
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FCE45:
mov	eax, esi
pop	esi
retn	4
sub_5FCDE0 endp

align 10h



; int __thiscall sub_5FCE50(void *, char)
sub_5FCE50 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CBD64
jz	short loc_5FCE69
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FCE69:
mov	eax, esi
pop	esi
retn	4
sub_5FCE50 endp

align 10h



sub_5FCE70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CBD74
mov	dword ptr [esi+8], offset off_15CBD64
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_5FCEA7
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FCEA7:
mov	eax, esi
pop	esi
retn	4
sub_5FCE70 endp

align 10h



sub_5FCEB0 proc	near
sub	ecx, 8
jmp	sub_5FCE70
sub_5FCEB0 endp

align 10h



sub_5FCEC0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+2Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+18h+var_5]
mov	dword ptr [edi], offset	off_15CC180
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FCF02
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_5FCF02:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FCF3D
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_5FCF3D:
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
pop	ebx
add	esp, 8
retn
sub_5FCEC0 endp

align 10h



sub_5FCF50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+4], eax
retn	4
sub_5FCF50 endp

align 10h



; int __thiscall sub_5FCF60(void *, char)
sub_5FCF60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_5FCEC0
test	[esp+4+arg_0], 1
jz	short loc_5FCF78
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FCF78:
mov	eax, esi
pop	esi
retn	4
sub_5FCF60 endp

align 10h



sub_5FCF80 proc	near
mov	eax, offset aAi	; "ai"
retn
sub_5FCF80 endp

align 10h



sub_5FCF90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_125C200
test	[esp+4+arg_0], 1
jz	short loc_5FCFBA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FCFBA:
mov	eax, esi
pop	esi
retn	4
sub_5FCF90 endp




sub_5FCFC0 proc	near
sub	ecx, 8
jmp	sub_5FCF90
sub_5FCFC0 endp

align 10h



sub_5FCFD0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+0CCh]
xor	ebx, ebx
push	esi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD030
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
mov	[esp+24h+var_10], edx
shl	edx, 4
add	edx, [esp+24h+var_10]
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD030:
lea	ecx, [edi+0C8h]
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
call	sub_AD3ED0
lea	esi, [edi+0ACh]
push	esi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD07E
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*4]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD07E:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+6Ch]
push	esi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD0BB
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD0BB:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+60h]
push	esi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD0F6
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD0F6:
mov	ebp, 80000000h
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+54h]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_4], ebx
push	esi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_5FD134
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_5FD134:
mov	[esi], ebx
mov	[esi+8], ebp
mov	[esp+24h+var_4], 0FFFFFFFFh
mov	ecx, [esp+24h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_5FCFD0 endp

align 10h


; Attributes: bp-based frame

sub_5FD160 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0Ch
push	esi
mov	esi, eax
add	esi, 8
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_5FD198
push	20h
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_5FD198:
mov	eax, [esi+4]
shl	eax, 5
add	eax, [esi]
push	eax		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
mov	ecx, [esi+4]
mov	edx, [ebp+arg_0]
mov	eax, ecx
shl	eax, 5
add	eax, [esi]
add	esp, 8
inc	ecx
mov	[esi+4], ecx
movaps	xmm0, xmmword ptr [edx]
mov	ecx, [ebp+arg_4]
mov	dl, [ebp+arg_8]
movaps	xmmword	ptr [eax], xmm0
mov	[eax+10h], ecx
mov	[eax+14h], dl
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_5FD160 endp

align 10h



sub_5FD1E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_121F6A0
test	[esp+4+arg_0], 1
jz	short loc_5FD20A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FD20A:
mov	eax, esi
pop	esi
retn	4
sub_5FD1E0 endp




sub_5FD210 proc	near

var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+18h+arg_0]
push	edi
lea	eax, [esi+14h]
call	sub_AD8AC0
lea	ebp, [esi+8]
xor	ebx, ebx
push	ebp
lea	ecx, [esp+20h+var_A]
mov	[esp+20h+var_A], bl
call	sub_4A00D0
mov	ecx, [ebp+0]
mov	edx, eax
mov	eax, [ebp+4]
cmp	eax, ebx
mov	[esp+1Ch+var_4], edx
jle	short loc_5FD295
lea	esi, [ecx+14h]
mov	[esp+1Ch+var_8], eax
lea	ecx, [ecx+0]

loc_5FD250:
lea	edi, [esi-8]
push	edi
lea	ecx, [esp+20h+var_9]
mov	[esp+20h+var_9], bl
call	sub_4A00D0
mov	edx, [esi]
mov	[esi-4], ebx
test	edx, edx
js	short loc_5FD27B
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_5FD27B:
mov	dword ptr [esi], 80000000h
add	esi, 18h
sub	[esp+1Ch+var_8], 1
mov	[edi], ebx
jnz	short loc_5FD250
mov	esi, [esp+1Ch+arg_0]
mov	edx, [esp+1Ch+var_4]

loc_5FD295:
mov	eax, [ebp+8]
mov	[ebp+4], ebx
test	eax, eax
js	short loc_5FD2BB
mov	ecx, [ebp+0]
mov	edi, [edx]
and	eax, 3FFFFFFFh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
mov	ecx, edx
mov	edx, [edi+10h]
call	edx

loc_5FD2BB:
mov	ecx, esi
mov	[ebp+0], ebx
mov	dword ptr [ebp+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4
sub_5FD210 endp

align 10h



sub_5FD2E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [ecx]
push	esi
mov	esi, [eax]
mov	[ecx], esi
mov	esi, [eax+4]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[ecx+4], esi
mov	esi, [eax+8]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[ecx+8], esi
mov	[eax+8], edx
pop	esi
retn	4
sub_5FD2E0 endp

align 10h



sub_5FD310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [edi+8]
push	ebx
mov	ebx, [esp+4+arg_8]
push	esi
mov	esi, [edi+4]
add	esi, ebx
and	eax, 3FFFFFFFh
cmp	eax, esi
jge	short loc_5FD340
add	eax, eax
cmp	esi, eax
jl	short loc_5FD32F
mov	eax, esi

loc_5FD32F:
push	4
push	eax
mov	eax, [esp+10h+arg_0]
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_5FD340:
mov	ecx, [edi+4]
mov	edx, [edi]
lea	eax, [edx+ecx*4]
test	ebx, ebx
jle	short loc_5FD361
mov	ecx, [esp+8+arg_4]
sub	ecx, eax
mov	edx, ebx

loc_5FD354:
mov	ebx, [ecx+eax]
mov	[eax], ebx
add	eax, 4
sub	edx, 1
jnz	short loc_5FD354

loc_5FD361:
mov	[edi+4], esi
pop	esi
pop	ebx
retn	0Ch
sub_5FD310 endp

align 10h



sub_5FD370 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_121F1B0
test	[esp+4+arg_0], 1
jz	short loc_5FD39A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FD39A:
mov	eax, esi
pop	esi
retn	4
sub_5FD370 endp




sub_5FD3A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
fld	ds:dword_15FCC88
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_8]
fst	[esp+0Ch+arg_8]
push	esi
fstp	[esp+10h+var_4]
mov	esi, eax
xor	ebx, ebx
cmp	[esi+4], ebx
jle	short loc_5FD409
push	edi
xor	edi, edi

loc_5FD3C2:
mov	eax, [esi]
fld	dword ptr [eax+edi]
add	eax, edi
sub	esp, 8
fstp	[esp+1Ch+var_18]
fld	[esp+1Ch+arg_8]
fstp	[esp+1Ch+var_1C]
call	sub_4DDB10
mov	eax, [esi]
fstp	[esp+1Ch+arg_8]
fld	dword ptr [eax+edi+4]
add	eax, edi
fstp	[esp+1Ch+var_18]
fld	[esp+1Ch+var_4]
fstp	[esp+1Ch+var_1C]
call	sub_4DDB10
inc	ebx
fstp	[esp+1Ch+var_4]
add	esp, 8
add	edi, 10h
cmp	ebx, [esi+4]
jl	short loc_5FD3C2
pop	edi

loc_5FD409:
mov	eax, [esp+10h+arg_0]
fld	dword ptr [eax+8]
fmul	ds:dbl_15FCC48
fld	[esp+10h+arg_8]
fld	st
fdiv	st, st(2)
call	__ftol2_sse
fld	[esp+10h+var_4]
fld	st
mov	esi, eax
fdivrp	st(3), st
fxch	st(2)
call	__ftol2_sse
fldz
fcom	st(1)
mov	ecx, eax
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_5FD444
dec	esi

loc_5FD444:
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_5FD45E
mov	edx, [esp+10h+arg_4]
dec	ecx
mov	[edx], esi
pop	esi
mov	[ebp+0], ecx
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_5FD45E:
mov	eax, [esp+10h+arg_4]
mov	[eax], esi
pop	esi
mov	[ebp+0], ecx
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_5FD3A0 endp

align 10h



sub_5FD470 proc	near

arg_0= dword ptr  4

push	eax
push	ecx
mov	ecx, [esp+8+arg_0]
mov	eax, 1
call	sub_5FD490
retn	4
sub_5FD470 endp

align 10h



sub_5FD490 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	ecx
push	edx
push	eax
call	sub_5FD4B0
retn	8
sub_5FD490 endp

align 10h


; Attributes: bp-based frame

sub_5FD4B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [edi+4]
mov	ecx, [ebp+arg_C]
lea	edx, [eax+ecx]
mov	ecx, [ebp+arg_4]
sub	eax, ecx
push	ebx
mov	ebx, eax
mov	eax, [edi+8]
and	eax, 3FFFFFFFh
cmp	eax, edx
push	esi
mov	[esp+10h+var_4], edx
jge	short loc_5FD4F6
add	eax, eax
cmp	edx, eax
jge	short loc_5FD4E3
mov	edx, eax

loc_5FD4E3:
push	10h
push	edx
mov	edx, [ebp+arg_0]
push	edi
push	edx
call	sub_121B8C0
mov	ecx, [ebp+arg_4]
add	esp, 10h

loc_5FD4F6:
mov	eax, [edi]
mov	esi, ecx
shl	esi, 4
shl	ebx, 4
lea	edx, [esi+eax]
push	ebx
push	edx
mov	edx, [ebp+arg_C]
add	ecx, edx
shl	ecx, 4
add	ecx, eax
push	ecx
call	sub_AD3070
mov	eax, [edi]
mov	edx, [ebp+arg_C]
add	esp, 0Ch
add	eax, esi
test	edx, edx
jle	short loc_5FD54E
mov	ecx, [ebp+arg_8]
sub	ecx, eax
jmp	short loc_5FD530
align 10h

loc_5FD530:
movaps	xmm0, xmmword ptr [ecx+eax]
movaps	xmmword	ptr [eax], xmm0
add	eax, 10h
sub	edx, 1
jnz	short loc_5FD530
mov	eax, [esp+10h+var_4]
mov	[edi+4], eax
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_5FD54E:
mov	ecx, [esp+10h+var_4]
pop	esi
mov	[edi+4], ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_5FD4B0 endp

align 10h



sub_5FD560 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_5FD590
test	[esp+4+arg_0], 1
jz	short loc_5FD58A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FD58A:
mov	eax, edi
pop	edi
retn	4
sub_5FD560 endp




sub_5FD590 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
push	esi
lea	esi, [edi+30h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD5E2
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*2]
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD5E2:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+20h]
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD61F
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD61F:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+14h]
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD65C
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD65C:
mov	ebp, 80000000h
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+8]
mov	[esp+20h+var_10], esi
mov	[esp+20h+var_4], ebx
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_5FD69A
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_5FD69A:
mov	[esi], ebx
mov	[esi+8], ebp
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	ecx, edi
call	sub_4DA650
mov	ecx, [esp+20h+var_C]
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_5FD590 endp

; START	OF FUNCTION CHUNK FOR sub_129E040

loc_5FD6C0:
push	ecx
push	esi
mov	esi, ecx
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FD6FA
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_5FD6FA:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_129E040
align 10h



sub_5FD710 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx+4]
imul	eax, 19660Dh
add	eax, 3C6EF35Fh
mov	[esp+4+var_4], eax
mov	[ecx+4], eax
fild	[esp+4+var_4]
test	eax, eax
jge	short loc_5FD732
fadd	ds:flt_15FCC08

loc_5FD732:
fld	ds:dbl_15FCCF0
mov	eax, [esp+4+arg_0]
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [eax]
mov	edx, [ecx+4]
imul	edx, 19660Dh
add	edx, 3C6EF35Fh
mov	[esp+4+arg_0], edx
mov	[ecx+4], edx
fild	[esp+4+arg_0]
test	edx, edx
jge	short loc_5FD766
fadd	ds:flt_15FCC08

loc_5FD766:
fmul	st, st(1)
fstp	dword ptr [eax+4]
mov	edx, [ecx+4]
imul	edx, 19660Dh
add	edx, 3C6EF35Fh
mov	[esp+4+arg_0], edx
mov	[ecx+4], edx
fild	[esp+4+arg_0]
test	edx, edx
jge	short loc_5FD78F
fadd	ds:flt_15FCC08

loc_5FD78F:
fmul	st, st(1)
fstp	dword ptr [eax+8]
mov	edx, [ecx+4]
imul	edx, 19660Dh
add	edx, 3C6EF35Fh
mov	[esp+4+arg_0], edx
mov	[ecx+4], edx
fild	[esp+4+arg_0]
test	edx, edx
jge	short loc_5FD7B8
fadd	ds:flt_15FCC08

loc_5FD7B8:
fmulp	st(1), st
fstp	dword ptr [eax+0Ch]
pop	ecx
retn	4
sub_5FD710 endp

align 10h



sub_5FD7D0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+18h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_10], edi
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FD828
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_5FD828:
mov	ebp, 80000000h
lea	ecx, [edi+0Ch]
mov	[esi], ebx
mov	[esi+8], ebp
call	sub_4DCDB0
mov	[esp+24h+var_4], ebx
push	edi
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_5FD867
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_5FD867:
mov	[edi], ebx
mov	[edi+8], ebp
mov	[esp+24h+var_4], 0FFFFFFFFh
mov	ecx, [esp+24h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_5FD7D0 endp

align 10h



sub_5FD890 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	edx
mov	edx, [esp+8+arg_0]
push	0
push	eax
push	edx
call	sub_5FD8B0
retn	10h
sub_5FD890 endp

align 10h



sub_5FD8B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+4]
mov	ecx, [esp+8+arg_8]
mov	ebx, eax
push	esi
mov	esi, [esp+0Ch+arg_4]
sub	eax, esi
sub	eax, ecx
push	edi
sub	ebx, ecx
add	ebx, [esp+10h+arg_10]
mov	edi, eax
mov	eax, [ebp+8]
and	eax, 3FFFFFFFh
cmp	eax, ebx
jge	short loc_5FD8F8
add	eax, eax
cmp	ebx, eax
jl	short loc_5FD8E3
mov	eax, ebx

loc_5FD8E3:
push	20h
push	eax
mov	eax, [esp+18h+arg_0]
push	ebp
push	eax
call	sub_121B8C0
mov	ecx, [esp+20h+arg_8]
add	esp, 10h

loc_5FD8F8:
mov	eax, [ebp+0]
mov	edx, [esp+10h+arg_10]
add	ecx, esi
shl	ecx, 5
add	ecx, eax
shl	edi, 5
push	edi
push	ecx
lea	ecx, [esi+edx]
shl	ecx, 5
add	ecx, eax
push	ecx
call	sub_AD3070
mov	eax, [esp+1Ch+arg_10]
shl	esi, 5
add	esi, [ebp+0]
add	esp, 0Ch
mov	edi, esi
test	eax, eax
jle	short loc_5FD971
mov	esi, [esp+10h+arg_C]
sub	edi, esi
mov	[esp+10h+arg_10], esi
mov	[esp+10h+arg_4], edi
mov	[esp+10h+arg_8], eax
mov	edi, edi

loc_5FD940:
lea	edx, [edi+esi]
push	edx		; void *
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_5FD963
mov	ecx, 8
mov	edi, eax
rep movsd
mov	esi, [esp+10h+arg_10]
mov	edi, [esp+10h+arg_4]

loc_5FD963:
add	esi, 20h
sub	[esp+10h+arg_8], 1
mov	[esp+10h+arg_10], esi
jnz	short loc_5FD940

loc_5FD971:
pop	edi
pop	esi
mov	[ebp+4], ebx
pop	ebp
pop	ebx
retn	14h
sub_5FD8B0 endp

align 10h


; Attributes: bp-based frame

sub_5FD980 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	ecx
mov	edx, [ebp+arg_4]
push	ebx
mov	ebx, [ebp+arg_8]
push	esi
mov	esi, [ebp+arg_0]
push	edi

loc_5FD993:
lea	ecx, [edx+ebx]
sar	ecx, 1
mov	ecx, [esi+ecx*4]
mov	eax, ebx
mov	edi, edx
nop

loc_5FD9A0:
cmp	[esi+edi*4], ecx
jge	short loc_5FD9AB

loc_5FD9A5:
inc	edi
cmp	[esi+edi*4], ecx
jl	short loc_5FD9A5

loc_5FD9AB:
cmp	ecx, [esi+eax*4]
jge	short loc_5FD9B6

loc_5FD9B0:
dec	eax
cmp	ecx, [esi+eax*4]
jl	short loc_5FD9B0

loc_5FD9B6:
cmp	eax, edi
jl	short loc_5FD9D4
jz	short loc_5FD9CE
mov	ebx, [esi+edi*4]
mov	edx, [esi+eax*4]
mov	[esi+eax*4], ebx
mov	ebx, [ebp+arg_8]
mov	[esi+edi*4], edx
mov	edx, [ebp+arg_4]

loc_5FD9CE:
dec	eax
inc	edi
cmp	edi, eax
jle	short loc_5FD9A0

loc_5FD9D4:
cmp	edx, eax
jge	short loc_5FD9E7
mov	ecx, [ebp+arg_C]
push	ecx
push	eax
push	edx
push	esi
call	sub_5FD980
add	esp, 10h

loc_5FD9E7:
cmp	edi, ebx
jge	short loc_5FD9F2
mov	edx, edi
mov	[ebp+arg_4], edx
jmp	short loc_5FD993

loc_5FD9F2:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_5FD980 endp

align 10h


; Attributes: bp-based frame

sub_5FDA00 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, [ebp+arg_4]
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, xmmword ptr [ecx]
mov	eax, [ebp+arg_0]
cmpeqps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
mov	esp, ebp
pop	ebp
retn	8
sub_5FDA00 endp

align 10h



sub_5FDA20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_128ED90
test	[esp+4+arg_0], 1
jz	short loc_5FDA4A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FDA4A:
mov	eax, esi
pop	esi
retn	4
sub_5FDA20 endp



; Attributes: bp-based frame

sub_5FDA50 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 24h
push	ebx
mov	ebx, [ebp+arg_0]
fld	dword ptr [ebx]
push	esi
push	edi
mov	edi, ecx
fstp	dword ptr [edi]
lea	esi, [edi+54h]
fld	dword ptr [ebx+4]
push	esi
fstp	dword ptr [edi+4]
mov	[esp+34h+var_10], edi
fld	dword ptr [ebx+8]
mov	[esp+34h+var_15], 0
fstp	dword ptr [edi+8]
movaps	xmm0, xmmword ptr [ebx+10h]
movaps	xmmword	ptr [edi+10h], xmm0
fld	dword ptr [ebx+20h]
fstp	dword ptr [edi+20h]
fld	dword ptr [ebx+24h]
fstp	dword ptr [edi+24h]
fld	dword ptr [ebx+28h]
fstp	dword ptr [edi+28h]
fld	dword ptr [ebx+2Ch]
fstp	dword ptr [edi+2Ch]
fld	dword ptr [ebx+30h]
fstp	dword ptr [edi+30h]
mov	eax, [ebx+34h]
mov	[edi+34h], eax
mov	ecx, [ebx+38h]
mov	[edi+38h], ecx
mov	edx, [ebx+3Ch]
mov	[edi+3Ch], edx
mov	eax, [ebx+40h]
mov	[edi+40h], eax
mov	ecx, [ebx+44h]
mov	[edi+44h], ecx
mov	edx, [ebx+48h]
mov	[edi+48h], edx
fld	dword ptr [ebx+4Ch]
fstp	dword ptr [edi+4Ch]
lea	ecx, [esp+34h+var_15]
fld	dword ptr [ebx+50h]
fstp	dword ptr [edi+50h]
call	sub_4A00D0
mov	ecx, eax
mov	eax, [esi+8]
mov	edx, eax
and	edx, 3FFFFFFFh
cmp	edx, [ebx+58h]
mov	[esp+30h+var_4], ecx
jge	short loc_5FDB1E
test	eax, eax
js	short loc_5FDB04
mov	eax, [esi]
push	edx
push	eax
call	sub_4C7E50
mov	ecx, [esp+30h+var_4]

loc_5FDB04:
mov	edx, [ebx+58h]
lea	eax, [esp+30h+var_14]
push	eax
mov	[esp+34h+var_14], edx
call	sub_4B9FB0
mov	ecx, [esp+30h+var_14]
mov	[esi], eax
mov	[esi+8], ecx

loc_5FDB1E:
mov	ecx, [ebx+58h]
mov	eax, [esi]
mov	[esi+4], ecx
mov	edx, [ebx+54h]
test	ecx, ecx
jle	short loc_5FDB3F
sub	edx, eax
nop

loc_5FDB30:
movaps	xmm0, xmmword ptr [edx+eax]
movaps	xmmword	ptr [eax], xmm0
add	eax, 10h
sub	ecx, 1
jnz	short loc_5FDB30

loc_5FDB3F:
lea	esi, [edi+60h]
push	esi
lea	ecx, [esp+34h+var_15]
mov	[esp+34h+var_15], 0
call	sub_4A00D0
mov	ecx, eax
mov	eax, [esi+8]
mov	edx, eax
and	edx, 3FFFFFFFh
cmp	edx, [ebx+64h]
mov	[esp+30h+var_4], ecx
jge	short loc_5FDBA7
test	eax, eax
js	short loc_5FDB7E
mov	eax, [ecx]
mov	eax, [eax+10h]
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
push	edx
call	eax
mov	ecx, [esp+30h+var_4]

loc_5FDB7E:
mov	edx, [ebx+64h]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
add	edx, edx
add	edx, edx
mov	[esp+30h+var_14], edx
lea	edx, [esp+30h+var_14]
push	edx
call	eax
mov	[esi], eax
mov	eax, [esp+30h+var_14]
cdq
and	edx, 3
add	eax, edx
sar	eax, 2
mov	[esi+8], eax

loc_5FDBA7:
mov	ecx, [ebx+64h]
mov	[esi+4], ecx
mov	edx, [ebx+60h]
mov	esi, [esi]
test	ecx, ecx
jle	short loc_5FDBCD
mov	eax, esi
sub	edx, esi
lea	ebx, [ebx+0]

loc_5FDBC0:
mov	esi, [edx+eax]
mov	[eax], esi
add	eax, 4
sub	ecx, 1
jnz	short loc_5FDBC0

loc_5FDBCD:
lea	esi, [edi+6Ch]
push	esi
lea	ecx, [esp+34h+var_15]
mov	[esp+34h+var_15], 0
call	sub_4A00D0
mov	edx, [esi+4]
mov	[esp+30h+var_4], eax
mov	eax, [ebx+70h]
cmp	eax, edx
mov	[esp+30h+var_8], eax
jle	short loc_5FDBF7
mov	[esp+30h+var_14], edx
jmp	short loc_5FDBFD

loc_5FDBF7:
mov	[esp+30h+var_14], eax
mov	edx, eax

loc_5FDBFD:
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, eax
jge	short loc_5FDC27
add	ecx, ecx
cmp	eax, ecx
jge	short loc_5FDC12
mov	eax, ecx

loc_5FDC12:
mov	ecx, [esp+30h+var_4]
push	8
push	eax
push	esi
push	ecx
call	sub_121B8C0
mov	edx, [esp+40h+var_14]
add	esp, 10h

loc_5FDC27:
mov	ecx, [ebx+6Ch]
mov	esi, [esi]
test	edx, edx
jle	short loc_5FDC56
mov	eax, esi
sub	ecx, esi
mov	[esp+30h+var_C], edx
jmp	short loc_5FDC40
align 10h

loc_5FDC40:
mov	esi, [ecx+eax]
mov	[eax], esi
mov	esi, [ecx+eax+4]
mov	[eax+4], esi
add	eax, 8
sub	[esp+30h+var_C], 1
jnz	short loc_5FDC40

loc_5FDC56:
mov	ecx, [ebx+6Ch]
lea	eax, ds:0[edx*8]
mov	edx, [edi+6Ch]
add	ecx, eax
add	edx, eax
mov	eax, [esp+30h+var_8]
sub	eax, [esp+30h+var_14]
test	eax, eax
jle	short loc_5FDCAA
sub	edx, ecx
mov	esi, ecx
mov	[esp+30h+var_4], edx
mov	[esp+30h+var_C], eax
jmp	short loc_5FDC85

loc_5FDC81:
mov	edx, [esp+30h+var_4]

loc_5FDC85:
add	edx, esi
push	edx		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_5FDCA0
mov	edx, [esi]
mov	[eax], edx
mov	ecx, [esi+4]
mov	[eax+4], ecx

loc_5FDCA0:
add	esi, 8
sub	[esp+30h+var_C], 1
jnz	short loc_5FDC81

loc_5FDCAA:
mov	edx, [esp+30h+var_8]
mov	[edi+70h], edx
mov	al, [ebx+78h]
mov	[edi+78h], al
fld	dword ptr [ebx+7Ch]
fstp	dword ptr [edi+7Ch]
add	edi, 88h
fld	dword ptr [ebx+80h]
lea	esi, [ebx+88h]
fstp	dword ptr [edi-8]
mov	cl, [ebx+84h]
mov	[edi-4], cl
mov	ecx, 9
rep movsd
mov	esi, [esp+30h+var_10]
lea	edi, [esi+0ACh]
push	edi
lea	ecx, [esp+34h+var_15]
mov	[esp+34h+var_15], 0
call	sub_4A00D0
mov	ecx, [edi+4]
mov	edi, [ebx+0B0h]
cmp	edi, ecx
mov	[esp+30h+var_8], eax
mov	[esp+30h+var_4], edi
jle	short loc_5FDD16
mov	[esp+30h+var_14], ecx
jmp	short loc_5FDD1C

loc_5FDD16:
mov	[esp+30h+var_14], edi
mov	ecx, edi

loc_5FDD1C:
mov	edx, [esi+0B4h]
lea	eax, [esi+0ACh]
and	edx, 3FFFFFFFh
cmp	edx, edi
jge	short loc_5FDD50
lea	ecx, [edx+edx]
cmp	edi, ecx
jl	short loc_5FDD3B
mov	ecx, edi

loc_5FDD3B:
mov	edx, [esp+30h+var_8]
push	28h
push	ecx
push	eax
push	edx
call	sub_121B8C0
mov	ecx, [esp+40h+var_14]
add	esp, 10h

loc_5FDD50:
mov	edx, [ebx+0ACh]
mov	eax, [esi+0ACh]
test	ecx, ecx
jle	short loc_5FDD88
sub	edx, eax
mov	[esp+30h+var_8], ecx

loc_5FDD66:
lea	esi, [edx+eax]
mov	edi, eax
mov	ecx, 0Ah
add	eax, 28h
sub	[esp+30h+var_8], 1
rep movsd
jnz	short loc_5FDD66
mov	esi, [esp+30h+var_10]
mov	edi, [esp+30h+var_4]
mov	ecx, [esp+30h+var_14]

loc_5FDD88:
mov	edx, [esi+0ACh]
lea	eax, [ecx+ecx*4]
mov	ecx, [ebx+0ACh]
add	eax, eax
add	eax, eax
add	eax, eax
add	edx, eax
add	ecx, eax
mov	eax, edi
sub	eax, [esp+30h+var_14]
mov	[esp+30h+var_C], edx
test	eax, eax
jle	short loc_5FDDFB
mov	edi, ecx
sub	edx, ecx
mov	[esp+30h+var_8], edi
mov	[esp+30h+var_14], edx
mov	[esp+30h+var_C], eax
jmp	short loc_5FDDC5

loc_5FDDC1:
mov	edx, [esp+30h+var_14]

loc_5FDDC5:
add	edx, edi
push	edx		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_5FDDE9
mov	esi, edi
mov	ecx, 0Ah
mov	edi, eax
rep movsd
mov	edi, [esp+30h+var_8]
mov	esi, [esp+30h+var_10]

loc_5FDDE9:
add	edi, 28h
sub	[esp+30h+var_C], 1
mov	[esp+30h+var_8], edi
jnz	short loc_5FDDC1
mov	edi, [esp+30h+var_4]

loc_5FDDFB:
mov	[esi+0B0h], edi
mov	eax, [ebx+0B8h]
mov	[esi+0B8h], eax
mov	ecx, [ebx+0BCh]
mov	[esi+0BCh], ecx
mov	edx, [ebx+0C0h]
mov	[esi+0C0h], edx
mov	al, [ebx+0C4h]
mov	[esi+0C4h], al
mov	cl, [ebx+0C5h]
mov	[esi+0C5h], cl
mov	dl, [ebx+0C6h]
lea	eax, [ebx+0C8h]
push	eax
lea	ecx, [esi+0C8h]
mov	[esi+0C6h], dl
call	sub_AD3EA0
lea	edi, [esi+0CCh]
push	edi
lea	ecx, [esp+34h+var_15]
mov	[esp+34h+var_15], 0
call	sub_4A00D0
mov	ecx, [ebx+0D0h]
mov	edi, [edi+4]
cmp	ecx, edi
mov	[esp+30h+var_4], eax
mov	[esp+30h+var_8], ecx
jle	short loc_5FDE8B
mov	[esp+30h+var_14], edi
jmp	short loc_5FDE91

loc_5FDE8B:
mov	[esp+30h+var_14], ecx
mov	edi, ecx

loc_5FDE91:
mov	edx, [esi+0D4h]
lea	eax, [esi+0CCh]
and	edx, 3FFFFFFFh
cmp	edx, ecx
jge	short loc_5FDEC0
add	edx, edx
cmp	ecx, edx
jge	short loc_5FDEAF
mov	ecx, edx

loc_5FDEAF:
push	44h
push	ecx
mov	ecx, [esp+38h+var_4]
push	eax
push	ecx
call	sub_121B8C0
add	esp, 10h

loc_5FDEC0:
mov	edx, [ebx+0CCh]
mov	eax, [esi+0CCh]
test	edi, edi
jle	short loc_5FDEF4
sub	edx, eax
mov	[esp+30h+var_4], edi

loc_5FDED6:
lea	esi, [edx+eax]
mov	edi, eax
mov	ecx, 11h
add	eax, 44h
sub	[esp+30h+var_4], 1
rep movsd
jnz	short loc_5FDED6
mov	edi, [esp+30h+var_14]
mov	esi, [esp+30h+var_10]

loc_5FDEF4:
mov	ecx, [ebx+0CCh]
mov	edx, [esi+0CCh]
mov	ebx, [esp+30h+var_8]
mov	eax, edi
shl	eax, 4
add	eax, edi
add	eax, eax
add	eax, eax
add	ecx, eax
add	edx, eax
mov	eax, ebx
sub	eax, edi
test	eax, eax
jle	short loc_5FDF74
mov	edi, edx
sub	edi, ecx
mov	ebx, ecx
mov	[esp+30h+var_C], edi
mov	[esp+30h+var_4], eax
lea	esp, [esp+0]

loc_5FDF30:
lea	edx, [edi+ebx]
push	edx		; void *
push	44h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_5FDF55
mov	ecx, 11h
mov	esi, ebx
mov	edi, eax
rep movsd
mov	esi, [esp+30h+var_10]
mov	edi, [esp+30h+var_C]

loc_5FDF55:
add	ebx, 44h
sub	[esp+30h+var_4], 1
jnz	short loc_5FDF30
mov	eax, [esp+30h+var_8]
mov	[esi+0D0h], eax
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_5FDF74:
pop	edi
mov	[esi+0D0h], ebx
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5FDA50 endp

align 10h


; Attributes: bp-based frame

sub_5FDF90 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
xor	eax, eax
push	ebx
mov	ebx, [ebp+arg_0]
mov	ecx, 80000000h
mov	[edi+4], eax
mov	[edi+8], eax
mov	[edi+0Ch], ecx
push	esi
lea	esi, [edi+20h]
mov	[edi+10h], eax
mov	[edi+14h], eax
mov	[edi+18h], ecx
call	sub_121B970
mov	dword ptr [edi], 0
fld	dword ptr [ebx]
fstp	dword ptr [esi]
mov	eax, [ebx+4]
mov	[esi+4], eax
mov	ecx, [ebx+8]
mov	[esi+8], ecx
mov	edx, [ebx+0Ch]
mov	[esi+0Ch], edx
mov	eax, [ebx+10h]
mov	[esi+10h], eax
mov	ecx, [ebx+14h]
mov	[esi+14h], ecx
movaps	xmm0, xmmword ptr [ebx+20h]
movaps	xmmword	ptr [esi+20h], xmm0
movaps	xmm0, xmmword ptr [ebx+30h]
movaps	xmmword	ptr [esi+30h], xmm0
movaps	xmm0, xmmword ptr [ebx+40h]
movaps	xmmword	ptr [esi+40h], xmm0
pop	esi
mov	eax, edi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5FDF90 endp

align 10h


; Attributes: bp-based frame

sub_5FE010 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	edx, [ebp+arg_0]
mov	edx, [edx+4]
shl	eax, 5
movaps	xmm1, xmmword ptr [eax+edx]
add	eax, edx
shl	ecx, 5
movaps	xmm0, xmmword ptr [ecx+edx+10h]
movaps	xmm2, xmmword ptr [ecx+edx]
add	ecx, edx
cmpleps	xmm1, xmm0
movaps	xmm0, xmmword ptr [eax+10h]
cmpleps	xmm2, xmm0
andps	xmm1, xmm2
movmskps eax, xmm1
and	eax, 7
cmp	al, 7
setz	cl
movzx	edx, cl
push	edx
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
mov	esp, ebp
pop	ebp
retn	4
sub_5FE010 endp




sub_5FE060 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+0Ch]
xor	ebx, ebx
push	edi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	edx, edx
js	short loc_5FE094
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2260

loc_5FE094:
push	esi
lea	ecx, [esp+14h+var_1]
mov	[edi], ebx
mov	dword ptr [edi+8], 80000000h
mov	[esp+14h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FE0CC
mov	edi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [edi+10h]
push	edx
call	eax

loc_5FE0CC:
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
pop	ebx
pop	ecx
retn
sub_5FE060 endp

align 10h



sub_5FE0E0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, eax
lea	esi, [edi+10h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FE11B
and	edx, 3FFFFFFFh
shl	edx, 5
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_5FE11B:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+4]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FE155
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
shl	edx, 5
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_5FE155:
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
pop	ebx
add	esp, 8
retn
sub_5FE0E0 endp

align 10h



sub_5FE170 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_5FD210
test	[esp+4+arg_0], 1
jz	short loc_5FE19B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FE19B:
mov	eax, esi
pop	esi
retn	4
sub_5FE170 endp

align 10h



; int __thiscall sub_5FE1B0(void *, char)
sub_5FE1B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD8AB0
test	[esp+4+arg_0], 1
jz	short loc_5FE1C8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FE1C8:
mov	eax, esi
pop	esi
retn	4
sub_5FE1B0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_AD8AC0

loc_5FE1D0:
push	ecx
push	esi
push	edi
mov	esi, eax
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	edi, eax
call	sub_5FE210
test	esi, esi
jz	short loc_5FE207
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	0Ch
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_5FE207:
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_AD8AC0
align 10h



sub_5FE210 proc	near
mov	edx, esi
call	sub_5FE240
test	dword ptr [esi+4], 80000000h
jnz	short locret_5FE238
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+8]
inc	eax
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
push	eax
push	ecx
mov	ecx, edi
call	edx

locret_5FE238:
retn
sub_5FE210 endp

align 10h



sub_5FE240 proc	near
mov	ecx, [edx+8]
inc	ecx
test	ecx, ecx
jle	short loc_5FE262
xor	eax, eax
push	esi
jmp	short loc_5FE250
align 10h

loc_5FE250:
mov	esi, [edx]
mov	dword ptr [eax+esi], 0FFFFFFFFh
add	eax, 14h
sub	ecx, 1
jnz	short loc_5FE250
pop	esi

loc_5FE262:
and	dword ptr [edx+4], 80000000h
retn
sub_5FE240 endp

align 10h



sub_5FE270 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_5FE27F
call	sub_AD6020

loc_5FE27F:
mov	ecx, esi
mov	dword ptr [esi+0Ch], 0
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_5FE2AF
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FE2AF:
mov	eax, esi
pop	esi
retn	4
sub_5FE270 endp

align 10h



sub_5FE2C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [eax+20h]
push	ecx
call	sub_5FE340
fld	dword ptr [edi+40h]
pop	edi
retn	4
sub_5FE2C0 endp

align 10h



sub_5FE2E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax+0Ch]
push	edi
push	ecx
lea	edi, [esi-4]
call	sub_5FE340
fld	dword ptr [esi+3Ch]
pop	edi
pop	esi
retn	4
sub_5FE2E0 endp

align 10h



sub_5FE300 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax+20h]
push	edi
push	ecx
lea	edi, [esi-8]
call	sub_5FE340
fld	dword ptr [esi+38h]
pop	edi
pop	esi
retn	4
sub_5FE300 endp

align 10h



sub_5FE320 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax+0Ch]
push	edi
push	ecx
lea	edi, [esi-0Ch]
call	sub_5FE340
fld	dword ptr [esi+34h]
pop	edi
pop	esi
retn	4
sub_5FE320 endp

align 10h


; Attributes: bp-based frame

sub_5FE340 proc	near

var_44=	dword ptr -44h
var_36=	byte ptr -36h
var_35=	dword ptr -35h
var_30=	xmmword	ptr -30h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	ecx, [edi+30h]
sub	esp, 38h
push	ebx
mov	ebx, [ebp+arg_0]
mov	eax, [ebx+3Ch]
push	esi
call	sub_121C960
mov	edx, [eax]
mov	edx, [edx+10h]
lea	esi, [esp+40h+var_35+1]
push	esi
lea	ecx, [edi+20h]
push	ecx
lea	ecx, [edi+10h]
push	ecx
lea	ecx, [esp+4Ch+var_36]
push	ecx
mov	ecx, eax
call	edx
lea	ecx, [esp+40h+var_36]
call	sub_4D4F40
test	al, al
jz	loc_5FE4E9
fld	[esp+40h+var_35+1]
fld	dword ptr [edi+38h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_5FE4E7
mov	eax, dword ptr [esp+40h+var_30]
xor	esi, esi
cmp	[edi+34h], esi
jz	loc_5FE4CE
mov	edx, [ebx+8]
lea	ecx, [eax+eax*2]
test	byte ptr [edx+ecx*8+0Eh], 1
jz	loc_5FE4CE
lea	ecx, [esp+40h+var_10]
fstp	st
push	ecx
push	eax
push	ebx
call	sub_ADA840
fstp	st
mov	eax, [ebx+3Ch]
mov	edx, [edi+34h]
shl	eax, 16h
or	eax, dword ptr [esp+4Ch+var_30]
mov	dword ptr [esp+4Ch+var_30+4], esi
mov	dword ptr [esp+4Ch+var_30+8], esi
add	esp, 0Ch
lea	esi, [esp+40h+var_30+4]
mov	dword ptr [esp+40h+var_30+0Ch],	80000000h
call	sub_AD8AD0
fld	[esp+40h+var_35+1]
push	ecx
lea	ecx, [esp+44h+var_20]
fstp	[esp+44h+var_44]
call	sub_4D5090
movaps	xmm0, xmmword ptr [esp+40h+var_20]
movaps	xmm1, ds:xmmword_146B8A0
movaps	xmm2, xmmword ptr [edi+10h]
shufps	xmm0, xmm0, 0
subps	xmm1, xmm0
mulps	xmm1, xmm2
movaps	xmm2, xmmword ptr [edi+20h]
xor	esi, esi
cmp	dword ptr [esp+40h+var_30+8], esi
mulps	xmm2, xmm0
addps	xmm1, xmm2
movaps	xmmword	ptr [esp+40h+var_20], xmm1
jle	short loc_5FE48A

loc_5FE434:
mov	edx, dword ptr [esp+40h+var_30+4]
fld	ds:flt_1479F24
mov	eax, [edx+esi*4]
push	ecx		; float
fstp	[esp+44h+var_44]
lea	ecx, [esp+44h+var_20]
push	ecx		; int
lea	edx, [esp+48h+var_10]
push	edx		; int
lea	ecx, [esp+4Ch+var_35]
push	ebx		; int
and	eax, 3FFFFFh
push	ecx		; int
call	sub_ADAA70
add	esp, 14h
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_5FE476
inc	esi
cmp	esi, dword ptr [esp+40h+var_30+8]
jl	short loc_5FE434
jmp	short loc_5FE48A

loc_5FE476:
mov	edx, dword ptr [esp+40h+var_30+4]
fld	[esp+40h+var_35+1]
mov	eax, [edx+esi*4]
fst	dword ptr [edi+38h]
fstp	dword ptr [edi+40h]
mov	[edi+3Ch], eax

loc_5FE48A:
lea	ecx, [esp+40h+var_30+4]
push	ecx
lea	ecx, [esp+44h+var_35]
mov	byte ptr [esp+44h+var_35], 0
call	sub_4A00D0
mov	edx, dword ptr [esp+40h+var_30+0Ch]
mov	dword ptr [esp+40h+var_30+8], 0
test	edx, edx
js	short loc_5FE4E9
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, dword ptr [esp+44h+var_30+4]
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_5FE4CE:
fst	dword ptr [edi+38h]
mov	ecx, [ebx+3Ch]
shl	ecx, 16h
fstp	dword ptr [edi+40h]
or	ecx, eax
mov	[edi+3Ch], ecx
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_5FE4E7:
fstp	st

loc_5FE4E9:
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5FE340 endp

align 10h



sub_5FE500 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi+0Ch], offset off_146BA8C
mov	dword ptr [esi+8], offset off_146BA80
mov	dword ptr [esi+4], offset off_146BA5C
mov	dword ptr [esi], offset	off_146BA68
jz	short loc_5FE53D
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	50h
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_5FE53D:
mov	eax, esi
pop	esi
retn	4
sub_5FE500 endp

align 10h



; int __thiscall sub_5FE550(void *, char)
sub_5FE550 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146BA68
jz	short loc_5FE569
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FE569:
mov	eax, esi
pop	esi
retn	4
sub_5FE550 endp

align 10h



; int __thiscall sub_5FE570(void *, char)
sub_5FE570 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146BA5C
jz	short loc_5FE589
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FE589:
mov	eax, esi
pop	esi
retn	4
sub_5FE570 endp

align 10h



; int __thiscall sub_5FE590(void *, char)
sub_5FE590 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146BA80
jz	short loc_5FE5A9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FE5A9:
mov	eax, esi
pop	esi
retn	4
sub_5FE590 endp

align 10h



; int __thiscall sub_5FE5B0(void *, char)
sub_5FE5B0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146BA8C
jz	short loc_5FE5C9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FE5C9:
mov	eax, esi
pop	esi
retn	4
sub_5FE5B0 endp

align 10h



sub_5FE5D0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx+20h]
push	edx
call	sub_5FE650
fld1
retn	4
sub_5FE5D0 endp

align 10h



sub_5FE5F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+0Ch]
push	edx
lea	eax, [ecx-4]
call	sub_5FE650
fld1
retn	4
sub_5FE5F0 endp

align 10h



sub_5FE610 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+20h]
push	edx
lea	eax, [ecx-8]
call	sub_5FE650
fld1
retn	4
sub_5FE610 endp

align 10h



sub_5FE630 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+0Ch]
push	edx
lea	eax, [ecx-0Ch]
call	sub_5FE650
fld1
retn	4
sub_5FE630 endp

align 10h


; Attributes: bp-based frame

sub_5FE650 proc	near

var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 54h
push	ebx
push	esi
xor	ecx, ecx
push	edi
mov	edi, eax
mov	eax, [ebp+arg_0]
mov	eax, [eax+3Ch]
mov	edx, 80000000h
mov	[esp+60h+var_2C], ecx
mov	[esp+60h+var_28], ecx
mov	[esp+60h+var_38], ecx
mov	[esp+60h+var_34], ecx
mov	ecx, [edi+30h]
mov	[esp+60h+var_28+4], edx
mov	[esp+60h+var_48], eax
mov	[esp+60h+var_30], edx
call	sub_121C960
mov	edx, [eax]
lea	esi, [esp+60h+var_2C]
lea	ecx, [edi+10h]
push	esi
push	ecx
mov	ecx, eax
mov	eax, [edx+14h]
call	eax
mov	ebx, [edi+38h]
mov	esi, [ebx+4]
add	esi, [esp+60h+var_28]
push	ebx
lea	ecx, [esp+64h+var_50+3]
mov	byte ptr [esp+64h+var_50+3], 0
call	sub_4D5020
mov	ecx, [ebx+8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_5FE6DC
add	ecx, ecx
cmp	esi, ecx
jl	short loc_5FE6CF
mov	ecx, esi

loc_5FE6CF:
push	4
push	ecx
push	ebx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_5FE6DC:
mov	esi, [esp+60h+var_28]
lea	eax, [esi-1]
xor	ebx, ebx
cmp	eax, ebx
mov	[esp+60h+var_4C], eax
jl	loc_5FE871
mov	ebx, [esp+60h+var_48]
shl	ebx, 16h
mov	[esp+60h+var_48], ebx
jmp	short loc_5FE70C
align 10h

loc_5FE700:
mov	esi, [esp+60h+var_28]
mov	eax, [esp+60h+var_4C]
mov	ebx, [esp+60h+var_48]

loc_5FE70C:
mov	edx, [esp+60h+var_2C]
mov	ecx, [edx+eax*4]
mov	eax, ecx
or	eax, ebx
cmp	dword ptr [edi+34h], 0
jz	loc_5FE854
mov	ebx, [ebp+arg_0]
mov	ebx, [ebx+8]
lea	ecx, [ecx+ecx*2]
test	byte ptr [ebx+ecx*8+0Eh], 1
jz	loc_5FE854
mov	ecx, [esp+60h+var_4C]
dec	esi
mov	[esp+60h+var_28], esi
cmp	esi, ecx
jz	short loc_5FE748
mov	esi, [edx+esi*4]
mov	[edx+ecx*4], esi

loc_5FE748:
mov	edx, [edi+34h]
xor	ebx, ebx
lea	esi, [esp+60h+var_44]
mov	[esp+60h+var_44], ebx
mov	[esp+60h+var_40], ebx
mov	[esp+60h+var_3C], 80000000h
call	sub_AD8AD0
mov	esi, [esp+60h+var_40]
dec	esi
cmp	esi, ebx
jl	short loc_5FE7E2
mov	ebx, [ebp+arg_0]

loc_5FE772:
lea	ecx, [esp+60h+var_28+8]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld	dword ptr [edi+3Ch]
mov	eax, [esp+60h+var_44]
mov	eax, [eax+esi*4]
lea	edx, [esp+60h+var_28+8]
push	edx		; int
push	ecx		; float
fstp	[esp+68h+var_68]
and	eax, 3FFFFFh
push	ebx		; int
call	sub_AD9410
movaps	xmm0, xmmword ptr [edi+20h]
movaps	xmm1, xmmword ptr [esp+6Ch+var_28+8]
movaps	xmm2, [esp+6Ch+var_10]
cmpleps	xmm1, xmm0
movaps	xmm0, xmmword ptr [edi+10h]
cmpleps	xmm0, xmm2
andps	xmm1, xmm0
movmskps ecx, xmm1
and	ecx, 7
add	esp, 0Ch
cmp	cl, 7
jz	short loc_5FE7DB
mov	ecx, [esp+60h+var_40]
dec	ecx
mov	[esp+60h+var_40], ecx
cmp	ecx, esi
jz	short loc_5FE7DB
mov	eax, [esp+60h+var_44]
mov	edx, [eax+ecx*4]
mov	[eax+esi*4], edx

loc_5FE7DB:
sub	esi, 1
jns	short loc_5FE772
xor	ebx, ebx

loc_5FE7E2:
mov	eax, [esp+60h+var_40]
mov	ecx, [esp+60h+var_44]
mov	edx, [esp+60h+var_34]
push	eax
push	ecx
push	edx
lea	eax, [esp+6Ch+var_38]
push	eax
lea	ecx, [esp+70h+var_50+3]
mov	byte ptr [esp+70h+var_50+3], 0
call	sub_4D5020
push	eax
lea	ecx, [esp+70h+var_38]
call	sub_600D00
lea	ecx, [esp+60h+var_44]
push	ecx
lea	ecx, [esp+64h+var_50+3]
mov	byte ptr [esp+64h+var_50+3], 0
call	sub_4A00D0
mov	edx, [esp+60h+var_3C]
mov	[esp+60h+var_40], ebx
test	edx, edx
js	short loc_5FE846
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esp+64h+var_44]
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_5FE846:
mov	[esp+60h+var_44], ebx
mov	[esp+60h+var_3C], 80000000h
jmp	short loc_5FE864

loc_5FE854:
mov	ecx, [edi+38h]
mov	edx, [ecx+4]
mov	esi, [ecx]
lea	edx, [esi+edx*4]
mov	[edx], eax
inc	dword ptr [ecx+4]

loc_5FE864:
sub	[esp+60h+var_4C], 1
jns	loc_5FE700
xor	ebx, ebx

loc_5FE871:
mov	eax, [esp+60h+var_34]
mov	ecx, [esp+60h+var_38]
mov	edi, [edi+38h]
push	eax
push	ecx
push	edi
lea	ecx, [esp+6Ch+var_50+3]
mov	byte ptr [esp+6Ch+var_50+3], 0
call	sub_4D5020
push	eax
call	sub_5FD310
lea	edx, [esp+60h+var_38]
push	edx
lea	ecx, [esp+64h+var_50+3]
mov	byte ptr [esp+64h+var_50+3], 0
call	sub_4D5020
mov	edx, [esp+60h+var_30]
mov	[esp+60h+var_34], ebx
test	edx, edx
js	short loc_5FE8CB
mov	ecx, [esp+60h+var_38]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_5FE8CB:
lea	eax, [esp+60h+var_2C]
push	eax
lea	ecx, [esp+64h+var_50+3]
mov	[esp+64h+var_38], ebx
mov	[esp+64h+var_30], 80000000h
mov	byte ptr [esp+64h+var_50+3], 0
call	sub_4D5020
mov	edx, [esp+60h+var_28+4]
mov	[esp+60h+var_28], ebx
test	edx, edx
js	short loc_5FE90F
mov	ecx, [esp+60h+var_2C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_5FE90F:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5FE650 endp

align 10h



sub_5FE920 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi+0Ch], offset off_146BA8C
mov	dword ptr [esi+8], offset off_146BA80
mov	dword ptr [esi+4], offset off_146BA5C
mov	dword ptr [esi], offset	off_146BA68
jz	short loc_5FE95D
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	40h
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_5FE95D:
mov	eax, esi
pop	esi
retn	4
sub_5FE920 endp

align 10h



sub_5FE970 proc	near

arg_0= word ptr	 4

movzx	eax, [esp+arg_0]
mov	ecx, [ecx]
lea	eax, [eax+eax*4]
lea	eax, [ecx+eax*4]
retn	4
sub_5FE970 endp




sub_5FE980 proc	near
sub	ecx, 8
jmp	sub_5FE500
sub_5FE980 endp

align 10h



sub_5FE990 proc	near
sub	ecx, 0Ch
jmp	sub_5FE500
sub_5FE990 endp

align 10h



sub_5FE9A0 proc	near
sub	ecx, 4
jmp	sub_5FE920
sub_5FE9A0 endp

align 10h



sub_5FE9B0 proc	near
sub	ecx, 8
jmp	sub_5FE920
sub_5FE9B0 endp

align 10h



sub_5FE9C0 proc	near
sub	ecx, 0Ch
jmp	sub_5FE920
sub_5FE9C0 endp

align 10h



sub_5FE9D0 proc	near
sub	ecx, 4
jmp	sub_5FE500
sub_5FE9D0 endp

align 10h



sub_5FE9E0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_121C9B0
test	[esp+4+arg_0], 1
jz	short loc_5FEA0A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FEA0A:
mov	eax, edi
pop	edi
retn	4
sub_5FE9E0 endp




sub_5FEA10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
mov	dword ptr [eax], 0
mov	dword ptr [ecx], 0
retn	8
sub_5FEA10 endp

align 10h



sub_5FEA30 proc	near

var_2= byte ptr	-2

push	ecx
mov	eax, [ecx+0Ch]
test	eax, eax
jz	short loc_5FEA55
push	esi
lea	esi, [esp+7]
call	sub_AD1F70
mov	ecx, eax
call	sub_4D4F40
pop	esi
test	al, al
jz	short loc_5FEA55
mov	eax, 1
pop	ecx
retn

loc_5FEA55:
xor	eax, eax
pop	ecx
retn
sub_5FEA30 endp

align 10h



; int __thiscall sub_5FEA60(void *, char)
sub_5FEA60 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC6F0
jz	short loc_5FEA79
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FEA79:
mov	eax, esi
pop	esi
retn	4
sub_5FEA60 endp

align 10h



sub_5FEA80 proc	near
mov	eax, dword_188993C
retn
sub_5FEA80 endp

align 10h



sub_5FEA90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_128DE10
test	[esp+4+arg_0], 1
jz	short loc_5FEABA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEABA:
mov	eax, esi
pop	esi
retn	4
sub_5FEA90 endp




sub_5FEAC0 proc	near
sub	ecx, 8
jmp	sub_5FEA90
sub_5FEAC0 endp

align 10h



sub_5FEAD0 proc	near
mov	eax, dword_1889940
retn
sub_5FEAD0 endp

align 10h



sub_5FEAE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_125A7A0
test	[esp+4+arg_0], 1
jz	short loc_5FEB0A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEB0A:
mov	eax, esi
pop	esi
retn	4
sub_5FEAE0 endp




sub_5FEB10 proc	near
sub	ecx, 8
jmp	sub_5FEAE0
sub_5FEB10 endp

align 10h



sub_5FEB20 proc	near
mov	eax, dword_1889944
retn
sub_5FEB20 endp

align 10h



sub_5FEB30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_121C850
test	[esp+4+arg_0], 1
jz	short loc_5FEB5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEB5A:
mov	eax, esi
pop	esi
retn	4
sub_5FEB30 endp




sub_5FEB60 proc	near
sub	ecx, 8
jmp	sub_5FEB30
sub_5FEB60 endp

align 10h



; int __thiscall sub_5FEB70(void *, char)
sub_5FEB70 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC7A0
jz	short loc_5FEB89
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_5FEB89:
mov	eax, esi
pop	esi
retn	4
sub_5FEB70 endp

align 10h



sub_5FEB90 proc	near
mov	eax, dword_1889948
retn
sub_5FEB90 endp

align 10h



sub_5FEBA0 proc	near
mov	eax, dword_188994C
retn
sub_5FEBA0 endp

align 10h



sub_5FEBB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC820
mov	dword ptr [esi+8], offset off_15CC830
call	sub_1259C60
test	[esp+4+arg_0], 1
jz	short loc_5FEBE7
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEBE7:
mov	eax, esi
pop	esi
retn	4
sub_5FEBB0 endp

align 10h



sub_5FEBF0 proc	near
mov	eax, dword_1889950
retn
sub_5FEBF0 endp

align 10h



sub_5FEC00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC850
mov	dword ptr [esi+8], offset off_15CC860
call	sub_1259C60
test	[esp+4+arg_0], 1
jz	short loc_5FEC37
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEC37:
mov	eax, esi
pop	esi
retn	4
sub_5FEC00 endp

align 10h



sub_5FEC40 proc	near
mov	eax, dword_1889954
retn
sub_5FEC40 endp

align 10h



sub_5FEC50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC880
mov	dword ptr [esi+8], offset off_15CC890
call	sub_1259C60
test	[esp+4+arg_0], 1
jz	short loc_5FEC87
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEC87:
mov	eax, esi
pop	esi
retn	4
sub_5FEC50 endp

align 10h



sub_5FEC90 proc	near
mov	eax, dword_1889958
retn
sub_5FEC90 endp

align 10h



sub_5FECA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC8B0
mov	dword ptr [esi+8], offset off_15CC8C0
call	sub_1259C60
test	[esp+4+arg_0], 1
jz	short loc_5FECD7
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FECD7:
mov	eax, esi
pop	esi
retn	4
sub_5FECA0 endp

align 10h



sub_5FECE0 proc	near
mov	eax, dword_188995C
retn
sub_5FECE0 endp

align 10h



sub_5FECF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC8E0
mov	dword ptr [esi+8], offset off_15CC8F0
call	sub_1259C60
test	[esp+4+arg_0], 1
jz	short loc_5FED27
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FED27:
mov	eax, esi
pop	esi
retn	4
sub_5FECF0 endp

align 10h



sub_5FED30 proc	near
mov	eax, dword_1889960
retn
sub_5FED30 endp

align 10h



sub_5FED40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CC910
mov	dword ptr [esi+8], offset off_15CC920
call	sub_1259C60
test	[esp+4+arg_0], 1
jz	short loc_5FED77
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FED77:
mov	eax, esi
pop	esi
retn	4
sub_5FED40 endp

align 10h



sub_5FED80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1259C60
test	[esp+4+arg_0], 1
jz	short loc_5FEDAA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEDAA:
mov	eax, esi
pop	esi
retn	4
sub_5FED80 endp




sub_5FEDB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1259C90
test	[esp+4+arg_0], 1
jz	short loc_5FEDDA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEDDA:
mov	eax, esi
pop	esi
retn	4
sub_5FEDB0 endp




sub_5FEDE0 proc	near
sub	ecx, 8
jmp	sub_5FECF0
sub_5FEDE0 endp

align 10h



sub_5FEDF0 proc	near
sub	ecx, 8
jmp	sub_5FED80
sub_5FEDF0 endp

align 10h



sub_5FEE00 proc	near
sub	ecx, 8
jmp	sub_5FECA0
sub_5FEE00 endp

align 10h



sub_5FEE10 proc	near
sub	ecx, 8
jmp	sub_5FEC00
sub_5FEE10 endp

align 10h



sub_5FEE20 proc	near
sub	ecx, 8
jmp	sub_5FEBB0
sub_5FEE20 endp

align 10h



sub_5FEE30 proc	near
sub	ecx, 8
jmp	sub_5FEC50
sub_5FEE30 endp

align 10h



sub_5FEE40 proc	near
sub	ecx, 8
jmp	sub_5FED40
sub_5FEE40 endp

align 10h



sub_5FEE50 proc	near
sub	ecx, 100h
jmp	sub_5FEDB0
sub_5FEE50 endp

align 10h



sub_5FEE60 proc	near
sub	ecx, 8
jmp	sub_5FEDB0
sub_5FEE60 endp

align 10h



sub_5FEE70 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	dword ptr [esi+8], 80000000h
push	edi
xor	edi, edi
mov	[esi], edi
mov	[esi+4], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	dword ptr [esi+14h], 80000000h
mov	[esi+18h], edi
mov	[esi+1Ch], edi
mov	dword ptr [esi+20h], 80000000h
mov	edi, [edx]
mov	[esi+30h], edi
mov	edi, [edx+4]
mov	[esi+34h], edi
mov	edi, [edx+8]
mov	[esi+38h], edi
mov	edx, [edx+0Ch]
mov	[esi+3Ch], edx
mov	edx, [ecx]
mov	[esi+40h], edx
mov	edx, [ecx+4]
mov	[esi+44h], edx
mov	edx, [ecx+8]
mov	[esi+48h], edx
mov	ecx, [ecx+0Ch]
mov	[esi+4Ch], ecx
mov	edx, [eax]
mov	[esi+50h], edx
mov	ecx, [eax+4]
mov	[esi+54h], ecx
mov	edx, [eax+8]
mov	[esi+58h], edx
mov	eax, [eax+0Ch]
lea	ecx, [esi+60h]
mov	[esi+5Ch], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+80h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0A0h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0C0h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, esi
pop	edi
retn	4
sub_5FEE70 endp

align 10h



sub_5FEF20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1259370
test	[esp+4+arg_0], 1
jz	short loc_5FEF4A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_5FEF4A:
mov	eax, esi
pop	esi
retn	4
sub_5FEF20 endp




sub_5FEF50 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_5FEF87
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
push	edi
mov	edi, [eax]
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx
pop	edi

loc_5FEF87:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	0Ch
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax
mov	eax, esi
pop	ecx
retn
sub_5FEF50 endp




sub_5FEFB0 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	ebp
push	edi
lea	edi, [esi+18h]
xor	ebx, ebx
push	edi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4D5020
mov	edx, [edi+8]
mov	ebp, 80000000h
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_5FEFE7
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_5FEFE7:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+0Ch]
push	edi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4D5020
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_5FF018
and	edx, 3FFFFFFFh
push	edx
mov	edx, [edi]
push	edx
mov	ecx, eax
call	sub_4C7E50

loc_5FF018:
push	esi
lea	ecx, [esp+14h+var_1]
mov	[edi], ebx
mov	[edi+8], ebp
mov	[esp+14h+var_1], bl
call	sub_4D5020
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_5FF046
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_5FF046:
pop	edi
mov	[esi+8], ebp
pop	ebp
mov	[esi], ebx
pop	ebx
pop	ecx
retn
sub_5FEFB0 endp




sub_5FF050 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
push	edi
lea	esi, [ebp+0Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+24h+arg_0]
mov	byte ptr [esp+24h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	edi, 80000000h
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_5FF08E
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2260

loc_5FF08E:
push	ebp
lea	ecx, [esp+24h+arg_0]
mov	[esi], ebx
mov	[esi+8], edi
mov	byte ptr [esp+24h+arg_0], bl
call	sub_4A00D0
mov	edx, [ebp+0]
mov	ecx, eax
mov	eax, [ebp+4]
cmp	eax, ebx
mov	[esp+20h+var_4], ecx
jle	short loc_5FF104
lea	esi, [edx+8]
mov	[esp+20h+var_C], eax

loc_5FF0B8:
lea	edi, [esi-8]
push	edi
lea	ecx, [esp+24h+var_D]
mov	[esp+24h+var_D], bl
call	sub_4A00D0
mov	edx, [esi]
mov	[esi-4], ebx
test	edx, edx
js	short loc_5FF0E9
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_5FF0E9:
mov	dword ptr [esi], 80000000h
add	esi, 0Ch
sub	[esp+20h+var_C], 1
mov	[edi], ebx
jnz	short loc_5FF0B8
mov	ecx, [esp+20h+var_4]
mov	edi, 80000000h

loc_5FF104:
mov	eax, [ebp+8]
mov	[ebp+4], ebx
test	edi, eax
jnz	short loc_5FF126
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
push	eax
mov	eax, [ebp+0]
push	eax
call	edx

loc_5FF126:
mov	[ebp+8], edi
pop	edi
pop	esi
mov	[ebp+0], ebx
pop	ebp
pop	ebx
add	esp, 10h
retn	4
sub_5FF050 endp

align 10h



sub_5FF140 proc	near
sub	ecx, 8
jmp	sub_5FEF20
sub_5FF140 endp

align 10h



sub_5FF150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx+4]
imul	eax, 19660Dh
add	eax, 3C6EF35Fh
mov	[esp+4+var_4], eax
mov	[ecx+4], eax
fild	[esp+4+var_4]
test	eax, eax
jge	short loc_5FF172
fadd	ds:flt_15FCC08

loc_5FF172:
fld	ds:dbl_15FCCF0
mov	eax, [esp+4+arg_0]
fmul	st(1), st
fxch	st(1)
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fld	ds:dbl_15FCD70
fmul	st(1), st
fld1
fsub	st(2), st
fxch	st(2)
fstp	dword ptr [eax]
mov	edx, [ecx+4]
imul	edx, 19660Dh
add	edx, 3C6EF35Fh
mov	[esp+4+arg_0], edx
mov	[ecx+4], edx
fild	[esp+4+arg_0]
test	edx, edx
jge	short loc_5FF1BA
fadd	ds:flt_15FCC08

loc_5FF1BA:
fmul	st, st(3)
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fmul	st, st(1)
fsub	st, st(2)
fstp	dword ptr [eax+4]
mov	edx, [ecx+4]
imul	edx, 19660Dh
add	edx, 3C6EF35Fh
mov	[esp+4+arg_0], edx
mov	[ecx+4], edx
fild	[esp+4+arg_0]
test	edx, edx
jge	short loc_5FF1EF
fadd	ds:flt_15FCC08

loc_5FF1EF:
fmul	st, st(3)
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fmul	st, st(1)
fsub	st, st(2)
fstp	dword ptr [eax+8]
mov	edx, [ecx+4]
imul	edx, 19660Dh
add	edx, 3C6EF35Fh
mov	[esp+4+arg_0], edx
mov	[ecx+4], edx
fild	[esp+4+arg_0]
test	edx, edx
jge	short loc_5FF224
fadd	ds:flt_15FCC08

loc_5FF224:
fmulp	st(3), st
fxch	st(2)
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fmulp	st(2), st
fsubp	st(1), st
fstp	dword ptr [eax+0Ch]
pop	ecx
retn	4
sub_5FF150 endp

align 10h



sub_5FF240 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
fld	ds:dword_15FCC88
push	esi
mov	esi, ecx
fstp	[esp+8+var_4]
mov	edx, [esi+4]
push	edi
mov	edi, [esp+0Ch+arg_4]
lea	eax, [esp+0Ch+var_4]
push	eax
lea	ecx, [esi+10h]
push	ecx
push	edx
lea	ecx, [esp+18h+arg_4]
push	ecx
lea	eax, [esi+20h]
mov	ecx, edi
call	sub_ADAB40
add	esp, 10h
lea	ecx, [esp+0Ch+arg_4]
call	sub_4D4F40
test	al, al
jz	short loc_5FF2AC
fld	[esp+0Ch+var_4]
fld	dword ptr [esi+30h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_5FF2AA
fstp	dword ptr [esi+30h]
mov	[esi+34h], edi
mov	esi, [esp+0Ch+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	8

loc_5FF2AA:
fstp	st

loc_5FF2AC:
mov	esi, [esp+0Ch+arg_0]
push	0
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	8
sub_5FF240 endp

align 10h



sub_5FF2D0 proc	near

arg_0= dword ptr  4

fld1
fcomp	dword ptr [ecx+30h]
fnstsw	ax
test	ah, 41h
jnz	short loc_5FF2F1
mov	al, 1
push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	4

loc_5FF2F1:
xor	al, al
push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	4
sub_5FF2D0 endp

align 10h



sub_5FF310 proc	near
fld	dword ptr [ecx+30h]
retn
sub_5FF310 endp

align 10h


; Attributes: bp-based frame

sub_5FF320 proc	near

var_1= byte ptr	-1

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
fld1
sub	esp, 10h
fstp	dword ptr [esi+30h]
mov	dword ptr [esi+34h], 0FFFFFFFFh
movaps	xmm0, xmmword ptr [ecx]
push	esi
lea	ecx, [esi+20h]
push	ecx
lea	eax, [esi+10h]
push	eax
movaps	xmmword	ptr [eax], xmm0
movaps	xmm0, xmmword ptr [edx]
mov	eax, [esi+8]
movaps	xmmword	ptr [ecx], xmm0
push	eax
lea	ecx, [esp+20h+var_1]
push	ecx
call	sub_888020
mov	edx, [esi]
mov	edx, [edx+8]
add	esp, 14h
lea	eax, [esp+10h+var_1]
push	eax
mov	ecx, esi
call	edx
mov	ecx, eax
call	sub_4D4F40
movzx	eax, al
mov	esp, ebp
pop	ebp
retn
sub_5FF320 endp

align 10h



sub_5FF380 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_AD87F0
test	[esp+4+arg_0], 1
jz	short loc_5FF3AA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_5FF3AA:
mov	eax, edi
pop	edi
retn	4
sub_5FF380 endp



; Attributes: bp-based frame

sub_5FF3B0 proc	near

var_14=	dword ptr -14h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 18h
push	ebx
mov	ebx, [ebp+arg_0]
push	edi
mov	ecx, esi
mov	eax, ebx
call	sub_1259B20
fstp	dword ptr [esp+20h+var_10]
mov	ecx, esi
mov	eax, ebx
call	sub_1259AD0
fstp	dword ptr [esp+20h+var_10+4]
fldz
lea	edi, [esi+10h]
fst	dword ptr [esp+20h+var_10+8]
mov	ecx, edi
fstp	dword ptr [esp+20h+var_10+0Ch]
mov	eax, ebx
movaps	xmm0, [esp+20h+var_10]
movaps	xmmword	ptr [esi], xmm0
call	sub_1259B20
fstp	dword ptr [esp+20h+var_10]
mov	ecx, edi
mov	eax, ebx
call	sub_1259AD0
fstp	dword ptr [esp+20h+var_10+4]
fldz
fst	dword ptr [esp+20h+var_10+8]
fst	dword ptr [esp+20h+var_10+0Ch]
movaps	xmm0, [esp+20h+var_10]
movaps	xmmword	ptr [edi], xmm0
fst	dword ptr [esi+8]
fstp	dword ptr [esi+18h]
fld	dword ptr [esi]
fld	dword ptr [edi]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_5FF43C
fld	dword ptr [esi]
fstp	[esp+20h+var_14]
fld	dword ptr [edi]
fstp	dword ptr [esi]
fld	[esp+20h+var_14]
fstp	dword ptr [edi]

loc_5FF43C:
fld	dword ptr [esi+4]
fld	dword ptr [esi+14h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_5FF45F
fld	dword ptr [esi+4]
fstp	[esp+20h+var_14]
fld	dword ptr [esi+14h]
fstp	dword ptr [esi+4]
fld	[esp+20h+var_14]
fstp	dword ptr [esi+14h]

loc_5FF45F:
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_5FF3B0 endp

align 10h



sub_5FF470 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
lea	esi, [ebx+4]
push	esi
lea	ecx, [esp+14h+var_1]
mov	[ebx], edi
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_5FF4AE
add	ecx, ecx
cmp	edi, ecx
jl	short loc_5FF4A1
mov	ecx, edi

loc_5FF4A1:
push	20h
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_5FF4AE:
mov	eax, [esi+4]
mov	ecx, edi
sub	ecx, eax
shl	eax, 5
add	eax, [esi]
test	ecx, ecx
jle	short loc_5FF4E4
mov	ebp, eax
mov	ebx, ecx

loc_5FF4C2:		; void *
push	ebp
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_5FF4D8
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)

loc_5FF4D8:
add	ebp, 20h
sub	ebx, 1
jnz	short loc_5FF4C2
mov	ebx, [esp+10h+arg_0]

loc_5FF4E4:
mov	[esi+4], edi
lea	esi, [ebx+10h]
push	esi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_5FF51B
add	ecx, ecx
cmp	edi, ecx
jl	short loc_5FF50E
mov	ecx, edi

loc_5FF50E:
push	20h
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_5FF51B:
mov	eax, [esi+4]
mov	ecx, edi
sub	ecx, eax
shl	eax, 5
add	eax, [esi]
test	ecx, ecx
jle	short loc_5FF54E
mov	ebp, eax
mov	ebx, ecx
nop

loc_5FF530:		; void *
push	ebp
push	20h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_5FF546
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)

loc_5FF546:
add	ebp, 20h
sub	ebx, 1
jnz	short loc_5FF530

loc_5FF54E:
mov	[esi+4], edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_5FF470 endp

align 10h



sub_5FF560 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
push	edi
mov	edi, ecx
cmp	eax, [edi]
jnz	short loc_5FF57A
mov	ecx, [esi+4]
cmp	ecx, [edi+4]
jnz	short loc_5FF57A
mov	al, 1
jmp	short loc_5FF57C

loc_5FF57A:
xor	al, al

loc_5FF57C:
push	eax
lea	ecx, [esp+0Ch+arg_0]
call	sub_4D4F20
lea	ecx, [esp+8+arg_0]
call	sub_4D4F40
test	al, al
jz	short loc_5FF59D
pop	edi
mov	eax, 2
pop	esi
retn	4

loc_5FF59D:
mov	ecx, [edi]
mov	eax, [esi]
test	ecx, ecx
jge	short loc_5FF5B3
test	eax, eax
jl	short loc_5FF5B7
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_5FF5B3:
test	eax, eax
jge	short loc_5FF5E6

loc_5FF5B7:
test	ecx, ecx
jl	short loc_5FF5C2
pop	edi
xor	eax, eax
pop	esi
retn	4

loc_5FF5C2:
test	eax, eax
jge	short loc_5FF5E6
mov	edx, [esi+4]
push	edx
neg	eax
push	eax
mov	eax, [edi+4]
push	eax
neg	ecx
push	ecx
call	sub_5FF680
add	esp, 10h
neg	eax
sbb	eax, eax
pop	edi
inc	eax
pop	esi
retn	4

loc_5FF5E6:
mov	edx, [esi+4]
push	edx
push	eax
mov	eax, [edi+4]
push	eax
push	ecx
call	sub_5FF680
add	esp, 10h
pop	edi
pop	esi
retn	4
sub_5FF560 endp

align 10h



sub_5FF600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_5FF627
mov	eax, [eax+4]
cmp	eax, [ecx+4]
jnz	short loc_5FF627
mov	al, 1
push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	8

loc_5FF627:
xor	al, al
push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	8
sub_5FF600 endp

align 10h



sub_5FF640 proc	near
push	esi
mov	esi, [ecx+4]
test	esi, esi
jz	short loc_5FF67D
push	edi
mov	edi, [ecx]
jmp	short loc_5FF650
align 10h

loc_5FF650:
mov	eax, edi
cdq
idiv	esi
mov	edi, esi
mov	esi, edx
test	edx, edx
jnz	short loc_5FF650
mov	eax, [ecx]
cdq
idiv	edi
mov	esi, eax
mov	eax, [ecx+4]
cdq
idiv	edi
mov	[ecx], esi
pop	edi
mov	[ecx+4], eax
test	eax, eax
jge	short loc_5FF67D
neg	eax
neg	esi
mov	[ecx+4], eax
mov	[ecx], esi

loc_5FF67D:
pop	esi
retn
sub_5FF640 endp

align 10h



sub_5FF680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	edi
mov	edi, [esp+4+arg_0]
test	edi, edi
jnz	short loc_5FF68E
lea	eax, [edi+1]
pop	edi
retn

loc_5FF68E:
push	ebx
mov	ebx, [esp+8+arg_8]
test	ebx, ebx
jnz	short loc_5FF69C
pop	ebx
xor	eax, eax
pop	edi
retn

loc_5FF69C:
mov	eax, edi
cdq
push	ebp
mov	ebp, [esp+0Ch+arg_4]
idiv	ebp
mov	eax, ebx
push	esi
mov	ecx, edx
cdq
idiv	[esp+10h+arg_C]
mov	eax, edi
sub	eax, ecx
mov	esi, edx
cdq
idiv	ebp
mov	edi, eax
mov	eax, ebx
mov	ebx, [esp+10h+arg_C]
sub	eax, esi
cdq
idiv	ebx
cmp	eax, edi
jl	short loc_5FF6DE
jg	short loc_5FF6D0
test	ecx, ecx
jnz	short loc_5FF6DA

loc_5FF6D0:
pop	esi
pop	ebp
pop	ebx
mov	eax, 1
pop	edi
retn

loc_5FF6DA:
test	esi, esi
jnz	short loc_5FF6E5

loc_5FF6DE:
pop	esi
pop	ebp
pop	ebx
xor	eax, eax
pop	edi
retn

loc_5FF6E5:
push	esi
push	ebx
push	ecx
push	ebp
call	sub_5FF680
add	esp, 10h
pop	esi
neg	eax
pop	ebp
sbb	eax, eax
pop	ebx
inc	eax
pop	edi
retn
sub_5FF680 endp

align 10h



sub_5FF700 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	edx, [eax+4]
mov	ecx, [eax]
push	ebx
mov	ebx, [esp+0Ch+arg_C]
push	ebp
push	esi
mov	esi, [esp+14h+arg_4]
mov	eax, [esi]
sub	eax, ecx
mov	[esp+14h+var_4], ecx
mov	ecx, [esi+4]
mov	esi, [esp+14h+arg_8]
sub	ecx, edx
mov	[esp+14h+var_8], edx
mov	edx, [esi]
mov	esi, [esi+4]
push	edi
mov	edi, [ebx]
mov	ebx, [ebx+4]
sub	edi, edx
mov	[esp+18h+arg_0], esi
sub	ebx, esi
mov	ebp, edi
imul	ebp, ecx
mov	esi, ebx
imul	esi, eax
sub	esi, ebp
mov	ebp, [esp+18h+arg_0]
mov	[esp+18h+arg_4], edx
imul	edx, ecx
imul	ebp, eax
imul	eax, [esp+18h+var_8]
sub	edx, ebp
mov	ebp, [esp+18h+var_4]
imul	ecx, ebp
sub	edx, ecx
mov	ecx, [esp+18h+arg_14]
add	edx, eax
mov	[ecx], edx
mov	[ecx+4], esi
call	sub_5FF640
mov	eax, edi
imul	edi, [esp+18h+var_8]
imul	eax, [esp+18h+arg_0]
mov	ecx, ebx
imul	ebx, ebp
imul	ecx, [esp+18h+arg_4]
sub	eax, ecx
mov	ecx, [esp+18h+arg_10]
sub	eax, edi
add	eax, ebx
neg	esi
pop	edi
mov	[ecx+4], esi
pop	esi
pop	ebp
mov	[ecx], eax
pop	ebx
add	esp, 8
jmp	sub_5FF640
sub_5FF700 endp

align 10h



sub_5FF7B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	ecx, [eax+4]
mov	eax, [eax]
push	esi
mov	esi, [esp+4+arg_8]
mov	edx, ecx
sub	edx, [esi+4]
mov	esi, [esi]
sub	esi, eax
imul	eax, edx
imul	ecx, esi
add	eax, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, eax
mov	eax, [edi+4]
imul	eax, esi
mov	esi, [edi]
imul	esi, edx
add	eax, esi
cmp	eax, ecx
pop	edi
pop	esi
jge	short loc_5FF7EF
mov	eax, 1
retn

loc_5FF7EF:
xor	edx, edx
cmp	eax, ecx
setnle	dl
dec	edx
and	edx, 2
mov	eax, edx
retn
sub_5FF7B0 endp

align 10h



sub_5FF800 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
mov	ebx, [esp+20h+arg_0]
push	ebp
push	esi
push	edi
mov	esi, eax
push	ebx
push	esi
call	sub_5FF7B0
push	edi
lea	ebp, [esi+8]
push	ebx
push	ebp
mov	[esp+40h+var_18], eax
call	sub_5FF7B0
mov	ecx, [esp+40h+var_18]
add	esp, 18h
mov	[esp+28h+var_14], eax
test	ecx, ecx
jnz	short loc_5FF83D
test	eax, eax
jnz	short loc_5FF864
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_5FF83D:
cmp	ecx, 1
jnz	short loc_5FF84F
cmp	eax, ecx
jnz	short loc_5FF864
mov	eax, ecx
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_5FF84F:
cmp	ecx, 2
jnz	short loc_5FF864
cmp	eax, ecx
jnz	short loc_5FF864

loc_5FF858:
mov	eax, 2
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_5FF864:
lea	eax, [esp+28h+var_8]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
push	edi
push	ebx
push	ebp
push	esi
call	sub_5FF700
mov	edx, [esi+10h]
add	esi, 10h
add	esp, 18h
cmp	edx, [esp+28h+var_10]
jnz	short loc_5FF893
mov	eax, [esi+4]
cmp	eax, [esp+28h+var_C]
jnz	short loc_5FF893
mov	al, 1
jmp	short loc_5FF895

loc_5FF893:
xor	al, al

loc_5FF895:
push	eax
lea	ecx, [esp+2Ch+var_19]
call	sub_4D4F20
lea	ecx, [esp+28h+var_19]
call	sub_4D4F40
test	al, al
jnz	short loc_5FF858
mov	eax, [esp+28h+var_18]
cmp	eax, 1
jnz	short loc_5FF8CE
lea	ecx, [esp+28h+var_10]
push	ecx
mov	ecx, esi
call	sub_5FF560
dec	eax
neg	eax
sbb	eax, eax
inc	eax
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_5FF8CE:
test	eax, eax
jnz	short loc_5FF8EC
lea	edx, [esp+28h+var_10]
push	edx
mov	ecx, esi
call	sub_5FF560
dec	eax
neg	eax
sbb	eax, eax
neg	eax
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_5FF8EC:
mov	eax, [esp+28h+var_14]
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_5FF800 endp

align 10h


; Attributes: bp-based frame

sub_5FF900 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
push	esi
mov	eax, 1
push	edi
mov	edi, [ebp+arg_4]
mov	esi, [edi+8]
xor	ecx, ecx
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_C], eax
mov	eax, [edi]
sub	esi, eax
mov	[esp+20h+var_8], ecx
mov	[esp+20h+var_10], ecx
jz	short loc_5FF947
mov	ecx, [ebp+arg_8]
mov	edx, [ecx]
sub	edx, eax
lea	ecx, [esp+20h+var_8]
mov	[esp+20h+var_8], edx
mov	[esp+20h+var_4], esi
call	sub_5FF640

loc_5FF947:
mov	eax, [edi+4]
mov	ebx, [edi+0Ch]
sub	ebx, eax
jz	short loc_5FF96A
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
sub	edx, eax
lea	ecx, [esp+20h+var_10]
mov	[esp+20h+var_10], edx
mov	[esp+20h+var_C], ebx
call	sub_5FF640

loc_5FF96A:
test	esi, esi
jnz	short loc_5FF9C4
mov	eax, [esp+20h+var_10]
cmp	[edi+10h], eax
jnz	short loc_5FF984
mov	ecx, [esp+20h+var_C]
cmp	[edi+14h], ecx
jnz	short loc_5FF984
mov	al, 1
jmp	short loc_5FF986

loc_5FF984:
xor	al, al

loc_5FF986:
push	eax
lea	ecx, [esp+24h+var_12]
call	sub_4D4F20
lea	ecx, [esp+20h+var_12]
call	sub_4D4F40
test	al, al
jz	loc_5FFA3D
mov	edx, [ebp+arg_8]
mov	eax, [edx]
cmp	eax, [edi]
jnz	loc_5FFA3D

loc_5FF9AE:
mov	esi, [ebp+arg_0]
mov	al, 1
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_5FF9C4:
lea	edx, [esp+20h+var_12]
test	ebx, ebx
jnz	short loc_5FFA06
lea	ecx, [edi+10h]
push	ecx
push	edx
lea	ecx, [esp+28h+var_8]
call	sub_5FF600
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_5FFA3D
mov	eax, [ebp+arg_8]
mov	ecx, [eax+4]
cmp	ecx, [edi+4]
jnz	short loc_5FFA3D
mov	esi, [ebp+arg_0]
mov	al, 1
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_5FFA06:
lea	esi, [edi+10h]
push	esi
push	edx
lea	ecx, [esp+28h+var_8]
call	sub_5FF600
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_5FFA3D
push	esi
lea	eax, [esp+24h+var_11]
push	eax
lea	ecx, [esp+28h+var_10]
call	sub_5FF600
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	loc_5FF9AE

loc_5FFA3D:
mov	esi, [ebp+arg_0]
xor	al, al
mov	ecx, esi
push	eax
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_5FF900 endp

align 10h



sub_5FFA60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [eax+8]
sub	esi, [eax]
push	edi
mov	edi, [eax+0Ch]
sub	edi, [eax+4]
mov	eax, [esp+10h+arg_8]
mov	edx, [eax+8]
sub	edx, [eax]
mov	ecx, [eax+0Ch]
sub	ecx, [eax+4]
mov	eax, edx
mov	ebx, ecx
imul	eax, esi
imul	ebx, edi
add	ebx, eax
mov	eax, [esp+10h+arg_0]
mov	[eax], ebx
mov	ebx, ecx
imul	ebx, ecx
imul	ecx, esi
mov	ebp, edx
imul	ebp, edx
imul	edx, edi
pop	edi
add	ebx, ebp
pop	esi
sub	ecx, edx
pop	ebp
mov	[eax+4], ebx
pop	ebx
test	ecx, ecx
jle	short loc_5FFABB
mov	dword ptr [eax+8], 1
retn

loc_5FFABB:
xor	edx, edx
test	ecx, ecx
setnl	dl
dec	edx
mov	[eax+8], edx
retn
sub_5FFA60 endp

align 10h



sub_5FFAD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
push	esi
lea	ecx, [esp+0Ch+arg_4]
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 80000000h
mov	byte ptr [esp+0Ch+arg_4], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, ebp
jge	short loc_5FFB1B
add	ecx, ecx
cmp	ebp, ecx
jl	short loc_5FFB0E
mov	ecx, ebp

loc_5FFB0E:
push	4
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_5FFB1B:
mov	eax, [esi+4]
mov	edx, [esi]
mov	ecx, ebp
sub	ecx, eax
lea	edi, [edx+eax*4]
test	ecx, ecx
jle	short loc_5FFB2F
xor	eax, eax
rep stosd

loc_5FFB2F:
mov	eax, [esp+8+arg_0]
pop	edi
mov	[esi+4], ebp
mov	[esi+0Ch], eax
mov	eax, esi
pop	ebp
retn	8
sub_5FFAD0 endp




sub_5FFB40 proc	near

var_54=	dword ptr -54h
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	qword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h
arg_28=	dword ptr  2Ch
arg_2C=	dword ptr  30h
arg_30=	dword ptr  34h
arg_34=	dword ptr  38h
arg_38=	dword ptr  3Ch

sub	esp, 40h
mov	ecx, [esp+40h+arg_1C]
mov	edx, [esp+40h+arg_20]
push	ebx
mov	[esp+44h+var_28], eax
mov	eax, [esp+44h+arg_24]
push	ebp
mov	ebp, [esp+48h+arg_0]
mov	[esp+48h+var_24], ecx
mov	ecx, [esp+48h+arg_28]
mov	[esp+48h+var_20], edx
mov	edx, [esp+48h+arg_18]
mov	[esp+48h+var_1C], eax
mov	eax, [esp+48h+arg_2C]
push	esi
mov	[esp+4Ch+var_18], ecx
mov	ecx, [esp+4Ch+arg_30]
push	edi
mov	[esp+50h+var_14], edx
mov	edx, [esp+50h+arg_34]
mov	[esp+50h+var_10], eax
mov	eax, [esp+50h+arg_38]
mov	[esp+50h+var_C], ecx
lea	ebx, [ebp+18h]
push	ebx
lea	ecx, [esp+54h+arg_1C]
mov	[esp+54h+var_8], edx
mov	[esp+54h+var_4], eax
call	sub_5FF560
cmp	eax, 1
jnz	loc_5FFC4C
xor	esi, esi
push	ebp
lea	ecx, [esp+54h+arg_0]
mov	[ebp+4], esi
mov	[ebp+10h], esi
mov	byte ptr [esp+54h+arg_0], 0
call	sub_4A00D0
mov	ecx, [ebp+8]
and	ecx, 3FFFFFFFh
cmp	[ebp+4], ecx
jnz	short loc_5FFBE7
push	28h
push	ebp
push	eax
call	sub_121B830
add	esp, 0Ch

loc_5FFBE7:
mov	eax, [ebp+4]
lea	edx, [eax+eax*4]
mov	eax, [ebp+0]
lea	eax, [eax+edx*8]
push	eax		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
cmp	eax, esi
jz	short loc_5FFC11
mov	ecx, 0Ah
lea	esi, [esp+50h+var_28]
mov	edi, eax
rep movsd
xor	esi, esi

loc_5FFC11:
mov	ecx, [esp+50h+arg_1C]
mov	edx, [esp+50h+arg_20]
mov	eax, [esp+50h+arg_24]
inc	dword ptr [ebp+4]
mov	[ebx], ecx
mov	ecx, [esp+50h+arg_28]
mov	[ebx+4], edx
mov	edx, [esp+50h+arg_4]
mov	[ebp+20h], eax
mov	eax, [esp+50h+arg_8]
mov	[ebp+24h], ecx
mov	ecx, [esp+50h+arg_C]
mov	[ebp+28h], edx
mov	[ebp+2Ch], eax
mov	[ebp+30h], ecx
mov	[ebp+4Ch], esi
jmp	loc_5FFE8B

loc_5FFC4C:
cmp	eax, 2
jnz	loc_5FFE99
push	ebp
lea	ecx, [esp+54h+var_39]
mov	[esp+54h+var_39], 0
call	sub_4A00D0
mov	ecx, [ebp+8]
and	ecx, 3FFFFFFFh
cmp	[ebp+4], ecx
jnz	short loc_5FFC7E
push	28h
push	ebp
push	eax
call	sub_121B830
add	esp, 0Ch

loc_5FFC7E:
mov	eax, [ebp+4]
lea	edx, [eax+eax*4]
mov	eax, [ebp+0]
lea	eax, [eax+edx*8]
push	eax		; void *
push	28h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_5FFCA6
mov	ecx, 0Ah
lea	esi, [esp+50h+var_28]
mov	edi, eax
rep movsd

loc_5FFCA6:
mov	esi, 1
add	[ebp+4], esi
push	0
lea	ecx, [esp+54h+arg_0]
call	sub_4D4F20
push	0
lea	ecx, [esp+54h+arg_18]
call	sub_4D4F20
mov	eax, [esp+50h+arg_C]
cmp	[ebp+30h], eax
jnz	loc_5FFD6B
fild	[esp+50h+arg_4]
push	ecx		; float
fstp	[esp+54h+var_30]
fild	[esp+54h+arg_8]
fstp	[esp+54h+var_54]
call	sub_4D5260
fdivr	[esp+54h+var_30]
fstp	[esp+54h+var_38]
fild	dword ptr [ebp+28h]
fstp	[esp+54h+var_30]
fild	dword ptr [ebp+2Ch]
fstp	[esp+54h+var_54]
call	sub_4D5260
fdivr	[esp+54h+var_30]
fstp	[esp+54h+var_34]
fld	[esp+54h+var_38]
fsub	[esp+54h+var_34]
fstp	dword ptr [esp+54h+var_30]
fld	dword ptr [esp+54h+var_30]
fstp	[esp+54h+var_54]
call	sub_4E3520
fcomp	ds:dbl_15FD2F0
add	esp, 4
fnstsw	ax
test	ah, 5
jp	short loc_5FFD34
mov	al, 1
jmp	short loc_5FFD36

loc_5FFD34:
xor	al, al

loc_5FFD36:
push	eax
lea	ecx, [esp+54h+arg_18]
call	sub_4D4F20
fld	[esp+50h+var_38]
fld	[esp+50h+var_34]
fcompp
fnstsw	ax
cmp	[esp+50h+arg_C], esi
jnz	short loc_5FFD61
test	ah, 5
jp	short loc_5FFD5C
mov	al, 1
push	eax
jmp	short loc_5FFD75

loc_5FFD5C:
xor	al, al
push	eax
jmp	short loc_5FFD75

loc_5FFD61:
test	ah, 41h
jnz	short loc_5FFD5C
mov	al, 1
push	eax
jmp	short loc_5FFD75

loc_5FFD6B:
cmp	eax, 0FFFFFFFFh
setz	cl
movzx	edx, cl
push	edx

loc_5FFD75:
lea	ecx, [esp+54h+arg_0]
call	sub_4D4F20
lea	ecx, [esp+50h+arg_18]
call	sub_4D4F40
test	al, al
jnz	short loc_5FFDEC
lea	ecx, [esp+50h+arg_0]
call	sub_4D4F40
test	al, al
jz	loc_5FFE99
mov	eax, [esp+50h+arg_1C]
mov	ecx, [esp+50h+arg_20]
mov	edx, [esp+50h+arg_24]
mov	[ebx], eax
mov	eax, [esp+50h+arg_28]
mov	[ebx+4], ecx
mov	ecx, [esp+50h+arg_4]
mov	[ebp+28h], ecx
mov	ecx, [esp+50h+arg_10]
mov	[ebp+20h], edx
mov	edx, [esp+50h+arg_8]
mov	[ebp+24h], eax
mov	eax, [esp+50h+arg_C]
mov	[ebp+2Ch], edx
mov	edx, [esp+50h+arg_14]
mov	[ebp+30h], eax
mov	eax, [ebp+4]
sub	eax, esi
mov	[ebp+34h], ecx
mov	[ebp+38h], edx
mov	[ebp+4Ch], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn	3Ch

loc_5FFDEC:
fild	[esp+50h+arg_24]
push	ecx		; float
fidiv	[esp+54h+arg_28]
fstp	dword ptr [esp+54h+var_30]
fild	[esp+54h+arg_8]
fstp	[esp+54h+var_54]
call	sub_4D5260
fld	dword ptr [esp+54h+var_30]
fld1
fsubrp	st(1), st
fmulp	st(1), st
fstp	dword ptr [esp+54h+var_30]
fild	dword ptr [ebp+20h]
fidiv	dword ptr [ebp+24h]
fstp	[esp+54h+var_34]
fld	dword ptr [esp+54h+var_30]
fstp	[esp+54h+var_30]
fild	dword ptr [ebp+2Ch]
fstp	[esp+54h+var_54]
call	sub_4D5260
fld	[esp+54h+var_34]
add	esp, 4
fld1
fsubrp	st(1), st
fmulp	st(1), st
fstp	[esp+50h+arg_0]
fld	[esp+50h+arg_0]
fcomp	[esp+50h+var_30]
fnstsw	ax
test	ah, 5
jp	short loc_5FFE99
mov	ecx, [esp+50h+arg_1C]
mov	edx, [esp+50h+arg_20]
mov	eax, [esp+50h+arg_24]
mov	[ebx], ecx
mov	ecx, [esp+50h+arg_28]
mov	[ebx+4], edx
mov	edx, [esp+50h+arg_4]
mov	[ebp+24h], ecx
mov	ecx, [esp+50h+arg_C]
mov	[ebp+20h], eax
mov	eax, [esp+50h+arg_8]
mov	[ebp+28h], edx
mov	[ebp+2Ch], eax
mov	[ebp+30h], ecx
mov	ecx, [ebp+4]
sub	ecx, esi
mov	[ebp+4Ch], ecx

loc_5FFE8B:
mov	edx, [esp+50h+arg_10]
mov	eax, [esp+50h+arg_14]
mov	[ebp+34h], edx
mov	[ebp+38h], eax

loc_5FFE99:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn	3Ch
sub_5FFB40 endp

align 10h



sub_5FFEB0 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	edi
lea	edi, [esi+0Ch]
xor	ebx, ebx
push	edi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	edx, edx
js	short loc_5FFEE1
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_5FFEE1:
push	esi
lea	ecx, [esp+10h+var_1]
mov	[edi], ebx
mov	dword ptr [edi+8], 80000000h
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_5FFF1E
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*4]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_5FFF1E:
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	ebx
pop	ecx
retn
sub_5FFEB0 endp

align 10h


; Attributes: bp-based frame

sub_5FFF30 proc	near

var_34=	dword ptr -34h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 30h
movaps	xmm1, xmmword ptr [edi]
fld	ds:dword_1479C58
movaps	xmm0, xmmword ptr [edi+10h]
subps	xmm0, xmm1
movaps	xmm1, ds:xmmword_1573EB0
movaps	[esp+30h+var_30], xmm0
movaps	xmm0, xmmword ptr [eax]
push	ecx
andps	xmm0, xmm1
fstp	[esp+34h+var_34]
lea	ecx, [esp+34h+var_20]
movaps	[esp+34h+var_10], xmm0
call	sub_4D5090
fld	ds:dword_1479C58
movaps	xmm0, [esp+30h+var_20]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [edi]
mulps	xmm1, [esp+30h+var_30]
push	ecx
addps	xmm1, xmm0
fstp	[esp+34h+var_34]
lea	ecx, [esp+34h+var_20]
movaps	xmmword	ptr [esi], xmm1
call	sub_4D5090
movaps	xmm0, [esp+30h+var_20]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+30h+var_10]
xorps	xmm0, [esp+30h+var_30]
mulps	xmm1, xmm0
movaps	xmm0, xmmword ptr [esi]
addps	xmm1, xmm0
movaps	xmmword	ptr [esi], xmm1
mov	esp, ebp
pop	ebp
retn
sub_5FFF30 endp

db 13h dup(0CCh)


; Attributes: bp-based frame

sub_5FFFD0 proc	near

var_34=	dword ptr -34h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 30h
movaps	xmm1, xmmword ptr [edi+10h]
fld	ds:dword_1479C58
movaps	xmm0, xmmword ptr [edi]
subps	xmm0, xmm1
movaps	xmm1, ds:xmmword_1573EB0
movaps	[esp+30h+var_30], xmm0
movaps	xmm0, xmmword ptr [eax]
push	ecx
andps	xmm0, xmm1
fstp	[esp+34h+var_34]
lea	ecx, [esp+34h+var_20]
movaps	[esp+34h+var_10], xmm0
call	sub_4D5090
fld	ds:dword_1479C58
movaps	xmm0, [esp+30h+var_20]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [edi+10h]
mulps	xmm1, [esp+30h+var_30]
push	ecx
addps	xmm1, xmm0
fstp	[esp+34h+var_34]
lea	ecx, [esp+34h+var_20]
movaps	xmmword	ptr [esi], xmm1
call	sub_4D5090
movaps	xmm0, [esp+30h+var_20]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+30h+var_10]
xorps	xmm0, [esp+30h+var_30]
mulps	xmm1, xmm0
movaps	xmm0, xmmword ptr [esi]
addps	xmm1, xmm0
movaps	xmmword	ptr [esi], xmm1
mov	esp, ebp
pop	ebp
retn
sub_5FFFD0 endp

align 10h


; Attributes: bp-based frame

sub_600060 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	ecx
fld	ds:dword_15FCC88
push	ebx
mov	ebx, [ebp+arg_0]
fstp	[esp+8+var_4]
movss	xmm0, [esp+8+var_4]
fld	ds:flt_15FCEB4
push	esi
push	edi
xor	edi, edi
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [eax], xmm0
fstp	[esp+10h+var_4]
movss	xmm0, [esp+10h+var_4]
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [eax+10h], xmm0
cmp	[edx+4], edi
jle	short loc_6000EE
xor	esi, esi

loc_6000A5:
mov	ecx, [edx]
movaps	xmm0, xmmword ptr [ecx+esi]
movaps	xmm1, xmmword ptr [eax]
minps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
movaps	xmm0, xmmword ptr [ecx+esi]
movaps	xmm1, xmmword ptr [eax+10h]
add	ecx, esi
maxps	xmm1, xmm0
movaps	xmmword	ptr [eax+10h], xmm1
mov	ecx, [edx]
movaps	xmm0, xmmword ptr [ecx+esi]
movaps	xmm1, xmmword ptr [ebx]
addps	xmm0, xmm1
movaps	xmm1, xmmword ptr [eax]
minps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
movaps	xmm1, xmmword ptr [eax+10h]
maxps	xmm1, xmm0
inc	edi
movaps	xmmword	ptr [eax+10h], xmm1
add	esi, 10h
cmp	edi, [edx+4]
jl	short loc_6000A5

loc_6000EE:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_600060 endp

align 10h


; Attributes: bp-based frame

sub_600100 proc	near

var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 64h
fld	ds:dword_15FCC88
push	ebx
fstp	[esp+68h+var_54]
mov	ebx, [ebp+arg_8]
movss	xmm0, [esp+68h+var_54]
fld	ds:flt_15FCEB4
push	esi
push	edi
mov	edi, eax
mov	eax, [ebp+arg_4]
lea	esi, [esp+70h+var_40]
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [eax], xmm0
fstp	[esp+70h+var_54]
movss	xmm0, [esp+70h+var_54]
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [eax+10h], xmm0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [eax]
shl	ecx, 4
movaps	xmm0, xmmword ptr [ecx+edx-10h]
movaps	[esp+70h+var_40], xmm0
call	sub_6002B0
mov	ecx, [ebp+arg_0]
xor	eax, eax
cmp	[ecx+4], eax
mov	[esp+70h+var_54], eax
jle	loc_60028D
movaps	xmm0, [esp+70h+var_40]
mov	[esp+70h+var_58], eax

loc_60017C:
mov	eax, [ebp+arg_4]
movaps	xmm1, xmmword ptr [eax]
mov	edx, [ebp+arg_0]
minps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
movaps	xmm1, xmmword ptr [eax+10h]
maxps	xmm1, xmm0
movaps	xmmword	ptr [eax+10h], xmm1
mov	eax, [edx]
add	eax, [esp+70h+var_58]
lea	esi, [esp+70h+var_50]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	dword ptr [esp+70h+var_50], ecx
mov	ecx, [eax+8]
mov	dword ptr [esp+70h+var_50+4], edx
mov	edx, [eax+0Ch]
mov	dword ptr [esp+70h+var_50+8], ecx
mov	dword ptr [esp+70h+var_50+0Ch],	edx
call	sub_6002B0
movaps	xmm2, [esp+70h+var_50]
movaps	xmm1, xmmword ptr [edi]
movaps	xmm0, xmm2
subps	xmm0, [esp+70h+var_40]
movaps	xmm3, xmm1
movaps	xmm4, xmm0
shufps	xmm3, xmm1, 0C9h
shufps	xmm4, xmm0, 0D2h
shufps	xmm0, xmm0, 0C9h
shufps	xmm1, xmm1, 0D2h
mulps	xmm1, xmm0
mulps	xmm3, xmm4
subps	xmm1, xmm3
movaps	[esp+70h+var_30], xmm1
mulps	xmm1, xmm2
movaps	xmm0, xmm1
shufps	xmm0, xmm1, 55h
movaps	xmm2, xmm1
lea	eax, [esp+70h+var_20]
addss	xmm0, xmm1
shufps	xmm2, xmm1, 0AAh
addss	xmm2, xmm0
push	eax
lea	ecx, [esp+74h+var_10]
movaps	[esp+74h+var_20], xmm2
call	sub_4D5050
lea	ecx, [esp+70h+var_10]
call	sub_4D50D0
fstp	dword ptr [esp+70h+var_30+0Ch]
push	ebx
lea	ecx, [esp+74h+var_59]
mov	[esp+74h+var_59], 0
call	sub_4D5020
mov	ecx, [ebx+8]
and	ecx, 3FFFFFFFh
cmp	[ebx+4], ecx
jnz	short loc_600256
push	10h
push	ebx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_600256:
mov	eax, [ebx+4]
movaps	xmm0, [esp+70h+var_30]
mov	edx, [ebp+arg_0]
add	[esp+70h+var_58], 10h
shl	eax, 4
add	eax, [ebx]
movaps	xmmword	ptr [eax], xmm0
mov	eax, [esp+70h+var_54]
inc	dword ptr [ebx+4]
movaps	xmm0, [esp+70h+var_50]
inc	eax
cmp	eax, [edx+4]
movaps	[esp+70h+var_40], xmm0
mov	[esp+70h+var_54], eax
jl	loc_60017C

loc_60028D:
movaps	xmm0, xmmword ptr [edi]
movaps	xmm1, ds:xmmword_1573EC0
mov	eax, [ebp+arg_4]
pop	edi
andps	xmm0, xmm1
movaps	xmm1, xmmword ptr [eax+10h]
pop	esi
addps	xmm0, xmm1
movaps	xmmword	ptr [eax+10h], xmm0
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_600100 endp

align 10h


; Attributes: bp-based frame

sub_6002B0 proc	near

var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 20h
movaps	xmm1, xmmword ptr [esi]
movaps	xmm0, xmmword ptr [edi]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+20h+var_20]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+24h+var_10]
movaps	[esp+24h+var_20], xmm2
call	sub_4D5050
lea	ecx, [esp+20h+var_10]
push	ecx
lea	edx, [esp+24h+var_20]
push	edx
call	sub_4D5160
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [edi]
mulps	xmm1, xmm0
movaps	xmm0, xmmword ptr [esi]
addps	xmm1, xmm0
add	esp, 8
movaps	xmmword	ptr [esi], xmm1
mov	esp, ebp
pop	ebp
retn
sub_6002B0 endp

align 10h


; Attributes: bp-based frame

sub_600320 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D1=	byte ptr -0D1h
var_D0=	byte ptr -0D0h
var_CF=	byte ptr -0CFh
var_CE=	byte ptr -0CEh
var_CD=	byte ptr -0CDh
var_CC=	dword ptr -0CCh
var_C6=	byte ptr -0C6h
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	xmmword	ptr -0C0h
var_A4=	dword ptr -0A4h
var_A0=	xmmword	ptr -0A0h
var_90=	xmmword	ptr -90h
var_80=	xmmword	ptr -80h
var_70=	xmmword	ptr -70h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	byte ptr -20h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	0FFFFFFFFh
push	offset SEH_600320
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0E8h
fld	ds:dword_15FCC88
push	ebx
push	esi
fstp	[esp+0FCh+var_CC]
fld	ds:flt_15FCEB4
or	eax, 0FFFFFFFFh
push	edi
fstp	[esp+100h+var_D8]
mov	edi, [ebp+arg_0]
mov	[esp+100h+var_C4], eax
mov	[esp+100h+var_A4], eax
mov	eax, [edi+4]
xor	esi, esi
test	eax, eax
jle	loc_600404
xor	ebx, ebx

loc_600375:
mov	eax, [edi]
movaps	xmm0, xmmword ptr [eax+ebx]
add	eax, ebx
mov	eax, [ebp+arg_10]
movaps	xmm1, xmmword ptr [eax]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
addss	xmm1, xmm0
lea	ecx, [esp+100h+var_30]
shufps	xmm0, xmm0, 0AAh
push	ecx
addss	xmm0, xmm1
lea	ecx, [esp+104h+var_50]
movaps	[esp+104h+var_30], xmm0
call	sub_4D5050
lea	ecx, [esp+100h+var_50]
call	sub_4D50D0
fstp	[esp+100h+var_E8]
fld	[esp+100h+var_E8]
fld	[esp+100h+var_CC]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6003DE
fst	[esp+100h+var_CC]
mov	[esp+100h+var_C4], esi

loc_6003DE:
fld	[esp+100h+var_D8]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6003F5
fstp	[esp+100h+var_D8]
mov	[esp+100h+var_A4], esi
jmp	short loc_6003F7

loc_6003F5:
fstp	st

loc_6003F7:
inc	esi
add	ebx, 10h
cmp	esi, [edi+4]
jl	loc_600375

loc_600404:
push	0
lea	ecx, [esp+104h+var_D1]
call	sub_4D4F20
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_C]
movaps	xmm1, xmmword ptr [eax]
movaps	xmm0, xmmword ptr [edx]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
addss	xmm1, xmm0
lea	ecx, [esp+100h+var_80]
shufps	xmm0, xmm0, 0AAh
push	ecx
addss	xmm0, xmm1
lea	ecx, [esp+104h+var_90]
movaps	[esp+104h+var_80], xmm0
call	sub_4D5050
lea	ecx, [esp+100h+var_90]
call	sub_4D50D0
fcomp	dword ptr ds:xmmword_1479F30
fnstsw	ax
test	ah, 5
jp	short loc_60047B
mov	eax, [esp+100h+var_C4]
mov	edx, [esp+100h+var_A4]
push	1
lea	ecx, [esp+104h+var_D1]
mov	[esp+104h+var_C4], edx
mov	[esp+104h+var_A4], eax
call	sub_4D4F20

loc_60047B:
fld	ds:dword_15FCC88
mov	esi, [ebp+arg_14]
mov	edx, [esp+100h+var_C4]
fstp	[esp+100h+var_E8]
movss	xmm0, [esp+100h+var_E8]
fld	ds:flt_15FCEB4
xor	eax, eax
lea	ebx, [esi+10h]
mov	[esp+100h+var_D8], edx
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [esi], xmm0
fstp	[esp+100h+var_E8]
movss	xmm1, [esp+100h+var_E8]
mov	[esp+100h+var_E4], eax
mov	[esp+100h+var_E0], eax
mov	[esp+100h+var_DC], 80000000h
shufps	xmm1, xmm1, 0
movaps	xmmword	ptr [ebx], xmm1
mov	ecx, [edi+4]
mov	eax, ecx
sub	eax, edx
add	eax, [esp+100h+var_A4]
mov	[esp+100h+var_CC], ecx
cdq
idiv	ecx
mov	eax, [esp+100h+var_C4]
shl	eax, 4
add	eax, [edi]
mov	edi, [ebp+arg_C]
mov	ecx, [eax]
mov	dword ptr [esp+100h+var_C0], ecx
mov	ecx, [eax+8]
mov	dword ptr [esp+100h+var_C0+8], ecx
mov	[esp+100h+var_E8], edx
mov	edx, [eax+4]
mov	dword ptr [esp+100h+var_C0+4], edx
mov	edx, [eax+0Ch]
mov	eax, [ebp+arg_8]
movaps	xmm2, xmmword ptr [eax]
mov	dword ptr [esp+100h+var_C0+0Ch], edx
movaps	xmm3, [esp+100h+var_C0]
addps	xmm2, xmm3
minps	xmm0, xmm2
movaps	xmmword	ptr [esi], xmm0
maxps	xmm1, xmm2
lea	esi, [esp+100h+var_C0]
movaps	[esp+100h+var_C0], xmm2
movaps	xmmword	ptr [ebx], xmm1
call	sub_6002B0
lea	ecx, [esp+100h+var_E4]
push	ecx
lea	ecx, [esp+104h+var_C5]
mov	[esp+104h+var_C5], 0
call	sub_4A00D0
mov	edx, [esp+100h+var_DC]
mov	ecx, [esp+100h+var_E0]
and	edx, 3FFFFFFFh
cmp	ecx, edx
jnz	short loc_600567
push	10h
lea	ecx, [esp+104h+var_E4]
push	ecx
push	eax
call	sub_121B830
mov	ecx, [esp+10Ch+var_E0]
add	esp, 0Ch

loc_600567:
movaps	xmm0, [esp+100h+var_C0]
mov	eax, [esp+100h+var_E8]
shl	ecx, 4
add	ecx, [esp+100h+var_E4]
movaps	xmmword	ptr [ecx], xmm0
inc	[esp+100h+var_E0]
test	eax, eax
jl	loc_60062E
inc	eax
mov	[esp+100h+var_E8], eax
jmp	short loc_600590
align 10h

loc_600590:
mov	eax, [esp+100h+var_D8]
mov	edx, [ebp+arg_0]
mov	edi, [ebp+arg_C]
shl	eax, 4
add	eax, [edx]
lea	esi, [esp+100h+var_C0]
movaps	xmm0, xmmword ptr [eax]
movaps	[esp+100h+var_C0], xmm0
call	sub_6002B0
lea	eax, [esp+100h+var_E4]
push	eax
lea	ecx, [esp+104h+var_D0]
mov	[esp+104h+var_D0], 0
call	sub_4A00D0
mov	edx, [esp+100h+var_DC]
mov	ecx, [esp+100h+var_E0]
and	edx, 3FFFFFFFh
cmp	ecx, edx
jnz	short loc_6005E9
push	10h
lea	ecx, [esp+104h+var_E4]
push	ecx
push	eax
call	sub_121B830
mov	ecx, [esp+10Ch+var_E0]
add	esp, 0Ch

loc_6005E9:
movaps	xmm0, [esp+100h+var_C0]
mov	eax, [ebp+arg_14]
shl	ecx, 4
add	ecx, [esp+100h+var_E4]
movaps	xmmword	ptr [ecx], xmm0
movaps	xmm1, xmmword ptr [eax]
minps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
mov	eax, [esp+100h+var_D8]
inc	eax
cdq
idiv	[esp+100h+var_CC]
movaps	xmm1, xmmword ptr [ebx]
mov	ecx, 1
add	[esp+100h+var_E0], ecx
sub	[esp+100h+var_E8], ecx
maxps	xmm1, xmm0
movaps	xmmword	ptr [ebx], xmm1
mov	[esp+100h+var_D8], edx
jnz	loc_600590

loc_60062E:
mov	ecx, [esp+100h+var_CC]
mov	eax, ecx
sub	eax, [esp+100h+var_A4]
mov	edi, [ebp+arg_C]
add	eax, [esp+100h+var_C4]
lea	esi, [esp+100h+var_C0]
cdq
idiv	ecx
mov	[esp+100h+var_E8], edx
mov	edx, [esp+100h+var_D8]
lea	eax, [edx+ecx-1]
cdq
idiv	ecx
mov	ecx, [ebp+arg_0]
mov	eax, edx
mov	edx, [ebp+arg_8]
movaps	xmm1, xmmword ptr [edx]
mov	[esp+100h+var_D8], eax
shl	eax, 4
add	eax, [ecx]
movaps	xmm0, xmmword ptr [eax]
addps	xmm0, xmm1
movaps	[esp+100h+var_C0], xmm0
call	sub_6002B0
lea	eax, [esp+100h+var_E4]
push	eax
lea	ecx, [esp+104h+var_C6]
mov	[esp+104h+var_C6], 0
call	sub_4A00D0
mov	edx, [esp+100h+var_DC]
mov	ecx, [esp+100h+var_E0]
and	edx, 3FFFFFFFh
cmp	ecx, edx
jnz	short loc_6006B2
push	10h
lea	ecx, [esp+104h+var_E4]
push	ecx
push	eax
call	sub_121B830
mov	ecx, [esp+10Ch+var_E0]
add	esp, 0Ch

loc_6006B2:
mov	eax, [esp+100h+var_D8]
inc	eax
cdq
idiv	[esp+100h+var_CC]
movaps	xmm0, [esp+100h+var_C0]
mov	esi, [ebp+arg_14]
mov	eax, [esp+100h+var_E8]
shl	ecx, 4
add	ecx, [esp+100h+var_E4]
dec	eax
movaps	xmmword	ptr [ecx], xmm0
movaps	xmm1, xmmword ptr [esi]
inc	[esp+100h+var_E0]
minps	xmm1, xmm0
movaps	xmmword	ptr [esi], xmm1
movaps	xmm1, xmmword ptr [ebx]
maxps	xmm1, xmm0
movaps	xmmword	ptr [ebx], xmm1
mov	[esp+100h+var_D8], edx
test	eax, eax
jle	loc_6007A3
mov	[esp+100h+var_E8], eax

loc_6006F9:
mov	eax, [esp+100h+var_D8]
mov	edx, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ecx]
mov	edi, [ebp+arg_C]
shl	eax, 4
add	eax, [edx]
lea	esi, [esp+100h+var_C0]
movaps	xmm1, xmmword ptr [eax]
addps	xmm0, xmm1
movaps	[esp+100h+var_C0], xmm0
call	sub_6002B0
lea	edx, [esp+100h+var_E4]
push	edx
lea	ecx, [esp+104h+var_CF]
mov	[esp+104h+var_CF], 0
call	sub_4A00D0
mov	edx, [esp+100h+var_DC]
mov	ecx, [esp+100h+var_E0]
and	edx, 3FFFFFFFh
cmp	ecx, edx
jnz	short loc_60075B
push	10h
lea	ecx, [esp+104h+var_E4]
push	ecx
push	eax
call	sub_121B830
mov	ecx, [esp+10Ch+var_E0]
add	esp, 0Ch

loc_60075B:
movaps	xmm0, [esp+100h+var_C0]
mov	eax, [ebp+arg_14]
shl	ecx, 4
add	ecx, [esp+100h+var_E4]
movaps	xmmword	ptr [ecx], xmm0
movaps	xmm1, xmmword ptr [eax]
minps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
mov	eax, [esp+100h+var_D8]
inc	eax
cdq
idiv	[esp+100h+var_CC]
movaps	xmm1, xmmword ptr [ebx]
mov	ecx, 1
add	[esp+100h+var_E0], ecx
sub	[esp+100h+var_E8], ecx
maxps	xmm1, xmm0
movaps	xmmword	ptr [ebx], xmm1
mov	[esp+100h+var_D8], edx
jnz	loc_6006F9
mov	esi, [ebp+arg_14]

loc_6007A3:
mov	edi, [ebp+arg_C]
movaps	xmm0, xmmword ptr [edi]
movaps	xmm1, ds:xmmword_1573EC0
andps	xmm0, xmm1
movaps	[esp+100h+var_90], xmm0
call	sub_6002B0
mov	esi, ebx
call	sub_6002B0
movaps	xmm0, xmmword ptr [ebx]
mov	ecx, [esp+100h+var_E0]
addps	xmm0, [esp+100h+var_90]
mov	eax, [esp+100h+var_E4]
movaps	xmmword	ptr [ebx], xmm0
mov	edx, ecx
shl	edx, 4
movaps	xmm1, xmmword ptr [edx+eax-10h]
xor	edi, edi
xor	ebx, ebx
cmp	ecx, edi
jle	loc_600953
jmp	short loc_6007F4
align 10h

loc_6007F0:
mov	eax, [esp+100h+var_E4]

loc_6007F4:
mov	ecx, [eax+edi]
mov	edx, [eax+edi+4]
mov	dword ptr [esp+100h+var_C0], ecx
mov	ecx, [eax+edi+8]
mov	dword ptr [esp+100h+var_C0+4], edx
mov	edx, [eax+edi+0Ch]
mov	eax, [ebp+arg_C]
mov	dword ptr [esp+100h+var_C0+8], ecx
mov	dword ptr [esp+100h+var_C0+0Ch], edx
movaps	xmm0, [esp+100h+var_C0]
subps	xmm0, xmm1
movaps	xmm1, xmmword ptr [eax]
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0C9h
movaps	xmm3, xmm1
movaps	[esp+100h+var_90], xmm0
shufps	xmm3, xmm1, 0D2h
shufps	xmm1, xmm1, 0C9h
shufps	xmm0, xmm0, 0D2h
mulps	xmm2, xmm3
mulps	xmm0, xmm1
subps	xmm2, xmm0
lea	ecx, [esp+100h+var_D1]
movaps	[esp+100h+var_A0], xmm2
call	sub_4D4F40
movaps	xmm0, [esp+100h+var_A0]
test	al, al
jz	short loc_60086B
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	[esp+100h+var_A0], xmm0

loc_60086B:
mulps	xmm0, [esp+100h+var_C0]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
addss	xmm1, xmm0
lea	ecx, [esp+100h+var_70]
shufps	xmm0, xmm0, 0AAh
push	ecx
addss	xmm0, xmm1
lea	ecx, [esp+104h+var_60]
movaps	[esp+104h+var_70], xmm0
call	sub_4D5050
lea	ecx, [esp+100h+var_60]
call	sub_4D50D0
fstp	dword ptr [esp+100h+var_A0+0Ch]
movaps	xmm0, [esp+100h+var_90]
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
addss	xmm1, xmm0
lea	edx, [esp+100h+var_40]
shufps	xmm0, xmm0, 0AAh
addss	xmm0, xmm1
push	edx
lea	ecx, [esp+104h+var_20]
movaps	[esp+104h+var_40], xmm0
call	sub_4D5050
lea	ecx, [esp+100h+var_20]
call	sub_4D50D0
fcomp	ds:flt_1479F24
fnstsw	ax
test	ah, 41h
jnz	short loc_60093E
mov	esi, [ebp+arg_18]
push	esi
lea	ecx, [esp+104h+var_CE]
mov	[esp+104h+var_CE], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_60092B
push	10h
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_60092B:
mov	eax, [esi+4]
movaps	xmm0, [esp+100h+var_A0]
shl	eax, 4
add	eax, [esi]
movaps	xmmword	ptr [eax], xmm0
inc	dword ptr [esi+4]

loc_60093E:
movaps	xmm1, [esp+100h+var_C0]
inc	ebx
add	edi, 10h
cmp	ebx, [esp+100h+var_E0]
jl	loc_6007F0
xor	edi, edi

loc_600953:
mov	[esp+100h+var_4], edi
lea	edx, [esp+100h+var_E4]
push	edx
lea	ecx, [esp+104h+var_CD]
mov	[esp+104h+var_CD], 0
call	sub_4A00D0
mov	edx, [esp+100h+var_DC]
mov	[esp+100h+var_E0], edi
test	edx, edx
js	short loc_60098C
mov	ecx, [esp+100h+var_E4]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_60098C:
mov	[esp+100h+var_E4], edi
mov	[esp+100h+var_DC], 80000000h
mov	[esp+100h+var_4], 0FFFFFFFFh
mov	ecx, [esp+100h+var_C]
pop	edi
pop	esi
mov	large fs:0, ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_600320 endp

align 10h


; Attributes: bp-based frame

sub_6009C0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 44h
push	ebx
push	esi
push	edi
mov	edi, eax
mov	eax, [ebp+arg_4]
xor	ebx, ebx
cmp	[eax+4], ebx
mov	[esp+50h+var_38], ebx
jle	short loc_600A57
mov	ecx, [eax]
mov	edi, edi

loc_6009E0:
lea	eax, [ebx+ecx]
lea	esi, [esp+50h+var_30]
call	sub_5FFFD0
mov	esi, [ebp+arg_4]
mov	eax, [esi]
movaps	xmm0, xmmword ptr [eax+ebx]
movaps	xmm1, [esp+50h+var_30]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
lea	ecx, [esp+50h+var_20]
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
push	ecx
addss	xmm2, xmm1
lea	ecx, [esp+54h+var_10]
movaps	[esp+54h+var_20], xmm2
call	sub_4D5050
lea	ecx, [esp+50h+var_10]
call	sub_4D50D0
fstp	[esp+50h+var_34]
mov	ecx, [esi]
fld	[esp+50h+var_34]
fld	dword ptr [ebx+ecx+0Ch]
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_600A6C
mov	eax, [esp+50h+var_38]
inc	eax
add	ebx, 10h
cmp	eax, [esi+4]
mov	[esp+50h+var_38], eax
jl	short loc_6009E0

loc_600A57:
mov	esi, [ebp+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_600A6C:
mov	esi, [ebp+arg_0]
push	0
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6009C0 endp

align 10h


; Attributes: bp-based frame

sub_600A90 proc	near

var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 34h
movaps	xmm1, ds:xmmword_1573EC0
push	ebx
mov	ebx, [ebp+arg_0]
movaps	xmm0, xmmword ptr [ebx+40h]
push	esi
push	edi
mov	esi, eax
mov	ecx, 8
lea	edi, [esp+40h+var_20]
rep movsd
lea	edi, [ebx+40h]
andps	xmm0, xmm1
lea	esi, [esp+40h+var_20]
movaps	[esp+40h+var_30], xmm0
call	sub_6002B0
lea	esi, [esp+40h+var_10]
call	sub_6002B0
movaps	xmm1, [esp+40h+var_10]
movaps	xmm0, [esp+40h+var_30]
movaps	xmm2, [esp+40h+var_20]
mov	esi, [ebp+arg_4]
addps	xmm0, xmm1
movaps	xmm1, xmmword ptr [ebx+90h]
cmpleps	xmm2, xmm1
movaps	xmm1, xmmword ptr [ebx+80h]
cmpleps	xmm1, xmm0
andps	xmm2, xmm1
movmskps eax, xmm2
and	eax, 7
movaps	[esp+40h+var_10], xmm0
cmp	al, 7
jz	short loc_600B25
push	0
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_600B25:
add	ebx, 0Ch
push	ebx
push	esi
lea	eax, [esp+48h+var_20]
call	sub_6009C0
add	esp, 8
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_600A90 endp

align 10h


; Attributes: bp-based frame

sub_600B50 proc	near

var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 34h
movaps	xmm1, ds:xmmword_1573EC0
push	ebx
mov	ebx, [ebp+arg_0]
movaps	xmm0, xmmword ptr [ebx+30h]
push	esi
push	edi
mov	esi, eax
mov	ecx, 8
lea	edi, [esp+40h+var_20]
rep movsd
lea	edi, [ebx+30h]
andps	xmm0, xmm1
lea	esi, [esp+40h+var_20]
movaps	[esp+40h+var_30], xmm0
call	sub_6002B0
lea	esi, [esp+40h+var_10]
call	sub_6002B0
movaps	xmm1, [esp+40h+var_10]
movaps	xmm0, [esp+40h+var_30]
movaps	xmm2, [esp+40h+var_20]
mov	esi, [ebp+arg_4]
addps	xmm0, xmm1
movaps	xmm1, xmmword ptr [ebx+70h]
cmpleps	xmm2, xmm1
movaps	xmm1, xmmword ptr [ebx+60h]
cmpleps	xmm1, xmm0
andps	xmm2, xmm1
movmskps eax, xmm2
and	eax, 7
movaps	[esp+40h+var_10], xmm0
cmp	al, 7
jz	short loc_600BDF
push	0
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_600BDF:
push	ebx
push	esi
lea	eax, [esp+48h+var_20]
call	sub_6009C0
add	esp, 8
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_600B50 endp

align 10h


; Attributes: bp-based frame

sub_600C00 proc	near

var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 34h
movaps	xmm1, ds:xmmword_1573EC0
push	ebx
mov	ebx, [ebp+arg_0]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	esi, eax
mov	ecx, 8
lea	edi, [esp+40h+var_20]
rep movsd
lea	edi, [ebx+50h]
andps	xmm0, xmm1
lea	esi, [esp+40h+var_20]
movaps	[esp+40h+var_30], xmm0
call	sub_6002B0
lea	esi, [esp+40h+var_10]
call	sub_6002B0
movaps	xmm1, [esp+40h+var_10]
movaps	xmm0, [esp+40h+var_30]
movaps	xmm2, [esp+40h+var_20]
mov	esi, [ebp+arg_4]
addps	xmm0, xmm1
movaps	xmm1, xmmword ptr [ebx+0B0h]
cmpleps	xmm2, xmm1
movaps	xmm1, xmmword ptr [ebx+0A0h]
cmpleps	xmm1, xmm0
andps	xmm2, xmm1
movmskps eax, xmm2
and	eax, 7
movaps	[esp+40h+var_10], xmm0
cmp	al, 7
jz	short loc_600C95
push	0
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_600C95:
add	ebx, 18h
push	ebx
push	esi
lea	eax, [esp+48h+var_20]
call	sub_6009C0
add	esp, 8
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_600C00 endp

align 10h



sub_600CC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	1
push	eax
mov	eax, [esp+8+arg_0]
push	edx
push	eax
call	sub_5FD890
retn	0Ch
sub_600CC0 endp

align 10h



sub_600CE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	1
push	eax
mov	eax, [esp+8+arg_0]
push	edx
push	eax
call	sub_600D00
retn	0Ch
sub_600CE0 endp

align 10h



sub_600D00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	edx
mov	edx, [esp+8+arg_0]
push	0
push	eax
push	edx
call	sub_600D20
retn	10h
sub_600D00 endp

align 10h



sub_600D20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_10]
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+4]
mov	ecx, [esp+10h+arg_8]
mov	esi, eax
sub	eax, ebx
sub	eax, ecx
mov	[esp+10h+arg_10], eax
mov	eax, [edi+8]
sub	esi, ecx
add	esi, ebp
and	eax, 3FFFFFFFh
cmp	eax, esi
jge	short loc_600D6C
add	eax, eax
cmp	esi, eax
jl	short loc_600D57
mov	eax, esi

loc_600D57:
push	4
push	eax
mov	eax, [esp+18h+arg_0]
push	edi
push	eax
call	sub_121B8C0
mov	ecx, [esp+20h+arg_8]
add	esp, 10h

loc_600D6C:
mov	edx, [esp+10h+arg_10]
mov	eax, [edi]
add	edx, edx
add	edx, edx
push	edx
add	ecx, ebx
lea	edx, [eax+ecx*4]
push	edx
lea	ecx, [ebx+ebp]
lea	edx, [eax+ecx*4]
push	edx
call	sub_AD3070
mov	eax, [edi]
add	esp, 0Ch
lea	eax, [eax+ebx*4]
test	ebp, ebp
jle	short loc_600DAD
mov	ecx, [esp+10h+arg_C]
sub	ecx, eax
jmp	short loc_600DA0
align 10h

loc_600DA0:
mov	edx, [ecx+eax]
mov	[eax], edx
add	eax, 4
sub	ebp, 1
jnz	short loc_600DA0

loc_600DAD:
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h
sub_600D20 endp

align 10h


; Attributes: bp-based frame

sub_600DC0 proc	near

var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_30=	byte ptr -30h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 64h
push	ebx
push	esi
push	edi
lea	ecx, [esp+70h+var_60]
call	sub_859230

loc_600DD5:
mov	edx, [ebp+arg_4]
mov	ebx, [ebp+arg_8]
lea	eax, [edx+ebx]
sar	eax, 1
lea	esi, [eax+eax*2]
shl	esi, 4
add	esi, [ebp+arg_0]
mov	ecx, 0Ch
lea	edi, [esp+70h+var_60]
mov	[esp+70h+var_64], edx
rep movsd
jmp	short loc_600E04
align 10h

loc_600E00:
mov	edx, [esp+70h+var_64]

loc_600E04:
mov	ecx, [ebp+arg_0]
lea	eax, [edx+edx*2]
shl	eax, 4
lea	esi, [eax+ecx]
lea	edx, [esp+70h+var_60]
push	edx
mov	ecx, esi
call	sub_859300
test	eax, eax
jz	short loc_600E37

loc_600E20:
inc	[esp+70h+var_64]
lea	eax, [esp+70h+var_60]
add	esi, 30h
push	eax
mov	ecx, esi
call	sub_859300
test	eax, eax
jnz	short loc_600E20

loc_600E37:
mov	edi, [ebp+arg_0]
lea	ecx, [ebx+ebx*2]
shl	ecx, 4
lea	esi, [ecx+edi]
push	esi
lea	ecx, [esp+74h+var_60]
call	sub_859300
test	eax, eax
jz	short loc_600E63

loc_600E51:
sub	esi, 30h
push	esi
lea	ecx, [esp+74h+var_60]
dec	ebx
call	sub_859300
test	eax, eax
jnz	short loc_600E51

loc_600E63:
mov	esi, [esp+70h+var_64]
cmp	ebx, esi
jl	short loc_600EC0
jz	short loc_600EAF
lea	ecx, [esp+70h+var_30]
call	sub_859230
lea	edx, [esi+esi*2]
lea	eax, [ebx+ebx*2]
shl	eax, 4
add	eax, edi
shl	edx, 4
add	edx, edi
mov	ecx, 0Ch
mov	esi, eax
lea	edi, [esp+70h+var_30]
rep movsd
mov	ecx, 0Ch
mov	esi, edx
mov	edi, eax
rep movsd
mov	ecx, 0Ch
lea	esi, [esp+70h+var_30]
mov	edi, edx
rep movsd
mov	esi, [esp+70h+var_64]

loc_600EAF:
inc	esi
dec	ebx
cmp	esi, ebx
mov	[esp+70h+var_64], esi
jle	loc_600E00
mov	edi, [ebp+arg_0]

loc_600EC0:
mov	eax, [ebp+arg_4]
cmp	eax, ebx
jge	short loc_600ED6
mov	edx, [ebp+arg_C]
push	edx
push	ebx
push	eax
push	edi
call	sub_600DC0
add	esp, 10h

loc_600ED6:
cmp	esi, [ebp+arg_8]
jge	short loc_600EE3
mov	[ebp+arg_4], esi
jmp	loc_600DD5

loc_600EE3:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_600DC0 endp

align 10h



sub_600EF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1256920
test	[esp+4+arg_0], 1
jz	short loc_600F1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_600F1A:
mov	eax, esi
pop	esi
retn	4
sub_600EF0 endp



; Attributes: bp-based frame

sub_600F20 proc	near

var_54=	dword ptr -54h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 60h
movaps	xmm0, xmmword ptr [esi]
movaps	[esp+60h+var_10], xmm0
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+60h+var_40]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+64h+var_50]
movaps	[esp+64h+var_40], xmm2
call	sub_4D5050
fldz
movaps	xmm1, [esp+60h+var_50]
fstp	[esp+60h+var_54]
fld	dword ptr off_17E66B4
xorps	xmm0, xmm0
movss	xmm2, [esp+60h+var_54]
movss	xmm0, xmm2
movaps	xmm2, xmm0
movaps	xmm0, [esp+60h+var_50]
fstp	[esp+60h+var_54]
movss	xmm4, [esp+60h+var_54]
fld	ds:dword_1479C58
movaps	xmm3, xmm0
fstp	[esp+60h+var_54]
cmpeqss	xmm3, xmm2
rsqrtss	xmm1, xmm1
mulss	xmm0, xmm1
mulss	xmm0, xmm1
xorps	xmm2, xmm2
movss	xmm2, xmm4
movss	xmm4, [esp+60h+var_54]
subss	xmm2, xmm0
xorps	xmm0, xmm0
movss	xmm0, xmm4
lea	ecx, [esp+60h+var_30]
mulss	xmm0, xmm1
mulss	xmm0, xmm2
push	ecx
andnps	xmm3, xmm0
lea	ecx, [esp+64h+var_20]
movaps	[esp+64h+var_30], xmm3
call	sub_4D5050
movaps	xmm1, xmmword ptr [esi]
movaps	xmm0, [esp+60h+var_20]
xorps	xmm2, xmm2
cmpltps	xmm1, xmm2
movmskps edx, xmm1
shufps	xmm0, xmm0, 0
mulps	xmm0, [esp+60h+var_10]
test	dl, 8
jz	short loc_601012
movaps	xmm1, ds:xmmword_1573EB0
xorps	xmm1, xmm0
movaps	xmmword	ptr [edi], xmm1
mov	esp, ebp
pop	ebp
retn

loc_601012:
movaps	xmmword	ptr [edi], xmm0
mov	esp, ebp
pop	ebp
retn
sub_600F20 endp

align 10h


; Attributes: bp-based frame

sub_601020 proc	near

var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 40h
movaps	xmm0, xmmword ptr [eax]
mulps	xmm0, xmm0
movaps	xmm1, xmm0
lea	ecx, [esp+40h+var_40]
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
push	ecx
addss	xmm2, xmm1
lea	ecx, [esp+44h+var_30]
movaps	[esp+44h+var_40], xmm2
call	sub_4D5050
movaps	xmm0, [esp+40h+var_30]
lea	edx, [esp+40h+var_20]
sqrtss	xmm0, xmm0
push	edx
lea	ecx, [esp+44h+var_10]
movaps	[esp+44h+var_20], xmm0
call	sub_4D5050
lea	ecx, [esp+40h+var_10]
call	sub_4D50D0
fcomp	ds:dword_1480254
fnstsw	ax
test	ah, 41h
jnz	short loc_601099
mov	al, 1
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
mov	esp, ebp
pop	ebp
retn

loc_601099:
xor	al, al
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
mov	esp, ebp
pop	ebp
retn
sub_601020 endp

align 10h



sub_6010B0 proc	near
push	ebx
mov	eax, 1
mov	[edi+6], ax
push	esi
mov	dword ptr [edi], offset	off_15CD5C0
lea	ebx, [edi+10h]
mov	ecx, 8000h
lea	esi, [edi+18h]
mov	eax, 0FA0h
mov	dword ptr [ebx], 0FFFFFFF1h
mov	[ebx+4], cx
call	sub_AD1D90
mov	eax, ebx
mov	dword ptr [edi+8], 1
call	sub_AD1D70
pop	esi
mov	dword ptr [edi+0Ch], 0
mov	eax, edi
pop	ebx
retn
sub_6010B0 endp

align 10h



sub_601100 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+18h]
push	eax		; lpCriticalSection
call	ds:DeleteCriticalSection
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_601136
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_601136:
mov	eax, esi
pop	esi
retn	4
sub_601100 endp

align 10h



sub_601140 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD3A20
test	[esp+4+arg_0], 1
jz	short loc_60116A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60116A:
mov	eax, esi
pop	esi
retn	4
sub_601140 endp




sub_601170 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+8]
call	sub_AD3ED0
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_6011A4
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6011A4:
mov	eax, esi
pop	esi
retn	4
sub_601170 endp

align 10h



sub_6011B0 proc	near
mov	eax, [ecx+64h]
and	eax, 0FFFFFFFEh
retn
sub_6011B0 endp

align 10h



sub_6011C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+5Ch], eax
retn	4
sub_6011C0 endp

align 10h



sub_6011D0 proc	near
mov	eax, [ecx+60h]
retn
sub_6011D0 endp

align 10h



sub_6011E0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_AD1960
test	[esp+4+arg_0], 1
jz	short loc_60120A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60120A:
mov	eax, edi
pop	edi
retn	4
sub_6011E0 endp




sub_601210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	eax
mov	eax, [esp+4+arg_4]
push	ecx
push	edx
call	sub_601230
retn	8
sub_601210 endp

align 10h



sub_601230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	edi
mov	edi, eax
mov	eax, [esi+4]
lea	ebp, [eax+edi]
sub	eax, ebx
mov	[esp+0Ch+arg_4], eax
mov	eax, [esi+8]
and	eax, 3FFFFFFFh
cmp	eax, ebp
jge	short loc_60126A
add	eax, eax
cmp	ebp, eax
jl	short loc_601259
mov	eax, ebp

loc_601259:
push	1
push	eax
mov	eax, [esp+14h+arg_0]
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_60126A:
mov	ecx, [esi]
mov	edx, [esp+0Ch+arg_4]
lea	eax, [ecx+ebx]
push	edx
push	eax
add	eax, edi
push	eax
call	sub_AD3070
mov	eax, [esi]
add	esp, 0Ch
add	eax, ebx
test	edi, edi
jle	short loc_60129B
mov	ecx, [esp+0Ch+arg_8]
sub	ecx, eax
mov	edi, edi

loc_601290:
mov	dl, [ecx+eax]
mov	[eax], dl
inc	eax
sub	edi, 1
jnz	short loc_601290

loc_60129B:
pop	edi
mov	[esi+4], ebp
pop	ebp
pop	ebx
retn	0Ch
sub_601230 endp

align 10h



sub_6012B0 proc	near
push	ebx
mov	ebx, [eax+4]
push	ebp
push	esi
xor	esi, esi
push	edi
test	ebx, ebx
jle	short loc_6012D9
mov	ebp, [eax]
mov	edi, ebp

loc_6012C1:
mov	eax, [edi]
mov	ecx, offset aHk_dataobjectt ; "hk.DataObjectType"
call	sub_AD31D0
test	eax, eax
jz	short loc_6012E0
inc	esi
add	edi, 0Ch
cmp	esi, ebx
jl	short loc_6012C1

loc_6012D9:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_6012E0:
pop	edi
lea	eax, [esi+esi*2]
pop	esi
lea	eax, [ebp+eax*4+4]
pop	ebp
pop	ebx
retn
sub_6012B0 endp

align 10h


; Attributes: bp-based frame

sub_6012F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
movaps	xmm1, xmmword ptr [eax]
movaps	xmm2, xmmword ptr [eax+10h]
movaps	xmm3, xmmword ptr [eax+20h]
mov	edx, [ebp+arg_C]
dec	ecx
sub	esp, 0Ch
mov	eax, ecx
push	esi
mov	esi, [ebp+arg_4]
shl	eax, 4
add	eax, esi
sub	edx, esi
jmp	short loc_601320
align 10h

loc_601320:
movaps	xmm0, xmmword ptr [eax]
movaps	xmm4, xmm0
shufps	xmm4, xmm0, 55h
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 0
mulps	xmm5, xmm1
mulps	xmm4, xmm2
addps	xmm4, xmm5
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 0AAh
mulps	xmm5, xmm3
addps	xmm4, xmm5
movaps	xmmword	ptr [edx+eax], xmm4
dec	ecx
sub	eax, 10h
test	ecx, ecx
jge	short loc_601320
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_6012F0 endp

align 10h


; Attributes: bp-based frame

sub_601360 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, [ebp+arg_0]
movaps	xmm1, xmmword ptr [eax+30h]
mov	edx, [ebp+arg_4]
movaps	xmm0, xmmword ptr [edx]
movaps	xmm3, xmmword ptr [eax+10h]
movaps	xmm5, xmmword ptr [eax+20h]
subps	xmm0, xmm1
movaps	xmm1, xmmword ptr [eax]
movaps	xmm2, xmm1
unpcklps xmm2, xmm3
unpckhps xmm1, xmm3
movaps	xmm3, xmm1
movaps	xmm4, xmm2
movlhps	xmm4, xmm5
movaps	xmm1, xmm4
movhlps	xmm1, xmm2
shufps	xmm1, xmm5, 0D4h
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 55h
mulps	xmm2, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
mulps	xmm1, xmm4
shufps	xmm3, xmm5, 0E4h
shufps	xmm0, xmm0, 0AAh
addps	xmm2, xmm1
mulps	xmm3, xmm0
addps	xmm2, xmm3
movaps	xmmword	ptr [ecx], xmm2
mov	esp, ebp
pop	ebp
retn	8
sub_601360 endp

align 10h



sub_6013D0 proc	near

var_8C=	byte ptr -8Ch
var_8A=	byte ptr -8Ah
var_89=	byte ptr -89h
var_88=	byte ptr -88h
arg_4= dword ptr  8

sub	esp, 90h
push	esi
lea	ecx, [esp+94h+var_8C]
call	sub_4D6700
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	14h
call	eax
mov	esi, eax
mov	eax, [esp+90h+arg_4]
lea	edx, [esp+90h+var_88]
push	edx
mov	ecx, 14h
push	eax
mov	[esi+4], cx
call	off_17E64F0
add	esp, 8
push	eax		; char *
call	sub_AD13D0
mov	esi, eax
mov	edx, [esi]
mov	edx, [edx+18h]
push	0
lea	ecx, [esp+94h+var_89]
push	ecx
lea	eax, [esp+98h+var_8A]
push	eax
mov	ecx, esi
call	edx
mov	ecx, eax
call	sub_4D4F60
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_601490
push	edi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	24h
call	eax
mov	ecx, 24h
mov	[eax+4], cx
mov	ecx, esi
mov	edi, eax
call	sub_AD12B0
mov	ecx, esi
mov	edi, eax
call	sub_AD6020
lea	ecx, [esp+98h+var_8C]
call	sub_4D9070
mov	eax, edi
pop	edi
pop	esi
add	esp, 90h
retn	4

loc_601490:
lea	ecx, [esp+94h+var_8C]
call	sub_4D9070
mov	eax, esi
pop	esi
add	esp, 90h
retn	4
sub_6013D0 endp

align 10h



sub_6014B0 proc	near

var_8C=	byte ptr -8Ch
arg_0= dword ptr  4

sub	esp, 8Ch
push	esi
push	edi
lea	ecx, [esp+94h+var_8C]
call	sub_4D6700
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	10h
call	eax
mov	esi, eax
mov	eax, [esp+94h+arg_0]
lea	edx, [esp+94h+var_8C]
push	edx
mov	ecx, 10h
push	eax
mov	[esi+4], cx
call	off_17E64F0
add	esp, 8
mov	edi, eax
call	sub_AD0F00
mov	edi, eax
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	1Ch
call	eax
push	1000h
mov	ecx, 1Ch
push	edi
mov	esi, eax
mov	[eax+4], cx
call	sub_AD1D00
mov	ecx, edi
mov	esi, eax
call	sub_AD6020
lea	ecx, [esp+94h+var_8C]
call	sub_4D9070
pop	edi
mov	eax, esi
pop	esi
add	esp, 8Ch
retn	4
sub_6014B0 endp

align 10h



sub_601550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	eax
push	ecx
call	off_17E64EC
add	esp, 8
retn	8
sub_601550 endp

align 10h



sub_601570 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_6015B0
test	[esp+4+arg_0], 1
jz	short loc_60159B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60159B:
mov	eax, esi
pop	esi
retn	4
sub_601570 endp

align 10h



sub_6015B0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
add	esi, 8
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ebx, eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_6015E8
push	ebp
mov	ebp, eax

loc_6015D8:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	ebp, 1
jnz	short loc_6015D8
pop	ebp

loc_6015E8:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_60160E
mov	edx, [ebx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_60160E:
mov	ecx, [esp+10h+arg_0]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_6015B0 endp

align 10h



sub_601630 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	edi
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi]
mov	ebx, eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_601663
push	ebp
lea	edi, [ecx+8]
mov	ebp, eax

loc_601653:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 10h
sub	ebp, 1
jnz	short loc_601653
pop	ebp

loc_601663:
mov	eax, [esi+8]
mov	edi, 80000000h
mov	dword ptr [esi+4], 0
test	edi, eax
jnz	short loc_60168B
mov	edx, [ebx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
shl	eax, 4
push	eax
mov	eax, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_60168B:
mov	[esi+8], edi
pop	edi
mov	dword ptr [esi], 0
pop	ebx
pop	ecx
retn
sub_601630 endp

align 10h



sub_6016A0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_608380
test	[esp+4+arg_0], 1
jz	short loc_6016CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6016CA:
mov	eax, edi
pop	edi
retn	4
sub_6016A0 endp




sub_6016D0 proc	near
xor	eax, eax
retn	8
sub_6016D0 endp

align 10h



sub_6016E0 proc	near
mov	eax, 1
retn	4
sub_6016E0 endp

align 10h



sub_6016F0 proc	near
mov	eax, 1
retn	8
sub_6016F0 endp

align 10h



sub_601700 proc	near
call	sub_AD4430
mov	eax, ecx
retn	4
sub_601700 endp

align 10h



sub_601710 proc	near
push	ebx
push	offset LibFileName ; "dbghelp.dll"
call	ds:LoadLibraryA
mov	ebx, ds:OutputDebugStringA
mov	[esi], eax
test	eax, eax
jnz	short loc_601738
push	offset OutputString ; "Havok StackTracer: hkStackTracer: Unabl"...
call	ebx ; OutputDebugStringA
cmp	dword ptr [esi], 0
jz	loc_6017F4

loc_601738:
mov	eax, [esi]
push	edi
mov	edi, ds:GetProcAddress
push	offset ProcName	; "SymInitialize"
push	eax		; hModule
mov	dword ptr [esi+4], 1
call	edi ; GetProcAddress
mov	ecx, [esi]
push	offset aSymrefreshmodu ; "SymRefreshModuleList"
push	ecx		; hModule
mov	[esi+8], eax
call	edi ; GetProcAddress
mov	[esi+0Ch], eax
test	eax, eax
jnz	short loc_60176B
push	offset aHavokStacktr_0 ; "Havok	StackTracer: Could not load symbo"...
call	ebx ; OutputDebugStringA

loc_60176B:
mov	edx, [esi]
push	offset aSymgetoptions ;	"SymGetOptions"
push	edx		; hModule
call	edi ; GetProcAddress
mov	[esi+10h], eax
mov	eax, [esi]
push	offset aSymsetoptions ;	"SymSetOptions"
push	eax		; hModule
call	edi ; GetProcAddress
mov	ecx, [esi]
push	offset aSymgetsymfroma ; "SymGetSymFromAddr"
push	ecx		; hModule
mov	[esi+14h], eax
call	edi ; GetProcAddress
mov	edx, [esi]
push	offset aStackwalk64 ; "StackWalk64"
push	edx		; hModule
mov	[esi+18h], eax
call	edi ; GetProcAddress
mov	[esi+1Ch], eax
mov	eax, [esi]
push	offset aSymfunctiontab ; "SymFunctionTableAccess64"
push	eax		; hModule
call	edi ; GetProcAddress
mov	ecx, [esi]
push	offset aSymgetmoduleba ; "SymGetModuleBase64"
push	ecx		; hModule
mov	[esi+20h], eax
call	edi ; GetProcAddress
mov	edx, [esi]
push	offset aSymgetlinefrom ; "SymGetLineFromAddr64"
push	edx		; hModule
mov	[esi+24h], eax
call	edi ; GetProcAddress
mov	[esi+28h], eax
mov	eax, [esi]
push	offset aSymcleanup ; "SymCleanup"
push	eax		; hModule
call	edi ; GetProcAddress
mov	ecx, [esi+10h]
mov	[esi+2Ch], eax
call	ecx
mov	edx, [esi+14h]
or	eax, 80000010h
push	eax
call	edx
push	1
push	0
call	ds:GetCurrentProcess
push	eax
mov	eax, [esi+8]
call	eax
pop	edi

loc_6017F4:
pop	ebx
retn
sub_601710 endp

align 10h



sub_601800 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_AD41F0
test	[esp+4+arg_0], 1
jz	short loc_60182B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60182B:
mov	eax, esi
pop	esi
retn	4
sub_601800 endp

align 10h



sub_601840 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
add	[ecx+0Ch], eax
retn	4
sub_601840 endp

align 10h



sub_601850 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
mov	edx, [eax+0Ch]
dec	edx
imul	edx, [eax]
add	edx, [eax+4]
push	esi
cmp	[ecx+0Ch], edx
mov	esi, [esp+4+arg_0]
setle	al
movzx	ecx, al
push	ecx
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	4
sub_601850 endp

align 10h



sub_601880 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_121A650
test	[esp+4+arg_0], 1
jz	short loc_6018AA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6018AA:
mov	eax, edi
pop	edi
retn	4
sub_601880 endp




sub_6018B0 proc	near
push	esi
mov	esi, ecx
lea	eax, [esi+8]
push	eax		; lpCriticalSection
call	ds:DeleteCriticalSection
mov	ecx, esi
call	sub_AD00F0
mov	eax, esi
pop	esi
retn	4
sub_6018B0 endp

align 10h



sub_6018D0 proc	near
call	sub_AD00F0
mov	eax, ecx
retn	4
sub_6018D0 endp

align 10h



sub_6018E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_4DACB0
test	[esp+4+arg_0], 1
jz	short loc_60190A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60190A:
mov	eax, esi
pop	esi
retn	4
sub_6018E0 endp



; Attributes: bp-based frame

sub_601910 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, [ebp+arg_0]
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ecx], xmm0
movaps	xmm0, xmmword ptr [eax+10h]
movaps	xmmword	ptr [ecx+10h], xmm0
movaps	xmm0, xmmword ptr [eax+20h]
movaps	xmmword	ptr [ecx+20h], xmm0
movaps	xmm0, xmmword ptr [eax+30h]
movaps	xmmword	ptr [ecx+30h], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_601910 endp

align 10h


; Attributes: bp-based frame

sub_601940 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	ecx
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_0]
lea	ecx, [ecx+0]

loc_601950:
mov	eax, [ebp+arg_4]
mov	ebx, [ebp+arg_8]
mov	[esp+10h+var_4], eax
add	eax, ebx
sar	eax, 1
mov	edx, [edi+eax*4]

loc_601961:
mov	eax, [ebp+arg_C]
mov	ecx, [eax]

loc_601966:
mov	eax, [esp+10h+var_4]
mov	eax, [edi+eax*4]
fld	dword ptr [ecx+eax*8]
lea	esi, [ecx+eax*8]
fld	dword ptr [ecx+edx*8]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_60199D
fld	dword ptr [esi]
fld	dword ptr [ecx+edx*8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6019A3
fld	dword ptr [esi+4]
fld	dword ptr [ecx+edx*8+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_6019A3

loc_60199D:
inc	[esp+10h+var_4]
jmp	short loc_601966

loc_6019A3:
mov	eax, [edi+ebx*4]
fld	dword ptr [ecx+edx*8]
fld	dword ptr [ecx+eax*8]
lea	esi, [ecx+eax*8]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_6019D6
fld	dword ptr [ecx+edx*8]
fld	dword ptr [esi]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6019D9
fld	dword ptr [ecx+edx*8+4]
fld	dword ptr [esi+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_6019D9

loc_6019D6:
dec	ebx
jmp	short loc_6019A3

loc_6019D9:
mov	esi, [esp+10h+var_4]
cmp	ebx, esi
jl	short loc_6019FD
jz	short loc_6019EF
mov	ecx, [edi+esi*4]
mov	eax, [edi+ebx*4]
mov	[edi+ebx*4], ecx
mov	[edi+esi*4], eax

loc_6019EF:
inc	esi
dec	ebx
cmp	esi, ebx
mov	[esp+10h+var_4], esi
jle	loc_601961

loc_6019FD:
mov	eax, [ebp+arg_4]
cmp	eax, ebx
jge	short loc_601A13
mov	edx, [ebp+arg_C]
push	edx
push	ebx
push	eax
push	edi
call	sub_601940
add	esp, 10h

loc_601A13:
cmp	esi, [ebp+arg_8]
jge	short loc_601A20
mov	[ebp+arg_4], esi
jmp	loc_601950

loc_601A20:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_601940 endp

align 10h



sub_601A30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
cmp	eax, [esp+arg_8]
push	esi
mov	esi, [esp+4+arg_0]
setb	cl
movzx	edx, cl
push	edx
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn
sub_601A30 endp

align 10h


; Attributes: bp-based frame

sub_601A50 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 14h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
nop

loc_601A60:
mov	edi, [ebp+arg_8]
mov	ebx, [ebp+arg_4]
lea	eax, [ebx+edi]
sar	eax, 1
mov	ecx, [esi+eax*4]
mov	[esp+20h+var_10], ecx

loc_601A72:
mov	edx, [esp+20h+var_10]
mov	eax, [esi+ebx*4]
push	edx
push	eax
lea	ecx, [esp+28h+var_12]
push	ecx
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_601AB2

loc_601A91:
mov	edx, [esp+20h+var_10]
mov	eax, [esi+ebx*4+4]
inc	ebx
push	edx
push	eax
lea	ecx, [esp+28h+var_12]
push	ecx
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_601A91

loc_601AB2:
mov	edx, [esi+edi*4]
mov	eax, [esp+20h+var_10]
push	edx
push	eax
lea	ecx, [esp+28h+var_11]
push	ecx
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_601AF2

loc_601AD1:
mov	edx, [esi+edi*4-4]
mov	eax, [esp+20h+var_10]
dec	edi
push	edx
push	eax
lea	ecx, [esp+28h+var_11]
push	ecx
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_601AD1

loc_601AF2:
cmp	edi, ebx
jl	short loc_601B0E
jz	short loc_601B04
mov	edx, [esi+ebx*4]
mov	eax, [esi+edi*4]
mov	[esi+edi*4], edx
mov	[esi+ebx*4], eax

loc_601B04:
dec	edi
inc	ebx
cmp	ebx, edi
jle	loc_601A72

loc_601B0E:
mov	eax, [ebp+arg_4]
cmp	eax, edi
jge	short loc_601B24
mov	ecx, [ebp+arg_C]
push	ecx
push	edi
push	eax
push	esi
call	sub_601A50
add	esp, 10h

loc_601B24:
cmp	ebx, [ebp+arg_8]
jge	short loc_601B31
mov	[ebp+arg_4], ebx
jmp	loc_601A60

loc_601B31:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_601A50 endp

align 10h



; int __thiscall sub_601B40(void *, char)
sub_601B40 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CF154
jz	short loc_601B59
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_601B59:
mov	eax, esi
pop	esi
retn	4
sub_601B40 endp

align 10h



sub_601B60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	8
sub_601B60 endp

align 10h



sub_601B80 proc	near
mov	eax, [ecx]
mov	eax, [eax+4]
jmp	eax
sub_601B80 endp

align 10h



sub_601B90 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+8]
push	edx
call	eax
retn	8
sub_601B90 endp

align 10h



sub_601BA0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi+8], offset off_15CF154
call	sub_4DA650
mov	eax, esi
pop	esi
retn	4
sub_601BA0 endp

align 10h



sub_601BC0 proc	near
sub	ecx, 8
jmp	sub_601BA0
sub_601BC0 endp

align 10h



sub_601BD0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
shr	ebx, 3
push	esi
lea	ecx, [ebx-1]
xor	esi, esi
mov	[edi], eax
mov	dword ptr [edi+4], 80000000h
mov	[edi+8], ecx
test	ebx, ebx
jle	short loc_601C03
mov	edi, edi

loc_601BF0:
mov	edx, [edi]
lea	eax, [edx+esi*8]
push	eax
call	sub_4DEFE0
inc	esi
add	esp, 4
cmp	esi, ebx
jl	short loc_601BF0

loc_601C03:
pop	esi
mov	eax, edi
pop	ebx
retn	4
sub_601BD0 endp

align 10h



sub_601C10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
push	ebx
mov	ebx, [esp+4+arg_4]
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_601C39
lea	edx, [eax+eax+2]
mov	eax, [esp+8+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_4E1460

loc_601C39:
mov	ecx, [esi+8]
push	ecx
push	ebx
call	sub_4DEFC0
mov	edx, [esi]
mov	edi, eax
mov	eax, [edx+edi*8]
push	ebx
push	eax
call	sub_4DF000
add	esp, 10h
test	eax, eax
jnz	short loc_601C9A

loc_601C58:
mov	ecx, [esi]
mov	edx, [ecx+edi*8]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	short loc_601C88
mov	eax, [esi]
inc	edi
and	edi, [esi+8]
push	ebx
mov	ecx, [eax+edi*8]
push	ecx
call	sub_4DF000
add	esp, 8
test	eax, eax
jz	short loc_601C58
mov	eax, edi
pop	edi
pop	ebx
retn	8

loc_601C88:
mov	edx, [esi]
mov	[edx+edi*8], ebx
mov	eax, [esi]
mov	dword ptr [eax+edi*8+4], 0
inc	dword ptr [esi+4]

loc_601C9A:
mov	eax, edi
pop	edi
pop	ebx
retn	8
sub_601C10 endp

align 10h



sub_601CB0 proc	near

var_2= byte ptr	-2
arg_0= dword ptr  4

push	ecx
push	edi
push	eax
mov	ecx, esi
call	sub_4DFAF0
mov	edi, eax
push	edi
lea	ecx, [esp+0Bh]
push	ecx
mov	ecx, esi
call	sub_4DDD50
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_601CE9
push	edi
mov	ecx, esi
call	sub_4DDCD0
mov	edx, [esp+8+arg_0]
mov	[edx], eax
xor	eax, eax
pop	edi
pop	ecx
retn	4

loc_601CE9:
mov	eax, 1
pop	edi
pop	ecx
retn	4
sub_601CB0 endp

align 10h



sub_601D00 proc	near
mov	eax, [eax+8]
lea	eax, ds:8[eax*8]
retn
sub_601D00 endp

align 10h



sub_601D10 proc	near
add	ecx, ecx
mov	eax, 8
cmp	ecx, eax
jle	short loc_601D26
jmp	short loc_601D20
align 10h

loc_601D20:
add	eax, eax
cmp	eax, ecx
jl	short loc_601D20

loc_601D26:
add	eax, eax
add	eax, eax
add	eax, eax
retn
sub_601D10 endp

align 10h



sub_601D30 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
shr	edx, 4
mov	[eax], ecx
lea	ecx, [edx-1]
mov	dword ptr [eax+4], 80000000h
mov	[eax+8], ecx
test	edx, edx
jle	short locret_601D6A
push	esi
xor	ecx, ecx
mov	esi, edx
nop

loc_601D50:
mov	edx, [eax]
mov	dword ptr [ecx+edx], 0FFFFFFFFh
mov	dword ptr [ecx+edx+4], 0FFFFFFFFh
add	ecx, 10h
sub	esi, 1
jnz	short loc_601D50
pop	esi

locret_601D6A:
retn	4
sub_601D30 endp

align 10h


; Attributes: bp-based frame

sub_601D70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_601D9B
mov	edx, [ebp+arg_0]
lea	eax, [eax+eax+2]
push	edx
call	sub_6020C0

loc_601D9B:
mov	ecx, [ebp+arg_4]
mov	eax, [esi+8]
mov	edi, [esi]
shr	ecx, 4
imul	ecx, 9E3779B1h
mov	[esp+10h+var_4], 1
and	ecx, eax

loc_601DB6:
mov	edx, ecx
shl	edx, 4
mov	ebx, [edx+edi]
mov	edx, [edx+edi+4]
mov	eax, ebx
and	eax, edx
cmp	eax, 0FFFFFFFFh
jz	short loc_601DDF
cmp	ebx, [ebp+arg_4]
jnz	short loc_601DD5
cmp	edx, [ebp+arg_8]
jz	short loc_601DDB

loc_601DD5:
inc	ecx
and	ecx, [esi+8]
jmp	short loc_601DB6

loc_601DDB:
xor	eax, eax
jmp	short loc_601DE3

loc_601DDF:
mov	eax, [esp+10h+var_4]

loc_601DE3:
add	[esi+4], eax
mov	edx, [ebp+arg_4]
shl	ecx, 4
mov	[edi+ecx], edx
mov	edx, [ebp+arg_8]
mov	[edi+ecx+4], edx
mov	esi, [esi]
mov	edx, [ebp+arg_C]
mov	[ecx+esi+8], edx
mov	edx, [ebp+arg_10]
pop	edi
mov	[ecx+esi+0Ch], edx
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_601D70 endp

align 10h


; Attributes: bp-based frame

sub_601E10 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
push	edi
mov	edi, [ecx+8]
test	edi, edi
jle	short loc_601E53
mov	eax, [ebp+arg_0]
mov	esi, [ecx]
shr	eax, 4
imul	eax, 9E3779B1h

loc_601E2F:
and	eax, edi
mov	ecx, eax
shl	ecx, 4
mov	edx, [ecx+esi]
mov	ecx, [ecx+esi+4]
mov	ebx, edx
and	ebx, ecx
cmp	ebx, 0FFFFFFFFh
jz	short loc_601E53
cmp	edx, [ebp+arg_0]
jnz	short loc_601E50
cmp	ecx, [ebp+arg_4]
jz	short loc_601E56

loc_601E50:
inc	eax
jmp	short loc_601E2F

loc_601E53:
lea	eax, [edi+1]

loc_601E56:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_601E10 endp

align 10h


; Attributes: bp-based frame

sub_601E60 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= qword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
push	edi
mov	edi, [ecx+8]
test	edi, edi
jle	short loc_601EB7
mov	edx, [ebp+arg_0]
mov	esi, [ecx]
shr	edx, 4
imul	edx, 9E3779B1h

loc_601E7F:
and	edx, edi
mov	eax, edx
shl	eax, 4
mov	ecx, [eax+esi]
mov	eax, [eax+esi+4]
mov	ebx, ecx
and	ebx, eax
cmp	ebx, 0FFFFFFFFh
jz	short loc_601EB7
cmp	ecx, [ebp+arg_0]
jnz	short loc_601EA0
cmp	eax, [ebp+arg_4]
jz	short loc_601EA3

loc_601EA0:
inc	edx
jmp	short loc_601E7F

loc_601EA3:
shl	edx, 4
mov	eax, [edx+esi+8]
mov	edx, [edx+esi+0Ch]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_601EB7:
mov	eax, dword ptr [ebp+arg_8]
mov	edx, dword ptr [ebp+arg_8+4]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_601E60 endp

align 10h



sub_601ED0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	edi
push	eax
push	ecx
mov	ecx, esi
call	sub_601E10
mov	edi, eax
cmp	edi, [esi+8]
lea	ecx, [esp+4+arg_0]
setle	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+4+arg_0]
call	sub_4D4F40
test	al, al
jz	short loc_601F12
push	esi
mov	eax, edi
call	sub_601F20
xor	eax, eax
pop	edi
retn	8

loc_601F12:
mov	eax, 1
pop	edi
retn	8
sub_601ED0 endp

align 10h



sub_601F20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
mov	ecx, [ebx]
push	ebp
or	edx, 0FFFFFFFFh
add	[ebx+4], edx
push	esi
push	edi
mov	edi, eax
shl	eax, 4
mov	[eax+ecx], edx
mov	[eax+ecx+4], edx
mov	ecx, [ebx+8]
mov	esi, [ebx]
lea	eax, [ecx+edi]

loc_601F45:
and	eax, ecx
mov	edx, eax
shl	edx, 4
mov	ebp, [edx+esi]
and	ebp, [edx+esi+4]
cmp	ebp, 0FFFFFFFFh
jz	short loc_601F5C
add	eax, ecx
jmp	short loc_601F45

loc_601F5C:
inc	eax
and	eax, ecx
mov	[esp+14h+var_4], eax
mov	[esp+14h+arg_0], edi

loc_601F67:
mov	esi, [ebx]
inc	edi
and	edi, ecx
mov	eax, edi
shl	eax, 4
mov	edx, [esi+eax]
mov	ebp, [esi+eax+4]
and	edx, ebp
cmp	edx, 0FFFFFFFFh
jz	short loc_601FED
mov	edx, [esi+eax]
shr	edx, 4
imul	edx, 9E3779B1h
and	edx, ecx
mov	ecx, [esp+14h+arg_0]
cmp	edi, [esp+14h+var_4]
jb	short loc_601F9B
cmp	edx, ecx
ja	short loc_601FE5

loc_601F9B:
cmp	edi, ecx
jnb	short loc_601FA7
cmp	edx, ecx
ja	short loc_601FE5
cmp	edx, edi
jbe	short loc_601FE5

loc_601FA7:
cmp	edx, ecx
jbe	short loc_601FB1
cmp	edx, [esp+14h+var_4]
jb	short loc_601FE5

loc_601FB1:
mov	edx, [esi+eax]
shl	ecx, 4
mov	[ecx+esi], edx
mov	[ecx+esi+4], ebp
mov	edx, [ebx]
mov	esi, [edx+eax+8]
mov	[ecx+edx+8], esi
mov	esi, [edx+eax+0Ch]
mov	[ecx+edx+0Ch], esi
mov	ecx, [ebx]
mov	dword ptr [eax+ecx], 0FFFFFFFFh
mov	dword ptr [eax+ecx+4], 0FFFFFFFFh
mov	[esp+14h+arg_0], edi

loc_601FE5:
mov	ecx, [ebx+8]
jmp	loc_601F67

loc_601FED:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_601F20 endp

align 10h



sub_602000 proc	near
mov	edx, [ecx+8]
inc	edx
test	edx, edx
jle	short loc_60202A
push	esi
xor	eax, eax
mov	esi, edx
lea	ecx, [ecx+0]

loc_602010:
mov	edx, [ecx]
mov	dword ptr [eax+edx], 0FFFFFFFFh
mov	dword ptr [eax+edx+4], 0FFFFFFFFh
add	eax, 10h
sub	esi, 1
jnz	short loc_602010
pop	esi

loc_60202A:
and	dword ptr [ecx+4], 80000000h
retn
sub_602000 endp

align 10h



sub_602040 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
call	sub_602000
test	dword ptr [esi+4], 80000000h
jnz	short loc_602067
mov	edx, [esi+8]
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	eax, [eax+8]
inc	edx
shl	edx, 4
push	edx
mov	edx, [esi]
push	edx
call	eax

loc_602067:
pop	esi
retn	4
sub_602040 endp

align 10h



sub_602070 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
add	edx, edx
mov	eax, 8
cmp	edx, eax
push	esi
jle	short loc_602086

loc_602080:
add	eax, eax
cmp	eax, edx
jl	short loc_602080

loc_602086:
mov	edx, [esp+4+arg_0]
push	edx
mov	esi, ecx
call	sub_6020C0
pop	esi
retn	8
sub_602070 endp

align 10h



sub_6020A0 proc	near
add	ecx, ecx
mov	eax, 8
cmp	ecx, eax
jle	short loc_6020B6
jmp	short loc_6020B0
align 10h

loc_6020B0:
add	eax, eax
cmp	eax, ecx
jl	short loc_6020B0

loc_6020B6:
shl	eax, 4
retn
sub_6020A0 endp

align 10h


; Attributes: bp-based frame

sub_6020C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 10h
push	ebx
push	edi
push	8
push	eax
call	sub_4DDC50
mov	ecx, [esi]
mov	ebx, [esi+8]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_8], ecx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
mov	eax, edi
add	esp, 8
shl	eax, 4
push	eax
inc	ebx
call	edx
mov	[esi], eax
test	edi, edi
jle	short loc_602129
xor	eax, eax
mov	edx, edi
jmp	short loc_602110
align 10h

loc_602110:
mov	ecx, [esi]
mov	dword ptr [eax+ecx], 0FFFFFFFFh
mov	dword ptr [eax+ecx+4], 0FFFFFFFFh
add	eax, 10h
sub	edx, 1
jnz	short loc_602110

loc_602129:
dec	edi
mov	dword ptr [esi+4], 0
mov	[esi+8], edi
test	ebx, ebx
jle	short loc_60216D
mov	edi, [esp+18h+var_8]
mov	[esp+18h+var_C], ebx

loc_602140:
mov	eax, [edi]
mov	ecx, [edi+4]
mov	edx, eax
and	edx, ecx
cmp	edx, 0FFFFFFFFh
jz	short loc_602163
mov	edx, [edi+0Ch]
push	edx
mov	edx, [edi+8]
push	edx
push	ecx
push	eax
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, esi
call	sub_601D70

loc_602163:
add	edi, 10h
sub	[esp+18h+var_C], 1
jnz	short loc_602140

loc_60216D:
cmp	[esp+18h+var_4], 0
jnz	short loc_602187
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [esp+18h+var_8]
mov	edx, [edx+8]
shl	ebx, 4
push	ebx
push	eax
call	edx

loc_602187:
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_6020C0 endp

align 10h



sub_602190 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_0]
lea	ecx, [esi+0Ch]
mov	edx, 2
lea	eax, [edi+8]
sub	esi, edi

loc_6021A7:
mov	edi, [ecx-0Ch]
mov	[eax-8], edi
mov	edi, [ecx-8]
mov	[eax-4], edi
mov	edi, [esi+eax]
mov	[eax], edi
mov	edi, [ecx]
mov	[eax+4], edi
dec	edx
add	ecx, 10h
add	eax, 10h
test	edx, edx
jg	short loc_6021A7
pop	edi
pop	esi
retn
sub_602190 endp

align 10h



; int __stdcall	sub_6021D0(int,	int, float)
sub_6021D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	eax, [esp+arg_0]
fld	dword ptr [edx]
fsub	dword ptr [eax]
fld	[esp+arg_8]
fld	st
fmulp	st(2), st
fld	dword ptr [eax]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [ecx]
fld	dword ptr [edx+4]
fsub	dword ptr [eax+4]
fmulp	st(1), st
fadd	dword ptr [eax+4]
fstp	dword ptr [ecx+4]
retn	0Ch
sub_6021D0 endp

align 10h



sub_602200 proc	near
mov	eax, offset unk_1896770
retn
sub_602200 endp

align 10h



sub_602210 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD1C40
test	[esp+4+arg_0], 1
jz	short loc_60223A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60223A:
mov	eax, esi
pop	esi
retn	4
sub_602210 endp




sub_602240 proc	near
test	al, 1
jz	short loc_60224D
shr	eax, 1
xor	eax, 0EDB88320h
jmp	short loc_60224F

loc_60224D:
shr	eax, 1

loc_60224F:
test	al, 1
jz	short loc_60225C
shr	eax, 1
xor	eax, 0EDB88320h
jmp	short loc_60225E

loc_60225C:
shr	eax, 1

loc_60225E:
test	al, 1
jz	short loc_60226B
shr	eax, 1
xor	eax, 0EDB88320h
jmp	short loc_60226D

loc_60226B:
shr	eax, 1

loc_60226D:
test	al, 1
jz	short loc_60227A
shr	eax, 1
xor	eax, 0EDB88320h
jmp	short loc_60227C

loc_60227A:
shr	eax, 1

loc_60227C:
test	al, 1
jz	short loc_602289
shr	eax, 1
xor	eax, 0EDB88320h
jmp	short loc_60228B

loc_602289:
shr	eax, 1

loc_60228B:
test	al, 1
jz	short loc_602298
shr	eax, 1
xor	eax, 0EDB88320h
jmp	short loc_60229A

loc_602298:
shr	eax, 1

loc_60229A:
test	al, 1
jz	short loc_6022A7
shr	eax, 1
xor	eax, 0EDB88320h
jmp	short loc_6022A9

loc_6022A7:
shr	eax, 1

loc_6022A9:
test	al, 1
jz	short loc_6022B5
shr	eax, 1
xor	eax, 0EDB88320h
retn

loc_6022B5:
shr	eax, 1
retn
sub_602240 endp

align 10h



sub_6022C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+2Ch]
call	edx
xor	ecx, ecx
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+8], eax
pop	esi
mov	eax, ecx
retn	4
sub_6022C0 endp

align 10h



sub_6022E0 proc	near
mov	eax, [ecx]
mov	edx, [ecx+8]
mov	eax, [eax+28h]
push	0
push	edx
call	eax
retn
sub_6022E0 endp

align 10h



sub_6022F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD13A0
test	[esp+4+arg_0], 1
jz	short loc_60231A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60231A:
mov	eax, esi
pop	esi
retn	4
sub_6022F0 endp




sub_602320 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD1290
test	[esp+4+arg_0], 1
jz	short loc_60234A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60234A:
mov	eax, esi
pop	esi
retn	4
sub_602320 endp




sub_602350 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD0EE0
test	[esp+4+arg_0], 1
jz	short loc_60237A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60237A:
mov	eax, esi
pop	esi
retn	4
sub_602350 endp

; [00000008 BYTES: COLLAPSED FUNCTION DllMain(x,x,x). PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_602390 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	sub_4DA650
lea	ecx, [esi+8]
call	sub_4DA650
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_6023CC
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6023CC:
mov	eax, esi
pop	esi
retn	4
sub_602390 endp

align 10h
; [00000010 BYTES: COLLAPSED FUNCTION DNameNode::DNameNode(void). PRESS	KEYPAD "+" TO EXPAND]



sub_6023F0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CF544
call	sub_AD06C0
mov	ecx, esi
call	sub_AD00F0
mov	eax, esi
pop	esi
retn	4
sub_6023F0 endp

align 10h



sub_602410 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD0350
test	[esp+4+arg_0], 1
jz	short loc_60243A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60243A:
mov	eax, esi
pop	esi
retn	4
sub_602410 endp




sub_602440 proc	near
mov	eax, ecx
mov	dword ptr [eax], offset	off_15CF5A4
retn	4
sub_602440 endp

align 10h



sub_602450 proc	near
push	esi
mov	esi, ecx
push	esi
call	sub_ACFEB0
mov	eax, esi
pop	esi
retn	4
sub_602450 endp

align 10h



sub_602460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, eax
mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_60248C
lea	edx, [eax+eax+2]
mov	eax, [esp+0Ch+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_602910

loc_60248C:
mov	edx, [esi+8]
mov	edi, [esi]
mov	ecx, ebx
shr	ecx, 4
imul	ecx, 9E3779B1h
and	ecx, edx
cmp	dword ptr [edi+ecx*8], 0FFFFFFFFh
mov	eax, 1
jz	short loc_6024C6
push	ebp
lea	ebx, [ebx+0]

loc_6024B0:
cmp	[edi+ecx*8], ebx
jz	short loc_6024C3
inc	ecx
and	ecx, edx
mov	ebp, edi
cmp	dword ptr [ebp+ecx*8+0], 0FFFFFFFFh
jnz	short loc_6024B0
jmp	short loc_6024C5

loc_6024C3:
xor	eax, eax

loc_6024C5:
pop	ebp

loc_6024C6:
add	[esi+4], eax
mov	[edi+ecx*8], ebx
mov	edx, [esi]
mov	esi, [esp+0Ch+arg_8]
pop	edi
mov	[edx+ecx*8+4], esi
pop	esi
pop	ebx
retn	0Ch
sub_602460 endp

align 10h



sub_6024E0 proc	near
push	esi
mov	esi, [ecx+8]
test	esi, esi
jle	short loc_60250F
mov	edx, [ecx]
mov	eax, edi
shr	eax, 4
imul	eax, 9E3779B1h
and	eax, esi
mov	ecx, [edx+eax*8]
cmp	ecx, 0FFFFFFFFh
jz	short loc_60250F
nop

loc_602500:
cmp	ecx, edi
jz	short loc_602512
inc	eax
and	eax, esi
mov	ecx, [edx+eax*8]
cmp	ecx, 0FFFFFFFFh
jnz	short loc_602500

loc_60250F:
lea	eax, [esi+1]

loc_602512:
pop	esi
retn
sub_6024E0 endp

align 10h



sub_602520 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, [esi]
dec	dword ptr [esi+4]
mov	dword ptr [eax+ecx*8], 0FFFFFFFFh
mov	edx, [esi+8]
push	ebx
mov	ebx, [esi]
lea	eax, [edx+ecx]
and	eax, edx
cmp	dword ptr [ebx+eax*8], 0FFFFFFFFh
push	edi
jz	short loc_60254B
mov	edi, ebx

loc_602541:
add	eax, edx
and	eax, edx
cmp	dword ptr [edi+eax*8], 0FFFFFFFFh
jnz	short loc_602541

loc_60254B:
mov	edi, ecx
inc	ecx
inc	eax
and	eax, edx
and	ecx, edx
cmp	dword ptr [ebx+ecx*8], 0FFFFFFFFh
mov	[esp+0Ch+var_4], eax
jz	short loc_6025B9
push	ebp
mov	edi, edi

loc_602560:
mov	ebx, [esi]
mov	ebp, [ebx+ecx*8]
mov	eax, ebp
shr	eax, 4
imul	eax, 9E3779B1h
and	eax, edx
mov	edx, [esp+10h+var_4]
cmp	ecx, edx
jb	short loc_60257E
cmp	eax, edi
ja	short loc_6025AA

loc_60257E:
cmp	ecx, edi
jnb	short loc_60258A
cmp	eax, edi
ja	short loc_6025AA
cmp	eax, ecx
jbe	short loc_6025AA

loc_60258A:
cmp	eax, edi
jbe	short loc_602592
cmp	eax, edx
jb	short loc_6025AA

loc_602592:
mov	[ebx+edi*8], ebp
mov	eax, [esi]
mov	edx, [eax+ecx*8+4]
mov	[eax+edi*8+4], edx
mov	eax, [esi]
mov	dword ptr [eax+ecx*8], 0FFFFFFFFh
mov	edi, ecx

loc_6025AA:
mov	edx, [esi+8]
mov	eax, [esi]
inc	ecx
and	ecx, edx
cmp	dword ptr [eax+ecx*8], 0FFFFFFFFh
jnz	short loc_602560
pop	ebp

loc_6025B9:
pop	edi
pop	ebx
pop	ecx
retn
sub_602520 endp

align 10h



sub_6025C0 proc	near
test	dword ptr [eax+4], 80000000h
jnz	short locret_6025E6
mov	ecx, dword_1887714
mov	edx, [ecx]
mov	edx, [edx+8]
push	esi
mov	esi, [eax+8]
mov	eax, [eax]
lea	esi, ds:8[esi*8]
push	esi
push	eax
call	edx
pop	esi

locret_6025E6:
retn
sub_6025C0 endp

align 10h



sub_6025F0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
inc	esi
lea	esp, [esp+0]

loc_602600:
cmp	esi, [edi+8]
jg	short loc_602630

loc_602605:
mov	eax, [edi]
mov	ecx, [eax+esi*8]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	short loc_602634
mov	edx, [edi]
mov	eax, [edx+esi*8]
push	ebx
push	eax
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_60263D
inc	esi
cmp	esi, [edi+8]
jle	short loc_602605

loc_602630:
xor	esi, esi
jmp	short loc_602600

loc_602634:
mov	eax, [edi+8]
pop	esi
inc	eax
pop	ebx
retn	4

loc_60263D:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6025F0 endp

align 10h



sub_602650 proc	near

arg_0= dword ptr  4

mov	eax, [esi+8]
push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
push	eax
push	ebx
call	sub_4DEFC0
mov	ecx, [esi]
mov	edi, eax
mov	edx, [ecx+edi*8]
push	edx
call	sub_4DEFF0
add	esp, 0Ch
test	eax, eax
jz	short loc_60269D

loc_602674:
mov	eax, [esi]
mov	ecx, [eax+edi*8]
push	ebx
push	ecx
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_6026A6
mov	edx, [esi]
inc	edi
and	edi, [esi+8]
mov	eax, [edx+edi*8]
push	eax
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602674

loc_60269D:
mov	eax, [esi+8]
pop	edi
inc	eax
pop	ebx
retn	4

loc_6026A6:
mov	eax, edi
pop	edi
pop	ebx
retn	4
sub_602650 endp

align 10h



sub_6026B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esi+4]
mov	eax, [esi+8]
push	ebx
mov	ebx, [esp+4+arg_4]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	ebp
push	edi
jle	short loc_6026DA
lea	edx, [eax+eax+2]
mov	eax, [esp+0Ch+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_602A10

loc_6026DA:
mov	ecx, [esi+8]
push	ecx
push	ebx
mov	ebp, 1
call	sub_4DEFC0
mov	edx, [esi]
mov	edi, eax
mov	eax, [edx+edi*8]
push	eax
call	sub_4DEFF0
add	esp, 0Ch
test	eax, eax
jz	short loc_60272D
lea	ecx, [ecx+0]

loc_602700:
mov	ecx, [esi]
mov	edx, [ecx+edi*8]
push	ebx
push	edx
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_60272B
mov	eax, [esi]
inc	edi
and	edi, [esi+8]
mov	ecx, [eax+edi*8]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602700
jmp	short loc_60272D

loc_60272B:
xor	ebp, ebp

loc_60272D:
add	[esi+4], ebp
mov	edx, [esi]
mov	ecx, [esp+0Ch+arg_8]
mov	[edx+edi*8], ebx
mov	eax, [esi]
mov	[eax+edi*8+4], ecx
pop	edi
mov	eax, ebp
pop	ebp
pop	ebx
retn	0Ch
sub_6026B0 endp

align 10h



sub_602750 proc	near

arg_0= dword ptr  4

mov	eax, [esi+8]
push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
test	eax, eax
jle	short loc_6027A1
push	eax
push	ebx
call	sub_4DEFC0
mov	edi, eax
mov	eax, [esi]
mov	ecx, [eax+edi*8]
push	ecx
call	sub_4DEFF0
add	esp, 0Ch
test	eax, eax
jz	short loc_6027A1

loc_602778:
mov	edx, [esi]
mov	eax, [edx+edi*8]
push	ebx
push	eax
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_6027AA
mov	ecx, [esi]
inc	edi
and	edi, [esi+8]
mov	edx, [ecx+edi*8]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602778

loc_6027A1:
mov	eax, [esi+8]
pop	edi
inc	eax
pop	ebx
retn	4

loc_6027AA:
mov	eax, edi
pop	edi
pop	ebx
retn	4
sub_602750 endp

align 10h



sub_6027C0 proc	near

var_4= dword ptr -4

push	ecx
dec	dword ptr [esi+4]
push	ebx
push	ebp
push	edi
mov	edi, eax
mov	eax, [esi]
lea	ecx, [eax+edi*8]
push	ecx
call	sub_4DEFE0
mov	eax, [esi+8]
mov	edx, [esi]
lea	ebx, [eax+edi]
and	ebx, eax
mov	eax, [edx+ebx*8]
push	eax
call	sub_4DEFF0
add	esp, 8
test	eax, eax
jz	short loc_602809
mov	edi, edi

loc_6027F0:
mov	eax, [esi+8]
mov	ecx, [esi]
add	ebx, eax
and	ebx, eax
mov	edx, [ecx+ebx*8]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_6027F0

loc_602809:
mov	eax, [esi+8]
mov	ebp, edi
lea	ecx, [ebx+1]
and	ecx, eax
inc	edi
and	edi, eax
mov	eax, [esi]
mov	[esp+10h+var_4], ecx
lea	ebx, ds:0[edi*8]
mov	ecx, [ebx+eax]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	short loc_6028A3

loc_602833:
mov	edx, [esi+8]
mov	eax, [esi]
mov	ecx, [ebx+eax]
push	edx
push	ecx
call	sub_4DEFC0
mov	ecx, [esp+18h+var_4]
add	esp, 8
cmp	edi, ecx
jb	short loc_602851
cmp	eax, ebp
ja	short loc_602886

loc_602851:
cmp	edi, ebp
jnb	short loc_60285D
cmp	eax, ebp
ja	short loc_602886
cmp	eax, edi
jbe	short loc_602886

loc_60285D:
cmp	eax, ebp
jbe	short loc_602865
cmp	eax, ecx
jb	short loc_602886

loc_602865:
mov	eax, [esi]
mov	edx, [eax+ebx]
mov	[eax+ebp*8], edx
mov	eax, [esi]
mov	ecx, [eax+ebx+4]
mov	[eax+ebp*8+4], ecx
mov	edx, [esi]
add	edx, ebx
push	edx
call	sub_4DEFE0
add	esp, 4
mov	ebp, edi

loc_602886:
mov	eax, [esi]
inc	edi
and	edi, [esi+8]
lea	ebx, ds:0[edi*8]
mov	ecx, [ebx+eax]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602833

loc_6028A3:
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn
sub_6027C0 endp

align 10h



sub_6028B0 proc	near
push	esi
call	sub_6029D0
test	dword ptr [esi+4], 80000000h
jnz	short locret_6028D6
mov	ecx, [esi+8]
mov	eax, [edi]
lea	edx, ds:8[ecx*8]
mov	ecx, [esi]
push	edx
mov	edx, [eax+8]
push	ecx
mov	ecx, edi
call	edx

locret_6028D6:
retn
sub_6028B0 endp

align 10h



sub_6028E0 proc	near
mov	ecx, [edx+8]
inc	ecx
xor	eax, eax
test	ecx, ecx
jle	short loc_6028FF
push	esi
jmp	short loc_6028F0
align 10h

loc_6028F0:
mov	esi, [edx]
mov	dword ptr [esi+eax*8], 0FFFFFFFFh
inc	eax
cmp	eax, ecx
jl	short loc_6028F0
pop	esi

loc_6028FF:
and	dword ptr [edx+4], 80000000h
retn
sub_6028E0 endp

align 10h



sub_602910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebp, [esp+1Ch+arg_0]
mov	edx, [ebp+0]
mov	ebx, [esi+8]
mov	edx, [edx+4]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+1Ch+var_4], eax
add	esp, 8
lea	eax, ds:0[edi*8]
mov	[esp+14h+arg_4], ecx
push	eax
mov	ecx, ebp
inc	ebx
call	edx
mov	[esi], eax
xor	eax, eax
test	edi, edi
jle	short loc_60296E
lea	esp, [esp+0]

loc_602960:
mov	ecx, [esi]
mov	dword ptr [ecx+eax*8], 0FFFFFFFFh
inc	eax
cmp	eax, edi
jl	short loc_602960

loc_60296E:
dec	edi
mov	[esi+8], edi
xor	edi, edi
mov	dword ptr [esi+4], 0
test	ebx, ebx
jle	short loc_60299F
nop

loc_602980:
mov	ecx, [esp+14h+arg_4]
mov	eax, [ecx+edi*8]
cmp	eax, 0FFFFFFFFh
jz	short loc_60299A
mov	edx, [ecx+edi*8+4]
push	edx
push	eax
push	ebp
mov	eax, esi
call	sub_602460

loc_60299A:
inc	edi
cmp	edi, ebx
jl	short loc_602980

loc_60299F:
cmp	[esp+14h+var_4], 0
jnz	short loc_6029BD
mov	eax, [ebp+0]
mov	edx, [esp+14h+arg_4]
mov	eax, [eax+8]
lea	ecx, ds:0[ebx*8]
push	ecx
push	edx
mov	ecx, ebp
call	eax

loc_6029BD:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_602910 endp

align 10h



sub_6029D0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx+8]
inc	edi
xor	esi, esi
test	edi, edi
jle	short loc_6029F4

loc_6029E1:
mov	eax, [ebx]
lea	ecx, [eax+esi*8]
push	ecx
call	sub_4DEFE0
inc	esi
add	esp, 4
cmp	esi, edi
jl	short loc_6029E1

loc_6029F4:
and	dword ptr [ebx+4], 80000000h
pop	edi
pop	esi
pop	ebx
retn	4
sub_6029D0 endp

align 10h



sub_602A10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebp, [esi+8]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+1Ch+arg_4], ecx
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
mov	[esp+1Ch+var_4], eax
add	esp, 8
lea	eax, ds:0[edi*8]
push	eax
inc	ebp
call	edx
xor	ebx, ebx
mov	[esi], eax
test	edi, edi
jle	short loc_602A73
lea	esp, [esp+0]

loc_602A60:
mov	eax, [esi]
lea	ecx, [eax+ebx*8]
push	ecx
call	sub_4DEFE0
inc	ebx
add	esp, 4
cmp	ebx, edi
jl	short loc_602A60

loc_602A73:
dec	edi
mov	[esi+8], edi
xor	edi, edi
mov	dword ptr [esi+4], 0
test	ebp, ebp
jle	short loc_602AB2

loc_602A84:
mov	ebx, [esp+14h+arg_4]
mov	edx, [ebx+edi*8]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	short loc_602AAB
mov	eax, [ebx+edi*8+4]
mov	ecx, [ebx+edi*8]
mov	edx, [esp+14h+arg_0]
push	eax
push	ecx
push	edx
call	sub_6026B0

loc_602AAB:
inc	edi
cmp	edi, ebp
jl	short loc_602A84
jmp	short loc_602AB6

loc_602AB2:
mov	ebx, [esp+14h+arg_4]

loc_602AB6:
cmp	[esp+14h+var_4], 0
jnz	short loc_602AD1
mov	ecx, [esp+14h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+8]
lea	edx, ds:0[ebp*8]
push	edx
push	ebx
call	eax

loc_602AD1:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_602A10 endp

align 10h



sub_602AE0 proc	near
mov	eax, ecx
mov	dword ptr [eax], offset	off_15CF680
retn	4
sub_602AE0 endp

align 10h



sub_602AF0 proc	near
push	esi
mov	esi, ecx
mov	eax, esi
call	sub_AD0990
push	0
lea	ecx, [esi+12Ch]
mov	dword ptr [esi+128h], 0
call	sub_4D4F20
mov	dword ptr [esi+130h], 0
mov	eax, esi
pop	esi
retn
sub_602AF0 endp

align 10h



sub_602B20 proc	near
push	edi
mov	edi, ecx
call	sub_ACF870
mov	eax, edi
pop	edi
retn	4
sub_602B20 endp

align 10h



sub_602B30 proc	near
push	esi
mov	esi, ecx
lea	eax, [esi+18h]
push	eax		; lpCriticalSection
call	ds:DeleteCriticalSection
mov	ecx, esi
call	sub_AD00F0
mov	eax, esi
pop	esi
retn	4
sub_602B30 endp

align 10h



sub_602B50 proc	near
push	edi
call	sub_AD5DD0
mov	ecx, [eax+14h]
mov	eax, [esi+18h]
xor	edi, edi
mov	[esi+14h], edi
test	eax, eax
js	short loc_602B7A
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi+10h]
push	eax
call	edx

loc_602B7A:
mov	[esi+10h], edi
mov	dword ptr [esi+18h], 80000000h
call	sub_AD5DD0
mov	ecx, [eax+14h]
mov	eax, [esi+0Ch]
mov	[esi+8], edi
test	eax, eax
js	short loc_602BAB
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi+4]
push	eax
call	edx

loc_602BAB:
mov	[esi+4], edi
mov	dword ptr [esi+0Ch], 80000000h
pop	edi
retn
sub_602B50 endp

align 10h



sub_602BC0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
xor	esi, esi
cmp	[ebx+8], esi
jl	short loc_602BF3
push	edi
xor	edi, edi

loc_602BD0:
mov	eax, [ebx]
mov	ecx, [edi+eax]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602BEB
inc	esi
add	edi, 28h
cmp	esi, [ebx+8]
jle	short loc_602BD0

loc_602BEB:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_602BF3:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_602BC0 endp

align 10h



sub_602C00 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
inc	esi
cmp	esi, [ebx+8]
jg	short loc_602C3B
push	edi
lea	edi, [esi+esi*4]
add	edi, edi
add	edi, edi
add	edi, edi

loc_602C18:
mov	eax, [ebx]
mov	ecx, [edi+eax]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602C33
inc	esi
add	edi, 28h
cmp	esi, [ebx+8]
jle	short loc_602C18

loc_602C33:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_602C3B:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_602C00 endp

align 10h



sub_602C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, eax
mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_602C7D
lea	edx, [eax+eax+2]
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_602F30

loc_602C7D:
mov	ecx, [esi+8]
push	ecx
push	ebp
mov	[esp+18h+arg_4], 1
call	sub_4DEFC0
mov	edx, [esi]
mov	ebx, eax
lea	edi, [ebx+ebx*4]
add	edi, edi
add	edi, edi
add	edi, edi
mov	eax, [edi+edx]
push	eax
call	sub_4DEFF0
add	esp, 0Ch
test	eax, eax
jz	short loc_602CE2
lea	esp, [esp+0]

loc_602CB0:
mov	ecx, [esi]
mov	edx, [edi+ecx]
push	ebp
push	edx
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_602D11
mov	eax, [esi]
inc	ebx
and	ebx, [esi+8]
lea	edi, [ebx+ebx*4]
add	edi, edi
add	edi, edi
add	edi, edi
mov	ecx, [edi+eax]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602CB0

loc_602CE2:
mov	edx, [esp+10h+arg_4]

loc_602CE6:
mov	ecx, [esi]
add	[esi+4], edx
lea	eax, [ebx+ebx*4]
add	eax, eax
add	eax, eax
add	eax, eax
mov	[eax+ecx], ebp
mov	ecx, [esi]
lea	edi, [eax+ecx+8]
mov	ecx, 8
lea	esi, [esp+10h+arg_8]
rep movsd
pop	edi
pop	esi
pop	ebp
mov	eax, edx
pop	ebx
retn	28h

loc_602D11:
xor	edx, edx
jmp	short loc_602CE6
sub_602C50 endp

align 10h



sub_602D20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+8]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
test	eax, eax
jle	short loc_602D89
push	eax
push	ebp
call	sub_4DEFC0
mov	edi, eax
mov	eax, [ebx]
lea	esi, [edi+edi*4]
add	esi, esi
add	esi, esi
add	esi, esi
mov	ecx, [esi+eax]
push	ecx
call	sub_4DEFF0
add	esp, 0Ch
test	eax, eax
jz	short loc_602D89

loc_602D57:
mov	edx, [ebx]
mov	eax, [esi+edx]
push	ebp
push	eax
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_602D94
mov	ecx, [ebx]
inc	edi
and	edi, [ebx+8]
lea	esi, [edi+edi*4]
add	esi, esi
add	esi, esi
add	esi, esi
mov	edx, [esi+ecx]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602D57

loc_602D89:
mov	eax, [ebx+8]
pop	edi
pop	esi
pop	ebp
inc	eax
pop	ebx
retn	8

loc_602D94:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_602D20 endp

align 10h



sub_602DA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
mov	ecx, [ebx]
dec	dword ptr [ebx+4]
push	ebp
push	esi
mov	esi, eax
lea	eax, [esi+esi*4]
lea	edx, [ecx+eax*8]
push	edi
push	edx
call	sub_4DEFE0
mov	eax, [ebx+8]
mov	ecx, [ebx]
lea	ebp, [eax+esi]
and	ebp, eax
lea	eax, [ebp+ebp*4+0]
mov	edx, [ecx+eax*8]
push	edx
call	sub_4DEFF0
add	esp, 8
test	eax, eax
jz	short loc_602DFD
lea	ebx, [ebx+0]

loc_602DE0:
mov	eax, [ebx+8]
mov	ecx, [ebx]
add	ebp, eax
and	ebp, eax
lea	eax, [ebp+ebp*4+0]
mov	edx, [ecx+eax*8]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_602DE0

loc_602DFD:
mov	eax, [ebx+8]
lea	ecx, [ebp+1]
lea	edi, [esi+1]
and	edi, eax
lea	ebp, [edi+edi*4]
add	ebp, ebp
and	ecx, eax
mov	eax, [ebx]
add	ebp, ebp
mov	[esp+14h+var_4], ecx
add	ebp, ebp
mov	ecx, [eax+ebp]
push	ecx
mov	[esp+18h+arg_0], edi
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	loc_602EC8
jmp	short loc_602E37

loc_602E33:
mov	edi, [esp+14h+arg_0]

loc_602E37:
mov	edx, [ebx+8]
mov	eax, [ebx]
mov	ecx, [eax+ebp]
push	edx
push	ecx
call	sub_4DEFC0
mov	ecx, [esp+1Ch+var_4]
add	esp, 8
cmp	edi, ecx
jb	short loc_602E55
cmp	eax, esi
ja	short loc_602E9E

loc_602E55:
cmp	edi, esi
jnb	short loc_602E61
cmp	eax, esi
ja	short loc_602E9E
cmp	eax, edi
jbe	short loc_602E9E

loc_602E61:
cmp	eax, esi
jbe	short loc_602E69
cmp	eax, ecx
jb	short loc_602E9E

loc_602E69:
mov	ecx, [ebx]
mov	edx, [ecx+ebp]
lea	eax, [esi+esi*4]
add	eax, eax
add	eax, eax
add	eax, eax
mov	[eax+ecx], edx
mov	ecx, [ebx]
lea	edi, [eax+ecx+8]
lea	esi, [ecx+ebp+8]
mov	ecx, 8
rep movsd
mov	eax, [ebx]
add	eax, ebp
push	eax
call	sub_4DEFE0
mov	esi, [esp+18h+arg_0]
add	esp, 4
mov	edi, esi

loc_602E9E:
mov	ecx, [ebx]
lea	ebp, [edi+1]
and	ebp, [ebx+8]
mov	[esp+14h+arg_0], ebp
lea	ebp, [ebp+ebp*4+0]
add	ebp, ebp
add	ebp, ebp
add	ebp, ebp
mov	edx, [ecx+ebp]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	loc_602E33

loc_602EC8:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_602DA0 endp




sub_602ED0 proc	near
mov	eax, [edi+8]
inc	eax
test	eax, eax
jle	short loc_602EF7
push	ebx
push	esi
xor	esi, esi
mov	ebx, eax
mov	edi, edi

loc_602EE0:
mov	eax, [edi]
add	eax, esi
push	eax
call	sub_4DEFE0
add	esp, 4
add	esi, 28h
sub	ebx, 1
jnz	short loc_602EE0
pop	esi
pop	ebx

loc_602EF7:
and	dword ptr [edi+4], 80000000h
retn
sub_602ED0 endp

align 10h



sub_602F00 proc	near
push	edi
mov	edi, eax
call	sub_602ED0
test	dword ptr [edi+4], 80000000h
jnz	short loc_602F2B
mov	eax, [edi+8]
mov	ecx, [edi]
mov	edx, [esi]
mov	edx, [edx+8]
inc	eax
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
mov	ecx, esi
call	edx

loc_602F2B:
pop	edi
retn
sub_602F00 endp

align 10h



sub_602F30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	ebp
push	esi
push	edi
push	8
push	eax
mov	ebx, ecx
call	sub_4DDC50
mov	ecx, [ebx]
mov	ebp, [ebx+4]
mov	edi, [ebx+8]
mov	esi, eax
lea	eax, [esi+esi*4]
add	eax, eax
mov	[esp+24h+var_8], ecx
mov	ecx, [esp+24h+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
add	eax, eax
add	esp, 8
add	eax, eax
and	ebp, 80000000h
inc	edi
push	eax
mov	[esp+20h+var_C], ebp
mov	[esp+20h+var_4], edi
call	edx
mov	[ebx], eax
test	esi, esi
jle	short loc_602FA1
xor	ebp, ebp
mov	[esp+1Ch+arg_4], esi

loc_602F86:
mov	eax, [ebx]
add	eax, ebp
push	eax
call	sub_4DEFE0
add	esp, 4
add	ebp, 28h
sub	[esp+1Ch+arg_4], 1
jnz	short loc_602F86
mov	ebp, [esp+1Ch+var_C]

loc_602FA1:
dec	esi
mov	dword ptr [ebx+4], 0
mov	[ebx+8], esi
test	edi, edi
jle	short loc_603001
mov	ebp, [esp+1Ch+var_8]
mov	[esp+1Ch+arg_4], edi
jmp	short loc_602FC0
align 10h

loc_602FC0:
mov	ecx, [ebp+0]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	short loc_602FF3
mov	edx, [ebp+0]
mov	eax, [esp+1Ch+arg_0]
sub	esp, 20h
mov	edi, esp
push	edx
push	eax
lea	esi, [ebp+8]
mov	ecx, 8
mov	eax, ebx
rep movsd
call	sub_602C50
mov	edi, [esp+1Ch+var_4]

loc_602FF3:
add	ebp, 28h
sub	[esp+1Ch+arg_4], 1
jnz	short loc_602FC0
mov	ebp, [esp+1Ch+var_C]

loc_603001:
test	ebp, ebp
jnz	short loc_60301F
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [ecx]
mov	edx, [edx+8]
lea	eax, [edi+edi*4]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+20h+var_8]
push	eax
call	edx

loc_60301F:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_602F30 endp

align 10h
dword_603030 dd	5308EC83h, 310F5B53h, 4244489h,	8245489h
dd 424448Bh, 824548Bh, 8C4835Bh, 0CCCCCCC3h



sub_603050 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	qword ptr -40h
var_38=	qword ptr -38h
var_30=	qword ptr -30h
PerformanceCount= LARGE_INTEGER	ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, dword ptr stru_196AFD0
mov	edx, dword ptr stru_196AFD0+4
sub	esp, 48h
push	ebx
push	ebp
mov	ebx, ecx
mov	ecx, eax
or	ecx, edx
push	esi
push	edi
jnz	loc_6031C4
fld	ds:dbl_15FCCE0
mov	[esp+58h+var_44], 0Ah
fstp	[esp+58h+var_10]
jmp	short loc_60308A

loc_603088:
fstp	st

loc_60308A:
mov	edx, [ebx]
mov	eax, [edx+0Ch]
mov	ecx, ebx
call	eax
lea	ecx, [esp+58h+PerformanceCount]
push	ecx		; lpPerformanceCount
mov	ebp, eax
mov	[esp+5Ch+var_4], edx
call	ds:QueryPerformanceCounter
mov	[esp+58h+var_48], 1
mov	eax, 1388h

loc_6030B1:
mov	edx, [esp+58h+var_48]
mov	ecx, [esp+58h+var_48]
imul	edx, ecx
add	edx, [esp+58h+var_48]
sub	eax, 1
mov	[esp+58h+var_48], edx
jnz	short loc_6030B1
mov	edx, [ebx]
mov	eax, [edx+0Ch]
mov	ecx, ebx
call	eax
lea	ecx, [esp+58h+var_30]
push	ecx		; lpPerformanceCount
mov	esi, eax
mov	edi, edx
call	ds:QueryPerformanceCounter
push	offset stru_196AFD0 ; lpFrequency
call	ds:QueryPerformanceFrequency
mov	ecx, dword ptr [esp+58h+var_30]
sub	esi, ebp
sbb	edi, [esp+58h+var_4]
xor	edx, edx
mov	eax, edi
and	eax, 80000000h
mov	dword ptr [esp+58h+var_38+4], eax
mov	eax, dword ptr [esp+58h+var_30+4]
and	edi, 7FFFFFFFh
sub	ecx, dword ptr [esp+58h+PerformanceCount]
mov	dword ptr [esp+58h+var_40], esi
sbb	eax, dword ptr [esp+58h+PerformanceCount+4]
mov	dword ptr [esp+58h+var_40+4], edi
fild	[esp+58h+var_40]
mov	dword ptr [esp+58h+var_38], edx
fild	[esp+58h+var_38]
mov	dword ptr [esp+58h+var_20], ecx
mov	ecx, eax
and	eax, 7FFFFFFFh
fchs
and	ecx, 80000000h
faddp	st(1), st
mov	dword ptr [esp+58h+var_20+4], eax
fild	[esp+58h+var_20]
mov	dword ptr [esp+58h+var_18+4], ecx
mov	dword ptr [esp+58h+var_18], edx
fild	[esp+58h+var_18]
fchs
faddp	st(1), st
fdivp	st(1), st
fld	[esp+58h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_60316D
fstp	st
fst	[esp+58h+var_10]
jmp	short loc_60316F

loc_60316D:
fstp	st(1)

loc_60316F:
sub	[esp+58h+var_44], 1
jnz	loc_603088
mov	eax, dword ptr stru_196AFD0+4
mov	edx, dword ptr stru_196AFD0
mov	ecx, eax
mov	dword ptr [esp+58h+var_10], edx
and	eax, 7FFFFFFFh
mov	dword ptr [esp+58h+var_10+4], eax
fild	[esp+58h+var_10]
and	ecx, 80000000h
mov	dword ptr [esp+58h+var_10+4], ecx
mov	dword ptr [esp+58h+var_10], 0
fild	[esp+58h+var_10]
fchs
faddp	st(1), st
fmulp	st(1), st
call	__ftol2
mov	dword ptr stru_196AFD0,	eax
mov	dword ptr stru_196AFD0+4, edx

loc_6031C4:
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_603050 endp

align 10h



sub_6031D0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	0C0h
call	eax
push	40h		; size_t
push	0FFh		; int
push	eax		; void *
mov	[esi], eax
call	j__memset
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 0Fh
mov	eax, esi
add	esp, 10h
retn	4
sub_6031D0 endp

align 10h



sub_603220 proc	near

var_1= byte ptr	-1

push	ecx
push	edi
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	edi, [eax]
inc	edx
lea	ecx, [edx+edx*2]
mov	edx, [esi]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [edi+8]
push	edx
call	eax
pop	edi
pop	ecx
retn
sub_603220 endp

align 10h



sub_603250 proc	near
mov	edx, [ecx+8]
xor	eax, eax
test	edx, edx
jl	short locret_60326D
mov	ecx, [ecx]
jmp	short loc_603260
align 10h

loc_603260:
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short locret_60326D
inc	eax
add	ecx, 4
cmp	eax, edx
jle	short loc_603260

locret_60326D:
retn
sub_603250 endp

align 10h



sub_603270 proc	near

arg_0= dword ptr  4

mov	ecx, [eax+8]
add	ecx, [esp+arg_0]
mov	edx, [eax]
mov	eax, [edx+ecx*4+4]
retn	4
sub_603270 endp




sub_603280 proc	near
mov	ecx, [eax+8]
lea	ecx, [edx+ecx*2+2]
mov	edx, [eax]
mov	eax, [edx+ecx*4]
retn
sub_603280 endp

align 10h



sub_603290 proc	near
mov	ecx, [eax+8]
lea	ecx, [edx+ecx*2+2]
mov	edx, [eax]
mov	dword ptr [edx+ecx*4], 0
retn
sub_603290 endp

align 10h



sub_6032B0 proc	near
mov	edx, [ecx+8]
inc	eax
cmp	eax, edx
jg	short locret_6032CD
mov	ecx, [ecx]
lea	ecx, [ecx+eax*4]
lea	ecx, [ecx+0]

loc_6032C0:
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short locret_6032CD
inc	eax
add	ecx, 4
cmp	eax, edx
jle	short loc_6032C0

locret_6032CD:
retn
sub_6032B0 endp

align 10h



sub_6032D0 proc	near
cmp	ecx, [eax+8]
mov	ecx, esi
setle	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
mov	eax, esi
retn
sub_6032D0 endp

align 10h



sub_6032F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [esp+4+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	cl, [edx]
xor	eax, eax
test	cl, cl
jz	short loc_603317

loc_603303:
mov	esi, eax
shl	esi, 5
sub	esi, eax
movsx	eax, cl
mov	cl, [edx+1]
inc	edx
add	eax, esi
test	cl, cl
jnz	short loc_603303

loc_603317:
mov	ecx, [edi+4]
and	eax, 7FFFFFFFh
mov	ebp, eax
mov	eax, [edi+8]
add	ecx, ecx
cmp	ecx, eax
mov	[esp+14h+var_4], ebp
jle	short loc_603338
lea	edx, [eax+eax+2]
push	edx
call	sub_603620

loc_603338:
mov	ebx, [edi+8]
mov	esi, ebx
and	esi, ebp
mov	ebp, [edi]
cmp	dword ptr [ebp+esi*4+0], 0FFFFFFFFh
jz	short loc_603379
jmp	short loc_603350
align 10h

loc_603350:
mov	eax, [ebp+esi*4+0]
cmp	eax, [esp+14h+var_4]
jnz	short loc_60336E
mov	eax, [esp+14h+arg_0]
lea	ecx, [ebx+esi]
mov	ecx, [ebp+ecx*4+4]
call	sub_AD31D0
test	eax, eax
jz	short loc_60337C

loc_60336E:
inc	esi
and	esi, ebx
mov	edx, ebp
cmp	dword ptr [edx+esi*4], 0FFFFFFFFh
jnz	short loc_603350

loc_603379:
inc	dword ptr [edi+4]

loc_60337C:
mov	eax, [esp+14h+var_4]
mov	[ebp+esi*4+0], eax
mov	ecx, [edi+8]
mov	edx, [edi]
mov	eax, [esp+14h+arg_0]
add	ecx, esi
mov	[edx+ecx*4+4], eax
mov	ecx, [edi+8]
mov	eax, [edi]
pop	edi
lea	edx, [esi+ecx*2+2]
mov	ecx, [esp+10h+arg_4]
pop	esi
pop	ebp
mov	[eax+edx*4], ecx
pop	ebx
pop	ecx
retn	8
sub_6032F0 endp

align 10h



sub_6033B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	cl, [edx]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
xor	eax, eax
push	edi
test	cl, cl
jz	short loc_6033D8

loc_6033C4:
mov	esi, eax
shl	esi, 5
sub	esi, eax
movsx	eax, cl
mov	cl, [edx+1]
inc	edx
add	eax, esi
test	cl, cl
jnz	short loc_6033C4

loc_6033D8:
mov	edi, [ebx+8]
mov	ebx, [ebx]
and	eax, 7FFFFFFFh
mov	ebp, eax
mov	esi, edi
and	esi, ebp
mov	eax, [ebx+esi*4]
cmp	eax, 0FFFFFFFFh
jz	short loc_603413

loc_6033F0:
cmp	eax, ebp
jnz	short loc_603408
mov	eax, [esp+10h+arg_4]
lea	ecx, [edi+esi]
mov	ecx, [ebx+ecx*4+4]
call	sub_AD31D0
test	eax, eax
jz	short loc_60341D

loc_603408:
inc	esi
and	esi, edi
mov	eax, [ebx+esi*4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_6033F0

loc_603413:
lea	eax, [edi+1]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_60341D:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6033B0 endp

align 10h



sub_603430 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	ebp
push	edi
call	sub_6033B0
mov	ebx, eax
mov	ecx, ebx
lea	esi, [esp+0Ch+arg_0]
mov	eax, edi
call	sub_6032D0
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_603467
mov	edx, ebx
mov	eax, edi
call	sub_603280
pop	esi
pop	ebp
pop	ebx
retn	8

loc_603467:
mov	esi, [esp+0Ch+arg_4]
push	esi
push	ebp
mov	ecx, edi
call	sub_6032F0
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_603430 endp

align 10h



sub_603480 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
lea	ecx, [esp+4+var_4]
mov	[esp+4+var_4], eax
mov	eax, [esp+4+arg_0]
push	ecx
call	sub_6034A0
mov	eax, [esp+4+var_4]
pop	ecx
retn	4
sub_603480 endp

align 10h



sub_6034A0 proc	near

var_2= byte ptr	-2
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
push	eax
push	edi
call	sub_6033B0
mov	ebx, eax
mov	ecx, ebx
lea	esi, [esp+0Bh]
mov	eax, edi
call	sub_6032D0
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_6034DB
mov	edx, ebx
mov	eax, edi
call	sub_603280
mov	ecx, [esp+0Ch+arg_0]
pop	esi
mov	[ecx], eax
xor	eax, eax
pop	ebx
pop	ecx
retn	4

loc_6034DB:
pop	esi
mov	eax, 1
pop	ebx
pop	ecx
retn	4
sub_6034A0 endp

align 10h



sub_6034F0 proc	near

var_2= byte ptr	-2

push	ecx
push	ebx
push	esi
push	eax
push	edi
call	sub_6033B0
mov	ebx, eax
mov	ecx, ebx
lea	esi, [esp+0Bh]
mov	eax, edi
call	sub_6032D0
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_603523
mov	ecx, ebx
mov	eax, edi
call	sub_603530
pop	esi
xor	eax, eax
pop	ebx
pop	ecx
retn

loc_603523:
pop	esi
mov	eax, 1
pop	ebx
pop	ecx
retn
sub_6034F0 endp

align 10h



sub_603530 proc	near

var_4= dword ptr -4

push	ecx
dec	dword ptr [eax+4]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	dword ptr [ecx+esi*4], 0FFFFFFFFh
mov	edx, [eax+8]
lea	ecx, [edx+esi]
push	edi
mov	edi, [eax]
and	ecx, edx
cmp	dword ptr [edi+ecx*4], 0FFFFFFFFh
jz	short loc_60355E
mov	ebx, edi

loc_603554:
add	ecx, edx
and	ecx, edx
cmp	dword ptr [ebx+ecx*4], 0FFFFFFFFh
jnz	short loc_603554

loc_60355E:
inc	ecx
and	ecx, edx
mov	[esp+10h+var_4], ecx
lea	ecx, [esi+1]
and	ecx, edx
cmp	dword ptr [edi+ecx*4], 0FFFFFFFFh
jz	short loc_6035DD
push	ebp

loc_603571:
mov	ebx, [eax]
mov	ebp, [ebx+ecx*4]
mov	edi, ebp
and	edi, edx
mov	edx, [esp+14h+var_4]
cmp	ecx, edx
jb	short loc_603586
cmp	edi, esi
ja	short loc_6035CE

loc_603586:
cmp	ecx, esi
jnb	short loc_603592
cmp	edi, esi
ja	short loc_6035CE
cmp	edi, ecx
jbe	short loc_6035CE

loc_603592:
cmp	edi, esi
jbe	short loc_60359A
cmp	edi, edx
jb	short loc_6035CE

loc_60359A:
mov	[ebx+esi*4], ebp
mov	edx, [eax+8]
mov	edi, [eax]
lea	ebx, [edx+ecx]
mov	ebx, [edi+ebx*4+4]
add	edx, esi
mov	[edi+edx*4+4], ebx
mov	edx, [eax+8]
mov	edi, [eax]
add	edx, edx
lea	ebx, [edx+ecx]
add	edx, esi
mov	esi, [edi+ebx*4+8]
mov	[edi+edx*4+8], esi
mov	edx, [eax]
mov	dword ptr [edx+ecx*4], 0FFFFFFFFh
mov	esi, ecx

loc_6035CE:
mov	edx, [eax+8]
mov	edi, [eax]
inc	ecx
and	ecx, edx
cmp	dword ptr [edi+ecx*4], 0FFFFFFFFh
jnz	short loc_603571
pop	ebp

loc_6035DD:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_603530 endp

align 10h



sub_6035F0 proc	near
push	esi
mov	esi, [ecx+8]
inc	esi
xor	edx, edx
xor	eax, eax
test	esi, esi
jle	short loc_603612
lea	ecx, [ecx+0]

loc_603600:
mov	esi, [ecx]
mov	dword ptr [esi+eax*4], 0FFFFFFFFh
mov	esi, [ecx+8]
inc	eax
inc	esi
cmp	eax, esi
jl	short loc_603600

loc_603612:
mov	[ecx+4], edx
pop	esi
retn
sub_6035F0 endp

align 10h



sub_603620 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
mov	ebp, [edi]
push	esi
mov	esi, [edi+8]
push	edi
lea	ecx, [esp+18h+arg_0]
inc	esi
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [ebx+ebx*2]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	[esp+18h+var_4], eax
call	edx
lea	ecx, ds:0[ebx*4]
push	ecx		; size_t
push	0FFh		; int
push	eax		; void *
mov	[edi], eax
call	j__memset
dec	ebx
mov	[edi+8], ebx
add	esp, 0Ch
xor	ebx, ebx
mov	dword ptr [edi+4], 0
test	esi, esi
jle	short loc_6036AC
lea	edx, [ebp+esi*4+0]
mov	[esp+14h+var_8], edx

loc_603685:
cmp	dword ptr [ebp+ebx*4+0], 0FFFFFFFFh
jz	short loc_6036A2
mov	edx, [esp+14h+var_8]
lea	eax, [ebx+esi*2]
mov	ecx, [ebp+eax*4+0]
mov	eax, [edx]
push	ecx
push	eax
mov	ecx, edi
call	sub_6032F0

loc_6036A2:
add	[esp+14h+var_8], 4
inc	ebx
cmp	ebx, esi
jl	short loc_603685

loc_6036AC:
mov	ecx, [esp+14h+var_4]
mov	edx, [ecx]
mov	edx, [edx+8]
lea	eax, [esi+esi*2]
add	eax, eax
add	eax, eax
push	eax
push	ebp
call	edx
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_603620 endp

align 10h



sub_6036D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esi+8]
and	eax, 3FFFFFFFh
cmp	[esi+4], eax
jnz	short loc_6036EC
mov	ecx, [esi+0Ch]
push	0Ch
push	esi
push	ecx
call	sub_121B830
add	esp, 0Ch

loc_6036EC:
mov	eax, [esi+4]
mov	ecx, [esi]
lea	edx, [eax+eax*2]
push	ebx
lea	ebx, [ecx+edx*4]
mov	edx, [esi+0Ch]
inc	eax
push	edx
mov	[esi+4], eax
call	sub_AD3280
mov	ecx, [esp+8+arg_4]
mov	[ebx], eax
mov	eax, [esp+8+arg_0]
add	esp, 4
mov	[ebx+8], eax
mov	[ebx+4], ecx
pop	ebx
retn	8
sub_6036D0 endp

align 10h



sub_603720 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_ACDCF0
test	[esp+4+arg_0], 1
jz	short loc_60374A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60374A:
mov	eax, esi
pop	esi
retn	4
sub_603720 endp




; int __thiscall sub_603750(void *, char)
sub_603750 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15CFD10
jz	short loc_603769
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_603769:
mov	eax, esi
pop	esi
retn	4
sub_603750 endp

align 10h



sub_603770 proc	near
push	esi
mov	esi, ecx
call	sub_ACD880
mov	eax, esi
pop	esi
retn	4
sub_603770 endp

align 10h



sub_603780 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	0
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	14h
sub_603780 endp

align 10h



sub_6037A0 proc	near
push	esi
mov	esi, ecx
push	esi
call	sub_ACD570
mov	eax, esi
pop	esi
retn	4
sub_6037A0 endp

align 10h



sub_6037B0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
retn	8
sub_6037B0 endp

align 10h



sub_6037C0 proc	near
push	esi
mov	esi, ecx
call	sub_ACC4F0
mov	eax, esi
pop	esi
retn	4
sub_6037C0 endp

align 10h


; Attributes: thunk

sub_6037D0 proc	near
jmp	sub_6037E0
sub_6037D0 endp

align 10h



sub_6037E0 proc	near
push	eax
push	ecx
call	sub_6037F0
retn
sub_6037E0 endp

align 10h



sub_6037F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esi+4]
push	ebx
lea	ebx, [eax+1]
push	ebp
mov	ebp, [esp+8+arg_0]
sub	eax, ebp
mov	[esp+8+arg_0], eax
mov	eax, [esi+8]
and	eax, 3FFFFFFFh
cmp	eax, ebx
jge	short loc_603824
add	eax, eax
cmp	ebx, eax
jl	short loc_603816
mov	eax, ebx

loc_603816:
push	8
push	eax
push	esi
push	0
call	sub_121B8C0
add	esp, 10h

loc_603824:
mov	ecx, [esp+8+arg_0]
mov	eax, [esi]
push	edi
lea	edx, ds:0[ecx*8]
push	edx
lea	edi, ds:0[ebp*8]
lea	ecx, [edi+eax]
push	ecx
lea	edx, [eax+ebp*8+8]
push	edx
call	sub_AD3070
mov	eax, [esi]
add	eax, edi
push	eax		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 14h
pop	edi
test	eax, eax
jz	short loc_60386A
mov	ecx, [esp+8+arg_4]
mov	edx, [ecx]
mov	ecx, [ecx+4]
mov	[eax], edx
mov	[eax+4], ecx

loc_60386A:
pop	ebp
mov	[esi+4], ebx
pop	ebx
retn	8
sub_6037F0 endp

align 10h



sub_603880 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
jle	short loc_6038A3
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_603AC0

loc_6038A3:
mov	ecx, [esi+8]
mov	edx, [esp+arg_4]
push	ebx
push	ebp
push	edi
push	ecx
push	edx
mov	ebp, 1
call	sub_4DEFC0
mov	ebx, eax
mov	eax, [esi]
mov	edi, ebx
shl	edi, 4
mov	ecx, [edi+eax]
push	ecx
call	sub_4DEFF0
add	esp, 0Ch
test	eax, eax
jz	short loc_603908

loc_6038D2:
mov	edx, [esp+0Ch+arg_4]
mov	eax, [esi]
mov	ecx, [edi+eax]
push	edx
push	ecx
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_603906
mov	edx, [esi]
inc	ebx
and	ebx, [esi+8]
mov	edi, ebx
shl	edi, 4
mov	eax, [edi+edx]
push	eax
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_6038D2
jmp	short loc_603908

loc_603906:
xor	ebp, ebp

loc_603908:
mov	ecx, [esi]
add	[esi+4], ebp
mov	edx, [esp+0Ch+arg_4]
shl	ebx, 4
mov	[ebx+ecx], edx
mov	eax, [esi]
mov	ecx, [esp+0Ch+arg_8]
lea	eax, [ebx+eax+4]
mov	[eax], ecx
mov	edx, [esp+0Ch+arg_C]
mov	[eax+4], edx
mov	ecx, [esp+0Ch+arg_10]
pop	edi
mov	[eax+8], ecx
mov	eax, ebp
pop	ebp
pop	ebx
retn	14h
sub_603880 endp

align 10h



sub_603940 proc	near

arg_0= dword ptr  4

mov	eax, [edi+8]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
test	eax, eax
jle	short loc_60399E
push	eax
push	ebp
call	sub_4DEFC0
mov	ebx, eax
mov	eax, [edi]
mov	esi, ebx
shl	esi, 4
mov	ecx, [esi+eax]
push	ecx
call	sub_4DEFF0
add	esp, 0Ch
test	eax, eax
jz	short loc_60399E
mov	edi, edi

loc_603970:
mov	edx, [edi]
mov	eax, [esi+edx]
push	ebp
push	eax
call	sub_4DF000
add	esp, 8
test	eax, eax
jnz	short loc_6039A8
mov	ecx, [edi]
inc	ebx
and	ebx, [edi+8]
mov	esi, ebx
shl	esi, 4
mov	edx, [esi+ecx]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_603970

loc_60399E:
mov	eax, [edi+8]
pop	esi
pop	ebp
inc	eax
pop	ebx
retn	4

loc_6039A8:
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn	4
sub_603940 endp




sub_6039B0 proc	near

arg_0= dword ptr  4

dec	dword ptr [esi+4]
push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, ebx
shl	eax, 4
add	eax, [esi]
push	ebp
push	edi
push	eax
call	sub_4DEFE0
mov	eax, [esi+8]
mov	edx, [esi]
lea	edi, [eax+ebx]
and	edi, eax
mov	ecx, edi
shl	ecx, 4
mov	eax, [ecx+edx]
push	eax
call	sub_4DEFF0
add	esp, 8
test	eax, eax
jz	short loc_603A04

loc_6039E6:
mov	eax, [esi+8]
mov	edx, [esi]
add	edi, eax
and	edi, eax
mov	ecx, edi
shl	ecx, 4
mov	eax, [ecx+edx]
push	eax
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	short loc_6039E6

loc_603A04:
mov	eax, [esi+8]
mov	ebp, ebx
lea	ecx, [edi+1]
inc	ebx
and	ecx, eax
and	ebx, eax
mov	[esp+0Ch+arg_0], ecx
mov	ecx, [esi]
mov	edi, ebx
shl	edi, 4
mov	edx, [edi+ecx]
push	edx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	loc_603AB7

loc_603A30:
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [edi+ecx]
push	eax
push	edx
call	sub_4DEFC0
mov	ecx, [esp+14h+arg_0]
add	esp, 8
cmp	ebx, ecx
jb	short loc_603A4E
cmp	eax, ebp
ja	short loc_603A98

loc_603A4E:
cmp	ebx, ebp
jnb	short loc_603A5A
cmp	eax, ebp
ja	short loc_603A98
cmp	eax, ebx
jbe	short loc_603A98

loc_603A5A:
cmp	eax, ebp
jbe	short loc_603A62
cmp	eax, ecx
jb	short loc_603A98

loc_603A62:
mov	ecx, [esi]
mov	edx, [ecx+edi]
mov	eax, ebp
shl	eax, 4
mov	[eax+ecx], edx
mov	edx, [esi]
lea	ecx, [edx+edi+4]
lea	eax, [eax+edx+4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
mov	[eax+8], ecx
mov	edx, [esi]
add	edx, edi
push	edx
call	sub_4DEFE0
add	esp, 4
mov	ebp, ebx

loc_603A98:
mov	eax, [esi]
inc	ebx
and	ebx, [esi+8]
mov	edi, ebx
shl	edi, 4
mov	ecx, [edi+eax]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jnz	loc_603A30

loc_603AB7:
pop	edi
pop	ebp
pop	ebx
retn	4
sub_6039B0 endp

align 10h



sub_603AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_4]
push	ebx
push	ebp
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebp, [esp+20h+arg_0]
mov	edx, [ebp+0]
mov	ebx, [esi+8]
mov	edx, [edx+4]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+20h+var_4], eax
mov	eax, edi
add	esp, 8
shl	eax, 4
mov	[esp+18h+var_8], ecx
push	eax
mov	ecx, ebp
inc	ebx
call	edx
mov	[esi], eax
test	edi, edi
jle	short loc_603B2B
xor	ebp, ebp
mov	[esp+18h+arg_4], edi

loc_603B10:
mov	eax, [esi]
add	eax, ebp
push	eax
call	sub_4DEFE0
add	esp, 4
add	ebp, 10h
sub	[esp+18h+arg_4], 1
jnz	short loc_603B10
mov	ebp, [esp+18h+arg_0]

loc_603B2B:
dec	edi
mov	dword ptr [esi+4], 0
mov	[esi+8], edi
test	ebx, ebx
jle	short loc_603B7A
mov	edi, [esp+18h+var_8]
mov	[esp+18h+arg_0], ebx

loc_603B42:
mov	ecx, [edi]
push	ecx
call	sub_4DEFF0
add	esp, 4
test	eax, eax
jz	short loc_603B70
mov	edx, [edi+4]
mov	ecx, [edi+8]
sub	esp, 0Ch
mov	eax, esp
mov	[eax], edx
mov	edx, [edi+0Ch]
mov	[eax+4], ecx
mov	[eax+8], edx
mov	eax, [edi]
push	eax
push	ebp
call	sub_603880

loc_603B70:
add	edi, 10h
sub	[esp+18h+arg_0], 1
jnz	short loc_603B42

loc_603B7A:
cmp	[esp+18h+var_4], 0
jnz	short loc_603B94
mov	edx, [ebp+0]
mov	eax, [esp+18h+var_8]
mov	edx, [edx+8]
shl	ebx, 4
push	ebx
push	eax
mov	ecx, ebp
call	edx

loc_603B94:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_603AC0 endp

align 10h



sub_603BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
jle	short loc_603BC3
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_603FE0

loc_603BC3:
mov	ecx, [esp+arg_4]
shr	ecx, 4
imul	ecx, 9E3779B1h
push	ebx
mov	ebx, [esi+8]
and	ecx, ebx
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
push	edi
mov	edi, [esi]
add	edx, edx
cmp	dword ptr [edi+edx], 0FFFFFFFFh
mov	eax, 1
jz	short loc_603C12
push	ebp
mov	edi, edi

loc_603BF0:
mov	ebp, [esp+0Ch+arg_4]
cmp	[edi+edx], ebp
jz	short loc_603C0F
inc	ecx
and	ecx, ebx
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
add	edx, edx
mov	ebp, edi
cmp	dword ptr [edx+ebp], 0FFFFFFFFh
jnz	short loc_603BF0
jmp	short loc_603C11

loc_603C0F:
xor	eax, eax

loc_603C11:
pop	ebp

loc_603C12:
add	[esi+4], eax
mov	edx, [esp+8+arg_4]
lea	ecx, [ecx+ecx*2]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
mov	[edi+ecx], edx
mov	edx, [esi]
lea	ecx, [ecx+edx+8]
mov	edx, [esp+8+arg_8]
mov	[ecx], edx
mov	edx, [esp+8+arg_C]
mov	[ecx+4], edx
mov	edx, [esp+8+arg_10]
mov	[ecx+8], edx
mov	edx, [esp+8+arg_14]
pop	edi
mov	[ecx+0Ch], edx
pop	ebx
retn	18h
sub_603BA0 endp

align 10h



sub_603C50 proc	near
push	esi
mov	esi, [ecx+8]
test	esi, esi
jle	short loc_603C84
mov	edx, [ecx]
mov	eax, edi
shr	eax, 4
imul	eax, 9E3779B1h
and	eax, esi
lea	ecx, [eax+eax*2]
mov	ecx, [edx+ecx*8]
cmp	ecx, 0FFFFFFFFh
jz	short loc_603C84

loc_603C72:
cmp	ecx, edi
jz	short loc_603C87
inc	eax
and	eax, esi
lea	ecx, [eax+eax*2]
mov	ecx, [edx+ecx*8]
cmp	ecx, 0FFFFFFFFh
jnz	short loc_603C72

loc_603C84:
lea	eax, [esi+1]

loc_603C87:
pop	esi
retn
sub_603C50 endp

align 10h



sub_603C90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, eax
mov	ecx, ebx
call	sub_603C50
mov	edi, eax
cmp	edi, [ebx+8]
setle	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+0Ch+arg_0]
call	sub_4D4F20
lea	ecx, [esp+8+arg_0]
call	sub_4D4F40
test	al, al
jz	short loc_603CE9
mov	eax, [ebx]
lea	edx, [edi+edi*2]
mov	ecx, [eax+edx*8+8]
lea	eax, [eax+edx*8+8]
mov	edx, [eax+4]
mov	[esi], ecx
mov	ecx, [eax+8]
mov	[esi+4], edx
mov	edx, [eax+0Ch]
pop	edi
mov	[esi+8], ecx
mov	[esi+0Ch], edx
xor	eax, eax
pop	ebx
retn	4

loc_603CE9:
pop	edi
mov	eax, 1
pop	ebx
retn	4
sub_603C90 endp

align 10h



sub_603D00 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	edi
mov	edi, eax
mov	ecx, esi
call	sub_603C50
mov	edi, eax
cmp	edi, [esi+8]
setle	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+0Ch+var_1]
call	sub_4D4F20
lea	ecx, [esp+8+var_1]
call	sub_4D4F40
test	al, al
jz	short loc_603D3B
mov	ecx, edi
mov	edi, esi
call	sub_603D50
xor	eax, eax
pop	edi
pop	ecx
retn

loc_603D3B:
mov	eax, 1
pop	edi
pop	ecx
retn
sub_603D00 endp

align 10h



sub_603D50 proc	near

var_4= dword ptr -4

push	ecx
mov	edx, [edi]
dec	dword ptr [edi+4]
push	ebx
lea	eax, [ecx+ecx*2]
mov	dword ptr [edx+eax*8], 0FFFFFFFFh
mov	edx, [edi]
push	ebp
push	esi
mov	esi, [edi+8]
lea	eax, [esi+ecx]
and	eax, esi
lea	ebx, [eax+eax*2]
cmp	dword ptr [edx+ebx*8], 0FFFFFFFFh
jz	short loc_603D85
mov	ebx, edx

loc_603D78:
add	eax, esi
and	eax, esi
lea	ebp, [eax+eax*2]
cmp	dword ptr [ebx+ebp*8], 0FFFFFFFFh
jnz	short loc_603D78

loc_603D85:
inc	eax
and	eax, esi
mov	ebx, ecx
inc	ecx
mov	[esp+10h+var_4], eax
and	ecx, esi
lea	eax, [ecx+ecx*2]
add	eax, eax
add	eax, eax
add	eax, eax
cmp	dword ptr [edx+eax], 0FFFFFFFFh
jz	loc_603E29

loc_603DA4:
mov	ebp, [edi]
mov	edx, [eax+ebp]
shr	edx, 4
imul	edx, 9E3779B1h
and	edx, esi
mov	esi, [esp+10h+var_4]
cmp	ecx, esi
jb	short loc_603DC0
cmp	edx, ebx
ja	short loc_603E0E

loc_603DC0:
cmp	ecx, ebx
jnb	short loc_603DCC
cmp	edx, ebx
ja	short loc_603E0E
cmp	edx, ecx
jbe	short loc_603E0E

loc_603DCC:
cmp	edx, ebx
jbe	short loc_603DD4
cmp	edx, esi
jb	short loc_603E0E

loc_603DD4:
mov	esi, [eax+ebp]
lea	edx, [ebx+ebx*2]
add	edx, edx
add	edx, edx
add	edx, edx
mov	[edx+ebp], esi
mov	ebx, [edi]
lea	esi, [ebx+eax+8]
lea	edx, [edx+ebx+8]
mov	ebx, [esi]
mov	[edx], ebx
mov	ebx, [esi+4]
mov	[edx+4], ebx
mov	ebx, [esi+8]
mov	[edx+8], ebx
mov	esi, [esi+0Ch]
mov	[edx+0Ch], esi
mov	edx, [edi]
mov	dword ptr [eax+edx], 0FFFFFFFFh
mov	ebx, ecx

loc_603E0E:
mov	esi, [edi+8]
mov	edx, [edi]
inc	ecx
and	ecx, esi
lea	eax, [ecx+ecx*2]
add	eax, eax
add	eax, eax
add	eax, eax
cmp	dword ptr [eax+edx], 0FFFFFFFFh
jnz	loc_603DA4

loc_603E29:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_603D50 endp

align 10h



sub_603E30 proc	near
mov	edx, esi
call	sub_603FB0
test	dword ptr [esi+4], 80000000h
jnz	short locret_603E5A
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+8]
inc	eax
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
mov	ecx, edi
call	edx

locret_603E5A:
retn
sub_603E30 endp

align 10h



sub_603E60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, eax
mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_603E8C
lea	edx, [eax+eax+2]
mov	eax, [esp+0Ch+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_6040C0

loc_603E8C:
mov	edx, [esi+8]
mov	edi, [esi]
mov	ecx, ebx
imul	ecx, 9E3779B1h
and	ecx, edx
cmp	dword ptr [edi+ecx*8], 0FFFFFFFFh
mov	eax, 1
jz	short loc_603EBD
push	ebp

loc_603EA7:
cmp	[edi+ecx*8], ebx
jz	short loc_603EBA
inc	ecx
and	ecx, edx
mov	ebp, edi
cmp	dword ptr [ebp+ecx*8+0], 0FFFFFFFFh
jnz	short loc_603EA7
jmp	short loc_603EBC

loc_603EBA:
xor	eax, eax

loc_603EBC:
pop	ebp

loc_603EBD:
add	[esi+4], eax
mov	[edi+ecx*8], ebx
mov	edx, [esi]
mov	esi, [esp+0Ch+arg_8]
pop	edi
mov	[edx+ecx*8+4], esi
pop	esi
pop	ebx
retn	0Ch
sub_603E60 endp

align 10h



sub_603EE0 proc	near
push	esi
mov	esi, [ecx+8]
test	esi, esi
jle	short loc_603F0F
mov	edx, [ecx]
mov	eax, edi
imul	eax, 9E3779B1h
and	eax, esi
mov	ecx, [edx+eax*8]
cmp	ecx, 0FFFFFFFFh
jz	short loc_603F0F
lea	esp, [esp+0]

loc_603F00:
cmp	ecx, edi
jz	short loc_603F14
inc	eax
and	eax, esi
mov	ecx, [edx+eax*8]
cmp	ecx, 0FFFFFFFFh
jnz	short loc_603F00

loc_603F0F:
or	eax, 0FFFFFFFFh
pop	esi
retn

loc_603F14:
mov	eax, [edx+eax*8+4]
pop	esi
retn
sub_603EE0 endp

align 10h



sub_603F20 proc	near
mov	edx, esi
call	sub_6028E0
test	dword ptr [esi+4], 80000000h
jnz	short locret_603F47
mov	ecx, [esi+8]
mov	eax, [edi]
lea	edx, ds:8[ecx*8]
mov	ecx, [esi]
push	edx
mov	edx, [eax+8]
push	ecx
mov	ecx, edi
call	edx

locret_603F47:
retn
sub_603F20 endp

align 10h



sub_603F50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [edi+8]
push	ebp
mov	ebp, [esp+4+arg_8]
push	esi
mov	esi, [edi+4]
add	esi, ebp
and	eax, 3FFFFFFFh
cmp	eax, esi
jge	short loc_603F80
add	eax, eax
cmp	esi, eax
jl	short loc_603F6F
mov	eax, esi

loc_603F6F:
push	1
push	eax
mov	eax, [esp+10h+arg_0]
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_603F80:
mov	eax, [edi]
add	eax, [edi+4]
test	ebp, ebp
jle	short loc_603F9B
mov	ecx, [esp+8+arg_4]
sub	ecx, eax
nop

loc_603F90:
mov	dl, [ecx+eax]
mov	[eax], dl
inc	eax
sub	ebp, 1
jnz	short loc_603F90

loc_603F9B:
mov	[edi+4], esi
pop	esi
pop	ebp
retn	0Ch
sub_603F50 endp

align 10h



sub_603FB0 proc	near
mov	ecx, [edx+8]
inc	ecx
test	ecx, ecx
jle	short loc_603FD2
xor	eax, eax
push	esi
jmp	short loc_603FC0
align 10h

loc_603FC0:
mov	esi, [edx]
mov	dword ptr [eax+esi], 0FFFFFFFFh
add	eax, 18h
sub	ecx, 1
jnz	short loc_603FC0
pop	esi

loc_603FD2:
and	dword ptr [edx+4], 80000000h
retn
sub_603FB0 endp

align 10h



sub_603FE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_4]
push	ebx
push	ebp
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebp, [esp+20h+arg_0]
mov	edx, [ebp+0]
mov	ebx, [esi+8]
mov	edx, [edx+4]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+20h+var_4], eax
lea	eax, [edi+edi*2]
add	eax, eax
add	eax, eax
add	esp, 8
add	eax, eax
mov	[esp+18h+var_8], ecx
push	eax
mov	ecx, ebp
inc	ebx
call	edx
mov	[esi], eax
test	edi, edi
jle	short loc_604043
xor	eax, eax
mov	ecx, edi

loc_604032:
mov	edx, [esi]
mov	dword ptr [eax+edx], 0FFFFFFFFh
add	eax, 18h
sub	ecx, 1
jnz	short loc_604032

loc_604043:
dec	edi
mov	dword ptr [esi+4], 0
mov	[esi+8], edi
test	ebx, ebx
jle	short loc_604094
mov	edi, [esp+18h+var_8]
mov	[esp+18h+arg_4], ebx
lea	ebx, [ebx+0]

loc_604060:
mov	ecx, [edi]
cmp	ecx, 0FFFFFFFFh
jz	short loc_60408A
mov	edx, [edi+8]
sub	esp, 10h
mov	eax, esp
mov	[eax], edx
mov	edx, [edi+0Ch]
mov	[eax+4], edx
mov	edx, [edi+10h]
mov	[eax+8], edx
mov	edx, [edi+14h]
push	ecx
push	ebp
mov	[eax+0Ch], edx
call	sub_603BA0

loc_60408A:
add	edi, 18h
sub	[esp+18h+arg_4], 1
jnz	short loc_604060

loc_604094:
cmp	[esp+18h+var_4], 0
jnz	short loc_6040B4
mov	eax, [ebp+0]
mov	edx, [esp+18h+var_8]
mov	eax, [eax+8]
lea	ecx, [ebx+ebx*2]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
mov	ecx, ebp
call	eax

loc_6040B4:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_603FE0 endp

align 10h



sub_6040C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebp, [esp+1Ch+arg_0]
mov	edx, [ebp+0]
mov	ebx, [esi+8]
mov	edx, [edx+4]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+1Ch+var_4], eax
add	esp, 8
lea	eax, ds:0[edi*8]
mov	[esp+14h+arg_4], ecx
push	eax
mov	ecx, ebp
inc	ebx
call	edx
mov	[esi], eax
xor	eax, eax
test	edi, edi
jle	short loc_60411E
lea	esp, [esp+0]

loc_604110:
mov	ecx, [esi]
mov	dword ptr [ecx+eax*8], 0FFFFFFFFh
inc	eax
cmp	eax, edi
jl	short loc_604110

loc_60411E:
dec	edi
mov	[esi+8], edi
xor	edi, edi
mov	dword ptr [esi+4], 0
test	ebx, ebx
jle	short loc_60414F
nop

loc_604130:
mov	ecx, [esp+14h+arg_4]
mov	eax, [ecx+edi*8]
cmp	eax, 0FFFFFFFFh
jz	short loc_60414A
mov	edx, [ecx+edi*8+4]
push	edx
push	eax
push	ebp
mov	eax, esi
call	sub_603E60

loc_60414A:
inc	edi
cmp	edi, ebx
jl	short loc_604130

loc_60414F:
cmp	[esp+14h+var_4], 0
jnz	short loc_60416D
mov	eax, [ebp+0]
mov	edx, [esp+14h+arg_4]
mov	eax, [eax+8]
lea	ecx, ds:0[ebx*8]
push	ecx
push	edx
mov	ecx, ebp
call	eax

loc_60416D:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6040C0 endp

align 10h



sub_604180 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx]
mov	eax, edx
inc	edx
mov	[ecx], edx
shl	eax, 4
lea	eax, [eax+ecx+4]
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	edx, [esi]
mov	[eax+8], edx
mov	ecx, [esi+4]
mov	edx, [esp+arg_4]
mov	[eax+0Ch], ecx
mov	[eax+4], edx
retn	8
sub_604180 endp

align 10h



sub_6041B0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
retn
sub_6041B0 endp

align 10h



sub_6041C0 proc	near
push	esi
mov	esi, eax
shr	eax, 8
test	eax, eax
jnz	short loc_6041CC
pop	esi
retn

loc_6041CC:
cmp	eax, 0FFFFh
jbe	short loc_6041DA
mov	eax, 1Fh
pop	esi
retn

loc_6041DA:
lea	edx, [eax-100h]
shr	edx, 10h
and	edx, 8
mov	ecx, edx
shl	eax, cl
lea	ecx, [eax-1000h]
shr	ecx, 10h
and	ecx, 4
shl	eax, cl
add	edx, ecx
lea	ecx, [eax-4000h]
shr	ecx, 10h
and	ecx, 2
shl	eax, cl
shr	eax, 0Fh
sub	eax, ecx
sub	eax, edx
add	eax, 0Eh
lea	ecx, [eax+7]
shr	esi, cl
and	esi, 1
lea	eax, [esi+eax*2]
pop	esi
retn
sub_6041C0 endp

align 10h



sub_604220 proc	near
dec	eax
mov	edx, eax
shr	edx, 0Ch
and	edx, 10h
mov	ecx, edx
shr	eax, cl
mov	ecx, eax
shr	ecx, 5
and	ecx, 8
shr	eax, cl
add	edx, ecx
mov	ecx, eax
shr	ecx, 2
and	ecx, 4
shr	eax, cl
add	edx, ecx
mov	ecx, eax
shr	ecx, 1
and	ecx, 2
shr	eax, cl
add	edx, ecx
mov	ecx, eax
shr	ecx, 1
and	ecx, 1
shr	eax, cl
add	eax, edx
add	eax, ecx
retn
sub_604220 endp

align 10h



sub_604260 proc	near
push	edi
mov	edi, ecx
call	sub_ACAD20
mov	eax, edi
pop	edi
retn	4
sub_604260 endp

align 10h



sub_604270 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	esi
lea	esi, [ecx+8]
mov	ecx, [esp+8+arg_0]
push	eax
push	ecx
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
push	eax
mov	ecx, esi
call	sub_4DEB60
pop	esi
pop	ecx
retn	8
sub_604270 endp

align 10h



sub_6042A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax]
push	0
push	eax
add	ecx, 8
call	sub_4DDD80
retn	4
sub_6042A0 endp

align 10h



sub_6042C0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebp
lea	ebp, [ecx+8]
push	edi
mov	ecx, ebp
call	sub_4DDC80
mov	edi, eax
push	edi
lea	eax, [esp+10h+var_1]
push	eax
mov	ecx, ebp
call	sub_4DDD50
lea	ecx, [esp+0Ch+var_1]
call	sub_4D4F40
test	al, al
jz	short loc_604356
push	ebx
push	esi
mov	esi, [esp+14h+arg_0]
nop

loc_6042F0:
push	edi
mov	ecx, ebp
call	sub_4DDCD0
push	esi
lea	ecx, [esp+18h+arg_0]
mov	ebx, eax
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_604323
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_604323:
mov	edx, [esi+4]
mov	eax, [esi]
lea	eax, [eax+edx*4]
mov	[eax], ebx
inc	dword ptr [esi+4]
push	edi
mov	ecx, ebp
call	sub_4DDD00
mov	edi, eax
push	edi
lea	ecx, [esp+18h+var_1]
push	ecx
mov	ecx, ebp
call	sub_4DDD50
lea	ecx, [esp+14h+var_1]
call	sub_4D4F40
test	al, al
jnz	short loc_6042F0
pop	esi
pop	ebx

loc_604356:
pop	edi
pop	ebp
pop	ecx
retn	4
sub_6042C0 endp

align 10h



sub_604360 proc	near

var_D4=	byte ptr -0D4h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 0D4h
push	esi
push	edi
lea	eax, [esp+0DCh+var_D4]
call	sub_12A73F0
mov	eax, [esp+0DCh+arg_10]
mov	ecx, [esp+0DCh+arg_4]
mov	edx, [esp+0DCh+arg_0]
push	eax
push	ecx
push	edx
lea	ecx, [esp+0E8h+var_D4]
call	sub_11E2990
mov	eax, [esp+0DCh+arg_C]
mov	ecx, [esp+0DCh+arg_8]
push	eax
push	ecx
lea	ecx, [esp+0E4h+var_D4]
call	sub_12A70E0
lea	edi, [esp+0DCh+var_D4]
mov	esi, eax
call	sub_11E2E10
pop	edi
mov	eax, esi
pop	esi
add	esp, 0D4h
retn	14h
sub_604360 endp

align 10h



sub_6043D0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx]
sub	eax, 2
jz	short loc_6043ED
sub	eax, 1
jz	short loc_6043E5
xor	eax, eax
retn	4

loc_6043E5:
mov	eax, 1
retn	4

loc_6043ED:
lea	edx, [ecx+8]
call	sub_AD30A0
neg	eax
sbb	eax, eax
inc	eax
retn	4
sub_6043D0 endp

align 10h



sub_604400 proc	near

var_A0=	dword ptr -0A0h
var_9A=	byte ptr -9Ah
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_8C=	byte ptr -8Ch
var_84=	dword ptr -84h
var_7E=	word ptr -7Eh
var_7C=	byte ptr -7Ch
var_70=	byte ptr -70h
var_60=	byte ptr -60h
var_38=	byte ptr -38h
var_30=	byte ptr -30h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0A0h
push	ebx
mov	ebx, [esp+0A4h+arg_4]
mov	eax, [ebx]
mov	edx, [eax+0Ch]
push	ebp
mov	ebp, [esp+0A8h+arg_8]
push	esi
push	edi
push	ecx
mov	ecx, ebx
call	edx
test	eax, eax
jz	short loc_60444E
test	ebp, ebp
jz	short loc_60443E
lea	esi, [ebp+4]
mov	eax, offset aFailedToLoadFi ; "Failed to load file"
mov	dword ptr [ebp+0], 6
call	sub_AD3EC0

loc_60443E:
mov	eax, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn

loc_60444E:
mov	eax, [ebx]
mov	edx, [eax+28h]
mov	ecx, ebx
call	edx
mov	ecx, offset aHavok7_0_0R1 ; "Havok-7.0.0-r1"
call	sub_AD31D0
test	eax, eax
jg	short loc_6044C3
mov	ecx, dword_196D290
mov	edi, ecx
test	ecx, ecx
jz	short loc_604476
call	sub_AD60E0

loc_604476:
push	edi
mov	esi, ebx
call	sub_AC25A0
add	esp, 4
test	eax, eax
jz	short loc_6044B8
test	ebp, ebp
jz	short loc_60449D
lea	esi, [ebp+4]
mov	eax, offset aUnableToVersio ; "Unable to version contents."
mov	dword ptr [ebp+0], 4
call	sub_AD3EC0

loc_60449D:
test	edi, edi
jz	short loc_6044A8
mov	ecx, edi
call	sub_AD6020

loc_6044A8:
mov	eax, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn

loc_6044B8:
test	edi, edi
jz	short loc_6044C3
mov	ecx, edi
call	sub_AD6020

loc_6044C3:
mov	eax, [ebx]
mov	edx, [eax+30h]
mov	ecx, ebx
call	edx
mov	ebp, eax
mov	eax, [ebx]
mov	edx, [eax+1Ch]
mov	ecx, ebx
call	edx
mov	edi, eax
mov	byte ptr [esp+0B0h+var_A0], 0
mov	eax, [esp+0B0h+var_A0]
push	eax
lea	esi, [esp+0B4h+var_70]
mov	[esp+0B4h+var_98], edi
call	sub_6031D0
xor	eax, eax
cmp	[edi+4], eax
mov	[esp+0B0h+var_A0], eax
jle	loc_604617
nop

loc_604500:
mov	ecx, [edi]
mov	edx, [ecx+eax*8+4]
lea	esi, [ecx+eax*8]
push	edx
mov	eax, edx
call	sub_AD4F80
push	eax
lea	ecx, [esp+0B8h+var_70]
call	sub_6032F0
mov	ebx, offset off_15D6A5C

loc_604520:
mov	ecx, [ebx-4]
mov	eax, [ebp+0]
mov	edx, [eax+10h]
push	ecx
mov	ecx, ebp
call	edx
test	eax, eax
jz	short loc_604577
push	eax
mov	eax, [esi+4]
lea	edi, [esp+0B4h+var_99]
call	sub_AD5150
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_604577
mov	eax, [ebx]
push	eax
mov	eax, [esi+4]
lea	ecx, [esp+0B4h+var_8C]
push	ecx
mov	ecx, [esi]
call	sub_ACE130
lea	eax, [esp+0B0h+var_8C]
call	sub_ACDF10
call	sub_AD1500
mov	edx, eax
lea	eax, [esp+0B0h+var_8C]
call	sub_ACE080
mov	[eax], edx

loc_604577:
add	ebx, 8
cmp	ebx, offset off_15D6AB4
jl	short loc_604520
mov	eax, [ebp+0]
mov	edx, [eax+10h]
push	offset aHkpentity ; "hkpEntity"
mov	ecx, ebp
call	edx
test	eax, eax
jz	short loc_6045FA
push	eax
mov	eax, [esi+4]
lea	edi, [esp+0B4h+var_9A]
call	sub_AD5150
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_6045FA
mov	ecx, [esi]
push	offset aMotion	; "motion"
lea	eax, [esp+0B4h+var_94]
push	eax
mov	eax, [esi+4]
call	sub_ACE130
mov	eax, offset aType ; "type"
lea	esi, [esp+0B0h+var_38]
lea	ecx, [esp+0B0h+var_94]
call	sub_ACE170
call	sub_ACDFA0
movsx	eax, byte ptr [eax]
mov	edx, [ebp+0]
mov	eax, dword_184FAD8[eax*4]
mov	edx, [edx+10h]
push	eax
mov	ecx, ebp
call	edx
mov	ecx, eax
lea	eax, [esp+0B0h+var_94]
call	sub_ACE080
mov	[eax], ecx

loc_6045FA:
mov	eax, [esp+0B0h+var_A0]
mov	edi, [esp+0B0h+var_98]
inc	eax
cmp	eax, [edi+4]
mov	[esp+0B0h+var_A0], eax
jl	loc_604500
mov	ebx, [esp+0B0h+arg_4]

loc_604617:
lea	edx, [esp+0B0h+var_70]
push	edx
lea	edi, [esp+0B4h+var_30]
call	sub_A56BB0
mov	eax, 1
push	0
lea	ecx, [esp+0B4h+var_7C]
mov	[esp+0B4h+var_7E], ax
mov	[esp+0B4h+var_84], offset off_15D6AB4
call	sub_4DD190
mov	edx, [ebx]
mov	edx, [edx+10h]
mov	eax, edi
push	eax
push	0
mov	ecx, ebx
mov	[esp+0B8h+var_84], offset off_15D6AF0
call	edx
mov	[esp+0B0h+var_98], eax
mov	eax, [ebx]
mov	edx, [eax+34h]
mov	ecx, ebx
call	edx
lea	edi, [esp+0B0h+var_60]
mov	dword ptr [eax+30h], 0
call	sub_A56600
mov	esi, ebp
call	sub_A56530
lea	esi, [esp+0B0h+var_84]
call	sub_A56390
mov	eax, [ebx]
mov	edx, [eax+18h]
mov	ecx, ebx
call	edx
push	eax
xor	eax, eax
lea	edi, [esp+0B4h+var_70]
call	sub_603480
push	eax
mov	eax, [esp+0B4h+var_98]
push	eax
lea	edi, [esp+0B8h+var_60]
call	sub_A56430
mov	esi, [esp+0B0h+arg_0]
mov	ecx, edi
mov	eax, esi
call	sub_11E28D0
mov	ecx, dword_196D2C0
push	ecx
xor	eax, eax
mov	ecx, esi
call	sub_A5AB50
lea	edx, [esp+0B0h+var_60]
push	edx
mov	edi, eax
call	sub_A56550
lea	ecx, [esp+0B0h+var_7C]
call	sub_4DCDB0
lea	ecx, [esp+0B0h+var_84]
call	sub_4DA650
lea	eax, [esp+0B0h+var_30]
push	eax
call	sub_A56B00
lea	esi, [esp+0B0h+var_70]
call	sub_603220
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn
sub_604400 endp

align 10h


; Attributes: bp-based frame

sub_604710 proc	near

var_80=	byte ptr -80h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [eax]
sub	esp, 84h
sub	eax, 2
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_4]
mov	esi, ecx
jz	short loc_604772
sub	eax, 1
jz	short loc_604741
mov	eax, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_604741:
lea	ecx, [esp+90h+var_80]
push	ecx
call	sub_ABD1A0
push	esi
lea	edx, [esp+94h+var_80]
push	edx
push	ebx
mov	ecx, edi
call	sub_604400
add	esp, 0Ch
lea	edi, [esp+90h+var_80]
mov	esi, eax
call	sub_ABCF00
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_604772:
lea	eax, [esp+90h+var_80]
push	eax
call	sub_AC02A0
push	esi
lea	ecx, [esp+94h+var_80]
push	ecx
push	ebx
mov	ecx, edi
call	sub_604400
add	esp, 0Ch
lea	edi, [esp+90h+var_80]
mov	esi, eax
call	sub_ABF060
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_604710 endp

align 10h



sub_6047B0 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	esi
push	edi
lea	esi, [esp+14h+var_C]
call	sub_A54CD0
mov	eax, [esp+14h+arg_0]
push	eax
mov	eax, [esp+18h+arg_4]
mov	ecx, esi
push	ecx
mov	ecx, [esp+1Ch+arg_8]
call	sub_604710
test	eax, eax
jnz	short loc_60480A
lea	edx, [esp+14h+arg_0]
push	edx
mov	ecx, esi
call	sub_A54AC0
push	eax
call	sub_11E1230
mov	esi, eax
add	esp, 4
lea	eax, [esp+14h+arg_0]
call	sub_A572E0
lea	edi, [esp+14h+var_C]
call	sub_A55930
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	0Ch

loc_60480A:
lea	edi, [esp+14h+var_C]
call	sub_A55930
pop	edi
xor	eax, eax
pop	esi
add	esp, 0Ch
retn	0Ch
sub_6047B0 endp

align 10h



sub_604820 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	esi
push	edi
lea	esi, [esp+14h+var_C]
call	sub_A54CD0
mov	eax, [esp+14h+arg_0]
push	eax
mov	eax, [esp+18h+arg_4]
mov	ecx, esi
push	ecx
mov	ecx, [esp+1Ch+arg_8]
call	sub_604710
test	eax, eax
jnz	short loc_60487A
lea	edx, [esp+14h+arg_0]
push	edx
mov	ecx, esi
call	sub_A54AC0
push	eax
call	sub_11E1290
mov	esi, eax
add	esp, 4
lea	eax, [esp+14h+arg_0]
call	sub_A572E0
lea	edi, [esp+14h+var_C]
call	sub_A55930
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	0Ch

loc_60487A:
lea	edi, [esp+14h+var_C]
call	sub_A55930
pop	edi
xor	eax, eax
pop	esi
add	esp, 0Ch
retn	0Ch
sub_604820 endp

align 10h



sub_604890 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+8]
call	sub_4DCDB0
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_6048C4
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6048C4:
mov	eax, esi
pop	esi
retn	4
sub_604890 endp

align 10h



; int __thiscall sub_6048D0(void *, char)
sub_6048D0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15E1360
jz	short loc_6048E9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6048E9:
mov	eax, esi
pop	esi
retn	4
sub_6048D0 endp

align 10h



; int __stdcall	sub_6048F0(int,	char *,	int)
sub_6048F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, ecx
test	esi, esi
jz	loc_6049D0
mov	ecx, [edi+8]
push	0
push	esi
call	sub_4DDD80
test	eax, eax
jz	short loc_604922

loc_604911:
mov	ecx, [edi+8]
push	0
push	eax
mov	esi, eax
call	sub_4DDD80
test	eax, eax
jnz	short loc_604911

loc_604922:
mov	ecx, [edi+0Ch]
push	0
push	esi
call	sub_4DDD80
mov	ebx, eax
test	ebx, ebx
jz	short loc_604966
mov	edi, [esp+10h+arg_8]
mov	esi, [esp+10h+arg_4]
push	offset a@	; "@"
mov	eax, edi
mov	ecx, esi	; char *
call	sub_AD3190
lea	eax, [edi-1]
push	ebx
lea	ecx, [esi+1]	; char *
call	sub_AD3190
add	esp, 8
mov	eax, esi
call	sub_AD3180
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_604966:
push	0FFFFFFFFh
lea	ebp, [edi+10h]
push	esi
mov	ecx, ebp
call	sub_4DDD80
mov	ebx, eax
cmp	ebx, 0FFFFFFFFh
jnz	short loc_6049AE
mov	edi, [edi+4]
push	0
push	esi
mov	ecx, edi
call	sub_4DDD80
cmp	eax, ebx
jz	short loc_6049D0
mov	ecx, ebp
call	sub_4DD240
mov	ebx, eax
inc	ebx
push	ebx
push	esi
push	ebp
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
push	eax
mov	ecx, ebp
call	sub_4DEB60

loc_6049AE:
test	ebx, ebx
jz	short loc_6049D0
mov	eax, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ebx
push	offset a04i	; "#%04i"
push	eax
call	sub_AD3220
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6049D0:
mov	eax, [esp+10h+arg_8]
mov	ecx, [esp+10h+arg_4] ; char *
push	offset aNull_0	; "null"
call	sub_AD3190
add	esp, 4
pop	edi
pop	esi
pop	ebp
mov	eax, 4
pop	ebx
retn	0Ch
sub_6048F0 endp

align 10h



; int __thiscall sub_604A00(void *, char)
sub_604A00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_4DCDB0
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_15E1360
jz	short loc_604A21
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_604A21:
mov	eax, esi
pop	esi
retn	4
sub_604A00 endp

align 10h



sub_604A30 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_604A63
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2260

loc_604A63:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_604A30 endp

align 10h



sub_604A80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	ecx, [edi]
mov	eax, [ecx+esi*8+4]
mov	[esp+4+var_4], eax
cmp	eax, 0FFFFFFFFh
jz	short loc_604AB2
mov	edx, [ecx+eax*8]
mov	[ecx+esi*8], edx
mov	edx, [ecx+eax*8+4]
mov	[ecx+esi*8+4], edx
mov	edx, [edi+18h]
mov	ecx, [edi]
mov	[ecx+eax*8+4], edx
mov	[edi+18h], eax
mov	[esp+4+var_4], esi
mov	eax, esi
pop	ecx
retn	4

loc_604AB2:
mov	eax, [esp+4+arg_0]
push	ebx
push	ebp
lea	ebx, [edi+0Ch]
push	eax
mov	ecx, ebx
call	sub_4DFAF0
mov	ebp, eax
push	ebp
mov	ecx, ebx
call	sub_4DDCD0
cmp	eax, esi
jnz	short loc_604ADF
mov	ecx, [ebx]
mov	dword ptr [ecx+ebp*8+4], 0FFFFFFFFh
mov	eax, esi
jmp	short loc_604B05

loc_604ADF:
mov	edx, [edi]
mov	ecx, [edx+eax*8+4]
lea	edx, [edx+eax*8+4]
cmp	ecx, esi
jnz	short loc_604AF7
mov	dword ptr [edx], 0FFFFFFFFh
mov	eax, esi
jmp	short loc_604B05

loc_604AF7:
mov	edx, [ebx]
mov	[edx+ebp*8+4], ecx
mov	ecx, [edi]
mov	edx, [ecx+eax*8]
mov	[ecx+esi*8], edx

loc_604B05:
mov	edx, [edi+18h]
mov	ecx, [edi]
mov	[ecx+eax*8+4], edx
pop	ebp
mov	[edi+18h], eax
mov	eax, [esp+8+var_4]
pop	ebx
pop	ecx
retn	4
sub_604A80 endp

align 10h



sub_604B20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
retn	4
sub_604B20 endp

align 10h



sub_604B30 proc	near
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	edx, 80000000h
mov	[eax+8], edx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], edx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], edx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], edx
mov	[eax+30h], ecx
retn
sub_604B30 endp

align 10h



sub_604B60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, eax
mov	byte ptr [esp+10h+arg_4], 0
mov	ecx, [esp+10h+arg_4]
mov	eax, 1
lea	esi, [ebp+8]
push	ecx
mov	[ebp+6], ax
mov	dword ptr [ebp+0], offset off_15E1380
call	sub_6031D0
mov	dword ptr [ebp+18h], 0
test	ebx, ebx
jz	short loc_604BA2
mov	ecx, ebx
call	sub_AD60E0

loc_604BA2:
mov	ecx, [ebp+18h]
test	ecx, ecx
jz	short loc_604BAE
call	sub_AD6020

loc_604BAE:
mov	[ebp+18h], ebx
test	edi, edi
jz	short loc_604BD6
mov	eax, [edi]
test	eax, eax
jz	short loc_604BD6
jmp	short loc_604BC0
align 10h

loc_604BC0:
mov	edx, [edi+4]
push	edx
push	eax
mov	ecx, esi
call	sub_6032F0
mov	eax, [edi+8]
add	edi, 8
test	eax, eax
jnz	short loc_604BC0

loc_604BD6:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	8
sub_604B60 endp

align 10h



sub_604BE0 proc	near
cmp	dword ptr [ecx+18h], 0
jz	short loc_604BF0
mov	ecx, [ecx+18h]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
jmp	edx

loc_604BF0:
xor	eax, eax
retn
sub_604BE0 endp

align 10h



sub_604C00 proc	near
cmp	dword ptr [ecx+18h], 0
jz	short locret_604C10
mov	ecx, [ecx+18h]
mov	eax, [ecx]
mov	eax, [eax+14h]
jmp	eax

locret_604C10:
retn	4
sub_604C00 endp

align 10h



sub_604C20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	esi, ecx
push	eax
lea	edi, [esi+8]
call	sub_603480
cmp	dword ptr [esi+18h], 0
pop	edi
jz	short loc_604C47
mov	ecx, [esi+18h]
mov	edx, [ecx]
pop	esi
mov	[esp+arg_0], eax
mov	eax, [edx+10h]
jmp	eax

loc_604C47:
xor	eax, eax
pop	esi
retn	4
sub_604C20 endp

align 10h



sub_604C50 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	ecx, [edi+18h]
mov	dword ptr [edi], offset	off_15E1380
test	ecx, ecx
jz	short loc_604C65
call	sub_AD6020

loc_604C65:
push	esi
lea	esi, [edi+8]
call	sub_603220
mov	ecx, edi
call	sub_4DA650
test	[esp+8+arg_0], 1
pop	esi
jz	short loc_604C98
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_604C98:
mov	eax, edi
pop	edi
retn	4
sub_604C50 endp

align 10h



sub_604CA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11DDD70
test	[esp+4+arg_0], 1
jz	short loc_604CCA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_604CCA:
mov	eax, esi
pop	esi
retn	4
sub_604CA0 endp




sub_604CD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_8]
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, eax
mov	byte ptr [esp+20h+arg_8], 0
mov	eax, [esp+20h+arg_8]
push	eax
call	sub_6031D0
mov	[esp+20h+var_C], 0
mov	[esp+20h+var_8], 0
mov	[esp+20h+var_4], 80000000h
test	edi, edi
jz	short loc_604D40
lea	esp, [esp+0]

loc_604D10:
cmp	dword ptr [edi+4], 0
lea	esi, [edi+4]
jz	short loc_604D39
lea	ecx, [esp+20h+var_C]
push	ecx
lea	ecx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+arg_8], 0
call	sub_4D5020
mov	ecx, eax
mov	eax, esi
lea	esi, [esp+20h+var_C]
call	sub_617C50

loc_604D39:
mov	edi, [edi+0Ch]
test	edi, edi
jnz	short loc_604D10

loc_604D40:
mov	edx, [esp+20h+arg_4]
xor	ebx, ebx
cmp	[edx+4], ebx
jle	loc_604DE1

loc_604D4F:
mov	eax, [esp+20h+arg_4]
mov	ecx, [eax]
mov	esi, [ecx+ebx*8+4]
mov	eax, esi
call	sub_AD4F80
mov	edi, [esp+20h+arg_0]
lea	edx, [esp+20h+var_10]
push	edx
call	sub_6034A0
test	eax, eax
jnz	short loc_604D78
mov	edi, [esp+20h+var_10]
jmp	short loc_604D98

loc_604D78:
lea	eax, [esp+20h+var_C]
push	eax
mov	eax, esi
call	sub_604E30
mov	edi, eax
push	edi
mov	eax, esi
call	sub_AD4F80
mov	ecx, [esp+24h+arg_0]
push	eax
call	sub_6032F0

loc_604D98:
test	edi, edi
jz	short loc_604DD3
push	ebp
lea	ecx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+arg_8], 0
call	sub_4D5020
mov	ecx, [ebp+8]
and	ecx, 3FFFFFFFh
cmp	[ebp+4], ecx
jnz	short loc_604DC5
push	4
push	ebp
push	eax
call	sub_121B830
add	esp, 0Ch

loc_604DC5:
mov	edx, [ebp+4]
mov	eax, [ebp+0]
lea	eax, [eax+edx*4]
mov	[eax], ebx
inc	dword ptr [ebp+4]

loc_604DD3:
mov	ecx, [esp+20h+arg_4]
inc	ebx
cmp	ebx, [ecx+4]
jl	loc_604D4F

loc_604DE1:
lea	edx, [esp+20h+var_C]
push	edx
lea	ecx, [esp+24h+arg_4]
mov	byte ptr [esp+24h+arg_4], 0
call	sub_4D5020
mov	edx, [esp+20h+var_4]
mov	[esp+20h+var_8], 0
test	edx, edx
js	short loc_604E1D
mov	ecx, [esp+20h+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_604E1D:
mov	eax, [esp+20h+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_604CD0 endp

align 10h



sub_604E30 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
push	edi
mov	edi, eax
mov	byte ptr [esp+20h+arg_0], 0
mov	eax, [esp+20h+arg_0]
push	eax
lea	esi, [esp+24h+var_10]
call	sub_6031D0
mov	esi, edi
test	edi, edi
jz	short loc_604E75

loc_604E56:
push	esi
mov	eax, esi
call	sub_AD4F80
push	eax
lea	ecx, [esp+28h+var_10]
call	sub_6032F0
mov	eax, esi
call	sub_AD4F70
mov	esi, eax
test	esi, esi
jnz	short loc_604E56

loc_604E75:
xor	esi, esi
cmp	[ebp+4], esi
jle	short loc_604EB0
lea	esp, [esp+0]

loc_604E80:
mov	ecx, [ebp+0]
mov	ebx, [ecx+esi*4]
mov	eax, [ebx+0Ch]
test	eax, eax
jz	short loc_604EAA
lea	ecx, [ecx+0]

loc_604E90:
push	eax
xor	eax, eax
lea	edi, [esp+24h+var_10]
call	sub_603480
test	eax, eax
jnz	short loc_604EC5
mov	eax, [ebx+20h]
add	ebx, 14h
test	eax, eax
jnz	short loc_604E90

loc_604EAA:
inc	esi
cmp	esi, [ebp+4]
jl	short loc_604E80

loc_604EB0:
lea	esi, [esp+20h+var_10]
call	sub_603220
xor	eax, eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4

loc_604EC5:
lea	esi, [esp+20h+var_10]
call	sub_603220
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 10h
retn	4
sub_604E30 endp

align 10h



sub_604EE0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, eax
add	esi, 34h
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_604F10
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_604F10:
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [esp+8+arg_0]
lea	eax, [eax+edx*4]
mov	[eax], ecx
inc	dword ptr [esi+4]
pop	esi
pop	ecx
retn	4
sub_604EE0 endp

align 10h



sub_604F30 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
mov	esi, eax
add	esi, 40h
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_604F60
push	0Ch
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_604F60:
mov	eax, [esi+4]
lea	edx, [eax+eax*2]
mov	eax, [esi]
lea	eax, [eax+edx*4]
push	eax		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_604F8E
mov	ecx, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	[eax], ecx
mov	ecx, [esp+8+arg_8]
mov	[eax+4], edx
mov	[eax+8], ecx

loc_604F8E:
inc	dword ptr [esi+4]
pop	esi
pop	ecx
retn	0Ch
sub_604F30 endp

align 10h



; int __thiscall sub_604FA0(void *, char)
sub_604FA0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15E15C8
jz	short loc_604FB9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_604FB9:
mov	eax, esi
pop	esi
retn	4
sub_604FA0 endp

align 10h



; int __thiscall sub_604FC0(void *, char)
sub_604FC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0Ch]
call	sub_4DCDB0
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_15E15C8
jz	short loc_604FE1
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_604FE1:
mov	eax, esi
pop	esi
retn	4
sub_604FC0 endp

align 10h



; int __thiscall sub_604FF0(void *, char)
sub_604FF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+18h]
call	sub_4DCDB0
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_15E15C8
jz	short loc_605011
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_605011:
mov	eax, esi
pop	esi
retn	4
sub_604FF0 endp

align 10h



sub_605020 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
test	eax, eax
jle	short loc_605053
push	esi
mov	esi, ecx
push	edi
add	esi, 4
mov	edi, eax

loc_605032:
cmp	dword ptr [esi-4], 0
jz	short loc_605049
mov	eax, [esi]
test	eax, eax
jz	short loc_605049
mov	edx, [ebx]
push	esi
push	eax
mov	eax, [edx+14h]
mov	ecx, ebx
call	eax

loc_605049:
add	esi, 8
sub	edi, 1
jnz	short loc_605032
pop	edi
pop	esi

loc_605053:
pop	ebx
retn	4
sub_605020 endp

align 10h



sub_605060 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_20=	byte ptr -20h
var_18=	byte ptr -18h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 30h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+40h+arg_4]
xor	edx, edx
mov	eax, edi
mov	ebp, ecx
mov	[esp+40h+var_2C], edx
call	sub_AD4EF0
test	eax, eax
jle	loc_6052C2

loc_605082:
mov	eax, edx
call	sub_AD50F0
mov	esi, eax
mov	ax, [esi+10h]
mov	ecx, 400h
and	ax, cx
mov	edx, ecx
cmp	ax, dx
jz	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24
movzx	eax, byte ptr [esi+0Ch]
add	eax, 0FFFFFFEAh	; switch 7 cases
cmp	eax, 6
ja	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24
jmp	ds:off_6052CC[eax*4] ; switch jump

loc_6050B9:		; jumptable 006050B2 case 28
mov	eax, esi
call	sub_AD14E0
test	eax, eax
jz	short loc_6050D1
mov	eax, esi
call	sub_AD14E0
mov	[esp+40h+arg_4], eax
jmp	short loc_6050D9

loc_6050D1:
mov	[esp+40h+arg_4], 1

loc_6050D9:
mov	eax, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+40h+var_30], eax
js	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24
mov	edi, edi

loc_6050F0:
push	esi
mov	eax, ebx
lea	ecx, [esp+44h+var_28]
call	sub_ACE0F0
mov	eax, ecx
call	sub_ACE090
mov	ecx, eax
mov	eax, [esp+40h+arg_4]
push	ebp
call	sub_605020
mov	eax, edi
call	sub_AD4EC0
add	ebx, eax
sub	[esp+40h+var_30], 1
jns	short loc_6050F0
jmp	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24

loc_605124:		; jumptable 006050B2 cases 22,26
mov	al, [esi+0Dh]
cmp	al, 1Ch
jnz	short loc_605175
mov	eax, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+40h+arg_4], eax
js	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24

loc_605140:
push	esi
mov	eax, ebx
lea	ecx, [esp+44h+var_20]
call	sub_ACE0F0
mov	eax, ecx
call	sub_ACDF40
mov	ecx, eax
mov	eax, [ecx+4]
mov	ecx, [ecx]
push	ebp
call	sub_605020
mov	eax, edi
call	sub_AD4EC0
add	ebx, eax
sub	[esp+40h+arg_4], 1
jns	short loc_605140
jmp	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24

loc_605175:
cmp	al, 19h
jnz	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24
mov	eax, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+40h+arg_4], eax
js	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24

loc_605192:
push	esi
mov	eax, ebx
lea	ecx, [esp+44h+var_18]
call	sub_ACE0F0
mov	eax, ecx
call	sub_ACDF40
mov	ecx, eax
mov	eax, [ecx+4]
push	eax
mov	eax, esi
call	sub_AD1510
mov	ecx, [ecx]
push	eax
push	ecx
mov	ecx, ebp
call	sub_605060
mov	eax, edi
call	sub_AD4EC0
add	ebx, eax
sub	[esp+40h+arg_4], 1
jns	short loc_605192
jmp	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24

loc_6051D2:		; jumptable 006050B2 case 27
mov	eax, [esp+40h+arg_8]
mov	edx, [esp+40h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+40h+arg_4], edx
mov	[esp+40h+var_30], eax
js	loc_6052AA	; default
			; jumptable 006050B2 cases 23,24

loc_6051EB:
mov	eax, [esp+40h+arg_4]
push	esi
lea	ecx, [esp+44h+var_10]
call	sub_ACE0F0
mov	eax, ecx
call	sub_ACDF30
mov	ebx, eax
mov	eax, [ebx]
test	eax, eax
jz	short loc_605226
mov	edx, [ebp+0]
push	ebx
push	eax
mov	eax, [edx+14h]
mov	ecx, ebp
call	eax
mov	ecx, [ebx+8]
mov	edx, [ebx]
mov	eax, [ebx+4]
push	ecx
push	edx
push	eax
mov	ecx, ebp
call	sub_605060

loc_605226:
mov	eax, edi
call	sub_AD4EC0
add	[esp+40h+arg_4], eax
sub	[esp+40h+var_30], 1
jns	short loc_6051EB
jmp	short loc_6052AA ; default
			; jumptable 006050B2 cases 23,24

loc_60523A:		; jumptable 006050B2 case 25
mov	eax, esi
call	sub_AD14E0
test	eax, eax
jz	short loc_605252
mov	eax, esi
call	sub_AD14E0
mov	[esp+40h+arg_4], eax
jmp	short loc_60525A

loc_605252:
mov	[esp+40h+arg_4], 1

loc_60525A:
mov	eax, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+40h+var_30], eax
js	short loc_6052AA ; default
			; jumptable 006050B2 cases 23,24
jmp	short loc_605270
align 10h

loc_605270:
push	esi
mov	eax, ebx
lea	ecx, [esp+44h+var_8]
call	sub_ACE0F0
mov	ecx, [esp+40h+arg_4]
push	ecx
mov	eax, esi
call	sub_AD1510
push	eax
lea	eax, [esp+48h+var_8]
call	sub_ACE090
push	eax
mov	ecx, ebp
call	sub_605060
mov	eax, edi
call	sub_AD4EC0
add	ebx, eax
sub	[esp+40h+var_30], 1
jns	short loc_605270

loc_6052AA:		; default
mov	edx, [esp+40h+var_2C] ;	jumptable 006050B2 cases 23,24
inc	edx
mov	eax, edi
mov	[esp+40h+var_2C], edx
call	sub_AD4EF0
cmp	edx, eax
jl	loc_605082

loc_6052C2:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	0Ch
sub_605060 endp

off_6052CC dd offset loc_605124	; jump table for switch	statement
dd offset loc_6052AA
dd offset loc_6052AA
dd offset loc_60523A
dd offset loc_605124
dd offset loc_6051D2
dd offset loc_6050B9
align 10h



sub_6052F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, eax
call	sub_1253A40
mov	eax, [esp+0Ch+arg_4]
xor	edi, edi
mov	dword ptr [esi], offset	off_15E15F8
mov	[esi+38h], edi
mov	[esi+3Ch], eax
cmp	[ebx+4], edi
jle	short loc_605331

loc_605315:
mov	ecx, [ebx]
mov	edx, [ecx+edi*8+4]
lea	eax, [ecx+edi*8]
mov	eax, [eax]
push	1
push	edx
push	eax
mov	ecx, esi
call	sub_605060
inc	edi
cmp	edi, [ebx+4]
jl	short loc_605315

loc_605331:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6052F0 endp

align 10h



sub_605340 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+3Ch]
mov	dword ptr [esi+38h], 1
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_605359
call	sub_AD6020

loc_605359:
mov	eax, [esp+8+arg_8]
mov	ecx, [esp+8+arg_4]
mov	edx, [esp+8+arg_0]
push	eax
push	ecx
push	edx
mov	ecx, esi
mov	dword ptr [edi], 0
call	sub_12538F0
pop	edi
pop	esi
retn	0Ch
sub_605340 endp

align 10h



sub_605380 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+3Ch]
mov	dword ptr [esi+38h], 1
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_605399
call	sub_AD6020

loc_605399:
mov	eax, [esp+8+arg_0]
push	eax
mov	ecx, esi
mov	dword ptr [edi], 0
call	sub_1253820
pop	edi
pop	esi
retn	4
sub_605380 endp




sub_6053B0 proc	near
mov	eax, [ecx+8]
jmp	sub_604EE0
sub_6053B0 endp

align 10h



sub_6053C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
push	eax
mov	esi, ecx
mov	eax, [esi+8]
push	edi
push	ebx
call	sub_604F30
mov	[esi+10h], edi
pop	edi
mov	[esi+0Ch], ebx
pop	esi
pop	ebx
retn	0Ch
sub_6053C0 endp

align 10h



sub_6053F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	esi
mov	esi, [ebx]
push	edi
mov	ebp, ecx
test	esi, esi
jz	short loc_605431
lea	edi, [ebp+14h]
mov	eax, esi
mov	ecx, edi
call	sub_61EDE0
cmp	eax, 0FFFFFFFFh
jz	short loc_605431
mov	ecx, [edi]

loc_605413:
cmp	[ecx+eax*8], ebx
jz	short loc_605423
mov	eax, [ecx+eax*8+4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_605413
jmp	short loc_605431

loc_605423:
cmp	[esp+10h+arg_0], esi
jz	short loc_605449
push	esi
mov	esi, eax
call	sub_604A80

loc_605431:
mov	esi, [esp+10h+arg_0]
test	esi, esi
jz	short loc_605447
lea	eax, [esp+10h+arg_4]
push	eax
push	esi
lea	eax, [ebp+14h]
call	sub_617AD0

loc_605447:
mov	[ebx], esi

loc_605449:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6053F0 endp




sub_605450 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	ebp, ecx
push	edi
lea	edi, [ebp+14h]
mov	ecx, edi
call	sub_61EDE0
mov	ebx, [esp+10h+arg_4]
mov	esi, eax
test	ebx, ebx
jz	short loc_60548A
push	esi
push	ebx
add	ebp, 20h
push	ebp
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
push	eax
mov	ecx, ebp
call	sub_4DEB60

loc_60548A:
cmp	esi, 0FFFFFFFFh
jz	short loc_6054A1
mov	eax, [edi]

loc_605491:
mov	eax, [eax+esi*8]
mov	[eax], ebx
mov	eax, [edi]
mov	esi, [eax+esi*8+4]
cmp	esi, 0FFFFFFFFh
jnz	short loc_605491

loc_6054A1:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_605450 endp

align 10h



sub_6054B0 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+14h]
call	sub_617910
mov	ecx, edi
call	sub_4DA650
test	[esp+8+arg_0], 1
jz	short loc_6054E5
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6054E5:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_6054B0 endp

align 10h



sub_6054F0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_ABF060
test	[esp+4+arg_0], 1
jz	short loc_60551A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60551A:
mov	eax, edi
pop	edi
retn	4
sub_6054F0 endp




sub_605520 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_605559
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edi
mov	edi, [eax]
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx
pop	edi

loc_605559:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	0Ch
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax
mov	eax, esi
pop	ecx
retn
sub_605520 endp

align 10h



sub_605590 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax]
test	ecx, ecx
jz	short locret_6055A2
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

locret_6055A2:
retn
sub_605590 endp

align 10h


; Attributes: bp-based frame

sub_6055B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
push	eax
mov	edi, ecx
push	esi
mov	[esp+20h+var_4], edi
call	sub_A530F0
mov	[esp+18h+var_8], eax
test	eax, eax
jnz	loc_6056CA
cmp	[edi+20h], eax
jnz	loc_6056CA
mov	eax, [esi]
mov	ebx, [eax+8]
dec	ebx
neg	ebx
sbb	ebx, ebx
not	ebx
and	ebx, eax
jz	loc_6056B1
push	0
push	offset aClass	; "class"
mov	eax, ebx
call	sub_A52B50
cmp	dword ptr [edi+18h], 0
mov	esi, eax
ja	short loc_605656
lea	eax, [ebx+0Ch]
mov	ecx, offset aHkobject ;	"hkobject"
call	sub_605D10
test	eax, eax
jz	short loc_605628
call	sub_ABCAB0
test	al, al
jz	short loc_605656

loc_605628:
cmp	dword ptr [edi+1Ch], 0
jz	loc_6056CA
mov	ecx, offset aHkobject ;	"hkobject"
lea	eax, [ebx+0Ch]
call	sub_605D10
test	eax, eax
jz	loc_6056CA
call	sub_ABCAB0
test	al, al
jz	short loc_6056CA
mov	ecx, [ebp+arg_0]
push	ecx
jmp	short loc_605696

loc_605656:
mov	eax, [edi+18h]
lea	esi, [eax+1]
lea	eax, [ebx+0Ch]
mov	ecx, offset aHkparam ; "hkparam"
mov	[edi+18h], esi
call	sub_605D10
test	eax, eax
jz	short loc_6056CA
push	0
push	offset aName	; "name"
mov	eax, ebx
call	sub_A52B50
mov	ecx, eax
mov	eax, offset aAttributes	; "attributes"
call	sub_AD31D0
test	eax, eax
jnz	short loc_6056CA
mov	edx, [ebp+arg_0]
dec	esi
mov	[edi+18h], esi
push	edx

loc_605696:
mov	edi, [ebp+arg_4]
mov	eax, [esp+1Ch+var_4]
mov	edx, ebx
call	sub_605760
mov	[esp+18h+var_8], eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6056B1:
xor	ecx, ecx
cmp	dword ptr [eax+8], 2
setnz	cl
dec	ecx
test	eax, ecx
jz	short loc_6056CA
mov	eax, [edi+18h]
test	eax, eax
jbe	short loc_6056CA
dec	eax
mov	[edi+18h], eax

loc_6056CA:
mov	eax, [esp+18h+var_8]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6055B0 endp

align 10h



sub_6056E0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+18h]
push	edi
mov	edi, [esp+4+arg_0]
test	eax, eax
jbe	short loc_60571E
push	esi
mov	esi, [edi+8]
mov	edx, esi
dec	edx
neg	edx
sbb	edx, edx
not	edx
test	edi, edx
jz	short loc_60570C
pop	esi
dec	eax
push	edi
mov	[ecx+18h], eax
call	sub_A528D0
pop	edi
retn	4

loc_60570C:
xor	edx, edx
cmp	esi, 2
setnz	dl
dec	edx
test	edi, edx
jz	short loc_60571D
inc	eax
mov	[ecx+18h], eax

loc_60571D:
pop	esi

loc_60571E:
push	edi
call	sub_A528D0
pop	edi
retn	4
sub_6056E0 endp

align 10h



sub_605730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
inc	dword ptr [esi+20h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_A52F10
dec	dword ptr [esi+20h]
pop	esi
retn	0Ch
sub_605730 endp

align 10h



sub_605760 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	esi
mov	esi, eax
lea	eax, [esp+18h+var_C]
mov	[esp+18h+var_10], offset sub_605590
call	sub_A2F9C0
mov	eax, [esi]
mov	eax, [eax+14h]
push	edi
lea	ecx, [esp+1Ch+var_10]
push	ecx
push	edx
mov	ecx, esi
call	eax
mov	ebx, eax
test	ebx, ebx
jnz	short loc_6057CD
mov	edx, [esi]
mov	eax, [esp+18h+arg_0]
mov	edx, [edx+0Ch]
push	edi
push	eax
mov	ecx, esi
call	edx
mov	esi, eax
lea	eax, [esp+18h+var_C]
call	sub_A2F990
test	eax, eax
jz	short loc_6057C3
lea	esp, [esp+0]

loc_6057B0:
mov	ecx, [esp+18h+var_10]
push	ecx
lea	edx, [esp+1Ch+var_C]
push	edx
call	sub_A2F9E0
test	eax, eax
jnz	short loc_6057B0

loc_6057C3:
mov	eax, esi
pop	esi
pop	ebx
add	esp, 10h
retn	4

loc_6057CD:
lea	eax, [esp+18h+var_C]
call	sub_A2F990
test	eax, eax
jz	short loc_6057F3
lea	ebx, [ebx+0]

loc_6057E0:
mov	ecx, [esp+18h+var_10]
push	ecx
lea	edx, [esp+1Ch+var_C]
push	edx
call	sub_A2F9E0
test	eax, eax
jnz	short loc_6057E0

loc_6057F3:
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 10h
retn	4
sub_605760 endp

align 10h



sub_605800 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A52BC0
test	[esp+4+arg_0], 1
jz	short loc_60582A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60582A:
mov	eax, edi
pop	edi
retn	4
sub_605800 endp




sub_605830 proc	near

var_20C= byte ptr -20Ch
var_200= byte ptr -200h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 20Ch
push	ebx
mov	ebx, [esp+210h+arg_4]
push	ebp
mov	ebp, [esp+214h+arg_C]
push	esi
xor	esi, esi
cmp	[esp+218h+arg_8], esi
jle	loc_60591A
push	edi
jmp	short loc_605860
align 10h

loc_605860:
mov	eax, [ebx+esi*8]
test	eax, eax
jz	loc_60590B
cmp	dword ptr [ebx+esi*8+4], 0
lea	edi, [ebx+esi*8+4]
jnz	loc_60590B
push	0
push	eax
mov	ecx, ebp
call	sub_4DDD80
mov	[edi], eax
test	eax, eax
jnz	short loc_6058FB
push	200h
lea	eax, [esp+220h+var_200]
push	eax
lea	ecx, [esp+224h+var_20C]
call	sub_128DD50
mov	ecx, [ebx+esi*8]
push	offset aYouWillHaveToS ; "You will have	to set manually	correspon"...
push	offset a__19	; ".\n"
push	ecx
push	offset aCanNotFindClas ; "Can not find class pointer for an objec"...
lea	ecx, [esp+22Ch+var_20C]
call	sub_AD3930
push	eax
call	sub_AD3950
mov	ecx, eax
call	sub_AD3930
mov	ecx, eax
call	sub_AD3930
mov	ecx, dword_196AFBC
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	158h
push	offset a_DeprecatedPac ; ".\\Deprecated\\Packfile\\Xml\\hkXmlPackfile"...
lea	eax, [esp+224h+var_200]
push	eax
push	67FDE46h
push	1
call	edx
lea	ecx, [esp+21Ch+var_20C]
call	sub_AD3A20
jmp	short loc_60590B

loc_6058FB:
mov	ecx, [esp+21Ch+arg_0]
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+14h]
call	eax

loc_60590B:
inc	esi
cmp	esi, [esp+21Ch+arg_8]
jl	loc_605860
pop	edi

loc_60591A:
pop	esi
pop	ebp
pop	ebx
add	esp, 20Ch
retn	10h
sub_605830 endp

align 10h



sub_605930 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_24=	byte ptr -24h
var_1C=	byte ptr -1Ch
var_14=	byte ptr -14h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 34h
push	ebx
push	ebp
mov	ebp, [esp+3Ch+arg_4]
push	esi
push	edi
mov	eax, ebp
mov	ebx, ecx
mov	[esp+44h+var_34], 0
call	sub_AD4EF0
test	eax, eax
jle	loc_605BB5

loc_605954:
mov	eax, [esp+44h+var_34]
mov	edi, ebp
call	sub_AD50F0
mov	esi, eax
mov	ax, [esi+10h]
mov	ecx, 400h
and	ax, cx
mov	edx, ecx
cmp	ax, dx
jz	loc_605B9D	; default
			; jumptable 00605988 cases 23,24
movzx	eax, byte ptr [esi+0Ch]
add	eax, 0FFFFFFEAh	; switch 7 cases
cmp	eax, 6
ja	loc_605B9D	; default
			; jumptable 00605988 cases 23,24
jmp	ds:off_605BC0[eax*4] ; switch jump

loc_60598F:		; jumptable 00605988 case 28
mov	eax, esi
call	sub_AD14E0
test	eax, eax
jz	short loc_6059A7
mov	eax, esi
call	sub_AD14E0
mov	[esp+44h+arg_4], eax
jmp	short loc_6059AF

loc_6059A7:
mov	[esp+44h+arg_4], 1

loc_6059AF:
mov	eax, [esp+44h+arg_C]
mov	edi, [esp+44h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+44h+var_30], eax
js	loc_605B9D	; default
			; jumptable 00605988 cases 23,24

loc_6059C4:
push	esi
mov	eax, edi
lea	ecx, [esp+48h+var_2C]
call	sub_ACE0F0
mov	eax, [esp+44h+arg_8]
mov	ecx, [esp+44h+arg_4]
push	eax
push	ecx
lea	eax, [esp+4Ch+var_2C]
call	sub_ACE090
push	eax
push	ebx
call	sub_605830
mov	eax, ebp
call	sub_AD4EC0
add	edi, eax
sub	[esp+44h+var_30], 1
jns	short loc_6059C4
jmp	loc_605B9D	; default
			; jumptable 00605988 cases 23,24

loc_6059FF:		; jumptable 00605988 cases 22,26
mov	al, [esi+0Dh]
cmp	al, 1Ch
jnz	short loc_605A5A
mov	eax, [esp+44h+arg_C]
mov	edi, [esp+44h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+44h+arg_4], eax
js	loc_605B9D	; default
			; jumptable 00605988 cases 23,24
jmp	short loc_605A20
align 10h

loc_605A20:
push	esi
mov	eax, edi
lea	ecx, [esp+48h+var_24]
call	sub_ACE0F0
mov	eax, ecx
call	sub_ACDF40
mov	edx, [esp+44h+arg_8]
mov	ecx, [eax+4]
push	edx
mov	edx, [eax]
push	ecx
push	edx
push	ebx
call	sub_605830
mov	eax, ebp
call	sub_AD4EC0
add	edi, eax
sub	[esp+44h+arg_4], 1
jns	short loc_605A20
jmp	loc_605B9D	; default
			; jumptable 00605988 cases 23,24

loc_605A5A:
cmp	al, 19h
jnz	loc_605B9D	; default
			; jumptable 00605988 cases 23,24
mov	eax, [esp+44h+arg_C]
mov	edi, [esp+44h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+44h+arg_4], eax
js	loc_605B9D	; default
			; jumptable 00605988 cases 23,24

loc_605A77:
push	esi
mov	eax, edi
lea	ecx, [esp+48h+var_1C]
call	sub_ACE0F0
mov	eax, ecx
call	sub_ACDF40
mov	edx, [esp+44h+arg_8]
mov	ecx, eax
mov	eax, [ecx+4]
push	eax
push	edx
mov	eax, esi
call	sub_AD1510
push	eax
mov	eax, [ecx]
push	eax
mov	ecx, ebx
call	sub_605930
mov	eax, ebp
call	sub_AD4EC0
add	edi, eax
sub	[esp+44h+arg_4], 1
jns	short loc_605A77
jmp	loc_605B9D	; default
			; jumptable 00605988 cases 23,24

loc_605ABC:		; jumptable 00605988 case 27
mov	eax, [esp+44h+arg_C]
mov	ecx, [esp+44h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+44h+arg_4], ecx
mov	[esp+44h+var_30], eax
js	loc_605B9D	; default
			; jumptable 00605988 cases 23,24

loc_605AD5:
mov	eax, [esp+44h+arg_4]
push	esi
lea	ecx, [esp+48h+var_14]
call	sub_ACE0F0
mov	eax, ecx
call	sub_ACDF30
mov	edi, eax
mov	eax, [edi]
test	eax, eax
jz	short loc_605B14
mov	edx, [ebx]
push	edi
push	eax
mov	eax, [edx+14h]
mov	ecx, ebx
call	eax
mov	ecx, [edi+8]
mov	edx, [esp+44h+arg_8]
mov	eax, [edi]
push	ecx
mov	ecx, [edi+4]
push	edx
push	eax
push	ecx
mov	ecx, ebx
call	sub_605930

loc_605B14:
mov	eax, ebp
call	sub_AD4EC0
add	[esp+44h+arg_4], eax
sub	[esp+44h+var_30], 1
jns	short loc_605AD5
jmp	short loc_605B9D ; default
			; jumptable 00605988 cases 23,24

loc_605B28:		; jumptable 00605988 case 25
mov	eax, esi
call	sub_AD14E0
test	eax, eax
jz	short loc_605B40
mov	eax, esi
call	sub_AD14E0
mov	[esp+44h+arg_4], eax
jmp	short loc_605B48

loc_605B40:
mov	[esp+44h+arg_4], 1

loc_605B48:
mov	eax, [esp+44h+arg_C]
mov	edi, [esp+44h+arg_0]
add	eax, 0FFFFFFFFh
mov	[esp+44h+var_30], eax
js	short loc_605B9D ; default
			; jumptable 00605988 cases 23,24
lea	esp, [esp+0]

loc_605B60:
push	esi
mov	eax, edi
lea	ecx, [esp+48h+var_C]
call	sub_ACE0F0
mov	edx, [esp+44h+arg_4]
mov	eax, [esp+44h+arg_8]
push	edx
push	eax
mov	eax, esi
call	sub_AD1510
push	eax
mov	eax, ecx
call	sub_ACE090
push	eax
mov	ecx, ebx
call	sub_605930
mov	eax, ebp
call	sub_AD4EC0
add	edi, eax
sub	[esp+44h+var_30], 1
jns	short loc_605B60

loc_605B9D:		; default
mov	edx, [esp+44h+var_34] ;	jumptable 00605988 cases 23,24
inc	edx
mov	eax, ebp
mov	[esp+44h+var_34], edx
call	sub_AD4EF0
cmp	edx, eax
jl	loc_605954

loc_605BB5:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	10h
sub_605930 endp

align 10h
off_605BC0 dd offset loc_6059FF	; jump table for switch	statement
dd offset loc_605B9D
dd offset loc_605B9D
dd offset loc_605B28
dd offset loc_6059FF
dd offset loc_605ABC
dd offset loc_60598F
align 10h



sub_605BE0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_12538C0
test	[esp+4+arg_0], 1
jz	short loc_605C0A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_605C0A:
mov	eax, edi
pop	edi
retn	4
sub_605BE0 endp




sub_605C10 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_ABCF00
test	[esp+4+arg_0], 1
jz	short loc_605C3A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_605C3A:
mov	eax, edi
pop	edi
retn	4
sub_605C10 endp




sub_605C40 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	ebp
push	esi
mov	ecx, edi
call	sub_603250
mov	ebp, eax
mov	ecx, ebp
lea	esi, [esp+0Ch+var_2]
mov	eax, edi
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jz	short loc_605CA9

loc_605C64:
push	ebp
mov	eax, edi
call	sub_603270
push	edi
lea	ecx, [esp+10h+var_1]
mov	esi, eax
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, eax
mov	eax, esi
call	sub_AD3270
mov	eax, ebp
mov	ecx, edi
call	sub_6032B0
mov	ebp, eax
mov	ecx, ebp
lea	esi, [esp+0Ch+var_2]
mov	eax, edi
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jnz	short loc_605C64

loc_605CA9:
pop	esi
mov	ecx, edi
pop	ebp
add	esp, 4
jmp	sub_6035F0
sub_605C40 endp

align 10h



sub_605CC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, eax
call	sub_61EDF0
mov	ecx, [esi]
mov	edx, [esp+4+arg_0]
mov	edx, [edx]
lea	ecx, [ecx+eax*8]
mov	[ecx], edx
mov	edx, [esp+4+arg_4]
mov	[ecx+4], edx
pop	esi
retn	8
sub_605CC0 endp




sub_605CE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	eax
push	ecx
add	esi, 0Ch
push	esi
lea	ecx, [esp+10h+arg_0]
mov	byte ptr [esp+10h+arg_0], 0
call	sub_4A00D0
push	eax
mov	ecx, esi
call	sub_4DEB60
pop	esi
retn	4
sub_605CE0 endp

align 10h



sub_605D10 proc	near
mov	eax, [eax]
and	eax, 0FFFFFFFEh
jz	short loc_605D39
test	ecx, ecx
jz	short loc_605D2A
call	sub_AD31D0
xor	ecx, ecx
test	eax, eax
setz	cl
mov	eax, ecx
retn

loc_605D2A:
mov	eax, 1
xor	ecx, ecx
test	eax, eax
setz	cl
mov	eax, ecx
retn

loc_605D39:
neg	ecx
sbb	ecx, ecx
mov	eax, ecx
xor	ecx, ecx
test	eax, eax
setz	cl
mov	eax, ecx
retn
sub_605D10 endp

align 10h



sub_605D50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+8], eax
retn	4
sub_605D50 endp

align 10h



sub_605D60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	edi
push	eax
lea	edi, [ecx+0Ch]
xor	eax, eax
call	sub_603480
pop	edi
retn	4
sub_605D60 endp

align 10h



sub_605D80 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
lea	ebx, [ecx+0Ch]
push	esi
mov	ecx, ebx
call	sub_603250
mov	ebp, eax
mov	ecx, ebp
lea	esi, [esp+10h+var_1]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jz	short loc_605E16
push	edi
mov	edi, [esp+14h+arg_0]
lea	ecx, [ecx+0]

loc_605DB0:
mov	edx, ebp
mov	eax, ebx
call	sub_603280
push	edi
lea	ecx, [esp+18h+arg_0]
mov	esi, eax
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	[edi+4], ecx
jnz	short loc_605DE4
push	4
push	edi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_605DE4:
mov	eax, [edi+4]
mov	edx, [edi]
lea	ecx, [edx+eax*4]
inc	eax
mov	[edi+4], eax
mov	[ecx], esi
mov	eax, ebp
mov	ecx, ebx
call	sub_6032B0
mov	ebp, eax
mov	ecx, ebp
lea	esi, [esp+14h+var_1]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jnz	short loc_605DB0
pop	edi

loc_605E16:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_605D80 endp

align 10h



sub_605E20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
test	eax, eax
jnz	short loc_605E33
mov	eax, edx
call	sub_AD4F80

loc_605E33:
mov	[esp+arg_4], edx
mov	[esp+arg_0], eax
add	ecx, 0Ch
jmp	sub_6032F0
sub_605E20 endp

align 10h



sub_605E50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
push	edi
mov	edi, ecx
test	eax, eax
jz	short loc_605E76
mov	edi, edi

loc_605E60:
mov	edx, [edi]
push	0
push	eax
mov	eax, [edx+1Ch]
mov	ecx, edi
call	eax
mov	eax, [esi+4]
add	esi, 4
test	eax, eax
jnz	short loc_605E60

loc_605E76:
pop	edi
pop	esi
retn	4
sub_605E50 endp

align 10h



sub_605E80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
push	edi
mov	ecx, ebx
call	sub_603250
mov	edi, eax
mov	ecx, edi
lea	esi, [esp+10h+arg_0]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jz	short loc_605EE9
jmp	short loc_605EB0
align 10h

loc_605EB0:
mov	esi, [ebp+0]
push	0
mov	edx, edi
mov	eax, ebx
call	sub_603280
push	eax
mov	eax, [esi+1Ch]
mov	ecx, ebp
call	eax
mov	eax, edi
mov	ecx, ebx
call	sub_6032B0
mov	edi, eax
mov	ecx, edi
lea	esi, [esp+10h+arg_0]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jnz	short loc_605EB0

loc_605EE9:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_605E80 endp




sub_605EF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+18h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+18h+var_C]
xor	ebx, ebx
push	edx
mov	[esp+1Ch+var_C], ebx
mov	[esp+1Ch+var_8], ebx
mov	[esp+1Ch+var_4], 80000000h
call	eax
xor	esi, esi
cmp	[esp+18h+var_8], ebx
jle	short loc_605F3B

loc_605F22:
mov	eax, [esp+18h+var_C]
mov	ecx, [eax+esi*4]
mov	edx, [edi]
mov	edx, [edx+1Ch]
push	ebx
push	ecx
mov	ecx, edi
call	edx
inc	esi
cmp	esi, [esp+18h+var_8]
jl	short loc_605F22

loc_605F3B:
lea	eax, [esp+18h+var_C]
push	eax
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], bl
call	sub_4A00D0
mov	edx, [esp+18h+var_4]
mov	[esp+18h+var_8], ebx
test	edx, edx
js	short loc_605F72
mov	ecx, [esp+18h+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_605F72:
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_605EF0 endp

align 10h



sub_605F80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_ABC390
test	[esp+4+arg_0], 1
jz	short loc_605FAB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_605FAB:
mov	eax, esi
pop	esi
retn	4
sub_605F80 endp

align 10h



sub_605FC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_ABBBF0
test	[esp+4+arg_0], 1
jz	short loc_605FEA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_605FEA:
mov	eax, esi
pop	esi
retn	4
sub_605FC0 endp




sub_605FF0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
lea	esi, [ebx+0Ch]
push	eax
mov	ecx, esi
call	sub_4DFAF0
mov	ebp, eax
push	ebp
mov	ecx, esi
call	sub_4DDCD0
push	ebp
mov	ecx, esi
mov	edi, eax
call	sub_4DEC40
or	ebp, 0FFFFFFFFh
cmp	edi, ebp
jz	short loc_60604C
mov	edx, [ebx]
lea	eax, ds:0[edi*8]
mov	ecx, edi
cmp	[eax+edx+4], ebp
jz	short loc_606042
mov	esi, edx

loc_606031:
mov	ecx, [edx+eax+4]
cmp	[esi+ecx*8+4], ebp
lea	eax, ds:0[ecx*8]
jnz	short loc_606031

loc_606042:
mov	eax, [ebx+18h]
mov	[edx+ecx*8+4], eax
mov	[ebx+18h], edi

loc_60604C:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_605FF0 endp

align 10h



sub_606060 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, ecx
push	edi
add	esi, 0Ch
push	eax
mov	ecx, esi
call	sub_4DFAF0
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_4DDCD0
push	edi
mov	ecx, esi
mov	ebx, eax
call	sub_4DEC40
mov	ecx, [esp+10h+arg_0]
push	ebx
push	ecx
push	esi
lea	ecx, [esp+1Ch+var_1]
mov	[esp+1Ch+var_1], 0
call	sub_4A00D0
push	eax
mov	ecx, esi
call	sub_4DEB60
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_606060 endp

align 10h



sub_6060B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_1216610
test	[esp+4+arg_0], 1
jz	short loc_6060DB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6060DB:
mov	eax, esi
pop	esi
retn	4
sub_6060B0 endp

align 10h



sub_6060F0 proc	near
add	ecx, 0Ch
jmp	sub_4DD240
sub_6060F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_606100(float)
sub_606100 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
fld	[ebp+arg_0]
sub	esp, 8
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_4E3520
fcomp	ds:dword_1479C54
add	esp, 4
fnstsw	ax
test	ah, 1
jnz	short loc_606151
fldz
fcomp	[ebp+arg_0]
fnstsw	ax
test	ah, 5
jp	short loc_606141
fld	ds:flt_15FCF40
fstp	[ebp+arg_0]
fld	[ebp+arg_0]
mov	esp, ebp
pop	ebp
retn

loc_606141:
fld	ds:flt_15FD2C4
fstp	[ebp+arg_0]
fld	[ebp+arg_0]
mov	esp, ebp
pop	ebp
retn

loc_606151:
fld	[ebp+arg_0]
call	__CIasin
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_606100 endp

align 10h



sub_606170 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
xor	ebx, ebx
push	ebx
mov	ecx, edi
call	sub_4DD190
mov	[edi+0Ch], ebx
mov	[edi+10h], ebx
mov	dword ptr [edi+14h], 80000000h
xor	esi, esi
cmp	[ebp+4], ebx
jle	short loc_6061BF

loc_606195:
mov	eax, [ebp+0]
mov	ecx, [eax+esi*8+4]
lea	eax, [eax+esi*8]
mov	eax, [eax]
push	ecx
push	eax
push	edi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], bl
call	sub_4A00D0
push	eax
mov	ecx, edi
call	sub_4DEB60
inc	esi
cmp	esi, [ebp+4]
jl	short loc_606195

loc_6061BF:
push	ebp
push	edi
call	sub_606290
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
retn	4
sub_606170 endp

align 10h



sub_6061D0 proc	near

arg_0= dword ptr  4

mov	edx, dword_1887AA0
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [edx+10h]
xor	ecx, ecx
push	edi
test	esi, esi
jle	short loc_6061FC
mov	edi, [edx+0Ch]
mov	eax, edi
jmp	short loc_6061F0
align 10h

loc_6061F0:
cmp	[eax], ebx
jz	short loc_606204
inc	ecx
add	eax, 8
cmp	ecx, esi
jl	short loc_6061F0

loc_6061FC:
xor	eax, eax

loc_6061FE:
pop	edi
pop	esi
pop	ebx
retn	4

loc_606204:
mov	eax, [edi+ecx*8+4]
dec	dword ptr [edx+10h]
mov	edi, [edx+10h]
cmp	edi, ecx
jz	short loc_6061FE
mov	esi, [edx+0Ch]
lea	edx, [esi+edi*8]
lea	ecx, [esi+ecx*8]
sub	edx, ecx
mov	esi, 2

loc_606222:
mov	edi, [edx+ecx]
mov	[ecx], edi
add	ecx, 4
sub	esi, 1
jnz	short loc_606222
pop	edi
pop	esi
pop	ebx
retn	4
sub_6061D0 endp

align 10h



sub_606240 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
test	esi, esi
jz	short loc_606271
lea	esp, [esp+0]

loc_606250:
mov	eax, esi
call	sub_AD4F80
mov	ecx, edi
call	sub_AD31D0
test	eax, eax
jz	short loc_60626F
mov	eax, esi
call	sub_AD4F70
mov	esi, eax
test	esi, esi
jnz	short loc_606250

loc_60626F:
test	esi, esi

loc_606271:
setnz	al
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	sub_4D4F20
pop	esi
mov	eax, ebx
pop	ebx
retn
sub_606240 endp

align 10h



sub_606290 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
xor	esi, esi
cmp	[ebp+4], esi
mov	[esp+10h+var_4], esi
jle	loc_606365
push	ebx
push	edi
lea	ebx, [ebx+0]

loc_6062B0:
mov	eax, [ebp+0]
lea	ebx, ds:0[esi*8]
add	eax, ebx
mov	eax, [eax+4]
lea	ecx, [esp+18h+var_5]
push	ecx
mov	edi, offset aHkmotion ;	"hkMotion"
call	sub_606240
add	esp, 4
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_606351
mov	esi, [esp+18h+arg_0]
add	esi, 0Ch
push	esi
lea	ecx, [esp+1Ch+arg_4]
mov	byte ptr [esp+1Ch+arg_4], 0
call	sub_4A00D0
mov	edx, [esi+8]
and	edx, 3FFFFFFFh
cmp	[esi+4], edx
jnz	short loc_60630C
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_60630C:
mov	eax, [esi+4]
mov	ecx, [esi]
lea	ecx, [ecx+eax*8]
inc	eax
mov	[esi+4], eax
mov	eax, [ebp+0]
mov	edx, [eax+ebx]
mov	[ecx], edx
mov	eax, [eax+ebx+4]
mov	[ecx+4], eax
dec	dword ptr [ebp+4]
mov	ecx, [ebp+4]
cmp	ecx, [esp+18h+var_4]
jz	short loc_606356
mov	eax, [ebp+0]
lea	ecx, [eax+ecx*8]
add	eax, ebx
sub	ecx, eax
mov	edx, 2

loc_606342:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_606342
jmp	short loc_606356

loc_606351:
inc	esi
mov	[esp+18h+var_4], esi

loc_606356:
mov	esi, [esp+18h+var_4]
cmp	esi, [ebp+4]
jl	loc_6062B0
pop	edi
pop	ebx

loc_606365:
pop	esi
pop	ebp
add	esp, 8
retn	8
sub_606290 endp

align 10h



sub_606370 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	0
mov	ecx, edi
call	sub_4DD190
xor	esi, esi
cmp	[ebp+4], esi
jle	short loc_6063B1

loc_606386:
mov	eax, [ebp+0]
mov	ecx, [eax+esi*8+4]
lea	eax, [eax+esi*8]
mov	eax, [eax]
push	ecx
push	eax
push	edi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
push	eax
mov	ecx, edi
call	sub_4DEB60
inc	esi
cmp	esi, [ebp+4]
jl	short loc_606386

loc_6063B1:
pop	esi
mov	eax, edi
pop	ebp
retn	4
sub_606370 endp

align 10h



sub_6063C0 proc	near
push	esi
mov	esi, eax
test	esi, esi
jz	short loc_6063EB

loc_6063C7:
mov	eax, esi
call	sub_AD4F80
mov	ecx, offset aHkspatialrigid ; "hkSpatialRigidBodyDeactivator"
call	sub_AD31D0
test	eax, eax
jz	short loc_6063E9
mov	eax, esi
call	sub_AD4F70
mov	esi, eax
test	esi, esi
jnz	short loc_6063C7

loc_6063E9:
test	esi, esi

loc_6063EB:
setnz	al
movzx	ecx, al
push	ecx
mov	ecx, edi
call	sub_4D4F20
mov	eax, edi
pop	esi
retn
sub_6063C0 endp

align 10h



; int __cdecl sub_606400(size_t, char, int, int)
sub_606400 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	edi
call	sub_ACE090
lea	edi, [ebx+3]
push	esi
lea	ecx, [esp+10h+arg_0]
mov	ebp, eax
and	edi, 0FFFFFFFCh
mov	byte ptr [esp+10h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+4]
mov	edx, [esi+8]
add	ecx, edi
and	edx, 3FFFFFFFh
cmp	edx, ecx
jge	short loc_60644A
add	edx, edx
cmp	ecx, edx
jge	short loc_60643D
mov	ecx, edx

loc_60643D:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_60644A:
add	[esi+4], edi
push	ebx		; size_t
cmp	[ebp+4], ebx
jnz	short loc_606465
mov	ecx, [esi]
mov	eax, [ebp+0]
add	ecx, [esp+10h+arg_8]
push	eax
push	ecx
call	j_unknown_libname_61_0
jmp	short loc_606477

loc_606465:
movzx	edx, [esp+10h+arg_4]
mov	eax, [esi]
add	eax, [esp+10h+arg_8]
push	edx		; int
push	eax		; void *
call	j__memset

loc_606477:
mov	eax, [esp+18h+arg_C]
add	esp, 0Ch
call	sub_ACE010
mov	ecx, [esp+0Ch+arg_8]
mov	[eax], ecx
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn
sub_606400 endp

align 10h



sub_606490 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_ACE090
lea	edi, [ebx+3]
push	esi
lea	ecx, [esp+14h+arg_0]
mov	ebp, eax
and	edi, 0FFFFFFFCh
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+4]
mov	edx, [esi+8]
add	ecx, edi
and	edx, 3FFFFFFFh
cmp	edx, ecx
jge	short loc_6064DD
add	edx, edx
cmp	ecx, edx
jge	short loc_6064D0
mov	ecx, edx

loc_6064D0:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_6064DD:
add	[esi+4], edi
mov	ecx, [esi]
mov	eax, [ebp+0]
mov	esi, [esp+10h+arg_4]
push	ebx
push	eax
add	ecx, esi
push	ecx
call	j_unknown_libname_61_0
mov	eax, [esp+1Ch+arg_8]
add	esp, 0Ch
call	sub_ACE010
mov	[eax], esi
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_606490 endp

align 10h



sub_606510 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_ACE090
mov	ebp, eax
mov	ebx, [ebp+4]
add	ebx, ebx
lea	edi, [ebx+3]
push	esi
lea	ecx, [esp+18h+var_1]
and	edi, 0FFFFFFFCh
mov	[esp+18h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+4]
mov	edx, [esi+8]
add	ecx, edi
and	edx, 3FFFFFFFh
cmp	edx, ecx
jge	short loc_60655F
add	edx, edx
cmp	ecx, edx
jge	short loc_606552
mov	ecx, edx

loc_606552:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_60655F:
add	[esi+4], edi
mov	ecx, [esi]
mov	eax, [ebp+0]
mov	esi, [esp+14h+arg_0]
push	ebx
push	eax
add	ecx, esi
push	ecx
call	j_unknown_libname_61_0
mov	eax, [esp+20h+arg_4]
add	esp, 0Ch
call	sub_ACE010
mov	[eax], esi
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_606510 endp

align 10h



sub_606590 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_ACE090
mov	ebx, eax
mov	ebp, [ebx+4]
lea	edi, [ebp+3]
push	esi
lea	ecx, [esp+18h+var_1]
and	edi, 0FFFFFFFCh
mov	[esp+18h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+4]
mov	edx, [esi+8]
add	ecx, edi
and	edx, 3FFFFFFFh
cmp	edx, ecx
jge	short loc_6065DD
add	edx, edx
cmp	ecx, edx
jge	short loc_6065D0
mov	ecx, edx

loc_6065D0:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_6065DD:
add	[esi+4], edi
mov	ecx, [esi]
mov	eax, [ebx]
mov	esi, [esp+14h+arg_0]
push	ebp
push	eax
add	ecx, esi
push	ecx
call	j_unknown_libname_61_0
mov	eax, [esp+20h+arg_4]
add	esp, 0Ch
call	sub_ACE010
mov	[eax], esi
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_606590 endp

align 10h



sub_606610 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_ACE090
mov	ebp, eax
mov	ebx, [ebp+4]
add	ebx, ebx
add	ebx, ebx
lea	edi, [ebx+3]
push	esi
lea	ecx, [esp+18h+var_1]
and	edi, 0FFFFFFFCh
mov	[esp+18h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+4]
mov	edx, [esi+8]
add	ecx, edi
and	edx, 3FFFFFFFh
cmp	edx, ecx
jge	short loc_606661
add	edx, edx
cmp	ecx, edx
jge	short loc_606654
mov	ecx, edx

loc_606654:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_606661:
add	[esi+4], edi
mov	ecx, [esi]
mov	eax, [ebp+0]
mov	esi, [esp+14h+arg_0]
push	ebx
push	eax
add	ecx, esi
push	ecx
call	j_unknown_libname_61_0
mov	eax, [esp+20h+arg_4]
add	esp, 0Ch
call	sub_ACE010
mov	[eax], esi
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_606610 endp

align 10h



sub_606690 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
mov	esi, eax
push	edi
mov	byte ptr [esp+10h+var_4], 0
mov	eax, [esp+10h+var_4]
push	eax
call	sub_6031D0
mov	ebx, offset off_17F07A8
lea	ebx, [ebx+0]

loc_6066B0:
mov	eax, [ebx]
test	eax, eax
jz	short loc_6066D9
mov	ecx, [eax]
xor	edi, edi
test	ecx, ecx
jz	short loc_6066D9
mov	edi, edi

loc_6066C0:
mov	edx, [eax+4]
push	edx
push	ecx
mov	ecx, esi
call	sub_6032F0
mov	eax, [ebx]
inc	edi
mov	ecx, [eax+edi*8]
lea	eax, [eax+edi*8]
test	ecx, ecx
jnz	short loc_6066C0

loc_6066D9:
mov	ebx, [ebx+0Ch]
test	ebx, ebx
jnz	short loc_6066B0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn
sub_606690 endp

align 10h


; Attributes: bp-based frame

sub_6066F0 proc	near

var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_0]
nop

loc_606700:
mov	esi, [ebp+arg_8]
mov	ebx, [ebp+arg_4]
lea	eax, [ebx+esi]
sar	eax, 1
mov	ecx, [edi+eax*8]
mov	edx, [edi+eax*8+4]
mov	[esp+30h+var_10], ecx
mov	[esp+30h+var_C], edx
lea	ebx, [ebx+0]

loc_606720:
lea	ecx, [esp+30h+var_10]
push	ecx
lea	eax, [edi+ebx*8]
push	eax
lea	edx, [esp+38h+var_16]
push	edx
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_60676C
lea	eax, [edi+ebx*8]
jmp	short loc_606748

loc_606744:
mov	eax, [esp+30h+var_14]

loc_606748:
lea	ecx, [esp+30h+var_10]
add	eax, 8
push	ecx
push	eax
lea	edx, [esp+38h+var_16]
push	edx
inc	ebx
mov	[esp+3Ch+var_14], eax
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_606744

loc_60676C:
lea	eax, [edi+esi*8]
push	eax
lea	eax, [esp+34h+var_10]
push	eax
lea	ecx, [esp+38h+var_15]
push	ecx
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_6067B8
lea	eax, [edi+esi*8]
jmp	short loc_606794

loc_606790:
mov	eax, [esp+30h+var_14]

loc_606794:
sub	eax, 8
push	eax
lea	edx, [esp+34h+var_10]
mov	[esp+34h+var_14], eax
push	edx
lea	eax, [esp+38h+var_15]
push	eax
dec	esi
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_606790

loc_6067B8:
cmp	esi, ebx
jl	short loc_6067E4
jz	short loc_6067DA
mov	edx, [edi+ebx*8]
mov	eax, [edi+esi*8]
mov	ecx, [edi+esi*8+4]
mov	[edi+esi*8], edx
mov	edx, [edi+ebx*8+4]
mov	[edi+esi*8+4], edx
mov	[edi+ebx*8], eax
mov	[edi+ebx*8+4], ecx

loc_6067DA:
dec	esi
inc	ebx
cmp	ebx, esi
jle	loc_606720

loc_6067E4:
mov	eax, [ebp+arg_4]
cmp	eax, esi
jge	short loc_6067FA
mov	ecx, [ebp+arg_C]
push	ecx
push	esi
push	eax
push	edi
call	sub_6066F0
add	esp, 10h

loc_6067FA:
cmp	ebx, [ebp+arg_8]
jge	short loc_606807
mov	[ebp+arg_4], ebx
jmp	loc_606700

loc_606807:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6066F0 endp

align 10h



sub_606810 proc	near

var_1= byte ptr	-1

push	ecx
push	edi
mov	edi, eax
call	sub_606B40
lea	ecx, [edi+2Ch]
mov	dword_188996C, 0
call	sub_4DCDB0
lea	ecx, [edi+20h]
call	sub_4DCDB0
lea	ecx, [edi+14h]
call	sub_4DCDB0
push	edi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [edi+8]
mov	dword ptr [edi+4], 0
test	edx, edx
js	short loc_606873
mov	ecx, [edi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_606873:
mov	dword ptr [edi+8], 80000000h
mov	dword ptr [edi], 0
pop	edi
pop	ecx
retn
sub_606810 endp

align 10h



sub_606890 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
mov	eax, [eax+4]
sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_C]
push	ebp
mov	ebp, [esp+18h+arg_8]
push	esi
push	ebp
call	sub_AD5240
call	sub_AD1500
mov	esi, [esp+1Ch+arg_0]
push	eax
mov	[edi+4], eax
call	sub_606BB0
mov	[edi], eax
mov	eax, [esp+1Ch+arg_4]
push	ebp
lea	ecx, [esp+20h+var_C]
call	sub_ACE150
mov	esi, [edi]
xor	edx, edx
lea	eax, [esp+1Ch+var_C]
call	sub_ACE070
mov	[eax], esi
mov	edx, [ebx]
lea	eax, [esp+1Ch+var_C]
call	sub_ACE080
push	eax
mov	eax, [edx+14h]
push	esi
mov	ecx, ebx
call	eax
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
add	esp, 10h
retn	10h
sub_606890 endp

align 10h



sub_606900 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
mov	ecx, [esp+20h+arg_0]
mov	eax, [ecx+0Ch]
push	ebx
push	ebp
xor	ebp, ebp
push	esi
mov	[esp+2Ch+var_C], ebp
mov	[esp+2Ch+var_8], ebp
mov	[esp+2Ch+var_4], 80000000h
cmp	[eax+4], ebp
push	edi
jle	loc_6069F7

loc_606929:
mov	esi, [eax]
lea	ebx, ds:0[ebp*8]
mov	edi, [esi+ebx+4]
add	esi, ebx
test	edi, edi
jz	loc_6069E6

loc_606940:
mov	eax, edi
call	sub_AD4F80
mov	ecx, eax
mov	eax, offset aHkbvariablebin ; "hkbVariableBindingSet"
call	sub_AD31D0
test	eax, eax
jz	short loc_606969
mov	eax, edi
call	sub_AD4F70
mov	edi, eax
test	edi, edi
jnz	short loc_606940
jmp	loc_6069E6

loc_606969:
test	edi, edi
jz	short loc_6069E6
lea	eax, [esp+30h+var_C]
push	eax
lea	ecx, [esp+34h+var_1D]
mov	[esp+34h+var_1D], 0
call	sub_4A00D0
mov	ecx, [esp+30h+var_4]
and	ecx, 3FFFFFFFh
cmp	[esp+30h+var_8], ecx
jnz	short loc_6069A0
push	8
lea	edx, [esp+34h+var_C]
push	edx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_6069A0:
mov	ecx, [esp+30h+var_8]
mov	eax, [esp+30h+var_C]
mov	edx, [esi]
lea	eax, [eax+ecx*8]
mov	[eax], edx
mov	ecx, [esi+4]
mov	edx, [esp+30h+arg_0]
mov	[eax+4], ecx
inc	[esp+30h+var_8]
mov	eax, [edx+0Ch]
dec	dword ptr [eax+4]
mov	ecx, [eax+4]
cmp	ecx, ebp
jz	short loc_6069E5
mov	eax, [eax]
lea	ecx, [eax+ecx*8]
add	eax, ebx
sub	ecx, eax
mov	edx, 2

loc_6069D8:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_6069D8

loc_6069E5:
dec	ebp

loc_6069E6:
mov	ecx, [esp+30h+arg_0]
mov	eax, [ecx+0Ch]
inc	ebp
cmp	ebp, [eax+4]
jl	loc_606929

loc_6069F7:
mov	eax, [ecx+0Ch]
xor	edi, edi
cmp	[eax+4], edi
jle	loc_606A99

loc_606A05:
mov	eax, [eax]
mov	esi, [eax+edi*8+4]
lea	ebp, [eax+edi*8]
test	esi, esi
jz	short loc_606A88

loc_606A12:
mov	eax, esi
call	sub_AD4F80
mov	ecx, eax
mov	eax, offset aHkbnode ; "hkbNode"
call	sub_AD31D0
test	eax, eax
jz	short loc_606A38
mov	eax, esi
call	sub_AD4F70
mov	esi, eax
test	esi, esi
jnz	short loc_606A12
jmp	short loc_606A88

loc_606A38:
test	esi, esi
jz	short loc_606A88
mov	ecx, [ebp+0]
mov	[esp+30h+var_1C], ecx
push	offset aVariablebindin ; "variableBindingSet"
lea	eax, [esp+34h+var_1C]
lea	ecx, [esp+34h+var_14]
mov	[esp+34h+var_18], esi
call	sub_ACE150
lea	eax, [esp+30h+var_14]
call	sub_ACE080
mov	eax, [eax]
test	eax, eax
jz	short loc_606A88
mov	esi, [esp+30h+arg_0]
push	edi
push	eax
add	esi, 14h
push	esi
lea	ecx, [esp+3Ch+var_1D]
mov	[esp+3Ch+var_1D], 0
call	sub_4A00D0
push	eax
mov	ecx, esi
call	sub_4DEB60

loc_606A88:
mov	edx, [esp+30h+arg_0]
mov	eax, [edx+0Ch]
inc	edi
cmp	edi, [eax+4]
jl	loc_606A05

loc_606A99:
xor	edi, edi
cmp	[esp+30h+var_8], edi
jle	short loc_606AF5

loc_606AA1:
mov	ecx, [esp+30h+arg_0]
mov	esi, [ecx+0Ch]
mov	eax, [esp+30h+var_C]
push	esi
lea	ecx, [esp+34h+var_1D]
lea	ebp, [eax+edi*8]
mov	[esp+34h+var_1D], 0
call	sub_4A00D0
mov	edx, [esi+8]
and	edx, 3FFFFFFFh
cmp	[esi+4], edx
jnz	short loc_606AD8
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_606AD8:
mov	eax, [esi+4]
mov	ecx, [esi]
mov	edx, [ebp+0]
lea	eax, [ecx+eax*8]
mov	[eax], edx
mov	ecx, [ebp+4]
mov	[eax+4], ecx
inc	dword ptr [esi+4]
inc	edi
cmp	edi, [esp+30h+var_8]
jl	short loc_606AA1

loc_606AF5:
lea	edx, [esp+30h+var_C]
push	edx
lea	ecx, [esp+34h+arg_0]
mov	byte ptr [esp+34h+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+30h+var_4]
mov	[esp+30h+var_8], 0
test	edx, edx
js	short loc_606B33
mov	ecx, [esp+30h+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_606B33:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	4
sub_606900 endp

align 10h



sub_606B40 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
mov	ebx, [edi+4]
push	ebp
push	esi
mov	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	ebp, [esi+4]
mov	ecx, [esi+8]
lea	edx, [ebx+ebp]
and	ecx, 3FFFFFFFh
cmp	ecx, edx
jge	short loc_606B81
add	ecx, ecx
cmp	edx, ecx
jl	short loc_606B74
mov	ecx, edx

loc_606B74:
push	8
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_606B81:
add	[esi+4], ebx
mov	eax, [edi+4]
mov	ecx, [edi]
mov	edx, [esi]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
lea	eax, [edx+ebp*8]
push	eax
call	j_unknown_libname_61_0
add	esp, 0Ch
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_606B40 endp

align 10h



sub_606BB0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	edi
mov	eax, ebp
call	sub_AD4EC0
mov	ebx, eax
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	ebx
call	eax
push	ebx		; size_t
mov	edi, eax
push	0		; int
push	edi		; void *
call	j__memset
add	esp, 0Ch
push	esi
lea	ecx, [esp+10h+arg_0]
mov	byte ptr [esp+10h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_606C0D
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_606C0D:
mov	edx, [esi+4]
mov	eax, [esi]
lea	eax, [eax+edx*8]
mov	[eax], edi
mov	[eax+4], ebp
mov	ecx, [esi+10h]
inc	dword ptr [esi+4]
mov	edx, [ecx]
mov	eax, [edx+10h]
push	6
push	ebx
push	edi
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, ebp
call	sub_AD4F80
push	eax
mov	eax, [edx+1Ch]
push	edi
call	eax
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn	4
sub_606BB0 endp

align 10h



sub_606C50 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_8]
push	ebp
mov	ebp, [esp+14h+arg_4]
mov	eax, [ebp+4]
push	esi
push	offset aTransitions ; "transitions"
call	sub_AD5240
call	sub_AD1500
mov	esi, [esp+18h+arg_0]
push	eax
mov	[edi+4], eax
call	sub_606BB0
mov	[edi], eax
push	offset aTransitions ; "transitions"
mov	eax, ebp
lea	ecx, [esp+1Ch+var_8]
call	sub_ACE150
mov	esi, [edi]
xor	edx, edx
lea	eax, [esp+18h+var_8]
call	sub_ACE070
mov	[eax], esi
mov	edx, [ebx]
lea	eax, [esp+18h+var_8]
call	sub_ACE080
push	eax
mov	eax, [edx+14h]
push	esi
mov	ecx, ebx
call	eax
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_606C50 endp

align 10h



sub_606CC0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, eax
call	sub_607240
call	sub_606EA0
xor	ebx, ebx
lea	esi, [edi+20h]
push	esi
lea	ecx, [esp+18h+var_5]
mov	dword_1889974, ebx
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_606D0C
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_606D0C:
lea	ecx, [edi+14h]
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
call	sub_4DCDB0
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_606D4F
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_606D4F:
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
pop	ebx
add	esp, 8
retn
sub_606CC0 endp

align 10h



sub_606D60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
mov	eax, [ebx]
push	ebp
xor	ebp, ebp
push	esi
push	edi
mov	[esp+1Ch+var_C], ebp
mov	[esp+1Ch+var_8], ebp
mov	[esp+1Ch+var_4], 80000000h
mov	edi, [eax+4]
sub	edi, 1
js	loc_606E38
jmp	short loc_606D90
align 10h

loc_606D90:
mov	ecx, [ebx]
mov	esi, [ecx]
lea	ebp, ds:0[edi*8]
mov	eax, offset unk_194847C
add	esi, ebp
call	sub_AD4F80
mov	ecx, eax
mov	eax, [esi+4]
call	sub_AD4F80
call	sub_AD31D0
test	eax, eax
jnz	short loc_606E2D
lea	edx, [esp+1Ch+var_C]
push	edx
lea	ecx, [esp+20h+arg_0]
mov	byte ptr [esp+20h+arg_0], al
call	sub_4A00D0
mov	ecx, [esp+1Ch+var_4]
and	ecx, 3FFFFFFFh
cmp	[esp+1Ch+var_8], ecx
jnz	short loc_606DEC
push	8
lea	edx, [esp+20h+var_C]
push	edx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_606DEC:
mov	ecx, [esp+1Ch+var_8]
mov	eax, [esp+1Ch+var_C]
mov	edx, [esi]
lea	eax, [eax+ecx*8]
mov	[eax], edx
mov	ecx, [esi+4]
mov	[eax+4], ecx
inc	[esp+1Ch+var_8]
mov	eax, [ebx]
dec	dword ptr [eax+4]
mov	ecx, [eax+4]
cmp	ecx, edi
jz	short loc_606E2D
mov	eax, [eax]
lea	ecx, [eax+ecx*8]
add	eax, ebp
sub	ecx, eax
mov	edx, 2
nop

loc_606E20:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_606E20

loc_606E2D:
sub	edi, 1
jns	loc_606D90
xor	ebp, ebp

loc_606E38:
mov	esi, [ebx]
mov	edx, [esp+1Ch+var_C]
mov	eax, [esi+4]
push	edx
push	eax
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], 0
call	sub_4A00D0
push	eax
mov	eax, [esp+28h+var_8]
call	sub_6070F0
lea	eax, [esp+1Ch+var_C]
push	eax
lea	ecx, [esp+20h+arg_0]
mov	byte ptr [esp+20h+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+1Ch+var_4]
mov	[esp+1Ch+var_8], ebp
test	edx, edx
js	short loc_606E96
mov	ecx, [esp+1Ch+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_606E96:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4
sub_606D60 endp




sub_606EA0 proc	near
push	ebx
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	short loc_606F25
push	ebp
push	esi
lea	ebp, [edi+14h]
lea	ecx, [ecx+0]

loc_606EB0:
mov	eax, [edi+20h]
mov	eax, [eax+ebx*4]
push	0
push	eax
mov	ecx, ebp
call	sub_4DDD80
mov	edx, [edi]
mov	ecx, [edx+4]
xor	esi, esi
test	ecx, ecx
jle	short loc_606F1D
mov	edx, [edx]
lea	ecx, [ecx+0]

loc_606ED0:
cmp	[edx], eax
jz	short loc_606EDE
inc	esi
add	edx, 8
cmp	esi, ecx
jl	short loc_606ED0
jmp	short loc_606F1D

loc_606EDE:
mov	ecx, [edi+4]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+18h]
push	0
push	0
push	edx
call	eax
mov	eax, [edi]
dec	dword ptr [eax+4]
mov	ecx, [eax+4]
cmp	ecx, esi
jz	short loc_606F1D
mov	eax, [eax]
lea	ecx, [eax+ecx*8]
lea	eax, [eax+esi*8]
sub	ecx, eax
mov	edx, 2
lea	ebx, [ebx+0]

loc_606F10:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_606F10

loc_606F1D:
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_606EB0
pop	esi
pop	ebp

loc_606F25:
pop	ebx
retn
sub_606EA0 endp

align 10h



sub_606F30 proc	near

var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
push	ebp
push	esi
push	edi
xor	edi, edi
mov	[esp+1Ch+var_C], edi
mov	[esp+1Ch+var_8], edi
mov	[esp+1Ch+var_4], 80000000h
mov	ebp, [ecx+4]
sub	ebp, 1
js	loc_607011
push	ebx
jmp	short loc_606F60
align 10h

loc_606F60:
mov	edx, [esp+20h+arg_0]
mov	eax, [edx]
mov	esi, [eax]
lea	ebx, ds:0[ebp*8]
mov	eax, [esi+ebx+4]
add	esi, ebx
push	offset unk_1947F3C
lea	edi, [esp+24h+var_D]
call	sub_AD5150
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_607005
lea	ecx, [esp+20h+var_C]
push	ecx
lea	ecx, [esp+24h+var_E]
mov	[esp+24h+var_E], 0
call	sub_4A00D0
mov	edx, [esp+20h+var_4]
and	edx, 3FFFFFFFh
cmp	[esp+20h+var_8], edx
jnz	short loc_606FC1
push	8
lea	ecx, [esp+24h+var_C]
push	ecx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_606FC1:
mov	edx, [esp+20h+var_C]
mov	eax, [esp+20h+var_8]
mov	ecx, [esi]
lea	eax, [edx+eax*8]
mov	[eax], ecx
mov	edx, [esi+4]
mov	[eax+4], edx
mov	eax, [esp+20h+arg_0]
inc	[esp+20h+var_8]
mov	eax, [eax]
dec	dword ptr [eax+4]
mov	ecx, [eax+4]
cmp	ecx, ebp
jz	short loc_607005
mov	eax, [eax]
lea	ecx, [eax+ecx*8]
add	eax, ebx
sub	ecx, eax
mov	edx, 2

loc_606FF8:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_606FF8

loc_607005:
sub	ebp, 1
jns	loc_606F60
xor	edi, edi
pop	ebx

loc_607011:
mov	ecx, [esp+1Ch+arg_0]
mov	esi, [ecx]
mov	edx, [esp+1Ch+var_C]
mov	eax, [esi+4]
push	edx
push	eax
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], 0
call	sub_4A00D0
push	eax
mov	eax, [esp+28h+var_8]
call	sub_6070F0
lea	eax, [esp+1Ch+var_C]
push	eax
lea	ecx, [esp+20h+arg_0]
mov	byte ptr [esp+20h+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+1Ch+var_4]
mov	[esp+1Ch+var_8], edi
test	edx, edx
js	short loc_607073
mov	ecx, [esp+1Ch+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_607073:
pop	edi
pop	esi
pop	ebp
add	esp, 10h
retn	4
sub_606F30 endp

align 10h



sub_607080 proc	near

var_1= byte ptr	-1

push	ecx
mov	eax, [edi+4]
push	esi
mov	esi, dword_1889974
mov	ecx, [esi+4]
mov	edx, [ecx]
call	sub_AD4F80
mov	edx, [edx+1Ch]
push	eax
mov	eax, [edi]
push	eax
call	edx
mov	esi, [esi]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_6070C9
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_6070C9:
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [edi]
lea	eax, [eax+edx*8]
mov	[eax], ecx
mov	edx, [edi+4]
mov	[eax+4], edx
inc	dword ptr [esi+4]
pop	esi
pop	ecx
retn
sub_607080 endp

align 10h



sub_6070F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	edi
mov	edi, eax
mov	eax, [esi+4]
lea	ecx, [eax+edi]
sub	eax, ebp
mov	[esp+10h+var_4], eax
mov	eax, [esi+8]
and	eax, 3FFFFFFFh
cmp	eax, ecx
mov	[esp+10h+arg_4], ecx
jge	short loc_60712F
add	eax, eax
cmp	ecx, eax
jge	short loc_60711E
mov	ecx, eax

loc_60711E:
mov	eax, [esp+10h+arg_0]
push	8
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_60712F:
mov	ecx, [esp+10h+var_4]
mov	eax, [esi]
lea	edx, ds:0[ecx*8]
lea	ebx, ds:0[ebp*8]
push	edx
lea	ecx, [ebx+eax]
add	ebp, edi
push	ecx
lea	edx, [eax+ebp*8]
push	edx
call	sub_AD3070
mov	eax, [esi]
add	esp, 0Ch
add	eax, ebx
test	edi, edi
jle	short loc_607186
mov	ecx, [esp+10h+arg_8]
sub	ecx, eax

loc_607164:
mov	edx, [ecx+eax]
mov	[eax], edx
mov	edx, [ecx+eax+4]
mov	[eax+4], edx
add	eax, 8
sub	edi, 1
jnz	short loc_607164
mov	eax, [esp+10h+arg_4]
pop	edi
pop	ebp
mov	[esi+4], eax
pop	ebx
pop	ecx
retn	0Ch

loc_607186:
mov	ecx, [esp+10h+arg_4]
pop	edi
pop	ebp
mov	[esi+4], ecx
pop	ebx
pop	ecx
retn	0Ch
sub_6070F0 endp

align 10h



sub_6071A0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, eax
call	sub_607240
call	sub_606EA0
xor	ebx, ebx
lea	esi, [edi+20h]
push	esi
lea	ecx, [esp+18h+var_5]
mov	dword_1889978, ebx
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_6071EC
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_6071EC:
lea	ecx, [edi+14h]
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
call	sub_4DCDB0
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_60722F
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_60722F:
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
pop	ebx
add	esp, 8
retn
sub_6071A0 endp

align 10h



sub_607240 proc	near
push	ebx
xor	ebx, ebx
cmp	[edi+0Ch], ebx
jle	short loc_6072B4
push	esi
lea	esp, [esp+0]

loc_607250:
mov	eax, [edi+8]
mov	edx, [eax+ebx*4]
mov	eax, [edi]
mov	ecx, [eax+4]
xor	esi, esi
test	ecx, ecx
jle	short loc_6072AD
mov	eax, [eax]

loc_607263:
cmp	[eax], edx
jz	short loc_607271
inc	esi
add	eax, 8
cmp	esi, ecx
jl	short loc_607263
jmp	short loc_6072AD

loc_607271:
mov	ecx, [edi+4]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+18h]
push	0
push	0
push	eax
call	edx
mov	eax, [edi]
dec	dword ptr [eax+4]
mov	ecx, [eax+4]
cmp	ecx, esi
jz	short loc_6072AD
mov	eax, [eax]
lea	ecx, [eax+ecx*8]
lea	eax, [eax+esi*8]
sub	ecx, eax
mov	edx, 2
lea	ecx, [ecx+0]

loc_6072A0:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_6072A0

loc_6072AD:
inc	ebx
cmp	ebx, [edi+0Ch]
jl	short loc_607250
pop	esi

loc_6072B4:
pop	ebx
retn
sub_607240 endp

align 10h



sub_6072C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
mov	eax, [ebx]
push	ebp
xor	ebp, ebp
push	esi
push	edi
mov	[esp+1Ch+var_C], ebp
mov	[esp+1Ch+var_8], ebp
mov	[esp+1Ch+var_4], 80000000h
mov	edi, [eax+4]
sub	edi, 1
js	loc_607398
jmp	short loc_6072F0
align 10h

loc_6072F0:
mov	ecx, [ebx]
mov	esi, [ecx]
lea	ebp, ds:0[edi*8]
mov	eax, offset unk_1951464
add	esi, ebp
call	sub_AD4F80
mov	ecx, eax
mov	eax, [esi+4]
call	sub_AD4F80
call	sub_AD31D0
test	eax, eax
jnz	short loc_60738D
lea	edx, [esp+1Ch+var_C]
push	edx
lea	ecx, [esp+20h+arg_0]
mov	byte ptr [esp+20h+arg_0], al
call	sub_4A00D0
mov	ecx, [esp+1Ch+var_4]
and	ecx, 3FFFFFFFh
cmp	[esp+1Ch+var_8], ecx
jnz	short loc_60734C
push	8
lea	edx, [esp+20h+var_C]
push	edx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_60734C:
mov	ecx, [esp+1Ch+var_8]
mov	eax, [esp+1Ch+var_C]
mov	edx, [esi]
lea	eax, [eax+ecx*8]
mov	[eax], edx
mov	ecx, [esi+4]
mov	[eax+4], ecx
inc	[esp+1Ch+var_8]
mov	eax, [ebx]
dec	dword ptr [eax+4]
mov	ecx, [eax+4]
cmp	ecx, edi
jz	short loc_60738D
mov	eax, [eax]
lea	ecx, [eax+ecx*8]
add	eax, ebp
sub	ecx, eax
mov	edx, 2
nop

loc_607380:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_607380

loc_60738D:
sub	edi, 1
jns	loc_6072F0
xor	ebp, ebp

loc_607398:
mov	esi, [ebx]
mov	edx, [esp+1Ch+var_C]
mov	eax, [esi+4]
push	edx
push	eax
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], 0
call	sub_4A00D0
push	eax
mov	eax, [esp+28h+var_8]
call	sub_6070F0
lea	eax, [esp+1Ch+var_C]
push	eax
lea	ecx, [esp+20h+arg_0]
mov	byte ptr [esp+20h+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+1Ch+var_4]
mov	[esp+1Ch+var_8], ebp
test	edx, edx
js	short loc_6073F6
mov	ecx, [esp+1Ch+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_6073F6:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4
sub_6072C0 endp




sub_607400 proc	near

var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
push	ebp
push	esi
push	edi
xor	edi, edi
mov	[esp+1Ch+var_C], edi
mov	[esp+1Ch+var_8], edi
mov	[esp+1Ch+var_4], 80000000h
mov	ebp, [ecx+4]
sub	ebp, 1
js	loc_6074E1
push	ebx
jmp	short loc_607430
align 10h

loc_607430:
mov	edx, [esp+20h+arg_0]
mov	eax, [edx]
mov	esi, [eax]
lea	ebx, ds:0[ebp*8]
mov	eax, [esi+ebx+4]
add	esi, ebx
push	offset unk_1950F54
lea	edi, [esp+24h+var_D]
call	sub_AD5150
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_6074D5
lea	ecx, [esp+20h+var_C]
push	ecx
lea	ecx, [esp+24h+var_E]
mov	[esp+24h+var_E], 0
call	sub_4A00D0
mov	edx, [esp+20h+var_4]
and	edx, 3FFFFFFFh
cmp	[esp+20h+var_8], edx
jnz	short loc_607491
push	8
lea	ecx, [esp+24h+var_C]
push	ecx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_607491:
mov	edx, [esp+20h+var_C]
mov	eax, [esp+20h+var_8]
mov	ecx, [esi]
lea	eax, [edx+eax*8]
mov	[eax], ecx
mov	edx, [esi+4]
mov	[eax+4], edx
mov	eax, [esp+20h+arg_0]
inc	[esp+20h+var_8]
mov	eax, [eax]
dec	dword ptr [eax+4]
mov	ecx, [eax+4]
cmp	ecx, ebp
jz	short loc_6074D5
mov	eax, [eax]
lea	ecx, [eax+ecx*8]
add	eax, ebx
sub	ecx, eax
mov	edx, 2

loc_6074C8:
mov	esi, [ecx+eax]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_6074C8

loc_6074D5:
sub	ebp, 1
jns	loc_607430
xor	edi, edi
pop	ebx

loc_6074E1:
mov	ecx, [esp+1Ch+arg_0]
mov	esi, [ecx]
mov	edx, [esp+1Ch+var_C]
mov	eax, [esi+4]
push	edx
push	eax
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], 0
call	sub_4A00D0
push	eax
mov	eax, [esp+28h+var_8]
call	sub_6070F0
lea	eax, [esp+1Ch+var_C]
push	eax
lea	ecx, [esp+20h+arg_0]
mov	byte ptr [esp+20h+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+1Ch+var_4]
mov	[esp+1Ch+var_8], edi
test	edx, edx
js	short loc_607543
mov	ecx, [esp+1Ch+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_607543:
pop	edi
pop	esi
pop	ebp
add	esp, 10h
retn	4
sub_607400 endp

align 10h



sub_607550 proc	near
mov	eax, offset unk_1963254
retn
sub_607550 endp

align 10h



sub_607560 proc	near
mov	eax, [ecx+2Ch]
and	eax, 0FFFFFFFEh
retn
sub_607560 endp

align 10h



sub_607570 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AB3160
test	[esp+4+arg_0], 1
jz	short loc_60759A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60759A:
mov	eax, esi
pop	esi
retn	4
sub_607570 endp




sub_6075A0 proc	near

arg_0= dword ptr  4

push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_6075C1
push	0
mov	ecx, edi
call	sub_4DCD10

loc_6075C1:
mov	dword ptr [esi+10h], offset off_15F19CC
lea	ecx, [esi+14h]
mov	dword ptr [esi], offset	off_15F19EC
mov	dword ptr [esi+10h], offset off_15F1A24
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_6075F1
push	7
mov	ecx, edi
call	sub_4DCD10
mov	byte ptr [esi+15h], 3

loc_6075F1:
mov	eax, esi
pop	edi
retn	4
sub_6075A0 endp

align 10h



sub_607600 proc	near
add	ecx, 4
call	sub_4D4F40
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_607600 endp

align 10h



sub_607620 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	??1facet@locale@std@@UAE@XZ_0 ;	std::locale::facet::~facet(void)
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_607654
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_607654:
mov	eax, esi
pop	esi
retn	4
sub_607620 endp

align 10h



sub_607660 proc	near
movzx	edx, word ptr [ecx+16h]
mov	eax, [ecx+0Ch]
sub	eax, edx
retn
sub_607660 endp

align 10h



sub_607670 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	edx, ecx
mov	esi, [edx+0Ch]
inc	eax
cmp	eax, esi
push	edi
jge	short loc_6076A3

loc_607680:
cmp	eax, 100h
jnb	short loc_6076A6
mov	ecx, eax
and	ecx, 1Fh
mov	edi, 1
shl	edi, cl
mov	ecx, eax
shr	ecx, 5
and	edi, [edx+ecx*4+40h]
jnz	short loc_6076A6
inc	eax
cmp	eax, esi
jl	short loc_607680

loc_6076A3:
or	eax, 0FFFFFFFFh

loc_6076A6:
pop	edi
pop	esi
retn	4
sub_607670 endp

align 10h



sub_6076B0 proc	near
push	0FFFFFFFFh
call	sub_607670
retn
sub_6076B0 endp

align 10h



sub_6076C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12138C0
test	[esp+4+arg_0], 1
jz	short loc_6076EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6076EA:
mov	eax, esi
pop	esi
retn	4
sub_6076C0 endp




sub_6076F0 proc	near
sub	ecx, 10h
jmp	sub_6076C0
sub_6076F0 endp

align 10h



sub_607700 proc	near
sub	ecx, 10h
jmp	sub_607620
sub_607700 endp

align 10h



sub_607710 proc	near
mov	eax, 70h
retn	8
sub_607710 endp

align 10h



sub_607720 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_607750
test	[esp+4+arg_0], 1
jz	short loc_60774A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60774A:
mov	eax, edi
pop	edi
retn	4
sub_607720 endp




sub_607750 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
lea	esi, [edi+14h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_607785
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_607785:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_6077BA
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_6077BA:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_607750 endp

align 10h



sub_6077D0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_AAF490
test	[esp+4+arg_0], 1
jz	short loc_6077FA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6077FA:
mov	eax, edi
pop	edi
retn	4
sub_6077D0 endp




sub_607800 proc	near
mov	edx, [ecx]
push	esi
mov	esi, [eax]
mov	[ecx], esi
mov	esi, [eax+4]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[ecx+4], esi
mov	esi, [eax+8]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[ecx+8], esi
mov	[eax+8], edx
pop	esi
retn
sub_607800 endp

align 10h



sub_607830 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
mov	dword ptr [esi], offset	off_15F1CA0
call	sub_AD6020
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_60786A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60786A:
mov	eax, esi
pop	esi
retn	4
sub_607830 endp




sub_607870 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1212CB0
test	[esp+4+arg_0], 1
jz	short loc_60789A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60789A:
mov	eax, esi
pop	esi
retn	4
sub_607870 endp




sub_6078A0 proc	near
call	sub_4D8420
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+10h]
jmp	eax
sub_6078A0 endp

align 10h



sub_6078B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_4D7810
test	[esp+4+arg_0], 1
jz	short loc_6078DA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6078DA:
mov	eax, esi
pop	esi
retn	4
sub_6078B0 endp




sub_6078E0 proc	near
mov	eax, 30h
retn	8
sub_6078E0 endp

align 10h



sub_6078F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AB2CE0
test	[esp+4+arg_0], 1
jz	short loc_60791A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60791A:
mov	eax, esi
pop	esi
retn	4
sub_6078F0 endp



; Attributes: bp-based frame

; int __cdecl sub_607920(int, float)
sub_607920 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 10h
mov	edx, [ebp+arg_0]
fld	[ebp+arg_4]
movaps	xmm1, xmmword ptr [edx]
movaps	xmm2, xmmword ptr [eax+10h]
movaps	xmm4, xmmword ptr [eax]
movaps	xmm0, xmm1
shufps	xmm0, xmm1, 55h
mulps	xmm0, xmm2
movaps	xmm2, ds:xmmword_1573EC0
movaps	xmm3, xmm1
shufps	xmm3, xmm1, 0
mulps	xmm3, xmm4
andps	xmm3, xmm2
andps	xmm0, xmm2
addps	xmm0, xmm3
movaps	xmm3, xmm1
shufps	xmm3, xmm1, 0AAh
movaps	xmm1, xmmword ptr [eax+20h]
fstp	[esp+10h+var_4]
mulps	xmm3, xmm1
movss	xmm1, [esp+10h+var_4]
andps	xmm3, xmm2
shufps	xmm1, xmm1, 0
addps	xmm3, xmm1
movaps	xmm1, xmmword ptr [eax+30h]
addps	xmm0, xmm3
movaps	xmm3, ds:xmmword_1573EB0
movaps	xmm2, xmm0
xorps	xmm2, xmm3
addps	xmm2, xmm1
addps	xmm1, xmm0
movaps	xmmword	ptr [ecx+10h], xmm1
movaps	xmmword	ptr [ecx], xmm2
mov	esp, ebp
pop	ebp
retn
sub_607920 endp

align 10h


; Attributes: bp-based frame

sub_6079B0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
fld	ds:dword_1479C58
push	esi
mov	esi, ecx
fstp	dword ptr [esi]
push	edi
fld	ds:flt_15FCE90
lea	edi, [esi+24h]
fstp	dword ptr [esi+4]
mov	ecx, edi
fld1
mov	dword ptr [esi+20h], 5
fstp	dword ptr [esi+8]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld	ds:flt_15FCE90
fst	[esp+10h+var_4]
push	1
mov	ecx, edi
movss	xmm0, [esp+14h+var_4]
fstp	[esp+14h+var_4]
movss	xmm1, [esp+14h+var_4]
fld	ds:dword_156F414
fstp	[esp+14h+var_4]
movss	xmm2, [esp+14h+var_4]
fldz
fstp	[esp+14h+var_4]
movss	xmm3, [esp+14h+var_4]
unpcklps xmm0, xmm2
unpcklps xmm1, xmm3
unpcklps xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_6079B0 endp

align 10h



sub_607A40 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, eax
lea	esi, [edi+10h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_607A7E
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_607A7E:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+4]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_607ABB
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_607ABB:
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
pop	ebx
add	esp, 8
retn
sub_607A40 endp

align 10h



sub_607AD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	eax
mov	eax, [esp+4+arg_4]
push	ecx
push	edx
call	sub_607AF0
retn	8
sub_607AD0 endp

align 10h



sub_607AF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, [ebx+4]
push	edi
mov	edi, eax
mov	eax, [ebx+8]
lea	ebp, [esi+edi]
and	eax, 3FFFFFFFh
cmp	eax, ebp
mov	[esp+10h+arg_0], ebp
jge	short loc_607B29
add	eax, eax
cmp	ebp, eax
jl	short loc_607B18
mov	eax, ebp

loc_607B18:
push	8
push	eax
mov	eax, [esp+18h+arg_4]
push	ebx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_607B29:
mov	eax, [ebx]
lea	ecx, ds:0[esi*8]
push	ecx
push	eax
lea	edx, [eax+edi*8]
push	edx
call	sub_AD3070
mov	eax, [ebx]
add	esp, 0Ch
test	edi, edi
jle	short loc_607B82
mov	esi, [esp+10h+arg_8]
mov	ebp, eax
sub	ebp, esi
mov	edi, edi

loc_607B50:
lea	eax, [esi+ebp]
push	eax		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_607B6C
mov	ecx, [esi]
mov	[eax], ecx
mov	edx, [esi+4]
mov	[eax+4], edx

loc_607B6C:
add	esi, 8
sub	edi, 1
jnz	short loc_607B50
mov	eax, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	[ebx+4], eax
pop	ebx
retn	0Ch

loc_607B82:
pop	edi
pop	esi
mov	[ebx+4], ebp
pop	ebp
pop	ebx
retn	0Ch
sub_607AF0 endp

align 10h



sub_607B90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	esi
mov	esi, ecx
lea	ebp, [esi+14h]
push	edi
mov	ecx, ebp
add	ebx, 0FFFFFFA0h
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, [esp+10h+arg_0]
mov	edx, [eax]
mov	edx, [edx+18h]
push	ebx
push	ecx
mov	ecx, eax
call	edx
mov	edi, eax
test	edi, edi
jge	short loc_607BC6

loc_607BBC:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	8

loc_607BC6:
cmp	edi, ebx
jg	short loc_607BBC
mov	ecx, ebp
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
lea	ecx, [esi+60h]
cmp	eax, ecx
jnz	short loc_607BE9
lea	eax, [edi+60h]
pop	edi
mov	dword ptr [esi+1Ch], 0
pop	esi
pop	ebp
pop	ebx
retn	8

loc_607BE9:
mov	[esi+1Ch], edi
pop	edi
pop	esi
pop	ebp
mov	eax, 60h
pop	ebx
retn	8
sub_607B90 endp

align 10h



sub_607C00 proc	near

arg_0= dword ptr  4

push	esi
lea	esi, [edi+0Ch]
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_607C21
push	0
mov	ecx, esi
call	sub_4DCD10

loc_607C21:
push	1Bh
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F1B80
call	sub_4DCD10
push	12h
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F1B34
call	sub_4DCD10
mov	eax, edi
pop	esi
retn	4
sub_607C00 endp

align 10h



sub_607C50 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	ebp
push	esi
lea	esi, [edi+34h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	ebp, 80000000h
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_607C87
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_607C87:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+28h]
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_607CB8
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
push	edx
mov	ecx, eax
call	sub_4E22C0

loc_607CB8:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+1Ch]
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_607CE9
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_607CE9:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_607D1A
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
push	edx
mov	ecx, eax
call	sub_4E22C0

loc_607D1A:
mov	[esi+8], ebp
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_607C50 endp

align 10h



sub_607D30 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	ebp
push	esi
lea	esi, [edi+28h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	ebp, 80000000h
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_607D69
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_607D69:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+1Ch]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_607D9C
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_607D9C:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_607DCD
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_607DCD:
mov	[esi+8], ebp
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_607D30 endp

align 10h



sub_607DE0 proc	near
mov	eax, 40h
retn	8
sub_607DE0 endp

align 10h



sub_607DF0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_AAA020
test	[esp+4+arg_0], 1
jz	short loc_607E1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_607E1A:
mov	eax, edi
pop	edi
retn	4
sub_607DF0 endp




sub_607E20 proc	near
sub	ecx, 14h
jmp	sub_607DF0
sub_607E20 endp

align 10h



sub_607E30 proc	near

arg_0= dword ptr  4

push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_607E51
push	0
mov	ecx, edi
call	sub_4DCD10

loc_607E51:
mov	dword ptr [esi], offset	off_15F1F00
push	1Ch
mov	ecx, edi
mov	dword ptr [esi+14h], offset off_15F1C44
call	sub_4DCD10
mov	eax, esi
pop	edi
retn	4
sub_607E30 endp

align 10h



sub_607E70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AA53D0
test	[esp+4+arg_0], 1
jz	short loc_607E9A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_607E9A:
mov	eax, esi
pop	esi
retn	4
sub_607E70 endp




sub_607EA0 proc	near

arg_0= dword ptr  4

push	esi
lea	esi, [edi+0Ch]
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_607EC1
push	0
mov	ecx, esi
call	sub_4DCD10

loc_607EC1:
push	1Bh
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F1B80
call	sub_4DCD10
push	16h
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F1F80
call	sub_4DCD10
mov	eax, edi
pop	esi
retn	4
sub_607EA0 endp

align 10h



sub_607EF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_4D6D50
test	[esp+4+arg_0], 1
jz	short loc_607F1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_607F1A:
mov	eax, esi
pop	esi
retn	4
sub_607EF0 endp




sub_607F20 proc	near

arg_0= dword ptr  4

cmp	[esp+arg_0], 0
mov	dword ptr [eax+8], offset off_1472700
mov	dword ptr [eax+0Ch], offset off_1472718
mov	dword ptr [eax+10h], offset off_147272C
mov	dword ptr [eax+14h], offset off_147270C
mov	dword ptr [eax], offset	off_15F2000
mov	dword ptr [eax+8], offset off_15F2014
mov	dword ptr [eax+0Ch], offset off_15F2020
mov	dword ptr [eax+10h], offset off_15F2034
mov	dword ptr [eax+14h], offset off_15F2040
jz	short locret_607F6C
mov	dword ptr [eax+20h], 2

locret_607F6C:
retn	4
sub_607F20 endp

align 10h



sub_607F70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1211E70
test	[esp+4+arg_0], 1
jz	short loc_607F9A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_607F9A:
mov	eax, esi
pop	esi
retn	4
sub_607F70 endp




sub_607FA0 proc	near
sub	ecx, 10h
jmp	sub_607F70
sub_607FA0 endp

align 10h



sub_607FB0 proc	near
sub	ecx, 14h
jmp	sub_607F70
sub_607FB0 endp

align 10h



sub_607FC0 proc	near
sub	ecx, 8
jmp	sub_607EF0
sub_607FC0 endp

align 10h



sub_607FD0 proc	near
sub	ecx, 0Ch
jmp	sub_607EF0
sub_607FD0 endp

align 10h



sub_607FE0 proc	near
sub	ecx, 8
jmp	sub_607F70
sub_607FE0 endp

align 10h



sub_607FF0 proc	near
sub	ecx, 14h
jmp	sub_607EF0
sub_607FF0 endp

align 10h



sub_608000 proc	near
sub	ecx, 0Ch
jmp	sub_607F70
sub_608000 endp

align 10h



sub_608010 proc	near
mov	eax, 60h
retn	8
sub_608010 endp

align 10h


; Attributes: bp-based frame

sub_608020 proc	near

var_40=	byte ptr -40h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 4Ch
push	esi
lea	ecx, [esp+50h+var_40]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_8]
movaps	xmm1, xmmword ptr [eax]
movaps	xmm2, xmmword ptr [eax+10h]
movaps	xmm3, xmmword ptr [eax+20h]
movaps	xmm4, xmmword ptr [eax+30h]
mov	esi, [ebp+arg_4]
mov	edx, [ebp+arg_C]
dec	ecx
mov	eax, ecx
shl	eax, 4
add	eax, esi
sub	edx, esi
jmp	short loc_608060
align 10h

loc_608060:
movaps	xmm0, xmmword ptr [eax]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx+eax], xmm5
dec	ecx
sub	eax, 10h
test	ecx, ecx
jge	short loc_608060
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_608020 endp

align 10h



sub_6080A0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6080D0
test	[esp+4+arg_0], 1
jz	short loc_6080CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6080CA:
mov	eax, edi
pop	edi
retn	4
sub_6080A0 endp




sub_6080D0 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
lea	esi, [edi+40h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_608101
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_608101:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+34h]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_608149
and	edx, 3FFFFFFFh
lea	ecx, ds:0[edx*8]
sub	ecx, edx
mov	edx, [esi]
add	ecx, ecx
add	ecx, ecx
push	ebp
mov	ebp, [eax]
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
push	edx
call	eax
pop	ebp

loc_608149:
lea	ecx, [edi+10h]
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
call	??1facet@locale@std@@UAE@XZ_0 ;	std::locale::facet::~facet(void)
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 4
jmp	sub_4DA650
sub_6080D0 endp

align 10h



sub_608170 proc	near
sub	ecx, 10h
jmp	sub_6080A0
sub_608170 endp

align 10h



sub_608180 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	18h
sub_608180 endp

align 10h



sub_6081A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	20h
sub_6081A0 endp

align 10h



sub_6081C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	14h
sub_6081C0 endp

align 10h



sub_6081E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	0Ch
sub_6081E0 endp

align 10h



sub_608200 proc	near

arg_0= dword ptr  4

cmp	[esp+arg_0], 0
mov	dword ptr [eax+8], offset off_1472700
mov	dword ptr [eax+0Ch], offset off_1472718
mov	dword ptr [eax+10h], offset off_147272C
mov	dword ptr [eax+14h], offset off_147270C
mov	dword ptr [eax], offset	off_15F2104
mov	dword ptr [eax+8], offset off_15F2114
mov	dword ptr [eax+0Ch], offset off_15F2120
mov	dword ptr [eax+10h], offset off_15F2134
mov	dword ptr [eax+14h], offset off_15F2140
jz	short locret_60824C
mov	dword ptr [eax+20h], 1

locret_60824C:
retn	4
sub_608200 endp

align 10h



sub_608250 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1281D40
test	[esp+4+arg_0], 1
jz	short loc_60827A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60827A:
mov	eax, esi
pop	esi
retn	4
sub_608250 endp




sub_608280 proc	near
sub	ecx, 14h
jmp	sub_608250
sub_608280 endp

align 10h



sub_608290 proc	near
sub	ecx, 8
jmp	sub_608250
sub_608290 endp

align 10h



sub_6082A0 proc	near
sub	ecx, 0Ch
jmp	sub_608250
sub_6082A0 endp

align 10h



sub_6082B0 proc	near
sub	ecx, 10h
jmp	sub_608250
sub_6082B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_6082C0(int, int, float)
sub_6082C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 10h
mov	edx, [ebp+arg_0]
fld	[ebp+arg_8]
movaps	xmm0, xmmword ptr [edx]
movaps	xmm3, xmmword ptr [eax+10h]
movaps	xmm4, xmmword ptr [eax]
movaps	xmm2, ds:xmmword_1573EC0
movaps	xmm5, xmmword ptr [eax+20h]
fstp	[esp+10h+var_4]
mov	edx, [ebp+arg_4]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 55h
mulps	xmm6, xmm3
andps	xmm6, xmm2
mulps	xmm1, xmm4
andps	xmm1, xmm2
addps	xmm1, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
movss	xmm0, [esp+10h+var_4]
mulps	xmm6, xmm5
andps	xmm6, xmm2
movaps	xmm2, xmmword ptr [edx]
shufps	xmm0, xmm0, 0
addps	xmm6, xmm0
movaps	xmm0, xmm2
shufps	xmm0, xmm2, 0
mulps	xmm0, xmm4
movaps	xmm4, xmm2
shufps	xmm4, xmm2, 55h
mulps	xmm4, xmm3
movaps	xmm3, xmm2
shufps	xmm3, xmm2, 0AAh
movaps	xmm2, xmmword ptr [eax+30h]
mulps	xmm3, xmm5
addps	xmm3, xmm2
addps	xmm0, xmm4
addps	xmm0, xmm3
movaps	xmm3, ds:xmmword_1573EB0
addps	xmm1, xmm6
movaps	xmm2, xmm1
xorps	xmm2, xmm3
addps	xmm2, xmm0
addps	xmm0, xmm1
movaps	xmmword	ptr [ecx+10h], xmm0
movaps	xmmword	ptr [ecx], xmm2
mov	esp, ebp
pop	ebp
retn
sub_6082C0 endp

align 10h



sub_608380 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_6083BA
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
shl	edx, 5
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_6083BA:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_608380 endp

align 10h



sub_6083E0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+1Ch]
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	dword ptr [edi], offset	off_15F21B4
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	edx, [esi+8]
xor	ebx, ebx
mov	[esi+4], ebx
test	edx, edx
js	short loc_608423
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
shl	edx, 6
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx

loc_608423:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	ebp, [esi]
mov	ecx, eax
mov	eax, [esi+4]
cmp	eax, ebx
mov	[esp+18h+var_4], ecx
jle	short loc_608463
mov	ebx, eax
mov	edi, edi

loc_608450:
mov	ecx, ebp
call	sub_AD3ED0
add	ebp, 4
sub	ebx, 1
jnz	short loc_608450
mov	ecx, [esp+18h+var_4]

loc_608463:
mov	eax, [esi+8]
mov	[esi+4], ebx
test	eax, eax
js	short loc_608481
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_608481:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_608496
call	sub_AD6020

loc_608496:
mov	[edi+8], ebx
mov	ecx, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_6083E0 endp

align 10h



sub_6084B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6083E0
test	[esp+4+arg_0], 1
jz	short loc_6084DA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6084DA:
mov	eax, esi
pop	esi
retn	4
sub_6084B0 endp




sub_6084E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
mov	eax, [esp+4+arg_0]
push	eax
call	sub_6075A0
lea	ecx, [esi+40h]
mov	dword ptr [esi], offset	off_15F21C4
mov	dword ptr [esi+10h], offset off_15F21FC
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_608517
push	18h
lea	ecx, [esi+0Ch]
call	sub_4DCD10
mov	byte ptr [esi+15h], 4

loc_608517:
mov	eax, esi
pop	esi
retn	4
sub_6084E0 endp

align 10h



sub_608520 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_608550
test	[esp+4+arg_0], 1
jz	short loc_60854A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60854A:
mov	eax, edi
pop	edi
retn	4
sub_608520 endp




sub_608550 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
push	esi
lea	esi, [edi+30h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_60859B
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax

loc_60859B:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+24h]
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_6085D5
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
shl	edx, 4
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx

loc_6085D5:
mov	ebp, 80000000h
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+18h]
mov	[esp+20h+var_10], esi
mov	[esp+20h+var_4], ebx
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_608613
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_608613:
mov	[esi], ebx
mov	[esi+8], ebp
mov	[esp+20h+var_4], 0FFFFFFFFh
lea	ecx, [edi+10h]
call	??1facet@locale@std@@UAE@XZ_0 ;	std::locale::facet::~facet(void)
mov	ecx, edi
call	sub_4DA650
mov	ecx, [esp+20h+var_C]
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_608550 endp

align 10h



sub_608650 proc	near
sub	ecx, 10h
jmp	sub_608520
sub_608650 endp

align 10h



sub_608660 proc	near

arg_0= dword ptr  4

push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_608681
push	0
mov	ecx, edi
call	sub_4DCD10

loc_608681:
cmp	[esp+4+arg_0], 0
mov	dword ptr [esi], offset	off_15F1C64
jz	short loc_60869B
push	8
mov	ecx, edi
call	sub_4DCD10
mov	byte ptr [esi+10h], 2

loc_60869B:
cmp	[esp+4+arg_0], 0
mov	dword ptr [esi], offset	off_15F1CA0
pop	edi
mov	eax, esi
jz	short locret_6086AF
mov	byte ptr [esi+10h], 0

locret_6086AF:
retn	4
sub_608660 endp

align 10h


; Attributes: bp-based frame

sub_6086C0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0Ch
push	esi
mov	esi, eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_608660
cmp	[ebp+arg_0], 1
mov	dword ptr [esi], offset	off_15F1CDC
mov	dword ptr [esi+30h], offset off_15F1C44
jnz	short loc_608709
push	0Ah
lea	ecx, [esi+0Ch]
call	sub_4DCD10
mov	eax, [esi+14h]
movaps	xmm0, xmmword ptr [eax+10h]
movaps	xmmword	ptr [esi+20h], xmm0
mov	ecx, [eax+20h]
mov	[esi+18h], ecx
mov	edx, [eax+24h]
mov	[esi+1Ch], edx

loc_608709:
mov	eax, esi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_6086C0 endp

align 10h



sub_608720 proc	near
mov	eax, 20h
retn	8
sub_608720 endp

align 10h



sub_608730 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AA48E0
test	[esp+4+arg_0], 1
jz	short loc_60875A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60875A:
mov	eax, esi
pop	esi
retn	4
sub_608730 endp




sub_608760 proc	near
sub	ecx, 10h
jmp	sub_608730
sub_608760 endp

align 10h


; Attributes: bp-based frame

sub_608770 proc	near

var_C2=	byte ptr -0C2h
var_C1=	byte ptr -0C1h
var_C0=	byte ptr -0C0h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	dword ptr -70h
var_60=	xmmword	ptr -60h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0C4h
push	ebx
push	esi
push	edi
lea	ecx, [esp+0D0h+var_60]
call	sub_4DA2E0

loc_608788:
mov	eax, [ebp+arg_4]
mov	esi, [ebp+arg_8]
mov	edi, eax
add	eax, esi
sar	eax, 1
lea	eax, [eax+eax*2]
shl	eax, 5
add	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
fld	dword ptr [eax+10h]
mov	edx, [eax+18h]
fstp	[esp+0D0h+var_50]
movaps	xmm0, xmmword ptr [eax]
mov	[esp+0D0h+var_4C], ecx
mov	ecx, [eax+1Ch]
mov	[esp+0D0h+var_48], edx
mov	edx, [eax+20h]
mov	[esp+0D0h+var_44], ecx
mov	ecx, [eax+24h]
mov	[esp+0D0h+var_40], edx
mov	edx, [eax+28h]
mov	[esp+0D0h+var_3C], ecx
mov	ecx, [eax+2Ch]
mov	[esp+0D0h+var_38], edx
mov	edx, [eax+30h]
mov	[esp+0D0h+var_34], ecx
mov	ecx, [eax+34h]
mov	[esp+0D0h+var_30], edx
mov	edx, [eax+38h]
mov	[esp+0D0h+var_2C], ecx
mov	ecx, [eax+3Ch]
mov	[esp+0D0h+var_28], edx
mov	edx, [eax+40h]
mov	eax, [eax+50h]
movaps	[esp+0D0h+var_60], xmm0
mov	[esp+0D0h+var_24], ecx
mov	[esp+0D0h+var_20], edx
mov	[esp+0D0h+var_10], eax

loc_608831:
mov	edx, [ebp+arg_0]
lea	ecx, [edi+edi*2]
shl	ecx, 5
lea	ebx, [ecx+edx+10h]
mov	edi, edi

loc_608840:
fld	dword ptr [ebx]
fld	[esp+0D0h+var_50]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_608856
mov	al, 1
jmp	short loc_608858

loc_608856:
xor	al, al

loc_608858:
push	eax
lea	ecx, [esp+0D4h+var_C1]
call	sub_4D4F20
lea	ecx, [esp+0D0h+var_C1]
call	sub_4D4F40
test	al, al
jz	short loc_608875
inc	edi
add	ebx, 60h
jmp	short loc_608840

loc_608875:
mov	ecx, [ebp+arg_0]
lea	eax, [esi+esi*2]
shl	eax, 5
lea	ebx, [eax+ecx+10h]

loc_608882:
fld	[esp+0D0h+var_50]
fld	dword ptr [ebx]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_608898
mov	al, 1
jmp	short loc_60889A

loc_608898:
xor	al, al

loc_60889A:
push	eax
lea	ecx, [esp+0D4h+var_C2]
call	sub_4D4F20
lea	ecx, [esp+0D0h+var_C2]
call	sub_4D4F40
test	al, al
jz	short loc_6088B7
dec	esi
sub	ebx, 60h
jmp	short loc_608882

loc_6088B7:
cmp	esi, edi
jl	loc_608A0C
jz	loc_608A02
lea	ecx, [esp+0D0h+var_C0]
call	sub_4DA2E0
mov	edx, [ebp+arg_0]
lea	eax, [esi+esi*2]
shl	eax, 5
mov	ebx, [eax+edx+18h]
fld	dword ptr [eax+edx+10h]
add	eax, edx
fstp	[esp+0D0h+var_B0]
mov	[esp+0D0h+var_A8], ebx
mov	ebx, [eax+1Ch]
movaps	xmm0, xmmword ptr [eax]
mov	[esp+0D0h+var_A4], ebx
mov	ebx, [eax+20h]
mov	[esp+0D0h+var_A0], ebx
mov	ebx, [eax+24h]
mov	[esp+0D0h+var_9C], ebx
mov	ebx, [eax+28h]
mov	[esp+0D0h+var_98], ebx
mov	ebx, [eax+2Ch]
mov	[esp+0D0h+var_94], ebx
mov	ebx, [eax+30h]
mov	[esp+0D0h+var_90], ebx
mov	ebx, [eax+34h]
mov	[esp+0D0h+var_8C], ebx
mov	ebx, [eax+38h]
mov	[esp+0D0h+var_88], ebx
mov	ebx, [eax+3Ch]
mov	[esp+0D0h+var_84], ebx
mov	ebx, [eax+40h]
mov	[esp+0D0h+var_80], ebx
mov	ebx, [eax+50h]
mov	[esp+0D0h+var_70], ebx
lea	ecx, [edi+edi*2]
shl	ecx, 5
movaps	xmm1, xmmword ptr [ecx+edx]
movaps	xmmword	ptr [eax], xmm1
fld	dword ptr [ecx+edx+10h]
fstp	dword ptr [eax+10h]
mov	ebx, [ecx+edx+14h]
add	ecx, edx
fld	[esp+0D0h+var_B0]
mov	edx, [eax+14h]
mov	[eax+14h], ebx
mov	ebx, [ecx+18h]
mov	[eax+18h], ebx
mov	ebx, [ecx+1Ch]
mov	[eax+1Ch], ebx
mov	ebx, [ecx+20h]
mov	[eax+20h], ebx
mov	ebx, [ecx+24h]
mov	[eax+24h], ebx
mov	ebx, [ecx+28h]
mov	[eax+28h], ebx
mov	ebx, [ecx+2Ch]
mov	[eax+2Ch], ebx
mov	ebx, [ecx+30h]
mov	[eax+30h], ebx
mov	ebx, [ecx+34h]
mov	[eax+34h], ebx
mov	ebx, [ecx+38h]
mov	[eax+38h], ebx
mov	ebx, [ecx+3Ch]
mov	[eax+3Ch], ebx
mov	ebx, [ecx+40h]
mov	[eax+40h], ebx
mov	ebx, [ecx+50h]
mov	[eax+50h], ebx
fstp	dword ptr [ecx+10h]
mov	eax, [esp+0D0h+var_A4]
mov	[ecx+14h], edx
mov	edx, [esp+0D0h+var_A8]
movaps	xmmword	ptr [ecx], xmm0
mov	[ecx+18h], edx
mov	edx, [esp+0D0h+var_A0]
mov	[ecx+1Ch], eax
mov	eax, [esp+0D0h+var_9C]
mov	[ecx+20h], edx
mov	edx, [esp+0D0h+var_98]
mov	[ecx+24h], eax
mov	[ecx+28h], edx
mov	eax, [esp+0D0h+var_94]
mov	edx, [esp+0D0h+var_90]
mov	[ecx+2Ch], eax
mov	eax, [esp+0D0h+var_8C]
mov	[ecx+30h], edx
mov	edx, [esp+0D0h+var_88]
mov	[ecx+34h], eax
mov	eax, [esp+0D0h+var_84]
mov	[ecx+38h], edx
mov	edx, [esp+0D0h+var_80]
mov	[ecx+3Ch], eax
mov	eax, [esp+0D0h+var_70]
mov	[ecx+40h], edx
mov	[ecx+50h], eax

loc_608A02:
dec	esi
inc	edi
cmp	edi, esi
jle	loc_608831

loc_608A0C:
mov	eax, [ebp+arg_4]
cmp	eax, esi
jge	short loc_608A25
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_0]
push	ecx
push	esi
push	eax
push	edx
call	sub_608770
add	esp, 10h

loc_608A25:
cmp	edi, [ebp+arg_8]
jge	short loc_608A32
mov	[ebp+arg_4], edi
jmp	loc_608788

loc_608A32:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_608770 endp

align 10h


; Attributes: bp-based frame

sub_608A40 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, ecx
mov	ecx, [ebp+arg_0]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+10h]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	edx, [ecx+20h]
mov	[eax+20h], edx
mov	edx, [ecx+24h]
mov	[eax+24h], edx
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	edx, [ecx+34h]
mov	[eax+34h], edx
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	edx, [ecx+3Ch]
mov	[eax+3Ch], edx
mov	ecx, [ecx+40h]
mov	[eax+40h], ecx
mov	esp, ebp
pop	ebp
retn	4
sub_608A40 endp

align 10h



sub_608AB0 proc	near

arg_0= dword ptr  4

push	esi
xor	esi, esi
cmp	[esp+4+arg_0], esi
jz	short loc_608ADF
xor	ecx, ecx
xor	edx, edx
mov	[eax+42h], dx
mov	[eax+40h], cx
lea	ecx, [eax+14h]
mov	dl, al
sub	dl, cl
mov	[eax+44h], esi
mov	[eax+48h], esi
mov	dword ptr [eax+20h], 1
mov	[eax+30h], esi
mov	[ecx+5], dl

loc_608ADF:
mov	[eax+50h], esi
mov	[eax+54h], esi
mov	dword ptr [eax+58h], 80000000h
pop	esi
retn	4
sub_608AB0 endp




sub_608AF0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, eax
add	esi, 50h
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_608B2F
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_608B2F:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	esi
pop	ecx
retn
sub_608AF0 endp

align 10h



sub_608B40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_4D7790
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_608B74
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_608B74:
mov	eax, esi
pop	esi
retn	4
sub_608B40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_608B80(int, float)
sub_608B80 proc	near

var_54=	dword ptr -54h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	xmmword	ptr -30h
var_20=	byte ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 4Ch
movaps	xmm0, xmmword ptr [edi]
fld	[ebp+arg_4]
movaps	xmm1, xmmword ptr [edi+10h]
fmul	st, st
subps	xmm1, xmm0
mulps	xmm0, xmm1
movaps	[esp+4Ch+var_10], xmm1
fstp	[esp+4Ch+var_34]
push	ebx
mov	ebx, [ebp+arg_0]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+50h+var_30]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+54h+var_20]
movaps	[esp+54h+var_30], xmm2
call	sub_4D5050
lea	ecx, [esp+50h+var_20]
call	sub_4D50D0
fstp	[esp+50h+var_40]
fldz
fcomp	[esp+50h+var_40]
fnstsw	ax
test	ah, 41h
jnp	loc_608D8E
movaps	xmm0, [esp+50h+var_10]
mulps	xmm0, xmm0
movaps	xmm1, xmm0
lea	ecx, [esp+50h+var_10]
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
push	ecx
addss	xmm2, xmm1
lea	ecx, [esp+54h+var_20]
movaps	[esp+54h+var_10], xmm2
call	sub_4D5050
lea	ecx, [esp+50h+var_20]
call	sub_4D50D0
fstp	[esp+50h+var_38]
fld	[esp+50h+var_40]
fld	st
fmul	st, st
fld	[esp+50h+var_38]
fld	st
fld	[esp+50h+var_34]
fld	st
fmulp	st(2), st
fxch	st(1)
fmul	ds:dbl_15FCBF8
fstp	[esp+50h+var_3C]
fld	[esp+50h+var_3C]
fcomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 5
jp	short loc_608CBC
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	loc_608D9E
fxch	st(1)
push	ecx
fchs
lea	ecx, [esp+54h+var_10]
fstp	[esp+54h+var_3C]
fdivr	[esp+54h+var_3C]
fstp	[esp+54h+var_40]
fld	[esp+54h+var_40]
fstp	[esp+54h+var_54]
call	sub_4D5090
fldz
movaps	xmm0, [esp+50h+var_10]
fstp	[esp+50h+var_40]
movaps	xmm2, xmmword ptr [edi]
shufps	xmm0, xmm0, 0
movaps	xmm1, xmm0
movaps	xmm0, ds:xmmword_146B8A0
subps	xmm0, xmm1
mulps	xmm0, xmm2
movaps	xmm2, xmmword ptr [edi+10h]
mulps	xmm2, xmm1
addps	xmm0, xmm2
jmp	short loc_608CCB

loc_608CBC:
movaps	xmm0, xmmword ptr [edi]
fstp	st
fstp	st(1)
fstp	st
fldz
fstp	[esp+50h+var_3C]

loc_608CCB:
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	edx, [esp+50h+var_10]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	edx
lea	ecx, [esp+54h+var_20]
movaps	[esp+54h+var_10], xmm2
call	sub_4D5050
fld	[esp+50h+var_40]
fmul	st, st
lea	ecx, [esp+50h+var_20]
fstp	qword ptr [esp+50h+var_30]
call	sub_4D50D0
fsub	[esp+50h+var_34]
fstp	[esp+50h+var_34]
fld	[esp+50h+var_34]
fmul	[esp+50h+var_38]
fsubr	qword ptr [esp+50h+var_30]
fstp	[esp+50h+var_34]
fldz
fld	[esp+50h+var_34]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnp	short loc_608D8C
fld	[esp+50h+var_40]
push	ecx		; float
fchs
fstp	[esp+54h+var_34]
fstp	[esp+54h+var_54]
call	sub_4D5260
fsubr	[esp+54h+var_34]
add	esp, 4
fstp	[esp+50h+var_34]
fld	[esp+50h+var_34]
fadd	[esp+50h+var_3C]
fstp	[esp+50h+var_3C]
fld	[esp+50h+var_3C]
fld	dword ptr [esi+10h]
fld	[esp+50h+var_38]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+50h+var_34]
fld	[esp+50h+var_34]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnp	short loc_608D8A
fldz
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_608DB2

loc_608D8A:
fstp	st(1)

loc_608D8C:
fstp	st

loc_608D8E:
push	0
mov	ecx, ebx
call	sub_4D4F20
mov	eax, ebx
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_608D9E:
fstp	st
push	0
mov	ecx, ebx
fstp	st
call	sub_4D4F20
mov	eax, ebx
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_608DB2:
fdivp	st(1), st
push	ecx
lea	ecx, [esp+54h+var_10]
fstp	[esp+54h+var_3C]
fld	[esp+54h+var_3C]
fst	dword ptr [esi+10h]
fstp	[esp+54h+var_54]
call	sub_4D5090
fld	[ebp+arg_4]
fld1
movaps	xmm0, [esp+50h+var_10]
fdivrp	st(1), st
movaps	xmm1, ds:xmmword_146B8A0
movaps	xmm2, xmmword ptr [edi]
shufps	xmm0, xmm0, 0
subps	xmm1, xmm0
mulps	xmm1, xmm2
movaps	xmm2, xmmword ptr [edi+10h]
push	ecx
mulps	xmm2, xmm0
addps	xmm1, xmm2
lea	ecx, [esp+54h+var_10]
movaps	xmmword	ptr [esi], xmm1
fstp	[esp+54h+var_34]
fld	[esp+54h+var_34]
fstp	[esp+54h+var_54]
call	sub_4D5090
movaps	xmm0, [esp+50h+var_10]
mov	eax, [esi+40h]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [esi]
mulps	xmm1, xmm0
movaps	xmmword	ptr [esi], xmm1
push	1
mov	ecx, ebx
mov	dword ptr [esi+eax*4+20h], 0FFFFFFFFh
call	sub_4D4F20
mov	eax, ebx
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_608B80 endp

align 10h



sub_608E40 proc	near

arg_0= dword ptr  4

cmp	[esp+arg_0], 0
mov	dword ptr [eax+8], offset off_1472700
mov	dword ptr [eax+0Ch], offset off_1472718
mov	dword ptr [eax+10h], offset off_147272C
mov	dword ptr [eax+14h], offset off_147270C
mov	dword ptr [eax], offset	off_15F2378
mov	dword ptr [eax+8], offset off_15F2388
mov	dword ptr [eax+0Ch], offset off_15F2394
mov	dword ptr [eax+10h], offset off_15F23A8
mov	dword ptr [eax+14h], offset off_15F23B4
jz	short locret_608E8C
mov	dword ptr [eax+20h], 3

locret_608E8C:
retn	4
sub_608E40 endp

align 10h



sub_608E90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1204270
test	[esp+4+arg_0], 1
jz	short loc_608EBA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_608EBA:
mov	eax, esi
pop	esi
retn	4
sub_608E90 endp




sub_608EC0 proc	near
sub	ecx, 8
jmp	sub_608E90
sub_608EC0 endp

align 10h



sub_608ED0 proc	near
sub	ecx, 0Ch
jmp	sub_608E90
sub_608ED0 endp

align 10h



sub_608EE0 proc	near
sub	ecx, 10h
jmp	sub_608E90
sub_608EE0 endp

align 10h



sub_608EF0 proc	near
sub	ecx, 14h
jmp	sub_608E90
sub_608EF0 endp

align 10h



sub_608F00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12838C0
test	[esp+4+arg_0], 1
jz	short loc_608F2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_608F2A:
mov	eax, esi
pop	esi
retn	4
sub_608F00 endp



; Attributes: bp-based frame

sub_608F30 proc	near

arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+10h]
fld	dword ptr [ecx+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_608F81
fld	dword ptr [edx+10h]
mov	eax, [ecx+0Ch]
fstp	dword ptr [ecx+4]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [eax], xmm0
fld	dword ptr [edx+10h]
mov	eax, [ecx+0Ch]
fstp	dword ptr [eax+10h]
mov	eax, [ecx+0Ch]
mov	edx, [edx+14h]
mov	[eax+14h], edx
mov	eax, [ecx+0Ch]
mov	edx, [eax+40h]
push	1
add	ecx, 8
mov	dword ptr [eax+edx*4+20h], 0FFFFFFFFh
call	sub_4D4F20

loc_608F81:
mov	esp, ebp
pop	ebp
retn	8
sub_608F30 endp

align 10h


; Attributes: bp-based frame

sub_608F90 proc	near

var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 24h
push	ebx
mov	ebx, [ebp+arg_4]
movaps	xmm0, xmmword ptr [ebx]
push	esi
push	edi
mov	edx, ecx
mov	ecx, 8
mov	esi, ebx
lea	edi, [esp+30h+var_20]
rep movsd
mov	esi, [ebp+arg_0]
mov	eax, [esi+8]
movaps	xmm2, xmmword ptr [eax+10h]
movaps	xmm3, xmmword ptr [eax]
mov	ecx, [edx+8]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
mulps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0
mulps	xmm2, xmm3
addps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0AAh
movaps	xmm0, xmmword ptr [eax+20h]
mulps	xmm2, xmm0
addps	xmm1, xmm2
lea	edx, [esp+30h+var_20]
movaps	[esp+30h+var_20], xmm1
mov	eax, [ecx]
mov	eax, [eax]
push	edx
push	esi
call	eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_608F90 endp

align 10h



; int __thiscall sub_609010(void *, char)
sub_609010 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	??1facet@locale@std@@UAE@XZ_7 ;	std::locale::facet::~facet(void)
test	[esp+4+arg_0], 1
jz	short loc_609028
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_609028:
mov	eax, esi
pop	esi
retn	4
sub_609010 endp

align 10h



sub_609030 proc	near

arg_0= dword ptr  4

push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_609051
push	0
mov	ecx, edi
call	sub_4DCD10

loc_609051:
mov	dword ptr [esi], offset	off_15F22DC
lea	ecx, [esi+20h]
mov	dword ptr [esi+10h], offset off_15F1C44
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+30h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	0Fh
mov	ecx, edi
call	sub_4DCD10
mov	eax, esi
pop	edi
retn	4
sub_609030 endp

align 10h



sub_609080 proc	near

arg_0= dword ptr  4

push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_6090A1
push	0
mov	ecx, edi
call	sub_4DCD10

loc_6090A1:
push	1Ah
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F23DC
call	sub_4DCD10
lea	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_15F2414
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_6090CE
push	0Dh
mov	ecx, edi
call	sub_4DCD10

loc_6090CE:
mov	eax, esi
pop	edi
retn	4
sub_609080 endp

align 10h



sub_6090E0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_609110
test	[esp+4+arg_0], 1
jz	short loc_60910A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60910A:
mov	eax, edi
pop	edi
retn	4
sub_6090E0 endp




sub_609110 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+60h]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_609143
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_609143:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_12838C0
sub_609110 endp

align 10h



sub_609160 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+10h]
imul	eax, [esp+arg_4]
add	eax, [esp+arg_0]
mov	edx, [ecx+60h]
movzx	eax, word ptr [edx+eax*2]
mov	[esp+arg_4], eax
fild	[esp+arg_4]
fmul	dword ptr [ecx+74h]
fadd	dword ptr [ecx+70h]
fstp	[esp+arg_4]
fld	[esp+arg_4]
retn	8
sub_609160 endp

align 10h



sub_609190 proc	near

arg_0= dword ptr  4

mov	cl, [ecx+6Ch]
mov	eax, [esp+arg_0]
mov	[eax], cl
retn	4
sub_609190 endp

align 10h



sub_6091A0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A9B430
test	[esp+4+arg_0], 1
jz	short loc_6091CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6091CA:
mov	eax, edi
pop	edi
retn	4
sub_6091A0 endp




sub_6091D0 proc	near
sub	ecx, 10h
jmp	sub_6091A0
sub_6091D0 endp

align 10h


; Attributes: bp-based frame

sub_6091E0 proc	near

var_72=	byte ptr -72h
var_71=	byte ptr -71h
var_70=	qword ptr -70h
var_68=	qword ptr -68h
var_60=	byte ptr -60h
var_30=	byte ptr -30h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 74h
push	ebx
push	esi
push	edi
lea	esp, [esp+0]

loc_6091F0:
mov	ebx, [ebp+arg_8]
mov	edi, [ebp+arg_4]
lea	eax, [edi+ebx]
sar	eax, 1
lea	eax, [eax+eax*2]
shl	eax, 4
add	eax, [ebp+arg_0]
lea	ecx, [esp+80h+var_60]
push	eax
call	sub_4D9BF0

loc_60920E:
lea	esi, [edi+edi*2]
shl	esi, 4
add	esi, [ebp+arg_0]

loc_609217:
mov	ecx, esi
call	sub_4D6870
fstp	[esp+80h+var_70]
lea	ecx, [esp+80h+var_60]
call	sub_4D6870
fcomp	[esp+80h+var_70]
fnstsw	ax
test	ah, 41h
jnz	short loc_60923A
mov	al, 1
jmp	short loc_60923C

loc_60923A:
xor	al, al

loc_60923C:
push	eax
lea	ecx, [esp+84h+var_72]
call	sub_4D4F20
lea	ecx, [esp+80h+var_72]
call	sub_4D4F40
test	al, al
jz	short loc_609259
inc	edi
add	esi, 30h
jmp	short loc_609217

loc_609259:
lea	esi, [ebx+ebx*2]
shl	esi, 4
add	esi, [ebp+arg_0]
mov	dword ptr [esp+80h+var_70], edi

loc_609266:
lea	ecx, [esp+80h+var_60]
call	sub_4D6870
fstp	[esp+80h+var_68]
mov	ecx, esi
call	sub_4D6870
fcomp	[esp+80h+var_68]
fnstsw	ax
test	ah, 41h
jnz	short loc_609289
mov	al, 1
jmp	short loc_60928B

loc_609289:
xor	al, al

loc_60928B:
push	eax
lea	ecx, [esp+84h+var_71]
call	sub_4D4F20
lea	ecx, [esp+80h+var_71]
call	sub_4D4F40
test	al, al
jz	short loc_6092A8
dec	ebx
sub	esi, 30h
jmp	short loc_609266

loc_6092A8:
cmp	ebx, edi
jl	short loc_6092EC
jz	short loc_6092E2
lea	esi, [ebx+ebx*2]
shl	esi, 4
add	esi, [ebp+arg_0]
lea	edi, [edi+edi*2]
shl	edi, 4
add	edi, [ebp+arg_0]
push	esi
lea	ecx, [esp+84h+var_30]
call	sub_4D9BF0
push	edi
mov	ecx, esi
call	sub_4D9BF0
lea	ecx, [esp+80h+var_30]
push	ecx
mov	ecx, edi
call	sub_4D9BF0
mov	edi, dword ptr [esp+80h+var_70]

loc_6092E2:
dec	ebx
inc	edi
cmp	edi, ebx
jle	loc_60920E

loc_6092EC:
mov	eax, [ebp+arg_4]
cmp	eax, ebx
jge	short loc_609305
mov	edx, [ebp+arg_C]
push	edx
push	ebx
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	sub_6091E0
add	esp, 10h

loc_609305:
cmp	edi, [ebp+arg_8]
jge	short loc_609312
mov	[ebp+arg_4], edi
jmp	loc_6091F0

loc_609312:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6091E0 endp

align 10h



; int __stdcall	sub_609320(float, float, float)
sub_609320 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fld	[esp+arg_0]
sub	esp, 0Ch
push	esi
push	edi
mov	edi, eax
mov	esi, [edi+8]
xor	ecx, ecx
test	esi, esi
jle	short loc_60934F
mov	edx, [edi+4]

loc_609337:
fld	dword ptr [edx]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jnp	short loc_60934C
inc	ecx
add	edx, 0Ch
cmp	ecx, esi
jl	short loc_609337
jmp	short loc_60934F

loc_60934C:
lea	esi, [ecx+1]

loc_60934F:
fstp	[esp+14h+var_C]
lea	eax, [esp+14h+var_C]
fld	[esp+14h+arg_4]
push	eax
fstp	[esp+18h+var_8]
add	edi, 4
fld	[esp+18h+arg_8]
push	edi
lea	ecx, [esp+1Ch+arg_0]
fstp	[esp+1Ch+var_4]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
mov	ecx, esi
call	sub_609640
pop	edi
pop	esi
add	esp, 0Ch
retn	0Ch
sub_609320 endp

align 10h



sub_609390 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 28h
push	ebx
push	ebp
mov	ebp, [esp+30h+arg_0]
mov	eax, [ebp+8]
xor	ebx, ebx
push	esi
push	edi
cmp	eax, ebx
jnz	short loc_6093B1
fld	dword ptr [ebp+0]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	4

loc_6093B1:
cmp	eax, 1
mov	byte ptr [esp+38h+arg_0], bl
jle	short loc_6093CE
mov	ecx, [esp+38h+arg_0]
mov	edx, [ebp+4]
push	ecx
dec	eax
push	eax
push	ebx
push	edx
call	sub_6096F0
add	esp, 10h

loc_6093CE:
mov	eax, [ebp+8]
mov	edi, 1
xor	ecx, ecx
cmp	eax, edi
mov	[esp+38h+var_18], ecx
mov	[esp+38h+var_14], ebx
mov	[esp+38h+var_10], 80000000h
mov	[esp+38h+var_20], ebx
mov	[esp+38h+var_1C], edi
jl	loc_609581
mov	[esp+38h+var_24], 0Ch
cmp	edi, eax

loc_609402:
jge	short loc_609427
mov	ecx, [ebp+4]
mov	eax, [esp+38h+var_24]
add	eax, ecx
add	ecx, ebx
lea	esi, [esp+38h+var_25]
call	sub_AAA630
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	loc_609568

loc_609427:
fldz
mov	edx, edi
sub	edx, [esp+38h+var_20]
fst	[esp+38h+arg_0]
xor	edi, edi
cmp	edx, 4
jl	short loc_609495
mov	eax, [ebp+4]
lea	ecx, [edx-4]
shr	ecx, 2
inc	ecx
lea	esi, [eax+ebx+18h]
lea	eax, [eax+ebx+4]
lea	edi, ds:0[ecx*4]

loc_609453:
fld	dword ptr [eax]
add	eax, 30h
fsub	dword ptr [esi-18h]
add	esi, 30h
sub	ecx, 1
fadd	[esp+38h+arg_0]
fstp	[esp+38h+arg_0]
fld	dword ptr [eax-24h]
fsub	dword ptr [eax-28h]
fadd	[esp+38h+arg_0]
fstp	[esp+38h+arg_0]
fld	dword ptr [eax-18h]
fsub	dword ptr [esi-30h]
fadd	[esp+38h+arg_0]
fstp	[esp+38h+arg_0]
fld	dword ptr [eax-0Ch]
fsub	dword ptr [esi-24h]
fadd	[esp+38h+arg_0]
fstp	[esp+38h+arg_0]
jnz	short loc_609453

loc_609495:
cmp	edi, edx
jge	short loc_6094C1
mov	ecx, [esp+38h+var_20]
lea	eax, [edi+ecx]
mov	ecx, [ebp+4]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
sub	edx, edi

loc_6094AB:
fld	dword ptr [eax+4]
add	eax, 0Ch
sub	edx, 1
fsub	dword ptr [eax-0Ch]
fadd	[esp+38h+arg_0]
fstp	[esp+38h+arg_0]
jnz	short loc_6094AB

loc_6094C1:
mov	edx, [ebp+4]
fld	dword ptr [ebx+edx+8]
sub	esp, 0Ch
fstp	[esp+44h+var_4]
fst	[esp+44h+var_C]
fld1
fstp	[esp+44h+var_3C]
fstp	[esp+44h+var_40]
fld	[esp+44h+arg_0]
fstp	[esp+44h+var_44]
call	sub_4DE9F0
add	esp, 0Ch
fstp	[esp+38h+var_8]
lea	eax, [esp+38h+var_18]
push	eax
lea	ecx, [esp+3Ch+arg_0]
mov	byte ptr [esp+3Ch+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+38h+var_10]
mov	ecx, [esp+38h+var_14]
and	edx, 3FFFFFFFh
cmp	ecx, edx
jnz	short loc_609529
push	0Ch
lea	ecx, [esp+3Ch+var_18]
push	ecx
push	eax
call	sub_121B830
mov	ecx, [esp+44h+var_14]
add	esp, 0Ch

loc_609529:
mov	eax, [esp+38h+var_18]
lea	edx, [ecx+ecx*2]
lea	eax, [eax+edx*4]
push	eax		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_609556
mov	ecx, [esp+38h+var_C]
mov	edx, [esp+38h+var_8]
mov	[eax], ecx
mov	ecx, [esp+38h+var_4]
mov	[eax+4], edx
mov	[eax+8], ecx

loc_609556:
mov	edx, [esp+38h+var_1C]
inc	[esp+38h+var_14]
mov	ebx, [esp+38h+var_24]
mov	[esp+38h+var_20], edx
mov	edi, edx

loc_609568:
mov	eax, [ebp+8]
add	[esp+38h+var_24], 0Ch
inc	edi
cmp	edi, eax
mov	[esp+38h+var_1C], edi
jle	loc_609402
mov	ecx, [esp+38h+var_18]

loc_609581:
fld	ds:dword_1541BC8
xor	edi, edi
xor	dl, dl
fstp	[esp+38h+arg_0]
cmp	[esp+38h+var_14], edi
jle	short loc_6095EC
xor	esi, esi
jmp	short loc_6095A0
align 10h

loc_6095A0:
fld	dword ptr [esi+ecx+4]
fsub	dword ptr [esi+ecx]
fcomp	ds:dbl_15FD438
fnstsw	ax
test	ah, 5
jnp	short loc_6095D8
fld	dword ptr [esi+ecx+8]
sub	esp, 8
fstp	[esp+40h+var_3C]
fld	[esp+40h+arg_0]
fstp	[esp+40h+var_40]
call	sub_4DDB10
mov	ecx, [esp+40h+var_18]
fstp	[esp+40h+arg_0]
add	esp, 8
mov	dl, 1

loc_6095D8:
inc	edi
add	esi, 0Ch
cmp	edi, [esp+38h+var_14]
jl	short loc_6095A0
test	dl, dl
jz	short loc_6095EC
fld	[esp+38h+arg_0]
jmp	short loc_6095EE

loc_6095EC:
fldz

loc_6095EE:
lea	eax, [esp+38h+var_18]
fstp	[esp+38h+var_1C]
push	eax
lea	ecx, [esp+3Ch+arg_0]
mov	byte ptr [esp+3Ch+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+38h+var_10]
mov	[esp+38h+var_14], 0
test	edx, edx
js	short loc_609631
mov	esi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*2]
mov	edx, [esp+38h+var_18]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_609631:
fld	[esp+38h+var_1C]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	4
sub_609390 endp

align 10h



sub_609640 proc	near

arg_0= dword ptr  4

push	eax
mov	eax, [esp+4+arg_0]
call	sub_609650
retn	4
sub_609640 endp

align 10h



sub_609650 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	eax
push	ecx
push	edx
call	sub_609660
retn	4
sub_609650 endp

align 10h



sub_609660 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [edi+4]
push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
lea	ebp, [eax+1]
sub	eax, ebx
mov	ecx, eax
mov	eax, [edi+8]
and	eax, 3FFFFFFFh
cmp	eax, ebp
push	esi
mov	[esp+0Ch+arg_4], ecx
jge	short loc_60969E
add	eax, eax
cmp	ebp, eax
jl	short loc_609689
mov	eax, ebp

loc_609689:
push	0Ch
push	eax
mov	eax, [esp+14h+arg_0]
push	edi
push	eax
call	sub_121B8C0
mov	ecx, [esp+1Ch+arg_4]
add	esp, 10h

loc_60969E:
mov	eax, [edi]
lea	ecx, [ecx+ecx*2]
lea	esi, [ebx+ebx*2]
add	ecx, ecx
add	esi, esi
add	ecx, ecx
push	ecx
add	esi, esi
lea	edx, [esi+eax]
push	edx
lea	ecx, [ebx+ebx*2+3]
lea	edx, [eax+ecx*4]
push	edx
call	sub_AD3070
mov	eax, [edi]
add	eax, esi
push	eax		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 14h
test	eax, eax
jz	short loc_6096E7
mov	ecx, [esp+0Ch+arg_8]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	ecx, [ecx+8]
mov	[eax+4], edx
mov	[eax+8], ecx

loc_6096E7:
pop	esi
mov	[edi+4], ebp
pop	ebp
pop	ebx
retn	0Ch
sub_609660 endp



; Attributes: bp-based frame

sub_6096F0 proc	near

var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 34h
push	ebx
push	esi
push	edi
lea	esp, [esp+0]

loc_609700:
mov	edi, [ebp+arg_8]
mov	ebx, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
lea	eax, [ebx+edi]
sar	eax, 1
lea	eax, [eax+eax*2]
mov	edx, [ecx+eax*4]
lea	eax, [ecx+eax*4]
mov	ecx, [eax+4]
mov	[esp+40h+var_20], edx
mov	edx, [eax+8]
mov	[esp+40h+var_1C], ecx
mov	[esp+40h+var_18], edx

loc_609729:
mov	ecx, [ebp+arg_0]
lea	eax, [ebx+ebx*2]
lea	eax, [ecx+eax*4]
lea	ecx, [esp+40h+var_20]
lea	esi, [esp+40h+var_26]
mov	[esp+40h+var_24], eax
call	sub_AAA3F0
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_609778
mov	eax, [esp+40h+var_24]
jmp	short loc_609758

loc_609754:
mov	eax, [esp+40h+var_24]

loc_609758:
add	eax, 0Ch
lea	ecx, [esp+40h+var_20]
lea	esi, [esp+40h+var_26]
inc	ebx
mov	[esp+40h+var_24], eax
call	sub_AAA3F0
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_609754

loc_609778:
mov	eax, [ebp+arg_0]
lea	edx, [edi+edi*2]
lea	ecx, [eax+edx*4]
lea	eax, [esp+40h+var_20]
lea	esi, [esp+40h+var_25]
mov	[esp+40h+var_24], ecx
call	sub_AAA3F0
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_6097C7
mov	ecx, [esp+40h+var_24]
jmp	short loc_6097A7

loc_6097A3:
mov	ecx, [esp+40h+var_24]

loc_6097A7:
sub	ecx, 0Ch
lea	eax, [esp+40h+var_20]
lea	esi, [esp+40h+var_25]
dec	edi
mov	[esp+40h+var_24], ecx
call	sub_AAA3F0
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_6097A3

loc_6097C7:
cmp	edi, ebx
jl	short loc_609817
jz	short loc_60980D
mov	ecx, [ebp+arg_0]
lea	edx, [edi+edi*2]
mov	esi, [ecx+edx*4+4]
lea	eax, [ecx+edx*4]
mov	[esp+40h+var_C], esi
mov	esi, [eax+8]
lea	edx, [ebx+ebx*2]
lea	ecx, [ecx+edx*4]
mov	edx, [eax]
mov	[esp+40h+var_8], esi
mov	esi, [ecx]
mov	[eax], esi
mov	esi, [ecx+4]
mov	[eax+4], esi
mov	esi, [ecx+8]
mov	[eax+8], esi
mov	eax, [esp+40h+var_C]
mov	[ecx], edx
mov	edx, [esp+40h+var_8]
mov	[ecx+4], eax
mov	[ecx+8], edx

loc_60980D:
dec	edi
inc	ebx
cmp	ebx, edi
jle	loc_609729

loc_609817:
mov	eax, [ebp+arg_4]
cmp	eax, edi
jge	short loc_609830
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_0]
push	ecx
push	edi
push	eax
push	edx
call	sub_6096F0
add	esp, 10h

loc_609830:
cmp	ebx, [ebp+arg_8]
jge	short loc_60983D
mov	[ebp+arg_4], ebx
jmp	loc_609700

loc_60983D:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6096F0 endp

align 10h



; int __cdecl sub_609850(int, float, float, float)
sub_609850 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	[esp+arg_4]
push	ecx		; float
fsub	[esp+4+arg_8]
fstp	[esp+4+arg_4]
fld	[esp+4+arg_4]
fstp	[esp+4+var_4]
call	sub_4E3520
fld	[esp+4+arg_C]
add	esp, 4
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_60988C
mov	al, 1
push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	esi
retn

loc_60988C:
xor	al, al
push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	esi
retn
sub_609850 endp

align 10h



sub_6098A0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6098D0
test	[esp+4+arg_0], 1
jz	short loc_6098CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6098CA:
mov	eax, edi
pop	edi
retn	4
sub_6098A0 endp




sub_6098D0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+60h]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_609903
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_609903:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_12838C0
sub_6098D0 endp

align 10h



sub_609920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+10h]
imul	eax, [esp+arg_4]
add	eax, [esp+arg_0]
mov	ecx, [ecx+60h]
fld	dword ptr [ecx+eax*4]
retn	8
sub_609920 endp

align 10h



; int __thiscall sub_609940(void *, char)
sub_609940 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F25E8
jz	short loc_609959
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_609959:
mov	eax, esi
pop	esi
retn	4
sub_609940 endp

align 10h



sub_609960 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A9A250
test	[esp+4+arg_0], 1
jz	short loc_60998A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60998A:
mov	eax, esi
pop	esi
retn	4
sub_609960 endp




sub_609990 proc	near
sub	ecx, 8
jmp	sub_609960
sub_609990 endp

align 10h



sub_6099A0 proc	near

arg_0= dword ptr  4

push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_6099C1
push	0
mov	ecx, edi
call	sub_4DCD10

loc_6099C1:
cmp	[esp+4+arg_0], 0
mov	dword ptr [esi], offset	off_15F1C64
jz	short loc_6099DB
push	8
mov	ecx, edi
call	sub_4DCD10
mov	byte ptr [esi+10h], 2

loc_6099DB:
mov	dword ptr [esi], offset	off_15F2618
lea	ecx, [esi+20h]
mov	dword ptr [esi+14h], offset off_15F1C44
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_609A04
push	8
mov	ecx, edi
call	sub_4DCD10
mov	byte ptr [esi+10h], 1

loc_609A04:
mov	eax, esi
pop	edi
retn	4
sub_6099A0 endp

align 10h



sub_609A10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	sub_4D7790
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_609A44
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_609A44:
mov	eax, esi
pop	esi
retn	4
sub_609A10 endp

align 10h



sub_609A50 proc	near
add	ecx, 14h
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+10h]
jmp	eax
sub_609A50 endp

align 10h



sub_609A70 proc	near

arg_0= dword ptr  4

push	esi
lea	esi, [edi+0Ch]
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F1A9C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_609A91
push	0
mov	ecx, esi
call	sub_4DCD10

loc_609A91:
push	1Ah
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F23DC
call	sub_4DCD10
push	1Dh
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F2654
call	sub_4DCD10
mov	eax, edi
pop	esi
retn	4
sub_609A70 endp

align 10h



sub_609AC0 proc	near
mov	dword ptr [eax], offset	off_15F2774
mov	edx, 80000000h
mov	ecx, 1
mov	[eax+6], cx
mov	[eax+10h], edx
xor	ecx, ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], edx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], edx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], edx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], edx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], edx
mov	[eax+50h], ecx
mov	[eax+54h], ecx
mov	[eax+58h], edx
mov	[eax+5Ch], ecx
mov	[eax+60h], ecx
mov	[eax+64h], edx
retn
sub_609AC0 endp

align 10h



sub_609B20 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+5Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	dword ptr [edi], offset	off_15F2774
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	ebp, 80000000h
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_609B77
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_609B77:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+50h]
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi]
mov	ecx, eax
mov	eax, [esi+4]
cmp	eax, ebx
mov	[esp+28h+var_10], ecx
jle	short loc_609BBD
lea	ebp, [edx+4]
mov	[esp+28h+var_14], eax

loc_609BA3:
mov	ecx, ebp
call	sub_AD3ED0
add	ebp, 8
sub	[esp+28h+var_14], 1
jnz	short loc_609BA3
mov	ecx, [esp+28h+var_10]
mov	ebp, 80000000h

loc_609BBD:
mov	eax, [esi+8]
mov	[esi+4], ebx
test	ebp, eax
jnz	short loc_609BDD
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_609BDD:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+44h]
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_609C17
mov	ecx, [esi]
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*2]
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
call	eax

loc_609C17:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+38h]
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_609C4F
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
mov	ebp, 80000000h

loc_609C4F:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+2Ch]
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_609C8B
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax
mov	ebp, 80000000h

loc_609C8B:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+20h]
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_609CBC
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_609CBC:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+14h]
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_609CF4
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
mov	ebp, 80000000h

loc_609CF4:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+8]
mov	[esp+28h+var_10], esi
mov	[esp+28h+var_4], ebx
push	esi
lea	ecx, [esp+2Ch+var_15]
mov	[esp+2Ch+var_15], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_609D2D
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_609D2D:
mov	[esi], ebx
mov	[esi+8], ebp
mov	[esp+28h+var_4], 0FFFFFFFFh
mov	ecx, edi
call	sub_4DA650
mov	ecx, [esp+28h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 18h
retn
sub_609B20 endp

align 10h



sub_609D60 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+20h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+18h+var_5]
mov	dword ptr [edi], offset	off_15F2784
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_609D9C
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_609D9C:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+14h]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_609DDA
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*2]
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_609DDA:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_609E11
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_609E11:
mov	ecx, edi
pop	edi
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_609D60 endp

align 10h



sub_609E30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_609B20
test	[esp+4+arg_0], 1
jz	short loc_609E5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_609E5A:
mov	eax, esi
pop	esi
retn	4
sub_609E30 endp




sub_609E60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_609D60
test	[esp+4+arg_0], 1
jz	short loc_609E8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_609E8A:
mov	eax, esi
pop	esi
retn	4
sub_609E60 endp




sub_609E90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_AA6430
test	[esp+4+arg_0], 1
jz	short loc_609EBC
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_609EBC:
mov	eax, esi
pop	esi
retn	4
sub_609E90 endp

align 10h



sub_609ED0 proc	near
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	edx, [ecx+20h]
mov	[eax+20h], edx
movaps	xmm0, xmmword ptr [ecx+30h]
movaps	xmmword	ptr [eax+30h], xmm0
mov	edx, [ecx+40h]
mov	[eax+40h], edx
mov	edx, [ecx+44h]
mov	[eax+44h], edx
movzx	edx, byte ptr [ecx+48h]
mov	[eax+48h], dl
movzx	edx, byte ptr [ecx+49h]
mov	[eax+49h], dl
mov	edx, [ecx+4Ch]
mov	[eax+4Ch], edx
mov	ecx, [ecx+50h]
mov	[eax+50h], ecx
retn
sub_609ED0 endp

align 10h


; Attributes: bp-based frame

sub_609F40 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 14h
mov	eax, [ebp+arg_0]
push	ebx
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, [esi]
mov	[eax], ecx
mov	edx, [esi+4]
mov	[eax+4], edx
mov	ecx, [esi+8]
mov	[eax+8], ecx
mov	edx, [esi+0Ch]
mov	[eax+0Ch], edx
mov	ecx, [esi+10h]
push	edi
lea	ebx, [eax+14h]
mov	[eax+10h], ecx
push	ebx
lea	ecx, [esp+24h+var_9]
mov	[esp+24h+var_9], 0
call	sub_4A00D0
mov	edi, [ebx+4]
mov	ecx, [esi+18h]
cmp	ecx, edi
mov	[esp+20h+var_4], ecx
mov	[esp+20h+var_8], edi
jg	short loc_609F96
mov	[esp+20h+var_8], ecx

loc_609F96:
mov	edx, [ebx+8]
and	edx, 3FFFFFFFh
cmp	edx, ecx
jge	short loc_609FBC
add	edx, edx
cmp	ecx, edx
jge	short loc_609FAB
mov	ecx, edx

loc_609FAB:
push	4
push	ecx
push	ebx
push	eax
call	sub_121B8C0
mov	ecx, [esp+30h+var_4]
add	esp, 10h

loc_609FBC:
mov	edx, [ebx]
sub	edi, ecx
xor	esi, esi
lea	ebx, [edx+ecx*4]
test	edi, edi
jle	short loc_609FE8
lea	esp, [esp+0]

loc_609FD0:
mov	ecx, [ebx+esi*4]
test	ecx, ecx
jz	short loc_609FDC
call	sub_AD6020

loc_609FDC:
mov	dword ptr [ebx+esi*4], 0
inc	esi
cmp	esi, edi
jl	short loc_609FD0

loc_609FE8:
mov	eax, [ebp+arg_4]
mov	edi, [eax+14h]
mov	eax, [ebp+arg_0]
mov	ebx, [esp+20h+var_8]
mov	esi, [eax+14h]
add	eax, 14h
test	ebx, ebx
jle	short loc_60A029
sub	edi, esi

loc_60A001:
mov	ecx, [edi+esi]
test	ecx, ecx
jz	short loc_60A00D
call	sub_AD60E0

loc_60A00D:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_60A018
call	sub_AD6020

loc_60A018:
mov	ecx, [edi+esi]
mov	[esi], ecx
add	esi, 4
sub	ebx, 1
jnz	short loc_60A001
mov	ebx, [esp+20h+var_8]

loc_60A029:
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	eax, [eax+14h]
add	ecx, 14h
mov	ecx, [ecx]
lea	edx, ds:0[ebx*4]
add	eax, edx
add	ecx, edx
mov	edx, [esp+20h+var_4]
sub	edx, [esp+20h+var_8]
test	edx, edx
jle	short loc_60A085
mov	ebx, ecx
mov	esi, eax
sub	ebx, eax
mov	[esp+20h+var_8], edx

loc_60A058:
lea	ecx, [ebx+esi]
push	ecx		; void *
push	4		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
mov	edi, eax
add	esp, 8
test	edi, edi
jz	short loc_60A07B
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_60A077
call	sub_AD60E0

loc_60A077:
mov	edx, [esi]
mov	[edi], edx

loc_60A07B:
add	esi, 4
sub	[esp+20h+var_8], 1
jnz	short loc_60A058

loc_60A085:
mov	eax, [ebp+arg_0]
mov	ecx, [esp+20h+var_4]
mov	edi, [ebp+arg_4]
mov	esi, [ebp+arg_0]
add	eax, 14h
lea	edx, [edi+20h]
mov	[eax+4], ecx
push	edx
lea	ecx, [esi+20h]
call	sub_4D67E0
movaps	xmm0, xmmword ptr [edi+30h]
pop	edi
movaps	xmmword	ptr [esi+30h], xmm0
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_609F40 endp

align 10h



sub_60A0C0 proc	near
sub	ecx, 10h
jmp	sub_609E90
sub_60A0C0 endp

align 10h



sub_60A0D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_60A110
test	[esp+4+arg_0], 1
jz	short loc_60A0FB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60A0FB:
mov	eax, esi
pop	esi
retn	4
sub_60A0D0 endp

align 10h



sub_60A110 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esp+1Ch+arg_0]
push	esi
push	edi
lea	esi, [ebp+0C8h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi]
mov	ecx, eax
mov	eax, [esi+4]
cmp	eax, ebx
mov	[esp+24h+var_10], ecx
jle	short loc_60A175
lea	edi, [edx+4]
mov	[esp+24h+var_14], eax
lea	esp, [esp+0]

loc_60A160:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	[esp+24h+var_14], 1
jnz	short loc_60A160
mov	ecx, [esp+24h+var_10]

loc_60A175:
mov	eax, [esi+8]
mov	edi, 80000000h
mov	[esi+4], ebx
test	edi, eax
jnz	short loc_60A19A
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_60A19A:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+84h]
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi]
mov	ecx, eax
mov	eax, [esi+4]
cmp	eax, ebx
mov	[esp+24h+var_10], ecx
jle	short loc_60A1E0
mov	edi, edx
mov	[esp+24h+var_14], eax

loc_60A1C8:
call	sub_607D30
add	edi, 40h
sub	[esp+24h+var_14], 1
jnz	short loc_60A1C8
mov	ecx, [esp+24h+var_10]
mov	edi, 80000000h

loc_60A1E0:
mov	eax, [esi+8]
mov	[esi+4], ebx
test	edi, eax
jnz	short loc_60A1FD
mov	edx, [ecx]
and	eax, 3FFFFFFFh
shl	eax, 6
push	eax
mov	eax, [esi]
push	eax
mov	eax, [edx+10h]
call	eax

loc_60A1FD:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+78h]
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi]
mov	ecx, eax
mov	eax, [esi+4]
cmp	eax, ebx
mov	[esp+24h+var_10], ecx
jle	short loc_60A240
mov	edi, edx
mov	[esp+24h+var_14], eax

loc_60A228:
call	sub_607C50
add	edi, 50h
sub	[esp+24h+var_14], 1
jnz	short loc_60A228
mov	ecx, [esp+24h+var_10]
mov	edi, 80000000h

loc_60A240:
mov	eax, [esi+8]
mov	[esi+4], ebx
test	edi, eax
jnz	short loc_60A265
mov	edx, [esi]
mov	edi, [ecx]
and	eax, 3FFFFFFFh
lea	eax, [eax+eax*4]
shl	eax, 4
push	eax
push	edx
mov	edx, [edi+10h]
call	edx
mov	edi, 80000000h

loc_60A265:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+6Ch]
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_60A2A0
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
shl	edx, 4
push	edx
push	ecx
mov	ecx, eax
mov	eax, [edi+10h]
call	eax
mov	edi, 80000000h

loc_60A2A0:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+60h]
mov	[esp+24h+var_10], esi
mov	dword ptr [esp+24h+var_4], ebx
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_60A2D9
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_60A2D9:
mov	[esi], ebx
mov	[esi+8], edi
mov	dword ptr [esp+24h+var_4], 0FFFFFFFFh
lea	esi, [ebp+54h]
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_60A317
and	edx, 3FFFFFFFh
shl	edx, 6
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_60A317:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+48h]
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_60A34A
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_60A34A:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+3Ch]
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_60A37B
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_60A37B:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+30h]
push	esi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_60A3B2
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_60A3B2:
lea	ecx, [ebp+10h]
mov	[esi], ebx
mov	[esi+8], edi
call	??1facet@locale@std@@UAE@XZ_0 ;	std::locale::facet::~facet(void)
mov	ecx, ebp
call	sub_4DA650
mov	ecx, [esp+24h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn	4
sub_60A110 endp

align 10h



sub_60A3E0 proc	near
sub	ecx, 10h
jmp	sub_60A0D0
sub_60A3E0 endp

align 10h



sub_60A3F0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	edx, [esi+30h]
mov	ecx, 20h
sub	ecx, edx
mov	eax, ebx
shr	eax, cl
push	edi
lea	ecx, ds:0[eax*8]
sub	ecx, eax
mov	eax, [esi+34h]
mov	edi, [eax+ecx*8+20h]
lea	eax, [eax+ecx*8]
test	edi, edi
jz	short loc_60A460
or	esi, 0FFFFFFFFh
mov	ecx, edx
shr	esi, cl
and	esi, ebx
imul	esi, [eax+24h]
add	esi, edi
cmp	byte ptr [eax+11h], 1
setz	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+10h+arg_0]
call	sub_4D4F20
lea	ecx, [esp+0Ch+arg_0]
call	sub_4D4F40
test	al, al
jz	short loc_60A457
movzx	eax, byte ptr [esi]
pop	edi
pop	esi
pop	ebx
retn	4

loc_60A457:
movzx	eax, word ptr [esi]
pop	edi
pop	esi
pop	ebx
retn	4

loc_60A460:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4
sub_60A3F0 endp

align 10h



sub_60A470 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_1210A50
test	[esp+4+arg_0], 1
jz	short loc_60A49A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60A49A:
mov	eax, edi
pop	edi
retn	4
sub_60A470 endp




sub_60A4A0 proc	near
push	esi
mov	esi, eax
push	edi
mov	edi, ecx
lea	ecx, [esi+0Ch]
mov	edx, 6
lea	eax, [edi+8]
sub	esi, edi

loc_60A4B3:
mov	edi, [ecx-0Ch]
mov	[eax-8], edi
mov	edi, [ecx-8]
mov	[eax-4], edi
mov	edi, [esi+eax]
mov	[eax], edi
mov	edi, [ecx]
mov	[eax+4], edi
dec	edx
add	ecx, 10h
add	eax, 10h
test	edx, edx
jg	short loc_60A4B3
pop	edi
pop	esi
retn
sub_60A4A0 endp

align 10h



sub_60A4E0 proc	near
push	esi
mov	esi, eax
push	edi
mov	edi, ecx
lea	ecx, [esi+0Ch]
mov	edx, 4
lea	eax, [edi+8]
sub	esi, edi

loc_60A4F3:
mov	edi, [ecx-0Ch]
mov	[eax-8], edi
mov	edi, [ecx-8]
mov	[eax-4], edi
mov	edi, [esi+eax]
mov	[eax], edi
mov	edi, [ecx]
mov	[eax+4], edi
dec	edx
add	ecx, 10h
add	eax, 10h
test	edx, edx
jg	short loc_60A4F3
pop	edi
pop	esi
retn
sub_60A4E0 endp

align 10h



sub_60A520 proc	near
sub	ecx, 10h
jmp	sub_60A470
sub_60A520 endp

align 10h



sub_60A530 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_AA43D0
test	[esp+4+arg_0], 1
jz	short loc_60A55C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60A55C:
mov	eax, esi
pop	esi
retn	4
sub_60A530 endp

align 10h



sub_60A570 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
push	edi
lea	ecx, [esi+30h]
call	sub_4D4F20
push	edi
lea	ecx, [esi+31h]
call	sub_4D4F20
push	edi
lea	ecx, [esi+32h]
call	sub_4D4F20
mov	[esi+18h], edi
mov	[esi+1Ch], edi
mov	[esi+20h], edi
mov	[esi+24h], edi
mov	[esi+28h], edi
pop	edi
mov	eax, esi
pop	esi
retn
sub_60A570 endp

align 10h



sub_60A5B0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+3Eh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, esi
pop	esi
retn
sub_60A5B0 endp

align 10h



sub_60A5D0 proc	near
push	esi
mov	esi, ecx
push	0
lea	ecx, [esi+10h]
call	sub_4D4F20
push	0
lea	ecx, [esi+11h]
call	sub_4D4F20
mov	eax, esi
pop	esi
retn
sub_60A5D0 endp

align 10h



sub_60A5F0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	dword ptr [edi], offset	off_15F2A50
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_60A634
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*2]
mov	edx, [esi]
add	ecx, ecx
push	ebp
mov	ebp, [eax]
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
push	edx
call	eax
pop	ebp

loc_60A634:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F2AC8
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_60A5F0 endp

align 10h



sub_60A660 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_AA1CA0
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60A660 endp

align 10h


; Attributes: bp-based frame

sub_60A6B0 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60A786
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_AA2190
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60A786:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_AA2190
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60A6B0 endp

align 10h


; Attributes: bp-based frame

sub_60A7C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_AA2410
cmp	esi, [edi]
jnb	short loc_60A820

loc_60A7F0:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60A7F0

loc_60A820:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60A858
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60A858:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60A7C0 endp



; Attributes: bp-based frame

sub_60A860 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	ecx
mov	edx, [ebp+arg_4]
push	ebx
mov	ebx, [ebp+arg_8]
push	esi
mov	esi, [ebp+arg_0]
push	edi

loc_60A873:
lea	ecx, [edx+ebx]
sar	ecx, 1
mov	ecx, [esi+ecx*4]
mov	eax, ebx
mov	edi, edx
nop

loc_60A880:
cmp	[esi+edi*4], ecx
jnb	short loc_60A88B

loc_60A885:
inc	edi
cmp	[esi+edi*4], ecx
jb	short loc_60A885

loc_60A88B:
cmp	ecx, [esi+eax*4]
jnb	short loc_60A896

loc_60A890:
dec	eax
cmp	ecx, [esi+eax*4]
jb	short loc_60A890

loc_60A896:
cmp	eax, edi
jl	short loc_60A8B4
jz	short loc_60A8AE
mov	ebx, [esi+edi*4]
mov	edx, [esi+eax*4]
mov	[esi+eax*4], ebx
mov	ebx, [ebp+arg_8]
mov	[esi+edi*4], edx
mov	edx, [ebp+arg_4]

loc_60A8AE:
dec	eax
inc	edi
cmp	edi, eax
jle	short loc_60A880

loc_60A8B4:
cmp	edx, eax
jge	short loc_60A8C7
mov	ecx, [ebp+arg_C]
push	ecx
push	eax
push	edx
push	esi
call	sub_60A860
add	esp, 10h

loc_60A8C7:
cmp	edi, ebx
jge	short loc_60A8D2
mov	edx, edi
mov	[ebp+arg_4], edx
jmp	short loc_60A873

loc_60A8D2:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60A860 endp

align 10h



sub_60A8E0 proc	near
mov	cl, [eax+0Ah]
mov	dl, cl
and	dl, 0Fh
shl	dl, 4
shr	cl, 4
or	cl, dl
movzx	edx, byte ptr [eax+9]
mov	[eax+0Ah], cl
mov	cl, [eax+8]
mov	[eax+8], dl
mov	[eax+9], cl
movzx	edx, dl
movzx	ecx, cl
lea	ecx, [edx+ecx-1]
movzx	edx, word ptr [eax]
push	esi
mov	si, [eax+ecx*2]
mov	[eax], si
mov	[eax+ecx*2], dx
movzx	edx, byte ptr [eax+8]
and	dl, [eax+9]
pop	esi
cmp	dl, 2
jnz	short locret_60A936
movzx	ecx, word ptr [eax+2]
mov	dx, [eax+4]
mov	[eax+2], dx
mov	[eax+4], cx

locret_60A936:
retn
sub_60A8E0 endp

align 10h



sub_60A940 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
test	[esp+4+arg_0], 1
jz	short loc_60A96B
test	esi, esi
jz	short loc_60A96B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	30h
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_60A96B:
mov	eax, esi
pop	esi
retn	4
sub_60A940 endp

align 10h



sub_60A980 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
test	[esp+4+arg_0], 1
jz	short loc_60A9AB
test	esi, esi
jz	short loc_60A9AB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	8
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_60A9AB:
mov	eax, esi
pop	esi
retn	4
sub_60A980 endp

align 10h



sub_60A9C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
test	[esp+4+arg_0], 1
jz	short loc_60A9EB
test	esi, esi
jz	short loc_60A9EB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	0Ch
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_60A9EB:
mov	eax, esi
pop	esi
retn	4
sub_60A9C0 endp

align 10h



sub_60AA00 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_60A5F0
test	[esp+4+arg_0], 1
jz	short loc_60AA2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60AA2A:
mov	eax, edi
pop	edi
retn	4
sub_60AA00 endp




sub_60AA30 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_AA1F00
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60AA30 endp

align 10h



sub_60AA80 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_AA2170
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60AA80 endp

align 10h



sub_60AAD0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_AA1F20
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60AAD0 endp

align 10h


; Attributes: bp-based frame

sub_60AB20 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60ABF6
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_1281990
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60ABF6:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_1281990
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60AB20 endp

align 10h



sub_60AC30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
push	edx
call	sub_AA1840
retn	10h
sub_60AC30 endp

align 10h


; Attributes: bp-based frame

sub_60AC50 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60AD2D
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_AA23E0
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60AD2D:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_AA23E0
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60AC50 endp

align 10h



sub_60AD60 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+30h]
mov	dword ptr [edi], offset	off_15F2BD8
call	sub_60ADB0
mov	ecx, edi
mov	dword ptr [edi], offset	off_15F2AC8
call	sub_4DA650
test	[esp+8+arg_0], 1
jz	short loc_60ADA1
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60ADA1:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_60AD60 endp

align 10h



sub_60ADB0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_60ADE7
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_60ADE7:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	ecx
retn
sub_60ADB0 endp

align 10h



sub_60AE00 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_120F140
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60AE00 endp

align 10h



sub_60AE50 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_120F120
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60AE50 endp

align 10h


; Attributes: bp-based frame

sub_60AEA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_120F300
cmp	esi, [edi]
jnb	short loc_60AF00

loc_60AED0:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60AED0

loc_60AF00:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60AF38
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60AF38:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60AEA0 endp




sub_60AF40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
push	edx
call	sub_120F090
retn	10h
sub_60AF40 endp

align 10h


; Attributes: bp-based frame

sub_60AF60 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60B03D
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_120F0F0
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60B03D:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_120F0F0
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60AF60 endp

align 10h



sub_60B070 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_A9CAA0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60B070 endp

align 10h



sub_60B0C0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_A9CFE0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60B0C0 endp

align 10h


; Attributes: bp-based frame

sub_60B110 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_A9D0F0
cmp	esi, [edi]
jnb	short loc_60B170

loc_60B140:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60B140

loc_60B170:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60B1A8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60B1A8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60B110 endp




sub_60B1B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
push	edx
call	sub_A9C6F0
retn	10h
sub_60B1B0 endp

align 10h


; Attributes: bp-based frame

sub_60B1D0 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60B2AD
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9CD50
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60B2AD:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_A9CD50
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60B1D0 endp

align 10h



sub_60B2E0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_60B310
test	[esp+4+arg_0], 1
jz	short loc_60B30A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60B30A:
mov	eax, edi
pop	edi
retn	4
sub_60B2E0 endp




sub_60B310 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_60B34D
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_60B34D:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F2AC8
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_60B310 endp

align 10h



sub_60B370 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_A9C910
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60B370 endp

align 10h



sub_60B3C0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_A9CE70
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60B3C0 endp

align 10h


; Attributes: bp-based frame

sub_60B410 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60B4E6
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9CBD0
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60B4E6:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_A9CBD0
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60B410 endp

align 10h



sub_60B520 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_120E280
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60B520 endp

align 10h



sub_60B570 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_120E2D0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60B570 endp

align 10h


; Attributes: bp-based frame

sub_60B5C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_120E450
cmp	esi, [edi]
jnb	short loc_60B620

loc_60B5F0:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60B5F0

loc_60B620:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60B658
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60B658:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60B5C0 endp




sub_60B660 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
push	edx
call	sub_120E390
retn	10h
sub_60B660 endp

align 10h


; Attributes: bp-based frame

sub_60B680 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60B75D
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_120E2A0
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60B75D:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_120E2A0
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60B680 endp

align 10h



sub_60B790 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+10h]
call	sub_60ADB0
mov	ecx, edi
mov	dword ptr [edi], offset	off_15F2AC8
call	sub_4DA650
test	[esp+8+arg_0], 1
jz	short loc_60B7CB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60B7CB:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_60B790 endp

align 10h



sub_60B7E0 proc	near
mov	eax, [esi]
mov	[edi], eax
mov	ecx, [esi+4]
mov	[edi+4], ecx
mov	edx, [esi+8]
mov	[edi+8], edx
mov	eax, [esi+0Ch]
mov	[edi+0Ch], eax
mov	ecx, [esi+10h]
push	ebx
mov	[edi+10h], ecx
lea	ebx, [edi+20h]
mov	ecx, ebx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm0, xmmword ptr [esi+30h]
movaps	xmm1, xmmword ptr [esi+40h]
movaps	xmm2, xmmword ptr [esi+50h]
movaps	xmm3, xmmword ptr [esi+20h]
movaps	xmmword	ptr [ebx], xmm3
movaps	xmmword	ptr [ebx+10h], xmm0
movaps	xmmword	ptr [ebx+20h], xmm1
movaps	xmmword	ptr [ebx+30h], xmm2
mov	eax, edi
pop	ebx
retn
sub_60B7E0 endp

align 10h



sub_60B830 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
mov	ebx, [esp+4+arg_0]
lea	ecx, [ebx+14h]
mov	[ebx], eax
mov	dword ptr [ebx+8], 0
mov	dword ptr [ebx+0Ch], 0
mov	dword ptr [ebx+4], 0FFFFFFFFh
mov	byte ptr [ebx+10h], 0
call	??0_Container_base@std@@QAE@XZ ; std::_Container_base::_Container_base(void)
mov	cl, [esp+4+arg_4]
mov	[ebx+18h], cl
lea	ecx, [ebx+20h]
mov	dword ptr [ebx+1Ch], 0
mov	byte ptr [ebx+1Ah], 0FFh
mov	byte ptr [ebx+19h], 7Fh
call	sub_AAD970
fld	ds:dword_15439C8
lea	eax, [ebx+14h]
fstp	dword ptr [ebx+4Ch]
mov	dl, bl
sub	dl, al
mov	[eax+5], dl
xor	eax, eax
mov	[ebx+12h], ax
mov	byte ptr [ebx+11h], 0
mov	eax, ebx
pop	ebx
retn	8
sub_60B830 endp

align 10h


; Attributes: bp-based frame

sub_60B8A0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	byte ptr -3Ch
var_38=	byte ptr -38h
var_20=	dword ptr -20h
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	edx, [ebp+arg_8]
sub	esp, 54h
push	ebx
push	esi
mov	esi, [ebp+arg_4]
push	edi
mov	edi, [ebp+arg_0]

loc_60B8B5:
lea	ecx, [esi+edx]
sar	ecx, 1
shl	ecx, 5
lea	eax, [ecx+edi]
mov	ebx, eax
sub	ebx, ecx
sub	ebx, edi
mov	[esp+60h+var_4C], edx
mov	[esp+60h+var_48], esi
mov	[esp+60h+var_44], 2
lea	ecx, [esp+ebx+60h+var_18]
lea	ebx, [ebx+0]

loc_60B8E0:
mov	ebx, [eax]
mov	[ecx-8], ebx
mov	ebx, [eax+4]
mov	[ecx-4], ebx
mov	ebx, [eax+8]
mov	[ecx], ebx
mov	ebx, [eax+0Ch]
mov	[ecx+4], ebx
mov	ebx, [esp+60h+var_44]
dec	ebx
add	eax, 10h
add	ecx, 10h
mov	[esp+60h+var_44], ebx
test	ebx, ebx
jg	short loc_60B8E0
mov	eax, [esp+60h+var_20]
lea	ecx, [ecx+0]

loc_60B910:
mov	ecx, esi
shl	ecx, 5
add	ecx, edi
cmp	[ecx], eax
jnb	short loc_60B92C
jmp	short loc_60B920
align 10h

loc_60B920:
add	ecx, 20h
inc	esi
cmp	[ecx], eax
jb	short loc_60B920
mov	[esp+60h+var_48], esi

loc_60B92C:
mov	ecx, edx
shl	ecx, 5
add	ecx, edi
cmp	eax, [ecx]
jnb	short loc_60B943

loc_60B937:
sub	ecx, 20h
dec	edx
cmp	eax, [ecx]
jb	short loc_60B937
mov	[esp+60h+var_4C], edx

loc_60B943:
cmp	edx, esi
jl	loc_60BA29
jz	loc_60BA17
shl	edx, 5
add	edx, edi
shl	esi, 5
add	esi, edi
lea	eax, [esp+60h+var_38]
mov	edi, edx
mov	ebx, eax
mov	[esp+60h+var_44], 2
lea	ecx, [edx+8]
sub	edi, ebx

loc_60B970:
mov	ebx, [edi+eax]
mov	[eax-8], ebx
mov	ebx, [ecx-4]
mov	[eax-4], ebx
mov	ebx, [ecx]
mov	[eax], ebx
mov	ebx, [ecx+4]
mov	[eax+4], ebx
mov	ebx, [esp+60h+var_44]
dec	ebx
add	ecx, 10h
add	eax, 10h
mov	[esp+60h+var_44], ebx
test	ebx, ebx
jg	short loc_60B970
mov	ebx, esi
mov	edi, 2
lea	ecx, [esi+0Ch]
lea	eax, [edx+8]
sub	ebx, edx
jmp	short loc_60B9B0
align 10h

loc_60B9B0:
mov	edx, [ecx-0Ch]
mov	[eax-8], edx
mov	edx, [ecx-8]
mov	[eax-4], edx
mov	edx, [ebx+eax]
mov	[eax], edx
mov	edx, [ecx]
mov	[eax+4], edx
dec	edi
add	ecx, 10h
add	eax, 10h
test	edi, edi
jg	short loc_60B9B0
lea	eax, [esi+8]
neg	esi
lea	edi, [esp+esi+60h+var_40]
mov	edx, 2
lea	ecx, [esp+60h+var_40]
lea	esi, [esp+esi+60h+var_3C]

loc_60B9E7:
mov	ebx, [ecx]
mov	[eax-8], ebx
mov	ebx, [ecx+4]
mov	[eax-4], ebx
mov	ebx, [edi+eax]
mov	[eax], ebx
mov	ebx, [esi+eax]
mov	[eax+4], ebx
dec	edx
add	ecx, 10h
add	eax, 10h
test	edx, edx
jg	short loc_60B9E7
mov	edi, [ebp+arg_0]
mov	edx, [esp+60h+var_4C]
mov	esi, [esp+60h+var_48]
mov	eax, [esp+60h+var_20]

loc_60BA17:
dec	edx
inc	esi
cmp	esi, edx
mov	[esp+60h+var_4C], edx
mov	[esp+60h+var_48], esi
jle	loc_60B910

loc_60BA29:
mov	eax, [ebp+arg_4]
cmp	eax, edx
jge	short loc_60BA3F
mov	ecx, [ebp+arg_C]
push	ecx
push	edx
push	eax
push	edi
call	sub_60B8A0
add	esp, 10h

loc_60BA3F:
mov	edx, [ebp+arg_8]
cmp	esi, edx
jge	short loc_60BA4E
mov	[ebp+arg_4], esi
jmp	loc_60B8B5

loc_60BA4E:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60B8A0 endp

align 10h


; Attributes: bp-based frame

sub_60BA60 proc	near

var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 24h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
nop

loc_60BA70:
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
mov	edi, ecx
add	ecx, eax
sar	ecx, 1
mov	ebx, [esi+ecx*8+4]
mov	edx, [esi+ecx*8]
mov	[esp+30h+var_C], ebx

loc_60BA87:
mov	ecx, [esi+edi*8]
cmp	ecx, edx
jb	short loc_60BA96
jnz	short loc_60BAA0
cmp	[esi+edi*8+4], ebx
jnb	short loc_60BAA0

loc_60BA96:
inc	edi
jmp	short loc_60BA87
align 10h

loc_60BAA0:
mov	ecx, [esi+eax*8]
cmp	edx, ecx
jb	short loc_60BAAF
jnz	short loc_60BAB2
cmp	ebx, [esi+eax*8+4]
jnb	short loc_60BAB2

loc_60BAAF:
dec	eax
jmp	short loc_60BAA0

loc_60BAB2:
cmp	eax, edi
jl	short loc_60BAE3
jz	short loc_60BADD
mov	ebx, [esi+eax*8+4]
mov	[esp+30h+var_1C], ebx
mov	ebx, [esi+edi*8]
mov	[esi+eax*8], ebx
mov	ebx, [esi+edi*8+4]
mov	[esi+eax*8+4], ebx
mov	ebx, [esp+30h+var_C]
mov	[esi+edi*8], ecx
mov	ecx, [esp+30h+var_1C]
mov	[esi+edi*8+4], ecx

loc_60BADD:
dec	eax
inc	edi
cmp	edi, eax
jle	short loc_60BA87

loc_60BAE3:
mov	ecx, [ebp+arg_4]
cmp	ecx, eax
jge	short loc_60BAF9
mov	edx, [ebp+arg_C]
push	edx
push	eax
push	ecx
push	esi
call	sub_60BA60
add	esp, 10h

loc_60BAF9:
cmp	edi, [ebp+arg_8]
jge	short loc_60BB06
mov	[ebp+arg_4], edi
jmp	loc_60BA70

loc_60BB06:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60BA60 endp

align 10h



sub_60BB10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F2F08
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
test	[esp+4+arg_0], 1
jz	short loc_60BB3D
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	8
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_60BB3D:
mov	eax, esi
pop	esi
retn	4
sub_60BB10 endp

align 10h



sub_60BB50 proc	near

var_8= dword ptr -8

push	esi
mov	esi, ecx
push	0
lea	ecx, [esi+8]
call	sub_4D4F20
fld	ds:dword_15FCC88
push	ecx
lea	ecx, [esi+10h]
fstp	[esp+8+var_8]
call	sub_4D6890
mov	ecx, esi
pop	esi
jmp	sub_4D8760
sub_60BB50 endp

align 10h



sub_60BB80 proc	near

var_8= dword ptr -8

push	edi
mov	ecx, esi
call	sub_4D8780
lea	edi, [esi+8]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F2F18
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	0
mov	ecx, edi
call	sub_4D4F20
fld	ds:dword_15FCC88
push	ecx
lea	ecx, [esi+10h]
fstp	[esp+8+var_8]
call	sub_4D6890
mov	ecx, esi
call	sub_4D8760
mov	eax, esi
pop	edi
retn
sub_60BB80 endp

align 10h



sub_60BBC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F2F18
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
test	[esp+4+arg_0], 1
jz	short loc_60BBED
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	30h
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_60BBED:
mov	eax, esi
pop	esi
retn	4
sub_60BBC0 endp

align 10h



sub_60BC00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
fld	dword ptr [esi+3030h]
push	edi
mov	edi, [esp+8+arg_0]
fld	dword ptr [edi+1030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60BC41
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esi+3050h]
push	edx
mov	edx, [esi+4]
push	edx
call	eax
lea	ecx, [esi+3010h]
lea	eax, [edi+1010h]
push	ecx
call	sub_60BC70

loc_60BC41:
mov	edx, [edi]
mov	[esi], edx
mov	esi, [esi+3080h]
test	esi, esi
jz	short loc_60BC61
push	1008h
add	edi, 4
push	edi
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_60BC61:
pop	edi
pop	esi
retn	4
sub_60BC00 endp

align 10h



sub_60BC70 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, eax
push	esi
mov	ecx, ebx
call	sub_4D9C70
mov	eax, [esi+20h]
mov	[ebx+20h], eax
mov	ecx, [esi+24h]
mov	[ebx+24h], ecx
mov	edx, [esi+30h]
mov	[ebx+30h], edx
mov	eax, [esi+34h]
mov	[ebx+34h], eax
mov	ecx, [esi+38h]
mov	[ebx+38h], ecx
mov	edx, [esi+3Ch]
add	esi, 40h
lea	edi, [ebx+40h]
mov	[ebx+3Ch], edx
mov	ecx, 0Ch
rep movsd
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	4
sub_60BC70 endp

align 10h


; Attributes: bp-based frame

sub_60BCC0 proc	near

var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= byte ptr -208h
var_204= dword ptr -204h
var_200= byte ptr -200h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 234h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	eax, [edi]
mov	[esp+240h+var_22C], ecx
lea	ecx, [eax+0Ch]
mov	[esp+240h+var_228], edi
mov	[esp+240h+var_224], ebx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	esi, [ebp+arg_10]
cmp	eax, 17h
jnz	short loc_60BD52
movzx	ecx, byte ptr [esi+8]
movzx	ebx, byte ptr [esi+1]
mov	eax, 1
cmp	ecx, eax
jle	short loc_60BD22
jmp	short loc_60BD10
align 10h

loc_60BD10:
movzx	edx, byte ptr [esi+eax*2+1]
cmp	edx, ebx
jnz	loc_60BDE9
inc	eax
cmp	eax, ecx
jl	short loc_60BD10

loc_60BD22:
mov	eax, [edi]
lea	ecx, [eax+14h]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+240h+var_200]
push	edx
push	ebx
call	eax
mov	ecx, [edi+8]
lea	edx, [esp+240h+var_220]
mov	[esp+240h+var_21C], ebx
mov	ebx, [ebp+arg_4]
mov	[esp+240h+var_214], edi
mov	[esp+240h+var_218], ecx
mov	[esp+240h+var_220], eax
mov	[esp+240h+var_228], edx

loc_60BD52:
mov	eax, [ebx]
lea	ecx, [eax+0Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, 17h
jnz	short loc_60BDBB
movzx	eax, byte ptr [esi+8]
movzx	ecx, byte ptr [esi+9]
movzx	edx, byte ptr [esi+8]
movzx	edi, byte ptr [esi+eax*2+1]
inc	eax
add	ecx, edx
cmp	eax, ecx
jge	short loc_60BD8E
lea	esp, [esp+0]

loc_60BD80:
movzx	edx, byte ptr [esi+eax*2+1]
cmp	edx, edi
jnz	short loc_60BDE9
inc	eax
cmp	eax, ecx
jl	short loc_60BD80

loc_60BD8E:
mov	eax, [ebx]
lea	ecx, [eax+14h]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+240h+var_200]
push	edx
push	edi
call	eax
mov	ecx, [ebx+8]
lea	edx, [esp+240h+var_210]
mov	[esp+240h+var_204], ebx
mov	dword ptr [esp+240h+var_208], ecx
mov	[esp+240h+var_210], eax
mov	[esp+240h+var_20C], edi
mov	[esp+240h+var_224], edx

loc_60BDBB:
mov	eax, [esp+240h+var_22C]
mov	ecx, [eax+0Ch]
mov	eax, [ebp+arg_14]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	eax
mov	eax, [ebp+arg_C]
push	esi
push	eax
mov	eax, [ebp+arg_8]
push	eax
mov	eax, [esp+250h+var_224]
push	eax
mov	eax, [esp+254h+var_228]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h

loc_60BDE9:
mov	ecx, [esp+240h+var_22C]
push	1
add	ecx, 10h
call	sub_4D4F20
pop	edi
pop	esi
mov	eax, 0FFFFh
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h
sub_60BCC0 endp

align 10h



sub_60BE10 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+10h]
jmp	eax
sub_60BE10 endp

align 10h



sub_60BE20 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+14h]
jmp	eax
sub_60BE20 endp

align 10h



sub_60BE30 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+18h]
jmp	eax
sub_60BE30 endp

align 10h



sub_60BE40 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	edx, [eax+24h]
jmp	edx
sub_60BE40 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_60BE50(int,	int, int, int, float, int, int,	int, int)
sub_60BE50 proc	near

var_254= dword ptr -254h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= byte ptr -208h
var_204= dword ptr -204h
var_200= byte ptr -200h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 234h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	eax, [edi]
mov	[esp+240h+var_22C], ecx
lea	ecx, [eax+0Ch]
mov	[esp+240h+var_228], edi
mov	[esp+240h+var_224], ebx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	esi, [ebp+arg_18]
cmp	eax, 17h
jnz	short loc_60BEE2
movzx	ecx, byte ptr [esi+8]
movzx	ebx, byte ptr [esi+1]
mov	eax, 1
cmp	ecx, eax
jle	short loc_60BEB2
jmp	short loc_60BEA0
align 10h

loc_60BEA0:
movzx	edx, byte ptr [esi+eax*2+1]
cmp	edx, ebx
jnz	loc_60BF88
inc	eax
cmp	eax, ecx
jl	short loc_60BEA0

loc_60BEB2:
mov	eax, [edi]
lea	ecx, [eax+14h]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+240h+var_200]
push	edx
push	ebx
call	eax
mov	ecx, [edi+8]
lea	edx, [esp+240h+var_220]
mov	[esp+240h+var_21C], ebx
mov	ebx, [ebp+arg_4]
mov	[esp+240h+var_214], edi
mov	[esp+240h+var_218], ecx
mov	[esp+240h+var_220], eax
mov	[esp+240h+var_228], edx

loc_60BEE2:
mov	eax, [ebx]
lea	ecx, [eax+0Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, 17h
jnz	short loc_60BF4B
movzx	eax, byte ptr [esi+8]
movzx	ecx, byte ptr [esi+9]
movzx	edx, byte ptr [esi+8]
movzx	edi, byte ptr [esi+eax*2+1]
inc	eax
add	ecx, edx
cmp	eax, ecx
jge	short loc_60BF1E
lea	esp, [esp+0]

loc_60BF10:
movzx	edx, byte ptr [esi+eax*2+1]
cmp	edx, edi
jnz	short loc_60BF88
inc	eax
cmp	eax, ecx
jl	short loc_60BF10

loc_60BF1E:
mov	eax, [ebx]
lea	ecx, [eax+14h]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+240h+var_200]
push	edx
push	edi
call	eax
mov	ecx, [ebx+8]
lea	edx, [esp+240h+var_210]
mov	[esp+240h+var_204], ebx
mov	dword ptr [esp+240h+var_208], ecx
mov	[esp+240h+var_210], eax
mov	[esp+240h+var_20C], edi
mov	[esp+240h+var_224], edx

loc_60BF4B:
mov	eax, [esp+240h+var_22C]
fld	[ebp+arg_10]
mov	ecx, [eax+0Ch]
mov	eax, [ebp+arg_20]
mov	edx, [ecx]
push	eax
mov	eax, [ebp+arg_1C]
mov	edx, [edx+1Ch]
push	eax
mov	eax, [ebp+arg_14]
push	esi
push	eax
mov	eax, [ebp+arg_C]
push	ecx
fstp	[esp+254h+var_254]
push	eax
mov	eax, [ebp+arg_8]
push	eax
mov	eax, [esp+25Ch+var_224]
push	eax
mov	eax, [esp+260h+var_228]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	24h

loc_60BF88:
mov	ecx, [esp+240h+var_22C]
push	1
add	ecx, 10h
call	sub_4D4F20
pop	edi
pop	esi
mov	eax, 1
pop	ebx
mov	esp, ebp
pop	ebp
retn	24h
sub_60BE50 endp

align 10h



sub_60BFB0 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+20h]
jmp	eax
sub_60BFB0 endp

align 10h



sub_60BFC0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_120B790
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60BFC0 endp

align 10h



sub_60C010 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_120B580
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60C010 endp

align 10h



sub_60C060 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_120B6E0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60C060 endp

align 10h



sub_60C0B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_120B190
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60C0B0 endp

align 10h


; Attributes: bp-based frame

sub_60C100 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60C1D6
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_120B3F0
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60C1D6:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_120B3F0
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60C100 endp

align 10h


; Attributes: bp-based frame

sub_60C210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_120B7B0
cmp	esi, [edi]
jnb	short loc_60C270

loc_60C240:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60C240

loc_60C270:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60C2A8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60C2A8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60C210 endp




sub_60C2B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
push	edx
call	sub_120B700
retn	10h
sub_60C2B0 endp

align 10h


; Attributes: bp-based frame

sub_60C2D0 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60C3AD
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_120B760
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60C3AD:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_120B760
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60C2D0 endp

align 10h



sub_60C3E0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	dword ptr [edi], offset	off_15F3048
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_60C419
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_60C419:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F2AC8
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_60C3E0 endp

align 10h


; Attributes: bp-based frame

sub_60C440 proc	near

var_D4=	dword ptr -0D4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	xmmword	ptr -0ACh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	xmmword	ptr -90h
var_80=	xmmword	ptr -80h
var_70=	xmmword	ptr -70h
var_60=	xmmword	ptr -60h
var_50=	xmmword	ptr -50h
var_40=	byte ptr -40h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0C4h
push	ebx
push	esi
mov	ebx, ecx
push	edi
mov	dword ptr [esp+0D0h+var_AC+4], ebx
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+0D4h+var_BD]
call	sub_4D4F20
lea	ecx, [esp+0D0h+var_BD]
call	sub_4D4F40
test	al, al
jz	short loc_60C49B
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	aTtheightfield ; "TtHeightField"
rdtsc
mov	[esp+0D0h+var_B8], eax
mov	eax, [esp+0D0h+var_B8]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60C49B:
mov	esi, [ebp+arg_0]
mov	ecx, [esi]
mov	edi, [ebp+arg_4]
mov	edx, [edi]
mov	[esp+0D0h+var_BC], ecx
lea	ecx, [esp+0D0h+var_90]
mov	dword ptr [esp+0D0h+var_AC], edx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, [esi+8]
mov	ecx, [edi+8]
push	eax
push	ecx
lea	ecx, [esp+0D8h+var_90]
call	sub_1255540
mov	ebx, [ebx+10h]
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	edi, [eax]
mov	esi, ebx
shl	esi, 4
add	esi, 7Fh
and	esi, 0FFFFFF80h
lea	edx, [esi+edi]
mov	[eax], edx
mov	eax, dword ptr [esp+0D0h+var_AC+4]
mov	ecx, [eax+0Ch]
mov	[esp+0D0h+var_B4], ecx
mov	ecx, [esp+0D0h+var_BC]
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
mov	dword ptr [esp+0D4h+var_AC+8], edi
call	eax
mov	ecx, edi
mov	[esp+0D0h+var_BC], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [esp+0D0h+var_BC]
mov	[esp+0D0h+var_B0], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esp+0D0h+var_40]
mov	[esp+0D0h+var_B8], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	edx, [esp+0D0h+var_B0]
movaps	xmm2, [esp+0D0h+var_90]
movaps	xmm3, [esp+0D0h+var_80]
movaps	xmm4, [esp+0D0h+var_70]
movaps	xmm5, [esp+0D0h+var_60]
lea	ecx, [ebx-1]
mov	eax, ecx
shl	eax, 4
add	eax, [esp+0D0h+var_B8]
sub	edx, [esp+0D0h+var_B8]
mov	[esp+0D0h+var_BC], ecx
jmp	short loc_60C560
align 10h

loc_60C560:
movaps	xmm1, xmmword ptr [eax]
movaps	xmm0, xmm1
shufps	xmm0, xmm1, 55h
mulps	xmm0, xmm3
movaps	xmm6, xmm1
shufps	xmm6, xmm1, 0
mulps	xmm6, xmm2
addps	xmm0, xmm6
movaps	xmm6, xmm1
shufps	xmm6, xmm1, 0AAh
mulps	xmm6, xmm4
addps	xmm6, xmm5
addps	xmm0, xmm6
movaps	xmm6, xmm0
unpckhps xmm0, xmm1
shufps	xmm6, xmm0, 0C4h
movaps	xmmword	ptr [edx+eax], xmm6
dec	ecx
sub	eax, 10h
test	ecx, ecx
jge	short loc_60C560
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	edx, [eax]
mov	ecx, dword ptr [esp+0D0h+var_AC]
add	esi, edx
mov	[eax], esi
mov	esi, [ebp+arg_8]
mov	eax, [ecx]
fld	dword ptr [esi+8]
mov	eax, [eax+2Ch]
fstp	[esp+0D0h+var_98]
push	edx
mov	[esp+0D4h+var_B8], edx
lea	edx, [esp+0D4h+var_AC+0Ch]
push	edx
mov	dword ptr [esp+0D8h+var_AC+0Ch], edi
mov	[esp+0D8h+var_9C], ebx
call	eax
fld	dword ptr [esi+8]
mov	eax, [esp+0D0h+var_BC]
fstp	[esp+0D0h+var_B0]
mov	ebx, [esp+0D0h+var_B8]
mov	[esp+0D0h+var_BC], eax
test	eax, eax
jl	loc_60C78E
mov	esi, edi
sub	esi, ebx
mov	dword ptr [esp+0D0h+var_AC], esi
jmp	short loc_60C604
align 10h

loc_60C600:
mov	esi, dword ptr [esp+0D0h+var_AC]

loc_60C604:
fld	dword ptr [ebx+0Ch]
fld	[esp+0D0h+var_B0]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_60C650
mov	ecx, [esp+0D0h+var_B4]
movzx	eax, word ptr [ecx]
mov	edx, 0FFFFh
cmp	ax, dx
jz	loc_60C77B
mov	esi, [ebp+arg_C]
mov	ecx, dword ptr [esp+0D0h+var_AC+4]
mov	esi, [esi+4]
mov	ecx, [ecx+8]
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+14h]
call	eax
mov	edx, [esp+0D0h+var_B4]
mov	ecx, 0FFFFh
mov	[edx], cx
jmp	loc_60C77B

loc_60C650:
mov	eax, [ebp+arg_C]
mov	edi, [eax]
add	esi, ebx
mov	ecx, esi
call	sub_4D8400
fchs
push	ecx
lea	ecx, [esp+0D4h+var_AC+0Ch]
fstp	[esp+0D4h+var_D4]
call	sub_4D5090
mov	ecx, esi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [ebx]
movaps	xmm0, [esp+0D0h+var_AC+0Ch]
mov	ecx, [ebp+arg_4]
mov	esi, [ecx+8]
shufps	xmm0, xmm0, 0
mulps	xmm0, xmm1
movaps	xmm1, xmmword ptr [eax]
addps	xmm0, xmm1
mov	ecx, edi
movaps	[esp+0D0h+var_50], xmm0
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm0, [esp+0D0h+var_50]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm3, xmmword ptr [esi]
mov	edx, [ebp+arg_4]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
mulps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0
mulps	xmm2, xmm3
addps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0AAh
movaps	xmm0, xmmword ptr [esi+20h]
mulps	xmm2, xmm0
movaps	xmm0, xmmword ptr [esi+30h]
addps	xmm2, xmm0
addps	xmm1, xmm2
movaps	xmmword	ptr [eax], xmm1
mov	esi, [edx+8]
mov	ecx, edi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [ebx]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm3, xmmword ptr [esi]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
mulps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0
mulps	xmm2, xmm3
addps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0AAh
movaps	xmm0, xmmword ptr [esi+20h]
mulps	xmm2, xmm0
addps	xmm1, xmm2
movaps	xmmword	ptr [eax], xmm1
fld	dword ptr [ebx+0Ch]
push	ecx
mov	ecx, edi
fstp	[esp+0D4h+var_D4]
call	sub_4D6890
mov	esi, [esp+0D0h+var_B4]
mov	eax, 0FFFFh
cmp	[esi], ax
mov	eax, [ebp+arg_C]
jnz	short loc_60C76E
mov	ecx, dword ptr [esp+0D0h+var_AC+4]
mov	ecx, [ecx+8]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	edi
push	0
push	eax
mov	eax, [ebp+arg_8]
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	edx
mov	ecx, 0FFFFh
mov	[esi], ax
cmp	ax, cx
jz	short loc_60C771
mov	eax, [ebp+arg_C]

loc_60C76E:
add	dword ptr [eax], 30h

loc_60C771:
movzx	edx, word ptr [esi]
mov	[edi+20h], edx
mov	edi, dword ptr [esp+0D0h+var_AC+8]

loc_60C77B:
add	[esp+0D0h+var_B4], 2
add	ebx, 10h
sub	[esp+0D0h+var_BC], 1
jns	loc_60C600

loc_60C78E:
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [esp+0D0h+var_B8]
mov	[eax], ecx
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	[eax], edi
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	edx, [esi+4]
cmp	edx, [esi+0Ch]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+0D4h+var_BD]
call	sub_4D4F20
lea	ecx, [esp+0D0h+var_BD]
call	sub_4D4F40
test	al, al
jz	short loc_60C7F4
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+0D0h+var_BC], eax
mov	edx, [esp+0D0h+var_BC]
mov	[ecx+4], edx
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60C7F4:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_60C440 endp

align 10h


; Attributes: bp-based frame

sub_60C800 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_44=	dword ptr -44h
var_40=	xmmword	ptr -40h
var_30=	byte ptr -30h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 44h
push	ebx
mov	ebx, [ebp+arg_4]
fld	dword ptr [ebx+10h]
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	esi, ecx
mov	eax, [esi+40h]
push	ecx
lea	ecx, [esp+54h+var_40]
fstp	[esp+54h+var_54]
mov	[esp+54h+var_10], eax
mov	[esp+54h+var_C], edi
call	sub_4D5090
lea	ecx, [esp+50h+var_30]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm0, [esp+50h+var_40]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [esi+30h]
mulps	xmm1, xmm0
movaps	xmm0, xmmword ptr [esi+10h]
addps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
mov	edi, [edi+8]
lea	ecx, [esp+50h+var_30]
call	sub_4D69E0
movaps	xmm0, xmmword ptr [ebx]
movaps	xmm2, xmmword ptr [edi+10h]
movaps	xmm3, xmmword ptr [edi]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
mulps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0
mulps	xmm2, xmm3
addps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0AAh
movaps	xmm0, xmmword ptr [edi+20h]
mulps	xmm2, xmm0
addps	xmm1, xmm2
movaps	xmmword	ptr [eax], xmm1
fld	dword ptr [esi+20h]
push	ecx
fchs
lea	ecx, [esp+54h+var_40]
fstp	[esp+54h+var_54]
call	sub_4D5090
lea	ecx, [esp+50h+var_30]
call	sub_4D69E0
lea	ecx, [esp+50h+var_30]
mov	edi, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm0, [esp+50h+var_40]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [edi]
mulps	xmm1, xmm0
movaps	xmm0, xmmword ptr [eax]
addps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
fld	dword ptr [ebx+10h]
push	ecx
lea	ecx, [esp+54h+var_30]
fstp	[esp+54h+var_54]
call	sub_4D6890
mov	ecx, [esi+44h]
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+50h+var_30]
push	eax
call	edx
mov	eax, [esi+44h]
fld	dword ptr [eax+4]
sub	esp, 8
fstp	[esp+58h+var_44]
fld	dword ptr [esi+4]
fstp	[esp+58h+var_54]
fld	[esp+58h+var_44]
fstp	[esp+58h+var_58]
call	sub_4DDB10
fstp	dword ptr [esi+4]
add	esp, 8
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_60C800 endp

align 10h



sub_60C930 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_120A2C0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60C930 endp

align 10h



sub_60C980 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_120A020
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60C980 endp

align 10h



sub_60C9D0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_120A000
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60C9D0 endp

align 10h



sub_60CA20 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_1209B80
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60CA20 endp

align 10h


; Attributes: bp-based frame

sub_60CA70 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60CB46
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_120A2E0
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60CB46:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_120A2E0
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60CA70 endp

align 10h


; Attributes: bp-based frame

sub_60CB80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_60C440
cmp	esi, [edi]
jnb	short loc_60CBE0

loc_60CBB0:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60CBB0

loc_60CBE0:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60CC18
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60CC18:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60CB80 endp



; Attributes: bp-based frame

sub_60CC20 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60CCFD
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_120A690
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60CCFD:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_120A690
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60CC20 endp

align 10h



sub_60CD30 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_60C3E0
test	[esp+4+arg_0], 1
jz	short loc_60CD5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60CD5A:
mov	eax, edi
pop	edi
retn	4
sub_60CD30 endp




sub_60CD60 proc	near
movaps	xmm0, xmmword ptr [eax+50h]
movaps	xmmword	ptr [eax+0C0h],	xmm0
movaps	xmm0, xmmword ptr [eax+20h]
movaps	xmm1, xmmword ptr [eax+30h]
movaps	xmm4, xmmword ptr [eax+40h]
movaps	xmm2, xmm0
unpcklps xmm2, xmm1
unpckhps xmm0, xmm1
movaps	xmm3, xmm2
movlhps	xmm3, xmm4
movaps	xmm5, xmm0
movaps	xmm0, xmmword ptr [eax+0C0h]
movaps	xmm1, xmm3
movhlps	xmm1, xmm2
shufps	xmm1, xmm4, 0D4h
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 55h
mulps	xmm2, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
mulps	xmm1, xmm3
addps	xmm2, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0AAh
shufps	xmm5, xmm4, 0E4h
mulps	xmm1, xmm5
addps	xmm2, xmm1
movaps	xmmword	ptr [eax+0D0h],	xmm2
retn
sub_60CD60 endp

align 10h


; Attributes: bp-based frame

sub_60CDD0 proc	near

var_134= dword ptr -134h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11A= byte ptr -11Ah
var_119= byte ptr -119h
var_118= qword ptr -118h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= xmmword ptr -100h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	xmmword	ptr -0E0h
var_D0=	xmmword	ptr -0D0h
var_C0=	xmmword	ptr -0C0h
var_B0=	byte ptr -0B0h
var_A0=	xmmword	ptr -0A0h
var_90=	xmmword	ptr -90h
var_80=	xmmword	ptr -80h
var_70=	xmmword	ptr -70h
var_60=	xmmword	ptr -60h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 124h
push	ebx
push	esi
push	edi
mov	[esp+130h+var_104], ecx
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+134h+var_119]
call	sub_4D4F20
lea	ecx, [esp+130h+var_119]
call	sub_4D4F40
test	al, al
jz	short loc_60CE29
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	aTtspherecapsul	; "TtSphereCapsule"
rdtsc
mov	[esp+130h+var_10C], eax
mov	eax, [esp+130h+var_10C]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60CE29:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_C]
mov	edi, [ecx]
mov	edx, [eax]
mov	ecx, [ebp+arg_4]
mov	ebx, [eax+8]
mov	esi, [ecx+8]
mov	[esp+130h+var_110], edx
mov	edx, [ecx]
lea	ecx, [esp+130h+var_40]
mov	[esp+130h+var_108], edx
add	ebx, 30h
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [esi]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm3, xmmword ptr [esi+20h]
movaps	xmm4, xmmword ptr [esi+30h]
mov	esi, [esp+130h+var_108]
movaps	[esp+130h+var_40], xmm1
movaps	[esp+130h+var_30], xmm2
movaps	[esp+130h+var_20], xmm3
movaps	[esp+130h+var_10], xmm4
mov	eax, 1
lea	edx, [esp+130h+var_C0]
lea	ecx, [esi+30h]

loc_60CE94:
movaps	xmm0, xmmword ptr [ecx]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx], xmm5
dec	eax
sub	ecx, 10h
sub	edx, 10h
test	eax, eax
jge	short loc_60CE94
lea	eax, [esp+130h+var_90]
push	eax
lea	ecx, [esp+134h+var_C0]
push	ecx
lea	edx, [esp+138h+var_D0]
push	edx
push	ebx
call	sub_1254DC0
movaps	xmm0, xmmword ptr [ebx]
movaps	xmm1, [esp+140h+var_90]
subps	xmm0, xmm1
add	esp, 10h
mov	ecx, esi
movaps	[esp+130h+var_100], xmm0
call	sub_4D78D0
fstp	[esp+130h+var_118]
mov	ecx, [esp+130h+var_110]
call	sub_4D78D0
fadd	[esp+130h+var_118]
mov	eax, [ebp+arg_8]
movaps	xmm0, [esp+130h+var_100]
mulps	xmm0, xmm0
fstp	[esp+130h+var_110]
fld	dword ptr [eax+8]
movaps	xmm1, xmm0
fadd	[esp+130h+var_110]
lea	ecx, [esp+130h+var_60]
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
addss	xmm1, xmm0
fstp	[esp+130h+var_120]
shufps	xmm2, xmm0, 0AAh
push	ecx
addss	xmm2, xmm1
lea	ecx, [esp+134h+var_B0]
movaps	[esp+134h+var_60], xmm2
call	sub_4D5050
lea	ecx, [esp+130h+var_B0]
call	sub_4D50D0
fstp	[esp+130h+var_124]
fld	[esp+130h+var_120]
fld	[esp+130h+var_124]
fld	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+130h+var_120]
fld	[esp+130h+var_120]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_60D219
fldz
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_60CFC2
fstp	st
push	ecx		; float
fstp	[esp+134h+var_134]
call	sub_4D5260
add	esp, 4
fstp	[esp+130h+var_120]
mov	ecx, edi
call	sub_4D69E0
movaps	xmm0, [esp+130h+var_100]
movaps	xmmword	ptr [eax], xmm0
jmp	loc_60D07F

loc_60CFC2:
movaps	xmm1, [esp+130h+var_D0]
fstp	st(1)
movaps	xmm0, [esp+130h+var_C0]
fstp	[esp+130h+var_120]
subps	xmm0, xmm1
mov	ecx, edi
movaps	[esp+130h+var_100], xmm0
call	sub_4D69E0
fld	dword ptr [esp+130h+var_100]
push	ecx		; float
fstp	[esp+134h+var_134]
mov	dword ptr [esp+134h+var_118], eax
mov	[esp+134h+var_E8], 0
mov	esi, 1
mov	[esp+134h+var_F0], 2
call	sub_4E3520
fstp	[esp+134h+var_124]
fld	dword ptr [esp+134h+var_100+4]
fstp	[esp+134h+var_134]
call	sub_4E3520
fstp	[esp+134h+var_E4]
fld	dword ptr [esp+134h+var_100+8]
fstp	[esp+134h+var_134]
call	sub_4E3520
fstp	[esp+134h+var_EC]
add	esp, 4
fld	[esp+130h+var_E4]
fld	[esp+130h+var_124]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_60D04A
xor	esi, esi
fstp	[esp+130h+var_124]
lea	ecx, [esi+1]
jmp	short loc_60D050

loc_60D04A:
mov	ecx, [esp+130h+var_E8]
fstp	st

loc_60D050:
fld	[esp+130h+var_EC]
fld	[esp+130h+var_124]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_60D065
mov	ecx, [esp+130h+var_F0]

loc_60D065:
mov	eax, dword ptr [esp+130h+var_118]
fld	dword ptr [esp+ecx*4+130h+var_100]
xorps	xmm0, xmm0
movaps	xmmword	ptr [eax], xmm0
fstp	dword ptr [eax+esi*4]
fld	dword ptr [esp+esi*4+130h+var_100]
fchs
fstp	dword ptr [eax+ecx*4]

loc_60D07F:
mov	ecx, edi
call	sub_4D69E0
mov	esi, eax
movaps	xmm0, xmmword ptr [esi]
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	edx, [esp+130h+var_50]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	edx
lea	ecx, [esp+134h+var_E0]
movaps	[esp+134h+var_50], xmm2
call	sub_4D5050
fldz
movaps	xmm1, [esp+130h+var_E0]
fstp	dword ptr [esp+130h+var_118]
fld	dword ptr off_17E66B4
xorps	xmm0, xmm0
movss	xmm2, dword ptr	[esp+130h+var_118]
movss	xmm0, xmm2
movaps	xmm2, xmm0
movaps	xmm0, [esp+130h+var_E0]
fstp	dword ptr [esp+130h+var_118]
movss	xmm4, dword ptr	[esp+130h+var_118]
fld	ds:dword_1479C58
movaps	xmm3, xmm0
fstp	dword ptr [esp+130h+var_118]
cmpeqss	xmm3, xmm2
rsqrtss	xmm1, xmm1
mulss	xmm0, xmm1
mulss	xmm0, xmm1
xorps	xmm2, xmm2
movss	xmm2, xmm4
movss	xmm4, dword ptr	[esp+130h+var_118]
subss	xmm2, xmm0
xorps	xmm0, xmm0
movss	xmm0, xmm4
mulss	xmm0, xmm1
lea	eax, [esp+130h+var_70]
mulss	xmm0, xmm2
andnps	xmm3, xmm0
push	eax
lea	ecx, [esp+134h+var_A0]
movaps	[esp+134h+var_70], xmm3
call	sub_4D5050
movaps	xmm0, [esp+130h+var_A0]
mov	ecx, [esp+130h+var_108]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [esi]
mulps	xmm1, xmm0
movaps	xmmword	ptr [esi], xmm1
call	sub_4D78D0
fsub	[esp+130h+var_120]
push	ecx
lea	ecx, [esp+134h+var_80]
fstp	dword ptr [esp+134h+var_118]
fld	dword ptr [esp+134h+var_118]
fstp	[esp+134h+var_134]
call	sub_4D5090
mov	ecx, edi
call	sub_4D69E0
mov	ecx, edi
mov	esi, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld	[esp+130h+var_120]
movaps	xmm0, [esp+130h+var_80]
fsub	[esp+130h+var_110]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, xmmword ptr [esi]
fstp	dword ptr [esp+130h+var_118]
fld	dword ptr [esp+130h+var_118]
mulps	xmm1, xmm0
movaps	xmm0, xmmword ptr [ebx]
addps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
push	ecx
mov	ecx, edi
fstp	[esp+134h+var_134]
call	sub_4D6890
mov	esi, [esp+130h+var_104]
mov	ebx, [ebp+arg_C]
mov	ecx, 0FFFFh
cmp	[esi+0Ch], cx
jnz	short loc_60D200
mov	eax, [ebp+arg_8]
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	edi
push	0
push	ebx
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	edx
mov	[esi+0Ch], ax

loc_60D200:
movzx	eax, word ptr [esi+0Ch]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_60D248
movzx	edx, ax
mov	[edi+20h], edx
add	dword ptr [ebx], 30h
jmp	short loc_60D248

loc_60D219:
mov	esi, [esp+130h+var_104]
fstp	st
movzx	eax, word ptr [esi+0Ch]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_60D248
mov	edi, [ebp+arg_C]
mov	edi, [edi+4]
mov	ecx, [esi+8]
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+14h]
call	eax
mov	ecx, 0FFFFh
mov	[esi+0Ch], cx

loc_60D248:		; __CxxRestoreUnhandledExceptionFilter(void)
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ
mov	esi, eax
mov	edx, [esi+4]
cmp	edx, [esi+0Ch]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+134h+var_11A]
call	sub_4D4F20
lea	ecx, [esp+130h+var_11A]
call	sub_4D4F40
test	al, al
jz	short loc_60D28E
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+130h+var_124], eax
mov	edx, [esp+130h+var_124]
mov	[ecx+4], edx
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60D28E:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_60CDD0 endp

align 10h



sub_60D2A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_1207CA0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60D2A0 endp

align 10h



sub_60D2F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_1207A50
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60D2F0 endp

align 10h



sub_60D340 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_1208140
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60D340 endp

align 10h



sub_60D390 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_1207CC0
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60D390 endp

align 10h


; Attributes: bp-based frame

sub_60D3E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_60CDD0
cmp	esi, [edi]
jnb	short loc_60D440

loc_60D410:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60D410

loc_60D440:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60D478
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60D478:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60D3E0 endp



; Attributes: bp-based frame

sub_60D480 proc	near

var_E4=	dword ptr -0E4h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_B6=	byte ptr -0B6h
var_B0=	xmmword	ptr -0B0h
var_A0=	xmmword	ptr -0A0h
var_90=	xmmword	ptr -90h
var_80=	dword ptr -80h
var_70=	xmmword	ptr -70h
var_60=	xmmword	ptr -60h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	byte ptr -30h
var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
push	ebx
push	esi
push	edi
mov	[esp+0E0h+var_BC], ecx
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+0E4h+var_C9]
call	sub_4D4F20
lea	ecx, [esp+0E0h+var_C9]
call	sub_4D4F40
test	al, al
jz	short loc_60D4D9
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	aTtspheretri ; "TtSphereTri"
rdtsc
mov	[esp+0E0h+var_C8], eax
mov	eax, [esp+0E0h+var_C8]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60D4D9:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_C]
mov	ebx, [ecx]
mov	edx, [eax]
mov	ecx, [ebp+arg_4]
mov	edi, [eax+8]
mov	esi, [ecx+8]
mov	[esp+0E0h+var_C4], edx
mov	edx, [ecx]
add	edi, 30h
lea	ecx, [esp+0E0h+var_70]
mov	[esp+0E0h+var_C8], edx
mov	[esp+0E0h+var_C0], edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [esp+0E0h+var_C8]
movaps	xmm1, xmmword ptr [esi]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm3, xmmword ptr [esi+20h]
movaps	xmm4, xmmword ptr [esi+30h]
movaps	[esp+0E0h+var_70], xmm1
movaps	[esp+0E0h+var_60], xmm2
movaps	[esp+0E0h+var_50], xmm3
movaps	[esp+0E0h+var_40], xmm4
mov	eax, 2
lea	edx, [esp+0E0h+var_10]
add	ecx, 40h

loc_60D545:
movaps	xmm0, xmmword ptr [ecx]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx], xmm5
dec	eax
sub	ecx, 10h
sub	edx, 10h
test	eax, eax
jge	short loc_60D545
lea	eax, [esp+0E0h+var_90]
push	eax
mov	eax, [esp+0E4h+var_BC]
lea	ecx, [esp+0E4h+var_30]
push	ecx
push	edi
add	eax, 10h
lea	edi, [esp+0ECh+var_B8]
call	sub_12810D0
mov	esi, [esp+0ECh+var_C8]
add	esp, 0Ch
mov	ecx, esi
call	sub_4D78D0
fstp	qword ptr [esp+0E0h+var_B0]
mov	ecx, [esp+0E0h+var_C4]
call	sub_4D78D0
fadd	qword ptr [esp+0E0h+var_B0]
mov	edx, [ebp+arg_8]
fstp	[esp+0E0h+var_C8]
fld	[esp+0E0h+var_80]
fld	dword ptr [edx+8]
fadd	[esp+0E0h+var_C8]
fstp	[esp+0E0h+var_C4]
fld	[esp+0E0h+var_C4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_60D786
mov	ecx, esi
fstp	[esp+0E0h+var_C4]
call	sub_4D78D0
fsub	[esp+0E0h+var_C4]
push	ecx
lea	ecx, [esp+0E4h+var_A0]
fstp	[esp+0E4h+var_C4]
fld	[esp+0E4h+var_C4]
fstp	[esp+0E4h+var_E4]
call	sub_4D5090
mov	ecx, ebx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm0, [esp+0E0h+var_A0]
mov	ecx, [esp+0E0h+var_C0]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+0E0h+var_90]
mulps	xmm1, xmm0
movaps	xmm0, xmmword ptr [ecx]
addps	xmm1, xmm0
movaps	xmmword	ptr [eax], xmm1
fld	[esp+0E0h+var_80]
fsub	[esp+0E0h+var_C8]
push	ecx
lea	edx, [esp+0E4h+var_90]
mov	ecx, ebx
fstp	[esp+0E4h+var_C0]
fld	[esp+0E4h+var_C0]
fstp	[esp+0E4h+var_E4]
push	edx
call	sub_4D6820
mov	al, [esp+0E0h+var_B8]
mov	edi, [ebp+arg_0]
mov	[esp+0E0h+var_C9], al
test	al, al
jbe	loc_60D73E
mov	ecx, [ebp+arg_4]
mov	eax, [edi]
mov	esi, [ecx]
mov	ecx, ebx
mov	[esp+0E0h+var_C0], eax
call	sub_4D69E0
mov	edx, [eax]
mov	dword ptr [esp+0E0h+var_B0], edx
mov	ecx, [eax+4]
mov	dword ptr [esp+0E0h+var_B0+4], ecx
mov	edx, [eax+8]
mov	dword ptr [esp+0E0h+var_B0+8], edx
mov	eax, [eax+0Ch]
mov	ecx, ebx
mov	dword ptr [esp+0E0h+var_B0+0Ch], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [eax]
mov	dword ptr [esp+0E0h+var_A0], ecx
mov	edx, [eax+4]
mov	dword ptr [esp+0E0h+var_A0+4], edx
mov	ecx, [eax+8]
mov	dword ptr [esp+0E0h+var_A0+8], ecx
mov	edx, [eax+0Ch]
mov	ecx, [ebp+arg_4]
mov	eax, [edi+8]
mov	dword ptr [esp+0E0h+var_A0+0Ch], edx
mov	edx, [ecx+8]
lea	ecx, [esp+0E0h+var_B0]
push	ecx
push	eax
mov	eax, [esp+0E8h+var_C0]
push	eax
mov	[esp+0ECh+var_C4], edx
mov	ecx, [esp+0ECh+var_C4]
mov	edx, [esi]
mov	edx, [edx+40h]
push	ecx
lea	eax, [esp+0F0h+var_A0]
push	eax
lea	ecx, [esp+0F4h+var_C9]
push	ecx
lea	eax, [esp+0F8h+var_B6]
push	eax
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_60D722
mov	esi, [esp+0E0h+var_BC]
movzx	eax, word ptr [esi+0Ch]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	loc_60D7FB
mov	edi, [ebp+arg_C]
mov	edi, [edi+4]
mov	ecx, [esi+8]
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+14h]
call	eax
mov	ecx, 0FFFFh
mov	[esi+0Ch], cx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_60D722:
cmp	eax, 1
jnz	short loc_60D73E
movaps	xmm0, [esp+0E0h+var_B0]
movaps	xmm2, xmmword ptr [ebx+10h]
movaps	xmm1, xmm0
unpckhps xmm0, xmm2
shufps	xmm1, xmm0, 0C4h
movaps	xmmword	ptr [ebx+10h], xmm1

loc_60D73E:
mov	esi, [esp+0E0h+var_BC]
mov	edx, 0FFFFh
cmp	[esi+0Ch], dx
jnz	short loc_60D76A
mov	edx, [ebp+arg_C]
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
push	ebx
push	0
push	edx
push	[ebp+arg_8]
mov	edx, [ebp+arg_4]
push	edx
push	edi
call	eax
mov	[esi+0Ch], ax

loc_60D76A:
movzx	eax, word ptr [esi+0Ch]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_60D7B5
movzx	edx, ax
mov	eax, [ebp+arg_C]
mov	[ebx+20h], edx
add	dword ptr [eax], 30h
jmp	short loc_60D7B5

loc_60D786:
mov	esi, [esp+0E0h+var_BC]
fstp	st
movzx	eax, word ptr [esi+0Ch]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_60D7B5
mov	edi, [ebp+arg_C]
mov	edi, [edi+4]
mov	ecx, [esi+8]
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+14h]
call	eax
mov	ecx, 0FFFFh
mov	[esi+0Ch], cx

loc_60D7B5:		; __CxxRestoreUnhandledExceptionFilter(void)
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ
mov	esi, eax
mov	edx, [esi+4]
cmp	edx, [esi+0Ch]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+0E4h+var_C9]
call	sub_4D4F20
lea	ecx, [esp+0E0h+var_C9]
call	sub_4D4F40
test	al, al
jz	short loc_60D7FB
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+0E0h+var_C8], eax
mov	edx, [esp+0E0h+var_C8]
mov	[ecx+4], edx
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60D7FB:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_60D480 endp

align 10h



sub_60D810 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_1207180
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60D810 endp

align 10h



sub_60D860 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_1207000
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60D860 endp

align 10h



sub_60D8B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_1207710
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60D8B0 endp

align 10h



sub_60D900 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_12073B0
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60D900 endp

align 10h


; Attributes: bp-based frame

sub_60D950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_60D480
cmp	esi, [edi]
jnb	short loc_60D9B0

loc_60D980:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60D980

loc_60D9B0:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60D9E8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60D9E8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60D950 endp




sub_60D9F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_12516E0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60D9F0 endp

align 10h



sub_60DA40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_1251520
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60DA40 endp

align 10h



sub_60DA90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_1251CB0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60DA90 endp

align 10h



sub_60DAE0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_12517B0
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60DAE0 endp

align 10h


; Attributes: bp-based frame

sub_60DB30 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60DC06
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_12A4EC0
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60DC06:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_12A4EC0
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60DB30 endp

align 10h


; Attributes: bp-based frame

sub_60DC40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_12521B0
cmp	esi, [edi]
jnb	short loc_60DCA0

loc_60DC70:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60DC70

loc_60DCA0:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60DCD8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60DCD8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60DC40 endp



; Attributes: bp-based frame

sub_60DCE0 proc	near

var_110= dword ptr -110h
var_108= dword ptr -108h
var_104= dword ptr -104h
var_ED=	byte ptr -0EDh
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_C0=	byte ptr -0C0h
var_A0=	byte ptr -0A0h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0F4h
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	[esp+100h+var_E4], esi
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	edi, eax
mov	eax, [edi+4]
cmp	eax, [edi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+104h+var_ED]
call	sub_4D4F20
lea	ecx, [esp+100h+var_ED]
call	sub_4D4F40
test	al, al
jz	short loc_60DD3B
mov	ecx, [edi+4]
mov	dword ptr [ecx], offset	aTtcapscaps ; "TtCapsCaps"
rdtsc
mov	[esp+100h+var_EC], eax
mov	eax, [esp+100h+var_EC]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[edi+4], ecx

loc_60DD3B:
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
push	ecx
fstp	[esp+104h+var_EC]
lea	ecx, [esp+104h+var_E0]
fld	[esp+104h+var_EC]
fstp	[esp+104h+var_104]
call	sub_4D6890
fld	[esp+100h+var_EC]
push	ecx
lea	ecx, [esp+104h+var_C0]
fstp	[esp+104h+var_104]
call	sub_4D6890
fld	[esp+100h+var_EC]
push	ecx
lea	ecx, [esp+104h+var_A0]
fstp	[esp+104h+var_104]
call	sub_4D6890
mov	eax, [ebp+arg_0]
mov	ebx, [ebp+arg_4]
mov	ecx, [ebx]
mov	edx, [eax]
mov	edi, [eax+8]
mov	[esp+100h+var_E8], ecx
lea	ecx, [esp+100h+var_40]
mov	[esp+100h+var_EC], edx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [esp+100h+var_EC]
movaps	xmm1, xmmword ptr [edi]
movaps	xmm2, xmmword ptr [edi+10h]
movaps	xmm3, xmmword ptr [edi+20h]
movaps	xmm4, xmmword ptr [edi+30h]
mov	eax, 1
lea	edx, [esp+100h+var_30]
add	ecx, 30h
jmp	short loc_60DDC0
align 10h

loc_60DDC0:
movaps	xmm0, xmmword ptr [ecx]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx], xmm5
dec	eax
sub	ecx, 10h
sub	edx, 10h
test	eax, eax
jge	short loc_60DDC0
mov	edi, [ebx+8]
lea	ecx, [esp+100h+var_80]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [edi]
movaps	xmm2, xmmword ptr [edi+10h]
movaps	xmm3, xmmword ptr [edi+20h]
movaps	xmm4, xmmword ptr [edi+30h]
mov	edi, [esp+100h+var_E8]
mov	eax, 1
lea	edx, [esp+100h+var_70]
lea	ecx, [edi+30h]
lea	esp, [esp+0]

loc_60DE30:
movaps	xmm0, xmmword ptr [ecx]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx], xmm5
dec	eax
sub	ecx, 10h
sub	edx, 10h
test	eax, eax
jge	short loc_60DE30
lea	edx, [esp+100h+var_E0]
push	edx		; int
mov	ecx, edi
call	sub_4D78D0
push	ecx		; float
mov	ecx, [esp+108h+var_EC]
fstp	[esp+108h+var_108]
lea	eax, [esp+108h+var_80]
push	eax		; int
call	sub_4D78D0
push	ecx		; float
lea	eax, [esp+110h+var_40]
fstp	[esp+110h+var_110]
call	sub_127EBB0
add	esp, 10h
lea	ebx, [esp+100h+var_E0]
lea	edi, [esi+0Ch]
mov	[esp+100h+var_EC], 3
jmp	short loc_60DEB0
align 10h

loc_60DEB0:
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
mov	ecx, ebx
fstp	[esp+100h+var_E8]
call	sub_4D6870
fld	[esp+100h+var_E8]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_60DF52
mov	edx, 0FFFFh
cmp	[edi], dx
jnz	short loc_60DF06
mov	edx, [ebp+arg_C]
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
push	ebx
push	0
push	edx
mov	edx, [ebp+arg_8]
push	edx
mov	edx, [ebp+arg_4]
push	edx
mov	edx, [ebp+arg_0]
push	edx
call	eax
mov	ecx, 0FFFFh
mov	[edi], ax
cmp	ax, cx
jz	short loc_60DF7D

loc_60DF06:
mov	edx, [ebp+arg_C]
mov	esi, [edx]
mov	ecx, edx
lea	eax, [esi+30h]
mov	[ecx], eax
mov	ecx, ebx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, esi
mov	[esp+100h+var_E8], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	edx, [esp+100h+var_E8]
movaps	xmm0, xmmword ptr [edx]
mov	ecx, ebx
movaps	xmmword	ptr [eax], xmm0
call	sub_4D69E0
mov	ecx, esi
mov	[esp+100h+var_E8], eax
call	sub_4D69E0
mov	ecx, [esp+100h+var_E8]
movaps	xmm0, xmmword ptr [ecx]
movaps	xmmword	ptr [eax], xmm0
movzx	edx, word ptr [edi]
mov	[esi+20h], edx
jmp	short loc_60DF79

loc_60DF52:
movzx	eax, word ptr [edi]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_60DF7D
mov	ecx, [esi+8]
mov	esi, [ebp+arg_C]
mov	esi, [esi+4]
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+14h]
call	eax
mov	ecx, 0FFFFh
mov	[edi], cx

loc_60DF79:
mov	esi, [esp+100h+var_E4]

loc_60DF7D:
add	edi, 2
add	ebx, 20h
sub	[esp+100h+var_EC], 1
jnz	loc_60DEB0
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	edx, [esi+4]
cmp	edx, [esi+0Ch]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+104h+var_ED]
call	sub_4D4F20
lea	ecx, [esp+100h+var_ED]
call	sub_4D4F40
test	al, al
jz	short loc_60DFD4
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+100h+var_E4], eax
mov	edx, [esp+100h+var_E4]
mov	[ecx+4], edx
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60DFD4:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_60DCE0 endp

align 10h


; Attributes: bp-based frame

sub_60DFE0 proc	near

var_11C= dword ptr -11Ch
var_114= dword ptr -114h
var_110= dword ptr -110h
var_F1=	byte ptr -0F1h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_C0=	dword ptr -0C0h
var_B0=	byte ptr -0B0h
var_A0=	dword ptr -0A0h
var_80=	byte ptr -80h
var_60=	dword ptr -60h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0F4h
push	ebx
push	esi
push	edi
mov	[esp+100h+var_E4], ecx
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+104h+var_F1]
call	sub_4D4F20
lea	ecx, [esp+100h+var_F1]
call	sub_4D4F40
test	al, al
jz	short loc_60E039
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	aTtcapsuletri ;	"TtCapsuleTri"
rdtsc
mov	[esp+100h+var_EC], eax
mov	eax, [esp+100h+var_EC]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60E039:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	edi, [ecx]
mov	ebx, [eax]
mov	esi, [eax+8]
lea	ecx, [esp+100h+var_A0]
mov	[esp+100h+var_DC], ebx
mov	[esp+100h+var_E0], edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [esi]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm3, xmmword ptr [esi+20h]
movaps	xmm4, xmmword ptr [esi+30h]
mov	eax, 1
lea	edx, [esp+100h+var_B0]
lea	ecx, [ebx+30h]

loc_60E072:
movaps	xmm0, xmmword ptr [ecx]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx], xmm5
dec	eax
sub	ecx, 10h
sub	edx, 10h
test	eax, eax
jge	short loc_60E072
mov	edx, [ebp+arg_4]
mov	esi, [edx+8]
lea	ecx, [esp+100h+var_A0]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [esi]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm3, xmmword ptr [esi+20h]
movaps	xmm4, xmmword ptr [esi+30h]
mov	eax, 2
lea	edx, [esp+100h+var_80]
lea	ecx, [edi+40h]
jmp	short loc_60E0E0
align 10h

loc_60E0E0:
movaps	xmm0, xmmword ptr [ecx]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx], xmm5
dec	eax
sub	ecx, 10h
sub	edx, 10h
test	eax, eax
jge	short loc_60E0E0
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
mov	eax, [esp+100h+var_E4]
lea	ecx, [esp+100h+var_DC+4]
fstp	[esp+100h+var_E8]
fld	[esp+100h+var_E8]
push	ecx		; int
lea	edx, [esp+104h+var_60]
push	edx		; int
push	1		; int
push	ecx		; float
mov	ecx, edi
fstp	[esp+110h+var_110]
lea	esi, [eax+14h]
call	sub_4D78D0
push	ecx		; float
lea	ecx, [esp+114h+var_A0]
fstp	[esp+114h+var_114]
push	ecx		; int
mov	ecx, ebx
call	sub_4D78D0
push	ecx		; float
lea	edx, [esp+11Ch+var_C0]
fstp	[esp+11Ch+var_11C]
push	edx		; int
mov	edx, esi
call	sub_127F860
mov	edi, [esp+120h+var_E4]
lea	eax, [esp+120h+var_DC+6]
add	esp, 20h
lea	esi, [esp+100h+var_60]
mov	[esp+100h+var_EC], eax
add	edi, 0Ch
mov	[esp+100h+var_E8], 3

loc_60E188:
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
mov	ecx, esi
fstp	[esp+100h+var_F0]
call	sub_4D6870
fld	[esp+100h+var_F0]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_60E2C6
mov	edx, [esp+100h+var_EC]
mov	al, [edx-2]
mov	[esp+100h+var_F1], al
test	al, al
jbe	loc_60E244
mov	ecx, esi
call	sub_4D69E0
mov	ecx, [eax]
mov	[esp+100h+var_C0], ecx
mov	edx, [eax+4]
mov	[esp+100h+var_C0+4], edx
mov	ecx, [eax+8]
mov	[esp+100h+var_C0+8], ecx
mov	edx, [eax+0Ch]
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ebx, [eax+8]
mov	[esp+100h+var_C0+0Ch], edx
mov	edx, [ecx+8]
mov	ecx, esi
mov	[esp+100h+var_F0], edx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [esp+100h+var_E0]
mov	edx, [ecx]
mov	edx, [edx+40h]
lea	ecx, [esp+100h+var_C0]
push	ecx
mov	ecx, [esp+104h+var_DC]
push	ebx
push	ecx
mov	ecx, [esp+10Ch+var_F0]
push	ecx
mov	ecx, [esp+110h+var_EC]
push	eax
lea	eax, [esp+114h+var_F1]
push	eax
push	ecx
mov	ecx, [esp+11Ch+var_E0]
call	edx
test	eax, eax
jz	loc_60E2C6
cmp	eax, 1
jnz	short loc_60E244
movaps	xmm0, xmmword ptr [esp+100h+var_C0]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm1, xmm0
unpckhps xmm0, xmm2
shufps	xmm1, xmm0, 0C4h
movaps	xmmword	ptr [esi+10h], xmm1

loc_60E244:
mov	edx, 0FFFFh
cmp	[edi], dx
jnz	short loc_60E27C
mov	eax, [esp+100h+var_E4]
mov	ecx, [eax+8]
mov	eax, [ebp+arg_C]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	esi
push	0
push	eax
mov	eax, [ebp+arg_8]
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	edx
mov	ecx, 0FFFFh
mov	[edi], ax
cmp	ax, cx
jz	short loc_60E2F1

loc_60E27C:
mov	eax, [ebp+arg_C]
mov	ebx, [eax]
lea	edx, [ebx+30h]
mov	ecx, esi
mov	[eax], edx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, ebx
mov	[esp+100h+var_F0], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [esp+100h+var_F0]
movaps	xmm0, xmmword ptr [ecx]
mov	ecx, esi
movaps	xmmword	ptr [eax], xmm0
call	sub_4D69E0
mov	ecx, ebx
mov	[esp+100h+var_F0], eax
call	sub_4D69E0
mov	edx, [esp+100h+var_F0]
movaps	xmm0, xmmword ptr [edx]
movaps	xmmword	ptr [eax], xmm0
movzx	eax, word ptr [edi]
mov	[ebx+20h], eax
jmp	short loc_60E2F1

loc_60E2C6:
movzx	eax, word ptr [edi]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_60E2F1
mov	ebx, [ebp+arg_C]
mov	edx, [esp+100h+var_E4]
mov	ebx, [ebx+4]
mov	ecx, [edx+8]
mov	edx, [ecx]
push	ebx
push	eax
mov	eax, [edx+14h]
call	eax
mov	ecx, 0FFFFh
mov	[edi], cx

loc_60E2F1:
add	[esp+100h+var_EC], 8
add	edi, 2
add	esi, 20h
sub	[esp+100h+var_E8], 1
jnz	loc_60E188
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	edx, [esi+4]
cmp	edx, [esi+0Ch]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+104h+var_F1]
call	sub_4D4F20
lea	ecx, [esp+100h+var_F1]
call	sub_4D4F40
test	al, al
jz	short loc_60E34D
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+100h+var_E8], eax
mov	edx, [esp+100h+var_E8]
mov	[ecx+4], edx
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60E34D:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_60DFE0 endp

align 10h



sub_60E360 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_1205BE0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60E360 endp

align 10h



sub_60E3B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_12059B0
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60E3B0 endp

align 10h



sub_60E400 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_1206190
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60E400 endp

align 10h



sub_60E450 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_1205E10
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60E450 endp

align 10h


; Attributes: bp-based frame

sub_60E4A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_60DFE0
cmp	esi, [edi]
jnb	short loc_60E500

loc_60E4D0:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60E4D0

loc_60E500:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60E538
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60E538:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60E4A0 endp



; Attributes: bp-based frame

sub_60E540 proc	near

var_144= dword ptr -144h
var_12D= byte ptr -12Dh
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= xmmword ptr -110h
var_100= xmmword ptr -100h
var_F0=	dword ptr -0F0h
var_C0=	byte ptr -0C0h
var_80=	byte ptr -80h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 134h
push	ebx
push	esi
push	edi
mov	[esp+140h+var_118], ecx
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+144h+var_12D]
call	sub_4D4F20
lea	ecx, [esp+140h+var_12D]
call	sub_4D4F40
test	al, al
jz	short loc_60E599
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	aTtmultispheret	; "TtMultiSphereTri"
rdtsc
mov	[esp+140h+var_12C], eax
mov	eax, [esp+140h+var_12C]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60E599:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	ebx, [eax]
mov	esi, [ecx]
mov	edi, [eax+8]
mov	[esp+140h+var_114], ebx
lea	ecx, [esp+140h+var_C0]
add	ebx, 20h
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [edi]
movaps	xmm2, xmmword ptr [edi+10h]
movaps	xmm3, xmmword ptr [edi+20h]
movaps	xmm4, xmmword ptr [edi+30h]
lea	edx, [esp+140h+var_C0]
mov	ecx, 2
lea	eax, [ebx+20h]
sub	edx, ebx
lea	esp, [esp+0]

loc_60E5E0:
movaps	xmm0, xmmword ptr [eax]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx+eax], xmm5
dec	ecx
sub	eax, 10h
test	ecx, ecx
jge	short loc_60E5E0
mov	edx, [ebp+arg_0]
mov	edi, [edx+8]
lea	ebx, [esi+20h]
mov	esi, [esi+10h]
lea	ecx, [esp+140h+var_100]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [edi]
movaps	xmm2, xmmword ptr [edi+10h]
movaps	xmm3, xmmword ptr [edi+20h]
movaps	xmm4, xmmword ptr [edi+30h]
dec	esi
mov	ecx, esi
mov	eax, ecx
shl	eax, 4
lea	edx, [esp+140h+var_80]
add	eax, ebx
sub	edx, ebx
lea	ecx, [ecx+0]

loc_60E650:
movaps	xmm0, xmmword ptr [eax]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0
mulps	xmm6, xmm1
mulps	xmm5, xmm2
addps	xmm5, xmm6
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	xmmword	ptr [edx+eax], xmm5
dec	ecx
sub	eax, 10h
test	ecx, ecx
jge	short loc_60E650
lea	eax, [esp+140h+var_80]
mov	[esp+140h+var_11C], eax
mov	eax, esi
mov	[esp+140h+var_124], eax
test	eax, eax
jl	loc_60E807
mov	esi, [esp+140h+var_118]
add	ebx, 0Ch
mov	[esp+140h+var_12C], ebx
lea	ebx, [esi+eax*2+1Ch]
jmp	short loc_60E6B4

loc_60E6B0:
mov	esi, [esp+140h+var_118]

loc_60E6B4:
mov	ecx, [esp+140h+var_12C]
fld	dword ptr [ecx]
mov	ecx, [esp+140h+var_114]
fstp	[esp+140h+var_120]
call	sub_4D78D0
fadd	[esp+140h+var_120]
mov	ecx, [esp+140h+var_11C]
lea	edx, [esp+140h+var_100]
push	edx
lea	eax, [esp+144h+var_C0]
fstp	[esp+144h+var_120]
push	eax
push	ecx
xor	edi, edi
lea	eax, [esi+0Ch]
call	sub_12810D0
fld	[esp+14Ch+var_F0]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+8]
add	esp, 0Ch
fadd	[esp+140h+var_120]
fstp	[esp+140h+var_128]
fld	[esp+140h+var_128]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_60E7BF
mov	edi, [ebp+arg_C]
mov	ecx, [esp+140h+var_114]
mov	esi, [edi]
call	sub_4D78D0
fsub	[esp+140h+var_F0]
push	ecx
lea	ecx, [esp+144h+var_110]
fstp	[esp+144h+var_128]
fld	[esp+144h+var_128]
fstp	[esp+144h+var_144]
call	sub_4D5090
mov	ecx, esi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld	[esp+140h+var_F0]
movaps	xmm0, [esp+140h+var_110]
fsub	[esp+140h+var_120]
mov	ecx, [esp+140h+var_11C]
movaps	xmm2, xmmword ptr [ecx]
movaps	xmm1, xmm0
fstp	[esp+140h+var_128]
fld	[esp+140h+var_128]
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+140h+var_100]
mulps	xmm1, xmm0
push	ecx
addps	xmm1, xmm2
fstp	[esp+144h+var_144]
movaps	xmmword	ptr [eax], xmm1
mov	ecx, esi
movaps	xmmword	ptr [esi+10h], xmm0
call	sub_4D6890
mov	edx, 0FFFFh
cmp	[ebx], dx
jnz	short loc_60E7B4
mov	eax, [esp+140h+var_118]
mov	ecx, [eax+8]
mov	eax, [ebp+arg_8]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	esi
push	0
push	edi
push	eax
mov	eax, [ebp+arg_4]
push	eax
mov	eax, [ebp+arg_0]
push	eax
call	edx
mov	ecx, 0FFFFh
mov	[ebx], ax
cmp	ax, cx
jz	short loc_60E7E6

loc_60E7B4:
add	dword ptr [edi], 30h
movzx	edx, word ptr [ebx]
mov	[esi+20h], edx
jmp	short loc_60E7E6

loc_60E7BF:
movzx	eax, word ptr [ebx]
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_60E7E6
mov	ecx, [esi+8]
mov	esi, [ebp+arg_C]
mov	esi, [esi+4]
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+14h]
call	eax
mov	ecx, 0FFFFh
mov	[ebx], cx

loc_60E7E6:
mov	eax, 10h
add	[esp+140h+var_11C], eax
add	[esp+140h+var_12C], eax
mov	eax, [esp+140h+var_124]
dec	eax
sub	ebx, 2
mov	[esp+140h+var_124], eax
test	eax, eax
jge	loc_60E6B0

loc_60E807:		; __CxxRestoreUnhandledExceptionFilter(void)
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ
mov	esi, eax
mov	edx, [esi+4]
cmp	edx, [esi+0Ch]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+144h+var_12D]
call	sub_4D4F20
lea	ecx, [esp+140h+var_12D]
call	sub_4D4F40
test	al, al
jz	short loc_60E84D
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+140h+var_124], eax
mov	edx, [esp+140h+var_124]
mov	[ecx+4], edx
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60E84D:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_60E540 endp

align 10h



sub_60E860 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_1204FA0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60E860 endp

align 10h



sub_60E8B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_1204E00
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60E8B0 endp

align 10h



sub_60E900 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_1205400
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60E900 endp

align 10h



sub_60E950 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_1205140
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60E950 endp

align 10h


; Attributes: bp-based frame

sub_60E9A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_60E540
cmp	esi, [edi]
jnb	short loc_60EA00

loc_60E9D0:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60E9D0

loc_60EA00:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60EA38
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60EA38:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60E9A0 endp




sub_60EA40 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_60EA70
test	[esp+4+arg_0], 1
jz	short loc_60EA6A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_60EA6A:
mov	eax, edi
pop	edi
retn	4
sub_60EA40 endp




sub_60EA70 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_60EAA9
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_60EAA9:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F2AC8
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_60EA70 endp

align 10h


; Attributes: bp-based frame

sub_60EAD0 proc	near

var_114= dword ptr -114h
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	xmmword	ptr -0ECh
var_D0=	xmmword	ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B0=	xmmword	ptr -0B0h
var_A0=	xmmword	ptr -0A0h
var_90=	xmmword	ptr -90h
var_80=	xmmword	ptr -80h
var_70=	xmmword	ptr -70h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 104h
push	ebx
push	esi
push	edi
mov	ebx, ecx
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+114h+var_F5]
call	sub_4D4F20
lea	ecx, [esp+110h+var_F5]
call	sub_4D4F40
test	al, al
jz	short loc_60EB27
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	aTtmultirayCvx ; "TtmultiRay-cvx"
rdtsc
mov	[esp+110h+var_F4], eax
mov	eax, [esp+110h+var_F4]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60EB27:
mov	ecx, [ebp+arg_4]
mov	edi, [ebp+arg_0]
mov	edx, [ecx]
mov	esi, [edi]
lea	ecx, [esp+110h+var_B0]
mov	dword ptr [esp+110h+var_EC+8], esi
mov	dword ptr [esp+110h+var_EC], edx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, [edi+8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
push	eax
push	edx
lea	ecx, [esp+118h+var_B0]
call	sub_1255540
mov	eax, [esi+14h]
xor	edi, edi
cmp	eax, edi
mov	[esp+110h+var_C0], edi
mov	[esp+110h+var_BC], edi
mov	esi, [esi+10h]
mov	[esp+110h+var_F0], eax
mov	[esp+110h+var_F4], esi
jle	loc_60ED9B
jmp	short loc_60EB80
align 10h

loc_60EB80:
movaps	xmm0, xmmword ptr [esi]
movaps	xmm1, [esp+110h+var_A0]
movaps	xmm2, [esp+110h+var_B0]
movaps	xmm4, [esp+110h+var_80]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
mulps	xmm5, xmm1
movaps	xmm3, xmm0
shufps	xmm3, xmm0, 0
mulps	xmm3, xmm2
addps	xmm5, xmm3
movaps	xmm3, [esp+110h+var_90]
movaps	xmm6, xmm0
shufps	xmm6, xmm0, 0AAh
mulps	xmm6, xmm3
addps	xmm6, xmm4
addps	xmm5, xmm6
movaps	[esp+110h+var_EC+0Ch], xmm5
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm5, xmm0
shufps	xmm5, xmm0, 55h
mulps	xmm5, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
mulps	xmm1, xmm2
addps	xmm5, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0AAh
mulps	xmm1, xmm3
addps	xmm1, xmm4
addps	xmm5, xmm1
lea	ecx, [esp+110h+var_50]
movaps	[esp+110h+var_D0], xmm5
call	sub_4D9FE0
mov	ecx, dword ptr [esp+110h+var_EC]
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+110h+var_50]
push	edx
lea	edx, [esp+114h+var_EC+0Ch]
push	edx
lea	edx, [esp+118h+var_F5]
push	edx
mov	[esp+11Ch+var_10], 0
mov	[esp+11Ch+var_30], 0FFFFFFFFh
call	eax
lea	ecx, [esp+110h+var_F5]
call	sub_4D4F40
test	al, al
jnz	short loc_60EC7D
mov	ecx, [ebx+0Ch]
movzx	eax, word ptr [ecx+edi*2]
mov	edx, 0FFFFh
cmp	ax, dx
jz	loc_60ED85
mov	esi, [ebp+arg_C]
mov	esi, [esi+4]
mov	ecx, [ebx+8]
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+14h]
call	eax
mov	ecx, [ebx+0Ch]
mov	edx, 0FFFFh
mov	[ecx+edi*2], dx
jmp	loc_60ED85

loc_60EC7D:
mov	eax, [ebp+arg_C]
fld	[esp+110h+var_40]
mov	esi, [eax]
push	ecx
lea	ecx, [esp+114h+var_70]
fstp	[esp+114h+var_114]
call	sub_4D5090
movaps	xmm0, [esp+110h+var_70]
movaps	xmm1, ds:xmmword_146B8A0
movaps	xmm2, [esp+110h+var_EC+0Ch]
mov	ecx, [ebp+arg_4]
mov	eax, [ecx+8]
shufps	xmm0, xmm0, 0
subps	xmm1, xmm0
mulps	xmm1, xmm2
movaps	xmm2, [esp+110h+var_D0]
lea	edx, [esp+110h+var_60]
push	edx
mulps	xmm0, xmm2
addps	xmm1, xmm0
push	eax
mov	ecx, esi
movaps	xmmword	ptr [esp+118h+var_60], xmm1
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, eax
call	sub_121A750
mov	eax, [ebp+arg_4]
mov	eax, [eax+8]
lea	ecx, [esp+110h+var_50]
push	ecx
push	eax
mov	ecx, esi
call	sub_4D69E0
mov	ecx, eax
call	sub_121A810
fld	[esp+110h+var_40]
fsub	ds:dbl_15FCC40
mov	edx, [esp+110h+var_F4]
mov	eax, dword ptr [esp+110h+var_EC+8]
push	ecx
fmul	dword ptr [edx+0Ch]
mov	ecx, esi
fadd	dword ptr [eax+1Ch]
fstp	dword ptr [esp+114h+var_EC+4]
fld	dword ptr [esp+114h+var_EC+4]
fstp	[esp+114h+var_114]
call	sub_4D6890
mov	ecx, [ebx+0Ch]
mov	edx, 0FFFFh
cmp	[ecx+edi*2], dx
jnz	short loc_60ED67
mov	edx, [ebp+arg_C]
mov	ecx, [ebx+8]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
push	esi
push	0
push	edx
mov	edx, [ebp+arg_8]
push	edx
mov	edx, [ebp+arg_4]
push	edx
mov	edx, [ebp+arg_0]
push	edx
call	eax
mov	ecx, [ebx+0Ch]
movzx	eax, ax
mov	[ecx+edi*2], ax

loc_60ED67:
mov	edx, [ebx+0Ch]
mov	eax, 0FFFFh
cmp	[edx+edi*2], ax
jz	short loc_60ED85
mov	eax, [ebp+arg_C]
add	dword ptr [eax], 30h
mov	ecx, [ebx+0Ch]
movzx	edx, word ptr [ecx+edi*2]
mov	[esi+20h], edx

loc_60ED85:
mov	esi, [esp+110h+var_F4]
add	esi, 20h
inc	edi
cmp	edi, [esp+110h+var_F0]
mov	[esp+110h+var_F4], esi
jl	loc_60EB80

loc_60ED9B:		; __CxxRestoreUnhandledExceptionFilter(void)
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+114h+var_F5]
call	sub_4D4F20
lea	ecx, [esp+110h+var_F5]
call	sub_4D4F40
test	al, al
jz	short loc_60EDE1
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+110h+var_F4], eax
mov	eax, [esp+110h+var_F4]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_60EDE1:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_60EAD0 endp

align 10h



sub_60EDF0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_12045A0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60EDF0 endp

align 10h



sub_60EE40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_12043B0
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60EE40 endp

align 10h



sub_60EE90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_12048B0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60EE90 endp

align 10h



sub_60EEE0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_12045C0
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60EEE0 endp

align 10h


; Attributes: bp-based frame

sub_60EF30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_60EAD0
cmp	esi, [edi]
jnb	short loc_60EF90

loc_60EF60:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60EF60

loc_60EF90:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60EFC8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60EFC8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60EF30 endp




sub_60EFD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F2AC8
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_60F000
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_60F000:
mov	eax, esi
pop	esi
retn	4
sub_60EFD0 endp

align 10h



sub_60F010 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_A9E550
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60F010 endp

align 10h



sub_60F060 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_A9E350
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60F060 endp

align 10h



sub_60F0B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_A9E970
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60F0B0 endp

align 10h



sub_60F100 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_A9E770
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60F100 endp

align 10h


; Attributes: bp-based frame

sub_60F150 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60F226
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9EB90
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60F226:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_A9EB90
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60F150 endp

align 10h


; Attributes: bp-based frame

sub_60F260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_A9F010
cmp	esi, [edi]
jnb	short loc_60F2C0

loc_60F290:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60F290

loc_60F2C0:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60F2F8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60F2F8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60F260 endp




sub_60F300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
push	edx
call	sub_A9E210
retn	10h
sub_60F300 endp

align 10h


; Attributes: bp-based frame

sub_60F320 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60F3FD
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9EDC0
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60F3FD:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_A9EDC0
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60F320 endp

align 10h


; Attributes: bp-based frame

sub_60F430 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	ecx
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
push	edi
mov	ecx, ebx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, [ebp+arg_4]
movaps	xmm0, xmmword ptr [eax+10h]
movaps	xmm1, xmmword ptr [eax+20h]
movaps	xmm2, xmmword ptr [eax+30h]
movaps	xmm3, xmmword ptr [eax]
movaps	xmmword	ptr [ebx], xmm3
movaps	xmmword	ptr [ebx+10h], xmm0
movaps	xmmword	ptr [ebx+20h], xmm1
movaps	xmmword	ptr [ebx+30h], xmm2
lea	esi, [eax+40h]
lea	edi, [ebx+40h]
mov	ecx, 14h
rep movsd
mov	ecx, [eax+90h]
mov	[ebx+90h], ecx
mov	edx, [eax+94h]
mov	[ebx+94h], edx
mov	ecx, [eax+98h]
mov	[ebx+98h], ecx
mov	edx, [eax+9Ch]
mov	[ebx+9Ch], edx
pop	edi
fld	dword ptr [eax+0A0h]
pop	esi
fstp	dword ptr [ebx+0A0h]
fld	dword ptr [eax+0A4h]
fstp	dword ptr [ebx+0A4h]
fld	dword ptr [eax+0A8h]
fstp	dword ptr [ebx+0A8h]
mov	cl, [eax+0ACh]
mov	[ebx+0ACh], cl
mov	dl, [eax+0ADh]
mov	[ebx+0ADh], dl
mov	al, [eax+0AEh]
mov	[ebx+0AEh], al
mov	eax, ebx
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_60F430 endp

align 10h



sub_60F500 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_A9D6D0
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60F500 endp

align 10h



sub_60F550 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_A9D590
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60F550 endp

align 10h



sub_60F5A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_A9DB30
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60F5A0 endp

align 10h



sub_60F5F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_A9DA10
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60F5F0 endp

align 10h


; Attributes: bp-based frame

sub_60F640 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60F716
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9D7F0
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60F716:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_A9D7F0
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60F640 endp

align 10h


; Attributes: bp-based frame

sub_60F750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_A9DC20
cmp	esi, [edi]
jnb	short loc_60F7B0

loc_60F780:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60F780

loc_60F7B0:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60F7E8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60F7E8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60F750 endp



; Attributes: bp-based frame

sub_60F7F0 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60F8CD
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9D910
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60F8CD:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_A9D910
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60F7F0 endp

align 10h


; Attributes: bp-based frame

sub_60F900 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0C4h
mov	ecx, [ebp+arg_10]
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_4]
mov	eax, 1
mov	[ebx+8], ecx
mov	[ebx+6], ax
mov	dword ptr [ebx], offset	off_15F3A4C
mov	esi, [edi]
mov	ecx, esi
call	sub_4D99B0
mov	edx, [edi+8]
mov	[esp+0D0h+var_C4], eax
push	edx
lea	eax, [esp+0D4h+var_B0]
push	eax
call	sub_60F430
mov	edi, [edi+8]
mov	ecx, esi
call	sub_4D99D0
lea	esi, [esp+0D0h+var_B0]
call	sub_1255840
mov	ecx, [ebp+arg_4]
mov	eax, [esp+0D0h+var_C4]
mov	edi, [ebp+arg_C]
mov	[esp+0D0h+var_B4], ecx
mov	ecx, [edi]
mov	edx, esi
mov	[esp+0D0h+var_C4], ecx
lea	ecx, [eax+0Ch]
mov	[esp+0D0h+var_B8], edx
mov	[esp+0D0h+var_C0], eax
mov	[esp+0D0h+var_BC], 0
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [ebp+arg_8]
mov	esi, eax
mov	eax, [edx]
lea	ecx, [eax+0Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	dword ptr [edi+14h], 0
mov	ecx, [esp+0D0h+var_C4]
jz	short loc_60F9A7
add	ecx, 5A0h
jmp	short loc_60F9AD

loc_60F9A7:
add	ecx, 1A0h

loc_60F9AD:
mov	edx, [ebp+arg_10]
shl	esi, 5
add	esi, ecx
movzx	eax, byte ptr [esi+eax]
mov	ecx, [esp+0D0h+var_C4]
push	edx
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*4+9A0h]
mov	ecx, [ebp+arg_8]
push	edi
push	ecx
lea	edx, [esp+0DCh+var_C0]
push	edx
call	eax
add	esp, 10h
pop	edi
mov	[ebx+0Ch], eax
pop	esi
mov	eax, ebx
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60F900 endp

align 10h



sub_60F9F0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4DA030
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B24
call	sub_A9C000
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60F9F0 endp

align 10h



sub_60FA40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4DA030
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B24
call	sub_A9BF60
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_6 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60FA40 endp

align 10h



sub_60FA90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_4D8780
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
push	ecx
mov	ecx, esi
mov	[esp+20h+var_C], offset	off_15F2B04
call	sub_A9C120
lea	ecx, [esp+10h+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	esi
add	esp, 0Ch
retn	10h
sub_60FA90 endp

align 10h



sub_60FAE0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
lea	ecx, [esp+0Ch+var_C]
call	sub_4D8780
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	ecx, [esp+10h+arg_4]
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
mov	[esp+1Ch+var_C], offset	off_15F2B04
call	sub_A9C080
add	esp, 10h
lea	ecx, [esp+0Ch+var_C]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
add	esp, 0Ch
retn
sub_60FAE0 endp

align 10h


; Attributes: bp-based frame

sub_60FB30 proc	near

var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60FC06
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9C1A0
add	esp, 14h
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_60FC06:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
push	edx
call	sub_A9C1A0
add	esp, 14h
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_60FB30 endp

align 10h


; Attributes: bp-based frame

sub_60FC40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 8
mov	eax, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	esi
push	edi
mov	edi, [ebp+arg_C]
fld	dword ptr [edi+3030h]
mov	esi, [edi]
push	edi
fstp	[esp+14h+var_4]
push	eax
mov	eax, [ebp+arg_4]
push	edx
push	eax
call	sub_A9C2D0
cmp	esi, [edi]
jnb	short loc_60FCA0

loc_60FC70:
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0FFh
movaps	xmm1, xmmword ptr [esi]
mulps	xmm2, xmm0
addps	xmm2, xmm1
movaps	xmmword	ptr [esi], xmm2
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [esi+10h], xmm0
add	esi, 30h
cmp	esi, [edi]
jb	short loc_60FC70

loc_60FCA0:
fld	[esp+10h+var_4]
fld	dword ptr [edi+3030h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_60FCD8
lea	esi, [edi+3010h]
mov	ecx, esi
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, ds:xmmword_1573EA0
xorps	xmm0, xmm1
movaps	xmmword	ptr [eax], xmm0
lea	eax, [esi+30h]
call	sub_60A8E0

loc_60FCD8:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	10h
sub_60FC40 endp




sub_60FCE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
push	edx
call	sub_A9BEE0
retn	10h
sub_60FCE0 endp

align 10h


; Attributes: bp-based frame

sub_60FD00 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A0=	dword ptr -0A0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	byte ptr -70h
var_20=	xmmword	ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0D4h
movaps	xmm1, ds:xmmword_1573EB0
push	ebx
mov	ebx, [ebp+arg_8]
movaps	xmm0, xmmword ptr [ebx+50h]
push	esi
mov	[esp+0DCh+var_D4], ecx
push	edi
mov	ecx, 1Ch
mov	esi, ebx
lea	edi, [esp+0E0h+var_70]
rep movsd
xorps	xmm0, xmm1
lea	ecx, [esp+0E0h+var_D0]
movaps	[esp+0E0h+var_20], xmm0
call	sub_4D8780
mov	eax, [ebx+50h]
mov	ecx, [ebx+54h]
mov	esi, [ebp+arg_10]
mov	edx, [ebx+58h]
mov	[esp+0E0h+var_C0], eax
mov	eax, [ebx+5Ch]
mov	[esp+0E0h+var_BC], ecx
mov	ecx, [ebp+arg_C]
mov	edi, offset off_15F2B14
mov	[esp+0E0h+var_D0], edi
mov	[esp+0E0h+var_B8], edx
mov	[esp+0E0h+var_B4], eax
mov	[esp+0E0h+var_B0], ecx
test	esi, esi
jz	short loc_60FDDD
lea	ecx, [esp+0E0h+var_A0]
call	sub_4D8780
mov	eax, [ebx+54h]
mov	edx, [ebx+50h]
mov	ecx, [ebx+58h]
mov	[esp+0E0h+var_8C], eax
mov	[esp+0E0h+var_90], edx
mov	edx, [ebx+5Ch]
mov	[esp+0E0h+var_88], ecx
lea	eax, [esp+0E0h+var_A0]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [esp+0E4h+var_D0]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+0E8h+var_84], edx
lea	edx, [esp+0E8h+var_70]
push	edx
push	eax
push	ecx
mov	ecx, [esp+0F4h+var_D4]
mov	[esp+0F4h+var_A0], edi
mov	[esp+0F4h+var_80], esi
call	sub_A9C240
lea	ecx, [esp+0E0h+var_A0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_60FDDD:
mov	ecx, [ebp+arg_0]
push	0
lea	edx, [esp+0E4h+var_D0]
push	edx
mov	edx, [ebp+arg_4]
lea	eax, [esp+0E8h+var_70]
push	eax
push	ecx
mov	ecx, [esp+0F0h+var_D4]
push	edx
call	sub_A9C240
lea	ecx, [esp+0E0h+var_D0]
call	??1facet@locale@std@@UAE@XZ_4 ;	std::locale::facet::~facet(void)
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_60FD00 endp

align 10h



sub_60FE10 proc	near
push	esi
mov	esi, ecx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+60h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+70h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0ACh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0ADh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, esi
pop	esi
retn
sub_60FE10 endp

align 10h



sub_60FE50 proc	near
mov	dword ptr [eax], offset	off_15F3B5C
mov	edx, 80000000h
mov	ecx, 1
mov	[eax+6], cx
mov	[eax+10h], edx
xor	ecx, ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], edx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], edx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], edx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], edx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], edx
retn
sub_60FE50 endp

align 10h



sub_60FEA0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+44h]
xor	ebx, ebx
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	dword ptr [esi], offset	off_15F3B5C
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	ebp, 80000000h
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_60FEE2
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_60FEE2:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+38h]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_60FF19
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_60FF19:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+2Ch]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_60FF4C
and	edx, 3FFFFFFFh
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_60FF4C:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+20h]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_60FF83
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_60FF83:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+14h]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_60FFB4
mov	ecx, [edi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_60FFB4:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+8]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_60FFE5
and	edx, 3FFFFFFFh
push	edx
mov	edx, [edi]
push	edx
mov	ecx, eax
call	sub_4E2290

loc_60FFE5:
mov	[edi], ebx
mov	[edi+8], ebp
pop	edi
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_60FEA0 endp

align 10h



sub_610000 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_60FEA0
test	[esp+4+arg_0], 1
jz	short loc_61002A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61002A:
mov	eax, esi
pop	esi
retn	4
sub_610000 endp




sub_610030 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_A9AA30
test	[esp+4+arg_0], 1
jz	short loc_61005C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61005C:
mov	eax, esi
pop	esi
retn	4
sub_610030 endp

align 10h



sub_610070 proc	near
sub	ecx, 10h
jmp	sub_610030
sub_610070 endp

align 10h



sub_610080 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	??1facet@locale@std@@UAE@XZ_0 ;	std::locale::facet::~facet(void)
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_6100B4
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6100B4:
mov	eax, esi
pop	esi
retn	4
sub_610080 endp

align 10h



sub_6100C0 proc	near
sub	ecx, 14h
jmp	sub_610080
sub_6100C0 endp

align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_239. PRESS KEYPAD	"+" TO EXPAND]
align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_246. PRESS KEYPAD	"+" TO EXPAND]
align 10h



sub_6100F0 proc	near
inc	ecx
cmp	ecx, [eax+8]
jnz	short loc_6100F9
mov	eax, [eax]
retn

loc_6100F9:
mov	eax, 200h
retn
sub_6100F0 endp

align 10h



sub_610100 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+2], cx
retn
sub_610100 endp

align 10h



sub_610110 proc	near
movzx	eax, byte ptr [ecx+21h]
sub	eax, 1
push	ebx
js	short loc_610133
mov	dl, [esi]
lea	esp, [esp+0]

loc_610120:
cmp	[ecx+eax*4], dl
jnz	short loc_61012E
mov	bl, [ecx+eax*4+1]
cmp	bl, [esi+1]
jz	short loc_610140

loc_61012E:
sub	eax, 1
jns	short loc_610120

loc_610133:
push	0
mov	ecx, edi
call	sub_4D4F20
mov	eax, edi
pop	ebx
retn

loc_610140:
push	1
mov	ecx, edi
call	sub_4D4F20
mov	eax, edi
pop	ebx
retn
sub_610110 endp

align 10h



sub_610150 proc	near
fld	ds:dword_15FCC88
retn
sub_610150 endp

align 10h



sub_610160 proc	near
or	al, 0FFh
retn
sub_610160 endp

align 10h



sub_610170 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11FA5B0
test	[esp+4+arg_0], 1
jz	short loc_61019A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61019A:
mov	eax, esi
pop	esi
retn	4
sub_610170 endp




sub_6101A0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	eax, [esp+4+arg_0]
push	eax
call	sub_610510
mov	dword ptr [edi], offset	off_15F3F64
mov	eax, edi
pop	edi
retn	4
sub_6101A0 endp

align 10h



sub_6101C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A83BA0
test	[esp+4+arg_0], 1
jz	short loc_6101EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6101EA:
mov	eax, esi
pop	esi
retn	4
sub_6101C0 endp




sub_6101F0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	eax, [esp+4+arg_0]
push	eax
call	sub_610510
mov	dword ptr [edi], offset	off_15F3FDC
mov	eax, edi
pop	edi
retn	4
sub_6101F0 endp

align 10h



sub_610210 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	eax, [esp+4+arg_0]
push	eax
call	sub_610510
mov	dword ptr [edi], offset	off_15F404C
mov	eax, edi
pop	edi
retn	4
sub_610210 endp

align 10h



sub_610230 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	eax, [esp+4+arg_0]
push	eax
call	sub_610510
mov	dword ptr [edi], offset	off_15F40BC
mov	eax, edi
pop	edi
retn	4
sub_610230 endp

align 10h



sub_610250 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	eax, [esp+4+arg_0]
push	eax
call	sub_610510
mov	dword ptr [edi], offset	off_15F412C
mov	eax, edi
pop	edi
retn	4
sub_610250 endp

align 10h



sub_610270 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A93DF0
test	[esp+4+arg_0], 1
jz	short loc_61029A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61029A:
mov	eax, esi
pop	esi
retn	4
sub_610270 endp




sub_6102A0 proc	near
push	esi
mov	esi, eax
movzx	eax, word ptr [esi+0Eh]
push	edi
test	eax, 8000h
jnz	short loc_6102D9
and	eax, 3FFFh
push	ebx
mov	ebx, [esi+8]
mov	edi, eax
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	edx, [edx+8]
lea	ecx, ds:0[edi*4]
push	ecx
push	ebx
mov	ecx, eax
call	edx
pop	ebx

loc_6102D9:
movzx	eax, word ptr [esi+6]
test	eax, 8000h
jnz	short loc_61030B
mov	esi, [esi]
and	eax, 3FFFh
mov	edi, eax
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	edx, [edx+8]
lea	ecx, ds:0[edi*4]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61030B:
pop	edi
pop	esi
retn
sub_6102A0 endp

align 10h


; Attributes: bp-based frame

sub_610310 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 14h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
mov	esi, [ebp+arg_0]
push	edi
mov	edi, [ebp+arg_8]

loc_610325:
lea	eax, [ebx+edi]
sar	eax, 1
mov	edx, [esi+eax*4]

loc_61032D:
mov	[esp+20h+var_10], ebx

loc_610331:
mov	eax, [esi+ebx*4]
mov	ecx, [eax+34h]
mov	ebx, [edx+34h]
cmp	ecx, ebx
jb	short loc_610366
ja	short loc_610370
mov	ecx, [eax+18h]
xor	ecx, [eax+14h]
mov	eax, [ebp+arg_C]
mov	ebx, [edx+18h]
xor	ebx, [edx+14h]
xor	ecx, eax
xor	ebx, eax
mov	eax, [ecx+0D4h]
cmp	eax, [ebx+0D4h]
setb	al
test	al, al
jz	short loc_610370

loc_610366:
mov	ebx, [esp+20h+var_10]
inc	ebx
jmp	short loc_61032D
align 10h

loc_610370:
mov	eax, [esi+edi*4]
mov	ecx, [eax+34h]
mov	ebx, [edx+34h]
cmp	ebx, ecx
jb	short loc_6103A5
mov	ecx, [ebp+arg_C]
ja	short loc_6103A8
mov	ebx, [eax+18h]
xor	ebx, [eax+14h]
mov	eax, [edx+18h]
xor	eax, [edx+14h]
xor	ebx, ecx
xor	eax, ecx
mov	eax, [eax+0D4h]
cmp	eax, [ebx+0D4h]
setb	al
test	al, al
jz	short loc_6103A8

loc_6103A5:
dec	edi
jmp	short loc_610370

loc_6103A8:
mov	ebx, [esp+20h+var_10]
cmp	edi, ebx
jl	short loc_6103D4
jz	short loc_6103C6
mov	eax, [esi+edi*4]
mov	[esp+20h+var_10], eax
mov	eax, [esi+ebx*4]
mov	[esi+edi*4], eax
mov	eax, [esp+20h+var_10]
mov	[esi+ebx*4], eax

loc_6103C6:
inc	ebx
dec	edi
cmp	ebx, edi
mov	[esp+20h+var_10], ebx
jle	loc_610331

loc_6103D4:
mov	eax, [ebp+arg_4]
cmp	eax, edi
jge	short loc_6103E7
push	ecx
push	edi
push	eax
push	esi
call	sub_610310
add	esp, 10h

loc_6103E7:
mov	edi, [ebp+arg_8]
cmp	ebx, edi
jge	short loc_6103F6
mov	[ebp+arg_4], ebx
jmp	loc_610325

loc_6103F6:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_610310 endp

align 10h



sub_610400 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
movzx	esi, byte ptr [eax+9]
mov	edx, esi
mov	ebx, edi
and	edx, 3
and	ebx, 3
cmp	bl, dl
jnb	short loc_61041B
not	ecx

loc_61041B:
shl	ecx, 0Eh
cmp	edi, esi
jge	short loc_610424
not	ebp

loc_610424:
mov	dx, [eax+0Ah]
mov	esi, 3FFFh
and	dx, si
or	dx, cx
mov	cx, [eax+0Ch]
mov	[eax+0Ah], dx
mov	edx, esi
shl	ebp, 0Eh
and	cx, dx
pop	esi
or	cx, bp
pop	ebp
mov	[eax+0Ch], cx
pop	ebx
retn	4
sub_610400 endp




sub_610450 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_610480
test	[esp+4+arg_0], 1
jz	short loc_61047A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61047A:
mov	eax, esi
pop	esi
retn	4
sub_610450 endp




sub_610480 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+10h]
lea	ebp, [edi+10h]
mov	dword ptr [edi], offset	off_15F4198
test	ecx, ecx
jz	short loc_61049D
call	sub_AD6020

loc_61049D:
mov	ecx, [edi+84h]
test	ecx, ecx
jz	short loc_6104AC
call	sub_AD6020

loc_6104AC:
lea	esi, [edi+78h]
push	esi
lea	ecx, [esp+18h+var_5]
mov	[esp+18h+var_5], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_6104E2
and	edx, 3FFFFFFFh
shl	edx, 4
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_6104E2:
lea	ecx, [edi+74h]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD3ED0
mov	eax, ebp
call	sub_608AF0
mov	ecx, edi
pop	edi
pop	esi
pop	ebp
add	esp, 8
jmp	sub_4DA650
sub_610480 endp

align 10h



sub_610510 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
lea	esi, [edi+10h]
mov	ecx, esi
mov	dword ptr [edi], offset	off_15F41B4
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+60h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+70h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0ACh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0ADh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+8+arg_0], 0
pop	esi
jz	short loc_610565
fld1
lea	eax, [esp+4+var_4]
push	eax
fstp	[esp+8+var_4]
lea	ecx, [edi+11Eh]
call	sub_4D4F90

loc_610565:
mov	eax, edi
pop	ecx
retn	4
sub_610510 endp

align 10h



sub_610570 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	eax, [esp+4+arg_0]
push	eax
call	sub_610510
mov	dword ptr [edi], offset	off_15F429C
mov	eax, edi
pop	edi
retn	4
sub_610570 endp

align 10h



sub_610590 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6105C0
test	[esp+4+arg_0], 1
jz	short loc_6105BA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6105BA:
mov	eax, edi
pop	edi
retn	4
sub_610590 endp




sub_6105C0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	esi
lea	esi, [edi+2Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+20h+var_11]
mov	[esp+20h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_610608
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_610608:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+20h]
mov	[esp+1Ch+var_10], esi
mov	[esp+1Ch+var_4], ebx
push	esi
lea	ecx, [esp+20h+var_11]
mov	[esp+20h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_610645
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
push	edx
mov	ecx, eax
call	sub_4C7E50

loc_610645:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, edi
call	sub_4DA650
mov	ecx, [esp+1Ch+var_C]
pop	esi
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_6105C0 endp

align 10h



sub_610670 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+18h]
push	offset aHkpcontactmgrf ; "hkpContactMgrFactory"
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+1Ch]
mov	ecx, esi
call	edx
pop	esi
retn	8
sub_610670 endp




sub_610690 proc	near
xor	eax, eax
retn	18h
sub_610690 endp

align 10h



sub_6106A0 proc	near
xor	eax, eax
retn	24h
sub_6106A0 endp

align 10h



sub_6106B0 proc	near
lea	eax, [ecx+8]
retn	0Ch
sub_6106B0 endp

align 10h



sub_6106C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+8]
call	sub_4DA650
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_6106F4
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6106F4:
mov	eax, esi
pop	esi
retn	4
sub_6106C0 endp

align 10h



; int __thiscall sub_610700(void *, char)
sub_610700 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F4814
jz	short loc_610719
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_610719:
mov	eax, esi
pop	esi
retn	4
sub_610700 endp

align 10h



sub_610720 proc	near
mov	ecx, edx
call	sub_AAA1C0
mov	dword ptr [edx], offset	off_15F2104
mov	dword ptr [edx+8], offset off_15F2114
mov	dword ptr [edx+0Ch], offset off_15F2120
mov	dword ptr [edx+10h], offset off_15F2134
mov	dword ptr [edx+14h], offset off_15F2140
mov	dword ptr [edx+20h], 1
mov	eax, edx
retn
sub_610720 endp

align 10h



; int __thiscall sub_610760(void *, char)
sub_610760 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F47C8
jz	short loc_610779
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_610779:
mov	eax, esi
pop	esi
retn	4
sub_610760 endp

align 10h



sub_610780 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A91B30
test	[esp+4+arg_0], 1
jz	short loc_6107AA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6107AA:
mov	eax, edi
pop	edi
retn	4
sub_610780 endp




sub_6107B0 proc	near
lea	ecx, [esi+0E0h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0FCh]
mov	dword ptr [esi+0F4h], 0
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0FDh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, esi
retn
sub_6107B0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_6107E0(float, float)
sub_6107E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 10h
fld	[ebp+arg_0]
fst	dword ptr [ecx+4]
fld	ds:dbl_15FCC48
fmul	st, st(1)
fstp	[esp+10h+var_4]
fld	[esp+10h+var_4]
fst	dword ptr [ecx+0Ch]
fld	[ebp+arg_4]
fst	dword ptr [ecx+8]
fld	st
fdiv	st, st(3)
fstp	[esp+10h+var_4]
fld	[esp+10h+var_4]
fst	dword ptr [ecx+50h]
fld	st(1)
fdiv	st, st(3)
fstp	dword ptr [ecx+58h]
fld	st(1)
fdivp	st(4), st
fxch	st(3)
fstp	[esp+10h+var_4]
fld	[esp+10h+var_4]
fst	dword ptr [ecx+54h]
fxch	st(2)
fdivrp	st(1), st
fstp	dword ptr [ecx+5Ch]
fstp	[esp+10h+var_4]
movss	xmm0, [esp+10h+var_4]
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [ecx+30h], xmm0
fstp	[esp+10h+var_4]
movss	xmm0, [esp+10h+var_4]
shufps	xmm0, xmm0, 0
movaps	xmmword	ptr [ecx+40h], xmm0
mov	esp, ebp
pop	ebp
retn	8
sub_6107E0 endp




sub_610860 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_11FD3C0
test	[esp+4+arg_0], 1
jz	short loc_61088C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61088C:
mov	eax, esi
pop	esi
retn	4
sub_610860 endp

align 10h



sub_6108A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	edi
push	eax
mov	eax, esi
call	sub_A87690
xor	edi, edi
mov	[esi+8Ch], edi
mov	[esi+90h], edi
mov	dword ptr [esi+94h], 80000000h
mov	[esi+98h], edi
mov	[esi+9Ch], edi
mov	dword ptr [esi+0A0h], 80000000h
lea	ecx, [esi+0B0h]
mov	dword ptr [esi], offset	off_15F48D8
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0DCh]
mov	[esi+0D0h], edi
mov	[esi+0D4h], edi
mov	dword ptr [esi+0D8h], 80000000h
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, esi
pop	edi
retn	4
sub_6108A0 endp

align 10h



sub_610920 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A87DC0
test	[esp+4+arg_0], 1
jz	short loc_61094A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61094A:
mov	eax, edi
pop	edi
retn	4
sub_610920 endp



; Attributes: bp-based frame thunk

sub_610950 proc	near
jmp	sub_4DA650
sub_610950 endp

align 10h



sub_610960 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
lea	ecx, [esi+20h]
mov	dword ptr [esi], offset	off_15F4974
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+60h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+0A2h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+13Bh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_6109C9
cmp	byte ptr [esi+116h], 0
setnz	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+8+var_1]
call	sub_4D4F20
lea	ecx, [esp+4+var_1]
call	sub_4D4F40
test	al, al
jz	short loc_6109C9
push	ecx
mov	ecx, esp
push	1
call	sub_4D4F20
mov	ecx, esi
call	sub_A75050

loc_6109C9:
mov	eax, esi
pop	ecx
retn	4
sub_610960 endp

align 10h



sub_6109D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_A750A0
test	[esp+4+arg_0], 1
jz	short loc_6109FB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6109FB:
mov	eax, esi
pop	esi
retn	4
sub_6109D0 endp

align 10h



sub_610A10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F3CFC
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_610A40
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_610A40:
mov	eax, esi
pop	esi
retn	4
sub_610A10 endp

align 10h



sub_610A50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_A863E0
test	[esp+4+arg_0], 1
jz	short loc_610A7B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_610A7B:
mov	eax, esi
pop	esi
retn	4
sub_610A50 endp

align 10h



sub_610A90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	edi
push	eax
mov	eax, esi
call	sub_A87690
xor	eax, eax
mov	[esi+8Ch], eax
mov	[esi+90h], eax
mov	ecx, 80000000h
mov	[esi+94h], ecx
mov	[esi+0A0h], ecx
lea	edi, [esi+0B0h]
mov	[esi+98h], eax
mov	[esi+9Ch], eax
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F4A6C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [edi+60h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [edi+70h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [edi+0ACh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [edi+0ADh]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, esi
pop	edi
retn	4
sub_610A90 endp

align 10h



sub_610B10 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A89140
test	[esp+4+arg_0], 1
jz	short loc_610B3A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_610B3A:
mov	eax, edi
pop	edi
retn	4
sub_610B10 endp




sub_610B40 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	ebx
push	ebp
push	esi
lea	esi, [edi+34h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	ebp, 80000000h
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_610B99
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax
mov	ebp, 80000000h

loc_610B99:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+28h]
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_610BD5
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax
mov	ebp, 80000000h

loc_610BD5:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+1Ch]
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_610C06
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_610C06:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+10h]
mov	[esp+20h+var_10], esi
mov	[esp+20h+var_4], ebx
push	esi
lea	ecx, [esp+24h+var_11]
mov	[esp+24h+var_11], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_610C3F
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
push	edx
mov	ecx, eax
call	sub_4C7E50

loc_610C3F:
mov	[esi], ebx
mov	[esi+8], ebp
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	ecx, [esp+20h+var_C]
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 14h
retn
sub_610B40 endp

align 10h



sub_610C60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_127A810
test	[esp+4+arg_0], 1
jz	short loc_610C8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_610C8A:
mov	eax, edi
pop	edi
retn	4
sub_610C60 endp




sub_610C90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A73700
test	[esp+4+arg_0], 1
jz	short loc_610CBA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_610CBA:
mov	eax, esi
pop	esi
retn	4
sub_610C90 endp

; START	OF FUNCTION CHUNK FOR sub_1309D3B

loc_610CC0:
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx
retn
; END OF FUNCTION CHUNK	FOR sub_1309D3B
align 10h



sub_610CE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	0
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	4
sub_610CE0 endp

align 10h



sub_610D00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_127DE10
test	[esp+4+arg_0], 1
jz	short loc_610D2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_610D2A:
mov	eax, esi
pop	esi
retn	4
sub_610D00 endp




sub_610D30 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
lea	ecx, [esi+20h]
mov	dword ptr [esi], offset	off_15F4CB4
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+50h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+4+arg_0], 0
jz	short loc_610D82
cmp	byte ptr [esi+9Ah], 0
setnz	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+8+var_1]
call	sub_4D4F20
lea	ecx, [esp+4+var_1]
call	sub_4D4F40
test	al, al
jz	short loc_610D82
push	ecx
mov	ecx, esp
push	1
call	sub_4D4F20
push	esi
call	sub_A73320

loc_610D82:
mov	eax, esi
pop	ecx
retn	4
sub_610D30 endp

align 10h



sub_610D90 proc	near
push	edi
mov	edi, eax
mov	eax, [edi+20h]
test	eax, eax
jz	short loc_610D9E
fld	dword ptr [eax]
pop	edi
retn

loc_610D9E:
mov	ecx, [edi+8]
push	esi
call	sub_4D7310
mov	ecx, [edi+4]
push	eax
call	sub_4D7310
mov	esi, [edi+14h]
push	eax
mov	eax, [edi+4]
mov	edi, [edi+8]
push	eax
call	sub_12507F0
add	esp, 0Ch
pop	esi
pop	edi
retn
sub_610D90 endp

align 10h



sub_610DD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	esi
mov	esi, [edi+90h]
mov	[esp+10h+var_8], eax
xor	eax, eax
sub	esi, 1
mov	[esp+10h+var_C], edi
mov	[esp+10h+var_4], eax
js	short loc_610E17
lea	ecx, [ecx+0]

loc_610DF0:
mov	ecx, [edi+8Ch]
cmp	dword ptr [ecx+esi*4], 0
lea	eax, [ecx+esi*4]
jz	short loc_610E0E
mov	eax, [eax]
mov	edx, [eax]
mov	edx, [edx]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, eax
call	edx

loc_610E0E:
sub	esi, 1
jns	short loc_610DF0
mov	eax, [esp+10h+var_4]

loc_610E17:
pop	esi
add	esp, 0Ch
retn
sub_610DD0 endp

align 10h



sub_610E20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 0Ch
push	esi
lea	ecx, [esp+10h+var_4]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	esi, [edi+90h]
sub	esi, 1
mov	eax, [esp+10h+arg_0]
mov	cl, [esp+10h+arg_4]
mov	[esp+10h+var_8], eax
mov	[esp+10h+var_C], edi
mov	[esp+10h+var_4], cl
js	short loc_610E74
lea	esp, [esp+0]

loc_610E50:
mov	edx, [edi+8Ch]
cmp	dword ptr [edx+esi*4], 0
lea	eax, [edx+esi*4]
jz	short loc_610E6F
mov	eax, [eax]
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, eax
call	edx

loc_610E6F:
sub	esi, 1
jns	short loc_610E50

loc_610E74:
pop	esi
add	esp, 0Ch
retn	8
sub_610E20 endp

align 10h



sub_610E80 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A8AD60
test	[esp+4+arg_0], 1
jz	short loc_610EAA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_610EAA:
mov	eax, edi
pop	edi
retn	4
sub_610E80 endp



; Attributes: bp-based frame

; int __stdcall	sub_610EB0(float)
sub_610EB0 proc	near

var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 40h
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [esi+50h], xmm0
movaps	xmm0, xmmword ptr [eax]
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+40h+var_40]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+44h+var_30]
movaps	[esp+44h+var_40], xmm2
call	sub_4D5050
movaps	xmm0, [esp+40h+var_30]
lea	ecx, [esp+40h+var_20]
push	ecx
sqrtss	xmm0, xmm0
lea	ecx, [esp+44h+var_10]
movaps	[esp+44h+var_20], xmm0
call	sub_4D5050
lea	ecx, [esp+40h+var_10]
call	sub_4D50D0
fstp	dword ptr [esi+64h]
fld	[ebp+arg_0]
fstp	dword ptr [esi+8]
mov	esp, ebp
pop	ebp
retn	4
sub_610EB0 endp

align 10h


; Attributes: bp-based frame

sub_610F30 proc	near

var_1A=	byte ptr -1Ah
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 24h
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
push	edi
nop

loc_610F40:
mov	esi, [ebp+arg_8]
mov	edi, [ebp+arg_4]
lea	eax, [edi+esi]
sar	eax, 1
mov	ecx, [ebx+eax*8]
mov	edx, [ebx+eax*8+4]
mov	[esp+30h+var_10], ecx
mov	[esp+30h+var_C], edx
lea	ebx, [ebx+0]

loc_610F60:
mov	ecx, [ebx+edi*8+4]
call	sub_4D69B0
mov	ecx, [esp+30h+var_C]
mov	[esp+30h+var_18], eax
call	sub_4D69B0
mov	ecx, [esp+30h+var_18]
mov	edx, [ecx]
cmp	edx, [eax]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+34h+var_1A]
call	sub_4D4F20
lea	ecx, [esp+30h+var_1A]
call	sub_4D4F40
test	al, al
jz	short loc_610FE7
lea	eax, [ebx+edi*8+4]
jmp	short loc_610FA5

loc_610FA1:
mov	eax, [esp+30h+var_18]

loc_610FA5:
mov	ecx, [eax+8]
add	eax, 8
inc	edi
mov	[esp+30h+var_18], eax
call	sub_4D69B0
mov	ecx, [esp+30h+var_C]
mov	[esp+30h+var_14], eax
call	sub_4D69B0
mov	edx, [esp+30h+var_14]
mov	ecx, [edx]
cmp	ecx, [eax]
lea	ecx, [esp+30h+var_1A]
setb	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+30h+var_1A]
call	sub_4D4F40
test	al, al
jnz	short loc_610FA1

loc_610FE7:
mov	ecx, [ebx+esi*8+4]
call	sub_4D69B0
mov	ecx, [esp+30h+var_C]
mov	[esp+30h+var_14], eax
call	sub_4D69B0
mov	ecx, [eax]
mov	edx, [esp+30h+var_14]
cmp	ecx, [edx]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+34h+var_19]
call	sub_4D4F20
lea	ecx, [esp+30h+var_19]
call	sub_4D4F40
test	al, al
jz	short loc_611076
lea	eax, [ebx+esi*8+4]
jmp	short loc_611034
jmp	short loc_611030
align 10h

loc_611030:
mov	eax, [esp+30h+var_14]

loc_611034:
mov	ecx, [eax-8]
sub	eax, 8
dec	esi
mov	[esp+30h+var_14], eax
call	sub_4D69B0
mov	ecx, [esp+30h+var_C]
mov	[esp+30h+var_18], eax
call	sub_4D69B0
mov	edx, [eax]
mov	eax, [esp+30h+var_18]
cmp	edx, [eax]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+34h+var_19]
call	sub_4D4F20
lea	ecx, [esp+30h+var_19]
call	sub_4D4F40
test	al, al
jnz	short loc_611030

loc_611076:
cmp	esi, edi
jl	short loc_6110A2
jz	short loc_611098
mov	edx, [ebx+edi*8]
mov	eax, [ebx+esi*8]
mov	ecx, [ebx+esi*8+4]
mov	[ebx+esi*8], edx
mov	edx, [ebx+edi*8+4]
mov	[ebx+esi*8+4], edx
mov	[ebx+edi*8], eax
mov	[ebx+edi*8+4], ecx

loc_611098:
dec	esi
inc	edi
cmp	edi, esi
jle	loc_610F60

loc_6110A2:
mov	eax, [ebp+arg_4]
cmp	eax, esi
jge	short loc_6110B8
mov	ecx, [ebp+arg_C]
push	ecx
push	esi
push	eax
push	ebx
call	sub_610F30
add	esp, 10h

loc_6110B8:
cmp	edi, [ebp+arg_8]
jge	short loc_6110C5
mov	[ebp+arg_4], edi
jmp	loc_610F40

loc_6110C5:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_610F30 endp

align 10h



sub_6110D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
add	ebx, 78h
push	ebx
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	edi, [ebx+4]
mov	ebp, [esi+7Ch]
cmp	ebp, edi
jg	short loc_6110FA
mov	edi, ebp

loc_6110FA:
mov	ecx, [ebx+8]
and	ecx, 3FFFFFFFh
cmp	ecx, ebp
jge	short loc_61111C
add	ecx, ecx
cmp	ebp, ecx
jl	short loc_61110F
mov	ecx, ebp

loc_61110F:
push	10h
push	ecx
push	ebx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61111C:
mov	ecx, [esi+78h]
mov	eax, [ebx]
test	edi, edi
jle	short loc_611156
sub	ecx, eax
mov	edx, edi
lea	esp, [esp+0]

loc_611130:
mov	esi, [ecx+eax]
mov	[eax], esi
mov	esi, [ecx+eax+4]
mov	[eax+4], esi
mov	esi, [ecx+eax+8]
mov	[eax+8], esi
mov	esi, [ecx+eax+0Ch]
mov	[eax+0Ch], esi
add	eax, 10h
sub	edx, 1
jnz	short loc_611130
mov	esi, [esp+10h+arg_4]

loc_611156:
mov	esi, [esi+78h]
mov	ecx, [ebx]
mov	eax, edi
shl	eax, 4
add	esi, eax
add	ecx, eax
mov	eax, ebp
sub	eax, edi
test	eax, eax
jle	short loc_6111A6
mov	edi, ecx
sub	edi, esi
mov	[esp+10h+arg_4], eax

loc_611174:
lea	eax, [edi+esi]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_61119C
mov	ecx, [esi]
mov	[eax], ecx
mov	edx, [esi+4]
mov	[eax+4], edx
mov	ecx, [esi+8]
mov	[eax+8], ecx
mov	edx, [esi+0Ch]
mov	[eax+0Ch], edx

loc_61119C:
add	esi, 10h
sub	[esp+10h+arg_4], 1
jnz	short loc_611174

loc_6111A6:
pop	edi
pop	esi
mov	[ebx+4], ebp
pop	ebp
pop	ebx
retn	8
sub_6110D0 endp




sub_6111B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
mov	dword ptr [esi], offset	off_15F4D78
call	sub_AD3ED0
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_6111EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6111EA:
mov	eax, esi
pop	esi
retn	4
sub_6111B0 endp




; int __thiscall sub_6111F0(void *, char)
sub_6111F0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F4DE0
jz	short loc_611209
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_611209:
mov	eax, esi
pop	esi
retn	4
sub_6111F0 endp

align 10h



; int __thiscall sub_611210(void *, char)
sub_611210 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F4E00
jz	short loc_611229
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_611229:
mov	eax, esi
pop	esi
retn	4
sub_611210 endp

align 10h



sub_611230 proc	near
mov	eax, 1
mov	[edi+6], ax
mov	dword ptr [edi+8], offset off_15F4DE0
mov	dword ptr [edi+0Ch], offset off_15F4E00
push	esi
lea	esi, [edi+14h]
mov	dword ptr [edi], offset	off_15F4E10
mov	dword ptr [edi+8], offset off_15F4E20
mov	dword ptr [edi+0Ch], offset off_15F4E40
mov	[edi+10h], eax
call	sub_11F0F40
mov	eax, edi
pop	esi
retn
sub_611230 endp

align 10h



sub_611270 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+14h]
call	sub_6112C0
mov	ecx, esi
mov	dword ptr [esi+0Ch], offset off_15F4E00
mov	dword ptr [esi+8], offset off_15F4DE0
call	sub_4DA650
test	[esp+8+arg_0], 1
jz	short loc_6112B3
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6112B3:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_611270 endp

align 10h



sub_6112C0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
lea	esi, [edi+2Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_6112FC
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*2]
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_6112FC:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+20h]
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_611336
and	edx, 3FFFFFFFh
shl	edx, 4
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_611336:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+14h]
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_611374
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*2]
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_611374:
lea	ecx, [edi+8]
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
call	??1facet@locale@std@@UAE@XZ_3 ;	std::locale::facet::~facet(void)
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_6112C0 endp

align 10h



sub_6113A0 proc	near
sub	ecx, 8
jmp	sub_611270
sub_6113A0 endp

align 10h



sub_6113B0 proc	near
sub	ecx, 0Ch
jmp	sub_611270
sub_6113B0 endp

align 10h



sub_6113C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A71B10
test	[esp+4+arg_0], 1
jz	short loc_6113EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6113EA:
mov	eax, esi
pop	esi
retn	4
sub_6113C0 endp




sub_6113F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A89AD0
test	[esp+4+arg_0], 1
jz	short loc_61141A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61141A:
mov	eax, esi
pop	esi
retn	4
sub_6113F0 endp




sub_611420 proc	near

arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	eax
push	ecx
call	sub_A886B0
mov	dword ptr [esi], offset	off_15F3FDC
mov	byte ptr [esi+8], 2
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_611420 endp

align 10h


; Attributes: bp-based frame

sub_611440 proc	near

var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 24h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
nop

loc_611450:
mov	edi, [ebp+arg_8]
mov	ebx, [ebp+arg_4]
lea	eax, [ebx+edi]
sar	eax, 1
mov	ecx, [esi+eax*4]
mov	[esp+30h+var_20], ecx

loc_611462:
mov	ecx, [esi+ebx*4]
call	sub_4D69B0
mov	ecx, [esp+30h+var_20]
mov	[esp+30h+var_4], eax
call	sub_4D69B0
mov	edx, [esp+30h+var_4]
mov	ecx, [edx]
cmp	ecx, [eax]
lea	ecx, [esp+30h+var_22]
setb	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+30h+var_22]
call	sub_4D4F40
test	al, al
jz	short loc_6114DC
lea	esp, [esp+0]

loc_6114A0:
mov	ecx, [esi+ebx*4+4]
inc	ebx
call	sub_4D69B0
mov	ecx, [esp+30h+var_20]
mov	[esp+30h+var_4], eax
call	sub_4D69B0
mov	ecx, [esp+30h+var_4]
mov	edx, [ecx]
cmp	edx, [eax]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+34h+var_22]
call	sub_4D4F20
lea	ecx, [esp+30h+var_22]
call	sub_4D4F40
test	al, al
jnz	short loc_6114A0

loc_6114DC:
mov	ecx, [esi+edi*4]
call	sub_4D69B0
mov	ecx, [esp+30h+var_20]
mov	[esp+30h+var_4], eax
call	sub_4D69B0
mov	edx, [eax]
mov	eax, [esp+30h+var_4]
cmp	edx, [eax]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+34h+var_21]
call	sub_4D4F20
lea	ecx, [esp+30h+var_21]
call	sub_4D4F40
test	al, al
jz	short loc_611552

loc_611516:
mov	ecx, [esi+edi*4-4]
dec	edi
call	sub_4D69B0
mov	ecx, [esp+30h+var_20]
mov	[esp+30h+var_4], eax
call	sub_4D69B0
mov	eax, [eax]
mov	ecx, [esp+30h+var_4]
cmp	eax, [ecx]
lea	ecx, [esp+30h+var_21]
setb	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+30h+var_21]
call	sub_4D4F40
test	al, al
jnz	short loc_611516

loc_611552:
cmp	edi, ebx
jl	short loc_61156E
jz	short loc_611564
mov	ecx, [esi+ebx*4]
mov	eax, [esi+edi*4]
mov	[esi+edi*4], ecx
mov	[esi+ebx*4], eax

loc_611564:
dec	edi
inc	ebx
cmp	ebx, edi
jle	loc_611462

loc_61156E:
mov	eax, [ebp+arg_4]
cmp	eax, edi
jge	short loc_611584
mov	edx, [ebp+arg_C]
push	edx
push	edi
push	eax
push	esi
call	sub_611440
add	esp, 10h

loc_611584:
cmp	ebx, [ebp+arg_8]
jge	short loc_611591
mov	[ebp+arg_4], ebx
jmp	loc_611450

loc_611591:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_611440 endp

align 10h



sub_6115A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A705D0
test	[esp+4+arg_0], 1
jz	short loc_6115CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6115CA:
mov	eax, esi
pop	esi
retn	4
sub_6115A0 endp




sub_6115D0 proc	near
push	edi
mov	ecx, esi
call	sub_4D86E0
movaps	xmm0, xmmword ptr [edi+40h]
lea	eax, [edi+60h]
movaps	xmmword	ptr [esi+40h], xmm0
movaps	xmm0, xmmword ptr [edi+50h]
push	eax
lea	ecx, [esi+60h]
movaps	xmmword	ptr [esi+50h], xmm0
call	sub_4D67E0
lea	ecx, [edi+70h]
push	ecx
lea	ecx, [esi+70h]
call	sub_4D67E0
movaps	xmm0, xmmword ptr [edi+80h]
movaps	xmmword	ptr [esi+80h], xmm0
movaps	xmm0, xmmword ptr [edi+90h]
movaps	xmmword	ptr [esi+90h], xmm0
fld	dword ptr [edi+0A0h]
fstp	dword ptr [esi+0A0h]
fld	dword ptr [edi+0A4h]
fstp	dword ptr [esi+0A4h]
fld	dword ptr [edi+0A8h]
fstp	dword ptr [esi+0A8h]
mov	dl, [edi+0ACh]
mov	[esi+0ACh], dl
mov	al, [edi+0ADh]
mov	[esi+0ADh], al
mov	cl, [edi+0AEh]
mov	[esi+0AEh], cl
mov	eax, esi
retn
sub_6115D0 endp

align 10h



sub_611670 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebx
mov	ecx, 2
call	sub_A87600
mov	dword ptr [ebx], offset	off_15F489C
xor	eax, eax
mov	[ebx+8Ch], eax
mov	[ebx+90h], eax
mov	ecx, 80000000h
mov	[ebx+94h], ecx
mov	[ebx+98h], eax
mov	[ebx+9Ch], eax
mov	[ebx+0A0h], ecx
lea	eax, [ebx+10h]
mov	cl, bl
sub	cl, al
mov	[eax+10h], cl
mov	eax, ebx
pop	ebx
retn	4
sub_611670 endp

align 10h



sub_6116D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_127D800
test	[esp+4+arg_0], 1
jz	short loc_6116FA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6116FA:
mov	eax, esi
pop	esi
retn	4
sub_6116D0 endp




sub_611700 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	edi
xor	edi, edi
cmp	[ebp+4], edi
jle	short loc_611756
lea	ecx, [ecx+0]

loc_611710:
mov	eax, [ebp+0]
cmp	byte ptr [edi+eax], 0FFh
jz	short loc_611750
push	esi
lea	ecx, [esp+0Ch+arg_0]
mov	byte ptr [esp+0Ch+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_611742
push	2
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_611742:
mov	edx, [esi+4]
mov	eax, [esi]
lea	eax, [eax+edx*2]
mov	[eax], di
inc	dword ptr [esi+4]

loc_611750:
inc	edi
cmp	edi, [ebp+4]
jl	short loc_611710

loc_611756:
pop	edi
pop	ebp
retn	4
sub_611700 endp

align 10h



sub_611760 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_611790
test	[esp+4+arg_0], 1
jz	short loc_61178A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61178A:
mov	eax, edi
pop	edi
retn	4
sub_611760 endp




sub_611790 proc	near

var_1= byte ptr	-1

push	ecx
push	ebp
push	esi
mov	esi, [edi+28h]
mov	dword ptr [edi], offset	off_15F517C
test	esi, esi
jz	short loc_6117C2
movzx	eax, word ptr [esi+2]
call	sub_A700B0
mov	ebp, eax
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	ebp
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_6117C2:
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_6117F5
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx

loc_6117F5:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	dword ptr [edi], offset	off_15F3CFC
mov	ecx, edi
pop	ebp
add	esp, 4
jmp	sub_4DA650
sub_611790 endp

align 10h



sub_611820 proc	near
test	ecx, ecx
jz	short locret_61182C
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

locret_61182C:
retn
sub_611820 endp

align 10h



sub_611830 proc	near
mov	eax, offset unk_1965FF0
retn
sub_611830 endp

align 10h



sub_611840 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_A87130
test	[esp+4+arg_0], 1
jz	short loc_61186B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61186B:
mov	eax, esi
pop	esi
retn	4
sub_611840 endp

align 10h



; int __stdcall	sub_611880(__int16, int, int, int, int,	int, int, int, float)
sub_611880 proc	near

arg_0= word ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

mov	edx, [esp+arg_C]
fld	[esp+arg_20]
mov	[eax], edx
mov	edx, [esp+arg_10]
mov	[eax+4], edx
mov	edx, [esp+arg_14]
mov	dword ptr [eax+8], 1
fstp	dword ptr [eax+1Ch]
mov	[eax+10h], edx
mov	edx, [esp+arg_18]
mov	[eax+14h], edx
mov	edx, [esp+arg_1C]
mov	[eax+18h], edx
mov	edx, [esp+arg_4]
mov	[eax+28h], edx
mov	edx, [esp+arg_8]
mov	[eax+2Ch], edx
mov	dx, [esp+arg_0]
mov	[eax+24h], ecx
mov	dword ptr [eax+20h], 0
mov	[eax+30h], dx
cmp	dword ptr [ecx+8], 0
jnz	short loc_6118E2
mov	cx, [ecx+12h]
mov	[eax+32h], cx
retn	24h

loc_6118E2:
xor	edx, edx
mov	[eax+32h], dx
retn	24h
sub_611880 endp

align 10h



sub_6118F0 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	ecx, [eax+58h]
push	ebx
mov	ebx, [esp+0Ch+arg_10]
push	ebp
mov	ebp, [esp+10h+arg_4]
push	esi
push	edi
mov	edi, [eax+5Ch]
mov	[esp+18h+var_8], ecx
mov	[esp+18h+var_4], edi
call	sub_4D7180
mov	ecx, edi
mov	esi, eax
call	sub_4D7180
mov	ecx, esi
mov	edi, eax
call	sub_4D6F40
fstp	[esp+18h+arg_10]
mov	ecx, edi
call	sub_4D6F40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_10]
push	ecx		; float
fmul	[esp+1Ch+arg_4]
fstp	[esp+1Ch+arg_10]
fld	[esp+1Ch+arg_10]
fstp	[esp+1Ch+var_1C]
call	sub_4D5260
lea	ecx, [ebx+8]
fstp	[esp+1Ch+var_1C]
call	sub_4D81F0
fld	dword ptr [edi+8]
fstp	[esp+18h+arg_4]
push	ecx		; float
fld	dword ptr [esi+8]
fstp	[esp+1Ch+arg_10]
fld	[esp+1Ch+arg_10]
fmul	[esp+1Ch+arg_4]
fstp	[esp+1Ch+arg_10]
fld	[esp+1Ch+arg_10]
fstp	[esp+1Ch+var_1C]
call	sub_4D5260
fmul	ds:dbl_15FCE70
add	esp, 4
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fistp	[esp+18h+arg_10]
mov	al, byte ptr [esp+18h+arg_10]
mov	[ebx+0Dh], al
mov	byte ptr [ebx+0Eh], 0
mov	eax, [ebp+0Ch]
mov	ecx, ebp
test	eax, eax
jz	short loc_6119B9
jmp	short loc_6119B0
align 10h

loc_6119B0:
mov	ecx, eax
mov	eax, [ecx+0Ch]
test	eax, eax
jnz	short loc_6119B0

loc_6119B9:
call	sub_4D68D0
mov	ecx, [esp+18h+arg_0]
mov	ecx, [ecx+3Ch]
movzx	edi, byte ptr [ecx+8]
mov	edx, eax
mov	[esp+18h+arg_10], eax
movzx	eax, byte ptr [ecx+9]
lea	ecx, [eax+edi]
mov	[esp+18h+arg_0], eax
test	ecx, ecx
jz	loc_611A81
cmp	edx, [esp+18h+var_8]
jnz	short loc_6119F0
mov	edx, [esp+18h+arg_8]
mov	ecx, ebp
jmp	short loc_6119FE

loc_6119F0:
mov	edx, [esp+18h+var_4]
mov	ecx, [esp+18h+arg_8]
mov	[esp+18h+arg_10], edx
mov	edx, ebp

loc_6119FE:
mov	esi, [esp+18h+arg_C]
cmp	edi, esi
jl	short loc_611A08
mov	edi, esi

loc_611A08:
sub	esi, edi
cmp	eax, esi
jl	short loc_611A14
mov	eax, esi
mov	[esp+18h+arg_0], esi

loc_611A14:
cmp	dword ptr [ecx+4], 0FFFFFFFFh
lea	ebp, [ebx+edi*4+14h]
jnz	short loc_611A27
mov	esi, [ecx+0Ch]
test	esi, esi
jz	short loc_611A27
mov	ecx, esi

loc_611A27:
xor	esi, esi
test	ecx, ecx
jz	short loc_611A47
lea	ecx, [ecx+0]

loc_611A30:
cmp	esi, edi
jge	short loc_611A47
mov	eax, [ecx+4]
mov	[ebx+esi*4+14h], eax
mov	ecx, [ecx+0Ch]
mov	eax, [esp+18h+arg_0]
inc	esi
test	ecx, ecx
jnz	short loc_611A30

loc_611A47:
cmp	dword ptr [edx+4], 0FFFFFFFFh
jnz	short loc_611A56
mov	ecx, [edx+0Ch]
test	ecx, ecx
jz	short loc_611A56
mov	edx, ecx

loc_611A56:
xor	ecx, ecx
test	edx, edx
jz	short loc_611A73
lea	esp, [esp+0]

loc_611A60:
cmp	ecx, eax
jge	short loc_611A73
mov	esi, [edx+4]
mov	[ebp+ecx*4+0], esi
mov	edx, [edx+0Ch]
inc	ecx
test	edx, edx
jnz	short loc_611A60

loc_611A73:
mov	eax, [esp+18h+arg_10]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	14h

loc_611A81:
pop	edi
pop	esi
pop	ebp
mov	eax, edx
pop	ebx
add	esp, 8
retn	14h
sub_6118F0 endp

align 10h



sub_611A90 proc	near

var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= byte ptr -20Ch
var_200= byte ptr -200h

sub	esp, 214h
push	edi
mov	edi, eax
movzx	eax, word ptr [edx+4]
test	ax, ax
jnz	short loc_611AFC
push	200h
lea	eax, [esp+21Ch+var_200]
push	eax
lea	ecx, [esp+220h+var_20C]
call	sub_128DD50
push	offset aRemoveatandcop ; "removeAtAndCopy numContactPoints == 0"
lea	ecx, [esp+21Ch+var_20C]
call	sub_AD3930
mov	ecx, dword_196AFBC
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	1A2h
push	offset a_CollideHkpsim ; ".\\Collide\\hkpSimpleConstraintContactMgr"...
lea	eax, [esp+220h+var_200]
push	eax
push	724B10B6h
push	3
call	edx
test	eax, eax
jz	short loc_611AEB
int	3		; Trap to Debugger

loc_611AEB:
lea	ecx, [esp+218h+var_20C]
call	sub_AD3A20
pop	edi
add	esp, 214h
retn

loc_611AFC:
push	ebx
push	ebp
movzx	ebp, byte ptr [edx+0Ah]
push	esi
movsx	ebx, di
movsx	esi, bp
imul	esi, ebx
movzx	ebx, word ptr [edx+6]
movzx	eax, ax
dec	eax
mov	ecx, edi
shl	ecx, 5
shl	ebx, 5
add	esi, edx
cmp	edi, eax
mov	[edx+4], ax
lea	ecx, [ecx+edx+30h]
mov	[esp+224h+var_210], ebp
lea	esi, [ebx+esi+30h]
jge	short loc_611B72
mov	ebx, ebp
sar	ebx, 2
sub	eax, edi
mov	[esp+224h+var_214], eax
lea	ecx, [ecx+0]

loc_611B40:
lea	edi, [ecx+20h]
push	edi
call	sub_4D9C70
lea	edx, [esi+ebp]
mov	eax, edx
test	ebx, ebx
jle	short loc_611B67
sub	esi, edx
mov	ecx, ebx

loc_611B56:
mov	ebp, [eax]
mov	[esi+eax], ebp
add	eax, 4
sub	ecx, 1
jnz	short loc_611B56
mov	ebp, [esp+224h+var_210]

loc_611B67:
sub	[esp+224h+var_214], 1
mov	ecx, edi
mov	esi, edx
jnz	short loc_611B40

loc_611B72:
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 214h
retn
sub_611A90 endp

align 10h



sub_611B80 proc	near

arg_0= word ptr	 4
arg_4= word ptr	 8

mov	ax, [esp+arg_0]
mov	cx, [esp+arg_4]
cmp	ax, cx
movzx	eax, ax
jb	short locret_611B95
movzx	eax, cx

locret_611B95:
retn
sub_611B80 endp

align 10h



sub_611BA0 proc	near
mov	eax, 2
push	edi
lea	ecx, [esi+10h]
mov	[esi], ax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+50h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, 9
mov	[esi+90h], cx
mov	eax, 7
mov	edx, 8
mov	[esi+9Ch], dx
mov	ecx, eax
mov	[esi+0A8h], ax
mov	[esi+0ACh], cx
lea	edi, [esi+0B0h]
mov	edx, 4
lea	ecx, [edi+10h]
mov	[edi], dx
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [edi+40h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, 0Ch
mov	[esi+120h], ax
cmp	edi, edi
jnb	short loc_611C24
mov	ecx, edi
sub	ecx, edi
push	ecx		; size_t
push	0		; int
push	edi		; void *
call	_memset
add	esp, 0Ch

loc_611C24:
mov	eax, esi
pop	edi
retn
sub_611BA0 endp

align 10h


; Attributes: bp-based frame

sub_611C30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
fld	dword ptr [eax+10Ch]
mov	edx, [ebp+arg_0]
fstp	dword ptr [esi]
sub	esp, 10h
fld	dword ptr [eax+11Ch]
fmul	dword ptr [eax+10Ch]
fstp	dword ptr [esi+4]
fld	dword ptr [eax+110h]
fstp	dword ptr [esi+8]
fld	dword ptr [eax+120h]
fstp	dword ptr [esi+14h]
fld	dword ptr [eax+120h]
fmul	dword ptr [eax+11Ch]
fstp	dword ptr [esi+18h]
fld	dword ptr [eax+4]
fstp	dword ptr [esi+40h]
fld	dword ptr [eax+8]
mov	[esi+68h], edx
fstp	dword ptr [esi+44h]
fld	dword ptr [eax+54h]
fmul	dword ptr [eax+110h]
fstp	dword ptr [esi+20h]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+24h]
fld	dword ptr [eax+5Ch]
fmul	dword ptr [eax+110h]
fstp	dword ptr [esi+28h]
mov	edx, [ecx+8]
mov	[esi+0Ch], edx
mov	ecx, [ecx+0Ch]
mov	[esi+10h], ecx
fld	dword ptr [eax+128h]
push	ecx
lea	ecx, [esp+14h+var_10]
fstp	[esp+14h+var_14]
call	sub_4D5090
mov	edx, [esp+10h+var_10]
mov	eax, [esp+10h+var_C]
mov	ecx, [esp+10h+var_8]
mov	[esi+50h], edx
mov	edx, [esp+10h+var_4]
mov	[esi+54h], eax
mov	[esi+58h], ecx
mov	[esi+5Ch], edx
mov	esp, ebp
pop	ebp
retn	4
sub_611C30 endp

align 10h


; Attributes: bp-based frame

sub_611CF0 proc	near

var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 30h
movaps	xmm0, xmmword ptr [edi]
movaps	xmm1, xmmword ptr [esi]
movaps	xmm3, xmm0
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0D2h
shufps	xmm3, xmm0, 0C9h
mulps	xmm3, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0D2h
shufps	xmm1, xmm1, 0C9h
lea	eax, [esp+30h+var_20]
mulps	xmm2, xmm1
subps	xmm2, xmm3
shufps	xmm0, xmm0, 0FFh
push	eax
lea	ecx, [esp+34h+var_10]
movaps	[esp+34h+var_30], xmm2
movaps	[esp+34h+var_20], xmm0
call	sub_4D5050
movaps	xmm1, [esp+30h+var_10]
movaps	xmm0, xmmword ptr [esi]
shufps	xmm1, xmm1, 0
lea	ecx, [esp+30h+var_10]
mulps	xmm1, xmm0
addps	xmm1, [esp+30h+var_30]
push	ecx
shufps	xmm0, xmm0, 0FFh
lea	ecx, [esp+34h+var_20]
movaps	[esp+34h+var_30], xmm1
movaps	[esp+34h+var_10], xmm0
call	sub_4D5050
movaps	xmm1, [esp+30h+var_20]
movaps	xmm0, xmmword ptr [edi]
movaps	xmm2, xmm1
shufps	xmm2, xmm1, 0
movaps	xmm1, [esp+30h+var_30]
mulps	xmm2, xmm0
subps	xmm1, xmm2
movaps	[esp+30h+var_30], xmm1
movaps	xmm1, xmmword ptr [esi]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm0, xmm1, 4Eh
addps	xmm0, xmm1
movaps	xmm1, xmm0
lea	edx, [esp+30h+var_10]
shufps	xmm1, xmm0, 0B1h
addps	xmm1, xmm0
push	edx
lea	ecx, [esp+34h+var_20]
movaps	[esp+34h+var_10], xmm1
call	sub_4D5050
movaps	xmm0, [esp+30h+var_30]
movaps	xmm1, [esp+30h+var_20]
mov	eax, [ebp+arg_0]
movaps	xmm2, xmm0
shufps	xmm1, xmm1, 0
unpckhps xmm0, xmm1
shufps	xmm2, xmm0, 0C4h
movaps	xmmword	ptr [eax], xmm2
mov	esp, ebp
pop	ebp
retn	4
sub_611CF0 endp

align 10h



sub_611DE0 proc	near
mov	dl, 1
add	[eax+127h], dl
mov	cl, [eax+127h]
push	ebx
movzx	ebx, cl
sub	ebx, 4
test	bl, 7
pop	ebx
jnz	short loc_611E01
xor	[eax+125h], dl

loc_611E01:
test	cl, 7
jnz	short loc_611E0D
xor	byte ptr [eax+125h], 2

loc_611E0D:
test	cl, 0Fh
jnz	short locret_611E25
sub	dl, [eax+126h]
mov	byte ptr [eax+127h], 0
mov	[eax+126h], dl

locret_611E25:
retn
sub_611DE0 endp

align 10h



sub_611E30 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A84700
test	[esp+4+arg_0], 1
jz	short loc_611E5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_611E5A:
mov	eax, edi
pop	edi
retn	4
sub_611E30 endp



; Attributes: bp-based frame

sub_611E60 proc	near

var_1C=	dword ptr -1Ch
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 24h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
mov	esi, [ebp+arg_0]
push	edi

loc_611E72:
mov	eax, [ebp+arg_8]
lea	edx, [ebx+eax]
sar	edx, 1
mov	ecx, [esi+edx*8]
mov	edx, [esi+edx*8+4]
mov	edi, ebx
mov	[esp+30h+var_C], edx

loc_611E87:
cmp	[esi+edi*8], ecx
jnb	short loc_611E96
lea	esp, [esp+0]

loc_611E90:
inc	edi
cmp	[esi+edi*8], ecx
jb	short loc_611E90

loc_611E96:
cmp	ecx, [esi+eax*8]
jnb	short loc_611EA6
jmp	short loc_611EA0
align 10h

loc_611EA0:
dec	eax
cmp	ecx, [esi+eax*8]
jb	short loc_611EA0

loc_611EA6:
cmp	eax, edi
jl	short loc_611ED9
jz	short loc_611ED3
mov	ebx, [esi+eax*8+4]
mov	edx, [esi+eax*8]
mov	[esp+30h+var_1C], ebx
mov	ebx, [esi+edi*8]
mov	[esi+eax*8], ebx
mov	ebx, [esi+edi*8+4]
mov	[esi+eax*8+4], ebx
mov	ebx, [ebp+arg_4]
mov	[esi+edi*8], edx
mov	edx, [esp+30h+var_1C]
mov	[esi+edi*8+4], edx

loc_611ED3:
dec	eax
inc	edi
cmp	edi, eax
jle	short loc_611E87

loc_611ED9:
cmp	ebx, eax
jge	short loc_611EEC
mov	ecx, [ebp+arg_C]
push	ecx
push	eax
push	ebx
push	esi
call	sub_611E60
add	esp, 10h

loc_611EEC:
cmp	edi, [ebp+arg_8]
jge	short loc_611EFB
mov	ebx, edi
mov	[ebp+arg_4], ebx
jmp	loc_611E72

loc_611EFB:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_611E60 endp

align 10h



sub_611F10 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	dword ptr [ebx+30h], 0
push	edi
mov	edi, eax
jz	short loc_611F84
mov	eax, [edi]
mov	ecx, [esi+8]
push	eax
push	ecx
call	sub_4DDC50
mov	[esi+8], eax
mov	edx, [edi+4]
push	edx
push	eax
call	sub_4DDC50
mov	[esi+8], eax
mov	eax, [edi+4]
add	[esi+0Ch], eax
mov	ecx, [edi+8]
add	[esi+10h], ecx
mov	edx, [edi+0Ch]
add	[esi+14h], edx
mov	eax, [ebx+30h]
movzx	ecx, word ptr [eax+18h]
movzx	edx, word ptr [eax+14h]
add	ecx, [edi+0Ch]
add	edx, [edi+4]
mov	di, [edi+8]
add	[eax+16h], di
mov	[eax+18h], cx
mov	[eax+14h], dx
mov	eax, [ebx+30h]
movzx	ecx, word ptr [eax+14h]
mov	edx, [esi+8]
push	ecx
push	edx
call	sub_4DDC50
add	esp, 18h
mov	[esi+8], eax

loc_611F84:
pop	edi
pop	ebx
retn	4
sub_611F10 endp

align 10h


; Attributes: bp-based frame

sub_611F90 proc	near

var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 54h
push	ebx
push	esi
push	edi
lea	esp, [esp+0]

loc_611FA0:
mov	esi, [ebp+arg_8]
mov	edi, [ebp+arg_4]
mov	ebx, [ebp+arg_0]
lea	eax, [edi+esi]
sar	eax, 1
lea	eax, [eax+eax*4]
mov	ecx, [ebx+eax*4]
mov	edx, [ebx+eax*4+4]
lea	eax, [ebx+eax*4]
mov	[esp+60h+var_20], ecx
mov	ecx, [eax+8]
mov	[esp+60h+var_1C], edx
mov	edx, [eax+0Ch]
mov	eax, [eax+10h]
mov	[esp+60h+var_18], ecx
mov	[esp+60h+var_14], edx
mov	[esp+60h+var_10], eax
jmp	short loc_611FE0
align 10h

loc_611FE0:
lea	ecx, [edi+edi*4]
lea	eax, [ebx+ecx*4]
lea	edx, [esp+60h+var_20]
push	edx
push	eax
mov	[esp+68h+var_44], eax
lea	eax, [esp+68h+var_46]
push	eax
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_612038
mov	eax, [esp+60h+var_44]
jmp	short loc_612014
align 10h

loc_612010:
mov	eax, [esp+60h+var_44]

loc_612014:
lea	ecx, [esp+60h+var_20]
add	eax, 14h
push	ecx
push	eax
lea	edx, [esp+68h+var_46]
push	edx
inc	edi
mov	[esp+6Ch+var_44], eax
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_612010

loc_612038:
lea	eax, [esi+esi*4]
lea	eax, [ebx+eax*4]
push	eax
lea	ecx, [esp+64h+var_20]
push	ecx
lea	edx, [esp+68h+var_45]
push	edx
mov	[esp+6Ch+var_44], eax
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_612085
mov	ebx, [esp+60h+var_44]

loc_612062:
sub	ebx, 14h
push	ebx
lea	eax, [esp+64h+var_20]
push	eax
lea	ecx, [esp+68h+var_45]
push	ecx
dec	esi
call	[ebp+arg_C]
add	esp, 0Ch
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_612062
mov	ebx, [ebp+arg_0]

loc_612085:
cmp	esi, edi
jl	short loc_612103
jz	short loc_6120F9
lea	edx, [esi+esi*4]
lea	eax, [ebx+edx*4]
mov	edx, [eax]
mov	[esp+60h+var_40], edx
mov	edx, [eax+4]
mov	[esp+60h+var_3C], edx
mov	edx, [eax+8]
mov	[esp+60h+var_38], edx
mov	edx, [eax+0Ch]
mov	[esp+60h+var_34], edx
mov	edx, [eax+10h]
mov	[esp+60h+var_30], edx
lea	ecx, [edi+edi*4]
mov	edx, [ebx+ecx*4]
mov	[eax], edx
mov	edx, [ebx+ecx*4+4]
lea	ecx, [ebx+ecx*4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	eax, [esp+60h+var_40]
mov	edx, [esp+60h+var_3C]
mov	[ecx], eax
mov	eax, [esp+60h+var_38]
mov	[ecx+4], edx
mov	edx, [esp+60h+var_34]
mov	[ecx+8], eax
mov	eax, [esp+60h+var_30]
mov	[ecx+0Ch], edx
mov	[ecx+10h], eax

loc_6120F9:
dec	esi
inc	edi
cmp	edi, esi
jle	loc_611FE0

loc_612103:
mov	eax, [ebp+arg_4]
cmp	eax, esi
jge	short loc_612119
mov	ecx, [ebp+arg_C]
push	ecx
push	esi
push	eax
push	ebx
call	sub_611F90
add	esp, 10h

loc_612119:
cmp	edi, [ebp+arg_8]
jge	short loc_612126
mov	[ebp+arg_4], edi
jmp	loc_611FA0

loc_612126:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_611F90 endp

align 10h



sub_612130 proc	near
mov	eax, 1
retn
sub_612130 endp

align 10h



sub_612140 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_127AAD0
test	[esp+4+arg_0], 1
jz	short loc_61216A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61216A:
mov	eax, esi
pop	esi
retn	4
sub_612140 endp




sub_612170 proc	near
mov	eax, offset unk_1966024
retn
sub_612170 endp

align 10h



sub_612180 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A80970
test	[esp+4+arg_0], 1
jz	short loc_6121AA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6121AA:
mov	eax, edi
pop	edi
retn	4
sub_612180 endp




sub_6121B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_A7F030
test	[esp+4+arg_0], 1
jz	short loc_6121DC
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6121DC:
mov	eax, esi
pop	esi
retn	4
sub_6121B0 endp

align 10h



sub_6121F0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A7A660
test	[esp+4+arg_0], 1
jz	short loc_61221A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61221A:
mov	eax, edi
pop	edi
retn	4
sub_6121F0 endp




sub_612220 proc	near
fld	dword ptr [edx]
push	esi
fstp	dword ptr [eax]
push	edi
fld	dword ptr [edx+4]
lea	esi, [edx+64h]
fstp	dword ptr [eax+4]
lea	edi, [eax+64h]
fld	dword ptr [edx+8]
mov	ecx, 7
fstp	dword ptr [eax+8]
fld	dword ptr [edx+0Ch]
fstp	dword ptr [eax+0Ch]
movaps	xmm0, xmmword ptr [edx+10h]
movaps	xmmword	ptr [eax+10h], xmm0
movaps	xmm0, xmmword ptr [edx+20h]
movaps	xmmword	ptr [eax+20h], xmm0
movaps	xmm0, xmmword ptr [edx+30h]
movaps	xmmword	ptr [eax+30h], xmm0
movaps	xmm0, xmmword ptr [edx+40h]
movaps	xmmword	ptr [eax+40h], xmm0
fld	dword ptr [edx+50h]
fstp	dword ptr [eax+50h]
fld	dword ptr [edx+54h]
fstp	dword ptr [eax+54h]
fld	dword ptr [edx+58h]
fstp	dword ptr [eax+58h]
fld	dword ptr [edx+5Ch]
fstp	dword ptr [eax+5Ch]
fld	dword ptr [edx+60h]
fstp	dword ptr [eax+60h]
rep movsd
lea	esi, [edx+80h]
lea	edi, [eax+80h]
mov	ecx, 7
rep movsd
lea	esi, [edx+9Ch]
lea	edi, [eax+9Ch]
mov	ecx, 7
rep movsd
lea	esi, [edx+0B8h]
lea	edi, [eax+0B8h]
mov	ecx, 7
rep movsd
lea	esi, [edx+0D4h]
lea	edi, [eax+0D4h]
mov	ecx, 7
rep movsd
lea	esi, [edx+0F0h]
lea	edi, [eax+0F0h]
mov	ecx, 7
rep movsd
fld	dword ptr [edx+10Ch]
fstp	dword ptr [eax+10Ch]
fld	dword ptr [edx+110h]
fstp	dword ptr [eax+110h]
mov	ecx, [edx+114h]
mov	[eax+114h], ecx
mov	ecx, [edx+118h]
mov	[eax+118h], ecx
pop	edi
fld	dword ptr [edx+11Ch]
pop	esi
fstp	dword ptr [eax+11Ch]
fld	dword ptr [edx+120h]
fstp	dword ptr [eax+120h]
movzx	ecx, byte ptr [edx+124h]
mov	[eax+124h], cl
movzx	ecx, byte ptr [edx+125h]
mov	[eax+125h], cl
movzx	ecx, byte ptr [edx+126h]
mov	[eax+126h], cl
movzx	ecx, byte ptr [edx+127h]
mov	[eax+127h], cl
fld	dword ptr [edx+128h]
fstp	dword ptr [eax+128h]
retn
sub_612220 endp

align 10h



sub_612370 proc	near

arg_0= dword ptr  4

push	1
push	eax
mov	eax, [esp+8+arg_0]
call	sub_612380
retn	4
sub_612370 endp

align 10h



sub_612380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	eax
mov	eax, [esp+4+arg_4]
push	ecx
push	edx
call	sub_6123A0
retn	8
sub_612380 endp

align 10h



sub_6123A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	edi
mov	edi, eax
mov	eax, [esi+4]
lea	ecx, [eax+edi]
sub	eax, ebp
mov	[esp+10h+var_4], eax
mov	eax, [esi+8]
and	eax, 3FFFFFFFh
cmp	eax, ecx
mov	[esp+10h+arg_4], ecx
jge	short loc_6123DF
add	eax, eax
cmp	ecx, eax
jge	short loc_6123CE
mov	ecx, eax

loc_6123CE:
mov	eax, [esp+10h+arg_0]
push	4
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_6123DF:
mov	ecx, [esp+10h+var_4]
mov	eax, [esi]
lea	edx, ds:0[ecx*4]
lea	ebx, ds:0[ebp*4]
push	edx
lea	ecx, [ebx+eax]
add	ebp, edi
push	ecx
lea	edx, [eax+ebp*4]
push	edx
call	sub_AD3070
mov	eax, [esi]
add	esp, 0Ch
add	eax, ebx
test	edi, edi
jle	short loc_61242F
mov	ecx, [esp+10h+arg_8]
sub	ecx, eax

loc_612414:
mov	edx, [ecx+eax]
mov	[eax], edx
add	eax, 4
sub	edi, 1
jnz	short loc_612414
mov	eax, [esp+10h+arg_4]
pop	edi
pop	ebp
mov	[esi+4], eax
pop	ebx
pop	ecx
retn	0Ch

loc_61242F:
mov	ecx, [esp+10h+arg_4]
pop	edi
pop	ebp
mov	[esi+4], ecx
pop	ebx
pop	ecx
retn	0Ch
sub_6123A0 endp

align 10h



sub_612440 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A79010
test	[esp+4+arg_0], 1
jz	short loc_61246A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61246A:
mov	eax, esi
pop	esi
retn	4
sub_612440 endp




sub_612470 proc	near
sub	ecx, 8
jmp	sub_612440
sub_612470 endp

align 10h



sub_612480 proc	near
sub	ecx, 0Ch
jmp	sub_612440
sub_612480 endp

align 10h



sub_612490 proc	near
sub	ecx, 10h
jmp	sub_612440
sub_612490 endp

align 10h



sub_6124A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebp
push	edi
mov	edi, [esp+0Ch+arg_0]
fld	dword ptr [edi+4]
fsub	dword ptr [edi]
fstp	[esp+0Ch+var_4]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+1D0h]
fld	[esp+0Ch+var_4]
fld	st
fadd	dword ptr [eax+8]
fstp	dword ptr [esi+1D4h]
fst	dword ptr [esi+1D8h]
fld1
fdivrp	st(1), st
fstp	dword ptr [esi+1DCh]
fld	dword ptr [esi+1D0h]
fsub	dword ptr [edi]
mov	eax, [esi+8]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fld	st
fadd	dword ptr [eax+14h]
fstp	dword ptr [eax+14h]
fld	dword ptr [esi+1D0h]
fstp	dword ptr [eax+18h]
fld	ds:dword_15439C8
fcomp	dword ptr [eax+20h]
fnstsw	ax
test	ah, 44h
jnp	short loc_612517
mov	eax, [esi+8]
fld	dword ptr [eax+20h]
fadd	st, st(1)
fstp	dword ptr [eax+20h]

loc_612517:
xor	ebp, ebp
cmp	[esi+2Ch], ebp
jle	short loc_612587
fstp	st
push	ebx

loc_612521:
mov	eax, [esi+28h]
mov	ebx, [eax+ebp*4]
xor	edi, edi
cmp	[ebx+4Ch], edi
jle	short loc_612554
mov	edi, edi

loc_612530:
mov	ecx, [ebx+48h]
mov	ecx, [ecx+edi*4]
call	sub_4D7280
mov	ecx, eax
call	sub_4D69E0
fld	[esp+10h+var_4]
fadd	dword ptr [eax+4Ch]
add	eax, 4Ch
inc	edi
fstp	dword ptr [eax]
cmp	edi, [ebx+4Ch]
jl	short loc_612530

loc_612554:
mov	edx, [esi+78h]
fld	dword ptr [esi+1D4h]
mov	eax, [esp+10h+arg_0]
push	edx		; int
sub	esp, 8
fstp	[esp+1Ch+var_18]
fld	dword ptr [eax+4]
fstp	[esp+1Ch+var_1C]
push	ebx		; int
call	sub_11F1620
inc	ebp
add	esp, 10h
cmp	ebp, [esi+2Ch]
jl	short loc_612521
fld	[esp+10h+var_4]
mov	edi, [esp+10h+arg_0]
pop	ebx

loc_612587:
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [edx+38h]
push	ecx
fstp	[esp+10h+var_10]
call	eax
mov	ecx, [esi+1D0h]
mov	[edi], ecx
mov	edx, [esi+1D4h]
mov	[edi+4], edx
mov	eax, [esi+1D8h]
mov	[edi+8], eax
mov	ecx, [esi+1DCh]
mov	[edi+0Ch], ecx
mov	eax, [esi+78h]
mov	edx, [esi+1D0h]
add	eax, 50h
mov	[eax], edx
mov	ecx, [esi+1D4h]
mov	[eax+4], ecx
mov	edx, [esi+1D8h]
mov	[eax+8], edx
mov	ecx, [esi+1DCh]
pop	edi
mov	[eax+0Ch], ecx
pop	ebp
pop	ecx
retn	4
sub_6124A0 endp

align 10h



; int __thiscall sub_6125F0(void *, char)
sub_6125F0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F5A58
jz	short loc_612609
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_612609:
mov	eax, esi
pop	esi
retn	4
sub_6125F0 endp

align 10h



sub_612610 proc	near
add	ecx, 20h
call	sub_4D4F40
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_612610 endp

align 10h



sub_612630 proc	near

arg_0= dword ptr  4

cmp	byte ptr [esp+arg_0], 0
setz	al
movzx	edx, al
mov	[esp+arg_0], edx
add	ecx, 20h
jmp	sub_4D4F20
sub_612630 endp

align 10h



sub_612650 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146AFFC
jz	short loc_612678
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	18h
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_612678:
mov	eax, esi
pop	esi
retn	4
sub_612650 endp

align 10h



; int __thiscall sub_612680(void *, char)
sub_612680 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146AFFC
jz	short loc_612699
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_612699:
mov	eax, esi
pop	esi
retn	4
sub_612680 endp

align 10h



sub_6126A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A784F0
test	[esp+4+arg_0], 1
jz	short loc_6126CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6126CA:
mov	eax, esi
pop	esi
retn	4
sub_6126A0 endp




sub_6126D0 proc	near
sub	ecx, 14h
jmp	sub_6126A0
sub_6126D0 endp

align 10h



sub_6126E0 proc	near
sub	ecx, 18h
jmp	sub_6126A0
sub_6126E0 endp

align 10h



sub_6126F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A76FE0
test	[esp+4+arg_0], 1
jz	short loc_61271A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61271A:
mov	eax, esi
pop	esi
retn	4
sub_6126F0 endp




; int __thiscall sub_612720(void *, char)
sub_612720 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi+4], offset off_146BA5C
mov	dword ptr [esi], offset	off_146BA68
jz	short loc_612740
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_612740:
mov	eax, esi
pop	esi
retn	4
sub_612720 endp

align 10h



sub_612750 proc	near
sub	ecx, 14h
jmp	sub_6126F0
sub_612750 endp

align 10h



sub_612760 proc	near
sub	ecx, 18h
jmp	sub_6126F0
sub_612760 endp

align 10h



sub_612770 proc	near
sub	ecx, 1Ch
jmp	sub_6126F0
sub_612770 endp

align 10h



sub_612780 proc	near
sub	ecx, 4
jmp	sub_612720
sub_612780 endp

align 10h



sub_612790 proc	near
sub	ecx, 20h
jmp	sub_6126F0
sub_612790 endp

align 10h



sub_6127A0 proc	near
fld	ds:flt_15FD430
mov	eax, ecx
mov	ecx, 1
mov	[eax+6], cx
mov	byte ptr [eax+8], 0
fstp	dword ptr [eax+0Ch]
fld	ds:flt_15FCED8
mov	dword ptr [eax], offset	off_1472AB0
fstp	dword ptr [eax+10h]
retn
sub_6127A0 endp

align 10h



sub_6127D0 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, 2
lea	ecx, [esi+10h]
mov	[esi], ax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+50h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld1
mov	ecx, 0Ch
fstp	[esp+4+var_4]
mov	[esi+90h], cx
mov	edx, 5
lea	eax, [esi+97h]
lea	ecx, [esp+4+var_4]
mov	[esi+94h], dx
mov	byte ptr [esi+96h], 0
call	sub_AD3670
fld	ds:dword_15FCC88
fstp	dword ptr [esi+98h]
mov	eax, esi
pop	ecx
retn
sub_6127D0 endp

align 10h



sub_612830 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
mov	eax, 2
push	edi
lea	ecx, [esi+10h]
mov	[esi], ax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+50h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, 13h
mov	[esi+90h], cx
lea	edi, [esi+92h]
mov	ecx, edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ebx, 1
push	ebx
mov	ecx, edi
call	sub_4D4F20
fld1
xor	edx, edx
fstp	[esp+0Ch+var_4]
mov	[esi+94h], dx
xor	eax, eax
mov	[esi+96h], ax
mov	[esi+0E2h], bl
mov	[esi+0E4h], bl
mov	ecx, 11h
mov	[esi+0E0h], cx
mov	[esi+0EEh], bl
mov	edx, 0Fh
mov	[esi+0ECh], dx
mov	eax, 10h
mov	[esi+100h], ax
xor	al, al
mov	[esi+106h], al
mov	[esi+102h], bl
mov	ecx, 10h
mov	[esi+114h], cx
mov	[esi+11Ah], al
mov	[esi+116h], bl
mov	edx, 5
mov	[esi+12Ah], al
lea	eax, [esi+12Bh]
lea	ecx, [esp+0Ch+var_4]
mov	[esi+128h], dx
call	sub_AD3670
fld	ds:dword_15FCC88
pop	edi
fstp	dword ptr [esi+12Ch]
mov	eax, esi
pop	ebx
pop	ecx
retn
sub_612830 endp

align 10h



sub_612920 proc	near
mov	eax, [ecx+1Ch]
retn
sub_612920 endp

align 10h



sub_612930 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A74C60
test	[esp+4+arg_0], 1
jz	short loc_61295A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61295A:
mov	eax, edi
pop	edi
retn	4
sub_612930 endp




sub_612960 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A74020
test	[esp+4+arg_0], 1
jz	short loc_61298A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61298A:
mov	eax, esi
pop	esi
retn	4
sub_612960 endp




sub_612990 proc	near
mov	eax, 4
lea	ecx, [esi+10h]
mov	[esi], ax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+40h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, 0Fh
mov	[esi+70h], cx
mov	al, 1
mov	[esi+72h], al
mov	edx, 10h
mov	[esi+86h], al
xor	cl, cl
mov	[esi+84h], dx
mov	[esi+8Ah], cl
mov	[esi+9Ah], al
mov	[esi+98h], dx
mov	[esi+9Eh], cl
mov	eax, esi
retn
sub_612990 endp

align 10h



sub_6129F0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6112C0
test	[esp+4+arg_0], 1
jz	short loc_612A1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_612A1A:
mov	eax, edi
pop	edi
retn	4
sub_6129F0 endp




sub_612A20 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [eax]
mov	eax, [ecx+58h]
mov	ecx, [ecx+5Ch]
mov	ecx, [ecx+0D4h]
mov	eax, [eax+0D4h]
xor	edx, edx
or	edx, ecx
mov	ecx, [edi+58h]
mov	edi, [edi+5Ch]
mov	ecx, [ecx+0D4h]
mov	edi, [edi+0D4h]
xor	esi, esi
xor	ebp, ebp
or	eax, esi
or	ecx, ebp
or	esi, edi
cmp	eax, ecx
ja	short loc_612A7B
jb	short loc_612A68
cmp	edx, esi
jnb	short loc_612A7B

loc_612A68:
mov	al, 1
mov	ecx, ebx
push	eax
call	sub_4D4F20
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_612A7B:
xor	al, al
mov	ecx, ebx
push	eax
call	sub_4D4F20
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn	4
sub_612A20 endp

align 10h



sub_612A90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	eax, [ecx+58h]
mov	ecx, [ecx+5Ch]
mov	ecx, [ecx+0D4h]
mov	eax, [eax+0D4h]
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
push	esi
push	edi
mov	edi, [ebx]
xor	edx, edx
or	edx, ecx
mov	ecx, [edi+58h]
mov	edi, [edi+5Ch]
mov	ecx, [ecx+0D4h]
mov	edi, [edi+0D4h]
xor	esi, esi
xor	ebp, ebp
or	eax, esi
or	ecx, ebp
or	esi, edi
cmp	eax, ecx
jb	short loc_612B07
ja	short loc_612ADC
cmp	edx, esi
jb	short loc_612B07

loc_612ADC:
cmp	edx, esi
jnz	short loc_612AF0
cmp	eax, ecx
jnz	short loc_612AF0
mov	edx, [esp+10h+arg_0]
mov	eax, [edx+0Ch]
cmp	eax, [ebx+0Ch]
jl	short loc_612B07

loc_612AF0:
mov	esi, [esp+10h+arg_4]
xor	al, al
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_612B07:
mov	esi, [esp+10h+arg_4]
mov	eax, 1
push	eax
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_612A90 endp

align 10h


; Attributes: bp-based frame

sub_612B30 proc	near

var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 34h
push	ebx
push	esi
push	edi
lea	esp, [esp+0]

loc_612B40:
mov	eax, [ebp+arg_4]
mov	esi, [ebp+arg_8]
mov	ebx, [ebp+arg_0]
mov	edi, eax
add	eax, esi
sar	eax, 1
shl	eax, 4
mov	ecx, [eax+ebx]
mov	edx, [eax+ebx+4]
add	eax, ebx
mov	[esp+40h+var_20], ecx
mov	ecx, [eax+8]
mov	[esp+40h+var_1C], edx
mov	edx, [eax+0Ch]
mov	[esp+40h+var_18], ecx
mov	[esp+40h+var_14], edx

loc_612B71:
lea	ecx, [esp+40h+var_20]
mov	eax, edi
push	ecx
shl	eax, 4
lea	edx, [esp+44h+var_26]
add	eax, ebx
push	edx
push	eax
mov	[esp+4Ch+var_24], eax
call	sub_612A90
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_612BC7
mov	eax, [esp+40h+var_24]
jmp	short loc_612BA4
align 10h

loc_612BA0:
mov	eax, [esp+40h+var_24]

loc_612BA4:
lea	ecx, [esp+40h+var_20]
push	ecx
lea	edx, [esp+44h+var_26]
add	eax, 10h
push	edx
push	eax
inc	edi
mov	[esp+4Ch+var_24], eax
call	sub_612A90
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_612BA0

loc_612BC7:
mov	eax, esi
shl	eax, 4
add	eax, ebx
push	eax
lea	ecx, [esp+44h+var_25]
push	ecx
lea	edx, [esp+48h+var_20]
push	edx
mov	[esp+4Ch+var_24], eax
call	sub_612A90
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_612C13
mov	ebx, [esp+40h+var_24]

loc_612BF1:
sub	ebx, 10h
push	ebx
lea	eax, [esp+44h+var_25]
push	eax
lea	ecx, [esp+48h+var_20]
push	ecx
dec	esi
call	sub_612A90
mov	ecx, eax
call	sub_4D4F40
test	al, al
jnz	short loc_612BF1
mov	ebx, [ebp+arg_0]

loc_612C13:
cmp	esi, edi
jl	short loc_612C79
jz	short loc_612C6F
mov	eax, esi
shl	eax, 4
mov	edx, [eax+ebx]
add	eax, ebx
mov	ecx, edi
shl	ecx, 4
add	ecx, ebx
mov	ebx, [eax+4]
mov	[esp+40h+var_C], ebx
mov	ebx, [eax+8]
mov	[esp+40h+var_8], ebx
mov	ebx, [eax+0Ch]
mov	[esp+40h+var_4], ebx
mov	ebx, [ecx]
mov	[eax], ebx
mov	ebx, [ecx+4]
mov	[eax+4], ebx
mov	ebx, [ecx+8]
mov	[eax+8], ebx
mov	ebx, [ecx+0Ch]
mov	[eax+0Ch], ebx
mov	eax, [esp+40h+var_8]
mov	ebx, [ebp+arg_0]
mov	[ecx], edx
mov	edx, [esp+40h+var_C]
mov	[ecx+4], edx
mov	edx, [esp+40h+var_4]
mov	[ecx+8], eax
mov	[ecx+0Ch], edx

loc_612C6F:
dec	esi
inc	edi
cmp	edi, esi
jle	loc_612B71

loc_612C79:
mov	eax, [ebp+arg_4]
cmp	eax, esi
jge	short loc_612C8F
mov	ecx, [ebp+arg_C]
push	ecx
push	esi
push	eax
push	ebx
call	sub_612B30
add	esp, 10h

loc_612C8F:
cmp	edi, [ebp+arg_8]
jge	short loc_612C9C
mov	[ebp+arg_4], edi
jmp	loc_612B40

loc_612C9C:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_612B30 endp

align 10h



sub_612CB0 proc	near
sub	ecx, 8
jmp	sub_6129F0
sub_612CB0 endp

align 10h



sub_612CC0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	eax, [esi+4]
sub	eax, 1
js	short loc_612CDD
mov	ecx, [esi]

loc_612CD2:
cmp	byte ptr [ecx+eax], 0FFh
jz	short loc_612D1B
sub	eax, 1
jns	short loc_612CD2

loc_612CDD:
push	esi
lea	ecx, [esp+0Ch+arg_0]
mov	[esp+0Ch+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_612D06
push	1
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_612D06:
mov	eax, [esi]
add	eax, [esi+4]
mov	[eax], bl
inc	dword ptr [esi+4]
mov	esi, [esi+4]
lea	eax, [esi-1]
pop	esi
pop	ebx
retn	4

loc_612D1B:
pop	esi
mov	[ecx+eax], bl
pop	ebx
retn	4
sub_612CC0 endp

align 10h



sub_612D30 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A72780
test	[esp+4+arg_0], 1
jz	short loc_612D5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_612D5A:
mov	eax, edi
pop	edi
retn	4
sub_612D30 endp




sub_612D60 proc	near
mov	eax, 2
push	edi
lea	ecx, [esi+10h]
mov	[esi], ax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+50h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, 0Bh
mov	[esi+90h], cx
lea	edi, [esi+92h]
mov	ecx, edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	1
mov	ecx, edi
call	sub_4D4F20
xor	edx, edx
mov	[esi+94h], dx
xor	eax, eax
mov	[esi+96h], ax
mov	ecx, 0Ah
mov	[esi+0A0h], cx
mov	byte ptr [esi+0A2h], 1
mov	eax, 7
mov	edx, 0Dh
mov	[esi+0A8h], dx
mov	[esi+0ACh], ax
mov	ecx, eax
mov	edx, 9
mov	[esi+0B0h], cx
mov	[esi+0B4h], dx
mov	eax, esi
pop	edi
retn
sub_612D60 endp

align 10h



sub_612E00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A71350
test	[esp+4+arg_0], 1
jz	short loc_612E2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_612E2A:
mov	eax, esi
pop	esi
retn	4
sub_612E00 endp




sub_612E30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A70CE0
test	[esp+4+arg_0], 1
jz	short loc_612E5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_612E5A:
mov	eax, esi
pop	esi
retn	4
sub_612E30 endp



; Attributes: bp-based frame

sub_612E60 proc	near

var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 30h
add	dword ptr [eax], 4
mov	eax, [eax]
mov	eax, [eax]
mov	edx, [ebp+arg_0]
add	eax, 2
shl	eax, 4
movaps	xmm0, xmmword ptr [eax+esi]
push	ecx
movaps	[esp+34h+var_10], xmm0
movaps	xmm0, xmmword ptr [esi]
push	edx
lea	eax, [esp+38h+var_30]
movaps	[esp+38h+var_30], xmm0
movaps	xmm0, xmmword ptr [esi+10h]
push	eax
movaps	[esp+3Ch+var_20], xmm0
call	sub_A13160
add	esp, 0Ch
inc	dword ptr [esi+0B8h]
mov	esp, ebp
pop	ebp
retn	4
sub_612E60 endp

align 10h


; Attributes: bp-based frame

sub_612EB0 proc	near

var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 3Ch
add	dword ptr [eax], 4
mov	eax, [eax]
mov	eax, [eax]
mov	ecx, dword_1692E34[eax*4]
mov	edx, dword_1692E38[eax*4]
add	ecx, 5
shl	ecx, 4
movaps	xmm0, xmmword ptr [ecx+esi]
add	edx, 5
push	ebx
mov	ebx, [ebp+arg_0]
add	eax, 8
movaps	[esp+40h+var_20], xmm0
shl	edx, 4
movaps	xmm0, xmmword ptr [edx+esi]
shl	eax, 4
movaps	[esp+40h+var_30], xmm0
movaps	xmm0, xmmword ptr [eax+esi]
push	edi
lea	eax, [esp+44h+var_30]
push	ebx
push	eax
movaps	[esp+4Ch+var_10], xmm0
call	sub_A12D60
movaps	xmm1, [esp+4Ch+var_20]
movaps	xmm0, ds:xmmword_1573EB0
push	edi
xorps	xmm0, xmm1
movaps	xmm1, [esp+50h+var_30]
lea	ecx, [esp+50h+var_30]
push	ebx
push	ecx
movaps	[esp+58h+var_20], xmm1
movaps	[esp+58h+var_30], xmm0
call	sub_A12D60
add	esp, 18h
add	dword ptr [esi+0B8h], 2
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_612EB0 endp

align 10h


; Attributes: bp-based frame

sub_612F50 proc	near

var_60=	xmmword	ptr -60h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 6Ch
movaps	xmm0, xmmword ptr [esi+50h]
push	ebx
mov	ebx, [ebp+arg_0]
movaps	[esp+70h+var_30], xmm0
movaps	xmm0, xmmword ptr [esi+90h]
push	edi
lea	eax, [esp+74h+var_30]
movaps	[esp+74h+var_10], xmm0
movaps	xmm0, xmmword ptr [esi+70h]
push	ebx
push	eax
movaps	[esp+7Ch+var_20], xmm0
call	sub_A12D60
movaps	xmm0, xmmword ptr [esi+60h]
movaps	[esp+7Ch+var_60], xmm0
movaps	xmm0, xmmword ptr [esi+0A0h]
push	edi
lea	ecx, [esp+80h+var_60]
movaps	[esp+80h+var_40], xmm0
movaps	xmm0, [esp+80h+var_30]
push	ebx
push	ecx
movaps	[esp+88h+var_50], xmm0
call	sub_A12D60
movaps	xmm0, xmmword ptr [esi+80h]
movaps	[esp+88h+var_40], xmm0
movaps	xmm0, [esp+88h+var_60]
push	edi
lea	edx, [esp+8Ch+var_60]
movaps	[esp+8Ch+var_50], xmm0
movaps	xmm0, [esp+8Ch+var_20]
push	ebx
push	edx
movaps	[esp+94h+var_60], xmm0
call	sub_A12D60
add	esp, 24h
add	dword ptr [esi+0B8h], 3
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_612F50 endp

align 10h


; Attributes: bp-based frame

sub_612FF0 proc	near

var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 40h
add	dword ptr [eax], 4
mov	eax, [eax]
mov	eax, [eax]
add	eax, 2
shl	eax, 4
movaps	xmm0, xmmword ptr [eax+esi]
mov	eax, [ecx]
movaps	[esp+40h+var_20], xmm0
movaps	xmm0, xmmword ptr [esi]
movaps	[esp+40h+var_40], xmm0
movaps	xmm0, xmmword ptr [esi+10h]
movaps	[esp+40h+var_30], xmm0
fld	dword ptr [eax]
fstp	[esp+40h+var_10]
lea	edx, [eax+10h]
fld	dword ptr [eax+4]
mov	eax, [ebp+arg_4]
mov	[ecx], edx
fstp	[esp+40h+var_C]
mov	ecx, [ebp+arg_0]
push	eax
push	ecx
lea	edx, [esp+48h+var_40]
push	edx
call	sub_A13910
add	esp, 0Ch
inc	dword ptr [esi+0B8h]
mov	esp, ebp
pop	ebp
retn	8
sub_612FF0 endp

align 10h


; Attributes: bp-based frame

sub_613060 proc	near

var_20=	xmmword	ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 2Ch
add	dword ptr [eax], 4
fld	ds:dword_1479C58
mov	eax, [eax]
mov	eax, [eax]
fstp	[esp+2Ch+var_4]
push	edi
mov	edi, ecx
lea	ecx, [eax+5]
shl	ecx, 4
movaps	xmm0, xmmword ptr [ecx+edi]
movaps	[esp+30h+var_20], xmm0
call	sub_A70BC0
fstp	[esp+30h+var_8]
mov	ecx, [esi]
fld	dword ptr [ecx]
lea	edx, [ecx+10h]
fstp	[esp+30h+var_10]
mov	[esi], edx
fld	dword ptr [ecx+4]
fstp	[esp+30h+var_C]
fldz
fld	[esp+30h+var_8]
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FCC20
fld	ds:dbl_15FCC90
test	ah, 5
jp	short loc_6130EE
fxch	st(3)
fcom	dword ptr [ecx+8]
fnstsw	ax
test	ah, 5
jp	short loc_6130EC
fld	dword ptr [ecx+8]
fsub	st, st(3)
fcomp	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_6130EC
fxch	st(2)
fadd	st, st(1)
fstp	[esp+30h+var_8]
fld	[esp+30h+var_8]
fxch	st(2)

loc_6130EC:
fxch	st(3)

loc_6130EE:
fxch	st(2)
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_613121
fxch	st(3)
fcomp	dword ptr [ecx+8]
fnstsw	ax
test	ah, 41h
jnz	short loc_613123
fld	st(2)
fsub	dword ptr [ecx+8]
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_613125
fsubp	st(1), st
fstp	[esp+30h+var_8]
fld	[esp+30h+var_8]
jmp	short loc_613127

loc_613121:
fstp	st(3)

loc_613123:
fstp	st(1)

loc_613125:
fstp	st

loc_613127:
mov	eax, [ebp+arg_4]
fstp	dword ptr [ecx+8]
mov	ecx, [ebp+arg_0]
push	eax
push	ecx
lea	edx, [esp+38h+var_20]
push	edx
call	sub_A0D720
add	esp, 0Ch
inc	dword ptr [edi+0B8h]
pop	edi
mov	esp, ebp
pop	ebp
retn	8
sub_613060 endp

align 10h


; Attributes: bp-based frame

sub_613150 proc	near

var_A4=	dword ptr -0A4h
var_A0=	xmmword	ptr -0A0h
var_90=	xmmword	ptr -90h
var_80=	xmmword	ptr -80h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	xmmword	ptr -60h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0B0h
add	dword ptr [eax], 4
fld	ds:dword_1479C58
mov	eax, [eax]
mov	ecx, [eax]
fstp	[esp+0B0h+var_64]
lea	eax, [ecx+5]
shl	eax, 4
mov	edx, [eax+esi]
add	eax, esi
mov	dword ptr [esp+0B0h+var_90], edx
mov	edx, [eax+4]
mov	dword ptr [esp+0B0h+var_90+4], edx
mov	edx, [eax+8]
mov	eax, [eax+0Ch]
mov	dword ptr [esp+0B0h+var_90+0Ch], eax
lea	eax, [ecx+8]
shl	eax, 4
mov	ecx, [eax+esi]
add	eax, esi
mov	dword ptr [esp+0B0h+var_90+8], edx
mov	edx, [eax+4]
movaps	xmm2, [esp+0B0h+var_90]
mov	dword ptr [esp+0B0h+var_A0], ecx
mov	ecx, [eax+8]
mov	dword ptr [esp+0B0h+var_A0+4], edx
mov	edx, [eax+0Ch]
mov	dword ptr [esp+0B0h+var_A0+8], ecx
movaps	xmm0, xmm2
shufps	xmm0, xmm2, 0C9h
mov	dword ptr [esp+0B0h+var_A0+0Ch], edx
movaps	xmm1, [esp+0B0h+var_A0]
movaps	xmm3, xmm1
shufps	xmm3, xmm1, 0D2h
mulps	xmm0, xmm3
movaps	xmm3, xmm2
shufps	xmm3, xmm2, 0D2h
shufps	xmm1, xmm1, 0C9h
mulps	xmm3, xmm1
subps	xmm0, xmm3
movaps	[esp+0B0h+var_80], xmm0
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+0B0h+var_50]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+0B4h+var_10]
movaps	[esp+0B4h+var_50], xmm2
call	sub_4D5050
lea	ecx, [esp+0B0h+var_10]
call	sub_4D50D0
fcomp	ds:dword_1480254
fnstsw	ax
test	ah, 5
jnp	loc_61335B
movaps	xmm0, [esp+0B0h+var_80]
mulps	xmm0, xmm0
movaps	xmm1, xmm0
lea	ecx, [esp+0B0h+var_20]
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
push	ecx
addss	xmm2, xmm1
lea	ecx, [esp+0B4h+var_60]
movaps	[esp+0B4h+var_20], xmm2
call	sub_4D5050
fldz
movaps	xmm1, [esp+0B0h+var_60]
fstp	[esp+0B0h+var_A4]
fld	dword ptr off_17E66B4
xorps	xmm0, xmm0
movss	xmm2, [esp+0B0h+var_A4]
movss	xmm0, xmm2
movaps	xmm2, xmm0
movaps	xmm0, [esp+0B0h+var_60]
fstp	[esp+0B0h+var_A4]
movss	xmm4, [esp+0B0h+var_A4]
fld	ds:dword_1479C58
movaps	xmm3, xmm0
fstp	[esp+0B0h+var_A4]
cmpeqss	xmm3, xmm2
rsqrtss	xmm1, xmm1
mulss	xmm0, xmm1
mulss	xmm0, xmm1
xorps	xmm2, xmm2
movss	xmm2, xmm4
movss	xmm4, [esp+0B0h+var_A4]
subss	xmm2, xmm0
xorps	xmm0, xmm0
movss	xmm0, xmm4
mulss	xmm0, xmm1
lea	edx, [esp+0B0h+var_40]
mulss	xmm0, xmm2
andnps	xmm3, xmm0
push	edx
lea	ecx, [esp+0B4h+var_30]
movaps	[esp+0B4h+var_40], xmm3
call	sub_4D5050
fld	dword ptr [esp+0B0h+var_90+4]
fmul	dword ptr [esp+0B0h+var_A0+4]
movaps	xmm0, [esp+0B0h+var_30]
fld	dword ptr [esp+0B0h+var_90]
mov	eax, [edi]
fmul	dword ptr [esp+0B0h+var_A0]
mov	edx, [ebp+arg_4]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+0B0h+var_80]
faddp	st(1), st
fld	dword ptr [esp+0B0h+var_90+8]
mulps	xmm1, xmm0
fmul	dword ptr [esp+0B0h+var_A0+8]
movaps	[esp+0B0h+var_80], xmm1
lea	ecx, [eax+10h]
push	edx
faddp	st(1), st
mov	[edi], ecx
lea	ecx, [esp+0B4h+var_80]
fstp	[esp+0B4h+var_68]
fld	dword ptr [eax]
fstp	[esp+0B4h+var_70]
fld	dword ptr [eax+4]
mov	eax, [ebp+arg_0]
push	eax
fstp	[esp+0B8h+var_6C]
push	ecx
call	sub_A0D720
add	esp, 0Ch
inc	dword ptr [esi+0B8h]

loc_61335B:
mov	esp, ebp
pop	ebp
retn	8
sub_613150 endp

align 10h


; Attributes: bp-based frame

sub_613370 proc	near

var_20=	byte ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 20h
mov	eax, [edx]
fld	ds:dword_1479C58
mov	ecx, [eax+4]
add	eax, 8
mov	[edx], eax
mov	eax, [eax]
fstp	[esp+20h+var_4]
lea	edx, [esp+20h+var_8]
push	edx
lea	edx, [esp+24h+var_20]
push	edx
lea	edx, [eax+8]
add	eax, 5
shl	eax, 4
shl	edx, 4
add	eax, esi
add	edx, esi
push	edx
push	eax
lea	eax, [ecx+8]
add	ecx, 5
shl	eax, 4
add	eax, esi
shl	ecx, 4
push	eax
add	ecx, esi
push	ecx
call	sub_A17DD0
mov	eax, [edi]
fld	dword ptr [eax]
mov	edx, [ebp+arg_4]
fstp	[esp+38h+var_10]
lea	ecx, [eax+10h]
fld	dword ptr [eax+4]
mov	eax, [ebp+arg_0]
push	edx
fstp	[esp+3Ch+var_C]
mov	[edi], ecx
push	eax
lea	ecx, [esp+40h+var_20]
push	ecx
call	sub_A0D720
add	esp, 24h
inc	dword ptr [esi+0B8h]
mov	esp, ebp
pop	ebp
retn	8
sub_613370 endp

align 10h


; Attributes: bp-based frame

sub_613400 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 98h
add	dword ptr [eax], 4
mov	eax, [eax]
push	ebx
mov	ebx, [ecx]
fld	dword ptr [ebx+4]
push	esi
mov	esi, [eax]
fstp	[esp+0A0h+var_94]
mov	eax, [ebp+arg_4]
fld	dword ptr [ebx+8]
mov	edx, [eax+64h]
fstp	[esp+0A0h+var_8C]
fld	dword ptr [ebx]
lea	eax, [ebx+10h]
mov	[esp+0A0h+var_90], esi
mov	[esp+0A0h+var_88], edx
mov	[ecx], eax
call	__ftol2_sse
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+34h]
mov	eax, [edx+eax*4]
mov	ecx, [esp+0A0h+var_90]
mov	edx, dword_1692E38[ecx*4]
mov	[esp+0A0h+var_80], eax
lea	eax, [esi+5]
shl	eax, 4
add	eax, edi
mov	[esp+0A0h+var_7C], eax
lea	eax, dword_1692E34[esi*4]
mov	esi, [eax]
add	esi, 5
add	edx, 8
shl	esi, 4
movaps	xmm1, xmmword ptr [esi+edi]
shl	edx, 4
movaps	xmm0, xmmword ptr [edx+edi]
mulps	xmm0, xmm1
add	esi, edi
mov	[esp+0A0h+var_84], eax
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+0A0h+var_40]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+0A4h+var_60]
movaps	[esp+0A4h+var_40], xmm2
call	sub_4D5050
lea	ecx, [esp+0A0h+var_60]
call	sub_4D50D0
fstp	[esp+0A0h+var_90]
mov	ecx, [esp+0A0h+var_84]
mov	edx, [ecx]
movaps	xmm1, xmmword ptr [esi]
add	edx, 8
shl	edx, 4
movaps	xmm0, xmmword ptr [edx+edi]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+0A0h+var_30]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+0A4h+var_50]
movaps	[esp+0A4h+var_30], xmm2
call	sub_4D5050
lea	ecx, [esp+0A0h+var_50]
call	sub_4D50D0
fstp	[esp+0A0h+var_84]
fld	[esp+0A0h+var_84]
sub	esp, 8
fchs
fstp	[esp+0A8h+var_A4]
fld	[esp+0A8h+var_90]
fchs
fstp	[esp+0A8h+var_A8]
call	sub_4D5380
fld	ds:dbl_15FCC90
fadd	st(1), st
add	esp, 8
fxch	st(1)
fstp	[esp+0A0h+var_90]
fld	[esp+0A0h+var_90]
fld	st
fsub	[esp+0A0h+var_94]
fld	ds:dbl_15FD420
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_613560
fstp	st
fstp	st(1)
fld	[esp+0A0h+var_8C]
fadd	ds:dbl_15FCC40
jmp	short loc_613575

loc_613560:
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_613579
fld	[esp+0A0h+var_8C]
fsub	ds:dbl_15FCC40

loc_613575:
fstp	[esp+0A0h+var_8C]

loc_613579:
cmp	[esp+0A0h+var_80], 0
fld	dword ptr [ebx]
fstp	[esp+0A0h+var_94]
movss	xmm0, [esp+0A0h+var_94]
fstp	[esp+0A0h+var_94]
movss	xmm1, [esp+0A0h+var_94]
fld	[esp+0A0h+var_8C]
fstp	[esp+0A0h+var_94]
movss	xmm2, [esp+0A0h+var_94]
fldz
fstp	[esp+0A0h+var_94]
movss	xmm3, [esp+0A0h+var_94]
unpcklps xmm0, xmm2
unpcklps xmm1, xmm3
unpcklps xmm0, xmm1
movaps	xmmword	ptr [ebx], xmm0
jz	loc_61364E
lea	ecx, [esp+0A0h+var_70]
call	sub_4D6F90
mov	ecx, [ebp+arg_8]
mov	esi, [ecx]
mov	ebx, [ebp+arg_4]
mov	eax, [esp+0A0h+var_7C]
lea	edx, [esp+0A0h+var_78]
push	edx
push	esi
push	ebx
push	eax
call	sub_A0D960
fldz
mov	ecx, [esp+0B0h+var_88]
mov	eax, [edi+0B8h]
mov	[esp+0B0h+var_74], ebx
mov	edx, [ecx+eax*8]
mov	[esp+0B0h+var_70], edx
mov	eax, [ecx+eax*8+4]
fstp	[esp+0B0h+var_68]
fld	[esp+0B0h+var_8C]
lea	ecx, [esp+0B0h+var_18]
fmul	ds:dbl_15FCC20
push	ecx
lea	edx, [esp+0B4h+var_78]
mov	[esp+0B4h+var_6C], eax
fadd	[esp+0B4h+var_90]
mov	eax, [esp+0B4h+var_80]
push	edx
push	eax
fstp	[esp+0BCh+var_88]
fld	[esp+0BCh+var_88]
fchs
fstp	[esp+0BCh+var_64]
call	sub_A13DA0
mov	ecx, [ebp+arg_8]
push	ecx
push	esi
lea	edx, [esp+0C4h+var_18]
push	ebx
push	edx
call	sub_A0DA60
add	esp, 2Ch

loc_61364E:
inc	dword ptr [edi+0B8h]
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_613400 endp

align 10h


; Attributes: bp-based frame

sub_613660 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 5Ch
add	dword ptr [eax], 4
mov	eax, [eax]
mov	eax, [eax]
mov	edx, [edi+64h]
mov	[esp+5Ch+var_5C], eax
mov	eax, [ecx]
fld	dword ptr [eax]
mov	[esp+5Ch+var_58], edx
lea	edx, [eax+10h]
push	ebx
mov	[ecx], edx
call	__ftol2_sse
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+34h]
mov	ebx, [edx+eax*4]
mov	eax, [esp+60h+var_5C]
movaps	xmm1, xmmword ptr [esi+10h]
movaps	xmm0, xmmword ptr [esi]
add	eax, 2
shl	eax, 4
mov	ecx, [eax+esi]
mov	edx, [eax+esi+4]
add	eax, esi
mov	dword ptr [esp+60h+var_50], ecx
mov	ecx, [eax+8]
mov	dword ptr [esp+60h+var_50+4], edx
mov	edx, [eax+0Ch]
subps	xmm0, xmm1
mov	dword ptr [esp+60h+var_50+8], ecx
mov	dword ptr [esp+60h+var_50+0Ch],	edx
movaps	xmm1, [esp+60h+var_50]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+60h+var_40]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+64h+var_20]
movaps	[esp+64h+var_40], xmm2
call	sub_4D5050
lea	ecx, [esp+60h+var_20]
call	sub_4D50D0
fstp	[esp+60h+var_5C]
test	ebx, ebx
jz	short loc_613782
lea	ecx, [esp+60h+var_18]
call	sub_4D6F90
mov	ecx, [ebp+arg_4]
mov	eax, [ecx]
lea	edx, [esp+60h+var_20]
push	edx
push	eax
mov	[esp+68h+var_54], eax
push	edi
lea	eax, [esi+10h]
push	eax
lea	eax, [esp+70h+var_50]
push	eax
call	sub_A14010
fldz
mov	eax, [esi+0B8h]
mov	ecx, [esp+74h+var_58]
mov	edx, [ecx+eax*8]
mov	[esp+74h+var_18], edx
mov	eax, [ecx+eax*8+4]
fstp	[esp+74h+var_10]
fld	[esp+74h+var_5C]
lea	ecx, [esp+74h+var_40]
push	ecx
fchs
lea	edx, [esp+78h+var_20]
fstp	[esp+78h+var_C]
push	edx
push	ebx
mov	[esp+80h+var_14], eax
mov	[esp+80h+var_1C], edi
call	sub_A13DA0
mov	eax, [ebp+arg_4]
mov	ecx, [esp+80h+var_54]
push	eax
push	ecx
lea	edx, [esp+88h+var_40]
push	edi
push	edx
call	sub_A14170
add	esp, 30h

loc_613782:
inc	dword ptr [esi+0B8h]
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_613660 endp

align 10h



sub_613790 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
mov	eax, [esp+18h+arg_0]
add	dword ptr [eax], 4
mov	eax, [eax]
mov	eax, [eax]
add	eax, 5
shl	eax, 4
add	eax, esi
mov	[esp+18h+var_14], eax
mov	eax, [edx]
fld	dword ptr [eax]
push	edi
lea	edi, [eax+10h]
fstp	[esp+1Ch+var_C]
mov	eax, [ecx+64h]
mov	[edx], edi
mov	edx, [esi+0B8h]
lea	edx, [eax+edx*8]
mov	eax, [esp+1Ch+arg_4]
push	eax
push	ecx
lea	ecx, [esp+24h+var_14]
mov	edi, 1
push	ecx
mov	[esp+28h+var_8], edi
mov	[esp+28h+var_10], edx
call	sub_A12E90
add	esp, 0Ch
add	[esi+0B8h], edi
pop	edi
add	esp, 18h
retn	8
sub_613790 endp

align 10h



sub_613800 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, 2
push	edi
lea	ecx, [esi+10h]
mov	[esi], ax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esi+50h]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, 12h
mov	[esi+90h], cx
lea	edi, [esi+92h]
mov	ecx, edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	1
mov	ecx, edi
call	sub_4D4F20
fld1
xor	edx, edx
fstp	[esp+8+var_4]
mov	[esi+94h], dx
xor	eax, eax
mov	[esi+96h], ax
mov	byte ptr [esi+0A6h], 1
mov	byte ptr [esi+0A8h], 1
mov	ecx, 11h
mov	[esi+0A4h], cx
mov	edx, 0Eh
mov	[esi+0B0h], dx
mov	byte ptr [esi+0B2h], 1
mov	eax, 0Ch
mov	[esi+0C0h], ax
mov	ecx, 5
mov	[esi+0C4h], cx
lea	eax, [esi+0C7h]
lea	ecx, [esp+8+var_4]
mov	byte ptr [esi+0C6h], 0
call	sub_AD3670
fld	ds:dword_15FCC88
fstp	dword ptr [esi+0C8h]
mov	eax, esi
pop	edi
pop	ecx
retn
sub_613800 endp

; START	OF FUNCTION CHUNK FOR sub_129D8F0

loc_6138C0:
mov	dword ptr [eax], offset	off_1472A9C
mov	edx, 1
mov	[eax+6], dx
mov	dl, [ecx+8]
mov	dword ptr [eax], offset	off_1472AB0
mov	[eax+8], dl
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+10h]
mov	dword ptr [eax], offset	off_15F500C
fstp	dword ptr [eax+10h]
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	edx, [ecx+20h]
mov	[eax+20h], edx
mov	ecx, [ecx+24h]
mov	[eax+24h], ecx
retn
; END OF FUNCTION CHUNK	FOR sub_129D8F0
align 10h



sub_613910 proc	near

arg_0= dword ptr  4

push	eax
mov	eax, [esp+4+arg_0]
push	ecx
call	sub_613920
retn	4
sub_613910 endp

align 10h



sub_613920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, eax
movzx	eax, word ptr [esi+4]
movzx	ecx, word ptr [esi+6]
lea	ebp, [eax+1]
sub	eax, ebx
and	ecx, 3FFFh
cmp	ecx, ebp
push	edi
mov	[esp+10h+arg_0], eax
jge	short loc_61395B
lea	eax, [ecx+ecx]
cmp	ebp, eax
jl	short loc_61394E
mov	eax, ebp

loc_61394E:
push	eax
call	sub_124D9C0
mov	eax, [esp+14h+arg_0]
add	esp, 4

loc_61395B:
mov	edx, [esi]
lea	edi, [ebx+ebx*2]
shl	edi, 4
lea	ecx, [edx+edi]
push	ecx
lea	ecx, [ebx+ebx*2+3]
lea	eax, [eax+eax*2]
shl	ecx, 4
shl	eax, 4
add	ecx, edx
call	sub_AD2F60
mov	edx, [esp+14h+arg_4]
mov	ecx, [esi]
push	edx
add	ecx, edi
mov	eax, 30h
call	sub_AD2F60
add	esp, 8
pop	edi
mov	[esi+4], bp
pop	esi
pop	ebp
pop	ebx
retn	8
sub_613920 endp

align 10h



sub_6139A0 proc	near
mov	ax, [edi]
lea	ecx, [edi+10h]
push	ecx
lea	ecx, [esi+10h]
mov	[esi], ax
call	sub_4D86E0
lea	edx, [edi+50h]
push	edx
lea	ecx, [esi+50h]
call	sub_4D86E0
mov	eax, [edi+90h]
mov	[esi+90h], eax
mov	ecx, [edi+94h]
mov	[esi+94h], ecx
mov	edx, [edi+98h]
mov	[esi+98h], edx
mov	eax, [edi+9Ch]
mov	[esi+9Ch], eax
mov	ecx, [edi+0A0h]
mov	[esi+0A0h], ecx
mov	edx, [edi+0A4h]
mov	[esi+0A4h], edx
mov	eax, [edi+0A8h]
mov	[esi+0A8h], eax
mov	ecx, [edi+0ACh]
mov	[esi+0ACh], ecx
mov	edx, [edi+0B0h]
mov	[esi+0B0h], edx
mov	eax, [edi+0B4h]
mov	[esi+0B4h], eax
mov	ecx, [edi+0B8h]
mov	[esi+0B8h], ecx
mov	edx, [edi+0BCh]
mov	[esi+0BCh], edx
mov	eax, [edi+0C0h]
mov	[esi+0C0h], eax
mov	ecx, [edi+0C4h]
mov	[esi+0C4h], ecx
mov	edx, [edi+0C8h]
mov	[esi+0C8h], edx
mov	eax, esi
retn
sub_6139A0 endp

align 10h



sub_613A80 proc	near
mov	ax, [edi]
lea	ecx, [edi+10h]
push	ecx
lea	ecx, [esi+10h]
mov	[esi], ax
call	sub_4D86E0
lea	edx, [edi+50h]
push	edx
lea	ecx, [esi+50h]
call	sub_4D86E0
mov	eax, [edi+90h]
mov	[esi+90h], eax
mov	ecx, [edi+94h]
mov	[esi+94h], ecx
mov	edx, [edi+98h]
mov	[esi+98h], edx
mov	eax, [edi+9Ch]
mov	[esi+9Ch], eax
mov	ecx, [edi+0A0h]
mov	[esi+0A0h], ecx
mov	edx, [edi+0A4h]
mov	[esi+0A4h], edx
mov	eax, [edi+0A8h]
mov	[esi+0A8h], eax
mov	ecx, [edi+0ACh]
mov	[esi+0ACh], ecx
mov	edx, [edi+0B0h]
lea	eax, [edi+0B4h]
mov	[esi+0B0h], edx
mov	ecx, [eax]
mov	[esi+0B4h], ecx
mov	edx, [eax+4]
mov	[esi+0B8h], edx
mov	eax, [eax+8]
mov	[esi+0BCh], eax
mov	eax, esi
retn
sub_613A80 endp

align 10h



sub_613B30 proc	near
movzx	eax, word ptr [edi]
lea	ecx, [edi+10h]
push	ecx
lea	ecx, [esi+10h]
mov	[esi], ax
call	sub_4D86E0
lea	edx, [edi+50h]
push	edx
lea	ecx, [esi+50h]
call	sub_4D86E0
movzx	eax, word ptr [edi+90h]
mov	[esi+90h], ax
mov	cl, [edi+92h]
mov	[esi+92h], cl
mov	dx, [edi+94h]
mov	[esi+94h], dx
movzx	eax, word ptr [edi+96h]
lea	ecx, [edi+0A0h]
push	ecx
lea	ecx, [esi+0A0h]
mov	[esi+96h], ax
call	sub_4D5430
mov	edx, [edi+0D0h]
mov	[esi+0D0h], edx
mov	eax, [edi+0D4h]
mov	[esi+0D4h], eax
mov	ecx, [edi+0D8h]
mov	[esi+0D8h], ecx
mov	edx, [edi+0E0h]
mov	[esi+0E0h], edx
mov	eax, [edi+0E4h]
mov	[esi+0E4h], eax
mov	ecx, [edi+0E8h]
mov	[esi+0E8h], ecx
mov	edx, [edi+0ECh]
mov	[esi+0ECh], edx
mov	eax, [edi+0F0h]
mov	[esi+0F0h], eax
mov	ecx, [edi+0F4h]
mov	[esi+0F4h], ecx
mov	edx, [edi+0F8h]
mov	[esi+0F8h], edx
mov	eax, [edi+0FCh]
mov	[esi+0FCh], eax
mov	ecx, [edi+100h]
mov	[esi+100h], ecx
mov	edx, [edi+104h]
mov	[esi+104h], edx
mov	eax, [edi+108h]
mov	[esi+108h], eax
mov	ecx, [edi+10Ch]
mov	[esi+10Ch], ecx
mov	edx, [edi+110h]
mov	[esi+110h], edx
mov	eax, [edi+114h]
mov	[esi+114h], eax
mov	ecx, [edi+118h]
mov	[esi+118h], ecx
mov	edx, [edi+11Ch]
mov	[esi+11Ch], edx
mov	eax, [edi+120h]
mov	[esi+120h], eax
mov	ecx, [edi+124h]
mov	[esi+124h], ecx
mov	edx, [edi+128h]
mov	[esi+128h], edx
mov	eax, [edi+12Ch]
mov	[esi+12Ch], eax
mov	eax, esi
retn
sub_613B30 endp

align 10h



sub_613CB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_11F0110
test	[esp+4+arg_0], 1
jz	short loc_613CDC
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_613CDC:
mov	eax, esi
pop	esi
retn	4
sub_613CB0 endp

align 10h



sub_613CF0 proc	near
sub	ecx, 14h
jmp	sub_613CB0
sub_613CF0 endp

align 10h



sub_613D00 proc	near
sub	ecx, 8
jmp	sub_613CB0
sub_613D00 endp

align 10h



sub_613D10 proc	near
sub	ecx, 0Ch
jmp	sub_613CB0
sub_613D10 endp

align 10h



sub_613D20 proc	near
sub	ecx, 10h
jmp	sub_613CB0
sub_613D20 endp

align 10h



sub_613D30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11EFF50
test	[esp+4+arg_0], 1
jz	short loc_613D5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_613D5A:
mov	eax, esi
pop	esi
retn	4
sub_613D30 endp




sub_613D60 proc	near
sub	ecx, 8
jmp	sub_613D30
sub_613D60 endp

align 10h



sub_613D70 proc	near
sub	ecx, 0Ch
jmp	sub_613D30
sub_613D70 endp

align 10h



sub_613D80 proc	near
sub	ecx, 10h
jmp	sub_613D30
sub_613D80 endp

align 10h



sub_613D90 proc	near
sub	ecx, 14h
jmp	sub_613D30
sub_613D90 endp

align 10h



sub_613DA0 proc	near
mov	eax, offset unk_1964D5C
retn
sub_613DA0 endp

align 10h



sub_613DB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A6E4F0
test	[esp+4+arg_0], 1
jz	short loc_613DDA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_613DDA:
mov	eax, esi
pop	esi
retn	4
sub_613DB0 endp




sub_613DE0 proc	near
sub	ecx, 0Ch
jmp	sub_613DB0
sub_613DE0 endp

align 10h



sub_613DF0 proc	near
sub	ecx, 8
jmp	sub_613DB0
sub_613DF0 endp

align 10h



sub_613E00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_127A550
test	[esp+4+arg_0], 1
jz	short loc_613E2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_613E2A:
mov	eax, esi
pop	esi
retn	4
sub_613E00 endp




; int __thiscall sub_613E30(void *, char)
sub_613E30 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F60B0
jz	short loc_613E49
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_613E49:
mov	eax, esi
pop	esi
retn	4
sub_613E30 endp

align 10h



sub_613E50 proc	near

arg_0= dword ptr  4

push	esi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+4+arg_0]
movzx	esi, word ptr [ecx+4]
mov	edx, [eax]
push	esi
push	ecx
mov	ecx, eax
mov	eax, [edx+8]
call	eax
pop	esi
retn
sub_613E50 endp

align 10h



sub_613E80 proc	near
mov	eax, offset aPhysics_4 ; "Physics"
retn
sub_613E80 endp

align 10h



sub_613E90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11EF940
test	[esp+4+arg_0], 1
jz	short loc_613EBA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_613EBA:
mov	eax, esi
pop	esi
retn	4
sub_613E90 endp




sub_613EC0 proc	near
sub	ecx, 58h
jmp	sub_613E90
sub_613EC0 endp

align 10h



sub_613ED0 proc	near
sub	ecx, 5Ch
jmp	sub_613E90
sub_613ED0 endp

align 10h



sub_613EE0 proc	near
sub	ecx, 60h
jmp	sub_613E90
sub_613EE0 endp

align 10h



sub_613EF0 proc	near
sub	ecx, 64h
jmp	sub_613E90
sub_613EF0 endp

align 10h



sub_613F00 proc	near
sub	ecx, 8
jmp	sub_613E90
sub_613F00 endp

align 10h



sub_613F10 proc	near
sub	ecx, 68h
jmp	sub_613E90
sub_613F10 endp

align 10h



sub_613F20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A6C7E0
test	[esp+4+arg_0], 1
jz	short loc_613F4A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_613F4A:
mov	eax, esi
pop	esi
retn	4
sub_613F20 endp



; Attributes: bp-based frame

sub_613F50 proc	near

var_44=	dword ptr -44h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 34h
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
push	edi
mov	edi, ecx
add	edi, 0FFFFFFFFh
mov	esi, eax
js	loc_613FF8
lea	esp, [esp+0]

loc_613F70:
mov	ecx, esi
call	sub_4D6870
fstp	[esp+40h+var_28]
mov	ecx, esi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld	[esp+40h+var_28]
mov	ecx, esi
fstp	dword ptr [eax+0Ch]
call	sub_4D69E0
movaps	xmm0, xmmword ptr [eax]
movaps	xmm1, xmmword ptr [ebx]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+40h+var_20]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+44h+var_10]
movaps	[esp+44h+var_20], xmm2
call	sub_4D5050
lea	ecx, [esp+40h+var_10]
call	sub_4D50D0
fstp	[esp+40h+var_24]
fld	[esp+40h+var_24]
push	ecx
fchs
mov	ecx, esi
fmul	[esp+44h+var_28]
fstp	[esp+44h+var_24]
fld	[esp+44h+var_24]
fstp	[esp+44h+var_44]
call	sub_4D6890
add	esi, 30h
sub	edi, 1
jns	loc_613F70

loc_613FF8:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_613F50 endp

align 10h


; Attributes: bp-based frame

sub_614010 proc	near

var_54=	dword ptr -54h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	xmmword	ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 58h
push	ebx
push	esi
mov	ecx, edi
mov	esi, eax
call	sub_4D69E0
mov	ecx, esi
mov	ebx, eax
call	sub_4D69E0
movaps	xmm1, xmmword ptr [eax]
movaps	xmm0, xmmword ptr [ebx]
mulps	xmm0, xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+60h+var_50]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+64h+var_20]
movaps	[esp+64h+var_50], xmm2
call	sub_4D5050
lea	ecx, [esp+60h+var_20]
call	sub_4D50D0
fld1
mov	ecx, [ebp+arg_0]
fsubrp	st(1), st
fstp	[esp+60h+var_54]
fld	dword ptr [ecx+60h]
mov	ecx, esi
fmul	st, st
fmul	[esp+60h+var_54]
fstp	[esp+60h+var_54]
call	sub_4D6870
mov	ecx, edi
fstp	qword ptr [esp+60h+var_50]
call	sub_4D6870
fsubr	qword ptr [esp+60h+var_50]
mov	edx, [esi+28h]
xorps	xmm0, xmm0
fstp	dword ptr [esp+60h+var_50]
push	edx
fld	dword ptr [esp+64h+var_50]
movaps	[esp+64h+var_20], xmm0
fmul	st, st
movaps	[esp+64h+var_30], xmm0
fstp	dword ptr [esp+64h+var_50]
call	sub_4D7260
mov	ebx, eax
add	esp, 4
test	ebx, ebx
jz	short loc_6140D7
lea	eax, [esp+60h+var_30]
push	eax
mov	ecx, esi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
mov	ecx, ebx
call	sub_4D73D0

loc_6140D7:
mov	ecx, [edi+28h]
movaps	xmm0, [esp+60h+var_20]
push	ecx
movaps	[esp+64h+var_40], xmm0
call	sub_4D7260
mov	esi, eax
add	esp, 4
test	esi, esi
jz	short loc_614107
lea	edx, [esp+60h+var_40]
push	edx
mov	ecx, edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
mov	ecx, esi
call	sub_4D73D0

loc_614107:
movaps	xmm1, [esp+60h+var_40]
movaps	xmm0, [esp+60h+var_30]
subps	xmm0, xmm1
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
movaps	xmm2, xmm0
lea	eax, [esp+60h+var_20]
addss	xmm1, xmm0
shufps	xmm2, xmm0, 0AAh
addss	xmm2, xmm1
push	eax
lea	ecx, [esp+64h+var_10]
movaps	[esp+64h+var_20], xmm2
call	sub_4D5050
lea	ecx, [esp+60h+var_10]
call	sub_4D50D0
fmul	ds:dbl_15FCCA8
fld	[esp+60h+var_54]
pop	esi
fmul	ds:dbl_15FCE18
pop	ebx
faddp	st(1), st
fadd	dword ptr [esp+58h+var_50]
fstp	dword ptr [esp+58h+var_50]
fld	dword ptr [esp+58h+var_50]
mov	esp, ebp
pop	ebp
retn	4
sub_614010 endp

align 10h



sub_614170 proc	near
sub	ecx, 8
jmp	sub_613F20
sub_614170 endp

align 10h



sub_614180 proc	near
sub	ecx, 0Ch
jmp	sub_613F20
sub_614180 endp

align 10h



sub_614190 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_127A440
test	[esp+4+arg_0], 1
jz	short loc_6141BA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6141BA:
mov	eax, esi
pop	esi
retn	4
sub_614190 endp




sub_6141C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6141CF
call	sub_AD6020

loc_6141CF:
mov	dword ptr [esi+0Ch], 0
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6141E2
call	sub_AD6020

loc_6141E2:
mov	ecx, esi
mov	dword ptr [esi+8], 0
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_614212
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614212:
mov	eax, esi
pop	esi
retn	4
sub_6141C0 endp

align 10h



sub_614220 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_6142A0
test	[esp+4+arg_0], 1
jz	short loc_61424B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61424B:
mov	eax, esi
pop	esi
retn	4
sub_614220 endp

align 10h



sub_614260 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_614340
test	[esp+4+arg_0], 1
jz	short loc_61428B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61428B:
mov	eax, esi
pop	esi
retn	4
sub_614260 endp

align 10h



sub_6142A0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
mov	ecx, [edi+14h]
xor	esi, esi
cmp	ecx, esi
jz	short loc_6142B9
call	sub_AD6020

loc_6142B9:
mov	[edi+14h], esi
add	edi, 8
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [edi+4]
mov	ebp, [edi]
mov	ecx, eax
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_6142FE
lea	ecx, [ecx+0]

loc_6142E0:
mov	ecx, [ebp+esi*4+0]
test	ecx, ecx
jz	short loc_6142ED
call	sub_AD6020

loc_6142ED:
mov	dword ptr [ebp+esi*4+0], 0
inc	esi
cmp	esi, ebx
jl	short loc_6142E0
mov	ecx, [esp+18h+var_4]

loc_6142FE:
mov	eax, [edi+8]
mov	dword ptr [edi+4], 0
test	eax, eax
js	short loc_614320
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [edi]
push	eax
call	edx

loc_614320:
mov	ecx, [esp+18h+arg_0]
mov	dword ptr [edi], 0
mov	dword ptr [edi+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_6142A0 endp




sub_614340 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
add	esi, 14h
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [esi+4]
mov	ebp, [esi]
mov	ecx, eax
xor	edi, edi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_61438E
mov	edi, edi

loc_614370:
mov	ecx, [ebp+edi*4+0]
test	ecx, ecx
jz	short loc_61437D
call	sub_AD6020

loc_61437D:
mov	dword ptr [ebp+edi*4+0], 0
inc	edi
cmp	edi, ebx
jl	short loc_614370
mov	ecx, [esp+18h+var_4]

loc_61438E:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_6143B0
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_6143B0:
mov	edi, [esp+18h+arg_0]
add	edi, 8
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [edi+4]
mov	ebp, [edi]
mov	ecx, eax
xor	esi, esi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_614402

loc_6143E4:
mov	ecx, [ebp+esi*4+0]
test	ecx, ecx
jz	short loc_6143F1
call	sub_AD6020

loc_6143F1:
mov	dword ptr [ebp+esi*4+0], 0
inc	esi
cmp	esi, ebx
jl	short loc_6143E4
mov	ecx, [esp+18h+var_4]

loc_614402:
mov	eax, [edi+8]
mov	dword ptr [edi+4], 0
test	eax, eax
js	short loc_614424
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [edi]
push	eax
call	edx

loc_614424:
mov	ecx, [esp+18h+arg_0]
mov	dword ptr [edi], 0
mov	dword ptr [edi+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_614340 endp

align 10h



sub_614450 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_614480
test	[esp+4+arg_0], 1
jz	short loc_61447A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61447A:
mov	eax, esi
pop	esi
retn	4
sub_614450 endp




sub_614480 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+0Ch], esi
mov	dword ptr [edi], offset	off_15F6218
jle	short loc_6144A3

loc_614492:
mov	eax, [edi+8]
mov	ecx, [eax+esi*4]
call	sub_AD6020
inc	esi
cmp	esi, [edi+0Ch]
jl	short loc_614492

loc_6144A3:
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_6144DC
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_6144DC:
mov	ecx, edi
pop	edi
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_614480 endp

align 10h


; Attributes: bp-based frame

sub_614500 proc	near

var_10=	xmmword	ptr -10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 18h
fldz
push	esi
mov	esi, ecx
fst	dword ptr [esi]
xorps	xmm0, xmm0
fstp	dword ptr [esi+4]
push	edi
movaps	xmmword	ptr [esi+10h], xmm0
lea	edi, [esi+50h]
mov	ecx, edi
movaps	[esp+20h+var_10], xmm0
movaps	xmmword	ptr [esi+20h], xmm0
movaps	xmmword	ptr [esi+30h], xmm0
movaps	xmmword	ptr [esi+40h], xmm0
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld1
movaps	xmm0, [esp+20h+var_10]
movaps	xmmword	ptr [edi], xmm0
movaps	xmmword	ptr [edi+10h], xmm0
movaps	xmmword	ptr [edi+20h], xmm0
fst	dword ptr [edi]
fst	dword ptr [edi+14h]
mov	eax, esi
fstp	dword ptr [edi+28h]
movaps	xmmword	ptr [edi+30h], xmm0
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_614500 endp

align 10h



sub_614560 proc	near
fld	dword ptr [esi]
push	ebx
fstp	dword ptr [edi]
lea	ebx, [edi+50h]
fld	dword ptr [esi+4]
mov	ecx, ebx
fstp	dword ptr [edi+4]
movaps	xmm0, xmmword ptr [esi+10h]
movaps	xmmword	ptr [edi+10h], xmm0
movaps	xmm0, xmmword ptr [esi+20h]
movaps	xmmword	ptr [edi+20h], xmm0
movaps	xmm0, xmmword ptr [esi+30h]
movaps	xmmword	ptr [edi+30h], xmm0
movaps	xmm0, xmmword ptr [esi+40h]
movaps	xmmword	ptr [edi+40h], xmm0
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm0, xmmword ptr [esi+60h]
movaps	xmm1, xmmword ptr [esi+70h]
movaps	xmm2, xmmword ptr [esi+80h]
movaps	xmm3, xmmword ptr [esi+50h]
movaps	xmmword	ptr [ebx], xmm3
movaps	xmmword	ptr [ebx+10h], xmm0
movaps	xmmword	ptr [ebx+20h], xmm1
movaps	xmmword	ptr [ebx+30h], xmm2
mov	eax, edi
pop	ebx
retn
sub_614560 endp

align 10h



sub_6145C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_127A5D0
test	[esp+4+arg_0], 1
jz	short loc_6145EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6145EA:
mov	eax, esi
pop	esi
retn	4
sub_6145C0 endp




sub_6145F0 proc	near
mov	dword ptr [esi+8], offset off_1472700
mov	dword ptr [esi+0Ch], offset off_1472718
mov	dword ptr [esi+10h], offset off_147272C
mov	dword ptr [esi+14h], offset off_147270C
push	edi
lea	edi, [esi+30h]
mov	ecx, edi
mov	dword ptr [esi], offset	off_15F1FB8
mov	dword ptr [esi+8], offset off_15F1FC8
mov	dword ptr [esi+0Ch], offset off_15F1FD4
mov	dword ptr [esi+10h], offset off_15F1FE8
mov	dword ptr [esi+14h], offset off_15F1FF4
call	??0ios_base@std@@IAE@XZ_4 ; std::ios_base::ios_base(void)
mov	dword ptr [edi], offset	off_15F62B4
mov	dword ptr [esi], offset	off_15F626C
mov	dword ptr [esi+8], offset off_15F627C
mov	dword ptr [esi+0Ch], offset off_15F6288
mov	dword ptr [esi+10h], offset off_15F629C
mov	dword ptr [esi+14h], offset off_15F62A8
mov	eax, esi
pop	edi
retn	4
sub_6145F0 endp

align 10h



sub_614670 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_A65A20
test	[esp+4+arg_0], 1
jz	short loc_61469B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61469B:
mov	eax, esi
pop	esi
retn	4
sub_614670 endp

align 10h



sub_6146B0 proc	near
sub	ecx, 8
jmp	sub_614670
sub_6146B0 endp

align 10h



sub_6146C0 proc	near
sub	ecx, 0Ch
jmp	sub_614670
sub_6146C0 endp

align 10h



sub_6146D0 proc	near
sub	ecx, 10h
jmp	sub_614670
sub_6146D0 endp

align 10h



sub_6146E0 proc	near
sub	ecx, 30h
jmp	sub_614670
sub_6146E0 endp

align 10h



sub_6146F0 proc	near
sub	ecx, 14h
jmp	sub_614670
sub_6146F0 endp

align 10h



sub_614700 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_A6B810
test	[esp+4+arg_0], 1
jz	short loc_61472B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61472B:
mov	eax, esi
pop	esi
retn	4
sub_614700 endp

align 10h



sub_614740 proc	near
mov	eax, offset unk_1966518
retn
sub_614740 endp

align 10h



sub_614750 proc	near
mov	dword ptr [eax+8], offset off_1472700
mov	dword ptr [eax+0Ch], offset off_1472718
mov	dword ptr [eax+10h], offset off_147272C
mov	dword ptr [eax+14h], offset off_147270C
mov	dword ptr [eax+30h], offset off_15F4DE0
mov	dword ptr [eax], offset	off_15F62E0
mov	dword ptr [eax+8], offset off_15F62F0
mov	dword ptr [eax+0Ch], offset off_15F62FC
mov	dword ptr [eax+10h], offset off_15F6310
mov	dword ptr [eax+14h], offset off_15F631C
mov	dword ptr [eax+30h], offset off_15F6328
retn	4
sub_614750 endp

align 10h



sub_6147A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A65800
test	[esp+4+arg_0], 1
jz	short loc_6147CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6147CA:
mov	eax, esi
pop	esi
retn	4
sub_6147A0 endp




sub_6147D0 proc	near
sub	ecx, 8
jmp	sub_6147A0
sub_6147D0 endp

align 10h



sub_6147E0 proc	near
sub	ecx, 0Ch
jmp	sub_6147A0
sub_6147E0 endp

align 10h



sub_6147F0 proc	near
sub	ecx, 10h
jmp	sub_6147A0
sub_6147F0 endp

align 10h



sub_614800 proc	near
sub	ecx, 30h
jmp	sub_6147A0
sub_614800 endp

align 10h



sub_614810 proc	near
sub	ecx, 14h
jmp	sub_6147A0
sub_614810 endp

align 10h



sub_614820 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_127A350
test	[esp+4+arg_0], 1
jz	short loc_61484A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61484A:
mov	eax, esi
pop	esi
retn	4
sub_614820 endp




sub_614850 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_1278680
test	[esp+4+arg_0], 1
jz	short loc_61487A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61487A:
mov	eax, esi
pop	esi
retn	4
sub_614850 endp




sub_614880 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_12501A0
test	[esp+4+arg_0], 1
jz	short loc_6148AA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6148AA:
mov	eax, edi
pop	edi
retn	4
sub_614880 endp




sub_6148B0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6148E0
test	[esp+4+arg_0], 1
jz	short loc_6148DA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6148DA:
mov	eax, edi
pop	edi
retn	4
sub_6148B0 endp




sub_6148E0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+54h]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61491B
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_61491B:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_127D800
sub_6148E0 endp

align 10h



sub_614940 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
mov	eax, esi
pop	esi
retn	4
sub_614940 endp

align 10h



sub_614960 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A64660
test	[esp+4+arg_0], 1
jz	short loc_61498A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61498A:
mov	eax, esi
pop	esi
retn	4
sub_614960 endp




sub_614990 proc	near
mov	dword ptr [esi+8], offset off_1472700
mov	dword ptr [esi+0Ch], offset off_1472718
mov	dword ptr [esi+10h], offset off_147272C
mov	dword ptr [esi+14h], offset off_147270C
lea	ecx, [esi+30h]
mov	dword ptr [esi], offset	off_15F652C
mov	dword ptr [esi+8], offset off_15F653C
mov	dword ptr [esi+0Ch], offset off_15F6548
mov	dword ptr [esi+10h], offset off_15F655C
mov	dword ptr [esi+14h], offset off_15F6568
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, esi
retn	4
sub_614990 endp

align 10h



sub_6149E0 proc	near
sub	ecx, 10h
jmp	sub_607EF0
sub_6149E0 endp

align 10h



sub_6149F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A6A1F0
test	[esp+4+arg_0], 1
jz	short loc_614A1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614A1A:
mov	eax, esi
pop	esi
retn	4
sub_6149F0 endp

; [00000003 BYTES: COLLAPSED FUNCTION nullsub_264. PRESS KEYPAD	"+" TO EXPAND]
align 10h



sub_614A30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_129BED0
test	[esp+4+arg_0], 1
jz	short loc_614A5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614A5A:
mov	eax, esi
pop	esi
retn	4
sub_614A30 endp




sub_614A60 proc	near

arg_0= dword ptr  4

mov	eax, [esi+4]
mov	ecx, [esp+arg_0]
cmp	eax, ecx
jge	locret_614B34
add	eax, eax
cmp	eax, ecx
jl	short loc_614A79
mov	[esp+arg_0], eax

loc_614A79:
push	ebx
push	ebp
push	edi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+0Ch+arg_0]
mov	edx, [eax]
mov	edx, [edx+4]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
call	edx
mov	edx, [esi]
mov	ebx, eax
test	edx, edx
jz	short loc_614B01
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_614AF4
mov	ebp, [esi+0Ch]
mov	ecx, [esi+8]
cmp	ebp, ecx
jg	short loc_614AE2
mov	eax, [esi+4]
sub	eax, ecx
lea	edi, ds:0[eax*4]
push	edi
lea	eax, [edx+ecx*4]
push	eax
push	ebx
call	j_unknown_libname_61_0
mov	edx, [esi]
lea	ecx, ds:0[ebp*4]
push	ecx
push	edx
add	edi, ebx
push	edi
call	j_unknown_libname_61_0
add	esp, 18h
jmp	short loc_614AF4

loc_614AE2:
add	eax, eax
add	eax, eax
push	eax
lea	ecx, [edx+ecx*4]
push	ecx
push	ebx
call	j_unknown_libname_61_0
add	esp, 0Ch

loc_614AF4:
mov	edx, [esi+10h]
mov	dword ptr [esi+8], 0
mov	[esi+0Ch], edx

loc_614B01:
mov	ebp, [esi+4]
test	ebp, ebp
jz	short loc_614B28
mov	edi, [esi]
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	edx, [edx+8]
lea	ecx, ds:0[ebp*4]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_614B28:
mov	eax, [esp+0Ch+arg_0]
pop	edi
pop	ebp
mov	[esi], ebx
mov	[esi+4], eax
pop	ebx

locret_614B34:
retn	4
sub_614A60 endp

align 10h



sub_614B40 proc	near
mov	eax, dword_188997C
retn
sub_614B40 endp

align 10h



sub_614B50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E9BD0
test	[esp+4+arg_0], 1
jz	short loc_614B7A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614B7A:
mov	eax, esi
pop	esi
retn	4
sub_614B50 endp




sub_614B80 proc	near
sub	ecx, 20h
jmp	sub_614B50
sub_614B80 endp

align 10h



sub_614B90 proc	near
sub	ecx, 8
jmp	sub_614B50
sub_614B90 endp

align 10h



sub_614BA0 proc	near
sub	ecx, 28h
jmp	sub_614B50
sub_614BA0 endp

align 10h



sub_614BB0 proc	near
mov	eax, dword_1889980
retn
sub_614BB0 endp

align 10h



sub_614BC0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_614BF0
test	[esp+4+arg_0], 1
jz	short loc_614BEA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_614BEA:
mov	eax, edi
pop	edi
retn	4
sub_614BC0 endp




sub_614BF0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_614C2B
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_614C2B:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_614BF0 endp

align 10h



sub_614C50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E92E0
test	[esp+4+arg_0], 1
jz	short loc_614C7A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614C7A:
mov	eax, esi
pop	esi
retn	4
sub_614C50 endp




sub_614C80 proc	near
sub	ecx, 20h
jmp	sub_614C50
sub_614C80 endp

align 10h



sub_614C90 proc	near
sub	ecx, 8
jmp	sub_614C50
sub_614C90 endp

align 10h



sub_614CA0 proc	near
sub	ecx, 28h
jmp	sub_614C50
sub_614CA0 endp

align 10h



sub_614CB0 proc	near
sub	ecx, 2Ch
jmp	sub_614C50
sub_614CB0 endp

align 10h



sub_614CC0 proc	near
mov	eax, dword_1889984
retn
sub_614CC0 endp

align 10h



sub_614CD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E8700
test	[esp+4+arg_0], 1
jz	short loc_614CFA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614CFA:
mov	eax, esi
pop	esi
retn	4
sub_614CD0 endp




sub_614D00 proc	near
sub	ecx, 20h
jmp	sub_614CD0
sub_614D00 endp

align 10h



sub_614D10 proc	near
sub	ecx, 8
jmp	sub_614CD0
sub_614D10 endp

align 10h



sub_614D20 proc	near
sub	ecx, 28h
jmp	sub_614CD0
sub_614D20 endp

align 10h



sub_614D30 proc	near
mov	eax, dword_1889988
retn
sub_614D30 endp

align 10h



sub_614D40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E7F70
test	[esp+4+arg_0], 1
jz	short loc_614D6A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614D6A:
mov	eax, esi
pop	esi
retn	4
sub_614D40 endp




sub_614D70 proc	near
sub	ecx, 20h
jmp	sub_614D40
sub_614D70 endp

align 10h



sub_614D80 proc	near
sub	ecx, 8
jmp	sub_614D40
sub_614D80 endp

align 10h



sub_614D90 proc	near
sub	ecx, 28h
jmp	sub_614D40
sub_614D90 endp

align 10h



sub_614DA0 proc	near
mov	eax, dword_188998C
retn
sub_614DA0 endp

align 10h



sub_614DB0 proc	near

var_C= byte ptr	-0Ch

sub	esp, 0Ch
push	0
push	1134h
mov	ecx, esi
call	sub_4D6A90
mov	ecx, esi
test	al, al
jz	short loc_614DE3
push	0
push	1134h
lea	eax, [esp+14h+var_C]
push	eax
call	sub_4D6A00
mov	ecx, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
retn

loc_614DE3:
call	sub_4D69E0
add	esp, 0Ch
retn
sub_614DB0 endp

align 10h



sub_614DF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A697D0
test	[esp+4+arg_0], 1
jz	short loc_614E1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614E1A:
mov	eax, esi
pop	esi
retn	4
sub_614DF0 endp




sub_614E20 proc	near
sub	ecx, 20h
jmp	sub_614DF0
sub_614E20 endp

align 10h



sub_614E30 proc	near
sub	ecx, 8
jmp	sub_614DF0
sub_614E30 endp

align 10h



sub_614E40 proc	near
sub	ecx, 28h
jmp	sub_614DF0
sub_614E40 endp

align 10h



sub_614E50 proc	near
sub	ecx, 2Ch
jmp	sub_614DF0
sub_614E50 endp

align 10h



sub_614E60 proc	near
mov	eax, dword_1889990
retn
sub_614E60 endp

align 10h



sub_614E70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E7750
test	[esp+4+arg_0], 1
jz	short loc_614E9A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614E9A:
mov	eax, esi
pop	esi
retn	4
sub_614E70 endp




sub_614EA0 proc	near
push	esi
mov	esi, eax
call	sub_A62D80
lea	eax, [esi+0D0h]
call	sub_A4DDC0
lea	eax, [esi+160h]
call	sub_A4DDC0
lea	eax, [esi+1F0h]
call	sub_A4DDC0
lea	eax, [esi+280h]
call	sub_A4D140
mov	eax, esi
pop	esi
retn
sub_614EA0 endp

align 10h



sub_614EE0 proc	near
sub	ecx, 20h
jmp	sub_614E70
sub_614EE0 endp

align 10h



sub_614EF0 proc	near
sub	ecx, 8
jmp	sub_614E70
sub_614EF0 endp

align 10h



sub_614F00 proc	near
sub	ecx, 28h
jmp	sub_614E70
sub_614F00 endp

align 10h



sub_614F10 proc	near
mov	eax, dword_1889994
retn
sub_614F10 endp

align 10h



sub_614F20 proc	near
mov	eax, dword_1889998
retn
sub_614F20 endp

align 10h



sub_614F30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E7100
test	[esp+4+arg_0], 1
jz	short loc_614F5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614F5A:
mov	eax, esi
pop	esi
retn	4
sub_614F30 endp




sub_614F60 proc	near
sub	ecx, 8
jmp	sub_614F30
sub_614F60 endp

align 10h



sub_614F70 proc	near
sub	ecx, 28h
jmp	sub_614F30
sub_614F70 endp

align 10h



sub_614F80 proc	near
sub	ecx, 2Ch
jmp	sub_614F30
sub_614F80 endp

align 10h



sub_614F90 proc	near
sub	ecx, 20h
jmp	sub_614F30
sub_614F90 endp

align 10h



sub_614FA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A68D40
test	[esp+4+arg_0], 1
jz	short loc_614FCA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_614FCA:
mov	eax, esi
pop	esi
retn	4
sub_614FA0 endp




sub_614FD0 proc	near
sub	ecx, 20h
jmp	sub_614FA0
sub_614FD0 endp

align 10h



sub_614FE0 proc	near
sub	ecx, 8
jmp	sub_614FA0
sub_614FE0 endp

align 10h



sub_614FF0 proc	near
sub	ecx, 28h
jmp	sub_614FA0
sub_614FF0 endp

align 10h



sub_615000 proc	near
sub	ecx, 2Ch
jmp	sub_614FA0
sub_615000 endp

align 10h



sub_615010 proc	near
sub	ecx, 30h
jmp	sub_614FA0
sub_615010 endp

align 10h



sub_615020 proc	near
mov	eax, dword_18899A0
retn
sub_615020 endp

align 10h



sub_615030 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E6890
test	[esp+4+arg_0], 1
jz	short loc_61505A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61505A:
mov	eax, esi
pop	esi
retn	4
sub_615030 endp




sub_615060 proc	near
sub	ecx, 20h
jmp	sub_615030
sub_615060 endp

align 10h



sub_615070 proc	near
sub	ecx, 8
jmp	sub_615030
sub_615070 endp

align 10h



sub_615080 proc	near
sub	ecx, 28h
jmp	sub_615030
sub_615080 endp

align 10h



sub_615090 proc	near
mov	eax, dword_18899A4
retn
sub_615090 endp

align 10h



sub_6150A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A67CA0
test	[esp+4+arg_0], 1
jz	short loc_6150CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6150CA:
mov	eax, esi
pop	esi
retn	4
sub_6150A0 endp




sub_6150D0 proc	near
sub	ecx, 20h
jmp	sub_6150A0
sub_6150D0 endp

align 10h



sub_6150E0 proc	near
sub	ecx, 8
jmp	sub_6150A0
sub_6150E0 endp

align 10h



sub_6150F0 proc	near
sub	ecx, 28h
jmp	sub_6150A0
sub_6150F0 endp

align 10h



sub_615100 proc	near
sub	ecx, 2Ch
jmp	sub_6150A0
sub_615100 endp

align 10h



sub_615110 proc	near
cmp	byte ptr [ecx+20h], 0
mov	eax, dword_18899A8
jnz	short locret_615120
mov	eax, dword_18899AC

locret_615120:
retn
sub_615110 endp

align 10h



sub_615130 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_124FEA0
test	[esp+4+arg_0], 1
jz	short loc_61515A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61515A:
mov	eax, esi
pop	esi
retn	4
sub_615130 endp




sub_615160 proc	near
sub	ecx, 8
jmp	sub_615130
sub_615160 endp

align 10h



sub_615170 proc	near
sub	ecx, 20h
jmp	sub_615130
sub_615170 endp

align 10h



sub_615180 proc	near
mov	eax, dword_18899B0
retn
sub_615180 endp

align 10h



sub_615190 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E5470
test	[esp+4+arg_0], 1
jz	short loc_6151BA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6151BA:
mov	eax, esi
pop	esi
retn	4
sub_615190 endp




sub_6151C0 proc	near
sub	ecx, 20h
jmp	sub_615190
sub_6151C0 endp

align 10h



sub_6151D0 proc	near
sub	ecx, 8
jmp	sub_615190
sub_6151D0 endp

align 10h



sub_6151E0 proc	near
mov	eax, dword_18899B4
retn
sub_6151E0 endp

align 10h



sub_6151F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E5F20
test	[esp+4+arg_0], 1
jz	short loc_61521A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61521A:
mov	eax, esi
pop	esi
retn	4
sub_6151F0 endp




sub_615220 proc	near
sub	ecx, 2Ch
jmp	sub_6151F0
sub_615220 endp

align 10h



sub_615230 proc	near
sub	ecx, 20h
jmp	sub_6151F0
sub_615230 endp

align 10h



sub_615240 proc	near
sub	ecx, 8
jmp	sub_6151F0
sub_615240 endp

align 10h



sub_615250 proc	near
sub	ecx, 28h
jmp	sub_6151F0
sub_615250 endp

align 10h



sub_615260 proc	near
mov	eax, dword_18899B8
retn
sub_615260 endp

align 10h



sub_615270 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_A678B0
test	[esp+4+arg_0], 1
jz	short loc_61529C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61529C:
mov	eax, esi
pop	esi
retn	4
sub_615270 endp

align 10h



sub_6152B0 proc	near
sub	ecx, 20h
jmp	sub_615270
sub_6152B0 endp

align 10h



sub_6152C0 proc	near
sub	ecx, 8
jmp	sub_615270
sub_6152C0 endp

align 10h



sub_6152D0 proc	near
mov	eax, dword_18899BC
retn
sub_6152D0 endp

align 10h



sub_6152E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A672C0
test	[esp+4+arg_0], 1
jz	short loc_61530A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61530A:
mov	eax, esi
pop	esi
retn	4
sub_6152E0 endp




sub_615310 proc	near
sub	ecx, 8
jmp	sub_6152E0
sub_615310 endp

align 10h



sub_615320 proc	near
sub	ecx, 28h
jmp	sub_6152E0
sub_615320 endp

align 10h



sub_615330 proc	near
sub	ecx, 2Ch
jmp	sub_6152E0
sub_615330 endp

align 10h



sub_615340 proc	near
sub	ecx, 20h
jmp	sub_6152E0
sub_615340 endp

align 10h



sub_615350 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A66540
test	[esp+4+arg_0], 1
jz	short loc_61537A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61537A:
mov	eax, esi
pop	esi
retn	4
sub_615350 endp




sub_615380 proc	near
sub	ecx, 20h
jmp	sub_615350
sub_615380 endp

align 10h



sub_615390 proc	near
sub	ecx, 8
jmp	sub_615350
sub_615390 endp

align 10h



sub_6153A0 proc	near
sub	ecx, 28h
jmp	sub_615350
sub_6153A0 endp

align 10h



sub_6153B0 proc	near
mov	eax, dword_18899C4
retn
sub_6153B0 endp

align 10h



sub_6153C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A65FF0
test	[esp+4+arg_0], 1
jz	short loc_6153EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6153EA:
mov	eax, esi
pop	esi
retn	4
sub_6153C0 endp




sub_6153F0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, eax
add	esi, 4
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61542D
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_61542D:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	esi
pop	ecx
retn
sub_6153F0 endp

align 10h



sub_615440 proc	near
sub	ecx, 20h
jmp	sub_6153C0
sub_615440 endp

align 10h



sub_615450 proc	near
sub	ecx, 8
jmp	sub_6153C0
sub_615450 endp

align 10h



sub_615460 proc	near
sub	ecx, 28h
jmp	sub_6153C0
sub_615460 endp

align 10h



sub_615470 proc	near
sub	ecx, 2Ch
jmp	sub_6153C0
sub_615470 endp

align 10h



sub_615480 proc	near
mov	eax, dword_18899C8
retn
sub_615480 endp

align 10h



sub_615490 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_124FDA0
test	[esp+4+arg_0], 1
jz	short loc_6154BA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6154BA:
mov	eax, esi
pop	esi
retn	4
sub_615490 endp




sub_6154C0 proc	near
sub	ecx, 20h
jmp	sub_615490
sub_6154C0 endp

align 10h



sub_6154D0 proc	near
sub	ecx, 8
jmp	sub_615490
sub_6154D0 endp

align 10h



sub_6154E0 proc	near
cmp	dword ptr [esi+214h], 0
jnz	short loc_615536
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	10h
call	eax
test	eax, eax
jz	short loc_61552E
xor	ecx, ecx
mov	dword ptr [eax], 0
mov	[eax+4], cx
mov	edx, 8000h
mov	[eax+6], dx
mov	[eax+8], ecx
mov	[eax+0Ch], cx
mov	[eax+0Eh], dx
mov	[esi+214h], eax
add	eax, 8
retn

loc_61552E:
xor	eax, eax
mov	[esi+214h], eax

loc_615536:
mov	eax, [esi+214h]
add	eax, 8
retn
sub_6154E0 endp




sub_615540 proc	near
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
retn
sub_615540 endp

align 10h



sub_615560 proc	near
push	edi
mov	edi, [eax+4]
test	edi, edi
jz	short loc_61558A
push	esi
mov	esi, [eax]
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	edx, [edx+8]
lea	ecx, ds:0[edi*4]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi

loc_61558A:
pop	edi
retn
sub_615560 endp

align 10h



; int __thiscall sub_615590(void *, char)
sub_615590 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F7228
call	??1facet@locale@std@@UAE@XZ_7 ;	std::locale::facet::~facet(void)
test	[esp+4+arg_0], 1
jz	short loc_6155AE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6155AE:
mov	eax, esi
pop	esi
retn	4
sub_615590 endp

align 10h



sub_6155C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_615600
test	[esp+4+arg_0], 1
jz	short loc_6155EC
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6155EC:
mov	eax, esi
pop	esi
retn	4
sub_6155C0 endp

align 10h



sub_615600 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
push	edi
mov	edi, eax
lea	esi, [edi+20h]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_615636
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_615636:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_A64FE0
pop	edi
pop	esi
pop	ecx
retn
sub_615600 endp

align 10h



sub_615650 proc	near
or	byte ptr [ecx+0Ch], 2
retn	4
sub_615650 endp

align 10h



sub_615660 proc	near
mov	eax, [ecx-8]
mov	eax, [eax+10h]
add	ecx, 0FFFFFFF8h
jmp	eax
sub_615660 endp

align 10h



sub_615670 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_A654D0
test	[esp+4+arg_0], 1
jz	short loc_61569C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61569C:
mov	eax, esi
pop	esi
retn	4
sub_615670 endp

align 10h



sub_6156B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A653C0
test	[esp+4+arg_0], 1
jz	short loc_6156DA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6156DA:
mov	eax, esi
pop	esi
retn	4
sub_6156B0 endp




sub_6156E0 proc	near
sub	ecx, 8
jmp	sub_615670
sub_6156E0 endp

align 10h



sub_6156F0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A64FE0
test	[esp+4+arg_0], 1
jz	short loc_61571A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61571A:
mov	eax, edi
pop	edi
retn	4
sub_6156F0 endp




sub_615720 proc	near
push	edi
mov	eax, 1
xor	edi, edi
mov	[esi+6], ax
or	eax, 0FFFFFFFFh
push	edi
lea	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_15F6348
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], eax
mov	[esi+14h], eax
call	sub_4D4F20
mov	ecx, 16h
mov	[esi+20h], cx
mov	eax, 3
mov	[esi+32h], ax
mov	eax, 80000000h
xor	edx, edx
mov	[esi+30h], dx
mov	[esi+34h], edi
mov	[esi+38h], edi
mov	[esi+3Ch], edi
mov	[esi+40h], edi
mov	[esi+44h], edi
mov	[esi+48h], edi
mov	[esi+4Ch], edi
mov	[esi+50h], edi
mov	[esi+54h], edi
mov	[esi+58h], eax
mov	[esi+5Ch], edi
mov	[esi+60h], edi
mov	[esi+64h], eax
mov	[esi+68h], edi
mov	[esi+6Ch], edi
mov	[esi+70h], eax
mov	[esi+114h], edi
mov	[esi+118h], edi
mov	[esi+11Ch], eax
mov	[esi+120h], edi
mov	[esi+124h], edi
mov	[esi+128h], eax
mov	dword ptr [esi+12Ch], 103h
mov	dword ptr [esi+130h], 1
mov	eax, esi
pop	edi
retn
sub_615720 endp

align 10h



; int __thiscall sub_6157E0(void *, char)
sub_6157E0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F72F0
jz	short loc_6157F9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6157F9:
mov	eax, esi
pop	esi
retn	4
sub_6157E0 endp

align 10h



sub_615800 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12798E0
test	[esp+4+arg_0], 1
jz	short loc_61582A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61582A:
mov	eax, esi
pop	esi
retn	4
sub_615800 endp




sub_615830 proc	near
sub	ecx, 20h
jmp	sub_615800
sub_615830 endp

align 10h



sub_615840 proc	near
sub	ecx, 8
jmp	sub_615800
sub_615840 endp

align 10h



sub_615850 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61588D
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_61588D:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_615850 endp

align 10h



sub_6158B0 proc	near
sub	ecx, 28h
jmp	sub_615190
sub_6158B0 endp

align 10h



sub_6158C0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_615850
test	[esp+4+arg_0], 1
jz	short loc_6158EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6158EA:
mov	eax, edi
pop	edi
retn	4
sub_6158C0 endp




sub_6158F0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
lea	esi, [edi+98h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_615928
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_615928:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+8Ch]
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_61596B
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*4]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_61596B:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_6158F0 endp




sub_615980 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6158F0
test	[esp+4+arg_0], 1
jz	short loc_6159AA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6159AA:
mov	eax, edi
pop	edi
retn	4
sub_615980 endp




sub_6159B0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6159E0
test	[esp+4+arg_0], 1
jz	short loc_6159DA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6159DA:
mov	eax, edi
pop	edi
retn	4
sub_6159B0 endp




sub_6159E0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_615A1E
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*2]
mov	edx, [esi]
add	ecx, ecx
push	ebp
mov	ebp, [eax]
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
push	edx
call	eax
pop	ebp

loc_615A1E:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_6159E0 endp

align 10h



sub_615A40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12796B0
test	[esp+4+arg_0], 1
jz	short loc_615A6A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615A6A:
mov	eax, esi
pop	esi
retn	4
sub_615A40 endp




sub_615A70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A5D0C0
test	[esp+4+arg_0], 1
jz	short loc_615A9A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615A9A:
mov	eax, esi
pop	esi
retn	4
sub_615A70 endp




sub_615AA0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+10h+var_1]
mov	dword ptr [edi], offset	off_15F7520
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_615AE3
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
shl	edx, 5
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_615AE3:
mov	ecx, edi
pop	edi
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_615AA0 endp

align 10h



sub_615B00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_615AA0
test	[esp+4+arg_0], 1
jz	short loc_615B2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615B2A:
mov	eax, esi
pop	esi
retn	4
sub_615B00 endp




sub_615B30 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_615B60
test	[esp+4+arg_0], 1
jz	short loc_615B5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_615B5A:
mov	eax, edi
pop	edi
retn	4
sub_615B30 endp




sub_615B60 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_615B93
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2260

loc_615B93:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_615B60 endp

align 10h



sub_615BB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A5CBE0
test	[esp+4+arg_0], 1
jz	short loc_615BDA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615BDA:
mov	eax, esi
pop	esi
retn	4
sub_615BB0 endp




sub_615BE0 proc	near
sub	ecx, 8
jmp	sub_615BB0
sub_615BE0 endp

align 10h



sub_615BF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A5F620
test	[esp+4+arg_0], 1
jz	short loc_615C1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615C1A:
mov	eax, esi
pop	esi
retn	4
sub_615BF0 endp




sub_615C20 proc	near

arg_0= dword ptr  4

lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15F766C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+arg_0], 0
jz	short loc_615C39
mov	byte ptr [esi+9], 0

loc_615C39:
push	edi
lea	edi, [esi+24h]
mov	dword ptr [esi], offset	off_15F761C
mov	ecx, edi
mov	dword ptr [esi+1Ch], offset off_146A160
call	??0ios_base@std@@IAE@XZ_0 ; std::ios_base::ios_base(void)
cmp	[esp+4+arg_0], 0
mov	dword ptr [edi], offset	off_15F75C0
mov	dword ptr [esi+1Ch], offset off_15F75B0
pop	edi
mov	eax, esi
jz	short locret_615C6C
mov	byte ptr [esi+9], 2

locret_615C6C:
retn	4
sub_615C20 endp

align 10h



sub_615C70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A5C100
test	[esp+4+arg_0], 1
jz	short loc_615C9A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615C9A:
mov	eax, esi
pop	esi
retn	4
sub_615C70 endp




sub_615CA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F766C
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_615CD0
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615CD0:
mov	eax, esi
pop	esi
retn	4
sub_615CA0 endp

align 10h



sub_615CE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F76A0
call	sub_4D9140
test	[esp+4+arg_0], 1
jz	short loc_615D10
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615D10:
mov	eax, esi
pop	esi
retn	4
sub_615CE0 endp

align 10h



sub_615D20 proc	near

arg_0= dword ptr  4

lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15F766C
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
cmp	[esp+arg_0], 0
jz	short loc_615D39
mov	byte ptr [esi+9], 0

loc_615D39:
push	edi
lea	edi, [esi+1Ch]
mov	dword ptr [esi], offset	off_15F7704
mov	ecx, edi
mov	dword ptr [esi+14h], offset off_146A160
call	??0ios_base@std@@IAE@XZ_0 ; std::ios_base::ios_base(void)
cmp	[esp+4+arg_0], 0
mov	dword ptr [edi], offset	off_15F75C0
mov	dword ptr [esi+14h], offset off_15F75B0
pop	edi
mov	eax, esi
jz	short locret_615D6C
mov	byte ptr [esi+9], 1

locret_615D6C:
retn	4
sub_615D20 endp

align 10h



sub_615D70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11E4920
test	[esp+4+arg_0], 1
jz	short loc_615D9A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_615D9A:
mov	eax, esi
pop	esi
retn	4
sub_615D70 endp




sub_615DA0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_615DD0
test	[esp+4+arg_0], 1
jz	short loc_615DCA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_615DCA:
mov	eax, edi
pop	edi
retn	4
sub_615DA0 endp




sub_615DD0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
lea	esi, [edi+28h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_615E01
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_615E01:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+1Ch]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_615E36
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
push	edx
mov	ecx, eax
call	sub_4E2290

loc_615E36:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 4
jmp	sub_4DA650
sub_615DD0 endp

align 10h



sub_615E50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
push	ebp
mov	ebp, [esp+14h+arg_4]
push	esi
push	edi
push	ebp
mov	ecx, ebx
call	sub_4DB190
mov	eax, [ebp+8]
mov	[ebx+8], eax
mov	ecx, [ebp+0Ch]
mov	[ebx+0Ch], ecx
mov	edx, [ebp+10h]
lea	eax, [ebp+14h]
push	eax
lea	ecx, [ebx+14h]
mov	[ebx+10h], edx
call	sub_AD3EA0
mov	ecx, [ebp+18h]
mov	[ebx+18h], ecx
mov	edx, [ebp+1Ch]
mov	[ebx+1Ch], edx
mov	eax, [ebp+20h]
mov	[ebx+20h], eax
mov	ecx, [ebp+24h]
mov	[ebx+24h], ecx
mov	edx, [ebp+28h]
mov	[ebx+28h], edx
mov	eax, [ebp+2Ch]
mov	[ebx+2Ch], eax
mov	ecx, [ebp+30h]
mov	[ebx+30h], ecx
mov	edx, [ebp+34h]
mov	[ebx+34h], edx
mov	eax, [ebp+38h]
mov	[ebx+38h], eax
mov	ecx, [ebp+3Ch]
mov	[ebx+3Ch], ecx
mov	edx, [ebp+40h]
mov	[ebx+40h], edx
mov	eax, [ebp+44h]
lea	esi, [ebx+48h]
push	esi
lea	ecx, [esp+20h+arg_4]
mov	[ebx+44h], eax
mov	byte ptr [esp+20h+arg_4], 0
call	sub_4A00D0
mov	edi, [esi+4]
mov	esi, [ebp+4Ch]
cmp	esi, edi
mov	[esp+1Ch+var_8], esi
jle	short loc_615EF3
mov	[esp+1Ch+arg_0], edi
jmp	short loc_615EF9

loc_615EF3:
mov	[esp+1Ch+arg_0], esi
mov	edi, esi

loc_615EF9:
mov	ecx, [ebx+50h]
lea	edx, [ebx+48h]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_615F21
add	ecx, ecx
cmp	esi, ecx
jl	short loc_615F11
mov	ecx, esi

loc_615F11:
push	0E0h
push	ecx
push	edx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_615F21:
mov	ecx, [ebp+48h]
mov	eax, [ebx+48h]
test	edi, edi
jle	short loc_615F61
sub	ecx, eax
mov	esi, eax
mov	[esp+1Ch+var_4], ecx
mov	[esp+1Ch+var_C], edi
jmp	short loc_615F44
align 10h

loc_615F40:
mov	ecx, [esp+1Ch+var_4]

loc_615F44:
lea	edi, [ecx+esi]
call	sub_6161E0
add	esi, 0E0h
sub	[esp+1Ch+var_C], 1
jnz	short loc_615F40
mov	edi, [esp+1Ch+arg_0]
mov	esi, [esp+1Ch+var_8]

loc_615F61:
mov	ecx, [ebp+48h]
mov	edx, [ebx+48h]
mov	eax, edi
imul	eax, 0E0h
add	ecx, eax
add	edx, eax
mov	eax, esi
sub	eax, edi
test	eax, eax
jle	short loc_615FCB
mov	edi, edx
mov	esi, ecx
sub	edi, ecx
mov	[esp+1Ch+arg_0], esi
mov	[esp+1Ch+var_4], edi
mov	[esp+1Ch+var_C], eax
lea	ecx, [ecx+0]

loc_615F90:
lea	ecx, [edi+esi]
push	ecx		; void *
push	0E0h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_615FB6
mov	ecx, 38h
mov	edi, eax
rep movsd
mov	esi, [esp+1Ch+arg_0]
mov	edi, [esp+1Ch+var_4]

loc_615FB6:
add	esi, 0E0h
sub	[esp+1Ch+var_C], 1
mov	[esp+1Ch+arg_0], esi
jnz	short loc_615F90
mov	esi, [esp+1Ch+var_8]

loc_615FCB:
mov	[ebx+4Ch], esi
lea	esi, [ebp+54h]
lea	edi, [ebx+54h]
mov	ecx, 12h
rep movsd
mov	edx, [ebp+9Ch]
lea	esi, [ebx+0A0h]
push	esi
lea	ecx, [esp+20h+arg_4]
mov	[ebx+9Ch], edx
mov	byte ptr [esp+20h+arg_4], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	edi, eax
mov	eax, ecx
and	eax, 3FFFFFFFh
cmp	eax, [ebp+0A4h]
jge	short loc_616040
test	ecx, ecx
js	short loc_61601F
push	eax
mov	eax, [esi]
push	eax
mov	ecx, edi
call	sub_4E2260

loc_61601F:
mov	ecx, [ebp+0A4h]
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+1Ch+arg_0]
mov	[esp+1Ch+arg_0], ecx
push	eax
mov	ecx, edi
call	edx
mov	[esi], eax
mov	eax, [esp+1Ch+arg_0]
mov	[esi+8], eax

loc_616040:
mov	ecx, [ebp+0A4h]
mov	eax, [esi]
mov	[esi+4], ecx
mov	edi, [ebp+0A0h]
test	ecx, ecx
jle	short loc_61606B
sub	edi, eax
mov	esi, ecx
lea	esp, [esp+0]

loc_616060:
mov	cl, [edi+eax]
mov	[eax], cl
inc	eax
sub	esi, 1
jnz	short loc_616060

loc_61606B:
fld	dword ptr [ebp+0ACh]
lea	edi, [ebx+0C0h]
fstp	dword ptr [ebx+0ACh]
mov	dl, [ebp+0B0h]
mov	[ebx+0B0h], dl
fld	dword ptr [ebp+0B4h]
fstp	dword ptr [ebx+0B4h]
push	edi
fld	dword ptr [ebp+0B8h]
lea	ecx, [esp+20h+arg_4]
fstp	dword ptr [ebx+0B8h]
mov	byte ptr [esp+20h+arg_4], 0
fld	dword ptr [ebp+0BCh]
fstp	dword ptr [ebx+0BCh]
call	sub_4A00D0
mov	ecx, [edi+8]
mov	esi, eax
mov	eax, ecx
and	eax, 3FFFFFFFh
cmp	eax, [ebp+0C4h]
jge	short loc_61610D
test	ecx, ecx
js	short loc_6160DF
push	eax
mov	eax, [edi]
push	eax
mov	ecx, esi
call	sub_4E2290

loc_6160DF:
mov	ecx, [ebp+0C4h]
mov	edx, [esi]
mov	edx, [edx+0Ch]
add	ecx, ecx
add	ecx, ecx
lea	eax, [esp+1Ch+arg_0]
mov	[esp+1Ch+arg_0], ecx
push	eax
mov	ecx, esi
call	edx
mov	[edi], eax
mov	eax, [esp+1Ch+arg_0]
cdq
and	edx, 3
add	eax, edx
sar	eax, 2
mov	[edi+8], eax

loc_61610D:
mov	esi, [ebp+0C4h]
mov	[edi+4], esi
mov	edx, [ebp+0C0h]
mov	edi, [edi]
xor	ecx, ecx
cmp	esi, 4
mov	[esp+1Ch+var_C], edx
mov	[esp+1Ch+var_8], edi
jl	short loc_616180
lea	ecx, [edx+0Ch]
sub	edx, edi
mov	[esp+1Ch+arg_0], edx
lea	edx, [esi-4]
shr	edx, 2
lea	eax, [edi+4]
inc	edx
lea	edi, ds:0[edx*4]
mov	[esp+1Ch+var_4], edi
mov	edi, [esp+1Ch+arg_0]
nop

loc_616150:
fld	dword ptr [ecx-0Ch]
add	eax, 10h
fstp	dword ptr [eax-14h]
add	ecx, 10h
sub	edx, 1
fld	dword ptr [edi+eax-10h]
fstp	dword ptr [eax-10h]
fld	dword ptr [ecx-14h]
fstp	dword ptr [eax-0Ch]
fld	dword ptr [ecx-10h]
fstp	dword ptr [eax-8]
jnz	short loc_616150
mov	ecx, [esp+1Ch+var_4]
mov	edi, [esp+1Ch+var_8]
mov	edx, [esp+1Ch+var_C]

loc_616180:
cmp	ecx, esi
jge	short loc_61619E
sub	edx, edi
lea	eax, [edi+ecx*4]
sub	esi, ecx
jmp	short loc_616190
align 10h

loc_616190:
fld	dword ptr [eax+edx]
add	eax, 4
sub	esi, 1
fstp	dword ptr [eax-4]
jnz	short loc_616190

loc_61619E:
mov	al, [ebp+0CCh]
mov	[ebx+0CCh], al
mov	cl, [ebp+0CDh]
mov	[ebx+0CDh], cl
mov	dl, [ebp+0CEh]
pop	edi
mov	[ebx+0CEh], dl
fld	dword ptr [ebp+0D0h]
pop	esi
fstp	dword ptr [ebx+0D0h]
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 0Ch
retn	8
sub_615E50 endp

align 10h



sub_6161E0 proc	near
push	edi
mov	ecx, esi
call	sub_4D9C70
fld	dword ptr [edi+20h]
fstp	dword ptr [esi+20h]
mov	eax, [edi+24h]
mov	[esi+24h], eax
mov	ecx, [edi+28h]
mov	[esi+28h], ecx
mov	edx, [edi+2Ch]
mov	[esi+2Ch], edx
mov	eax, [edi+30h]
mov	[esi+30h], eax
mov	ecx, [edi+34h]
mov	[esi+34h], ecx
mov	edx, [edi+38h]
mov	[esi+38h], edx
mov	eax, [edi+3Ch]
mov	[esi+3Ch], eax
mov	ecx, [edi+40h]
mov	[esi+40h], ecx
mov	edx, [edi+44h]
mov	[esi+44h], edx
movaps	xmm0, xmmword ptr [edi+50h]
movaps	xmmword	ptr [esi+50h], xmm0
movaps	xmm0, xmmword ptr [edi+60h]
movaps	xmmword	ptr [esi+60h], xmm0
fld	dword ptr [edi+70h]
fstp	dword ptr [esi+70h]
movaps	xmm0, xmmword ptr [edi+80h]
movaps	xmmword	ptr [esi+80h], xmm0
movaps	xmm0, xmmword ptr [edi+90h]
lea	eax, [edi+0B0h]
movaps	xmmword	ptr [esi+90h], xmm0
movaps	xmm0, xmmword ptr [edi+0A0h]
push	eax
lea	ecx, [esi+0B0h]
movaps	xmmword	ptr [esi+0A0h],	xmm0
call	sub_4D67E0
fld	dword ptr [edi+0C0h]
fstp	dword ptr [esi+0C0h]
mov	eax, esi
fld	dword ptr [edi+0C4h]
fstp	dword ptr [esi+0C4h]
fld	dword ptr [edi+0C8h]
fstp	dword ptr [esi+0C8h]
fld	dword ptr [edi+0CCh]
fstp	dword ptr [esi+0CCh]
fld	dword ptr [edi+0D0h]
fstp	dword ptr [esi+0D0h]
fld	dword ptr [edi+0D4h]
fstp	dword ptr [esi+0D4h]
retn
sub_6161E0 endp

align 10h



sub_6162D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_616310
test	[esp+4+arg_0], 1
jz	short loc_6162FB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6162FB:
mov	eax, esi
pop	esi
retn	4
sub_6162D0 endp

align 10h



sub_616310 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
push	edi
lea	esi, [ebx+1Ch]
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ecx, eax
mov	eax, [esi+4]
mov	[esp+18h+var_4], ecx
test	eax, eax
jle	short loc_616353
mov	ebp, eax
mov	edi, edi

loc_616340:
mov	ecx, edi
call	sub_4D6C60
add	edi, 4
sub	ebp, 1
jnz	short loc_616340
mov	ecx, [esp+18h+var_4]

loc_616353:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_616375
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_616375:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, [ebx+18h]
test	ecx, ecx
jz	short loc_61638E
call	sub_AD6020

loc_61638E:
lea	edi, [ebx+0Ch]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	dword ptr [ebx+18h], 0
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [edi+4]
mov	ebp, [edi]
mov	ecx, eax
xor	esi, esi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_6163D6

loc_6163B8:
mov	ecx, [ebp+esi*4+0]
test	ecx, ecx
jz	short loc_6163C5
call	sub_AD6020

loc_6163C5:
mov	dword ptr [ebp+esi*4+0], 0
inc	esi
cmp	esi, ebx
jl	short loc_6163B8
mov	ecx, [esp+18h+var_4]

loc_6163D6:
mov	eax, [edi+8]
mov	dword ptr [edi+4], 0
test	eax, eax
js	short loc_6163F8
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [edi]
push	eax
call	edx

loc_6163F8:
mov	esi, [esp+18h+arg_0]
mov	dword ptr [edi], 0
mov	dword ptr [edi+8], 80000000h
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_616415
call	sub_AD6020

loc_616415:
mov	ecx, esi
mov	dword ptr [esi+8], 0
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_616310 endp

align 10h



sub_616430 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_616460
test	[esp+4+arg_0], 1
jz	short loc_61645A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61645A:
mov	eax, edi
pop	edi
retn	4
sub_616430 endp




sub_616460 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	esi
lea	esi, [edi+18h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_616499
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_616499:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+14h+var_5]
mov	[esp+14h+var_5], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_6164CE
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_6164CE:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 8
jmp	sub_4DA650
sub_616460 endp

align 10h



sub_6164F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_616530
test	[esp+4+arg_0], 1
jz	short loc_61651B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61651B:
mov	eax, esi
pop	esi
retn	4
sub_6164F0 endp

align 10h



sub_616530 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
lea	esi, [ebp+14h]
push	esi
lea	ecx, [esp+18h+var_1]
mov	[esp+18h+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61656A
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_61656A:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
lea	esi, [ebp+8]
push	esi
lea	ecx, [esp+18h+var_1]
mov	[esp+18h+var_1], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ebx, eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_6165A9
mov	ebp, eax

loc_616596:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 4
sub	ebp, 1
jnz	short loc_616596
mov	ebp, [esp+14h+arg_0]

loc_6165A9:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_6165CD
mov	edx, [ebx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_6165CD:
mov	ecx, ebp
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_616530 endp

align 10h



sub_6165F0 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_6165F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
lea	esi, [edi+30h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+24h+var_D]
mov	[esp+24h+var_D], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	ebp, 80000000h
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_616648
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax
mov	ebp, 80000000h

loc_616648:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+24h]
push	esi
lea	ecx, [esp+24h+var_D]
mov	[esp+24h+var_D], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_616679
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E22C0

loc_616679:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+18h]
push	esi
lea	ecx, [esp+24h+var_D]
mov	[esp+24h+var_D], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_6166B5
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
call	eax
mov	ebp, 80000000h

loc_6166B5:
mov	[esi], ebx
mov	[esi+8], ebp
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+24h+var_D]
mov	[esp+24h+var_D], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	ebp, edx
jnz	short loc_6166E6
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_6166E6:
mov	[esi], ebx
mov	[esi+8], ebp
mov	[esp+20h+var_4], ebx
push	edi
lea	ecx, [esp+24h+var_D]
mov	[esp+24h+var_D], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_616718
and	edx, 3FFFFFFFh
push	edx
mov	edx, [edi]
push	edx
mov	ecx, eax
call	sub_4C7E50

loc_616718:
mov	[edi], ebx
mov	[edi+8], ebp
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	ecx, [esp+20h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	large fs:0, ecx
add	esp, 10h
retn	4
sub_6165F0 endp

align 10h



sub_616740 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_AD3ED0
lea	ecx, [esi+0Ch]
call	sub_AD3ED0
lea	ecx, [esi+8]
call	sub_AD3ED0
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_616784
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_616784:
mov	eax, esi
pop	esi
retn	4
sub_616740 endp

align 10h



sub_616790 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6167C0
test	[esp+4+arg_0], 1
jz	short loc_6167BA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6167BA:
mov	eax, edi
pop	edi
retn	4
sub_616790 endp




sub_6167C0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
lea	esi, [edi+14h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_6167F1
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_6167F1:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_616826
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
push	edx
mov	ecx, eax
call	sub_4E2290

loc_616826:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 4
jmp	sub_4DA650
sub_6167C0 endp

align 10h



sub_616840 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_616880
test	[esp+4+arg_0], 1
jz	short loc_61686B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61686B:
mov	eax, esi
pop	esi
retn	4
sub_616840 endp

align 10h



sub_616880 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
add	esi, 8
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi]
mov	ebx, eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_6168C1
push	ebp
push	edi
lea	edi, [ecx+4]
mov	ebp, eax
jmp	short loc_6168B0
align 10h

loc_6168B0:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	ebp, 1
jnz	short loc_6168B0
pop	edi
pop	ebp

loc_6168C1:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_6168E7
mov	edx, [ebx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_6168E7:
mov	ecx, [esp+0Ch+arg_0]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_4DA650
pop	esi
pop	ebx
pop	ecx
retn	4
sub_616880 endp

align 10h



sub_616910 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	ecx, [edi+20h]
test	ecx, ecx
jz	short loc_61691F
call	sub_AD6020

loc_61691F:
mov	dword ptr [edi+20h], 0
call	sub_6167C0
test	[esp+4+arg_0], 1
jz	short loc_61694D
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61694D:
mov	eax, edi
pop	edi
retn	4
sub_616910 endp

align 10h



sub_616960 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12AAAF0
test	[esp+4+arg_0], 1
jz	short loc_61698A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61698A:
mov	eax, esi
pop	esi
retn	4
sub_616960 endp




sub_616990 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_6169D0
test	[esp+4+arg_0], 1
jz	short loc_6169BB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6169BB:
mov	eax, esi
pop	esi
retn	4
sub_616990 endp

align 10h



sub_6169D0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
lea	ecx, [edi+20h]
call	sub_AD3ED0
add	edi, 14h
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [edi+4]
mov	ebp, [edi]
mov	ecx, eax
xor	esi, esi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_616A24

loc_616A06:
mov	ecx, [ebp+esi*4+0]
test	ecx, ecx
jz	short loc_616A13
call	sub_AD6020

loc_616A13:
mov	dword ptr [ebp+esi*4+0], 0
inc	esi
cmp	esi, ebx
jl	short loc_616A06
mov	ecx, [esp+18h+var_4]

loc_616A24:
mov	eax, [edi+8]
mov	dword ptr [edi+4], 0
test	eax, eax
js	short loc_616A46
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [edi]
push	eax
call	edx

loc_616A46:
mov	ecx, [esp+18h+arg_0]
mov	dword ptr [edi], 0
mov	dword ptr [edi+8], 80000000h
call	sub_12AAAF0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_6169D0 endp

align 10h



sub_616A70 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
add	esi, 4
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ebx, eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_616AB0
push	ebp
mov	ebp, eax

loc_616A98:
lea	ecx, [edi+4]
call	sub_4D6C60
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	ebp, 1
jnz	short loc_616A98
pop	ebp

loc_616AB0:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_616AD6
mov	edx, [ebx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_616AD6:
mov	ecx, [esp+10h+arg_0]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD3ED0
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_616A70 endp

align 10h



sub_616B00 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_616B30
test	[esp+4+arg_0], 1
jz	short loc_616B2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_616B2A:
mov	eax, edi
pop	edi
retn	4
sub_616B00 endp




sub_616B30 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_616B6A
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
shl	edx, 4
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_616B6A:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_616B30 endp

align 10h



sub_616B90 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_616BC0
test	[esp+4+arg_0], 1
jz	short loc_616BBA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_616BBA:
mov	eax, edi
pop	edi
retn	4
sub_616B90 endp




sub_616BC0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [edi+1Ch]
call	sub_AD3ED0
lea	ecx, [edi+18h]
call	sub_AD3ED0
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_616C07
mov	ecx, [esi]
push	ebp
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_616C07:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_616BC0 endp

align 10h



sub_616C20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12AB930
test	[esp+4+arg_0], 1
jz	short loc_616C4A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_616C4A:
mov	eax, esi
pop	esi
retn	4
sub_616C20 endp




sub_616C50 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_616C80
test	[esp+4+arg_0], 1
jz	short loc_616C7A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_616C7A:
mov	eax, edi
pop	edi
retn	4
sub_616C50 endp




sub_616C80 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_616C80
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
push	esi
lea	esi, [edi+8]
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
push	esi
lea	ecx, [esp+1Ch+var_11]
mov	[esp+1Ch+var_11], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_616CD6
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4C7E50

loc_616CD6:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, edi
call	sub_4DA650
mov	ecx, [esp+18h+var_C]
pop	esi
mov	large fs:0, ecx
add	esp, 14h
retn
sub_616C80 endp

align 10h



sub_616D10 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_616D4A
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*2]
mov	edx, [esi]
add	ecx, ecx
push	ebp
mov	ebp, [eax]
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [ebp+10h]
push	edx
call	eax
pop	ebp

loc_616D4A:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	ecx
retn
sub_616D10 endp

align 10h



sub_616D60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_616D90
test	[esp+4+arg_0], 1
jz	short loc_616D8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_616D8A:
mov	eax, edi
pop	edi
retn	4
sub_616D60 endp




sub_616D90 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_616DCA
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
shl	edx, 6
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_616DCA:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_616D90 endp

align 10h



sub_616DF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12A3090
test	[esp+4+arg_0], 1
jz	short loc_616E1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_616E1A:
mov	eax, esi
pop	esi
retn	4
sub_616DF0 endp




sub_616E20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_616E60
test	[esp+4+arg_0], 1
jz	short loc_616E4B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_616E4B:
mov	eax, esi
pop	esi
retn	4
sub_616E20 endp

align 10h



sub_616E60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
push	edi
lea	esi, [ebx+18h]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
xor	ebp, ebp
mov	[esi+4], ebp
test	edx, edx
js	short loc_616E9D
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
shl	edx, 6
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_616E9D:
mov	[esi], ebp
mov	dword ptr [esi+8], 80000000h
lea	esi, [ebx+0Ch]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ecx, eax
mov	eax, [esi+4]
cmp	eax, ebp
mov	[esp+14h+var_4], ecx
jle	short loc_616EE3
mov	ebp, eax
lea	esp, [esp+0]

loc_616ED0:
mov	ecx, edi
call	sub_AD3ED0
add	edi, 4
sub	ebp, 1
jnz	short loc_616ED0
mov	ecx, [esp+14h+var_4]

loc_616EE3:
mov	eax, [esi+8]
mov	[esi+4], ebp
test	eax, eax
js	short loc_616F01
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_616F01:
mov	[esi], ebp
mov	dword ptr [esi+8], 80000000h
mov	ecx, [ebx+8]
cmp	ecx, ebp
jz	short loc_616F16
call	sub_AD6020

loc_616F16:
mov	ecx, ebx
mov	[ebx+8], ebp
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_616E60 endp

align 10h



sub_616F30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+18h]
call	sub_AD3ED0
lea	ecx, [esi+14h]
call	sub_AD3ED0
mov	ecx, esi
call	sub_12AAAF0
test	[esp+4+arg_0], 1
jz	short loc_616F6C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_616F6C:
mov	eax, esi
pop	esi
retn	4
sub_616F30 endp

align 10h



sub_616F80 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_616FB0
test	[esp+4+arg_0], 1
jz	short loc_616FAA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_616FAA:
mov	eax, edi
pop	edi
retn	4
sub_616F80 endp




sub_616FB0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_616FE7
mov	ecx, [esi]
push	ebp
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_616FE7:
lea	ecx, [edi+8]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD3ED0
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_616FB0 endp

align 10h



sub_617010 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_617040
test	[esp+4+arg_0], 1
jz	short loc_61703A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61703A:
mov	eax, edi
pop	edi
retn	4
sub_617010 endp




sub_617040 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+1Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_617077
mov	ecx, [esi]
push	ebp
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_617077:
lea	ecx, [edi+18h]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD3ED0
lea	ecx, [edi+14h]
call	sub_AD3ED0
lea	ecx, [edi+10h]
call	sub_AD3ED0
lea	ecx, [edi+8]
call	sub_AD3ED0
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_617040 endp

align 10h



sub_6170B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12AB820
test	[esp+4+arg_0], 1
jz	short loc_6170DA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6170DA:
mov	eax, esi
pop	esi
retn	4
sub_6170B0 endp




sub_6170E0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_617110
test	[esp+4+arg_0], 1
jz	short loc_61710A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61710A:
mov	eax, edi
pop	edi
retn	4
sub_6170E0 endp




sub_617110 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
lea	esi, [edi+14h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_617141
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_617141:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_617176
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
push	edx
mov	ecx, eax
call	sub_4E2260

loc_617176:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	ecx, edi
pop	ebx
add	esp, 4
jmp	sub_4DA650
sub_617110 endp

align 10h



sub_617190 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_6171C0
test	[esp+4+arg_0], 1
jz	short loc_6171BA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_6171BA:
mov	eax, edi
pop	edi
retn	4
sub_617190 endp




sub_6171C0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_6171F3
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_6171F3:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	ecx, edi
pop	esi
add	esp, 4
jmp	sub_4DA650
sub_6171C0 endp

align 10h



sub_617210 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+5Ch]
call	sub_616D10
lea	eax, [edi+8]
push	eax
call	sub_6165F0
mov	ecx, edi
call	sub_4DA650
test	[esp+8+arg_0], 1
jz	short loc_61724E
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61724E:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_617210 endp

align 10h



sub_617260 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_6172A0
test	[esp+4+arg_0], 1
jz	short loc_61728B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61728B:
mov	eax, esi
pop	esi
retn	4
sub_617260 endp

align 10h



sub_6172A0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
add	edi, 8
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebx, [edi+4]
mov	ebp, [edi]
mov	ecx, eax
xor	esi, esi
mov	[esp+18h+var_4], ecx
test	ebx, ebx
jle	short loc_6172EE
mov	edi, edi

loc_6172D0:
mov	ecx, [ebp+esi*4+0]
test	ecx, ecx
jz	short loc_6172DD
call	sub_AD6020

loc_6172DD:
mov	dword ptr [ebp+esi*4+0], 0
inc	esi
cmp	esi, ebx
jl	short loc_6172D0
mov	ecx, [esp+18h+var_4]

loc_6172EE:
mov	eax, [edi+8]
mov	dword ptr [edi+4], 0
test	eax, eax
js	short loc_617310
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
push	eax
mov	eax, [edi]
push	eax
call	edx

loc_617310:
mov	ecx, [esp+18h+arg_0]
mov	dword ptr [edi], 0
mov	dword ptr [edi+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_6172A0 endp




sub_617330 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_617370
test	[esp+4+arg_0], 1
jz	short loc_61735B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61735B:
mov	eax, esi
pop	esi
retn	4
sub_617330 endp

align 10h



sub_617370 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
add	esi, 8
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ebx, eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_6173B0
push	ebp
mov	ebp, eax

loc_617398:
lea	ecx, [edi+4]
call	sub_AD3ED0
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	ebp, 1
jnz	short loc_617398
pop	ebp

loc_6173B0:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_6173D6
mov	edx, [ebx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_6173D6:
mov	ecx, [esp+10h+arg_0]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_4DA650
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_617370 endp

align 10h



sub_617400 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	sub_AD3ED0
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_617434
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_617434:
mov	eax, esi
pop	esi
retn	4
sub_617400 endp

align 10h



sub_617440 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12794E0
test	[esp+4+arg_0], 1
jz	short loc_61746A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61746A:
mov	eax, esi
pop	esi
retn	4
sub_617440 endp




sub_617470 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4

sub	esp, 8
push	edi
push	esi
lea	ecx, [esp+10h+var_5]
mov	[esp+10h+var_5], 0
call	sub_4A00D0
mov	edi, [esi]
mov	[esp+0Ch+var_4], eax
mov	eax, [esi+4]
test	eax, eax
jle	short loc_6174A5
push	ebp
mov	ebp, eax

loc_617493:
push	0
mov	ecx, edi
call	sub_4E18C0
add	edi, 0Ch
sub	ebp, 1
jnz	short loc_617493
pop	ebp

loc_6174A5:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
pop	edi
test	eax, eax
js	short loc_6174C6
mov	ecx, [esp+8+var_4]
and	eax, 3FFFFFFFh
push	eax
mov	eax, [esi]
push	eax
call	sub_4E24B0

loc_6174C6:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	eax, esi
add	esp, 8
retn
sub_617470 endp

align 10h



sub_6174E0 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+0Ch]
call	sub_603220
mov	ecx, edi
call	sub_4DA650
test	[esp+8+arg_0], 1
jz	short loc_617515
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_617515:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_6174E0 endp

align 10h



sub_617520 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax
mov	eax, [eax]
push	eax
add	ecx, 8
call	sub_6032F0
retn	4
sub_617520 endp

align 10h



sub_617540 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	esi
push	edi
mov	ebx, ecx
push	eax
lea	edi, [ebx+8]
xor	eax, eax
call	sub_603480
mov	esi, eax
test	esi, esi
jz	short loc_617577
mov	eax, [esi+4]
test	eax, eax
jz	short loc_61756F
mov	ecx, [ebx+18h]
mov	edx, [esp+0Ch+arg_0]
push	ecx
push	edx
call	eax
add	esp, 8

loc_61756F:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8

loc_617577:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	8
sub_617540 endp

align 10h



sub_617580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	edi
push	eax
lea	edi, [ecx+8]
xor	eax, eax
call	sub_603480
mov	esi, eax
test	esi, esi
jz	short loc_6175AA
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6175A8
mov	ecx, [esp+8+arg_0]
push	ecx
call	eax
add	esp, 4

loc_6175A8:
mov	eax, esi

loc_6175AA:
pop	edi
pop	esi
retn	8
sub_617580 endp

align 10h



sub_6175B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
add	ebx, 8
push	edi
mov	ecx, ebx
call	sub_603250
mov	edi, eax
mov	ecx, edi
lea	esi, [esp+10h+arg_0]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jz	short loc_61761E
add	ebp, 8

loc_6175E1:
mov	edx, edi
mov	eax, ebx
call	sub_603280
push	eax
push	edi
mov	eax, ebx
call	sub_603270
push	eax
mov	ecx, ebp
call	sub_6032F0
mov	eax, edi
mov	ecx, ebx
call	sub_6032B0
mov	edi, eax
mov	ecx, edi
lea	esi, [esp+10h+arg_0]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jnz	short loc_6175E1

loc_61761E:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6175B0 endp

align 10h



sub_617630 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	edi
push	eax
lea	edi, [ecx+8]
xor	eax, eax
call	sub_603480
pop	edi
retn	4
sub_617630 endp

align 10h



sub_617650 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+8]
call	sub_603220
mov	ecx, edi
call	sub_4DA650
test	[esp+8+arg_0], 1
jz	short loc_617685
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_617685:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_617650 endp

align 10h



sub_617690 proc	near
mov	ecx, dword_196D2E4
mov	eax, [ecx]
mov	edx, [eax+24h]
push	esi
push	edi
push	offset unk_1968154
call	edx
mov	eax, ds:off_1513FE8
mov	edi, dword_196D2E8
mov	esi, offset off_1513FE8
test	eax, eax
jz	short loc_6176CC

loc_6176B8:
mov	edx, [edi]
push	eax
mov	eax, [edx+0Ch]
mov	ecx, edi
call	eax
mov	eax, [esi+4]
add	esi, 4
test	eax, eax
jnz	short loc_6176B8

loc_6176CC:
mov	edi, dword_196D2E0
call	sub_11D8C10
pop	edi
pop	esi
retn
sub_617690 endp

align 10h



sub_6176E0 proc	near
mov	eax, dword_196D2E8
retn
sub_6176E0 endp

align 10h



sub_6176F0 proc	near
mov	eax, dword_196D2E4
retn
sub_6176F0 endp

align 10h



sub_617700 proc	near
mov	eax, dword_196D2E0
retn
sub_617700 endp

align 10h



sub_617710 proc	near

arg_0= dword ptr  4

push	ecx
push	esi
push	edi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	20h
call	eax
mov	edi, eax
mov	byte ptr [esp+4+arg_0],	0
mov	eax, [esp+4+arg_0]
mov	ecx, 20h
mov	edx, 1
push	eax
lea	esi, [edi+0Ch]
mov	[edi+4], cx
mov	[edi+6], dx
mov	dword ptr [edi], offset	off_15E1800
mov	dword ptr [edi+8], offset aHavok7_1_0R1	; "Havok-7.1.0-r1"
call	sub_6031D0
mov	dword ptr [edi], offset	off_15F7AD4
mov	ecx, dword_196D2E4
test	ecx, ecx
jz	short loc_617772
call	sub_AD5E10

loc_617772:
mov	dword_196D2E4, edi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	1Ch
call	eax
mov	edi, eax
mov	byte ptr [esp+8], 0
mov	eax, [esp+8]
mov	ecx, 1Ch
mov	edx, 1
push	eax
lea	esi, [edi+8]
mov	[edi+4], cx
mov	[edi+6], dx
mov	dword ptr [edi], offset	off_15F7AB0
call	sub_6031D0
mov	dword ptr [edi+18h], 1
mov	ecx, dword_196D2E8
test	ecx, ecx
jz	short loc_6177D1
call	sub_AD5E10

loc_6177D1:
mov	dword_196D2E8, edi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	14h
call	eax
mov	esi, eax
mov	ecx, 14h
mov	[esi+4], cx
mov	edx, 1
push	0
lea	ecx, [esi+8]
mov	[esi+6], dx
mov	dword ptr [esi], offset	off_15D6AB4
call	sub_4DD190
mov	ecx, dword_196D2E0
test	ecx, ecx
jz	short loc_617821
call	sub_AD5E10

loc_617821:
pop	edi
mov	dword_196D2E0, esi
pop	esi
add	esp, 4
jmp	sub_617690
sub_617710 endp

align 10h



sub_617840 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_61786A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61786A:
mov	eax, esi
pop	esi
retn	4
sub_617840 endp




sub_617870 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A58A60
test	[esp+4+arg_0], 1
jz	short loc_61789A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61789A:
mov	eax, edi
pop	edi
retn	4
sub_617870 endp




sub_6178A0 proc	near

var_1= byte ptr	-1

push	ecx
push	edi
lea	edi, [esi+0Ch]
push	edi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
push	eax
mov	ecx, edi
call	sub_602040
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	edi, 80000000h
mov	dword ptr [esi+4], 0
test	edi, edx
jnz	short loc_6178F9
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_6178F9:
mov	[esi+8], edi
mov	dword ptr [esi], 0
pop	edi
pop	ecx
retn
sub_6178A0 endp

align 10h



sub_617910 proc	near

var_1= byte ptr	-1

push	ecx
lea	ecx, [esi+0Ch]
call	sub_4DCDB0
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_617951
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_617951:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	ecx
retn
sub_617910 endp




sub_617960 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, eax
add	esi, 0Ch
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61799C
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
shl	edx, 4
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_61799C:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	esi
pop	ecx
retn
sub_617960 endp

align 10h



sub_6179B0 proc	near

var_1= byte ptr	-1

sub	esp, 8
xor	eax, eax
push	edi
lea	edi, [esi+0Ch]
mov	[esi], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 80000000h
push	eax
push	edi
lea	ecx, [esp+14h+var_1]
mov	[edi], eax
mov	[edi+4], eax
mov	dword ptr [edi+8], 0FFFFFFFFh
mov	[esp+14h+var_1], al
call	sub_4A00D0
push	eax
mov	ecx, edi
call	sub_602070
mov	dword ptr [esi+18h], 0FFFFFFFFh
mov	eax, esi
pop	edi
add	esp, 8
retn
sub_6179B0 endp

align 10h



sub_617A00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
push	edi
mov	edi, eax
xor	esi, esi
cmp	[edi+4], esi
jle	short loc_617A44
mov	edx, [ebp+8]
mov	eax, [edi]
lea	esp, [esp+0]

loc_617A20:
mov	ecx, [eax]
mov	ebx, [eax+0Ch]
mov	[esp+20h+var_10], ecx
mov	ecx, [eax+4]
mov	[esp+20h+var_C], ecx
mov	ecx, [eax+8]
cmp	edx, ecx
mov	[esp+20h+var_4], ebx
jl	short loc_617AA8
inc	esi
add	eax, 10h
cmp	esi, [edi+4]
jl	short loc_617A20

loc_617A44:
push	edi
lea	ecx, [esp+24h+arg_0]
mov	byte ptr [esp+24h+arg_0], 0
call	sub_4A00D0
mov	edx, [edi+8]
and	edx, 3FFFFFFFh
cmp	[edi+4], edx
jnz	short loc_617A6D
push	10h
push	edi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_617A6D:
mov	eax, [edi+4]
shl	eax, 4
add	eax, [edi]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_617A9B
mov	ecx, [ebp+0]
mov	edx, [ebp+4]
mov	[eax], ecx
mov	ecx, [ebp+8]
mov	[eax+4], edx
mov	edx, [ebp+0Ch]
mov	[eax+8], ecx
mov	[eax+0Ch], edx

loc_617A9B:
inc	dword ptr [edi+4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4

loc_617AA8:
push	ebp
push	edi
lea	ecx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_0], 0
call	sub_4A00D0
mov	ecx, esi
call	sub_617BA0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4
sub_617A00 endp

align 10h



sub_617AD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	esi, eax
push	0FFFFFFFFh
lea	edi, [esi+0Ch]
push	ebx
mov	ecx, edi
call	sub_4DDD80
mov	ebp, eax
call	sub_61EDF0
mov	ecx, [esi]
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
lea	ecx, [ecx+eax*8]
push	eax
push	ebx
mov	[ecx], edx
mov	[ecx+4], ebp
push	edi
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
push	eax
mov	ecx, edi
call	sub_4DEB60
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_617AD0 endp

align 10h



sub_617B20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
push	0FFFFFFFFh
push	0FFFFFFFFh
push	eax
push	ecx
mov	ecx, [esp+10h+arg_0]
add	ecx, 0Ch
call	sub_601E60
retn	0Ch
sub_617B20 endp

align 10h



sub_617B40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	esi, eax
push	ebx
lea	edi, [esi+0Ch]
push	ebp
mov	ecx, edi
call	sub_601E60
mov	[esp+10h+arg_0], eax
call	sub_61EDF0
mov	ecx, [esi]
mov	edx, [esp+10h+arg_8]
mov	edx, [edx]
lea	ecx, [ecx+eax*8]
mov	[ecx], edx
mov	edx, [esp+10h+arg_0]
mov	[ecx+4], edx
cdq
push	edx
push	eax
push	ebx
push	ebp
push	edi
lea	ecx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+arg_8], 0
call	sub_4A00D0
push	eax
mov	ecx, edi
call	sub_601D70
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_617B40 endp

align 10h



sub_617BA0 proc	near

arg_0= dword ptr  4

push	eax
mov	eax, [esp+4+arg_0]
call	sub_617BB0
retn	4
sub_617BA0 endp

align 10h



sub_617BB0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	eax
push	ecx
push	edx
call	sub_617BC0
retn	4
sub_617BB0 endp

align 10h



sub_617BC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [edi+4]
mov	ecx, [esp+arg_4]
push	ebx
push	ebp
lea	ebp, [eax+1]
sub	eax, ecx
mov	ebx, eax
mov	eax, [edi+8]
and	eax, 3FFFFFFFh
cmp	eax, ebp
push	esi
jge	short loc_617BFA
add	eax, eax
cmp	ebp, eax
jl	short loc_617BE5
mov	eax, ebp

loc_617BE5:
push	10h
push	eax
mov	eax, [esp+14h+arg_0]
push	edi
push	eax
call	sub_121B8C0
mov	ecx, [esp+1Ch+arg_4]
add	esp, 10h

loc_617BFA:
mov	eax, [edi]
mov	esi, ecx
inc	ecx
shl	esi, 4
shl	ebx, 4
push	ebx
lea	edx, [esi+eax]
shl	ecx, 4
push	edx
add	ecx, eax
push	ecx
call	sub_AD3070
mov	eax, [edi]
add	eax, esi
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 14h
test	eax, eax
jz	short loc_617C42
mov	ecx, [esp+0Ch+arg_8]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	ecx, [ecx+0Ch]
mov	[eax+8], edx
mov	[eax+0Ch], ecx

loc_617C42:
pop	esi
mov	[edi+4], ebp
pop	ebp
pop	ebx
retn	0Ch
sub_617BC0 endp

align 10h


; Attributes: thunk

sub_617C50 proc	near
jmp	sub_617C60
sub_617C50 endp

align 10h



sub_617C60 proc	near
push	eax
push	ecx
call	sub_617C70
retn
sub_617C60 endp

align 10h



sub_617C70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esi+8]
push	ebx
mov	ebx, [esi+4]
push	edi
lea	edi, [ebx+1]
and	eax, 3FFFFFFFh
cmp	eax, edi
jge	short loc_617C9D
add	eax, eax
cmp	edi, eax
jl	short loc_617C8C
mov	eax, edi

loc_617C8C:
push	4
push	eax
mov	eax, [esp+10h+arg_0]
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_617C9D:
mov	eax, [esi]
lea	ecx, ds:0[ebx*4]
push	ecx
push	eax
add	eax, 4
push	eax
call	sub_AD3070
mov	edx, [esp+14h+arg_4]
mov	ecx, [edx]
mov	eax, [esi]
add	esp, 0Ch
mov	[eax], ecx
mov	[esi+4], edi
pop	edi
pop	ebx
retn	8
sub_617C70 endp

align 10h



sub_617CD0 proc	near

var_4= dword ptr -4

push	ecx
cmp	eax, 0CAB00D1Eh
jnz	short loc_617CE0
cmp	ecx, 0D011FACEh
jz	short loc_617D2E

loc_617CE0:
mov	edx, eax
shr	edx, 18h
mov	byte ptr [esp+4+var_4],	dl
mov	edx, eax
shr	edx, 10h
mov	byte ptr [esp+4+var_4+1], dl
mov	edx, eax
shr	edx, 8
mov	byte ptr [esp+4+var_4+2], dl
mov	byte ptr [esp+4+var_4+3], al
cmp	[esp+4+var_4], 0CAB00D1Eh
jnz	short loc_617D3C
mov	eax, ecx
shr	eax, 18h
mov	byte ptr [esp+4+var_4],	al
mov	edx, ecx
mov	eax, ecx
shr	edx, 10h
shr	eax, 8
mov	byte ptr [esp+4+var_4+1], dl
mov	byte ptr [esp+4+var_4+2], al
mov	byte ptr [esp+4+var_4+3], cl
cmp	[esp+4+var_4], 0D011FACEh
jnz	short loc_617D3C

loc_617D2E:
mov	al, 1
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	ecx
retn

loc_617D3C:
xor	al, al
mov	ecx, esi
push	eax
call	sub_4D4F20
mov	eax, esi
pop	ecx
retn
sub_617CD0 endp

align 10h



sub_617D50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
cmp	dword ptr [ecx+8], 0
push	ebx
mov	ebx, [esp+14h+arg_4]
push	ebp
push	esi
mov	[esp+1Ch+var_4], ecx
jz	loc_617E28
mov	ecx, ebx
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	loc_617E28
push	edi
lea	esi, [esp+20h+var_C]
mov	eax, ebx
call	sub_A57180
mov	ecx, dword_196D2BC
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	edi, eax
mov	esi, [edi]
lea	eax, [esp+1Ch+var_8]
add	esi, 10h
call	sub_A57050
push	eax
mov	eax, [esi]
mov	ecx, edi
call	eax
lea	esi, [esp+1Ch+var_8]
mov	ecx, ebx
mov	ebp, eax
call	sub_A56F50
mov	esi, [esp+1Ch+var_4]
mov	edi, [esp+1Ch+var_8]
mov	[esp+1Ch+arg_8], edi
test	esi, esi
jnz	short loc_617DC6
mov	esi, ebp

loc_617DC6:
mov	ebp, [esp+1Ch]
mov	ecx, [ebp+8]
lea	eax, [esp+1Ch+var_C]
push	eax
mov	[esp+20h+var_C], esi
mov	edx, [ecx]
mov	edx, [edx+0Ch]
lea	eax, [esp+20h+arg_8]
push	eax
call	edx
mov	eax, [esp+20h+arg_4]
mov	ecx, [esp+20h+var_10]
cmp	eax, edi
pop	edi
jnz	short loc_617DF3
cmp	ecx, esi
jz	short loc_617E28

loc_617DF3:
test	eax, eax
jz	short loc_617E14
mov	edx, [ebp+0Ch]
push	edx
call	sub_A56990
mov	ecx, eax
mov	eax, [esp+1Ch+arg_0]
call	sub_A57360
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_617E14:
mov	eax, [esp+1Ch+arg_0]
xor	ecx, ecx
call	sub_A57360
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_617E28:
mov	eax, [esp+1Ch+arg_0]
mov	ecx, ebx
call	sub_A57340
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_617D50 endp

align 10h



sub_617E40 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_11E2E10
test	[esp+4+arg_0], 1
jz	short loc_617E6A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_617E6A:
mov	eax, edi
pop	edi
retn	4
sub_617E40 endp




sub_617E70 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	edx
mov	eax, esi
pop	esi
retn	4
sub_617E70 endp

align 10h



sub_617E90 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+10h]
jmp	eax
sub_617E90 endp

align 10h



sub_617EA0 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+14h]
jmp	edx
sub_617EA0 endp

align 10h



sub_617EB0 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+18h]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	edx
mov	eax, esi
pop	esi
retn	4
sub_617EB0 endp

align 10h



sub_617ED0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
test	edx, edx
jnz	short loc_617EF0
mov	eax, [ecx+0Ch]
add	eax, [esp+arg_0]
mov	ecx, [ecx+8]
push	esi
mov	esi, [ecx]
push	edx
push	eax
mov	eax, [esi+1Ch]
call	eax
pop	esi
retn	8

loc_617EF0:
mov	ecx, [ecx+8]
mov	eax, [esp+arg_0]
push	esi
mov	esi, [ecx]
push	edx
push	eax
mov	eax, [esi+1Ch]
call	eax
pop	esi
retn	8
sub_617ED0 endp

align 10h



sub_617F10 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx
sub	eax, [esi+0Ch]
pop	esi
retn
sub_617F10 endp

align 10h



sub_617F30 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_617F5A
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_617F5A:
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [esp+4+arg_0]
lea	eax, [eax+edx*8]
mov	edx, [esp+4+arg_4]
mov	[eax], ecx
mov	[eax+4], edx
inc	dword ptr [esi+4]
pop	ecx
retn	8
sub_617F30 endp

align 10h



sub_617F80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	[ebp+0], eax
push	esi
xor	ebx, ebx
push	edi
mov	ecx, 80000000h
mov	[ebp+4], ebx
mov	[ebp+8], ebx
mov	[ebp+0Ch], ecx
add	eax, 4
push	eax
lea	edi, [ebp+20h]
mov	[ebp+10h], ebx
mov	[ebp+14h], ebx
mov	[ebp+18h], ecx
call	sub_A4F250
mov	byte ptr [esp+10h+arg_0], bl
mov	eax, [esp+10h+arg_0]
push	eax
lea	esi, [ebp+30h]
call	sub_6031D0
mov	edx, [esp+10h+arg_4]
mov	[ebp+40h], ebx
mov	[ebp+44h], ebx
mov	dword ptr [ebp+48h], 80000000h
mov	cl, byte ptr word_184D538+1
cmp	cl, [edx+5]
setnz	al
movzx	ecx, al
push	ecx
lea	ecx, [ebp+4Ch]
call	sub_4D4F20
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	8
sub_617F80 endp

align 10h



sub_618000 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_124F800
test	[esp+4+arg_0], 1
jz	short loc_61802C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61802C:
mov	eax, esi
pop	esi
retn	4
sub_618000 endp

align 10h



sub_618040 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, eax
lea	esi, [edi+40h]
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ebp, [esi]
mov	ecx, eax
mov	eax, [esi+4]
mov	[esp+18h+var_4], ecx
test	eax, eax
jle	short loc_618082
mov	ebx, eax
lea	esp, [esp+0]

loc_618070:
push	ebp
call	sub_11DDBF0
add	ebp, 34h
sub	ebx, 1
jnz	short loc_618070
mov	ecx, [esp+18h+var_4]

loc_618082:
mov	eax, [esi+8]
mov	ebx, 80000000h
mov	dword ptr [esi+4], 0
test	ebx, eax
jnz	short loc_6180A8
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
imul	eax, 34h
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_6180A8:
mov	dword ptr [esi], 0
mov	[esi+8], ebx
lea	esi, [edi+30h]
call	sub_603220
lea	ecx, [edi+20h]
call	sub_A4F350
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	edx, [esi+8]
xor	ebp, ebp
mov	[esi+4], ebp
test	ebx, edx
jnz	short loc_6180F8
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_6180F8:
mov	[esi], ebp
mov	[esi+8], ebx
lea	esi, [edi+4]
push	esi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebp
test	ebx, edx
jnz	short loc_618132
mov	edi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*2]
mov	edx, [esi]
shl	ecx, 4
push	ecx
mov	ecx, eax
mov	eax, [edi+10h]
push	edx
call	eax

loc_618132:
pop	edi
mov	[esi+8], ebx
mov	[esi], ebp
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_618040 endp

align 10h



sub_618140 proc	near
mov	eax, [eax+4]
lea	eax, [eax+eax*2]
shl	eax, 4
retn
sub_618140 endp

align 10h



sub_618150 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_A56B00
test	[esp+4+arg_0], 1
jz	short loc_61817B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61817B:
mov	eax, esi
pop	esi
retn	4
sub_618150 endp

align 10h



sub_618190 proc	near
fldz
retn	4
sub_618190 endp

align 10h



sub_6181A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fldz
mov	eax, [esp+4+arg_0]
fstp	[esp+4+var_4]
mov	ecx, [esp+4+var_4]
sar	ecx, 10h
mov	[eax], cx
pop	ecx
retn	8
sub_6181A0 endp

align 10h



sub_6181C0 proc	near
xor	eax, eax
xor	edx, edx
retn	4
sub_6181C0 endp

align 10h



sub_6181D0 proc	near
xor	eax, eax
retn	4
sub_6181D0 endp

align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_42. PRESS	KEYPAD "+" TO EXPAND]
align 10h



sub_6181F0 proc	near
mov	eax, [ecx+0Ch]
jmp	sub_AD4F80
sub_6181F0 endp

align 10h



sub_618200 proc	near
mov	eax, [ecx+0Ch]
jmp	sub_AD4EA0
sub_618200 endp

align 10h



sub_618210 proc	near
mov	eax, [ecx+0Ch]
call	sub_AD4F70
test	eax, eax
jz	short loc_61822D
mov	ecx, [ecx+10h]
mov	edx, [ecx]
call	sub_AD4F80
push	eax
mov	eax, [edx+24h]
call	eax
retn

loc_61822D:
xor	eax, eax
retn
sub_618210 endp




sub_618230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, ecx
test	esi, esi
jz	short loc_61826E
lea	ecx, [ecx+0]

loc_618240:
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
mov	ebx, eax
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
mov	ecx, ebx
call	sub_AD31D0
test	eax, eax
jz	short loc_618283
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_618240

loc_61826E:
mov	esi, [esp+0Ch+arg_0]
push	0
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8

loc_618283:
mov	esi, [esp+0Ch+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_618230 endp

align 10h



sub_6182A0 proc	near
mov	eax, [ecx+0Ch]
jmp	sub_AD4EE0
sub_6182A0 endp

align 10h



sub_6182B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [ecx+0Ch]
push	eax
push	ecx
call	sub_AD50A0
retn	4
sub_6182B0 endp

align 10h



sub_6182D0 proc	near
mov	eax, [ecx+0Ch]
jmp	sub_AD4EF0
sub_6182D0 endp

align 10h



sub_6182E0 proc	near
mov	eax, [ecx+0Ch]
jmp	sub_AD51F0
sub_6182E0 endp

align 10h



sub_6182F0 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4

mov	eax, [edi]
sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
mov	[esi], eax
mov	[esi+4], ebx
mov	cx, [edi+10h]
mov	edx, 400h
and	cx, dx
mov	eax, edx
cmp	cx, ax
jnz	short loc_618324
xor	eax, eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
pop	ebx
add	esp, 8
retn	4

loc_618324:
mov	eax, edi
call	sub_AD14E0
push	eax
mov	eax, edi
call	sub_AD1500
movzx	ecx, byte ptr [edi+0Dh]
push	eax
movzx	eax, byte ptr [edi+0Ch]
call	sub_11E0EB0
mov	[esi+8], eax
add	esp, 8
mov	eax, edi
call	sub_AD1500
test	eax, eax
jz	short loc_6183C6
mov	eax, edi
call	sub_AD1530
test	eax, eax
jz	short loc_61839B
push	ebp
push	offset aTypename ; "typeName"
lea	ecx, [esp+14h+var_8]
call	sub_ACE150
mov	ebx, [ebx+10h]
mov	ebp, [ebx]
xor	edx, edx
lea	eax, [esp+10h+var_8]
call	sub_ACE060
mov	ecx, [eax]
mov	edx, [ebp+24h]
push	ecx
mov	ecx, ebx
call	edx
mov	[esi+0Ch], eax
pop	ebp
mov	eax, edi
call	sub_AD14E0
mov	[esi+10h], eax
pop	ebx
add	esp, 8
retn	4

loc_61839B:
mov	ecx, [ebx+10h]
mov	edx, [ecx]
mov	eax, edi
call	sub_AD1500
call	sub_AD4F80
push	eax
mov	eax, [edx+24h]
call	eax
mov	[esi+0Ch], eax
mov	eax, edi
call	sub_AD14E0
mov	[esi+10h], eax
pop	ebx
add	esp, 8
retn	4

loc_6183C6:
mov	eax, edi
mov	dword ptr [esi+0Ch], 0
call	sub_AD14E0
mov	[esi+10h], eax
pop	ebx
add	esp, 8
retn	4
sub_6182F0 endp

align 10h



sub_6183E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
call	sub_AD4ED0
push	esi
mov	esi, [esp+0Ch+arg_4]
mov	edi, eax
call	sub_6182F0
pop	edi
pop	esi
retn	8
sub_6183E0 endp

align 10h



sub_618410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+0Ch]
call	sub_AD50F0
push	esi
mov	esi, [esp+0Ch+arg_4]
mov	edi, eax
call	sub_6182F0
pop	edi
pop	esi
retn	8
sub_618410 endp

align 10h



sub_618440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	ecx, [esp+arg_10]
push	edi
xor	edi, edi
mov	[esi+6], di
mov	[esi+8], edi
mov	edi, [esp+4+arg_0]
mov	[esi+0Ch], edi
mov	edi, [esp+4+arg_4]
mov	[esi+10h], edi
mov	edi, [esp+4+arg_8]
push	eax
mov	[esi+14h], edi
mov	edi, [esp+8+arg_C]
mov	[esi+28h], eax
push	edx
mov	eax, 16h
mov	dword ptr [esi], offset	off_15F8274
mov	[esi+18h], edi
mov	[esi+1Ch], ecx
mov	[esi+20h], edx
call	sub_11E0EB0
add	esp, 8
cmp	eax, 10h
pop	edi
jle	short loc_618499
add	eax, 0FFFFFFF0h
mov	[esi+24h], eax
mov	eax, esi
retn	14h

loc_618499:
mov	eax, 10h
mov	[esi+24h], eax
mov	eax, esi
retn	14h
sub_618440 endp

align 10h



sub_6184B0 proc	near
mov	eax, [ecx+20h]
test	eax, eax
jz	short loc_6184C8
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
call	sub_AD4F80
push	eax
mov	eax, [edx+24h]
call	eax
retn

loc_6184C8:
xor	eax, eax
retn
sub_6184B0 endp

align 10h



sub_6184D0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+18h]
imul	eax, [esp+arg_0]
add	eax, [ecx+10h]
retn	4
sub_6184D0 endp

align 10h



sub_6184E0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+1Ch]
cmp	eax, 1Dh
jz	short loc_618506
cmp	eax, 21h
jz	short loc_6184F2
xor	eax, eax
retn	4

loc_6184F2:
mov	eax, [ecx+18h]
imul	eax, [esp+arg_0]
mov	ecx, [ecx+10h]
mov	eax, [eax+ecx]
and	eax, 0FFFFFFFEh
retn	4

loc_618506:
mov	edx, [ecx+18h]
imul	edx, [esp+arg_0]
mov	eax, [ecx+10h]
mov	eax, [edx+eax]
retn	4
sub_6184E0 endp

align 10h



; int __stdcall	sub_618520(float)
sub_618520 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+1Ch]
cmp	eax, 0Bh
jz	short loc_618557
cmp	eax, 20h
jz	short loc_61853A
fldz
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4

loc_61853A:
mov	eax, [ecx+18h]
imul	eax, [esp+arg_0]
add	eax, [ecx+10h]
mov	ecx, eax
call	sub_4D4FC0
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4

loc_618557:
mov	eax, [ecx+18h]
imul	eax, [esp+arg_0]
mov	ecx, [ecx+10h]
fld	dword ptr [eax+ecx]
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4
sub_618520 endp




sub_618570 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+18h]
imul	eax, [esp+arg_0]
add	eax, [ecx+10h]
mov	ecx, [ecx+1Ch]
dec	ecx
cmp	ecx, 1Dh	; switch 30 cases
ja	short loc_6185AF ; default
			; jumptable 0061858B cases 10-28
movzx	ecx, ds:byte_6185CC[ecx]
jmp	ds:off_6185B4[ecx*4] ; switch jump

loc_618592:		; jumptable 0061858B cases 0-2
movsx	eax, byte ptr [eax]
retn	4

loc_618598:		; jumptable 0061858B case 3
movzx	eax, byte ptr [eax]
retn	4

loc_61859E:		; jumptable 0061858B case 4
movsx	eax, word ptr [eax]
retn	4

loc_6185A4:		; jumptable 0061858B case 5
movzx	eax, word ptr [eax]
retn	4

loc_6185AA:		; jumptable 0061858B cases 6-9,29
mov	eax, [eax]
retn	4

loc_6185AF:		; default
xor	eax, eax	; jumptable 0061858B cases 10-28
retn	4
sub_618570 endp

off_6185B4 dd offset loc_618592	; jump table for switch	statement
dd offset loc_618598
dd offset loc_61859E
dd offset loc_6185A4
dd offset loc_6185AA
dd offset loc_6185AF
byte_6185CC db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	2,     3,     4,     4
db	4,     4,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     4
align 10h



sub_6185F0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+18h]
imul	edx, [esp+arg_0]
mov	ecx, [ecx+10h]
mov	eax, [edx+ecx]
mov	edx, [edx+ecx+4]
retn	4
sub_6185F0 endp

align 10h


; Attributes: bp-based frame

sub_618610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
push	edi
cmp	eax, 14h
jz	short loc_618659
cmp	eax, 19h
jz	short loc_618642
cmp	eax, 1Ch
jnz	short loc_6186AA
mov	eax, [esi+18h]
imul	eax, [ebp+arg_0]
mov	edx, [esi+10h]
mov	ecx, [eax+edx]
mov	eax, [eax+edx+4]
jmp	short loc_618682

loc_618642:
mov	eax, [esi+0Ch]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	eax, [esi+18h]
imul	eax, [ebp+arg_0]
add	eax, [esi+10h]
push	ecx
push	edx
jmp	short loc_618671

loc_618659:
mov	ecx, [esi+18h]
imul	ecx, [ebp+arg_0]
mov	eax, [esi+0Ch]
mov	edx, [eax+8]
mov	eax, [eax+0Ch]
push	edx
mov	edx, [esi+10h]
push	eax
mov	eax, [ecx+edx]

loc_618671:
mov	ecx, [esi+20h]
push	eax
push	ecx
call	sub_A567A0
mov	ecx, eax
mov	eax, edx
add	esp, 10h

loc_618682:
mov	[esp+10h+var_8], ecx
mov	[esp+10h+var_4], eax
test	ecx, ecx
jz	short loc_6186AA
test	eax, eax
jz	short loc_6186AA
mov	edx, [esi+0Ch]
push	edx
lea	edi, [esp+14h+var_8]
call	sub_A56690
add	esp, 4
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_6186AA:
pop	edi
xor	eax, eax
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_618610 endp

align 10h



sub_6186C0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+18h]
imul	ebx, [esp+0Ch+arg_0]
add	ebx, [edi+10h]
cmp	dword ptr [edi+28h], 0
jz	short loc_618724
mov	eax, [edi+1Ch]
push	ebp
call	sub_AD1520
movsx	ebp, word ptr [eax+8]
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	2Ch
call	eax
mov	esi, eax
mov	ecx, 2Ch
mov	[esi+4], cx
mov	edx, [edi+1Ch]
mov	eax, [edi+28h]
mov	ecx, [edi+0Ch]
push	edx
mov	edx, [edi+20h]
push	ebp
push	eax
push	ebx
push	ecx
xor	eax, eax
call	sub_618440
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	4

loc_618724:
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	2Ch
call	eax
mov	esi, eax
push	0
mov	ecx, 2Ch
mov	[esi+4], cx
mov	edx, [ebx+4]
mov	eax, [ebx]
mov	ecx, [edi+0Ch]
push	0
push	edx
push	eax
push	ecx
xor	eax, eax
xor	edx, edx
call	sub_618440
pop	edi
pop	esi
pop	ebx
retn	4
sub_6186C0 endp

align 10h



sub_618770 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
push	eax
mov	eax, [edi+20h]
call	sub_AD5240
mov	ebx, eax
movzx	ebp, word ptr [ebx+12h]
mov	al, [ebx+0Ch]
add	ebp, [edi+10h]
cmp	al, 18h
jz	short loc_6187A0
cmp	al, 1Fh
jz	short loc_6187A0
movzx	ecx, al
mov	[esp+10h+arg_0], ecx
jmp	short loc_6187A8

loc_6187A0:
movzx	edx, byte ptr [ebx+0Dh]
mov	[esp+10h+arg_0], edx

loc_6187A8:
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	2Ch
call	eax
mov	esi, eax
mov	ecx, 2Ch
mov	eax, ebx
mov	[esi+4], cx
call	sub_AD14E0
mov	ecx, eax
mov	eax, ebx
call	sub_AD1500
mov	edx, eax
mov	eax, [esp+10h+arg_0]
push	eax
mov	eax, [edi+18h]
push	eax
mov	eax, [edi+14h]
push	eax
mov	eax, [edi+0Ch]
push	ebp
push	eax
mov	eax, ecx
call	sub_618440
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_618770 endp

align 10h



sub_618800 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F8204
jz	short loc_61882B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61882B:
mov	eax, esi
pop	esi
retn	4
sub_618800 endp

align 10h



sub_618840 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
push	ebx
mov	ebx, [ecx+10h]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	[edi], eax
lea	esi, [esp+0Ch+arg_0]
mov	eax, ebx
call	sub_AD5060
mov	ecx, eax
call	sub_4D4F40
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
not	ecx
and	ecx, ebx
mov	[edi+4], ecx
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_618840 endp

align 10h



sub_618880 proc	near
mov	eax, [ecx+10h]
test	eax, eax
jz	short loc_618898
mov	ecx, [ecx+14h]
mov	edx, [ecx]
call	sub_AD4F80
push	eax
mov	eax, [edx+24h]
call	eax
retn

loc_618898:
xor	eax, eax
retn
sub_618880 endp

align 10h



sub_6188A0 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	esi, ecx
push	edi
lea	eax, [esi+0Ch]
lea	ecx, [esp+14h+var_8]
call	sub_ACE150
mov	eax, [esp+10h+arg_0]
mov	[eax+4], edi
pop	edi
mov	[eax], esi
pop	esi
add	esp, 8
retn	8
sub_6188A0 endp

align 10h



sub_6188D0 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
push	eax
lea	eax, [ecx+0Ch]
lea	ecx, [esp+10h+var_8]
call	sub_ACE150
lea	esi, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_8]
call	sub_ACE0C0
mov	ecx, eax
call	sub_4D4F40
movzx	eax, al
pop	esi
add	esp, 8
retn	4
sub_6188D0 endp

align 10h



sub_618910 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+10h]
call	sub_AD4EF0
xor	ecx, ecx
cmp	[esp+arg_0], eax
setl	cl
mov	eax, ecx
retn	4
sub_618910 endp

align 10h



sub_618930 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	edi
mov	edi, [ecx+10h]
call	sub_AD50F0
mov	eax, [eax]
pop	edi
retn	4
sub_618930 endp

align 10h



sub_618950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
mov	eax, [esi]
mov	edx, [eax+20h]
push	ecx
mov	ecx, esi
call	edx
mov	ecx, eax
mov	eax, [esp+4+arg_0]
mov	[eax], esi
mov	[eax+4], ecx
pop	esi
retn	8
sub_618950 endp



; Attributes: bp-based frame

sub_618970 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
push	ebx
push	esi
push	edi
push	eax
mov	[esp+1Ch+var_C], ecx
lea	eax, [ecx+0Ch]
lea	ecx, [esp+1Ch+var_8]
call	sub_ACE150
lea	eax, [esp+18h+var_8]
call	sub_ACDF10
mov	ecx, eax
movzx	edi, byte ptr [ecx+0Ch]
lea	eax, [edi-1]
cmp	eax, 1Fh	; switch 32 cases
ja	loc_618AA5	; default
			; jumptable 006189B2 cases 18,20,22,23,27,28,30
movzx	edx, ds:byte_618B10[eax]
jmp	ds:off_618B00[edx*4] ; switch jump

loc_6189B9:		; jumptable 006189B2 case 26
lea	eax, [esp+18h+var_8]
call	sub_ACE080
mov	ebx, [eax]
mov	ecx, [eax+4]
mov	edx, [eax+8]
mov	[esp+18h+var_8], ecx
mov	[esp+18h+var_4], edx
test	ebx, ebx
jz	short loc_6189E9
mov	eax, ebx
call	sub_AD4EC0
mov	esi, eax
mov	edi, 19h
jmp	loc_618AB3

loc_6189E9:
xor	esi, esi
jmp	loc_618AB1

loc_6189F0:		; jumptable 006189B2 cases 21,25
lea	eax, [esp+18h+var_8]
call	sub_ACE080
mov	edx, [eax]
mov	eax, [eax+4]
mov	[esp+18h+var_4], eax
mov	eax, ecx
mov	[esp+18h+var_8], edx
call	sub_AD1500
movzx	edi, byte ptr [ecx+0Dh]
mov	ebx, eax
mov	eax, edi
call	sub_AD1520
movsx	esi, word ptr [eax+8]
test	edi, edi
jnz	short loc_618A62
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	2Ch
call	eax
mov	edx, [esp+18h+var_C]
push	edi
push	edi
mov	esi, eax
mov	ecx, 2Ch
push	edi
mov	[esi+4], cx
mov	eax, [edx+14h]
push	edi
push	eax
xor	edx, edx
xor	eax, eax
call	sub_618440
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_618A62:
cmp	esi, 0FFFFFFFFh
jnz	short loc_618AB3
mov	eax, ebx

loc_618A69:
call	sub_AD4EC0
mov	esi, eax
jmp	short loc_618AB3

loc_618A72:		; jumptable 006189B2 cases 0-17,19,24,29,31
lea	eax, [esp+18h+var_8]
call	sub_ACE080
mov	[esp+18h+var_8], eax
mov	eax, ecx
call	sub_AD14E0
mov	[esp+18h+var_4], eax
mov	eax, ecx
call	sub_AD1500
mov	ebx, eax
cmp	edi, 19h
jz	short loc_618A69
mov	eax, edi
call	sub_AD1520
movsx	esi, word ptr [eax+8]
jmp	short loc_618AB3

loc_618AA5:		; default
xor	esi, esi	; jumptable 006189B2 cases 18,20,22,23,27,28,30
mov	[esp+18h+var_8], esi
mov	[esp+18h+var_4], esi
xor	ebx, ebx

loc_618AB1:
xor	edi, edi

loc_618AB3:
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	2Ch
call	eax
mov	ecx, eax
mov	eax, [esp+18h+var_4]
push	edi
push	esi
mov	edx, 2Ch
mov	[ecx+4], dx
mov	edx, [esp+20h+var_8]
push	eax
mov	eax, [esp+24h+var_C]
push	edx
mov	edx, [eax+14h]
push	edx
mov	edx, ebx
mov	esi, ecx
xor	eax, eax
call	sub_618440
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_618970 endp

align 10h
off_618B00 dd offset loc_618A72	; jump table for switch	statement
dd offset loc_6189F0
dd offset loc_6189B9
dd offset loc_618AA5
byte_618B10 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	0,     0,     0,     0
db	0,     0,     0,     0
db	0,     0,     0,     0
db	0,     0,     3,     0
db	3,     1,     3,     3
db	0,     1,     2,     3
db	3,     0,     3,     0



sub_618B30 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	eax
lea	eax, [ecx+0Ch]
lea	ecx, [esp+0Ch+var_8]
call	sub_ACE150
lea	eax, [esp+8+var_8]
call	sub_ACDF10
movzx	eax, byte ptr [eax+0Ch]
cmp	eax, 1Dh
jz	short loc_618B77
cmp	eax, 21h
jz	short loc_618B62
xor	eax, eax
add	esp, 8
retn	4

loc_618B62:
xor	edx, edx
lea	eax, [esp+8+var_8]
call	sub_ACE050
mov	eax, [eax]
and	eax, 0FFFFFFFEh
add	esp, 8
retn	4

loc_618B77:
xor	edx, edx
lea	eax, [esp+8+var_8]
call	sub_ACE060
mov	eax, [eax]
add	esp, 8
retn	4
sub_618B30 endp

align 10h


; Attributes: bp-based frame

sub_618B90 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_0]
sub	esp, 8
push	eax
lea	eax, [ecx+0Ch]
lea	ecx, [esp+0Ch+var_8]
call	sub_ACE150
lea	eax, [esp+8+var_8]
call	sub_ACDF10
movzx	ecx, byte ptr [eax+0Ch]
dec	ecx
cmp	ecx, 1Eh	; switch 31 cases
ja	short loc_618BD8 ; default
			; jumptable 00618BC7 cases 10-22,24-28
jmp	short loc_618BC0
align 10h

loc_618BC0:
movzx	ecx, ds:byte_618CBC[ecx]
jmp	ds:off_618C90[ecx*4] ; switch jump

loc_618BCE:		; jumptable 00618BC7 cases 23,30
movzx	ecx, byte ptr [eax+0Dh]
dec	ecx
cmp	ecx, 1Eh
jbe	short loc_618BC0

loc_618BD8:		; default
xor	eax, eax	; jumptable 00618BC7 cases 10-22,24-28
xor	edx, edx
mov	esp, ebp
pop	ebp
retn	4

loc_618BE2:		; jumptable 00618BC7 cases 0-2
lea	eax, [esp+8+var_8]
call	sub_ACDFA0
movsx	eax, byte ptr [eax]
cdq
mov	esp, ebp
pop	ebp
retn	4

loc_618BF4:		; jumptable 00618BC7 case 3
push	0
lea	eax, [esp+0Ch+var_8]
call	sub_ACDF90
movzx	eax, byte ptr [eax]
cdq
mov	esp, ebp
pop	ebp
retn	4

loc_618C09:		; jumptable 00618BC7 case 4
xor	edx, edx
lea	eax, [esp+8+var_8]
call	sub_ACDFC0
movsx	eax, word ptr [eax]
cdq
mov	esp, ebp
pop	ebp
retn	4

loc_618C1D:		; jumptable 00618BC7 case 5
xor	edx, edx
lea	eax, [esp+8+var_8]
call	sub_ACDFB0
movzx	eax, word ptr [eax]
cdq
mov	esp, ebp
pop	ebp
retn	4

loc_618C31:		; jumptable 00618BC7 case 6
lea	eax, [esp+8+var_8]
call	sub_ACE010
mov	eax, [eax]
cdq
mov	esp, ebp
pop	ebp
retn	4

loc_618C42:		; jumptable 00618BC7 case 7
xor	edx, edx
lea	eax, [esp+8+var_8]
call	sub_ACE000
mov	eax, [eax]
mov	esp, ebp
pop	ebp
retn	4

loc_618C54:		; jumptable 00618BC7 case 8
lea	eax, [esp+8+var_8]
call	sub_ACDFF0
mov	ecx, eax
mov	eax, [ecx]
mov	edx, [ecx+4]
mov	esp, ebp
pop	ebp
retn	4

loc_618C69:		; jumptable 00618BC7 case 9
lea	eax, [esp+8+var_8]
call	sub_ACDFE0
mov	ecx, eax
mov	eax, [ecx]
mov	edx, [ecx+4]
mov	esp, ebp
pop	ebp
retn	4

loc_618C7E:		; jumptable 00618BC7 case 29
lea	eax, [esp+8+var_8]
call	sub_ACDFD0
mov	eax, [eax]
xor	edx, edx
mov	esp, ebp
pop	ebp
retn	4
sub_618B90 endp

off_618C90 dd offset loc_618BE2	; jump table for switch	statement
dd offset loc_618BF4
dd offset loc_618C09
dd offset loc_618C1D
dd offset loc_618C31
dd offset loc_618C42
dd offset loc_618C54
dd offset loc_618C69
dd offset loc_618BCE
dd offset loc_618C7E
dd offset loc_618BD8
byte_618CBC db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	2,     3,     4,     5
db	6,     7,   0Ah,   0Ah
db    0Ah,   0Ah,   0Ah,   0Ah
db    0Ah,   0Ah,   0Ah,   0Ah
db    0Ah,   0Ah,   0Ah,     8
db    0Ah,   0Ah,   0Ah,   0Ah
db    0Ah,     9,     8
align 10h


; Attributes: bp-based frame

sub_618CE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_0]
sub	esp, 8
push	esi
push	edi
mov	edi, ecx
push	eax
lea	eax, [edi+0Ch]
lea	ecx, [esp+14h+var_8]
call	sub_ACE150
lea	eax, [esp+10h+var_8]
call	sub_ACDF10
mov	esi, eax
movzx	eax, byte ptr [esi+0Ch]
cmp	eax, 14h
jz	short loc_618D41
cmp	eax, 19h
jz	short loc_618D2B
cmp	eax, 1Ch
jnz	short loc_618D96
lea	eax, [esp+10h+var_8]
call	sub_ACDF20
mov	ecx, [eax]
mov	eax, [eax+4]
jmp	short loc_618D6E

loc_618D2B:
mov	eax, [edi+14h]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
push	ecx
push	edx
lea	eax, [esp+18h+var_8]
call	sub_ACE080
jmp	short loc_618D59

loc_618D41:
mov	eax, [edi+14h]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
push	ecx
push	edx
xor	edx, edx
lea	eax, [esp+18h+var_8]
call	sub_ACE070
mov	eax, [eax]

loc_618D59:
push	eax
mov	eax, esi
call	sub_AD1500
push	eax
call	sub_A567A0
mov	ecx, eax
mov	eax, edx
add	esp, 10h

loc_618D6E:
mov	[esp+10h+var_8], ecx
mov	[esp+10h+var_4], eax
test	ecx, ecx
jz	short loc_618D96
test	eax, eax
jz	short loc_618D96
mov	ecx, [edi+14h]
push	ecx
lea	edi, [esp+14h+var_8]
call	sub_A56690
add	esp, 4
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_618D96:
pop	edi
xor	eax, eax
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_618CE0 endp




sub_618DA0 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	eax
lea	eax, [ecx+0Ch]
lea	ecx, [esp+0Ch+var_8]
call	sub_ACE150
lea	eax, [esp+8+var_8]
call	sub_ACE080
add	esp, 8
retn	8
sub_618DA0 endp

align 10h



sub_618DD0 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	eax
lea	eax, [ecx+0Ch]
lea	ecx, [esp+0Ch+var_8]
call	sub_ACE150
lea	eax, [esp+8+var_8]
call	sub_ACDF10
movzx	eax, byte ptr [eax+0Ch]
cmp	eax, 0Bh
jz	short loc_618E27
cmp	eax, 20h
jz	short loc_618E0A
fldz
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
add	esp, 8
retn	4

loc_618E0A:
lea	eax, [esp+8+var_8]
call	sub_ACE020
mov	ecx, eax
call	sub_4D4FC0
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
add	esp, 8
retn	4

loc_618E27:
xor	edx, edx
lea	eax, [esp+8+var_8]
call	sub_ACE030
fld	dword ptr [eax]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
add	esp, 8
retn	4
sub_618DD0 endp

align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_77. PRESS	KEYPAD "+" TO EXPAND]
align 10h



sub_618E60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_A56550
test	[esp+4+arg_0], 1
jz	short loc_618E8B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_618E8B:
mov	eax, esi
pop	esi
retn	4
sub_618E60 endp

align 10h



sub_618EA0 proc	near

arg_0= dword ptr  4

push	ebx
push	edi
mov	edi, eax
xor	ebx, ebx
cmp	edi, ebx
jz	short loc_618EB1
mov	ecx, edi
call	sub_AD60E0

loc_618EB1:
mov	eax, [esp+8+arg_0]
mov	[esi], edi
mov	[esi+4], ebx
push	ebx
lea	ecx, [esi+0Ch]
mov	[esi+8], eax
call	sub_4DD190
lea	edi, [esi+18h]
push	edi
lea	ecx, [esp+0Ch+arg_0]
mov	[edi], ebx
mov	[edi+4], ebx
mov	dword ptr [edi+8], 0FFFFFFFFh
mov	byte ptr [esp+0Ch+arg_0], bl
call	sub_4A00D0
mov	ecx, edi
call	sub_61A560
pop	edi
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	dword ptr [esi+2Ch], 80000000h
mov	eax, esi
pop	ebx
retn	4
sub_618EA0 endp

align 10h



sub_618F00 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
lea	esi, [ebp+24h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_618F3E
mov	ecx, [esi]
mov	edi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_618F3E:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
lea	esi, [ebp+18h]
push	esi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], bl
call	sub_4A00D0
mov	edi, eax
call	sub_61A530
lea	ecx, [ebp+0Ch]
call	sub_4DCDB0
mov	ecx, [ebp+4]
cmp	ecx, ebx
jz	short loc_618F73
call	sub_AD6020

loc_618F73:
mov	[ebp+4], ebx
mov	ecx, [ebp+0]
cmp	ecx, ebx
jz	short loc_618F82
call	sub_AD6020

loc_618F82:
pop	edi
pop	esi
mov	[ebp+0], ebx
pop	ebp
pop	ebx
retn	4
sub_618F00 endp

align 10h



sub_618F90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jz	short loc_618FA4
xor	eax, eax
pop	ebp
retn	8

loc_618FA4:
push	ebx
push	esi
push	edi
mov	eax, ebp
call	sub_AD1500
mov	ebx, eax
lea	esi, [esp+10h+arg_4]
mov	eax, ecx
call	sub_A57180
call	sub_A57050
mov	edi, eax
test	edi, edi
jz	short loc_618FD8
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [edx+10h]
push	edi
call	eax
mov	esi, eax
jmp	short loc_618FDA

loc_618FD8:
xor	esi, esi

loc_618FDA:
test	ebx, ebx
jz	short loc_619014
test	esi, esi
jnz	short loc_618FEB
pop	edi
pop	esi
pop	ebx
xor	eax, eax
pop	ebp
retn	8

loc_618FEB:
mov	eax, ebx
call	sub_AD4F80
mov	ecx, edi
call	sub_AD31D0
test	eax, eax
jz	short loc_619055
push	ebx
mov	eax, esi
lea	edi, [esp+14h+arg_4]
call	sub_AD5150
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_61901D

loc_619014:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
pop	ebp
retn	8

loc_61901D:
mov	eax, ebp
call	sub_AD1530
test	eax, eax
jz	short loc_619055
mov	ecx, [eax]
mov	eax, [ecx]
mov	edx, [esp+10h+arg_0]
mov	ecx, [edx]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
call	eax
mov	ebx, eax
push	ebx
mov	eax, esi
lea	edi, [esp+14h+arg_0]
call	sub_AD5150
mov	ecx, eax
call	sub_4D4F40
test	al, al
mov	eax, esi
jnz	short loc_619057

loc_619055:
mov	eax, ebx

loc_619057:
pop	edi
pop	esi
pop	ebx
pop	ebp
retn	8
sub_618F90 endp

align 10h



sub_619060 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
xor	ebx, ebx
push	esi
push	edi
mov	edi, eax
mov	[esp+28h+var_18], ebx
cmp	[ebp+8], ebx
jz	short loc_619086
mov	[esp+28h+var_18], 1
cmp	[esp+28h+arg_8], ebx
jnz	short loc_61908A

loc_619086:
mov	[esp+28h+var_18], ebx

loc_61908A:
mov	ecx, edi
xor	edx, edx
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jz	short loc_6190AA
mov	eax, [esp+28h+arg_4]
mov	[eax], ebx
mov	[eax+4], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	0Ch

loc_6190AA:
lea	esi, [esp+28h+arg_8]
mov	eax, edi
call	sub_A57180
mov	ecx, eax
call	?isEmpty@DName@@QBEHXZ_0 ; DName::isEmpty(void)
test	eax, eax
jnz	short loc_6190D4
lea	esi, [esp+28h+var_14]
mov	eax, edi
call	sub_A57180
call	sub_A57050
test	eax, eax
jnz	short loc_6190E9

loc_6190D4:
mov	eax, [esp+28h+arg_4]
xor	ecx, ecx
mov	[eax], ebx
mov	[eax+4], ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	0Ch

loc_6190E9:
cmp	[esp+28h+var_18], ebx
jz	loc_619189
lea	esi, [esp+28h+var_10]
mov	ecx, edi
call	sub_A56F50
mov	esi, [ebp+28h]
add	ebp, 24h
xor	ecx, ecx
cmp	esi, ebx
jle	short loc_61912A
mov	edx, [ebp+0]
lea	ecx, [ecx+0]

loc_619110:
mov	ebx, [eax]
cmp	[edx], ebx
jnz	short loc_619122
mov	ebx, [edx+4]
cmp	ebx, [eax+4]
jz	loc_619276

loc_619122:
inc	ecx
add	edx, 8
cmp	ecx, esi
jl	short loc_619110

loc_61912A:
lea	esi, [esp+28h+var_10]
mov	ecx, edi
call	sub_A56F50
push	ebp
lea	ecx, [esp+2Ch+arg_8]
mov	esi, eax
mov	byte ptr [esp+2Ch+arg_8], 0
call	sub_4A00D0
mov	ecx, [ebp+8]
and	ecx, 3FFFFFFFh
cmp	[ebp+4], ecx
jnz	short loc_619160
push	8
push	ebp
push	eax
call	sub_121B830
add	esp, 0Ch

loc_619160:
mov	edx, [ebp+4]
mov	eax, [ebp+0]
lea	eax, [eax+edx*8]
push	eax		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_619182
mov	ecx, [esi]
mov	[eax], ecx
mov	edx, [esi+4]
mov	[eax+4], edx

loc_619182:
inc	dword ptr [ebp+4]
mov	ebp, [esp+28h+arg_0]

loc_619189:
mov	ebx, [ebp+0]
mov	ebp, [ebx]
lea	esi, [esp+28h+var_14]
mov	eax, edi
add	ebp, 10h
call	sub_A57180
call	sub_A57050
push	eax
mov	eax, [ebp+0]
mov	ecx, ebx
call	eax
lea	esi, [esp+28h+var_8]
mov	ecx, edi
mov	[esp+28h+var_C], eax
call	sub_A56F50
mov	ecx, [eax+4]
mov	ebx, [esp+28h+arg_0]
mov	edx, [eax]
push	ecx
add	ebx, 18h
push	edx
mov	ecx, ebx
call	sub_61A4D0
mov	ebp, eax
test	ebp, ebp
jnz	loc_61929C
lea	esi, [esp+28h+arg_8]
mov	eax, edi
call	sub_A57180
call	sub_A57040
mov	eax, [esp+28h+var_C]
call	sub_AD4EC0
mov	esi, eax
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	esi
call	eax
mov	ecx, [esp+28h+arg_0]
push	6
mov	ebp, eax
mov	eax, [ecx+4]
push	esi
push	ebp
call	sub_604F30
mov	eax, [esp+28h+var_C]
call	sub_AD4EC0
push	eax		; size_t
push	0		; int
push	ebp		; void *
call	j__memset
add	esp, 0Ch
lea	esi, [esp+28h+var_8]
mov	ecx, edi
call	sub_A56F50
mov	edx, [eax+4]
mov	eax, [eax]
push	ebp
push	edx
push	eax
push	ebx
lea	ecx, [esp+38h+arg_8]
mov	byte ptr [esp+38h+arg_8], 0
call	sub_4A00D0
push	eax
mov	eax, ebx
call	sub_61A420
mov	ebx, [esp+28h+arg_0]
push	edi
push	ebp
mov	ecx, ebx
call	sub_11E2360
cmp	eax, 1
jnz	short loc_619296
xor	ebp, ebp
mov	[esp+28h+var_C], ebp
jmp	loc_619306

loc_619276:
cmp	ecx, 0FFFFFFFFh
jz	loc_61912A
mov	eax, [esp+28h+arg_4]
xor	ecx, ecx
xor	edx, edx
mov	[eax], ecx
mov	[eax+4], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	0Ch

loc_619296:
test	ebp, ebp
jz	short loc_619306
jmp	short loc_6192A0

loc_61929C:
mov	ebx, [esp+28h+arg_0]

loc_6192A0:
cmp	[esp+28h+var_18], 0
jz	short loc_619310
mov	eax, [esp+28h+var_C]
lea	esi, [esp+28h+arg_0]
call	sub_AD5060
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_619306
mov	eax, [esp+28h+var_C]
push	offset unk_1896520
lea	edi, [esp+2Ch+arg_8]
call	sub_AD5150
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_619306
push	ebp
lea	esi, [ebx+0Ch]
push	esi
lea	ecx, [esp+30h+arg_0]
mov	byte ptr [esp+30h+arg_0], 0
call	sub_4A00D0
push	eax
call	sub_601C10
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_4DDCD0
mov	ecx, [esi]
inc	eax
mov	[ecx+edi*8+4], eax

loc_619306:
cmp	[esp+28h+var_18], 0
jz	short loc_619310
dec	dword ptr [ebx+28h]

loc_619310:
mov	eax, [esp+28h+arg_4]
mov	edx, [esp+28h+var_C]
pop	edi
pop	esi
mov	[eax], ebp
pop	ebp
mov	[eax+4], edx
pop	ebx
add	esp, 18h
retn	0Ch
sub_619060 endp

align 10h



sub_619330 proc	near

var_239= byte ptr -239h
var_238= dword ptr -238h
var_234= byte ptr -234h
var_22D= byte ptr -22Dh
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_218= dword ptr -218h
var_214= byte ptr -214h
var_210= byte ptr -210h
var_20C= byte ptr -20Ch
var_200= byte ptr -200h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 240h
push	ebx
mov	ebx, [esp+244h+arg_0]
push	ebp
mov	ebp, [esp+248h+arg_4]
push	esi
push	edi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	64h
call	eax
mov	ecx, 64h
mov	edi, eax
mov	[eax+4], cx
call	sub_A54100
mov	ecx, [ebx+4]
xor	edi, edi
mov	esi, eax
cmp	ecx, edi
jz	short loc_619383
cmp	ecx, esi
jz	short loc_619383
call	sub_AD6020

loc_619383:
push	1
lea	edx, [esp+254h+var_220]
push	edx
push	ebx
mov	eax, ebp
mov	[ebx+4], esi
call	sub_619060
lea	esi, [esp+250h+var_210]
mov	eax, ebp
call	sub_A57180
call	sub_A57030
mov	esi, eax
mov	[esp+250h+var_22C], esi
cmp	[esp+250h+var_220], edi
jnz	short loc_6193D5
mov	eax, [ebx+4]
mov	[eax+30h], edi
mov	ecx, [ebx+4]
cmp	ecx, edi
jz	short loc_6193C3
call	sub_AD6020

loc_6193C3:
mov	[ebx+4], edi
xor	eax, eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 240h
retn	0Ch

loc_6193D5:
mov	eax, [ebx+20h]
xor	ebp, ebp
cmp	eax, edi
jl	short loc_6193EE
mov	ecx, [ebx+18h]

loc_6193E1:
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short loc_6193EE
inc	ebp
add	ecx, 0Ch
cmp	ebp, eax
jle	short loc_6193E1

loc_6193EE:
cmp	ebp, eax
setle	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+254h+var_239]
call	sub_4D4F20
lea	ecx, [esp+250h+var_239]
call	sub_4D4F40
test	al, al
jz	loc_6194D7

loc_619411:
mov	eax, [ebx+18h]
lea	edi, [ebp+ebp*2+0]
add	edi, edi
add	edi, edi
mov	ecx, [edi+eax]
mov	[esp+250h+var_228], ecx
mov	edx, [edi+eax+4]
mov	eax, [esi]
mov	eax, [eax+28h]
lea	ecx, [esp+250h+var_228]
mov	[esp+250h+var_224], edx
push	ecx
lea	edx, [esp+254h+var_238]
push	edx
mov	ecx, esi
call	eax
lea	esi, [esp+250h+var_234]
lea	eax, [esp+250h+var_238]
call	sub_A57180
call	sub_A57050
mov	ecx, [ebx]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
call	eax
mov	ecx, [ebx+18h]
mov	edi, [edi+ecx+8]
push	0
push	edi
lea	ecx, [ebx+0Ch]
mov	esi, eax
call	sub_4DDD80
movzx	ecx, ax
test	cx, cx
jle	short loc_619485
mov	eax, esi
call	sub_AD4EC0
mov	[edi+4], ax
mov	[edi+6], cx

loc_619485:
lea	eax, [esp+250h+var_238]
call	sub_A572E0
mov	edx, [ebx+20h]
lea	eax, [ebp+1]
cmp	eax, edx
jg	short loc_6194AE
mov	esi, [ebx+18h]
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*4]

loc_6194A1:
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short loc_6194AE
inc	eax
add	ecx, 0Ch
cmp	eax, edx
jle	short loc_6194A1

loc_6194AE:
cmp	eax, edx
setle	dl
mov	ebp, eax
movzx	eax, dl
push	eax
lea	ecx, [esp+254h+var_239]
call	sub_4D4F20
lea	ecx, [esp+250h+var_239]
call	sub_4D4F40
mov	esi, [esp+250h+var_22C]
test	al, al
jnz	loc_619411

loc_6194D7:
mov	ecx, [ebx+20h]
xor	edi, edi
test	ecx, ecx
jl	short loc_6194F0
mov	eax, [ebx+18h]

loc_6194E3:
cmp	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6194F0
inc	edi
add	eax, 0Ch
cmp	edi, ecx
jle	short loc_6194E3

loc_6194F0:
cmp	edi, ecx
setle	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+254h+var_239]
mov	[esp+254h+var_238], edi
call	sub_4D4F20
lea	ecx, [esp+250h+var_239]
call	sub_4D4F40
test	al, al
jz	loc_619664
jmp	short loc_619528
align 10h

loc_619520:
mov	edi, [esp+250h+var_238]
mov	esi, [esp+250h+var_22C]

loc_619528:
mov	eax, [ebx+18h]
lea	edi, [edi+edi*2]
add	edi, edi
add	edi, edi
mov	ecx, [edi+eax]
mov	[esp+250h+var_218], ecx
mov	edx, [edi+eax+4]
mov	eax, [esi]
mov	eax, [eax+28h]
lea	ecx, [esp+250h+var_218]
mov	dword ptr [esp+250h+var_214], edx
push	ecx
lea	edx, [esp+254h+var_234]
push	edx
mov	ecx, esi
call	eax
lea	esi, [esp+250h+var_228]
lea	eax, [esp+250h+var_234]
call	sub_A57180
call	sub_A57050
mov	ecx, [ebx]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
call	eax
mov	ecx, [ebx+18h]
mov	edi, [edi+ecx+8]
mov	ecx, [esp+250h+arg_8]
mov	edx, [ecx]
mov	ebp, eax
call	sub_AD4F80
push	eax
mov	eax, [edx+10h]
push	edi
call	eax
mov	edi, eax
lea	esi, [esp+250h+var_22D]
mov	eax, ebp
call	sub_AD5060
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_619612
test	edi, edi
jnz	short loc_619612
push	200h
lea	ecx, [esp+254h+var_200]
push	ecx
lea	ecx, [esp+258h+var_20C]
call	sub_128DD50
push	offset a_PleaseMakeSur ; ". Please make	sure the class is registe"...
mov	eax, ebp
call	sub_AD4F80
push	eax
push	offset aCannotFinishVi ; "Cannot finish	virtual	object of class	"
lea	ecx, [esp+25Ch+var_20C]
call	sub_AD3930
mov	ecx, eax
call	sub_AD3930
mov	ecx, eax
call	sub_AD3930
mov	ecx, dword_196AFBC
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	133h
push	offset a_DataUtilHkdat ; ".\\Data\\Util\\hkDataObjectUtil.cpp"
lea	eax, [esp+258h+var_200]
push	eax
push	7C303834h
push	1
call	edx
lea	ecx, [esp+250h+var_20C]
call	sub_AD3A20

loc_619612:
lea	eax, [esp+250h+var_234]
call	sub_A572E0
mov	eax, [esp+250h+var_238]
mov	edx, [ebx+20h]
inc	eax
cmp	eax, edx
jg	short loc_61963D
mov	esi, [ebx+18h]
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*4]

loc_619630:
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short loc_61963D
inc	eax
add	ecx, 0Ch
cmp	eax, edx
jle	short loc_619630

loc_61963D:
cmp	eax, edx
setle	dl
mov	[esp+250h+var_238], eax
movzx	eax, dl
push	eax
lea	ecx, [esp+254h+var_239]
call	sub_4D4F20
lea	ecx, [esp+250h+var_239]
call	sub_4D4F40
test	al, al
jnz	loc_619520

loc_619664:
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	18h
call	eax
mov	esi, eax
mov	ecx, 18h
lea	eax, [esp+250h+var_220]
mov	[esi+4], cx
call	sub_A4F1B0
mov	esi, [ebx]
mov	edi, eax
call	sub_A4F0E0
mov	esi, [esp+250h+arg_8]
call	sub_A4F0C0
mov	eax, [ebx+4]
xor	esi, esi
mov	[eax+30h], esi
mov	[eax+38h], esi
mov	[eax+44h], esi
mov	ecx, [ebx+4]
cmp	ecx, esi
jz	short loc_6196BE
call	sub_AD6020

loc_6196BE:
mov	eax, edi
pop	edi
mov	[ebx+4], esi
pop	esi
pop	ebp
pop	ebx
add	esp, 240h
retn	0Ch
sub_619330 endp




sub_6196D0 proc	near

var_CC=	dword ptr -0CCh
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	byte ptr -90h
var_8C=	byte ptr -8Ch
var_88=	byte ptr -88h
var_84=	byte ptr -84h
var_80=	byte ptr -80h
var_7C=	byte ptr -7Ch
var_78=	byte ptr -78h
var_70=	byte ptr -70h
var_68=	byte ptr -68h
var_60=	byte ptr -60h
var_58=	byte ptr -58h
var_50=	byte ptr -50h
var_48=	byte ptr -48h
var_40=	byte ptr -40h
var_38=	byte ptr -38h
var_30=	byte ptr -30h
var_28=	byte ptr -28h
var_20=	byte ptr -20h
var_18=	byte ptr -18h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0B8h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+0C8h+arg_4]
xor	ebp, ebp
mov	eax, edi
mov	[esp+0C8h+var_98], ecx
mov	[esp+0C8h+var_A8], ebp
call	sub_A56D30
dec	eax
cmp	eax, 9		; switch 10 cases
ja	loc_619BE4	; default
jmp	ds:off_619BF4[eax*4] ; switch jump

loc_619703:		; jumptable 006196FC cases 0,1
mov	ebx, [esp+0C8h+arg_8]
xor	edi, edi
cmp	ebx, ebp
jle	loc_619BE4	; default
mov	ebp, [esp+0C8h+arg_0]
jmp	short loc_619720
align 10h

loc_619720:
mov	ecx, [esp+0C8h+arg_4]
push	edi
lea	eax, [esp+0CCh+var_8]
call	sub_A570D0
call	sub_A56CE0
mov	esi, eax
push	edi
lea	eax, [esp+0CCh+var_78]
mov	ecx, ebp
call	sub_A570E0
call	sub_A56CA0
inc	edi
cmp	edi, ebx
jl	short loc_619720
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B8h
retn	0Ch

loc_61975E:		; jumptable 006196FC case 2
mov	edi, [esp+0C8h+arg_8]
xor	esi, esi
cmp	edi, ebp
jle	loc_619BE4	; default
mov	ebx, [esp+0C8h+arg_0]
jmp	short loc_619780
align 10h

loc_619780:
mov	ecx, [esp+0C8h+arg_4]
push	esi
lea	eax, [esp+0CCh+var_20]
call	sub_A570D0
call	sub_A56CF0
push	ecx		; float
fstp	[esp+0CCh+var_CC]
push	esi
lea	eax, [esp+0D0h+var_60]
mov	ecx, ebx
call	sub_A570E0
call	sub_A56CC0
inc	esi
cmp	esi, edi
jl	short loc_619780
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B8h
retn	0Ch

loc_6197C0:		; jumptable 006196FC cases 3-6
mov	eax, edi
call	sub_A56D30
mov	ebx, [esp+0C8h+arg_8]
xor	edi, edi
cmp	ebx, ebp
jle	loc_619BE4	; default
mov	ebp, [esp+0C8h+arg_0]
nop

loc_6197E0:
mov	ecx, [esp+0C8h+arg_4]
push	edi
lea	eax, [esp+0CCh+var_30]
call	sub_A570D0
call	sub_A56D10
mov	esi, eax
push	edi
lea	eax, [esp+0CCh+var_50]
mov	ecx, ebp
call	sub_A570E0
call	sub_A56CB0
inc	edi
cmp	edi, ebx
jl	short loc_6197E0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B8h
retn	0Ch

loc_61981E:		; jumptable 006196FC case 7
mov	ebx, [esp+0C8h+arg_8]
mov	ebp, [esp+0C8h+arg_0]
push	ebx
mov	eax, ebp
call	sub_A56D60
xor	edi, edi
test	ebx, ebx
jle	loc_619BE4	; default
mov	edi, edi

loc_619840:
mov	ecx, [esp+0C8h+arg_4]
push	edi
lea	eax, [esp+0CCh+var_10]
call	sub_A570D0
lea	esi, [esp+0C8h+var_88]
call	sub_A57510
mov	ecx, [esp+0C8h+var_98]
push	eax
lea	eax, [esp+0CCh+var_7C]
push	eax
call	sub_61A2D0
push	eax
push	edi
lea	eax, [esp+0D0h+var_40]
mov	ecx, ebp
call	sub_A570E0
call	sub_A57090
lea	eax, [esp+0C8h+var_7C]
call	sub_A572E0
mov	eax, esi
call	sub_A572E0
inc	edi
cmp	edi, ebx
jl	short loc_619840
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B8h
retn	0Ch

loc_6198A3:		; jumptable 006196FC case 8
mov	ecx, [esp+0C8h+arg_8]
mov	eax, [esp+0C8h+arg_0]
push	ecx
call	sub_A56D60
lea	esi, [esp+0C8h+var_B0]
mov	eax, edi
call	sub_A570B0
mov	eax, esi
call	sub_A57000
lea	edx, [esp+0C8h+var_A4]
mov	edi, eax
push	edx
lea	ecx, [esp+0CCh+var_B4+3]
mov	esi, edi
mov	[esp+0CCh+var_A4], ebp
mov	[esp+0CCh+var_A0], ebp
mov	[esp+0CCh+var_9C], 80000000h
mov	byte ptr [esp+0CCh+var_B4+3], 0
call	sub_4D5020
cmp	edi, ebp
jz	loc_619A4B
mov	edx, [eax]
mov	edx, [edx+0Ch]
lea	ecx, [edi+edi*4]
add	ecx, ecx
add	ecx, ecx
mov	[esp+0C8h+var_AC], ecx
lea	ecx, [esp+0C8h+var_AC]
push	ecx
mov	ecx, eax
call	edx
mov	ecx, [esp+0C8h+var_AC]
mov	ebx, eax
mov	eax, 66666667h
imul	ecx
sar	edx, 3
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
mov	eax, esi
cmp	esi, ebp
jnz	short loc_619933

loc_61992E:
mov	eax, 80000000h

loc_619933:
cmp	esi, ebp
mov	[esp+0C8h+var_A4], ebx
mov	[esp+0C8h+var_A0], esi
mov	[esp+0C8h+var_9C], eax
jle	short loc_61996C

loc_619943:		; void *
push	ebx
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
cmp	eax, ebp
jz	short loc_619960
mov	[eax], ebp
mov	[eax+4], ebp
mov	[eax+8], ebp
mov	[eax+0Ch], ebp
mov	[eax+10h], ebp

loc_619960:
add	ebx, 14h
sub	esi, 1
jnz	short loc_619943
mov	esi, [esp+0C8h+var_A0]

loc_61996C:
mov	edx, [esp+0C8h+var_A4]
mov	eax, edi
sub	eax, esi
cmp	eax, ebp
lea	ecx, [esi+esi*4]
lea	esi, [edx+ecx*4]
jle	short loc_6199A5
mov	ebx, eax

loc_619980:		; void *
push	esi
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
cmp	eax, ebp
jz	short loc_61999D
mov	[eax], ebp
mov	[eax+4], ebp
mov	[eax+8], ebp
mov	[eax+0Ch], ebp
mov	[eax+10h], ebp

loc_61999D:
add	esi, 14h
sub	ebx, 1
jnz	short loc_619980

loc_6199A5:
lea	eax, [esp+0C8h+var_A4]
push	eax
lea	ecx, [esp+0CCh+var_B0]
push	ecx
mov	[esp+0D0h+var_A0], edi
call	sub_A57210
cmp	edi, ebp
jle	loc_619B49
xor	ebx, ebx
mov	[esp+0C8h+var_94], ebx
mov	dword ptr [esp+0C8h+var_8C], edi
lea	ebx, [ebx+0]

loc_6199D0:
mov	edx, [esp+0C8h+var_A4]
add	ebx, edx
test	byte ptr [ebx+8], 0Fh
jz	loc_619B33
mov	eax, [ebx]
push	eax
mov	eax, [esp+0CCh+arg_0]
lea	esi, [esp+0CCh+var_B0]
call	sub_A574D0
mov	ecx, [ebx]
mov	eax, [esp+0C8h+arg_4]
push	ecx
lea	esi, [esp+0CCh+var_AC]
call	sub_A574D0
test	byte ptr [ebx+8], 30h
jz	loc_619ACA
xor	edi, edi
cmp	[esp+0C8h+arg_8], ebp
jle	loc_619B21
nop

loc_619A20:
test	byte ptr [ebx+8], 10h
jz	short loc_619A52
or	[esp+0C8h+var_A8], 1
push	edi
lea	eax, [esp+0CCh+var_70]
lea	ecx, [esp+0CCh+var_B0]
call	sub_A570E0
lea	esi, [esp+0C8h+var_80]
call	sub_A574F0
call	sub_A56D40
mov	ebp, eax
jmp	short loc_619A55

loc_619A4B:
xor	ebx, ebx
jmp	loc_61992E

loc_619A52:
mov	ebp, [ebx+10h]

loc_619A55:
test	byte ptr [esp+0C8h+var_A8], 1
jz	short loc_619A6A
and	[esp+0C8h+var_A8], 0FFFFFFFEh
lea	eax, [esp+0C8h+var_80]
call	sub_A57280

loc_619A6A:
push	edi
lea	eax, [esp+0CCh+var_68]
lea	ecx, [esp+0CCh+var_B0]
call	sub_A570E0
lea	esi, [esp+0C8h+var_90]
call	sub_A574F0
push	ebp
push	edi
lea	eax, [esp+0D0h+var_58]
lea	ecx, [esp+0D0h+var_AC]
call	sub_A570E0
lea	esi, [esp+0CCh+var_84]
call	sub_A574F0
mov	ecx, [esp+0CCh+var_98]
push	eax
lea	edx, [esp+0D0h+var_90]
push	edx
call	sub_6196D0
mov	eax, esi
call	sub_A57280
lea	eax, [esp+0C8h+var_90]
call	sub_A57280
inc	edi
cmp	edi, [esp+0C8h+arg_8]
jl	loc_619A20
xor	ebp, ebp
jmp	short loc_619B21

loc_619ACA:
xor	esi, esi
cmp	[esp+0C8h+arg_8], ebp
jle	short loc_619B21
jmp	short loc_619AE0
align 10h

loc_619AE0:
push	esi
lea	eax, [esp+0CCh+var_48]
lea	ecx, [esp+0CCh+var_B0]
call	sub_A570E0
mov	edi, eax
push	esi
lea	eax, [esp+0CCh+var_38]
lea	ecx, [esp+0CCh+var_AC]
call	sub_A570E0
mov	ecx, [edi+4]
mov	edx, [edi]
push	ecx
mov	ecx, [esp+0CCh+var_98]
push	edx
push	ecx
mov	edi, eax
call	sub_61AEC0
inc	esi
cmp	esi, [esp+0C8h+arg_8]
jl	short loc_619AE0

loc_619B21:
lea	eax, [esp+0C8h+var_AC]
call	sub_A57280
lea	eax, [esp+0C8h+var_B0]
call	sub_A57280

loc_619B33:
mov	ebx, [esp+0C8h+var_94]
add	ebx, 14h
sub	dword ptr [esp+0C8h+var_8C], 1
mov	[esp+0C8h+var_94], ebx
jnz	loc_6199D0

loc_619B49:
lea	edx, [esp+0C8h+var_A4]
push	edx
lea	ecx, [esp+0CCh+var_B4+3]
mov	byte ptr [esp+0CCh+var_B4+3], 0
call	sub_4D5020
mov	edx, [esp+0C8h+var_9C]
mov	[esp+0C8h+var_A0], ebp
test	edx, edx
js	loc_619BE4	; default
mov	esi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*4]
mov	edx, [esp+0C8h+var_A4]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B8h
retn	0Ch

loc_619B95:		; jumptable 006196FC case 9
mov	ebx, [esp+0C8h+arg_8]
xor	edi, edi
cmp	ebx, ebp
jle	short loc_619BE4 ; default
mov	ebp, [esp+0C8h+arg_0]
lea	esp, [esp+0]

loc_619BB0:
mov	ecx, [esp+0C8h+arg_4]
push	edi
lea	eax, [esp+0CCh+var_28]
call	sub_A570D0
call	sub_A56D00
mov	esi, eax
push	edi
lea	eax, [esp+0CCh+var_18]
mov	ecx, ebp
call	sub_A570E0
call	sub_A56C90
inc	edi
cmp	edi, ebx
jl	short loc_619BB0

loc_619BE4:		; default
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B8h
retn	0Ch
sub_6196D0 endp

align 4
off_619BF4 dd offset loc_619703	; jump table for switch	statement
dd offset loc_619703
dd offset loc_61975E
dd offset loc_6197C0
dd offset loc_6197C0
dd offset loc_6197C0
dd offset loc_6197C0
dd offset loc_61981E
dd offset loc_6198A3
dd offset loc_619B95
align 10h



sub_619C20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [edi+8]
sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_4]
push	ebp
mov	ebp, [esp+1Ch+arg_8]
push	esi
lea	esi, [esp+20h+var_10]
test	al, 20h
jz	short loc_619CAD
mov	eax, [edi]
push	eax
mov	eax, ebp
call	sub_A56F10
lea	esi, [esp+20h+arg_4]
call	sub_A572C0
lea	esi, [esp+20h+var_10]
mov	eax, ebx
call	sub_A57180
call	sub_A57030
mov	edx, [eax]
push	edi
mov	ecx, eax
mov	eax, [edx+14h]
push	ebx
call	eax
mov	ecx, eax
lea	eax, [esp+20h+arg_8]
call	sub_A572A0
mov	ecx, [edi+10h]
push	ecx
call	sub_A56D60
mov	edx, [edi+10h]
push	edx
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_8]
push	ecx
mov	ecx, [esp+2Ch+arg_0]
call	sub_6196D0
lea	eax, [esp+20h+arg_8]
call	sub_A57280
lea	eax, [esp+20h+arg_4]
call	sub_A57280
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	0Ch

loc_619CAD:
test	al, 10h
jz	loc_619D39
mov	edx, [edi]
push	edx
mov	eax, ebp
call	sub_A56F10
lea	esi, [esp+20h+arg_8]
call	sub_A572C0
lea	esi, [esp+20h+var_10]
mov	eax, ebx
call	sub_A57180
call	sub_A57030
mov	edx, [eax]
push	edi
mov	ecx, eax
mov	eax, [edx+14h]
push	ebx
call	eax
mov	ecx, eax
lea	eax, [esp+20h+arg_4]
call	sub_A572A0
lea	eax, [esp+20h+arg_8]
call	sub_A56D40
push	eax
lea	eax, [esp+24h+arg_4]
call	sub_A56D60
lea	eax, [esp+20h+arg_8]
call	sub_A56D40
push	eax
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	ecx, [esp+28h+arg_0]
lea	edx, [esp+28h+arg_4]
push	edx
call	sub_6196D0
lea	eax, [esp+20h+arg_4]
call	sub_A57280
lea	eax, [esp+20h+arg_8]
call	sub_A57280
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	0Ch

loc_619D39:
mov	eax, [edi]
push	eax
mov	eax, ebx
call	sub_A56F30
mov	ecx, [edi]
push	ecx
lea	esi, [esp+24h+var_8]
mov	eax, ebp
call	sub_A56F10
mov	edx, [esp+20h+var_C]
mov	ecx, [esp+20h+arg_0]
push	eax
mov	eax, [esp+24h+var_10]
push	edx
push	eax
call	sub_61AFB0
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	0Ch
sub_619C20 endp

align 10h



sub_619D70 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 34h
push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+0]
mov	eax, [ecx]
mov	edx, [eax+24h]
push	edi
mov	edi, [esp+40h+arg_0]
xor	ebx, ebx
push	edi
mov	[esp+44h+var_30], ebx
call	edx
cmp	eax, ebx
jnz	loc_61A024
lea	eax, [esp+40h+var_20]
push	eax
lea	ecx, [esp+44h+var_31]
mov	[esp+44h+var_20], ebx
mov	[esp+44h+var_1C], ebx
mov	[esp+44h+var_18], 80000000h
mov	[esp+44h+var_31], bl
call	sub_4D5020
mov	ecx, [esp+40h+var_18]
and	ecx, 3FFFFFFFh
cmp	ecx, 0Ah
jge	short loc_619DE3
add	ecx, ecx
cmp	ecx, 0Ah
jg	short loc_619DD2
mov	ecx, 0Ah

loc_619DD2:
push	18h
push	ecx
lea	ecx, [esp+48h+var_20]
push	ecx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_619DE3:
push	esi
mov	esi, edi
cmp	edi, ebx
jz	loc_619EDE
mov	edi, edi

loc_619DF0:
mov	ecx, [ebp+0]
mov	edx, [ecx]
mov	eax, [edx+24h]
push	esi
call	eax
test	eax, eax
jnz	loc_619EDE
mov	ecx, [ebp+4]
mov	edx, [ecx]
mov	eax, [edx+24h]
push	esi
call	eax
mov	ecx, eax
lea	eax, [esp+44h+var_2C]
call	sub_A57080
lea	ecx, [esp+44h+var_20]
push	ecx
lea	ecx, [esp+48h+var_31]
mov	[esp+48h+var_31], bl
call	sub_4D5020
mov	edx, [esp+44h+var_18]
mov	ecx, [esp+44h+var_1C]
and	edx, 3FFFFFFFh
cmp	ecx, edx
jnz	short loc_619E51
push	18h
lea	ecx, [esp+48h+var_20]
push	ecx
push	eax
call	sub_121B830
mov	ecx, [esp+50h+var_1C]
add	esp, 0Ch

loc_619E51:
mov	eax, [esp+44h+var_20]
lea	edx, [ecx+ecx*2]
lea	eax, [eax+edx*8]
push	eax		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
cmp	eax, ebx
jz	short loc_619E77
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	dword ptr [eax+14h], 80000000h

loc_619E77:
mov	eax, [esp+44h+var_1C]
mov	edx, [esp+44h+var_20]
lea	ecx, [eax+eax*2]
inc	eax
lea	ecx, [edx+ecx*8]
mov	[esp+44h+var_1C], eax
push	ecx
lea	eax, [esp+48h+var_2C]
push	eax
call	sub_A57380
lea	esi, [esp+44h+var_28]
lea	eax, [esp+44h+var_2C]
call	sub_A57260
mov	ecx, eax
call	?isEmpty@DName@@QBEHXZ_0 ; DName::isEmpty(void)
test	eax, eax
jz	short loc_619EB1
xor	esi, esi
jmp	short loc_619ECA

loc_619EB1:
or	[esp+44h+var_30], 1
lea	esi, [esp+44h+var_24]
lea	eax, [esp+44h+var_2C]
call	sub_A57260
call	sub_A57050
mov	esi, eax

loc_619ECA:
test	byte ptr [esp+44h+var_30], 1
jz	short loc_619ED6
and	[esp+44h+var_30], 0FFFFFFFEh

loc_619ED6:
cmp	esi, ebx
jnz	loc_619DF0

loc_619EDE:
mov	esi, [esp+44h+var_1C]
dec	esi
cmp	esi, ebx
jl	short loc_619F0D
lea	edi, [esi+esi*2]
add	edi, edi
add	edi, edi
add	edi, edi

loc_619EF0:
mov	ecx, [ebp+0]
mov	eax, [esp+44h+var_20]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
add	eax, edi
push	eax
call	edx
dec	esi
sub	edi, 18h
cmp	esi, ebx
jge	short loc_619EF0
mov	edi, [esp+44h+arg_0]

loc_619F0D:
mov	ecx, [ebp+4]
mov	eax, [ecx]
mov	edx, [eax+24h]
push	edi
call	edx
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+24h]
mov	ecx, esi
xor	edi, edi
call	edx
test	eax, eax
jle	short loc_619F78
lea	esp, [esp+0]

loc_619F30:
mov	eax, [esi]
mov	edx, [eax+28h]
lea	ecx, [esp+40h+var_10]
push	ecx
push	edi
mov	ecx, esi
mov	[esp+48h+var_10], ebx
mov	[esp+48h+var_C], ebx
mov	[esp+48h+var_8], ebx
mov	[esp+48h+var_4], ebx
mov	[esp+48h], ebx
call	edx
mov	ecx, [esp+40h+var_4]
cmp	ecx, ebx
jz	short loc_619F6A
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
push	eax
mov	ecx, ebp
call	sub_619D70

loc_619F6A:
mov	eax, [esi]
mov	edx, [eax+24h]
mov	ecx, esi
inc	edi
call	edx
cmp	edi, eax
jl	short loc_619F30

loc_619F78:
mov	ecx, [ebp+0]
mov	eax, [ecx]
mov	edx, [esp+40h+arg_4]
mov	eax, [eax+24h]
push	edx
call	eax
lea	ecx, [esp+44h+var_20]
push	ecx
lea	ecx, [esp+48h+arg_0]
mov	[esp+48h+var_28], eax
mov	byte ptr [esp+48h+arg_0], bl
call	sub_4D5020
mov	ecx, eax
mov	eax, [esp+44h+var_1C]
cmp	eax, ebx
mov	[esp+44h+var_30], ecx
jle	short loc_619FF8
mov	esi, [esp+44h+var_20]
add	esi, 14h
mov	ebp, eax

loc_619FB4:
lea	edi, [esi-8]
push	edi
lea	ecx, [esp+48h+var_31]
mov	[esp+48h+var_31], bl
call	sub_4A00D0
mov	edx, [esi]
mov	[esi-4], ebx
test	edx, edx
js	short loc_619FE4
and	edx, 3FFFFFFFh
shl	edx, 4
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_619FE4:
mov	dword ptr [esi], 80000000h
add	esi, 18h
sub	ebp, 1
mov	[edi], ebx
jnz	short loc_619FB4
mov	ecx, [esp+44h+var_30]

loc_619FF8:
mov	eax, [esp+44h+var_18]
mov	[esp+44h+var_1C], ebx
pop	esi
test	eax, eax
js	short loc_61A020
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+44h+var_20]
push	eax
call	edx

loc_61A020:
mov	eax, [esp+40h+var_28]

loc_61A024:
pop	edi
pop	ebp
pop	ebx
add	esp, 34h
retn	4
sub_619D70 endp

align 10h



sub_61A030 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 14h
mov	eax, [esp+14h+arg_C]
push	ebx
push	ebp
push	esi
xor	ebx, ebx
push	edi
mov	[esp+24h+var_C], ebx
mov	[esp+24h+var_8], ebx
mov	[esp+24h+var_4], 80000000h
call	sub_A57000
mov	esi, eax
lea	eax, [esp+24h+var_C]
push	eax
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_11], bl
call	sub_4D5020
mov	ecx, [esp+24h+var_4]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_61A08D
add	ecx, ecx
cmp	esi, ecx
jl	short loc_61A07C
mov	ecx, esi

loc_61A07C:
push	14h
push	ecx
lea	ecx, [esp+2Ch+var_C]
push	ecx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61A08D:
mov	ecx, [esp+24h+var_8]
mov	eax, esi
sub	eax, ecx
cmp	eax, ebx
lea	edx, [ecx+ecx*4]
mov	ecx, [esp+24h+var_C]
lea	edi, [ecx+edx*4]
jle	short loc_61A0CA
mov	ebp, eax

loc_61A0A5:		; void *
push	edi
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
cmp	eax, ebx
jz	short loc_61A0C2
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx

loc_61A0C2:
add	edi, 14h
sub	ebp, 1
jnz	short loc_61A0A5

loc_61A0CA:
mov	eax, [esp+24h+arg_C]
lea	edx, [esp+24h+var_C]
push	edx
push	eax
mov	[esp+2Ch+var_8], esi
call	sub_A57210
mov	eax, [esp+24h+arg_8]
call	sub_A57000
mov	ebp, [esp+24h+arg_4]
push	ebp
lea	ecx, [esp+28h+var_11]
mov	esi, eax
mov	[esp+28h+var_11], bl
call	sub_4D5020
mov	ecx, [ebp+8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_61A11C
add	ecx, ecx
cmp	esi, ecx
jl	short loc_61A10F
mov	ecx, esi

loc_61A10F:
push	14h
push	ecx
push	ebp
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61A11C:
mov	ecx, [ebp+4]
mov	edx, [ebp+0]
mov	eax, esi
sub	eax, ecx
cmp	eax, ebx
lea	ecx, [ecx+ecx*4]
lea	edi, [edx+ecx*4]
jle	short loc_61A15B
mov	[esp+24h+var_10], eax

loc_61A134:		; void *
push	edi
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
cmp	eax, ebx
jz	short loc_61A151
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx

loc_61A151:
add	edi, 14h
sub	[esp+24h+var_10], 1
jnz	short loc_61A134

loc_61A15B:
mov	eax, [esp+24h+arg_8]
push	ebp
push	eax
mov	[ebp+4], esi
call	sub_A57210
mov	eax, [esp+24h+arg_C]
xor	ebp, ebp
call	sub_A57000
test	eax, eax
jle	short loc_61A1C0
xor	esi, esi
lea	ebx, [ebx+0]

loc_61A180:
mov	ecx, [esp+24h+var_C]
mov	ecx, [esi+ecx+0Ch]
cmp	ecx, ebx
jz	short loc_61A1AF
mov	edx, [esp+24h+arg_4]
mov	eax, [edx]
cmp	[esi+eax+0Ch], ebx
lea	edi, [esi+eax]
jnz	short loc_61A1AF
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+24h+arg_0]
push	eax
call	sub_619D70
mov	[edi+0Ch], eax

loc_61A1AF:
mov	eax, [esp+24h+arg_C]
inc	ebp
add	esi, 14h
call	sub_A57000
cmp	ebp, eax
jl	short loc_61A180

loc_61A1C0:
lea	ecx, [esp+24h+var_C]
push	ecx
lea	ecx, [esp+28h+arg_C]
mov	byte ptr [esp+28h+arg_C], bl
call	sub_4D5020
mov	edx, [esp+24h+var_4]
mov	[esp+24h+var_8], ebx
test	edx, edx
js	short loc_61A1FA
mov	ecx, [esp+24h+var_C]
mov	esi, [eax]
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*4]
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_61A1FA:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	10h
sub_61A030 endp

align 10h



sub_61A210 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
mov	ebx, [esp+14h+arg_8]
push	ebp
push	esi
push	edi
lea	esi, [esp+20h+arg_8]
call	sub_A57180
xor	ebp, ebp
lea	esi, [esp+20h+var_10]
mov	eax, ebx
mov	[esp+20h+var_C], ebp
mov	[esp+20h+var_8], ebp
mov	[esp+20h+var_4], 80000000h
call	sub_A57180
mov	edx, [esp+20h+arg_0]
push	eax
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
push	edx
call	sub_61A030
xor	esi, esi
cmp	[esp+20h+var_8], ebp
jle	short loc_61A285

loc_61A262:
mov	ecx, [esp+20h+arg_4]
mov	eax, [esp+20h+var_C]
mov	edx, [esp+20h+arg_0]
push	ebx
push	ecx
lea	edi, [eax+ebp]
push	edx
call	sub_619C20
inc	esi
add	ebp, 14h
cmp	esi, [esp+20h+var_8]
jl	short loc_61A262
xor	ebp, ebp

loc_61A285:
lea	eax, [esp+20h+var_C]
push	eax
lea	ecx, [esp+24h+arg_4]
mov	byte ptr [esp+24h+arg_4], 0
call	sub_4D5020
mov	edx, [esp+20h+var_4]
mov	[esp+20h+var_8], ebp
test	edx, edx
js	short loc_61A2C0
mov	esi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*4]
mov	edx, [esp+20h+var_C]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_61A2C0:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_61A210 endp

align 10h


; Attributes: bp-based frame

sub_61A2D0 proc	near

var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 2Ch
push	ebx
push	esi
mov	ebx, ecx
mov	ecx, [ebp+arg_4]
push	edi
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	loc_61A3E7
lea	esi, [esp+38h+var_20]
call	sub_A56F50
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
lea	eax, [esp+40h+var_18]
lea	edi, [ebx+8]
push	eax
call	sub_61AE20
test	eax, eax
jnz	short loc_61A32C
mov	ecx, [ebx]
mov	edx, [ecx]
mov	esi, [ebp+arg_0]
mov	edx, [edx+28h]
lea	eax, [esp+38h+var_18]
push	eax
push	esi
call	edx
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61A32C:
mov	edi, [ebp+arg_4]
lea	esi, [esp+38h+var_20]
mov	eax, edi
call	sub_A57180
call	sub_A57050
push	eax
mov	ecx, ebx
call	sub_619D70
mov	ecx, eax
lea	eax, [esp+38h+var_24]
call	sub_A57080
mov	ecx, [ebx]
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+38h+var_24]
push	edx
call	eax
mov	ecx, eax
lea	eax, [esp+38h+var_28]
call	sub_A57360
lea	esi, [esp+38h+var_10]
mov	ecx, eax
call	sub_A56F50
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[esp+38h+var_20], ecx
lea	esi, [esp+38h+var_8]
mov	ecx, edi
mov	[esp+38h+var_1C], edx
call	sub_A56F50
mov	ecx, [esp+38h+var_1C]
mov	edx, [esp+38h+var_20]
push	ecx
mov	ecx, [eax+4]
push	edx
mov	edx, [eax]
push	ecx
push	edx
lea	esi, [ebx+8]
push	esi
lea	ecx, [esp+4Ch+var_29]
mov	[esp+4Ch+var_29], 0
call	sub_4A00D0
push	eax
mov	eax, esi
call	sub_61AD70
push	edi
lea	eax, [esp+3Ch+var_28]
push	eax
push	ebx
call	sub_61A210
mov	esi, [ebp+arg_0]
lea	ecx, [esp+38h+var_28]
mov	eax, esi
call	sub_A57340
lea	eax, [esp+38h+var_28]
call	sub_A572E0
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61A3E7:
mov	eax, [ebp+arg_0]
xor	ecx, ecx
call	sub_A57360
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_61A2D0 endp

align 10h



sub_61A400 proc	near
mov	edx, [ecx+8]
xor	eax, eax
test	edx, edx
jl	short locret_61A41D
mov	ecx, [ecx]
jmp	short loc_61A410
align 10h

loc_61A410:
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short locret_61A41D
inc	eax
add	ecx, 0Ch
cmp	eax, edx
jle	short loc_61A410

locret_61A41D:
retn
sub_61A400 endp

align 10h



sub_61A420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
push	esi
mov	esi, eax
mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_61A449
lea	edx, [eax+eax+2]
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_61B0E0

loc_61A449:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [esi+8]
mov	edi, [esi]
mov	ecx, ebp
shr	ecx, 4
imul	ecx, 9E3779B1h
and	ecx, ebx
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
cmp	dword ptr [edi+edx], 0FFFFFFFFh
mov	eax, 1
mov	[esp+10h+arg_0], eax
jz	short loc_61A49A

loc_61A475:
cmp	[edi+edx], ebp
jnz	short loc_61A484
mov	edx, [edi+edx+4]
cmp	edx, [esp+10h+arg_8]
jz	short loc_61A4C0

loc_61A484:
inc	ecx
and	ecx, ebx
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
mov	eax, edi
cmp	dword ptr [edx+eax], 0FFFFFFFFh
jnz	short loc_61A475
mov	eax, [esp+10h+arg_0]

loc_61A49A:
add	[esi+4], eax
lea	ecx, [ecx+ecx*2]
add	ecx, ecx
add	ecx, ecx
mov	[edi+ecx], ebp
mov	edx, [esp+10h+arg_8]
mov	[edi+ecx+4], edx
mov	edx, [esi]
mov	esi, [esp+10h+arg_C]
pop	edi
mov	[ecx+edx+8], esi
pop	esi
pop	ebp
pop	ebx
retn	10h

loc_61A4C0:
xor	eax, eax
jmp	short loc_61A49A
sub_61A420 endp

align 10h



sub_61A4D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [ecx+8]
push	edi
test	esi, esi
jle	short loc_61A518
mov	edi, [esp+0Ch+arg_0]
mov	edx, [ecx]
mov	eax, edi
shr	eax, 4
imul	eax, 9E3779B1h
and	eax, esi
lea	ecx, [eax+eax*2]
cmp	dword ptr [edx+ecx*4], 0FFFFFFFFh
lea	ecx, [edx+ecx*4]
jz	short loc_61A518
mov	ebx, [esp+0Ch+arg_4]
lea	ecx, [ecx+0]

loc_61A500:
cmp	[ecx], edi
jnz	short loc_61A509
cmp	[ecx+4], ebx
jz	short loc_61A520

loc_61A509:
inc	eax
and	eax, esi
lea	ecx, [eax+eax*2]
cmp	dword ptr [edx+ecx*4], 0FFFFFFFFh
lea	ecx, [edx+ecx*4]
jnz	short loc_61A500

loc_61A518:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	8

loc_61A520:
pop	edi
lea	eax, [eax+eax*2]
mov	eax, [edx+eax*4+8]
pop	esi
pop	ebx
retn	8
sub_61A4D0 endp

align 10h



sub_61A530 proc	near
mov	edx, esi
call	sub_61B0B0
test	dword ptr [esi+4], 80000000h
jnz	short locret_61A558
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+8]
inc	eax
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
push	eax
push	ecx
mov	ecx, edi
call	edx

locret_61A558:
retn
sub_61A530 endp

align 10h



sub_61A560 proc	near
push	8
push	eax
call	sub_61B0E0
retn
sub_61A560 endp

align 10h


; Attributes: bp-based frame

sub_61A570 proc	near

var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 14h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
dec	eax
push	edi
mov	edi, [ebp+arg_8]
cmp	eax, 20h	; switch 33 cases
ja	loc_61A687	; default
			; jumptable 0061A58C cases 18,20-23,25,26,30
jmp	ds:off_61A898[eax*4] ; switch jump

loc_61A593:		; jumptable 0061A58C case 0
mov	eax, edi
call	sub_A56CE0
test	eax, eax
setnz	al
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	sub_4D4F20
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A5B5:		; jumptable 0061A58C cases 1-3
mov	eax, edi
call	sub_A56CE0
mov	[ebx], al
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A5C9:		; jumptable 0061A58C cases 4,5
mov	eax, edi
call	sub_A56CE0
mov	[ebx], ax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A5DE:		; jumptable 0061A58C cases 6,7,29
mov	eax, edi
call	sub_A56CE0
mov	[ebx], eax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A5F2:		; jumptable 0061A58C cases 8,9
mov	eax, edi
call	sub_A56CE0
cdq
mov	[ebx], eax
mov	[ebx+4], edx
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A60A:		; jumptable 0061A58C case 10
mov	eax, edi
call	sub_A56CF0
fstp	dword ptr [ebx]
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A61E:		; jumptable 0061A58C case 31
mov	eax, edi
call	sub_A56CF0
fstp	[esp+20h+var_10]
lea	edx, [esp+20h+var_10]
push	edx
mov	ecx, ebx
call	sub_4D4F90
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A640:		; jumptable 0061A58C case 19
test	ecx, ecx
jz	loc_61A88A
lea	esi, [esp+20h+var_14]
mov	eax, edi
call	sub_A57510
mov	ecx, esi
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	loc_61A881
mov	eax, [ebp+arg_C]
mov	edx, [ebp+arg_0]
push	eax
lea	ecx, [esp+24h+var_8]
push	ecx
push	edx
mov	eax, esi
call	sub_619060
mov	eax, [esp+20h+var_8]
test	eax, eax
jnz	short loc_61A695

loc_61A67E:
lea	eax, [esp+20h+var_14]
call	sub_A572E0

loc_61A687:		; default
mov	eax, 1		; jumptable 0061A58C cases 18,20-23,25,26,30
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A695:
mov	[ebx], eax
lea	eax, [esp+20h+var_14]
call	sub_A572E0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A6AB:		; jumptable 0061A58C case 24
test	ecx, ecx
jz	loc_61A88A
lea	esi, [esp+20h+var_C]
mov	eax, edi
call	sub_A57510
mov	ecx, [ebp+arg_0]
push	eax
push	ebx
call	sub_11E2360
cmp	eax, 1
mov	eax, esi
setz	bl
call	sub_A572E0
test	bl, bl
jz	loc_61A88A
mov	eax, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A6EB:		; jumptable 0061A58C case 11
mov	eax, edi
call	sub_A56D10
movaps	xmm0, xmmword ptr [eax]
movaps	xmmword	ptr [ebx], xmm0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A703:		; jumptable 0061A58C case 12
mov	eax, edi
call	sub_A56D10
push	eax
mov	ecx, ebx
call	sub_4D67E0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A71D:		; jumptable 0061A58C case 13
mov	eax, edi
call	sub_A56D10
push	eax
mov	ecx, ebx
call	sub_4D5430
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A737:		; jumptable 0061A58C case 14
mov	eax, edi
call	sub_A56D10
push	eax
mov	ecx, ebx
call	sub_4D65F0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A751:		; jumptable 0061A58C case 15
mov	eax, edi
call	sub_A56D10
mov	edi, eax
mov	esi, ebx
call	sub_5FC8C0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A76C:		; jumptable 0061A58C case 16
mov	eax, edi
call	sub_A56D10
push	eax
mov	ecx, ebx
call	sub_601910
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A786:		; jumptable 0061A58C case 17
mov	eax, edi
call	sub_A56D10
push	eax
mov	ecx, ebx
call	sub_4D86E0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A7A0:		; jumptable 0061A58C case 28
mov	esi, [ebp+arg_0]
cmp	dword ptr [esi+8], 0
jnz	loc_61A687	; default
			; jumptable 0061A58C cases 18,20-23,25,26,30
mov	eax, edi
call	sub_A56D00
test	eax, eax
jz	short loc_61A7DE
mov	eax, edi
call	sub_A56D00
mov	edi, eax
call	sub_AD3300
mov	edi, eax
mov	eax, [esi+4]
push	edi
call	sub_604EE0
mov	[ebx], edi
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A7DE:
xor	edi, edi
mov	[ebx], edi
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A7ED:		; jumptable 0061A58C case 32
mov	eax, edi
call	sub_A56D00
test	eax, eax
jz	short loc_61A818
mov	eax, edi
call	sub_A56D00
mov	edi, eax
call	sub_AD3300
mov	esi, eax
mov	eax, [ebp+arg_0]
mov	eax, [eax+4]
push	esi
call	sub_604EE0
mov	eax, esi
jmp	short loc_61A81A

loc_61A818:
xor	eax, eax

loc_61A81A:
mov	ecx, [ebp+arg_0]
mov	[ebx], eax
cmp	dword ptr [ecx+8], 0
jz	short loc_61A88A
or	eax, 1
mov	[ebx], eax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_61A835:		; jumptable 0061A58C case 27
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+8], 0
jnz	loc_61A687	; default
			; jumptable 0061A58C cases 18,20-23,25,26,30
lea	esi, [esp+20h+var_14]
mov	eax, edi
call	sub_A57510
mov	ecx, esi
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	short loc_61A881
mov	eax, [ebp+arg_C]
mov	edx, [ebp+arg_0]
push	eax
lea	ecx, [esp+24h+var_8]
push	ecx
push	edx
mov	eax, esi
call	sub_619060
mov	eax, [esp+20h+var_8]
test	eax, eax
jz	loc_61A67E
mov	[ebx], eax
mov	eax, [esp+20h+var_4]
mov	[ebx+4], eax

loc_61A881:
lea	eax, [esp+20h+var_14]
call	sub_A572E0

loc_61A88A:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_61A570 endp

align 4
off_61A898 dd offset loc_61A593	; jump table for switch	statement
dd offset loc_61A5B5
dd offset loc_61A5B5
dd offset loc_61A5B5
dd offset loc_61A5C9
dd offset loc_61A5C9
dd offset loc_61A5DE
dd offset loc_61A5DE
dd offset loc_61A5F2
dd offset loc_61A5F2
dd offset loc_61A60A
dd offset loc_61A6EB
dd offset loc_61A703
dd offset loc_61A71D
dd offset loc_61A737
dd offset loc_61A751
dd offset loc_61A76C
dd offset loc_61A786
dd offset loc_61A687
dd offset loc_61A640
dd offset loc_61A687
dd offset loc_61A687
dd offset loc_61A687
dd offset loc_61A687
dd offset loc_61A6AB
dd offset loc_61A687
dd offset loc_61A687
dd offset loc_61A835
dd offset loc_61A7A0
dd offset loc_61A5DE
dd offset loc_61A687
dd offset loc_61A61E
dd offset loc_61A7ED
align 10h


; Attributes: bp-based frame

sub_61A920 proc	near

var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, [ebp+arg_4]
sub	esp, 14h
push	ebx
dec	eax
push	esi
push	edi
mov	ebx, ecx
cmp	eax, 20h	; switch 33 cases
ja	loc_61AA97	; default
			; jumptable 0061A93B cases 18,20-23,25,26,30
jmp	ds:off_61ACE4[eax*4] ; switch jump

loc_61A942:		; jumptable 0061A93B case 0
mov	eax, [ebp+arg_8]
call	sub_A56E80
test	eax, eax
setnz	al
movzx	ecx, al
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_4D4F20
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61A966:		; jumptable 0061A93B cases 1,3
mov	eax, [ebp+arg_8]
call	sub_A56E80
mov	edx, [ebp+arg_0]
mov	[edx], al
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61A97E:		; jumptable 0061A93B case 2
mov	eax, [ebp+arg_8]
call	sub_A56E80
mov	ecx, [ebp+arg_0]
mov	[ecx], al
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61A996:		; jumptable 0061A93B case 4
mov	eax, [ebp+arg_8]
call	sub_A56E80
mov	ecx, [ebp+arg_0]
mov	[ecx], ax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61A9AF:		; jumptable 0061A93B case 5
mov	eax, [ebp+arg_8]
call	sub_A56E80
mov	edx, [ebp+arg_0]
mov	[edx], ax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61A9C8:		; jumptable 0061A93B cases 6,29
mov	eax, [ebp+arg_8]
call	sub_A56E80
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61A9E0:		; jumptable 0061A93B case 7
mov	eax, [ebp+arg_8]
call	sub_A56E80
mov	edx, [ebp+arg_0]
mov	[edx], eax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61A9F8:		; jumptable 0061A93B cases 8,9
mov	eax, [ebp+arg_8]
call	sub_A56E80
mov	ecx, [ebp+arg_0]
cdq
mov	[ecx], eax
mov	[ecx+4], edx
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AA14:		; jumptable 0061A93B case 10
mov	eax, [ebp+arg_8]
call	sub_A56E50
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx]
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AA2C:		; jumptable 0061A93B case 31
mov	eax, [ebp+arg_8]
call	sub_A56E50
fstp	[esp+20h+var_10]
mov	ecx, [ebp+arg_0]
lea	eax, [esp+20h+var_10]
push	eax
call	sub_4D4F90
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AA50:		; jumptable 0061A93B case 19
cmp	[ebp+arg_C], 0
jz	loc_61ACD9
mov	eax, [ebp+arg_8]
lea	esi, [esp+20h+var_14]
call	sub_A57530
mov	ecx, esi
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	loc_61ACD0
mov	ecx, [ebp+arg_10]
push	ecx
lea	edx, [esp+24h+var_8]
push	edx
push	ebx
mov	eax, esi
call	sub_619060
mov	eax, [esp+20h+var_8]
test	eax, eax
jnz	short loc_61AAA5

loc_61AA8E:
lea	eax, [esp+20h+var_14]
call	sub_A572E0

loc_61AA97:		; default
mov	eax, 1		; jumptable 0061A93B cases 18,20-23,25,26,30
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AAA5:
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
lea	eax, [esp+20h+var_14]
call	sub_A572E0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AABE:		; jumptable 0061A93B case 24
cmp	[ebp+arg_C], 0
jz	loc_61ACD9
mov	eax, [ebp+arg_8]
lea	esi, [esp+20h+var_C]
call	sub_A57530
mov	edx, [ebp+arg_0]
push	eax
push	edx
mov	ecx, ebx
call	sub_11E2360
cmp	eax, 1
mov	eax, esi
setz	bl
call	sub_A572E0
test	bl, bl
jz	loc_61ACD9
mov	eax, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AB03:		; jumptable 0061A93B case 11
mov	eax, [ebp+arg_8]
mov	esi, 4
call	sub_A56E70
movaps	xmm0, xmmword ptr [eax]
mov	eax, [ebp+arg_0]
movaps	xmmword	ptr [eax], xmm0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AB24:		; jumptable 0061A93B case 12
mov	eax, [ebp+arg_8]
mov	esi, 4
call	sub_A56E70
mov	ecx, [ebp+arg_0]
push	eax
call	sub_4D67E0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AB45:		; jumptable 0061A93B case 13
mov	eax, [ebp+arg_8]
mov	esi, 0Ch
call	sub_A56E70
mov	ecx, [ebp+arg_0]
push	eax
call	sub_4D5430
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AB66:		; jumptable 0061A93B case 14
mov	eax, [ebp+arg_8]
mov	esi, 0Ch
call	sub_A56E70
mov	ecx, [ebp+arg_0]
push	eax
call	sub_4D65F0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AB87:		; jumptable 0061A93B case 15
mov	eax, [ebp+arg_8]
mov	esi, 0Ch
call	sub_A56E70
mov	esi, [ebp+arg_0]
mov	edi, eax
call	sub_5FC8C0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61ABA9:		; jumptable 0061A93B case 16
mov	eax, [ebp+arg_8]
mov	esi, 10h
call	sub_A56E70
mov	ecx, [ebp+arg_0]
push	eax
call	sub_601910
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61ABCA:		; jumptable 0061A93B case 17
mov	eax, [ebp+arg_8]
mov	esi, 10h
call	sub_A56E70
mov	ecx, [ebp+arg_0]
push	eax
call	sub_4D86E0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61ABEB:		; jumptable 0061A93B case 28
cmp	dword ptr [ebx+8], 0
jnz	loc_61AA97	; default
			; jumptable 0061A93B cases 18,20-23,25,26,30
mov	esi, [ebp+arg_8]
mov	eax, esi
call	sub_A56E60
test	eax, eax
jz	short loc_61AC2C
mov	eax, esi
call	sub_A56E60
mov	edi, eax
call	sub_AD3300
mov	esi, eax
mov	eax, [ebx+4]
push	esi
call	sub_604EE0
mov	ecx, [ebp+arg_0]
mov	[ecx], esi
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AC2C:
mov	ecx, [ebp+arg_0]
xor	esi, esi
mov	[ecx], esi
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AC3E:		; jumptable 0061A93B case 32
mov	esi, [ebp+arg_8]
mov	eax, esi
call	sub_A56E60
test	eax, eax
jz	short loc_61AC69
mov	eax, esi
call	sub_A56E60
mov	edi, eax
call	sub_AD3300
mov	esi, eax
mov	eax, [ebx+4]
push	esi
call	sub_604EE0
mov	eax, esi
jmp	short loc_61AC6B

loc_61AC69:
xor	eax, eax

loc_61AC6B:
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
cmp	dword ptr [ebx+8], 0
jz	short loc_61ACD9
or	eax, 1
mov	[ecx], eax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h

loc_61AC86:		; jumptable 0061A93B case 27
cmp	dword ptr [ebx+8], 0
jnz	loc_61AA97	; default
			; jumptable 0061A93B cases 18,20-23,25,26,30
mov	eax, [ebp+arg_8]
lea	esi, [esp+20h+var_14]
call	sub_A57530
mov	ecx, esi
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	short loc_61ACD0
mov	edx, [ebp+arg_10]
push	edx
lea	eax, [esp+24h+var_8]
push	eax
push	ebx
mov	eax, esi
call	sub_619060
mov	eax, [esp+20h+var_8]
test	eax, eax
jz	loc_61AA8E
mov	ecx, [ebp+arg_0]
mov	edx, [esp+20h+var_4]
mov	[ecx+4], edx
mov	[ecx], eax

loc_61ACD0:
lea	eax, [esp+20h+var_14]
call	sub_A572E0

loc_61ACD9:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_61A920 endp

off_61ACE4 dd offset loc_61A942	; jump table for switch	statement
dd offset loc_61A966
dd offset loc_61A97E
dd offset loc_61A966
dd offset loc_61A996
dd offset loc_61A9AF
dd offset loc_61A9C8
dd offset loc_61A9E0
dd offset loc_61A9F8
dd offset loc_61A9F8
dd offset loc_61AA14
dd offset loc_61AB03
dd offset loc_61AB24
dd offset loc_61AB45
dd offset loc_61AB66
dd offset loc_61AB87
dd offset loc_61ABA9
dd offset loc_61ABCA
dd offset loc_61AA97
dd offset loc_61AA50
dd offset loc_61AA97
dd offset loc_61AA97
dd offset loc_61AA97
dd offset loc_61AA97
dd offset loc_61AABE
dd offset loc_61AA97
dd offset loc_61AA97
dd offset loc_61AC86
dd offset loc_61ABEB
dd offset loc_61A9C8
dd offset loc_61AA97
dd offset loc_61AA2C
dd offset loc_61AC3E
align 10h



sub_61AD70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
push	ebp
push	esi
mov	esi, eax
mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_61AD99
lea	edx, [eax+eax+2]
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_61B240

loc_61AD99:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [esi+8]
mov	edi, [esi]
mov	ecx, ebp
shr	ecx, 4
imul	ecx, 9E3779B1h
and	ecx, ebx
mov	edx, ecx
shl	edx, 4
cmp	dword ptr [edi+edx], 0FFFFFFFFh
mov	eax, 1
mov	[esp+10h+arg_0], eax
jz	short loc_61ADE6

loc_61ADC3:
cmp	[edi+edx], ebp
jnz	short loc_61ADD2
mov	edx, [edi+edx+4]
cmp	edx, [esp+10h+arg_8]
jz	short loc_61AE10

loc_61ADD2:
inc	ecx
and	ecx, ebx
mov	edx, ecx
shl	edx, 4
mov	eax, edi
cmp	dword ptr [edx+eax], 0FFFFFFFFh
jnz	short loc_61ADC3
mov	eax, [esp+10h+arg_0]

loc_61ADE6:
add	[esi+4], eax
shl	ecx, 4
mov	[edi+ecx], ebp
mov	edx, [esp+10h+arg_8]
mov	[edi+ecx+4], edx
mov	esi, [esi]
mov	edx, [esp+10h+arg_C]
mov	[ecx+esi+8], edx
mov	edx, [esp+10h+arg_10]
pop	edi
mov	[ecx+esi+0Ch], edx
pop	esi
pop	ebp
pop	ebx
retn	14h

loc_61AE10:
xor	eax, eax
jmp	short loc_61ADE6
sub_61AD70 endp

align 10h



sub_61AE20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	eax
push	ecx
mov	ecx, edi
call	sub_61B1B0
mov	esi, eax
cmp	esi, [edi+8]
lea	ecx, [esp+8+arg_0]
setle	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+8+arg_0]
call	sub_4D4F40
test	al, al
jz	short loc_61AE72
mov	eax, [edi]
shl	esi, 4
mov	ecx, [esi+eax+8]
mov	[ebx], ecx
mov	edx, [esi+eax+0Ch]
mov	[ebx+4], edx
xor	eax, eax
pop	esi
pop	ebx
retn	0Ch

loc_61AE72:
pop	esi
mov	eax, 1
pop	ebx
retn	0Ch
sub_61AE20 endp

align 10h



sub_61AE80 proc	near
mov	edx, esi
call	sub_61B210
test	dword ptr [esi+4], 80000000h
jnz	short locret_61AEA4
mov	ecx, [esi+8]
mov	eax, [edi]
mov	edx, [esi]
mov	eax, [eax+8]
inc	ecx
shl	ecx, 4
push	ecx
push	edx
mov	ecx, edi
call	eax

locret_61AEA4:
retn
sub_61AE80 endp

align 10h



sub_61AEB0 proc	near
push	8
push	eax
call	sub_61B240
retn
sub_61AEB0 endp

align 10h



sub_61AEC0 proc	near

var_10=	dword ptr -10h
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 8
mov	eax, edi
call	sub_A56D20
dec	eax
cmp	eax, 9		; switch 10 cases
ja	loc_61AF7E	; default
push	esi
jmp	ds:off_61AF84[eax*4] ; switch jump

loc_61AEDC:		; jumptable 0061AED5 cases 0,1
mov	eax, edi
call	sub_A56CE0
mov	esi, eax
lea	eax, [esp+0Ch+arg_4]
call	sub_A56CA0
pop	esi
add	esp, 8
retn	0Ch

loc_61AEF5:		; jumptable 0061AED5 case 2
mov	eax, edi
call	sub_A56CF0
push	ecx		; float
lea	eax, [esp+10h+arg_4]
fstp	[esp+10h+var_10]
call	sub_A56CC0
pop	esi
add	esp, 8
retn	0Ch

loc_61AF10:		; jumptable 0061AED5 cases 3-6
mov	eax, edi
call	sub_A56D20
mov	eax, edi
call	sub_A56D10
mov	esi, eax
lea	eax, [esp+0Ch+arg_4]
call	sub_A56CB0
pop	esi
add	esp, 8
retn	0Ch

loc_61AF30:		; jumptable 0061AED5 cases 7,8
lea	esi, [esp+0Ch+var_4]
mov	eax, edi
call	sub_A57510
mov	ecx, [esp+0Ch+arg_0]
push	eax
lea	eax, [esp+10h+var_8]
push	eax
call	sub_61A2D0
push	eax
lea	eax, [esp+10h+arg_4]
call	sub_A57090
lea	eax, [esp+0Ch+var_8]
call	sub_A572E0
mov	eax, esi
call	sub_A572E0
pop	esi
add	esp, 8
retn	0Ch

loc_61AF6B:		; jumptable 0061AED5 case 9
mov	eax, edi
call	sub_A56D00
mov	esi, eax
lea	eax, [esp+0Ch+arg_4]
call	sub_A56C90
pop	esi

loc_61AF7E:		; default
add	esp, 8
retn	0Ch
sub_61AEC0 endp

off_61AF84 dd offset loc_61AEDC	; jump table for switch	statement
dd offset loc_61AEDC
dd offset loc_61AEF5
dd offset loc_61AF10
dd offset loc_61AF10
dd offset loc_61AF10
dd offset loc_61AF10
dd offset loc_61AF30
dd offset loc_61AF30
dd offset loc_61AF6B
align 10h



sub_61AFB0 proc	near

var_14=	dword ptr -14h
var_4= byte ptr	-4
arg_0= byte ptr	 4
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	edi
mov	edi, [esp+0Ch+arg_8]
push	edi
mov	ebx, ecx
call	sub_A57110
dec	eax
cmp	eax, 9		; switch 10 cases
ja	loc_61B075	; default
push	esi
jmp	ds:off_61B07C[eax*4] ; switch jump

loc_61AFD1:		; jumptable 0061AFCA cases 0,1
mov	eax, edi
call	sub_A56E80
lea	esi, [esp+10h+arg_0]
call	sub_A56E20
pop	esi
pop	edi
pop	ebx
pop	ecx
retn	0Ch

loc_61AFE8:		; jumptable 0061AFCA case 2
mov	eax, edi
call	sub_A56E50
push	ecx		; float
lea	eax, [esp+14h+arg_0]
fstp	[esp+14h+var_14]
call	sub_A56DE0
pop	esi
pop	edi
pop	ebx
pop	ecx
retn	0Ch

loc_61B003:		; jumptable 0061AFCA cases 3-6
push	edi
call	sub_A57110
lea	esi, ds:0FFFFFFF4h[eax*4]
push	esi
mov	eax, edi
call	sub_A56E70
push	eax
lea	eax, [esp+18h+arg_0]
call	sub_A56D80
pop	esi
pop	edi
pop	ebx
pop	ecx
retn	0Ch

loc_61B029:		; jumptable 0061AFCA cases 7,8
lea	esi, [esp+10h+var_4]
mov	eax, edi
call	sub_A57530
push	eax
lea	eax, [esp+14h+arg_8]
push	eax
mov	ecx, ebx
call	sub_61A2D0
push	eax
lea	eax, [esp+14h+arg_0]
call	sub_A570F0
lea	eax, [esp+10h+arg_8]
call	sub_A572E0
mov	eax, esi
call	sub_A572E0
pop	esi
pop	edi
pop	ebx
pop	ecx
retn	0Ch

loc_61B062:		; jumptable 0061AFCA case 9
mov	eax, edi
call	sub_A56E60
mov	esi, eax
lea	eax, [esp+10h+arg_0]
call	sub_A56D70
pop	esi

loc_61B075:		; default
pop	edi
pop	ebx
pop	ecx
retn	0Ch
sub_61AFB0 endp

align 4
off_61B07C dd offset loc_61AFD1	; jump table for switch	statement
dd offset loc_61AFD1
dd offset loc_61AFE8
dd offset loc_61B003
dd offset loc_61B003
dd offset loc_61B003
dd offset loc_61B003
dd offset loc_61B029
dd offset loc_61B029
dd offset loc_61B062
align 10h



sub_61B0B0 proc	near
mov	ecx, [edx+8]
inc	ecx
test	ecx, ecx
jle	short loc_61B0D2
xor	eax, eax
push	esi
jmp	short loc_61B0C0
align 10h

loc_61B0C0:
mov	esi, [edx]
mov	dword ptr [eax+esi], 0FFFFFFFFh
add	eax, 0Ch
sub	ecx, 1
jnz	short loc_61B0C0
pop	esi

loc_61B0D2:
and	dword ptr [edx+4], 80000000h
retn
sub_61B0B0 endp

align 10h


; Attributes: bp-based frame

sub_61B0E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
push	ebx
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebx, [esi+8]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_8], ecx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [edi+edi*2]
add	eax, eax
add	esp, 8
add	eax, eax
push	eax
inc	ebx
call	edx
mov	[esi], eax
test	edi, edi
jle	short loc_61B141
xor	eax, eax
mov	ecx, edi

loc_61B130:
mov	edx, [esi]
mov	dword ptr [eax+edx], 0FFFFFFFFh
add	eax, 0Ch
sub	ecx, 1
jnz	short loc_61B130

loc_61B141:
dec	edi
mov	dword ptr [esi+4], 0
mov	[esi+8], edi
test	ebx, ebx
jle	short loc_61B17D
mov	edi, [esp+18h+var_8]
mov	[esp+18h+var_C], ebx

loc_61B158:
cmp	dword ptr [edi], 0FFFFFFFFh
jz	short loc_61B173
mov	eax, [edi+8]
mov	ecx, [edi+4]
mov	edx, [edi]
push	eax
mov	eax, [ebp+arg_0]
push	ecx
push	edx
push	eax
mov	eax, esi
call	sub_61A420

loc_61B173:
add	edi, 0Ch
sub	[esp+18h+var_C], 1
jnz	short loc_61B158

loc_61B17D:
cmp	[esp+18h+var_4], 0
jnz	short loc_61B19B
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+8]
lea	eax, [ebx+ebx*2]
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+1Ch+var_8]
push	eax
call	edx

loc_61B19B:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_61B0E0 endp

align 10h



sub_61B1B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [ecx+8]
push	edi
test	esi, esi
jle	short loc_61B1F8
mov	edi, [esp+0Ch+arg_0]
mov	edx, [ecx]
mov	eax, edi
shr	eax, 4
imul	eax, 9E3779B1h
and	eax, esi
mov	ecx, eax
shl	ecx, 4
add	ecx, edx
cmp	dword ptr [ecx], 0FFFFFFFFh
jz	short loc_61B1F8
mov	ebx, [esp+0Ch+arg_4]
lea	ecx, [ecx+0]

loc_61B1E0:
cmp	[ecx], edi
jnz	short loc_61B1E9
cmp	[ecx+4], ebx
jz	short loc_61B1FB

loc_61B1E9:
inc	eax
and	eax, esi
mov	ecx, eax
shl	ecx, 4
add	ecx, edx
cmp	dword ptr [ecx], 0FFFFFFFFh
jnz	short loc_61B1E0

loc_61B1F8:
lea	eax, [esi+1]

loc_61B1FB:
pop	edi
pop	esi
pop	ebx
retn	8
sub_61B1B0 endp

align 10h



sub_61B210 proc	near
mov	ecx, [edx+8]
inc	ecx
test	ecx, ecx
jle	short loc_61B232
xor	eax, eax
push	esi
jmp	short loc_61B220
align 10h

loc_61B220:
mov	esi, [edx]
mov	dword ptr [eax+esi], 0FFFFFFFFh
add	eax, 10h
sub	ecx, 1
jnz	short loc_61B220
pop	esi

loc_61B232:
and	dword ptr [edx+4], 80000000h
retn
sub_61B210 endp

align 10h


; Attributes: bp-based frame

sub_61B240 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
push	ebx
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebx, [esi+8]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_8], ecx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
mov	eax, edi
add	esp, 8
shl	eax, 4
push	eax
inc	ebx
call	edx
mov	[esi], eax
test	edi, edi
jle	short loc_61B2A1
xor	eax, eax
mov	ecx, edi
mov	edi, edi

loc_61B290:
mov	edx, [esi]
mov	dword ptr [eax+edx], 0FFFFFFFFh
add	eax, 10h
sub	ecx, 1
jnz	short loc_61B290

loc_61B2A1:
dec	edi
mov	dword ptr [esi+4], 0
mov	[esi+8], edi
test	ebx, ebx
jle	short loc_61B2E1
mov	edi, [esp+18h+var_8]
mov	[esp+18h+var_C], ebx

loc_61B2B8:
cmp	dword ptr [edi], 0FFFFFFFFh
jz	short loc_61B2D7
mov	eax, [edi+0Ch]
mov	ecx, [edi+8]
mov	edx, [edi+4]
push	eax
mov	eax, [edi]
push	ecx
mov	ecx, [ebp+arg_0]
push	edx
push	eax
push	ecx
mov	eax, esi
call	sub_61AD70

loc_61B2D7:
add	edi, 10h
sub	[esp+18h+var_C], 1
jnz	short loc_61B2B8

loc_61B2E1:
cmp	[esp+18h+var_4], 0
jnz	short loc_61B2FB
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [esp+18h+var_8]
mov	edx, [edx+8]
shl	ebx, 4
push	ebx
push	eax
call	edx

loc_61B2FB:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_61B240 endp

align 10h



sub_61B310 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	ecx, edi
call	edx
test	al, 20h
jz	short loc_61B349
lea	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_4]
call	sub_A572C0
mov	eax, [eax]
mov	edx, [edi]
mov	edx, [edx+5Ch]
push	eax
push	ebx
mov	ecx, edi
call	edx
mov	eax, esi
call	sub_A57280
pop	esi
pop	ebx
retn	0Ch

loc_61B349:
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx
dec	eax
cmp	eax, 9		; switch 10 cases
ja	loc_61B3FD	; default
jmp	ds:off_61B404[eax*4] ; switch jump

loc_61B363:		; jumptable 0061B35C cases 0,1
mov	esi, [edi]
lea	eax, [esp+8+arg_4]
call	sub_A56E80
push	eax
mov	eax, [esi+44h]
push	ebx
mov	ecx, edi
call	eax
pop	esi
pop	ebx
retn	0Ch

loc_61B37C:		; jumptable 0061B35C case 2
mov	esi, [edi]
lea	eax, [esp+8+arg_4]
call	sub_A56E50
mov	edx, [esi+34h]
push	ecx
fstp	[esp+0Ch+var_C]
push	ebx
mov	ecx, edi
call	edx
pop	esi
pop	ebx
retn	0Ch

loc_61B398:		; jumptable 0061B35C cases 3-6
mov	eax, [edi]
mov	edx, [eax+4]
push	ebp
mov	ecx, edi
call	edx
mov	ebp, [edi]
lea	esi, ds:0FFFFFFF4h[eax*4]
lea	eax, [esp+0Ch+arg_4]
call	sub_A56E70
push	eax
mov	eax, [ebp+24h]
push	ebx
mov	ecx, edi
call	eax
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_61B3C3:		; jumptable 0061B35C cases 7,8
lea	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_4]
call	sub_A57530
mov	eax, [eax]
mov	edx, [edi]
mov	edx, [edx+54h]
push	eax
push	ebx
mov	ecx, edi
call	edx
mov	eax, esi
call	sub_A572E0
pop	esi
pop	ebx
retn	0Ch

loc_61B3E9:		; jumptable 0061B35C case 9
mov	esi, [edi]
lea	eax, [esp+8+arg_4]
call	sub_A56E60
push	eax
mov	eax, [esi+2Ch]
push	ebx
mov	ecx, edi
call	eax

loc_61B3FD:		; default
pop	esi
pop	ebx
retn	0Ch
sub_61B310 endp

align 4
off_61B404 dd offset loc_61B363	; jump table for switch	statement
dd offset loc_61B363
dd offset loc_61B37C
dd offset loc_61B398
dd offset loc_61B398
dd offset loc_61B398
dd offset loc_61B398
dd offset loc_61B3C3
dd offset loc_61B3C3
dd offset loc_61B3E9
align 10h



sub_61B430 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
test	bl, 30h
jz	short loc_61B450
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_61B48A ; default
			; jumptable 0061B458 case 5
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61B48A ; default
			; jumptable 0061B458 case 5
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
pop	ebx
retn

loc_61B450:		; switch 7 cases
lea	eax, [ebx-4]
cmp	eax, 6
ja	short loc_61B48A ; default
			; jumptable 0061B458 case 5
jmp	ds:off_61B4BC[eax*4] ; switch jump

loc_61B45F:		; jumptable 0061B458 cases 4,6,7
push	edi
mov	edi, [esi]
test	edi, edi
jz	short loc_61B489
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
add	ebx, 0FFFFFFFDh
shl	ebx, 4
push	ebx
mov	ecx, eax
mov	eax, [edx+8]
push	edi
call	eax
mov	dword ptr [esi], 0

loc_61B489:
pop	edi

loc_61B48A:		; default
pop	ebx		; jumptable 0061B458 case 5
retn

loc_61B48C:		; jumptable 0061B458 cases 8,9
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_61B48A ; default
			; jumptable 0061B458 case 5
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61B4A0
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61B4A0:
mov	dword ptr [esi], 0
pop	ebx
retn

loc_61B4A8:		; jumptable 0061B458 case 10
mov	ecx, [esi]
push	ecx
call	sub_AD3320
add	esp, 4
mov	dword ptr [esi], 0
pop	ebx
retn
sub_61B430 endp

align 4
off_61B4BC dd offset loc_61B45F	; jump table for switch	statement
dd offset loc_61B48A
dd offset loc_61B45F
dd offset loc_61B45F
dd offset loc_61B48C
dd offset loc_61B48C
dd offset loc_61B4A8
align 10h



sub_61B4E0 proc	near

arg_0= dword ptr  4

push	edi
xor	ecx, ecx
mov	[esi+6], cx
push	edx
xor	edi, edi
lea	ecx, [esi+10h]
mov	[esi+8], edi
mov	dword ptr [esi], offset	off_15F8504
mov	[esi+0Ch], eax
mov	edx, [eax+8]
push	ecx
push	edx
call	sub_61EA50
mov	eax, [esp+4+arg_0]
mov	[esi+14h], eax
mov	[esi+18h], edi
mov	[esi+1Ch], edi
mov	[esi+20h], edi
mov	eax, 80000000h
mov	[esi+24h], eax
mov	[esi+28h], edi
mov	[esi+2Ch], edi
mov	[esi+30h], eax
mov	[esi+34h], edi
mov	[esi+38h], edi
mov	[esi+3Ch], eax
mov	eax, esi
pop	edi
retn	4
sub_61B4E0 endp

align 10h



sub_61B540 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
push	ebp
mov	dword ptr [ebp+0], offset off_15F8504
call	sub_61BAF0
lea	esi, [ebp+34h]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi]
mov	edx, eax
mov	eax, [esi+4]
mov	[esp+14h+var_4], edx
test	eax, eax
jle	short loc_61B59D
lea	edi, [ecx+4]
mov	ebx, eax
lea	esp, [esp+0]

loc_61B580:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_61B58B
call	sub_AD6020

loc_61B58B:
mov	dword ptr [edi], 0
add	edi, 18h
sub	ebx, 1
jnz	short loc_61B580
mov	edx, [esp+14h+var_4]

loc_61B59D:
mov	eax, [esi+8]
mov	ebx, 80000000h
mov	dword ptr [esi+4], 0
test	ebx, eax
jnz	short loc_61B5CB
mov	ecx, [esi]
mov	edi, [edx]
and	eax, 3FFFFFFFh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
mov	ecx, edx
mov	edx, [edi+10h]
call	edx

loc_61B5CB:
mov	dword ptr [esi], 0
mov	[esi+8], ebx
lea	esi, [ebp+28h]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi]
mov	edx, eax
mov	eax, [esi+4]
xor	edi, edi
cmp	eax, edi
mov	[esp+14h+var_4], edx
jle	short loc_61B624
lea	edi, [ecx+4]
mov	ebx, eax
lea	esp, [esp+0]

loc_61B600:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_61B60B
call	sub_AD6020

loc_61B60B:
mov	dword ptr [edi], 0
add	edi, 18h
sub	ebx, 1
jnz	short loc_61B600
mov	edx, [esp+14h+var_4]
mov	ebx, 80000000h
xor	edi, edi

loc_61B624:
mov	eax, [esi+8]
mov	[esi+4], edi
test	ebx, eax
jnz	short loc_61B649
and	eax, 3FFFFFFFh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
mov	eax, [edx]
mov	ecx, edx
mov	edx, [eax+10h]
call	edx

loc_61B649:
mov	[esi], edi
mov	[esi+8], ebx
lea	esi, [ebp+1Ch]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], edi
test	ebx, edx
jnz	short loc_61B681
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_61B681:
mov	[esi], edi
mov	[esi+8], ebx
mov	ecx, [ebp+18h]
cmp	ecx, edi
jz	short loc_61B69B
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61B69B
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61B69B:
mov	[ebp+18h], edi
mov	ecx, [ebp+10h]
cmp	ecx, edi
jz	short loc_61B6AA
call	sub_AD6020

loc_61B6AA:
mov	[ebp+10h], edi
pop	edi
pop	esi
mov	dword ptr [ebp+0], offset off_15F8204
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_61B540 endp

align 10h



sub_61B6C0 proc	near
mov	eax, [ecx+10h]
mov	eax, [eax+8]
retn
sub_61B6C0 endp

align 10h



sub_61B6D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	[esp+14h+var_4], edi
test	ebp, ebp
jz	short loc_61B742

loc_61B6E3:
mov	eax, [ebp+0]
mov	edx, [eax+8]
mov	ecx, ebp
call	edx
mov	ebx, eax
mov	eax, [edi+0Ch]
mov	eax, [eax+8]
test	ebx, ebx
jz	short loc_61B728
lea	edi, [eax+4Ch]
push	ebx
xor	eax, eax
mov	[esp+18h+arg_4], edi
call	sub_603480
mov	esi, eax
test	esi, esi
jnz	short loc_61B722
mov	edi, ebx
call	sub_AD3300
mov	ecx, [esp+14h+arg_4]
mov	esi, eax
push	esi
push	esi
call	sub_6032F0

loc_61B722:
mov	edi, [esp+14h+var_4]
jmp	short loc_61B72A

loc_61B728:
xor	esi, esi

loc_61B72A:
mov	ecx, [edi+10h]
cmp	esi, [ecx+8]
jz	short loc_61B759
mov	edx, [ebp+0]
mov	eax, [edx+10h]
mov	ecx, ebp
call	eax
mov	ebp, eax
test	ebp, ebp
jnz	short loc_61B6E3

loc_61B742:
mov	esi, [esp+14h+arg_0]
push	0
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_61B759:
mov	esi, [esp+14h+arg_0]
push	1
mov	ecx, esi
call	sub_4D4F20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_61B6D0 endp




sub_61B770 proc	near
mov	eax, [ecx+2Ch]
retn
sub_61B770 endp

align 10h



sub_61B780 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	edx, [esi+0Ch]
push	eax
mov	eax, [edx+8]
lea	ecx, [esp+8+arg_0]
push	ecx
push	eax
call	sub_61EA00
mov	edx, [esi+2Ch]
xor	eax, eax
test	edx, edx
jle	short loc_61B7BC
mov	ecx, [esi+28h]
mov	esi, [esp+4+arg_0]
lea	esp, [esp+0]

loc_61B7B0:
cmp	[ecx], esi
jz	short loc_61B7BF
inc	eax
add	ecx, 18h
cmp	eax, edx
jl	short loc_61B7B0

loc_61B7BC:
or	eax, 0FFFFFFFFh

loc_61B7BF:
pop	esi
retn	4
sub_61B780 endp

align 10h



sub_61B7D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+28h]
mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
lea	eax, [eax+eax*2]
push	esi
lea	esi, [edx+eax*8]
mov	eax, [esi]
mov	[ebx], eax
mov	[ebx+4], ecx
mov	edx, [esi+4]
mov	eax, [edx+8]
mov	ecx, [ecx+0Ch]
push	edi
mov	edi, [ecx+8]
test	eax, eax
jz	short loc_61B805
push	eax
xor	eax, eax
call	sub_603480
jmp	short loc_61B807

loc_61B805:
xor	eax, eax

loc_61B807:
mov	[ebx+0Ch], eax
mov	edx, [esi+10h]
mov	[ebx+8], edx
mov	eax, [esi+14h]
pop	edi
pop	esi
mov	[ebx+10h], eax
pop	ebx
retn	8
sub_61B7D0 endp

align 10h



sub_61B820 proc	near
mov	edx, [ecx+18h]
mov	eax, [ecx+2Ch]
test	edx, edx
jz	short locret_61B83A
lea	ebx, [ebx+0]

loc_61B830:
add	eax, [edx+2Ch]
mov	edx, [edx+18h]
test	edx, edx
jnz	short loc_61B830

locret_61B83A:
retn
sub_61B820 endp

align 10h



sub_61B840 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	edx, [edi+0Ch]
push	eax
mov	eax, [edx+8]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
push	eax
call	sub_61EA00
mov	edx, [esp+8+arg_0]
mov	edi, edi

loc_61B860:
mov	ecx, [edi+2Ch]
xor	esi, esi
test	ecx, ecx
jle	short loc_61B87C
mov	eax, [edi+28h]
lea	esp, [esp+0]

loc_61B870:
cmp	[eax], edx
jz	short loc_61B88B
inc	esi
add	eax, 18h
cmp	esi, ecx
jl	short loc_61B870

loc_61B87C:
mov	edi, [edi+18h]
test	edi, edi
jnz	short loc_61B860
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	4

loc_61B88B:
mov	edx, [edi]
mov	eax, [edx+18h]
mov	ecx, edi
call	eax
mov	edx, [edi]
sub	esi, eax
mov	eax, [edx+24h]
mov	ecx, edi
call	eax
pop	edi
add	eax, esi
pop	esi
retn	4
sub_61B840 endp

align 10h



sub_61B8B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	edx, [eax+24h]
mov	esi, edi
call	edx
mov	ecx, [esp+8+arg_0]
sub	ecx, eax

loc_61B8C3:
add	ecx, [esi+2Ch]
jns	short loc_61B8D4
mov	esi, [esi+18h]
test	esi, esi
jnz	short loc_61B8C3
pop	edi
pop	esi
retn	8

loc_61B8D4:
lea	eax, [ecx+ecx*2]
mov	ecx, [esi+28h]
mov	edx, [ecx+eax*8]
lea	esi, [ecx+eax*8]
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	[ebx], edx
mov	[ebx+4], edi
mov	eax, [esi+10h]
mov	[ebx+8], eax
mov	ecx, [esi+4]
mov	eax, [ecx+8]
mov	edx, [edi+0Ch]
mov	edi, [edx+8]
test	eax, eax
jz	short loc_61B917
push	eax
xor	eax, eax
call	sub_603480
mov	[ebx+0Ch], eax
mov	eax, [esi+14h]
mov	[ebx+10h], eax
pop	ebx
pop	edi
pop	esi
retn	8

loc_61B917:
xor	eax, eax
mov	[ebx+0Ch], eax
mov	eax, [esi+14h]
mov	[ebx+10h], eax
pop	ebx
pop	edi
pop	esi
retn	8
sub_61B8B0 endp

align 10h



sub_61B930 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
push	ebx
push	ebp
push	esi
push	edi
mov	ecx, offset off_17F15C0
mov	esi, eax
call	sub_AD60E0
mov	ecx, [esi]
mov	ebx, [esp+28h+arg_4]
mov	[esp+28h+var_10], 0
test	ecx, ecx
jz	short loc_61B95A
call	sub_AD60E0

loc_61B95A:
mov	ecx, offset off_17F15C0
call	sub_AD6020
mov	ebp, [esi]
mov	esi, [esp+28h+arg_0]
add	esi, 28h
push	esi
lea	ecx, [esp+2Ch+arg_0]
mov	byte ptr [esp+2Ch+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_61B996
push	18h
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61B996:
mov	eax, [esi+4]
lea	edx, [eax+eax*2]
mov	eax, [esi]
lea	eax, [eax+edx*8]
push	eax		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
mov	edi, eax
add	esp, 8
test	edi, edi
jz	short loc_61B9D8
mov	[edi], ebx
test	ebp, ebp
jz	short loc_61B9BF
mov	ecx, ebp
call	sub_AD60E0

loc_61B9BF:
mov	ecx, [esp+28h+arg_8]
mov	edx, [esp+28h+arg_C]
mov	[edi+4], ebp
xor	eax, eax
mov	[edi+8], eax
mov	[edi+0Ch], eax
mov	[edi+10h], ecx
mov	[edi+14h], edx

loc_61B9D8:
inc	dword ptr [esi+4]
test	ebp, ebp
jz	short loc_61B9E6
mov	ecx, ebp
call	sub_AD6020

loc_61B9E6:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	10h
sub_61B930 endp




sub_61B9F0 proc	near

arg_0= dword ptr  4

mov	eax, [esi+2Ch]
sub	eax, 1
push	ebx
push	ebp
push	edi
js	short loc_61BA18
mov	edx, [esi+28h]
lea	ecx, [eax+eax*2]
lea	ecx, [edx+ecx*8]
mov	edx, [esp+0Ch+arg_0]

loc_61BA08:
cmp	[ecx], edx
jz	loc_61BA8E
dec	eax
sub	ecx, 18h
test	eax, eax
jge	short loc_61BA08

loc_61BA18:
or	ebp, 0FFFFFFFFh

loc_61BA1B:
mov	ebx, [esi+28h]
lea	edi, [ebp+ebp*2+0]
add	edi, edi
add	edi, edi
add	edi, edi
mov	ecx, [ebx+edi+4]
add	ebx, edi
test	ecx, ecx
jz	short loc_61BA37
call	sub_AD6020

loc_61BA37:
mov	dword ptr [ebx+4], 0
dec	dword ptr [esi+2Ch]
mov	eax, [esi+2Ch]
sub	eax, ebp
lea	ecx, [eax+eax*2]
mov	eax, [esi+28h]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
add	eax, edi
lea	edx, [eax+18h]
test	ecx, ecx
jle	short loc_61BA76
dec	ecx
shr	ecx, 3
sub	edx, eax
inc	ecx

loc_61BA62:
mov	edi, [edx+eax]
mov	[eax], edi
mov	edi, [edx+eax+4]
mov	[eax+4], edi
add	eax, 8
sub	ecx, 1
jnz	short loc_61BA62

loc_61BA76:
mov	ecx, [esp+0Ch+arg_0]
push	ecx
mov	eax, esi
call	sub_61BAA0
neg	eax
pop	edi
sbb	eax, eax
pop	ebp
neg	eax
pop	ebx
retn	4

loc_61BA8E:
mov	ebp, eax
jmp	short loc_61BA1B
sub_61B9F0 endp

align 10h



sub_61BAA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
push	edi
test	esi, esi
jz	short loc_61BAD3
mov	edi, [esp+8+arg_0]
lea	esp, [esp+0]

loc_61BAB0:
mov	edx, [esi+2Ch]
xor	eax, eax
test	edx, edx
jle	short loc_61BACC
mov	ecx, [esi+28h]
lea	esp, [esp+0]

loc_61BAC0:
cmp	[ecx], edi
jz	short loc_61BADA
inc	eax
add	ecx, 18h
cmp	eax, edx
jl	short loc_61BAC0

loc_61BACC:
mov	esi, [esi+18h]
test	esi, esi
jnz	short loc_61BAB0

loc_61BAD3:
pop	edi
xor	eax, eax
pop	esi
retn	4

loc_61BADA:
mov	ecx, [esi+28h]
lea	eax, [eax+eax*2]
pop	edi
lea	eax, [ecx+eax*8]
pop	esi
retn	4
sub_61BAA0 endp

align 10h



sub_61BAF0 proc	near

arg_0= dword ptr  4

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+2Ch]
mov	ecx, [ebp+28h]
push	esi
push	edi
test	eax, eax
jle	short loc_61BB20
lea	esi, [ecx+4]
mov	edi, eax

loc_61BB07:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_61BB12
call	sub_AD6020

loc_61BB12:
mov	dword ptr [esi], 0
add	esi, 18h
sub	edi, 1
jnz	short loc_61BB07

loc_61BB20:
push	ebx
xor	ebx, ebx
mov	dword ptr [ebp+2Ch], 0
cmp	[ebp+20h], ebx
jle	short loc_61BB9E
nop

loc_61BB30:
mov	eax, [ebp+1Ch]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_61BB98
lea	esi, [edi+4]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61BB73
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_61BB73:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	10h
mov	ecx, eax
mov	eax, [edx+8]
push	edi
call	eax

loc_61BB98:
inc	ebx
cmp	ebx, [ebp+20h]
jl	short loc_61BB30

loc_61BB9E:
mov	esi, offset off_17F15C0
mov	ecx, esi
mov	dword ptr [ebp+20h], 0
call	sub_AD60E0
mov	ecx, [ebp+10h]
pop	ebx
test	ecx, ecx
jz	short loc_61BBBE
call	sub_AD6020

loc_61BBBE:
pop	edi
mov	[ebp+10h], esi
pop	esi
pop	ebp
pop	ecx
retn	4
sub_61BAF0 endp

align 10h



sub_61BBD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_61B540
test	[esp+4+arg_0], 1
jz	short loc_61BBFB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61BBFB:
mov	eax, esi
pop	esi
retn	4
sub_61BBD0 endp

align 10h



sub_61BC10 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
push	edi
mov	edi, eax
mov	dword ptr [edi], offset	off_15F853C
call	sub_61BCA0
lea	esi, [edi+10h]
xor	ebx, ebx
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_61BC56
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	ebp
mov	ebp, [eax]
shl	edx, 4
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_61BC56:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_61BC74
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61BC74
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_61BC74:
mov	[edi+0Ch], ebx
mov	dword ptr [edi], offset	off_15F8204
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_61BC10 endp

align 10h



sub_61BC90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[eax], ecx
mov	dword ptr [eax+4], 0
retn	4
sub_61BC90 endp




sub_61BCA0 proc	near
push	ebp
xor	ebp, ebp
cmp	[edi+14h], ebp
jle	short loc_61BCE0
push	ebx
push	esi
xor	ebx, ebx
lea	esp, [esp+0]

loc_61BCB0:
mov	eax, [edi+10h]
mov	ecx, [ebx+eax]
lea	esi, [ebx+eax]
mov	eax, [edi+0Ch]
push	ecx
call	sub_61BAA0
test	eax, eax
jz	short loc_61BCD5
mov	edx, [eax+10h]
add	esi, 8
push	edx
call	sub_61B430
add	esp, 4

loc_61BCD5:
inc	ebp
add	ebx, 10h
cmp	ebp, [edi+14h]
jl	short loc_61BCB0
pop	esi
pop	ebx

loc_61BCE0:
mov	dword ptr [edi+14h], 0
pop	ebp
retn
sub_61BCA0 endp

align 10h



sub_61BCF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+14h]
xor	ebx, ebx
test	ecx, ecx
jle	short loc_61BD7C
mov	edx, [esp+8+arg_4]
push	esi
mov	esi, [ebp+10h]
mov	eax, esi
lea	esp, [esp+0]

loc_61BD10:
cmp	[eax], edx
jz	short loc_61BD22
inc	ebx
add	eax, 10h
cmp	ebx, ecx
jl	short loc_61BD10
pop	esi
pop	ebp
pop	ebx
retn	8

loc_61BD22:
push	edi
mov	edi, ebx
shl	edi, 4
mov	eax, [esi+edi]
push	eax
mov	eax, [ebp+0Ch]
call	sub_61BAA0
test	eax, eax
jz	short loc_61BD48
mov	ecx, [eax+10h]
lea	esi, [esi+edi+8]
push	ecx
call	sub_61B430
add	esp, 4

loc_61BD48:
dec	dword ptr [ebp+14h]
mov	eax, [ebp+14h]
cmp	eax, ebx
jz	short loc_61BD7A
mov	edx, [ebp+10h]
shl	eax, 4
add	eax, edx
mov	ecx, eax
lea	eax, [edx+edi]
sub	ecx, eax
mov	edx, 2

loc_61BD66:
mov	esi, [ecx+eax]
mov	[eax], esi
mov	esi, [ecx+eax+4]
mov	[eax+4], esi
add	eax, 8
sub	edx, 1
jnz	short loc_61BD66

loc_61BD7A:
pop	edi
pop	esi

loc_61BD7C:
pop	ebp
pop	ebx
retn	8
sub_61BCF0 endp

align 10h



sub_61BD90 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
xor	eax, eax
cmp	edx, [ecx+14h]
setl	al
retn	4
sub_61BD90 endp

align 10h



sub_61BDA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
inc	eax
retn	4
sub_61BDA0 endp

align 10h



sub_61BDB0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [ecx+10h]
shl	eax, 4
mov	eax, [eax+ecx]
retn	4
sub_61BDB0 endp




sub_61BDC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[eax], ecx
mov	ecx, [ecx+10h]
shl	edx, 4
mov	edx, [edx+ecx]
mov	[eax+4], edx
retn	8
sub_61BDC0 endp

align 10h



sub_61BDE0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebp
push	esi
mov	esi, [esp+10h+arg_8]
push	edi
mov	edi, [esp+14h+arg_0]
mov	eax, [edi+0Ch]
push	esi
call	sub_61BAA0
mov	ebp, eax
test	ebp, ebp
jz	loc_61BF92
mov	ecx, [edi+14h]
push	ebx
or	ebx, 0FFFFFFFFh
xor	eax, eax
mov	[esp+18h+var_4], ebx
test	ecx, ecx
jle	short loc_61BE2F
mov	edx, [edi+10h]

loc_61BE15:
cmp	[edx], esi
jnz	short loc_61BE1D
mov	[esp+18h+var_4], eax

loc_61BE1D:
inc	eax
add	edx, 10h
cmp	eax, ecx
jl	short loc_61BE15
cmp	[esp+18h+var_4], ebx
jnz	loc_61BF7B

loc_61BE2F:
mov	[esp+18h+var_4], ecx
add	edi, 10h
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	[edi+4], ecx
jnz	short loc_61BE5F
push	10h
push	edi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61BE5F:
mov	eax, [edi+4]
shl	eax, 4
add	eax, [edi]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_61BE7C
mov	dword ptr [eax], 0

loc_61BE7C:
mov	eax, [edi+4]
mov	edx, [esp+18h+arg_8]
mov	esi, eax
shl	esi, 4
add	esi, [edi]
inc	eax
mov	[edi+4], eax
mov	[esi], edx
mov	ebx, [ebp+10h]
test	bl, 10h
jz	short loc_61BEDC
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [ebp+4]
mov	eax, [edx+8]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+24h]
call	eax
push	0
push	eax
and	ebx, 0FFFFFFEFh
push	ebx
call	sub_A55970
mov	edx, [esp+24h+var_4]
add	esp, 0Ch
pop	ebx
mov	[esi+8], eax
inc	dword ptr [eax+8]
mov	eax, [esp+14h+arg_4]
pop	edi
pop	esi
mov	[eax], ebp
mov	[eax+4], edx
pop	ebp
add	esp, 8
retn	0Ch

loc_61BEDC:
test	bl, 20h
jz	short loc_61BF35
mov	ecx, [esp+18h+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [ebp+4]
mov	ecx, [edx+0Ch]
mov	eax, [eax+8]
mov	edx, [ecx]
push	eax
mov	eax, [edx+24h]
call	eax
push	0
push	eax
and	ebx, 0FFFFFFDFh
push	ebx
call	sub_A55970
mov	[esi+8], eax
mov	ecx, [ebp+14h]
mov	edx, [eax]
mov	edx, [edx+10h]
add	esp, 0Ch
push	ecx
mov	ecx, eax
call	edx
mov	esi, [esi+8]
mov	eax, [esp+18h+arg_4]
inc	dword ptr [esi+8]
mov	edx, [esp+18h+var_4]
pop	ebx
pop	edi
pop	esi
mov	[eax], ebp
mov	[eax+4], edx
pop	ebp
add	esp, 8
retn	0Ch

loc_61BF35:
cmp	ebx, 8
setz	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+1Ch+arg_0]
call	sub_4D4F20
lea	ecx, [esp+18h+arg_0]
call	sub_4D4F40
test	al, al
jz	short loc_61BF73
mov	eax, [esp+18h+arg_4]
mov	edx, [esp+18h+var_4]
pop	ebx
pop	edi
mov	dword ptr [esi+8], 0
pop	esi
mov	[eax], ebp
mov	[eax+4], edx
pop	ebp
add	esp, 8
retn	0Ch

loc_61BF73:
xor	eax, eax
mov	[esi+8], eax
mov	[esi+0Ch], eax

loc_61BF7B:
mov	eax, [esp+18h+arg_4]
mov	edx, [esp+18h+var_4]
pop	ebx
pop	edi
pop	esi
mov	[eax], ebp
mov	[eax+4], edx
pop	ebp
add	esp, 8
retn	0Ch

loc_61BF92:
mov	eax, [esp+14h+arg_4]
pop	edi
pop	esi
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0FFFFFFFFh
pop	ebp
add	esp, 8
retn	0Ch
sub_61BDE0 endp

align 10h



sub_61BFB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
mov	eax, [esp+0Ch+arg_4]
push	eax
mov	eax, [esi+0Ch]
call	sub_61BAA0
mov	ecx, eax
mov	[esp+0Ch+var_4], ecx
test	ecx, ecx
jz	loc_61C093
push	ebx
mov	ebx, [esi+14h]
push	edi
xor	edi, edi
test	ebx, ebx
jle	short loc_61BFF2
mov	eax, [esi+10h]

loc_61BFE2:
mov	edx, [esp+14h+arg_4]
cmp	[eax], edx
jz	short loc_61C067
inc	edi
add	eax, 10h
cmp	edi, ebx
jl	short loc_61BFE2

loc_61BFF2:
add	esi, 10h
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
and	edx, 3FFFFFFFh
cmp	[esi+4], edx
jnz	short loc_61C01E
push	10h
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61C01E:
mov	eax, [esi+4]
shl	eax, 4
add	eax, [esi]
push	eax		; void *
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
xor	edx, edx
add	esp, 8
cmp	eax, edx
jz	short loc_61C039
mov	[eax], edx

loc_61C039:
mov	ecx, [esi+4]
mov	eax, ecx
shl	eax, 4
add	eax, [esi]
inc	ecx
mov	[esi+4], ecx
mov	ecx, [esp+14h+arg_4]
pop	edi
mov	[ebp+4], ebx
mov	[eax+8], edx
mov	[eax+0Ch], edx
mov	edx, [esp+10h+var_4]
pop	ebx
mov	[eax], ecx
pop	esi
mov	[ebp+0], edx
mov	eax, ebp
pop	ebp
pop	ecx
retn	8

loc_61C067:
mov	edx, [esi+10h]
mov	eax, edi
shl	eax, 4
lea	esi, [eax+edx+8]
mov	eax, [ecx+10h]
push	eax
call	sub_61B430
mov	ecx, [esp+18h+var_4]
add	esp, 4
mov	[ebp+4], edi
pop	edi
pop	ebx
pop	esi
mov	[ebp+0], ecx
mov	eax, ebp
pop	ebp
pop	ecx
retn	8

loc_61C093:
pop	esi
mov	dword ptr [ebp+0], 0
mov	dword ptr [ebp+4], 0FFFFFFFFh
mov	eax, ebp
pop	ebp
pop	ecx
retn	8
sub_61BFB0 endp

align 10h



sub_61C0B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	edx, [esi+0Ch]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esi+14h]
xor	eax, eax
test	edx, edx
jle	short loc_61C0EC
mov	ecx, [esi+10h]
mov	esi, [esp+4+arg_0]
lea	esp, [esp+0]

loc_61C0E0:
cmp	[ecx], esi
jz	short loc_61C0F2
inc	eax
add	ecx, 10h
cmp	eax, edx
jl	short loc_61C0E0

loc_61C0EC:
xor	eax, eax
pop	esi
retn	4

loc_61C0F2:
mov	eax, 1
pop	esi
retn	4
sub_61C0B0 endp

align 10h



sub_61C100 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	edx, [esi+0Ch]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+8+arg_4]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_4]
mov	[eax], esi
mov	[eax+4], edx
pop	esi
retn	8
sub_61C100 endp

align 10h



sub_61C130 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
push	esi
call	sub_61BDE0
mov	edx, [esp+0Ch+var_8]
mov	eax, [edx+10h]
dec	eax
cmp	eax, 1
ja	short loc_61C16C
mov	ecx, [esp+0Ch+var_4]
mov	edx, [esi+10h]
shl	ecx, 4
mov	eax, [ecx+edx+8]
mov	edx, [ecx+edx+0Ch]
pop	esi
add	esp, 8
retn	4

loc_61C16C:
xor	eax, eax
xor	edx, edx
pop	esi
add	esp, 8
retn	4
sub_61C130 endp

align 10h



sub_61C180 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
push	esi
call	sub_61BDE0
mov	edx, [esp+0Ch+var_4]
mov	eax, [esi+10h]
shl	edx, 4
mov	eax, [edx+eax+8]
pop	esi
add	esp, 8
retn	4
sub_61C180 endp

align 10h



sub_61C1B0 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
push	esi
call	sub_61BDE0
mov	edx, [esp+0Ch+var_4]
mov	eax, [esi+10h]
shl	edx, 4
mov	eax, [edx+eax+8]
pop	esi
add	esp, 8
retn	8
sub_61C1B0 endp

align 10h



sub_61C1E0 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
push	esi
call	sub_61BDE0
mov	edx, [esp+0Ch+var_4]
mov	eax, [esi+10h]
shl	edx, 4
fld	dword ptr [edx+eax+8]
pop	esi
add	esp, 8
retn	4
sub_61C1E0 endp

align 10h



sub_61C210 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
push	esi
push	edi
mov	edi, [eax]
mov	eax, [eax+4]
push	ecx
mov	ebx, ecx
mov	ecx, esp
mov	[ecx], eax
lea	ecx, [esp+20h+var_10]
push	ecx
push	edi
call	sub_61BDE0
mov	esi, [esp+1Ch+var_C]
mov	eax, [edi+10h]
shl	esi, 4
mov	edx, [eax+esi+0Ch]
mov	ecx, [eax+esi+8]
mov	eax, [esp+1Ch+var_10]
test	byte ptr [eax+10h], 18h
mov	[esp+1Ch+var_4], edx
jz	short loc_61C258
test	ecx, ecx
jz	short loc_61C258
inc	dword ptr [ecx+8]

loc_61C258:
push	ecx
mov	ecx, [esp+20h+arg_0]
mov	eax, esp
lea	edx, [esp+20h+var_10]
mov	[eax], ecx
push	edx
mov	eax, ebx
call	sub_61BFB0
mov	edi, [edi+10h]
mov	edx, [edi+esi+8]
mov	eax, [esp+1Ch+var_C]
mov	ecx, [ebx+10h]
shl	eax, 4
mov	[eax+ecx+8], edx
mov	edx, [edi+esi+0Ch]
pop	edi
pop	esi
mov	[eax+ecx+0Ch], edx
pop	ebx
add	esp, 10h
retn	8
sub_61C210 endp

align 10h



sub_61C2A0 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
test	esi, esi
jz	short loc_61C2B2
inc	dword ptr [esi+8]

loc_61C2B2:
mov	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [esp+14h+var_8]
push	ecx
mov	eax, edi
call	sub_61BFB0
mov	edx, [esp+10h+var_4]
mov	eax, [edi+10h]
shl	edx, 4
pop	edi
mov	[edx+eax+8], esi
pop	esi
add	esp, 8
retn	8
sub_61C2A0 endp

align 10h



sub_61C2E0 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_4]
mov	eax, [esi]
mov	edx, [eax+4]
inc	dword ptr [esi+8]
push	edi
mov	edi, ecx
mov	ecx, esi
call	edx
mov	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [esp+14h+var_8]
push	ecx
mov	eax, edi
call	sub_61BFB0
mov	edx, [esp+10h+var_4]
mov	eax, [edi+10h]
shl	edx, 4
pop	edi
mov	[edx+eax+8], esi
pop	esi
add	esp, 8
retn	8
sub_61C2E0 endp

align 10h



sub_61C320 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
push	edi
mov	esi, ecx
push	eax
lea	ecx, [esp+14h+var_8]
push	ecx
mov	eax, esi
call	sub_61BFB0
mov	edi, [esp+10h+arg_4]
test	edi, edi
jz	short loc_61C347
call	sub_AD3300
jmp	short loc_61C349

loc_61C347:
xor	eax, eax

loc_61C349:
mov	edx, [esp+10h+var_4]
mov	ecx, [esi+10h]
shl	edx, 4
pop	edi
mov	[edx+ecx+8], eax
pop	esi
add	esp, 8
retn	8
sub_61C320 endp

align 10h



; int __stdcall	sub_61C360(int,	float)
sub_61C360 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	eax, esi
call	sub_61BFB0
fld	[esp+0Ch+arg_4]
mov	edx, [esp+0Ch+var_4]
mov	eax, [esi+10h]
shl	edx, 4
fstp	dword ptr [edx+eax+8]
pop	esi
add	esp, 8
retn	8
sub_61C360 endp




sub_61C390 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
push	edi
mov	edi, ecx
push	eax
lea	ecx, [esp+14h+var_8]
push	ecx
mov	eax, edi
call	sub_61BFB0
mov	esi, [esp+10h+var_4]
shl	esi, 4
add	esi, [edi+10h]
lea	ecx, [esp+10h+arg_4]
call	sub_4D4FC0
fstp	dword ptr [esi+8]
pop	edi
pop	esi
add	esp, 8
retn	8
sub_61C390 endp

align 10h



sub_61C3D0 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
sub	esp, 8
push	ebx
push	esi
push	edi
mov	esi, ecx
push	eax
lea	ecx, [esp+18h+var_8]
push	ecx
mov	eax, esi
call	sub_61BFB0
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edi, [esp+14h+arg_8]
mov	edx, [eax]
add	edi, edi
add	edi, edi
mov	ecx, eax
mov	eax, [edx+4]
push	edi
call	eax
mov	ecx, [esp+14h+arg_4]
push	edi
mov	ebx, eax
push	ecx
push	ebx
call	j_unknown_libname_61_0
mov	edx, [esp+20h+var_4]
mov	eax, [esi+10h]
add	esp, 0Ch
pop	edi
shl	edx, 4
pop	esi
mov	[edx+eax+8], ebx
pop	ebx
add	esp, 8
retn	0Ch
sub_61C3D0 endp

align 10h



sub_61C430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	eax, esi
call	sub_61BFB0
mov	eax, [esp+0Ch+var_4]
mov	edx, [esp+0Ch+var_8]
mov	ecx, [edx+10h]
shl	eax, 4
add	eax, [esi+10h]
pop	esi
test	ecx, ecx
jle	short loc_61C482
cmp	ecx, 2
jle	short loc_61C474
cmp	ecx, 3
jnz	short loc_61C482
fild	[esp+8+arg_4]
fstp	dword ptr [eax+8]
add	esp, 8
retn	0Ch

loc_61C474:
mov	ecx, dword ptr [esp+8+arg_4]
mov	edx, dword ptr [esp+8+arg_4+4]
mov	[eax+8], ecx
mov	[eax+0Ch], edx

loc_61C482:
add	esp, 8
retn	0Ch
sub_61C430 endp

align 10h



sub_61C490 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_61BC10
test	[esp+4+arg_0], 1
jz	short loc_61C4BC
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61C4BC:
mov	eax, esi
pop	esi
retn	4
sub_61C490 endp

align 10h



sub_61C4D0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
mov	ecx, [esp+arg_0]
movzx	eax, byte ptr [eax+ecx]
retn	4
sub_61C4D0 endp

align 10h



sub_61C4E0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [ecx+0Ch]
mov	cl, [esp+arg_4]
mov	edx, [esp+arg_0]
mov	[edx+eax], cl
retn	8
sub_61C4E0 endp

align 10h



sub_61C500 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
lea	esi, [ecx+0Ch]
push	edi
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	edi, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_61C53B
add	ecx, ecx
cmp	edi, ecx
jl	short loc_61C52E
mov	ecx, edi

loc_61C52E:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61C53B:
mov	eax, [esp+0Ch+arg_0]
push	edi
mov	[esi+4], edi
mov	ecx, [esi]
push	eax
push	ecx
call	j_unknown_libname_61_0
add	esp, 0Ch
pop	edi
pop	esi
pop	ecx
retn	8
sub_61C500 endp

align 10h



sub_61C560 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
xor	eax, 20h
retn
sub_61C560 endp

align 10h



sub_61C570 proc	near
mov	eax, [ecx+0Ch]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+8]
jmp	eax
sub_61C570 endp

align 10h



sub_61C580 proc	near
mov	eax, [ecx+0Ch]
mov	eax, [eax+24h]
retn
sub_61C580 endp

align 10h



sub_61C590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
xor	esi, esi
push	edi
mov	edi, ecx
test	ebx, ebx
jle	short loc_61C5C2
push	ebp
mov	ebp, [esp+10h+arg_0]

loc_61C5A4:
mov	eax, [edi+0Ch]
mov	ecx, [eax+20h]
movzx	eax, byte ptr [esi+ebp]
mov	edx, [ecx]
mov	edx, [edx+44h]
push	eax
mov	eax, [edi+10h]
add	eax, esi
push	eax
call	edx
inc	esi
cmp	esi, ebx
jl	short loc_61C5A4
pop	ebp

loc_61C5C2:
pop	edi
pop	esi
pop	ebx
retn	8
sub_61C590 endp

align 10h



sub_61C5D0 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
xor	esi, esi
push	edi
mov	edi, ecx
test	ebx, ebx
jle	short loc_61C605
push	ebp
mov	ebp, [esp+10h+arg_0]

loc_61C5E4:
mov	eax, [edi+0Ch]
fld	dword ptr [ebp+esi*4+0]
mov	ecx, [eax+20h]
mov	eax, [edi+10h]
mov	edx, [ecx]
mov	edx, [edx+34h]
push	ecx
add	eax, esi
fstp	[esp+14h+var_14]
push	eax
call	edx
inc	esi
cmp	esi, ebx
jl	short loc_61C5E4
pop	ebp

loc_61C605:
pop	edi
pop	esi
pop	ebx
retn	8
sub_61C5D0 endp

align 10h



sub_61C610 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
mov	edx, [ecx]
add	eax, [esp+arg_0]
mov	[esp+arg_0], eax
mov	edx, [edx+20h]
jmp	edx
sub_61C610 endp

align 10h



sub_61C630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	eax, [eax+10h]
mov	ecx, [ecx+20h]
add	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+24h]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
push	eax
call	edx
pop	esi
retn	8
sub_61C630 endp

align 10h



sub_61C660 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
mov	edx, [ecx]
add	eax, [esp+arg_0]
mov	[esp+arg_0], eax
mov	edx, [edx+28h]
jmp	edx
sub_61C660 endp

align 10h



sub_61C680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	eax, [eax+10h]
mov	ecx, [ecx+20h]
add	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+2Ch]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
push	eax
call	edx
pop	esi
retn	8
sub_61C680 endp

align 10h



sub_61C6B0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
mov	edx, [ecx]
add	eax, [esp+arg_0]
mov	[esp+arg_0], eax
mov	edx, [edx+30h]
jmp	edx
sub_61C6B0 endp

align 10h



; int __stdcall	sub_61C6D0(int,	float)
sub_61C6D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
add	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+34h]
push	ecx
fstp	[esp+4+var_4]
push	eax
call	edx
retn	8
sub_61C6D0 endp

align 10h



sub_61C700 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
mov	edx, [ecx]
add	eax, [esp+arg_0]
mov	[esp+arg_0], eax
mov	edx, [edx+40h]
jmp	edx
sub_61C700 endp

align 10h



sub_61C720 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	eax, [eax+10h]
mov	ecx, [ecx+20h]
add	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+44h]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
push	eax
call	edx
pop	esi
retn	8
sub_61C720 endp

align 10h



sub_61C750 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
mov	edx, [ecx]
add	eax, [esp+arg_0]
mov	[esp+arg_0], eax
mov	edx, [edx+48h]
jmp	edx
sub_61C750 endp

align 10h



sub_61C770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_8]
mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	eax, [eax+10h]
mov	ecx, [ecx+20h]
add	eax, [esp+4+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4Ch]
push	esi
mov	esi, [esp+8+arg_4]
push	esi
push	eax
call	edx
pop	esi
retn	0Ch
sub_61C770 endp

align 10h



sub_61C7A0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
mov	edx, [ecx]
add	eax, [esp+arg_0]
mov	[esp+arg_0], eax
mov	edx, [edx+50h]
jmp	edx
sub_61C7A0 endp

align 10h



sub_61C7C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	eax, [eax+10h]
mov	ecx, [ecx+20h]
add	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+54h]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
push	eax
call	edx
pop	esi
retn	8
sub_61C7C0 endp

align 10h



sub_61C7F0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [eax+10h]
mov	edx, [ecx]
add	eax, [esp+arg_0]
mov	[esp+arg_0], eax
mov	edx, [edx+58h]
jmp	edx
sub_61C7F0 endp

align 10h



sub_61C810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	eax, [eax+10h]
mov	ecx, [ecx+20h]
add	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+5Ch]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
push	eax
call	edx
pop	esi
retn	8
sub_61C810 endp

align 10h



sub_61C840 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
or	eax, 20h
retn
sub_61C840 endp

align 10h



sub_61C850 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	edx, [eax+18h]
jmp	edx
sub_61C850 endp

align 10h



sub_61C860 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	edx, [eax+8]
jmp	edx
sub_61C860 endp

align 10h



sub_61C870 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+20h]
mov	eax, [eax+24h]
imul	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
mov	[esp+arg_0], eax
jmp	edx
sub_61C870 endp

align 10h



sub_61C890 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+20h]
mov	eax, [eax+24h]
imul	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+10h]
mov	[esp+arg_0], eax
jmp	edx
sub_61C890 endp

align 10h



sub_61C8B0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
mov	eax, [ecx]
mov	edx, [eax+14h]
call	edx
cdq
idiv	dword ptr [esi+24h]
pop	esi
retn
sub_61C8B0 endp

align 10h



sub_61C8D0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+24h]
imul	eax, [esp+arg_0]
mov	[ecx+1Ch], eax
lea	eax, [ecx+0Ch]
retn	4
sub_61C8D0 endp

align 10h


; Attributes: bp-based frame

sub_61C8F0 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
mov	esi, [ebp+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+24h]
imul	eax, [ebp+arg_0]
mov	[edi+1Ch], eax
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
dec	eax
cmp	eax, 9		; switch 10 cases
ja	loc_61CB87	; default
jmp	ds:off_61CB90[eax*4] ; switch jump

loc_61C923:		; jumptable 0061C91C case 0
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
mov	edi, edi

loc_61C930:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 44h
mov	[esp+10h+var_4], eax
mov	eax, [edx+40h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61C930
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61C960:		; jumptable 0061C91C case 1
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
jmp	short loc_61C970
align 10h

loc_61C970:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 4Ch
mov	[esp+10h+var_4], eax
mov	eax, [edx+48h]
push	ebx
mov	ecx, esi
call	eax
push	edx
mov	edx, [esp+14h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61C970
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61C9A1:		; jumptable 0061C91C case 2
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
lea	esp, [esp+0]

loc_61C9B0:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 34h
mov	[esp+10h+var_4], eax
mov	eax, [edx+30h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
mov	eax, [edx]
push	ecx
fstp	[esp+14h+var_14]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61C9B0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61C9E3:		; jumptable 0061C91C case 3
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
mov	edi, edi

loc_61C9F0:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 24h
mov	[esp+10h+var_4], eax
mov	eax, [edx+20h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61C9F0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61CA20:		; jumptable 0061C91C case 4
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
jmp	short loc_61CA30
align 10h

loc_61CA30:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 24h
mov	[esp+10h+var_4], eax
mov	eax, [edx+20h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61CA30
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61CA60:		; jumptable 0061C91C case 5
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
jmp	short loc_61CA70
align 10h

loc_61CA70:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 24h
mov	[esp+10h+var_4], eax
mov	eax, [edx+20h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61CA70
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61CAA0:		; jumptable 0061C91C case 6
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
jmp	short loc_61CAB0
align 10h

loc_61CAB0:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 24h
mov	[esp+10h+var_4], eax
mov	eax, [edx+20h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61CAB0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61CAE0:		; jumptable 0061C91C case 7
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	loc_61CB87	; default
jmp	short loc_61CAF0
align 10h

loc_61CAF0:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 54h
mov	[esp+10h+var_4], eax
mov	eax, [edx+50h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61CAF0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61CB20:		; jumptable 0061C91C case 8
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	short loc_61CB87 ; default

loc_61CB27:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 54h
mov	[esp+10h+var_4], eax
mov	eax, [edx+50h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61CB27
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_61CB57:		; jumptable 0061C91C case 9
xor	ebx, ebx
cmp	[edi+24h], ebx
jle	short loc_61CB87 ; default
mov	edi, edi

loc_61CB60:
mov	eax, [edi+0Ch]
mov	edx, [esi]
add	eax, 2Ch
mov	[esp+10h+var_4], eax
mov	eax, [edx+28h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [esp+10h+var_4]
push	eax
mov	eax, [edx]
push	ebx
lea	ecx, [edi+0Ch]
call	eax
inc	ebx
cmp	ebx, [edi+24h]
jl	short loc_61CB60

loc_61CB87:		; default
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_61C8F0 endp

off_61CB90 dd offset loc_61C923	; jump table for switch	statement
dd offset loc_61C960
dd offset loc_61C9A1
dd offset loc_61C9E3
dd offset loc_61CA20
dd offset loc_61CA60
dd offset loc_61CAA0
dd offset loc_61CAE0
dd offset loc_61CB20
dd offset loc_61CB57
align 10h



sub_61CBC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
mov	dword ptr [esi], offset	off_15F867C
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61CBDA
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_61CBDA:
test	[esp+4+arg_0], 1
mov	dword ptr [esi+0Ch], offset off_15F8204
mov	dword ptr [esi], offset	off_15F8204
jz	short loc_61CC09
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61CC09:
mov	eax, esi
pop	esi
retn	4
sub_61CBC0 endp

align 10h



sub_61CC10 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
mov	ecx, [esp+arg_0]
mov	eax, [eax+ecx*8]
retn	4
sub_61CC10 endp

align 10h



sub_61CC20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [ecx+0Ch]
push	esi
mov	esi, [esp+4+arg_0]
cdq
mov	[ecx+esi*8], eax
mov	[ecx+esi*8+4], edx
pop	esi
retn	8
sub_61CC20 endp

align 10h



sub_61CC40 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+0Ch]
mov	edx, [esp+arg_0]
mov	eax, [ecx+edx*8]
mov	edx, [ecx+edx*8+4]
retn	4
sub_61CC40 endp

align 10h



sub_61CC60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx+0Ch]
mov	edx, [esp+arg_4]
mov	ecx, [esp+arg_0]
mov	[eax+ecx*8], edx
mov	edx, [esp+arg_8]
mov	[eax+ecx*8+4], edx
retn	0Ch
sub_61CC60 endp

align 10h



sub_61CC80 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
lea	ebx, [ecx+0Ch]
push	esi
push	ebx
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	ecx, [ebx+8]
mov	ebp, [esp+10h+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, ebp
jge	short loc_61CCBC
add	ecx, ecx
cmp	ebp, ecx
jl	short loc_61CCAF
mov	ecx, ebp

loc_61CCAF:
push	8
push	ecx
push	ebx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CCBC:
xor	esi, esi
mov	[ebx+4], ebp
test	ebp, ebp
jle	short loc_61CCE5
push	edi

loc_61CCC6:
mov	eax, [ebx]
mov	ecx, [esp+14h+arg_0]
add	ecx, esi
lea	edi, [eax+esi*8]
call	sub_4D4F40
movzx	eax, al
cdq
inc	esi
cmp	esi, ebp
mov	[edi], eax
mov	[edi+4], edx
jl	short loc_61CCC6
pop	edi

loc_61CCE5:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_61CC80 endp

align 10h



sub_61CCF0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	edi
lea	edi, [ecx+0Ch]
push	edi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [edi+8]
mov	ebx, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61CD2B
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61CD1E
mov	ecx, ebx

loc_61CD1E:
push	8
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CD2B:
xor	ecx, ecx
mov	[edi+4], ebx
test	ebx, ebx
jle	short loc_61CD55
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
lea	ebx, [ebx+0]

loc_61CD40:
movsx	eax, byte ptr [ecx+ebp]
mov	esi, [edi]
cdq
mov	[esi+ecx*8], eax
mov	[esi+ecx*8+4], edx
inc	ecx
cmp	ecx, ebx
jl	short loc_61CD40
pop	esi
pop	ebp

loc_61CD55:
pop	edi
pop	ebx
pop	ecx
retn	8
sub_61CCF0 endp

align 10h



sub_61CD60 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	edi
lea	edi, [ecx+0Ch]
push	edi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [edi+8]
mov	ebx, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61CD9B
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61CD8E
mov	ecx, ebx

loc_61CD8E:
push	8
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CD9B:
xor	ecx, ecx
mov	[edi+4], ebx
test	ebx, ebx
jle	short loc_61CDC5
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
lea	ebx, [ebx+0]

loc_61CDB0:
movzx	eax, byte ptr [ecx+ebp]
mov	esi, [edi]
cdq
mov	[esi+ecx*8], eax
mov	[esi+ecx*8+4], edx
inc	ecx
cmp	ecx, ebx
jl	short loc_61CDB0
pop	esi
pop	ebp

loc_61CDC5:
pop	edi
pop	ebx
pop	ecx
retn	8
sub_61CD60 endp

align 10h



sub_61CDD0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	edi
lea	edi, [ecx+0Ch]
push	edi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [edi+8]
mov	ebx, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61CE0B
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61CDFE
mov	ecx, ebx

loc_61CDFE:
push	8
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CE0B:
xor	ecx, ecx
mov	[edi+4], ebx
test	ebx, ebx
jle	short loc_61CE36
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
lea	ebx, [ebx+0]

loc_61CE20:
movsx	eax, word ptr [ebp+ecx*2+0]
mov	esi, [edi]
cdq
mov	[esi+ecx*8], eax
mov	[esi+ecx*8+4], edx
inc	ecx
cmp	ecx, ebx
jl	short loc_61CE20
pop	esi
pop	ebp

loc_61CE36:
pop	edi
pop	ebx
pop	ecx
retn	8
sub_61CDD0 endp

align 10h



sub_61CE40 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	edi
lea	edi, [ecx+0Ch]
push	edi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [edi+8]
mov	ebx, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61CE7B
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61CE6E
mov	ecx, ebx

loc_61CE6E:
push	8
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CE7B:
xor	ecx, ecx
mov	[edi+4], ebx
test	ebx, ebx
jle	short loc_61CEA6
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
lea	ebx, [ebx+0]

loc_61CE90:
movzx	eax, word ptr [ebp+ecx*2+0]
mov	esi, [edi]
cdq
mov	[esi+ecx*8], eax
mov	[esi+ecx*8+4], edx
inc	ecx
cmp	ecx, ebx
jl	short loc_61CE90
pop	esi
pop	ebp

loc_61CEA6:
pop	edi
pop	ebx
pop	ecx
retn	8
sub_61CE40 endp

align 10h



sub_61CEB0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	edi
lea	edi, [ecx+0Ch]
push	edi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [edi+8]
mov	ebx, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61CEEB
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61CEDE
mov	ecx, ebx

loc_61CEDE:
push	8
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CEEB:
xor	ecx, ecx
mov	[edi+4], ebx
test	ebx, ebx
jle	short loc_61CF15
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
lea	ebx, [ebx+0]

loc_61CF00:
mov	eax, [ebp+ecx*4+0]
mov	esi, [edi]
cdq
mov	[esi+ecx*8], eax
mov	[esi+ecx*8+4], edx
inc	ecx
cmp	ecx, ebx
jl	short loc_61CF00
pop	esi
pop	ebp

loc_61CF15:
pop	edi
pop	ebx
pop	ecx
retn	8
sub_61CEB0 endp

align 10h



sub_61CF20 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	edi
lea	edi, [ecx+0Ch]
push	edi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [edi+8]
mov	ebx, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61CF5B
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61CF4E
mov	ecx, ebx

loc_61CF4E:
push	8
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CF5B:
xor	ecx, ecx
mov	[edi+4], ebx
test	ebx, ebx
jle	short loc_61CF85
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
lea	ebx, [ebx+0]

loc_61CF70:
mov	eax, [ebp+ecx*8+0]
mov	esi, [edi]
cdq
mov	[esi+ecx*8], eax
mov	[esi+ecx*8+4], edx
inc	ecx
cmp	ecx, ebx
jl	short loc_61CF70
pop	esi
pop	ebp

loc_61CF85:
pop	edi
pop	ebx
pop	ecx
retn	8
sub_61CF20 endp

align 10h



sub_61CF90 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
mov	ecx, [esp+arg_0]
fld	dword ptr [eax+ecx*4]
retn	4
sub_61CF90 endp

align 10h



; int __stdcall	sub_61CFA0(int,	float)
sub_61CFA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+0Ch]
fld	[esp+arg_4]
mov	ecx, [esp+arg_0]
fstp	dword ptr [eax+ecx*4]
retn	8
sub_61CFA0 endp

align 10h



sub_61CFC0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
lea	esi, [ecx+0Ch]
push	edi
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	edi, [esp+0Ch+arg_4]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_61CFFB
add	ecx, ecx
cmp	edi, ecx
jl	short loc_61CFEE
mov	ecx, edi

loc_61CFEE:
push	4
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61CFFB:
mov	ecx, [esp+0Ch+arg_0]
lea	eax, ds:0[edi*4]
push	eax
mov	[esi+4], edi
mov	edx, [esi]
push	ecx
push	edx
call	j_unknown_libname_61_0
add	esp, 0Ch
pop	edi
pop	esi
pop	ecx
retn	8
sub_61CFC0 endp

align 10h



sub_61D020 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+18h]
imul	eax, [esp+arg_0]
mov	ecx, [ecx+0Ch]
lea	eax, [ecx+eax*4]
retn	4
sub_61D020 endp

align 10h



sub_61D040 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+18h]
xor	eax, eax
test	edx, edx
jle	short locret_61D06D
push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]

loc_61D054:
fld	dword ptr [esi+eax*4]
mov	ebx, [ecx+0Ch]
imul	edx, edi
add	edx, eax
inc	eax
fstp	dword ptr [ebx+edx*4]
mov	edx, [ecx+18h]
cmp	eax, edx
jl	short loc_61D054
pop	edi
pop	esi
pop	ebx

locret_61D06D:
retn	8
sub_61D040 endp




sub_61D070 proc	near
mov	eax, [ecx+18h]
cmp	eax, 4
jz	short __RTC_NumErrors_2
cmp	eax, 0Ch
jz	short loc_61D08C
xor	ecx, ecx
cmp	eax, 10h
setnz	cl
dec	ecx
and	ecx, 7
mov	eax, ecx
retn

loc_61D08C:
mov	eax, 6
retn

__RTC_NumErrors_2:
mov	eax, 4
retn
sub_61D070 endp

align 10h



sub_61D0A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx+18h]
imul	esi, [esp+4+arg_0]
push	edi
lea	edi, [ecx+0Ch]
push	edi
lea	ecx, [esp+0Ch+arg_0]
mov	byte ptr [esp+0Ch+arg_0], 0
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_61D0DE
add	ecx, ecx
cmp	esi, ecx
jl	short loc_61D0D1
mov	ecx, esi

loc_61D0D1:
push	4
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61D0DE:
pop	edi
pop	esi
retn	4
sub_61D0A0 endp

align 10h



sub_61D0F0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [ecx+18h]
imul	esi, [esp+8+arg_0]
lea	ebx, [ecx+0Ch]
push	edi
push	ebx
lea	ecx, [esp+10h+arg_0]
mov	byte ptr [esp+10h+arg_0], 0
call	sub_4A00D0
mov	ecx, [ebx+8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_61D12F
add	ecx, ecx
cmp	esi, ecx
jl	short loc_61D122
mov	ecx, esi

loc_61D122:
push	4
push	ecx
push	ebx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61D12F:
mov	eax, [ebx+4]
mov	edx, [ebx]
mov	ecx, esi
sub	ecx, eax
lea	edi, [edx+eax*4]
test	ecx, ecx
jle	short loc_61D143
xor	eax, eax
rep stosd

loc_61D143:
pop	edi
mov	[ebx+4], esi
pop	esi
pop	ebx
retn	4
sub_61D0F0 endp

align 10h



sub_61D150 proc	near
mov	eax, [ecx+10h]
cdq
idiv	dword ptr [ecx+18h]
retn
sub_61D150 endp

align 10h



sub_61D160 proc	near

var_1= byte ptr	-1

push	ecx
push	ebp
push	esi
xor	esi, esi
or	ebp, 0FFFFFFFFh
cmp	[edi+10h], esi
mov	dword ptr [edi], offset	off_15F8974
jle	short loc_61D194

loc_61D173:
mov	eax, [edi+0Ch]
cmp	dword ptr [eax+esi*4], 0
lea	eax, [eax+esi*4]
jz	short loc_61D18E
mov	ecx, [eax]
add	[ecx+8], ebp
jnz	short loc_61D18E
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61D18E:
inc	esi
cmp	esi, [edi+10h]
jl	short loc_61D173

loc_61D194:
mov	ecx, [edi+18h]
test	ecx, ecx
jz	short loc_61D1A8
add	[ecx+8], ebp
jnz	short loc_61D1A8
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61D1A8:
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+10h+var_1]
mov	dword ptr [edi+18h], 0
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61D1E6
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx

loc_61D1E6:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	dword ptr [edi], offset	off_15F8204
pop	ebp
pop	ecx
retn
sub_61D160 endp

align 10h



sub_61D200 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
mov	ecx, [esp+arg_0]
mov	eax, [eax+ecx*4]
retn	4
sub_61D200 endp

align 10h



sub_61D210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	esi, ecx
test	edi, edi
jz	short loc_61D220
inc	dword ptr [edi+8]

loc_61D220:
mov	ebx, [esp+0Ch+arg_0]
mov	eax, [esi+0Ch]
cmp	dword ptr [eax+ebx*4], 0
lea	eax, [eax+ebx*4]
jz	short loc_61D258
mov	ecx, [eax]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61D24C
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+ebx*4], edi
pop	edi
pop	esi
pop	ebx
retn	8

loc_61D24C:
mov	edx, [esi+0Ch]
mov	[edx+ebx*4], edi
pop	edi
pop	esi
pop	ebx
retn	8

loc_61D258:
mov	eax, [esi+0Ch]
mov	[eax+ebx*4], edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_61D210 endp

align 10h



sub_61D270 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_61D160
test	[esp+4+arg_0], 1
jz	short loc_61D29A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61D29A:
mov	eax, edi
pop	edi
retn	4
sub_61D270 endp




sub_61D2A0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
xor	esi, esi
cmp	[edi+10h], esi
mov	dword ptr [edi], offset	off_15F8A0C
jle	short loc_61D2C5
nop

loc_61D2B0:
mov	eax, [edi+0Ch]
mov	ecx, [eax+esi*4]
push	ecx
call	sub_AD3320
inc	esi
add	esp, 4
cmp	esi, [edi+10h]
jl	short loc_61D2B0

loc_61D2C5:
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61D2FE
and	edx, 3FFFFFFFh
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [ebp+10h]
push	edx
call	eax
pop	ebp

loc_61D2FE:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F8204
pop	esi
pop	ecx
retn
sub_61D2A0 endp

align 10h



sub_61D320 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	ecx, [eax+ebx*4]
push	edi
push	ecx
call	sub_AD3320
mov	edi, [esp+10h+arg_4]
add	esp, 4
test	edi, edi
jz	short loc_61D351
call	sub_AD3300
mov	edx, [esi+0Ch]
pop	edi
pop	esi
mov	[edx+ebx*4], eax
pop	ebx
retn	8

loc_61D351:
mov	ecx, [esi+0Ch]
pop	edi
xor	eax, eax
pop	esi
mov	[ecx+ebx*4], eax
pop	ebx
retn	8
sub_61D320 endp

align 10h



sub_61D360 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_61D2A0
test	[esp+4+arg_0], 1
jz	short loc_61D38A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61D38A:
mov	eax, edi
pop	edi
retn	4
sub_61D360 endp




sub_61D390 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	ecx, [esi+10h]
xor	eax, eax
test	ecx, ecx
jle	short loc_61D3CC
mov	edx, [esi+0Ch]
mov	esi, [esp+8+var_4]
lea	esp, [esp+0]

loc_61D3C0:
cmp	[edx], esi
jz	short loc_61D3CF
inc	eax
add	edx, 8
cmp	eax, ecx
jl	short loc_61D3C0

loc_61D3CC:
or	eax, 0FFFFFFFFh

loc_61D3CF:
pop	esi
pop	ecx
retn
sub_61D390 endp

align 10h



sub_61D3E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
cmp	dword ptr [ebx+10h], 0
setz	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+8+arg_4]
call	sub_4D4F20
lea	ecx, [esp+4+arg_4]
call	sub_4D4F40
test	al, al
jz	short loc_61D40D
or	eax, 0FFFFFFFFh
pop	ebx
retn	8

loc_61D40D:
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+14h+arg_4]
mov	byte ptr [esp+14h+arg_4], 0
call	sub_4A00D0
mov	edx, [esi+8]
and	edx, 3FFFFFFFh
cmp	[esi+4], edx
jnz	short loc_61D440
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61D440:
mov	eax, [esi+4]
mov	ecx, [esi]
lea	eax, [ecx+eax*8]
push	eax		; void *
push	8		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_61D45D
mov	dword ptr [eax], 0

loc_61D45D:
mov	eax, [esi+4]
mov	edx, [esi]
lea	ebp, [edx+eax*8]
inc	eax
mov	[esi+4], eax
mov	eax, [ebx]
mov	[ebp+0], eax
mov	ecx, [edi+18h]
mov	edx, [ebx+4]
mov	eax, [ecx]
mov	esi, [edx+8]
mov	edx, [eax+4]
call	edx
mov	ecx, [eax+8]
xor	eax, eax
test	esi, esi
jz	short loc_61D493
push	esi
mov	edi, ecx
call	sub_603480
mov	edi, [esp+10h+arg_0]

loc_61D493:
mov	edx, [ebx+14h]
mov	ecx, [ebx+10h]
push	edx
push	eax
push	ecx
call	sub_A55970
mov	[ebp+4], eax
inc	dword ptr [eax+8]
mov	eax, [edi+10h]
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
dec	eax
pop	ebx
retn	8
sub_61D3E0 endp

align 10h



sub_61D4C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
mov	ecx, [ebx+18h]
mov	eax, [ecx]
mov	eax, [eax+2Ch]
push	esi
push	edi
push	edx
call	eax
mov	edi, [ebx+18h]
mov	edx, [edi]
mov	esi, eax
mov	eax, [edx+24h]
mov	ecx, edi
call	eax
sub	esi, eax
mov	eax, edi

loc_61D4E8:
add	esi, [eax+2Ch]
jns	short loc_61D532
mov	eax, [eax+18h]
test	eax, eax
jnz	short loc_61D4E8
mov	edi, [edi+28h]
sub	edi, 18h

loc_61D4FA:
push	edi
push	ebx
call	sub_61D3E0
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_61D52A
mov	eax, [ebx+0Ch]
mov	ecx, [eax+edi*8+4]
mov	esi, [ecx]
mov	edx, [ebx]
push	ebp
lea	ebp, [eax+edi*8]
mov	eax, [edx+14h]
mov	ecx, ebx
add	esi, 10h
call	eax
mov	ecx, [ebp+4]
mov	edx, [esi]
push	eax
call	edx
pop	ebp

loc_61D52A:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8

loc_61D532:
mov	edx, [eax+28h]
lea	ecx, [esi+esi*2]
lea	edi, [edx+ecx*8]
jmp	short loc_61D4FA
sub_61D4C0 endp

align 10h



sub_61D540 proc	near

arg_0= dword ptr  4

mov	ecx, [esi+10h]
xor	eax, eax
push	edi
mov	edi, [esp+4+arg_0]
test	ecx, ecx
jle	short loc_61D56D
mov	edx, [esi+0Ch]

loc_61D551:
cmp	[edx], edi
jz	short loc_61D568
inc	eax
add	edx, 8
cmp	eax, ecx
jl	short loc_61D551
push	edi
push	esi
call	sub_61D4C0
pop	edi
retn	4

loc_61D568:
cmp	eax, 0FFFFFFFFh
jnz	short loc_61D574

loc_61D56D:
push	edi
push	esi
call	sub_61D4C0

loc_61D574:
pop	edi
retn	4
sub_61D540 endp

align 10h



sub_61D580 proc	near

arg_0= dword ptr  4

mov	ecx, [edi+10h]
push	esi
xor	esi, esi
test	ecx, ecx
jle	short loc_61D5E3
mov	eax, [edi+0Ch]
mov	edx, [esp+4+arg_0]

loc_61D591:
cmp	[eax], edx
jz	short loc_61D5A1
inc	esi
add	eax, 8
cmp	esi, ecx
jl	short loc_61D591
pop	esi
retn	4

loc_61D5A1:
mov	eax, [eax+4]
add	dword ptr [eax+8], 0FFFFFFFFh
jnz	short loc_61D5B4
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx]
push	1
call	eax

loc_61D5B4:
dec	dword ptr [edi+10h]
mov	eax, [edi+10h]
mov	ecx, [edi+0Ch]
sub	eax, esi
add	eax, eax
add	eax, eax
add	eax, eax
lea	ecx, [ecx+esi*8]
lea	edx, [ecx+8]
test	eax, eax
jle	short loc_61D5E3
dec	eax
shr	eax, 2
sub	edx, ecx
inc	eax

loc_61D5D6:
mov	esi, [edx+ecx]
mov	[ecx], esi
add	ecx, 4
sub	eax, 1
jnz	short loc_61D5D6

loc_61D5E3:
pop	esi
retn	4
sub_61D580 endp

align 10h



sub_61D5F0 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	edx, [eax+18h]
jmp	edx
sub_61D5F0 endp

align 10h



sub_61D600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_4]
mov	[eax+4], ecx
retn	8
sub_61D600 endp




sub_61D610 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	eax, [eax+60h]
push	ecx
lea	edx, [esp+8+arg_0]
push	edx
mov	ecx, esi
call	eax
mov	esi, [esi+0Ch]
mov	ecx, [esi+10h]
xor	eax, eax
test	ecx, ecx
jle	short loc_61D64C
mov	edx, [esi+0Ch]
mov	esi, [esp+4+arg_0]
lea	esp, [esp+0]

loc_61D640:
cmp	esi, [edx]
jz	short loc_61D652
inc	eax
add	edx, 8
cmp	eax, ecx
jl	short loc_61D640

loc_61D64C:
xor	eax, eax
pop	esi
retn	4

loc_61D652:
mov	eax, 1
pop	esi
retn	4
sub_61D610 endp

align 10h



sub_61D660 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
mov	edx, [esp+arg_0]
xor	ecx, ecx
cmp	edx, [eax+10h]
setl	cl
mov	eax, ecx
retn	4
sub_61D660 endp

align 10h



sub_61D680 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
mov	ecx, [eax+0Ch]
mov	edx, [esp+arg_0]
mov	eax, [ecx+edx*8]
retn	4
sub_61D680 endp




sub_61D690 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [ecx+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [esp+arg_4]
mov	edx, [edx+ecx*8]
mov	[eax+4], edx
retn	8
sub_61D690 endp

align 10h



sub_61D6B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx+0Ch]
mov	eax, [esp+arg_4]
mov	edx, [ecx+18h]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, [edx+0Ch]
mov	ecx, [eax+8]
push	esi
push	ecx
call	sub_61EA00
mov	eax, esi
pop	esi
retn	8
sub_61D6B0 endp

align 10h



sub_61D6E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+20h]
push	edx
call	eax
pop	esi
retn	8
sub_61D6E0 endp

align 10h



sub_61D710 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esi+10h]
mov	eax, [ecx]
pop	esi
mov	[esp+arg_0], edx
mov	eax, [eax+28h]
jmp	eax
sub_61D710 endp

align 10h



sub_61D740 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esi+10h]
mov	eax, [ecx]
pop	esi
mov	[esp+arg_0], edx
mov	eax, [eax+58h]
jmp	eax
sub_61D740 endp

align 10h



sub_61D770 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+40h]
push	edx
call	eax
cdq
pop	esi
retn	4
sub_61D770 endp

align 10h



sub_61D7A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esi+10h]
mov	eax, [ecx]
pop	esi
mov	[esp+arg_0], edx
mov	eax, [eax+30h]
jmp	eax
sub_61D7A0 endp

align 10h



sub_61D7D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esi+10h]
mov	eax, [ecx]
mov	esi, [esp+4+arg_0]
mov	eax, [eax+38h]
push	edx
push	esi
call	eax
mov	eax, esi
pop	esi
retn	8
sub_61D7D0 endp

align 10h



sub_61D800 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esi+10h]
mov	eax, [ecx]
pop	esi
mov	[esp+arg_0], edx
mov	eax, [eax+50h]
jmp	eax
sub_61D800 endp

align 10h



sub_61D830 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [esp+8+arg_4]
mov	edx, [ecx+4]
mov	ecx, [ecx]
push	edx
mov	edx, [edi+10h]
push	ecx
mov	ecx, [edi+0Ch]
push	edx
mov	edx, [ecx+0Ch]
mov	edi, [edx+eax*8+4]
call	sub_61B310
pop	edi
pop	esi
retn	8
sub_61D830 endp

align 10h



sub_61D880 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+54h]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61D880 endp

align 10h



sub_61D8D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+5Ch]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61D8D0 endp

align 10h



sub_61D920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+2Ch]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61D920 endp

align 10h



; int __stdcall	sub_61D970(int,	float)
sub_61D970 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
fld	[esp+8+arg_4]
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	eax, [ecx]
mov	edx, [edi+10h]
mov	eax, [eax+34h]
push	ecx
fstp	[esp+0Ch+var_C]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61D970 endp

align 10h



sub_61D9C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+3Ch]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61D9C0 endp

align 10h



sub_61DA10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+24h]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	0Ch
sub_61DA10 endp

align 10h



sub_61DA60 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
movsx	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+44h]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61DA60 endp

align 10h



sub_61DAB0 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
movsx	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+44h]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61DAB0 endp

align 10h



sub_61DB00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esp+8+arg_4]
mov	eax, [ecx]
mov	eax, [eax+44h]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	8
sub_61DB00 endp

align 10h



sub_61DB50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [eax+8]
push	ecx
call	sub_61EA00
mov	edx, [esp+8+arg_0]
push	edx
call	sub_61D540
mov	ecx, [edi+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+eax*8+4]
mov	edx, [esp+8+arg_8]
mov	eax, [ecx]
mov	eax, [eax+4Ch]
push	edx
mov	edx, [esp+0Ch+arg_4]
push	edx
mov	edx, [edi+10h]
push	edx
call	eax
pop	edi
pop	esi
retn	0Ch
sub_61DB50 endp

align 10h



sub_61DBA0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
xor	ebp, ebp
xor	ecx, ecx
mov	[esi+6], cx
mov	[esi+8], ebp
mov	dword ptr [esi], offset	off_15F8AA4
push	edi
mov	[esi+0Ch], ebp
mov	[esi+10h], ebp
mov	dword ptr [esi+14h], 80000000h
cmp	eax, ebp
jz	short loc_61DBC9
inc	dword ptr [eax+8]

loc_61DBC9:
mov	[esi+18h], eax
mov	ecx, [esi+18h]
mov	[esi+1Ch], ebp
mov	edx, [ecx]
mov	eax, [edx+24h]
xor	ebx, ebx
call	eax
test	eax, eax
jle	short loc_61DC1A
nop

loc_61DBE0:
mov	edi, [esi+18h]
mov	edx, [edi]
mov	eax, [edx+24h]
mov	ecx, edi
call	eax
mov	ecx, ebx
sub	ecx, eax
mov	eax, edi

loc_61DBF2:
add	ecx, [eax+2Ch]
jns	short loc_61DC49
mov	eax, [eax+18h]
cmp	eax, ebp
jnz	short loc_61DBF2
mov	edi, [edi+28h]
sub	edi, 18h

loc_61DC04:
push	edi
push	esi
call	sub_61D3E0
mov	ecx, [esi+18h]
mov	eax, [ecx]
mov	edx, [eax+24h]
inc	ebx
call	edx
cmp	ebx, eax
jl	short loc_61DBE0

loc_61DC1A:
mov	ecx, [esi+18h]
mov	eax, [ecx]
mov	edx, [eax+4]
mov	[esp+10h+var_4], esi
call	edx
mov	edi, [eax+8]
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
lea	ecx, [esp+10h+var_4]
push	ecx
push	eax
lea	eax, [edi+6Ch]
call	sub_617AD0
pop	edi
pop	ebp
mov	eax, esi
pop	ebx
pop	ecx
retn

loc_61DC49:
mov	edx, [eax+28h]
lea	ecx, [ecx+ecx*2]
lea	edi, [edx+ecx*8]
jmp	short loc_61DC04
sub_61DBA0 endp

align 10h



sub_61DC60 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
xor	esi, esi
cmp	[ebp+10h], esi
push	edi
mov	dword ptr [ebp+0], offset off_15F8AA4
jle	short loc_61DC9B
jmp	short loc_61DC80
align 10h

loc_61DC80:
mov	eax, [ebp+0Ch]
mov	ecx, [eax+esi*8+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61DC95
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61DC95:
inc	esi
cmp	esi, [ebp+10h]
jl	short loc_61DC80

loc_61DC9B:
mov	ecx, [ebp+18h]
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax
mov	edx, [ebp+0]
mov	esi, [eax+8]
mov	eax, [edx+18h]
mov	ecx, ebp
call	eax
lea	edi, [esi+6Ch]
mov	ecx, edi
mov	ebx, eax
call	sub_61EDE0
cmp	eax, 0FFFFFFFFh
jz	short loc_61DCDD
mov	ecx, [edi]

loc_61DCC5:
cmp	ebp, [ecx+eax*8]
jz	short loc_61DCD5
mov	eax, [ecx+eax*8+4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_61DCC5
jmp	short loc_61DCDD

loc_61DCD5:
push	ebx
mov	esi, eax
call	sub_604A80

loc_61DCDD:
mov	ecx, [ebp+18h]
xor	edi, edi
cmp	ecx, edi
jz	short loc_61DCF4
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61DCF4
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61DCF4:
lea	esi, [ebp+0Ch]
push	esi
lea	ecx, [esp+14h+arg_0]
mov	[ebp+18h], edi
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], edi
test	edx, edx
js	short loc_61DD2C
mov	ecx, [esi]
mov	ebx, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [ebx+10h]
push	ecx
mov	ecx, eax
call	edx

loc_61DD2C:
mov	[esi], edi
pop	edi
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	dword ptr [ebp+0], offset off_15F8204
pop	ebp
pop	ebx
retn	4
sub_61DC60 endp

align 10h



sub_61DD50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	14h
call	eax
mov	ecx, 14h
mov	[eax+4], cx
mov	ecx, [esp+4+arg_0]
xor	edx, edx
mov	[eax+0Ch], esi
mov	[eax+6], dx
mov	[eax+8], edx
mov	dword ptr [eax], offset	off_15F8B3C
mov	[eax+10h], ecx
pop	esi
retn	4
sub_61DD50 endp



; Attributes: bp-based frame

sub_61DD90 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0Ch
push	ebx
push	esi
mov	ebx, ecx
xor	esi, esi
cmp	[ebx+10h], esi
push	edi
jle	short loc_61DDD6

loc_61DDA5:
mov	eax, [ebx+0Ch]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
lea	edi, [eax+esi*8]
mov	eax, [edi]
push	eax
lea	eax, [esp+1Ch+var_8]
push	eax
call	edx
mov	ecx, [eax+4]
mov	edx, [eax]
mov	eax, [ebp+arg_0]
mov	edi, [edi+4]
push	ecx
push	edx
push	eax
call	sub_61B310
inc	esi
cmp	esi, [ebx+10h]
jl	short loc_61DDA5

loc_61DDD6:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_61DD90 endp

align 10h



sub_61DDE0 proc	near
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+10h], esi
jle	short loc_61DE0E
jmp	short loc_61DDF0
align 10h

loc_61DDF0:
mov	eax, [edi+0Ch]
mov	ecx, [eax+esi*8+4]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
inc	esi
cmp	esi, [edi+10h]
jl	short loc_61DDF0
mov	dword ptr [edi+1Ch], 0
pop	edi
pop	esi
retn

loc_61DE0E:
mov	[edi+1Ch], esi
pop	edi
pop	esi
retn
sub_61DDE0 endp

align 10h



sub_61DE20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+10h], esi
jle	short loc_61DE46
push	ebx
mov	ebx, [esp+0Ch+arg_0]

loc_61DE30:
mov	eax, [edi+0Ch]
mov	ecx, [eax+esi*8+4]
mov	edx, [ecx]
mov	eax, [edx+0Ch]
push	ebx
call	eax
inc	esi
cmp	esi, [edi+10h]
jl	short loc_61DE30
pop	ebx

loc_61DE46:
pop	edi
pop	esi
retn	4
sub_61DE20 endp

align 10h



sub_61DE50 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+10h], esi
mov	[edi+1Ch], ebx
jle	short loc_61DE78

loc_61DE63:
mov	eax, [edi+0Ch]
mov	ecx, [eax+esi*8+4]
mov	edx, [ecx]
mov	eax, [edx+10h]
push	ebx
call	eax
inc	esi
cmp	esi, [edi+10h]
jl	short loc_61DE63

loc_61DE78:
pop	edi
pop	esi
pop	ebx
retn	4
sub_61DE50 endp

align 10h



sub_61DE80 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
call	sub_61D390
mov	ecx, [esi+0Ch]
mov	eax, [ecx+eax*8+4]
pop	esi
retn	4
sub_61DE80 endp

align 10h



sub_61DEA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_61DC60
test	[esp+4+arg_0], 1
jz	short loc_61DECB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61DECB:
mov	eax, esi
pop	esi
retn	4
sub_61DEA0 endp

align 10h



sub_61DEE0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_61DF10
test	[esp+4+arg_0], 1
jz	short loc_61DF0A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61DF0A:
mov	eax, edi
pop	edi
retn	4
sub_61DEE0 endp




sub_61DF10 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61DF47
mov	ecx, [esi]
push	ebp
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_61DF47:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F8204
pop	esi
pop	ecx
retn
sub_61DF10 endp

align 10h



sub_61DF60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_61DF90
test	[esp+4+arg_0], 1
jz	short loc_61DF8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61DF8A:
mov	eax, edi
pop	edi
retn	4
sub_61DF60 endp




sub_61DF90 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61DFCD
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_61DFCD:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F8204
pop	esi
pop	ecx
retn
sub_61DF90 endp

align 10h



sub_61DFF0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_61E020
test	[esp+4+arg_0], 1
jz	short loc_61E01A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61E01A:
mov	eax, edi
pop	edi
retn	4
sub_61DFF0 endp




sub_61E020 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_61E053
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_61E053:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [edi], offset	off_15F8204
pop	esi
pop	ecx
retn
sub_61E020 endp

align 10h



sub_61E070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_0]
push	ebx
push	ebp
mov	ebp, ecx
push	esi
lea	ebx, [ebp+6Ch]
push	edi
mov	ecx, ebx
mov	[esp+14h+var_4], ebp
call	sub_61EDE0
mov	esi, [esp+14h+arg_8]
cmp	eax, 0FFFFFFFFh
jz	short loc_61E0E4

loc_61E092:
mov	edi, [ebx]
lea	ebp, ds:0[eax*8]
push	esi
lea	ecx, [esp+18h+arg_8]
add	edi, ebp
mov	byte ptr [esp+18h+arg_8], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_61E0C6
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61E0C6:
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [edi]
lea	eax, [eax+edx*4]
mov	[eax], ecx
inc	dword ptr [esi+4]
mov	edx, [ebx]
mov	eax, [edx+ebp+4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_61E092
mov	ebp, [esp+14h+var_4]

loc_61E0E4:
cmp	[esp+14h+arg_4], 0
jz	short loc_61E11E
mov	eax, [esp+14h+arg_0]
lea	ebx, [ebp+10h]
mov	ecx, ebx
call	sub_61EDE0
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_61E11E
mov	eax, [ebx]

loc_61E102:
mov	ecx, [esp+14h+arg_4]
mov	edx, [eax+edi*8]
push	esi
push	ecx
push	edx
mov	ecx, ebp
call	sub_61E070
mov	eax, [ebx]
mov	edi, [eax+edi*8+4]
cmp	edi, 0FFFFFFFFh
jnz	short loc_61E102

loc_61E11E:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_61E070 endp

align 10h



sub_61E130 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_4]
mov	eax, [edi]
mov	edx, [eax+10h]
mov	ecx, edi
call	edx
mov	ebp, eax
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
push	eax
push	ebx
call	sub_6033B0
mov	ecx, eax
lea	esi, [esp+14h+arg_0]
mov	eax, ebx
call	sub_6032D0
push	0
lea	eax, [esp+18h+var_1]
push	eax
mov	ecx, esi
call	sub_4D4F60
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_61E1A2
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
call	eax
push	edi
push	eax
mov	ecx, ebx
call	sub_6032F0
test	ebp, ebp
jz	short loc_61E1A2
lea	ecx, [esp+14h+arg_4]
push	ecx
push	ebp
lea	eax, [ebx+10h]
call	sub_617AD0

loc_61E1A2:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_61E130 endp

align 10h



sub_61E1B0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
mov	ecx, ebx
call	sub_603250
mov	ebp, eax
mov	ecx, ebp
lea	esi, [esp+10h+arg_0]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jz	short loc_61E244
lea	esp, [esp+0]

loc_61E1E0:
mov	edx, ebp
mov	eax, ebx
call	sub_603280
push	edi
lea	ecx, [esp+14h+var_1]
mov	esi, eax
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	[edi+4], ecx
jnz	short loc_61E214
push	4
push	edi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61E214:
mov	edx, [edi+4]
mov	eax, [edi]
lea	eax, [eax+edx*4]
mov	[eax], esi
inc	dword ptr [edi+4]
mov	eax, ebp
mov	ecx, ebx
call	sub_6032B0
mov	ebp, eax
mov	ecx, ebp
lea	esi, [esp+10h+arg_0]
mov	eax, ebx
call	sub_6032D0
mov	ecx, esi
call	sub_4D4F40
test	al, al
jnz	short loc_61E1E0

loc_61E244:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_61E1B0 endp

align 10h



sub_61E250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	ebp
mov	ebp, ecx
mov	[esp+0Ch+var_8], ebp
test	eax, eax
jz	loc_61E400
push	edi
push	eax
xor	eax, eax
mov	edi, ebp
call	sub_603480
mov	edi, eax
mov	[esp+10h+var_4], edi
test	edi, edi
jz	loc_61E3FF
push	ebx
add	ebp, 30h
push	esi
mov	ecx, ebp
call	sub_61EDE0
mov	esi, [esp+18h+arg_C]
mov	ebx, eax
cmp	ebx, 0FFFFFFFFh
jz	short loc_61E2E2

loc_61E296:
mov	eax, [ebp+0]
mov	edi, [eax+ebx*8]
push	esi
lea	ecx, [esp+1Ch+arg_0]
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_61E2C5
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61E2C5:
mov	edx, [esi+4]
mov	eax, [esi]
lea	eax, [eax+edx*4]
mov	[eax], edi
inc	dword ptr [esi+4]
mov	ecx, [ebp+0]
mov	ebx, [ecx+ebx*8+4]
cmp	ebx, 0FFFFFFFFh
jnz	short loc_61E296
mov	edi, [esp+18h+var_4]

loc_61E2E2:
cmp	[esp+18h+arg_8], 0
jz	loc_61E3A5
mov	ebx, [esp+18h+var_8]
add	ebx, 6Ch
mov	eax, edi
mov	ecx, ebx
call	sub_61EDE0
mov	edi, eax
mov	[esp+18h+arg_C], eax
cmp	edi, 0FFFFFFFFh
jz	loc_61E3A1
jmp	short loc_61E314
align 10h

loc_61E310:
mov	edi, [esp+18h+arg_C]

loc_61E314:
mov	edx, [ebx]
mov	ebp, [edx+edi*8]
mov	eax, [ebp+0]
mov	edx, [eax+14h]
mov	ecx, ebp
xor	ebx, ebx
call	edx
test	eax, eax
jle	short loc_61E386
lea	esp, [esp+0]

loc_61E330:
mov	eax, [ebp+0]
mov	edx, [eax+50h]
push	ebx
mov	ecx, ebp
call	edx
push	esi
lea	ecx, [esp+1Ch+arg_0]
mov	edi, eax
mov	byte ptr [esp+1Ch+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_61E366
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61E366:
mov	edx, [esi+4]
mov	eax, [esi]
lea	eax, [eax+edx*4]
mov	[eax], edi
inc	dword ptr [esi+4]
mov	edx, [ebp+0]
mov	eax, [edx+14h]
mov	ecx, ebp
inc	ebx
call	eax
cmp	ebx, eax
jl	short loc_61E330
mov	edi, [esp+18h+arg_C]

loc_61E386:
mov	ebx, [esp+18h+var_8]
mov	ecx, [ebx+6Ch]
mov	edi, [ecx+edi*8+4]
add	ebx, 6Ch
mov	[esp+18h+arg_C], edi
cmp	edi, 0FFFFFFFFh
jnz	loc_61E310

loc_61E3A1:
mov	edi, [esp+18h+var_4]

loc_61E3A5:
cmp	[esp+18h+arg_4], 0
jz	short loc_61E3FD
mov	ebp, [esp+18h+var_8]
add	ebp, 10h
mov	eax, edi
mov	ecx, ebp
call	sub_61EDE0
mov	ebx, eax
cmp	ebx, 0FFFFFFFFh
jz	short loc_61E3FD
mov	eax, [ebp+0]
jmp	short loc_61E3D0
align 10h

loc_61E3D0:
mov	eax, [eax+ebx*8]
mov	edx, [esp+18h+arg_8]
mov	ecx, [esp+18h+arg_4]
push	esi
push	edx
mov	edx, [eax]
push	ecx
mov	ecx, eax
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+24h+var_8]
push	eax
call	sub_61E250
mov	eax, [ebp+0]
mov	ebx, [eax+ebx*8+4]
cmp	ebx, 0FFFFFFFFh
jnz	short loc_61E3D0

loc_61E3FD:
pop	esi
pop	ebx

loc_61E3FF:
pop	edi

loc_61E400:
pop	ebp
add	esp, 8
retn	10h
sub_61E250 endp

align 10h



sub_61E410 proc	near

var_221= byte ptr -221h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= byte ptr -20Ch
var_200= byte ptr -200h
var_1F4= byte ptr -1F4h
arg_0= dword ptr  4

sub	esp, 228h
push	ebx
push	ebp
push	esi
mov	esi, [esp+234h+arg_0]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ebx, ecx
push	edi
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_61E440
push	eax
xor	eax, eax
mov	edi, ebx
call	sub_603480
mov	[esp+238h+var_210], eax
jmp	short loc_61E448

loc_61E440:
mov	[esp+238h+var_210], 0

loc_61E448:
lea	edi, [ebx+10h]
mov	eax, esi
mov	ecx, edi
call	sub_61EDE0
mov	esi, eax
cmp	esi, 0FFFFFFFFh
jz	short loc_61E476
mov	eax, [edi]
lea	ecx, [ecx+0]

loc_61E460:
mov	eax, [eax+esi*8]
push	eax
mov	ecx, ebx
call	sub_61E410
mov	eax, [edi]
mov	esi, [eax+esi*8+4]
cmp	esi, 0FFFFFFFFh
jnz	short loc_61E460

loc_61E476:
mov	eax, [esp+238h+var_210]
lea	ebp, [ebx+30h]
mov	ecx, ebp
call	sub_61EDE0
mov	esi, eax
cmp	esi, 0FFFFFFFFh
jz	loc_61E6A9
xor	eax, eax
mov	[esp+238h+var_220], eax
mov	[esp+238h+var_21C], eax
mov	[esp+238h+var_218], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [eax]
lea	edx, [ecx+800h]
mov	[eax], edx
mov	[esp+238h+var_220], ecx
mov	[esp+238h+var_218], 80000200h
mov	[esp+238h+var_214], ecx
jmp	short loc_61E4D0
align 10h

loc_61E4D0:
mov	eax, [ebp+0]
mov	edi, [eax+esi*8]
lea	ecx, [esp+238h+var_220]
push	ecx
lea	ecx, [esp+23Ch+var_221]
mov	[esp+23Ch+var_221], 0
call	sub_4A00D0
mov	edx, [esp+238h+var_218]
and	edx, 3FFFFFFFh
cmp	[esp+238h+var_21C], edx
jnz	short loc_61E509
push	4
lea	ecx, [esp+23Ch+var_220]
push	ecx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61E509:
mov	eax, [esp+238h+var_21C]
mov	edx, [esp+238h+var_220]
mov	[edx+eax*4], edi
inc	[esp+238h+var_21C]
mov	ecx, [ebp+0]
mov	esi, [ecx+esi*8+4]
cmp	esi, 0FFFFFFFFh
jnz	short loc_61E4D0
xor	esi, esi
cmp	[esp+238h+var_21C], esi
jle	loc_61E5FF

loc_61E530:
mov	eax, [esp+238h+var_220]
mov	edx, [ebx+2Ch]
cmp	edx, [eax+esi*4]
jnz	short loc_61E543
mov	dword ptr [ebx+2Ch], 0

loc_61E543:
mov	ecx, [eax+esi*4]
cmp	word ptr [ecx+6], 0
jle	loc_61E5EC
push	200h
lea	edx, [esp+23Ch+var_200]
push	edx
lea	ecx, [esp+240h+var_20C]
call	sub_128DD50
mov	eax, [esp+238h+var_220]
mov	ecx, [eax+esi*4]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+238h+var_220]
mov	edx, [ecx+esi*4]
movsx	ecx, word ptr [edx+6]
mov	edx, [eax]
push	offset aFromOutsideThe ; ") from outside the world and it will le"...
push	ecx
mov	ecx, eax
mov	eax, [edx+8]
push	offset aIsAboutToBeRem ; " is about to be removed and all referen"...
call	eax
push	eax
push	offset aTheObjectOfCla ; "The object of	class "
lea	ecx, [esp+240h+var_200]
call	sub_AD3930
mov	ecx, eax
call	sub_AD3930
mov	ecx, eax
call	sub_AD3930
mov	ecx, eax
call	sub_AD38E0
mov	ecx, eax
call	sub_AD3930
mov	ecx, dword_196AFBC
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	7B9h
push	offset a_DataDictHkdat ; ".\\Data\\Dict\\hkDataObjectDict.cpp"
lea	eax, [esp+234h+var_1F4]
push	eax
push	760D3794h
push	1
call	edx
lea	ecx, [esp+238h+var_20C]
call	sub_AD3A20
mov	eax, [esp+238h+var_220]

loc_61E5EC:
mov	edi, [eax+esi*4]
call	sub_61BCA0
inc	esi
cmp	esi, [esp+238h+var_21C]
jl	loc_61E530

loc_61E5FF:
xor	edi, edi
xor	esi, esi
cmp	[esp+238h+var_21C], edi
jle	short loc_61E62C
lea	esp, [esp+0]

loc_61E610:
mov	eax, [esp+238h+var_220]
mov	ecx, [eax+esi*4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61E625
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61E625:
inc	esi
cmp	esi, [esp+238h+var_21C]
jl	short loc_61E610

loc_61E62C:
mov	eax, [esp+238h+var_210]
push	ebp
call	sub_605FF0
mov	ecx, [esp+238h+var_214]
cmp	ecx, [esp+238h+var_220]
lea	ecx, [esp+238h+var_221]
setnz	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+238h+var_221]
call	sub_4D4F40
test	al, al
jnz	short loc_61E65F
mov	[esp+238h+var_21C], edi

loc_61E65F:
mov	esi, [esp+238h+var_214]
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esp+238h+var_220]
push	ecx
lea	ecx, [esp+23Ch+var_221]
mov	[eax], esi
mov	[esp+23Ch+var_221], 0
call	sub_4A00D0
mov	edx, [esp+238h+var_218]
mov	[esp+238h+var_21C], edi
test	edx, edx
js	short loc_61E6A9
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esp+23Ch+var_220]
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_61E6A9:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 228h
retn	4
sub_61E410 endp

align 10h



sub_61E6C0 proc	near

var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
mov	eax, [ebp+0]
mov	edx, [eax+8]
push	esi
mov	ebx, ecx
push	edi
mov	ecx, ebp
call	edx
mov	[esp+28h+var_14], eax
test	eax, eax
jz	short loc_61E6ED
push	eax
xor	eax, eax
mov	edi, ebx
call	sub_603480
mov	esi, eax
jmp	short loc_61E6EF

loc_61E6ED:
xor	esi, esi

loc_61E6EF:
push	ebp
mov	ecx, ebx
call	sub_61E410
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
xor	esi, esi
cmp	eax, esi
jz	short loc_61E713
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [ebx+10h]
call	sub_61EDA0

loc_61E713:
push	ebp
call	sub_61BAF0
mov	[esp+28h+var_10], esi
mov	[esp+28h+var_C], esi
mov	[esp+28h+var_8], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [eax]
lea	edx, [ecx+100h]
mov	[eax], edx
mov	[esp+28h+var_10], ecx
mov	[esp+28h+var_4], ecx
lea	edi, [ebx+10h]
mov	eax, ebp
mov	ecx, edi
mov	[esp+28h+var_8], 80000040h
call	sub_61EDE0
mov	esi, eax
cmp	esi, 0FFFFFFFFh
setnz	al
mov	[esp+28h+var_15], al
test	al, al
jz	short loc_61E7C6
cmp	esi, 0FFFFFFFFh
jz	short loc_61E7C6

loc_61E770:
mov	eax, [edi]
mov	ebp, [eax+esi*8]
lea	ecx, [esp+28h+var_10]
push	ecx
lea	ecx, [esp+2Ch+var_16]
mov	[esp+2Ch+var_16], 0
call	sub_4A00D0
mov	edx, [esp+28h+var_8]
and	edx, 3FFFFFFFh
cmp	[esp+28h+var_C], edx
jnz	short loc_61E7A8
push	4
lea	ecx, [esp+2Ch+var_10]
push	ecx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61E7A8:
mov	eax, [esp+28h+var_C]
mov	edx, [esp+28h+var_10]
mov	[edx+eax*4], ebp
inc	[esp+28h+var_C]
mov	ecx, [edi]
mov	esi, [ecx+esi*8+4]
cmp	esi, 0FFFFFFFFh
jnz	short loc_61E770
mov	ebp, [esp+28h+arg_0]

loc_61E7C6:
xor	esi, esi
cmp	[esp+28h+var_C], esi
jle	short loc_61E7FB
mov	edi, edi

loc_61E7D0:
mov	edx, [esp+28h+var_10]
mov	eax, [edx+esi*4]
push	eax
mov	ecx, ebx
call	sub_61E6C0
mov	ecx, [esp+28h+var_10]
mov	ecx, [ecx+esi*4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_61E7F4
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_61E7F4:
inc	esi
cmp	esi, [esp+28h+var_C]
jl	short loc_61E7D0

loc_61E7FB:
cmp	[esp+28h+var_15], 0
jz	short loc_61E80A
push	edi
mov	eax, ebp
call	sub_605FF0

loc_61E80A:
mov	ecx, [esp+28h+var_4]
cmp	ecx, [esp+28h+var_10]
lea	ecx, [esp+28h+arg_0]
setnz	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+28h+arg_0]
call	sub_4D4F40
test	al, al
jnz	short loc_61E837
mov	[esp+28h+var_C], 0

loc_61E837:
mov	esi, [esp+28h+var_4]
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esp+28h+var_10]
push	ecx
lea	ecx, [esp+2Ch+arg_0]
mov	[eax], esi
mov	byte ptr [esp+2Ch+arg_0], 0
call	sub_4A00D0
mov	edx, [esp+28h+var_8]
mov	[esp+28h+var_C], 0
test	edx, edx
js	short loc_61E885
mov	esi, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esp+2Ch+var_10]
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_61E885:
mov	esi, [esp+28h+var_14]
lea	edi, [ebx+5Ch]
push	esi
xor	eax, eax
call	sub_603480
mov	ebp, eax
mov	eax, esi
call	sub_6034F0
mov	ecx, ebp
call	sub_AD6020
mov	eax, esi
mov	edi, ebx
call	sub_6034F0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	4
sub_61E6C0 endp

align 10h



sub_61E8C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
test	esi, esi
jz	short loc_61E8FC
push	edi
lea	edi, [ebp+10h]
mov	ecx, edi
call	sub_61EDE0
cmp	eax, 0FFFFFFFFh
jz	short loc_61E8FB
mov	ecx, [edi]

loc_61E8E3:
cmp	[ecx+eax*8], ebx
jz	short loc_61E8F3
mov	eax, [ecx+eax*8+4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_61E8E3
jmp	short loc_61E8FB

loc_61E8F3:
push	esi
mov	esi, eax
call	sub_604A80

loc_61E8FB:
pop	edi

loc_61E8FC:
mov	eax, [ebx]
mov	edx, [eax+10h]
mov	ecx, ebx
call	edx
test	eax, eax
jz	short loc_61E917
lea	ecx, [esp+0Ch+arg_4]
push	ecx
push	eax
lea	eax, [ebp+10h]
call	sub_617AD0

loc_61E917:
pop	esi
pop	ebp
pop	ebx
retn	8
sub_61E8C0 endp

align 10h



sub_61E920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	edi
test	esi, esi
jz	short loc_61E93B
push	esi
xor	eax, eax
mov	edi, ebp
call	sub_603480
mov	[esp+0Ch+arg_0], eax
jmp	short loc_61E943

loc_61E93B:
mov	[esp+0Ch+arg_0], 0

loc_61E943:
mov	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [esp+10h+arg_4]
push	ecx
push	ebp
call	sub_61EA00
mov	ebx, [eax]
cmp	esi, ebx
jz	short loc_61E97F
lea	edi, [ebp+5Ch]
push	esi
xor	eax, eax
call	sub_603480
mov	[esp+0Ch+arg_4], eax
mov	eax, esi
call	sub_6034F0
mov	eax, [esp+0Ch+arg_4]
push	eax
push	ebx
mov	ecx, edi
mov	[eax+8], ebx
call	sub_6032F0

loc_61E97F:
mov	eax, esi
mov	edi, ebp
call	sub_6034F0
mov	edx, [esp+0Ch+arg_0]
push	edx
push	ebx
mov	ecx, ebp
call	sub_6032F0
pop	edi
pop	ebp
pop	ebx
retn	8
sub_61E920 endp

align 10h



sub_61E9A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	eax, [ebp+0]
mov	edx, [eax+8]
push	esi
push	edi
mov	ecx, ebp
call	edx
mov	edi, [esp+10h+arg_0]
add	edi, 30h
mov	ecx, edi
mov	ebx, eax
call	sub_61EDE0
mov	esi, eax
test	ebx, ebx
jz	short loc_61E9F7

loc_61E9C8:
cmp	esi, 0FFFFFFFFh
jz	short loc_61E9F7
mov	eax, [edi]
cmp	ebp, [eax+esi*8]
jnz	short loc_61E9ED
push	ebx
call	sub_604A80
mov	edx, [esp+10h+arg_8]
lea	ecx, [esp+10h+arg_4]
push	ecx
push	edx
mov	eax, edi
call	sub_617AD0
xor	ebx, ebx

loc_61E9ED:
mov	eax, [edi]
mov	esi, [eax+esi*8+4]
test	ebx, ebx
jnz	short loc_61E9C8

loc_61E9F7:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_61E9A0 endp

align 10h



sub_61EA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
mov	ebp, [esp+4+arg_8]
test	ebp, ebp
jz	short loc_61EA42
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
push	edi
add	ebx, 4Ch
push	ebp
xor	eax, eax
mov	edi, ebx
call	sub_603480
mov	esi, eax
test	esi, esi
jnz	short loc_61EA35
mov	edi, ebp
call	sub_AD3300
mov	esi, eax
push	esi
push	esi
mov	ecx, ebx
call	sub_6032F0

loc_61EA35:
mov	eax, [esp+10h+arg_4]
pop	edi
mov	[eax], esi
pop	esi
pop	ebx
pop	ebp
retn	0Ch

loc_61EA42:
mov	eax, [esp+4+arg_4]
mov	dword ptr [eax], 0
pop	ebp
retn	0Ch
sub_61EA00 endp




sub_61EA50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
mov	ecx, offset off_17F15C0
mov	dword ptr [ebp+0], 0
call	sub_AD60E0
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_61EA77
call	sub_AD6020

loc_61EA77:
mov	dword ptr [ebp+0], offset off_17F15C0
test	ebx, ebx
jz	short loc_61EB00
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
add	edi, 5Ch
push	ebx
xor	eax, eax
call	sub_603480
mov	esi, eax
test	esi, esi
jnz	short loc_61EAE8
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	0Ch
call	eax
push	ebx
mov	esi, eax
mov	eax, [esp+14h+arg_0]
lea	edx, [esp+14h+arg_8]
push	edx
mov	ecx, 0Ch
push	eax
mov	[esi+4], cx
call	sub_61EA00
mov	ecx, 1
mov	[esi+6], cx
mov	dword ptr [esi], offset	off_15F85D0
mov	eax, [eax]
push	esi
push	eax
mov	ecx, edi
mov	[esi+8], eax
call	sub_6032F0

loc_61EAE8:
mov	ecx, esi
call	sub_AD60E0
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_61EAFB
call	sub_AD6020

loc_61EAFB:
pop	edi
mov	[ebp+0], esi
pop	esi

loc_61EB00:
mov	eax, ebp
pop	ebp
pop	ebx
retn	0Ch
sub_61EA50 endp

align 10h



sub_61EB10 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_A55930
test	[esp+4+arg_0], 1
jz	short loc_61EB3A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61EB3A:
mov	eax, edi
pop	edi
retn	4
sub_61EB10 endp




sub_61EB40 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
lea	esi, [ecx+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	edx, [esp+8+arg_0]
and	ecx, 3FFFFFFFh
cmp	ecx, edx
jge	short loc_61EB7A
add	ecx, ecx
cmp	edx, ecx
jl	short loc_61EB6D
mov	ecx, edx

loc_61EB6D:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61EB7A:
pop	esi
pop	ecx
retn	4
sub_61EB40 endp

align 10h



sub_61EB80 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
lea	esi, [ecx+0Ch]
push	edi
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	edi, [esp+0Ch+arg_0]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_61EBBB
add	ecx, ecx
cmp	edi, ecx
jl	short loc_61EBAE
mov	ecx, edi

loc_61EBAE:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61EBBB:
mov	edx, [esi+4]
mov	ecx, [esi]
mov	eax, edi
sub	eax, edx
add	ecx, edx
test	eax, eax
jle	short loc_61EBD6
push	eax		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch

loc_61EBD6:
mov	[esi+4], edi
pop	edi
pop	esi
pop	ecx
retn	4
sub_61EB80 endp

align 10h



sub_61EBE0 proc	near
mov	eax, 2
retn
sub_61EBE0 endp

align 10h



sub_61EBF0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
lea	esi, [ecx+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	edx, [esp+8+arg_0]
and	ecx, 3FFFFFFFh
cmp	ecx, edx
jge	short loc_61EC2A
add	ecx, ecx
cmp	edx, ecx
jl	short loc_61EC1D
mov	ecx, edx

loc_61EC1D:
push	8
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61EC2A:
pop	esi
pop	ecx
retn	4
sub_61EBF0 endp

align 10h



sub_61EC30 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
lea	ebp, [ecx+0Ch]
push	esi
push	ebp
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	ecx, [ebp+8]
mov	ebx, [esp+10h+arg_0]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61EC6C
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61EC5F
mov	ecx, ebx

loc_61EC5F:
push	8
push	ecx
push	ebp
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61EC6C:
mov	ecx, [ebp+4]
mov	edx, [ebp+0]
mov	eax, ebx
sub	eax, ecx
lea	esi, [edx+ecx*8]
test	eax, eax
jle	short loc_61EC9B
push	edi
lea	ecx, ds:0FFFFFFFBh[eax*8]
shr	ecx, 2
lea	edi, [esi+8]
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
rep movsd
pop	edi

loc_61EC9B:
pop	esi
mov	[ebp+4], ebx
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_61EC30 endp

align 10h



sub_61ECB0 proc	near
mov	dword ptr [ecx+10h], 0
retn
sub_61ECB0 endp

align 10h



sub_61ECC0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
lea	esi, [ecx+0Ch]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	edx, [esp+8+arg_0]
and	ecx, 3FFFFFFFh
cmp	ecx, edx
jge	short loc_61ECFA
add	ecx, ecx
cmp	edx, ecx
jl	short loc_61ECED
mov	ecx, edx

loc_61ECED:
push	4
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61ECFA:
pop	esi
pop	ecx
retn	4
sub_61ECC0 endp

align 10h



sub_61ED00 proc	near
mov	eax, [ecx+10h]
retn
sub_61ED00 endp

align 10h



sub_61ED10 proc	near
xor	eax, eax
retn
sub_61ED10 endp

align 10h



sub_61ED20 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
lea	esi, [ecx+0Ch]
push	edi
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
mov	ebx, [esp+10h+arg_0]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61ED5C
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61ED4F
mov	ecx, ebx

loc_61ED4F:
push	4
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61ED5C:
mov	eax, [esi+4]
mov	edx, [esi]
mov	ecx, ebx
sub	ecx, eax
lea	edi, [edx+eax*4]
test	ecx, ecx
jle	short loc_61ED70
xor	eax, eax
rep stosd

loc_61ED70:
pop	edi
mov	[esi+4], ebx
pop	esi
pop	ebx
pop	ecx
retn	4
sub_61ED20 endp

align 10h



sub_61ED80 proc	near
lea	ecx, [esi+0Ch]
mov	dword ptr [esi+4], 0
call	sub_4DDE60
mov	dword ptr [esi+18h], 0FFFFFFFFh
retn
sub_61ED80 endp

align 10h



sub_61EDA0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, eax
mov	edi, ecx
call	sub_61EDE0
cmp	eax, 0FFFFFFFFh
jz	short loc_61EDD3
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	ecx, [edi]

loc_61EDB8:
cmp	[ecx+eax*8], edx
jz	short loc_61EDCB
mov	eax, [ecx+eax*8+4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_61EDB8
pop	edi
pop	esi
retn	4

loc_61EDCB:
push	esi
mov	esi, eax
call	sub_604A80

loc_61EDD3:
pop	edi
pop	esi
retn	4
sub_61EDA0 endp

align 10h



sub_61EDE0 proc	near
push	0FFFFFFFFh
push	eax
add	ecx, 0Ch
call	sub_4DDD80
retn
sub_61EDE0 endp

align 10h



sub_61EDF0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
mov	eax, [esi+18h]
cmp	eax, 0FFFFFFFFh
jz	short loc_61EE04
mov	ecx, [esi]
mov	edx, [ecx+eax*8+4]
mov	[esi+18h], edx
pop	ecx
retn

loc_61EE04:
push	edi
mov	edi, [esi+4]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_61EE31
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61EE31:
inc	dword ptr [esi+4]
mov	eax, edi
pop	edi
pop	ecx
retn
sub_61EDF0 endp

align 10h



sub_61EE40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [eax+24h]
mov	eax, [esp+arg_4]
mov	edx, [ecx]
mov	edx, [edx+4]
push	100h
push	eax
mov	eax, [esp+8+arg_0]
push	eax
call	edx
retn	8
sub_61EE40 endp

align 10h



sub_61EE60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_604A30
test	[esp+4+arg_0], 1
jz	short loc_61EE8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61EE8A:
mov	eax, edi
pop	edi
retn	4
sub_61EE60 endp




sub_61EE90 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	esi
mov	esi, eax
add	esi, 0Ch
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_61EEC0
push	10h
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61EEC0:
mov	eax, [esi+4]
mov	edx, [esp+8+arg_0]
mov	ecx, [esp+8+arg_4]
shl	eax, 4
add	eax, [esi]
mov	[eax], edx
mov	edx, [esp+8+arg_8]
mov	[eax+4], ecx
mov	ecx, [esp+8+arg_C]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
inc	dword ptr [esi+4]
pop	esi
pop	ecx
retn	10h
sub_61EE90 endp

align 10h



sub_61EEF0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, eax
add	esi, 18h
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_61EF20
push	8
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61EF20:
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [esp+8+arg_0]
lea	eax, [eax+edx*8]
mov	edx, [esp+8+arg_4]
mov	[eax], ecx
mov	[eax+4], edx
inc	dword ptr [esi+4]
pop	esi
pop	ecx
retn	8
sub_61EEF0 endp

align 10h



sub_61EF40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F8F60
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_61EF70
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61EF70:
mov	eax, esi
pop	esi
retn	4
sub_61EF40 endp

align 10h



sub_61EF80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A54250
test	[esp+4+arg_0], 1
jz	short loc_61EFAA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61EFAA:
mov	eax, esi
pop	esi
retn	4
sub_61EF80 endp




sub_61EFB0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_12792C0
test	[esp+4+arg_0], 1
jz	short loc_61EFDA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_61EFDA:
mov	eax, edi
pop	edi
retn	4
sub_61EFB0 endp




sub_61EFE0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
lea	edx, [eax+4]
mov	[ecx], edx
mov	ecx, [esp+arg_0]
mov	eax, [eax+ecx]
retn
sub_61EFE0 endp

align 10h



sub_61EFF0 proc	near
mov	eax, 1
push	ecx
lea	ecx, [esi+0Ch]
mov	[esi+6], ax
mov	dword ptr [esi+8], 2
mov	dword ptr [esi], offset	off_15F90FC
call	sub_AD3F20
mov	eax, esi
retn
sub_61EFF0 endp

align 10h



sub_61F020 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_61F0A0
test	[esp+4+arg_0], 1
jz	short loc_61F04B
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61F04B:
mov	eax, esi
pop	esi
retn	4
sub_61F020 endp

align 10h



sub_61F060 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0Ch]
call	sub_AD3ED0
mov	ecx, esi
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_61F094
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61F094:
mov	eax, esi
pop	esi
retn	4
sub_61F060 endp

align 10h



sub_61F0A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
push	edi
lea	esi, [ebx+10h]
push	esi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	edi, [esi]
mov	ecx, eax
mov	eax, [esi+4]
mov	[esp+10h+var_4], ecx
test	eax, eax
jle	short loc_61F0EC
push	ebp
mov	ebp, eax
lea	esp, [esp+0]

loc_61F0D0:
lea	ecx, [edi+4]
call	sub_AD3ED0
mov	ecx, edi
call	sub_AD3ED0
add	edi, 8
sub	ebp, 1
jnz	short loc_61F0D0
mov	ecx, [esp+14h+var_4]
pop	ebp

loc_61F0EC:
mov	eax, [esi+8]
mov	dword ptr [esi+4], 0
test	eax, eax
js	short loc_61F110
mov	edx, [ecx]
mov	edx, [edx+10h]
and	eax, 3FFFFFFFh
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esi]
push	eax
call	edx

loc_61F110:
lea	ecx, [ebx+0Ch]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_AD3ED0
mov	ecx, ebx
call	sub_4DA650
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_61F0A0 endp

align 10h



sub_61F140 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
mov	ebx, [esi+4]
push	edi
lea	edx, [ebx+ecx]
lea	edi, [edx+eax-1]
dec	eax
not	eax
push	esi
lea	ecx, [esp+14h+arg_0]
and	edi, eax
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_61F18B
add	ecx, ecx
cmp	edi, ecx
jl	short loc_61F17E
mov	ecx, edi

loc_61F17E:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61F18B:
mov	edx, [esi+4]
mov	ecx, [esi]
mov	eax, edi
sub	eax, edx
add	ecx, edx
test	eax, eax
jle	short loc_61F1A6
push	eax		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch

loc_61F1A6:
mov	[esi+4], edi
mov	eax, [ebp+0]
pop	edi
pop	esi
mov	[eax+4], ebx
pop	ebp
mov	eax, ebx
pop	ebx
retn	4
sub_61F140 endp

align 10h



sub_61F1C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A50950
test	[esp+4+arg_0], 1
jz	short loc_61F1EA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61F1EA:
mov	eax, esi
pop	esi
retn	4
sub_61F1C0 endp




sub_61F1F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F9360
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_61F220
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61F220:
mov	eax, esi
pop	esi
retn	4
sub_61F1F0 endp

align 10h



sub_61F230 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F931C
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_61F260
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61F260:
mov	eax, esi
pop	esi
retn	4
sub_61F230 endp

align 10h



sub_61F270 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A503C0
test	[esp+4+arg_0], 1
jz	short loc_61F29A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61F29A:
mov	eax, esi
pop	esi
retn	4
sub_61F270 endp




sub_61F2A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A50020
test	[esp+4+arg_0], 1
jz	short loc_61F2CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_61F2CA:
mov	eax, esi
pop	esi
retn	4
sub_61F2A0 endp




sub_61F2D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
push	ecx
mov	ecx, esp
xor	ebx, ebx
push	ebx
mov	esi, eax
call	sub_4D4F20
mov	ecx, [esp+14h+arg_0]
call	sub_A2F000
mov	eax, [esp+10h+arg_4]
mov	[esi+10h], eax
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
lea	ebp, [esi+18h]
mov	eax, 80000000h
mov	[ebp+8], eax
lea	edi, [esi+24h]
mov	[edi], ebx
mov	[edi+4], ebx
mov	[edi+8], eax
push	ebp
lea	ecx, [esp+14h+arg_0]
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], eax
mov	byte ptr [esp+14h+arg_0], bl
call	sub_4A00D0
mov	ecx, [ebp+8]
and	ecx, 3FFFFFFFh
cmp	[ebp+4], ecx
jnz	short loc_61F341
push	4
push	ebp
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61F341:
mov	edx, [ebp+4]
mov	eax, [ebp+0]
lea	eax, [eax+edx*4]
mov	[eax], ebx
inc	dword ptr [ebp+4]
push	edi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], bl
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	[edi+4], ecx
jnz	short loc_61F377
push	4
push	edi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61F377:
mov	edx, [edi+4]
mov	eax, [edi]
lea	eax, [eax+edx*4]
mov	dword ptr [eax], offset	byte_146D660
mov	ebp, 1
add	[edi+4], ebp
push	edi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], bl
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	[edi+4], ecx
jnz	short loc_61F3B5
push	4
push	edi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61F3B5:
mov	edx, [edi+4]
mov	eax, [edi]
lea	eax, [eax+edx*4]
mov	[eax], ebx
add	[edi+4], ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_61F2D0 endp

align 10h



sub_61F3D0 proc	near

var_5= byte ptr	-5

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, eax
mov	ecx, [esi+14h]
xor	ebx, ebx
push	edi
cmp	ecx, ebx
jz	short loc_61F3EA
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_61F3EA:
mov	edi, 2
cmp	[esi+28h], edi
jle	short loc_61F416

loc_61F3F4:
mov	eax, [esi+24h]
mov	ebp, [eax+edi*4]
call	sub_AD5DD0
push	ebp
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
push	eax
call	sub_AD5D00
inc	edi
add	esp, 8
cmp	edi, [esi+28h]
jl	short loc_61F3F4

loc_61F416:
lea	edi, [esi+30h]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	ebp, 80000000h
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_61F44D
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_61F44D:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+24h]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_61F484
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_61F484:
mov	[edi], ebx
mov	[edi+8], ebp
lea	edi, [esi+18h]
push	edi
lea	ecx, [esp+1Ch+var_5]
mov	[esp+1Ch+var_5], bl
call	sub_4A00D0
mov	edx, [edi+8]
mov	[edi+4], ebx
test	ebp, edx
jnz	short loc_61F4BB
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [edi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_61F4BB:
mov	[edi], ebx
mov	[edi+8], ebp
call	sub_A2EFE0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_61F3D0 endp

align 10h



sub_61F4D0 proc	near

arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
push	edi
push	ebx
call	sub_620790
mov	esi, eax
test	esi, esi
jle	short loc_61F54E
call	sub_AD5DD0
lea	ecx, [esi+1]
push	ecx
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
push	eax
call	sub_AD5D30
add	esp, 8
mov	edi, eax
push	esi
push	edi
mov	eax, ebx
call	sub_A2EED0
mov	byte ptr [edi+esi], 0
lea	esi, [ebx+24h]
push	esi
lea	ecx, [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], 0
call	sub_4A00D0
mov	edx, [esi+8]
and	edx, 3FFFFFFFh
cmp	[esi+4], edx
jnz	short loc_61F538
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_61F538:
mov	eax, [esi+4]
mov	ecx, [esi]
lea	eax, [ecx+eax*4]
mov	[eax], edi
inc	dword ptr [esi+4]
mov	eax, edi
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4

loc_61F54E:
mov	eax, [ebx+24h]
lea	edx, ds:0[esi*4]
pop	edi
sub	eax, edx
mov	eax, [eax]
pop	esi
pop	ebx
pop	ecx
retn	4
sub_61F4D0 endp

align 10h



sub_61F570 proc	near

var_4= dword ptr -4

push	ecx
push	edi
push	4
push	eax
mov	eax, 1
lea	edi, [esp+10h+var_4]
call	sub_A2EEF0
fld	[esp+8+var_4]
pop	edi
pop	ecx
retn
sub_61F570 endp

align 10h



sub_61F590 proc	near

var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 40h
push	ebx
mov	ebx, [esp+44h+arg_4]
push	ebp
push	edi
lea	edi, [ebx+7]
and	edi, 0FFFFFFF8h
mov	eax, edi
cdq
and	edx, 7
add	eax, edx
mov	ebp, eax
push	esi
lea	ecx, [esp+50h+arg_4]
sar	ebp, 3
mov	byte ptr [esp+50h+arg_4], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_61F5DE
add	ecx, ecx
cmp	edi, ecx
jl	short loc_61F5D1
mov	ecx, edi

loc_61F5D1:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61F5DE:
mov	eax, [esp+4Ch+arg_0]
push	1
mov	[esi+4], edi
push	eax
mov	eax, ebp
lea	edi, [esp+54h+var_40]
call	sub_A2EEF0
xor	ecx, ecx
test	ebp, ebp
jle	short loc_61F66C
lea	esp, [esp+0]

loc_61F600:
movzx	eax, [esp+ecx+4Ch+var_40]
mov	edi, [esi]
mov	dl, al
and	dl, 1
mov	[edi+ecx*8], dl
mov	edi, [esi]
shr	eax, 1
mov	dl, al
and	dl, 1
mov	[edi+ecx*8+1], dl
mov	edi, [esi]
shr	eax, 1
mov	dl, al
and	dl, 1
mov	[edi+ecx*8+2], dl
mov	edi, [esi]
shr	eax, 1
mov	dl, al
and	dl, 1
mov	[edi+ecx*8+3], dl
mov	edi, [esi]
shr	eax, 1
mov	dl, al
and	dl, 1
mov	[edi+ecx*8+4], dl
mov	edi, [esi]
shr	eax, 1
mov	dl, al
and	dl, 1
mov	[edi+ecx*8+5], dl
mov	edi, [esi]
shr	eax, 1
mov	dl, al
and	dl, 1
mov	[edi+ecx*8+6], dl
mov	edx, [esi]
shr	eax, 1
and	al, 1
mov	[edx+ecx*8+7], al
inc	ecx
cmp	ecx, ebp
jl	short loc_61F600

loc_61F66C:
push	esi
lea	ecx, [esp+50h+arg_4]
mov	byte ptr [esp+50h+arg_4], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, ebx
jge	short loc_61F69D
add	ecx, ecx
cmp	ebx, ecx
jl	short loc_61F690
mov	ecx, ebx

loc_61F690:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61F69D:
pop	edi
pop	ebp
mov	[esi+4], ebx
pop	ebx
add	esp, 40h
retn	8
sub_61F590 endp

align 10h



sub_61F6B0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_74=	byte ptr -74h
var_6C=	byte ptr -6Ch
var_64=	byte ptr -64h
var_5C=	byte ptr -5Ch
var_54=	byte ptr -54h
var_4C=	byte ptr -4Ch
var_44=	dword ptr -44h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0B4h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+0C4h+arg_0]
mov	ebx, ecx
mov	eax, edi
mov	[esp+0C4h+var_7C], ebx
call	sub_A56D30
dec	eax
cmp	eax, 9		; switch 10 cases
ja	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4
jmp	ds:off_61FD88[eax*4] ; switch jump

loc_61F6DF:		; jumptable 0061F6D8 case 0
mov	esi, [esp+0C4h+arg_4]
lea	eax, [esp+0C4h+var_AC]
xor	ebp, ebp
push	eax
lea	ecx, [esp+0C8h+var_B0+3]
mov	edi, esi
mov	[esp+0C8h+var_AC], ebp
mov	[esp+0C8h+var_A8], ebp
mov	[esp+0C8h+var_A4], 80000000h
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4D5020
cmp	esi, ebp
jz	loc_61F7E1
mov	edx, [eax]
mov	edx, [edx+0Ch]
lea	ecx, [esp+0C4h+var_9C]
push	ecx
mov	ecx, eax
mov	[esp+0C8h+var_9C], esi
call	edx
mov	ecx, [esp+0C4h+var_9C]
mov	edi, ecx
cmp	ecx, ebp
jnz	short loc_61F736

loc_61F731:
mov	ecx, 80000000h

loc_61F736:
mov	[esp+0C4h+var_AC], eax
lea	eax, [esp+0C4h+var_AC]
mov	[esp+0C4h+var_A4], ecx
push	eax
lea	ecx, [esp+0C8h+var_B0+3]
mov	[esp+0C8h+var_A8], edi
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4D5020
mov	ecx, [esp+0C4h+var_A4]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_61F77C
add	ecx, ecx
cmp	esi, ecx
jl	short loc_61F76B
mov	ecx, esi

loc_61F76B:
push	1
push	ecx
lea	ecx, [esp+0CCh+var_AC]
push	ecx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61F77C:
mov	edi, [esp+0C4h+var_AC]
push	1
push	ebx
mov	eax, esi
call	sub_A2EEF0
mov	edx, [esp+0C4h+var_AC]
mov	eax, [esp+0C4h+arg_0]
push	esi
push	edx
call	sub_A56C80
lea	eax, [esp+0C4h+var_AC]
push	eax
lea	ecx, [esp+0C8h+var_B0+3]
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4D5020
mov	edx, [esp+0C4h+var_A4]
mov	[esp+0C4h+var_A8], ebp
test	edx, edx
js	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4
mov	ecx, [esp+0C4h+var_AC]
mov	esi, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8

loc_61F7E1:
xor	eax, eax
jmp	loc_61F731

loc_61F7E8:		; jumptable 0061F6D8 case 1
xor	ebp, ebp
cmp	[esp+0C4h+arg_4], ebp
jle	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4

loc_61F7F7:
push	ebx
call	sub_620790
mov	esi, eax
push	ebp
lea	eax, [esp+0C8h+var_74]
mov	ecx, edi
call	sub_A570E0
call	sub_A56CA0
inc	ebp
cmp	ebp, [esp+0C4h+arg_4]
jl	short loc_61F7F7
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8

loc_61F827:		; jumptable 0061F6D8 case 2
mov	esi, [esp+0C4h+arg_4]
lea	eax, [esp+0C4h+var_AC]
xor	ebp, ebp
push	eax
lea	ecx, [esp+0C8h+var_B0+3]
mov	edi, esi
mov	[esp+0C8h+var_AC], ebp
mov	[esp+0C8h+var_A8], ebp
mov	[esp+0C8h+var_A4], 80000000h
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4D5020
cmp	esi, ebp
jz	loc_61F943
mov	edx, [eax]
mov	edx, [edx+0Ch]
lea	ecx, ds:0[esi*4]
mov	[esp+0C4h+var_9C], ecx
lea	ecx, [esp+0C4h+var_9C]
push	ecx
mov	ecx, eax
call	edx
mov	ecx, eax
mov	eax, [esp+0C4h+var_9C]
cdq
and	edx, 3
add	eax, edx
mov	edi, eax
sar	edi, 2
mov	eax, edi
cmp	edi, ebp
jnz	short loc_61F892

loc_61F88D:
mov	eax, 80000000h

loc_61F892:
mov	[esp+0C4h+var_A4], eax
lea	eax, [esp+0C4h+var_AC]
mov	[esp+0C4h+var_AC], ecx
push	eax
lea	ecx, [esp+0C8h+var_B0+3]
mov	[esp+0C8h+var_A8], edi
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4D5020
mov	ecx, [esp+0C4h+var_A4]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_61F8D8
add	ecx, ecx
cmp	esi, ecx
jl	short loc_61F8C7
mov	ecx, esi

loc_61F8C7:
push	4
push	ecx
lea	ecx, [esp+0CCh+var_AC]
push	ecx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_61F8D8:
mov	edi, [esp+0C4h+var_AC]
push	4
push	ebx
mov	eax, esi
mov	[esp+0CCh+var_A8], esi
call	sub_A2EEF0
mov	edx, [esp+0C4h+var_A8]
mov	eax, [esp+0C4h+var_AC]
push	edx
push	eax
mov	eax, [esp+0CCh+arg_0]
call	sub_A56C70
lea	ecx, [esp+0C4h+var_AC]
push	ecx
lea	ecx, [esp+0C8h+var_B0+3]
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4D5020
mov	edx, [esp+0C4h+var_A4]
mov	[esp+0C4h+var_A8], ebp
test	edx, edx
js	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esp+0C8h+var_AC]
push	edx
mov	ecx, eax
call	sub_4E2290
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8

loc_61F943:
xor	ecx, ecx
jmp	loc_61F88D

loc_61F94A:		; jumptable 0061F6D8 case 3
push	ebx
call	sub_620790
fldz
fst	[esp+0C4h+var_90]
xor	ebp, ebp
cmp	[esp+0C4h+arg_4], ebp
fst	[esp+0C4h+var_8C]
fst	[esp+0C4h+var_88]
mov	[esp+0C4h+var_94], eax
fstp	[esp+0C4h+var_84]
jle	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4

loc_61F975:
mov	eax, [esp+0C4h+var_94]
push	4
push	ebx
lea	edi, [esp+0CCh+var_90]
call	sub_A2EEF0
mov	ecx, [esp+0C4h+arg_0]
push	ebp
lea	eax, [esp+0C8h+var_64]
call	sub_A570E0
mov	esi, edi
call	sub_A56CB0
inc	ebp
cmp	ebp, [esp+0C4h+arg_4]
jl	short loc_61F975
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8

loc_61F9B4:		; jumptable 0061F6D8 cases 5,6
mov	eax, edi
call	sub_A56D30
cmp	[esp+0C4h+arg_4], 0
lea	ebp, ds:0FFFFFFF4h[eax*4]
mov	[esp+0C4h+var_98], 0
jle	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4

loc_61F9D8:
xor	esi, esi
test	ebp, ebp
jle	short loc_61FA08
mov	edi, edi

loc_61F9E0:
push	4
push	ebx
mov	eax, 1
lea	edi, [esp+0CCh+var_94]
call	sub_A2EEF0
fld	[esp+0C4h+var_94]
fstp	[esp+esi*4+0C4h+var_44]
inc	esi
cmp	esi, ebp
jl	short loc_61F9E0
mov	edi, [esp+0C4h+arg_0]

loc_61FA08:
mov	eax, [esp+0C4h+var_98]
push	eax
lea	eax, [esp+0C8h+var_54]
mov	ecx, edi
call	sub_A570E0
lea	esi, [esp+0C4h+var_44]
call	sub_A56CB0
mov	eax, [esp+0C4h+var_98]
inc	eax
cmp	eax, [esp+0C4h+arg_4]
mov	[esp+0C4h+var_98], eax
jl	short loc_61F9D8
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8

loc_61FA43:		; jumptable 0061F6D8 case 7
mov	ebp, [esp+0C4h+arg_4]
xor	esi, esi
test	ebp, ebp
jle	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4

loc_61FA54:
push	0FFFFFFFFh
lea	ecx, [esp+0C8h+var_78]
push	ecx
mov	ecx, ebx
call	sub_61FFE0
push	eax
push	esi
lea	eax, [esp+0CCh+var_4C]
mov	ecx, edi
call	sub_A570E0
call	sub_A57090
lea	eax, [esp+0C4h+var_78]
call	sub_A572E0
inc	esi
cmp	esi, ebp
jl	short loc_61FA54
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8

loc_61FA92:		; jumptable 0061F6D8 case 9
xor	ebp, ebp
cmp	[esp+0C4h+arg_4], ebp
jle	loc_61FD7B	; default
			; jumptable 0061F6D8 case 4

loc_61FAA1:
push	ebx
call	sub_61F4D0
mov	esi, eax
push	ebp
lea	eax, [esp+0C8h+var_5C]
mov	ecx, edi
call	sub_A570E0
call	sub_A56C90
inc	ebp
cmp	ebp, [esp+0C4h+arg_4]
jl	short loc_61FAA1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8

loc_61FAD1:		; jumptable 0061F6D8 case 8
mov	edx, [esp+0C4h+arg_4]
push	edx
mov	eax, edi
call	sub_A56D60
lea	esi, [esp+0C4h+var_9C]
mov	eax, edi
call	sub_A570B0
mov	eax, esi
call	sub_A57000
xor	ebp, ebp
mov	edi, eax
mov	[esp+0C4h+var_90], ebp
mov	[esp+0C4h+var_8C], ebp
mov	[esp+0C4h+var_88], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [eax]
lea	edx, [ecx+80h]
mov	[eax], edx
push	edi
push	ebx
lea	esi, [esp+0CCh+var_90]
mov	[esp+0CCh+var_90], ecx
mov	[esp+0CCh+var_88], 80000080h
mov	[esp+0CCh+var_84], ecx
call	sub_61F590
mov	[esp+0C4h+var_AC], ebp
mov	[esp+0C4h+var_A8], ebp
mov	[esp+0C4h+var_A4], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [eax]
lea	edx, [edi+edi*4]
lea	edx, ds:7Fh[edx*4]
and	edx, 0FFFFFF80h
add	edx, ecx
mov	[eax], edx
mov	edx, [esp+0C4h+var_A8]
mov	eax, edi
or	eax, 80000000h
mov	[esp+0C4h+var_A4], eax
mov	eax, edi
sub	eax, edx
cmp	eax, ebp
lea	edx, [edx+edx*4]
mov	[esp+0C4h+var_AC], ecx
mov	[esp+0C4h+var_A0], ecx
lea	ecx, [ecx+edx*4]
jle	short loc_61FBB5
mov	esi, ecx
mov	ebx, eax
nop

loc_61FB90:		; void *
push	esi
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
cmp	eax, ebp
jz	short loc_61FBAD
mov	[eax], ebp
mov	[eax+4], ebp
mov	[eax+8], ebp
mov	[eax+0Ch], ebp
mov	[eax+10h], ebp

loc_61FBAD:
add	esi, 14h
sub	ebx, 1
jnz	short loc_61FB90

loc_61FBB5:
lea	eax, [esp+0C4h+var_AC]
push	eax
lea	ecx, [esp+0C8h+var_9C]
push	ecx
mov	[esp+0CCh+var_A8], edi
call	sub_A57210
xor	eax, eax
cmp	edi, ebp
mov	[esp+0C4h+var_94], eax
jle	loc_61FC8A
mov	[esp+0C4h+var_9C], ebp
lea	ebx, [ebx+0]

loc_61FBE0:
mov	edx, [esp+0C4h+var_AC]
mov	ecx, [esp+0C4h+var_9C]
lea	ebx, [edx+ecx]
mov	edx, [esp+0C4h+var_90]
cmp	byte ptr [edx+eax], 0
jz	loc_61FC78
mov	eax, [ebx]
push	eax
mov	eax, [esp+0C8h+arg_0]
lea	esi, [esp+0C8h+var_98]
call	sub_A574D0
cmp	[ebx+10h], ebp
jnz	short loc_61FC27
mov	ecx, [esp+0C4h+arg_4]
push	ecx
mov	ecx, [esp+0C8h+var_7C]
mov	edx, esi
push	edx
call	sub_61F6B0
jmp	short loc_61FC6B

loc_61FC27:
cmp	[esp+0C4h+arg_4], 0
jle	short loc_61FC69

loc_61FC31:
push	ebp
lea	eax, [esp+0C8h+var_6C]
lea	ecx, [esp+0C8h+var_98]
call	sub_A570E0
lea	esi, [esp+0C4h+var_80]
call	sub_A574F0
mov	eax, [ebx+10h]
push	eax
mov	ecx, esi
push	ecx
mov	ecx, [esp+0CCh+var_7C]
call	sub_61F6B0
mov	eax, esi
call	sub_A57280
inc	ebp
cmp	ebp, [esp+0C4h+arg_4]
jl	short loc_61FC31

loc_61FC69:
xor	ebp, ebp

loc_61FC6B:
lea	eax, [esp+0C4h+var_98]
call	sub_A57280
mov	eax, [esp+0C4h+var_94]

loc_61FC78:
add	[esp+0C4h+var_9C], 14h
inc	eax
cmp	eax, edi
mov	[esp+0C4h+var_94], eax
jl	loc_61FBE0

loc_61FC8A:
mov	edx, [esp+0C4h+var_AC]
cmp	[esp+0C4h+var_A0], edx
setnz	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+0C8h+var_B0+3]
call	sub_4D4F20
lea	ecx, [esp+0C4h+var_B0+3]
call	sub_4D4F40
test	al, al
jnz	short loc_61FCB3
mov	[esp+0C4h+var_A8], ebp

loc_61FCB3:
mov	esi, [esp+0C4h+var_A0]
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	edx, [esp+0C4h+var_AC]
push	edx
lea	ecx, [esp+0C8h+var_B0+3]
mov	[eax], esi
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4A00D0
mov	edx, [esp+0C4h+var_A4]
mov	[esp+0C4h+var_A8], ebp
test	edx, edx
js	short loc_61FD00
mov	esi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*4]
mov	edx, [esp+0C4h+var_AC]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_61FD00:
mov	ecx, [esp+0C4h+var_84]
cmp	ecx, [esp+0C4h+var_90]
lea	ecx, [esp+0C4h+var_B0+3]
setnz	dl
movzx	eax, dl
push	eax
mov	[esp+0C8h+var_AC], ebp
mov	[esp+0C8h+var_A4], 80000000h
call	sub_4D4F20
lea	ecx, [esp+0C4h+var_B0+3]
call	sub_4D4F40
test	al, al
jnz	short loc_61FD35
mov	[esp+0C4h+var_8C], ebp

loc_61FD35:
mov	esi, [esp+0C4h+var_84]
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esp+0C4h+var_90]
push	ecx
lea	ecx, [esp+0C8h+var_B0+3]
mov	[eax], esi
mov	byte ptr [esp+0C8h+var_B0+3], 0
call	sub_4A00D0
mov	edx, [esp+0C4h+var_88]
mov	[esp+0C4h+var_8C], ebp
test	edx, edx
js	short loc_61FD7B ; default
			; jumptable 0061F6D8 case 4
mov	esi, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esp+0C8h+var_90]
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_61FD7B:		; default
pop	edi		; jumptable 0061F6D8 case 4
pop	esi
pop	ebp
pop	ebx
add	esp, 0B4h
retn	8
sub_61F6B0 endp

off_61FD88 dd offset loc_61F6DF	; jump table for switch	statement
dd offset loc_61F7E8
dd offset loc_61F827
dd offset loc_61F94A
dd offset loc_61FD7B
dd offset loc_61F9B4
dd offset loc_61F9B4
dd offset loc_61FA43
dd offset loc_61FAD1
dd offset loc_61FA92



sub_61FDB0 proc	near

var_6C=	dword ptr -6Ch
var_58=	byte ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 58h
push	ebx
mov	ebx, [esp+5Ch+arg_0]
push	ebp
push	esi
mov	esi, eax
mov	eax, [esi+8]
push	edi
test	al, 20h
jz	short loc_61FE16
mov	ecx, [esp+68h+arg_4]
lea	eax, [esp+68h+var_58]
call	sub_A57360
mov	ecx, [ebx+10h]
mov	eax, [ecx]
mov	eax, [eax+14h]
push	esi
lea	edx, [esp+6Ch+var_58]
push	edx
call	eax
mov	ecx, eax
lea	eax, [esp+68h+arg_0]
call	sub_A572A0
mov	ecx, [esi+10h]
push	ecx
mov	edx, eax
push	edx

loc_61FDF3:
mov	ecx, ebx
call	sub_61F6B0
lea	eax, [esp+68h+arg_0]
call	sub_A57280
lea	eax, [esp+68h+var_58]
call	sub_A572E0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	0Ch

loc_61FE16:
test	al, 10h
jz	loc_61FEAA
mov	eax, [esi]
mov	ecx, [esi+4]
mov	edx, [esi+8]
mov	[esp+68h+var_54], eax
mov	eax, [esi+0Ch]
mov	[esp+68h+var_50], ecx
mov	ecx, [esi+10h]
push	ebx
mov	[esp+6Ch+var_4C], edx
mov	[esp+6Ch+var_48], eax
mov	[esp+6Ch+var_44], ecx
call	sub_620790
lea	edx, [esp+68h+arg_4]
push	edx
mov	edi, eax
call	sub_A57110
cmp	eax, 19h
jnz	short loc_61FE6D
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_61FE6D
push	ebx
call	sub_620790
mov	ecx, [ebx+18h]
mov	edx, [ecx+eax*4]
mov	[esp+68h+var_48], edx

loc_61FE6D:
mov	ecx, [esp+68h+arg_4]
lea	eax, [esp+68h+var_58]
call	sub_A57360
mov	ecx, [ebx+10h]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+68h+var_54]
push	edx
lea	edx, [esp+6Ch+var_58]
push	edx
call	eax
mov	ecx, eax
lea	eax, [esp+68h+arg_0]
call	sub_A572A0
push	edi
call	sub_A56D60
push	edi
lea	ecx, [esp+6Ch+arg_0]
push	ecx
jmp	loc_61FDF3

loc_61FEAA:		; switch 10 cases
lea	ecx, [eax-1]
cmp	ecx, 9
ja	loc_61FFAB	; default
			; jumptable 0061FEB6 case 5
jmp	ds:off_61FFB8[ecx*4] ; switch jump

loc_61FEBD:		; jumptable 0061FEB6 case 1
push	1
push	ebx
mov	eax, 1
lea	edi, [esp+70h+arg_0]
call	sub_A2EEF0
movzx	eax, byte ptr [esp+68h+arg_0]
lea	esi, [esp+68h+arg_4]
call	sub_A56E20
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	0Ch

loc_61FEE6:		; jumptable 0061FEB6 case 2
push	ebx
call	sub_6206D0
push	edx
push	eax
lea	eax, [esp+70h+arg_4]
call	sub_A56E00
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	0Ch

loc_61FF01:		; jumptable 0061FEB6 case 3
mov	eax, ebx
call	sub_61F570
fstp	[esp+68h+arg_0]
fld	[esp+68h+arg_0]
push	ecx		; float
lea	eax, [esp+6Ch+arg_4]
fstp	[esp+6Ch+var_6C]
call	sub_A56DE0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	0Ch

loc_61FF27:		; jumptable 0061FEB6 cases 4,6,7
lea	ebp, ds:0FFFFFFF4h[eax*4]
xor	esi, esi
test	ebp, ebp
jle	short loc_61FF52

loc_61FF34:
push	4
push	ebx
mov	eax, 1
lea	edi, [esp+70h+arg_0]
call	sub_A2EEF0
fld	[esp+68h+arg_0]
fstp	[esp+esi*4+68h+var_40]
inc	esi
cmp	esi, ebp
jl	short loc_61FF34

loc_61FF52:
push	ebp
lea	edx, [esp+6Ch+var_40]
push	edx
lea	eax, [esp+70h+arg_4]
call	sub_A56D80
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	0Ch

loc_61FF6B:		; jumptable 0061FEB6 cases 8,9
push	0FFFFFFFFh
lea	eax, [esp+6Ch+arg_0]
push	eax
mov	ecx, ebx
call	sub_61FFE0
lea	ecx, [esp+68h+arg_0]
push	ecx
lea	eax, [esp+6Ch+arg_4]
call	sub_A570F0
lea	eax, [esp+68h+arg_0]
call	sub_A572E0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	0Ch

loc_61FF9A:		; jumptable 0061FEB6 case 10
push	ebx
call	sub_61F4D0
mov	esi, eax
lea	eax, [esp+68h+arg_4]
call	sub_A56D70

loc_61FFAB:		; default
pop	edi		; jumptable 0061FEB6 case 5
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	0Ch
sub_61FDB0 endp

align 4
off_61FFB8 dd offset loc_61FEBD	; jump table for switch	statement
dd offset loc_61FEE6
dd offset loc_61FF01
dd offset loc_61FF27
dd offset loc_61FFAB
dd offset loc_61FF27
dd offset loc_61FF27
dd offset loc_61FF6B
dd offset loc_61FF6B
dd offset loc_61FF9A


; Attributes: bp-based frame

sub_61FFE0 proc	near

var_244= dword ptr -244h
var_240= byte ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= byte ptr -210h
var_204= dword ptr -204h
var_200= byte ptr -200h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 244h
push	ebx
push	esi
mov	esi, [ebp+arg_4]
push	edi
mov	ebx, ecx
cmp	esi, 0FFFFFFFFh
jnz	short loc_620001
push	ebx
call	sub_620790
mov	esi, eax

loc_620001:
cmp	esi, 5
jnz	short loc_620023
push	ebx
call	sub_620790
mov	ecx, [ebx+30h]
mov	ecx, [ecx+eax*4]
mov	eax, [ebp+arg_0]
call	sub_A57360
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_620023:
cmp	esi, 6
jnz	short loc_62003B
mov	eax, [ebp+arg_0]
xor	ecx, ecx
call	sub_A57360
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_62003B:
push	ebx
call	sub_620790
mov	edx, [ebx+18h]
mov	ecx, [edx+eax*4]
lea	eax, [esp+250h+var_240]
call	sub_A57080
call	sub_A57000
mov	ecx, [ebx+10h]
mov	edi, eax
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+250h+var_240]
push	edx
call	eax
mov	ecx, eax
lea	eax, [esp+250h+var_228]
call	sub_A57360
mov	eax, esi
sub	eax, 3
jz	loc_620112
sub	eax, 1
jz	short loc_6200D5
push	200h
lea	ecx, [esp+254h+var_200]
push	ecx
lea	ecx, [esp+258h+var_210]
call	sub_128DD50
push	offset aCorruptFile ; "corrupt file"
lea	ecx, [esp+254h+var_210]
call	sub_AD3930
mov	ecx, dword_196AFBC
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	178h
push	offset a_TagfileBinary ; ".\\Tagfile\\Binary\\hkBinaryTagfileReader."...
lea	eax, [esp+258h+var_200]
push	eax
push	484994D5h
push	3
call	edx
test	eax, eax
jz	short loc_6200CA
int	3		; Trap to Debugger

loc_6200CA:
lea	ecx, [esp+250h+var_210]
call	sub_AD3A20
jmp	short loc_620112

loc_6200D5:
lea	esi, [ebx+30h]
push	esi
lea	ecx, [esp+254h+var_244+3]
mov	byte ptr [esp+254h+var_244+3], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_620101
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_620101:
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [esp+250h+var_228]
lea	eax, [eax+edx*4]
mov	[eax], ecx
inc	dword ptr [esi+4]

loc_620112:
xor	eax, eax
mov	[esp+250h+var_224], eax
mov	[esp+250h+var_220], eax
mov	[esp+250h+var_21C], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [eax]
lea	edx, [ecx+80h]
mov	[eax], edx
push	edi
push	ebx
lea	esi, [esp+258h+var_224]
mov	[esp+258h+var_224], ecx
mov	[esp+258h+var_21C], 80000080h
mov	[esp+258h+var_218], ecx
call	sub_61F590
xor	esi, esi
mov	[esp+250h+var_238], esi
mov	[esp+250h+var_234], esi
mov	[esp+250h+var_230], 80000000h
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	ecx, [eax]
lea	edx, [edi+edi*4]
lea	edx, ds:7Fh[edx*4]
and	edx, 0FFFFFF80h
add	edx, ecx
mov	[eax], edx
mov	edx, [esp+250h+var_234]
mov	eax, edi
or	eax, 80000000h
mov	[esp+250h+var_230], eax
mov	eax, edi
sub	eax, edx
cmp	eax, esi
lea	edx, [edx+edx*4]
mov	[esp+250h+var_238], ecx
mov	[esp+250h+var_22C], ecx
lea	ecx, [ecx+edx*4]
jle	short loc_6201DC
mov	esi, ecx
mov	[esp+250h+var_23C], eax

loc_6201B1:		; void *
push	esi
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
xor	ecx, ecx
add	esp, 8
cmp	eax, ecx
jz	short loc_6201D0
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx

loc_6201D0:
add	esi, 14h
sub	[esp+250h+var_23C], 1
jnz	short loc_6201B1
xor	esi, esi

loc_6201DC:
lea	eax, [esp+250h+var_238]
push	eax
lea	ecx, [esp+254h+var_240]
push	ecx
mov	[esp+258h+var_234], edi
call	sub_A57210
xor	eax, eax
cmp	edi, esi
mov	[esp+250h+var_23C], eax
jle	short loc_62024F
xor	ecx, ecx
mov	[esp+250h+var_214], ecx
nop

loc_620200:
mov	edx, [esp+250h+var_238]
add	ecx, edx
mov	edx, [esp+250h+var_224]
cmp	byte ptr [edx+eax], 0
mov	[esp+250h+var_204], ecx
jz	short loc_62023B
mov	eax, [ecx]
push	eax
lea	esi, [esp+254h+var_210]
lea	eax, [esp+254h+var_228]
call	sub_A56F30
mov	ecx, [eax+4]
mov	edx, [eax]
mov	eax, [esp+250h+var_204]
push	ecx
push	edx
push	ebx
call	sub_61FDB0
mov	eax, [esp+250h+var_23C]
xor	esi, esi

loc_62023B:
mov	ecx, [esp+250h+var_214]
inc	eax
add	ecx, 14h
cmp	eax, edi
mov	[esp+250h+var_23C], eax
mov	[esp+250h+var_214], ecx
jl	short loc_620200

loc_62024F:
mov	eax, [ebp+arg_0]
lea	ecx, [esp+250h+var_228]
call	sub_A57340
mov	eax, [esp+250h+var_22C]
cmp	eax, [esp+250h+var_238]
setnz	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+254h+var_244+3]
call	sub_4D4F20
lea	ecx, [esp+250h+var_244+3]
call	sub_4D4F40
test	al, al
jnz	short loc_620284
mov	[esp+250h+var_234], esi

loc_620284:
mov	edi, [esp+250h+var_22C]
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	[eax], edi
lea	eax, [esp+250h+var_238]
push	eax
lea	ecx, [esp+254h+var_244+3]
mov	byte ptr [esp+254h+var_244+3], 0
call	sub_4A00D0
mov	edx, [esp+250h+var_230]
mov	ebx, 80000000h
mov	[esp+250h+var_234], esi
test	ebx, edx
jnz	short loc_6202D6
mov	edi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*4]
mov	edx, [esp+250h+var_238]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [edi+10h]
push	edx
call	eax

loc_6202D6:
mov	ecx, [esp+250h+var_218]
cmp	ecx, [esp+250h+var_224]
lea	ecx, [esp+250h+var_244+3]
setnz	dl
movzx	eax, dl
push	eax
mov	[esp+254h+var_238], esi
mov	[esp+254h+var_230], ebx
call	sub_4D4F20
lea	ecx, [esp+250h+var_244+3]
call	sub_4D4F40
test	al, al
jnz	short loc_620307
mov	[esp+250h+var_220], esi

loc_620307:
mov	edi, [esp+250h+var_218]
call	sub_AD5DD0
mov	ecx, eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esp+250h+var_224]
push	ecx
lea	ecx, [esp+254h+var_244+3]
mov	[eax], edi
mov	byte ptr [esp+254h+var_244+3], 0
call	sub_4A00D0
mov	edx, [esp+250h+var_21C]
mov	[esp+250h+var_220], esi
test	ebx, edx
jnz	short loc_62034D
mov	edi, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esp+254h+var_224]
mov	ecx, eax
mov	eax, [edi+10h]
push	edx
call	eax

loc_62034D:
lea	eax, [esp+250h+var_228]
mov	[esp+250h+var_224], esi
mov	[esp+250h+var_21C], ebx
call	sub_A572E0
mov	eax, [ebp+arg_0]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_61FFE0 endp

align 10h



sub_620370 proc	near

var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

sub	esp, 28h
push	ebx
push	ebp
push	esi
xor	ebx, ebx
push	edi
mov	[esp+38h+var_10], ebx
mov	[esp+38h+var_C], ebx
mov	[esp+38h+var_8], 80000000h
call	sub_61F4D0
push	edi
mov	[esp+38h+var_1C], eax
call	sub_620790
mov	ecx, [edi+10h]
mov	[esp+34h+var_18], eax
mov	eax, [ecx]
mov	eax, [eax+18h]
lea	edx, [esp+34h+var_20]
push	edx
call	eax
cmp	[eax], ebx
setz	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+38h+var_21]
call	sub_4D4F20
lea	ecx, [esp+34h+var_21]
call	sub_4D4F40
test	al, al
jz	short loc_6203DD
lea	eax, [esp+34h+var_1C]
call	sub_617960
lea	eax, [ebx+1]
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn

loc_6203DD:
push	edi
call	sub_620790
cmp	eax, ebx
jl	short loc_620403
mov	ecx, [edi+18h]
cmp	[ecx+eax*4], ebx
lea	eax, [ecx+eax*4]
jz	short loc_620403
mov	eax, [eax]
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+8]
call	eax
mov	[esp+34h+var_14], eax
jmp	short loc_620407

loc_620403:
mov	[esp+34h+var_14], ebx

loc_620407:
push	edi
call	sub_620790
lea	ecx, [esp+34h+var_10]
push	ecx
lea	ecx, [esp+38h+var_21]
mov	esi, eax
mov	[esp+38h+var_21], bl
call	sub_4A00D0
mov	ecx, [esp+34h+var_8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_620448
add	ecx, ecx
cmp	esi, ecx
jl	short loc_620437
mov	ecx, esi

loc_620437:
push	10h
push	ecx
lea	edx, [esp+3Ch+var_10]
push	edx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_620448:
mov	eax, [esp+34h+var_C]
mov	ecx, esi
sub	ecx, eax
shl	eax, 4
add	eax, [esp+34h+var_10]
cmp	ecx, ebx
jle	short loc_620473
mov	ebp, eax
mov	ebx, ecx
nop

loc_620460:		; void *
push	ebp
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
add	ebp, 10h
sub	ebx, 1
jnz	short loc_620460

loc_620473:
cmp	esi, ebx
mov	[esp+34h+var_C], esi
jle	short loc_6204DC
xor	ebp, ebp

loc_62047D:
mov	eax, [esp+34h+var_10]
push	edi
lea	esi, [eax+ebp]
call	sub_61F4D0
push	edi
mov	[esi], eax
call	sub_620790
mov	[esi+4], eax
test	al, 20h
jz	short loc_6204A1
push	edi
call	sub_620790
jmp	short loc_6204A3

loc_6204A1:
xor	eax, eax

loc_6204A3:
mov	[esi+8], eax
mov	eax, [esi+4]
and	eax, 0Fh
cmp	eax, 9
jz	short loc_6204BA
cmp	eax, 8
jz	short loc_6204BA
xor	eax, eax
jmp	short loc_6204C0

loc_6204BA:
push	edi
call	sub_61F4D0

loc_6204C0:
mov	[esi+0Ch], eax
test	eax, eax
jz	short loc_6204D2
mov	ecx, [edi+10h]
mov	edx, [ecx]
push	eax
mov	eax, [edx+24h]
call	eax

loc_6204D2:
inc	ebx
add	ebp, 10h
cmp	ebx, [esp+34h+var_C]
jl	short loc_62047D

loc_6204DC:
mov	ecx, [edi+10h]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
lea	eax, [esp+34h+var_1C]
push	eax
call	edx
lea	esi, [edi+18h]
push	esi
lea	ecx, [esp+38h+var_21]
mov	ebp, eax
mov	[esp+38h+var_21], 0
call	sub_4A00D0
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_620519
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_620519:
mov	edx, [esi+4]
mov	eax, [esi]
lea	ecx, [esp+34h+var_10]
lea	eax, [eax+edx*4]
mov	[eax], ebp
inc	dword ptr [esi+4]
push	ecx
lea	ecx, [esp+38h+var_21]
mov	[esp+38h+var_21], 0
call	sub_4A00D0
mov	edx, [esp+34h+var_8]
mov	[esp+34h+var_C], 0
test	edx, edx
js	short loc_620561
mov	esi, [eax]
and	edx, 3FFFFFFFh
shl	edx, 4
push	edx
mov	edx, [esp+38h+var_10]
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_620561:
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 28h
retn
sub_620370 endp

align 10h


; Attributes: bp-based frame

sub_620570 proc	near

var_214= dword ptr -214h
var_210= byte ptr -210h
var_204= dword ptr -204h
var_200= byte ptr -200h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 218h
push	ebx
mov	ebx, [ebp+arg_0]
push	edi
push	4
push	esi
mov	eax, 1
lea	edi, [esp+228h+var_204]
call	sub_A2EEF0
push	4
push	esi
mov	eax, 1
lea	edi, [esp+228h+var_214]
call	sub_A2EEF0
cmp	[esp+220h+var_204], 0CAB00D1Eh
jnz	loc_620650
cmp	[esp+220h+var_214], 0D011FACEh
jnz	loc_620650
push	esi
call	sub_620790
cmp	eax, 0FFFFFFFFh
jz	loc_62069D	; default
			; jumptable 006205DC case 5
mov	edi, edi

loc_6205D0:		; switch 6 cases
lea	ecx, [eax-1]
cmp	ecx, 5
ja	loc_62069D	; default
			; jumptable 006205DC case 5
jmp	ds:off_6206B0[ecx*4] ; switch jump

loc_6205E3:		; jumptable 006205DC case 1
push	esi
call	sub_620790
test	eax, eax
jz	short loc_620621
push	200h
lea	eax, [esp+224h+var_200]
push	eax
lea	ecx, [esp+228h+var_210]
call	sub_128DD50
push	offset aUnrecognisedTa ; "Unrecognised tagfile version."
lea	ecx, [esp+224h+var_210]
call	sub_AD3930
push	1D9h
jmp	short loc_620676

loc_620615:		; jumptable 006205DC case 2
mov	edi, esi
call	sub_620370
cmp	eax, 1
jz	short loc_62069D ; default
			; jumptable 006205DC case 5

loc_620621:
push	esi
call	sub_620790
cmp	eax, 0FFFFFFFFh
jnz	short loc_6205D0
xor	ecx, ecx
mov	eax, ebx
call	sub_A57360
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_62063D:		; jumptable 006205DC cases 3,4,6
push	eax
push	ebx
mov	ecx, esi
call	sub_61FFE0
mov	eax, ebx
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_620650:
push	200h
lea	eax, [esp+224h+var_200]
push	eax
lea	ecx, [esp+228h+var_210]
call	sub_128DD50
push	offset aThisDoesNotLoo ; "This does not	look like a binary tagfil"...
lea	ecx, [esp+224h+var_210]
call	sub_AD3930
push	1C5h

loc_620676:
mov	ecx, dword_196AFBC
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	offset a_TagfileBinary ; ".\\Tagfile\\Binary\\hkBinaryTagfileReader."...
lea	eax, [esp+228h+var_200]
push	eax
push	2AB6036Fh
push	1
call	edx
lea	ecx, [esp+220h+var_210]
call	sub_AD3A20

loc_62069D:		; default
xor	ecx, ecx	; jumptable 006205DC case 5
mov	eax, ebx
call	sub_A57360
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_620570 endp

align 10h
off_6206B0 dd offset loc_6205E3	; jump table for switch	statement
dd offset loc_620615
dd offset loc_62063D
dd offset loc_62063D
dd offset loc_62069D
dd offset loc_62063D
align 10h



sub_6206D0 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
push	ebx
push	ebp
push	esi
push	edi
push	1
push	eax
mov	eax, 1
lea	edi, [esp+24h+var_9]
call	sub_A2EEF0
movzx	eax, [esp+1Ch+var_9]
cdq
mov	ecx, eax
shrd	ecx, edx, 1
shr	edx, 1
mov	ebp, ecx
mov	ecx, eax
mov	ebx, edx
and	ecx, 1
and	eax, 80h
xor	edx, edx
and	ebp, 0FFFFFFBFh
and	ebx, 7FFFFFFFh
or	eax, edx
mov	[esp+1Ch+var_4], ecx
mov	[esp+1Ch+var_8], 6
jz	short loc_62076B

loc_620723:
mov	edx, [esp+1Ch+arg_0]
push	1
push	edx
mov	eax, 1
lea	edi, [esp+24h+var_9]
call	sub_A2EEF0
movzx	eax, [esp+1Ch+var_9]
mov	edi, [esp+1Ch+var_8]
cdq
mov	esi, eax
and	eax, 0FFFFFF7Fh
mov	ecx, edi
call	__allshl
or	ebp, eax
add	edi, 7
and	esi, 80h
xor	eax, eax
or	ebx, edx
or	esi, eax
mov	[esp+1Ch+var_8], edi
jnz	short loc_620723
mov	ecx, [esp+1Ch+var_4]

loc_62076B:
test	ecx, ecx
jz	short loc_620776
neg	ebp
adc	ebx, 0
neg	ebx

loc_620776:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
mov	edx, ebx
pop	ebx
add	esp, 0Ch
retn	4
sub_6206D0 endp

align 10h



sub_620790 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	ebx
push	ebp
push	esi
push	edi
push	1
push	eax
mov	eax, 1
lea	edi, [esp+28h+var_D]
call	sub_A2EEF0
movzx	eax, [esp+20h+var_D]
cdq
mov	ecx, eax
shrd	ecx, edx, 1
shr	edx, 1
mov	ebp, ecx
mov	ecx, eax
mov	ebx, edx
and	ecx, 1
and	eax, 80h
xor	edx, edx
and	ebp, 0FFFFFFBFh
and	ebx, 7FFFFFFFh
or	eax, edx
mov	[esp+20h+var_8], ecx
mov	[esp+20h+var_C], 6
jz	short loc_62082B

loc_6207E3:
mov	edx, [esp+20h+arg_0]
push	1
push	edx
mov	eax, 1
lea	edi, [esp+28h+var_D]
call	sub_A2EEF0
movzx	eax, [esp+20h+var_D]
mov	edi, [esp+20h+var_C]
cdq
mov	esi, eax
and	eax, 0FFFFFF7Fh
mov	ecx, edi
call	__allshl
or	ebp, eax
add	edi, 7
and	esi, 80h
xor	eax, eax
or	ebx, edx
or	esi, eax
mov	[esp+20h+var_C], edi
jnz	short loc_6207E3
mov	ecx, [esp+20h+var_8]

loc_62082B:
test	ecx, ecx
jz	short loc_620836
neg	ebp
adc	ebx, 0
neg	ebx

loc_620836:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
mov	[esp+14h+var_4], ebx
pop	ebx
add	esp, 10h
retn	4
sub_620790 endp

align 10h



sub_620850 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+14h], 0
jz	short loc_620873
mov	eax, [esi+8]
push	eax
call	sub_11DCF80
add	esp, 4
mov	dword ptr [esi+14h], 0
mov	dword ptr [esi+18h], 0

loc_620873:
pop	esi
retn
sub_620850 endp

align 10h



sub_620880 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	ebx
xor	ebx, ebx
push	esi
mov	dword ptr [edi], offset	off_15F9520
cmp	[edi+14h], ebx
jz	short loc_6208A2
mov	eax, [edi+8]
push	eax
call	sub_11DCF80
add	esp, 4
mov	[edi+14h], ebx
mov	[edi+18h], ebx

loc_6208A2:
lea	esi, [edi+8]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], bl
call	sub_4A00D0
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edx, edx
js	short loc_6208CE
mov	ecx, [esi]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2260

loc_6208CE:
mov	[esi], ebx
mov	dword ptr [esi+8], 80000000h
pop	esi
mov	dword ptr [edi], offset	off_15F8F60
mov	ecx, edi
pop	ebx
add	esp, 4
jmp	sub_4DA650
sub_620880 endp

align 10h



sub_6208F0 proc	near
mov	eax, offset aHknativeresour ; "hkNativeResource"
retn
sub_6208F0 endp

align 10h



sub_620900 proc	near
mov	eax, [ecx+14h]
retn	8
sub_620900 endp

align 10h



sub_620910 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [ecx+8]
push	edx
push	eax
call	sub_11DD3E0
add	esp, 0Ch
retn	8
sub_620910 endp

align 10h



sub_620930 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_620880
test	[esp+4+arg_0], 1
jz	short loc_62095A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_62095A:
mov	eax, edi
pop	edi
retn	4
sub_620930 endp




sub_620960 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	ecx
mov	ecx, esp
xor	ebx, ebx
push	ebx
call	sub_4D4F20
mov	ecx, [esp+10h+arg_0]
mov	esi, edi
call	sub_AD22A0
mov	byte ptr [esp+0Ch+arg_0], bl
mov	eax, [esp+0Ch+arg_0]
lea	ebp, [edi+10h]
push	eax
mov	esi, ebp
call	sub_6031D0
mov	byte ptr [esp+0Ch+arg_0], bl
mov	ecx, [esp+0Ch+arg_0]
lea	esi, [edi+20h]
push	ecx
call	sub_6031D0
lea	esi, [edi+34h]
mov	[edi+30h], ebx
push	esi
lea	ecx, [esp+10h+arg_0]
mov	[esi], ebx
mov	[esi+4], ebx
mov	dword ptr [esi+8], 0FFFFFFFFh
mov	byte ptr [esp+10h+arg_0], bl
call	sub_4A00D0
mov	ecx, esi
call	sub_622590
mov	edx, [esp+0Ch+arg_4]
mov	[edi+40h], ebx
mov	[edi+44h], ebx
mov	eax, 80000000h
mov	[edi+48h], eax
mov	[edi+4Ch], ebx
mov	[edi+50h], ebx
mov	[edi+54h], eax
lea	esi, [edi+5Ch]
mov	[edi+58h], edx
push	esi
lea	ecx, [esp+10h+arg_0]
mov	[esi], ebx
mov	[esi+4], ebx
mov	dword ptr [esi+8], 0FFFFFFFFh
mov	byte ptr [esp+10h+arg_0], bl
call	sub_4A00D0
mov	ecx, esi
call	sub_622590
push	ebx
push	offset byte_146D660
lea	ecx, [edi+20h]
mov	[edi+68h], ebx
mov	[edi+6Ch], ebx
mov	dword ptr [edi+70h], 80000000h
call	sub_6032F0
push	ebx
push	offset byte_146D660
mov	ecx, ebp
call	sub_6032F0
pop	esi
pop	ebp
mov	eax, edi
pop	ebx
retn	8
sub_620960 endp

align 10h



sub_620A40 proc	near

arg_0= qword ptr  4

push	ebx
mov	ebx, dword ptr [esp+4+arg_0]
push	esi
mov	esi, dword ptr [esp+8+arg_0+4]
test	esi, esi
jg	short loc_620A66
jl	short loc_620A54
test	ebx, ebx
jnb	short loc_620A66

loc_620A54:
neg	ebx
adc	esi, 0
neg	esi
shld	esi, ebx, 1
add	ebx, ebx
or	ebx, 1
jmp	short loc_620A6C

loc_620A66:
shld	esi, ebx, 1
add	ebx, ebx

loc_620A6C:
mov	al, bl
shrd	ebx, esi, 7
and	al, 7Fh
shr	esi, 7
mov	ecx, ebx
or	ecx, esi
mov	byte ptr [esp+8+arg_0],	al
jz	short loc_620AA3

loc_620A81:
or	al, 80h
movzx	edx, al
push	edx
mov	eax, edi
call	sub_AD1FA0
mov	al, bl
shrd	ebx, esi, 7
shr	esi, 7
mov	ecx, ebx
and	al, 7Fh
or	ecx, esi
jnz	short loc_620A81
mov	byte ptr [esp+8+arg_0],	al

loc_620AA3:
mov	edx, dword ptr [esp+8+arg_0]
push	edx
mov	eax, edi
call	sub_AD1FA0
pop	esi
pop	ebx
retn	8
sub_620A40 endp

align 10h



sub_620AC0 proc	near

arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	edi
test	ebx, ebx
jz	short loc_620B28
lea	ebp, [esi+10h]
push	ebx
or	eax, 0FFFFFFFFh
mov	edi, ebp
call	sub_603480
cmp	eax, 0FFFFFFFFh
jnz	short loc_620B15
mov	eax, ebx
call	sub_AD3180
mov	[esp+10h+arg_0], eax
cdq
push	edx
push	eax
mov	edi, esi
call	sub_620A40
mov	eax, [esp+10h+arg_0]
push	eax
push	ebx
mov	eax, esi
call	sub_AD1F80
mov	ecx, [esi+14h]
inc	ecx
push	ecx
push	ebx
mov	ecx, ebp
call	sub_6032F0
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_620B15:
neg	eax
cdq
push	edx
push	eax
mov	edi, esi
call	sub_620A40
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_620B28:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	edi, esi
call	sub_620A40
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_620AC0 endp

align 10h



sub_620B40 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
push	ebp
mov	ebp, [esp+28h+arg_0]
cmp	dword ptr [ebp+0], 0
push	esi
push	edi
mov	ebx, ecx
jnz	short loc_620B5F
xor	eax, eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	4

loc_620B5F:
mov	eax, ebp
call	sub_A57050
push	eax
lea	edi, [ebx+20h]
or	eax, 0FFFFFFFFh
call	sub_603480
test	eax, eax
jge	loc_620DCB
lea	esi, [esp+30h+var_10]
mov	eax, ebp
call	sub_A57260
push	eax
mov	ecx, ebx
call	sub_620B40
mov	[esp+30h+var_14], eax
mov	eax, ebp
call	sub_A57050
push	eax
or	eax, 0FFFFFFFFh
call	sub_603480
cmp	eax, 0FFFFFFFFh
jnz	loc_620DCB
mov	esi, [ebx+24h]
mov	eax, ebp
mov	[esp+30h+var_18], esi
call	sub_A57050
push	esi
push	eax
mov	ecx, edi
call	sub_6032F0
mov	eax, ebp
call	sub_A57020
mov	ebp, eax
lea	eax, [esp+30h+var_C]
xor	edi, edi
push	eax
lea	ecx, [esp+34h+var_1D]
mov	[esp+34h+var_10], ebp
mov	esi, ebp
mov	[esp+34h+var_C], edi
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], 80000000h
mov	[esp+34h+var_1D], 0
call	sub_4D5020
cmp	ebp, edi
jz	short loc_620C30
mov	edx, [eax]
mov	edx, [edx+0Ch]
lea	ecx, [ebp+ebp*4+0]
add	ecx, ecx
add	ecx, ecx
mov	[esp+30h+var_1C], ecx
lea	ecx, [esp+30h+var_1C]
push	ecx
mov	ecx, eax
call	edx
mov	ecx, [esp+30h+var_1C]
mov	edi, eax
mov	eax, 66666667h
imul	ecx
sar	edx, 3
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
mov	eax, esi
test	esi, esi
jnz	short loc_620C35

loc_620C30:
mov	eax, 80000000h

loc_620C35:
mov	[esp+30h+var_C], edi
mov	[esp+30h+var_8], esi
mov	[esp+30h+var_4], eax
test	esi, esi
jle	short loc_620C6C

loc_620C45:		; void *
push	edi
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
xor	ecx, ecx
add	esp, 8
cmp	eax, ecx
jz	short loc_620C64
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx

loc_620C64:
add	edi, 14h
sub	esi, 1
jnz	short loc_620C45

loc_620C6C:
mov	esi, [esp+30h+arg_0]
lea	eax, [esp+30h+var_C]
push	eax
push	esi
call	sub_A571C0
push	0
push	2
mov	edi, ebx
call	sub_620A40
mov	eax, esi
call	sub_A57050
push	eax
mov	esi, ebx
call	sub_620AC0
mov	eax, [esp+30h+arg_0]
call	sub_A57040
cdq
push	edx
push	eax
call	sub_620A40
mov	eax, [esp+30h+var_14]
cdq
push	edx
push	eax
call	sub_620A40
mov	eax, ebp
cdq
push	edx
push	eax
call	sub_620A40
test	ebp, ebp
jle	loc_620D88
mov	[esp+30h+arg_0], 0
mov	[esp+30h+var_1C], ebp

loc_620CD0:
mov	ecx, [esp+30h+var_C]
mov	edx, [esp+30h+arg_0]
mov	eax, [edx+ecx]
lea	ebp, [edx+ecx]
push	eax
mov	esi, ebx
call	sub_620AC0
mov	eax, [ebp+8]
cdq
push	edx
push	eax
mov	edi, ebx
call	sub_620A40
test	byte ptr [ebp+8], 20h
jz	short loc_620D0D
mov	ecx, [esp+30h+var_C]
mov	edx, [esp+30h+arg_0]
mov	eax, [edx+ecx+10h]
cdq
push	edx
push	eax
call	sub_620A40

loc_620D0D:
mov	eax, [ebp+8]
and	eax, 0Fh
cmp	eax, 9
jz	short loc_620D1D
cmp	eax, 8
jnz	short loc_620D47

loc_620D1D:
mov	ebp, [ebp+0Ch]
test	ebp, ebp
jz	short loc_620D3C
mov	ecx, ebp
lea	eax, [esp+30h+var_14]
call	sub_A57080
call	sub_A57050
push	eax
call	sub_620AC0
jmp	short loc_620D47

loc_620D3C:
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	edi, ebx
call	sub_620A40

loc_620D47:
add	[esp+30h+arg_0], 14h
sub	[esp+30h+var_1C], 1
jnz	loc_620CD0
mov	ebp, [esp+30h+var_10]
test	ebp, ebp
jle	short loc_620D88
xor	esi, esi

loc_620D61:
mov	eax, [esp+30h+var_C]
mov	ecx, [esi+eax+0Ch]
test	ecx, ecx
jz	short loc_620D80
lea	eax, [esp+30h+arg_0]
call	sub_A57080
mov	ecx, eax
push	ecx
mov	ecx, ebx
call	sub_620B40

loc_620D80:
add	esi, 14h
sub	ebp, 1
jnz	short loc_620D61

loc_620D88:
lea	edx, [esp+30h+var_C]
push	edx
lea	ecx, [esp+34h+arg_0]
mov	byte ptr [esp+34h+arg_0], 0
call	sub_4D5020
mov	edx, [esp+30h+var_4]
mov	[esp+30h+var_8], 0
test	edx, edx
js	short loc_620DC7
mov	esi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*4]
mov	edx, [esp+30h+var_C]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax

loc_620DC7:
mov	eax, [esp+30h+var_18]

loc_620DCB:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	4
sub_620B40 endp

align 10h



sub_620DE0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	edi
lea	edi, [ebp+7]
push	esi
lea	ecx, [esp+0Ch+arg_0]
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 80000000h
and	edi, 0FFFFFFF8h
mov	byte ptr [esp+0Ch+arg_0], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_620E31
add	ecx, ecx
cmp	edi, ecx
jl	short loc_620E24
mov	ecx, edi

loc_620E24:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_620E31:
mov	edx, [esi+4]
mov	ecx, [esi]
mov	eax, edi
sub	eax, edx
add	ecx, edx
test	eax, eax
jle	short loc_620E4C
push	eax		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch

loc_620E4C:
push	esi
lea	ecx, [esp+0Ch+arg_0]
mov	[esi+4], edi
mov	byte ptr [esp+0Ch+arg_0], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, ebp
jge	short loc_620E80
add	ecx, ecx
cmp	ebp, ecx
jl	short loc_620E73
mov	ecx, ebp

loc_620E73:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_620E80:
pop	edi
mov	[esi+4], ebp
mov	eax, esi
pop	ebp
retn	4
sub_620DE0 endp

align 10h



sub_620E90 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esi+4]
push	edi
lea	edi, [ebp+7]
push	esi
lea	ecx, [esp+10h+var_1]
and	edi, 0FFFFFFF8h
mov	[esp+10h+var_1], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_620ECD
add	ecx, ecx
cmp	edi, ecx
jl	short loc_620EC0
mov	ecx, edi

loc_620EC0:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_620ECD:
mov	edx, [esi+4]
mov	ecx, [esi]
mov	eax, edi
sub	eax, edx
add	ecx, edx
test	eax, eax
jle	short loc_620EE8
push	eax		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch

loc_620EE8:
mov	[esi+4], edi
xor	ecx, ecx
xor	edi, edi
cmp	[esp+0Ch+arg_4], ecx
jle	short loc_620F6A
push	ebx

loc_620EF6:
mov	ebx, [esi]
mov	eax, [esp+10h+arg_0]
mov	al, [edi+eax]
mov	dl, al
and	dl, 1
mov	[ecx+ebx], dl
mov	ebx, [esi]
shr	al, 1
mov	dl, al
and	dl, 1
mov	[ebx+ecx+1], dl
mov	ebx, [esi]
shr	al, 1
mov	dl, al
and	dl, 1
mov	[ebx+ecx+2], dl
mov	ebx, [esi]
shr	al, 1
mov	dl, al
and	dl, 1
mov	[ebx+ecx+3], dl
mov	ebx, [esi]
shr	al, 1
mov	dl, al
and	dl, 1
mov	[ebx+ecx+4], dl
mov	ebx, [esi]
shr	al, 1
mov	dl, al
and	dl, 1
mov	[ebx+ecx+5], dl
mov	ebx, [esi]
shr	al, 1
mov	dl, al
and	dl, 1
mov	[ebx+ecx+6], dl
mov	edx, [esi]
shr	al, 1
and	al, 1
mov	[edx+ecx+7], al
inc	edi
add	ecx, 8
cmp	edi, [esp+10h+arg_4]
jl	short loc_620EF6
pop	ebx

loc_620F6A:
push	esi
lea	ecx, [esp+10h+arg_4]
mov	byte ptr [esp+10h+arg_4], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, ebp
jge	short loc_620F9B
add	ecx, ecx
cmp	ebp, ecx
jl	short loc_620F8E
mov	ecx, ebp

loc_620F8E:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_620F9B:
pop	edi
mov	[esi+4], ebp
pop	ebp
pop	ecx
retn	8
sub_620E90 endp

align 10h



sub_620FB0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esi+4]
push	edi
lea	edi, [ebp+7]
push	esi
lea	ecx, [esp+10h+arg_0]
and	edi, 0FFFFFFF8h
mov	byte ptr [esp+10h+arg_0], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, edi
jge	short loc_620FF1
add	ecx, ecx
cmp	edi, ecx
jl	short loc_620FE4
mov	ecx, edi

loc_620FE4:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_620FF1:
mov	edx, [esi+4]
mov	ecx, [esi]
mov	eax, edi
sub	eax, edx
add	ecx, edx
test	eax, eax
jle	short loc_62100C
push	eax		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch

loc_62100C:
xor	ecx, ecx
mov	[esi+4], edi
test	edi, edi
jle	short loc_62104B

loc_621015:
mov	eax, [esi]
mov	dl, [eax+ecx+7]
add	eax, ecx
add	dl, dl
or	dl, [eax+6]
add	ecx, 8
add	dl, dl
or	dl, [eax+5]
inc	ebx
add	dl, dl
or	dl, [eax+4]
add	dl, dl
or	dl, [eax+3]
add	dl, dl
or	dl, [eax+2]
add	dl, dl
or	dl, [eax+1]
add	dl, dl
or	dl, [eax]
mov	[ebx-1], dl
cmp	ecx, [esi+4]
jl	short loc_621015

loc_62104B:
push	esi
lea	ecx, [esp+10h+arg_0]
mov	byte ptr [esp+10h+arg_0], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, ebp
jge	short loc_62107C
add	ecx, ecx
cmp	ebp, ecx
jl	short loc_62106F
mov	ecx, ebp

loc_62106F:
push	1
push	ecx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_62107C:
pop	edi
mov	[esi+4], ebp
pop	ebp
pop	ebx
retn	4
sub_620FB0 endp

align 10h



sub_621090 proc	near

var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_78=	byte ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_6C=	byte ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	byte ptr -60h
var_5C=	byte ptr -5Ch
var_58=	byte ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_38=	byte ptr -38h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 84h
push	ebx
push	ebp
push	esi
push	edi
mov	ebp, ecx
push	eax
lea	ecx, [esp+98h+var_7C]
push	ecx
lea	edi, [ebp+58h]
call	sub_6221C0
lea	ecx, [esp+94h+var_7C]
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	loc_62150B
lea	esi, [esp+94h+var_40]
call	sub_A56F50
mov	edx, [eax+4]
mov	eax, [eax]
push	edx
lea	ebx, [ebp+34h]
push	eax
mov	ecx, ebx
call	sub_6224D0
cmp	eax, 0FFFFFFFFh
jz	short loc_6210F1
mov	edx, [ebp+4Ch]
lea	ecx, [eax+eax*2]
inc	dword ptr [edx+ecx*8+0Ch]
lea	eax, [edx+ecx*8+0Ch]
jmp	loc_62150B

loc_6210F1:
mov	edi, [ebp+38h]
and	edi, 7FFFFFFFh
lea	esi, [esp+94h+var_40]
lea	ecx, [esp+94h+var_7C]
mov	[esp+94h+var_44], edi
call	sub_A56F50
mov	ecx, [eax+4]
mov	edx, [eax]
push	edi
push	ecx
push	edx
push	ebx
lea	ecx, [esp+0A4h+var_80+3]
mov	byte ptr [esp+0A4h+var_80+3], 0
call	sub_4A00D0
push	eax
mov	eax, ebx
call	sub_622420
lea	ebx, [ebp+4Ch]
push	ebx
lea	ecx, [esp+98h+var_80+3]
mov	byte ptr [esp+98h+var_80+3], 0
call	sub_4D5020
mov	ecx, [ebx+8]
and	ecx, 3FFFFFFFh
cmp	[ebx+4], ecx
jnz	short loc_621156
push	18h
push	ebx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_621156:
mov	eax, [ebx+4]
lea	edx, [eax+eax*2]
mov	eax, [ebx]
lea	eax, [eax+edx*8]
push	eax		; void *
push	18h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
mov	ecx, [ebx+4]
mov	eax, [ebx]
lea	edx, [ecx+ecx*2]
lea	eax, [eax+edx*8]
mov	edx, ds:dword_15F9544
inc	ecx
mov	[ebx+4], ecx
mov	ecx, ds:dword_15F9540
mov	[eax], ecx
mov	ecx, ds:dword_15F9548
mov	[eax+4], edx
mov	edx, ds:dword_15F954C
mov	[eax+8], ecx
mov	ecx, ds:dword_15F9550
mov	[eax+0Ch], edx
mov	edx, ds:dword_15F9554
mov	[eax+10h], ecx
mov	[eax+14h], edx
mov	eax, [ebx+4]
mov	ecx, [ebx]
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*8-18h]
add	esp, 8
lea	esi, [esp+94h+var_40]
lea	ecx, [esp+94h+var_7C]
mov	[esp+94h+var_68], edx
call	sub_A56F50
mov	edx, [eax]
mov	ecx, [esp+94h+var_68]
mov	[ecx+10h], edx
mov	eax, [eax+4]
mov	[ecx+14h], eax
lea	esi, [esp+94h+var_70]
lea	eax, [esp+94h+var_7C]
call	sub_A57180
mov	ecx, esi
push	ecx
mov	ecx, ebp
call	sub_620B40
mov	eax, esi
call	sub_A57000
push	eax
lea	esi, [esp+98h+var_28]
call	sub_620DE0
lea	eax, [esp+94h+var_7C]
call	sub_A56F00
mov	esi, eax
push	esi
lea	eax, [esp+98h+var_7C]
mov	[esp+98h+var_74], esi
call	sub_A56EF0
test	eax, eax
jz	loc_62145F
jmp	short loc_62122B

loc_621227:
mov	esi, [esp+94h+var_74]

loc_62122B:
push	esi
lea	esi, [esp+98h+var_40]
lea	eax, [esp+98h+var_7C]
call	sub_A56EB0
mov	edi, esi
call	sub_622670
test	eax, eax
jz	loc_621437	; default
			; jumptable 0062129E cases 2-15,18-31
mov	edx, [esp+94h+var_74]
push	edx
lea	eax, [esp+98h+var_7C]
call	sub_A56ED0
push	eax
lea	eax, [esp+98h+var_70]
call	sub_A56FF0
mov	ecx, [esp+94h+var_28]
mov	edx, esi
push	edx
mov	byte ptr [ecx+eax], 1
call	sub_A57110
and	eax, 0Fh
cmp	eax, 8
jz	short loc_621281
cmp	eax, 9
jnz	loc_621437	; default
			; jumptable 0062129E cases 2-15,18-31

loc_621281:
lea	eax, [esp+94h+var_40]
push	eax
call	sub_A57110
add	eax, 0FFFFFFF8h
cmp	eax, 21h	; switch 34 cases
ja	loc_621437	; default
			; jumptable 0062129E cases 2-15,18-31
movzx	ecx, ds:byte_621534[eax]
jmp	ds:off_621524[ecx*4] ; switch jump

loc_6212A5:		; jumptable 0062129E cases 0,1
push	0
lea	esi, [esp+98h+var_64]
lea	eax, [esp+98h+var_40]
call	sub_A57530
push	eax
mov	ecx, ebp
call	sub_621090
mov	eax, esi
call	sub_A572E0
jmp	loc_621437	; default
			; jumptable 0062129E cases 2-15,18-31

loc_6212C8:		; jumptable 0062129E cases 17,33
lea	esi, [esp+94h+var_60]
lea	eax, [esp+94h+var_40]
call	sub_A572C0
lea	esi, [esp+94h+var_78]
call	sub_A570B0
lea	eax, [esp+94h+var_60]
call	sub_A57280
mov	edx, esi
push	edx
mov	ecx, ebp
call	sub_620B40
xor	esi, esi
lea	eax, [esp+94h+var_78]
mov	[esp+94h+var_68], esi
call	sub_A57000
test	eax, eax
jle	loc_621437	; default
			; jumptable 0062129E cases 2-15,18-31

loc_621308:
xor	edi, edi
lea	eax, [esp+94h+var_18]
push	eax
push	esi
lea	eax, [esp+9Ch+var_78]
mov	[esp+9Ch+var_18], edi
mov	[esp+9Ch+var_14], edi
mov	[esp+9Ch+var_10], edi
mov	[esp+9Ch+var_C], edi
mov	[esp+9Ch+var_8], edi
call	sub_A57010
cmp	[esp+94h+var_10], 8
jnz	short loc_6213B5
mov	ecx, [esp+94h+var_18]
push	ecx
lea	esi, [esp+98h+var_5C]
lea	eax, [esp+98h+var_40]
call	sub_A572C0
lea	esi, [esp+98h+var_6C]
call	sub_A574D0
lea	eax, [esp+94h+var_5C]
call	sub_A57280
mov	eax, esi
call	sub_A56D40
mov	[esp+94h+var_54], eax
test	eax, eax
jle	short loc_6213A8

loc_621379:
push	0
push	edi
lea	eax, [esp+9Ch+var_38]
lea	ecx, [esp+9Ch+var_6C]
call	sub_A570E0
lea	esi, [esp+98h+var_58]
call	sub_A57510
push	eax
mov	ecx, ebp
call	sub_621090
mov	eax, esi
call	sub_A572E0
inc	edi
cmp	edi, [esp+94h+var_54]
jl	short loc_621379

loc_6213A8:
lea	eax, [esp+94h+var_6C]
call	sub_A57280
mov	esi, [esp+94h+var_68]

loc_6213B5:
inc	esi
lea	eax, [esp+94h+var_78]
mov	[esp+94h+var_68], esi
call	sub_A57000
cmp	esi, eax
jl	loc_621308
jmp	short loc_621437 ; default
			; jumptable 0062129E cases 2-15,18-31

loc_6213CD:		; jumptable 0062129E cases 16,32
lea	esi, [esp+94h+var_50]
lea	eax, [esp+94h+var_40]
call	sub_A572C0
call	sub_A56D40
mov	esi, eax
lea	eax, [esp+94h+var_50]
mov	[esp+94h+var_54], esi
call	sub_A57280
xor	edi, edi
test	esi, esi
jle	short loc_621437 ; default
			; jumptable 0062129E cases 2-15,18-31

loc_6213F4:
push	0
push	edi
lea	esi, [esp+9Ch+var_48]
lea	eax, [esp+9Ch+var_40]
call	sub_A572C0
mov	ecx, eax
lea	eax, [esp+9Ch+var_30]
call	sub_A570E0
lea	esi, [esp+98h+var_4C]
call	sub_A57510
push	eax
mov	ecx, ebp
call	sub_621090
mov	eax, esi
call	sub_A572E0
lea	eax, [esp+94h+var_48]
call	sub_A57280
inc	edi
cmp	edi, [esp+94h+var_54]
jl	short loc_6213F4

loc_621437:		; default
mov	edx, [esp+94h+var_74] ;	jumptable 0062129E cases 2-15,18-31
push	edx
lea	eax, [esp+98h+var_7C]
call	sub_A56EE0
mov	[esp+94h+var_74], eax
push	eax
lea	eax, [esp+98h+var_7C]
call	sub_A56EF0
test	eax, eax
jnz	loc_621227
mov	edi, [esp+94h+var_44]

loc_62145F:
mov	ecx, [ebx]
mov	edx, [ebp+44h]
lea	eax, [edi+edi*2]
mov	[ecx+eax*8+8], edx
mov	eax, [esp+94h+var_24]
add	eax, 7
and	eax, 0FFFFFFF8h
cdq
and	edx, 7
add	eax, edx
mov	edi, eax
lea	esi, [ebp+40h]
push	esi
lea	ecx, [esp+98h+var_80+3]
sar	edi, 3
mov	byte ptr [esp+98h+var_80+3], 0
call	sub_4D5020
mov	ebx, [esi+4]
mov	ecx, [esi+8]
lea	edx, [ebx+edi]
and	ecx, 3FFFFFFFh
cmp	ecx, edx
jge	short loc_6214BA
add	ecx, ecx
cmp	edx, ecx
jge	short loc_6214AD
mov	edx, ecx

loc_6214AD:
push	1
push	edx
push	esi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_6214BA:
mov	eax, [esi]
add	[esi+4], edi
add	eax, ebx
push	eax
lea	esi, [esp+98h+var_28]
call	sub_620FB0
mov	ecx, esi
push	ecx
lea	ecx, [esp+98h+var_80+3]
mov	byte ptr [esp+98h+var_80+3], 0
call	sub_4D5020
mov	edx, [esp+94h+var_20]
xor	esi, esi
mov	[esp+94h+var_24], esi
test	edx, edx
js	short loc_6214FF
mov	edi, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esp+98h+var_28]
mov	ecx, eax
mov	eax, [edi+10h]
push	edx
call	eax

loc_6214FF:
mov	[esp+94h+var_28], esi
mov	[esp+94h+var_20], 80000000h

loc_62150B:
lea	eax, [esp+94h+var_7C]
call	sub_A572E0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 84h
retn	8
sub_621090 endp

align 4
off_621524 dd offset loc_6212A5	; jump table for switch	statement
dd offset loc_6213CD
dd offset loc_6212C8
dd offset loc_621437
byte_621534 db	    0,	   0,	  3,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	1,     2,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	1,     2
align 10h



sub_621560 proc	near

var_B0=	dword ptr -0B0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_4C=	byte ptr -4Ch
var_44=	byte ptr -44h
var_3C=	byte ptr -3Ch
var_34=	byte ptr -34h
var_2C=	byte ptr -2Ch
var_24=	byte ptr -24h
var_1C=	byte ptr -1Ch
var_14=	byte ptr -14h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 9Ch
push	ebx
push	ebp
mov	ebp, [esp+0A4h+arg_0]
push	esi
mov	ebx, ecx
push	edi
mov	eax, ebp
mov	[esp+0ACh+var_8C], ebx
call	sub_A56D30
test	al, 20h
jz	short loc_6215D6
xor	edi, edi
cmp	[esp+0ACh+arg_4], edi
jle	loc_621B03	; default
			; jumptable 006215E6 cases 0,5

loc_621591:
push	edi
lea	eax, [esp+0B0h+var_54]
mov	ecx, ebp
call	sub_A570D0
lea	esi, [esp+0ACh+var_94]
call	sub_A574F0
mov	eax, esi
call	sub_A56D40
push	eax
mov	eax, esi
push	eax
mov	ecx, ebx
call	sub_621560
mov	eax, esi
call	sub_A57280
inc	edi
cmp	edi, [esp+0ACh+arg_4]
jl	short loc_621591
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_6215D6:
mov	eax, ebp
call	sub_A56D30
cmp	eax, 0Ah	; switch 11 cases
ja	loc_621B03	; default
			; jumptable 006215E6 cases 0,5
jmp	ds:off_621B10[eax*4] ; switch jump

loc_6215ED:		; jumptable 006215E6 case 1
mov	edi, [esp+0ACh+arg_4]
xor	esi, esi
test	edi, edi
jle	loc_621B03	; default
			; jumptable 006215E6 cases 0,5
mov	edi, edi

loc_621600:
push	esi
lea	eax, [esp+0B0h+var_2C]
mov	ecx, ebp
call	sub_A570D0
call	sub_A56CE0
push	eax
mov	eax, ebx
call	sub_AD1FA0
inc	esi
cmp	esi, edi
jl	short loc_621600
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_62162E:		; jumptable 006215E6 case 2
xor	esi, esi
cmp	[esp+0ACh+arg_4], esi
jle	loc_621B03	; default
			; jumptable 006215E6 cases 0,5
lea	ecx, [ecx+0]

loc_621640:
push	esi
lea	eax, [esp+0B0h+var_4C]
mov	ecx, ebp
call	sub_A570D0
call	sub_A56CE0
cdq
push	edx
push	eax
mov	edi, ebx
call	sub_620A40
inc	esi
cmp	esi, [esp+0ACh+arg_4]
jl	short loc_621640
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_621672:		; jumptable 006215E6 case 3
mov	edi, [esp+0ACh+arg_4]
xor	esi, esi
test	edi, edi
jle	loc_621B03	; default
			; jumptable 006215E6 cases 0,5

loc_621683:
push	esi
lea	eax, [esp+0B0h+var_1C]
mov	ecx, ebp
call	sub_A570D0
call	sub_A56CF0
fstp	[esp+0ACh+var_90]
fld	[esp+0ACh+var_90]
push	ecx
mov	eax, ebx
fstp	[esp+0B0h+var_B0]
call	sub_AD21C0
inc	esi
cmp	esi, edi
jl	short loc_621683
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_6216BC:		; jumptable 006215E6 case 4
mov	ebx, [esp+0ACh+arg_4]
xor	esi, esi
mov	[esp+0ACh+var_94], 3
test	ebx, ebx
jle	short loc_621700

loc_6216D1:
push	esi
lea	eax, [esp+0B0h+var_C]
mov	ecx, ebp
call	sub_A570D0
call	sub_A56D10
fldz
fcomp	dword ptr [eax+0Ch]
fnstsw	ax
test	ah, 44h
jp	short loc_6216F8
inc	esi
cmp	esi, ebx
jl	short loc_6216D1
jmp	short loc_621700

loc_6216F8:
mov	[esp+0ACh+var_94], 4

loc_621700:
mov	eax, [esp+0ACh+var_94]
mov	edi, [esp+0ACh+var_8C]
cdq
push	edx
push	eax
call	sub_620A40
xor	esi, esi
test	ebx, ebx
jle	loc_621B03	; default
			; jumptable 006215E6 cases 0,5
lea	ebx, [ebx+0]

loc_621720:
push	esi
lea	eax, [esp+0B0h+var_24]
mov	ecx, ebp
call	sub_A570D0
call	sub_A56D10
mov	ecx, [esp+0ACh+var_94]
push	ecx
mov	ecx, eax
mov	eax, edi
call	sub_AD21A0
inc	esi
cmp	esi, ebx
jl	short loc_621720
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_621754:		; jumptable 006215E6 cases 6,7
mov	eax, ebp
call	sub_A56D30
mov	ebx, [esp+0ACh+arg_4]
xor	esi, esi
lea	edi, ds:0FFFFFFF4h[eax*4]
test	ebx, ebx
jle	loc_621B03	; default
			; jumptable 006215E6 cases 0,5

loc_621773:
push	esi
lea	eax, [esp+0B0h+var_34]
mov	ecx, ebp
call	sub_A570D0
call	sub_A56D10
mov	ecx, eax
mov	eax, [esp+0ACh+var_8C]
push	edi
call	sub_AD21A0
inc	esi
cmp	esi, ebx
jl	short loc_621773
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_6217A2:		; jumptable 006215E6 case 9
lea	esi, [esp+0ACh+var_58]
mov	eax, ebp
call	sub_A570B0
call	sub_A57000
mov	edi, eax
xor	eax, eax
lea	edx, [esp+0ACh+var_84]
push	edx
lea	ecx, [esp+0B0h+var_98+3]
mov	[esp+0B0h+var_94], edi
mov	esi, edi
mov	[esp+0B0h+var_84], eax
mov	[esp+0B0h+var_80], eax
mov	[esp+0B0h+var_7C], 80000000h
mov	byte ptr [esp+0B0h+var_98+3], al
call	sub_4D5020
test	edi, edi
jz	loc_6218EC
mov	edx, [eax]
mov	edx, [edx+0Ch]
lea	ecx, [edi+edi*4]
add	ecx, ecx
add	ecx, ecx
mov	[esp+0ACh+var_90], ecx
lea	ecx, [esp+0ACh+var_90]
push	ecx
mov	ecx, eax
call	edx
mov	edx, [esp+0ACh+var_90]
mov	ecx, eax
mov	eax, 66666667h
imul	edx
sar	edx, 3
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
mov	eax, ecx
mov	ecx, esi
test	esi, esi
jnz	short loc_621823

loc_62181E:
mov	ecx, 80000000h

loc_621823:
mov	[esp+0ACh+var_84], eax
mov	[esp+0ACh+var_80], esi
mov	[esp+0ACh+var_7C], ecx
test	esi, esi
jle	short loc_621860
mov	ebx, eax

loc_621835:		; void *
push	ebx
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
xor	ecx, ecx
add	esp, 8
cmp	eax, ecx
jz	short loc_621854
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx

loc_621854:
add	ebx, 14h
sub	esi, 1
jnz	short loc_621835
mov	ebx, [esp+0ACh+var_8C]

loc_621860:
lea	eax, [esp+0ACh+var_84]
push	eax
lea	esi, [esp+0B0h+var_54]
mov	eax, ebp
call	sub_A570B0
push	eax
call	sub_A57210
push	edi
lea	esi, [esp+0B0h+var_68]
call	sub_620DE0
xor	eax, eax
cmp	edi, eax
mov	[esp+0ACh+var_90], eax
jle	loc_62192A
mov	eax, [esp+0ACh+var_84]
xor	ebx, ebx

loc_621894:
cmp	dword ptr [ebx+eax+8], 0
jz	short loc_621910
mov	ecx, [ebx+eax]
push	ecx
lea	esi, [esp+0B0h+var_88]
mov	eax, ebp
call	sub_A574D0
lea	eax, [esp+0ACh+var_88]
xor	esi, esi
call	sub_A56D40
test	eax, eax
jle	short loc_621903
lea	esp, [esp+0]

loc_6218C0:
push	esi
lea	eax, [esp+0B0h+var_14]
lea	ecx, [esp+0B0h+var_88]
call	sub_A570E0
mov	edi, eax
call	sub_622790
test	eax, eax
jnz	short loc_6218F3
lea	eax, [esp+0ACh+var_88]
inc	esi
call	sub_A56D40
cmp	esi, eax
jl	short loc_6218C0
jmp	short loc_6218FF

loc_6218EC:
xor	eax, eax
jmp	loc_62181E

loc_6218F3:
mov	edx, [esp+0ACh+var_68]
mov	eax, [esp+0ACh+var_90]
mov	byte ptr [edx+eax], 1

loc_6218FF:
mov	edi, [esp+0ACh+var_94]

loc_621903:
lea	eax, [esp+0ACh+var_88]
call	sub_A57280
mov	eax, [esp+0ACh+var_84]

loc_621910:
mov	ecx, [esp+0ACh+var_90]
inc	ecx
add	ebx, 14h
cmp	ecx, edi
mov	[esp+0ACh+var_90], ecx
jl	loc_621894
mov	ebx, [esp+0ACh+var_8C]
xor	eax, eax

loc_62192A:
mov	[esp+0ACh+var_78], eax
mov	[esp+0ACh+var_74], eax
mov	eax, [esp+0ACh+var_64]
add	eax, 7
and	eax, 0FFFFFFF8h
cdq
and	edx, 7
add	eax, edx
lea	ecx, [esp+0ACh+var_78]
mov	esi, eax
push	ecx
lea	ecx, [esp+0B0h+var_98+3]
mov	[esp+0B0h+var_70], 80000000h
sar	esi, 3
mov	byte ptr [esp+0B0h+var_98+3], 0
call	sub_4D5020
mov	ecx, [esp+0ACh+var_70]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_621989
add	ecx, ecx
cmp	esi, ecx
jl	short loc_621978
mov	ecx, esi

loc_621978:
push	1
push	ecx
lea	edx, [esp+0B4h+var_78]
push	edx
push	eax
call	sub_121B8C0
add	esp, 10h

loc_621989:
mov	eax, [esp+0ACh+var_78]
mov	[esp+0ACh+var_74], esi
push	eax
lea	esi, [esp+0B0h+var_68]
call	sub_620FB0
mov	ecx, [esp+0ACh+var_74]
mov	edx, [esp+0ACh+var_78]
push	ecx
push	edx
mov	eax, ebx
call	sub_AD1F80
lea	eax, [esp+0ACh+var_78]
push	eax
lea	ecx, [esp+0B0h+var_98+3]
mov	byte ptr [esp+0B0h+var_98+3], 0
call	sub_4D5020
mov	edx, [esp+0ACh+var_70]
xor	edi, edi
mov	[esp+0ACh+var_74], edi
test	edx, edx
js	short loc_6219E2
mov	ecx, [esp+0ACh+var_78]
mov	esi, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_6219E2:
cmp	[esp+0ACh+var_94], 0
jle	short loc_621A32
xor	ebx, ebx
jmp	short loc_6219F0
align 10h

loc_6219F0:
mov	eax, [esp+0ACh+var_68]
cmp	byte ptr [eax+edi], 0
jz	short loc_621A28
mov	ecx, [esp+0ACh+var_84]
mov	edx, [ebx+ecx]
push	edx
lea	esi, [esp+0B0h+var_90]
mov	eax, ebp
call	sub_A574D0
mov	eax, [esp+0ACh+arg_4]
push	eax
mov	ecx, esi
push	ecx
mov	ecx, [esp+0B4h+var_8C]
call	sub_621560
mov	eax, esi
call	sub_A57280

loc_621A28:
inc	edi
add	ebx, 14h
cmp	edi, [esp+0ACh+var_94]
jl	short loc_6219F0

loc_621A32:
lea	esi, [esp+0ACh+var_68]
call	sub_622310
lea	edx, [esp+0ACh+var_84]
push	edx
lea	ecx, [esp+0B0h+var_98+3]
mov	byte ptr [esp+0B0h+var_98+3], 0
call	sub_4D5020
mov	edx, [esp+0ACh+var_7C]
mov	[esp+0ACh+var_80], 0
test	edx, edx
js	loc_621B03	; default
			; jumptable 006215E6 cases 0,5
mov	esi, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*4]
mov	edx, [esp+0ACh+var_84]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [esi+10h]
push	edx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_621A8B:		; jumptable 006215E6 case 8
xor	edi, edi
cmp	[esp+0ACh+arg_4], edi
jle	short loc_621B03 ; default
			; jumptable 006215E6 cases 0,5

loc_621A96:
push	edi
lea	eax, [esp+0B0h+var_44]
mov	ecx, ebp
call	sub_A570D0
lea	esi, [esp+0ACh+var_6C]
call	sub_A57510
push	eax
mov	ecx, ebx
call	sub_621D00
mov	eax, esi
call	sub_A572E0
inc	edi
cmp	edi, [esp+0ACh+arg_4]
jl	short loc_621A96
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8

loc_621AD1:		; jumptable 006215E6 case 10
xor	edi, edi
cmp	[esp+0ACh+arg_4], edi
jle	short loc_621B03 ; default
			; jumptable 006215E6 cases 0,5
lea	esp, [esp+0]

loc_621AE0:
push	edi
lea	eax, [esp+0B0h+var_3C]
mov	ecx, ebp
call	sub_A570D0
call	sub_A56D00
push	eax
mov	esi, ebx
call	sub_620AC0
inc	edi
cmp	edi, [esp+0ACh+arg_4]
jl	short loc_621AE0

loc_621B03:		; default
pop	edi		; jumptable 006215E6 cases 0,5
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8
sub_621560 endp

off_621B10 dd offset loc_621B03	; jump table for switch	statement
dd offset loc_6215ED
dd offset loc_62162E
dd offset loc_621672
dd offset loc_6216BC
dd offset loc_621B03
dd offset loc_621754
dd offset loc_621754
dd offset loc_621A8B
dd offset loc_6217A2
dd offset loc_621AD1
align 10h



sub_621B40 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
push	edi
mov	edi, eax
push	edi
call	sub_A57110
test	al, 20h
jz	short loc_621B81
lea	esi, [esp+14h+arg_0]
mov	eax, edi
call	sub_A572C0
mov	eax, esi
call	sub_A56D40
push	eax
mov	eax, esi
push	eax
mov	ecx, ebx
call	sub_621560
mov	eax, esi
call	sub_A57280
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_621B81:
push	edi
call	sub_A57110
test	al, 10h
jz	short loc_621C06
lea	esi, [esp+14h+arg_0]
mov	eax, edi
call	sub_A572C0
mov	eax, esi
call	sub_A56D40
mov	ebp, eax
cdq
push	edx
push	eax
mov	edi, ebx
call	sub_620A40
mov	eax, esi
call	sub_A56D30
cmp	eax, 9
jnz	short loc_621BE8
mov	ecx, [esp+14h+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_621BE8
lea	esi, [esp+14h+arg_4]
lea	eax, [esp+14h+arg_0]
call	sub_A570B0
mov	eax, esi
call	sub_A57050
push	eax
lea	edi, [ebx+20h]
xor	eax, eax
call	sub_603480
cdq
push	edx
push	eax
mov	edi, ebx
call	sub_620A40

loc_621BE8:
push	ebp
lea	edx, [esp+18h+arg_0]
push	edx
mov	ecx, ebx
call	sub_621560
lea	eax, [esp+14h+arg_0]
call	sub_A57280
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_621C06:
push	edi
call	sub_A57110
dec	eax
cmp	eax, 9		; switch 10 cases
ja	loc_621CC6	; default
			; jumptable 00621C16 case 4
jmp	ds:off_621CD0[eax*4] ; switch jump

loc_621C1D:		; jumptable 00621C16 case 0
mov	eax, edi
call	sub_A56E80
push	eax
mov	eax, ebx
call	sub_AD1FA0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_621C34:		; jumptable 00621C16 case 1
mov	eax, edi
call	sub_A56E80
cdq
push	edx
push	eax
mov	edi, ebx
call	sub_620A40
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_621C4D:		; jumptable 00621C16 case 2
mov	eax, edi
call	sub_A56E50
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
push	ecx
mov	eax, ebx
fstp	[esp+18h+var_18]
call	sub_AD21C0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_621C6F:		; jumptable 00621C16 cases 3,5,6
push	edi
call	sub_A57110
lea	esi, ds:0FFFFFFF4h[eax*4]
mov	eax, edi
call	sub_A56E70
mov	ecx, eax
push	esi
mov	eax, ebx
call	sub_AD21A0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_621C95:		; jumptable 00621C16 cases 7,8
lea	esi, [esp+14h+arg_4]
mov	eax, edi
call	sub_A57530
push	eax
mov	ecx, ebx
call	sub_621D00
mov	eax, esi
call	sub_A572E0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_621CB7:		; jumptable 00621C16 case 9
mov	eax, edi
call	sub_A56E60
push	eax
mov	esi, ebx
call	sub_620AC0

loc_621CC6:		; default
pop	edi		; jumptable 00621C16 case 4
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_621B40 endp

align 10h
off_621CD0 dd offset loc_621C1D	; jump table for switch	statement
dd offset loc_621C34
dd offset loc_621C4D
dd offset loc_621C6F
dd offset loc_621CC6
dd offset loc_621C6F
dd offset loc_621C6F
dd offset loc_621C95
dd offset loc_621C95
dd offset loc_621CB7
align 10h


; Attributes: bp-based frame

sub_621D00 proc	near

anonymous_0= qword ptr -50h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_0]
sub	esp, 3Ch
push	ebx
push	esi
push	edi
mov	ebx, ecx
push	eax
lea	ecx, [esp+4Ch+var_38]
push	ecx
lea	edi, [ebx+58h]
call	sub_622150
lea	ecx, [esp+48h+var_38]
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jz	short loc_621D49
push	0
push	6
mov	edi, ebx
call	sub_620A40
lea	eax, [esp+48h+var_38]
call	sub_A572E0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_621D49:
lea	esi, [esp+48h+var_28]
lea	ecx, [esp+48h+var_38]
call	sub_A56F50
mov	edx, [eax+4]
mov	eax, [eax]
push	edx
push	eax
lea	ecx, [ebx+34h]
call	sub_6224D0
mov	edx, [ebx+4Ch]
lea	ecx, [eax+eax*2]
cmp	dword ptr [edx+ecx*8+4], 0
lea	esi, [edx+ecx*8]
mov	[esp+48h+var_34], esi
jl	short loc_621DA1
push	0
push	5
mov	edi, ebx
call	sub_620A40
mov	eax, [esi+4]
cdq
push	edx
push	eax
call	sub_620A40
lea	eax, [esp+48h+var_38]
call	sub_A572E0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_621DA1:
lea	esi, [esp+48h+var_30]
lea	eax, [esp+48h+var_38]
call	sub_A57180
mov	eax, esi
push	eax
mov	ecx, ebx
call	sub_620B40
mov	esi, [esp+48h+var_34]
cmp	dword ptr [esi+0Ch], 1
mov	[esp+48h+var_2C], eax
push	0
mov	edi, ebx
jle	short loc_621DDC
push	4
call	sub_620A40
mov	ecx, [ebx+30h]
mov	[esi+4], ecx
inc	dword ptr [ebx+30h]
jmp	short loc_621DE3

loc_621DDC:
push	3
call	sub_620A40

loc_621DE3:
mov	eax, [esp+48h+var_2C]
cdq
push	edx
push	eax
mov	edi, ebx
mov	dword ptr [esi], 1
call	sub_620A40
lea	eax, [esp+48h+var_30]
call	sub_A57000
mov	edi, eax
push	edi
lea	esi, [esp+4Ch+var_10]
call	sub_620DE0
mov	eax, [esp+48h+var_C]
add	eax, 7
and	eax, 0FFFFFFF8h
cdq
and	edx, 7
add	eax, edx
mov	edx, [esp+48h+var_34]
mov	ecx, [edx+8]
add	ecx, [ebx+40h]
sar	eax, 3
mov	edx, eax
push	eax
mov	dword ptr [esp+4Ch+var_28+4], eax
or	edx, 80000000h
push	ecx
mov	eax, ebx
mov	dword ptr [esp+50h+var_28], ecx
mov	[esp+50h+var_20], edx
call	sub_AD1F80
mov	eax, dword ptr [esp+48h+var_28+4]
mov	ecx, dword ptr [esp+48h+var_28]
push	eax
push	ecx
call	sub_620E90
lea	edx, [esp+48h+var_28]
push	edx
lea	ecx, [esp+4Ch+var_39]
mov	[esp+4Ch+var_39], 0
call	sub_4D5020
mov	edx, [esp+48h+var_20]
mov	dword ptr [esp+48h+var_28+4], 0
test	edx, edx
js	short loc_621E8D
mov	ecx, dword ptr [esp+48h+var_28]
mov	esi, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, eax
call	edx

loc_621E8D:
xor	eax, eax
mov	[esp+48h+var_1C], eax
mov	[esp+48h+var_18], eax
mov	[esp+48h+var_39], al
lea	eax, [esp+48h+var_1C]
push	eax
lea	ecx, [esp+4Ch+var_39]
mov	esi, edi
mov	[esp+4Ch+var_14], 80000000h
call	sub_4D5020
test	edi, edi
jz	loc_622040
mov	edx, [eax]
mov	edx, [edx+0Ch]
lea	ecx, [edi+edi*4]
add	ecx, ecx
add	ecx, ecx
mov	[esp+48h+var_34], ecx
lea	ecx, [esp+48h+var_34]
push	ecx
mov	ecx, eax
call	edx
mov	edx, [esp+48h+var_34]
mov	ecx, eax
mov	eax, 66666667h
imul	edx
sar	edx, 3
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
mov	eax, ecx
mov	ecx, esi
test	esi, esi
jnz	short loc_621EF8

loc_621EF3:
mov	ecx, 80000000h

loc_621EF8:
mov	[esp+48h+var_1C], eax
mov	[esp+48h+var_18], esi
mov	[esp+48h+var_14], ecx
test	esi, esi
jle	short loc_621F39
mov	[esp+48h+var_34], eax

loc_621F0C:
mov	eax, [esp+48h+var_34]
push	eax		; void *
push	14h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
xor	ecx, ecx
add	esp, 8
cmp	eax, ecx
jz	short loc_621F2F
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx

loc_621F2F:
add	[esp+48h+var_34], 14h
sub	esi, 1
jnz	short loc_621F0C

loc_621F39:
lea	ecx, [esp+48h+var_1C]
push	ecx
lea	edx, [esp+4Ch+var_30]
push	edx
call	sub_A57210
xor	esi, esi
xor	eax, eax
cmp	edi, esi
mov	[esp+48h+var_34], eax
jle	short loc_621FAA
mov	[esp+48h+var_30], esi
jmp	short loc_621F60
align 10h

loc_621F60:
mov	ecx, [esp+48h+var_10]
cmp	byte ptr [ecx+eax], 0
jz	short loc_621F9C
mov	edx, [esp+48h+var_1C]
mov	eax, [esp+48h+var_30]
mov	ecx, [eax+edx]
add	eax, edx
mov	[esp+48h+var_2C], eax
push	ecx
lea	esi, [esp+4Ch+var_28]
lea	eax, [esp+4Ch+var_38]
call	sub_A56F10
mov	edx, [esp+48h+var_2C]
push	edx
push	ebx
mov	eax, esi
call	sub_621B40
mov	eax, [esp+48h+var_34]
xor	esi, esi

loc_621F9C:
add	[esp+48h+var_30], 14h
inc	eax
cmp	eax, edi
mov	[esp+48h+var_34], eax
jl	short loc_621F60

loc_621FAA:
lea	eax, [esp+48h+var_1C]
push	eax
lea	ecx, [esp+4Ch+var_39]
mov	[esp+4Ch+var_39], 0
call	sub_4D5020
mov	edx, [esp+48h+var_14]
mov	edi, 80000000h
mov	[esp+48h+var_18], esi
test	edi, edx
jnz	short loc_621FEA
mov	ebx, [eax]
and	edx, 3FFFFFFFh
lea	ecx, [edx+edx*4]
mov	edx, [esp+48h+var_1C]
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, eax
mov	eax, [ebx+10h]
push	edx
call	eax

loc_621FEA:
lea	ecx, [esp+48h+var_10]
push	ecx
lea	ecx, [esp+4Ch+var_39]
mov	[esp+4Ch+var_1C], esi
mov	[esp+4Ch+var_14], edi
mov	[esp+4Ch+var_39], 0
call	sub_4D5020
mov	edx, [esp+48h+var_8]
mov	[esp+48h+var_C], esi
test	edi, edx
jnz	short loc_622026
mov	ebx, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esp+4Ch+var_10]
mov	ecx, eax
mov	eax, [ebx+10h]
push	edx
call	eax

loc_622026:
lea	eax, [esp+48h+var_38]
mov	[esp+48h+var_10], esi
mov	[esp+48h+var_8], edi
call	sub_A572E0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_622040:
xor	eax, eax
jmp	loc_621EF3
sub_621D00 endp

align 10h


; Attributes: bp-based frame

sub_622050 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	edi
push	0CAB00D1Eh
mov	edi, eax
call	sub_AD2220
push	0D011FACEh
mov	eax, edi
call	sub_AD2220
push	0
push	1
call	sub_620A40
push	0
push	0
call	sub_620A40
push	0
push	esi
mov	ecx, edi
call	sub_621090
push	esi
mov	ecx, edi
call	sub_621D00
xor	eax, eax
pop	edi
mov	esp, ebp
pop	ebp
retn
sub_622050 endp

align 10h



sub_6220A0 proc	near

var_1= byte ptr	-1

push	ecx
push	ebp
push	esi
push	edi
mov	edi, eax
xor	ebp, ebp
cmp	[edi+14h], ebp
jle	short loc_6220DF
lea	ecx, [ecx+0]

loc_6220B0:
mov	eax, [edi+10h]
mov	esi, [eax+ebp*4]
test	esi, esi
jz	short loc_6220D9
mov	eax, esi
call	sub_A572E0
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	4
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_6220D9:
inc	ebp
cmp	ebp, [edi+14h]
jl	short loc_6220B0

loc_6220DF:
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4D5020
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_622116
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx

loc_622116:
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
lea	esi, [edi+4]
push	esi
lea	ecx, [esp+14h+var_1]
mov	[esp+14h+var_1], 0
call	sub_4A00D0
mov	edi, eax
call	sub_622560
pop	edi
pop	esi
pop	ebp
pop	ecx
retn
sub_6220A0 endp

align 10h



sub_622150 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
cmp	dword ptr [edi], 0
push	ebx
mov	ebx, [esp+14h+arg_0]
push	ebp
mov	ebp, [esp+18h+arg_4]
push	esi
jz	short loc_6221A6
mov	ecx, ebp
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	short loc_6221A6
lea	esi, [esp+1Ch+var_C]
call	sub_A56F50
mov	eax, [esp+1Ch+var_8]
mov	ecx, [esp+1Ch+var_C]
push	eax
push	ecx
lea	ecx, [edi+4]
call	sub_6224D0
cmp	eax, 0FFFFFFFFh
jz	short loc_6221A6
mov	edx, [edi+10h]
mov	eax, [edx+eax*4]
mov	ecx, [eax]
mov	eax, ebx
call	sub_A57360
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6221A6:
mov	ecx, ebp
mov	eax, ebx
call	sub_A57340
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_622150 endp

align 10h



sub_6221C0 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
cmp	dword ptr [edi], 0
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_4]
push	esi
jz	loc_6222DB
mov	ecx, ebp
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
test	eax, eax
jnz	loc_6222DB
lea	esi, [esp+1Ch+var_C]
call	sub_A56F50
mov	ebx, [esp+1Ch+var_8]
mov	eax, [esp+1Ch+var_C]
push	ebx
lea	esi, [edi+4]
push	eax
mov	ecx, esi
call	sub_6224D0
cmp	eax, 0FFFFFFFFh
jnz	loc_6222EF
mov	ecx, [edi]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	ebp
lea	eax, [esp+20h+var_10]
push	eax
call	edx
mov	eax, ebp
lea	ecx, [esp+1Ch+var_10]
call	sub_A571A0
test	al, al
jz	loc_6222D2
mov	eax, [edi+14h]
push	eax
mov	eax, [esp+20h+var_C]
push	ebx
push	eax
push	esi
lea	ecx, [esp+2Ch+arg_4]
mov	byte ptr [esp+2Ch+arg_4], 0
call	sub_4A00D0
push	eax
mov	eax, esi
call	sub_622420
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	4
call	eax
test	eax, eax
jz	short loc_622273
lea	ecx, [esp+1Ch+var_10]
call	sub_A57340
mov	ebx, eax
jmp	short loc_622275

loc_622273:
xor	ebx, ebx

loc_622275:
lea	esi, [edi+10h]
push	esi
lea	ecx, [esp+20h+arg_4]
mov	byte ptr [esp+20h+arg_4], 0
call	sub_4D5020
mov	ecx, [esi+8]
and	ecx, 3FFFFFFFh
cmp	[esi+4], ecx
jnz	short loc_6222A1
push	4
push	esi
push	eax
call	sub_121B830
add	esp, 0Ch

loc_6222A1:
mov	eax, [esi+4]
mov	edx, [esi]
lea	ecx, [edx+eax*4]
inc	eax
mov	[esi+4], eax
mov	esi, [esp+1Ch+arg_0]
mov	[ecx], ebx
lea	ecx, [esp+1Ch+var_10]
mov	eax, esi
call	sub_A57340
lea	eax, [esp+1Ch+var_10]
call	sub_A572E0
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6222D2:
lea	eax, [esp+1Ch+var_10]
call	sub_A572E0

loc_6222DB:
mov	eax, [esp+1Ch+arg_0]
mov	ecx, ebp
call	sub_A57340
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6222EF:
mov	ecx, [edi+10h]
mov	edx, [ecx+eax*4]
mov	ecx, [edx]
mov	eax, [esp+1Ch+arg_0]
call	sub_A57360
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6221C0 endp

align 10h



sub_622310 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	ecx, [esp+8+var_1]
mov	[esp+8+var_1], 0
call	sub_4D5020
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_622343
mov	ecx, [esi]
push	ebp
mov	ebp, [eax]
and	edx, 3FFFFFFFh
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_622343:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	ecx
retn
sub_622310 endp

align 10h



sub_622360 proc	near

arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
lea	eax, [ebp+58h]
call	sub_6220A0
lea	esi, [ebp+4Ch]
xor	ebx, ebx
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], bl
call	sub_4D5020
mov	edx, [esi+8]
mov	edi, 80000000h
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_6223AF
and	edx, 3FFFFFFFh
lea	edx, [edx+edx*2]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_6223AF:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+40h]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], bl
call	sub_4D5020
mov	edx, [esi+8]
mov	[esi+4], ebx
test	edi, edx
jnz	short loc_6223E2
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esi]
mov	ecx, eax
mov	eax, [eax]
mov	eax, [eax+10h]
push	edx
call	eax

loc_6223E2:
mov	[esi], ebx
mov	[esi+8], edi
lea	esi, [ebp+34h]
push	esi
lea	ecx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], bl
call	sub_4A00D0
mov	edi, eax
call	sub_622560
lea	esi, [ebp+20h]
call	sub_603220
lea	esi, [ebp+10h]
call	sub_603220
mov	esi, ebp
call	sub_AD2280
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_622360 endp

align 10h



sub_622420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	esi
mov	esi, eax
mov	ecx, [esi+4]
mov	eax, [esi+8]
and	ecx, 7FFFFFFFh
add	ecx, ecx
cmp	ecx, eax
push	edi
jle	short loc_622448
lea	edx, [eax+eax+2]
mov	eax, [esp+0Ch+arg_0]
push	edx
push	eax
mov	ecx, esi
call	sub_6225A0

loc_622448:
mov	ecx, [esp+0Ch+arg_4]
mov	ebx, [esi+8]
mov	edi, [esi]
shr	ecx, 4
imul	ecx, 9E3779B1h
and	ecx, ebx
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
cmp	dword ptr [edi+edx], 0
mov	eax, 1
jz	short loc_62249A
push	ebp
nop

loc_622470:
mov	ebp, [esp+10h+arg_4]
cmp	[edi+edx], ebp
jnz	short loc_622483
mov	ebp, [esp+10h+arg_8]
cmp	[edi+edx+4], ebp
jz	short loc_622497

loc_622483:
inc	ecx
and	ecx, ebx
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
mov	ebp, edi
cmp	dword ptr [edx+ebp], 0
jnz	short loc_622470
jmp	short loc_622499

loc_622497:
xor	eax, eax

loc_622499:
pop	ebp

loc_62249A:
add	[esi+4], eax
mov	edx, [esp+0Ch+arg_4]
lea	ecx, [ecx+ecx*2]
add	ecx, ecx
add	ecx, ecx
mov	[edi+ecx], edx
mov	edx, [esp+0Ch+arg_8]
mov	[edi+ecx+4], edx
mov	edx, [esi]
mov	esi, [esp+0Ch+arg_C]
pop	edi
mov	[ecx+edx+8], esi
pop	esi
pop	ebx
retn	10h
sub_622420 endp

align 10h



sub_6224D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [ecx+8]
push	edi
test	esi, esi
jle	short loc_622518
mov	edi, [esp+0Ch+arg_0]
mov	edx, [ecx]
mov	eax, edi
shr	eax, 4
imul	eax, 9E3779B1h
and	eax, esi
lea	ecx, [eax+eax*2]
cmp	dword ptr [edx+ecx*4], 0
lea	ecx, [edx+ecx*4]
jz	short loc_622518
mov	ebx, [esp+0Ch+arg_4]
lea	ecx, [ecx+0]

loc_622500:
cmp	[ecx], edi
jnz	short loc_622509
cmp	[ecx+4], ebx
jz	short loc_622521

loc_622509:
inc	eax
and	eax, esi
lea	ecx, [eax+eax*2]
cmp	dword ptr [edx+ecx*4], 0
lea	ecx, [edx+ecx*4]
jnz	short loc_622500

loc_622518:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8

loc_622521:
pop	edi
lea	eax, [eax+eax*2]
mov	eax, [edx+eax*4+8]
pop	esi
pop	ebx
retn	8
sub_6224D0 endp

align 10h



sub_622530 proc	near
mov	ecx, [edx+8]
inc	ecx
test	ecx, ecx
jle	short loc_622552
xor	eax, eax
push	esi
jmp	short loc_622540
align 10h

loc_622540:
mov	esi, [edx]
mov	dword ptr [eax+esi], 0
add	eax, 0Ch
sub	ecx, 1
jnz	short loc_622540
pop	esi

loc_622552:
and	dword ptr [edx+4], 80000000h
retn
sub_622530 endp

align 10h



sub_622560 proc	near
mov	edx, esi
call	sub_622530
test	dword ptr [esi+4], 80000000h
jnz	short locret_622588
mov	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+8]
inc	eax
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
push	eax
push	ecx
mov	ecx, edi
call	edx

locret_622588:
retn
sub_622560 endp

align 10h



sub_622590 proc	near
push	8
push	eax
call	sub_6225A0
retn
sub_622590 endp

align 10h


; Attributes: bp-based frame

sub_6225A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
push	ebx
push	esi
push	edi
push	8
push	eax
mov	esi, ecx
call	sub_4DDC50
mov	ecx, [esi]
mov	ebx, [esi+8]
mov	edi, eax
mov	eax, [esi+4]
and	eax, 80000000h
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_8], ecx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [edi+edi*2]
add	eax, eax
add	esp, 8
add	eax, eax
push	eax
inc	ebx
call	edx
mov	[esi], eax
test	edi, edi
jle	short loc_622601
xor	eax, eax
mov	ecx, edi

loc_6225F0:
mov	edx, [esi]
mov	dword ptr [eax+edx], 0
add	eax, 0Ch
sub	ecx, 1
jnz	short loc_6225F0

loc_622601:
dec	edi
mov	dword ptr [esi+4], 0
mov	[esi+8], edi
test	ebx, ebx
jle	short loc_62263D
mov	edi, [esp+18h+var_8]
mov	[esp+18h+var_C], ebx

loc_622618:
cmp	dword ptr [edi], 0
jz	short loc_622633
mov	eax, [edi+8]
mov	ecx, [edi+4]
mov	edx, [edi]
push	eax
mov	eax, [ebp+arg_0]
push	ecx
push	edx
push	eax
mov	eax, esi
call	sub_622420

loc_622633:
add	edi, 0Ch
sub	[esp+18h+var_C], 1
jnz	short loc_622618

loc_62263D:
cmp	[esp+18h+var_4], 0
jnz	short loc_62265B
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+8]
lea	eax, [ebx+ebx*2]
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+1Ch+var_8]
push	eax
call	edx

loc_62265B:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6225A0 endp

align 10h



sub_622670 proc	near

var_8= byte ptr	-8
var_4= byte ptr	-4

sub	esp, 8
push	esi
push	edi
call	sub_A57110
cmp	eax, 10h
jl	short loc_6226A1
lea	esi, [esp+0Ch+var_8]
mov	eax, edi
call	sub_A572C0
call	sub_A56D40
mov	esi, eax
lea	eax, [esp+0Ch+var_8]
call	sub_A57280
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_6226A1:
push	edi
call	sub_A57110
cmp	eax, 10h	; switch 17 cases
ja	loc_622751	; default
			; jumptable 006226B7 cases 0,5,11-15
movzx	eax, ds:byte_622778[eax]
jmp	ds:off_622758[eax*4] ; switch jump

loc_6226BE:		; jumptable 006226B7 cases 1,2
mov	eax, edi
call	sub_A56E80
neg	eax
sbb	eax, eax
neg	eax
pop	esi
add	esp, 8
retn

loc_6226D0:		; jumptable 006226B7 case 3
mov	eax, edi
call	sub_A56E50
fcomp	dword ptr ds:xmmword_1479F30
fnstsw	ax
test	ah, 44h
jnp	short loc_622751 ; default
			; jumptable 006226B7 cases 0,5,11-15

loc_6226E4:		; jumptable 006226B7 cases 4,6,7
mov	eax, 1
pop	esi
add	esp, 8
retn

loc_6226EE:		; jumptable 006226B7 cases 8,9
lea	esi, [esp+0Ch+var_8]
mov	eax, edi
call	sub_A57530
mov	ecx, eax
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
mov	esi, eax
neg	esi
sbb	esi, esi
lea	eax, [esp+0Ch+var_8]
inc	esi
call	sub_A572E0
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_622717:		; jumptable 006226B7 case 16
lea	esi, [esp+0Ch+var_4]
mov	eax, edi
call	sub_A572C0
call	sub_A56D40
mov	esi, eax
neg	esi
sbb	esi, esi
lea	eax, [esp+0Ch+var_4]
neg	esi
call	sub_A57280
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_62273F:		; jumptable 006226B7 case 10
mov	eax, edi
call	sub_A56E60
neg	eax
sbb	eax, eax
neg	eax
pop	esi
add	esp, 8
retn

loc_622751:		; default
xor	eax, eax	; jumptable 006226B7 cases 0,5,11-15
pop	esi
add	esp, 8
retn
sub_622670 endp

off_622758 dd offset loc_622751	; jump table for switch	statement
dd offset loc_6226BE
dd offset loc_6226D0
dd offset loc_6226E4
dd offset loc_6226EE
dd offset loc_62273F
dd offset loc_622717
dd offset loc_622751
byte_622778 db	    0,	   1,	  1,	 2 ; indirect table for	switch statement
db	3,     7,     3,     3
db	4,     4,     5,     7
db	7,     7,     7,     7
db	6
align 10h



sub_622790 proc	near

var_8= byte ptr	-8
var_4= byte ptr	-4

sub	esp, 8
push	esi
mov	eax, edi
call	sub_A56D20
cmp	eax, 10h
mov	eax, edi
jl	short loc_6227C2
lea	esi, [esp+0Ch+var_8]
call	sub_A574F0
call	sub_A56D40
mov	esi, eax
lea	eax, [esp+0Ch+var_8]
call	sub_A57280
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_6227C2:
call	sub_A56D20
cmp	eax, 10h	; switch 17 cases
ja	loc_622871	; default
			; jumptable 006227D7 cases 0,5,11-15
movzx	eax, ds:byte_622898[eax]
jmp	ds:off_622878[eax*4] ; switch jump

loc_6227DE:		; jumptable 006227D7 cases 1,2
mov	eax, edi
call	sub_A56CE0
neg	eax
sbb	eax, eax
neg	eax
pop	esi
add	esp, 8
retn

loc_6227F0:		; jumptable 006227D7 case 3
mov	eax, edi
call	sub_A56CF0
fcomp	dword ptr ds:xmmword_1479F30
fnstsw	ax
test	ah, 44h
jnp	short loc_622871 ; default
			; jumptable 006227D7 cases 0,5,11-15

loc_622804:		; jumptable 006227D7 cases 4,6,7
mov	eax, 1
pop	esi
add	esp, 8
retn

loc_62280E:		; jumptable 006227D7 cases 8,9
lea	esi, [esp+0Ch+var_8]
mov	eax, edi
call	sub_A57510
mov	ecx, eax
call	?isEmpty@DName@@QBEHXZ ; DName::isEmpty(void)
mov	esi, eax
neg	esi
sbb	esi, esi
lea	eax, [esp+0Ch+var_8]
inc	esi
call	sub_A572E0
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_622837:		; jumptable 006227D7 case 16
lea	esi, [esp+0Ch+var_4]
mov	eax, edi
call	sub_A574F0
call	sub_A56D40
mov	esi, eax
neg	esi
sbb	esi, esi
lea	eax, [esp+0Ch+var_4]
neg	esi
call	sub_A57280
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_62285F:		; jumptable 006227D7 case 10
mov	eax, edi
call	sub_A56D00
neg	eax
sbb	eax, eax
neg	eax
pop	esi
add	esp, 8
retn

loc_622871:		; default
xor	eax, eax	; jumptable 006227D7 cases 0,5,11-15
pop	esi
add	esp, 8
retn
sub_622790 endp

off_622878 dd offset loc_622871	; jump table for switch	statement
dd offset loc_6227DE
dd offset loc_6227F0
dd offset loc_622804
dd offset loc_62280E
dd offset loc_62285F
dd offset loc_622837
dd offset loc_622871
byte_622898 db	    0,	   1,	  1,	 2 ; indirect table for	switch statement
db	3,     7,     3,     3
db	4,     4,     5,     7
db	7,     7,     7,     7
db	6
align 10h



sub_6228B0 proc	near

var_1= byte ptr	-1

push	ecx
push	ebp
push	esi
xor	esi, esi
cmp	[edi+1Ch], esi
jle	short loc_6228E2
lea	ebx, [ebx+0]

loc_6228C0:
mov	eax, [edi+18h]
mov	ebp, [eax+esi*4]
call	sub_AD5DD0
push	ebp
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
push	eax
call	sub_AD5D00
inc	esi
add	esp, 8
cmp	esi, [edi+1Ch]
jl	short loc_6228C0

loc_6228E2:
lea	esi, [edi+18h]
push	esi
lea	ecx, [esp+10h+var_1]
mov	[esp+10h+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_622919
mov	ecx, [esi]
mov	ebp, [eax]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx

loc_622919:
lea	ecx, [edi+0Ch]
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 80000000h
call	sub_4DCDB0
pop	esi
mov	ecx, edi
pop	ebp
add	esp, 4
jmp	sub_4DCDB0
sub_6228B0 endp

align 10h



sub_622940 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, eax
lea	eax, [esp+18h+var_4]
push	eax
mov	esi, ecx
mov	eax, edi
call	sub_601CB0
test	eax, eax
jnz	short loc_622967
mov	eax, [esp+18h+var_4]
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4

loc_622967:
push	ecx
mov	eax, esp
push	esi
push	edi
mov	dword ptr [eax], 0
call	sub_12C74C0
add	esp, 0Ch
lea	ebx, [esi+18h]
push	ebx
lea	ecx, [esp+1Ch+var_5]
mov	edi, eax
mov	[esp+1Ch+var_5], 0
call	sub_4A00D0
mov	ecx, [ebx+8]
and	ecx, 3FFFFFFFh
cmp	[ebx+4], ecx
jnz	short loc_6229A8
push	4
push	ebx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_6229A8:
mov	edx, [ebx+4]
mov	eax, [ebx]
mov	ecx, [esp+18h+arg_0]
lea	eax, [eax+edx*4]
mov	[eax], edi
inc	dword ptr [ebx+4]
add	esi, 0Ch
push	ecx
call	sub_A58400
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_622940 endp

align 10h



sub_6229D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A4F350
test	[esp+4+arg_0], 1
jz	short loc_6229FA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6229FA:
mov	eax, esi
pop	esi
retn	4
sub_6229D0 endp




sub_622A00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A4F100
test	[esp+4+arg_0], 1
jz	short loc_622A2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622A2A:
mov	eax, esi
pop	esi
retn	4
sub_622A00 endp




sub_622A30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11DC820
test	[esp+4+arg_0], 1
jz	short loc_622A5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622A5A:
mov	eax, esi
pop	esi
retn	4
sub_622A30 endp




sub_622A60 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_11DBBF0
test	[esp+4+arg_0], 1
jz	short loc_622A8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_622A8A:
mov	eax, edi
pop	edi
retn	4
sub_622A60 endp




sub_622A90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	esi
call	sub_11DB7C0
test	[esp+4+arg_0], 1
jz	short loc_622ABB
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622ABB:
mov	eax, esi
pop	esi
retn	4
sub_622A90 endp

align 10h


; Attributes: bp-based frame

sub_622AD0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0Ch
push	esi
mov	eax, 1
lea	esi, [edi+10h]
mov	ecx, esi
mov	[edi+6], ax
mov	dword ptr [edi], offset	off_15F9864
mov	dword ptr [edi+8], 0
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld1
mov	ecx, [ebp+arg_0]
mov	[edi+50h], ecx
xorps	xmm0, xmm0
movaps	xmmword	ptr [esi], xmm0
movaps	xmmword	ptr [esi+10h], xmm0
movaps	xmmword	ptr [esi+20h], xmm0
fst	dword ptr [esi]
fst	dword ptr [esi+14h]
mov	eax, edi
fstp	dword ptr [esi+28h]
movaps	xmmword	ptr [esi+30h], xmm0
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_622AD0 endp

align 10h



sub_622B30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12A3050
test	[esp+4+arg_0], 1
jz	short loc_622B5A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622B5A:
mov	eax, esi
pop	esi
retn	4
sub_622B30 endp




sub_622B60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A2EFE0
test	[esp+4+arg_0], 1
jz	short loc_622B8A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622B8A:
mov	eax, esi
pop	esi
retn	4
sub_622B60 endp




; int __thiscall sub_622B90(void *, char)
sub_622B90 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F997C
jz	short loc_622BA9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_622BA9:
mov	eax, esi
pop	esi
retn	4
sub_622B90 endp

align 10h



sub_622BB0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, dword_196D2C8
push	eax
push	ecx
call	sub_11DB650
retn	4
sub_622BB0 endp

align 10h



sub_622BD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	edi
mov	edi, dword_196D2C8
call	sub_11DB5E0
pop	edi
retn	4
sub_622BD0 endp

align 10h



sub_622BF0 proc	near
mov	eax, dword_18899CC
retn
sub_622BF0 endp

align 10h



sub_622C00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A4B3D0
test	[esp+4+arg_0], 1
jz	short loc_622C2A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622C2A:
mov	eax, esi
pop	esi
retn	4
sub_622C00 endp




sub_622C30 proc	near
sub	ecx, 0Ch
jmp	sub_622C00
sub_622C30 endp

align 10h



sub_622C40 proc	near
sub	ecx, 8
jmp	sub_622C00
sub_622C40 endp

align 10h



sub_622C50 proc	near
xor	eax, eax
retn	0Ch
sub_622C50 endp

align 10h



; int __thiscall sub_622C60(void *, char)
sub_622C60 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15F99FC
jz	short loc_622C79
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_622C79:
mov	eax, esi
pop	esi
retn	4
sub_622C60 endp

align 10h



sub_622C80 proc	near
mov	eax, dword_18899D0
retn
sub_622C80 endp

align 10h



sub_622C90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A4AF60
test	[esp+4+arg_0], 1
jz	short loc_622CBA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622CBA:
mov	eax, esi
pop	esi
retn	4
sub_622C90 endp




sub_622CC0 proc	near
sub	ecx, 20h
jmp	sub_622C90
sub_622CC0 endp

align 10h



sub_622CD0 proc	near
sub	ecx, 8
jmp	sub_622C90
sub_622CD0 endp

align 10h



sub_622CE0 proc	near
mov	eax, dword_18899D4
retn
sub_622CE0 endp

align 10h



sub_622CF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_12788E0
test	[esp+4+arg_0], 1
jz	short loc_622D1A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622D1A:
mov	eax, esi
pop	esi
retn	4
sub_622CF0 endp




sub_622D20 proc	near
sub	ecx, 8
jmp	sub_622CF0
sub_622D20 endp

align 10h



sub_622D30 proc	near
mov	eax, dword_18899D8
retn
sub_622D30 endp

align 10h



sub_622D40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A4A2D0
test	[esp+4+arg_0], 1
jz	short loc_622D6A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622D6A:
mov	eax, esi
pop	esi
retn	4
sub_622D40 endp




sub_622D70 proc	near
sub	ecx, 8
jmp	sub_622D40
sub_622D70 endp

align 10h



sub_622D80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_AD2280
test	[esp+4+arg_0], 1
jz	short loc_622DAA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622DAA:
mov	eax, esi
pop	esi
retn	4
sub_622D80 endp




sub_622DB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_11DA260
test	[esp+4+arg_0], 1
jz	short loc_622DDA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_622DDA:
mov	eax, esi
pop	esi
retn	4
sub_622DB0 endp




sub_622DE0 proc	near
sub	ecx, 8
jmp	sub_622DB0
sub_622DE0 endp

align 10h



sub_622DF0 proc	near
mov	edx, [ecx]
mov	[eax], edx
mov	cx, [ecx+4]
mov	[eax+4], cx
retn
sub_622DF0 endp

align 10h



; int __thiscall sub_622E00(void *, char)
sub_622E00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A49D80
test	[esp+4+arg_0], 1
jz	short loc_622E18
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_622E18:
mov	eax, esi
pop	esi
retn	4
sub_622E00 endp

align 10h



sub_622E20 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
xor	ebp, ebp
push	esi
mov	esi, [edi+4]
cmp	[edi+0Ch], ebp
jbe	short loc_622EA5
push	ebx
mov	edi, edi

loc_622E30:
cmp	dword ptr [edi+0Ch], 1
jnz	short loc_622E55
mov	eax, [edi+4]
mov	ecx, [eax]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	edx, [edi+4]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 8
mov	[edi+4], ebp
mov	[edi+0Ch], ebp
jmp	short loc_622E9F

loc_622E55:
mov	eax, [esi+4]
cmp	eax, ebp
jz	short loc_622E60
mov	esi, eax
jmp	short loc_622E9F

loc_622E60:
mov	eax, [esi+8]
cmp	eax, ebp
jz	short loc_622E6B
mov	esi, eax
jmp	short loc_622E9F

loc_622E6B:
lea	eax, [esp+10h+var_4]
push	eax
mov	eax, [esi]
push	edi
call	sub_623210
mov	ebx, [esp+10h+var_4]
cmp	[ebx+4], esi
jnz	short loc_622E86
mov	[ebx+4], ebp
jmp	short loc_622E89

loc_622E86:
mov	[ebx+8], ebp

loc_622E89:
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 8
dec	dword ptr [edi+0Ch]
mov	esi, ebx

loc_622E9F:
cmp	[edi+0Ch], ebp
ja	short loc_622E30
pop	ebx

loc_622EA5:
pop	esi
pop	ebp
pop	ecx
retn
sub_622E20 endp

align 10h



sub_622EB0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
xor	ebx, ebx
cmp	[ebp+0Ch], ebx
jnz	short loc_622F1B
push	0Ch		; size_t
mov	dword ptr [ebp+0Ch], 1
call	??2@YAPAXI@Z	; operator new(uint)
push	10h		; size_t
mov	[ebp+4], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 8
cmp	eax, ebx
jz	short loc_622EE1
mov	[eax+0Ch], ebx
jmp	short loc_622EE3

loc_622EE1:
xor	eax, eax

loc_622EE3:
mov	ecx, [ebp+4]
mov	[ecx], eax
mov	edx, [ebp+4]
mov	eax, [edx]
mov	ecx, [esi]
mov	[eax], ecx
mov	dx, [esi+4]
mov	[eax+4], dx
mov	cx, [esi+8]
mov	[eax+8], cx
mov	edx, [esi+0Ch]
mov	[eax+0Ch], edx
mov	eax, [ebp+4]
mov	[eax+4], ebx
mov	ecx, [ebp+4]
mov	[ecx+8], ebx
mov	eax, [ebp+4]
pop	ebp
pop	ebx
retn	4

loc_622F1B:
push	edi
mov	edi, [ebp+4]
nop

loc_622F20:
mov	eax, [edi]
cmp	byte_18899E0, bl
jz	short loc_622F93
mov	ecx, [esi]
mov	edx, [eax]
cmp	ecx, edx
jb	short loc_622FA2
jnz	short loc_622F3E
mov	bx, [esi+4]
cmp	bx, [eax+4]
jb	short loc_622FA2

loc_622F3E:
cmp	ecx, edx
jnz	short loc_622F56
mov	dx, [esi+4]
cmp	dx, [eax+4]
jnz	short loc_622F56
mov	cx, [esi+8]
cmp	cx, [eax+8]
jb	short loc_622FA2

loc_622F56:
cmp	byte_18899E0, 0
jz	short loc_622FB2
mov	ecx, [esi]
mov	edx, [eax]
cmp	ecx, edx
ja	short loc_622FC1
jnz	short loc_622F73
mov	bx, [esi+4]
cmp	bx, [eax+4]
ja	short loc_622FC1

loc_622F73:
cmp	ecx, edx
jnz	short loc_622F8B
mov	cx, [esi+4]
cmp	cx, [eax+4]
jnz	short loc_622F8B
mov	dx, [esi+8]
cmp	dx, [eax+8]
ja	short loc_622FC1

loc_622F8B:
pop	edi
pop	ebp
xor	eax, eax
pop	ebx
retn	4

loc_622F93:
mov	dx, [esi+8]
cmp	dx, [eax+8]
setb	cl
cmp	cl, bl
jz	short loc_622F56

loc_622FA2:
mov	eax, [edi+4]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_622FD1
mov	edi, eax
jmp	loc_622F20

loc_622FB2:
mov	cx, [esi+8]
cmp	cx, [eax+8]
setnbe	al
test	al, al
jz	short loc_622F8B

loc_622FC1:
mov	eax, [edi+8]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_623023
mov	edi, eax
jmp	loc_622F20

loc_622FD1:		; size_t
push	0Ch
call	??2@YAPAXI@Z	; operator new(uint)
push	10h		; size_t
mov	[edi+4], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 8
cmp	eax, ebx
jz	short loc_622FEE
mov	[eax+0Ch], ebx
jmp	short loc_622FF0

loc_622FEE:
xor	eax, eax

loc_622FF0:
mov	edx, [edi+4]
mov	[edx], eax
mov	eax, [edi+4]
mov	ecx, [eax]
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	edx, [esi]
mov	[ecx], edx
movzx	edx, word ptr [esi+4]
mov	[ecx+4], dx
movzx	edx, word ptr [esi+8]
mov	[ecx+8], dx
mov	edx, [esi+0Ch]
pop	edi
mov	[ecx+0Ch], edx
inc	dword ptr [ebp+0Ch]
pop	ebp
pop	ebx
retn	4

loc_623023:		; size_t
push	0Ch
call	??2@YAPAXI@Z	; operator new(uint)
push	10h		; size_t
mov	[edi+8], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 8
cmp	eax, ebx
jz	short loc_623040
mov	[eax+0Ch], ebx
jmp	short loc_623042

loc_623040:
xor	eax, eax

loc_623042:
mov	ecx, [edi+8]
mov	[ecx], eax
mov	eax, [edi+8]
mov	ecx, [eax]
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	edx, [esi]
mov	[ecx], edx
movzx	edx, word ptr [esi+4]
mov	[ecx+4], dx
movzx	edx, word ptr [esi+8]
mov	[ecx+8], dx
mov	edx, [esi+0Ch]
pop	edi
mov	[ecx+0Ch], edx
inc	dword ptr [ebp+0Ch]
pop	ebp
pop	ebx
retn	4
sub_622EB0 endp

align 10h



sub_623080 proc	near

arg_0= dword ptr  4

push	ebp
push	edi
mov	edi, eax
mov	eax, [edi+0Ch]
xor	ebp, ebp
cmp	eax, ebp
jz	short loc_623097
cmp	eax, 1
jnz	short loc_62309E
call	sub_622E20

loc_623097:
pop	edi
xor	eax, eax
pop	ebp
retn	4

loc_62309E:
push	ebx
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	eax, [esp+10h+arg_0]
push	edi
call	sub_623210
mov	ecx, [edi+8]
mov	ebx, eax
cmp	ecx, ebp
jnz	short loc_6230BF
pop	ebx
pop	edi
xor	eax, eax
pop	ebp
retn	4

loc_6230BF:
mov	eax, [ebx+8]
push	esi
cmp	eax, ebp
jnz	short loc_623102
cmp	[ebx+4], ebp
jnz	short loc_6230FE
mov	esi, [esp+10h+arg_0]
cmp	esi, ebp
jz	short loc_6230E1
cmp	ecx, 1
jnz	short loc_6230DE
mov	[esi+4], ebp
jmp	short loc_6230E1

loc_6230DE:
mov	[esi+8], ebp

loc_6230E1:
mov	ecx, [ebx]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
push	ebx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 8
dec	dword ptr [edi+0Ch]
mov	eax, esi
pop	esi
pop	ebx
pop	edi
pop	ebp
retn	4

loc_6230FE:
cmp	eax, ebp
jz	short loc_623142

loc_623102:
cmp	[ebx+4], ebp
jnz	short loc_62313E
mov	esi, [esp+10h+arg_0]
cmp	esi, ebp
jz	short loc_62311E
cmp	ecx, 2
jnz	short loc_623119
mov	[esi+8], eax
jmp	short loc_623121

loc_623119:
mov	[esi+4], eax
jmp	short loc_623121

loc_62311E:
mov	[edi+4], eax

loc_623121:
mov	edx, [ebx]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
push	ebx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 8
dec	dword ptr [edi+0Ch]
mov	eax, esi
pop	esi
pop	ebx
pop	edi
pop	ebp
retn	4

loc_62313E:
cmp	eax, ebp
jnz	short loc_623180

loc_623142:
mov	eax, [ebx+4]
cmp	eax, ebp
jz	short loc_623180
mov	esi, [esp+10h+arg_0]
cmp	esi, ebp
jz	short loc_623160
cmp	ecx, 2
jnz	short loc_62315B
mov	[esi+8], eax
jmp	short loc_623163

loc_62315B:
mov	[esi+4], eax
jmp	short loc_623163

loc_623160:
mov	[edi+4], eax

loc_623163:
mov	eax, [ebx]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
push	ebx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 8
dec	dword ptr [edi+0Ch]
mov	eax, esi
pop	esi
pop	ebx
pop	edi
pop	ebp
retn	4

loc_623180:
mov	dword ptr [edi+8], 2
mov	esi, [ebx+8]
xor	ecx, ecx
mov	ebp, ebx
cmp	[esi+4], ecx
jz	short loc_6231A4

loc_623193:
mov	dword ptr [edi+8], 1
mov	ebp, esi
mov	esi, [esi+4]
cmp	[esi+4], ecx
jnz	short loc_623193

loc_6231A4:
mov	eax, [esi]
mov	edx, [eax]
mov	ebx, [ebx]
mov	[ebx], edx
movzx	edx, word ptr [eax+4]
mov	[ebx+4], dx
movzx	edx, word ptr [eax+8]
mov	[ebx+8], dx
mov	eax, [eax+0Ch]
mov	[ebx+0Ch], eax
mov	eax, [esi+8]
cmp	eax, ecx
jnz	short loc_6231DF
cmp	dword ptr [edi+8], 2
jnz	short loc_6231D7
mov	[ebp+8], ecx
mov	ecx, [esi]
push	ecx
jmp	short loc_6231F0

loc_6231D7:
mov	[ebp+4], ecx
mov	ecx, [esi]
push	ecx
jmp	short loc_6231F0

loc_6231DF:
cmp	dword ptr [edi+8], 2
jnz	short loc_6231EA
mov	[ebp+8], eax
jmp	short loc_6231ED

loc_6231EA:
mov	[ebp+4], eax

loc_6231ED:
mov	edx, [esi]
push	edx		; void *

loc_6231F0:		; operator delete(void *)
call	??3@YAXPAX@Z
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
dec	dword ptr [edi+0Ch]
add	esp, 8
pop	esi
pop	ebx
pop	edi
mov	eax, ebp
pop	ebp
retn	4
sub_623080 endp

align 10h



sub_623210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_0]
cmp	dword ptr [ebp+0Ch], 0
push	esi
mov	esi, eax
mov	eax, [esp+8+arg_4]
mov	ecx, 3
push	edi
mov	edi, [ebp+4]
mov	dword ptr [eax], 0
mov	[ebp+8], ecx
jnz	short loc_623243
pop	edi
pop	esi
mov	dword ptr [ebp+8], 0
xor	eax, eax
pop	ebp
retn	8

loc_623243:
mov	edx, [edi]
push	ebx
mov	bl, byte_18899E0
test	bl, bl
jz	loc_623306
mov	eax, [esi]
cmp	eax, [edx]
jnz	short loc_623272
mov	ax, [esi+4]
cmp	ax, [edx+4]
jnz	short loc_623272
mov	ax, [esi+8]
cmp	ax, [edx+8]
jz	loc_623319

loc_623272:
test	bl, bl
jz	loc_623325
mov	eax, [esi]
mov	ecx, [edx]
cmp	eax, ecx
jb	loc_623338
jnz	short loc_623296
mov	bx, [esi+4]
cmp	bx, [edx+4]
jb	loc_623338

loc_623296:
cmp	eax, ecx
jnz	short loc_6232B2
mov	cx, [esi+4]
cmp	cx, [edx+4]
jnz	short loc_6232B2
mov	ax, [esi+8]
cmp	ax, [edx+8]
jb	loc_623338

loc_6232B2:
call	sub_A46FD0
test	al, al
jz	short loc_6232CB
mov	eax, [esp+10h+arg_4]
mov	[eax], edi
mov	dword ptr [ebp+8], 2
mov	edi, [edi+8]

loc_6232CB:
test	edi, edi
jz	loc_623366
mov	bl, byte_18899E0
mov	edx, [edi]
test	bl, bl
jz	short loc_62334A
mov	ecx, [esi]
cmp	ecx, [edx]
jnz	short loc_623272
mov	ax, [esi+4]
cmp	ax, [edx+4]
jnz	short loc_623272
mov	cx, [esi+8]
cmp	cx, [edx+8]
jnz	loc_623272
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn	8

loc_623306:
mov	ax, [esi+8]
cmp	ax, [edx+8]
setz	al
test	al, al
jz	loc_623272

loc_623319:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
mov	[ebp+8], ecx
pop	ebp
retn	8

loc_623325:
mov	cx, [esi+8]
cmp	cx, [edx+8]
setb	al
test	al, al
jz	loc_6232B2

loc_623338:
mov	edx, [esp+10h+arg_4]
mov	[edx], edi
mov	dword ptr [ebp+8], 1
mov	edi, [edi+4]
jmp	short loc_6232CB

loc_62334A:
mov	ax, [esi+8]
cmp	ax, [edx+8]
setz	al
test	al, al
jz	loc_623272
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn	8

loc_623366:
pop	ebx
pop	edi
pop	esi
mov	dword ptr [ebp+8], 0
xor	eax, eax
pop	ebp
retn	8
sub_623210 endp

align 10h



sub_623380 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

push	ecx
push	ebx
mov	ebx, [esp+8+arg_4]
push	ebp
mov	ebp, [esp+0Ch+arg_0]
test	ebx, ebx
jz	loc_623489
push	esi
push	edi
jmp	short loc_623399

loc_623397:
mov	ebx, eax

loc_623399:
mov	edi, [ebx+4]
xor	eax, eax
cmp	edi, eax
jz	short loc_6233AF
cmp	[ebp+0Ch], eax
jz	short loc_6233AF
push	edi
mov	ecx, ebp
call	sub_6235B0

loc_6233AF:
mov	esi, [ebx+8]
mov	[esp+14h+arg_0], eax
test	esi, esi
jz	short loc_6233CA
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_6233CA
push	esi
mov	ecx, ebp
call	sub_6235B0
jmp	short loc_6233CC

loc_6233CA:
xor	eax, eax

loc_6233CC:
sub	eax, [esp+14h+arg_0]
cmp	eax, 2
jnz	short loc_623439
test	esi, esi
jz	short loc_623425
mov	edi, [ebp+0Ch]
mov	eax, [esi+8]
test	edi, edi
jz	short loc_6233F3
test	eax, eax
jz	short loc_6233F3
push	eax
mov	ecx, ebp
call	sub_6235B0
mov	ebx, eax
jmp	short loc_6233F5

loc_6233F3:
xor	ebx, ebx

loc_6233F5:
mov	eax, [esi+4]
test	edi, edi
jz	short loc_62340A
test	eax, eax
jz	short loc_62340A
push	eax
mov	ecx, ebp
call	sub_6235B0
jmp	short loc_62340C

loc_62340A:
xor	eax, eax

loc_62340C:
cmp	ebx, eax
setnbe	al
test	al, al
jz	short loc_623421
push	ebp
call	sub_6234F0
mov	ebx, [esp+14h+arg_4]
jmp	short loc_62345E

loc_623421:
mov	ebx, [esp+14h+arg_4]

loc_623425:
mov	esi, [esi+4]
push	ebp
call	sub_623490
mov	esi, [ebx+8]
push	ebp
call	sub_6234F0
jmp	short loc_62345E

loc_623439:
cmp	eax, 0FFFFFFFEh
jnz	short loc_623465
push	ebp
call	sub_623550
push	ebp
test	al, al
jz	short loc_62344D
mov	esi, edi
jmp	short loc_623459

loc_62344D:
mov	esi, [edi+8]
call	sub_6234F0
mov	esi, [ebx+4]
push	ebp

loc_623459:
call	sub_623490

loc_62345E:
cmp	[esp+14h+arg_8], 0
jnz	short loc_623487

loc_623465:
cmp	ebx, [ebp+4]
jz	short loc_623487
lea	eax, [esp+14h+var_4]
push	eax
mov	eax, [ebx]
push	ebp
call	sub_623210
mov	eax, [esp+14h+var_4]
mov	[esp+14h+arg_4], eax
test	eax, eax
jnz	loc_623397

loc_623487:
pop	edi
pop	esi

loc_623489:
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_623380 endp

align 10h



sub_623490 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
lea	eax, [esp+8+arg_0]
push	eax
mov	eax, [esi]
push	ebx
call	sub_623210
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
lea	ecx, [esp+8+arg_0]
push	ecx
push	ebx
call	sub_623210
mov	ecx, [esp+8+arg_0]
mov	eax, [esi+8]
test	ecx, ecx
jz	short loc_6234E1
cmp	dword ptr [ebx+8], 1
jnz	short loc_6234D3
mov	[ecx+4], esi
mov	[edi+4], eax
mov	[esi+8], edi
pop	edi
pop	ebx
retn	4

loc_6234D3:
mov	[ecx+8], esi
mov	[edi+4], eax
mov	[esi+8], edi
pop	edi
pop	ebx
retn	4

loc_6234E1:
mov	[ebx+4], esi
mov	[edi+4], eax
mov	[esi+8], edi
pop	edi
pop	ebx
retn	4
sub_623490 endp

align 10h



sub_6234F0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
lea	eax, [esp+8+arg_0]
push	eax
mov	eax, [esi]
push	ebx
call	sub_623210
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
lea	ecx, [esp+8+arg_0]
push	ecx
push	ebx
call	sub_623210
mov	ecx, [esp+8+arg_0]
mov	eax, [esi+4]
test	ecx, ecx
jz	short loc_623541
cmp	dword ptr [ebx+8], 1
jnz	short loc_623533
mov	[ecx+4], esi
mov	[edi+8], eax
mov	[esi+4], edi
pop	edi
pop	ebx
retn	4

loc_623533:
mov	[ecx+8], esi
mov	[edi+8], eax
mov	[esi+4], edi
pop	edi
pop	ebx
retn	4

loc_623541:
mov	[ebx+4], esi
mov	[edi+8], eax
mov	[esi+4], edi
pop	edi
pop	ebx
retn	4
sub_6234F0 endp

align 10h



sub_623550 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
test	edi, edi
jnz	short loc_62355F
xor	al, al
pop	ebx
retn	4

loc_62355F:
mov	eax, [edi+4]
push	ebp
push	esi
mov	esi, [ebx+0Ch]
test	esi, esi
jz	short loc_62357B
test	eax, eax
jz	short loc_62357B
push	eax
mov	ecx, ebx
call	sub_6235B0
mov	ebp, eax
jmp	short loc_62357D

loc_62357B:
xor	ebp, ebp

loc_62357D:
mov	eax, [edi+8]
test	esi, esi
jz	short loc_62359C
test	eax, eax
jz	short loc_62359C
push	eax
mov	ecx, ebx
call	sub_6235B0
cmp	eax, ebp
pop	esi
sbb	eax, eax
pop	ebp
neg	eax
pop	ebx
retn	4

loc_62359C:
xor	eax, eax
cmp	eax, ebp
pop	esi
sbb	eax, eax
pop	ebp
neg	eax
pop	ebx
retn	4
sub_623550 endp

align 10h



sub_6235B0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+4]
push	esi
push	edi
xor	edi, edi
xor	esi, esi
mov	ebx, ecx
test	eax, eax
jnz	short loc_6235D8
cmp	[ebp+8], esi
jnz	short loc_6235D4
lea	eax, [edi+1]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_6235D4:
test	eax, eax
jz	short loc_6235E1

loc_6235D8:
push	eax
call	sub_6235B0
mov	edi, eax
inc	edi

loc_6235E1:
mov	eax, [ebp+8]
test	eax, eax
jz	short loc_6235F3
push	eax
mov	ecx, ebx
call	sub_6235B0
mov	esi, eax
inc	esi

loc_6235F3:
mov	eax, edi
cmp	edi, esi
ja	short loc_6235FB
mov	eax, esi

loc_6235FB:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6235B0 endp

align 10h



sub_623610 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	ebx, 20h
push	edi
mov	esi, eax
mov	edx, ebx
call	sub_A491C0
mov	edx, [esi]
and	edx, 7
mov	[esp+18h+var_4], edx
lea	ebp, [esp+18h+arg_0]

loc_623632:
mov	al, [ebp+0]
cmp	ebx, 8
jnb	short loc_623640
mov	cl, 8
sub	cl, bl
shl	al, cl

loc_623640:
mov	ecx, [esi]
mov	edi, [esi+10h]
shr	ecx, 3
test	edx, edx
jnz	short loc_623651
mov	[ecx+edi], al
jmp	short loc_623685

loc_623651:
add	edi, ecx
mov	cl, al
mov	[esp+18h+var_5], cl
mov	cl, dl
mov	dl, al
shr	dl, cl
mov	ecx, 8
sub	ecx, [esp+18h+var_4]
or	[edi], dl
cmp	ecx, 8
jnb	short loc_623681
cmp	ecx, ebx
jnb	short loc_623681
mov	edx, [esi]
shl	al, cl
mov	ecx, [esi+10h]
shr	edx, 3
mov	[edx+ecx+1], al

loc_623681:
mov	edx, [esp+18h+var_4]

loc_623685:
cmp	ebx, 8
jb	short loc_62368F
add	dword ptr [esi], 8
jmp	short loc_623691

loc_62368F:
add	[esi], ebx

loc_623691:
cmp	ebx, 8
jb	short loc_62369B
sub	ebx, 8
jmp	short loc_62369D

loc_62369B:
xor	ebx, ebx

loc_62369D:
inc	ebp
test	ebx, ebx
ja	short loc_623632
mov	edx, [esp+18h+arg_4]
push	edx
mov	ecx, esi
call	sub_504EC0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_623610 endp

align 10h


; Attributes: bp-based frame

sub_6236C0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
cmp	byte_18899E0, 0
jz	short loc_6236DE
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
push	eax
push	ecx
mov	eax, esi
call	sub_623610

loc_6236DE:
mov	edx, [ebp+arg_8]
push	edx
mov	ecx, esi
call	sub_504EC0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6236C0 endp

align 10h



sub_6236F0 proc	near
cmp	byte_18899E0, 0
push	esi
push	edi
mov	edi, eax
mov	esi, ecx
jz	short loc_623714
push	1		; char
push	20h		; int
push	edi		; void *
call	sub_A49250
lea	eax, [edi+4]
push	eax		; void *
mov	ecx, esi
call	sub_504F00

loc_623714:
add	edi, 8
push	edi		; void *
mov	ecx, esi
call	sub_504F00
pop	edi
pop	esi
retn
sub_6236F0 endp

align 10h



; int __thiscall sub_623730(void *, char)
sub_623730 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	??1_Locimp@locale@std@@UAE@XZ_0	; std::locale::_Locimp::~_Locimp(void)
test	[esp+4+arg_0], 1
jz	short loc_623748
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_623748:
mov	eax, esi
pop	esi
retn	4
sub_623730 endp

align 10h



sub_623750 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_623750
push	eax
mov	large fs:0, esp
push	ebx
xor	ebx, ebx
push	esi
mov	esi, [esp+14h+arg_0]
mov	[esi+14h], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esp+14h+var_4], ebx
mov	[esi+20h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+2Ch], bl
xor	ecx, ecx
mov	eax, 10h
mov	byte ptr [esp+14h+var_4], 1
mov	[esi+3Ch], eax
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ecx, [esp+18h+var_C]
mov	[esi+30h], eax
add	esp, 4
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	eax, esi
pop	esi
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	4
sub_623750 endp

align 10h



sub_6237D0 proc	near
cmp	dword ptr [esi+18h], 0
jz	short loc_623809
mov	eax, [esi+10h]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	dword ptr [esi+18h], 0
cmp	dword ptr [esi+18h], 0
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi+14h], 0
jbe	short loc_623809
mov	ecx, [esi+10h]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_623809:		; void *
push	esi
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	eax, esi
retn
sub_6237D0 endp

align 10h



sub_623820 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, eax
cmp	dword ptr [esi+4], 0
jnz	short loc_623839
pop	esi
mov	byte ptr [ebp+0], 0
xor	eax, eax
pop	ebp
retn	8

loc_623839:
mov	eax, [esi+4]
mov	esi, [esi]
push	ebx
push	edi
lea	edi, [eax-1]
cdq
sub	eax, edx
mov	edx, [esp+10h+arg_0]
mov	ebx, [edx]
xor	ecx, ecx
sar	eax, 1

loc_623850:
mov	edx, [esi+eax*8]
cmp	ebx, edx
jb	short loc_623878
jbe	short loc_62387D
lea	ecx, [eax+1]

loc_62385C:
mov	eax, edi
sub	eax, ecx
cdq
sub	eax, edx
sar	eax, 1
add	eax, ecx
cmp	ecx, edi
jle	short loc_623850
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 0
mov	eax, ecx
pop	ebp
retn	8

loc_623878:
lea	edi, [eax-1]
jmp	short loc_62385C

loc_62387D:
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 1
pop	ebp
retn	8
sub_623820 endp

align 10h



sub_623890 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	eax, esi
call	sub_623820
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_6238CF
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
or	eax, 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	4

loc_6238CF:
cmp	edi, [esi+4]
jb	short loc_6238EA
mov	edx, [ebx+4]
mov	eax, [ebx]
push	edx
push	eax
call	sub_623F30
mov	eax, [esi+4]
dec	eax
pop	edi
pop	esi
pop	ebx
retn	4

loc_6238EA:
mov	ecx, [ebx+4]
mov	edx, [ebx]
push	edi
push	ecx
push	edx
call	sub_623FC0
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_623890 endp

align 10h



sub_623900 proc	near
push	ebx
xor	ebx, ebx
mov	[esi+14h], bl
cmp	[esi+8], ebx
jz	short loc_623937
mov	eax, [esi]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi+8], ebx
mov	[esi], ebx
mov	[esi+4], ebx
cmp	ebx, ebx
jz	short loc_623937
mov	ecx, ebx
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi+8], ebx
mov	[esi], ebx
mov	[esi+4], ebx
cmp	ebx, ebx

loc_623937:
pop	ebx
jbe	short locret_623943
mov	edx, [esi]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

locret_623943:
retn
sub_623900 endp

align 10h



sub_623950 proc	near

arg_0= dword ptr  4

cmp	byte ptr [esi+14h], 0
push	ebx
mov	ebx, [esp+4+arg_0]
jz	short loc_623971
mov	eax, [ebx]
mov	ecx, [esi+10h]
cmp	eax, ecx
jnz	short loc_623971
mov	eax, [esi+0Ch]
mov	ecx, [esi]
lea	eax, [ecx+eax*8+4]
pop	ebx
retn	4

loc_623971:
push	edi
lea	edx, [esp+8+arg_0]
push	edx
push	ebx
mov	eax, esi
call	sub_624060
cmp	byte ptr [esp+8+arg_0],	0
mov	edi, eax
jnz	short loc_62399F
push	8Ah		; Line
push	offset aZLwo7_buildB_4 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aObjectexists ; "objectExists"
call	__wassert
add	esp, 0Ch

loc_62399F:
mov	ecx, [esi]
mov	[esi+0Ch], edi
mov	eax, [ebx]
mov	[esi+10h], eax
lea	eax, [ecx+edi*8+4]
pop	edi
mov	byte ptr [esi+14h], 1
pop	ebx
retn	4
sub_623950 endp

align 10h



sub_6239C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
cmp	byte ptr [esi+14h], 0
push	ebx
mov	ebx, [esp+10h+arg_0]
jz	short loc_6239E9
mov	eax, [edi]
mov	ecx, [esi+10h]
cmp	eax, ecx
jnz	short loc_6239E9
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [ebx]
mov	[ecx+eax*8+4], edx
pop	ebx
add	esp, 0Ch
retn	4

loc_6239E9:
lea	eax, [esp+10h+arg_0]
push	eax
push	edi
mov	eax, esi
call	sub_624060
cmp	byte ptr [esp+10h+arg_0], 0
jz	short loc_623A18
mov	edx, [esi]
mov	[esi+0Ch], eax
mov	ecx, [edi]
mov	[esi+10h], ecx
mov	byte ptr [esi+14h], 1
mov	ecx, [ebx]
mov	[edx+eax*8+4], ecx
pop	ebx
add	esp, 0Ch
retn	4

loc_623A18:
mov	eax, [ebx]
mov	edx, [edi]
lea	ecx, [esp+10h+var_8]
mov	[esp+10h+var_4], eax
push	ecx
mov	ecx, edi
mov	eax, esi
mov	[esp+14h+var_8], edx
call	sub_6240D0
mov	[esi+0Ch], eax
mov	edx, [edi]
mov	[esi+10h], edx
mov	byte ptr [esi+14h], 1
pop	ebx
add	esp, 0Ch
retn	4
sub_6239C0 endp

align 10h



sub_623A50 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
cmp	byte ptr [esi+14h], 0
jz	short loc_623A72
mov	eax, [edx]
mov	ecx, [esi+10h]
cmp	eax, ecx
jnz	short loc_623A72
mov	ecx, [esi+0Ch]
mov	edx, esi
mov	byte ptr [esi+14h], 0
call	sub_6244A0
mov	al, 1
pop	ecx
retn

loc_623A72:
lea	eax, [esp+4+var_1]
push	eax
push	edx
mov	eax, esi
call	sub_624060
cmp	[esp+4+var_1], 0
jz	short loc_623A97
mov	ecx, eax
mov	edx, esi
mov	byte ptr [esi+14h], 0
call	sub_6244A0
mov	al, 1
pop	ecx
retn

loc_623A97:
xor	al, al
pop	ecx
retn
sub_623A50 endp

align 10h



sub_623AA0 proc	near
mov	ecx, [eax+4]
mov	edx, [eax+8]
cmp	ecx, edx
ja	short loc_623AAF
mov	eax, edx
sub	eax, ecx
retn

loc_623AAF:
mov	eax, [eax+0Ch]
sub	eax, ecx
add	eax, edx
retn
sub_623AA0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12E7706

loc_623AC0:
cmp	dword ptr [esi+8], 0
jz	short locret_623AF4
mov	eax, [esi]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	dword ptr [esi+8], 0
cmp	dword ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
jbe	short locret_623AF4
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

locret_623AF4:
retn
; END OF FUNCTION CHUNK	FOR sub_12E7706
align 10h



sub_623B00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	dword ptr [ecx+4], 0
jnz	short loc_623B12
mov	eax, [esp+arg_4]
mov	byte ptr [eax],	0
xor	eax, eax
retn	8

loc_623B12:
mov	eax, [ecx+4]
push	ebx
push	ebp
mov	ebp, [ecx]
mov	ecx, [esp+8+arg_0]
push	esi
push	edi
lea	edi, [eax-1]
cdq
sub	eax, edx
mov	edx, [ecx]
mov	ebx, [edx+14h]
xor	esi, esi
sar	eax, 1
mov	edi, edi

loc_623B30:
mov	ecx, eax
shl	ecx, 4
add	ecx, ebp
mov	ecx, [ecx]
mov	ecx, [ecx+14h]
cmp	ebx, ecx
jb	short loc_623B64
jz	short loc_623B69
lea	esi, [eax+1]

loc_623B45:
mov	eax, edi
sub	eax, esi
cdq
sub	eax, edx
sar	eax, 1
add	eax, esi
cmp	esi, edi
jle	short loc_623B30
mov	eax, [esp+10h+arg_4]
pop	edi
mov	byte ptr [eax],	0
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_623B64:
lea	edi, [eax-1]
jmp	short loc_623B45

loc_623B69:
mov	edx, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [edx],	1
pop	ebx
retn	8
sub_623B00 endp

align 10h



sub_623B80 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
mov	esi, eax
lea	eax, [esp+0Ch+var_1]
push	eax
push	ecx
mov	ecx, esi
call	sub_623B00
cmp	[esp+0Ch+var_1], 0
mov	ebx, eax
jz	short loc_623BB9
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
or	eax, 0FFFFFFFFh
pop	esi
pop	ebx
pop	ecx
retn

loc_623BB9:
mov	edx, [edi]
mov	ecx, [edi+4]
cmp	ebx, [esi+4]
jb	short loc_623BE6
sub	esp, 10h
mov	eax, esp
mov	[eax], edx
mov	edx, [edi+8]
mov	[eax+4], ecx
mov	ecx, [edi+0Ch]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
call	sub_624150
mov	eax, [esi+4]
dec	eax
pop	esi
pop	ebx
pop	ecx
retn

loc_623BE6:
push	ebx
sub	esp, 10h
mov	eax, esp
mov	[eax], edx
mov	edx, [edi+8]
mov	[eax+4], ecx
mov	ecx, [edi+0Ch]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
call	sub_624200
pop	esi
mov	eax, ebx
pop	ebx
pop	ecx
retn
sub_623B80 endp

align 10h



sub_623C10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	dword ptr [edi+4], 0
jnz	short loc_623C22
mov	eax, [esp+arg_4]
mov	byte ptr [eax],	0
xor	eax, eax
retn	8

loc_623C22:
mov	eax, [edi+4]
mov	ecx, [edi]
push	ebx
push	ebp
lea	ebp, [eax-1]
cdq
sub	eax, edx
mov	edx, [esp+8+arg_0]
push	esi
mov	esi, eax
sar	esi, 1
lea	eax, [ecx+esi*4]
push	eax
push	edx
xor	ebx, ebx
call	sub_A476C0
add	esp, 8
test	eax, eax
jz	short loc_623C7D

loc_623C4B:
jge	short loc_623C52
lea	ebp, [esi-1]
jmp	short loc_623C55

loc_623C52:
lea	ebx, [esi+1]

loc_623C55:
mov	eax, ebp
sub	eax, ebx
cdq
sub	eax, edx
mov	esi, eax
sar	esi, 1
add	esi, ebx
cmp	ebx, ebp
jg	short loc_623C8C
mov	eax, [edi]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [eax+esi*4]
push	eax
push	ecx
call	sub_A476C0
add	esp, 8
test	eax, eax
jnz	short loc_623C4B

loc_623C7D:
mov	edx, [esp+0Ch+arg_4]
mov	eax, esi
pop	esi
pop	ebp
mov	byte ptr [edx],	1
pop	ebx
retn	8

loc_623C8C:
mov	eax, [esp+0Ch+arg_4]
pop	esi
mov	byte ptr [eax],	0
pop	ebp
mov	eax, ebx
pop	ebx
retn	8
sub_623C10 endp

align 10h



sub_623CA0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, eax
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	edi, esi
call	sub_623C10
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_623CDF
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_623CDF:
cmp	edi, [esi+4]
jb	short loc_623CF6
mov	edx, [ebx]
push	edx
call	sub_62B940
mov	eax, [esi+4]
pop	edi
pop	esi
dec	eax
pop	ebx
retn	4

loc_623CF6:
mov	eax, [ebx]
push	edi
push	eax
call	sub_624330
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_623CA0 endp

align 10h



sub_623D10 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	edi
mov	edi, eax
lea	eax, [esp+8+var_1]
push	eax
push	ecx
call	sub_623C10
cmp	[esp+8+var_1], 0
jnz	short loc_623D42
push	0CDh		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aObjectexistsTr ; "objectExists==true"
call	__wassert
add	esp, 0Ch
xor	eax, eax
pop	edi
pop	ecx
retn

loc_623D42:
mov	edx, [edi+4]
cmp	eax, edx
jnb	short loc_623D69
dec	edx
mov	ecx, eax
cmp	eax, edx
jnb	short loc_623D66
push	esi

loc_623D51:
mov	edx, [edi]
mov	esi, [edx+ecx*4+4]
lea	edx, [edx+ecx*4]
mov	[edx], esi
mov	edx, [edi+4]
inc	ecx
dec	edx
cmp	ecx, edx
jb	short loc_623D51
pop	esi

loc_623D66:
dec	dword ptr [edi+4]

loc_623D69:
pop	edi
pop	ecx
retn
sub_623D10 endp

align 10h



sub_623D70 proc	near
push	ebx
push	edi
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
xor	ebx, ebx
add	esp, 4
cmp	eax, ebx
jz	short loc_623D87
mov	[eax+1Ch], bl
jmp	short loc_623D89

loc_623D87:
xor	eax, eax

loc_623D89:		; size_t
push	24h
mov	[esi+8], eax
mov	[esi+0Ch], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, ebx
jz	short loc_623DA2
mov	[eax+1Ch], bl
jmp	short loc_623DA4

loc_623DA2:
xor	eax, eax

loc_623DA4:
mov	ecx, [esi+8]
mov	[ecx+20h], eax
mov	edi, 6
nop

loc_623DB0:
mov	edx, [esi+8]
mov	eax, [edx+20h]
push	24h		; size_t
mov	[esi+8], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, ebx
jz	short loc_623DCC
mov	[eax+1Ch], bl
jmp	short loc_623DCE

loc_623DCC:
xor	eax, eax

loc_623DCE:
sub	edi, 1
mov	ecx, [esi+8]
mov	[ecx+20h], eax
jnz	short loc_623DB0
mov	edx, [esi+8]
mov	eax, [edx+20h]
mov	ecx, [esi+0Ch]
mov	[eax+20h], ecx
mov	eax, [esi+0Ch]
pop	edi
mov	[esi+8], eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+14h], ebx
mov	[esi+10h], ebx
mov	eax, esi
pop	ebx
retn
sub_623D70 endp

align 10h



sub_623E00 proc	near
mov	eax, [esi+4]
mov	eax, [eax+20h]
mov	[esi+8], eax
cmp	eax, [esi+4]
jz	short loc_623E2D
push	edi
nop

loc_623E10:
mov	ecx, [esi+8]
mov	edi, [ecx+20h]
mov	edx, [esi+8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	eax, edi
add	esp, 4
mov	[esi+8], edi
cmp	eax, [esi+4]
jnz	short loc_623E10
pop	edi

loc_623E2D:
mov	ecx, [esi+8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx
retn
sub_623E00 endp

align 10h



sub_623E40 proc	near
mov	eax, [esi+4]
mov	ecx, [eax+20h]
cmp	ecx, [esi+8]
jz	short loc_623E59
mov	edx, [esi+4]
mov	eax, [edx+20h]
mov	cl, [eax+1Ch]
cmp	cl, 1
jnz	short loc_623EA7

loc_623E59:
mov	edx, [esi+4]
push	edi
mov	edi, [edx+20h]
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_623E74
mov	byte ptr [eax+1Ch], 0
jmp	short loc_623E76

loc_623E74:
xor	eax, eax

loc_623E76:
mov	ecx, [esi+4]
mov	[ecx+20h], eax
mov	edx, [esi+4]
mov	eax, [edx+20h]
test	eax, eax
jnz	short loc_623E9D
push	91h		; Line
push	offset aZLwo7_buildB_1 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aWriteaheadpoin ; "writeAheadPointer->next"
call	__wassert
add	esp, 0Ch

loc_623E9D:
mov	ecx, [esi+4]
mov	edx, [ecx+20h]
mov	[edx+20h], edi
pop	edi

loc_623EA7:
mov	eax, [esi+4]
mov	ecx, [eax+20h]
mov	[esi+4], ecx
retn
sub_623E40 endp

align 10h



sub_623EC0 proc	near
mov	eax, [esi+8]
mov	ecx, [eax+20h]
mov	edx, [esi+8]
mov	[esi+0Ch], ecx
mov	eax, [edx+20h]
mov	ecx, 1
cmp	eax, [esi+8]
jz	short loc_623F0F
lea	esp, [esp+0]

loc_623EE0:
mov	eax, [eax+20h]
inc	ecx
cmp	eax, [esi+8]
jnz	short loc_623EE0
cmp	ecx, 8
jle	short loc_623F0F
push	ebx
push	edi
lea	ebx, [ecx-8]

loc_623EF3:
mov	eax, [esi+0Ch]
mov	edi, [eax+20h]
mov	ecx, [esi+0Ch]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
sub	ebx, 1
mov	[esi+0Ch], edi
jnz	short loc_623EF3
pop	edi
pop	ebx

loc_623F0F:
mov	eax, [esi+0Ch]
mov	edx, [esi+8]
mov	[edx+20h], eax
mov	eax, [esi+8]
mov	[esi+0Ch], eax
mov	[esi], eax
mov	[esi+4], eax
xor	eax, eax
mov	[esi+14h], eax
mov	[esi+10h], eax
retn
sub_623EC0 endp

align 10h



sub_623F30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esi+8]
cmp	[esi+4], eax
jnz	short loc_623F99
test	eax, eax
jnz	short loc_623F45
mov	dword ptr [esi+8], 10h
jmp	short loc_623F4A

loc_623F45:
add	eax, eax
mov	[esi+8], eax

loc_623F4A:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 8
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	dword ptr [esi], 0
mov	edi, eax
jz	short loc_623F96
xor	eax, eax
cmp	[esi+4], eax
jbe	short loc_623F8B

loc_623F75:
mov	ecx, [esi]
mov	edx, [ecx+eax*8]
mov	[edi+eax*8], edx
mov	ecx, [ecx+eax*8+4]
mov	[edi+eax*8+4], ecx
inc	eax
cmp	eax, [esi+4]
jb	short loc_623F75

loc_623F8B:
mov	edx, [esi]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_623F96:
mov	[esi], edi
pop	edi

loc_623F99:
mov	ecx, [esi+4]
mov	edx, [esp+arg_0]
mov	eax, [esi]
mov	[eax+ecx*8], edx
mov	edx, [esp+arg_4]
mov	[eax+ecx*8+4], edx
inc	dword ptr [esi+4]
retn	8
sub_623F30 endp

align 10h



sub_623FC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esi+8]
push	ebp
mov	ebp, [esp+4+arg_8]
cmp	[esi+4], eax
jnz	short loc_624029
test	eax, eax
jnz	short loc_623FDA
mov	dword ptr [esi+8], 10h
jmp	short loc_623FDF

loc_623FDA:
add	eax, eax
mov	[esi+8], eax

loc_623FDF:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 8
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edi, eax
xor	eax, eax
add	esp, 4
cmp	[esi+4], eax
jbe	short loc_62401B

loc_624005:
mov	ecx, [esi]
mov	edx, [ecx+eax*8]
mov	[edi+eax*8], edx
mov	ecx, [ecx+eax*8+4]
mov	[edi+eax*8+4], ecx
inc	eax
cmp	eax, [esi+4]
jb	short loc_624005

loc_62401B:
mov	edx, [esi]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi], edi
pop	edi

loc_624029:
mov	ecx, [esi+4]
cmp	ecx, ebp
jz	short loc_624046

loc_624030:
mov	eax, [esi]
mov	edx, [eax+ecx*8-8]
lea	eax, [eax+ecx*8]
mov	[eax], edx
mov	edx, [eax-4]
dec	ecx
mov	[eax+4], edx
cmp	ecx, ebp
jnz	short loc_624030

loc_624046:
mov	eax, [esi]
mov	ecx, [esp+4+arg_0]
mov	[eax+ebp*8], ecx
mov	edx, [esp+4+arg_4]
mov	[eax+ebp*8+4], edx
inc	dword ptr [esi+4]
pop	ebp
retn	0Ch
sub_623FC0 endp

align 10h



sub_624060 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, eax
cmp	dword ptr [esi+4], 0
jnz	short loc_624079
pop	esi
mov	byte ptr [ebp+0], 0
xor	eax, eax
pop	ebp
retn	8

loc_624079:
mov	eax, [esi+4]
mov	esi, [esi]
push	ebx
push	edi
lea	edi, [eax-1]
cdq
sub	eax, edx
mov	edx, [esp+10h+arg_0]
mov	ebx, [edx]
xor	ecx, ecx
sar	eax, 1

loc_624090:
mov	edx, [esi+eax*8]
cmp	ebx, edx
jb	short loc_6240B8
jz	short loc_6240BD
lea	ecx, [eax+1]

loc_62409C:
mov	eax, edi
sub	eax, ecx
cdq
sub	eax, edx
sar	eax, 1
add	eax, ecx
cmp	ecx, edi
jle	short loc_624090
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 0
mov	eax, ecx
pop	ebp
retn	8

loc_6240B8:
lea	edi, [eax-1]
jmp	short loc_62409C

loc_6240BD:
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 1
pop	ebp
retn	8
sub_624060 endp

align 10h



sub_6240D0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	eax, esi
call	sub_624060
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_62410F
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
or	eax, 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	4

loc_62410F:
mov	edx, [ebx]
cmp	edi, [esi+4]
jb	short loc_624132
sub	esp, 8
mov	eax, esp
mov	[eax], edx
mov	ecx, [ebx+4]
mov	[eax+4], ecx
call	sub_624800
mov	eax, [esi+4]
dec	eax
pop	edi
pop	esi
pop	ebx
retn	4

loc_624132:
push	edi
sub	esp, 8
mov	eax, esp
mov	[eax], edx
mov	ecx, [ebx+4]
mov	[eax+4], ecx
call	sub_6243C0
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_6240D0 endp

align 10h



sub_624150 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esi+8]
cmp	[esi+4], eax
jnz	short loc_6241CF
test	eax, eax
jnz	short loc_624165
mov	dword ptr [esi+8], 10h
jmp	short loc_62416A

loc_624165:
add	eax, eax
mov	[esi+8], eax

loc_62416A:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 10h
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	dword ptr [esi], 0
mov	edi, eax
jz	short loc_6241CC
xor	edx, edx
cmp	[esi+4], edx
jbe	short loc_6241C1
xor	ecx, ecx
push	ebx

loc_624198:
mov	eax, [esi]
mov	ebx, [eax+ecx]
add	eax, ecx
mov	[ecx+edi], ebx
mov	ebx, [eax+4]
mov	[ecx+edi+4], ebx
mov	ebx, [eax+8]
mov	[ecx+edi+8], ebx
mov	eax, [eax+0Ch]
mov	[ecx+edi+0Ch], eax
inc	edx
add	ecx, 10h
cmp	edx, [esi+4]
jb	short loc_624198
pop	ebx

loc_6241C1:
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6241CC:
mov	[esi], edi
pop	edi

loc_6241CF:
mov	eax, [esi+4]
mov	edx, [esp+arg_0]
shl	eax, 4
add	eax, [esi]
mov	[eax], edx
mov	ecx, [esp+arg_4]
mov	[eax+4], ecx
mov	edx, [esp+arg_8]
mov	[eax+8], edx
mov	ecx, [esp+arg_C]
mov	[eax+0Ch], ecx
inc	dword ptr [esi+4]
retn	10h
sub_624150 endp

align 10h



sub_624200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esi+8]
push	ebp
mov	ebp, [esp+4+arg_10]
push	edi
cmp	[esi+4], eax
jnz	short loc_62427E
test	eax, eax
jnz	short loc_62421B
mov	dword ptr [esi+8], 10h
jmp	short loc_624220

loc_62421B:
add	eax, eax
mov	[esi+8], eax

loc_624220:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 10h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
xor	edx, edx
add	esp, 4
mov	edi, eax
cmp	[esi+4], edx
jbe	short loc_624271
xor	ecx, ecx
push	ebx

loc_624248:
mov	eax, [esi]
mov	ebx, [eax+ecx]
add	eax, ecx
mov	[ecx+edi], ebx
mov	ebx, [eax+4]
mov	[ecx+edi+4], ebx
mov	ebx, [eax+8]
mov	[ecx+edi+8], ebx
mov	eax, [eax+0Ch]
mov	[ecx+edi+0Ch], eax
inc	edx
add	ecx, 10h
cmp	edx, [esi+4]
jb	short loc_624248
pop	ebx

loc_624271:
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi], edi

loc_62427E:
mov	eax, [esi+4]
cmp	eax, ebp
jz	short loc_6242B4
mov	ecx, eax
shl	ecx, 4
sub	eax, ebp
mov	edx, eax
mov	edi, edi

loc_624290:
mov	eax, [esi]
mov	edi, [eax+ecx-10h]
add	eax, ecx
mov	[eax], edi
mov	edi, [eax-0Ch]
mov	[eax+4], edi
mov	edi, [eax-8]
mov	[eax+8], edi
mov	edi, [eax-4]
sub	ecx, 10h
sub	edx, 1
mov	[eax+0Ch], edi
jnz	short loc_624290

loc_6242B4:
mov	ecx, [esp+8+arg_0]
shl	ebp, 4
add	ebp, [esi]
pop	edi
mov	eax, ebp
mov	[eax], ecx
mov	edx, [esp+4+arg_4]
mov	[eax+4], edx
mov	ecx, [esp+4+arg_8]
mov	[eax+8], ecx
mov	edx, [esp+4+arg_C]
mov	[eax+0Ch], edx
inc	dword ptr [esi+4]
pop	ebp
retn	14h
sub_624200 endp

align 10h



sub_6242E0 proc	near
push	esi
mov	esi, eax
mov	eax, [ecx+4]
cmp	esi, eax
jnb	short loc_624321
dec	eax
mov	edx, esi
cmp	esi, eax
jnb	short loc_62431E
shl	esi, 4
push	edi

loc_6242F5:
mov	eax, [ecx]
mov	edi, [eax+esi+10h]
add	eax, esi
mov	[eax], edi
mov	edi, [eax+14h]
mov	[eax+4], edi
mov	edi, [eax+18h]
mov	[eax+8], edi
mov	edi, [eax+1Ch]
mov	[eax+0Ch], edi
mov	eax, [ecx+4]
inc	edx
dec	eax
add	esi, 10h
cmp	edx, eax
jb	short loc_6242F5
pop	edi

loc_62431E:
dec	dword ptr [ecx+4]

loc_624321:
pop	esi
retn
sub_6242E0 endp

align 10h



sub_624330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esi+8]
push	ebp
mov	ebp, [esp+4+arg_4]
cmp	[esi+4], eax
jnz	short loc_624391
test	eax, eax
jnz	short loc_62434A
mov	dword ptr [esi+8], 10h
jmp	short loc_62434F

loc_62434A:
add	eax, eax
mov	[esi+8], eax

loc_62434F:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 4
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edi, eax
xor	eax, eax
add	esp, 4
cmp	[esi+4], eax
jbe	short loc_624383

loc_624375:
mov	ecx, [esi]
mov	edx, [ecx+eax*4]
mov	[edi+eax*4], edx
inc	eax
cmp	eax, [esi+4]
jb	short loc_624375

loc_624383:
mov	eax, [esi]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi], edi
pop	edi

loc_624391:
mov	eax, [esi+4]
cmp	eax, ebp
jz	short loc_6243B0
jmp	short loc_6243A0
align 10h

loc_6243A0:
mov	ecx, [esi]
mov	edx, [ecx+eax*4-4]
lea	ecx, [ecx+eax*4]
dec	eax
mov	[ecx], edx
cmp	eax, ebp
jnz	short loc_6243A0

loc_6243B0:
mov	eax, [esi]
mov	ecx, [esp+4+arg_0]
mov	[eax+ebp*4], ecx
inc	dword ptr [esi+4]
pop	ebp
retn	8
sub_624330 endp




sub_6243C0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_6243C0
push	eax
mov	large fs:0, esp
mov	eax, [esi+8]
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_8]
push	edi
cmp	[esi+4], eax
jnz	short loc_62445B
test	eax, eax
jnz	short loc_6243F1
mov	dword ptr [esi+8], 10h
jmp	short loc_6243F6

loc_6243F1:
add	eax, eax
mov	[esi+8], eax

loc_6243F6:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 8
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edi, eax
add	esp, 4
mov	[esp+18h+arg_8], edi
mov	[esp+18h+var_4], 0
xor	edx, edx
mov	[esp+18h+var_4], 0FFFFFFFFh
cmp	[esi+4], edx
jbe	short loc_62444E
nop

loc_624430:
mov	eax, [esi]
lea	ecx, ds:0[edx*8]
mov	ebx, [eax+ecx]
add	eax, ecx
mov	[ecx+edi], ebx
mov	eax, [eax+4]
inc	edx
mov	[ecx+edi+4], eax
cmp	edx, [esi+4]
jb	short loc_624430

loc_62444E:
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi], edi

loc_62445B:
mov	ecx, [esi+4]
cmp	ecx, ebp
jz	short loc_624477

loc_624462:
mov	edx, [esi]
lea	eax, [edx+ecx*8]
mov	edx, [eax-8]
mov	[eax], edx
mov	edx, [eax-4]
dec	ecx
mov	[eax+4], edx
cmp	ecx, ebp
jnz	short loc_624462

loc_624477:
mov	eax, [esi]
mov	ecx, [esp+18h+arg_0]
lea	eax, [eax+ebp*8]
mov	[eax], ecx
mov	edx, [esp+18h+arg_4]
mov	ecx, [esp+18h+var_C]
pop	edi
mov	[eax+4], edx
inc	dword ptr [esi+4]
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_6243C0 endp




sub_6244A0 proc	near
mov	eax, [edx+4]
cmp	ecx, eax
jnb	short locret_6244CE
dec	eax
cmp	ecx, eax
jnb	short loc_6244CB
push	esi
lea	ecx, [ecx+0]

loc_6244B0:
mov	eax, [edx]
mov	esi, [eax+ecx*8+8]
lea	eax, [eax+ecx*8]
mov	[eax], esi
mov	esi, [eax+0Ch]
mov	[eax+4], esi
mov	eax, [edx+4]
inc	ecx
dec	eax
cmp	ecx, eax
jb	short loc_6244B0
pop	esi

loc_6244CB:
dec	dword ptr [edx+4]

locret_6244CE:
retn
sub_6244A0 endp

align 10h



; int __thiscall sub_6244D0(void *, char)
sub_6244D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_15FA0AC
mov	dword ptr [edi], offset	off_15FA0B4
call	sub_622E20
mov	dword ptr [edi], offset	off_15FA0BC
call	sub_622E20
test	[esp+8+arg_0], 1
jz	short loc_624503
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_624503:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6244D0 endp

align 10h



; int __thiscall sub_624510(void *, char)
sub_624510 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_15FA0B4
call	sub_622E20
mov	dword ptr [edi], offset	off_15FA0BC
call	sub_622E20
test	[esp+4+arg_0], 1
jz	short loc_624539
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_624539:
mov	eax, edi
pop	edi
retn	4
sub_624510 endp

align 10h



; int __thiscall sub_624540(void *, char)
sub_624540 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_15FA0BC
call	sub_622E20
test	[esp+4+arg_0], 1
jz	short loc_62455E
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62455E:
mov	eax, edi
pop	edi
retn	4
sub_624540 endp

align 10h



sub_624570 proc	near
mov	ecx, dword_19681B8
mov	eax, dword_19681BC
cmp	ecx, eax
jnz	short loc_6245FA
test	eax, eax
jnz	short loc_62458A
mov	eax, 10h
jmp	short loc_62458C

loc_62458A:
add	eax, eax

loc_62458C:
xor	ecx, ecx
mov	dword_19681BC, eax
mov	edx, 4
mul	edx
seto	cl
push	esi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	dword_19681B4, 0
mov	esi, eax
jz	short loc_6245E3
xor	eax, eax
cmp	dword_19681B8, eax
jbe	short loc_6245D5

loc_6245C0:
mov	ecx, dword_19681B4
mov	edx, [ecx+eax*4]
mov	[esi+eax*4], edx
inc	eax
cmp	eax, dword_19681B8
jb	short loc_6245C0

loc_6245D5:
mov	eax, dword_19681B4
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6245E3:
mov	ecx, dword_19681B8
mov	dword_19681B4, esi
mov	[esi+ecx*4], edi
inc	dword_19681B8
pop	esi
retn

loc_6245FA:
mov	edx, dword_19681B4
mov	[edx+ecx*4], edi
inc	dword_19681B8
retn
sub_624570 endp

align 10h



sub_624610 proc	near

arg_0= dword ptr  4

cmp	byte ptr [esi+14h], 0
push	ebx
mov	ebx, [esp+4+arg_0]
jz	short loc_624631
mov	eax, [ebx]
mov	ecx, [esi+10h]
cmp	eax, ecx
jnz	short loc_624631
mov	eax, [esi+0Ch]
mov	ecx, [esi]
lea	eax, [ecx+eax*8+4]
pop	ebx
retn	4

loc_624631:
push	edi
lea	edx, [esp+8+arg_0]
push	edx
push	ebx
mov	eax, esi
call	sub_624710
cmp	byte ptr [esp+8+arg_0],	0
mov	edi, eax
jnz	short loc_62465F
push	8Ah		; Line
push	offset aZLwo7_buildB_4 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aObjectexists ; "objectExists"
call	__wassert
add	esp, 0Ch

loc_62465F:
mov	ecx, [esi]
mov	[esi+0Ch], edi
mov	eax, [ebx]
mov	[esi+10h], eax
lea	eax, [ecx+edi*8+4]
pop	edi
mov	byte ptr [esi+14h], 1
pop	ebx
retn	4
sub_624610 endp

align 10h


; Attributes: bp-based frame

sub_624680 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0Ch
cmp	byte ptr [esi+14h], 0
push	ebx
mov	ebx, [ebp+arg_0]
jz	short loc_6246AE
mov	eax, [edi]
mov	ecx, [esi+10h]
cmp	eax, ecx
jnz	short loc_6246AE
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [ebx]
mov	[ecx+eax*8+4], edx
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_6246AE:
lea	eax, [esp+10h+var_9]
push	eax
push	edi
mov	eax, esi
call	sub_624710
cmp	[esp+10h+var_9], 0
jz	short loc_6246DD
mov	edx, [esi]
mov	[esi+0Ch], eax
mov	ecx, [edi]
mov	[esi+10h], ecx
mov	byte ptr [esi+14h], 1
mov	ecx, [ebx]
mov	[edx+eax*8+4], ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_6246DD:
mov	eax, [ebx]
mov	edx, [edi]
lea	ecx, [esp+10h+var_8]
mov	[esp+10h+var_4], eax
push	ecx
mov	ecx, edi
mov	eax, esi
mov	[esp+14h+var_8], edx
call	sub_624780
mov	[esi+0Ch], eax
mov	edx, [edi]
mov	[esi+10h], edx
mov	byte ptr [esi+14h], 1
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_624680 endp

align 10h



sub_624710 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, eax
cmp	dword ptr [esi+4], 0
jnz	short loc_624729
pop	esi
mov	byte ptr [ebp+0], 0
xor	eax, eax
pop	ebp
retn	8

loc_624729:
mov	eax, [esi+4]
mov	esi, [esi]
push	ebx
push	edi
lea	edi, [eax-1]
cdq
sub	eax, edx
mov	edx, [esp+10h+arg_0]
mov	ebx, [edx]
xor	ecx, ecx
sar	eax, 1

loc_624740:
mov	edx, [esi+eax*8]
cmp	ebx, edx
jl	short loc_624768
jz	short loc_62476D
lea	ecx, [eax+1]

loc_62474C:
mov	eax, edi
sub	eax, ecx
cdq
sub	eax, edx
sar	eax, 1
add	eax, ecx
cmp	ecx, edi
jle	short loc_624740
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 0
mov	eax, ecx
pop	ebp
retn	8

loc_624768:
lea	edi, [eax-1]
jmp	short loc_62474C

loc_62476D:
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 1
pop	ebp
retn	8
sub_624710 endp

align 10h



sub_624780 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	eax, esi
call	sub_624710
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_6247BF
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
or	eax, 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	4

loc_6247BF:
mov	edx, [ebx]
cmp	edi, [esi+4]
jb	short loc_6247E2
sub	esp, 8
mov	eax, esp
mov	[eax], edx
mov	ecx, [ebx+4]
mov	[eax+4], ecx
call	sub_624800
mov	eax, [esi+4]
dec	eax
pop	edi
pop	esi
pop	ebx
retn	4

loc_6247E2:
push	edi
sub	esp, 8
mov	eax, esp
mov	[eax], edx
mov	ecx, [ebx+4]
mov	[eax+4], ecx
call	sub_6243C0
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_624780 endp

align 10h



sub_624800 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_624800
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esi+8]
cmp	[esi+4], eax
jnz	short loc_62489D
test	eax, eax
jnz	short loc_62482B
mov	dword ptr [esi+8], 10h
jmp	short loc_624830

loc_62482B:
add	eax, eax
mov	[esi+8], eax

loc_624830:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 8
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edi, eax
add	esp, 4
mov	[esp+14h+var_10], edi
mov	[esp+14h+var_4], 0
mov	[esp+14h+var_4], 0FFFFFFFFh
cmp	dword ptr [esi], 0
jz	short loc_62489A
xor	edx, edx
cmp	[esi+4], edx
jbe	short loc_62488F
push	ebx

loc_624870:
mov	eax, [esi]
lea	ecx, ds:0[edx*8]
mov	ebx, [eax+ecx]
add	eax, ecx
mov	[ecx+edi], ebx
mov	eax, [eax+4]
inc	edx
mov	[ecx+edi+4], eax
cmp	edx, [esi+4]
jb	short loc_624870
pop	ebx

loc_62488F:
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62489A:
mov	[esi], edi
pop	edi

loc_62489D:
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [esp+10h+arg_0]
lea	eax, [eax+edx*8]
mov	[eax], ecx
mov	edx, [esp+10h+arg_4]
mov	ecx, [esp+10h+var_C]
mov	[eax+4], edx
inc	dword ptr [esi+4]
mov	large fs:0, ecx
add	esp, 10h
retn	8
sub_624800 endp

align 10h



sub_6248D0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
push	esi
mov	esi, [esp+4+arg_0]
add	[esi], edx
mov	edx, [ecx+10h]
add	[esi+10h], edx
mov	edx, [ecx+20h]
add	[esi+20h], edx
mov	edx, [ecx+24h]
push	edi
adc	[esi+24h], edx
mov	edx, [ecx+40h]
add	[esi+40h], edx
mov	edx, [ecx+44h]
adc	[esi+44h], edx
fld	qword ptr [ecx+118h]
fadd	qword ptr [esi+118h]
fstp	qword ptr [esi+118h]
fld	qword ptr [ecx+138h]
fadd	qword ptr [esi+138h]
fstp	qword ptr [esi+138h]
mov	edx, [ecx+180h]
add	[esi+180h], edx
mov	edx, [ecx+184h]
adc	[esi+184h], edx
mov	edx, [ecx+4]
add	[esi+4], edx
mov	edx, [ecx+14h]
add	[esi+14h], edx
mov	edx, [ecx+28h]
add	[esi+28h], edx
mov	edx, [ecx+2Ch]
adc	[esi+2Ch], edx
mov	edx, [ecx+48h]
add	[esi+48h], edx
mov	edx, [ecx+4Ch]
adc	[esi+4Ch], edx
fld	qword ptr [ecx+120h]
fadd	qword ptr [esi+120h]
fstp	qword ptr [esi+120h]
fld	qword ptr [ecx+140h]
fadd	qword ptr [esi+140h]
fstp	qword ptr [esi+140h]
mov	edx, [ecx+188h]
add	[esi+188h], edx
mov	edx, [ecx+18Ch]
adc	[esi+18Ch], edx
mov	edx, [ecx+8]
add	[esi+8], edx
mov	edx, [ecx+18h]
add	[esi+18h], edx
mov	edx, [ecx+30h]
add	[esi+30h], edx
mov	edx, [ecx+34h]
adc	[esi+34h], edx
mov	edx, [ecx+50h]
add	[esi+50h], edx
mov	edx, [ecx+54h]
adc	[esi+54h], edx
fld	qword ptr [ecx+128h]
fadd	qword ptr [esi+128h]
fstp	qword ptr [esi+128h]
fld	qword ptr [ecx+148h]
fadd	qword ptr [esi+148h]
fstp	qword ptr [esi+148h]
mov	edx, [ecx+190h]
add	[esi+190h], edx
mov	edx, [ecx+194h]
adc	[esi+194h], edx
mov	edx, [ecx+0Ch]
add	[esi+0Ch], edx
mov	edx, [ecx+1Ch]
add	[esi+1Ch], edx
mov	edx, [ecx+38h]
add	[esi+38h], edx
mov	edx, [ecx+3Ch]
adc	[esi+3Ch], edx
mov	edx, [ecx+58h]
add	[esi+58h], edx
mov	edx, [ecx+5Ch]
adc	[esi+5Ch], edx
fld	qword ptr [ecx+130h]
fadd	qword ptr [esi+130h]
fstp	qword ptr [esi+130h]
fld	qword ptr [ecx+150h]
fadd	qword ptr [esi+150h]
fstp	qword ptr [esi+150h]
mov	edx, [ecx+198h]
add	[esi+198h], edx
mov	edx, [ecx+19Ch]
adc	[esi+19Ch], edx
mov	edx, [ecx+60h]
add	[esi+60h], edx
mov	edx, [ecx+60h]
add	[esi+64h], edx
mov	edx, [ecx+68h]
add	[esi+68h], edx
mov	edx, [ecx+70h]
add	[esi+70h], edx
mov	edx, [ecx+74h]
adc	[esi+74h], edx
mov	edx, [ecx+78h]
add	[esi+78h], edx
mov	edx, [ecx+7Ch]
add	[esi+7Ch], edx
mov	edx, [ecx+80h]
add	[esi+80h], edx
mov	edx, [ecx+84h]
adc	[esi+84h], edx
mov	edx, [ecx+88h]
add	[esi+88h], edx
mov	edx, [ecx+8Ch]
adc	[esi+8Ch], edx
mov	edx, [ecx+90h]
add	[esi+90h], edx
mov	edx, [ecx+94h]
add	[esi+94h], edx
mov	edx, [ecx+98h]
add	[esi+98h], edx
mov	edx, [ecx+9Ch]
add	[esi+9Ch], edx
mov	edx, [ecx+0A0h]
add	[esi+0A0h], edx
mov	edx, [ecx+0A8h]
add	[esi+0A8h], edx
mov	edx, [ecx+0ACh]
adc	[esi+0ACh], edx
mov	edx, [ecx+0B0h]
add	[esi+0B0h], edx
mov	edx, [ecx+0B4h]
adc	[esi+0B4h], edx
mov	edx, [ecx+0B8h]
add	[esi+0B8h], edx
mov	edx, [ecx+0BCh]
add	[esi+0BCh], edx
mov	edx, [ecx+0C0h]
add	[esi+0C0h], edx
mov	edx, [ecx+0C4h]
add	[esi+0C4h], edx
mov	edx, [ecx+0C8h]
add	[esi+0C8h], edx
mov	edx, [ecx+0CCh]
add	[esi+0CCh], edx
mov	edx, [ecx+0D0h]
add	[esi+0D0h], edx
mov	edx, [ecx+0D4h]
adc	[esi+0D4h], edx
mov	edx, [ecx+0D8h]
add	[esi+0D8h], edx
mov	edx, [ecx+0DCh]
adc	[esi+0DCh], edx
mov	edx, [ecx+0E0h]
add	[esi+0E0h], edx
mov	edx, [ecx+0E4h]
add	[esi+0E4h], edx
mov	edx, [ecx+0E8h]
add	[esi+0E8h], edx
mov	edx, [ecx+0ECh]
add	[esi+0ECh], edx
mov	edx, [ecx+0F0h]
add	[esi+0F0h], edx
mov	edx, [ecx+0F4h]
add	[esi+0F4h], edx
mov	edx, [ecx+0F8h]
add	[esi+0F8h], edx
fld	qword ptr [ecx+100h]
fadd	qword ptr [esi+100h]
mov	edi, eax
fstp	qword ptr [esi+100h]
fld	qword ptr [ecx+108h]
fadd	qword ptr [esi+108h]
fstp	qword ptr [esi+108h]
mov	edx, [ecx+158h]
add	[esi+158h], edx
mov	edx, [ecx+15Ch]
adc	[esi+15Ch], edx
fld	qword ptr [ecx+160h]
fadd	qword ptr [esi+160h]
fstp	qword ptr [esi+160h]
fld	qword ptr [ecx+168h]
fadd	qword ptr [esi+168h]
fstp	qword ptr [esi+168h]
fld	qword ptr [ecx+170h]
fadd	qword ptr [esi+170h]
fstp	qword ptr [esi+170h]
fld	qword ptr [ecx+178h]
mov	ecx, 68h
fadd	qword ptr [esi+178h]
fstp	qword ptr [esi+178h]
rep movsd
pop	edi
pop	esi
retn	4
sub_6248D0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12E855F

loc_624C80:
mov	dword ptr [ecx], offset	off_15FA514
retn
; END OF FUNCTION CHUNK	FOR sub_12E855F
align 10h



; int __thiscall sub_624C90(void *, char)
sub_624C90 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FA514
jz	short loc_624CA9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_624CA9:
mov	eax, esi
pop	esi
retn	4
sub_624C90 endp

align 10h



; int __thiscall sub_624CB0(void *, char)
sub_624CB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A42260
test	[esp+4+arg_0], 1
jz	short loc_624CC8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_624CC8:
mov	eax, esi
pop	esi
retn	4
sub_624CB0 endp

align 10h



sub_624CD0 proc	near
push	esi
mov	esi, ecx
lea	eax, [esi+20h]
push	eax
call	sub_A39ED0
xor	eax, eax
mov	[esi+1468h], eax
mov	[esi+1460h], eax
mov	[esi+1464h], eax
mov	eax, esi
pop	esi
retn
sub_624CD0 endp

align 10h



sub_624D00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset SEH_624D00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
mov	esi, ecx
mov	[esp+14h+var_10], esi
lea	eax, [esi+1460h]
push	eax
mov	[esp+18h+var_4], 0
call	sub_A37C30
add	esi, 20h
push	esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_A398F0
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	esi
add	esp, 10h
retn
sub_624D00 endp

align 10h



sub_624D60 proc	near
mov	al, [ecx+1D4h]
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_624D60 endp




sub_624D70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
add	esi, 0DF8h
call	sub_6252D0
mov	ecx, [esp+4+arg_0]
mov	[eax], ecx
mov	edx, [esi+0Ch]
mov	eax, 1
add	[esi+14h], eax
mov	[edx+4], al
mov	eax, [esi+0Ch]
mov	ecx, [eax+8]
mov	[esi+0Ch], ecx
pop	esi
retn	4
sub_624D70 endp

align 10h


; Attributes: thunk

sub_624DA0 proc	near
jmp	sub_624DE0
sub_624DA0 endp

align 10h



sub_624DB0 proc	near

var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 20h
push	edi
lea	edi, [esp+24h+var_20]
call	sub_625920
lea	edi, [esp+24h+var_10]
call	sub_625920
mov	ecx, [esp+24h+arg_0]
lea	eax, [esp+24h+var_20]
push	eax
push	ecx
mov	eax, edi
call	sub_625780
pop	edi
add	esp, 20h
retn	4
sub_624DB0 endp

align 10h



sub_624DE0 proc	near
xor	ecx, ecx
mov	[eax+84h], ecx
mov	[eax+88h], ecx
mov	[eax+8Ch], ecx
mov	[eax+90h], ecx
mov	[eax+94h], ecx
mov	[eax+98h], ecx
mov	[eax+9Ch], ecx
mov	[eax+0A0h], ecx
mov	[eax+0C4h], ecx
mov	[eax+0C8h], ecx
mov	[eax+0CCh], ecx
mov	[eax+0D0h], ecx
mov	[eax+0F4h], ecx
mov	[eax+0F8h], ecx
mov	[eax+0FCh], ecx
mov	[eax+100h], ecx
mov	[eax+124h], ecx
mov	[eax+128h], ecx
mov	[eax+12Ch], ecx
mov	[eax+130h], ecx
mov	[eax+80h], cl
retn
sub_624DE0 endp

align 10h



sub_624E70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	dword ptr [edi+4], 0
jnz	short loc_624E82
mov	eax, [esp+arg_4]
mov	byte ptr [eax],	0
xor	eax, eax
retn	8

loc_624E82:
mov	eax, [edi+4]
push	ebx
push	ebp
lea	ebp, [eax-1]
cdq
sub	eax, edx
mov	edx, [edi]
push	esi
mov	esi, eax
sar	esi, 1
lea	ecx, [esi+esi*2]
lea	eax, [edx+ecx*4]
push	eax
mov	eax, [esp+10h+arg_0]
push	eax
xor	ebx, ebx
call	sub_A3F8A0
add	esp, 8
test	eax, eax
jz	short loc_624EE3

loc_624EAE:
jge	short loc_624EB5
lea	ebp, [esi-1]
jmp	short loc_624EB8

loc_624EB5:
lea	ebx, [esi+1]

loc_624EB8:
mov	eax, ebp
sub	eax, ebx
cdq
sub	eax, edx
mov	esi, eax
sar	esi, 1
add	esi, ebx
cmp	ebx, ebp
jg	short loc_624EF2
mov	edx, [edi]
lea	ecx, [esi+esi*2]
lea	eax, [edx+ecx*4]
push	eax
mov	eax, [esp+10h+arg_0]
push	eax
call	sub_A3F8A0
add	esp, 8
test	eax, eax
jnz	short loc_624EAE

loc_624EE3:
mov	ecx, [esp+0Ch+arg_4]
mov	eax, esi
pop	esi
pop	ebp
mov	byte ptr [ecx],	1
pop	ebx
retn	8

loc_624EF2:
mov	edx, [esp+0Ch+arg_4]
pop	esi
pop	ebp
mov	eax, ebx
mov	byte ptr [edx],	0
pop	ebx
retn	8
sub_624E70 endp

align 10h



sub_624F10 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, eax
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	edi, esi
call	sub_624E70
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_624F4F
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
or	eax, 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	4

loc_624F4F:
cmp	edi, [esi+4]
jb	short loc_624F78
mov	edx, [ebx]
mov	ecx, [ebx+4]
sub	esp, 0Ch
mov	eax, esp
mov	[eax], edx
mov	edx, [ebx+8]
mov	[eax+4], ecx
mov	[eax+8], edx
call	sub_626030
mov	eax, [esi+4]
dec	eax
pop	edi
pop	esi
pop	ebx
retn	4

loc_624F78:
mov	ecx, [ebx]
mov	edx, [ebx+4]
push	edi
sub	esp, 0Ch
mov	eax, esp
mov	[eax], ecx
mov	ecx, [ebx+8]
mov	[eax+4], edx
mov	[eax+8], ecx
call	sub_6260E0
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_624F10 endp

align 10h



sub_624FA0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
push	edi
mov	edi, eax
lea	eax, [esp+0Ch+var_1]
push	eax
push	ecx
call	sub_624E70
cmp	[esp+0Ch+var_1], 0
mov	esi, eax
jnz	short loc_624FD6
push	0CDh		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aObjectexistsTr ; "objectExists==true"
call	__wassert
add	esp, 0Ch
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn

loc_624FD6:
mov	edx, edi
call	sub_6261C0
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn
sub_624FA0 endp

align 10h



sub_624FF0 proc	near
mov	ecx, [edx+4]
cmp	eax, ecx
jnb	short locret_625018
dec	ecx
cmp	eax, ecx
jnb	short loc_625015
push	esi
lea	ecx, [ecx+0]

loc_625000:
mov	ecx, [edx]
mov	esi, [ecx+eax*4+4]
lea	ecx, [ecx+eax*4]
mov	[ecx], esi
mov	ecx, [edx+4]
inc	eax
dec	ecx
cmp	eax, ecx
jb	short loc_625000
pop	esi

loc_625015:
dec	dword ptr [edx+4]

locret_625018:
retn
sub_624FF0 endp

align 10h



sub_625020 proc	near
mov	eax, [ecx+4]
mov	edx, [ecx+0Ch]
push	esi
lea	esi, [eax+edi]
cmp	esi, edx
jb	short loc_625039
mov	ecx, [ecx]
sub	eax, edx
add	eax, edi
lea	eax, [ecx+eax*4]
pop	esi
retn

loc_625039:
mov	edx, [ecx]
lea	eax, [edx+esi*4]
pop	esi
retn
sub_625020 endp




sub_625040 proc	near
push	ebx
push	edi
push	44h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
xor	ebx, ebx
add	esp, 4
cmp	eax, ebx
jz	short loc_625057
mov	[eax+3Ch], bl
jmp	short loc_625059

loc_625057:
xor	eax, eax

loc_625059:		; size_t
push	44h
mov	[esi+8], eax
mov	[esi+0Ch], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, ebx
jz	short loc_625072
mov	[eax+3Ch], bl
jmp	short loc_625074

loc_625072:
xor	eax, eax

loc_625074:
mov	ecx, [esi+8]
mov	[ecx+40h], eax
mov	edi, 6
nop

loc_625080:
mov	edx, [esi+8]
mov	eax, [edx+40h]
push	44h		; size_t
mov	[esi+8], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, ebx
jz	short loc_62509C
mov	[eax+3Ch], bl
jmp	short loc_62509E

loc_62509C:
xor	eax, eax

loc_62509E:
sub	edi, 1
mov	ecx, [esi+8]
mov	[ecx+40h], eax
jnz	short loc_625080
mov	edx, [esi+8]
mov	eax, [edx+40h]
mov	ecx, [esi+0Ch]
mov	[eax+40h], ecx
mov	eax, [esi+0Ch]
pop	edi
mov	[esi+8], eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+14h], ebx
mov	[esi+10h], ebx
mov	eax, esi
pop	ebx
retn
sub_625040 endp

align 10h



sub_6250D0 proc	near
mov	eax, [esi+4]
mov	eax, [eax+40h]
mov	[esi+8], eax
cmp	eax, [esi+4]
jz	short loc_6250FD
push	edi
nop

loc_6250E0:
mov	ecx, [esi+8]
mov	edi, [ecx+40h]
mov	edx, [esi+8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	eax, edi
add	esp, 4
mov	[esi+8], edi
cmp	eax, [esi+4]
jnz	short loc_6250E0
pop	edi

loc_6250FD:
mov	ecx, [esi+8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx
retn
sub_6250D0 endp

align 10h



sub_625110 proc	near
mov	eax, [esi+4]
mov	ecx, [eax+40h]
cmp	ecx, [esi+8]
jz	short loc_625129
mov	edx, [esi+4]
mov	eax, [edx+40h]
mov	cl, [eax+3Ch]
cmp	cl, 1
jnz	short loc_625177

loc_625129:
mov	edx, [esi+4]
push	edi
mov	edi, [edx+40h]
push	44h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_625144
mov	byte ptr [eax+3Ch], 0
jmp	short loc_625146

loc_625144:
xor	eax, eax

loc_625146:
mov	ecx, [esi+4]
mov	[ecx+40h], eax
mov	edx, [esi+4]
mov	eax, [edx+40h]
test	eax, eax
jnz	short loc_62516D
push	91h		; Line
push	offset aZLwo7_buildB_1 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aWriteaheadpoin ; "writeAheadPointer->next"
call	__wassert
add	esp, 0Ch

loc_62516D:
mov	ecx, [esi+4]
mov	edx, [ecx+40h]
mov	[edx+40h], edi
pop	edi

loc_625177:
mov	eax, [esi+4]
mov	ecx, [eax+40h]
mov	[esi+4], ecx
retn
sub_625110 endp

align 10h



sub_625190 proc	near
mov	eax, [esi+8]
mov	ecx, [eax+40h]
mov	edx, [esi+8]
mov	[esi+0Ch], ecx
mov	eax, [edx+40h]
mov	ecx, 1
cmp	eax, [esi+8]
jz	short loc_6251DF
lea	esp, [esp+0]

loc_6251B0:
mov	eax, [eax+40h]
inc	ecx
cmp	eax, [esi+8]
jnz	short loc_6251B0
cmp	ecx, 8
jle	short loc_6251DF
push	ebx
push	edi
lea	ebx, [ecx-8]

loc_6251C3:
mov	eax, [esi+0Ch]
mov	edi, [eax+40h]
mov	ecx, [esi+0Ch]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
sub	ebx, 1
mov	[esi+0Ch], edi
jnz	short loc_6251C3
pop	edi
pop	ebx

loc_6251DF:
mov	eax, [esi+0Ch]
mov	edx, [esi+8]
mov	[edx+40h], eax
mov	eax, [esi+8]
mov	[esi+0Ch], eax
mov	[esi], eax
mov	[esi+4], eax
xor	eax, eax
mov	[esi+14h], eax
mov	[esi+10h], eax
retn
sub_625190 endp

align 10h



sub_625200 proc	near
push	ebx
push	edi
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
xor	ebx, ebx
add	esp, 4
cmp	eax, ebx
jz	short loc_625217
mov	[eax+4], bl
jmp	short loc_625219

loc_625217:
xor	eax, eax

loc_625219:		; size_t
push	0Ch
mov	[esi+8], eax
mov	[esi+0Ch], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, ebx
jz	short loc_625232
mov	[eax+4], bl
jmp	short loc_625234

loc_625232:
xor	eax, eax

loc_625234:
mov	ecx, [esi+8]
mov	[ecx+8], eax
mov	edi, 6
nop

loc_625240:
mov	edx, [esi+8]
mov	eax, [edx+8]
push	0Ch		; size_t
mov	[esi+8], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, ebx
jz	short loc_62525C
mov	[eax+4], bl
jmp	short loc_62525E

loc_62525C:
xor	eax, eax

loc_62525E:
sub	edi, 1
mov	ecx, [esi+8]
mov	[ecx+8], eax
jnz	short loc_625240
mov	edx, [esi+8]
mov	eax, [edx+8]
mov	ecx, [esi+0Ch]
mov	[eax+8], ecx
mov	eax, [esi+0Ch]
pop	edi
mov	[esi+8], eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+14h], ebx
mov	[esi+10h], ebx
mov	eax, esi
pop	ebx
retn
sub_625200 endp

align 10h



sub_625290 proc	near
mov	eax, [esi+4]
mov	eax, [eax+8]
mov	[esi+8], eax
cmp	eax, [esi+4]
jz	short loc_6252BD
push	edi
nop

loc_6252A0:
mov	ecx, [esi+8]
mov	edi, [ecx+8]
mov	edx, [esi+8]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	eax, edi
add	esp, 4
mov	[esi+8], edi
cmp	eax, [esi+4]
jnz	short loc_6252A0
pop	edi

loc_6252BD:
mov	ecx, [esi+8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx
retn
sub_625290 endp

align 10h



sub_6252D0 proc	near
mov	eax, [esi+4]
mov	ecx, [eax+8]
cmp	ecx, [esi+8]
jz	short loc_6252E9
mov	edx, [esi+4]
mov	eax, [edx+8]
mov	cl, [eax+4]
cmp	cl, 1
jnz	short loc_625337

loc_6252E9:
mov	edx, [esi+4]
push	edi
mov	edi, [edx+8]
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_625304
mov	byte ptr [eax+4], 0
jmp	short loc_625306

loc_625304:
xor	eax, eax

loc_625306:
mov	ecx, [esi+4]
mov	[ecx+8], eax
mov	edx, [esi+4]
mov	eax, [edx+8]
test	eax, eax
jnz	short loc_62532D
push	91h		; Line
push	offset aZLwo7_buildB_1 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aWriteaheadpoin ; "writeAheadPointer->next"
call	__wassert
add	esp, 0Ch

loc_62532D:
mov	ecx, [esi+4]
mov	edx, [ecx+8]
mov	[edx+8], edi
pop	edi

loc_625337:
mov	eax, [esi+4]
mov	ecx, [eax+8]
mov	[esi+4], ecx
retn
sub_6252D0 endp

align 10h



sub_625350 proc	near
mov	eax, [esi+8]
mov	ecx, [eax+8]
mov	edx, [esi+8]
mov	[esi+0Ch], ecx
mov	eax, [edx+8]
mov	ecx, 1
cmp	eax, [esi+8]
jz	short loc_62539F
lea	esp, [esp+0]

loc_625370:
mov	eax, [eax+8]
inc	ecx
cmp	eax, [esi+8]
jnz	short loc_625370
cmp	ecx, 8
jle	short loc_62539F
push	ebx
push	edi
lea	ebx, [ecx-8]

loc_625383:
mov	eax, [esi+0Ch]
mov	edi, [eax+8]
mov	ecx, [esi+0Ch]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
sub	ebx, 1
mov	[esi+0Ch], edi
jnz	short loc_625383
pop	edi
pop	ebx

loc_62539F:
mov	eax, [esi+0Ch]
mov	edx, [esi+8]
mov	[edx+8], eax
mov	eax, [esi+8]
mov	[esi+0Ch], eax
mov	[esi], eax
mov	[esi+4], eax
xor	eax, eax
mov	[esi+14h], eax
mov	[esi+10h], eax
retn
sub_625350 endp

align 10h



sub_6253C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, eax
mov	eax, [esp+4+arg_0]
call	sub_62B710
mov	edx, [esi+4]
mov	eax, [esi+8]
cmp	edx, eax
ja	short loc_6253DC
mov	ecx, eax
sub	ecx, edx
jmp	short loc_6253E3

loc_6253DC:
mov	ecx, [esi+0Ch]
sub	ecx, edx
add	ecx, eax

loc_6253E3:
cmp	ecx, 1
jz	short loc_62544E
cmp	edx, eax
ja	short loc_6253F2
sub	eax, edx
mov	ecx, eax
jmp	short loc_6253F9

loc_6253F2:
mov	ecx, [esi+0Ch]
sub	ecx, edx
add	ecx, eax

loc_6253F9:
push	ebx
push	ebp
lea	ebp, [ecx-1]
push	edi
lea	edi, [ebp-1]

loc_625402:
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
lea	edx, [eax+ebp]
cmp	edx, ecx
jb	short loc_625415
mov	edx, eax
sub	edx, ecx
add	edx, ebp

loc_625415:
lea	ebx, [eax+edi]
cmp	ebx, ecx
jb	short loc_625422
sub	eax, ecx
add	eax, edi
jmp	short loc_625424

loc_625422:
mov	eax, ebx

loc_625424:
mov	ecx, [esi]
mov	eax, [ecx+eax*4]
mov	[ecx+edx*4], eax
test	edi, edi
jz	short loc_625434
dec	ebp
dec	edi
jmp	short loc_625402

loc_625434:
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
pop	edi
pop	ebp
pop	ebx
cmp	eax, ecx
jb	short loc_625443
sub	eax, ecx

loc_625443:
mov	edx, [esp+4+arg_0]
mov	ecx, [esi]
mov	edx, [edx]
mov	[ecx+eax*4], edx

loc_62544E:
pop	esi
retn	4
sub_6253C0 endp

align 10h



sub_625460 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, [ecx+8]
cmp	eax, edi
jz	short loc_6254C7
ja	short loc_625478
mov	edx, edi
sub	edx, eax
jmp	short loc_62547F

loc_625478:
mov	edx, [ecx+0Ch]
sub	edx, eax
add	edx, edi

loc_62547F:
cmp	ebx, edx
jnb	short loc_6254C7
mov	edx, [ecx+0Ch]
push	esi
lea	esi, [eax+ebx]
cmp	esi, edx
jb	short loc_625494
sub	eax, edx
add	eax, ebx
mov	esi, eax

loc_625494:
lea	eax, [esi+1]
cmp	eax, edx
jnz	short loc_62549D
xor	eax, eax

loc_62549D:
cmp	eax, edi
jz	short loc_6254B8

loc_6254A1:
mov	edx, [ecx]
mov	edi, [edx+eax*4]
mov	[edx+esi*4], edi
mov	esi, eax
inc	eax
cmp	eax, [ecx+0Ch]
jnz	short loc_6254B3
xor	eax, eax

loc_6254B3:
cmp	eax, [ecx+8]
jnz	short loc_6254A1

loc_6254B8:
mov	eax, [ecx+8]
pop	esi
test	eax, eax
jnz	short loc_6254C3
mov	eax, [ecx+0Ch]

loc_6254C3:
dec	eax
mov	[ecx+8], eax

loc_6254C7:
pop	edi
pop	ebx
retn	4
sub_625460 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12E863E

loc_6254D0:
cmp	dword ptr [eax+8], 0
jbe	short locret_6254FB
mov	eax, [eax]
test	eax, eax
jz	short locret_6254FB
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset loc_A46D80
push	ecx
push	4
push	eax
call	$LN21_0
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi

locret_6254FB:
retn
; END OF FUNCTION CHUNK	FOR sub_12E863E
align 10h



sub_625500 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_625500
push	eax
mov	large fs:0, esp
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
push	edi
xor	edi, edi
mov	[esp+1Ch+var_4], edi
mov	eax, [ebp+8]
cmp	[ebp+4], eax
jnz	loc_6255F5
cmp	eax, edi
jnz	short loc_62553C
mov	dword ptr [ebp+8], 10h
jmp	short loc_625541

loc_62553C:
add	eax, eax
mov	[ebp+8], eax

loc_625541:
mov	esi, [ebp+8]
xor	ecx, ecx
mov	eax, esi
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+1Ch+arg_0], eax
mov	byte ptr [esp+1Ch+var_4], 1
cmp	eax, edi
jz	short loc_625590
push	offset loc_A46D80
push	offset off_A46D90
push	esi
lea	edi, [eax+4]
push	4
push	edi
mov	[eax], esi
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))

loc_625590:
mov	byte ptr [esp+1Ch+var_4], 0
cmp	dword ptr [ebp+0], 0
mov	[esp+1Ch+arg_0], edi
jz	short loc_6255EE
xor	edi, edi
cmp	[ebp+4], edi
jbe	short loc_6255CA
mov	esi, [esp+1Ch+arg_0]
lea	ebx, [ebx+0]

loc_6255B0:
mov	ecx, [ebp+0]
lea	ebx, [ecx+edi*4]
call	sub_A46BF0
mov	eax, [ebx]
mov	[esi], eax
inc	dword ptr [eax]
inc	edi
add	esi, 4
cmp	edi, [ebp+4]
jb	short loc_6255B0

loc_6255CA:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_6255EE
mov	edx, [eax-4]
lea	esi, [eax-4]
push	offset loc_A46D80
push	edx
push	4
push	eax
call	$LN21_0
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6255EE:
mov	eax, [esp+1Ch+arg_0]
mov	[ebp+0], eax

loc_6255F5:
mov	ecx, [ebp+4]
mov	edx, [ebp+0]
mov	eax, [edx+ecx*4]
mov	ebx, ds:EnterCriticalSection
lea	esi, [edx+ecx*4]
cmp	eax, offset unk_1692B70
jz	short loc_625649
dec	dword ptr [eax]
mov	eax, [esi]
cmp	dword ptr [eax], 0
jnz	short loc_625649
cmp	dword ptr [eax+4], 70h
jbe	short loc_62562A
mov	eax, [eax+8]
push	eax		; void *
call	off_1692BF0
add	esp, 4

loc_62562A:		; lpCriticalSection
push	offset stru_196819C
call	ebx ; EnterCriticalSection
mov	edi, [esi]
call	sub_624570
push	offset stru_196819C ; lpCriticalSection
call	ds:LeaveCriticalSection
mov	dword ptr [esi], offset	unk_1692B70

loc_625649:
mov	ecx, [esp+1Ch+arg_4]
mov	[esi], ecx
mov	eax, [esp+1Ch+arg_4]
inc	dword ptr [eax]
inc	dword ptr [ebp+4]
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	eax, [esp+1Ch+arg_4]
cmp	eax, offset unk_1692B70
jz	short loc_6256A4
dec	dword ptr [eax]
mov	eax, [esp+1Ch+arg_4]
cmp	dword ptr [eax], 0
jnz	short loc_6256A4
cmp	dword ptr [eax+4], 70h
jbe	short loc_625689
mov	edx, [eax+8]
push	edx		; void *
call	off_1692BF0
add	esp, 4

loc_625689:		; lpCriticalSection
push	offset stru_196819C
call	ebx ; EnterCriticalSection
mov	edi, [esp+1Ch+arg_4]
call	sub_624570
push	offset stru_196819C ; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6256A4:
mov	ecx, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	8
sub_625500 endp

align 10h



sub_6256C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+4]
cmp	ebx, eax
jnb	short loc_62573B
dec	eax
cmp	ebx, eax
jnb	short loc_625738
push	esi
push	edi

loc_6256D8:
mov	eax, [ebp+0]
lea	esi, [eax+ebx*4]
mov	eax, [esi]
cmp	eax, offset unk_1692B70
jz	short loc_625726
dec	dword ptr [eax]
mov	eax, [esi]
cmp	dword ptr [eax], 0
jnz	short loc_625726
cmp	dword ptr [eax+4], 70h
jbe	short loc_625703
mov	ecx, [eax+8]
push	ecx		; void *
call	off_1692BF0
add	esp, 4

loc_625703:		; lpCriticalSection
push	offset stru_196819C
call	ds:EnterCriticalSection
mov	edi, [esi]
call	sub_624570
push	offset stru_196819C ; lpCriticalSection
call	ds:LeaveCriticalSection
mov	dword ptr [esi], offset	unk_1692B70

loc_625726:
mov	eax, [esi+4]
mov	[esi], eax
inc	dword ptr [eax]
mov	edx, [ebp+4]
inc	ebx
dec	edx
cmp	ebx, edx
jb	short loc_6256D8
pop	edi
pop	esi

loc_625738:
dec	dword ptr [ebp+4]

loc_62573B:
pop	ebp
pop	ebx
retn	8
sub_6256C0 endp




sub_625740 proc	near
cmp	dword ptr [esi+8], 0
jz	short locret_62577F
mov	eax, [esi]
test	eax, eax
jz	short loc_62576B
mov	ecx, [eax-4]
push	edi
lea	edi, [eax-4]
push	offset loc_A46D80
push	ecx
push	4
push	eax
call	$LN21_0
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	edi

loc_62576B:
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0

locret_62577F:
retn
sub_625740 endp




sub_625780 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
push	ebx
mov	ebx, [esp+24h+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [esp+30h+arg_4]
mov	esi, eax
mov	ecx, esi
mov	edx, edi
mov	byte ptr [ebx+80h], 1
call	sub_626210
lea	ebp, [ebx+0F4h]
test	al, al
jz	short loc_6257E0
mov	eax, [edi]
mov	ecx, [edi+4]
mov	edx, [edi+8]
mov	[ebp+0], eax
mov	eax, [edi+0Ch]
mov	[ebp+4], ecx
mov	ecx, [esi]
lea	edi, [ebx+0C4h]
mov	[ebp+8], edx
mov	edx, [esi+4]
mov	[edi], ecx
mov	ecx, [esi+0Ch]
mov	[ebp+0Ch], eax
mov	eax, [esi+8]
mov	[edi+4], edx
mov	[edi+8], eax
mov	[edi+0Ch], ecx
jmp	short loc_625817

loc_6257E0:
mov	eax, [esp+30h+arg_4]
mov	edx, [eax]
mov	ecx, [eax+4]
lea	edi, [ebx+0C4h]
mov	[edi], edx
mov	edx, [eax+8]
mov	eax, [eax+0Ch]
mov	[edi+4], ecx
mov	ecx, [esi]
mov	[edi+8], edx
mov	edx, [esi+4]
mov	[ebp+0], ecx
mov	ecx, [esi+0Ch]
mov	[edi+0Ch], eax
mov	eax, [esi+8]
mov	[ebp+4], edx
mov	[ebp+8], eax
mov	[ebp+0Ch], ecx

loc_625817:
mov	edx, [edi]
mov	ecx, [edi+8]
mov	eax, [edi+4]
mov	[esp+30h+var_10], edx
mov	edx, [edi+0Ch]
mov	[esp+30h+var_8], ecx
mov	[esp+30h+var_C], eax
mov	[esp+30h+var_4], edx
xor	ecx, ecx

loc_625834:
mov	eax, [esp+ecx*4+30h+var_10]
lea	edx, [eax-1]
mov	[esp+ecx*4+30h+var_10],	edx
test	eax, eax
jnz	short loc_625849
inc	ecx
cmp	ecx, 4
jb	short loc_625834

loc_625849:
mov	eax, [ebp+0]
mov	ecx, [ebp+4]
mov	edx, [ebp+8]
mov	[esp+30h+var_20], eax
mov	eax, [ebp+0Ch]
mov	[esp+30h+var_1C], ecx
mov	[esp+30h+var_18], edx
mov	[esp+30h+var_14], eax
xor	ecx, ecx
jmp	short loc_625870
align 10h

loc_625870:
mov	eax, [esp+ecx*4+30h+var_20]
lea	edx, [eax-1]
mov	[esp+ecx*4+30h+var_20],	edx
test	eax, eax
jnz	short loc_625885
inc	ecx
cmp	ecx, 4
jb	short loc_625870

loc_625885:
lea	esi, [ebx+0A4h]
lea	eax, [esp+30h+var_20]
push	esi
push	eax
lea	eax, [esp+38h+var_10]
call	sub_626240
push	ebx
push	esi
call	sub_626350
lea	ecx, [ebx+84h]
push	ecx
push	esi
push	ebx
call	sub_627E20
lea	edx, [ebx+124h]
push	edx
push	ebp
mov	eax, edi
call	sub_6264A0
lea	esi, [ebx+20h]
push	esi
push	ebp
mov	eax, edi
call	sub_626240
lea	eax, [ebx+40h]
push	eax
push	esi
call	sub_6259A0
lea	ecx, [ebx+60h]
push	ecx
push	esi
call	sub_625A70
add	esp, 3Ch
lea	esi, [ebx+0D4h]
call	sub_626740
lea	esi, [ebx+0E4h]
mov	ecx, edi
call	sub_626800
lea	esi, [ebx+104h]
mov	edi, ebp
call	sub_626740
lea	esi, [ebx+114h]
mov	ecx, ebp
call	sub_626800
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	8
sub_625780 endp

align 10h



sub_625920 proc	near
push	ebp
push	esi
mov	ebp, 1
jmp	short loc_625930
align 10h

loc_625930:
xor	esi, esi

loc_625932:
sub	dword_1692768, ebp
jns	short loc_625941
call	sub_A37E50
jmp	short loc_625977

loc_625941:
mov	eax, dword_1887F84
mov	ecx, [eax]
add	eax, 4
mov	dword_1887F84, eax
mov	eax, ecx
shr	eax, 0Bh
xor	ecx, eax
mov	edx, ecx
and	edx, 0FF3A58ADh
shl	edx, 7
xor	ecx, edx
mov	eax, ecx
and	eax, 0FFFFDF8Ch
shl	eax, 0Fh
xor	ecx, eax
mov	eax, ecx
shr	eax, 12h
xor	eax, ecx

loc_625977:
mov	[edi+esi*4], eax
add	esi, ebp
cmp	esi, 4
jl	short loc_625932
or	dword ptr [edi+0Ch], 80000000h
or	[edi], ebp
push	edi
call	sub_626890
add	esp, 4
test	al, al
jz	short loc_625930
pop	esi
pop	ebp
retn
sub_625920 endp

align 10h



sub_6259A0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 80h
push	ebx
mov	ebx, [esp+84h+arg_4]
push	ebp
mov	ebp, [esp+88h+arg_0]
push	esi
push	edi
push	ebx
push	ebp
call	sub_626CE0
xor	eax, eax
mov	ecx, 8
mov	esi, ebx
lea	edi, [esp+98h+var_60]
rep movsd
mov	[esp+98h+var_80], eax
mov	[esp+98h+var_7C], eax
mov	[esp+98h+var_78], eax
mov	[esp+98h+var_74], eax
mov	[esp+98h+var_70], eax
mov	[esp+98h+var_6C], eax
mov	[esp+98h+var_68], eax
mov	[esp+98h+var_64], eax
lea	eax, [esp+98h+var_80]
call	sub_626FD0
xor	eax, eax
mov	ecx, 8
mov	esi, ebp
lea	edi, [esp+98h+var_40]
rep movsd
mov	[esp+98h+var_20], eax
mov	[esp+98h+var_1C], eax
mov	[esp+98h+var_18], eax
mov	[esp+98h+var_14], eax
mov	[esp+98h+var_10], eax
mov	[esp+98h+var_C], eax
mov	[esp+98h+var_8], eax
mov	[esp+98h+var_4], eax
lea	eax, [esp+98h+var_80]
push	eax		; int
lea	ecx, [esp+9Ch+var_40]
mov	edx, eax
push	ecx		; void *
push	edx		; int
mov	eax, ecx
call	sub_627020
add	esp, 14h
mov	edi, ebx
mov	ecx, 8
lea	esi, [esp+90h+var_40]
rep movsd
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 80h
retn
sub_6259A0 endp

align 10h



sub_625A70 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0C0h
xor	eax, eax
push	esi
push	edi
mov	[esp+0C8h+var_BC], eax
mov	[esp+0C8h+var_B8], eax
mov	[esp+0C8h+var_B4], eax
mov	[esp+0C8h+var_B0], eax
mov	[esp+0C8h+var_AC], eax
mov	[esp+0C8h+var_A8], eax
mov	[esp+0C8h+var_A4], eax
mov	[esp+0C8h+var_C0], 1
mov	ecx, 8
lea	esi, [esp+0C8h+var_C0]
lea	edi, [esp+0C8h+var_60]
rep movsd
mov	esi, [esp+0C8h+arg_0]
mov	ecx, 8
lea	edi, [esp+0C8h+var_C0]
rep movsd
mov	[esp+0C8h+var_80], eax
mov	[esp+0C8h+var_7C], eax
mov	[esp+0C8h+var_78], eax
mov	[esp+0C8h+var_74], eax
mov	[esp+0C8h+var_70], eax
mov	[esp+0C8h+var_6C], eax
mov	[esp+0C8h+var_68], eax
mov	[esp+0C8h+var_64], eax
mov	[esp+0C8h+var_A0], eax
mov	[esp+0C8h+var_9C], eax
mov	[esp+0C8h+var_98], eax
mov	[esp+0C8h+var_94], eax
mov	[esp+0C8h+var_90], eax
mov	[esp+0C8h+var_8C], eax
mov	[esp+0C8h+var_88], eax
mov	[esp+0C8h+var_84], eax
lea	eax, [esp+0C8h+var_40]
push	eax
lea	ecx, [esp+0CCh+var_80]
push	ecx
lea	eax, [esp+0D0h+var_C0]
call	sub_627250
mov	edi, [esp+0D0h+arg_4]
add	esp, 8
mov	ecx, 8
lea	esi, [esp+0C8h+var_40]
rep movsd
pop	edi
pop	esi
add	esp, 0C0h
retn
sub_625A70 endp

align 10h



sub_625B40 proc	near

var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 120h
push	ebx
mov	ebx, [esp+124h+arg_8]
push	ebp
mov	ebp, [esp+128h+arg_4]
push	esi
mov	esi, eax
mov	eax, [esi]
mov	ecx, [esi+4]
mov	edx, [esi+8]
mov	[esp+12Ch+var_E0], eax
mov	eax, [esi+0Ch]
mov	[esp+12Ch+var_D4], eax
xor	eax, eax
mov	[esp+12Ch+var_DC], ecx
mov	[esp+12Ch+var_D8], edx
mov	[esp+12Ch+var_D0], eax
mov	[esp+12Ch+var_CC], eax
mov	[esp+12Ch+var_C8], eax
mov	[esp+12Ch+var_C4], eax
jmp	short loc_625B90
align 10h

loc_625B90:
mov	ecx, [esp+eax*4+12Ch+var_E0]
lea	edx, [ecx-1]
mov	[esp+eax*4+12Ch+var_E0], edx
test	ecx, ecx
jnz	short loc_625BA5
inc	eax
cmp	eax, 8
jb	short loc_625B90

loc_625BA5:
lea	eax, [esp+12Ch+var_E0]
push	eax
push	ebx
call	sub_627470
mov	eax, [esp+134h+var_D8]
mov	ecx, [esp+134h+var_E0]
mov	edx, [esp+134h+var_DC]
mov	[esp+134h+var_118], eax
mov	eax, [esi+4]
mov	[esp+134h+var_7C], eax
xor	eax, eax
mov	[esp+134h+var_120], ecx
mov	ecx, [esp+134h+var_D4]
mov	[esp+134h+var_11C], edx
mov	edx, [esi]
mov	[esp+134h+var_70], eax
mov	[esp+134h+var_6C], eax
mov	[esp+134h+var_68], eax
mov	[esp+134h+var_64], eax
lea	eax, [esp+134h+var_40]
push	eax
mov	[esp+138h+var_114], ecx
mov	ecx, [esi+8]
mov	[esp+138h+var_80], edx
mov	edx, [esi+0Ch]
push	ebp
lea	eax, [esp+13Ch+var_80]
mov	[esp+13Ch+var_78], ecx
mov	[esp+13Ch+var_74], edx
call	sub_627470
mov	edx, [esp+13Ch+var_3C]
mov	ecx, [esp+13Ch+var_40]
mov	eax, [esp+13Ch+var_38]
mov	[esp+13Ch+var_10C], edx
mov	[esp+13Ch+var_110], ecx
mov	ecx, [esp+13Ch+var_34]
lea	edx, [esp+13Ch+var_C0]
mov	[esp+13Ch+var_108], eax
push	edx
lea	eax, [esp+140h+var_110]
mov	[esp+140h+var_104], ecx
push	eax
mov	ecx, esi
lea	edx, [esp+144h+var_120]
call	sub_627690
mov	ecx, [edi]
mov	eax, [edi+8]
mov	edx, [edi+4]
add	esp, 18h
mov	[esp+12Ch+var_100], ecx
mov	ecx, [edi+0Ch]
mov	[esp+12Ch+var_F8], eax
xor	eax, eax
mov	[esp+12Ch+var_FC], edx
mov	[esp+12Ch+var_F4], ecx
mov	[esp+12Ch+var_F0], eax
mov	[esp+12Ch+var_EC], eax
mov	[esp+12Ch+var_E8], eax
mov	[esp+12Ch+var_E4], eax
jmp	short loc_625CA0
align 10h

loc_625CA0:
mov	ecx, [esp+eax*4+12Ch+var_100]
lea	edx, [ecx-1]
mov	[esp+eax*4+12Ch+var_100], edx
test	ecx, ecx
jnz	short loc_625CB5
inc	eax
cmp	eax, 8
jb	short loc_625CA0

loc_625CB5:
lea	eax, [esp+12Ch+var_100]
push	eax
push	ebx
call	sub_627470
mov	eax, [esp+134h+var_F8]
mov	ecx, [esp+134h+var_100]
mov	edx, [esp+134h+var_FC]
mov	[esp+134h+var_108], eax
mov	eax, [edi+4]
mov	[esp+134h+var_9C], eax
xor	eax, eax
mov	[esp+134h+var_110], ecx
mov	ecx, [esp+134h+var_F4]
mov	[esp+134h+var_10C], edx
mov	edx, [edi]
mov	[esp+134h+var_90], eax
mov	[esp+134h+var_8C], eax
mov	[esp+134h+var_88], eax
mov	[esp+134h+var_84], eax
lea	eax, [esp+134h+var_20]
push	eax
mov	[esp+138h+var_104], ecx
mov	ecx, [edi+8]
mov	[esp+138h+var_A0], edx
mov	edx, [edi+0Ch]
push	ebp
lea	eax, [esp+13Ch+var_A0]
mov	[esp+13Ch+var_98], ecx
mov	[esp+13Ch+var_94], edx
call	sub_627470
mov	edx, [esp+13Ch+var_1C]
mov	ecx, [esp+13Ch+var_20]
mov	eax, [esp+13Ch+var_18]
mov	[esp+13Ch+var_11C], edx
mov	[esp+13Ch+var_120], ecx
mov	ecx, [esp+13Ch+var_14]
lea	edx, [esp+13Ch+var_B0]
mov	[esp+13Ch+var_118], eax
push	edx
lea	eax, [esp+140h+var_120]
mov	[esp+140h+var_114], ecx
push	eax
mov	ecx, edi
lea	edx, [esp+144h+var_110]
call	sub_627690
add	esp, 18h
xor	eax, eax

loc_625D83:
mov	ecx, [esp+eax+12Ch+var_A4]
mov	edx, [esp+eax+12Ch+var_B4]
cmp	ecx, edx
ja	loc_625E6C
jb	short loc_625DA0
sub	eax, 4
cmp	eax, 0FFFFFFF4h
jge	short loc_625D83

loc_625DA0:
lea	eax, [esp+12Ch+var_C0]
push	eax
lea	ecx, [esp+130h+var_B0]
push	ecx
call	sub_627820
lea	edx, [esp+134h+var_B0]
push	edi
push	edx
call	sub_627880
add	esp, 10h

loc_625DC3:
mov	esi, [esp+12Ch+arg_0]
mov	eax, [esp+12Ch+arg_C]
push	esi
push	eax
lea	eax, [esp+134h+var_B0]
call	sub_626240
push	esi
push	esi
lea	eax, [esp+13Ch+var_A0]
call	sub_627470
lea	ecx, [esp+13Ch+var_80]
push	ecx
push	esi
call	sub_6278E0
mov	eax, [esp+144h+var_BC]
mov	edx, [esp+144h+var_C0]
mov	ecx, [esp+144h+var_B8]
mov	[esp+144h+var_5C], eax
xor	eax, eax
mov	[esp+144h+var_50], eax
mov	[esp+144h+var_4C], eax
mov	[esp+144h+var_48], eax
mov	[esp+144h+var_44], eax
lea	eax, [esp+144h+var_60]
mov	[esp+144h+var_60], edx
mov	edx, [esp+144h+var_B4]
push	eax
push	esi
mov	[esp+14Ch+var_58], ecx
mov	[esp+14Ch+var_54], edx
call	sub_6279E0
add	esp, 20h
pop	esi
pop	ebp
pop	ebx
add	esp, 120h
retn

loc_625E6C:
lea	ecx, [esp+12Ch+var_C0]
push	ecx
lea	edx, [esp+130h+var_B0]
push	edx
call	sub_627820
add	esp, 8
jmp	loc_625DC3
sub_625B40 endp

align 10h



sub_625E90 proc	near

var_100= dword ptr -100h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 100h
push	ebx
push	ebp
push	esi
push	edi
mov	esi, eax
xor	eax, eax
mov	ecx, 8
lea	edi, [esp+110h+var_100]
rep movsd
mov	esi, [esp+110h+arg_0]
mov	ecx, 8
lea	edi, [esp+110h+var_80]
rep movsd
mov	esi, [esp+110h+arg_4]
mov	ecx, 8
lea	edi, [esp+110h+var_C0]
rep movsd
push	3Ch		; size_t
push	eax		; int
mov	[esp+118h+var_E0], eax
mov	[esp+118h+var_DC], eax
mov	[esp+118h+var_D8], eax
mov	[esp+118h+var_D4], eax
mov	[esp+118h+var_D0], eax
mov	[esp+118h+var_CC], eax
mov	[esp+118h+var_C8], eax
mov	[esp+118h+var_C4], eax
mov	[esp+118h+var_60], eax
mov	[esp+118h+var_5C], eax
mov	[esp+118h+var_58], eax
mov	[esp+118h+var_54], eax
mov	[esp+118h+var_50], eax
mov	[esp+118h+var_4C], eax
mov	[esp+118h+var_48], eax
mov	[esp+118h+var_44], eax
mov	[esp+118h+var_A0], eax
mov	[esp+118h+var_9C], eax
mov	[esp+118h+var_98], eax
mov	[esp+118h+var_94], eax
mov	[esp+118h+var_90], eax
mov	[esp+118h+var_8C], eax
mov	[esp+118h+var_88], eax
mov	[esp+118h+var_84], eax
lea	eax, [esp+118h+var_3C]
push	eax		; void *
mov	[esp+11Ch+var_40], 1
call	_memset
lea	ecx, [esp+11Ch+var_100]
push	ecx
mov	edx, ecx
push	edx
lea	eax, [esp+124h+var_C0]
call	sub_627250
add	esp, 14h
xor	esi, esi
xor	ebp, ebp
lea	ecx, [ecx+0]

loc_625F90:
mov	ebx, [esp+ebp*4+110h+var_80]
mov	edi, 20h
test	ebx, ebx
jz	short loc_626004

loc_625FA0:
test	bl, 1
jz	short loc_625FFC
test	esi, esi
jz	short loc_625FD3
lea	esp, [esp+0]

loc_625FB0:
lea	eax, [esp+110h+var_100]
push	eax		; void *
call	sub_627A40
lea	ecx, [esp+114h+var_100]
push	ecx
mov	edx, ecx
push	edx
lea	eax, [esp+11Ch+var_C0]
call	sub_627250
add	esp, 0Ch
sub	esi, 1
jnz	short loc_625FB0

loc_625FD3:
lea	eax, [esp+110h+var_40]
push	eax		; void *
lea	ecx, [esp+114h+var_100]
push	ecx		; int
call	sub_627B50
lea	edx, [esp+118h+var_40]
mov	eax, edx
push	edx
push	eax
lea	eax, [esp+120h+var_C0]
call	sub_627250
add	esp, 10h

loc_625FFC:
shr	ebx, 1
inc	esi
dec	edi
test	ebx, ebx
jnz	short loc_625FA0

loc_626004:
inc	ebp
add	esi, edi
cmp	ebp, 8
jb	short loc_625F90
mov	edi, [esp+110h+arg_8]
mov	ecx, 8
lea	esi, [esp+110h+var_40]
rep movsd
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 100h
retn
sub_625E90 endp

align 10h



sub_626030 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8
arg_8= dword ptr  0Ch

mov	eax, [esi+8]
cmp	[esi+4], eax
jnz	short loc_6260B1
test	eax, eax
jnz	short loc_626045
mov	dword ptr [esi+8], 10h
jmp	short loc_62604A

loc_626045:
add	eax, eax
mov	[esi+8], eax

loc_62604A:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 0Ch
mul	edx
seto	cl
push	ebx
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	dword ptr [esi], 0
mov	ebx, eax
jz	short loc_6260AE
xor	edx, edx
cmp	[esi+4], edx
jbe	short loc_6260A3
push	ebp
push	edi
mov	edi, 0FFFFFFF8h
lea	ecx, [ebx+8]
sub	edi, ebx

loc_626081:
lea	eax, [edi+ecx]
add	eax, [esi]
inc	edx
mov	ebp, [eax]
mov	[ecx-8], ebp
mov	bp, [eax+4]
mov	[ecx-4], bp
mov	eax, [eax+8]
mov	[ecx], eax
add	ecx, 0Ch
cmp	edx, [esi+4]
jb	short loc_626081
pop	edi
pop	ebp

loc_6260A3:
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6260AE:
mov	[esi], ebx
pop	ebx

loc_6260B1:
mov	eax, [esi+4]
mov	ecx, [esp+arg_0]
lea	edx, [eax+eax*2]
mov	eax, [esi]
lea	eax, [eax+edx*4]
mov	[eax], ecx
mov	dx, [esp+arg_4]
mov	[eax+4], dx
mov	ecx, [esp+arg_8]
mov	[eax+8], ecx
inc	dword ptr [esi+4]
retn	0Ch
sub_626030 endp

align 10h



sub_6260E0 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esi+8]
push	ebx
push	edi
mov	edi, [esp+8+arg_C]
cmp	[esi+4], eax
jnz	short loc_626162
test	eax, eax
jnz	short loc_6260FB
mov	dword ptr [esi+8], 10h
jmp	short loc_626100

loc_6260FB:
add	eax, eax
mov	[esi+8], eax

loc_626100:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 0Ch
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
xor	edx, edx
add	esp, 4
mov	ebx, eax
cmp	[esi+4], edx
jbe	short loc_626155
mov	edi, 0FFFFFFF8h
lea	ecx, [ebx+8]
sub	edi, ebx
push	ebp

loc_626130:
lea	eax, [edi+ecx]
add	eax, [esi]
inc	edx
mov	ebp, [eax]
mov	[ecx-8], ebp
mov	bp, [eax+4]
mov	[ecx-4], bp
mov	eax, [eax+8]
mov	[ecx], eax
add	ecx, 0Ch
cmp	edx, [esi+4]
jb	short loc_626130
mov	edi, [esp+0Ch+arg_C]
pop	ebp

loc_626155:
mov	ecx, [esi]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi], ebx

loc_626162:
mov	eax, [esi+4]
cmp	eax, edi
jz	short loc_626194
lea	ecx, [eax+eax*2]
add	ecx, ecx
add	ecx, ecx
sub	eax, edi
mov	edx, eax

loc_626174:
mov	eax, [esi]
mov	ebx, [eax+ecx-0Ch]
add	eax, ecx
mov	[eax], ebx
mov	bx, [eax-8]
mov	[eax+4], bx
mov	ebx, [eax-4]
sub	ecx, 0Ch
sub	edx, 1
mov	[eax+8], ebx
jnz	short loc_626174

loc_626194:
mov	edx, [esi]
lea	ecx, [edi+edi*2]
lea	eax, [edx+ecx*4]
mov	ecx, [esp+8+arg_0]
mov	[eax], ecx
mov	dx, [esp+8+arg_4]
mov	[eax+4], dx
mov	ecx, [esp+8+arg_8]
pop	edi
mov	[eax+8], ecx
inc	dword ptr [esi+4]
pop	ebx
retn	10h
sub_6260E0 endp

align 10h



sub_6261C0 proc	near
push	esi
mov	esi, eax
mov	eax, [edx+4]
cmp	esi, eax
jnb	short loc_6261FF
dec	eax
cmp	esi, eax
jnb	short loc_6261FC
lea	ecx, [esi+esi*2]
add	ecx, ecx
add	ecx, ecx
push	edi

loc_6261D7:
mov	eax, [edx]
mov	edi, [eax+ecx+0Ch]
add	eax, ecx
mov	[eax], edi
mov	di, [eax+10h]
mov	[eax+4], di
mov	edi, [eax+14h]
mov	[eax+8], edi
mov	eax, [edx+4]
inc	esi
dec	eax
add	ecx, 0Ch
cmp	esi, eax
jb	short loc_6261D7
pop	edi

loc_6261FC:
dec	dword ptr [edx+4]

loc_6261FF:
pop	esi
retn
sub_6261C0 endp

align 10h



sub_626210 proc	near
push	esi
push	edi
mov	edi, edx
mov	esi, 3
lea	eax, [ecx+0Ch]
sub	edi, ecx
mov	edi, edi

loc_626220:
mov	ecx, [edi+eax]
mov	edx, [eax]
cmp	ecx, edx
ja	short loc_626238
jb	short loc_626233
dec	esi
sub	eax, 4
test	esi, esi
jge	short loc_626220

loc_626233:
pop	edi
xor	al, al
pop	esi
retn

loc_626238:
pop	edi
mov	al, 1
pop	esi
retn
sub_626210 endp

align 10h


; Attributes: bp-based frame

sub_626240 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	edx, [eax]
mov	ecx, [ebp+arg_4]
mov	[ebp+var_34], edx
mov	edx, [eax+4]
mov	[ebp+var_30], edx
mov	edx, [eax+8]
mov	eax, [eax+0Ch]
mov	[ebp+var_28], eax
xor	eax, eax
mov	[ecx], eax
mov	[ecx+4], eax
mov	[ecx+8], eax
mov	[ecx+0Ch], eax
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+18h], eax
push	ebx
mov	[ecx+1Ch], eax
xor	ecx, ecx
push	esi
mov	[ebp+var_2C], edx
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
push	edi

loc_626290:
mov	edx, [ebp+arg_0]
mov	ebx, [edx+ecx*4]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_626326

loc_6262A5:
test	bl, 1
jz	short loc_626312
test	eax, eax
jz	short loc_6262BD
lea	esi, [ebp+var_34]
call	sub_627C50
mov	[ebp+var_4], 0

loc_6262BD:
lea	eax, [ebp+var_34]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 1
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_62630F

loc_6262ED:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_6262ED

loc_62630F:
mov	eax, [ebp+var_4]

loc_626312:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_6262A5
mov	ecx, [ebp+var_C]

loc_626326:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 4
jb	loc_626290
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_626240 endp

align 10h


; Attributes: bp-based frame

sub_626350 proc	near

var_68=	byte ptr -68h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
mov	ecx, [ebp+arg_0]
xor	eax, eax
push	ebx
mov	ebx, [ebp+arg_4]
mov	dword ptr [ebx], 0FFFFh
mov	[ebx+4], eax
mov	[ebx+8], eax
mov	[ebx+0Ch], eax
mov	[ebx+10h], eax
push	esi
mov	[ebx+14h], eax
mov	esi, 1
mov	[ebx+18h], eax
push	edi
mov	edx, ebx
mov	[ebp+var_48], esi
mov	[ebp+var_44], eax
mov	[ebp+var_40], eax
mov	[ebp+var_3C], eax
mov	[ebp+var_38], eax
mov	[ebp+var_34], eax
mov	[ebp+var_30], eax
mov	[ebp+var_2C], eax
mov	[ebp+var_28], 2
mov	[ebp+var_24], eax
mov	[ebp+var_20], eax
mov	[ebp+var_1C], eax
mov	[ebp+var_18], eax
mov	[ebp+var_14], eax
mov	[ebp+var_10], eax
mov	[ebp+var_C], eax
mov	[ebx+1Ch], eax
call	sub_627D30
test	al, al
jz	short loc_6263DD
xor	eax, eax
mov	dword ptr [ebx], 3
mov	[ebx+4], eax
mov	[ebx+8], eax
mov	[ebx+0Ch], eax
mov	[ebx+10h], eax
mov	[ebx+14h], eax
mov	[ebx+18h], eax
mov	[ebx+1Ch], eax

loc_6263DD:
lea	eax, [ebp+var_28]
mov	[ebp+var_8], eax
mov	[ebp+var_4], esi

loc_6263E6:
mov	esi, [ebp+var_8]
mov	edi, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_62642B

loc_626409:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_626409

loc_62642B:
mov	eax, [ebp+arg_0]
push	ebx
lea	ecx, [ebp+var_68]
call	sub_627D60
add	esp, 4
mov	eax, 20h
lea	ecx, [ebp+var_48]
lea	edx, [ebp+var_68]

loc_626445:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_626460
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_626445
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_626460:
movzx	eax, byte ptr [edx]
movzx	esi, byte ptr [ecx]
sub	eax, esi
jnz	short loc_62648C
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_62648C
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_62648C
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_62648C:
sar	eax, 1Fh
or	eax, 1
jnz	loc_6263E6
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_626350 endp

align 10h



sub_6264A0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 60h
push	ebx
mov	ebx, [esp+64h+arg_0]
push	ebp
mov	ebp, [esp+68h+arg_4]
push	esi
mov	esi, eax
xor	eax, eax
mov	[esp+6Ch+var_4C], eax
mov	[esp+6Ch+var_48], eax
mov	[esp+6Ch+var_44], eax
push	edi
lea	eax, [esp+70h+var_10]
push	eax
lea	ecx, [esp+74h+var_30]
push	ecx
mov	eax, esi
mov	ecx, ebx
mov	[esp+78h+var_50], 1
call	sub_6280C0
mov	eax, [ebx+4]
mov	ecx, [ebx+8]
mov	edx, [ebx]
mov	[esp+78h+var_5C], eax
lea	eax, [esp+78h+var_30]
mov	[esp+78h+var_58], ecx
mov	[esp+78h+var_60], edx
mov	edx, [ebx+0Ch]
push	eax
lea	ecx, [esp+7Ch+var_60]
push	ecx
mov	[esp+80h+var_54], edx
call	sub_627820
mov	edx, [esi]
mov	eax, [esi+4]
mov	ecx, [esi+8]
mov	[esp+80h+var_40], edx
mov	edx, [esi+0Ch]
add	esp, 10h
mov	[esp+70h+var_3C], eax
mov	[esp+70h+var_38], ecx
mov	[esp+70h+var_34], edx

loc_626522:
lea	eax, [esp+70h+var_40]
push	eax
lea	ecx, [esp+74h+var_30]
push	ecx
lea	eax, [esp+78h+var_10]
lea	ecx, [esp+78h+var_40]
call	sub_6280C0
add	esp, 8
xor	eax, eax
mov	edi, edi

loc_626540:
cmp	[esp+eax*4+70h+var_40],	0
jnz	short loc_626571
inc	eax
cmp	eax, 4
jb	short loc_626540

loc_62654D:
mov	eax, [esp+70h+var_60]
mov	ecx, [esp+70h+var_5C]
mov	edx, [esp+70h+var_58]
mov	[ebp+0], eax
mov	eax, [esp+70h+var_54]
pop	edi
mov	[ebp+4], ecx
mov	[ebp+8], edx
pop	esi
mov	[ebp+0Ch], eax
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_626571:
lea	edx, [esp+70h+var_30]
push	ebx
push	edx
lea	edi, [esp+78h+var_20]
lea	esi, [esp+78h+var_50]
lea	eax, [esp+78h+var_60]
call	sub_628370
lea	eax, [esp+78h+var_10]
push	eax
lea	ecx, [esp+7Ch+var_30]
push	ecx
lea	eax, [esp+80h+var_40]
lea	ecx, [esp+80h+var_10]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_6265A4:
cmp	[esp+eax*4+70h+var_10],	0
jnz	short loc_6265D5
inc	eax
cmp	eax, 4
jb	short loc_6265A4

loc_6265B1:
mov	ecx, [esp+70h+var_20]
mov	edx, [esp+70h+var_1C]
mov	eax, [esp+70h+var_18]
mov	[ebp+0], ecx
mov	ecx, [esp+70h+var_14]
pop	edi
mov	[ebp+4], edx
mov	[ebp+8], eax
pop	esi
mov	[ebp+0Ch], ecx
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_6265D5:
lea	edx, [esp+70h+var_30]
push	ebx
push	edx
lea	edi, [esp+78h+var_50]
lea	esi, [esp+78h+var_60]
lea	eax, [esp+78h+var_20]
call	sub_628370
lea	eax, [esp+78h+var_40]
push	eax
lea	ecx, [esp+7Ch+var_30]
push	ecx
lea	eax, [esp+80h+var_10]
lea	ecx, [esp+80h+var_40]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_626608:
cmp	[esp+eax*4+70h+var_40],	0
jnz	short loc_626639
inc	eax
cmp	eax, 4
jb	short loc_626608

loc_626615:
mov	edx, [esp+70h+var_50]
mov	eax, [esp+70h+var_4C]
mov	ecx, [esp+70h+var_48]
mov	[ebp+0], edx
mov	edx, [esp+70h+var_44]
pop	edi
mov	[ebp+4], eax
mov	[ebp+8], ecx
pop	esi
mov	[ebp+0Ch], edx
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_626639:
lea	edx, [esp+70h+var_30]
push	ebx
push	edx
lea	edi, [esp+78h+var_60]
lea	esi, [esp+78h+var_20]
lea	eax, [esp+78h+var_50]
call	sub_628370
lea	eax, [esp+78h+var_10]
push	eax
lea	ecx, [esp+7Ch+var_30]
push	ecx
lea	eax, [esp+80h+var_40]
lea	ecx, [esp+80h+var_10]
call	sub_6280C0
add	esp, 10h
xor	eax, eax
lea	esp, [esp+0]

loc_626670:
cmp	[esp+eax*4+70h+var_10],	0
jnz	short loc_626682
inc	eax
cmp	eax, 4
jb	short loc_626670
jmp	loc_62654D

loc_626682:
lea	edx, [esp+70h+var_30]
push	ebx
push	edx
lea	edi, [esp+78h+var_20]
lea	esi, [esp+78h+var_50]
lea	eax, [esp+78h+var_60]
call	sub_628370
lea	eax, [esp+78h+var_40]
push	eax
lea	ecx, [esp+7Ch+var_30]
push	ecx
lea	eax, [esp+80h+var_10]
lea	ecx, [esp+80h+var_40]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_6266B5:
cmp	[esp+eax*4+70h+var_40],	0
jnz	short loc_6266C7
inc	eax
cmp	eax, 4
jb	short loc_6266B5
jmp	loc_6265B1

loc_6266C7:
lea	edx, [esp+70h+var_30]
push	ebx
push	edx
lea	edi, [esp+78h+var_50]
lea	esi, [esp+78h+var_60]
lea	eax, [esp+78h+var_20]
call	sub_628370
lea	eax, [esp+78h+var_10]
push	eax
lea	ecx, [esp+7Ch+var_30]
push	ecx
lea	eax, [esp+80h+var_40]
lea	ecx, [esp+80h+var_10]
call	sub_6280C0
add	esp, 10h
xor	eax, eax
lea	ebx, [ebx+0]

loc_626700:
cmp	[esp+eax*4+70h+var_10],	0
jnz	short loc_626712
inc	eax
cmp	eax, 4
jb	short loc_626700
jmp	loc_626615

loc_626712:
lea	edx, [esp+70h+var_30]
push	ebx
push	edx
lea	edi, [esp+78h+var_60]
lea	esi, [esp+78h+var_20]
lea	eax, [esp+78h+var_50]
call	sub_628370
add	esp, 8
jmp	loc_626522
sub_6264A0 endp

align 10h



sub_626740 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 40h
push	esi
push	edi
call	sub_628470
mov	eax, [esi]
mov	ecx, [esi+4]
mov	edx, [esi+8]
mov	[esp+48h+var_10], eax
mov	eax, [esi+0Ch]
add	esp, 8
mov	[esp+40h+var_4], eax
xor	eax, eax
mov	[esp+40h+var_C], ecx
mov	[esp+40h+var_8], edx
mov	[esp+40h+var_20], eax
mov	[esp+40h+var_1C], eax
mov	[esp+40h+var_18], eax
mov	[esp+40h+var_14], eax
lea	ebx, [ebx+0]

loc_626780:
mov	ecx, [esp+eax*4+40h+var_20]
lea	edx, [ecx-1]
mov	[esp+eax*4+40h+var_20],	edx
test	ecx, ecx
jnz	short loc_626795
inc	eax
cmp	eax, 8
jb	short loc_626780

loc_626795:
mov	eax, [edi]
mov	ecx, [edi+4]
mov	edx, [edi+8]
mov	[esp+40h+var_40], eax
mov	eax, [edi+0Ch]
mov	[esp+40h+var_34], eax
xor	eax, eax
mov	[esp+40h+var_3C], ecx
lea	ecx, [esp+40h+var_20]
mov	[esp+40h+var_38], edx
push	ecx
lea	edx, [esp+44h+var_40]
mov	[esp+44h+var_30], eax
mov	[esp+44h+var_2C], eax
mov	[esp+44h+var_28], eax
mov	[esp+44h+var_24], eax
mov	eax, ecx
push	edx
push	eax
mov	eax, edx
call	sub_628750
mov	ecx, [esp+4Ch+var_40]
mov	edx, [esp+4Ch+var_3C]
mov	eax, [esp+4Ch+var_38]
mov	[esi], ecx
mov	ecx, [esp+4Ch+var_34]
mov	[esi+4], edx
mov	[esi+8], eax
mov	[esi+0Ch], ecx
add	esp, 4Ch
retn
sub_626740 endp

align 10h



sub_626800 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h

sub	esp, 60h
xor	eax, eax
mov	[esp+60h+var_4C], eax
mov	[esp+60h+var_48], eax
mov	[esp+60h+var_44], eax
mov	[esp+60h+var_60], eax
mov	[esp+60h+var_5C], eax
mov	[esp+60h+var_58], eax
mov	[esp+60h+var_54], eax
mov	eax, [ecx]
mov	[esp+60h+var_40], eax
mov	eax, [ecx+8]
mov	edx, 1
mov	[esp+60h+var_50], edx
mov	edx, [ecx+4]
mov	ecx, [ecx+0Ch]
mov	[esp+60h+var_38], eax
xor	eax, eax
mov	[esp+60h+var_3C], edx
mov	[esp+60h+var_30], eax
mov	[esp+60h+var_2C], eax
mov	[esp+60h+var_28], eax
mov	[esp+60h+var_24], eax
lea	edx, [esp+60h+var_20]
push	edx
lea	eax, [esp+64h+var_60]
push	eax
lea	eax, [esp+68h+var_40]
mov	[esp+68h+var_34], ecx
call	sub_627470
mov	ecx, [esp+68h+var_20]
mov	edx, [esp+68h+var_1C]
mov	eax, [esp+68h+var_18]
mov	[esi], ecx
mov	ecx, [esp+68h+var_14]
mov	[esi+4], edx
mov	[esi+8], eax
mov	[esi+0Ch], ecx
add	esp, 68h
retn
sub_626800 endp

align 10h



sub_626890 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4

sub	esp, 0A4h
push	esi
push	edi
mov	[esp+0ACh+var_A4], 5
xor	esi, esi

loc_6268A2:
movzx	eax, ds:word_1479FF0[esi]
mov	edi, [esp+0ACh+arg_0]
mov	[esp+0ACh+var_70], eax
xor	eax, eax
lea	ecx, [esp+0ACh+var_70]
mov	[esp+0ACh+var_6C], eax
mov	[esp+0ACh+var_68], eax
mov	[esp+0ACh+var_64], eax
push	ecx
mov	eax, ecx
mov	ecx, edi
add	esi, 2
call	sub_6289D0
add	esp, 4
xor	eax, eax

loc_6268D8:
cmp	[esp+eax*4+0ACh+var_70], 0
jnz	short loc_6268F0
inc	eax
cmp	eax, 4
jb	short loc_6268D8
pop	edi
xor	al, al
pop	esi
add	esp, 0A4h
retn

loc_6268F0:
add	esi, 2
cmp	esi, 200h
jb	short loc_6268A2
mov	edx, [edi]
mov	ecx, [edi+8]
mov	eax, [edi+4]
mov	[esp+0ACh+var_A0], edx
mov	edx, [edi+0Ch]
mov	[esp+0ACh+var_98], ecx
mov	[esp+0ACh+var_9C], eax
mov	[esp+0ACh+var_94], edx
xor	ecx, ecx
jmp	short loc_626920
align 10h

loc_626920:
mov	eax, [esp+ecx*4+0ACh+var_A0]
lea	edx, [eax-1]
mov	[esp+ecx*4+0ACh+var_A0], edx
test	eax, eax
jnz	short loc_626935
inc	ecx
cmp	ecx, 4
jb	short loc_626920

loc_626935:
mov	esi, [esp+0ACh+var_9C]
mov	edx, [esp+0ACh+var_98]
mov	edi, [esp+0ACh+var_94]
push	ebx
mov	ebx, [esp+0B0h+var_A0]
push	ebp
xor	ebp, ebp
mov	[esp+0B4h+var_80], ebx
mov	[esp+0B4h+var_7C], esi
mov	[esp+0B4h+var_78], edx
mov	[esp+0B4h+var_74], edi
test	bl, 1
jnz	short loc_626993
mov	edi, edi

loc_626960:
mov	eax, edi
shl	eax, 1Fh
mov	ecx, edx
shr	edx, 1
or	edx, eax
mov	eax, esi
shl	eax, 1Fh
shr	ebx, 1
shl	ecx, 1Fh
shr	esi, 1
or	ebx, eax
shr	edi, 1
or	esi, ecx
inc	ebp
test	bl, 1
jz	short loc_626960
mov	[esp+0B4h+var_80], ebx
mov	[esp+0B4h+var_7C], esi
mov	[esp+0B4h+var_78], edx
mov	[esp+0B4h+var_74], edi

loc_626993:
mov	edi, [esp+0B4h+arg_0]
mov	ecx, [edi+4]
mov	edx, [edi+8]
xor	eax, eax
mov	[esp+0B4h+var_5C], eax
mov	[esp+0B4h+var_58], eax
mov	[esp+0B4h+var_54], eax
mov	eax, [edi]
mov	[esp+0B4h+var_50], eax
mov	eax, [edi+0Ch]
mov	[esp+0B4h+var_44], eax
xor	eax, eax
mov	[esp+0B4h+var_60], 1
mov	[esp+0B4h+var_4C], ecx
mov	[esp+0B4h+var_48], edx
mov	[esp+0B4h+var_40], eax
mov	[esp+0B4h+var_3C], eax
mov	[esp+0B4h+var_38], eax
mov	[esp+0B4h+var_34], eax

loc_6269E0:
dec	[esp+0B4h+var_A4]
xor	esi, esi

loc_6269E6:
sub	dword_1692768, 1
jns	short loc_6269F6
call	sub_A37E50
jmp	short loc_626A2C

loc_6269F6:
mov	eax, dword_1887F84
mov	ecx, [eax]
add	eax, 4
mov	edx, ecx
shr	edx, 0Bh
xor	ecx, edx
mov	dword_1887F84, eax
mov	eax, ecx
and	eax, 0FF3A58ADh
shl	eax, 7
xor	ecx, eax
mov	edx, ecx
and	edx, 0FFFFDF8Ch
shl	edx, 0Fh
xor	ecx, edx
mov	eax, ecx
shr	eax, 12h
xor	eax, ecx

loc_626A2C:
mov	[esp+esi*4+0B4h+var_30], eax
inc	esi
cmp	esi, 4
jl	short loc_6269E6
lea	eax, [esp+0B4h+var_30]
push	eax
lea	eax, [esp+0B8h+var_A0]
lea	ecx, [esp+0B8h+var_30]
call	sub_6289D0
lea	ecx, [esp+0B8h+var_90]
push	ecx
lea	edx, [esp+0BCh+var_30]
push	edx
mov	ecx, edi
lea	edx, [esp+0C0h+var_80]
call	sub_627690
add	esp, 0Ch
mov	eax, 10h
lea	ecx, [esp+0B4h+var_60]
lea	edx, [esp+0B4h+var_90]
lea	esp, [esp+0]

loc_626A80:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_626A99
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_626A80
jmp	loc_626CBE

loc_626A99:
movzx	esi, byte ptr [ecx]
movzx	eax, byte ptr [edx]
sub	eax, esi
jnz	short loc_626AC5
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_626AC5
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_626AC5
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_626AC5:
sar	eax, 1Fh
or	eax, 1
jz	loc_626CBE
mov	eax, 10h
lea	ecx, [esp+0B4h+var_A0]
lea	edx, [esp+0B4h+var_90]
mov	edi, edi

loc_626AE0:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_626AF9
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_626AE0
jmp	loc_626CBE

loc_626AF9:
movzx	eax, byte ptr [edx]
movzx	esi, byte ptr [ecx]
sub	eax, esi
jnz	short loc_626B25
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_626B25
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_626B25
movzx	eax, byte ptr [edx+3]
movzx	edx, byte ptr [ecx+3]
sub	eax, edx

loc_626B25:
sar	eax, 1Fh
or	eax, 1
jz	loc_626CBE
mov	esi, ebp
cmp	ebp, 1
jbe	loc_626C61
lea	esp, [esp+0]

loc_626B40:
dec	esi
mov	eax, 10h
lea	ecx, [esp+0B4h+var_A0]
lea	edx, [esp+0B4h+var_90]
mov	edi, edi

loc_626B50:
mov	ebx, [edx]
cmp	ebx, [ecx]
jnz	short loc_626B69
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_626B50
jmp	loc_626C61

loc_626B69:
movzx	eax, bl
movzx	ebx, byte ptr [ecx]
sub	eax, ebx
jnz	short loc_626B95
movzx	eax, byte ptr [edx+1]
movzx	ebx, byte ptr [ecx+1]
sub	eax, ebx
jnz	short loc_626B95
movzx	eax, byte ptr [edx+2]
movzx	ebx, byte ptr [ecx+2]
sub	eax, ebx
jnz	short loc_626B95
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_626B95:
sar	eax, 1Fh
or	eax, 1
jz	loc_626C61
lea	edx, [esp+0B4h+var_20]
push	edx
lea	eax, [esp+0B8h+var_90]
push	eax
call	sub_626240
lea	ecx, [esp+0BCh+var_20]
push	ecx
mov	edx, ecx
push	edx
lea	eax, [esp+0C4h+var_50]
call	sub_627470
mov	eax, [esp+0C4h+var_20]
mov	ecx, [esp+0C4h+var_1C]
mov	edx, [esp+0C4h+var_18]
mov	[esp+0C4h+var_90], eax
mov	eax, [esp+0C4h+var_14]
mov	[esp+0C4h+var_8C], ecx
mov	[esp+0C4h+var_88], edx
mov	[esp+0C4h+var_84], eax
add	esp, 10h
mov	eax, 10h
lea	ecx, [esp+0B4h+var_60]
lea	edx, [esp+0B4h+var_90]

loc_626C03:
mov	ebx, [edx]
cmp	ebx, [ecx]
jnz	short loc_626C24
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_626C03

loc_626C17:
pop	ebp
pop	ebx
pop	edi
xor	al, al
pop	esi
add	esp, 0A4h
retn

loc_626C24:
movzx	eax, bl
movzx	ebx, byte ptr [ecx]
sub	eax, ebx
jnz	short loc_626C50
movzx	eax, byte ptr [edx+1]
movzx	ebx, byte ptr [ecx+1]
sub	eax, ebx
jnz	short loc_626C50
movzx	eax, byte ptr [edx+2]
movzx	ebx, byte ptr [ecx+2]
sub	eax, ebx
jnz	short loc_626C50
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_626C50:
sar	eax, 1Fh
or	eax, 1
jz	short loc_626C17
cmp	esi, 1
ja	loc_626B40

loc_626C61:
mov	eax, 10h
lea	ecx, [esp+0B4h+var_A0]
lea	edx, [esp+0B4h+var_90]
mov	edi, edi

loc_626C70:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_626C86
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_626C70
jmp	short loc_626CBE

loc_626C86:
movzx	eax, byte ptr [edx]
movzx	esi, byte ptr [ecx]
sub	eax, esi
jnz	short loc_626CB2
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_626CB2
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_626CB2
movzx	eax, byte ptr [edx+3]
movzx	edx, byte ptr [ecx+3]
sub	eax, edx

loc_626CB2:
sar	eax, 1Fh
or	eax, 1
jnz	loc_626C17

loc_626CBE:
cmp	[esp+0B4h+var_A4], 0
jnz	loc_6269E0
pop	ebp
pop	ebx
pop	edi
mov	al, 1
pop	esi
add	esp, 0A4h
retn
sub_626890 endp

align 10h



sub_626CE0 proc	near

var_C0=	dword ptr -0C0h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_60=	dword ptr -60h
var_40=	byte ptr -40h
var_20=	byte ptr -20h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0C0h
push	ebx
mov	ebx, [esp+0C4h+arg_0]
xor	eax, eax
push	ebp
mov	ebp, [esp+0C8h+arg_4]
push	esi
mov	[esp+0CCh+var_9C], eax
mov	[esp+0CCh+var_98], eax
mov	[esp+0CCh+var_94], eax
mov	[esp+0CCh+var_90], eax
mov	[esp+0CCh+var_8C], eax
mov	[esp+0CCh+var_88], eax
mov	[esp+0CCh+var_84], eax
push	edi
lea	eax, [esp+0D0h+var_C0]
push	eax
push	ebx
mov	[esp+0D8h+var_A0], 1
call	sub_625A70
lea	ecx, [esp+0D8h+var_60]
push	ecx
lea	edx, [esp+0DCh+var_80]
push	edx
push	ebx
lea	eax, [esp+0E4h+var_C0]
call	sub_628750
add	esp, 14h
xor	eax, eax

loc_626D42:
cmp	[esp+eax*4+0D0h+var_60], 0
jnz	short loc_626D67
inc	eax
cmp	eax, 8
jb	short loc_626D42

loc_626D4F:
mov	edi, ebp
lea	esi, [esp+0D0h+var_A0]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0C0h
retn

loc_626D67:
mov	ecx, 8
mov	esi, ebx
lea	edi, [esp+0D0h+var_40]
lea	eax, [esp+0D0h+var_80]
rep movsd
push	eax
lea	ecx, [esp+0D4h+var_40]
push	ecx
call	sub_628C10
lea	edx, [esp+0D8h+var_C0]
push	edx
lea	eax, [esp+0DCh+var_80]
push	eax
mov	ecx, edx
push	ecx
lea	eax, [esp+0E4h+var_60]
call	sub_628750
add	esp, 14h
xor	eax, eax

loc_626DA7:
cmp	[esp+eax*4+0D0h+var_C0], 0
jnz	short loc_626DD0
inc	eax
cmp	eax, 8
jb	short loc_626DA7

loc_626DB4:
mov	edi, ebp
lea	esi, [esp+0D0h+var_40]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0C0h
retn
align 10h

loc_626DD0:
lea	edx, [esp+0D0h+var_20]
push	edx
push	ebx
lea	eax, [esp+0D8h+var_A0]
push	eax
lea	ecx, [esp+0DCh+var_40]
push	ecx
lea	eax, [esp+0E0h+var_80]
call	sub_628C70
lea	edx, [esp+0E0h+var_60]
push	edx
lea	eax, [esp+0E4h+var_80]
push	eax
mov	ecx, edx
push	ecx
lea	eax, [esp+0ECh+var_C0]
call	sub_628750
add	esp, 1Ch
xor	eax, eax
lea	ecx, [ecx+0]

loc_626E10:
cmp	[esp+eax*4+0D0h+var_60], 0
jnz	short loc_626E38
inc	eax
cmp	eax, 8
jb	short loc_626E10

loc_626E1D:
mov	edi, ebp
lea	esi, [esp+0D0h+var_20]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0C0h
retn

loc_626E38:
lea	edx, [esp+0D0h+var_A0]
push	edx
push	ebx
lea	eax, [esp+0D8h+var_40]
push	eax
lea	ecx, [esp+0DCh+var_20]
push	ecx
lea	eax, [esp+0E0h+var_80]
call	sub_628C70
lea	edx, [esp+0E0h+var_C0]
push	edx
lea	eax, [esp+0E4h+var_80]
push	eax
mov	ecx, edx
push	ecx
lea	eax, [esp+0ECh+var_60]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_626E75:
cmp	[esp+eax*4+0D0h+var_C0], 0
jnz	short loc_626E87
inc	eax
cmp	eax, 8
jb	short loc_626E75
jmp	loc_626D4F

loc_626E87:
lea	edx, [esp+0D0h+var_40]
push	edx
push	ebx
lea	eax, [esp+0D8h+var_20]
push	eax
lea	ecx, [esp+0DCh+var_A0]
push	ecx
lea	eax, [esp+0E0h+var_80]
call	sub_628C70
lea	edx, [esp+0E0h+var_60]
push	edx
lea	eax, [esp+0E4h+var_80]
push	eax
mov	ecx, edx
push	ecx
lea	eax, [esp+0ECh+var_C0]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_626EC4:
cmp	[esp+eax*4+0D0h+var_60], 0
jnz	short loc_626ED6
inc	eax
cmp	eax, 8
jb	short loc_626EC4
jmp	loc_626DB4

loc_626ED6:
lea	edx, [esp+0D0h+var_20]
push	edx
push	ebx
lea	eax, [esp+0D8h+var_A0]
push	eax
lea	ecx, [esp+0DCh+var_40]
push	ecx
lea	eax, [esp+0E0h+var_80]
call	sub_628C70
lea	edx, [esp+0E0h+var_C0]
push	edx
lea	eax, [esp+0E4h+var_80]
push	eax
mov	ecx, edx
push	ecx
lea	eax, [esp+0ECh+var_60]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_626F13:
cmp	[esp+eax*4+0D0h+var_C0], 0
jnz	short loc_626F25
inc	eax
cmp	eax, 8
jb	short loc_626F13
jmp	loc_626E1D

loc_626F25:
lea	edx, [esp+0D0h+var_A0]
push	edx
push	ebx
lea	eax, [esp+0D8h+var_40]
push	eax
lea	ecx, [esp+0DCh+var_20]
push	ecx
lea	eax, [esp+0E0h+var_80]
call	sub_628C70
lea	edx, [esp+0E0h+var_60]
push	edx
lea	eax, [esp+0E4h+var_80]
push	eax
mov	ecx, edx
push	ecx
lea	eax, [esp+0ECh+var_C0]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_626F62:
cmp	[esp+eax*4+0D0h+var_60], 0
jnz	short loc_626F74
inc	eax
cmp	eax, 8
jb	short loc_626F62
jmp	loc_626D4F

loc_626F74:
lea	edx, [esp+0D0h+var_40]
push	edx
push	ebx
lea	eax, [esp+0D8h+var_20]
push	eax
lea	ecx, [esp+0DCh+var_A0]
push	ecx
lea	eax, [esp+0E0h+var_80]
call	sub_628C70
lea	edx, [esp+0E0h+var_C0]
push	edx
lea	eax, [esp+0E4h+var_80]
push	eax
mov	ecx, edx
push	ecx
lea	eax, [esp+0ECh+var_60]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_626FB1:
cmp	[esp+eax*4+0D0h+var_C0], 0
jnz	loc_626DD0
inc	eax
cmp	eax, 8
jb	short loc_626FB1
jmp	loc_626DB4
sub_626CE0 endp

align 10h



sub_626FD0 proc	near
xor	edx, edx
add	eax, 8
push	esi

loc_626FD6:
mov	ecx, [eax-8]
lea	esi, [ecx-1]
mov	[eax-8], esi
test	ecx, ecx
jnz	short loc_627013
mov	ecx, [eax-4]
lea	esi, [ecx-1]
mov	[eax-4], esi
test	ecx, ecx
jnz	short loc_627013
mov	ecx, [eax]
lea	esi, [ecx-1]
mov	[eax], esi
test	ecx, ecx
jnz	short loc_627013
mov	ecx, [eax+4]
lea	esi, [ecx-1]
mov	[eax+4], esi
test	ecx, ecx
jnz	short loc_627013
add	edx, 4
add	eax, 10h
cmp	edx, 10h
jb	short loc_626FD6

loc_627013:
pop	esi
retn
sub_626FD0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_627020(int, void *, int)
sub_627020 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
push	ebx
mov	ebx, [ebp+arg_8]
push	esi
push	edi
mov	esi, eax
mov	eax, [ebp+arg_4]
push	40h		; size_t
mov	ecx, 10h
lea	edi, [ebp+var_48]
rep movsd
mov	esi, [ebp+arg_0]
push	0		; int
mov	ecx, 10h
mov	edi, ebx
push	eax		; void *
rep movsd
call	_memset
add	esp, 0Ch
test	[ebp+var_C], 80000000h
mov	esi, 1
jnz	loc_62715D
lea	ecx, [ebp+var_48]
mov	edx, ebx
call	sub_628DB0
test	al, al
jz	loc_62715D
lea	eax, [esi+0Eh]
lea	ecx, [ebx+34h]
mov	edi, edi

loc_627080:
cmp	dword ptr [ecx+8], 0
jnz	short loc_6270AE
cmp	dword ptr [ecx+4], 0
jnz	short loc_6270A3
cmp	dword ptr [ecx], 0
jnz	short loc_6270A6
cmp	dword ptr [ecx-4], 0
jnz	short loc_6270AB
sub	eax, 4
sub	ecx, 10h
test	eax, eax
jge	short loc_627080
jmp	short loc_6270AE

loc_6270A3:
dec	eax
jmp	short loc_6270AE

loc_6270A6:
sub	eax, 2
jmp	short loc_6270AE

loc_6270AB:
sub	eax, 3

loc_6270AE:
mov	ecx, eax
test	eax, eax
jl	short loc_6270D8

loc_6270B4:
cmp	[ebp+ecx*4+var_48], 0
jnz	short loc_6270BF
sub	ecx, esi
jns	short loc_6270B4

loc_6270BF:
cmp	eax, ecx
jz	short loc_6270D8
sub	eax, ecx
shl	eax, 5
lea	esi, [ebp+var_48]
mov	edi, eax
call	sub_628DE0
inc	edi
mov	[ebp+arg_0], edi
mov	esi, edi

loc_6270D8:
test	[ebp+var_C], 80000000h
jnz	short loc_627122

loc_6270E1:
mov	eax, 0Fh

loc_6270E6:
mov	ecx, [ebx+eax*4]
mov	edx, [ebp+eax*4+var_48]
cmp	ecx, edx
ja	short loc_6270FA
jb	short loc_627122
sub	eax, 1
jns	short loc_6270E6
jmp	short loc_627122

loc_6270FA:
xor	edx, edx
xor	ecx, ecx
mov	edi, edi

loc_627100:
mov	eax, [ebp+ecx*4+var_48]
lea	edi, [eax+eax]
or	edi, edx
mov	[ebp+ecx*4+var_48], edi
shr	eax, 1Fh
inc	ecx
mov	edx, eax
cmp	ecx, 10h
jb	short loc_627100
inc	esi
test	[ebp+var_C], 80000000h
jz	short loc_6270E1

loc_627122:
mov	eax, 0Fh

loc_627127:
mov	ecx, [ebx+eax*4]
mov	edx, [ebp+eax*4+var_48]
cmp	edx, ecx
ja	short loc_62713B
jb	short loc_62717D
sub	eax, 1
jns	short loc_627127
jmp	short loc_62717D

loc_62713B:
xor	ecx, ecx
mov	edx, 0Fh

loc_627142:
mov	eax, [ebp+edx*4+var_48]
mov	edi, eax
shr	edi, 1
or	edi, ecx
shl	eax, 1Fh
sub	edx, 1
mov	[ebp+edx*4+var_44], edi
mov	ecx, eax
jns	short loc_627142
dec	esi
jmp	short loc_627122

loc_62715D:
mov	ecx, ebx
lea	edx, [ebp+var_48]
call	sub_628DB0
test	al, al
jz	short loc_62717D
lea	esi, [ebp+var_48]
call	sub_628E70
mov	[ebp+arg_0], 0
mov	esi, [ebp+arg_0]

loc_62717D:
xor	ebx, ebx
test	esi, esi
jz	loc_627231

loc_627187:
dec	esi
mov	[ebp+arg_0], esi
inc	ebx
mov	eax, 0Fh

loc_627191:
mov	ecx, [ebp+arg_8]
mov	ecx, [ecx+eax*4]
mov	edx, [ebp+eax*4+var_48]
cmp	edx, ecx
ja	short loc_62720A
jb	short loc_6271A6
sub	eax, 1
jns	short loc_627191

loc_6271A6:
lea	edx, [ebp+var_48]
mov	[ebp+var_8], edx
mov	[ebp+var_4], 3
mov	esi, [ebp+var_8]
mov	edi, [ebp+arg_8]
mov	ecx, [ebp+var_4]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_6271F8

loc_6271D6:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_6271D6

loc_6271F8:
mov	esi, [ebp+arg_4]
mov	eax, ebx
call	sub_628DE0
xor	ebx, ebx
or	dword ptr [esi], 1
mov	esi, [ebp+arg_0]

loc_62720A:
xor	ecx, ecx
mov	edx, 0Fh

loc_627211:
mov	eax, [ebp+edx*4+var_48]
mov	edi, eax
shr	edi, 1
or	edi, ecx
shl	eax, 1Fh
sub	edx, 1
mov	[ebp+edx*4+var_44], edi
mov	ecx, eax
jns	short loc_627211
test	esi, esi
jnz	loc_627187

loc_627231:
mov	esi, [ebp+arg_4]
mov	eax, ebx
call	sub_628DE0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_627020 endp

align 10h


; Attributes: bp-based frame

sub_627250 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
push	edi
mov	ecx, 10h
mov	esi, eax
lea	edi, [ebp+var_48]
rep movsd
test	[ebp+var_C], 80000000h
mov	esi, [ebp+arg_0]
mov	ecx, 10h
mov	edi, ebx
mov	[ebp+var_4], 1
rep movsd
jnz	loc_62739B
lea	ecx, [ebp+var_48]
mov	edx, ebx
call	sub_628DB0
test	al, al
jz	loc_62739B
mov	eax, 0Fh
lea	ecx, [ebx+34h]

loc_6272A2:
cmp	dword ptr [ecx+8], 0
jnz	short loc_6272D0
cmp	dword ptr [ecx+4], 0
jnz	short loc_6272C5
cmp	dword ptr [ecx], 0
jnz	short loc_6272C8
cmp	dword ptr [ecx-4], 0
jnz	short loc_6272CD
sub	eax, 4
sub	ecx, 10h
test	eax, eax
jge	short loc_6272A2
jmp	short loc_6272D0

loc_6272C5:
dec	eax
jmp	short loc_6272D0

loc_6272C8:
sub	eax, 2
jmp	short loc_6272D0

loc_6272CD:
sub	eax, 3

loc_6272D0:
mov	ecx, eax
test	eax, eax
jl	short loc_6272F8

loc_6272D6:
cmp	[ebp+ecx*4+var_48], 0
jnz	short loc_6272E2
sub	ecx, 1
jns	short loc_6272D6

loc_6272E2:
cmp	eax, ecx
jz	short loc_6272F8
sub	eax, ecx
shl	eax, 5
lea	esi, [ebp+var_48]
mov	edi, eax
call	sub_628DE0
inc	edi
jmp	short loc_6272FB

loc_6272F8:
mov	edi, [ebp+var_4]

loc_6272FB:
test	[ebp+var_C], 80000000h
jnz	short loc_627352

loc_627304:
mov	eax, 0Fh
lea	esp, [esp+0]

loc_627310:
mov	ecx, [ebx+eax*4]
mov	edx, [ebp+eax*4+var_48]
cmp	ecx, edx
ja	short loc_627324
jb	short loc_627352
sub	eax, 1
jns	short loc_627310
jmp	short loc_627352

loc_627324:
xor	edx, edx
xor	ecx, ecx
jmp	short loc_627330
align 10h

loc_627330:
mov	eax, [ebp+ecx*4+var_48]
lea	esi, [eax+eax]
or	esi, edx
mov	[ebp+ecx*4+var_48], esi
shr	eax, 1Fh
inc	ecx
mov	edx, eax
cmp	ecx, 10h
jb	short loc_627330
inc	edi
test	[ebp+var_C], 80000000h
jz	short loc_627304

loc_627352:
mov	eax, 0Fh

loc_627357:
mov	ecx, [ebx+eax*4]
mov	edx, [ebp+eax*4+var_48]
cmp	edx, ecx
ja	short loc_627373
jb	short loc_627369
sub	eax, 1
jns	short loc_627357

loc_627369:
test	edi, edi
jz	loc_627460
jmp	short loc_6273C0

loc_627373:
xor	ecx, ecx
mov	edx, 0Fh
lea	ebx, [ebx+0]

loc_627380:
mov	eax, [ebp+edx*4+var_48]
mov	esi, eax
shr	esi, 1
or	esi, ecx
shl	eax, 1Fh
sub	edx, 1
mov	[ebp+edx*4+var_44], esi
mov	ecx, eax
jns	short loc_627380
dec	edi
jmp	short loc_627352

loc_62739B:
mov	ecx, ebx
lea	edx, [ebp+var_48]
call	sub_628DB0
test	al, al
jz	short loc_6273B8
lea	esi, [ebp+var_48]
call	sub_628E70
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6273B8:
mov	edi, [ebp+var_4]
jmp	short loc_6273C0
align 10h

loc_6273C0:
dec	edi
mov	[ebp+var_4], edi
mov	eax, 0Fh
lea	esp, [esp+0]

loc_6273D0:
mov	ecx, [ebx+eax*4]
mov	edx, [ebp+eax*4+var_48]
cmp	edx, ecx
ja	short loc_627437
jb	short loc_6273E2
sub	eax, 1
jns	short loc_6273D0

loc_6273E2:
lea	eax, [ebp+var_48]
mov	[ebp+var_8], eax
mov	[ebp+arg_0], 3
mov	esi, [ebp+var_8]
mov	edi, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_627434

loc_627412:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_627412

loc_627434:
mov	edi, [ebp+var_4]

loc_627437:
xor	ecx, ecx
mov	edx, 0Fh
mov	edi, edi

loc_627440:
mov	eax, [ebp+edx*4+var_48]
mov	esi, eax
shr	esi, 1
or	esi, ecx
shl	eax, 1Fh
sub	edx, 1
mov	[ebp+edx*4+var_44], esi
mov	ecx, eax
jns	short loc_627440
test	edi, edi
jnz	loc_6273C0

loc_627460:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_627250 endp

align 10h


; Attributes: bp-based frame

sub_627470 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
push	edi
mov	ecx, 8
mov	esi, eax
lea	edi, [ebp+var_28]
rep movsd
test	[ebp+var_C], 80000000h
mov	esi, [ebp+arg_0]
mov	ecx, 8
mov	edi, ebx
mov	[ebp+var_4], 1
rep movsd
jnz	loc_627674
lea	ecx, [ebp+var_28]
mov	edx, ebx
call	sub_627D30
test	al, al
jz	loc_627674
mov	eax, 7
nop

loc_6274C0:
cmp	dword ptr [ebx+eax*4], 0
jnz	short loc_6274CB
sub	eax, 1
jns	short loc_6274C0

loc_6274CB:
mov	ecx, eax
test	eax, eax
jl	short loc_6274F4

loc_6274D1:
cmp	[ebp+ecx*4+var_28], 0
jnz	short loc_6274DD
sub	ecx, 1
jns	short loc_6274D1

loc_6274DD:
cmp	eax, ecx
jz	short loc_6274F4
sub	eax, ecx
shl	eax, 5
lea	esi, [ebp+var_28]
mov	edi, eax
call	sub_627C50
inc	edi
mov	[ebp+var_4], edi

loc_6274F4:
test	[ebp+var_C], 80000000h
jnz	loc_6275AE
mov	edi, [ebp+var_1C]
mov	esi, [ebp+var_20]
mov	edx, [ebp+var_24]
lea	ebx, [ebx+0]

loc_627510:
mov	ebx, [ebp+var_18]
mov	ecx, 7
mov	[ebp+arg_0], ecx
jmp	short loc_627520
align 10h

loc_627520:
mov	eax, [ebp+arg_4]
mov	eax, [eax+ecx*4]
mov	ecx, [ebp+ecx*4+var_28]
cmp	eax, ecx
ja	short loc_62753D
jb	short loc_6275AB
mov	ecx, [ebp+arg_0]
sub	ecx, 1
mov	[ebp+arg_0], ecx
jns	short loc_627520
jmp	short loc_6275AB

loc_62753D:
mov	ecx, [ebp+var_28]
mov	eax, ecx
add	ecx, ecx
mov	[ebp+var_28], ecx
shr	eax, 1Fh
mov	ecx, edx
shr	ecx, 1Fh
inc	[ebp+var_4]
add	edx, edx
or	edx, eax
mov	eax, esi
shr	eax, 1Fh
add	esi, esi
or	esi, ecx
mov	ecx, edi
add	edi, edi
or	edi, eax
mov	eax, ebx
shr	ecx, 1Fh
add	ebx, ebx
or	ebx, ecx
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ebx
shr	eax, 1Fh
lea	ebx, [ecx+ecx]
or	ebx, eax
mov	eax, [ebp+var_10]
shr	ecx, 1Fh
mov	[ebp+var_14], ebx
lea	ebx, [eax+eax]
or	ebx, ecx
mov	ecx, [ebp+var_C]
shr	eax, 1Fh
add	ecx, ecx
or	eax, ecx
mov	[ebp+var_24], edx
mov	[ebp+var_20], esi
mov	[ebp+var_1C], edi
mov	[ebp+var_10], ebx
mov	[ebp+var_C], eax
test	eax, eax
jns	loc_627510

loc_6275AB:
mov	ebx, [ebp+arg_4]

loc_6275AE:
mov	esi, 1

loc_6275B3:
mov	eax, 7
jmp	short loc_6275C0
align 10h

loc_6275C0:
mov	ecx, [ebx+eax*4]
mov	edx, [ebp+eax*4+var_28]
cmp	edx, ecx
ja	loc_627664
jb	short loc_6275D5
sub	eax, esi
jns	short loc_6275C0

loc_6275D5:
cmp	[ebp+var_4], 0
jz	loc_62765D
nop

loc_6275E0:
mov	esi, 1
sub	[ebp+var_4], esi
mov	eax, 7
lea	ecx, [ecx+0]

loc_6275F0:
mov	ecx, [ebx+eax*4]
mov	edx, [ebp+eax*4+var_28]
cmp	edx, ecx
ja	short loc_62764F
jb	short loc_627601
sub	eax, esi
jns	short loc_6275F0

loc_627601:
lea	edx, [ebp+var_28]
mov	[ebp+var_8], edx
mov	[ebp+arg_0], esi
mov	esi, [ebp+var_8]
mov	edi, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_62764F

loc_62762D:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_62762D

loc_62764F:
lea	eax, [ebp+var_28]
call	sub_628EA0
cmp	[ebp+var_4], 0
jnz	short loc_6275E0

loc_62765D:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_627664:
lea	eax, [ebp+var_28]
call	sub_628EA0
sub	[ebp+var_4], esi
jmp	loc_6275B3

loc_627674:
mov	ecx, ebx
lea	edx, [ebp+var_28]
call	sub_627D30
test	al, al
jz	loc_6275E0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_627470 endp

align 10h



sub_627690 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 80h
mov	eax, [esp+80h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [eax]
mov	[esp+8Ch+var_60], esi
mov	esi, [eax+4]
mov	[esp+8Ch+var_5C], esi
mov	esi, [eax+8]
mov	eax, [eax+0Ch]
mov	[esp+8Ch+var_54], eax
xor	eax, eax
mov	[esp+8Ch+var_50], eax
mov	[esp+8Ch+var_4C], eax
mov	[esp+8Ch+var_48], eax
mov	[esp+8Ch+var_44], eax
mov	eax, [edx]
mov	[esp+8Ch+var_20], eax
mov	eax, [edx+4]
mov	[esp+8Ch+var_1C], eax
mov	eax, [edx+8]
mov	edx, [edx+0Ch]
mov	[esp+8Ch+var_18], eax
xor	eax, eax
mov	[esp+8Ch+var_10], eax
mov	[esp+8Ch+var_C], eax
mov	[esp+8Ch+var_8], eax
mov	[esp+8Ch+var_4], eax
mov	eax, [ecx]
mov	[esp+8Ch+var_40], eax
mov	eax, [ecx+8]
mov	[esp+8Ch+var_14], edx
mov	edx, [ecx+4]
mov	ecx, [ecx+0Ch]
mov	[esp+8Ch+var_38], eax
xor	eax, eax
mov	[esp+8Ch+var_3C], edx
lea	edx, [esp+8Ch+var_60]
push	edi
mov	[esp+90h+var_30], eax
mov	[esp+90h+var_2C], eax
mov	[esp+90h+var_28], eax
mov	[esp+90h+var_24], eax
mov	[esp+90h+var_7C], eax
mov	[esp+90h+var_78], eax
mov	[esp+90h+var_74], eax
mov	[esp+90h+var_70], eax
mov	[esp+90h+var_6C], eax
mov	[esp+90h+var_68], eax
mov	[esp+90h+var_64], eax
mov	eax, edx
push	edx
push	eax
lea	eax, [esp+98h+var_40]
mov	[esp+98h+var_58], esi
mov	[esp+98h+var_34], ecx
mov	[esp+98h+var_80], 1
call	sub_627470
add	esp, 8
xor	esi, esi
xor	ebp, ebp
lea	ecx, [ecx+0]

loc_627770:
mov	ebx, [esp+ebp*4+90h+var_20]
mov	edi, 20h
test	ebx, ebx
jz	short loc_6277E0
lea	ecx, [ecx+0]

loc_627780:
test	bl, 1
jz	short loc_6277D8
test	esi, esi
jz	short loc_6277B3
lea	esp, [esp+0]

loc_627790:
lea	ecx, [esp+90h+var_60]
push	ecx
call	sub_628F20
lea	edx, [esp+94h+var_60]
mov	eax, edx
push	edx
push	eax
lea	eax, [esp+9Ch+var_40]
call	sub_627470
add	esp, 0Ch
sub	esi, 1
jnz	short loc_627790

loc_6277B3:
lea	ecx, [esp+90h+var_80]
push	ecx
lea	edx, [esp+94h+var_60]
push	edx
mov	eax, ecx
call	sub_629030
lea	eax, [esp+98h+var_80]
push	eax
mov	ecx, eax
push	ecx
lea	eax, [esp+0A0h+var_40]
call	sub_627470
add	esp, 10h

loc_6277D8:
shr	ebx, 1
inc	esi
dec	edi
test	ebx, ebx
jnz	short loc_627780

loc_6277E0:
inc	ebp
add	esi, edi
cmp	ebp, 4
jb	short loc_627770
mov	eax, [esp+90h+arg_4]
mov	edx, [esp+90h+var_80]
mov	ecx, [esp+90h+var_7C]
pop	edi
mov	[eax], edx
mov	edx, [esp+8Ch+var_78]
mov	[eax+4], ecx
mov	ecx, [esp+8Ch+var_74]
pop	esi
pop	ebp
mov	[eax+8], edx
mov	[eax+0Ch], ecx
pop	ebx
add	esp, 80h
retn
sub_627690 endp

align 10h


; Attributes: bp-based frame

sub_627820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], 0
mov	esi, [ebp+arg_4]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_627872

loc_627850:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_627850

loc_627872:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_627820 endp

align 10h


; Attributes: bp-based frame

sub_627880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], 0
mov	esi, [ebp+arg_4]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_6278D2

loc_6278B0:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_6278B0

loc_6278D2:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_627880 endp

align 10h


; Attributes: bp-based frame

sub_6278E0 proc	near

var_34=	byte ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
push	ebx
push	esi
push	edi
mov	esi, eax
mov	ecx, 8
lea	edi, [ebp+var_34]
rep movsd
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
xor	eax, eax
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
lea	esp, [esp+0]

loc_627920:
mov	edx, [ebp+arg_4]
mov	ebx, [edx+ecx*4]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_6279B6

loc_627935:
test	bl, 1
jz	short loc_6279A2
test	eax, eax
jz	short loc_62794D
lea	esi, [ebp+var_34]
call	sub_627C50
mov	[ebp+var_4], 0

loc_62794D:
lea	eax, [ebp+var_34]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 1
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_62799F

loc_62797D:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_62797D

loc_62799F:
mov	eax, [ebp+var_4]

loc_6279A2:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_627935
mov	ecx, [ebp+var_C]

loc_6279B6:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 8
jb	loc_627920
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6278E0 endp

align 10h


; Attributes: bp-based frame

sub_6279E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], 1
mov	esi, [ebp+arg_4]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_627A32

loc_627A10:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_627A10

loc_627A32:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_6279E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_627A40(void *)
sub_627A40 proc	near

var_94=	dword ptr -94h
var_54=	byte ptr -54h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	eax, [ebp+arg_0]
push	ebx
push	esi
push	edi
mov	esi, eax
push	40h		; size_t
mov	ecx, 10h
lea	edi, [ebp+var_94]
rep movsd
mov	esi, eax
push	0		; int
mov	ecx, 10h
lea	edi, [ebp+var_54]
push	eax		; void *
rep movsd
call	_memset
xor	eax, eax
add	esp, 0Ch
xor	ecx, ecx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
jmp	short loc_627A90
align 10h

loc_627A90:
mov	ebx, [ebp+ecx*4+var_94]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_627B27

loc_627AA6:
test	bl, 1
jz	short loc_627B13
test	eax, eax
jz	short loc_627ABE
lea	esi, [ebp+var_54]
call	sub_628DE0
mov	[ebp+var_4], 0

loc_627ABE:
lea	eax, [ebp+var_54]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 3
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_627B10

loc_627AEE:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_627AEE

loc_627B10:
mov	eax, [ebp+var_4]

loc_627B13:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_627AA6
mov	ecx, [ebp+var_C]

loc_627B27:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 10h
jb	loc_627A90
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_627A40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_627B50(int, void *)
sub_627B50 proc	near

var_54=	byte ptr -54h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
push	ebx
push	esi
push	edi
mov	esi, eax
push	0		; size_t
lea	eax, [ebp+var_14]
push	0		; int
mov	ecx, 10h
lea	edi, [ebp+var_54]
push	eax		; void *
rep movsd
call	_memset
mov	ecx, [ebp+arg_4]
push	40h		; size_t
push	0		; int
push	ecx		; void *
call	_memset
xor	eax, eax
add	esp, 18h
xor	ecx, ecx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
lea	esp, [esp+0]

loc_627B90:
mov	edx, [ebp+arg_0]
mov	ebx, [edx+ecx*4]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_627C26

loc_627BA5:
test	bl, 1
jz	short loc_627C12
test	eax, eax
jz	short loc_627BBD
lea	esi, [ebp+var_54]
call	sub_628DE0
mov	[ebp+var_4], 0

loc_627BBD:
lea	eax, [ebp+var_54]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 3
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_627C0F

loc_627BED:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_627BED

loc_627C0F:
mov	eax, [ebp+var_4]

loc_627C12:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_627BA5
mov	ecx, [ebp+var_C]

loc_627C26:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 10h
jb	loc_627B90
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_627B50 endp

align 10h



sub_627C50 proc	near
push	ebx
push	edi
mov	edi, eax
mov	edx, edi
shr	edx, 5
and	edi, 1Fh
test	edx, edx
jz	short loc_627C8D
mov	eax, 7
sub	eax, edx
js	short loc_627C7D
lea	ecx, [eax+edx]
lea	ecx, [esi+ecx*4]
nop

loc_627C70:
mov	ebx, [esi+eax*4]
mov	[ecx], ebx
dec	eax
sub	ecx, 4
test	eax, eax
jge	short loc_627C70

loc_627C7D:
add	edx, edx
add	edx, edx
push	edx		; size_t
push	0		; int
push	esi		; void *
call	_memset
add	esp, 0Ch

loc_627C8D:
test	edi, edi
jz	loc_627D24
mov	edx, [esi]
mov	ebx, [esi+4]
mov	eax, edx
push	ebp
mov	ecx, edi
shl	eax, cl
mov	ebp, ebx
mov	[esi], eax
mov	eax, 20h
sub	eax, edi
mov	ecx, eax
shr	edx, cl
mov	ecx, edi
shl	ebp, cl
mov	ecx, eax
shr	ebx, cl
mov	ecx, edi
or	ebp, edx
mov	edx, [esi+8]
mov	[esi+4], ebp
mov	ebp, edx
shl	ebp, cl
mov	ecx, eax
shr	edx, cl
mov	ecx, edi
or	ebp, ebx
mov	ebx, [esi+0Ch]
mov	[esi+8], ebp
mov	ebp, ebx
shl	ebp, cl
mov	ecx, eax
shr	ebx, cl
mov	ecx, edi
or	ebp, edx
mov	edx, [esi+10h]
mov	[esi+0Ch], ebp
mov	ebp, edx
shl	ebp, cl
mov	ecx, eax
shr	edx, cl
mov	ecx, edi
or	ebp, ebx
mov	ebx, [esi+14h]
mov	[esi+10h], ebp
mov	ebp, ebx
shl	ebp, cl
mov	ecx, eax
shr	ebx, cl
mov	ecx, edi
or	ebp, edx
mov	edx, [esi+18h]
mov	[esi+14h], ebp
mov	ebp, edx
shl	ebp, cl
mov	ecx, eax
mov	eax, [esi+1Ch]
shr	edx, cl
mov	ecx, edi
shl	eax, cl
or	ebp, ebx
mov	[esi+18h], ebp
pop	ebp
or	eax, edx
mov	[esi+1Ch], eax

loc_627D24:
pop	edi
pop	ebx
retn
sub_627C50 endp

align 10h



sub_627D30 proc	near
push	esi
push	edi
mov	edi, edx
mov	esi, 7
lea	eax, [ecx+1Ch]
sub	edi, ecx
mov	edi, edi

loc_627D40:
mov	ecx, [edi+eax]
mov	edx, [eax]
cmp	ecx, edx
ja	short loc_627D58
jb	short loc_627D53
dec	esi
sub	eax, 4
test	esi, esi
jge	short loc_627D40

loc_627D53:
pop	edi
xor	al, al
pop	esi
retn

loc_627D58:
pop	edi
mov	al, 1
pop	esi
retn
sub_627D30 endp

align 10h



sub_627D60 proc	near

var_20=	dword ptr -20h
arg_0= dword ptr  4

sub	esp, 20h
push	esi
mov	esi, [esp+24h+arg_0]
push	edi
mov	edi, ecx
push	edi
push	eax
mov	eax, esi
call	sub_627470
add	esp, 8
xor	eax, eax
lea	esp, [esp+0]

loc_627D80:
cmp	dword ptr [edi+eax*4], 0
jnz	short loc_627D99
inc	eax
cmp	eax, 8
jb	short loc_627D80
mov	ecx, 8
rep movsd
pop	edi
pop	esi
add	esp, 20h
retn

loc_627D99:
lea	ecx, [esp+28h+var_20]
push	ecx
push	esi
mov	eax, edi
call	sub_627470
add	esp, 8
xor	eax, eax
jmp	short loc_627DB0
align 10h

loc_627DB0:
cmp	[esp+eax*4+28h+var_20],	0
jnz	short loc_627DC3
inc	eax
cmp	eax, 8
jb	short loc_627DB0
pop	edi
pop	esi
add	esp, 20h
retn

loc_627DC3:
push	edi
push	edi
lea	eax, [esp+30h+var_20]
call	sub_627470
add	esp, 8
xor	eax, eax

loc_627DD3:
cmp	dword ptr [edi+eax*4], 0
jnz	short loc_627DF0
inc	eax
cmp	eax, 8
jb	short loc_627DD3
lea	esi, [esp+28h+var_20]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
add	esp, 20h
retn

loc_627DF0:
lea	edx, [esp+28h+var_20]
mov	eax, edx
push	edx
push	eax
mov	eax, edi
call	sub_627470
add	esp, 8
xor	eax, eax

loc_627E04:
cmp	[esp+eax*4+28h+var_20],	0
jnz	short loc_627DC3
inc	eax
cmp	eax, 8
jb	short loc_627E04
pop	edi
pop	esi
add	esp, 20h
retn
sub_627D60 endp

align 10h



sub_627E20 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	byte ptr -0A0h
var_80=	dword ptr -80h
var_60=	dword ptr -60h
var_40=	byte ptr -40h
var_20=	byte ptr -20h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0C0h
push	ebx
mov	ebx, [esp+0C4h+arg_0]
xor	eax, eax
push	ebp
mov	ebp, [esp+0C8h+arg_4]
push	esi
mov	[esp+0CCh+var_BC], eax
mov	[esp+0CCh+var_B8], eax
mov	[esp+0CCh+var_B4], eax
mov	[esp+0CCh+var_B0], eax
mov	[esp+0CCh+var_AC], eax
mov	[esp+0CCh+var_A8], eax
mov	[esp+0CCh+var_A4], eax
push	edi
lea	eax, [esp+0D0h+var_60]
push	eax
lea	ecx, [esp+0D4h+var_A0]
push	ecx
push	ebp
mov	eax, ebx
mov	[esp+0DCh+var_C0], 1
call	sub_628750
lea	edx, [esp+0DCh+var_A0]
push	edx
lea	eax, [esp+0E0h+var_40]
mov	ecx, 8
mov	esi, ebp
lea	edi, [esp+0E0h+var_40]
push	eax
rep movsd
call	sub_628C10
mov	ecx, 8
mov	esi, ebx
lea	edi, [esp+0E4h+var_80]
add	esp, 14h
rep movsd

loc_627EA2:
lea	ecx, [esp+0D0h+var_80]
push	ecx
lea	edx, [esp+0D4h+var_A0]
mov	eax, ecx
push	edx
push	eax
lea	eax, [esp+0DCh+var_60]
call	sub_628750
add	esp, 0Ch
xor	eax, eax
lea	ecx, [ecx+0]

loc_627EC0:
cmp	[esp+eax*4+0D0h+var_80], 0
jnz	short loc_627ED9
inc	eax
cmp	eax, 8
jb	short loc_627EC0
lea	esi, [esp+0D0h+var_40]
jmp	loc_627F81

loc_627ED9:
lea	ecx, [esp+0D0h+var_20]
push	ecx
push	ebp
lea	edx, [esp+0D8h+var_C0]
push	edx
lea	eax, [esp+0DCh+var_A0]
push	eax
lea	eax, [esp+0E0h+var_40]
call	sub_628C70
lea	ecx, [esp+0E0h+var_60]
push	ecx
lea	edx, [esp+0E4h+var_A0]
mov	eax, ecx
push	edx
push	eax
lea	eax, [esp+0ECh+var_80]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_627F16:
cmp	[esp+eax*4+0D0h+var_60], 0
jnz	short loc_627F2C
inc	eax
cmp	eax, 8
jb	short loc_627F16
lea	esi, [esp+0D0h+var_20]
jmp	short loc_627F81

loc_627F2C:
lea	ecx, [esp+0D0h+var_C0]
push	ecx
push	ebp
lea	edx, [esp+0D8h+var_40]
push	edx
lea	eax, [esp+0DCh+var_A0]
push	eax
lea	eax, [esp+0E0h+var_20]
call	sub_628C70
lea	ecx, [esp+0E0h+var_80]
push	ecx
lea	edx, [esp+0E4h+var_A0]
mov	eax, ecx
push	edx
push	eax
lea	eax, [esp+0ECh+var_60]
call	sub_628750
add	esp, 1Ch
xor	eax, eax
lea	esp, [esp+0]

loc_627F70:
cmp	[esp+eax*4+0D0h+var_80], 0
jnz	short loc_627F9A
inc	eax
cmp	eax, 8
jb	short loc_627F70

loc_627F7D:
lea	esi, [esp+0D0h+var_C0]

loc_627F81:
mov	edi, [esp+0D0h+arg_8]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0C0h
retn

loc_627F9A:
lea	ecx, [esp+0D0h+var_40]
push	ecx
push	ebp
lea	edx, [esp+0D8h+var_20]
push	edx
lea	eax, [esp+0DCh+var_A0]
push	eax
lea	eax, [esp+0E0h+var_C0]
call	sub_628C70
lea	ecx, [esp+0E0h+var_60]
push	ecx
lea	edx, [esp+0E4h+var_A0]
mov	eax, ecx
push	edx
push	eax
lea	eax, [esp+0ECh+var_80]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_627FD7:
cmp	[esp+eax*4+0D0h+var_60], 0
jnz	short loc_627FED
inc	eax
cmp	eax, 8
jb	short loc_627FD7
lea	esi, [esp+0D0h+var_40]
jmp	short loc_627F81

loc_627FED:
lea	ecx, [esp+0D0h+var_20]
push	ecx
push	ebp
lea	edx, [esp+0D8h+var_C0]
push	edx
lea	eax, [esp+0DCh+var_A0]
push	eax
lea	eax, [esp+0E0h+var_40]
call	sub_628C70
lea	ecx, [esp+0E0h+var_80]
push	ecx
lea	edx, [esp+0E4h+var_A0]
mov	eax, ecx
push	edx
push	eax
lea	eax, [esp+0ECh+var_60]
call	sub_628750
add	esp, 1Ch
xor	eax, eax
lea	ebx, [ebx+0]

loc_628030:
cmp	[esp+eax*4+0D0h+var_80], 0
jnz	short loc_628049
inc	eax
cmp	eax, 8
jb	short loc_628030
lea	esi, [esp+0D0h+var_20]
jmp	loc_627F81

loc_628049:
lea	ecx, [esp+0D0h+var_C0]
push	ecx
push	ebp
lea	edx, [esp+0D8h+var_40]
push	edx
lea	eax, [esp+0DCh+var_A0]
push	eax
lea	eax, [esp+0E0h+var_20]
call	sub_628C70
lea	ecx, [esp+0E0h+var_60]
push	ecx
lea	edx, [esp+0E4h+var_A0]
mov	eax, ecx
push	edx
push	eax
lea	eax, [esp+0ECh+var_80]
call	sub_628750
add	esp, 1Ch
xor	eax, eax

loc_628086:
cmp	[esp+eax*4+0D0h+var_60], 0
jnz	short loc_628098
inc	eax
cmp	eax, 8
jb	short loc_628086
jmp	loc_627F7D

loc_628098:
lea	ecx, [esp+0D0h+var_40]
push	ecx
push	ebp
lea	edx, [esp+0D8h+var_20]
push	edx
lea	eax, [esp+0DCh+var_A0]
push	eax
lea	eax, [esp+0E0h+var_C0]
call	sub_628C70
add	esp, 10h
jmp	loc_627EA2
sub_627E20 endp

align 10h


; Attributes: bp-based frame

sub_6280C0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	edx, [eax]
push	ebx
mov	ebx, [eax+0Ch]
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+4]
mov	eax, [ecx]
mov	[ebp+var_20], edx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
mov	ecx, [ebp+arg_0]
xor	eax, eax
mov	[ecx], eax
mov	[ecx+4], eax
mov	[ecx+8], eax
mov	[ebp+var_1C], edi
mov	[ebp+var_18], esi
mov	[ebp+var_14], ebx
mov	[ecx+0Ch], eax
mov	[ebp+var_4], 1
test	ebx, ebx
js	loc_628224
lea	ecx, [ebp+var_20]
call	sub_626210
test	al, al
jz	loc_628221
mov	eax, 3
lea	ecx, [ecx+0]

loc_628130:
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+eax*4], 0
jnz	short loc_62813E
sub	eax, 1
jns	short loc_628130

loc_62813E:
mov	ecx, eax
test	eax, eax
jl	short loc_628174

loc_628144:
cmp	[ebp+ecx*4+var_20], 0
jnz	short loc_628150
sub	ecx, 1
jns	short loc_628144

loc_628150:
cmp	eax, ecx
jz	short loc_628174
sub	eax, ecx
shl	eax, 5
mov	edi, eax
push	edi
lea	esi, [ebp+var_20]
call	sub_629140
mov	ebx, [ebp+var_14]
mov	esi, [ebp+var_18]
add	esp, 4
inc	edi
mov	[ebp+var_4], edi
mov	edi, [ebp+var_1C]

loc_628174:
test	ebx, ebx
js	short loc_6281D0
jmp	short loc_628180
align 10h

loc_628180:
mov	eax, 3

loc_628185:
mov	ecx, [ebp+arg_4]
mov	ecx, [ecx+eax*4]
mov	edx, [ebp+eax*4+var_20]
cmp	ecx, edx
ja	short loc_62819C
jb	short loc_6281D0
sub	eax, 1
jns	short loc_628185
jmp	short loc_6281D0

loc_62819C:
mov	ecx, [ebp+var_20]
inc	[ebp+var_4]
mov	eax, ecx
add	ecx, ecx
mov	[ebp+var_20], ecx
shr	eax, 1Fh
mov	ecx, edi
add	edi, edi
or	edi, eax
mov	eax, esi
shr	eax, 1Fh
add	ebx, ebx
shr	ecx, 1Fh
add	esi, esi
or	ebx, eax
or	esi, ecx
mov	[ebp+var_1C], edi
mov	[ebp+var_18], esi
mov	[ebp+var_14], ebx
test	ebx, ebx
jns	short loc_628180
nop

loc_6281D0:
mov	eax, 3

loc_6281D5:
mov	edx, [ebp+arg_4]
mov	ecx, [edx+eax*4]
mov	edx, [ebp+eax*4+var_20]
cmp	edx, ecx
ja	short loc_6281F0
jb	loc_628265
sub	eax, 1
jns	short loc_6281D5
jmp	short loc_628265

loc_6281F0:
mov	eax, ebx
shl	eax, 1Fh
mov	ecx, esi
shr	esi, 1
or	esi, eax
shl	ecx, 1Fh
mov	eax, edi
shr	edi, 1
or	edi, ecx
mov	ecx, [ebp+var_20]
shl	eax, 1Fh
shr	ecx, 1
shr	ebx, 1
or	ecx, eax
dec	[ebp+var_4]
mov	[ebp+var_14], ebx
mov	[ebp+var_18], esi
mov	[ebp+var_1C], edi
mov	[ebp+var_20], ecx
jmp	short loc_6281D0

loc_628221:
mov	edx, [ebp+arg_4]

loc_628224:
mov	ecx, edx
lea	edx, [ebp+var_20]
call	sub_626210
test	al, al
jz	short loc_628265
mov	edx, [ebp+var_20]
mov	eax, ebx
shl	eax, 1Fh
mov	ecx, esi
shr	esi, 1
or	esi, eax
mov	eax, edi
shl	ecx, 1Fh
shr	edi, 1
shr	ebx, 1
or	edi, ecx
shl	eax, 1Fh
shr	edx, 1
or	edx, eax
mov	[ebp+var_14], ebx
mov	[ebp+var_18], esi
mov	[ebp+var_1C], edi
mov	[ebp+var_20], edx
mov	[ebp+var_4], 0

loc_628265:
cmp	[ebp+var_4], 0
mov	[ebp+var_8], 0
jz	loc_62834F
jmp	short loc_628280
align 10h

loc_628280:
mov	eax, 1
sub	[ebp+var_4], eax
add	[ebp+var_8], eax
mov	eax, 3

loc_628290:
mov	ecx, [ebp+arg_4]
mov	ecx, [ecx+eax*4]
mov	edx, [ebp+eax*4+var_20]
cmp	edx, ecx
ja	short loc_628319
jb	short loc_6282A5
sub	eax, 1
jns	short loc_628290

loc_6282A5:
lea	edx, [ebp+var_20]
mov	[ebp+var_10], edx
mov	[ebp+var_C], 0
mov	esi, [ebp+var_10]
mov	edi, [ebp+arg_4]
mov	ecx, [ebp+var_C]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_6282F7

loc_6282D5:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_6282D5

loc_6282F7:
mov	eax, [ebp+var_8]
mov	esi, [ebp+arg_0]
push	eax
call	sub_629140
mov	ebx, [ebp+var_14]
mov	edi, [ebp+var_1C]
add	esp, 4
or	dword ptr [esi], 1
mov	esi, [ebp+var_18]
mov	[ebp+var_8], 0

loc_628319:
mov	eax, ebx
shl	eax, 1Fh
mov	ecx, esi
shr	esi, 1
or	esi, eax
shl	ecx, 1Fh
mov	eax, edi
shr	edi, 1
or	edi, ecx
mov	ecx, [ebp+var_20]
shl	eax, 1Fh
shr	ecx, 1
shr	ebx, 1
or	ecx, eax
cmp	[ebp+var_4], 0
mov	[ebp+var_14], ebx
mov	[ebp+var_18], esi
mov	[ebp+var_1C], edi
mov	[ebp+var_20], ecx
jnz	loc_628280

loc_62834F:
mov	edx, [ebp+var_8]
mov	esi, [ebp+arg_0]
push	edx
call	sub_629140
add	esp, 4
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6280C0 endp

align 10h



sub_628370 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 50h
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[esp+50h+var_40], ecx
mov	ecx, [eax+8]
mov	[esp+50h+var_3C], edx
mov	edx, [eax+0Ch]
xor	eax, eax
push	ebx
mov	ebx, [esp+54h+arg_4]
mov	[esp+54h+var_30], eax
mov	[esp+54h+var_2C], eax
mov	[esp+54h+var_28], eax
mov	[esp+54h+var_24], eax
mov	eax, [esp+54h+arg_0]
mov	[esp+54h+var_38], ecx
push	eax
lea	ecx, [esp+58h+var_40]
push	ecx
mov	[esp+5Ch+var_34], edx
call	sub_6291D0
mov	eax, [ebx+4]
mov	ecx, [ebx+8]
mov	edx, [ebx]
mov	[esp+5Ch+var_1C], eax
xor	eax, eax
mov	[esp+5Ch+var_10], eax
mov	[esp+5Ch+var_C], eax
mov	[esp+5Ch+var_8], eax
mov	[esp+5Ch+var_4], eax
lea	eax, [esp+5Ch+var_40]
mov	[esp+5Ch+var_18], ecx
push	eax
mov	ecx, eax
mov	[esp+60h+var_20], edx
mov	edx, [ebx+0Ch]
push	ecx
lea	eax, [esp+64h+var_20]
mov	[esp+64h+var_14], edx
call	sub_627470
mov	eax, [esp+64h+var_3C]
mov	edx, [esp+64h+var_40]
mov	ecx, [esp+64h+var_38]
mov	[esp+64h+var_4C], eax
mov	eax, [esi]
mov	[edi], eax
mov	[esp+64h+var_50], edx
mov	edx, [esp+64h+var_34]
mov	[esp+64h+var_48], ecx
mov	ecx, [esi+4]
mov	[edi+4], ecx
mov	[esp+64h+var_44], edx
mov	edx, [esi+8]
mov	[edi+8], edx
mov	eax, [esi+0Ch]
mov	[edi+0Ch], eax
add	esp, 10h
mov	eax, 3

loc_628430:
mov	ecx, [esi+eax*4]
mov	edx, [esp+eax*4+54h+var_50]
cmp	ecx, edx
ja	short loc_62845C
jb	short loc_628442
sub	eax, 1
jns	short loc_628430

loc_628442:
lea	edx, [esp+54h+var_50]
push	edx
push	edi
call	sub_627820
push	ebx
push	edi
call	sub_627880
add	esp, 10h
pop	ebx
add	esp, 50h
retn

loc_62845C:
lea	ecx, [esp+54h+var_50]
push	ecx
push	edi
call	sub_627820
add	esp, 8
pop	ebx
add	esp, 50h
retn
sub_628370 endp

align 10h



sub_628470 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	byte ptr -30h
var_20=	dword ptr -20h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 60h
push	ebx
mov	ebx, [esp+64h+arg_0]
push	ebp
mov	ebp, [esp+68h+arg_4]
xor	eax, eax
push	esi
lea	esi, [esp+6Ch+var_40]
mov	ecx, ebx
mov	[esp+6Ch+var_50], 1
mov	[esp+6Ch+var_4C], eax
mov	[esp+6Ch+var_48], eax
mov	[esp+6Ch+var_44], eax
call	sub_626800
lea	eax, [esp+6Ch+var_20]
push	eax
lea	ecx, [esp+70h+var_30]
push	ecx
mov	eax, esi
mov	ecx, ebx
call	sub_6280C0
add	esp, 8
xor	eax, eax

loc_6284B7:
cmp	[esp+eax*4+6Ch+var_20],	0
jnz	short loc_6284E7
inc	eax
cmp	eax, 4
jb	short loc_6284B7
mov	edx, [esp+6Ch+var_50]
mov	eax, [esp+6Ch+var_4C]
mov	ecx, [esp+6Ch+var_48]
mov	[ebp+0], edx
mov	edx, [esp+6Ch+var_44]
mov	[ebp+4], eax
mov	[ebp+8], ecx
pop	esi
mov	[ebp+0Ch], edx
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_6284E7:
mov	ecx, [ebx+4]
mov	edx, [ebx+8]
mov	eax, [ebx]
mov	[esp+6Ch+var_5C], ecx
lea	ecx, [esp+6Ch+var_30]
mov	[esp+6Ch+var_58], edx
mov	[esp+6Ch+var_60], eax
mov	eax, [ebx+0Ch]
push	ecx
lea	edx, [esp+70h+var_60]
push	edx
mov	[esp+74h+var_54], eax
call	sub_627820
lea	eax, [esp+74h+var_40]
push	eax
lea	ecx, [esp+78h+var_30]
push	ecx
lea	eax, [esp+7Ch+var_20]
lea	ecx, [esp+7Ch+var_40]
call	sub_6280C0
add	esp, 10h
xor	eax, eax
lea	ecx, [ecx+0]

loc_628530:
cmp	[esp+eax*4+6Ch+var_40],	0
jnz	short loc_628560
inc	eax
cmp	eax, 4
jb	short loc_628530
mov	edx, [esp+6Ch+var_60]
mov	eax, [esp+6Ch+var_5C]
mov	ecx, [esp+6Ch+var_58]
mov	[ebp+0], edx
mov	edx, [esp+6Ch+var_54]
mov	[ebp+4], eax
mov	[ebp+8], ecx
pop	esi
mov	[ebp+0Ch], edx
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_628560:
push	edi

loc_628561:
lea	eax, [esp+70h+var_60]
push	ebx
push	eax
lea	edi, [esp+78h+var_10]
lea	esi, [esp+78h+var_50]
lea	eax, [esp+78h+var_30]
call	sub_628370
lea	ecx, [esp+78h+var_20]
push	ecx
lea	edx, [esp+7Ch+var_30]
push	edx
lea	eax, [esp+80h+var_40]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_628590:
cmp	[esp+eax*4+70h+var_20],	0
jnz	short loc_6285C1
inc	eax
cmp	eax, 4
jb	short loc_628590

loc_62859D:
mov	eax, [esp+70h+var_10]
mov	ecx, [esp+70h+var_C]
mov	edx, [esp+70h+var_8]
mov	[ebp+0], eax
mov	eax, [esp+70h+var_4]
pop	edi
mov	[ebp+4], ecx
mov	[ebp+8], edx
pop	esi
mov	[ebp+0Ch], eax
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_6285C1:
lea	eax, [esp+70h+var_10]
push	ebx
push	eax
lea	edi, [esp+78h+var_50]
lea	esi, [esp+78h+var_60]
lea	eax, [esp+78h+var_30]
call	sub_628370
lea	ecx, [esp+78h+var_40]
push	ecx
lea	edx, [esp+7Ch+var_30]
push	edx
lea	eax, [esp+80h+var_20]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_6285F0:
cmp	[esp+eax*4+70h+var_40],	0
jnz	short loc_628621
inc	eax
cmp	eax, 4
jb	short loc_6285F0

loc_6285FD:
mov	ecx, [esp+70h+var_50]
mov	edx, [esp+70h+var_4C]
mov	eax, [esp+70h+var_48]
mov	[ebp+0], ecx
mov	ecx, [esp+70h+var_44]
pop	edi
mov	[ebp+4], edx
mov	[ebp+8], eax
pop	esi
mov	[ebp+0Ch], ecx
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_628621:
lea	eax, [esp+70h+var_50]
push	ebx
push	eax
lea	edi, [esp+78h+var_60]
lea	esi, [esp+78h+var_10]
lea	eax, [esp+78h+var_30]
call	sub_628370
lea	ecx, [esp+78h+var_20]
push	ecx
lea	edx, [esp+7Ch+var_30]
push	edx
lea	eax, [esp+80h+var_40]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_628650:
cmp	[esp+eax*4+70h+var_20],	0
jnz	short loc_628681
inc	eax
cmp	eax, 4
jb	short loc_628650

loc_62865D:
mov	edx, [esp+70h+var_60]
mov	eax, [esp+70h+var_5C]
mov	ecx, [esp+70h+var_58]
mov	[ebp+0], edx
mov	edx, [esp+70h+var_54]
pop	edi
mov	[ebp+4], eax
mov	[ebp+8], ecx
pop	esi
mov	[ebp+0Ch], edx
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_628681:
lea	eax, [esp+70h+var_60]
push	ebx
push	eax
lea	edi, [esp+78h+var_10]
lea	esi, [esp+78h+var_50]
lea	eax, [esp+78h+var_30]
call	sub_628370
lea	ecx, [esp+78h+var_40]
push	ecx
lea	edx, [esp+7Ch+var_30]
push	edx
lea	eax, [esp+80h+var_20]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_6286B0:
cmp	[esp+eax*4+70h+var_40],	0
jnz	short loc_6286C2
inc	eax
cmp	eax, 4
jb	short loc_6286B0
jmp	loc_62859D

loc_6286C2:
lea	eax, [esp+70h+var_10]
push	ebx
push	eax
lea	edi, [esp+78h+var_50]
lea	esi, [esp+78h+var_60]
lea	eax, [esp+78h+var_30]
call	sub_628370
lea	ecx, [esp+78h+var_20]
push	ecx
lea	edx, [esp+7Ch+var_30]
push	edx
lea	eax, [esp+80h+var_40]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_6286F1:
cmp	[esp+eax*4+70h+var_20],	0
jnz	short loc_628703
inc	eax
cmp	eax, 4
jb	short loc_6286F1
jmp	loc_6285FD

loc_628703:
lea	eax, [esp+70h+var_50]
push	ebx
push	eax
lea	edi, [esp+78h+var_60]
lea	esi, [esp+78h+var_10]
lea	eax, [esp+78h+var_30]
call	sub_628370
lea	ecx, [esp+78h+var_40]
push	ecx
lea	edx, [esp+7Ch+var_30]
push	edx
lea	eax, [esp+80h+var_20]
call	sub_6280C0
add	esp, 10h
xor	eax, eax

loc_628732:
cmp	[esp+eax*4+70h+var_40],	0
jnz	loc_628561
inc	eax
cmp	eax, 4
jb	short loc_628732
jmp	loc_62865D
sub_628470 endp

align 10h


; Attributes: bp-based frame

sub_628750 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	edx, [ebp+arg_8]
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
push	edi
mov	esi, eax
xor	eax, eax
mov	ecx, 8
lea	edi, [ebp+var_2C]
rep movsd
test	[ebp+var_10], 80000000h
mov	esi, [ebp+arg_0]
mov	ecx, 8
mov	edi, edx
rep movsd
mov	[ebx], eax
mov	[ebx+4], eax
mov	[ebx+8], eax
mov	[ebx+0Ch], eax
mov	[ebx+10h], eax
mov	[ebx+14h], eax
mov	edi, 1
mov	[ebx+18h], eax
mov	[ebx+1Ch], eax
mov	[ebp+arg_0], edi
jnz	loc_6288E8
lea	ecx, [ebp+var_2C]
call	sub_627D30
test	al, al
jz	loc_6288E5
mov	eax, 7
lea	ebx, [ebx+0]

loc_6287C0:
mov	esi, [ebp+arg_8]
cmp	dword ptr [esi+eax*4], 0
jnz	short loc_6287CD
sub	eax, edi
jns	short loc_6287C0

loc_6287CD:
mov	ecx, eax
test	eax, eax
jl	short loc_6287FD

loc_6287D3:
cmp	[ebp+ecx*4+var_2C], 0
jnz	short loc_6287DE
sub	ecx, edi
jns	short loc_6287D3

loc_6287DE:
cmp	eax, ecx
jz	short loc_6287FD
sub	eax, ecx
shl	eax, 5
lea	esi, [ebp+var_2C]
mov	edi, eax
call	sub_627C50
mov	esi, [ebp+arg_8]
inc	edi
mov	[ebp+arg_0], edi
mov	edi, 1

loc_6287FD:
test	[ebp+var_10], 80000000h
jnz	loc_6288C0
mov	edi, [ebp+var_20]
mov	esi, [ebp+var_24]
mov	edx, [ebp+var_28]

loc_628813:
mov	ebx, [ebp+var_1C]
mov	ecx, 7
mov	[ebp+var_4], ecx
mov	edi, edi

loc_628820:
mov	eax, [ebp+arg_8]
mov	eax, [eax+ecx*4]
mov	ecx, [ebp+ecx*4+var_2C]
cmp	eax, ecx
ja	short loc_62883D
jb	short loc_6288AB
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx
jns	short loc_628820
jmp	short loc_6288AB

loc_62883D:
mov	ecx, [ebp+var_2C]
mov	eax, ecx
add	ecx, ecx
mov	[ebp+var_2C], ecx
shr	eax, 1Fh
mov	ecx, edx
shr	ecx, 1Fh
inc	[ebp+arg_0]
add	edx, edx
or	edx, eax
mov	eax, esi
shr	eax, 1Fh
add	esi, esi
or	esi, ecx
mov	ecx, edi
add	edi, edi
or	edi, eax
mov	eax, ebx
shr	ecx, 1Fh
add	ebx, ebx
or	ebx, ecx
mov	ecx, [ebp+var_18]
mov	[ebp+var_1C], ebx
shr	eax, 1Fh
lea	ebx, [ecx+ecx]
or	ebx, eax
mov	eax, [ebp+var_14]
shr	ecx, 1Fh
mov	[ebp+var_18], ebx
lea	ebx, [eax+eax]
or	ebx, ecx
mov	ecx, [ebp+var_10]
shr	eax, 1Fh
add	ecx, ecx
or	eax, ecx
mov	[ebp+var_28], edx
mov	[ebp+var_24], esi
mov	[ebp+var_20], edi
mov	[ebp+var_14], ebx
mov	[ebp+var_10], eax
test	eax, eax
jns	loc_628813

loc_6288AB:
mov	esi, [ebp+arg_8]
mov	ebx, [ebp+arg_4]
mov	edi, 1
jmp	short loc_6288C0
align 10h

loc_6288C0:
mov	eax, 7

loc_6288C5:
mov	ecx, [esi+eax*4]
mov	edx, [ebp+eax*4+var_2C]
cmp	edx, ecx
ja	short loc_6288D8
jb	short loc_628908
sub	eax, edi
jns	short loc_6288C5
jmp	short loc_628908

loc_6288D8:
lea	eax, [ebp+var_2C]
call	sub_628EA0
sub	[ebp+arg_0], edi
jmp	short loc_6288C0

loc_6288E5:
mov	edx, [ebp+arg_8]

loc_6288E8:
mov	ecx, edx
lea	edx, [ebp+var_2C]
call	sub_627D30
test	al, al
jz	short loc_628905
lea	eax, [ebp+var_2C]
call	sub_628EA0
mov	[ebp+arg_0], 0

loc_628905:
mov	esi, [ebp+arg_8]

loc_628908:
cmp	[ebp+arg_0], 0
mov	[ebp+var_4], 0
jz	loc_6289BD
lea	esp, [esp+0]

loc_628920:
sub	[ebp+arg_0], edi
add	[ebp+var_4], edi
mov	eax, 7
jmp	short loc_628930
align 10h

loc_628930:
mov	ecx, [esi+eax*4]
mov	edx, [ebp+eax*4+var_2C]
cmp	edx, ecx
ja	short loc_6289AB
jb	short loc_628941
sub	eax, edi
jns	short loc_628930

loc_628941:
lea	edx, [ebp+var_2C]
mov	[ebp+var_C], edx
mov	[ebp+var_8], edi
mov	esi, [ebp+var_C]
mov	edi, [ebp+arg_8]
mov	ecx, [ebp+var_8]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_62898F

loc_62896D:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_62896D

loc_62898F:
mov	eax, [ebp+var_4]
mov	esi, ebx
call	sub_627C50
or	dword ptr [ebx], 1
mov	esi, [ebp+arg_8]
mov	[ebp+var_4], 0
mov	edi, 1

loc_6289AB:
lea	eax, [ebp+var_2C]
call	sub_628EA0
cmp	[ebp+arg_0], 0
jnz	loc_628920

loc_6289BD:
mov	eax, [ebp+var_4]
mov	esi, ebx
call	sub_627C50
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_628750 endp

align 10h


; Attributes: bp-based frame

sub_6289D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	edx, [eax]
push	ebx
mov	ebx, [eax+0Ch]
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+4]
mov	eax, [ecx]
mov	[ebp+var_1C], edx
mov	edx, [ebp+arg_0]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[ebp+var_4], 1
mov	[ebp+var_18], edi
mov	[ebp+var_14], esi
mov	[ebp+var_10], ebx
mov	[edx+0Ch], ecx
test	ebx, ebx
js	loc_628BF4
lea	ecx, [ebp+var_1C]
call	sub_626210
test	al, al
jz	loc_628BF1
mov	eax, 3
lea	ecx, [ecx+0]

loc_628A30:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+eax*4], 0
jnz	short loc_628A3E
sub	eax, 1
jns	short loc_628A30

loc_628A3E:
mov	ecx, eax
test	eax, eax
jl	short loc_628A74

loc_628A44:
cmp	[ebp+ecx*4+var_1C], 0
jnz	short loc_628A50
sub	ecx, 1
jns	short loc_628A44

loc_628A50:
cmp	eax, ecx
jz	short loc_628A74
sub	eax, ecx
shl	eax, 5
mov	edi, eax
push	edi
lea	esi, [ebp+var_1C]
call	sub_629140
mov	ebx, [ebp+var_10]
mov	esi, [ebp+var_14]
add	esp, 4
inc	edi
mov	[ebp+var_4], edi
mov	edi, [ebp+var_18]

loc_628A74:
test	ebx, ebx
js	short loc_628AD0
jmp	short loc_628A80
align 10h

loc_628A80:
mov	eax, 3

loc_628A85:
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx+eax*4]
mov	edx, [ebp+eax*4+var_1C]
cmp	ecx, edx
ja	short loc_628A9C
jb	short loc_628AD0
sub	eax, 1
jns	short loc_628A85
jmp	short loc_628AD0

loc_628A9C:
mov	ecx, [ebp+var_1C]
inc	[ebp+var_4]
mov	eax, ecx
add	ecx, ecx
mov	[ebp+var_1C], ecx
shr	eax, 1Fh
mov	ecx, edi
add	edi, edi
or	edi, eax
mov	eax, esi
shr	eax, 1Fh
add	ebx, ebx
shr	ecx, 1Fh
add	esi, esi
or	ebx, eax
or	esi, ecx
mov	[ebp+var_18], edi
mov	[ebp+var_14], esi
mov	[ebp+var_10], ebx
test	ebx, ebx
jns	short loc_628A80
nop

loc_628AD0:
mov	eax, 3

loc_628AD5:
mov	edx, [ebp+arg_0]
mov	ecx, [edx+eax*4]
mov	edx, [ebp+eax*4+var_1C]
cmp	edx, ecx
ja	loc_628BBD
jb	short loc_628AEE
sub	eax, 1
jns	short loc_628AD5

loc_628AEE:
cmp	[ebp+var_4], 0
jz	loc_628BB6
jmp	short loc_628B00
align 10h

loc_628B00:
dec	[ebp+var_4]
mov	eax, 3
jmp	short loc_628B10
align 10h

loc_628B10:
mov	edx, [ebp+arg_0]
mov	ecx, [edx+eax*4]
mov	edx, [ebp+eax*4+var_1C]
cmp	edx, ecx
ja	short loc_628B80
jb	short loc_628B25
sub	eax, 1
jns	short loc_628B10

loc_628B25:
lea	eax, [ebp+var_1C]
mov	[ebp+var_C], eax
mov	[ebp+var_8], 0
mov	esi, [ebp+var_C]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_628B77

loc_628B55:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_628B55

loc_628B77:
mov	ebx, [ebp+var_10]
mov	esi, [ebp+var_14]
mov	edi, [ebp+var_18]

loc_628B80:
mov	eax, ebx
shl	eax, 1Fh
mov	ecx, esi
shr	esi, 1
or	esi, eax
shl	ecx, 1Fh
mov	eax, edi
shr	edi, 1
or	edi, ecx
mov	ecx, [ebp+var_1C]
shl	eax, 1Fh
shr	ecx, 1
shr	ebx, 1
or	ecx, eax
cmp	[ebp+var_4], 0
mov	[ebp+var_10], ebx
mov	[ebp+var_14], esi
mov	[ebp+var_18], edi
mov	[ebp+var_1C], ecx
jnz	loc_628B00

loc_628BB6:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_628BBD:
mov	eax, ebx
shl	eax, 1Fh
mov	ecx, esi
shr	esi, 1
or	esi, eax
shl	ecx, 1Fh
mov	eax, edi
shr	edi, 1
or	edi, ecx
mov	ecx, [ebp+var_1C]
shl	eax, 1Fh
shr	ecx, 1
shr	ebx, 1
or	ecx, eax
dec	[ebp+var_4]
mov	[ebp+var_10], ebx
mov	[ebp+var_14], esi
mov	[ebp+var_18], edi
mov	[ebp+var_1C], ecx
jmp	loc_628AD0

loc_628BF1:
mov	edx, [ebp+arg_0]

loc_628BF4:
mov	ecx, edx
lea	edx, [ebp+var_1C]
call	sub_626210
test	al, al
jz	loc_628B00
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6289D0 endp

align 10h


; Attributes: bp-based frame

sub_628C10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
push	esi
push	edi
mov	[ebp+var_4], 1
mov	esi, [ebp+arg_4]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	eax, [esi]
xor	edx, edx
sub	[edi], eax
mov	eax, [esi+4]
sbb	[edi+4], eax
mov	eax, [esi+8]
sbb	[edi+8], eax
mov	eax, [esi+0Ch]
sbb	[edi+0Ch], eax
jecxz	short loc_628C62

loc_628C40:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
sbb	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
sbb	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
sbb	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
sbb	[edi+edx*8+0Ch], eax
loop	loc_628C40

loc_628C62:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_628C10 endp

align 10h



sub_628C70 proc	near

var_A0=	byte ptr -0A0h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0A0h
push	ebx
mov	ebx, [esp+0A4h+arg_4]
push	ebp
mov	ebp, [esp+0A8h+arg_C]
push	esi
push	edi
mov	esi, eax
xor	eax, eax
mov	ecx, 8
lea	edi, [esp+0B0h+var_A0]
rep movsd
mov	[esp+0B0h+var_80], eax
mov	[esp+0B0h+var_7C], eax
mov	[esp+0B0h+var_78], eax
mov	[esp+0B0h+var_74], eax
mov	[esp+0B0h+var_70], eax
mov	[esp+0B0h+var_6C], eax
mov	[esp+0B0h+var_68], eax
mov	[esp+0B0h+var_64], eax
mov	eax, [esp+0B0h+arg_0]
push	eax		; int
lea	ecx, [esp+0B4h+var_A0]
push	ecx		; void *
call	sub_6292D0
mov	esi, [esp+0B8h+arg_8]
xor	eax, eax
mov	ecx, 8
lea	edi, [esp+0B8h+var_60]
rep movsd
lea	edx, [esp+0B8h+var_A0]
mov	[esp+0B8h+var_40], eax
mov	[esp+0B8h+var_3C], eax
mov	[esp+0B8h+var_38], eax
mov	[esp+0B8h+var_34], eax
mov	[esp+0B8h+var_30], eax
mov	[esp+0B8h+var_2C], eax
mov	[esp+0B8h+var_28], eax
mov	[esp+0B8h+var_24], eax
mov	eax, edx
push	edx
push	eax
lea	eax, [esp+0C0h+var_60]
call	sub_627250
mov	ecx, 8
lea	esi, [esp+0C0h+var_A0]
lea	edi, [esp+0C0h+var_20]
rep movsd
mov	ecx, 8
mov	esi, ebx
mov	edi, ebp
add	esp, 10h
rep movsd
mov	eax, 7
jmp	short loc_628D50
align 10h

loc_628D50:
mov	ecx, [ebx+eax*4]
mov	edx, [esp+eax*4+0B0h+var_20]
cmp	ecx, edx
ja	short loc_628D8F
jb	short loc_628D65
sub	eax, 1
jns	short loc_628D50

loc_628D65:
lea	edx, [esp+0B0h+var_20]
push	edx
push	ebp
call	sub_628C10
mov	eax, [esp+0B8h+arg_8]
push	eax
push	ebp
call	sub_6279E0
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn

loc_628D8F:
lea	ecx, [esp+0B0h+var_20]
push	ecx
push	ebp
call	sub_628C10
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn
sub_628C70 endp

align 10h



sub_628DB0 proc	near
push	esi
push	edi
mov	edi, edx
mov	esi, 0Fh
lea	eax, [ecx+3Ch]
sub	edi, ecx
mov	edi, edi

loc_628DC0:
mov	ecx, [edi+eax]
mov	edx, [eax]
cmp	ecx, edx
ja	short loc_628DD8
jb	short loc_628DD3
dec	esi
sub	eax, 4
test	esi, esi
jge	short loc_628DC0

loc_628DD3:
pop	edi
xor	al, al
pop	esi
retn

loc_628DD8:
pop	edi
mov	al, 1
pop	esi
retn
sub_628DB0 endp

align 10h



sub_628DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	edx, eax
and	eax, 1Fh
push	ebp
shr	edx, 5
mov	ebp, eax
push	edi
mov	[esp+10h+var_8], ebp
test	edx, edx
jz	short loc_628E23
mov	eax, 0Fh
sub	eax, edx
js	short loc_628E13
lea	ecx, [eax+edx]
lea	ecx, [esi+ecx*4]

loc_628E06:
mov	edi, [esi+eax*4]
mov	[ecx], edi
dec	eax
sub	ecx, 4
test	eax, eax
jge	short loc_628E06

loc_628E13:
add	edx, edx
add	edx, edx
push	edx		; size_t
push	0		; int
push	esi		; void *
call	_memset
add	esp, 0Ch

loc_628E23:
test	ebp, ebp
jz	short loc_628E5B
push	ebx
mov	ebx, 20h
xor	edi, edi
xor	edx, edx
sub	ebx, ebp
jmp	short loc_628E39

loc_628E35:
mov	ebp, [esp+14h+var_8]

loc_628E39:
mov	eax, [esi+edx*4]
mov	ecx, eax
mov	[esp+14h+var_4], ecx
mov	ecx, ebp
mov	ebp, eax
shl	ebp, cl
mov	ecx, ebx
shr	eax, cl
inc	edx
or	ebp, edi
mov	[esi+edx*4-4], ebp
mov	edi, eax
cmp	edx, 10h
jb	short loc_628E35
pop	ebx

loc_628E5B:
pop	edi
pop	ebp
add	esp, 8
retn
sub_628DE0 endp

align 10h



sub_628E70 proc	near
xor	edx, edx
mov	ecx, 0Fh
push	edi

loc_628E78:
mov	eax, [esi+ecx*4]
mov	edi, eax
shr	edi, 1
or	edi, edx
shl	eax, 1Fh
sub	ecx, 1
mov	[esi+ecx*4+4], edi
mov	edx, eax
jns	short loc_628E78
pop	edi
retn
sub_628E70 endp

align 10h



sub_628EA0 proc	near
mov	ecx, [eax+1Ch]
push	esi
mov	edx, ecx
shr	edx, 1
mov	[eax+1Ch], edx
mov	edx, [eax+18h]
mov	esi, edx
shr	esi, 1
shl	ecx, 1Fh
or	esi, ecx
mov	ecx, [eax+14h]
mov	[eax+18h], esi
shl	edx, 1Fh
mov	esi, ecx
shr	esi, 1
or	esi, edx
mov	edx, [eax+10h]
mov	[eax+14h], esi
mov	esi, edx
shr	esi, 1
shl	ecx, 1Fh
or	esi, ecx
mov	ecx, [eax+0Ch]
mov	[eax+10h], esi
shl	edx, 1Fh
mov	esi, ecx
shr	esi, 1
or	esi, edx
mov	edx, [eax+8]
mov	[eax+0Ch], esi
mov	esi, edx
shr	esi, 1
shl	ecx, 1Fh
or	esi, ecx
mov	ecx, [eax+4]
mov	[eax+8], esi
shl	edx, 1Fh
mov	esi, ecx
shr	esi, 1
or	esi, edx
mov	edx, [eax]
shl	ecx, 1Fh
shr	edx, 1
or	edx, ecx
mov	[eax+4], esi
mov	[eax], edx
pop	esi
retn
sub_628EA0 endp

align 10h


; Attributes: bp-based frame

sub_628F20 proc	near

var_54=	dword ptr -54h
var_34=	byte ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	eax, [ebp+arg_0]
push	ebx
push	esi
push	edi
mov	esi, eax
mov	ecx, 8
lea	edi, [ebp+var_54]
rep movsd
mov	esi, eax
mov	ecx, 8
lea	edi, [ebp+var_34]
rep movsd
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
xor	eax, eax
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
jmp	short loc_628F70
align 10h

loc_628F70:
mov	ebx, [ebp+ecx*4+var_54]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_629004

loc_628F83:
test	bl, 1
jz	short loc_628FF0
test	eax, eax
jz	short loc_628F9B
lea	esi, [ebp+var_34]
call	sub_627C50
mov	[ebp+var_4], 0

loc_628F9B:
lea	eax, [ebp+var_34]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 1
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_628FED

loc_628FCB:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_628FCB

loc_628FED:
mov	eax, [ebp+var_4]

loc_628FF0:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_628F83
mov	ecx, [ebp+var_C]

loc_629004:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 8
jb	loc_628F70
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_628F20 endp

align 10h


; Attributes: bp-based frame

sub_629030 proc	near

var_34=	byte ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
push	edi
mov	esi, eax
push	0		; size_t
lea	eax, [ebp+var_14]
push	0		; int
mov	ecx, 8
lea	edi, [ebp+var_34]
push	eax		; void *
rep movsd
call	_memset
xor	eax, eax
mov	[ebx], eax
mov	[ebx+4], eax
mov	[ebx+8], eax
mov	[ebx+0Ch], eax
mov	[ebx+10h], eax
add	esp, 0Ch
mov	[ebx+14h], eax
xor	ecx, ecx
mov	[ebx+18h], eax
mov	[ebx+1Ch], eax
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
lea	esp, [esp+0]

loc_629080:
mov	edx, [ebp+arg_0]
mov	ebx, [edx+ecx*4]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_629116

loc_629095:
test	bl, 1
jz	short loc_629102
test	eax, eax
jz	short loc_6290AD
lea	esi, [ebp+var_34]
call	sub_627C50
mov	[ebp+var_4], 0

loc_6290AD:
lea	eax, [ebp+var_34]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 1
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_4]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_6290FF

loc_6290DD:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_6290DD

loc_6290FF:
mov	eax, [ebp+var_4]

loc_629102:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_629095
mov	ecx, [ebp+var_C]

loc_629116:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 8
jb	loc_629080
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_629030 endp

align 10h



sub_629140 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, ebx
shr	edx, 5
and	ebx, 1Fh
push	edi
test	edx, edx
jz	short loc_62917E
mov	eax, 3
sub	eax, edx
js	short loc_62916E
lea	ecx, [eax+edx]
lea	ecx, [esi+ecx*4]

loc_629161:
mov	edi, [esi+eax*4]
mov	[ecx], edi
dec	eax
sub	ecx, 4
test	eax, eax
jge	short loc_629161

loc_62916E:
add	edx, edx
add	edx, edx
push	edx		; size_t
push	0		; int
push	esi		; void *
call	_memset
add	esp, 0Ch

loc_62917E:
test	ebx, ebx
jz	short loc_6291C9
mov	eax, [esi]
mov	edi, [esi+4]
mov	edx, eax
mov	ecx, ebx
shl	edx, cl
push	ebp
mov	ebp, edi
mov	[esi], edx
mov	edx, 20h
sub	edx, ebx
mov	ecx, edx
shr	eax, cl
mov	ecx, ebx
shl	ebp, cl
mov	ecx, edx
shr	edi, cl
mov	ecx, ebx
or	ebp, eax
mov	eax, [esi+8]
mov	[esi+4], ebp
mov	ebp, eax
shl	ebp, cl
mov	ecx, edx
mov	edx, [esi+0Ch]
shr	eax, cl
mov	ecx, ebx
shl	edx, cl
or	ebp, edi
mov	[esi+8], ebp
pop	ebp
or	edx, eax
mov	[esi+0Ch], edx

loc_6291C9:
pop	edi
pop	ebx
retn
sub_629140 endp

align 10h


; Attributes: bp-based frame

sub_6291D0 proc	near

var_34=	byte ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	eax, [ebp+arg_0]
push	ebx
push	esi
push	edi
mov	esi, eax
mov	ecx, 8
lea	edi, [ebp+var_34]
rep movsd
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
xor	eax, eax
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
lea	esp, [esp+0]

loc_629210:
mov	edx, [ebp+arg_4]
mov	ebx, [edx+ecx*4]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_6292A6

loc_629225:
test	bl, 1
jz	short loc_629292
test	eax, eax
jz	short loc_62923D
lea	esi, [ebp+var_34]
call	sub_627C50
mov	[ebp+var_4], 0

loc_62923D:
lea	eax, [ebp+var_34]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 1
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_62928F

loc_62926D:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_62926D

loc_62928F:
mov	eax, [ebp+var_4]

loc_629292:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_629225
mov	ecx, [ebp+var_C]

loc_6292A6:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 4
jb	loc_629210
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6291D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_6292D0(void *, int)
sub_6292D0 proc	near

var_54=	byte ptr -54h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	eax, [ebp+arg_0]
push	ebx
push	esi
push	edi
push	40h		; size_t
mov	esi, eax
push	0		; int
mov	ecx, 10h
lea	edi, [ebp+var_54]
push	eax		; void *
rep movsd
call	_memset
xor	eax, eax
add	esp, 0Ch
xor	ecx, ecx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
nop

loc_629300:
mov	edx, [ebp+arg_4]
mov	ebx, [edx+ecx*4]
mov	[ebp+var_8], 20h
test	ebx, ebx
jz	loc_629396

loc_629315:
test	bl, 1
jz	short loc_629382
test	eax, eax
jz	short loc_62932D
lea	esi, [ebp+var_54]
call	sub_628DE0
mov	[ebp+var_4], 0

loc_62932D:
lea	eax, [ebp+var_54]
mov	[ebp+var_14], eax
mov	[ebp+var_10], 3
mov	esi, [ebp+var_14]
mov	edi, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	eax, [esi]
xor	edx, edx
add	[edi], eax
mov	eax, [esi+4]
adc	[edi+4], eax
mov	eax, [esi+8]
adc	[edi+8], eax
mov	eax, [esi+0Ch]
adc	[edi+0Ch], eax
jecxz	short loc_62937F

loc_62935D:
inc	edx
inc	edx
mov	eax, [esi+edx*8]
adc	[edi+edx*8], eax
mov	eax, [esi+edx*8+4]
adc	[edi+edx*8+4], eax
mov	eax, [esi+edx*8+8]
adc	[edi+edx*8+8], eax
mov	eax, [esi+edx*8+0Ch]
adc	[edi+edx*8+0Ch], eax
loop	loc_62935D

loc_62937F:
mov	eax, [ebp+var_4]

loc_629382:
add	[ebp+var_8], 0FFFFh
shr	ebx, 1
inc	eax
mov	[ebp+var_4], eax
test	ebx, ebx
jnz	short loc_629315
mov	ecx, [ebp+var_C]

loc_629396:
movzx	edx, word ptr [ebp+var_8]
inc	ecx
add	eax, edx
mov	[ebp+var_4], eax
mov	[ebp+var_C], ecx
cmp	ecx, 8
jb	loc_629300
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6292D0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12E772A

loc_6293C0:
cmp	dword ptr [eax+0Ch], 0
jbe	short locret_6293CF
mov	eax, [eax]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

locret_6293CF:
retn
; END OF FUNCTION CHUNK	FOR sub_12E772A



sub_6293D0 proc	near
mov	eax, [esi]
push	0Ch		; size_t
test	eax, eax
jnz	short loc_629400
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi+4], eax
mov	ecx, [edi]
mov	[eax], ecx
mov	eax, [esi+4]
mov	[eax+8], eax
mov	eax, [esi+4]
mov	[eax+4], eax
mov	edx, [esi+4]
add	esp, 4
mov	dword ptr [esi], 1
mov	[esi+8], edx
retn

loc_629400:
cmp	eax, 1
jnz	short loc_629445
call	??2@YAPAXI@Z	; operator new(uint)
mov	ecx, [esi+4]
mov	[esi+8], eax
mov	[ecx+8], eax
mov	edx, [esi+4]
mov	eax, [esi+8]
mov	[edx+4], eax
mov	edx, [esi+4]
mov	ecx, [esi+8]
mov	[ecx+4], edx
mov	ecx, [esi+4]
mov	eax, [esi+8]
mov	[eax+8], ecx
mov	eax, [edi]
mov	edx, [esi+8]
mov	[edx], eax
mov	ecx, [esi+8]
add	esp, 4
mov	[esi+4], ecx
mov	dword ptr [esi], 2
retn

loc_629445:		; operator new(uint)
call	??2@YAPAXI@Z
mov	edx, [edi]
mov	[eax], edx
mov	ecx, [esi+8]
mov	edx, [ecx+4]
mov	[edx+8], eax
mov	ecx, [esi+8]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [esi+8]
mov	[ecx+4], eax
mov	edx, [esi+8]
mov	[eax+8], edx
mov	ecx, [esi+8]
add	esp, 4
cmp	ecx, [esi+4]
jnz	short loc_62947D
mov	[esi+4], eax
mov	[esi+8], eax

loc_62947D:
inc	dword ptr [esi]
retn
sub_6293D0 endp

; START	OF FUNCTION CHUNK FOR sub_12E7D1B

loc_629480:
push	edi
mov	edi, eax
call	sub_62AD00
call	sub_62AD00
pop	edi
retn
; END OF FUNCTION CHUNK	FOR sub_12E7D1B
align 10h



; int __thiscall sub_629490(void *, char)
sub_629490 proc	near

arg_0= byte ptr	 4

xor	eax, eax
test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FA64C
mov	dword ptr [esi+4], 67452301h
mov	dword ptr [esi+8], 0EFCDAB89h
mov	dword ptr [esi+0Ch], 98BADCFEh
mov	dword ptr [esi+10h], 10325476h
mov	dword ptr [esi+14h], 0C3D2E1F0h
mov	[esi+18h], eax
mov	[esi+1Ch], eax
jz	short loc_6294D4
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6294D4:
mov	eax, esi
pop	esi
retn	4
sub_629490 endp

align 10h



sub_6294E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	eax, esi
call	sub_62A230
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_62951F
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_62951F:
cmp	edi, [esi+4]
jb	short loc_629536
mov	edx, [ebx]
push	edx
call	sub_62B940
mov	eax, [esi+4]
pop	edi
pop	esi
dec	eax
pop	ebx
retn	4

loc_629536:
mov	eax, [ebx]
push	edi
push	eax
call	sub_624330
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_6294E0 endp

align 10h



sub_629550 proc	near
push	esi
mov	esi, ecx
xor	ecx, ecx
mov	eax, 10h
mov	[esi+0Ch], eax
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi], eax
xor	eax, eax
mov	[esi+4], eax
mov	[esi+8], eax
add	esp, 4
mov	eax, esi
pop	esi
retn
sub_629550 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12E7A33

loc_629590:
cmp	dword ptr [ecx+0Ch], 0
jbe	short locret_62959F
mov	eax, [ecx]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

locret_62959F:
retn
; END OF FUNCTION CHUNK	FOR sub_12E7A33



sub_6295A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_6295A0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	[esp+14h+var_4], 0
cmp	dword ptr [esi+8], 0
jz	short loc_629600
mov	eax, [esi]
test	eax, eax
jz	short loc_6295EC
mov	ecx, [eax-4]
lea	edi, [eax-4]
push	offset nullsub_1
push	ecx
push	8
push	eax
call	$LN21_0
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6295EC:
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0

loc_629600:
push	esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_62A2A0
mov	ecx, [esp+14h+var_C]
pop	edi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_6295A0 endp

align 10h



sub_629630 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	esi
mov	esi, eax
mov	ebx, [esi+4]
push	edi
mov	edi, [esp+18h+arg_0]
test	ebx, ebx
jnz	short loc_629664
lea	eax, [esp+18h+var_8]
push	eax
lea	ecx, [esp+1Ch+arg_0]
mov	eax, esi
mov	[esp+1Ch+var_8], edi
mov	[esp+1Ch+var_4], edi
call	sub_62A350
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4

loc_629664:
lea	ecx, [esp+18h+var_9]
push	ecx
lea	edx, [esp+1Ch+arg_0]
push	edx
call	sub_624060
mov	ecx, eax
cmp	ecx, ebx
jnz	short loc_6296B8
mov	eax, [esi]
lea	eax, [eax+ecx*8-4]
mov	ecx, [eax]
inc	ecx
cmp	edi, ecx
jnz	short loc_629691
inc	dword ptr [eax]
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4

loc_629691:
jbe	loc_62973A
lea	ecx, [esp+18h+var_8]
push	ecx
lea	ecx, [esp+1Ch+arg_0]
mov	eax, esi
mov	[esp+1Ch+var_8], edi
mov	[esp+1Ch+var_4], edi
call	sub_62A350
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4

loc_6296B8:
mov	edx, [esi]
mov	ebx, [edx+ecx*8]
lea	eax, [edx+ecx*8]
lea	edx, [ebx-1]
cmp	edi, edx
jnb	short loc_6296D8
push	ecx
push	edi
push	edi
call	sub_62AE90
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4

loc_6296D8:
jnz	short loc_629704
dec	dword ptr [eax]
test	ecx, ecx
jbe	short loc_62973A
mov	eax, [esi]
mov	edx, [eax+ecx*8-4]
lea	eax, [eax+ecx*8]
inc	edx
cmp	edx, [eax]
jnz	short loc_62973A
mov	edx, [eax+4]
mov	[eax-4], edx
mov	edx, esi
call	sub_6244A0
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4

loc_629704:
cmp	edi, ebx
jb	short loc_62970D
cmp	edi, [eax+4]
jbe	short loc_62973A

loc_62970D:
mov	edx, [eax+4]
inc	edx
cmp	edi, edx
jnz	short loc_62973A
inc	dword ptr [eax+4]
mov	eax, [esi+4]
dec	eax
cmp	ecx, eax
jnb	short loc_62973A
mov	edx, [esi]
lea	eax, [edx+ecx*8]
mov	edx, [eax+4]
inc	edx
cmp	[eax+8], edx
jnz	short loc_62973A
mov	edx, [eax]
mov	[eax+8], edx
mov	edx, esi
call	sub_6244A0

loc_62973A:
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_629630 endp

align 10h



sub_629750 proc	near

var_430= dword ptr -430h
var_42C= dword ptr -42Ch
var_428= dword ptr -428h
var_424= dword ptr -424h
var_420= dword ptr -420h
var_41C= byte ptr -41Ch
var_418= dword ptr -418h
var_414= byte ptr -414h
var_413= byte ptr -413h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_629750
push	eax
mov	large fs:0, esp
sub	esp, 424h
cmp	dword ptr [esi+4], 0FFFFh
push	ebx
push	ebp
push	edi
jb	short loc_62978B
push	33h		; Line
push	offset aZLwo7_buildB_2 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aRanges_sizeUns ; "ranges.Size()	< (unsigned short)-1"
call	__wassert
add	esp, 0Ch

loc_62978B:
xor	edi, edi
lea	eax, [esp+43Ch+var_413]
mov	[esp+43Ch+var_41C], 0
mov	[esp+43Ch+var_428], edi
mov	[esp+43Ch+var_424], 2000h
mov	[esp+43Ch+var_420], edi
mov	[esp+43Ch+var_418], eax
mov	[esp+43Ch+var_414], 1
mov	[esp+43Ch+var_4], edi
xor	ebx, ebx
mov	[esp+43Ch+var_430], edi
cmp	[esi+4], edi
jbe	short loc_62982B
mov	ebp, 51h

loc_6297C6:
cmp	ebp, [esp+43Ch+arg_4]
ja	short loc_62982B
mov	ecx, [esi]
mov	edx, [ecx+edi*8]
cmp	edx, [ecx+edi*8+4]
lea	eax, [ecx+edi*8]
setz	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+440h+var_428]
call	sub_4E4DE0
mov	edx, [esi]
mov	eax, [edx+edi*8]
push	eax
lea	ecx, [esp+440h+var_428]
call	sub_51BC10
mov	ecx, [esi]
mov	edx, [ecx+edi*8]
add	[esp+43Ch+var_430], 21h
lea	eax, [ecx+edi*8]
add	ebp, 21h
cmp	edx, [eax+4]
jz	short loc_629824
mov	eax, [eax+4]
push	eax
lea	ecx, [esp+440h+var_428]
call	sub_51BC10
add	[esp+43Ch+var_430], 20h
add	ebp, 20h

loc_629824:
inc	edi
inc	ebx
cmp	edi, [esi+4]
jb	short loc_6297C6

loc_62982B:
mov	ebp, [esp+43Ch+arg_0]
mov	ecx, ebp
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, bx
lea	edx, [esp+43Ch+var_42C]
mov	edi, eax
mov	[esp+43Ch+var_42C], ecx
push	edx
mov	eax, 10h
mov	ecx, ebp
call	sub_A49780
mov	ecx, ebp
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
sub	eax, edi
add	[esp+43Ch+var_430], eax
lea	ecx, [esp+43Ch+var_428]
call	sub_580FA0
push	eax
lea	edi, [esp+440h+var_428]
mov	eax, ebp
call	sub_A49590
test	bx, bx
jz	short loc_6298AB
mov	edi, [esi+4]
movzx	ebx, bx
xor	ecx, ecx
sub	edi, ebx
jz	short loc_6298A8
lea	edx, ds:0[ebx*8]
lea	ecx, [ecx+0]

loc_629890:
mov	eax, [esi]
mov	ebp, [edx+eax]
mov	[eax+ecx*8], ebp
mov	ebp, [edx+eax+4]
mov	[eax+ecx*8+4], ebp
inc	ecx
add	edx, 8
cmp	ecx, edi
jb	short loc_629890

loc_6298A8:
sub	[esi+4], ebx

loc_6298AB:
mov	[esp+43Ch+var_4], 0FFFFFFFFh
cmp	[esp+43Ch+var_414], 0
jz	short loc_6298D4
cmp	[esp+43Ch+var_424], 2000h
jbe	short loc_6298D4
mov	eax, [esp+43Ch+var_418]
push	eax		; void *
call	_free
add	esp, 4

loc_6298D4:
mov	ecx, [esp+43Ch+var_C]
mov	eax, [esp+43Ch+var_430]
pop	edi
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 430h
retn	8
sub_629750 endp

align 10h



sub_629900 proc	near

var_C= word ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	ebp
push	esi
mov	esi, eax
xor	ebp, ebp
push	edi
cmp	[esi+8], ebp
jz	short loc_62993F
mov	eax, [esi]
cmp	eax, ebp
jz	short loc_629937
mov	ecx, [eax-4]
lea	edi, [eax-4]
push	offset nullsub_1
push	ecx
push	8
push	eax
call	$LN21_0
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_629937:
mov	[esi+8], ebp
mov	[esi], ebp
mov	[esi+4], ebp

loc_62993F:
lea	edx, [esp+20h+var_C]
push	edx		; void *
mov	eax, 10h
mov	ecx, ebx
call	sub_A496D0
mov	bp, [esp+20h+var_C]
xor	eax, eax
xor	edi, edi
mov	byte ptr [esp+20h+arg_0], 0
cmp	ax, bp
jnb	short loc_6299C5

loc_629963:
lea	ecx, [esp+20h+arg_0]
push	ecx
mov	ecx, ebx
call	sub_4E4E10
lea	edx, [esp+20h+var_8]
push	edx		; void *
mov	ecx, ebx
call	sub_51BC50
test	al, al
jz	short loc_6299A2
cmp	byte ptr [esp+20h+arg_0], 0
jnz	short loc_6299AE
lea	eax, [esp+20h+var_4]
push	eax		; void *
mov	ecx, ebx
call	sub_51BC50
test	al, al
jz	short loc_6299A2
mov	ecx, [esp+20h+var_4]
mov	eax, [esp+20h+var_8]
cmp	ecx, eax
jnb	short loc_6299B8

loc_6299A2:
xor	al, al
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4

loc_6299AE:
mov	eax, [esp+20h+var_8]
mov	ecx, eax
mov	[esp+20h+var_4], ecx

loc_6299B8:
push	ecx
push	eax
call	sub_62AD80
inc	edi
cmp	di, bp
jb	short loc_629963

loc_6299C5:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	4
sub_629900 endp

align 10h



sub_6299E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset SEH_6299E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
xor	esi, esi
mov	[esp+18h+var_4], esi
cmp	[edi+14h], esi
jz	short loc_629A16
push	edi
call	sub_62A430
mov	[edi+18h], esi
mov	[edi+14h], esi
mov	[edi+1Ch], esi

loc_629A16:
call	sub_62A0B0
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_62A0B0
mov	ecx, [esp+18h+var_C]
pop	edi
mov	large fs:0, ecx
pop	esi
add	esp, 10h
retn	4
sub_6299E0 endp

align 10h



sub_629A40 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	edi
mov	edi, [esi+14h]
xor	ebx, ebx
cmp	edi, ebx
jnz	short loc_629A5E

loc_629A53:
pop	edi
pop	ebp
xor	al, al
pop	ebx
add	esp, 10h
retn	4

loc_629A5E:
mov	[esp+1Ch+var_4], ebx
mov	byte ptr [esp+1Ch+arg_0], bl
cmp	edi, [esi+18h]
jnz	short loc_629AB6
lea	ecx, [esp+1Ch+var_10]
push	ecx
push	eax
call	sub_62A560
test	al, al
jz	short loc_629A53
mov	eax, [esi+14h]
mov	edx, [esp+1Ch+var_10]
mov	ecx, [eax+edx*4+88h]
mov	[ebp+0], ecx
mov	eax, [esi+14h]
call	sub_62A3C0
mov	ecx, [esi+14h]
cmp	[ecx+4], ebx
jnz	short loc_629AF0
mov	edi, esi
call	sub_62AB20
dec	dword ptr [esi+1Ch]
pop	edi
pop	ebp
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	al, 1
pop	ebx
add	esp, 10h
retn	4

loc_629AB6:
mov	ecx, [edi+8]
push	ebp
lea	edx, [esp+20h+var_C]
push	edx
push	ecx
lea	edx, [esp+28h+arg_0]
push	edx
push	edi
push	eax
mov	ecx, esi
call	sub_62A890
test	al, al
jz	short loc_629A53
cmp	byte ptr [esp+1Ch+arg_0], bl
jz	short loc_629AF0
mov	ecx, [esi+14h]
cmp	[ecx+4], ebx
jnz	short loc_629AF0
mov	eax, [ecx+110h]
mov	edi, esi
mov	[esi+14h], eax
call	sub_62AB20

loc_629AF0:
dec	dword ptr [esi+1Ch]
pop	edi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	4
sub_629A40 endp

align 10h



sub_629B00 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
push	edi
mov	edi, eax
mov	eax, [esi+14h]
test	eax, eax
jnz	short loc_629B63
push	esi
call	sub_62AA00
mov	[esi+14h], eax
mov	byte ptr [eax],	1
mov	eax, [esi+14h]
mov	[esi+18h], eax
mov	dword ptr [eax+4], 1
mov	eax, [esi+14h]
mov	[eax+8], ebp
mov	edx, [edi]
mov	ecx, [esi+14h]
mov	[ecx+88h], edx
mov	eax, [esi+14h]
mov	dword ptr [eax+108h], 0
mov	ecx, [esi+14h]
pop	edi
mov	dword ptr [ecx+10Ch], 0
inc	dword ptr [esi+1Ch]
mov	al, 1
pop	ebp
add	esp, 0Ch
retn	4

loc_629B63:
lea	edx, [esp+14h+arg_0]
push	edx
lea	ecx, [esp+18h+var_C]
push	ecx
push	eax
push	edi
push	ebp
mov	ecx, esi
mov	byte ptr [esp+28h+arg_0], 1
mov	[esp+28h+var_4], 0
call	sub_62A5E0
cmp	byte ptr [esp+14h+arg_0], 0
mov	edi, eax
jnz	short loc_629B97
pop	edi
xor	al, al
pop	ebp
add	esp, 0Ch
retn	4

loc_629B97:
test	edi, edi
jz	short loc_629BEF
cmp	byte ptr [edi],	0
jnz	short loc_629BC7
cmp	[esp+14h+var_4], 2
jz	short loc_629BBE
push	351h		; Line
push	offset aZLwo7_buildB_3 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aReturnaction_a ; "returnAction.action==ReturnAction::PUSH"...
call	__wassert
add	esp, 0Ch

loc_629BBE:
mov	ebp, [esp+14h+var_C]
dec	dword ptr [edi+4]
jmp	short loc_629BCA

loc_629BC7:
mov	ebp, [edi+8]

loc_629BCA:
push	esi
call	sub_62AA00
mov	byte ptr [eax],	0
mov	dword ptr [eax+4], 1
mov	[eax+8], ebp
mov	edx, [esi+14h]
mov	[eax+110h], edx
mov	[eax+114h], edi
mov	[esi+14h], eax

loc_629BEF:
inc	dword ptr [esi+1Ch]
pop	edi
mov	al, 1
pop	ebp
add	esp, 0Ch
retn	4
sub_629B00 endp

align 10h



sub_629C00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, eax
cmp	dword ptr [esi+4], 0
jnz	short loc_629C19
pop	esi
mov	byte ptr [ebp+0], 0
xor	eax, eax
pop	ebp
retn	8

loc_629C19:
mov	eax, [esi+4]
mov	esi, [esi]
push	ebx
push	edi
lea	edi, [eax-1]
cdq
sub	eax, edx
mov	edx, [esp+10h+arg_0]
movzx	ebx, word ptr [edx]
xor	ecx, ecx
sar	eax, 1

loc_629C31:
mov	edx, [esi+eax*4]
mov	edx, [edx+8]
mov	edx, [edx]
movzx	edx, word ptr [edx+20h]
cmp	bx, dx
jb	short loc_629C63
jz	short loc_629C68
lea	ecx, [eax+1]

loc_629C47:
mov	eax, edi
sub	eax, ecx
cdq
sub	eax, edx
sar	eax, 1
add	eax, ecx
cmp	ecx, edi
jle	short loc_629C31
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 0
mov	eax, ecx
pop	ebp
retn	8

loc_629C63:
lea	edi, [eax-1]
jmp	short loc_629C47

loc_629C68:
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 1
pop	ebp
retn	8
sub_629C00 endp

align 10h



sub_629C80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	eax, esi
call	sub_629C00
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_629CBF
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_629CBF:
cmp	edi, [esi+4]
jb	short loc_629CD6
mov	edx, [ebx]
push	edx
call	sub_62B940
mov	eax, [esi+4]
pop	edi
pop	esi
dec	eax
pop	ebx
retn	4

loc_629CD6:
mov	eax, [ebx]
push	edi
push	eax
call	sub_624330
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_629C80 endp

align 10h



sub_629CF0 proc	near
cmp	dword ptr [esi+0Ch], 0
push	edi
mov	edi, eax
jnz	short loc_629D29
push	80h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi], eax
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 1
mov	ecx, [edi]
mov	[eax], ecx
mov	edx, [edi+4]
add	esp, 4
mov	[eax+4], edx
mov	dword ptr [esi+0Ch], 10h
pop	edi
retn

loc_629D29:
mov	ecx, [esi+8]
mov	edx, [edi]
mov	eax, [esi]
mov	[eax+ecx*8], edx
mov	edx, [edi+4]
mov	[eax+ecx*8+4], edx
inc	dword ptr [esi+8]
mov	ecx, [esi+8]
mov	eax, [esi+0Ch]
cmp	ecx, eax
jnz	short loc_629D4E
mov	dword ptr [esi+8], 0

loc_629D4E:
mov	ecx, [esi+8]
cmp	ecx, [esi+4]
jnz	short loc_629DC2
xor	ecx, ecx
add	eax, eax
mov	edx, 8
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edi, eax
add	esp, 4
test	edi, edi
jz	short loc_629DC2
xor	ecx, ecx
cmp	[esi+0Ch], ecx
jbe	short loc_629DA2
push	ebx
nop

loc_629D80:
mov	eax, [esi+4]
add	eax, ecx
xor	edx, edx
div	dword ptr [esi+0Ch]
mov	eax, [esi]
inc	ecx
mov	ebx, [eax+edx*8]
mov	[edi+ecx*8-8], ebx
mov	eax, [eax+edx*8+4]
mov	[edi+ecx*8-4], eax
cmp	ecx, [esi+0Ch]
jb	short loc_629D80
pop	ebx

loc_629DA2:
mov	eax, [esi+0Ch]
mov	edx, [esi]
lea	ecx, [eax+eax]
push	edx		; void *
mov	dword ptr [esi+4], 0
mov	[esi+8], eax
mov	[esi+0Ch], ecx
call	??3@YAXPAX@Z	; operator delete(void *)
mov	[esi], edi
add	esp, 4

loc_629DC2:
pop	edi
retn
sub_629CF0 endp

align 10h



sub_629DD0 proc	near
cmp	dword ptr [esi+0Ch], 0
jz	locret_629E77
push	ebx
push	ebp
push	edi
mov	eax, esi
mov	ebp, 1
call	sub_623AA0
cmp	eax, ebp
jb	short loc_629DF6
lea	ecx, [ecx+0]

loc_629DF0:
add	ebp, ebp
cmp	ebp, eax
jbe	short loc_629DF0

loc_629DF6:
xor	ecx, ecx
mov	eax, ebp
mov	edx, 8
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebx, eax
add	esp, 4
mov	eax, esi
xor	edi, edi
call	sub_623AA0
test	eax, eax
jbe	short loc_629E47

loc_629E20:
mov	eax, [esi+4]
add	eax, edi
xor	edx, edx
div	dword ptr [esi+0Ch]
mov	eax, [esi]
inc	edi
mov	ecx, [eax+edx*8]
mov	[ebx+edi*8-8], ecx
mov	edx, [eax+edx*8+4]
mov	[ebx+edi*8-4], edx
mov	eax, esi
call	sub_623AA0
cmp	edi, eax
jb	short loc_629E20

loc_629E47:
mov	ecx, [esi+4]
mov	eax, [esi+8]
cmp	ecx, eax
ja	short loc_629E55
sub	eax, ecx
jmp	short loc_629E5A

loc_629E55:
sub	eax, ecx
add	eax, [esi+0Ch]

loc_629E5A:
mov	[esi+8], eax
mov	eax, [esi]
push	eax		; void *
mov	[esi+0Ch], ebp
mov	dword ptr [esi+4], 0
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	edi
pop	ebp
mov	[esi], ebx
pop	ebx

locret_629E77:
retn
sub_629DD0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12E7718

loc_629E80:
cmp	dword ptr [eax+8], 0
jbe	short locret_629E8F
mov	eax, [eax]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

locret_629E8F:
retn
; END OF FUNCTION CHUNK	FOR sub_12E7718


; Attributes: thunk

sub_629E90 proc	near
jmp	sub_62A0B0
sub_629E90 endp

align 10h



sub_629EA0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	dword ptr [ebx+8], 0
push	esi
push	edi
jle	loc_629F59
mov	esi, [ebx]
mov	edx, [esi]
or	ecx, 0FFFFFFFFh
add	[esi+4], ecx
mov	eax, [esi+4]
mov	edi, [edx+eax*4]
jnz	short loc_629F2F
add	[ebx+8], ecx
mov	eax, [esi+0Ch]
mov	[ebx], eax
jz	short loc_629EE7
cmp	dword ptr [eax+4], 0
jg	short loc_629EE7
push	69h		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepag_0 ; "availablePagesSize==0	|| availablePages"...
call	__wassert
add	esp, 0Ch

loc_629EE7:
mov	eax, [esi+0Ch]
mov	ecx, [esi+10h]
mov	[eax+10h], ecx
mov	eax, [esi+0Ch]
mov	edx, [esi+10h]
mov	[edx+0Ch], eax
mov	eax, [ebx+0Ch]
lea	ecx, [eax+1]
mov	[ebx+0Ch], ecx
test	eax, eax
jnz	short loc_629F11
mov	[ebx+4], esi
mov	[esi+0Ch], esi
mov	[esi+10h], esi
jmp	short loc_629F2F

loc_629F11:
mov	edx, [ebx+4]
mov	[esi+0Ch], edx
mov	eax, [ebx+4]
mov	ecx, [eax+10h]
mov	[esi+10h], ecx
mov	edx, [ebx+4]
mov	eax, [edx+10h]
mov	[eax+0Ch], esi
mov	ecx, [ebx+4]
mov	[ecx+10h], esi

loc_629F2F:
cmp	dword ptr [ebx+8], 0
jz	short loc_629F51
mov	edx, [ebx]
cmp	dword ptr [edx+4], 0
jg	short loc_629F51
push	7Ch		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepag_0 ; "availablePagesSize==0	|| availablePages"...
call	__wassert
add	esp, 0Ch

loc_629F51:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_629F59:		; size_t
push	14h
call	off_169276C
add	esp, 4
mov	[ebx], eax
test	eax, eax
jnz	short loc_629F72

loc_629F6A:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4

loc_629F72:
mov	edi, eax
push	edi
mov	esi, 1
push	ebx
mov	[ebx+8], esi
call	sub_62AC10
test	al, al
jz	short loc_629F6A
mov	eax, [ebx]
cmp	[eax+4], esi
jg	short loc_629FA5
push	86h		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepag_1 ; "availablePages->availableStackSize>1"
call	__wassert
add	esp, 0Ch

loc_629FA5:
mov	eax, [ebx]
dec	dword ptr [eax+4]
mov	ebx, [ebx]
mov	ecx, [ebx+4]
mov	edx, [ebx]
mov	eax, [edx+ecx*4]
pop	edi
pop	esi
pop	ebx
retn	4
sub_629EA0 endp

align 10h



sub_629FC0 proc	near
push	esi
mov	esi, [ecx+50h]
mov	eax, [esi+4]
test	eax, eax
jnz	short loc_62A02D
mov	eax, [esi]
mov	[eax], ecx
inc	dword ptr [esi+4]
dec	dword ptr [edi+0Ch]
mov	ecx, [esi+0Ch]
mov	edx, [esi+10h]
mov	[ecx+10h], edx
mov	eax, [esi+10h]
mov	ecx, [esi+0Ch]
mov	[eax+0Ch], ecx
cmp	dword ptr [edi+0Ch], 0
jle	short loc_629FFA
mov	eax, [edi+4]
cmp	esi, eax
jnz	short loc_629FFA
mov	edx, [eax+0Ch]
mov	[edi+4], edx

loc_629FFA:
mov	eax, [edi+8]
lea	ecx, [eax+1]
mov	[edi+8], ecx
test	eax, eax
jnz	short loc_62A011
mov	[edi], esi
mov	[esi+0Ch], esi
mov	[esi+10h], esi
pop	esi
retn

loc_62A011:
mov	edx, [edi]
mov	[esi+0Ch], edx
mov	eax, [edi]
mov	ecx, [eax+10h]
mov	[esi+10h], ecx
mov	edx, [edi]
mov	eax, [edx+10h]
mov	[eax+0Ch], esi
mov	ecx, [edi]
mov	[ecx+10h], esi
pop	esi
retn

loc_62A02D:
mov	edx, [esi]
mov	[edx+eax*4], ecx
inc	dword ptr [esi+4]
mov	ecx, [esi+4]
mov	eax, 0BA2E8BA3h
mul	dword ptr [edi+10h]
shr	edx, 6
cmp	ecx, edx
jnz	short loc_62A0A5
cmp	dword ptr [edi+8], 4
jl	short loc_62A0A5
cmp	esi, [edi]
jnz	short loc_62A073
mov	eax, [esi+0Ch]
mov	[edi], eax
cmp	dword ptr [eax+4], 0
jg	short loc_62A073
push	0BCh		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepages ; "availablePages->availableStackSize>0"
call	__wassert
add	esp, 0Ch

loc_62A073:
mov	eax, [esi+10h]
mov	ecx, [esi+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [esi+0Ch]
mov	eax, [esi+10h]
mov	[edx+10h], eax
dec	dword ptr [edi+8]
mov	ecx, [esi]
push	ecx		; void *
call	off_1692BF0
mov	edx, [esi+8]
push	edx		; void *
call	off_1692BF0
push	esi		; void *
call	off_1692BF0
add	esp, 0Ch

loc_62A0A5:
pop	esi
retn
sub_629FC0 endp

align 10h



sub_62A0B0 proc	near
push	ebx
xor	ebx, ebx
cmp	[edi+8], ebx
push	esi
jle	short loc_62A110
mov	esi, [edi]
mov	eax, [esi]
push	eax		; void *
call	off_1692BF0
mov	ecx, [esi+8]
push	ecx		; void *
call	off_1692BF0
mov	eax, esi
mov	esi, [esi+0Ch]
add	esp, 8
cmp	esi, [edi]
jz	short loc_62A106
lea	ebx, [ebx+0]

loc_62A0E0:		; void *
push	eax
call	off_1692BF0
mov	edx, [esi]
push	edx		; void *
call	off_1692BF0
mov	eax, [esi+8]
push	eax		; void *
call	off_1692BF0
mov	eax, esi
mov	esi, [esi+0Ch]
add	esp, 0Ch
cmp	esi, [edi]
jnz	short loc_62A0E0

loc_62A106:		; void *
push	eax
call	off_1692BF0
add	esp, 4

loc_62A110:
cmp	[edi+0Ch], ebx
jle	short loc_62A169
mov	esi, [edi+4]
mov	ecx, [esi]
push	ecx		; void *
call	off_1692BF0
mov	edx, [esi+8]
push	edx		; void *
call	off_1692BF0
mov	eax, esi
mov	esi, [esi+0Ch]
add	esp, 8
cmp	esi, [edi+4]
jz	short loc_62A15F

loc_62A138:		; void *
push	eax
call	off_1692BF0
mov	eax, [esi]
push	eax		; void *
call	off_1692BF0
mov	ecx, [esi+8]
push	ecx		; void *
call	off_1692BF0
mov	eax, esi
mov	esi, [esi+0Ch]
add	esp, 0Ch
cmp	esi, [edi+4]
jnz	short loc_62A138

loc_62A15F:		; void *
push	eax
call	off_1692BF0
add	esp, 4

loc_62A169:
pop	esi
mov	[edi+0Ch], ebx
mov	[edi+8], ebx
pop	ebx
retn
sub_62A0B0 endp

align 10h



sub_62A180 proc	near
mov	eax, [esi]
push	0Ch		; size_t
test	eax, eax
jnz	short loc_62A1B0
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi+4], eax
mov	ecx, [edi]
mov	[eax], ecx
mov	eax, [esi+4]
mov	[eax+8], eax
mov	eax, [esi+4]
mov	[eax+4], eax
mov	eax, [esi+4]
add	esp, 4
mov	dword ptr [esi], 1
mov	[esi+8], eax
retn

loc_62A1B0:
cmp	eax, 1
jnz	short loc_62A1F5
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esi+4]
mov	[esi+8], eax
mov	[edx+8], eax
mov	ecx, [esi+8]
mov	eax, [esi+4]
mov	[eax+4], ecx
mov	edx, [esi+8]
mov	eax, [esi+4]
mov	[edx+4], eax
mov	ecx, [esi+8]
mov	edx, [esi+4]
mov	[ecx+8], edx
mov	eax, [esi+8]
mov	ecx, [edi]
mov	[eax], ecx
mov	eax, [esi+4]
add	esp, 4
mov	dword ptr [esi], 2
mov	[esi+8], eax
retn

loc_62A1F5:		; operator new(uint)
call	??2@YAPAXI@Z
mov	edx, [edi]
mov	[eax], edx
mov	ecx, [esi+8]
mov	[eax+4], ecx
mov	edx, [esi+8]
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [esi+8]
mov	ecx, [edx+8]
mov	[ecx+4], eax
mov	edx, [esi+8]
mov	[edx+8], eax
inc	dword ptr [esi]
add	esp, 4
retn
sub_62A180 endp

align 10h



sub_62A230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, eax
cmp	dword ptr [esi+4], 0
jnz	short loc_62A249
pop	esi
mov	byte ptr [ebp+0], 0
xor	eax, eax
pop	ebp
retn	8

loc_62A249:
mov	eax, [esi+4]
mov	esi, [esi]
push	ebx
push	edi
lea	edi, [eax-1]
cdq
sub	eax, edx
mov	edx, [esp+10h+arg_0]
mov	ebx, [edx]
xor	ecx, ecx
sar	eax, 1

loc_62A260:
mov	edx, [esi+eax*4]
mov	edx, [edx+24h]
cmp	ebx, edx
jb	short loc_62A28B
jz	short loc_62A290
lea	ecx, [eax+1]

loc_62A26F:
mov	eax, edi
sub	eax, ecx
cdq
sub	eax, edx
sar	eax, 1
add	eax, ecx
cmp	ecx, edi
jle	short loc_62A260
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 0
mov	eax, ecx
pop	ebp
retn	8

loc_62A28B:
lea	edi, [eax-1]
jmp	short loc_62A26F

loc_62A290:
pop	edi
pop	ebx
pop	esi
mov	byte ptr [ebp+0], 1
pop	ebp
retn	8
sub_62A230 endp

align 10h



sub_62A2A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_62A2A0
push	eax
mov	large fs:0, esp
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	[esp+14h+var_4], 0
cmp	dword ptr [esi+8], 0
jz	short loc_62A300
mov	eax, [esi]
test	eax, eax
jz	short loc_62A2EC
mov	ecx, [eax-4]
lea	edi, [eax-4]
push	offset nullsub_1
push	ecx
push	8
push	eax
call	$LN21_0
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62A2EC:
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0

loc_62A300:
mov	[esp+14h+var_4], 0FFFFFFFFh
cmp	dword ptr [esi+8], 0
jbe	short loc_62A331
mov	esi, [esi]
test	esi, esi
jz	short loc_62A331
mov	edx, [esi-4]
push	offset nullsub_1
lea	edi, [esi-4]
push	edx
push	8
push	esi
call	$LN21_0
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62A331:
mov	ecx, [esp+14h+var_C]
pop	edi
mov	large fs:0, ecx
pop	esi
add	esp, 0Ch
retn	4
sub_62A2A0 endp

align 10h



sub_62A350 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	eax, esi
call	sub_624060
cmp	byte ptr [esp+0Ch+arg_0], 0
mov	edi, eax
jz	short loc_62A38F
push	0B2h		; Line
push	offset File	; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset Message	; "assertOnDuplicate==false"
call	__wassert
add	esp, 0Ch
or	eax, 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	4

loc_62A38F:
cmp	edi, [esi+4]
jb	short loc_62A3AA
mov	edx, [ebx+4]
mov	eax, [ebx]
push	edx
push	eax
call	sub_62AD80
mov	eax, [esi+4]
dec	eax
pop	edi
pop	esi
pop	ebx
retn	4

loc_62A3AA:
mov	ecx, [ebx+4]
mov	edx, [ebx]
push	edi
push	ecx
push	edx
call	sub_62AE90
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_62A350 endp

align 10h



sub_62A3C0 proc	near
mov	ecx, [eax+4]
dec	ecx
cmp	edx, ecx
push	esi
mov	esi, edx
jge	short loc_62A3E2
lea	ecx, [eax+edx*4+8]
push	edi

loc_62A3D0:
mov	edi, [ecx+4]
mov	[ecx], edi
mov	edi, [eax+4]
inc	esi
dec	edi
add	ecx, 4
cmp	esi, edi
jl	short loc_62A3D0
pop	edi

loc_62A3E2:
mov	ecx, [eax+4]
dec	ecx
cmp	byte ptr [eax],	0
jz	short loc_62A40C
cmp	edx, ecx
jge	short loc_62A428
lea	ecx, [eax+edx*4+88h]

loc_62A3F6:
mov	esi, [ecx+4]
mov	[ecx], esi
mov	esi, [eax+4]
inc	edx
dec	esi
add	ecx, 4
cmp	edx, esi
jl	short loc_62A3F6
dec	dword ptr [eax+4]
pop	esi
retn

loc_62A40C:
cmp	edx, ecx
jge	short loc_62A428
lea	ecx, [eax+edx*4+114h]

loc_62A417:
mov	esi, [ecx+4]
mov	[ecx], esi
mov	esi, [eax+4]
inc	edx
dec	esi
add	ecx, 4
cmp	edx, esi
jl	short loc_62A417

loc_62A428:
dec	dword ptr [eax+4]
pop	esi
retn
sub_62A3C0 endp

align 10h


; Attributes: bp-based frame

sub_62A430 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset SEH_62A430
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
xor	ecx, ecx
mov	eax, 10h
mov	[esp+24h+var_14], eax
mov	edx, 4
mul	edx
seto	cl
push	ebx
push	esi
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esp+34h+var_20], eax
xor	eax, eax
add	esp, 4
mov	[esp+30h+var_1C], eax
mov	[esp+30h+var_18], eax
mov	[esp+30h+var_4], eax
mov	eax, [ebp+arg_0]
add	eax, 14h
lea	esi, [esp+30h+var_20]
call	sub_62B710
mov	esi, [esp+30h+var_1C]
jmp	short loc_62A4A0
align 10h

loc_62A4A0:
mov	eax, [esp+30h+var_18]
mov	ecx, [esp+30h+var_14]
cmp	esi, eax
ja	short loc_62A4B0
sub	eax, esi
jmp	short loc_62A4B4

loc_62A4B0:
sub	eax, esi
add	eax, ecx

loc_62A4B4:
test	eax, eax
jz	short loc_62A52E
inc	esi
mov	[esp+30h+var_1C], esi
cmp	esi, ecx
jnz	short loc_62A4D1
mov	eax, [esp+30h+var_20]
mov	edi, [eax+ecx*4-4]
xor	esi, esi
mov	[esp+30h+var_1C], esi
jmp	short loc_62A4E7

loc_62A4D1:
test	esi, esi
jnz	short loc_62A4DF
mov	eax, [esp+30h+var_20]
mov	edi, [eax+ecx*4-4]
jmp	short loc_62A4E7

loc_62A4DF:
mov	ecx, [esp+30h+var_20]
mov	edi, [ecx+esi*4-4]

loc_62A4E7:
cmp	byte ptr [edi],	0
jnz	short loc_62A51F
mov	edx, [edi+4]
inc	edx
xor	ebx, ebx
test	edx, edx
jle	short loc_62A51F
lea	eax, [edi+110h]
mov	[esp+30h+var_24], eax

loc_62A500:
mov	eax, [esp+30h+var_24]
lea	esi, [esp+30h+var_20]
call	sub_62B710
mov	ecx, [edi+4]
add	[esp+30h+var_24], 4
inc	ebx
inc	ecx
cmp	ebx, ecx
jl	short loc_62A500
mov	esi, [esp+30h+var_1C]

loc_62A51F:
mov	ecx, edi
mov	edi, [ebp+arg_0]
call	sub_62AB20
jmp	loc_62A4A0

loc_62A52E:
test	ecx, ecx
jbe	short loc_62A53F
mov	edx, [esp+30h+var_20]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62A53F:
mov	ecx, [esp+30h+var_C]
pop	edi
pop	esi
mov	large fs:0, ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_62A430 endp

align 10h



sub_62A560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	dword ptr [edi+4], 0
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
jg	short loc_62A584
push	395h		; Line
push	offset aZLwo7_buildB_3 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aPageSize0 ; "page->size>0"
call	__wassert
add	esp, 0Ch

loc_62A584:
mov	eax, [edi+4]
lea	ebx, [eax-1]
cdq
sub	eax, edx
sar	eax, 1
mov	ecx, [edi+eax*4+8]
xor	esi, esi
cmp	ebp, ecx
jz	short loc_62A5BA

loc_62A599:
jnb	short loc_62A5A0
lea	ebx, [eax-1]
jmp	short loc_62A5A3

loc_62A5A0:
lea	esi, [eax+1]

loc_62A5A3:
mov	eax, ebx
sub	eax, esi
cdq
sub	eax, edx
sar	eax, 1
add	eax, esi
cmp	esi, ebx
jg	short loc_62A5C8
mov	ecx, [edi+eax*4+8]
cmp	ebp, ecx
jnz	short loc_62A599

loc_62A5BA:
mov	ecx, [esp+0Ch+arg_4]
pop	esi
pop	ebp
mov	[ecx], eax
mov	al, 1
pop	ebx
retn	8

loc_62A5C8:
mov	edx, [esp+0Ch+arg_4]
mov	[edx], esi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	8
sub_62A560 endp

align 10h



sub_62A5E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
mov	ebp, [esp+0Ch+arg_8]
push	esi
push	edi
lea	eax, [esp+14h+arg_0]
push	eax
push	ebx
mov	edi, ebp
mov	[esp+1Ch+var_4], ecx
call	sub_62A560
mov	ecx, [esp+14h+arg_0]
lea	esi, [ecx+1]
test	al, al
jnz	short loc_62A60B
mov	esi, ecx

loc_62A60B:
cmp	byte ptr [ebp+0], 0
jnz	loc_62A85A
mov	eax, [ebp+esi*4+110h]
cmp	byte ptr [eax],	1
jnz	loc_62A7BD
mov	edx, 20h
cmp	[eax+4], edx
jnz	loc_62A7BD
inc	ecx
cmp	esi, ecx
jnz	short loc_62A649
mov	ecx, [esp+14h+arg_10]
mov	byte ptr [ecx],	0

loc_62A63F:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	14h

loc_62A649:
test	esi, esi
jle	loc_62A708
mov	ecx, [ebp+esi*4+10Ch]
cmp	[ecx+4], edx
jge	loc_62A708
mov	edx, [esp+14h+arg_C]
mov	dword ptr [edx+8], 1
mov	ecx, [ebp+esi*4+110h]
cmp	ebx, [ecx+8]
jbe	short loc_62A6B5
push	edx
push	ebp
mov	edi, esi
call	sub_62B030
mov	edi, [ebp+esi*4+110h]
lea	edx, [esp+14h+arg_C]
push	edx
push	ebx
call	sub_62A560
mov	eax, [ebp+esi*4+110h]
mov	ecx, [esp+14h+arg_C]
mov	edx, [esp+14h+arg_4]
push	0
push	eax
push	0
push	ecx
mov	ecx, [esp+24h+var_4]
push	edx
push	ebx
call	sub_62B0C0
jmp	short loc_62A6F0

loc_62A6B5:
mov	eax, [ebp+esi*4+10Ch]
mov	edi, [ecx+8]
mov	[edx], edi
mov	[edx+4], ebx
mov	edx, [eax+4]
mov	edi, [ecx+8]
mov	[eax+edx*4+8], edi
mov	edx, [eax+4]
mov	edi, [ecx+88h]
mov	[eax+edx*4+88h], edi
inc	dword ptr [eax+4]
mov	eax, [esp+14h+arg_4]
mov	[ecx+8], ebx
mov	edx, [eax]
mov	[ecx+88h], edx

loc_62A6F0:
mov	eax, [ebp+esi*4+110h]
mov	ecx, [eax+8]
pop	edi
mov	[ebp+esi*4+4], ecx
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	14h

loc_62A708:
cmp	esi, [ebp+4]
jge	loc_62A7BD
mov	ecx, [ebp+esi*4+114h]
cmp	[ecx+4], edx
jge	loc_62A7BD
mov	edi, [esp+14h+arg_C]
mov	dword ptr [edi+8], 1
mov	eax, [ebp+esi*4+110h]
mov	edx, [eax+4]
cmp	ebx, [eax+edx*4+4]
jnb	short loc_62A779
push	edi
push	ebp
mov	edi, esi
call	sub_62AFB0
mov	edi, [ebp+esi*4+110h]
lea	eax, [esp+14h+arg_C]
push	eax
push	ebx
call	sub_62A560
mov	ecx, [ebp+esi*4+110h]
mov	edx, [esp+14h+arg_C]
mov	eax, [esp+14h+arg_4]
push	0
push	ecx
mov	ecx, [esp+1Ch+var_4]
push	0
push	edx
push	eax
push	ebx
call	sub_62B0C0
jmp	short loc_62A7A5

loc_62A779:
mov	ecx, [ebp+esi*4+114h]
mov	edx, [ecx+8]
mov	ecx, [esp+14h+arg_4]
push	0
mov	[edi], edx
mov	eax, [ebp+esi*4+114h]
push	eax
push	0
push	0
push	ecx
mov	ecx, [esp+28h+var_4]
push	ebx
call	sub_62B0C0
mov	[edi+4], ebx

loc_62A7A5:
mov	edx, [ebp+esi*4+114h]
mov	eax, [edx+8]
pop	edi
mov	[ebp+esi*4+8], eax
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	14h

loc_62A7BD:
mov	ecx, [esp+14h+arg_10]
mov	edi, [esp+14h+arg_C]
mov	edx, [esp+14h+arg_4]
push	ecx
mov	ecx, [esp+18h+var_4]
push	edi
push	eax
push	edx
push	ebx
call	sub_62A5E0
cmp	dword ptr [edi+8], 1
mov	ebx, eax
jnz	short loc_62A7F2
test	esi, esi
jle	short loc_62A7F2
mov	eax, [ebp+esi*4+4]
cmp	eax, [edi]
jnz	short loc_62A7F2
mov	ecx, [edi+4]
mov	[ebp+esi*4+4], ecx

loc_62A7F2:
test	ebx, ebx
jz	loc_62A63F
cmp	byte ptr [ebx],	0
jnz	short loc_62A83C
cmp	dword ptr [edi+8], 2
jz	short loc_62A81C
push	31Bh		; Line
push	offset aZLwo7_buildB_3 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aReturnactionAc ; "returnAction->action==ReturnAction::PUS"...
call	__wassert
add	esp, 0Ch

loc_62A81C:
mov	edx, [esp+14h+arg_4]
dec	dword ptr [ebx+4]
mov	eax, [edi]
mov	ecx, [esp+14h+var_4]
push	edi
push	ebp
push	ebx
push	esi
push	edx
push	eax
call	sub_62B0C0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	14h

loc_62A83C:
mov	ecx, [esp+14h+arg_4]
mov	edx, [ebx+8]
push	edi
push	ebp
push	ebx
push	esi
push	ecx
mov	ecx, [esp+28h+var_4]
push	edx
call	sub_62B0C0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	14h

loc_62A85A:
inc	ecx
cmp	esi, ecx
jnz	short loc_62A870
mov	eax, [esp+14h+arg_10]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax],	0
xor	eax, eax
pop	ebx
pop	ecx
retn	14h

loc_62A870:
mov	ecx, [esp+14h+arg_C]
mov	edx, [esp+14h+arg_4]
push	ecx
mov	ecx, [esp+18h+var_4]
push	ebp
push	0
push	esi
push	edx
push	ebx
call	sub_62B0C0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	14h
sub_62A5E0 endp




sub_62A890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ecx
push	ebx
mov	ebx, [esp+8+arg_4]
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
lea	eax, [esp+14h+arg_4]
push	eax
push	ebp
mov	edi, ebx
mov	[esp+1Ch+var_4], ecx
call	sub_62A560
mov	esi, [esp+14h+arg_4]
test	al, al
jz	short loc_62A8B7
inc	esi

loc_62A8B7:
mov	edi, [ebx+esi*4+110h]
cmp	byte ptr [edi],	0
jnz	loc_62A964
cmp	esi, [ebx+4]
jge	short loc_62A8D2
mov	eax, [ebx+esi*4+8]
jmp	short loc_62A8D6

loc_62A8D2:
mov	eax, [ebx+esi*4+4]

loc_62A8D6:
mov	ecx, [esp+14h+arg_14]
mov	ebp, [esp+14h+arg_10]
mov	edx, [esp+14h+arg_8]
push	ecx
mov	ecx, [esp+18h+var_4]
push	ebp
push	eax
mov	eax, [esp+20h+arg_0]
push	edx
push	edi
push	eax
call	sub_62A890
test	al, al
jnz	short loc_62A903

loc_62A8F9:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	18h

loc_62A903:
cmp	esi, [ebx+4]
jge	short loc_62A90E
mov	edx, [ebx+esi*4+8]
jmp	short loc_62A912

loc_62A90E:
mov	edx, [ebx+esi*4+4]

loc_62A912:
cmp	dword ptr [ebp+8], 3
jnz	short loc_62A937
mov	eax, [esp+14h+arg_4]
cmp	esi, eax
jz	short loc_62A937
mov	ecx, [ebp+0]
mov	dword ptr [ebp+8], 0
mov	[ebx+eax*4+8], ecx
cmp	esi, [ebx+4]
jge	short loc_62A95E
mov	edx, [ebx+esi*4+8]

loc_62A937:
mov	ecx, [esp+14h+arg_8]
cmp	byte ptr [ecx],	0
jz	short loc_62A954

loc_62A940:
mov	eax, [esp+14h+var_4]
push	ebp
push	ebx
push	eax
mov	eax, esi
call	sub_62B4A0
mov	ecx, [esp+14h+arg_8]
mov	[ecx], al

loc_62A954:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	18h

loc_62A95E:
mov	edx, [ebx+esi*4+4]
jmp	short loc_62A937

loc_62A964:
lea	edx, [esp+14h+arg_4]
push	edx
push	ebp
call	sub_62A560
test	al, al
jz	short loc_62A8F9
mov	eax, [ebx+esi*4+110h]
mov	edi, [esp+14h+arg_4]
mov	ecx, [eax+edi*4+88h]
mov	edx, [esp+14h+arg_14]
mov	[edx], ecx
mov	eax, [ebx+esi*4+110h]
mov	edx, edi
call	sub_62A3C0
mov	ebp, [esp+14h+arg_10]
test	edi, edi
jnz	short loc_62A9C8
test	esi, esi
jle	short loc_62A9B3
mov	eax, [ebx+esi*4+110h]
mov	ecx, [eax+8]
mov	[ebx+esi*4+4], ecx

loc_62A9B3:
jnz	short loc_62A9C8
mov	dword ptr [ebp+8], 3
mov	edx, [ebx+110h]
mov	eax, [edx+8]
mov	[ebp+0], eax

loc_62A9C8:
mov	ecx, [ebx+esi*4+110h]
cmp	dword ptr [ecx+4], 10h
jge	short loc_62A9E5
mov	edx, [esp+14h+arg_8]
mov	byte ptr [edx],	1
mov	edx, [esp+14h+arg_C]
jmp	loc_62A940

loc_62A9E5:
mov	eax, [esp+14h+arg_8]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax],	0
mov	al, 1
pop	ebx
pop	ecx
retn	18h
sub_62A890 endp

align 10h



sub_62AA00 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	dword ptr [ebx+8], 0
push	esi
push	edi
jle	loc_62AAB9
mov	esi, [ebx]
mov	edx, [esi]
or	ecx, 0FFFFFFFFh
add	[esi+4], ecx
mov	eax, [esi+4]
mov	edi, [edx+eax*4]
jnz	short loc_62AA8F
add	[ebx+8], ecx
mov	eax, [esi+0Ch]
mov	[ebx], eax
jz	short loc_62AA47
cmp	dword ptr [eax+4], 0
jg	short loc_62AA47
push	69h		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepag_0 ; "availablePagesSize==0	|| availablePages"...
call	__wassert
add	esp, 0Ch

loc_62AA47:
mov	eax, [esi+0Ch]
mov	ecx, [esi+10h]
mov	[eax+10h], ecx
mov	eax, [esi+0Ch]
mov	edx, [esi+10h]
mov	[edx+0Ch], eax
mov	eax, [ebx+0Ch]
lea	ecx, [eax+1]
mov	[ebx+0Ch], ecx
test	eax, eax
jnz	short loc_62AA71
mov	[ebx+4], esi
mov	[esi+0Ch], esi
mov	[esi+10h], esi
jmp	short loc_62AA8F

loc_62AA71:
mov	edx, [ebx+4]
mov	[esi+0Ch], edx
mov	eax, [ebx+4]
mov	ecx, [eax+10h]
mov	[esi+10h], ecx
mov	edx, [ebx+4]
mov	eax, [edx+10h]
mov	[eax+0Ch], esi
mov	ecx, [ebx+4]
mov	[ecx+10h], esi

loc_62AA8F:
cmp	dword ptr [ebx+8], 0
jz	short loc_62AAB1
mov	edx, [ebx]
cmp	dword ptr [edx+4], 0
jg	short loc_62AAB1
push	7Ch		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepag_0 ; "availablePagesSize==0	|| availablePages"...
call	__wassert
add	esp, 0Ch

loc_62AAB1:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_62AAB9:		; size_t
push	14h
call	off_169276C
add	esp, 4
mov	[ebx], eax
test	eax, eax
jnz	short loc_62AAD2

loc_62AACA:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4

loc_62AAD2:
mov	edi, eax
push	edi
mov	esi, 1
push	ebx
mov	[ebx+8], esi
call	sub_62B7D0
test	al, al
jz	short loc_62AACA
mov	eax, [ebx]
cmp	[eax+4], esi
jg	short loc_62AB05
push	86h		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepag_1 ; "availablePages->availableStackSize>1"
call	__wassert
add	esp, 0Ch

loc_62AB05:
mov	eax, [ebx]
dec	dword ptr [eax+4]
mov	ebx, [ebx]
mov	ecx, [ebx+4]
mov	edx, [ebx]
mov	eax, [edx+ecx*4]
pop	edi
pop	esi
pop	ebx
retn	4
sub_62AA00 endp

align 10h



sub_62AB20 proc	near
push	esi
mov	esi, [ecx+194h]
mov	eax, [esi+4]
test	eax, eax
jnz	short loc_62AB90
mov	eax, [esi]
mov	[eax], ecx
inc	dword ptr [esi+4]
dec	dword ptr [edi+0Ch]
mov	ecx, [esi+0Ch]
mov	edx, [esi+10h]
mov	[ecx+10h], edx
mov	eax, [esi+10h]
mov	ecx, [esi+0Ch]
mov	[eax+0Ch], ecx
cmp	dword ptr [edi+0Ch], 0
jle	short loc_62AB5D
mov	eax, [edi+4]
cmp	esi, eax
jnz	short loc_62AB5D
mov	edx, [eax+0Ch]
mov	[edi+4], edx

loc_62AB5D:
mov	eax, [edi+8]
lea	ecx, [eax+1]
mov	[edi+8], ecx
test	eax, eax
jnz	short loc_62AB74
mov	[edi], esi
mov	[esi+0Ch], esi
mov	[esi+10h], esi
pop	esi
retn

loc_62AB74:
mov	edx, [edi]
mov	[esi+0Ch], edx
mov	eax, [edi]
mov	ecx, [eax+10h]
mov	[esi+10h], ecx
mov	edx, [edi]
mov	eax, [edx+10h]
mov	[eax+0Ch], esi
mov	ecx, [edi]
mov	[ecx+10h], esi
pop	esi
retn

loc_62AB90:
mov	edx, [esi]
mov	[edx+eax*4], ecx
inc	dword ptr [esi+4]
mov	ecx, [esi+4]
mov	eax, 0A0A0A0A1h
mul	dword ptr [edi+10h]
shr	edx, 8
cmp	ecx, edx
jnz	short loc_62AC08
cmp	dword ptr [edi+8], 4
jl	short loc_62AC08
cmp	esi, [edi]
jnz	short loc_62ABD6
mov	eax, [esi+0Ch]
mov	[edi], eax
cmp	dword ptr [eax+4], 0
jg	short loc_62ABD6
push	0BCh		; Line
push	offset aZLwo7_buildB_0 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aAvailablepages ; "availablePages->availableStackSize>0"
call	__wassert
add	esp, 0Ch

loc_62ABD6:
mov	eax, [esi+10h]
mov	ecx, [esi+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [esi+0Ch]
mov	eax, [esi+10h]
mov	[edx+10h], eax
dec	dword ptr [edi+8]
mov	ecx, [esi]
push	ecx		; void *
call	off_1692BF0
mov	edx, [esi+8]
push	edx		; void *
call	off_1692BF0
push	esi		; void *
call	off_1692BF0
add	esp, 0Ch

loc_62AC08:
pop	esi
retn
sub_62AB20 endp

align 10h



sub_62AC10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+10h]
mov	eax, 0BA2E8BA3h
mul	ecx
push	esi
mov	esi, edx
push	ecx		; size_t
xor	ebx, ebx
shr	esi, 6
call	off_169276C
add	esp, 4
mov	[edi+8], eax
test	eax, eax
jz	short loc_62AC5D
lea	eax, ds:0[esi*4]
push	eax		; size_t
call	off_169276C
mov	ecx, [edi+8]
add	esp, 4
mov	[edi], eax
test	eax, eax
jnz	short loc_62AC65
push	ecx		; void *
call	off_1692BF0
add	esp, 4

loc_62AC5D:
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	8

loc_62AC65:
test	esi, esi
jle	short loc_62AC7E
lea	esp, [esp+0]

loc_62AC70:
mov	[ecx+50h], edi
mov	[eax+ebx*4], ecx
inc	ebx
add	ecx, 58h
cmp	ebx, esi
jl	short loc_62AC70

loc_62AC7E:
mov	eax, [esp+0Ch+arg_4]
mov	[edi+4], esi
mov	edx, [ebp+0]
pop	esi
pop	ebp
mov	[edi+10h], eax
mov	[edi+0Ch], edx
mov	al, 1
pop	ebx
retn	8
sub_62AC10 endp

align 10h



sub_62ACA0 proc	near
mov	eax, [esi]
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_62ACF8
cmp	eax, 1
jnz	short loc_62ACC4
mov	eax, [esi+4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi+4], edi
mov	[esi], edi
mov	[esi+8], edi
pop	edi
retn

loc_62ACC4:
mov	eax, [esi+8]
mov	ecx, [eax+4]
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [esi+8]
mov	ecx, [eax+8]
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	eax, [esi+8]
mov	edi, [eax+8]
cmp	eax, [esi+4]
jnz	short loc_62ACEA
mov	[esi+4], edi

loc_62ACEA:		; void *
push	eax
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
dec	dword ptr [esi]
mov	[esi+8], edi

loc_62ACF8:
pop	edi
retn
sub_62ACA0 endp

align 10h



sub_62AD00 proc	near
mov	eax, [edi]
test	eax, eax
jz	short locret_62AD48
cmp	eax, 1
jnz	short loc_62AD19
mov	eax, [edi+4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_62AD34

loc_62AD19:
push	esi
mov	esi, [edi+4]
lea	ecx, [ecx+0]

loc_62AD20:
mov	eax, esi
mov	esi, [esi+8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
cmp	esi, [edi+4]
jnz	short loc_62AD20
pop	esi

loc_62AD34:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	dword ptr [edi+8], 0

locret_62AD48:
retn
sub_62AD00 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12FF5B0

loc_62AD50:
cmp	dword ptr [eax+8], 0
jbe	short locret_62AD7B
mov	eax, [eax]
test	eax, eax
jz	short locret_62AD7B
mov	ecx, [eax-4]
push	esi
lea	esi, [eax-4]
push	offset nullsub_1
push	ecx
push	8
push	eax
call	$LN21_0
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi

locret_62AD7B:
retn
; END OF FUNCTION CHUNK	FOR sub_12FF5B0
align 10h



sub_62AD80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset SEH_40CEA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	eax, [esi+8]
cmp	[esi+4], eax
jnz	loc_62AE5F
test	eax, eax
jnz	short loc_62ADAF
mov	dword ptr [esi+8], 10h
jmp	short loc_62ADB4

loc_62ADAF:
add	eax, eax
mov	[esi+8], eax

loc_62ADB4:
push	ebp
mov	ebp, [esi+8]
xor	ecx, ecx
mov	eax, ebp
mov	edx, 8
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_4], 0
test	eax, eax
jz	short loc_62AE0A
push	offset nullsub_1
push	offset sub_401EF0
push	ebp
lea	edi, [eax+4]
push	8
push	edi
mov	[eax], ebp
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
jmp	short loc_62AE0C

loc_62AE0A:
xor	edi, edi

loc_62AE0C:
mov	[esp+18h+var_4], 0FFFFFFFFh
cmp	dword ptr [esi], 0
jz	short loc_62AE5B
xor	eax, eax
cmp	[esi+4], eax
jbe	short loc_62AE36

loc_62AE20:
mov	ecx, [esi]
mov	edx, [ecx+eax*8]
mov	[edi+eax*8], edx
mov	ecx, [ecx+eax*8+4]
mov	[edi+eax*8+4], ecx
inc	eax
cmp	eax, [esi+4]
jb	short loc_62AE20

loc_62AE36:
mov	eax, [esi]
test	eax, eax
jz	short loc_62AE5B
mov	edx, [eax-4]
push	ebx
lea	ebx, [eax-4]
push	offset nullsub_1
push	edx
push	8
push	eax
call	$LN21_0
push	ebx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	ebx

loc_62AE5B:
mov	[esi], edi
pop	edi
pop	ebp

loc_62AE5F:
mov	ecx, [esi+4]
mov	edx, [esp+10h+arg_0]
mov	eax, [esi]
mov	[eax+ecx*8], edx
mov	edx, [esp+10h+arg_4]
mov	[eax+ecx*8+4], edx
mov	ecx, [esp+10h+var_C]
inc	dword ptr [esi+4]
mov	large fs:0, ecx
add	esp, 10h
retn	8
sub_62AD80 endp

align 10h



sub_62AE90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, large fs:0
push	0FFFFFFFFh
push	offset SEH_62AE90
push	eax
mov	large fs:0, esp
mov	eax, [esi+8]
push	ebx
mov	ebx, [esp+10h+arg_8]
push	ebp
push	edi
cmp	[esi+4], eax
jnz	loc_62AF6B
test	eax, eax
jnz	short loc_62AEC5
mov	dword ptr [esi+8], 10h
jmp	short loc_62AECA

loc_62AEC5:
add	eax, eax
mov	[esi+8], eax

loc_62AECA:
mov	ebp, [esi+8]
xor	ecx, ecx
mov	eax, ebp
mov	edx, 8
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+arg_8], eax
xor	edi, edi
mov	[esp+18h+var_4], edi
cmp	eax, edi
jz	short loc_62AF1A
push	offset nullsub_1
push	offset sub_401EF0
push	ebp
lea	edi, [eax+4]
push	8
push	edi
mov	[eax], ebp
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))

loc_62AF1A:
xor	eax, eax
mov	[esp+18h+var_4], 0FFFFFFFFh
cmp	[esi+4], eax
jbe	short loc_62AF46
lea	esp, [esp+0]

loc_62AF30:
mov	ecx, [esi]
mov	edx, [ecx+eax*8]
mov	[edi+eax*8], edx
mov	ecx, [ecx+eax*8+4]
mov	[edi+eax*8+4], ecx
inc	eax
cmp	eax, [esi+4]
jb	short loc_62AF30

loc_62AF46:
mov	eax, [esi]
test	eax, eax
jz	short loc_62AF69
mov	edx, [eax-4]
lea	ebp, [eax-4]
push	offset nullsub_1
push	edx
push	8
push	eax
call	$LN21_0
push	ebp		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62AF69:
mov	[esi], edi

loc_62AF6B:
mov	ecx, [esi+4]
cmp	ecx, ebx
jz	short loc_62AF88

loc_62AF72:
mov	eax, [esi]
mov	edx, [eax+ecx*8-8]
lea	eax, [eax+ecx*8]
mov	[eax], edx
mov	edx, [eax-4]
dec	ecx
mov	[eax+4], edx
cmp	ecx, ebx
jnz	short loc_62AF72

loc_62AF88:
mov	ecx, [esp+18h+arg_0]
mov	eax, [esi]
mov	[eax+ebx*8], ecx
mov	edx, [esp+18h+arg_4]
mov	ecx, [esp+18h+var_C]
pop	edi
mov	[eax+ebx*8+4], edx
inc	dword ptr [esi+4]
pop	ebp
mov	large fs:0, ecx
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_62AE90 endp




sub_62AFB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+edi*4+114h]
mov	ecx, [eax+8]
push	esi
mov	esi, [ebx+edi*4+110h]
mov	[edx], ecx
mov	edx, [eax+4]
test	edx, edx
jle	short loc_62AFF7
lea	ecx, [eax+edx*4+8]
push	ebp
lea	esp, [esp+0]

loc_62AFE0:
mov	ebp, [ecx-4]
mov	[ecx], ebp
mov	ebp, [ecx+7Ch]
mov	[ecx+80h], ebp
dec	edx
sub	ecx, 4
test	edx, edx
jg	short loc_62AFE0
pop	ebp

loc_62AFF7:
mov	ecx, [esi+4]
mov	edx, [esi+ecx*4+4]
mov	[eax+8], edx
mov	ecx, [esi+4]
mov	edx, [esi+ecx*4+84h]
inc	dword ptr [eax+4]
mov	[eax+88h], edx
dec	dword ptr [esi+4]
mov	ecx, [eax+8]
mov	[ebx+edi*4+8], ecx
mov	edx, [eax+8]
mov	eax, [esp+8+arg_4]
pop	esi
mov	[eax+4], edx
pop	ebx
retn	8
sub_62AFB0 endp

align 10h



sub_62B030 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	ecx, [ebx+edi*4+110h]
mov	eax, [ebx+edi*4+10Ch]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [ecx+8]
mov	[ebp+0], esi
mov	esi, [eax+4]
mov	ebp, [ecx+8]
lea	edx, [ecx+8]
mov	[eax+esi*4+8], ebp
mov	esi, [eax+4]
mov	ebp, [ecx+88h]
mov	[eax+esi*4+88h], ebp
inc	dword ptr [eax+4]
mov	eax, [ecx+4]
dec	eax
xor	esi, esi
test	eax, eax
jle	short loc_62B09D
mov	eax, edx
jmp	short loc_62B080
align 10h

loc_62B080:
mov	ebp, [eax+4]
mov	[eax], ebp
mov	ebp, [eax+84h]
mov	[eax+80h], ebp
mov	ebp, [ecx+4]
inc	esi
dec	ebp
add	eax, 4
cmp	esi, ebp
jl	short loc_62B080

loc_62B09D:
dec	dword ptr [ecx+4]
mov	ecx, [edx]
mov	eax, [esp+0Ch+arg_4]
mov	[ebx+edi*4+4], ecx
mov	edx, [edx]
pop	esi
pop	ebp
mov	[eax+4], edx
pop	ebx
retn	8
sub_62B030 endp

align 10h



sub_62B0C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ecx
push	ebp
mov	ebp, [esp+8+arg_10]
mov	eax, [ebp+4]
cmp	eax, 20h
push	esi
mov	[esp+0Ch+var_4], ecx
jge	loc_62B179
mov	edx, [esp+0Ch+arg_8]
cmp	eax, edx
jle	short loc_62B0F2
lea	ecx, [ebp+eax*4+8]
sub	eax, edx

loc_62B0E5:
mov	esi, [ecx-4]
mov	[ecx], esi
add	ecx, 0FFFFFFFCh
sub	eax, 1
jnz	short loc_62B0E5

loc_62B0F2:
cmp	byte ptr [ebp+0], 0
jz	short loc_62B117
mov	ecx, [ebp+4]
cmp	ecx, edx
jle	short loc_62B13D
lea	eax, [ebp+ecx*4+88h]
sub	ecx, edx

loc_62B108:
mov	esi, [eax-4]
mov	[eax], esi
add	eax, 0FFFFFFFCh
sub	ecx, 1
jnz	short loc_62B108
jmp	short loc_62B13D

loc_62B117:
mov	eax, [ebp+4]
inc	eax
lea	esi, [edx+1]
cmp	eax, esi
jle	short loc_62B13D
lea	ecx, [ebp+eax*4+110h]
sub	eax, esi
jmp	short loc_62B130
align 10h

loc_62B130:
mov	esi, [ecx-4]
mov	[ecx], esi
add	ecx, 0FFFFFFFCh
sub	eax, 1
jnz	short loc_62B130

loc_62B13D:
mov	eax, [esp+0Ch+arg_0]
mov	[ebp+edx*4+8], eax
cmp	byte ptr [ebp+0], 0
jz	short loc_62B163
mov	ecx, [esp+0Ch+arg_4]
mov	eax, [ecx]
mov	[ebp+edx*4+88h], eax
inc	dword ptr [ebp+4]
pop	esi
xor	eax, eax
pop	ebp
pop	ecx
retn	18h

loc_62B163:
mov	ecx, [esp+0Ch+arg_C]
mov	[ebp+edx*4+114h], ecx
inc	dword ptr [ebp+4]
pop	esi
xor	eax, eax
pop	ebp
pop	ecx
retn	18h

loc_62B179:
push	ebx
push	edi
push	ecx
call	sub_62AA00
mov	dl, [ebp+0]
mov	ebx, eax
mov	[ebx], dl
cmp	byte ptr [ebp+0], 0
jz	short loc_62B1B6
mov	eax, [ebp+108h]
mov	[ebx+108h], eax
mov	eax, [ebp+108h]
test	eax, eax
jz	short loc_62B1AA
mov	[eax+10Ch], ebx

loc_62B1AA:
mov	[ebx+10Ch], ebp
mov	[ebp+108h], ebx

loc_62B1B6:
mov	edi, [esp+14h+arg_8]
cmp	edi, 10h
jl	loc_62B34F
mov	ecx, 10h
xor	edx, edx
cmp	edi, ecx
jle	short loc_62B1F9
lea	ecx, [ebp+48h]
lea	eax, [edi-10h]
mov	[esp+14h+arg_10], ecx
lea	esi, [ebx+8]
mov	edx, eax
lea	ecx, [eax+10h]

loc_62B1E0:
mov	edi, [esp+14h+arg_10]
mov	edi, [edi]
add	[esp+14h+arg_10], 4
mov	[esi], edi
add	esi, 4
sub	eax, 1
jnz	short loc_62B1E0
mov	edi, [esp+14h+arg_8]

loc_62B1F9:
mov	eax, [esp+14h+arg_0]
mov	[ebx+edx*4+8], eax
inc	edx
cmp	ecx, 20h
jge	short loc_62B225
mov	eax, 20h
lea	esi, [ebx+edx*4+8]
lea	edx, [ebp+ecx*4+8]
sub	eax, ecx

loc_62B216:
mov	ecx, [edx]
mov	[esi], ecx
add	edx, 4
add	esi, 4
sub	eax, 1
jnz	short loc_62B216

loc_62B225:
xor	eax, eax
lea	ecx, [eax+10h]
cmp	[ebp+0], al
jz	loc_62B2B4
cmp	edi, ecx
jle	short loc_62B263
lea	eax, [edi-10h]
lea	esi, [ebx+88h]
lea	edx, [ebp+0C8h]
mov	[esp+14h+arg_10], eax
lea	ecx, [eax+10h]
lea	ecx, [ecx+0]

loc_62B250:
mov	edi, [edx]
mov	[esi], edi
add	edx, 4
add	esi, 4
sub	eax, 1
jnz	short loc_62B250
mov	eax, [esp+14h+arg_10]

loc_62B263:
mov	edx, [esp+14h+arg_4]
mov	edx, [edx]
mov	[ebx+eax*4+88h], edx
inc	eax
cmp	ecx, 20h
jge	loc_62B33B
mov	edx, 20h
sub	edx, ecx
lea	edi, [ebx+eax*4+88h]
lea	esi, [ebp+ecx*4+88h]
add	eax, edx

loc_62B291:
mov	ecx, [esi]
mov	[edi], ecx
add	esi, 4
add	edi, 4
sub	edx, 1
jnz	short loc_62B291
mov	dword ptr [ebp+4], 10h
pop	edi
mov	[ebx+4], eax
mov	eax, ebx
pop	ebx
pop	esi
pop	ebp
pop	ecx
retn	18h

loc_62B2B4:
cmp	edi, ecx
jle	short loc_62B2E3
lea	eax, [edi-10h]
lea	esi, [ebx+110h]
lea	edx, [ebp+154h]
mov	[esp+14h+arg_10], eax
lea	ecx, [eax+10h]
mov	edi, edi

loc_62B2D0:
mov	edi, [edx]
mov	[esi], edi
add	edx, 4
add	esi, 4
sub	eax, 1
jnz	short loc_62B2D0
mov	eax, [esp+14h+arg_10]

loc_62B2E3:
mov	edx, [esp+14h+arg_C]
mov	[ebx+eax*4+110h], edx
mov	esi, [ebp+4]
lea	edx, [ecx+1]
inc	esi
inc	eax
cmp	edx, esi
jge	short loc_62B31C
lea	esi, [ebx+eax*4+110h]
lea	ecx, [ebp+ecx*4+114h]

loc_62B308:
mov	edi, [ecx]
mov	[esi], edi
mov	edi, [ebp+4]
inc	edx
inc	edi
add	ecx, 4
inc	eax
add	esi, 4
cmp	edx, edi
jl	short loc_62B308

loc_62B31C:
mov	ecx, [esp+14h+arg_14]
mov	dword ptr [ecx+8], 2
mov	edx, [ebx+8]
lea	edi, [ebx+8]
mov	[ecx], edx
lea	ecx, [eax-1]
test	ecx, ecx
jle	short loc_62B33B
lea	esi, [ebx+0Ch]
rep movsd

loc_62B33B:
mov	dword ptr [ebp+4], 10h
pop	edi
mov	[ebx+4], eax
mov	eax, ebx
pop	ebx
pop	esi
pop	ebp
pop	ecx
retn	18h

loc_62B34F:
lea	eax, [ebx+8]
lea	ecx, [ebp+44h]
mov	edx, eax
mov	edi, 11h
lea	esp, [esp+0]

loc_62B360:
mov	esi, [ecx]
mov	[edx], esi
add	ecx, 4
add	edx, 4
sub	edi, 1
jnz	short loc_62B360
cmp	byte ptr [ebp+0], 0
jz	short loc_62B3A4
mov	edx, 11h
lea	ecx, [ebx+88h]
lea	eax, [ebp+0C4h]
mov	[esp+14h+arg_10], edx
lea	ebx, [ebx+0]

loc_62B390:
mov	esi, [eax]
mov	[ecx], esi
add	eax, 4
add	ecx, 4
sub	edx, 1
jnz	short loc_62B390
jmp	loc_62B43D

loc_62B3A4:
mov	edi, 11h
lea	edx, [ebx+110h]
lea	ecx, [ebp+150h]
mov	[esp+14h+arg_10], edi
lea	esp, [esp+0]

loc_62B3C0:
mov	esi, [ecx]
mov	[edx], esi
add	ecx, 4
add	edx, 4
sub	edi, 1
jnz	short loc_62B3C0
mov	ecx, [esp+14h+arg_14]
mov	dword ptr [ecx+8], 2
mov	edx, [eax]
mov	[ecx], edx
mov	ecx, [ebx+0Ch]
mov	edx, [ebx+10h]
mov	[eax], ecx
mov	ecx, [ebx+14h]
mov	[eax+4], edx
mov	edx, [ebx+18h]
mov	[eax+8], ecx
mov	ecx, [ebx+1Ch]
mov	[eax+0Ch], edx
mov	edx, [ebx+20h]
mov	[eax+10h], ecx
mov	ecx, [ebx+24h]
mov	[eax+14h], edx
mov	edx, [ebx+28h]
mov	[eax+18h], ecx
mov	ecx, [ebx+2Ch]
mov	[eax+1Ch], edx
mov	edx, [ebx+30h]
mov	[eax+20h], ecx
mov	ecx, [ebx+34h]
mov	[eax+24h], edx
mov	edx, [ebx+38h]
mov	[eax+28h], ecx
mov	ecx, [ebx+3Ch]
mov	[eax+2Ch], edx
mov	edx, [ebx+40h]
mov	[eax+30h], ecx
mov	ecx, [ebx+44h]
mov	[eax+34h], edx
mov	edx, [ebx+48h]
mov	[eax+38h], ecx
mov	[eax+3Ch], edx

loc_62B43D:
mov	esi, [esp+14h+arg_0]
lea	eax, [esp+14h+arg_8]
push	eax
push	esi
mov	edi, ebp
mov	dword ptr [ebp+4], 0Fh
call	sub_62A560
test	al, al
jz	short loc_62B470
push	278h		; Line
push	offset aZLwo7_buildB_3 ; "z:\\lwo\\7_build\\branch\\staging\\1_tech\\sr"...
push	offset aBFalse	; "b==false"
call	__wassert
add	esp, 0Ch

loc_62B470:
mov	ecx, [esp+14h+arg_14]
mov	edx, [esp+14h+arg_C]
mov	eax, [esp+14h+arg_8]
push	ecx
mov	ecx, [esp+18h+arg_4]
push	ebp
push	edx
push	eax
push	ecx
mov	ecx, [esp+28h+var_4]
push	esi
call	sub_62B0C0
mov	eax, [esp+14h+arg_10]
pop	edi
mov	[ebx+4], eax
mov	eax, ebx
pop	ebx
pop	esi
pop	ebp
pop	ecx
retn	18h
sub_62B0C0 endp




sub_62B4A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, eax
test	edi, edi
jle	short loc_62B518
mov	esi, [ebp+edi*4+10Ch]
cmp	dword ptr [esi+4], 10h
jle	short loc_62B518
mov	ebx, [ebp+edi*4+110h]
mov	edx, ebx
call	sub_62B8D0
cmp	byte ptr [ebx],	0
jz	short loc_62B4EA
mov	eax, [esi+4]
mov	ecx, [esi+eax*4+4]
mov	[ebx+8], ecx
mov	edx, [esi+4]
mov	eax, [esi+edx*4+84h]
mov	[ebx+88h], eax
jmp	short loc_62B501

loc_62B4EA:
mov	ecx, [esi+4]
mov	edx, [esi+ecx*4+110h]
mov	[ebx+110h], edx
mov	eax, [ebp+edi*4+4]
mov	[ebx+8], eax

loc_62B501:
mov	ecx, [esi+4]
mov	edx, [esi+ecx*4+4]
mov	[ebp+edi*4+4], edx
dec	dword ptr [esi+4]
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	0Ch

loc_62B518:
mov	ecx, [ebp+4]
cmp	edi, ecx
jge	loc_62B5CB
mov	eax, [ebp+edi*4+114h]
cmp	dword ptr [eax+4], 10h
jle	loc_62B5B7
mov	ecx, [ebp+edi*4+110h]
cmp	byte ptr [ecx],	0
jz	short loc_62B572
mov	edx, [ecx+4]
mov	esi, [eax+8]
mov	[ecx+edx*4+8], esi
mov	edx, [ecx+4]
mov	esi, [eax+88h]
mov	[ecx+edx*4+88h], esi
mov	edx, [eax+0Ch]
mov	[ebp+edi*4+8], edx
inc	dword ptr [ecx+4]
call	sub_62B860
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	0Ch

loc_62B572:
mov	esi, [esp+10h+arg_8]
cmp	dword ptr [esi+8], 0
jnz	short loc_62B588
mov	dword ptr [esi+8], 3
mov	ebx, [ecx+8]
mov	[esi], ebx

loc_62B588:
mov	esi, [ecx+4]
mov	[ecx+esi*4+8], edx
mov	edx, [ecx+4]
mov	esi, [eax+110h]
mov	[ecx+edx*4+114h], esi
mov	edx, [eax+8]
mov	[ebp+edi*4+8], edx
inc	dword ptr [ecx+4]
call	sub_62B860
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	0Ch

loc_62B5B7:
cmp	edi, ecx
jge	short loc_62B5CB
mov	esi, [ebp+edi*4+110h]
mov	ebx, [ebp+edi*4+114h]
jmp	short loc_62B5D9

loc_62B5CB:
mov	esi, [ebp+edi*4+10Ch]
mov	ebx, [ebp+edi*4+110h]

loc_62B5D9:
cmp	byte ptr [esi],	0
jz	short loc_62B622
cmp	dword ptr [ebx+4], 0
mov	[esp+10h+arg_4], 0
jle	loc_62B679
lea	eax, [ebx+88h]

loc_62B5F6:
mov	edx, [eax-80h]
mov	ecx, [esi+4]
mov	[esi+ecx*4+8], edx
mov	ecx, [esi+4]
mov	edx, [eax]
mov	[esi+ecx*4+88h], edx
mov	ecx, [esp+10h+arg_4]
inc	dword ptr [esi+4]
inc	ecx
add	eax, 4
cmp	ecx, [ebx+4]
mov	[esp+10h+arg_4], ecx
jl	short loc_62B5F6
jmp	short loc_62B679

loc_62B622:
mov	eax, [esi+4]
mov	[esi+eax*4+8], edx
mov	ecx, [esi+4]
mov	edx, [ebx+110h]
mov	[esi+ecx*4+114h], edx
inc	dword ptr [esi+4]
mov	ecx, [esi+4]
xor	edx, edx
cmp	[ebx+4], edx
jle	short loc_62B679
lea	eax, [ebx+114h]
lea	esp, [esp+0]

loc_62B650:
mov	ebp, [eax-10Ch]
mov	[esi+ecx*4+8], ebp
mov	ecx, [esi+4]
mov	ebp, [eax]
mov	[esi+ecx*4+114h], ebp
inc	dword ptr [esi+4]
mov	ecx, [esi+4]
inc	edx
add	eax, 4
cmp	edx, [ebx+4]
jl	short loc_62B650
mov	ebp, [esp+10h+arg_4]

loc_62B679:
cmp	edi, [ebp+4]
jge	short loc_62B682
mov	edx, edi
jmp	short loc_62B689

loc_62B682:
test	edi, edi
jle	short loc_62B692
lea	edx, [edi-1]

loc_62B689:
mov	eax, ebp
call	sub_62A3C0
test	edi, edi

loc_62B692:
jnz	short loc_62B6A9
cmp	byte ptr [esi],	0
jz	short loc_62B6A9
mov	eax, [esp+10h+arg_8]
mov	dword ptr [eax+8], 3
mov	edx, [esi+8]
mov	[eax], edx

loc_62B6A9:
mov	edi, [esp+10h+arg_0]
cmp	ebx, [edi+18h]
jnz	short loc_62B6BB
mov	eax, [ebx+108h]
mov	[edi+18h], eax

loc_62B6BB:
cmp	byte ptr [ebx],	0
jz	short loc_62B6EC
mov	eax, [ebx+10Ch]
test	eax, eax
jz	short loc_62B6D6
mov	ecx, [ebx+108h]
mov	[eax+108h], ecx

loc_62B6D6:
mov	eax, [ebx+108h]
test	eax, eax
jz	short loc_62B6EC
mov	edx, [ebx+10Ch]
mov	[eax+10Ch], edx

loc_62B6EC:
mov	ecx, ebx
call	sub_62AB20
pop	edi
xor	eax, eax
cmp	dword ptr [ebp+4], 10h
pop	esi
pop	ebp
setl	al
pop	ebx
retn	0Ch
sub_62B4A0 endp

align 10h



sub_62B710 proc	near
cmp	dword ptr [esi+0Ch], 0
push	edi
mov	edi, eax
jnz	short loc_62B740
push	40h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi], eax
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 1
mov	ecx, [edi]
add	esp, 4
mov	[eax], ecx
mov	dword ptr [esi+0Ch], 10h
pop	edi
retn

loc_62B740:
mov	ecx, [edi]
mov	edx, [esi+8]
mov	eax, [esi]
mov	[eax+edx*4], ecx
inc	dword ptr [esi+8]
mov	ecx, [esi+8]
mov	eax, [esi+0Ch]
cmp	ecx, eax
jnz	short loc_62B75E
mov	dword ptr [esi+8], 0

loc_62B75E:
mov	edx, [esi+8]
cmp	edx, [esi+4]
jnz	short loc_62B7C8
xor	ecx, ecx
add	eax, eax
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edi, eax
add	esp, 4
test	edi, edi
jz	short loc_62B7C8
xor	ecx, ecx
cmp	[esi+0Ch], ecx
jbe	short loc_62B7A9
mov	edi, edi

loc_62B790:
mov	eax, [esi+4]
add	eax, ecx
xor	edx, edx
div	dword ptr [esi+0Ch]
mov	eax, [esi]
inc	ecx
mov	edx, [eax+edx*4]
mov	[edi+ecx*4-4], edx
cmp	ecx, [esi+0Ch]
jb	short loc_62B790

loc_62B7A9:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	[esi+8], eax
add	eax, eax
push	ecx		; void *
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], eax
call	??3@YAXPAX@Z	; operator delete(void *)
mov	[esi], edi
add	esp, 4

loc_62B7C8:
pop	edi
retn
sub_62B710 endp

align 10h



sub_62B7D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ecx, [ebp+10h]
mov	eax, 0A0A0A0A1h
mul	ecx
push	esi
mov	esi, edx
push	ecx		; size_t
xor	ebx, ebx
shr	esi, 8
call	off_169276C
add	esp, 4
mov	[edi+8], eax
test	eax, eax
jz	short loc_62B81D
lea	eax, ds:0[esi*4]
push	eax		; size_t
call	off_169276C
mov	ecx, [edi+8]
add	esp, 4
mov	[edi], eax
test	eax, eax
jnz	short loc_62B825
push	ecx		; void *
call	off_1692BF0
add	esp, 4

loc_62B81D:
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	8

loc_62B825:
test	esi, esi
jle	short loc_62B844
lea	esp, [esp+0]

loc_62B830:
mov	[ecx+194h], edi
mov	[eax+ebx*4], ecx
inc	ebx
add	ecx, 198h
cmp	ebx, esi
jl	short loc_62B830

loc_62B844:
mov	eax, [esp+0Ch+arg_4]
mov	[edi+4], esi
mov	edx, [ebp+0]
pop	esi
pop	ebp
mov	[edi+10h], eax
mov	[edi+0Ch], edx
mov	al, 1
pop	ebx
retn	8
sub_62B7D0 endp

align 10h



sub_62B860 proc	near
mov	ecx, [eax+4]
dec	ecx
xor	edx, edx
push	esi
test	ecx, ecx
jle	short loc_62B881
lea	ecx, [eax+8]
mov	edi, edi

loc_62B870:
mov	esi, [ecx+4]
mov	[ecx], esi
mov	esi, [eax+4]
inc	edx
dec	esi
add	ecx, 4
cmp	edx, esi
jl	short loc_62B870

loc_62B881:
xor	edx, edx
cmp	[eax], dl
jz	short loc_62B8A5
cmp	[eax+4], edx
jle	short loc_62B8BF
lea	ecx, [eax+88h]

loc_62B892:
mov	esi, [ecx+4]
mov	[ecx], esi
inc	edx
add	ecx, 4
cmp	edx, [eax+4]
jl	short loc_62B892
dec	dword ptr [eax+4]
pop	esi
retn

loc_62B8A5:
cmp	dword ptr [eax+4], 0
jle	short loc_62B8BF
lea	ecx, [eax+110h]

loc_62B8B1:
mov	esi, [ecx+4]
mov	[ecx], esi
inc	edx
add	ecx, 4
cmp	edx, [eax+4]
jl	short loc_62B8B1

loc_62B8BF:
dec	dword ptr [eax+4]
pop	esi
retn
sub_62B860 endp

align 10h



sub_62B8D0 proc	near
mov	eax, [edx+4]
push	esi
push	edi
mov	esi, 1
test	eax, eax
jle	short loc_62B8F0
lea	ecx, [edx+eax*4+8]

loc_62B8E2:
mov	edi, [ecx-4]
mov	[ecx], edi
sub	eax, esi
sub	ecx, 4
test	eax, eax
jg	short loc_62B8E2

loc_62B8F0:
cmp	byte ptr [edx],	0
jz	short loc_62B917
mov	ecx, [edx+4]
test	ecx, ecx
jle	short loc_62B935
lea	eax, [edx+ecx*4+88h]

loc_62B903:
mov	edi, [eax-4]
mov	[eax], edi
sub	ecx, esi
sub	eax, 4
test	ecx, ecx
jg	short loc_62B903
add	[edx+4], esi
pop	edi
pop	esi
retn

loc_62B917:
mov	eax, [edx+4]
add	eax, esi
test	eax, eax
jle	short loc_62B935
lea	ecx, [edx+eax*4+110h]

loc_62B927:
mov	edi, [ecx-4]
mov	[ecx], edi
sub	eax, esi
sub	ecx, 4
test	eax, eax
jg	short loc_62B927

loc_62B935:
add	[edx+4], esi
pop	edi
pop	esi
retn
sub_62B8D0 endp

align 10h



sub_62B940 proc	near

arg_0= dword ptr  4

mov	eax, [esi+8]
cmp	[esi+4], eax
jnz	short loc_62B9A1
test	eax, eax
jnz	short loc_62B955
mov	dword ptr [esi+8], 10h
jmp	short loc_62B95A

loc_62B955:
add	eax, eax
mov	[esi+8], eax

loc_62B95A:
mov	eax, [esi+8]
xor	ecx, ecx
mov	edx, 4
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	dword ptr [esi], 0
mov	edi, eax
jz	short loc_62B99E
xor	eax, eax
cmp	[esi+4], eax
jbe	short loc_62B993

loc_62B985:
mov	ecx, [esi]
mov	edx, [ecx+eax*4]
mov	[edi+eax*4], edx
inc	eax
cmp	eax, [esi+4]
jb	short loc_62B985

loc_62B993:
mov	eax, [esi]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62B99E:
mov	[esi], edi
pop	edi

loc_62B9A1:
mov	ecx, [esi+4]
mov	edx, [esi]
mov	eax, [esp+arg_0]
mov	[edx+ecx*4], eax
inc	dword ptr [esi+4]
retn	4
sub_62B940 endp

align 10h



sub_62B9C0 proc	near

arg_0= dword ptr  4

mov	eax, [esi+4]
test	eax, eax
jbe	short loc_62B9D7
cmp	edi, eax
jnb	short loc_62B9D7
mov	eax, [esi]
mov	ecx, [esp+arg_0]
mov	[eax+edi*4], ecx
retn	4

loc_62B9D7:
cmp	edi, [esi+8]
jb	short loc_62BA21
xor	ecx, ecx
lea	eax, [edi+1]
mov	[esi+8], eax
mov	edx, 4
mul	edx
seto	cl
push	ebx
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebx, eax
xor	eax, eax
add	esp, 4
cmp	[esi+4], eax
jbe	short loc_62BA13

loc_62BA05:
mov	ecx, [esi]
mov	edx, [ecx+eax*4]
mov	[ebx+eax*4], edx
inc	eax
cmp	eax, [esi+4]
jb	short loc_62BA05

loc_62BA13:
mov	eax, [esi]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	[esi], ebx
pop	ebx

loc_62BA21:
cmp	[esi+4], edi
jnb	short loc_62BA44
jmp	short loc_62BA30
align 10h

loc_62BA30:
mov	ecx, [esi+4]
mov	edx, [esi]
mov	dword ptr [edx+ecx*4], 0
inc	dword ptr [esi+4]
cmp	[esi+4], edi
jb	short loc_62BA30

loc_62BA44:
mov	eax, [esi+4]
mov	ecx, [esi]
mov	edx, [esp+arg_0]
mov	[ecx+eax*4], edx
inc	dword ptr [esi+4]
retn	4
sub_62B9C0 endp

align 10h



sub_62BA60 proc	near
mov	ecx, dword_18899F4
test	ecx, ecx
jz	short locret_62BA91
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
mov	ecx, dword_18899F4
test	ecx, ecx
jz	short loc_62BA87
mov	eax, [ecx]
mov	edx, [eax+0BCh]
push	1
call	edx

loc_62BA87:
mov	dword_18899F4, 0

locret_62BA91:
retn
sub_62BA60 endp

align 10h



sub_62BAA0 proc	near
mov	eax, dword_18899F4
retn
sub_62BAA0 endp

align 10h



sub_62BAB0 proc	near

arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	loc_62BBC1
push	ebx
push	ebp
lea	ebx, [esi+10h]
push	edi

loc_62BAC6:
mov	eax, [ebx]
mov	edx, [eax+4]
push	offset off_17F1718
mov	ecx, ebx
call	edx
mov	eax, [esi+30h]
mov	edx, [eax+4]
lea	ecx, [esi+30h]
push	offset off_17F1738
call	edx
mov	eax, [esi+40h]
mov	edx, [eax+4]
lea	ecx, [esi+40h]
push	offset off_17F1748
call	edx
mov	eax, [esi+20h]
mov	edx, [eax+30h]
lea	ecx, [esi+20h]
call	edx
lea	edi, [esi+134h]
mov	ebp, 8
lea	ebx, [ebx+0]

loc_62BB10:
mov	eax, [edi]
mov	edx, [eax+3Ch]
mov	ecx, edi
call	edx
add	edi, 10h
sub	ebp, 1
jnz	short loc_62BB10
mov	eax, [esi]
mov	edi, [esp+0Ch+arg_4]
mov	edx, [eax+114h]
and	byte ptr [esi+118h], 0FDh
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62BBAC
mov	eax, [edi+54h]
mov	edx, [esi]
mov	[esi+124h], eax
mov	eax, [edx+154h]
push	edi
mov	ecx, esi
call	eax
test	al, al
jz	short loc_62BBAC
mov	edx, [esi]
mov	eax, [edx+100h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_62BBAC
mov	edx, [esi]
mov	eax, [edx+164h]
push	edi
mov	ecx, esi
call	eax
test	al, al
jz	short loc_62BBAC
mov	edx, [esi]
mov	eax, [edx+130h]
mov	ecx, esi
call	eax
mov	[esi+114h], eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	edi
call	eax
test	al, al
jz	short loc_62BBAC
or	byte ptr [esi+118h], 1
test	byte ptr [esi+118h], 1
jz	loc_62BAC6

loc_62BBAC:
test	byte ptr [esi+118h], 1
pop	edi
pop	ebp
pop	ebx
jnz	short loc_62BBC1
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_62BBC1:
mov	al, [esi+118h]
and	al, 1
pop	esi
retn	4
sub_62BAB0 endp

align 10h



sub_62BBD0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+114h]
test	ecx, ecx
jz	short loc_62BC00
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
mov	ecx, [esi+114h]
test	ecx, ecx
jz	short loc_62BBF6
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_62BBF6:
mov	dword ptr [esi+114h], 0

loc_62BC00:
mov	eax, [esi]
mov	edx, [eax+168h]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+104h]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+184h]
lea	ecx, [esi+9Ch]
push	ecx
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+184h]
lea	ecx, [esi+0B4h]
push	ecx
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+158h]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+118h]
mov	ecx, esi
call	edx
and	byte ptr [esi+118h], 0FEh
pop	esi
retn
sub_62BBD0 endp

align 10h


; Attributes: bp-based frame

sub_62BC60 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E76E8
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62BCAA

loc_62BC95:
xor	al, al
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_62BCAA:
xorps	xmm0, xmm0
comiss	xmm0, [ebp+arg_0]
ja	short loc_62BC95
mov	ecx, [esi+114h]
fld	[ebp+arg_0]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	ecx
fstp	[esp+30h+var_30]
call	edx
test	al, al
jz	short loc_62BC95
xorps	xmm0, xmm0
mov	[esp+2Ch+var_20], offset off_15FAE00
movss	[esp+2Ch+var_1C], xmm0
movss	[esp+2Ch+var_18], xmm0
movss	[esp+2Ch+var_14], xmm0
fld	[ebp+arg_0]
lea	ecx, [esp+2Ch+var_20]
mov	[esp+2Ch+var_4], 0
mov	eax, [esi]
mov	edx, [eax+10Ch]
push	ecx
push	ecx
mov	ecx, esi
fstp	[esp+34h+var_34]
call	edx
mov	eax, [esi]
mov	edx, [eax+108h]
lea	ecx, [esp+2Ch+var_20]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_62BC95
mov	eax, [esi]
fld	[ebp+arg_0]
mov	edx, [eax+190h]
push	ecx
mov	ecx, esi
fstp	[esp+30h+var_30]
call	edx
test	al, al
jz	loc_62BC95
mov	eax, [esi]
fld	[ebp+arg_0]
mov	edx, [eax+194h]
push	ecx
mov	ecx, esi
fstp	[esp+30h+var_30]
call	edx
test	al, al
jz	loc_62BC95
mov	eax, [esi]
mov	edx, [eax+198h]
mov	ecx, esi
call	edx
test	al, al
setnz	al
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_62BC60 endp

align 10h



sub_62BD80 proc	near

var_8= dword ptr -8

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62BD90

loc_62BD8C:
xor	al, al
pop	esi
retn

loc_62BD90:
mov	eax, [esi]
mov	edx, [eax+10h]
push	0
call	edx
test	al, al
jz	short loc_62BD8C
mov	ecx, [esi+114h]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
test	al, al
jz	short loc_62BD8C
mov	eax, [esi]
fldz
mov	edx, [eax+8]
push	ecx
mov	ecx, esi
fstp	[esp+8+var_8]
call	edx
test	al, al
jz	short loc_62BD8C
mov	eax, [esi]
mov	edx, [eax+0C8h]
push	0
mov	ecx, esi
call	edx
mov	al, 1
pop	esi
retn
sub_62BD80 endp

align 10h



sub_62BDE0 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+118h], 1
jnz	short loc_62BDEE
xor	al, al
retn	4

loc_62BDEE:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+11Ch]
push	edx
call	eax
test	al, al
setnz	al
retn	4
sub_62BDE0 endp

align 10h



sub_62BE10 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
test	byte ptr [edi+118h], 1
jnz	short loc_62BE22
xor	al, al
pop	edi
retn	4

loc_62BE22:
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
mov	esi, [edi+0A4h]
lea	ebx, [edi+9Ch]
cmp	esi, ebx
setnz	al
test	al, al
jz	short loc_62BE63
mov	edi, edi

loc_62BE40:
mov	ecx, [esi+14h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
call	edx
test	al, al
jz	short loc_62BEA4
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, ebx
setnz	al
test	al, al
jnz	short loc_62BE40

loc_62BE63:
mov	esi, [edi+0BCh]
add	edi, 0B4h
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_62BE9B

loc_62BE78:
mov	ecx, [esi+14h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
call	edx
test	al, al
jz	short loc_62BEA4
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_62BE78

loc_62BE9B:
pop	esi
pop	ebp
pop	ebx
mov	al, 1
pop	edi
retn	4

loc_62BEA4:
pop	esi
pop	ebp
pop	ebx
xor	al, al
pop	edi
retn	4
sub_62BE10 endp

align 10h



sub_62BEB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
test	byte ptr [ecx+118h], 1
jnz	short loc_62BEC0
xor	al, al
pop	ecx
retn	4

loc_62BEC0:
mov	eax, [ecx]
mov	eax, [eax+174h]
lea	edx, [esp+4+var_4]
push	edx
mov	[esp+8+var_4], 0
call	eax
mov	eax, [esp+4+arg_0]
test	eax, eax
jz	short loc_62BEE3
mov	ecx, [esp+4+var_4]
mov	[eax], ecx

loc_62BEE3:
mov	al, 1
pop	ecx
retn	4
sub_62BEB0 endp

align 10h



sub_62BEF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62BF02
xor	al, al
pop	esi
retn	4

loc_62BF02:
mov	eax, [esi]
mov	edx, [eax+0E4h]
call	edx
cmp	al, 1
jnz	short loc_62BF27
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+0C8h]
push	ecx
mov	ecx, esi
call	edx
mov	al, 1
pop	esi
retn	4

loc_62BF27:
mov	eax, [esp+4+arg_0]
test	eax, eax
jz	short loc_62BF35
mov	dword ptr [eax], 0

loc_62BF35:
mov	al, 1
pop	esi
retn	4
sub_62BEF0 endp

align 10h


; Attributes: bp-based frame

sub_62BF40 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12FF568
mov	eax, large fs:0
push	eax
sub	esp, 34h
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+4Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62BF8C

loc_62BF76:
xor	al, al
mov	ecx, [esp+4Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	24h

loc_62BF8C:
movss	xmm0, [ebp+arg_0]
movss	[esp+4Ch+var_1C], xmm0
movss	xmm0, [ebp+arg_4]
mov	edi, offset off_15FAE00
movss	[esp+4Ch+var_18], xmm0
movss	xmm0, [ebp+arg_8]
mov	[esp+4Ch+var_20], edi
movss	[esp+4Ch+var_14], xmm0
lea	ecx, [esp+4Ch+var_20]
mov	[esp+4Ch+var_4], 0
call	sub_632450
test	al, al
jz	short loc_62BF76
movss	xmm0, [ebp+arg_C]
movss	[esp+4Ch+var_3C], xmm0
movss	xmm0, [ebp+arg_10]
movss	[esp+4Ch+var_38], xmm0
movss	xmm0, [ebp+arg_14]
mov	[esp+4Ch+var_40], edi
movss	[esp+4Ch+var_34], xmm0
lea	ecx, [esp+4Ch+var_40]
mov	byte ptr [esp+4Ch+var_4], 1
call	sub_632450
test	al, al
jz	loc_62BF76
lea	ecx, [esp+4Ch+var_40]
call	sub_632550
test	al, al
jz	loc_62BF76
movss	xmm0, [ebp+arg_18]
movss	[esp+4Ch+var_2C], xmm0
movss	xmm0, [ebp+arg_1C]
movss	[esp+4Ch+var_28], xmm0
movss	xmm0, [ebp+arg_20]
mov	[esp+4Ch+var_30], edi
movss	[esp+4Ch+var_24], xmm0
lea	ecx, [esp+4Ch+var_30]
mov	byte ptr [esp+4Ch+var_4], 2
call	sub_632450
test	al, al
jz	loc_62BF76
lea	ecx, [esp+4Ch+var_30]
call	sub_632550
test	al, al
jz	loc_62BF76
lea	eax, [esp+4Ch+var_30]
push	eax
lea	ecx, [esp+50h+var_40]
call	sub_632780
test	al, al
jz	loc_62BF76
mov	edx, [esi+10h]
mov	edx, [edx+4]
lea	edi, [esi+10h]
lea	eax, [esp+4Ch+var_20]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esi+30h]
mov	eax, [eax+4]
lea	ecx, [esi+30h]
lea	edx, [esp+4Ch+var_40]
push	edx
call	eax
mov	edx, [esi+40h]
mov	edx, [edx+4]
lea	ecx, [esi+40h]
lea	eax, [esp+4Ch+var_30]
push	eax
call	edx
mov	eax, [esi+20h]
mov	edx, [eax+34h]
add	esi, 20h
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_62C0C6
mov	eax, [esi]
mov	edx, [eax+4]
push	edi
mov	ecx, esi
call	edx

loc_62C0C6:
mov	al, 1
mov	ecx, [esp+4Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	24h
sub_62BF40 endp

align 10h



sub_62C0E0 proc	near
mov	al, [ecx+118h]
test	al, 1
jnz	short loc_62C0ED
xor	al, al
retn

loc_62C0ED:
or	al, 2
mov	[ecx+118h], al
mov	al, 1
retn
sub_62C0E0 endp

align 10h



sub_62C100 proc	near
mov	al, [ecx+118h]
test	al, 1
jnz	short loc_62C10D
xor	al, al
retn

loc_62C10D:
and	al, 0FDh
mov	[ecx+118h], al
mov	al, 1
retn
sub_62C100 endp

align 10h



sub_62C120 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+118h], 1
jnz	short loc_62C12E

loc_62C129:
xor	al, al
retn	4

loc_62C12E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+19Ch]
push	edx
call	eax
test	eax, eax
jz	short loc_62C129
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+1Ch]
call	eax
test	al, al
setnz	al
retn	4
sub_62C120 endp

align 10h



sub_62C160 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+118h], 1
jnz	short loc_62C16E

loc_62C169:
xor	al, al
retn	4

loc_62C16E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+19Ch]
push	edx
call	eax
test	eax, eax
jz	short loc_62C169
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+20h]
push	0
call	eax
test	al, al
setnz	al
retn	4
sub_62C160 endp

align 10h


; Attributes: bp-based frame

sub_62C1A0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
test	byte ptr [ecx+118h], 1
push	ebx
push	esi
push	edi
jnz	short loc_62C1BE

loc_62C1B3:
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_62C1BE:
mov	ebx, [ebp+arg_0]
lea	edi, [ecx+84h]
mov	ecx, ebx
mov	eax, edi
call	sub_630E70
mov	esi, eax
mov	ecx, ebx
mov	eax, edi
call	sub_630EF0
mov	edi, eax
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_62C208

loc_62C1E6:
mov	ecx, [esi+28h]
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
test	al, al
jz	short loc_62C1B3
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_62C1E6

loc_62C208:
pop	edi
pop	esi
mov	al, 1
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_62C1A0 endp

align 10h


; Attributes: bp-based frame

sub_62C220 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
test	byte ptr [ecx+118h], 1
push	ebx
push	esi
push	edi
jnz	short loc_62C23E

loc_62C233:
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_62C23E:
mov	ebx, [ebp+arg_0]
lea	edi, [ecx+84h]
mov	ecx, ebx
mov	eax, edi
call	sub_630E70
mov	esi, eax
mov	ecx, ebx
mov	eax, edi
call	sub_630EF0
mov	edi, eax
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_62C28A

loc_62C266:
mov	ecx, [esi+28h]
mov	eax, [ecx]
mov	edx, [eax+20h]
push	0
call	edx
test	al, al
jz	short loc_62C233
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_62C266

loc_62C28A:
pop	edi
pop	esi
mov	al, 1
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_62C220 endp

align 10h



sub_62C2A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+118h], 1
jnz	short loc_62C2AE

loc_62C2A9:
xor	al, al
retn	8

loc_62C2AE:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+19Ch]
push	edx
call	eax
test	eax, eax
jz	short loc_62C2A9
mov	ecx, [esp+arg_4]
mov	edx, [eax]
mov	edx, [edx+34h]
push	ecx
mov	ecx, eax
call	edx
test	al, al
setnz	al
retn	8
sub_62C2A0 endp

align 10h



sub_62C2E0 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62C2EE
xor	al, al
retn	4

loc_62C2EE:
mov	eax, [ecx]
mov	eax, [eax+178h]
jmp	eax
sub_62C2E0 endp

align 10h



sub_62C300 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62C312
xor	al, al
pop	esi
retn	0Ch

loc_62C312:
cmp	[esp+4+arg_4], 0
mov	ecx, [esp+4+arg_8]
mov	eax, [esi]
push	edi
mov	edi, [esp+8+arg_0]
push	ecx
push	edi
mov	ecx, esi
jnz	short loc_62C34A
mov	edx, [eax+74h]
call	edx
test	al, al
jnz	short loc_62C36C
mov	eax, [esi]
mov	edx, [eax+180h]
push	edi
lea	ecx, [esi+9Ch]
push	ecx
mov	ecx, esi
call	edx
pop	edi
pop	esi
retn	0Ch

loc_62C34A:
mov	edx, [eax+78h]
call	edx
test	al, al
jnz	short loc_62C36C
mov	eax, [esi]
mov	edx, [eax+180h]
push	edi
lea	ecx, [esi+9Ch]
push	ecx
mov	ecx, esi
call	edx
pop	edi
pop	esi
retn	0Ch

loc_62C36C:
mov	eax, [esi]
mov	edx, [eax+188h]
push	edi
mov	ecx, esi
call	edx
pop	edi
mov	al, 1
pop	esi
retn	0Ch
sub_62C300 endp




sub_62C380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62C392
xor	al, al
pop	esi
retn	8

loc_62C392:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62C3BF
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+1B0h]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62C3C6

loc_62C3BF:
pop	edi
xor	al, al
pop	esi
retn	8

loc_62C3C6:
mov	edx, [edi]
push	eax
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
pop	edi
pop	esi
retn	8
sub_62C380 endp

align 10h



sub_62C3E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62C3F2
xor	al, al
pop	esi
retn	8

loc_62C3F2:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62C41F
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+1B0h]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62C426

loc_62C41F:
pop	edi
xor	al, al
pop	esi
retn	8

loc_62C426:
mov	edx, [edi]
push	eax
mov	eax, [edx+14h]
mov	ecx, edi
call	eax
pop	edi
pop	esi
retn	8
sub_62C3E0 endp

align 10h



sub_62C440 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	0FFFFFFFFh
push	offset loc_12E76B8
mov	eax, large fs:0
push	eax
sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
test	byte ptr [ecx+118h], 1
jnz	short loc_62C480

loc_62C46C:
xor	al, al
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 1Ch
retn	10h

loc_62C480:
mov	eax, [ecx]
mov	edx, [esp+20h+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C46C
movss	xmm0, [esp+20h+arg_4]
movss	[esp+20h+var_18], xmm0
movss	xmm0, [esp+20h+arg_8]
movss	[esp+20h+var_14], xmm0
movss	xmm0, [esp+20h+arg_C]
mov	[esp+20h+var_1C], offset off_15FAE00
movss	[esp+20h+var_10], xmm0
mov	[esp+20h+var_4], 0
mov	edx, [eax]
mov	edx, [edx+40h]
lea	ecx, [esp+20h+var_1C]
push	ecx
mov	ecx, eax
call	edx
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 1Ch
retn	10h
sub_62C440 endp

align 10h


; Attributes: bp-based frame

sub_62C4F0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12FF528
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
test	byte ptr [ecx+118h], 1
jnz	short loc_62C536

loc_62C522:
xor	al, al
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	esp, ebp
pop	ebp
retn	10h

loc_62C536:
mov	eax, [ecx]
mov	edx, [ebp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C522
xorps	xmm0, xmm0
mov	[esp+24h+var_20], offset off_15FAE00
movss	[esp+24h+var_1C], xmm0
movss	[esp+24h+var_18], xmm0
movss	[esp+24h+var_14], xmm0
mov	[esp+24h+var_4], 0
mov	edx, [eax]
mov	edx, [edx+44h]
lea	ecx, [esp+24h+var_20]
push	ecx
mov	ecx, eax
call	edx
test	al, al
jz	short loc_62C522
mov	eax, [ebp+arg_4]
movss	xmm0, [esp+24h+var_1C]
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_C]
movss	dword ptr [eax], xmm0
movss	xmm0, [esp+24h+var_18]
movss	dword ptr [ecx], xmm0
movss	xmm0, [esp+24h+var_14]
movss	dword ptr [edx], xmm0
mov	al, 1
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_62C4F0 endp

align 10h



sub_62C5C0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	0FFFFFFFFh
push	offset loc_12E76B8
mov	eax, large fs:0
push	eax
sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
test	byte ptr [ecx+118h], 1
jnz	short loc_62C600

loc_62C5EC:
xor	al, al
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 1Ch
retn	10h

loc_62C600:
mov	eax, [ecx]
mov	edx, [esp+20h+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C5EC
movss	xmm0, [esp+20h+arg_4]
movss	[esp+20h+var_18], xmm0
movss	xmm0, [esp+20h+arg_8]
movss	[esp+20h+var_14], xmm0
movss	xmm0, [esp+20h+arg_C]
mov	[esp+20h+var_1C], offset off_15FAE00
movss	[esp+20h+var_10], xmm0
mov	[esp+20h+var_4], 0
mov	edx, [eax]
mov	edx, [edx+48h]
lea	ecx, [esp+20h+var_1C]
push	ecx
mov	ecx, eax
call	edx
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 1Ch
retn	10h
sub_62C5C0 endp

align 10h


; Attributes: bp-based frame

sub_62C670 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12FF528
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
test	byte ptr [ecx+118h], 1
jnz	short loc_62C6B6

loc_62C6A2:
xor	al, al
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	esp, ebp
pop	ebp
retn	10h

loc_62C6B6:
mov	eax, [ecx]
mov	edx, [ebp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C6A2
xorps	xmm0, xmm0
mov	[esp+24h+var_20], offset off_15FAE00
movss	[esp+24h+var_1C], xmm0
movss	[esp+24h+var_18], xmm0
movss	[esp+24h+var_14], xmm0
mov	[esp+24h+var_4], 0
mov	edx, [eax]
mov	edx, [edx+4Ch]
lea	ecx, [esp+24h+var_20]
push	ecx
mov	ecx, eax
call	edx
test	al, al
jz	short loc_62C6A2
mov	eax, [ebp+arg_4]
movss	xmm0, [esp+24h+var_1C]
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_C]
movss	dword ptr [eax], xmm0
movss	xmm0, [esp+24h+var_18]
movss	dword ptr [ecx], xmm0
movss	xmm0, [esp+24h+var_14]
movss	dword ptr [edx], xmm0
mov	al, 1
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_62C670 endp

align 10h



; int __stdcall	sub_62C740(int,	int, float)
sub_62C740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

test	byte ptr [ecx+118h], 1
jnz	short loc_62C74E

loc_62C749:
xor	al, al
retn	0Ch

loc_62C74E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C749
fld	[esp+arg_8]
mov	edx, [eax]
mov	edx, [edx+50h]
push	ecx
mov	ecx, [esp+4+arg_4]
fstp	[esp+4+var_4]
push	ecx
mov	ecx, eax
call	edx
retn	0Ch
sub_62C740 endp

align 10h



sub_62C780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

test	byte ptr [ecx+118h], 1
jnz	short loc_62C78E

loc_62C789:
xor	al, al
retn	0Ch

loc_62C78E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C789
mov	ecx, [esp+arg_8]
mov	edx, [eax]
mov	edx, [edx+54h]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
mov	ecx, eax
call	edx
retn	0Ch
sub_62C780 endp

align 10h



sub_62C7C0 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+118h], 1
jnz	short loc_62C7CE

loc_62C7C9:
xor	al, al
retn	4

loc_62C7CE:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C7C9
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+58h]
call	eax
test	al, al
setnz	al
retn	4
sub_62C7C0 endp

align 10h



sub_62C800 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+118h], 1
jnz	short loc_62C80E

loc_62C809:
xor	al, al
retn	4

loc_62C80E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62C809
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+5Ch]
call	eax
test	al, al
setnz	al
retn	4
sub_62C800 endp

align 10h



sub_62C840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62C852
xor	al, al
pop	esi
retn	1Ch

loc_62C852:
mov	eax, off_17F1758
mov	edx, [eax+8]
push	ebx
mov	ebx, [esp+8+arg_4]
push	ebx
mov	ecx, offset off_17F1758
call	edx
test	al, al
jz	short loc_62C872
pop	ebx
xor	al, al
pop	esi
retn	1Ch

loc_62C872:
mov	ecx, [esp+8+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62C89B
mov	eax, [esi]
mov	edx, [eax+19Ch]
push	ebx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62C8A3

loc_62C89B:
pop	edi
pop	ebx
xor	al, al
pop	esi
retn	1Ch

loc_62C8A3:
mov	ecx, [esp+0Ch+arg_18]
mov	edx, [edi]
mov	edx, [edx+1Ch]
push	ecx
mov	ecx, [esp+10h+arg_14]
push	ecx
mov	ecx, [esp+14h+arg_10]
push	ecx
mov	ecx, [esp+18h+arg_C]
push	ecx
mov	ecx, [esp+1Ch+arg_8]
push	ecx
push	eax
mov	ecx, edi
call	edx
pop	edi
pop	ebx
pop	esi
retn	1Ch
sub_62C840 endp

align 10h



sub_62C8D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62C8E2
xor	al, al
pop	esi
retn	1Ch

loc_62C8E2:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62C90F
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+1ACh]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62C916

loc_62C90F:
pop	edi
xor	al, al
pop	esi
retn	1Ch

loc_62C916:
mov	ecx, [esp+8+arg_18]
mov	edx, [edi]
mov	edx, [edx+18h]
push	ecx
mov	ecx, [esp+0Ch+arg_14]
push	ecx
mov	ecx, [esp+10h+arg_10]
push	ecx
mov	ecx, [esp+14h+arg_C]
push	ecx
mov	ecx, [esp+18h+arg_8]
push	ecx
push	eax
mov	ecx, edi
call	edx
pop	edi
pop	esi
retn	1Ch
sub_62C8D0 endp

align 10h



sub_62C940 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62C952
xor	al, al
pop	esi
retn	0Ch

loc_62C952:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62C97F
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+19Ch]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62C986

loc_62C97F:
pop	edi
xor	al, al
pop	esi
retn	0Ch

loc_62C986:
mov	ecx, [esp+8+arg_8]
mov	edx, [edi]
mov	edx, [edx+24h]
push	ecx
push	eax
mov	ecx, edi
call	edx
pop	edi
pop	esi
retn	0Ch
sub_62C940 endp

align 10h



sub_62C9A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62C9B2
xor	al, al
pop	esi
retn	0Ch

loc_62C9B2:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62C9DF
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+1ACh]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62C9E6

loc_62C9DF:
pop	edi
xor	al, al
pop	esi
retn	0Ch

loc_62C9E6:
mov	ecx, [esp+8+arg_8]
mov	edx, [edi]
mov	edx, [edx+20h]
push	ecx
push	eax
mov	ecx, edi
call	edx
pop	edi
pop	esi
retn	0Ch
sub_62C9A0 endp

align 10h



sub_62CA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+118h], 1
jnz	short loc_62CA0E

loc_62CA09:
xor	al, al
retn	8

loc_62CA0E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62CA09
mov	ecx, [esp+arg_4]
mov	edx, [eax]
mov	edx, [edx+28h]
push	ecx
mov	ecx, eax
call	edx
retn	8
sub_62CA00 endp

align 10h



sub_62CA40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+118h], 1
jnz	short loc_62CA4E

loc_62CA49:
xor	al, al
retn	8

loc_62CA4E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62CA49
mov	ecx, [esp+arg_4]
mov	edx, [eax]
mov	edx, [edx+2Ch]
push	ecx
mov	ecx, eax
call	edx
retn	8
sub_62CA40 endp

align 10h



sub_62CA80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62CA92
xor	al, al
pop	esi
retn	10h

loc_62CA92:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62CABF
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+19Ch]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62CAC6

loc_62CABF:
pop	edi
xor	al, al
pop	esi
retn	10h

loc_62CAC6:
mov	ecx, [esp+8+arg_C]
mov	edx, [edi]
mov	edx, [edx+38h]
push	0
push	ecx
mov	ecx, [esp+10h+arg_8]
push	ecx
push	eax
mov	ecx, edi
call	edx
pop	edi
pop	esi
retn	10h
sub_62CA80 endp

align 10h



sub_62CAF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
test	byte ptr [esi+118h], 1
jnz	short loc_62CB02
xor	al, al
pop	esi
retn	10h

loc_62CB02:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_62CB2F
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+1ACh]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62CB36

loc_62CB2F:
pop	edi
xor	al, al
pop	esi
retn	10h

loc_62CB36:
mov	ecx, [esp+8+arg_C]
mov	edx, [edi]
mov	edx, [edx+34h]
push	0
push	ecx
mov	ecx, [esp+10h+arg_8]
push	ecx
push	eax
mov	ecx, edi
call	edx
pop	edi
pop	esi
retn	10h
sub_62CAF0 endp

align 10h



sub_62CB60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

test	byte ptr [ecx+118h], 1
jnz	short loc_62CB6E

loc_62CB69:
xor	al, al
retn	0Ch

loc_62CB6E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+1A0h]
push	edx
call	eax
test	eax, eax
jz	short loc_62CB69
mov	ecx, [esp+arg_4]
mov	edx, [eax]
mov	edx, [edx+3Ch]
push	ecx
mov	ecx, [esp+4+arg_8]
push	ecx
mov	ecx, eax
call	edx
retn	0Ch
sub_62CB60 endp

align 10h



sub_62CBA0 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CBAE
xor	al, al
retn	4

loc_62CBAE:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+18h]
jmp	eax
sub_62CBA0 endp

align 10h



sub_62CBC0 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CBCE
xor	al, al
retn	4

loc_62CBCE:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+1Ch]
jmp	eax
sub_62CBC0 endp

align 10h



sub_62CBE0 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CBEE
xor	al, al
retn	8

loc_62CBEE:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+20h]
jmp	eax
sub_62CBE0 endp

align 10h



; int __stdcall	sub_62CC00(int,	float)
sub_62CC00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+118h], 1
jnz	short loc_62CC0E
xor	al, al
retn	8

loc_62CC0E:
mov	ecx, [ecx+114h]
fld	[esp+arg_4]
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+24h]
push	ecx
fstp	[esp+4+var_4]
push	edx
call	eax
retn	8
sub_62CC00 endp

align 10h



sub_62CC30 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CC3E
xor	al, al
retn	4

loc_62CC3E:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+2Ch]
jmp	eax
sub_62CC30 endp

align 10h



sub_62CC50 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CC5E
xor	al, al
retn	8

loc_62CC5E:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+34h]
jmp	eax
sub_62CC50 endp

align 10h



sub_62CC70 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CC7E
xor	al, al
retn	4

loc_62CC7E:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+28h]
jmp	eax
sub_62CC70 endp

align 10h



sub_62CC90 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CC9E
xor	al, al
retn	8

loc_62CC9E:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+30h]
jmp	eax
sub_62CC90 endp

align 10h



sub_62CCB0 proc	near
test	byte ptr [ecx+118h], 1
jnz	short loc_62CCBE
xor	al, al
retn	4

loc_62CCBE:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	eax, [eax+38h]
jmp	eax
sub_62CCB0 endp

align 10h



sub_62CCD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+118h], 1
jnz	short loc_62CCDE

loc_62CCD9:
xor	al, al
retn	8

loc_62CCDE:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+19Ch]
push	edx
call	eax
test	eax, eax
jz	short loc_62CCD9
mov	ecx, [esp+arg_4]
add	eax, 0C4h
cmp	eax, ecx
jz	short loc_62CD0B
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_62CD0B:
mov	al, 1
retn	8
sub_62CCD0 endp




sub_62CD10 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
test	byte ptr [ebx+118h], 1
jnz	short loc_62CD22
xor	al, al
pop	ebx
retn	4

loc_62CD22:
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ecx, edi
call	sub_5F1A80
mov	esi, [ebx+8Ch]
lea	eax, [ebx+84h]
mov	[esp+0Ch+arg_0], eax
cmp	esi, eax
jz	short loc_62CD87
push	ebp

loc_62CD44:
lea	ebx, [esi+10h]
push	ebx
mov	ecx, edi
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
push	eax
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
call	sub_5F1B00
add	esp, 0Ch
mov	ecx, edi
mov	ebp, eax
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
cmp	eax, ebp
jnz	short loc_62CD75
push	ebx
mov	ecx, edi
call	sub_456330

loc_62CD75:
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, [esp+10h+arg_0]
jnz	short loc_62CD44
pop	ebp

loc_62CD87:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_62CD10 endp

align 10h



sub_62CD90 proc	near

var_38=	dword ptr -38h
var_24=	byte ptr -24h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_130A52A
mov	eax, large fs:0
push	eax
sub	esp, 2Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+4Ch+var_C]
mov	large fs:0, eax
mov	edi, ecx
test	byte ptr [edi+118h], 1
jnz	short loc_62CDC9
xor	al, al
jmp	loc_62CE75

loc_62CDC9:
mov	esi, [esp+4Ch+arg_4]
mov	ecx, [esi+4]
mov	eax, [esi]
cmp	eax, ecx
jz	short loc_62CDDD
push	eax
push	esi
call	sub_62F7B0

loc_62CDDD:
mov	ebp, [esp+4Ch+arg_0]
add	edi, 84h
mov	ecx, ebp
mov	eax, edi
call	sub_630EF0
mov	ebx, eax
mov	ecx, ebp
mov	eax, edi
call	sub_630E70
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_62CE73

loc_62CE01:
mov	ecx, [ebp+28h]
mov	edx, [ecx]
lea	eax, [ecx+0C4h]
push	eax
mov	eax, [edx+40h]
call	eax
push	eax
lea	ecx, [esp+54h+var_38]
push	ecx
call	sub_62F650
mov	ecx, eax
mov	[esp+4Ch+var_4], 0
mov	edi, [esi+4]
cmp	edi, [esi+8]
jz	short loc_62CE3E
push	edi
call	sub_630760
add	esp, 4
add	dword ptr [esi+4], 2Ch
jmp	short loc_62CE43

loc_62CE3E:
call	sub_62F720

loc_62CE43:
lea	ecx, [esp+4Ch+var_24]
mov	[esp+4Ch+var_4], 1
call	sub_407910
mov	[esp+4Ch+var_4], 0FFFFFFFFh
push	ebp
mov	[esp+50h+var_38], offset off_1556AA4
call	sub_77E2F0
mov	ebp, eax
add	esp, 4
cmp	ebp, ebx
jnz	short loc_62CE01

loc_62CE73:
mov	al, 1

loc_62CE75:
mov	ecx, [esp+4Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 38h
retn	8
sub_62CD90 endp

align 10h



sub_62CE90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1308788
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
lea	ecx, [esi+14h]
mov	[esp+14h+var_4], 0
call	sub_407910
mov	dword ptr [esi], offset	off_1556AA4
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_62CE90 endp

align 10h



sub_62CEE0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_130BA5A
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	[esp+30h+var_1C], edi
test	byte ptr [edi+118h], 1
jz	loc_62D014
mov	ebp, [esp+30h+arg_0]
mov	ecx, ebp
call	sub_5F1A80
mov	esi, [esp+30h+arg_4]
mov	eax, [esi+4]
mov	ecx, [esi]
cmp	ecx, eax
jz	short loc_62CF3A
push	eax
push	ecx
push	esi
call	sub_62F9E0

loc_62CF3A:
mov	eax, [edi]
mov	edx, [eax+0B0h]
push	ebp
mov	ecx, edi
call	edx
test	al, al
jz	loc_62D014
mov	ecx, ebp
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, ebp
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
call	sub_630150
mov	ecx, ebp
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, ebp
mov	ebx, eax
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
cmp	ebx, eax
jz	short loc_62CFEA
jmp	short loc_62CF80
align 10h

loc_62CF80:
xor	eax, eax
mov	[esp+30h+var_18], eax
mov	[esp+30h+var_14], eax
mov	[esp+30h+var_10], eax
mov	ecx, [esp+30h+var_1C]
mov	[esp+30h+var_4], eax
mov	eax, [ecx]
mov	eax, [eax+0B4h]
lea	edx, [esp+30h+var_18]
push	edx
push	ebx
call	eax
test	al, al
jz	short loc_62D002
mov	edi, [esi+4]
lea	ecx, [esp+30h+var_18]
cmp	edi, [esi+8]
jz	short loc_62CFC5
push	edi
call	sub_6307C0
add	esp, 4
add	dword ptr [esi+4], 0Ch
jmp	short loc_62CFCA

loc_62CFC5:
call	sub_62F950

loc_62CFCA:
lea	ecx, [esp+30h+var_18]
push	ecx
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_62F5A0
mov	ecx, ebp
add	ebx, 18h
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
cmp	ebx, eax
jnz	short loc_62CF80

loc_62CFEA:
mov	al, 1

loc_62CFEC:
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	8

loc_62D002:
lea	edx, [esp+30h+var_18]
push	edx
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_62F5A0

loc_62D014:
xor	al, al
jmp	short loc_62CFEC
sub_62CEE0 endp

align 10h



sub_62D020 proc	near

var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304E2B
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+1Ch+arg_0]
xor	ebx, ebx
mov	[esp+1Ch+var_4], ebx
lea	eax, [esi+10h]
mov	dword ptr [esi], offset	off_15FAC48
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, offset off_17F1718
jz	short loc_62D093
movss	xmm0, dword_17F171C
movss	dword ptr [eax+4], xmm0
movss	xmm0, dword_17F1720
movss	dword ptr [eax+8], xmm0
movss	xmm0, dword_17F1724
movss	dword ptr [eax+0Ch], xmm0

loc_62D093:
lea	eax, [esi+20h]
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, offset off_17F1718
jz	short loc_62D0CA
movss	xmm0, dword_17F171C
movss	dword ptr [eax+4], xmm0
movss	xmm0, dword_17F1720
movss	dword ptr [eax+8], xmm0
movss	xmm0, dword_17F1724
movss	dword ptr [eax+0Ch], xmm0

loc_62D0CA:
lea	eax, [esi+30h]
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, offset off_17F1738
jz	short loc_62D101
movss	xmm0, dword_17F173C
movss	dword ptr [eax+4], xmm0
movss	xmm0, dword_17F1740
movss	dword ptr [eax+8], xmm0
movss	xmm0, dword_17F1744
movss	dword ptr [eax+0Ch], xmm0

loc_62D101:
lea	eax, [esi+40h]
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, offset off_17F1748
jz	short loc_62D138
movss	xmm0, dword_17F174C
movss	dword ptr [eax+4], xmm0
movss	xmm0, dword_17F1750
movss	dword ptr [eax+8], xmm0
movss	xmm0, dword_17F1754
movss	dword ptr [eax+0Ch], xmm0

loc_62D138:
lea	eax, [esi+54h]
mov	[esi+50h], ebx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
lea	eax, [esi+6Ch]
mov	[eax], ecx
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
lea	eax, [esi+84h]
mov	[eax], ecx
movzx	ecx, byte ptr [esp+1Ch+arg_0]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
mov	[eax+14h], cl
movzx	edx, [esp+1Ch+var_D]
lea	eax, [esi+9Ch]
xor	ecx, ecx
mov	[eax], ecx
lea	ecx, [esp+1Ch+var_D]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
mov	[eax+14h], dl
call	sub_438430
lea	eax, [esi+0B4h]
xor	ecx, ecx
mov	[eax], ecx
movzx	ecx, [esp+1Ch+var_D]
mov	[eax+14h], cl
lea	ecx, [esp+1Ch+var_D]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
call	sub_438430
movzx	edx, byte ptr [esp+1Ch+arg_0]
lea	eax, [esi+0CCh]
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
mov	[eax+14h], dl
lea	eax, [esi+0E4h]
mov	[eax], ecx
movzx	ecx, byte ptr [esp+1Ch+arg_0]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
mov	[eax+14h], cl
lea	eax, [esi+0FCh]
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], bl
mov	[eax+4], ebx
movzx	edx, byte ptr [esp+1Ch+arg_0]
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
mov	[eax+14h], dl
and	byte ptr [esi+118h], 0FCh
mov	[esi+114h], ebx
mov	[esi+11Ch], ebx
mov	[esi+120h], ebx
mov	[esi+124h], ebx
mov	[esi+128h], ebx
mov	[esi+12Ch], ebx
mov	[esi+130h], ebx
push	offset sub_632070
push	offset sub_62D2F0
push	8
push	10h
lea	eax, [esi+134h]
push	eax
mov	byte ptr [esp+30h+var_4], 0Dh
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
mov	eax, esi
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_62D020 endp

align 10h



; int __thiscall sub_62D2A0(void *, char)
sub_62D2A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_62D310
test	[esp+4+arg_0], 1
jz	short loc_62D2B8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_62D2B8:
mov	eax, esi
pop	esi
retn	4
sub_62D2A0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1304DB4

loc_62D2C0:
cmp	dword ptr [esi+10h], 0
jz	short locret_62D2E5
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_62FC60
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

locret_62D2E5:
retn
; END OF FUNCTION CHUNK	FOR sub_1304DB4
align 10h



sub_62D2F0 proc	near
xorps	xmm0, xmm0
mov	dword ptr [ecx], offset	off_15FAE00
movss	dword ptr [ecx+4], xmm0
movss	dword ptr [ecx+8], xmm0
movss	dword ptr [ecx+0Ch], xmm0
retn
sub_62D2F0 endp

align 10h



sub_62D310 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_13068AB
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+20h+var_10], esi
mov	dword ptr [esi], offset	off_15FAC48
mov	[esp+20h+var_4], 0Dh
call	sub_5F18C0
push	offset sub_632070
push	8
push	10h
lea	eax, [esi+134h]
push	eax
call	$LN21_0
lea	ecx, [esi+128h]
push	ecx
mov	byte ptr [esp+24h+var_4], 0Ch
call	sub_646870
lea	edi, [esi+0FCh]
xor	ebx, ebx
mov	byte ptr [esp+20h+var_4], 0Bh
cmp	[edi+10h], ebx
jz	short loc_62D39C
mov	edx, [edi+4]
push	edx
mov	ecx, edi
call	sub_63D550
mov	[edi+8], edi
mov	[edi+4], ebx
mov	[edi+0Ch], edi
mov	[edi+10h], ebx

loc_62D39C:
lea	edi, [esi+0E4h]
mov	byte ptr [esp+20h+var_4], 0Ah
cmp	[edi+10h], ebx
jz	short loc_62D3C3
mov	eax, [edi+4]
push	eax
mov	ecx, edi
call	sub_63D550
mov	[edi+8], edi
mov	[edi+4], ebx
mov	[edi+0Ch], edi
mov	[edi+10h], ebx

loc_62D3C3:
lea	edi, [esi+0CCh]
mov	byte ptr [esp+20h+var_4], 9
cmp	[edi+10h], ebx
jz	short loc_62D3EA
mov	ecx, [edi+4]
push	ecx
mov	ecx, edi
call	sub_63D550
mov	[edi+8], edi
mov	[edi+4], ebx
mov	[edi+0Ch], edi
mov	[edi+10h], ebx

loc_62D3EA:
lea	eax, [esi+0B4h]
push	eax
mov	byte ptr [esp+24h+var_4], 8
call	sub_636980
lea	eax, [esi+9Ch]
push	eax
mov	byte ptr [esp+24h+var_4], 7
call	sub_636980
lea	edi, [esi+84h]
mov	byte ptr [esp+20h+var_4], 6
cmp	[edi+10h], ebx
jz	short loc_62D433
mov	edx, [edi+4]
push	edx
mov	ecx, edi
call	sub_63D550
mov	[edi+8], edi
mov	[edi+4], ebx
mov	[edi+0Ch], edi
mov	[edi+10h], ebx

loc_62D433:
lea	edi, [esi+6Ch]
mov	byte ptr [esp+20h+var_4], 5
cmp	[edi+10h], ebx
jz	short loc_62D457
mov	eax, [edi+4]
push	eax
mov	ecx, edi
call	sub_62FC60
mov	[edi+8], edi
mov	[edi+4], ebx
mov	[edi+0Ch], edi
mov	[edi+10h], ebx

loc_62D457:
lea	edi, [esi+54h]
mov	byte ptr [esp+20h+var_4], 4
cmp	[edi+10h], ebx
jz	short loc_62D47B
mov	ecx, [edi+4]
push	ecx
mov	ecx, edi
call	sub_62FC60
mov	[edi+8], edi
mov	[edi+4], ebx
mov	[edi+0Ch], edi
mov	[edi+10h], ebx

loc_62D47B:
mov	eax, offset off_15FAE00
mov	[esi+40h], eax
mov	[esi+30h], eax
mov	[esi+20h], eax
mov	[esi+10h], eax
mov	dword ptr [esi], offset	off_15FB038
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn
sub_62D310 endp

align 10h



sub_62D4B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
retn	4
sub_62D4B0 endp




; int __stdcall	sub_62D4C0(void	*)
sub_62D4C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
pop	ecx
retn	4
sub_62D4C0 endp

align 10h



sub_62D4D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	ecx, [eax+10h]
mov	edx, [eax+0Ch]
mov	eax, [eax+8]
push	0FFFFFFFFh
push	ecx
mov	ecx, [esp+8+arg_4]
push	edx
push	eax
mov	eax, [esp+10h+arg_8]
push	eax
push	ecx
call	FMOD_Memory_Initialize
test	eax, eax
setz	al
retn	0Ch
sub_62D4D0 endp

align 10h



sub_62D500 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi]
mov	ebx, ecx
test	esi, esi
jz	short loc_62D563
cmp	dword ptr [edi+8], 0
jnz	loc_62D59A
cmp	dword ptr [edi+0Ch], 0
jnz	short loc_62D59A
cmp	dword ptr [edi+10h], 0
jnz	short loc_62D59A
cmp	esi, 100000h
jnb	short loc_62D534
mov	esi, 100000h
jmp	short loc_62D541

loc_62D534:
cmp	esi, 4000000h
jbe	short loc_62D541
mov	esi, 4000000h

loc_62D541:
test	esi, 1FFh
jnz	short loc_62D59A
mov	eax, [edi+4]
test	eax, eax
jnz	short loc_62D579
mov	eax, [ebx]
mov	edx, [eax+0D0h]
push	esi
call	edx
mov	[ebx+120h], eax
jmp	short loc_62D579

loc_62D563:
cmp	dword ptr [edi+8], 0
jz	short loc_62D59A
cmp	dword ptr [edi+0Ch], 0
jz	short loc_62D59A
cmp	dword ptr [edi+10h], 0
jz	short loc_62D59A
xor	esi, esi
xor	eax, eax

loc_62D579:
mov	edx, [ebx]
push	esi
push	eax
mov	eax, [edx+0D8h]
push	edi
mov	ecx, ebx
call	eax
test	al, al
jz	short loc_62D59A
pop	edi
mov	[ebx+11Ch], esi
pop	esi
mov	al, 1
pop	ebx
retn	4

loc_62D59A:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4
sub_62D500 endp

align 10h



sub_62D5B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	1
push	0
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], 0
call	FMOD_Memory_GetStats
test	eax, eax
jz	short loc_62D5D1
xor	al, al
pop	ecx
retn	4

loc_62D5D1:
mov	ecx, [esp+4+arg_0]
mov	edx, [esp+4+var_4]
mov	[ecx], edx
mov	al, 1
pop	ecx
retn	4
sub_62D5B0 endp




sub_62D5E0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+0E0h]
lea	ecx, [esp+8+var_4]
push	ecx
mov	ecx, esi
mov	[esp+0Ch+var_4], 0
call	edx
fild	[esp+8+var_4]
mov	eax, [esp+8+var_4]
test	eax, eax
jge	short loc_62D60F
fadd	ds:flt_15FCC08

loc_62D60F:
mov	ecx, [esi+11Ch]
fild	dword ptr [esi+11Ch]
test	ecx, ecx
jge	short loc_62D625
fadd	ds:flt_15FCC08

loc_62D625:
fmul	ds:dbl_15FCC00
pop	esi
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_62D63E
mov	al, 1
pop	ecx
retn

loc_62D63E:
xor	al, al
pop	ecx
retn
sub_62D5E0 endp

align 10h



sub_62D650 proc	near
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+8]
push	edi
call	_FMOD_EventSystem_Create@4 ; FMOD_EventSystem_Create(x)
test	eax, eax
jz	short loc_62D668
pop	edi
xor	al, al
pop	esi
retn	4

loc_62D668:
mov	eax, [edi]
add	esi, 4
push	esi
push	eax
call	?getSystemObject@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVSystem@2@@Z	; FMOD::EventSystem::getSystemObject(FMOD::System * *)
test	eax, eax
pop	edi
setz	al
pop	esi
retn	4
sub_62D650 endp

align 10h



sub_62D680 proc	near

var_4= dword ptr -4

push	ecx
mov	ecx, [ecx+4]
lea	eax, [esp+4+var_4]
push	eax
push	ecx
mov	[esp+0Ch+var_4], 0
call	?getVersion@System@FMOD@@QAG?AW4FMOD_RESULT@@PAI@Z ; FMOD::System::getVersion(uint *)
test	eax, eax
jz	short loc_62D69E
xor	al, al
pop	ecx
retn

loc_62D69E:
cmp	[esp+4+var_4], 43206h
setz	al
pop	ecx
retn
sub_62D680 endp

align 10h


; Attributes: bp-based frame

sub_62D6B0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 54h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
test	byte ptr [esi+14h], 1
push	edi
mov	edi, ecx
jz	short loc_62D6E1
mov	eax, [edi+4]
push	2
push	eax
call	?setOutput@System@FMOD@@QAG?AW4FMOD_RESULT@@W4FMOD_OUTPUTTYPE@@@Z ; FMOD::System::setOutput(FMOD_OUTPUTTYPE)
test	eax, eax
jz	short loc_62D6E1

loc_62D6D6:
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_62D6E1:
mov	eax, [esi+18h]
cmp	eax, 20h
jnb	short loc_62D6F0
mov	ebx, 20h
jmp	short loc_62D6FE

loc_62D6F0:
mov	ebx, 100h
cmp	eax, 100h
ja	short loc_62D6FE
mov	ebx, eax

loc_62D6FE:
mov	ecx, [edi+4]
push	ebx
push	ecx
call	?setSoftwareChannels@System@FMOD@@QAG?AW4FMOD_RESULT@@H@Z ; FMOD::System::setSoftwareChannels(int)
test	eax, eax
jnz	short loc_62D6D6
mov	ecx, [esi+20h]
cmp	ecx, 5622h
jnb	short loc_62D71E
mov	ecx, 5622h
jmp	short loc_62D72B

loc_62D71E:
cmp	ecx, 0BB80h
jbe	short loc_62D72B
mov	ecx, 0BB80h

loc_62D72B:
mov	dl, [esi+14h]
and	dl, 2
sub	dl, 2
movzx	eax, dl
neg	eax
push	1
sbb	eax, eax
push	6
and	eax, 0FFFFFFFDh
push	0
add	eax, 5
push	eax
mov	eax, [edi+4]
push	ecx
push	eax
call	?setSoftwareFormat@System@FMOD@@QAG?AW4FMOD_RESULT@@HW4FMOD_SOUND_FORMAT@@HHW4FMOD_DSP_RESAMPLER@@@Z ; FMOD::System::setSoftwareFormat(int,FMOD_SOUND_FORMAT,int,int,FMOD_DSP_RESAMPLER)
test	eax, eax
jnz	short loc_62D6D6
mov	eax, [esi+24h]
cmp	eax, 4
jge	short loc_62D765
mov	eax, 4
jmp	short loc_62D76F

loc_62D765:
cmp	eax, 0Ah
jle	short loc_62D76F
mov	eax, 0Ah

loc_62D76F:
mov	ecx, [edi+4]
push	eax
push	400h
push	ecx
call	?setDSPBufferSize@System@FMOD@@QAG?AW4FMOD_RESULT@@IH@Z	; FMOD::System::setDSPBufferSize(uint,int)
test	eax, eax
jnz	loc_62D6D6
push	50h		; size_t
push	eax		; int
lea	edx, [esp+68h+var_50]
push	edx		; void *
call	_memset
mov	al, [esi+14h]
add	esp, 0Ch
mov	[esp+60h+var_50], 50h
mov	[esp+60h+var_4C], ebx
test	al, 4
jnz	short loc_62D7B1
mov	[esp+60h+var_4C], 1

loc_62D7B1:
mov	[esp+60h+var_48], ebx
test	al, 8
jnz	short loc_62D7C1
mov	[esp+60h+var_48], 1

loc_62D7C1:
mov	ecx, [edi+4]
lea	eax, [esp+60h+var_50]
push	eax
push	ecx
call	?setAdvancedSettings@System@FMOD@@QAG?AW4FMOD_RESULT@@PAUFMOD_ADVANCEDSETTINGS@@@Z ; FMOD::System::setAdvancedSettings(FMOD_ADVANCEDSETTINGS *)
pop	edi
test	eax, eax
pop	esi
setz	al
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_62D6B0 endp

align 10h



sub_62D7E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	byte ptr [eax+14h], 10h
mov	edx, 80h
jz	short loc_62D7F4
mov	edx, 82h

loc_62D7F4:
mov	eax, [eax+1Ch]
cmp	eax, 20h
jnb	short loc_62D803
mov	eax, 20h
jmp	short loc_62D80F

loc_62D803:
cmp	eax, 400h
jbe	short loc_62D80F
mov	eax, 400h

loc_62D80F:
push	20h
push	0
push	edx
push	eax
mov	[ecx+0Ch], eax
mov	eax, [ecx+8]
push	eax
call	?init@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@HIPAXI@Z ; FMOD::EventSystem::init(int,uint,void *,uint)
test	eax, eax
setz	al
retn	4
sub_62D7E0 endp

align 10h



sub_62D830 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
lea	ecx, [edi+30h]
call	sub_435B80
test	al, al
jnz	short loc_62D85C
mov	eax, [edi+44h]
push	eax
mov	eax, [esi+8]
push	eax
call	?setMediaPath@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBD@Z ; FMOD::EventSystem::setMediaPath(char const *)
test	eax, eax
jz	short loc_62D85C
pop	edi
xor	al, al
pop	esi
retn	4

loc_62D85C:
pop	edi
mov	al, 1
pop	esi
retn	4
sub_62D830 endp

align 10h



sub_62D870 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

fld1
mov	eax, [esp+arg_0]
sub	esp, 0Ch
fstp	[esp+0Ch+var_4]
fld	dword ptr [eax+28h]
fstp	[esp+0Ch+var_8]
fld	dword ptr [eax+2Ch]
mov	eax, [ecx+4]
fstp	[esp+0Ch+var_C]
push	eax
call	?set3DSettings@System@FMOD@@QAG?AW4FMOD_RESULT@@MMM@Z ;	FMOD::System::set3DSettings(float,float,float)
test	eax, eax
setz	al
retn	4
sub_62D870 endp

align 10h


; Attributes: bp-based frame

sub_62D8A0 proc	near

var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A4E8
mov	eax, large fs:0
push	eax
sub	esp, 24h
push	ebx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	ecx, [esi+8]
lea	eax, [esp+3Ch+var_2C]
push	eax
push	0FFFFFFFFh
push	ecx
mov	[esp+48h+var_2C], 0
call	?getCategoryByIndex@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@HPAPAVEventCategory@2@@Z ; FMOD::EventSystem::getCategoryByIndex(int,FMOD::EventCategory * *)
test	eax, eax
jz	short loc_62D8FD
xor	al, al
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_62D8FD:
lea	edx, [esp+3Ch+var_2D]
push	edx
push	offset byte_146D660
lea	ecx, [esp+44h+var_28]
call	sub_407D30
mov	[esp+3Ch+var_4], 0
mov	ecx, [esp+3Ch+var_2C]
push	ecx
push	eax
mov	ecx, esi
call	sub_62F1C0
lea	ecx, [esp+3Ch+var_28]
mov	bl, al
mov	[esp+3Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	al, bl
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_62D8A0 endp

align 10h



sub_62D950 proc	near
cmp	dword ptr [ecx+0DCh], 0
push	esi
lea	esi, [ecx+0CCh]
jz	short loc_62D97F
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_62D97F:
pop	esi
retn
sub_62D950 endp

align 10h



sub_62D990 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 30h
movss	xmm0, dword ptr	[ecx+14h]
mov	eax, [esp+30h+arg_0]
movss	[esp+30h+var_C], xmm0
movss	xmm0, dword ptr	[ecx+18h]
movss	[esp+30h+var_8], xmm0
movss	xmm0, dword ptr	[ecx+1Ch]
movss	[esp+30h+var_4], xmm0
movss	xmm0, dword ptr	[ecx+34h]
movss	[esp+30h+var_30], xmm0
movss	xmm0, dword ptr	[ecx+38h]
movss	[esp+30h+var_2C], xmm0
movss	xmm0, dword ptr	[ecx+3Ch]
movss	[esp+30h+var_28], xmm0
movss	xmm0, dword ptr	[ecx+44h]
movss	[esp+30h+var_24], xmm0
movss	xmm0, dword ptr	[ecx+48h]
movss	[esp+30h+var_20], xmm0
movss	xmm0, dword ptr	[ecx+4Ch]
movss	[esp+30h+var_1C], xmm0
movss	xmm0, dword ptr	[eax+4]
movss	[esp+30h+var_18], xmm0
movss	xmm0, dword ptr	[eax+8]
movss	[esp+30h+var_14], xmm0
movss	xmm0, dword ptr	[eax+0Ch]
lea	eax, [esp+30h+var_30]
push	eax
lea	edx, [esp+34h+var_24]
push	edx
lea	eax, [esp+38h+var_18]
push	eax
mov	eax, [ecx+8]
lea	edx, [esp+3Ch+var_C]
push	edx
push	0
push	eax
movss	[esp+48h+var_10], xmm0
call	?set3DListenerAttributes@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@HPBUFMOD_VECTOR@@000@Z ;	FMOD::EventSystem::set3DListenerAttributes(int,FMOD_VECTOR const *,FMOD_VECTOR const *,FMOD_VECTOR const *,FMOD_VECTOR const *)
test	eax, eax
setz	al
add	esp, 30h
retn	4
sub_62D990 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_62DA50(float, int)
sub_62DA50 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_30=	dword ptr -30h
var_20=	byte ptr -20h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12FF500
mov	eax, large fs:0
push	eax
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+44h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	ebx, [ebp+arg_4]
mov	eax, [ebx]
mov	edx, [eax+3Ch]
mov	ecx, ebx
call	edx
mov	eax, [esi+20h]
mov	edx, [eax+34h]
lea	edi, [esi+20h]
mov	ecx, edi
call	edx
cmp	al, 1
jnz	loc_62DB75
test	byte ptr [esi+118h], 2
jz	loc_62DB75
fldz
sub	esp, 8
fstp	[esp+4Ch+var_48]
fld	[ebp+arg_0]
fstp	[esp+4Ch+var_4C]
call	sub_632C80
add	esp, 8
test	al, al
jnz	short loc_62DB42
mov	eax, [esi+10h]
mov	edx, [eax+1Ch]
lea	ebx, [esi+10h]
push	edi
lea	ecx, [esp+48h+var_20]
push	ecx
mov	ecx, ebx
call	edx
fld	[ebp+arg_0]
push	ecx
mov	[esp+48h+var_4], 0
fstp	[esp+48h+var_48]
mov	edx, [eax]
mov	edx, [edx+2Ch]
lea	ecx, [esp+48h+var_30]
push	ecx
mov	ecx, eax
call	edx
mov	byte ptr [esp+44h+var_4], 1
mov	ecx, [esi+50h]
shl	ecx, 4
mov	edx, [ecx+esi+134h]
lea	ecx, [ecx+esi+134h]
push	eax
mov	eax, [edx+4]
call	eax
mov	[esp+44h+var_4], 0FFFFFFFFh
mov	ecx, [esi+50h]
mov	edx, [edi]
inc	ecx
mov	eax, offset off_15FAE00
and	ecx, 7
mov	[esp+44h+var_30], eax
mov	dword ptr [esp+44h+var_20], eax
mov	eax, [edx+4]
mov	[esi+50h], ecx
push	ebx
mov	ecx, edi
call	eax
mov	ebx, [ebp+arg_4]

loc_62DB42:
add	esi, 134h
mov	edi, 8
lea	ecx, [ecx+0]

loc_62DB50:
mov	edx, [ebx]
mov	eax, [edx+10h]
push	esi
mov	ecx, ebx
call	eax
add	esi, 10h
sub	edi, 1
jnz	short loc_62DB50
mov	edx, [ebx]
fld	ds:flt_15FCE28
mov	eax, [edx+28h]
push	ecx
mov	ecx, ebx
fstp	[esp+48h+var_48]
call	eax

loc_62DB75:
mov	ecx, [esp+44h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_62DA50 endp

align 10h


; Attributes: bp-based frame

sub_62DB90 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E7690
mov	eax, large fs:0
push	eax
sub	esp, 28h
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	ecx, [ebp+arg_0]
mov	eax, [esi]
mov	edx, [eax+1A0h]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_62DBE5

loc_62DBD0:
xor	al, al
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8

loc_62DBE5:
xorps	xmm0, xmm0
mov	[esp+3Ch+var_30], offset off_15FAE00
movss	[esp+3Ch+var_2C], xmm0
movss	[esp+3Ch+var_28], xmm0
movss	[esp+3Ch+var_24], xmm0
mov	[esp+3Ch+var_4], 0
mov	edx, [eax]
mov	edx, [edx+44h]
lea	ecx, [esp+3Ch+var_30]
push	ecx
mov	ecx, eax
call	edx
test	al, al
jz	short loc_62DBD0
mov	eax, [esi+10h]
mov	eax, [eax+1Ch]
lea	edx, [esp+3Ch+var_30]
lea	ecx, [esi+10h]
push	edx
lea	edx, [esp+40h+var_20]
push	edx
call	eax
mov	byte ptr [esp+44h+var_C], 1
mov	edx, [esp+44h+var_28]
mov	eax, [edx+58h]
lea	ecx, [esp+44h+var_28]
push	ecx
call	eax
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx]
mov	al, 1
mov	ecx, [esp+48h+var_18]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_62DB90 endp

align 10h



sub_62DC60 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+0DCh]
push	edi
call	edx
test	al, al
jnz	short loc_62DC7E

loc_62DC77:
pop	edi
xor	al, al
pop	esi
retn	4

loc_62DC7E:
mov	eax, [esi]
mov	edx, [eax+0E8h]
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62DC77
mov	eax, [esi]
mov	edx, [eax+0ECh]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62DC77
mov	eax, [esi]
mov	edx, [eax+0F0h]
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62DC77
mov	eax, [esi]
mov	edx, [eax+0F4h]
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62DC77
mov	eax, [esi]
mov	edx, [eax+0F8h]
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62DC77
mov	eax, [esi]
mov	edx, [eax+0FCh]
push	edi
mov	ecx, esi
call	edx
test	al, al
pop	edi
setnz	al
pop	esi
retn	4
sub_62DC60 endp

align 10h



sub_62DCF0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_62DD09
push	eax
call	?release@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::EventSystem::release(void)
mov	[esi+8], edi
mov	[esi+4], edi

loc_62DD09:
mov	eax, [esi+120h]
cmp	eax, edi
jz	short loc_62DD26
mov	edx, [esi]
push	eax
mov	eax, [edx+0D4h]
mov	ecx, esi
call	eax
mov	[esi+120h], edi

loc_62DD26:
mov	[esi+11Ch], edi
pop	edi
pop	esi
retn
sub_62DCF0 endp

align 10h



sub_62DD30 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [ecx+8]
push	eax
push	ecx
call	?getMusicSystem@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVMusicSystem@2@@Z ; FMOD::EventSystem::getMusicSystem(FMOD::MusicSystem * *)
test	eax, eax
setz	al
retn	4
sub_62DD30 endp

align 10h



sub_62DD50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130634B
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
push	0E0h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_62DDA4
push	eax
call	sub_632DF0
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn

loc_62DDA4:
xor	eax, eax
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_62DD50 endp

align 10h



sub_62DDC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130634B
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
push	0E8h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_62DE14
push	eax
call	sub_633C30
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn

loc_62DE14:
xor	eax, eax
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_62DDC0 endp

align 10h



sub_62DE30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130634B
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
push	20h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_62DE81
push	eax
call	sub_634E40
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn

loc_62DE81:
xor	eax, eax
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_62DE30 endp

align 10h



sub_62DEA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130634B
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
push	38h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_62DEF1
push	eax
call	sub_635030
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn

loc_62DEF1:
xor	eax, eax
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_62DEA0 endp

align 10h



sub_62DF10 proc	near
push	4Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_62DF28
push	esi
mov	esi, eax
call	sub_635840
pop	esi
retn

loc_62DF28:
xor	eax, eax
retn
sub_62DF10 endp

align 10h



sub_62DF30 proc	near
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_62DF50
and	byte ptr [eax+4], 0FCh
mov	dword ptr [eax], offset	off_15FB2B0
mov	dword ptr [eax+8], 0
retn

loc_62DF50:
xor	eax, eax
retn
sub_62DF30 endp

align 10h


; Attributes: bp-based frame

sub_62DF60 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	word ptr -40h
var_3E=	word ptr -3Eh
Dst= byte ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	word ptr -28h
var_24=	byte ptr -24h
var_22=	word ptr -22h
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A4B8
mov	eax, large fs:0
push	eax
sub	esp, 58h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+74h+var_C]
mov	large fs:0, eax
mov	edx, [ecx]
lea	eax, [ecx+84h]
lea	esi, [ecx+6Ch]
mov	[esp+74h+var_5C], eax
mov	eax, [edx+120h]
mov	edi, esi
mov	byte ptr [esp+74h+var_4C], 0
call	eax
mov	ecx, [ebp+arg_0]
lea	edx, [esp+74h+var_60+3]
mov	ebx, eax
mov	eax, [ecx+14h]
push	edx
push	eax
lea	ecx, [esp+7Ch+var_2C]
call	sub_407D30
mov	[esp+74h+var_4], 0
mov	eax, [ebx]
mov	edx, [eax+14h]
lea	ecx, [esp+74h+var_2C]
push	ecx
mov	ecx, ebx
call	edx
test	al, al
lea	ecx, [esp+74h+var_2C]
setz	byte ptr [esp+74h+var_60+3]
mov	[esp+74h+var_4], 0FFFFFFFFh
call	sub_407910
cmp	byte ptr [esp+74h+var_60+3], 0
jnz	loc_62E168
mov	eax, [ebx]
mov	edx, [eax+40h]
mov	ecx, ebx
call	edx
lea	ecx, [esp+74h+var_48]
mov	edi, offset off_1556AA4
mov	[esp+74h+var_48], edi
cmp	ecx, eax
jz	short loc_62E042
mov	edx, [eax+4]
mov	[esp+74h+var_44], edx
mov	cx, [eax+8]
mov	[esp+74h+var_40], cx
mov	dx, [eax+0Ah]
push	8		; MaxCount
add	eax, 0Ch
push	eax		; Src
lea	eax, [esp+7Ch+Dst]
push	8		; DstSize
push	eax		; Dst
mov	[esp+84h+var_3E], dx
call	_memcpy_s
add	esp, 10h

loc_62E042:
mov	[esp+74h+var_4], 1
mov	[esp+74h+var_34], ebx
mov	[esp+74h+var_4], 2
mov	ecx, [esp+74h+var_44]
mov	dx, [esp+74h+var_40]
mov	ax, [esp+74h+var_3E]
mov	dword ptr [esp+74h+var_28], ecx
push	8		; MaxCount
lea	ecx, [esp+78h+Dst]
push	ecx		; Src
mov	word ptr [esp+7Ch+var_24], dx
lea	edx, [esp+7Ch+var_20]
push	8		; DstSize
push	edx		; Dst
mov	[esp+84h+var_2C], edi
mov	[esp+84h+var_22], ax
call	_memcpy_s
add	esp, 10h
mov	byte ptr [esp+74h+var_4], 3
mov	eax, [esp+74h+var_34]
mov	[esp+74h+var_18], eax
lea	ecx, [esp+74h+var_2C]
push	ecx
lea	edx, [esp+78h+var_58]
push	edx
mov	eax, esi
mov	byte ptr [esp+7Ch+var_4], 4
call	sub_62FCA0
mov	eax, [esp+74h+var_54]
mov	edi, [esp+74h+var_58]
mov	byte ptr [esp+74h+var_4], 2
mov	ecx, offset off_1556AA4
mov	[esp+74h+var_2C], ecx
mov	[esp+74h+var_4], 0FFFFFFFFh
mov	[esp+74h+var_4C], eax
mov	[esp+74h+var_48], ecx
test	al, al
jz	loc_62E168
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [esp+78h+var_2C]
call	sub_403850
mov	[esp+74h+var_4], 5
mov	[esp+74h+var_14], ebx
lea	ecx, [esp+74h+var_2C]
push	ecx
mov	ebx, 6
lea	ecx, [esp+78h+var_48]
mov	[esp+78h+var_4], ebx
call	sub_403850
mov	byte ptr [esp+74h+var_4], 7
mov	edx, [esp+74h+var_14]
mov	[esp+74h+var_30], edx
lea	eax, [esp+74h+var_48]
push	eax
lea	ecx, [esp+78h+var_5C]
mov	byte ptr [esp+78h+var_4], 8
mov	edx, [esp+78h+var_5C]
push	ecx
push	edx
call	sub_62FD60
lea	ecx, [esp+74h+var_48]
mov	byte ptr [esp+74h+var_4], bl
call	sub_407910
lea	ecx, [esp+74h+var_2C]
mov	[esp+74h+var_4], 0FFFFFFFFh
call	sub_407910
mov	al, 1
mov	ecx, [esp+74h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_62E168:
cmp	byte ptr [esp+74h+var_4C], 1
jnz	short loc_62E181
push	ecx
mov	eax, esp
mov	[eax], edi
lea	edi, [esp+78h+var_5C]
mov	[esp+78h+var_5C], esp
call	sub_62F550

loc_62E181:
mov	eax, [ebx]
mov	edx, [eax+18h]
mov	ecx, ebx
call	edx
mov	eax, [ebx]
mov	edx, [eax]
push	1
mov	ecx, ebx
call	edx
xor	al, al
mov	ecx, [esp+78h+var_10]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_62DF60 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_130A470

loc_62E1B0:
mov	dword ptr [eax], offset	off_1556AA4
retn
; END OF FUNCTION CHUNK	FOR sub_130A470
align 10h



sub_62E1C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+1Ch]
call	eax
test	eax, eax
setz	al
retn	8
sub_62E1C0 endp

align 10h



sub_62E1E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	eax, [esp+4+arg_0]
mov	ecx, [eax]
push	esi
lea	edx, [esp+8+var_4]
push	edx
mov	edx, [esp+0Ch+arg_4]
push	6
push	edx
push	eax
mov	eax, [ecx+18h]
xor	esi, esi
mov	[esp+18h+var_4], esi
call	eax
test	eax, eax
jz	short loc_62E20B

loc_62E204:
xor	al, al
pop	esi
pop	ecx
retn	10h

loc_62E20B:
mov	eax, [esp+8+arg_8]
mov	ecx, [esp+8+var_4]
call	sub_62EF10
test	al, al
jz	short loc_62E204
mov	edx, [esp+8+var_4]
lea	ecx, [esp+8+arg_0]
push	ecx
push	edx
mov	[esp+10h+arg_0], esi
call	?getParentGroup@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVEventGroup@2@@Z ; FMOD::Event::getParentGroup(FMOD::EventGroup * *)
test	eax, eax
jnz	short loc_62E204
mov	esi, [esp+8+arg_C]
push	edi
mov	edi, [esp+0Ch+arg_0]
call	sub_62EF90
test	al, al
pop	edi
setnz	al
pop	esi
pop	ecx
retn	10h
sub_62E1E0 endp

align 10h


; Attributes: bp-based frame

sub_62E250 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
DstBuf=	byte ptr -14h
var_E= dword ptr -0Eh
var_A= dword ptr -0Ah
var_6= word ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 2Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_4], eax
xor	eax, eax
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
mov	esi, ecx
mov	[esp+34h+var_2C], eax
mov	[esp+34h+var_1C], eax
mov	[esp+34h+var_28], eax
mov	[esp+34h+var_24], eax
mov	[esp+34h+var_20], eax
mov	[esp+34h+var_18], eax
mov	eax, [esi+124h]
push	edi
mov	edi, [ebp+arg_0]
mov	[esp+38h+var_2C], 18h
mov	[esp+38h+var_1C], 1
test	eax, eax
jz	short loc_62E2D5
push	0Ah		; Radix
xor	ecx, ecx
push	10h		; Size
lea	edx, [esp+40h+DstBuf]
push	edx		; DstBuf
push	eax		; Value
mov	word ptr [esp+48h+DstBuf], cx
mov	dword ptr [esp+48h+DstBuf+2], ecx
mov	[esp+48h+var_E], ecx
mov	[esp+48h+var_A], ecx
mov	[esp+48h+var_6], cx
call	__itoa_s
lea	eax, [esp+48h+DstBuf]
add	esp, 10h
mov	[esp+38h+var_28], eax

loc_62E2D5:
mov	edi, [edi+14h]
mov	edx, [esi+8]
push	ebx
lea	ecx, [esp+3Ch+var_2C]
push	ecx
push	edi
push	edx
call	?load@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBDPAUFMOD_EVENT_LOADINFO@@PAPAVEventProject@2@@Z ;	FMOD::EventSystem::load(char const *,FMOD_EVENT_LOADINFO *,FMOD::EventProject *	*)
mov	ecx, [esp+38h+var_4]
pop	edi
test	eax, eax
pop	esi
setz	al
pop	ebx
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	8
sub_62E250 endp

align 10h



sub_62E310 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+12Ch]
cmp	eax, [ecx+130h]
push	esi
lea	esi, [ecx+128h]
jz	short loc_62E333
mov	ecx, [esp+4+arg_0]
mov	[eax], ecx
add	dword ptr [esi+4], 4
pop	esi
retn	4

loc_62E333:
lea	edx, [esp+4+arg_0]
push	edx
call	sub_62FEC0
pop	esi
retn	4
sub_62E310 endp

align 10h



sub_62E350 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	eax, [eax+148h]
lea	ecx, [esp+8+var_4]
push	ecx
push	edx
mov	ecx, esi
mov	[esp+10h+var_4], 0
call	eax
test	al, al
jnz	short loc_62E37D

loc_62E376:
xor	al, al
pop	esi
pop	ecx
retn	4

loc_62E37D:
mov	ecx, [esp+8+var_4]
push	ecx
call	sub_62F090
test	al, al
jz	short loc_62E376
mov	edx, [esi]
mov	eax, [esp+8+var_4]
mov	edx, [edx+14Ch]
push	eax
mov	ecx, esi
call	edx
mov	al, 1
pop	esi
pop	ecx
retn	4
sub_62E350 endp

align 10h



sub_62E3B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
add	ebx, 48h
push	edi
mov	ecx, ebx
xor	edi, edi
call	sub_4FFDB0
test	eax, eax
jbe	short loc_62E3F8
lea	ebx, [ebx+0]

loc_62E3D0:
mov	esi, [ebp+0]
push	edi
mov	ecx, ebx
add	esi, 150h
call	sub_4598F0
push	eax
mov	eax, [esi]
mov	ecx, ebp
call	eax
test	al, al
jz	short loc_62E401
mov	ecx, ebx
inc	edi
call	sub_4FFDB0
cmp	edi, eax
jb	short loc_62E3D0

loc_62E3F8:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4

loc_62E401:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	4
sub_62E3B0 endp

align 10h



sub_62E410 proc	near
push	ebx
push	esi
mov	ebx, ecx
push	edi
mov	edi, [ebx+5Ch]
lea	eax, [ebx+54h]
cmp	edi, eax
setnz	al
test	al, al
jz	short loc_62E451

loc_62E424:
mov	esi, [edi+24h]
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
lea	eax, [ebx+54h]
add	esp, 4
cmp	edi, eax
setnz	al
test	al, al
jnz	short loc_62E424

loc_62E451:
mov	edi, [ebx+74h]
push	ebp
lea	ebp, [ebx+6Ch]
cmp	edi, ebp
setnz	al
test	al, al
jz	short loc_62E48B

loc_62E461:
mov	esi, [edi+24h]
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebp
setnz	al
test	al, al
jnz	short loc_62E461

loc_62E48B:
lea	esi, [ebx+84h]
xor	edi, edi
cmp	[esi+10h], edi
jz	short loc_62E4AF
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	[esi+4], edi
mov	[esi+0Ch], esi
mov	[esi+10h], edi

loc_62E4AF:
cmp	[ebx+64h], edi
lea	esi, [ebx+54h]
jz	short loc_62E4CE
mov	ecx, [esi+4]
push	ecx
mov	ecx, esi
call	sub_62FC60
mov	[esi+8], esi
mov	[esi+4], edi
mov	[esi+0Ch], esi
mov	[esi+10h], edi

loc_62E4CE:
cmp	[ebp+10h], edi
jz	short loc_62E4EA
mov	edx, [ebp+4]
push	edx
mov	ecx, ebp
call	sub_62FC60
mov	[ebp+8], ebp
mov	[ebp+4], edi
mov	[ebp+0Ch], ebp
mov	[ebp+10h], edi

loc_62E4EA:
mov	esi, [ebx+128h]
pop	ebp
cmp	esi, [ebx+12Ch]
jz	short loc_62E520
lea	esp, [esp+0]

loc_62E500:
mov	eax, [esi]
mov	ecx, [eax]
mov	edx, [ecx+24h]
push	1
push	eax
call	edx
mov	eax, [esi]
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
add	esi, 4
cmp	esi, [ebx+12Ch]
jnz	short loc_62E500

loc_62E520:
mov	ecx, [ebx+12Ch]
mov	eax, [ebx+128h]
cmp	eax, ecx
jz	short loc_62E549
mov	esi, ecx
sub	esi, ecx
jz	short loc_62E543
push	esi
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, esi

loc_62E543:
mov	[ebx+12Ch], eax

loc_62E549:
pop	edi
pop	esi
pop	ebx
retn
sub_62E410 endp

align 10h



sub_62E550 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
mov	eax, [ebx]
mov	edx, [eax+0Ch]
push	ebp
push	edi
mov	edi, ecx
push	4
lea	ecx, [esp+14h+var_4]
push	ecx
xor	ebp, ebp
mov	ecx, ebx
mov	[esp+18h+var_4], ebp
call	edx
test	al, al
jnz	short loc_62E57B
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_62E57B:
push	esi
cmp	[esp+14h+var_4], ebp
jbe	short loc_62E5B4

loc_62E582:
mov	eax, [edi]
mov	edx, [eax+128h]
mov	ecx, edi
call	edx
mov	ecx, [esp+14h+arg_4]
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	ebx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62E5C7
push	edi
call	sub_62F3F0
test	al, al
jz	short loc_62E5BE
inc	ebp
cmp	ebp, [esp+14h+var_4]
jb	short loc_62E582

loc_62E5B4:
pop	esi
pop	edi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	8

loc_62E5BE:
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx

loc_62E5C7:
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
pop	esi
pop	edi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	8
sub_62E550 endp

align 10h



sub_62E5E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
mov	eax, [ebx]
mov	edx, [eax+0Ch]
push	ebp
push	edi
mov	edi, ecx
push	4
lea	ecx, [esp+14h+var_4]
push	ecx
xor	ebp, ebp
mov	ecx, ebx
mov	[esp+18h+var_4], ebp
call	edx
test	al, al
jnz	short loc_62E60B
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_62E60B:
push	esi
cmp	[esp+14h+var_4], ebp
jbe	short loc_62E644

loc_62E612:
mov	eax, [edi]
mov	edx, [eax+12Ch]
mov	ecx, edi
call	edx
mov	ecx, [esp+14h+arg_4]
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	ebx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62E657
push	edi
call	sub_62F4A0
test	al, al
jz	short loc_62E64E
inc	ebp
cmp	ebp, [esp+14h+var_4]
jb	short loc_62E612

loc_62E644:
pop	esi
pop	edi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	8

loc_62E64E:
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx

loc_62E657:
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
pop	esi
pop	edi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	8
sub_62E5E0 endp

align 10h


; Attributes: bp-based frame

sub_62E670 proc	near

var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A439
mov	eax, large fs:0
push	eax
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+44h+var_C]
mov	large fs:0, eax
mov	edi, ecx
xor	ebx, ebx
mov	[esp+44h+var_2C], ebx
mov	eax, [edi]
mov	edx, [eax+134h]
call	edx
mov	esi, eax
mov	[esp+44h+var_31], bl
test	esi, esi
jz	short loc_62E6F2
mov	eax, [ebp+arg_0]
push	offset aNdaudiometaeve ; "NDAudioMetaEvents.dat"
add	eax, 30h
push	eax
lea	ecx, [esp+4Ch+var_28]
push	ecx
call	sub_4566C0
add	esp, 0Ch
mov	[esp+44h+var_4], ebx
mov	edx, [esi]
push	0
push	eax
mov	eax, [edx+4]
mov	ebx, 1
mov	ecx, esi
mov	[esp+4Ch+var_2C], ebx
call	eax
mov	[esp+44h+var_32], bl
cmp	al, bl
jz	short loc_62E6F7

loc_62E6F2:
mov	[esp+44h+var_32], 0

loc_62E6F7:
mov	[esp+44h+var_4], 0FFFFFFFFh
test	bl, 1
jz	short loc_62E70D
lea	ecx, [esp+44h+var_28]
call	sub_407910

loc_62E70D:
cmp	[esp+44h+var_32], 0
jz	short loc_62E75C
mov	edx, [esi]
mov	edx, [edx+0Ch]
push	4
lea	eax, [esp+48h+var_30]
push	eax
mov	ecx, esi
mov	[esp+4Ch+var_30], 0
call	edx
test	al, al
jz	short loc_62E760
mov	ecx, [esp+44h+var_30]
mov	eax, [edi]
mov	edx, [eax+15Ch]
push	ecx
push	esi
mov	ecx, edi
call	edx
test	al, al
jz	short loc_62E760
mov	ecx, [esp+44h+var_30]
mov	eax, [edi]
mov	edx, [eax+160h]
push	ecx
push	esi
mov	ecx, edi
call	edx
test	al, al
jz	short loc_62E760

loc_62E75C:
mov	bl, 1
jmp	short loc_62E764

loc_62E760:
mov	bl, [esp+44h+var_31]

loc_62E764:
test	esi, esi
jz	short loc_62E775
mov	eax, [edi]
mov	edx, [eax+138h]
push	esi
mov	ecx, edi
call	edx

loc_62E775:
mov	al, bl
mov	ecx, [esp+44h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_62E670 endp

align 10h



sub_62E790 proc	near
push	ebx
push	ebp
push	esi
mov	ebp, ecx
push	edi
mov	edi, [ebp+104h]
lea	ebx, [ebp+0FCh]
cmp	edi, ebx
setnz	al
test	al, al
jz	short loc_62E7DA
jmp	short loc_62E7B0
align 10h

loc_62E7B0:
mov	esi, [edi+28h]
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebx
setnz	al
test	al, al
jnz	short loc_62E7B0

loc_62E7DA:
mov	edi, [ebp+0ECh]
add	ebp, 0E4h
cmp	edi, ebp
setnz	al
test	al, al
jz	short loc_62E81A
nop

loc_62E7F0:
mov	esi, [edi+28h]
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebp
setnz	al
test	al, al
jnz	short loc_62E7F0

loc_62E81A:
xor	esi, esi
cmp	[ebx+10h], esi
jz	short loc_62E838
mov	eax, [ebx+4]
push	eax
mov	ecx, ebx
call	sub_63D550
mov	[ebx+8], ebx
mov	[ebx+4], esi
mov	[ebx+0Ch], ebx
mov	[ebx+10h], esi

loc_62E838:
cmp	[ebp+10h], esi
jz	short loc_62E854
mov	ecx, [ebp+4]
push	ecx
mov	ecx, ebp
call	sub_63D550
mov	[ebp+8], ebp
mov	[ebp+4], esi
mov	[ebp+0Ch], ebp
mov	[ebp+10h], esi

loc_62E854:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_62E790 endp

align 10h



sub_62E860 proc	near

var_10=	dword ptr -10h

push	ebx
push	esi
mov	esi, [ecx+5Ch]
lea	ebx, [ecx+54h]
cmp	esi, ebx
setnz	al
test	al, al
jz	short loc_62E8B8
push	edi

loc_62E872:
mov	edi, [esi+24h]
lea	eax, [edi+60h]
cmp	[edi+18h], eax
jnz	short loc_62E8A3
mov	ecx, [edi+0C0h]
add	ecx, [edi+0BCh]
jnz	short loc_62E8A3
mov	edx, [edi]
mov	eax, [edx+24h]
mov	ecx, edi
call	eax
fldz
mov	edx, [edi]
mov	eax, [edx+4]
push	ecx
mov	ecx, edi
fstp	[esp+10h+var_10]
call	eax

loc_62E8A3:
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, ebx
setnz	al
test	al, al
jnz	short loc_62E872
pop	edi

loc_62E8B8:
pop	esi
pop	ebx
retn
sub_62E860 endp

align 10h



sub_62E8C0 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, [ecx]
mov	eax, [eax+11Ch]
lea	edx, [esp+4+var_4]
push	edx
mov	[esp+8+var_4], 0
call	eax
cmp	al, 1
jnz	short loc_62E8E8
mov	eax, [esp+4+var_4]
mov	ecx, [eax]
mov	edx, [ecx+4Ch]
push	0
push	eax
call	edx

loc_62E8E8:
pop	ecx
retn
sub_62E8C0 endp

align 10h



sub_62E8F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	[esp+0Ch+var_4], 0
test	edi, edi
jz	short loc_62E916
mov	eax, [esi]
mov	edx, [eax+0E0h]
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, esi
call	edx

loc_62E916:
mov	eax, [esi]
mov	edx, [eax+16Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+170h]
mov	ecx, esi
call	edx
test	edi, edi
jz	short loc_62E95D
mov	eax, [esi]
mov	edx, [eax+0E0h]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, esi
mov	[esp+10h+arg_0], 0
call	edx
mov	eax, [esp+0Ch+var_4]
sub	eax, [esp+0Ch+arg_0]
jns	short loc_62E95B
test	eax, eax
jle	short loc_62E95B
xor	eax, eax

loc_62E95B:
mov	[edi], eax

loc_62E95D:
pop	edi
pop	esi
pop	ecx
retn	4
sub_62E8F0 endp

align 10h


; Attributes: bp-based frame

sub_62E970 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [ebx], 0
mov	eax, [edi]
mov	edx, [eax+124h]
call	edx
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_62E9D7
mov	eax, [esi+3Ch]
lea	ecx, [esp+20h+var_10]
push	ecx
lea	edx, [esp+24h+var_8]
mov	[esp+24h+var_10], eax
push	edx
lea	eax, [edi+9Ch]
mov	[esp+28h+var_C], esi
call	sub_62FE00
cmp	[esp+20h+var_4], 0
jz	short loc_62E9D7
mov	eax, [esi+3Ch]
mov	[ebx], eax
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_62E9D7:
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_62E970 endp

align 10h



sub_62EA00 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
lea	eax, [esp+4+arg_4]
push	eax
push	esi
call	sub_6372E0
cmp	eax, esi
jnz	short loc_62EA1A
xor	al, al
pop	esi
retn	0Ch

loc_62EA1A:
mov	ecx, [eax+14h]
mov	edx, [esp+4+arg_8]
push	ecx
mov	[edx], ecx
mov	ecx, esp
mov	[ecx], eax
lea	eax, [esp+8+arg_0]
push	eax
call	sub_636930
mov	al, 1
pop	esi
retn	0Ch
sub_62EA00 endp

align 10h



sub_62EA40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [ecx]
mov	eax, [eax+17Ch]
lea	edx, [esp+4+var_4]
push	edx
mov	edx, [esp+8+arg_4]
push	edx
mov	edx, [esp+0Ch+arg_0]
push	edx
mov	[esp+10h+var_4], 0
call	eax
test	al, al
jnz	short loc_62EA69
pop	ecx
retn	8

loc_62EA69:
mov	ecx, [esp+4+var_4]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+var_4]
test	ecx, ecx
jz	short loc_62EA82
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_62EA82:
mov	al, 1
pop	ecx
retn	8
sub_62EA40 endp

align 10h



sub_62EA90 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	edi
mov	edi, [ebp+8]
cmp	edi, ebp
setnz	al
test	al, al
jz	short loc_62EACE
push	esi

loc_62EAA3:
mov	esi, [edi+14h]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebp
setnz	al
test	al, al
jnz	short loc_62EAA3
pop	esi

loc_62EACE:
cmp	dword ptr [ebp+10h], 0
jz	short loc_62EAF3
mov	eax, [ebp+4]
push	eax
mov	ecx, ebp
call	sub_635650
mov	[ebp+8], ebp
mov	dword ptr [ebp+4], 0
mov	[ebp+0Ch], ebp
mov	dword ptr [ebp+10h], 0

loc_62EAF3:
pop	edi
pop	ebp
retn	4
sub_62EA90 endp

align 10h



sub_62EB00 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 14h
mov	edx, [esp+14h+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi]
lea	ecx, [esp+18h+var_14]
push	ecx
push	edx
mov	edx, [eax+17Ch]
lea	ecx, [esi+9Ch]
push	ecx
mov	ecx, esi
mov	[esp+24h+var_14], 0
call	edx
test	al, al
jnz	short loc_62EB36
pop	esi
add	esp, 14h
retn	4

loc_62EB36:
mov	ecx, [esp+18h+var_14]
mov	eax, [ecx]
mov	edx, [eax+30h]
call	edx
mov	eax, [esp+18h+var_14]
mov	ecx, [eax+3Ch]
mov	[esp+18h+var_C], eax
lea	edx, [esp+18h+var_10]
push	edx
lea	eax, [esp+1Ch+var_8]
push	eax
lea	eax, [esi+0B4h]
mov	dword ptr [esp+20h+var_10], ecx
call	sub_62FE00
cmp	[esp+18h+var_4], 0
jnz	short loc_62EB87
mov	ecx, [esp+18h+var_14]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+18h+var_14]
test	ecx, ecx
jz	short loc_62EB87
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_62EB87:
mov	al, 1
pop	esi
add	esp, 14h
retn	4
sub_62EB00 endp




sub_62EB90 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	ebx
push	esi
push	edi
mov	ebx, ecx
push	eax
lea	esi, [ebx+6Ch]
push	esi
call	sub_630D10
mov	edi, eax
cmp	esi, edi
jz	short loc_62EBCB
lea	ecx, [edi+10h]
push	ecx
lea	edx, [esp+18h+var_8]
push	edx
lea	eax, [ebx+54h]
call	sub_62FCA0
push	ecx
mov	eax, esp
mov	[eax], edi
lea	edi, [esp+18h+arg_0]
call	sub_62F550

loc_62EBCB:
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	4
sub_62EB90 endp

align 10h



; int __stdcall	sub_62EBE0(float)
sub_62EBE0 proc	near

var_20=	dword ptr -20h
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	ebp, ecx
push	edi
lea	ecx, [esp+1Ch+var_C]
call	??0_Container_base@std@@QAE@XZ ; std::_Container_base::_Container_base(void)
mov	edi, [ebp+5Ch]
lea	esi, [ebp+54h]
cmp	edi, esi
setnz	al
test	al, al
jz	loc_62EC8B

loc_62EC05:
mov	ebx, [edi+24h]
fld	[esp+1Ch+arg_0]
mov	eax, [ebx]
mov	edx, [eax+4]
push	ecx
mov	ecx, ebx
fstp	[esp+20h+var_20]
call	edx
test	al, al
jz	short loc_62EC97
lea	eax, [ebx+20h]
cmp	[ebx+18h], eax
jnz	short loc_62EC73
lea	ecx, [edi+10h]
push	ecx
lea	edx, [esp+20h+var_8]
push	edx
lea	eax, [ebp+6Ch]
call	sub_62FCA0
push	edi
mov	ebx, edi
call	sub_77E2F0
push	ebx
mov	edi, eax
mov	dword ptr [esp+24h+var_C], ebx
call	sub_77E2F0
lea	eax, [esi+0Ch]
push	eax
lea	ecx, [esi+8]
push	ecx
lea	edx, [esi+4]
push	edx
push	ebx
call	sub_77E650
push	28h
push	eax
mov	dword ptr [eax+10h], offset off_1556AA4
call	sub_77E0D0
add	esp, 20h
dec	dword ptr [esi+10h]
jmp	short loc_62EC7E

loc_62EC73:
push	edi
call	sub_77E2F0
add	esp, 4
mov	edi, eax

loc_62EC7E:
cmp	edi, esi
setnz	al
test	al, al
jnz	loc_62EC05

loc_62EC8B:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	4

loc_62EC97:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 0Ch
retn	4
sub_62EBE0 endp

align 10h



; int __stdcall	sub_62ECB0(float)
sub_62ECB0 proc	near

var_18=	dword ptr -18h
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0A4h]
push	edi
lea	edi, [ebp+9Ch]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_62ECFC
lea	esp, [esp+0]

loc_62ECD0:
mov	ebx, [esi+14h]
push	esi
call	sub_77E2F0
fld	[esp+18h+arg_0]
mov	esi, eax
fstp	[esp+18h+var_18]
mov	eax, [ebx]
mov	edx, [eax+0Ch]
mov	ecx, ebx
call	edx
test	al, al
jz	loc_62ED79
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_62ECD0

loc_62ECFC:
mov	esi, [ebp+0BCh]
lea	ebx, [ebp+0B4h]
cmp	esi, ebx
setnz	al
test	al, al
jz	short loc_62ED6F

loc_62ED11:
mov	edi, [esi+14h]
fld	[esp+14h+arg_0]
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	ecx
mov	ecx, edi
fstp	[esp+18h+var_18]
call	edx
test	al, al
jz	short loc_62ED79
push	esi
call	sub_77E2F0
add	esp, 4
mov	esi, eax
mov	[esp+14h+var_1], 0
mov	eax, [edi]
mov	edx, [eax+3Ch]
push	1
lea	ecx, [esp+18h+var_1]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	short loc_62ED79
cmp	[esp+14h+var_1], 0
jnz	short loc_62ED66
mov	ecx, [edi+3Ch]
mov	eax, [ebp+0]
mov	edx, [eax+180h]
push	ecx
push	ebx
mov	ecx, ebp
call	edx

loc_62ED66:
cmp	esi, ebx
setnz	al
test	al, al
jnz	short loc_62ED11

loc_62ED6F:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	4

loc_62ED79:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	4
sub_62ECB0 endp

align 10h



sub_62ED90 proc	near
mov	eax, [ecx+8]
push	eax
call	?update@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::EventSystem::update(void)
test	eax, eax
setz	al
retn
sub_62ED90 endp

align 10h



sub_62EDA0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, ecx
push	ebx
lea	edi, [esi+54h]
push	edi
call	sub_630D10
cmp	edi, eax
jz	short loc_62EDC0

loc_62EDB7:
mov	eax, [eax+24h]
pop	edi
pop	esi
pop	ebx
retn	4

loc_62EDC0:
push	ebx
add	esi, 6Ch
push	esi
call	sub_630D10
cmp	esi, eax
jnz	short loc_62EDB7
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_62EDA0 endp

align 10h



sub_62EDE0 proc	near

arg_0= byte ptr	 4

push	esi
lea	eax, [esp+4+arg_0]
lea	esi, [ecx+9Ch]
push	eax
push	esi
call	sub_6372E0
cmp	esi, eax
pop	esi
jz	short loc_62EDFD
mov	eax, [eax+14h]
retn	4

loc_62EDFD:
xor	eax, eax
retn	4
sub_62EDE0 endp

align 10h



sub_62EE10 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+0CCh]
push	esi
call	sub_63E4E0
cmp	esi, eax
pop	esi
jz	short loc_62EE2C
mov	eax, [eax+28h]
retn	4

loc_62EE2C:
xor	eax, eax
retn	4
sub_62EE10 endp

align 10h



sub_62EE40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	eax, 2
mov	edx, [esp+arg_4]
mov	dword ptr [edx], 0
jz	short loc_62EE92
sub	eax, 1
jz	short loc_62EE7A
sub	eax, 1
jz	short loc_62EE62
xor	al, al
retn	8

loc_62EE62:
push	edx
mov	eax, 12h
push	eax
mov	eax, [ecx+4]
push	eax
call	?createDSPByType@System@FMOD@@QAG?AW4FMOD_RESULT@@W4FMOD_DSP_TYPE@@PAPAVDSP@2@@Z ; FMOD::System::createDSPByType(FMOD_DSP_TYPE,FMOD::DSP * *)
test	eax, eax
setz	al
retn	8

loc_62EE7A:
push	edx
mov	eax, 5
push	eax
mov	eax, [ecx+4]
push	eax
call	?createDSPByType@System@FMOD@@QAG?AW4FMOD_RESULT@@W4FMOD_DSP_TYPE@@PAPAVDSP@2@@Z ; FMOD::System::createDSPByType(FMOD_DSP_TYPE,FMOD::DSP * *)
test	eax, eax
setz	al
retn	8

loc_62EE92:
push	edx
mov	eax, 13h
push	eax
mov	eax, [ecx+4]
push	eax
call	?createDSPByType@System@FMOD@@QAG?AW4FMOD_RESULT@@W4FMOD_DSP_TYPE@@PAPAVDSP@2@@Z ; FMOD::System::createDSPByType(FMOD_DSP_TYPE,FMOD::DSP * *)
test	eax, eax
setz	al
retn	8
sub_62EE40 endp

align 10h



sub_62EEB0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+0E4h]
push	esi
call	sub_63E4E0
cmp	esi, eax
pop	esi
jz	short loc_62EECC
mov	eax, [eax+28h]
retn	4

loc_62EECC:
xor	eax, eax
retn	4
sub_62EEB0 endp

align 10h



sub_62EEE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+0FCh]
push	esi
call	sub_63E4E0
cmp	esi, eax
pop	esi
jz	short loc_62EEFC
mov	eax, [eax+28h]
retn	4

loc_62EEFC:
xor	eax, eax
retn	4
sub_62EEE0 endp

align 10h



sub_62EF10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
push	edi
mov	esi, eax
mov	edi, ecx
mov	ecx, esi
mov	[esp+10h+var_4], 0
call	sub_435B20
push	0
lea	eax, [esp+14h+var_4]
push	eax
push	0
push	edi
mov	[esp+20h+var_8], 0
call	?getInfo@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAHPAPADPAUFMOD_EVENT_INFO@@@Z	; FMOD::Event::getInfo(int *,char * *,FMOD_EVENT_INFO *)
test	eax, eax
jz	short loc_62EF4B

loc_62EF43:
pop	edi
xor	al, al
pop	esi
add	esp, 8
retn

loc_62EF4B:
lea	ecx, [esp+10h+var_8]
push	ecx
push	edi
call	?getParentGroup@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVEventGroup@2@@Z ; FMOD::Event::getParentGroup(FMOD::EventGroup * *)
test	eax, eax
jnz	short loc_62EF43
mov	edi, [esp+10h+var_8]
call	sub_62EF90
test	al, al
jz	short loc_62EF43
push	offset unk_1545BB1
push	offset byte_1545BB0
mov	ecx, esi
call	sub_4038B0
mov	edx, [esp+10h+var_4]
push	edx
mov	ecx, esi
call	sub_402360
pop	edi
mov	al, 1
pop	esi
add	esp, 8
retn
sub_62EF10 endp

align 10h



sub_62EF90 proc	near

var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= byte ptr -120h
var_11C= byte ptr -11Ch
var_4= dword ptr -4

sub	esp, 12Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+12Ch+var_4], eax
mov	ecx, esi
mov	[esp+12Ch+var_128], 0
mov	[esp+12Ch+var_12C], edi
call	sub_435B20
mov	eax, [esp+12Ch+var_12C]
test	eax, eax
jz	short loc_62F00B
lea	ecx, [ecx+0]

loc_62EFC0:
mov	ecx, [eax]
lea	edx, [esp+12Ch+var_128]
push	edx
push	0
push	eax
mov	eax, [ecx]
call	eax
test	eax, eax
jnz	loc_62F070
push	offset byte_1545BB0
push	eax
mov	ecx, esi
call	sub_456230
mov	ecx, [esp+12Ch+var_128]
push	ecx
push	1
mov	ecx, esi
call	sub_456230
mov	eax, [esp+12Ch+var_12C]
mov	edx, [eax]
mov	edx, [edx+14h]
lea	ecx, [esp+12Ch+var_12C]
push	ecx
push	eax
call	edx
test	eax, eax
jnz	short loc_62F070
mov	eax, [esp+12Ch+var_12C]
test	eax, eax
jnz	short loc_62EFC0

loc_62F00B:
mov	eax, [edi]
mov	edx, [eax+18h]
lea	ecx, [esp+12Ch+var_124]
push	ecx
push	edi
mov	[esp+134h+var_124], 0
call	edx
test	eax, eax
jnz	short loc_62F070
push	11Ch		; size_t
push	eax		; int
lea	eax, [esp+134h+var_120]
push	eax		; void *
call	_memset
mov	eax, [esp+138h+var_124]
mov	ecx, [eax]
add	esp, 0Ch
lea	edx, [esp+12Ch+var_120]
push	edx
push	eax
mov	eax, [ecx+4]
call	eax
test	eax, eax
jnz	short loc_62F070
lea	ecx, [esp+12Ch+var_11C]
push	ecx
push	eax
mov	ecx, esi
call	sub_456230
mov	al, 1
mov	ecx, [esp+12Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 12Ch
retn

loc_62F070:
mov	ecx, [esp+12Ch+var_4]
xor	ecx, esp
xor	al, al
call	sub_7999A3
add	esp, 12Ch
retn
sub_62EF90 endp

align 10h


; Attributes: bp-based frame

sub_62F090 proc	near

var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_13067D0
mov	eax, large fs:0
push	eax
sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+50h+var_14], eax
push	ebx
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+5Ch+var_C]
mov	large fs:0, eax
mov	eax, [esi]
mov	ebx, [ebp+arg_0]
mov	edx, [eax+144h]
lea	ecx, [esp+5Ch+var_48]
push	ecx
xor	edi, edi
push	ebx
mov	ecx, esi
mov	[esp+64h+var_48], edi
call	edx
test	al, al
jz	loc_62F1B8
cmp	[esp+5Ch+var_48], edi
jle	loc_62F17C

loc_62F0F3:
lea	eax, [esp+5Ch+var_49]
push	eax
lea	ecx, [esp+60h+var_2C]
call	sub_4022A0
lea	ecx, [esp+5Ch+var_49]
push	ecx
lea	ecx, [esp+60h+var_44]
mov	[esp+60h+var_4], 0
call	sub_4022A0
lea	eax, [esp+5Ch+var_44]
push	eax
lea	ecx, [esp+60h+var_2C]
push	ecx
mov	byte ptr [esp+64h+var_4], 1
mov	edx, [esi]
mov	edx, [edx+140h]
push	edi
push	ebx
mov	ecx, esi
call	edx
lea	ecx, [esp+5Ch+var_44]
test	al, al
jz	short loc_62F19D
mov	eax, [esi]
mov	eax, [eax+13Ch]
push	ecx
lea	edx, [esp+60h+var_2C]
push	edx
mov	ecx, esi
call	eax
mov	byte ptr [esp+5Ch+var_4], 0
lea	ecx, [esp+5Ch+var_44]
test	al, al
jz	short loc_62F1A2
call	sub_407910
lea	ecx, [esp+5Ch+var_2C]
mov	[esp+5Ch+var_4], 0FFFFFFFFh
call	sub_407910
inc	edi
cmp	edi, [esp+5Ch+var_48]
jl	loc_62F0F3

loc_62F17C:
mov	al, 1

loc_62F17E:
mov	ecx, [esp+5Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	ebx
mov	ecx, [esp+50h+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	4

loc_62F19D:
mov	byte ptr [esp+5Ch+var_4], 0

loc_62F1A2:
call	sub_407910
lea	ecx, [esp+5Ch+var_2C]
mov	[esp+5Ch+var_4], 0FFFFFFFFh
call	sub_407910

loc_62F1B8:
xor	al, al
jmp	short loc_62F17E
sub_62F090 endp

align 10h



sub_62F1C0 proc	near

var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_70=	byte ptr -70h
var_6C=	dword ptr -6Ch
var_64=	byte ptr -64h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_48=	byte ptr -48h
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_130A3F0
mov	eax, large fs:0
push	eax
sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+78h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+8Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+8Ch+arg_4]
mov	eax, [esi]
mov	edx, [eax]
mov	ebx, [esp+8Ch+arg_0]
mov	edi, ecx
lea	ecx, [esp+8Ch+var_6C]
push	ecx
xor	ebp, ebp
push	ebp
push	esi
mov	[esp+98h+var_6C], ebp
call	edx
cmp	eax, ebp
jnz	loc_62F2F5
mov	ecx, [esp+98h+var_78]
lea	eax, [esp+98h+var_7D]
push	eax
push	ecx
lea	ecx, [esp+0A0h+var_6C]
call	sub_407D30
push	eax
lea	edx, [esp+9Ch+var_34]
push	ebx
push	edx
mov	[esp+0A4h+var_10], ebp
call	sub_403CD0
add	esp, 0Ch
lea	ecx, [esp+98h+var_6C]
mov	byte ptr [esp+98h+var_10], 2
call	sub_407910
lea	eax, [esp+98h+var_34]
push	eax
lea	ecx, [esp+9Ch+var_50]
call	sub_403850
mov	byte ptr [esp+98h+var_10], 3
mov	[esp+98h+var_38], esi
lea	ecx, [esp+98h+var_50]
push	ecx
mov	bl, 4
lea	ecx, [esp+9Ch+var_6C]
mov	byte ptr [esp+9Ch+var_10], bl
call	sub_403850
mov	byte ptr [esp+98h+var_10], 5
mov	edx, [esp+98h+var_38]
mov	[esp+98h+var_54], edx
lea	eax, [esp+98h+var_6C]
push	eax
lea	ecx, [esp+9Ch+var_74]
push	ecx
lea	edx, [edi+0CCh]
push	edx
mov	byte ptr [esp+0A4h+var_10], 6
call	sub_63D5D0
lea	ecx, [esp+98h+var_6C]
mov	byte ptr [esp+98h+var_10], bl
call	sub_407910
lea	ecx, [esp+98h+var_50]
mov	byte ptr [esp+98h+var_10], 2
call	sub_407910
cmp	[esp+98h+var_70], 0
jnz	short loc_62F2FC

loc_62F2E1:
lea	ecx, [esp+98h+var_34]
mov	[esp+98h+var_10], 0FFFFFFFFh
call	sub_407910

loc_62F2F5:
xor	al, al
jmp	loc_62F3C9

loc_62F2FC:
mov	eax, [esi]
mov	edx, [eax+0Ch]
lea	ecx, [esp+98h+var_7C]
push	ecx
push	esi
mov	[esp+0A0h+var_7C], ebp
call	edx
cmp	eax, ebp
jnz	short loc_62F2E1
cmp	[esp+0A0h+var_84], 0
jle	loc_62F3B3

loc_62F31C:
mov	eax, [esi]
mov	edx, [eax+8]
lea	ecx, [esp+0A0h+var_7C]
push	ecx
push	ebp
push	esi
mov	[esp+0ACh+var_7C], 0
call	edx
test	eax, eax
jnz	short loc_62F2E1
lea	eax, [esp+0ACh+var_91]
push	eax
push	offset byte_1545BB0
lea	ecx, [esp+0B4h+var_64]
call	sub_407D30
push	eax
lea	ecx, [esp+0B0h+var_48]
push	ecx
lea	edx, [esp+0B4h+var_80]
push	edx
mov	byte ptr [esp+0B8h+var_24], 9
call	sub_403CD0
add	esp, 0Ch
mov	byte ptr [esp+0ACh+var_24], 0Ah
mov	ecx, [esp+0ACh+var_88]
push	ecx
push	eax
mov	ecx, edi
call	sub_62F1C0
test	al, al
lea	ecx, [esp+0ACh+var_80]
setz	bl
mov	byte ptr [esp+0ACh+var_24], 9
call	sub_407910
lea	ecx, [esp+0ACh+var_64]
mov	byte ptr [esp+0ACh+var_24], 2
call	sub_407910
test	bl, bl
jnz	loc_62F2E1
inc	ebp
cmp	ebp, [esp+0ACh+var_90]
jl	loc_62F31C

loc_62F3B3:
lea	ecx, [esp+0ACh+var_48]
mov	[esp+0ACh+var_24], 0FFFFFFFFh
call	sub_407910
mov	al, 1

loc_62F3C9:
mov	ecx, [esp+0ACh+var_2C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+98h+var_30]
xor	ecx, esp
call	sub_7999A3
add	esp, 78h
retn	8
sub_62F1C0 endp	; sp-analysis failed

align 10h



sub_62F3F0 proc	near

var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13087C0
mov	eax, large fs:0
push	eax
sub	esp, 40h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+50h+var_C]
mov	large fs:0, eax
lea	eax, [esi+8]
push	eax
lea	ecx, [esp+54h+var_44]
call	sub_403850
mov	[esp+50h+var_2C], esi
lea	eax, [esp+50h+var_44]
push	eax
lea	ecx, [esp+54h+var_28]
mov	[esp+54h+var_4], 0
call	sub_403850
mov	ecx, [esp+50h+var_2C]
mov	[esp+50h+var_10], ecx
mov	ecx, [esp+50h+arg_0]
lea	edx, [esp+50h+var_28]
push	edx
lea	eax, [esp+54h+var_4C]
push	eax
add	ecx, 0E4h
push	ecx
mov	byte ptr [esp+5Ch+var_4], 1
call	sub_63D5D0
lea	ecx, [esp+50h+var_28]
mov	byte ptr [esp+50h+var_4], 0
call	sub_407910
lea	ecx, [esp+50h+var_44]
mov	[esp+50h+var_4], 0FFFFFFFFh
call	sub_407910
cmp	[esp+50h+var_48], 0
setnz	al
mov	ecx, [esp+50h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 4Ch
retn	4
sub_62F3F0 endp

align 10h



sub_62F4A0 proc	near

var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13087C0
mov	eax, large fs:0
push	eax
sub	esp, 40h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+50h+var_C]
mov	large fs:0, eax
lea	eax, [esi+20h]
push	eax
lea	ecx, [esp+54h+var_44]
call	sub_403850
mov	[esp+50h+var_2C], esi
lea	eax, [esp+50h+var_44]
push	eax
lea	ecx, [esp+54h+var_28]
mov	[esp+54h+var_4], 0
call	sub_403850
mov	ecx, [esp+50h+var_2C]
mov	[esp+50h+var_10], ecx
mov	ecx, [esp+50h+arg_0]
lea	edx, [esp+50h+var_28]
push	edx
lea	eax, [esp+54h+var_4C]
push	eax
add	ecx, 0FCh
push	ecx
mov	byte ptr [esp+5Ch+var_4], 1
call	sub_63D5D0
lea	ecx, [esp+50h+var_28]
mov	byte ptr [esp+50h+var_4], 0
call	sub_407910
lea	ecx, [esp+50h+var_44]
mov	[esp+50h+var_4], 0FFFFFFFFh
call	sub_407910
cmp	[esp+50h+var_48], 0
setnz	al
mov	ecx, [esp+50h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 4Ch
retn	4
sub_62F4A0 endp

align 10h



sub_62F550 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	eax
mov	ebx, eax
call	sub_77E2F0
mov	[esp+8+arg_0], eax
lea	eax, [esi+0Ch]
push	eax
lea	ecx, [esi+8]
push	ecx
lea	edx, [esi+4]
push	edx
push	ebx
call	sub_77E650
push	28h
push	eax
mov	dword ptr [eax+10h], offset off_1556AA4
call	sub_77E0D0
mov	eax, [esp+20h+arg_0]
dec	dword ptr [esi+10h]
add	esp, 1Ch
mov	[edi], eax
mov	eax, edi
pop	ebx
retn	4
sub_62F550 endp

align 10h



sub_62F5A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1306798
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
mov	[esp+14h+var_4], 0
mov	ecx, [esi+4]
mov	eax, [esi]
push	ecx
mov	edx, esp
mov	[edx], eax
push	ecx
mov	eax, esp
mov	[eax], ecx
call	sub_630D80
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	ecx, [esi]
add	esp, 8
test	ecx, ecx
jz	short loc_62F638
mov	esi, [esi+8]
sub	esi, ecx
mov	eax, 2E8BA2E9h
imul	esi
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 2Ch
cmp	eax, 80h
jbe	short loc_62F62E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4

loc_62F62E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_62F638:
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_62F5A0 endp

align 10h



sub_62F650 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_1308788
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, [esp+14h+arg_4]
mov	esi, [esp+14h+arg_0]
mov	dword ptr [esi], offset	off_1556AA4
cmp	esi, eax
jz	short loc_62F6AD
mov	ecx, [eax+4]
mov	[esi+4], ecx
mov	dx, [eax+8]
mov	[esi+8], dx
mov	cx, [eax+0Ah]
push	8		; MaxCount
add	eax, 0Ch
push	eax		; Src
lea	edx, [esi+0Ch]
push	8		; DstSize
push	edx		; Dst
mov	[esi+0Ah], cx
call	_memcpy_s
add	esp, 10h

loc_62F6AD:
mov	eax, [esp+14h+arg_8]
push	eax
lea	ecx, [esi+14h]
mov	[esp+18h+var_4], 0
call	sub_403850
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	0Ch
sub_62F650 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1306790

loc_62F6E0:
push	esi
mov	esi, [eax]
test	esi, esi
jz	short loc_62F71C
mov	ecx, [eax+8]
sub	ecx, esi
mov	eax, 2E8BA2E9h
imul	ecx
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 2Ch
cmp	eax, 80h
jbe	short loc_62F712
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi
retn

loc_62F712:
push	eax
push	esi
call	sub_77E0D0
add	esp, 8

loc_62F71C:
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_1306790
align 10h



sub_62F720 proc	near

var_3C=	byte ptr -3Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130A36A
mov	eax, large fs:0
push	eax
sub	esp, 30h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3Ch+var_10], eax
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
cmp	ecx, [esi]
jb	short loc_62F78A
cmp	ecx, [esi+4]
jnb	short loc_62F78A
lea	eax, [esp+40h+var_3C]
push	eax
call	sub_62FB60
lea	ecx, [esp+40h+var_3C]
push	ecx
push	edi
mov	ecx, esi
mov	[esp+48h+var_4], 0
call	sub_62FF60
lea	edx, [esp+40h+var_3C]
push	edx
mov	[esp+44h+var_4], 0FFFFFFFFh
call	sub_62CE90
jmp	short loc_62F793

loc_62F78A:
push	ecx
push	edi
mov	ecx, esi
call	sub_62FF60

loc_62F793:
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	ecx, [esp+3Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn
sub_62F720 endp

align 10h



sub_62F7B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_130676A
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	esi, [esp+2Ch+arg_4]
mov	eax, [esp+2Ch+arg_0]
mov	ebx, [eax+4]
mov	[esp+2Ch+var_18], esi
mov	ebp, edi
cmp	esi, edi
jz	short loc_62F82E
mov	edi, edi

loc_62F7F0:
cmp	ebp, ebx
jz	loc_62F906
lea	ecx, [esi+14h]
mov	[esp+2Ch+var_4], 0
call	sub_407910
push	ebp
mov	[esp+30h+var_4], 0FFFFFFFFh
push	esi
mov	dword ptr [esi], offset	off_1556AA4
call	sub_630820
add	esi, 2Ch
add	esp, 8
add	ebp, 2Ch
mov	[esp+2Ch+var_18], esi
cmp	esi, edi
jnz	short loc_62F7F0

loc_62F82E:
cmp	ebp, ebx
jz	loc_62F8DA
jmp	short loc_62F840
align 10h

loc_62F840:
lea	edi, [esi+14h]
mov	ecx, edi
mov	[esp+2Ch+var_4], 2
call	sub_407910
mov	[esp+2Ch+var_4], 0FFFFFFFFh
mov	dword ptr [esi], offset	off_1556AA4
mov	[esp+2Ch+var_14], esi
mov	[esp+2Ch+var_4], 4
mov	dword ptr [esi], offset	off_1556AA4
cmp	esi, ebp
jz	short loc_62F8A0
mov	edx, [ebp+4]
mov	[esi+4], edx
mov	ax, [ebp+8]
push	8		; MaxCount
lea	edx, [ebp+0Ch]
push	edx		; Src
mov	[esi+8], ax
mov	cx, [ebp+0Ah]
lea	eax, [esi+0Ch]
push	8		; DstSize
push	eax		; Dst
mov	[esi+0Ah], cx
call	_memcpy_s
add	esp, 10h

loc_62F8A0:
lea	ecx, [ebp+14h]
push	ecx
lea	edx, [esp+30h+var_10]
push	edx
mov	byte ptr [esp+34h+var_4], 5
call	sub_459510
mov	eax, [eax]
add	esp, 8
push	eax
mov	ecx, edi
call	sub_456D40
add	esi, 2Ch
add	ebp, 2Ch
mov	[esp+2Ch+var_4], 0FFFFFFFFh
mov	[esp+2Ch+var_18], esi
cmp	ebp, ebx
jnz	loc_62F840

loc_62F8DA:
push	esi
mov	edi, ebx
call	sub_630E00
add	esp, 4

loc_62F8E5:
mov	ecx, [esp+2Ch+arg_0]
mov	eax, [esp+2Ch+arg_4]
mov	[ecx+4], esi
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8

loc_62F906:
cmp	esi, edi
jz	loc_62F82E
push	esi
call	sub_630E00
push	edi
mov	edi, ebx
call	sub_630E00
add	esp, 8
jmp	short loc_62F8E5
sub_62F7B0 endp

align 10h



; int __fastcall sub_62F930(void *)
sub_62F930 proc	near
imul	eax, 2Ch
cmp	eax, 80h
jbe	short loc_62F944
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_62F944:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8
retn
sub_62F930 endp

align 10h



sub_62F950 proc	near

var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130BA2A
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
cmp	ecx, [esi]
jb	short loc_62F9BD
cmp	ecx, [esi+4]
jnb	short loc_62F9BD
lea	eax, [esp+1Ch+var_18]
push	eax
call	sub_62FAB0
lea	ecx, [esp+1Ch+var_18]
push	ecx
push	edi
mov	ecx, esi
mov	[esp+24h+var_4], 0
call	sub_630040
lea	edx, [esp+1Ch+var_18]
push	edx
mov	[esp+20h+var_4], 0FFFFFFFFh
call	sub_62F5A0
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 18h
retn

loc_62F9BD:
push	ecx
push	edi
mov	ecx, esi
call	sub_630040
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 18h
retn
sub_62F950 endp

align 10h



sub_62F9E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
mov	ecx, [ecx+4]
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
push	esi
push	edi
mov	edi, eax
mov	esi, ebx
mov	[esp+10h+arg_8], ecx
cmp	eax, ebx
jz	short loc_62FA3F
mov	ebp, eax
sub	ebp, ebx

loc_62FA03:
cmp	esi, ecx
jz	short loc_62FA79
push	edi
call	sub_62F5A0
xor	eax, eax
cmp	edi, eax
jz	short loc_62FA2D
mov	edx, [esi]
mov	[edi], edx
mov	ecx, [esi+4]
mov	[esi+ebp+4], ecx
mov	edx, [esi+8]
mov	[esi+ebp+8], edx
mov	[esi], eax
mov	[esi+8], eax
mov	[esi+4], eax

loc_62FA2D:
mov	ecx, [esp+10h+arg_8]
mov	eax, [esp+10h+arg_4]
add	edi, 0Ch
add	esi, 0Ch
cmp	edi, ebx
jnz	short loc_62FA03

loc_62FA3F:
cmp	esi, ecx
jz	short loc_62FA9F

loc_62FA43:
xor	edx, edx
cmp	edi, edx
jz	short loc_62FA61
mov	ebx, [esi]
mov	[edi], ebx
mov	ebx, [esi+4]
mov	[edi+4], ebx
mov	ebx, [esi+8]
mov	[edi+8], ebx
mov	[esi], edx
mov	[esi+8], edx
mov	[esi+4], edx

loc_62FA61:
add	esi, 0Ch
add	edi, 0Ch
cmp	esi, ecx
jnz	short loc_62FA43
mov	ecx, [esp+10h+arg_0]
mov	[ecx+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_62FA79:
cmp	edi, ebx
jz	short loc_62FA3F
mov	esi, edi
nop

loc_62FA80:
push	esi
call	sub_62F5A0
add	esi, 0Ch
cmp	esi, ebx
jnz	short loc_62FA80
mov	eax, [esp+10h+arg_0]
mov	[eax+4], edi
mov	eax, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_62FA9F:
mov	edx, [esp+10h+arg_0]
mov	[edx+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_62F9E0 endp

align 10h



sub_62FAB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130A338
mov	eax, large fs:0
push	eax
push	ecx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	esi, [esp+1Ch+arg_0]
mov	ecx, [edi+4]
sub	ecx, [edi]
mov	eax, 2E8BA2E9h
imul	ecx
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
lea	ecx, [esp+1Ch+var_10]
add	eax, edx
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
push	ecx
mov	[esp+20h+var_10], eax
mov	dword ptr [esi+8], 0
call	sub_62FBF0
mov	edx, [esp+1Ch+var_10]
imul	edx, 2Ch
add	edx, eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], edx
mov	[esp+1Ch+var_4], 0
mov	ecx, [edi+4]
mov	edi, [edi]
push	eax
push	ecx
push	edi
call	sub_630880
mov	[esi+4], eax
add	esp, 0Ch
mov	eax, esi
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 10h
retn	4
sub_62FAB0 endp

align 10h



sub_62FB60 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1308758
mov	eax, large fs:0
push	eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	esi, [esp+18h+arg_0]
mov	dword ptr [esi], offset	off_1556AA4
cmp	esi, edi
jz	short loc_62FBBC
mov	eax, [edi+4]
mov	[esi+4], eax
mov	cx, [edi+8]
push	8		; MaxCount
lea	eax, [edi+0Ch]
push	eax		; Src
mov	[esi+8], cx
mov	dx, [edi+0Ah]
lea	ecx, [esi+0Ch]
push	8		; DstSize
push	ecx		; Dst
mov	[esi+0Ah], dx
call	_memcpy_s
add	esp, 10h

loc_62FBBC:
add	edi, 14h
push	edi
lea	ecx, [esi+14h]
mov	[esp+1Ch+var_4], 0
call	sub_403850
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_62FB60 endp

align 10h



sub_62FBF0 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
cmp	eax, 5D1745Dh
jbe	short loc_62FC12
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_62FC12:
test	eax, eax
jz	short loc_62FC53
imul	eax, 2Ch
mov	[esp+10h+var_10], eax
cmp	eax, 80h
jbe	short loc_62FC2B
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
jmp	short loc_62FC34

loc_62FC2B:
lea	ecx, [esp+10h+var_10]
push	ecx
call	sub_77E150

loc_62FC34:
mov	ecx, eax
mov	eax, 0BA2E8BA3h
mul	[esp+14h+var_10]
mov	eax, [esp+14h+arg_0]
add	esp, 4
shr	edx, 5
mov	[eax], edx
mov	eax, ecx
add	esp, 10h
retn	4

loc_62FC53:
xor	eax, eax
add	esp, 10h
retn	4
sub_62FBF0 endp

align 10h



sub_62FC60 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, ecx
test	esi, esi
jz	short loc_62FC97
push	edi
lea	ecx, [ecx+0]

loc_62FC70:
mov	eax, [esi+0Ch]
push	eax
mov	ecx, ebx
call	sub_62FC60
mov	edi, [esi+8]
push	28h
push	esi
mov	dword ptr [esi+10h], offset off_1556AA4
call	sub_77E0D0
add	esp, 8
mov	esi, edi
test	edi, edi
jnz	short loc_62FC70
pop	edi

loc_62FC97:
pop	esi
pop	ebx
retn	4
sub_62FC60 endp

align 10h



sub_62FCA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, eax
mov	esi, [edi+4]
mov	ebp, edi
mov	al, 1
test	esi, esi
jz	short loc_62FCD8

loc_62FCB5:
mov	ecx, [esp+10h+arg_4]
lea	eax, [esi+10h]
push	eax
push	ecx
lea	ecx, [edi+14h]
mov	ebp, esi
call	sub_587380
test	al, al
jz	short loc_62FCD1
mov	esi, [esi+8]
jmp	short loc_62FCD4

loc_62FCD1:
mov	esi, [esi+0Ch]

loc_62FCD4:
test	esi, esi
jnz	short loc_62FCB5

loc_62FCD8:
mov	[esp+10h+arg_0], ebp
test	al, al
jz	short loc_62FD12
push	ebp
cmp	ebp, [edi+8]
jnz	short loc_62FD06
mov	eax, [esp+14h+arg_4]
push	ebp
lea	edx, [esp+18h+arg_4]
push	edx
call	sub_630410
mov	eax, [eax]
pop	edi
pop	esi
mov	[ebx], eax
pop	ebp
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_62FD06:
call	sub_77E330
add	esp, 4
mov	[esp+10h+arg_0], eax

loc_62FD12:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_0]
push	ecx
add	edx, 10h
push	edx
lea	ecx, [edi+14h]
call	sub_587380
test	al, al
jz	short loc_62FD4C
push	esi
push	ebp
lea	eax, [esp+18h+arg_4]
push	eax
mov	eax, [esp+1Ch+arg_4]
call	sub_630410
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_62FD4C:
mov	edx, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	[ebx], edx
mov	byte ptr [ebx+4], 0
mov	eax, ebx
pop	ebx
retn	8
sub_62FCA0 endp

align 10h



sub_62FD60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	ebx, [edi+4]
mov	ebp, edi
test	ebx, ebx
jz	short loc_62FDDC
mov	eax, [esp+1Ch+arg_8]
mov	edx, [eax+14h]
mov	edi, [eax+10h]
sub	edi, edx
mov	[esp+1Ch+var_C], edx
mov	[esp+1Ch+var_4], edi
jmp	short loc_62FD94
align 10h

loc_62FD90:
mov	edx, [esp+1Ch+var_C]

loc_62FD94:
mov	eax, [ebx+24h]
mov	esi, [ebx+20h]
sub	esi, eax
cmp	esi, edi
mov	ebp, ebx
mov	[esp+1Ch+var_8], esi
lea	ecx, [esp+1Ch+var_8]
jl	short loc_62FDAE
lea	ecx, [esp+1Ch+var_4]

loc_62FDAE:
mov	ecx, [ecx]
push	ecx
push	eax
push	edx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_62FDCA
cmp	edi, esi
jl	short loc_62FDCC
cmp	edi, esi
setnle	al
test	eax, eax

loc_62FDCA:
jge	short loc_62FDD1

loc_62FDCC:
mov	ebx, [ebx+8]
jmp	short loc_62FDD4

loc_62FDD1:
mov	ebx, [ebx+0Ch]

loc_62FDD4:
test	ebx, ebx
jnz	short loc_62FD90
mov	edi, [esp+1Ch+arg_0]

loc_62FDDC:
mov	esi, [esp+1Ch+arg_4]
mov	eax, [esp+1Ch+arg_8]
push	ebx
push	ebp
push	esi
call	sub_6304A0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_62FD60 endp

align 10h



sub_62FE00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, eax
mov	esi, [edi+4]
mov	ebp, edi
mov	al, 1
test	esi, esi
jz	short loc_62FE38

loc_62FE15:
mov	ecx, [esp+10h+arg_4]
lea	eax, [esi+10h]
push	eax
push	ecx
lea	ecx, [edi+14h]
mov	ebp, esi
call	sub_4444F0
test	al, al
jz	short loc_62FE31
mov	esi, [esi+8]
jmp	short loc_62FE34

loc_62FE31:
mov	esi, [esi+0Ch]

loc_62FE34:
test	esi, esi
jnz	short loc_62FE15

loc_62FE38:
mov	[esp+10h+arg_0], ebp
test	al, al
jz	short loc_62FE72
push	ebp
cmp	ebp, [edi+8]
jnz	short loc_62FE66
mov	eax, [esp+14h+arg_4]
push	ebp
lea	edx, [esp+18h+arg_4]
push	edx
call	sub_63D9C0
mov	eax, [eax]
pop	edi
pop	esi
mov	[ebx], eax
pop	ebp
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_62FE66:
call	sub_77E330
add	esp, 4
mov	[esp+10h+arg_0], eax

loc_62FE72:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_0]
push	ecx
add	edx, 10h
push	edx
lea	ecx, [edi+14h]
call	sub_4444F0
test	al, al
jz	short loc_62FEAC
push	esi
push	ebp
lea	eax, [esp+18h+arg_4]
push	eax
mov	eax, [esp+1Ch+arg_4]
call	sub_63D9C0
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_62FEAC:
mov	edx, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	[ebx], edx
mov	byte ptr [ebx+4], 0
mov	eax, ebx
pop	ebx
retn	8
sub_62FE00 endp

align 10h



sub_62FEC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	edi
mov	edi, eax
mov	eax, esi
call	sub_646D20
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	[esp+10h+var_4], eax
call	sub_630320
mov	ebx, eax
mov	eax, [esi]
sub	edi, eax
jz	short loc_62FEF1
push	edi
push	eax
push	ebx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi
jmp	short loc_62FEF3

loc_62FEF1:
mov	eax, ebx

loc_62FEF3:
mov	edx, [esp+0Ch+arg_0]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [esi]
lea	edi, [eax+4]
test	ecx, ecx
jz	short loc_62FF3F
mov	eax, [esi+8]
sub	eax, ecx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_62FF35
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	edx, [esp+10h+var_4]
lea	eax, [ebx+edx*4]
add	esp, 4
mov	[esi], ebx
mov	[esi+4], edi
mov	[esi+8], eax
pop	edi
pop	ebx
pop	ecx
retn	4

loc_62FF35:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_62FF3F:
mov	edx, [esp+0Ch+var_4]
mov	[esi+4], edi
lea	eax, [ebx+edx*4]
pop	edi
mov	[esi], ebx
mov	[esi+8], eax
pop	ebx
pop	ecx
retn	4
sub_62FEC0 endp

align 10h


; Attributes: bp-based frame

sub_62FF60 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_130A310
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	esi, ecx
mov	eax, esi
call	sub_6301D0
lea	ecx, [ebp+var_14]
push	ecx
mov	[ebp+var_14], eax
call	sub_62FBF0
mov	[ebp+var_4], 0
mov	ecx, [esi]
mov	edi, eax
mov	eax, [ebp+arg_0]
mov	byte ptr [ebp+var_1C], 0
mov	edx, [ebp+var_1C]
push	edx
push	edi
push	eax
push	ecx
mov	[ebp+var_20], edi
mov	[ebp+var_18], edi
call	sub_630540
mov	ecx, [ebp+arg_4]
mov	ebx, eax
add	esp, 10h
push	ebx
mov	[ebp+var_18], ebx
call	sub_630760
add	esp, 4
mov	eax, esi
add	ebx, 2Ch
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_630230
mov	edx, [ebp+var_14]
imul	edx, 2Ch
add	edx, edi
mov	[esi], edi
mov	[esi+4], ebx
mov	[esi+8], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_62FF60 endp



; Attributes: noreturn

sub_63000D proc	near
mov	esi, [ebp-20h]
mov	edi, [ebp-18h]
push	esi
call	sub_630E00
add	esp, 4
test	esi, esi
jz	short loc_63002A
mov	eax, [ebp-14h]
mov	ecx, esi	; void *
call	sub_62F930

loc_63002A:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_63000D endp

align 10h


; Attributes: bp-based frame

sub_630040 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_130BA00
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	esi, ecx
mov	eax, esi
call	sub_630290
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_18]
push	ecx
call	sub_6303A0
mov	edi, eax
mov	[ebp+var_20], edi
mov	[ebp+var_14], edi
mov	[ebp+var_4], 0
mov	byte ptr [ebp+var_1C], 0
mov	edx, [ebp+var_1C]
push	edx
push	edi
mov	eax, [ebp+arg_0]
mov	ecx, [esi]
call	sub_6305E0
mov	ebx, eax
mov	[ebp+var_14], ebx
push	ebx
mov	ecx, [ebp+arg_4]
call	sub_6307C0
add	esp, 0Ch
add	ebx, 0Ch
mov	[ebp+var_14], ebx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [esi]
test	eax, eax
jz	short loc_630102
mov	ecx, [esi+8]
sub	ecx, eax
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 1
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_6300F6
mov	eax, [esi]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_630102

loc_6300F6:
push	eax
mov	eax, [esi]
push	eax
call	sub_77E0D0
add	esp, 8

loc_630102:
mov	[esi], edi
mov	[esi+4], ebx
mov	eax, [ebp+var_18]
lea	eax, [eax+eax*2]
lea	ecx, [edi+eax*4]
mov	[esi+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_630040 endp



; Attributes: noreturn

sub_630127 proc	near
mov	edi, [ebp-14h]
mov	esi, [ebp-20h]
mov	eax, esi
call	sub_6301B0
test	esi, esi
jz	short loc_630142
mov	eax, [ebp-18h]
mov	ecx, esi	; void *
call	sub_6302F0

loc_630142:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_630127 endp

align 10h



sub_630150 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, eax
cmp	esi, edi
jz	short loc_6301A6
lea	eax, [esp+8+var_1]
call	sub_630630
movzx	eax, byte ptr [eax]
push	eax
mov	ecx, edi
sub	ecx, esi
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
push	ecx
call	sub_4776C0
add	esp, 4
add	eax, eax
push	eax
push	0
push	edi
push	esi
call	sub_630640
lea	eax, [esp+1Ch+var_1]
call	sub_630630
movzx	edx, byte ptr [eax]
push	edx
mov	eax, edi
call	sub_630700
add	esp, 18h

loc_6301A6:
pop	esi
pop	ecx
retn
sub_630150 endp

align 10h



sub_6301B0 proc	near
push	esi
mov	esi, eax
cmp	esi, edi
jz	short loc_6301C4

loc_6301B7:
push	esi
call	sub_62F5A0
add	esi, 0Ch
cmp	esi, edi
jnz	short loc_6301B7

loc_6301C4:
pop	esi
retn
sub_6301B0 endp

align 10h



sub_6301D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	ecx, [eax+4]
sub	ecx, [eax]
mov	eax, 2E8BA2E9h
imul	ecx
sar	edx, 3
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
mov	eax, 5D1745Dh
sub	eax, ecx
mov	[esp+8+var_4], 1
mov	[esp+8+var_8], ecx
cmp	eax, 1
jnb	short loc_63020A
push	offset aVector	; "vector"
call	sub_77EC70

loc_63020A:
lea	eax, [esp+8+var_8]
cmp	ecx, 1
ja	short loc_630216
lea	eax, [esp+8+var_4]

loc_630216:
mov	eax, [eax]
add	eax, ecx
cmp	eax, 5D1745Dh
ja	short loc_630225
cmp	eax, ecx
jnb	short loc_63022A

loc_630225:
mov	eax, 5D1745Dh

loc_63022A:
add	esp, 8
retn
sub_6301D0 endp

align 10h



sub_630230 proc	near
push	esi
mov	esi, eax
mov	ecx, [esi+4]
mov	eax, [esi]
push	ecx
mov	edx, esp
mov	[edx], eax
push	ecx
mov	eax, esp
mov	[eax], ecx
call	sub_630D80
mov	ecx, [esi]
add	esp, 8
test	ecx, ecx
jz	short loc_630285
mov	esi, [esi+8]
sub	esi, ecx
mov	eax, 2E8BA2E9h
imul	esi
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 2Ch
cmp	eax, 80h
jbe	short loc_63027B
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi
retn

loc_63027B:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_630285:
pop	esi
retn
sub_630230 endp

align 10h



sub_630290 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	ecx, [eax+4]
sub	ecx, [eax]
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 1
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
mov	eax, 15555555h
sub	eax, ecx
mov	[esp+8+var_4], 1
mov	[esp+8+var_8], ecx
cmp	eax, 1
jnb	short loc_6302C9
push	offset aVector	; "vector"
call	sub_77EC70

loc_6302C9:
lea	eax, [esp+8+var_8]
cmp	ecx, 1
ja	short loc_6302D5
lea	eax, [esp+8+var_4]

loc_6302D5:
mov	eax, [eax]
add	eax, ecx
cmp	eax, 15555555h
ja	short loc_6302E4
cmp	eax, ecx
jnb	short loc_6302E9

loc_6302E4:
mov	eax, 15555555h

loc_6302E9:
add	esp, 8
retn
sub_630290 endp

align 10h



; int __fastcall sub_6302F0(void *)
sub_6302F0 proc	near
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_630308
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_630308:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8
retn
sub_6302F0 endp

align 10h



sub_630320 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
cmp	eax, 3FFFFFFFh
jbe	short loc_630342
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_630342:
test	eax, eax
jz	short loc_63038F
add	eax, eax
add	eax, eax
mov	[esp+10h+var_10], eax
cmp	eax, 80h
jbe	short loc_630370
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 2
mov	[ecx], edx
add	esp, 10h
retn	4

loc_630370:
lea	ecx, [esp+10h+var_10]
push	ecx
call	sub_77E150
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 2
mov	[ecx], edx
add	esp, 10h
retn	4

loc_63038F:
xor	eax, eax
add	esp, 10h
retn	4
sub_630320 endp

align 10h



sub_6303A0 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
cmp	eax, 15555555h
jbe	short loc_6303C2
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_6303C2:
test	eax, eax
jz	short loc_630407
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
mov	[esp+10h+var_10], eax
cmp	eax, 80h
jbe	short loc_6303DF
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
jmp	short loc_6303E8

loc_6303DF:
lea	ecx, [esp+10h+var_10]
push	ecx
call	sub_77E150

loc_6303E8:
mov	ecx, eax
mov	eax, 0AAAAAAABh
mul	[esp+14h+var_10]
mov	eax, [esp+14h+arg_0]
add	esp, 4
shr	edx, 3
mov	[eax], edx
mov	eax, ecx
add	esp, 10h
retn	4

loc_630407:
xor	eax, eax
add	esp, 10h
retn	4
sub_6303A0 endp

align 10h



sub_630410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
mov	[esp+0Ch+arg_4], 0
cmp	ebx, edi
jnz	short loc_630439
push	esi
call	sub_630930
mov	esi, eax
mov	[ebx+8], esi
mov	[edi+4], esi
jmp	short loc_630476

loc_630439:
cmp	[esp+0Ch+arg_8], 0
jnz	short loc_630451
lea	eax, [ebx+10h]
push	eax
push	esi
lea	ecx, [edi+14h]
call	sub_587380
test	al, al
jz	short loc_630466

loc_630451:
push	esi
call	sub_630930
mov	esi, eax
mov	[ebx+8], esi
cmp	ebx, [edi+8]
jnz	short loc_630479
mov	[edi+8], esi
jmp	short loc_630479

loc_630466:
push	esi
call	sub_630930
mov	esi, eax
mov	[ebx+0Ch], esi
cmp	ebx, [edi+0Ch]
jnz	short loc_630479

loc_630476:
mov	[edi+0Ch], esi

loc_630479:
lea	ecx, [edi+4]
push	ecx
push	esi
mov	[esi+4], ebx
call	sub_77E4A0
inc	dword ptr [edi+10h]
add	esp, 8
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	0Ch
sub_630410 endp

align 10h



sub_6304A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
mov	[esp+0Ch+arg_4], 0
cmp	ebx, edi
jnz	short loc_6304C9
push	esi
call	sub_6309D0
mov	esi, eax
mov	[ebx+8], esi
mov	[edi+4], esi
jmp	short loc_630511

loc_6304C9:
cmp	[esp+0Ch+arg_8], 0
jnz	short loc_6304EC
mov	eax, [ebx+20h]
mov	ecx, [ebx+24h]
mov	edx, [esi+10h]
push	eax
mov	eax, [esi+14h]
push	ecx
push	edx
push	eax
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_630501

loc_6304EC:
push	esi
call	sub_6309D0
mov	esi, eax
mov	[ebx+8], esi
cmp	ebx, [edi+8]
jnz	short loc_630514
mov	[edi+8], esi
jmp	short loc_630514

loc_630501:
push	esi
call	sub_6309D0
mov	esi, eax
mov	[ebx+0Ch], esi
cmp	ebx, [edi+0Ch]
jnz	short loc_630514

loc_630511:
mov	[edi+0Ch], esi

loc_630514:
lea	ecx, [edi+4]
push	ecx
push	esi
mov	[esi+4], ebx
call	sub_77E4A0
inc	dword ptr [edi+10h]
add	esp, 8
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	0Ch
sub_6304A0 endp

align 10h



sub_630540 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_1306701
mov	eax, large fs:0
push	eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+1Ch+arg_8]
mov	eax, [esp+1Ch+arg_4]
mov	ebx, [esp+1Ch+arg_0]
sub	eax, ebx
mov	ecx, eax
mov	eax, 2E8BA2E9h
imul	ecx
sar	edx, 3
mov	edi, edx
shr	edi, 1Fh
add	edi, edx
test	edi, edi
jle	short loc_6305BD
jmp	short loc_630590
align 10h

loc_630590:
mov	[esp+1Ch+arg_4], esi
mov	[esp+1Ch+var_4], 0
test	esi, esi
jz	short loc_6305A6
push	ebx
call	sub_630A70

loc_6305A6:
add	esi, 2Ch
dec	edi
add	ebx, 2Ch
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	[esp+1Ch+arg_8], esi
test	edi, edi
jg	short loc_630590

loc_6305BD:
mov	eax, esi
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn
sub_630540 endp

align 10h



sub_6305E0 proc	near

arg_0= dword ptr  4

sub	eax, ecx
mov	edx, eax
mov	eax, 2AAAAAABh
imul	edx
sar	edx, 1
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
xor	edx, edx
cmp	eax, edx
push	esi
mov	esi, [esp+4+arg_0]
jle	short loc_630628
push	edi

loc_630600:
cmp	esi, edx
jz	short loc_63061C
mov	edi, [ecx]
mov	[esi], edi
mov	edi, [ecx+4]
mov	[esi+4], edi
mov	edi, [ecx+8]
mov	[esi+8], edi
mov	[ecx], edx
mov	[ecx+8], edx
mov	[ecx+4], edx

loc_63061C:
dec	eax
add	ecx, 0Ch
add	esi, 0Ch
cmp	eax, edx
jg	short loc_630600
pop	edi

loc_630628:
mov	eax, esi
pop	esi
retn
sub_6305E0 endp

align 10h



sub_630630 proc	near

var_2= byte ptr	-2

push	ecx
mov	cl, [esp+3]
mov	[eax], cl
pop	ecx
retn
sub_630630 endp

align 10h



sub_630640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	ecx, edi
sub	ecx, ebx
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 10h
jle	loc_6306FB
mov	ebp, [esp+10h+arg_C]

loc_63066E:
mov	edx, [esp+10h+arg_10]
test	ebp, ebp
jz	short loc_6306EF
mov	ecx, edx
push	ecx
push	edx
lea	eax, [edi-18h]
push	eax
mov	ecx, edi
sub	ecx, ebx
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cdq
sub	eax, edx
sar	eax, 1
lea	ecx, [eax+eax*2]
lea	edx, [ebx+ecx*8]
push	edx
push	ebx
dec	ebp
call	sub_630AD0
sub	esp, 8
mov	ecx, esp
mov	[esp+2Ch+arg_4], esp
push	eax
call	sub_403850
push	edi
push	ebx
call	sub_630B80
mov	esi, eax
mov	eax, [esp+34h+arg_10]
push	eax
push	ebp
push	0
push	edi
push	esi
call	sub_630640
mov	edi, esi
sub	esi, ebx
mov	eax, 2AAAAAABh
imul	esi
sar	edx, 2
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
add	esp, 38h
cmp	ecx, 10h
jg	short loc_63066E
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_6306EF:
push	edx
push	edi
push	edi
push	ebx
call	sub_630F70
add	esp, 10h

loc_6306FB:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_630640 endp




sub_630700 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	ecx, edi
sub	ecx, esi
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 10h
jle	short loc_630743
mov	ecx, [esp+4+arg_0]
push	ebx
push	ecx
lea	ebx, [esi+180h]
push	ebx
mov	eax, esi
call	sub_630C90
mov	edx, [esp+10h+arg_0]
push	edx
mov	eax, ebx
call	sub_630CD0
add	esp, 0Ch
pop	ebx
pop	edi
retn

loc_630743:
mov	eax, [esp+4+arg_0]
push	eax
push	edi
mov	eax, esi
call	sub_630C90
add	esp, 8
pop	edi
retn
sub_630700 endp

align 10h



sub_630760 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130B9E1
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, [esp+14h+arg_0]
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_63079B
push	eax
call	sub_62FB60

loc_63079B:
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_630760 endp

align 10h



sub_6307C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130B9E1
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, [esp+14h+arg_0]
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_6307FB
push	eax
call	sub_62FAB0

loc_6307FB:
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_6307C0 endp

align 10h



sub_630820 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_1304D61
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
test	esi, esi
jz	short loc_630860
mov	eax, [esp+18h+arg_4]
push	eax
call	sub_630A70

loc_630860:
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_630820 endp

align 10h


; Attributes: bp-based frame

sub_630880 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_130A2F1
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_4]
mov	ebx, [ebp+arg_0]
mov	edi, [ebp+arg_8]
mov	[ebp+var_4], 0
sub	eax, ebx
mov	ecx, eax
mov	eax, 2E8BA2E9h
imul	ecx
sar	edx, 3
mov	esi, edx
shr	esi, 1Fh
add	esi, edx

loc_6308D0:
mov	[ebp+var_14], edi
mov	[ebp+var_18], esi
test	esi, esi
jle	short loc_6308FD
mov	[ebp+var_1C], edi
mov	byte ptr [ebp+var_4], 1
test	edi, edi
jz	short loc_6308ED
push	edi
mov	ecx, ebx
call	sub_62FB60

loc_6308ED:
mov	byte ptr [ebp+var_4], 0
add	ebx, 2Ch
mov	[ebp+arg_0], ebx
add	edi, 2Ch
dec	esi
jmp	short loc_6308D0

loc_6308FD:
mov	eax, edi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_630880 endp



; Attributes: noreturn

sub_630911 proc	near
mov	eax, [ebp+10h]
push	eax
mov	edi, [ebp-14h]
call	sub_630E00
add	esp, 4
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_630911 endp

align 10h


; Attributes: bp-based frame

sub_630930 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_13016C0
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	[ebp+var_14], 28h
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	esi, eax
mov	[ebp+var_18], esi
xor	ebx, ebx
mov	[ebp+var_4], ebx
lea	ecx, [esi+10h]
push	ecx
mov	edi, [ebp+arg_0]
call	sub_631140
add	esp, 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_630930 endp



; Attributes: noreturn

sub_6309AA proc	near
mov	eax, [ebp-18h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_6309BE
push	28h
push	eax
call	sub_77E0D0
add	esp, 8

loc_6309BE:
push	ebx
push	ebx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_6309AA endp

align 10h


; Attributes: bp-based frame

sub_6309D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_1308730
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	[ebp+var_14], 2Ch
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	esi, eax
mov	[ebp+var_18], esi
xor	ebx, ebx
mov	[ebp+var_4], ebx
lea	ecx, [esi+10h]
push	ecx
mov	edi, [ebp+arg_0]
call	sub_6311A0
add	esp, 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_6309D0 endp



; Attributes: noreturn

sub_630A4A proc	near
mov	eax, [ebp-18h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_630A5E
push	2Ch
push	eax
call	sub_77E0D0
add	esp, 8

loc_630A5E:
push	ebx
push	ebx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_630A4A endp

align 10h



sub_630A70 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
mov	dword ptr [esi], offset	off_1556AA4
cmp	esi, eax
jz	short loc_630AAD
mov	ecx, [eax+4]
mov	[esi+4], ecx
mov	dx, [eax+8]
mov	[esi+8], dx
mov	cx, [eax+0Ah]
push	8		; MaxCount
add	eax, 0Ch
push	eax		; Src
lea	edx, [esi+0Ch]
push	8		; DstSize
push	edx		; Dst
mov	[esi+0Ah], cx
call	_memcpy_s
mov	eax, [esp+14h+arg_0]
add	esp, 10h

loc_630AAD:
add	eax, 14h
push	eax
lea	eax, [esp+8+var_4]
push	eax
call	sub_459510
mov	ecx, [eax]
add	esp, 8
push	ecx
lea	ecx, [esi+14h]
call	sub_456D40
mov	eax, esi
pop	ecx
retn	4
sub_630A70 endp

align 10h



sub_630AD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [eax+10h]
push	edi
mov	edi, [eax+14h]
mov	eax, [esp+10h+arg_0]
mov	ebx, [eax+10h]
mov	ebp, [eax+14h]
push	esi
push	edi
push	ebx
push	ebp
call	sub_4051D0
mov	ecx, [esp+20h+arg_8]
add	esp, 10h
test	eax, eax
mov	eax, [ecx+10h]
mov	ecx, [ecx+14h]
push	eax
push	ecx
jge	short loc_630B3E
push	esi
push	edi
call	sub_4051D0
add	esp, 10h
test	eax, eax
jl	short loc_630B6A
mov	ecx, [esp+10h+arg_8]
mov	eax, [ecx+10h]
push	eax
mov	eax, [ecx+14h]
push	eax
push	ebx
push	ebp
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_630B35
mov	eax, [esp+10h+arg_8]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_630B35:
mov	eax, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_630B3E:
push	ebx
push	ebp
call	sub_4051D0
add	esp, 10h
test	eax, eax
jl	short loc_630B35
mov	ecx, [esp+10h+arg_8]
mov	eax, [ecx+10h]
push	eax
mov	eax, [ecx+14h]
push	eax
push	esi
push	edi
call	sub_4051D0
add	esp, 10h
test	eax, eax
mov	eax, [esp+10h+arg_8]
jl	short loc_630B6E

loc_630B6A:
mov	eax, [esp+10h+arg_4]

loc_630B6E:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_630AD0 endp

align 10h



sub_630B80 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1303568
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	ebp, [esp+2Ch+arg_0]
mov	ebx, [esp+2Ch+arg_4]
mov	[esp+2Ch+var_4], 0
jmp	short loc_630BC0
align 10h

loc_630BC0:
mov	edi, [esp+2Ch+arg_18]
sub	edi, [esp+2Ch+arg_1C]
mov	[esp+2Ch+var_10], edi
lea	esp, [esp+0]

loc_630BD0:
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
sub	eax, ecx
mov	esi, eax
cmp	edi, esi
mov	[esp+2Ch+var_18], esi
lea	eax, [esp+2Ch+var_10]
jl	short loc_630BEA
lea	eax, [esp+2Ch+var_18]

loc_630BEA:
mov	eax, [eax]
mov	edx, [esp+2Ch+arg_1C]
push	eax
push	edx
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_630C0A
cmp	esi, edi
jl	short loc_630C0C
cmp	esi, edi
setnle	al
test	eax, eax

loc_630C0A:
jge	short loc_630C11

loc_630C0C:
add	ebp, 18h
jmp	short loc_630BD0

loc_630C11:
mov	[esp+2Ch+var_18], edi

loc_630C15:
mov	eax, [ebx-8]
mov	ecx, [ebx-4]
sub	ebx, 18h
sub	eax, ecx
mov	esi, eax
cmp	esi, edi
mov	[esp+2Ch+var_14], esi
lea	eax, [esp+2Ch+var_14]
jl	short loc_630C32
lea	eax, [esp+2Ch+var_18]

loc_630C32:
mov	eax, [eax]
push	eax
push	ecx
mov	ecx, [esp+34h+arg_1C]
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_630C52
cmp	edi, esi
jl	short loc_630C15
cmp	edi, esi
setnle	al
test	eax, eax

loc_630C52:
jl	short loc_630C15
cmp	ebp, ebx
jnb	short loc_630C68
push	ebx
mov	ecx, ebp
call	sub_435CE0
add	ebp, 18h
jmp	loc_630BC0

loc_630C68:
lea	ecx, [esp+2Ch+arg_8]
mov	[esp+2Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	eax, ebp
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_630B80 endp

align 10h



sub_630C90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
cmp	esi, ebx
jz	short loc_630CC7
lea	edi, [esi+18h]
cmp	edi, ebx
jz	short loc_630CC7

loc_630CA4:
mov	eax, [esp+0Ch+arg_4]
push	eax
sub	esp, 18h
mov	ecx, esp
mov	[esp+28h+arg_0], esp
push	edi
call	sub_403850
call	sub_631080
add	edi, 18h
add	esp, 1Ch
cmp	edi, ebx
jnz	short loc_630CA4

loc_630CC7:
pop	edi
pop	esi
pop	ebx
retn
sub_630C90 endp

align 10h



sub_630CD0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 4

push	ecx
push	ebx
push	esi
mov	esi, eax
mov	al, [esp+0Ch+arg_0]
mov	byte ptr [esp+0Ch+var_4], al
cmp	esi, edi
jz	short loc_630D05
mov	ebx, [esp+0Ch+var_4]

loc_630CE5:
push	ebx
sub	esp, 18h
mov	ecx, esp
mov	[esp+28h+var_4], esp
push	esi
call	sub_403850
push	esi
call	sub_631380
add	esi, 18h
add	esp, 20h
cmp	esi, edi
jnz	short loc_630CE5

loc_630D05:
pop	esi
pop	ebx
pop	ecx
retn
sub_630CD0 endp

align 10h



sub_630D10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+4]
push	edi
mov	edi, ebx
test	esi, esi
jz	short loc_630D70
push	ebp
lea	ebp, [ebx+14h]

loc_630D24:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+10h]
push	ecx
mov	ecx, ebp
call	sub_587380
test	al, al
jnz	short loc_630D3F
mov	edi, esi
mov	esi, [esi+8]
jmp	short loc_630D42

loc_630D3F:
mov	esi, [esi+0Ch]

loc_630D42:
test	esi, esi
jnz	short loc_630D24
cmp	edi, ebx
jz	short loc_630D67
mov	eax, [esp+10h+arg_4]
lea	edx, [edi+10h]
push	edx
push	eax
mov	ecx, ebp
call	sub_587380
test	al, al
jz	short loc_630D67
pop	ebp
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_630D67:
pop	ebp
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8

loc_630D70:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_630D10 endp

align 10h



sub_630D80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_13066C8
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	eax, [esp+18h+arg_0]
cmp	eax, [esp+18h+arg_4]
jz	short loc_630DE6
lea	esp, [esp+0]

loc_630DB0:
lea	esi, [eax-2Ch]
mov	[esp+18h+var_10], esi
lea	ecx, [esi+14h]
mov	[esp+18h+var_4], 0
call	sub_407910
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	dword ptr [esi], offset	off_1556AA4
mov	eax, [esp+18h+arg_0]
sub	eax, 2Ch
mov	[esp+18h+arg_0], eax
cmp	eax, [esp+18h+arg_4]
jnz	short loc_630DB0

loc_630DE6:
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_630D80 endp

align 10h



sub_630E00 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1308788
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
cmp	esi, edi
jz	short loc_630E59
lea	esp, [esp+0]

loc_630E30:
lea	ecx, [esi+14h]
mov	[esp+14h+var_4], 0
call	sub_407910
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	dword ptr [esi], offset	off_1556AA4
add	esi, 2Ch
mov	[esp+14h+arg_0], esi
cmp	esi, edi
jnz	short loc_630E30

loc_630E59:
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn
sub_630E00 endp

align 10h



sub_630E70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	edi
mov	edi, [eax+4]
mov	edx, eax
mov	[esp+10h+var_C], edx
test	edi, edi
jz	short loc_630EDD
push	ebx
mov	ebx, [ecx+10h]
push	ebp
mov	ebp, [ecx+14h]
sub	ebx, ebp
push	esi
mov	[esp+1Ch+var_8], ebx

loc_630E90:
mov	eax, [edi+24h]
mov	esi, [edi+20h]
sub	esi, eax
cmp	ebx, esi
mov	[esp+1Ch+var_4], esi
lea	ecx, [esp+1Ch+var_8]
jl	short loc_630EA8
lea	ecx, [esp+1Ch+var_4]

loc_630EA8:
mov	ecx, [ecx]
push	ecx
push	ebp
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_630EC4
cmp	esi, ebx
jl	short loc_630ECF
cmp	esi, ebx
setnle	al
test	eax, eax

loc_630EC4:
jl	short loc_630ECF
mov	[esp+1Ch+var_C], edi
mov	edi, [edi+8]
jmp	short loc_630ED2

loc_630ECF:
mov	edi, [edi+0Ch]

loc_630ED2:
test	edi, edi
jnz	short loc_630E90
mov	eax, [esp+1Ch+var_C]
pop	esi
pop	ebp
pop	ebx

loc_630EDD:
pop	edi
add	esp, 0Ch
retn
sub_630E70 endp

align 10h



sub_630EF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	edi
mov	edi, [eax+4]
mov	edx, eax
mov	[esp+10h+var_C], edx
test	edi, edi
jz	short loc_630F5D
push	ebx
mov	ebx, [ecx+10h]
push	ebp
mov	ebp, [ecx+14h]
sub	ebx, ebp
push	esi
mov	[esp+1Ch+var_4], ebx

loc_630F10:
mov	eax, [edi+24h]
mov	esi, [edi+20h]
sub	esi, eax
cmp	esi, ebx
mov	[esp+1Ch+var_8], esi
lea	ecx, [esp+1Ch+var_8]
jl	short loc_630F28
lea	ecx, [esp+1Ch+var_4]

loc_630F28:
mov	ecx, [ecx]
push	ecx
push	eax
push	ebp
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_630F44
cmp	ebx, esi
jl	short loc_630F46
cmp	ebx, esi
setnle	al
test	eax, eax

loc_630F44:
jge	short loc_630F4F

loc_630F46:
mov	[esp+1Ch+var_C], edi
mov	edi, [edi+8]
jmp	short loc_630F52

loc_630F4F:
mov	edi, [edi+0Ch]

loc_630F52:
test	edi, edi
jnz	short loc_630F10
mov	eax, [esp+1Ch+var_C]
pop	esi
pop	ebp
pop	ebx

loc_630F5D:
pop	edi
add	esp, 0Ch
retn
sub_630EF0 endp

align 10h



sub_630F70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	0FFFFFFFFh
push	offset loc_130A2B8
mov	eax, large fs:0
push	eax
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+28h+var_C]
mov	large fs:0, eax
mov	eax, [esp+28h+arg_C]
mov	esi, [esp+28h+arg_0]
mov	edi, [esp+28h+arg_4]
push	eax
push	esi
mov	eax, edi
call	sub_631460
add	esp, 8
cmp	edi, [esp+28h+arg_8]
jnb	loc_631051
lea	esp, [esp+0]

loc_630FC0:
mov	eax, [esi+10h]
mov	edx, [esi+14h]
mov	ecx, [edi+10h]
mov	ebx, [edi+14h]
sub	eax, edx
sub	ecx, ebx
mov	ebp, eax
mov	esi, ecx
cmp	ebp, esi
mov	[esp+28h+var_10], esi
mov	[esp+28h+var_14], ebp
lea	eax, [esp+28h+var_14]
jl	short loc_630FE8
lea	eax, [esp+28h+var_10]

loc_630FE8:
mov	ecx, [eax]
push	ecx
push	edx
push	ebx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_631004
cmp	esi, ebp
jl	short loc_631006
cmp	esi, ebp
setnle	al
test	eax, eax

loc_631004:
jge	short loc_63103C

loc_631006:
mov	edx, [esp+28h+arg_C]
push	edx
sub	esp, 18h
mov	ecx, esp
mov	[esp+44h+var_10], esp
push	edi
call	sub_403850
mov	edx, [esp+44h+arg_4]
mov	esi, [esp+44h+arg_0]
mov	[esp+44h+var_4], 0
mov	ecx, edi
mov	[esp+44h+var_4], 0FFFFFFFFh
call	sub_631250
add	esp, 1Ch

loc_63103C:
mov	esi, [esp+28h+arg_0]
add	edi, 18h
cmp	edi, [esp+28h+arg_8]
jb	loc_630FC0
mov	edi, [esp+28h+arg_4]

loc_631051:
mov	eax, [esp+28h+arg_C]
push	eax
mov	eax, edi
mov	ecx, esi
call	sub_631300
add	esp, 4
mov	ecx, [esp+28h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_630F70 endp

align 10h



sub_631080 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	0FFFFFFFFh
push	offset loc_1308710
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	[esp+14h+var_4], 0
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
push	eax
mov	eax, [esp+18h+arg_10]
push	ecx
mov	ecx, [esp+1Ch+arg_14]
push	eax
push	ecx
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_6310F1
lea	edx, [edi+18h]
push	edx
push	esi
mov	eax, edi
call	sub_631760
lea	eax, [esp+1Ch+arg_0]
add	esp, 8
cmp	eax, esi
jz	short loc_63111C
mov	ecx, [esp+14h+arg_10]
mov	edx, [esp+14h+arg_14]
push	ecx
push	edx
mov	ecx, esi
call	sub_403980
jmp	short loc_63111C

loc_6310F1:
mov	eax, [esp+14h+arg_18]
push	eax
sub	esp, 18h
lea	edx, [esp+30h+arg_0]
mov	ecx, esp
mov	[esp+30h+var_10], esp
push	edx
call	sub_403850
mov	byte ptr [esp+30h+var_4], 1
push	edi
mov	byte ptr [esp+34h+var_4], 0
call	sub_631380
add	esp, 20h

loc_63111C:
lea	ecx, [esp+14h+arg_0]
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_631080 endp

align 10h



sub_631140 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304D61
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
test	esi, esi
jz	short loc_63117B
call	sub_631210

loc_63117B:
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_631140 endp

align 10h



sub_6311A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13086D9
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
test	esi, esi
jz	short loc_6311EE
push	edi
mov	ecx, esi
call	sub_403850
mov	byte ptr [esp+18h+var_4], 1
mov	eax, [edi+18h]
mov	[esi+18h], eax
mov	byte ptr [esp+18h+var_4], 0

loc_6311EE:
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_6311A0 endp

align 10h



sub_631210 proc	near
mov	dword ptr [esi], offset	off_1556AA4
cmp	esi, edi
jz	short loc_631244
mov	eax, [edi+4]
mov	[esi+4], eax
mov	cx, [edi+8]
push	8		; MaxCount
lea	eax, [edi+0Ch]
push	eax		; Src
mov	[esi+8], cx
mov	dx, [edi+0Ah]
lea	ecx, [esi+0Ch]
push	8		; DstSize
push	ecx		; Dst
mov	[esi+0Ah], dx
call	_memcpy_s
add	esp, 10h

loc_631244:
mov	edx, [edi+14h]
mov	[esi+14h], edx
mov	eax, esi
retn
sub_631210 endp

align 10h



sub_631250 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_18=	dword ptr  1Ch

push	0FFFFFFFFh
push	offset loc_13086A0
mov	eax, large fs:0
push	eax
push	ecx
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	edi, edx
mov	[esp+18h+var_4], 0
cmp	esi, ecx
jz	short loc_63128D
mov	eax, [esi+10h]
mov	edx, [esi+14h]
push	eax
push	edx
call	sub_403980

loc_63128D:
mov	eax, [esp+18h+arg_18]
push	eax
sub	esp, 18h
lea	edx, [esp+34h+arg_0]
mov	ecx, esp
mov	[esp+34h+var_10], esp
push	edx
call	sub_403850
sub	edi, esi
mov	eax, 2AAAAAABh
imul	edi
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
push	eax
mov	byte ptr [esp+38h+var_4], 1
push	0
mov	ecx, esi
mov	byte ptr [esp+3Ch+var_4], 0
call	sub_6314D0
add	esp, 24h
lea	ecx, [esp+18h+arg_0]
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
add	esp, 10h
retn
sub_631250 endp

align 10h



sub_631300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
push	edi
mov	edi, eax
mov	esi, ecx
mov	ecx, edi
sub	ecx, esi
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 1
jle	short loc_63136C
mov	ebx, 18h
add	edi, 0FFFFFFE8h
sub	ebx, esi
lea	esp, [esp+0]

loc_631330:
mov	ecx, [esp+10h+arg_0]
push	ecx
sub	esp, 18h
mov	ecx, esp
mov	[esp+2Ch+var_4], esp
push	edi
call	sub_403850
mov	ecx, edi
mov	edx, edi
call	sub_631250
sub	edi, 18h
lea	ecx, [ebx+edi]
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
add	esp, 1Ch
cmp	eax, 1
jg	short loc_631330

loc_63136C:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_631300 endp

align 10h



sub_631380 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	0FFFFFFFFh
push	offset loc_1306698
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	ebp, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_18], ebp
mov	[esp+2Ch+var_4], 0
add	ebp, 0FFFFFFE8h
lea	ebx, [ebx+0]

loc_6313C0:
mov	edi, [ebp+10h]
mov	ebx, [ebp+14h]
mov	esi, [esp+2Ch+arg_14]
mov	eax, [esp+2Ch+arg_18]
sub	esi, eax
sub	edi, ebx
cmp	edi, esi
mov	[esp+2Ch+var_10], esi
mov	[esp+2Ch+var_14], edi
lea	ecx, [esp+2Ch+var_14]
jl	short loc_6313E6
lea	ecx, [esp+2Ch+var_10]

loc_6313E6:
mov	ecx, [ecx]
push	ecx
push	ebx
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_631402
cmp	esi, edi
jl	short loc_631404
cmp	esi, edi
setnle	al
test	eax, eax

loc_631402:
jge	short loc_63141F

loc_631404:
mov	ecx, [esp+2Ch+var_18]
cmp	ebp, ecx
jz	short loc_631416
mov	eax, [ebp+10h]
push	eax
push	ebx
call	sub_403980

loc_631416:
mov	[esp+2Ch+var_18], ebp
sub	ebp, 18h
jmp	short loc_6313C0

loc_63141F:
mov	ecx, [esp+2Ch+var_18]
lea	edx, [esp+2Ch+arg_4]
cmp	edx, ecx
jz	short loc_63143A
mov	eax, [esp+2Ch+arg_14]
mov	edx, [esp+2Ch+arg_18]
push	eax
push	edx
call	sub_403980

loc_63143A:
lea	ecx, [esp+2Ch+arg_4]
mov	[esp+2Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_631380 endp

align 10h



sub_631460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
sub	eax, ebp
mov	ecx, eax
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
push	esi
push	edi
mov	edi, edx
shr	edi, 1Fh
add	edi, edx
cmp	edi, 2
jl	short loc_6314BD
lea	eax, [edi-2]
cdq
sub	eax, edx
mov	esi, eax
sar	esi, 1
lea	eax, [esi+esi*2]
lea	ebx, [ebp+eax*8+0]

loc_631493:
mov	ecx, [esp+10h+arg_4]
push	ecx
sub	esp, 18h
mov	ecx, esp
mov	[esp+2Ch+arg_0], esp
push	ebx
call	sub_403850
push	edi
push	esi
mov	ecx, ebp
call	sub_6314D0
add	esp, 24h
test	esi, esi
jz	short loc_6314BD
dec	esi
sub	ebx, 18h
jmp	short loc_631493

loc_6314BD:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_631460 endp

align 10h



sub_6314D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_20=	dword ptr  24h

push	0FFFFFFFFh
push	offset loc_1308670
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	[esp+30h+var_1C], edi
mov	ebx, [esp+30h+arg_0]
lea	esi, [ebx+ebx+2]
cmp	esi, [esp+30h+arg_4]
mov	[esp+30h+var_4], 0
mov	[esp+30h+var_10], ebx
jge	loc_6315AE
jmp	short loc_631520
align 10h

loc_631520:
lea	eax, [esi+esi*2]
mov	ecx, [edi+eax*8-8]
mov	edx, [edi+eax*8+10h]
lea	eax, [edi+eax*8]
mov	edi, [eax-4]
mov	eax, [eax+14h]
sub	ecx, edi
sub	edx, eax
mov	ebx, ecx
mov	ebp, edx
cmp	ebx, ebp
mov	[esp+30h+var_18], ebp
mov	[esp+30h+var_14], ebx
lea	ecx, [esp+30h+var_14]
jl	short loc_631550
lea	ecx, [esp+30h+var_18]

loc_631550:
mov	ecx, [ecx]
push	ecx
push	edi
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63156C
cmp	ebp, ebx
jl	short loc_63156E
cmp	ebp, ebx
setnle	al
test	eax, eax

loc_63156C:
jge	short loc_63156F

loc_63156E:
dec	esi

loc_63156F:
mov	ecx, [esp+30h+arg_0]
mov	edx, [esp+30h+var_1C]
lea	eax, [esi+esi*2]
lea	ecx, [ecx+ecx*2]
lea	eax, [edx+eax*8]
lea	ecx, [edx+ecx*8]
cmp	eax, ecx
jz	short loc_631594
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_631594:
mov	edi, [esp+30h+var_1C]
mov	[esp+30h+arg_0], esi
lea	esi, [esi+esi+2]
cmp	esi, [esp+30h+arg_4]
jl	loc_631520
mov	ebx, [esp+30h+arg_0]

loc_6315AE:
jnz	short loc_6315D5
lea	edx, [esi+esi*2]
lea	ecx, [ebx+ebx*2]
lea	eax, [edi+edx*8-18h]
lea	ecx, [edi+ecx*8]
cmp	eax, ecx
jz	short loc_6315CE
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_6315CE:
dec	esi
mov	[esp+30h+arg_0], esi
mov	ebx, esi

loc_6315D5:
mov	edx, [esp+30h+arg_20]
push	edx
sub	esp, 18h
lea	eax, [esp+4Ch+arg_8]
mov	ecx, esp
mov	[esp+4Ch+var_18], esp
push	eax
call	sub_403850
mov	ecx, [esp+4Ch+var_10]
push	ecx
push	ebx
mov	byte ptr [esp+54h+var_4], 1
push	edi
mov	byte ptr [esp+58h+var_4], 0
call	sub_631630
add	esp, 28h
lea	ecx, [esp+30h+arg_8]
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_6314D0 endp

align 10h



sub_631630 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	0FFFFFFFFh
push	offset loc_1306668
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	eax, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_18], eax
mov	ecx, [esp+2Ch+arg_4]
lea	eax, [ecx-1]
cdq
sub	eax, edx
mov	ebx, eax
sar	ebx, 1
cmp	ecx, [esp+2Ch+arg_8]
mov	[esp+2Ch+var_4], 0
jle	loc_63170D

loc_63167F:
mov	edx, [esp+2Ch+var_18]
mov	esi, [esp+2Ch+arg_1C]
lea	ecx, [ebx+ebx*2]
mov	eax, [edx+ecx*8+10h]
lea	edi, [edx+ecx*8]
mov	ecx, [edi+14h]
sub	eax, ecx
mov	ebp, eax
mov	eax, [esp+2Ch+arg_20]
sub	esi, eax
cmp	esi, ebp
mov	[esp+2Ch+var_10], ebp
mov	[esp+2Ch+var_14], esi
lea	edx, [esp+2Ch+var_14]
jl	short loc_6316B2
lea	edx, [esp+2Ch+var_10]

loc_6316B2:
mov	edx, [edx]
push	edx
push	eax
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_6316CE
cmp	ebp, esi
jl	short loc_6316D0
cmp	ebp, esi
setnle	al
test	eax, eax

loc_6316CE:
jge	short loc_631709

loc_6316D0:
mov	eax, [esp+2Ch+arg_4]
mov	ecx, [esp+2Ch+var_18]
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*8]
cmp	edi, ecx
jz	short loc_6316EF
mov	eax, [edi+10h]
mov	edi, [edi+14h]
push	eax
push	edi
call	sub_403980

loc_6316EF:
lea	eax, [ebx-1]
cdq
mov	ecx, ebx
sub	eax, edx
sar	eax, 1
cmp	ecx, [esp+2Ch+arg_8]
mov	[esp+2Ch+arg_4], ecx
mov	ebx, eax
jg	loc_63167F

loc_631709:
mov	ecx, [esp+2Ch+arg_4]

loc_63170D:
mov	eax, [esp+2Ch+var_18]
lea	edx, [ecx+ecx*2]
lea	ecx, [eax+edx*8]
lea	edx, [esp+2Ch+arg_C]
cmp	edx, ecx
jz	short loc_63172E
mov	eax, [esp+2Ch+arg_1C]
mov	edx, [esp+2Ch+arg_20]
push	eax
push	edx
call	sub_403980

loc_63172E:
lea	ecx, [esp+2Ch+arg_C]
mov	[esp+2Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_631630 endp

align 10h



sub_631760 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	ebx, [esp+8+arg_4]
push	edi
mov	edi, eax
mov	ecx, edi
sub	ecx, [esp+0Ch+arg_0]
mov	eax, 2AAAAAABh
imul	ecx
sar	edx, 2
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
test	esi, esi
jle	short loc_6317A2

loc_631784:
sub	edi, 18h
sub	ebx, 18h
cmp	edi, ebx
jz	short loc_63179D
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebx
call	sub_403980

loc_63179D:
dec	esi
test	esi, esi
jg	short loc_631784

loc_6317A2:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn
sub_631760 endp

align 10h



sub_6317B0 proc	near

var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1306641
mov	eax, large fs:0
push	eax
push	ecx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+1Ch+arg_0]
movss	xmm0, ds:dword_1479C54
and	byte ptr [esi+14h], 0E0h
xor	edi, edi
lea	eax, [esp+1Ch+arg_0]
push	eax
lea	ecx, [esi+30h]
mov	dword ptr [esi], 200000h
mov	[esi+4], edi
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	dword ptr [esi+18h], 20h
mov	dword ptr [esi+1Ch], 200h
mov	dword ptr [esi+20h], 0BB80h
mov	dword ptr [esi+24h], 4
movss	dword ptr [esi+28h], xmm0
movss	dword ptr [esi+2Ch], xmm0
call	sub_4022A0
lea	ecx, [esp+0Fh]
push	ecx
lea	ecx, [esi+48h]
mov	[esp+20h+var_4], edi
call	??1strstreambuf@@UAE@XZ_2 ; strstreambuf::~strstreambuf(void)
mov	byte ptr [esp+1Ch+var_4], 1
mov	[esi+54h], edi
mov	[esi+58h], edi
mov	[esi+5Ch], edi
mov	[esi+60h], edi
mov	[esp+1Ch+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 10h
retn	4
sub_6317B0 endp

align 10h



sub_631870 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304D26
mov	eax, large fs:0
push	eax
push	ecx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	edi, [esp+1Ch+arg_0]
push	ecx
mov	eax, esp
lea	esi, [edi+58h]
mov	[esp+20h+var_10], esp
push	eax
mov	ecx, esi
mov	[esp+24h+var_4], 1
call	sub_4AC410
push	ecx
mov	ecx, esp
mov	[esp+24h+var_10], esp
push	ecx
mov	ecx, esi
call	sub_5E26A0
call	sub_631D80
mov	eax, [esi]
add	esp, 8
test	eax, eax
jz	short loc_6318E0
mov	edx, [esi+8]
lea	ecx, [esi+8]
sub	edx, eax
sar	edx, 2
push	edx		; int
push	eax		; void *
call	sub_5F1C30

loc_6318E0:
lea	ecx, [edi+48h]
mov	byte ptr [esp+1Ch+var_4], 0
call	sub_436480
lea	ecx, [edi+30h]
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 10h
retn	4
sub_631870 endp

align 10h



sub_631920 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	edi
xor	edi, edi
mov	[esi], edi
mov	[esi+4], edi
mov	[esi+8], edi
mov	[esi+0Ch], edi
lea	ecx, [esp+8+var_1]
mov	[esi+10h], edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	[esi+14h], edi
mov	[esi+18h], edi
lea	ecx, [esp+8+var_1]
mov	[esi+1Ch], edi
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	eax, esi
pop	edi
pop	ecx
retn
sub_631920 endp

align 10h



sub_631960 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13065FD
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
lea	eax, [esi+14h]
push	eax
mov	[esp+18h+var_4], 0
call	sub_631B30
add	esi, 8
push	esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_631A80
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_631960 endp

align 10h



sub_6319C0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1308638
mov	eax, large fs:0
push	eax
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+10h+var_C]
mov	large fs:0, eax
lea	eax, [esp+10h+arg_0]
push	eax
mov	ecx, esi
mov	[esp+14h+var_4], 0
call	sub_403850
mov	cl, [esp+10h+arg_18]
movss	xmm0, [esp+10h+arg_1C]
mov	[esi+18h], cl
lea	ecx, [esp+10h+arg_0]
movss	dword ptr [esi+1Ch], xmm0
mov	[esp+10h+var_4], 0FFFFFFFFh
call	sub_407910
mov	eax, esi
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 0Ch
retn	20h
sub_6319C0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1306410

loc_631A30:
push	ecx
push	ecx
mov	eax, esp
mov	[esp+8+var_4], esp
push	eax
mov	ecx, esi
call	sub_4AC410
push	ecx
mov	ecx, esp
mov	[esp+0Ch+var_4], esp
push	ecx
mov	ecx, esi
call	sub_5E26A0
call	sub_631D80
mov	eax, [esi]
add	esp, 8
test	eax, eax
jz	short loc_631A6F
mov	edx, [esi+8]
lea	ecx, [esi+8]
sub	edx, eax
sar	edx, 2
push	edx		; int
push	eax		; void *
call	sub_5F1C30

loc_631A6F:
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_1306410
align 10h



sub_631A80 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304CE8
mov	eax, large fs:0
push	eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
mov	ecx, esi
mov	[esp+18h+var_4], 0
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, esi
mov	edi, eax
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
push	ecx
mov	ecx, esp
mov	[ecx], edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
call	sub_631FF0
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	eax, [esi]
add	esp, 8
test	eax, eax
jz	short loc_631B18
mov	esi, [esi+8]
sub	esi, eax
sar	esi, 5
shl	esi, 5
cmp	esi, 80h
jbe	short loc_631B0E
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_631B0E:
push	esi
push	eax
call	sub_77E0D0
add	esp, 8

loc_631B18:
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_631A80 endp

align 10h



sub_631B30 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13065CA
mov	eax, large fs:0
push	eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
mov	ecx, esi
mov	[esp+18h+var_4], 0
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, esi
mov	edi, eax
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
push	ecx
mov	ecx, esp
mov	[ecx], edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
call	sub_63BD40
add	esp, 8
push	esi
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	sub_631BE0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_631B30 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1304CE0

loc_631BB0:
mov	ecx, [eax]
test	ecx, ecx
jz	short locret_631BDC
mov	eax, [eax+8]
sub	eax, ecx
sar	eax, 5
shl	eax, 5
cmp	eax, 80h
jbe	short loc_631BD2
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_631BD2:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_631BDC:
retn
; END OF FUNCTION CHUNK	FOR sub_1304CE0
align 10h



sub_631BE0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12FFFFB
mov	eax, large fs:0
push	eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	edi, [esp+18h+arg_0]
mov	[esp+18h+var_4], 0
mov	esi, [edi]
test	esi, esi
jz	short loc_631C56
mov	ecx, [edi+8]
sub	ecx, esi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
lea	ecx, ds:0[eax*8]
sub	ecx, eax
add	ecx, ecx
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_631C4C
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_631C56

loc_631C4C:
push	ecx
push	esi
call	sub_77E0D0
add	esp, 8

loc_631C56:
lea	ecx, [edi+8]
mov	[esp+18h+var_4], 0FFFFFFFFh
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_631BE0 endp

align 10h



; int __fastcall sub_631C80(void *)
sub_631C80 proc	near
shl	eax, 5
cmp	eax, 80h
jbe	short loc_631C94
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_631C94:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8
retn
sub_631C80 endp

align 10h



sub_631CA0 proc	near

var_4= dword ptr -4

push	ecx
push	edi
mov	edi, eax
cmp	edi, esi
jz	loc_631D75
push	ebx
mov	ecx, edi
call	sub_4A9310
mov	ebx, eax
mov	eax, [esi+8]
sub	eax, [esi]
mov	[esp+0Ch+var_4], ebx
sar	eax, 2
cmp	ebx, eax
jbe	short loc_631CFF
mov	ecx, [edi+4]
mov	edx, [edi]
push	ecx
push	edx
lea	eax, [esp+14h+var_4]
push	eax
push	esi
mov	[esp+1Ch+var_4], ebx
call	sub_631E10
mov	edi, eax
mov	eax, esi
call	sub_631DD0
mov	ecx, [esp+0Ch+var_4]
lea	edx, [edi+ecx*4]
mov	[esi+8], edx
mov	edx, edi
lea	eax, [edx+ebx*4]
pop	ebx
mov	[esi], edi
mov	[esi+4], eax
mov	eax, esi
pop	edi
pop	ecx
retn

loc_631CFF:
mov	ecx, esi
call	sub_4A9310
cmp	eax, ebx
jb	short loc_631D30
mov	eax, [edi]
mov	ecx, [edi+4]
push	eax
mov	eax, [esi]
call	sub_631EA0
mov	edi, [esi+4]
add	esp, 4
call	sub_631EC0
mov	edx, [esi]
lea	eax, [edx+ebx*4]
pop	ebx
mov	[esi+4], eax
mov	eax, esi
pop	edi
pop	ecx
retn

loc_631D30:
mov	ebx, [edi]
push	ebp
mov	ecx, esi
call	sub_4A9310
lea	ecx, [ebx+eax*4]
mov	eax, [esi]
push	ebx
call	sub_631EA0
mov	ebx, [esi+4]
mov	ebp, [edi+4]
add	esp, 4
mov	ecx, esi
call	sub_4A9310
mov	ecx, [edi]
lea	eax, [ecx+eax*4]
push	eax
mov	ecx, ebx	; void *
mov	eax, ebp
call	sub_631FC0
mov	ebx, [esp+14h+var_4]
mov	edx, [esi]
add	esp, 4
lea	eax, [edx+ebx*4]
pop	ebp
mov	[esi+4], eax
pop	ebx

loc_631D75:
mov	eax, esi
pop	edi
pop	ecx
retn
sub_631CA0 endp

align 10h



sub_631D80 proc	near

var_9= byte ptr	-9
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= byte ptr	 4
arg_4= byte ptr	 8

sub	esp, 0Ch
lea	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [esp+10h+var_8]
call	sub_4588D0
lea	ecx, [esp+0Ch+arg_0]
push	ecx
lea	ecx, [esp+10h+var_4]
call	sub_4588D0
lea	edx, [esp+0Ch+var_9]
push	edx
push	0
push	ecx
lea	eax, [esp+18h+var_8]
mov	ecx, esp
push	eax
mov	[esp+1Ch+var_9], 0
call	sub_4588D0
push	ecx
lea	edx, [esp+1Ch+var_4]
mov	ecx, esp
push	edx
call	sub_4588D0
call	sub_5F2100
add	esp, 1Ch
retn
sub_631D80 endp

align 10h



sub_631DD0 proc	near
push	esi
push	ecx
mov	esi, eax
push	esp
mov	ecx, esi
call	sub_4AC410
push	ecx
push	esp
mov	ecx, esi
call	sub_5E26A0
call	sub_631D80
mov	eax, [esi+8]
lea	ecx, [esi+8]
mov	esi, [esi]
sub	eax, esi
add	esp, 8
sar	eax, 2
push	eax		; int
push	esi		; void *
call	sub_5F1C30
pop	esi
retn
sub_631DD0 endp

align 10h


; Attributes: bp-based frame

sub_631E10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_13016A0
mov	eax, large fs:0
push	eax
sub	esp, 8
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
push	eax
mov	eax, [eax]
push	eax
add	ecx, 8
call	sub_5E37E0
mov	ecx, [ebp+arg_8]
mov	esi, eax
mov	eax, [ebp+arg_C]
push	ecx
mov	ecx, esi	; void *
mov	[ebp+var_14], esi
mov	[ebp+var_4], 0
call	sub_631FC0
add	esp, 4
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_631E10 endp



; Attributes: noreturn

sub_631E80 proc	near
mov	edx, [ebp+0Ch]
mov	eax, [edx]
mov	ecx, [ebp-14h]
push	eax		; int
push	ecx		; void *
mov	ecx, [ebp+8]
add	ecx, 8
call	sub_5F1C30
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_631E80 endp

align 10h



sub_631EA0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
sub	ecx, edx
sar	ecx, 2
test	ecx, ecx
jle	short locret_631EBE
sub	edx, eax
push	esi

loc_631EB0:
mov	esi, [edx+eax]
mov	[eax], esi
dec	ecx
add	eax, 4
test	ecx, ecx
jg	short loc_631EB0
pop	esi

locret_631EBE:
retn
sub_631EA0 endp

align 10h



sub_631EC0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, eax
cmp	esi, edi
jz	short loc_631EE2

loc_631EC8:
lea	eax, [esp+8+var_1]
push	eax
push	esi
mov	[esp+10h+var_1], 0
call	__initp_misc_winxfltr
add	esi, 4
add	esp, 8
cmp	esi, edi
jnz	short loc_631EC8

loc_631EE2:
pop	esi
pop	ecx
retn
sub_631EC0 endp

align 10h



sub_631EF0 proc	near
push	esi
mov	esi, eax
cmp	esi, edi
jz	short loc_631F05

loc_631EF7:
mov	ecx, esi
call	sub_407910
add	esi, 20h
cmp	esi, edi
jnz	short loc_631EF7

loc_631F05:
pop	esi
retn
sub_631EF0 endp

align 10h



sub_631F10 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, eax
cmp	esi, edi
jz	short loc_631F32

loc_631F18:
lea	eax, [esp+8+var_1]
push	eax
push	esi		; void *
mov	[esp+10h+var_1], 0
call	sub_5C5110
add	esi, 1Ch
add	esp, 8
cmp	esi, edi
jnz	short loc_631F18

loc_631F32:
pop	esi
pop	ecx
retn
sub_631F10 endp

align 10h



sub_631F40 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
cmp	eax, 7FFFFFFh
jbe	short loc_631F62
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_631F62:
test	eax, eax
jz	short loc_631FAE
shl	eax, 5
mov	[esp+10h+var_10], eax
cmp	eax, 80h
jbe	short loc_631F8F
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 5
mov	[ecx], edx
add	esp, 10h
retn	4

loc_631F8F:
lea	ecx, [esp+10h+var_10]
push	ecx
call	sub_77E150
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 5
mov	[ecx], edx
add	esp, 10h
retn	4

loc_631FAE:
xor	eax, eax
add	esp, 10h
retn	4
sub_631F40 endp

align 10h



; int __fastcall sub_631FC0(void *, int)
sub_631FC0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
sub	esi, ebx
sar	esi, 2
push	edi
mov	edi, ecx
test	esi, esi
jle	short loc_631FE9

loc_631FD4:		; int
push	ebx
push	edi		; void *
call	sub_4B6FE0
dec	esi
add	esp, 8
add	ebx, 4
add	edi, 4
test	esi, esi
jg	short loc_631FD4

loc_631FE9:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn
sub_631FC0 endp

align 10h



sub_631FF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
cmp	eax, [esp+arg_4]
jz	short locret_632019
lea	ebx, [ebx+0]

loc_632000:
lea	ecx, [eax-20h]
call	sub_407910
mov	eax, [esp+arg_0]
sub	eax, 20h
mov	[esp+arg_0], eax
cmp	eax, [esp+arg_4]
jnz	short loc_632000

locret_632019:
retn
sub_631FF0 endp

align 10h



sub_632020 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

movss	dword ptr [eax+4], xmm0
movss	xmm0, [esp+arg_0]
movss	dword ptr [eax+8], xmm0
movss	xmm0, [esp+arg_4]
mov	dword ptr [eax], offset	off_15FAE00
movss	dword ptr [eax+0Ch], xmm0
retn	8
sub_632020 endp

align 10h



; int __thiscall sub_632050(void *, char)
sub_632050 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FAE00
jz	short loc_632069
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_632069:
mov	eax, esi
pop	esi
retn	4
sub_632050 endp

align 10h



sub_632070 proc	near
mov	dword ptr [ecx], offset	off_15FAE00
retn
sub_632070 endp

align 10h



sub_632080 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+8]
push	edx
call	eax
cmp	al, 1
setnz	al
retn	4
sub_632080 endp

align 10h



sub_6320A0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
fld	dword ptr [ecx+4]
fadd	dword ptr [eax+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fadd	dword ptr [eax+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fadd	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_6320A0 endp

align 10h



sub_6320D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12FF4C8
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
xor	eax, eax
lea	edx, [esp+24h+var_1C]
mov	[esp+24h+var_20], eax
mov	[esp+24h+var_1C], offset off_15FAE00
cmp	edx, ecx
jz	short loc_63212A
movss	xmm0, dword ptr	[ecx+4]
movss	[esp+24h+var_18], xmm0
movss	xmm0, dword ptr	[ecx+8]
movss	[esp+24h+var_14], xmm0
movss	xmm0, dword ptr	[ecx+0Ch]
movss	[esp+24h+var_10], xmm0

loc_63212A:
mov	[esp+24h+var_4], eax
mov	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_1C]
call	ds:off_15FAE10
mov	ecx, eax
mov	eax, [esp+24h+arg_0]
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, ecx
jz	short loc_63215F
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]

loc_63215F:
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 20h
retn	8
sub_6320D0 endp

align 10h



sub_632180 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
fld	dword ptr [eax+4]
fsub	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [eax+8]
fsub	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
fld	dword ptr [eax+0Ch]
fsub	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_632180 endp

align 10h



sub_6321B0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12FF4C8
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
xor	eax, eax
lea	edx, [esp+24h+var_1C]
mov	[esp+24h+var_20], eax
mov	[esp+24h+var_1C], offset off_15FAE00
cmp	edx, ecx
jz	short loc_63220A
movss	xmm0, dword ptr	[ecx+4]
movss	[esp+24h+var_18], xmm0
movss	xmm0, dword ptr	[ecx+8]
movss	[esp+24h+var_14], xmm0
movss	xmm0, dword ptr	[ecx+0Ch]
movss	[esp+24h+var_10], xmm0

loc_63220A:
mov	[esp+24h+var_4], eax
mov	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_1C]
call	ds:off_15FAE18
mov	ecx, eax
mov	eax, [esp+24h+arg_0]
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, ecx
jz	short loc_63223F
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]

loc_63223F:
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 20h
retn	8
sub_6321B0 endp

align 10h



; int __stdcall	sub_632260(float)
sub_632260 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, ecx
fld	st
fmul	dword ptr [eax+4]
fstp	dword ptr [eax+4]
fld	dword ptr [eax+8]
fmul	st, st(1)
fstp	dword ptr [eax+8]
fmul	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_632260 endp

align 10h



; int __stdcall	sub_632280(int,	float)
sub_632280 proc	near

var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12FF4C8
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
xor	eax, eax
lea	edx, [esp+24h+var_1C]
mov	[esp+24h+var_20], eax
mov	[esp+24h+var_1C], offset off_15FAE00
cmp	edx, ecx
jz	short loc_6322DA
movss	xmm0, dword ptr	[ecx+4]
movss	[esp+24h+var_18], xmm0
movss	xmm0, dword ptr	[ecx+8]
movss	[esp+24h+var_14], xmm0
movss	xmm0, dword ptr	[ecx+0Ch]
movss	[esp+24h+var_10], xmm0

loc_6322DA:
fld	[esp+24h+arg_4]
push	ecx		; float
mov	[esp+28h+var_4], eax
fstp	[esp+28h+var_28]
lea	ecx, [esp+28h+var_1C]
call	ds:off_15FAE20
mov	ecx, eax
mov	eax, [esp+24h+arg_0]
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, ecx
jz	short loc_632312
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]

loc_632312:
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 20h
retn	8
sub_632280 endp

align 10h



; int __stdcall	sub_632330(float)
sub_632330 proc	near

arg_0= dword ptr  4

mov	eax, ecx
fld	dword ptr [eax+4]
fld	[esp+arg_0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+4]
fld	dword ptr [eax+8]
fdiv	st, st(1)
fstp	dword ptr [eax+8]
fdivr	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_632330 endp

align 10h



; int __stdcall	sub_632360(int,	float)
sub_632360 proc	near

var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12FF4C8
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
xor	eax, eax
lea	edx, [esp+24h+var_1C]
mov	[esp+24h+var_20], eax
mov	[esp+24h+var_1C], offset off_15FAE00
cmp	edx, ecx
jz	short loc_6323BA
movss	xmm0, dword ptr	[ecx+4]
movss	[esp+24h+var_18], xmm0
movss	xmm0, dword ptr	[ecx+8]
movss	[esp+24h+var_14], xmm0
movss	xmm0, dword ptr	[ecx+0Ch]
movss	[esp+24h+var_10], xmm0

loc_6323BA:
fld	[esp+24h+arg_4]
push	ecx		; float
mov	[esp+28h+var_4], eax
fstp	[esp+28h+var_28]
lea	ecx, [esp+28h+var_1C]
call	ds:off_15FAE28
mov	ecx, eax
mov	eax, [esp+24h+arg_0]
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, ecx
jz	short loc_6323F2
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]

loc_6323F2:
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 20h
retn	8
sub_632360 endp

align 10h


; Attributes: bp-based frame

sub_632410 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
fld	ds:dbl_15FCD60
push	esi
mov	esi, ecx
call	__CIsqrt
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
xorps	xmm0, xmm0
fstp	dword ptr [esi+4]
movss	dword ptr [esi+8], xmm0
movss	dword ptr [esi+0Ch], xmm0
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_632410 endp

align 10h



sub_632450 proc	near

var_4= dword ptr -4

push	ecx
movss	xmm0, dword ptr	[ecx+4]
movss	[esp+4+var_4], xmm0
mov	eax, [esp+4+var_4]
and	eax, 7F800000h
cmp	eax, 7F800000h
jz	short loc_6324A2
movss	xmm0, dword ptr	[ecx+8]
movss	[esp+4+var_4], xmm0
mov	edx, [esp+4+var_4]
and	edx, 7F800000h
cmp	edx, 7F800000h
jz	short loc_6324A2
movss	xmm0, dword ptr	[ecx+0Ch]
movss	[esp+4+var_4], xmm0
mov	eax, [esp+4+var_4]
and	eax, 7F800000h
cmp	eax, 7F800000h
jz	short loc_6324A2
mov	al, 1
pop	ecx
retn

loc_6324A2:
xor	al, al
pop	ecx
retn
sub_632450 endp

align 10h



sub_6324B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

movss	xmm0, [esp+arg_0]
movss	dword ptr [ecx+4], xmm0
movss	xmm0, [esp+arg_4]
movss	dword ptr [ecx+8], xmm0
movss	xmm0, [esp+arg_8]
movss	dword ptr [ecx+0Ch], xmm0
retn	0Ch
sub_6324B0 endp

align 10h



sub_6324E0 proc	near
xorps	xmm0, xmm0
movss	dword ptr [ecx+4], xmm0
movss	dword ptr [ecx+8], xmm0
movss	dword ptr [ecx+0Ch], xmm0
retn
sub_6324E0 endp

align 10h



sub_632500 proc	near
mov	eax, [ecx]
mov	edx, [eax+3Ch]
jmp	edx
sub_632500 endp

align 10h



sub_632510 proc	near
mov	eax, [ecx]
mov	edx, [eax+58h]
push	ecx
call	edx
retn
sub_632510 endp

align 10h


; Attributes: bp-based frame

sub_632520 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
mov	eax, [ecx]
mov	edx, [eax+44h]
call	edx
call	__CIsqrt
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
mov	esp, ebp
pop	ebp
retn
sub_632520 endp

align 10h


; Attributes: bp-based frame

sub_632550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
mov	eax, [ecx]
mov	edx, [eax+44h]
call	edx
fld1
fsubrp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
jbe	short loc_632588
mov	al, 1
mov	esp, ebp
pop	ebp
retn

loc_632588:
xor	al, al
mov	esp, ebp
pop	ebp
retn
sub_632550 endp

align 10h



sub_632590 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+48h]
call	edx
fstp	[esp+8+var_4]
mov	eax, [esi]
fld	[esp+8+var_4]
mov	edx, [eax+28h]
push	ecx
mov	ecx, esi
fstp	[esp+0Ch+var_C]
call	edx
pop	esi
pop	ecx
retn
sub_632590 endp

align 10h



sub_6325C0 proc	near
mov	eax, [ecx]
mov	edx, [eax+4Ch]
jmp	edx
sub_6325C0 endp

align 10h



sub_6325D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [eax+8]
fmul	dword ptr [ecx+8]
fld	dword ptr [eax+4]
fmul	dword ptr [ecx+4]
faddp	st(1), st
fld	dword ptr [eax+0Ch]
fmul	dword ptr [ecx+0Ch]
faddp	st(1), st
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4
sub_6325D0 endp

align 10h



sub_632600 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	edx, [esp+8+arg_4]
mov	eax, [esp+8+arg_0]
fld	dword ptr [edx+0Ch]
fstp	[esp+8+arg_4]
mov	dword ptr [eax], offset	off_15FAE00
fld	dword ptr [ecx+8]
fstp	[esp+8+arg_0]
fld	dword ptr [edx+8]
fstp	[esp+8+var_4]
fld	dword ptr [ecx+0Ch]
fstp	[esp+8+var_8]
fld	[esp+8+arg_0]
fld	st
fld	[esp+8+arg_4]
fld	st
fmulp	st(2), st
fld	[esp+8+var_8]
fld	st
fld	[esp+8+var_4]
fld	st
fmulp	st(2), st
fxch	st(4)
fsubrp	st(1), st
fstp	dword ptr [eax+4]
fld	dword ptr [edx+4]
fstp	[esp+8+arg_0]
fld	dword ptr [ecx+4]
fstp	[esp+8+arg_4]
fld	[esp+8+arg_0]
fld	st
fmulp	st(2), st
fld	[esp+8+arg_4]
fld	st
fmulp	st(4), st
fxch	st(2)
fsubrp	st(3), st
fxch	st(2)
fstp	dword ptr [eax+8]
fmulp	st(2), st
fmulp	st(2), st
fsubrp	st(1), st
fstp	dword ptr [eax+0Ch]
add	esp, 8
retn	8
sub_632600 endp

align 10h



sub_632690 proc	near
mov	eax, [ecx]
mov	eax, [eax+58h]
jmp	eax
sub_632690 endp

align 10h



sub_6326A0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi]
mov	edx, [eax+48h]
push	edi
mov	edi, ecx
mov	ecx, esi
call	edx
fstp	st
mov	eax, [edi]
mov	edx, [eax+58h]
push	esi
mov	ecx, edi
call	edx
fstp	[esp+10h+var_8]
mov	eax, [esi]
mov	edx, [eax+48h]
mov	ecx, esi
call	edx
fdivr	[esp+10h+var_8]
pop	edi
pop	esi
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
add	esp, 8
retn	4
sub_6326A0 endp

align 10h


; Attributes: bp-based frame

sub_6326F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+48h]
push	edi
call	edx
fstp	[esp+10h+var_4]
mov	edi, [ebp+arg_0]
mov	eax, [edi]
mov	edx, [eax+48h]
mov	ecx, edi
call	edx
fstp	[esp+10h+var_8]
mov	eax, [esi]
mov	edx, [eax+58h]
push	edi
mov	ecx, esi
call	edx
fld	[esp+10h+var_8]
fmul	[esp+10h+var_4]
fdivp	st(1), st
fstp	[esp+10h+var_4]
fld	[esp+10h+var_4]
call	__CIacos
fstp	[esp+10h+var_4]
fld	[esp+10h+var_4]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_6326F0 endp

align 10h



sub_632750 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+68h]
push	edx
call	eax
fstp	[esp+arg_0]
fld	flt_17F187C
fmul	[esp+arg_0]
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4
sub_632750 endp

align 10h


; Attributes: bp-based frame

sub_632780 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
mov	eax, [ecx]
mov	edx, [ebp+arg_0]
mov	eax, [eax+58h]
push	edx
call	eax
fldz
fsubrp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
jbe	short loc_6327BE
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4

loc_6327BE:
xor	al, al
mov	esp, ebp
pop	ebp
retn	4
sub_632780 endp

align 10h



sub_6327D0 proc	near

arg_4= dword ptr  8

xor	eax, eax
cmp	[esp+arg_4], eax
jnz	short locret_6327DF
mov	byte_18899E2, 1

locret_6327DF:
retn	10h
sub_6327D0 endp

align 10h



sub_6327F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130860B
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
cmp	dword_18899F4, 0
jz	short loc_63282E
xor	al, al
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn

loc_63282E:		; size_t
push	1B4h
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
test	esi, esi
jz	short loc_63285B
push	esi
call	sub_62D020
mov	dword ptr [esi], offset	off_15FAE80
jmp	short loc_63285D

loc_63285B:
xor	esi, esi

loc_63285D:
mov	dword_18899F4, esi
mov	al, 1
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_6327F0 endp

align 10h



; int __stdcall	sub_632880(float)
sub_632880 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4

push	esi
mov	esi, ecx
call	sub_5F18C0
test	al, al
jnz	short loc_632892

loc_63288C:
xor	al, al
pop	esi
retn	4

loc_632892:
cmp	byte_18899E2, 1
jnz	short loc_6328B2
mov	eax, [esi]
mov	edx, [eax+1B4h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63288C
mov	byte_18899E2, 0

loc_6328B2:
fld	[esp+4+arg_0]
push	ecx
mov	ecx, esi
fstp	[esp+8+var_8]
call	sub_62BC60
pop	esi
retn	4
sub_632880 endp

align 10h



; int __thiscall sub_6328D0(void *, char)
sub_6328D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FAE80
call	sub_62D310
test	[esp+4+arg_0], 1
jz	short loc_6328EE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6328EE:
mov	eax, esi
pop	esi
retn	4
sub_6328D0 endp

align 10h



sub_632900 proc	near

var_10C= dword ptr -10Ch
var_108= byte ptr -108h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10Ch+var_4], eax
push	esi
push	edi
mov	edi, [esp+114h+arg_0]
push	edi
mov	esi, ecx
call	sub_62D6B0
test	al, al
jnz	short loc_632930

loc_632929:
xor	al, al
jmp	loc_632A35

loc_632930:
mov	eax, [esi+4]
push	offset sub_6327D0
push	eax
call	?setCallback@System@FMOD@@QAG?AW4FMOD_RESULT@@P6G?AW43@PAUFMOD_SYSTEM@@W4FMOD_SYSTEM_CALLBACKTYPE@@PAX2@Z@Z ; FMOD::System::setCallback(FMOD_RESULT (*)(FMOD_SYSTEM *,FMOD_SYSTEM_CALLBACKTYPE,void *,void *))
test	eax, eax
jnz	short loc_632929
mov	edx, [esi]
mov	eax, [edx+1B4h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_632929
mov	eax, [esi+4]
lea	ecx, [esp+114h+var_10C]
push	ecx
push	0
push	0
lea	edx, [esp+120h+var_108]
push	edx
push	0
push	eax
call	?getDriverCaps@System@FMOD@@QAG?AW4FMOD_RESULT@@HPAIPAH1PAW4FMOD_SPEAKERMODE@@@Z ; FMOD::System::getDriverCaps(int,uint	*,int *,int *,FMOD_SPEAKERMODE *)
test	eax, eax
jnz	short loc_632929
test	[esp+114h+var_108], 2
jz	short loc_63298A
mov	ecx, [esi+4]
push	0Ah
push	400h
push	ecx
call	?setDSPBufferSize@System@FMOD@@QAG?AW4FMOD_RESULT@@IH@Z	; FMOD::System::setDSPBufferSize(uint,int)
test	eax, eax
jnz	short loc_632929

loc_63298A:
mov	eax, [esi+4]
push	0
push	100h
lea	edx, [esp+11Ch+var_104]
push	edx
push	0
push	eax
call	?getDriverInfo@System@FMOD@@QAG?AW4FMOD_RESULT@@HPADHPAUFMOD_GUID@@@Z ;	FMOD::System::getDriverInfo(int,char *,int,FMOD_GUID *)
test	eax, eax
jnz	short loc_632929
lea	ecx, [esp+114h+var_104]
push	offset aSigmatel ; "SigmaTel"
push	ecx		; char *
call	_strstr
add	esp, 8
test	eax, eax
jz	short loc_6329F2
mov	eax, [edi+20h]
cmp	eax, 5622h
jnb	short loc_6329CC
mov	eax, 5622h
jmp	short loc_6329D8

loc_6329CC:
cmp	eax, 0BB80h
jbe	short loc_6329D8
mov	eax, 0BB80h

loc_6329D8:
mov	edx, [esi+4]
push	1
push	6
push	0
push	5
push	eax
push	edx
call	?setSoftwareFormat@System@FMOD@@QAG?AW4FMOD_RESULT@@HW4FMOD_SOUND_FORMAT@@HHW4FMOD_DSP_RESAMPLER@@@Z ; FMOD::System::setSoftwareFormat(int,FMOD_SOUND_FORMAT,int,int,FMOD_DSP_RESAMPLER)
test	eax, eax
jnz	loc_632929

loc_6329F2:
mov	eax, [esp+114h+var_10C]
mov	ecx, [esi+4]
push	eax
push	ecx
call	?setSpeakerMode@System@FMOD@@QAG?AW4FMOD_RESULT@@W4FMOD_SPEAKERMODE@@@Z	; FMOD::System::setSpeakerMode(FMOD_SPEAKERMODE)
test	eax, eax
jz	short loc_632A1F
mov	edx, [esi+4]
push	2
push	edx
mov	[esp+11Ch+var_10C], 2
call	?setSpeakerMode@System@FMOD@@QAG?AW4FMOD_RESULT@@W4FMOD_SPEAKERMODE@@@Z	; FMOD::System::setSpeakerMode(FMOD_SPEAKERMODE)
test	eax, eax
jnz	loc_632929

loc_632A1F:
mov	eax, [esi+4]
push	0
push	0
push	0
push	0
push	eax
call	?setHardwareChannels@System@FMOD@@QAG?AW4FMOD_RESULT@@HHHH@Z ; FMOD::System::setHardwareChannels(int,int,int,int)
test	eax, eax
setz	al

loc_632A35:
mov	ecx, [esp+114h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10Ch
retn	4
sub_632900 endp

align 10h



sub_632A50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	byte ptr [eax+14h], 10h
push	esi
push	edi
mov	esi, ecx
mov	edi, 80h
jz	short loc_632A68
mov	edi, 82h

loc_632A68:
mov	eax, [eax+1Ch]
cmp	eax, 20h
jnb	short loc_632A77
mov	eax, 20h
jmp	short loc_632A83

loc_632A77:
cmp	eax, 400h
jbe	short loc_632A83
mov	eax, 400h

loc_632A83:
push	20h
push	0
push	edi
push	eax
mov	[esi+0Ch], eax
mov	eax, [esi+8]
push	eax
call	?init@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@HIPAXI@Z ; FMOD::EventSystem::init(int,uint,void *,uint)
test	eax, eax
jz	short loc_632AC5
mov	ecx, [esi+4]
push	2
push	ecx
call	?setSpeakerMode@System@FMOD@@QAG?AW4FMOD_RESULT@@W4FMOD_SPEAKERMODE@@@Z	; FMOD::System::setSpeakerMode(FMOD_SPEAKERMODE)
test	eax, eax
jz	short loc_632AAF

loc_632AA8:
pop	edi
xor	al, al
pop	esi
retn	4

loc_632AAF:
mov	edx, [esi+0Ch]
mov	eax, [esi+8]
push	20h
push	0
push	edi
push	edx
push	eax
call	?init@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@HIPAXI@Z ; FMOD::EventSystem::init(int,uint,void *,uint)
test	eax, eax
jnz	short loc_632AA8

loc_632AC5:
pop	edi
mov	al, 1
pop	esi
retn	4
sub_632A50 endp

align 10h


; Attributes: bp-based frame

sub_632AD0 proc	near

var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_208= byte ptr -208h
var_207= byte ptr -207h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 21Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+21Ch+var_4], eax
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+4]
lea	eax, [esp+228h+var_21C]
push	eax
xor	ebx, ebx
push	ecx
mov	[esp+230h+var_21C], ebx
call	?getNumDrivers@System@FMOD@@QAG?AW4FMOD_RESULT@@PAH@Z ;	FMOD::System::getNumDrivers(int	*)
test	eax, eax
jz	short loc_632B1E

loc_632B07:
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+21Ch+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_632B1E:		; size_t
push	1FFh
lea	edx, [esp+22Ch+var_207]
push	ebx		; int
push	edx		; void *
mov	[esp+234h+var_208], bl
call	_memset
mov	eax, [edi+4]
add	esp, 0Ch
push	ebx
push	eax
xor	esi, esi
call	?setDriver@System@FMOD@@QAG?AW4FMOD_RESULT@@H@Z	; FMOD::System::setDriver(int)
test	eax, eax
jz	short loc_632BB1
mov	ecx, edi
call	sub_5F18C0
test	al, al
jz	short loc_632B07
cmp	[esp+228h+var_21C], ebx
jle	short loc_632B07

loc_632B56:
mov	eax, [edi+4]
lea	ecx, [esp+228h+var_218]
push	ecx
push	200h
lea	edx, [esp+230h+var_208]
push	edx
push	esi
push	eax
call	?getDriverInfo@System@FMOD@@QAG?AW4FMOD_RESULT@@HPADHPAUFMOD_GUID@@@Z ;	FMOD::System::getDriverInfo(int,char *,int,FMOD_GUID *)
test	eax, eax
jnz	short loc_632B07
mov	eax, 10h
lea	ecx, [esp+228h+var_218]
mov	edx, offset unk_196D380

loc_632B81:
mov	ebx, [edx]
cmp	ebx, [ecx]
jnz	short loc_632BDE
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_632B81

loc_632B95:
mov	edx, [edi+4]
push	esi
push	edx
call	?setDriver@System@FMOD@@QAG?AW4FMOD_RESULT@@H@Z	; FMOD::System::setDriver(int)
test	eax, eax
jnz	loc_632B07
cmp	esi, [esp+228h+var_21C]
jge	loc_632B07

loc_632BB1:
mov	eax, [edi+4]
push	offset unk_196D380
push	0
push	0
push	esi
push	eax
call	?getDriverInfo@System@FMOD@@QAG?AW4FMOD_RESULT@@HPADHPAUFMOD_GUID@@@Z ;	FMOD::System::getDriverInfo(int,char *,int,FMOD_GUID *)
test	eax, eax
setz	al
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+21Ch+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_632BDE:
movzx	eax, bl
movzx	ebx, byte ptr [ecx]
sub	eax, ebx
jnz	short loc_632C0A
movzx	eax, byte ptr [edx+1]
movzx	ebx, byte ptr [ecx+1]
sub	eax, ebx
jnz	short loc_632C0A
movzx	eax, byte ptr [edx+2]
movzx	ebx, byte ptr [ecx+2]
sub	eax, ebx
jnz	short loc_632C0A
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_632C0A:
sar	eax, 1Fh
or	eax, 1
jz	short loc_632B95
inc	esi
cmp	esi, [esp+228h+var_21C]
jl	loc_632B56
mov	ecx, [esp+228h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
xor	al, al
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_632AD0 endp

align 10h



sub_632C40 proc	near
mov	eax, 45h
retn
sub_632C40 endp

align 10h



; int __thiscall sub_632C50(void *, char)
sub_632C50 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FB038
jz	short loc_632C69
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_632C69:
mov	eax, esi
pop	esi
retn	4
sub_632C50 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1304D80

loc_632C70:
mov	dword ptr [ecx], offset	off_15FB038
retn
; END OF FUNCTION CHUNK	FOR sub_1304D80
align 10h


; Attributes: bp-based frame

; int __cdecl sub_632C80(float,	float)
sub_632C80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	[ebp+arg_0]
fsub	[ebp+arg_4]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
jbe	short loc_632CB3
mov	al, 1
mov	esp, ebp
pop	ebp
retn

loc_632CB3:
xor	al, al
mov	esp, ebp
pop	ebp
retn
sub_632C80 endp

align 10h



; int __cdecl sub_632CC0(float)
sub_632CC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld	dword ptr ds:xmmword_1479F30+8
sub	esp, 0Ch
fstp	[esp+10h+var_8]
fld	dword ptr ds:xmmword_1479F30+4
fstp	[esp+10h+var_C]
fld	[esp+10h+arg_0]
fstp	[esp+10h+var_10]
call	sub_632D10
movss	[esp+10h+var_4], xmm0
fld	[esp+10h+var_4]
add	esp, 0Ch
fdiv	ds:dbl_15FCE10
fstp	[esp+4+var_4]
fld	ds:dbl_15FCD70
fld	[esp+4+var_4]
call	__CIpow
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_632CC0 endp




; int __cdecl sub_632D10(float,	float, float)
sub_632D10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fld	[esp+arg_8]
fld	[esp+arg_4]
fcomi	st, st(1)
jbe	short loc_632D50
fld	st
fld	st(2)
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jnp	short loc_632D50
movss	xmm0, [esp+arg_4]
fstp	st
movss	xmm1, [esp+arg_8]
fstp	st
movss	[esp+arg_8], xmm0
fld	[esp+arg_8]
movss	[esp+arg_4], xmm1
fld	[esp+arg_4]

loc_632D50:
fld	[esp+arg_0]
fxch	st(1)
fcomip	st, st(1)
jbe	short loc_632D65
movss	xmm0, [esp+arg_4]
fstp	st(1)
fstp	st
retn

loc_632D65:
fcomip	st, st(1)
fstp	st
jbe	short loc_632D72
movss	xmm0, [esp+arg_8]
retn

loc_632D72:
movss	xmm0, [esp+arg_0]
retn
sub_632D10 endp

align 10h



; int __thiscall sub_632D80(void *, char)
sub_632D80 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FB0F8
jz	short loc_632D99
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_632D99:
mov	eax, esi
pop	esi
retn	4
sub_632D80 endp

align 10h



; int __stdcall	sub_632DA0(int,	int, void *Src)
sub_632DA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
Src= dword ptr	0Ch

push	esi
push	eax
mov	esi, ecx
call	sub_591300
mov	ecx, [esp+4+arg_0]
push	ecx
mov	ecx, esi
call	sub_587340
mov	edx, [esp+4+arg_4]
push	edx
mov	ecx, esi
call	sub_587360
mov	eax, [esp+4+Src]
push	8		; MaxCount
push	eax		; Src
push	8		; DstSize
add	esi, 0Ch
push	esi		; Dst
call	_memcpy_s
add	esp, 10h
mov	al, 1
pop	esi
retn	0Ch
sub_632DA0 endp

align 10h



sub_632DE0 proc	near
lea	eax, [ecx+80h]
retn
sub_632DE0 endp

align 10h



sub_632DF0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13065A3
mov	eax, large fs:0
push	eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	esi, [esp+20h+arg_0]
lea	eax, [esi+4]
mov	dword ptr [esi], offset	off_15FB2D4
mov	dword ptr [eax], offset	off_15FB2E8
mov	[esi+18h], eax
xor	edi, edi
mov	[esi+1Ch], edi
mov	[eax+4], esi
mov	dword ptr [eax+8], offset sub_6376E0
mov	dword ptr [eax+0Ch], offset sub_6376F0
mov	dword ptr [eax+10h], offset sub_6376D0
mov	[esp+20h+var_4], edi
mov	dword ptr [esi], offset	off_15FB108
xor	eax, eax
xor	ecx, ecx
mov	edx, offset off_15FB398
mov	[esi+20h], edx
mov	[esi+24h], edi
mov	[esi+28h], eax
mov	[esi+2Ch], ecx
mov	[esi+30h], eax
mov	[esi+34h], ecx
mov	[esi+38h], eax
mov	[esi+3Ch], ecx
mov	byte ptr [esp+20h+var_4], 1
mov	[esi+40h], edx
mov	[esi+44h], edi
mov	[esi+48h], eax
mov	[esi+4Ch], ecx
mov	[esi+50h], eax
mov	[esi+54h], ecx
mov	[esi+58h], eax
mov	[esi+5Ch], ecx
mov	byte ptr [esp+20h+var_4], 2
mov	[esi+60h], edx
mov	[esi+64h], edi
mov	[esi+68h], eax
mov	[esi+6Ch], ecx
mov	[esi+70h], eax
mov	[esi+74h], ecx
mov	[esi+78h], eax
mov	[esi+7Ch], ecx
lea	ecx, [esi+80h]
mov	byte ptr [esp+20h+var_4], 3
call	sub_42B290
lea	eax, [esp+20h+arg_0]
push	eax
lea	ecx, [esi+94h]
mov	byte ptr [esp+24h+var_4], 4
call	sub_4022A0
mov	byte ptr [esp+20h+var_4], 5
xorps	xmm0, xmm0
and	byte ptr [esi+0B0h], 0FCh
lea	ecx, [esp+20h+arg_0]
push	ecx
lea	ecx, [esi+0C4h]
movss	dword ptr [esi+0ACh], xmm0
mov	[esi+0B4h], edi
mov	[esi+0B8h], edi
mov	[esi+0BCh], edi
mov	[esi+0C0h], edi
call	sub_4022A0
mov	byte ptr [esp+20h+var_4], 6
mov	ebx, offset sub_638770
xor	ecx, ecx
mov	[esi+28h], ebx
mov	eax, offset sub_633BD0
mov	edx, offset sub_633BC0
xor	ebx, ebx
mov	[esi+24h], esi
mov	[esi+2Ch], ebx
mov	[esi+30h], edx
mov	[esi+34h], edi
mov	[esi+38h], eax
mov	[esi+3Ch], ecx
mov	[esi+44h], esi
mov	[esi+54h], edi
mov	[esi+5Ch], ecx
mov	ebx, offset sub_5CD330
mov	[esi+48h], ebx
mov	eax, offset sub_638720
mov	[esi+58h], eax
mov	edx, offset sub_633BF0
mov	[esi+50h], edx
xor	ebx, ebx
mov	[esi+4Ch], ebx
mov	eax, offset sub_633C00
mov	edx, offset sub_638750
mov	ebp, offset sub_633BE0
mov	[esi+78h], eax
mov	[esi+64h], esi
mov	[esi+68h], ebp
mov	[esi+6Ch], edi
mov	[esi+70h], edx
mov	[esi+74h], ebx
mov	[esi+7Ch], ecx
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4
sub_632DF0 endp

align 10h



; int __thiscall sub_632FB0(void *, char)
sub_632FB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_632FD0
test	[esp+4+arg_0], 1
jz	short loc_632FC8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_632FC8:
mov	eax, esi
pop	esi
retn	4
sub_632FB0 endp

align 10h



sub_632FD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_1303545
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	dword ptr [esi], offset	off_15FB108
lea	ecx, [esi+0C4h]
mov	[esp+18h+var_4], 5
call	sub_407910
lea	ecx, [esi+94h]
mov	byte ptr [esp+18h+var_4], 4
call	sub_407910
mov	eax, offset off_15FB0F8
mov	dword ptr [esi+80h], offset off_1556AA4
mov	[esi+60h], eax
mov	[esi+40h], eax
mov	[esi+20h], eax
mov	dword ptr [esi], offset	off_15FB2D4
mov	[esi+4], eax
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_632FD0 endp

align 10h



sub_633060 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	bl, 1
test	[esi+0B0h], bl
jnz	short loc_6330E2
push	ebp
push	edi
mov	edi, [esp+10h+arg_0]
lea	ebp, [esi+0C4h]
lea	ebx, [ebx+0]

loc_633080:
cmp	edi, ebp
jz	short loc_633093
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebp
call	sub_403980

loc_633093:
mov	edx, [esi]
mov	eax, [edx+44h]
push	edi
mov	ecx, esi
call	eax
test	al, al
jz	short loc_6330CF
mov	edx, [esi]
fldz
mov	eax, [edx+64h]
lea	ecx, [esi+4]
push	ecx
mov	[esi+1Ch], ecx
fstp	[esp+14h+var_14]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_6330CF
mov	cl, [esi+0B0h]
and	cl, 0FDh
or	cl, bl
mov	[esi+0B0h], cl
test	bl, cl
jz	short loc_633080

loc_6330CF:
pop	edi
pop	ebp
test	[esi+0B0h], bl
jnz	short loc_6330E2
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax

loc_6330E2:
mov	al, [esi+0B0h]
pop	esi
and	al, bl
pop	ebx
retn	4
sub_633060 endp

align 10h



sub_6330F0 proc	near

var_14=	dword ptr -14h

push	ebx
push	esi
mov	esi, ecx
test	byte ptr [esi+0B0h], 1
push	edi
jz	short loc_63311B
mov	eax, [esi]
mov	edx, [eax+2Ch]
push	1
call	edx
mov	eax, [esi]
mov	edx, [eax+20h]
push	1
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+24h]
mov	ecx, esi
call	edx

loc_63311B:
lea	edi, [esi+20h]
mov	ebx, 80h
cmp	[esi+18h], edi
jz	short loc_633153
push	ebp
mov	ebp, ds:Sleep
nop

loc_633130:
test	ebx, ebx
jle	short loc_633152
mov	eax, [esi]
fldz
mov	edx, [eax+64h]
push	ecx
mov	ecx, esi
fstp	[esp+14h+var_14]
dec	ebx
call	edx
cmp	[esi+18h], edi
jz	short loc_633152
push	10h		; dwMilliseconds
call	ebp ; Sleep
cmp	[esi+18h], edi
jnz	short loc_633130

loc_633152:
pop	ebp

loc_633153:
xor	eax, eax
lea	ecx, [esi+80h]
mov	[esi+0B4h], eax
mov	[esi+0B8h], eax
mov	eax, [ecx]
mov	edx, [eax+4]
push	offset off_17EFC54
call	edx
lea	ecx, [esi+0C4h]
call	sub_435B20
and	byte ptr [esi+0B0h], 0FEh
pop	edi
pop	esi
pop	ebx
retn
sub_6330F0 endp

align 10h



sub_633190 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

test	byte ptr [ecx+0B0h], 1
jnz	short loc_63319E

loc_633199:
xor	al, al
retn	4

loc_63319E:
xorps	xmm0, xmm0
comiss	xmm0, [esp+arg_0]
ja	short loc_633199
mov	eax, [ecx]
fld	[esp+arg_0]
mov	edx, [eax+64h]
push	ecx
fstp	[esp+4+var_4]
call	edx
test	al, al
setnz	al
retn	4
sub_633190 endp

align 10h



sub_6331C0 proc	near
mov	al, [ecx+0B0h]
test	al, 1
jnz	short loc_6331CD
xor	al, al
retn

loc_6331CD:
inc	dword ptr [ecx+0C0h]
and	al, 0FDh
mov	[ecx+0B0h], al
lea	eax, [ecx+20h]
cmp	[ecx+18h], eax
jnz	short loc_633201
mov	edx, [ecx]
mov	eax, [edx+40h]
push	esi
mov	esi, dword_18899F4
push	edi
mov	edi, [esi]
call	eax
mov	edx, [edi+18Ch]
push	eax
mov	ecx, esi
call	edx
pop	edi
pop	esi

loc_633201:
mov	al, 1
retn
sub_6331C0 endp

align 10h



sub_633210 proc	near

arg_0= byte ptr	 4

mov	al, 1
test	[ecx+0B0h], al
jnz	short loc_63321F
xor	al, al
retn	4

loc_63321F:
mov	edx, [ecx+0C0h]
test	edx, edx
jz	short locret_633243
cmp	[esp+arg_0], al
jnz	short loc_63323C
mov	dword ptr [ecx+0C0h], 0
retn	4

loc_63323C:
dec	edx
mov	[ecx+0C0h], edx

locret_633243:
retn	4
sub_633210 endp

align 10h



sub_633250 proc	near
mov	al, [ecx+0B0h]
test	al, 1
jnz	short loc_63325D
xor	al, al
retn

loc_63325D:
or	al, 2
mov	[ecx+0B0h], al
mov	al, 1
retn
sub_633250 endp

align 10h



sub_633270 proc	near
mov	al, [ecx+0B0h]
test	al, 1
jnz	short loc_63327D
xor	al, al
retn

loc_63327D:
inc	dword ptr [ecx+0BCh]
and	al, 0FDh
mov	[ecx+0B0h], al
lea	eax, [ecx+20h]
cmp	[ecx+18h], eax
jnz	short loc_6332B1
mov	edx, [ecx]
mov	eax, [edx+40h]
push	esi
mov	esi, dword_18899F4
push	edi
mov	edi, [esi]
call	eax
mov	edx, [edi+18Ch]
push	eax
mov	ecx, esi
call	edx
pop	edi
pop	esi

loc_6332B1:
mov	al, 1
retn
sub_633270 endp

align 10h



sub_6332C0 proc	near

arg_0= byte ptr	 4

mov	al, 1
test	[ecx+0B0h], al
jnz	short loc_6332CF
xor	al, al
retn	4

loc_6332CF:
mov	edx, [ecx+0BCh]
test	edx, edx
jz	short locret_6332F3
cmp	[esp+arg_0], al
jnz	short loc_6332EC
mov	dword ptr [ecx+0BCh], 0
retn	4

loc_6332EC:
dec	edx
mov	[ecx+0BCh], edx

locret_6332F3:
retn	4
sub_6332C0 endp

align 10h



sub_633300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+0B0h], 1
jnz	short loc_63330E
xor	al, al
retn	8

loc_63330E:
mov	edx, [esp+arg_4]
mov	eax, [ecx]
mov	eax, [eax+54h]
push	edx
mov	edx, [esp+4+arg_0]
push	edx
call	eax
test	al, al
setnz	al
retn	8
sub_633300 endp

align 10h



sub_633330 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+0B0h], 1
jnz	short loc_63333E
xor	al, al
retn	4

loc_63333E:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+58h]
push	edx
call	eax
test	al, al
setnz	al
retn	4
sub_633330 endp

align 10h



sub_633360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+0B0h], 1
jnz	short loc_63336E
xor	al, al
retn	8

loc_63336E:
mov	edx, [esp+arg_4]
mov	eax, [ecx]
mov	eax, [eax+5Ch]
push	edx
mov	edx, [esp+4+arg_0]
push	edx
call	eax
test	al, al
setnz	al
retn	8
sub_633360 endp

align 10h



sub_633390 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+0B0h], 1
jnz	short loc_63339E
xor	al, al
retn	8

loc_63339E:
mov	edx, [esp+arg_4]
mov	eax, [ecx]
mov	eax, [eax+60h]
push	edx
mov	edx, [esp+4+arg_0]
push	edx
call	eax
test	al, al
setnz	al
retn	8
sub_633390 endp

align 10h


; Attributes: bp-based frame

sub_6333C0 proc	near

var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_58=	byte ptr -58h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
Src= dword ptr -1Eh
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A278
mov	eax, large fs:0
push	eax
sub	esp, 78h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+84h+var_14], eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+94h+var_C]
mov	large fs:0, eax
mov	eax, [ebp+arg_0]
mov	eax, [eax+14h]
mov	edi, ecx
mov	ecx, dword_18899F4
mov	ecx, [ecx+8]
lea	esi, [edi+0B4h]
push	esi
push	6
push	eax
push	ecx
call	?getEvent@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBDIPAPAVEvent@2@@Z ; FMOD::EventSystem::getEvent(char const *,uint,FMOD::Event	* *)
test	eax, eax
jz	short loc_633426

loc_63341F:
xor	al, al
jmp	loc_633574

loc_633426:
mov	eax, [esi]
lea	edx, [esp+94h+var_74]
push	edx
xor	ebx, ebx
push	eax
mov	[esp+9Ch+var_74], ebx
call	?getCategory@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVEventCategory@2@@Z ; FMOD::Event::getCategory(FMOD::EventCategory * *)
test	eax, eax
jnz	short loc_63341F
mov	eax, [esp+94h+var_74]
lea	edx, [esp+94h+var_78]
push	edx
mov	[esp+98h+var_78], ebx
mov	ecx, [eax]
push	ebx
push	eax
mov	eax, [ecx]
call	eax
cmp	eax, ebx
jnz	short loc_63341F
mov	edx, [esp+94h+var_78]
lea	ecx, [esp+94h+var_81]
push	ecx
push	edx
lea	ecx, [esp+9Ch+var_70]
call	sub_407D30
push	eax
push	offset unk_196828C
mov	[esp+9Ch+var_4], ebx
call	sub_40A9E0
add	esp, 8
lea	ecx, [esp+94h+var_70]
mov	bl, al
mov	[esp+94h+var_4], 0FFFFFFFFh
call	sub_407910
test	bl, bl
jnz	short loc_63341F
push	34h		; size_t
lea	eax, [esp+98h+var_58]
push	0		; int
push	eax		; void *
call	_memset
mov	eax, [esi]
add	esp, 0Ch
lea	edx, [esp+94h+var_58]
push	edx
push	0
push	0
lea	ecx, [esp+0A0h+var_24]
push	eax
mov	[esp+0A4h+var_28], ecx
call	?getInfo@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAHPAPADPAUFMOD_EVENT_INFO@@@Z	; FMOD::Event::getInfo(int *,char * *,FMOD_EVENT_INFO *)
test	eax, eax
jnz	loc_63341F
mov	edx, [esp+94h+Src]
mov	eax, [esp+74h]
lea	ecx, [esp+94h+Src+2]
push	ecx		; Src
push	edx		; int
push	eax		; int
mov	eax, [esp+0A0h+var_24]
lea	ecx, [edi+80h]
call	sub_632DA0
mov	edx, dword_19682D4
mov	eax, [esi]
push	0
lea	ecx, [esp+98h+var_80]
push	ecx
push	edx
push	eax
mov	[esp+0A4h+var_80], 0
call	?getProperty@Event@FMOD@@QAG?AW4FMOD_RESULT@@PBDPAX_N@Z	; FMOD::Event::getProperty(char	const *,void *,bool)
cmp	eax, 5Bh
jz	short loc_633538
test	eax, eax
jnz	loc_63341F
mov	edx, [esp+94h+var_80]
mov	eax, edx
lea	ebx, [eax+1]
lea	esp, [esp+0]

loc_633520:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_633520
sub	eax, ebx
add	eax, edx
push	eax
push	edx
lea	ecx, [edi+94h]
call	sub_403980

loc_633538:
mov	edx, dword_19682EC
mov	eax, [esi]
xorps	xmm0, xmm0
push	0
lea	ecx, [esp+98h+var_7C]
push	ecx
push	edx
push	eax
movss	[esp+0A4h+var_7C], xmm0
call	?getProperty@Event@FMOD@@QAG?AW4FMOD_RESULT@@PBDPAX_N@Z	; FMOD::Event::getProperty(char	const *,void *,bool)
cmp	eax, 5Bh
jz	short loc_633572
test	eax, eax
jnz	loc_63341F
movss	xmm0, [esp+94h+var_7C]
movss	dword ptr [edi+0ACh], xmm0

loc_633572:
mov	al, 1

loc_633574:
mov	ecx, [esp+94h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+84h+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	4
sub_6333C0 endp

align 10h



sub_6335A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	ecx, [ecx+0B8h]
lea	eax, [esp+4+var_4]
push	eax
push	ecx
mov	[esp+0Ch+var_4], 0
call	?getState@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAI@Z	; FMOD::Event::getState(uint *)
mov	cl, byte ptr [esp+4+var_4]
test	eax, eax
jz	short loc_6335CB
test	cl, 4
jnz	short loc_6335D0

loc_6335C5:
xor	al, al
pop	ecx
retn	4

loc_6335CB:
test	cl, 4
jz	short loc_6335E7

loc_6335D0:
xor	edx, edx
cmp	eax, 2Ch
mov	eax, [esp+4+arg_0]
setnz	dl
add	edx, 2
mov	[eax], edx
mov	al, 1
pop	ecx
retn	4

loc_6335E7:
test	cl, 2
jz	short loc_6335FC
mov	ecx, [esp+4+arg_0]
mov	dword ptr [ecx], 0
mov	al, 1
pop	ecx
retn	4

loc_6335FC:
test	cl, 1
jz	short loc_6335C5
mov	edx, [esp+4+arg_0]
mov	dword ptr [edx], 1
mov	al, 1
pop	ecx
retn	4
sub_6335A0 endp

align 10h


; Attributes: bp-based frame

sub_633620 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
Dst= byte ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 1Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+1Ch+var_4], eax
push	esi
mov	esi, ecx
mov	eax, [esi+84h]
mov	cx, [esi+88h]
mov	dx, [esi+8Ah]
mov	[esp+20h+var_14], eax
push	8		; MaxCount
lea	eax, [esi+8Ch]
push	eax		; Src
mov	[esp+28h+var_10], cx
lea	ecx, [esp+28h+Dst]
push	8		; DstSize
push	ecx		; Dst
mov	[esp+30h+var_E], dx
call	_memcpy_s
mov	edx, dword_18899F4
mov	eax, [edx+8]
add	esp, 10h
add	esi, 0B8h
push	esi
push	1
lea	ecx, [esp+28h+var_14]
push	ecx
push	eax
call	?getEventByGUID@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBUFMOD_GUID@@IPAPAVEvent@2@@Z ; FMOD::EventSystem::getEventByGUID(FMOD_GUID const *,uint,FMOD::Event * *)
cmp	eax, 2Ch
jnz	short loc_6336CD
mov	ecx, dword_18899F4
mov	edx, [ecx]
mov	edx, [edx+0C8h]
lea	eax, [esp+20h+var_18]
push	eax
mov	[esp+24h+var_18], 0
call	edx
cmp	[esp+20h+var_18], 0
jbe	short loc_6336D1
mov	eax, dword_18899F4
mov	eax, [eax+8]
push	esi
push	1
lea	ecx, [esp+28h+var_14]
push	ecx
push	eax
call	?getEventByGUID@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBUFMOD_GUID@@IPAPAVEvent@2@@Z ; FMOD::EventSystem::getEventByGUID(FMOD_GUID const *,uint,FMOD::Event * *)

loc_6336CD:
test	eax, eax
jz	short loc_6336E3

loc_6336D1:
xor	al, al
pop	esi
mov	ecx, [esp+1Ch+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_6336E3:
mov	ecx, [esp+20h+var_4]
pop	esi
xor	ecx, esp
mov	al, 1
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_633620 endp

align 10h



sub_633700 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi+0B4h]
lea	eax, [esp+8+var_4]
push	eax
push	ecx
mov	[esp+10h+var_4], 0
call	?getParentGroup@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVEventGroup@2@@Z ; FMOD::Event::getParentGroup(FMOD::EventGroup * *)
test	eax, eax
jz	short loc_633726

loc_633721:
xor	al, al
pop	esi
pop	ecx
retn

loc_633726:
mov	eax, [esp+8+var_4]
mov	ecx, [esi+0B4h]
mov	edx, [eax]
mov	edx, [edx+8]
push	1
push	ecx
push	eax
call	edx
test	eax, eax
jnz	short loc_633721
mov	[esi+0B8h], eax
mov	al, 1
pop	esi
pop	ecx
retn
sub_633700 endp

align 10h



sub_633750 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
mov	eax, [esp+24h+arg_0]
movss	xmm0, dword ptr	[eax+4]
mov	ecx, [ecx+0B4h]
movss	[esp+24h+var_C], xmm0
movss	xmm0, dword ptr	[eax+8]
movss	[esp+24h+var_8], xmm0
movss	xmm0, dword ptr	[eax+0Ch]
mov	eax, [esp+24h+arg_4]
movss	[esp+24h+var_4], xmm0
movss	xmm0, dword ptr	[eax+4]
movss	[esp+24h+var_24], xmm0
movss	xmm0, dword ptr	[eax+8]
movss	[esp+24h+var_20], xmm0
movss	xmm0, dword ptr	[eax+0Ch]
lea	eax, [esp+24h+var_24]
push	eax
lea	edx, [esp+28h+var_18]
push	edx
lea	eax, [esp+2Ch+var_C]
push	eax
movss	[esp+30h+var_1C], xmm0
xorps	xmm0, xmm0
push	ecx
movss	[esp+34h+var_18], xmm0
movss	[esp+34h+var_14], xmm0
movss	[esp+34h+var_10], xmm0
call	?set3DAttributes@Event@FMOD@@QAG?AW4FMOD_RESULT@@PBUFMOD_VECTOR@@00@Z ;	FMOD::Event::set3DAttributes(FMOD_VECTOR const *,FMOD_VECTOR const *,FMOD_VECTOR const *)
test	eax, eax
setz	al
add	esp, 24h
retn	8
sub_633750 endp

align 10h



sub_6337E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	ecx, [ecx+0B4h]
push	0
lea	eax, [esp+8+var_4]
push	eax
push	2Fh
push	ecx
mov	[esp+14h+var_4], 0
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jnz	short loc_633812
mov	eax, [esp+4+var_4]
sub	eax, 0
jz	short loc_633825
sub	eax, 1
jz	short loc_633818
sub	eax, 1

loc_633812:
xor	al, al
pop	ecx
retn	4

loc_633818:
mov	edx, [esp+4+arg_0]
mov	byte ptr [edx],	0
mov	al, 1
pop	ecx
retn	4

loc_633825:
mov	eax, [esp+4+arg_0]
mov	byte ptr [eax],	1
mov	al, 1
pop	ecx
retn	4
sub_6337E0 endp

align 10h



sub_633840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

xorps	xmm0, xmm0
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	0
lea	eax, [esp+10h+arg_0]
push	eax
mov	esi, ecx
mov	ecx, [esi+0B4h]
push	0Eh
movss	dword ptr [edi], xmm0
push	ecx
movss	dword ptr [ebx], xmm0
mov	[esp+1Ch+arg_0], 0
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jnz	short loc_6338E0
cmp	[esp+0Ch+arg_0], 8
jz	loc_633911
push	eax
mov	eax, [esi+0B4h]
lea	edx, [esp+10h+arg_0]
push	edx
push	10h
push	eax
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jnz	short loc_6338E0
mov	eax, [esp+0Ch+arg_0]
test	eax, 300000h
jnz	short loc_6338E8
test	eax, 4000000h
jz	short loc_633911
mov	edx, [esi+0B4h]
lea	ecx, [esp+0Ch+arg_4]
push	ecx
push	offset aDistance_1 ; "(distance)"
push	edx
mov	[esp+18h+arg_4], 0
call	?getParameter@Event@FMOD@@QAG?AW4FMOD_RESULT@@PBDPAPAVEventParameter@2@@Z ; FMOD::Event::getParameter(char const *,FMOD::EventParameter	* *)
test	eax, eax
jnz	short loc_633911
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
push	eax
call	?getRange@EventParameter@FMOD@@QAG?AW4FMOD_RESULT@@PAM0@Z ; FMOD::EventParameter::getRange(float *,float *)
test	eax, eax
jz	short loc_633911

loc_6338E0:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	8

loc_6338E8:
mov	ecx, [esi+0B4h]
push	0
push	edi
push	11h
push	ecx
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jnz	short loc_6338E0
mov	edx, [esi+0B4h]
push	eax
push	ebx
push	12h
push	edx
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jnz	short loc_6338E0

loc_633911:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	8
sub_633840 endp

align 10h



sub_633920 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
xorps	xmm0, xmm0
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
push	0
lea	eax, [esp+18h+arg_0]
push	eax
mov	esi, ecx
mov	ecx, [esi+0B4h]
push	0Eh
movss	dword ptr [edi], xmm0
push	ecx
movss	[esp+24h+var_8], xmm0
movss	[esp+24h+var_4], xmm0
movss	dword ptr [ebx], xmm0
mov	[esp+24h+arg_0], 0
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jz	short loc_633973

loc_633968:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 8
retn	8

loc_633973:
cmp	[esp+14h+arg_0], 8
jz	short loc_6339BF
mov	eax, [esi+0B4h]
push	0
lea	edx, [esp+18h+var_8]
push	edx
push	14h
push	eax
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jnz	short loc_633968
mov	edx, [esi+0B4h]
push	eax
lea	ecx, [esp+18h+var_4]
push	ecx
push	15h
push	edx
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jnz	short loc_633968
fld	flt_17F1880
fld	st
fmul	[esp+14h+var_8]
fstp	dword ptr [edi]
fmul	[esp+14h+var_4]
fstp	dword ptr [ebx]

loc_6339BF:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	8
sub_633920 endp

align 10h



sub_6339D0 proc	near
lea	eax, [ecx+20h]
mov	[ecx+1Ch], eax
retn	4
sub_6339D0 endp

align 10h



sub_6339E0 proc	near
mov	eax, [ecx+0C0h]
add	eax, [ecx+0BCh]
jz	short locret_6339F4
lea	edx, [ecx+40h]
mov	[ecx+1Ch], edx

locret_6339F4:
retn	4
sub_6339E0 endp

align 10h



sub_633A00 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_18899F4
mov	eax, [ecx]
mov	edx, [eax+0CCh]
push	0
call	edx
mov	eax, [esi]
mov	edx, [eax+4Ch]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_633A3E
mov	edx, [esi]
lea	eax, [esi+20h]
mov	[esi+1Ch], eax
mov	eax, [edx+2Ch]
push	1
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+20h]
push	1
mov	ecx, esi
call	eax

loc_633A3E:
pop	esi
retn	4
sub_633A00 endp

align 10h



sub_633A50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+48h]
lea	ecx, [esp+0Ch+var_8]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_633A84
mov	edx, [esi]
lea	eax, [esi+20h]
mov	[esi+1Ch], eax
mov	eax, [edx+2Ch]
push	1
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+20h]
push	1
mov	ecx, esi
call	eax

loc_633A84:
mov	eax, [esp+0Ch+var_8]
cmp	eax, 2
jnz	short loc_633AC4
mov	ecx, dword_18899F4
mov	edx, [ecx]
mov	edx, [edx+0C8h]
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], 0
call	edx
cmp	[esp+0Ch+var_4], 0
jbe	short loc_633AEC
mov	eax, [esi]
mov	edx, [eax+50h]
mov	ecx, esi
call	edx
lea	eax, [esi+40h]
mov	[esi+1Ch], eax
mov	eax, [esp+0Ch+var_8]

loc_633AC4:
cmp	eax, 3
jnz	short loc_633AF6

loc_633AC9:
mov	edx, [esi]
mov	eax, [edx+2Ch]
lea	ecx, [esi+20h]
mov	[esi+1Ch], ecx
push	1
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+20h]
push	1
mov	ecx, esi
call	eax
pop	esi
add	esp, 8
retn	4

loc_633AEC:
mov	[esp+0Ch+var_8], 3
jmp	short loc_633AC9

loc_633AF6:
cmp	eax, 1
jnz	short loc_633B0B
lea	ecx, [esi+60h]
mov	dword ptr [esi+0B8h], 0
mov	[esi+1Ch], ecx

loc_633B0B:
pop	esi
add	esp, 8
retn	4
sub_633A50 endp

align 10h



sub_633B20 proc	near
mov	eax, [ecx+0C0h]
add	eax, [ecx+0BCh]
jnz	short locret_633B3D
test	byte ptr [ecx+0B0h], 2
jz	short locret_633B3D
lea	edx, [ecx+20h]
mov	[ecx+1Ch], edx

locret_633B3D:
retn	4
sub_633B20 endp




sub_633B40 proc	near
mov	eax, [ecx]
mov	edx, [eax+50h]
call	edx
retn	4
sub_633B40 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1303508

loc_633B50:
mov	dword ptr [ecx], offset	off_15FB0F8
retn
; END OF FUNCTION CHUNK	FOR sub_1303508
align 10h



; int __stdcall	sub_633B60(float)
sub_633B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, ecx
push	ecx
mov	ecx, [eax+0Ch]
fstp	[esp+4+var_4]
add	ecx, [eax+4]
mov	eax, [eax+8]
call	eax
retn	4
sub_633B60 endp

align 10h



; int __stdcall	sub_633B80(float)
sub_633B80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, ecx
push	ecx
mov	ecx, [eax+14h]
fstp	[esp+4+var_4]
add	ecx, [eax+4]
mov	eax, [eax+10h]
call	eax
retn	4
sub_633B80 endp

align 10h



; int __stdcall	sub_633BA0(float)
sub_633BA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, ecx
push	ecx
mov	ecx, [eax+1Ch]
fstp	[esp+4+var_4]
add	ecx, [eax+4]
mov	eax, [eax+18h]
call	eax
retn	4
sub_633BA0 endp

align 10h



sub_633BC0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+6Ch]
sub_633BC0 endp

align 10h



sub_633BD0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+70h]
sub_633BD0 endp

align 10h



sub_633BE0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+80h]
sub_633BE0 endp

align 10h



sub_633BF0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+78h]
sub_633BF0 endp

align 10h



sub_633C00 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+88h]
sub_633C00 endp

align 10h



sub_633C10 proc	near
mov	ecx, [edx+40h]
add	edx, 40h
xor	eax, eax
cmp	ecx, edx
jz	short locret_633C27
lea	esp, [esp+0]

loc_633C20:
mov	ecx, [ecx]
inc	eax
cmp	ecx, edx
jnz	short loc_633C20

locret_633C27:
retn
sub_633C10 endp

align 10h



sub_633C30 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304CBE
mov	eax, large fs:0
push	eax
push	ebx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
lea	eax, [esi+4]
mov	dword ptr [esi], offset	off_15FB198
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, offset off_17F18EC
jz	short loc_633C93
movss	xmm0, dword_17F18F0
movss	dword ptr [eax+4], xmm0
movss	xmm0, dword_17F18F4
movss	dword ptr [eax+8], xmm0
movss	xmm0, dword_17F18F8
movss	dword ptr [eax+0Ch], xmm0

loc_633C93:
xor	ebx, ebx
lea	eax, [esi+14h]
mov	[esp+18h+var_4], ebx
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, offset off_17F18EC
jz	short loc_633CD0
movss	xmm0, dword_17F18F0
movss	dword ptr [eax+4], xmm0
movss	xmm0, dword_17F18F4
movss	dword ptr [eax+8], xmm0
movss	xmm0, dword_17F18F8
movss	dword ptr [eax+0Ch], xmm0

loc_633CD0:
lea	eax, [esi+28h]
mov	[esi+24h], ebx
mov	dword ptr [eax], offset	off_15FAE00
cmp	eax, offset off_17F191C
jz	short loc_633D0A
movss	xmm0, dword_17F1920
movss	dword ptr [eax+4], xmm0
movss	xmm0, dword_17F1924
movss	dword ptr [eax+8], xmm0
movss	xmm0, dword_17F1928
movss	dword ptr [eax+0Ch], xmm0

loc_633D0A:
mov	eax, dword_168F1B8
and	byte ptr [esi+39h], 0FEh
mov	[esi+3Ch], eax
inc	eax
mov	dword_168F1B8, eax
lea	eax, [esi+40h]
mov	[esi+38h], bl
xor	ecx, ecx
mov	[eax], eax
mov	[eax+4], eax
push	offset sub_632070
push	offset sub_62D2F0
push	8
push	10h
lea	eax, [esi+48h]
push	eax
mov	byte ptr [esp+2Ch+var_4], 3
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
lea	eax, [esi+0C8h]
mov	[eax], eax
mov	[eax+4], eax
lea	eax, [esi+0D0h]
xor	ecx, ecx
mov	[eax], ecx
mov	cl, byte ptr [esp+18h+arg_0]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
mov	[eax+14h], cl
mov	eax, esi
cmp	dword_168F1B8, ebx
jnz	short loc_633D83
mov	dword_168F1B8, 1

loc_633D83:
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_633C30 endp

align 10h



; int __thiscall sub_633DA0(void *, char)
sub_633DA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_633DC0
test	[esp+4+arg_0], 1
jz	short loc_633DB8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_633DB8:
mov	eax, esi
pop	esi
retn	4
sub_633DA0 endp

align 10h



sub_633DC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_1306529
mov	eax, large fs:0
push	eax
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+28h+var_C]
mov	large fs:0, eax
mov	ebx, ecx
mov	[esp+28h+var_14], ebx
mov	dword ptr [ebx], offset	off_15FB198
lea	esi, [ebx+40h]
mov	[esp+28h+var_4], 6
mov	ebp, [esi]
cmp	ebp, esi
setnz	al
test	al, al
jz	short loc_633E32
lea	esp, [esp+0]

loc_633E10:
mov	edi, [ebp+8]
mov	eax, [edi]
mov	edx, [eax+18h]
mov	ecx, edi
call	edx
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx
mov	ebp, [ebp+0]
cmp	ebp, esi
setnz	al
test	al, al
jnz	short loc_633E10

loc_633E32:
mov	edi, [esi]
cmp	edi, esi
jz	short loc_633E4B

loc_633E38:
mov	eax, edi
mov	edi, [edi]
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8
cmp	edi, esi
jnz	short loc_633E38

loc_633E4B:
mov	al, 5
mov	[esi], esi
mov	[esi+4], esi
lea	edi, [ebx+0D0h]
mov	byte ptr [esp+28h+var_4], al
mov	[esp+28h+var_10], edi
xor	ebp, ebp
mov	byte ptr [esp+28h+var_4], al
cmp	[edi+10h], ebp
jz	short loc_633E82
mov	eax, [edi+4]
push	eax
mov	ecx, edi
call	sub_63D550
mov	[edi+8], edi
mov	[edi+4], ebp
mov	[edi+0Ch], edi
mov	[edi+10h], ebp

loc_633E82:
lea	ecx, [ebx+0C8h]
push	ecx
mov	byte ptr [esp+2Ch+var_4], 4
call	sub_63B060
push	offset sub_632070
push	8
push	10h
lea	edx, [ebx+48h]
push	edx
mov	byte ptr [esp+38h+var_4], 3
call	$LN21_0
push	esi
mov	byte ptr [esp+2Ch+var_4], 2
call	sub_63B060
mov	byte ptr [esp+28h+var_4], 1
mov	eax, offset off_15FAE00
mov	[ebx+28h], eax
mov	byte ptr [esp+28h+var_4], 0
mov	[ebx+14h], eax
mov	[esp+28h+var_4], 0FFFFFFFFh
mov	[ebx+4], eax
mov	ecx, [esp+28h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_633DC0 endp

align 10h



sub_633EF0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	edx, [eax+4]
or	byte ptr [esi+39h], 1
lea	ecx, [esi+4]
push	edi
push	offset off_17F18EC
call	edx
mov	eax, [esi+14h]
mov	edx, [eax+30h]
lea	ecx, [esi+14h]
call	edx
lea	edi, [esi+48h]
mov	ebx, 8
lea	esp, [esp+0]

loc_633F20:
mov	eax, [edi]
mov	edx, [eax+3Ch]
mov	ecx, edi
call	edx
add	edi, 10h
sub	ebx, 1
jnz	short loc_633F20
mov	eax, [esi+28h]
mov	edx, [eax+4]
lea	ecx, [esi+28h]
push	offset off_17F191C
call	edx
mov	al, [esi+39h]
pop	edi
pop	esi
and	al, 1
pop	ebx
retn
sub_633EF0 endp

align 10h



sub_633F50 proc	near

var_10=	dword ptr -10h

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
push	0
call	edx
mov	edx, esi
mov	edi, 80h
call	sub_633C10
test	eax, eax
jz	short loc_633FA2
mov	ebx, ds:Sleep

loc_633F74:
test	edi, edi
jle	short loc_633FA2
mov	eax, [esi]
fldz
mov	edx, [eax+0Ch]
push	ecx
mov	ecx, esi
fstp	[esp+10h+var_10]
dec	edi
call	edx
mov	edx, esi
call	sub_633C10
test	eax, eax
jz	short loc_633FA2
push	10h		; dwMilliseconds
call	ebx ; Sleep
mov	edx, esi
call	sub_633C10
test	eax, eax
jnz	short loc_633F74

loc_633FA2:
mov	edi, [esi+0C8h]
lea	ebx, [esi+0C8h]
cmp	edi, ebx
jz	short loc_633FC5

loc_633FB2:
mov	eax, edi
mov	edi, [edi]
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8
cmp	edi, ebx
jnz	short loc_633FB2

loc_633FC5:
lea	edi, [esi+0D0h]
mov	[ebx], ebx
mov	[ebx+4], ebx
cmp	dword ptr [edi+10h], 0
jz	short loc_633FF5
mov	eax, [edi+4]
push	eax
mov	ecx, edi
call	sub_63D550
mov	[edi+8], edi
mov	dword ptr [edi+4], 0
mov	[edi+0Ch], edi
mov	dword ptr [edi+10h], 0

loc_633FF5:
and	byte ptr [esi+39h], 0FEh
pop	edi
pop	esi
pop	ebx
retn
sub_633F50 endp

align 10h


; Attributes: bp-based frame

sub_634000 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12FFFB8
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	[esp+34h+var_24], edi
test	byte ptr [edi+39h], 1
jnz	short loc_63404F

loc_634038:
xor	al, al
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_63404F:
xorps	xmm0, xmm0
comiss	xmm0, [ebp+arg_0]
ja	short loc_634038
mov	[esp+34h+var_20], offset off_15FAE00
movss	[esp+34h+var_1C], xmm0
movss	[esp+34h+var_18], xmm0
movss	[esp+34h+var_14], xmm0
fld	[ebp+arg_0]
lea	ecx, [esp+34h+var_20]
mov	[esp+34h+var_4], 0
mov	eax, [edi]
mov	edx, [eax+64h]
push	ecx
push	ecx
mov	ecx, edi
fstp	[esp+3Ch+var_3C]
call	edx
mov	ebx, [edi+40h]
lea	eax, [edi+40h]
cmp	ebx, eax
setnz	al
test	al, al
jnz	short loc_6340C9

loc_63409E:
mov	al, 1

loc_6340A0:
mov	[esp+34h+var_4], 0FFFFFFFFh
mov	[esp+34h+var_20], offset off_15FAE00
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_6340C5:
mov	edi, [esp+34h+var_24]

loc_6340C9:
mov	esi, [ebx+8]
mov	edx, [esi]
lea	eax, [edi+4]
push	eax
mov	eax, [edx+2Ch]
mov	ecx, esi
call	eax
test	al, al
jz	loc_6341DC
mov	edx, [esi]
mov	edx, [edx+30h]
lea	eax, [edi+28h]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	loc_6341DC
mov	eax, [esi]
mov	edx, [eax+34h]
lea	ecx, [esp+34h+var_20]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_6341DC
mov	eax, [esp+34h+var_24]
mov	edi, [edi+0D8h]
add	eax, 0D0h
cmp	edi, eax
setnz	al
test	al, al
jz	short loc_63415D

loc_634124:
fld	dword ptr [edi+28h]
mov	edx, [esi]
lea	eax, [edi+10h]
push	ecx
fstp	[esp+38h+var_38]
push	eax
mov	eax, [edx+38h]
mov	ecx, esi
call	eax
test	al, al
jz	loc_6341DC
push	edi
call	sub_77E2F0
mov	edi, eax
mov	eax, [esp+38h+var_24]
add	eax, 0D0h
add	esp, 4
cmp	edi, eax
setnz	al
test	al, al
jnz	short loc_634124

loc_63415D:
mov	ecx, [esp+34h+var_24]
cmp	byte ptr [ecx+38h], 1
mov	edx, [esi]
mov	ecx, esi
jnz	short loc_634170
mov	eax, [edx+3Ch]
jmp	short loc_634173

loc_634170:
mov	eax, [edx+40h]

loc_634173:
call	eax
test	al, al
jz	short loc_6341DC
mov	edx, [esi]
fld	[ebp+arg_0]
mov	eax, [edx+4]
push	ecx
mov	ecx, esi
fstp	[esp+38h+var_38]
call	eax
test	al, al
jz	short loc_6341DC
lea	ecx, [esi+28h]
cmp	[esi+18h], ecx
jnz	short loc_6341C1
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
mov	esi, [ebx]
mov	eax, [ebx+4]
push	0Ch
mov	[eax], esi
push	ebx
mov	[esi+4], eax
call	sub_77E0D0
add	esp, 8
mov	ebx, esi
jmp	short loc_6341C3

loc_6341C1:
mov	ebx, [ebx]

loc_6341C3:
mov	eax, [esp+34h+var_24]
add	eax, 40h
cmp	ebx, eax
setnz	al
test	al, al
jnz	loc_6340C5
jmp	loc_63409E

loc_6341DC:
xor	al, al
jmp	loc_6340A0
sub_634000 endp

align 10h



sub_6341F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
test	byte ptr [ecx+39h], 1
push	ebp
push	esi
push	edi
jnz	short loc_634203

loc_6341FA:
xor	al, al
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	4

loc_634203:
mov	esi, [ecx+0C8h]
mov	ebp, [esp+10h+arg_0]
lea	edi, [ecx+0C8h]
cmp	esi, edi
setnz	al
mov	byte ptr [esp+10h+var_4+3], 0
test	al, al
jz	short loc_634247

loc_634221:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	eax, [eax+18h]
lea	edx, [esp+10h+var_4+3]
push	edx
push	ebp
call	eax
test	al, al
jz	short loc_6341FA
cmp	byte ptr [esp+10h+var_4+3], 1
jz	short loc_6341FA
mov	esi, [esi]
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_634221

loc_634247:
lea	ecx, [esp+10h+arg_0]
push	ecx
mov	[esp+14h+arg_0], ebp
call	sub_636BF0
mov	ecx, [edi+4]
mov	[eax], edi
mov	[eax+4], ecx
mov	[ecx], eax
mov	[edi+4], eax
pop	edi
pop	esi
mov	al, 1
pop	ebp
pop	ecx
retn	4
sub_6341F0 endp

align 10h



sub_634270 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
test	byte ptr [ecx+39h], 1
push	esi
jnz	short loc_63427F
xor	al, al
pop	esi
pop	ecx
retn	4

loc_63427F:
mov	eax, [esp+8+arg_0]
lea	esi, [ecx+0C8h]
lea	ecx, [esp+8+arg_0]
push	ecx
push	ecx
mov	ecx, esp
mov	[esp+10h+arg_0], eax
mov	eax, [esi]
mov	[ecx], esi
push	ecx
mov	ecx, esp
mov	[ecx], eax
lea	eax, [esp+14h+var_4]
call	sub_634CF0
mov	eax, [esp+14h+var_4]
add	esp, 0Ch
cmp	esi, eax
jz	short loc_6342C7
mov	ecx, [eax]
mov	edx, [eax+4]
push	0Ch
mov	[edx], ecx
push	eax
mov	[ecx+4], edx
call	sub_77E0D0
add	esp, 8

loc_6342C7:
mov	al, 1
pop	esi
pop	ecx
retn	4
sub_634270 endp

align 10h


; Attributes: bp-based frame

sub_6342D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
push	edi
mov	edi, ecx
test	byte ptr [edi+39h], 1
jnz	short loc_6342ED
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h

loc_6342ED:
mov	eax, [edi]
mov	edx, [eax+60h]
call	edx
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_10]
push	ecx
mov	ecx, [ebp+arg_C]
push	edx
mov	edx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+arg_4]
push	edx
mov	edx, [edi+3Ch]
push	ecx
mov	ecx, [ebp+arg_0]
mov	esi, eax
mov	eax, [esi]
push	edx
mov	edx, [eax+14h]
push	ecx
mov	ecx, esi
mov	[esp+2Ch+var_4], esi
xor	bl, bl
call	edx
test	al, al
jz	short loc_634359
mov	eax, [esi]
mov	edx, [eax+1Ch]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_634359
mov	esi, [edi+40h]
lea	eax, [esp+10h+var_4]
push	eax
call	sub_636BF0
mov	ecx, [esi+4]
mov	[eax], esi
mov	[eax+4], ecx
mov	[ecx], eax
mov	bl, 1
mov	[esi+4], eax
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h

loc_634359:
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
pop	edi
pop	esi
mov	al, bl
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h
sub_6342D0 endp

align 10h



sub_634380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	esi
mov	esi, ecx
test	byte ptr [esi+39h], 1
jnz	short loc_63438F

loc_634389:
xor	al, al
pop	esi
retn	18h

loc_63438F:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+68h]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_634389
mov	ecx, [esp+4+arg_14]
mov	edx, [esi]
mov	edx, [edx+1Ch]
push	ecx
mov	ecx, [esp+8+arg_10]
push	ecx
mov	ecx, [esp+0Ch+arg_C]
push	ecx
mov	ecx, [esp+10h+arg_8]
push	ecx
mov	ecx, [esp+14h+arg_4]
push	ecx
push	eax
mov	ecx, esi
call	edx
pop	esi
retn	18h
sub_634380 endp

align 10h



sub_6343D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+39h], 1
jnz	short loc_6343DB
xor	al, al
retn	8

loc_6343DB:
push	esi
mov	esi, [ecx+40h]
push	edi
lea	edi, [ecx+40h]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_634420
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
mov	ebp, [esp+10h+arg_4]
jmp	short loc_634400
align 10h

loc_634400:
mov	ecx, [esi+8]
cmp	[ecx+114h], ebx
jnz	short loc_634413
mov	eax, [ecx]
mov	edx, [eax+20h]
push	ebp
call	edx

loc_634413:
mov	esi, [esi]
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_634400
pop	ebp
pop	ebx

loc_634420:
pop	edi
mov	al, 1
pop	esi
retn	8
sub_6343D0 endp

align 10h



sub_634430 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+39h], 1
jnz	short loc_63443F

loc_634439:
xor	al, al
pop	esi
retn	8

loc_63443F:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+68h]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_634439
mov	ecx, [esp+4+arg_4]
mov	edx, [esi]
mov	edx, [edx+24h]
push	ecx
push	eax
mov	ecx, esi
call	edx
pop	esi
retn	8
sub_634430 endp

align 10h



sub_634470 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+39h], 1
jnz	short loc_63447B
xor	al, al
retn	4

loc_63447B:
push	ebx
push	esi
mov	esi, [ecx+40h]
push	edi
lea	edi, [ecx+40h]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_6344AB
mov	ebx, [esp+0Ch+arg_0]

loc_634491:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+20h]
push	ebx
call	edx
test	al, al
jz	short loc_6344B3
mov	esi, [esi]
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_634491

loc_6344AB:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4

loc_6344B3:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4
sub_634470 endp

align 10h



sub_6344C0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
test	byte ptr [ecx+39h], 1
jnz	short loc_6344CD
xor	al, al
pop	ecx
retn	4

loc_6344CD:
push	ebp
lea	ebp, [ecx+40h]
push	esi
mov	esi, [ebp+0]
cmp	esi, ebp
setnz	al
push	edi
test	al, al
jz	short loc_63451E
nop

loc_6344E0:
mov	edi, [esi+8]
mov	[esp+10h+var_1], 0
mov	eax, [edi]
mov	edx, [eax+44h]
lea	ecx, [esp+10h+var_1]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	short loc_634527
cmp	[esp+10h+var_1], 1
jnz	short loc_634513
mov	ecx, [esp+10h+arg_0]
mov	eax, [edi]
mov	edx, [eax+20h]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	short loc_634527

loc_634513:
mov	esi, [esi]
cmp	esi, ebp
setnz	al
test	al, al
jnz	short loc_6344E0

loc_63451E:
pop	edi
pop	esi
mov	al, 1
pop	ebp
pop	ecx
retn	4

loc_634527:
pop	edi
pop	esi
xor	al, al
pop	ebp
pop	ecx
retn	4
sub_6344C0 endp




sub_634530 proc	near
test	byte ptr [ecx+39h], 1
jnz	short loc_634539
xor	al, al
retn

loc_634539:
push	esi
mov	esi, [ecx+40h]
push	edi
lea	edi, [ecx+40h]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_634569
lea	ebx, [ebx+0]

loc_634550:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx
test	al, al
jz	short loc_63456E
mov	esi, [esi]
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_634550

loc_634569:
pop	edi
mov	al, 1
pop	esi
retn

loc_63456E:
pop	edi
xor	al, al
pop	esi
retn
sub_634530 endp

align 10h



sub_634580 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

test	byte ptr [ecx+39h], 1
jnz	short loc_63458B
xor	al, al
retn	10h

loc_63458B:
mov	eax, [esp+arg_8]
push	ebp
mov	ebp, [esp+4+arg_C]
mov	byte ptr [eax],	0
test	ebp, ebp
jz	short loc_63459F
mov	byte ptr [ebp+0], 0

loc_63459F:
push	ebx
push	esi
lea	ebx, [ecx+40h]
push	edi
mov	edi, [ebx]
cmp	edi, ebx
jz	short loc_634613
jmp	short loc_6345B0
align 10h

loc_6345B0:
mov	ecx, [edi+8]
mov	edx, [esp+10h+arg_0]
cmp	[ecx+114h], edx
jnz	short loc_63460D
mov	eax, [ecx+18h]
lea	esi, [ecx+68h]
cmp	eax, esi
jz	short loc_6345F0
lea	edx, [ecx+88h]
cmp	eax, edx
jz	short loc_6345F0
cmp	[esp+10h+arg_4], 1
jnz	short loc_63460D
cmp	[ecx+118h], esi
jnz	short loc_6345E9
lea	edx, [ecx+28h]
cmp	eax, edx
jz	short loc_6345F0

loc_6345E9:
lea	edx, [ecx+48h]
cmp	eax, edx
jnz	short loc_63460D

loc_6345F0:
mov	eax, [esp+10h+arg_8]
mov	byte ptr [eax],	1
test	ebp, ebp
jz	short loc_634613
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
call	eax
test	al, al
jz	short loc_63461C
cmp	byte ptr [ebp+0], 1
jz	short loc_634613

loc_63460D:
mov	edi, [edi]
cmp	edi, ebx
jnz	short loc_6345B0

loc_634613:
pop	edi
pop	esi
pop	ebx
mov	al, 1
pop	ebp
retn	10h

loc_63461C:
pop	edi
pop	esi
pop	ebx
xor	al, al
pop	ebp
retn	10h
sub_634580 endp

align 10h



sub_634630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
test	byte ptr [esi+39h], 1
jnz	short loc_63463F
xor	al, al
pop	esi
retn	10h

loc_63463F:
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+68h]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_634669
mov	eax, [esp+4+arg_8]
mov	byte ptr [eax],	0
mov	eax, [esp+4+arg_C]
test	eax, eax
jz	short loc_634663
mov	byte ptr [eax],	0

loc_634663:
mov	al, 1
pop	esi
retn	10h

loc_634669:
mov	ecx, [esp+4+arg_C]
mov	edx, [esi]
mov	edx, [edx+38h]
push	ecx
mov	ecx, [esp+8+arg_8]
push	ecx
mov	ecx, [esp+0Ch+arg_4]
push	ecx
push	eax
mov	ecx, esi
call	edx
pop	esi
retn	10h
sub_634630 endp

align 10h



sub_634690 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

test	byte ptr [ecx+39h], 1
jnz	short loc_63469B
xor	al, al
retn	8

loc_63469B:
mov	eax, [esp+arg_0]
push	ebp
lea	ebp, [ecx+40h]
push	esi
mov	byte ptr [eax],	0
mov	esi, [ebp+0]
cmp	esi, ebp
jz	short loc_6346FE
mov	dl, [esp+8+arg_4]
push	ebx
push	edi

loc_6346B4:
mov	eax, [esi+8]
mov	ecx, [eax+18h]
lea	edi, [eax+68h]
cmp	ecx, edi
jz	short loc_6346F5
lea	ebx, [eax+88h]
cmp	ecx, ebx
jz	short loc_6346F5
cmp	dl, 1
jnz	short loc_6346E6
cmp	[eax+118h], edi
jnz	short loc_6346DF
lea	edi, [eax+28h]
cmp	ecx, edi
jz	short loc_6346F5

loc_6346DF:
add	eax, 48h
cmp	ecx, eax
jz	short loc_6346F5

loc_6346E6:
mov	esi, [esi]
cmp	esi, ebp
jnz	short loc_6346B4
pop	edi
pop	ebx
pop	esi
mov	al, 1
pop	ebp
retn	8

loc_6346F5:
mov	ecx, [esp+10h+arg_0]
pop	edi
mov	byte ptr [ecx],	1
pop	ebx

loc_6346FE:
pop	esi
mov	al, 1
pop	ebp
retn	8
sub_634690 endp

align 10h



sub_634710 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+39h], 1
jnz	short loc_63471F
xor	al, al
pop	esi
retn	4

loc_63471F:
push	ebx
mov	ebx, [esp+8+arg_0]
mov	eax, [ebx]
mov	edx, [eax+34h]
mov	ecx, ebx
call	edx
test	al, al
jnz	short loc_634736
pop	ebx
pop	esi
retn	4

loc_634736:
mov	eax, [esi+4]
mov	edx, [eax+4]
push	edi
lea	edi, [esi+4]
push	ebx
mov	ecx, edi
call	edx
mov	eax, [esi+14h]
mov	edx, [eax+34h]
add	esi, 14h
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_634760
mov	eax, [esi]
mov	edx, [eax+4]
push	edi
mov	ecx, esi
call	edx

loc_634760:
pop	edi
pop	ebx
mov	al, 1
pop	esi
retn	4
sub_634710 endp

align 10h



sub_634770 proc	near

arg_0= dword ptr  4

mov	eax, ecx
test	byte ptr [eax+39h], 1
jnz	short loc_63477D
xor	al, al
retn	4

loc_63477D:
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
add	eax, 4
push	eax
mov	eax, [edx+4]
call	eax
mov	al, 1
retn	4
sub_634770 endp

align 10h



sub_6347A0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
test	byte ptr [edi+39h], 1
jnz	short loc_6347AF
xor	al, al
pop	edi
retn	4

loc_6347AF:
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi]
mov	edx, [eax+34h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_6347CE
mov	eax, [esi]
mov	edx, [eax+4Ch]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_6347D5

loc_6347CE:
pop	esi
xor	al, al
pop	edi
retn	4

loc_6347D5:
mov	eax, [edi+28h]
mov	edx, [eax+4]
lea	ecx, [edi+28h]
push	esi
call	edx
pop	esi
mov	al, 1
pop	edi
retn	4
sub_6347A0 endp

align 10h



sub_6347F0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
test	byte ptr [eax+39h], 1
jnz	short loc_6347FD
xor	al, al
retn	4

loc_6347FD:
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
add	eax, 28h
push	eax
mov	eax, [edx+4]
call	eax
mov	al, 1
retn	4
sub_6347F0 endp

align 10h



sub_634820 proc	near

var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_130A250
mov	eax, large fs:0
push	eax
sub	esp, 40h
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+58h+var_C]
mov	large fs:0, eax
test	byte ptr [ecx+39h], 1
jz	loc_6348D7
mov	edi, [esp+58h+arg_0]
lea	esi, [ecx+0D0h]
push	esi
mov	eax, edi
call	sub_63E4E0
cmp	esi, eax
jnz	loc_6348ED
lea	eax, [esp+58h+arg_4]
push	eax
push	edi
lea	ecx, [esp+60h+var_28]
call	sub_590C20
mov	edi, eax
push	edi
lea	ecx, [esp+5Ch+var_44]
mov	[esp+5Ch+var_4], 0
call	sub_403850
mov	byte ptr [esp+58h+var_4], 1
movss	xmm0, dword ptr	[edi+18h]
movss	[esp+58h+var_2C], xmm0
lea	ecx, [esp+58h+var_44]
push	ecx
lea	edx, [esp+5Ch+var_4C]
push	edx
push	esi
mov	byte ptr [esp+64h+var_4], 2
call	sub_634B20
lea	ecx, [esp+58h+var_44]
mov	byte ptr [esp+58h+var_4], 0
call	sub_407910
lea	ecx, [esp+58h+var_28]
mov	[esp+58h+var_4], 0FFFFFFFFh
call	sub_5887C0
cmp	[esp+58h+var_48], 0
jnz	short loc_6348F8

loc_6348D7:
xor	al, al
mov	ecx, [esp+58h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 4Ch
retn	8

loc_6348ED:
movss	xmm0, [esp+58h+arg_4]
movss	dword ptr [eax+28h], xmm0

loc_6348F8:
mov	al, 1
mov	ecx, [esp+58h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 4Ch
retn	8
sub_634820 endp

align 10h



sub_634910 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+39h], 1
jnz	short loc_63491B

loc_634916:
xor	al, al
retn	8

loc_63491B:
mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+0D0h]
push	esi
call	sub_63E4E0
cmp	esi, eax
pop	esi
jz	short loc_634916
fld	dword ptr [eax+28h]
mov	eax, [esp+arg_4]
fstp	dword ptr [eax]
mov	al, 1
retn	8
sub_634910 endp

align 10h



sub_634940 proc	near
mov	al, 1
test	[ecx+39h], al
jnz	short loc_63494A
xor	al, al
retn

loc_63494A:
mov	[ecx+38h], al
retn
sub_634940 endp

align 10h



sub_634950 proc	near
mov	al, 1
test	[ecx+39h], al
jnz	short loc_63495A
xor	al, al
retn

loc_63495A:
mov	byte ptr [ecx+38h], 0
retn
sub_634950 endp

align 10h



sub_634960 proc	near
push	120h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_634976
jmp	sub_637720

loc_634976:
xor	eax, eax
retn
sub_634960 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_634980(float, int)
sub_634980 proc	near

var_48=	dword ptr -48h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	byte ptr -20h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12FFF90
mov	eax, large fs:0
push	eax
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+44h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	ebx, [ebp+arg_4]
mov	eax, [ebx]
mov	edx, [eax+3Ch]
mov	ecx, ebx
call	edx
mov	eax, [esi+14h]
mov	edx, [eax+34h]
lea	edi, [esi+14h]
mov	ecx, edi
call	edx
cmp	al, 1
jnz	loc_634A9D
fld	[ebp+arg_0]
fsub	ds:dbl_15FCC10
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
fabs
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
ja	short loc_634A70
mov	eax, [esi+4]
mov	edx, [eax+1Ch]
lea	ebx, [esi+4]
push	edi
lea	ecx, [esp+48h+var_20]
push	ecx
mov	ecx, ebx
call	edx
fld	[ebp+arg_0]
push	ecx
mov	[esp+48h+var_4], 0
fstp	[esp+48h+var_48]
mov	edx, [eax]
mov	edx, [edx+2Ch]
lea	ecx, [esp+48h+var_30]
push	ecx
mov	ecx, eax
call	edx
mov	byte ptr [esp+44h+var_4], 1
mov	ecx, [esi+24h]
shl	ecx, 4
mov	edx, [ecx+esi+48h]
lea	ecx, [ecx+esi+48h]
push	eax
mov	eax, [edx+4]
call	eax
mov	byte ptr [esp+44h+var_4], 0
mov	eax, offset off_15FAE00
mov	[esp+44h+var_30], eax
mov	[esp+44h+var_4], 0FFFFFFFFh
mov	ecx, [esi+24h]
mov	edx, [edi]
inc	ecx
and	ecx, 7
mov	dword ptr [esp+44h+var_20], eax
mov	eax, [edx+4]
mov	[esi+24h], ecx
push	ebx
mov	ecx, edi
call	eax
mov	ebx, [ebp+arg_4]

loc_634A70:
add	esi, 48h
mov	edi, 8

loc_634A78:
mov	edx, [ebx]
mov	eax, [edx+10h]
push	esi
mov	ecx, ebx
call	eax
add	esi, 10h
sub	edi, 1
jnz	short loc_634A78
mov	edx, [ebx]
fld	ds:flt_15FCE28
mov	eax, [edx+28h]
push	ecx
mov	ecx, ebx
fstp	[esp+48h+var_48]
call	eax

loc_634A9D:
mov	ecx, [esp+44h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_634980 endp

align 10h



sub_634AC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [ecx+0C8h]
push	edi
lea	edi, [ecx+0C8h]
xor	eax, eax
mov	[esp+10h+var_4], eax
cmp	esi, edi
jz	short loc_634B0B
mov	ebx, [esp+10h+arg_0]
mov	edi, edi

loc_634AE0:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+10h+var_4]
push	edx
push	ebx
call	eax
test	al, al
jz	short loc_634B09
mov	eax, [esp+10h+var_4]
test	eax, eax
jnz	short loc_634B0B
mov	esi, [esi]
cmp	esi, edi
jnz	short loc_634AE0
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4

loc_634B09:
xor	eax, eax

loc_634B0B:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_634AC0 endp

align 10h



sub_634B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	ebp
mov	ebp, [ecx+4]
push	esi
push	edi
mov	edi, ecx
mov	al, 1
test	ebp, ebp
jz	short loc_634BB2
mov	eax, [esp+18h+arg_8]
mov	edx, [eax+14h]
mov	ecx, [eax+10h]
sub	ecx, edx
mov	[esp+18h+var_8], edx
mov	[esp+18h+arg_4], ecx
jmp	short loc_634B58

loc_634B50:
mov	edx, [esp+18h+var_8]
mov	ecx, [esp+18h+arg_4]

loc_634B58:
mov	eax, [ebp+24h]
mov	esi, [ebp+20h]
sub	esi, eax
cmp	esi, ecx
mov	edi, ebp
mov	[esp+18h+var_4], esi
lea	ecx, [esp+18h+var_4]
jl	short loc_634B72
lea	ecx, [esp+18h+arg_4]

loc_634B72:
mov	ecx, [ecx]
push	ecx
push	eax
push	edx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_634B9B
mov	eax, [esp+18h+arg_4]
cmp	eax, esi
jge	short loc_634B90
or	eax, 0FFFFFFFFh
jmp	short loc_634B99

loc_634B90:
xor	edx, edx
cmp	eax, esi
setnle	dl
mov	eax, edx

loc_634B99:
test	eax, eax

loc_634B9B:
setl	al
test	al, al
jz	short loc_634BA7
mov	ebp, [ebp+8]
jmp	short loc_634BAA

loc_634BA7:
mov	ebp, [ebp+0Ch]

loc_634BAA:
test	ebp, ebp
jnz	short loc_634B50
mov	ecx, [esp+18h+arg_0]

loc_634BB2:
mov	esi, edi
test	al, al
jz	short loc_634BED
push	edi
cmp	edi, [ecx+8]
jnz	short loc_634BE3
push	edi
lea	eax, [esp+20h+arg_8]
push	eax
mov	eax, [esp+24h+arg_8]
mov	edi, ecx
call	sub_634C50
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch

loc_634BE3:
call	sub_77E330
add	esp, 4
mov	esi, eax

loc_634BED:
mov	eax, [esp+18h+arg_8]
mov	edx, [eax+10h]
mov	eax, [eax+14h]
mov	ecx, [esi+20h]
push	edx
mov	edx, [esi+24h]
push	eax
push	ecx
push	edx
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_634C35
push	ebp
push	edi
mov	edi, [esp+20h+arg_0]
lea	eax, [esp+20h+arg_8]
push	eax
mov	eax, [esp+24h+arg_8]
call	sub_634C50
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch

loc_634C35:
pop	edi
mov	[ebx], esi
pop	esi
pop	ebp
mov	byte ptr [ebx+4], 0
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch
sub_634B20 endp

align 10h



sub_634C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
mov	[esp+0Ch+arg_4], 0
cmp	ebx, edi
jnz	short loc_634C79
push	esi
call	sub_634D30
mov	esi, eax
mov	[ebx+8], esi
mov	[edi+4], esi
jmp	short loc_634CC1

loc_634C79:
cmp	[esp+0Ch+arg_8], 0
jnz	short loc_634C9C
mov	eax, [ebx+20h]
mov	ecx, [ebx+24h]
mov	edx, [esi+10h]
push	eax
mov	eax, [esi+14h]
push	ecx
push	edx
push	eax
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_634CB1

loc_634C9C:
push	esi
call	sub_634D30
mov	esi, eax
mov	[ebx+8], esi
cmp	ebx, [edi+8]
jnz	short loc_634CC4
mov	[edi+8], esi
jmp	short loc_634CC4

loc_634CB1:
push	esi
call	sub_634D30
mov	esi, eax
mov	[ebx+0Ch], esi
cmp	ebx, [edi+0Ch]
jnz	short loc_634CC4

loc_634CC1:
mov	[edi+0Ch], esi

loc_634CC4:
lea	ecx, [edi+4]
push	ecx
push	esi
mov	[esi+4], ebx
call	sub_77E4A0
inc	dword ptr [edi+10h]
add	esp, 8
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	0Ch
sub_634C50 endp

align 10h



sub_634CF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
cmp	ecx, esi
setnz	dl
test	dl, dl
jz	short loc_634D25
mov	edx, [esp+4+arg_8]
push	edi
mov	edi, [edx]
lea	esp, [esp+0]

loc_634D10:
cmp	[ecx+8], edi
jz	short loc_634D24
mov	ecx, [ecx]
cmp	ecx, esi
setnz	dl
mov	[esp+8+arg_0], ecx
test	dl, dl
jnz	short loc_634D10

loc_634D24:
pop	edi

loc_634D25:
mov	[eax], ecx
pop	esi
retn
sub_634CF0 endp

align 10h


; Attributes: bp-based frame

sub_634D30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_13085E0
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	[ebp+var_14], 2Ch
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	esi, eax
mov	[ebp+var_18], esi
xor	ebx, ebx
mov	[ebp+var_4], ebx
lea	ecx, [esi+10h]
push	ecx
mov	edi, [ebp+arg_0]
call	sub_634DD0
add	esp, 4
mov	[ebp+var_4], 0FFFFFFFFh
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_634D30 endp



; Attributes: noreturn

sub_634DAA proc	near
mov	eax, [ebp-18h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_634DBE
push	2Ch
push	eax
call	sub_77E0D0
add	esp, 8

loc_634DBE:
push	ebx
push	ebx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_634DAA endp

align 10h



sub_634DD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13086D9
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
test	esi, esi
jz	short loc_634E1E
push	edi
mov	ecx, esi
call	sub_403850
mov	byte ptr [esp+18h+var_4], 1
fld	dword ptr [edi+18h]
fstp	dword ptr [esi+18h]
mov	byte ptr [esp+18h+var_4], 0

loc_634E1E:
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_634DD0 endp

align 10h



sub_634E40 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130649B
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
and	byte ptr [esi+4], 0FEh
lea	eax, [esp+14h+arg_0]
push	eax
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15FB204
call	sub_4022A0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_634E40 endp

align 10h



; int __thiscall sub_634EA0(void *, char)
sub_634EA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_15FB204
call	sub_407910
test	[esp+4+arg_0], 1
jz	short loc_634EC1
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_634EC1:
mov	eax, esi
pop	esi
retn	4
sub_634EA0 endp

align 10h


; Attributes: bp-based frame

sub_634ED0 proc	near

var_B1=	byte ptr -0B1h
var_B0=	byte ptr -0B0h
var_98=	byte ptr -98h
var_97=	byte ptr -97h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A1FB
mov	eax, large fs:0
push	eax
sub	esp, 0A8h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0B4h+var_14], eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0C4h+var_C]
mov	large fs:0, eax
mov	edi, [ebp+arg_0]
mov	esi, ecx
test	byte ptr [esi+4], 1
jnz	loc_634FA7
xor	ebx, ebx

loc_634F21:		; size_t
push	7Fh
lea	eax, [esp+0C8h+var_97]
push	ebx		; int
push	eax		; void *
mov	[esp+0D0h+var_98], bl
call	_memset
mov	edx, [edi]
mov	edx, [edx+0Ch]
add	esp, 0Ch
push	80h
lea	eax, [esp+0C8h+var_98]
push	eax
mov	ecx, edi
call	edx
test	al, al
jz	short loc_634F98
lea	eax, [esp+0C4h+var_B1]
push	eax
lea	ecx, [esp+0C8h+var_98]
push	ecx
lea	ecx, [esp+0CCh+var_B0]
call	sub_407D30
lea	ecx, [esi+8]
mov	[esp+0C4h+var_4], ebx
cmp	eax, ecx
jz	short loc_634F7A
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_634F7A:
lea	ecx, [esp+0C4h+var_B0]
mov	[esp+0C4h+var_4], 0FFFFFFFFh
call	sub_407910
or	byte ptr [esi+4], 1
test	byte ptr [esi+4], 1
jz	short loc_634F21

loc_634F98:
test	byte ptr [esi+4], 1
jnz	short loc_634FA7
mov	edx, [esi]
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax

loc_634FA7:
mov	al, [esi+4]
and	al, 1
mov	ecx, [esp+0C4h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+0B4h+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	8
sub_634ED0 endp

align 10h



sub_634FE0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	bl, 1
test	[esi+4], bl
jnz	short loc_635011
push	ebp
push	edi
mov	edi, [esp+10h+arg_0]
lea	ebp, [esi+8]

loc_634FF4:
cmp	edi, ebp
jz	short loc_635007
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebp
call	sub_403980

loc_635007:
or	[esi+4], bl
test	[esi+4], bl
jz	short loc_634FF4
pop	edi
pop	ebp

loc_635011:
mov	al, [esi+4]
pop	esi
and	al, bl
pop	ebx
retn	4
sub_634FE0 endp

align 10h



sub_635020 proc	near
and	byte ptr [ecx+4], 0FEh
retn
sub_635020 endp

align 10h



sub_635030 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1306466
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
mov	dl, byte ptr [esp+14h+arg_0]
lea	eax, [esi+4]
mov	dword ptr [esi], offset	off_15FB214
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], cl
mov	[eax+4], ecx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ecx
mov	[eax+14h], dl
mov	[esp+14h+var_4], ecx
and	byte ptr [esi+1Ch], 0FEh
lea	eax, [esp+14h+arg_0]
push	eax
lea	ecx, [esi+20h]
call	sub_4022A0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_635030 endp

align 10h



; int __thiscall sub_6350B0(void *, char)
sub_6350B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_635100
test	[esp+4+arg_0], 1
jz	short loc_6350C8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6350C8:
mov	eax, esi
pop	esi
retn	4
sub_6350B0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_13034D0

loc_6350D0:
cmp	dword ptr [esi+10h], 0
jz	short locret_6350F5
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_635650
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

locret_6350F5:
retn
; END OF FUNCTION CHUNK	FOR sub_13034D0
align 10h



sub_635100 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_13034DB
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	dword ptr [esi], offset	off_15FB214
lea	ecx, [esi+20h]
mov	[esp+18h+var_4], 0
call	sub_407910
add	esi, 4
mov	[esp+18h+var_4], 0FFFFFFFFh
cmp	dword ptr [esi+10h], 0
jz	short loc_63516E
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_635650
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_63516E:
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_635100 endp

align 10h


; Attributes: bp-based frame

sub_635180 proc	near

var_199= byte ptr -199h
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= byte ptr -184h
var_16C= byte ptr -16Ch
var_154= dword ptr -154h
var_150= qword ptr -150h
anonymous_0= qword ptr -148h
var_13F= dword ptr -13Fh
var_13B= dword ptr -13Bh
var_137= dword ptr -137h
var_133= dword ptr -133h
var_12F= dword ptr -12Fh
var_12B= word ptr -12Bh
var_127= dword ptr -127h
var_123= dword ptr -123h
var_11F= dword ptr -11Fh
var_11B= word ptr -11Bh
var_118= byte ptr -118h
var_117= byte ptr -117h
var_98=	byte ptr -98h
var_97=	byte ptr -97h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A1C1
mov	eax, large fs:0
push	eax
sub	esp, 190h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+19Ch+var_14], eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1ACh+var_C]
mov	large fs:0, eax
mov	esi, [ebp+arg_0]
mov	ebx, dword_18899F4
mov	edi, ecx
test	byte ptr [edi+1Ch], 1
mov	[esp+1ACh+var_194], edi
mov	[esp+1ACh+var_188], esi
mov	[esp+1ACh+var_190], ebx
jnz	loc_635445

loc_6351E1:		; size_t
push	7Fh
lea	eax, [esp+1B0h+var_117]
push	0		; int
push	eax		; void *
mov	[esp+1B8h+var_118], 0
call	_memset
mov	edx, [esi]
mov	edx, [edx+0Ch]
add	esp, 0Ch
push	80h
lea	eax, [esp+1B0h+var_118]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	loc_635436
lea	eax, [esp+1ACh+var_199]
push	eax
lea	ecx, [esp+1B0h+var_118]
push	ecx
lea	ecx, [esp+1B4h+var_16C]
call	sub_407D30
lea	ecx, [edi+20h]
mov	[esp+1ACh+var_4], 0
cmp	eax, ecx
jz	short loc_635250
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_635250:
lea	ecx, [esp+1ACh+var_16C]
mov	[esp+1ACh+var_4], 0FFFFFFFFh
call	sub_407910
mov	edx, [esi]
mov	edx, [edx+0Ch]
push	4
lea	eax, [esp+1B0h+var_198]
push	eax
mov	ecx, esi
mov	[esp+1B4h+var_198], 0
call	edx
test	al, al
jz	loc_635436
push	7Fh		; size_t
lea	eax, [esp+1B0h+var_97]
push	0		; int
push	eax		; void *
mov	[esp+1B8h+var_98], 0
call	_memset
xor	eax, eax
add	esp, 0Ch
mov	byte ptr [esp+6Ch], 0
mov	[esp+1ACh+var_13F], eax
mov	[esp+1ACh+var_13B], eax
mov	[esp+1ACh+var_137], eax
mov	[esp+1ACh+var_133], eax
mov	[esp+1ACh+var_12F], eax
mov	dword ptr [esp+1ACh+var_12B], eax
mov	[esp+1ACh+var_127], eax
mov	[esp+1ACh+var_123], eax
mov	[esp+1ACh+var_11F], eax
mov	[esp+1ACh+var_11B], ax
mov	[esp+1ACh+var_18C], eax
cmp	[esp+1ACh+var_198], eax
jbe	loc_635428
lea	ecx, [ecx+0]

loc_6352F0:
mov	edx, [esi]
mov	edx, [edx+0Ch]
push	80h
lea	eax, [esp+1B0h+var_98]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	loc_63541E
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	27h
lea	ecx, [esp+70h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63541E
lea	eax, [esp+1ACh+var_199]
push	eax
lea	ecx, [esp+1B0h+var_98]
push	ecx
lea	ecx, [esp+1B4h+var_184]
call	sub_407D30
mov	[esp+1ACh+var_4], 1
mov	edx, [ebx]
mov	edx, [edx+1ACh]
lea	eax, [esp+1ACh+var_184]
push	eax
mov	ecx, ebx
call	edx
lea	ecx, [esp+1ACh+var_184]
mov	ebx, eax
mov	[esp+1ACh+var_4], 0FFFFFFFFh
call	sub_407910
xor	eax, eax
cmp	ebx, eax
jz	loc_635405
mov	dword ptr [esp+1ACh+var_150], eax
mov	dword ptr [esp+1ACh+anonymous_0], eax
mov	dword ptr [esp+1ACh+anonymous_0+4], eax
lea	eax, [esp+6Ch]
xor	ecx, ecx
xor	edx, edx
push	eax		; char *
lea	esi, [esp+1B0h+var_154]
mov	[esp+1B0h+var_154], offset off_1556AA4
mov	word ptr [esp+1B0h+var_150+4], cx
mov	word ptr [esp+1B0h+var_150+6], dx
call	sub_42B580
mov	[esp+1ACh+var_4], 2
mov	edx, off_17F1954
mov	eax, [edx+0Ch]
mov	ecx, esi
push	ecx
mov	ecx, offset off_17F1954
xor	edi, edi
call	eax
test	al, al
jz	short loc_6353DF
mov	ecx, [esp+1ACh+var_190]
mov	edx, [ecx]
mov	edx, [edx+19Ch]
mov	eax, esi
push	eax
call	edx
mov	edi, eax

loc_6353DF:
mov	eax, [esp+1ACh+var_194]
mov	esi, ebx
call	sub_6355F0
mov	edi, [esp+1ACh+var_194]
mov	esi, [esp+1ACh+var_188]
mov	[esp+1ACh+var_4], 0FFFFFFFFh
mov	[esp+1ACh+var_154], offset off_1556AA4

loc_635405:
mov	eax, [esp+1ACh+var_18C]
mov	ebx, [esp+1ACh+var_190]
inc	eax
mov	[esp+1ACh+var_18C], eax
cmp	eax, [esp+1ACh+var_198]
jb	loc_6352F0
jmp	short loc_635428

loc_63541E:
mov	eax, [esp+1ACh+var_18C]
cmp	eax, [esp+1ACh+var_198]
jb	short loc_635436

loc_635428:
or	byte ptr [edi+1Ch], 1
test	byte ptr [edi+1Ch], 1
jz	loc_6351E1

loc_635436:
test	byte ptr [edi+1Ch], 1
jnz	short loc_635445
mov	edx, [edi]
mov	eax, [edx+0Ch]
mov	ecx, edi
call	eax

loc_635445:
mov	al, [edi+1Ch]
and	al, 1
mov	ecx, [esp+1ACh+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+19Ch+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	8
sub_635180 endp




sub_635470 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	bl, 1
test	[esi+1Ch], bl
jnz	short loc_6354A1
push	ebp
push	edi
mov	edi, [esp+10h+arg_0]
lea	ebp, [esi+20h]

loc_635484:
cmp	edi, ebp
jz	short loc_635497
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebp
call	sub_403980

loc_635497:
or	[esi+1Ch], bl
test	[esi+1Ch], bl
jz	short loc_635484
pop	edi
pop	ebp

loc_6354A1:
mov	al, [esi+1Ch]
pop	esi
and	al, bl
pop	ebx
retn	4
sub_635470 endp

align 10h



sub_6354B0 proc	near
push	esi
push	edi
mov	edi, ecx
cmp	dword ptr [edi+14h], 0
lea	esi, [edi+4]
jz	short loc_6354DC
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_635650
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_6354DC:
and	byte ptr [edi+1Ch], 0FEh
pop	edi
pop	esi
retn
sub_6354B0 endp

align 10h



sub_6354F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+1Ch], 1
jnz	short loc_6354FB
xor	al, al
retn	8

loc_6354FB:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+10h]
push	edx
call	eax
mov	ecx, [esp+arg_4]
mov	[ecx], eax
mov	al, 1
retn	8
sub_6354F0 endp

align 10h



sub_635520 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+1Ch], 1
jnz	short loc_63552B

loc_635526:
xor	al, al
retn	8

loc_63552B:
mov	edx, [esp+arg_0]
test	byte ptr [edx+1Ch], 1
jz	short loc_635526
push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	byte ptr [ebx],	0
mov	eax, [ecx+0Ch]
lea	ebp, [ecx+4]
cmp	eax, ebp
jz	short loc_63559D
push	esi
lea	esi, [edx+4]
push	edi
lea	ecx, [ecx+0]

loc_635550:
mov	ecx, [esi+4]
mov	edx, esi
test	ecx, ecx
jz	short loc_63557E
mov	edi, [eax+10h]
lea	esp, [esp+0]

loc_635560:
cmp	[ecx+10h], edi
jb	short loc_63556C
mov	edx, ecx
mov	ecx, [ecx+8]
jmp	short loc_63556F

loc_63556C:
mov	ecx, [ecx+0Ch]

loc_63556F:
test	ecx, ecx
jnz	short loc_635560
cmp	esi, edx
jz	short loc_635582
cmp	edi, [edx+10h]
jnb	short loc_63557E
mov	edx, esi

loc_63557E:
cmp	esi, edx
jnz	short loc_635598

loc_635582:
push	eax
call	sub_77E2F0
add	esp, 4
cmp	eax, ebp
jnz	short loc_635550
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8

loc_635598:
pop	edi
mov	byte ptr [ebx],	1
pop	esi

loc_63559D:
pop	ebp
mov	al, 1
pop	ebx
retn	8
sub_635520 endp

align 10h



sub_6355B0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
lea	edx, [ecx+4]
mov	ecx, edx
test	eax, eax
jz	short loc_6355E0
push	esi
mov	esi, [esp+4+arg_0]

loc_6355C1:
cmp	[eax+10h], esi
jb	short loc_6355CD
mov	ecx, eax
mov	eax, [eax+8]
jmp	short loc_6355D0

loc_6355CD:
mov	eax, [eax+0Ch]

loc_6355D0:
test	eax, eax
jnz	short loc_6355C1
cmp	ecx, edx
jz	short loc_6355DF
cmp	esi, [ecx+10h]
jnb	short loc_6355DF
mov	ecx, edx

loc_6355DF:
pop	esi

loc_6355E0:
cmp	edx, ecx
jz	short loc_6355EA
mov	eax, [ecx+14h]
retn	4

loc_6355EA:
xor	eax, eax
retn	4
sub_6355B0 endp

align 10h



sub_6355F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= byte ptr	-8

mov	ecx, [eax+8]
add	eax, 4
sub	esp, 14h
mov	edx, eax
test	ecx, ecx
jz	short loc_63561E
nop

loc_635600:
cmp	[ecx+10h], esi
jb	short loc_63560C
mov	edx, ecx
mov	ecx, [ecx+8]
jmp	short loc_63560F

loc_63560C:
mov	ecx, [ecx+0Ch]

loc_63560F:
test	ecx, ecx
jnz	short loc_635600
cmp	eax, edx
jz	short loc_635622
cmp	esi, [edx+10h]
jnb	short loc_63561E
mov	edx, eax

loc_63561E:
cmp	eax, edx
jnz	short loc_635645

loc_635622:
lea	ecx, [esp+14h+var_14]
push	ecx
lea	edx, [esp+18h+var_C]
push	edx
mov	[esp+1Ch+var_14], esi
mov	[esp+1Ch+var_10], edi
call	sub_635690
cmp	[esp+14h+var_8], 0
jnz	short loc_635648
xor	al, al
add	esp, 14h
retn

loc_635645:
mov	[edx+14h], edi

loc_635648:
mov	al, 1
add	esp, 14h
retn
sub_6355F0 endp

align 10h



sub_635650 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, ecx
test	esi, esi
jz	short loc_635680
push	edi
lea	ecx, [ecx+0]

loc_635660:
mov	eax, [esi+0Ch]
push	eax
mov	ecx, ebx
call	sub_635650
mov	edi, [esi+8]
push	18h
push	esi
call	sub_77E0D0
add	esp, 8
mov	esi, edi
test	edi, edi
jnz	short loc_635660
pop	edi

loc_635680:
pop	esi
pop	ebx
retn	4
sub_635650 endp

align 10h



sub_635690 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, eax
mov	esi, [edi+4]
mov	ebp, edi
mov	cl, 1
test	esi, esi
jz	short loc_6356C8
mov	eax, [edx]
jmp	short loc_6356B0
align 10h

loc_6356B0:
cmp	eax, [esi+10h]
mov	ebp, esi
setb	cl
test	cl, cl
jz	short loc_6356C1
mov	esi, [esi+8]
jmp	short loc_6356C4

loc_6356C1:
mov	esi, [esi+0Ch]

loc_6356C4:
test	esi, esi
jnz	short loc_6356B0

loc_6356C8:
mov	eax, ebp
test	cl, cl
jz	short loc_6356E0
push	ebp
cmp	ebp, [edi+8]
jz	short loc_6356E8
call	sub_77E330
mov	edx, [esp+14h+arg_4]
add	esp, 4

loc_6356E0:
mov	ecx, [eax+10h]
cmp	ecx, [edx]
jnb	short loc_635706
push	esi

loc_6356E8:
push	ebp
lea	eax, [esp+18h+arg_4]
push	eax
mov	ecx, edx
call	sub_635720
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_635706:
pop	edi
pop	esi
mov	[ebx], eax
pop	ebp
mov	byte ptr [ebx+4], 0
mov	eax, ebx
pop	ebx
retn	8
sub_635690 endp

align 10h



sub_635720 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	[esp+0Ch+arg_4], 0
cmp	ebx, edi
jnz	short loc_635746
call	sub_6357A0
mov	esi, eax
mov	[ebx+8], esi
mov	[edi+4], esi
jmp	short loc_635777

loc_635746:
cmp	[esp+0Ch+arg_8], 0
jnz	short loc_635754
mov	eax, [ecx]
cmp	eax, [ebx+10h]
jnb	short loc_635768

loc_635754:
call	sub_6357A0
mov	esi, eax
mov	[ebx+8], esi
cmp	ebx, [edi+8]
jnz	short loc_63577A
mov	[edi+8], esi
jmp	short loc_63577A

loc_635768:
call	sub_6357A0
mov	esi, eax
mov	[ebx+0Ch], esi
cmp	ebx, [edi+0Ch]
jnz	short loc_63577A

loc_635777:
mov	[edi+0Ch], esi

loc_63577A:
lea	ecx, [edi+4]
push	ecx
push	esi
mov	[esi+4], ebx
call	sub_77E4A0
inc	dword ptr [edi+10h]
add	esp, 8
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	0Ch
sub_635720 endp

align 10h


; Attributes: bp-based frame

sub_6357A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_1301680
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	esi, ecx
mov	[ebp+var_14], 18h
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	[ebp+var_18], eax
xor	edi, edi
mov	[ebp+var_4], edi
lea	ecx, [eax+10h]
cmp	ecx, edi
jz	short loc_6357F9
mov	edx, [esi]
mov	[ecx], edx
mov	edx, [esi+4]
mov	[ecx+4], edx

loc_6357F9:
mov	[ebp+var_4], 0FFFFFFFFh
mov	[eax+8], edi
mov	[eax+0Ch], edi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6357A0 endp



; Attributes: noreturn

sub_635818 proc	near
mov	eax, [ebp-18h]
xor	edi, edi
cmp	eax, edi
jz	short loc_63582C
push	18h
push	eax
call	sub_77E0D0
add	esp, 8

loc_63582C:
push	edi
push	edi
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_635818 endp

align 10h



sub_635840 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
mov	dword ptr [esi], offset	off_15FB230
push	ebx
xor	ebx, ebx
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
lea	eax, [esi+10h]
mov	[eax], eax
mov	[eax+4], eax
lea	eax, [esi+18h]
xor	ecx, ecx
mov	[eax], ecx
mov	cl, [esp+8+var_1]
mov	[eax+14h], cl
lea	ecx, [esp+8+var_1]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
call	sub_438430
mov	dl, [esp+8+var_1]
lea	eax, [esi+30h]
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+10h], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+14h], dl
and	byte ptr [esi+48h], 0FEh
mov	eax, esi
pop	ebx
pop	ecx
retn
sub_635840 endp

align 10h



; int __thiscall sub_6358B0(void *, char)
sub_6358B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6358E0
test	[esp+4+arg_0], 1
jz	short loc_6358C8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6358C8:
mov	eax, esi
pop	esi
retn	4
sub_6358B0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1304DD8

loc_6358D0:
push	eax
call	sub_636980
retn
; END OF FUNCTION CHUNK	FOR sub_1304DD8
align 10h



sub_6358E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_1306433
mov	eax, large fs:0
push	eax
push	ecx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+1Ch+var_10], esi
mov	dword ptr [esi], offset	off_15FB230
lea	edi, [esi+30h]
mov	[esp+1Ch+var_4], 2
cmp	dword ptr [edi+10h], 0
jz	short loc_63593F
mov	eax, [edi+4]
push	eax
mov	ecx, edi
call	sub_63D550
mov	[edi+8], edi
mov	dword ptr [edi+4], 0
mov	[edi+0Ch], edi
mov	dword ptr [edi+10h], 0

loc_63593F:
lea	eax, [esi+18h]
push	eax
mov	byte ptr [esp+20h+var_4], 1
call	sub_636980
lea	ecx, [esi+10h]
push	ecx
mov	byte ptr [esp+20h+var_4], 0
call	sub_63B060
push	ecx
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	edx, esp
add	esi, 4
mov	[esp+20h+var_10], esp
push	edx
mov	ecx, esi
call	sub_4AC410
push	ecx
mov	eax, esp
mov	[esp+24h+var_10], esp
push	eax
mov	ecx, esi
call	sub_5E26A0
call	sub_631D80
mov	eax, [esi]
add	esp, 8
test	eax, eax
jz	short loc_6359A4
mov	edx, [esi+8]
lea	ecx, [esi+8]
sub	edx, eax
sar	edx, 2
push	edx		; int
push	eax		; void *
call	sub_5F1C30

loc_6359A4:
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 10h
retn
sub_6358E0 endp

align 10h


; Attributes: bp-based frame

sub_6359C0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A171
mov	eax, large fs:0
push	eax
sub	esp, 60h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+6Ch+var_14], eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+7Ch+var_C]
mov	large fs:0, eax
mov	eax, [ebp+arg_0]
xor	ebx, ebx
mov	edi, ecx
mov	[esp+7Ch+var_68], ebx
test	byte ptr [edi+48h], 1
mov	[esp+7Ch+var_60], eax
jnz	loc_635C7F

loc_635A10:
mov	eax, [esp+7Ch+var_60]
add	eax, 58h
lea	esi, [edi+4]
call	sub_631CA0
mov	edx, [edi]
mov	eax, [edx+40h]
mov	ecx, edi
call	eax
mov	esi, eax
mov	edx, [esi]
mov	eax, [edx+4]
push	offset unk_1968324
mov	ecx, esi
call	eax
test	al, al
jz	loc_635BE3
mov	edx, [edi]
mov	eax, [edx+4Ch]
push	esi
mov	ecx, edi
call	eax
lea	ecx, [esp+7Ch+var_44]
push	ecx
call	sub_638790
mov	[esp+7Ch+var_4], 0
mov	edx, dword_196834C
mov	eax, dword_1968350
push	edx
push	eax
lea	ecx, [esp+84h+var_40]
call	sub_403980
xorps	xmm0, xmm0
mov	edx, [edi]
mov	eax, 1
mov	[esp+7Ch+var_28], eax
mov	[esp+7Ch+var_24], eax
mov	eax, [edx+44h]
movss	[esp+7Ch+var_20], xmm0
movss	[esp+7Ch+var_1C], xmm0
movss	xmm0, dword_17F19EC
mov	ecx, edi
movss	[esp+7Ch+var_18], xmm0
call	eax
mov	esi, eax
mov	edx, [esi]
mov	edx, [edx+4]
lea	eax, [esp+7Ch+var_44]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	loc_635BEF
mov	eax, [edi]
mov	edx, [eax+5Ch]
push	esi
mov	ecx, edi
call	edx
test	al, al
jz	loc_635BEF
mov	eax, [edi]
mov	edx, [eax+3Ch]
mov	ecx, edi
call	edx
mov	ebx, eax
xor	esi, esi
cmp	ebx, esi
jz	short loc_635B18
mov	eax, [esp+7Ch+var_60]
push	offset aNdaudiomixer_d ; "NDAudioMixer.dat"
add	eax, 30h
push	eax
lea	ecx, [esp+84h+var_5C]
push	ecx
call	sub_4566C0
add	esp, 0Ch
mov	byte ptr [esp+7Ch+var_4], 2
mov	edx, [ebx]
or	[esp+7Ch+var_68], 1
push	esi
push	eax
mov	eax, [edx+4]
mov	ecx, ebx
call	eax
mov	byte ptr [esp+7Ch+var_6C+3], 1
cmp	al, 1
jz	short loc_635B1D

loc_635B18:
mov	byte ptr [esp+7Ch+var_6C+3], 0

loc_635B1D:
mov	[esp+7Ch+var_4], esi
test	byte ptr [esp+7Ch+var_68], 1
jz	short loc_635B36
and	[esp+7Ch+var_68], 0FFFFFFFEh
lea	ecx, [esp+7Ch+var_5C]
call	sub_407910

loc_635B36:
cmp	byte ptr [esp+7Ch+var_6C+3], 0
jz	short loc_635B87
mov	edx, [ebx]
mov	edx, [edx+0Ch]
push	4
lea	eax, [esp+80h+var_64]
push	eax
mov	ecx, ebx
mov	[esp+84h+var_64], esi
call	edx
test	al, al
jz	loc_635C13
mov	ecx, [esp+7Ch+var_64]
mov	eax, [edi]
mov	edx, [eax+50h]
push	ecx
push	ebx
mov	ecx, edi
call	edx
test	al, al
jz	loc_635C24
mov	ecx, [esp+7Ch+var_64]
mov	eax, [edi]
mov	edx, [eax+60h]
push	ecx
push	ebx
mov	ecx, edi
call	edx
test	al, al
jz	loc_635C35

loc_635B87:
mov	eax, [edi]
mov	edx, [eax+7Ch]
push	1
mov	ecx, edi
call	edx
cmp	eax, esi
jz	loc_635C46
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+14h]
call	eax
test	al, al
jz	loc_635C46
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
or	byte ptr [edi+48h], 1
or	eax, 0FFFFFFFFh
mov	[esp+7Ch+var_4], eax
mov	[esp+7Ch+var_44], offset off_15FB3A8
lea	ecx, [esp+7Ch+var_40]
mov	[esp+7Ch+var_4], eax
call	sub_407910
test	byte ptr [edi+48h], 1
jz	loc_635A10
jmp	loc_635C62

loc_635BE3:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
jmp	short loc_635C62

loc_635BEF:
mov	edx, [esi]
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
or	eax, 0FFFFFFFFh
mov	[esp+7Ch+var_4], eax
mov	[esp+7Ch+var_44], offset off_15FB3A8
jmp	short loc_635C55

loc_635C13:
or	eax, 0FFFFFFFFh
mov	[esp+7Ch+var_4], eax
mov	[esp+7Ch+var_44], offset off_15FB3A8
jmp	short loc_635C55

loc_635C24:
or	eax, 0FFFFFFFFh
mov	[esp+7Ch+var_4], eax
mov	[esp+7Ch+var_44], offset off_15FB3A8
jmp	short loc_635C55

loc_635C35:
or	eax, 0FFFFFFFFh
mov	[esp+7Ch+var_4], eax
mov	[esp+7Ch+var_44], offset off_15FB3A8
jmp	short loc_635C55

loc_635C46:
or	eax, 0FFFFFFFFh
mov	[esp+7Ch+var_4], eax
mov	[esp+7Ch+var_44], offset off_15FB3A8

loc_635C55:
lea	ecx, [esp+7Ch+var_40]
mov	[esp+7Ch+var_4], eax
call	sub_407910

loc_635C62:
test	ebx, ebx
jz	short loc_635C70
mov	edx, [edi]
mov	eax, [edx+48h]
push	ebx
mov	ecx, edi
call	eax

loc_635C70:
test	byte ptr [edi+48h], 1
jnz	short loc_635C7F
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
call	eax

loc_635C7F:
mov	al, [edi+48h]
and	al, 1
mov	ecx, [esp+7Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+6Ch+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	4
sub_6359C0 endp

align 10h



sub_635CB0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+64h]
call	edx
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
and	byte ptr [esi+48h], 0FEh
pop	esi
retn
sub_635CB0 endp

align 10h



sub_635CD0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+48h], 1
jnz	short loc_635CDF

loc_635CD9:
xor	al, al
pop	esi
retn	4

loc_635CDF:
xorps	xmm0, xmm0
comiss	xmm0, [esp+4+arg_0]
ja	short loc_635CD9
mov	eax, [esi]
fld	[esp+4+arg_0]
mov	edx, [eax+58h]
push	ecx
fstp	[esp+8+var_8]
call	edx
test	al, al
jz	short loc_635CD9
mov	eax, [esi]
fld	[esp+4+arg_0]
mov	edx, [eax+68h]
push	ecx
mov	ecx, esi
fstp	[esp+8+var_8]
call	edx
test	al, al
setnz	al
pop	esi
retn	4
sub_635CD0 endp

align 10h



sub_635D20 proc	near

var_4= dword ptr -4

push	ecx
test	byte ptr [ecx+48h], 1
mov	[esp+4+var_4], ecx
jnz	short loc_635D2E
xor	al, al
pop	ecx
retn

loc_635D2E:
push	ebp
push	edi
mov	edi, [ecx+20h]
lea	ebp, [ecx+18h]
cmp	edi, ebp
setnz	al
test	al, al
jz	short loc_635D8C
push	ebx
push	esi

loc_635D41:
mov	esi, [edi+14h]
cmp	dword ptr [esi+28h], 1
jz	short loc_635D76
cmp	dword ptr [esi+4], 0
mov	eax, [esi]
mov	edx, [eax+18h]
push	1
mov	ecx, esi
setnz	bl
call	edx
test	al, al
jz	short loc_635D76
cmp	dword ptr [esi+4], 0
setnz	al
cmp	al, bl
jz	short loc_635D76
mov	ecx, [esp+14h+var_4]
mov	edx, [ecx]
mov	eax, [edx+6Ch]
call	eax

loc_635D76:
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebp
setnz	al
test	al, al
jnz	short loc_635D41
pop	esi
pop	ebx

loc_635D8C:
pop	edi
mov	al, 1
pop	ebp
pop	ecx
retn
sub_635D20 endp

align 10h



sub_635DA0 proc	near
test	byte ptr [ecx+48h], 1
jnz	short loc_635DAB
xor	al, al
retn	8

loc_635DAB:
mov	eax, [ecx]
mov	eax, [eax+70h]
jmp	eax
sub_635DA0 endp

align 10h



sub_635DC0 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+48h], 1
jnz	short loc_635DCB

loc_635DC6:
xor	al, al
retn	4

loc_635DCB:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+74h]
push	edx
call	eax
test	eax, eax
jz	short loc_635DC6
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+24h]
call	eax
retn	4
sub_635DC0 endp

align 10h



sub_635DF0 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+48h], 1
jnz	short loc_635DFB

loc_635DF6:
xor	al, al
retn	4

loc_635DFB:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+74h]
push	edx
call	eax
test	eax, eax
jz	short loc_635DF6
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+28h]
call	eax
retn	4
sub_635DF0 endp

align 10h



sub_635E20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+48h], 1
jnz	short loc_635E2B

loc_635E26:
xor	al, al
retn	8

loc_635E2B:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+74h]
push	edx
call	eax
test	eax, eax
jz	short loc_635E26
mov	ecx, [esp+arg_4]
mov	edx, [eax]
mov	edx, [edx+1Ch]
push	ecx
mov	ecx, eax
call	edx
retn	8
sub_635E20 endp

align 10h



; int __stdcall	sub_635E50(int,	float)
sub_635E50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+48h], 1
jnz	short loc_635E5B

loc_635E56:
xor	al, al
retn	8

loc_635E5B:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+74h]
push	edx
call	eax
test	eax, eax
jz	short loc_635E56
mov	edx, [eax]
fld	[esp+arg_4]
push	ecx
mov	ecx, eax
fstp	[esp+4+var_4]
mov	eax, [edx+20h]
call	eax
retn	8
sub_635E50 endp

align 10h



sub_635E80 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
test	byte ptr [edi+48h], 1
jnz	short loc_635E8F

loc_635E89:
xor	al, al
pop	edi
retn	4

loc_635E8F:
mov	ecx, [esp+4+arg_0]
mov	eax, [edi]
mov	edx, [eax+7Ch]
push	ecx
mov	ecx, edi
call	edx
test	eax, eax
jz	short loc_635E89
push	esi
mov	esi, eax
call	sub_6368B0
pop	esi
pop	edi
retn	4
sub_635E80 endp

align 10h



sub_635EB0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	edi
mov	edi, ecx
test	byte ptr [edi+48h], 1
jnz	short loc_635EBF

loc_635EB9:
xor	al, al
pop	edi
retn	8

loc_635EBF:
mov	ecx, [esp+4+arg_0]
mov	eax, [edi]
mov	edx, [eax+7Ch]
push	ecx
mov	ecx, edi
call	edx
test	eax, eax
jz	short loc_635EB9
mov	cl, [esp+4+arg_4]
push	esi
mov	esi, eax
call	sub_6368F0
pop	esi
pop	edi
retn	8
sub_635EB0 endp

align 10h



sub_635EF0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
test	byte ptr [edi+48h], 1
jnz	short loc_635EFF
xor	al, al
pop	edi
retn	4

loc_635EFF:
mov	eax, [edi]
mov	edx, [eax+78h]
push	esi
mov	esi, [esp+8+arg_0]
push	esi
call	edx
test	eax, eax
jnz	short loc_635F1E
mov	ecx, esi
call	sub_435B80
pop	esi
xor	al, al
pop	edi
retn	4

loc_635F1E:
mov	esi, eax
call	sub_6368B0
pop	esi
pop	edi
retn	4
sub_635EF0 endp

align 10h



sub_635F30 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	edi
mov	edi, ecx
test	byte ptr [edi+48h], 1
jnz	short loc_635F3F
xor	al, al
pop	edi
retn	8

loc_635F3F:
mov	eax, [edi]
mov	edx, [eax+78h]
push	esi
mov	esi, [esp+8+arg_0]
push	esi
call	edx
test	eax, eax
jnz	short loc_635F5E
mov	ecx, esi
call	sub_435B80
pop	esi
xor	al, al
pop	edi
retn	8

loc_635F5E:
mov	cl, [esp+8+arg_4]
mov	esi, eax
call	sub_6368F0
pop	esi
pop	edi
retn	8
sub_635F30 endp

align 10h


; Attributes: bp-based frame

sub_635F70 proc	near

var_78=	dword ptr -78h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_30=	byte ptr -30h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130C158
mov	eax, large fs:0
push	eax
sub	esp, 58h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+74h+var_C]
mov	large fs:0, eax
mov	[esp+74h+var_60], ecx
test	byte ptr [ecx+48h], 1
jnz	short loc_635FBD
xor	al, al
mov	ecx, [esp+74h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_635FBD:
mov	esi, [ebp+arg_0]
lea	edi, [esi+8]
mov	ecx, edi
mov	[esp+74h+var_54], edi
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, edi
mov	ebx, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, ebx
jz	short loc_635FE4
push	eax
push	edi
mov	ecx, ebx
call	sub_6369F0

loc_635FE4:
lea	ebx, [esi+14h]
mov	ecx, ebx
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, ebx
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, edi
jz	short loc_636003
push	edi		; int
push	eax		; void *
push	ebx		; int
call	sub_636AD0

loc_636003:
mov	edi, [esp+74h+var_60]
mov	ecx, [edi+10h]
lea	eax, [edi+10h]
xor	edx, edx
cmp	ecx, eax
jz	short loc_63601A

loc_636013:
mov	ecx, [ecx]
inc	edx
cmp	ecx, eax
jnz	short loc_636013

loc_63601A:
mov	[esi], edx
mov	ecx, [edi+28h]
mov	[esi+4], ecx
mov	edi, [eax]
mov	[esp+74h+var_5C], edi
cmp	edi, eax
jz	loc_6360F1
jmp	short loc_636036

loc_636032:
mov	edi, [esp+74h+var_5C]

loc_636036:
mov	esi, [edi+8]
fld	flt_17F19BC
fstp	[esp+74h+var_58]
mov	eax, [esi]
mov	edx, [eax+1Ch]
lea	ecx, [esp+74h+var_58]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+74h+var_58]
mov	al, [esi+18h]
push	ecx
shr	al, 1
fstp	[esp+78h+var_78]
and	al, 1
movzx	ecx, al
push	ecx
sub	esp, 18h
add	esi, 1Ch
mov	ecx, esp
mov	[esp+94h+var_50], esp
push	esi
call	sub_403850
mov	[esp+94h+var_4], 0
lea	esi, [esp+94h+var_30]
mov	[esp+94h+var_4], 0FFFFFFFFh
call	sub_6319C0
mov	[esp+74h+var_4], 1
mov	edx, [esp+74h+var_54]
mov	ecx, [edx+4]
cmp	ecx, [edx+8]
jz	short loc_6360C2
push	ecx
mov	edi, eax
call	sub_637040
mov	eax, [esp+78h+var_54]
mov	edi, [esp+78h+var_5C]
add	esp, 4
add	dword ptr [eax+4], 20h
jmp	short loc_6360CB

loc_6360C2:
push	eax
push	ecx
mov	ecx, edx
call	sub_636C80

loc_6360CB:
lea	ecx, [esp+74h+var_30]
mov	[esp+74h+var_4], 0FFFFFFFFh
call	sub_407910
mov	eax, [esp+74h+var_60]
mov	edi, [edi]
add	eax, 10h
mov	[esp+74h+var_5C], edi
cmp	edi, eax
jnz	loc_636032

loc_6360F1:
mov	eax, [esp+74h+var_60]
mov	ecx, [eax+20h]
add	eax, 18h
mov	[esp+74h+var_5C], ecx
cmp	ecx, eax
jz	loc_636249

loc_636107:
mov	edx, [esp+74h+var_5C]
mov	esi, [edx+14h]
cmp	dword ptr [esi+4], 0
jz	loc_636229
mov	ecx, ebx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, ebx
mov	edi, eax
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
cmp	edi, eax
jz	short loc_636152
lea	esp, [esp+0]

loc_636130:
mov	ecx, [esp+74h+var_60]
mov	eax, [ecx]
mov	edx, [eax+78h]
push	edi
call	edx
mov	eax, [eax+2Ch]
cmp	eax, [esi+2Ch]
ja	short loc_636192
mov	ecx, ebx
add	edi, 1Ch
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
cmp	edi, eax
jnz	short loc_636130

loc_636152:
mov	edx, [esi+4]
lea	eax, [esp+74h+var_54]
push	eax
add	esi, 10h
push	esi
lea	ecx, [esp+7Ch+var_30]
mov	[esp+7Ch+var_54], edx
call	sub_4FF4F0
mov	[esp+74h+var_4], 4
mov	edi, [ebx+4]
cmp	edi, [ebx+8]
jz	loc_63620E
push	eax		; int
push	edi		; void *
call	sub_5C9FC0
add	esp, 8
add	dword ptr [ebx+4], 1Ch
jmp	loc_636218

loc_636192:
mov	eax, [esi+4]
lea	ecx, [esp+74h+var_54]
push	ecx
add	esi, 10h
push	esi
lea	ecx, [esp+7Ch+var_4C]
mov	[esp+7Ch+var_54], eax
call	sub_4FF4F0
mov	esi, eax
mov	ecx, ebx
mov	[esp+74h+var_4], 3
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [ebx+8]
sub	ecx, [ebx+4]
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 1
jb	short loc_6361F7
lea	ecx, [esp+74h+var_61]
push	ecx
push	esi
push	1
push	edi
mov	ecx, ebx
call	sub_637100
mov	ecx, ebx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
lea	ecx, [esp+74h+var_4C]
jmp	short loc_63621C

loc_6361F7:
push	0
push	esi
mov	esi, ebx
call	sub_636A30
mov	ecx, ebx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
lea	ecx, [esp+74h+var_4C]
jmp	short loc_63621C

loc_63620E:
push	1
push	eax
mov	esi, ebx
call	sub_636A30

loc_636218:
lea	ecx, [esp+74h+var_30]

loc_63621C:
mov	[esp+74h+var_4], 0FFFFFFFFh
call	sub_5887C0

loc_636229:
mov	ecx, [esp+74h+var_5C]
push	ecx
call	sub_77E2F0
mov	ecx, [esp+78h+var_60]
add	ecx, 18h
add	esp, 4
mov	[esp+74h+var_5C], eax
cmp	eax, ecx
jnz	loc_636107

loc_636249:
mov	al, 1
mov	ecx, [esp+74h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_635F70 endp




sub_636260 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130634B
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
push	44h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_6362B1
push	eax
call	sub_638CA0
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn

loc_6362B1:
xor	eax, eax
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_636260 endp

align 10h



sub_6362D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130860B
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
push	40h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+18h+var_10], esi
xor	eax, eax
mov	[esp+18h+var_4], eax
cmp	esi, eax
jz	short loc_636331
and	byte ptr [esi+8], 0FEh
mov	[esi+4], eax
lea	eax, [esi+0Ch]
push	eax
mov	dword ptr [esi], offset	off_15FB3B8
call	sub_638790
movss	xmm0, ds:dword_15439C8
movss	dword ptr [esi+3Ch], xmm0
mov	eax, esi

loc_636331:
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_6362D0 endp

align 10h



sub_636350 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
pop	esi
retn	4
sub_636350 endp

align 10h



sub_636370 proc	near

arg_0= byte ptr	 4

push	esi
lea	eax, [esp+4+arg_0]
push	eax
lea	esi, [ecx+10h]
call	sub_636BF0
mov	ecx, [esi+4]
mov	[eax], esi
mov	[eax+4], ecx
mov	[ecx], eax
mov	[esi+4], eax
pop	esi
retn	4
sub_636370 endp

align 10h



sub_636390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
mov	eax, [ebp+0]
mov	edx, [eax+0Ch]
push	esi
mov	esi, ecx
push	4
lea	ecx, [esp+14h+var_4]
push	ecx
xor	ebx, ebx
mov	ecx, ebp
mov	[esp+18h+var_4], ebx
call	edx
test	al, al
jnz	short loc_6363BC
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_6363BC:
push	edi
cmp	[esp+14h+var_4], ebx
jbe	short loc_6363F3

loc_6363C3:
mov	eax, [esi]
mov	edx, [eax+40h]
mov	ecx, esi
call	edx
mov	ecx, [esp+10h+arg_8]
push	ecx
mov	edi, eax
mov	eax, [edi]
mov	edx, [eax+8]
push	ebp
push	esi
mov	ecx, edi
call	edx
test	al, al
jz	short loc_6363FD
mov	eax, [esi]
mov	edx, [eax+4Ch]
push	edi
mov	ecx, esi
call	edx
inc	ebx
cmp	ebx, [esp+14h+var_4]
jb	short loc_6363C3

loc_6363F3:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	8

loc_6363FD:
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	8
sub_636390 endp

align 10h



sub_636420 proc	near
push	ebx
push	esi
lea	ebx, [ecx+10h]
push	edi
mov	edi, [ebx]
cmp	edi, ebx
setnz	al
test	al, al
jz	short loc_636452

loc_636431:
mov	esi, [edi+8]
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
mov	edi, [edi]
cmp	edi, ebx
setnz	al
test	al, al
jnz	short loc_636431

loc_636452:
mov	esi, [ebx]
cmp	esi, ebx
jz	short loc_63646B

loc_636458:
mov	eax, esi
mov	esi, [esi]
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8
cmp	esi, ebx
jnz	short loc_636458

loc_63646B:
pop	edi
pop	esi
mov	[ebx+4], ebx
mov	[ebx], ebx
pop	ebx
retn
sub_636420 endp

align 10h



; int __stdcall	sub_636480(float)
sub_636480 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
mov	esi, [ecx+10h]
push	edi
lea	edi, [ecx+10h]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_6364B2

loc_636491:
mov	ecx, [esi+8]
fld	[esp+8+arg_0]
mov	eax, [ecx]
mov	edx, [eax+10h]
push	ecx
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_6364B9
mov	esi, [esi]
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_636491

loc_6364B2:
pop	edi
mov	al, 1
pop	esi
retn	4

loc_6364B9:
pop	edi
xor	al, al
pop	esi
retn	4
sub_636480 endp



; Attributes: bp-based frame

sub_6364C0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_13085C0
mov	eax, large fs:0
push	eax
sub	esp, 50h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+6Ch+var_C]
mov	large fs:0, eax
mov	edi, [ebp+arg_0]
mov	eax, [edi+28h]
lea	ebx, [ecx+18h]
lea	esi, [ecx+30h]
lea	ecx, [esp+6Ch+var_58]
push	ecx
lea	edx, [esp+70h+var_50]
mov	[esp+70h+var_58], eax
push	edx
mov	eax, ebx
mov	[esp+74h+var_54], edi
call	sub_62FE00
cmp	[esp+6Ch+var_4C], 0
jz	loc_6365C2
lea	eax, [edi+10h]
push	eax
lea	ecx, [esp+70h+var_48]
call	sub_403850
mov	[esp+6Ch+var_4], 0
mov	[esp+6Ch+var_30], edi
lea	eax, [esp+6Ch+var_48]
push	eax
lea	ecx, [esp+70h+var_2C]
mov	[esp+70h+var_4], 1
call	sub_403850
mov	byte ptr [esp+6Ch+var_4], 2
mov	ecx, [esp+6Ch+var_30]
mov	[esp+6Ch+var_14], ecx
lea	edx, [esp+6Ch+var_2C]
push	edx
lea	eax, [esp+70h+var_58]
push	eax
push	esi
mov	byte ptr [esp+78h+var_4], 3
call	sub_63D5D0
lea	ecx, [esp+6Ch+var_2C]
mov	byte ptr [esp+6Ch+var_4], 1
call	sub_407910
lea	ecx, [esp+6Ch+var_48]
mov	[esp+6Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	al, byte ptr [esp+6Ch+var_54]
test	al, al
jz	short loc_6365AB
mov	al, 1
mov	ecx, [esp+6Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_6365AB:
cmp	al, 1
jnz	short loc_6365C2
mov	edi, [esp+6Ch+var_58]
push	edi
call	sub_77E2F0
mov	eax, esp
mov	[eax], edi
call	sub_63D020

loc_6365C2:
cmp	[esp+6Ch+var_4C], 1
jnz	short loc_6365E2
push	ecx
mov	ecx, [esp+70h+var_50]
mov	eax, esp
lea	edx, [esp+70h+var_58]
mov	[esp+70h+var_58], esp
push	edx
mov	esi, ebx
mov	[eax], ecx
call	sub_636930

loc_6365E2:
xor	al, al
mov	ecx, [esp+6Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_6364C0 endp

align 10h



sub_636600 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
mov	eax, [ebx]
mov	edx, [eax+0Ch]
push	ebp
push	edi
mov	edi, ecx
push	4
lea	ecx, [esp+14h+var_4]
push	ecx
xor	ebp, ebp
mov	ecx, ebx
mov	[esp+18h+var_4], ebp
call	edx
test	al, al
jnz	short loc_63662B
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_63662B:
push	esi
cmp	[esp+14h+var_4], ebp
jbe	short loc_636665

loc_636632:
mov	eax, [edi]
mov	edx, [eax+44h]
mov	ecx, edi
call	edx
mov	ecx, [esp+10h+arg_8]
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	ebx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_636678
mov	eax, [edi]
mov	edx, [eax+5Ch]
push	esi
mov	ecx, edi
call	edx
test	al, al
jz	short loc_63666F
inc	ebp
cmp	ebp, [esp+14h+var_4]
jb	short loc_636632

loc_636665:
pop	esi
pop	edi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	8

loc_63666F:
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx

loc_636678:
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
pop	esi
pop	edi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	8
sub_636600 endp

align 10h



sub_636690 proc	near
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
mov	edi, [ebx+20h]
lea	ebp, [ebx+18h]
cmp	edi, ebp
setnz	al
test	al, al
jz	short loc_6366CF

loc_6366A5:
mov	esi, [edi+14h]
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebp
setnz	al
test	al, al
jnz	short loc_6366A5

loc_6366CF:
xor	edi, edi
cmp	[ebp+10h], edi
jz	short loc_6366ED
mov	eax, [ebp+4]
push	eax
mov	ecx, ebp
call	sub_635650
mov	[ebp+8], ebp
mov	[ebp+4], edi
mov	[ebp+0Ch], ebp
mov	[ebp+10h], edi

loc_6366ED:
cmp	[ebx+40h], edi
lea	esi, [ebx+30h]
jz	short loc_63670C
mov	ecx, [esi+4]
push	ecx
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	[esi+4], edi
mov	[esi+0Ch], esi
mov	[esi+10h], edi

loc_63670C:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_636690 endp

align 10h



; int __stdcall	sub_636720(float)
sub_636720 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [ecx+20h]
lea	ebp, [ecx+18h]
cmp	esi, ebp
setnz	al
push	edi
mov	[esp+14h+var_4], ecx
test	al, al
jz	short loc_636789
jmp	short loc_636740
align 10h

loc_636740:
mov	edi, [esi+14h]
fld	[esp+14h+arg_0]
cmp	dword ptr [edi+4], 0
mov	eax, [edi]
mov	edx, [eax+10h]
push	ecx
mov	ecx, edi
fstp	[esp+18h+var_18]
setnz	bl
call	edx
test	al, al
jz	short loc_636793
cmp	dword ptr [edi+4], 0
setnz	al
cmp	al, bl
jz	short loc_636775
mov	ecx, [esp+14h+var_4]
mov	edx, [ecx]
mov	eax, [edx+6Ch]
call	eax

loc_636775:
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, ebp
setnz	al
test	al, al
jnz	short loc_636740

loc_636789:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	4

loc_636793:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	4
sub_636720 endp

align 10h



sub_6367A0 proc	near
push	esi
mov	esi, [ecx+10h]
push	edi
lea	edi, [ecx+10h]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_6367C6

loc_6367B1:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+2Ch]
call	edx
mov	esi, [esi]
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_6367B1

loc_6367C6:
pop	edi
pop	esi
retn
sub_6367A0 endp

align 10h



sub_6367D0 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8

mov	eax, [ecx+4]
push	esi
mov	esi, [ecx+8]
push	edi
lea	edi, [esp+8+arg_0]
call	sub_636FD0
mov	ecx, [esp+8+arg_4]
cmp	esi, eax
setnz	al
pop	edi
mov	[ecx], al
mov	al, 1
pop	esi
retn	8
sub_6367D0 endp

align 10h



sub_636800 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
lea	eax, [ecx+10h]
push	esi
push	edi
mov	edi, [eax]
mov	[esp+14h+var_4], eax
cmp	edi, eax
jz	short loc_636850
mov	ebp, [esp+14h+arg_0]
mov	ebx, [ebp+10h]
sub	ebx, [ebp+14h]
lea	esp, [esp+0]

loc_636820:
mov	esi, [edi+8]
mov	ecx, [esi+30h]
mov	edx, [esi+2Ch]
sub	edx, ecx
cmp	ebx, edx
jnz	short loc_63684A
mov	eax, [ebp+14h]
mov	edx, [ebp+10h]
sub	edx, eax
push	edx
push	ecx
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jz	short loc_63685A
mov	eax, [esp+14h+var_4]

loc_63684A:
mov	edi, [edi]
cmp	edi, eax
jnz	short loc_636820

loc_636850:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	4

loc_63685A:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_636800 endp

align 10h



sub_636870 proc	near

arg_0= byte ptr	 4

push	esi
lea	eax, [esp+4+arg_0]
lea	esi, [ecx+18h]
push	eax
push	esi
call	sub_6372E0
cmp	esi, eax
pop	esi
jz	short loc_63688A
mov	eax, [eax+14h]
retn	4

loc_63688A:
xor	eax, eax
retn	4
sub_636870 endp

align 10h



sub_636890 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+30h]
push	esi
call	sub_63E4E0
cmp	esi, eax
pop	esi
jz	short loc_6368A9
mov	eax, [eax+28h]
retn	4

loc_6368A9:
xor	eax, eax
retn	4
sub_636890 endp

align 10h



sub_6368B0 proc	near
cmp	dword ptr [esi+28h], 1
jnz	short loc_6368B9
mov	al, 1
retn

loc_6368B9:
cmp	dword ptr [esi+4], 0
mov	eax, [esi]
mov	edx, [eax+14h]
push	ebx
mov	ecx, esi
setnz	bl
call	edx
test	al, al
jnz	short loc_6368D0
pop	ebx
retn

loc_6368D0:
cmp	dword ptr [esi+4], 0
setnz	al
cmp	al, bl
jz	short loc_6368E4
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax

loc_6368E4:
mov	al, 1
pop	ebx
retn
sub_6368B0 endp

align 10h



sub_6368F0 proc	near
cmp	dword ptr [esi+28h], 1
jnz	short loc_6368F9
xor	al, al
retn

loc_6368F9:
cmp	dword ptr [esi+4], 0
mov	eax, [esi]
mov	edx, [eax+18h]
push	ebx
push	ecx
mov	ecx, esi
setnz	bl
call	edx
test	al, al
jnz	short loc_636911
pop	ebx
retn

loc_636911:
cmp	dword ptr [esi+4], 0
setnz	al
cmp	al, bl
jz	short loc_636925
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax

loc_636925:
mov	al, 1
pop	ebx
retn
sub_6368F0 endp

align 10h



sub_636930 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
push	eax
mov	edi, eax
call	sub_77E2F0
mov	[esp+0Ch+arg_4], eax
lea	eax, [esi+0Ch]
push	eax
lea	ecx, [esi+8]
push	ecx
lea	edx, [esi+4]
push	edx
push	edi
call	sub_77E650
add	esp, 14h
test	eax, eax
jz	short loc_63696A
push	18h
push	eax
call	sub_77E0D0
add	esp, 8

loc_63696A:
mov	eax, [esp+8+arg_4]
dec	dword ptr [esi+10h]
mov	[ebx], eax
pop	edi
mov	eax, ebx
pop	ebx
retn	8
sub_636930 endp

align 10h



sub_636980 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130165B
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
mov	[esp+14h+var_4], 0
cmp	dword ptr [esi+10h], 0
jz	short loc_6369D2
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_635650
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

loc_6369D2:
lea	ecx, [esi+14h]
call	sub_438430
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_636980 endp

align 10h



sub_6369F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+4]
push	esi
push	edi
push	eax
mov	eax, [esp+14h+arg_4]
call	sub_6370B0
mov	ebx, [ebp+4]
mov	edi, eax
add	esp, 4
mov	esi, edi
cmp	edi, ebx
jz	short loc_636A21

loc_636A13:
mov	ecx, esi
call	sub_407910
add	esi, 20h
cmp	esi, ebx
jnz	short loc_636A13

loc_636A21:
mov	eax, [esp+10h+arg_4]
mov	[ebp+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6369F0 endp

align 10h



sub_636A30 proc	near

var_2C=	byte ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_130B9A8
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
push	ebx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	ebx, [esp+34h+arg_4]
mov	eax, [esp+34h+arg_0]
cmp	eax, [esi]
jb	short loc_636AA3
cmp	eax, [esi+4]
jnb	short loc_636AA3
push	eax
lea	ecx, [esp+38h+var_2C]
call	sub_5BEF40
push	ebx
lea	eax, [esp+38h+var_2C]
push	eax
push	edi
mov	ecx, esi
mov	[esp+40h+var_4], 0
call	sub_636D50
lea	ecx, [esp+34h+var_2C]
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_5887C0
jmp	short loc_636AAD

loc_636AA3:
push	ebx
push	eax
push	edi
mov	ecx, esi
call	sub_636D50

loc_636AAD:
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn	8
sub_636A30 endp

align 10h



; int __stdcall	sub_636AD0(int,	void *,	int)
sub_636AD0 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_0]
push	ebx
mov	ebx, [esp+8+arg_4]
push	ebp
mov	ebp, [esp+0Ch+arg_8]
push	esi
push	edi
mov	esi, ebx
mov	edi, ebp
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	[esp+14h+arg_8], eax
cmp	ebx, ebp
jz	short loc_636B45
mov	ebx, ebp
sub	ebx, esi

loc_636AF6:
cmp	edi, [esp+14h+arg_8]
jz	loc_636B9D
push	esi		; void *
call	sub_5B57B0
push	esi
call	sub_5BC5D0
add	esp, 8
call	sub_5BC5D0
test	esi, esi
jz	short loc_636B37
lea	eax, [esp+14h+var_4]
push	edi
push	eax
call	sub_459510
mov	ecx, [eax]
add	esp, 8
push	ecx
mov	ecx, esi
call	sub_456D40
mov	edx, [ebx+esi+18h]
mov	[esi+18h], edx

loc_636B37:
add	esi, 1Ch
add	edi, 1Ch
cmp	esi, ebp
jnz	short loc_636AF6

loc_636B41:
mov	ebx, [esp+14h+arg_4]

loc_636B45:
cmp	edi, [esp+14h+arg_8]
jz	loc_636BD0
nop

loc_636B50:
push	esi
call	sub_5BC5D0
add	esp, 4
call	sub_5BC5D0
test	esi, esi
jz	short loc_636B80
lea	edx, [esp+14h+arg_4]
push	edi
push	edx
call	sub_459510
mov	eax, [eax]
add	esp, 8
push	eax
mov	ecx, esi
call	sub_456D40
mov	ecx, [edi+18h]
mov	[esi+18h], ecx

loc_636B80:
add	edi, 1Ch
add	esi, 1Ch
cmp	edi, [esp+14h+arg_8]
jnz	short loc_636B50
mov	edx, [esp+14h+arg_0]
pop	edi
mov	[edx+4], esi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
pop	ecx
retn	0Ch

loc_636B9D:
cmp	esi, ebp
jz	short loc_636B41
mov	edi, esi

loc_636BA3:
lea	eax, [esp+14h+arg_8]
push	eax
push	edi		; void *
mov	byte ptr [esp+1Ch+arg_8], 0
call	sub_5C5110
add	edi, 1Ch
add	esp, 8
cmp	edi, ebp
jnz	short loc_636BA3
mov	ecx, [esp+14h+arg_0]
mov	eax, [esp+14h+arg_4]
pop	edi
mov	[ecx+4], esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_636BD0:
mov	eax, [esp+14h+arg_0]
pop	edi
mov	[eax+4], esi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
pop	ecx
retn	0Ch
sub_636AD0 endp

align 10h


; Attributes: bp-based frame

sub_636BF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_12FFF60
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	[ebp+var_14], 0Ch
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_636BF0 endp



; Attributes: noreturn

sub_636C5B proc	near
mov	eax, [ebp-18h]
test	eax, eax
jz	short loc_636C6D
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8

loc_636C6D:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_636C5B endp

align 10h


; Attributes: bp-based frame

sub_636C80 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_130A100
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	esi, ecx
mov	eax, esi
call	sub_636E50
lea	ecx, [ebp+var_18]
push	ecx
mov	[ebp+var_18], eax
call	sub_631F40
mov	edx, [ebp+arg_0]
mov	ebx, eax
mov	[ebp+var_4], 0
mov	ecx, [esi]
push	ebx
push	edx
mov	[ebp+var_1C], ebx
mov	[ebp+var_14], ebx
call	sub_637350
mov	edi, [ebp+arg_4]
add	esp, 8
push	eax
mov	[ebp+var_14], eax
call	sub_637040
mov	edi, [ebp+var_14]
add	esp, 4
mov	eax, esi
add	edi, 20h
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_636EA0
mov	eax, [ebp+var_18]
shl	eax, 5
add	eax, ebx
mov	[esi], ebx
mov	[esi+4], edi
mov	[esi+8], eax
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_636C80 endp



; Attributes: noreturn

sub_636D25 proc	near
mov	esi, [ebp-1Ch]
mov	edi, [ebp-14h]
mov	eax, esi
call	sub_631EF0
test	esi, esi
jz	short loc_636D40
mov	eax, [ebp-18h]
mov	ecx, esi	; void *
call	sub_631C80

loc_636D40:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_636D25 endp

align 10h


; Attributes: bp-based frame

sub_636D50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_130B980
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	edi, ecx
mov	eax, edi
call	sub_63D860
lea	ecx, [ebp+var_14]
push	ecx
mov	ecx, eax
mov	[ebp+var_14], eax
call	sub_63D8C0
mov	[ebp+var_4], 0
mov	ebx, eax
mov	eax, [edi]
mov	byte ptr [ebp+var_18], 0
mov	edx, [ebp+var_18]
push	edx
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, ebx
mov	[ebp+var_1C], ebx
call	sub_636F60
mov	ecx, [ebp+arg_4]
mov	esi, eax
push	ecx		; int
push	esi		; void *
mov	[ebp+var_18], esi
call	sub_5C9FC0
add	esp, 10h
add	esi, 1Ch
cmp	byte ptr [ebp+arg_8], 0
jnz	short loc_636DE9
mov	eax, [ebp+arg_0]
mov	byte ptr [ebp+arg_8], 0
mov	edx, [ebp+arg_8]
push	edx
push	eax
mov	eax, [edi+4]
mov	ecx, esi
call	sub_636F60
add	esp, 8
mov	esi, eax

loc_636DE9:
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_636F00
mov	eax, [ebp+var_14]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	edx, [ebx+ecx*4]
mov	[edi], ebx
mov	[edi+4], esi
mov	[edi+8], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_636D50 endp



; Attributes: noreturn

sub_636E20 proc	near
mov	esi, [ebp-1Ch]
mov	edi, [ebp-18h]
mov	eax, esi
call	sub_631F10
test	esi, esi
jz	short loc_636E3B
mov	ecx, [ebp-14h]
mov	edx, esi
call	sub_63BD10

loc_636E3B:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_636E20 endp

align 10h



sub_636E50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	ecx, [eax+4]
sub	ecx, [eax]
mov	eax, 7FFFFFFh
sar	ecx, 5
sub	eax, ecx
mov	[esp+8+var_4], 1
mov	[esp+8+var_8], ecx
cmp	eax, 1
jnb	short loc_636E7C
push	offset aVector	; "vector"
call	sub_77EC70

loc_636E7C:
lea	eax, [esp+8+var_8]
cmp	ecx, 1
ja	short loc_636E88
lea	eax, [esp+8+var_4]

loc_636E88:
mov	eax, [eax]
add	eax, ecx
cmp	eax, 7FFFFFFh
ja	short loc_636E97
cmp	eax, ecx
jnb	short loc_636E9C

loc_636E97:
mov	eax, 7FFFFFFh

loc_636E9C:
add	esp, 8
retn
sub_636E50 endp




sub_636EA0 proc	near
push	esi
mov	esi, eax
push	edi
mov	ecx, esi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, esi
mov	edi, eax
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
push	ecx
mov	ecx, esp
mov	[ecx], edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
call	sub_631FF0
mov	eax, [esi]
add	esp, 8
test	eax, eax
jz	short loc_636EF5
mov	esi, [esi+8]
sub	esi, eax
sar	esi, 5
shl	esi, 5
cmp	esi, 80h
jbe	short loc_636EEB
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	edi
pop	esi
retn

loc_636EEB:
push	esi
push	eax
call	sub_77E0D0
add	esp, 8

loc_636EF5:
pop	edi
pop	esi
retn
sub_636EA0 endp

align 10h



sub_636F00 proc	near
push	esi
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, edi
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	esi, [edi]
test	esi, esi
jz	short loc_636F57
mov	ecx, [edi+8]
sub	ecx, esi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
lea	ecx, ds:0[eax*8]
sub	ecx, eax
add	ecx, ecx
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_636F4D
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi
retn

loc_636F4D:
push	ecx
push	esi
call	sub_77E0D0
add	esp, 8

loc_636F57:
pop	esi
retn
sub_636F00 endp

align 10h



sub_636F60 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
sub	eax, ebx
push	edi
mov	edi, ecx
mov	ecx, eax
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
test	esi, esi
jle	short loc_636FBF

loc_636F84:
push	edi
call	sub_5BC5D0
add	esp, 4
call	sub_5BC5D0
test	edi, edi
jz	short loc_636FB4
lea	eax, [esp+0Ch+arg_0]
push	ebx
push	eax
call	sub_459510
mov	ecx, [eax]
add	esp, 8
push	ecx
mov	ecx, edi
call	sub_456D40
mov	edx, [ebx+18h]
mov	[edi+18h], edx

loc_636FB4:
dec	esi
add	ebx, 1Ch
add	edi, 1Ch
test	esi, esi
jg	short loc_636F84

loc_636FBF:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn
sub_636F60 endp

align 10h



sub_636FD0 proc	near
mov	ecx, esi
sub	ecx, eax
sar	ecx, 4
test	ecx, ecx
jle	short loc_637001
mov	edx, [edi]
lea	ecx, [ecx+0]

loc_636FE0:
cmp	[eax], edx
jz	short locret_637031
add	eax, 4
cmp	[eax], edx
jz	short locret_637031
add	eax, 4
cmp	[eax], edx
jz	short locret_637031
add	eax, 4
cmp	[eax], edx
jz	short locret_637031
dec	ecx
add	eax, 4
test	ecx, ecx
jg	short loc_636FE0

loc_637001:
mov	ecx, esi
sub	ecx, eax
sar	ecx, 2
sub	ecx, 1
jz	short loc_637029
sub	ecx, 1
jz	short loc_637020
sub	ecx, 1
jnz	short loc_63702F
mov	ecx, [eax]
cmp	ecx, [edi]
jz	short locret_637031
add	eax, 4

loc_637020:
mov	edx, [eax]
cmp	edx, [edi]
jz	short locret_637031
add	eax, 4

loc_637029:
mov	ecx, [eax]
cmp	ecx, [edi]
jz	short locret_637031

loc_63702F:
mov	eax, esi

locret_637031:
retn
sub_636FD0 endp

align 10h



sub_637040 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13086D9
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, [esp+18h+arg_0]
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_4], 0
test	esi, esi
jz	short loc_637094
push	edi
mov	ecx, esi
call	sub_403850
mov	byte ptr [esp+18h+var_4], 1
mov	al, [edi+18h]
mov	[esi+18h], al
fld	dword ptr [edi+1Ch]
fstp	dword ptr [esi+1Ch]
mov	byte ptr [esp+18h+var_4], 0

loc_637094:
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_637040 endp

align 10h



sub_6370B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
sub	ebx, esi
sar	ebx, 5
push	edi
mov	edi, eax
test	ebx, ebx
jle	short loc_6370F0

loc_6370C4:
cmp	edi, esi
jz	short loc_6370E3
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
push	eax
push	ecx
mov	ecx, edi
call	sub_403980
mov	dl, [esi+18h]
mov	[edi+18h], dl
fld	dword ptr [esi+1Ch]
fstp	dword ptr [edi+1Ch]

loc_6370E3:
dec	ebx
add	esi, 20h
add	edi, 20h
test	ebx, ebx
jg	short loc_6370C4
mov	eax, edi

loc_6370F0:
pop	edi
pop	esi
pop	ebx
retn
sub_6370B0 endp

align 10h



sub_637100 proc	near

var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_130C108
mov	eax, large fs:0
push	eax
sub	esp, 30h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+50h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+50h+arg_0]
mov	eax, ecx
mov	ecx, [esp+50h+arg_8]
mov	[esp+50h+var_38], eax
mov	[esp+50h+var_34], ecx
cmp	ecx, [eax]
jb	short loc_637190
cmp	ecx, [eax+4]
jnb	short loc_637190
push	ecx
lea	ecx, [esp+54h+var_2C]
call	sub_5BEF40
mov	edx, [esp+50h+arg_4]
lea	eax, [esp+50h+var_39]
push	eax
lea	ecx, [esp+54h+var_2C]
push	ecx
mov	ecx, [esp+58h+var_38]
push	edx
mov	[esp+5Ch+var_4], 0
push	ebp
mov	[esp+60h+var_39], 0
call	sub_637100
lea	ecx, [esp+50h+var_2C]
mov	[esp+50h+var_4], 0FFFFFFFFh
call	sub_5887C0
jmp	short loc_637202

loc_637190:
mov	esi, [eax+4]
mov	eax, [esp+50h+arg_4]
lea	ebx, ds:0[eax*8]
sub	ebx, eax
add	ebx, ebx
sub	esi, 1Ch
add	ebx, ebx
lea	edi, [ebx+esi]
cmp	esi, ebp
jb	short loc_6371EE
mov	edi, edi

loc_6371B0:
push	edi
call	sub_5BC5D0
add	esp, 4
call	sub_5BC5D0
test	edi, edi
jz	short loc_6371E0
lea	eax, [esp+50h+var_30]
push	esi
push	eax
call	sub_459510
mov	ecx, [eax]
add	esp, 8
push	ecx
mov	ecx, edi
call	sub_456D40
mov	edx, [esi+18h]
mov	[edi+18h], edx

loc_6371E0:
sub	esi, 1Ch
sub	edi, 1Ch
cmp	esi, ebp
jnb	short loc_6371B0
mov	ecx, [esp+50h+var_34]

loc_6371EE:
push	ecx
lea	ecx, [ebx+ebp]
push	ebp
call	sub_637230
mov	eax, [esp+58h+var_38]
add	esp, 8
add	[eax+4], ebx

loc_637202:
mov	ecx, [esp+50h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn	10h
sub_637100 endp

align 10h


; Attributes: bp-based frame

sub_637230 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_130B961
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	edi, [ebp+arg_0]
xor	ebx, ebx
mov	[ebp+var_4], ebx
sub	ecx, edi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	esi, edx
shr	esi, 1Fh
add	esi, edx

loc_637278:
mov	[ebp+var_18], esi
mov	[ebp+var_14], edi
cmp	esi, ebx
jle	short loc_6372AF
push	edi
call	sub_5BC5D0
add	esp, 4
call	sub_5BC5D0
mov	[ebp+var_1C], edi
mov	byte ptr [ebp+var_4], 1
cmp	edi, ebx
jz	short loc_6372A6
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, edi
call	sub_5BEF40

loc_6372A6:
mov	byte ptr [ebp+var_4], bl
dec	esi
add	edi, 1Ch
jmp	short loc_637278

loc_6372AF:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_637230 endp



; Attributes: noreturn

sub_6372C8 proc	near
mov	edi, [ebp-14h]
mov	eax, [ebp+8]
call	sub_631F10
xor	ebx, ebx
push	ebx
push	ebx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_6372C8 endp

align 10h



sub_6372E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+4]
push	edi
mov	edi, ebx
test	esi, esi
jz	short loc_637340
push	ebp
lea	ebp, [ebx+14h]

loc_6372F4:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+10h]
push	ecx
mov	ecx, ebp
call	sub_4444F0
test	al, al
jnz	short loc_63730F
mov	edi, esi
mov	esi, [esi+8]
jmp	short loc_637312

loc_63730F:
mov	esi, [esi+0Ch]

loc_637312:
test	esi, esi
jnz	short loc_6372F4
cmp	edi, ebx
jz	short loc_637337
mov	eax, [esp+10h+arg_4]
lea	edx, [edi+10h]
push	edx
push	eax
mov	ecx, ebp
call	sub_4444F0
test	al, al
jz	short loc_637337
pop	ebp
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_637337:
pop	ebp
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8

loc_637340:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_6372E0 endp

align 10h


; Attributes: bp-based frame

sub_637350 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset __ehhandler$?CallUnexpected@@YAXPBU_s_ESTypeList@@@Z_49
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	edi, ecx
mov	ebx, [ebp+arg_4]
sub	eax, edi
sar	eax, 5
mov	[ebp+var_4], 0
mov	esi, eax

loc_63738F:
mov	[ebp+arg_0], ebx
test	esi, esi
jle	short loc_6373BC
push	ebx
call	sub_637040
add	esp, 4
add	edi, 20h
add	ebx, 20h
dec	esi
jmp	short loc_63738F

loc_6373A8:
mov	edi, [ebp+arg_0]
mov	eax, [ebp+arg_4]
call	sub_631EF0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_6373BC:
mov	eax, ebx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_637350 endp




; int __thiscall sub_6373D0(void *, char)
sub_6373D0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FB2B0
jz	short loc_6373E9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6373E9:
mov	eax, esi
pop	esi
retn	4
sub_6373D0 endp

align 10h



sub_6373F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+4], 1
jnz	short loc_637438
push	ebx
mov	ebx, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]

loc_637403:
mov	eax, [esi]
mov	edx, [eax+14h]
push	ebx
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_637427
mov	al, bl
add	al, al
xor	al, [esi+4]
and	al, 2
xor	al, [esi+4]
or	al, 1
mov	[esi+4], al
test	al, 1
jz	short loc_637403

loc_637427:
test	byte ptr [esi+4], 1
pop	edi
pop	ebx
jnz	short loc_637438
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax

loc_637438:
mov	al, [esi+4]
and	al, 1
pop	esi
retn	8
sub_6373F0 endp

align 10h



sub_637450 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+18h]
call	edx
and	byte ptr [esi+4], 0FEh
pop	esi
retn
sub_637450 endp




sub_637460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	al, [ecx+4]
test	al, 1
jnz	short loc_63746C

loc_637467:
xor	al, al
retn	8

loc_63746C:
mov	edx, [esp+arg_4]
test	edx, edx
jnz	short loc_637479
mov	al, 1
retn	8

loc_637479:
test	al, 2
jnz	short loc_637467
mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_637467
push	esi
mov	esi, [ecx]
push	edx
push	eax
mov	eax, [esi+1Ch]
call	eax
test	al, al
setnz	al
pop	esi
retn	8
sub_637460 endp

align 10h



sub_6374A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	al, [ecx+4]
test	al, 1
jnz	short loc_6374AC

loc_6374A7:
xor	al, al
retn	8

loc_6374AC:
mov	edx, [esp+arg_4]
test	edx, edx
jnz	short loc_6374B9
mov	al, 1
retn	8

loc_6374B9:
test	al, 2
jz	short loc_6374A7
mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_6374A7
push	esi
mov	esi, [ecx]
push	edx
push	eax
mov	eax, [esi+20h]
call	eax
test	al, al
setnz	al
pop	esi
retn	8
sub_6374A0 endp

align 10h



sub_6374E0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

add	ecx, 8
cmp	[esp+arg_4], 1
jnz	short loc_637509
mov	eax, [esp+arg_0]
mov	eax, [eax+14h]
push	offset aWb	; "wb"
push	eax		; Filename
push	ecx		; File
call	_fopen_s
add	esp, 0Ch
test	eax, eax
jz	short loc_637528
xor	al, al
retn	8

loc_637509:
mov	edx, [esp+arg_0]
mov	eax, [edx+14h]
push	offset Mode	; "rb"
push	eax		; Filename
push	ecx		; File
call	_fopen_s
add	esp, 0Ch
test	eax, eax
jz	short loc_637528
xor	al, al
retn	8

loc_637528:
mov	al, 1
retn	8
sub_6374E0 endp

align 10h



sub_637530 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+8]
test	eax, eax
jz	short loc_63754A
push	eax		; FILE *
call	_fclose
add	esp, 4
mov	dword ptr [esi+8], 0

loc_63754A:
pop	esi
retn
sub_637530 endp

align 10h



; int __stdcall	sub_637550(void	*, size_t)
sub_637550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	eax		; FILE *
push	1		; size_t
push	ecx		; size_t
push	edx		; void *
call	_fread
add	esp, 10h
cmp	eax, 1
setz	al
retn	8
sub_637550 endp

align 10h



; int __stdcall	sub_637580(void	*, size_t)
sub_637580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	ecx, [esp+4+arg_4]
push	eax		; FILE *
push	1		; size_t
push	ecx		; size_t
push	edx		; void *
call	_fwrite
add	esp, 10h
cmp	eax, 1
jz	short loc_6375A6
xor	al, al
pop	esi
retn	8

loc_6375A6:
mov	eax, [esi+8]
push	eax		; FILE *
call	_fflush
add	esp, 4
test	eax, eax
setz	al
pop	esi
retn	8
sub_637580 endp

align 10h



; int __thiscall sub_6375C0(void *, char)
sub_6375C0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FB2D4
mov	dword ptr [esi+4], offset off_15FB0F8
jz	short loc_6375E0
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6375E0:
mov	eax, esi
pop	esi
retn	4
sub_6375C0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1303500

loc_6375F0:
mov	dword ptr [ecx], offset	off_15FB2D4
mov	dword ptr [ecx+4], offset off_15FB0F8
retn
; END OF FUNCTION CHUNK	FOR sub_1303500
align 10h



sub_637600 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

xorps	xmm0, xmm0
comiss	xmm0, [esp+arg_0]
push	esi
mov	esi, ecx
jbe	short loc_637613
xor	al, al
pop	esi
retn	4

loc_637613:
push	edi
mov	edi, 80h
lea	esp, [esp+0]

loc_637620:
mov	ecx, [esi+18h]
fld	[esp+8+arg_0]
mov	eax, [esi+1Ch]
dec	edi
push	ecx
fstp	[esp+0Ch+var_C]
test	eax, eax
jz	short loc_637658
mov	[esi+18h], eax
mov	dword ptr [esi+1Ch], 0
mov	eax, [ecx]
mov	edx, [eax+0Ch]
call	edx
fld	[esp+8+arg_0]
mov	ecx, [esi+18h]
mov	eax, [ecx]
mov	edx, [eax+4]
push	ecx
fstp	[esp+0Ch+var_C]
call	edx
jmp	short loc_637665

loc_637658:
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	dword ptr [esi+1Ch], 0
jz	short loc_637669

loc_637665:
test	edi, edi
jg	short loc_637620

loc_637669:
pop	edi
mov	al, 1
pop	esi
retn	4
sub_637600 endp




; int __stdcall	sub_637670(float)
sub_637670 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, ecx
push	ecx
mov	ecx, [eax+4]
fstp	[esp+4+var_4]
mov	eax, [eax+8]
call	eax
retn	4
sub_637670 endp

align 10h



; int __stdcall	sub_637690(float)
sub_637690 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, ecx
push	ecx
mov	ecx, [eax+4]
fstp	[esp+4+var_4]
mov	eax, [eax+0Ch]
call	eax
retn	4
sub_637690 endp

align 10h



; int __stdcall	sub_6376B0(float)
sub_6376B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, ecx
push	ecx
mov	ecx, [eax+4]
fstp	[esp+4+var_4]
mov	eax, [eax+10h]
call	eax
retn	4
sub_6376B0 endp

align 10h



sub_6376D0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+10h]
sub_6376D0 endp

align 10h



sub_6376E0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+8]
sub_6376E0 endp

align 10h



sub_6376F0 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+0Ch]
sub_6376F0 endp

align 10h



sub_637700 proc	near

arg_4= dword ptr  8
arg_10=	dword ptr  14h

cmp	[esp+arg_4], 4
jnz	short loc_637710
mov	eax, [esp+arg_10]
call	sub_638580

loc_637710:
xor	eax, eax
retn	14h
sub_637700 endp

align 10h


; Attributes: bp-based frame

sub_637720 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	ebx
push	esi
push	edi
mov	dword ptr [eax+4], offset off_15FB2E8
xor	edx, edx
mov	[eax+1Ch], edx
lea	ecx, [eax+4]
mov	[eax+18h], ecx
mov	[ecx+4], eax
mov	dword ptr [ecx+8], offset sub_6376E0
mov	dword ptr [ecx+0Ch], offset sub_6376F0
mov	dword ptr [ecx+10h], offset sub_6376D0
mov	cl, [eax+20h]
mov	dword ptr [eax], offset	off_15FB2F8
mov	[eax+24h], edx
and	cl, 0FEh
or	cl, 2
mov	[eax+20h], cl
mov	[eax+2Ch], edx
mov	[eax+30h], edx
mov	[eax+38h], edx
mov	[eax+40h], edx
mov	ecx, offset off_15FB398
mov	[eax+28h], ecx
xor	esi, esi
mov	[eax+34h], esi
mov	[eax+3Ch], esi
mov	[eax+44h], esi
mov	[eax+48h], ecx
mov	[eax+4Ch], edx
mov	[eax+50h], edx
mov	[eax+54h], esi
mov	[eax+58h], edx
mov	[eax+5Ch], esi
mov	[eax+60h], edx
mov	[eax+64h], esi
mov	[eax+68h], ecx
mov	[eax+6Ch], edx
mov	[eax+70h], edx
mov	[eax+74h], esi
mov	[eax+78h], edx
mov	[eax+7Ch], esi
mov	[eax+80h], edx
mov	[eax+84h], esi
mov	[eax+88h], ecx
mov	[eax+8Ch], edx
mov	[eax+90h], edx
mov	[eax+94h], esi
mov	[eax+98h], edx
mov	[eax+9Ch], esi
mov	[eax+0A0h], edx
mov	[eax+0A4h], esi
mov	[eax+0A8h], ecx
xor	ecx, ecx
mov	[eax+0B0h], ecx
mov	[eax+0B8h], ecx
mov	[eax+0C0h], ecx
mov	[eax+0ACh], edx
mov	[eax+0B4h], edx
mov	[eax+0BCh], edx
mov	[eax+0C4h], edx
lea	ecx, [eax+0E0h]
mov	[eax+0C8h], edx
mov	[eax+0D0h], edx
mov	[eax+0D4h], edx
mov	[eax+0D8h], edx
mov	[eax+0DCh], edx
mov	dword ptr [ecx], offset	off_15FAE00
cmp	ecx, offset off_17F1A28
jz	short loc_637879
movss	xmm0, dword_17F1A2C
movss	dword ptr [ecx+4], xmm0
movss	xmm0, dword_17F1A30
movss	dword ptr [ecx+8], xmm0
movss	xmm0, dword_17F1A34
movss	dword ptr [ecx+0Ch], xmm0

loc_637879:
lea	ecx, [eax+0F0h]
mov	dword ptr [ecx], offset	off_15FAE00
cmp	ecx, offset off_17F1A58
jz	short loc_6378B4
movss	xmm0, dword_17F1A5C
movss	dword ptr [ecx+4], xmm0
movss	xmm0, dword_17F1A60
movss	dword ptr [ecx+8], xmm0
movss	xmm0, dword_17F1A64
movss	dword ptr [ecx+0Ch], xmm0

loc_6378B4:
lea	ecx, [eax+100h]
mov	dword ptr [ecx], offset	off_15FAE00
cmp	ecx, offset off_17F1A38
jz	short loc_6378EF
movss	xmm0, dword_17F1A3C
movss	dword ptr [ecx+4], xmm0
movss	xmm0, dword_17F1A40
movss	dword ptr [ecx+8], xmm0
movss	xmm0, dword_17F1A44
movss	dword ptr [ecx+0Ch], xmm0

loc_6378EF:
mov	[eax+110h], dl
mov	[eax+114h], edx
mov	[eax+118h], edx
mov	[eax+11Ch], edx
mov	[eax+44h], edx
mov	[eax+2Ch], eax
xor	edi, edi
mov	[eax+3Ch], edi
mov	ebx, offset sub_5CD310
mov	[eax+30h], ebx
xor	ebx, ebx
mov	[eax+34h], ebx
mov	ecx, offset sub_633BC0
mov	[eax+40h], ecx
mov	esi, offset sub_638770
mov	[eax+38h], esi
mov	[eax+4Ch], eax
mov	edi, offset sub_5CD330
mov	[eax+58h], edi
xor	edi, edi
mov	[eax+5Ch], edi
xor	esi, esi
mov	[eax+64h], esi
mov	ebx, offset sub_633BD0
mov	[eax+50h], ebx
xor	ebx, ebx
mov	[eax+54h], ebx
mov	ecx, offset sub_633BF0
mov	[eax+60h], ecx
mov	[eax+84h], esi
mov	[eax+6Ch], eax
mov	edi, offset sub_633BE0
mov	[eax+78h], edi
xor	edi, edi
mov	[eax+7Ch], edi
mov	ebx, offset sub_638720
mov	[eax+70h], ebx
xor	ebx, ebx
mov	[eax+74h], ebx
mov	ecx, offset sub_638750
mov	[eax+80h], ecx
mov	edi, offset sub_638730
mov	[eax+98h], edi
xor	edi, edi
mov	[eax+9Ch], edi
mov	[eax+0A4h], esi
mov	[eax+8Ch], eax
mov	ebx, offset sub_633C00
mov	[eax+90h], ebx
xor	ebx, ebx
mov	[eax+94h], ebx
mov	ecx, offset sub_638740
mov	[eax+0A0h], ecx
mov	edi, offset sub_638780
mov	[eax+0B8h], edi
pop	edi
mov	ebx, offset sub_638760
mov	[eax+0B4h], edx
mov	[eax+0C4h], esi
mov	ecx, offset sub_5CD260
xor	edx, edx
pop	esi
mov	[eax+0B0h], ebx
mov	[eax+0ACh], eax
mov	[eax+0BCh], edx
mov	[eax+0C0h], ecx
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_637720 endp

align 10h



; int __thiscall sub_637A10(void *, char)
sub_637A10 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
mov	eax, offset off_15FAE00
push	esi
mov	esi, ecx
mov	[esi+100h], eax
mov	[esi+0F0h], eax
mov	[esi+0E0h], eax
mov	eax, offset off_15FB0F8
mov	[esi+0A8h], eax
mov	[esi+88h], eax
mov	[esi+68h], eax
mov	[esi+48h], eax
mov	[esi+28h], eax
mov	dword ptr [esi], offset	off_15FB2D4
mov	[esi+4], eax
jz	short loc_637A5D
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_637A5D:
mov	eax, esi
pop	esi
retn	4
sub_637A10 endp

align 10h



sub_637A70 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, ecx
test	byte ptr [esi+20h], 1
jnz	loc_637B5F
push	ebx
mov	ebx, [esp+8+arg_18]
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	edi
mov	edi, [esp+10h+arg_0]
lea	esp, [esp+0]

loc_637A90:
test	edi, edi
jz	loc_637B4D
test	ebp, ebp
jz	loc_637B4D
test	byte ptr [edi+0B0h], 1
jz	loc_637B4D
mov	eax, [esi+0E0h]
mov	edx, [eax+4]
lea	ecx, [esi+0E0h]
push	offset off_17F1A28
mov	[esi+114h], edi
mov	[esi+24h], ebp
call	edx
mov	eax, [esi+0F0h]
mov	edx, [eax+4]
lea	ecx, [esi+0F0h]
push	offset off_17F1A58
call	edx
mov	eax, [esi+100h]
mov	edx, [eax+4]
lea	ecx, [esi+100h]
push	offset off_17F1A38
call	edx
fldz
mov	edx, [esi]
lea	eax, [esi+4]
push	ecx
mov	[esi+1Ch], eax
fstp	[esp+14h+var_14]
mov	eax, [edx+60h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_637B4D
mov	ecx, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_C]
mov	eax, [esp+10h+arg_10]
or	byte ptr [esi+20h], 1
mov	[esi+0C8h], ecx
mov	ecx, [esp+10h+arg_14]
mov	[esi+0D0h], edx
mov	[esi+0D4h], eax
mov	[esi+0D8h], ecx
mov	[esi+0DCh], ebx
test	byte ptr [esi+20h], 1
jz	loc_637A90

loc_637B4D:
test	byte ptr [esi+20h], 1
pop	edi
pop	ebp
pop	ebx
jnz	short loc_637B5F
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax

loc_637B5F:
mov	al, [esi+20h]
and	al, 1
pop	esi
retn	1Ch
sub_637A70 endp

align 10h



sub_637B70 proc	near

var_14=	dword ptr -14h

push	ebx
push	esi
mov	esi, ecx
and	byte ptr [esi+20h], 0FDh
push	edi
lea	edi, [esi+28h]
mov	[esi+118h], edi
mov	ebx, 80h
cmp	[esi+18h], edi
jz	short loc_637BB6
push	ebp
mov	ebp, ds:Sleep

loc_637B93:
test	ebx, ebx
jle	short loc_637BB5
mov	eax, [esi]
fldz
mov	edx, [eax+60h]
push	ecx
mov	ecx, esi
fstp	[esp+14h+var_14]
dec	ebx
call	edx
cmp	[esi+18h], edi
jz	short loc_637BB5
push	10h		; dwMilliseconds
call	ebp ; Sleep
cmp	[esi+18h], edi
jnz	short loc_637B93

loc_637BB5:
pop	ebp

loc_637BB6:
and	byte ptr [esi+20h], 0FEh
pop	edi
pop	esi
pop	ebx
retn
sub_637B70 endp

align 10h



sub_637BC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

test	byte ptr [ecx+20h], 1
jnz	short loc_637BCB

loc_637BC6:
xor	al, al
retn	4

loc_637BCB:
xorps	xmm0, xmm0
comiss	xmm0, [esp+arg_0]
ja	short loc_637BC6
mov	eax, [ecx]
fld	[esp+arg_0]
mov	edx, [eax+60h]
push	ecx
fstp	[esp+4+var_4]
call	edx
test	al, al
setnz	al
retn	4
sub_637BC0 endp

align 10h



sub_637BF0 proc	near
mov	al, [ecx+20h]
test	al, 1
jnz	short loc_637BFA
xor	al, al
retn

loc_637BFA:
or	al, 2
mov	[ecx+20h], al
lea	eax, [ecx+68h]
mov	[ecx+118h], eax
mov	al, 1
retn
sub_637BF0 endp

align 10h



sub_637C10 proc	near

arg_0= byte ptr	 4

mov	al, [ecx+20h]
test	al, 1
jnz	short loc_637C1C
xor	al, al
retn	4

loc_637C1C:
mov	dl, [esp+arg_0]
add	dl, dl
xor	dl, al
and	dl, 2
xor	dl, al
lea	eax, [ecx+28h]
mov	[ecx+20h], dl
mov	edx, [ecx+118h]
mov	[ecx+118h], eax
cmp	[ecx+18h], eax
jnz	short loc_637C52
lea	eax, [ecx+68h]
cmp	edx, eax
jnz	short loc_637C52
push	esi
push	3
mov	esi, ecx
call	sub_6385E0
pop	esi

loc_637C52:
mov	al, 1
retn	4
sub_637C10 endp

align 10h



sub_637C60 proc	near
mov	al, 1
test	[ecx+20h], al
jnz	short loc_637C6A
xor	al, al
retn

loc_637C6A:
mov	dword ptr [ecx+0C8h], 0
retn
sub_637C60 endp

align 10h



sub_637C80 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+20h], 1
jnz	short loc_637C8B
xor	al, al
retn	4

loc_637C8B:
mov	edx, [esp+arg_0]
push	esi
mov	byte ptr [edx],	0
mov	eax, [ecx+18h]
lea	esi, [ecx+68h]
cmp	eax, esi
jz	short loc_637CAD
lea	esi, [ecx+88h]
cmp	eax, esi
jz	short loc_637CAD
mov	al, 1
pop	esi
retn	4

loc_637CAD:
mov	eax, [ecx]
push	edx
mov	edx, [eax+54h]
call	edx
test	al, al
setnz	al
pop	esi
retn	4
sub_637C80 endp

align 10h



sub_637CC0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+20h], 1
jnz	short loc_637CCF
xor	al, al
pop	esi
retn	4

loc_637CCF:
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	edx, [eax+34h]
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_637CE6
pop	edi
pop	esi
retn	4

loc_637CE6:
mov	eax, [esi+0E0h]
mov	edx, [eax+4]
lea	ecx, [esi+0E0h]
push	edi
call	edx
pop	edi
mov	al, 1
pop	esi
retn	4
sub_637CC0 endp

align 10h



sub_637D00 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
test	byte ptr [edi+20h], 1
jnz	short loc_637D0F
xor	al, al
pop	edi
retn	4

loc_637D0F:
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi]
mov	edx, [eax+34h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_637D2E
mov	eax, [esi]
mov	edx, [eax+4Ch]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_637D35

loc_637D2E:
pop	esi
xor	al, al
pop	edi
retn	4

loc_637D35:
mov	eax, [edi+0F0h]
mov	edx, [eax+4]
lea	ecx, [edi+0F0h]
push	esi
call	edx
pop	esi
mov	al, 1
pop	edi
retn	4
sub_637D00 endp

align 10h



sub_637D50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+20h], 1
jnz	short loc_637D5F
xor	al, al
pop	esi
retn	4

loc_637D5F:
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	edx, [eax+34h]
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_637D76
pop	edi
pop	esi
retn	4

loc_637D76:
mov	eax, [esi+100h]
mov	edx, [eax+4]
lea	ecx, [esi+100h]
push	edi
call	edx
pop	edi
mov	al, 1
pop	esi
retn	4
sub_637D50 endp

align 10h



; int __stdcall	sub_637D90(int,	float)
sub_637D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+20h], 1
jnz	short loc_637D9B
xor	al, al
retn	8

loc_637D9B:
mov	eax, [ecx]
fld	[esp+arg_4]
mov	edx, [esp+arg_0]
mov	eax, [eax+58h]
push	ecx
fstp	[esp+4+var_4]
push	edx
call	eax
test	al, al
setnz	al
retn	8
sub_637D90 endp

align 10h



sub_637DC0 proc	near
mov	al, 1
test	[ecx+20h], al
jnz	short loc_637DCA
xor	al, al
retn

loc_637DCA:
mov	[ecx+110h], al
retn
sub_637DC0 endp

align 10h



sub_637DE0 proc	near
mov	al, 1
test	[ecx+20h], al
jnz	short loc_637DEA
xor	al, al
retn

loc_637DEA:
mov	byte ptr [ecx+110h], 0
retn
sub_637DE0 endp

align 10h



sub_637E00 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+20h], 1
jnz	short loc_637E0B
xor	al, al
retn	4

loc_637E0B:
mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+34h]
push	edx
call	eax
test	al, al
setnz	al
retn	4
sub_637E00 endp

align 10h


; Attributes: bp-based frame

sub_637E30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
Dst= byte ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
push	esi
mov	esi, ecx
mov	ecx, [esi+114h]
mov	eax, [ecx]
mov	edx, [eax+40h]
push	edi
call	edx
mov	ecx, [eax+4]
mov	[esp+20h+var_14], ecx
mov	dx, [eax+8]
mov	[esp+20h+var_10], dx
mov	cx, [eax+0Ah]
push	8		; MaxCount
add	eax, 0Ch
push	eax		; Src
lea	edx, [esp+28h+Dst]
push	8		; DstSize
push	edx		; Dst
mov	[esp+30h+var_E], cx
call	_memcpy_s
mov	eax, dword_18899F4
mov	eax, [eax+8]
add	esp, 10h
lea	edi, [esi+11Ch]
push	edi
push	0
lea	ecx, [esp+28h+var_14]
push	ecx
push	eax
call	?getEventByGUID@EventSystem@FMOD@@QAG?AW4FMOD_RESULT@@PBUFMOD_GUID@@IPAPAVEvent@2@@Z ; FMOD::EventSystem::getEventByGUID(FMOD_GUID const *,uint,FMOD::Event * *)
test	eax, eax
jz	short loc_637EC2
xor	edx, edx
cmp	eax, 55h
setnz	dl
dec	edx
and	edx, 2
mov	eax, edx
pop	edi
pop	esi
mov	ecx, [esp+18h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_637EC2:
mov	eax, [edi]
push	esi
push	offset sub_637700
push	eax
call	?setCallback@Event@FMOD@@QAG?AW4FMOD_RESULT@@P6G?AW43@PAUFMOD_EVENT@@W4FMOD_EVENT_CALLBACKTYPE@@PAX22@Z2@Z ; FMOD::Event::setCallback(FMOD_RESULT (*)(FMOD_EVENT *,FMOD_EVENT_CALLBACKTYPE,void	*,void *,void *),void *)
test	eax, eax
jz	short loc_637EE7

loc_637ED4:
xor	eax, eax
pop	edi
pop	esi
mov	ecx, [esp+18h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_637EE7:
mov	ecx, [edi]
push	ecx
call	?start@Event@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::Event::start(void)
cmp	eax, 2Ch
jnz	short loc_637F20
mov	ecx, dword_18899F4
mov	edx, [ecx]
mov	edx, [edx+0C8h]
lea	eax, [esp+20h+var_18]
push	eax
mov	[esp+24h+var_18], 0
call	edx
cmp	[esp+20h+var_18], 0
jbe	short loc_637ED4
mov	eax, [edi]
push	eax
call	?start@Event@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::Event::start(void)

loc_637F20:
test	eax, eax
jnz	short loc_637ED4
mov	ecx, [esp+20h+var_4]
pop	edi
pop	esi
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_637E30 endp

align 10h



sub_637F40 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 4

push	ecx
mov	al, 1
mov	byte ptr [esp+4+var_4],	al
cmp	[esp+4+arg_0], al
jnz	short loc_637F56
test	byte ptr [ecx+20h], 2
jz	short loc_637F56
mov	byte ptr [esp+4+var_4],	0

loc_637F56:
mov	eax, [esp+4+var_4]
mov	ecx, [ecx+11Ch]
push	eax
push	ecx
call	?stop@Event@FMOD@@QAG?AW4FMOD_RESULT@@_N@Z ; FMOD::Event::stop(bool)
xor	al, al
pop	ecx
retn	4
sub_637F40 endp

align 10h



sub_637F70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	ecx, [ecx+11Ch]
lea	eax, [esp+4+var_4]
push	eax
push	ecx
mov	[esp+0Ch+var_4], 0
call	?getState@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAI@Z	; FMOD::Event::getState(uint *)
test	eax, eax
jz	short loc_637F93
xor	al, al
pop	ecx
retn	4

loc_637F93:
mov	dl, byte ptr [esp+4+var_4]
mov	eax, [esp+4+arg_0]
shr	dl, 3
and	dl, 1
mov	[eax], dl
mov	al, 1
pop	ecx
retn	4
sub_637F70 endp

align 10h



sub_637FB0 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_28=	dword ptr -28h
var_10=	dword ptr -10h
arg_0= dword ptr  4

sub	esp, 44h
push	ebx
push	ebp
mov	ebp, [esp+4Ch+arg_0]
push	esi
xor	ebx, ebx
push	edi
mov	edi, ecx
mov	[ebp+0], bl
mov	esi, [edi+11Ch]
cmp	esi, ebx
jz	loc_6380FA
push	34h		; size_t
lea	eax, [esp+58h+var_34]
push	ebx		; int
push	eax		; void *
call	_memset
add	esp, 0Ch
lea	ecx, [esp+54h+var_34]
push	ecx
push	ebx
push	ebx
push	esi
call	?getInfo@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAHPAPADPAUFMOD_EVENT_INFO@@@Z	; FMOD::Event::getInfo(int *,char * *,FMOD_EVENT_INFO *)
test	eax, eax
jz	short loc_637FFD

loc_637FF1:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 44h
retn	4

loc_637FFD:
cmp	[esp+54h+var_28], ebx
jz	loc_6380FA
xorps	xmm0, xmm0
comiss	xmm0, [esp+54h+var_10]
ja	loc_6380FA
fldz
sub	esp, 8
fstp	[esp+5Ch+var_58]
fld	[esp+5Ch+var_10]
fstp	[esp+5Ch+var_5C]
call	sub_632C80
add	esp, 8
cmp	al, 1
jz	loc_6380FA
mov	eax, [edi+11Ch]
lea	edx, [esp+54h+arg_0]
push	edx
push	eax
mov	byte ptr [esp+5Ch+arg_0], bl
call	?getMute@Event@FMOD@@QAG?AW4FMOD_RESULT@@PA_N@Z	; FMOD::Event::getMute(bool *)
test	eax, eax
jnz	short loc_637FF1
cmp	byte ptr [esp+54h+arg_0], 1
jz	loc_6380FA
mov	edx, [edi+11Ch]
lea	ecx, [esp+54h+var_3C]
push	ecx
push	edx
mov	[esp+5Ch+var_3C], ebx
call	?getChannelGroup@Event@FMOD@@QAG?AW4FMOD_RESULT@@PAPAVChannelGroup@2@@Z	; FMOD::Event::getChannelGroup(FMOD::ChannelGroup * *)
test	eax, eax
jnz	loc_637FF1
mov	ecx, [esp+54h+var_3C]
lea	eax, [esp+54h+var_40]
push	eax
push	ecx
mov	[esp+5Ch+var_40], ebx
call	?getNumChannels@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@PAH@Z ; FMOD::ChannelGroup::getNumChannels(int *)
test	eax, eax
jnz	loc_637FF1
xor	esi, esi
cmp	[esp+54h+var_40], ebx
jle	short loc_6380FA
lea	esp, [esp+0]

loc_6380A0:
mov	eax, [esp+54h+var_3C]
lea	edx, [esp+54h+var_38]
push	edx
push	esi
push	eax
mov	[esp+60h+var_38], ebx
call	?getChannel@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@HPAPAVChannel@2@@Z ;	FMOD::ChannelGroup::getChannel(int,FMOD::Channel * *)
test	eax, eax
jnz	loc_637FF1
mov	edx, [esp+54h+var_38]
lea	ecx, [esp+54h+var_41]
push	ecx
push	edx
mov	[esp+5Ch+var_41], bl
call	?isVirtual@Channel@FMOD@@QAG?AW4FMOD_RESULT@@PA_N@Z ; FMOD::Channel::isVirtual(bool *)
test	eax, eax
jnz	loc_637FF1
cmp	[esp+54h+var_41], bl
jz	short loc_6380F0
inc	esi
cmp	esi, [esp+54h+var_40]
jl	short loc_6380A0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_6380F0:
cmp	esi, [esp+54h+var_40]
jge	short loc_6380FA
mov	byte ptr [ebp+0], 1

loc_6380FA:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 44h
retn	4
sub_637FB0 endp

align 10h



; int __stdcall	sub_638110(int,	float)
sub_638110 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_0]
mov	eax, [eax+14h]
lea	edx, [esp+4+var_4]
push	edx
push	eax
mov	eax, [ecx+11Ch]
push	eax
mov	[esp+10h+var_4], 0
call	?getParameter@Event@FMOD@@QAG?AW4FMOD_RESULT@@PBDPAPAVEventParameter@2@@Z ; FMOD::Event::getParameter(char const *,FMOD::EventParameter	* *)
test	eax, eax
jnz	short loc_63813C
mov	eax, [esp+4+var_4]
test	eax, eax
jnz	short loc_638142

loc_63813C:
mov	al, 1
pop	ecx
retn	8

loc_638142:
fld	[esp+4+arg_4]
push	ecx
fstp	[esp+8+var_8]
push	eax
call	?setValue@EventParameter@FMOD@@QAG?AW4FMOD_RESULT@@M@Z ; FMOD::EventParameter::setValue(float)
test	eax, eax
setz	al
pop	ecx
retn	8
sub_638110 endp

align 10h



sub_638160 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 30h
push	esi
push	0
lea	eax, [esp+38h+var_2C]
push	eax
mov	esi, ecx
mov	ecx, [esi+11Ch]
push	0Eh
push	ecx
mov	[esp+44h+var_2C], 0
call	?getPropertyByIndex@Event@FMOD@@QAG?AW4FMOD_RESULT@@HPAX_N@Z ; FMOD::Event::getPropertyByIndex(int,void	*,bool)
test	eax, eax
jz	short loc_63818E

loc_638187:
xor	al, al
pop	esi
add	esp, 30h
retn

loc_63818E:
test	byte ptr [esp+34h+var_2C], 10h
jz	loc_63823A
movss	xmm0, dword ptr	[esi+0E4h]
movss	[esp+34h+var_C], xmm0
movss	xmm0, dword ptr	[esi+0E8h]
movss	[esp+34h+var_8], xmm0
movss	xmm0, dword ptr	[esi+0ECh]
movss	[esp+34h+var_4], xmm0
movss	xmm0, dword ptr	[esi+0F4h]
movss	[esp+34h+var_24], xmm0
movss	xmm0, dword ptr	[esi+0F8h]
movss	[esp+34h+var_20], xmm0
movss	xmm0, dword ptr	[esi+0FCh]
lea	edx, [esp+34h+var_24]
push	edx
mov	edx, [esi+11Ch]
movss	[esp+38h+var_1C], xmm0
movss	xmm0, dword ptr	[esi+104h]
lea	eax, [esp+38h+var_18]
push	eax
movss	[esp+3Ch+var_18], xmm0
movss	xmm0, dword ptr	[esi+108h]
lea	ecx, [esp+3Ch+var_C]
push	ecx
movss	[esp+40h+var_14], xmm0
movss	xmm0, dword ptr	[esi+10Ch]
push	edx
movss	[esp+44h+var_10], xmm0
call	?set3DAttributes@Event@FMOD@@QAG?AW4FMOD_RESULT@@PBUFMOD_VECTOR@@00@Z ;	FMOD::Event::set3DAttributes(FMOD_VECTOR const *,FMOD_VECTOR const *,FMOD_VECTOR const *)
test	eax, eax
jnz	loc_638187

loc_63823A:
mov	ecx, [esi+11Ch]
lea	eax, [esp+34h+var_30+3]
push	eax
push	ecx
mov	byte ptr [esp+3Ch+var_30+3], 0
call	?getMute@Event@FMOD@@QAG?AW4FMOD_RESULT@@PA_N@Z	; FMOD::Event::getMute(bool *)
test	eax, eax
jnz	loc_638187
mov	al, [esi+110h]
mov	byte ptr [esp+34h+var_28], al
cmp	byte ptr [esp+34h+var_30+3], al
jz	short loc_638281
mov	edx, [esp+34h+var_28]
mov	eax, [esi+11Ch]
push	edx
push	eax
call	?setMute@Event@FMOD@@QAG?AW4FMOD_RESULT@@_N@Z ;	FMOD::Event::setMute(bool)
test	eax, eax
jnz	loc_638187

loc_638281:
mov	al, 1
pop	esi
add	esp, 30h
retn
sub_638160 endp

align 10h



; int __stdcall	sub_638290(float)
sub_638290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
push	ecx
fstp	[esp+4+var_4]
call	sub_637600
retn	4
sub_638290 endp




sub_6382A0 proc	near
lea	eax, [ecx+68h]
cmp	[ecx+118h], eax
jnz	short locret_6382B1
lea	edx, [ecx+48h]
mov	[ecx+1Ch], edx

locret_6382B1:
retn	4
sub_6382A0 endp

align 10h


; Attributes: bp-based frame

sub_6382C0 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi+114h]
mov	eax, [ecx]
mov	edx, [eax+28h]
call	edx
test	al, al
jnz	short loc_6382F5
lea	eax, [esi+28h]
push	2
mov	[esi+118h], eax
mov	[esi+1Ch], eax
call	sub_6385E0
push	3
call	sub_6385E0

loc_6382F5:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_6382C0 endp

align 10h


; Attributes: bp-based frame

sub_638300 proc	near
push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+114h]
mov	ecx, [eax+0C0h]
add	ecx, [eax+0BCh]
jnz	short loc_63833F
lea	eax, [esi+28h]
push	2
mov	[esi+118h], eax
mov	[esi+1Ch], eax
call	sub_6385E0
push	3
call	sub_6385E0
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_63833F:
lea	edx, [esi+28h]
cmp	[esi+118h], edx
jnz	short loc_63835A
lea	eax, [esi+0A8h]
mov	[esi+1Ch], eax
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_63835A:
lea	ecx, [eax+60h]
cmp	[eax+18h], ecx
jnz	short loc_638368
lea	edx, [esi+68h]
mov	[esi+1Ch], edx

loc_638368:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_638300 endp

align 10h



sub_638370 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_18899F4
mov	eax, [ecx]
mov	edx, [eax+0CCh]
push	0
call	edx
mov	ecx, [esi+114h]
mov	eax, [ecx]
mov	eax, [eax+30h]
lea	edx, [esi+0F0h]
push	edx
lea	edx, [esi+0E0h]
push	edx
call	eax
test	al, al
jnz	short loc_6383C1
lea	ecx, [esi+28h]
lea	edx, [esi+0A8h]
push	2
mov	[esi+118h], ecx
mov	[esi+1Ch], edx
call	sub_6385E0
pop	esi
retn	4

loc_6383C1:
mov	eax, [esi]
mov	edx, [eax+48h]
mov	ecx, esi
call	edx
cmp	eax, 1
jz	short loc_63840B
push	2
test	eax, eax
jnz	short loc_6383F0
lea	eax, [esi+28h]
lea	ecx, [esi+0A8h]
mov	[esi+118h], eax
mov	[esi+1Ch], ecx
call	sub_6385E0
pop	esi
retn	4

loc_6383F0:
lea	edx, [esi+28h]
lea	eax, [esi+0A8h]
mov	[esi+118h], edx
mov	[esi+1Ch], eax
call	sub_6385E0
pop	esi
retn	4

loc_63840B:
mov	eax, esi
call	sub_638540
pop	esi
retn	4
sub_638370 endp

align 10h



sub_638420 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, ecx
mov	edx, [esi]
push	edi
lea	edi, [esi+28h]
cmp	[esi+118h], edi
jnz	short loc_638448
lea	eax, [esi+88h]
mov	[esi+1Ch], eax
mov	eax, [edx+4Ch]
push	1
call	eax
pop	edi
pop	esi
pop	ecx
retn	4

loc_638448:
mov	eax, [edx+5Ch]
call	eax
test	al, al
jz	short loc_63847C
mov	edx, [esi]
mov	edx, [edx+50h]
lea	eax, [esp+0Ch+var_1]
push	eax
mov	ecx, esi
mov	[esp+10h+var_1], 0
call	edx
test	al, al
jz	short loc_63847C
cmp	[esp+0Ch+var_1], 0
jnz	short loc_63849D
mov	eax, esi
call	sub_638580
pop	edi
pop	esi
pop	ecx
retn	4

loc_63847C:
lea	eax, [esi+0A8h]
push	2
mov	[esi+118h], edi
mov	[esi+1Ch], eax
call	sub_6385E0
mov	edx, [esi]
mov	eax, [edx+4Ch]
push	0
mov	ecx, esi
call	eax

loc_63849D:
pop	edi
pop	esi
pop	ecx
retn	4
sub_638420 endp

align 10h



sub_6384B0 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+20h], 2
mov	eax, [esi]
jnz	short loc_6384C6
mov	edx, [eax+4Ch]
push	0
call	edx
pop	esi
retn	4

loc_6384C6:
mov	edx, [eax+5Ch]
call	edx
test	al, al
jnz	short loc_6384F3
lea	eax, [esi+28h]
lea	ecx, [esi+0A8h]
push	2
mov	[esi+118h], eax
mov	[esi+1Ch], ecx
call	sub_6385E0
mov	edx, [esi]
mov	eax, [edx+4Ch]
push	0
mov	ecx, esi
call	eax

loc_6384F3:
pop	esi
retn	4
sub_6384B0 endp

align 10h



sub_638500 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+114h]
mov	eax, [ecx]
mov	edx, [eax+2Ch]
mov	[esp+arg_0], 0
jmp	edx
sub_638500 endp

align 10h



sub_638520 proc	near
lea	eax, [ecx+28h]
mov	[ecx+1Ch], eax
retn	4
sub_638520 endp

align 10h



sub_638530 proc	near
push	esi
push	3
mov	esi, ecx
call	sub_6385E0
pop	esi
retn	4
sub_638530 endp

align 10h



sub_638540 proc	near
push	esi
mov	esi, eax
call	sub_638640
cmp	al, 1
jnz	short loc_638569
mov	ecx, dword_18899F4
mov	edx, [esi+114h]
mov	eax, [ecx]
mov	eax, [eax+98h]
add	edx, 94h
push	edx
call	eax

loc_638569:
push	0
call	sub_6385E0
pop	esi
retn
sub_638540 endp

align 10h



sub_638580 proc	near
push	esi
mov	esi, eax
lea	ecx, [esi+0A8h]
mov	[esi+1Ch], ecx
mov	ecx, [esi+114h]
lea	eax, [esi+28h]
add	ecx, 94h
mov	[esi+118h], eax
call	sub_435B80
test	al, al
jnz	short loc_6385C8
mov	ecx, dword_18899F4
mov	eax, [esi+114h]
mov	edx, [ecx]
mov	edx, [edx+0A0h]
push	0
add	eax, 94h
push	eax
call	edx

loc_6385C8:
push	1
call	sub_6385E0
pop	esi
retn
sub_638580 endp

align 10h


; Attributes: bp-based frame

sub_6385E0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
cmp	dword ptr [esi+0C8h], 0
jz	short loc_63862C
mov	eax, [esi+0DCh]
mov	edx, [esi+0D8h]
mov	ecx, [esi+114h]
push	eax
mov	eax, [esi+0D4h]
push	edx
mov	edx, [esi+0D0h]
push	eax
mov	eax, [esi+24h]
push	edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+40h]
call	eax
mov	ecx, [ebp+arg_0]
mov	edx, [esi+0C8h]
push	eax
push	ecx
call	edx
add	esp, 1Ch

loc_63862C:
mov	esp, ebp
pop	ebp
retn	4
sub_6385E0 endp

align 10h


; Attributes: bp-based frame

sub_638640 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	ecx, [esi+114h]
sub	esp, 10h
add	ecx, 94h
call	sub_435B80
cmp	al, 1
jnz	short loc_638664

loc_63865E:
xor	al, al
mov	esp, ebp
pop	ebp
retn

loc_638664:
mov	eax, [esi+114h]
fld	dword ptr [eax+0ACh]
fstp	[esp+10h+var_C]
fld	[esp+10h+var_C]
fsub	ds:dbl_15FCC10
fstp	[esp+10h+var_8]
fld	[esp+10h+var_8]
fabs
fstp	[esp+10h+var_8]
fld	[esp+10h+var_8]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
ja	short loc_638719
xorps	xmm0, xmm0
mov	ecx, eax
lea	eax, [esp+10h+var_10]
push	eax
movss	[esp+14h+var_4], xmm0
movss	[esp+14h+var_10], xmm0
mov	edx, [ecx]
mov	edx, [edx+38h]
lea	eax, [esp+14h+var_4]
push	eax
call	edx
cmp	al, 1
jnz	short loc_638719
fldz
sub	esp, 8
fstp	[esp+18h+var_14]
fld	[esp+18h+var_10]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
test	al, al
jnz	short loc_638719
mov	ecx, dword_18899F4
mov	eax, [ecx]
xorps	xmm0, xmm0
mov	eax, [eax+110h]
lea	edx, [esp+10h+var_8]
push	edx
mov	edx, [esi+24h]
push	edx
movss	[esp+18h+var_8], xmm0
call	eax
cmp	al, 1
jnz	short loc_638719
fld	[esp+10h+var_C]
fld	[esp+10h+var_8]
fld	st(1)
fmulp	st(2), st
fcomip	st, st(1)
fstp	st
ja	loc_63865E

loc_638719:
mov	al, 1
mov	esp, ebp
pop	ebp
retn
sub_638640 endp

align 10h



sub_638720 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+7Ch]
sub_638720 endp

align 10h



sub_638730 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+8Ch]
sub_638730 endp

align 10h



sub_638740 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+90h]
sub_638740 endp

align 10h



sub_638750 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+84h]
sub_638750 endp

align 10h



sub_638760 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+94h]
sub_638760 endp

align 10h



sub_638770 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+68h]
sub_638770 endp

align 10h



sub_638780 proc	near
mov	eax, [ecx]
jmp	dword ptr [eax+98h]
sub_638780 endp

align 10h



sub_638790 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13063EB
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
lea	eax, [esp+14h+arg_0]
push	eax
lea	ecx, [esi+4]
mov	dword ptr [esi], offset	off_15FB3A8
call	sub_4022A0
xor	eax, eax
mov	[esp+14h+var_4], eax
xorps	xmm0, xmm0
movss	dword ptr [esi+24h], xmm0
movss	dword ptr [esi+28h], xmm0
movss	xmm0, dword_17F1AD0
mov	[esi+1Ch], eax
mov	[esi+20h], eax
movss	dword ptr [esi+2Ch], xmm0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_638790 endp

align 10h



; int __thiscall sub_638810(void *, char)
sub_638810 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+4]
mov	dword ptr [esi], offset	off_15FB3A8
call	sub_407910
test	[esp+4+arg_0], 1
jz	short loc_638831
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_638831:
mov	eax, esi
pop	esi
retn	4
sub_638810 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_130A120

loc_638840:
mov	dword ptr [ecx], offset	off_15FB3A8
add	ecx, 4
jmp	sub_407910
; END OF FUNCTION CHUNK	FOR sub_130A120
align 10h



sub_638850 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	esi, edi
jz	short loc_638891
lea	eax, [edi+4]
lea	ecx, [esi+4]
cmp	eax, ecx
jz	short loc_638873
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_638873:
mov	ecx, [edi+1Ch]
mov	[esi+1Ch], ecx
mov	edx, [edi+20h]
mov	[esi+20h], edx
fld	dword ptr [edi+24h]
fstp	dword ptr [esi+24h]
fld	dword ptr [edi+28h]
fstp	dword ptr [esi+28h]
fld	dword ptr [edi+2Ch]
fstp	dword ptr [esi+2Ch]

loc_638891:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_638850 endp

align 10h



sub_6388A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+14h]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	edx, [edi+18h]
mov	ecx, [edi+14h]
mov	ebx, eax
sub	ebx, [esi+18h]
sub	ecx, edx
cmp	ebx, ecx
jnz	short loc_63893B
mov	ecx, [esi+18h]
sub	eax, ecx
push	eax
push	edx
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63893B
mov	edx, [esi+1Ch]
cmp	edx, [edi+1Ch]
jnz	short loc_63893B
mov	eax, [esi+20h]
cmp	eax, [edi+20h]
jnz	short loc_63893B
fld	dword ptr [edi+24h]
sub	esp, 8
fstp	[esp+14h+var_10]
fld	dword ptr [esi+24h]
fstp	[esp+14h+var_14]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63893B
fld	dword ptr [edi+28h]
sub	esp, 8
fstp	[esp+14h+var_10]
fld	dword ptr [esi+28h]
fstp	[esp+14h+var_14]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63893B
fld	dword ptr [edi+2Ch]
sub	esp, 8
fstp	[esp+14h+var_10]
fld	dword ptr [esi+2Ch]
fstp	[esp+14h+var_14]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63893B
pop	edi
pop	esi
pop	ebx
retn	4

loc_63893B:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4
sub_6388A0 endp

align 10h



; int __thiscall sub_638950(void *, char)
sub_638950 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FB3B8
lea	ecx, [esi+10h]
mov	dword ptr [esi+0Ch], offset off_15FB3A8
call	sub_407910
test	[esp+4+arg_0], 1
jz	short loc_638978
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_638978:
mov	eax, esi
pop	esi
retn	4
sub_638950 endp

align 10h



sub_638980 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	bl, 1
test	[esi+8], bl
jnz	short loc_6389BC
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_4]

loc_638995:
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
push	ebp
mov	ecx, esi
call	edx
test	al, al
jz	short loc_6389AC
or	[esi+8], bl
test	[esi+8], bl
jz	short loc_638995

loc_6389AC:
pop	edi
pop	ebp
test	[esi+8], bl
jnz	short loc_6389BC
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx

loc_6389BC:
mov	al, [esi+8]
pop	esi
and	al, bl
pop	ebx
retn	8
sub_638980 endp

align 10h



sub_6389D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+8], 1
jnz	short loc_6389ED
mov	eax, [esi+0Ch]
mov	edx, [esp+4+arg_0]
mov	eax, [eax+4]
lea	ecx, [esi+0Ch]
push	edx
call	eax
or	byte ptr [esi+8], 1

loc_6389ED:
mov	al, 1
pop	esi
retn	4
sub_6389D0 endp

align 10h



sub_638A00 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+18h]
push	1
call	edx
and	byte ptr [esi+8], 0FEh
pop	esi
retn
sub_638A00 endp

align 10h



sub_638A20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+8], 1
jnz	short loc_638A2F

loc_638A29:
xor	al, al
pop	esi
retn	4

loc_638A2F:
xorps	xmm0, xmm0
comiss	xmm0, [esp+4+arg_0]
ja	short loc_638A29
mov	eax, [esi]
mov	edx, [eax+24h]
call	edx
cmp	al, 1
jnz	short loc_638A6A
fld	dword ptr [esi+3Ch]
mov	eax, [esi]
fsub	[esp+4+arg_0]
mov	edx, [eax+24h]
mov	ecx, esi
fstp	dword ptr [esi+3Ch]
call	edx
test	al, al
jnz	short loc_638A6A
mov	eax, [esi]
mov	edx, [eax+18h]
push	1
mov	ecx, esi
call	edx
test	al, al
jz	short loc_638A29

loc_638A6A:
mov	al, 1
pop	esi
retn	4
sub_638A20 endp




sub_638A70 proc	near
test	byte ptr [ecx+8], 1
jnz	short loc_638A79

loc_638A76:
xor	al, al
retn

loc_638A79:
mov	eax, [ecx+4]
cmp	eax, 0FFFFFFFFh
jz	short loc_638A76
fld	dword ptr [ecx+38h]
inc	eax
mov	[ecx+4], eax
fstp	dword ptr [ecx+3Ch]
mov	al, 1
retn
sub_638A70 endp

align 10h



sub_638A90 proc	near

arg_0= byte ptr	 4

mov	al, 1
test	[ecx+8], al
jnz	short loc_638A9C
xor	al, al
retn	4

loc_638A9C:
mov	edx, [ecx+4]
test	edx, edx
jz	short locret_638AB7
cmp	[esp+arg_0], al
jnz	short loc_638AB3
mov	dword ptr [ecx+4], 0
retn	4

loc_638AB3:
dec	edx
mov	[ecx+4], edx

locret_638AB7:
retn	4
sub_638A90 endp

align 10h



sub_638AC0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
test	byte ptr [eax+8], 1
jnz	short loc_638ACD
xor	al, al
retn	4

loc_638ACD:
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
add	eax, 0Ch
push	eax
mov	eax, [edx+4]
call	eax
mov	al, 1
retn	4
sub_638AC0 endp

align 10h



sub_638AF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+8], 1
jnz	short loc_638AFF
xor	al, al
pop	esi
retn	4

loc_638AFF:
push	edi
mov	edi, [esp+8+arg_0]
lea	eax, [esi+10h]
push	eax
lea	ecx, [edi+4]
push	ecx
call	sub_46F700
add	esp, 8
test	al, al
jnz	short loc_638B20
mov	edx, [edi+1Ch]
cmp	edx, [esi+28h]
jz	short loc_638B27

loc_638B20:
pop	edi
xor	al, al
pop	esi
retn	4

loc_638B27:
mov	eax, [esi+0Ch]
mov	edx, [eax+4]
lea	ecx, [esi+0Ch]
push	edi
call	edx
pop	edi
mov	al, 1
pop	esi
retn	4
sub_638AF0 endp

align 10h



sub_638B40 proc	near
xorps	xmm0, xmm0
comiss	xmm0, dword ptr	[ecx+3Ch]
jbe	short loc_638B4C
xor	al, al
retn

loc_638B4C:
mov	al, 1
retn
sub_638B40 endp

align 10h



sub_638B50 proc	near

var_A9=	byte ptr -0A9h
var_A8=	byte ptr -0A8h
var_90=	byte ptr -90h
var_8F=	byte ptr -8Fh
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130A0AB
mov	eax, large fs:0
push	eax
sub	esp, 0A0h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0ACh+var_10], eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0B8h+var_C]
mov	large fs:0, eax
mov	esi, [esp+0B8h+arg_0]
push	7Fh		; size_t
lea	eax, [esp+0BCh+var_8F]
push	0		; int
push	eax		; void *
mov	edi, ecx
mov	[esp+0C4h+var_90], 0
call	_memset
mov	edx, [esi]
mov	edx, [edx+0Ch]
add	esp, 0Ch
push	80h
lea	eax, [esp+0BCh+var_90]
push	eax
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_638BC6

loc_638BBF:
xor	al, al
jmp	loc_638C74

loc_638BC6:
lea	eax, [esp+0B8h+var_A9]
push	eax
lea	ecx, [esp+0BCh+var_90]
push	ecx
lea	ecx, [esp+0C0h+var_A8]
call	sub_407D30
lea	ecx, [edi+10h]
mov	[esp+0B8h+var_4], 0
cmp	eax, ecx
jz	short loc_638BF8
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_638BF8:
lea	ecx, [esp+0B8h+var_A8]
mov	[esp+0B8h+var_4], 0FFFFFFFFh
call	sub_407910
mov	edx, [esi]
mov	edx, [edx+0Ch]
push	4
lea	eax, [edi+28h]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	short loc_638BBF
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+2Ch]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_638BBF
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+30h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_638BBF
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+34h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_638BBF
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
add	edi, 38h
push	edi
mov	ecx, esi
call	edx
test	al, al
setnz	al

loc_638C74:
mov	ecx, [esp+0B8h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
mov	ecx, [esp+0ACh+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 0ACh
retn	8
sub_638B50 endp

align 10h



sub_638CA0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13063BB
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
and	byte ptr [esi+18h], 0F8h
lea	eax, [esp+14h+arg_0]
push	eax
lea	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_15FB3E8
call	sub_4022A0
xor	eax, eax
mov	[esp+14h+var_4], eax
movss	xmm0, dword_17F1B10
mov	[esi+34h], eax
mov	[esi+38h], eax
movss	dword ptr [esi+3Ch], xmm0
movss	dword ptr [esi+40h], xmm0
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_638CA0 endp

align 10h



; int __thiscall sub_638D30(void *, char)
sub_638D30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_15FB3E8
call	sub_407910
test	[esp+4+arg_0], 1
jz	short loc_638D51
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_638D51:
mov	eax, esi
pop	esi
retn	4
sub_638D30 endp

align 10h


; Attributes: bp-based frame

sub_638D60 proc	near

var_B5=	byte ptr -0B5h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_98=	byte ptr -98h
var_97=	byte ptr -97h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A06B
mov	eax, large fs:0
push	eax
sub	esp, 0B0h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0BCh+var_14], eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0CCh+var_C]
mov	large fs:0, eax
mov	eax, [ebp+arg_0]
mov	edi, [ebp+arg_4]
mov	esi, ecx
test	byte ptr [esi+18h], 1
mov	[esp+0CCh+var_B4], eax
jnz	loc_638E80
xor	ebx, ebx

loc_638DB8:		; size_t
push	7Fh
lea	ecx, [esp+0D0h+var_97]
push	ebx		; int
push	ecx		; void *
mov	[esp+0D8h+var_98], bl
call	_memset
mov	edx, [edi]
mov	edx, [edx+0Ch]
add	esp, 0Ch
push	80h
lea	eax, [esp+0D0h+var_98]
push	eax
mov	ecx, edi
call	edx
test	al, al
jz	loc_638E71
lea	eax, [esp+0CCh+var_B5]
push	eax
lea	ecx, [esp+0D0h+var_98]
push	ecx
lea	ecx, [esp+0D4h+var_B0]
call	sub_407D30
lea	ecx, [esi+1Ch]
mov	[esp+0CCh+var_4], ebx
cmp	eax, ecx
jz	short loc_638E15
mov	edx, [eax+10h]
mov	eax, [eax+14h]
push	edx
push	eax
call	sub_403980

loc_638E15:
lea	ecx, [esp+0CCh+var_B0]
mov	[esp+0CCh+var_4], 0FFFFFFFFh
call	sub_407910
mov	edx, [esi]
mov	eax, [edx+30h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_638E3A
or	byte ptr [esi+18h], 4

loc_638E3A:
mov	eax, [ebp+arg_8]
mov	ecx, [esp+0CCh+var_B4]
mov	edx, [esi]
mov	edx, [edx+48h]
push	eax
push	edi
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_638E71
movss	xmm0, dword_17F1B10
or	byte ptr [esi+18h], 1
movss	dword ptr [esi+3Ch], xmm0
movss	dword ptr [esi+40h], xmm0
test	byte ptr [esi+18h], 1
jz	loc_638DB8

loc_638E71:
test	byte ptr [esi+18h], 1
jnz	short loc_638E80
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx

loc_638E80:
mov	al, [esi+18h]
and	al, 1
mov	ecx, [esp+0CCh+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+0BCh+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	0Ch
sub_638D60 endp

align 10h



sub_638EB0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	bl, 1
test	[esi+18h], bl
jnz	short loc_638EF2
push	ebp
push	edi
mov	edi, [esp+10h+arg_0]
lea	ebp, [esi+1Ch]

loc_638EC4:
cmp	edi, ebp
jz	short loc_638ED7
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebp
call	sub_403980

loc_638ED7:
mov	edx, [esi]
mov	eax, [edx+30h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_638EE8
or	byte ptr [esi+18h], 4

loc_638EE8:
or	[esi+18h], bl
test	[esi+18h], bl
jz	short loc_638EC4
pop	edi
pop	ebp

loc_638EF2:
mov	al, [esi+18h]
pop	esi
and	al, bl
pop	ebx
retn	4
sub_638EB0 endp

align 10h



sub_638F00 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+4Ch]
call	edx
and	byte ptr [esi+18h], 0FEh
pop	esi
retn
sub_638F00 endp




sub_638F10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

test	byte ptr [ecx+18h], 1
jnz	short loc_638F1B

loc_638F16:
xor	al, al
retn	4

loc_638F1B:
xorps	xmm0, xmm0
comiss	xmm0, [esp+arg_0]
ja	short loc_638F16
mov	eax, [ecx]
fld	[esp+arg_0]
mov	edx, [eax+50h]
push	ecx
fstp	[esp+4+var_4]
call	edx
test	al, al
setnz	al
retn	4
sub_638F10 endp

align 10h



; int __stdcall	sub_638F40(float)
sub_638F40 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
test	byte ptr [esi+18h], 1
jnz	short loc_638F51

loc_638F4A:
xor	al, al
pop	esi
pop	ecx
retn	4

loc_638F51:
fldz
sub	esp, 0Ch
fstp	[esp+14h+var_C]
fld	ds:flt_1479F2C
fstp	[esp+14h+var_10]
fld	[esp+14h+arg_0]
fstp	[esp+14h+var_14]
call	sub_632D10
movss	[esp+14h+arg_0], xmm0
fld	[esp+14h+arg_0]
add	esp, 0Ch
fdiv	ds:dbl_15FCE20
fstp	[esp+8+arg_0]
fld	ds:dbl_15FCE18
fld	[esp+8+arg_0]
call	__CIpow
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
mov	eax, [esi]
mov	edx, [eax+34h]
fstp	[esp+8+arg_0]
fld	dword ptr [esi+40h]
push	ecx
fmul	[esp+0Ch+arg_0]
mov	ecx, esi
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_638F4A
movss	xmm0, [esp+8+arg_0]
movss	dword ptr [esi+3Ch], xmm0
mov	al, 1
pop	esi
pop	ecx
retn	4
sub_638F40 endp

align 10h



; int __stdcall	sub_638FE0(float)
sub_638FE0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+18h], 1
jnz	short loc_638FEF
xor	al, al
pop	esi
retn	4

loc_638FEF:
fld	[esp+4+arg_0]
push	edi
mov	edi, [esi]
push	ecx		; float
fstp	[esp+0Ch+var_C]
call	sub_632CC0
mov	eax, [edi+38h]
fstp	[esp+0Ch+var_C]
mov	ecx, esi
call	eax
test	al, al
pop	edi
setnz	al
pop	esi
retn	4
sub_638FE0 endp

align 10h



sub_639020 proc	near

arg_0= dword ptr  4

mov	al, 1
test	[ecx+18h], al
jnz	short loc_63902C
xor	al, al
retn	4

loc_63902C:
fld	dword ptr [ecx+40h]
mov	ecx, [esp+arg_0]
fstp	dword ptr [ecx]
retn	4
sub_639020 endp

align 10h



; int __stdcall	sub_639040(float)
sub_639040 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
test	byte ptr [esi+18h], 1
jnz	short loc_639051

loc_63904A:
xor	al, al
pop	esi
pop	ecx
retn	4

loc_639051:
fld1
sub	esp, 0Ch
fstp	[esp+14h+var_C]
fld	ds:flt_1479E20
fstp	[esp+14h+var_10]
fld	[esp+14h+arg_0]
fstp	[esp+14h+var_14]
call	sub_632D10
fld	dword ptr [esi+3Ch]
mov	eax, [esi]
mov	edx, [eax+34h]
movss	[esp+14h+arg_0], xmm0
fmul	[esp+14h+arg_0]
add	esp, 8
mov	ecx, esi
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_63904A
movss	xmm0, [esp+8+arg_0]
movss	dword ptr [esi+40h], xmm0
mov	al, 1
pop	esi
pop	ecx
retn	4
sub_639040 endp

align 10h



sub_6390B0 proc	near
push	esi
mov	esi, ecx
mov	al, [esi+18h]
test	al, 1
jnz	short loc_6390BE

loc_6390BA:
xor	al, al
pop	esi
retn

loc_6390BE:
test	al, 2
jnz	short loc_6390D3
mov	eax, [esi]
mov	edx, [eax+3Ch]
push	1
call	edx
test	al, al
jz	short loc_6390BA
or	byte ptr [esi+18h], 2

loc_6390D3:
mov	al, 1
pop	esi
retn
sub_6390B0 endp

align 10h



sub_6390E0 proc	near
push	esi
mov	esi, ecx
mov	al, [esi+18h]
test	al, 1
jnz	short loc_6390EE

loc_6390EA:
xor	al, al
pop	esi
retn

loc_6390EE:
test	al, 2
jz	short loc_639103
mov	eax, [esi]
mov	edx, [eax+3Ch]
push	0
call	edx
test	al, al
jz	short loc_6390EA
and	byte ptr [esi+18h], 0FDh

loc_639103:
mov	al, 1
pop	esi
retn
sub_6390E0 endp

align 10h



sub_639110 proc	near
test	byte ptr [ecx+18h], 1
jnz	short loc_639119
xor	al, al
retn

loc_639119:
push	esi
push	edi
lea	esi, [ecx+4]
mov	edi, 5

loc_639123:
cmp	dword ptr [esi], 0
jz	short loc_639131
mov	ecx, [esi]
mov	eax, [ecx]
mov	edx, [eax+14h]
call	edx

loc_639131:
add	esi, 4
sub	edi, 1
jnz	short loc_639123
pop	edi
mov	al, 1
pop	esi
retn
sub_639110 endp

align 10h



sub_639140 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_18899F4
mov	dword ptr [esi+34h], 0
mov	eax, [ecx]
mov	eax, [eax+1A4h]
lea	edx, [esi+1Ch]
push	edx
call	eax
mov	[esi+34h], eax
test	eax, eax
jnz	short loc_639169
xor	al, al
pop	esi
retn

loc_639169:
mov	ecx, [eax]
mov	edx, [ecx+40h]
add	esi, 38h
push	esi
push	eax
call	edx
test	eax, eax
setz	al
pop	esi
retn
sub_639140 endp

align 10h



; int __stdcall	sub_639180(float)
sub_639180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, [ecx+38h]
push	ecx
fstp	[esp+4+var_4]
push	eax
call	?setVolume@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@M@Z ;	FMOD::ChannelGroup::setVolume(float)
test	eax, eax
setz	al
retn	4
sub_639180 endp

align 10h



; int __stdcall	sub_6391A0(float)
sub_6391A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

fld	[esp+arg_0]
mov	eax, [ecx+38h]
push	ecx
fstp	[esp+4+var_4]
push	eax
call	?setPitch@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@M@Z ; FMOD::ChannelGroup::setPitch(float)
test	eax, eax
setz	al
retn	4
sub_6391A0 endp

align 10h



sub_6391C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [ecx+38h]
push	eax
push	ecx
call	?setMute@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@_N@Z ; FMOD::ChannelGroup::setMute(bool)
test	eax, eax
setz	al
retn	4
sub_6391C0 endp

align 10h



sub_6391E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4
ja	short loc_6391F0
mov	eax, [ecx+eax*4+4]
retn	4

loc_6391F0:
xor	eax, eax
retn	4
sub_6391E0 endp

align 10h



sub_639200 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	esi
xor	esi, esi
xor	eax, eax
cmp	ecx, 4		; switch 5 cases
ja	loc_639301	; default
jmp	ds:off_639308[ecx*4] ; switch jump

loc_639219:		; jumptable 00639212 case 0
push	30h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, esi
jz	loc_6392FF
and	byte ptr [eax+8], 0FCh
xorps	xmm0, xmm0
mov	[eax+0Ch], esi
mov	[eax+10h], esi
mov	[eax+14h], esi
lea	ecx, [eax+18h]
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	dword ptr [eax], offset	off_15FB43C
mov	dword ptr [eax+20h], offset off_15FB580
movss	dword ptr [eax+24h], xmm0
movss	dword ptr [eax+28h], xmm0
movss	dword ptr [eax+2Ch], xmm0
mov	[eax+4], esi
pop	esi
retn	4

loc_639266:		; jumptable 00639212 case 1
push	30h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, esi
jz	loc_6392FF
and	byte ptr [eax+8], 0FCh
xorps	xmm0, xmm0
mov	[eax+0Ch], esi
mov	[eax+10h], esi
mov	[eax+14h], esi
lea	ecx, [eax+18h]
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	dword ptr [eax], offset	off_15FB470
mov	dword ptr [eax+20h], offset off_15FB580
movss	dword ptr [eax+24h], xmm0
movss	dword ptr [eax+28h], xmm0
movss	dword ptr [eax+2Ch], xmm0
mov	dword ptr [eax+4], 1
pop	esi
retn	4

loc_6392B7:		; jumptable 00639212 case 2
push	38h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, esi
jz	short loc_6392FF
call	sub_6398A0
pop	esi
retn	4

loc_6392CE:		; jumptable 00639212 case 3
push	48h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, esi
jz	short loc_6392FF
call	sub_639B90
pop	esi
retn	4

loc_6392E5:		; jumptable 00639212 case 4
push	108h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, esi
jz	short loc_6392FF
call	sub_639F70
pop	esi
retn	4

loc_6392FF:
xor	eax, eax

loc_639301:		; default
pop	esi
retn	4
sub_639200 endp

align 4
off_639308 dd offset loc_639219	; jump table for switch	statement
dd offset loc_639266
dd offset loc_6392B7
dd offset loc_6392CE
dd offset loc_6392E5
align 10h



sub_639320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, [ebx]
mov	edx, [eax+0Ch]
push	esi
push	edi
mov	edi, ecx
push	4
lea	ecx, [esp+18h+var_8]
push	ecx
xor	esi, esi
mov	ecx, ebx
mov	[esp+1Ch+var_8], esi
call	edx
test	al, al
jnz	short loc_63934F
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch

loc_63934F:
push	ebp
mov	[esp+18h+var_4], esi
cmp	[esp+18h+var_8], esi
jbe	short loc_6393BC
mov	ebp, [esp+18h+arg_8]
mov	edi, edi

loc_639360:
mov	eax, [ebx]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [esp+1Ch+arg_4]
push	ecx
mov	ecx, ebx
mov	[esp+20h+arg_4], 5
call	edx
test	al, al
jz	short loc_6393D2
mov	ecx, [esp+18h+arg_4]
mov	eax, [edi]
mov	edx, [eax+44h]
push	ecx
mov	ecx, edi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6393AD
mov	ecx, [esp+18h+arg_0]
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
push	ebp
push	ebx
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_6393C8
mov	eax, [esp+18h+arg_4]
mov	[edi+eax*4+4], esi

loc_6393AD:
mov	eax, [esp+18h+var_4]
inc	eax
mov	[esp+18h+var_4], eax
cmp	eax, [esp+18h+var_8]
jb	short loc_639360

loc_6393BC:
pop	ebp
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6393C8:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_6393D2:
pop	ebp
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 8
retn	0Ch
sub_639320 endp

align 10h



sub_6393E0 proc	near
push	esi
push	edi
lea	esi, [ecx+4]
mov	edi, 5
lea	ebx, [ebx+0]

loc_6393F0:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_639411
mov	eax, [ecx]
mov	edx, [eax+0Ch]
call	edx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_63940B
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_63940B:
mov	dword ptr [esi], 0

loc_639411:
add	esi, 4
sub	edi, 1
jnz	short loc_6393F0
pop	edi
pop	esi
retn
sub_6393E0 endp

align 10h



; int __stdcall	sub_639420(float)
sub_639420 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
push	edi
xor	edi, edi
lea	esi, [ecx+4]

loc_639427:
cmp	dword ptr [esi], 0
jz	short loc_639441
mov	ecx, [esi]
fld	[esp+8+arg_0]
mov	eax, [ecx]
mov	edx, [eax+10h]
push	ecx
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_639451

loc_639441:
inc	edi
add	esi, 4
cmp	edi, 5
jb	short loc_639427
pop	edi
mov	al, 1
pop	esi
retn	4

loc_639451:
pop	edi
xor	al, al
pop	esi
retn	4
sub_639420 endp

align 10h


; Attributes: bp-based frame

sub_639460 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	dword ptr [eax+4]
fsub	dword ptr [eax+8]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
ja	short loc_639493
mov	al, 1
mov	esp, ebp
pop	ebp
retn

loc_639493:
xor	al, al
mov	esp, ebp
pop	ebp
retn
sub_639460 endp

align 10h



; int __thiscall sub_6394A0(void *, char)
sub_6394A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+18h]
push	eax
mov	dword ptr [esi+20h], offset off_15FB580
mov	dword ptr [esi], offset	off_15FB54C
call	sub_63B060
test	[esp+4+arg_0], 1
jz	short loc_6394C9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6394C9:
mov	eax, esi
pop	esi
retn	4
sub_6394A0 endp

align 10h



sub_6394D0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+8]
test	al, 1
jnz	short loc_6394E0

loc_6394DA:
xor	al, al
pop	esi
retn	4

loc_6394E0:
xorps	xmm0, xmm0
comiss	xmm0, [esp+4+arg_0]
ja	short loc_6394DA
push	edi
test	al, 2
jz	short loc_639543
mov	eax, [esi+20h]
fld	[esp+8+arg_0]
mov	edx, [eax+10h]
lea	edi, [esi+20h]
push	ecx
mov	ecx, edi
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_63952B
mov	ecx, [esi+10h]
test	byte ptr [ecx+18h], 4
jnz	short loc_639532
fld	dword ptr [esi+24h]
mov	eax, [ecx]
mov	edx, [eax+14h]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
push	ecx
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jnz	short loc_639532

loc_63952B:
pop	edi
xor	al, al
pop	esi
retn	4

loc_639532:
mov	eax, edi
call	sub_639460
add	al, al
xor	al, [esi+8]
and	al, 2
xor	[esi+8], al

loc_639543:
pop	edi
mov	al, 1
pop	esi
retn	4
sub_6394D0 endp

align 10h



sub_639550 proc	near
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_639570
and	byte ptr [eax+4], 0FEh
mov	dword ptr [eax+8], 0
mov	dword ptr [eax], offset	off_15FB594
retn

loc_639570:
xor	eax, eax
retn
sub_639550 endp

align 10h



sub_639580 proc	near
mov	al, 1
retn
sub_639580 endp

align 10h


; Attributes: bp-based frame

sub_639590 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E7628
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
xor	eax, eax
mov	[esp+24h+var_20], offset off_15FB5CC
mov	[esp+24h+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[esp+24h+var_4], eax
mov	eax, [ecx]
movss	xmm0, dword_1968424
mov	eax, [eax+4]
lea	edx, [esp+24h+var_20]
push	edx
mov	[esp+28h+var_1C], 1
movss	[esp+28h+var_14], xmm0
call	eax
test	al, al
setnz	al
mov	ecx, [esp+28h+var_10]
mov	large fs:0, ecx
pop	ecx
mov	esp, ebp
pop	ebp
retn	4
sub_639590 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_639610(int,	float)
sub_639610 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E7658
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
movss	xmm0, dword_196855C
xor	eax, eax
mov	[esp+2Ch+var_1C], eax
mov	[esp+2Ch+var_20], offset off_15FB5CC
movss	[esp+2Ch+var_14], xmm0
mov	[esp+2Ch+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[esp+2Ch+var_4], eax
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+2Ch+var_20]
push	edx
call	eax
test	al, al
jnz	short loc_639686
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8

loc_639686:
fld	[ebp+arg_4]
mov	edx, [esi+20h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+20h]
fstp	[esp+34h+var_30]
fld	[esp+34h+var_14]
fstp	[esp+34h+var_34]
call	eax
or	byte ptr [esi+8], 2
mov	al, 1
mov	ecx, [esp+34h+var_14]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_639610 endp

align 10h



sub_6396C0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+8]
test	al, 1
jnz	short loc_6396D0

loc_6396CA:
xor	al, al
pop	esi
retn	4

loc_6396D0:
xorps	xmm0, xmm0
comiss	xmm0, [esp+4+arg_0]
ja	short loc_6396CA
push	edi
test	al, 2
jz	short loc_639733
mov	eax, [esi+20h]
fld	[esp+8+arg_0]
mov	edx, [eax+10h]
lea	edi, [esi+20h]
push	ecx
mov	ecx, edi
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_63971B
mov	ecx, [esi+10h]
test	byte ptr [ecx+18h], 4
jnz	short loc_639722
fld	dword ptr [esi+24h]
mov	eax, [ecx]
mov	edx, [eax+18h]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
push	ecx
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jnz	short loc_639722

loc_63971B:
pop	edi
xor	al, al
pop	esi
retn	4

loc_639722:
mov	eax, edi
call	sub_639460
add	al, al
xor	al, [esi+8]
and	al, 2
xor	[esi+8], al

loc_639733:
pop	edi
mov	al, 1
pop	esi
retn	4
sub_6396C0 endp

align 10h



sub_639740 proc	near
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_639760
and	byte ptr [eax+4], 0FEh
mov	dword ptr [eax+8], 0
mov	dword ptr [eax], offset	off_15FB5B0
retn

loc_639760:
xor	eax, eax
retn
sub_639740 endp

align 10h


; Attributes: bp-based frame

sub_639770 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E7628
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
mov	eax, 1
mov	[esp+24h+var_20], offset off_15FB5CC
mov	[esp+24h+var_18], eax
mov	ecx, [ebp+arg_0]
mov	[esp+24h+var_4], 0
movss	xmm0, dword_1889CD8
mov	[esp+24h+var_1C], eax
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+24h+var_20]
push	edx
movss	[esp+28h+var_14], xmm0
call	eax
test	al, al
setnz	al
mov	ecx, [esp+28h+var_10]
mov	large fs:0, ecx
pop	ecx
mov	esp, ebp
pop	ebp
retn	4
sub_639770 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_6397F0(int,	float)
sub_6397F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E7658
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
movss	xmm0, dword_1889E10
xor	eax, eax
mov	[esp+2Ch+var_1C], eax
mov	[esp+2Ch+var_20], offset off_15FB5CC
movss	[esp+2Ch+var_14], xmm0
mov	[esp+2Ch+var_18], 1
mov	ecx, [ebp+arg_0]
mov	[esp+2Ch+var_4], eax
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+2Ch+var_20]
push	edx
call	eax
test	al, al
jnz	short loc_63986A
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8

loc_63986A:
fld	[ebp+arg_4]
mov	edx, [esi+20h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+20h]
fstp	[esp+34h+var_30]
fld	[esp+34h+var_14]
fstp	[esp+34h+var_34]
call	eax
or	byte ptr [esi+8], 2
mov	al, 1
mov	ecx, [esp+34h+var_14]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_6397F0 endp

align 10h



sub_6398A0 proc	near
and	byte ptr [eax+8], 0FCh
xorps	xmm0, xmm0
xor	edx, edx
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	[eax+14h], edx
lea	ecx, [eax+18h]
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	dword ptr [eax], offset	off_15FB4A4
mov	dword ptr [eax+20h], offset off_15FB580
movss	dword ptr [eax+24h], xmm0
movss	dword ptr [eax+28h], xmm0
movss	dword ptr [eax+2Ch], xmm0
mov	[eax+30h], edx
mov	[eax+34h], edx
mov	dword ptr [eax+4], 2
retn
sub_6398A0 endp

align 10h



sub_6398F0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+8]
test	al, 1
jnz	short loc_639900

loc_6398FA:
xor	al, al
pop	esi
retn	4

loc_639900:
xorps	xmm0, xmm0
comiss	xmm0, [esp+4+arg_0]
ja	short loc_6398FA
push	edi
test	al, 2
jz	short loc_639956
mov	eax, [esi+20h]
fld	[esp+8+arg_0]
mov	edx, [eax+10h]
lea	edi, [esi+20h]
push	ecx
mov	ecx, edi
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_63993E
mov	eax, [esi+10h]
test	byte ptr [eax+18h], 4
jnz	short loc_639945
mov	edx, [esi]
mov	eax, [edx+34h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_639945

loc_63993E:
pop	edi
xor	al, al
pop	esi
retn	4

loc_639945:
mov	eax, edi
call	sub_639460
add	al, al
xor	al, [esi+8]
and	al, 2
xor	[esi+8], al

loc_639956:
pop	edi
mov	al, 1
pop	esi
retn	4
sub_6398F0 endp

align 10h



sub_639960 proc	near
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_639980
and	byte ptr [eax+4], 0FEh
mov	dword ptr [eax+8], 0
mov	dword ptr [eax], offset	off_15FB5E8
retn

loc_639980:
xor	eax, eax
retn
sub_639960 endp

align 10h



sub_639990 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
test	byte ptr [eax+18h], 4
jnz	short loc_639A09
cmp	dword ptr [esi+30h], 0
jnz	short loc_639A09
mov	ecx, dword_18899F4
mov	edx, [ecx]
mov	edx, [edx+1A8h]
lea	eax, [esp+0Ch+var_8]
push	eax
push	2
mov	[esp+14h+var_8], 0
call	edx
test	al, al
jz	short loc_6399F4
mov	eax, [esi+10h]
mov	edx, [esp+0Ch+var_8]
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	[esp+10h+var_4], 0
mov	eax, [eax+38h]
push	edx
push	eax
call	?addDSP@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@PAVDSP@2@PAPAVDSPConnection@2@@Z	; FMOD::ChannelGroup::addDSP(FMOD::DSP *,FMOD::DSPConnection * *)
test	eax, eax
jz	short loc_6399FB
mov	eax, [esp+0Ch+var_8]
push	eax
call	?release@DSP@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::DSP::release(void)

loc_6399F4:
xor	al, al
pop	esi
add	esp, 8
retn

loc_6399FB:
mov	ecx, [esp+0Ch+var_8]
mov	edx, [esp+0Ch+var_4]
mov	[esi+30h], ecx
mov	[esi+34h], edx

loc_639A09:
mov	al, 1
pop	esi
add	esp, 8
retn
sub_639990 endp




sub_639A10 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+30h]
test	eax, eax
jz	short loc_639A20
push	eax
call	?release@DSP@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::DSP::release(void)

loc_639A20:
mov	dword ptr [esi+34h], 0
pop	esi
retn
sub_639A10 endp

align 10h



sub_639A30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ecx
mov	eax, [ecx+30h]
test	eax, eax
jz	short loc_639A57
fld	dword ptr [ecx+24h]
push	ecx
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fstp	[esp+8+var_8]
push	0
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jz	short loc_639A57
xor	al, al
pop	ecx
retn

loc_639A57:
mov	al, 1
pop	ecx
retn
sub_639A30 endp

align 10h


; Attributes: bp-based frame

sub_639A60 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E7628
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
mov	[esp+24h+var_20], offset off_15FB5CC
mov	[esp+24h+var_18], 2
mov	ecx, [ebp+arg_0]
mov	[esp+24h+var_4], 0
mov	eax, [ecx]
movss	xmm0, dword_17F1C10
mov	eax, [eax+4]
lea	edx, [esp+24h+var_20]
push	edx
mov	[esp+28h+var_1C], 1
movss	[esp+28h+var_14], xmm0
call	eax
test	al, al
setnz	al
mov	ecx, [esp+28h+var_10]
mov	large fs:0, ecx
pop	ecx
mov	esp, ebp
pop	ebp
retn	4
sub_639A60 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_639AE0(int,	float)
sub_639AE0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_12E7658
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
movss	xmm0, dword_17F1E30
xor	eax, eax
mov	[esp+2Ch+var_1C], eax
mov	[esp+2Ch+var_20], offset off_15FB5CC
movss	[esp+2Ch+var_14], xmm0
mov	[esp+2Ch+var_18], 2
mov	ecx, [ebp+arg_0]
mov	[esp+2Ch+var_4], eax
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+2Ch+var_20]
push	edx
call	eax
test	al, al
jnz	short loc_639B5A
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8

loc_639B5A:
fld	[ebp+arg_4]
mov	edx, [esi+20h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+20h]
fstp	[esp+34h+var_30]
fld	[esp+34h+var_14]
fstp	[esp+34h+var_34]
call	eax
or	byte ptr [esi+8], 2
mov	al, 1
mov	ecx, [esp+34h+var_14]
mov	large fs:0, ecx
pop	ecx
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_639AE0 endp

align 10h



sub_639B90 proc	near
and	byte ptr [eax+8], 0FCh
xorps	xmm0, xmm0
xor	edx, edx
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	[eax+14h], edx
lea	ecx, [eax+18h]
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	dword ptr [eax], offset	off_15FB4DC
movss	dword ptr [eax+24h], xmm0
movss	dword ptr [eax+28h], xmm0
movss	dword ptr [eax+2Ch], xmm0
mov	ecx, offset off_15FB580
mov	[eax+20h], ecx
mov	[eax+30h], ecx
movss	dword ptr [eax+34h], xmm0
movss	dword ptr [eax+38h], xmm0
movss	dword ptr [eax+3Ch], xmm0
mov	[eax+40h], edx
mov	[eax+44h], edx
mov	dword ptr [eax+4], 3
retn
sub_639B90 endp

align 10h



; int __thiscall sub_639BF0(void *, char)
sub_639BF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, offset off_15FB580
mov	[esi+30h], eax
mov	[esi+20h], eax
lea	eax, [esi+18h]
push	eax
mov	dword ptr [esi], offset	off_15FB54C
call	sub_63B060
test	[esp+4+arg_0], 1
jz	short loc_639C1D
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_639C1D:
mov	eax, esi
pop	esi
retn	4
sub_639BF0 endp

align 10h



sub_639C30 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+8]
test	al, 1
jnz	short loc_639C40

loc_639C3A:
xor	al, al
pop	esi
retn	4

loc_639C40:
xorps	xmm0, xmm0
comiss	xmm0, [esp+4+arg_0]
ja	short loc_639C3A
push	ebx
push	edi
test	al, 2
jz	loc_639CD8
mov	eax, [esi+20h]
fld	[esp+0Ch+arg_0]
mov	edx, [eax+10h]
lea	ebx, [esi+20h]
push	ecx
mov	ecx, ebx
fstp	[esp+10h+var_10]
call	edx
test	al, al
jz	short loc_639C9C
mov	eax, [esi+30h]
fld	[esp+0Ch+arg_0]
mov	edx, [eax+10h]
lea	edi, [esi+30h]
push	ecx
mov	ecx, edi
fstp	[esp+10h+var_10]
call	edx
test	al, al
jz	short loc_639C9C
mov	eax, [esi+10h]
test	byte ptr [eax+18h], 4
jnz	short loc_639CA4
mov	edx, [esi]
mov	eax, [edx+34h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_639CA4

loc_639C9C:
pop	edi
pop	ebx
xor	al, al
pop	esi
retn	4

loc_639CA4:
mov	eax, ebx
call	sub_639460
test	al, al
jnz	short loc_639CCC
mov	eax, edi
call	sub_639460
test	al, al
jnz	short loc_639CCC
mov	al, al
xor	al, [esi+8]
pop	edi
and	al, 2
xor	[esi+8], al
pop	ebx
mov	al, 1
pop	esi
retn	4

loc_639CCC:
mov	al, 1
add	al, al
xor	al, [esi+8]
and	al, 2
xor	[esi+8], al

loc_639CD8:
pop	edi
pop	ebx
mov	al, 1
pop	esi
retn	4
sub_639C30 endp




sub_639CE0 proc	near
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_639D00
and	byte ptr [eax+4], 0FEh
mov	dword ptr [eax+8], 0
mov	dword ptr [eax], offset	off_15FB620
retn

loc_639D00:
xor	eax, eax
retn
sub_639CE0 endp

align 10h



sub_639D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
test	byte ptr [eax+18h], 4
jnz	short loc_639D89
cmp	dword ptr [esi+40h], 0
jnz	short loc_639D89
mov	ecx, dword_18899F4
mov	edx, [ecx]
mov	edx, [edx+1A8h]
lea	eax, [esp+0Ch+var_8]
push	eax
push	3
mov	[esp+14h+var_8], 0
call	edx
test	al, al
jz	short loc_639D74
mov	eax, [esi+10h]
mov	edx, [esp+0Ch+var_8]
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	[esp+10h+var_4], 0
mov	eax, [eax+38h]
push	edx
push	eax
call	?addDSP@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@PAVDSP@2@PAPAVDSPConnection@2@@Z	; FMOD::ChannelGroup::addDSP(FMOD::DSP *,FMOD::DSPConnection * *)
test	eax, eax
jz	short loc_639D7B
mov	eax, [esp+0Ch+var_8]
push	eax
call	?release@DSP@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::DSP::release(void)

loc_639D74:
xor	al, al
pop	esi
add	esp, 8
retn

loc_639D7B:
mov	ecx, [esp+0Ch+var_8]
mov	edx, [esp+0Ch+var_4]
mov	[esi+40h], ecx
mov	[esi+44h], edx

loc_639D89:
mov	al, 1
pop	esi
add	esp, 8
retn
sub_639D10 endp




sub_639D90 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+40h]
test	eax, eax
jz	short loc_639DA0
push	eax
call	?release@DSP@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::DSP::release(void)

loc_639DA0:
mov	dword ptr [esi+44h], 0
pop	esi
retn
sub_639D90 endp

align 10h



sub_639DB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+40h]
test	eax, eax
jz	short loc_639DF9
fld	dword ptr [esi+24h]
push	ecx
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	0
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jz	short loc_639DDB

loc_639DD6:
xor	al, al
pop	esi
pop	ecx
retn

loc_639DDB:
fld	dword ptr [esi+34h]
mov	eax, [esi+40h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	1
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	short loc_639DD6

loc_639DF9:
mov	al, 1
pop	esi
pop	ecx
retn
sub_639DB0 endp

align 10h



sub_639E00 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12E7628
mov	eax, large fs:0
push	eax
sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
mov	[esp+24h+var_20], offset off_15FB604
mov	[esp+24h+var_18], 3
mov	ecx, [esp+24h+arg_0]
mov	[esp+24h+var_4], 0
movss	xmm0, dword_17F1C7C
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+24h+var_20]
movss	[esp+24h+var_14], xmm0
movss	xmm0, dword_17F1C80
push	edx
mov	[esp+28h+var_1C], 1
movss	[esp+28h+var_10], xmm0
call	eax
test	al, al
setnz	al
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 20h
retn	4
sub_639E00 endp

align 10h



; int __stdcall	sub_639E90(int,	float)
sub_639E90 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12E75F8
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+28h+var_C]
mov	large fs:0, eax
mov	esi, ecx
movss	xmm0, dword_17F1E74
xor	eax, eax
movss	[esp+28h+var_14], xmm0
movss	xmm0, dword_17F1E78
mov	[esp+28h+var_1C], eax
mov	[esp+28h+var_20], offset off_15FB604
movss	[esp+28h+var_10], xmm0
mov	[esp+28h+var_18], 3
mov	ecx, [esp+28h+arg_0]
mov	[esp+28h+var_4], eax
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+28h+var_20]
push	edx
call	eax
test	al, al
jnz	short loc_639F13
mov	ecx, [esp+28h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 20h
retn	8

loc_639F13:
fld	[esp+28h+arg_4]
mov	edx, [esi+20h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+20h]
fstp	[esp+30h+var_2C]
fld	[esp+30h+var_14]
fstp	[esp+30h+var_30]
call	eax
fld	[esp+28h+arg_4]
mov	edx, [esi+30h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+30h]
fstp	[esp+30h+var_2C]
fld	[esp+30h+var_10]
fstp	[esp+30h+var_30]
call	eax
or	byte ptr [esi+8], 2
mov	al, 1
mov	ecx, [esp+28h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 20h
retn	8
sub_639E90 endp

align 10h



sub_639F70 proc	near
and	byte ptr [eax+8], 0FCh
xorps	xmm0, xmm0
xor	edx, edx
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	[eax+14h], edx
lea	ecx, [eax+18h]
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	dword ptr [eax], offset	off_15FB514
movss	dword ptr [eax+24h], xmm0
movss	dword ptr [eax+28h], xmm0
movss	dword ptr [eax+2Ch], xmm0
mov	ecx, offset off_15FB580
mov	[eax+20h], ecx
mov	[eax+30h], ecx
movss	dword ptr [eax+34h], xmm0
movss	dword ptr [eax+38h], xmm0
movss	dword ptr [eax+3Ch], xmm0
mov	[eax+40h], ecx
movss	dword ptr [eax+44h], xmm0
movss	dword ptr [eax+48h], xmm0
movss	dword ptr [eax+4Ch], xmm0
mov	[eax+50h], ecx
movss	dword ptr [eax+54h], xmm0
movss	dword ptr [eax+58h], xmm0
movss	dword ptr [eax+5Ch], xmm0
mov	[eax+60h], ecx
movss	dword ptr [eax+64h], xmm0
movss	dword ptr [eax+68h], xmm0
movss	dword ptr [eax+6Ch], xmm0
mov	[eax+70h], ecx
movss	dword ptr [eax+74h], xmm0
movss	dword ptr [eax+78h], xmm0
movss	dword ptr [eax+7Ch], xmm0
mov	[eax+80h], ecx
movss	dword ptr [eax+84h], xmm0
movss	dword ptr [eax+88h], xmm0
movss	dword ptr [eax+8Ch], xmm0
mov	[eax+90h], ecx
movss	dword ptr [eax+94h], xmm0
movss	dword ptr [eax+98h], xmm0
movss	dword ptr [eax+9Ch], xmm0
mov	[eax+0A0h], ecx
movss	dword ptr [eax+0A4h], xmm0
movss	dword ptr [eax+0A8h], xmm0
movss	dword ptr [eax+0ACh], xmm0
mov	[eax+0B0h], ecx
movss	dword ptr [eax+0B4h], xmm0
movss	dword ptr [eax+0B8h], xmm0
movss	dword ptr [eax+0BCh], xmm0
mov	[eax+0C0h], ecx
movss	dword ptr [eax+0C4h], xmm0
movss	dword ptr [eax+0C8h], xmm0
movss	dword ptr [eax+0CCh], xmm0
mov	[eax+0D0h], ecx
movss	dword ptr [eax+0D4h], xmm0
movss	dword ptr [eax+0D8h], xmm0
movss	dword ptr [eax+0DCh], xmm0
mov	[eax+0E0h], ecx
movss	dword ptr [eax+0E4h], xmm0
movss	dword ptr [eax+0E8h], xmm0
movss	dword ptr [eax+0ECh], xmm0
mov	[eax+0F0h], ecx
movss	dword ptr [eax+0F4h], xmm0
movss	dword ptr [eax+0F8h], xmm0
movss	dword ptr [eax+0FCh], xmm0
mov	[eax+100h], edx
mov	[eax+104h], edx
mov	dword ptr [eax+4], 4
retn
sub_639F70 endp

align 10h



; int __thiscall sub_63A110(void *, char)
sub_63A110 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_63A130
test	[esp+4+arg_0], 1
jz	short loc_63A128
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63A128:
mov	eax, esi
pop	esi
retn	4
sub_63A110 endp

align 10h



sub_63A130 proc	near
mov	eax, offset off_15FB580
mov	[ecx+0F0h], eax
mov	[ecx+0E0h], eax
mov	[ecx+0D0h], eax
mov	[ecx+0C0h], eax
mov	[ecx+0B0h], eax
mov	[ecx+0A0h], eax
mov	[ecx+90h], eax
mov	[ecx+80h], eax
mov	[ecx+70h], eax
mov	[ecx+60h], eax
mov	[ecx+50h], eax
mov	[ecx+40h], eax
mov	[ecx+30h], eax
mov	[ecx+20h], eax
mov	dword ptr [ecx], offset	off_15FB54C
add	ecx, 18h
push	ecx
call	sub_63B060
retn
sub_63A130 endp

align 10h



sub_63A190 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+8]
test	al, 1
jnz	short loc_63A1A0

loc_63A19A:
xor	al, al
pop	esi
retn	4

loc_63A1A0:
xorps	xmm0, xmm0
comiss	xmm0, [esp+4+arg_0]
ja	short loc_63A19A
push	ebx
push	ebp
push	edi
test	al, 2
jz	loc_63A45B
mov	eax, [esi+20h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+20h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+30h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+30h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+40h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+40h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+50h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+50h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+60h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+60h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+70h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+70h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+80h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+80h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+90h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+90h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+0A0h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+0A0h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+0B0h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+0B0h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	loc_63A36B
mov	eax, [esi+0C0h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ecx, [esi+0C0h]
push	ecx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	short loc_63A36B
mov	eax, [esi+0D0h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ebp, [esi+0D0h]
push	ecx
mov	ecx, ebp
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	short loc_63A36B
mov	eax, [esi+0E0h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	ebx, [esi+0E0h]
push	ecx
mov	ecx, ebx
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	short loc_63A36B
mov	eax, [esi+0F0h]
fld	[esp+10h+arg_0]
mov	edx, [eax+10h]
lea	edi, [esi+0F0h]
push	ecx
mov	ecx, edi
fstp	[esp+14h+var_14]
call	edx
test	al, al
jz	short loc_63A36B
mov	eax, [esi+10h]
test	byte ptr [eax+18h], 4
jnz	short loc_63A374
mov	edx, [esi]
mov	eax, [edx+34h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_63A374

loc_63A36B:
pop	edi
pop	ebp
pop	ebx
xor	al, al
pop	esi
retn	4

loc_63A374:
lea	eax, [esi+20h]
call	sub_639460
test	al, al
jnz	loc_63A44F
lea	eax, [esi+30h]
call	sub_639460
test	al, al
jnz	loc_63A44F
lea	eax, [esi+40h]
call	sub_639460
test	al, al
jnz	loc_63A44F
lea	eax, [esi+50h]
call	sub_639460
test	al, al
jnz	loc_63A44F
lea	eax, [esi+60h]
call	sub_639460
test	al, al
jnz	loc_63A44F
lea	eax, [esi+70h]
call	sub_639460
test	al, al
jnz	short loc_63A44F
lea	eax, [esi+80h]
call	sub_639460
test	al, al
jnz	short loc_63A44F
lea	eax, [esi+90h]
call	sub_639460
test	al, al
jnz	short loc_63A44F
lea	eax, [esi+0A0h]
call	sub_639460
test	al, al
jnz	short loc_63A44F
lea	eax, [esi+0B0h]
call	sub_639460
test	al, al
jnz	short loc_63A44F
lea	eax, [esi+0C0h]
call	sub_639460
test	al, al
jnz	short loc_63A44F
mov	eax, ebp
call	sub_639460
test	al, al
jnz	short loc_63A44F
mov	eax, ebx
call	sub_639460
test	al, al
jnz	short loc_63A44F
mov	eax, edi
call	sub_639460
test	al, al
jnz	short loc_63A44F
mov	al, al
xor	al, [esi+8]
pop	edi
pop	ebp
and	al, 2
xor	[esi+8], al
pop	ebx
mov	al, 1
pop	esi
retn	4

loc_63A44F:
mov	al, 1
add	al, al
xor	al, [esi+8]
and	al, 2
xor	[esi+8], al

loc_63A45B:
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
retn	4
sub_63A190 endp

align 10h



sub_63A470 proc	near
push	0Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_63A490
and	byte ptr [eax+4], 0FEh
mov	dword ptr [eax+8], 0
mov	dword ptr [eax], offset	off_15FB658
retn

loc_63A490:
xor	eax, eax
retn
sub_63A470 endp

align 10h



sub_63A4A0 proc	near

var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
test	byte ptr [eax+18h], 4
jnz	loc_63A534
cmp	dword ptr [esi+100h], 0
jnz	short loc_63A534
mov	ecx, dword_18899F4
mov	edx, [ecx]
mov	edx, [edx+1A8h]
lea	eax, [esp+0Ch+var_8]
push	eax
push	4
mov	[esp+14h+var_8], 0
call	edx
test	al, al
jz	short loc_63A50B
mov	eax, [esi+10h]
mov	edx, [esp+0Ch+var_8]
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	[esp+10h+var_4], 0
mov	eax, [eax+38h]
push	edx
push	eax
call	?addDSP@ChannelGroup@FMOD@@QAG?AW4FMOD_RESULT@@PAVDSP@2@PAPAVDSPConnection@2@@Z	; FMOD::ChannelGroup::addDSP(FMOD::DSP *,FMOD::DSPConnection * *)
test	eax, eax
mov	eax, [esp+0Ch+var_8]
jz	short loc_63A512
push	eax
call	?release@DSP@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::DSP::release(void)

loc_63A50B:
xor	al, al
pop	esi
add	esp, 8
retn

loc_63A512:
mov	ecx, [esp+0Ch+var_4]
fld1
push	ecx
fstp	[esp+10h+var_10]
push	3
push	eax
mov	[esi+100h], eax
mov	[esi+104h], ecx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	short loc_63A50B

loc_63A534:
mov	al, 1
pop	esi
add	esp, 8
retn
sub_63A4A0 endp

align 10h



sub_63A540 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+100h]
test	eax, eax
jz	short loc_63A553
push	eax
call	?release@DSP@FMOD@@QAG?AW4FMOD_RESULT@@XZ ; FMOD::DSP::release(void)

loc_63A553:
mov	dword ptr [esi+104h], 0
pop	esi
retn
sub_63A540 endp

align 10h



sub_63A560 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+100h]
test	eax, eax
jz	loc_63A7D7
fld	dword ptr [esi+24h]
push	ecx
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fmul	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	0
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jz	short loc_63A5A0

loc_63A59B:
xor	al, al
pop	esi
pop	ecx
retn

loc_63A5A0:
fld	dword ptr [esi+34h]
mov	eax, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fmul	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	1
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	short loc_63A59B
fld	dword ptr [esi+44h]
push	ecx
mov	ecx, [esi+100h]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fmul	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	2
push	ecx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	short loc_63A59B
fld	dword ptr [esi+54h]
mov	edx, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	4
push	edx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+64h]
mov	eax, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	5
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+74h]
push	ecx
mov	ecx, [esi+100h]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fmul	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	6
push	ecx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+84h]
mov	edx, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	7
push	edx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+94h]
mov	eax, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fmul	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	8
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+0A4h]
push	ecx
mov	ecx, [esi+100h]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	9
push	ecx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+0B4h]
mov	edx, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	0Ah
push	edx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+0C4h]
mov	eax, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	0Bh
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+0D4h]
push	ecx
mov	ecx, [esi+100h]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	0Ch
push	ecx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+0E4h]
mov	edx, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fmul	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	0Dh
push	edx
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B
fld	dword ptr [esi+0F4h]
mov	eax, [esi+100h]
fstp	[esp+8+var_4]
push	ecx
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
push	0Eh
push	eax
call	?setParameter@DSP@FMOD@@QAG?AW4FMOD_RESULT@@HM@Z ; FMOD::DSP::setParameter(int,float)
test	eax, eax
jnz	loc_63A59B

loc_63A7D7:
mov	al, 1
pop	esi
pop	ecx
retn
sub_63A560 endp

align 10h



sub_63A7E0 proc	near

var_50=	byte ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12E75C8
mov	eax, large fs:0
push	eax
sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+54h+var_C]
mov	large fs:0, eax
lea	eax, [esp+54h+var_50]
call	sub_63B610
mov	[esp+54h+var_4], 0
movss	xmm0, dword_1889D7C
mov	ecx, [esp+54h+arg_0]
movss	[esp+54h+var_44], xmm0
movss	xmm0, dword_17F1CF4
mov	eax, [ecx]
movss	[esp+54h+var_40], xmm0
movss	xmm0, dword_1889D88
mov	eax, [eax+4]
movss	[esp+54h+var_3C], xmm0
movss	xmm0, ds:dword_1479C54
movss	[esp+54h+var_38], xmm0
movss	xmm0, ds:dword_1479C58
movss	[esp+54h+var_34], xmm0
movss	xmm0, dword_17F1D00
movss	[esp+54h+var_30], xmm0
movss	xmm0, ds:dword_1479C5C
movss	[esp+54h+var_2C], xmm0
movss	xmm0, dword_1889D94
movss	[esp+54h+var_28], xmm0
movss	xmm0, ds:dword_1479C60
movss	[esp+54h+var_24], xmm0
movss	xmm0, ds:flt_1479C64
movss	[esp+54h+var_20], xmm0
movss	[esp+54h+var_1C], xmm0
movss	xmm0, ds:flt_1479C6C
movss	[esp+54h+var_18], xmm0
movss	xmm0, dword_1889D9C
lea	edx, [esp+54h+var_50]
movss	[esp+54h+var_14], xmm0
movss	xmm0, ds:flt_1479C70
push	edx
mov	[esp+58h+var_4C], 1
movss	[esp+58h+var_10], xmm0
call	eax
test	al, al
setnz	al
mov	ecx, [esp+54h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 50h
retn	4
sub_63A7E0 endp

align 10h



; int __stdcall	sub_63A900(int,	float)
sub_63A900 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_50=	byte ptr -50h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12E7598
mov	eax, large fs:0
push	eax
sub	esp, 44h
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+58h+var_C]
mov	large fs:0, eax
mov	esi, ecx
lea	eax, [esp+58h+var_50]
call	sub_63B610
mov	ecx, [esp+58h+arg_0]
mov	[esp+58h+var_4], 0
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+58h+var_50]
push	edx
call	eax
test	al, al
jnz	short loc_63A95E
mov	ecx, [esp+58h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 50h
retn	8

loc_63A95E:
fld	[esp+58h+arg_4]
mov	edx, [esi+20h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+20h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_44]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+30h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+30h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+40h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+40h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_3C]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+50h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+50h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_38]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+60h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+60h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_34]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+70h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+70h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_30]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+80h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+80h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_2C]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+90h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+90h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_28]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+0A0h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+0A0h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_24]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+0B0h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+0B0h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_20]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+0C0h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+0C0h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_1C]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+0D0h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+0D0h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_18]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+0E0h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+0E0h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_14]
fstp	[esp+60h+var_60]
call	eax
fld	[esp+58h+arg_4]
mov	edx, [esi+0F0h]
mov	eax, [edx+0Ch]
sub	esp, 8
lea	ecx, [esi+0F0h]
fstp	[esp+60h+var_5C]
fld	[esp+60h+var_10]
fstp	[esp+60h+var_60]
call	eax
or	byte ptr [esi+8], 2
mov	al, 1
mov	ecx, [esp+58h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 50h
retn	8
sub_63A900 endp

align 10h



; int __thiscall sub_63AB40(void *, char)
sub_63AB40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	eax, [esi+18h]
push	eax
mov	dword ptr [esi], offset	off_15FB54C
call	sub_63B060
test	[esp+4+arg_0], 1
jz	short loc_63AB62
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63AB62:
mov	eax, esi
pop	esi
retn	4
sub_63AB40 endp

align 10h



sub_63AB70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
test	byte ptr [esi+8], 1
jnz	short loc_63ABF4
push	ebx
mov	ebx, [esp+8+arg_8]
push	ebp
mov	ebp, [esp+0Ch+arg_C]
push	edi
mov	edi, [esp+10h+arg_0]
jmp	short loc_63AB90
align 10h

loc_63AB90:
mov	edx, [esi+4]
lea	ecx, [esp+10h+arg_C]
mov	[esi+0Ch], edi
mov	[esi+10h], ebp
mov	byte ptr [esp+10h+arg_C], 0
mov	eax, [edi]
mov	eax, [eax+70h]
push	ecx
push	edx
mov	ecx, edi
call	eax
test	al, al
jz	short loc_63ABE2
cmp	byte ptr [esp+10h+arg_C], 0
jnz	short loc_63ABC5
mov	edx, [esi]
mov	eax, [edx+1Ch]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_63ABE2

loc_63ABC5:
mov	edx, [esi]
mov	eax, [esp+10h+arg_4]
mov	edx, [edx+28h]
push	ebx
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63ABE2
or	byte ptr [esi+8], 1
test	byte ptr [esi+8], 1
jz	short loc_63AB90

loc_63ABE2:
test	byte ptr [esi+8], 1
pop	edi
pop	ebp
pop	ebx
jnz	short loc_63ABF4
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx

loc_63ABF4:
mov	al, [esi+8]
and	al, 1
pop	esi
retn	10h
sub_63AB70 endp

align 10h



sub_63AC00 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebx, 1
push	edi
test	[esi+8], bl
jnz	loc_63ACB6
mov	ebp, [esp+14h+arg_0]
lea	esp, [esp+0]

loc_63AC20:
mov	eax, [esp+14h+arg_4]
mov	ecx, [esi+4]
mov	[esi+10h], eax
lea	eax, [esp+14h+arg_0]
mov	[esi+0Ch], ebp
mov	byte ptr [esp+14h+arg_0], 0
mov	edx, [ebp+0]
mov	edx, [edx+14h]
push	eax
push	ecx
mov	ecx, ebp
call	edx
test	al, al
jz	short loc_63ACA8
cmp	byte ptr [esp+14h+arg_0], 0
jnz	short loc_63AC5A
mov	eax, [esi]
mov	edx, [eax+1Ch]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63ACA8

loc_63AC5A:
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
mov	edi, eax
mov	eax, [esi]
mov	edx, [eax+24h]
push	edi
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63AC9B
lea	eax, [esp+14h+var_4]
mov	dword ptr [esp+14h+var_4], edi
push	eax
lea	edi, [esi+18h]
call	sub_636BF0
mov	ecx, [edi+4]
mov	[eax], edi
mov	[eax+4], ecx
mov	[ecx], eax
mov	[edi+4], eax
or	[esi+8], bl
test	[esi+8], bl
jz	short loc_63AC20
jmp	short loc_63ACA8

loc_63AC9B:
test	edi, edi
jz	short loc_63ACA8
mov	edx, [edi]
mov	eax, [edx]
push	ebx
mov	ecx, edi
call	eax

loc_63ACA8:
test	[esi+8], bl
jnz	short loc_63ACB6
mov	edx, [esi]
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax

loc_63ACB6:
mov	al, [esi+8]
pop	edi
pop	esi
pop	ebp
and	al, bl
pop	ebx
pop	ecx
retn	8
sub_63AC00 endp

align 10h



sub_63ACD0 proc	near

var_8= dword ptr -8

push	esi
mov	esi, ecx
test	byte ptr [esi+8], 1
jz	short loc_63AD07
fldz
mov	eax, [esi]
mov	eax, [eax+30h]
push	ecx
mov	ecx, [esi+18h]
fstp	[esp+8+var_8]
mov	edx, [ecx+8]
push	edx
mov	ecx, esi
call	eax
fldz
mov	edx, [esi]
mov	eax, [edx+10h]
push	ecx
mov	ecx, esi
fstp	[esp+8+var_8]
call	eax
mov	edx, [esi]
mov	eax, [edx+20h]
mov	ecx, esi
call	eax

loc_63AD07:
mov	edx, [esi]
mov	eax, [edx+2Ch]
mov	ecx, esi
call	eax
and	byte ptr [esi+8], 0FEh
pop	esi
retn
sub_63ACD0 endp

align 10h



sub_63AD20 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	esi
mov	esi, ecx
test	byte ptr [esi+8], 1
jnz	short loc_63AD33

loc_63AD2C:
xor	al, al
pop	esi
add	esp, 0Ch
retn

loc_63AD33:
lea	eax, [esp+10h+var_4]
push	eax
lea	ecx, [esp+14h+var_C]
push	ecx
lea	edx, [esp+18h+var_8]
push	edx
push	esi
mov	[esp+20h+var_8], 0
mov	[esp+20h+var_C], 0
mov	[esp+20h+var_4], 0
call	sub_63AF30
test	al, al
jz	short loc_63AD2C
mov	eax, [esp+10h+var_8]
push	edi
mov	edi, [esp+14h+var_C]
cmp	edi, eax
jz	short loc_63ADB5
test	eax, eax
jz	short loc_63AD84
mov	ecx, [edi+2Ch]
cmp	ecx, [eax+2Ch]
ja	short loc_63AD84
movss	xmm0, dword ptr	[eax+34h]
jmp	short loc_63AD89

loc_63AD84:
movss	xmm0, dword ptr	[edi+30h]

loc_63AD89:
mov	edx, [esi]
mov	eax, [esp+14h+var_4]
mov	edx, [edx+30h]
push	ecx
movss	[esp+18h+var_8], xmm0
fld	[esp+18h+var_8]
fstp	[esp+18h+var_18]
push	eax
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_63ADAF
pop	edi
pop	esi
add	esp, 0Ch
retn

loc_63ADAF:
mov	eax, [edi+28h]
mov	[esi+14h], eax

loc_63ADB5:
pop	edi
mov	al, 1
pop	esi
add	esp, 0Ch
retn
sub_63AD20 endp

align 10h



sub_63ADC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
mov	eax, [ebp+0]
mov	edx, [eax+0Ch]
push	esi
push	edi
mov	edi, ecx
push	4
lea	ecx, [esp+18h+var_4]
push	ecx
xor	ebx, ebx
mov	ecx, ebp
mov	[esp+1Ch+var_4], ebx
call	edx
test	al, al
jz	short loc_63AE4E
mov	eax, edi
call	sub_63AED0
test	al, al
jz	short loc_63AE4E
cmp	[esp+14h+var_4], ebx
jbe	short loc_63AE3A

loc_63ADF7:
mov	eax, [edi]
mov	edx, [eax+18h]
mov	ecx, edi
call	edx
mov	ecx, [esp+14h+arg_4]
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	ebp
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63AE44
lea	eax, [esp+14h+arg_0]
mov	[esp+14h+arg_0], esi
push	eax
lea	esi, [edi+18h]
call	sub_636BF0
mov	ecx, [esi+4]
mov	[eax], esi
mov	[eax+4], ecx
mov	[ecx], eax
inc	ebx
mov	[esi+4], eax
cmp	ebx, [esp+14h+var_4]
jb	short loc_63ADF7

loc_63AE3A:
mov	al, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_63AE44:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_63AE4E:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	8
sub_63ADC0 endp

align 10h



sub_63AE60 proc	near
push	ebx
push	esi
lea	ebx, [ecx+18h]
push	edi
mov	edi, [ebx]
cmp	edi, ebx
setnz	al
test	al, al
jz	short loc_63AE92

loc_63AE71:
mov	esi, [edi+8]
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
mov	edi, [edi]
cmp	edi, ebx
setnz	al
test	al, al
jnz	short loc_63AE71

loc_63AE92:
mov	esi, [ebx]
cmp	esi, ebx
jz	short loc_63AEAB

loc_63AE98:
mov	eax, esi
mov	esi, [esi]
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8
cmp	esi, ebx
jnz	short loc_63AE98

loc_63AEAB:
pop	edi
pop	esi
mov	[ebx+4], ebx
mov	[ebx], ebx
pop	ebx
retn
sub_63AE60 endp

align 10h



sub_63AEC0 proc	near
or	byte ptr [ecx+8], 2
mov	al, 1
retn	8
sub_63AEC0 endp

align 10h



sub_63AED0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+18h]
push	edi
mov	ecx, esi
call	edx
mov	edi, eax
mov	eax, [esi]
mov	edx, [eax+24h]
push	edi
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_63AF02
test	edi, edi
jz	short loc_63AEFC
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_63AEFC:
xor	al, al
pop	edi
pop	esi
pop	ecx
retn

loc_63AF02:
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], edi
add	esi, 18h
call	sub_636BF0
mov	ecx, [esi+4]
mov	[eax], esi
mov	[eax+4], ecx
mov	[ecx], eax
mov	[esi+4], eax
pop	edi
mov	al, 1
pop	esi
pop	ecx
retn
sub_63AED0 endp

align 10h



sub_63AF30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	0FFFFFFFFh
push	offset loc_12FF498
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	ebp, [esp+2Ch+arg_0]
mov	eax, [esp+2Ch+arg_4]
mov	esi, [ebp+18h]
mov	ecx, [esp+2Ch+arg_8]
mov	edx, [esp+2Ch+arg_C]
add	ebp, 18h
xor	ebx, ebx
cmp	esi, ebp
mov	[eax], ebx
setnz	al
mov	[ecx], ebx
mov	[edx], ebx
cmp	al, bl
jz	loc_63B02D
jmp	short loc_63AF90
db 8Dh,	0A4h, 24h, 4 dup(0)
jmp	short loc_63AF90
align 10h

loc_63AF90:
mov	edi, [esi+8]
mov	[esp+2Ch+var_18], offset off_15FB674
mov	[esp+2Ch+var_14], ebx
mov	[esp+2Ch+var_10], 5
mov	[esp+2Ch+var_4], ebx
mov	eax, [edi]
mov	edx, [eax+10h]
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	loc_63B045
mov	eax, [esp+2Ch+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [esp+2Ch+var_14]
mov	edx, [edx+7Ch]
push	eax
call	edx
cmp	eax, ebx
jz	short loc_63B045
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [ecx+14h]
cmp	edx, [esp+2Ch+var_14]
jnz	short loc_63AFEB
mov	ecx, [esp+2Ch+arg_4]
mov	[ecx], eax

loc_63AFEB:
cmp	[eax+4], ebx
jz	short loc_63B00E
mov	edx, [esp+2Ch+arg_8]
mov	ecx, [edx]
cmp	ecx, ebx
jz	short loc_63B002
mov	edx, [eax+2Ch]
cmp	edx, [ecx+2Ch]
jbe	short loc_63B00E

loc_63B002:
mov	ecx, [esp+2Ch+arg_8]
mov	edx, [esp+2Ch+arg_C]
mov	[ecx], eax
mov	[edx], edi

loc_63B00E:
mov	[esp+2Ch+var_4], 0FFFFFFFFh
mov	esi, [esi]
cmp	esi, ebp
setnz	al
mov	[esp+2Ch+var_18], offset off_15FB674
cmp	al, bl
jnz	loc_63AF90

loc_63B02D:
mov	al, 1

loc_63B02F:
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	10h

loc_63B045:
mov	[esp+2Ch+var_4], 0FFFFFFFFh
mov	[esp+2Ch+var_18], offset off_15FB674
xor	al, al
jmp	short loc_63B02F
sub_63AF30 endp

align 10h



sub_63B060 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1301628
mov	eax, large fs:0
push	eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	edi, [esp+18h+arg_0]
mov	[esp+18h+var_4], 0FFFFFFFFh
mov	esi, [edi]
cmp	esi, edi
jz	short loc_63B0A7

loc_63B094:
mov	eax, esi
mov	esi, [esi]
push	0Ch
push	eax
call	sub_77E0D0
add	esp, 8
cmp	esi, edi
jnz	short loc_63B094

loc_63B0A7:
mov	[edi+4], edi
mov	[edi], edi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_63B060 endp




sub_63B0C0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
cmp	eax, ecx
jz	short locret_63B0DC
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]

locret_63B0DC:
retn	4
sub_63B0C0 endp

align 10h


; Attributes: bp-based frame

sub_63B0E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_0]
fsub	dword ptr [edx+4]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomi	st, st(1)
fstp	st(1)
jbe	short loc_63B152
fld	dword ptr [ecx+8]
fsub	dword ptr [edx+8]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_63B154
fld	dword ptr [edx+0Ch]
sub	esp, 8
fstp	[esp+10h+var_C]
fld	dword ptr [ecx+0Ch]
fstp	[esp+10h+var_10]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63B154
mov	esp, ebp
pop	ebp
retn	4

loc_63B152:
fstp	st

loc_63B154:
xor	al, al
mov	esp, ebp
pop	ebp
retn	4
sub_63B0E0 endp

align 10h



sub_63B160 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+4]
push	edx
call	eax
cmp	al, 1
setnz	al
retn	4
sub_63B160 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_63B180(float, float)
sub_63B180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
fld	dword ptr [ecx+4]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	st
fsub	dword ptr [ecx+8]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomi	st, st(1)
fstp	st(1)
fld	[ebp+arg_0]
jbe	short loc_63B1D8
fld	st(2)
fsub	st, st(1)
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fxch	st(2)
fcomi	st, st(2)
fstp	st(2)
ja	short loc_63B20A

loc_63B1D8:
fld	[ebp+arg_4]
movss	xmm0, [ebp+arg_0]
fld	st
movss	dword ptr [ecx+8], xmm0
fldz
fsubrp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fxch	st(3)
fcomip	st, st(3)
fstp	st(2)
jbe	short loc_63B216
movss	dword ptr [ecx+4], xmm0

loc_63B20A:
fstp	st(2)
fstp	st
fstp	st
mov	esp, ebp
pop	ebp
retn	8

loc_63B216:
fsubrp	st(2), st
fdivp	st(1), st
fstp	dword ptr [ecx+0Ch]
mov	esp, ebp
pop	ebp
retn	8
sub_63B180 endp

align 10h


; Attributes: bp-based frame

sub_63B230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
xorps	xmm1, xmm1
sub	esp, 8
comiss	xmm1, [ebp+arg_0]
jbe	short loc_63B24A
xor	al, al
mov	esp, ebp
pop	ebp
retn	4

loc_63B24A:
fld	dword ptr [ecx+4]
fstp	[esp+8+var_4]
fld	dword ptr [ecx+8]
fstp	[esp+8+var_8]
fld	[esp+8+var_4]
fld	st
fld	[esp+8+var_8]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
ja	loc_63B320
movss	xmm0, dword ptr	[ecx+0Ch]
comiss	xmm0, xmm1
movss	[esp+8+var_4], xmm0
fld	[esp+8+var_4]
fmul	[ebp+arg_0]
faddp	st(2), st
fxch	st(1)
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fst	dword ptr [ecx+4]
jbe	short loc_63B2E7
fstp	[esp+8+var_8]
fstp	[esp+8+var_4]
fld	[esp+8+var_8]
fld	[esp+8+var_4]
fcomip	st, st(1)
fstp	st
jbe	short loc_63B2D4
movss	xmm0, [esp+8+var_8]
movss	dword ptr [ecx+4], xmm0
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4

loc_63B2D4:
movss	xmm0, [esp+8+var_4]
movss	dword ptr [ecx+4], xmm0
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4

loc_63B2E7:
fstp	[esp+8+var_4]
fstp	[esp+8+var_8]
fld	[esp+8+var_8]
fld	[esp+8+var_4]
fcomip	st, st(1)
fstp	st
jbe	short loc_63B30E
movss	xmm0, [esp+8+var_4]
movss	dword ptr [ecx+4], xmm0
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4

loc_63B30E:
movss	xmm0, [esp+8+var_8]
movss	dword ptr [ecx+4], xmm0
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4

loc_63B320:
fstp	st
mov	al, 1
fstp	st
mov	esp, ebp
pop	ebp
retn	4
sub_63B230 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12E7590

loc_63B330:
mov	dword ptr [ecx], offset	off_15FB674
retn
; END OF FUNCTION CHUNK	FOR sub_12E7590
align 10h



sub_63B340 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
cmp	eax, ecx
jz	short locret_63B35C
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]

locret_63B35C:
retn	4
sub_63B340 endp

align 10h


; Attributes: bp-based frame

sub_63B360 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
sub	esp, 8
cmp	edx, [eax+4]
jnz	short loc_63B3A8
mov	edx, [ecx+8]
cmp	edx, [eax+8]
jnz	short loc_63B3A8
fld	dword ptr [ecx+0Ch]
fsub	dword ptr [eax+0Ch]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
jbe	short loc_63B3A8
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4

loc_63B3A8:
xor	al, al
mov	esp, ebp
pop	ebp
retn	4
sub_63B360 endp




sub_63B3B0 proc	near
push	10h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
xor	ecx, ecx
add	esp, 4
cmp	eax, ecx
jz	short loc_63B3DA
movss	xmm0, dword_196855C
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_15FB5CC
movss	dword ptr [eax+0Ch], xmm0
mov	[eax+8], ecx
retn

loc_63B3DA:
xor	eax, eax
retn
sub_63B3B0 endp

align 10h



sub_63B3E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	edx, [esi]
push	edi
mov	edi, ecx
mov	eax, [edi+8]
add	eax, 4
push	4
push	eax
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_63B403
pop	edi
pop	esi
retn	8

loc_63B403:
mov	edi, [edi+8]
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	4
add	edi, 0Ch
push	edi
mov	ecx, esi
call	eax
test	al, al
pop	edi
setnz	al
pop	esi
retn	8
sub_63B3E0 endp

align 10h



sub_63B420 proc	near
push	10h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_63B450
movss	xmm0, dword_1889E10
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], offset	off_15FB5CC
movss	dword ptr [eax+0Ch], xmm0
mov	dword ptr [eax+8], 1
retn

loc_63B450:
xor	eax, eax
retn
sub_63B420 endp

align 10h


; Attributes: thunk

sub_63B460 proc	near
jmp	sub_63BB80
sub_63B460 endp

align 10h



sub_63B470 proc	near
push	10h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_63B4A0
movss	xmm0, dword_17F1E30
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], offset	off_15FB5CC
movss	dword ptr [eax+0Ch], xmm0
mov	dword ptr [eax+8], 2
retn

loc_63B4A0:
xor	eax, eax
retn
sub_63B470 endp

align 10h



sub_63B4B0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
cmp	eax, ecx
jz	short locret_63B4D2
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+10h]

locret_63B4D2:
retn	4
sub_63B4B0 endp

align 10h


; Attributes: bp-based frame

sub_63B4E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ecx+4]
mov	edx, [ebp+arg_0]
sub	esp, 8
cmp	eax, [edx+4]
jnz	short loc_63B542
mov	eax, [ecx+8]
cmp	eax, [edx+8]
jnz	short loc_63B542
fld	dword ptr [ecx+0Ch]
fsub	dword ptr [edx+0Ch]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
jbe	short loc_63B542
fld	dword ptr [edx+10h]
sub	esp, 8
fstp	[esp+10h+var_C]
fld	dword ptr [ecx+10h]
fstp	[esp+10h+var_10]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63B542
mov	esp, ebp
pop	ebp
retn	4

loc_63B542:
xor	al, al
mov	esp, ebp
pop	ebp
retn	4
sub_63B4E0 endp

align 10h



sub_63B550 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+14h]
push	edx
call	eax
cmp	al, 1
setnz	al
retn	4
sub_63B550 endp

align 10h



sub_63B570 proc	near
push	14h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_63B5AD
movss	xmm0, dword_17F1E74
movss	dword ptr [eax+0Ch], xmm0
movss	xmm0, dword_17F1E78
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], offset	off_15FB604
movss	dword ptr [eax+10h], xmm0
mov	dword ptr [eax+8], 3
retn

loc_63B5AD:
xor	eax, eax
retn
sub_63B570 endp




sub_63B5B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	edx, [esi]
push	edi
mov	edi, ecx
mov	eax, [edi+8]
add	eax, 4
push	4
push	eax
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_63B5D5

loc_63B5CE:
pop	edi
xor	al, al
pop	esi
retn	8

loc_63B5D5:
mov	edi, [edi+8]
mov	edx, [esi]
mov	edx, [edx+0Ch]
push	4
lea	eax, [edi+0Ch]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63B5CE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
add	edi, 10h
push	edi
mov	ecx, esi
call	edx
test	al, al
pop	edi
setnz	al
pop	esi
retn	8
sub_63B5B0 endp

align 10h



sub_63B610 proc	near
movss	xmm0, dword_1889EB4
movss	dword ptr [eax+0Ch], xmm0
movss	xmm0, dword_17F1EC4
movss	dword ptr [eax+10h], xmm0
movss	xmm0, dword_1889EC0
movss	dword ptr [eax+14h], xmm0
movss	xmm0, ds:dword_1479C54
movss	dword ptr [eax+18h], xmm0
movss	xmm0, ds:dword_1479C58
movss	dword ptr [eax+1Ch], xmm0
movss	xmm0, dword_17F1ED0
movss	dword ptr [eax+20h], xmm0
movss	xmm0, ds:dword_1479C5C
movss	dword ptr [eax+24h], xmm0
movss	xmm0, dword_1889ECC
movss	dword ptr [eax+28h], xmm0
movss	xmm0, ds:dword_1479C60
movss	dword ptr [eax+2Ch], xmm0
movss	xmm0, ds:flt_1479C64
movss	dword ptr [eax+30h], xmm0
movss	dword ptr [eax+34h], xmm0
movss	xmm0, ds:flt_1479C6C
movss	dword ptr [eax+38h], xmm0
movss	xmm0, dword_1889ED4
movss	dword ptr [eax+3Ch], xmm0
movss	xmm0, ds:flt_1479C70
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], offset	off_15FB63C
movss	dword ptr [eax+40h], xmm0
mov	dword ptr [eax+8], 4
retn
sub_63B610 endp

align 10h



; int __thiscall sub_63B6E0(void *, char)
sub_63B6E0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FB674
jz	short loc_63B6F9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63B6F9:
mov	eax, esi
pop	esi
retn	4
sub_63B6E0 endp

align 10h



sub_63B700 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
cmp	eax, ecx
jz	short locret_63B76A
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+10h]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+14h]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+18h]
fld	dword ptr [ecx+1Ch]
fstp	dword ptr [eax+1Ch]
fld	dword ptr [ecx+20h]
fstp	dword ptr [eax+20h]
fld	dword ptr [ecx+24h]
fstp	dword ptr [eax+24h]
fld	dword ptr [ecx+28h]
fstp	dword ptr [eax+28h]
fld	dword ptr [ecx+2Ch]
fstp	dword ptr [eax+2Ch]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
fld	dword ptr [ecx+34h]
fstp	dword ptr [eax+34h]
fld	dword ptr [ecx+38h]
fstp	dword ptr [eax+38h]
fld	dword ptr [ecx+3Ch]
fstp	dword ptr [eax+3Ch]
fld	dword ptr [ecx+40h]
fstp	dword ptr [eax+40h]

locret_63B76A:
retn	4
sub_63B700 endp

align 10h



sub_63B770 proc	near
mov	eax, [ecx]
mov	eax, [eax+10h]
jmp	eax
sub_63B770 endp

align 10h


; Attributes: bp-based frame

sub_63B780 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [ebp+arg_0]
cmp	eax, [edi+4]
jnz	loc_63B964
mov	ecx, [esi+8]
cmp	ecx, [edi+8]
jnz	loc_63B964
fld	dword ptr [esi+0Ch]
fsub	dword ptr [edi+0Ch]
fstp	[esp+10h+var_4]
fld	[esp+10h+var_4]
fabs
fstp	[esp+10h+var_4]
fld	[esp+10h+var_4]
fld	ds:flt_1479F24
fcomip	st, st(1)
fstp	st
jbe	loc_63B964
fld	dword ptr [edi+10h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+10h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+14h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+14h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+18h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+18h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+1Ch]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+1Ch]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+20h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+20h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+24h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+24h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+28h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+28h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+2Ch]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+2Ch]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	loc_63B964
fld	dword ptr [edi+30h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+30h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63B964
fld	dword ptr [edi+34h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+34h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63B964
fld	dword ptr [edi+38h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+38h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63B964
fld	dword ptr [edi+3Ch]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+3Ch]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63B964
fld	dword ptr [edi+40h]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	dword ptr [esi+40h]
fstp	[esp+18h+var_18]
call	sub_632C80
add	esp, 8
cmp	al, 1
jnz	short loc_63B964
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_63B964:
pop	edi
xor	al, al
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_63B780 endp

align 10h



sub_63B970 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+4], 1
jnz	short loc_63B995
mov	eax, [esi]
mov	edx, [eax+14h]
call	edx
mov	ecx, [esp+4+arg_0]
mov	[esi+8], eax
mov	edx, [eax]
mov	edx, [edx+4]
push	ecx
mov	ecx, eax
call	edx
or	byte ptr [esi+4], 1

loc_63B995:
mov	al, [esi+4]
and	al, 1
pop	esi
retn	4
sub_63B970 endp

align 10h



sub_63B9A0 proc	near
push	44h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_63B9B3
jmp	sub_63B610

loc_63B9B3:
xor	eax, eax
retn
sub_63B9A0 endp

align 10h



sub_63B9C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	edx, [esi]
push	edi
mov	edi, ecx
mov	eax, [edi+8]
add	eax, 4
push	4
push	eax
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_63B9E5

loc_63B9DE:
pop	edi
xor	al, al
pop	esi
retn	8

loc_63B9E5:
mov	edi, [edi+8]
mov	edx, [esi]
mov	edx, [edx+0Ch]
push	4
lea	eax, [edi+0Ch]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+10h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+14h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+18h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+1Ch]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+20h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+24h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+28h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+2Ch]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+30h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+34h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+38h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
lea	ecx, [edi+3Ch]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_63B9DE
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
add	edi, 40h
push	edi
mov	ecx, esi
call	edx
test	al, al
pop	edi
setnz	al
pop	esi
retn	8
sub_63B9C0 endp

align 10h



sub_63BB20 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
cmp	eax, ecx
jz	short locret_63BB36
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
mov	[eax+8], ecx

locret_63BB36:
retn	4
sub_63BB20 endp

align 10h



sub_63BB40 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+4]
mov	eax, [esp+arg_0]
cmp	edx, [eax+4]
jnz	short loc_63BB59
mov	ecx, [ecx+8]
cmp	ecx, [eax+8]
jnz	short loc_63BB59
mov	al, 1
retn	4

loc_63BB59:
xor	al, al
retn	4
sub_63BB40 endp

align 10h



; int __thiscall sub_63BB60(void *, char)
sub_63BB60 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FB684
jz	short loc_63BB79
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63BB79:
mov	eax, esi
pop	esi
retn	4
sub_63BB60 endp

align 10h



sub_63BB80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	bl, 1
test	[esi+4], bl
jnz	short loc_63BBC8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_4]

loc_63BB95:
mov	eax, [esi]
mov	edx, [eax+14h]
mov	ecx, esi
call	edx
mov	[esi+8], eax
mov	eax, [esi]
mov	edx, [eax+18h]
push	edi
push	ebp
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63BBB8
or	[esi+4], bl
test	[esi+4], bl
jz	short loc_63BB95

loc_63BBB8:
pop	edi
pop	ebp
test	[esi+4], bl
jnz	short loc_63BBC8
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx

loc_63BBC8:
mov	al, [esi+4]
pop	esi
and	al, bl
pop	ebx
retn	8
sub_63BB80 endp

align 10h



sub_63BBE0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_63BBF9
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
mov	dword ptr [esi+8], 0

loc_63BBF9:
and	byte ptr [esi+4], 0FEh
pop	esi
retn
sub_63BBE0 endp

align 10h



sub_63BC00 proc	near

arg_0= dword ptr  4

mov	eax, ecx
test	byte ptr [eax+4], 1
jnz	short loc_63BC0D
xor	al, al
retn	4

loc_63BC0D:
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	eax, [eax+8]
mov	edx, [edx+4]
push	eax
call	edx
mov	al, 1
retn	4
sub_63BC00 endp

align 10h



sub_63BC30 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
add	eax, 4
push	4
push	eax
mov	eax, [edx+0Ch]
call	eax
test	al, al
setnz	al
retn	8
sub_63BC30 endp

align 10h



sub_63BC50 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	edi
xor	edi, edi
lea	ecx, [esp+8+var_1]
mov	[esi], edi
mov	[esi+4], edi
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	[esi+8], edi
mov	[esi+0Ch], edi
lea	ecx, [esp+8+var_1]
mov	[esi+10h], edi
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
lea	ecx, [esp+8+var_1]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	[esi+14h], edi
mov	[esi+18h], edi
lea	ecx, [esp+8+var_1]
mov	[esi+1Ch], edi
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	eax, esi
pop	edi
pop	ecx
retn
sub_63BC50 endp

align 10h



sub_63BCA0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130856D
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
lea	eax, [esi+14h]
push	eax
mov	[esp+18h+var_4], 0
call	sub_631B30
add	esi, 8
push	esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_631B30
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_63BCA0 endp

align 10h
; [00000005 BYTES: COLLAPSED FUNCTION std::_Init_locks::~_Init_locks(void). PRESS KEYPAD "+" TO	EXPAND]
align 10h



sub_63BD10 proc	near
lea	eax, ds:0[ecx*8]
sub	eax, ecx
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_63BD2E
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_63BD2E:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8
retn
sub_63BD10 endp

align 10h



sub_63BD40 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_0]
cmp	eax, [esp+4+arg_4]
jz	short loc_63BD77
jmp	short loc_63BD50
align 10h

loc_63BD50:
lea	ecx, [esp+4+var_1]
push	ecx
add	eax, 0FFFFFFE4h
push	eax		; void *
mov	[esp+0Ch+var_1], 0
call	sub_5C5110
mov	eax, [esp+0Ch+arg_0]
sub	eax, 1Ch
add	esp, 8
mov	[esp+4+arg_0], eax
cmp	eax, [esp+4+arg_4]
jnz	short loc_63BD50

loc_63BD77:
pop	ecx
retn
sub_63BD40 endp

align 10h



sub_63BD80 proc	near
cmp	dword_18899F8, 0
jz	short loc_63BD8C
xor	al, al
retn

loc_63BD8C:		; size_t
push	6Ch
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_63BDAB
push	esi
mov	esi, eax
call	sub_63C3E0
mov	dword_18899F8, eax
pop	esi
mov	al, 1
retn

loc_63BDAB:
xor	eax, eax
mov	dword_18899F8, eax
mov	al, 1
retn
sub_63BD80 endp

align 10h



sub_63BDC0 proc	near
mov	ecx, dword_18899F8
test	ecx, ecx
jz	short locret_63BDEE
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
mov	ecx, dword_18899F8
test	ecx, ecx
jz	short loc_63BDE4
mov	eax, [ecx]
mov	edx, [eax+38h]
push	1
call	edx

loc_63BDE4:
mov	dword_18899F8, 0

locret_63BDEE:
retn
sub_63BDC0 endp

align 10h



sub_63BDF0 proc	near
mov	eax, dword_18899F8
retn
sub_63BDF0 endp

align 10h



sub_63BE00 proc	near
mov	eax, 11h
retn
sub_63BE00 endp

align 10h



sub_63BE10 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	bl, 1
test	[esi+64h], bl
jnz	short loc_63BE70
jmp	short loc_63BE20
align 10h

loc_63BE20:
mov	ecx, dword_18899F4
test	ecx, ecx
jz	short loc_63BE62
call	sub_5F18C0
test	al, al
jz	short loc_63BE62
mov	eax, [esi]
mov	edx, [eax+3Ch]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63BE62
mov	eax, [esi]
mov	edx, [eax+5Ch]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63BE62
mov	eax, [esi]
mov	edx, [eax+64h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_63BE62
or	[esi+64h], bl
test	[esi+64h], bl
jz	short loc_63BE20

loc_63BE62:
test	[esi+64h], bl
jnz	short loc_63BE70
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx

loc_63BE70:
mov	al, [esi+64h]
pop	esi
and	al, bl
pop	ebx
retn
sub_63BE10 endp

align 10h



sub_63BE80 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+68h]
call	edx
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+40h]
mov	ecx, esi
call	edx
and	byte ptr [esi+64h], 0FEh
pop	esi
retn
sub_63BE80 endp

align 10h



; int __stdcall	sub_63BEB0(float)
sub_63BEB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

test	byte ptr [ecx+64h], 1
jz	short loc_63BEC9
fldz
fld	[esp+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_63BECE
fstp	st

loc_63BEC9:
xor	al, al
retn	4

loc_63BECE:
mov	eax, [ecx]
mov	edx, [eax+70h]
push	ecx
fstp	[esp+4+var_4]
call	edx
test	al, al
setnz	al
retn	4
sub_63BEB0 endp

align 10h



sub_63BEF0 proc	near

var_10=	dword ptr -10h

push	ebx
mov	ebx, ecx
test	byte ptr [ebx+64h], 1
jnz	short loc_63BEFD
xor	al, al
pop	ebx
retn

loc_63BEFD:
push	esi
mov	esi, [ebx+0Ch]
push	edi
lea	edi, [ebx+4]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_63BF34
mov	edi, edi

loc_63BF10:
mov	ecx, [esi+14h]
mov	eax, [ecx]
mov	edx, [eax+14h]
push	1
call	edx
test	al, al
jz	short loc_63BF47
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_63BF10

loc_63BF34:
mov	eax, [ebx]
fldz
mov	edx, [eax+0Ch]
push	ecx
mov	ecx, ebx
fstp	[esp+10h+var_10]
call	edx
test	al, al
jnz	short loc_63BF4D

loc_63BF47:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn

loc_63BF4D:
mov	eax, [ebx]
mov	edx, [eax+44h]
mov	ecx, ebx
call	edx
pop	edi
test	al, al
pop	esi
setnz	al
pop	ebx
retn
sub_63BEF0 endp

align 10h



; int __stdcall	sub_63BF60(int,	float)
sub_63BF60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+64h], 1
jnz	short loc_63BF6B

loc_63BF66:
xor	al, al
retn	8

loc_63BF6B:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+78h]
push	edx
call	eax
test	eax, eax
jz	short loc_63BF66
mov	edx, [eax]
fld	[esp+arg_4]
push	ecx
mov	ecx, eax
fstp	[esp+4+var_4]
mov	eax, [edx+10h]
call	eax
test	al, al
setnz	al
retn	8
sub_63BF60 endp

align 10h



sub_63BFA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+64h], 1
jnz	short loc_63BFAB

loc_63BFA6:
xor	al, al
retn	8

loc_63BFAB:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+78h]
push	edx
call	eax
test	eax, eax
jz	short loc_63BFA6
mov	ecx, [esp+arg_4]
mov	edx, [eax]
mov	edx, [edx+14h]
push	ecx
mov	ecx, eax
call	edx
test	al, al
setnz	al
retn	8
sub_63BFA0 endp

align 10h



; int __stdcall	sub_63BFE0(int,	float)
sub_63BFE0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+64h], 1
jnz	short loc_63BFEB
xor	al, al
retn	8

loc_63BFEB:
mov	eax, [ecx]
mov	edx, [eax+74h]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	edx
test	eax, eax
jnz	short loc_63C009
mov	ecx, esi
call	sub_435B80
xor	al, al
pop	esi
retn	8

loc_63C009:
mov	edx, [eax]
fld	[esp+4+arg_4]
push	ecx
mov	ecx, eax
fstp	[esp+8+var_8]
mov	eax, [edx+10h]
call	eax
test	al, al
setnz	al
pop	esi
retn	8
sub_63BFE0 endp

align 10h



sub_63C030 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+64h], 1
jnz	short loc_63C03B
xor	al, al
retn	8

loc_63C03B:
mov	eax, [ecx]
mov	edx, [eax+74h]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	edx
test	eax, eax
jnz	short loc_63C059
mov	ecx, esi
call	sub_435B80
xor	al, al
pop	esi
retn	8

loc_63C059:
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+14h]
push	ecx
mov	ecx, eax
call	edx
test	al, al
setnz	al
pop	esi
retn	8
sub_63C030 endp




sub_63C070 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+64h], 1
jnz	short loc_63C07B

loc_63C076:
xor	al, al
retn	4

loc_63C07B:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+78h]
push	edx
call	eax
test	eax, eax
jz	short loc_63C076
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+18h]
call	eax
test	al, al
setnz	al
retn	4
sub_63C070 endp

align 10h



sub_63C0A0 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+64h], 1
jnz	short loc_63C0AB
xor	al, al
retn	4

loc_63C0AB:
mov	eax, [ecx]
mov	edx, [eax+74h]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	edx
test	eax, eax
jnz	short loc_63C0C9
mov	ecx, esi
call	sub_435B80
xor	al, al
pop	esi
retn	4

loc_63C0C9:
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+18h]
call	eax
test	al, al
setnz	al
pop	esi
retn	4
sub_63C0A0 endp

align 10h



; int __stdcall	sub_63C0E0(int,	float)
sub_63C0E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+64h], 1
jnz	short loc_63C0EB

loc_63C0E6:
xor	al, al
retn	8

loc_63C0EB:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+80h]
push	edx
call	eax
test	eax, eax
jz	short loc_63C0E6
mov	edx, [eax]
fld	[esp+arg_4]
push	ecx
mov	ecx, eax
fstp	[esp+4+var_4]
mov	eax, [edx+10h]
call	eax
test	al, al
setnz	al
retn	8
sub_63C0E0 endp

align 10h



; int __stdcall	sub_63C120(int,	float)
sub_63C120 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+64h], 1
jnz	short loc_63C12B
xor	al, al
retn	8

loc_63C12B:
mov	eax, [ecx]
mov	edx, [eax+7Ch]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	edx
test	eax, eax
jnz	short loc_63C149
mov	ecx, esi
call	sub_435B80
xor	al, al
pop	esi
retn	8

loc_63C149:
mov	edx, [eax]
fld	[esp+4+arg_4]
push	ecx
mov	ecx, eax
fstp	[esp+8+var_8]
mov	eax, [edx+10h]
call	eax
test	al, al
setnz	al
pop	esi
retn	8
sub_63C120 endp

align 10h



sub_63C170 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130C0E0
mov	eax, large fs:0
push	eax
sub	esp, 24h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+44h+var_C]
mov	large fs:0, eax
mov	ebx, ecx
test	byte ptr [ebx+64h], 1
jnz	short loc_63C1A6
xor	al, al
jmp	loc_63C3C0

loc_63C1A6:
mov	eax, [ebx+14h]
mov	esi, [esp+44h+arg_0]
mov	[esi], eax
mov	eax, [ebx+44h]
mov	[esi+4], eax
add	esi, 8
mov	ecx, esi
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, esi
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, edi
jz	short loc_63C1D4
push	edi		; int
push	eax		; void *
push	esi		; int
call	sub_636AD0

loc_63C1D4:
mov	ebp, [ebx+0Ch]
lea	eax, [ebx+4]
cmp	ebp, eax
jz	loc_63C26A

loc_63C1E2:
mov	edi, [ebp+14h]
mov	byte ptr [esp+44h+var_30+3], 0
mov	edx, [edi]
mov	edx, [edx+1Ch]
lea	eax, [esp+44h+var_30+3]
push	eax
mov	ecx, edi
call	edx
cmp	al, 1
jnz	short loc_63C254
cmp	byte ptr [esp+44h+var_30+3], al
jnz	short loc_63C254
mov	eax, [edi+4]
lea	ecx, [esp+44h+var_2C]
push	ecx
add	edi, 18h
push	edi
lea	ecx, [esp+4Ch+var_28]
mov	[esp+4Ch+var_2C], eax
call	sub_4FF4F0
mov	dword ptr [esp+44h+var_4], 0
mov	edi, [esi+4]
cmp	edi, [esi+8]
jz	short loc_63C23B
push	eax		; int
push	edi		; void *
call	sub_5C9FC0
add	esp, 8
add	dword ptr [esi+4], 1Ch
jmp	short loc_63C243

loc_63C23B:
push	1
push	eax
call	sub_636A30

loc_63C243:
lea	ecx, [esp+44h+var_28]
mov	dword ptr [esp+44h+var_4], 0FFFFFFFFh
call	sub_5887C0

loc_63C254:
push	ebp
call	sub_77E2F0
mov	ebp, eax
lea	eax, [ebx+4]
add	esp, 4
cmp	ebp, eax
jnz	loc_63C1E2

loc_63C26A:
mov	ecx, esi
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, esi
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
call	sub_63D700
mov	esi, [esp+44h+arg_0]
add	esi, 14h
mov	ecx, esi
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, esi
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, edi
jz	short loc_63C2A2
push	edi		; int
push	eax		; void *
push	esi		; int
call	sub_63D190

loc_63C2A2:
mov	ebp, [ebx+3Ch]
add	ebx, 34h
cmp	ebp, ebx
jz	short loc_63C31E

loc_63C2AC:
mov	edi, [ebp+14h]
fldz
fstp	[esp+44h+arg_0]
lea	eax, [esp+44h+arg_0]
mov	edx, [edi]
mov	edx, [edx+0Ch]
push	eax
mov	ecx, edi
call	edx
cmp	al, 1
jnz	short loc_63C30F
lea	eax, [esp+44h+arg_0]
push	eax
add	edi, 0Ch
push	edi
lea	ecx, [esp+4Ch+var_28]
call	sub_590C20
mov	dword ptr [esp+44h+var_4], 1
mov	edi, [esi+4]
push	eax		; int
cmp	edi, [esi+8]
jz	short loc_63C2F9
push	edi		; void *
call	sub_5A83C0
add	esp, 8
add	dword ptr [esi+4], 1Ch
jmp	short loc_63C2FE

loc_63C2F9:
call	sub_63D0F0

loc_63C2FE:
lea	ecx, [esp+44h+var_28]
mov	dword ptr [esp+44h+var_4], 0FFFFFFFFh
call	sub_5887C0

loc_63C30F:
push	ebp
call	sub_77E2F0
mov	ebp, eax
add	esp, 4
cmp	ebp, ebx
jnz	short loc_63C2AC

loc_63C31E:
mov	ecx, esi
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, esi
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ebp, eax
cmp	ebp, edi
jz	loc_63C3BE
lea	eax, [esp+44h+arg_0]
call	sub_630630
mov	ebx, eax
mov	ecx, edi
sub	ecx, ebp
mov	eax, 92492493h
imul	ecx
add	edx, ecx
movzx	ecx, byte ptr [ebx]
sar	edx, 4
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
push	ecx
push	esi
call	sub_4776C0
add	esp, 4
add	eax, eax
push	eax
push	0
push	edi
push	ebp
call	sub_63DE00
add	esp, 14h
lea	eax, [esp+44h+arg_0]
call	sub_630630
cmp	esi, 10h
mov	dl, [eax]
mov	byte ptr [esp+44h+var_2C], dl
jle	short loc_63C3AE
mov	eax, [esp+44h+var_2C]
push	eax
lea	esi, [ebp+1C0h]
push	esi
mov	eax, ebp
call	sub_63E460
mov	ecx, [esp+4Ch+var_2C]
push	ecx
mov	eax, esi
call	sub_63E4A0
add	esp, 0Ch
jmp	short loc_63C3BE

loc_63C3AE:
mov	edx, [esp+44h+var_2C]
push	edx
push	edi
mov	eax, ebp
call	sub_63E460
add	esp, 8

loc_63C3BE:
mov	al, 1

loc_63C3C0:
mov	ecx, [esp+44h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	4
sub_63C170 endp

align 10h



sub_63C3E0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
lea	eax, [esi+4]
mov	dword ptr [esi], offset	off_15FB6A0
xor	ecx, ecx
mov	[eax], ecx
movzx	ecx, [esp+4+var_1]
push	ebx
xor	ebx, ebx
mov	[eax+14h], cl
lea	ecx, [esp+8+var_1]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
call	sub_438430
movzx	edx, [esp+8+var_1]
lea	eax, [esi+1Ch]
mov	[eax+10h], ebx
mov	[eax+14h], dl
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
lea	eax, [esi+34h]
mov	[eax], ecx
movzx	ecx, [esp+8+var_1]
mov	[eax+14h], cl
lea	ecx, [esp+8+var_1]
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+10h], ebx
call	sub_438430
movzx	edx, [esp+8+var_1]
lea	eax, [esi+4Ch]
xor	ecx, ecx
mov	[eax], ecx
mov	[eax], bl
mov	[eax+4], ebx
mov	[eax+10h], ebx
mov	[eax+8], eax
mov	[eax+0Ch], eax
mov	[eax+14h], dl
and	byte ptr [esi+64h], 0FEh
mov	[esi+68h], ebx
mov	eax, esi
pop	ebx
pop	ecx
retn
sub_63C3E0 endp

align 10h



; int __thiscall sub_63C480(void *, char)
sub_63C480 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_63C4D0
test	[esp+4+arg_0], 1
jz	short loc_63C498
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63C498:
mov	eax, esi
pop	esi
retn	4
sub_63C480 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1304DCA

loc_63C4A0:
cmp	dword ptr [esi+10h], 0
jz	short locret_63C4C5
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	dword ptr [esi+4], 0
mov	[esi+0Ch], esi
mov	dword ptr [esi+10h], 0

locret_63C4C5:
retn
; END OF FUNCTION CHUNK	FOR sub_1304DCA
align 10h



sub_63C4D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_1306391
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	[esp+20h+var_10], edi
mov	dword ptr [edi], offset	off_15FB6A0
mov	[esp+20h+var_4], 2
call	sub_5F18E0
lea	esi, [edi+4Ch]
xor	ebx, ebx
cmp	[esi+10h], ebx
jz	short loc_63C52E
mov	eax, [esi+4]
push	eax
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	[esi+4], ebx
mov	[esi+0Ch], esi
mov	[esi+10h], ebx

loc_63C52E:
lea	eax, [edi+34h]
push	eax
mov	byte ptr [esp+24h+var_4], 1
call	sub_636980
lea	esi, [edi+1Ch]
mov	byte ptr [esp+20h+var_4], bl
cmp	[esi+10h], ebx
jz	short loc_63C55F
mov	ecx, [esi+4]
push	ecx
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	[esi+4], ebx
mov	[esi+0Ch], esi
mov	[esi+10h], ebx

loc_63C55F:
add	edi, 4
push	edi
mov	[esp+24h+var_4], 0FFFFFFFFh
call	sub_636980
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn
sub_63C4D0 endp

align 10h



sub_63C590 proc	near
mov	eax, dword_18899F4
mov	edx, [eax]
add	ecx, 68h
push	ecx
mov	ecx, eax
mov	eax, [edx+0C4h]
call	eax
test	al, al
setnz	al
retn
sub_63C590 endp

align 10h



sub_63C5B0 proc	near
mov	eax, [ecx+68h]
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
test	eax, eax
setz	al
retn
sub_63C5B0 endp



; Attributes: bp-based frame

sub_63C5C0 proc	near

var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	byte ptr -44h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A040
mov	eax, large fs:0
push	eax
sub	esp, 48h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+64h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	[esp+64h+var_50], edi
mov	esi, [ebp+arg_0]
mov	eax, [esi+4]
mov	ecx, [esi]
cmp	ecx, eax
jz	short loc_63C606
push	eax
push	ecx
push	esi
call	sub_63D350

loc_63C606:
mov	eax, [edi+68h]
mov	ecx, [eax]
xor	ebx, ebx
push	ebx
lea	edx, [esp+68h+var_4C]
push	edx
push	eax
mov	eax, [ecx+38h]
call	eax
cmp	eax, ebx
jz	short loc_63C634

loc_63C61D:
xor	al, al
mov	ecx, [esp+64h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_63C634:
mov	eax, [esp+64h+var_4C]
cmp	eax, ebx
jz	loc_63C6DE

loc_63C640:
mov	edx, [eax]
lea	ecx, [esp+64h+var_51]
push	ecx
push	edx
lea	ecx, [esp+6Ch+var_44]
call	sub_407D30
mov	[esp+64h+var_4], ebx
mov	eax, [esp+64h+var_4C]
mov	ecx, [eax+4]
lea	edx, [esp+64h+var_44]
mov	[esp+64h+var_2C], ecx
push	edx
lea	ecx, [esp+68h+var_28]
call	sub_403850
mov	byte ptr [esp+64h+var_4], 2
mov	edi, [esi+4]
cmp	edi, [esi+8]
jz	short loc_63C68E
push	edi
lea	ecx, [esp+68h+var_2C]
call	sub_63DF80
add	esp, 4
add	dword ptr [esi+4], 1Ch
jmp	short loc_63C698

loc_63C68E:
lea	eax, [esp+64h+var_2C]
push	eax
call	sub_63D2B0

loc_63C698:
lea	ecx, [esp+64h+var_28]
mov	byte ptr [esp+64h+var_4], bl
call	sub_407910
lea	ecx, [esp+64h+var_44]
mov	[esp+64h+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+64h+var_50]
mov	eax, [ecx+68h]
mov	edx, [eax]
mov	edx, [edx+3Ch]
lea	ecx, [esp+64h+var_4C]
push	ecx
push	eax
call	edx
test	eax, eax
jnz	loc_63C61D
mov	eax, [esp+64h+var_4C]
cmp	eax, ebx
jnz	loc_63C640

loc_63C6DE:
mov	al, 1
mov	ecx, [esp+64h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_63C5C0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1309FF0

loc_63C700:
add	ecx, 4
jmp	sub_407910
; END OF FUNCTION CHUNK	FOR sub_1309FF0
align 10h


; Attributes: bp-based frame

sub_63C710 proc	near

var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	byte ptr -44h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130A040
mov	eax, large fs:0
push	eax
sub	esp, 48h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+64h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	[esp+64h+var_50], edi
mov	esi, [ebp+arg_0]
mov	eax, [esi+4]
mov	ecx, [esi]
cmp	ecx, eax
jz	short loc_63C756
push	eax
push	ecx
push	esi
call	sub_63D350

loc_63C756:
mov	eax, [edi+68h]
mov	ecx, [eax]
xor	ebx, ebx
push	ebx
lea	edx, [esp+68h+var_4C]
push	edx
push	eax
mov	eax, [ecx+40h]
call	eax
cmp	eax, ebx
jz	short loc_63C784

loc_63C76D:
xor	al, al
mov	ecx, [esp+64h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_63C784:
mov	eax, [esp+64h+var_4C]
cmp	eax, ebx
jz	loc_63C82E

loc_63C790:
mov	edx, [eax]
lea	ecx, [esp+64h+var_51]
push	ecx
push	edx
lea	ecx, [esp+6Ch+var_44]
call	sub_407D30
mov	[esp+64h+var_4], ebx
mov	eax, [esp+64h+var_4C]
mov	ecx, [eax+4]
lea	edx, [esp+64h+var_44]
mov	[esp+64h+var_2C], ecx
push	edx
lea	ecx, [esp+68h+var_28]
call	sub_403850
mov	byte ptr [esp+64h+var_4], 2
mov	edi, [esi+4]
cmp	edi, [esi+8]
jz	short loc_63C7DE
push	edi
lea	ecx, [esp+68h+var_2C]
call	sub_63DF80
add	esp, 4
add	dword ptr [esi+4], 1Ch
jmp	short loc_63C7E8

loc_63C7DE:
lea	eax, [esp+64h+var_2C]
push	eax
call	sub_63D2B0

loc_63C7E8:
lea	ecx, [esp+64h+var_28]
mov	byte ptr [esp+64h+var_4], bl
call	sub_407910
lea	ecx, [esp+64h+var_44]
mov	[esp+64h+var_4], 0FFFFFFFFh
call	sub_407910
mov	ecx, [esp+64h+var_50]
mov	eax, [ecx+68h]
mov	edx, [eax]
mov	edx, [edx+44h]
lea	ecx, [esp+64h+var_4C]
push	ecx
push	eax
call	edx
test	eax, eax
jnz	loc_63C76D
mov	eax, [esp+64h+var_4C]
cmp	eax, ebx
jnz	loc_63C790

loc_63C82E:
mov	al, 1
mov	ecx, [esp+64h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_63C710 endp

align 10h



sub_63C850 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130634B
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
push	30h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_63C8A1
push	eax
call	sub_63F820
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn

loc_63C8A1:
xor	eax, eax
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_63C850 endp

align 10h



sub_63C8C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130634B
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_63C911
push	eax
call	sub_63FBE0
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn

loc_63C911:
xor	eax, eax
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_63C8C0 endp

align 10h


; Attributes: bp-based frame

sub_63C930 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_13085C0
mov	eax, large fs:0
push	eax
sub	esp, 50h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+6Ch+var_C]
mov	large fs:0, eax
mov	edx, [ecx]
lea	eax, [ecx+4]
mov	[esp+6Ch+var_5C], eax
mov	eax, [edx+50h]
lea	esi, [ecx+1Ch]
call	eax
mov	ebx, [ebp+arg_0]
mov	edi, eax
mov	eax, [ebp+arg_4]
mov	edx, [edi]
mov	edx, [edx+4]
push	eax
push	ebx
mov	ecx, edi
call	edx
test	al, al
jz	loc_63CA76
lea	eax, [esp+6Ch+var_58]
push	eax
mov	eax, [esp+70h+var_5C]
lea	ecx, [esp+70h+var_50]
push	ecx
mov	[esp+74h+var_58], ebx
mov	dword ptr [esp+74h+var_54], edi
call	sub_62FE00
cmp	[esp+6Ch+var_4C], 0
jz	loc_63CA54
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [esp+70h+var_48]
call	sub_403850
mov	[esp+6Ch+var_4], 0
mov	[esp+6Ch+var_30], edi
lea	eax, [esp+6Ch+var_48]
push	eax
lea	ecx, [esp+70h+var_2C]
mov	[esp+70h+var_4], 1
call	sub_403850
mov	byte ptr [esp+6Ch+var_4], 2
mov	ecx, [esp+6Ch+var_30]
mov	[esp+6Ch+var_14], ecx
lea	edx, [esp+6Ch+var_2C]
push	edx
lea	eax, [esp+70h+var_58]
push	eax
push	esi
mov	byte ptr [esp+78h+var_4], 3
call	sub_63D5D0
lea	ecx, [esp+6Ch+var_2C]
mov	byte ptr [esp+6Ch+var_4], 1
call	sub_407910
lea	ecx, [esp+6Ch+var_48]
mov	[esp+6Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	al, [esp+6Ch+var_54]
test	al, al
jz	short loc_63CA3D
mov	al, 1
mov	ecx, [esp+6Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_63CA3D:
cmp	al, 1
jnz	short loc_63CA54
mov	ebx, [esp+6Ch+var_58]
push	ebx
call	sub_77E2F0
mov	eax, esp
mov	[eax], ebx
call	sub_63D020

loc_63CA54:
cmp	[esp+6Ch+var_4C], 1
jnz	short loc_63CA76
mov	esi, [esp+6Ch+var_5C]
push	ecx
mov	ecx, [esp+70h+var_50]
mov	eax, esp
lea	edx, [esp+70h+var_58]
mov	[esp+70h+var_58], esp
push	edx
mov	[eax], ecx
call	sub_636930

loc_63CA76:
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx
xor	al, al
mov	ecx, [esp+70h+var_10]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_63C930 endp




sub_63CAA0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130631A
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
mov	edi, ecx
xor	eax, eax
mov	[esp+24h+var_18], eax
mov	[esp+24h+var_14], eax
mov	[esp+24h+var_10], eax
mov	[esp+24h+var_4], eax
mov	eax, [edi]
mov	edx, [eax+48h]
lea	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_63CB11

loc_63CAEB:
lea	eax, [esp+24h+var_18]
push	eax
mov	[esp+28h+var_4], 0FFFFFFFFh
call	sub_63CFB0
xor	al, al
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 18h
retn

loc_63CB11:
mov	esi, [esp+24h+var_18]
cmp	esi, [esp+24h+var_14]
jz	short loc_63CB3D
jmp	short loc_63CB20
align 10h

loc_63CB20:
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+58h]
lea	eax, [esi+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	short loc_63CAEB
add	esi, 1Ch
cmp	esi, [esp+24h+var_14]
jnz	short loc_63CB20

loc_63CB3D:
lea	ecx, [esp+24h+var_18]
push	ecx
mov	[esp+28h+var_4], 0FFFFFFFFh
call	sub_63CFB0
mov	al, 1
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 18h
retn
sub_63CAA0 endp

align 10h


; Attributes: bp-based frame

sub_63CB70 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_48=	byte ptr -48h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_13085C0
mov	eax, large fs:0
push	eax
sub	esp, 50h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+6Ch+var_C]
mov	large fs:0, eax
mov	edx, [ecx]
lea	eax, [ecx+34h]
mov	[esp+6Ch+var_5C], eax
mov	eax, [edx+54h]
lea	esi, [ecx+4Ch]
call	eax
mov	ebx, [ebp+arg_0]
mov	edi, eax
mov	eax, [ebp+arg_4]
mov	edx, [edi]
mov	edx, [edx+4]
push	eax
push	ebx
mov	ecx, edi
call	edx
test	al, al
jz	loc_63CCB6
lea	eax, [esp+6Ch+var_58]
push	eax
mov	eax, [esp+70h+var_5C]
lea	ecx, [esp+70h+var_50]
push	ecx
mov	[esp+74h+var_58], ebx
mov	dword ptr [esp+74h+var_54], edi
call	sub_62FE00
cmp	[esp+6Ch+var_4C], 0
jz	loc_63CC94
mov	edx, [ebp+arg_4]
push	edx
lea	ecx, [esp+70h+var_48]
call	sub_403850
mov	[esp+6Ch+var_4], 0
mov	[esp+6Ch+var_30], edi
lea	eax, [esp+6Ch+var_48]
push	eax
lea	ecx, [esp+70h+var_2C]
mov	[esp+70h+var_4], 1
call	sub_403850
mov	byte ptr [esp+6Ch+var_4], 2
mov	ecx, [esp+6Ch+var_30]
mov	[esp+6Ch+var_14], ecx
lea	edx, [esp+6Ch+var_2C]
push	edx
lea	eax, [esp+70h+var_58]
push	eax
push	esi
mov	byte ptr [esp+78h+var_4], 3
call	sub_63D5D0
lea	ecx, [esp+6Ch+var_2C]
mov	byte ptr [esp+6Ch+var_4], 1
call	sub_407910
lea	ecx, [esp+6Ch+var_48]
mov	[esp+6Ch+var_4], 0FFFFFFFFh
call	sub_407910
mov	al, [esp+6Ch+var_54]
test	al, al
jz	short loc_63CC7D
mov	al, 1
mov	ecx, [esp+6Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_63CC7D:
cmp	al, 1
jnz	short loc_63CC94
mov	ebx, [esp+6Ch+var_58]
push	ebx
call	sub_77E2F0
mov	eax, esp
mov	[eax], ebx
call	sub_63D020

loc_63CC94:
cmp	[esp+6Ch+var_4C], 1
jnz	short loc_63CCB6
mov	esi, [esp+6Ch+var_5C]
push	ecx
mov	ecx, [esp+70h+var_50]
mov	eax, esp
lea	edx, [esp+70h+var_58]
mov	[esp+70h+var_58], esp
push	edx
mov	[eax], ecx
call	sub_636930

loc_63CCB6:
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx
xor	al, al
mov	ecx, [esp+70h+var_10]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_63CB70 endp



; Attributes: thunk

sub_63CCE0 proc	near
jmp	sub_407910
sub_63CCE0 endp

align 10h



sub_63CCF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_130631A
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
mov	edi, ecx
xor	eax, eax
mov	[esp+24h+var_18], eax
mov	[esp+24h+var_14], eax
mov	[esp+24h+var_10], eax
mov	[esp+24h+var_4], eax
mov	eax, [edi]
mov	edx, [eax+4Ch]
lea	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_63CD61

loc_63CD3B:
lea	eax, [esp+24h+var_18]
push	eax
mov	[esp+28h+var_4], 0FFFFFFFFh
call	sub_63CFB0
xor	al, al
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 18h
retn

loc_63CD61:
mov	esi, [esp+24h+var_18]
cmp	esi, [esp+24h+var_14]
jz	short loc_63CD8D
jmp	short loc_63CD70
align 10h

loc_63CD70:
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+60h]
lea	eax, [esi+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	short loc_63CD3B
add	esi, 1Ch
cmp	esi, [esp+24h+var_14]
jnz	short loc_63CD70

loc_63CD8D:
lea	ecx, [esp+24h+var_18]
push	ecx
mov	[esp+28h+var_4], 0FFFFFFFFh
call	sub_63CFB0
mov	al, 1
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 18h
retn
sub_63CCF0 endp

align 10h



sub_63CDC0 proc	near
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
mov	edi, [ebx+0Ch]
lea	ebp, [ebx+4]
cmp	edi, ebp
setnz	al
test	al, al
jz	short loc_63CDFF

loc_63CDD5:
mov	esi, [edi+14h]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebp
setnz	al
test	al, al
jnz	short loc_63CDD5

loc_63CDFF:
xor	edi, edi
cmp	[ebp+10h], edi
jz	short loc_63CE1D
mov	eax, [ebp+4]
push	eax
mov	ecx, ebp
call	sub_635650
mov	[ebp+8], ebp
mov	[ebp+4], edi
mov	[ebp+0Ch], ebp
mov	[ebp+10h], edi

loc_63CE1D:
cmp	[ebx+2Ch], edi
lea	esi, [ebx+1Ch]
jz	short loc_63CE3C
mov	ecx, [esi+4]
push	ecx
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	[esi+4], edi
mov	[esi+0Ch], esi
mov	[esi+10h], edi

loc_63CE3C:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_63CDC0 endp

align 10h



sub_63CE50 proc	near
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
mov	edi, [ebx+3Ch]
lea	ebp, [ebx+34h]
cmp	edi, ebp
setnz	al
test	al, al
jz	short loc_63CE8F

loc_63CE65:
mov	esi, [edi+14h]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
push	edi
call	sub_77E2F0
mov	edi, eax
add	esp, 4
cmp	edi, ebp
setnz	al
test	al, al
jnz	short loc_63CE65

loc_63CE8F:
xor	edi, edi
cmp	[ebp+10h], edi
jz	short loc_63CEAD
mov	eax, [ebp+4]
push	eax
mov	ecx, ebp
call	sub_635650
mov	[ebp+8], ebp
mov	[ebp+4], edi
mov	[ebp+0Ch], ebp
mov	[ebp+10h], edi

loc_63CEAD:
cmp	[ebx+5Ch], edi
lea	esi, [ebx+4Ch]
jz	short loc_63CECC
mov	ecx, [esi+4]
push	ecx
mov	ecx, esi
call	sub_63D550
mov	[esi+8], esi
mov	[esi+4], edi
mov	[esi+0Ch], esi
mov	[esi+10h], edi

loc_63CECC:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_63CE50 endp

align 10h



; int __stdcall	sub_63CEE0(float)
sub_63CEE0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
mov	esi, [ecx+0Ch]
push	edi
lea	edi, [ecx+4]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_63CF1B

loc_63CEF1:
mov	ecx, [esi+14h]
fld	[esp+8+arg_0]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	ecx
fstp	[esp+0Ch+var_C]
call	edx
test	al, al
jz	short loc_63CF22
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_63CEF1

loc_63CF1B:
pop	edi
mov	al, 1
pop	esi
retn	4

loc_63CF22:
pop	edi
xor	al, al
pop	esi
retn	4
sub_63CEE0 endp

align 10h



sub_63CF30 proc	near

arg_0= byte ptr	 4

push	esi
lea	eax, [esp+4+arg_0]
lea	esi, [ecx+4]
push	eax
push	esi
call	sub_6372E0
cmp	esi, eax
pop	esi
jz	short loc_63CF4A
mov	eax, [eax+14h]
retn	4

loc_63CF4A:
xor	eax, eax
retn	4
sub_63CF30 endp

align 10h



sub_63CF50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+1Ch]
push	esi
call	sub_63E4E0
cmp	esi, eax
pop	esi
jz	short loc_63CF69
mov	eax, [eax+28h]
retn	4

loc_63CF69:
xor	eax, eax
retn	4
sub_63CF50 endp

align 10h



sub_63CF70 proc	near

arg_0= byte ptr	 4

push	esi
lea	eax, [esp+4+arg_0]
lea	esi, [ecx+34h]
push	eax
push	esi
call	sub_6372E0
cmp	esi, eax
pop	esi
jz	short loc_63CF8A
mov	eax, [eax+14h]
retn	4

loc_63CF8A:
xor	eax, eax
retn	4
sub_63CF70 endp

align 10h



sub_63CF90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+4Ch]
push	esi
call	sub_63E4E0
cmp	esi, eax
pop	esi
jz	short loc_63CFA9
mov	eax, [eax+28h]
retn	4

loc_63CFA9:
xor	eax, eax
retn	4
sub_63CF90 endp

align 10h



sub_63CFB0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13062E8
mov	eax, large fs:0
push	eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	ebx, [esp+1Ch+arg_0]
mov	[esp+1Ch+var_4], 0
mov	edi, [ebx]
mov	esi, [ebx+4]
cmp	esi, edi
jz	short loc_63CFF7

loc_63CFE8:
lea	ecx, [esi-18h]
call	sub_407910
sub	esi, 1Ch
cmp	esi, edi
jnz	short loc_63CFE8

loc_63CFF7:
mov	eax, ebx
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	sub_63D0A0
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_63CFB0 endp

align 10h



sub_63D020 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304C68
mov	eax, large fs:0
push	eax
push	ecx
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
lea	eax, [esi+0Ch]
push	eax
mov	eax, [esp+1Ch+arg_0]
lea	ecx, [esi+8]
push	ecx
lea	edx, [esi+4]
push	edx
push	eax
call	sub_77E650
mov	edi, eax
lea	ecx, [edi+10h]
add	esp, 10h
mov	[esp+18h+var_10], ecx
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_407910
test	edi, edi
jz	short loc_63D080
push	2Ch
push	edi
call	sub_77E0D0
add	esp, 8

loc_63D080:
dec	dword ptr [esi+10h]
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
add	esp, 10h
retn	4
sub_63D020 endp

align 10h



sub_63D0A0 proc	near
push	esi
mov	esi, [eax]
test	esi, esi
jz	short loc_63D0E9
mov	ecx, [eax+8]
sub	ecx, esi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
lea	ecx, ds:0[eax*8]
sub	ecx, eax
add	ecx, ecx
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_63D0DF
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi
retn

loc_63D0DF:
push	ecx
push	esi
call	sub_77E0D0
add	esp, 8

loc_63D0E9:
pop	esi
retn
sub_63D0A0 endp

align 10h



sub_63D0F0 proc	near

var_2C=	byte ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130B928
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	eax, [esp+30h+arg_0]
cmp	eax, [esi]
jb	short loc_63D15D
cmp	eax, [esi+4]
jnb	short loc_63D15D
push	eax
lea	ecx, [esp+34h+var_2C]
call	sub_5BE8E0
lea	eax, [esp+30h+var_2C]
push	eax
push	edi
mov	ecx, esi
mov	[esp+38h+var_4], 0
call	sub_63D470
lea	ecx, [esp+30h+var_2C]
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_5887C0
jmp	short loc_63D166

loc_63D15D:
push	eax
push	edi
mov	ecx, esi
call	sub_63D470

loc_63D166:
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn	4
sub_63D0F0 endp

align 10h



; int __stdcall	sub_63D190(int,	void *,	int)
sub_63D190 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_0]
push	ebx
mov	ebx, [esp+8+arg_4]
push	ebp
mov	ebp, [esp+0Ch+arg_8]
push	esi
push	edi
mov	esi, ebx
mov	edi, ebp
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	[esp+14h+arg_8], eax
cmp	ebx, ebp
jz	short loc_63D205
mov	ebx, ebp
sub	ebx, esi

loc_63D1B6:
cmp	edi, [esp+14h+arg_8]
jz	loc_63D25D
push	esi		; void *
call	sub_5B57B0
push	esi
call	sub_5BC5D0
add	esp, 8
call	sub_5BC5D0
test	esi, esi
jz	short loc_63D1F7
lea	eax, [esp+14h+var_4]
push	edi
push	eax
call	sub_459510
mov	ecx, [eax]
add	esp, 8
push	ecx
mov	ecx, esi
call	sub_456D40
fld	dword ptr [ebx+esi+18h]
fstp	dword ptr [esi+18h]

loc_63D1F7:
add	esi, 1Ch
add	edi, 1Ch
cmp	esi, ebp
jnz	short loc_63D1B6

loc_63D201:
mov	ebx, [esp+14h+arg_4]

loc_63D205:
cmp	edi, [esp+14h+arg_8]
jz	loc_63D290
nop

loc_63D210:
push	esi
call	sub_5BC5D0
add	esp, 4
call	sub_5BC5D0
test	esi, esi
jz	short loc_63D240
lea	ecx, [esp+14h+arg_4]
push	edi
push	ecx
call	sub_459510
mov	edx, [eax]
add	esp, 8
push	edx
mov	ecx, esi
call	sub_456D40
fld	dword ptr [edi+18h]
fstp	dword ptr [esi+18h]

loc_63D240:
add	edi, 1Ch
add	esi, 1Ch
cmp	edi, [esp+14h+arg_8]
jnz	short loc_63D210
mov	eax, [esp+14h+arg_0]
pop	edi
mov	[eax+4], esi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
pop	ecx
retn	0Ch

loc_63D25D:
cmp	esi, ebp
jz	short loc_63D201
mov	edi, esi

loc_63D263:
lea	edx, [esp+14h+arg_8]
push	edx
push	edi		; void *
mov	byte ptr [esp+1Ch+arg_8], 0
call	sub_5C5110
add	edi, 1Ch
add	esp, 8
cmp	edi, ebp
jnz	short loc_63D263
mov	eax, [esp+14h+arg_0]
pop	edi
mov	[eax+4], esi
mov	eax, [esp+10h+arg_4]
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_63D290:
mov	ecx, [esp+14h+arg_0]
pop	edi
mov	[ecx+4], esi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
pop	ecx
retn	0Ch
sub_63D190 endp

align 10h



sub_63D2B0 proc	near

var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1309FF8
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	eax, [esp+30h+arg_0]
cmp	eax, [esi]
jb	short loc_63D326
cmp	eax, [esi+4]
jnb	short loc_63D326
mov	ecx, [eax]
add	eax, 4
mov	[esp+30h+var_2C], ecx
push	eax
lea	ecx, [esp+34h+var_28]
call	sub_403850
lea	edx, [esp+30h+var_2C]
push	edx
push	edi
mov	ecx, esi
mov	[esp+38h+var_4], 0
call	sub_63D760
lea	ecx, [esp+30h+var_28]
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_407910
jmp	short loc_63D32F

loc_63D326:
push	eax
push	edi
mov	ecx, esi
call	sub_63D760

loc_63D32F:
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn	4
sub_63D2B0 endp

align 10h



sub_63D350 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_13062B6
mov	eax, large fs:0
push	eax
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+28h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+28h+arg_8]
mov	esi, [esp+28h+arg_4]
mov	eax, [esp+28h+arg_0]
mov	ebx, [eax+4]
mov	[esp+28h+var_14], esi
mov	edi, ebp
mov	[esp+28h+arg_8], ebx
cmp	esi, ebp
jz	short loc_63D3E3

loc_63D394:
cmp	edi, ebx
jz	loc_63D41E
lea	ebx, [esi+4]
mov	ecx, ebx
mov	[esp+28h+var_4], 0FFFFFFFFh
call	sub_407910
test	esi, esi
jz	short loc_63D3D1
mov	ecx, [edi]
lea	edx, [edi+4]
push	edx
lea	eax, [esp+2Ch+var_10]
push	eax
mov	[esi], ecx
call	sub_459510
mov	ecx, [eax]
add	esp, 8
push	ecx
mov	ecx, ebx
call	sub_456D40

loc_63D3D1:
mov	ebx, [esp+28h+arg_8]
add	esi, 1Ch
add	edi, 1Ch
mov	[esp+28h+var_14], esi
cmp	esi, ebp
jnz	short loc_63D394

loc_63D3E3:
cmp	edi, ebx
jz	short loc_63D44B

loc_63D3E7:
test	esi, esi
jz	short loc_63D40B
mov	eax, [edi]
lea	ecx, [edi+4]
push	ecx
lea	edx, [esp+2Ch+arg_8]
push	edx
mov	[esi], eax
call	sub_459510
mov	eax, [eax]
add	esp, 8
push	eax
lea	ecx, [esi+4]
call	sub_456D40

loc_63D40B:
add	edi, 1Ch
add	esi, 1Ch
cmp	edi, ebx
jnz	short loc_63D3E7
mov	ecx, [esp+28h+arg_0]
mov	[ecx+4], esi
jmp	short loc_63D452

loc_63D41E:
cmp	esi, ebp
jz	short loc_63D3E3
mov	edi, esi
mov	[esp+28h+arg_8], edi
jmp	short loc_63D430
align 10h

loc_63D430:
lea	ecx, [edi+4]
mov	[esp+28h+var_4], 0FFFFFFFFh
call	sub_407910
add	edi, 1Ch
mov	[esp+28h+arg_8], edi
cmp	edi, ebp
jnz	short loc_63D430

loc_63D44B:
mov	edx, [esp+28h+arg_0]
mov	[edx+4], esi

loc_63D452:
mov	eax, [esp+28h+arg_4]
mov	ecx, [esp+28h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	0Ch
sub_63D350 endp

align 10h


; Attributes: bp-based frame

sub_63D470 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_130B900
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	edi, ecx
mov	eax, edi
call	sub_63D860
lea	ecx, [ebp+var_14]
push	ecx
mov	ecx, eax
mov	[ebp+var_14], eax
call	sub_63D8C0
mov	[ebp+var_4], 0
mov	ebx, eax
mov	eax, [edi]
mov	byte ptr [ebp+var_18], 0
mov	edx, [ebp+var_18]
push	edx
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, ebx
mov	[ebp+var_1C], ebx
call	sub_63D950
mov	ecx, [ebp+arg_4]
mov	esi, eax
push	ecx		; int
push	esi		; void *
mov	[ebp+arg_0], esi
call	sub_5A83C0
add	esp, 10h
add	esi, 1Ch
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_636F00
mov	eax, [ebp+var_14]
lea	edx, ds:0[eax*8]
sub	edx, eax
lea	eax, [ebx+edx*4]
mov	[edi], ebx
mov	[edi+4], esi
mov	[edi+8], eax
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_63D470 endp



; Attributes: noreturn

sub_63D51F proc	near
mov	esi, [ebp-1Ch]
mov	edi, [ebp+8]
mov	eax, esi
call	sub_631F10
test	esi, esi
jz	short loc_63D53A
mov	ecx, [ebp-14h]
mov	edx, esi
call	sub_63BD10

loc_63D53A:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_63D51F endp

align 10h



sub_63D550 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304C38
mov	eax, large fs:0
push	eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	ebx, ecx
mov	esi, [esp+1Ch+arg_0]
test	esi, esi
jz	short loc_63D5B3
lea	ecx, [ecx+0]

loc_63D580:
mov	eax, [esi+0Ch]
push	eax
mov	ecx, ebx
call	sub_63D550
mov	edi, [esi+8]
lea	ecx, [esi+10h]
mov	[esp+1Ch+arg_0], ecx
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	sub_407910
push	2Ch
push	esi
call	sub_77E0D0
add	esp, 8
mov	esi, edi
test	edi, edi
jnz	short loc_63D580

loc_63D5B3:
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_63D550 endp

align 10h



sub_63D5D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	ebp
mov	ebp, [ecx+4]
push	esi
push	edi
mov	edi, ecx
mov	al, 1
test	ebp, ebp
jz	short loc_63D662
mov	eax, [esp+18h+arg_8]
mov	edx, [eax+14h]
mov	ecx, [eax+10h]
sub	ecx, edx
mov	[esp+18h+var_8], edx
mov	[esp+18h+arg_4], ecx
jmp	short loc_63D608

loc_63D600:
mov	edx, [esp+18h+var_8]
mov	ecx, [esp+18h+arg_4]

loc_63D608:
mov	eax, [ebp+24h]
mov	esi, [ebp+20h]
sub	esi, eax
cmp	esi, ecx
mov	edi, ebp
mov	[esp+18h+var_4], esi
lea	ecx, [esp+18h+var_4]
jl	short loc_63D622
lea	ecx, [esp+18h+arg_4]

loc_63D622:
mov	ecx, [ecx]
push	ecx
push	eax
push	edx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63D64B
mov	eax, [esp+18h+arg_4]
cmp	eax, esi
jge	short loc_63D640
or	eax, 0FFFFFFFFh
jmp	short loc_63D649

loc_63D640:
xor	edx, edx
cmp	eax, esi
setnle	dl
mov	eax, edx

loc_63D649:
test	eax, eax

loc_63D64B:
setl	al
test	al, al
jz	short loc_63D657
mov	ebp, [ebp+8]
jmp	short loc_63D65A

loc_63D657:
mov	ebp, [ebp+0Ch]

loc_63D65A:
test	ebp, ebp
jnz	short loc_63D600
mov	ecx, [esp+18h+arg_0]

loc_63D662:
mov	esi, edi
test	al, al
jz	short loc_63D69D
push	edi
cmp	edi, [ecx+8]
jnz	short loc_63D693
push	edi
lea	eax, [esp+20h+arg_8]
push	eax
mov	eax, [esp+24h+arg_8]
mov	edi, ecx
call	sub_6304A0
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch

loc_63D693:
call	sub_77E330
add	esp, 4
mov	esi, eax

loc_63D69D:
mov	eax, [esp+18h+arg_8]
mov	edx, [eax+10h]
mov	eax, [eax+14h]
mov	ecx, [esi+20h]
push	edx
mov	edx, [esi+24h]
push	eax
push	ecx
push	edx
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_63D6E5
push	ebp
push	edi
mov	edi, [esp+20h+arg_0]
lea	eax, [esp+20h+arg_8]
push	eax
mov	eax, [esp+24h+arg_8]
call	sub_6304A0
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch

loc_63D6E5:
pop	edi
mov	[ebx], esi
pop	esi
pop	ebp
mov	byte ptr [ebx+4], 0
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch
sub_63D5D0 endp

align 10h



sub_63D700 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	esi
mov	esi, eax
cmp	esi, edi
jz	short loc_63D758
lea	eax, [esp+8+var_1]
call	sub_630630
movzx	eax, byte ptr [eax]
push	eax
mov	ecx, edi
sub	ecx, esi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
push	ecx
call	sub_4776C0
add	esp, 4
add	eax, eax
push	eax
push	0
push	edi
push	esi
call	sub_63DA50
lea	eax, [esp+1Ch+var_1]
call	sub_630630
movzx	edx, byte ptr [eax]
push	edx
mov	eax, edi
call	sub_63DDA0
add	esp, 18h

loc_63D758:
pop	esi
pop	ecx
retn
sub_63D700 endp

align 10h


; Attributes: bp-based frame

sub_63D760 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_1309FD0
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	esi, ecx
mov	eax, esi
call	sub_63D860
lea	ecx, [ebp+var_14]
push	ecx
mov	ecx, eax
mov	[ebp+var_14], eax
call	sub_63D8C0
mov	[ebp+var_4], 0
mov	ebx, eax
mov	eax, [esi]
mov	byte ptr [ebp+var_18], 0
mov	edx, [ebp+var_18]
push	edx
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, ebx
mov	[ebp+var_1C], ebx
call	sub_63DF20
mov	ecx, [ebp+arg_4]
mov	edi, eax
push	edi
mov	[ebp+arg_0], edi
call	sub_63DF80
add	esp, 0Ch
mov	eax, esi
add	edi, 1Ch
mov	[ebp+var_4], 0FFFFFFFFh
call	sub_63D0A0
mov	eax, [ebp+var_14]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	edx, [ebx+ecx*4]
mov	[esi], ebx
mov	[esi+4], edi
mov	[esi+8], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_63D760 endp



; Attributes: noreturn

sub_63D810 proc	near
mov	esi, [ebp-1Ch]
mov	edi, [ebp+8]
mov	eax, esi
call	sub_63D840
test	esi, esi
jz	short loc_63D82B
mov	ecx, [ebp-14h]
mov	edx, esi
call	sub_63BD10

loc_63D82B:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_63D810 endp

align 10h



sub_63D840 proc	near
push	esi
mov	esi, eax
cmp	esi, edi
jz	short loc_63D856

loc_63D847:
lea	ecx, [esi+4]
call	sub_407910
add	esi, 1Ch
cmp	esi, edi
jnz	short loc_63D847

loc_63D856:
pop	esi
retn
sub_63D840 endp

align 10h



sub_63D860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	ecx, [eax+4]
sub	ecx, [eax]
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
mov	eax, 9249249h
sub	eax, ecx
mov	[esp+8+var_4], 1
mov	[esp+8+var_8], ecx
cmp	eax, 1
jnb	short loc_63D89C
push	offset aVector	; "vector"
call	sub_77EC70

loc_63D89C:
lea	eax, [esp+8+var_8]
cmp	ecx, 1
ja	short loc_63D8A8
lea	eax, [esp+8+var_4]

loc_63D8A8:
mov	eax, [eax]
add	eax, ecx
cmp	eax, 9249249h
ja	short loc_63D8B7
cmp	eax, ecx
jnb	short loc_63D8BC

loc_63D8B7:
mov	eax, 9249249h

loc_63D8BC:
add	esp, 8
retn
sub_63D860 endp




sub_63D8C0 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
cmp	ecx, 9249249h
jbe	short loc_63D8E3
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_63D8E3:
test	ecx, ecx
jz	short loc_63D93A
lea	eax, ds:0[ecx*8]
sub	eax, ecx
add	eax, eax
add	eax, eax
push	esi
mov	[esp+14h+var_10], eax
cmp	eax, 80h
jbe	short loc_63D908
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
jmp	short loc_63D912

loc_63D908:
lea	ecx, [esp+14h+var_10]
push	ecx
call	sub_77E150

loc_63D912:
mov	ecx, [esp+18h+var_10]
mov	esi, eax
mov	eax, 24924925h
mul	ecx
sub	ecx, edx
shr	ecx, 1
add	ecx, edx
mov	edx, [esp+18h+arg_0]
add	esp, 4
shr	ecx, 4
mov	eax, esi
mov	[edx], ecx
pop	esi
add	esp, 10h
retn	4

loc_63D93A:
xor	eax, eax
add	esp, 10h
retn	4
sub_63D8C0 endp

align 10h



sub_63D950 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
sub	eax, ebx
push	edi
mov	edi, ecx
mov	ecx, eax
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
test	esi, esi
jle	short loc_63D9AF

loc_63D974:
push	edi
call	sub_5BC5D0
add	esp, 4
call	sub_5BC5D0
test	edi, edi
jz	short loc_63D9A4
lea	eax, [esp+0Ch+arg_0]
push	ebx
push	eax
call	sub_459510
mov	ecx, [eax]
add	esp, 8
push	ecx
mov	ecx, edi
call	sub_456D40
fld	dword ptr [ebx+18h]
fstp	dword ptr [edi+18h]

loc_63D9A4:
dec	esi
add	ebx, 1Ch
add	edi, 1Ch
test	esi, esi
jg	short loc_63D974

loc_63D9AF:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn
sub_63D950 endp

align 10h



sub_63D9C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
mov	[esp+0Ch+arg_4], 0
cmp	ebx, edi
jnz	short loc_63D9EA
mov	ecx, esi
call	sub_6357A0
mov	esi, eax
mov	[ebx+8], esi
mov	[edi+4], esi
jmp	short loc_63DA29

loc_63D9EA:
cmp	[esp+0Ch+arg_8], 0
jnz	short loc_63DA02
lea	eax, [ebx+10h]
push	eax
push	esi
lea	ecx, [edi+14h]
call	sub_4444F0
test	al, al
jz	short loc_63DA18

loc_63DA02:
mov	ecx, esi
call	sub_6357A0
mov	esi, eax
mov	[ebx+8], esi
cmp	ebx, [edi+8]
jnz	short loc_63DA2C
mov	[edi+8], esi
jmp	short loc_63DA2C

loc_63DA18:
mov	ecx, esi
call	sub_6357A0
mov	esi, eax
mov	[ebx+0Ch], esi
cmp	ebx, [edi+0Ch]
jnz	short loc_63DA2C

loc_63DA29:
mov	[edi+0Ch], esi

loc_63DA2C:
lea	ecx, [edi+4]
push	ecx
push	esi
mov	[esi+4], ebx
call	sub_77E4A0
inc	dword ptr [edi+10h]
add	esp, 8
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	0Ch
sub_63D9C0 endp

align 10h



sub_63DA50 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	0FFFFFFFFh
push	offset loc_130B8D8
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	ecx, [esp+34h+arg_4]
mov	ebp, [esp+34h+arg_0]
mov	esi, ecx
sub	esi, ebp
mov	eax, 92492493h
imul	esi
add	edx, esi
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 10h
jle	loc_63DD89
jmp	short loc_63DAA7

loc_63DAA1:
mov	ecx, [esp+34h+arg_4]
mov	ebp, ebx

loc_63DAA7:
cmp	[esp+34h+arg_C], 0
mov	edx, [esp+34h+arg_10]
push	edx
jz	loc_63DD7F
sub	ecx, ebp
mov	eax, 92492493h
imul	ecx
mov	esi, [ebp+10h]
dec	[esp+38h+arg_C]
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cdq
sub	eax, edx
sar	eax, 1
lea	ecx, ds:0[eax*8]
sub	ecx, eax
mov	edi, [ebp+ecx*4+10h]
mov	ebx, [ebp+ecx*4+14h]
lea	eax, [ebp+ecx*4+0]
mov	ebp, [ebp+14h]
mov	[esp+38h+var_18], edi
mov	[esp+38h+var_14], esi
sub	esi, ebp
sub	edi, ebx
cmp	edi, esi
mov	[esp+38h+var_1C], eax
mov	[esp+38h+var_10], esi
mov	[esp+38h+var_20], edi
lea	eax, [esp+38h+var_20]
jl	short loc_63DB14
lea	eax, [esp+38h+var_10]

loc_63DB14:
mov	edx, [eax]
push	edx
push	ebx
push	ebp
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63DB30
cmp	esi, edi
jl	short loc_63DB8C
cmp	esi, edi
setnle	al
test	eax, eax

loc_63DB30:
jl	short loc_63DB8C
mov	esi, [esp+38h+var_18]
mov	edi, [esp+38h+var_14]
sub	esi, ebx
sub	edi, ebp
cmp	edi, esi
mov	[esp+38h+var_20], esi
mov	[esp+38h+var_10], edi
lea	eax, [esp+38h+var_10]
jl	short loc_63DB52
lea	eax, [esp+38h+var_20]

loc_63DB52:
mov	eax, [eax]
push	eax
push	ebp
push	ebx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63DB72
cmp	esi, edi
jl	loc_63DC42
cmp	esi, edi
setnle	al
test	eax, eax

loc_63DB72:
jl	loc_63DC42
mov	ecx, [esp+38h+arg_0]
mov	edx, [ecx+18h]
mov	eax, [esp+38h+var_1C]
cmp	edx, [eax+18h]
jnb	loc_63DC42

loc_63DB8C:
mov	eax, [esp+38h+arg_4]
mov	edi, [eax-0Ch]
mov	esi, [esp+38h+var_18]
add	eax, 0FFFFFFE4h
mov	[esp+38h+var_20], eax
mov	eax, [eax+14h]
mov	ebp, edi
sub	esi, ebx
sub	ebp, eax
cmp	ebp, esi
mov	[esp+38h+var_14], esi
mov	[esp+38h+var_10], ebp
lea	ecx, [esp+38h+var_10]
jl	short loc_63DBBB
lea	ecx, [esp+38h+var_14]

loc_63DBBB:
mov	ecx, [ecx]
push	ecx
push	eax
push	ebx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63DBD7
cmp	esi, ebp
jl	short loc_63DC2C
cmp	esi, ebp
setnle	al
test	eax, eax

loc_63DBD7:
jl	short loc_63DC2C
mov	edx, [esp+38h+var_20]
mov	eax, [esp+38h+var_18]
mov	ecx, [edx+14h]
sub	eax, ebx
mov	esi, eax
sub	edi, ecx
cmp	esi, edi
mov	[esp+38h+var_14], edi
mov	[esp+38h+var_10], esi
lea	eax, [esp+38h+var_10]
jl	short loc_63DBFE
lea	eax, [esp+38h+var_14]

loc_63DBFE:
mov	eax, [eax]
push	eax
push	ebx
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63DC1A
cmp	edi, esi
jl	short loc_63DC35
cmp	edi, esi
setnle	al
test	eax, eax

loc_63DC1A:
jl	short loc_63DC35
mov	ecx, [esp+38h+var_1C]
mov	edx, [ecx+18h]
mov	esi, [esp+38h+var_20]
cmp	edx, [esi+18h]
jnb	short loc_63DC39

loc_63DC2C:
mov	eax, [esp+38h+var_1C]
jmp	loc_63DD02

loc_63DC35:
mov	esi, [esp+38h+var_20]

loc_63DC39:
mov	edi, [esp+38h+arg_0]
jmp	loc_63DCF0

loc_63DC42:
mov	eax, [esp+38h+arg_4]
mov	edi, [eax-0Ch]
mov	esi, [esp+38h+var_14]
add	eax, 0FFFFFFE4h
mov	[esp+38h+var_20], eax
mov	eax, [eax+14h]
mov	ebx, edi
sub	esi, ebp
sub	ebx, eax
cmp	ebx, esi
mov	[esp+38h+var_18], esi
mov	[esp+38h+var_10], ebx
lea	ecx, [esp+38h+var_10]
jl	short loc_63DC71
lea	ecx, [esp+38h+var_18]

loc_63DC71:
mov	ecx, [ecx]
push	ecx
push	eax
push	ebp
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63DC8D
cmp	esi, ebx
jl	short loc_63DCE2
cmp	esi, ebx
setnle	al
test	eax, eax

loc_63DC8D:
jl	short loc_63DCE2
mov	edx, [esp+38h+var_20]
mov	eax, [esp+38h+var_14]
mov	ecx, [edx+14h]
sub	eax, ebp
mov	esi, eax
sub	edi, ecx
cmp	esi, edi
mov	[esp+38h+var_18], edi
mov	[esp+38h+var_10], esi
lea	eax, [esp+38h+var_10]
jl	short loc_63DCB4
lea	eax, [esp+38h+var_18]

loc_63DCB4:
mov	eax, [eax]
push	eax
push	ebp
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63DCD0
cmp	edi, esi
jl	short loc_63DCE8
cmp	edi, esi
setnle	al
test	eax, eax

loc_63DCD0:
jl	short loc_63DCE8
mov	ecx, [esp+38h+arg_0]
mov	edx, [ecx+18h]
mov	esi, [esp+38h+var_20]
cmp	edx, [esi+18h]
jnb	short loc_63DCEC

loc_63DCE2:
mov	eax, [esp+38h+arg_0]
jmp	short loc_63DD02

loc_63DCE8:
mov	esi, [esp+38h+var_20]

loc_63DCEC:
mov	edi, [esp+38h+var_1C]

loc_63DCF0:
push	esi
push	edi
call	sub_63E920
add	esp, 8
test	al, al
mov	eax, esi
jnz	short loc_63DD02
mov	eax, edi

loc_63DD02:
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+54h+var_10], esp
push	eax
call	sub_5BEF40
mov	ebx, [esp+54h+arg_0]
mov	edi, [esp+54h+arg_4]
mov	[esp+54h+var_4], 0
push	ebx
mov	ecx, edi
mov	[esp+58h+var_4], 0FFFFFFFFh
call	sub_63DFF0
mov	ecx, [esp+58h+arg_C]
mov	esi, eax
mov	eax, [esp+58h+arg_10]
push	eax
push	ecx
push	0
push	edi
push	esi
call	sub_63DA50
mov	[esp+6Ch+arg_4], esi
sub	esi, ebx
mov	eax, 92492493h
imul	esi
add	edx, esi
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
add	esp, 38h
cmp	eax, 10h
jg	loc_63DAA1
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn

loc_63DD7F:
push	ecx
push	ebp
call	sub_63E5A0
add	esp, 0Ch

loc_63DD89:
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_63DA50 endp

align 10h



sub_63DDA0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, eax
mov	ecx, edi
sub	ecx, esi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 10h
jle	short loc_63DDE5
mov	ecx, [esp+4+arg_0]
push	ebx
push	ecx
lea	ebx, [esi+1C0h]
push	ebx
mov	eax, esi
call	sub_63E1E0
mov	edx, [esp+10h+arg_0]
push	edx
mov	eax, ebx
call	sub_63E220
add	esp, 0Ch
pop	ebx
pop	edi
retn

loc_63DDE5:
mov	eax, [esp+4+arg_0]
push	eax
push	edi
mov	eax, esi
call	sub_63E1E0
add	esp, 8
pop	edi
retn
sub_63DDA0 endp

align 10h



sub_63DE00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	ecx, ebx
sub	ecx, edi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 10h
jle	loc_63DF18

loc_63DE2C:
cmp	[esp+10h+arg_C], 0
mov	ecx, [esp+10h+arg_10]
push	ecx
jz	loc_63DF0C
mov	ecx, ebx
sub	ecx, edi
mov	eax, 92492493h
imul	ecx
dec	[esp+14h+arg_C]
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cdq
sub	eax, edx
sar	eax, 1
lea	edx, ds:0[eax*8]
sub	edx, eax
lea	esi, [edi+edx*4]
push	esi
push	edi
lea	ebp, [ebx-1Ch]
call	sub_63E980
add	esp, 8
push	ebp
test	al, al
jz	short loc_63DE97
push	esi
call	sub_63E980
add	esp, 8
test	al, al
jnz	short loc_63DEB8
push	ebp
push	edi
call	sub_63E980
add	esp, 8
test	al, al
jz	short loc_63DEA4
jmp	short loc_63DEB6

loc_63DE97:
push	edi
call	sub_63E980
add	esp, 8
test	al, al
jz	short loc_63DEA8

loc_63DEA4:
mov	esi, edi
jmp	short loc_63DEB8

loc_63DEA8:
push	ebp
push	esi
call	sub_63E980
add	esp, 8
test	al, al
jz	short loc_63DEB8

loc_63DEB6:
mov	esi, ebp

loc_63DEB8:
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+30h+arg_4], esp
push	esi
call	sub_5BE8E0
push	edi		; int
mov	ecx, ebx
call	sub_63E260
mov	ecx, [esp+34h+arg_C]
mov	esi, eax
mov	eax, [esp+34h+arg_10]
push	eax
push	ecx
push	0
push	ebx
push	esi
call	sub_63DE00
mov	ebx, esi
sub	esi, edi
mov	eax, 92492493h
imul	esi
add	edx, esi
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
add	esp, 38h
cmp	eax, 10h
jg	loc_63DE2C
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_63DF0C:
push	ebx
push	ebx
mov	eax, edi
call	sub_63E7F0
add	esp, 0Ch

loc_63DF18:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_63DE00 endp

align 10h



sub_63DF20 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
sub	eax, ebx
push	edi
mov	edi, ecx
mov	ecx, eax
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
test	esi, esi
jle	short loc_63DF73

loc_63DF44:
test	edi, edi
jz	short loc_63DF68
mov	eax, [ebx]
lea	ecx, [ebx+4]
push	ecx
lea	edx, [esp+10h+arg_0]
push	edx
mov	[edi], eax
call	sub_459510
mov	eax, [eax]
add	esp, 8
push	eax
lea	ecx, [edi+4]
call	sub_456D40

loc_63DF68:
dec	esi
add	ebx, 1Ch
add	edi, 1Ch
test	esi, esi
jg	short loc_63DF44

loc_63DF73:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn
sub_63DF20 endp

align 10h



sub_63DF80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1309FAC
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, [esp+14h+arg_0]
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_63DFCA
mov	edx, [ecx]
add	ecx, 4
push	ecx
lea	ecx, [eax+4]
mov	[eax], edx
call	sub_403850
mov	byte ptr [esp+14h+var_4], 0

loc_63DFCA:
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_63DF80 endp

align 10h



sub_63DFF0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1309F68
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	eax, [esp+34h+arg_0]
mov	[esp+34h+var_20], eax
mov	[esp+34h+var_1C], ecx
mov	[esp+34h+var_4], 0
jmp	short loc_63E030
align 10h

loc_63E030:
mov	edi, [esp+34h+arg_14]
sub	edi, [esp+34h+arg_18]
mov	[esp+34h+var_10], edi
lea	esp, [esp+0]

loc_63E040:
mov	esi, [eax+10h]
mov	ebp, [eax+14h]
mov	ebx, esi
sub	ebx, ebp
cmp	edi, ebx
mov	[esp+34h+var_18], ebx
mov	[esp+34h+var_14], edi
lea	eax, [esp+34h+var_14]
jl	short loc_63E05E
lea	eax, [esp+34h+var_18]

loc_63E05E:
mov	edx, [eax]
mov	eax, [esp+34h+arg_18]
push	edx
push	eax
push	ebp
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E082
cmp	ebx, edi
jl	loc_63E18C
cmp	ebx, edi
setnle	al
test	eax, eax

loc_63E082:
jl	loc_63E18C
mov	edi, [esp+34h+var_10]
sub	esi, ebp
cmp	esi, edi
mov	[esp+34h+var_14], edi
mov	[esp+34h+var_18], esi
lea	eax, [esp+34h+var_18]
jl	short loc_63E0A2
lea	eax, [esp+34h+var_14]

loc_63E0A2:
mov	ecx, [eax]
mov	edx, [esp+34h+arg_18]
push	ecx
push	ebp
push	edx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E0C2
cmp	edi, esi
jl	short loc_63E0D5
cmp	edi, esi
setnle	al
test	eax, eax

loc_63E0C2:
jl	short loc_63E0D5
mov	eax, [esp+34h+arg_1C]
mov	ecx, [esp+34h+var_20]
cmp	[ecx+18h], eax
jb	loc_63E190

loc_63E0D5:
mov	eax, [esp+34h+var_1C]
sub	eax, 1Ch
mov	[esp+34h+var_1C], eax

loc_63E0E0:
mov	esi, [eax+10h]
mov	ebp, [eax+14h]
mov	ebx, esi
sub	ebx, ebp
cmp	ebx, edi
mov	[esp+34h+var_14], edi
mov	[esp+34h+var_18], ebx
lea	eax, [esp+34h+var_18]
jl	short loc_63E0FE
lea	eax, [esp+34h+var_14]

loc_63E0FE:
mov	edx, [eax]
mov	eax, [esp+34h+arg_18]
push	edx
push	ebp
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E122
cmp	edi, ebx
jl	loc_63E19E
cmp	edi, ebx
setnle	al
test	eax, eax

loc_63E122:
jl	short loc_63E19E
mov	edi, [esp+34h+var_10]
sub	esi, ebp
cmp	edi, esi
mov	[esp+34h+var_14], esi
mov	[esp+34h+var_18], edi
lea	eax, [esp+34h+var_18]
jl	short loc_63E13E
lea	eax, [esp+34h+var_14]

loc_63E13E:
mov	ecx, [eax]
mov	edx, [esp+34h+arg_18]
push	ecx
push	edx
push	ebp
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E15E
cmp	esi, edi
jl	short loc_63E16D
cmp	esi, edi
setnle	al
test	eax, eax

loc_63E15E:
jl	short loc_63E16D
mov	eax, [esp+34h+arg_1C]
mov	ecx, [esp+34h+var_1C]
cmp	eax, [ecx+18h]
jb	short loc_63E1A2

loc_63E16D:
mov	edi, [esp+34h+var_20]
mov	esi, [esp+34h+var_1C]
cmp	edi, esi
jnb	short loc_63E1B0
call	sub_63F110
add	edi, 1Ch
mov	[esp+34h+var_20], edi
mov	eax, edi
jmp	loc_63E030

loc_63E18C:
mov	edi, [esp+34h+var_10]

loc_63E190:
add	[esp+34h+var_20], 1Ch
mov	eax, [esp+34h+var_20]
jmp	loc_63E040

loc_63E19E:
mov	edi, [esp+34h+var_10]

loc_63E1A2:
sub	[esp+34h+var_1C], 1Ch
mov	eax, [esp+34h+var_1C]
jmp	loc_63E0E0

loc_63E1B0:
lea	ecx, [esp+34h+arg_4]
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	eax, edi
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_63DFF0 endp

align 10h



sub_63E1E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
cmp	esi, ebx
jz	short loc_63E217
lea	edi, [esi+1Ch]
cmp	edi, ebx
jz	short loc_63E217

loc_63E1F4:
mov	eax, [esp+0Ch+arg_4]
push	eax
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+2Ch+arg_0], esp
push	edi
call	sub_5BEF40
call	sub_63E730
add	edi, 1Ch
add	esp, 20h
cmp	edi, ebx
jnz	short loc_63E1F4

loc_63E217:
pop	edi
pop	esi
pop	ebx
retn
sub_63E1E0 endp

align 10h



sub_63E220 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 4

push	ecx
push	ebx
push	esi
mov	esi, eax
mov	al, [esp+0Ch+arg_0]
mov	byte ptr [esp+0Ch+var_4], al
cmp	esi, edi
jz	short loc_63E255
mov	ebx, [esp+0Ch+var_4]

loc_63E235:
push	ebx
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+2Ch+var_4], esp
push	esi
call	sub_5BEF40
push	esi
call	sub_63EB00
add	esi, 1Ch
add	esp, 24h
cmp	esi, edi
jnz	short loc_63E235

loc_63E255:
pop	esi
pop	ebx
pop	ecx
retn
sub_63E220 endp

align 10h



; int __cdecl sub_63E260(int, char, int, int, int, int,	int, float)
sub_63E260 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1309F68
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	eax, [esp+34h+arg_0]
mov	[esp+34h+var_20], eax
mov	[esp+34h+var_1C], ecx
mov	[esp+34h+var_4], 0
jmp	short loc_63E2A0
align 10h

loc_63E2A0:
mov	edi, [esp+34h+arg_14]
sub	edi, [esp+34h+arg_18]
mov	[esp+34h+var_10], edi
lea	esp, [esp+0]

loc_63E2B0:
mov	esi, [eax+10h]
mov	ebp, [eax+14h]
mov	ebx, esi
sub	ebx, ebp
cmp	edi, ebx
mov	[esp+34h+var_18], ebx
mov	[esp+34h+var_14], edi
lea	eax, [esp+34h+var_14]
jl	short loc_63E2CE
lea	eax, [esp+34h+var_18]

loc_63E2CE:
mov	edx, [eax]
mov	eax, [esp+34h+arg_18]
push	edx
push	eax
push	ebp
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E2F2
cmp	ebx, edi
jl	loc_63E40E
cmp	ebx, edi
setnle	al
test	eax, eax

loc_63E2F2:
jl	loc_63E40E
mov	edi, [esp+34h+var_10]
sub	esi, ebp
cmp	esi, edi
mov	[esp+34h+var_14], edi
mov	[esp+34h+var_18], esi
lea	eax, [esp+34h+var_18]
jl	short loc_63E312
lea	eax, [esp+34h+var_14]

loc_63E312:
mov	ecx, [eax]
mov	edx, [esp+34h+arg_18]
push	ecx
push	ebp
push	edx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E332
cmp	edi, esi
jl	short loc_63E34C
cmp	edi, esi
setnle	al
test	eax, eax

loc_63E332:
jl	short loc_63E34C
mov	eax, [esp+34h+var_20]
fld	dword ptr [eax+18h]
fld	[esp+34h+arg_1C]
fcompp
fnstsw	ax
test	ah, 41h
jz	loc_63E412

loc_63E34C:
mov	eax, [esp+34h+var_1C]
sub	eax, 1Ch
mov	[esp+34h+var_1C], eax

loc_63E357:
mov	esi, [eax+10h]
mov	ebp, [eax+14h]
mov	ebx, esi
sub	ebx, ebp
cmp	ebx, edi
mov	[esp+34h+var_14], edi
mov	[esp+34h+var_18], ebx
lea	eax, [esp+34h+var_18]
jl	short loc_63E375
lea	eax, [esp+34h+var_14]

loc_63E375:
mov	ecx, [eax]
mov	edx, [esp+34h+arg_18]
push	ecx
push	ebp
push	edx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E399
cmp	edi, ebx
jl	loc_63E420
cmp	edi, ebx
setnle	al
test	eax, eax

loc_63E399:
jl	loc_63E420
mov	edi, [esp+34h+var_10]
sub	esi, ebp
cmp	edi, esi
mov	[esp+34h+var_14], esi
mov	[esp+34h+var_18], edi
lea	eax, [esp+34h+var_18]
jl	short loc_63E3B9
lea	eax, [esp+34h+var_14]

loc_63E3B9:
mov	eax, [eax]
mov	ecx, [esp+34h+arg_18]
push	eax
push	ecx
push	ebp
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E3D9
cmp	esi, edi
jl	short loc_63E3EF
cmp	esi, edi
setnle	al
test	eax, eax

loc_63E3D9:
jl	short loc_63E3EF
fld	[esp+34h+arg_1C]
mov	edx, [esp+34h+var_1C]
fld	dword ptr [edx+18h]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_63E424

loc_63E3EF:
mov	edi, [esp+34h+var_20]
mov	esi, [esp+34h+var_1C]
cmp	edi, esi
jnb	short loc_63E432
call	sub_63F360
add	edi, 1Ch
mov	[esp+34h+var_20], edi
mov	eax, edi
jmp	loc_63E2A0

loc_63E40E:
mov	edi, [esp+34h+var_10]

loc_63E412:
add	[esp+34h+var_20], 1Ch
mov	eax, [esp+34h+var_20]
jmp	loc_63E2B0

loc_63E420:
mov	edi, [esp+34h+var_10]

loc_63E424:
sub	[esp+34h+var_1C], 1Ch
mov	eax, [esp+34h+var_1C]
jmp	loc_63E357

loc_63E432:
lea	ecx, [esp+34h+arg_4]
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	eax, edi
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_63E260 endp

align 10h



sub_63E460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
cmp	esi, ebx
jz	short loc_63E497
lea	edi, [esi+1Ch]
cmp	edi, ebx
jz	short loc_63E497

loc_63E474:
mov	eax, [esp+0Ch+arg_4]
push	eax		; int
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+2Ch+arg_0], esp
push	edi
call	sub_5BE8E0
call	sub_63E860
add	edi, 1Ch
add	esp, 20h
cmp	edi, ebx
jnz	short loc_63E474

loc_63E497:
pop	edi
pop	esi
pop	ebx
retn
sub_63E460 endp

align 10h



sub_63E4A0 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 4

push	ecx
push	ebx
push	esi
mov	esi, eax
mov	al, [esp+0Ch+arg_0]
mov	byte ptr [esp+0Ch+var_4], al
cmp	esi, edi
jz	short loc_63E4D5
mov	ebx, [esp+0Ch+var_4]

loc_63E4B5:
push	ebx
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+2Ch+var_4], esp
push	esi
call	sub_5BE8E0
push	esi		; int
call	sub_63ED70
add	esi, 1Ch
add	esp, 24h
cmp	esi, edi
jnz	short loc_63E4B5

loc_63E4D5:
pop	esi
pop	ebx
pop	ecx
retn
sub_63E4A0 endp

align 10h



sub_63E4E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	ecx, [esp+10h+arg_0]
push	edi
mov	edi, [ecx+4]
mov	[esp+14h+var_10], ecx
test	edi, edi
jz	loc_63E594
push	ebx
push	ebp
mov	ebp, [eax+14h]
mov	eax, [eax+10h]
mov	ebx, eax
sub	ebx, ebp
push	esi
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_C], ebx
lea	esp, [esp+0]

loc_63E510:
mov	eax, [edi+24h]
mov	esi, [edi+20h]
sub	esi, eax
cmp	ebx, esi
mov	[esp+20h+var_8], esi
lea	ecx, [esp+20h+var_C]
jl	short loc_63E528
lea	ecx, [esp+20h+var_8]

loc_63E528:
mov	ecx, [ecx]
push	ecx
push	ebp
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E544
cmp	esi, ebx
jl	short loc_63E54F
cmp	esi, ebx
setnle	al
test	eax, eax

loc_63E544:
jl	short loc_63E54F
mov	[esp+20h+var_10], edi
mov	edi, [edi+8]
jmp	short loc_63E552

loc_63E54F:
mov	edi, [edi+0Ch]

loc_63E552:
test	edi, edi
jnz	short loc_63E510
mov	esi, [esp+20h+var_10]
mov	edi, [esp+20h+arg_0]
cmp	esi, edi
jz	short loc_63E588
mov	edx, [esi+20h]
mov	eax, [esi+24h]
mov	ecx, [esp+20h+var_4]
push	edx
push	eax
push	ecx
push	ebp
call	sub_4051D0
add	esp, 10h
test	eax, eax
jge	short loc_63E588
pop	esi
pop	ebp
pop	ebx
mov	eax, edi
pop	edi
add	esp, 10h
retn	4

loc_63E588:
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 10h
retn	4

loc_63E594:
mov	eax, ecx
pop	edi
add	esp, 10h
retn	4
sub_63E4E0 endp

align 10h



sub_63E5A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_130B8A8
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	eax, [esp+30h+arg_8]
mov	ebx, [esp+30h+arg_0]
mov	ebp, [esp+30h+arg_4]
push	eax
push	ebx
mov	eax, ebp
call	sub_63EEC0
add	esp, 8
cmp	ebp, esi
jnb	loc_63E700
sub	esi, ebp
dec	esi
mov	ecx, esi
mov	eax, 24924925h
mul	ecx
sub	ecx, edx
shr	ecx, 1
add	ecx, edx
shr	ecx, 4
lea	edi, [ebp+14h]
inc	ecx
mov	[esp+30h+var_1C], edi
mov	[esp+30h+var_18], ecx
jmp	short loc_63E614
align 10h

loc_63E610:
mov	edi, [esp+30h+var_1C]

loc_63E614:
mov	esi, [ebx+10h]
mov	ebp, [edi-4]
mov	eax, [ebx+14h]
mov	ecx, [edi]
mov	edi, ebp
mov	ebx, esi
sub	edi, ecx
sub	ebx, eax
cmp	ebx, edi
mov	[esp+30h+var_10], edi
mov	[esp+30h+var_14], ebx
lea	edx, [esp+30h+var_14]
jl	short loc_63E63B
lea	edx, [esp+30h+var_10]

loc_63E63B:
mov	edx, [edx]
push	edx
push	eax
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E657
cmp	edi, ebx
jl	short loc_63E6AC
cmp	edi, ebx
setnle	al
test	eax, eax

loc_63E657:
jl	short loc_63E6AC
mov	eax, [esp+30h+arg_0]
mov	ecx, [esp+30h+var_1C]
mov	eax, [eax+14h]
mov	ecx, [ecx]
sub	esi, eax
sub	ebp, ecx
cmp	ebp, esi
mov	[esp+30h+var_14], esi
mov	[esp+30h+var_10], ebp
lea	edx, [esp+30h+var_10]
jl	short loc_63E67E
lea	edx, [esp+30h+var_14]

loc_63E67E:
mov	edx, [edx]
push	edx
push	ecx
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63E69A
cmp	esi, ebp
jl	short loc_63E6E8
cmp	esi, ebp
setnle	al
test	eax, eax

loc_63E69A:
jl	short loc_63E6E8
mov	eax, [esp+30h+var_1C]
mov	ecx, [eax+4]
mov	edx, [esp+30h+arg_0]
cmp	ecx, [edx+18h]
jnb	short loc_63E6E8

loc_63E6AC:
mov	eax, [esp+30h+arg_8]
mov	edi, [esp+30h+var_1C]
push	eax
sub	esp, 1Ch
add	edi, 0FFFFFFECh
mov	ecx, esp
mov	[esp+50h+var_10], esp
push	edi
call	sub_5BEF40
mov	ecx, [esp+50h+arg_4]
mov	esi, [esp+50h+arg_0]
mov	[esp+50h+var_4], 0
push	ecx
mov	[esp+54h+var_4], 0FFFFFFFFh
call	sub_63E9E0
add	esp, 24h

loc_63E6E8:
add	[esp+30h+var_1C], 1Ch
sub	[esp+30h+var_18], 1
mov	ebx, [esp+30h+arg_0]
jnz	loc_63E610
mov	ebp, [esp+30h+arg_4]

loc_63E700:
mov	edx, [esp+30h+arg_8]
push	edx
mov	eax, ebp
mov	ecx, ebx
call	sub_63EA90
add	esp, 4
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_63E5A0 endp

align 10h



sub_63E730 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1309F40
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
lea	eax, [esp+14h+arg_0]
push	esi
push	eax
mov	[esp+1Ch+var_4], 0
call	sub_63E920
add	esp, 8
test	al, al
jz	short loc_63E79C
lea	ecx, [edi+1Ch]
push	ecx
push	esi
mov	eax, edi
call	sub_63F780
lea	edx, [esp+1Ch+arg_0]
add	esp, 8
cmp	edx, esi
jz	short loc_63E793
mov	eax, [esp+14h+arg_10]
mov	ecx, [esp+14h+arg_14]
push	eax
push	ecx
mov	ecx, esi
call	sub_403980

loc_63E793:
mov	edx, [esp+14h+arg_18]
mov	[esi+18h], edx
jmp	short loc_63E7C7

loc_63E79C:
mov	eax, [esp+14h+arg_1C]
push	eax
sub	esp, 1Ch
lea	edx, [esp+34h+arg_0]
mov	ecx, esp
mov	[esp+34h+var_10], esp
push	edx
call	sub_5BEF40
mov	byte ptr [esp+34h+var_4], 1
push	edi
mov	byte ptr [esp+38h+var_4], 0
call	sub_63EB00
add	esp, 24h

loc_63E7C7:
lea	ecx, [esp+14h+arg_0]
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_63E730 endp

align 10h



sub_63E7F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, eax
mov	eax, [esp+0Ch+arg_8]
push	edi
push	eax
push	esi
mov	eax, ebx
call	sub_63F1C0
add	esp, 8
mov	edi, ebx
cmp	ebx, ebp
jnb	short loc_63E846

loc_63E814:
push	esi
push	edi
call	sub_63E980
add	esp, 8
test	al, al
jz	short loc_63E83F
mov	ecx, [esp+10h+arg_8]
push	ecx
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+30h+arg_4], esp
push	edi
call	sub_5BE8E0
push	ebx
call	sub_63EC50
add	esp, 24h

loc_63E83F:
add	edi, 1Ch
cmp	edi, ebp
jb	short loc_63E814

loc_63E846:
mov	edx, [esp+10h+arg_8]
push	edx
mov	eax, ebx
mov	ecx, esi
call	sub_63ED00
add	esp, 4
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_63E7F0 endp

align 10h



; int __cdecl sub_63E860(char, int, int, int, int, int,	float, int)
sub_63E860 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1309F40
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
lea	eax, [esp+14h+arg_0]
push	esi
push	eax
mov	[esp+1Ch+var_4], 0
call	sub_63E980
add	esp, 8
test	al, al
jz	short loc_63E8CC
lea	ecx, [edi+1Ch]
push	ecx
push	esi
mov	eax, edi
call	sub_63F7D0
lea	edx, [esp+1Ch+arg_0]
add	esp, 8
cmp	edx, esi
jz	short loc_63E8C3
mov	eax, [esp+14h+arg_10]
mov	ecx, [esp+14h+arg_14]
push	eax
push	ecx
mov	ecx, esi
call	sub_403980

loc_63E8C3:
fld	[esp+14h+arg_18]
fstp	dword ptr [esi+18h]
jmp	short loc_63E8F7

loc_63E8CC:
mov	edx, [esp+14h+arg_1C]
push	edx
sub	esp, 1Ch
lea	eax, [esp+34h+arg_0]
mov	ecx, esp
mov	[esp+34h+var_10], esp
push	eax
call	sub_5BE8E0
mov	byte ptr [esp+34h+var_4], 1
push	edi		; int
mov	byte ptr [esp+38h+var_4], 0
call	sub_63ED70
add	esp, 24h

loc_63E8F7:
lea	ecx, [esp+14h+arg_0]
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_63E860 endp

align 10h



sub_63E920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [eax+10h]
push	edi
mov	edi, [eax+14h]
mov	eax, [esp+10h+arg_0]
mov	ebx, [eax+10h]
mov	ebp, [eax+14h]
push	esi
push	edi
push	ebx
push	ebp
call	sub_4051D0
add	esp, 10h
test	eax, eax
jl	short loc_63E96F
push	ebx
push	ebp
push	esi
push	edi
call	sub_4051D0
add	esp, 10h
test	eax, eax
jl	short loc_63E968
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax+18h]
mov	edx, [esp+10h+arg_4]
cmp	ecx, [edx+18h]
jb	short loc_63E96F

loc_63E968:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_63E96F:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_63E920 endp

align 10h



sub_63E980 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [eax+10h]
push	edi
mov	edi, [eax+14h]
mov	eax, [esp+10h+arg_0]
mov	ebx, [eax+10h]
mov	ebp, [eax+14h]
push	esi
push	edi
push	ebx
push	ebp
call	sub_4051D0
add	esp, 10h
test	eax, eax
jl	short loc_63E9D6
push	ebx
push	ebp
push	esi
push	edi
call	sub_4051D0
add	esp, 10h
test	eax, eax
jl	short loc_63E9CF
mov	eax, [esp+10h+arg_0]
fld	dword ptr [eax+18h]
mov	ecx, [esp+10h+arg_4]
fld	dword ptr [ecx+18h]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_63E9D6

loc_63E9CF:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_63E9D6:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_63E980 endp




sub_63E9E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_20=	dword ptr  24h

push	0FFFFFFFFh
push	offset loc_1309F10
mov	eax, large fs:0
push	eax
push	ecx
push	ebp
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+18h+arg_0]
mov	[esp+18h+var_4], 0
cmp	esi, edi
jz	short loc_63EA21
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
push	eax
push	ecx
mov	ecx, edi
call	sub_403980

loc_63EA21:
mov	ecx, [esp+18h+arg_20]
mov	eax, [esi+18h]
push	ecx
sub	esp, 1Ch
lea	edx, [esp+38h+arg_4]
mov	ecx, esp
mov	[esp+38h+var_10], esp
push	edx
mov	[edi+18h], eax
call	sub_5BEF40
sub	ebp, esi
mov	ecx, ebp
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
push	eax
push	0
mov	byte ptr [esp+40h+var_4], 1
push	esi
mov	byte ptr [esp+44h+var_4], 0
call	sub_63EF30
add	esp, 2Ch
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebp
add	esp, 10h
retn
sub_63E9E0 endp

align 10h



sub_63EA90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
push	edi
mov	edi, eax
mov	esi, ecx
mov	ecx, edi
sub	ecx, esi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 1
jle	short loc_63EAFB
mov	ebx, 1Ch
add	edi, 0FFFFFFE4h
sub	ebx, esi
mov	edi, edi

loc_63EAC0:
mov	ecx, [esp+10h+arg_0]
push	ecx
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+30h+var_4], esp
push	edi
call	sub_5BEF40
push	edi
call	sub_63E9E0
sub	edi, 1Ch
lea	ecx, [ebx+edi]
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
add	esp, 24h
cmp	eax, 1
jg	short loc_63EAC0

loc_63EAFB:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_63EA90 endp




sub_63EB00 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1308538
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	eax, [esp+30h+arg_0]
mov	[esp+30h+var_1C], eax
mov	[esp+30h+var_4], 0
lea	ebp, [eax-1Ch]

loc_63EB3A:
mov	esi, [ebp+10h]
mov	edi, [ebp+14h]
mov	ebx, [esp+30h+arg_14]
mov	eax, [esp+30h+arg_18]
sub	ebx, eax
sub	esi, edi
cmp	esi, ebx
mov	[esp+30h+var_14], ebp
mov	[esp+30h+var_10], ebx
mov	[esp+30h+var_18], esi
lea	ecx, [esp+30h+var_18]
jl	short loc_63EB64
lea	ecx, [esp+30h+var_10]

loc_63EB64:
mov	ecx, [ecx]
push	ecx
push	edi
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63EB84
cmp	ebx, esi
jl	loc_63EC1B
cmp	ebx, esi
setnle	al
test	eax, eax

loc_63EB84:
jl	loc_63EC1B
mov	ebp, [esp+30h+var_14]
mov	esi, [ebp+10h]
sub	esi, edi
cmp	ebx, esi
mov	[esp+30h+var_18], esi
mov	[esp+30h+var_10], ebx
lea	eax, [esp+30h+var_10]
jl	short loc_63EBA7
lea	eax, [esp+30h+var_18]

loc_63EBA7:
mov	edx, [eax]
mov	eax, [esp+30h+arg_18]
push	edx
push	eax
push	edi
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63EBC7
cmp	esi, ebx
jl	short loc_63EBD2
cmp	esi, ebx
setnle	al
test	eax, eax

loc_63EBC7:
jl	short loc_63EBD2
mov	ecx, [esp+30h+arg_1C]
cmp	ecx, [ebp+18h]
jb	short loc_63EC1F

loc_63EBD2:
mov	esi, [esp+30h+var_1C]
lea	eax, [esp+30h+arg_4]
cmp	eax, esi
jz	short loc_63EBEF
mov	ecx, [esp+30h+arg_14]
mov	edx, [esp+30h+arg_18]
push	ecx
push	edx
mov	ecx, esi
call	sub_403980

loc_63EBEF:
mov	eax, [esp+30h+arg_1C]
mov	[esi+18h], eax
lea	ecx, [esp+30h+arg_4]
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_63EC1B:
mov	ebp, [esp+30h+var_14]

loc_63EC1F:
mov	esi, [esp+30h+var_1C]
cmp	ebp, esi
jz	short loc_63EC33
mov	eax, [ebp+10h]
push	eax
push	edi
mov	ecx, esi
call	sub_403980

loc_63EC33:
mov	edx, [ebp+18h]
mov	[esp+30h+var_1C], ebp
mov	[esi+18h], edx
sub	ebp, 1Ch
jmp	loc_63EB3A
sub_63EB00 endp

align 10h



sub_63EC50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_20=	dword ptr  24h

push	0FFFFFFFFh
push	offset loc_1309F10
mov	eax, large fs:0
push	eax
push	ecx
push	ebp
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+18h+arg_0]
mov	[esp+18h+var_4], 0
cmp	esi, edi
jz	short loc_63EC91
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
push	eax
push	ecx
mov	ecx, edi
call	sub_403980

loc_63EC91:
mov	eax, [esp+18h+arg_20]
fld	dword ptr [esi+18h]
push	eax
fstp	dword ptr [edi+18h]
sub	esp, 1Ch
lea	edx, [esp+38h+arg_4]
mov	ecx, esp
mov	[esp+38h+var_10], esp
push	edx
call	sub_5BE8E0
sub	ebp, esi
mov	ecx, ebp
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
push	eax
mov	byte ptr [esp+3Ch+var_4], 1
push	esi
xor	ecx, ecx
mov	byte ptr [esp+40h+var_4], 0
call	sub_63F230
add	esp, 28h
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebp
add	esp, 10h
retn
sub_63EC50 endp

align 10h



sub_63ED00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
push	edi
mov	edi, eax
mov	esi, ecx
mov	ecx, edi
sub	ecx, esi
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	eax, 1
jle	short loc_63ED6B
mov	ebx, 1Ch
add	edi, 0FFFFFFE4h
sub	ebx, esi
mov	edi, edi

loc_63ED30:
mov	ecx, [esp+10h+arg_0]
push	ecx
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+30h+var_4], esp
push	edi
call	sub_5BE8E0
push	edi
call	sub_63EC50
sub	edi, 1Ch
lea	ecx, [ebx+edi]
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
add	esp, 24h
cmp	eax, 1
jg	short loc_63ED30

loc_63ED6B:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_63ED00 endp




; int __cdecl sub_63ED70(int, char, int, int, int, int,	int, float)
sub_63ED70 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_1308538
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	eax, [esp+30h+arg_0]
mov	[esp+30h+var_1C], eax
mov	[esp+30h+var_4], 0
lea	ebp, [eax-1Ch]

loc_63EDAA:
mov	esi, [ebp+10h]
mov	edi, [ebp+14h]
mov	ebx, [esp+30h+arg_14]
mov	eax, [esp+30h+arg_18]
sub	ebx, eax
sub	esi, edi
cmp	esi, ebx
mov	[esp+30h+var_14], ebp
mov	[esp+30h+var_10], ebx
mov	[esp+30h+var_18], esi
lea	ecx, [esp+30h+var_18]
jl	short loc_63EDD4
lea	ecx, [esp+30h+var_10]

loc_63EDD4:
mov	ecx, [ecx]
push	ecx
push	edi
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63EDF4
cmp	ebx, esi
jl	loc_63EE92
cmp	ebx, esi
setnle	al
test	eax, eax

loc_63EDF4:
jl	loc_63EE92
mov	ebp, [esp+30h+var_14]
mov	esi, [ebp+10h]
sub	esi, edi
cmp	ebx, esi
mov	[esp+30h+var_18], esi
mov	[esp+30h+var_10], ebx
lea	eax, [esp+30h+var_10]
jl	short loc_63EE17
lea	eax, [esp+30h+var_18]

loc_63EE17:
mov	edx, [eax]
mov	eax, [esp+30h+arg_18]
push	edx
push	eax
push	edi
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63EE37
cmp	esi, ebx
jl	short loc_63EE49
cmp	esi, ebx
setnle	al
test	eax, eax

loc_63EE37:
jl	short loc_63EE49
fld	[esp+30h+arg_1C]
fld	dword ptr [ebp+18h]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_63EE96

loc_63EE49:
mov	esi, [esp+30h+var_1C]
lea	ecx, [esp+30h+arg_4]
cmp	ecx, esi
jz	short loc_63EE66
mov	edx, [esp+30h+arg_14]
mov	eax, [esp+30h+arg_18]
push	edx
push	eax
mov	ecx, esi
call	sub_403980

loc_63EE66:
fld	[esp+30h+arg_1C]
lea	ecx, [esp+30h+arg_4]
fstp	dword ptr [esi+18h]
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_63EE92:
mov	ebp, [esp+30h+var_14]

loc_63EE96:
mov	esi, [esp+30h+var_1C]
cmp	ebp, esi
jz	short loc_63EEAA
mov	eax, [ebp+10h]
push	eax
push	edi
mov	ecx, esi
call	sub_403980

loc_63EEAA:
fld	dword ptr [ebp+18h]
mov	[esp+30h+var_1C], ebp
fstp	dword ptr [esi+18h]
sub	ebp, 1Ch
jmp	loc_63EDAA
sub_63ED70 endp

align 10h



sub_63EEC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
sub	eax, ebp
mov	ecx, eax
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
push	esi
push	edi
mov	edi, edx
shr	edi, 1Fh
add	edi, edx
cmp	edi, 2
jl	short loc_63EF29
lea	eax, [edi-2]
cdq
sub	eax, edx
mov	esi, eax
sar	esi, 1
lea	eax, ds:0[esi*8]
sub	eax, esi
lea	ebx, [ebp+eax*4+0]
jmp	short loc_63EF00
align 10h

loc_63EF00:
mov	ecx, [esp+10h+arg_4]
push	ecx
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+30h+arg_0], esp
push	ebx
call	sub_5BEF40
push	edi
push	esi
push	ebp
call	sub_63EF30
add	esp, 2Ch
test	esi, esi
jz	short loc_63EF29
dec	esi
sub	ebx, 1Ch
jmp	short loc_63EF00

loc_63EF29:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_63EEC0 endp

align 10h



sub_63EF30 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_28=	dword ptr  2Ch

push	0FFFFFFFFh
push	offset loc_1309EE0
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+38h+var_C]
mov	large fs:0, eax
mov	ebx, [esp+38h+arg_0]
mov	[esp+38h+var_24], ebx
mov	eax, [esp+38h+arg_4]
lea	esi, [eax+eax+2]
cmp	esi, [esp+38h+arg_8]
mov	[esp+38h+var_4], 0
mov	[esp+38h+var_10], eax
jge	loc_63F073
lea	ecx, [ecx+0]

loc_63EF80:
lea	eax, ds:0[esi*8]
sub	eax, esi
mov	ebp, [ebx+eax*4-0Ch]
mov	edi, [ebx+eax*4+10h]
mov	ecx, [ebx+eax*4+14h]
lea	ebx, [ebx+eax*4]
mov	eax, [ebx-8]
sub	edi, ecx
sub	ebp, eax
cmp	ebp, edi
mov	[esp+38h+var_18], edi
mov	[esp+38h+var_14], ebp
lea	edx, [esp+38h+var_14]
jl	short loc_63EFB3
lea	edx, [esp+38h+var_18]

loc_63EFB3:
mov	edx, [edx]
push	edx
push	eax
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63EFCF
cmp	edi, ebp
jl	short loc_63F01F
cmp	edi, ebp
setnle	al
test	eax, eax

loc_63EFCF:
jl	short loc_63F01F
mov	ecx, [ebx-8]
mov	eax, [ebx-0Ch]
mov	edx, [ebx+14h]
sub	eax, ecx
mov	edi, eax
mov	eax, [ebx+10h]
sub	eax, edx
mov	ebp, eax
cmp	ebp, edi
mov	[esp+38h+var_1C], edi
mov	[esp+38h+var_20], ebp
lea	eax, [esp+38h+var_20]
jl	short loc_63EFF9
lea	eax, [esp+38h+var_1C]

loc_63EFF9:
mov	eax, [eax]
push	eax
push	edx
push	ecx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63F015
cmp	edi, ebp
jl	short loc_63F020
cmp	edi, ebp
setnle	al
test	eax, eax

loc_63F015:
jl	short loc_63F020
mov	ecx, [ebx+18h]
cmp	ecx, [ebx-4]
jnb	short loc_63F020

loc_63F01F:
dec	esi

loc_63F020:
mov	ecx, [esp+38h+var_24]
mov	eax, [esp+38h+arg_4]
lea	edx, ds:0[esi*8]
sub	edx, esi
lea	edi, [ecx+edx*4]
lea	edx, ds:0[eax*8]
sub	edx, eax
lea	ebx, [ecx+edx*4]
cmp	edi, ebx
jz	short loc_63F053
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebx
call	sub_403980

loc_63F053:
mov	eax, [edi+18h]
mov	[esp+38h+arg_4], esi
lea	esi, [esi+esi+2]
cmp	esi, [esp+38h+arg_8]
mov	[ebx+18h], eax
mov	ebx, [esp+38h+var_24]
jl	loc_63EF80
mov	eax, [esp+38h+arg_4]

loc_63F073:
jnz	short loc_63F0AC
lea	ecx, ds:0[esi*8]
sub	ecx, esi
lea	edx, ds:0[eax*8]
sub	edx, eax
lea	edi, [ebx+ecx*4-1Ch]
lea	ebx, [ebx+edx*4]
cmp	edi, ebx
jz	short loc_63F0A1
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebx
call	sub_403980

loc_63F0A1:
mov	eax, [edi+18h]
dec	esi
mov	[ebx+18h], eax
mov	[esp+38h+arg_4], esi

loc_63F0AC:
mov	ecx, [esp+38h+arg_28]
push	ecx
sub	esp, 1Ch
lea	edx, [esp+58h+arg_C]
mov	ecx, esp
mov	[esp+58h+var_20], esp
push	edx
call	sub_5BEF40
mov	eax, [esp+58h+var_10]
mov	ecx, [esp+58h+arg_4]
mov	edx, [esp+58h+var_24]
push	eax
push	ecx
mov	byte ptr [esp+60h+var_4], 1
push	edx
mov	byte ptr [esp+64h+var_4], 0
call	sub_63F410
add	esp, 2Ch
lea	ecx, [esp+38h+arg_C]
mov	[esp+38h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+38h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn
sub_63EF30 endp

align 10h



sub_63F110 proc	near

var_2C=	byte ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_1309EA8
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
push	edi
lea	ecx, [esp+34h+var_2C]
call	sub_5BEF40
mov	[esp+30h+var_4], 0
cmp	esi, edi
jz	short loc_63F163
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
push	eax
push	ecx
mov	ecx, edi
call	sub_403980

loc_63F163:
mov	eax, [esi+18h]
lea	ecx, [esp+30h+var_2C]
mov	[edi+18h], eax
cmp	ecx, esi
jz	short loc_63F182
mov	edx, [esp+30h+var_1C]
mov	eax, [esp+30h+var_18]
push	edx
push	eax
mov	ecx, esi
call	sub_403980

loc_63F182:
mov	ecx, [esp+30h+var_14]
mov	[esi+18h], ecx
lea	ecx, [esp+30h+var_2C]
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn
sub_63F110 endp

align 10h



sub_63F1C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
sub	eax, ebp
mov	ecx, eax
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
push	esi
push	edi
mov	edi, edx
shr	edi, 1Fh
add	edi, edx
cmp	edi, 2
jl	short loc_63F22A
lea	eax, [edi-2]
cdq
sub	eax, edx
mov	esi, eax
sar	esi, 1
lea	eax, ds:0[esi*8]
sub	eax, esi
lea	ebx, [ebp+eax*4+0]
jmp	short loc_63F200
align 10h

loc_63F200:
mov	ecx, [esp+10h+arg_4]
push	ecx
sub	esp, 1Ch
mov	ecx, esp
mov	[esp+30h+arg_0], esp
push	ebx
call	sub_5BE8E0
push	edi
push	ebp
mov	ecx, esi
call	sub_63F230
add	esp, 28h
test	esi, esi
jz	short loc_63F22A
dec	esi
sub	ebx, 1Ch
jmp	short loc_63F200

loc_63F22A:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_63F1C0 endp

align 10h



sub_63F230 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_24=	dword ptr  28h

push	0FFFFFFFFh
push	offset loc_1309E80
mov	eax, large fs:0
push	eax
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+28h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	ebx, [esp+28h+arg_0]
lea	esi, [edi+edi+2]
cmp	esi, [esp+28h+arg_4]
mov	[esp+28h+var_4], 0
mov	[esp+28h+var_14], edi
jge	short loc_63F2CE

loc_63F273:
lea	eax, ds:0[esi*8]
sub	eax, esi
lea	eax, [ebx+eax*4]
lea	ecx, [eax-1Ch]
push	ecx
push	eax
call	sub_63E980
add	esp, 8
test	al, al
jz	short loc_63F291
dec	esi

loc_63F291:
lea	eax, ds:0[edi*8]
lea	edx, ds:0[esi*8]
sub	edx, esi
sub	eax, edi
lea	ebp, [ebx+edx*4]
lea	edi, [ebx+eax*4]
cmp	ebp, edi
jz	short loc_63F2BC
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
mov	ecx, edi
call	sub_403980

loc_63F2BC:
fld	dword ptr [ebp+18h]
fstp	dword ptr [edi+18h]
mov	edi, esi
lea	esi, [esi+esi+2]
cmp	esi, [esp+28h+arg_4]
jl	short loc_63F273

loc_63F2CE:
jnz	short loc_63F305
lea	edx, ds:0[edi*8]
lea	ecx, ds:0[esi*8]
sub	ecx, esi
sub	edx, edi
lea	ebp, [ebx+ecx*4-1Ch]
lea	edi, [ebx+edx*4]
cmp	ebp, edi
jz	short loc_63F2FC
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
mov	ecx, edi
call	sub_403980

loc_63F2FC:
fld	dword ptr [ebp+18h]
fstp	dword ptr [edi+18h]
lea	edi, [esi-1]

loc_63F305:
mov	eax, [esp+28h+arg_24]
push	eax
sub	esp, 1Ch
lea	edx, [esp+48h+arg_8]
mov	ecx, esp
mov	[esp+48h+var_10], esp
push	edx
call	sub_5BE8E0
mov	eax, [esp+48h+var_14]
push	eax		; int
push	edi		; int
mov	byte ptr [esp+50h+var_4], 1
push	ebx		; int
mov	byte ptr [esp+54h+var_4], 0
call	sub_63F5C0
add	esp, 2Ch
lea	ecx, [esp+28h+arg_8]
mov	[esp+28h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+28h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_63F230 endp

align 10h



sub_63F360 proc	near

var_2C=	byte ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_1309EA8
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
push	edi
lea	ecx, [esp+34h+var_2C]
call	sub_5BE8E0
mov	[esp+30h+var_4], 0
cmp	esi, edi
jz	short loc_63F3B3
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
push	eax
push	ecx
mov	ecx, edi
call	sub_403980

loc_63F3B3:
fld	dword ptr [esi+18h]
lea	eax, [esp+30h+var_2C]
fstp	dword ptr [edi+18h]
cmp	eax, esi
jz	short loc_63F3D2
mov	ecx, [esp+30h+var_1C]
mov	edx, [esp+30h+var_18]
push	ecx
push	edx
mov	ecx, esi
call	sub_403980

loc_63F3D2:
fld	[esp+30h+var_14]
lea	ecx, [esp+30h+var_2C]
fstp	dword ptr [esi+18h]
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn
sub_63F360 endp

align 10h



sub_63F410 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

push	0FFFFFFFFh
push	offset loc_1308508
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	eax, [esp+34h+arg_0]
mov	[esp+34h+var_20], eax
mov	ecx, [esp+34h+arg_4]
lea	eax, [ecx-1]
cdq
sub	eax, edx
sar	eax, 1
cmp	ecx, [esp+34h+arg_8]
mov	[esp+34h+var_4], 0
mov	[esp+34h+var_1C], eax
jle	loc_63F567
jmp	short loc_63F474
jmp	short loc_63F470
align 10h

loc_63F470:
mov	eax, [esp+34h+var_1C]

loc_63F474:
mov	edx, [esp+34h+var_20]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
mov	ebp, [edx+ecx*4+10h]
mov	ebx, [edx+ecx*4+14h]
mov	eax, [esp+34h+arg_1C]
lea	edi, [edx+ecx*4]
mov	ecx, [esp+34h+arg_20]
sub	eax, ecx
mov	esi, ebp
sub	esi, ebx
mov	[esp+34h+var_18], eax
mov	[esp+34h+var_10], eax
cmp	eax, esi
mov	[esp+34h+var_14], esi
lea	eax, [esp+34h+var_10]
jl	short loc_63F4B2
lea	eax, [esp+34h+var_14]

loc_63F4B2:
mov	eax, [eax]
push	eax
push	ecx
push	ebx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63F4D6
mov	eax, [esp+34h+var_10]
cmp	esi, eax
jl	short loc_63F51D
xor	ecx, ecx
cmp	esi, eax
setnle	cl
mov	eax, ecx
test	eax, eax

loc_63F4D6:
jl	short loc_63F51D
mov	esi, [esp+34h+var_18]
sub	ebp, ebx
cmp	ebp, esi
mov	[esp+34h+var_14], esi
mov	[esp+34h+var_18], ebp
lea	eax, [esp+34h+var_18]
jl	short loc_63F4F2
lea	eax, [esp+34h+var_14]

loc_63F4F2:
mov	edx, [eax]
mov	eax, [esp+34h+arg_20]
push	edx
push	ebx
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63F512
cmp	esi, ebp
jl	short loc_63F567
cmp	esi, ebp
setnle	al
test	eax, eax

loc_63F512:
jl	short loc_63F567
mov	ecx, [edi+18h]
cmp	ecx, [esp+34h+arg_24]
jnb	short loc_63F567

loc_63F51D:
mov	eax, [esp+34h+arg_4]
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esp+34h+var_20]
lea	esi, [eax+edx*4]
cmp	edi, esi
jz	short loc_63F543
mov	eax, [edi+10h]
mov	ecx, ebx
push	eax
push	ecx
mov	ecx, esi
call	sub_403980

loc_63F543:
mov	ecx, [edi+18h]
mov	[esi+18h], ecx
mov	ecx, [esp+34h+var_1C]
lea	eax, [ecx-1]
cdq
sub	eax, edx
sar	eax, 1
cmp	ecx, [esp+34h+arg_8]
mov	[esp+34h+arg_4], ecx
mov	[esp+34h+var_1C], eax
jg	loc_63F470

loc_63F567:
mov	eax, [esp+34h+arg_4]
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esp+34h+var_20]
lea	esi, [eax+edx*4]
lea	ecx, [esp+34h+arg_C]
cmp	ecx, esi
jz	short loc_63F594
mov	edx, [esp+34h+arg_1C]
mov	eax, [esp+34h+arg_20]
push	edx
push	eax
mov	ecx, esi
call	sub_403980

loc_63F594:
mov	ecx, [esp+34h+arg_24]
mov	[esi+18h], ecx
lea	ecx, [esp+34h+arg_C]
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_63F410 endp




; int __cdecl sub_63F5C0(int, int, int,	char, int, int,	int, int, int, float)
sub_63F5C0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

push	0FFFFFFFFh
push	offset loc_1308508
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	eax, [esp+34h+arg_0]
mov	[esp+34h+var_20], eax
mov	ecx, [esp+34h+arg_4]
lea	eax, [ecx-1]
cdq
sub	eax, edx
sar	eax, 1
cmp	ecx, [esp+34h+arg_8]
mov	[esp+34h+var_4], 0
mov	[esp+34h+var_1C], eax
jle	loc_63F71E
jmp	short loc_63F624
jmp	short loc_63F620
align 10h

loc_63F620:
mov	eax, [esp+34h+var_1C]

loc_63F624:
mov	edx, [esp+34h+var_20]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
mov	ebp, [edx+ecx*4+10h]
mov	ebx, [edx+ecx*4+14h]
mov	eax, [esp+34h+arg_1C]
lea	edi, [edx+ecx*4]
mov	ecx, [esp+34h+arg_20]
sub	eax, ecx
mov	esi, ebp
sub	esi, ebx
mov	[esp+34h+var_18], eax
mov	[esp+34h+var_10], eax
cmp	eax, esi
mov	[esp+34h+var_14], esi
lea	eax, [esp+34h+var_10]
jl	short loc_63F662
lea	eax, [esp+34h+var_14]

loc_63F662:
mov	eax, [eax]
push	eax
push	ecx
push	ebx
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63F686
mov	eax, [esp+34h+var_10]
cmp	esi, eax
jl	short loc_63F6D4
xor	ecx, ecx
cmp	esi, eax
setnle	cl
mov	eax, ecx
test	eax, eax

loc_63F686:
jl	short loc_63F6D4
mov	esi, [esp+34h+var_18]
sub	ebp, ebx
cmp	ebp, esi
mov	[esp+34h+var_14], esi
mov	[esp+34h+var_18], ebp
lea	eax, [esp+34h+var_18]
jl	short loc_63F6A2
lea	eax, [esp+34h+var_14]

loc_63F6A2:
mov	edx, [eax]
mov	eax, [esp+34h+arg_20]
push	edx
push	ebx
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_63F6C2
cmp	esi, ebp
jl	short loc_63F71E
cmp	esi, ebp
setnle	al
test	eax, eax

loc_63F6C2:
jl	short loc_63F71E
fld	dword ptr [edi+18h]
fld	[esp+34h+arg_24]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_63F71E

loc_63F6D4:
mov	eax, [esp+34h+arg_4]
mov	edx, [esp+34h+var_20]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	esi, [edx+ecx*4]
cmp	edi, esi
jz	short loc_63F6FA
mov	eax, [edi+10h]
mov	ecx, ebx
push	eax
push	ecx
mov	ecx, esi
call	sub_403980

loc_63F6FA:
mov	ecx, [esp+34h+var_1C]
fld	dword ptr [edi+18h]
lea	eax, [ecx-1]
fstp	dword ptr [esi+18h]
cdq
sub	eax, edx
sar	eax, 1
cmp	ecx, [esp+34h+arg_8]
mov	[esp+34h+arg_4], ecx
mov	[esp+34h+var_1C], eax
jg	loc_63F620

loc_63F71E:
mov	eax, [esp+34h+arg_4]
mov	edx, [esp+34h+var_20]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	esi, [edx+ecx*4]
lea	eax, [esp+34h+arg_C]
cmp	eax, esi
jz	short loc_63F74B
mov	ecx, [esp+34h+arg_1C]
mov	edx, [esp+34h+arg_20]
push	ecx
push	edx
mov	ecx, esi
call	sub_403980

loc_63F74B:
fld	[esp+34h+arg_24]
lea	ecx, [esp+34h+arg_C]
fstp	dword ptr [esi+18h]
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_5887C0
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_63F5C0 endp

align 10h



sub_63F780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	ebx, [esp+8+arg_4]
push	edi
mov	edi, eax
mov	ecx, edi
sub	ecx, [esp+0Ch+arg_0]
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
test	esi, esi
jle	short loc_63F7CA

loc_63F7A6:
sub	edi, 1Ch
sub	ebx, 1Ch
cmp	edi, ebx
jz	short loc_63F7BF
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebx
call	sub_403980

loc_63F7BF:
mov	edx, [edi+18h]
dec	esi
mov	[ebx+18h], edx
test	esi, esi
jg	short loc_63F7A6

loc_63F7CA:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn
sub_63F780 endp




sub_63F7D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	ebx, [esp+8+arg_4]
push	edi
mov	edi, eax
mov	ecx, edi
sub	ecx, [esp+0Ch+arg_0]
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 4
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
test	esi, esi
jle	short loc_63F81A

loc_63F7F6:
sub	edi, 1Ch
sub	ebx, 1Ch
cmp	edi, ebx
jz	short loc_63F80F
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebx
call	sub_403980

loc_63F80F:
fld	dword ptr [edi+18h]
dec	esi
fstp	dword ptr [ebx+18h]
test	esi, esi
jg	short loc_63F7F6

loc_63F81A:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn
sub_63F7D0 endp




sub_63F820 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130627B
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
fld	ds:dword_15439C8
and	byte ptr [esi+0Ch], 0FCh
xor	eax, eax
fstp	dword ptr [esi+8]
mov	[esi+4], eax
mov	[esi+10h], eax
lea	eax, [esp+14h+arg_0]
push	eax
lea	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_15FB728
mov	dword ptr [esi+14h], 0FFFFFFFFh
call	sub_4022A0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_63F820 endp

align 10h



; int __thiscall sub_63F8A0(void *, char)
sub_63F8A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_15FB728
call	sub_407910
test	[esp+4+arg_0], 1
jz	short loc_63F8C1
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63F8C1:
mov	eax, esi
pop	esi
retn	4
sub_63F8A0 endp

align 10h



sub_63F8D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+0Ch], 1
jnz	short loc_63F931
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	edi
mov	edi, [esp+10h+arg_4]
lea	ebp, [esi+18h]

loc_63F8E7:
cmp	edi, ebp
jz	short loc_63F8FA
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebp
call	sub_403980

loc_63F8FA:
mov	edx, [esi]
mov	eax, [edx+2Ch]
push	ebx
mov	ecx, esi
call	eax
test	al, al
jz	short loc_63F91F
mov	edx, [esi]
mov	eax, [edx+30h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_63F91F
or	byte ptr [esi+0Ch], 1
test	byte ptr [esi+0Ch], 1
jz	short loc_63F8E7

loc_63F91F:
test	byte ptr [esi+0Ch], 1
pop	edi
pop	ebp
pop	ebx
jnz	short loc_63F931
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax

loc_63F931:
mov	al, [esi+0Ch]
and	al, 1
pop	esi
retn	8
sub_63F8D0 endp

align 10h



sub_63F940 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+14h]
push	1
call	edx
lea	ecx, [esi+18h]
call	sub_435B20
and	byte ptr [esi+0Ch], 0FEh
pop	esi
retn
sub_63F940 endp

align 10h



; int __stdcall	sub_63F960(float)
sub_63F960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

test	byte ptr [ecx+0Ch], 1
jz	short loc_63F979
fldz
fld	[esp+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_63F97E
fstp	st

loc_63F979:
xor	al, al
retn	4

loc_63F97E:
mov	eax, [ecx]
mov	edx, [eax+40h]
push	ecx
fstp	[esp+4+var_4]
call	edx
test	al, al
setnz	al
retn	4
sub_63F960 endp

align 10h



; int __stdcall	sub_63F9A0(float)
sub_63F9A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+0Ch], 1
jnz	short loc_63F9AF

loc_63F9A9:
xor	al, al
pop	esi
retn	4

loc_63F9AF:
mov	eax, [esi+4]
cmp	eax, 0FFFFFFFFh
jz	short loc_63F9A9
test	eax, eax
jnz	short loc_63F9C6
mov	eax, [esi]
mov	edx, [eax+34h]
call	edx
test	al, al
jz	short loc_63F9A9

loc_63F9C6:
fld	[esp+4+arg_0]
inc	dword ptr [esi+4]
fstp	dword ptr [esi+8]
mov	al, 1
pop	esi
retn	4
sub_63F9A0 endp

align 10h



sub_63F9E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
test	byte ptr [esi+0Ch], 1
jnz	short loc_63F9EF
xor	al, al
pop	esi
retn	4

loc_63F9EF:
mov	eax, [esi+4]
test	eax, eax
jnz	short loc_63F9FC
mov	al, 1
pop	esi
retn	4

loc_63F9FC:
push	ebx
mov	bl, [esp+8+arg_0]
cmp	eax, 1
jz	short loc_63FA0B
cmp	bl, 1
jnz	short loc_63FA2E

loc_63FA0B:
mov	eax, [esi]
mov	edx, [eax+38h]
call	edx
test	al, al
jnz	short loc_63FA1B
pop	ebx
pop	esi
retn	4

loc_63FA1B:
cmp	bl, 1
jnz	short loc_63FA2E
mov	al, bl
pop	ebx
mov	dword ptr [esi+4], 0
pop	esi
retn	4

loc_63FA2E:
dec	dword ptr [esi+4]
pop	ebx
mov	al, 1
pop	esi
retn	4
sub_63F9E0 endp

align 10h



sub_63FA40 proc	near
test	byte ptr [ecx+0Ch], 1
jnz	short loc_63FA49
xor	al, al
retn

loc_63FA49:
mov	eax, [ecx]
mov	edx, [eax+3Ch]
call	edx
test	al, al
setnz	al
retn
sub_63FA40 endp

align 10h



sub_63FA60 proc	near

arg_0= dword ptr  4

mov	al, 1
test	[ecx+0Ch], al
jnz	short loc_63FA6C
xor	al, al
retn	4

loc_63FA6C:
cmp	dword ptr [ecx+4], 0
mov	edx, [esp+arg_0]
setnz	cl
mov	[edx], cl
retn	4
sub_63FA60 endp

align 10h



sub_63FA80 proc	near
push	esi
mov	esi, ecx
mov	al, [esi+0Ch]
test	al, 1
jnz	short loc_63FA8E

loc_63FA8A:
xor	al, al
pop	esi
retn

loc_63FA8E:
test	al, 2
jnz	short loc_63FAA7
cmp	dword ptr [esi+4], 0
jz	short loc_63FAA3
mov	eax, [esi]
mov	edx, [eax+38h]
call	edx
test	al, al
jz	short loc_63FA8A

loc_63FAA3:
or	byte ptr [esi+0Ch], 2

loc_63FAA7:
mov	al, 1
pop	esi
retn
sub_63FA80 endp

align 10h



sub_63FAB0 proc	near
push	esi
mov	esi, ecx
mov	al, [esi+0Ch]
test	al, 1
jnz	short loc_63FABE

loc_63FABA:
xor	al, al
pop	esi
retn

loc_63FABE:
test	al, 2
jz	short loc_63FAD7
cmp	dword ptr [esi+4], 0
jz	short loc_63FAD3
mov	eax, [esi]
mov	edx, [eax+34h]
call	edx
test	al, al
jz	short loc_63FABA

loc_63FAD3:
and	byte ptr [esi+0Ch], 0FDh

loc_63FAD7:
mov	al, 1
pop	esi
retn
sub_63FAB0 endp

align 10h



sub_63FAE0 proc	near

arg_0= dword ptr  4

mov	al, [ecx+0Ch]
test	al, 1
jnz	short loc_63FAEC
xor	al, al
retn	4

loc_63FAEC:
mov	ecx, [esp+arg_0]
shr	al, 1
and	al, 1
mov	[ecx], al
mov	al, 1
retn	4
sub_63FAE0 endp

align 10h



sub_63FB00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_63FB0E
xor	al, al
retn	4

loc_63FB0E:
mov	[ecx+14h], eax
mov	al, 1
retn	4
sub_63FB00 endp

align 10h



sub_63FB20 proc	near
mov	eax, dword_18899F8
mov	eax, [eax+68h]
mov	edx, [eax]
mov	edx, [edx+2Ch]
push	esi
lea	esi, [ecx+10h]
mov	ecx, [ecx+14h]
push	esi
push	ecx
push	eax
call	edx
test	eax, eax
setz	al
pop	esi
retn
sub_63FB20 endp




sub_63FB40 proc	near
mov	eax, [ecx+10h]
mov	ecx, [eax]
mov	edx, [ecx+4]
push	eax
call	edx
test	eax, eax
setz	al
retn
sub_63FB40 endp

align 10h



sub_63FB60 proc	near
mov	eax, [ecx+10h]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
test	eax, eax
setz	al
retn
sub_63FB60 endp

align 10h



sub_63FB80 proc	near
mov	eax, dword_18899F8
mov	eax, [eax+68h]
mov	ecx, [ecx+14h]
mov	edx, [eax]
mov	edx, [edx+28h]
push	ecx
push	eax
call	edx
test	eax, eax
setz	al
retn
sub_63FB80 endp

align 10h



; int __stdcall	sub_63FBA0(float)
sub_63FBA0 proc	near

arg_0= dword ptr  4

fldz
fcom	dword ptr [ecx+8]
fnstsw	ax
test	ah, 41h
jnz	short loc_63FBB3
fstp	st

loc_63FBAE:
mov	al, 1
retn	4

loc_63FBB3:
fld	dword ptr [ecx+8]
fsub	[esp+arg_0]
fstp	[esp+arg_0]
fld	[esp+arg_0]
fst	dword ptr [ecx+8]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_63FBAE
mov	eax, [ecx]
mov	edx, [eax+14h]
push	1
call	edx
test	al, al
jnz	short loc_63FBAE
retn	4
sub_63FBA0 endp

align 10h



sub_63FBE0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130624B
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
and	byte ptr [esi+4], 0FEh
lea	eax, [esp+14h+arg_0]
push	eax
lea	ecx, [esi+0Ch]
mov	dword ptr [esi], offset	off_15FB76C
mov	dword ptr [esi+8], 0FFFFFFFFh
call	sub_4022A0
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	4
sub_63FBE0 endp




; int __thiscall sub_63FC40(void *, char)
sub_63FC40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0Ch]
mov	dword ptr [esi], offset	off_15FB76C
call	sub_407910
test	[esp+4+arg_0], 1
jz	short loc_63FC61
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63FC61:
mov	eax, esi
pop	esi
retn	4
sub_63FC40 endp

align 10h



sub_63FC70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+4], 1
jnz	short loc_63FCC4
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	edi
mov	edi, [esp+10h+arg_4]
lea	ebp, [esi+0Ch]

loc_63FC87:
cmp	edi, ebp
jz	short loc_63FC9A
mov	eax, [edi+10h]
mov	ecx, [edi+14h]
push	eax
push	ecx
mov	ecx, ebp
call	sub_403980

loc_63FC9A:
mov	edx, [esi]
mov	eax, [edx+14h]
push	ebx
mov	ecx, esi
call	eax
test	al, al
jz	short loc_63FCB2
or	byte ptr [esi+4], 1
test	byte ptr [esi+4], 1
jz	short loc_63FC87

loc_63FCB2:
test	byte ptr [esi+4], 1
pop	edi
pop	ebp
pop	ebx
jnz	short loc_63FCC4
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax

loc_63FCC4:
mov	al, [esi+4]
and	al, 1
pop	esi
retn	8
sub_63FC70 endp

align 10h



sub_63FCD0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+0Ch]
call	sub_435B20
and	byte ptr [esi+4], 0FEh
pop	esi
retn
sub_63FCD0 endp

align 10h



sub_63FCF0 proc	near

arg_0= dword ptr  4

test	byte ptr [ecx+4], 1
jnz	short loc_63FCFB
xor	al, al
retn	4

loc_63FCFB:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+18h]
push	edx
call	eax
test	al, al
setnz	al
retn	4
sub_63FCF0 endp

align 10h



; int __stdcall	sub_63FD10(float)
sub_63FD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

test	byte ptr [ecx+4], 1
jnz	short loc_63FD1B
xor	al, al
retn	4

loc_63FD1B:
mov	eax, [ecx]
fld	[esp+arg_0]
mov	edx, [eax+1Ch]
push	ecx
fstp	[esp+4+var_4]
call	edx
test	al, al
setnz	al
retn	4
sub_63FD10 endp

align 10h



sub_63FD40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_63FD4E
xor	al, al
retn	4

loc_63FD4E:
mov	[ecx+8], eax
mov	al, 1
retn	4
sub_63FD40 endp

align 10h



sub_63FD60 proc	near

arg_0= dword ptr  4

mov	eax, dword_18899F8
mov	eax, [eax+68h]
mov	ecx, [ecx+8]
mov	edx, [eax]
mov	edx, [edx+30h]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
push	ecx
push	eax
call	edx
test	eax, eax
setz	al
pop	esi
retn	4
sub_63FD60 endp

align 10h



; int __stdcall	sub_63FD90(float)
sub_63FD90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, dword_18899F8
fld	[esp+arg_0]
mov	eax, [eax+68h]
mov	edx, [eax]
mov	edx, [edx+34h]
push	ecx
mov	ecx, [ecx+8]
fstp	[esp+4+var_4]
push	ecx
push	eax
call	edx
test	eax, eax
setz	al
retn	4
sub_63FD90 endp

align 10h


; Attributes: bp-based frame

sub_63FDC0 proc	near

var_44=	dword ptr -44h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_63FDD8:
cmp	[ebp+var_8], 0
jz	short loc_63FE25
mov	eax, [ebp+var_8]
call	sub_404540
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jnz	short loc_63FE16
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
call	sub_4044C0
mov	eax, [eax]
mov	[ebp+var_8], eax
jmp	short loc_63FE23

loc_63FE16:
mov	eax, [ebp+var_8]
call	sub_403040
mov	ecx, [eax]
mov	[ebp+var_8], ecx

loc_63FE23:
jmp	short loc_63FDD8

loc_63FE25:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_44]
jz	short loc_63FE56
mov	eax, [ebp+var_4]
call	sub_404540
mov	[ebp+var_30], eax
mov	eax, [ebp+var_30]
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	ecx, [ebp+arg_0]
call	sub_404510
movzx	ecx, al
test	ecx, ecx
jz	short loc_63FE56
mov	edx, [ebp+var_44]
mov	[ebp+var_4], edx

loc_63FE56:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_63FDC0 endp

align 10h


; Attributes: bp-based frame

sub_63FE60 proc	near

var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_63FE60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	eax, [ebp+arg_0]
add	eax, 1
push	eax		; size_t
mov	ecx, [ebp+arg_8]
push	ecx		; int
mov	ecx, [ebp+var_20]
call	sub_402C50
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
call	sub_5F52F0
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
add	edx, [ebp+arg_0]
mov	[ebp+var_10], edx
push	0
lea	eax, [ebp+var_11]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_44D880
add	esp, 14h
mov	ecx, [ebp+var_20]
mov	edx, [ebp+var_10]
mov	[ecx+10h], edx
mov	ecx, [ebp+var_20]
call	sub_407C90
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_20]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_63FE60 endp

align 10h


; Attributes: bp-based frame

sub_63FF00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A31230
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_63FF23
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63FF23:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_63FF00 endp

align 10h


; Attributes: bp-based frame

sub_63FF30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A49D80
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_63FF53
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63FF53:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_63FF30 endp

align 10h


; Attributes: bp-based frame

sub_63FF60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A49D80
mov	esp, ebp
pop	ebp
retn
sub_63FF60 endp

align 10h


; Attributes: bp-based frame

sub_63FF80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+20Ch]
mov	eax, [ebp+var_4]
mov	ecx, [eax+20Ch]
mov	edx, [edx]
mov	eax, [edx+14h]
call	eax
mov	esp, ebp
pop	ebp
retn	4
sub_63FF80 endp

align 10h


; Attributes: bp-based frame

sub_63FFB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A22B40
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_63FFD3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_63FFD3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_63FFB0 endp

align 10h


; Attributes: bp-based frame

sub_63FFE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A31110
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_640003
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_640003:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_63FFE0 endp

align 10h


; Attributes: bp-based frame

sub_640010 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D3B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_46A7D0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_640010 endp

align 10h


; Attributes: bp-based frame

sub_640060 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_640210
mov	esp, ebp
pop	ebp
retn
sub_640060 endp

align 10h


; Attributes: bp-based frame

sub_640080 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_14=	byte ptr  1Ch
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_1C]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_6400BD
lea	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
lea	edx, [ebp+arg_14]
push	edx
mov	ecx, [ebp+var_4]
call	sub_A32370
push	eax
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
mov	edx, [eax+40h]
call	edx

loc_6400BD:
mov	eax, 1
mov	esp, ebp
pop	ebp
retn	20h
sub_640080 endp

align 10h


; Attributes: bp-based frame

sub_6400D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A30AB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_6400F3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6400F3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_6400D0 endp

align 10h


; Attributes: bp-based frame

sub_640100 proc	near

var_8= dword ptr -8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
call	sub_6403A0
mov	esp, ebp
pop	ebp
retn
sub_640100 endp

align 10h


; Attributes: bp-based frame

sub_640120 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_A31250
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_640143
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_640143:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_640120 endp

align 10h


; Attributes: bp-based frame

sub_640150 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_640150
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_F], al
lea	ecx, [ebp+var_D]
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_E]
mov	[ebp+var_28], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_52A300
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_403050
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_10]
call	nullsub_1
mov	eax, [ebp+var_24]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_24]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+18h], xmm0
push	0
mov	ecx, [ebp+var_24]
call	sub_640690
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_640150 endp

align 10h


; Attributes: bp-based frame

sub_640210 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_640210
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_640A90
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402DB0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_640730
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_640210 endp

align 10h


; Attributes: bp-based frame

sub_640290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_42D3B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_10]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_640290 endp

align 10h


; Attributes: bp-based frame

sub_6402E0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_6402E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_F], al
lea	ecx, [ebp+var_D]
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_E]
mov	[ebp+var_28], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_52A300
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_403050
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_10]
call	nullsub_1
mov	eax, [ebp+var_24]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_24]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+18h], xmm0
push	0
mov	ecx, [ebp+var_24]
call	sub_640690
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_6402E0 endp

align 10h


; Attributes: bp-based frame

sub_6403A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_6403A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_640EC0
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402DB0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_640AE0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_6403A0 endp

align 10h


; Attributes: bp-based frame

sub_640420 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_640420
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_24], ecx
xor	eax, eax
mov	[ebp+var_F], al
lea	ecx, [ebp+var_D]
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_E]
mov	[ebp+var_28], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_20]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_52A300
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_24]
add	ecx, 8
call	sub_403050
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_10]
call	nullsub_1
mov	eax, [ebp+var_24]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_24]
movss	xmm0, ds:dword_1479C54
movss	dword ptr [ecx+18h], xmm0
push	0
mov	ecx, [ebp+var_24]
call	sub_640690
mov	byte ptr [ebp+var_4], 8
mov	byte ptr [ebp+var_4], 9
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_24]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_640420 endp

align 10h


; Attributes: bp-based frame

sub_6404E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_6404E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
call	sub_641270
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_14]
add	ecx, 8
call	sub_402DB0
mov	byte ptr [ebp+var_4], 0
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 4
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_10]
call	sub_640F10
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_6404E0 endp

align 10h


; Attributes: bp-based frame

sub_640560 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_640560
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_10]
call	sub_640730
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_640560 endp

align 10h


; Attributes: bp-based frame

sub_6405B0 proc	near

var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_34]
call	sub_5BC040
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
jz	short loc_6405F9
push	ecx
mov	[ebp+var_28], esp
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_28]
call	sub_4046E0
mov	ecx, [ebp+var_34]
call	sub_594BE0
mov	eax, 1
jmp	short loc_6405FB

loc_6405F9:
xor	eax, eax

loc_6405FB:
mov	esp, ebp
pop	ebp
retn	4
sub_6405B0 endp

align 10h


; Attributes: bp-based frame

sub_640610 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_640560
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_10]
call	sub_640AE0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_640610 endp

align 10h


; Attributes: bp-based frame

sub_640660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_640660 endp

align 10h


; Attributes: bp-based frame

sub_640690 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77EAA0
add	esp, 4
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403A50
mov	[ebp+var_8], 0
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	esp, ebp
pop	ebp
retn	4
sub_640690 endp

align 10h


; Attributes: bp-based frame

sub_6406E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_640560
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 0
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_10]
call	sub_640F10
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_6406E0 endp

align 10h


; Attributes: bp-based frame

sub_640730 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_640741:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_640779
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_640777
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_640777:
jmp	short loc_640741

loc_640779:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_640730 endp

align 10h


; Attributes: bp-based frame

sub_640790 proc	near

var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_50], eax
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
xor	edx, edx
div	[ebp+var_50]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_C], edx
mov	[ebp+var_8], 0
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setz	dl
mov	[ebp+var_C9], dl
movzx	eax, [ebp+var_C9]
test	eax, eax
jz	loc_6408E7
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_52A900
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_6C]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_80]
push	edx
mov	ecx, [ebp+var_C8]
add	ecx, 4
call	sub_641560
mov	[ebp+var_7C], eax
mov	eax, [ebp+var_7C]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_30]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_D0]
mov	eax, [edx]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_640A66

loc_6408E7:
mov	ecx, [ebp+var_C]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_8C]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_640660
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
mov	[ebp+var_18], eax
jmp	short loc_64094B

loc_64093B:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx

loc_64094B:
lea	edx, [ebp+var_A0]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx], edx
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_A0]
setnz	cl
mov	[ebp+var_D1], cl
movzx	edx, [ebp+var_D1]
test	edx, edx
jz	loc_640A66
lea	eax, [ebp+var_AC]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_AC]
setz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_640A61
lea	ecx, [ebp+var_C4]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_B0]
mov	[eax], ecx
mov	edx, [ebp+var_C4]
mov	eax, [edx]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ecx]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_C4]
mov	ecx, [ebp+var_B8]
mov	[eax], ecx
xor	edx, edx
mov	[ebp+var_BD], dl
cmp	[ebp+var_BC], 0
jz	short loc_640A4D
mov	eax, 1
shl	eax, 4
push	eax		; int
mov	ecx, [ebp+var_BC]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_640A4D:
mov	edx, [ebp+var_B8]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_640A66

loc_640A61:
jmp	loc_64093B

loc_640A66:
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_C8]
mov	[eax+14h], edx
mov	ecx, [ebp+var_C8]
call	sub_641C30
mov	esp, ebp
pop	ebp
retn	4
sub_640790 endp

align 10h


; Attributes: bp-based frame

sub_640A90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_640730
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_640A90 endp



; Attributes: bp-based frame

sub_640AE0 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_640AF1:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_640B29
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_640B27
mov	ecx, 1
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_640B27:
jmp	short loc_640AF1

loc_640B29:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_640AE0 endp

align 10h


; Attributes: bp-based frame

sub_640B40 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_640DDC
jmp	short loc_640C05

loc_640BFD:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_640C05:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_640CD2
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_7C]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_640CCD
mov	[ebp+var_15], 0
lea	eax, [ebp+var_94]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	ecx, [ebp+var_94]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_98]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_15]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_640E22

loc_640CCD:
jmp	loc_640BFD

loc_640CD2:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_641600
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_640E22

loc_640DDC:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_641DD0
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_640E22:
mov	esp, ebp
pop	ebp
retn	8
sub_640B40 endp

align 10h


; Attributes: bp-based frame

sub_640E30 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_640E92
jmp	short loc_640EAD

loc_640E92:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_6422B0

loc_640EAD:
mov	esp, ebp
pop	ebp
retn	4
sub_640E30 endp

align 10h


; Attributes: bp-based frame

sub_640EC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_640AE0
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_640EC0 endp



; Attributes: bp-based frame

sub_640F10 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_640F21:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_4]
jz	short loc_640F59
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_640F57
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_640F57:
jmp	short loc_640F21

loc_640F59:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+arg_4]
mov	esp, ebp
pop	ebp
retn	8
sub_640F10 endp

align 10h


; Attributes: bp-based frame

sub_640F70 proc	near

var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_BD=	byte ptr -0BDh
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0D4h
mov	[ebp+var_C8], ecx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_4C], ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_50], eax
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	[ebp+var_54], eax
mov	eax, [ebp+var_54]
xor	edx, edx
div	[ebp+var_50]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_C], edx
mov	[ebp+var_8], 0
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setz	dl
mov	[ebp+var_C9], dl
movzx	eax, [ebp+var_C9]
test	eax, eax
jz	loc_6410C7
mov	ecx, [ebp+var_4]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_C8]
call	sub_52A900
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_6C]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_78], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_78]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+var_80]
push	edx
mov	ecx, [ebp+var_C8]
add	ecx, 4
call	sub_6415B0
mov	[ebp+var_7C], eax
mov	eax, [ebp+var_7C]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_30]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+var_D0]
mov	eax, [edx]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_28]
push	ecx
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
push	eax
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_10]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_641246

loc_6410C7:
mov	ecx, [ebp+var_C]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_8C]
push	ecx
lea	ecx, [ebp+var_1C]
call	sub_640660
mov	ecx, [ebp+var_C8]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_4]
lea	eax, [eax+edx*4+4]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
mov	edx, [ecx]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
mov	[ebp+var_18], eax
jmp	short loc_64112B

loc_64111B:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx

loc_64112B:
lea	edx, [ebp+var_A0]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_9C]
mov	edx, [ebp+var_98]
mov	[ecx], edx
mov	eax, [ebp+var_C]
xor	ecx, ecx
cmp	eax, [ebp+var_A0]
setnz	cl
mov	[ebp+var_D1], cl
movzx	edx, [ebp+var_D1]
test	edx, edx
jz	loc_641246
lea	eax, [ebp+var_AC]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_A4], ecx
mov	edx, [ebp+var_A8]
mov	eax, [ebp+var_A4]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_AC]
setz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_641241
lea	ecx, [ebp+var_C4]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_B4]
mov	ecx, [ebp+var_B0]
mov	[eax], ecx
mov	edx, [ebp+var_C4]
mov	eax, [edx]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+var_BC]
mov	edx, [ecx]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_C4]
mov	ecx, [ebp+var_B8]
mov	[eax], ecx
xor	edx, edx
mov	[ebp+var_BD], dl
cmp	[ebp+var_BC], 0
jz	short loc_64122D
mov	eax, 1
imul	eax, 0Ch
push	eax		; int
mov	ecx, [ebp+var_BC]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_64122D:
mov	edx, [ebp+var_B8]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_641246

loc_641241:
jmp	loc_64111B

loc_641246:
mov	ecx, [ebp+var_C8]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_8]
mov	eax, [ebp+var_C8]
mov	[eax+14h], edx
mov	ecx, [ebp+var_C8]
call	sub_6425D0
mov	esp, ebp
pop	ebp
retn	4
sub_640F70 endp

align 10h


; Attributes: bp-based frame

sub_641270 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 4
mov	[ebp+var_8], eax
push	0
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+var_8]
call	sub_640F10
mov	[ebp+var_4], 0
lea	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_404580
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
call	sub_403130
mov	eax, [ebp+var_C]
mov	dword ptr [eax+14h], 0
mov	esp, ebp
pop	ebp
retn
sub_641270 endp



; Attributes: bp-based frame

sub_6412C0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 64h
push	esi
mov	[ebp+var_54], ecx
mov	[ebp+var_30], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_54]
call	sub_644480
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	ecx, [ebp+var_54]
lea	eax, [ebp+var_10]
call	sub_4046E0
lea	ecx, [ebp+var_3C]
mov	[ebp+var_38], ecx
mov	ecx, [ebp+var_10]
mov	eax, [ebp+var_38]
call	sub_4046E0
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_3C]
setz	al
mov	[ebp+var_55], al
movzx	ecx, [ebp+var_55]
test	ecx, ecx
jnz	short loc_641359
lea	edx, [ebp+var_11]
push	edx
mov	ecx, [ebp+var_54]
call	sub_5F3820
mov	[ebp+var_5C], eax
mov	eax, [ebp+var_30]
or	eax, 1
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	esi, [ebp+arg_0]
call	sub_A46ED0
movzx	edx, al
test	edx, edx
jnz	short loc_641359
mov	[ebp+var_60], 0
jmp	short loc_641360

loc_641359:
mov	[ebp+var_60], 1

loc_641360:
mov	al, byte ptr [ebp+var_60]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_30]
and	ecx, 1
jz	short loc_641372
and	[ebp+var_30], 0FFFFFFFEh

loc_641372:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_6413D3
mov	[ebp+var_24], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ebp+var_20], ecx
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_24]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_50]
mov	[ebp+var_44], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+var_44]
call	sub_4046E0
lea	edx, [ebp+var_20]
push	edx
push	ecx
mov	[ebp+var_4C], esp
mov	ecx, [ebp+var_50]
mov	eax, [ebp+var_4C]
call	sub_4046E0
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_54]
call	sub_641720
lea	ecx, [ebp+var_2C]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_6413D3:
mov	eax, [ebp+var_4]
add	eax, 18h
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_6412C0 endp



; Attributes: bp-based frame

sub_6413E0 proc	near

var_60=	dword ptr -60h
var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_58], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_643B90
mov	edx, [ebp+var_2C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_38]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_54]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_40]
mov	eax, [ebp+var_3C]
mov	[edx], eax
lea	ecx, [ebp+var_50]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_50]
setz	al
mov	[ebp+var_59], al
mov	cl, [ebp+var_59]
mov	[ebp+var_5A], cl
movzx	edx, [ebp+var_5A]
test	edx, edx
jz	short loc_641480
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[ebp+var_18], edx
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_1C]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_641D90
add	eax, 4
mov	[ebp+var_60], eax
jmp	short loc_641489

loc_641480:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_60], edx

loc_641489:
mov	eax, [ebp+var_60]
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_6413E0 endp

align 10h


; Attributes: bp-based frame

sub_6414A0 proc	near

var_58=	dword ptr -58h
var_52=	byte ptr -52h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_50], ecx
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_50]
call	sub_643B90
mov	edx, [ebp+var_24]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_30]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_30]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_4C]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_38]
mov	eax, [ebp+var_34]
mov	[edx], eax
lea	ecx, [ebp+var_48]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_4C]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_40]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_48]
setz	al
mov	[ebp+var_51], al
mov	cl, [ebp+var_51]
mov	[ebp+var_52], cl
movzx	edx, [ebp+var_52]
test	edx, edx
jz	short loc_641541
mov	[ebp+var_1C], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_50]
call	sub_642730
add	eax, 4
mov	[ebp+var_58], eax
jmp	short loc_64154A

loc_641541:
mov	ecx, [ebp+var_4]
add	ecx, 8
mov	[ebp+var_58], ecx

loc_64154A:
mov	edx, [ebp+var_58]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_6414A0 endp

align 10h


; Attributes: bp-based frame

sub_641560 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_6415A1
mov	ecx, 1
shl	ecx, 4
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_6415A1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_641560 endp

align 10h


; Attributes: bp-based frame

sub_6415B0 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_6415F1
mov	ecx, 1
imul	ecx, 0Ch
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_6415F1:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_6415B0 endp

align 10h


; Attributes: bp-based frame

sub_641600 proc	near

var_34=	dword ptr -34h
var_30=	word ptr -30h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_641600
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_34], ecx
push	1
mov	ecx, [ebp+var_34]
call	sub_6416C0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
xor	eax, eax
mov	byte ptr [ebp+var_30+1], al
mov	cl, byte ptr [ebp+var_30+1]
mov	[ebp+var_2D], cl
xor	edx, edx
mov	byte ptr [ebp+var_30], dl
mov	al, byte ptr [ebp+var_30]
mov	[ebp+var_2E], al
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+4], eax
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx], 0
jmp	short loc_641696

loc_641665:
cmp	[ebp+var_14], 0
jz	short loc_641680
mov	edx, 1
shl	edx, 3
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_641680:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_64169D
retn

loc_641696:
mov	[ebp+var_4], 0FFFFFFFFh

loc_64169D:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_641600 endp

align 10h


; Attributes: bp-based frame

sub_6416C0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 1FFFFFFFh
jbe	short loc_6416E8
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_6416E8:
cmp	[ebp+arg_0], 0
jz	short loc_64170E
mov	ecx, [ebp+arg_0]
shl	ecx, 3
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_641715

loc_64170E:
mov	[ebp+var_18], 0

loc_641715:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_6416C0 endp

align 10h


; Attributes: bp-based frame

sub_641720 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	byte ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
push	esi
mov	[ebp+var_A0], ecx
mov	[ebp+var_4C], 0
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_641910
mov	edx, [ebp+var_A0]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_64178A
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_642AD0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_641C1E

loc_64178A:
lea	edx, [ebp+var_1E]
mov	[ebp+var_A4], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_54], eax
mov	edx, [ebp+var_54]
mov	esi, [ebp+arg_8]
call	sub_A46ED0
mov	[ebp+var_1D], al
movzx	ecx, [ebp+var_1D]
test	ecx, ecx
jz	short loc_6417DC
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	loc_641C1E
jmp	loc_64190B

loc_6417DC:
lea	eax, [ebp+var_1F]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_5C], ecx
mov	edx, [ebp+arg_8]
mov	esi, [ebp+var_5C]
call	sub_A46ED0
mov	[ebp+var_5], al
movzx	edx, [ebp+var_5]
test	edx, edx
jnz	short loc_641817
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_641C1E

loc_641817:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_4]
call	sub_4046E0
mov	eax, [ebp+var_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_A0]
jnz	short loc_641861
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	loc_641C1E

loc_641861:
lea	eax, [ebp+var_21]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	esi, [ebp+arg_8]
call	sub_A46ED0
mov	[ebp+var_20], al
movzx	edx, [ebp+var_20]
test	edx, edx
jz	short loc_6418E0
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_6418B9
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	loc_641C1E
jmp	short loc_6418DE

loc_6418B9:
push	0
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	loc_641C1E

loc_6418DE:
jmp	short loc_64190B

loc_6418E0:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_2C]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_642AD0
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_6C]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_641C1E

loc_64190B:
jmp	loc_641C1E

loc_641910:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_A0]
jnz	loc_6419AA
lea	ecx, [ebp+var_2E]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx+0Ch]
add	eax, 10h
mov	[ebp+var_70], eax
mov	edx, [ebp+arg_8]
mov	esi, [ebp+var_70]
call	sub_A46ED0
mov	[ebp+var_2D], al
movzx	ecx, [ebp+var_2D]
test	ecx, ecx
jz	short loc_64197A
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_A0]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	loc_641C1E
jmp	short loc_6419A5

loc_64197A:
mov	ecx, [ebp+arg_8]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_642AD0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	loc_641C1E

loc_6419A5:
jmp	loc_641C1E

loc_6419AA:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_C]
call	sub_4046E0
mov	ecx, [ebp+var_C]
push	ecx
call	sub_77E330
add	esp, 4
mov	[ebp+var_C], eax
lea	edx, [ebp+var_39]
mov	[ebp+var_B4], edx
mov	eax, [ebp+arg_4]
add	eax, 10h
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
mov	esi, [ebp+arg_8]
call	sub_A46ED0
mov	[ebp+var_6], al
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_641A2B
lea	edx, [ebp+var_3B]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_4C]
or	eax, 1
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_C]
add	ecx, 10h
mov	[ebp+var_84], ecx
mov	edx, [ebp+arg_8]
mov	esi, [ebp+var_84]
call	sub_A46ED0
movzx	edx, al
test	edx, edx
jz	short loc_641A2B
mov	[ebp+var_BC], 1
jmp	short loc_641A35

loc_641A2B:
mov	[ebp+var_BC], 0

loc_641A35:
mov	al, byte ptr [ebp+var_BC]
mov	[ebp+var_3A], al
mov	ecx, [ebp+var_4C]
and	ecx, 1
jz	short loc_641A4A
and	[ebp+var_4C], 0FFFFFFFEh

loc_641A4A:
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	short loc_641AAC
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_641A82
mov	ecx, [ebp+var_C]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	loc_641C1E
jmp	short loc_641AA7

loc_641A82:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	loc_641C1E

loc_641AA7:
jmp	loc_641C1E

loc_641AAC:
mov	ecx, [ebp+arg_4]
lea	eax, [ebp+var_10]
call	sub_4046E0
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
movzx	ecx, [ebp+var_6]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_11], cl
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_641B02
lea	eax, [ebp+var_3C]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_8C], ecx
mov	edx, [ebp+arg_8]
mov	esi, [ebp+var_8C]
call	sub_A46ED0
mov	[ebp+var_11], al

loc_641B02:
movzx	edx, [ebp+var_6]
test	edx, edx
jnz	short loc_641B5C
movzx	eax, [ebp+var_11]
test	eax, eax
jz	short loc_641B5C
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_A0]
jz	short loc_641B50
lea	edx, [ebp+var_3E]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_4C]
or	eax, 2
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	esi, [ebp+arg_8]
call	sub_A46ED0
movzx	edx, al
test	edx, edx
jz	short loc_641B5C

loc_641B50:
mov	[ebp+var_C8], 1
jmp	short loc_641B66

loc_641B5C:
mov	[ebp+var_C8], 0

loc_641B66:
mov	al, byte ptr [ebp+var_C8]
mov	[ebp+var_3D], al
mov	ecx, [ebp+var_4C]
and	ecx, 2
jz	short loc_641B7B
and	[ebp+var_4C], 0FFFFFFFDh

loc_641B7B:
movzx	edx, [ebp+var_3D]
test	edx, edx
jz	short loc_641BD4
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_641BB0
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	short loc_641C1E
jmp	short loc_641BD2

loc_641BB0:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_A0]
call	sub_642980
mov	eax, [ebp+arg_0]
jmp	short loc_641C1E

loc_641BD2:
jmp	short loc_641C1E

loc_641BD4:
movzx	eax, [ebp+var_6]
movzx	ecx, [ebp+var_11]
cmp	eax, ecx
jnz	short loc_641BF2
mov	ecx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
jmp	short loc_641C1E
jmp	short loc_641C1E

loc_641BF2:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_A0]
call	sub_642AD0
mov	[ebp+var_9C], eax
mov	ecx, [ebp+var_9C]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]

loc_641C1E:
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_641720 endp

align 10h


; Attributes: bp-based frame

sub_641C30 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:dbl_15FCD40
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_641C98
jmp	loc_641D89

loc_641C98:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_641D0C
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_641D0A
jmp	short loc_641D89

loc_641D0A:
jmp	short loc_641D18

loc_641D0C:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_641D18
jmp	short loc_641D89

loc_641D18:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_641D7B
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_641D70
jmp	short loc_641D7B

loc_641D70:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_641D18

loc_641D7B:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_642FE0

loc_641D89:
mov	esp, ebp
pop	ebp
retn
sub_641C30 endp

align 10h


; Attributes: bp-based frame

sub_641D90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_642F50
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_642C60
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_641D90 endp

align 10h


; Attributes: bp-based frame

sub_641DD0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_641600
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_641DD0 endp

align 10h


; Attributes: bp-based frame

sub_641ED0 proc	near

var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F6=	byte ptr -0F6h
var_F5=	byte ptr -0F5h
var_F4=	dword ptr -0F4h
var_ED=	byte ptr -0EDh
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	byte ptr -0A8h
var_A0=	dword ptr -0A0h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 100h
mov	[ebp+var_EC], ecx
mov	ecx, [ebp+var_EC]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_44], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
xor	edx, edx
div	[ebp+var_44]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_EC]
add	ecx, 8
call	sub_422EC0
mov	edx, [ebp+var_8]
lea	eax, [eax+edx*4]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ecx]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_EC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_58]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_64]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_5C]
mov	[edx], eax
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_64]
setz	dl
mov	[ebp+var_ED], dl
movzx	eax, [ebp+var_ED]
test	eax, eax
jz	short loc_641F88
xor	eax, eax
jmp	loc_6422A5

loc_641F88:
mov	[ebp+var_C], 0
mov	ecx, [ebp+var_10]
add	ecx, 4
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_68]
mov	[ebp+var_70], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setz	al
movzx	ecx, al
test	ecx, ecx
jz	loc_6420ED
mov	edx, [ebp+var_8]
mov	[ebp+var_14], edx
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_EC]
call	sub_52A900
mov	[ebp+var_78], eax
mov	edx, [ebp+var_78]
mov	eax, [edx]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
mov	[ebp+var_18], ecx

loc_641FE2:
lea	edx, [ebp+var_88]
mov	[ebp+var_80], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_80]
mov	edx, [ebp+var_7C]
mov	[ecx], edx
mov	eax, [ebp+var_88]
push	eax
mov	ecx, [ebp+var_EC]
add	ecx, 4
call	sub_642920
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_2C], ecx
lea	edx, [ebp+var_2C]
mov	[ebp+var_F4], edx
mov	eax, [ebp+var_F4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_C], edx
lea	eax, [ebp+var_94]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_94]
setnz	dl
mov	[ebp+var_F5], dl
movzx	eax, [ebp+var_F5]
test	eax, eax
jz	short loc_6420B1
mov	ecx, [ebp+var_10]
add	ecx, 4
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_641FE2

loc_6420B1:
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_EC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_EC]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_14]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_642282

loc_6420ED:
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_A8]
call	sub_640660
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
mov	[ebp+var_10], edx
lea	eax, [ebp+var_A8]
push	eax
lea	ecx, [ebp+var_1C]
call	sub_640660
jmp	short loc_642125

loc_642115:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_10], ecx

loc_642125:
lea	edx, [ebp+var_B4]
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+var_AC]
mov	[ecx], edx
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_B4]
setnz	cl
mov	[ebp+var_F6], cl
movzx	edx, [ebp+var_F6]
test	edx, edx
jz	loc_642282
mov	eax, [ebp+var_10]
add	eax, 4
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_B8]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+var_C0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setz	dl
movzx	eax, dl
test	eax, eax
jz	loc_64227D

loc_6421A0:
lea	ecx, [ebp+var_D0]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+var_1C]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C8]
mov	ecx, [ebp+var_C4]
mov	[eax], ecx
mov	edx, [ebp+var_D0]
push	edx
mov	ecx, [ebp+var_EC]
add	ecx, 4
call	sub_642920
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_3C]
mov	[ebp+var_FC], ecx
mov	edx, [ebp+var_FC]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
add	ecx, 1
mov	[ebp+var_C], ecx
lea	edx, [ebp+var_DC]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ebp+var_D4]
mov	[ecx], edx
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_DC]
setnz	cl
mov	[ebp+var_FD], cl
movzx	edx, [ebp+var_FD]
test	edx, edx
jz	short loc_64227B
mov	eax, [ebp+var_10]
add	eax, 4
mov	[ebp+var_E0], eax
mov	ecx, [ebp+var_E0]
mov	[ebp+var_E8], ecx
mov	edx, [ebp+var_E8]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setz	dl
movzx	eax, dl
test	eax, eax
jnz	loc_6421A0

loc_64227B:
jmp	short loc_642282

loc_64227D:
jmp	loc_642115

loc_642282:
mov	ecx, [ebp+var_EC]
mov	edx, [ecx+14h]
sub	edx, [ebp+var_C]
mov	eax, [ebp+var_EC]
mov	[eax+14h], edx
mov	ecx, [ebp+var_EC]
call	sub_643300
mov	eax, [ebp+var_C]

loc_6422A5:
mov	esp, ebp
pop	ebp
retn	4
sub_641ED0 endp

align 10h


; Attributes: bp-based frame

sub_6422B0 proc	near

var_115= byte ptr -115h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E9=	byte ptr -0E9h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_6422B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10Ch
mov	[ebp+var_108], ecx
lea	eax, [ebp+var_39]
push	eax
mov	ecx, [ebp+var_108]
add	ecx, 4
call	sub_642770
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_5C]
push	edx
lea	ecx, [ebp+var_18]
call	sub_52A300
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_40], 0
lea	eax, [ebp+var_3A]
push	eax
mov	ecx, [ebp+var_108]
add	ecx, 8
call	sub_604B20
mov	[ebp+var_110], eax
mov	ecx, [ebp+var_110]
mov	[ebp+var_114], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_114]
push	edx
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_24]
call	sub_4045A0
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_3A]
call	nullsub_1
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0

loc_64236F:
mov	edx, [ebp+var_108]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_642544
mov	edx, [ebp+var_108]
mov	eax, [edx+4]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ebp+var_70], eax
mov	eax, [ebp+var_70]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_38]
mov	ecx, [eax]
mov	[ebp+var_38], ecx
jmp	short loc_6423E9

loc_6423D9:
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx

loc_6423E9:
lea	eax, [ebp+var_7C]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_74]
mov	[edx], eax
mov	ecx, [ebp+var_38]
xor	edx, edx
cmp	ecx, [ebp+var_7C]
setnz	dl
mov	[ebp+var_115], dl
movzx	eax, [ebp+var_115]
test	eax, eax
jz	short loc_642464
mov	ecx, [ebp+var_38]
add	ecx, 4
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_88]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_642464
jmp	loc_6423D9

loc_642464:
mov	ecx, [ebp+var_30]
mov	[ebp+var_28], ecx
lea	edx, [ebp+var_28]
push	edx
lea	eax, [ebp+var_24]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_4C]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	[ebp+var_34], edx
push	ecx
mov	eax, esp
mov	[ebp+var_50], esp
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_54], esp
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_108]
add	edx, 4
mov	eax, [ebp+var_A8]
mov	[eax], edx
mov	ecx, [ebp+var_108]
add	ecx, 4
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_58], esp
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+var_AC]
mov	[ecx], edx
lea	ecx, [ebp+var_18]
call	sub_642790
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_30]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_28]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_64236F

loc_642544:
mov	eax, [ebp+var_108]
add	eax, 4
mov	[ebp+var_F4], eax
xor	ecx, ecx
mov	[ebp+var_E9], cl
mov	edx, [ebp+var_F4]
mov	eax, [edx]
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_F4]
mov	[edx], ecx
mov	eax, [ebp+var_F0]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_108]
add	ecx, 8
call	sub_404640
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_24]
call	sub_402DB0
mov	[ebp+var_4], 6
mov	[ebp+var_4], 7
push	0
lea	edx, [ebp+var_18]
push	edx
lea	ecx, [ebp+var_18]
call	sub_640AE0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_6422B0 endp

align 10h


; Attributes: bp-based frame

sub_6425D0 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:dbl_15FCD40
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_642638
jmp	loc_642729

loc_642638:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_6426AC
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_6426AA
jmp	short loc_642729

loc_6426AA:
jmp	short loc_6426B8

loc_6426AC:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_6426B8
jmp	short loc_642729

loc_6426B8:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_64271B
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_642710
jmp	short loc_64271B

loc_642710:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_6426B8

loc_64271B:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_6437E0

loc_642729:
mov	esp, ebp
pop	ebp
retn
sub_6425D0 endp

align 10h


; Attributes: bp-based frame

sub_642730 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax+14h]
add	ecx, 1
push	ecx
mov	ecx, [ebp+var_10]
call	sub_643750
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_10]
call	sub_643460
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	eax, [ecx]
add	eax, 4
mov	esp, ebp
pop	ebp
retn	4
sub_642730 endp

align 10h


; Attributes: bp-based frame

sub_642770 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_642970
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_642770 endp

align 10h


; Attributes: bp-based frame

sub_642790 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_643F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_88], ecx
lea	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_38]
setnz	dl
mov	[ebp+var_89], dl
movzx	eax, [ebp+var_89]
test	eax, eax
jz	loc_642905
lea	ecx, [ebp+var_12]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_642770
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
mov	[ebp+var_94], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_13]
push	eax
mov	ecx, [ebp+var_88]
call	sub_642770
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_9C], ecx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_11], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_642862
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E450
add	esp, 0Ch
jmp	loc_642905

loc_642862:
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_40]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_48], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_48]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_50], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	ecx, [ebp+var_88]
call	sub_643CA0
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+arg_C], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
lea	edx, [ebp+var_84]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_74]
mov	[ecx], edx
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_640AE0
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
mov	[ebp+var_2C], edx

loc_642905:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_642790 endp

align 10h


; Attributes: bp-based frame

sub_642920 proc	near

var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx], edx
xor	eax, eax
mov	[ebp+var_9], al
cmp	[ebp+var_8], 0
jz	short loc_642961
mov	ecx, 1
shl	ecx, 3
push	ecx		; int
mov	edx, [ebp+var_8]
push	edx		; void *
call	sub_407DB0
add	esp, 8

loc_642961:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_642920 endp

align 10h


; Attributes: bp-based frame

sub_642970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_642970 endp



; Attributes: bp-based frame

sub_642980 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 20h
push	esi
mov	[ebp+var_18], ecx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_18]
jnz	short loc_6429C8
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_643CF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+8], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
jmp	loc_642A82

loc_6429C8:
cmp	[ebp+arg_10], 0
jnz	short loc_642A07
cmp	[ebp+arg_C], 0
jnz	short loc_6429FE
lea	edx, [ebp+var_6]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_C]
or	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
add	ecx, 10h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	esi, [ebp+arg_8]
call	sub_A46ED0
movzx	edx, al
test	edx, edx
jz	short loc_642A07

loc_6429FE:
mov	[ebp+var_20], 1
jmp	short loc_642A0E

loc_642A07:
mov	[ebp+var_20], 0

loc_642A0E:
mov	al, byte ptr [ebp+var_20]
mov	[ebp+var_5], al
mov	ecx, [ebp+var_C]
and	ecx, 1
jz	short loc_642A20
and	[ebp+var_C], 0FFFFFFFEh

loc_642A20:
movzx	edx, [ebp+var_5]
test	edx, edx
jz	short loc_642A56
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_18]
call	sub_643CF0
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_4]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_642A54
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_4]
mov	[edx+8], eax

loc_642A54:
jmp	short loc_642A82

loc_642A56:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_18]
call	sub_643CF0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_642A82
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx

loc_642A82:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_18]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_18]
mov	[edx+10h], ecx
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
pop	esi
mov	esp, ebp
pop	ebp
retn	14h
sub_642980 endp

align 10h


; Attributes: bp-based frame

sub_642AD0 proc	near

var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_27=	byte ptr -27h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 68h
push	esi
mov	[ebp+var_58], ecx
mov	eax, [ebp+var_58]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_58]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	[ebp+var_5], 1

loc_642AED:
cmp	[ebp+var_10], 0
jz	short loc_642B3A
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
lea	ecx, [ebp+var_11]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_34], edx
mov	edx, [ebp+var_34]
mov	esi, [ebp+arg_4]
call	sub_A46ED0
mov	[ebp+var_5], al
movzx	eax, [ebp+var_5]
test	eax, eax
jz	short loc_642B29
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8]
mov	[ebp+var_60], edx
jmp	short loc_642B32

loc_642B29:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	[ebp+var_60], ecx

loc_642B32:
mov	edx, [ebp+var_60]
mov	[ebp+var_10], edx
jmp	short loc_642AED

loc_642B3A:
mov	ecx, [ebp+var_C]
lea	eax, [ebp+var_4]
call	sub_4046E0
movzx	eax, [ebp+var_5]
test	eax, eax
jz	loc_642BDC
mov	ecx, [ebp+var_58]
mov	edx, [ecx+8]
mov	[ebp+var_3C], edx
mov	ecx, [ebp+var_3C]
lea	eax, [ebp+var_1C]
call	sub_4046E0
lea	eax, [ebp+var_44]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_1C]
mov	eax, [ebp+var_40]
call	sub_4046E0
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_44]
setz	dl
mov	[ebp+var_61], dl
movzx	eax, [ebp+var_61]
test	eax, eax
jz	short loc_642BCD
mov	[ebp+var_1D], 1
push	0
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_58]
call	sub_642980
mov	[ebp+var_48], eax
mov	edx, [ebp+var_48]
mov	ecx, [edx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_1D]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]
jmp	loc_642C58
jmp	short loc_642BDC

loc_642BCD:
mov	edx, [ebp+var_4]
push	edx
call	sub_77E330
add	esp, 4
mov	[ebp+var_4], eax

loc_642BDC:
lea	eax, [ebp+var_26]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_4]
add	ecx, 10h
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
mov	esi, [ebp+var_4C]
call	sub_A46ED0
mov	[ebp+var_25], al
movzx	edx, [ebp+var_25]
test	edx, edx
jz	short loc_642C3D
mov	[ebp+var_27], 1
push	0
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_2C]
push	eax
mov	ecx, [ebp+var_58]
call	sub_642980
mov	[ebp+var_54], eax
mov	ecx, [ebp+var_54]
mov	ecx, [ecx]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	edx, [ebp+arg_0]
mov	al, [ebp+var_27]
mov	[edx+4], al
mov	eax, [ebp+arg_0]
jmp	short loc_642C58

loc_642C3D:
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_4]
mov	eax, [ebp+arg_0]
call	sub_4046E0
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_2D]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_642C58:
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_642AD0 endp

align 10h


; Attributes: bp-based frame

sub_642C60 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_642EFC
jmp	short loc_642D25

loc_642D1D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_642D25:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_642DF2
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_7C]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_642DED
mov	[ebp+var_15], 0
lea	eax, [ebp+var_94]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	ecx, [ebp+var_94]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_98]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_15]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_642F42

loc_642DED:
jmp	loc_642D1D

loc_642DF2:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_6440C0
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_642F42

loc_642EFC:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_644280
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_642F42:
mov	esp, ebp
pop	ebp
retn	8
sub_642C60 endp

align 10h


; Attributes: bp-based frame

sub_642F50 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_642FB2
jmp	short loc_642FCD

loc_642FB2:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_642FE0

loc_642FCD:
mov	esp, ebp
pop	ebp
retn	4
sub_642F50 endp

align 10h


; Attributes: bp-based frame

sub_642FE0 proc	near

var_115= byte ptr -115h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E9=	byte ptr -0E9h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_642FE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10Ch
mov	[ebp+var_108], ecx
lea	eax, [ebp+var_39]
push	eax
mov	ecx, [ebp+var_108]
add	ecx, 4
call	sub_642770
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_5C]
push	edx
lea	ecx, [ebp+var_18]
call	sub_52A300
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_40], 0
lea	eax, [ebp+var_3A]
push	eax
mov	ecx, [ebp+var_108]
add	ecx, 8
call	sub_604B20
mov	[ebp+var_110], eax
mov	ecx, [ebp+var_110]
mov	[ebp+var_114], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_114]
push	edx
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_24]
call	sub_4045A0
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_3A]
call	nullsub_1
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0

loc_64309F:
mov	edx, [ebp+var_108]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_643274
mov	edx, [ebp+var_108]
mov	eax, [edx+4]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ebp+var_70], eax
mov	eax, [ebp+var_70]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_38]
mov	ecx, [eax]
mov	[ebp+var_38], ecx
jmp	short loc_643119

loc_643109:
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx

loc_643119:
lea	eax, [ebp+var_7C]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_74]
mov	[edx], eax
mov	ecx, [ebp+var_38]
xor	edx, edx
cmp	ecx, [ebp+var_7C]
setnz	dl
mov	[ebp+var_115], dl
movzx	eax, [ebp+var_115]
test	eax, eax
jz	short loc_643194
mov	ecx, [ebp+var_38]
add	ecx, 4
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_88]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_643194
jmp	loc_643109

loc_643194:
mov	ecx, [ebp+var_30]
mov	[ebp+var_28], ecx
lea	edx, [ebp+var_28]
push	edx
lea	eax, [ebp+var_24]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_4C]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	[ebp+var_34], edx
push	ecx
mov	eax, esp
mov	[ebp+var_50], esp
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_54], esp
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_108]
add	edx, 4
mov	eax, [ebp+var_A8]
mov	[eax], edx
mov	ecx, [ebp+var_108]
add	ecx, 4
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_58], esp
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+var_AC]
mov	[ecx], edx
lea	ecx, [ebp+var_18]
call	sub_643DA0
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_30]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_28]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_64309F

loc_643274:
mov	eax, [ebp+var_108]
add	eax, 4
mov	[ebp+var_F4], eax
xor	ecx, ecx
mov	[ebp+var_E9], cl
mov	edx, [ebp+var_F4]
mov	eax, [edx]
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_F4]
mov	[edx], ecx
mov	eax, [ebp+var_F0]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_108]
add	ecx, 8
call	sub_404640
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_24]
call	sub_402DB0
mov	[ebp+var_4], 6
mov	[ebp+var_4], 7
push	0
lea	edx, [ebp+var_18]
push	edx
lea	ecx, [ebp+var_18]
call	sub_640730
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_642FE0 endp

align 10h


; Attributes: bp-based frame

sub_643300 proc	near

var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_18], xmm0
mov	eax, [ebp+var_14]
mov	dword ptr [ebp+var_34],	eax
mov	dword ptr [ebp+var_34+4], 0
fild	[ebp+var_34]
mov	ecx, [ebp+var_4]
mov	dword ptr [ebp+var_3C],	ecx
mov	dword ptr [ebp+var_3C+4], 0
fild	[ebp+var_3C]
fdivp	st(1), st
fld	[ebp+var_18]
fdiv	ds:dbl_15FCD40
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_643368
jmp	loc_643459

loc_643368:
lea	edx, [ebp+var_10]
push	edx
lea	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_77EAF0
add	esp, 0Ch
mov	edx, [ebp+var_10]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_C]
jz	short loc_6433DC
mov	ecx, [ebp+var_8]
sub	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_2C]
mov	eax, [edx+14h]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_2C]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+var_1C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	dword ptr [ebp+var_4C],	ecx
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fdivp	st(1), st
fld	[ebp+var_20]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_6433DA
jmp	short loc_643459

loc_6433DA:
jmp	short loc_6433E8

loc_6433DC:
mov	edx, [ebp+var_10]
mov	eax, [edx]
cmp	eax, [ebp+var_4]
jb	short loc_6433E8
jmp	short loc_643459

loc_6433E8:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_C]
jz	short loc_64344B
mov	edx, [ebp+var_8]
sub	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_2C]
movss	xmm0, dword ptr	[edx+18h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_24]
mov	dword ptr [ebp+var_54],	eax
mov	dword ptr [ebp+var_54+4], 0
fild	[ebp+var_54]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	dword ptr [ebp+var_5C],	edx
mov	dword ptr [ebp+var_5C+4], 0
fild	[ebp+var_5C]
fdivp	st(1), st
fld	[ebp+var_28]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_643440
jmp	short loc_64344B

loc_643440:
mov	eax, [ebp+var_10]
sub	eax, 4
mov	[ebp+var_10], eax
jmp	short loc_6433E8

loc_64344B:
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	ecx, [ebp+var_2C]
call	sub_6422B0

loc_643459:
mov	esp, ebp
pop	ebp
retn
sub_643300 endp

align 10h


; Attributes: bp-based frame

sub_643460 proc	near

var_D8=	dword ptr -0D8h
var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	byte ptr -3Ch
var_35=	byte ptr -35h
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0D8h
mov	[ebp+var_D0], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_4C]
xor	edx, edx
div	[ebp+var_48]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4+4]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_5C]
mov	[ebp+var_4], edx
lea	eax, [ebp+var_68]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_60]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_68]
setnz	dl
mov	[ebp+var_D1], dl
movzx	eax, [ebp+var_D1]
test	eax, eax
jz	loc_6436FC
jmp	short loc_643525

loc_64351D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	[ebp+var_C], edx

loc_643525:
lea	eax, [ebp+var_74]
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_70]
mov	eax, [ebp+var_6C]
mov	[edx], eax
mov	ecx, [ebp+var_C]
xor	edx, edx
cmp	ecx, [ebp+var_74]
setnz	dl
mov	[ebp+var_D2], dl
movzx	eax, [ebp+var_D2]
test	eax, eax
jz	loc_6435F2
mov	ecx, [ebp+arg_4]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_80], edx
mov	eax, [ebp+var_80]
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	edx, [ebp+var_7C]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_6435ED
mov	[ebp+var_15], 0
lea	eax, [ebp+var_94]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	[edx], eax
mov	ecx, [ebp+var_94]
mov	[ebp+var_1C], ecx
lea	edx, [ebp+var_1C]
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_98]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_15]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_643742

loc_6435ED:
jmp	loc_64351D

loc_6435F2:
mov	ecx, [ebp+var_D0]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_8]
lea	edx, [eax+ecx*4]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax]
mov	[ebp+var_A8], ecx
lea	edx, [ebp+var_B0]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
mov	ecx, [ebp+var_A8]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_D0]
add	ecx, 4
call	sub_644170
mov	[ebp+var_AC], eax
mov	eax, [ebp+var_AC]
mov	ecx, [ebp+var_B0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_B0]
mov	ecx, [ebp+var_AC]
mov	[eax], ecx
mov	edx, [ebp+var_AC]
mov	[ebp+var_28], edx
lea	eax, [ebp+var_28]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_D0]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_D0]
mov	[edx+14h], ecx
mov	[ebp+var_29], 1
lea	eax, [ebp+var_BC]
mov	[ebp+var_B8], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_B4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx], eax
mov	ecx, [ebp+var_BC]
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_30]
mov	[ebp+var_C4], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax]
mov	[ebp+var_C0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_643742

loc_6436FC:
mov	[ebp+var_35], 1
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_D0]
call	sub_644380
mov	[ebp+var_CC], eax
mov	eax, [ebp+var_CC]
mov	ecx, [eax]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_35]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]

loc_643742:
mov	esp, ebp
pop	ebp
retn	8
sub_643460 endp

align 10h


; Attributes: bp-based frame

sub_643750 proc	near

var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1A=	word ptr -1Ah
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_10], ecx
mov	ecx, [ebp+var_10]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+18h]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ebp+var_18],	ecx
mov	dword ptr [ebp+var_18+4], 0
fild	[ebp+var_18]
fdiv	[ebp+var_C]
fnstcw	[ebp+var_1A]
movzx	eax, [ebp+var_1A]
or	eax, 0C00h
mov	[ebp+var_20], eax
fldcw	word ptr [ebp+var_20]
fistp	[ebp+var_28]
fldcw	[ebp+var_1A]
mov	edx, dword ptr [ebp+var_28]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
cmp	eax, [ebp+var_4]
ja	short loc_6437B2
jmp	short loc_6437CD

loc_6437B2:
mov	ecx, [ebp+var_8]
push	ecx
call	sub_77EAA0
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	ecx, [ebp+var_10]
call	sub_6437E0

loc_6437CD:
mov	esp, ebp
pop	ebp
retn	4
sub_643750 endp

align 10h


; Attributes: bp-based frame

sub_6437E0 proc	near

var_115= byte ptr -115h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E9=	byte ptr -0E9h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_6437E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10Ch
mov	[ebp+var_108], ecx
lea	eax, [ebp+var_39]
push	eax
mov	ecx, [ebp+var_108]
add	ecx, 4
call	sub_642770
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	[ebp+var_5C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_5C]
push	edx
lea	ecx, [ebp+var_18]
call	sub_52A300
mov	byte ptr [ebp+var_4], 2
mov	[ebp+var_40], 0
lea	eax, [ebp+var_3A]
push	eax
mov	ecx, [ebp+var_108]
add	ecx, 8
call	sub_604B20
mov	[ebp+var_110], eax
mov	ecx, [ebp+var_110]
mov	[ebp+var_114], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_114]
push	edx
lea	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
push	ecx
lea	ecx, [ebp+var_24]
call	sub_4045A0
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_3A]
call	nullsub_1
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0

loc_64389F:
mov	edx, [ebp+var_108]
xor	eax, eax
cmp	dword ptr [edx+4], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_643A74
mov	edx, [ebp+var_108]
mov	eax, [edx+4]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx]
mov	[ebp+var_70], eax
mov	eax, [ebp+var_70]
xor	edx, edx
div	[ebp+arg_0]
mov	[ebp+var_30], edx
mov	ecx, [ebp+var_14]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_14]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_38]
mov	ecx, [eax]
mov	[ebp+var_38], ecx
jmp	short loc_643919

loc_643909:
mov	edx, [ebp+var_38]
mov	eax, [edx]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[ebp+var_2C], edx

loc_643919:
lea	eax, [ebp+var_7C]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_74]
mov	[edx], eax
mov	ecx, [ebp+var_38]
xor	edx, edx
cmp	ecx, [ebp+var_7C]
setnz	dl
mov	[ebp+var_115], dl
movzx	eax, [ebp+var_115]
test	eax, eax
jz	short loc_643994
mov	ecx, [ebp+var_38]
add	ecx, 4
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_80]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_14]
add	eax, 4
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
mov	eax, [ebp+var_88]
mov	ecx, [edx]
xor	edx, edx
cmp	ecx, [eax]
setz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_643994
jmp	loc_643909

loc_643994:
mov	ecx, [ebp+var_30]
mov	[ebp+var_28], ecx
lea	edx, [ebp+var_28]
push	edx
lea	eax, [ebp+var_24]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_4C]
push	edx
call	sub_52A410
add	esp, 10h
mov	[ebp+var_9C], eax
mov	eax, [ebp+var_9C]
mov	ecx, [eax]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
mov	[ebp+var_34], edx
push	ecx
mov	eax, esp
mov	[ebp+var_50], esp
mov	[ebp+var_A4], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A4]
mov	eax, [ebp+var_A0]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_54], esp
mov	[ebp+var_A8], ecx
mov	edx, [ebp+var_108]
add	edx, 4
mov	eax, [ebp+var_A8]
mov	[eax], edx
mov	ecx, [ebp+var_108]
add	ecx, 4
push	ecx
push	ecx
mov	edx, esp
mov	[ebp+var_58], esp
mov	[ebp+var_B0], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_AC], eax
mov	ecx, [ebp+var_B0]
mov	edx, [ebp+var_AC]
mov	[ecx], edx
lea	ecx, [ebp+var_18]
call	sub_643F30
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_30]
lea	edx, [eax+ecx*4+4]
push	edx
lea	ecx, [ebp+var_24]
call	sub_422EC0
mov	ecx, [ebp+var_28]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
jmp	loc_64389F

loc_643A74:
mov	eax, [ebp+var_108]
add	eax, 4
mov	[ebp+var_F4], eax
xor	ecx, ecx
mov	[ebp+var_E9], cl
mov	edx, [ebp+var_F4]
mov	eax, [edx]
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_F4]
mov	[edx], ecx
mov	eax, [ebp+var_F0]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_108]
add	ecx, 8
call	sub_404640
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_24]
call	sub_402DB0
mov	[ebp+var_4], 6
mov	[ebp+var_4], 7
push	0
lea	edx, [ebp+var_18]
push	edx
lea	ecx, [ebp+var_18]
call	sub_640F10
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_6437E0 endp

align 10h


; Attributes: bp-based frame

sub_643B00 proc	near

var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
push	esi
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_643B19:
cmp	[ebp+var_8], 0
jz	short loc_643B56
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_0]
mov	esi, [ebp+var_C]
call	sub_A46ED0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_643B4B
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_643B54

loc_643B4B:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_643B54:
jmp	short loc_643B19

loc_643B56:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_1C]
jz	short loc_643B7F
mov	edx, [ebp+var_4]
add	edx, 10h
mov	[ebp+var_14], edx
mov	edx, [ebp+var_14]
mov	esi, [ebp+arg_0]
call	sub_A46ED0
movzx	eax, al
test	eax, eax
jz	short loc_643B7F
mov	ecx, [ebp+var_1C]
mov	[ebp+var_4], ecx

loc_643B7F:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_643B00 endp

align 10h


; Attributes: bp-based frame

sub_643B90 proc	near

var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_58], ecx
mov	ecx, [ebp+var_58]
add	ecx, 8
call	sub_404580
sub	eax, 1
mov	[ebp+var_18], eax
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
xor	edx, edx
div	[ebp+var_18]
mov	[ebp+var_C], edx
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_20]
mov	eax, [edx+ecx*4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_58]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_28]
mov	eax, [edx+ecx*4+4]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
mov	[ebp+var_8], ecx
jmp	short loc_643BFE

loc_643BF6:
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_643BFE:
lea	ecx, [ebp+var_38]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_8]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_30]
mov	[eax], ecx
mov	edx, [ebp+var_4]
xor	eax, eax
cmp	edx, [ebp+var_38]
setnz	al
mov	[ebp+var_59], al
movzx	ecx, [ebp+var_59]
test	ecx, ecx
jz	short loc_643C4F
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_44]
mov	edx, [ebp+arg_4]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_643C4F
jmp	short loc_643BF6

loc_643C4F:
lea	eax, [ebp+var_50]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_4C]
mov	eax, [ebp+var_48]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_50]
setnz	dl
mov	[ebp+var_5A], dl
movzx	eax, [ebp+var_5A]
test	eax, eax
jz	short loc_643C8E
mov	ecx, [ebp+var_4]
mov	[ebp+var_54], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_54]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	short loc_643C9A
jmp	short loc_643C9A

loc_643C8E:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0
mov	eax, [ebp+arg_0]

loc_643C9A:
mov	esp, ebp
pop	ebp
retn	8
sub_643B90 endp



; Attributes: bp-based frame

sub_643CA0 proc	near

var_94=	dword ptr -94h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_6444E0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_643CA0 endp

align 10h


; Attributes: bp-based frame

sub_643CF0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_643CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_430EA0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx		; void *
call	sub_644540
add	esp, 8
jmp	short loc_643D6F

loc_643D3E:
cmp	[ebp+var_14], 0
jz	short loc_643D59
mov	edx, 1
imul	edx, 1Ch
push	edx		; int
mov	eax, [ebp+var_14]
push	eax		; void *
call	sub_407DB0
add	esp, 8

loc_643D59:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_643D76
retn

loc_643D6F:
mov	[ebp+var_4], 0FFFFFFFFh

loc_643D76:
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_14]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_643CF0 endp



; Attributes: bp-based frame

sub_643DA0 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_643F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_88], ecx
lea	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_38]
setnz	dl
mov	[ebp+var_89], dl
movzx	eax, [ebp+var_89]
test	eax, eax
jz	loc_643F15
lea	ecx, [ebp+var_12]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_642770
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
mov	[ebp+var_94], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_13]
push	eax
mov	ecx, [ebp+var_88]
call	sub_642770
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_9C], ecx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_11], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_643E72
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E450
add	esp, 0Ch
jmp	loc_643F15

loc_643E72:
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_40]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_48], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_48]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_50], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	ecx, [ebp+var_88]
call	sub_6445B0
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+arg_C], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
lea	edx, [ebp+var_84]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_74]
mov	[ecx], edx
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_640730
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
mov	[ebp+var_2C], edx

loc_643F15:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_643DA0 endp

align 10h


; Attributes: bp-based frame

sub_643F30 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_643F30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_88], ecx
lea	eax, [ebp+var_38]
mov	[ebp+var_34], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
xor	edx, edx
cmp	ecx, [ebp+var_38]
setnz	dl
mov	[ebp+var_89], dl
movzx	eax, [ebp+var_89]
test	eax, eax
jz	loc_6440A5
lea	ecx, [ebp+var_12]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_642770
mov	[ebp+var_90], eax
mov	edx, [ebp+var_90]
mov	[ebp+var_94], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_13]
push	eax
mov	ecx, [ebp+var_88]
call	sub_642770
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_98]
mov	[ebp+var_9C], ecx
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_11], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_644002
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E450
add	esp, 0Ch
jmp	loc_6440A5

loc_644002:
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ebp+var_40], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_18], esp
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_40]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_48], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_48]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_20], esp
mov	[ebp+var_50], ecx
mov	edx, [ebp+arg_0]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_50]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	ecx, [ebp+var_88]
call	sub_644600
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+arg_C], eax
lea	ecx, [ebp+var_80]
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_C]
mov	[ebp+var_6C], edx
mov	eax, [ebp+var_70]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx
lea	edx, [ebp+var_84]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_8]
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+var_74]
mov	[ecx], edx
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_640F10
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
mov	[ebp+var_2C], edx

loc_6440A5:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_643F30 endp

align 10h


; Attributes: bp-based frame

sub_6440C0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_6440C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_644220
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 4
push	ecx		; void *
call	sub_644650
add	esp, 8
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
jmp	short loc_644148

loc_644117:
cmp	[ebp+var_14], 0
jz	short loc_644132
mov	eax, 1
shl	eax, 4
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_644132:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_64414F
retn

loc_644148:
mov	[ebp+var_4], 0FFFFFFFFh

loc_64414F:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_6440C0 endp

align 10h


; Attributes: bp-based frame

sub_644170 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644170
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_3C], ecx
push	1
mov	ecx, [ebp+var_3C]
call	sub_5F38A0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax		; int
mov	ecx, [ebp+var_14]
add	ecx, 4
push	ecx		; void *
call	sub_431BB0
add	esp, 8
mov	edx, [ebp+var_14]
mov	dword ptr [edx], 0
jmp	short loc_6441F8

loc_6441C7:
cmp	[ebp+var_14], 0
jz	short loc_6441E2
mov	eax, 1
imul	eax, 0Ch
push	eax		; int
mov	ecx, [ebp+var_14]
push	ecx		; void *
call	sub_407DB0
add	esp, 8

loc_6441E2:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_6441FF
retn

loc_6441F8:
mov	[ebp+var_4], 0FFFFFFFFh

loc_6441FF:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_644170 endp

align 10h


; Attributes: bp-based frame

sub_644220 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 0FFFFFFFh
jbe	short loc_644248
lea	ecx, [ebp+var_14]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_644248:
cmp	[ebp+arg_0], 0
jz	short loc_64426E
mov	ecx, [ebp+arg_0]
shl	ecx, 4
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_407BB0
add	esp, 4
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_18], eax
jmp	short loc_644275

loc_64426E:
mov	[ebp+var_18], 0

loc_644275:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn	4
sub_644220 endp

align 10h


; Attributes: bp-based frame

sub_644280 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_6440C0
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644280 endp

align 10h


; Attributes: bp-based frame

sub_644380 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	[ebp+var_54], ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+var_54]
call	sub_52A900
mov	[ebp+var_24], eax
mov	eax, [ebp+var_24]
mov	ecx, [eax]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
lea	eax, [ebp+var_34]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_644170
mov	[ebp+var_30], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+var_30]
mov	[ebp+var_18], ecx
lea	edx, [ebp+var_18]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
lea	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4+4]
push	edx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+var_4]
lea	edx, [eax+ecx*4]
push	edx
call	sub_404BF0
add	esp, 0Ch
mov	eax, [ebp+var_54]
mov	ecx, [eax+14h]
add	ecx, 1
mov	edx, [ebp+var_54]
mov	[edx+14h], ecx
mov	ecx, [ebp+var_54]
add	ecx, 8
call	sub_422EC0
mov	ecx, [ebp+arg_4]
lea	edx, [eax+ecx*4]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
lea	edx, [ebp+var_50]
mov	[ebp+var_44], edx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_48]
mov	[eax], ecx
mov	edx, [ebp+var_50]
mov	[ebp+var_4C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644380 endp

align 10h


; Attributes: bp-based frame

sub_644480 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
push	esi
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx

loc_644499:
cmp	[ebp+var_8], 0
jz	short loc_6444D6
mov	eax, [ebp+var_8]
add	eax, 10h
mov	[ebp+var_C], eax
mov	edx, [ebp+arg_0]
mov	esi, [ebp+var_C]
call	sub_A46ED0
movzx	ecx, al
test	ecx, ecx
jnz	short loc_6444CB
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	[ebp+var_8], ecx
jmp	short loc_6444D4

loc_6444CB:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax

loc_6444D4:
jmp	short loc_644499

loc_6444D6:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_644480 endp



; Attributes: bp-based frame

sub_6444E0 proc	near

var_84=	dword ptr -84h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_84]
call	sub_6446C0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6444E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_644540(void *, int)
sub_644540 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_644597
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_C]
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_64459E

loc_644597:
mov	[ebp+var_10], 0

loc_64459E:
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	esp, ebp
pop	ebp
retn
sub_644540 endp

align 10h


; Attributes: bp-based frame

sub_6445B0 proc	near

var_94=	dword ptr -94h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_6447B0
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6445B0 endp

align 10h


; Attributes: bp-based frame

sub_644600 proc	near

var_94=	dword ptr -94h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 94h
mov	[ebp+var_94], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
mov	[ecx], edx
push	ecx
mov	[ebp+var_18], esp
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_94]
call	sub_644810
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644600 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_644650(void *, int)
sub_644650 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_4+1],	al
mov	cl, byte ptr [ebp+var_4+1]
mov	byte ptr [ebp+var_2+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_4], dl
mov	al, byte ptr [ebp+var_4]
mov	byte ptr [ebp+var_2], al
mov	ecx, [ebp+arg_0]
push	ecx		; void *
push	0Ch		; unsigned int
call	??2@YAPAXIPAX@Z	; operator new(uint,void *)
add	esp, 8
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_6446A7
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	ecx, [edx+8]
mov	edx, [ebp+var_C]
mov	[edx+4], eax
mov	[edx+8], ecx
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
jmp	short loc_6446AE

loc_6446A7:
mov	[ebp+var_10], 0

loc_6446AE:
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	esp, ebp
pop	ebp
retn
sub_644650 endp

align 10h


; Attributes: bp-based frame

sub_6446C0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_4C=	dword ptr -4Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_6446C0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_84]
call	sub_642770
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_8C]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
lea	ecx, [ebp+var_10]
call	sub_644970
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_10]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_84]
call	sub_644870
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
push	0
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_10]
call	sub_640AE0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_6446C0 endp

align 10h


; Attributes: bp-based frame

sub_6447B0 proc	near

var_84=	dword ptr -84h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_84]
call	sub_644A10
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6447B0 endp

align 10h


; Attributes: bp-based frame

sub_644810 proc	near

var_84=	dword ptr -84h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
push	ecx
mov	[ebp+var_1C], esp
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_84]
call	sub_644B00
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644810 endp

align 10h


; Attributes: bp-based frame

sub_644870 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_80], ecx
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_642770
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_F]
push	edx
mov	ecx, [ebp+var_80]
call	sub_642770
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_D], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	short loc_644901
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E910
add	esp, 8
jmp	short loc_644959

loc_644901:
push	ecx
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	ecx, [ebp+var_80]
call	sub_643CA0
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_640AE0

loc_644959:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_644870 endp

align 10h


; Attributes: bp-based frame

sub_644970 proc	near

var_74=	dword ptr -74h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644970
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_74]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 0
push	ecx
mov	edx, esp
mov	[ebp+var_10], esp
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_14], esp
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_644DF0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644970 endp

align 10h


; Attributes: bp-based frame

sub_644A10 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_4C=	dword ptr -4Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644A10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_84]
call	sub_642770
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_8C]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
lea	ecx, [ebp+var_10]
call	sub_644EA0
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_10]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_84]
call	sub_644BF0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
push	0
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_10]
call	sub_640730
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_644A10 endp

align 10h


; Attributes: bp-based frame

sub_644B00 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_4C=	dword ptr -4Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644B00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
lea	eax, [ebp+var_11]
push	eax
mov	ecx, [ebp+var_84]
call	sub_642770
mov	[ebp+var_88], eax
mov	ecx, [ebp+var_88]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_8C]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_28]
mov	eax, [ebp+var_24]
mov	[edx], eax
push	ecx
mov	ecx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_2C]
mov	[eax], ecx
lea	ecx, [ebp+var_10]
call	sub_644F40
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_10]
push	edx
push	ecx
mov	eax, esp
mov	[ebp+var_20], esp
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_84]
call	sub_644CF0
mov	[ebp+var_4], 3
mov	[ebp+var_4], 4
push	0
lea	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_10]
call	sub_640F10
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_644B00 endp

align 10h


; Attributes: bp-based frame

sub_644BF0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_80], ecx
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_642770
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_F]
push	edx
mov	ecx, [ebp+var_80]
call	sub_642770
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_D], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	short loc_644C81
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E910
add	esp, 8
jmp	short loc_644CD9

loc_644C81:
push	ecx
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	ecx, [ebp+var_80]
call	sub_6445B0
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_640730

loc_644CD9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_644BF0 endp

align 10h


; Attributes: bp-based frame

sub_644CF0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644CF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 84h
mov	[ebp+var_80], ecx
lea	eax, [ebp+var_E]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_642770
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_F]
push	edx
mov	ecx, [ebp+var_80]
call	sub_642770
mov	[ebp+var_8C], eax
mov	eax, [ebp+var_8C]
mov	[ebp+var_90], eax
mov	byte ptr [ebp+var_4], 1
mov	[ebp+var_D], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	short loc_644D81
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_77E910
add	esp, 8
jmp	short loc_644DD9

loc_644D81:
push	ecx
mov	ecx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	dword ptr [edx], 0
push	ecx
mov	eax, esp
mov	[ebp+var_18], esp
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_1C], esp
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_2C]
mov	[ecx], edx
mov	ecx, [ebp+var_80]
call	sub_644600
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_640F10

loc_644DD9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_644CF0 endp

align 10h


; Attributes: bp-based frame

sub_644DF0 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_38]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
lea	edx, [ebp+var_3C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_40], eax

loc_644E2C:
lea	ecx, [ebp+var_2C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_3C]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
mov	[ebp+var_45], al
movzx	ecx, [ebp+var_45]
test	ecx, ecx
jz	short loc_644E90
mov	edx, [ebp+var_3C]
add	edx, 4
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_44]
call	sub_641600
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
jmp	short loc_644E2C

loc_644E90:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644DF0 endp

align 10h


; Attributes: bp-based frame

sub_644EA0 proc	near

var_74=	dword ptr -74h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644EA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_74]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 0
push	ecx
mov	edx, esp
mov	[ebp+var_10], esp
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_14], esp
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_644FE0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644EA0 endp

align 10h


; Attributes: bp-based frame

sub_644F40 proc	near

var_74=	dword ptr -74h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_644F40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_74], ecx
xor	eax, eax
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_74]
mov	eax, [ebp+var_20]
mov	[edx], eax
mov	ecx, [ebp+var_74]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 0
push	ecx
mov	edx, esp
mov	[ebp+var_10], esp
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_24]
mov	[ecx], edx
push	ecx
mov	eax, esp
mov	[ebp+var_14], esp
mov	[ebp+var_30], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_2C]
mov	[edx], eax
mov	ecx, [ebp+var_74]
push	ecx
mov	ecx, [ebp+var_74]
call	sub_645090
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_74]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644F40 endp

align 10h


; Attributes: bp-based frame

sub_644FE0 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_38]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
lea	edx, [ebp+var_3C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_40], eax

loc_64501C:
lea	ecx, [ebp+var_2C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_3C]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
mov	[ebp+var_45], al
movzx	ecx, [ebp+var_45]
test	ecx, ecx
jz	short loc_645080
mov	edx, [ebp+var_3C]
add	edx, 4
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_44]
call	sub_6440C0
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
jmp	short loc_64501C

loc_645080:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_644FE0 endp

align 10h


; Attributes: bp-based frame

sub_645090 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_44], ecx
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_38]
mov	[ebp+var_14], ecx
mov	edx, [ebp+arg_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
lea	edx, [ebp+var_3C]
mov	[ebp+var_1C], edx
mov	eax, [ebp+arg_4]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_18]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_40], eax

loc_6450CC:
lea	ecx, [ebp+var_2C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_38]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_24]
mov	[eax], ecx
mov	edx, [ebp+var_3C]
xor	eax, eax
cmp	edx, [ebp+var_2C]
setnz	al
mov	[ebp+var_45], al
movzx	ecx, [ebp+var_45]
test	ecx, ecx
jz	short loc_645130
mov	edx, [ebp+var_3C]
add	edx, 4
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_44]
call	sub_644170
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+var_40]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_34]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_3C]
mov	edx, [ecx]
mov	[ebp+var_3C], edx
jmp	short loc_6450CC

loc_645130:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_645090 endp

align 10h


; Attributes: bp-based frame

sub_645140 proc	near

var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	word ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_CC=	byte ptr -0CCh
var_C0=	byte ptr -0C0h
var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 144h
mov	ecx, [ebp+arg_4]
mov	eax, [ecx+3Ch]
push	ebx
push	esi
push	edi
mov	[esp+150h+var_134], eax
cmp	eax, [ecx+40h]
jz	loc_645477

loc_645162:
mov	ebx, [eax+4]
mov	[esp+150h+var_124], ebx
cmp	ebx, [eax+8]
jz	loc_645467
add	ebx, 4
mov	[esp+150h+var_138], ebx
lea	esp, [esp+0]

loc_645180:
lea	ecx, [esp+150h+var_40]
call	sub_90F550
lea	ecx, [esp+150h+var_C0]
call	sub_90F550
lea	ecx, [esp+150h+var_80]
call	sub_90F550
fldz
sub	esp, 0Ch
fst	[esp+15Ch+var_154]
mov	ecx, 10h
fst	[esp+15Ch+var_158]
mov	esi, ebx
fstp	[esp+15Ch+var_15C]
lea	edi, [esp+15Ch+var_C0]
rep movsd
lea	ecx, [esp+15Ch+var_C0]
call	sub_90F610
lea	eax, [esp+150h+var_C0]
push	eax
lea	ecx, [esp+154h+var_80]
call	sub_90D400
lea	ecx, [esp+150h+var_80]
push	ecx
lea	ecx, [esp+154h+var_40]
call	sub_90D390
mov	edi, [ebx+44h]
mov	[esp+150h+var_11C], edi
cmp	edi, [ebx+48h]
jz	loc_645443

loc_645208:
mov	eax, [edi]
xor	esi, esi
lea	ecx, [eax+68h]
mov	[esp+150h+var_128], esi
mov	[esp+150h+var_120], ecx

loc_645217:
mov	eax, [ecx-4]
mov	[esp+150h+var_13C], eax
cmp	eax, [ecx]
jz	loc_645415

loc_645226:
mov	ebx, [eax]
movzx	ecx, word ptr [ebx+34h]
movzx	edx, cx
cmp	edx, [ebx+34h]
jnz	loc_6453FA
movzx	edx, word ptr [ebx+30h]
movzx	edi, dx
cmp	edi, [ebx+30h]
jnz	loc_6453FA
fld	dword ptr [ebx+18h]
fstp	[esp+150h+var_118]
fld	dword ptr [ebx+1Ch]
fstp	[esp+150h+var_114]
fld	dword ptr [ebx+20h]
fstp	[esp+150h+var_110]
fld	dword ptr [ebx+24h]
fstp	[esp+150h+var_10C]
fld1
fcomp	[esp+150h+var_10C]
fnstsw	ax
test	ah, 41h
jnz	short loc_645278
mov	eax, 1
jmp	short loc_64527A

loc_645278:
xor	eax, eax

loc_64527A:
lea	edi, [esp+150h+var_EC]
push	edi
push	edx
push	ecx
push	eax
mov	eax, [ebp+arg_0]
push	esi
push	eax
call	sub_645D60
xor	eax, eax
cmp	[ebx+34h], eax
jbe	short loc_6452B4
mov	ecx, [esp+150h+var_E8]
mov	dx, [esp+150h+var_EC]
lea	esp, [esp+0]

loc_6452A0:
mov	edi, [ebx+2Ch]
mov	di, [edi+eax*4]
add	di, dx
mov	[ecx+eax*2], di
inc	eax
cmp	eax, [ebx+34h]
jb	short loc_6452A0

loc_6452B4:
xor	eax, eax
mov	[esp+150h+var_12C], eax
cmp	[ebx+30h], eax
jbe	loc_6453F6
mov	edi, [esp+150h+var_DC]
mov	esi, [esp+150h+var_E0]
mov	[esp+150h+var_140], eax
mov	eax, [esp+150h+var_E4]
add	edi, 8
sub	eax, esi
mov	[esp+150h+var_108], eax

loc_6452DC:
mov	edx, [ebx+0Ch]
mov	ecx, [esp+150h+var_138]
add	edx, [esp+150h+var_140]
push	ecx
push	edx
lea	eax, [esp+158h+var_CC]
push	eax
call	sub_90E210
fld	dword ptr [eax]
fstp	[esp+15Ch+var_104]
mov	ecx, [esp+15Ch+var_104]
fld	dword ptr [eax+4]
add	esp, 0Ch
fstp	[esp+150h+var_100]
mov	edx, [esp+150h+var_100]
fld	dword ptr [eax+8]
mov	eax, [esp+150h+var_108]
mov	[eax+esi], ecx
fstp	[esp+150h+var_FC]
mov	ecx, [esp+150h+var_FC]
mov	[eax+esi+4], edx
mov	edx, [esp+150h+var_118]
mov	[eax+esi+8], ecx
mov	eax, [esp+150h+var_114]
mov	ecx, [esp+150h+var_110]
mov	[edi-8], edx
mov	edx, [esp+150h+var_10C]
mov	[edi-4], eax
mov	[edi], ecx
mov	[edi+4], edx
mov	eax, [ebx+28h]
test	eax, eax
jz	short loc_645380
mov	ecx, [esp+150h+var_12C]
movzx	edx, byte ptr [eax+ecx]
mov	[esp+150h+var_130], edx
fild	[esp+150h+var_130]
fdiv	ds:dbl_15FCCF8
fstp	[esp+150h+var_130]
fld	dword ptr [edi-8]
fld	[esp+150h+var_130]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [edi-8]
fld	dword ptr [edi-4]
fmul	st, st(1)
fstp	dword ptr [edi-4]
fmul	dword ptr [edi]
fstp	dword ptr [edi]

loc_645380:
mov	eax, [ebx+10h]
test	eax, eax
jz	short loc_6453D5
mov	edx, [esp+150h+var_140]
lea	ecx, [esp+150h+var_40]
push	ecx
add	edx, eax
push	edx
lea	eax, [esp+158h+var_D8]
push	eax
call	sub_90E210
fld	dword ptr [eax]
fstp	[esp+15Ch+var_F8]
mov	ecx, [esp+15Ch+var_F8]
fld	dword ptr [eax+4]
add	esp, 0Ch
fstp	[esp+150h+var_F4]
mov	edx, [esp+150h+var_F4]
fld	dword ptr [eax+8]
mov	[esi], ecx
fstp	[esp+150h+var_F0]
mov	eax, [esp+150h+var_F0]
mov	[esi+4], edx
mov	[esi+8], eax
call	sub_40F420
fstp	st

loc_6453D5:
mov	eax, [esp+150h+var_12C]
add	[esp+150h+var_140], 0Ch
inc	eax
add	edi, 10h
add	esi, 0Ch
mov	[esp+150h+var_12C], eax
cmp	eax, [ebx+30h]
jb	loc_6452DC
mov	esi, [esp+150h+var_128]

loc_6453F6:
mov	eax, [esp+150h+var_13C]

loc_6453FA:
mov	ecx, [esp+150h+var_120]
add	eax, 4
mov	[esp+150h+var_13C], eax
cmp	eax, [ecx]
jnz	loc_645226
mov	ebx, [esp+150h+var_138]
mov	edi, [esp+150h+var_11C]

loc_645415:
inc	esi
add	ecx, 10h
mov	[esp+150h+var_128], esi
mov	[esp+150h+var_120], ecx
cmp	esi, 3
jb	loc_645217
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_645EE0
add	edi, 4
mov	[esp+150h+var_11C], edi
cmp	edi, [ebx+48h]
jnz	loc_645208

loc_645443:
mov	eax, [esp+150h+var_124]
mov	edx, [esp+150h+var_134]
add	eax, 54h
add	ebx, 54h
mov	[esp+150h+var_124], eax
mov	[esp+150h+var_138], ebx
cmp	eax, [edx+8]
jnz	loc_645180
mov	ecx, [ebp+arg_4]
mov	eax, edx

loc_645467:
add	eax, 10h
mov	[esp+150h+var_134], eax
cmp	eax, [ecx+40h]
jnz	loc_645162

loc_645477:
mov	eax, [ebp+arg_0]
push	eax
call	sub_646780
pop	edi
pop	esi
mov	al, 1
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_645140 endp

align 10h



sub_645490 proc	near

var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1306221
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	esi, [esp+20h+arg_0]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_15FBD68
mov	[esi+4], ebx
xor	eax, eax
mov	[esp+20h+var_4], ebx
lea	edi, [esi+8]
mov	[edi], eax
mov	[edi+4], eax
mov	[edi+8], eax
lea	ecx, [esp+20h+var_D]
mov	[edi+0Ch], eax
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	al, [esp+20h+var_E]
lea	ecx, [esp+20h+var_E]
mov	[edi], bl
mov	[edi+4], ebx
mov	[edi+8], edi
mov	[edi+0Ch], edi
mov	[edi+10h], ebx
mov	[edi+14h], al
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
xor	eax, eax
mov	byte ptr [esp+20h+var_4], 1
lea	edi, [esi+20h]
mov	[edi], eax
mov	[edi+4], eax
mov	[edi+8], eax
lea	ecx, [esp+20h+var_D]
mov	[edi+0Ch], eax
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	cl, [esp+20h+var_E]
mov	[edi+14h], cl
lea	ecx, [esp+20h+var_E]
mov	[edi], bl
mov	[edi+4], ebx
mov	[edi+8], edi
mov	[edi+0Ch], edi
mov	[edi+10h], ebx
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	byte ptr [esp+20h+var_4], 2
call	sub_645570
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_645490 endp

align 10h



sub_645570 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_13061E2
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	ebx
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
lea	ecx, [esi+20h]
call	sub_5E0BF0
lea	ecx, [esi+8]
call	sub_489340
mov	eax, dword_1889574
mov	ecx, [eax]
push	0
push	0FFFFFFFFh
push	0
push	1
push	1
lea	eax, [esp+44h+var_24]
push	eax
mov	[esp+48h+var_24], 4
mov	[esp+48h+var_20], 0E8h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+48h+var_20]
push	eax
call	edx
test	eax, eax
jnz	short loc_6455F3
lea	ecx, [esp+30h+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+34h+var_18]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_6455F3:
mov	[esp+30h+var_1C], eax
push	0
mov	edi, eax
mov	[esp+34h+var_4], 0
call	sub_116B0A0
mov	[esp+30h+var_4], 0FFFFFFFFh
mov	ebx, [esi+4]
mov	edi, eax
cmp	ebx, edi
jz	short loc_645645
test	ebx, ebx
jz	short loc_645634
lea	ecx, [ebx+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_645634
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_645634:
mov	[esi+4], edi
test	edi, edi
jz	short loc_645645
add	edi, 4
push	edi		; lpAddend
call	ds:InterlockedIncrement

loc_645645:
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	ebx
add	esp, 24h
retn
sub_645570 endp

align 10h



sub_645660 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	0FFFFFFFFh
push	offset loc_1309E50
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
mov	ebx, [esp+24h+arg_8]
mov	edi, [esp+24h+arg_4]
mov	ebp, [esp+24h+arg_0]
mov	eax, [esp+24h+arg_C]
push	edi
push	eax
call	sub_6489E0
push	eax
lea	ecx, [esp+28h+arg_8]
call	sub_46B5D0
push	0
lea	ecx, [esp+28h+arg_8]
mov	[esp+28h+var_4], 0
call	sub_502330
test	al, al
jz	short loc_6456D5
lea	ecx, [esp+24h+arg_8]
mov	[esp+24h+var_4], 0FFFFFFFFh
call	sub_46B550
xor	al, al
jmp	loc_64585E

loc_6456D5:
test	ebx, ebx
jl	loc_6457B3
lea	ecx, [esp+24h+arg_4]
push	ecx
lea	esi, [ebp+8]
push	esi
call	sub_646920
mov	eax, [eax]
mov	[esp+24h+arg_0], eax
test	eax, eax
jz	short loc_6456FF
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_6456FF:
mov	byte ptr [esp+24h+var_4], 1
cmp	[esp+24h+arg_0], 0
jnz	short loc_645767
push	edi
lea	edx, [esp+28h+arg_C]
push	edx
call	sub_645880
push	eax
lea	edi, [esp+28h+arg_0]
mov	byte ptr [esp+28h+var_4], 2
call	sub_418760
push	eax
push	ecx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
call	sub_646920
add	esp, 4
mov	edi, eax
call	sub_418760
lea	ecx, [esp+24h+arg_C]
mov	byte ptr [esp+24h+var_4], 1
call	sub_46B550
mov	edi, [ebp+4]
mov	esi, [edi]
push	0
lea	ecx, [esp+28h+arg_0]
add	esi, 90h
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi]
push	eax
mov	ecx, edi
call	edx

loc_645767:
lea	ecx, [esp+24h+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [eax+0B6h]
cmp	ecx, ebx
ja	short loc_64577F
xor	esi, esi
jmp	short loc_645788

loc_64577F:
mov	edx, [eax+0B0h]
mov	esi, [edx+ebx*4]

loc_645788:
mov	edi, [esi]
push	0
lea	ecx, [esp+28h+arg_8]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
mov	eax, [edi+90h]
mov	ecx, esi
call	eax
lea	ecx, [esp+24h+arg_0]
mov	byte ptr [esp+24h+var_4], 0
call	sub_46B550
jmp	loc_64584B

loc_6457B3:
mov	eax, edi
sub	eax, 0
jz	short loc_6457D9
sub	eax, 1
jz	short loc_6457D2
sub	eax, 1
jz	short loc_6457CB
mov	eax, offset aS01_badshaderv ; "S01_BadShaderValue"
jmp	short loc_6457DE

loc_6457CB:		; "S01_Unknown"
mov	eax, offset aS01_unknown
jmp	short loc_6457DE

loc_6457D2:		; "S01_Alpha"
mov	eax, offset aS01_alpha
jmp	short loc_6457DE

loc_6457D9:		; "S01_Opaque"
mov	eax, offset aS01_opaque

loc_6457DE:
push	eax
call	sub_1172180
mov	esi, eax
add	esp, 4
mov	[esp+24h+arg_4], esi
lea	ecx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+var_4], 3
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, eax
lea	eax, [esp+24h+arg_4]
call	sub_123E6F0
mov	byte ptr [esp+24h+var_4], 0
test	esi, esi
jz	short loc_64582E
lea	eax, [esi-8]
movzx	esi, word ptr [eax+6]
push	eax		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_64582E
lea	ecx, [esp+24h+arg_4]
push	ecx
mov	eax, esi
call	sub_1171F60

loc_64582E:
mov	edi, [ebp+4]
mov	esi, [edi]
push	0
lea	ecx, [esp+28h+arg_8]
add	esi, 90h
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi]
push	eax
mov	ecx, edi
call	edx

loc_64584B:
lea	ecx, [esp+24h+arg_8]
mov	[esp+24h+var_4], 0FFFFFFFFh
call	sub_46B550
mov	al, 1

loc_64585E:
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h
sub_645660 endp

align 10h



sub_645880 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_1309E0C
mov	eax, large fs:0
push	eax
sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
xor	edi, edi
push	edi
mov	[esp+44h+var_4], edi
push	0FFFFFFFFh
mov	[esp+48h+var_24], edi
mov	eax, dword_1889574
mov	ecx, [eax]
push	edi
mov	ebx, 1
push	ebx
push	ebx
lea	eax, [esp+54h+var_2C]
push	eax
mov	[esp+58h+var_2C], 4
mov	[esp+58h+var_28], 110h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+58h+var_28]
push	eax
call	edx
mov	esi, eax
cmp	esi, edi
jnz	short loc_645902
lea	ecx, [esp+40h+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+44h+var_18]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_645902:
mov	[esp+40h+var_20], esi
mov	eax, esi
mov	[esp+40h+var_4], ebx
call	sub_126EA40
mov	dword ptr [esi], offset	off_1553F88
mov	[esi+108h], edi
mov	[esi+0ECh], edi
mov	byte ptr [esi+10Ch], 1
mov	byte ptr [esp+40h+var_4], 0
mov	ebp, [esp+40h+arg_0]
push	esi
mov	ecx, ebp
call	sub_46B5D0
push	edi
push	0FFFFFFFFh
mov	[esp+48h+var_4], edi
mov	ecx, dword_1889574
mov	ecx, [ecx]
push	edi
push	ebx
push	ebx
lea	eax, [esp+54h+var_28]
push	eax
mov	[esp+58h+var_28], 4
mov	[esp+58h+var_2C], 10h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+58h+var_2C]
push	eax
mov	[esp+5Ch+var_24], ebx
call	edx
mov	esi, eax
cmp	esi, edi
jnz	short loc_645990
lea	ecx, [esp+40h+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+44h+var_18]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_645990:
mov	[esp+40h+var_20], esi
mov	[esp+40h+var_4], 2
lea	ebx, [esi+4]
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[ebx], edi
call	ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_15541B8
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	byte ptr [esp+40h+var_4], 0
push	ebx		; lpAddend
mov	[esp+44h+var_1C], esi
call	ds:InterlockedIncrement
mov	ebx, 3
mov	ecx, ebp
mov	[esp+40h+var_4], ebx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
push	eax
mov	eax, esi
call	sub_427DA0
cmp	[esi+8], ebx
jz	short loc_645A37
push	30h
call	sub_1227DA0
mov	ecx, [esi+0Ch]
add	esp, 4
mov	ebp, eax
cmp	ecx, edi
jz	short loc_645A16
mov	eax, [esi+8]
cmp	eax, ebx
jl	short loc_645A07
mov	eax, ebx

loc_645A07:
shl	eax, 4
push	eax		; MaxCount
push	ecx		; Src
push	eax		; DstSize
push	ebp		; Dst
call	_memcpy_s
add	esp, 10h

loc_645A16:
mov	eax, [esi+0Ch]
cmp	eax, edi
jz	short loc_645A31
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
push	0FFFFFFFFh
push	9
push	eax
mov	eax, [edx+8]
call	eax

loc_645A31:
mov	[esi+0Ch], ebp
mov	[esi+8], ebx

loc_645A37:
xor	ebx, ebx
xor	ebp, ebp
jmp	short loc_645A42
align 10h

loc_645A40:
xor	edi, edi

loc_645A42:
fld	ds:flt_1479B54[ebx*4]
fstp	[esp+40h+var_28]
fld	ds:flt_1479B58[ebx*4]
fstp	[esp+40h+var_2C]
cmp	ebx, [esi+8]
jb	short loc_645A67
lea	edi, [ebx+1]
call	sub_1124670
xor	edi, edi

loc_645A67:
mov	ecx, [esi+0Ch]
fld	[esp+40h+var_28]
mov	eax, dword_1889574
fstp	dword ptr [ecx+ebp]
mov	edx, [esi+0Ch]
fld	[esp+40h+var_2C]
push	edi
fstp	dword ptr [edx+ebp+4]
mov	ecx, [eax]
push	0FFFFFFFFh
push	edi
push	1
push	1
lea	eax, [esp+54h+var_28]
push	eax
mov	[esp+58h+var_28], 4
mov	[esp+58h+var_2C], 0E8h
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+58h+var_2C]
push	eax
call	edx
cmp	eax, edi
jz	short loc_645B07
mov	[esp+40h+var_20], eax
push	edi
mov	edi, eax
mov	byte ptr [esp+44h+var_4], 4
call	sub_116B0A0
mov	byte ptr [esp+40h+var_4], 3
mov	ecx, [esp+40h+arg_0]
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	0
mov	ecx, eax
mov	eax, [edx+90h]
push	edi
call	eax
inc	ebx
add	ebp, 10h
cmp	ebx, 3
jb	loc_645A40
mov	eax, [esp+40h+arg_4]
sub	eax, 0
jz	short loc_645B2D
sub	eax, 1
jz	short loc_645B26
sub	eax, 1
jz	short loc_645B1F
mov	eax, offset aS01_badshaderv ; "S01_BadShaderValue"
jmp	short loc_645B32

loc_645B07:
lea	ecx, [esp+40h+var_18]
call	sub_407A50
push	offset unk_1641FD8
lea	ecx, [esp+44h+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_645B1F:		; "S01_Unknown"
mov	eax, offset aS01_unknown
jmp	short loc_645B32

loc_645B26:		; "S01_Alpha"
mov	eax, offset aS01_alpha
jmp	short loc_645B32

loc_645B2D:		; "S01_Opaque"
mov	eax, offset aS01_opaque

loc_645B32:
push	eax
call	sub_1172180
mov	edi, eax
add	esp, 4
mov	[esp+40h+arg_4], edi
mov	byte ptr [esp+40h+var_4], 5
mov	ecx, [esp+40h+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	[eax+8], edi
lea	ebx, [eax+8]
jz	short loc_645B88
test	edi, edi
jz	short loc_645B65
lea	eax, [edi-8]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_645B65:
mov	eax, [ebx]
test	eax, eax
jz	short loc_645B86
movzx	ebp, word ptr [eax-2]
add	eax, 0FFFFFFF8h
push	eax		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_645B86
push	ebx
mov	eax, ebp
call	sub_1171F60

loc_645B86:
mov	[ebx], edi

loc_645B88:
mov	byte ptr [esp+40h+var_4], 3
test	edi, edi
jz	short loc_645BB0
lea	eax, [edi-8]
movzx	edi, word ptr [eax+6]
push	eax		; lpAddend
call	ds:InterlockedDecrement
cmp	eax, 1
jnz	short loc_645BB0
lea	edx, [esp+40h+arg_4]
push	edx
mov	eax, edi
call	sub_1171F60

loc_645BB0:
lea	eax, [esi+4]
push	eax		; lpAddend
mov	byte ptr [esp+44h+var_4], 0
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_645BCC
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_645BCC:
mov	eax, [esp+40h+arg_0]
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	8
sub_645880 endp

align 10h



sub_645BF0 proc	near

var_449= byte ptr -449h
var_448= dword ptr -448h
var_444= dword ptr -444h
var_440= byte ptr -440h
var_430= dword ptr -430h
var_428= dword ptr -428h
var_41F= byte ptr -41Fh
var_41C= dword ptr -41Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_13084D0
mov	eax, large fs:0
push	eax
sub	esp, 440h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+44Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+460h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+460h+arg_0]
xor	eax, eax
mov	[esp+460h+var_4], eax
mov	[esp+460h+var_444], ebp
mov	[esp+460h+var_448], eax
mov	ebx, 1
lea	edi, [esp+460h+var_41C]
mov	[esp+460h+var_4], ebx
call	sub_1171580
mov	esi, edi
mov	byte ptr [esp+460h+var_4], 2
call	sub_1170810
mov	eax, [esp+460h+arg_4]
push	eax
mov	ecx, edi
push	ecx
call	sub_1171510
lea	esi, [esp+460h+var_440]
call	sub_110F7A0
mov	eax, [esp+460h+var_41C]
mov	edx, esi
push	edx
mov	edx, [eax+10h]
mov	ecx, edi
call	edx
mov	esi, [esp+460h+var_430]
lea	ecx, [esp+460h+var_449]
mov	[esp+460h+var_41F], bl
mov	dword ptr [esp+460h+var_440], offset off_15569D8
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
mov	byte ptr [esp+464h+var_4], 3
mov	eax, [esp+464h+var_428]
push	eax
push	esi
mov	ecx, ebp
call	sub_58E450
lea	ecx, [esp+460h+var_449]
mov	[esp+460h+var_448], ebx
mov	byte ptr [esp+460h+var_4], 2
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
test	esi, esi
jz	short loc_645CEA
mov	ecx, dword_1889574
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	9
push	esi
call	eax

loc_645CEA:
lea	ecx, [esp+460h+var_41C]
mov	byte ptr [esp+460h+var_4], bl
call	sub_1171CB0
mov	byte ptr [esp+460h+var_4], 0
mov	eax, [esp+460h+arg_4]
test	eax, eax
jz	short loc_645D26
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_645D26
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_645D26:
mov	eax, ebp
mov	ecx, [esp+460h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+44Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 44Ch
retn	8
sub_645BF0 endp

align 10h



sub_645D60 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 14h
mov	ecx, [esp+14h+arg_0]
mov	eax, [esp+14h+arg_4]
push	ebx
mov	ebx, [esp+18h+arg_8]
push	ebp
push	esi
add	ecx, 20h
push	edi
push	ecx
lea	ecx, [esp+28h+var_14]
mov	[esp+28h+var_14], ebx
mov	[esp+28h+var_10], eax
call	sub_646A30
mov	esi, eax
lea	edi, [esi+30h]
mov	ecx, edi
call	sub_488180
cmp	eax, 30000h
jb	short loc_645D9F
xor	ecx, ecx
jmp	short loc_645DAD

loc_645D9F:
mov	ecx, edi
call	sub_488180
mov	ecx, 30000h
sub	ecx, eax

loc_645DAD:
movzx	ebp, word ptr [esp+24h+arg_C]
cmp	ecx, ebp
jb	short loc_645DDF
mov	ecx, esi
call	sub_455A00
cmp	eax, 10000h
jb	short loc_645DC8
xor	ecx, ecx
jmp	short loc_645DD6

loc_645DC8:
mov	ecx, esi
call	sub_455A00
mov	ecx, 10000h
sub	ecx, eax

loc_645DD6:
movzx	edx, word ptr [esp+24h+arg_10]
cmp	ecx, edx
jnb	short loc_645DF0

loc_645DDF:
mov	eax, [esp+24h+arg_4]
mov	ecx, [esp+24h+arg_0]
push	esi
push	eax
push	ebx
push	ecx
call	sub_645660

loc_645DF0:
mov	ecx, edi
call	sub_488180
mov	ecx, esi
mov	[esp+24h+arg_4], eax
call	sub_455A00
lea	edx, [esp+24h+arg_C]
push	edx
mov	ecx, edi
mov	ebx, eax
mov	[esp+28h+arg_C], 0
call	sub_488180
add	eax, ebp
push	eax
mov	ecx, edi
call	sub_488300
movzx	ebp, word ptr [esp+24h+arg_10]
lea	eax, [esp+24h+var_14]
push	eax
mov	ecx, esi
mov	[esp+28h+arg_10], ebp
call	sub_455A00
add	eax, ebp
push	eax
mov	ecx, esi
call	sub_4A6C40
mov	eax, [esi+1Ch]
fldz
sub	eax, [esi+18h]
fst	[esp+24h+var_14]
lea	ebp, [esi+18h]
fst	[esp+24h+var_10]
lea	ecx, [esp+24h+var_14]
fst	[esp+24h+var_C]
sar	eax, 4
fstp	[esp+24h+var_8]
add	eax, [esp+24h+arg_10]
push	ecx
mov	ecx, ebp
call	sub_6467E0
lea	edx, [esp+24h+var_14]
lea	ecx, [esi+0Ch]
push	edx
mov	[esp+28h+arg_C], ecx
call	sub_455A00
add	eax, [esp+28h+arg_10]
mov	ecx, [esp+28h+arg_C]
push	eax
call	sub_4A6C40
mov	ecx, [esp+24h+arg_4]
mov	eax, [esp+24h+arg_14]
push	ecx
mov	ecx, edi
mov	[eax], bx
call	sub_4881A0
mov	edi, [esp+24h+arg_14]
push	ebx
mov	ecx, esi
mov	[edi+4], eax
call	sub_455A20
mov	ecx, ebp
mov	[edi+8], eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+24h+arg_C]
mov	edx, ebx
shl	edx, 4
add	eax, edx
push	ebx
mov	[edi+10h], eax
call	sub_455A20
mov	[edi+0Ch], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	18h
sub_645D60 endp

align 10h


; Attributes: bp-based frame

sub_645EE0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130B87A
mov	eax, large fs:0
push	eax
sub	esp, 18h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	ebx, [ebp+arg_0]
xor	eax, eax
mov	[esp+34h+var_1C], eax
mov	[esp+34h+var_18], eax
mov	[esp+34h+var_14], eax
lea	edi, [ebx+20h]
mov	ecx, edi
mov	[esp+34h+var_4], eax
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
mov	esi, [eax]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_645F9E

loc_645F36:
mov	eax, [esi+48h]
cmp	eax, [esi+4Ch]
lea	edx, [esi+18h]
jz	short loc_645F8A
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
mov	[esp+34h+var_20], eax
sub	eax, 1
jnz	short loc_645F8A
push	edx
push	ecx
push	1
push	ebx
call	sub_645660
mov	eax, [esp+34h+var_18]
cmp	eax, [esp+34h+var_14]
jz	short loc_645F7B
test	eax, eax
jz	short loc_645F72
mov	dword ptr [eax], 1
mov	eax, [esp+34h+var_18]

loc_645F72:
add	eax, 4
mov	[esp+34h+var_18], eax
jmp	short loc_645F8A

loc_645F7B:
lea	ecx, [esp+34h+var_20]
push	ecx
push	eax
lea	ecx, [esp+3Ch+var_1C]
call	sub_646B80

loc_645F8A:
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_645F36

loc_645F9E:
mov	eax, [esp+34h+var_18]
cmp	[esp+34h+var_1C], eax
jz	short loc_645FD8
lea	esi, [ebx+8]
jmp	short loc_645FB0
align 10h

loc_645FB0:
push	0
push	ecx
add	eax, 0FFFFFFFCh
push	eax
push	esi
call	sub_646920
add	esp, 4
mov	ecx, eax
call	sub_59C680
mov	eax, [esp+34h+var_18]
sub	eax, 4
mov	[esp+34h+var_18], eax
cmp	[esp+34h+var_1C], eax
jnz	short loc_645FB0

loc_645FD8:
lea	edx, [esp+34h+var_1C]
push	edx
mov	[esp+38h+var_4], 0FFFFFFFFh
call	sub_646870
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_645EE0 endp

align 10h


; Attributes: bp-based frame

sub_646000 proc	near

var_114= byte ptr -114h
var_110= dword ptr -110h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	0FFFFFFFFh
push	offset loc_130B839
mov	eax, large fs:0
push	eax
sub	esp, 108h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+114h+var_14], eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+124h+var_C]
mov	large fs:0, eax
mov	edi, ecx
test	edi, edi
jnz	short loc_64604D

loc_646046:
xor	eax, eax
jmp	loc_6460F4

loc_64604D:
mov	eax, edi
call	sub_A8FF60
test	eax, eax
jz	short loc_646046
mov	ecx, eax
call	sub_646120
mov	ebx, eax
test	ebx, ebx
jz	short loc_646046
lea	ecx, [esp+124h+var_110]
call	sub_A8B9F0
lea	esi, [esp+124h+var_110]
mov	[esp+124h+var_4], 0
call	sub_A8D5D0
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	350h
call	eax
mov	ecx, 350h
mov	[eax+4], cx
mov	dword ptr [esp+124h+var_114], eax
push	111D4h		; int
mov	edx, esi
push	edx		; int
mov	ecx, eax	; int
mov	byte ptr [esp+12Ch+var_4], 1
call	sub_A921A0
mov	esi, eax
mov	byte ptr [esp+124h+var_4], 0
call	sub_A8C7B0
push	ebx
mov	ecx, esi
call	sub_A91900
mov	ecx, esi
call	sub_A8C7A0
lea	ecx, [esp+124h+var_110]
mov	[esp+124h+var_4], 0FFFFFFFFh
call	sub_4D6DA0
mov	eax, esi

loc_6460F4:
mov	ecx, [esp+124h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+114h+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_646000 endp

align 10h


; Attributes: bp-based frame

sub_646120 proc	near

var_1BC= dword ptr -1BCh
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= xmmword ptr -170h
var_160= xmmword ptr -160h
var_150= xmmword ptr -150h
var_140= xmmword ptr -140h
var_130= xmmword ptr -130h
var_120= byte ptr -120h
var_110= xmmword ptr -110h
var_100= xmmword ptr -100h
var_E0=	byte ptr -0E0h
var_DC=	dword ptr -0DCh
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
push	0FFFFFFFFh
push	offset loc_1309D7B
mov	eax, large fs:0
push	eax
sub	esp, 198h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+1A4h+var_14], eax
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1B4h+var_C]
mov	large fs:0, eax
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
xor	ebx, ebx
mov	esi, eax
mov	[esp+1B4h+var_17C], esi
mov	[esp+1B4h+var_194], ebx
mov	[esp+1B4h+var_190], ebx
mov	[esp+1B4h+var_18C], 80000000h
mov	[esp+1B4h+var_4], ebx
mov	eax, [esi+4]
xor	edi, edi
cmp	eax, ebx
mov	[esp+1B4h+var_178], edi
jg	loc_64626B

loc_646195:
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	44h
call	eax
mov	ecx, 44h
mov	[eax+4], cx
mov	[esp+1B4h+var_174], eax
mov	esi, eax
mov	byte ptr [esp+1B4h+var_4], 5
call	sub_127DF20
mov	byte ptr [esp+1B4h+var_4], 0
xor	esi, esi
cmp	[esp+1B4h+var_190], ebx
mov	[esp+1B4h+var_17C], eax
jle	short loc_6461F4

loc_6461DC:
mov	edx, [esp+1B4h+var_17C]
mov	eax, [esp+1B4h+var_194]
mov	edi, [eax+esi*4]
push	edx
call	sub_127DD20
inc	esi
cmp	esi, [esp+1B4h+var_190]
jl	short loc_6461DC

loc_6461F4:
lea	ecx, [esp+1B4h+var_194]
push	ecx
mov	[esp+1B8h+var_4], 0FFFFFFFFh
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
mov	edx, [esp+1B4h+var_18C]
mov	[esp+1B4h+var_190], ebx
test	edx, edx
js	short loc_646231
and	edx, 3FFFFFFFh
push	edx
mov	edx, [esp+1B8h+var_194]
push	edx
mov	ecx, eax
call	sub_4E2290

loc_646231:
mov	eax, [esp+1B4h+var_17C]

loc_646235:
mov	[esp+1B4h+var_194], ebx

loc_646239:
mov	[esp+1B4h+var_18C], 80000000h

loc_646241:
mov	ecx, [esp+1B4h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+1A4h+var_14]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_646265:
mov	edi, [esp+1B4h+var_178]
mov	esi, edx

loc_64626B:
mov	eax, [esi]
cmp	[eax+edi*4], ebx
lea	eax, [eax+edi*4]
jz	loc_64662B
mov	ecx, [eax]
call	sub_4D69E0
cmp	eax, ebx
jz	loc_64666F
mov	ebx, [eax]
test	ebx, ebx
jz	loc_646676
lea	ecx, [esp+1B4h+var_E0]
call	sub_127D660
mov	ecx, [esi]
mov	edi, [ecx+edi*4]
lea	esi, [esp+1B4h+var_E0]
call	sub_A89710
xor	eax, eax
mov	[esp+1B4h+var_188], eax
mov	[esp+1B4h+var_184], eax
mov	[esp+1B4h+var_180], 80000000h
lea	ecx, [ebx+0Ch]
mov	byte ptr [esp+1B4h+var_4], 1
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, 0Ah
jnz	loc_646468
mov	ecx, ebx
call	sub_4D8420
mov	ebx, eax
xor	esi, esi
cmp	ebx, esi
jz	loc_6466C0
lea	ecx, [ebx+0Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, 9
jnz	loc_646468
xor	edi, edi
cmp	[ebx+1Ch], esi
jle	loc_646468
lea	esp, [esp+0]

loc_646310:
cmp	edi, 100h
jnb	short loc_646333
mov	ecx, edi
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
mov	edx, edi
shr	edx, 5
and	eax, [ebx+edx*4+50h]
jz	loc_64645E

loc_646333:
push	edi
mov	ecx, ebx
call	sub_4D8480
mov	esi, eax
test	esi, esi
jz	loc_646753
lea	ecx, [esi+0Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, 0Ch
jnz	loc_64645E
lea	ecx, [esp+1B4h+var_110]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
lea	ecx, [esp+1B4h+var_170]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
fld1
mov	eax, [esi]
mov	eax, [eax+1Ch]
xorps	xmm0, xmm0
lea	ecx, [esp+1B4h+var_110]
push	ecx
movaps	[esp+1B8h+var_170], xmm0
fst	dword ptr [esp+1B8h+var_170]
push	ecx
movaps	[esp+1BCh+var_160], xmm0
fst	dword ptr [esp+1BCh+var_160+4]
movaps	[esp+1BCh+var_150], xmm0
fst	dword ptr [esp+1BCh+var_150+8]
lea	edx, [esp+1BCh+var_170]
fstp	[esp+1BCh+var_1BC]
push	edx
mov	ecx, esi
movaps	[esp+1C0h+var_140], xmm0
call	eax
movaps	xmm1, [esp+1B4h+var_110]
movaps	xmm0, [esp+1B4h+var_100]
subps	xmm0, xmm1
movaps	xmm1, ds:xmmword_14EE2B0
mulps	xmm0, xmm1
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
addss	xmm1, xmm0
lea	ecx, [esp+1B4h+var_130]
shufps	xmm0, xmm0, 0AAh
push	ecx
addss	xmm0, xmm1
lea	ecx, [esp+1B8h+var_120]
movaps	[esp+1B8h+var_130], xmm0
call	sub_4D5050
lea	ecx, [esp+1B4h+var_120]
call	sub_4D50D0
fcomp	ds:flt_15AACC4
fnstsw	ax
test	ah, 41h
jnz	short loc_64645E
mov	ecx, esi
call	sub_AD60E0
lea	edx, [esp+1B4h+var_188]
push	edx
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
mov	ecx, [esp+1B4h+var_180]
and	ecx, 3FFFFFFFh
cmp	[esp+1B4h+var_184], ecx
jnz	short loc_64644F
push	4
lea	edx, [esp+1B8h+var_188]
push	edx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_64644F:
mov	ecx, [esp+1B4h+var_184]
mov	eax, [esp+1B4h+var_188]
mov	[eax+ecx*4], esi
inc	[esp+1B4h+var_184]

loc_64645E:
inc	edi
cmp	edi, [ebx+1Ch]
jl	loc_646310

loc_646468:
cmp	[esp+1B4h+var_184], 0
jle	loc_6465C6
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	70h
call	eax
mov	ecx, 70h
mov	[eax+4], cx
mov	[esp+1B4h+var_174], eax
mov	byte ptr [esp+1B4h+var_4], 2
mov	edx, [esp+1B4h+var_184]
mov	ecx, [esp+1B4h+var_188]
push	1
push	edx
push	ecx
mov	ecx, eax
call	sub_1213990
lea	ecx, [esp+1B4h+var_110]
mov	edi, eax
mov	byte ptr [esp+1B4h+var_4], 1
call	sub_AB2710
test	edi, edi
jz	short loc_6464D1
lea	eax, [edi+10h]
jmp	short loc_6464D3

loc_6464D1:
xor	eax, eax

loc_6464D3:
push	0
lea	edx, [esp+1B8h+var_110]
push	edx
push	eax
call	sub_1283EB0
add	esp, 0Ch
mov	esi, eax
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	40h
call	eax
mov	ecx, 40h
mov	[eax+4], cx
mov	[esp+1B4h+var_174], eax
push	esi
push	edi
mov	ecx, eax
mov	byte ptr [esp+1BCh+var_4], 3
call	sub_1212CE0
mov	ecx, edi
mov	ebx, eax
mov	byte ptr [esp+1B4h+var_4], 1
call	sub_AD6020
mov	ecx, esi
call	sub_AD6020
mov	[esp+1B4h+var_DC], ebx
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	220h
call	eax
mov	ecx, 220h
mov	[eax+4], cx
mov	[esp+1B4h+var_174], eax
lea	edx, [esp+1B4h+var_E0]
push	edx
mov	ecx, eax
mov	byte ptr [esp+1B8h+var_4], 4
call	sub_A89D30
mov	esi, eax
lea	eax, [esp+1B4h+var_194]
mov	byte ptr [esp+1B4h+var_4], 1
push	eax
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
mov	ecx, [esp+1B4h+var_18C]
and	ecx, 3FFFFFFFh
cmp	[esp+1B4h+var_190], ecx
jnz	short loc_6465B7
push	4
lea	edx, [esp+1B8h+var_194]
push	edx
push	eax
call	sub_121B830
add	esp, 0Ch

loc_6465B7:
mov	ecx, [esp+1B4h+var_190]
mov	eax, [esp+1B4h+var_194]
mov	[eax+ecx*4], esi
inc	[esp+1B4h+var_190]

loc_6465C6:
lea	edx, [esp+1B4h+var_188]
mov	byte ptr [esp+1B4h+var_4], 0
push	edx
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
mov	edx, [esp+1B4h+var_180]
xor	esi, esi
mov	[esp+1B4h+var_184], esi
test	edx, edx
js	short loc_646602
mov	ecx, [esp+1B4h+var_188]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_646602:
mov	eax, [esp+1B4h+var_178]
mov	edx, [esp+1B4h+var_17C]
inc	eax
xor	ebx, ebx
cmp	eax, [edx+4]
mov	[esp+1B4h+var_188], esi
mov	[esp+1B4h+var_180], 80000000h
mov	[esp+1B4h+var_178], eax
jl	loc_646265
jmp	loc_646195

loc_64662B:
lea	eax, [esp+1B4h+var_194]
push	eax

loc_646630:
mov	[esp+1B8h+var_4], 0FFFFFFFFh
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
mov	edx, [esp+1B4h+var_18C]
mov	[esp+1B4h+var_190], ebx
test	edx, edx
js	short loc_646668
mov	ecx, [esp+1B4h+var_194]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_646668:
xor	eax, eax
jmp	loc_646235

loc_64666F:
lea	edx, [esp+1B4h+var_194]
push	edx
jmp	short loc_646630

loc_646676:
lea	edx, [esp+1B4h+var_194]
mov	[esp+1B4h+var_4], 0FFFFFFFFh
push	edx
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
mov	edx, [esp+1B4h+var_18C]
xor	esi, esi
mov	[esp+1B4h+var_190], esi
test	edx, edx
js	short loc_6466B5
mov	ecx, [esp+1B4h+var_194]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_6466B5:
mov	[esp+1B4h+var_194], esi
xor	eax, eax
jmp	loc_646239

loc_6466C0:
lea	edx, [esp+1B4h+var_188]
mov	byte ptr [esp+1B4h+var_4], 0
push	edx
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0

loc_6466DB:
mov	edx, [esp+1B4h+var_180]
mov	edi, 80000000h
mov	[esp+1B4h+var_184], esi
test	edi, edx
jnz	short loc_6466FF
mov	ecx, [esp+1B4h+var_188]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_6466FF:
lea	edx, [esp+1B4h+var_194]
mov	[esp+1B4h+var_188], esi
mov	[esp+1B4h+var_180], edi
mov	[esp+1B4h+var_4], 0FFFFFFFFh
push	edx
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
mov	edx, [esp+1B4h+var_18C]
mov	[esp+1B4h+var_190], esi
test	edi, edx
jnz	short loc_646744
mov	ecx, [esp+1B4h+var_194]
and	edx, 3FFFFFFFh
push	edx
push	ecx
mov	ecx, eax
call	sub_4E2290

loc_646744:
mov	[esp+1B4h+var_194], esi
mov	[esp+1B4h+var_18C], edi
xor	eax, eax
jmp	loc_646241

loc_646753:
lea	edx, [esp+1B4h+var_188]
mov	byte ptr [esp+1B4h+var_4], 0
push	edx
lea	ecx, [esp+1B8h+var_198+3]
mov	byte ptr [esp+1B8h+var_198+3], 0
call	sub_4A00D0
xor	esi, esi
jmp	loc_6466DB
sub_646120 endp

align 10h



sub_646780 proc	near

arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
push	edi
lea	edi, [ebx+20h]
mov	ecx, edi
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
mov	esi, [eax]
cmp	esi, edi
setnz	al
test	al, al
jz	short loc_6467CE
lea	ecx, [ecx+0]

loc_6467A0:
mov	ecx, [esi+48h]
cmp	ecx, [esi+4Ch]
lea	eax, [esi+18h]
jz	short loc_6467BA
mov	edx, [esi+14h]
push	eax
mov	eax, [esi+10h]
push	edx
push	eax
push	ebx
call	sub_645660

loc_6467BA:
push	esi
call	sub_77E2F0
mov	esi, eax
add	esp, 4
cmp	esi, edi
setnz	al
test	al, al
jnz	short loc_6467A0

loc_6467CE:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_646780 endp

align 10h



sub_6467E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, eax
push	edi
mov	edi, ecx
mov	eax, [edi+4]
sub	eax, [edi]
sar	eax, 4
cmp	esi, eax
jnb	short loc_64682B
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, edi
mov	ebx, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
shl	esi, 4
add	eax, esi
cmp	eax, ebx
jz	short loc_646861
mov	esi, [edi+4]
sub	esi, ebx
jz	short loc_646822
push	esi
push	ebx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, esi

loc_646822:
mov	[edi+4], eax
pop	edi
pop	esi
pop	ebx
retn	4

loc_64682B:
sub	esi, eax
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
test	esi, esi
jz	short loc_646861
mov	ecx, [edi+8]
sub	ecx, [edi+4]
sar	ecx, 4
cmp	ecx, esi
jb	short loc_646858
lea	edx, [esp+0Ch+arg_0]
push	edx
push	ebx
push	esi
push	eax
mov	ecx, edi
call	sub_647250
pop	edi
pop	esi
pop	ebx
retn	4

loc_646858:
push	esi
push	eax
mov	eax, ebx
call	sub_647170

loc_646861:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6467E0 endp

align 10h



sub_646870 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12FFF38
mov	eax, large fs:0
push	eax
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+10h+var_C]
mov	large fs:0, eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6468DA
mov	eax, [eax+8]
sub	eax, ecx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_6468D0
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 0Ch
retn	4

loc_6468D0:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_6468DA:
mov	ecx, [esp+10h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 0Ch
retn	4
sub_646870 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12FFF30

loc_6468F0:
mov	ecx, [eax]
test	ecx, ecx
jz	short locret_64691D
mov	eax, [eax+8]
sub	eax, ecx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_646913
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_646913:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

locret_64691D:
retn
; END OF FUNCTION CHUNK	FOR sub_12FFF30
align 10h



sub_646920 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_13032F9
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	ebx, [esp+2Ch+arg_4]
mov	ebp, [esp+2Ch+arg_0]
push	ebx
mov	eax, ebp
mov	[esp+30h+var_14], 0
call	sub_647E80
mov	edi, eax
cmp	edi, ebp
jz	short loc_64698C
lea	esi, [esp+2Ch+arg_0]
mov	ecx, ebp
call	sub_646CF0
mov	[esp+2Ch+var_4], 0
mov	eax, [ebx]
cmp	eax, [edi+10h]
mov	[esp+2Ch+var_14], 1
mov	byte ptr [esp+2Ch+arg_4], 0
jge	short loc_646991

loc_64698C:
mov	byte ptr [esp+2Ch+arg_4], 1

loc_646991:
mov	[esp+2Ch+var_4], 0FFFFFFFFh
test	byte ptr [esp+2Ch+var_14], 1
jz	short loc_6469A9
lea	ecx, [esp+2Ch+arg_0]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)

loc_6469A9:
cmp	byte ptr [esp+2Ch+arg_4], 0
jz	short loc_646A0E
push	0
lea	ecx, [esp+30h+arg_0]
call	sub_46B5D0
push	ebx
lea	ecx, [esp+30h+var_14]
push	ecx
mov	edx, eax
mov	[esp+34h+var_4], 1
call	sub_646D70
push	eax
push	ecx
mov	eax, esp
mov	byte ptr [esp+34h+var_4], 2
mov	[eax], edi
lea	esi, [esp+34h+arg_4]
mov	eax, ebp
call	sub_647370
mov	esi, [esp+2Ch+arg_4]
lea	ecx, [esp+2Ch+var_14]
mov	byte ptr [esp+2Ch+var_4], 1
call	sub_5E8F80
lea	ecx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_4], 0FFFFFFFFh
call	sub_46B550
lea	eax, [esi+14h]
jmp	short loc_646A11

loc_646A0E:
lea	eax, [edi+14h]

loc_646A11:
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_646920 endp

align 10h



sub_646A30 proc	near

var_92=	byte ptr -92h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_48=	byte ptr -48h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13061A0
mov	eax, large fs:0
push	eax
sub	esp, 88h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0A8h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	ebx, [esp+0A8h+arg_0]
mov	eax, ebx
mov	[esp+0A8h+var_90], 0
call	sub_647EC0
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_646AB3
lea	esi, [esp+0A8h+var_91]
mov	ecx, ebx
call	sub_646CF0
mov	[esp+0A8h+var_4], 0
mov	eax, [edi]
mov	ecx, [ebp+10h]
cmp	ecx, eax
mov	[esp+0A8h+var_90], 1
jg	short loc_646AB3
jl	short loc_646AAC
mov	eax, [edi+4]
cmp	eax, [ebp+14h]
jl	short loc_646AB3

loc_646AAC:
mov	[esp+0A8h+var_92], 0
jmp	short loc_646AB8

loc_646AB3:
mov	[esp+0A8h+var_92], 1

loc_646AB8:
mov	[esp+0A8h+var_4], 0FFFFFFFFh
test	byte ptr [esp+0A8h+var_90], 1
jz	short loc_646AD3
lea	ecx, [esp+0A8h+var_91]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)

loc_646AD3:
cmp	[esp+0A8h+var_92], 0
jz	short loc_646B53
lea	esi, [esp+0A8h+var_48]
call	sub_646C70
mov	[esp+0A8h+var_4], 1
mov	ecx, [edi]
mov	edx, [edi+4]
mov	[esp+0A8h+var_8C], ecx
lea	ecx, [esp+0A8h+var_84]
push	ecx
mov	ecx, eax
mov	[esp+0ACh+var_88], edx
call	sub_646DD0
lea	edx, [esp+0A8h+var_8C]
push	edx
push	ecx
mov	eax, esp
mov	byte ptr [esp+0B0h+var_4], 3
mov	[eax], ebp
lea	eax, [esp+0B0h+var_90]
push	eax
mov	eax, ebx
call	sub_6475C0
mov	esi, [esp+0A8h+var_90]
lea	ecx, [esp+0A8h+var_8C]
mov	byte ptr [esp+0A8h+var_4], 1
call	sub_5E8FB0
lea	ecx, [esp+0A8h+var_48]
mov	[esp+0A8h+var_4], 0FFFFFFFFh
call	sub_5E8FE0
lea	eax, [esi+18h]
jmp	short loc_646B56

loc_646B53:
lea	eax, [ebp+18h]

loc_646B56:
mov	ecx, [esp+0A8h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 94h
retn	4
sub_646A30 endp

align 10h


; Attributes: bp-based frame

sub_646B80 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_1301410
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	esi, ecx
mov	eax, esi
call	sub_646D20
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
call	sub_630320
mov	ebx, eax
mov	[ebp+var_1C], ebx
mov	[ebp+var_4], 0
mov	eax, [esi]
push	ebx
push	eax
mov	ecx, [ebp+arg_0]
call	sub_647F10
add	esp, 8
mov	edi, eax
mov	[ebp+var_18], edi
test	edi, edi
jz	short loc_646BEB
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[edi], eax

loc_646BEB:
add	edi, 4
mov	[ebp+var_18], edi
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [esi]
mov	eax, [esi+4]
cmp	eax, ecx
jz	short loc_646C08

loc_646C01:
sub	eax, 4
cmp	eax, ecx
jnz	short loc_646C01

loc_646C08:
test	ecx, ecx
jz	short loc_646C34
mov	eax, [esi+8]
sub	eax, ecx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_646C2A
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_646C34

loc_646C2A:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_646C34:
mov	[esi], ebx
mov	[esi+4], edi
mov	ecx, [ebp+var_14]
lea	edx, [ebx+ecx*4]
mov	[esi+8], edx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_646B80 endp



; Attributes: noreturn

sub_646C56 proc	near
mov	ecx, [ebp-1Ch]	; void *
test	ecx, ecx
jz	short loc_646C65
mov	eax, [ebp-14h]
call	sub_409EF0

loc_646C65:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_646C56 endp

align 10h



sub_646C70 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	edi
lea	ecx, [esp+8+var_1]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
mov	ecx, esi
call	sub_5E0080
lea	ecx, [esp+8+var_1]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
lea	ecx, [esp+8+var_1]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
lea	ecx, [esi+0Ch]
call	sub_5E0080
lea	ecx, [esp+8+var_1]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
xor	edi, edi
mov	[esi+18h], edi
mov	[esi+1Ch], edi
lea	ecx, [esp+8+var_1]
mov	[esi+20h], edi
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	[esi+24h], edi
mov	[esi+28h], edi
lea	ecx, [esp+8+var_1]
mov	[esi+2Ch], edi
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
lea	ecx, [esp+8+var_1]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
push	eax
lea	ecx, [esi+30h]
call	sub_5E0080
lea	ecx, [esp+8+var_1]
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	eax, esi
pop	edi
pop	ecx
retn
sub_646C70 endp

align 10h



sub_646CF0 proc	near
mov	eax, esi
call	sub_646F80
mov	eax, esi
retn
sub_646CF0 endp

align 10h



sub_646D00 proc	near
mov	eax, [esi]
mov	ecx, [edx]
cmp	ecx, eax
jg	short loc_646D15
jl	short loc_646D12
mov	eax, [esi+4]
cmp	eax, [edx+4]
jl	short loc_646D15

loc_646D12:
xor	eax, eax
retn

loc_646D15:
mov	eax, 1
retn
sub_646D00 endp

align 10h



sub_646D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	ecx, [eax+4]
sub	ecx, [eax]
mov	eax, 3FFFFFFFh
sar	ecx, 2
sub	eax, ecx
mov	[esp+8+var_4], 1
mov	[esp+8+var_8], ecx
cmp	eax, 1
jnb	short loc_646D4C
push	offset aVector	; "vector"
call	sub_77EC70

loc_646D4C:
lea	eax, [esp+8+var_8]
cmp	ecx, 1
ja	short loc_646D58
lea	eax, [esp+8+var_4]

loc_646D58:
mov	eax, [eax]
add	eax, ecx
cmp	eax, 3FFFFFFFh
ja	short loc_646D67
cmp	eax, ecx
jnb	short loc_646D6C

loc_646D67:
mov	eax, 3FFFFFFFh

loc_646D6C:
add	esp, 8
retn
sub_646D20 endp




sub_646D70 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_13013EB
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
mov	eax, [esp+14h+arg_4]
mov	ecx, [eax]
mov	[esi], ecx
mov	eax, [edx]
mov	[esi+4], eax
test	eax, eax
jz	short loc_646DB0
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_646DB0:
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	8
sub_646D70 endp

align 10h



sub_646DD0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13032A9
mov	eax, large fs:0
push	eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	esi, [esp+18h+arg_0]
push	edi
mov	ecx, esi
call	sub_4A6B80
lea	eax, [edi+0Ch]
push	eax
lea	ecx, [esi+0Ch]
mov	[esp+1Ch+var_4], 0
call	sub_4A6B80
lea	edx, [esi+18h]
lea	ecx, [edi+18h]
push	edx
mov	byte ptr [esp+1Ch+var_4], 1
call	sub_646E60
lea	eax, [esi+24h]
lea	ecx, [edi+24h]
push	eax
mov	byte ptr [esp+1Ch+var_4], 2
call	sub_646EF0
add	edi, 30h
push	edi
lea	ecx, [esi+30h]
mov	byte ptr [esp+1Ch+var_4], 3
call	sub_5E7330
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_646DD0 endp

align 10h



sub_646E60 proc	near

var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_13013C0
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	ebx, [esp+20h+arg_0]
mov	[esp+20h+var_4], 0
mov	eax, [esi+4]
sub	eax, [esi]
sar	eax, 4
push	eax
push	ebx
call	sub_646F90
lea	ecx, [esp+13h]
mov	byte ptr [esp+20h+var_4], 2
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	edi, [esi+4]
mov	esi, [esi]
mov	eax, [ebx]
cmp	edi, esi
jz	short loc_646EC9
sub	edi, esi
push	edi
push	esi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi

loc_646EC9:
mov	[ebx+4], eax
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	eax, ebx
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_646E60 endp

align 10h



sub_646EF0 proc	near

var_E= byte ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1301390
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	ebx, [esp+20h+arg_0]
mov	[esp+20h+var_4], 0
mov	eax, [esi+4]
sub	eax, [esi]
sar	eax, 3
push	eax
push	ebx
call	sub_647000
lea	ecx, [esp+13h]
mov	byte ptr [esp+20h+var_4], 2
call	??1_Init_locks@std@@QAE@XZ ; std::_Init_locks::~_Init_locks(void)
mov	edi, [esi+4]
mov	esi, [esi]
mov	eax, [ebx]
cmp	edi, esi
jz	short loc_646F59
sub	edi, esi
push	edi
push	esi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi

loc_646F59:
mov	[ebx+4], eax
mov	[esp+20h+var_4], 0FFFFFFFFh
mov	eax, ebx
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_646EF0 endp

align 10h



sub_646F80 proc	near
mov	dl, [ecx+14h]
mov	[eax], dl
retn
sub_646F80 endp

align 10h



sub_646F90 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12FFF0B
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
xor	eax, eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esp+14h+var_4], eax
lea	eax, [esp+14h+arg_4]
push	eax
mov	eax, [esp+18h+arg_4]
call	sub_647070
mov	ecx, [esp+14h+arg_4]
shl	ecx, 4
add	ecx, eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], ecx
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	8
sub_646F90 endp

align 10h



sub_647000 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12FFF0B
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
xor	eax, eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esp+14h+var_4], eax
lea	eax, [esp+14h+arg_4]
push	eax
mov	eax, [esp+18h+arg_4]
call	sub_6470F0
mov	ecx, [esp+14h+arg_4]
lea	edx, [eax+ecx*8]
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], edx
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	8
sub_647000 endp

align 10h



sub_647070 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
cmp	eax, 0FFFFFFFh
jbe	short loc_647092
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_647092:
test	eax, eax
jz	short loc_6470DE
shl	eax, 4
mov	[esp+10h+var_10], eax
cmp	eax, 80h
jbe	short loc_6470BF
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 4
mov	[ecx], edx
add	esp, 10h
retn	4

loc_6470BF:
lea	ecx, [esp+10h+var_10]
push	ecx
call	sub_77E150
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 4
mov	[ecx], edx
add	esp, 10h
retn	4

loc_6470DE:
xor	eax, eax
add	esp, 10h
retn	4
sub_647070 endp

align 10h



sub_6470F0 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 10h
cmp	eax, 1FFFFFFFh
jbe	short loc_647112
lea	ecx, [esp+10h+var_C]
call	sub_407A50
push	offset unk_1641FD8
lea	eax, [esp+14h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_647112:
test	eax, eax
jz	short loc_647161
add	eax, eax
add	eax, eax
add	eax, eax
mov	[esp+10h+var_10], eax
cmp	eax, 80h
jbe	short loc_647142
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 3
mov	[ecx], edx
add	esp, 10h
retn	4

loc_647142:
lea	ecx, [esp+10h+var_10]
push	ecx
call	sub_77E150
mov	edx, [esp+14h+var_10]
mov	ecx, [esp+14h+arg_0]
add	esp, 4
shr	edx, 3
mov	[ecx], edx
add	esp, 10h
retn	4

loc_647161:
xor	eax, eax
add	esp, 10h
retn	4
sub_6470F0 endp

align 10h



sub_647170 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
mov	esi, eax
push	ebp
mov	eax, edi
call	sub_6478C0
lea	ecx, [esp+10h+arg_4]
push	ecx
mov	[esp+14h+arg_4], eax
call	sub_647070
mov	edx, [esp+10h+arg_0]
mov	ecx, eax
mov	eax, [edi]
mov	ebx, edx
sub	ebx, eax
mov	[esp+10h+var_4], ecx
jz	short loc_6471B5
push	ebx
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+1Ch+arg_0]
add	esp, 0Ch
add	eax, ebx
jmp	short loc_6471B7

loc_6471B5:
mov	eax, ecx

loc_6471B7:
mov	ecx, ebp
test	ebp, ebp
jbe	short loc_6471DE
lea	ecx, [ecx+0]

loc_6471C0:
mov	ebx, [esi]
mov	[eax], ebx
mov	ebx, [esi+4]
mov	[eax+4], ebx
mov	ebx, [esi+8]
mov	[eax+8], ebx
mov	ebx, [esi+0Ch]
mov	[eax+0Ch], ebx
dec	ecx
add	eax, 10h
test	ecx, ecx
ja	short loc_6471C0

loc_6471DE:
mov	ecx, [edi+4]
sub	ecx, edx
mov	esi, eax
mov	ebx, ecx
jz	short loc_6471F8
push	ebx
push	edx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	esi, eax
add	esp, 0Ch
add	esi, ebx

loc_6471F8:
push	ecx
push	esp
mov	ecx, edi
call	sub_4AC410
push	ecx
push	esp
mov	ecx, edi
call	sub_5E26A0
call	sub_50E7D0
mov	eax, [edi]
mov	edx, [edi+8]
lea	ebx, [edi+8]
sub	edx, eax
add	esp, 8
sar	edx, 4
push	edx		; int
push	eax		; void *
mov	ecx, ebx
call	sub_5E9290
mov	ecx, [esp+10h+arg_4]
mov	eax, [esp+10h+var_4]
mov	[edi+4], esi
shl	ecx, 4
pop	esi
add	ecx, eax
pop	ebp
mov	[ebx], ecx
mov	[edi], eax
pop	ebx
pop	ecx
retn	8
sub_647170 endp

align 10h


; Attributes: bp-based frame

sub_647250 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	edx, [ebp+arg_8]
sub	esp, 1Ch
push	ebx
mov	ebx, ecx
push	esi
push	edi
cmp	edx, [ebx]
jb	short loc_6472AC
cmp	edx, [ebx+4]
jnb	short loc_6472AC
mov	eax, [edx]
mov	ecx, [edx+4]
mov	[esp+28h+var_C], ecx
mov	ecx, [edx+0Ch]
mov	[esp+28h+var_10], eax
mov	eax, [edx+8]
lea	edx, [esp+28h+var_15]
push	edx
mov	edx, [ebp+arg_0]
mov	[esp+2Ch+var_8], eax
mov	[esp+2Ch+var_4], ecx
mov	ecx, [ebp+arg_4]
lea	eax, [esp+2Ch+var_10]
push	eax
push	ecx
push	edx
mov	ecx, ebx
mov	[esp+38h+var_15], 0
call	sub_647250
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6472AC:
mov	esi, [ebx+4]
mov	ecx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	edi, esi
sub	edi, ecx
sar	edi, 4
cmp	edi, eax
jbe	short loc_64731A
shl	eax, 4
mov	edi, esi
sub	edi, eax
mov	[esp+28h+var_14], eax
cmp	esi, edi
jz	short loc_6472E5
mov	eax, esi
sub	eax, edi
push	eax
push	edi
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [ebp+arg_0]
mov	eax, [esp+34h+var_14]
add	esp, 0Ch

loc_6472E5:
add	[ebx+4], eax
sub	edi, ecx
test	edi, edi
jle	short loc_647302
push	edi
push	ecx
sub	esi, edi
push	esi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [ebp+arg_0]
mov	eax, [esp+34h+var_14]
add	esp, 0Ch

loc_647302:
lea	edx, [eax+ecx]
push	ecx
mov	ecx, [ebp+arg_8]
call	sub_647910
add	esp, 4
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_64731A:
sub	eax, edi
shl	eax, 4
add	eax, esi
push	edx
mov	ecx, esi	; void *
mov	[esp+2Ch+var_14], eax
call	sub_647E30
mov	eax, [ebp+arg_0]
mov	ecx, [esp+2Ch+var_14]
add	esp, 4
mov	[ebx+4], ecx
cmp	esi, eax
jz	short loc_647350
mov	edx, esi
sub	edx, eax
push	edx
push	eax
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [ebp+arg_0]
add	esp, 0Ch

loc_647350:
mov	ecx, [ebp+arg_8]
shl	edi, 4
add	[ebx+4], edi
push	eax
mov	edx, esi
call	sub_647910
add	esp, 4
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_647250 endp

align 10h



sub_647370 proc	near

var_D= byte ptr	-0Dh
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_4]
push	edi
mov	edi, eax
mov	eax, [esp+1Ch+arg_0]
mov	[esp+1Ch+arg_4], 0
cmp	eax, [edi+8]
jnz	loc_64746A
cmp	dword ptr [edi+10h], 0
jnz	short loc_6473B3

loc_647397:
push	ebp
lea	eax, [esp+20h+var_C]
push	eax
mov	eax, edi
call	sub_647A10
mov	ecx, [eax]
mov	[esi], ecx
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6473B3:
push	eax
call	sub_5E3B60
mov	edx, [ebp+0]
add	esp, 4
cmp	edx, [eax]
mov	eax, [esp+1Ch+arg_0]
jge	short loc_6473DE
push	0
push	eax
push	eax
push	esi
mov	eax, ebp
call	sub_647940
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6473DE:
push	eax
call	sub_5E3B60
mov	ecx, [eax]
add	esp, 4
cmp	ecx, [ebp+0]
jl	short loc_6473FF
mov	edx, [esp+1Ch+arg_0]
mov	[esi], edx
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6473FF:
mov	eax, [esp+1Ch+arg_0]
push	eax
call	sub_77E2F0
mov	ebx, eax
add	esp, 4
cmp	ebx, edi
jnz	short loc_64742D

loc_647412:
mov	eax, [esp+1Ch+arg_0]
push	eax
push	0
push	eax
push	esi
mov	eax, ebp
call	sub_647940
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_64742D:
push	ebx
call	sub_5E3B60
mov	ecx, [ebp+0]
add	esp, 4
cmp	ecx, [eax]
jge	loc_647397

loc_647441:
mov	edx, [esp+1Ch+arg_0]
push	edx
call	sub_5E3B10
add	esp, 4
cmp	dword ptr [eax], 0
jz	short loc_647412
push	0
push	ebx
push	ebx
push	esi
mov	eax, ebp
call	sub_647940
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_64746A:
cmp	eax, edi
jnz	short loc_6474AF
mov	ecx, edi
call	sub_5E10C0
mov	eax, [eax]
push	eax
call	sub_5E3B60
mov	edx, [eax]
add	esp, 4
cmp	edx, [ebp+0]
jge	loc_647397
mov	ecx, edi
call	sub_5E10C0
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [eax]
push	ecx
push	0
push	edx
push	esi
mov	eax, ebp
call	sub_647940
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6474AF:
push	eax
call	sub_77E330
mov	edx, [esp+20h+arg_0]
push	edx
mov	ebx, eax
call	sub_5E3B60
mov	ecx, [ebp+0]
add	esp, 8
cmp	ecx, [eax]
setl	al
mov	byte ptr [esp+1Ch+arg_4], al
test	al, al
jz	short loc_647524
push	ebx
call	sub_5E3B60
mov	edx, [eax]
add	esp, 4
cmp	edx, [ebp+0]
jge	short loc_647524
push	ebx
call	sub_5E3B10
add	esp, 4
cmp	dword ptr [eax], 0
jnz	short loc_647509
push	ebx
push	0
push	ebx
push	esi
mov	eax, ebp
call	sub_647940
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_647509:
mov	eax, [esp+1Ch+arg_0]
push	0
push	eax
push	eax
push	esi
mov	eax, ebp
call	sub_647940
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_647524:
mov	eax, [esp+1Ch+arg_0]
push	eax
call	sub_77E2F0
mov	ebx, eax
mov	al, byte ptr [esp+20h+arg_4]
add	esp, 4
test	al, al
setz	cl
test	al, al
jnz	short loc_647581
mov	ecx, [esp+1Ch+arg_0]
push	ecx
call	sub_5E3B60
mov	edx, [eax]
add	esp, 4
cmp	edx, [ebp+0]
setl	al
mov	[esp+1Ch+var_D], al
test	al, al
jz	short loc_647585
cmp	ebx, edi
jz	loc_647441
push	ebx
call	sub_5E3B60
mov	ecx, [ebp+0]
add	esp, 4
cmp	ecx, [eax]
jl	loc_647441
mov	al, byte ptr [esp+1Ch+arg_4]
mov	cl, [esp+1Ch+var_D]

loc_647581:
cmp	al, cl
jnz	short loc_647596

loc_647585:
mov	eax, [esp+1Ch+arg_0]
mov	[esi], eax
mov	eax, esi
pop	edi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_647596:
push	ebp
lea	ecx, [esp+20h+var_C]
push	ecx
mov	eax, edi
call	sub_647A10
mov	edx, [eax]
pop	edi
pop	ebp
mov	[esi], edx
mov	eax, esi
pop	ebx
add	esp, 10h
retn	8
sub_647370 endp

align 10h



sub_6475C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
mov	ebp, [esp+10h+arg_8]
push	esi
push	edi
mov	edi, eax
mov	eax, [esp+18h+arg_4]
mov	[esp+18h+arg_8], 0
cmp	eax, [edi+8]
jnz	loc_647705
cmp	dword ptr [edi+10h], 0
jnz	short loc_647609
lea	eax, [esp+18h+var_8]
push	eax
push	edi
mov	eax, ebp
call	sub_647BD0
mov	ecx, [eax]
mov	[ebx], ecx
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_647609:
push	eax
call	sub_5E3B60
mov	ecx, [ebp+0]
mov	edx, [eax]
add	esp, 4
cmp	edx, ecx
jg	short loc_647625
jl	short loc_647641
mov	edx, [ebp+4]
cmp	edx, [eax+4]
jge	short loc_647641

loc_647625:
mov	eax, [esp+18h+arg_4]
push	0
push	eax
push	eax
push	ebx
mov	eax, ebp
call	sub_647B00
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_647641:
mov	eax, [esp+18h+arg_4]
push	eax
call	sub_5E3B60
mov	ecx, [eax]
mov	edx, [ebp+0]
add	esp, 4
cmp	edx, ecx
jg	short loc_647673
jl	short loc_647661
mov	ecx, [eax+4]
cmp	ecx, [ebp+4]
jl	short loc_647673

loc_647661:
mov	edx, [esp+18h+arg_4]
mov	[ebx], edx
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_647673:
mov	eax, [esp+18h+arg_4]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[esp+18h+arg_8], eax
cmp	eax, edi
jnz	short loc_6476A4

loc_647688:
mov	eax, [esp+18h+arg_4]
push	eax
push	0
push	eax
push	ebx
mov	eax, ebp
call	sub_647B00
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_6476A4:
push	eax
call	sub_5E3B60
add	esp, 4
mov	edx, eax
mov	esi, ebp
call	sub_646D00
test	al, al
jz	short loc_6476E8
mov	ecx, [esp+18h+arg_4]
push	ecx
call	sub_5E3B10
add	esp, 4
cmp	dword ptr [eax], 0
jz	short loc_647688
mov	eax, [esp+18h+arg_8]
push	0
push	eax
push	eax
push	ebx
mov	eax, ebp
call	sub_647B00
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_6476E8:
lea	edx, [esp+18h+var_8]
push	edx
push	edi
mov	eax, ebp
call	sub_647BD0
mov	eax, [eax]
mov	[ebx], eax
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_647705:
cmp	eax, edi
jnz	short loc_64775B
mov	ecx, edi
call	sub_5E10C0
mov	eax, [eax]
push	eax
call	sub_5E3B60
mov	ecx, [eax]
mov	edx, [ebp+0]
add	esp, 4
cmp	edx, ecx
jg	short loc_647736
jl	loc_647899
mov	ecx, [eax+4]
cmp	ecx, [ebp+4]
jge	loc_647899

loc_647736:
mov	ecx, edi
call	sub_5E10C0
mov	edx, [esp+18h+arg_4]
mov	eax, [eax]
push	edx
push	0
push	eax
push	ebx
mov	eax, ebp
call	sub_647B00
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_64775B:
push	eax
call	sub_77E330
mov	esi, eax
mov	eax, [esp+1Ch+arg_4]
push	eax
call	sub_5E3B60
mov	ecx, [ebp+0]
mov	edx, [eax]
add	esp, 8
cmp	edx, ecx
jg	loc_647828
jl	short loc_64778B
mov	ecx, [ebp+4]
cmp	ecx, [eax+4]
jl	loc_647828

loc_64778B:
mov	byte ptr [esp+18h+arg_8], 0

loc_647790:
mov	eax, [esp+18h+arg_4]
push	eax
call	sub_77E2F0
mov	[esp+1Ch+var_8], eax
mov	al, byte ptr [esp+1Ch+arg_8]
add	esp, 4
test	al, al
setz	cl
test	al, al
jnz	loc_647883
mov	ecx, [esp+18h+arg_4]
push	ecx
call	sub_5E3B60
add	esp, 4
mov	edx, ebp
mov	esi, eax
call	sub_646D00
mov	byte ptr [esp+18h+arg_0], al
test	al, al
jz	loc_647887
mov	esi, [esp+18h+var_8]
cmp	esi, edi
jz	short loc_6477FA
push	esi
call	sub_5E3B60
add	esp, 4
mov	edx, eax
mov	esi, ebp
call	sub_646D00
test	al, al
jz	loc_64787B
mov	esi, [esp+18h+var_8]

loc_6477FA:
mov	edx, [esp+18h+arg_4]
push	edx
call	sub_5E3B10
add	esp, 4
cmp	dword ptr [eax], 0
jz	loc_647688
push	0
push	esi
push	esi
push	ebx
mov	eax, ebp
call	sub_647B00
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_647828:
push	esi
mov	byte ptr [esp+1Ch+arg_8], 1
call	sub_5E3B60
mov	ecx, [eax]
mov	edx, [ebp+0]
add	esp, 4
cmp	edx, ecx
jg	short loc_647851
jl	loc_647790
mov	edx, [eax+4]
cmp	edx, [ebp+4]
jge	loc_647790

loc_647851:
push	esi
call	sub_5E3B10
add	esp, 4
cmp	dword ptr [eax], 0
jnz	loc_647625
push	esi
push	0
push	esi
push	ebx
mov	eax, ebp
call	sub_647B00
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_64787B:
mov	al, byte ptr [esp+18h+arg_8]
mov	cl, byte ptr [esp+18h+arg_0]

loc_647883:
cmp	al, cl
jnz	short loc_647899

loc_647887:
mov	eax, [esp+18h+arg_4]
mov	[ebx], eax
mov	eax, ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_647899:
lea	ecx, [esp+18h+var_8]
push	ecx
push	edi
mov	eax, ebp
call	sub_647BD0
mov	edx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], edx
mov	eax, ebx
pop	ebx
add	esp, 8
retn	0Ch
sub_6475C0 endp

align 10h



sub_6478C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	ecx, [eax+4]
sub	ecx, [eax]
mov	edx, [esp+4+arg_0]
sar	ecx, 4
mov	eax, 0FFFFFFFh
sub	eax, ecx
mov	[esp+4+var_4], ecx
cmp	edx, eax
jbe	short loc_6478E5
push	offset aVector	; "vector"
call	sub_77EC70

loc_6478E5:
lea	eax, [esp+4+var_4]
cmp	edx, ecx
jb	short loc_6478F0
lea	eax, [esp+4+arg_0]

loc_6478F0:
mov	eax, [eax]
add	eax, ecx
cmp	eax, 0FFFFFFFh
ja	short loc_6478FF
cmp	eax, ecx
jnb	short loc_647904

loc_6478FF:
mov	eax, 0FFFFFFFh

loc_647904:
pop	ecx
retn	4
sub_6478C0 endp

align 10h



sub_647910 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	edx, eax
sar	edx, 4
test	edx, edx
jle	short locret_64793F
push	esi
mov	edi, edi

loc_647920:
mov	esi, [ecx]
mov	[eax], esi
mov	esi, [ecx+4]
mov	[eax+4], esi
mov	esi, [ecx+8]
mov	[eax+8], esi
mov	esi, [ecx+0Ch]
mov	[eax+0Ch], esi
dec	edx
add	eax, 10h
test	edx, edx
jg	short loc_647920
pop	esi

locret_64793F:
retn
sub_647910 endp




sub_647940 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
mov	[esp+0Ch+arg_4], 0
cmp	ebx, edi
jnz	short loc_647978
push	esi
push	edi
call	sub_647CD0
push	ebx
mov	esi, eax
call	sub_5E3B50
add	esp, 4
mov	ecx, edi
mov	[eax], esi
call	sub_5E1080
mov	[eax], esi
jmp	short loc_6479DC

loc_647978:
cmp	[esp+0Ch+arg_C], 0
jnz	short loc_6479BD
cmp	[esp+0Ch+arg_8], 0
jnz	short loc_647995
push	ebx
call	sub_5E3B60
mov	ecx, [esi]
add	esp, 4
cmp	ecx, [eax]
jge	short loc_6479BD

loc_647995:
push	esi
push	edi
call	sub_647CD0
push	ebx
mov	esi, eax
call	sub_5E3B50
add	esp, 4
mov	ecx, edi
mov	[eax], esi
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
cmp	ebx, [eax]
jnz	short loc_6479E5
mov	ecx, edi
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
jmp	short loc_6479E3

loc_6479BD:
push	esi
push	edi
call	sub_647CD0
push	ebx
mov	esi, eax
call	sub_5E3B10
add	esp, 4
mov	ecx, edi
mov	[eax], esi
call	sub_5E10C0
cmp	ebx, [eax]
jnz	short loc_6479E5

loc_6479DC:
mov	ecx, edi
call	sub_5E10C0

loc_6479E3:
mov	[eax], esi

loc_6479E5:
lea	edx, [edi+4]
push	edx
push	esi
mov	[esi+4], ebx
call	sub_77E4A0
inc	dword ptr [edi+10h]
add	esp, 8
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	10h
sub_647940 endp

align 10h



sub_647A10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, eax
mov	ecx, edi
mov	ebp, edi
call	sub_5E1080
mov	esi, [eax]
mov	al, 1
test	esi, esi
jz	short loc_647A68
jmp	short loc_647A30
align 10h

loc_647A30:
push	esi
mov	ebp, esi
call	sub_5E3B60
mov	ecx, [esp+14h+arg_4]
mov	edx, [ecx]
add	esp, 4
cmp	edx, [eax]
push	esi
setl	al
mov	byte ptr [esp+14h+arg_0], al
test	al, al
jz	short loc_647A56
call	sub_5E3B50
jmp	short loc_647A5B

loc_647A56:
call	sub_5E3B10

loc_647A5B:
mov	esi, [eax]
add	esp, 4
test	esi, esi
jnz	short loc_647A30
mov	al, byte ptr [esp+10h+arg_0]

loc_647A68:
mov	[esp+10h+arg_0], ebp
test	al, al
jz	short loc_647AAB
mov	ecx, edi
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
cmp	ebp, [eax]
jnz	short loc_647A9E
push	0
push	ebp
push	ebp
lea	eax, [esp+1Ch+arg_4]
push	eax
mov	eax, [esp+20h+arg_4]
call	sub_647940
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [ebx+4], 1
mov	[ebx], ecx
mov	eax, ebx
pop	ebx
retn	8

loc_647A9E:
push	ebp
call	sub_77E330
add	esp, 4
mov	[esp+10h+arg_0], eax

loc_647AAB:
mov	edx, [esp+10h+arg_0]
push	edx
call	sub_5E3B60
mov	ecx, [eax]
mov	eax, [esp+14h+arg_4]
add	esp, 4
cmp	ecx, [eax]
jge	short loc_647AE1
push	0
push	esi
push	ebp
lea	edx, [esp+1Ch+arg_4]
push	edx
call	sub_647940
mov	eax, [eax]
pop	edi
pop	esi
mov	[ebx], eax
pop	ebp
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_647AE1:
mov	ecx, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [ebx+4], 0
mov	[ebx], ecx
mov	eax, ebx
pop	ebx
retn	8
sub_647A10 endp

align 10h



sub_647B00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, eax
mov	[esp+0Ch+arg_4], 0
cmp	ebx, edi
jnz	short loc_647B38
push	esi
push	edi
call	sub_647D80
push	ebx
mov	esi, eax
call	sub_5E3B50
add	esp, 4
mov	ecx, edi
mov	[eax], esi
call	sub_5E1080
mov	[eax], esi
jmp	short loc_647BA8

loc_647B38:
cmp	[esp+0Ch+arg_C], 0
jnz	short loc_647B89
cmp	[esp+0Ch+arg_8], 0
jnz	short loc_647B61
push	ebx
call	sub_5E3B60
mov	ecx, [esi]
mov	edx, [eax]
add	esp, 4
cmp	edx, ecx
jg	short loc_647B61
jl	short loc_647B89
mov	ecx, [esi+4]
cmp	ecx, [eax+4]
jge	short loc_647B89

loc_647B61:
push	esi
push	edi
call	sub_647D80
push	ebx
mov	esi, eax
call	sub_5E3B50
add	esp, 4
mov	ecx, edi
mov	[eax], esi
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
cmp	ebx, [eax]
jnz	short loc_647BB1
mov	ecx, edi
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
jmp	short loc_647BAF

loc_647B89:
push	esi
push	edi
call	sub_647D80
push	ebx
mov	esi, eax
call	sub_5E3B10
add	esp, 4
mov	ecx, edi
mov	[eax], esi
call	sub_5E10C0
cmp	ebx, [eax]
jnz	short loc_647BB1

loc_647BA8:
mov	ecx, edi
call	sub_5E10C0

loc_647BAF:
mov	[eax], esi

loc_647BB1:
lea	edx, [edi+4]
push	edx
push	esi
mov	[esi+4], ebx
call	sub_77E4A0
inc	dword ptr [edi+10h]
add	esp, 8
mov	[ebp+0], esi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	10h
sub_647B00 endp

align 10h



sub_647BD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	esi
push	edi
mov	edi, eax
mov	ebp, ecx
call	sub_5E1080
mov	esi, [eax]
mov	al, 1
test	esi, esi
jz	short loc_647C25
lea	ecx, [ecx+0]

loc_647BF0:
push	esi
mov	ebp, esi
call	sub_5E3B60
mov	ecx, [edi]
mov	edx, [eax]
add	esp, 4
cmp	edx, ecx
jg	short loc_647C5F
jl	short loc_647C0D
mov	ecx, [edi+4]
cmp	ecx, [eax+4]
jl	short loc_647C5F

loc_647C0D:
push	esi
mov	byte ptr [esp+14h+arg_4], 0
call	sub_5E3B10

loc_647C18:
mov	esi, [eax]
add	esp, 4
test	esi, esi
jnz	short loc_647BF0
mov	al, byte ptr [esp+10h+arg_4]

loc_647C25:
mov	[esp+10h+arg_4], ebp
test	al, al
jz	short loc_647C79
mov	ecx, [esp+10h+arg_0]
call	?raw_name@type_info@@QBEPBDXZ ;	type_info::raw_name(void)
cmp	ebp, [eax]
jnz	short loc_647C6C
push	0
push	ebp
push	ebp
lea	edx, [esp+1Ch+arg_0]
mov	eax, edi
mov	edi, [esp+1Ch+arg_0]
push	edx
call	sub_647B00
mov	eax, [eax]
pop	edi
pop	esi
mov	[ebx], eax
pop	ebp
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_647C5F:
push	esi
mov	byte ptr [esp+14h+arg_4], 1
call	sub_5E3B50
jmp	short loc_647C18

loc_647C6C:
push	ebp
call	sub_77E330
add	esp, 4
mov	[esp+10h+arg_4], eax

loc_647C79:
mov	ecx, [esp+10h+arg_4]
push	ecx
call	sub_5E3B60
mov	ecx, [eax]
mov	edx, [edi]
add	esp, 4
cmp	edx, ecx
jg	short loc_647C98
jl	short loc_647CBD
mov	edx, [eax+4]
cmp	edx, [edi+4]
jge	short loc_647CBD

loc_647C98:
push	0
push	esi
push	ebp
lea	eax, [esp+1Ch+arg_0]
push	eax
mov	eax, edi
mov	edi, [esp+20h+arg_0]
call	sub_647B00
mov	ecx, [eax]
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
mov	byte ptr [ebx+4], 1
mov	eax, ebx
pop	ebx
retn	8

loc_647CBD:
mov	edx, [esp+10h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	[ebx], edx
mov	byte ptr [ebx+4], 0
mov	eax, ebx
pop	ebx
retn	8
sub_647BD0 endp



; Attributes: bp-based frame

sub_647CD0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset sub_1301360
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	[ebp+var_14], 18h
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	esi, eax
mov	[ebp+var_18], esi
mov	[ebp+var_4], 0
lea	ecx, [esi+10h]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_647F90
add	esp, 4
mov	[ebp+var_4], 0FFFFFFFFh
push	esi
call	sub_5E3B50
mov	dword ptr [eax], 0
push	esi
call	sub_5E3B10
add	esp, 8
mov	dword ptr [eax], 0
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_647CD0 endp



; Attributes: noreturn

sub_647D61 proc	near
push	1		; int
mov	edx, [ebp-18h]
push	edx		; void *
mov	ecx, [ebp+8]
call	sub_5E3B20
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_647D61 endp

align 10h


; Attributes: bp-based frame

sub_647D80 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset loc_1304BF0
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	[ebp+var_14], 54h
lea	eax, [ebp+var_14]
push	eax
call	sub_77E150
add	esp, 4
mov	esi, eax
mov	[ebp+var_18], esi
mov	[ebp+var_4], 0
lea	ecx, [esi+10h]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_647FF0
add	esp, 4
mov	[ebp+var_4], 0FFFFFFFFh
push	esi
call	sub_5E3B50
mov	dword ptr [eax], 0
push	esi
call	sub_5E3B10
add	esp, 8
mov	dword ptr [eax], 0
mov	eax, esi
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_647D80 endp



; Attributes: noreturn

sub_647E11 proc	near
push	1		; int
mov	edx, [ebp-18h]
push	edx		; void *
mov	ecx, [ebp+8]
call	sub_5E3B70
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_647E11 endp

align 10h



; int __fastcall sub_647E30(void *, int)
sub_647E30 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, eax
mov	edi, ecx
sub	esi, edi
sar	esi, 4
test	esi, esi
jle	short loc_647E71

loc_647E44:		; void *
push	edi
push	10h		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
test	eax, eax
jz	short loc_647E69
mov	ecx, [ebx]
mov	[eax], ecx
mov	edx, [ebx+4]
mov	[eax+4], edx
mov	ecx, [ebx+8]
mov	[eax+8], ecx
mov	edx, [ebx+0Ch]
mov	[eax+0Ch], edx

loc_647E69:
dec	esi
add	edi, 10h
test	esi, esi
jg	short loc_647E44

loc_647E71:
pop	edi
pop	esi
pop	ebx
retn
sub_647E30 endp

align 10h



sub_647E80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [eax+4]
push	edi
mov	edi, eax
test	esi, esi
jz	short loc_647EB9

loc_647E90:
push	esi
call	sub_5E3B60
mov	eax, [eax]
add	esp, 4
cmp	eax, [ebx]
push	esi
jl	short loc_647EA9
mov	edi, esi
call	sub_5E3B50
jmp	short loc_647EAE

loc_647EA9:
call	sub_5E3B10

loc_647EAE:
mov	esi, [eax]
add	esp, 4
test	esi, esi
jnz	short loc_647E90
mov	eax, edi

loc_647EB9:
pop	edi
pop	esi
pop	ebx
retn	4
sub_647E80 endp

align 10h



sub_647EC0 proc	near
push	ebx
push	esi
mov	esi, [eax+4]
mov	ebx, eax
test	esi, esi
jz	short loc_647F06
jmp	short loc_647ED0
align 10h

loc_647ED0:
push	esi
call	sub_5E3B60
mov	ecx, [eax]
mov	edx, [edi]
add	esp, 4
cmp	edx, ecx
jg	short loc_647EF5
jl	short loc_647EEB
mov	eax, [eax+4]
cmp	eax, [edi+4]
jl	short loc_647EF5

loc_647EEB:
push	esi
mov	ebx, esi
call	sub_5E3B50
jmp	short loc_647EFB

loc_647EF5:
push	esi
call	sub_5E3B10

loc_647EFB:
mov	esi, [eax]
add	esp, 4
test	esi, esi
jnz	short loc_647ED0
mov	eax, ebx

loc_647F06:
pop	esi
pop	ebx
retn
sub_647EC0 endp

align 10h


; Attributes: bp-based frame

sub_647F10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset sub_12FFEE0
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], 0
sub	ecx, edx
sar	ecx, 2

loc_647F4D:
mov	[ebp+var_14], ecx
test	ecx, ecx
jle	short loc_647F74
test	eax, eax
jz	short loc_647F5C
mov	esi, [edx]
mov	[eax], esi

loc_647F5C:
add	edx, 4
mov	[ebp+arg_0], edx
add	eax, 4
mov	[ebp+var_18], eax
dec	ecx
jmp	short loc_647F4D

loc_647F6B:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_647F74:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_647F10 endp

align 10h



sub_647F90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_130B9E1
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, [esp+14h+arg_0]
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_647FCC
push	ecx
push	eax
call	sub_648060

loc_647FCC:
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_647F90 endp

align 10h



sub_647FF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_1304BCC
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, [esp+14h+arg_0]
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_4], 0
test	eax, eax
jz	short loc_648040
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
add	eax, 8
add	ecx, 8
push	eax
call	sub_646DD0
mov	byte ptr [esp+14h+var_4], 0

loc_648040:
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_647FF0 endp

align 10h



sub_648060 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_13013EB
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, [esp+14h+arg_4]
mov	esi, [esp+14h+arg_0]
mov	ecx, [eax]
mov	[esi], ecx
mov	eax, [eax+4]
mov	[esi+4], eax
test	eax, eax
jz	short loc_6480A1
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_6480A1:
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	8
sub_648060 endp

align 10h



sub_6480C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 24h
fld	dword ptr [ecx+20h]
fstp	[esp+24h+var_C]
fld	dword ptr [ecx+24h]
fstp	[esp+24h+var_8]
fld	dword ptr [ecx+28h]
fstp	[esp+24h+var_4]
fld	dword ptr [ecx+10h]
fstp	[esp+24h+var_18]
fld	dword ptr [ecx+14h]
fstp	[esp+24h+var_14]
fld	dword ptr [ecx+18h]
fstp	[esp+24h+var_10]
fld	dword ptr [ecx]
fstp	[esp+24h+var_24]
fld	dword ptr [ecx+4]
fstp	[esp+24h+var_20]
fld	dword ptr [ecx+8]
fstp	[esp+24h+var_1C]
fld	[esp+24h+var_24]
fstp	dword ptr [eax]
fld	[esp+24h+var_20]
fstp	dword ptr [eax+0Ch]
fld	[esp+24h+var_1C]
fstp	dword ptr [eax+18h]
fld	[esp+24h+var_18]
fstp	dword ptr [eax+4]
fld	[esp+24h+var_14]
fstp	dword ptr [eax+10h]
fld	[esp+24h+var_10]
fstp	dword ptr [eax+1Ch]
fld	[esp+24h+var_C]
fstp	dword ptr [eax+8]
fld	[esp+24h+var_8]
fstp	dword ptr [eax+14h]
fld	[esp+24h+var_4]
fstp	dword ptr [eax+20h]
add	esp, 24h
retn
sub_6480C0 endp

align 10h



sub_648150 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_1308468
mov	eax, large fs:0
push	eax
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	esi, [esp+14h+arg_0]
push	esi
call	sub_645490
mov	ecx, [esp+14h+arg_4]
xor	eax, eax
mov	[esp+14h+var_4], eax
fldz
mov	dword ptr [esi+38h], offset off_15FBD70
mov	[esi+94h], eax
mov	[esi+98h], eax
mov	dword ptr [esi], offset	off_15FBD84
mov	dword ptr [esi+38h], offset off_15FBD94
mov	[esi+3Ch], ecx
fst	dword ptr [esi+9Ch]
fst	dword ptr [esi+0A0h]
fst	dword ptr [esi+0A4h]
fstp	dword ptr [esi+0A8h]
mov	[esi+90h], eax
mov	[esi+88h], eax
mov	[esi+8Ch], eax
mov	[esp+14h+var_4], 0FFFFFFFFh
mov	eax, esi
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 0Ch
retn	8
sub_648150 endp

align 10h



; int __thiscall sub_648200(void *, char)
sub_648200 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+90h]
push	eax		; void *
mov	dword ptr [esi], offset	off_15FBD84
mov	dword ptr [esi+38h], offset off_15FBD94
call	??_V@YAXPAX@Z	; operator delete[](void *)
mov	ecx, [esi+88h]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
mov	edx, [esi+8Ch]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 0Ch
mov	ecx, esi
call	sub_5DEE20
test	[esp+4+arg_0], 1
jz	short loc_64824E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_64824E:
mov	eax, esi
pop	esi
retn	4
sub_648200 endp

align 10h



sub_648260 proc	near
mov	eax, [esi+90h]
push	eax		; void *
mov	dword ptr [esi], offset	off_15FBD84
mov	dword ptr [esi+38h], offset off_15FBD94
call	??_V@YAXPAX@Z	; operator delete[](void *)
mov	ecx, [esi+88h]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
mov	edx, [esi+8Ch]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 0Ch
mov	ecx, esi
jmp	sub_5DEE20
sub_648260 endp

align 10h



sub_6482A0 proc	near

var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12FF470
mov	eax, large fs:0
push	eax
sub	esp, 8
push	ebx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	ecx, [esi+3Ch]
mov	eax, [ecx]
mov	edx, [eax+30h]
call	edx
push	eax
lea	ecx, [esp+20h+var_10]
call	sub_457E80
lea	ecx, [esp+1Ch+var_10]
mov	[esp+1Ch+var_4], 0
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+40h]
call	eax
lea	ecx, [esp+1Ch+var_10]
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	sub_5E2EB0
mov	ecx, [esi+3Ch]
mov	edx, [ecx]
mov	eax, [edx+38h]
call	eax
push	eax
lea	ecx, [esp+20h+var_14]
call	sub_457E80
lea	ecx, [esp+1Ch+var_14]
mov	[esp+1Ch+var_4], 1
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+30h]
call	eax
lea	ecx, [esp+1Ch+var_14]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+1Ch+arg_4]
mov	edx, [eax]
mov	edx, [edx+18h]
push	0
push	0
push	0
push	ecx
mov	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, eax
call	edx
lea	ecx, [esp+1Ch+var_14]
mov	bl, al
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	sub_5E2EB0
mov	al, bl
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebx
add	esp, 14h
retn	8
sub_6482A0 endp

align 10h


; Attributes: bp-based frame

sub_648380 proc	near

var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	byte ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	byte ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_B0=	byte ptr -0B0h
var_AC=	byte ptr -0ACh
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
push	0FFFFFFFFh
push	offset loc_130C0A1
mov	eax, large fs:0
push	eax
sub	esp, 0E0h
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0FCh+var_C]
mov	large fs:0, eax
mov	ebx, [ebp+arg_0]
mov	ecx, [ebx+3Ch]
mov	eax, [ecx]
mov	edx, [eax+38h]
call	edx
push	eax
lea	ecx, [esp+100h+var_E4]
call	sub_457E80
xor	esi, esi
mov	[esp+0FCh+var_4], esi
mov	ecx, [ebx+3Ch]
mov	eax, [ecx]
mov	edx, [eax+6Ch]
call	edx
mov	[esp+0FCh+var_D8], offset off_15FBD7C
mov	[esp+0FCh+var_D4], esi
mov	[esp+0FCh+var_D0], esi
mov	[esp+0FCh+var_CC], esi
mov	byte ptr [esp+0FCh+var_4], 1
mov	ecx, [ebx+3Ch]
mov	eax, [ecx]
mov	eax, [eax+64h]
lea	edx, [esp+0FCh+var_D8]
push	edx
mov	edx, [esp+100h+var_E4]
push	edx
call	eax
mov	edx, [ebx]
mov	edx, [edx+8]
lea	eax, [esp+0FCh+var_D8]
push	eax
mov	ecx, ebx
call	edx
mov	[ebx+0ACh], esi

loc_648420:
mov	eax, [esp+0FCh+var_D4]
push	eax
lea	ecx, [esp+100h+var_C4]
call	sub_457E80
mov	ecx, [esp+0FCh+var_C4]
mov	edx, [esp+0FCh+var_D0]
mov	[esp+0FCh+var_E0], ecx
push	edx
lea	ecx, [esp+100h+var_DC]
call	sub_457E80
lea	eax, [esp+0FCh+var_DC]
push	eax
lea	ecx, [esp+100h+var_E0]
call	sub_459680
test	al, al
jz	short loc_6484B3

loc_648456:
lea	ecx, [esp+0FCh+var_E0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_64848A
jmp	short loc_648470
align 10h

loc_648470:
mov	eax, [edi]
mov	ecx, [ebx+0ACh]
mov	edx, [ebx]
mov	edx, [edx+4]
push	esi
push	eax
push	ecx
mov	ecx, ebx
call	edx
inc	esi
cmp	esi, [edi+4]
jb	short loc_648470

loc_64848A:
lea	ecx, [esp+0FCh+var_E0]
call	sub_5E0770
mov	eax, [esp+0FCh+var_D0]
push	eax
lea	ecx, [esp+100h+var_DC]
call	sub_457E80
lea	ecx, [esp+0FCh+var_DC]
push	ecx
lea	ecx, [esp+100h+var_E0]
call	sub_459680
test	al, al
jnz	short loc_648456

loc_6484B3:
lea	ecx, [esp+0FCh+var_C0]
call	sub_5E2640
lea	ecx, [esp+0FCh+var_E4]
mov	byte ptr [esp+0FCh+var_4], 2
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	edx, [edx+0ACh]
lea	ecx, [esp+0FCh+var_C0]
push	ecx
mov	ecx, eax
call	edx
lea	eax, [esp+0FCh+var_B0]
push	eax
lea	ecx, [esp+100h+var_C0]
call	sub_5E26A0
mov	ecx, [eax]
lea	edx, [esp+0FCh+var_C8]
mov	[esp+0FCh+var_E8], ecx
push	edx
lea	ecx, [esp+100h+var_C0]
call	sub_5E26D0
push	eax
lea	ecx, [esp+100h+var_E8]
call	sub_459680
test	al, al
jz	loc_6485E9

loc_648512:
lea	ecx, [esp+0FCh+var_E4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
mov	esi, [edi]
lea	ecx, [esp+0FCh+var_E8]
add	esi, 0B0h
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	eax, [esi]
lea	ecx, [esp+0FCh+var_78]
push	ecx
push	edx
mov	ecx, edi
call	eax
fld1
fstp	[esp+0FCh+var_7C]
lea	ecx, [esp+0FCh+var_78]
fld	[esp+0FCh+var_48]
lea	eax, [esp+0FCh+var_34]
fstp	[esp+0FCh+var_88]
fld	[esp+0FCh+var_44]
fstp	[esp+0FCh+var_84]
fld	[esp+0FCh+var_40]
fstp	[esp+0FCh+var_80]
call	sub_6480C0
mov	esi, eax
mov	ecx, 9
lea	edi, [esp+0FCh+var_AC]
rep movsd
mov	ecx, 0Dh
lea	esi, [esp+0FCh+var_AC]
lea	edi, [ebx+40h]
rep movsd
mov	ecx, [ebx+3Ch]
mov	esi, [ecx]
lea	ecx, [esp+0FCh+var_E8]
add	esi, 74h
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	eax, [esi]
push	0FFFFh
push	0FFFFh
lea	ecx, [ebx+38h]
push	ecx
mov	ecx, [ebx+3Ch]
push	edx
call	eax
lea	ecx, [esp+0FCh+var_E8]
call	sub_5E0520
lea	ecx, [esp+0FCh+var_C8]
push	ecx
lea	ecx, [esp+100h+var_C0]
call	sub_5E26D0
push	eax
lea	ecx, [esp+100h+var_E8]
call	sub_459680
test	al, al
jnz	loc_648512

loc_6485E9:
lea	ecx, [esp+0FCh+var_C0]
mov	byte ptr [esp+0FCh+var_4], 1
call	sub_5E2680
mov	ecx, [ebx+3Ch]
mov	edx, [ecx]
mov	eax, [edx+6Ch]
call	eax
inc	dword ptr [ebx+0ACh]
cmp	dword ptr [ebx+0ACh], 3
jl	loc_648420
push	ebx
call	sub_646780
lea	ecx, [esp+0FCh+var_E4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+24h]
call	eax
mov	eax, [esp+0FCh+var_D4]
mov	[esp+0FCh+var_D8], offset off_15FBD7C
test	eax, eax
jz	short loc_648648
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_648648:
lea	ecx, [esp+0FCh+var_E4]
mov	[esp+0FCh+var_4], 0FFFFFFFFh
call	sub_5E2EB0
xor	al, al
mov	ecx, [esp+0FCh+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_648380 endp

align 10h



sub_648680 proc	near
mov	ecx, [eax+3Ch]
mov	edx, [ecx]
mov	edx, [edx+70h]
jmp	edx
sub_648680 endp

align 10h


; Attributes: bp-based frame

sub_648690 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 4Ch
push	ebx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+58h], 0
push	edi
jnz	loc_6487FF
cmp	dword ptr [esi+50h], 0
jnz	loc_6487FF
cmp	dword ptr [esi+54h], 0
jnz	loc_6487FF
mov	ecx, 0FFFFh
mov	[esp+58h+var_4C], ecx
lea	eax, [esp+58h+var_4C]
cmp	[ebp+arg_4], ecx
ja	short loc_6486D1
lea	eax, [ebp+arg_4]

loc_6486D1:
mov	ebx, [eax]
mov	[esp+58h+var_4C], ecx
lea	eax, [esp+58h+var_4C]
cmp	[ebp+arg_8], ecx
ja	short loc_6486E3
lea	eax, [ebp+arg_8]

loc_6486E3:
mov	edi, [eax]
mov	ecx, [esi+4]
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+58h+var_48]
push	edx
mov	edx, [ebp+arg_0]
push	edx
call	eax
fld	[esp+58h+var_48]
fstp	dword ptr [esi+64h]
fld	[esp+58h+var_44]
fstp	dword ptr [esi+68h]
fld	[esp+58h+var_40]
fstp	dword ptr [esi+6Ch]
fld	[esp+58h+var_3C]
fst	dword ptr [esi+70h]
fld1
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_648723
mov	al, 1
jmp	short loc_648725

loc_648723:
xor	al, al

loc_648725:
xor	ecx, ecx
test	al, al
setnz	cl
test	al, al
jz	short loc_648744
xor	eax, eax
cmp	[esi+74h], eax
jz	short loc_64873F
mov	[esi+5Ch], eax
mov	[esi+60h], eax
jmp	short loc_64875E

loc_64873F:
or	eax, 0FFFFFFFFh
jmp	short loc_648747

loc_648744:
mov	eax, [esi+74h]

loc_648747:
lea	edx, [esi+3Ch]
push	edx
push	ebx
push	edi
push	ecx
push	eax
lea	eax, [esi-38h]
push	eax
call	sub_645D60
mov	[esi+5Ch], edi
mov	[esi+60h], ebx

loc_64875E:
mov	eax, [ebp+arg_8]
xor	ecx, ecx
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
mov	edi, [ebp+arg_4]
mov	[esi+58h], eax
xor	ecx, ecx
add	esp, 4
mov	eax, edi
mov	edx, 3
mul	edx
seto	cl
xor	ebx, ebx
neg	ecx
or	ecx, eax
mov	eax, ecx
mov	ecx, 4
mul	ecx
seto	bl
neg	ebx
or	ebx, eax
push	ebx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
mov	[esi+50h], eax
xor	ecx, ecx
add	esp, 4
mov	eax, edi
mov	edx, 3
mul	edx
seto	cl
xor	ebx, ebx
neg	ecx
or	ecx, eax
mov	eax, ecx
mov	ecx, 4
mul	ecx
seto	bl
neg	ebx
or	ebx, eax
push	ebx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
mov	[esi+54h], eax
mov	edx, [esi+50h]
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	ecx, [esi+54h]
mov	[eax+4], ecx
mov	edx, [esi+58h]
mov	[eax+8], edx
add	esp, 4
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6487FF:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_648690 endp

align 10h



sub_648810 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch

sub	esp, 24h
push	ebp
push	edi
mov	edi, ecx
xor	ebp, ebp
xor	eax, eax
cmp	[edi+5Ch], ebp
jbe	short loc_648838

loc_648820:
mov	ecx, [edi+58h]
mov	dx, [ecx+eax*4]
add	dx, [edi+3Ch]
mov	ecx, [edi+40h]
mov	[ecx+eax*2], dx
inc	eax
cmp	eax, [edi+5Ch]
jb	short loc_648820

loc_648838:
mov	[esp+2Ch+var_24], ebp
cmp	[edi+60h], ebp
jbe	loc_64894F
push	ebx
push	esi
lea	ebx, [edi+8]
mov	[esp+34h+var_20], ebp
mov	edi, edi

loc_648850:
mov	eax, [edi+50h]
mov	esi, [edi+44h]
fld	dword ptr [eax+ebp]
add	eax, ebp
fstp	dword ptr [esi+ebp]
fld	dword ptr [eax+4]
add	esi, ebp
fstp	dword ptr [esi+4]
push	ebx
fld	dword ptr [eax+8]
mov	edx, esi
lea	eax, [esp+38h+var_C]
fstp	dword ptr [esi+8]
call	sub_41BA10
mov	edx, [eax]
mov	[esi], edx
mov	ecx, [eax+4]
mov	[esi+4], ecx
mov	edx, [eax+8]
mov	[esi+8], edx
mov	eax, [edi+54h]
mov	esi, [edi+48h]
fld	dword ptr [eax+ebp]
fstp	dword ptr [esi+ebp]
add	esi, ebp
fld	dword ptr [eax+ebp+4]
add	eax, ebp
fstp	dword ptr [esi+4]
fld	dword ptr [eax+8]
fstp	[esp+34h+var_1C]
fld	[esp+34h+var_1C]
fst	dword ptr [esi+8]
fld	dword ptr [ebx+4]
fmul	dword ptr [esi+4]
fld	dword ptr [esi]
fmul	dword ptr [ebx]
faddp	st(1), st
fld	st(1)
fmul	dword ptr [ebx+8]
faddp	st(1), st
fstp	[esp+34h+var_18]
mov	eax, [esp+34h+var_18]
fld	dword ptr [ebx+10h]
fmul	dword ptr [esi+4]
fld	dword ptr [ebx+0Ch]
fmul	dword ptr [esi]
faddp	st(1), st
fld	st(1)
fmul	dword ptr [ebx+14h]
faddp	st(1), st
fstp	[esp+34h+var_14]
mov	ecx, [esp+34h+var_14]
fld	dword ptr [esi+4]
fmul	dword ptr [ebx+1Ch]
fld	dword ptr [esi]
fmul	dword ptr [ebx+18h]
faddp	st(1), st
fld	dword ptr [ebx+20h]
mov	[esi], eax
fmulp	st(2), st
mov	[esi+4], ecx
faddp	st(1), st
fstp	[esp+34h+var_10]
mov	edx, [esp+34h+var_10]
mov	[esi+8], edx
call	sub_40F420
fstp	st
mov	eax, [edi+4Ch]
mov	edx, [edi+64h]
mov	ecx, [esp+34h+var_20]
add	eax, ecx
mov	[eax], edx
mov	edx, [edi+68h]
mov	[eax+4], edx
mov	edx, [edi+6Ch]
mov	[eax+8], edx
mov	edx, [edi+70h]
mov	[eax+0Ch], edx
mov	eax, [esp+34h+var_24]
inc	eax
mov	[esp+34h+var_24], eax
add	ecx, 10h
add	ebp, 0Ch
mov	[esp+34h+var_20], ecx
cmp	eax, [edi+60h]
jb	loc_648850
pop	esi
xor	ebp, ebp
pop	ebx

loc_64894F:
mov	eax, [edi+58h]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
mov	ecx, [edi+50h]
push	ecx		; void *
mov	[edi+58h], ebp
call	??_V@YAXPAX@Z	; operator delete[](void *)
mov	edx, [edi+54h]
push	edx		; void *
mov	[edi+50h], ebp
call	??_V@YAXPAX@Z	; operator delete[](void *)
mov	[edi+54h], ebp
add	esp, 0Ch
add	edi, 0FFFFFFC8h
push	edi
call	sub_645EE0
pop	edi
pop	ebp
add	esp, 24h
retn
sub_648810 endp

align 10h
; [00000015 BYTES: COLLAPSED FUNCTION type_info::~type_info(void). PRESS KEYPAD	"+" TO EXPAND]
align 10h



; int __thiscall sub_6489B0(void *, char)
sub_6489B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	dword ptr [esi], offset	off_15FBD7C
test	eax, eax
jz	short loc_6489C9
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_6489C9:
test	[esp+4+arg_0], 1
jz	short loc_6489D9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6489D9:
mov	eax, esi
pop	esi
retn	4
sub_6489B0 endp

align 10h



sub_6489E0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
Dst= dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_1308442
mov	eax, large fs:0
push	eax
sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+40h+arg_0]
mov	ecx, ebp
call	sub_455A00
cmp	eax, 10000h
jbe	short loc_648A20

loc_648A19:
xor	eax, eax
jmp	loc_648FF1

loc_648A20:
lea	ecx, [ebp+0Ch]
mov	[esp+40h+arg_0], ecx
call	sub_455A00
cmp	eax, 10000h
ja	short loc_648A19
mov	eax, [ebp+1Ch]
sub	eax, [ebp+18h]
lea	edi, [ebp+18h]
sar	eax, 4
mov	[esp+40h+var_14], edi
cmp	eax, 10000h
ja	short loc_648A19
mov	ecx, [ebp+28h]
sub	ecx, [ebp+24h]
lea	ebx, [ebp+24h]
sar	ecx, 3
mov	[esp+40h+var_20], ebx
cmp	ecx, 10000h
ja	short loc_648A19
lea	esi, [ebp+30h]
mov	ecx, esi
mov	[esp+40h+var_24], esi
call	sub_488180
cmp	eax, 30000h
ja	short loc_648A19
mov	ecx, ebp
call	sub_4A6B60
test	al, al
jnz	short loc_648A19
mov	edx, [esi]
cmp	edx, [esi+4]
jz	short loc_648A19
mov	ecx, esi
call	sub_488180
xor	edx, edx
mov	ecx, 3
div	ecx
test	edx, edx
jnz	loc_648A19
mov	esi, [esp+40h+arg_0]
mov	ecx, esi
call	sub_4A6B60
test	al, al
jnz	short loc_648AC8
mov	ecx, esi
call	sub_455A00
mov	ecx, ebp
mov	esi, eax
call	sub_455A00
cmp	esi, eax
jnz	loc_648A19

loc_648AC8:
mov	edx, [edi]
cmp	edx, [edi+4]
jz	short loc_648AE6
mov	esi, [edi+4]
sub	esi, edx
mov	ecx, ebp
sar	esi, 4
call	sub_455A00
cmp	esi, eax
jnz	loc_648A19

loc_648AE6:
mov	eax, [ebx]
cmp	eax, [ebx+4]
jz	short loc_648B04
mov	esi, [ebx+4]
sub	esi, eax
mov	ecx, ebp
sar	esi, 3
call	sub_455A00
cmp	esi, eax
jnz	loc_648A19

loc_648B04:
mov	ecx, ebp
call	sub_455A00
xor	ecx, ecx
mov	edx, 0Ch
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
add	esp, 4
mov	[esp+40h+var_18], eax
mov	esi, [esp+40h+arg_0]
mov	[esp+40h+var_4], 0
mov	ecx, esi
mov	[esp+40h+var_4], 0FFFFFFFFh
call	sub_4A6B60
test	al, al
jz	short loc_648B51
mov	[esp+40h+var_28], 0
jmp	short loc_648B8B

loc_648B51:
mov	ecx, esi
call	sub_455A00
xor	ecx, ecx
mov	esi, eax
mov	edx, 0Ch
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
add	esp, 4
mov	[esp+40h+Dst], eax
mov	[esp+40h+var_4], 1
mov	[esp+40h+var_4], 0FFFFFFFFh
mov	[esp+40h+var_28], eax

loc_648B8B:
mov	eax, [edi]
cmp	eax, [edi+4]
jnz	short loc_648B9A
xor	esi, esi
mov	[esp+40h+var_2C], esi
jmp	short loc_648BF3

loc_648B9A:
mov	esi, [edi+4]
sub	esi, eax
sar	esi, 4
xor	ecx, ecx
mov	eax, esi
mov	edx, 10h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
mov	ebx, eax
add	esp, 4
mov	[esp+40h+Dst], ebx
mov	[esp+40h+var_4], 2
test	ebx, ebx
jz	short loc_648BDF
push	offset sub_417270
push	esi
push	10h
push	ebx
call	sub_4078B0
jmp	short loc_648BE1

loc_648BDF:
xor	ebx, ebx

loc_648BE1:
mov	[esp+40h+var_2C], ebx
mov	esi, ebx
mov	ebx, [esp+40h+var_20]
mov	[esp+40h+var_4], 0FFFFFFFFh

loc_648BF3:
mov	eax, [ebx]
cmp	eax, [ebx+4]
jnz	short loc_648BFE
xor	ebx, ebx
jmp	short loc_648C35

loc_648BFE:
mov	eax, [ebx+4]
sub	eax, [ebx]
xor	ecx, ecx
sar	eax, 3
mov	edx, 8
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx
call	sub_1111070
add	esp, 4
mov	[esp+40h+Dst], eax
mov	[esp+40h+var_4], 3
mov	[esp+40h+var_4], 0FFFFFFFFh
mov	ebx, eax

loc_648C35:
mov	ecx, [esp+40h+var_24]
call	sub_488180
add	eax, eax
push	eax
call	sub_1227DA0
mov	[esp+44h+Dst], eax
mov	eax, [esp+44h+var_18]
add	esp, 4
push	eax		; Dst
mov	edi, ebp
call	sub_649050
mov	eax, [esp+40h+var_28]
test	eax, eax
jz	short loc_648C6B
mov	edi, [esp+40h+arg_0]
push	eax		; Dst
call	sub_649050

loc_648C6B:
test	esi, esi
jz	short loc_648C8C
mov	eax, [esp+40h+var_14]
mov	ecx, [eax]
mov	eax, [eax+4]
sub	eax, ecx
sar	eax, 4
shl	eax, 4
push	eax		; MaxCount
push	ecx		; Src
push	eax		; DstSize
push	esi		; Dst
call	_memcpy_s
add	esp, 10h

loc_648C8C:
test	ebx, ebx
jz	short loc_648CB0
mov	eax, [esp+40h+var_20]
mov	ecx, [eax]
mov	eax, [eax+4]
sub	eax, ecx
sar	eax, 3
add	eax, eax
add	eax, eax
add	eax, eax
push	eax		; MaxCount
push	ecx		; Src
push	eax		; DstSize
push	ebx		; Dst
call	_memcpy_s
add	esp, 10h

loc_648CB0:
mov	edi, [esp+40h+var_24]
mov	ecx, edi
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, edi
mov	esi, eax
call	sub_488180
mov	ecx, [esp+40h+Dst]
add	eax, eax
push	eax		; MaxCount
push	esi		; Src
push	eax		; DstSize
push	ecx		; Dst
call	_memcpy_s
push	0D4h
call	sub_11110D0
mov	esi, eax
add	esp, 14h
mov	[esp+40h+var_10], esi
mov	[esp+40h+var_4], 4
test	esi, esi
jz	short loc_648D3D
mov	edx, [esp+40h+Dst]
push	edx
mov	ecx, edi
call	sub_488180
mov	ecx, eax
mov	eax, 0AAAAAAABh
mul	ecx
mov	ecx, [esp+44h+var_2C]
mov	edi, edx
xor	edx, edx
shr	edi, 1
test	ebx, ebx
setnz	dl
push	0
movzx	eax, dx
mov	edx, [esp+48h+var_28]
push	eax
mov	eax, [esp+4Ch+var_18]
push	ebx
push	ecx
push	edx
push	eax
mov	ecx, ebp
call	sub_455A00
push	eax
call	sub_123B700
mov	edi, [esp+40h+var_24]
mov	ebx, eax
jmp	short loc_648D3F

loc_648D3D:
xor	ebx, ebx

loc_648D3F:
or	esi, 0FFFFFFFFh
mov	ecx, ebp
mov	[esp+40h+var_4], esi
call	sub_591AF0
mov	ecx, [esp+40h+arg_0]
call	sub_591AF0
mov	ecx, [esp+40h+var_14]
push	ecx
call	sub_649010
mov	edx, [esp+40h+var_20]
push	edx
call	sub_649010
mov	ecx, edi
call	sub_591AF0
mov	edi, 1
cmp	[esp+40h+arg_4], edi
push	1Ch
setz	byte ptr [esp+44h+arg_0]
call	sub_11110D0
add	esp, 4
mov	[esp+40h+var_10], eax
mov	[esp+40h+var_4], 5
test	eax, eax
jz	short loc_648DA2
mov	ecx, eax
call	sub_417B70
jmp	short loc_648DA4

loc_648DA2:
xor	eax, eax

loc_648DA4:
mov	[esp+40h+var_4], esi
mov	[esp+40h+arg_4], eax
test	eax, eax
jz	short loc_648DBA
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_648DBA:
mov	[esp+40h+var_4], 6
mov	eax, [esp+40h+arg_4]
push	eax
mov	ecx, ebx
call	sub_41EB90
lea	ecx, [esp+40h+arg_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	cx, [eax+18h]
mov	edx, 0FFEFh
and	cx, dx
or	cx, 20h
mov	[eax+18h], cx
push	edi
lea	ecx, [esp+44h+arg_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, eax
call	sub_417B40
lea	eax, [esp+40h+arg_4]
mov	[esp+40h+var_4], esi
call	sub_40ABB0
push	1Ch
call	sub_11110D0
add	esp, 4
mov	[esp+40h+arg_4], eax
mov	[esp+40h+var_4], 7
test	eax, eax
jz	short loc_648E2E
mov	esi, eax
call	sub_427640
mov	esi, eax
jmp	short loc_648E30

loc_648E2E:
xor	esi, esi

loc_648E30:
or	ebp, 0FFFFFFFFh
mov	[esp+40h+var_4], ebp
mov	[esp+40h+arg_4], esi
test	esi, esi
jz	short loc_648E49
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_648E49:
push	esi
mov	ecx, ebx
mov	[esp+44h+var_4], 8
call	sub_41EB90
mov	ecx, 0FFFEh
and	[esi+18h], cx
lea	eax, [esp+40h+arg_4]
mov	[esp+40h+var_4], ebp
call	sub_40ABB0
push	1Ch
call	sub_11110D0
add	esp, 4
mov	[esp+40h+arg_4], eax
mov	[esp+40h+var_4], 9
test	eax, eax
jz	short loc_648E94
mov	ecx, eax
call	sub_416ED0
mov	esi, eax
jmp	short loc_648E96

loc_648E94:
xor	esi, esi

loc_648E96:
push	esi
mov	ecx, ebx
mov	[esp+44h+var_4], ebp
call	sub_41EB90
mov	dx, [esi+18h]
mov	eax, 0E0EDh
and	dx, ax
mov	ecx, 0EDh
or	dx, cx
push	5Ch
mov	[esi+18h], dx
call	sub_11110D0
add	esp, 4
mov	[esp+40h+var_10], eax
mov	[esp+40h+var_4], 0Ah
test	eax, eax
jz	short loc_648EDD
mov	esi, eax
call	sub_1273EC0
jmp	short loc_648EDF

loc_648EDD:
xor	eax, eax

loc_648EDF:
mov	[esp+40h+var_4], ebp
mov	[esp+40h+arg_4], eax
test	eax, eax
jz	short loc_648EF5
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_648EF5:
mov	[esp+40h+var_4], 0Bh
mov	edx, [esp+40h+arg_4]
push	edx
mov	ecx, ebx
call	sub_41EB90
lea	ecx, [esp+40h+arg_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, dword_17EE13C
mov	[eax+1Ch], ecx
mov	edx, dword_17EE140
mov	[eax+20h], edx
mov	ecx, dword_17EE144
add	[eax+54h], edi
mov	[eax+24h], ecx
lea	ecx, [esp+40h+arg_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, dword_17EE13C
mov	[eax+28h], edx
mov	ecx, dword_17EE140
mov	[eax+2Ch], ecx
mov	edx, dword_17EE144
add	[eax+54h], edi
lea	ecx, [esp+40h+arg_4]
mov	[eax+30h], edx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ecx, dword_1889A70
mov	[eax+34h], ecx
mov	edx, dword_1889A74
mov	[eax+38h], edx
mov	ecx, dword_1889A78
add	[eax+54h], edi
mov	[eax+3Ch], ecx
lea	ecx, [esp+40h+arg_4]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	edx, dword_1889A70
mov	[eax+40h], edx
mov	ecx, dword_1889A74
mov	[eax+44h], ecx
mov	edx, dword_1889A78
add	[eax+54h], edi
lea	ecx, [esp+40h+arg_4]
mov	[eax+48h], edx
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
fld	ds:flt_15AACC4
add	[eax+54h], edi
fstp	dword ptr [eax+4Ch]
cmp	byte ptr [esp+40h+arg_0], 0
jz	short loc_648FC9
fld	ds:flt_15FCF34
jmp	short loc_648FCB

loc_648FC9:
fld1

loc_648FCB:
lea	ecx, [esp+40h+arg_4]
fstp	[esp+40h+arg_0]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
fld	[esp+40h+arg_0]
add	[eax+54h], edi
fstp	dword ptr [eax+50h]
lea	eax, [esp+40h+arg_4]
mov	[esp+40h+var_4], ebp
call	sub_40ABB0
mov	eax, ebx

loc_648FF1:
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	8
sub_6489E0 endp

align 10h



sub_649010 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	ecx, ebx
call	sub_5F1AE0	; ?nextNode@DNameNode@@QBEPAV1@XZ
			; doubtful name
mov	ecx, ebx
mov	edi, eax
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
cmp	eax, edi
jz	short loc_649043
push	esi
mov	esi, [ebx+4]
sub	esi, edi
jz	short loc_64903F
push	esi
push	edi
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, esi

loc_64903F:
mov	[ebx+4], eax
pop	esi

loc_649043:
pop	edi
pop	ebx
retn	4
sub_649010 endp

align 10h



; int __stdcall	sub_649050(void	*Dst)
sub_649050 proc	near

Dst= dword ptr	4

push	esi
mov	ecx, edi
call	sub_455A00
lea	esi, [eax+eax*2]
add	esi, esi
push	0
mov	ecx, edi
add	esi, esi
call	sub_455A20
push	esi		; MaxCount
push	eax		; Src
mov	eax, [esp+0Ch+Dst]
push	esi		; DstSize
push	eax		; Dst
call	_memcpy_s
add	esp, 10h
pop	esi
retn	4
sub_649050 endp

align 10h



sub_649080 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A2FD00
test	[esp+4+arg_0], 1
jz	short loc_6490AA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6490AA:
mov	eax, esi
pop	esi
retn	4
sub_649080 endp



; Attributes: bp-based frame

; int __cdecl sub_6490B0(float)
sub_6490B0 proc	near

var_C4=	dword ptr -0C4h
var_B4=	dword ptr -0B4h
var_B0=	xmmword	ptr -0B0h
var_A0=	xmmword	ptr -0A0h
var_90=	xmmword	ptr -90h
var_80=	xmmword	ptr -80h
var_70=	xmmword	ptr -70h
var_60=	xmmword	ptr -60h
var_50=	xmmword	ptr -50h
var_40=	xmmword	ptr -40h
var_30=	xmmword	ptr -30h
var_20=	byte ptr -20h
var_10=	xmmword	ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 0C0h
lea	ecx, [esp+0C0h+var_B0]
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
movaps	xmm1, xmmword ptr [edi+20h]
movaps	xmm0, xmmword ptr [edi+30h]
movaps	[esp+0C0h+var_90], xmm0
addps	xmm0, xmm1
movaps	[esp+0C0h+var_B0], xmm0
mulps	xmm0, xmm0
movaps	[esp+0C0h+var_A0], xmm1
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 4Eh
addps	xmm1, xmm0
movaps	xmm0, xmm1
lea	eax, [esp+0C0h+var_60]
shufps	xmm0, xmm1, 0B1h
addps	xmm0, xmm1
push	eax
lea	ecx, [esp+0C4h+var_20]
movaps	[esp+0C4h+var_60], xmm0
call	sub_4D5050
lea	ecx, [esp+0C0h+var_20]
call	sub_4D50D0
fstp	[esp+0C0h+var_B4]
fld	[esp+0C0h+var_B4]
push	ecx
fld	ds:dbl_15FD5A0
lea	ecx, [esp+0C4h+var_80]
fmul	st, st(1)
fsubr	ds:dbl_15FD530
fstp	[esp+0C4h+var_B4]
fmul	ds:dbl_15FCC48
fld	[esp+0C4h+var_B4]
fld	st
fmulp	st(2), st
fld	st
fmulp	st(2), st
fld	ds:dbl_15FCD58
fsubrp	st(2), st
fmulp	st(1), st
fstp	[esp+0C4h+var_B4]
fld	[esp+0C4h+var_B4]
fstp	[esp+0C4h+var_C4]
call	sub_4D5090
fld	ds:dword_1479C58
movaps	xmm0, [esp+0C0h+var_80]
fld	[ebp+arg_0]
movaps	xmm1, xmm0
fcom	st(1)
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+0C0h+var_B0]
mulps	xmm1, xmm0
movaps	[esp+0C0h+var_B0], xmm1
fnstsw	ax
push	ecx
fstp	st(1)
fadd	st, st
test	ah, 5
jp	short loc_6491C9
fstp	[esp+0C4h+var_B4]
lea	ecx, [esp+0C4h+var_90]
fld	[esp+0C4h+var_B4]
fstp	[esp+0C4h+var_C4]
call	sub_4D5090
movaps	xmm1, [esp+0C0h+var_90]
movaps	xmm0, ds:xmmword_146B8A0
movaps	xmm2, [esp+0C0h+var_B0]
shufps	xmm1, xmm1, 0
subps	xmm0, xmm1
mulps	xmm0, [esp+0C0h+var_A0]
mulps	xmm1, xmm2
jmp	short loc_649209

loc_6491C9:
fsub	ds:dbl_15FCC40
lea	ecx, [esp+0C4h+var_40]
fstp	[esp+0C4h+var_B4]
fld	[esp+0C4h+var_B4]
fstp	[esp+0C4h+var_C4]
call	sub_4D5090
movaps	xmm1, [esp+0C0h+var_40]
movaps	xmm0, ds:xmmword_146B8A0
movaps	xmm2, [esp+0C0h+var_B0]
shufps	xmm1, xmm1, 0
subps	xmm0, xmm1
mulps	xmm1, [esp+0C0h+var_90]
mulps	xmm0, xmm2

loc_649209:
addps	xmm0, xmm1
movaps	[esp+0C0h+var_B0], xmm0
mulps	xmm0, xmm0
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 4Eh
addps	xmm1, xmm0
lea	ecx, [esp+0C0h+var_70]
movaps	xmm0, xmm1
shufps	xmm0, xmm1, 0B1h
push	ecx
addps	xmm0, xmm1
lea	ecx, [esp+0C4h+var_A0]
movaps	[esp+0C4h+var_70], xmm0
call	sub_4D5050
fldz
movaps	xmm1, [esp+0C0h+var_A0]
fstp	[esp+0C0h+var_B4]
fld	dword ptr off_17E66B4
xorps	xmm0, xmm0
movss	xmm2, [esp+0C0h+var_B4]
movss	xmm0, xmm2
movaps	xmm2, xmm0
movaps	xmm0, [esp+0C0h+var_A0]
fstp	[esp+0C0h+var_B4]
movss	xmm4, [esp+0C0h+var_B4]
fld	ds:dword_1479C58
movaps	xmm3, xmm0
fstp	[esp+0C0h+var_B4]
cmpeqss	xmm3, xmm2
rsqrtss	xmm1, xmm1
mulss	xmm0, xmm1
mulss	xmm0, xmm1
xorps	xmm2, xmm2
movss	xmm2, xmm4
movss	xmm4, [esp+0C0h+var_B4]
subss	xmm2, xmm0
xorps	xmm0, xmm0
movss	xmm0, xmm4
mulss	xmm0, xmm1
lea	edx, [esp+0C0h+var_50]
mulss	xmm0, xmm2
andnps	xmm3, xmm0
push	edx
lea	ecx, [esp+0C4h+var_30]
movaps	[esp+0C4h+var_50], xmm3
call	sub_4D5050
movaps	xmm0, [esp+0C0h+var_30]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+0C0h+var_B0]
lea	eax, [esp+0C0h+var_B0]
mulps	xmm1, xmm0
push	eax
mov	ecx, esi
movaps	[esp+0C4h+var_B0], xmm1
call	sub_1256440
fld	[ebp+arg_0]
push	ecx
lea	ecx, [esp+0C4h+var_10]
fstp	[esp+0C4h+var_C4]
call	sub_4D5090
movaps	xmm0, [esp+0C0h+var_10]
movaps	xmm1, ds:xmmword_146B8A0
movaps	xmm2, xmmword ptr [edi]
shufps	xmm0, xmm0, 0
subps	xmm1, xmm0
mulps	xmm1, xmm2
movaps	xmm2, xmmword ptr [edi+10h]
mulps	xmm2, xmm0
addps	xmm1, xmm2
movaps	xmmword	ptr [esi+30h], xmm1
movaps	xmm0, xmmword ptr [edi+40h]
movaps	xmm2, xmmword ptr [esi+10h]
movaps	xmm3, xmmword ptr [esi]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 55h
mulps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0
mulps	xmm2, xmm3
addps	xmm1, xmm2
movaps	xmm2, xmm0
shufps	xmm2, xmm0, 0AAh
movaps	xmm0, xmmword ptr [esi+20h]
mulps	xmm2, xmm0
movaps	xmm0, xmmword ptr [esi+30h]
addps	xmm1, xmm2
subps	xmm0, xmm1
movaps	xmmword	ptr [esi+30h], xmm0
mov	esp, ebp
pop	ebp
retn
sub_6490B0 endp

align 10h


; Attributes: bp-based frame

sub_649370 proc	near

var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7F=	byte ptr -7Fh
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
mov	eax, dword_1968D08
sub	esp, 94h
push	ebx
mov	ebx, [ebp+arg_0]
push	esi
mov	esi, ds:TlsGetValue
push	edi
push	eax		; dwTlsIndex
call	esi ; TlsGetValue
test	eax, eax
jnz	short loc_649399
mov	eax, [ebx+54h]
jmp	short loc_6493AA

loc_649399:
mov	ecx, dword_1968D08
push	ecx		; dwTlsIndex
call	esi ; TlsGetValue
movsx	eax, byte ptr [eax+ebx+0EAh]

loc_6493AA:
lea	edx, [eax+eax*8+48h]
movsx	eax, byte ptr [ebx+edx*2]
lea	esi, [ebx+edx*2]
mov	[esp+0A0h+var_84], eax
test	eax, eax
jge	short loc_6493F7
mov	edi, [ebp+arg_8]

loc_6493C0:
or	esi, 0FFFFFFFFh

loc_6493C3:
mov	eax, [ebp+arg_4]
cmp	eax, 0FFFFFFFFh
jz	short loc_6493D7
cmp	eax, esi
jz	short loc_6493D7
push	ebx
mov	edx, edi
call	sub_A2F2E0

loc_6493D7:
xor	edx, edx
cmp	esi, edx
jl	loc_6494B2
mov	eax, ebx
call	sub_A2F250
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6493F3:
mov	eax, [esp+0A0h+var_84]

loc_6493F7:
mov	edi, [ebp+arg_8]
lea	eax, [eax+eax*4]
lea	eax, [edi+eax*4+2Ch]
inc	esi
cmp	dword ptr [eax+10h], 0
mov	[esp+0A0h+var_8C], eax
setz	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+0A4h+var_8D]
call	sub_4D4F20
lea	ecx, [esp+0A0h+var_8D]
call	sub_4D4F40
test	al, al
jz	short loc_649434
movsx	eax, byte ptr [esi]
mov	[esp+0A0h+var_84], eax
test	eax, eax
jge	short loc_6493F3
jmp	short loc_6493C0

loc_649434:
mov	eax, [esp+0A0h+var_8C]
mov	eax, [eax+8]
mov	ecx, [esp+0A0h+var_8C]
mov	esi, eax
shl	esi, 7
add	esi, [ecx]
mov	ecx, 20h
lea	edi, [esp+0A0h+var_80]
rep movsd
mov	esi, [esp+0A0h+var_8C]
inc	eax
mov	[esi+8], eax
cmp	eax, [esi+4]
jnz	short loc_649465
mov	dword ptr [esi+8], 0

loc_649465:
mov	edx, [ebp+arg_C]
mov	edi, [ebp+arg_8]
dec	dword ptr [esi+10h]
mov	ecx, [ebx+1Ch]
push	edx
lea	eax, [esp+0A4h+var_80]
push	eax
push	edi
push	ebx
call	ecx
add	esp, 10h
cmp	eax, 1
jnz	short loc_64949A
lea	edx, [esp+0A0h+var_80]
push	edx
push	esi
call	sub_6497F0
mov	eax, [esp+0A0h+var_84]
push	ebx
mov	edx, edi
call	sub_A2F2E0

loc_64949A:
movzx	eax, [esp+0A0h+var_7F]
inc	word ptr [edi+eax*2]
mov	esi, [esp+0A0h+var_84]
lea	edi, [edi+eax*2]
mov	edi, [ebp+arg_8]
jmp	loc_6493C3

loc_6494B2:
mov	ecx, [ebx+4Ch]
mov	eax, [ebx+50h]
xor	esi, esi
cmp	ecx, eax
mov	[esp+0A0h+var_8C], edx
mov	[esp+0A0h+var_84], esi
mov	[esp+0A0h+var_88], edx
jge	short loc_64951E
mov	edx, eax
sub	edx, ecx
cmp	edx, 2
jl	short loc_6494FE
sub	eax, ecx
sub	eax, 2
shr	eax, 1
lea	edx, [ecx+ecx*4+14h]
inc	eax
lea	edx, [edi+edx*4]
lea	ecx, [ecx+eax*2]

loc_6494E5:
mov	esi, [edx-14h]
add	[esp+0A0h+var_8C], esi
mov	esi, [esp+0A0h+var_84]
add	esi, [edx]
add	edx, 28h
sub	eax, 1
mov	[esp+0A0h+var_84], esi
jnz	short loc_6494E5

loc_6494FE:
cmp	ecx, [ebx+50h]
mov	eax, [esp+0A0h+var_88]
jge	short loc_64950E
lea	eax, [ecx+ecx*4+0Fh]
mov	eax, [edi+eax*4]

loc_64950E:
mov	ecx, [esp+0A0h+var_8C]
add	ecx, esi
add	eax, ecx
jnz	loc_6495F8
xor	edx, edx

loc_64951E:
xor	esi, esi
cmp	[ebx+24h], esi
mov	[esp+0A0h+var_8C], edx
jle	short loc_649572

loc_649529:
cmp	word ptr [edi+esi*2], 0
jg	short loc_64955F
mov	edx, [ebx+30h]
lea	eax, [edx+esi+3]
lea	eax, [eax+eax*4]
cmp	dword ptr [edi+eax*4], 0
setz	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+0A4h+var_8D]
call	sub_4D4F20
lea	ecx, [esp+0A0h+var_8D]
call	sub_4D4F40
test	al, al
jz	short loc_64955F
xor	eax, eax
jmp	short loc_649564

loc_64955F:
mov	eax, 1

loc_649564:
mov	ecx, esi
shl	eax, cl
inc	esi
or	[esp+0A0h+var_8C], eax
cmp	esi, [ebx+24h]
jl	short loc_649529

loc_649572:
mov	ecx, [esp+0A0h+var_8C]
test	[edi+18h], ecx
setz	al
test	ecx, ecx
setz	[esp+0A0h+var_8D]
test	al, al
jz	short loc_6495EB
mov	eax, dword_1968D08
push	eax		; dwTlsIndex
call	ds:TlsGetValue
test	eax, eax
jnz	short loc_6495B9
cmp	[esp+0A0h+var_8D], al
jz	short loc_6495A4

loc_64959D:
push	edi
push	ebx
call	sub_A2F100

loc_6495A4:
mov	eax, ebx
call	sub_A2F250
mov	eax, 2
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6495B9:
movsx	ecx, byte ptr [ebx+0EAh]
cmp	word ptr [edi+ecx*2+22h], 0
jbe	short loc_6495EB
movsx	edx, byte ptr [ebx+0EAh]
lea	eax, [edi+edx*2+22h]
mov	ecx, 0FFFFh
add	[eax], cx
movsx	edx, byte ptr [ebx+0EAh]
mov	eax, [ebx+edx*4+78h]
call	sub_A2F080

loc_6495EB:
cmp	[esp+0A0h+var_8D], 0
jz	short loc_6495F8
cmp	dword ptr [edi+1Ch], 1
jnz	short loc_64959D

loc_6495F8:
mov	eax, dword_1968D08
push	eax		; dwTlsIndex
call	ds:TlsGetValue
movsx	esi, byte ptr [eax+ebx+0EAh]
inc	word ptr [edi+esi*2+22h]
mov	eax, ebx
call	sub_A2F250
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	edi, eax
mov	ecx, [edi+4]
cmp	ecx, [edi+0Ch]
lea	ecx, [esp+0A0h+var_8D]
setb	dl
movzx	eax, dl
push	eax
call	sub_4D4F20
lea	ecx, [esp+0A0h+var_8D]
call	sub_4D4F40
test	al, al
jz	short loc_64965E
mov	ecx, [edi+4]
mov	dword ptr [ecx], offset	aTtnojobavailab	; "TtNoJobAvailable"
rdtsc
mov	[esp+0A0h+var_88], eax
mov	edx, [esp+0A0h+var_88]
mov	[ecx+4], edx
add	ecx, 0Ch
mov	[edi+4], ecx

loc_64965E:
mov	eax, [ebx+esi*4+78h]
call	sub_A2F090
call	?__CxxRestoreUnhandledExceptionFilter@@YAXXZ ; __CxxRestoreUnhandledExceptionFilter(void)
mov	esi, eax
mov	eax, [esi+4]
cmp	eax, [esi+0Ch]
setb	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+0A4h+var_8D]
call	sub_4D4F20
lea	ecx, [esp+0A0h+var_8D]
call	sub_4D4F40
test	al, al
jz	short loc_6496AD
mov	ecx, [esi+4]
mov	dword ptr [ecx], offset	unk_1573EE0
rdtsc
mov	[esp+0A0h+var_88], eax
mov	eax, [esp+0A0h+var_88]
mov	[ecx+4], eax
add	ecx, 0Ch
mov	[esi+4], ecx

loc_6496AD:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_649370 endp

align 10h



sub_6496C0 proc	near

arg_0= dword ptr  4

mov	eax, [esi+4]
mov	ecx, [esp+arg_0]
cmp	eax, ecx
jge	locret_64978C
add	eax, eax
cmp	eax, ecx
jl	short loc_6496D9
mov	[esp+arg_0], eax

loc_6496D9:
push	ebx
push	ebp
push	edi
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+0Ch+arg_0]
mov	edx, [eax]
mov	edx, [edx+4]
shl	ecx, 7
push	ecx
mov	ecx, eax
call	edx
mov	edx, [esi]
mov	ebp, eax
test	edx, edx
jz	short loc_64975D
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_649750
mov	edi, [esi+0Ch]
mov	eax, [esi+8]
cmp	edi, eax
jg	short loc_64973D
mov	ecx, [esi+4]
sub	ecx, eax
shl	ecx, 7
mov	ebx, ecx
shl	eax, 7
push	ebx
add	eax, edx
push	eax
push	ebp
call	j_unknown_libname_61_0
mov	eax, [esi]
shl	edi, 7
push	edi
push	eax
add	ebx, ebp
push	ebx
call	j_unknown_libname_61_0
add	esp, 18h
jmp	short loc_649750

loc_64973D:
shl	ecx, 7
shl	eax, 7
push	ecx
add	eax, edx
push	eax
push	ebp
call	j_unknown_libname_61_0
add	esp, 0Ch

loc_649750:
mov	ecx, [esi+10h]
mov	dword ptr [esi+8], 0
mov	[esi+0Ch], ecx

loc_64975D:
mov	edi, [esi+4]
test	edi, edi
jz	short loc_649780
mov	ebx, [esi]
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
shl	edi, 7
push	edi
mov	ecx, eax
mov	eax, [edx+8]
push	ebx
call	eax

loc_649780:
mov	ecx, [esp+0Ch+arg_0]
pop	edi
mov	[esi], ebp
pop	ebp
mov	[esi+4], ecx
pop	ebx

locret_64978C:
retn	4
sub_6496C0 endp

align 10h



sub_649790 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+4]
cmp	[ebx+10h], eax
push	esi
push	edi
jl	short loc_6497B1
mov	esi, ebx
test	eax, eax
jnz	short loc_6497A9
push	8
jmp	short loc_6497AC

loc_6497A9:
add	eax, eax
push	eax

loc_6497AC:
call	sub_6496C0

loc_6497B1:
mov	ecx, [ebx+0Ch]
cmp	ecx, [ebx+4]
jnz	short loc_6497C0
mov	dword ptr [ebx+0Ch], 0

loc_6497C0:
mov	edi, [ebx+0Ch]
mov	esi, [esp+0Ch+arg_4]
shl	edi, 7
add	edi, [ebx]
mov	ecx, 20h
rep movsd
pop	edi
mov	eax, 1
add	[ebx+0Ch], eax
add	[ebx+10h], eax
pop	esi
pop	ebx
retn	8
sub_649790 endp

align 10h



sub_6497F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+4]
cmp	[ebx+10h], eax
push	esi
push	edi
jl	short loc_649811
mov	esi, ebx
test	eax, eax
jnz	short loc_649809
push	8
jmp	short loc_64980C

loc_649809:
add	eax, eax
push	eax

loc_64980C:
call	sub_6496C0

loc_649811:
cmp	dword ptr [ebx+8], 0
jnz	short loc_64981D
mov	ecx, [ebx+4]
mov	[ebx+8], ecx

loc_64981D:
dec	dword ptr [ebx+8]
mov	edi, [ebx+8]
mov	esi, [esp+0Ch+arg_4]
shl	edi, 7
add	edi, [ebx]
mov	ecx, 20h
rep movsd
inc	dword ptr [ebx+10h]
pop	edi
pop	esi
pop	ebx
retn	8
sub_6497F0 endp

align 10h



sub_649840 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A2E920
test	[esp+4+arg_0], 1
jz	short loc_64986A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_64986A:
mov	eax, esi
pop	esi
retn	4
sub_649840 endp




sub_649870 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A2E790
test	[esp+4+arg_0], 1
jz	short loc_64989A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_64989A:
mov	eax, esi
pop	esi
retn	4
sub_649870 endp




sub_6498A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_A2E020
test	[esp+4+arg_0], 1
jz	short loc_6498CA
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_6498CA:
mov	eax, esi
pop	esi
retn	4
sub_6498A0 endp

off_6498D0 dd offset loc_C7C186+5
align 8
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 80000000h
retn
align 10h


; Attributes: bp-based frame

sub_6498F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
movaps	xmm0, xmmword ptr [ecx+70h]
mov	eax, [ebp+arg_0]
movaps	xmmword	ptr [eax], xmm0
movaps	xmm0, xmmword ptr [ecx+80h]
mov	ecx, [ebp+arg_4]
movaps	xmmword	ptr [ecx], xmm0
mov	esp, ebp
pop	ebp
retn	8
sub_6498F0 endp

align 10h



sub_649920 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, esi
call	sub_A26090
test	[esp+4+arg_0], 1
jz	short loc_64994C
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_64994C:
mov	eax, esi
pop	esi
retn	4
sub_649920 endp

align 10h



sub_649960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
mov	esi, [esi]
mov	ebx, edx
sub	ebx, ecx
lea	eax, [eax+ecx*4-4]
lea	ecx, [esi+ebx*4-4]
movzx	ebx, word ptr [ecx]
mov	[esp+10h+arg_0], ebx
movzx	ebx, word ptr [eax]
dec	edx
lea	esi, [esi+edx*4]
mov	[esp+10h+var_4], ebx
lea	esp, [esp+0]

loc_649990:
mov	ebx, [esp+10h+var_4]
cmp	[esp+10h+arg_0], ebx
jle	short loc_6499C6
mov	ebx, [ecx]
mov	[esi], ebx
movzx	ebx, word ptr [ecx]
movzx	ebp, word ptr [ecx+2]
and	ebx, 1
shl	ebp, 4
add	ebp, dword_184D6D8[ebx*4]
sub	ecx, 4
mov	[edi+ebp], dx
movzx	ebx, word ptr [ecx]
sub	esi, 4
dec	edx
mov	[esp+10h+arg_0], ebx
jmp	short loc_649990

loc_6499C6:
mov	ebx, [eax]
mov	[esi], ebx
movzx	ebx, word ptr [eax]
movzx	ebp, word ptr [eax+2]
and	ebx, 1
shl	ebp, 4
add	ebp, dword_184D6D8[ebx*4]
sub	eax, 4
mov	[edi+ebp], dx
movzx	ebx, word ptr [eax]
sub	esi, 4
dec	edx
mov	[esp+10h+var_4], ebx
cmp	eax, [esp+10h+arg_4]
jnb	short loc_649990
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_649960 endp

align 10h



sub_649A00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
mov	esi, [esi]
mov	ebx, edx
sub	ebx, ecx
lea	eax, [eax+ecx*4-4]
lea	ecx, [esi+ebx*4-4]
movzx	ebx, word ptr [ecx]
mov	[esp+10h+arg_0], ebx
movzx	ebx, word ptr [eax]
dec	edx
lea	esi, [esi+edx*4]
mov	[esp+10h+var_4], ebx
lea	esp, [esp+0]

loc_649A30:
mov	ebx, [esp+10h+var_4]
cmp	[esp+10h+arg_0], ebx
jle	short loc_649A66
mov	ebx, [ecx]
mov	[esi], ebx
movzx	ebx, word ptr [ecx]
movzx	ebp, word ptr [ecx+2]
and	ebx, 1
shl	ebp, 4
add	ebp, dword_184D6E0[ebx*4]
sub	ecx, 4
mov	[edi+ebp], dx
movzx	ebx, word ptr [ecx]
sub	esi, 4
dec	edx
mov	[esp+10h+arg_0], ebx
jmp	short loc_649A30

loc_649A66:
mov	ebx, [eax]
mov	[esi], ebx
movzx	ebx, word ptr [eax]
movzx	ebp, word ptr [eax+2]
and	ebx, 1
shl	ebp, 4
add	ebp, dword_184D6E0[ebx*4]
sub	eax, 4
mov	[edi+ebp], dx
movzx	ebx, word ptr [eax]
sub	esi, 4
dec	edx
mov	[esp+10h+var_4], ebx
cmp	eax, [esp+10h+arg_4]
jnb	short loc_649A30
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_649A00 endp

align 10h



sub_649AA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
mov	esi, [esi]
mov	ebx, edx
sub	ebx, ecx
lea	eax, [eax+ecx*4-4]
lea	ecx, [esi+ebx*4-4]
movzx	ebx, word ptr [ecx]
mov	[esp+10h+arg_0], ebx
movzx	ebx, word ptr [eax]
dec	edx
lea	esi, [esi+edx*4]
mov	[esp+10h+var_4], ebx
lea	esp, [esp+0]

loc_649AD0:
mov	ebx, [esp+10h+var_4]
cmp	[esp+10h+arg_0], ebx
jle	short loc_649B06
mov	ebx, [ecx]
mov	[esi], ebx
movzx	ebx, word ptr [ecx]
movzx	ebp, word ptr [ecx+2]
and	ebx, 1
shl	ebp, 4
add	ebp, dword_184D6E8[ebx*4]
sub	ecx, 4
mov	[edi+ebp], dx
movzx	ebx, word ptr [ecx]
sub	esi, 4
dec	edx
mov	[esp+10h+arg_0], ebx
jmp	short loc_649AD0

loc_649B06:
mov	ebx, [eax]
mov	[esi], ebx
movzx	ebx, word ptr [eax]
movzx	ebp, word ptr [eax+2]
and	ebx, 1
shl	ebp, 4
add	ebp, dword_184D6E8[ebx*4]
sub	eax, 4
mov	[edi+ebp], dx
movzx	ebx, word ptr [eax]
sub	esi, 4
dec	edx
mov	[esp+10h+var_4], ebx
cmp	eax, [esp+10h+arg_4]
jnb	short loc_649AD0
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_649AA0 endp

align 10h



sub_649B40 proc	near

arg_0= word ptr	 4
arg_4= word ptr	 8

mov	ax, [esp+arg_0]
mov	cx, [esp+arg_4]
cmp	ax, cx
movzx	eax, ax
ja	short locret_649B55
movzx	eax, cx

locret_649B55:
retn
sub_649B40 endp

align 10h



sub_649B60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [edi]
mov	eax, [edi+4]
push	ebx
push	ebp
push	esi
lea	ebx, [ecx+eax*4]
xor	esi, esi
mov	edx, ecx
cmp	ecx, ebx
jnb	short loc_649BB1

loc_649B73:
movzx	eax, word ptr [ecx+2]
mov	ebp, [esp+0Ch+arg_4]
mov	ebp, [ebp+0]
mov	eax, [ebp+eax*4+0]
test	eax, eax
jl	short loc_649BAA
mov	ebp, [ecx]
mov	[edx], ebp
mov	[edx+2], ax
movzx	ebp, word ptr [ecx]
and	ebp, 1
shl	eax, 4
add	eax, dword_184D6D8[ebp*4]
mov	ebp, [esp+0Ch+arg_0]
mov	[eax+ebp], si
add	edx, 4
inc	esi

loc_649BAA:
add	ecx, 4
cmp	ecx, ebx
jb	short loc_649B73

loc_649BB1:
push	edi
lea	ecx, [esp+10h+arg_4]
mov	byte ptr [esp+10h+arg_4], 0
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_649BE2
add	ecx, ecx
cmp	esi, ecx
jl	short loc_649BD5
mov	ecx, esi

loc_649BD5:
push	4
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_649BE2:
mov	ecx, [edi+4]
mov	edx, [edi]
mov	eax, esi
sub	eax, ecx
lea	ecx, [edx+ecx*4]
test	eax, eax
jle	short loc_649C09
mov	ebx, ecx
mov	ebp, eax

loc_649BF6:		; void *
push	ebx
push	4		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
add	ebx, 4
sub	ebp, 1
jnz	short loc_649BF6

loc_649C09:
mov	[edi+4], esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_649B60 endp

align 10h



sub_649C20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [edi]
mov	eax, [edi+4]
push	ebx
push	ebp
push	esi
lea	ebx, [ecx+eax*4]
xor	esi, esi
mov	edx, ecx
cmp	ecx, ebx
jnb	short loc_649C71

loc_649C33:
movzx	eax, word ptr [ecx+2]
mov	ebp, [esp+0Ch+arg_4]
mov	ebp, [ebp+0]
mov	eax, [ebp+eax*4+0]
test	eax, eax
jl	short loc_649C6A
mov	ebp, [ecx]
mov	[edx], ebp
mov	[edx+2], ax
movzx	ebp, word ptr [ecx]
and	ebp, 1
shl	eax, 4
add	eax, dword_184D6E0[ebp*4]
mov	ebp, [esp+0Ch+arg_0]
mov	[eax+ebp], si
add	edx, 4
inc	esi

loc_649C6A:
add	ecx, 4
cmp	ecx, ebx
jb	short loc_649C33

loc_649C71:
push	edi
lea	ecx, [esp+10h+arg_4]
mov	byte ptr [esp+10h+arg_4], 0
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_649CA2
add	ecx, ecx
cmp	esi, ecx
jl	short loc_649C95
mov	ecx, esi

loc_649C95:
push	4
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_649CA2:
mov	ecx, [edi+4]
mov	edx, [edi]
mov	eax, esi
sub	eax, ecx
lea	ecx, [edx+ecx*4]
test	eax, eax
jle	short loc_649CC9
mov	ebx, ecx
mov	ebp, eax

loc_649CB6:		; void *
push	ebx
push	4		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
add	ebx, 4
sub	ebp, 1
jnz	short loc_649CB6

loc_649CC9:
mov	[edi+4], esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_649C20 endp

align 10h



sub_649CE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [edi]
mov	eax, [edi+4]
push	ebx
push	ebp
push	esi
lea	ebx, [ecx+eax*4]
xor	esi, esi
mov	edx, ecx
cmp	ecx, ebx
jnb	short loc_649D31

loc_649CF3:
movzx	eax, word ptr [ecx+2]
mov	ebp, [esp+0Ch+arg_4]
mov	ebp, [ebp+0]
mov	eax, [ebp+eax*4+0]
test	eax, eax
jl	short loc_649D2A
mov	ebp, [ecx]
mov	[edx], ebp
mov	[edx+2], ax
movzx	ebp, word ptr [ecx]
and	ebp, 1
shl	eax, 4
add	eax, dword_184D6E8[ebp*4]
mov	ebp, [esp+0Ch+arg_0]
mov	[eax+ebp], si
add	edx, 4
inc	esi

loc_649D2A:
add	ecx, 4
cmp	ecx, ebx
jb	short loc_649CF3

loc_649D31:
push	edi
lea	ecx, [esp+10h+arg_4]
mov	byte ptr [esp+10h+arg_4], 0
call	sub_4A00D0
mov	ecx, [edi+8]
and	ecx, 3FFFFFFFh
cmp	ecx, esi
jge	short loc_649D62
add	ecx, ecx
cmp	esi, ecx
jl	short loc_649D55
mov	ecx, esi

loc_649D55:
push	4
push	ecx
push	edi
push	eax
call	sub_121B8C0
add	esp, 10h

loc_649D62:
mov	ecx, [edi+4]
mov	edx, [edi]
mov	eax, esi
sub	eax, ecx
lea	ecx, [edx+ecx*4]
test	eax, eax
jle	short loc_649D89
mov	ebx, ecx
mov	ebp, eax

loc_649D76:		; void *
push	ebx
push	4		; unsigned int
call	??2@YAPAXIPAX@Z_0 ; operator new(uint,void *)
add	esp, 8
add	ebx, 4
sub	ebp, 1
jnz	short loc_649D76

loc_649D89:
mov	[edi+4], esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_649CE0 endp

align 10h


; Attributes: bp-based frame

sub_649DA0 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 14h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
nop

loc_649DB0:
mov	edi, [ebp+arg_8]
mov	ebx, [ebp+arg_4]
lea	eax, [ebx+edi]
sar	eax, 1
mov	ecx, [esi+eax*4]
mov	[esp+20h+var_10], ecx
jmp	short loc_649DD0

loc_649DC4:
mov	ecx, [esp+20h+var_10]
jmp	short loc_649DD0
align 10h

loc_649DD0:
movzx	eax, word ptr [esi+ebx*4]
cmp	ax, cx
jb	short loc_649DE9
jnz	short loc_649DE5
shr	ecx, 10h
cmp	[esi+ebx*4+2], cx
jb	short loc_649DE9

loc_649DE5:
xor	al, al
jmp	short loc_649DEE

loc_649DE9:
mov	eax, 1

loc_649DEE:
push	eax
lea	ecx, [esp+24h+var_12]
call	sub_4D4F20
lea	ecx, [esp+20h+var_12]
call	sub_4D4F40
test	al, al
jz	short loc_649E10
inc	ebx
jmp	short loc_649DC4
jmp	short loc_649E10
align 10h

loc_649E10:
movzx	eax, word ptr [esi+edi*4]
mov	ecx, [esp+20h+var_10]
cmp	cx, ax
jb	short loc_649E2F
jnz	short loc_649E2B
mov	cx, word ptr [esp+20h+var_10+2]
cmp	cx, [esi+edi*4+2]
jb	short loc_649E2F

loc_649E2B:
xor	al, al
jmp	short loc_649E34

loc_649E2F:
mov	eax, 1

loc_649E34:
push	eax
lea	ecx, [esp+24h+var_11]
call	sub_4D4F20
lea	ecx, [esp+20h+var_11]
call	sub_4D4F40
test	al, al
jz	short loc_649E4E
dec	edi
jmp	short loc_649E10

loc_649E4E:
cmp	edi, ebx
jl	short loc_649E6A
jz	short loc_649E60
mov	edx, [esi+ebx*4]
mov	eax, [esi+edi*4]
mov	[esi+edi*4], edx
mov	[esi+ebx*4], eax

loc_649E60:
dec	edi
inc	ebx
cmp	ebx, edi
jle	loc_649DC4

loc_649E6A:
mov	eax, [ebp+arg_4]
cmp	eax, edi
jge	short loc_649E80
mov	ecx, [ebp+arg_C]
push	ecx
push	edi
push	eax
push	esi
call	sub_649DA0
add	esp, 10h

loc_649E80:
cmp	ebx, [ebp+arg_8]
jge	short loc_649E8D
mov	[ebp+arg_4], ebx
jmp	loc_649DB0

loc_649E8D:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_649DA0 endp

align 10h


; Attributes: bp-based frame

sub_649EA0 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 14h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
nop

loc_649EB0:
mov	edi, [ebp+arg_8]
mov	ebx, [ebp+arg_4]
lea	eax, [ebx+edi]
sar	eax, 1
mov	ecx, [esi+eax*4]
mov	[esp+20h+var_10], ecx

loc_649EC2:
mov	dx, word ptr [esp+20h+var_10]
cmp	[esi+ebx*4], dx
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+24h+var_12]
call	sub_4D4F20
lea	ecx, [esp+20h+var_12]
call	sub_4D4F40
test	al, al
jz	short loc_649F17
jmp	short loc_649EF0
align 10h

loc_649EF0:
mov	dx, word ptr [esp+20h+var_10]
inc	ebx
cmp	[esi+ebx*4], dx
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+24h+var_12]
call	sub_4D4F20
lea	ecx, [esp+20h+var_12]
call	sub_4D4F40
test	al, al
jnz	short loc_649EF0

loc_649F17:
mov	dx, word ptr [esp+20h+var_10]
cmp	dx, [esi+edi*4]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+24h+var_11]
call	sub_4D4F20
lea	ecx, [esp+20h+var_11]
call	sub_4D4F40
test	al, al
jz	short loc_649F67
lea	ecx, [ecx+0]

loc_649F40:
mov	dx, word ptr [esp+20h+var_10]
dec	edi
cmp	dx, [esi+edi*4]
setb	al
movzx	ecx, al
push	ecx
lea	ecx, [esp+24h+var_11]
call	sub_4D4F20
lea	ecx, [esp+20h+var_11]
call	sub_4D4F40
test	al, al
jnz	short loc_649F40

loc_649F67:
cmp	edi, ebx
jl	short loc_649F83
jz	short loc_649F79
mov	edx, [esi+ebx*4]
mov	eax, [esi+edi*4]
mov	[esi+edi*4], edx
mov	[esi+ebx*4], eax

loc_649F79:
dec	edi
inc	ebx
cmp	ebx, edi
jle	loc_649EC2

loc_649F83:
mov	eax, [ebp+arg_4]
cmp	eax, edi
jge	short loc_649F99
mov	ecx, [ebp+arg_C]
push	ecx
push	edi
push	eax
push	esi
call	sub_649EA0
add	esp, 10h

loc_649F99:
cmp	ebx, [ebp+arg_8]
jge	short loc_649FA6
mov	[ebp+arg_4], ebx
jmp	loc_649EB0

loc_649FA6:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_649EA0 endp

align 10h



sub_649FB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi+8], offset off_15F4814
call	sub_4DA650
test	[esp+4+arg_0], 1
jz	short loc_649FE1
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx

loc_649FE1:
mov	eax, esi
pop	esi
retn	4
sub_649FB0 endp

align 10h



sub_649FF0 proc	near
sub	ecx, 8
jmp	sub_649FB0
sub_649FF0 endp

align 10h



sub_64A000 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
call	sub_11D89F0
test	[esp+4+arg_0], 1
jz	short loc_64A02A
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [edi+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	edi
mov	ecx, eax
call	edx

loc_64A02A:
mov	eax, edi
pop	edi
retn	4
sub_64A000 endp




sub_64A030 proc	near
push	ebx
push	ebp
push	esi
mov	esi, eax
push	edi
mov	ecx, esi
call	sub_4D9FB0
lea	edi, [esi+50h]
xor	ebp, ebp
or	ebx, 0FFFFFFFFh
mov	ecx, edi
mov	[esi+40h], ebp
mov	[esi+20h], ebx
call	sub_4D9FB0
mov	[edi+40h], ebp
mov	[edi+20h], ebx
lea	edi, [esi+0A0h]
mov	ecx, edi
call	sub_4D9FB0
add	esi, 0F0h
mov	ecx, esi
mov	[edi+40h], ebp
mov	[edi+20h], ebx
call	sub_4D9FB0
pop	edi
mov	[esi+40h], ebp
mov	[esi+20h], ebx
pop	esi
pop	ebp
pop	ebx
retn
sub_64A030 endp

align 10h



sub_64A090 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi+4], offset off_146BA5C
mov	dword ptr [esi], offset	off_146BA68
jz	short loc_64A0BF
call	sub_AD5DD0
mov	ecx, eax
call	unknown_libname_4 ; Microsoft VisualC 2-9/net runtime
mov	edx, [eax]
push	20h
mov	ecx, eax
mov	eax, [edx+8]
push	esi
call	eax

loc_64A0BF:
mov	eax, esi
pop	esi
retn	4
sub_64A090 endp

align 10h



sub_64A0D0 proc	near
sub	ecx, 4
jmp	sub_64A090
sub_64A0D0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_64A0E0(int,	int, int, int, int, int, float)
sub_64A0E0 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_70=	xmmword	ptr -70h
var_60=	xmmword	ptr -60h
var_50=	xmmword	ptr -50h
var_3C=	xmmword	ptr -3Ch
var_2C=	xmmword	ptr -2Ch
var_1C=	xmmword	ptr -1Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF0h
sub	esp, 74h
mov	edx, [ebp+arg_10]
push	ebx
mov	ebx, [ebp+arg_C]
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	[edi+10h], eax
mov	eax, [ebp+arg_8]
mov	[edi+14h], ecx
mov	[edi+8], ebx
mov	[edi+18h], eax
mov	[edi+0Ch], edx
mov	eax, [eax]
lea	ecx, [eax+0Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
lea	ecx, [esp+80h+var_50]
mov	[edi+1Ch], eax
call	?GetLocaleT@_LocaleUpdate@@QAEPAUlocaleinfo_struct@@XZ ; _LocaleUpdate::GetLocaleT(void)
mov	eax, [ebp+arg_14]
lea	esi, [edi+20h]
push	eax
mov	ecx, esi
call	sub_4D8A50
mov	ecx, [ebp+arg_18]
mov	edx, [ebp+arg_8]
mov	[edi+88h], ecx
fld	dword ptr [ebx+14h]
mov	eax, [edx+8]
movaps	xmm1, xmmword ptr [eax+30h]
movaps	xmm0, xmmword ptr [ebx]
push	ecx		; float
subps	xmm0, xmm1
fstp	[esp+84h+var_84]
lea	eax, [esp+84h+var_70]
movaps	[esp+84h+var_70], xmm0
call	sub_610EB0
fld	dword ptr [ebx+14h]
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [eax+8]
mov	edx, [edx+1Ch]
lea	esi, [esp+80h+var_50]
push	esi
push	ecx
fstp	[esp+88h+var_88]
push	eax
call	edx
fld	ds:dword_1479C58
push	ecx
lea	ecx, [esp+84h+var_60]
fstp	[esp+84h+var_84]
call	sub_4D5090
fld	ds:dword_1479C58
movaps	xmm0, [esp+80h+var_60]
movaps	xmm1, xmmword ptr [esp+40h]
movaps	xmm3, [esp+80h+var_50]
shufps	xmm0, xmm0, 0
movaps	xmm2, xmm0
movaps	xmm0, ds:xmmword_146B8A0
subps	xmm0, xmm2
movaps	xmm4, xmm1
mulps	xmm0, xmm3
mulps	xmm4, xmm2
addps	xmm0, xmm4
push	ecx
movaps	[esp+84h+var_3C+0Ch], xmm0
fstp	[esp+84h+var_84]
addps	xmm0, [esp+84h+var_70]
subps	xmm1, xmm3
lea	ecx, [esp+84h+var_60]
movaps	[esp+84h+var_2C+0Ch], xmm0
movaps	[esp+84h+var_1C+0Ch], xmm1
call	sub_4D5090
fld	dword ptr [ebx+10h]
movaps	xmm0, [esp+80h+var_60]
movaps	xmm1, xmm0
shufps	xmm1, xmm0, 0
movaps	xmm0, [esp+80h+var_1C+0Ch]
mulps	xmm1, xmm0
movaps	[esp+80h+var_1C+0Ch], xmm1
mov	edx, [ebp+arg_4]
fstp	dword ptr [edi+80h]
fld	dword ptr [ebx+10h]
push	0
push	0
push	ecx
fstp	[esp+8Ch+var_8C]
add	edi, 4
push	edi
lea	eax, [esp+90h+var_3C+0Ch]
push	eax
mov	ecx, esi
push	ecx
push	edx
call	sub_88DDF0
add	esp, 1Ch
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	1Ch
sub_64A0E0 endp

align 10h



sub_64A230 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	ebx, ecx
push	edi
mov	edi, [eax+0Ch]
lea	esi, [ebx-4]
call	sub_64A270
mov	ecx, [ebx+0Ch]
fld	dword ptr [ecx+4]
pop	edi
pop	esi
pop	ebx
retn	4
sub_64A230 endp




sub_64A250 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, [eax+20h]
mov	esi, ecx
call	sub_64A270
mov	ecx, [esi+10h]
fld	dword ptr [ecx+4]
pop	edi
pop	esi
retn	4
sub_64A250 endp

align 10h



sub_64A270 proc	near

var_1= byte ptr	-1

push	ecx
push	ebx
mov	ebx, [edi]
test	ebx, ebx
jz	short loc_64A2D5
mov	eax, [esi+18h]
cmp	eax, edi
jz	short loc_64A2D5
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	edx, [edx+4]
push	edi
push	eax
lea	eax, [esp+10h+var_1]
push	eax
call	edx
mov	ecx, eax
call	sub_4D4F40
test	al, al
jz	short loc_64A2D5
lea	ecx, [ebx+0Ch]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
mov	ebx, [esi+1Ch]
mov	edx, [esi+20h]
add	ebx, 0Dh
lea	ecx, [esi+20h]
shl	ebx, 5
add	ebx, edx
movzx	eax, byte ptr [ebx+eax]
mov	ebx, [esi+14h]
push	ebx
mov	ebx, [esi+10h]
push	ebx
push	ecx
mov	ecx, [esi+18h]
lea	eax, [eax+eax*4]
mov	edx, [edx+eax*4+9ACh]
push	edi
push	ecx
call	edx
add	esp, 14h

loc_64A2D5:
pop	ebx
pop	ecx
retn
sub_64A270 endp

align 10h



sub_64A2E0 proc	near

var_1= byte ptr	-1

push	ecx
push	esi
lea	esi, [ecx+4]
push	esi
lea	ecx, [esp+0Ch+var_1]
mov	[esp+0Ch+var_1], 0
call	sub_4A00D0
mov	edx, [esi+8]
mov	dword ptr [esi+4], 0
test	edx, edx
js	short loc_64A31D
mov	ecx, [esi]
and	edx, 3FFFFFFFh
add	edx, edx
add	edx, edx
push	ebp
mov	ebp, [eax]
add	edx, edx
push	edx
mov	edx, [ebp+10h]
push	ecx
mov	ecx, eax
call	edx
pop	ebp

loc_64A31D:
mov	dword ptr [esi+8], 80000000h
mov	dword ptr [esi], 0
pop	esi
pop	ecx
retn
sub_64A2E0 endp

align 10h



; int __thiscall sub_64A330(void *, char)
sub_64A330 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15FA074
jz	short loc_64A349
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_64A349:
mov	eax, esi
pop	esi
retn	4
sub_64A330 endp

align 10h



sub_64A350 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+18h], eax
retn	4
sub_64A350 endp

align 10h



sub_64A360 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14316A0
push	edi
xor	edi, edi
mov	[esi+0Ch], edi
mov	dword ptr [esi+10h], 1
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	eax, 2000h
mov	[esi+24h], eax
mov	[esi+28h], eax
lea	eax, [esi+44h]
mov	[esi+1Ch], edi
mov	dword ptr [esi+20h], 10h
mov	dword ptr [esi+2Ch], 0FFFFFFFFh
mov	[esi+30h], edi
mov	[esi+34h], edi
mov	[esi+38h], edi
cmp	eax, edi
jz	short loc_64A3AD
lea	ecx, [eax-4]
jmp	short loc_64A3AF

loc_64A3AD:
xor	ecx, ecx

loc_64A3AF:
mov	[eax], ecx
mov	[eax+4], ecx
push	edi		; int
lea	ecx, [esi+4Ch]	; lpCriticalSection
call	sub_64D6D0
xor	eax, eax
mov	byte ptr [esi+64h], 1
mov	byte ptr [esi+65h], 1
mov	[esi+1Ch], eax
mov	[esi+20h], eax
mov	[esi+24h], eax
mov	[esi+28h], eax
mov	[esi+2Ch], eax
mov	[esi+30h], eax
mov	[esi+34h], eax
mov	[esi+38h], eax
mov	[esi+3Ch], eax
mov	[esi+40h], eax
pop	edi
mov	eax, esi
pop	esi
retn
sub_64A360 endp

align 10h



sub_64A3F0 proc	near
mov	dword ptr [ecx], offset	off_155F500
retn
sub_64A3F0 endp

align 10h



sub_64A400 proc	near
push	ecx
add	dword ptr [ecx+4], 0FFFFFFFFh
mov	eax, [ecx+4]
jnz	short loc_64A412
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_64A412:
pop	ecx
retn
sub_64A400 endp

align 10h



sub_64A420 proc	near
push	1		; Value
add	ecx, 4
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
retn
sub_64A420 endp

align 10h



sub_64A430 proc	near
push	esi
mov	esi, ecx
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_64A452
test	esi, esi
jz	short loc_64A452
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_64A452:
pop	esi
retn
sub_64A430 endp

align 10h



sub_64A460 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_143172C
test	eax, eax
jz	short loc_64A48D
mov	dword ptr [eax+4], 0
mov	eax, [esi+8]
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_64A48D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_64A48D:
mov	dword ptr [esi], offset	off_155F500
pop	esi
retn
sub_64A460 endp

align 10h



sub_64A4A0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+8], 0
jnz	short loc_64A4E2
mov	ecx, dword_1855FC0
lea	edx, [esp+8+var_4]
push	edx
mov	[esp+0Ch+var_4], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	8
push	esi
call	eax
test	eax, eax
jz	short loc_64A4D6
mov	dword ptr [eax], 1
mov	[eax+4], esi
jmp	short loc_64A4D8

loc_64A4D6:
xor	eax, eax

loc_64A4D8:
mov	[esi+8], eax
test	eax, eax
jnz	short loc_64A4E2
pop	esi
pop	ecx
retn

loc_64A4E2:
mov	eax, [esi+8]
inc	dword ptr [eax]
mov	eax, [esi+8]
pop	esi
pop	ecx
retn
sub_64A4A0 endp

align 10h



; int __thiscall sub_64A4F0(void *, char)
sub_64A4F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_143172C
test	eax, eax
jz	short loc_64A51D
mov	dword ptr [eax+4], 0
mov	eax, [esi+8]
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_64A51D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_64A51D:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_155F500
jz	short loc_64A533
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_64A533:
mov	eax, esi
pop	esi
retn	4
sub_64A4F0 endp

align 10h



sub_64A540 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	dword_1855FD4, eax
retn
sub_64A540 endp

align 10h



sub_64A550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	dword_1855FD8, 0
jnz	short locret_64A573
mov	ecx, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
mov	eax, [esi]
mov	edx, [eax+4]
push	ecx
mov	ecx, esi
call	edx
mov	dword_1855FD8, esi
pop	esi

locret_64A573:
retn
sub_64A550 endp

align 10h



sub_64A580 proc	near
cmp	dword_1855FD8, 0
jz	short locret_64A5A5
call	sub_64E690
mov	ecx, dword_1855FD8
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
mov	dword_1855FD8, 0

locret_64A5A5:
retn
sub_64A580 endp

align 10h



sub_64A5B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [ecx]
mov	edx, [esp+arg_4]
mov	eax, [eax+28h]
push	0
push	edx
call	eax
retn	8
sub_64A5B0 endp

align 10h



; int __stdcall	sub_64A5D0(double)
sub_64A5D0 proc	near

arg_0= qword ptr  4

fld	[esp+arg_0]
fstp	[esp+arg_0]
mov	ecx, dword ptr [esp+arg_0+4]
mov	eax, ecx
and	eax, 7FF00000h
xor	edx, edx
jnz	short loc_64A604
cmp	eax, 7FF00000h
jnz	short loc_64A604
mov	eax, dword ptr [esp+arg_0]
and	ecx, 0FFFFFh
or	eax, ecx
jz	short loc_64A604
mov	eax, 1
retn	8

loc_64A604:
xor	eax, eax
retn	8
sub_64A5D0 endp

align 10h



; int __stdcall	sub_64A610(double)
sub_64A610 proc	near

arg_0= qword ptr  4

fld	[esp+arg_0]
fstp	[esp+arg_0]
cmp	dword ptr [esp+arg_0], 0
jnz	short loc_64A631
cmp	dword ptr [esp+arg_0+4], 7FF00000h
jnz	short loc_64A631
mov	eax, 1
retn	8

loc_64A631:
xor	eax, eax
retn	8
sub_64A610 endp

align 10h



; int __stdcall	sub_64A640(double)
sub_64A640 proc	near

arg_0= qword ptr  4

fld	[esp+arg_0]
fstp	[esp+arg_0]
cmp	dword ptr [esp+arg_0], 0
jnz	short loc_64A661
cmp	dword ptr [esp+arg_0+4], 0FFF00000h
jnz	short loc_64A661
mov	eax, 1
retn	8

loc_64A661:
xor	eax, eax
retn	8
sub_64A640 endp

align 10h



sub_64A670 proc	near
push	esi
mov	esi, ecx
call	sub_652060
mov	byte ptr [esi],	1
pop	esi
retn
sub_64A670 endp

align 10h



sub_64A680 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi],	5
jb	short loc_64A68D
call	sub_652060

loc_64A68D:
mov	eax, [esp+4+arg_0]
mov	byte ptr [esi],	5
mov	eax, [eax]
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	esi
retn	4
sub_64A680 endp




; int __stdcall	sub_64A6A0(double)
sub_64A6A0 proc	near

arg_0= qword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi],	5
jb	short loc_64A6AD
call	sub_652060

loc_64A6AD:
fld	[esp+4+arg_0]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
retn	8
sub_64A6A0 endp

align 10h



sub_64A6C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_652060
mov	al, [esp+4+arg_0]
mov	byte ptr [esi],	2
mov	[esi+4], al
pop	esi
retn	4
sub_64A6C0 endp

align 10h



sub_64A6E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [ecx+44h]
fld	dword ptr [eax+4]
fstp	dword ptr [ecx+48h]
fld	dword ptr [eax+8]
fstp	dword ptr [ecx+4Ch]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [ecx+50h]
fld	dword ptr [eax+10h]
fstp	dword ptr [ecx+54h]
fld	dword ptr [eax+14h]
fstp	dword ptr [ecx+58h]
retn	4
sub_64A6E0 endp

align 10h



sub_64A710 proc	near

arg_0= dword ptr  4

push	esi
push	edi
push	0
mov	edi, ecx
call	sub_6554A0
mov	edi, [edi+5Ch]
mov	esi, [esp+8+arg_0]
mov	ecx, 10h
rep movsd
pop	edi
pop	esi
retn	4
sub_64A710 endp

align 10h



sub_64A730 proc	near

arg_0= dword ptr  4

push	esi
push	edi
lea	edi, [ecx+60h]
push	edi
call	sub_6554A0
mov	edi, [edi]
mov	esi, [esp+8+arg_0]
mov	ecx, 10h
rep movsd
pop	edi
pop	esi
retn	4
sub_64A730 endp

align 10h



sub_64A750 proc	near

arg_0= dword ptr  4

push	esi
push	edi
lea	edi, [ecx+64h]
push	edi
call	sub_6554A0
mov	edi, [edi]
mov	esi, [esp+8+arg_0]
mov	ecx, 10h
rep movsd
pop	edi
pop	esi
retn	4
sub_64A750 endp

align 10h



sub_64A770 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	edx, [eax]
push	esi
mov	esi, [esp+4+arg_0]
push	edi
lea	edi, [eax+24h]
mov	ecx, 8
rep movsd
mov	ecx, eax
mov	eax, [edx+4]
call	eax
pop	edi
pop	esi
retn	4
sub_64A770 endp




sub_64A790 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+20h]
call	sub_64E8E0
fldz
fst	qword ptr [esi+18h]
mov	dword ptr [esi+4], 0
fld	ds:dbl_15FCBF8
mov	dword ptr [esi], 0
fst	qword ptr [esi+10h]
mov	eax, esi
fst	qword ptr [esi+8]
fstp	qword ptr [esi+40h]
fst	qword ptr [esi+50h]
fst	qword ptr [esi+48h]
fstp	qword ptr [esi+38h]
pop	esi
retn
sub_64A790 endp

align 10h



sub_64A7D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_64A7EA
lea	ecx, [eax-10h]
mov	eax, [esp+arg_4]
push	eax
call	sub_65E410
mov	al, 1
retn	8

loc_64A7EA:
mov	eax, [esp+arg_4]
xor	ecx, ecx
push	eax
call	sub_65E410
mov	al, 1
retn	8
sub_64A7D0 endp

align 10h



sub_64A800 proc	near

var_198= dword ptr -198h
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= byte ptr -180h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_140= byte ptr -140h
var_100= byte ptr -100h
var_C0=	byte ptr -0C0h
var_80=	byte ptr -80h
var_48=	dword ptr -48h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 188h
push	ebx
push	esi
push	edi
lea	ecx, [esp+194h+var_40] ; void *
call	sub_64F7C0
lea	ecx, [esp+194h+var_80] ; void *
call	sub_64F7C0
lea	ecx, [esp+194h+var_180]	; void *
call	sub_64F7C0
lea	ecx, [esp+194h+var_C0] ; void *
call	sub_64F7C0
mov	ebx, [esp+194h+arg_0]
mov	eax, [ebx+98h]
fld	qword ptr [eax+38h]
fstp	[esp+194h+var_48]
fld	[esp+194h+var_160]
fld	[esp+194h+var_15C]
fld	[esp+194h+var_158]
fld	qword ptr [eax+40h]
fstp	[esp+194h+var_184]
fld	[esp+194h+var_184]
fdiv	ds:dbl_15FCBF8
fstp	[esp+194h+var_184]
fld	[esp+194h+var_184]
fstp	[esp+194h+var_188]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+194h+var_184]
fld	[esp+194h+var_184]
call	__CIsqrt
fstp	[esp+194h+var_184]
fld	[esp+194h+var_184]
mov	eax, [ebx+98h]
fdivr	[esp+194h+var_188]
push	ecx		; float
lea	ecx, [esp+198h+var_40] ; void *
fstp	[esp+198h+var_188]
fld	[esp+198h+var_160]
fld	[esp+198h+var_188]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+198h+var_160]
fld	[esp+198h+var_15C]
fmul	st, st(1)
fstp	[esp+198h+var_15C]
fmul	[esp+198h+var_158]
fstp	[esp+198h+var_158]
fld	qword ptr [eax+48h]
fmul	ds:dbl_1431730
fdiv	ds:dbl_15FCD10
fstp	[esp+198h+var_188]
fld	[esp+198h+var_188]
fstp	[esp+198h+var_198]
call	sub_64FC00
mov	ecx, [ebx+98h]
fld	qword ptr [ecx+50h]
push	ecx		; float
fmul	ds:dbl_1431730
lea	ecx, [esp+198h+var_C0] ; void *
fdiv	ds:dbl_15FCD10
fstp	[esp+198h+var_188]
fld	[esp+198h+var_188]
fstp	[esp+198h+var_198]
call	sub_64FC80
mov	ecx, 10h
lea	esi, [esp+194h+var_180]
lea	edi, [esp+194h+var_140]
rep movsd
mov	ecx, 10h
lea	esi, [esp+194h+var_180]
lea	edi, [esp+194h+var_100]
lea	edx, [esp+194h+var_40]
rep movsd
push	edx
lea	eax, [esp+198h+var_100]
push	eax
lea	ecx, [esp+19Ch+var_140]
call	sub_64F7E0
mov	ecx, 10h
lea	esi, [esp+194h+var_140]
lea	edi, [esp+194h+var_100]
rep movsd
lea	ecx, [esp+194h+var_C0]
push	ecx
lea	edx, [esp+198h+var_100]
push	edx
lea	ecx, [esp+19Ch+var_140]
call	sub_64F7E0
mov	ecx, 10h
lea	esi, [esp+194h+var_140]
lea	edi, [esp+194h+var_100]
rep movsd
lea	eax, [esp+194h+var_80]
push	eax
lea	ecx, [esp+198h+var_100]
push	ecx
lea	ecx, [esp+19Ch+var_140]
call	sub_64F7E0
lea	ecx, [esp+194h+var_140]
call	sub_64F5C0
test	al, al
jz	short loc_64A9D5
push	0
mov	ecx, ebx
call	sub_6554A0
mov	edi, [ebx+5Ch]
mov	ecx, 10h
lea	esi, [esp+194h+var_140]
rep movsd

loc_64A9D5:
pop	edi
pop	esi
pop	ebx
add	esp, 188h
retn
sub_64A800 endp

align 10h



sub_64A9E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [ecx]
mov	eax, [ecx]
mov	eax, [eax+34h]
push	0
push	0
push	edx
mov	edx, [esp+0Ch+arg_0]
push	edx
call	eax
retn	8
sub_64A9E0 endp

align 10h



sub_64AA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx+8], eax
mov	al, [esp+arg_8]
mov	[ecx+0Ch], edx
mov	[ecx+10h], al
retn	0Ch
sub_64AA00 endp

align 10h



sub_64AA20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_652830
test	[esp+4+arg_0], 1
jz	short loc_64AA3D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_64AA3D:
mov	eax, esi
pop	esi
retn	4
sub_64AA20 endp

align 10h



sub_64AA50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_64AA9E
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_64AA80
push	ebp
mov	ebp, [ecx]
lea	eax, ds:14h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_64AA97

loc_64AA80:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	14h
push	esi
call	edx

loc_64AA97:
add	dword ptr [esi+8], 5
mov	[esi+0Ch], eax

loc_64AA9E:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_64AA50 endp

align 10h



sub_64AAD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_64AB29
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_64AB00
push	ebp
mov	ebp, [ecx]
lea	eax, ds:14h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_64AB17

loc_64AB00:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	14h
push	esi
call	edx

loc_64AB17:
test	eax, eax
jnz	short loc_64AB22

loc_64AB1B:
pop	edi
xor	al, al
pop	esi
retn	4

loc_64AB22:
add	dword ptr [esi+8], 5
mov	[esi+0Ch], eax

loc_64AB29:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
mov	edx, [esi+0Ch]
cmp	dword ptr [edx+edi*4], 0
jz	short loc_64AB1B
mov	eax, 1
add	[esi+4], eax
pop	edi
pop	esi
retn	4
sub_64AAD0 endp

align 10h



sub_64AB70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+78h]
mov	edx, [esp+arg_4]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
mov	ecx, [esp+arg_0]
inc	dword ptr [eax+8]
mov	[ecx], eax
mov	eax, ecx
retn	8
sub_64AB70 endp

align 10h



sub_64ABA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
mov	edx, [esp+arg_4]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
mov	ecx, [esp+arg_0]
inc	dword ptr [eax+8]
mov	[ecx], eax
mov	eax, ecx
retn	8
sub_64ABA0 endp




sub_64ABC0 proc	near

var_18=	qword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi]
mov	edx, [eax+4]
push	edi
mov	edi, ecx
mov	ecx, esi
call	edx
cmp	eax, 8		; switch 9 cases
ja	loc_64AD54	; default
jmp	ds:off_64AD5C[eax*4] ; switch jump

loc_64ABE4:		; jumptable 0064ABDD case 0
mov	esi, [esp+10h+arg_4]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	0
pop	esi
add	esp, 8
retn	8

loc_64ABFA:		; jumptable 0064ABDD case 2
mov	eax, [esi]
mov	edx, [eax+8]
push	ebx
mov	ecx, esi
call	edx
mov	esi, [esp+14h+arg_4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
pop	ebx
pop	edi
mov	byte ptr [esi],	2
pop	esi
add	esp, 8
retn	8

loc_64AC20:		; jumptable 0064ABDD case 1
mov	esi, [esp+10h+arg_4]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	1
pop	esi
add	esp, 8
retn	8

loc_64AC36:		; jumptable 0064ABDD case 3
mov	eax, [esi]
mov	edx, [eax+0Ch]
mov	ecx, esi
call	edx
mov	ecx, [esp+10h+arg_4]
sub	esp, 8
fstp	[esp+18h+var_18]
call	sub_64A6A0
pop	edi
pop	esi
add	esp, 8
retn	8

loc_64AC56:		; jumptable 0064ABDD case 4
mov	eax, [esi+0Ch]
shr	eax, 6
test	al, 1
jz	short loc_64AC91
mov	esi, [esi+10h]

loc_64AC63:
inc	dword ptr [esi+8]
lea	ecx, [esp+10h+arg_0]
push	ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+arg_0], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	loc_64AD54	; default
mov	ecx, esi
call	sub_650DF0
pop	edi
pop	esi
add	esp, 8
retn	8

loc_64AC91:
mov	edx, [esi]
mov	eax, [edx+10h]
mov	edi, [edi+23C4h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+14h+var_8]
push	ecx
lea	ecx, [edi+8]
call	sub_4E4310
mov	ecx, [esp+10h+arg_4]
push	eax
call	sub_64A680
mov	eax, [esp+10h+var_8]

loc_64ACBC:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_64AD54	; default
call	sub_650DF0
pop	edi
pop	esi
add	esp, 8
retn	8

loc_64ACDA:		; jumptable 0064ABDD case 5
mov	edx, [esi+0Ch]
shr	edx, 6
test	dl, 1
jz	short loc_64ACF0
mov	eax, [esi+10h]
mov	esi, [eax-4]
jmp	loc_64AC63

loc_64ACF0:
mov	esi, [esi+10h]
mov	eax, [edi+23C4h]
push	esi
lea	edx, [esp+14h+var_4]
push	edx
lea	ecx, [eax+8]
call	sub_4E4360
mov	ecx, [esp+10h+arg_4]
push	eax
call	sub_64A680
mov	eax, [esp+10h+var_4]
jmp	short loc_64ACBC

loc_64AD17:		; jumptable 0064ABDD cases 6,7
mov	esi, [esi+10h]
test	esi, esi
jz	short loc_64AD33
mov	ecx, [esp+10h+arg_4]
lea	eax, [esi-10h]
push	eax
call	sub_652E40
pop	edi
pop	esi
add	esp, 8
retn	8

loc_64AD33:
mov	ecx, [esp+10h+arg_4]
xor	eax, eax
push	eax
call	sub_652E40
pop	edi
pop	esi
add	esp, 8
retn	8

loc_64AD47:		; jumptable 0064ABDD case 8
mov	eax, [esi+10h]
mov	ecx, [esp+10h+arg_4]
push	eax
call	sub_6528C0

loc_64AD54:		; default
pop	edi
pop	esi
add	esp, 8
retn	8
sub_64ABC0 endp

off_64AD5C dd offset loc_64ABE4	; jump table for switch	statement
dd offset loc_64AC20
dd offset loc_64ABFA
dd offset loc_64AC36
dd offset loc_64AC56
dd offset loc_64ACDA
dd offset loc_64AD17
dd offset loc_64AD17
dd offset loc_64AD47



sub_64AD80 proc	near

var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 20h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+2Ch+arg_0]
xor	ebx, ebx
mov	esi, ecx
cmp	byte ptr [esp+2Ch+arg_8], bl
jz	short loc_64ADB4
mov	eax, [edi]
push	eax
call	sub_654F00
cmp	eax, ebx
jz	short loc_64ADA9
lea	esi, [eax+78h]
cmp	esi, ebx
jnz	short loc_64ADB4

loc_64ADA9:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 20h
retn	0Ch

loc_64ADB4:
mov	ecx, [edi]
mov	[esp+2Ch+var_10], bl
mov	ecx, [ecx+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
push	ebp
call	eax
mov	ebp, [esp+2Ch+arg_8]
mov	edi, eax
mov	[esp+2Ch+var_1C], bl
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
mov	eax, ebp
lea	edx, [eax+1]
lea	ecx, [ecx+0]

loc_64ADE0:
mov	bl, [eax]
inc	eax
test	bl, bl
jnz	short loc_64ADE0
push	0
sub	eax, edx
push	eax
push	ebp
call	sub_650E40
mov	[esp+2Ch+arg_C], eax
inc	dword ptr [eax+8]
mov	edx, [esi]
mov	edx, [edx+10h]
lea	eax, [esp+2Ch+var_1C]
push	eax
lea	ecx, [esp+30h+arg_C]
push	ecx
push	edi
mov	ecx, esi
call	edx
test	al, al
mov	eax, [esp+30h+arg_8]
setz	bl
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
jnz	short loc_64AE29
call	sub_650DF0

loc_64AE29:
lea	ecx, [esp+2Ch+var_20]
call	sub_652830
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
test	bl, bl
jnz	loc_64ADA9
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch
sub_64AD80 endp

align 10h



sub_64AE50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_64AE5E
mov	eax, [eax+2Ch]
retn	4

loc_64AE5E:
xor	eax, eax
mov	eax, [eax+3Ch]
retn	4
sub_64AE50 endp

align 10h



sub_64AE70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_64AE7D
lea	ecx, [eax-0Ch]
jmp	short loc_64AE7F

loc_64AE7D:
xor	ecx, ecx

loc_64AE7F:
mov	eax, [ecx]
mov	edx, [eax+0A8h]
call	edx
test	eax, eax
jz	short locret_64AEA2
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	21h
mov	ecx, eax
call	edx

locret_64AEA2:
retn
sub_64AE70 endp

align 10h



sub_64AEB0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
mov	eax, [ebx]
push	ebp
mov	ebp, [esp+8+arg_0]
cmp	ebp, eax
jbe	short loc_64AEE6
push	esi
mov	esi, [ebx+4]
push	edi
lea	edi, [ebp+3FFh]
shr	edi, 0Ah
cmp	esi, edi
jnb	short loc_64AEDD

loc_64AED0:
push	esi
mov	ecx, ebx
call	sub_64AA50
inc	esi
cmp	esi, edi
jb	short loc_64AED0

loc_64AEDD:
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp
pop	ebx
retn	4

loc_64AEE6:
jnb	short loc_64AEEA
mov	[ebx], ebp

loc_64AEEA:
pop	ebp
pop	ebx
retn	4
sub_64AEB0 endp

align 10h



sub_64AEF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	ecx, [eax+280h]
mov	eax, ebp
lea	edx, [eax+1]
jmp	short loc_64AF10
align 10h

loc_64AF10:
mov	bl, [eax]
inc	eax
test	bl, bl
jnz	short loc_64AF10
push	0
sub	eax, edx
push	eax
push	ebp
call	sub_650E40
mov	[esp+10h+arg_0], eax
inc	dword ptr [eax+8]
mov	eax, [esp+10h+arg_8]
mov	edx, [esi]
mov	edx, [edx+2Ch]
push	eax
lea	ecx, [esp+14h+arg_0]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_64AF55
call	sub_650DF0

loc_64AF55:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
retn	0Ch
sub_64AEF0 endp

align 10h



sub_64AF60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
add	eax, 0FFFFFFFCh	; switch 5 cases
cmp	eax, 4
ja	short locret_64AFB2 ; default
jmp	ds:off_64AFB8[eax*4] ; switch jump

loc_64AF7A:		; jumptable 0064AF73 case 4
mov	eax, [esp+arg_4]
inc	dword ptr [eax+8]
retn	8

loc_64AF84:		; jumptable 0064AF73 case 5
mov	ecx, [esp+arg_4]
add	ecx, 0FFFFFFF4h
call	sub_64A420
retn	8

loc_64AF93:		; jumptable 0064AF73 case 8
mov	eax, [esp+arg_4]
inc	dword ptr [eax]
retn	8

loc_64AF9C:		; jumptable 0064AF73 cases 6,7
mov	ecx, [esp+arg_4]
call	sub_661C30
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

locret_64AFB2:		; default
retn	8
sub_64AF60 endp

align 4
off_64AFB8 dd offset loc_64AF7A	; jump table for switch	statement
dd offset loc_64AF84
dd offset loc_64AF9C
dd offset loc_64AF9C
dd offset loc_64AF93
align 10h



sub_64AFD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 0Ah
cmp	edi, [esi+4]
jb	short loc_64AFE8
push	edi
call	sub_64AAD0
test	al, al
jz	short loc_64AFFD

loc_64AFE8:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
and	ecx, 3FFh
lea	eax, [edx+ecx*4]
test	eax, eax
jnz	short loc_64B004

loc_64AFFD:
pop	edi
xor	al, al
pop	esi
retn	4

loc_64B004:
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	[eax], edx
inc	dword ptr [esi]
pop	edi
mov	al, 1
pop	esi
retn	4
sub_64AFD0 endp

align 10h



sub_64B020 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	ecx, eax
and	ecx, 70000000h
cmp	ecx, 20000000h
jnz	short loc_64B083
mov	edx, eax
shr	edx, 1Fh
test	dl, 1
jnz	short loc_64B083
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [esi]
mov	edx, [eax]
push	3
mov	ecx, esi
call	edx
mov	ecx, [esi+8]
mov	eax, [esi+4]
and	ecx, 70000000h
cmp	ecx, 40000000h
jz	short loc_64B07F
mov	edx, [eax+1Ch]
mov	[esi+4], edx
mov	[eax+1Ch], esi
mov	eax, [esi+8]
and	eax, 0CFFFFFFFh
or	eax, 40000000h
mov	[esi+8], eax

loc_64B07F:
mov	al, 1
pop	esi
retn

loc_64B083:
xor	al, al
pop	esi
retn
sub_64B020 endp

align 10h



sub_64B090 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	[esi+8], eax
mov	ecx, 1
mov	[esi+4], ecx
mov	dword ptr [esi], offset	off_1431760
add	[eax+8], ecx
mov	eax, [esp+4+arg_4]
mov	ecx, [esi+8]
mov	edx, [ecx]
push	eax
push	edx
lea	eax, [esi+0Ch]
push	eax
call	sub_67BBC0
mov	eax, esi
pop	esi
retn	8
sub_64B090 endp

align 10h



sub_64B0D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	dword ptr [esi], offset	off_1431760
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_64B0E7
call	sub_650DF0

loc_64B0E7:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_64B103
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_64B103:
mov	eax, esi
pop	esi
retn	4
sub_64B0D0 endp

align 10h



sub_64B110 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	edx, ecx
test	byte ptr [edx+20h], 1
mov	[esp+10h+var_10], edx
jnz	loc_64B396
mov	eax, [edx+8]
xor	ecx, ecx
mov	[esp+10h+var_C], eax
cmp	eax, ecx
jz	loc_64B396
push	ebx
push	ebp
push	esi
push	edi
mov	[esp+20h+var_8], ecx
mov	[esp+20h+var_4], ecx
jmp	short loc_64B145

loc_64B141:
mov	eax, [esp+20h+var_C]

loc_64B145:
add	[esp+20h+var_8], eax
xor	ebp, ebp
xor	ebx, ebx
test	eax, eax
jbe	loc_64B1E3

loc_64B155:
mov	ecx, [edx+14h]
mov	esi, ebx
shr	esi, 0Ah
mov	edi, ebx
and	edi, 3FFh
add	esi, esi
add	esi, esi
mov	ecx, [esi+ecx]
add	edi, edi
add	edi, edi
mov	ecx, [edi+ecx]
test	cl, 1
jnz	short loc_64B1DA
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 30000000h
jnz	short loc_64B1A2
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
jmp	short loc_64B1B1

loc_64B1A2:
and	eax, 7FFFFFFFh
mov	[ecx+8], eax
mov	dword ptr [ecx+0Ch], 0FFFFFFFFh

loc_64B1B1:
mov	eax, [esp+20h+var_10]
mov	eax, [eax+14h]
mov	ecx, [eax+esi]
mov	ecx, [edi+ecx]
mov	edx, ebp
shr	edx, 0Ah
mov	eax, [eax+edx*4]
mov	edx, [esp+20h+var_10]
mov	esi, ebp
and	esi, 3FFh
mov	[eax+esi*4], ecx
mov	eax, [esp+20h+var_C]
inc	ebp

loc_64B1DA:
inc	ebx
cmp	ebx, eax
jb	loc_64B155

loc_64B1E3:
mov	eax, [edx+8]
cmp	ebp, eax
jbe	short loc_64B214
mov	esi, [edx+0Ch]
lea	edi, [ebp+3FFh]
shr	edi, 0Ah
cmp	esi, edi
jnb	short loc_64B216
lea	ebx, [ebx+0]

loc_64B200:
push	esi
lea	ecx, [edx+8]
call	sub_64AA50
mov	edx, [esp+20h+var_10]
inc	esi
cmp	esi, edi
jb	short loc_64B200
jmp	short loc_64B216

loc_64B214:
jnb	short loc_64B219

loc_64B216:
mov	[edx+8], ebp

loc_64B219:
xor	esi, esi
test	ebp, ebp
jbe	short loc_64B27B
nop

loc_64B220:
mov	ecx, [edx+14h]
mov	eax, esi
shr	eax, 0Ah
mov	eax, [ecx+eax*4]
mov	edi, esi
and	edi, 3FFh
mov	ecx, [eax+edi*4]
test	ecx, ecx
jz	short loc_64B276
mov	eax, [ecx+8]
mov	edi, eax
and	edi, 70000000h
cmp	edi, 10000000h
jnz	short loc_64B276
mov	edx, [ecx]
test	eax, 0FFFFFFFh
jbe	short loc_64B25F
and	eax, 8FFFFFFFh
push	2
jmp	short loc_64B26B

loc_64B25F:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_64B26B:
mov	[ecx+8], eax
mov	eax, [edx]
call	eax
mov	edx, [esp+20h+var_10]

loc_64B276:
inc	esi
cmp	esi, ebp
jb	short loc_64B220

loc_64B27B:
xor	edi, edi
test	ebp, ebp
jbe	loc_64B316

loc_64B285:
mov	eax, [edx+14h]
mov	ecx, edi
shr	ecx, 0Ah
mov	ecx, [eax+ecx*4]
mov	esi, edi
and	esi, 3FFh
mov	esi, [ecx+esi*4]
test	esi, esi
jz	short loc_64B30D
and	dword ptr [esi+8], 7FFFFFFFh
mov	eax, [esi+8]
mov	ecx, eax
and	ecx, 70000000h
mov	dword ptr [esi+0Ch], 0FFFFFFFFh
cmp	ecx, 20000000h
jnz	short loc_64B30D
mov	ecx, eax
shr	ecx, 1Fh
test	cl, 1
jnz	short loc_64B30D
mov	edx, [esi]
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [edx]
push	3
mov	ecx, esi
call	eax
mov	ecx, [esi+8]
mov	eax, [esi+4]
and	ecx, 70000000h
cmp	ecx, 40000000h
jz	short loc_64B309
mov	edx, [eax+1Ch]
mov	[esi+4], edx
mov	[eax+1Ch], esi
mov	eax, [esi+8]
and	eax, 0CFFFFFFFh
or	eax, 40000000h
mov	[esi+8], eax

loc_64B309:
mov	edx, [esp+20h+var_10]

loc_64B30D:
inc	edi
cmp	edi, ebp
jb	loc_64B285

loc_64B316:
xor	ebx, ebx
cmp	[edx+8], ebx
jbe	short loc_64B320
mov	[edx+8], ebx

loc_64B320:
mov	esi, [edx+1Ch]
mov	dword ptr [edx+18h], 0FFFFFFFFh
cmp	esi, ebx
jz	short loc_64B355
mov	edi, edi

loc_64B330:
mov	edx, [esi]
mov	eax, [edx+4]
mov	edi, [esi+4]
mov	ecx, esi
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
inc	ebx
mov	esi, edi
test	edi, edi
jnz	short loc_64B330
mov	edx, [esp+20h+var_10]

loc_64B355:
mov	eax, [edx+8]
add	[esp+20h+var_4], ebx
mov	dword ptr [edx+1Ch], 0
mov	[esp+20h+var_C], eax
test	eax, eax
ja	loc_64B141
mov	ecx, [esp+20h+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_64B38E
mov	eax, [esp+10h+var_8]
mov	edx, [esp+10h+var_4]
mov	[ecx], eax
cmp	eax, edx
jb	short loc_64B38B
mov	eax, edx

loc_64B38B:
mov	[ecx+4], eax

loc_64B38E:
mov	al, 1
add	esp, 10h
retn	4

loc_64B396:
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_64B3A5
xor	eax, eax
mov	[ecx], eax
mov	[ecx+4], eax

loc_64B3A5:
xor	al, al
add	esp, 10h
retn	4
sub_64B110 endp

align 10h



sub_64B3B0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+8]
test	eax, 0FFFFFFFh
jz	loc_64B526
dec	eax
push	edi
mov	[esi+8], eax
test	eax, 0FFFFFFFh
jnz	short loc_64B43E
mov	eax, [esi]
mov	edx, [eax]
push	0
call	edx
and	dword ptr [esi+8], 8FFFFFFFh
mov	eax, [esi+8]
shr	eax, 1Fh
test	al, 1
jz	short loc_64B423
mov	edx, [esi+4]
mov	eax, [esi+0Ch]
lea	ecx, [edx+8]
lea	edi, [eax+1]
cmp	edi, [ecx]
jz	short loc_64B41D
mov	ecx, [edx+18h]
mov	edx, [edx+14h]
mov	edi, eax
add	ecx, ecx
or	ecx, 1
shr	edi, 0Ah
mov	edx, [edx+edi*4]
and	eax, 3FFh
mov	[edx+eax*4], ecx
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
mov	[eax+18h], ecx
jmp	short loc_64B423

loc_64B41D:
push	eax
call	sub_64AEB0

loc_64B423:
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
pop	ecx
retn

loc_64B43E:
mov	ecx, eax
and	ecx, 70000000h
cmp	ecx, 30000000h
jz	loc_64B525
and	eax, 0BFFFFFFFh
or	eax, 30000000h
mov	edx, eax
shr	edx, 1Fh
mov	[esi+8], eax
test	dl, 1
jnz	loc_64B525
mov	ecx, [esi+4]
or	edi, 0FFFFFFFFh
or	eax, 80000000h
cmp	[ecx+18h], edi
jz	short loc_64B4BB
mov	edx, [ecx+18h]
mov	[esi+0Ch], edx
mov	[esi+8], eax
mov	eax, [ecx+18h]
mov	ecx, [ecx+14h]
mov	edx, eax
shr	edx, 0Ah
mov	edx, [ecx+edx*4]
mov	edi, eax
and	edi, 3FFh
mov	edx, [edx+edi*4]
mov	edi, eax
shr	edi, 0Ah
mov	ecx, [ecx+edi*4]
sar	edx, 1
and	eax, 3FFh
mov	[ecx+eax*4], esi
mov	eax, [esi+4]
pop	edi
mov	[eax+18h], edx
pop	esi
pop	ecx
retn

loc_64B4BB:
mov	edx, [ecx+8]
mov	[esi+8], eax
mov	[esi+0Ch], edx
or	byte ptr [ecx+20h], 1
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, [esi+4]
add	ecx, 8
mov	[esp+10h+var_4], esi
call	sub_64AFD0
test	al, al
jnz	short loc_64B51E
mov	eax, [esi+4]
and	byte ptr [eax+20h], 0FEh
mov	ecx, [esi+4]
push	0
call	sub_64B110
mov	ecx, [esi+4]
or	byte ptr [ecx+20h], 1
test	al, al
jz	short loc_64B514
mov	ecx, [esi+4]
lea	edx, [esp+0Ch+var_4]
push	edx
add	ecx, 8
mov	[esp+10h+var_4], esi
call	sub_64AFD0
test	al, al
jnz	short loc_64B51E

loc_64B514:
and	dword ptr [esi+8], 0FFFFFFFh
mov	[esi+0Ch], edi

loc_64B51E:
mov	esi, [esi+4]
and	byte ptr [esi+20h], 0FEh

loc_64B525:
pop	edi

loc_64B526:
pop	esi
pop	ecx
retn
sub_64B3B0 endp

align 10h



sub_64B530 proc	near
push	ebx
mov	ebx, ecx
push	ebp
mov	ebp, [ebx+1Ch]
test	ebp, ebp
jz	short loc_64B546
mov	eax, [ebp+200h]
mov	[ebx+1Ch], eax
jmp	short loc_64B55D

loc_64B546:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+38h]
push	0
push	204h
push	ebx
call	eax
mov	ebp, eax

loc_64B55D:
test	ebp, ebp
jz	short loc_64B5BB
push	esi
mov	esi, [ebx+14h]
push	edi
lea	edi, [ebx+10h]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_64B57B
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_64B590
push	esi
jmp	short loc_64B588

loc_64B57B:
cmp	esi, [edi+8]
jb	short loc_64B590
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_64B588:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_64B590:
mov	eax, [edi]
mov	[edi+4], esi
lea	eax, [eax+esi*4-4]
pop	edi
pop	esi
test	eax, eax
jz	short loc_64B5A1
mov	[eax], ebp

loc_64B5A1:
mov	ecx, [ebx+8]
mov	[ebx+4], ebp
lea	edx, [ebp+200h]
mov	[ebx], ebp
sub	ecx, 10h
pop	ebp
mov	[ebx+0Ch], ecx
mov	[ebx+8], edx
pop	ebx
retn

loc_64B5BB:
add	dword ptr [ebx], 0FFFFFFF0h
pop	ebp
pop	ebx
retn
sub_64B530 endp

align 10h



sub_64B5D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
add	eax, 0FFFFFFFCh	; switch 5 cases
cmp	eax, 4
ja	short locret_64B62D ; default
jmp	ds:off_64B644[eax*4] ; switch jump

loc_64B5EA:		; jumptable 0064B5E3 case 4
mov	ecx, [esp+arg_4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short locret_64B62D ; default
call	sub_650DF0
retn	8

loc_64B5FC:		; jumptable 0064B5E3 case 5
mov	ecx, [esp+arg_4]
add	ecx, 0FFFFFFF4h
call	sub_64A430
retn	8

loc_64B60B:		; jumptable 0064B5E3 case 8
push	esi
mov	esi, [esp+4+arg_4]
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_64B62C
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_64B62C:
pop	esi

locret_64B62D:		; default
retn	8

loc_64B630:		; jumptable 0064B5E3 cases 6,7
mov	ecx, [esp+arg_4]
call	sub_661C30
mov	ecx, eax
call	sub_64B3B0
retn	8
sub_64B5D0 endp

align 4
off_64B644 dd offset loc_64B5EA	; jump table for switch	statement
dd offset loc_64B5FC
dd offset loc_64B630
dd offset loc_64B630
dd offset loc_64B60B
align 10h



sub_64B660 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+14h], 1
jbe	loc_64B6F3
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
mov	eax, [ecx+eax*4-4]
mov	edx, [esi+1Ch]
push	ebx
push	edi
lea	edi, [esi+10h]
mov	[eax+200h], edx
mov	[esi+1Ch], eax
mov	eax, [edi+4]
lea	ebx, [eax-1]
cmp	ebx, eax
jnb	short loc_64B69E
mov	eax, [edi+8]
shr	eax, 1
cmp	ebx, eax
jnb	short loc_64B6B3
push	ebx
jmp	short loc_64B6AB

loc_64B69E:
cmp	ebx, [edi+8]
jb	short loc_64B6B3
mov	ecx, ebx
shr	ecx, 2
add	ecx, ebx
push	ecx

loc_64B6AB:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_64B6B3:
mov	[edi+4], ebx
mov	eax, [edi]
mov	edx, ebx
mov	eax, [eax+edx*4-4]
mov	[esi+4], eax
add	eax, 200h
mov	[esi+8], eax
add	eax, 0FFFFFFF0h
mov	[esi], eax
mov	eax, [esi+14h]
cmp	eax, 1
jbe	short loc_64B6E9
mov	ecx, [edi]
mov	edx, [ecx+eax*4-8]
add	edx, 1F0h
pop	edi
mov	[esi+0Ch], edx
pop	ebx

loc_64B6E7:
pop	esi
retn

loc_64B6E9:
mov	eax, [esi+4]
pop	edi
pop	ebx
mov	[esi+0Ch], eax
pop	esi
retn

loc_64B6F3:
add	dword ptr [esi], 10h
mov	esi, [esi]
jz	short loc_64B6E7
mov	byte ptr [esi],	0
pop	esi
retn
sub_64B660 endp

align 10h



sub_64B700 proc	near

var_4= dword ptr -4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
cmp	ebp, edi
jnz	short loc_64B730
mov	eax, [esi]
cmp	eax, edi
jz	short loc_64B726
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_64B726:
mov	[esi+8], edi
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_64B730:
mov	ecx, dword_1855FC0
add	ebp, 3
shr	ebp, 2
add	ebp, ebp
add	ebp, ebp
cmp	[esi], edi
jz	short loc_64B7BC
push	ebx
lea	eax, [esp+14h+var_4]
push	eax
lea	eax, [ebp+ebp*2+0]
add	eax, eax
add	eax, eax
mov	[esp+18h+var_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
xor	ebx, ebx
mov	[esp+10h+arg_8], eax
cmp	[esi+4], edi
jbe	short loc_64B79B
nop

loc_64B770:
mov	eax, [esp+10h+arg_8]
lea	ecx, [edi+eax]
test	ecx, ecx
jz	short loc_64B785
mov	edx, [esi]
add	edx, edi
push	edx
call	sub_580E60

loc_64B785:
mov	ecx, [esi]
mov	eax, [ecx+edi]
mov	edx, [eax]
add	ecx, edi
push	0
call	edx
inc	ebx
add	edi, 18h
cmp	ebx, [esi+4]
jb	short loc_64B770

loc_64B79B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+14h+arg_4]
pop	ebx
pop	edi
mov	[esi+8], ebp
mov	[esi], ecx
pop	esi
pop	ebp
pop	ecx
retn	8

loc_64B7BC:
lea	eax, [esp+10h+arg_4]
push	eax
lea	eax, [ebp+ebp*2+0]
add	eax, eax
add	eax, eax
mov	[esp+14h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
pop	edi
mov	[esi+8], ebp
mov	[esi], eax
pop	esi
pop	ebp
pop	ecx
retn	8
sub_64B700 endp

align 10h



sub_64B7F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[eax+8], edx
mov	edx, [esp+arg_C]
mov	dword ptr [eax], offset	off_1431764
mov	[eax+14h], cl
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	ecx, [esp+arg_8]
mov	[eax+18h], ecx
mov	ecx, [esp+arg_10]
mov	[eax+1Ch], edx
mov	[eax+20h], ecx
retn	14h
sub_64B7F0 endp

align 10h



sub_64B830 proc	near
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1431764
xor	edi, edi
test	byte ptr [esi+14h], 2
jnz	short loc_64B84E
mov	ecx, [esi+0Ch]
cmp	ecx, edi
jz	short loc_64B84E
call	sub_64B3B0

loc_64B84E:
test	byte ptr [esi+14h], 1
mov	[esi+0Ch], edi
jnz	short loc_64B863
mov	ecx, [esi+10h]
cmp	ecx, edi
jz	short loc_64B863
call	sub_64B3B0

loc_64B863:
mov	[esi+10h], edi
pop	edi
mov	dword ptr [esi], offset	off_143F300
pop	esi
retn
sub_64B830 endp

align 10h



; int __thiscall sub_64B870(void *, char)
sub_64B870 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1431764
test	byte ptr [esi+14h], 2
jnz	short loc_64B88B
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_64B88B
call	sub_64B3B0

loc_64B88B:
test	byte ptr [esi+14h], 1
mov	dword ptr [esi+0Ch], 0
jnz	short loc_64B8A4
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_64B8A4
call	sub_64B3B0

loc_64B8A4:
test	[esp+4+arg_0], 1
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi], offset	off_143F300
jz	short loc_64B8C1
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_64B8C1:
mov	eax, esi
pop	esi
retn	4
sub_64B870 endp

align 10h



sub_64B8D0 proc	near

var_11=	byte ptr -11h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+8], 0
push	edi
jnz	short loc_64B911
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+1Ch+var_11]
push	eax
mov	eax, [esp+20h+arg_0]
lea	ecx, [esp+20h+var_10]
push	ecx
mov	ecx, [eax]
add	ecx, 144h
push	ecx
push	eax
mov	ecx, esi
mov	[esp+2Ch+var_11], 3
mov	[esp+2Ch+var_10], 0Ah
call	edx
lea	ecx, [esp+1Ch+var_10]
call	sub_652830

loc_64B911:
mov	edi, [esp+1Ch+arg_4]
test	edi, edi
jz	short loc_64B925
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_64B925:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_64B931
call	sub_64B3B0

loc_64B931:
mov	[esi+8], edi
pop	edi
pop	esi
add	esp, 14h
retn	8
sub_64B8D0 endp

align 10h



; int __stdcall	sub_64B940(int,	int, char, int,	char, int, float, __int16, char, char)
sub_64B940 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	word ptr  20h
arg_20=	byte ptr  24h
arg_24=	byte ptr  28h

mov	eax, ecx
push	esi
mov	esi, [esp+4+arg_C]
xor	edx, edx
mov	[eax], edx
mov	[eax+4], edx
mov	[eax+8], edx
push	edi
lea	edi, [eax+0Ch]
mov	ecx, 8
rep movsd
mov	ecx, [esp+8+arg_14]
pop	edi
pop	esi
fld	dword ptr [ecx]
fstp	dword ptr [eax+2Ch]
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+30h]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+34h]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+38h]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+3Ch]
fld	dword ptr [ecx+14h]
mov	ecx, [esp+arg_0]
fstp	dword ptr [eax+40h]
mov	[eax+4Ch], ecx
fld	[esp+arg_18]
mov	[eax+53h], dl
fstp	dword ptr [eax+44h]
cmp	[esp+arg_10], dl
jz	short loc_64B9A0
or	byte ptr [eax+53h], 4

loc_64B9A0:
cmp	[esp+arg_8], dl
jz	short loc_64B9AA
or	byte ptr [eax+53h], 8

loc_64B9AA:
cmp	[esp+arg_20], dl
jz	short loc_64B9B4
or	byte ptr [eax+53h], 80h

loc_64B9B4:
mov	edx, [esp+arg_4]
mov	[eax+48h], edx
mov	dl, [esp+arg_24]
mov	[eax+4Ch], ecx
mov	cx, [esp+arg_1C]
mov	[eax+50h], cx
mov	[eax+52h], dl
retn	28h
sub_64B940 endp

align 10h



sub_64B9E0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+38h], 0
jz	short loc_64BA48
mov	eax, [esi+38h]
test	eax, eax
jz	short loc_64B9FD
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_64B9FD:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_64BA09
call	sub_64B3B0

loc_64BA09:
mov	edx, [esi+38h]
mov	[esi+34h], edx
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_64BA1B
call	sub_64B3B0

loc_64BA1B:
mov	dword ptr [esi+38h], 0
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_64BA36
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_64BA36:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_64BA42
call	sub_64B3B0

loc_64BA42:
mov	edx, [esi+34h]
mov	[esi+18h], edx

loc_64BA48:
pop	esi
retn
sub_64B9E0 endp

align 10h



sub_64BA50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
call	sub_67BD30
mov	ebp, [esp+10h+arg_4]
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_14317C8
mov	dword ptr [ebx], offset	off_1431770
test	ebp, ebp
jz	short loc_64BA7E
mov	ecx, ebp
call	sub_64A420

loc_64BA7E:
mov	eax, [esp+10h+arg_8]
mov	[esi+34h], ebp
mov	[esi+38h], eax
mov	ecx, [edi]
push	7
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_64BA50 endp

align 10h



sub_64BAB0 proc	near

arg_4= dword ptr  8

xor	eax, eax
cmp	ecx, [esp+arg_4]
setz	al
retn	8
sub_64BAB0 endp

align 10h



sub_64BAC0 proc	near
mov	eax, 17h
retn
sub_64BAC0 endp

align 10h



sub_64BAD0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_64BB10
align 10h

loc_64BAE0:
push	esi
mov	esi, ecx
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_64BAEF
call	sub_64A430

loc_64BAEF:
mov	dword ptr [esi+34h], 0
mov	ecx, esi
pop	esi
jmp	sub_664580
align 10h

loc_64BB00:
xor	eax, eax
cmp	[ecx+34h], eax
setz	al
retn
align 10h

loc_64BB10:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14317C8
mov	dword ptr [esi+10h], offset off_1431770
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_64BB2C
call	sub_64A430

loc_64BB2C:
mov	ecx, esi
call	sub_67BDD0
test	[esp+4+arg_0], 1
jz	short loc_64BB48
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_64BB48:
mov	eax, esi
pop	esi
retn	4
sub_64BAD0 endp

align 10h



sub_64BB50 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	edx, [esp+10h+arg_4]
mov	eax, [edx]
push	esi
mov	esi, [ecx]
push	edi
add	eax, 14Ch
lea	edi, [esp+18h+var_10]
push	edi
push	eax
mov	eax, [esi+2Ch]
push	edx
mov	[esp+24h+var_10], 0
call	eax
mov	esi, [esp+18h+arg_0]
mov	ecx, edi
test	al, al
jz	short loc_64BB96
push	0
push	esi
call	sub_652DC0
mov	ecx, edi
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
add	esp, 10h
retn	8

loc_64BB96:
mov	byte ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
add	esp, 10h
retn	8
sub_64BB50 endp

align 10h



sub_64BBC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_8]
mov	eax, [esi]
mov	edx, [eax+4]
mov	ebx, ecx
push	edi
mov	ecx, esi
call	edx
mov	edi, [esp+10h+arg_4]
test	al, al
jns	short loc_64BBEE
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
mov	ebp, eax
and	ebp, 0FFFFFF7Fh
jmp	short loc_64BC29

loc_64BBEE:
movzx	eax, byte ptr [edi]
cmp	eax, 0Ah	; switch 11 cases
ja	short loc_64BC24 ; default
			; jumptable 0064BBF6 cases 5,9
jmp	ds:off_64BE10[eax*4] ; switch jump

loc_64BBFD:		; jumptable 0064BBF6 cases 0,10
xor	ebp, ebp
jmp	short loc_64BC29

loc_64BC01:		; jumptable 0064BBF6 case 2
mov	ebp, 2
jmp	short loc_64BC29

loc_64BC08:		; jumptable 0064BBF6 case 1
mov	ebp, 1
jmp	short loc_64BC29

loc_64BC0F:		; jumptable 0064BBF6 cases 3,4
mov	ebp, 3
jmp	short loc_64BC29

loc_64BC16:		; jumptable 0064BBF6 cases 6,8
mov	ebp, 6
jmp	short loc_64BC29

loc_64BC1D:		; jumptable 0064BBF6 case 7
mov	ebp, 8
jmp	short loc_64BC29

loc_64BC24:		; default
mov	ebp, 4		; jumptable 0064BBF6 cases 5,9

loc_64BC29:
mov	eax, [esi+0Ch]
shr	eax, 6
test	al, 1
jz	short loc_64BC47
mov	ecx, [esi+10h]
push	ecx
mov	ecx, [esi+8]
push	esi
call	sub_64B5D0
mov	dword ptr [esi+8], 0

loc_64BC47:		; switch 9 cases
cmp	ebp, 8
ja	loc_64BE07	; default
			; jumptable 0064BC50 case 7
jmp	ds:off_64BE3C[ebp*4] ; switch jump

loc_64BC57:		; jumptable 0064BC50 cases 0,1
pop	edi
mov	[esi+0Ch], ebp
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_64BC61:		; jumptable 0064BC50 case 2
mov	edx, [esp+10h+arg_0]
push	edx
mov	ecx, edi
mov	dword ptr [esi+0Ch], 2
call	sub_651D80
pop	edi
mov	[esi+10h], al
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_64BC7E:		; jumptable 0064BC50 case 3
mov	eax, [esp+10h+arg_0]
push	eax
mov	ecx, edi
mov	dword ptr [esi+0Ch], 3
call	sub_653400
fstp	qword ptr [esi+10h]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_64BC9B:		; jumptable 0064BC50 case 4
mov	ecx, [esp+10h+arg_0]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+1Ch+arg_0]
push	edx
mov	ecx, edi
call	sub_652F60
mov	eax, [esp+10h+arg_0]
mov	dword ptr [esi+0Ch], 44h
mov	[esi+10h], eax
mov	ecx, [ebx+10h]
push	eax
mov	[esi+8], ecx
mov	ecx, [ebx+10h]
push	esi
call	sub_64AF60

loc_64BCCE:
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_64BE07	; default
			; jumptable 0064BC50 case 7
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_64BCEF:		; jumptable 0064BC50 case 5
mov	edx, [esp+10h+arg_0]
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+1Ch+arg_0]
push	eax
mov	ecx, edi
call	sub_652F60
mov	ebp, [esp+10h+arg_0]
lea	ecx, [esp+10h+arg_0]
call	sub_650650
mov	ecx, [ebx+20h]
mov	edx, [ecx]
mov	edx, [edx+28h]
mov	edi, eax
inc	edi
push	0
lea	eax, [edi+edi+0Fh]
push	eax
call	edx
mov	dword ptr [esi+0Ch], 45h
test	eax, eax
jz	short loc_64BD3D
push	edi
push	ebp
mov	ecx, eax
call	sub_64B090
mov	edi, eax
jmp	short loc_64BD3F

loc_64BD3D:
xor	edi, edi

loc_64BD3F:
lea	eax, [edi+0Ch]
mov	[esi+10h], eax
mov	ecx, [ebx+10h]
push	eax
mov	[esi+8], ecx
mov	ecx, [ebx+10h]
push	esi
call	sub_64AF60
test	edi, edi
jz	loc_64BCCE
mov	ecx, edi
call	sub_64A430
jmp	loc_64BCCE

loc_64BD69:		; jumptable 0064BC50 case 6
mov	edx, [esp+10h+arg_0]
push	edx
mov	ecx, edi
mov	ebp, 6
call	sub_652D70
mov	edi, eax
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
add	eax, 0FFFFFFFAh
cmp	eax, 26h
ja	short loc_64BDA5
mov	ecx, edi
call	sub_661C30
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 7
jnz	short loc_64BDA5
mov	ebp, eax

loc_64BDA5:
or	ebp, 40h
mov	[esi+0Ch], ebp
mov	[esi+10h], edi
mov	eax, [ebx+10h]
push	edi
mov	[esi+8], eax
mov	ecx, [ebx+10h]
push	esi
call	sub_64AF60
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_64BDC5:		; jumptable 0064BC50 case 8
mov	ecx, [esp+10h+arg_0]
push	ecx
mov	ecx, edi
call	sub_652D70
mov	ecx, eax
call	sub_661C10
mov	dword ptr [esi+0Ch], 48h
mov	ecx, [eax+94h]
test	ecx, ecx
jnz	short loc_64BDF2
mov	ecx, eax
call	sub_658B70
jmp	short loc_64BDF4

loc_64BDF2:
mov	eax, ecx

loc_64BDF4:
mov	[esi+10h], eax
mov	edx, [ebx+10h]
push	eax
mov	[esi+8], edx
mov	ecx, [ebx+10h]
push	esi
call	sub_64AF60

loc_64BE07:		; default
pop	edi		; jumptable 0064BC50 case 7
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_64BBC0 endp

align 10h
off_64BE10 dd offset loc_64BBFD	; jump table for switch	statement
dd offset loc_64BC08
dd offset loc_64BC01
dd offset loc_64BC0F
dd offset loc_64BC0F
dd offset loc_64BC24
dd offset loc_64BC16
dd offset loc_64BC1D
dd offset loc_64BC16
dd offset loc_64BC24
dd offset loc_64BBFD
off_64BE3C dd offset loc_64BC57	; jump table for switch	statement
dd offset loc_64BC57
dd offset loc_64BC61
dd offset loc_64BC7E
dd offset loc_64BC9B
dd offset loc_64BCEF
dd offset loc_64BD69
dd offset loc_64BE07
dd offset loc_64BDC5



sub_64BE60 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	edx, [esp+1Ch+arg_4]
mov	ebx, eax
mov	eax, [ebx+78h]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	[esp+1Ch+var_10], 5
mov	[esp+1Ch+var_C], esi
add	[esi+8], eax
mov	eax, [esp+1Ch+arg_0]
push	eax
lea	ecx, [esp+20h+var_10]
push	ecx
push	ebx
mov	ecx, edi
call	sub_64BBC0
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_64BEC5
mov	ecx, esi
call	sub_650DF0

loc_64BEC5:
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	8
sub_64BE60 endp

align 10h



sub_64BED0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	edx, [esp+20h+arg_4]
mov	ebx, eax
mov	eax, [ebx+78h]
mov	ecx, [eax+280h]
push	edx
call	sub_651030
mov	ebp, [esp+20h+arg_0]
mov	esi, eax
inc	dword ptr [esi+8]
mov	eax, [ebp+0]
mov	edx, [eax+24h]
push	85h
mov	ecx, ebp
call	edx
push	ebp
lea	eax, [esp+24h+var_10]
push	eax
mov	byte ptr [esp+28h+var_10], 5
mov	[esp+28h+var_C], esi
inc	dword ptr [esi+8]
push	ebx
mov	ecx, edi
call	sub_64BBC0
lea	ecx, [esp+20h+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_64BF40
mov	ecx, esi
call	sub_650DF0

loc_64BF40:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_64BED0 endp

align 10h



sub_64BF50 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	esi
push	edi
call	edx
mov	esi, eax
mov	eax, [esi+78h]
mov	ecx, [eax+2ACh]
push	0FFFFFFFFh
push	0
add	eax, 10h
push	eax
push	ecx
mov	ecx, esi
call	sub_671840
mov	edi, eax
push	edi
lea	ecx, [esp+20h+var_10]
call	sub_652700
mov	eax, [esp+1Ch+arg_0]
push	eax
lea	ecx, [esp+20h+var_10]
push	ecx
push	esi
mov	ecx, ebx
call	sub_64BBC0
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
test	edi, edi
jz	short loc_64BFAF
mov	ecx, edi
call	sub_64B3B0

loc_64BFAF:
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_64BF50 endp

align 10h



sub_64BFC0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	ebp, eax
xor	ebx, ebx
mov	[esp+2Ch+var_10], bl
mov	eax, [ebp+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
lea	esi, [ebp+78h]
push	ebx
push	3Ch
call	eax
cmp	eax, ebx
jz	short loc_64C00B
mov	ecx, [esp+2Ch+arg_8]
mov	edx, [esp+2Ch+arg_4]
push	ecx
push	edx
push	esi
mov	ecx, eax
call	sub_64BA50
mov	esi, eax
jmp	short loc_64C00D

loc_64C00B:
xor	esi, esi

loc_64C00D:
mov	[esp+2Ch+var_14], bl
mov	[esp+2Ch+var_1C], esi
cmp	esi, ebx
jz	short loc_64C025
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax

loc_64C025:
lea	ecx, [esp+2Ch+var_1C]
push	ecx
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+var_18], ebx
call	sub_652940
test	[esp+2Ch+var_14], 2
jnz	short loc_64C04B
mov	ecx, [esp+2Ch+var_1C]
cmp	ecx, ebx
jz	short loc_64C04B
call	sub_64B3B0

loc_64C04B:
test	[esp+2Ch+var_14], 1
mov	[esp+2Ch+var_1C], ebx
jnz	short loc_64C063
mov	ecx, [esp+2Ch+var_18]
cmp	ecx, ebx
jz	short loc_64C063
call	sub_64B3B0

loc_64C063:
mov	edx, [esp+2Ch+arg_0]
push	edx
lea	eax, [esp+30h+var_10]
push	eax
push	ebp
mov	ecx, edi
call	sub_64BBC0
cmp	esi, ebx
jz	short loc_64C080
mov	ecx, esi
call	sub_64B3B0

loc_64C080:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	0Ch
sub_64BFC0 endp

align 10h



sub_64C0A0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
cmp	byte ptr [esp+10h+arg_C], 0
push	ebp
mov	ebp, ecx
mov	ecx, [esp+14h+arg_0]
push	esi
mov	esi, ecx
jz	short loc_64C0E3
mov	eax, [ebp+0]
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_64C0C8
lea	esi, [eax+78h]
test	esi, esi
jnz	short loc_64C0E3

loc_64C0C8:
mov	ecx, [esp+18h+arg_8]
test	ecx, ecx
jz	short loc_64C0D9
mov	edx, [ecx]
mov	eax, [edx+24h]
push	0
call	eax

loc_64C0D9:
pop	esi
xor	al, al
pop	ebp
add	esp, 10h
retn	10h

loc_64C0E3:
mov	ecx, [ebp+0]
mov	[esp+18h+var_10], 0
mov	ecx, [ecx+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
push	ebx
push	edi
call	eax
mov	edx, [esp+20h+arg_4]
mov	edi, eax
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	edx
call	sub_651000
mov	[esp+20h+arg_C], eax
inc	dword ptr [eax+8]
mov	eax, [esi]
mov	eax, [eax+10h]
lea	ecx, [esp+20h+var_10]
push	ecx
lea	edx, [esp+24h+arg_C]
push	edx
push	edi
mov	ecx, esi
call	eax
test	al, al
mov	eax, [esp+20h+arg_C]
setz	bl
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_64C142
call	sub_650DF0

loc_64C142:
test	bl, bl
jz	short loc_64C16C
mov	ecx, [esp+20h+arg_8]
test	ecx, ecx
jz	short loc_64C157
mov	edx, [ecx]
mov	eax, [edx+24h]
push	0
call	eax

loc_64C157:
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	ebx
pop	esi
xor	al, al
pop	ebp
add	esp, 10h
retn	10h

loc_64C16C:
cmp	[esp+20h+var_10], 9
jnz	short loc_64C1C3
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
xor	ebx, ebx
call	eax
add	eax, 0FFFFFFFAh
cmp	eax, 26h
ja	short loc_64C198
mov	ecx, esi
call	sub_661C30
test	eax, eax
jz	short loc_64C196
lea	ebx, [eax+10h]
jmp	short loc_64C198

loc_64C196:
xor	ebx, ebx

loc_64C198:
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_64C1B7
mov	ecx, esi
call	sub_661C10
test	eax, eax
jz	short loc_64C1B7
lea	ebx, [eax+78h]

loc_64C1B7:
lea	ecx, [esp+20h+var_10]
push	ecx
push	ebx
push	edi
call	sub_6529F0

loc_64C1C3:
mov	edx, [esp+20h+arg_8]
mov	ecx, [ebp+0]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
push	edi
call	sub_64BBC0
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	ebx
pop	esi
mov	al, 1
pop	ebp
add	esp, 10h
retn	10h
sub_64C0A0 endp

align 10h



sub_64C1F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jbe	short loc_64C21D
lea	esp, [esp+0]

loc_64C200:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_64C218
mov	ecx, esi
call	sub_64B660

loc_64C218:
sub	edi, 1
jnz	short loc_64C200

loc_64C21D:
pop	edi
pop	esi
retn	4
sub_64C1F0 endp

align 10h



sub_64C230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_64C285
mov	edx, [ebx]
sub	eax, edi
lea	ecx, [eax+edi]
lea	ecx, [ecx+ecx*2]
push	esi
lea	esi, [edx+ecx*8-18h]
jz	short loc_64C266
push	ebp
mov	ebp, eax

loc_64C253:
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
sub	esi, 18h
sub	ebp, 1
jnz	short loc_64C253
pop	ebp

loc_64C266:
mov	eax, [ebx+8]
shr	eax, 1
pop	esi
cmp	edi, eax
jnb	short loc_64C29C
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, ebx
call	sub_64B700
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8

loc_64C285:
cmp	edi, [ebx+8]
jb	short loc_64C29C
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_64B700

loc_64C29C:
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8
sub_64C230 endp

align 10h



; int __stdcall	sub_64C2B0(int,	char *,	int, int)
sub_64C2B0 proc	near

var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= byte ptr -114h
var_105= byte ptr -105h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 128h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+128h+var_4], eax
mov	eax, [esp+128h+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+130h+arg_0]
mov	[esp+130h+var_118], ecx
mov	ecx, [ecx+30h]
mov	edx, [ecx]
push	esi
mov	[esp+134h+var_11C], eax
mov	eax, [edx+70h]
push	edi
mov	edi, [esp+138h+arg_4]
mov	[esp+138h+var_120], ebp
call	eax
mov	ebx, eax
mov	[esp+138h+var_124], ebx
test	edi, edi
jz	loc_64C5CB
mov	eax, [esp+138h+arg_C]
test	eax, eax
jbe	short loc_64C370
dec	eax
cmp	eax, 0FFFFFFFFh
jle	short loc_64C370
mov	edx, [esp+138h+var_11C]
lea	ecx, [eax+eax*2]
inc	eax
lea	esi, [ebx+8]
lea	ebp, [edx+ecx*8]
mov	[esp+138h+var_128], eax

loc_64C324:
mov	ecx, [esp+138h+var_118]
lea	eax, [esp+138h+var_114]
push	eax
push	ebp
mov	[esp+140h+var_114], 0
call	sub_64ABC0
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_64C349
mov	ecx, esi
call	sub_64B530

loc_64C349:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_64C359
lea	edx, [esp+138h+var_114]
push	edx
call	sub_652330

loc_64C359:
lea	ecx, [esp+138h+var_114]
call	sub_652830
sub	ebp, 18h
sub	[esp+138h+var_128], 1
jnz	short loc_64C324
mov	ebp, [esp+138h+var_120]

loc_64C370:		; int
push	2Eh
push	edi		; char *
call	_strchr
add	esp, 8
test	eax, eax
jz	loc_64C552
lea	eax, [ebx+78h]
mov	eax, [eax]
mov	ecx, [eax+2ACh]
add	eax, 2ACh
test	ecx, ecx
jz	short loc_64C3A4
mov	edx, [ecx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ecx+8], edx

loc_64C3A4:
mov	ebp, [eax]

loc_64C3A6:		; int
push	2Eh
push	edi		; char *
call	_strchr
mov	ebx, eax
add	esp, 8
test	ebx, ebx
jz	loc_64C48C
mov	esi, ebx
sub	esi, edi
inc	esi
inc	ebx
cmp	esi, 100h
jbe	short loc_64C3CE
mov	esi, 100h

loc_64C3CE:
lea	eax, [esi-1]
push	eax
lea	ecx, [esp+13Ch+var_104]
push	edi
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	[esp+esi+144h+var_105],	0
mov	esi, [esp+144h+var_124]
mov	edx, [esi+78h]
add	esi, 78h
add	esp, 0Ch
lea	eax, [esp+138h+var_104]
mov	[esp+138h+var_114], 0
mov	ecx, [edx+280h]
push	eax
mov	edi, ebx
call	sub_651000
mov	[esp+138h+var_128], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+10h]
mov	edx, [edx+2Ch]
lea	eax, [esp+138h+var_114]
push	eax
lea	ecx, [ebp+10h]
lea	eax, [esp+13Ch+var_128]
push	eax
push	esi
call	edx
push	0
test	al, al
jz	loc_64C519
lea	ecx, [esp+13Ch+var_114]
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_64C451
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	ecx, eax
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx

loc_64C451:
mov	ecx, ebp
call	sub_64B3B0
mov	eax, [esp+138h+var_128]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
mov	ebp, esi
jnz	short loc_64C470
call	sub_650DF0

loc_64C470:
test	esi, esi
jz	short loc_64C47B
mov	ecx, esi
call	sub_64B3B0

loc_64C47B:
lea	ecx, [esp+138h+var_114]
call	sub_652830
test	ebx, ebx
jnz	loc_64C3A6

loc_64C48C:
mov	eax, [esp+138h+var_124]
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
add	eax, 78h
push	edi
call	sub_651000
mov	edx, [esp+138h+arg_C]
mov	ecx, [esp+138h+var_124]
push	0FFFFFFFFh
mov	[esp+13Ch+var_11C], eax
inc	dword ptr [eax+8]
push	edx
lea	eax, [esp+140h+var_11C]
push	eax
push	ebp
call	sub_671840
mov	esi, eax
mov	eax, [esp+138h+var_11C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_64C4DA
call	sub_650DF0

loc_64C4DA:
test	ebp, ebp
jz	short loc_64C4E5
mov	ecx, ebp
call	sub_64B3B0

loc_64C4E5:
mov	ebp, [esp+138h+var_120]
mov	ebx, [esp+138h+var_124]

loc_64C4ED:
test	esi, esi
jz	loc_64C5A9
push	ebp
push	esi
lea	ecx, [esp+140h+var_114]
call	sub_652700
mov	ecx, [esp+13Ch+var_118]
push	eax
push	ebx
call	sub_64BBC0
lea	ecx, [esp+138h+var_114]
call	sub_652830
jmp	loc_64C5B5

loc_64C519:
mov	ecx, [esp+13Ch+var_120]
mov	edx, [ecx]
mov	eax, [edx+24h]
call	eax
mov	eax, [esp+138h+var_128]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_64C53A
call	sub_650DF0

loc_64C53A:
lea	ecx, [esp+138h+var_114]
call	sub_652830
test	ebp, ebp
jz	loc_64C610
mov	ecx, ebp
jmp	loc_64C60B

loc_64C552:
mov	ecx, [ebx+78h]
mov	ecx, [ecx+280h]
push	edi
call	sub_651000
mov	ecx, [esp+138h+arg_C]
mov	[esp+138h+var_128], eax
inc	dword ptr [eax+8]
mov	edx, [ebx+78h]
mov	eax, [edx+2ACh]
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+140h+var_128]
push	edx
push	eax
mov	ecx, ebx
call	sub_671840
mov	esi, eax
mov	eax, [esp+138h+var_128]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_64C4ED
call	sub_650DF0
jmp	loc_64C4ED

loc_64C5A9:
mov	eax, [ebp+0]
mov	edx, [eax+24h]
push	0
mov	ecx, ebp
call	edx

loc_64C5B5:
mov	eax, [esp+138h+arg_C]
test	eax, eax
jbe	short loc_64C605
push	eax
lea	ecx, [ebx+8]
call	sub_64C1F0
jmp	short loc_64C605

loc_64C5CB:
mov	eax, [ebx+78h]
mov	ecx, [eax+2ACh]
push	0FFFFFFFFh
push	0
add	eax, 0Ch
push	eax
push	ecx
mov	ecx, ebx
call	sub_671840
mov	esi, eax
push	ebp
push	esi
lea	ecx, [esp+140h+var_114]
call	sub_652700
mov	ecx, [esp+13Ch+var_118]
push	eax
push	ebx
call	sub_64BBC0
lea	ecx, [esp+138h+var_114]
call	sub_652830

loc_64C605:
test	esi, esi
jz	short loc_64C610
mov	ecx, esi

loc_64C60B:
call	sub_64B3B0

loc_64C610:
mov	ecx, [esp+138h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 128h
retn	10h
sub_64C2B0 endp

align 10h



sub_64C630 proc	near

var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	byte ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 88h
push	ebx
xor	ebx, ebx
push	ebp
mov	ebp, [esp+90h+arg_0]
mov	eax, offset off_154CB6C
mov	[esp+90h+var_44], eax
mov	[esp+90h+var_60], eax
mov	eax, [ebp+8]
push	esi
push	edi
mov	edi, [ebp+18h]
mov	[esp+98h+var_48], ecx
mov	[esp+98h+var_88], ebx
mov	[esp+98h+var_84], ebx
mov	[esp+98h+var_80], ebx
mov	[esp+98h+var_3C], ebx
mov	[esp+98h+var_38], ebx
mov	[esp+98h+var_58], ebx
mov	[esp+98h+var_54], ebx
mov	[esp+98h+var_2C], bl
lea	ecx, [esp+98h+var_2C]
cmp	eax, ebx
jz	short loc_64C68A
push	eax
call	sub_652EF0
jmp	short loc_64C694

loc_64C68A:
call	sub_652060
mov	[esp+98h+var_2C], 1

loc_64C694:
lea	eax, [esp+98h+var_44]
push	eax
lea	ecx, [esp+9Ch+var_2C]
push	ecx
push	edi
mov	ecx, edi
call	sub_668010
mov	ecx, eax
call	sub_64BBC0
lea	edx, [esp+98h+var_88]
push	1
push	edx
mov	ecx, edx
call	sub_64C230
mov	esi, [esp+98h+var_84]
mov	ecx, [esp+98h+var_88]
lea	eax, [esi+esi*2]
lea	ecx, [ecx+eax*8-18h]
cmp	ecx, ebx
jz	short loc_64C6D8
lea	edx, [esp+98h+var_44]
push	edx
call	sub_580E60

loc_64C6D8:
cmp	[ebp+1Ch], ebx
mov	[esp+98h+var_7C], ebx
jle	loc_64C7AF

loc_64C6E5:
mov	ecx, [esp+98h+var_7C]
lea	eax, [esp+98h+var_78]
push	eax
push	ecx
mov	ecx, ebp
mov	[esp+0A0h+var_78], offset off_154CB6C
mov	[esp+0A0h+var_70], ebx
mov	[esp+0A0h+var_6C], ebx
call	sub_651EC0
push	eax
push	edi
mov	ecx, edi
call	sub_668010
mov	ecx, eax
call	sub_64BBC0
inc	esi
lea	edx, [esp+98h+var_88]
push	esi
push	edx
mov	ecx, edx
call	sub_64C230
mov	esi, [esp+98h+var_84]
mov	ecx, [esp+98h+var_88]
lea	eax, [esi+esi*2]
lea	eax, [ecx+eax*8-18h]
cmp	eax, ebx
jz	short loc_64C776
mov	dword ptr [eax], offset	off_154CB6C
mov	[eax+8], ebx
mov	edx, [esp+98h+var_6C]
mov	[eax+0Ch], edx
mov	ecx, [esp+98h+var_68]
mov	[eax+10h], ecx
mov	edx, [esp+98h+var_64]
mov	[eax+14h], edx
mov	ecx, [esp+98h+var_6C]
shr	ecx, 6
test	cl, 1
jz	short loc_64C776
mov	ecx, [eax+10h]
mov	edx, [esp+98h+var_70]
push	ecx
mov	[eax+8], edx
mov	ecx, [esp+9Ch+var_70]
push	eax
call	sub_64AF60

loc_64C776:
mov	edx, [esp+98h+var_6C]
shr	edx, 6
mov	[esp+98h+var_78], offset off_154CB6C
test	dl, 1
jz	short loc_64C79D
mov	eax, [esp+98h+var_68]
push	eax
lea	ecx, [esp+9Ch+var_78]
push	ecx
mov	ecx, [esp+0A0h+var_70]
call	sub_64B5D0

loc_64C79D:
mov	eax, [esp+98h+var_7C]
inc	eax
cmp	eax, [ebp+1Ch]
mov	[esp+98h+var_7C], eax
jl	loc_64C6E5

loc_64C7AF:
mov	ecx, edi
call	sub_668010
cmp	[ebp+1Ch], ebx
mov	[esp+98h+var_18], eax
lea	edx, [esp+98h+var_60]
lea	eax, [esp+98h+var_44]
mov	[esp+98h+var_1C], edx
mov	[esp+98h+var_14], eax
jle	short loc_64C7E5
mov	ecx, [esp+98h+var_88]
add	ecx, 18h
mov	[esp+98h+var_C], ecx
jmp	short loc_64C7EC

loc_64C7E5:
mov	[esp+98h+var_C], ebx

loc_64C7EC:
mov	edx, [esp+98h+var_88]
lea	eax, [esi-1]
mov	[esp+98h+var_8], eax
mov	eax, [esp+98h+var_48]
mov	ecx, [eax+38h]
mov	[esp+98h+var_4], ecx
mov	ecx, [eax+34h]
mov	[esp+98h+var_10], edx
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+98h+var_1C]
push	eax
call	edx
mov	eax, [esp+98h+var_60]
mov	edx, [eax+4]
lea	ecx, [esp+98h+var_60]
call	edx
test	eax, eax
jz	short loc_64C846
mov	eax, [ebp+4]
push	eax
lea	ecx, [esp+9Ch+var_60]
push	ecx
mov	ecx, edi
call	sub_668010
mov	ecx, eax
call	sub_64ABC0

loc_64C846:
lea	ecx, [esp+98h+var_2C]
call	sub_652830
mov	edx, [esp+98h+var_54]
shr	edx, 6
mov	edi, offset off_154CB6C
mov	[esp+98h+var_60], edi
test	dl, 1
jz	short loc_64C87B
mov	eax, [esp+98h+var_50]
push	eax
lea	ecx, [esp+9Ch+var_60]
push	ecx
mov	ecx, [esp+0A0h+var_58]
call	sub_64B5D0
mov	[esp+98h+var_58], ebx

loc_64C87B:
mov	edx, [esp+98h+var_38]
shr	edx, 6
mov	[esp+98h+var_44], edi
test	dl, 1
jz	short loc_64C8A2
mov	eax, [esp+98h+var_34]
push	eax
lea	ecx, [esp+9Ch+var_44]
push	ecx
mov	ecx, [esp+0A0h+var_3C]
call	sub_64B5D0
mov	[esp+98h+var_3C], ebx

loc_64C8A2:
mov	ebp, [esp+98h+var_88]
lea	edx, [esi+esi*2]
lea	edi, [ebp+edx*8-18h]
cmp	esi, ebx
jbe	short loc_64C8C2

loc_64C8B1:
mov	eax, [edi]
mov	edx, [eax]
push	ebx
mov	ecx, edi
call	edx
sub	edi, 18h
sub	esi, 1
jnz	short loc_64C8B1

loc_64C8C2:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebp
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 88h
retn	4
sub_64C630 endp

align 10h



sub_64C8E0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 24h
push	ebp
mov	ebp, ecx
cmp	dword ptr [ebp+34h], 0
jz	loc_64C97C
push	esi
mov	esi, [esp+2Ch+arg_0]
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_64C972
mov	eax, [edi]
mov	edx, [eax+3Ch]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_64C972
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
mov	edx, [esi+18h]
mov	esi, [esi+4]
mov	[esp+30h+var_4], eax
add	edi, 0FFFFFFF0h
mov	[esp+30h+var_20], esi
mov	esi, [edi+3Ch]
lea	eax, [esp+30h+var_24]
mov	[esp+30h+var_8], ecx
push	eax
mov	ecx, ebp
mov	[esp+34h+var_24], offset off_1431764
mov	[esp+34h+var_1C], esi
mov	[esp+34h+var_10], 0
mov	[esp+34h+var_18], 0
mov	[esp+34h+var_14], 0
mov	[esp+34h+var_C], edx
call	sub_64C630
mov	ecx, edi
call	sub_64B9E0
lea	ecx, [esp+30h+var_24]
call	sub_64B830
pop	edi
pop	esi
pop	ebp
add	esp, 24h
retn	0Ch

loc_64C972:
push	esi
mov	ecx, ebp
call	sub_64C630
pop	edi
pop	esi

loc_64C97C:
pop	ebp
add	esp, 24h
retn	0Ch
sub_64C8E0 endp

align 10h



sub_64C990 proc	near

var_20=	byte ptr -20h
var_8= dword ptr -8
arg_0= dword ptr  4

mov	eax, dword_1856470
sub	esp, 20h
test	eax, eax
jnz	short loc_64C9A2
add	esp, 20h
retn	4

loc_64C9A2:
push	ebx
lea	ebx, [eax+4]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
cmp	dword_1855FC0, 0
jz	short loc_64C9C6
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
xor	eax, eax
pop	ebx
add	esp, 20h
retn	4

loc_64C9C6:
push	esi
mov	esi, [esp+28h+arg_0]
push	edi
lea	eax, [esp+2Ch+var_20]
push	eax
mov	ecx, 8
lea	edi, [esp+30h+var_20]
rep movsd
mov	ecx, dword_1856470
push	0
push	offset aGlobal_2 ; "Global"
mov	[esp+38h+var_8], 1
call	sub_6A0960
push	ebx		; lpCriticalSection
mov	dword_1855FC0, eax
call	ds:LeaveCriticalSection
mov	eax, dword_1855FC0
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn	4
sub_64C990 endp




sub_64CA10 proc	near
push	esi
mov	esi, ecx
call	sub_64A360
xor	eax, eax
mov	[esi+68h], eax
mov	[esi+6Ch], eax
mov	dword ptr [esi], offset	off_14318E8
mov	eax, esi
pop	esi
retn
sub_64CA10 endp

align 10h



; int __thiscall sub_64CA30(void *, char)
sub_64CA30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+4Ch]	; lpCriticalSection
mov	dword ptr [esi], offset	off_14316A0
call	sub_64D730
test	[esp+4+arg_0], 1
jz	short loc_64CA51
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_64CA51:
mov	eax, esi
pop	esi
retn	4
sub_64CA30 endp

align 10h



sub_64CA60 proc	near
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+4Ch]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+68h]
mov	esi, [eax+98h]
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn
sub_64CA60 endp

align 10h



sub_64CA90 proc	near
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+4Ch]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+68h]
mov	esi, [eax+9Ch]
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn
sub_64CA90 endp

align 10h



sub_64CAC0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+4Ch]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+68h]
mov	ecx, [esp+8+arg_0]
push	edi		; lpCriticalSection
mov	[eax+0A4h], ecx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_64CAC0 endp

align 10h



sub_64CAF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+4Ch]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esp+8+arg_0]
cmp	eax, [esi+30h]
jnb	short loc_64CB16
mov	ecx, [esi+68h]
mov	ecx, [ecx+98h]
cmp	eax, ecx
jnb	short loc_64CB16
mov	eax, ecx

loc_64CB16:
mov	edx, [esi+68h]
mov	[edx+0A0h], eax
push	edi		; lpCriticalSection
mov	[esi+30h], eax
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_64CAF0 endp

align 10h



sub_64CB30 proc	near
push	esi
push	edi
mov	edi, dword_1856470
add	edi, 4
push	edi		; lpCriticalSection
mov	esi, ecx
call	ds:EnterCriticalSection
inc	dword ptr [esi+10h]
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn
sub_64CB30 endp

align 10h



sub_64CB60 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 0Ch
push	edi
mov	edi, ecx
cmp	byte ptr [edi+64h], 0
jz	short loc_64CB9C
push	esi
lea	esi, [edi+4Ch]
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esp+14h+arg_0]
lea	eax, [esp+14h+var_C]
push	eax
push	ecx
mov	ecx, [edi+68h]
call	sub_6A1480
push	esi		; lpCriticalSection
mov	edi, eax
call	ds:LeaveCriticalSection
pop	esi
mov	eax, edi
pop	edi
add	esp, 0Ch
retn	8

loc_64CB9C:
mov	eax, [esp+10h+arg_0]
mov	ecx, [edi+68h]
lea	edx, [esp+10h+var_C]
push	edx
push	eax
call	sub_6A1480
pop	edi
add	esp, 0Ch
retn	8
sub_64CB60 endp

align 10h



; int __stdcall	sub_64CBC0(LPCRITICAL_SECTION lpCriticalSection, int, int)
sub_64CBC0 proc	near

var_C= dword ptr -0Ch
lpCriticalSection= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	edi
mov	edi, ecx
cmp	byte ptr [edi+64h], 0
jz	short loc_64CC01
push	esi
lea	esi, [edi+4Ch]
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esp+14h+arg_4]
mov	edx, [esp+14h+lpCriticalSection]
lea	eax, [esp+14h+var_C]
push	eax		; int
push	ecx		; int
mov	ecx, [edi+68h]
push	edx		; lpCriticalSection
call	sub_6A12F0
push	esi		; lpCriticalSection
mov	edi, eax
call	ds:LeaveCriticalSection
pop	esi
mov	eax, edi
pop	edi
add	esp, 0Ch
retn	0Ch

loc_64CC01:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+lpCriticalSection]
lea	eax, [esp+10h+var_C]
push	eax		; int
push	ecx		; int
mov	ecx, [edi+68h]
push	edx		; lpCriticalSection
call	sub_6A12F0
pop	edi
add	esp, 0Ch
retn	0Ch
sub_64CBC0 endp

align 10h



sub_64CC20 proc	near

var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_8]
push	ebp
mov	ebp, [esp+14h+arg_4]
push	edi
lea	eax, [esp+18h+var_C]
push	eax
push	ebx
mov	edi, ecx
mov	ecx, [esp+20h+arg_0]
push	ebp
push	ecx
mov	ecx, [edi+68h]
call	sub_6A0D70
test	eax, eax
jnz	short loc_64CC79
push	esi
mov	esi, dword_1856470
add	esi, 4
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [edi+68h]
lea	edx, [esp+1Ch+var_C]
push	edx
push	ebx
push	ebp
push	eax
call	sub_6A16E0
push	esi		; lpCriticalSection
mov	edi, eax
call	ds:LeaveCriticalSection
mov	eax, edi
pop	esi

loc_64CC79:
pop	edi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_64CC20 endp

align 10h



sub_64CC90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, dword_1856470
push	edi
add	esi, 4
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, dword_1856470
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [esp+8+arg_0]
mov	edx, [edx+0Ch]
push	4
push	eax
call	edx
push	esi		; lpCriticalSection
mov	edi, eax
call	ds:LeaveCriticalSection
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_64CC90 endp

align 10h



sub_64CCD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, dword_1856470
add	esi, 4
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, dword_1856470
mov	ecx, [eax]
mov	eax, [esp+4+arg_4]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	4
push	eax
mov	eax, [esp+0Ch+arg_0]
push	eax
call	edx
push	esi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	esi
retn	8
sub_64CCD0 endp

align 10h



sub_64CD10 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
xor	edi, edi
mov	[esi+20h], edi
mov	[esi+24h], edi
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+88h]
push	esi
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
add	eax, [esi+20h]
mov	[esi], eax
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+5Ch]
call	edx
add	eax, [esi+20h]
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	[esi+1Ch], edi
pop	edi
mov	[esi+4], eax
pop	esi
retn	4
sub_64CD10 endp

align 10h



sub_64CD70 proc	near

arg_0= dword ptr  4

cmp	dword_1856470, 0
jnz	short loc_64CD84
push	ecx
mov	ecx, offset unk_1855FDC
call	sub_6A0A80

loc_64CD84:
mov	eax, [esp+arg_0]
push	eax
call	sub_64C990
neg	eax
sbb	eax, eax
neg	eax
retn	4
sub_64CD70 endp

align 10h



sub_64CDA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, dword_1856470
push	ebp
push	esi
push	edi
add	ebx, 4
push	ebx		; lpCriticalSection
mov	edi, ecx
call	ds:EnterCriticalSection
mov	eax, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
push	eax
push	edi
push	ecx
mov	ecx, dword_1856470
call	sub_6A0960
mov	esi, eax
test	esi, esi
jz	short loc_64CDD5
inc	dword ptr [edi+10h]

loc_64CDD5:
mov	ebp, ds:LeaveCriticalSection
push	ebx		; lpCriticalSection
call	ebp ; LeaveCriticalSection
test	esi, esi
jz	short loc_64CE04
lea	ebx, [edi+4Ch]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	edx, [edi+44h]
mov	[esi+4], edx
lea	eax, [edi+40h]
mov	[esi+8], eax
mov	eax, [edi+44h]
mov	[eax+8], esi
push	ebx		; lpCriticalSection
mov	[edi+44h], esi
call	ebp ; LeaveCriticalSection

loc_64CE04:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_64CDA0 endp

align 10h



sub_64CE10 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+4Ch]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
xor	ebx, ebx
test	dword ptr [esi+1Ch], 1000h
jnz	short loc_64CE34
mov	eax, [esi+68h]
mov	ebx, [eax+98h]

loc_64CE34:
mov	edi, [esi+48h]
add	esi, 44h
lea	ebx, [ebx+0]

loc_64CE40:
test	esi, esi
jz	short loc_64CE49
lea	eax, [esi-4]
jmp	short loc_64CE4B

loc_64CE49:
xor	eax, eax

loc_64CE4B:
cmp	edi, eax
jz	short loc_64CE5F
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
mov	edi, [edi+8]
add	ebx, eax
jmp	short loc_64CE40

loc_64CE5F:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn
sub_64CE10 endp

align 10h



sub_64CE70 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+4Ch]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
xor	ebx, ebx
test	dword ptr [esi+1Ch], 1000h
jnz	short loc_64CE94
mov	eax, [esi+68h]
mov	ebx, [eax+9Ch]

loc_64CE94:
mov	edi, [esi+48h]
add	esi, 44h
lea	ebx, [ebx+0]

loc_64CEA0:
test	esi, esi
jz	short loc_64CEA9
lea	eax, [esi-4]
jmp	short loc_64CEAB

loc_64CEA9:
xor	eax, eax

loc_64CEAB:
cmp	edi, eax
jz	short loc_64CEBF
mov	edx, [edi]
mov	eax, [edx+5Ch]
mov	ecx, edi
call	eax
mov	edi, [edi+8]
add	ebx, eax
jmp	short loc_64CEA0

loc_64CEBF:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn
sub_64CE70 endp

align 10h



sub_64CED0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+3Ch]
test	edi, edi
jz	short loc_64CF48
push	ebx
push	ebp
lea	ebx, [edi+4Ch]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ebp, dword_1856470
add	ebp, 4
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
add	dword ptr [esi+10h], 0FFFFFFFFh
jnz	short loc_64CF29
mov	eax, [esi]
mov	edx, [eax+80h]
mov	ecx, esi
call	edx
mov	eax, [esi+4]
mov	ecx, [esi+8]
mov	[eax+8], ecx
mov	edx, [esi+8]
mov	eax, [esi+4]
mov	[edx+4], eax
mov	ecx, dword_1856470
push	esi
call	sub_6A0A40
jmp	short loc_64CF2B

loc_64CF29:
xor	edi, edi

loc_64CF2B:
mov	esi, ds:LeaveCriticalSection
push	ebp		; lpCriticalSection
call	esi ; LeaveCriticalSection
push	ebx		; lpCriticalSection
call	esi ; LeaveCriticalSection
pop	ebp
pop	ebx
test	edi, edi
jz	short loc_64CF62
mov	edx, [edi]
mov	eax, [edx+20h]
mov	ecx, edi
pop	edi
pop	esi
jmp	eax

loc_64CF48:
mov	edi, dword_1856470
add	edi, 4
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
dec	dword ptr [esi+10h]
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_64CF62:
pop	edi
pop	esi
retn
sub_64CED0 endp

align 10h



sub_64CF70 proc	near
push	ebx
push	esi
mov	ebx, ecx
mov	ecx, [ebx+48h]
push	edi
lea	edi, [ebx+44h]
jmp	short loc_64CF80
align 10h

loc_64CF80:
test	edi, edi
jz	short loc_64CF89
lea	eax, [edi-4]
jmp	short loc_64CF8B

loc_64CF89:
xor	eax, eax

loc_64CF8B:
cmp	ecx, eax
jz	short loc_64CF9D
mov	eax, [ecx]
mov	edx, [eax+74h]
mov	esi, [ecx+8]
call	edx
mov	ecx, esi
jmp	short loc_64CF80

loc_64CF9D:
mov	ecx, dword_1856470
push	ebx
call	sub_6A0A40
pop	edi
pop	esi
pop	ebx
retn
sub_64CF70 endp

align 10h



sub_64CFB0 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	ebx, [esi+4Ch]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	edi, [esi+48h]
add	esi, 44h

loc_64CFC5:
test	esi, esi
jz	short loc_64CFCE
lea	eax, [esi-4]
jmp	short loc_64CFD0

loc_64CFCE:
xor	eax, eax

loc_64CFD0:
cmp	edi, eax
jz	short loc_64CFEB
test	dword ptr [edi+1Ch], 1000h
jnz	short loc_64CFE6
mov	eax, [edi]
mov	edx, [eax+54h]
mov	ecx, edi
call	edx

loc_64CFE6:
mov	edi, [edi+8]
jmp	short loc_64CFC5

loc_64CFEB:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_64CFB0 endp

align 10h



sub_64D000 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+4Ch]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
test	dword ptr [esi+1Ch], 1000h
mov	ebx, [esp+10h+arg_0]
jz	short loc_64D035
mov	eax, [esi+68h]
mov	ecx, [eax+98h]
add	[ebx+20h], ecx
mov	edx, [esi+68h]
mov	eax, [edx+9Ch]
add	[ebx+24h], eax

loc_64D035:
mov	edi, [esi+48h]
add	esi, 44h
jmp	short loc_64D040
align 10h

loc_64D040:
test	esi, esi
jz	short loc_64D049
lea	eax, [esi-4]
jmp	short loc_64D04B

loc_64D049:
xor	eax, eax

loc_64D04B:
cmp	edi, eax
jz	short loc_64D061
mov	edx, [edi]
mov	eax, [edx+88h]
push	ebx
mov	ecx, edi
call	eax
mov	edi, [edi+8]
jmp	short loc_64D040

loc_64D061:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_64D000 endp

align 10h



sub_64D070 proc	near
mov	eax, dword_1856470
test	eax, eax
jz	short locret_64D0D0
push	esi
lea	esi, [eax+4]
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, dword_1855FC0
test	ecx, ecx
jz	short loc_64D0AF
mov	eax, [ecx]
mov	edx, [eax+80h]
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+74h]
call	edx
mov	dword_1855FC0, 0

loc_64D0AF:		; lpCriticalSection
push	esi
call	ds:LeaveCriticalSection
mov	ecx, dword_1856470
pop	esi
test	ecx, ecx
jz	short locret_64D0D0
call	sub_6A0AE0
mov	dword_1856470, 0

locret_64D0D0:
retn
sub_64D070 endp

align 10h



sub_64D0E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx]
push	ebx
push	ebp
push	esi
xor	ebp, ebp
or	edx, 0FFFFFFFFh
push	edi
test	eax, eax
jz	short loc_64D160
mov	esi, [esp+14h+arg_0]
mov	[esp+14h+var_4], ebp
mov	edi, esi
lea	ebx, [ebx+0]

loc_64D100:
mov	ecx, eax
sub	ecx, esi
cmp	eax, esi
jb	short loc_64D114
cmp	ecx, edx
jnb	short loc_64D114
mov	ebp, eax
mov	edx, ecx
test	ecx, ecx
jz	short loc_64D162

loc_64D114:
mov	ecx, [eax+8]
mov	ebx, edi
shr	ebx, 1Fh
mov	eax, [eax+ebx*4+4]
test	ecx, ecx
jz	short loc_64D12C
cmp	ecx, eax
jz	short loc_64D12C
mov	[esp+14h+var_4], ecx

loc_64D12C:
test	eax, eax
jz	short loc_64D134
add	edi, edi
jmp	short loc_64D100

loc_64D134:
mov	eax, [esp+14h+var_4]
test	eax, eax
jz	short loc_64D160
lea	esp, [esp+0]

loc_64D140:
mov	ecx, eax
sub	ecx, esi
cmp	eax, esi
jb	short loc_64D150
cmp	ecx, edx
jnb	short loc_64D150
mov	edx, ecx
mov	ebp, eax

loc_64D150:
xor	ecx, ecx
cmp	[eax+4], ecx
setz	cl
mov	eax, [eax+ecx*4+4]
test	eax, eax
jnz	short loc_64D140

loc_64D160:
mov	eax, ebp

loc_64D162:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_64D0E0 endp

align 10h



; int __stdcall	sub_64D170(LPCRITICAL_SECTION lpCriticalSection, int, int)
sub_64D170 proc	near

var_C= byte ptr	-0Ch
lpCriticalSection= dword ptr  4
arg_4= dword ptr  8

mov	ecx, dword_1856470
sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+lpCriticalSection]
push	edi
push	esi
call	sub_6A08E0
test	eax, eax
jz	short loc_64D1DB
mov	esi, [eax+8]
cmp	byte ptr [esi+64h], 0
jz	short loc_64D1C1
lea	edi, [esi+4Ch]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esp+14h+arg_4]
lea	eax, [esp+14h+var_C]
push	eax
push	ecx
mov	ecx, [esi+68h]
call	sub_6A1480
push	edi		; lpCriticalSection
mov	esi, eax
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	0Ch

loc_64D1C1:
mov	eax, [esp+14h+arg_4]
mov	ecx, [esi+68h]
lea	edx, [esp+14h+var_C]
push	edx
push	eax
call	sub_6A1480
pop	edi
pop	esi
add	esp, 0Ch
retn	0Ch

loc_64D1DB:
mov	edi, ds:EnterCriticalSection
push	ebx
mov	ebx, dword_1856470
push	ebp
add	ebx, 4
push	ebx		; lpCriticalSection
call	edi ; EnterCriticalSection
mov	ecx, dword_1856470
push	esi
add	ecx, 28h
call	sub_64D0E0
mov	esi, [eax+0Ch]
push	ebx		; lpCriticalSection
mov	ebx, ds:LeaveCriticalSection
and	esi, 0FFFFFFFCh
call	ebx ; LeaveCriticalSection
cmp	byte ptr [esi+64h], 0
jz	short loc_64D252
lea	ebp, [esi+4Ch]
push	ebp		; lpCriticalSection
call	edi ; EnterCriticalSection
mov	eax, dword_1856470
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+20h+lpCriticalSection], eax
call	edi ; EnterCriticalSection
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esp+1Ch+var_C]
push	ecx
mov	ecx, [esi+68h]
push	edx
call	sub_6A1480
mov	esi, eax
mov	eax, [esp+1Ch+lpCriticalSection]
push	eax		; lpCriticalSection
call	ebx ; LeaveCriticalSection
push	ebp		; lpCriticalSection
call	ebx ; LeaveCriticalSection
pop	ebp
pop	ebx
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	0Ch

loc_64D252:
mov	ebp, dword_1856470
add	ebp, 4
push	ebp		; lpCriticalSection
call	edi ; EnterCriticalSection
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esp+1Ch+var_C]
push	ecx
mov	ecx, [esi+68h]
push	edx
call	sub_6A1480
push	ebp		; lpCriticalSection
mov	esi, eax
call	ebx ; LeaveCriticalSection
pop	ebp
pop	ebx
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	0Ch
sub_64D170 endp

align 10h



; int __stdcall	sub_64D290(LPCRITICAL_SECTION lpCriticalSection, int, int, int)
sub_64D290 proc	near

var_C= dword ptr -0Ch
lpCriticalSection= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, dword_1856470
sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+lpCriticalSection]
push	edi
push	esi
call	sub_6A08E0
test	eax, eax
jz	short loc_64D305
mov	esi, [eax+8]
cmp	byte ptr [esi+64h], 0
jz	short loc_64D2E6
lea	edi, [esi+4Ch]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esp+14h+arg_8]
mov	edx, [esp+14h+arg_4]
lea	eax, [esp+14h+var_C]
push	eax		; int
push	ecx		; int
mov	ecx, [esi+68h]
push	edx		; lpCriticalSection
call	sub_6A12F0
push	edi		; lpCriticalSection
mov	esi, eax
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	10h

loc_64D2E6:
mov	ecx, [esp+14h+arg_8]
mov	edx, [esp+14h+arg_4]
lea	eax, [esp+14h+var_C]
push	eax		; int
push	ecx		; int
mov	ecx, [esi+68h]
push	edx		; lpCriticalSection
call	sub_6A12F0
pop	edi
pop	esi
add	esp, 0Ch
retn	10h

loc_64D305:
mov	edi, ds:EnterCriticalSection
push	ebx
mov	ebx, dword_1856470
push	ebp
add	ebx, 4
push	ebx		; lpCriticalSection
call	edi ; EnterCriticalSection
mov	ecx, dword_1856470
push	esi
add	ecx, 28h
call	sub_64D0E0
mov	esi, [eax+0Ch]
push	ebx		; lpCriticalSection
mov	ebx, ds:LeaveCriticalSection
and	esi, 0FFFFFFFCh
call	ebx ; LeaveCriticalSection
cmp	byte ptr [esi+64h], 0
jz	short loc_64D381
lea	ebp, [esi+4Ch]
push	ebp		; lpCriticalSection
call	edi ; EnterCriticalSection
mov	eax, dword_1856470
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+20h+lpCriticalSection], eax
call	edi ; EnterCriticalSection
mov	ecx, [esp+1Ch+arg_8]
mov	edx, [esp+1Ch+arg_4]
lea	eax, [esp+1Ch+var_C]
push	eax		; int
push	ecx		; int
mov	ecx, [esi+68h]
push	edx		; lpCriticalSection
call	sub_6A12F0
mov	esi, eax
mov	eax, [esp+1Ch+lpCriticalSection]
push	eax		; lpCriticalSection
call	ebx ; LeaveCriticalSection
push	ebp		; lpCriticalSection
call	ebx ; LeaveCriticalSection
pop	ebp
pop	ebx
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	10h

loc_64D381:
mov	ebp, dword_1856470
add	ebp, 4
push	ebp		; lpCriticalSection
call	edi ; EnterCriticalSection
mov	edx, [esp+1Ch+arg_8]
mov	eax, [esp+1Ch+arg_4]
lea	ecx, [esp+1Ch+var_C]
push	ecx		; int
mov	ecx, [esi+68h]
push	edx		; int
push	eax		; lpCriticalSection
call	sub_6A12F0
push	ebp		; lpCriticalSection
mov	esi, eax
call	ebx ; LeaveCriticalSection
pop	ebp
pop	ebx
pop	edi
mov	eax, esi
pop	esi
add	esp, 0Ch
retn	10h
sub_64D290 endp

align 10h



; int __stdcall	sub_64D3C0(LPCRITICAL_SECTION lpCriticalSection)
sub_64D3C0 proc	near

lpCriticalSection= dword ptr  4

push	edi
mov	edi, [esp+4+lpCriticalSection]
test	edi, edi
jz	loc_64D4BA
mov	ecx, dword_1856470
push	ebx
push	ebp
push	esi
push	edi
call	sub_6A08E0
mov	ebx, eax
test	ebx, ebx
jz	short loc_64D414
mov	esi, [ebx+8]
cmp	byte ptr [esi+64h], 0
jz	short loc_64D405
lea	ebp, [esi+4Ch]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+68h]
push	edi
push	ebx
call	sub_6A1160
push	ebp
jmp	loc_64D4A3

loc_64D405:
mov	ecx, [esi+68h]
push	edi
push	ebx
call	sub_6A1160
jmp	loc_64D4A9

loc_64D414:
mov	eax, dword_1856470
mov	ebp, ds:EnterCriticalSection
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+14h+lpCriticalSection], eax
call	ebp ; EnterCriticalSection
mov	ecx, dword_1856470
push	edi
add	ecx, 28h
call	sub_64D0E0
mov	ebx, eax
mov	eax, [esp+10h+lpCriticalSection]
mov	esi, [ebx+0Ch]
push	eax		; lpCriticalSection
and	esi, 0FFFFFFFCh
call	ds:LeaveCriticalSection
cmp	byte ptr [esi+64h], 0
jz	short loc_64D485
lea	eax, [esi+4Ch]
push	eax		; lpCriticalSection
call	ebp ; EnterCriticalSection
mov	eax, dword_1856470
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+14h+lpCriticalSection], eax
call	ebp ; EnterCriticalSection
mov	ecx, [esi+68h]
push	edi
push	ebx
call	sub_6A1400
mov	ecx, [esp+10h+lpCriticalSection]
mov	ebx, ds:LeaveCriticalSection
push	ecx		; lpCriticalSection
call	ebx ; LeaveCriticalSection
lea	eax, [esi+4Ch]
push	eax		; lpCriticalSection
call	ebx ; LeaveCriticalSection
jmp	short loc_64D4A9

loc_64D485:
mov	eax, dword_1856470
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+14h+lpCriticalSection], eax
call	ebp ; EnterCriticalSection
mov	ecx, [esi+68h]
push	edi
push	ebx
call	sub_6A1400
mov	edx, [esp+10h+lpCriticalSection]
push	edx		; lpCriticalSection

loc_64D4A3:
call	ds:LeaveCriticalSection

loc_64D4A9:
cmp	edi, [esi+18h]
jnz	short loc_64D4B7
mov	eax, [esi]
mov	edx, [eax+20h]
mov	ecx, esi
call	edx

loc_64D4B7:
pop	esi
pop	ebp
pop	ebx

loc_64D4BA:
pop	edi
retn	4
sub_64D3C0 endp

align 10h



; int __stdcall	sub_64D4C0(LPCRITICAL_SECTION lpCriticalSection, int)
sub_64D4C0 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
lpCriticalSection= dword ptr  4
arg_4= dword ptr  8

mov	ecx, dword_1856470
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+lpCriticalSection]
push	edi
call	sub_6A08E0
mov	ebx, eax
test	ebx, ebx
jz	short loc_64D52B
mov	esi, [ebx+8]
cmp	byte ptr [esi+64h], 0
jz	short loc_64D513
lea	ebp, [esi+4Ch]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esp+20h+arg_4]
push	eax
push	edi
push	ebx
mov	ecx, esi
call	sub_64CC20
push	ebp		; lpCriticalSection
mov	esi, eax
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_64D513:
mov	ecx, [esp+20h+arg_4]
push	ecx
push	edi
push	ebx
mov	ecx, esi
call	sub_64CC20
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_64D52B:
mov	eax, dword_1856470
mov	ebx, ds:EnterCriticalSection
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+24h+lpCriticalSection], eax
call	ebx ; EnterCriticalSection
mov	ecx, dword_1856470
push	edi
add	ecx, 28h
call	sub_64D0E0
mov	edx, [esp+20h+lpCriticalSection]
mov	ebp, eax
mov	esi, [ebp+0Ch]
push	edx		; lpCriticalSection
and	esi, 0FFFFFFFCh
call	ds:LeaveCriticalSection
cmp	byte ptr [esi+64h], 0
jz	short loc_64D5B7
lea	eax, [esi+4Ch]
push	eax		; lpCriticalSection
mov	[esp+24h+var_10], eax
call	ebx ; EnterCriticalSection
mov	eax, dword_1856470
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+24h+lpCriticalSection], eax
call	ebx ; EnterCriticalSection
mov	ecx, [esp+20h+arg_4]
lea	eax, [esp+20h+var_C]
push	eax
push	ecx
mov	ecx, [esi+68h]
push	edi
push	ebp
call	sub_6A1530
mov	edx, [esp+20h+lpCriticalSection]
mov	edi, ds:LeaveCriticalSection
push	edx		; lpCriticalSection
mov	esi, eax
call	edi ; LeaveCriticalSection
mov	eax, [esp+20h+var_10]
push	eax		; lpCriticalSection
call	edi ; LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_64D5B7:
mov	eax, dword_1856470
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+24h+lpCriticalSection], eax
call	ebx ; EnterCriticalSection
mov	edx, [esp+20h+arg_4]
lea	ecx, [esp+20h+var_C]
push	ecx
mov	ecx, [esi+68h]
push	edx
push	edi
push	ebp
call	sub_6A1530
mov	esi, eax
mov	eax, [esp+20h+lpCriticalSection]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_64D4C0 endp

align 10h



sub_64D600 proc	near

arg_0= dword ptr  4

mov	ecx, dword_1856470
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	sub_6A08E0
test	eax, eax
jz	short loc_64D61C
mov	eax, [eax+8]
pop	esi
retn	4

loc_64D61C:
push	edi
mov	edi, dword_1856470
add	edi, 4
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, dword_1856470
push	esi
add	ecx, 28h
call	sub_64D0E0
mov	esi, [eax+0Ch]
push	edi		; lpCriticalSection
and	esi, 0FFFFFFFCh
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_64D600 endp




sub_64D650 proc	near

var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

mov	ecx, dword_1856470
sub	esp, 0Ch
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
call	sub_6A08E0
test	eax, eax
jz	short loc_64D685
mov	edx, [eax+8]
lea	ecx, [esp+10h+var_C]
push	ecx
mov	ecx, [edx+68h]
push	edi
push	eax
call	sub_6A0D20
mov	eax, [esp+10h+var_4]
pop	edi
add	esp, 0Ch
retn	4

loc_64D685:
push	esi
mov	esi, dword_1856470
add	esi, 4
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, dword_1856470
push	edi
add	ecx, 28h
call	sub_64D0E0
mov	edx, [eax+0Ch]
lea	ecx, [esp+14h+var_C]
push	ecx
push	edi
and	edx, 0FFFFFFFCh
mov	ecx, [edx+68h]
push	eax
call	sub_6A0D50
mov	edi, [esp+14h+var_4]
push	esi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	esi
mov	eax, edi
pop	edi
add	esp, 0Ch
retn	4
sub_64D650 endp

align 10h



; int __thiscall sub_64D6D0(LPCRITICAL_SECTION lpCriticalSection, int)
sub_64D6D0 proc	near

arg_0= dword ptr  4

cmp	byte_185600C, 0
push	esi
mov	esi, ecx
jnz	short loc_64D701
push	offset aKernel32_dll_0 ; "kernel32.dll"
call	ds:LoadLibraryA
push	offset aInitializecrit ; "InitializeCriticalSectionAndSpinCount"
push	eax		; hModule
call	ds:GetProcAddress
mov	dword_1856008, eax
mov	byte_185600C, 1
jmp	short loc_64D706

loc_64D701:
mov	eax, dword_1856008

loc_64D706:
test	eax, eax
jz	short loc_64D718
mov	ecx, [esp+4+arg_0]
push	ecx
push	esi
call	eax
mov	eax, esi
pop	esi
retn	4

loc_64D718:		; lpCriticalSection
push	esi
call	ds:InitializeCriticalSection
mov	eax, esi
pop	esi
retn	4
sub_64D6D0 endp

align 10h



; int __fastcall sub_64D730(LPCRITICAL_SECTION lpCriticalSection)
sub_64D730 proc	near
push	ecx		; lpCriticalSection
call	ds:DeleteCriticalSection
retn
sub_64D730 endp

align 10h



sub_64D740 proc	near
mov	ecx, [ecx+4]
mov	eax, [ecx+0Ch]
mov	edx, [eax+8]
add	ecx, 0Ch
jmp	edx
sub_64D740 endp

align 10h



sub_64D750 proc	near
mov	ecx, [ecx+4]
mov	eax, [ecx+0Ch]
mov	edx, [eax+0Ch]
add	ecx, 0Ch
jmp	edx
sub_64D750 endp

align 10h



sub_64D760 proc	near
mov	ecx, [ecx+4]
mov	eax, [ecx+0Ch]
mov	edx, [eax+10h]
add	ecx, 0Ch
jmp	edx
sub_64D760 endp

align 10h



sub_64D770 proc	near
push	esi
mov	esi, [ecx+10h]
mov	eax, [esi]
push	0FFFFFFFFh	; dwMilliseconds
push	eax		; hHandle
call	ds:WaitForSingleObject
test	eax, eax
jnz	short loc_64D786
inc	dword ptr [esi+8]

loc_64D786:
pop	esi
retn
sub_64D770 endp

align 10h



sub_64D790 proc	near
mov	eax, [ecx+10h]
mov	ecx, [eax+8]
xor	eax, eax
test	ecx, ecx
setz	al
retn
sub_64D790 endp

align 10h



sub_64D7A0 proc	near
push	esi
mov	esi, [ecx+4]
mov	eax, [esi]
push	0		; dwMilliseconds
push	eax		; hHandle
call	ds:WaitForSingleObject
test	eax, eax
jz	short loc_64D7B7
xor	al, al
pop	esi
retn

loc_64D7B7:
mov	eax, 1
add	[esi+8], eax
pop	esi
retn
sub_64D7A0 endp

align 10h



sub_64D7D0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+1Ch]
test	eax, eax
jz	short locret_64D81B
mov	edx, [esp+arg_0]
jmp	short loc_64D7E0
align 10h

loc_64D7E0:
cmp	eax, edx
jz	short loc_64D7EE
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_64D7E0
retn	4

loc_64D7EE:
mov	eax, [edx+8]
test	eax, eax
jz	short loc_64D7FF
push	esi
mov	esi, [edx+4]
mov	[eax+4], esi
pop	esi
jmp	short loc_64D805

loc_64D7FF:
mov	eax, [edx+4]
mov	[ecx+1Ch], eax

loc_64D805:
mov	eax, [edx+4]
test	eax, eax
jz	short loc_64D815
mov	ecx, [edx+8]
mov	[eax+8], ecx
retn	4

loc_64D815:
mov	edx, [edx+8]
mov	[ecx+20h], edx

locret_64D81B:
retn	4
sub_64D7D0 endp

align 10h



; int __fastcall sub_64D820(LPCRITICAL_SECTION lpCriticalSection)
sub_64D820 proc	near
push	esi
mov	esi, ecx
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+1Ch]
xor	edx, edx
cmp	ecx, edx
jz	short loc_64D864
mov	eax, ecx
cmp	[eax+4], edx
jz	short loc_64D855
mov	eax, [ecx+4]
mov	[esi+1Ch], eax
mov	[eax+8], edx
mov	ecx, [ecx]
push	ecx		; hEvent
call	ds:SetEvent
push	esi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	esi
retn

loc_64D855:
mov	[esi+1Ch], edx
mov	[esi+20h], edx
mov	ecx, [ecx]
push	ecx		; hEvent
call	ds:SetEvent

loc_64D864:		; lpCriticalSection
push	esi
call	ds:LeaveCriticalSection
pop	esi
retn
sub_64D820 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_64D8F0

loc_64D870:
push	esi
push	edi
mov	esi, ecx
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+1Ch]
xor	edi, edi
cmp	eax, edi
jz	short loc_64D8D0
mov	ecx, eax
cmp	[ecx+4], edi
jz	short loc_64D896
mov	ecx, [eax+4]
mov	[esi+1Ch], ecx
mov	[ecx+8], edi
jmp	short loc_64D89C

loc_64D896:
mov	[esi+1Ch], edi
mov	[esi+20h], edi

loc_64D89C:
cmp	eax, edi
jz	short loc_64D8D0
push	ebx
mov	ebx, ds:SetEvent

loc_64D8A7:
mov	edx, [eax]
push	edx		; hEvent
call	ebx ; SetEvent
mov	eax, [esi+1Ch]
cmp	eax, edi
jz	short loc_64D8CF
mov	ecx, eax
cmp	[ecx+4], edi
jz	short loc_64D8C5
mov	ecx, [eax+4]
mov	[esi+1Ch], ecx
mov	[ecx+8], edi
jmp	short loc_64D8CB

loc_64D8C5:
mov	[esi+1Ch], edi
mov	[esi+20h], edi

loc_64D8CB:
cmp	eax, edi
jnz	short loc_64D8A7

loc_64D8CF:
pop	ebx

loc_64D8D0:		; lpCriticalSection
push	esi
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_64D8F0
align 10h



sub_64D8E0 proc	near
mov	ecx, [ecx]
jmp	sub_64D820
sub_64D8E0 endp

align 10h



sub_64D8F0 proc	near

; FUNCTION CHUNK AT 0064D870 SIZE 0000006A BYTES

mov	ecx, [ecx]
jmp	loc_64D870
sub_64D8F0 endp

align 10h



sub_64D900 proc	near
mov	eax, [ecx+10h]
test	eax, eax
jz	short loc_64D912
mov	edx, [ecx+14h]
push	edx
push	ecx
call	eax
add	esp, 8
retn

loc_64D912:
xor	eax, eax
retn
sub_64D900 endp

align 10h



sub_64D920 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 6		; switch 7 cases
ja	short loc_64D952 ; default
			; jumptable 0064D929 case 3
jmp	ds:off_64D958[eax*4] ; switch jump

loc_64D930:		; jumptable 0064D929 case 0
mov	eax, 0Fh
retn

loc_64D936:		; jumptable 0064D929 case 1
mov	eax, 2
retn

loc_64D93C:		; jumptable 0064D929 case 2
mov	eax, 1
retn

loc_64D942:		; jumptable 0064D929 case 4
or	eax, 0FFFFFFFFh
retn

loc_64D946:		; jumptable 0064D929 case 5
mov	eax, 0FFFFFFFEh
retn

loc_64D94C:		; jumptable 0064D929 case 6
mov	eax, 0FFFFFFF1h
retn

loc_64D952:		; default
xor	eax, eax	; jumptable 0064D929 case 3
retn
sub_64D920 endp

align 4
off_64D958 dd offset loc_64D930	; jump table for switch	statement
dd offset loc_64D936
dd offset loc_64D93C
dd offset loc_64D952
dd offset loc_64D942
dd offset loc_64D946
dd offset loc_64D94C
align 10h



sub_64D980 proc	near
mov	eax, [ecx]
test	eax, eax
jnz	short loc_64D987
retn

loc_64D987:
mov	eax, [eax]
retn
sub_64D980 endp

align 10h



; int __thiscall sub_64D990(void *, char)
sub_64D990 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437964
jz	short loc_64D9A9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_64D9A9:
mov	eax, esi
pop	esi
retn	4
sub_64D990 endp

align 10h



sub_64D9B0 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	edi
push	eax
mov	esi, ecx
call	sub_6A1A00
mov	dword ptr [esi+0Ch], offset off_1437964
mov	dword ptr [esi], offset	off_14319E8
mov	dword ptr [esi+0Ch], offset off_14319D4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	14h
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_64DA3E
mov	cl, [esp+8+arg_0]
mov	dword ptr [edi+0Ch], offset off_14319B8
mov	dword ptr [edi+10h], 0
mov	[edi+4], cl
cmp	byte ptr [edi+4], 0
mov	[edi+10h], esi
mov	dword ptr [edi+8], 0
push	0		; lpName
jz	short loc_64DA26
push	0		; bInitialOwner
push	0		; lpMutexAttributes
call	ds:CreateMutexA
mov	[edi], eax
mov	[esi+10h], edi
pop	edi
mov	eax, esi
pop	esi
retn	8

loc_64DA26:		; lMaximumCount
push	1
push	1		; lInitialCount
push	0		; lpSemaphoreAttributes
call	ds:CreateSemaphoreA
mov	[edi], eax
mov	[esi+10h], edi
pop	edi
mov	eax, esi
pop	esi
retn	8

loc_64DA3E:
xor	eax, eax
mov	[esi+10h], eax
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_64D9B0 endp

align 10h



sub_64DA50 proc	near

arg_0= byte ptr	 4

sub	ecx, 0Ch
jmp	sub_64E110
sub_64DA50 endp

align 10h



sub_64DA60 proc	near
push	ebp
mov	ebp, ecx
push	esi
mov	esi, [ebp+18h]
xor	eax, eax
cmp	esi, eax
jz	short loc_64DA95
push	ebx
mov	ebx, ds:CloseHandle
push	edi

loc_64DA75:
mov	edi, esi
mov	eax, [edi]
mov	esi, [esi+4]
push	eax		; hObject
call	ebx ; CloseHandle
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
test	esi, esi
jnz	short loc_64DA75
pop	edi
xor	eax, eax
pop	ebx

loc_64DA95:
pop	esi
mov	[ebp+18h], eax
mov	[ebp+20h], eax
mov	[ebp+1Ch], eax
mov	ecx, ebp
pop	ebp
jmp	sub_64D730
sub_64DA60 endp

align 10h



sub_64DAB0 proc	near
mov	eax, [ecx+18h]
test	eax, eax
jz	short loc_64DABE
mov	edx, [eax+4]
mov	[ecx+18h], edx
retn

loc_64DABE:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	0
push	0Ch
call	edx
push	0		; lpName
push	0		; bInitialState
mov	esi, eax
push	1		; bManualReset
push	0		; lpEventAttributes
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 0
call	ds:CreateEventA
mov	[esi], eax
mov	eax, esi
pop	esi
retn
sub_64DAB0 endp

align 10h



; int __thiscall sub_64DB00(LPCRITICAL_SECTION lpCriticalSection, int, DWORD dwMilliseconds)
sub_64DB00 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
dwMilliseconds=	dword ptr  8

sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	eax, [ebp+10h]
mov	eax, [eax+8]
xor	ebx, ebx
push	edi
mov	edi, ecx
mov	[esp+14h+var_5], 0
mov	[esp+14h+var_4], eax
cmp	eax, ebx
jnz	short loc_64DB2C
pop	edi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn	8

loc_64DB2C:
push	esi
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, edi
call	sub_64DAB0
mov	esi, eax
mov	eax, [edi+20h]
cmp	eax, ebx
jz	short loc_64DB52
mov	[esi+8], eax
mov	ecx, [edi+20h]
mov	[ecx+4], esi
mov	[esi+4], ebx
jmp	short loc_64DB5B

loc_64DB52:
mov	[esi+8], ebx
mov	[esi+4], ebx
mov	[edi+1Ch], esi

loc_64DB5B:		; lpCriticalSection
push	edi
mov	[edi+20h], esi
call	ds:LeaveCriticalSection
mov	eax, [ebp+10h]
cmp	[eax+4], bl
mov	[eax+8], ebx
jz	short loc_64DB99
mov	eax, [esp+18h+var_4]
cmp	eax, ebx
jbe	short loc_64DBA8
mov	ebx, ds:ReleaseMutex
mov	ebp, eax

loc_64DB80:
mov	edx, [esp+18h+arg_0]
mov	eax, [edx+10h]
mov	ecx, [eax]
push	ecx		; hMutex
call	ebx ; ReleaseMutex
sub	ebp, 1
jnz	short loc_64DB80
mov	ebp, [esp+18h+arg_0]
xor	ebx, ebx
jmp	short loc_64DBA8

loc_64DB99:
mov	edx, [ebp+10h]
mov	eax, [edx]
push	ebx		; lpPreviousCount
push	1		; lReleaseCount
push	eax		; hSemaphore
call	ds:ReleaseSemaphore

loc_64DBA8:
mov	ecx, ebp
call	sub_6A1CB0
mov	eax, [esp+18h+dwMilliseconds]
cmp	eax, 0FFFFFFFFh
jnz	short loc_64DBBA
or	eax, eax

loc_64DBBA:
mov	ecx, [esi]
push	eax		; dwMilliseconds
push	ecx		; hHandle
call	ds:WaitForSingleObject
push	edi		; lpCriticalSection
mov	ebp, eax
call	ds:EnterCriticalSection
cmp	ebp, ebx
jz	short loc_64DBF2
cmp	ebp, 80h
jz	short loc_64DBF2
push	esi
mov	ecx, edi
call	sub_64D7D0
mov	edx, [esi]
push	edx		; hEvent
call	ds:ResetEvent
mov	eax, [edi+18h]
mov	[esi+4], eax
jmp	short loc_64DC06

loc_64DBF2:
mov	ecx, [esi]
push	ecx		; hEvent
mov	[esp+1Ch+var_5], 1
call	ds:ResetEvent
mov	edx, [edi+18h]
mov	[esi+4], edx

loc_64DC06:
mov	[esi+8], ebx
push	edi		; lpCriticalSection
mov	[edi+18h], esi
call	ds:LeaveCriticalSection
mov	eax, [esp+18h+var_4]
cmp	eax, ebx
jbe	short loc_64DC3E
mov	edi, eax
lea	ecx, [ecx+0]

loc_64DC20:
mov	eax, [esp+18h+arg_0]
mov	esi, [eax+10h]
mov	ecx, [esi]
push	0FFFFFFFFh	; dwMilliseconds
push	ecx		; hHandle
call	ds:WaitForSingleObject
test	eax, eax
jnz	short loc_64DC39
inc	dword ptr [esi+8]

loc_64DC39:
sub	edi, 1
jnz	short loc_64DC20

loc_64DC3E:
mov	al, [esp+18h+var_5]
pop	esi
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_64DB00 endp

align 10h



sub_64DC50 proc	near
push	esi
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	24h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_64DC90
push	0		; int
mov	ecx, esi	; lpCriticalSection
call	sub_64D6D0
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+20h], 0
mov	dword ptr [esi+1Ch], 0
mov	[edi], esi
mov	eax, edi
pop	edi
pop	esi
retn

loc_64DC90:
xor	eax, eax
mov	[edi], eax
mov	eax, edi
pop	edi
pop	esi
retn
sub_64DC50 endp

align 10h



sub_64DCA0 proc	near
mov	ecx, [ecx]
jmp	sub_64DB00
sub_64DCA0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_7D20C0

loc_64DCB0:
push	esi
mov	esi, ecx
mov	eax, [esi+2Ch]
mov	dword ptr [esi], offset	off_1431A08
mov	dword ptr [esi+0Ch], offset off_14319F4
test	eax, eax
jz	short loc_64DCD5
push	eax		; hObject
call	ds:CloseHandle
mov	dword ptr [esi+2Ch], 0

loc_64DCD5:
mov	dword ptr [esi+2Ch], 0
mov	dword ptr [esi+0Ch], offset off_1437964
mov	ecx, esi
pop	esi
jmp	sub_6A1CC0
; END OF FUNCTION CHUNK	FOR sub_7D20C0
align 10h



sub_64DCF0 proc	near
mov	eax, [ecx-0Ch]
mov	edx, [eax+4]
add	ecx, 0FFFFFFF4h
jmp	edx
sub_64DCF0 endp

align 10h



sub_64DD00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	ecx, 0Ch
jmp	loc_64DED0
align 10h

loc_64DD10:
mov	eax, [ecx+18h]
shr	eax, 1
and	eax, 1
retn
align 10h

loc_64DD20:
push	esi
mov	esi, [ecx]
test	esi, esi
jz	loc_64DDC3
mov	eax, [esp+4+arg_0]
push	ebx
mov	ebx, [eax]
mov	eax, ebx
shr	eax, 6
xor	eax, ebx
and	eax, [esi+4]
lea	edx, [eax+eax*2]
cmp	dword ptr [esi+edx*4+8], 0FFFFFFFEh
lea	edx, [esi+edx*4+8]
jz	short loc_64DDC2
cmp	[edx+4], eax
jnz	short loc_64DDC2
push	ebp
push	edi
mov	ebp, eax
or	edi, 0FFFFFFFFh

loc_64DD56:
cmp	[edx+4], ebp
jnz	short loc_64DD60
cmp	[edx+8], ebx
jz	short loc_64DD72

loc_64DD60:
mov	edi, eax
mov	eax, [edx]
cmp	eax, 0FFFFFFFFh
jz	short loc_64DDC0
lea	edx, [eax+eax*2]
lea	edx, [esi+edx*4+8]
jmp	short loc_64DD56

loc_64DD72:
cmp	ebp, eax
jnz	short loc_64DDAD
mov	eax, [edx]
cmp	eax, 0FFFFFFFFh
jz	short loc_64DDB6
mov	dword ptr [edx], 0FFFFFFFEh
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*4+8]
mov	esi, [eax]
mov	[edx], esi
mov	esi, [eax+4]
mov	[edx+4], esi
mov	esi, [eax+8]
mov	[edx+8], esi
pop	edi
mov	edx, eax
pop	ebp
mov	dword ptr [edx], 0FFFFFFFEh
mov	eax, [ecx]
dec	dword ptr [eax]
pop	ebx
pop	esi
retn	4

loc_64DDAD:
lea	eax, [edi+edi*2]
mov	edi, [edx]
mov	[esi+eax*4+8], edi

loc_64DDB6:
mov	dword ptr [edx], 0FFFFFFFEh
mov	eax, [ecx]
dec	dword ptr [eax]

loc_64DDC0:
pop	edi
pop	ebp

loc_64DDC2:
pop	ebx

loc_64DDC3:
pop	esi
retn	4
align 10h

loc_64DDD0:
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_64DDE3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_64DE05

loc_64DDE3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_64DE0A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_64DE05:
call	sub_64DFA0

loc_64DE0A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ebp, [esi+edx*4+8]
lea	ecx, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_64DE3E
mov	edx, [esp+8+arg_4]
mov	dword ptr [ecx], 0FFFFFFFFh
mov	edx, [edx]
pop	esi
mov	[ecx+8], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_64DE3E:
push	edi
mov	edi, [esi+4]
mov	edx, eax
push	ebx

loc_64DE45:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_64DE45
lea	edi, [edx+edx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [ecx+4]
cmp	edi, eax
jnz	short loc_64DE87
test	ebx, ebx
jz	short loc_64DE72
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_64DE72:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebx
pop	edi
mov	[ecx+8], esi
pop	esi
mov	[ecx], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_64DE87:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_64DEA3

loc_64DE94:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_64DE94

loc_64DEA3:
test	ebx, ebx
jz	short loc_64DEB5
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_64DEB5:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[ecx+8], edx
mov	dword ptr [ecx], 0FFFFFFFFh
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_64DED0:
push	esi
mov	esi, ecx
mov	eax, [esi+2Ch]
mov	dword ptr [esi], offset	off_1431A08
mov	dword ptr [esi+0Ch], offset off_14319F4
test	eax, eax
jz	short loc_64DEF5
push	eax		; hObject
call	ds:CloseHandle
mov	dword ptr [esi+2Ch], 0

loc_64DEF5:
mov	ecx, esi
mov	dword ptr [esi+2Ch], 0
mov	dword ptr [esi+0Ch], offset off_1437964
call	sub_6A1CC0
test	byte ptr [esp+4+arg_0],	1
jz	short loc_64DF1F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_64DF1F:
mov	eax, esi
pop	esi
retn	4
sub_64DD00 endp

align 10h



sub_64DF30 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+10h]
mov	dword ptr [edi], offset	off_14319E8
mov	dword ptr [edi+0Ch], offset off_14319D4
test	esi, esi
jz	short loc_64DF66
mov	eax, [esi]
push	eax		; hObject
call	ds:CloseHandle
mov	dword ptr [esi+0Ch], offset off_1437964
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_64DF66:
mov	dword ptr [edi+0Ch], offset off_1437964
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_6A1CC0
sub_64DF30 endp

align 10h



sub_64DF80 proc	near
push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_64DF9C
mov	ecx, esi
call	sub_64DA60
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_64DF9C:
pop	esi
retn
sub_64DF80 endp

align 10h



sub_64DFA0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_64DFBE
call	sub_6F4100
pop	edi
add	esp, 0Ch
retn	8

loc_64DFBE:
push	esi
cmp	eax, 8
jnb	short loc_64DFCB
mov	esi, 8
jmp	short loc_64E030

loc_64DFCB:
dec	eax
mov	[esp+14h+arg_4], eax
fild	[esp+14h+arg_4]
test	eax, eax
jge	short loc_64DFDE
fadd	ds:flt_15FCC08

loc_64DFDE:
call	__CIlog
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fnstcw	word ptr [esp+14h+arg_4]
movzx	eax, word ptr [esp+14h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+14h+var_8], eax
fldcw	word ptr [esp+14h+var_8]
fistp	[esp+14h+var_8]
mov	cl, byte ptr [esp+14h+var_8]
shl	esi, cl
fldcw	word ptr [esp+14h+arg_4]

loc_64E030:
mov	ecx, dword_1855FC0
lea	edx, [esp+14h+var_8]
push	edx
mov	[esp+18h+arg_4], 0
mov	dword ptr [esp+18h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
call	eax
mov	[esp+1Ch], eax
mov	dword ptr [eax], 0
mov	edx, [esp+1Ch]
lea	ecx, [esi-1]
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_64E094
xor	eax, eax
jmp	short loc_64E080
align 10h

loc_64E080:
mov	ecx, [esp+1Ch]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_64E080

loc_64E094:
mov	eax, [edi]
test	eax, eax
jz	short loc_64E102
mov	eax, [eax+4]
push	ebx
push	ebp
mov	ebp, dword ptr [esp+24h+var_8+4]
xor	edi, edi
lea	ebx, [eax+1]
jmp	short loc_64E0B0
align 10h

loc_64E0B0:
mov	edx, [esp+24h+var_14]
mov	eax, [edx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_64E0E0
mov	ecx, [esi+8]
lea	eax, [esi+8]
mov	edx, ecx
shr	edx, 6
xor	edx, ecx
push	edx
push	eax
push	ebp
lea	ecx, [esp+30h]
call	loc_64DDD0
mov	dword ptr [esi], 0FFFFFFFEh

loc_64E0E0:
add	edi, 0Ch
sub	ebx, 1
jnz	short loc_64E0B0
mov	ecx, dword_1855FC0
mov	edx, [esp+2Ch+var_1C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+30h+var_20]
pop	ebp
pop	ebx

loc_64E102:
mov	ecx, [esp+28h+var_C]
pop	esi
mov	[edi], ecx
pop	edi
add	esp, 0Ch
retn	8
sub_64DFA0 endp	; sp-analysis failed




sub_64E110 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+10h]
mov	dword ptr [esi], offset	off_14319E8
mov	dword ptr [esi+0Ch], offset off_14319D4
test	edi, edi
jz	short loc_64E146
mov	eax, [edi]
push	eax		; hObject
call	ds:CloseHandle
mov	dword ptr [edi+0Ch], offset off_1437964
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_64E146:
mov	ecx, esi
mov	dword ptr [esi+0Ch], offset off_1437964
call	sub_6A1CC0
test	[esp+8+arg_0], 1
jz	short loc_64E169
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_64E169:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_64E110 endp




sub_64E170 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	ebx, ecx
lea	ebx, [ebx+0]

loc_64E180:
mov	edi, [ebx]
mov	esi, edi
push	edi		; Comperand
and	esi, ebp
push	esi		; Exchange
push	ebx		; Destination
call	ds:InterlockedCompareExchange
cmp	eax, edi
jnz	short loc_64E180
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_64E170 endp

align 10h



sub_64E1A0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	ebx, ecx
lea	ebx, [ebx+0]

loc_64E1B0:
mov	edi, [ebx]
mov	esi, edi
push	edi		; Comperand
or	esi, ebp
push	esi		; Exchange
push	ebx		; Destination
call	ds:InterlockedCompareExchange
cmp	eax, edi
jnz	short loc_64E1B0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_64E1A0 endp

align 10h



sub_64E1D0 proc	near
push	esi
push	edi
mov	edi, ecx
push	0
push	1
lea	ecx, [edi+4]
mov	dword ptr [edi], 0
call	sub_64D9B0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	24h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_64E22C
push	0		; int
mov	ecx, esi	; lpCriticalSection
call	sub_64D6D0
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+20h], 0
mov	dword ptr [esi+1Ch], 0
mov	[edi+18h], esi
call	ds:GetCurrentThreadId
mov	[edi+1Ch], eax
mov	eax, edi
pop	edi
pop	esi
retn

loc_64E22C:
xor	esi, esi
mov	[edi+18h], esi
call	ds:GetCurrentThreadId
mov	[edi+1Ch], eax
mov	eax, edi
pop	edi
pop	esi
retn
sub_64E1D0 endp

align 10h



sub_64E240 proc	near
push	ebx
push	esi
mov	ebx, ecx
mov	esi, [ebx+18h]
push	edi
test	esi, esi
jz	short loc_64E261
mov	ecx, esi
call	sub_64DA60
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_64E261:
mov	edi, [ebx+14h]
lea	esi, [ebx+4]
mov	dword ptr [esi], offset	off_14319E8
mov	dword ptr [esi+0Ch], offset off_14319D4
test	edi, edi
jz	short loc_64E296
mov	eax, [edi]
push	eax		; hObject
call	ds:CloseHandle
mov	dword ptr [edi+0Ch], offset off_1437964
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_64E296:
mov	ecx, esi
mov	dword ptr [esi+0Ch], offset off_1437964
call	sub_6A1CC0
pop	edi
pop	esi
mov	ecx, ebx
pop	ebx
jmp	sub_6F4100
sub_64E240 endp

align 10h



sub_64E2B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx+8]
test	esi, esi
jz	short loc_64E2D4
push	edi
push	1		; Value
push	esi		; Addend
call	ds:InterlockedExchangeAdd
mov	edi, [esp+8+arg_0]
mov	ecx, [edi]	; Addend
test	ecx, ecx
jz	short loc_64E2D1
call	sub_6A1BE0

loc_64E2D1:
mov	[edi], esi
pop	edi

loc_64E2D4:
pop	esi
retn	4
sub_64E2B0 endp

align 10h



sub_64E2E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
dec	dword ptr [esi+8]
mov	ebp, [esi+8]
push	edi
mov	edi, [eax+8]
xor	ebx, ebx
test	edi, edi
jz	short loc_64E304
push	1		; Value
push	edi		; Addend
call	ds:InterlockedExchangeAdd
mov	ebx, edi

loc_64E304:
cmp	byte ptr [esi+4], 0
jz	short loc_64E315
mov	ecx, [esi]
push	ecx		; hMutex
call	ds:ReleaseMutex
jmp	short loc_64E322

loc_64E315:
mov	edx, [esi]
push	0		; lpPreviousCount
push	1		; lReleaseCount
push	edx		; hSemaphore
call	ds:ReleaseSemaphore

loc_64E322:
test	eax, eax
jz	short loc_64E335
test	ebp, ebp
jnz	short loc_64E335
test	ebx, ebx
jz	short loc_64E340
mov	ecx, ebx
call	sub_6A1C20

loc_64E335:
test	ebx, ebx
jz	short loc_64E340
mov	ecx, ebx	; Addend
call	sub_6A1BE0

loc_64E340:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_64E2E0 endp

align 10h



sub_64E350 proc	near
push	ecx
mov	ecx, [ecx+10h]
call	sub_64E2E0
retn
sub_64E350 endp

align 10h



sub_64E360 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+10h]
mov	eax, [esi+8]
test	eax, eax
jz	short loc_64E395
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_64E38F
mov	edx, [esi]
push	0		; dwMilliseconds
push	edx		; hHandle
call	ds:WaitForSingleObject
test	eax, eax
jnz	short loc_64E395
inc	dword ptr [esi+8]
push	edi
mov	ecx, esi
call	sub_64E2E0

loc_64E38F:
pop	edi
lea	eax, [esi+0Ch]
pop	esi
retn

loc_64E395:
lea	eax, [edi+0Ch]
pop	edi
pop	esi
retn
sub_64E360 endp

align 10h



sub_64E3A0 proc	near
push	esi
mov	esi, [ecx+4]
mov	eax, [esi+8]
push	edi
lea	edi, [ecx-0Ch]
test	eax, eax
jz	short loc_64E3C9
mov	ecx, [esi]
push	0		; dwMilliseconds
push	ecx		; hHandle
call	ds:WaitForSingleObject
test	eax, eax
jnz	short loc_64E3D7
inc	dword ptr [esi+8]
push	edi
mov	ecx, esi
call	sub_64E2E0

loc_64E3C9:
xor	al, al
xor	edx, edx
test	al, al
setz	dl
pop	edi
mov	al, dl
pop	esi
retn

loc_64E3D7:
mov	al, 1
xor	edx, edx
test	al, al
setz	dl
pop	edi
mov	al, dl
pop	esi
retn
sub_64E3A0 endp

align 10h



sub_64E3F0 proc	near
lea	eax, [ecx-0Ch]
mov	ecx, [eax+10h]
push	eax
call	sub_64E2E0
mov	al, 1
retn
sub_64E3F0 endp

align 10h



sub_64E400 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ds:InterlockedExchange
mov	esi, ecx
push	0		; Value
lea	eax, [esi+18h]
push	eax		; Target
call	edi ; InterlockedExchange
push	0		; Value
lea	ecx, [esi+1Ch]
push	ecx		; Target
mov	dword ptr [esi+2Ch], 0
mov	dword ptr [esi+30h], 0
call	edi ; InterlockedExchange
mov	eax, [esp+8+arg_0]
mov	edx, [eax+8]
mov	[esi+20h], edx
mov	ecx, [eax+0Ch]
mov	[esi+24h], ecx
mov	edx, [eax+14h]
mov	[esi+28h], edx
mov	ecx, [eax]
mov	[esi+10h], ecx
mov	edx, [eax+4]
mov	[esi+14h], edx
mov	eax, [eax+10h]
test	eax, eax
jz	short loc_64E45A
mov	edx, [esi]
push	eax
mov	eax, [edx+14h]
mov	ecx, esi
call	eax

loc_64E45A:
pop	edi
pop	esi
retn	4
sub_64E400 endp

align 10h



sub_64E460 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+8]
xor	ebx, ebx
test	edi, edi
jz	short loc_64E479
push	1		; Value
push	edi		; Addend
call	ds:InterlockedExchangeAdd
mov	ebx, edi

loc_64E479:
lea	edi, [esi+18h]
push	0FFFFFFFEh
mov	ecx, edi
call	sub_64E170
push	2
mov	ecx, edi
call	sub_64E1A0
mov	ecx, esi
call	sub_64A430
test	ebx, ebx
jz	short loc_64E4AA
mov	ecx, ebx
call	sub_6A1C20
pop	edi
pop	esi
mov	ecx, ebx
pop	ebx
jmp	sub_6A1BE0

loc_64E4AA:
pop	edi
pop	esi
pop	ebx
retn
sub_64E460 endp

align 10h



sub_64E4B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	esi
push	1
mov	esi, ecx
call	sub_6A1A00
mov	ecx, [esp+1Ch+arg_4]
xor	eax, eax
mov	[esp+1Ch+var_18], eax
mov	[esp+1Ch+var_14], eax
mov	[esp+1Ch+var_8], eax
mov	eax, [esp+1Ch+arg_0]
lea	edx, [esp+1Ch+var_18]
mov	dword ptr [esi+0Ch], offset off_1437964
mov	[esp+1Ch+var_C], ecx
push	edx
mov	ecx, esi
mov	dword ptr [esi], offset	off_1431A08
mov	dword ptr [esi+0Ch], offset off_14319F4
mov	[esp+20h+var_4], 3
mov	[esp+20h+var_10], eax
call	sub_64E400
mov	eax, esi
pop	esi
add	esp, 18h
retn	8
sub_64E4B0 endp

align 10h



sub_64E510 proc	near
push	ebx
push	esi
push	edi
mov	esi, ecx
mov	ebx, [esi+14h]
mov	eax, [ebx]
lea	edi, [esi+4]
push	0FFFFFFFFh	; dwMilliseconds
push	eax		; hHandle
call	ds:WaitForSingleObject
test	eax, eax
jnz	short loc_64E52D
inc	dword ptr [ebx+8]

loc_64E52D:
mov	ecx, esi
call	sub_64D980
test	eax, eax
jz	short loc_64E54E

loc_64E538:		; lpCriticalSection
mov	ecx, [esi+18h]
push	0FFFFFFFFh	; dwMilliseconds
push	edi		; int
call	sub_64DB00
mov	ecx, esi
call	sub_64D980
test	eax, eax
jnz	short loc_64E538

loc_64E54E:
mov	ecx, [edi+10h]
push	edi
call	sub_64E2E0
pop	edi
pop	esi
pop	ebx
retn
sub_64E510 endp

align 10h



sub_64E560 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ecx
mov	eax, dword_1856010
test	eax, eax
jnz	short loc_64E58E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+28h]
push	20h
call	eax
test	eax, eax
jz	short loc_64E587
mov	ecx, eax
call	sub_64E1D0
jmp	short loc_64E589

loc_64E587:
xor	eax, eax

loc_64E589:
mov	dword_1856010, eax

loc_64E58E:
push	ebx
push	ebp
mov	ebp, [esp+14h+var_4]
push	esi
mov	esi, dword_1856010
mov	ebx, [esi+14h]
mov	ecx, [ebx]
push	edi
lea	edi, [esi+4]
push	0FFFFFFFFh	; dwMilliseconds
push	ecx		; hHandle
mov	[esp+24h+var_C], ebp
call	ds:WaitForSingleObject
test	eax, eax
jnz	short loc_64E5B8
inc	dword ptr [ebx+8]

loc_64E5B8:
mov	edx, ebp
shr	edx, 6
xor	edx, ebp
push	edx
lea	eax, [esp+20h+var_C]
push	eax
push	esi
mov	ecx, esi
call	loc_64DDD0
mov	ecx, [edi+10h]
push	edi
call	sub_64E2E0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_64E560 endp	; sp-analysis failed

align 10h



sub_64E5E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, dword_1856010
push	edi
mov	edi, [esi+14h]
mov	ecx, [edi]
lea	ebx, [esi+4]
push	0FFFFFFFFh	; dwMilliseconds
push	ecx		; hHandle
mov	[esp+14h+arg_0], eax
call	ds:WaitForSingleObject
test	eax, eax
jnz	short loc_64E609
inc	dword ptr [edi+8]

loc_64E609:
lea	edx, [esp+0Ch+arg_0]
push	edx
mov	ecx, esi
call	loc_64DD20
mov	eax, [esi]
test	eax, eax
jz	short loc_64E620
cmp	dword ptr [eax], 0
jnz	short loc_64E628

loc_64E620:		; lpCriticalSection
mov	ecx, [esi+18h]
call	sub_64D820

loc_64E628:
mov	ecx, [ebx+10h]
push	ebx
call	sub_64E2E0
pop	edi
pop	esi
pop	ebx
retn
sub_64E5E0 endp

align 10h



sub_64E640 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, dword_1856010
test	eax, eax
jz	short loc_64E68E
mov	ecx, dword_1856010
call	sub_64E510
mov	ecx, dword_1856010
mov	[esp+4+var_4], ecx
mov	edx, [esp+4+var_4]
mov	[esp+4+var_4], edx
mov	eax, [esp+4+var_4]
test	eax, eax
jz	short loc_64E684
push	esi
mov	esi, [esp+8+var_4]
call	sub_64E240
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	esi

loc_64E684:
mov	dword_1856010, 0

loc_64E68E:
pop	ecx
retn
sub_64E640 endp



; Attributes: thunk

sub_64E690 proc	near
jmp	sub_64E640
sub_64E690 endp

align 10h



sub_64E6A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+24h]
push	edi
mov	edi, ds:GetCurrentThread
cmp	eax, 0FFFFFFFFh
jz	short loc_64E6BE
push	eax		; dwThreadAffinityMask
call	edi ; GetCurrentThread
push	eax		; hThread
call	ds:SetThreadAffinityMask

loc_64E6BE:
mov	eax, [esi+28h]
push	eax
call	sub_64D920
add	esp, 4
push	eax		; nPriority
call	edi ; GetCurrentThread
push	eax		; hThread
call	ds:SetThreadPriority
mov	ecx, [esi+18h]
lea	edi, [esi+18h]
test	cl, 8
jz	short loc_64E70A
mov	edx, [edi]
test	dl, 1
jz	short loc_64E701
mov	eax, [esi+2Ch]
push	eax		; hThread
call	ds:SuspendThread
cmp	eax, 0FFFFFFFFh
jz	short loc_64E701
push	1		; Value
lea	ecx, [esi+1Ch]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd

loc_64E701:
push	0FFFFFFF7h
mov	ecx, edi
call	sub_64E170

loc_64E70A:
mov	edx, [esi]
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
mov	edi, eax
mov	ecx, esi
mov	[esi+30h], edi
call	sub_64E460
push	esi
call	sub_64E5E0
add	esp, 4
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_64E6A0 endp

align 10h



sub_64E730 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebp, ebp
mov	esi, ecx
cmp	edi, ebp
jnz	short loc_64E747
pop	edi
pop	esi
xor	al, al
pop	ebp
retn	4

loc_64E747:
mov	eax, [esi+1Ch]
push	ebx
lea	ebx, [esi+1Ch]
test	eax, eax
jg	short loc_64E75A
mov	ecx, [esi+18h]
test	cl, 1
jz	short loc_64E767

loc_64E75A:
push	0FFFFFFFFh
mov	ecx, esi
call	sub_6A1E90
test	al, al
jz	short loc_64E7D7

loc_64E767:
mov	eax, [esi+2Ch]
cmp	eax, ebp
jz	short loc_64E778
push	eax		; hObject
call	ds:CloseHandle
mov	[esi+2Ch], ebp

loc_64E778:
mov	ecx, esi
call	sub_64A420
push	esi
call	sub_64E560
add	esp, 4
push	ebp		; Value
push	ebx		; Target
mov	ebx, ds:InterlockedExchange
mov	[esi+30h], ebp
call	ebx ; InterlockedExchange
dec	edi
neg	edi
sbb	edi, edi
and	edi, 8
push	edi		; Value
lea	ebp, [esi+18h]
push	ebp		; Target
call	ebx ; InterlockedExchange
mov	edx, [esi+20h]
push	0		; lpThreadId
push	0		; dwCreationFlags
push	esi		; int
push	offset sub_64E6A0 ; int
push	edx		; dwStackSize
push	0		; lpThreadAttributes
call	__beginthreadex
add	esp, 18h
mov	[esi+2Ch], eax
test	eax, eax
jnz	short loc_64E7E0
push	eax		; Value
push	ebp		; Target
call	ebx ; InterlockedExchange
mov	ecx, esi
call	sub_64A430
push	esi
call	sub_64E5E0
add	esp, 4

loc_64E7D7:
pop	ebx
pop	edi
pop	esi
xor	al, al
pop	ebp
retn	4

loc_64E7E0:
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
retn	4
sub_64E730 endp

align 10h


; Attributes: noreturn

sub_64E7F0 proc	near

dwExitCode= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+10h]
call	edx
mov	ecx, esi
call	sub_64E460
push	esi
call	sub_64E5E0
mov	eax, [esp+8+dwExitCode]
push	eax		; dwExitCode
call	__endthreadex
sub_64E7F0 endp

db  83h	; ƒ
db 0C4h	; Ä
db    8
db  5Eh	; ^
db 0C2h	; Â
db    4
db    0
align 10h



sub_64E820 proc	near
fld	dword ptr [ecx]
fld	ds:dbl_15FCDD0
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	loc_64E8D0
fld	dword ptr [ecx]
fld	ds:dbl_15FCDD8
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	loc_64E8CE
fld	dword ptr [ecx+4]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64E8CE
fld	dword ptr [ecx+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64E8CE
fld	dword ptr [ecx+8]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64E8CE
fld	dword ptr [ecx+8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64E8CE
fld	dword ptr [ecx+0Ch]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64E8CE
fld	dword ptr [ecx+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64E8CE
fld	dword ptr [ecx+10h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64E8CE
fld	dword ptr [ecx+10h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64E8CE
fld	dword ptr [ecx+14h]
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	short loc_64E8D0
fld	dword ptr [ecx+14h]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_64E8D2
mov	eax, 1
retn

loc_64E8CE:
fstp	st

loc_64E8D0:
fstp	st

loc_64E8D2:
xor	eax, eax
retn
sub_64E820 endp

align 10h



sub_64E8E0 proc	near
fld1
fst	dword ptr [ecx]
fldz
fst	dword ptr [ecx+4]
fst	dword ptr [ecx+8]
fst	dword ptr [ecx+0Ch]
fstp	dword ptr [ecx+14h]
fstp	dword ptr [ecx+10h]
retn
sub_64E8E0 endp

align 10h



; int __stdcall	sub_64E900(int,	int, float)
sub_64E900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
fld	dword ptr [eax]
mov	edx, [esp+arg_4]
fstp	[esp+arg_0]
fld	dword ptr [edx]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+arg_8]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	dword ptr [ecx]
fld	dword ptr [eax+0Ch]
fstp	[esp+arg_0]
fld	dword ptr [edx+0Ch]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [ecx+0Ch]
fld	dword ptr [eax+4]
fstp	[esp+arg_0]
fld	dword ptr [edx+4]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [ecx+4]
fld	dword ptr [eax+10h]
fstp	[esp+arg_0]
fld	dword ptr [edx+10h]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [ecx+10h]
fld	dword ptr [eax+8]
fstp	[esp+arg_0]
fld	dword ptr [edx+8]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [ecx+8]
fld	dword ptr [eax+14h]
fstp	[esp+arg_0]
fld	dword ptr [edx+14h]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [ecx+14h]
retn	0Ch
sub_64E900 endp




sub_64E9B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
fld	dword ptr [ecx+4]
fmul	dword ptr [eax+4]
mov	edx, [esp+arg_0]
fld	dword ptr [eax]
fmul	dword ptr [ecx]
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	dword ptr [edx]
fld	dword ptr [ecx+0Ch]
fmul	dword ptr [eax]
fld	dword ptr [ecx+10h]
fmul	dword ptr [eax+4]
faddp	st(1), st
fadd	dword ptr [ecx+14h]
fstp	dword ptr [edx+4]
retn	8
sub_64E9B0 endp

align 10h



sub_64E9E0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [edx]
fmul	dword ptr [edx+10h]
fld	dword ptr [edx+0Ch]
fmul	dword ptr [edx+4]
fsubp	st(1), st
fstp	[esp+arg_0]
fldz
fld	st
fld	[esp+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_64EA30
fstp	st
fld1
fst	dword ptr [ecx]
fstp	dword ptr [ecx+10h]
fst	dword ptr [ecx+4]
fst	dword ptr [ecx+8]
fst	dword ptr [ecx+0Ch]
fstp	dword ptr [ecx+14h]
fld	dword ptr [edx+8]
fchs
fstp	dword ptr [ecx+8]
fld	dword ptr [edx+14h]
fchs
fstp	dword ptr [ecx+14h]
retn	4

loc_64EA30:
fstp	st(1)
fld1
fdivrp	st(1), st
fstp	[esp+arg_0]
fld	[esp+arg_0]
fld	st
fmul	dword ptr [edx+10h]
fstp	dword ptr [ecx]
fld	dword ptr [edx]
fmul	st, st(1)
fstp	dword ptr [ecx+10h]
fld	dword ptr [edx+4]
fchs
fmul	st, st(1)
fstp	dword ptr [ecx+4]
fld	dword ptr [edx+0Ch]
fchs
fmulp	st(1), st
fstp	dword ptr [ecx+0Ch]
fld	dword ptr [edx+14h]
fmul	dword ptr [ecx+4]
fld	dword ptr [edx+8]
fmul	dword ptr [ecx]
faddp	st(1), st
fchs
fstp	dword ptr [ecx+8]
fld	dword ptr [edx+14h]
fmul	dword ptr [ecx+10h]
fld	dword ptr [edx+8]
fmul	dword ptr [ecx+0Ch]
faddp	st(1), st
fchs
fstp	dword ptr [ecx+14h]
retn	4
sub_64E9E0 endp

align 10h



sub_64EA90 proc	near
fld	dword ptr [ecx+14h]
retn
sub_64EA90 endp

align 10h



sub_64EAA0 proc	near
fld	dword ptr [ecx+0Ch]
fld	dword ptr [ecx]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
jmp	__CIsqrt
sub_64EAA0 endp

align 10h



sub_64EAC0 proc	near
fld	dword ptr [ecx+10h]
fld	dword ptr [ecx+4]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
jmp	__CIsqrt
sub_64EAC0 endp

align 10h



sub_64EAE0 proc	near
fld	dword ptr [ecx+0Ch]
fld	dword ptr [ecx]
jmp	sub_79A3DA
sub_64EAE0 endp

align 10h



sub_64EAF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
mov	eax, ecx
fld	dword ptr [eax]
mov	ecx, [esp+18h+arg_0]
fstp	[esp+18h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+18h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+18h+var_10]
fld	dword ptr [eax+0Ch]
fstp	[esp+18h+var_C]
fld	dword ptr [eax+10h]
fstp	[esp+18h+var_8]
fld	dword ptr [eax+14h]
fstp	[esp+18h+var_4]
fld	dword ptr [ecx+0Ch]
fld	[esp+18h+var_14]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+18h+var_18]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fstp	dword ptr [eax]
fld	dword ptr [ecx+0Ch]
fld	[esp+18h+var_8]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+18h+var_C]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+4]
fmul	st, st(4)
fld	st(3)
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+4]
fmul	st, st(2)
fld	st(1)
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fstp	dword ptr [eax+10h]
fld	dword ptr [ecx+8]
fmulp	st(4), st
fld	dword ptr [ecx+14h]
fmulp	st(3), st
fxch	st(3)
faddp	st(2), st
fld	[esp+18h+var_10]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+8]
fmul	dword ptr [ecx+8]
fld	dword ptr [ecx+14h]
fmulp	st(2), st
faddp	st(1), st
fadd	[esp+18h+var_4]
fstp	dword ptr [eax+14h]
add	esp, 18h
retn	4
sub_64EAF0 endp

align 10h



sub_64EBB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
mov	eax, ecx
fld	dword ptr [eax]
mov	ecx, [esp+18h+arg_0]
fstp	[esp+18h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+18h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+18h+var_10]
fld	dword ptr [eax+0Ch]
fstp	[esp+18h+var_C]
fld	dword ptr [eax+10h]
fstp	[esp+18h+var_8]
fld	dword ptr [eax+14h]
fstp	[esp+18h+var_4]
fld	dword ptr [ecx+4]
fld	[esp+18h+var_C]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+18h+var_18]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fstp	dword ptr [eax]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+4]
fld	[esp+18h+var_8]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+18h+var_14]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fstp	dword ptr [eax+10h]
fld	dword ptr [ecx+4]
fld	[esp+18h+var_4]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+18h+var_10]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fadd	dword ptr [ecx+14h]
fstp	dword ptr [eax+14h]
add	esp, 18h
retn	4
sub_64EBB0 endp

align 10h



sub_64EC70 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 30h
fld	dword ptr [ecx]
lea	eax, [esp+30h+var_18]
fstp	[esp+30h+var_30]
push	eax
fld	dword ptr [ecx+4]
fstp	[esp+34h+var_2C]
fld	dword ptr [ecx+8]
fstp	[esp+34h+var_28]
fld	dword ptr [ecx+0Ch]
fstp	[esp+34h+var_24]
fld	dword ptr [ecx+10h]
fstp	[esp+34h+var_20]
fld	dword ptr [ecx+14h]
lea	ecx, [esp+34h+var_30]
fstp	[esp+34h+var_1C]
fld	[esp+34h+var_30]
fstp	[esp+34h+var_18]
fld	[esp+34h+var_2C]
fstp	[esp+34h+var_14]
fld	[esp+34h+var_28]
fstp	[esp+34h+var_10]
fld	[esp+34h+var_24]
fstp	[esp+34h+var_C]
fld	[esp+34h+var_20]
fstp	[esp+34h+var_8]
fld	[esp+34h+var_1C]
fstp	[esp+34h+var_4]
call	sub_64E9E0
mov	eax, [esp+30h+arg_4]
fld	dword ptr [eax]
mov	ecx, [esp+30h+arg_0]
fmul	[esp+30h+var_30]
fld	dword ptr [eax+4]
fmul	[esp+30h+var_2C]
faddp	st(1), st
fadd	[esp+30h+var_28]
fstp	dword ptr [ecx]
fld	dword ptr [eax+4]
fmul	[esp+30h+var_20]
fld	dword ptr [eax]
fmul	[esp+30h+var_24]
faddp	st(1), st
fadd	[esp+30h+var_1C]
fstp	dword ptr [ecx+4]
add	esp, 30h
retn	8
sub_64EC70 endp

align 10h



sub_64ED20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
fld	dword ptr [ecx+0Ch]
fld	dword ptr [ecx]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+8+var_4]
fld	dword ptr [ecx+10h]
fld	dword ptr [ecx+4]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+8+var_8]
fld	[esp+8+var_8]
fld	[esp+8+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64ED59
fstp	st(1)
jmp	short loc_64ED5B

loc_64ED59:
fstp	st

loc_64ED5B:
fstp	[esp+8+var_8]
fld	[esp+8+var_8]
call	__CIsqrt
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
add	esp, 8
retn
sub_64ED20 endp

align 10h



sub_64ED80 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 40h
mov	eax, [esp+40h+arg_0]
fld	dword ptr [eax+10h]
push	esi
fsub	dword ptr [eax]
mov	esi, ecx
fstp	[esp+44h+arg_0]
fld	dword ptr [eax+0Ch]
fsub	dword ptr [eax+4]
fstp	[esp+44h+var_3C]
fld	dword ptr [eax+14h]
fsub	dword ptr [eax+4]
fstp	[esp+44h+var_38]
fld	dword ptr [eax]
fstp	[esp+44h+var_40]
fld	dword ptr [eax+4]
fstp	[esp+44h+var_34]
fld	dword ptr [eax+8]
fsub	dword ptr [eax]
mov	eax, [esp+44h+arg_4]
fstp	dword ptr [esi]
fld	[esp+44h+arg_0]
fst	dword ptr [esi+4]
fld	[esp+44h+var_40]
fst	dword ptr [esi+8]
fld	[esp+44h+var_3C]
fst	dword ptr [esi+0Ch]
fld	[esp+44h+var_38]
fst	dword ptr [esi+10h]
fld	[esp+44h+var_34]
fst	dword ptr [esi+14h]
fld	dword ptr [eax+8]
fsub	dword ptr [eax]
fstp	[esp+44h+var_18]
fld	dword ptr [eax+10h]
fsub	dword ptr [eax]
fstp	[esp+44h+var_14]
fld	dword ptr [eax]
fstp	[esp+44h+var_10]
fld	dword ptr [eax+0Ch]
fsub	dword ptr [eax+4]
fstp	[esp+44h+var_C]
fld	dword ptr [eax+14h]
fsub	dword ptr [eax+4]
fstp	[esp+44h+var_8]
fld	dword ptr [eax+4]
lea	eax, [esp+44h+var_30]
fstp	[esp+44h+var_4]
push	eax
fld	dword ptr [esi]
fstp	[esp+48h+var_30]
fxch	st(4)
fstp	[esp+48h+var_2C]
fxch	st(2)
fstp	[esp+48h+var_28]
fstp	[esp+48h+var_24]
fstp	[esp+48h+var_20]
fstp	[esp+48h+var_1C]
call	sub_64E9E0
lea	ecx, [esp+44h+var_18]
push	ecx
mov	ecx, esi
call	sub_64EBB0
mov	eax, esi
pop	esi
add	esp, 40h
retn	8
sub_64ED80 endp

align 10h



; int __stdcall	sub_64EE60(float, float, float,	float, int)
sub_64EE60 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
fld	[esp+18h+arg_0]
mov	eax, [esp+18h+arg_10]
fstp	[esp+18h+var_18]
push	eax
fld	[esp+1Ch+arg_4]
lea	edx, [esp+1Ch+var_18]
fst	[esp+1Ch+var_14]
push	edx
fld	[esp+20h+arg_8]
fst	[esp+20h+var_10]
fstp	[esp+20h+var_8]
fstp	[esp+20h+var_C]
fld	[esp+20h+arg_C]
fstp	[esp+20h+var_4]
call	sub_64ED80
add	esp, 18h
retn	14h
sub_64EE60 endp

align 10h



sub_64EEA0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
cmp	edx, [ecx+208h]
ja	short loc_64EEED
mov	eax, [ecx+204h]
lea	edx, [eax+edx-1]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[ecx+204h], edx
sub	edx, ecx
sub	edx, 4
push	esi
cmp	edx, 200h
jnb	short loc_64EEE1
mov	esi, 200h
sub	esi, edx
mov	[ecx+208h], esi
pop	esi
retn	4

loc_64EEE1:
xor	esi, esi
mov	[ecx+208h], esi
pop	esi
retn	4

loc_64EEED:
mov	ecx, [ecx]
push	0
push	4
push	edx
test	ecx, ecx
jnz	short loc_64EEFE
mov	ecx, dword_1855FC0

loc_64EEFE:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx
retn	4
sub_64EEA0 endp

align 10h



sub_64EF10 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
mov	eax, [esp+20h+arg_4]
fld	dword ptr [eax]
fstp	[esp+20h+var_20]
fld	dword ptr [eax+4]
fstp	[esp+20h+var_1C]
fld	dword ptr [ecx+4]
fld	[esp+20h+var_1C]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+20h+var_20]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	[esp+20h+var_18]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fadd	dword ptr [ecx+14h]
fstp	[esp+20h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+20h+var_20]
fld	dword ptr [eax+4]
fstp	[esp+20h+var_1C]
fld	dword ptr [ecx+4]
fld	[esp+20h+var_1C]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+20h+var_20]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	[esp+20h+var_10]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fadd	dword ptr [ecx+14h]
fstp	[esp+20h+var_C]
fld	dword ptr [eax+8]
fstp	[esp+20h+var_20]
fld	dword ptr [eax+0Ch]
fstp	[esp+20h+var_1C]
fld	dword ptr [ecx+4]
fld	[esp+20h+var_1C]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+20h+var_20]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	[esp+20h+var_8]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fadd	dword ptr [ecx+14h]
fstp	[esp+20h+var_4]
fld	dword ptr [eax]
fstp	[esp+20h+var_20]
fld	dword ptr [eax+0Ch]
fstp	[esp+20h+var_1C]
fld	dword ptr [ecx+4]
fld	[esp+20h+var_1C]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+20h+var_20]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	[esp+20h+var_20]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fadd	dword ptr [ecx+14h]
mov	ecx, [esp+20h+arg_0]
fstp	[esp+20h+var_1C]
fld	[esp+20h+var_18]
fst	dword ptr [ecx]
fld	[esp+20h+var_14]
fst	dword ptr [ecx+4]
fst	dword ptr [ecx+0Ch]
fxch	st(1)
fst	dword ptr [ecx+8]
fld	[esp+20h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F036
fxch	st(1)
fst	[esp+20h+arg_4]
jmp	short loc_64F03C

loc_64F036:
fst	[esp+20h+arg_4]
fxch	st(1)

loc_64F03C:
fld	[esp+20h+arg_4]
fst	dword ptr [ecx]
fld	[esp+20h+var_C]
fcom	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F057
fxch	st(4)
fst	[esp+20h+arg_4]
jmp	short loc_64F05D

loc_64F057:
fst	[esp+20h+arg_4]
fxch	st(4)

loc_64F05D:
fld	[esp+20h+arg_4]
fst	dword ptr [ecx+4]
fxch	st(4)
fcom	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_64F073
fstp	st
jmp	short loc_64F075

loc_64F073:
fstp	st(3)

loc_64F075:
fxch	st(2)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fst	dword ptr [ecx+8]
fxch	st(4)
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_64F091
fstp	st
jmp	short loc_64F093

loc_64F091:
fstp	st(2)

loc_64F093:
fxch	st(1)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fst	dword ptr [ecx+0Ch]
fxch	st(1)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fld	[esp+20h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F0BF
fxch	st(1)
fstp	[esp+20h+arg_4]
jmp	short loc_64F0C5

loc_64F0BF:
fstp	st(1)
fst	[esp+20h+arg_4]

loc_64F0C5:
fld	[esp+20h+arg_4]
fst	dword ptr [ecx]
fxch	st(3)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fld	[esp+20h+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F0EA
fxch	st(1)
fstp	[esp+20h+arg_4]
jmp	short loc_64F0F0

loc_64F0EA:
fstp	st(1)
fst	[esp+20h+arg_4]

loc_64F0F0:
fld	[esp+20h+arg_4]
fst	dword ptr [ecx+4]
fxch	st(5)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F10E
fstp	st(2)
jmp	short loc_64F110

loc_64F10E:
fstp	st

loc_64F110:
fxch	st(1)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fst	dword ptr [ecx+8]
fxch	st(2)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F134
fstp	st(1)
jmp	short loc_64F136

loc_64F134:
fstp	st

loc_64F136:
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fst	dword ptr [ecx+0Ch]
fxch	st(2)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fld	[esp+20h+var_20]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F15F
fxch	st(1)
fstp	[esp+20h+arg_4]
jmp	short loc_64F165

loc_64F15F:
fstp	st(1)
fst	[esp+20h+arg_4]

loc_64F165:
fld	[esp+20h+arg_4]
fstp	dword ptr [ecx]
fxch	st(3)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fld	[esp+20h+var_1C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F18A
fxch	st(1)
fstp	[esp+20h+arg_4]
jmp	short loc_64F190

loc_64F18A:
fstp	st(1)
fst	[esp+20h+arg_4]

loc_64F190:
fld	[esp+20h+arg_4]
fstp	dword ptr [ecx+4]
fxch	st(1)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F1AE
fstp	st(3)
jmp	short loc_64F1B0

loc_64F1AE:
fstp	st

loc_64F1B0:
fxch	st(2)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fstp	dword ptr [ecx+8]
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_64F1E1
fstp	st(1)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fstp	dword ptr [ecx+0Ch]
add	esp, 20h
retn	8

loc_64F1E1:
fstp	st
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fstp	dword ptr [ecx+0Ch]
add	esp, 20h
retn	8
sub_64EF10 endp

align 10h



; int __thiscall sub_64F200(int, int)
sub_64F200 proc	near

var_10=	qword ptr -10h
arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_64F2BC
push	esi
lea	esi, [edi+0F4h]
jmp	short loc_64F220
align 10h

loc_64F220:
cmp	dword ptr [esi+208h], 188h
jb	short loc_64F26A
mov	eax, [esi+204h]
lea	edx, [eax+187h]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_64F260
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_64F286

loc_64F260:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_64F286

loc_64F26A:
mov	ecx, [esi]
push	0
push	4
push	188h
test	ecx, ecx
jnz	short loc_64F27F
mov	ecx, dword_1855FC0

loc_64F27F:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_64F286:
test	eax, eax
jz	short loc_64F2A0
mov	ecx, [esp+8+arg_0]
fld	dword ptr [ecx]
sub	esp, 8
fstp	[esp+10h+var_10]
push	edi		; int
mov	ecx, eax
call	sub_6A2F40
jmp	short loc_64F2A2

loc_64F2A0:
xor	eax, eax

loc_64F2A2:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_64F220
pop	esi

loc_64F2BC:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_64F200 endp

align 10h



sub_64F2D0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 48h
push	ebx
push	ebp
push	esi
push	edi
xor	ecx, ecx
mov	[esp+58h+var_24], ecx
mov	[esp+58h+var_18], ecx
mov	[esp+58h+var_C], ecx
mov	ecx, [esp+58h+arg_4]
lea	ecx, [ecx+ecx*2]
mov	esi, 2
mov	[esp+58h+var_2C], esi
mov	[esp+58h+var_20], esi
mov	[esp+58h+var_4], esi
mov	esi, [esp+58h+arg_8]
add	ecx, ecx
add	ecx, ecx
mov	eax, 1
mov	[esp+58h+var_30], eax
mov	[esp+58h+var_14], eax
mov	[esp+58h+var_8], eax
mov	eax, [esp+58h+arg_0]
mov	edx, 3
mov	[esp+58h+var_28], edx
mov	[esp+58h+var_1C], edx
mov	[esp+58h+var_10], edx
mov	edx, [esp+ecx+58h+var_2C]
lea	esi, [esi+esi*2]
add	esi, esi
add	esi, esi
mov	ebp, [esp+esi+58h+var_2C]
mov	ebx, [esp+esi+58h+var_30]
mov	esi, [esp+esi+58h+var_28]
add	edx, edx
add	edx, edx
lea	edi, [edx+ebp]
lea	edi, [eax+edi*4]
mov	[esp+58h+arg_0], ebx
mov	[esp+58h+var_3C], edi
mov	edi, [esp+ecx+58h+var_30]
mov	ecx, [esp+ecx+58h+var_28]
add	edi, edi
add	edi, edi
add	ebx, edi
lea	ebx, [eax+ebx*4]
mov	[esp+58h+var_38], ebx
add	ecx, ecx
add	ecx, ecx
lea	ebx, [esi+ecx]
lea	ebx, [eax+ebx*4]
mov	[esp+58h+var_34], ebx
lea	ebx, [ecx+ebp]
lea	ebx, [eax+ebx*4]
mov	[esp+58h+var_48], ebx
mov	ebx, [esp+58h+arg_0]
add	ebx, edx
lea	ebx, [eax+ebx*4]
mov	[esp+58h+var_44], ebx
lea	ebx, [esi+edi]
lea	ebx, [eax+ebx*4]
mov	[esp+58h+var_40], ebx
mov	ebx, [esp+58h+arg_0]
add	edi, ebp
mov	ebp, [esp+58h+var_44]
add	ecx, ebx
mov	ebx, [esp+58h+var_34]
add	esi, edx
mov	edx, [esp+58h+var_3C]
fld	dword ptr [edx]
lea	ecx, [eax+ecx*4]
lea	edi, [eax+edi*4]
lea	eax, [eax+esi*4]
mov	esi, [esp+58h+var_38]
fmul	dword ptr [esi]
fmul	dword ptr [ebx]
fstp	[esp+58h+arg_0]
fld	[esp+58h+arg_0]
fld	dword ptr [ebp+0]
mov	ebp, [esp+58h+var_48]
fmul	dword ptr [ebp+0]
mov	ebp, [esp+58h+var_40]
fmul	dword ptr [ebp+0]
mov	ebp, [esp+58h+var_48]
faddp	st(1), st
fstp	[esp+58h+arg_0]
fld	[esp+58h+arg_0]
fld	dword ptr [edi]
fmul	dword ptr [ecx]
fmul	dword ptr [eax]
faddp	st(1), st
fstp	[esp+58h+arg_0]
fld	[esp+58h+arg_0]
fld	dword ptr [ebp+0]
fmul	dword ptr [esi]
fmul	dword ptr [eax]
mov	eax, [esp+58h+var_44]
fsubp	st(1), st
fstp	[esp+58h+arg_0]
fld	[esp+58h+arg_0]
fld	dword ptr [edi]
pop	edi
fmul	dword ptr [eax]
mov	eax, [esp+54h+arg_8]
pop	esi
pop	ebp
fmul	dword ptr [ebx]
pop	ebx
fsubp	st(1), st
fstp	[esp+48h+arg_0]
fld	[esp+48h+arg_0]
fld	dword ptr [edx]
mov	edx, [esp+48h+arg_4]
fmul	dword ptr [ecx]
mov	ecx, [esp+48h+var_40]
add	edx, eax
fmul	dword ptr [ecx]
fsubp	st(1), st
fstp	[esp+48h+arg_0]
fld	[esp+48h+arg_0]
test	dl, 1
jz	short loc_64F446
fchs

loc_64F446:
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
add	esp, 48h
retn	0Ch
sub_64F2D0 endp

align 10h



sub_64F460 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 44h
push	ebx
push	ebp
mov	ebp, [esp+4Ch+arg_4]
push	esi
push	edi
mov	[esp+54h+var_44], ecx
xor	ebx, ebx
lea	edi, [esp+54h+var_40]

loc_64F475:
xor	esi, esi

loc_64F477:
mov	ecx, [esp+54h+var_44]
push	esi
push	ebx
push	ebp
call	sub_64F2D0
fstp	dword ptr [edi]
inc	esi
add	edi, 4
cmp	esi, 4
jl	short loc_64F477
inc	ebx
cmp	ebx, 4
jl	short loc_64F475
fld	dword ptr [ebp+0]
fmul	[esp+54h+var_40]
fadd	ds:dbl_15FCC10
fstp	[esp+54h+arg_4]
fld	[esp+54h+arg_4]
fld	dword ptr [ebp+4]
fmul	[esp+54h+var_3C]
faddp	st(1), st
fstp	[esp+54h+arg_4]
fld	[esp+54h+arg_4]
fld	dword ptr [ebp+8]
fmul	[esp+54h+var_38]
faddp	st(1), st
fstp	[esp+54h+arg_4]
fld	[esp+54h+arg_4]
fld	dword ptr [ebp+0Ch]
fmul	[esp+54h+var_34]
faddp	st(1), st
fstp	[esp+54h+arg_4]
fldz
fld	[esp+54h+arg_4]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
mov	eax, [esp+54h+arg_0]
jp	short loc_64F51F
fstp	st
mov	ecx, 10h
mov	esi, offset unk_167D018
mov	edi, eax
rep movsd
fld	dword ptr [ebp+30h]
fchs
fstp	dword ptr [eax+30h]
fld	dword ptr [ebp+34h]
fchs
fstp	dword ptr [eax+34h]
fld	dword ptr [ebp+38h]
fchs
fstp	dword ptr [eax+38h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 44h
retn	8

loc_64F51F:
fld1
add	eax, 20h
fdivrp	st(1), st
lea	ecx, [esp+54h+var_3C]
mov	edx, 4
fstp	[esp+54h+arg_4]
fld	[esp+54h+arg_4]

loc_64F537:
fld	dword ptr [ecx-4]
add	eax, 4
fmul	st, st(1)
add	ecx, 10h
sub	edx, 1
fstp	dword ptr [eax-24h]
fld	dword ptr [ecx-10h]
fmul	st, st(1)
fstp	dword ptr [eax-14h]
fld	dword ptr [ecx-0Ch]
fmul	st, st(1)
fstp	dword ptr [eax-4]
fld	dword ptr [ecx-8]
fmul	st, st(1)
fstp	dword ptr [eax+0Ch]
jnz	short loc_64F537
pop	edi
fstp	st
pop	esi
pop	ebp
pop	ebx
add	esp, 44h
retn	8
sub_64F460 endp

align 10h



sub_64F570 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+10h]
fldz
fst	dword ptr [eax+20h]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+30h]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+14h]
fst	dword ptr [eax+24h]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+34h]
fst	dword ptr [eax+8]
fst	dword ptr [eax+18h]
fld1
fst	dword ptr [eax+28h]
fstp	dword ptr [eax+3Ch]
fst	dword ptr [eax+38h]
fst	dword ptr [eax+0Ch]
fst	dword ptr [eax+1Ch]
fstp	dword ptr [eax+2Ch]
retn	4
sub_64F570 endp

align 10h



sub_64F5C0 proc	near
fld	dword ptr [ecx]
fld	ds:dbl_15FCDD0
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	loc_64F7B0
fld	dword ptr [ecx]
fld	ds:dbl_15FCDD8
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+4]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+8]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+0Ch]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+10h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+10h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+14h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+14h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+18h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+18h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+1Ch]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+1Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+20h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+20h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+24h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+24h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+28h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_64F7AE
fld	dword ptr [ecx+28h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_64F7AE
fld	dword ptr [ecx+2Ch]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64F7AE
fld	dword ptr [ecx+2Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64F7AE
fld	dword ptr [ecx+30h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64F7AE
fld	dword ptr [ecx+30h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64F7AE
fld	dword ptr [ecx+34h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64F7AE
fld	dword ptr [ecx+34h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64F7AE
fld	dword ptr [ecx+38h]
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_64F7AE
fld	dword ptr [ecx+38h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_64F7AE
fld	dword ptr [ecx+3Ch]
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	short loc_64F7B0
fld	dword ptr [ecx+3Ch]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_64F7B2
mov	eax, 1
retn

loc_64F7AE:
fstp	st

loc_64F7B0:
fstp	st

loc_64F7B2:
xor	eax, eax
retn
sub_64F5C0 endp

align 10h



; int __fastcall sub_64F7C0(void *)
sub_64F7C0 proc	near
push	esi
push	40h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
fld1
fst	dword ptr [esi]
add	esp, 0Ch
fst	dword ptr [esi+14h]
fst	dword ptr [esi+28h]
fstp	dword ptr [esi+3Ch]
pop	esi
retn
sub_64F7C0 endp

align 10h



sub_64F7E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
fld	dword ptr [eax]
fmul	dword ptr [edx]
fld	dword ptr [eax+4]
fmul	dword ptr [edx+10h]
faddp	st(1), st
fld	dword ptr [edx+20h]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [edx+30h]
fmul	dword ptr [eax+0Ch]
faddp	st(1), st
fstp	dword ptr [ecx]
fld	dword ptr [edx+14h]
fmul	dword ptr [eax+4]
fld	dword ptr [eax]
fmul	dword ptr [edx+4]
faddp	st(1), st
fld	dword ptr [edx+24h]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [eax+0Ch]
fmul	dword ptr [edx+34h]
faddp	st(1), st
fstp	dword ptr [ecx+4]
fld	dword ptr [edx+18h]
fmul	dword ptr [eax+4]
fld	dword ptr [edx+8]
fmul	dword ptr [eax]
faddp	st(1), st
fld	dword ptr [eax+8]
fmul	dword ptr [edx+28h]
faddp	st(1), st
fld	dword ptr [eax+0Ch]
fmul	dword ptr [edx+38h]
faddp	st(1), st
fstp	dword ptr [ecx+8]
fld	dword ptr [edx+1Ch]
fmul	dword ptr [eax+4]
fld	dword ptr [eax]
fmul	dword ptr [edx+0Ch]
faddp	st(1), st
fld	dword ptr [edx+2Ch]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [eax+0Ch]
fmul	dword ptr [edx+3Ch]
faddp	st(1), st
fstp	dword ptr [ecx+0Ch]
fld	dword ptr [eax+14h]
fmul	dword ptr [edx+10h]
fld	dword ptr [eax+10h]
fmul	dword ptr [edx]
faddp	st(1), st
fld	dword ptr [edx+20h]
fmul	dword ptr [eax+18h]
faddp	st(1), st
fld	dword ptr [edx+30h]
fmul	dword ptr [eax+1Ch]
faddp	st(1), st
fstp	dword ptr [ecx+10h]
fld	dword ptr [eax+10h]
fmul	dword ptr [edx+4]
fld	dword ptr [edx+14h]
fmul	dword ptr [eax+14h]
faddp	st(1), st
fld	dword ptr [edx+24h]
fmul	dword ptr [eax+18h]
faddp	st(1), st
fld	dword ptr [eax+1Ch]
fmul	dword ptr [edx+34h]
faddp	st(1), st
fstp	dword ptr [ecx+14h]
fld	dword ptr [eax+14h]
fmul	dword ptr [edx+18h]
fld	dword ptr [eax+10h]
fmul	dword ptr [edx+8]
faddp	st(1), st
fld	dword ptr [eax+18h]
fmul	dword ptr [edx+28h]
faddp	st(1), st
fld	dword ptr [edx+38h]
fmul	dword ptr [eax+1Ch]
faddp	st(1), st
fstp	dword ptr [ecx+18h]
fld	dword ptr [eax+10h]
fmul	dword ptr [edx+0Ch]
fld	dword ptr [edx+1Ch]
fmul	dword ptr [eax+14h]
faddp	st(1), st
fld	dword ptr [edx+2Ch]
fmul	dword ptr [eax+18h]
faddp	st(1), st
fld	dword ptr [eax+1Ch]
fmul	dword ptr [edx+3Ch]
faddp	st(1), st
fstp	dword ptr [ecx+1Ch]
fld	dword ptr [eax+24h]
fmul	dword ptr [edx+10h]
fld	dword ptr [eax+20h]
fmul	dword ptr [edx]
faddp	st(1), st
fld	dword ptr [edx+20h]
fmul	dword ptr [eax+28h]
faddp	st(1), st
fld	dword ptr [edx+30h]
fmul	dword ptr [eax+2Ch]
faddp	st(1), st
fstp	dword ptr [ecx+20h]
fld	dword ptr [eax+20h]
fmul	dword ptr [edx+4]
fld	dword ptr [edx+14h]
fmul	dword ptr [eax+24h]
faddp	st(1), st
fld	dword ptr [edx+24h]
fmul	dword ptr [eax+28h]
faddp	st(1), st
fld	dword ptr [eax+2Ch]
fmul	dword ptr [edx+34h]
faddp	st(1), st
fstp	dword ptr [ecx+24h]
fld	dword ptr [eax+24h]
fmul	dword ptr [edx+18h]
fld	dword ptr [eax+20h]
fmul	dword ptr [edx+8]
faddp	st(1), st
fld	dword ptr [eax+28h]
fmul	dword ptr [edx+28h]
faddp	st(1), st
fld	dword ptr [edx+38h]
fmul	dword ptr [eax+2Ch]
faddp	st(1), st
fstp	dword ptr [ecx+28h]
fld	dword ptr [eax+20h]
fmul	dword ptr [edx+0Ch]
fld	dword ptr [edx+1Ch]
fmul	dword ptr [eax+24h]
faddp	st(1), st
fld	dword ptr [edx+2Ch]
fmul	dword ptr [eax+28h]
faddp	st(1), st
fld	dword ptr [eax+2Ch]
fmul	dword ptr [edx+3Ch]
faddp	st(1), st
fstp	dword ptr [ecx+2Ch]
fld	dword ptr [edx]
fmul	dword ptr [eax+30h]
fld	dword ptr [eax+34h]
fmul	dword ptr [edx+10h]
faddp	st(1), st
fld	dword ptr [eax+38h]
fmul	dword ptr [edx+20h]
faddp	st(1), st
fld	dword ptr [edx+30h]
fmul	dword ptr [eax+3Ch]
faddp	st(1), st
fstp	dword ptr [ecx+30h]
fld	dword ptr [edx+14h]
fmul	dword ptr [eax+34h]
fld	dword ptr [eax+30h]
fmul	dword ptr [edx+4]
faddp	st(1), st
fld	dword ptr [eax+38h]
fmul	dword ptr [edx+24h]
faddp	st(1), st
fld	dword ptr [eax+3Ch]
fmul	dword ptr [edx+34h]
faddp	st(1), st
fstp	dword ptr [ecx+34h]
fld	dword ptr [edx+8]
fmul	dword ptr [eax+30h]
fld	dword ptr [edx+18h]
fmul	dword ptr [eax+34h]
faddp	st(1), st
fld	dword ptr [eax+38h]
fmul	dword ptr [edx+28h]
faddp	st(1), st
fld	dword ptr [edx+38h]
fmul	dword ptr [eax+3Ch]
faddp	st(1), st
fstp	dword ptr [ecx+38h]
fld	dword ptr [edx+1Ch]
fmul	dword ptr [eax+34h]
fld	dword ptr [eax+30h]
fmul	dword ptr [edx+0Ch]
faddp	st(1), st
fld	dword ptr [eax+38h]
fmul	dword ptr [edx+2Ch]
faddp	st(1), st
fld	dword ptr [eax+3Ch]
fmul	dword ptr [edx+3Ch]
faddp	st(1), st
fstp	dword ptr [ecx+3Ch]
retn	8
sub_64F7E0 endp

align 10h



sub_64FA00 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 44h
push	esi
push	edi
mov	esi, ecx
mov	ecx, 10h
lea	edi, [esp+4Ch+var_40]
rep movsd
fld	[esp+4Ch+var_40]
fld	[esp+4Ch+var_3C]
fld	[esp+4Ch+var_38]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
call	__CIsqrt
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
fld1
fdivrp	st(1), st
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
fld	st
fmul	[esp+4Ch+var_40]
fstp	[esp+4Ch+var_40]
fld	st
fmul	[esp+4Ch+var_3C]
fstp	[esp+4Ch+var_3C]
fmul	[esp+4Ch+var_38]
fstp	[esp+4Ch+var_38]
fld	[esp+4Ch+var_30]
fld	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_28]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
call	__CIsqrt
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
fld1
fdivrp	st(1), st
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
fmul	[esp+4Ch+var_2C]
fstp	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_1C]
fld	[esp+4Ch+var_20]
fld	[esp+4Ch+var_18]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
call	__CIsqrt
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
fld1
fdivrp	st(1), st
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+var_44]
fld	st
fmul	[esp+4Ch+var_20]
fstp	[esp+4Ch+var_20]
fld	st
fmul	[esp+4Ch+var_1C]
mov	esi, [esp+4Ch+arg_4]
fstp	[esp+4Ch+var_1C]
fmul	[esp+4Ch+var_18]
fstp	[esp+4Ch+var_18]
fld	[esp+4Ch+var_3C]
fcom	ds:dbl_15FD680
fnstsw	ax
test	ah, 41h
jnz	short loc_64FB63
fstp	st
test	esi, esi
jz	short loc_64FB3B
fld	[esp+4Ch+var_20]
fld	[esp+4Ch+var_18]
call	sub_79A3DA
fstp	[esp+4Ch+arg_4]
fld	[esp+4Ch+arg_4]
fstp	dword ptr [esi]

loc_64FB3B:
mov	eax, [esp+4Ch+arg_8]
test	eax, eax
jz	short loc_64FB4B
fld	ds:flt_15FCF40

loc_64FB49:
fstp	dword ptr [eax]

loc_64FB4B:
mov	eax, [esp+4Ch+arg_0]
test	eax, eax
jz	loc_64FBF4
fldz
pop	edi
fstp	dword ptr [eax]
pop	esi
add	esp, 44h
retn	0Ch

loc_64FB63:
fcomp	ds:dbl_1431A28
fnstsw	ax
test	ah, 5
jp	short loc_64FB9B
test	esi, esi
jz	short loc_64FB8B
fld	[esp+4Ch+var_20]
fld	[esp+4Ch+var_18]
call	sub_79A3DA
fstp	[esp+4Ch+arg_4]
fld	[esp+4Ch+arg_4]
fstp	dword ptr [esi]

loc_64FB8B:
mov	eax, [esp+4Ch+arg_8]
test	eax, eax
jz	short loc_64FB4B
fld	ds:flt_15FD2C4
jmp	short loc_64FB49

loc_64FB9B:
test	esi, esi
jz	short loc_64FBB8
fld	[esp+4Ch+var_38]
fchs
fld	[esp+4Ch+var_40]
call	sub_79A3DA
fstp	[esp+4Ch+arg_4]
fld	[esp+4Ch+arg_4]
fstp	dword ptr [esi]

loc_64FBB8:
mov	esi, [esp+4Ch+arg_0]
test	esi, esi
jz	short loc_64FBD9
fld	[esp+4Ch+var_1C]
fchs
fld	[esp+4Ch+var_2C]
call	sub_79A3DA
fstp	[esp+4Ch+arg_4]
fld	[esp+4Ch+arg_4]
fstp	dword ptr [esi]

loc_64FBD9:
mov	esi, [esp+4Ch+arg_8]
test	esi, esi
jz	short loc_64FBF4
fld	[esp+4Ch+var_3C]
call	__CIasin
fstp	[esp+4Ch+arg_4]
fld	[esp+4Ch+arg_4]
fstp	dword ptr [esi]

loc_64FBF4:
pop	edi
pop	esi
add	esp, 44h
retn	0Ch
sub_64FA00 endp

align 10h



; int __thiscall sub_64FC00(void *, float)
sub_64FC00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	40h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
fld1
fstp	dword ptr [esi+3Ch]
add	esp, 0Ch
fld	[esp+8+arg_0]
call	__CIcos
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fstp	[esp+8+var_4]
fld	[esp+8+arg_0]
call	__CIsin
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	[esp+8+arg_0]
fld1
fstp	dword ptr [esi]
fldz
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
fst	dword ptr [esi+10h]
fld	[esp+8+var_4]
fst	dword ptr [esi+14h]
fld	[esp+8+arg_0]
fst	dword ptr [esi+18h]
fxch	st(2)
fstp	dword ptr [esi+20h]
fxch	st(1)
fchs
fstp	dword ptr [esi+24h]
fstp	dword ptr [esi+28h]
pop	esi
pop	ecx
retn	4
sub_64FC00 endp

align 10h



; int __thiscall sub_64FC80(void *, float)
sub_64FC80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	40h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
fld1
fstp	dword ptr [esi+3Ch]
add	esp, 0Ch
fld	[esp+8+arg_0]
call	__CIcos
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fstp	[esp+8+var_4]
fld	[esp+8+arg_0]
call	__CIsin
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	[esp+8+arg_0]
fld	[esp+8+var_4]
fst	dword ptr [esi]
fldz
fst	dword ptr [esi+4]
fld	[esp+8+arg_0]
fld	st
fchs
fstp	dword ptr [esi+8]
fxch	st(1)
fst	dword ptr [esi+10h]
fld1
fstp	dword ptr [esi+14h]
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+24h]
fstp	dword ptr [esi+20h]
fstp	dword ptr [esi+28h]
pop	esi
pop	ecx
retn	4
sub_64FC80 endp

align 10h



; int __thiscall sub_64FD00(void *, float, float, float, float)
sub_64FD00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
push	40h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
fld	[esp+10h+arg_8]
fld	st
add	esp, 0Ch
fsub	[esp+4+arg_C]
fstp	[esp+4+arg_8]
fld	[esp+4+arg_0]
fld	ds:dbl_15FCD70
fld	st
fdivrp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fdiv	[esp+4+arg_4]
fstp	dword ptr [esi+14h]
fld	[esp+4+arg_8]
fld	st
fld1
fdivrp	st(1), st
fstp	dword ptr [esi+28h]
fdivp	st(1), st
fstp	dword ptr [esi+38h]
fld1
fstp	dword ptr [esi+3Ch]
pop	esi
retn	10h
sub_64FD00 endp

align 10h



; int __thiscall sub_64FD60(void *, float, float, float, float)
sub_64FD60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
push	40h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
fld	[esp+10h+arg_C]
fld	[esp+10h+arg_8]
add	esp, 0Ch
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+4+arg_C]
fld	[esp+4+arg_0]
fld	ds:dbl_15FCD70
fld	st
fdivrp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fdiv	[esp+4+arg_4]
fstp	dword ptr [esi+14h]
fld	[esp+4+arg_C]
fld	st
fld1
fdivrp	st(1), st
fstp	dword ptr [esi+28h]
fxch	st(1)
fchs
fdivrp	st(1), st
fstp	dword ptr [esi+38h]
fld1
fstp	dword ptr [esi+3Ch]
pop	esi
retn	10h
sub_64FD60 endp

align 10h



sub_64FDC0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4

sub	esp, 40h
push	esi
push	edi
push	40h		; size_t
lea	eax, [esp+4Ch+var_40]
push	0		; int
push	eax		; void *
mov	edi, ecx
call	_memset
fld1
fst	[esp+54h+var_40]
add	esp, 0Ch
fst	[esp+48h+var_2C]
xor	eax, eax
fst	[esp+48h+var_18]
lea	ecx, [edi+8]
fstp	[esp+48h+var_4]
nop

loc_64FDF0:
fld	dword ptr [ecx-8]
inc	eax
fstp	[esp+eax*4+48h+var_44]
add	ecx, 10h
cmp	eax, 4
fld	dword ptr [ecx-14h]
fstp	[esp+eax*4+48h+var_34]
fld	dword ptr [ecx-10h]
fstp	[esp+eax*4+48h+var_24]
fld	dword ptr [ecx-0Ch]
fstp	[esp+eax*4+48h+var_14]
jl	short loc_64FDF0
mov	ecx, 10h
lea	esi, [esp+48h+var_40]
rep movsd
pop	edi
pop	esi
add	esp, 40h
retn
sub_64FDC0 endp

align 10h



; int __thiscall sub_64FE30(void *, int, int, int)
sub_64FE30 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
push	esi
push	edi
push	40h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
mov	edi, [esp+38h+arg_0]
mov	eax, [esp+38h+arg_4]
fld	dword ptr [edi]
fsub	dword ptr [eax]
add	esp, 0Ch
fstp	[esp+2Ch+var_24]
fld	dword ptr [edi+4]
fsub	dword ptr [eax+4]
fstp	[esp+2Ch+var_20]
fld	dword ptr [edi+8]
fsub	dword ptr [eax+8]
fstp	[esp+2Ch+var_1C]
fld	[esp+2Ch+var_20]
fld	[esp+2Ch+var_24]
fld	[esp+2Ch+var_1C]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
call	__CIsqrt
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
mov	eax, [esp+2Ch+arg_8]
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+var_24]
fld	[esp+2Ch+arg_0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_24]
fld	[esp+2Ch+var_20]
fdiv	st, st(1)
fstp	[esp+2Ch+var_20]
fdivr	[esp+2Ch+var_1C]
fstp	[esp+2Ch+var_1C]
fld	dword ptr [eax+4]
fld	[esp+2Ch+var_1C]
fld	st
fmulp	st(2), st
fld	dword ptr [eax+8]
fld	[esp+2Ch+var_20]
fld	st
fmulp	st(2), st
fxch	st(3)
fsubrp	st(1), st
fstp	[esp+2Ch+var_18]
fld	dword ptr [eax+8]
fld	[esp+2Ch+var_24]
fld	st
fmulp	st(2), st
fld	dword ptr [eax]
fmulp	st(3), st
fxch	st(1)
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_14]
fld	dword ptr [eax]
fmulp	st(2), st
fmul	dword ptr [eax+4]
fsubp	st(1), st
fstp	[esp+2Ch+var_10]
fld	[esp+2Ch+var_14]
fld	[esp+2Ch+var_18]
fld	[esp+2Ch+var_10]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
call	__CIsqrt
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+var_18]
fld	[esp+2Ch+arg_0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_14]
fdiv	st, st(1)
fstp	[esp+2Ch+var_14]
fdivr	[esp+2Ch+var_10]
fstp	[esp+2Ch+var_10]
fld	[esp+2Ch+var_20]
fld	st
fld	[esp+2Ch+var_10]
fld	st
fmulp	st(2), st
fld	[esp+2Ch+var_1C]
fld	st
fld	[esp+2Ch+var_14]
fld	st
fmulp	st(2), st
fxch	st(4)
fsubrp	st(1), st
fstp	[esp+2Ch+var_C]
fld	st
fmul	[esp+2Ch+var_18]
fld	[esp+2Ch+var_24]
fld	st
fmul	st, st(4)
fsubp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_8]
fld	st
fmul	st, st(4)
fld	st(5)
fmul	[esp+2Ch+var_18]
fsubp	st(1), st
fstp	[esp+2Ch+var_4]
fld	[esp+2Ch+var_18]
fst	dword ptr [esi]
fxch	st(4)
fst	dword ptr [esi+10h]
fxch	st(3)
fst	dword ptr [esi+20h]
fld	dword ptr [edi]
fmulp	st(5), st
fld	dword ptr [edi+4]
fmulp	st(4), st
fxch	st(4)
faddp	st(3), st
fld	dword ptr [edi+8]
fmulp	st(4), st
fxch	st(2)
faddp	st(3), st
fxch	st(2)
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
fchs
fstp	dword ptr [esi+30h]
fld	[esp+2Ch+var_C]
fst	dword ptr [esi+4]
fld	[esp+2Ch+var_8]
fst	dword ptr [esi+14h]
fld	[esp+2Ch+var_4]
fst	dword ptr [esi+24h]
fld	dword ptr [edi]
fmulp	st(3), st
fld	dword ptr [edi+4]
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	dword ptr [edi+8]
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
fchs
fstp	dword ptr [esi+34h]
fst	dword ptr [esi+8]
fxch	st(2)
fst	dword ptr [esi+18h]
fxch	st(1)
fst	dword ptr [esi+28h]
fld	dword ptr [edi]
fmulp	st(3), st
fld	dword ptr [edi+4]
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	dword ptr [edi+8]
pop	edi
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
fchs
fstp	dword ptr [esi+38h]
fld1
fstp	dword ptr [esi+3Ch]
pop	esi
add	esp, 24h
retn	0Ch
sub_64FE30 endp

align 10h



; int __thiscall sub_650060(void *, int, int, int)
sub_650060 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
push	esi
push	edi
push	40h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
mov	eax, [esp+38h+arg_4]
mov	edi, [esp+38h+arg_0]
fld	dword ptr [eax]
fsub	dword ptr [edi]
add	esp, 0Ch
fstp	[esp+2Ch+var_24]
fld	dword ptr [eax+4]
fsub	dword ptr [edi+4]
fstp	[esp+2Ch+var_20]
fld	dword ptr [eax+8]
fsub	dword ptr [edi+8]
fstp	[esp+2Ch+var_1C]
fld	[esp+2Ch+var_20]
fld	[esp+2Ch+var_24]
fld	[esp+2Ch+var_1C]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
call	__CIsqrt
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
mov	eax, [esp+2Ch+arg_8]
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+var_24]
fld	[esp+2Ch+arg_4]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_24]
fld	[esp+2Ch+var_20]
fdiv	st, st(1)
fstp	[esp+2Ch+var_20]
fdivr	[esp+2Ch+var_1C]
fstp	[esp+2Ch+var_1C]
fld	dword ptr [eax+4]
fld	[esp+2Ch+var_1C]
fld	st
fmulp	st(2), st
fld	dword ptr [eax+8]
fld	[esp+2Ch+var_20]
fld	st
fmulp	st(2), st
fxch	st(3)
fsubrp	st(1), st
fstp	[esp+2Ch+var_18]
fld	dword ptr [eax+8]
fld	[esp+2Ch+var_24]
fld	st
fmulp	st(2), st
fld	dword ptr [eax]
fmulp	st(3), st
fxch	st(1)
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_14]
fld	dword ptr [eax]
fmulp	st(2), st
fmul	dword ptr [eax+4]
fsubp	st(1), st
fstp	[esp+2Ch+var_10]
fld	[esp+2Ch+var_14]
fld	[esp+2Ch+var_18]
fld	[esp+2Ch+var_10]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
call	__CIsqrt
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+var_18]
fld	[esp+2Ch+arg_4]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_14]
fdiv	st, st(1)
fstp	[esp+2Ch+var_14]
fdivr	[esp+2Ch+var_10]
fstp	[esp+2Ch+var_10]
fld	[esp+2Ch+var_20]
fld	st
fld	[esp+2Ch+var_10]
fld	st
fmulp	st(2), st
fld	[esp+2Ch+var_1C]
fld	st
fld	[esp+2Ch+var_14]
fld	st
fmulp	st(2), st
fxch	st(4)
fsubrp	st(1), st
fstp	[esp+2Ch+var_C]
fld	st
fmul	[esp+2Ch+var_18]
fld	[esp+2Ch+var_24]
fld	st
fmul	st, st(4)
fsubp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_8]
fld	st
fmul	st, st(4)
fld	st(5)
fmul	[esp+2Ch+var_18]
fsubp	st(1), st
fstp	[esp+2Ch+var_4]
fld	[esp+2Ch+var_18]
fst	dword ptr [esi]
fxch	st(4)
fst	dword ptr [esi+10h]
fxch	st(3)
fst	dword ptr [esi+20h]
fld	dword ptr [edi]
fmulp	st(5), st
fld	dword ptr [edi+4]
fmulp	st(4), st
fxch	st(4)
faddp	st(3), st
fld	dword ptr [edi+8]
fmulp	st(4), st
fxch	st(2)
faddp	st(3), st
fxch	st(2)
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
fchs
fstp	dword ptr [esi+30h]
fld	[esp+2Ch+var_C]
fst	dword ptr [esi+4]
fld	[esp+2Ch+var_8]
fst	dword ptr [esi+14h]
fld	[esp+2Ch+var_4]
fst	dword ptr [esi+24h]
fld	dword ptr [edi]
fmulp	st(3), st
fld	dword ptr [edi+4]
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	dword ptr [edi+8]
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
fchs
fstp	dword ptr [esi+34h]
fst	dword ptr [esi+8]
fxch	st(2)
fst	dword ptr [esi+18h]
fxch	st(1)
fst	dword ptr [esi+28h]
fld	dword ptr [edi]
fmulp	st(3), st
fld	dword ptr [edi+4]
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	dword ptr [edi+8]
pop	edi
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fchs
fstp	dword ptr [esi+38h]
fld1
fstp	dword ptr [esi+3Ch]
pop	esi
add	esp, 24h
retn	0Ch
sub_650060 endp

align 10h



; int __stdcall	sub_650290(int,	int, float)
sub_650290 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
cmp	byte ptr [esp+0Ch+arg_8], 0
mov	eax, [esp+0Ch+arg_4]
fld	dword ptr [eax]
fstp	[esp+0Ch+var_C]
fld	dword ptr [eax+4]
fstp	[esp+0Ch+var_8]
fld	dword ptr [ecx+10h]
fld	[esp+0Ch+var_8]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+0Ch+var_C]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+20h]
fadd	dword ptr [ecx+30h]
fstp	[esp+0Ch+var_C]
fld	dword ptr [ecx+4]
fmul	st, st(2)
fld	dword ptr [ecx+14h]
fmul	st, st(2)
faddp	st(1), st
fadd	dword ptr [ecx+24h]
fadd	dword ptr [ecx+34h]
fstp	[esp+0Ch+var_8]
jz	short loc_65030F
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+1Ch]
faddp	st(1), st
fadd	dword ptr [ecx+2Ch]
fadd	dword ptr [ecx+3Ch]
fstp	[esp+0Ch+arg_8]
fld	[esp+0Ch+var_C]
fld	[esp+0Ch+arg_8]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+0Ch+var_C]
fdivr	[esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jmp	short loc_650313

loc_65030F:
fstp	st
fstp	st

loc_650313:
mov	eax, [esp+0Ch+arg_0]
fld	[esp+0Ch+var_C]
fstp	dword ptr [eax]
fld	[esp+0Ch+var_8]
fstp	dword ptr [eax+4]
add	esp, 0Ch
retn	0Ch
sub_650290 endp

align 10h



; int __stdcall	sub_650330(int,	int, float)
sub_650330 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 28h
push	ebx
mov	ebx, [esp+2Ch+arg_8]
push	esi
mov	esi, [esp+30h+arg_4]
fld	dword ptr [esi]
push	edi
push	ebx		; float
fstp	[esp+38h+var_28]
fld	dword ptr [esi+4]
mov	edi, ecx
lea	eax, [esp+38h+var_28]
fstp	[esp+38h+var_24]
push	eax		; int
lea	ecx, [esp+3Ch+var_20]
push	ecx		; int
mov	ecx, edi
call	sub_650290
fld	dword ptr [esi+8]
push	ebx		; float
fstp	[esp+38h+var_28]
fld	dword ptr [esi+4]
lea	edx, [esp+38h+var_28]
push	edx		; int
fstp	[esp+3Ch+var_24]
lea	eax, [esp+3Ch+var_18]
push	eax		; int
mov	ecx, edi
call	sub_650290
fld	dword ptr [esi+8]
push	ebx		; float
fstp	[esp+38h+var_28]
fld	dword ptr [esi+0Ch]
lea	ecx, [esp+38h+var_28]
push	ecx		; int
fstp	[esp+3Ch+var_24]
lea	edx, [esp+3Ch+var_10]
push	edx		; int
mov	ecx, edi
call	sub_650290
fld	dword ptr [esi]
push	ebx		; float
fstp	[esp+38h+var_28]
fld	dword ptr [esi+0Ch]
lea	eax, [esp+38h+var_28]
push	eax		; int
fstp	[esp+3Ch+var_24]
lea	ecx, [esp+3Ch+var_8]
push	ecx		; int
mov	ecx, edi
call	sub_650290
fld	[esp+34h+var_20]
mov	ecx, [esp+34h+arg_0]
fst	dword ptr [ecx]
pop	edi
fld	[esp+30h+var_1C]
pop	esi
fst	dword ptr [ecx+4]
pop	ebx
fst	dword ptr [ecx+0Ch]
fxch	st(1)
fst	dword ptr [ecx+8]
fld	[esp+28h+var_18]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6503EF
fxch	st(1)
fst	[esp+28h+arg_4]
jmp	short loc_6503F5

loc_6503EF:
fst	[esp+28h+arg_4]
fxch	st(1)

loc_6503F5:
fld	[esp+28h+arg_4]
fst	dword ptr [ecx]
fld	[esp+28h+var_14]
fcom	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_650410
fxch	st(4)
fst	[esp+28h+arg_4]
jmp	short loc_650416

loc_650410:
fst	[esp+28h+arg_4]
fxch	st(4)

loc_650416:
fld	[esp+28h+arg_4]
fst	dword ptr [ecx+4]
fxch	st(4)
fcom	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_65042C
fstp	st
jmp	short loc_65042E

loc_65042C:
fstp	st(3)

loc_65042E:
fxch	st(2)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [ecx+8]
fxch	st(4)
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_65044A
fstp	st
jmp	short loc_65044C

loc_65044A:
fstp	st(2)

loc_65044C:
fxch	st(1)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [ecx+0Ch]
fxch	st(1)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fld	[esp+28h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_650478
fxch	st(1)
fstp	[esp+28h+arg_4]
jmp	short loc_65047E

loc_650478:
fstp	st(1)
fst	[esp+28h+arg_4]

loc_65047E:
fld	[esp+28h+arg_4]
fst	dword ptr [ecx]
fxch	st(3)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fld	[esp+28h+var_C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6504A3
fxch	st(1)
fstp	[esp+28h+arg_4]
jmp	short loc_6504A9

loc_6504A3:
fstp	st(1)
fst	[esp+28h+arg_4]

loc_6504A9:
fld	[esp+28h+arg_4]
fst	dword ptr [ecx+4]
fxch	st(5)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_6504C7
fstp	st(2)
jmp	short loc_6504C9

loc_6504C7:
fstp	st

loc_6504C9:
fxch	st(1)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [ecx+8]
fxch	st(2)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6504ED
fstp	st(1)
jmp	short loc_6504EF

loc_6504ED:
fstp	st

loc_6504EF:
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [ecx+0Ch]
fxch	st(2)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fld	[esp+28h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_650519
fxch	st(1)
fstp	[esp+28h+arg_4]
jmp	short loc_65051F

loc_650519:
fstp	st(1)
fst	[esp+28h+arg_4]

loc_65051F:
fld	[esp+28h+arg_4]
fstp	dword ptr [ecx]
fxch	st(3)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fld	[esp+28h+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_650544
fxch	st(1)
fstp	[esp+28h+arg_4]
jmp	short loc_65054A

loc_650544:
fstp	st(1)
fst	[esp+28h+arg_4]

loc_65054A:
fld	[esp+28h+arg_4]
fstp	dword ptr [ecx+4]
fxch	st(1)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_650568
fstp	st(3)
jmp	short loc_65056A

loc_650568:
fstp	st

loc_65056A:
fxch	st(2)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fstp	dword ptr [ecx+8]
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_65059B
fstp	st(1)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fstp	dword ptr [ecx+0Ch]
add	esp, 28h
retn	0Ch

loc_65059B:
fstp	st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fstp	dword ptr [ecx+0Ch]
add	esp, 28h
retn	0Ch
sub_650330 endp

align 10h



; int __stdcall	sub_6505B0(int,	int, float)
sub_6505B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_8]
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
mov	esi, [esp+14h+arg_4]
fld	dword ptr [esi]
push	edi
push	ebx		; float
fstp	[esp+1Ch+var_8]
fld	dword ptr [esi+4]
lea	eax, [esp+1Ch+var_8]
push	eax		; int
fstp	[esp+20h+var_4]
push	ebp		; int
mov	edi, ecx
call	sub_650290
fld	dword ptr [esi+8]
push	ebx		; float
fstp	[esp+1Ch+var_8]
fld	dword ptr [esi+4]
lea	ecx, [esp+1Ch+var_8]
push	ecx		; int
fstp	[esp+20h+var_4]
lea	edx, [ebp+8]
push	edx		; int
mov	ecx, edi
call	sub_650290
fld	dword ptr [esi+8]
push	ebx		; float
fstp	[esp+1Ch+var_8]
fld	dword ptr [esi+0Ch]
lea	eax, [esp+1Ch+var_8]
push	eax		; int
fstp	[esp+20h+var_4]
lea	ecx, [ebp+10h]
push	ecx		; int
mov	ecx, edi
call	sub_650290
fld	dword ptr [esi]
push	ebx		; float
fstp	[esp+1Ch+var_8]
fld	dword ptr [esi+0Ch]
lea	edx, [esp+1Ch+var_8]
push	edx		; int
fstp	[esp+20h+var_4]
add	ebp, 18h
push	ebp		; int
mov	ecx, edi
call	sub_650290
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_6505B0 endp

align 10h



sub_650650 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	dword ptr [eax+0Ch], 8000000h
mov	esi, [eax+10h]
jz	short loc_650667
pop	edi
mov	eax, esi
pop	esi
retn

loc_650667:
mov	eax, [eax]
push	esi
push	eax
call	sub_67BC50
cmp	eax, esi
jnz	short loc_65067D
mov	ecx, [edi]
or	dword ptr [ecx+0Ch], 8000000h

loc_65067D:
pop	edi
pop	esi
retn
sub_650650 endp




sub_650680 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
test	dword ptr [eax+0Ch], 8000000h
jz	short loc_650698
mov	eax, [eax]
mov	ecx, [esp+arg_0]
movsx	eax, byte ptr [eax+ecx]
retn	4

loc_650698:
mov	edx, [eax]
push	esi
mov	esi, [esp+4+arg_0]
mov	[esp+4+arg_0], edx

loc_6506A3:
lea	eax, [esp+4+arg_0]
push	eax
call	sub_67B600
dec	esi
test	eax, eax
jz	short loc_6506BA
test	esi, esi
jge	short loc_6506A3
pop	esi
retn	4

loc_6506BA:
xor	eax, eax
pop	esi
retn	4
sub_650680 endp




sub_6506C0 proc	near

var_3F4= dword ptr -3F4h
var_3F0= dword ptr -3F0h
var_3EC= byte ptr -3ECh
var_1F8= byte ptr -1F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 3F4h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3F4h+var_4], eax
mov	eax, [esp+3F4h+arg_0]
push	ebx
push	ebp
mov	ebp, [esp+3FCh+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	[esp+404h+var_3F0], edi
mov	[esp+404h+var_3F4], eax
cmp	ebp, 0FFFFFFFFh
jnz	short loc_650703
lea	edx, [eax+1]

loc_6506F8:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6506F8
sub	eax, edx
mov	ebp, eax

loc_650703:
mov	eax, [edi]
mov	esi, [eax+10h]
mov	ebx, 8000000h
test	[eax+0Ch], ebx
jz	short loc_650716
mov	ebx, esi
jmp	short loc_65072A

loc_650716:
mov	eax, [eax]
push	esi
push	eax
call	sub_67BC50
cmp	eax, esi
jnz	short loc_650728
mov	ecx, [edi]
or	[ecx+0Ch], ebx

loc_650728:
mov	ebx, eax

loc_65072A:
cmp	ebx, 0FAh
jb	short loc_65074A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
lea	edx, [ebx+ebx+2]
push	edx
call	eax
mov	edi, eax
jmp	short loc_65074E

loc_65074A:
lea	edi, [esp+404h+var_3EC]

loc_65074E:
cmp	ebp, 0FAh
jb	short loc_65076E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
lea	eax, [ebp+ebp+2]
push	eax
call	edx
mov	esi, eax
jmp	short loc_650775

loc_65076E:
lea	esi, [esp+404h+var_1F8]

loc_650775:
mov	eax, [esp+404h+var_3F0]
mov	ecx, [eax]
mov	edx, [ecx]
push	ebx
push	edx
push	edi
call	sub_67BBC0
mov	eax, [esp+404h+var_3F4]
push	ebp
push	eax
push	esi
call	sub_67BBC0
cmp	[esp+404h+arg_8], 0
push	esi		; wchar_t *
push	edi		; wchar_t *
jz	short loc_6507A4
call	_wcscoll
jmp	short loc_6507A9

loc_6507A4:
call	__wcsicoll

loc_6507A9:
lea	ecx, [esp+40Ch+var_3EC]
add	esp, 8
mov	ebx, eax
cmp	edi, ecx
jz	short loc_6507C4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6507C4:
lea	ecx, [esp+404h+var_1F8]
cmp	esi, ecx
jz	short loc_6507DD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6507DD:
mov	ecx, [esp+404h+var_4]
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 3F4h
retn	0Ch
sub_6506C0 endp

align 10h



sub_650800 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+24h]
push	0
push	400h
push	3F0h
call	edx
test	eax, eax
jz	short loc_650897
mov	ecx, [esi+14h]
mov	[eax+4], ecx
mov	[eax], esi
mov	[esi+14h], eax
add	eax, 20h
mov	edx, 0Ah
push	edi

loc_650831:
mov	dword ptr [eax-18h], 0
mov	edi, [esi+10h]
mov	[eax-14h], edi
lea	ecx, [eax-18h]
mov	[esi+10h], ecx
mov	dword ptr [eax-4], 0
mov	edi, [esi+10h]
mov	[eax], edi
lea	ecx, [eax-4]
mov	[esi+10h], ecx
mov	dword ptr [eax+10h], 0
mov	edi, [esi+10h]
mov	[eax+14h], edi
lea	ecx, [eax+10h]
mov	[esi+10h], ecx
mov	dword ptr [eax+24h], 0
mov	edi, [esi+10h]
lea	ecx, [eax+24h]
mov	[eax+28h], edi
mov	[esi+10h], ecx
lea	ecx, [eax+38h]
mov	dword ptr [ecx], 0
mov	edi, [esi+10h]
mov	[eax+3Ch], edi
add	eax, 64h
sub	edx, 1
mov	[esi+10h], ecx
jnz	short loc_650831
pop	edi

loc_650897:
pop	esi
retn
sub_650800 endp

align 10h



sub_6508A0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	7F0h
call	edx
lea	ecx, [eax+7]
and	ecx, 0FFFFFFF8h
jz	short loc_650903
mov	[ecx+7E4h], eax
mov	eax, [esi+1Ch]
mov	[ecx+7E0h], eax
push	edi
mov	[esi+1Ch], ecx
lea	eax, [ecx+18h]
mov	edi, 1Ch

loc_6508D7:
mov	edx, [esi+18h]
mov	[eax-18h], edx
lea	ecx, [eax-18h]
mov	[eax-0Ch], ecx
lea	edx, [eax-0Ch]
mov	[eax], edx
lea	ecx, [eax+0Ch]
mov	[ecx], eax
lea	edx, [eax+18h]
mov	[edx], ecx
lea	ecx, [eax+24h]
add	eax, 48h
sub	edi, 1
mov	[ecx], edx
mov	[esi+18h], ecx
jnz	short loc_6508D7
pop	edi

loc_650903:
pop	esi
retn
sub_6508A0 endp

align 10h



sub_650910 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
cmp	ebx, 0Ch
jnb	short loc_65093B
cmp	dword ptr [edi+18h], 0
jnz	short loc_650929
call	sub_6508A0

loc_650929:
mov	eax, [edi+18h]
xor	esi, esi
test	eax, eax
jz	short loc_65094D
mov	esi, eax
mov	eax, [eax]
mov	[edi+18h], eax
jmp	short loc_65094D

loc_65093B:
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
lea	eax, [ebx+1]
push	eax
call	edx
mov	esi, eax

loc_65094D:
test	esi, esi
jz	short loc_650964
mov	eax, [esp+0Ch+arg_0]
push	ebx
push	eax
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	byte ptr [esi+ebx], 0

loc_650964:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_650910 endp

align 10h



sub_650970 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
push	edi
mov	edi, ecx
test	eax, eax
jz	short loc_6509BD
test	dword ptr [esi+0Ch], 40000000h
jnz	short loc_6509B7
cmp	dword ptr [esi+10h], 0Ch
jnb	short loc_6509A9
mov	ecx, [edi+18h]
mov	[eax], ecx
mov	[edi+18h], eax
mov	dword ptr [esi], 0
mov	ecx, [edi+10h]
mov	[esi+4], ecx
mov	[edi+10h], esi
pop	edi
pop	esi
retn	4

loc_6509A9:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6509B7:
mov	dword ptr [esi], 0

loc_6509BD:
mov	ecx, [edi+10h]
mov	[esi+4], ecx
mov	[edi+10h], esi
pop	edi
pop	esi
retn	4
sub_650970 endp

align 10h



sub_6509D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_6509E3
mov	ecx, edi
call	sub_64A420

loc_6509E3:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_6509EF
call	sub_64A430

loc_6509EF:
mov	eax, [esp+8+arg_4]
mov	[esi+24h], edi
test	eax, eax
jnz	short loc_6509FF
mov	eax, offset byte_146D660

loc_6509FF:
push	eax
lea	ecx, [esi+28h]
call	sub_67A2C0
pop	edi
pop	esi
retn	8
sub_6509D0 endp

align 10h



sub_650A10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_650A2F
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
lea	ecx, [eax-0Ch]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	20h
call	eax
retn

loc_650A2F:
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
xor	ecx, ecx
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	20h
call	eax
retn
sub_650A10 endp

align 10h



sub_650A50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_650A63
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_650A85

loc_650A63:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_650A8A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_650A85:
call	sub_650C90

loc_650A8A:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ebp, [eax+ecx*8+8]
mov	esi, 0FFFFFFFEh
cmp	ebp, esi
jnz	short loc_650ABB
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
mov	edx, [edx]
pop	esi
mov	[eax+ecx*8+0Ch], edx
pop	ebp
retn	0Ch

loc_650ABB:
push	edi
mov	edi, [eax+4]
mov	edx, ecx

loc_650AC1:
inc	edx
and	edx, edi
cmp	[eax+edx*8+8], esi
jnz	short loc_650AC1
mov	esi, [eax+ecx*8+0Ch]
mov	esi, [esi+0Ch]
and	esi, edi
push	ebx
lea	ebx, [eax+edx*8+8]
cmp	esi, ecx
jnz	short loc_650AFE
test	ebx, ebx
jz	short loc_650AE9
mov	[ebx], ebp
mov	esi, [eax+ecx*8+0Ch]
mov	[ebx+4], esi

loc_650AE9:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebx
pop	edi
mov	[eax+ecx*8+0Ch], esi
pop	esi
mov	[eax+ecx*8+8], edx
pop	ebp
retn	0Ch

loc_650AFE:
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jz	short loc_650B1C
jmp	short loc_650B10
align 10h

loc_650B10:
mov	esi, [esi]
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jnz	short loc_650B10

loc_650B1C:
test	ebx, ebx
jz	short loc_650B29
mov	[ebx], ebp
mov	edi, [eax+ecx*8+0Ch]
mov	[ebx+4], edi

loc_650B29:
mov	[esi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[eax+ecx*8+0Ch], edx
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_650A50 endp

align 10h



sub_650B50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [ecx]
push	ebp
mov	ebp, [esp+8+arg_4]
cmp	dword ptr [eax+ebp*8+8], 0FFFFFFFEh
push	esi
lea	esi, [eax+ebp*8+8]
push	edi
mov	[esp+10h+var_4], ecx
mov	edi, ebp
jz	short loc_650BD5
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
and	edx, [eax+4]
cmp	edx, ebp
jnz	short loc_650BD5
push	ebx
mov	ebx, [esp+14h+arg_0]
lea	ecx, [ecx+0]

loc_650B80:
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
and	edx, [eax+4]
cmp	edx, ebp
jnz	short loc_650BAD
mov	eax, [ebx+8]
cmp	[ecx+10h], eax
jnz	short loc_650BAD
mov	ecx, [ecx]
push	eax		; size_t
mov	eax, [ebx]
push	eax		; char *
push	ecx		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
setz	al
test	al, al
jnz	short loc_650BC0

loc_650BAD:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_650BCA
mov	edx, [esp+14h+var_4]
mov	eax, [edx]
lea	esi, [eax+edi*8+8]
jmp	short loc_650B80

loc_650BC0:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_650BCA:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8

loc_650BD5:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8
sub_650B50 endp

align 10h



sub_650BE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	edi
mov	edi, [ecx]
mov	[esp+0Ch+var_4], ecx
test	edi, edi
jz	loc_650C82
mov	eax, [esp+0Ch+arg_0]
mov	eax, [eax]
mov	edx, [eax+0Ch]
push	ebx
mov	ebx, [edi+4]
and	edx, ebx
cmp	dword ptr [edi+edx*8+8], 0FFFFFFFEh
mov	[esp+10h+var_8], eax
lea	eax, [edi+edx*8+8]
jz	short loc_650C81
mov	ecx, [eax+4]
mov	ecx, [ecx+0Ch]
and	ecx, ebx
cmp	ecx, edx
jnz	short loc_650C81
push	ebp
mov	[esp+14h+arg_0], edx
or	ebp, 0FFFFFFFFh
push	esi

loc_650C25:
mov	esi, [eax+4]
mov	ecx, [esi+0Ch]
and	ecx, ebx
cmp	ecx, [esp+18h+arg_0]
jnz	short loc_650C39
cmp	esi, [esp+18h+var_8]
jz	short loc_650C48

loc_650C39:
mov	ebp, edx
mov	edx, [eax]
cmp	edx, 0FFFFFFFFh
jz	short loc_650C7F
lea	eax, [edi+edx*8+8]
jmp	short loc_650C25

loc_650C48:
cmp	[esp+18h+arg_0], edx
mov	edx, [eax]
jnz	short loc_650C6D
cmp	edx, 0FFFFFFFFh
jz	short loc_650C71
lea	edx, [edi+edx*8+8]
mov	dword ptr [eax], 0FFFFFFFEh
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	eax, edx
jmp	short loc_650C71

loc_650C6D:
mov	[edi+ebp*8+8], edx

loc_650C71:
mov	dword ptr [eax], 0FFFFFFFEh
mov	eax, [esp+18h+var_4]
mov	eax, [eax]
dec	dword ptr [eax]

loc_650C7F:
pop	esi
pop	ebp

loc_650C81:
pop	ebx

loc_650C82:
pop	edi
add	esp, 8
retn	4
sub_650BE0 endp

align 10h



sub_650C90 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_650CAE
call	sub_716800
pop	edi
add	esp, 0Ch
retn	8

loc_650CAE:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_650CBC
mov	esi, 8
jmp	short loc_650D21

loc_650CBC:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_650CCF
fadd	ds:flt_15FCC08

loc_650CCF:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_650D21:
mov	ecx, dword_1855FC0
mov	ebp, [esp+18h+arg_0]
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, ds:8[esi*8]
mov	[esp+1Ch+arg_4], 0
mov	dword ptr [esp+1Ch+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+18h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
xor	eax, eax
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_650D81
lea	ebx, [ebx+0]

loc_650D70:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [ecx+eax*8+8], 0FFFFFFFEh
inc	eax
cmp	eax, esi
jb	short loc_650D70

loc_650D81:
mov	eax, [edi]
test	eax, eax
jz	short loc_650DDA
push	ebx
mov	ebx, [eax+4]
xor	edi, edi
lea	ecx, [ecx+0]

loc_650D90:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [eax+edi*8+8], 0FFFFFFFEh
lea	esi, [eax+edi*8+8]
jz	short loc_650DBC
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
lea	eax, [esi+4]
push	edx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_650A50
mov	dword ptr [esi], 0FFFFFFFEh

loc_650DBC:
inc	edi
cmp	edi, ebx
jbe	short loc_650D90
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_650DDA:
mov	ecx, [esp+18h+arg_4]
pop	esi
pop	ebp
mov	[edi], ecx
pop	edi
add	esp, 0Ch
retn	8
sub_650C90 endp

align 10h



sub_650DF0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi+4]
push	edi
cmp	ecx, esi
jz	short loc_650E0B
test	ecx, ecx
jz	short loc_650E0B
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_650E0B
call	sub_650DF0

loc_650E0B:
mov	eax, esi
and	eax, 0FFFFFC00h
mov	edi, [eax]
lea	ecx, [esp+0Ch+var_4]
push	ecx
lea	ecx, [edi+8]
mov	[esp+10h+var_4], esi
call	sub_650BE0
push	esi
mov	ecx, edi
call	sub_650970
pop	edi
pop	esi
pop	ecx
retn
sub_650DF0 endp

align 10h



sub_650E40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_4]
push	edi
push	1505h
push	esi
push	eax
mov	ebp, ecx
mov	[esp+2Ch+var_C], eax
call	sub_679B00
mov	edi, eax
mov	eax, [ebp+8]
lea	ebx, [ebp+8]
and	edi, offset sub_FFFFFF
mov	[esp+20h+var_8], edi
mov	[esp+20h+var_4], esi
test	eax, eax
jz	short loc_650EA8
mov	eax, [eax+4]
and	eax, edi
push	eax
lea	eax, [esp+24h+var_C]
push	eax
mov	ecx, ebx
call	sub_650B50
test	eax, eax
jl	short loc_650EA8
mov	ecx, [ebx]
mov	eax, [ecx+eax*8+0Ch]
mov	edx, [esp+20h+arg_8]
or	[eax+0Ch], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch

loc_650EA8:
cmp	dword ptr [ebp+10h], 0
jnz	short loc_650EB5
mov	ecx, ebp
call	sub_650800

loc_650EB5:
mov	esi, [ebp+10h]
xor	eax, eax
cmp	esi, eax
jz	short loc_650EC4
mov	ecx, [esi+4]
mov	[ebp+10h], ecx

loc_650EC4:
mov	[esp+20h+var_10], esi
cmp	esi, eax
jz	short loc_650F09
or	edi, [esp+20h+arg_8]
mov	edx, [esp+20h+arg_4]
mov	ecx, [esp+20h+arg_0]
mov	[esi+8], eax
mov	[esi+10h], edx
mov	[esi], ecx
or	edi, 40000000h
mov	[esi+0Ch], edi
mov	[esi+4], eax
mov	edx, [esi+0Ch]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
push	ebx
mov	ecx, ebx
call	sub_650A50
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch

loc_650F09:
mov	eax, [ebp+20h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_650E40 endp

align 10h



sub_650F20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_4]
push	edi
push	1505h
push	esi
push	eax
mov	edi, ecx
mov	[esp+2Ch+var_C], eax
call	sub_679B00
mov	ebp, eax
mov	eax, [edi+8]
lea	ebx, [edi+8]
and	ebp, offset sub_FFFFFF
mov	[esp+20h+var_8], ebp
mov	[esp+20h+var_4], esi
test	eax, eax
jz	short loc_650F81
mov	eax, [eax+4]
and	eax, ebp
push	eax
lea	eax, [esp+24h+var_C]
push	eax
mov	ecx, ebx
call	sub_650B50
test	eax, eax
jl	short loc_650F81
mov	ecx, [ebx]
mov	eax, [ecx+eax*8+0Ch]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_650F81:
cmp	dword ptr [edi+10h], 0
jnz	short loc_650F8E
mov	ecx, edi
call	sub_650800

loc_650F8E:
mov	esi, [edi+10h]
test	esi, esi
jz	short loc_650F9B
mov	edx, [esi+4]
mov	[edi+10h], edx

loc_650F9B:
mov	[esp+20h+var_10], esi
test	esi, esi
jz	short loc_650FF1
mov	eax, [esp+20h+arg_4]
mov	ecx, [esp+20h+arg_0]
push	eax
push	ecx
mov	ecx, edi
call	sub_650910
mov	[esi], eax
xor	eax, eax
cmp	[esi], eax
jz	short loc_650FE9
mov	edx, [esp+20h+arg_4]
mov	[esi+8], eax
mov	[esi+10h], edx
mov	[esi+0Ch], ebp
mov	[esi+4], eax
mov	eax, [esi+0Ch]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
push	ebx
mov	ecx, ebx
call	sub_650A50
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_650FE9:
push	esi
mov	ecx, edi
call	sub_650970

loc_650FF1:
mov	eax, [edi+20h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_650F20 endp

align 10h



sub_651000 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
test	esi, esi
jnz	short loc_651010
mov	eax, [ecx+20h]
pop	esi
retn	4

loc_651010:
mov	eax, esi
push	edi
lea	edi, [eax+1]

loc_651016:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_651016
sub	eax, edi
push	eax
push	esi
call	sub_650F20
pop	edi
pop	esi
retn	4
sub_651000 endp

align 10h



sub_651030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esp+0Ch+var_4]
call	sub_679E30
mov	eax, [esp+0Ch+arg_0]
push	eax
lea	ecx, [esp+10h+var_4]
call	sub_67A300
mov	eax, [esp+0Ch+var_4]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
mov	ecx, esi
call	sub_650F20
mov	esi, [esp+0Ch+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
mov	edi, eax
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_651094
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_651094:
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn	4
sub_651030 endp

align 10h



sub_6510A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	eax, [esp+10h+arg_C]
push	ebx
mov	ebx, [esp+14h+arg_4]
push	ebp
push	esi
lea	ebp, [ebx+eax]
mov	esi, ecx
push	edi
mov	[esp+20h+var_10], esi
cmp	ebp, 0Ch
jnb	short loc_6510D8
cmp	dword ptr [esi+18h], 0
jnz	short loc_6510C8
call	sub_6508A0

loc_6510C8:
mov	eax, [esi+18h]
xor	edi, edi
test	eax, eax
jz	short loc_6510EA
mov	ecx, [eax]
mov	[esi+18h], ecx
jmp	short loc_6510E8

loc_6510D8:
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
lea	eax, [ebp+1]
push	eax
call	edx

loc_6510E8:
mov	edi, eax

loc_6510EA:
test	edi, edi
jz	loc_651220
test	ebx, ebx
jbe	short loc_651105
mov	eax, [esp+20h+arg_0]
push	ebx
push	eax
push	edi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_651105:
mov	eax, [esp+20h+arg_C]
test	eax, eax
jbe	short loc_65111F
mov	ecx, [esp+20h+arg_8]
push	eax
push	ecx
lea	edx, [edi+ebx]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_65111F:
push	1505h
push	ebp
push	edi
mov	byte ptr [edi+ebp], 0
mov	[esp+2Ch+var_C], edi
call	sub_679B00
mov	ecx, [esi+8]
lea	ebx, [esi+8]
and	eax, offset sub_FFFFFF
mov	[esp+20h+var_8], eax
mov	[esp+20h+var_4], ebp
test	ecx, ecx
jz	short loc_651199
mov	ecx, [ecx+4]
and	ecx, eax
push	ecx
lea	eax, [esp+24h+var_C]
push	eax
mov	ecx, ebx
call	sub_650B50
test	eax, eax
jl	short loc_651199
mov	ecx, [ebx]
mov	ebx, [ecx+eax*8+0Ch]
cmp	ebp, 0Ch
jnb	short loc_65117F
mov	edx, [esi+18h]
mov	[edi], edx
mov	[esi+18h], edi
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 10h
retn	10h

loc_65117F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 10h
retn	10h

loc_651199:
cmp	dword ptr [esi+10h], 0
jnz	short loc_6511A6
mov	ecx, esi
call	sub_650800

loc_6511A6:
mov	esi, [esi+10h]
mov	eax, [esp+20h+var_10]
xor	ecx, ecx
cmp	esi, ecx
jz	short loc_6511B9
mov	edx, [esi+4]
mov	[eax+10h], edx

loc_6511B9:
mov	[esp+20h+arg_C], esi
cmp	esi, ecx
jz	short loc_6511F0
mov	eax, [esp+20h+var_8]
mov	[esi+8], ecx
mov	[esi+10h], ebp
mov	[esi], edi
mov	[esi+0Ch], eax
mov	[esi+4], ecx
mov	ecx, [esi+0Ch]
push	ecx
lea	edx, [esp+24h+arg_C]
push	edx
push	ebx
mov	ecx, ebx
call	sub_650A50
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h

loc_6511F0:
cmp	ebp, 0Ch
jnb	short loc_65120E
mov	ecx, [eax+18h]
mov	esi, [esp+20h+var_10]
mov	[edi], ecx
mov	[eax+18h], edi
mov	eax, [esi+20h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h

loc_65120E:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
mov	esi, [esp+20h+var_10]

loc_651220:
mov	eax, [esi+20h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h
sub_6510A0 endp

align 10h



sub_651230 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_4]
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, ecx
push	eax
lea	ecx, [esp+1Ch+var_10]
push	ecx
lea	edx, [esp+20h+var_C]
push	edx
mov	[esp+24h+var_10], 0
call	sub_67B920
mov	edx, [esp+18h+var_10]
mov	eax, [edi]
push	edx
lea	edx, [esp+1Ch+var_C]
push	edx
mov	edx, [eax+10h]
mov	ecx, eax
mov	eax, [eax]
and	ecx, 0FFFFFC00h
mov	ecx, [ecx]
push	edx
push	eax
call	sub_6510A0
mov	ecx, [esp+18h+var_4]
mov	[esi], eax
inc	dword ptr [eax+8]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn	8
sub_651230 endp

align 10h



sub_6512A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_4]
push	ebp
mov	ebp, ecx
cmp	eax, [esp+8+arg_8]
jnz	short loc_6512CA
mov	ecx, [ebp+0]
mov	eax, [esp+8+arg_0]
and	ecx, 0FFFFFC00h
mov	edx, [ecx]
mov	ecx, [edx+20h]
inc	dword ptr [ecx+8]
mov	[eax], ecx
pop	ebp
pop	ecx
retn	0Ch

loc_6512CA:
mov	eax, [ebp+0]
mov	eax, [eax]
push	ebx
push	esi
push	edi
xor	esi, esi
mov	[esp+14h+var_4], eax
mov	ebx, eax
mov	edi, eax
lea	esp, [esp+0]

loc_6512E0:
cmp	esi, [esp+14h+arg_4]
jnz	short loc_6512E8
mov	ebx, eax

loc_6512E8:
lea	ecx, [esp+14h+var_4]
push	ecx
call	sub_67B600
mov	ecx, [esp+14h+arg_8]
inc	esi
cmp	esi, ecx
jz	short loc_651309
test	eax, eax
jz	short loc_651305
mov	eax, [esp+14h+var_4]
jmp	short loc_6512E0

loc_651305:
cmp	esi, ecx
jge	short loc_65130D

loc_651309:
mov	edi, [esp+14h+var_4]

loc_65130D:
cmp	edi, ebx
jnb	short loc_651313
mov	edi, ebx

loc_651313:
mov	edx, [ebp+0]
sub	edi, ebx
and	edx, 0FFFFFC00h
mov	ecx, [edx]
push	edi
push	ebx
call	sub_650F20
mov	ecx, [esp+14h+arg_0]
inc	dword ptr [eax+8]
pop	edi
pop	esi
pop	ebx
mov	[ecx], eax
mov	eax, ecx
pop	ebp
pop	ecx
retn	0Ch
sub_6512A0 endp

align 10h



sub_651340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi]
mov	edx, [ecx]
lea	eax, [esp+14h+var_8]
push	eax
push	edx
lea	ecx, [esp+1Ch+var_4]
call	sub_67AE10
mov	ecx, eax
call	sub_67B1A0
mov	esi, [esp+14h+var_4]
mov	ebx, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_65138A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_65138A:
mov	eax, [esp+14h+var_8]
mov	ecx, [edi]
mov	edx, eax
and	eax, 0FFFFFFFCh
mov	eax, [eax]
and	edx, 0FFFFFFFCh
and	eax, 7FFFFFFFh
and	ecx, 0FFFFFC00h
mov	ecx, [ecx]
push	eax
add	edx, 8
push	edx
call	sub_650F20
inc	dword ptr [eax+8]
mov	esi, [esp+14h+var_8]
mov	edi, [esp+14h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
mov	[edi], eax
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6513DC
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6513DC:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	4
sub_651340 endp

align 10h



sub_6513F0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	ebx
push	esi
mov	eax, edx
push	edi
mov	ebx, ecx
lea	esi, [eax+1]
mov	edi, edi

loc_651400:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_651400
mov	ecx, [ebx]
sub	eax, esi
and	ecx, 0FFFFFC00h
mov	ecx, [ecx]
push	eax
push	edx
call	sub_650F20
mov	edi, eax
inc	dword ptr [edi+8]
mov	esi, [ebx]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_65145C
mov	ecx, [esi+4]
cmp	ecx, esi
jz	short loc_651437
test	ecx, ecx
jz	short loc_651437
call	sub_4E4220

loc_651437:
mov	edx, esi
push	ebp
and	edx, 0FFFFFC00h
mov	ebp, [edx]
lea	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [ebp+8]
mov	[esp+14h+arg_0], esi
call	sub_650BE0
push	esi
mov	ecx, ebp
call	sub_650970
pop	ebp

loc_65145C:
mov	[ebx], edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_6513F0 endp

align 10h



sub_651470 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, esi
push	edi
mov	ebx, ecx
lea	edx, [eax+1]
mov	edi, edi

loc_651480:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_651480
sub	eax, edx
mov	edx, [ebx]
push	eax
mov	eax, [edx+10h]
mov	ecx, edx
mov	edx, [edx]
push	esi
and	ecx, 0FFFFFC00h
mov	ecx, [ecx]
push	eax
push	edx
call	sub_6510A0
mov	edi, eax
inc	dword ptr [edi+8]
mov	esi, [ebx]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6514E4
mov	ecx, [esi+4]
cmp	ecx, esi
jz	short loc_6514C0
test	ecx, ecx
jz	short loc_6514C0
call	sub_4E4220

loc_6514C0:
mov	eax, esi
push	ebp
and	eax, 0FFFFFC00h
mov	ebp, [eax]
lea	ecx, [esp+10h+arg_0]
push	ecx
lea	ecx, [ebp+8]
mov	[esp+14h+arg_0], esi
call	sub_650BE0
push	esi
mov	ecx, ebp
call	sub_650970
pop	ebp

loc_6514E4:
mov	[ebx], edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_651470 endp

align 10h



sub_6514F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
mov	eax, esi
push	edi
lea	edi, [eax+1]
jmp	short loc_651500
align 10h

loc_651500:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_651500
mov	edx, [ecx]
sub	eax, edi
push	eax
mov	eax, [edx+10h]
mov	ecx, edx
mov	edx, [edx]
push	esi
and	ecx, 0FFFFFC00h
mov	ecx, [ecx]
push	eax
push	edx
call	sub_6510A0
mov	ecx, [esp+8+arg_0]
inc	dword ptr [eax+8]
pop	edi
mov	[ecx], eax
mov	eax, ecx
pop	esi
retn	8
sub_6514F0 endp

align 10h



sub_651540 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	edx, [edx]
mov	eax, [ecx]
push	esi
mov	esi, [edx+10h]
mov	edx, [edx]
push	esi
push	edx
mov	edx, [eax+10h]
mov	ecx, eax
mov	eax, [eax]
and	ecx, 0FFFFFC00h
mov	ecx, [ecx]
push	edx
push	eax
call	sub_6510A0
mov	ecx, [esp+4+arg_0]
inc	dword ptr [eax+8]
mov	[ecx], eax
mov	eax, ecx
pop	esi
retn	8
sub_651540 endp

align 10h



sub_651580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi]
lea	eax, [esp+14h+var_8]
push	eax
push	ecx
lea	ecx, [esp+1Ch+var_4]
call	sub_67AE10
mov	ecx, eax
call	sub_67B250
mov	esi, [esp+14h+var_4]
mov	ebp, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6515C8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6515C8:
mov	edx, [esp+14h+var_8]
mov	ecx, edx
mov	eax, edi
and	eax, 0FFFFFC00h
mov	esi, [eax]
and	ecx, 0FFFFFFFCh
add	ecx, 8
jnz	short loc_6515E4
mov	eax, [esi+20h]
jmp	short loc_651607

loc_6515E4:
mov	eax, ecx
push	ebx
lea	ebx, [eax+1]
lea	ebx, [ebx+0]

loc_6515F0:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_6515F0
sub	eax, ebx
push	eax
push	ecx
mov	ecx, esi
call	sub_650F20
mov	edx, [esp+18h+var_8]
pop	ebx

loc_651607:
cmp	eax, [esi+20h]
jz	short loc_65161A
mov	[edi+4], eax
cmp	eax, edi
jz	short loc_65161A
inc	dword ptr [eax+8]
mov	edx, [esp+14h+var_8]

loc_65161A:
and	edx, 0FFFFFFFCh
mov	esi, edx
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_65163A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_65163A:
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn
sub_651580 endp

align 10h



sub_651650 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1431A34
xor	ebx, ebx
lea	ebp, [esi+8]
mov	[ebp+0], ebx
mov	[esi+0Ch], eax
push	edi
lea	ecx, [esi+28h]
mov	[esi+24h], ebx
call	sub_67AB70
mov	ecx, esi
mov	[esi+14h], ebx
mov	[esi+10h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
call	sub_650800
mov	eax, [esi+10h]
cmp	eax, ebx
jz	short loc_6516A3
mov	ecx, [eax+4]
mov	[esi+10h], ecx

loc_6516A3:
lea	edi, [esi+20h]
mov	[edi], eax
cmp	eax, ebx
jz	short loc_6516E4
push	1505h
mov	dword ptr [eax+8], 1
mov	edx, [edi]
push	ebx
push	offset byte_146D660
mov	[edx+10h], ebx
call	sub_679B00
mov	ecx, [edi]
and	eax, offset sub_FFFFFF
or	eax, 0C0000000h
mov	[ecx+0Ch], eax
mov	edx, [edi]
mov	dword ptr [edx], offset	byte_146D660
mov	eax, [edi]
mov	[eax+4], eax

loc_6516E4:
mov	eax, [edi]
mov	ecx, [eax+0Ch]
push	ecx
push	edi
push	ebp
mov	ecx, ebp
call	sub_650A50
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_651650 endp

align 10h



sub_651700 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h

sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_1431A34
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+2Ch+var_18]
call	sub_679B40
xor	ebx, ebx
cmp	[edi+14h], ebx
jz	loc_6517D8
push	ebp
lea	esp, [esp+0]

loc_651730:
mov	ebp, [edi+14h]
mov	ecx, [ebp+4]
mov	[edi+14h], ecx
lea	esi, [ebp+8]
mov	[esp+2Ch+var_1C], 32h

loc_651744:
cmp	dword ptr [esi], 0
jz	short loc_6517B5
cmp	esi, [edi+20h]
jz	short loc_6517B5
cmp	ebx, 10h
jnb	short loc_65178B
mov	eax, offset asc_1431A9C	; ", '"
test	ebx, ebx
ja	short loc_651761
mov	eax, offset asc_154D8A0	; "'"

loc_651761:
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+34h+var_18]
call	sub_679D10
mov	edx, [esi]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+34h+var_18]
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D8A0 ; "'"
lea	ecx, [esp+34h+var_18]
call	sub_679D10

loc_65178B:
inc	ebx
test	dword ptr [esi+0Ch], 40000000h
jnz	short loc_6517B5
cmp	dword ptr [esi+10h], 0Ch
mov	eax, [esi]
jnb	short loc_6517A7
mov	ecx, [edi+18h]
mov	[eax], ecx
mov	[edi+18h], eax
jmp	short loc_6517B5

loc_6517A7:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6517B5:
add	esi, 14h
sub	[esp+2Ch+var_1C], 1
jnz	short loc_651744
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
cmp	dword ptr [edi+14h], 0
jnz	loc_651730
pop	ebp

loc_6517D8:
cmp	dword ptr [edi+1Ch], 0
jz	short loc_651806
mov	edi, edi

loc_6517E0:
mov	eax, [edi+1Ch]
mov	edx, [eax+7E4h]
mov	ecx, [eax+7E0h]
mov	[edi+1Ch], ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
push	edx
mov	edx, [eax+30h]
call	edx
cmp	dword ptr [edi+1Ch], 0
jnz	short loc_6517E0

loc_651806:
test	ebx, ebx
jz	short loc_65184F
mov	eax, [edi+24h]
test	eax, eax
jz	short loc_65184F
mov	ecx, [edi+28h]
and	ecx, 0FFFFFFFCh
push	ebx
add	ecx, 8
push	ecx
add	eax, 0Ch
push	offset aActionscriptMe ; "ActionScript Memory leaks in movie '%s'"...
push	eax
call	sub_650A10
mov	eax, [esp+38h+var_18]
add	esp, 10h
test	eax, eax
jnz	short loc_65183A
mov	eax, offset byte_146D660

loc_65183A:
mov	edx, [edi+24h]
push	eax
add	edx, 0Ch
push	offset aLeakedStringCo ; "Leaked string	content: %s\n"
push	edx
call	sub_650A10
add	esp, 0Ch

loc_65184F:
lea	ecx, [esp+28h+var_18]
call	sub_679B60
mov	esi, [edi+28h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_65187D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_65187D:
mov	ecx, [edi+24h]
test	ecx, ecx
jz	short loc_651889
call	sub_64A430

loc_651889:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6518D1
mov	edx, [ecx+4]
xor	eax, eax
jmp	short loc_6518A0
align 10h

loc_6518A0:
mov	ecx, [edi+8]
cmp	dword ptr [ecx+eax*8+8], 0FFFFFFFEh
lea	ecx, [ecx+eax*8+8]
jz	short loc_6518B4
mov	dword ptr [ecx], 0FFFFFFFEh

loc_6518B4:
inc	eax
cmp	eax, edx
jbe	short loc_6518A0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+8]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [edi+8], 0

loc_6518D1:
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
jmp	sub_64A3F0
sub_651700 endp

align 10h



sub_6518E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6518F0
call	sub_651580

loc_6518F0:
mov	eax, [esi]
mov	ecx, [eax+4]
pop	esi
test	ecx, ecx
jnz	short loc_651904
and	eax, 0FFFFFC00h
mov	eax, [eax]
mov	ecx, [eax+20h]

loc_651904:
mov	eax, [esp+arg_0]
inc	dword ptr [ecx+8]
mov	[eax], ecx
retn	4
sub_6518E0 endp




sub_651910 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_651700
test	[esp+4+arg_0], 1
jz	short loc_65192D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_65192D:
mov	eax, esi
pop	esi
retn	4
sub_651910 endp

align 10h



sub_651940 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax]
lea	esp, [esp+0]

loc_651950:
mov	cl, [eax]
cmp	cl, [edx]
jnz	short loc_65197A
test	cl, cl
jz	short loc_65196C
mov	cl, [eax+1]
cmp	cl, [edx+1]
jnz	short loc_65197A
add	eax, 2
add	edx, 2
test	cl, cl
jnz	short loc_651950

loc_65196C:
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setl	cl
mov	al, cl
retn	4

loc_65197A:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
xor	ecx, ecx
test	eax, eax
setl	cl
mov	al, cl
retn	4
sub_651940 endp

align 10h



sub_651990 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax]
lea	esp, [esp+0]

loc_6519A0:
mov	cl, [eax]
cmp	cl, [edx]
jnz	short loc_6519CA
test	cl, cl
jz	short loc_6519BC
mov	cl, [eax+1]
cmp	cl, [edx+1]
jnz	short loc_6519CA
add	eax, 2
add	edx, 2
test	cl, cl
jnz	short loc_6519A0

loc_6519BC:
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setnle	cl
mov	al, cl
retn	4

loc_6519CA:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
xor	ecx, ecx
test	eax, eax
setnle	cl
mov	al, cl
retn	4
sub_651990 endp

align 10h



; int __stdcall	sub_6519E0(double)
sub_6519E0 proc	near

arg_0= qword ptr  4

fld	[esp+arg_0]
fstp	[esp+arg_0]
mov	eax, dword ptr [esp+arg_0+4]
and	eax, 7FF00000h
xor	ecx, ecx
jnz	short loc_651A04
cmp	eax, 7FF00000h
jnz	short loc_651A04
mov	eax, 1
retn	8

loc_651A04:
xor	eax, eax
retn	8
sub_6519E0 endp

align 10h



sub_651A10 proc	near
mov	al, [ecx]
cmp	al, 8
jz	short loc_651A1D
cmp	al, 0Bh
jz	short loc_651A1D
xor	eax, eax
retn

loc_651A1D:
mov	eax, 1
retn
sub_651A10 endp

align 10h



sub_651A30 proc	near
mov	al, [ecx]
test	al, al
jz	short loc_651A3D
cmp	al, 0Ah
jz	short loc_651A3D
xor	eax, eax
retn

loc_651A3D:
mov	eax, 1
retn
sub_651A30 endp

align 10h



sub_651A50 proc	near
mov	al, [ecx]
cmp	al, 3
jz	short loc_651A5D
cmp	al, 4
jz	short loc_651A5D
xor	eax, eax
retn

loc_651A5D:
mov	eax, 1
retn
sub_651A50 endp

align 10h



sub_651A70 proc	near
mov	al, [ecx]
cmp	al, 5
jz	short loc_651A89
cmp	al, 2
jz	short loc_651A89
cmp	al, 1
jz	short loc_651A89
cmp	al, 3
jz	short loc_651A89
cmp	al, 4
jz	short loc_651A89
xor	eax, eax
retn

loc_651A89:
mov	eax, 1
retn
sub_651A70 endp

align 10h



sub_651A90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, esi
mov	[esp+8+var_8], 0
lea	edx, [eax+1]
nop

loc_651AA0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_651AA0
sub	eax, edx
cmp	byte ptr [esi],	30h
push	ebx
mov	ebx, eax
jnz	short loc_651AE8
movsx	eax, byte ptr [esi+1]
lea	ecx, [eax-41h]
cmp	ecx, 19h
ja	short loc_651AC0
add	eax, 20h

loc_651AC0:
cmp	eax, 78h
jnz	short loc_651AE8
push	0		; int
lea	edx, [esp+10h+var_8]
push	edx		; char **
push	esi		; char *
call	_strtoul
mov	[esp+18h+var_4], eax
fild	[esp+18h+var_4]
mov	eax, [esp+18h+arg_0]
add	esp, 0Ch
fstp	qword ptr [eax]
jmp	loc_651B88

loc_651AE8:		; ".Ee"
push	offset a_ee
push	esi		; char *
call	_strcspn
add	esp, 8
cmp	eax, ebx
jz	short loc_651B10
lea	ecx, [esp+0Ch+var_8]
push	ecx		; char **
push	esi		; Src
call	sub_67B3C0
mov	edx, [esp+14h+arg_0]
fstp	qword ptr [edx]
add	esp, 8
jmp	short loc_651B88

loc_651B10:
mov	al, [esi]
push	ebp
mov	ebp, 1
push	edi
mov	edi, esi
mov	[esp+14h+var_4], ebp
cmp	al, 2Dh
jnz	short loc_651B2C
or	ebp, 0FFFFFFFFh
mov	[esp+14h+var_4], ebp
jmp	short loc_651B30

loc_651B2C:
cmp	al, 2Bh
jnz	short loc_651B34

loc_651B30:
dec	ebx
lea	edi, [esi+1]

loc_651B34:
cmp	byte ptr [edi],	30h
jnz	short loc_651B6E
push	offset a01234567 ; "01234567"
push	edi		; char *
call	_strspn
add	esp, 8
cmp	eax, ebx
jnz	short loc_651B6E
push	8		; int
lea	eax, [esp+18h+var_8]
push	eax		; char **
push	edi		; char *
call	_strtoul
mov	ecx, [esp+20h+arg_0]
add	esp, 0Ch
imul	eax, ebp
mov	[esp+14h+var_4], eax
fild	[esp+14h+var_4]
fstp	qword ptr [ecx]
jmp	short loc_651B86

loc_651B6E:
lea	edx, [esp+14h+var_8]
push	edx		; char **
push	edi		; Src
call	sub_67B3C0
fimul	[esp+1Ch+var_4]
mov	eax, [esp+1Ch+arg_0]
add	esp, 8
fstp	qword ptr [eax]

loc_651B86:
pop	edi
pop	ebp

loc_651B88:
mov	eax, [esp+0Ch+var_8]
pop	ebx
cmp	eax, esi
jz	short loc_651B9C
cmp	byte ptr [eax],	0
jnz	short loc_651B9C
mov	al, 1
add	esp, 8
retn

loc_651B9C:
xor	al, al
add	esp, 8
retn
sub_651A90 endp

align 10h



sub_651BB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi],	7
jnz	short loc_651BD8
mov	ecx, [esp+4+arg_0]
test	ecx, ecx
jz	short loc_651BD8
cmp	dword ptr [esi+4], 0
jz	short loc_651BD8
call	sub_668010
mov	ecx, [esi+4]
push	eax
call	sub_654F00
pop	esi
retn	4

loc_651BD8:
xor	eax, eax
pop	esi
retn	4
sub_651BB0 endp

align 10h



sub_651BE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 0
push	edi
mov	edi, [esp+8+arg_0]
jz	short loc_651C0D
mov	ecx, edi
call	sub_668010
mov	ecx, [esi+4]
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_651C0D
mov	eax, [esi+4]
pop	edi
add	eax, 0Ch
pop	esi
retn	4

loc_651C0D:
mov	eax, [edi+78h]
pop	edi
add	eax, 8
pop	esi
retn	4
sub_651BE0 endp

align 10h



sub_651C20 proc	near
mov	ecx, [ecx+18h]
jmp	sub_668000
sub_651C20 endp

align 10h



sub_651C30 proc	near
mov	ecx, [ecx+18h]
mov	eax, [ecx]
mov	edx, [eax+4]
jmp	edx
sub_651C30 endp

align 10h



sub_651C40 proc	near

arg_0= dword ptr  4

cmp	dword ptr [ecx+8], 0
jz	short loc_651C5B
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, [esp+arg_0]
jnz	short loc_651C5B
mov	al, 1
retn	4

loc_651C5B:
xor	al, al
retn	4
sub_651C40 endp




sub_651C60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [ecx+18h]
push	eax
push	offset aErrorNullOrInv ; "Error: Null or invalid 'this' is used f"...
push	ecx
call	sub_66D290
add	esp, 0Ch
retn	0Ch
sub_651C60 endp

align 10h



sub_651C80 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1431AF4
jz	short loc_651C9E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_651C9E:
mov	eax, esi
pop	esi
retn	4
sub_651C80 endp

align 10h



sub_651CB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+78h]
mov	ecx, [eax+280h]
push	esi
mov	esi, [esp+4+arg_4]
mov	eax, esi
push	edi
lea	edi, [eax+1]

loc_651CC4:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_651CC4
push	0
sub	eax, edi
push	eax
push	esi
call	sub_650E40
mov	ecx, [esp+8+arg_0]
inc	dword ptr [eax+8]
pop	edi
mov	[ecx], eax
mov	eax, ecx
pop	esi
retn	8
sub_651CB0 endp

align 10h



sub_651CF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	byte ptr [esi],	7
test	ecx, ecx
jnz	short loc_651D07
mov	[esi+4], ecx
mov	eax, esi
pop	esi
retn	4

loc_651D07:
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_651D16
call	sub_658B70

loc_651D16:
mov	[esi+4], eax
test	eax, eax
jz	short loc_651D1F
inc	dword ptr [eax]

loc_651D1F:
mov	eax, esi
pop	esi
retn	4
sub_651CF0 endp

align 10h



sub_651D30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	byte ptr [esi],	8
mov	eax, [edi]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	38h
call	eax
test	eax, eax
jz	short loc_651D61
mov	ecx, [esp+8+arg_4]
push	ecx
push	edi
mov	ecx, eax
call	sub_67C3D0
jmp	short loc_651D63

loc_651D61:
xor	eax, eax

loc_651D63:
mov	[esi+4], eax
pop	edi
mov	byte ptr [esi+0Ch], 0
mov	dword ptr [esi+8], 0
mov	eax, esi
pop	esi
retn	8
sub_651D30 endp

align 10h



sub_651D80 proc	near

var_14=	qword ptr -14h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, ecx
mov	al, [esi]
cmp	al, 5
jnz	short loc_651DF9
mov	esi, [esi+4]
cmp	dword ptr [esi+10h], 0
jnz	short loc_651D9E

loc_651D95:
xor	al, al
pop	esi
add	esp, 8
retn	4

loc_651D9E:
mov	eax, [esp+0Ch+arg_0]
cmp	byte ptr [eax+7Ch], 6
ja	short loc_651DF0
mov	esi, [esi]
lea	ecx, [esp+0Ch+var_8]
push	ecx
call	sub_651A90
add	esp, 4
test	al, al
jz	short loc_651D95
fld	[esp+0Ch+var_8]
sub	esp, 8
fstp	[esp+14h+var_14]
call	sub_64A5D0
test	al, al
jnz	short loc_651D95
fldz
fcomp	[esp+0Ch+var_8]

loc_651DD4:
fnstsw	ax
test	ah, 44h
jnp	short loc_651DE7
mov	eax, 1
pop	esi
add	esp, 8
retn	4

loc_651DE7:
xor	eax, eax
pop	esi
add	esp, 8
retn	4

loc_651DF0:
mov	al, 1
pop	esi
add	esp, 8
retn	4

loc_651DF9:
cmp	al, 3
jnz	short loc_651E16
fld	qword ptr [esi+4]
sub	esp, 8
fstp	[esp+14h+var_14]
call	sub_64A5D0
test	al, al
jnz	short loc_651D95
fldz
fcomp	qword ptr [esi+4]
jmp	short loc_651DD4

loc_651E16:
cmp	al, 4
jnz	short loc_651E29

loc_651E1A:
xor	eax, eax
cmp	[esi+4], eax
pop	esi
setnz	al
add	esp, 8
retn	4

loc_651E29:
cmp	al, 2
jnz	short loc_651E37
mov	al, [esi+4]
pop	esi
add	esp, 8
retn	4

loc_651E37:
cmp	al, 6
jz	short loc_651E1A
cmp	al, 7
jnz	short loc_651E56
mov	edx, [esp+0Ch+arg_0]
push	edx
call	sub_651BB0
neg	eax
sbb	eax, eax
neg	eax
pop	esi
add	esp, 8
retn	4

loc_651E56:
cmp	al, 8
jz	short loc_651E1A
cmp	al, 0Bh
setz	al
pop	esi
add	esp, 8
retn	4
sub_651D80 endp

align 10h



sub_651E70 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	byte ptr [esi],	8
lea	ecx, [esi+4]
mov	byte ptr [ecx+8], 0
mov	eax, [edx]
mov	[ecx], eax
test	eax, eax
jz	short loc_651E98
push	edi
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi
pop	edi

loc_651E98:
mov	dword ptr [ecx+4], 0
mov	eax, [edx+4]
test	eax, eax
jz	short loc_651EB6
mov	dl, [edx+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_651EB6:
mov	eax, esi
pop	esi
retn	4
sub_651E70 endp

align 10h



sub_651EC0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+20h]
mov	ecx, [ecx+18h]
sub	edx, [esp+arg_0]
push	esi
mov	esi, [ecx+8]
sub	esi, [ecx+0Ch]
add	ecx, 8
push	edi
mov	edi, [ecx+14h]
dec	edi
sar	esi, 4
shl	edi, 5
add	esi, edi
xor	eax, eax
pop	edi
cmp	edx, esi
pop	esi
ja	short locret_651EFC
mov	ecx, [ecx+10h]
mov	eax, edx
and	edx, 1Fh
shr	eax, 5
shl	edx, 4
add	edx, [ecx+eax*4]
mov	eax, edx

locret_651EFC:
retn	4
sub_651EC0 endp

align 10h



sub_651F00 proc	near
mov	dl, [ecx]
cmp	dl, 8
jnz	short loc_651F0F
add	ecx, 4
jmp	sub_67BFB0

loc_651F0F:
cmp	dl, 6
jnz	short loc_651F3D
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_651F3D
inc	dword ptr [eax+8]
mov	ecx, [eax+8]
test	ecx, 70000000h
jz	short locret_651F62
mov	edx, [eax]
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx
mov	ecx, eax
mov	eax, [edx]
push	2
call	eax
retn

loc_651F3D:
cmp	dl, 9
jnz	short locret_651F62
mov	ecx, [ecx+4]
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short locret_651F62
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

locret_651F62:
retn
sub_651F00 endp

align 10h



sub_651F70 proc	near
mov	dl, [ecx]
cmp	dl, 8
jnz	short loc_651F7F
add	ecx, 4
jmp	sub_67C000

loc_651F7F:
cmp	dl, 6
jnz	short loc_651FBB
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_651FBB
dec	dword ptr [eax+8]
mov	ecx, [eax+8]
mov	edx, ecx
and	edx, 70000000h
cmp	edx, 10000000h
jz	short locret_651FEE
mov	edx, [eax]
and	ecx, 9FFFFFFFh
or	ecx, 10000000h
mov	[eax+8], ecx
mov	ecx, eax
mov	eax, [edx]
push	1
call	eax
retn

loc_651FBB:
cmp	dl, 9
jnz	short locret_651FEE
mov	ecx, [ecx+4]
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short locret_651FEE
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

locret_651FEE:
retn
sub_651F70 endp

align 10h



sub_651FF0 proc	near
mov	eax, ecx
mov	dl, [eax]
cmp	dl, 8
jnz	short loc_652001
lea	ecx, [eax+4]
jmp	sub_67C070

loc_652001:
cmp	dl, 6
jnz	short loc_65200D
mov	ecx, [eax+4]
test	ecx, ecx
jnz	short loc_652015

loc_65200D:
cmp	dl, 9
jnz	short locret_652055
mov	ecx, [eax+4]

loc_652015:
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short locret_652055
test	eax, 0FFFFFFFh
jbe	short loc_652040
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx
retn

loc_652040:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	4
call	edx

locret_652055:
retn
sub_651FF0 endp

align 10h



sub_652060 proc	near
push	esi
mov	esi, ecx
movzx	eax, byte ptr [esi]
add	eax, 0FFFFFFFBh	; switch 8 cases
cmp	eax, 7
ja	loc_652107	; default
			; jumptable 00652072 case 10
jmp	ds:off_65210C[eax*4] ; switch jump

loc_652079:		; jumptable 00652072 cases 5,11
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	loc_652107	; default
			; jumptable 00652072 case 10
pop	esi
jmp	sub_650DF0

loc_65208C:		; jumptable 00652072 cases 8,12
cmp	dword ptr [esi+4], 0
jz	short loc_652107 ; default
			; jumptable 00652072 case 10
test	byte ptr [esi+0Ch], 2
jnz	short loc_6520A4
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6520A4
call	sub_64B3B0

loc_6520A4:
test	byte ptr [esi+0Ch], 1
mov	dword ptr [esi+4], 0
jnz	short loc_6520BD
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6520BD
call	sub_64B3B0

loc_6520BD:
mov	dword ptr [esi+8], 0
pop	esi
retn

loc_6520C6:		; jumptable 00652072 cases 6,9
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_652107 ; default
			; jumptable 00652072 case 10
call	sub_64B3B0
mov	dword ptr [esi+4], 0
pop	esi
retn

loc_6520DB:		; jumptable 00652072 case 7
push	edi
mov	edi, [esi+4]
test	edi, edi
jz	short loc_652106
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_6520FF
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6520FF:
mov	dword ptr [esi+4], 0

loc_652106:
pop	edi

loc_652107:		; default
pop	esi		; jumptable 00652072 case 10
retn
sub_652060 endp

align 4
off_65210C dd offset loc_652079	; jump table for switch	statement
dd offset loc_6520C6
dd offset loc_6520DB
dd offset loc_65208C
dd offset loc_6520C6
dd offset loc_652107
dd offset loc_652079
dd offset loc_65208C
align 10h



sub_652130 proc	near
mov	eax, ecx
mov	dl, [eax]
cmp	dl, 8
jnz	short loc_652141
lea	ecx, [eax+4]
jmp	sub_67C1F0

loc_652141:
cmp	dl, 6
jnz	short loc_652152
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_652152
jmp	sub_64B3B0

loc_652152:
cmp	dl, 9
jnz	short locret_65215F
mov	ecx, [eax+4]
jmp	sub_64B3B0

locret_65215F:
retn
sub_652130 endp




sub_652160 proc	near
mov	eax, ecx
mov	dl, [eax]
cmp	dl, 8
jnz	short loc_652171
lea	ecx, [eax+4]
jmp	sub_67C210

loc_652171:
cmp	dl, 6
jnz	short loc_652182
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_652182
jmp	sub_64B020

loc_652182:
cmp	dl, 9
jnz	short locret_65218F
mov	ecx, [eax+4]
jmp	sub_64B020

locret_65218F:
retn
sub_652160 endp




sub_652190 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	ebx
push	esi
mov	esi, ecx
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
mov	dword ptr [esi], offset	off_1431B00
lea	ecx, [esi+10h]
xor	ebx, ebx
mov	[ecx+8], bl
mov	eax, [edx]
push	edi
mov	[ecx], eax
cmp	eax, ebx
jz	short loc_6521CA
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi

loc_6521CA:
mov	[ecx+4], ebx
mov	eax, [edx+4]
cmp	eax, ebx
jz	short loc_6521E4
mov	dl, [edx+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_6521E4:
mov	edi, [esp+0Ch+arg_8]
lea	ecx, [esi+1Ch]
mov	[ecx+8], bl
mov	eax, [edi]
mov	[ecx], eax
cmp	eax, ebx
jz	short loc_652203
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_652203:
mov	[ecx+4], ebx
mov	eax, [edi+4]
cmp	eax, ebx
jz	short loc_65221D
mov	dl, [edi+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_65221D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_652190 endp

align 10h



sub_652230 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, 4		; switch 5 cases
ja	short loc_6522A3 ; default
jmp	ds:off_6522A8[eax*4] ; switch jump

loc_652243:		; jumptable 0065223C case 0
lea	ecx, [esi+10h]
call	sub_67C1F0
lea	ecx, [esi+1Ch]
call	sub_67C1F0
pop	esi
retn	4

loc_652257:		; jumptable 0065223C case 1
lea	ecx, [esi+10h]
call	sub_67C000
lea	ecx, [esi+1Ch]
call	sub_67C000
pop	esi
retn	4

loc_65226B:		; jumptable 0065223C case 2
lea	ecx, [esi+10h]
call	sub_67BFB0
lea	ecx, [esi+1Ch]
call	sub_67BFB0
pop	esi
retn	4

loc_65227F:		; jumptable 0065223C case 3
lea	ecx, [esi+10h]
call	sub_67C210
lea	ecx, [esi+1Ch]
call	sub_67C210
pop	esi
retn	4

loc_652293:		; jumptable 0065223C case 4
lea	ecx, [esi+10h]
call	sub_67C070
lea	ecx, [esi+1Ch]
call	sub_67C070

loc_6522A3:		; default
pop	esi
retn	4
sub_652230 endp

align 4
off_6522A8 dd offset loc_652243	; jump table for switch	statement
dd offset loc_652257
dd offset loc_65226B
dd offset loc_65227F
dd offset loc_652293
align 10h



sub_6522C0 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
test	byte ptr [esi+24h], 2
jnz	short loc_6522D8
mov	ecx, [esi+1Ch]
cmp	ecx, edi
jz	short loc_6522D8
call	sub_64B3B0

loc_6522D8:
test	byte ptr [esi+24h], 1
mov	[esi+1Ch], edi
jnz	short loc_6522ED
mov	ecx, [esi+20h]
cmp	ecx, edi
jz	short loc_6522ED
call	sub_64B3B0

loc_6522ED:
mov	[esi+20h], edi
test	byte ptr [esi+18h], 2
jnz	short loc_652302
mov	ecx, [esi+10h]
cmp	ecx, edi
jz	short loc_652302
call	sub_64B3B0

loc_652302:
test	byte ptr [esi+18h], 1
mov	[esi+10h], edi
jnz	short loc_652317
mov	ecx, [esi+14h]
cmp	ecx, edi
jz	short loc_652317
call	sub_64B3B0

loc_652317:
mov	[esi+14h], edi
pop	edi
mov	dword ptr [esi], offset	off_1431AF4
pop	esi
retn
sub_6522C0 endp

align 10h



sub_652330 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
mov	al, [esi]
push	edi
mov	edi, ecx
mov	[edi], al
movzx	eax, byte ptr [esi]
add	eax, 0FFFFFFFEh
cmp	eax, 0Ah	; switch 11 cases
ja	loc_6524DF	; default
push	ebx
jmp	ds:off_6524EC[eax*4] ; switch jump

loc_652356:		; jumptable 0065234F case 0
mov	cl, [esi+4]
pop	ebx
mov	[edi+4], cl
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652367:		; jumptable 0065234F cases 3,9
mov	esi, [esi+4]
mov	[edi+4], esi
inc	dword ptr [esi+8]
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_65237B:		; jumptable 0065234F case 1
fld	qword ptr [esi+4]
pop	ebx
fstp	qword ptr [edi+4]
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_65238C:		; jumptable 0065234F case 2
mov	edx, [esi+4]
pop	ebx
mov	[edi+4], edx
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_65239D:		; jumptable 0065234F case 4
mov	eax, [esi+4]
xor	ebx, ebx
cmp	eax, ebx
jz	loc_652464
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 17h
jnz	loc_652446
mov	byte ptr [edi],	8
mov	esi, [esi+4]
mov	eax, [esi+10h]
mov	eax, [eax+30h]
lea	ecx, [esi+10h]
lea	edx, [esp+18h+var_C]
push	edx
call	eax
lea	ecx, [edi+4]
mov	[ecx+8], bl
mov	edx, [eax]
mov	[ecx], edx
cmp	edx, ebx
jz	short loc_6523EE
mov	esi, [edx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[edx+8], esi

loc_6523EE:
mov	[ecx+4], ebx
mov	edx, [eax+4]
cmp	edx, ebx
jz	short loc_652407
mov	al, [eax+8]
and	al, 1
movzx	eax, al
push	eax
push	edx
call	sub_67C1A0

loc_652407:
test	[esp+18h+var_4], 2
jnz	short loc_65241B
mov	ecx, [esp+18h+var_C]
cmp	ecx, ebx
jz	short loc_65241B
call	sub_64B3B0

loc_65241B:
test	[esp+18h+var_4], 1
mov	[esp+18h+var_C], ebx
jnz	loc_6524DE	; jumptable 0065234F case 8
mov	ecx, [esp+18h+var_8]
cmp	ecx, ebx
jz	loc_6524DE	; jumptable 0065234F case 8
call	sub_64B3B0
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652446:
mov	esi, [esi+4]
mov	[edi+4], esi
mov	ecx, [esi+8]
inc	ecx
pop	ebx
and	ecx, 8FFFFFFFh
mov	eax, edi
pop	edi
mov	[esi+8], ecx
pop	esi
add	esp, 0Ch
retn	4

loc_652464:
mov	[edi+4], ebx
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652472:		; jumptable 0065234F case 5
mov	esi, [esi+4]
mov	[edi+4], esi
test	esi, esi
jz	short loc_6524DE ; jumptable 0065234F case 8
inc	dword ptr [esi]
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652489:		; jumptable 0065234F cases 6,10
lea	ecx, [edi+4]
xor	ebx, ebx
mov	[ecx+8], bl
mov	eax, [esi+4]
mov	[ecx], eax
cmp	eax, ebx
jz	short loc_6524A7
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_6524A7:
mov	[ecx+4], ebx
mov	eax, [esi+8]
cmp	eax, ebx
jz	short loc_6524DE ; jumptable 0065234F case 8
mov	dl, [esi+0Ch]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_6524CC:		; jumptable 0065234F case 7
mov	esi, [esi+4]
mov	[edi+4], esi
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax

loc_6524DE:		; jumptable 0065234F case 8
pop	ebx

loc_6524DF:		; default
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_652330 endp

align 4
off_6524EC dd offset loc_652356	; jump table for switch	statement
dd offset loc_65237B
dd offset loc_65238C
dd offset loc_652367
dd offset loc_65239D
dd offset loc_652472
dd offset loc_652489
dd offset loc_6524CC
dd offset loc_6524DE
dd offset loc_652367
dd offset loc_652489
align 10h



sub_652520 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
push	edi
mov	edi, ecx
cmp	byte ptr [edi],	5
jb	short loc_652531
call	sub_652060

loc_652531:
mov	esi, [esp+14h+arg_0]
mov	al, [esi]
mov	[edi], al
movzx	eax, byte ptr [esi]
add	eax, 0FFFFFFFEh
cmp	eax, 0Ah	; switch 11 cases
ja	loc_6526C7	; default
push	ebx
jmp	ds:off_6526D0[eax*4] ; switch jump

loc_652550:		; jumptable 00652549 case 0
mov	cl, [esi+4]
pop	ebx
mov	[edi+4], cl
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_65255F:		; jumptable 00652549 cases 3,9
mov	esi, [esi+4]
mov	[edi+4], esi
inc	dword ptr [esi+8]
pop	ebx
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652571:		; jumptable 00652549 case 1
fld	qword ptr [esi+4]
pop	ebx
fstp	qword ptr [edi+4]
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652580:		; jumptable 00652549 case 2
mov	edx, [esi+4]
pop	ebx
mov	[edi+4], edx
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_65258F:		; jumptable 00652549 case 4
mov	eax, [esi+4]
xor	ebx, ebx
cmp	eax, ebx
jz	loc_652652
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 17h
jnz	loc_652636
mov	byte ptr [edi],	8
mov	esi, [esi+4]
mov	eax, [esi+10h]
mov	eax, [eax+30h]
lea	ecx, [esi+10h]
lea	edx, [esp+18h+var_C]
push	edx
call	eax
lea	ecx, [edi+4]
mov	[ecx+8], bl
mov	edx, [eax]
mov	[ecx], edx
cmp	edx, ebx
jz	short loc_6525E0
mov	esi, [edx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[edx+8], esi

loc_6525E0:
mov	[ecx+4], ebx
mov	edx, [eax+4]
cmp	edx, ebx
jz	short loc_6525F9
mov	al, [eax+8]
and	al, 1
movzx	eax, al
push	eax
push	edx
call	sub_67C1A0

loc_6525F9:
test	[esp+18h+var_4], 2
jnz	short loc_65260D
mov	ecx, [esp+18h+var_C]
cmp	ecx, ebx
jz	short loc_65260D
call	sub_64B3B0

loc_65260D:
test	[esp+18h+var_4], 1
mov	[esp+18h+var_C], ebx
jnz	loc_6526C6	; jumptable 00652549 case 8
mov	ecx, [esp+18h+var_8]
cmp	ecx, ebx
jz	loc_6526C6	; jumptable 00652549 case 8
call	sub_64B3B0
pop	ebx
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652636:
mov	esi, [esi+4]
mov	[edi+4], esi
mov	ecx, [esi+8]
inc	ecx
pop	ebx
and	ecx, 8FFFFFFFh
pop	edi
mov	[esi+8], ecx
pop	esi
add	esp, 0Ch
retn	4

loc_652652:
mov	[edi+4], ebx
pop	ebx
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_65265E:		; jumptable 00652549 case 5
mov	esi, [esi+4]
mov	[edi+4], esi
test	esi, esi
jz	short loc_6526C6 ; jumptable 00652549 case 8
inc	dword ptr [esi]
pop	ebx
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_652673:		; jumptable 00652549 cases 6,10
lea	ecx, [edi+4]
xor	ebx, ebx
mov	[ecx+8], bl
mov	eax, [esi+4]
mov	[ecx], eax
cmp	eax, ebx
jz	short loc_652691
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_652691:
mov	[ecx+4], ebx
mov	eax, [esi+8]
cmp	eax, ebx
jz	short loc_6526C6 ; jumptable 00652549 case 8
mov	dl, [esi+0Ch]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0
pop	ebx
pop	edi
pop	esi
add	esp, 0Ch
retn	4

loc_6526B4:		; jumptable 00652549 case 7
mov	esi, [esi+4]
mov	[edi+4], esi
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax

loc_6526C6:		; jumptable 00652549 case 8
pop	ebx

loc_6526C7:		; default
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_652520 endp

align 10h
off_6526D0 dd offset loc_652550	; jump table for switch	statement
dd offset loc_652571
dd offset loc_652580
dd offset loc_65255F
dd offset loc_65258F
dd offset loc_65265E
dd offset loc_652673
dd offset loc_6526B4
dd offset loc_6526C6
dd offset loc_65255F
dd offset loc_652673
align 10h



sub_652700 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
push	edi
mov	edi, ecx
test	ebp, ebp
jz	loc_6527AF
mov	eax, [ebp+10h]
mov	edx, [eax+8]
lea	esi, [ebp+10h]
mov	ecx, esi
call	edx
cmp	eax, 17h
jnz	loc_6527AF
mov	byte ptr [edi],	8
mov	eax, [esi]
mov	edx, [eax+30h]
lea	ecx, [esp+18h+var_C]
push	ecx
mov	ecx, esi
call	edx
lea	ecx, [edi+4]
mov	byte ptr [ecx+8], 0
mov	edx, [eax]
mov	[ecx], edx
test	edx, edx
jz	short loc_652757
mov	esi, [edx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[edx+8], esi

loc_652757:
mov	dword ptr [ecx+4], 0
mov	edx, [eax+4]
test	edx, edx
jz	short loc_652774
mov	al, [eax+8]
and	al, 1
movzx	eax, al
push	eax
push	edx
call	sub_67C1A0

loc_652774:
test	[esp+18h+var_4], 2
jnz	short loc_652788
mov	ecx, [esp+18h+var_C]
test	ecx, ecx
jz	short loc_652788
call	sub_64B3B0

loc_652788:
test	[esp+18h+var_4], 1
mov	[esp+18h+var_C], 0
jnz	short loc_6527A4
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_6527A4
call	sub_64B3B0

loc_6527A4:
mov	eax, edi

loc_6527A6:
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	4

loc_6527AF:
mov	byte ptr [edi],	6
mov	[edi+4], ebp
mov	eax, edi
test	ebp, ebp
jz	short loc_6527A6
mov	ecx, [ebp+8]
inc	ecx
pop	edi
and	ecx, 8FFFFFFFh
pop	esi
mov	[ebp+8], ecx
pop	ebp
add	esp, 0Ch
retn	4
sub_652700 endp

align 10h



sub_6527E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_8]
mov	byte ptr [esi],	9
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	28h
call	edx
test	eax, eax
jz	short loc_652818
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
push	ecx
mov	ecx, [esp+8+arg_C]
push	edx
push	ecx
mov	ecx, eax
call	sub_652190
mov	[esi+4], eax
mov	eax, esi
pop	esi
retn	10h

loc_652818:
xor	eax, eax
mov	[esi+4], eax
mov	eax, esi
pop	esi
retn	10h
sub_6527E0 endp

align 10h



sub_652830 proc	near
cmp	byte ptr [ecx],	5
jb	short locret_65283A
jmp	sub_652060

locret_65283A:
retn
sub_652830 endp

align 10h



sub_652840 proc	near
mov	al, [ecx]
cmp	al, 8
jz	short locret_652857
cmp	al, 5
jb	short locret_652857
cmp	al, 6
jz	short locret_652857
cmp	al, 9
jz	short locret_652857
jmp	sub_652060

locret_652857:
retn
sub_652840 endp

align 10h



sub_652860 proc	near

arg_0= dword ptr  4

xor	edx, edx
cmp	byte ptr [ecx],	0Ch
jnz	short loc_6528A9
push	esi
mov	esi, [esp+4+arg_0]
mov	[esi+8], dl
mov	eax, [ecx+4]
mov	[esi], eax
cmp	eax, edx
jz	short loc_652887
push	edi
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi
pop	edi

loc_652887:
mov	[esi+4], edx
mov	eax, [ecx+8]
cmp	eax, edx
jz	short loc_6528A3
mov	cl, [ecx+0Ch]
and	cl, 1
movzx	edx, cl
push	edx
push	eax
mov	ecx, esi
call	sub_67C1A0

loc_6528A3:
mov	eax, esi
pop	esi
retn	4

loc_6528A9:
mov	eax, [esp+arg_0]
mov	[eax+8], dl
mov	[eax], edx
mov	[eax+4], edx
retn	4
sub_652860 endp

align 10h



sub_6528C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi],	7
push	edi
mov	edi, [esp+8+arg_0]
jnz	short loc_6528D2
cmp	[esi+4], edi
jz	short loc_6528E3

loc_6528D2:
call	sub_652060
mov	byte ptr [esi],	7
mov	[esi+4], edi
test	edi, edi
jz	short loc_6528E3
inc	dword ptr [edi]

loc_6528E3:
pop	edi
pop	esi
retn	4
sub_6528C0 endp

align 10h



sub_6528F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+8+arg_0]
test	ecx, ecx
jz	short loc_65290F
mov	esi, [ecx+94h]
test	esi, esi
jnz	short loc_652911
call	sub_658B70
mov	esi, eax
jmp	short loc_652911

loc_65290F:
xor	esi, esi

loc_652911:
cmp	byte ptr [edi],	7
jnz	short loc_65291B
cmp	[edi+4], esi
jz	short loc_65292E

loc_65291B:
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	7
mov	[edi+4], esi
test	esi, esi
jz	short loc_65292E
inc	dword ptr [esi]

loc_65292E:
pop	edi
pop	esi
retn	4
sub_6528F0 endp

align 10h



sub_652940 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi],	8
push	edi
mov	edi, [esp+8+arg_0]
jnz	short loc_652954
mov	eax, [esi+4]
cmp	eax, [edi]
jz	short loc_652993

loc_652954:
call	sub_652060
mov	byte ptr [esi],	8
lea	ecx, [esi+4]
xor	edx, edx
mov	[ecx+8], dl
mov	eax, [edi]
mov	[ecx], eax
cmp	eax, edx
jz	short loc_652979
mov	esi, [eax+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[eax+8], esi

loc_652979:
mov	[ecx+4], edx
mov	eax, [edi+4]
cmp	eax, edx
jz	short loc_652993
mov	dl, [edi+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_652993:
pop	edi
pop	esi
retn	4
sub_652940 endp

align 10h



sub_6529A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
call	sub_652060
mov	edx, [esp+4+arg_0]
mov	byte ptr [esi],	0Ch
lea	ecx, [esi+4]
mov	byte ptr [ecx+8], 0
mov	eax, [edx]
mov	[ecx], eax
test	eax, eax
jz	short loc_6529CB
mov	esi, [eax+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[eax+8], esi

loc_6529CB:
mov	dword ptr [ecx+4], 0
mov	eax, [edx+4]
pop	esi
test	eax, eax
jz	short locret_6529EA
mov	dl, [edx+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

locret_6529EA:
retn	4
sub_6529A0 endp

align 10h



sub_6529F0 proc	near

var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 34h
cmp	byte ptr [ecx],	9
push	esi
jnz	loc_652AA6
mov	esi, [esp+38h+arg_0]
xor	edx, edx
cmp	esi, edx
jz	loc_652AA6
mov	eax, [ecx+4]
cmp	[eax+10h], edx
jz	short loc_652A8B
lea	ecx, [esp+38h+var_34]
mov	[esp+38h+var_20], ecx
mov	ecx, [esp+38h+arg_4]
mov	[esp+38h+var_34], dl
mov	[esp+38h+var_10], dl
mov	[esp+38h+var_18], edx
mov	[esp+38h+var_14], edx
mov	[esp+38h+var_8], edx
mov	[esp+38h+var_4], edx
push	edx
mov	[esp+3Ch+var_24], offset off_1431764
mov	[esp+3Ch+var_1C], ecx
mov	[esp+3Ch+var_C], esi
mov	edx, [eax+14h]
mov	ecx, [eax+10h]
mov	esi, [ecx]
push	edx
mov	edx, [esi+28h]
lea	eax, [esp+40h+var_24]
push	eax
call	edx
lea	ecx, [esp+38h+var_24]
call	sub_64B830
mov	ecx, [esp+38h+arg_8]
lea	eax, [esp+38h+var_34]
push	eax
call	sub_652520
cmp	[esp+38h+var_34], 5
jb	short loc_652A82
lea	ecx, [esp+38h+var_34]
call	sub_652060

loc_652A82:
mov	al, 1
pop	esi
add	esp, 34h
retn	0Ch

loc_652A8B:
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_652AA6
push	offset aErrorGetterMet ; "Error: getter	method is null."
push	esi
call	sub_66D290
add	esp, 8

loc_652AA6:
xor	al, al
pop	esi
add	esp, 34h
retn	0Ch
sub_6529F0 endp

align 10h



sub_652AB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	edi
mov	edi, [esp+8+arg_4]
xor	ebx, ebx
cmp	edi, ebx
jz	loc_652B59
cmp	byte ptr [ecx],	0Bh
jnz	loc_652B59
mov	eax, [edi+78h]
mov	eax, [eax+8]
mov	[esp+8+arg_4], eax
inc	dword ptr [eax+8]
push	esi
mov	esi, [ecx+4]
inc	dword ptr [esi+8]
mov	eax, [esp+0Ch+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_652AF2
call	sub_650DF0

loc_652AF2:
mov	ecx, [edi+78h]
lea	edx, [esp+0Ch+arg_4]
push	edx
mov	[esp+10h+arg_4], esi
call	sub_66F9D0
cmp	eax, ebx
jz	short loc_652B14
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_652B14:
mov	esi, [esp+0Ch+arg_0]
mov	[esi+8], bl
mov	[esi], eax
cmp	eax, ebx
jz	short loc_652B2E
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_652B2E:
mov	[esi+4], ebx
cmp	eax, ebx
jz	short loc_652B3C
mov	ecx, eax
call	sub_64B3B0

loc_652B3C:
mov	eax, [esp+0Ch+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_652B51
call	sub_650DF0

loc_652B51:
mov	eax, esi
pop	esi
pop	edi
pop	ebx
retn	8

loc_652B59:
mov	eax, [esp+8+arg_0]
pop	edi
mov	[eax+8], bl
mov	[eax], ebx
mov	[eax+4], ebx
pop	ebx
retn	8
sub_652AB0 endp

align 10h



sub_652B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
push	edi
lea	ecx, [esi+4]
mov	[esi], eax
call	sub_652330
cmp	byte ptr [edi],	7
jnz	short loc_652BBB
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_652BA8
cmp	dword ptr [edi+4], 0
jz	short loc_652BA8
call	sub_668010
mov	ecx, [edi+4]
push	eax
call	sub_654F00
jmp	short loc_652BAA

loc_652BA8:
xor	eax, eax

loc_652BAA:
mov	[esi+14h], eax
test	eax, eax
jz	short loc_652BC2
inc	dword ptr [eax+4]
pop	edi
mov	eax, esi
pop	esi
retn	8

loc_652BBB:
mov	dword ptr [esi+14h], 0

loc_652BC2:
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_652B70 endp

align 10h



sub_652BD0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_652BDF
call	sub_64A400

loc_652BDF:
cmp	byte ptr [esi+4], 5
lea	ecx, [esi+4]
pop	esi
jb	short locret_652BEE
jmp	sub_652060

locret_652BEE:
retn
sub_652BD0 endp

align 10h



sub_652BF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6522C0
test	[esp+4+arg_0], 1
jz	short loc_652C0D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_652C0D:
mov	eax, esi
pop	esi
retn	4
sub_652BF0 endp

align 10h



sub_652C20 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

mov	dl, [ecx]
movzx	eax, dl
sub	esp, 1Ch
add	eax, 0FFFFFFFAh
push	esi
push	edi
cmp	eax, 5		; switch 6 cases
ja	loc_652D3F	; default
			; jumptable 00652C36 cases 1,4
jmp	ds:off_652D4C[eax*4] ; switch jump

loc_652C3D:		; jumptable 00652C36 case 0
mov	eax, [ecx+4]
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_652C48:		; jumptable 00652C36 case 2
mov	eax, [ecx+4]
test	eax, eax
jz	loc_652D3F	; default
			; jumptable 00652C36 cases 1,4
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_652C5B:		; jumptable 00652C36 case 5
mov	eax, [esp+24h+arg_0]
push	eax
lea	edx, [esp+28h+var_1C]
push	edx
call	sub_652AB0
mov	ecx, [esp+24h+var_1C]
test	ecx, ecx
jz	short loc_652CA6
test	[esp+24h+var_14], 2
mov	esi, ecx
jnz	short loc_652C80
call	sub_64B3B0

loc_652C80:
test	[esp+24h+var_14], 1
mov	[esp+24h+var_1C], 0
jnz	short loc_652C9C
mov	ecx, [esp+24h+var_18]
test	ecx, ecx
jz	short loc_652C9C
call	sub_64B3B0

loc_652C9C:
pop	edi
mov	eax, esi
pop	esi
add	esp, 1Ch
retn	4

loc_652CA6:
test	[esp+24h+var_14], 1
mov	[esp+24h+var_1C], 0
jnz	loc_652D3F	; default
			; jumptable 00652C36 cases 1,4
mov	ecx, [esp+24h+var_18]
test	ecx, ecx
jz	short loc_652D3F ; default
			; jumptable 00652C36 cases 1,4
call	sub_64B3B0
pop	edi
xor	eax, eax
pop	esi
add	esp, 1Ch
retn	4

loc_652CD0:		; jumptable 00652C36 case 3
cmp	dl, 9
jnz	short loc_652D3F ; default
			; jumptable 00652C36 cases 1,4
mov	edi, [esp+24h+arg_0]
mov	esi, [edi+74h]
test	esi, esi
jz	short loc_652D3F ; default
			; jumptable 00652C36 cases 1,4
inc	dword ptr [esi+4]
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esi+78h]
push	eax
push	edi
mov	[esp+30h+var_10], 0
call	sub_6529F0
test	al, al
jz	short loc_652D28
push	edi
lea	ecx, [esp+28h+var_10]
call	sub_652C20
cmp	[esp+24h+var_10], 5
mov	edi, eax
jb	short loc_652D17
lea	ecx, [esp+24h+var_10]
call	sub_652060

loc_652D17:
mov	ecx, esi
call	sub_64A400
mov	eax, edi
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_652D28:
cmp	[esp+24h+var_10], 5
jb	short loc_652D38
lea	ecx, [esp+24h+var_10]
call	sub_652060

loc_652D38:
mov	ecx, esi
call	sub_64A400

loc_652D3F:		; default
pop	edi		; jumptable 00652C36 cases 1,4
xor	eax, eax
pop	esi
add	esp, 1Ch
retn	4
sub_652C20 endp

align 4
off_652D4C dd offset loc_652C3D	; jump table for switch	statement
dd offset loc_652D3F
dd offset loc_652C48
dd offset loc_652CD0
dd offset loc_652D3F
dd offset loc_652C5B
align 10h



sub_652D70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi],	7
jnz	short loc_652D9F
mov	ecx, [esp+4+arg_0]
test	ecx, ecx
jz	short loc_652DB4
cmp	dword ptr [esi+4], 0
jz	short loc_652DB4
call	sub_668010
mov	ecx, [esi+4]
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_652DB4
add	eax, 78h
pop	esi
retn	4

loc_652D9F:
mov	eax, [esp+4+arg_0]
push	eax
call	sub_652C20
test	eax, eax
jz	short loc_652DB4
add	eax, 10h
pop	esi
retn	4

loc_652DB4:
xor	eax, eax
pop	esi
retn	4
sub_652D70 endp

align 10h



sub_652DC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	al, [ecx]
push	esi
cmp	al, 8
jz	short loc_652DF2
cmp	al, 0Bh
jz	short loc_652DDD
mov	eax, [esp+4+arg_0]
xor	edx, edx
mov	[eax+8], dl
mov	[eax], edx
mov	[eax+4], edx
pop	esi
retn	8

loc_652DDD:
mov	eax, [esp+4+arg_4]
mov	esi, [esp+4+arg_0]
push	eax
push	esi
call	sub_652AB0
mov	eax, esi
pop	esi
retn	8

loc_652DF2:
mov	esi, [esp+4+arg_0]
xor	edx, edx
mov	[esi+8], dl
mov	eax, [ecx+4]
mov	[esi], eax
cmp	eax, edx
jz	short loc_652E13
push	edi
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi
pop	edi

loc_652E13:
mov	[esi+4], edx
mov	eax, [ecx+8]
cmp	eax, edx
jz	short loc_652E2F
mov	cl, [ecx+0Ch]
and	cl, 1
movzx	edx, cl
push	edx
push	eax
mov	ecx, esi
call	sub_67C1A0

loc_652E2F:
mov	eax, esi
pop	esi
retn	8
sub_652DC0 endp

align 10h



sub_652E40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_652EB1
mov	eax, [edi+10h]
mov	edx, [eax+8]
lea	ebx, [edi+10h]
mov	ecx, ebx
call	edx
cmp	eax, 17h
jnz	short loc_652EB1
mov	eax, [ebx]
mov	edx, [eax+30h]
lea	ecx, [esp+18h+var_C]
push	ecx
mov	ecx, ebx
call	edx
push	eax
mov	ecx, esi
call	sub_652940
test	[esp+18h+var_4], 2
jnz	short loc_652E8C
mov	ecx, [esp+18h+var_C]
test	ecx, ecx
jz	short loc_652E8C
call	sub_64B3B0

loc_652E8C:
test	[esp+18h+var_4], 1
mov	[esp+18h+var_C], 0
jnz	short loc_652ED8
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_652ED8
call	sub_64B3B0
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4

loc_652EB1:
cmp	byte ptr [esi],	6
jnz	short loc_652EBB
cmp	[esi+4], edi
jz	short loc_652ED8

loc_652EBB:
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	6
mov	[esi+4], edi
test	edi, edi
jz	short loc_652ED8
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_652ED8:
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_652E40 endp

align 10h



sub_652EF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	edi, ecx
mov	ecx, esi
call	edx
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_652F47
lea	ecx, [esi-78h]
test	ecx, ecx
jz	short loc_652F23
mov	esi, [ecx+94h]
test	esi, esi
jnz	short loc_652F25
call	sub_658B70
mov	esi, eax
jmp	short loc_652F25

loc_652F23:
xor	esi, esi

loc_652F25:
cmp	byte ptr [edi],	7
jnz	short loc_652F2F
cmp	[edi+4], esi
jz	short loc_652F52

loc_652F2F:
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	7
mov	[edi+4], esi
test	esi, esi
jz	short loc_652F52
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4

loc_652F47:
lea	eax, [esi-10h]
push	eax
mov	ecx, edi
call	sub_652E40

loc_652F52:
pop	edi
pop	esi
retn	4
sub_652EF0 endp

align 10h



sub_652F60 proc	near

var_B0=	qword ptr -0B0h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_54=	byte ptr -54h
DstBuf=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 8Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+8Ch+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+98h+arg_0]
push	edi
mov	edi, [esp+9Ch+arg_4]
mov	eax, [edi+78h]
mov	eax, [eax+8]
lea	ebx, [edi+78h]
mov	ebp, ecx
mov	[esi], eax
mov	ecx, 1
add	[eax+8], ecx
movzx	eax, byte ptr [ebp+0]
cmp	eax, 0Ch	; switch 13 cases
ja	loc_653311	; default
jmp	ds:off_653348[eax*4] ; switch jump

loc_652FAF:		; jumptable 00652FA8 case 5
mov	ebp, [ebp+4]
add	[ebp+8], ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_652FC2
call	sub_650DF0

loc_652FC2:
mov	[esi], ebp
jmp	loc_65332B

loc_652FC9:		; jumptable 00652FA8 case 3
mov	eax, [esp+9Ch+arg_8]
test	eax, eax
jge	short loc_652FDB
mov	eax, 0Ah
jmp	short loc_652FDD

loc_652FDB:
neg	eax

loc_652FDD:
fld	qword ptr [ebp+4]
push	eax		; int
push	40h		; SizeInBytes
lea	eax, [esp+0A4h+DstBuf]
push	eax		; DstBuf
sub	esp, 8
fstp	[esp+0B0h+var_B0]
call	sub_6797A0
push	eax
lea	ecx, [esp+0A0h+var_68]
push	ecx
mov	ecx, edi
call	sub_64AB70
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653012
call	sub_650DF0

loc_653012:
mov	eax, [esp+9Ch+var_68]

loc_653016:
mov	ecx, eax
add	eax, 8
mov	[esi], edi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	loc_65332B
call	sub_650DF0
jmp	loc_65332B

loc_653032:		; jumptable 00652FA8 case 4
mov	eax, [ebp+4]
push	40h
lea	edx, [esp+0A0h+DstBuf]
push	edx
push	eax
call	sub_679640
push	eax
lea	ecx, [esp+0A0h+var_74]
push	ecx
mov	ecx, edi
call	sub_64AB70
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653061
call	sub_650DF0

loc_653061:
mov	eax, [esp+9Ch+var_74]
jmp	short loc_653016

loc_653067:		; jumptable 00652FA8 cases 0,10
mov	ebx, [ebx]
mov	edi, [ebx+0D4h]
jmp	loc_653319

loc_653074:		; jumptable 00652FA8 case 1
mov	ebx, [ebx]
mov	edi, [ebx+0D8h]
jmp	loc_653319

loc_653081:		; jumptable 00652FA8 case 2
mov	ebx, [ebx]
xor	edx, edx
cmp	[ebp+4], dl
setz	dl
add	edx, 35h
mov	edi, [ebx+edx*4+8]
lea	eax, [ebx+edx*4+8]
jmp	loc_653319

loc_65309B:		; jumptable 00652FA8 cases 6,7
push	edi
mov	ecx, ebp
mov	[esp+0A0h+var_54], 0
call	sub_652D70
cmp	[esp+9Ch+arg_C], 0
mov	[esp+9Ch+var_6C], eax
jnz	loc_653211
test	eax, eax
jz	loc_653211
mov	edx, [eax]
mov	edx, [edx+2Ch]
lea	ecx, [esp+9Ch+var_54]
push	ecx
mov	ecx, [ebx]
add	ecx, 164h
push	ecx
push	ebx
mov	ecx, eax
call	edx
test	al, al
jz	loc_653211
movzx	eax, word ptr [edi+0C4h]
mov	ecx, 0FFh
lea	edx, [eax+1]
mov	[edi+0C4h], dx
cmp	ax, cx
jnb	loc_6531E6
push	edi
lea	eax, [esp+0A0h+var_8C]
push	eax
lea	ecx, [esp+0A4h+var_54]
mov	[esp+0A4h+var_64], 0
call	sub_652DC0
xor	ebp, ebp
cmp	[esp+9Ch+var_8C], ebp
setnz	al
test	al, al
jz	short loc_653157
mov	ecx, [esp+9Ch+var_6C]
push	ebp
push	ebp
push	edi
push	ecx
lea	edx, [esp+0ACh+var_64]
push	edx
lea	ecx, [esp+0B0h+DstBuf]
call	sub_64B7F0
mov	edx, [esp+9Ch+var_88]
mov	ecx, [esp+9Ch+var_8C]
mov	eax, [ecx]
mov	eax, [eax+28h]
push	ebp
push	edx
lea	edx, [esp+0A4h+DstBuf]
push	edx
call	eax
lea	ecx, [esp+9Ch+DstBuf]
call	sub_64B830

loc_653157:
push	ebp
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+0A8h+var_80]
push	ecx
lea	ecx, [esp+0ACh+var_64]
call	sub_652F60
mov	eax, [esp+9Ch+var_80]
inc	dword ptr [eax+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	ebx, eax
jnz	short loc_65317F
call	sub_650DF0

loc_65317F:
mov	eax, [esp+9Ch+var_80]
mov	ecx, eax
add	eax, 8
mov	[esi], ebx
dec	dword ptr [eax]
cmp	[eax], ebp
jnz	short loc_653195
call	sub_650DF0

loc_653195:
test	[esp+9Ch+var_84], 2
jnz	short loc_6531A9
mov	ecx, [esp+9Ch+var_8C]
cmp	ecx, ebp
jz	short loc_6531A9
call	sub_64B3B0

loc_6531A9:
test	[esp+9Ch+var_84], 1
mov	[esp+9Ch+var_8C], ebp
jnz	short loc_6531C1
mov	ecx, [esp+9Ch+var_88]
cmp	ecx, ebp
jz	short loc_6531C1
call	sub_64B3B0

loc_6531C1:
cmp	[esp+9Ch+var_64], 5
mov	[esp+9Ch+var_88], ebp
jb	short loc_653200
lea	ecx, [esp+9Ch+var_64]
call	sub_652060
mov	edx, 0FFFFh
add	[edi+0C4h], dx
jmp	loc_653299

loc_6531E6:
mov	ebx, [ebx]
mov	ebx, [ebx+15Ch]
inc	dword ptr [ebx+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6531FE
call	sub_650DF0

loc_6531FE:
mov	[esi], ebx

loc_653200:
mov	edx, 0FFFFh
add	[edi+0C4h], dx
jmp	loc_653299

loc_653211:
cmp	byte ptr [ebp+0], 6
jnz	short loc_653267
cmp	dword ptr [ebp+4], 0
jz	short loc_653267
mov	eax, [ebp+4]
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	edx, [eax+4]
push	edi
call	edx
test	eax, eax
jz	short loc_653267
push	eax
lea	eax, [esp+0A0h+var_70]
push	eax
mov	ecx, edi
call	sub_64AB70
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65324E
call	sub_650DF0

loc_65324E:
mov	eax, [esp+9Ch+var_70]
mov	ecx, eax
add	eax, 8
mov	[esi], edi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_653299
call	sub_650DF0
jmp	short loc_653299

loc_653267:
cmp	byte ptr [ebp+0], 7
jnz	short loc_65327F
cmp	dword ptr [ebp+4], 0
jz	short loc_65327F
push	edi
mov	ecx, ebp
call	sub_651BE0
mov	edi, [eax]
jmp	short loc_653287

loc_65327F:
mov	ebx, [ebx]
mov	edi, [ebx+160h]

loc_653287:
inc	dword ptr [edi+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653297
call	sub_650DF0

loc_653297:
mov	[esi], edi

loc_653299:
cmp	[esp+9Ch+var_54], 5
jb	loc_65332B
lea	ecx, [esp+9Ch+var_54]
call	sub_652060
jmp	short loc_65332B

loc_6532AF:		; jumptable 00652FA8 cases 8,11
mov	ebx, [ebx]
mov	edi, [ebx+158h]
jmp	short loc_653319

loc_6532B9:		; jumptable 00652FA8 case 9
push	offset aProperty_0
lea	ecx, [esp+0A0h+var_7C]
push	ecx
mov	ecx, edi
call	sub_651CB0
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6532DC
call	sub_650DF0

loc_6532DC:
mov	eax, [esp+9Ch+var_7C]
jmp	loc_653016

loc_6532E5:		; jumptable 00652FA8 case 12
push	offset aResolvehandler
lea	edx, [esp+0A0h+var_78]
push	edx
mov	ecx, edi
call	sub_651CB0
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653308
call	sub_650DF0

loc_653308:
mov	eax, [esp+9Ch+var_78]
jmp	loc_653016

loc_653311:		; default
mov	ebx, [ebx]
mov	edi, [ebx+0C4h]

loc_653319:
add	[edi+8], ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653329
call	sub_650DF0

loc_653329:
mov	[esi], edi

loc_65332B:
mov	ecx, [esp+9Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 8Ch
retn	10h
sub_652F60 endp

off_653348 dd offset loc_653067	; jump table for switch	statement
dd offset loc_653074
dd offset loc_653081
dd offset loc_652FC9
dd offset loc_653032
dd offset loc_652FAF
dd offset loc_65309B
dd offset loc_65309B
dd offset loc_6532AF
dd offset loc_6532B9
dd offset loc_653067
dd offset loc_6532AF
dd offset loc_6532E5
align 10h



sub_653380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
push	1
push	0FFFFFFFFh
push	eax
push	esi
call	sub_652F60
mov	eax, esi
pop	esi
retn	8
sub_653380 endp

align 10h



sub_6533A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	al, [ecx]
test	al, al
jz	short loc_6533AA
cmp	al, 0Ah
jnz	short loc_6533E3

loc_6533AA:
mov	eax, [esp+arg_8]
dec	eax
cmp	eax, 5
ja	short loc_6533CA
mov	ecx, [esp+arg_4]
mov	edx, [ecx+78h]
mov	ecx, [edx+8]
mov	eax, [esp+arg_0]
mov	[eax], ecx
inc	dword ptr [ecx+8]
retn	0Ch

loc_6533CA:
mov	eax, [esp+arg_4]
mov	ecx, [eax+78h]
mov	ecx, [ecx+0D4h]
mov	eax, [esp+arg_0]
mov	[eax], ecx
inc	dword ptr [ecx+8]
retn	0Ch

loc_6533E3:
mov	edx, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	0FFFFFFFFh
push	edx
push	esi
call	sub_652F60
mov	eax, esi
pop	esi
retn	0Ch
sub_6533A0 endp

align 10h



sub_653400 proc	near

var_58=	qword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_24=	byte ptr -24h
arg_0= dword ptr  4

sub	esp, 58h
push	ebp
mov	ebp, ecx
mov	al, [ebp+0]
cmp	al, 3
jnz	short loc_653417
fld	qword ptr [ebp+4]
pop	ebp
add	esp, 58h
retn	4

loc_653417:
cmp	al, 4
jnz	short loc_653425
fild	dword ptr [ebp+4]
pop	ebp
add	esp, 58h
retn	4

loc_653425:
push	ebx
mov	ebx, 5
push	esi
cmp	al, bl
jnz	short loc_653457
mov	eax, [ebp+4]
mov	esi, [eax]
lea	ecx, [esp+64h+var_58]
push	ecx
call	sub_651A90
add	esp, 4
test	al, al
jz	loc_65364F
fld	[esp+64h+var_58]
pop	esi
pop	ebx
pop	ebp
add	esp, 58h
retn	4

loc_653457:
cmp	al, 1
jnz	short loc_653474
mov	edx, [esp+64h+arg_0]
cmp	byte ptr [edx+7Ch], 6
ja	loc_65364F

loc_653469:
fldz
pop	esi
pop	ebx
pop	ebp
add	esp, 58h
retn	4

loc_653474:
cmp	al, 2
jnz	short loc_653489
cmp	byte ptr [ebp+4], 0
jz	short loc_653469
fld1
pop	esi
pop	ebx
pop	ebp
add	esp, 58h
retn	4

loc_653489:
cmp	al, 7
jz	loc_65364F
cmp	al, 6
jnz	short loc_65349B
cmp	dword ptr [ebp+4], 0
jnz	short loc_6534A3

loc_65349B:
cmp	al, 8
jnz	loc_653631

loc_6534A3:
mov	esi, [esp+64h+arg_0]
push	edi
push	esi
mov	[esp+6Ch+var_44], 0
call	sub_652D70
mov	edi, eax
test	esi, esi
jz	loc_6535D1
mov	ecx, [esi+78h]
mov	edx, [edi]
lea	eax, [esi+78h]
lea	ebx, [esp+68h+var_44]
push	ebx
add	ecx, 168h
push	ecx
push	eax
mov	eax, [edx+2Ch]
mov	ecx, edi
call	eax
test	al, al
jz	loc_6535CC
movzx	eax, word ptr [esi+0C4h]
mov	ecx, 0FFh
lea	edx, [eax+1]
mov	[esi+0C4h], dx
cmp	ax, cx
jnb	loc_6535B0
push	esi
lea	eax, [esp+6Ch+var_50]
xor	ebx, ebx
push	eax
lea	ecx, [esp+70h+var_44]
mov	[esp+70h+var_34], bl
call	sub_652DC0
cmp	[esp+68h+var_50], ebx
jz	short loc_65354C
push	ebx
push	ebx
push	esi
push	edi
lea	ecx, [esp+78h+var_34]
push	ecx
lea	ecx, [esp+7Ch+var_24]
call	sub_64B7F0
mov	eax, [esp+68h+var_4C]
mov	ecx, [esp+68h+var_50]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	ebx
push	eax
lea	eax, [esp+70h+var_24]
push	eax
call	edx
lea	ecx, [esp+68h+var_24]
call	sub_64B830

loc_65354C:
lea	ecx, [esp+68h+var_34]
call	sub_651A70
test	al, al
jz	short loc_653565
push	esi
lea	ecx, [esp+6Ch+var_34]
call	sub_653400
jmp	short loc_65356A

loc_653565:
call	sub_6794F0

loc_65356A:
test	[esp+68h+var_48], 2
fstp	[esp+68h+var_58]
jnz	short loc_653582
mov	ecx, [esp+68h+var_50]
cmp	ecx, ebx
jz	short loc_653582
call	sub_64B3B0

loc_653582:
test	[esp+68h+var_48], 1
mov	[esp+68h+var_50], ebx
jnz	short loc_65359A
mov	ecx, [esp+68h+var_4C]
cmp	ecx, ebx
jz	short loc_65359A
call	sub_64B3B0

loc_65359A:
cmp	[esp+68h+var_34], 5
mov	[esp+68h+var_4C], ebx
jb	short loc_6535B9
lea	ecx, [esp+68h+var_34]
call	sub_652060
jmp	short loc_6535B9

loc_6535B0:
call	sub_6794F0
fstp	[esp+68h+var_58]

loc_6535B9:
mov	eax, 0FFFFh
add	[esi+0C4h], ax
cmp	[esp+68h+var_44], 5
jmp	short loc_6535E4

loc_6535CC:
mov	ebx, 5

loc_6535D1:
cmp	byte ptr [ebp+0], 7
jnz	short loc_6535FD
call	sub_6794F0

loc_6535DC:
cmp	[esp+68h+var_44], bl
fstp	[esp+68h+var_58]

loc_6535E4:
jb	short loc_6535EF
lea	ecx, [esp+68h+var_44]
call	sub_652060

loc_6535EF:
fld	[esp+68h+var_58]
pop	edi
pop	esi
pop	ebx
pop	ebp
add	esp, 58h
retn	4

loc_6535FD:
mov	edx, [edi]
mov	eax, [edx+4]
push	esi
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_653616
push	eax		; char *
call	_atof
add	esp, 4
jmp	short loc_6535DC

loc_653616:
cmp	[esp+68h+var_44], bl
jb	short loc_653625
lea	ecx, [esp+68h+var_44]
call	sub_652060

loc_653625:
fldz
pop	edi
pop	esi
pop	ebx
pop	ebp
add	esp, 58h
retn	4

loc_653631:
call	sub_651A30
test	al, al
jz	loc_653469
mov	ecx, [esp+64h+arg_0]
movzx	eax, byte ptr [ecx+7Ch]
dec	eax
cmp	eax, ebx
jbe	loc_653469

loc_65364F:
call	sub_6794F0
pop	esi
pop	ebx
pop	ebp
add	esp, 58h
retn	4
sub_653400 endp

align 10h



sub_653660 proc	near

var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 10h
cmp	byte ptr [ecx],	4
jnz	short loc_653671
mov	eax, [ecx+4]
add	esp, 10h
retn	4

loc_653671:
mov	eax, [esp+10h+arg_0]
push	eax
call	sub_653400
fst	[esp+10h+var_8]
fldz
fld	st
fucomp	st(2)
fnstsw	ax
test	ah, 44h
jnp	loc_653733
fxch	st(1)
fst	[esp+10h+var_10]
mov	eax, dword ptr [esp+10h+var_10+4]
and	eax, 7FF00000h
xor	ecx, ecx
jnz	short loc_6536AD
cmp	eax, 7FF00000h
jz	loc_65373F

loc_6536AD:
fld	ds:dbl_1431B58
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_6536D8
fld	ds:dbl_1431B50
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6536D8
fstp	st(1)
call	__ftol2_sse
add	esp, 10h
retn	4

loc_6536D8:
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_6536E5
fchs

loc_6536E5:
sub	esp, 8
fstp	[esp+18h+var_18]
call	_floor
fld	ds:dbl_15FCE08
add	esp, 8
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+10h+var_10], eax
fldcw	word ptr [esp+10h+var_10]
fistp	[esp+10h+var_10]
mov	ecx, dword ptr [esp+10h+var_10]
fldcw	word ptr [esp+10h+arg_0]
fldz
fcomp	[esp+10h+var_8]
fnstsw	ax
test	ah, 41h
jnz	short loc_65372B
neg	ecx

loc_65372B:
mov	eax, ecx
add	esp, 10h
retn	4

loc_653733:
fstp	st(1)
xor	eax, eax
fstp	st
add	esp, 10h
retn	4

loc_65373F:
fstp	st
xor	eax, eax
fstp	st
add	esp, 10h
retn	4
sub_653660 endp

align 10h



sub_653750 proc	near

var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 10h
cmp	byte ptr [ecx],	4
jnz	short loc_653761
mov	eax, [ecx+4]
add	esp, 10h
retn	4

loc_653761:
mov	eax, [esp+10h+arg_0]
push	eax
call	sub_653400
fst	[esp+10h+var_8]
fldz
fld	st
fucomp	st(2)
fnstsw	ax
test	ah, 44h
jnp	loc_65382B
fxch	st(1)
fst	[esp+10h+var_10]
mov	eax, dword ptr [esp+10h+var_10+4]
and	eax, 7FF00000h
xor	ecx, ecx
jnz	short loc_65379D
cmp	eax, 7FF00000h
jz	loc_653837

loc_65379D:
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	short loc_6537DB
fld	ds:dbl_14391B8
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6537DD
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+10h+var_10], eax
fldcw	word ptr [esp+10h+var_10]
fistp	[esp+10h+var_10]
mov	eax, dword ptr [esp+10h+var_10]
fldcw	word ptr [esp+10h+arg_0]
add	esp, 10h
retn	4

loc_6537DB:
fchs

loc_6537DD:
sub	esp, 8
fstp	[esp+18h+var_18]
call	_floor
fld	ds:dbl_15FCE08
add	esp, 8
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+10h+var_10], eax
fldcw	word ptr [esp+10h+var_10]
fistp	[esp+10h+var_10]
mov	ecx, dword ptr [esp+10h+var_10]
fldcw	word ptr [esp+10h+arg_0]
fldz
fcomp	[esp+10h+var_8]
fnstsw	ax
test	ah, 41h
jnz	short loc_653823
neg	ecx

loc_653823:
mov	eax, ecx
add	esp, 10h
retn	4

loc_65382B:
fstp	st(1)
xor	eax, eax
fstp	st
add	esp, 10h
retn	4

loc_653837:
fstp	st
xor	eax, eax
fstp	st
add	esp, 10h
retn	4
sub_653750 endp

align 10h



sub_653850 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_653400
fstp	[esp+0Ch+var_8]
cmp	byte ptr [esi],	5
jb	short loc_653870
mov	ecx, esi
call	sub_652060

loc_653870:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn	4
sub_653850 endp

align 10h



sub_653890 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
push	eax
push	ecx
lea	edx, [esp+0Ch+arg_4]
push	edx
mov	ecx, esi
call	sub_6533A0
mov	ecx, esi
call	sub_652060
mov	ecx, [esp+4+arg_4]
mov	byte ptr [esi],	5
mov	[esi+4], ecx
inc	dword ptr [ecx+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
pop	esi
jnz	short locret_6538C9
call	sub_650DF0

locret_6538C9:
retn	8
sub_653890 endp

align 10h



sub_6538D0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
call	sub_653400
fstp	[esp+10h+var_8]
mov	ecx, [esp+10h+arg_4]
push	edi
call	sub_653400
fldz
fld	st
fucomp	st(2)
fnstsw	ax
test	ah, 44h
jp	short loc_653931
fstp	st(1)
fld	st
fld	[esp+10h+var_8]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_65391A
fstp	st
fstp	st
call	sub_6794F0
jmp	short loc_653937

loc_65391A:
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_65392A
call	sub_679500
jmp	short loc_653937

loc_65392A:
call	sub_679510
jmp	short loc_653937

loc_653931:
fstp	st
fdivr	[esp+10h+var_8]

loc_653937:
cmp	byte ptr [esi],	5
fstp	[esp+10h+var_8]
jb	short loc_653947
mov	ecx, esi
call	sub_652060

loc_653947:
fld	[esp+10h+var_8]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
add	esp, 8
retn	8
sub_6538D0 endp

align 10h



sub_653960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_0]
push	esi
push	0
push	0FFFFFFFFh
mov	esi, ecx
push	eax
lea	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, esi
call	sub_652F60
mov	edx, [esp+8+arg_4]
push	edx
lea	eax, [esp+0Ch+var_4]
push	eax
lea	ecx, [esp+10h+arg_0]
call	sub_651540
mov	eax, [esp+8+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6539A2
call	sub_650DF0

loc_6539A2:
mov	ecx, esi
call	sub_652060
mov	eax, [esp+8+var_4]
mov	[esi+4], eax
mov	byte ptr [esi],	5
inc	dword ptr [eax+8]
mov	eax, [esp+8+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
jnz	short loc_6539CD
call	sub_650DF0

loc_6539CD:
pop	ecx
retn	8
sub_653960 endp

align 10h



sub_6539E0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_24=	byte ptr -24h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 54h
push	esi
push	edi
mov	edi, ecx
mov	al, [edi]
cmp	al, 6
jz	loc_653A92
cmp	al, 7
jz	loc_653A92
cmp	al, 8
jz	loc_653A92
cmp	al, 0Bh
jnz	short loc_653A7C
mov	eax, [esp+5Ch+arg_4]
push	eax
lea	ecx, [esp+60h+var_54]
push	ecx
mov	ecx, edi
call	sub_652AB0
xor	esi, esi
cmp	[esp+5Ch+var_54], esi
jz	short loc_653A64
mov	edi, [esp+5Ch+arg_0]
lea	edx, [esp+5Ch+var_54]
push	edx
mov	ecx, edi
call	sub_651E70
test	[esp+5Ch+var_4C], 2
jnz	short loc_653A42
mov	ecx, [esp+5Ch+var_54]
cmp	ecx, esi
jz	short loc_653A42
call	sub_64B3B0

loc_653A42:
test	[esp+5Ch+var_4C], 1
mov	[esp+5Ch+var_54], esi
jnz	short loc_653A5A
mov	ecx, [esp+5Ch+var_50]
cmp	ecx, esi
jz	short loc_653A5A
call	sub_64B3B0

loc_653A5A:
mov	eax, edi
pop	edi
pop	esi
add	esp, 54h
retn	0Ch

loc_653A64:
test	[esp+5Ch+var_4C], 1
mov	[esp+5Ch+var_54], esi
jnz	short loc_653A7C
mov	ecx, [esp+5Ch+var_50]
cmp	ecx, esi
jz	short loc_653A7C
call	sub_64B3B0

loc_653A7C:
mov	esi, [esp+5Ch+arg_0]
push	edi
mov	ecx, esi
call	sub_652330
pop	edi
mov	eax, esi
pop	esi
add	esp, 54h
retn	0Ch

loc_653A92:
mov	esi, [esp+5Ch+arg_4]
push	ebp
mov	[esp+60h+var_44], 0
cmp	al, 7
jnz	short loc_653AC3
test	esi, esi
jz	short loc_653AD2
cmp	dword ptr [edi+4], 0
jz	short loc_653AD2
mov	ecx, esi
call	sub_668010
mov	ecx, [edi+4]
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_653AD2
lea	ebp, [eax+78h]
jmp	short loc_653AD4

loc_653AC3:
push	esi
call	sub_652C20
test	eax, eax
jz	short loc_653AD2
lea	ebp, [eax+10h]
jmp	short loc_653AD4

loc_653AD2:
xor	ebp, ebp

loc_653AD4:
push	ebx
test	esi, esi
jz	loc_653BD0
test	ebp, ebp
jz	loc_653BD0
mov	ecx, [esi+78h]
mov	edx, [ebp+0]
lea	eax, [esi+78h]
lea	ebx, [esp+64h+var_44]
push	ebx
add	ecx, 168h
push	ecx
push	eax
mov	eax, [edx+2Ch]
mov	ecx, ebp
call	eax
test	al, al
jz	loc_653BD0
movzx	eax, word ptr [esi+0C4h]
xor	ebx, ebx
mov	ecx, 0FFh
lea	edx, [eax+1]
mov	[esp+64h+var_34], bl
mov	[esi+0C4h], dx
cmp	ax, cx
jnb	short loc_653B9F
push	esi
lea	eax, [esp+68h+var_54]
push	eax
lea	ecx, [esp+6Ch+var_44]
call	sub_652DC0
mov	ecx, [esp+64h+var_54]
cmp	ecx, ebx
jz	short loc_653B77
push	ebx
push	ebx
push	esi
push	ebp
lea	ecx, [esp+74h+var_34]
push	ecx
lea	ecx, [esp+78h+var_24]
call	sub_64B7F0
mov	eax, [esp+64h+var_50]
mov	ecx, [esp+64h+var_54]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	ebx
push	eax
lea	eax, [esp+6Ch+var_24]
push	eax
call	edx
lea	ecx, [esp+64h+var_24]
call	sub_64B830
mov	ecx, [esp+64h+var_54]

loc_653B77:
test	[esp+64h+var_4C], 2
jnz	short loc_653B87
cmp	ecx, ebx
jz	short loc_653B87
call	sub_64B3B0

loc_653B87:
test	[esp+64h+var_4C], 1
mov	[esp+64h+var_54], ebx
jnz	short loc_653B9F
mov	ecx, [esp+64h+var_50]
cmp	ecx, ebx
jz	short loc_653B9F
call	sub_64B3B0

loc_653B9F:
mov	eax, 0FFFFh
add	[esi+0C4h], ax
mov	esi, [esp+64h+arg_0]
lea	ecx, [esp+64h+var_34]
push	ecx
mov	ecx, esi
call	sub_652330
mov	bl, 5
cmp	[esp+64h+var_34], bl
jb	loc_653C8C
lea	ecx, [esp+64h+var_34]
jmp	loc_653C87

loc_653BD0:
mov	al, [edi]
cmp	al, 7
jnz	short loc_653BF5
cmp	dword ptr [edi+4], 0
jz	short loc_653BF5
push	esi
mov	ecx, edi
call	sub_651BE0
mov	eax, [eax]
inc	dword ptr [eax+8]
mov	bl, 5
mov	byte ptr [esp+64h+var_54], bl
mov	[esp+64h+var_50], eax
jmp	short loc_653C6D

loc_653BF5:
cmp	al, 6
jnz	short loc_653C40
cmp	dword ptr [edi+4], 0
jz	short loc_653C40
mov	eax, [edi+4]
mov	edx, [eax+10h]
lea	ecx, [eax+10h]
mov	eax, [edx+4]
push	esi
call	eax
test	eax, eax
jz	short loc_653C40
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
push	eax
call	sub_651000
mov	ecx, 1
add	[eax+8], ecx
add	[eax+8], ecx
add	dword ptr [eax+8], 0FFFFFFFFh
mov	bl, 5
mov	byte ptr [esp+64h+var_54], bl
mov	[esp+64h+var_50], eax
jnz	short loc_653C6D
mov	ecx, eax
jmp	short loc_653C68

loc_653C40:
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+70h+arg_4]
push	edx
mov	ecx, edi
call	sub_652F60
mov	ecx, [esp+64h+arg_4]
inc	dword ptr [ecx+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	bl, 5
mov	byte ptr [esp+64h+var_54], bl
mov	[esp+64h+var_50], ecx
jnz	short loc_653C6D

loc_653C68:
call	sub_650DF0

loc_653C6D:
mov	esi, [esp+64h+arg_0]
lea	eax, [esp+64h+var_54]
push	eax
mov	ecx, esi
call	sub_652330
cmp	byte ptr [esp+64h+var_54], bl
jb	short loc_653C8C
lea	ecx, [esp+64h+var_54]

loc_653C87:
call	sub_652060

loc_653C8C:
cmp	[esp+64h+var_44], bl
jb	short loc_653C9B
lea	ecx, [esp+64h+var_44]
call	sub_652060

loc_653C9B:
pop	ebx
pop	ebp
pop	edi
mov	eax, esi
pop	esi
add	esp, 54h
retn	0Ch
sub_6539E0 endp

align 10h



sub_653CB0 proc	near

var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 34h
push	ebp
mov	ebp, ecx
cmp	byte ptr [ebp+0], 9
jnz	loc_653DC3
push	ebx
push	edi
mov	edi, [esp+40h+arg_0]
xor	ebx, ebx
cmp	edi, ebx
jz	loc_653DC1
mov	eax, [ebp+4]
cmp	[eax+1Ch], ebx
jz	loc_653DA6
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
push	esi
lea	esi, [edi+8]
mov	[esp+44h+var_34], bl
cmp	eax, [esi+8]
jb	short loc_653CF7
mov	ecx, esi
call	sub_64B530

loc_653CF7:
mov	ecx, [esi]
cmp	ecx, ebx
jz	short loc_653D07
mov	edx, [esp+44h+arg_8]
push	edx
call	sub_652330

loc_653D07:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
sar	eax, 4
shl	ecx, 5
lea	eax, [eax+ecx-20h]
mov	ecx, [esp+44h+arg_4]
mov	[esp+44h+var_4], eax
mov	eax, [ebp+4]
add	eax, 1Ch
mov	[esp+44h+var_24], offset off_1431764
lea	edx, [esp+44h+var_34]
mov	[esp+44h+var_20], edx
mov	[esp+44h+var_1C], ecx
mov	[esp+44h+var_10], bl
mov	[esp+44h+var_18], ebx
mov	[esp+44h+var_14], ebx
mov	[esp+44h+var_C], edi
mov	[esp+44h+var_8], 1
mov	ecx, [eax]
mov	eax, [eax+4]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	ebx
push	eax
lea	eax, [esp+4Ch+var_24]
push	eax
call	edx
lea	ecx, [esp+44h+var_24]
call	sub_64B830
mov	ecx, [esi]
cmp	byte ptr [ecx],	5
jb	short loc_653D7B
call	sub_652060

loc_653D7B:
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_653D8C
mov	ecx, esi
call	sub_64B660

loc_653D8C:
cmp	[esp+44h+var_34], 5
pop	esi
jb	short loc_653DC1
lea	ecx, [esp+40h+var_34]
call	sub_652060
pop	edi
pop	ebx
pop	ebp
add	esp, 34h
retn	0Ch

loc_653DA6:
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_653DC1
push	offset aErrorSetterMet ; "Error: setter	method is null."
push	edi
call	sub_66D290
add	esp, 8

loc_653DC1:
pop	edi
pop	ebx

loc_653DC3:
pop	ebp
add	esp, 34h
retn	0Ch
sub_653CB0 endp

align 10h



sub_653DD0 proc	near

var_30=	qword ptr -30h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 30h
push	esi
mov	esi, [esp+34h+arg_0]
push	edi
push	0
push	esi
lea	eax, [esp+40h+var_30]
push	eax
mov	edi, ecx
mov	[esp+44h+var_20], 0
mov	[esp+44h+var_10], 0
call	sub_6539E0
push	eax
lea	ecx, [esp+3Ch+var_20]
call	sub_652520
cmp	byte ptr [esp+38h+var_30], 5
jb	short loc_653E0C
lea	ecx, [esp+38h+var_30]
call	sub_652060

loc_653E0C:
push	0
push	esi
lea	ecx, [esp+40h+var_30]
push	ecx
mov	ecx, [esp+44h+arg_4]
call	sub_6539E0
push	eax
lea	ecx, [esp+3Ch+var_10]
call	sub_652520
cmp	byte ptr [esp+38h+var_30], 5
jb	short loc_653E37
lea	ecx, [esp+38h+var_30]
call	sub_652060

loc_653E37:
cmp	[esp+38h+var_20], 5
jz	short loc_653E80
cmp	[esp+38h+var_10], 5
jz	short loc_653E80
push	esi
lea	ecx, [esp+3Ch+var_10]
call	sub_653400
fstp	[esp+38h+var_30]
push	esi
lea	ecx, [esp+3Ch+var_20]
call	sub_653400
fadd	[esp+38h+var_30]
cmp	byte ptr [edi],	5
fstp	[esp+38h+var_30]
jb	short loc_653E71
mov	ecx, edi
call	sub_652060

loc_653E71:
fld	[esp+38h+var_30]
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
jmp	loc_653F22

loc_653E80:
push	ebp
movzx	ebp, byte ptr [esi+7Ch]
push	ebp
push	esi
lea	edx, [esp+44h+arg_0]
push	edx
lea	ecx, [esp+48h+var_20]
call	sub_6533A0
lea	ecx, [esp+3Ch+var_20]
call	sub_652060
mov	ecx, [esp+3Ch+arg_0]
mov	[esp+3Ch+var_20], 5
mov	[esp+3Ch+var_1C], ecx
inc	dword ptr [ecx+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653EB9
call	sub_650DF0

loc_653EB9:
push	ebp
push	esi
lea	eax, [esp+44h+arg_0]
push	eax
lea	ecx, [esp+48h+var_10]
call	sub_6533A0
push	eax
push	esi
lea	ecx, [esp+44h+var_20]
call	sub_653960
mov	eax, [esp+3Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
jnz	short loc_653EEB
call	sub_650DF0

loc_653EEB:
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+44h+arg_0]
push	ecx
lea	ecx, [esp+48h+var_20]
call	sub_652F60
cmp	byte ptr [edi],	5
jb	short loc_653F0A
mov	ecx, edi
call	sub_652060

loc_653F0A:
mov	ecx, [esp+38h+arg_0]
mov	byte ptr [edi],	5
mov	[edi+4], ecx
inc	dword ptr [ecx+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653F22
call	sub_650DF0

loc_653F22:
cmp	[esp+38h+var_10], 5
pop	edi
pop	esi
jb	short loc_653F34
lea	ecx, [esp+30h+var_10]
call	sub_652060

loc_653F34:
cmp	[esp+30h+var_20], 5
jb	short loc_653F44
lea	ecx, [esp+30h+var_20]
call	sub_652060

loc_653F44:
add	esp, 30h
retn	8
sub_653DD0 endp

align 10h



sub_653F50 proc	near

var_20=	qword ptr -20h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
push	esi
mov	esi, [esp+24h+arg_0]
push	edi
push	0
push	esi
lea	eax, [esp+30h+var_20]
push	eax
mov	edi, ecx
mov	[esp+34h+var_10], 0
call	sub_6539E0
push	eax
lea	ecx, [esp+2Ch+var_10]
call	sub_652520
cmp	byte ptr [esp+28h+var_20], 5
jb	short loc_653F87
lea	ecx, [esp+28h+var_20]
call	sub_652060

loc_653F87:
cmp	[esp+28h+var_10], 5
jnz	loc_654053
push	ebp
movzx	ebp, byte ptr [esi+7Ch]
push	ebp
push	esi
lea	ecx, [esp+34h+arg_0]
push	ecx
lea	ecx, [esp+38h+var_10]
call	sub_6533A0
lea	ecx, [esp+2Ch+var_10]
call	sub_652060
mov	ecx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_10], 5
mov	[esp+2Ch+var_C], ecx
inc	dword ptr [ecx+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_653FCB
call	sub_650DF0

loc_653FCB:
mov	edx, [esp+2Ch+arg_4]
push	ebp
push	esi
lea	eax, [esp+34h+arg_4]
push	eax
lea	ecx, [esp+38h+var_20]
mov	byte ptr [esp+38h+var_20], 4
mov	dword ptr [esp+38h+var_20+4], edx
call	sub_6533A0
push	eax
push	esi
lea	ecx, [esp+34h+var_10]
call	sub_653960
mov	eax, [esp+2Ch+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
jnz	short loc_65400A
call	sub_650DF0

loc_65400A:
cmp	byte ptr [esp+28h+var_20], 5
jb	short loc_65401A
lea	ecx, [esp+28h+var_20]
call	sub_652060

loc_65401A:
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+34h+arg_4]
push	ecx
lea	ecx, [esp+38h+var_10]
call	sub_652F60
cmp	byte ptr [edi],	5
jb	short loc_654039
mov	ecx, edi
call	sub_652060

loc_654039:
mov	ecx, [esp+28h+arg_4]
mov	byte ptr [edi],	5
mov	[edi+4], ecx
inc	dword ptr [ecx+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65407B
call	sub_650DF0
jmp	short loc_65407B

loc_654053:
push	esi
lea	ecx, [esp+2Ch+var_10]
call	sub_653400
fiadd	[esp+28h+arg_4]
cmp	byte ptr [edi],	5
fstp	[esp+28h+var_20]
jb	short loc_654071
mov	ecx, edi
call	sub_652060

loc_654071:
fld	[esp+28h+var_20]
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]

loc_65407B:
cmp	[esp+28h+var_10], 5
pop	edi
pop	esi
jb	short loc_65408D
lea	ecx, [esp+20h+var_10]
call	sub_652060

loc_65408D:
add	esp, 20h
retn	8
sub_653F50 endp

align 10h


; Attributes: bp-based frame

sub_6540A0 proc	near

var_88=	qword ptr -88h
var_40=	qword ptr -40h
var_30=	byte ptr -30h
var_2C=	qword ptr -2Ch
var_20=	byte ptr -20h
var_1C=	qword ptr -1Ch
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 74h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	al, [edi]
test	al, al
jz	short loc_6540C0
cmp	al, 0Ah
jz	short loc_6540C0
cmp	al, 1
jz	short loc_6540C0
xor	dl, dl
jmp	short loc_6540C2

loc_6540C0:
mov	dl, 1

loc_6540C2:
mov	esi, [ebp+arg_4]
mov	bl, [esi]
test	bl, bl
jz	short loc_6540D9
cmp	bl, 0Ah
jz	short loc_6540D9
cmp	bl, 1
jz	short loc_6540D9
xor	cl, cl
jmp	short loc_6540DB

loc_6540D9:
mov	cl, 1

loc_6540DB:
test	dl, dl
jnz	loc_654554
test	cl, cl
jnz	loc_654554
movzx	ecx, al
add	ecx, 0FFFFFFFEh	; switch 7 cases
cmp	ecx, 6
ja	loc_654542	; default
jmp	ds:off_654564[ecx*4] ; switch jump

loc_654101:		; jumptable 006540FA case 5
mov	ecx, esi
call	sub_651A50
test	al, al
jz	short loc_654148
mov	ebx, [ebp+arg_0]
push	ebx
mov	ecx, edi
call	sub_653400
fstp	[esp+80h+var_2C]
push	esi
push	ebx
lea	ecx, [esp+88h+var_30]
mov	[esp+88h+var_30], 3
call	sub_6540A0
cmp	[esp+80h+var_30], 5
mov	bl, al
jb	short loc_65413D
lea	ecx, [esp+80h+var_30]
call	sub_652060

loc_65413D:
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_654148:
mov	ecx, esi
cmp	bl, 2
jnz	short loc_65418B
mov	ebx, [ebp+arg_0]
push	ebx
call	sub_653400
fstp	[esp+80h+var_1C]
lea	eax, [esp+80h+var_20]
push	eax
push	ebx
mov	ecx, edi
mov	[esp+88h+var_20], 3
call	sub_6540A0
cmp	[esp+80h+var_20], 5
mov	bl, al
jb	short loc_654180
lea	ecx, [esp+80h+var_20]
call	sub_652060

loc_654180:
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_65418B:
call	sub_651A10
test	al, al
jnz	short loc_6541E0
cmp	bl, 6
jz	short loc_6541E0
mov	ecx, [ebp+arg_0]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+8Ch+var_40]
push	edx
mov	ecx, esi
call	sub_652F60
mov	ecx, [edi+4]
mov	esi, dword ptr [esp+80h+var_40]
mov	eax, [ecx+8]
cmp	ecx, esi
setz	bl
mov	[ecx+8], eax
test	eax, eax
jnz	short loc_6541C8
call	sub_650DF0

loc_6541C8:
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6541D5
mov	ecx, esi
call	sub_650DF0

loc_6541D5:
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6541E0:
mov	ebx, [ebp+arg_0]
push	0
push	ebx
lea	eax, [esp+88h+var_40]
push	eax
mov	ecx, esi
call	sub_6539E0
lea	ecx, [esp+80h+var_40]
call	sub_651A70
test	al, al
jz	short loc_654229
lea	ecx, [esp+80h+var_40]
push	ecx
push	ebx
mov	ecx, edi
call	sub_6540A0
cmp	byte ptr [esp+80h+var_40], 5
mov	bl, al
jb	short loc_65421E
lea	ecx, [esp+80h+var_40]
call	sub_652060

loc_65421E:
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_654229:
cmp	byte ptr [esp+80h+var_40], 5
jb	short loc_654239
lea	ecx, [esp+80h+var_40]
call	sub_652060

loc_654239:
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_654244:		; jumptable 006540FA case 3
mov	ecx, esi
cmp	bl, 2
jnz	short loc_654251
mov	edx, [ebp+arg_0]
push	edx
jmp	short loc_65426D

loc_654251:
call	sub_651A10
test	al, al
jnz	loc_6542EA
cmp	bl, 6
jz	loc_6542EA
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, esi

loc_65426D:
call	sub_653400
fstp	[esp+80h+var_40]
fld	qword ptr [edi+4]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A5D0
mov	bl, al
test	bl, bl
jz	short loc_6542AC
fld	[esp+80h+var_40]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A5D0
test	al, al
jz	short loc_6542A8
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6542A8:
test	bl, bl
jnz	short loc_654239

loc_6542AC:
fld	[esp+80h+var_40]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A5D0
test	al, al
jnz	loc_654239
fld	[esp+80h+var_40]
fcomp	qword ptr [edi+4]
fnstsw	ax
test	ah, 44h
jp	short loc_6542DF
mov	eax, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6542DF:
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6542EA:
mov	ebx, [ebp+arg_0]
push	0
push	ebx
lea	ecx, [esp+88h+var_40]
push	ecx
mov	ecx, esi
call	sub_6539E0
lea	ecx, [esp+80h+var_40]
call	sub_651A70
test	al, al
jz	loc_654229
lea	edx, [esp+80h+var_40]
push	edx
push	ebx
mov	ecx, edi
call	sub_6540A0
cmp	byte ptr [esp+80h+var_40], 5
mov	bl, al
jb	loc_65421E
lea	ecx, [esp+80h+var_40]
call	sub_652060
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_65433B:		; jumptable 006540FA case 4
cmp	bl, 3
jnz	short loc_654386
fild	dword ptr [edi+4]
sub	esp, 8
lea	ecx, [esp+88h+var_40]
mov	byte ptr [esp+88h+var_40], 0
fstp	[esp+88h+var_88]
call	sub_64A6A0
mov	eax, [ebp+arg_0]
push	esi
push	eax
lea	ecx, [esp+88h+var_40]
call	sub_6540A0
cmp	byte ptr [esp+80h+var_40], 5
mov	bl, al
jb	loc_65421E
lea	ecx, [esp+80h+var_40]
call	sub_652060
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_654386:
cmp	bl, 2
jnz	short loc_654391
mov	ecx, [ebp+arg_0]
push	ecx
jmp	short loc_6543A5

loc_654391:
mov	ecx, esi
call	sub_651A10
test	al, al
jnz	short loc_6543BF
cmp	bl, 6
jz	short loc_6543BF
mov	edx, [ebp+arg_0]
push	edx

loc_6543A5:
mov	ecx, esi
call	sub_653660
xor	ecx, ecx
cmp	[edi+4], eax
setz	cl
mov	al, cl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6543BF:
mov	ebx, [ebp+arg_0]
push	0
push	ebx
lea	edx, [esp+88h+var_40]
push	edx
mov	ecx, esi
call	sub_6539E0
lea	ecx, [esp+80h+var_40]
call	sub_651A70
test	al, al
jz	loc_654229
lea	eax, [esp+80h+var_40]
push	eax
push	ebx
mov	ecx, edi
call	sub_6540A0
cmp	byte ptr [esp+80h+var_40], 5
mov	bl, al
jb	loc_65421E
lea	ecx, [esp+80h+var_40]
call	sub_652060
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_654410:		; jumptable 006540FA case 2
mov	ebx, [ebp+arg_0]
push	ebx
mov	ecx, edi
call	sub_653400
fstp	[esp+80h+var_C]
push	esi
push	ebx
lea	ecx, [esp+88h+var_10]
mov	[esp+88h+var_10], 3
call	sub_6540A0
cmp	[esp+80h+var_10], 5
mov	bl, al
jb	short loc_654441
lea	ecx, [esp+80h+var_10]
call	sub_652060

loc_654441:
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_65444C:		; jumptable 006540FA cases 6,8
mov	ecx, esi
call	sub_651A50
test	al, al
jnz	short loc_6544A3
cmp	bl, 5
jz	short loc_6544A3
cmp	bl, 2
jz	short loc_6544A3
mov	al, [edi]
cmp	al, 6
jnz	short loc_65447F
cmp	bl, al
jnz	short loc_65447F
mov	ecx, [edi+4]
xor	eax, eax
cmp	ecx, [esi+4]
setz	al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_65447F:
cmp	al, 8
jnz	loc_654239
cmp	bl, al
jnz	loc_654239
mov	edx, [edi+4]
xor	eax, eax
cmp	edx, [esi+4]
setz	al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6544A3:
mov	ebx, [ebp+arg_0]
push	0
push	ebx
lea	eax, [esp+88h+var_40]
push	eax
mov	ecx, edi
call	sub_6539E0
lea	ecx, [esp+80h+var_40]
call	sub_651A70
test	al, al
jz	loc_654229
push	esi
push	ebx
lea	ecx, [esp+88h+var_40]
call	sub_6540A0
cmp	byte ptr [esp+80h+var_40], 5
mov	bl, al
jb	loc_65421E
lea	ecx, [esp+80h+var_40]
call	sub_652060
mov	al, bl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6544F2:		; jumptable 006540FA case 7
cmp	bl, 7
jnz	loc_654239
mov	eax, [edi+4]
test	eax, eax
jz	short loc_65452F
cmp	dword ptr [esi+4], 0
jz	short loc_65452F
mov	ebx, [ebp+arg_0]
push	ebx
mov	ecx, esi
call	sub_651BE0
push	ebx
mov	ecx, edi
mov	esi, eax
call	sub_651BE0
mov	ecx, [eax]
xor	eax, eax
cmp	ecx, [esi]
setz	al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_65452F:
xor	edx, edx
cmp	eax, [esi+4]
setz	dl
mov	al, dl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_654542:		; default
xor	ecx, ecx
cmp	al, bl
setz	cl
mov	al, cl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_654554:
pop	edi
xor	eax, eax
cmp	dl, cl
pop	esi
setz	al
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6540A0 endp

off_654564 dd offset loc_654410	; jump table for switch	statement
dd offset loc_654244
dd offset loc_65433B
dd offset loc_654101
dd offset loc_65444C
dd offset loc_6544F2
dd offset loc_65444C


; Attributes: bp-based frame

sub_654580 proc	near

var_48=	qword ptr -48h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= qword ptr  0Ch
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 34h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_C]
test	edi, edi
jnz	short loc_6545B4
mov	eax, dword ptr [ebp+arg_4+4]
mov	edx, dword ptr [ebp+arg_4]
push	eax
push	edx
call	sub_6540A0
mov	cl, al
mov	eax, [ebp+arg_0]
mov	byte ptr [eax],	2
mov	[eax+4], cl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6545B4:
mov	esi, dword ptr [ebp+arg_4]
push	0
push	esi
lea	eax, [esp+48h+var_20]
push	eax
call	sub_6539E0
push	0
push	esi
lea	ecx, [esp+48h+var_10]
push	ecx
mov	ecx, dword ptr [ebp+arg_4+4]
call	sub_6539E0
mov	cl, [esp+40h+var_20]
mov	al, [esp+40h+var_10]
mov	bl, 5
cmp	cl, bl
jnz	loc_6546B2
cmp	al, bl
jnz	loc_6546B2
push	0
lea	ecx, [esp+44h+var_10]
test	edi, edi
jge	short loc_654655
or	edi, 0FFFFFFFFh
push	edi
push	esi
lea	edx, [esp+4Ch+var_28]
push	edx
call	sub_652F60
push	0
push	edi
push	esi
lea	eax, [esp+4Ch+var_30]
push	eax
lea	ecx, [esp+50h+var_20]
call	sub_652F60
lea	ecx, [esp+40h+var_28]
push	ecx
lea	ecx, [esp+44h+var_30]
call	sub_651940
mov	esi, [ebp+arg_0]
mov	ecx, dword ptr [esp+40h+var_30]
add	[ecx+8], edi
mov	byte ptr [esi],	2
mov	[esi+4], al
jnz	short loc_65463E
call	sub_650DF0

loc_65463E:
mov	ecx, dword ptr [esp+40h+var_28]
add	[ecx+8], edi
jnz	loc_654841
call	sub_650DF0
jmp	loc_654841

loc_654655:
or	edi, 0FFFFFFFFh
push	edi
push	esi
lea	edx, [esp+4Ch+var_30]
push	edx
call	sub_652F60
push	0
push	edi
push	esi
lea	eax, [esp+4Ch+var_28]
push	eax
lea	ecx, [esp+50h+var_20]
call	sub_652F60
lea	ecx, [esp+40h+var_30]
push	ecx
lea	ecx, [esp+44h+var_28]
call	sub_651990
mov	esi, [ebp+arg_0]
mov	ecx, dword ptr [esp+40h+var_28]
add	[ecx+8], edi
mov	byte ptr [esi],	2
mov	[esi+4], al
jnz	short loc_65469B
call	sub_650DF0

loc_65469B:
mov	ecx, dword ptr [esp+40h+var_30]
add	[ecx+8], edi
jnz	loc_654841
call	sub_650DF0
jmp	loc_654841

loc_6546B2:
cmp	byte ptr [esi+7Ch], 6
jbe	short loc_6546E7
test	cl, cl
jz	short loc_6546C9
cmp	cl, 0Ah
jz	short loc_6546C9
test	al, al
jz	short loc_6546C9
cmp	al, 0Ah
jnz	short loc_6546E7

loc_6546C9:
mov	esi, [ebp+arg_0]
mov	byte ptr [esi],	0
cmp	al, bl
jb	short loc_6546E0
lea	ecx, [esp+40h+var_10]
call	sub_652060
mov	cl, [esp+40h+var_20]

loc_6546E0:
cmp	cl, bl
jmp	loc_654854

loc_6546E7:
push	esi
lea	ecx, [esp+44h+var_20]
call	sub_653400
push	esi
lea	ecx, [esp+44h+var_10]
test	edi, edi
jge	short loc_654709
fstp	[esp+44h+var_30]
call	sub_653400
fstp	[esp+40h+var_28]
jmp	short loc_654716

loc_654709:
fstp	[esp+44h+var_28]
call	sub_653400
fstp	[esp+40h+var_30]

loc_654716:
fld	[esp+40h+var_30]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_64A5D0
test	al, al
jnz	loc_65483B
fld	[esp+40h+var_28]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_64A5D0
test	al, al
jnz	loc_65483B
fld	[esp+40h+var_28]
fld	[esp+40h+var_30]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_654769
fstp	st

loc_654759:
mov	esi, [ebp+arg_0]
xor	al, al
mov	byte ptr [esi],	2
mov	[esi+4], al
jmp	loc_654841

loc_654769:
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_6795C0
test	al, al
jz	short loc_65478B
fld	[esp+40h+var_28]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_679540
test	al, al
jnz	short loc_654759

loc_65478B:
fld	[esp+40h+var_28]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_6795C0
test	al, al
jz	short loc_6547B1
fld	[esp+40h+var_30]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_679540
test	al, al
jnz	short loc_654759

loc_6547B1:
fld	[esp+40h+var_30]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_64A610
test	al, al
jnz	short loc_654759
fld	[esp+40h+var_28]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_64A610
test	al, al
jz	short loc_6547E4
mov	esi, [ebp+arg_0]
mov	al, 1
mov	byte ptr [esi],	2
mov	[esi+4], al
jmp	short loc_654841

loc_6547E4:
fld	[esp+40h+var_28]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_64A640
test	al, al
jnz	loc_654759
fld	[esp+40h+var_30]
sub	esp, 8
fstp	[esp+48h+var_48]
call	sub_64A640
test	al, al
jz	short loc_65481B
mov	esi, [ebp+arg_0]
mov	al, 1
mov	byte ptr [esi],	2
mov	[esi+4], al
jmp	short loc_654841

loc_65481B:
fld	[esp+40h+var_28]
fcomp	[esp+40h+var_30]
fnstsw	ax
test	ah, 41h
jnz	loc_654759
mov	esi, [ebp+arg_0]
mov	al, 1
mov	byte ptr [esi],	2
mov	[esi+4], al
jmp	short loc_654841

loc_65483B:
mov	esi, [ebp+arg_0]
mov	byte ptr [esi],	0

loc_654841:
cmp	[esp+40h+var_10], bl
jb	short loc_654850
lea	ecx, [esp+40h+var_10]
call	sub_652060

loc_654850:
cmp	[esp+40h+var_20], bl

loc_654854:
jb	short loc_65485F
lea	ecx, [esp+40h+var_20]
call	sub_652060

loc_65485F:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_654580 endp

align 10h



sub_654870 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
and	eax, 0FFFFFFFCh
add	eax, 8
lea	esp, [esp+0]

loc_654880:
mov	cl, [eax]
cmp	cl, [edx]
jnz	short loc_6548AA
test	cl, cl
jz	short loc_65489C
mov	cl, [eax+1]
cmp	cl, [edx+1]
jnz	short loc_6548AA
add	eax, 2
add	edx, 2
test	cl, cl
jnz	short loc_654880

loc_65489C:
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setz	cl
mov	al, cl
retn	4

loc_6548AA:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
xor	ecx, ecx
test	eax, eax
setz	cl
mov	al, cl
retn	4
sub_654870 endp

align 10h



sub_6548C0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6548D5
call	sub_651580

loc_6548D5:
mov	ecx, [esi]
mov	eax, [edi]
mov	edx, [ecx+4]
xor	ecx, ecx
cmp	edx, [eax+4]
pop	edi
setz	cl
mov	al, cl
pop	esi
retn	4
sub_6548C0 endp

align 10h



sub_6548F0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
xor	ecx, ecx
xor	edx, edx
mov	[eax+4], ecx
mov	[eax+8], dx
mov	[eax+0Ah], cl
mov	[eax+0Ch], cl
mov	[eax+0Dh], cl
mov	byte ptr [eax+0Bh], 0FFh
retn	4
sub_6548F0 endp

align 10h



sub_654920 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_65492F
or	word ptr [ecx+76h], 2
retn	4

loc_65492F:
mov	eax, 0FFFDh
and	[ecx+76h], ax
retn	4
sub_654920 endp

align 10h



sub_654940 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_654951
or	dword ptr [ecx+0A0h], 4
retn	4

loc_654951:
and	dword ptr [ecx+0A0h], 0FFFFFFFBh
retn	4
sub_654940 endp

align 10h



sub_654960 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_654974
or	dword ptr [ecx+0A0h], 2000h
retn	4

loc_654974:
and	dword ptr [ecx+0A0h], 0FFFFDFFFh
retn	4
sub_654960 endp

align 10h



sub_654990 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6549A1
or	dword ptr [ecx+0A0h], 10h
retn	4

loc_6549A1:
and	dword ptr [ecx+0A0h], 0FFFFFFEFh
retn	4
sub_654990 endp

align 10h



sub_6549B0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6549C1
or	dword ptr [ecx+0A0h], 60h
retn	4

loc_6549C1:
mov	eax, [ecx+0A0h]
and	eax, 0FFFFFFDFh
or	eax, 40h
mov	[ecx+0A0h], eax
retn	4
sub_6549B0 endp

align 10h



sub_6549E0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6549F4
or	dword ptr [ecx+0A0h], 180h
retn	4

loc_6549F4:
mov	eax, [ecx+0A0h]
and	eax, 0FFFFFF7Fh
or	eax, 100h
mov	[ecx+0A0h], eax
retn	4
sub_6549E0 endp

align 10h



sub_654A10 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_654A24
or	dword ptr [ecx+0A0h], 600h
retn	4

loc_654A24:
mov	eax, [ecx+0A0h]
and	eax, 0FFFFFDFFh
or	eax, 400h
mov	[ecx+0A0h], eax
retn	4
sub_654A10 endp

align 10h



sub_654A40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4
jnb	short loc_654A59
imul	eax, 67Ch
lea	eax, [eax+ecx+9D4h]
retn	4

loc_654A59:
xor	eax, eax
retn	4
sub_654A40 endp

align 10h



sub_654A60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4
jb	short loc_654A6E
xor	eax, eax
retn	4

loc_654A6E:
lea	eax, [eax+eax*8]
lea	eax, [ecx+eax*4+934h]
retn	4
sub_654A60 endp

align 10h



; int __stdcall	sub_654A80(float)
sub_654A80 proc	near

arg_0= dword ptr  4

fldz
push	esi
mov	esi, ecx
fcom	dword ptr [esi+68h]
fnstsw	ax
test	ah, 44h
jp	short loc_654AAA
mov	cl, byte ptr [esp+4+arg_0]

loc_654A93:
test	cl, cl
jz	short loc_654AAA
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_654AB3
mov	esi, eax
fcom	dword ptr [esi+68h]
fnstsw	ax
test	ah, 44h
jnp	short loc_654A93

loc_654AAA:
fstp	st
fld	dword ptr [esi+68h]
pop	esi
retn	4

loc_654AB3:
mov	eax, [esi]
fstp	st
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_654ADD
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
fld	dword ptr [eax+0ECh]
fstp	[esp+4+arg_0]
pop	esi
fld	[esp+arg_0]
retn	4

loc_654ADD:
fld	dword ptr [esi+68h]
pop	esi
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4
sub_654A80 endp

align 10h



sub_654AF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_654B15
push	edi
mov	edi, [esp+8+arg_0]
push	edi
call	sub_654AF0
add	esi, 44h
push	esi
mov	ecx, edi
call	sub_64EAF0
pop	edi
pop	esi
retn	4

loc_654B15:
fld	dword ptr [esi+44h]
mov	eax, [esp+4+arg_0]
fstp	dword ptr [eax]
fld	dword ptr [esi+48h]
fstp	dword ptr [eax+4]
fld	dword ptr [esi+4Ch]
fstp	dword ptr [eax+8]
fld	dword ptr [esi+50h]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [esi+54h]
fstp	dword ptr [eax+10h]
fld	dword ptr [esi+58h]
pop	esi
fstp	dword ptr [eax+14h]
retn	4
sub_654AF0 endp




sub_654B40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_654B6B
push	edi
mov	edi, [esp+20h+arg_0]
push	edi
call	sub_654B40
add	esi, 44h
push	esi
mov	ecx, edi
call	sub_64EAF0
pop	edi
pop	esi
add	esp, 18h
retn	4

loc_654B6B:
lea	ecx, [esp+1Ch+var_18]
call	sub_64E8E0
fld	[esp+1Ch+var_18]
mov	eax, [esp+1Ch+arg_0]
fstp	dword ptr [eax]
pop	esi
fld	[esp+18h+var_14]
fstp	dword ptr [eax+4]
fld	[esp+18h+var_10]
fstp	dword ptr [eax+8]
fld	[esp+18h+var_C]
fstp	dword ptr [eax+0Ch]
fld	[esp+18h+var_8]
fstp	dword ptr [eax+10h]
fld	[esp+18h+var_4]
fstp	dword ptr [eax+14h]
add	esp, 18h
retn	4
sub_654B40 endp

align 10h



sub_654BB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
push	edi
mov	edi, [esp+8+arg_0]
test	ecx, ecx
jz	short loc_654BD5
push	edi
call	sub_654BB0
add	esi, 24h
push	esi
mov	ecx, edi
call	sub_68CE70
pop	edi
pop	esi
retn	4

loc_654BD5:
add	esi, 24h
mov	ecx, 8
rep movsd
pop	edi
pop	esi
retn	4
sub_654BB0 endp

align 10h



sub_654BF0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_654C0D

loc_654BF7:
cmp	dword ptr [ecx+5Ch], 0
jnz	short loc_654C08
mov	eax, [ecx+20h]
test	eax, eax
jz	short loc_654C0D
mov	ecx, eax
jmp	short loc_654BF7

loc_654C08:
mov	al, 1
retn	4

loc_654C0D:
xor	eax, eax
cmp	[ecx+5Ch], eax
setnz	al
retn	4
sub_654BF0 endp

align 10h



sub_654C20 proc	near

var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 80h
push	ebx
push	esi
mov	eax, ecx
mov	esi, [eax+5Ch]
push	edi
test	esi, esi
jnz	short loc_654C37
mov	esi, offset unk_167D018

loc_654C37:
mov	ebx, [esp+8Ch+arg_0]
mov	ecx, 10h
mov	edi, ebx
add	eax, 44h
rep movsd
push	eax
lea	ecx, [esp+90h+var_40]
call	sub_64F570
push	eax
mov	ecx, 10h
mov	esi, ebx
lea	edi, [esp+90h+var_80]
lea	eax, [esp+90h+var_80]
rep movsd
push	eax
mov	ecx, ebx
call	sub_64F7E0
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 80h
retn	4
sub_654C20 endp

align 10h



sub_654C80 proc	near

var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 80h
push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
push	edi
test	ecx, ecx
jz	short loc_654CD1
push	ebx
mov	ebx, [esp+8Ch+arg_0]
push	ebx
call	sub_654C80
lea	eax, [esp+8Ch+var_40]
push	eax
mov	ecx, esi
call	sub_654C20
mov	ecx, 10h
mov	esi, ebx
lea	edi, [esp+8Ch+var_80]
rep movsd
lea	ecx, [esp+8Ch+var_80]
push	ecx
push	eax
mov	ecx, ebx
call	sub_64F7E0
pop	ebx
pop	edi
pop	esi
add	esp, 80h
retn	4

loc_654CD1:
lea	edx, [esp+88h+var_40]
push	edx
mov	ecx, esi
call	sub_654C20
mov	edi, [esp+88h+arg_0]
mov	ecx, 10h
mov	esi, eax
rep movsd
pop	edi
pop	esi
add	esp, 80h
retn	4
sub_654C80 endp

align 10h



sub_654D00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+60h], 0
jnz	short loc_654D23
mov	cl, [esp+4+arg_0]
lea	ecx, [ecx+0]

loc_654D10:
test	cl, cl
jz	short loc_654D23
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_654D2A
mov	esi, eax
cmp	dword ptr [esi+60h], 0
jz	short loc_654D10

loc_654D23:
mov	eax, [esi+60h]
pop	esi
retn	4

loc_654D2A:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_654D4A
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	eax, [eax+0C8h]
pop	esi
retn	4

loc_654D4A:
xor	eax, eax
pop	esi
retn	4
sub_654D00 endp




sub_654D50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+64h], 0
jnz	short loc_654D73
mov	cl, [esp+4+arg_0]
lea	ecx, [ecx+0]

loc_654D60:
test	cl, cl
jz	short loc_654D73
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_654D7A
mov	esi, eax
cmp	dword ptr [esi+64h], 0
jz	short loc_654D60

loc_654D73:
mov	eax, [esi+64h]
pop	esi
retn	4

loc_654D7A:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_654D9A
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	eax, [eax+0CCh]
pop	esi
retn	4

loc_654D9A:
xor	eax, eax
pop	esi
retn	4
sub_654D50 endp




sub_654DA0 proc	near
xor	eax, eax
push	esi
mov	esi, ecx
test	ecx, ecx
jz	short loc_654DC5
lea	esp, [esp+0]

loc_654DB0:
mov	eax, [esi]
mov	edx, [eax+14h]
mov	ecx, esi
call	edx
cmp	eax, 2
jg	short loc_654DC5
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_654DB0

loc_654DC5:
pop	esi
retn
sub_654DA0 endp

align 10h



sub_654DD0 proc	near
mov	eax, [ecx]
mov	edx, [eax+5Ch]
call	edx
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+10h]
jmp	eax
sub_654DD0 endp




sub_654DE0 proc	near
push	esi
mov	esi, [ecx+20h]
test	esi, esi
jz	short loc_654E0F
jmp	short loc_654DF0
align 10h

loc_654DF0:
mov	eax, [esi+78h]
mov	edx, [eax+8]
lea	ecx, [esi+78h]
call	edx
cmp	eax, 2
jz	short loc_654E0B
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_654DF0
xor	eax, eax
pop	esi
retn

loc_654E0B:
test	esi, esi
jnz	short loc_654E13

loc_654E0F:
xor	eax, eax
pop	esi
retn

loc_654E13:
lea	ecx, [esi+78h]
call	sub_661C50
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+70h]
pop	esi
jmp	eax
sub_654DE0 endp

align 10h



sub_654E30 proc	near
mov	eax, [ecx]
mov	edx, [eax+70h]
jmp	edx
sub_654E30 endp

align 10h



; int __stdcall	sub_654E40(float, float)
sub_654E40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

test	byte ptr [ecx+76h], 0Ch
jz	short loc_654E6E
fld	[esp+arg_0]
fld	dword ptr [ecx+6Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_654E6E
fld	[esp+arg_4]
fld	dword ptr [ecx+70h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_654E6E
mov	eax, 1
retn	8

loc_654E6E:
xor	eax, eax
retn	8
sub_654E40 endp

align 10h



; int __stdcall	sub_654E80(float, float, char)
sub_654E80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	dx, [ecx+76h]
fld	[esp+arg_0]
xor	eax, eax
fstp	dword ptr [ecx+6Ch]
cmp	[esp+arg_8], al
fld	[esp+arg_4]
push	esi
fstp	dword ptr [ecx+70h]
setnz	al
mov	esi, 0FFF3h
and	dx, si
pop	esi
lea	eax, ds:4[eax*4]
or	ax, dx
mov	[ecx+76h], ax
retn	0Ch
sub_654E80 endp

align 10h



sub_654EC0 proc	near
mov	eax, 0FFF3h
and	[ecx+76h], ax
retn
sub_654EC0 endp

align 10h



sub_654ED0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_654EE1
call	sub_650DF0

loc_654EE1:
mov	ecx, [esi+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_654EEF
call	sub_650DF0

loc_654EEF:
mov	ecx, [esi+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
pop	esi
jnz	short locret_654EFE
jmp	sub_650DF0

locret_654EFE:
retn
sub_654ED0 endp

align 10h



sub_654F00 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+4]
test	eax, eax
jnz	short locret_654F14
add	ecx, 0Ch
push	ecx
mov	ecx, [esp+4+arg_0]
call	sub_68D780

locret_654F14:
retn	4
sub_654F00 endp

align 10h



sub_654F20 proc	near

arg_0= dword ptr  4

add	ecx, 0Ch
push	ecx
mov	ecx, [esp+4+arg_0]
call	sub_68D780
retn	4
sub_654F20 endp




sub_654F30 proc	near
push	esi
mov	esi, ecx
cmp	word ptr [esi+0A6h], 0
jnz	short loc_654F50
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_654F50
call	sub_654F30
mov	[esi+0A6h], ax

loc_654F50:
mov	ax, [esi+0A6h]
pop	esi
retn
sub_654F30 endp

align 10h



sub_654F60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, ecx
cmp	word ptr [edx+0A6h], 0
mov	ecx, [esp+arg_0]
push	esi
movzx	esi, byte ptr [ecx+eax+27F4h]
jnz	short loc_654F90
mov	ecx, [edx+20h]
test	ecx, ecx
jz	short loc_654F90
call	sub_654F30
mov	[edx+0A6h], ax

loc_654F90:
movzx	edx, word ptr [edx+0A6h]
mov	ecx, esi
mov	eax, 1
shl	eax, cl
pop	esi
and	eax, edx
neg	eax
sbb	eax, eax
neg	eax
retn	8
sub_654F60 endp

align 10h



sub_654FB0 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [ecx+3Ch]
fabs
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fcomp	ds:flt_1432128
fnstsw	ax
test	ah, 5
jp	short loc_654FEA
fld	dword ptr [ecx+40h]
fabs
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fcomp	ds:flt_15AA9FC
fnstsw	ax
test	ah, 5
jp	short loc_654FEA
or	dword ptr [ecx+0A0h], 2
pop	ecx
retn

loc_654FEA:
and	dword ptr [ecx+0A0h], 0FFFFFFFDh
pop	ecx
retn
sub_654FB0 endp

align 10h



sub_655000 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
push	edi
call	sub_661C10
test	eax, eax
jnz	short loc_655018
mov	eax, [esi+18h]
mov	eax, [eax+74h]

loc_655018:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, [eax+14h]
jb	short loc_65502A
mov	ecx, esi
call	sub_652060

loc_65502A:
add	edi, 0FFFFC000h
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
retn
sub_655000 endp

align 10h



; int __cdecl sub_655040(int, float, float, float)
sub_655040 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
fld	[esp+10h+arg_C]
call	__CIcos
fstp	[esp+10h+var_10]
fld	[esp+10h+var_10]
fstp	[esp+10h+var_C]
fld	[esp+10h+arg_C]
call	__CIsin
fstp	[esp+10h+arg_C]
mov	eax, [esp+10h+arg_0]
fld	[esp+10h+arg_C]
fstp	[esp+10h+var_4]
fld	dword ptr [eax]
fstp	[esp+10h+var_10]
fld	dword ptr [eax+4]
fstp	[esp+10h+arg_C]
fld	dword ptr [eax+0Ch]
fstp	[esp+10h+var_8]
fld	dword ptr [eax+10h]
fstp	[esp+10h+arg_0]
fld	[esp+10h+var_10]
fld	st
fld	[esp+10h+var_C]
fld	st
fmulp	st(2), st
fld	[esp+10h+var_8]
fld	st
fld	[esp+10h+var_4]
fld	st
fmulp	st(2), st
fxch	st(4)
fsubrp	st(1), st
fld	[esp+10h+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	[esp+10h+arg_C]
fmul	st, st(3)
fld	[esp+10h+arg_0]
fmul	st, st(5)
fsubp	st(1), st
fld	[esp+10h+arg_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+4]
fld	st(4)
fmulp	st(6), st
fld	st(3)
fmulp	st(3), st
fxch	st(5)
faddp	st(2), st
fmulp	st(1), st
fstp	dword ptr [eax+0Ch]
fld	[esp+10h+arg_C]
fmulp	st(2), st
fmul	[esp+10h+arg_0]
faddp	st(1), st
fmulp	st(1), st
fstp	dword ptr [eax+10h]
add	esp, 10h
retn
sub_655040 endp

align 10h



sub_655100 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_655129
lea	ecx, [eax+78h]
call	sub_661C50
test	eax, eax
jz	short loc_655129
mov	edx, [esi+10h]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	esi, [esi+14h]
push	esi
mov	ecx, eax
call	sub_67F3D0

loc_655129:
pop	esi
retn
sub_655100 endp

align 10h



sub_655130 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	edx, [eax+70h]
mov	[esp+1Ch+var_10], 0
call	edx
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [ecx]
mov	esi, eax
mov	eax, [esi+78h]
add	esi, 78h
add	eax, 140h
lea	ebx, [esp+1Ch+var_10]
push	ebx
push	eax
mov	eax, [edx+2Ch]
push	esi
call	eax
test	al, al
jz	short loc_655181
mov	ebx, [edi+78h]
add	edi, 78h
push	0
lea	ecx, [esp+20h+var_10]
call	sub_652C20
mov	edx, [ebx+34h]
push	eax
push	esi
mov	ecx, edi
call	edx

loc_655181:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_655130 endp

align 10h



sub_6551A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
and	eax, 180h
jz	short loc_6551BE
xor	ecx, ecx
cmp	eax, 180h
setz	cl
mov	al, cl
pop	esi
retn

loc_6551BE:
mov	edx, [esi]
mov	eax, [edx+68h]
push	1
call	eax
cmp	eax, esi
jz	short loc_6551D8
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+0D8h]
pop	esi
jmp	eax

loc_6551D8:
mov	al, 1
pop	esi
retn
sub_6551A0 endp

align 10h



sub_6551E0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, ecx
mov	ecx, [eax+78h]
mov	edx, [ecx]
mov	edx, [edx+14h]
push	eax
mov	al, [esp+4+arg_4]
and	al, 1
movzx	eax, al
push	eax
mov	eax, [esp+8+arg_0]
push	eax
call	edx
retn	8
sub_6551E0 endp

align 10h



sub_655200 proc	near

arg_0= dword ptr  4

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
retn
sub_655200 endp

align 10h



sub_655220 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
test	ebx, ebx
jbe	short loc_65524B
push	edi
mov	edi, [esp+0Ch+arg_8]

loc_655233:
test	esi, esi
jz	short loc_65523F
push	edi
mov	ecx, esi
call	sub_652330

loc_65523F:
add	edi, 10h
add	esi, 10h
sub	ebx, 1
jnz	short loc_655233
pop	edi

loc_65524B:
pop	esi
pop	ebx
retn
sub_655220 endp

align 10h



sub_655250 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	ebx
push	esi
push	edi
push	1
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_655289
mov	edi, [esi+0Ch]
test	edi, edi
jz	short loc_655270
mov	ecx, edi
call	sub_64A420

loc_655270:
mov	ebx, [esp+0Ch+arg_0]
mov	[ebx], edi
test	esi, esi
jz	short loc_655281
mov	ecx, esi
call	sub_64A430

loc_655281:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	4

loc_655289:
xor	edi, edi
jmp	short loc_655270
sub_655250 endp

align 10h



; int __stdcall	sub_655290(void	*)
sub_655290 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi	; void *
call	sub_64F7C0
push	esi
mov	ecx, edi
call	sub_654C80
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_655290 endp

align 10h



sub_6552B0 proc	near
mov	eax, 100h
test	[ecx+76h], ax
jnz	short loc_6552C4
cmp	dword ptr [ecx+14h], 0FFFFFFFFh
jl	short loc_6552C4
xor	eax, eax
retn

loc_6552C4:
mov	eax, 1
retn
sub_6552B0 endp

align 10h



sub_6552D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_64E8E0
push	esi
mov	ecx, edi
call	sub_654AF0
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6552D0 endp

align 10h



sub_6552F0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+5Ch]
mov	dword ptr [esi], offset	off_1432130
mov	dword ptr [esi+0Ch], offset off_14321F4
test	eax, eax
jz	short loc_65531C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+5Ch], 0

loc_65531C:
mov	eax, [esi+60h]
test	eax, eax
jz	short loc_655338
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+60h], 0

loc_655338:
mov	eax, [esi+64h]
test	eax, eax
jz	short loc_655354
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+64h], 0

loc_655354:
mov	dword ptr [esi+0Ch], offset off_143F300
mov	ecx, esi
pop	esi
jmp	sub_64A460
sub_6552F0 endp

align 10h



sub_655370 proc	near
mov	eax, [ecx]
mov	eax, [eax+28h]
jmp	eax
sub_655370 endp

align 10h



; int __stdcall	sub_655380(int,	int, float)
sub_655380 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [ecx]
mov	edx, [edx+34h]
sub	esp, 10h
push	eax		; float
push	offset flt_167D000
lea	eax, [esp+18h+var_10]
push	eax
call	edx
mov	ecx, [esp+14h+arg_4]
push	eax		; int
mov	eax, [esp+18h+arg_0]
push	eax		; int
call	sub_6505B0
add	esp, 10h
retn	0Ch
sub_655380 endp

align 10h



sub_6553B0 proc	near
cmp	dword ptr [ecx+20h], 0
jz	short loc_6553C0
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	edx, [eax+54h]
jmp	edx

loc_6553C0:
xor	eax, eax
retn
sub_6553B0 endp

align 10h



sub_6553D0 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	edx, [eax+5Ch]
jmp	edx
sub_6553D0 endp

align 10h



sub_6553E0 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	edx, [eax+60h]
jmp	edx
sub_6553E0 endp

align 10h



sub_6553F0 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	eax, [eax+64h]
jmp	eax
sub_6553F0 endp

align 10h



sub_655400 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	eax, [eax+68h]
jmp	eax
sub_655400 endp

align 10h



sub_655410 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 10h
xor	eax, eax
xor	edx, edx
mov	[esp+10h+var_C], eax
mov	[esp+10h+var_6], al
mov	[esp+10h+var_4], al
mov	[esp+10h+var_3], al
mov	eax, [ecx]
mov	eax, [eax+80h]
mov	[esp+10h+var_8], dx
lea	edx, [esp+10h+var_10]
push	edx
mov	[esp+14h+var_10], 1
mov	[esp+14h+var_5], 0FFh
call	eax
add	esp, 10h
retn
sub_655410 endp

align 10h



sub_655450 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+80h]
push	edx
call	eax
retn	8
sub_655450 endp

align 10h



sub_655470 proc	near
mov	eax, [ecx]
mov	eax, [eax+94h]
jmp	eax
sub_655470 endp

align 10h



sub_655480 proc	near
sub	ecx, 0Ch
jmp	sub_656320
sub_655480 endp

align 10h



sub_655490 proc	near
cmp	dword ptr [ecx+5Ch], 0
setnz	al
retn
sub_655490 endp

align 10h



sub_6554A0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
test	edi, edi
jnz	short loc_6554AC
lea	edi, [ecx+5Ch]

loc_6554AC:
cmp	dword ptr [edi], 0
jnz	short loc_6554E0
mov	eax, [ecx]
mov	edx, [eax+54h]
push	esi
call	edx
mov	ecx, [eax+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	40h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6554DB
mov	ecx, esi	; void *
call	sub_64F7C0
mov	[edi], esi
pop	esi
pop	edi
retn	4

loc_6554DB:
xor	esi, esi
mov	[edi], esi
pop	esi

loc_6554E0:
pop	edi
retn	4
sub_6554A0 endp

align 10h



sub_6554F0 proc	near

var_1C=	dword ptr -1Ch
var_5= byte ptr	-5
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	edi
mov	edi, ecx
xor	ebx, ebx
mov	[esp+14h+var_4], ebx
mov	eax, [edi]
mov	edx, [eax+54h]
call	edx
mov	ebp, eax
test	ebp, ebp
jz	short loc_655530
cmp	[edi+64h], ebx
jz	short loc_655530
cmp	[edi+60h], ebx
jz	short loc_655530
lea	eax, [esp+14h+var_4]
push	eax
lea	ecx, [ebp+8]
mov	ebx, 1
call	sub_655250
cmp	dword ptr [eax], 0
mov	[esp+14h+var_5], bl
jnz	short loc_655535

loc_655530:
mov	[esp+14h+var_5], 0

loc_655535:
test	bl, 1
jz	short loc_655547
mov	ecx, [esp+14h+var_4]
test	ecx, ecx
jz	short loc_655547
call	sub_64A430

loc_655547:
cmp	[esp+14h+var_5], 0
jz	short loc_6555AA
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
lea	ecx, [ebp+8]
push	esi
push	1
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_6555A6
mov	esi, [ebx+0Ch]
test	esi, esi
jz	short loc_655570
mov	ecx, esi
call	sub_64A420

loc_655570:
mov	ecx, ebx
call	sub_64A430

loc_655577:
fld	dword ptr [edi+68h]
mov	eax, [edi+60h]
mov	edx, [esi]
mov	edx, [edx+60h]
push	0
push	ecx
mov	ecx, [edi+64h]
fstp	[esp+1Ch+var_1C]
push	eax
push	ecx
add	ebp, 90h
push	ebp
mov	ecx, esi
call	edx
mov	ecx, esi
pop	esi
pop	edi
pop	ebp
pop	ebx
add	esp, 8
jmp	sub_64A430

loc_6555A6:
xor	esi, esi
jmp	short loc_655577

loc_6555AA:
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_6554F0 endp

align 10h



sub_6555C0 proc	near
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
retn
sub_6555C0 endp

align 10h



sub_6555E0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0C8h
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
lea	ecx, [esp+0D8h+var_80] ; void *
call	sub_64F7C0
mov	esi, [esp+0D8h+arg_4]
xor	ebp, ebp
cmp	esi, ebp
jnz	short loc_655610
lea	eax, [esp+0D8h+var_80]
push	eax
mov	ecx, ebx
call	sub_654C80
jmp	short loc_65561B

loc_655610:
mov	ecx, 10h
lea	edi, [esp+0D8h+var_80]
rep movsd

loc_65561B:
mov	eax, [ebx+64h]
cmp	eax, ebp
jnz	short loc_655652
mov	ecx, [ebx+20h]
cmp	ecx, ebp
jz	short loc_655632
push	1
call	sub_654D50
jmp	short loc_655652

loc_655632:
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	ecx, ebx
call	eax
test	eax, eax
jz	short loc_655650
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	ecx, ebx
call	eax
mov	eax, [eax+0CCh]
jmp	short loc_655652

loc_655650:
xor	eax, eax

loc_655652:
mov	ecx, 10h
lea	esi, [esp+0D8h+var_80]
lea	edi, [esp+0D8h+var_40]
rep movsd
push	eax
lea	ecx, [esp+0DCh+var_40]
push	ecx
lea	ecx, [esp+0E0h+var_80]
call	sub_64F7E0
mov	eax, [ebx+60h]
cmp	eax, ebp
jnz	short loc_6556AD
mov	ecx, [ebx+20h]
cmp	ecx, ebp
jz	short loc_65568D
push	1
call	sub_654D00
jmp	short loc_6556AD

loc_65568D:
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	ecx, ebx
call	eax
test	eax, eax
jz	short loc_6556AB
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	ecx, ebx
call	eax
mov	eax, [eax+0C8h]
jmp	short loc_6556AD

loc_6556AB:
xor	eax, eax

loc_6556AD:
mov	ecx, 10h
lea	esi, [esp+0D8h+var_80]
lea	edi, [esp+0D8h+var_40]
rep movsd
push	eax
lea	ecx, [esp+0DCh+var_40]
push	ecx
lea	ecx, [esp+0E0h+var_80]
call	sub_64F7E0
mov	edx, [ebx]
fld1
mov	eax, [edx+54h]
mov	esi, 1
fst	[esp+0D8h+var_88]
mov	ecx, ebx
fstp	[esp+0D8h+var_8C]
mov	[esp+0D8h+var_B4], ebp
mov	[esp+0D8h+var_B0], ebp
mov	[esp+0D8h+var_A8], ebp
mov	[esp+0D8h+var_AC], ebp
mov	[esp+0D8h+var_A0], esi
mov	[esp+0D8h+var_A4], esi
mov	[esp+0D8h+var_90], ebp
mov	[esp+0D8h+var_94], ebp
mov	[esp+0D8h+var_98], ebp
mov	[esp+0D8h+var_9C], ebp
mov	[esp+0D8h+var_84], ebp
call	eax
mov	edx, [eax]
mov	edx, [edx+68h]
lea	ecx, [esp+0D8h+var_B4]
push	ecx
mov	ecx, eax
call	edx
mov	eax, [ebx]
mov	edx, [eax+54h]
mov	ecx, ebx
call	edx
mov	edx, [eax]
mov	edx, [edx+7Ch]
lea	ecx, [esp+0D8h+var_C4]
push	ecx
mov	ecx, eax
call	edx
mov	eax, [ebx]
mov	edx, [eax+38h]
push	esi
mov	esi, [esp+0DCh+arg_0]
lea	ecx, [esp+0DCh+var_80]
push	ecx
push	esi
mov	ecx, ebx
call	edx
fld	[esp+0D8h+var_BC]
fld	[esp+0D8h+var_C4]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0D8h+var_C8]
fld	dword ptr [esi]
fld1
fadd	st(1), st
fld	[esp+0D8h+var_C8]
fld	st
fmulp	st(3), st
fld	ds:dbl_15FCC48
fmul	st(3), st
fld	st(4)
faddp	st(4), st
fxch	st(3)
fstp	dword ptr [esi]
fld	[esp+0D8h+var_B8]
fld	[esp+0D8h+var_C0]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0D8h+var_C8]
fld	dword ptr [esi+4]
fsubr	st, st(3)
fld	[esp+0D8h+var_C8]
fld	st
fmulp	st(2), st
pop	edi
fxch	st(1)
fmul	st, st(5)
fadd	st, st(2)
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fadd	st, st(4)
fmul	st, st(3)
fmul	st, st(5)
fadd	st, st(6)
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fsubr	st, st(4)
fmul	st, st(1)
fmul	st, st(5)
fadd	st, st(2)
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi+10h]
fadd	st, st(4)
fmul	st, st(3)
fmul	st, st(5)
fadd	st, st(6)
fstp	dword ptr [esi+10h]
fld	dword ptr [esi+14h]
fsubr	st, st(4)
fmul	st, st(1)
fmul	st, st(5)
fadd	st, st(2)
fstp	dword ptr [esi+14h]
fld	dword ptr [esi+18h]
fadd	st, st(4)
fmulp	st(3), st
fxch	st(2)
fmul	st, st(4)
faddp	st(5), st
fxch	st(4)
fstp	dword ptr [esi+18h]
fld	dword ptr [esi+1Ch]
fsubp	st(2), st
fmulp	st(1), st
fmulp	st(1), st
faddp	st(1), st
fstp	dword ptr [esi+1Ch]
pop	esi
pop	ebp
pop	ebx
add	esp, 0C8h
retn	8
sub_6555E0 endp

align 10h



sub_655810 proc	near
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	eax, [eax+2474h]
shr	eax, 2
and	eax, 1
retn
sub_655810 endp

align 10h



sub_655830 proc	near
mov	eax, [ecx-0Ch]
mov	edx, [eax+54h]
add	ecx, 0FFFFFFF4h
call	edx
mov	eax, [eax+2474h]
shr	eax, 6
not	al
and	eax, 1
retn
sub_655830 endp

align 10h



; int __stdcall	sub_655850(float)
sub_655850 proc	near

var_54=	dword ptr -54h
var_44=	byte ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 44h
push	esi
push	edi
mov	edi, ecx
fld	dword ptr [edi+44h]
mov	esi, [edi+20h]
fstp	[esp+4Ch+var_30]
fld	dword ptr [edi+48h]
fstp	[esp+4Ch+var_2C]
fld	dword ptr [edi+4Ch]
fstp	[esp+4Ch+var_28]
fld	dword ptr [edi+50h]
fstp	[esp+4Ch+var_24]
fld	dword ptr [edi+54h]
fstp	[esp+4Ch+var_20]
fld	dword ptr [edi+58h]
fstp	[esp+4Ch+var_1C]
test	esi, esi
jz	short loc_6558A9

loc_655888:
mov	eax, [esi]
mov	edx, [eax+4Ch]
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_6558B3
lea	eax, [esi+44h]
push	eax
lea	ecx, [esp+50h+var_30]
call	sub_64EBB0
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_655888

loc_6558A9:
pop	edi
xor	eax, eax
pop	esi
add	esp, 44h
retn	4

loc_6558B3:
lea	ecx, [esp+4Ch+var_18]
call	sub_64E8E0
mov	edx, [esi]
mov	edx, [edx+40h]
lea	eax, [esp+4Ch+var_18]
push	eax
lea	ecx, [esp+50h+var_40]
push	ecx
mov	ecx, esi
call	edx
mov	ecx, dword_1855FC0
lea	edx, [esp+4Ch+var_44]
push	edx
mov	dword ptr [esp+50h+var_44], 109h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	16Ch
push	edi
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6558A9
fld	[esp+4Ch+arg_0]
lea	ecx, [esp+4Ch+var_40]
push	ecx		; int
push	ecx		; float
fstp	[esp+54h+var_54]
lea	edx, [esp+54h+var_30]
push	edx		; int
mov	edx, [esi]
lea	eax, [esi+44h]
push	eax		; int
mov	eax, [edx+4Ch]
mov	ecx, esi
call	eax
push	eax		; int
mov	ecx, edi
call	sub_6A6780
pop	edi
pop	esi
add	esp, 44h
retn	4
sub_655850 endp

align 10h



sub_655930 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, 100h
or	[esi+76h], ax
movzx	eax, word ptr [esi+76h]
shr	al, 1
test	al, 1
jz	short loc_655958
mov	edx, [esi]
mov	eax, [edx+54h]
call	eax
push	esi
mov	ecx, eax
call	sub_69A780

loc_655958:
mov	cl, [esi+76h]
shr	cl, 4
test	cl, 1
jnz	short loc_65599F
xor	eax, eax
xor	edx, edx
mov	[esp+14h+var_C], eax
mov	[esp+14h+var_6], al
mov	[esp+14h+var_4], al
mov	[esp+14h+var_3], al
mov	eax, [esi]
lea	ecx, [esp+14h+var_10]
mov	[esp+14h+var_8], dx
mov	edx, [eax+80h]
push	ecx
mov	ecx, esi
mov	[esp+18h+var_10], 4
mov	[esp+18h+var_5], 0FFh
call	edx
or	word ptr [esi+76h], 10h

loc_65599F:
pop	esi
add	esp, 10h
retn
sub_655930 endp

align 10h



sub_6559B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
push	esi
movzx	esi, byte ptr [edx+eax+27F4h]
movzx	eax, word ptr [ecx+0A6h]
test	ax, ax
jnz	short loc_6559F5
mov	edx, [ecx+20h]
cmp	[edx+0A6h], ax
jnz	short loc_6559EC
mov	ecx, [edx+20h]
test	ecx, ecx
jz	short loc_6559EC
call	sub_654F30
mov	[edx+0A6h], ax

loc_6559EC:
movzx	edx, word ptr [edx+0A6h]
jmp	short loc_6559F8

loc_6559F5:
movzx	edx, ax

loc_6559F8:
mov	ecx, esi
mov	eax, 1
shl	eax, cl
movzx	ecx, dx
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax
pop	esi
retn	8
sub_6559B0 endp




sub_655A10 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+2804h]
test	edx, edx
jz	short loc_655A30
mov	[edx+88h], ecx
mov	edx, [eax+2804h]
mov	[ecx+84h], edx

loc_655A30:
mov	[eax+2804h], ecx
or	dword ptr [eax+2474h], 400h
retn	4
sub_655A10 endp

align 10h



sub_655A50 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0A0h]
shr	eax, 13h
test	al, 1
jnz	locret_655ADF
push	esi
mov	esi, [esp+4+arg_0]
mov	edx, [esi+2474h]
shr	edx, 13h
test	dl, 1
jnz	short loc_655ADE
movzx	eax, word ptr [ecx+76h]
mov	dl, al
shr	dl, 4
test	dl, 1
jnz	short loc_655ADE
test	eax, 100h
jnz	short loc_655ADE
cmp	dword ptr [ecx+14h], 0FFFFFFFFh
jl	short loc_655ADE
mov	eax, [ecx+88h]
test	eax, eax
jz	short loc_655AB8
lea	esp, [esp+0]

loc_655AA0:
mov	edx, [eax+0A0h]
shr	edx, 13h
test	dl, 1
jnz	short loc_655AE2
mov	eax, [eax+88h]
test	eax, eax
jnz	short loc_655AA0

loc_655AB8:
mov	eax, [esi+2808h]
mov	[ecx+8Ch], eax
mov	[esi+2808h], ecx

loc_655ACA:
or	dword ptr [ecx+0A0h], 80000h
or	dword ptr [esi+2474h], 400h

loc_655ADE:
pop	esi

locret_655ADF:
retn	4

loc_655AE2:
mov	edx, [eax+8Ch]
mov	[ecx+8Ch], edx
mov	[eax+8Ch], ecx
jmp	short loc_655ACA
sub_655A50 endp

align 10h



sub_655B00 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0A0h]
shr	eax, 13h
test	al, 1
jz	short locret_655B73
push	esi
mov	esi, [esp+4+arg_0]
mov	edx, [esi+2474h]
shr	edx, 13h
test	dl, 1
jnz	short loc_655B54
mov	eax, [ecx+88h]
test	eax, eax
jz	short loc_655B48
lea	ebx, [ebx+0]

loc_655B30:
mov	edx, [eax+0A0h]
shr	edx, 13h
test	dl, 1
jnz	short loc_655B76
mov	eax, [eax+88h]
test	eax, eax
jnz	short loc_655B30

loc_655B48:
mov	eax, [ecx+8Ch]
mov	[esi+2808h], eax

loc_655B54:
and	dword ptr [ecx+0A0h], 0FFF7FFFFh
mov	dword ptr [ecx+8Ch], 0
or	dword ptr [esi+2474h], 400h
pop	esi

locret_655B73:
retn	4

loc_655B76:
mov	edx, [ecx+8Ch]
mov	[eax+8Ch], edx
jmp	short loc_655B54
sub_655B00 endp

align 10h



sub_655B90 proc	near
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
add	eax, 23C4h
mov	eax, [eax]
retn
sub_655B90 endp

align 10h



sub_655BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	ecx, [eax+0Ch]
shr	ecx, 1Dh
test	cl, 1
jnz	short loc_655C1A
mov	ecx, esi
call	sub_650650
test	eax, eax
jbe	short loc_655C30
push	0
mov	ecx, esi
call	sub_650680
cmp	eax, 5Fh
jnz	short loc_655C30
lea	edx, [esp+4+arg_0]
push	edx
mov	ecx, esi
call	sub_6518E0
mov	eax, [esp+4+arg_0]
mov	ecx, [eax+0Ch]
shr	ecx, 1Ch
test	cl, 1
jz	short loc_655C1E
mov	esi, [esp+4+arg_4]
test	esi, esi
jz	short loc_655C08
inc	dword ptr [eax+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
push	edi
mov	edi, eax
jnz	short loc_655C01
call	sub_650DF0

loc_655C01:
mov	eax, [esp+8+arg_0]
mov	[esi], edi
pop	edi

loc_655C08:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_655C1A
call	sub_650DF0

loc_655C1A:
mov	al, 1
pop	esi
retn

loc_655C1E:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_655C30
call	sub_650DF0

loc_655C30:
xor	al, al
pop	esi
retn
sub_655BA0 endp

align 10h



sub_655C40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, ecx
mov	eax, [ebx+98h]
push	esi
test	eax, eax
jnz	loc_655D53
push	edi
lea	edi, [ebx+44h]
mov	ecx, edi
call	sub_9CA2D0
call	__ftol2_sse
mov	esi, [esp+10h+arg_0]
mov	ecx, edi
mov	[esi], eax
call	sub_64EA90
call	__ftol2_sse
mov	ecx, edi
mov	[esi+4], eax
call	sub_64EAA0
fmul	ds:dbl_15FCBF8
mov	ecx, edi
fstp	qword ptr [esi+8]
call	sub_64EAC0
fmul	ds:dbl_15FCBF8
mov	ecx, edi
fstp	qword ptr [esi+10h]
call	sub_64EAE0
fmul	ds:dbl_15FCD10
fdiv	ds:dbl_1431730
fstp	qword ptr [esi+18h]
fld	dword ptr [edi]
fstp	dword ptr [esi+20h]
fld	dword ptr [edi+4]
fstp	dword ptr [esi+24h]
fld	dword ptr [edi+8]
fstp	dword ptr [esi+28h]
fld	dword ptr [edi+0Ch]
fstp	dword ptr [esi+2Ch]
fld	dword ptr [edi+10h]
fstp	dword ptr [esi+30h]
fld	dword ptr [edi+14h]
fstp	dword ptr [esi+34h]
mov	edi, [ebx+5Ch]
test	edi, edi
jz	short loc_655D4A
fld	dword ptr [edi+38h]
fstp	qword ptr [esi+38h]
fld	dword ptr [edi+24h]
fld	dword ptr [edi+20h]
fld	dword ptr [edi+28h]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fmul	st, st
faddp	st(1), st
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
call	__CIsqrt
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
push	0
fmul	ds:dbl_15FCBF8
lea	eax, [esp+14h+var_4]
push	eax
lea	ecx, [esp+18h+arg_0]
push	ecx
fstp	qword ptr [esi+40h]
mov	ecx, edi
call	sub_64FA00
fld	[esp+10h+arg_0]
fld	ds:dbl_15FCD10
fmul	st(1), st
fld	ds:dbl_1431730
fdiv	st(2), st
fxch	st(2)
fstp	qword ptr [esi+48h]
fmul	[esp+10h+var_4]
fdivrp	st(1), st
fstp	qword ptr [esi+50h]

loc_655D4A:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn	4

loc_655D53:
mov	esi, [esp+0Ch+arg_0]
push	eax
mov	ecx, esi
call	sub_655D70
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_655C40 endp

align 10h



sub_655D70 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
fld	qword ptr [ecx+8]
fstp	qword ptr [eax+8]
fld	qword ptr [ecx+10h]
fstp	qword ptr [eax+10h]
fld	qword ptr [ecx+18h]
fstp	qword ptr [eax+18h]
fld	dword ptr [ecx+20h]
fstp	dword ptr [eax+20h]
fld	dword ptr [ecx+24h]
fstp	dword ptr [eax+24h]
fld	dword ptr [ecx+28h]
fstp	dword ptr [eax+28h]
fld	dword ptr [ecx+2Ch]
fstp	dword ptr [eax+2Ch]
fld	dword ptr [ecx+30h]
fstp	dword ptr [eax+30h]
fld	dword ptr [ecx+34h]
fstp	dword ptr [eax+34h]
fld	qword ptr [ecx+38h]
fstp	qword ptr [eax+38h]
fld	qword ptr [ecx+40h]
fstp	qword ptr [eax+40h]
fld	qword ptr [ecx+48h]
fstp	qword ptr [eax+48h]
fld	qword ptr [ecx+50h]
fstp	qword ptr [eax+50h]
retn	4
sub_655D70 endp

align 10h



sub_655DE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 15h
test	al, 1
jnz	short loc_655E69
push	edi
mov	edi, [esp+8+arg_0]

loc_655DF5:
push	esi
mov	ecx, edi
call	sub_6986B0
or	dword ptr [esi+0A0h], 200000h
mov	eax, [esi+20h]
lea	ebx, [ebx+0]

loc_655E10:
test	eax, eax
jz	short loc_655E68
mov	cl, [eax+76h]
shr	cl, 7
and	cl, 1
movzx	esi, cl
neg	esi
sbb	esi, esi
and	esi, eax
jz	short loc_655E36
mov	edx, [esi+0A0h]
shr	edx, 15h
test	dl, 1
jnz	short loc_655E3B

loc_655E36:
mov	eax, [eax+20h]
jmp	short loc_655E10

loc_655E3B:
mov	eax, [esi+0A0h]
shr	eax, 15h
test	al, 1
jz	short loc_655E5A
push	esi
mov	ecx, edi
call	sub_69A810
and	dword ptr [esi+0A0h], 0FFDFFFFFh

loc_655E5A:
mov	ecx, [esi+0A0h]
shr	ecx, 15h
test	cl, 1
jz	short loc_655DF5

loc_655E68:
pop	edi

loc_655E69:
pop	esi
retn	4
sub_655DE0 endp

align 10h



sub_655E70 proc	near

var_60=	byte ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 60h
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+10h]
call	edx
test	al, al
jnz	short loc_655E8A
xor	eax, eax
pop	esi
add	esp, 60h
retn	8

loc_655E8A:
cmp	dword ptr [esi+5Ch], 0
fld	dword ptr [esi+44h]
fstp	[esp+64h+var_58]
push	edi
fld	dword ptr [esi+48h]
fstp	[esp+68h+var_54]
fld	dword ptr [esi+4Ch]
fstp	[esp+68h+var_50]
fld	dword ptr [esi+50h]
fstp	[esp+68h+var_4C]
fld	dword ptr [esi+54h]
fstp	[esp+68h+var_48]
fld	dword ptr [esi+58h]
fstp	[esp+68h+var_44]
jnz	short loc_655ED5
mov	ecx, [esi+20h]
test	ecx, ecx
jz	loc_655F58
push	1
call	sub_654BF0
test	al, al
jz	loc_655F58

loc_655ED5:
push	ebx
push	1
mov	ecx, esi
call	sub_654D00
push	1
mov	ecx, esi
mov	edi, eax
call	sub_654D50
mov	ebx, eax
test	edi, edi
jz	short loc_655EFF
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E0h], edi

loc_655EFF:
test	ebx, ebx
jz	short loc_655F12
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E4h], ebx

loc_655F12:		; void *
lea	ecx, [esp+6Ch+var_40]
call	sub_64F7C0
lea	eax, [esp+6Ch+var_40]
push	eax
mov	ecx, esi
call	sub_654C80
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
lea	ecx, [esp+6Ch+var_40]
mov	[eax+0E8h], ecx
mov	eax, [esi]
lea	edx, [esp+6Ch+var_60]
push	edx
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
pop	ebx
jmp	short loc_655F6B

loc_655F58:
mov	eax, [esp+68h+arg_0]
push	eax
lea	ecx, [esp+6Ch+var_60]
push	ecx
lea	ecx, [esp+70h+var_58]
call	sub_64EC70

loc_655F6B:
cmp	word ptr [esi+74h], 0
jnz	short loc_655FD9
mov	ecx, [esi+78h]
mov	edx, [ecx]
mov	edx, [edx+14h]
push	esi
push	1
lea	eax, [esp+70h+var_60]
push	eax
call	edx
test	al, al
jz	short loc_655FD9
mov	esi, [esi+20h]
test	esi, esi
jz	short loc_655FD9
mov	edi, [esp+68h+arg_4]

loc_655F93:
mov	eax, [esi+78h]
mov	edx, [eax+8]
lea	ecx, [esi+78h]
call	edx
cmp	eax, 2
jnz	short loc_655FD9
cmp	byte ptr [edi+0Ch], 0
jnz	short loc_655FC7
mov	ecx, esi
call	sub_6810B0
test	al, al
jnz	short loc_655FC7
mov	ecx, [esi+1D8h]
test	ecx, ecx
jz	short loc_655FD2
call	sub_6810B0
test	al, al
jz	short loc_655FD2

loc_655FC7:
mov	eax, [edi+4]
test	eax, eax
jz	short loc_655FE3
cmp	eax, esi
jnz	short loc_655FE3

loc_655FD2:
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_655F93

loc_655FD9:
pop	edi
xor	eax, eax
pop	esi
add	esp, 60h
retn	8

loc_655FE3:
pop	edi
mov	eax, esi
pop	esi
add	esp, 60h
retn	8
sub_655E70 endp

align 10h



sub_655FF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_656020
mov	eax, [edi]
test	eax, eax
jz	short loc_656015
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_656015:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_656020:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_656051
mov	edx, [ecx]
push	ebx
mov	ebx, esi
shl	ebx, 4
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_656051:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
shl	eax, 4
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 143h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_655FF0 endp

align 10h



sub_656080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_65608D
lea	ecx, [eax-0Ch]
jmp	short loc_65608F

loc_65608D:
xor	ecx, ecx

loc_65608F:
mov	eax, [ecx]
mov	edx, [eax+0A8h]
call	edx
test	eax, eax
jz	short locret_6560B2
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	20h
mov	ecx, eax
call	edx

locret_6560B2:
retn
sub_656080 endp

align 10h



sub_6560C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*8]
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_656119
cmp	[ecx+4], esi
jnz	short loc_656119
push	ebx
mov	ebx, [esp+0Ch+arg_0]

loc_6560E2:
cmp	[ecx+4], esi
jnz	short loc_656100
mov	edx, [ecx+8]
cmp	edx, [ebx]
jnz	short loc_656100
test	edx, 20000h
jz	short loc_656113
mov	dx, [ecx+10h]
cmp	dx, [ebx+8]
jz	short loc_656113

loc_656100:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_656110
lea	ecx, [eax+eax*8]
lea	ecx, [edi+ecx*4+8]
jmp	short loc_6560E2

loc_656110:
or	eax, 0FFFFFFFFh

loc_656113:
pop	ebx
pop	edi
pop	esi
retn	8

loc_656119:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6560C0 endp

align 10h



sub_656130 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	edx, ecx
mov	eax, [edx]
push	esi
lea	ecx, [ebp+ebp*2+0]
cmp	dword ptr [eax+ecx*4+8], 0FFFFFFFEh
lea	esi, [eax+ecx*4+8]
push	edi
mov	[esp+10h+var_4], edx
mov	edi, ebp
jz	short loc_6561B9
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, [eax+4]
cmp	ecx, ebp
jnz	short loc_6561B9
push	ebx
nop

loc_656160:
mov	ecx, [esi+4]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
cmp	eax, ebp
jnz	short loc_656192
mov	ecx, [esp+14h+arg_0]
mov	ebx, [ecx]
mov	ecx, [esi+4]
cmp	dword ptr [ecx+4], 0
jnz	short loc_656185
call	sub_651580
mov	edx, [esp+14h+var_4]

loc_656185:
mov	ecx, [ebx]
mov	eax, [esi+4]
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]
jz	short loc_6561A4

loc_656192:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_6561AE
mov	eax, [edx]
lea	ecx, [edi+edi*2]
lea	esi, [eax+ecx*4+8]
jmp	short loc_656160

loc_6561A4:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_6561AE:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8

loc_6561B9:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8
sub_656130 endp

align 10h



; int __stdcall	sub_6561D0(int,	int, float)
sub_6561D0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx]
mov	eax, [eax+34h]
sub	esp, 10h
push	esi
push	offset flt_167D000
lea	edx, [esp+18h+var_10]
push	edx
call	eax
fldz
mov	esi, [esp+14h+arg_0]
fst	dword ptr [esi]
mov	ecx, [esp+14h+arg_8]
fst	dword ptr [esi+4]
push	ecx		; float
fst	dword ptr [esi+8]
mov	ecx, [esp+18h+arg_4]
fstp	dword ptr [esi+0Ch]
push	eax		; int
push	esi		; int
call	sub_650330
mov	eax, esi
pop	esi
add	esp, 10h
retn	0Ch
sub_6561D0 endp

align 10h



sub_656210 proc	near

arg_0= dword ptr  4

fldz
mov	eax, [esp+arg_0]
fst	dword ptr [eax]
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fstp	dword ptr [eax+0Ch]
retn	8
sub_656210 endp

align 10h



sub_656230 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
mov	edx, [esi]
mov	edx, [edx+124h]
shr	eax, 13h
and	al, 1
mov	byte ptr [esp+8+var_4],	al
mov	eax, [esp+8+var_4]
push	eax
call	edx
cmp	eax, 0FFFFFFFFh
jz	short loc_65626D
cmp	eax, 1
jnz	short loc_656279
mov	eax, [esp+8+arg_0]
push	eax
mov	ecx, esi
call	sub_655A50
pop	esi
pop	ecx
retn	4

loc_65626D:
mov	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, esi
call	sub_655B00

loc_656279:
pop	esi
pop	ecx
retn	4
sub_656230 endp

align 10h



sub_656280 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi+2474h]
shr	eax, 1
test	al, 1
jnz	short loc_6562D8
mov	edx, [edi+8]
mov	eax, [edx+0Ch]
lea	ecx, [edi+8]
push	esi
push	4
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6562AA
mov	ecx, esi
call	sub_64A420

loc_6562AA:
mov	ecx, [edi+0F8h]
test	ecx, ecx
jz	short loc_6562B9
call	sub_64A430

loc_6562B9:
mov	[edi+0F8h], esi
test	esi, esi
jz	short loc_6562D3
mov	ecx, esi
call	sub_64A430
mov	eax, [edi+0F8h]
pop	esi
pop	edi
retn

loc_6562D3:
mov	eax, esi
pop	esi
pop	edi
retn

loc_6562D8:
mov	eax, [edi+0F8h]
pop	edi
retn
sub_656280 endp




sub_6562E0 proc	near
fld	ds:dword_1577A70
push	esi
mov	esi, ecx
fst	dword ptr [esi+0Ch]
mov	dword ptr [esi+8], 0
fstp	dword ptr [esi+10h]
mov	dword ptr [esi+14h], 1
fldz
lea	ecx, [esi+2Ch]
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+1Ch]
fld1
fstp	dword ptr [esi+28h]
call	sub_68CFB0
mov	eax, esi
pop	esi
retn
sub_6562E0 endp

align 10h



sub_656320 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6552F0
test	[esp+4+arg_0], 1
jz	short loc_65633D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_65633D:
mov	eax, esi
pop	esi
retn	4
sub_656320 endp

align 10h



; int __stdcall	sub_656350(float)
sub_656350 proc	near

var_9C=	dword ptr -9Ch
var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7C=	byte ptr -7Ch
var_40=	byte ptr -40h
var_3C=	byte ptr -3Ch
arg_0= dword ptr  4

sub	esp, 88h
push	ebx
push	ebp
push	esi
mov	esi, ecx
xor	ebx, ebx
mov	[esp+94h+var_84], ebx
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
fld	[esp+94h+arg_0]
fld	dword ptr [esi+68h]
mov	ebp, eax
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_65639C
test	ebp, ebp
jz	short loc_65639C
lea	eax, [esp+94h+var_84]
push	eax
lea	ecx, [ebp+8]
mov	ebx, 1
call	sub_655250
cmp	dword ptr [eax], 0
mov	[esp+94h+var_85], bl
jnz	short loc_6563A1

loc_65639C:
mov	[esp+94h+var_85], 0

loc_6563A1:
test	bl, 1
jz	short loc_6563B3
mov	ecx, [esp+94h+var_84]
test	ecx, ecx
jz	short loc_6563B3
call	sub_64A430

loc_6563B3:
cmp	[esp+94h+var_85], 0
jz	loc_656446
fld	[esp+94h+arg_0]
push	edi
lea	ecx, [esp+98h+var_40] ;	void *
fstp	dword ptr [esi+68h]
call	sub_64F7C0
lea	ecx, [esp+98h+var_80] ;	void *
call	sub_64F7C0
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
lea	ecx, [ebp+8]
push	1
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_656452
mov	edi, [ebx+0Ch]
test	edi, edi
jz	short loc_6563FC
mov	ecx, edi
call	sub_64A420

loc_6563FC:
mov	ecx, ebx
call	sub_64A430

loc_656403:
fld	dword ptr [esi+68h]
mov	edx, [edi]
mov	edx, [edx+60h]
push	0
push	ecx
fstp	[esp+9Ch+var_9C]
lea	eax, [esp+9Ch+var_7C]
push	eax
lea	ecx, [esp+0A0h+var_3C]
push	ecx
add	ebp, 90h
push	ebp
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A430
lea	eax, [esp+98h+var_80]
push	eax
mov	ecx, esi
call	sub_64A730
lea	ecx, [esp+98h+var_40]
push	ecx
mov	ecx, esi
call	sub_64A750
pop	edi

loc_656446:
pop	esi
pop	ebp
pop	ebx
add	esp, 88h
retn	4

loc_656452:
xor	edi, edi
jmp	short loc_656403
sub_656350 endp

align 10h



sub_656460 proc	near
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	ecx, eax
jmp	sub_656280
sub_656460 endp

align 10h



sub_656470 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 15h
push	edi
mov	edi, [esp+8+arg_0]
test	al, 1
jz	short loc_656497
push	esi
mov	ecx, edi
call	sub_69A810
and	dword ptr [esi+0A0h], 0FFDFFFFFh

loc_656497:
push	edi
mov	ecx, esi
call	sub_655B00
mov	eax, [esi+84h]
xor	ecx, ecx
cmp	eax, ecx
jz	short loc_6564B7
mov	edx, [esi+88h]
mov	[eax+88h], edx

loc_6564B7:
mov	eax, [esi+88h]
cmp	eax, ecx
jz	short loc_6564CF
mov	edx, [esi+84h]
mov	[eax+84h], edx
jmp	short loc_6564E3

loc_6564CF:
cmp	[edi+2804h], esi
jnz	short loc_6564E3
mov	eax, [esi+84h]
mov	[edi+2804h], eax

loc_6564E3:
mov	[esi+88h], ecx
mov	[esi+84h], ecx
or	dword ptr [edi+2474h], 400h
pop	edi
pop	esi
retn	4
sub_656470 endp

align 10h



sub_656500 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi+98h]
test	ecx, ecx
jz	short loc_656517
pop	esi
add	esp, 4
jmp	sub_655D70

loc_656517:
mov	ecx, dword_1855FC0
lea	eax, [esp+8+var_4]
push	eax
mov	[esp+0Ch+var_4], 143h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	58h
push	esi
call	edx
test	eax, eax
jz	short loc_65654F
mov	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, eax
call	sub_655D70
mov	[esi+98h], eax
pop	esi
pop	ecx
retn	4

loc_65654F:
xor	eax, eax
mov	[esi+98h], eax
pop	esi
pop	ecx
retn	4
sub_656500 endp

align 10h



sub_656560 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	qword ptr -40h
var_38=	byte ptr -38h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8

sub	esp, 58h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+98h], 0
jnz	short loc_6565C0
lea	ecx, [esp+5Ch+var_38]
call	sub_64E8E0
fldz
fst	[esp+5Ch+var_40]
lea	eax, [esp+5Ch+var_58]
fld	ds:dbl_15FCBF8
push	eax
fst	[esp+60h+var_48]
mov	ecx, esi
fst	[esp+60h+var_50]
mov	[esp+60h+var_54], 0
fstp	[esp+60h+var_18]
mov	[esp+60h+var_58], 0
fst	[esp+60h+var_8]
fst	[esp+60h+var_10]
fstp	[esp+60h+var_20]
call	sub_655C40
push	eax
mov	ecx, esi
call	sub_656500

loc_6565C0:
pop	esi
add	esp, 58h
retn
sub_656560 endp

align 10h



sub_6565D0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
push	edi
mov	esi, ecx
test	bl, bl
jnz	short loc_6565E2
call	sub_656560

loc_6565E2:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	edi, eax
test	bl, bl
jz	short loc_6565FD
or	dword ptr [esi+0A0h], 1000h
jmp	short loc_656607

loc_6565FD:
and	dword ptr [esi+0A0h], 0FFFFEFFFh

loc_656607:
mov	eax, [edi+2474h]
shr	eax, 15h
test	al, 1
jz	short loc_656620
or	dword ptr [esi+0A0h], 100000h
jmp	short loc_65662A

loc_656620:
and	dword ptr [esi+0A0h], 0FFEFFFFFh

loc_65662A:
mov	ecx, [edi+2474h]
shr	ecx, 15h
test	cl, 1
jz	short loc_65665A
test	bl, bl
jz	short loc_65665A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+98h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi+98h], 0

loc_65665A:
or	dword ptr [edi+2474h], 400h
pop	edi
pop	esi
pop	ebx
retn	4
sub_6565D0 endp

align 10h



sub_656670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6566C4
mov	edx, [edi]
sub	eax, esi
lea	ecx, [eax+esi]
shl	ecx, 4
push	ebx
lea	ebx, [ecx+edx-10h]
test	eax, eax
jbe	short loc_6566A5
push	ebp
mov	ebp, eax

loc_656695:
mov	ecx, ebx
call	sub_652830
sub	ebx, 10h
sub	ebp, 1
jnz	short loc_656695
pop	ebp

loc_6566A5:
mov	eax, [edi+8]
shr	eax, 1
pop	ebx
cmp	esi, eax
jnb	short loc_6566DB
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_655FF0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6566C4:
cmp	esi, [edi+8]
jb	short loc_6566DB
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_655FF0

loc_6566DB:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_656670 endp

align 10h



sub_6566F0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	cl, [edx]
mov	[eax], cl
movzx	ecx, word ptr [edx+2]
mov	[eax+2], cx
movzx	ecx, word ptr [edx+4]
mov	[eax+4], cx
mov	ecx, [edx+8]
mov	[eax+8], ecx
push	esi
fld	dword ptr [edx+0Ch]
push	edi
fstp	dword ptr [eax+0Ch]
lea	esi, [edx+2Ch]
fld	dword ptr [edx+10h]
lea	edi, [eax+2Ch]
fstp	dword ptr [eax+10h]
mov	ecx, [edx+14h]
mov	[eax+14h], ecx
fld	dword ptr [edx+1Ch]
fstp	[esp+8+arg_0]
fld	dword ptr [edx+18h]
fstp	dword ptr [eax+18h]
fld	[esp+8+arg_0]
fstp	dword ptr [eax+1Ch]
mov	ecx, [edx+20h]
mov	[eax+20h], ecx
mov	ecx, [edx+24h]
mov	[eax+24h], ecx
fld	dword ptr [edx+28h]
fstp	dword ptr [eax+28h]
mov	ecx, 8
rep movsd
lea	esi, [edx+4Ch]
lea	edi, [eax+4Ch]
mov	ecx, 14h
rep movsd
pop	edi
pop	esi
retn	4
sub_6566F0 endp

align 10h



sub_656770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	eax
mov	esi, ecx
call	sub_657530
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*2]
lea	esi, [ecx+edx*4+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_6567BA
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	al, [ecx+4]
mov	[esi+8], al
pop	esi
pop	ebx
retn	0Ch

loc_6567BA:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax

loc_6567C1:
inc	edi
and	edi, ebp
lea	edx, [edi+edi*2]
cmp	[ecx+edx*4+8], ebx
jnz	short loc_6567C1
lea	edx, [edi+edi*2]
lea	ebx, [ecx+edx*4+8]
mov	edx, [esi+4]
mov	edx, [edx+0Ch]
and	edx, ebp
cmp	edx, eax
jnz	short loc_656821
test	ebx, ebx
jz	short loc_6567F7
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	al, [esi+8]
mov	[ebx+8], al

loc_6567F7:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [ebp+0]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65680F
call	sub_650DF0

loc_65680F:
mov	[esi+4], ebx
mov	cl, [ebp+4]
mov	[esi+8], cl
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_656821:
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jz	short loc_65683F
mov	edi, edi

loc_656830:
mov	edx, [edx]
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jnz	short loc_656830

loc_65683F:
test	ebx, ebx
jz	short loc_656856
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	al, [esi+8]
mov	[ebx+8], al

loc_656856:
mov	ebx, [esp+10h+arg_4]
mov	[edx], edi
mov	edi, [ebx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65686F
call	sub_650DF0

loc_65686F:
mov	[esi+4], edi
mov	cl, [ebx+4]
pop	edi
mov	[esi+8], cl
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_656770 endp

align 10h



sub_656890 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [ecx]
push	edi
mov	edi, [esp+8+arg_4]
lea	ecx, [edi+edi*8]
cmp	dword ptr [ebx+ecx*4+8], 0FFFFFFFEh
lea	ecx, [ebx+ecx*4+8]
mov	eax, edi
jz	short loc_6568EE
cmp	[ecx+4], edi
jnz	short loc_6568EE
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi

loc_6568B3:
cmp	[ecx+4], edi
jnz	short loc_6568D4
mov	esi, [ebp+0]
mov	edx, [ecx+8]
cmp	edx, [esi]
jnz	short loc_6568D4
test	edx, 20000h
jz	short loc_6568E7
mov	dx, [ecx+10h]
cmp	dx, [esi+8]
jz	short loc_6568E7

loc_6568D4:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6568E4
lea	ecx, [eax+eax*8]
lea	ecx, [ebx+ecx*4+8]
jmp	short loc_6568B3

loc_6568E4:
or	eax, 0FFFFFFFFh

loc_6568E7:
pop	esi
pop	ebp
pop	edi
pop	ebx
retn	8

loc_6568EE:
pop	edi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_656890 endp

align 10h



sub_656900 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [ecx+23E4h]
mov	[eax], edx
movzx	edx, byte ptr [ecx+23E8h]
mov	[eax+4], dl
movzx	edx, byte ptr [ecx+23E9h]
mov	[eax+5], dl
fld	dword ptr [ecx+23F0h]
fstp	[esp+arg_0]
fld	dword ptr [ecx+23ECh]
fstp	dword ptr [eax+8]
fld	[esp+arg_0]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+23F8h]
fstp	[esp+arg_0]
fld	dword ptr [ecx+23F4h]
fstp	dword ptr [eax+10h]
fld	[esp+arg_0]
fstp	dword ptr [eax+14h]
fld	dword ptr [ecx+2400h]
fstp	[esp+arg_0]
fld	dword ptr [ecx+23FCh]
fstp	dword ptr [eax+18h]
fld	[esp+arg_0]
fstp	dword ptr [eax+1Ch]
retn	4
sub_656900 endp

align 10h



sub_656980 proc	near

arg_0= dword ptr  4

mov	eax, ecx
push	ebx
mov	ebx, [esp+4+arg_0]
mov	cl, [ebx]
mov	[eax], cl
mov	dx, [ebx+2]
mov	[eax+2], dx
mov	cx, [ebx+4]
mov	[eax+4], cx
mov	edx, [ebx+8]
mov	[eax+8], edx
fld	dword ptr [ebx+0Ch]
fstp	dword ptr [eax+0Ch]
push	esi
fld	dword ptr [ebx+10h]
push	edi
fstp	dword ptr [eax+10h]
mov	ecx, [ebx+14h]
mov	[eax+14h], ecx
fld	dword ptr [ebx+1Ch]
fstp	[esp+0Ch+arg_0]
lea	esi, [ebx+2Ch]
fld	dword ptr [ebx+18h]
lea	edi, [eax+2Ch]
fstp	dword ptr [eax+18h]
fld	[esp+0Ch+arg_0]
fstp	dword ptr [eax+1Ch]
mov	edx, [ebx+20h]
mov	[eax+20h], edx
mov	ecx, [ebx+24h]
mov	[eax+24h], ecx
fld	dword ptr [ebx+28h]
mov	ecx, 8
fstp	dword ptr [eax+28h]
rep movsd
lea	edx, [ebx+54h]
lea	ecx, [eax+4Ch]
sub	ebx, eax
mov	esi, 2

loc_6569F5:
fld	dword ptr [ecx+ebx]
add	ecx, 28h
fstp	dword ptr [ecx-28h]
add	edx, 28h
sub	esi, 1
fld	dword ptr [edx-2Ch]
fstp	dword ptr [ecx-24h]
fld	dword ptr [edx-28h]
fstp	dword ptr [ecx-20h]
fld	dword ptr [edx-24h]
fstp	dword ptr [ecx-1Ch]
fld	dword ptr [edx-20h]
fstp	dword ptr [ecx-18h]
fld	dword ptr [edx-1Ch]
fstp	dword ptr [ecx-14h]
fld	dword ptr [edx-18h]
fstp	dword ptr [ecx-10h]
fld	dword ptr [edx-14h]
fstp	dword ptr [ecx-0Ch]
fld	dword ptr [edx-10h]
fstp	dword ptr [ecx-8]
fld	dword ptr [edx-0Ch]
fstp	dword ptr [ecx-4]
jnz	short loc_6569F5
pop	edi
pop	esi
pop	ebx
retn	4
sub_656980 endp

align 10h



sub_656A50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
fldz
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	dword ptr [esi], offset	off_155F500
push	edi
xor	edi, edi
mov	dword ptr [esi+4], 1
mov	[esi+8], edi
mov	dword ptr [esi+0Ch], offset off_143F300
mov	dword ptr [esi], offset	off_1432130
mov	dword ptr [esi+0Ch], offset off_14321F4
mov	[esi+10h], eax
fstp	dword ptr [esi+1Ch]
mov	[esi+20h], ecx
lea	ecx, [esi+24h]
mov	dword ptr [esi+14h], 0FFFFFFFFh
mov	[esi+18h], edi
call	sub_68CFB0
lea	ecx, [esi+44h]
call	sub_64E8E0
fldz
xor	eax, eax
fstp	dword ptr [esi+68h]
mov	[esi+5Ch], edi
mov	[esi+60h], edi
mov	[esi+64h], edi
xor	edx, edx
mov	[esi+76h], ax
pop	edi
mov	[esi+74h], dx
mov	eax, esi
pop	esi
retn	8
sub_656A50 endp

align 10h



sub_656AD0 proc	near
push	esi
mov	esi, ecx
mov	edx, [esi]
mov	eax, 100h
or	[esi+76h], ax
mov	eax, [edx+54h]
push	edi
call	eax
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_656470
cmp	[edi+23E4h], esi
jnz	short loc_656B00
mov	dword ptr [edi+23E4h], 0

loc_656B00:
mov	ecx, esi
call	sub_655930
push	esi
mov	ecx, edi
call	sub_694B00
mov	esi, [esi+94h]
test	esi, esi
jz	short loc_656B20
mov	dword ptr [esi+4], 0

loc_656B20:
pop	edi
pop	esi
retn
sub_656AD0 endp

align 10h



sub_656B30 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
push	eax
mov	ecx, esi
call	sub_656470
mov	al, 1
pop	esi
retn
sub_656B30 endp

align 10h



sub_656B50 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	qword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_7B=	byte ptr -7Bh
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h

sub	esp, 0A4h
fldz
push	esi
fst	[esp+0A8h+var_74]
mov	esi, ecx
mov	eax, [esi]
fst	[esp+0A8h+var_78]
mov	edx, [eax+54h]
fst	[esp+0A8h+var_6C]
fst	[esp+0A8h+var_70]
push	edi
fst	[esp+0ACh+var_64]
mov	[esp+0ACh+var_80], 0
fstp	[esp+0ACh+var_68]
mov	[esp+0ACh+var_7C], 0
mov	[esp+0ACh+var_7B], 0
call	edx
mov	edi, eax
lea	eax, [esp+0ACh+var_80]
push	eax
mov	ecx, edi
call	sub_656900
cmp	esi, [esp+0ACh+var_80]
jnz	loc_656DFF
fld	dword ptr [edi+948h]
lea	ecx, [esp+0ACh+var_58]
fstp	[esp+0ACh+var_60]
fld	dword ptr [edi+94Ch]
fstp	[esp+0ACh+var_5C]
call	sub_64E8E0
mov	edi, [esi+20h]
test	edi, edi
jz	loc_656C50
lea	ecx, [esp+0ACh+var_98]
call	sub_64E8E0
mov	ecx, [edi+20h]
test	ecx, ecx
jz	short loc_656BF6
lea	edx, [esp+0ACh+var_98]
push	edx
call	sub_654AF0
add	edi, 44h
push	edi
lea	ecx, [esp+0B0h+var_98]
call	sub_64EAF0
jmp	short loc_656C20

loc_656BF6:
fld	dword ptr [edi+44h]
fstp	dword ptr [esp+0ACh+var_98]
fld	dword ptr [edi+48h]
fstp	dword ptr [esp+0ACh+var_98+4]
fld	dword ptr [edi+4Ch]
fstp	[esp+0ACh+var_90]
fld	dword ptr [edi+50h]
fstp	[esp+0ACh+var_8C]
fld	dword ptr [edi+54h]
fstp	[esp+0ACh+var_88]
fld	dword ptr [edi+58h]
fstp	[esp+0ACh+var_84]

loc_656C20:
fld	dword ptr [esp+0ACh+var_98]
fstp	[esp+0ACh+var_58]
fld	dword ptr [esp+0ACh+var_98+4]
fstp	[esp+0ACh+var_54]
fld	[esp+0ACh+var_90]
fstp	[esp+0ACh+var_50]
fld	[esp+0ACh+var_8C]
fstp	[esp+0ACh+var_4C]
fld	[esp+0ACh+var_88]
fstp	[esp+0ACh+var_48]
fld	[esp+0ACh+var_84]
fstp	[esp+0ACh+var_44]

loc_656C50:
lea	eax, [esp+0ACh+var_60]
push	eax
lea	ecx, [esp+0B0h+var_A4]
push	ecx
lea	ecx, [esp+0B4h+var_58]
call	sub_64EC70
cmp	dword ptr [esi+5Ch], 0
jnz	short loc_656C83
mov	ecx, [esi+20h]
test	ecx, ecx
jz	loc_656D07
push	1
call	sub_654BF0
test	al, al
jz	loc_656D07

loc_656C83:
push	ebp
push	1
mov	ecx, esi
call	sub_654D00
push	1
mov	ecx, esi
mov	edi, eax
call	sub_654D50
mov	ebp, eax
test	edi, edi
jz	short loc_656CAD
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E0h], edi

loc_656CAD:
test	ebp, ebp
jz	short loc_656CC0
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E4h], ebp

loc_656CC0:
mov	edi, [esi+20h]
lea	ecx, [esp+0B0h+var_40] ; void *
call	sub_64F7C0
lea	ecx, [esp+0B0h+var_40]
push	ecx
mov	ecx, edi
call	sub_654C80
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
lea	ecx, [esp+0B0h+var_40]
mov	[eax+0E8h], ecx
mov	eax, [esi]
lea	edx, [esp+0B0h+var_A4]
push	edx
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
pop	ebp

loc_656D07:
cmp	[esp+0ACh+var_7B], 0
fld	[esp+0ACh+var_68]
fadd	[esp+0ACh+var_A4]
fstp	[esp+0ACh+var_A4]
fld	[esp+0ACh+var_64]
fadd	[esp+0ACh+var_A0]
fstp	[esp+0ACh+var_A0]
jz	short loc_656D92
fld	[esp+0ACh+var_A4]
fld	[esp+0ACh+var_70]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_656D3B
fstp	st
jmp	short loc_656D3D

loc_656D3B:
fstp	st(1)

loc_656D3D:
fstp	[esp+0ACh+var_9C]
fld	[esp+0ACh+var_9C]
fld	[esp+0ACh+var_78]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_656D56
fstp	st(1)
jmp	short loc_656D58

loc_656D56:
fstp	st

loc_656D58:
fstp	[esp+0ACh+var_A4]
fld	[esp+0ACh+var_A0]
fld	[esp+0ACh+var_6C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_656D71
fstp	st
jmp	short loc_656D73

loc_656D71:
fstp	st(1)

loc_656D73:
fstp	[esp+0ACh+var_9C]
fld	[esp+0ACh+var_9C]
fld	[esp+0ACh+var_74]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_656D8C
fstp	st(1)
jmp	short loc_656D8E

loc_656D8C:
fstp	st

loc_656D8E:
fstp	[esp+0ACh+var_A0]

loc_656D92:
mov	eax, [esi]
mov	edx, [eax+20h]
push	0
mov	ecx, esi
call	edx
fld	[esp+0ACh+var_A4]
fdiv	ds:dbl_15FCE20
mov	eax, [esi]
mov	edx, [eax+11Ch]
push	0
lea	ecx, [esp+0B0h+var_98]
push	ecx
push	0
mov	ecx, esi
mov	byte ptr [esp+0B8h+var_98], 3
fstp	[esp+0B8h+var_98+4]
call	edx
lea	ecx, [esp+0ACh+var_98]
call	sub_652830
fld	[esp+0ACh+var_A0]
fdiv	ds:dbl_15FCE20
mov	eax, [esi]
mov	edx, [eax+11Ch]
push	0
lea	ecx, [esp+0B0h+var_98]
push	ecx
push	1
mov	ecx, esi
mov	byte ptr [esp+0B8h+var_98], 3
fstp	[esp+0B8h+var_98+4]
call	edx
lea	ecx, [esp+0ACh+var_98]
call	sub_652830

loc_656DFF:
pop	edi
pop	esi
add	esp, 0A4h
retn
sub_656B50 endp

align 10h



sub_656E10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+94h]
mov	ebx, ecx
test	eax, eax
jz	short loc_656E24
inc	dword ptr [eax]

loc_656E24:
push	esi
mov	esi, [ebx+94h]
push	edi
or	edi, 0FFFFFFFFh
test	esi, esi
jz	short loc_656E6F
add	[esi], edi
cmp	dword ptr [esi], 0
jg	short loc_656E6F
mov	ecx, [esi+10h]
add	[ecx+8], edi
jnz	short loc_656E47
call	sub_650DF0

loc_656E47:
mov	ecx, [esi+0Ch]
add	[ecx+8], edi
jnz	short loc_656E54
call	sub_650DF0

loc_656E54:
mov	ecx, [esi+8]
add	[ecx+8], edi
jnz	short loc_656E61
call	sub_650DF0

loc_656E61:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_656E6F:
mov	eax, [ebp+94h]
mov	[ebx+94h], eax
mov	esi, [ebp+94h]
test	esi, esi
jz	short loc_656EC1
add	[esi], edi
cmp	dword ptr [esi], 0
jg	short loc_656EC1
mov	ecx, [esi+10h]
add	[ecx+8], edi
jnz	short loc_656E99
call	sub_650DF0

loc_656E99:
mov	ecx, [esi+0Ch]
add	[ecx+8], edi
jnz	short loc_656EA6
call	sub_650DF0

loc_656EA6:
mov	ecx, [esi+8]
add	[ecx+8], edi
jnz	short loc_656EB3
call	sub_650DF0

loc_656EB3:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_656EC1:
mov	dword ptr [ebp+94h], 0
mov	eax, [ebx+94h]
pop	edi
pop	esi
test	eax, eax
jz	short loc_656EDA
mov	[eax+4], ebx

loc_656EDA:
pop	ebp
pop	ebx
retn	4
sub_656E10 endp

align 10h



sub_656EE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
push	esi
push	ecx
mov	esi, ecx
mov	ecx, [esp+8+arg_8]
mov	eax, esp
mov	[eax], ecx
push	edx
mov	ecx, esi
call	sub_656A50
mov	eax, [esp+4+arg_0]
mov	[esi+78h], eax
mov	dword ptr [esi], offset	off_1432200
mov	dword ptr [esi+0Ch], offset off_14321F4
mov	eax, esi
pop	esi
retn	0Ch
sub_656EE0 endp

align 10h



sub_656F20 proc	near
mov	eax, [ecx+78h]
retn
sub_656F20 endp

align 10h



sub_656F30 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+78h]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	eax
mov	eax, [esp+4+arg_0]
push	eax
call	edx
retn	4
sub_656F30 endp

align 10h



sub_656F50 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx+78h]
mov	eax, [ecx]
mov	eax, [eax+18h]
sub	esp, 10h
push	esi
lea	edx, [esp+14h+var_10]
push	edx
call	eax
fldz
mov	esi, [esp+14h+arg_0]
fst	dword ptr [esi]
mov	ecx, [esp+14h+arg_4]
fst	dword ptr [esi+4]
push	eax
fst	dword ptr [esi+8]
push	esi
fstp	dword ptr [esi+0Ch]
call	sub_64EF10
mov	eax, esi
pop	esi
add	esp, 10h
retn	8
sub_656F50 endp

align 10h



sub_656F90 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx+78h]
mov	eax, [ecx]
mov	eax, [eax+1Ch]
sub	esp, 10h
push	esi
lea	edx, [esp+14h+var_10]
push	edx
call	eax
fldz
mov	esi, [esp+14h+arg_0]
fst	dword ptr [esi]
mov	ecx, [esp+14h+arg_4]
fst	dword ptr [esi+4]
push	eax
fst	dword ptr [esi+8]
push	esi
fstp	dword ptr [esi+0Ch]
call	sub_64EF10
mov	eax, esi
pop	esi
add	esp, 10h
retn	8
sub_656F90 endp

align 10h



sub_656FD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	edi
mov	edi, [esp+4+arg_4]
test	edi, edi
jbe	short loc_657030
fld	ds:dword_1577A70
push	esi
mov	esi, [esp+8+arg_0]
fldz
add	esi, 0Ch

loc_656FE9:
lea	eax, [esi-0Ch]
test	eax, eax
jz	short loc_657020
fxch	st(1)
mov	dword ptr [esi-4], 0
fst	dword ptr [esi]
mov	dword ptr [esi+8], 1
fstp	dword ptr [esi+4]
lea	ecx, [esi+20h]
fst	dword ptr [esi+0Ch]
fstp	dword ptr [esi+10h]
fld1
fstp	dword ptr [esi+1Ch]
call	sub_68CFB0
fld	ds:dword_1577A70
fldz

loc_657020:
add	esi, 9Ch
sub	edi, 1
jnz	short loc_656FE9
fstp	st(1)
pop	esi
fstp	st

loc_657030:
pop	edi
retn
sub_656FD0 endp

align 10h



sub_657040 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_657070
mov	eax, [edi]
test	eax, eax
jz	short loc_657065
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_657065:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_657070:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6570A4
mov	edx, [ecx]
push	ebx
mov	ebx, esi
imul	ebx, 9Ch
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6570A4:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
imul	eax, 9Ch
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_657040 endp

align 10h



sub_6570D0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
test	edx, edx
jnz	short loc_6570E8
mov	edx, [esp+arg_0]
xor	ecx, ecx
xor	eax, eax
mov	[edx+4], eax
mov	[edx], ecx
mov	eax, edx
retn	4

loc_6570E8:
push	esi
mov	esi, [edx+4]
xor	eax, eax
add	edx, 8

loc_6570F1:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_6570FE
inc	eax
add	edx, 24h
cmp	eax, esi
jbe	short loc_6570F1

loc_6570FE:
mov	edx, [esp+4+arg_0]
mov	[edx+4], eax
pop	esi
mov	[edx], ecx
mov	eax, edx
retn	4
sub_6570D0 endp

align 10h



sub_657110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
test	ebx, ebx
jbe	short loc_657141
push	edi
mov	edi, [esp+0Ch+arg_8]

loc_657123:
test	esi, esi
jz	short loc_65712F
push	edi
mov	ecx, esi
call	sub_6566F0

loc_65712F:
add	edi, 9Ch
add	esi, 9Ch
sub	ebx, 1
jnz	short loc_657123
pop	edi

loc_657141:
pop	esi
pop	ebx
retn
sub_657110 endp

align 10h



sub_657150 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_6571FC
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [edi+0F4h]
lea	esp, [esp+0]

loc_657170:
cmp	dword ptr [esi+208h], 50h
jb	short loc_6571B4
mov	eax, [esi+204h]
lea	edx, [eax+4Fh]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_6571AA
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_6571CD

loc_6571AA:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_6571CD

loc_6571B4:
mov	ecx, [esi]
push	0
push	4
push	50h
test	ecx, ecx
jnz	short loc_6571C6
mov	ecx, dword_1855FC0

loc_6571C6:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_6571CD:
test	eax, eax
jz	short loc_6571DF
mov	ecx, [ebp+0]
push	ecx
push	edi
mov	ecx, eax
call	sub_6A2B30
jmp	short loc_6571E1

loc_6571DF:
xor	eax, eax

loc_6571E1:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_657170
pop	esi
pop	ebp

loc_6571FC:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_657150 endp

align 10h



sub_657210 proc	near

arg_0= dword ptr  4

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
retn	0Ch
sub_657210 endp

align 10h



sub_657230 proc	near
push	esi
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+2Ch]
mov	eax, [eax+30h]
push	edx
call	eax
mov	esi, [edi+10h]
test	esi, esi
jz	short loc_65726B
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_65726B
test	esi, esi
jz	short loc_65726B
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_65726B:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
retn
sub_657230 endp

align 10h



sub_657280 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jnb	short loc_6572A7
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_6572BC
push	edi
push	esi
call	sub_747320
mov	[esi+4], edi
pop	edi
pop	esi
retn	4

loc_6572A7:
cmp	edi, [esi+8]
jb	short loc_6572BC
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
mov	ecx, esi
push	esi
call	sub_747320

loc_6572BC:
mov	[esi+4], edi
pop	edi
pop	esi
retn	4
sub_657280 endp

align 10h



sub_6572D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_6572FD
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_657314
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, esi
call	sub_657040
mov	[esi+4], edi
pop	edi
pop	esi
retn	8

loc_6572FD:
cmp	edi, [esi+8]
jb	short loc_657314
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_657040

loc_657314:
mov	[esi+4], edi
pop	edi
pop	esi
retn	8
sub_6572D0 endp

align 10h



sub_657320 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_657342
call	sub_693EA0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_657342:
push	esi
cmp	eax, 8
jnb	short loc_65734F
mov	esi, 8
jmp	short loc_6573B4

loc_65734F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_657362
fadd	ds:flt_15FCC08

loc_657362:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6573B4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_657414
xor	eax, eax
jmp	short loc_657400
align 10h

loc_657400:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_657400

loc_657414:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_657481
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_657427

loc_657423:
mov	edi, [esp+1Ch+var_C]

loc_657427:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_657460
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_656770
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65745A
call	sub_650DF0

loc_65745A:
mov	dword ptr [edi], 0FFFFFFFEh

loc_657460:
add	ebx, 0Ch
sub	ebp, 1
jnz	short loc_657423
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_657481:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_693EA0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_657320 endp

align 10h



; int __cdecl sub_6574B0(int, char *, int)
sub_6574B0 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	esi
mov	esi, [esp+308h+arg_4]
push	edi
mov	edi, [esp+30Ch+arg_8]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+310h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+310h+var_304]
call	sub_657150
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4090
mov	esi, [esp+30Ch+var_2F8]
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+30Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_6574B0 endp

align 10h



sub_657530 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
test	eax, eax
jnz	short loc_657545
mov	eax, [esp+arg_0]
push	8
push	eax
call	sub_657320
retn	4

loc_657545:
mov	edx, [eax+4]
push	esi
lea	esi, ds:4[edx*4]
mov	edx, [eax]
lea	edx, [edx+edx*4]
cmp	edx, esi
pop	esi
jbe	short locret_65756C
mov	eax, [eax+4]
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_657320

locret_65756C:
retn	4
sub_657530 endp

align 10h



sub_657570 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [ebp+4]
mov	esi, ecx
mov	ebx, [esi+4]
push	edi
push	esi
call	sub_656670
cmp	edi, ebx
jbe	short loc_6575A5
mov	eax, ebx
shl	eax, 4
add	eax, [esi]
sub	edi, ebx
jz	short loc_6575A5

loc_657596:
test	eax, eax
jz	short loc_65759D
mov	byte ptr [eax],	0

loc_65759D:
add	eax, 10h
sub	edi, 1
jnz	short loc_657596

loc_6575A5:
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_6575C8
xor	edi, edi
mov	edi, edi

loc_6575B0:
mov	eax, [ebp+0]
mov	ecx, [esi]
add	eax, edi
push	eax
add	ecx, edi
call	sub_652520
inc	ebx
add	edi, 10h
cmp	ebx, [esi+4]
jb	short loc_6575B0

loc_6575C8:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_657570 endp

align 10h



sub_6575E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6575F3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_657615

loc_6575F3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_65761A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_657615:
call	sub_657320

loc_65761A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*2]
lea	esi, [ecx+edx*4+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_65765A
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	eax, [eax]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	ecx, [ecx+4]
mov	dl, [ecx]
mov	[esi+8], dl
pop	esi
pop	ebx
retn	0Ch

loc_65765A:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax

loc_657661:
inc	edi
and	edi, ebp
lea	edx, [edi+edi*2]
cmp	[ecx+edx*4+8], ebx
jnz	short loc_657661
lea	edx, [edi+edi*2]
lea	ebx, [ecx+edx*4+8]
mov	edx, [esi+4]
mov	edx, [edx+0Ch]
and	edx, ebp
cmp	edx, eax
jnz	short loc_6576C5
test	ebx, ebx
jz	short loc_657697
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	al, [esi+8]
mov	[ebx+8], al

loc_657697:
mov	ebp, [esp+10h+arg_4]
mov	ecx, [ebp+0]
mov	ebx, [ecx]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6576B1
call	sub_650DF0

loc_6576B1:
mov	[esi+4], ebx
mov	edx, [ebp+4]
mov	al, [edx]
mov	[esi+8], al
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_6576C5:
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jz	short loc_6576E1

loc_6576D2:
mov	edx, [edx]
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jnz	short loc_6576D2

loc_6576E1:
test	ebx, ebx
jz	short loc_6576F8
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	al, [esi+8]
mov	[ebx+8], al

loc_6576F8:
mov	ebx, [esp+10h+arg_4]
mov	[edx], edi
mov	ecx, [ebx]
mov	edi, [ecx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_657713
call	sub_650DF0

loc_657713:
mov	[esi+4], edi
mov	edx, [ebx+4]
mov	al, [edx]
pop	edi
mov	[esi+8], al
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_6575E0 endp

align 10h



sub_657730 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_4]
push	ebp
mov	ebp, [esp+14h+arg_8]
push	esi
mov	esi, ecx
push	edi
push	ebp
mov	ecx, ebx
mov	dword ptr [esi], offset	off_1431764
mov	[esi+4], eax
call	sub_652D70
mov	ecx, [esp+1Ch+arg_C]
mov	edx, [esp+1Ch+arg_10]
mov	[esi+8], eax
lea	edi, [esi+0Ch]
mov	byte ptr [edi+8], 0
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	[esi+18h], ebp
mov	[esi+1Ch], ecx
mov	[esi+20h], edx
mov	al, [ebx]
cmp	al, 8
jz	short loc_657788
cmp	al, 0Bh
jnz	short loc_6577CD

loc_657788:
push	ebp
lea	eax, [esp+20h+var_C]
push	eax
mov	ecx, ebx
call	sub_652DC0
push	eax
mov	ecx, edi
call	sub_67C4C0
test	[esp+1Ch+var_4], 2
jnz	short loc_6577B1
mov	ecx, [esp+1Ch+var_C]
test	ecx, ecx
jz	short loc_6577B1
call	sub_64B3B0

loc_6577B1:
test	[esp+1Ch+var_4], 1
mov	[esp+1Ch+var_C], 0
jnz	short loc_6577CD
mov	ecx, [esp+1Ch+var_8]
test	ecx, ecx
jz	short loc_6577CD
call	sub_64B3B0

loc_6577CD:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	14h
sub_657730 endp

align 10h



sub_6577E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_657840
push	edi
mov	edi, [esp+18h+arg_0]
push	edi
call	sub_6577E0
push	0FFFFFFFFh
push	offset word_155C524
mov	ecx, edi
call	sub_67A0C0
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_657827
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_657827
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]

loc_657827:
add	eax, 8
mov	eax, [eax]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, edi
call	sub_67A0C0
pop	edi
pop	esi
add	esp, 10h
retn	4

loc_657840:
mov	edx, [esi+78h]
mov	eax, [edx+8]
lea	ecx, [esi+78h]
call	eax
cmp	eax, 2
jnz	short loc_657888
mov	ecx, [esi+1BCh]
mov	edx, [esp+14h+arg_0]
lea	eax, [esp+14h+var_10]
push	eax		; int
mov	[esp+18h+var_10], ecx
lea	ecx, [esp+18h+var_C]
push	offset a_level0	; "_level{0}"
push	ecx		; int
mov	[esp+20h+var_C], 0
mov	[esp+20h+var_8], edx
call	sub_6574B0
add	esp, 0Ch
pop	esi
add	esp, 10h
retn	4

loc_657888:
mov	ecx, [esp+14h+arg_0]
call	sub_67A720
pop	esi
add	esp, 10h
retn	4
sub_6577E0 endp

align 10h


; Attributes: bp-based frame

sub_6578A0 proc	near

var_2C8= qword ptr -2C8h
var_298= dword ptr -298h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_288= dword ptr -288h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_240= dword ptr -240h
var_238= dword ptr -238h
var_234= dword ptr -234h
var_220= byte ptr -220h
var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_214= dword ptr -214h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_200= dword ptr -200h
var_1F8= byte ptr -1F8h
var_1E8= byte ptr -1E8h
var_1D0= byte ptr -1D0h
var_1B8= byte ptr -1B8h
var_160= byte ptr -160h
var_108= byte ptr -108h
var_B0=	byte ptr -0B0h
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 2B4h
push	ebx
push	esi
xor	ebx, ebx
push	edi
mov	edi, [ebp+arg_0]
mov	esi, ecx
cmp	[ebp+arg_8], bl
jz	short loc_6578E5
cmp	edi, ebx
jl	short loc_6578C4
cmp	edi, 15h
jle	short loc_6578E5

loc_6578C4:
mov	eax, [esi]
mov	edx, [eax+6Ch]
push	edi
push	offset aInvalidGetprop ; "Invalid GetProperty query, property num"...
call	edx
push	eax
call	sub_66D290
add	esp, 0Ch

loc_6578DA:		; default
xor	al, al		; jumptable 0065790B cases 4,5,12,24,28
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6578E5:
cmp	edi, 0FFFFFFFFh
jz	short loc_6578DA ; default
			; jumptable 0065790B cases 4,5,12,24,28
cmp	edi, 1Fh
jg	short loc_6578DA ; default
			; jumptable 0065790B cases 4,5,12,24,28
mov	eax, [esi]
mov	edx, [eax+118h]
call	edx
mov	edx, 1
mov	ecx, edi
shl	edx, cl
test	edx, eax
jz	short loc_6578DA ; default
			; jumptable 0065790B cases 4,5,12,24,28
cmp	edi, 1Fh	; switch 32 cases
ja	short loc_6578DA ; default
			; jumptable 0065790B cases 4,5,12,24,28
jmp	ds:off_6581D4[edi*4] ; switch jump

loc_657912:		; jumptable 0065790B case 0
lea	ecx, [esp+2C0h+var_B0]
call	sub_64A790
lea	eax, [esp+2C0h+var_B0]
push	eax
mov	ecx, esi
call	sub_655C40
fild	dword ptr [eax]
fdiv	ds:dbl_15FCE20

loc_657935:
sub	esp, 8

loc_657938:
mov	ecx, [ebp+arg_4]
fstp	[esp+2C8h+var_2C8]
call	sub_64A6A0

loc_657943:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65794E:		; jumptable 0065790B case 1
lea	ecx, [esp+2C0h+var_1B8]
call	sub_64A790
lea	ecx, [esp+2C0h+var_1B8]
push	ecx
mov	ecx, esi
call	sub_655C40
fild	dword ptr [eax+4]
mov	ecx, [ebp+arg_4]
sub	esp, 8
fdiv	ds:dbl_15FCE20
fstp	[esp+2C8h+var_2C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65798B:		; jumptable 0065790B case 2
lea	ecx, [esp+2C0h+var_160]
call	sub_64A790
lea	edx, [esp+2C0h+var_160]
push	edx
mov	ecx, esi
call	sub_655C40
fld	qword ptr [eax+8]
mov	ecx, [ebp+arg_4]
sub	esp, 8
fstp	[esp+2C8h+var_2C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6579C2:		; jumptable 0065790B case 3
lea	ecx, [esp+2C0h+var_108]
call	sub_64A790
lea	eax, [esp+2C0h+var_108]
push	eax
mov	ecx, esi
call	sub_655C40
fld	qword ptr [eax+10h]
mov	ecx, [ebp+arg_4]
sub	esp, 8
fstp	[esp+2C8h+var_2C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6579F9:		; jumptable 0065790B case 8
mov	edx, [esi]
mov	edx, [edx+34h]
lea	eax, [esi+44h]
push	eax
lea	ecx, [esp+2C4h+var_208]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+2C0h+var_200]
fsub	[esp+2C0h+var_208]
sub	esp, 8
fstp	[esp+2C8h+var_298]
fld	[esp+2C8h+var_298]
fstp	[esp+2C8h+var_2C8]
call	_floor
fdiv	ds:dbl_15FCE20
mov	ecx, [ebp+arg_4]
fstp	[esp+2C8h+var_2C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657A4B:		; jumptable 0065790B case 9
mov	eax, [esi]
mov	eax, [eax+34h]
lea	ecx, [esi+44h]
push	ecx
lea	edx, [esp+2C4h+var_218]
push	edx
mov	ecx, esi
call	eax
fld	[esp+2C0h+var_20C]
fsub	[esp+2C0h+var_214]
sub	esp, 8
fstp	[esp+2C8h+var_298]
fld	[esp+2C8h+var_298]
fstp	[esp+2C8h+var_2C8]
call	_floor
fdiv	ds:dbl_15FCE20
mov	ecx, [ebp+arg_4]
fstp	[esp+2C8h+var_2C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657A9D:		; jumptable 0065790B case 10
lea	ecx, [esp+2C0h+var_58]
call	sub_64A790
lea	ecx, [esp+2C0h+var_58]
push	ecx
mov	ecx, esi
call	sub_655C40
fld	qword ptr [eax+18h]
mov	ecx, [ebp+arg_4]
sub	esp, 8
fstp	[esp+2C8h+var_2C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657AD4:		; jumptable 0065790B case 6
fld	dword ptr [esi+3Ch]
fmul	ds:dbl_15FCBF8
jmp	loc_657935

loc_657AE2:		; jumptable 0065790B case 7
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
movzx	ecx, al
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657B02:		; jumptable 0065790B case 23
mov	edx, [esi]
mov	eax, [edx+14h]
mov	ecx, esi
call	eax
mov	ecx, off_167D5C8[eax*4]
mov	eax, [esi]
push	ecx
lea	edx, [esp+2C4h+var_280]
push	edx
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	ecx, eax
call	sub_64AB70
mov	ecx, [ebp+arg_4]
push	eax
call	sub_64A680
mov	eax, [esp+2C0h+var_280]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	loc_657943
call	sub_650DF0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657B55:		; jumptable 0065790B case 13
mov	eax, [esi+94h]
cmp	eax, ebx
jnz	short loc_657B76
mov	ecx, esi
call	sub_658B70
cmp	eax, ebx
jnz	short loc_657B76
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]

loc_657B76:
mov	ecx, [ebp+arg_4]
add	eax, 8
push	eax
call	sub_64A680
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657B8D:		; jumptable 0065790B case 26
mov	eax, [esi+0A0h]
shr	eax, 4
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657BAF:		; jumptable 0065790B case 27
mov	edx, [esi+0A0h]
mov	ecx, [ebp+arg_4]
shr	edx, 0Dh
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657BD2:		; jumptable 0065790B case 11
mov	ecx, dword_1855FC0
push	ecx
lea	ecx, [esp+2C4h+var_258]
call	sub_679B40
mov	edx, [esi]
mov	eax, [edx+68h]
push	0
mov	ecx, esi
call	eax
mov	ebx, eax
mov	[esp+2C0h+var_28C], ebx
test	ebx, ebx
jz	short loc_657BFA
inc	dword ptr [ebx+4]

loc_657BFA:
mov	edi, esi
lea	esp, [esp+0]

loc_657C00:
cmp	edi, ebx
jz	short loc_657C54
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_657C25
mov	ecx, edi
call	sub_658B70
test	eax, eax
jnz	short loc_657C25
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
mov	eax, [eax+78h]

loc_657C25:
mov	ecx, [eax+8]
mov	edx, [ecx]
add	eax, 8
push	0FFFFFFFFh
push	0
push	edx
lea	ecx, [esp+2CCh+var_258]
call	sub_679D60
push	0FFFFFFFFh
push	0
push	offset byte_1545BB0
lea	ecx, [esp+2CCh+var_258]
call	sub_679D60
mov	edi, [edi+20h]
test	edi, edi
jnz	short loc_657C00

loc_657C54:
mov	edi, [esp+2C0h+var_258]
mov	ebx, [esp+2C0h+var_254]
test	edi, edi
jnz	short loc_657C65
mov	edi, offset byte_146D660

loc_657C65:
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
mov	ecx, [eax+280h]
push	ebx
push	edi
call	sub_650F20
lea	ecx, [esp+2C0h+var_298]
mov	esi, eax
inc	dword ptr [esi+8]
push	ecx
mov	ecx, [ebp+arg_4]
mov	[esp+2C4h+var_298], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_657CA1
mov	ecx, esi
call	sub_650DF0

loc_657CA1:
mov	ecx, [esp+2C0h+var_28C]
test	ecx, ecx
jz	short loc_657CAE
call	sub_64A400

loc_657CAE:
lea	ecx, [esp+2C0h+var_258]
call	sub_679B60
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657CC2:		; jumptable 0065790B case 22
mov	esi, [esi+20h]
cmp	esi, ebx
jz	short loc_657CDD
mov	ecx, [ebp+arg_4]
push	esi
call	sub_6528F0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657CDD:
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_652060
mov	[esi], bl
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657CF4:		; jumptable 0065790B case 14
mov	edi, [ebp+arg_4]
mov	ecx, edi
call	sub_652060
mov	[edi], bl
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	ecx, eax
call	sub_668010
fld	dword ptr [eax+94Ch]
push	esi
fstp	[esp+2C4h+var_28C]
fld	dword ptr [eax+948h]
push	1
fstp	[esp+2C8h+var_260]
push	ebx
fld	[esp+2CCh+var_28C]
lea	ecx, [esp+2CCh+var_260]
push	ecx
fstp	[esp+2D0h+var_25C]
mov	ecx, eax
call	sub_6907A0
mov	edx, dword_1855FC0
push	edx
lea	ecx, [esp+2C4h+var_238]
mov	edi, eax
call	sub_679B40
cmp	edi, ebx
jz	short loc_657DA8

loc_657D55:
mov	eax, [edi+94h]
cmp	eax, ebx
jnz	short loc_657D76
mov	ecx, edi
call	sub_658B70
cmp	eax, ebx
jnz	short loc_657D76
mov	eax, [edi]
mov	edx, [eax+6Ch]
mov	ecx, edi
call	edx
mov	eax, [eax+78h]

loc_657D76:
add	eax, 8
mov	eax, [eax]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ebx
push	ecx
lea	ecx, [esp+2CCh+var_238]
call	sub_679D60
push	0FFFFFFFFh
push	ebx
push	offset byte_1545BB0
lea	ecx, [esp+2CCh+var_238]
call	sub_679D60
mov	edi, [edi+20h]
cmp	edi, ebx
jnz	short loc_657D55

loc_657DA8:
mov	edi, [esp+2C0h+var_238]
mov	ebx, [esp+2C0h+var_234]
test	edi, edi
jnz	short loc_657DBF
mov	edi, offset byte_146D660

loc_657DBF:
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	ebx
push	edi
call	sub_650F20
mov	ecx, [ebp+arg_4]
mov	esi, eax
inc	dword ptr [esi+8]
lea	edx, [esp+2C0h+var_284]
push	edx
mov	[esp+2C4h+var_284], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_657DFB
mov	ecx, esi
call	sub_650DF0

loc_657DFB:
lea	ecx, [esp+2C0h+var_238]
call	sub_679B60
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657E12:		; jumptable 0065790B case 15
mov	eax, [esi]
mov	edx, [eax+5Ch]
mov	ecx, esi
mov	[esp+2C0h+var_27C], ebx
mov	[esp+2C0h+var_278], ebx
mov	[esp+2C0h+var_274], ebx
call	edx
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+30h]
call	eax
mov	[esp+2C0h+var_284], eax
cmp	eax, ebx
jz	short loc_657E4B
mov	edi, eax
lea	ecx, [edi+1]
lea	ecx, [ecx+0]

loc_657E40:
mov	al, [edi]
inc	edi
test	al, al
jnz	short loc_657E40
sub	edi, ecx
jmp	short loc_657E4D

loc_657E4B:
xor	edi, edi

loc_657E4D:
lea	ecx, [edi+1]
push	ecx
lea	ecx, [esp+2C4h+var_27C]
call	sub_657280
mov	ebx, [esp+2C0h+var_27C]
test	edi, edi
jbe	short loc_657E84
mov	eax, [esp+2C0h+var_284]
mov	edx, ebx
sub	edx, eax
mov	[esp+2C0h+var_298], edi
mov	edi, edi

loc_657E70:
mov	cl, [eax]
cmp	cl, 5Ch
jnz	short loc_657E79
mov	cl, 2Fh

loc_657E79:
mov	[edx+eax], cl
inc	eax
sub	[esp+2C0h+var_298], 1
jnz	short loc_657E70

loc_657E84:
lea	ecx, [esp+2C0h+var_290]
mov	byte ptr [ebx+edi], 0
call	sub_679E30
lea	edx, [esp+2C0h+var_290]
push	edx
push	edi
push	ebx
call	sub_667DE0
mov	eax, [esi]
mov	edx, [eax+6Ch]
add	esp, 0Ch
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
mov	ecx, [eax+280h]
mov	eax, [esp+2C0h+var_290]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	ecx, [ebp+arg_4]
mov	esi, eax
inc	dword ptr [esi+8]
lea	eax, [esp+2C0h+var_294]
push	eax
mov	[esp+2C4h+var_294], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_657EF3
mov	ecx, esi
call	sub_650DF0

loc_657EF3:
lea	ecx, [esp+2C0h+var_290]
call	sub_4E40F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657F15:		; jumptable 0065790B case 16
mov	ecx, [ebp+arg_4]
push	1
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657F2A:		; jumptable 0065790B case 19
mov	edx, [esi]
mov	eax, [edx+6Ch]
push	offset aHigh	; "HIGH"
lea	ecx, [esp+2C4h+var_288]
push	ecx
mov	ecx, esi
call	eax
mov	ecx, eax
call	sub_64AB70
mov	ecx, [ebp+arg_4]
push	eax
call	sub_64A680
mov	eax, [esp+2C0h+var_288]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	loc_657943
call	sub_650DF0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657F71:		; jumptable 0065790B case 17
mov	esi, [esi+0A0h]
and	esi, 180h
jz	short loc_657F9F
cmp	esi, 180h
setz	cl
movzx	edx, cl
mov	ecx, [ebp+arg_4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657F9F:
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_657FB7:		; jumptable 0065790B case 18
fldz
jmp	loc_657935

loc_657FBE:		; jumptable 0065790B case 20
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
fld	dword ptr [eax+94Ch]
add	eax, 948h
fstp	[esp+2C0h+var_294]
fld	dword ptr [eax]
lea	eax, [esp+2C0h+var_1E8]
fstp	[esp+2C0h+var_268]
push	eax
fld	[esp+2C4h+var_294]
mov	ecx, esi
fstp	[esp+2C4h+var_264]
call	sub_6552D0
lea	ecx, [esp+2C0h+var_268]
push	ecx
lea	edx, [esp+2C4h+var_240]
push	edx
lea	ecx, [esp+2C8h+var_1E8]
call	sub_64EC70
fld	[esp+2C0h+var_240]

loc_658013:
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+2C8h+var_2C8]
call	_floor
fdiv	ds:dbl_15FCE20
jmp	loc_657938

loc_65802F:		; jumptable 0065790B case 21
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
fld	dword ptr [eax+94Ch]
add	eax, 948h
fstp	[esp+2C0h+var_294]
fld	dword ptr [eax]
lea	eax, [esp+2C0h+var_1D0]
fstp	[esp+2C0h+var_270]
push	eax
fld	[esp+2C4h+var_294]
mov	ecx, esi
fstp	[esp+2C4h+var_26C]
call	sub_6552D0
lea	ecx, [esp+2C0h+var_270]
push	ecx
lea	edx, [esp+2C4h+var_220]
push	edx
lea	ecx, [esp+2C8h+var_1D0]
call	sub_64EC70
fld	[esp+2C0h+var_21C]
jmp	short loc_658013

loc_658086:		; jumptable 0065790B case 29
mov	esi, [esi+0A0h]
and	esi, 60h
jz	loc_657CDD
cmp	esi, 60h
setz	al
movzx	ecx, al
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6580B2:		; jumptable 0065790B case 30
movsx	edx, word ptr [esi+0A4h]
mov	[esp+2C0h+var_288], edx
fild	[esp+2C0h+var_288]
jmp	loc_657935

loc_6580C6:		; jumptable 0065790B case 31
mov	esi, [esi+0A0h]
and	esi, 600h
jz	loc_6578DA	; default
			; jumptable 0065790B cases 4,5,12,24,28
cmp	esi, 600h
setz	al
movzx	ecx, al
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6580F8:		; jumptable 0065790B case 25
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	edi, eax
mov	ecx, [edi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	50h
mov	[esp+2C8h+var_294], edi
call	eax
cmp	eax, ebx
jz	short loc_65812C
push	edi
mov	ecx, eax
call	sub_65EF40
mov	[esp+2C0h+var_290], eax
jmp	short loc_658130

loc_65812C:
mov	[esp+2C0h+var_290], ebx

loc_658130:
mov	ebx, [esi+0ACh]
test	ebx, ebx
jz	short loc_6581AA
cmp	byte ptr [ebx+0Ch], 0
jz	short loc_6581AA
cmp	byte ptr [ebx+0Dh], 0
mov	eax, [ebx+4]
jz	short loc_65814A
dec	eax

loc_65814A:
test	eax, eax
jbe	short loc_6581AA
xor	esi, esi
mov	[esp+2C0h+var_298], eax

loc_658154:
mov	eax, [ebx]
mov	ecx, [esp+2C0h+var_294]
add	eax, esi
push	eax
push	ecx
call	sub_6A7430
mov	edi, eax
add	esp, 8
test	edi, edi
jz	short loc_65819D
push	edi
lea	ecx, [esp+2C4h+var_1F8]
call	sub_652700
mov	ecx, [esp+2C0h+var_290]
lea	edx, [esp+2C0h+var_1F8]
push	edx
call	sub_65E720
lea	ecx, [esp+2C0h+var_1F8]
call	sub_652830
mov	ecx, edi
call	sub_64B3B0

loc_65819D:
add	esi, 9Ch
sub	[esp+2C0h+var_298], 1
jnz	short loc_658154

loc_6581AA:
mov	esi, [esp+2C0h+var_290]
mov	ecx, [ebp+arg_4]
push	esi
call	sub_652E40
test	esi, esi
jz	loc_657943
mov	ecx, esi
call	sub_64B3B0
pop	edi
pop	esi
mov	al, 1
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6578A0 endp

align 4
off_6581D4 dd offset loc_657912	; jump table for switch	statement
dd offset loc_65794E
dd offset loc_65798B
dd offset loc_6579C2
dd offset loc_6578DA
dd offset loc_6578DA
dd offset loc_657AD4
dd offset loc_657AE2
dd offset loc_6579F9
dd offset loc_657A4B
dd offset loc_657A9D
dd offset loc_657BD2
dd offset loc_6578DA
dd offset loc_657B55
dd offset loc_657CF4
dd offset loc_657E12
dd offset loc_657F15
dd offset loc_657F71
dd offset loc_657FB7
dd offset loc_657F2A
dd offset loc_657FBE
dd offset loc_65802F
dd offset loc_657CC2
dd offset loc_657B02
dd offset loc_6578DA
dd offset loc_6580F8
dd offset loc_657B8D
dd offset loc_657BAF
dd offset loc_6578DA
dd offset loc_658086
dd offset loc_6580B2
dd offset loc_6580C6
align 10h



sub_658260 proc	near

var_6C=	dword ptr -6Ch
var_54=	dword ptr -54h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 54h
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	edi
lea	ecx, [eax+78h]
call	sub_661C50
mov	edi, eax
test	edi, edi
jz	loc_65831F
mov	ecx, [esp+5Ch+arg_4]
cmp	ecx, 7EFFFFFDh
ja	loc_65831F
movzx	eax, word ptr [esi+74h]
fld	dword ptr [esi+1Ch]
push	0		; char
fstp	[esp+60h+arg_4]
fld	[esp+60h+arg_4]
push	0		; char
push	eax		; __int16
push	ecx		; float
lea	eax, [esi+44h]
lea	edx, [esi+24h]
fstp	[esp+6Ch+var_6C]
push	eax		; int
push	1		; char
push	edx		; int
push	1		; char
push	ecx		; int
push	ecx		; int
mov	ecx, [esi+10h]
mov	eax, esp
mov	[eax], ecx
lea	ecx, [esp+84h+var_54]
call	sub_64B940
mov	edx, [esp+5Ch+arg_8]
mov	eax, [esp+5Ch+arg_0]
push	esi
push	0
push	1
push	0FFFFFFFFh
push	edx
push	0
push	eax
lea	ecx, [esp+78h+var_54]
push	ecx
mov	ecx, edi
call	sub_68A810
mov	ecx, dword_1855FC0
test	eax, eax
jz	short loc_658313
mov	dl, [eax+76h]
shr	dl, 7
and	dl, 1
movzx	esi, dl
mov	edx, [esp+5Ch+var_54]
neg	esi
sbb	esi, esi
and	esi, eax
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, esi
pop	edi
pop	esi
add	esp, 54h
retn	0Ch

loc_658313:
mov	edx, [ecx]
mov	eax, [esp+5Ch+var_54]
mov	edx, [edx+30h]
push	eax
call	edx

loc_65831F:
pop	edi
xor	eax, eax
pop	esi
add	esp, 54h
retn	0Ch
sub_658260 endp

align 10h



sub_658330 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
sub	esp, 10h
push	ebx
xor	ebx, ebx
push	esi
cmp	edx, 40h
jz	short loc_658361
cmp	edx, 80h
jz	short loc_658361
mov	esi, [eax+4]
mov	[esp+18h+var_C], esi
mov	esi, [eax+8]
mov	eax, [eax+0Ch]
mov	[esp+18h+var_8], esi
mov	[esp+18h+var_4], eax
jmp	short loc_65837D

loc_658361:
xor	eax, eax
mov	[esp+18h+var_C], ebx
mov	word ptr [esp+18h+var_8], ax
mov	byte ptr [esp+18h+var_8+2], bl
mov	byte ptr [esp+18h+var_4], bl
mov	byte ptr [esp+18h+var_4+1], bl
mov	byte ptr [esp+18h+var_8+3], 0FFh

loc_65837D:
mov	esi, [ecx+9Ch]
add	ecx, 9Ch
mov	[esp+18h+var_10], edx
cmp	esi, ebx
jz	short loc_6583D5
mov	eax, edx
test	edx, 20000h
jz	short loc_6583A2
movsx	eax, word ptr [esp+18h+var_8]
xor	eax, edx

loc_6583A2:
mov	edx, [esi+4]
and	edx, eax
push	edx
lea	eax, [esp+1Ch+var_10]
push	eax
call	sub_6560C0
cmp	eax, ebx
jl	short loc_6583D5
lea	ecx, [eax+eax*8]
lea	eax, [esi+ecx*4+10h]
cmp	eax, ebx
jz	short loc_6583D5
add	eax, 10h
xor	edx, edx
cmp	eax, ebx
setnz	dl
pop	esi
mov	al, dl
pop	ebx
add	esp, 10h
retn	4

loc_6583D5:
xor	eax, eax
xor	edx, edx
cmp	eax, ebx
setnz	dl
pop	esi
mov	al, dl
pop	ebx
add	esp, 10h
retn	4
sub_658330 endp

align 10h



sub_6583F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
mov	eax, [esp+14h+arg_4]
push	ebx
mov	ebx, ecx
mov	ecx, [eax]
push	esi
mov	[esp+1Ch+var_14], ebx
cmp	ecx, 40h
jz	short loc_658425
cmp	ecx, 80h
jz	short loc_658425
mov	edx, [eax+4]
mov	[esp+1Ch+var_C], edx
mov	edx, [eax+8]
mov	eax, [eax+0Ch]
mov	[esp+1Ch+var_8], edx
mov	[esp+1Ch+var_4], eax
jmp	short loc_658445

loc_658425:
xor	edx, edx
mov	[esp+1Ch+var_C], 0
mov	word ptr [esp+1Ch+var_8], dx
mov	byte ptr [esp+1Ch+var_8+2], dl
mov	byte ptr [esp+1Ch+var_4], dl
mov	byte ptr [esp+1Ch+var_4+1], dl
mov	byte ptr [esp+1Ch+var_8+3], 0FFh

loc_658445:
mov	esi, [ebx+9Ch]
lea	edx, [ebx+9Ch]
mov	[esp+1Ch+var_10], ecx
test	esi, esi
jz	loc_658501
mov	eax, ecx
test	ecx, 20000h
jz	short loc_65846E
movsx	eax, word ptr [esp+1Ch+var_8]
xor	eax, ecx

loc_65846E:
mov	ecx, [esi+4]
and	ecx, eax
push	ecx
lea	eax, [esp+20h+var_10]
push	eax
mov	ecx, edx
call	sub_6560C0
test	eax, eax
jl	loc_658501
lea	ecx, [eax+eax*8]
lea	esi, [esi+ecx*4+10h]
test	esi, esi
jz	short loc_658501
lea	ecx, [esi+10h]
mov	[esp+1Ch+arg_4], ecx
test	ecx, ecx
jz	short loc_658501
mov	eax, [ecx+4]
test	eax, eax
jbe	short loc_6584F7
mov	esi, [esp+1Ch+arg_0]
push	ebp
push	edi
xor	edi, edi
mov	ebp, eax
jmp	short loc_6584B9

loc_6584B1:
mov	ecx, [esp+24h+arg_4]
mov	ebx, [esp+24h+var_14]

loc_6584B9:
mov	eax, [ecx]
add	eax, edi
test	ebx, ebx
jz	short loc_6584C6
lea	ecx, [ebx+78h]
jmp	short loc_6584C8

loc_6584C6:
xor	ecx, ecx

loc_6584C8:
mov	edx, [esi+8]
sub	edx, [esi+0Ch]
mov	ebx, [esi+1Ch]
push	0
sar	edx, 4
shl	ebx, 5
lea	edx, [edx+ebx-1Fh]
push	edx
push	0
push	esi
push	ecx
push	0
push	eax
call	sub_66B4F0
add	esp, 1Ch
add	edi, 10h
sub	ebp, 1
jnz	short loc_6584B1
pop	edi
pop	ebp

loc_6584F7:
pop	esi
mov	al, 1
pop	ebx
add	esp, 14h
retn	8

loc_658501:
pop	esi
xor	al, al
pop	ebx
add	esp, 14h
retn	8
sub_6583F0 endp

align 10h



sub_658510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi-78h]
mov	edx, [eax+100h]
lea	ecx, [edi-78h]
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_65855F
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	edx, [esi+10h]
mov	edx, [edx+20h]
lea	eax, [edi-78h]
neg	eax
sbb	eax, eax
and	eax, edi
push	eax
mov	eax, [esp+0Ch+arg_8]
push	eax
mov	eax, [esp+10h+arg_4]
lea	ecx, [esi+10h]
push	eax
mov	eax, [esp+14h+arg_0]
push	eax
call	edx
mov	ecx, esi
call	sub_64B3B0

loc_65855F:
pop	edi
pop	esi
retn	10h
sub_658510 endp

align 10h



sub_658570 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx-78h]
mov	edx, [eax+104h]
add	ecx, 0FFFFFF88h
push	esi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6585BC
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [esp+4+arg_8]
mov	edx, [esi+10h]
mov	edx, [edx+1Ch]
push	ebx
push	eax
mov	eax, [esp+0Ch+arg_4]
lea	ecx, [esi+10h]
push	eax
mov	eax, [esp+10h+arg_0]
push	eax
call	edx
mov	ecx, esi
mov	bl, al
call	sub_64B3B0
mov	al, bl
pop	ebx
pop	esi
retn	0Ch

loc_6585BC:
xor	al, al
pop	esi
retn	0Ch
sub_658570 endp

align 10h



sub_6585D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx-78h]
mov	edx, [eax+104h]
add	ecx, 0FFFFFF88h
push	esi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_65861C
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [esp+4+arg_8]
mov	edx, [esi+10h]
mov	edx, [edx+14h]
push	ebx
push	eax
mov	eax, [esp+0Ch+arg_4]
lea	ecx, [esi+10h]
push	eax
mov	eax, [esp+10h+arg_0]
push	eax
call	edx
mov	ecx, esi
mov	bl, al
call	sub_64B3B0
mov	al, bl
pop	ebx
pop	esi
retn	0Ch

loc_65861C:
xor	al, al
pop	esi
retn	0Ch
sub_6585D0 endp

align 10h



sub_658630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi-78h]
mov	edx, [eax+104h]
lea	ecx, [edi-78h]
call	edx
mov	ebx, [esp+0Ch+arg_4]
mov	esi, eax
test	esi, esi
jz	short loc_65866A
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	edx, [esi+10h]
mov	eax, [esp+0Ch+arg_0]
mov	edx, [edx+34h]
lea	ecx, [esi+10h]
push	ebx
push	eax
call	edx

loc_65866A:
test	ebx, ebx
jz	short loc_65867A
mov	eax, [ebx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebx+8], eax

loc_65867A:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_658686
call	sub_64B3B0

loc_658686:
mov	[edi+8], ebx
test	esi, esi
jz	short loc_658694
mov	ecx, esi
call	sub_64B3B0

loc_658694:
pop	edi
pop	esi
pop	ebx
retn	8
sub_658630 endp

align 10h



sub_6586A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx-78h]
mov	edx, [eax+100h]
add	ecx, 0FFFFFF88h
push	esi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6586EC
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [esp+4+arg_8]
mov	edx, [esi+10h]
mov	edx, [edx+48h]
push	ebx
push	eax
mov	eax, [esp+0Ch+arg_4]
lea	ecx, [esi+10h]
push	eax
mov	eax, [esp+10h+arg_0]
push	eax
call	edx
mov	ecx, esi
mov	bl, al
call	sub_64B3B0
mov	al, bl
pop	ebx
pop	esi
retn	0Ch

loc_6586EC:
xor	al, al
pop	esi
retn	0Ch
sub_6586A0 endp

align 10h



sub_658700 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [ecx-78h]
mov	edx, [eax+104h]
add	ecx, 0FFFFFF88h
push	esi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_658751
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [esp+4+arg_C]
mov	edx, [esi+10h]
mov	edx, [edx+4Ch]
push	ebx
push	eax
mov	eax, [esp+0Ch+arg_8]
push	eax
mov	eax, [esp+10h+arg_4]
lea	ecx, [esi+10h]
push	eax
mov	eax, [esp+14h+arg_0]
push	eax
call	edx
mov	ecx, esi
mov	bl, al
call	sub_64B3B0
mov	al, bl
pop	ebx
pop	esi
retn	10h

loc_658751:
xor	al, al
pop	esi
retn	10h
sub_658700 endp

align 10h



sub_658760 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx-78h]
mov	edx, [eax+104h]
add	ecx, 0FFFFFF88h
push	esi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6587A7
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [esp+4+arg_4]
mov	edx, [esi+10h]
mov	edx, [edx+50h]
push	ebx
lea	ecx, [esi+10h]
push	eax
mov	eax, [esp+0Ch+arg_0]
push	eax
call	edx
mov	ecx, esi
mov	bl, al
call	sub_64B3B0
mov	al, bl
pop	ebx
pop	esi
retn	8

loc_6587A7:
xor	al, al
pop	esi
retn	8
sub_658760 endp

align 10h



sub_6587B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
mov	[esp+8+arg_0], edi
jnz	short loc_6587C9
call	sub_651580

loc_6587C9:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_658809
mov	eax, [edi]
mov	eax, [eax+0Ch]
and	eax, [ecx+4]
lea	ecx, [esp+8+arg_0]
push	eax
push	ecx
mov	ecx, esi
call	sub_656130
test	eax, eax
jl	short loc_658809
lea	edx, [eax+eax*2+3]
mov	eax, [esi]
lea	eax, [eax+edx*4]
test	eax, eax
jz	short loc_658809
mov	ecx, [esp+8+arg_4]
test	ecx, ecx
jz	short loc_658802
mov	dl, [eax+4]
mov	[ecx], dl

loc_658802:
pop	edi
mov	al, 1
pop	esi
retn	8

loc_658809:
pop	edi
xor	al, al
pop	esi
retn	8
sub_6587B0 endp




sub_658810 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_65882C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_658841
push	esi
jmp	short loc_65883B

loc_65882C:
cmp	esi, [edi+8]
jb	short loc_658841
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_65883B:
push	edi
call	sub_657040

loc_658841:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_65885C
sub	esi, ebx
imul	ebx, 9Ch
add	ebx, [edi]
push	esi
push	ebx
call	sub_656FD0
add	esp, 8

loc_65885C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_658810 endp

align 10h



sub_658870 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi], edx
mov	edx, [eax+4]
mov	[esi+4], edx
mov	edx, [eax+8]
mov	[esi+8], edx
mov	eax, [eax+0Ch]
mov	[esi+0Ch], eax
mov	eax, [ecx+4]
xor	ecx, ecx
push	edi
lea	edi, [esi+10h]
mov	[edi], ecx
mov	[edi+4], ecx
mov	[edi+8], ecx
mov	ebp, [eax+4]
mov	edx, [eax]
mov	[esp+0Ch+arg_0], edx
cmp	ebp, ecx
jz	short loc_6588D3
push	ebx
mov	ebx, [edi+4]
lea	eax, [ebx+ebp]
push	eax
push	edi
mov	ecx, edi
call	sub_656670
mov	ecx, [esp+10h+arg_0]
push	ecx
shl	ebx, 4
add	ebx, [edi]
push	ebp
push	ebx
call	sub_655220
add	esp, 0Ch
pop	ebx

loc_6588D3:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_658870 endp

align 10h



sub_6588E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_8]
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	[esi+8], eax
inc	dword ptr [eax+8]
mov	eax, [edi]
and	eax, 0FFFFFC00h
mov	ecx, [eax]
mov	eax, [ecx+20h]
mov	[esi+0Ch], eax
inc	dword ptr [eax+8]
mov	eax, [edi]
mov	[esi+10h], eax
inc	dword ptr [eax+8]
lea	ecx, [esp+8+arg_0]
mov	dword ptr [esi], 1
mov	[esi+4], edx
call	sub_679E30
mov	ecx, [esp+8+arg_4]
test	ecx, ecx
jz	short loc_658942
lea	eax, [esp+8+arg_0]
push	eax
call	sub_6577E0
push	0FFFFFFFFh
push	offset word_155C524
lea	ecx, [esp+10h+arg_0]
call	sub_67A0C0

loc_658942:
mov	ecx, [esi+8]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+10h+arg_0]
call	sub_67A0C0
mov	eax, [edi]
and	eax, 0FFFFFC00h
mov	ecx, [eax]
mov	eax, [esp+8+arg_0]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	edi, eax
add	dword ptr [edi+8], 2
mov	ecx, [esi+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65898E
call	sub_650DF0

loc_65898E:
mov	[esi+0Ch], edi
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_65899E
mov	ecx, edi
call	sub_650DF0

loc_65899E:
mov	edi, [esp+8+arg_0]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6589C4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6589C4:
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6588E0 endp

align 10h



sub_6589D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx]
inc	dword ptr [esi+8]
push	edi
mov	edi, ecx
mov	ecx, [edi+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6589EC
call	sub_650DF0

loc_6589EC:
lea	ecx, [esp+0Ch+arg_0]
mov	[edi+8], esi
call	sub_679E30
mov	ecx, [esp+0Ch+arg_4]
test	ecx, ecx
jz	short loc_658A1A
lea	eax, [esp+0Ch+arg_0]
push	eax
call	sub_6577E0
push	0FFFFFFFFh
push	offset word_155C524
lea	ecx, [esp+14h+arg_0]
call	sub_67A0C0

loc_658A1A:
mov	ecx, [edi+8]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+14h+arg_0]
call	sub_67A0C0
mov	eax, [ebx]
and	eax, 0FFFFFC00h
mov	ecx, [eax]
mov	eax, [esp+0Ch+arg_0]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
add	dword ptr [esi+8], 2
mov	ecx, [edi+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_658A66
call	sub_650DF0

loc_658A66:
mov	[edi+0Ch], esi
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_658A76
mov	ecx, esi
call	sub_650DF0

loc_658A76:
mov	esi, [esp+0Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_658A9C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_658A9C:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6589D0 endp

align 10h



sub_658AB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
cmp	dword ptr [eax+10h], 0
push	edi
mov	edi, ecx
jz	short loc_658ACA
and	dword ptr [edi+0A0h], 0FFFFBFFFh

loc_658ACA:
mov	ecx, [edi+94h]
test	ecx, ecx
jz	short loc_658AE3
mov	edx, [edi+20h]
push	edx
push	esi
call	sub_6589D0
pop	edi
pop	esi
retn	4

loc_658AE3:
mov	ecx, dword_1855FC0
push	ebp
lea	edx, [esp+0Ch+arg_0]
push	edx
mov	[esp+10h+arg_0], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	14h
push	edi
call	eax
test	eax, eax
jz	short loc_658B16
mov	ecx, [edi+20h]
push	edi
push	ecx
push	esi
mov	ecx, eax
call	sub_6588E0
mov	ebp, eax
jmp	short loc_658B18

loc_658B16:
xor	ebp, ebp

loc_658B18:
mov	esi, [edi+94h]
test	esi, esi
jz	short loc_658B61
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_658B61
mov	ecx, [esi+10h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_658B37
call	sub_650DF0

loc_658B37:
mov	ecx, [esi+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_658B45
call	sub_650DF0

loc_658B45:
mov	ecx, [esi+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_658B53
call	sub_650DF0

loc_658B53:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_658B61:
mov	[edi+94h], ebp
pop	ebp
pop	edi
pop	esi
retn	4
sub_658AB0 endp

align 10h



sub_658B70 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
cmp	dword ptr [edi+94h], 0
jnz	loc_658CD3
mov	eax, [edi]
mov	edx, [eax+54h]
call	edx
lea	ecx, [edi+78h]
mov	esi, eax
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 2
jnz	loc_658C3A
mov	al, [edi+76h]
shr	al, 4
test	al, 1
jz	loc_658C3A
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	14h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_658BE1
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
mov	eax, [eax+78h]
push	0
push	0
add	eax, 8
push	eax
mov	ecx, esi
call	sub_6588E0
mov	ebp, eax
jmp	short loc_658BE3

loc_658BE1:
xor	ebp, ebp

loc_658BE3:
mov	esi, [edi+94h]
test	esi, esi
jz	short loc_658C2C
or	ebx, 0FFFFFFFFh
add	[esi], ebx
cmp	dword ptr [esi], 0
jg	short loc_658C2C
mov	ecx, [esi+10h]
add	[ecx+8], ebx
jnz	short loc_658C04
call	sub_650DF0

loc_658C04:
mov	ecx, [esi+0Ch]
add	[ecx+8], ebx
jnz	short loc_658C11
call	sub_650DF0

loc_658C11:
mov	ecx, [esi+8]
add	[ecx+8], ebx
jnz	short loc_658C1E
call	sub_650DF0

loc_658C1E:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_658C2C:
mov	[edi+94h], ebp
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn

loc_658C3A:
lea	ecx, [esp+14h+var_4]
push	ecx
mov	ecx, esi
call	sub_695780
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	14h
call	eax
test	eax, eax
jz	short loc_658C6D
mov	ecx, [edi+20h]
push	edi
push	ecx
lea	edx, [esp+1Ch+var_4]
push	edx
mov	ecx, eax
call	sub_6588E0
mov	ebp, eax
jmp	short loc_658C6F

loc_658C6D:
xor	ebp, ebp

loc_658C6F:
mov	esi, [edi+94h]
or	ebx, 0FFFFFFFFh
test	esi, esi
jz	short loc_658CB8
add	[esi], ebx
cmp	dword ptr [esi], 0
jg	short loc_658CB8
mov	ecx, [esi+10h]
add	[ecx+8], ebx
jnz	short loc_658C90
call	sub_650DF0

loc_658C90:
mov	ecx, [esi+0Ch]
add	[ecx+8], ebx
jnz	short loc_658C9D
call	sub_650DF0

loc_658C9D:
mov	ecx, [esi+8]
add	[ecx+8], ebx
jnz	short loc_658CAA
call	sub_650DF0

loc_658CAA:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_658CB8:
mov	eax, [esp+14h+var_4]
mov	ecx, eax
add	eax, 8
mov	[edi+94h], ebp
add	[eax], ebx
cmp	dword ptr [eax], 0
jnz	short loc_658CD3
call	sub_650DF0

loc_658CD3:
mov	eax, [edi+94h]
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_658B70 endp

align 10h



sub_658CE0 proc	near

var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 40h
push	ebp
mov	ebp, [esp+44h+arg_0]
cmp	dword ptr [ebp+0], 0
push	esi
mov	esi, ecx
mov	[esp+48h+var_40], esi
jz	loc_658E1E
mov	eax, [esi]
mov	edx, [eax+70h]
push	ebx
push	edi
mov	byte ptr [esp+50h+var_34], 0
call	edx
mov	edx, eax
mov	eax, [esp+48h+arg_C]
mov	edi, [eax+4]
mov	[esp+48h+var_34], edx
mov	[esp+48h+var_30], edi
test	edi, edi
jle	short loc_658D6D
lea	ebx, [edi-1]
test	ebx, ebx
jl	short loc_658D6D
mov	ebp, ebx
lea	esi, [edx+8]
shl	ebp, 4
jmp	short loc_658D30
align 10h

loc_658D30:
mov	ecx, [esp+48h+arg_C]
mov	edi, [ecx]
add	dword ptr [esi], 10h
mov	eax, [esi]
add	edi, ebp
cmp	eax, [esi+8]
jb	short loc_658D49
mov	ecx, esi
call	sub_64B530

loc_658D49:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_658D55
push	edi
call	sub_652330

loc_658D55:
dec	ebx
sub	ebp, 10h
test	ebx, ebx
jge	short loc_658D30
mov	esi, [esp+48h+var_38]
mov	ebp, [esp+48h+arg_8]
mov	edx, [esp+48h+var_34]
mov	edi, [esp+48h+var_30]

loc_658D6D:
mov	ecx, [edx+8]
sub	ecx, [edx+0Ch]
mov	ebx, [edx+1Ch]
lea	eax, [esi+78h]
lea	esi, [edx+8]
sar	ecx, 4
shl	ebx, 5
lea	ecx, [ecx+ebx-20h]
lea	ebx, [esp+48h+var_2C]
mov	[esp+48h+var_18], ebx
mov	[esp+48h+var_14], eax
mov	eax, [ebp+4]
xor	ebx, ebx
mov	[esp+48h+arg_0], ecx
mov	ecx, [ebp+0]
push	ebx
mov	[esp+4Ch+var_4], edx
push	eax
mov	[esp+50h+var_1C], offset off_1431764
mov	byte ptr [esp+50h+var_8], 0
mov	dword ptr [esp+50h+var_10], ebx
mov	[esp+50h+var_C], ebx
mov	[esp+50h], edi
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+50h+var_1C]
push	eax
call	edx
test	[esp+50h+var_10], 2
mov	[esp+50h+var_24], offset off_1431764
jnz	short loc_658DE5
mov	ecx, [esp+50h+var_18]
cmp	ecx, ebx
jz	short loc_658DE5
call	sub_64B3B0

loc_658DE5:
test	[esp+50h+var_10], 1
mov	[esp+50h+var_18], ebx
jnz	short loc_658DFD
mov	ecx, [esp+50h+var_14]
cmp	ecx, ebx
jz	short loc_658DFD
call	sub_64B3B0

loc_658DFD:
cmp	edi, ebx
jle	short loc_658E09
push	edi
mov	ecx, esi
call	sub_64C1F0

loc_658E09:
lea	ecx, [esp+50h+var_34]
call	sub_652830
pop	edi
pop	ebx
pop	esi
mov	al, 1
pop	ebp
add	esp, 40h
retn	8

loc_658E1E:
pop	esi
xor	al, al
pop	ebp
add	esp, 40h
retn	8
sub_658CE0 endp

align 10h



sub_658E30 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 40h
cmp	[esp+40h+arg_0], 0
push	esi
mov	esi, ecx
mov	[esp+44h+var_40], esi
jz	loc_658F5F
mov	eax, [esi]
mov	edx, [eax+70h]
push	ebx
push	ebp
push	edi
mov	[esp+50h+var_34], 0
call	edx
mov	edx, eax
mov	eax, [esp+50h+arg_4]
mov	edi, [eax+4]
mov	[esp+50h+var_3C], edx
mov	[esp+50h+var_38], edi
test	edi, edi
jle	short loc_658EB9
lea	ebx, [edi-1]
test	ebx, ebx
jl	short loc_658EB9
mov	ebp, ebx
lea	esi, [edx+8]
shl	ebp, 4
jmp	short loc_658E80
align 10h

loc_658E80:
mov	ecx, [esp+50h+arg_4]
mov	edi, [ecx]
add	dword ptr [esi], 10h
mov	eax, [esi]
add	edi, ebp
cmp	eax, [esi+8]
jb	short loc_658E99
mov	ecx, esi
call	sub_64B530

loc_658E99:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_658EA5
push	edi
call	sub_652330

loc_658EA5:
dec	ebx
sub	ebp, 10h
test	ebx, ebx
jge	short loc_658E80
mov	esi, [esp+50h+var_40]
mov	edx, [esp+50h+var_3C]
mov	edi, [esp+50h+var_38]

loc_658EB9:
mov	ecx, [edx+8]
sub	ecx, [edx+0Ch]
mov	ebx, [edx+1Ch]
lea	eax, [esi+78h]
lea	esi, [edx+8]
sar	ecx, 4
shl	ebx, 5
lea	ebp, [esp+50h+var_34]
lea	ecx, [ecx+ebx-20h]
mov	[esp+50h+var_C], edx
mov	[esp+50h+var_20], ebp
lea	edx, [esp+50h+var_24]
xor	ebp, ebp
mov	ebx, offset off_1431764
push	edx
mov	[esp+54h+var_24], ebx
mov	[esp+54h+var_1C], eax
mov	[esp+54h+var_10], 0
mov	[esp+54h+var_18], ebp
mov	[esp+54h+var_14], ebp
mov	[esp+54h+var_8], edi
mov	[esp+54h+var_4], ecx
call	[esp+54h+arg_0]
add	esp, 4
test	[esp+50h+var_10], 2
mov	[esp+50h+var_24], ebx
jnz	short loc_658F26
mov	ecx, [esp+50h+var_18]
cmp	ecx, ebp
jz	short loc_658F26
call	sub_64B3B0

loc_658F26:
test	[esp+50h+var_10], 1
mov	[esp+50h+var_18], ebp
jnz	short loc_658F3E
mov	ecx, [esp+50h+var_14]
cmp	ecx, ebp
jz	short loc_658F3E
call	sub_64B3B0

loc_658F3E:
cmp	edi, ebp
jle	short loc_658F4A
push	edi
mov	ecx, esi
call	sub_64C1F0

loc_658F4A:
lea	ecx, [esp+50h+var_34]
call	sub_652830
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
add	esp, 40h
retn	8

loc_658F5F:
xor	al, al
pop	esi
add	esp, 40h
retn	8
sub_658E30 endp

align 10h



sub_658F70 proc	near

var_6C=	qword ptr -6Ch
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_24=	byte ptr -24h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 68h
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
mov	edx, [eax+70h]
push	edi
mov	[esp+70h+var_64], ebx
mov	[esp+70h+var_44], 0
call	edx
mov	edi, eax
test	edi, edi
jz	loc_65919D
mov	ecx, [edi+78h]
push	ebp
xor	eax, eax
mov	ebp, 1
cmp	[esp+74h+arg_0], ebp
push	esi
setnz	al
lea	esi, [edi+78h]
add	eax, 59h
mov	eax, [ecx+eax*4+8]
mov	dword ptr [esp+78h+var_6C+4], eax
add	[eax+8], ebp
mov	edx, [ebx+78h]
mov	edx, [edx+2Ch]
lea	eax, [esp+78h+var_44]
push	eax
lea	ecx, [ebx+78h]
lea	eax, [esp+7Ch+var_6C+4]
push	eax
push	esi
call	edx
test	al, al
jz	loc_659185
cmp	[esp+78h+var_44], 9
jnz	short loc_659018
mov	eax, [esp+78h+arg_4]
mov	byte ptr [esp+78h+var_60], 0
test	eax, eax
jz	short loc_658FEF
add	eax, 78h
jmp	short loc_658FF1

loc_658FEF:
xor	eax, eax

loc_658FF1:
lea	ecx, [esp+78h+var_60]
push	ecx
push	eax
push	edi
lea	ecx, [esp+84h+var_44]
call	sub_6529F0
lea	edx, [esp+78h+var_60]
push	edx
lea	ecx, [esp+7Ch+var_44]
call	sub_652520
lea	ecx, [esp+78h+var_60]
call	sub_652830

loc_659018:
push	0
lea	eax, [esp+7Ch+var_50]
push	eax
lea	ecx, [esp+80h+var_44]
call	sub_652DC0
mov	ecx, [esp+78h+var_50]
test	ecx, ecx
jz	loc_659159
mov	ecx, [esi]
cmp	byte ptr [ecx+2B0h], 1
jnz	short loc_659086
mov	edx, [esp+78h+arg_8]
fild	[esp+78h+arg_8]
test	edx, edx
jge	short loc_659057
fadd	ds:dbl_15FCE08

loc_659057:
add	dword ptr [edi+8], 10h
fstp	[esp+78h+var_60]
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	esi, [edi+8]
jb	short loc_659071
mov	ecx, esi
call	sub_64B530

loc_659071:
mov	esi, [esi]
test	esi, esi
jz	short loc_659081
fld	[esp+78h+var_60]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_659081:
mov	ebp, 2

loc_659086:
mov	eax, [esp+78h+arg_4]
test	eax, eax
jz	short loc_6590CD
push	eax
lea	ecx, [esp+7Ch+var_60]
call	sub_651CF0
add	dword ptr [edi+8], 10h
lea	esi, [edi+8]
mov	ebx, eax
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6590B2
mov	ecx, esi
call	sub_64B530

loc_6590B2:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6590BE
push	ebx
call	sub_652330

loc_6590BE:
lea	ecx, [esp+78h+var_60]
call	sub_652830
mov	ebx, [esp+78h+var_64]
jmp	short loc_6590EC

loc_6590CD:
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	esi, [edi+8]
jb	short loc_6590E3
mov	ecx, esi
call	sub_64B530

loc_6590E3:
mov	eax, [esi]
test	eax, eax
jz	short loc_6590EC
mov	byte ptr [eax],	1

loc_6590EC:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
shl	ecx, 5
sar	eax, 4
lea	eax, [eax+ecx-20h]
push	eax
push	ebp
push	edi
push	ebx
lea	ecx, [esp+88h+var_60]
mov	[esp+88h+var_34], 0
call	sub_651CF0
push	eax
lea	edx, [esp+88h+var_34]
push	edx
lea	ecx, [esp+8Ch+var_24]
call	sub_657730
mov	edi, [esp+78h+var_4C]
mov	ecx, [esp+78h+var_50]
mov	edx, [ecx]
push	0
push	edi
push	eax
mov	eax, [edx+28h]
call	eax
lea	ecx, [esp+78h+var_24]
call	sub_64B830
lea	ecx, [esp+78h+var_60]
call	sub_652830
push	ebp
mov	ecx, esi
call	sub_64C1F0
lea	ecx, [esp+78h+var_34]
call	sub_652830
mov	ecx, [esp+78h+var_50]

loc_659159:
test	[esp+78h+var_48], 2
jnz	short loc_659169
test	ecx, ecx
jz	short loc_659169
call	sub_64B3B0

loc_659169:
test	[esp+78h+var_48], 1
mov	[esp+78h+var_50], 0
jnz	short loc_659185
mov	ecx, [esp+78h+var_4C]
test	ecx, ecx
jz	short loc_659185
call	sub_64B3B0

loc_659185:
mov	eax, dword ptr [esp+78h+var_6C+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
pop	ebp
jnz	short loc_65919D
call	sub_650DF0

loc_65919D:
lea	ecx, [esp+70h+var_44]
call	sub_652830
pop	edi
pop	ebx
add	esp, 68h
retn	10h
sub_658F70 endp

align 10h



sub_6591B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

cmp	[esp+arg_8], 0
jz	short loc_6591F9
push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_6591F3
mov	eax, [esp+4+arg_0]
mov	edx, [eax]
mov	edx, [edx+0Ch]
and	edx, [esi+4]
push	edx
push	eax
call	sub_692130
test	eax, eax
jl	short loc_6591F3
lea	eax, [eax+eax*2+3]
lea	eax, [esi+eax*4]
test	eax, eax
jz	short loc_6591F3
mov	ecx, [esp+4+arg_4]
test	ecx, ecx
jz	short loc_6591ED
mov	dl, [eax+4]
mov	[ecx], dl

loc_6591ED:
mov	al, 1
pop	esi
retn	0Ch

loc_6591F3:
xor	al, al
pop	esi
retn	0Ch

loc_6591F9:
mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
push	eax
push	edx
call	sub_6587B0
retn	0Ch
sub_6591B0 endp

align 10h



sub_659210 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_659229
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_65923E
push	esi
jmp	short loc_659238

loc_659229:
cmp	esi, [edi+8]
jb	short loc_65923E
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_659238:
push	edi
call	sub_657040

loc_65923E:
mov	edx, [edi]
mov	[edi+4], esi
imul	esi, 9Ch
lea	ecx, [esi+edx-9Ch]
pop	edi
pop	esi
test	ecx, ecx
jz	short locret_65925B
jmp	sub_6566F0

locret_65925B:
retn	4
sub_659210 endp

align 10h



sub_659260 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+4]
push	edi
push	eax
mov	edi, ecx
call	sub_658810
xor	ebx, ebx
cmp	[edi+4], ebx
jbe	short loc_65929C
push	esi
xor	esi, esi
lea	esp, [esp+0]

loc_659280:
mov	ecx, [ebp+0]
add	ecx, esi
push	ecx
mov	ecx, [edi]
add	ecx, esi
call	sub_656980
inc	ebx
add	esi, 9Ch
cmp	ebx, [edi+4]
jb	short loc_659280
pop	esi

loc_65929C:
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
retn	4
sub_659260 endp

align 10h



sub_6592B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
mov	[edi+4], edx
mov	ecx, [eax+8]
mov	[edi+8], ecx
mov	edx, [eax+0Ch]
mov	[edi+0Ch], edx
xor	ecx, ecx
lea	esi, [edi+10h]
mov	[esi], ecx
mov	[esi+4], ecx
mov	[esi+8], ecx
mov	ebp, [eax+14h]
mov	eax, [eax+10h]
mov	[esp+0Ch+arg_0], eax
cmp	ebp, ecx
jz	short loc_65930F
push	ebx
mov	ebx, [esi+4]
lea	ecx, [ebx+ebp]
push	ecx
push	esi
mov	ecx, esi
call	sub_656670
mov	edx, [esp+10h+arg_0]
push	edx
shl	ebx, 4
add	ebx, [esi]
push	ebp
push	ebx
call	sub_655220
add	esp, 0Ch
pop	ebx

loc_65930F:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn	4
sub_6592B0 endp

align 10h



sub_659320 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_658AB0
mov	edi, [esi+94h]
test	edi, edi
jnz	short loc_659346
mov	ecx, esi
call	sub_658B70
mov	edi, eax
test	edi, edi
jz	short loc_65935C

loc_659346:
mov	esi, [ebx]
inc	dword ptr [esi+8]
mov	ecx, [edi+10h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_659359
call	sub_650DF0

loc_659359:
mov	[edi+10h], esi

loc_65935C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_659320 endp

align 10h



sub_659370 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_659386
call	sub_658B70
test	eax, eax
jz	short loc_65938B

loc_659386:
add	eax, 10h
pop	esi
retn

loc_65938B:
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_6593AC
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_6593AC
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]

loc_6593AC:
add	eax, 8
pop	esi
retn
sub_659370 endp

align 10h



sub_6593C0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+0D0h]
push	edi
mov	[esp+14h+var_5], 0FFh
call	edx
mov	ebx, [esp+14h+arg_0]
add	eax, 8
mov	eax, [eax]
inc	dword ptr [eax+8]
mov	[esp+14h+var_4], eax
lea	eax, [esp+14h+var_4]
push	eax
push	ebx
call	sub_655BA0
mov	edi, [esp+1Ch+var_4]
add	esp, 8
test	al, al
jz	short loc_659425
mov	edx, [esi]
mov	eax, [edx+0D0h]
mov	ecx, esi
call	eax
cmp	dword ptr [edi+10h], 0
setz	cl
movzx	edx, cl
push	edx
lea	ecx, [esp+18h+var_5]
push	ecx
push	ebx
lea	ecx, [eax+2B4h]
call	sub_6591B0

loc_659425:
add	dword ptr [edi+8], 0FFFFFFFFh
movsx	esi, [esp+14h+var_5]
jnz	short loc_659437
mov	ecx, edi
call	sub_650DF0

loc_659437:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn	4
sub_6593C0 endp

align 10h



sub_659450 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	byte ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
var_40=	byte ptr -40h
var_3C=	byte ptr -3Ch
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 0BCh
push	ebx
push	esi
mov	esi, ecx
mov	[esp+0C4h+var_B8], esi
mov	ebx, 1
test	esi, esi
jz	short loc_65946A
add	[esi+4], ebx

loc_65946A:
mov	eax, [esi]
mov	edx, [eax+70h]
push	ebp
push	edi
call	edx
mov	edi, eax
mov	eax, [edi+74h]
mov	[esp+0CCh+var_88], eax
test	eax, eax
jz	short loc_659483
add	[eax+4], ebx

loc_659483:
mov	ebp, [esp+0CCh+arg_0]
mov	eax, [ebp+0]
cmp	eax, 40h
jz	short loc_659499
cmp	eax, 80h
jnz	short loc_6594D1

loc_659499:
mov	ecx, edi
call	sub_668010
test	eax, eax
jz	short loc_6594D1
movsx	ecx, byte ptr [ebp+0Bh]
cmp	ecx, 4
jnb	short loc_6594BC
imul	ecx, 67Ch
lea	ecx, [ecx+eax+9D4h]
jmp	short loc_6594BE

loc_6594BC:
xor	ecx, ecx

loc_6594BE:
mov	eax, [ebp+4]
movzx	edx, byte ptr [ebp+0Ah]
push	eax
movzx	eax, word ptr [ebp+8]
push	edx
push	eax
call	sub_6A7AB0

loc_6594D1:
push	ebp
mov	ecx, esi
mov	[esp+0D0h+var_B4], 0
mov	[esp+0D0h+var_B0], 0
call	sub_658330
test	al, al
jz	short loc_6594FD
cmp	byte ptr [ebp+0Ch], 0
jnz	short loc_6594FD
push	ebp
push	edi
mov	ecx, esi
call	sub_6583F0
mov	[esp+0CCh+var_B4], ebx

loc_6594FD:
lea	esi, [edi+78h]
push	esi
lea	ecx, [esp+0D0h+var_BC]
push	ecx
mov	ecx, ebp
call	sub_668230
mov	edx, [esp+0CCh+var_BC]
cmp	dword ptr [edx+10h], 0
jbe	loc_659A26
mov	ebx, [esp+0CCh+var_B8]
mov	eax, [ebx+78h]
mov	eax, [eax+2Ch]
lea	ecx, [esp+0CCh+var_B0]
push	ecx
add	ebx, 78h
lea	edx, [esp+0D0h+var_BC]
push	edx
push	esi
mov	ecx, ebx
call	eax
test	al, al
jz	loc_659A26
cmp	[esp+0CCh+var_B0], 9
jnz	short loc_659572
lea	ecx, [esp+0CCh+var_60]
push	ecx
push	ebx
push	edi
lea	ecx, [esp+0D8h+var_B0]
mov	[esp+0D8h+var_60], 0
call	sub_6529F0
lea	edx, [esp+0CCh+var_60]
push	edx
lea	ecx, [esp+0D0h+var_B0]
call	sub_652520
lea	ecx, [esp+0CCh+var_60]
call	sub_652830

loc_659572:
cmp	[esp+0CCh+var_B0], 1
jz	loc_659A26
mov	eax, [esi]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6598F9
cmp	byte ptr [ebp+0Ch], 0
mov	bl, 1
jz	short loc_6595F1
push	edi
lea	ecx, [esp+0D0h+var_A0]
push	ecx
lea	ecx, [esp+0D4h+var_B0]
call	sub_652DC0
mov	ecx, [esp+0CCh+var_A0]
test	ecx, ecx
jz	short loc_6595BD
mov	edx, [ecx]
mov	eax, [edx+40h]
call	eax
cmp	eax, 2
mov	ecx, [esp+0CCh+var_A0]
jge	short loc_6595BD
xor	bl, bl

loc_6595BD:
test	[esp+0CCh+var_98], 2
jnz	short loc_6595CD
test	ecx, ecx
jz	short loc_6595CD
call	sub_64B3B0

loc_6595CD:
test	[esp+0CCh+var_98], 1
mov	[esp+0CCh+var_A0], 0
jnz	short loc_6595E9
mov	ecx, [esp+0CCh+var_9C]
test	ecx, ecx
jz	short loc_6595E9
call	sub_64B3B0

loc_6595E9:
test	bl, bl
jz	loc_659A26

loc_6595F1:
inc	[esp+0CCh+var_B4]
mov	ecx, edi
call	sub_668A50
test	al, al
jz	short loc_659670
mov	ecx, [esp+0CCh+var_B8]
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_659613
call	sub_658B70

loc_659613:
mov	ecx, [eax+0Ch]
mov	esi, [ecx]
push	edi
lea	edx, [esp+0D0h+var_6C]
push	edx
lea	ecx, [esp+0D4h+var_B0]
call	sub_652DC0
mov	eax, [eax]
mov	ecx, [esp+0CCh+var_BC]
mov	edx, [ecx]
push	esi
push	eax
push	edx
push	offset aExecuteeventSt ; "\n!!!	ExecuteEvent started '%s' = %p for"...
push	edi
call	nullsub_2
add	esp, 14h
test	[esp+0CCh+var_64], 2
jnz	short loc_659654
mov	ecx, [esp+0CCh+var_6C]
test	ecx, ecx
jz	short loc_659654
call	sub_64B3B0

loc_659654:
test	[esp+0CCh+var_64], 1
mov	[esp+0CCh+var_6C], 0
jnz	short loc_659670
mov	ecx, [esp+0CCh+var_68]
test	ecx, ecx
jz	short loc_659670
call	sub_64B3B0

loc_659670:
movzx	eax, byte ptr [ebp+0Ah]
add	dword ptr [edi+8], 10h
lea	esi, [edi+8]
mov	dword ptr [esp+0CCh+var_3C], eax
mov	eax, [esi]
mov	[esp+0CCh+var_40], 4
cmp	eax, [esi+8]
jb	short loc_659698
mov	ecx, esi
call	sub_64B530

loc_659698:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6596AB
lea	edx, [esp+0CCh+var_40]
push	edx
call	sub_652330

loc_6596AB:
lea	ecx, [esp+0CCh+var_40]
call	sub_652830
mov	ebx, [esp+0CCh+arg_0]
mov	eax, [ebx]
mov	ebp, 1
cmp	eax, 2000h
jz	loc_6597A5
cmp	eax, 4000h
jz	loc_6597A5
cmp	eax, 8000h
jz	loc_6597A5
cmp	eax, 10000h
jz	loc_6597A5
cmp	eax, 400000h
jz	loc_6597A5
cmp	eax, (offset loc_7FFFFF+1)
jz	loc_6597A5
cmp	eax, 400h
jz	short loc_659727
cmp	eax, 800h
jz	short loc_659727
cmp	eax, 80000h
jz	short loc_659727
cmp	eax, 100000h
jnz	loc_6597ED

loc_659727:
cmp	word ptr [ebx+8], 0
jnz	short loc_65976E
add	dword ptr [esi], 10h
mov	eax, [esi]
mov	[esp+0CCh+var_20], 4
mov	dword ptr [esp+0CCh+var_1C], 0
cmp	eax, [esi+8]
jb	short loc_659752
mov	ecx, esi
call	sub_64B530

loc_659752:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_659765
lea	eax, [esp+0CCh+var_20]
push	eax
call	sub_652330

loc_659765:
lea	ecx, [esp+0CCh+var_20]
jmp	short loc_6597E3

loc_65976E:
add	dword ptr [esi], 10h
mov	eax, [esi]
mov	[esp+0CCh+var_50], 4
mov	dword ptr [esp+0CCh+var_4C], 0FFFFFFFFh
cmp	eax, [esi+8]
jb	short loc_65978F
mov	ecx, esi
call	sub_64B530

loc_65978F:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_65979F
lea	edx, [esp+0CCh+var_50]
push	edx
call	sub_652330

loc_65979F:
lea	ecx, [esp+0CCh+var_50]
jmp	short loc_6597E3

loc_6597A5:
movzx	eax, byte ptr [ebx+0Ch]
add	dword ptr [esi], 10h
mov	dword ptr [esp+0CCh+var_2C], eax
mov	eax, [esi]
mov	[esp+0CCh+var_30], 4
cmp	eax, [esi+8]
jb	short loc_6597C9
mov	ecx, esi
call	sub_64B530

loc_6597C9:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6597DC
lea	edx, [esp+0CCh+var_30]
push	edx
call	sub_652330

loc_6597DC:
lea	ecx, [esp+0CCh+var_30]

loc_6597E3:
call	sub_652830
mov	ebp, 2

loc_6597ED:
mov	al, [ebx+0Bh]
test	al, al
jge	short loc_6597F8
test	ebp, ebp
jbe	short loc_65983B

loc_6597F8:
add	dword ptr [esi], 10h
movsx	eax, al
mov	[esp+0CCh+var_C], eax
mov	eax, [esi]
mov	[esp+0CCh+var_10], 4
cmp	eax, [esi+8]
jb	short loc_65981B
mov	ecx, esi
call	sub_64B530

loc_65981B:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_65982E
lea	edx, [esp+0CCh+var_10]
push	edx
call	sub_652330

loc_65982E:
lea	ecx, [esp+0CCh+var_10]
call	sub_652830
inc	ebp

loc_65983B:
mov	eax, [esp+0CCh+var_BC]
mov	ecx, [eax]
mov	edx, [esi]
sub	edx, [esi+4]
mov	eax, [esi+14h]
push	ecx
shl	eax, 5
sar	edx, 4
lea	ecx, [edx+eax-20h]
mov	eax, [esp+0D0h+var_B8]
push	ecx
push	ebp
push	edi
add	eax, 78h
push	eax
lea	edx, [esp+0E0h+var_B0]
push	0
push	edx
call	sub_66B4F0
add	esp, 1Ch
test	ebp, ebp
jbe	short loc_65987A
push	ebp
mov	ecx, esi
call	sub_64C1F0

loc_65987A:
mov	ecx, edi
call	sub_668A50
test	al, al
jz	loc_659A26
mov	ecx, [esp+0CCh+var_B8]
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_65989C
call	sub_658B70

loc_65989C:
mov	eax, [eax+0Ch]
mov	esi, [eax]
push	edi
lea	ecx, [esp+0D0h+var_78]
push	ecx
lea	ecx, [esp+0D4h+var_B0]
call	sub_652DC0
mov	edx, [eax]
mov	eax, [esp+0CCh+var_BC]
mov	ecx, [eax]
push	esi
push	edx
push	ecx
push	offset aExecuteeventFi ; "!!! ExecuteEvent finished '%s' = %p for"...
push	edi
call	nullsub_2
add	esp, 14h
test	[esp+0CCh+var_70], 2
jnz	short loc_6598DD
mov	ecx, [esp+0CCh+var_78]
test	ecx, ecx
jz	short loc_6598DD
call	sub_64B3B0

loc_6598DD:
test	[esp+0CCh+var_70], 1
mov	[esp+0CCh+var_78], 0
jnz	loc_659A26
mov	ecx, [esp+0CCh+var_74]
jmp	loc_659A1D

loc_6598F9:
cmp	byte ptr [ebp+0Ch], 0
jnz	loc_659A26
inc	[esp+0CCh+var_B4]
mov	ecx, edi
call	sub_668A50
test	al, al
jz	short loc_659982
mov	ecx, [esp+0CCh+var_B8]
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_659925
call	sub_658B70

loc_659925:
mov	edx, [eax+0Ch]
mov	esi, [edx]
push	edi
lea	eax, [esp+0D0h+var_94]
push	eax
lea	ecx, [esp+0D4h+var_B0]
call	sub_652DC0
mov	ecx, [eax]
mov	edx, [esp+0CCh+var_BC]
mov	eax, [edx]
push	esi
push	ecx
push	eax
push	offset aExecuteeventSt ; "\n!!!	ExecuteEvent started '%s' = %p for"...
push	edi
call	nullsub_2
add	esp, 14h
test	byte ptr [esp+0CCh+var_8C], 2
jnz	short loc_659966
mov	ecx, [esp+0CCh+var_94]
test	ecx, ecx
jz	short loc_659966
call	sub_64B3B0

loc_659966:
test	byte ptr [esp+0CCh+var_8C], 1
mov	[esp+0CCh+var_94], 0
jnz	short loc_659982
mov	ecx, [esp+0CCh+var_90]
test	ecx, ecx
jz	short loc_659982
call	sub_64B3B0

loc_659982:
mov	ecx, [edi+8]
sub	ecx, [edi+0Ch]
mov	edx, [edi+1Ch]
push	0
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-1Fh]
push	eax
push	0
push	edi
push	ebx
lea	ecx, [esp+0E0h+var_B0]
push	0
push	ecx
call	sub_66B4F0
add	esp, 1Ch
mov	ecx, edi
call	sub_668A50
test	al, al
jz	short loc_659A26
mov	ecx, [esp+0CCh+var_B8]
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_6599C9
call	sub_658B70

loc_6599C9:
mov	edx, [eax+0Ch]
mov	esi, [edx]
push	edi
lea	eax, [esp+0D0h+var_84]
push	eax
lea	ecx, [esp+0D4h+var_B0]
call	sub_652DC0
mov	ecx, [eax]
mov	edx, [esp+0CCh+var_BC]
mov	eax, [edx]
push	esi
push	ecx
push	eax
push	offset aExecuteeventFi ; "!!! ExecuteEvent finished '%s' = %p for"...
push	edi
call	nullsub_2
add	esp, 14h
test	[esp+0CCh+var_7C], 2
jnz	short loc_659A0A
mov	ecx, [esp+0CCh+var_84]
test	ecx, ecx
jz	short loc_659A0A
call	sub_64B3B0

loc_659A0A:
test	[esp+0CCh+var_7C], 1
mov	[esp+0CCh+var_84], 0
jnz	short loc_659A26
mov	ecx, [esp+0CCh+var_80]

loc_659A1D:
test	ecx, ecx
jz	short loc_659A26
call	sub_64B3B0

loc_659A26:
cmp	[esp+0CCh+var_B4], 0
mov	eax, [esp+0CCh+var_BC]
setnz	bl
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebp
jnz	short loc_659A46
call	sub_650DF0

loc_659A46:
lea	ecx, [esp+0C4h+var_B0]
call	sub_652830
mov	ecx, [esp+0C4h+var_88]
test	ecx, ecx
jz	short loc_659A5C
call	sub_64A400

loc_659A5C:
mov	ecx, [esp+0C4h+var_B8]
call	sub_64A400
pop	esi
mov	al, bl
pop	ebx
add	esp, 0BCh
retn	4
sub_659450 endp

align 10h



sub_659A80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
push	ebp
mov	ebp, ecx
mov	ecx, [eax+0Ch]
shr	ecx, 1Dh
push	esi
push	edi
test	cl, 1
jnz	short loc_659AE5
mov	ecx, ebx
call	sub_650650
test	eax, eax
jbe	loc_659B3D
push	0
mov	ecx, ebx
call	sub_650680
cmp	eax, 5Fh
jnz	loc_659B3D
lea	edx, [esp+10h+arg_4]
push	edx
mov	ecx, ebx
call	sub_6518E0
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax+0Ch]
shr	ecx, 1Ch
test	cl, 1
mov	ecx, eax
jz	short loc_659B2D
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_659AE5
call	sub_650DF0

loc_659AE5:
lea	esi, [ebp-78h]
push	ebx
mov	ecx, esi
call	sub_6593C0
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_659B3D
cmp	edi, 1Fh
jg	short loc_659B3D
mov	edx, [esi]
mov	eax, [edx+118h]
mov	ecx, esi
call	eax
mov	edx, 1
mov	ecx, edi
shl	edx, cl
test	edx, eax
jz	short loc_659B3D
cmp	edi, 1Fh
jnz	short loc_659B87
and	dword ptr [esi+0A0h], 0FFFFF9FFh
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8

loc_659B2D:
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_659B3D
call	sub_650DF0

loc_659B3D:
mov	eax, [ebp-78h]
mov	edx, [eax+104h]
lea	ecx, [ebp-78h]
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_659B87
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	edx, [esi+10h]
mov	eax, [esp+10h+arg_0]
mov	edx, [edx+18h]
lea	ecx, [esi+10h]
push	ebx
push	eax
call	edx
mov	ecx, esi
test	al, al
jz	short loc_659B82
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8

loc_659B82:
call	sub_64B3B0

loc_659B87:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	8
sub_659A80 endp



; Attributes: bp-based frame

sub_659B90 proc	near

var_88=	qword ptr -88h
var_54=	qword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	qword ptr -48h
var_40=	dword ptr -40h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 74h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_4]
mov	eax, [edi]
mov	ebx, ecx
mov	ecx, [eax+0Ch]
shr	ecx, 1Dh
mov	dword ptr [esp+80h+var_54+4], ebx
test	cl, 1
jnz	short loc_659BF8
mov	ecx, edi
call	sub_650650
test	eax, eax
jbe	short loc_659C39
push	0
mov	ecx, edi
call	sub_650680
cmp	eax, 5Fh
jnz	short loc_659C39
lea	edx, [esp+80h+var_4C]
push	edx
mov	ecx, edi
call	sub_6518E0
mov	eax, [esp+80h+var_4C]
mov	ecx, [eax+0Ch]
shr	ecx, 1Ch
test	cl, 1
mov	ecx, eax
jz	short loc_659C29
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_659BF8
call	sub_650DF0

loc_659BF8:
lea	esi, [ebx-78h]
push	edi
mov	ecx, esi
call	sub_6593C0
mov	edi, [ebp+arg_8]
mov	edx, [esi]
push	0
push	edi
mov	[esp+88h+var_4C], eax
push	eax
mov	eax, [edx+11Ch]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_659C41
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_659C29:
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_659C39
call	sub_650DF0

loc_659C39:
mov	edi, [ebp+arg_8]
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_659C41:
mov	eax, [esp+80h+var_4C]
add	eax, 0FFFFFFA9h
cmp	eax, 1Ah	; switch 27 cases
ja	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
movzx	ecx, ds:byte_65A210[eax]
jmp	ds:off_65A1EC[ecx*4] ; switch jump

loc_659C5F:		; jumptable 00659C58 case 0
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, esi
call	sub_654920
mov	dl, [ebx-2]
mov	eax, [esi]
shr	dl, 1
test	dl, 1
mov	edx, [eax+54h]
push	esi
mov	ecx, esi
jz	short loc_659CB4
call	edx
mov	ecx, eax
call	sub_6983F0
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_659CB4:
call	edx
mov	ecx, eax
call	sub_69A780
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_659CC2:		; jumptable 00659C58 case 1
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_651D80
mov	ecx, [ebx+28h]
shr	ecx, 2
and	cl, 1
mov	byte ptr [esp+80h+var_4C], al
cmp	al, cl
jz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esp+80h+var_4C]
push	edx
mov	ecx, esi
call	sub_654940
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
push	eax
mov	ecx, esi
call	sub_656230
mov	eax, [ebx-58h]
test	eax, eax
jz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	eax, [eax+0A0h]
shr	eax, 2
test	al, 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+12Ch]
mov	ecx, esi
call	eax
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_659D4B:		; jumptable 00659C58 case 26
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_653400
fstp	[esp+80h+var_48]
mov	ecx, edi
call	sub_651A30
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A5D0
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A640
test	al, al
jnz	short loc_659DC5
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A610
test	al, al
jz	short loc_659DC9

loc_659DC5:
fldz
jmp	short loc_659DCD

loc_659DC9:
fld	[esp+80h+var_48]

loc_659DCD:
fstp	[esp+80h+var_4C]
push	ecx		; float
fld	[esp+84h+var_4C]
mov	ecx, esi
fstp	dword ptr [esp+84h+var_88+4]
call	sub_656350
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_659DE5:		; jumptable 00659C58 case 21
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_653400
fstp	[esp+80h+var_48]
mov	ecx, edi
call	sub_651A30
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A5D0
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A640
test	al, al
jnz	short loc_659E5F
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A610
test	al, al
jz	short loc_659E65

loc_659E5F:
fldz
fstp	[esp+80h+var_48]

loc_659E65:
mov	ecx, esi
call	sub_656560
fld	[esp+80h+var_48]
mov	ecx, [ebx+20h]
push	esi
fstp	qword ptr [ecx+38h]
call	sub_64A800
add	esp, 4
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_659E84:		; jumptable 00659C58 case 22
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_653400
fstp	[esp+80h+var_48]
mov	ecx, edi
call	sub_651A30
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A5D0
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A640
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A610
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	ecx, esi
call	sub_656560
fld	[esp+80h+var_48]
mov	ecx, [ebx+20h]
push	esi
fstp	qword ptr [ecx+40h]
call	sub_64A800
add	esp, 4
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_659F25:		; jumptable 00659C58 case 25
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, edi
call	sub_652C20
mov	ebx, eax
mov	[esp+80h+var_4C], ebx
test	ebx, ebx
jz	short loc_659F7F
mov	eax, [ebx+10h]
mov	edx, [eax+8]
lea	ecx, [ebx+10h]
call	edx
cmp	eax, 7
jnz	loc_65A00B
lea	ecx, [esp+80h+var_40] ;	void *
call	sub_64F7C0
mov	eax, [ebx+3Ch]
xor	edi, edi
mov	dword ptr [esp+80h+var_48], eax
test	eax, eax
jle	short loc_659FDF
jmp	short loc_659FB4

loc_659F7F:
mov	eax, dword ptr [esp+80h+var_54+4]
mov	eax, [eax-1Ch]
test	eax, eax
jz	loc_65A00B
push	eax
call	sub_655200
mov	ecx, dword ptr [esp+84h+var_54+4]
mov	dword ptr [ecx-1Ch], 0
add	esp, 4
mov	ecx, esi
call	sub_656560
jmp	short loc_65A00B
jmp	short loc_659FB0
align 10h

loc_659FB0:
mov	ebx, [esp+80h+var_4C]

loc_659FB4:
mov	edx, [ebx+38h]
mov	ebx, [edx+edi*4]
test	ebx, ebx
jz	short loc_659FD8
mov	ecx, ebx
call	sub_651A50
test	al, al
jz	short loc_659FD8
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, ebx
call	sub_653400
fstp	[esp+edi*4+80h+var_40]

loc_659FD8:
inc	edi
cmp	edi, dword ptr [esp+80h+var_48]
jl	short loc_659FB0

loc_659FDF:
mov	ecx, esi
call	sub_656560
push	0
mov	ecx, esi
call	sub_6554A0
lea	ecx, [esp+80h+var_40]
call	sub_64F5C0
test	al, al
jz	short loc_65A008
lea	ecx, [esp+80h+var_40]
push	ecx
mov	ecx, esi
call	sub_64A710

loc_65A008:
mov	edi, [ebp+arg_8]

loc_65A00B:
mov	ebx, dword ptr [esp+80h+var_54+4]

loc_65A00F:		; default
mov	esi, [ebp+arg_0] ; jumptable 00659C58 cases 3-20
cmp	byte ptr [esi+7Ch], 6
mov	ecx, [ebp+arg_4]
jbe	loc_65A169
mov	eax, [esi+78h]
mov	edx, [ecx]
cmp	edx, [eax+144h]
jnz	loc_65A1B0
cmp	byte ptr [edi],	0Ah
jz	loc_65A1B0
mov	esi, [ebx]
push	0
mov	ecx, edi
add	esi, 34h
call	sub_652C20
push	eax
mov	eax, [ebp+arg_0]
add	eax, 78h
push	eax
mov	eax, [esi]
mov	ecx, ebx
call	eax
jmp	loc_65A1AD

loc_65A05A:		; jumptable 00659C58 cases 23,24
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	short loc_65A00F ; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_653400
fstp	[esp+80h+var_48]
mov	ecx, edi
call	sub_651A30
test	al, al
jnz	short loc_65A00F ; default
			; jumptable 00659C58 cases 3-20
fld	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_64A5D0
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	ecx, esi
call	sub_656560
fld	[esp+80h+var_48]
fld	ds:dbl_15FD478
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fld	ds:dbl_15FCD10
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_65A0D3
fsub	ds:dbl_15FD478
jmp	short loc_65A0E8

loc_65A0D3:
fld	ds:dbl_1431740
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_65A0E8
fadd	ds:dbl_15FD478

loc_65A0E8:
cmp	[esp+80h+var_4C], 6Eh
jnz	short loc_65A103
mov	ecx, [ebx+20h]
push	esi
fstp	qword ptr [ecx+48h]
call	sub_64A800
add	esp, 4
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_65A103:
mov	edx, [ebx+20h]
push	esi
fstp	qword ptr [edx+50h]
call	sub_64A800
add	esp, 4
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_65A117:		; jumptable 00659C58 case 2
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	ecx, edi
call	sub_651A30
test	al, al
jnz	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_653750
mov	edx, [esi]
mov	edx, [edx+130h]
mov	[ebx+2Eh], ax
movzx	eax, ax
push	eax
mov	ecx, esi
call	edx
jmp	loc_65A00F	; default
			; jumptable 00659C58 cases 3-20

loc_65A169:
mov	ecx, [ecx]
cmp	dword ptr [ecx+4], 0
jnz	short loc_65A176
call	sub_651580

loc_65A176:
mov	edx, [esi+78h]
mov	eax, [edx+144h]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	eax, [eax+4]
cmp	eax, [edx+4]
jnz	short loc_65A1B0
cmp	byte ptr [edi],	0Ah
jz	short loc_65A1B0
mov	esi, [ebx]
push	0
mov	ecx, edi
add	esi, 34h
call	sub_652C20
mov	edx, [esi]
push	eax
mov	eax, [ebp+arg_0]
add	eax, 78h
push	eax
mov	ecx, ebx
call	edx

loc_65A1AD:
mov	esi, [ebp+arg_0]

loc_65A1B0:
mov	eax, [ebx-78h]
mov	edx, [eax+104h]
lea	ecx, [ebx-78h]
call	edx
test	eax, eax
jz	short loc_65A1DF
mov	edx, [ebp+arg_C]
push	edx
mov	edx, [ebp+arg_4]
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
push	edi
push	edx
push	esi
call	eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_65A1DF:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_659B90 endp

align 4
off_65A1EC dd offset loc_659C5F	; jump table for switch	statement
dd offset loc_659CC2
dd offset loc_65A117
dd offset loc_659DE5
dd offset loc_659E84
dd offset loc_65A05A
dd offset loc_659F25
dd offset loc_659D4B
dd offset loc_65A00F
byte_65A210 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     3,     4,     5
db	5,     6,     7
align 10h



sub_65A230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
push	ebp
mov	ebp, ecx
mov	ecx, [eax+0Ch]
shr	ecx, 1Dh
push	esi
push	edi
test	cl, 1
jnz	short loc_65A291
mov	ecx, ebx
call	sub_650650
test	eax, eax
jbe	loc_65A2DA
push	0
mov	ecx, ebx
call	sub_650680
cmp	eax, 5Fh
jnz	short loc_65A2DA
lea	edx, [esp+10h+arg_4]
push	edx
mov	ecx, ebx
call	sub_6518E0
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax+0Ch]
shr	ecx, 1Ch
test	cl, 1
mov	ecx, eax
jz	short loc_65A2CA
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65A291
call	sub_650DF0

loc_65A291:
lea	esi, [ebp-78h]
push	ebx
mov	ecx, esi
call	sub_6593C0
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_65A2DA
cmp	edi, 1Fh
jg	short loc_65A2DA
mov	edx, [esi]
mov	eax, [edx+118h]
mov	ecx, esi
call	eax
mov	edx, 1
mov	ecx, edi
shl	edx, cl
test	edx, eax
jz	short loc_65A2DA
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	0Ch

loc_65A2CA:
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65A2DA
call	sub_650DF0

loc_65A2DA:
mov	eax, [ebp-78h]
mov	edx, [eax+104h]
lea	ecx, [ebp-78h]
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_65A322
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [esp+10h+arg_8]
mov	edx, [esi+10h]
mov	edx, [edx+24h]
push	eax
mov	eax, [esp+14h+arg_0]
lea	ecx, [esi+10h]
push	ebx
push	eax
call	edx
mov	ecx, esi
mov	bl, al
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
retn	0Ch

loc_65A322:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	0Ch
sub_65A230 endp

align 10h



sub_65A330 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
xor	ecx, ecx
mov	[esi], ecx
mov	[esi+4], ecx
mov	[esi+8], ecx
mov	ebx, [eax+4]
mov	ebp, [eax]
cmp	ebx, ecx
jz	short loc_65A370
push	edi
mov	edi, [esi+4]
lea	eax, [edi+ebx]
push	eax
push	esi
mov	ecx, esi
call	sub_6572D0
imul	edi, 9Ch
add	edi, [esi]
push	ebp
push	ebx
push	edi
call	sub_657110
add	esp, 0Ch
pop	edi

loc_65A370:
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65A330 endp

align 10h



sub_65A380 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_65A3CC
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_65A394:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_65A3AF
lea	ecx, [esi+18h]
call	sub_6806F0
mov	dword ptr [esi], 0FFFFFFFEh

loc_65A3AF:
add	edi, 24h
sub	ebp, 1
jnz	short loc_65A394
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_65A3CC:
pop	ebx
retn
sub_65A380 endp

align 10h



sub_65A3D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
xor	ecx, ecx
mov	[esi], ecx
mov	[esi+4], ecx
mov	[esi+8], ecx
mov	ebx, [eax+4]
mov	ebp, [eax]
cmp	ebx, ecx
jz	short loc_65A412
push	edi
mov	edi, [esi+4]
lea	eax, [edi+ebx]
push	eax
push	esi
mov	ecx, esi
call	sub_6572D0
imul	edi, 9Ch
add	edi, [esi]
push	ebp
push	ebx
push	edi
call	sub_657110
add	esp, 0Ch
xor	ecx, ecx
pop	edi

loc_65A412:
fldz
mov	[esi+10h], ecx
fst	dword ptr [esi+14h]
mov	eax, esi
fst	dword ptr [esi+18h]
fst	dword ptr [esi+1Ch]
fstp	dword ptr [esi+20h]
mov	[esi+2Ch], ecx
mov	[esi+30h], ecx
mov	[esi+34h], ecx
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65A3D0 endp

align 10h



sub_65A440 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
mov	ebx, [edi+280h]
mov	eax, [edi+2B4h]
add	edi, 2B4h
test	eax, eax
jz	short loc_65A468
cmp	dword ptr [eax], 8Fh
jnb	short loc_65A475

loc_65A468:
push	8Fh
push	edi
mov	ecx, edi
call	sub_657320

loc_65A475:
cmp	off_167D058, 0
mov	esi, offset off_167D058
jz	loc_65A509
lea	eax, [esp+18h+var_C]
lea	ecx, [esp+18h+arg_0]
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], ecx
push	ebp

loc_65A498:
mov	edx, [esi]
mov	eax, edx
lea	ebp, [eax+1]
nop

loc_65A4A0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_65A4A0
sub	eax, ebp
mov	ecx, eax
movzx	eax, byte ptr [esi+8]
neg	eax
sbb	eax, eax
and	eax, 10000000h
or	eax, 20000000h
push	eax
push	ecx
push	edx
mov	ecx, ebx
call	sub_650E40
mov	[esp+1Ch+var_C], eax
inc	dword ptr [eax+8]
mov	dl, [esi+4]
mov	eax, [esp+1Ch+var_C]
mov	byte ptr [esp+1Ch+arg_0], dl
mov	ecx, [eax+0Ch]
push	ecx
lea	edx, [esp+20h+var_8]
push	edx
push	edi
mov	ecx, edi
call	sub_6575E0
mov	eax, [esp+1Ch+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65A500
call	sub_650DF0

loc_65A500:
add	esi, 0Ch
cmp	dword ptr [esi], 0
jnz	short loc_65A498
pop	ebp

loc_65A509:
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn
sub_65A440 endp



; Attributes: bp-based frame

sub_65A510 proc	near

var_CC=	dword ptr -0CCh
var_C8=	qword ptr -0C8h
var_9C=	qword ptr -9Ch
var_94=	qword ptr -94h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	qword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 0B4h
cmp	[ebp+arg_8], 0
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	ebx, ecx
jz	short loc_65A550
test	edi, edi
jl	short loc_65A533
cmp	edi, 15h
jle	short loc_65A550

loc_65A533:
push	edi
push	offset aInvalidSetprop ; "Invalid SetProperty request, property	n"...
add	ebx, 0Ch
push	ebx
call	sub_656080
add	esp, 0Ch

loc_65A545:		; default
xor	al, al		; jumptable 0065A581 cases 24,28
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65A550:
cmp	edi, 0FFFFFFFFh
jz	short loc_65A545 ; default
			; jumptable 0065A581 cases 24,28
cmp	edi, 1Fh
jg	short loc_65A545 ; default
			; jumptable 0065A581 cases 24,28
mov	eax, [ebx]
mov	edx, [eax+118h]
call	edx
mov	edx, 1
mov	ecx, edi
shl	edx, cl
test	edx, eax
jz	short loc_65A545 ; default
			; jumptable 0065A581 cases 24,28
mov	eax, [ebx]
mov	edx, [eax+70h]
mov	ecx, ebx
call	edx
mov	esi, eax
cmp	edi, 1Fh	; switch 32 cases
ja	short loc_65A545 ; default
			; jumptable 0065A581 cases 24,28
jmp	ds:off_65B56C[edi*4] ; switch jump

loc_65A588:		; jumptable 0065A581 case 0
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_9C+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_9C+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_9C+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A640
test	al, al
jnz	short loc_65A5E3
fld	[esp+0C0h+var_9C+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A610
test	al, al
jz	short loc_65A5E9

loc_65A5E3:
fldz
fstp	[esp+0C0h+var_9C+4]

loc_65A5E9:
mov	eax, [ebx]
mov	edx, [eax+20h]
push	0
mov	ecx, ebx
call	edx
fld	dword ptr [ebx+44h]
fstp	[esp+0C0h+var_88]
sub	esp, 8
fld	dword ptr [ebx+48h]
fstp	[esp+0C8h+var_84]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0C8h+var_80]
fld	dword ptr [ebx+50h]
fstp	[esp+0C8h+var_7C]
fld	dword ptr [ebx+54h]
fstp	[esp+0C8h+var_78]
fld	dword ptr [ebx+58h]
fstp	dword ptr [esp+0C8h+var_74]
fld	[esp+0C8h+var_9C+4]
fmul	ds:dbl_15FCE20
fstp	[esp+0C8h+var_C8]
call	_floor
add	esp, 8
call	__ftol2_sse
mov	ecx, [ebx+98h]
mov	[ecx], eax
mov	edx, [ebx+98h]
fild	dword ptr [edx]
lea	ecx, [esp+0C0h+var_88]
fstp	[esp+0C0h+var_80]
call	sub_64E820
test	al, al
jz	short loc_65A668 ; jumptable 0065A581 cases 16,18,19
lea	eax, [esp+0C0h+var_88]
push	eax
mov	ecx, ebx
call	sub_64A6E0

loc_65A668:		; jumptable 0065A581 cases 16,18,19
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65A673:		; jumptable 0065A581 case 1
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_9C+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_65A668 ; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_9C+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	short loc_65A668 ; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_9C+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A640
test	al, al
jnz	short loc_65A6C6
fld	[esp+0C0h+var_9C+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A610
test	al, al
jz	short loc_65A6CC

loc_65A6C6:
fldz
fstp	[esp+0C0h+var_9C+4]

loc_65A6CC:
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
fld	dword ptr [ebx+44h]
fstp	[esp+0C0h+var_88]
sub	esp, 8
fld	dword ptr [ebx+48h]
fstp	[esp+0C8h+var_84]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0C8h+var_80]
fld	dword ptr [ebx+50h]
fstp	[esp+0C8h+var_7C]
fld	dword ptr [ebx+54h]
fstp	[esp+0C8h+var_78]
fld	dword ptr [ebx+58h]
fstp	dword ptr [esp+0C8h+var_74]
fld	[esp+0C8h+var_9C+4]
fmul	ds:dbl_15FCE20
fstp	[esp+0C8h+var_C8]
call	_floor
add	esp, 8
call	__ftol2_sse
mov	ecx, [ebx+98h]
mov	[ecx+4], eax
mov	edx, [ebx+98h]
fild	dword ptr [edx+4]
lea	ecx, [esp+0C0h+var_88]
fstp	dword ptr [esp+0C0h+var_74]
call	sub_64E820
test	al, al
jz	loc_65A668	; jumptable 0065A581 cases 16,18,19
lea	eax, [esp+0C0h+var_88]
push	eax
mov	ecx, ebx
call	sub_64A6E0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65A75C:		; jumptable 0065A581 case 2
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_94+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_94+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_94+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A640
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_94+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A610
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
mov	eax, [ebx+98h]
fld	dword ptr [eax+20h]
add	eax, 20h
fstp	[esp+0C0h+var_88]
lea	ecx, [esp+0C0h+var_88]
fld	dword ptr [eax+4]
fstp	[esp+0C0h+var_84]
fld	dword ptr [eax+8]
fstp	[esp+0C0h+var_80]
fld	dword ptr [eax+0Ch]
fstp	[esp+0C0h+var_7C]
fld	dword ptr [eax+10h]
fstp	[esp+0C0h+var_78]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0C0h+var_80]
fld	dword ptr [ebx+58h]
fstp	dword ptr [esp+0C0h+var_74]
call	sub_64EAA0
mov	ecx, [ebx+98h]
fst	[esp+0C0h+var_74+4]
fld	[esp+0C0h+var_94+4]
fst	qword ptr [ecx+8]
fldz
fld	st
fucomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 44h
jnp	loc_65A8E5
fcomp	ds:dbl_1431738
fnstsw	ax
test	ah, 41h
jz	loc_65A8E7
fstp	st

loc_65A844:
mov	edx, [ebx+98h]
fld	qword ptr [edx+18h]
mov	esi, edx
fmul	ds:dbl_1431730
lea	ecx, [esp+0C0h+var_88]
add	esi, 10h
fdiv	ds:dbl_15FCD10
fstp	[esp+0C0h+var_9C+4]
call	sub_64EAE0
fsubr	[esp+0C0h+var_9C+4]
push	ecx		; float
lea	ecx, [esp+0C4h+var_88]
fstp	dword ptr [esp+0C4h+var_9C+4]
fld	dword ptr [esp+0C4h+var_9C+4]
fstp	dword ptr [esp+0C4h+var_C8+4]
call	sub_64EAC0
fld	ds:dbl_15FCBF8
sub	esp, 8
fmul	st(1), st
fld	qword ptr [esi]
fdivrp	st(2), st
fxch	st(1)
fstp	dword ptr [esp+0CCh+var_9C+4]
fld	dword ptr [esp+0CCh+var_9C+4]
fstp	dword ptr [esp+0CCh+var_C8]
fmul	[esp+0CCh+var_74+4]
fdivr	[esp+0CCh+var_94+4]
fstp	dword ptr [esp+0CCh+var_9C+4]
fld	dword ptr [esp+0CCh+var_9C+4]

loc_65A8B1:
lea	eax, [esp+0CCh+var_88]
fstp	[esp+0CCh+var_CC]
push	eax		; int
call	sub_655040
add	esp, 10h
lea	ecx, [esp+0C0h+var_88]
call	sub_64E820
test	al, al
jz	short loc_65A8DA
lea	ecx, [esp+0C0h+var_88]
push	ecx
mov	ecx, ebx
call	sub_64A6E0

loc_65A8DA:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65A8E5:
fstp	st

loc_65A8E7:
fstp	[esp+0C0h+var_94+4]
fld1
fstp	[esp+0C0h+var_74+4]
jmp	loc_65A844

loc_65A8F6:		; jumptable 0065A581 case 3
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_94+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_94+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_94+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A640
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_94+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A610
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
mov	eax, [ebx+98h]
fld	dword ptr [eax+20h]
add	eax, 20h
fstp	[esp+0C0h+var_88]
lea	ecx, [esp+0C0h+var_88]
fld	dword ptr [eax+4]
fstp	[esp+0C0h+var_84]
fld	dword ptr [eax+8]
fstp	[esp+0C0h+var_80]
fld	dword ptr [eax+0Ch]
fstp	[esp+0C0h+var_7C]
fld	dword ptr [eax+10h]
fstp	[esp+0C0h+var_78]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0C0h+var_80]
fld	dword ptr [ebx+58h]
fstp	dword ptr [esp+0C0h+var_74]
call	sub_64EAC0
mov	ecx, [ebx+98h]
fst	[esp+0C0h+var_74+4]
fld	[esp+0C0h+var_94+4]
fst	qword ptr [ecx+10h]
fldz
fld	st
fucomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 44h
jnp	loc_65AA4C
fcomp	ds:dbl_1431738
fnstsw	ax
test	ah, 41h
jz	short loc_65AA4E
fstp	st

loc_65A9DA:
mov	edx, [ebx+98h]
fld	qword ptr [edx+18h]
mov	esi, edx
fmul	ds:dbl_1431730
lea	ecx, [esp+0C0h+var_88]
add	esi, 8
fdiv	ds:dbl_15FCD10
fstp	[esp+0C0h+var_9C+4]
call	sub_64EAE0
fsubr	[esp+0C0h+var_9C+4]
sub	esp, 8
lea	ecx, [esp+0C8h+var_88]
fstp	dword ptr [esp+0C8h+var_9C+4]
fld	dword ptr [esp+0C8h+var_9C+4]
fstp	dword ptr [esp+0C8h+var_C8+4]
fld	[esp+0C8h+var_74+4]
fmul	ds:dbl_15FCBF8
fdivr	[esp+0C8h+var_94+4]
fstp	dword ptr [esp+0C8h+var_9C+4]
fld	dword ptr [esp+0C8h+var_9C+4]
fstp	dword ptr [esp+0C8h+var_C8]
call	sub_64EAA0
fmul	ds:dbl_15FCBF8
push	ecx
fdivr	qword ptr [esi]
fstp	dword ptr [esp+0CCh+var_9C+4]
fld	dword ptr [esp+0CCh+var_9C+4]
jmp	loc_65A8B1

loc_65AA4C:
fstp	st

loc_65AA4E:
fstp	[esp+0C0h+var_94+4]
fld1
fstp	[esp+0C0h+var_74+4]
jmp	short loc_65A9DA

loc_65AA5A:		; jumptable 0065A581 case 10
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_74+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
fld	[esp+0C0h+var_74+4]
fld	ds:dbl_15FD478
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fst	[esp+0C0h+var_74+4]
fld	ds:dbl_15FCD10
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_65AAC4
fsub	ds:dbl_15FD478
jmp	short loc_65AAD9

loc_65AAC4:
fld	ds:dbl_1431740
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_65AADD
fadd	ds:dbl_15FD478

loc_65AAD9:
fst	[esp+0C0h+var_74+4]

loc_65AADD:
mov	ecx, [ebx+98h]
fstp	qword ptr [ecx+18h]
mov	eax, [ebx+98h]
fld	dword ptr [eax+20h]
add	eax, 20h
fstp	[esp+0C0h+var_88]
lea	ecx, [esp+0C0h+var_88]
fld	dword ptr [eax+4]
fstp	[esp+0C0h+var_84]
fld	dword ptr [eax+8]
fstp	[esp+0C0h+var_80]
fld	dword ptr [eax+0Ch]
fstp	[esp+0C0h+var_7C]
fld	dword ptr [eax+10h]
fstp	[esp+0C0h+var_78]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0C0h+var_80]
fld	dword ptr [ebx+58h]
fstp	dword ptr [esp+0C0h+var_74]
call	sub_64EAE0
fld	[esp+0C0h+var_74+4]
mov	esi, [ebx+98h]
fmul	ds:dbl_1431730
mov	edi, [ebx+98h]
push	ecx		; float
lea	ecx, [esp+0C4h+var_88]
fdiv	ds:dbl_15FCD10
add	esi, 10h
add	edi, 8
fsubrp	st(1), st
fstp	dword ptr [esp+0C4h+var_9C+4]
fld	dword ptr [esp+0C4h+var_9C+4]
fstp	dword ptr [esp+0C4h+var_C8+4]
call	sub_64EAC0
fmul	ds:dbl_15FCBF8
push	ecx		; float
lea	ecx, [esp+0C8h+var_88]
fdivr	qword ptr [esi]
fstp	dword ptr [esp+0C8h+var_9C+4]
fld	dword ptr [esp+0C8h+var_9C+4]
fstp	dword ptr [esp+0C8h+var_C8]
call	sub_64EAA0
fmul	ds:dbl_15FCBF8
push	ecx		; float
lea	edx, [esp+0CCh+var_88]
fdivr	qword ptr [edi]
fstp	dword ptr [esp+0CCh+var_9C+4]
fld	dword ptr [esp+0CCh+var_9C+4]
fstp	[esp+0CCh+var_CC]
push	edx		; int
call	sub_655040
add	esp, 10h
lea	ecx, [esp+0C0h+var_88]
call	sub_64E820
test	al, al
jz	loc_65A668	; jumptable 0065A581 cases 16,18,19
lea	eax, [esp+0C0h+var_88]
push	eax
mov	ecx, ebx
call	sub_64A6E0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65ABC8:		; jumptable 0065A581 case 8
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_74+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A640
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A610
test	al, al
jz	short loc_65AC2D
fldz
fstp	[esp+0C0h+var_74+4]

loc_65AC2D:
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
mov	eax, [ebx+98h]
fld	dword ptr [eax+20h]
lea	ecx, [esp+0C0h+var_88]
fstp	[esp+0C0h+var_88]
fld	dword ptr [eax+24h]
fstp	[esp+0C0h+var_84]
fld	dword ptr [eax+28h]
fstp	[esp+0C0h+var_80]
fld	dword ptr [eax+2Ch]
fstp	[esp+0C0h+var_7C]
fld	dword ptr [eax+30h]
fstp	[esp+0C0h+var_78]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0C0h+var_80]
fld	dword ptr [ebx+58h]
fstp	dword ptr [esp+0C0h+var_74]
fld	[esp+0C0h+var_88]
fstp	[esp+0C0h+var_58]
fld	[esp+0C0h+var_84]
fstp	[esp+0C0h+var_54]
fld	[esp+0C0h+var_80]
fstp	[esp+0C0h+var_50]
fld	[esp+0C0h+var_7C]
fstp	[esp+0C0h+var_4C]
fld	[esp+0C0h+var_78]
fstp	[esp+0C0h+var_48]
fld	dword ptr [esp+0C0h+var_74]
fstp	[esp+0C0h+var_44]
fld	qword ptr [eax+18h]
fmul	ds:dbl_1431730
fdiv	ds:dbl_15FCD10
fstp	[esp+0C0h+var_9C+4]
call	sub_64EAE0
fsubr	[esp+0C0h+var_9C+4]
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
call	__CIcos
fstp	dword ptr [esp+0C0h+var_94+4]
fld	dword ptr [esp+0C0h+var_94+4]
fstp	dword ptr [esp+0C0h+var_94+4]
fld	dword ptr [esp+0C0h+var_9C+4]
call	__CIsin
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
lea	ecx, [esp+0C0h+var_40]
fstp	dword ptr [esp+0C0h+var_9C+4]
push	ecx
fld	dword ptr [esp+0C4h+var_94+4]
lea	ecx, [esp+0C4h+var_58]
fst	[esp+0C4h+var_40]
fld	dword ptr [esp+0C4h+var_9C+4]
fld	st
fchs
fstp	[esp+0C4h+var_3C]
fldz
fst	[esp+0C4h+var_38]
fstp	[esp+0C4h+var_2C]
fstp	[esp+0C4h+var_34]
fstp	[esp+0C4h+var_30]
call	sub_64EBB0
mov	edx, [ebx]
mov	edx, [edx+34h]
lea	eax, [esp+0C0h+var_58]
push	eax
lea	ecx, [esp+0C4h+var_10]
push	ecx
mov	ecx, ebx
call	edx
fld	dword ptr [eax+8]
fsub	dword ptr [eax]
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
fld	st
fabs
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
fcomp	ds:flt_1432398
fnstsw	ax
test	ah, 41h
jnz	short loc_65AD86
fld	[esp+0C0h+var_74+4]
fmul	ds:dbl_15FCE20
fstp	dword ptr [esp+0C0h+var_9C+4]
fdivr	dword ptr [esp+0C0h+var_9C+4]
jmp	short loc_65AD8A

loc_65AD86:
fstp	st
fldz

loc_65AD8A:
lea	ecx, [esp+0C0h+var_88]
fstp	[esp+0C0h+var_74+4]
call	sub_64EAA0
fst	[esp+0C0h+var_94+4]
fld	[esp+0C0h+var_74+4]
mov	eax, [ebx+98h]
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
fmul	st, st(1)
fmul	ds:dbl_15FCBF8
fst	[esp+0C0h+var_74+4]
fstp	qword ptr [eax+8]
fldz
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_65ADD7
fstp	[esp+0C0h+var_74+4]
fld1
fstp	[esp+0C0h+var_94+4]
jmp	short loc_65ADD9

loc_65ADD7:
fstp	st

loc_65ADD9:
mov	ecx, [ebx+98h]
fld	qword ptr [ecx+18h]
mov	esi, ecx
fmul	ds:dbl_1431730
lea	ecx, [esp+0C0h+var_88]
add	esi, 10h
fdiv	ds:dbl_15FCD10
fstp	[esp+0C0h+var_9C+4]
call	sub_64EAE0
fsubr	[esp+0C0h+var_9C+4]
push	ecx		; float
lea	ecx, [esp+0C4h+var_88]
fstp	dword ptr [esp+0C4h+var_9C+4]
fld	dword ptr [esp+0C4h+var_9C+4]
fstp	dword ptr [esp+0C4h+var_C8+4]
call	sub_64EAC0
fld	ds:dbl_15FCBF8
sub	esp, 8
fmul	st(1), st
fld	qword ptr [esi]
fdivrp	st(2), st
fxch	st(1)
fabs
fstp	dword ptr [esp+0CCh+var_9C+4]
fld	dword ptr [esp+0CCh+var_9C+4]
fstp	dword ptr [esp+0CCh+var_C8]
fmul	[esp+0CCh+var_94+4]
fdivr	[esp+0CCh+var_74+4]
fabs
fstp	dword ptr [esp+0CCh+var_9C+4]
fld	dword ptr [esp+0CCh+var_9C+4]

loc_65AE4A:
lea	edx, [esp+0CCh+var_88]
fstp	[esp+0CCh+var_CC]
push	edx		; int
call	sub_655040
mov	eax, [ebx+98h]
fld	qword ptr [eax+8]
add	esp, 10h
fabs
lea	ecx, [esp+0C0h+var_88]
fstp	qword ptr [eax+8]
mov	eax, [ebx+98h]
fld	qword ptr [eax+10h]
fabs
fstp	qword ptr [eax+10h]
call	sub_64E820
test	al, al
jz	loc_65A668	; jumptable 0065A581 cases 16,18,19
lea	eax, [esp+0C0h+var_88]
push	eax
mov	ecx, ebx
call	sub_64A6E0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65AE9E:		; jumptable 0065A581 case 9
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_74+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A640
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A610
test	al, al
jz	short loc_65AF03
fldz
fstp	[esp+0C0h+var_74+4]

loc_65AF03:
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
mov	eax, [ebx+98h]
fld	dword ptr [eax+20h]
lea	ecx, [esp+0C0h+var_88]
fstp	[esp+0C0h+var_88]
fld	dword ptr [eax+24h]
fstp	[esp+0C0h+var_84]
fld	dword ptr [eax+28h]
fstp	[esp+0C0h+var_80]
fld	dword ptr [eax+2Ch]
fstp	[esp+0C0h+var_7C]
fld	dword ptr [eax+30h]
fstp	[esp+0C0h+var_78]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0C0h+var_80]
fld	dword ptr [ebx+58h]
fstp	dword ptr [esp+0C0h+var_74]
fld	[esp+0C0h+var_88]
fstp	[esp+0C0h+var_58]
fld	[esp+0C0h+var_84]
fstp	[esp+0C0h+var_54]
fld	[esp+0C0h+var_80]
fstp	[esp+0C0h+var_50]
fld	[esp+0C0h+var_7C]
fstp	[esp+0C0h+var_4C]
fld	[esp+0C0h+var_78]
fstp	[esp+0C0h+var_48]
fld	dword ptr [esp+0C0h+var_74]
fstp	[esp+0C0h+var_44]
fld	qword ptr [eax+18h]
fmul	ds:dbl_1431730
fdiv	ds:dbl_15FCD10
fstp	[esp+0C0h+var_9C+4]
call	sub_64EAE0
fsubr	[esp+0C0h+var_9C+4]
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
call	__CIcos
fstp	dword ptr [esp+0C0h+var_94+4]
fld	dword ptr [esp+0C0h+var_94+4]
fstp	dword ptr [esp+0C0h+var_94+4]
fld	dword ptr [esp+0C0h+var_9C+4]
call	__CIsin
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
lea	ecx, [esp+0C0h+var_40]
fstp	dword ptr [esp+0C0h+var_9C+4]
push	ecx
fld	dword ptr [esp+0C4h+var_94+4]
lea	ecx, [esp+0C4h+var_58]
fst	[esp+0C4h+var_40]
fld	dword ptr [esp+0C4h+var_9C+4]
fld	st
fchs
fstp	[esp+0C4h+var_3C]
fldz
fst	[esp+0C4h+var_38]
fstp	[esp+0C4h+var_2C]
fstp	[esp+0C4h+var_34]
fstp	[esp+0C4h+var_30]
call	sub_64EBB0
mov	edx, [ebx]
mov	edx, [edx+34h]
lea	eax, [esp+0C0h+var_58]
push	eax
lea	ecx, [esp+0C4h+var_20]
push	ecx
mov	ecx, ebx
call	edx
fld	dword ptr [eax+0Ch]
fsub	dword ptr [eax+4]
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
fld	st
fabs
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
fcomp	ds:flt_1432398
fnstsw	ax
test	ah, 41h
jnz	short loc_65B05D
fld	[esp+0C0h+var_74+4]
fmul	ds:dbl_15FCE20
fstp	dword ptr [esp+0C0h+var_9C+4]
fdivr	dword ptr [esp+0C0h+var_9C+4]
jmp	short loc_65B061

loc_65B05D:
fstp	st
fldz

loc_65B061:
lea	ecx, [esp+0C0h+var_88]
fstp	[esp+0C0h+var_74+4]
call	sub_64EAC0
fst	[esp+0C0h+var_94+4]
fld	[esp+0C0h+var_74+4]
mov	eax, [ebx+98h]
fstp	dword ptr [esp+0C0h+var_9C+4]
fld	dword ptr [esp+0C0h+var_9C+4]
fmul	st, st(1)
fmul	ds:dbl_15FCBF8
fst	[esp+0C0h+var_74+4]
fstp	qword ptr [eax+10h]
fldz
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_65B0AE
fstp	[esp+0C0h+var_74+4]
fld1
fstp	[esp+0C0h+var_94+4]
jmp	short loc_65B0B0

loc_65B0AE:
fstp	st

loc_65B0B0:
mov	ecx, [ebx+98h]
fld	qword ptr [ecx+18h]
mov	esi, ecx
fmul	ds:dbl_1431730
lea	ecx, [esp+0C0h+var_88]
add	esi, 8
fdiv	ds:dbl_15FCD10
fstp	[esp+0C0h+var_9C+4]
call	sub_64EAE0
fsubr	[esp+0C0h+var_9C+4]
sub	esp, 8
lea	ecx, [esp+0C8h+var_88]
fstp	dword ptr [esp+0C8h+var_9C+4]
fld	dword ptr [esp+0C8h+var_9C+4]
fstp	dword ptr [esp+0C8h+var_C8+4]
fld	[esp+0C8h+var_94+4]
fmul	ds:dbl_15FCBF8
fdivr	[esp+0C8h+var_74+4]
fabs
fstp	dword ptr [esp+0C8h+var_9C+4]
fld	dword ptr [esp+0C8h+var_9C+4]
fstp	dword ptr [esp+0C8h+var_C8]
call	sub_64EAA0
fmul	ds:dbl_15FCBF8
push	ecx
fdivr	qword ptr [esi]
fabs
fstp	dword ptr [esp+0CCh+var_9C+4]
fld	dword ptr [esp+0CCh+var_9C+4]
jmp	loc_65AE4A

loc_65B126:		; jumptable 0065A581 case 6
push	esi
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_653400
fstp	[esp+0C0h+var_74+4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jnz	loc_65A668	; jumptable 0065A581 cases 16,18,19
fld	[esp+0C0h+var_74+4]
lea	esi, [ebx+24h]
fdiv	ds:dbl_15FCBF8
mov	ecx, 8
lea	edi, [esp+0C0h+var_40]
rep movsd
lea	ecx, [esp+0C0h+var_40]
push	ecx
mov	ecx, ebx
fstp	[esp+0C4h+var_28]
call	sub_64A770
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B1A2:		; jumptable 0065A581 case 7
mov	edi, [ebx]
mov	ecx, [ebp+arg_4]
push	esi
add	edi, 0CCh
call	sub_651D80
mov	edx, [edi]
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	edx
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B1C8:		; jumptable 0065A581 case 23
mov	ecx, [ebp+arg_4]
cmp	byte ptr [ecx],	5
jnz	short loc_65B249
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+0CCh+var_9C+4]
push	eax
call	sub_652F60
mov	ecx, dword ptr [esp+0C0h+var_9C+4]
mov	edx, [ecx]
push	edx
lea	ecx, [esp+0C4h+var_94+4]
call	sub_67AE10
mov	esi, 1

loc_65B1F4:
mov	eax, off_167D5C8[esi*4]
push	eax
lea	ecx, [esp+0C4h+var_94+4]
call	sub_654870
test	al, al
jnz	short loc_65B211
inc	esi
cmp	esi, 0Fh
jb	short loc_65B1F4
jmp	short loc_65B21B

loc_65B211:
mov	edx, [ebx]
mov	eax, [edx+24h]
push	esi
mov	ecx, ebx
call	eax

loc_65B21B:
lea	ecx, [esp+0C0h+var_94+4]
call	sub_4E40F0
mov	eax, dword ptr [esp+0C0h+var_9C+4]

loc_65B228:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_65A8DA
call	sub_650DF0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B249:
push	esi
call	sub_653400
call	__ftol2_sse
cmp	eax, 0Eh
jl	short loc_65B273
mov	edx, [ebx]
mov	eax, 0Eh
push	eax
mov	eax, [edx+24h]
mov	ecx, ebx
call	eax
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B273:
cmp	eax, 1
jg	short loc_65B27D
mov	eax, 1

loc_65B27D:
mov	edx, [ebx]
push	eax
mov	eax, [edx+24h]
mov	ecx, ebx
call	eax
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B292:		; jumptable 0065A581 case 13
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+0CCh+var_5C]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_652F60
mov	edx, [ebx]
mov	edx, [edx+28h]
lea	eax, [esp+0C0h+var_5C]
push	eax
mov	ecx, ebx
call	edx
mov	eax, [esp+0C0h+var_5C]
jmp	loc_65B228

loc_65B2BB:		; jumptable 0065A581 case 26
mov	ecx, [ebp+arg_4]
push	esi
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, ebx
call	sub_654990
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B2DA:		; jumptable 0065A581 case 27
mov	ecx, [ebp+arg_4]
push	esi
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	sub_654960
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B2F9:		; jumptable 0065A581 cases 4,5,11,12,14,15,20-22
mov	eax, [ebx+94h]
test	eax, eax
jnz	short loc_65B31A
mov	ecx, ebx
call	sub_658B70
test	eax, eax
jnz	short loc_65B31A
mov	edx, [ebx]
mov	eax, [edx+6Ch]
mov	ecx, ebx
call	eax
mov	eax, [eax+78h]

loc_65B31A:
add	eax, 8
mov	eax, [eax]
lea	ecx, [edi+edi*2]
mov	edx, off_167D058[ecx*4]
mov	ecx, [eax]
push	edx
push	ecx
push	offset aAttemptToWrite ; "Attempt to write read-only property %s."...
push	esi
call	sub_66D3C0
add	esp, 10h
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B346:		; jumptable 0065A581 case 29
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_65B37B
mov	edx, [ebx]
mov	eax, [edx+70h]
mov	ecx, ebx
call	eax
push	eax
mov	ecx, esi
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	sub_6549B0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B37B:
and	dword ptr [ebx+0A0h], 0FFFFFF9Fh
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B38D:		; jumptable 0065A581 case 30
mov	edx, [ebx]
mov	eax, [edx+70h]
mov	ecx, ebx
call	eax
mov	ecx, [ebp+arg_4]
push	eax
call	sub_653400
call	__ftol2_sse
mov	[ebx+0A4h], ax
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B3B6:		; jumptable 0065A581 case 17
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_65B3F2
mov	edx, [ebx]
mov	eax, [edx+70h]
mov	ecx, ebx
call	eax
push	eax
mov	ecx, esi
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	sub_6549E0
mov	ecx, ebx
call	sub_6555C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B3F2:
and	dword ptr [ebx+0A0h], 0FFFFFE7Fh
mov	ecx, ebx
call	sub_6555C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B40E:		; jumptable 0065A581 case 31
mov	esi, [ebp+arg_4]
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_65B443
mov	edx, [ebx]
mov	eax, [edx+70h]
mov	ecx, ebx
call	eax
push	eax
mov	ecx, esi
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	sub_654A10
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B443:
and	dword ptr [ebx+0A0h], 0FFFFF9FFh
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_65B458:		; jumptable 0065A581 case 25
mov	ecx, [ebp+arg_4]
push	esi
call	sub_652C20
mov	edi, eax
mov	dword ptr [esp+0C0h+var_9C+4], edi
test	edi, edi
jz	loc_65A8DA
mov	ecx, [esi+78h]
push	2
call	sub_66FB00
mov	edx, [edi+10h]
push	1
lea	ecx, [edi+10h]
push	eax
mov	eax, [edx+48h]
push	esi
call	eax
test	al, al
jz	loc_65A8DA
mov	eax, [ebx+0ACh]
xor	ecx, ecx
mov	dword ptr [esp+0C0h+var_74+4], ecx
mov	[esp+0C0h+var_6C], ecx
mov	[esp+0C0h+var_68], ecx
cmp	eax, ecx
jz	short loc_65B4B2
mov	byte ptr [esp+0C0h+var_60+3], 1
cmp	[eax+0Ch], cl
jnz	short loc_65B4B6

loc_65B4B2:
mov	byte ptr [esp+0C0h+var_60+3], cl

loc_65B4B6:
xor	eax, eax
cmp	[edi+3Ch], ecx
mov	dword ptr [esp+0C0h+var_94+4], eax
jle	short loc_65B513

loc_65B4C1:
mov	ecx, [edi+38h]
mov	ecx, [ecx+eax*4]
test	ecx, ecx
jz	short loc_65B505
push	esi
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_65B501
mov	ecx, [esi+78h]
push	25h
call	sub_66FB00
mov	edx, [edi+10h]
push	1
lea	ecx, [edi+10h]
push	eax
mov	eax, [edx+48h]
push	esi
call	eax
test	al, al
jz	short loc_65B501
add	edi, 34h
push	edi
lea	ecx, [esp+0C4h+var_74+4]
call	sub_659210

loc_65B501:
mov	edi, dword ptr [esp+0C0h+var_9C+4]

loc_65B505:
mov	eax, dword ptr [esp+0C0h+var_94+4]
inc	eax
cmp	eax, [edi+3Ch]
mov	dword ptr [esp+0C0h+var_94+4], eax
jl	short loc_65B4C1

loc_65B513:
mov	esi, [ebx]
sub	esp, 0Ch
lea	edx, [esp+0CCh+var_74+4]
mov	ecx, esp
push	edx
add	esi, 30h
call	sub_65A330
mov	eax, [esi]
mov	ecx, ebx
call	eax
cmp	[esp+0C0h+var_6C], 0
jnz	short loc_65B53B
cmp	byte ptr [esp+0C0h+var_60+3], 0
jz	short loc_65B54D

loc_65B53B:
mov	ecx, ebx
call	sub_6555C0
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax

loc_65B54D:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, dword ptr [esp+0C0h+var_74+4]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	al, 1
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_65A510 endp

align 4
off_65B56C dd offset loc_65A588	; jump table for switch	statement
dd offset loc_65A673
dd offset loc_65A75C
dd offset loc_65A8F6
dd offset loc_65B2F9
dd offset loc_65B2F9
dd offset loc_65B126
dd offset loc_65B1A2
dd offset loc_65ABC8
dd offset loc_65AE9E
dd offset loc_65AA5A
dd offset loc_65B2F9
dd offset loc_65B2F9
dd offset loc_65B292
dd offset loc_65B2F9
dd offset loc_65B2F9
dd offset loc_65A668
dd offset loc_65B3B6
dd offset loc_65A668
dd offset loc_65A668
dd offset loc_65B2F9
dd offset loc_65B2F9
dd offset loc_65B2F9
dd offset loc_65B1C8
dd offset loc_65A545
dd offset loc_65B458
dd offset loc_65B2BB
dd offset loc_65B2DA
dd offset loc_65A545
dd offset loc_65B346
dd offset loc_65B38D
dd offset loc_65B40E
align 10h



sub_65B5F0 proc	near

var_9C=	byte ptr -9Ch
var_50=	byte ptr -50h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 9Ch
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
push	edi
call	edx
mov	ecx, [esi+0ACh]
mov	edi, eax
test	ecx, ecx
jnz	short loc_65B665
cmp	[esp+0A4h+arg_4], ecx
jnz	short loc_65B636
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+0A4h+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi
pop	esi
add	esp, 9Ch
retn	0Ch

loc_65B636:		; size_t
push	38h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_65B65B
lea	ecx, [esp+0A4h+arg_0]
push	ecx
mov	ecx, eax
call	sub_65A3D0
mov	[esi+0ACh], eax
jmp	short loc_65B672

loc_65B65B:
xor	eax, eax
mov	[esi+0ACh], eax
jmp	short loc_65B672

loc_65B665:
lea	edx, [esp+0A4h+arg_0]
push	edx
call	sub_659260

loc_65B672:
mov	eax, [esi+0ACh]
mov	byte ptr [eax+0Dh], 0
mov	eax, [edi+108h]
test	eax, eax
jz	short loc_65B690
test	byte ptr [eax+1Ch], 20h
jnz	short loc_65B690
xor	eax, eax
jmp	short loc_65B69D

loc_65B690:
xor	ecx, ecx
cmp	ecx, [esp+0A4h+arg_4]
sbb	eax, eax
neg	eax

loc_65B69D:
mov	edx, [esi+0ACh]
push	ebx
mov	[edx+0Ch], al
mov	ebx, [esi+0A0h]
mov	eax, [edi+108h]
shr	ebx, 15h
and	bl, 1
test	eax, eax
jz	loc_65B7F2
cmp	[esp+0A8h+arg_4], 0
jbe	loc_65B7F2
test	byte ptr [eax+1Ch], 40h
jz	loc_65B7F2
mov	eax, [esi+0ACh]
mov	byte ptr [eax+0Ch], 1
mov	ecx, [esi+0ACh]
push	0
add	ecx, 2Ch
call	sub_658810
mov	ecx, [esp+0A8h+arg_4]
mov	eax, [esp+0A8h+arg_0]
mov	edx, ecx
imul	edx, 9Ch
lea	edx, [edx+eax-9Ch]
mov	al, [edx]
and	al, 0Fh
cmp	al, 4
ja	loc_65B7C1
fld1
fcom	dword ptr [edx+0Ch]
fnstsw	ax
test	ah, 5
jnp	short loc_65B738
fcomp	dword ptr [edx+10h]
fnstsw	ax
test	ah, 5
jp	loc_65B7C1
jmp	short loc_65B73A

loc_65B738:
fstp	st

loc_65B73A:
mov	ecx, [edi+108h]
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
add	edx, 8
push	edx
mov	edx, [eax+0ACh]
call	edx
test	al, 2
jz	short loc_65B7BA
lea	ecx, [esp+0A8h+var_9C]
call	sub_6562E0
push	50h		; size_t
lea	eax, [esp+0ACh+var_50]
push	0		; int
push	eax		; void *
mov	[esp+0B4h+var_9C], 6
call	_memset
fld1
add	esp, 0Ch
lea	eax, [esp+0A8h+var_50]
mov	ecx, 4

loc_65B77F:
fst	dword ptr [eax]
add	eax, 14h
sub	ecx, 1
jnz	short loc_65B77F
lea	ecx, [esp+0A8h+var_9C]
fstp	st
push	ecx
mov	ecx, [esi+0ACh]
add	ecx, 2Ch
call	sub_659210
mov	ecx, [esi+0ACh]
lea	edx, [esp+0A8h+var_9C]
push	edx
call	sub_659210
mov	eax, [esi+0ACh]
mov	byte ptr [eax+0Dh], 1
jmp	short loc_65B7E4

loc_65B7BA:
mov	ecx, [esp+0A8h+arg_4]

loc_65B7C1:
mov	edx, [esp+0A8h+arg_0]
imul	ecx, 9Ch
lea	eax, [ecx+edx-9Ch]
mov	ecx, [esi+0ACh]
push	eax
add	ecx, 2Ch
call	sub_659210

loc_65B7E4:
test	bl, bl
jnz	short loc_65B833
push	edi
mov	ecx, esi
call	sub_655DE0
jmp	short loc_65B833

loc_65B7F2:
test	bl, bl
jz	short loc_65B833
mov	ecx, [esi+0ACh]
push	0
add	ecx, 2Ch
call	sub_658810
mov	ecx, [esi+0ACh]
push	0
call	sub_658810
mov	ecx, [esi+0A0h]
shr	ecx, 15h
test	cl, 1
jz	short loc_65B833
push	esi
mov	ecx, edi
call	sub_69A810
and	dword ptr [esi+0A0h], 0FFDFFFFFh

loc_65B833:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+0A8h+arg_0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx
pop	edi
pop	esi
add	esp, 9Ch
retn	0Ch
sub_65B5F0 endp

align 10h



sub_65B860 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0ACh]
push	edi
test	ecx, ecx
jz	short loc_65B898
cmp	byte ptr [ecx+0Dh], 0
jz	short loc_65B87E
mov	eax, [ecx+4]
dec	eax
push	eax
call	sub_658810

loc_65B87E:
mov	edx, [esi+0ACh]
mov	edi, [esi]
sub	esp, 0Ch
mov	ecx, esp
push	edx
call	sub_65A330
mov	eax, [edi+30h]
mov	ecx, esi
call	eax

loc_65B898:
pop	edi
pop	esi
retn
sub_65B860 endp

align 10h



sub_65B8A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
push	edi
push	eax
mov	esi, ecx
call	sub_65BB90
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	ecx, [edi+edi*8]
mov	edx, [eax+ecx*4+8]
lea	esi, [eax+ecx*4+8]
cmp	edx, 0FFFFFFFEh
jnz	short loc_65B8E6
mov	edx, [esp+8+arg_4]
push	edx
lea	ecx, [esi+8]
mov	dword ptr [esi], 0FFFFFFFFh
call	sub_6592B0
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_65B8E6:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp
lea	ecx, [ecx+0]

loc_65B8F0:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*8]
cmp	dword ptr [eax+ebp*4+8], 0FFFFFFFEh
jnz	short loc_65B8F0
mov	ebp, [esi+4]
lea	ecx, [ebx+ebx*8]
lea	ecx, [eax+ecx*4+8]
cmp	ebp, edi
jnz	short loc_65B956
test	ecx, ecx
jz	short loc_65B923
mov	[ecx], edx
mov	edx, [esi+4]
lea	eax, [esi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_6592B0

loc_65B923:
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax]
mov	[esi+8], ecx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	ecx, [eax+8]
mov	[esi+10h], ecx
mov	edx, [eax+0Ch]
add	eax, 10h
push	eax
lea	ecx, [esi+18h]
mov	[esi+14h], edx
call	sub_657570
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_65B956:
lea	ebp, [ebp+ebp*8+0]
cmp	[eax+ebp*4+8], edi
lea	ebp, [eax+ebp*4+8]
jz	short loc_65B975

loc_65B964:
mov	ebp, [ebp+0]
lea	ebp, [ebp+ebp*8+0]
cmp	[eax+ebp*4+8], edi
lea	ebp, [eax+ebp*4+8]
jnz	short loc_65B964

loc_65B975:
test	ecx, ecx
jz	short loc_65B98D
mov	[ecx], edx
mov	eax, [esi+4]
lea	edx, [esi+8]
mov	[ecx+4], eax
push	edx
add	ecx, 8
call	sub_6592B0

loc_65B98D:
mov	eax, [esp+10h+arg_4]
mov	[ebp+0], ebx
mov	ecx, [eax]
mov	[esi+8], ecx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	ecx, [eax+8]
mov	[esi+10h], ecx
mov	edx, [eax+0Ch]
add	eax, 10h
push	eax
lea	ecx, [esi+18h]
mov	[esi+14h], edx
call	sub_657570
pop	ebp
pop	ebx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_65B8A0 endp

align 10h



sub_65B9D0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	ebp
xor	ebp, ebp
mov	ebx, ecx
mov	[esp+14h+var_4], ebx
cmp	eax, ebp
jnz	short loc_65B9F2
call	sub_65A380
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_65B9F2:
push	esi
cmp	eax, 8
jnb	short loc_65B9FF
mov	esi, 8
jmp	short loc_65BA64

loc_65B9FF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_65BA12
fadd	ds:flt_15FCC08

loc_65BA12:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_65BA64:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*8]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebp
mov	dword ptr [esp+20h+var_C], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebp
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebp
jbe	short loc_65BAC4
xor	eax, eax
jmp	short loc_65BAB0
align 10h

loc_65BAB0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 24h
sub	esi, 1
jnz	short loc_65BAB0

loc_65BAC4:
mov	eax, [ebx]
cmp	eax, ebp
jz	loc_65BB6A
mov	eax, [eax+4]
inc	eax
mov	dword ptr [esp+18h+var_C], eax
push	edi
jmp	short loc_65BAE0
align 10h

loc_65BAE0:
mov	edx, [ebx]
cmp	dword ptr [edx+ebp+8], 0FFFFFFFEh
lea	esi, [edx+ebp+8]
jz	short loc_65BB4F
mov	eax, [esi+8]
lea	ecx, [esi+8]
test	eax, 20000h
jz	short loc_65BB00
movsx	edx, word ptr [ecx+8]
xor	eax, edx

loc_65BB00:
push	eax
mov	eax, [esp+20h+arg_0]
push	ecx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_65B8A0
mov	eax, [esi+1Ch]
mov	edx, [esi+18h]
mov	ecx, eax
shl	ecx, 4
lea	edi, [ecx+edx-10h]
test	eax, eax
jbe	short loc_65BB38
mov	ebx, eax

loc_65BB25:
mov	ecx, edi
call	sub_652830
sub	edi, 10h
sub	ebx, 1
jnz	short loc_65BB25
mov	ebx, [esp+1Ch+var_4]

loc_65BB38:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+18h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	dword ptr [esi], 0FFFFFFFEh

loc_65BB4F:
add	ebp, 24h
sub	dword ptr [esp+1Ch+var_C], 1
jnz	short loc_65BAE0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi

loc_65BB6A:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[ebx], eax
mov	[esp+18h+arg_4], 0
call	sub_65A380
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_65B9D0 endp

align 10h



sub_65BB90 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
test	eax, eax
jnz	short loc_65BBA5
mov	eax, [esp+arg_0]
push	8
push	eax
call	sub_65B9D0
retn	4

loc_65BBA5:
mov	edx, [eax+4]
push	esi
lea	esi, ds:4[edx*4]
mov	edx, [eax]
lea	edx, [edx+edx*4]
cmp	edx, esi
pop	esi
jbe	short locret_65BBCC
mov	eax, [eax+4]
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_65B9D0

locret_65BBCC:
retn	4
sub_65BB90 endp

align 10h



sub_65BBD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_65BBE3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_65BC05

loc_65BBE3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_65BC0A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_65BC05:
call	sub_65B9D0

loc_65BC0A:
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [edi+edi*8]
lea	esi, [eax+edx*4+8]
mov	edx, [esi]
cmp	edx, 0FFFFFFFEh
jnz	short loc_65BC40
mov	eax, [esp+8+arg_4]
push	eax
lea	ecx, [esi+8]
mov	dword ptr [esi], 0FFFFFFFFh
call	sub_658870
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_65BC40:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp

loc_65BC47:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*8]
cmp	dword ptr [eax+ebp*4+8], 0FFFFFFFEh
jnz	short loc_65BC47
mov	ebp, [esi+4]
lea	ecx, [ebx+ebx*8]
lea	ecx, [eax+ecx*4+8]
cmp	ebp, edi
jnz	short loc_65BCAF
test	ecx, ecx
jz	short loc_65BC7A
mov	[ecx], edx
mov	edx, [esi+4]
lea	eax, [esi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_6592B0

loc_65BC7A:
mov	ecx, [esp+10h+arg_4]
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	edx, [eax+8]
mov	[esi+10h], edx
mov	eax, [eax+0Ch]
mov	[esi+14h], eax
mov	ecx, [ecx+4]
push	ecx
lea	ecx, [esi+18h]
call	sub_657570
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_65BCAF:
lea	ebp, [ebp+ebp*8+0]
cmp	[eax+ebp*4+8], edi
lea	ebp, [eax+ebp*4+8]
jz	short loc_65BCD1
lea	ecx, [ecx+0]

loc_65BCC0:
mov	ebp, [ebp+0]
lea	ebp, [ebp+ebp*8+0]
cmp	[eax+ebp*4+8], edi
lea	ebp, [eax+ebp*4+8]
jnz	short loc_65BCC0

loc_65BCD1:
test	ecx, ecx
jz	short loc_65BCE9
mov	[ecx], edx
mov	edx, [esi+4]
lea	eax, [esi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_6592B0

loc_65BCE9:
mov	ecx, [esp+10h+arg_4]
mov	[ebp+0], ebx
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	edx, [eax+8]
mov	[esi+10h], edx
mov	eax, [eax+0Ch]
mov	[esi+14h], eax
mov	ecx, [ecx+4]
push	ecx
lea	ecx, [esi+18h]
call	sub_657570
pop	ebp
pop	ebx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_65BBD0 endp

align 10h



sub_65BD30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
mov	[esp+14h+var_4], ecx
test	edi, 20000h
jz	short loc_65BD50
movsx	eax, word ptr [esi+8]
xor	edi, eax

loc_65BD50:
mov	ebx, [ecx]
test	ebx, ebx
jz	short loc_65BD9D
mov	edx, [ebx+4]
and	edx, edi
push	edx
push	ebp
call	sub_656890
test	eax, eax
jl	short loc_65BD99
mov	ecx, [esi]
lea	eax, [eax+eax*8]
mov	[ebx+eax*4+10h], ecx
mov	edx, [esi+4]
lea	eax, [ebx+eax*4+10h]
mov	[eax+4], edx
mov	ecx, [esi+8]
mov	[eax+8], ecx
mov	edx, [esi+0Ch]
mov	[eax+0Ch], edx
mov	ecx, [ebp+4]
push	ecx
lea	ecx, [eax+10h]
call	sub_657570
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_65BD99:
mov	ecx, [esp+14h+var_4]

loc_65BD9D:
mov	edx, [esp+14h+arg_0]
push	edi
push	ebp
push	edx
call	sub_65BBD0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_65BD30 endp

align 10h



sub_65BDC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
push	ebx
push	esi
push	edi
push	ecx
mov	esi, ecx
mov	ecx, [esp+10h+arg_8]
mov	eax, esp
mov	[eax], ecx
push	edx
mov	ecx, esi
call	sub_656A50
lea	edi, [esi+78h]
mov	ecx, edi
call	sub_663010
mov	dword ptr [edi], offset	off_1432538
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_14323D8
mov	dword ptr [esi+0Ch], offset off_14323D0
cmp	edi, ebx
jz	short loc_65BE08
mov	ecx, edi
call	sub_64A420

loc_65BE08:
mov	[esi+90h], edi
mov	[esi+94h], ebx
mov	[esi+98h], ebx
mov	[esi+9Ch], ebx
xor	eax, eax
mov	[esi+0A4h], ax
xor	ecx, ecx
mov	edx, 80h
or	[esi+76h], dx
pop	edi
mov	[esi+0A9h], bl
mov	[esi+0B0h], ebx
mov	[esi+0B4h], ebx
mov	[esi+88h], ebx
mov	[esi+84h], ebx
mov	[esi+8Ch], ebx
mov	[esi+0A8h], bl
mov	[esi+0ACh], ebx
mov	[esi+0A6h], cx
mov	dword ptr [esi+0A0h], 5011h
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_65BDC0 endp

align 10h



sub_65BE80 proc	near
mov	eax, [ecx+0A0h]
shr	eax, 14h
and	eax, 1
retn
sub_65BE80 endp

align 10h



sub_65BE90 proc	near
mov	eax, [ecx+0A0h]
shr	eax, 0Fh
and	eax, 1
retn
sub_65BE90 endp

align 10h



sub_65BEA0 proc	near
movzx	eax, byte ptr [ecx+0A8h]
retn
sub_65BEA0 endp

align 10h



sub_65BEB0 proc	near
mov	eax, [ecx+0A0h]
and	eax, 1
retn
sub_65BEB0 endp

align 10h



sub_65BEC0 proc	near
mov	eax, [ecx+0A0h]
shr	eax, 0Ch
and	eax, 1
retn
sub_65BEC0 endp

align 10h



sub_65BED0 proc	near
mov	al, 1
retn	0Ch
sub_65BED0 endp

align 10h



sub_65BEE0 proc	near

var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 18h
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esp+20h+var_18]
call	sub_64E8E0
mov	eax, [esi]
mov	edi, [esp+20h+arg_0]
mov	edx, [eax+34h]
lea	ecx, [esp+20h+var_18]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	eax, edi
pop	edi
pop	esi
add	esp, 18h
retn	4
sub_65BEE0 endp

align 10h



sub_65BF10 proc	near
mov	eax, [ecx]
mov	eax, [eax+80h]
jmp	eax
sub_65BF10 endp

align 10h



sub_65BF20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx+0B0h], eax
mov	[ecx+0B4h], edx
retn	8
sub_65BF20 endp

align 10h



sub_65BF40 proc	near
mov	eax, [ecx+0B0h]
test	eax, eax
jz	short locret_65BF54
mov	ecx, [ecx+0B4h]
push	ecx
call	eax
pop	ecx

locret_65BF54:
retn
sub_65BF40 endp

align 10h



sub_65BF60 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	esi
push	edi
push	eax
mov	eax, [esp+0Ch+arg_4]
mov	esi, ecx
mov	edi, [esi]
lea	ecx, [esi-78h]
push	edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+70h]
call	eax
mov	edx, [edi+0Ch]
push	eax
mov	ecx, esi
call	edx
pop	edi
pop	esi
retn	10h
sub_65BF60 endp

align 10h



sub_65BF90 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi]
lea	ecx, [esi-78h]
push	eax
mov	eax, [ecx]
push	edx
mov	edx, [eax+70h]
call	edx
push	eax
mov	eax, [edi+10h]
mov	ecx, esi
call	eax
pop	edi
pop	esi
retn	0Ch
sub_65BF90 endp

align 10h



sub_65BFC0 proc	near

arg_0= byte ptr	 4

movzx	eax, [esp+arg_0]
shl	eax, 10h
xor	eax, [ecx+0A0h]
and	eax, 30000h
xor	[ecx+0A0h], eax
retn	4
sub_65BFC0 endp

align 10h



sub_65BFE0 proc	near
movzx	eax, word ptr [ecx+0A2h]
and	eax, 3
retn
sub_65BFE0 endp

align 10h



sub_65BFF0 proc	near
sub	ecx, 78h
jmp	sub_65C220
sub_65BFF0 endp

align 10h



sub_65C000 proc	near
sub	ecx, 78h
jmp	sub_7921C0
sub_65C000 endp

align 10h



sub_65C010 proc	near

arg_0= byte ptr	 4

sub	ecx, 0Ch
jmp	sub_65C220
sub_65C010 endp

align 10h



sub_65C020 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
mov	edx, [ecx]
mov	[ecx+0A8h], al
mov	eax, [edx+54h]
call	eax
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
retn	4
sub_65C020 endp

align 10h



sub_65C050 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_65C060
or	dword ptr [ecx+0A0h], 1
jmp	short loc_65C067

loc_65C060:
and	dword ptr [ecx+0A0h], 0FFFFFFFEh

loc_65C067:
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
retn	4
sub_65C050 endp




sub_65C080 proc	near
push	ebp
push	edi
mov	edi, ecx
mov	eax, [edi+94h]
lea	ebp, [edi+78h]
mov	dword ptr [edi], offset	off_14323D8
mov	dword ptr [edi+0Ch], offset off_14323D0
mov	dword ptr [ebp+0], offset off_1432538
test	eax, eax
jz	short loc_65C0AC
mov	dword ptr [eax+4], 0

loc_65C0AC:
mov	eax, [edi+98h]
test	eax, eax
jz	short loc_65C0C4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_65C0C4:
push	esi
mov	esi, [edi+0ACh]
test	esi, esi
jz	short loc_65C0DF
mov	ecx, esi
call	sub_657230
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_65C0DF:
lea	ecx, [edi+9Ch]
call	sub_65A380
mov	esi, [edi+94h]
test	esi, esi
jz	short loc_65C133
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_65C133
mov	ecx, [esi+10h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65C109
call	sub_650DF0

loc_65C109:
mov	ecx, [esi+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65C117
call	sub_650DF0

loc_65C117:
mov	ecx, [esi+8]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65C125
call	sub_650DF0

loc_65C125:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_65C133:
mov	ecx, [edi+90h]
pop	esi
test	ecx, ecx
jz	short loc_65C143
call	sub_666B00

loc_65C143:
mov	ecx, ebp
call	sub_663040
mov	ecx, edi
pop	edi
pop	ebp
jmp	sub_6552F0
sub_65C080 endp

align 10h



sub_65C160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	esi
mov	ebx, ecx
call	sub_65A380
mov	esi, [esp+10h+arg_4]
mov	eax, [esi]
test	eax, eax
jz	loc_65C216
mov	eax, [eax]
test	eax, eax
jz	loc_65C216
mov	ecx, [ebx]
lea	eax, [eax+eax*4]
shr	eax, 2
test	ecx, ecx
jz	short loc_65C192
mov	ecx, [ecx]

loc_65C192:
push	ebp
mov	ebp, [esp+14h+arg_0]
cmp	eax, ecx
jbe	short loc_65C1A4
push	eax
push	ebp
mov	ecx, ebx
call	sub_65B9D0

loc_65C1A4:
push	edi
lea	eax, [esp+18h+var_8]
push	eax
mov	ecx, esi
call	sub_6570D0
mov	edi, [esp+18h+var_8]
mov	esi, [esp+18h+var_4]
lea	esp, [esp+0]

loc_65C1C0:
test	edi, edi
jz	short loc_65C214
cmp	dword ptr [edi], 0
jz	short loc_65C214
mov	eax, [edi]
cmp	esi, [eax+4]
jg	short loc_65C214
lea	ecx, [esi+esi*8]
lea	ecx, [eax+ecx*4+10h]
mov	eax, [ecx]
test	eax, 20000h
jz	short loc_65C1E6
movsx	edx, word ptr [ecx+8]
xor	eax, edx

loc_65C1E6:
push	eax
push	ecx
push	ebp
mov	ecx, ebx
call	sub_65B8A0
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_65C1C0
inc	esi
cmp	esi, eax
ja	short loc_65C1C0
lea	edx, [esi+esi*8]
lea	ecx, [ecx+edx*4+8]

loc_65C205:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_65C1C0
inc	esi
add	ecx, 24h
cmp	esi, eax
jbe	short loc_65C205
jmp	short loc_65C1C0

loc_65C214:
pop	edi
pop	ebp

loc_65C216:
pop	esi
pop	ebx
add	esp, 8
retn	8
sub_65C160 endp

align 10h



sub_65C220 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_65C080
test	[esp+4+arg_0], 1
jz	short loc_65C23D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_65C23D:
mov	eax, esi
pop	esi
retn	4
sub_65C220 endp

align 10h



sub_65C250 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
mov	eax, [ebp+0]
push	esi
mov	edx, ecx
xor	ebx, ebx
push	edi
mov	[esp+28h+var_18], edx
cmp	eax, 40h
jz	short loc_65C28B
cmp	eax, 80h
jz	short loc_65C28B
mov	ecx, eax
mov	eax, [ebp+4]
mov	[esp+28h+var_C], eax
mov	eax, [ebp+8]
mov	[esp+28h+var_8], eax
mov	eax, [ebp+0Ch]
mov	[esp+28h+var_4], eax
jmp	short loc_65C2A9

loc_65C28B:
mov	ecx, eax
xor	eax, eax
mov	[esp+28h+var_C], ebx
mov	word ptr [esp+28h+var_8], ax
mov	byte ptr [esp+28h+var_8+2], bl
mov	byte ptr [esp+28h+var_4], bl
mov	byte ptr [esp+28h+var_4+1], bl
mov	byte ptr [esp+28h+var_8+3], 0FFh

loc_65C2A9:
mov	esi, [edx+9Ch]
lea	edi, [edx+9Ch]
mov	[esp+28h+var_10], ecx
cmp	esi, ebx
jz	short loc_65C2FE
mov	eax, ecx
test	ecx, 20000h
jz	short loc_65C2CE
movsx	eax, word ptr [esp+28h+var_8]
xor	eax, ecx

loc_65C2CE:
mov	ecx, [esi+4]
and	ecx, eax
push	ecx
lea	edx, [esp+2Ch+var_10]
push	edx
mov	ecx, edi
call	sub_6560C0
cmp	eax, ebx
jl	short loc_65C2FA
lea	eax, [eax+eax*8]
lea	eax, [esi+eax*4+10h]
cmp	eax, ebx
jz	short loc_65C2FA
lea	esi, [eax+10h]
cmp	esi, ebx
jnz	loc_65C388

loc_65C2FA:
mov	edx, [esp+28h+var_18]

loc_65C2FE:
mov	ecx, dword_1855FC0
lea	esi, [esp+28h+arg_0]
push	esi
mov	[esp+2Ch+arg_0], 143h
mov	eax, [ecx]
push	0Ch
push	edx
mov	edx, [eax+38h]
call	edx
cmp	eax, ebx
jz	short loc_65C32B
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	esi, eax
jmp	short loc_65C32D

loc_65C32B:
xor	esi, esi

loc_65C32D:
mov	eax, [esi+4]
inc	eax
push	eax
push	esi
mov	ecx, esi
call	sub_656670
mov	ecx, [esi+4]
mov	edx, [esi]
shl	ecx, 4
lea	ecx, [ecx+edx-10h]
cmp	ecx, ebx
jz	short loc_65C354
mov	eax, [esp+28h+arg_4]
push	eax
call	sub_652330

loc_65C354:
lea	ecx, [esp+28h+var_18]
push	ecx
push	edi
mov	ecx, edi
mov	[esp+30h+var_18], ebp
mov	[esp+30h+var_14], esi
call	sub_65BD30
mov	ecx, esi
call	sub_6806F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8

loc_65C388:
mov	ecx, [esi+4]
inc	ecx
push	ecx
push	esi
mov	ecx, esi
call	sub_656670
mov	edx, [esi+4]
mov	eax, [esi]
shl	edx, 4
lea	ecx, [edx+eax-10h]
cmp	ecx, ebx
jz	short loc_65C3AF
mov	edx, [esp+28h+arg_4]
push	edx
call	sub_652330

loc_65C3AF:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_65C250 endp

align 10h



sub_65C3C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [esi]
mov	eax, ecx
shr	eax, 1
and	ecx, 55555555h
and	eax, 55555555h
add	eax, ecx
mov	ecx, eax
shr	ecx, 2
and	eax, 33333333h
and	ecx, 33333333h
add	ecx, eax
mov	ebx, ecx
shr	ebx, 4
and	ebx, 0F0F0F0Fh
and	ecx, 0F0F0F0Fh
add	ebx, ecx
mov	eax, 80808081h
mul	ebx
shr	edx, 7
add	dl, bl
movzx	ebx, dl
mov	[esp+20h+var_14], edi
cmp	ebx, 1
jnz	short loc_65C432
mov	eax, [esp+20h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_65C250
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn	8

loc_65C432:
push	ebp
xor	ebp, ebp
lea	edi, [ebp+1]
test	ebx, ebx
jbe	short loc_65C47D
lea	esp, [esp+0]

loc_65C440:
test	[esi], edi
jz	short loc_65C477
mov	edx, [esi+4]
mov	ecx, [esi]
mov	eax, [esi+8]
mov	[esp+24h+var_10], ecx
mov	ecx, [esi+0Ch]
mov	[esp+24h+var_C], edx
mov	edx, [esp+24h+arg_4]
mov	[esp+24h+var_8], eax
push	edx
lea	eax, [esp+28h+var_10]
mov	[esp+28h+var_4], ecx
mov	ecx, [esp+28h+var_14]
push	eax
inc	ebp
mov	[esp+2Ch+var_10], edi
call	sub_65C250

loc_65C477:
add	edi, edi
cmp	ebp, ebx
jb	short loc_65C440

loc_65C47D:
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn	8
sub_65C3C0 endp

align 10h



sub_65C490 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+98h]
mov	esi, ecx
test	eax, eax
jz	short loc_65C4A8
push	eax
call	sub_656500

loc_65C4A8:
add	edi, 9Ch
lea	ecx, [esi+9Ch]
push	edi
push	ecx
call	sub_65C160
pop	edi
pop	esi
retn	4
sub_65C490 endp




sub_65C4C0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+14h]
mov	ebx, ecx
mov	edx, [ebx]
push	esi
push	edi
mov	[ebx+14h], eax
mov	eax, [edx+4]
lea	esi, [ebp+24h]
lea	edi, [ebx+24h]
mov	ecx, 8
rep movsd
mov	ecx, ebx
call	eax
lea	edx, [ebp+9Ch]
fld	dword ptr [ebp+44h]
lea	ecx, [ebx+9Ch]
fstp	dword ptr [ebx+44h]
push	edx
fld	dword ptr [ebp+48h]
push	ecx
fstp	dword ptr [ebx+48h]
fld	dword ptr [ebp+4Ch]
fstp	dword ptr [ebx+4Ch]
fld	dword ptr [ebp+50h]
fstp	dword ptr [ebx+50h]
fld	dword ptr [ebp+54h]
fstp	dword ptr [ebx+54h]
fld	dword ptr [ebp+58h]
fstp	dword ptr [ebx+58h]
call	sub_65C160
mov	ebp, [ebp+98h]
test	ebp, ebp
jz	short loc_65C52F
push	ebp
mov	ecx, ebx
call	sub_656500

loc_65C52F:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65C4C0 endp

align 10h



sub_65C540 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+14h]
xor	eax, eax
cmp	edx, [esp+arg_4]
setl	al
retn
sub_65C540 endp

align 10h



sub_65C560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_65C5A9
push	ebx
push	esi

loc_65C572:
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
mov	edx, [esp+10h+arg_C]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
lea	eax, [ecx+ebx*4]
mov	ecx, [edx]
push	ecx
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_65C5A1
or	edx, 0FFFFFFFFh
sub	edx, esi
lea	ebp, [ebx+1]
add	edi, edx
jmp	short loc_65C5A3

loc_65C5A1:
mov	edi, esi

loc_65C5A3:
test	edi, edi
jg	short loc_65C572
pop	esi
pop	ebx

loc_65C5A9:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_65C560 endp

align 10h



sub_65C5B0 proc	near
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_65C5C1
mov	ecx, [ecx]
mov	edx, [ecx+eax*4-4]
mov	eax, [edx+14h]
retn

loc_65C5C1:
or	eax, 0FFFFFFFFh
retn
sub_65C5B0 endp

align 10h



sub_65C5D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
push	edi
mov	edi, [esp+10h+arg_4]
mov	ebp, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+10h], 0
mov	[esp+10h+var_8], ebp
jnz	short loc_65C5F1
pop	edi
xor	eax, eax
pop	ebp
add	esp, 8
retn	8

loc_65C5F1:
mov	eax, [esp+10h+arg_0]
cmp	byte ptr [eax+4], 6
push	ebx
push	esi
mov	[esp+18h+var_4], 0
jbe	loc_65C6BC
mov	esi, [ebp+0Ch]
test	esi, esi
jz	short loc_65C63F
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_65C631
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_65C631
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	eax, [eax+78h]

loc_65C631:
mov	ecx, [eax+8]
add	eax, 8
cmp	ecx, [edi]
jz	loc_65C6FE

loc_65C63F:
mov	ebx, [ebp+4]
xor	edi, edi
test	ebx, ebx
jbe	loc_65C794
lea	esp, [esp+0]

loc_65C650:
mov	edx, [ebp+0]
mov	esi, [edx+edi*4]
test	esi, esi
jz	short loc_65C693
mov	al, [esi+76h]
shr	al, 7
test	al, 1
jz	short loc_65C693
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_65C685
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_65C685
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	eax, [eax+78h]

loc_65C685:
mov	ecx, [eax+8]
mov	edx, [esp+18h+arg_4]
add	eax, 8
cmp	ecx, [edx]
jz	short loc_65C6A9

loc_65C693:
inc	edi
cmp	edi, ebx
jb	short loc_65C650
mov	eax, [esp+18h+var_4]
pop	esi
pop	ebx
pop	edi
mov	[ebp+0Ch], eax
pop	ebp
add	esp, 8
retn	8

loc_65C6A9:
mov	eax, esi
mov	[esp+18h+var_4], esi
pop	esi
pop	ebx
pop	edi
mov	[ebp+0Ch], eax
pop	ebp
add	esp, 8
retn	8

loc_65C6BC:
cmp	dword ptr [ecx+4], 0
jnz	short loc_65C6C7
call	sub_651580

loc_65C6C7:
mov	esi, [ebp+0Ch]
test	esi, esi
jz	short loc_65C70B
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_65C6EF
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_65C6EF
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]

loc_65C6EF:
add	eax, 8
push	eax
mov	ecx, edi
call	sub_6548C0
test	al, al
jz	short loc_65C70B

loc_65C6FE:
mov	eax, [ebp+0Ch]
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 8
retn	8

loc_65C70B:
mov	ebp, [ebp+4]
xor	ebx, ebx
test	ebp, ebp
jbe	short loc_65C790

loc_65C714:
mov	eax, [esp+18h+var_8]
mov	ecx, [eax]
mov	edi, [ecx+ebx*4]
test	edi, edi
jz	short loc_65C772
mov	dl, [edi+76h]
shr	dl, 7
test	dl, 1
jz	short loc_65C772
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_65C741
mov	ecx, edi
call	sub_658B70
test	eax, eax
jz	short loc_65C746

loc_65C741:
lea	esi, [eax+8]
jmp	short loc_65C755

loc_65C746:
mov	eax, [edi]
mov	edx, [eax+6Ch]
mov	ecx, edi
call	edx
mov	esi, [eax+78h]
add	esi, 8

loc_65C755:
mov	ecx, [esi]
cmp	dword ptr [ecx+4], 0
jnz	short loc_65C762
call	sub_651580

loc_65C762:
mov	ecx, [esp+18h+arg_4]
mov	edx, [ecx]
mov	eax, [esi]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jz	short loc_65C78C

loc_65C772:
inc	ebx
cmp	ebx, ebp
jb	short loc_65C714
mov	ebp, [esp+18h+var_8]
mov	eax, [esp+18h+var_4]
pop	esi
pop	ebx
pop	edi
mov	[ebp+0Ch], eax
pop	ebp
add	esp, 8
retn	8

loc_65C78C:
mov	[esp+18h+var_4], edi

loc_65C790:
mov	ebp, [esp+18h+var_8]

loc_65C794:
mov	eax, [esp+18h+var_4]
pop	esi
pop	ebx
pop	edi
mov	[ebp+0Ch], eax
pop	ebp
add	esp, 8
retn	8
sub_65C5D0 endp

align 10h



sub_65C7B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
cmp	eax, [ecx+4]
jnb	short locret_65C7DF
mov	dword ptr [ecx+0Ch], 0
mov	ecx, [ecx]
push	esi
lea	esi, [ecx+eax*4]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_65C7D1
call	sub_64A400

loc_65C7D1:
mov	eax, [esp+4+arg_4]
mov	[esi], eax
pop	esi
test	eax, eax
jz	short locret_65C7DF
inc	dword ptr [eax+4]

locret_65C7DF:
retn	8
sub_65C7B0 endp

align 10h



sub_65C7F0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65C832
mov	edi, edi

loc_65C800:
mov	eax, [edi]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65C80C
inc	dword ptr [ecx+4]

loc_65C80C:
cmp	dword ptr [ecx+14h], 3FFFh
ja	short loc_65C828
mov	edx, [esp+0Ch+arg_0]
cmp	[ecx+18h], edx
jbe	short loc_65C828
mov	eax, [edi]
mov	eax, [eax+esi*4]
or	word ptr [eax+76h], 40h

loc_65C828:
call	sub_64A400
inc	esi
cmp	esi, ebx
jb	short loc_65C800

loc_65C832:
pop	edi
pop	esi
pop	ebx
retn	4
sub_65C7F0 endp

align 10h



sub_65C840 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 30h
push	esi
mov	esi, [esp+34h+arg_0]
mov	edx, [esi+48h]
xor	eax, eax
push	edi
mov	edi, [edx+0Ch]
mov	edx, [ecx+4]
mov	[esp+38h+var_28], ecx
mov	[esp+38h+var_30], eax
mov	[esp+38h+var_2C], eax
mov	[esp+38h+arg_0], eax
mov	[esp+38h+var_1C], edx
cmp	edx, eax
jbe	loc_65CA5E
push	ebx
push	ebp
jmp	short loc_65C878

loc_65C874:
mov	ecx, [esp+40h+var_28]

loc_65C878:
mov	ecx, [ecx]
mov	ebp, [ecx+eax*4]
mov	edx, 100h
test	[ebp+76h], dx
jnz	loc_65CA2E
or	ebx, 0FFFFFFFFh
cmp	[ebp+14h], ebx
jl	loc_65CA2E
mov	eax, [ebp+0]
mov	edx, [eax+10h]
mov	ecx, ebp
call	edx
test	al, al
jz	loc_65CA2E
mov	eax, [ebp+0]
mov	edx, [eax+0B4h]
mov	ecx, ebp
call	edx
test	al, al
jnz	loc_65CA2E
mov	al, [ebp+76h]
shr	al, 1
test	al, 1
jnz	loc_65CA2E
cmp	[esp+40h+var_30], 0
jz	short loc_65C8E7
mov	ecx, [esp+40h+var_2C]
cmp	[ebp+14h], ecx
jle	short loc_65C8E7
dec	[esp+40h+var_30]
mov	ecx, esi
call	sub_6A7E50

loc_65C8E7:
mov	edx, [esi+98h]
cmp	edx, [esi+9Ch]
jbe	loc_65C9DE
cmp	dword ptr [esi+94h], 0
jnz	loc_65C9DE
mov	eax, [esi+4]
mov	ecx, [esi]
mov	[esp+40h+var_24], eax
mov	[esp+40h+var_20], ecx
mov	dword ptr [esi+94h], 1
lea	ecx, [ecx+0]

loc_65C920:
mov	eax, [esi+98h]
cmp	eax, 40h
ja	loc_65C9B3
mov	edx, [esi+eax*4+9Ch]
mov	ebx, [edx+20h]
lea	ecx, [esp+40h+var_18]
call	sub_64E8E0
push	0
mov	ecx, ebx
call	sub_654BF0
test	al, al
jnz	short loc_65C969
cmp	[esi+14h], al
jnz	short loc_65C969
lea	eax, [esp+40h+var_18]
push	eax
mov	ecx, ebx
call	sub_654AF0
lea	ecx, [esp+40h+var_18]
mov	[esi+4], ecx
jmp	short loc_65C970

loc_65C969:
mov	dword ptr [esi+4], offset flt_167D000

loc_65C970:
mov	edx, [edi]
mov	eax, [edx+0A0h]
push	2
mov	ecx, edi
call	eax
mov	ecx, [esi+98h]
mov	ecx, [esi+ecx*4+9Ch]
mov	edx, [ecx]
mov	eax, [edx+74h]
push	esi
call	eax
mov	edx, [edi]
mov	eax, [edx+0A4h]
mov	ecx, edi
call	eax
mov	ecx, [esi+98h]
mov	dword ptr [esi+ecx*4+9Ch], 0
or	ebx, 0FFFFFFFFh

loc_65C9B3:
add	[esi+98h], ebx
mov	edx, [esi+98h]
cmp	edx, [esi+9Ch]
ja	loc_65C920
mov	eax, [esp+40h+var_24]
mov	ecx, [esp+40h+var_20]
add	[esi+94h], ebx
mov	[esi+4], eax
mov	[esi], ecx

loc_65C9DE:
cmp	word ptr [ebp+74h], 0
jbe	short loc_65CA04
cmp	dword ptr [esi+94h], 0
jnz	short loc_65CA04
push	ebp
mov	ecx, esi
call	sub_6A7DC0
movzx	edx, word ptr [ebp+74h]
inc	[esp+40h+var_30]
mov	[esp+40h+var_2C], edx
jmp	short loc_65CA2E

loc_65CA04:
mov	eax, [ebp+0]
mov	ebx, [edi]
mov	edx, [eax+14h]
mov	ecx, ebp
add	ebx, 44h
call	edx
push	eax
mov	eax, [ebx]
mov	ecx, edi
call	eax
mov	edx, [ebp+0]
mov	eax, [edx+74h]
push	esi
mov	ecx, ebp
call	eax
mov	edx, [edi]
mov	eax, [edx+48h]
mov	ecx, edi
call	eax

loc_65CA2E:
mov	eax, [esp+40h+arg_0]
inc	eax
mov	[esp+40h+arg_0], eax
cmp	eax, [esp+40h+var_1C]
jb	loc_65C874
cmp	[esp+40h+var_30], 0
pop	ebp
pop	ebx
jbe	short loc_65CA5E
lea	ebx, [ebx+0]

loc_65CA50:
mov	ecx, esi
call	sub_6A7E50
sub	[esp+38h+var_30], 1
jnz	short loc_65CA50

loc_65CA5E:
pop	edi
pop	esi
add	esp, 30h
retn	4
sub_65C840 endp

align 10h



sub_65CA70 proc	near

arg_0= dword ptr  4

push	ebx
push	edi
mov	ebx, ecx
mov	edi, [ebx+4]
sub	edi, 1
js	short loc_65CAB1
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi

loc_65CA82:
mov	eax, [ebx]
mov	esi, [eax+edi*4]
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_65CAAA
mov	edx, [esi]
mov	eax, [edx+0A0h]
push	ebp
mov	ecx, esi
call	eax
mov	eax, [ebx+4]
cmp	edi, eax
jl	short loc_65CAAA
mov	edi, eax

loc_65CAAA:
sub	edi, 1
jns	short loc_65CA82
pop	esi
pop	ebp

loc_65CAB1:
pop	edi
pop	ebx
retn	4
sub_65CA70 endp

align 10h



sub_65CAC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebx, ecx
mov	ebp, [ebx+4]
push	edi
xor	edi, edi
test	ebp, ebp
jbe	short loc_65CB06
push	esi
nop

loc_65CAD0:
mov	eax, [ebx]
mov	esi, [eax+edi*4]
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_65CB00
mov	eax, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
mov	edx, [esi]
mov	edx, [edx+0A4h]
push	eax
push	ecx
mov	ecx, esi
call	edx
lea	eax, [edi+1]
cmp	eax, [ebx+4]
jnb	short loc_65CB05

loc_65CB00:
inc	edi
cmp	edi, ebp
jb	short loc_65CAD0

loc_65CB05:
pop	esi

loc_65CB06:
pop	edi
pop	ebp
pop	ebx
retn	8
sub_65CAC0 endp

align 10h



sub_65CB10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, [ecx+4]
push	esi
xor	esi, esi
mov	[esp+20h+var_18], ecx
mov	[esp+20h+var_1C], esi
mov	[esp+20h+var_14], eax
test	eax, eax
jbe	loc_65CBB0
push	ebx
push	ebp
mov	ebp, [esp+28h+arg_0]
push	edi
jmp	short loc_65CB3A

loc_65CB36:
mov	ecx, [esp+2Ch+var_18]

loc_65CB3A:
mov	eax, [ecx]
mov	edi, [eax+esi*4]
mov	cl, [edi+76h]
shr	cl, 7
test	cl, 1
jz	short loc_65CBA2
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_65CB5F
mov	ecx, edi
call	sub_658B70
test	eax, eax
jz	short loc_65CB64

loc_65CB5F:
lea	ebx, [eax+8]
jmp	short loc_65CB73

loc_65CB64:
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
mov	ebx, [eax+78h]
add	ebx, 8

loc_65CB73:
mov	ecx, [ebx]
cmp	dword ptr [ecx+10h], 0
jz	short loc_65CBA2
mov	esi, [ebp+0]
push	0
push	edi
lea	ecx, [esp+34h+var_10]
add	esi, 4
call	sub_651CF0
mov	edx, [esi]
push	eax
push	ebx
mov	ecx, ebp
call	edx
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	esi, [esp+2Ch+var_1C]

loc_65CBA2:
inc	esi
mov	[esp+2Ch+var_1C], esi
cmp	esi, [esp+2Ch+var_14]
jb	short loc_65CB36
pop	edi
pop	ebp
pop	ebx

loc_65CBB0:
pop	esi
add	esp, 1Ch
retn	8
sub_65CB10 endp

align 10h



sub_65CBC0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi+4]
push	offset sub_65C540
lea	ecx, [esp+0Ch+arg_0]
push	ecx
push	eax
push	0
push	esi
mov	[esp+1Ch+arg_0], edi
call	sub_65C560
add	esp, 14h
cmp	eax, [esi+4]
jnb	short loc_65CBF4
mov	edx, [esi]
mov	ecx, [edx+eax*4]
cmp	[ecx+14h], edi
jz	short loc_65CBF7

loc_65CBF4:
or	eax, 0FFFFFFFFh

loc_65CBF7:
pop	edi
pop	esi
retn	4
sub_65CBC0 endp

align 10h



sub_65CC00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi+4]
push	offset sub_65C540
lea	ecx, [esp+0Ch+arg_0]
push	ecx
push	eax
push	0
push	esi
mov	[esp+1Ch+arg_0], edi
call	sub_65C560
add	esp, 14h
cmp	eax, [esi+4]
jnb	short loc_65CC58
mov	edx, [esi]
mov	ecx, [edx+eax*4]
cmp	[ecx+14h], edi
jnz	short loc_65CC58
cmp	eax, 0FFFFFFFFh
jz	short loc_65CC58
cmp	[ecx+14h], edi
jnz	short loc_65CC58
mov	eax, [esp+8+arg_4]
test	eax, eax
jz	short loc_65CC51
mov	dl, [ecx+76h]
shr	dl, 6
and	dl, 1
mov	[eax], dl

loc_65CC51:
pop	edi
mov	eax, ecx
pop	esi
retn	8

loc_65CC58:
pop	edi
xor	eax, eax
pop	esi
retn	8
sub_65CC00 endp

align 10h



sub_65CC60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_65CC9E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7D30E0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_65CCB7
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_668FE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_65CC9E:
cmp	esi, [edi+8]
jb	short loc_65CCB7
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_668FE0

loc_65CCB7:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_65CC60 endp

align 10h



sub_65CCC0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 1
jnz	short loc_65CCD5
push	0
push	esi
call	sub_65CC60
pop	esi
retn	4

loc_65CCD5:
mov	eax, [esi]
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [eax+edi*4]
test	ecx, ecx
jz	short loc_65CCE8
call	sub_64A400

loc_65CCE8:
mov	ecx, [esi]
mov	edx, [esi+4]
lea	eax, [ecx+edi*4]
sub	edx, edi
lea	ecx, ds:0FFFFFFFCh[edx*4]
push	ecx
lea	edx, [eax+4]
push	edx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 0Ch
pop	edi
pop	esi
retn	4
sub_65CCC0 endp

align 10h



sub_65CD10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
lea	esi, [ebx+1]
push	esi
push	edi
call	sub_65CC60
cmp	esi, ebx
jbe	short loc_65CD42
sub	esi, ebx
mov	eax, [edi]
lea	eax, [eax+ebx*4]
jz	short loc_65CD42
nop

loc_65CD30:
test	eax, eax
jz	short loc_65CD3A
mov	dword ptr [eax], 0

loc_65CD3A:
add	eax, 4
sub	esi, 1
jnz	short loc_65CD30

loc_65CD42:
mov	eax, [edi+4]
mov	esi, [esp+0Ch+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_65CD6C
mov	edx, [edi]
sub	eax, esi
lea	eax, ds:0FFFFFFFCh[eax*4]
lea	ecx, [edx+esi*4]
push	eax
push	ecx
add	ecx, 4
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_65CD6C:
mov	ecx, [edi]
pop	edi
lea	eax, [ecx+esi*4]
pop	esi
pop	ebx
test	eax, eax
jz	short locret_65CD8D
mov	edx, [esp+arg_4]
mov	dword ptr [eax], 0
mov	ecx, [edx]
mov	[eax], ecx
test	ecx, ecx
jz	short locret_65CD8D
inc	dword ptr [ecx+4]

locret_65CD8D:
retn	8
sub_65CD10 endp




sub_65CD90 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
mov	esi, ecx
cmp	ebp, [esp+1Ch+arg_4]
jnz	short loc_65CDAB
pop	esi
mov	al, 1
pop	ebp
add	esp, 14h
retn	0Ch

loc_65CDAB:
mov	eax, [esi+4]
push	ebx
push	edi
push	offset sub_65C540
lea	ecx, [esp+28h+var_10]
push	ecx
push	eax
push	0
push	esi
mov	[esp+38h+var_10], ebp
call	sub_65C560
mov	ebx, eax
mov	eax, [esi+4]
add	esp, 14h
cmp	ebx, eax
jnb	short loc_65CDED
mov	edx, [esi]
lea	edi, ds:0[ebx*4]
mov	ecx, [edi+edx]
mov	[esp+24h+var_14], edi
cmp	[ecx+14h], ebp
jnz	short loc_65CDED
cmp	ebx, 0FFFFFFFFh
jnz	short loc_65CDF9

loc_65CDED:
pop	edi
pop	ebx
pop	esi
xor	al, al
pop	ebp
add	esp, 14h
retn	0Ch

loc_65CDF9:
mov	edx, [esp+24h+arg_4]
push	offset sub_65C540
lea	ecx, [esp+28h+var_C]
push	ecx
push	eax
push	0
push	esi
mov	[esp+38h+var_C], edx
call	sub_65C560
mov	ebp, eax
add	esp, 14h
mov	dword ptr [esi+0Ch], 0
cmp	ebp, [esi+4]
jnb	loc_65CEAB
mov	edi, [esi]
mov	edx, [edi+ebp*4]
mov	eax, [esp+24h+arg_4]
cmp	[edx+14h], eax
jnz	short loc_65CEA7
mov	ecx, [esp+24h+var_14]
mov	ebx, [edi+ecx]
test	ebx, ebx
jz	short loc_65CE45
inc	dword ptr [ebx+4]

loc_65CE45:
mov	eax, [edi+ebp*4]
mov	edx, ecx
mov	ecx, [edi+edx]
mov	[esp+24h+var_8], eax
test	ecx, ecx
jz	short loc_65CE5E
call	sub_64A400
mov	eax, [esp+24h+var_8]

loc_65CE5E:
mov	ecx, [esp+24h+var_14]
mov	[edi+ecx], eax
test	eax, eax
jz	short loc_65CE6C
inc	dword ptr [eax+4]

loc_65CE6C:
mov	ecx, [edi+ebp*4]
test	ecx, ecx
jz	short loc_65CE78
call	sub_64A400

loc_65CE78:
mov	[edi+ebp*4], ebx
test	ebx, ebx
jz	short loc_65CE89
inc	dword ptr [ebx+4]
mov	ecx, ebx
call	sub_64A400

loc_65CE89:
mov	edx, [esi]
mov	eax, [esp+24h+var_14]
mov	eax, [eax+edx]
test	eax, eax
jz	short loc_65CEE0
mov	edx, [esp+24h+arg_8]
mov	ecx, [esp+24h+arg_0]
inc	edx
mov	[eax+14h], ecx
mov	[eax+18h], edx
jmp	short loc_65CEE0

loc_65CEA7:
mov	edi, [esp+24h+var_14]

loc_65CEAB:
mov	eax, [esi]
mov	edi, [edi+eax]
mov	[esp+24h+var_4], edi
test	edi, edi
jz	short loc_65CEBB
inc	dword ptr [edi+4]

loc_65CEBB:
push	ebx
mov	ecx, esi
call	sub_65CCC0
cmp	ebx, ebp
jnb	short loc_65CEC8
dec	ebp

loc_65CEC8:
lea	ecx, [esp+24h+var_4]
push	ecx
push	ebp
mov	ecx, esi
call	sub_65CD10
test	edi, edi
jz	short loc_65CEE0
mov	ecx, edi
call	sub_64A400

loc_65CEE0:
mov	edx, [esi]
mov	ebp, [edx+ebp*4]
test	ebp, ebp
jz	short loc_65CEF8
mov	ecx, [esp+24h+arg_8]
mov	eax, [esp+24h+arg_4]
inc	ecx
mov	[ebp+14h], eax
mov	[ebp+18h], ecx

loc_65CEF8:
pop	edi
pop	ebx
pop	esi
mov	al, 1
pop	ebp
add	esp, 14h
retn	0Ch
sub_65CD90 endp

align 10h



sub_65CF10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	eax, [eax+14h]
push	ebx
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
push	offset sub_65C540
lea	ecx, [esp+14h+var_8]
push	ecx
push	ebx
push	0
push	edi
mov	[esp+24h+var_4], eax
mov	[esp+24h+var_8], eax
call	sub_65C560
add	esp, 14h
cmp	eax, ebx
jnb	short loc_65CF98
mov	edx, [edi]
mov	ecx, [edx+eax*4]
lea	edx, [edx+eax*4]
test	ecx, ecx
jz	short loc_65CF75
push	esi
lea	esi, [eax+1]
push	ebp

loc_65CF54:
cmp	ecx, [esp+18h+arg_0]
jz	short loc_65CF73
mov	ebp, [esp+18h+var_4]
cmp	ebp, [ecx+14h]
jnz	short loc_65CF73
cmp	esi, ebx
jnb	short loc_65CF73
mov	ecx, [edx+4]
add	edx, 4
inc	eax
inc	esi
test	ecx, ecx
jnz	short loc_65CF54

loc_65CF73:
pop	ebp
pop	esi

loc_65CF75:
cmp	eax, ebx
jnb	short loc_65CF98
cmp	ecx, [esp+10h+arg_0]
jnz	short loc_65CF98
push	eax
mov	ecx, edi
call	sub_65CCC0
mov	dword ptr [edi+0Ch], 0
pop	edi
mov	al, 1
pop	ebx
add	esp, 8
retn	4

loc_65CF98:
pop	edi
xor	al, al
pop	ebx
add	esp, 8
retn	4
sub_65CF10 endp

align 10h



sub_65CFB0 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebp, [esi+4]
push	edi
xor	edi, edi
cmp	ebp, edi
jbe	short loc_65CFE2
nop

loc_65CFC0:
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
lea	ebx, [eax+edi*4]
mov	eax, [edx+88h]
call	eax
mov	ecx, [ebx]
inc	edi
mov	dword ptr [ecx+20h], 0
cmp	edi, ebp
jb	short loc_65CFC0
xor	edi, edi

loc_65CFE2:
mov	eax, [esi+4]
mov	[esi+0Ch], edi
cmp	eax, edi
jbe	short loc_65D031
mov	edx, [esi]
lea	ebx, [edx+eax*4-4]
mov	ebp, eax

loc_65CFF4:
mov	ecx, [ebx]
cmp	ecx, edi
jz	short loc_65CFFF
call	sub_64A400

loc_65CFFF:
sub	ebx, 4
sub	ebp, 1
jnz	short loc_65CFF4
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_65D03F
mov	eax, [esi]
cmp	eax, edi
jz	short loc_65D026
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_65D026:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_65D031:
cmp	[esi+8], edi
ja	short loc_65D03F
push	edi
push	esi
mov	ecx, esi
call	sub_668FE0

loc_65D03F:
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_65CFB0 endp

align 10h



sub_65D050 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
lea	ebp, [eax+ebx*4]
push	edi
mov	edi, [ebp+0]
mov	cl, [edi+76h]
shr	cl, 6
test	cl, 1
jz	short loc_65D07C
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn	4

loc_65D07C:
test	edi, edi
jz	loc_65D135
mov	edx, [edi]
mov	eax, [edx+8Ch]
mov	ecx, edi
call	eax
mov	ecx, 100h
or	[edi+76h], cx
mov	byte ptr [esp+18h+arg_0], al
test	al, al
jz	short loc_65D0CA
mov	edx, [edi]
mov	eax, [edx+88h]
mov	ecx, edi
call	eax
push	ebx
mov	ecx, esi
call	sub_65CCC0
mov	al, byte ptr [esp+18h+arg_0]
pop	edi
mov	dword ptr [esi+0Ch], 0
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4

loc_65D0CA:
mov	edi, [ebp+0]
mov	eax, [edi+14h]
test	eax, eax
jl	short loc_65D120
or	ebp, 0FFFFFFFFh
sub	ebp, eax
mov	[esp+18h+var_4], edi
test	edi, edi
jz	short loc_65D0E4
inc	dword ptr [edi+4]

loc_65D0E4:
push	ebx
mov	ecx, esi
call	sub_65CCC0
push	offset sub_65C540
lea	ecx, [esp+1Ch+var_8]
push	ecx
mov	[edi+14h], ebp
mov	eax, [esi+4]
push	eax
push	0
push	esi
mov	[esp+2Ch+var_8], ebp
call	sub_65C560
add	esp, 14h
lea	edx, [esp+18h+var_4]
push	edx
push	eax
mov	ecx, esi
call	sub_65CD10
mov	ecx, edi
call	sub_64A400

loc_65D120:
mov	al, byte ptr [esp+18h+arg_0]
pop	edi
mov	dword ptr [esi+0Ch], 0
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4

loc_65D135:
push	ebx
mov	ecx, esi
call	sub_65CCC0
pop	edi
mov	dword ptr [esi+0Ch], 0
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	4
sub_65D050 endp




sub_65D150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	offset sub_65C540
mov	esi, ecx
mov	ebx, [esi+4]
lea	eax, [esp+14h+arg_0]
push	eax
push	ebx
push	0
push	esi
mov	[esp+24h+var_4], ebx
mov	[esp+24h+arg_0], ebp
call	sub_65C560
add	esp, 14h
cmp	eax, ebx
jnb	short loc_65D1E3
mov	ecx, [esi]
push	edi
mov	edi, [ecx+eax*4]
test	edi, edi
jz	short loc_65D18C
inc	dword ptr [edi+4]

loc_65D18C:
cmp	[edi+14h], ebp
jnz	short loc_65D1DB
mov	edx, [esp+14h+arg_4]
mov	dword ptr [esi+0Ch], 0
cmp	edx, 40000h
jz	short loc_65D1D3
mov	ecx, [esi]
mov	ecx, [ecx+eax*4]
cmp	[ecx+10h], edx
jz	short loc_65D1D3
lea	ecx, [eax+1]
jmp	short loc_65D1B7

loc_65D1B3:
mov	ebx, [esp+14h+var_4]

loc_65D1B7:
cmp	ecx, ebx
jnb	short loc_65D1DB
mov	ebx, [esi]
mov	ebx, [ebx+eax*4+4]
cmp	[ebx+14h], ebp
jnz	short loc_65D1DB
mov	ebx, [esi]
mov	ebx, [ebx+eax*4+4]
inc	eax
inc	ecx
cmp	[ebx+10h], edx
jnz	short loc_65D1B3

loc_65D1D3:
push	eax
mov	ecx, esi
call	sub_65D050

loc_65D1DB:
mov	ecx, edi
call	sub_64A400
pop	edi

loc_65D1E3:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_65D150 endp

align 10h



sub_65D1F0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
mov	[edi+0Ch], esi
mov	bl, 1
cmp	[edi+4], esi
jbe	short loc_65D215

loc_65D201:
push	esi
mov	ecx, edi
call	sub_65D050
test	al, al
jnz	short loc_65D210
inc	esi
xor	bl, bl

loc_65D210:
cmp	esi, [edi+4]
jb	short loc_65D201

loc_65D215:
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn
sub_65D1F0 endp

align 10h



sub_65D220 proc	near
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_65D266
jmp	short loc_65D230
align 10h

loc_65D230:
mov	eax, [edi]
mov	eax, [eax+esi*4]
mov	cl, [eax+76h]
shr	cl, 6
test	cl, 1
jz	short loc_65D256
mov	edx, 0FFBFh
and	[eax+76h], dx
push	esi
mov	ecx, edi
call	sub_65D050
test	al, al
jz	short loc_65D256
dec	esi

loc_65D256:
inc	esi
cmp	esi, [edi+4]
jb	short loc_65D230
mov	dword ptr [edi+0Ch], 0
pop	edi
pop	esi
retn

loc_65D266:
mov	[edi+0Ch], esi
pop	edi
pop	esi
retn
sub_65D220 endp

align 10h



sub_65D270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_14=	dword ptr  18h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [ebx+48h]
mov	esi, ecx
mov	ebp, [esi+4]
push	offset sub_65C540
lea	eax, [esp+1Ch+var_8]
push	eax
push	ebp
push	0
push	esi
mov	[esp+2Ch+var_4], esi
mov	[esp+2Ch+var_8], edi
call	sub_65C560
add	esp, 14h
test	[esp+18h+arg_8], 1
mov	[esp+18h+arg_0], eax
mov	dword ptr [esi+0Ch], 0
jz	short loc_65D2EA
cmp	eax, ebp
jnb	short loc_65D2EA
mov	ecx, [esi]
mov	edx, [ecx+eax*4]
cmp	[edx+14h], edi
jnz	short loc_65D2EA
push	eax
mov	ecx, esi
call	sub_65D050
mov	eax, [esi+4]
push	offset sub_65C540
lea	ecx, [esp+1Ch+arg_8]
push	ecx
push	eax
push	0
push	esi
mov	dword ptr [esp+2Ch+arg_8], edi
call	sub_65C560
add	esp, 14h
mov	[esp+18h+arg_0], eax

loc_65D2EA:
mov	ebp, [esp+18h+arg_4]
mov	[ebp+14h], edi
mov	[esp+18h+arg_4], ebp
inc	dword ptr [ebp+4]
mov	edx, [ebp+0]
mov	eax, [edx+4]
lea	esi, [ebx+0Ch]
lea	edi, [ebp+24h]
mov	ecx, 8
rep movsd
mov	ecx, ebp
call	eax
fld	dword ptr [ebx+2Ch]
fstp	dword ptr [ebp+44h]
fld	dword ptr [ebx+30h]
fstp	dword ptr [ebp+48h]
fld	dword ptr [ebx+34h]
fstp	dword ptr [ebp+4Ch]
fld	dword ptr [ebx+38h]
fstp	dword ptr [ebp+50h]
fld	dword ptr [ebx+3Ch]
fstp	dword ptr [ebp+54h]
fld	dword ptr [ebx+40h]
fstp	dword ptr [ebp+58h]
mov	edx, [ebp+0]
fld	dword ptr [ebx+44h]
mov	edx, [edx+24h]
fstp	dword ptr [ebp+1Ch]
mov	cx, [ebx+50h]
mov	[ebp+74h], cx
movzx	eax, byte ptr [ebx+52h]
push	eax
mov	ecx, ebp
call	edx
sub	esp, 0Ch
xor	eax, eax
mov	esi, esp
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], eax
mov	edi, [ebx+4]
mov	ecx, [ebx]
mov	[esp+18h+arg_14], ecx
cmp	edi, eax
jz	short loc_65D392
mov	ebx, [esi+4]
lea	edx, [ebx+edi]
push	edx
push	esi
mov	ecx, esi
call	sub_6572D0
imul	ebx, 9Ch
mov	eax, [esp+18h+arg_14]
add	ebx, [esi]
push	eax
push	edi
push	ebx
call	sub_657110
add	esp, 0Ch

loc_65D392:
mov	edx, [ebp+0]
mov	eax, [edx+30h]
mov	ecx, ebp
call	eax
mov	edx, [esp+18h+arg_0]
lea	ecx, [esp+18h+arg_4]
push	ecx
mov	ecx, [esp+1Ch+var_4]
push	edx
call	sub_65CD10
mov	eax, [ebp+0]
mov	edx, [eax+84h]
mov	ecx, ebp
call	edx
mov	ecx, ebp
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_65D270 endp

align 10h



sub_65D3D0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [ebp+48h]
push	offset sub_65C540
mov	esi, ecx
mov	ebx, [esi+4]
lea	eax, [esp+14h+arg_0]
push	eax
push	ebx
push	0
push	esi
mov	[esp+24h+arg_0], edi
call	sub_65C560
add	esp, 14h
cmp	eax, ebx
jnb	loc_65D4BE
mov	ecx, [esi]
mov	ebx, [ecx+eax*4]
lea	eax, [ecx+eax*4]
cmp	[ebx+14h], edi
jnz	loc_65D4BE
mov	edx, 0FFBFh
and	[ebx+76h], dx
mov	eax, [ebx]
mov	edx, [eax+1Ch]
mov	ecx, ebx
call	edx
test	al, al
jnz	short loc_65D445
mov	eax, [ebx]
mov	edx, [eax+18h]
mov	ecx, ebx
call	edx
test	al, al
jz	loc_65D4BE
mov	eax, [ebx]
mov	edx, [eax+20h]
push	1
mov	ecx, ebx
call	edx

loc_65D445:
mov	ecx, 8
test	[ebp+53h], cl
jz	short loc_65D460
mov	eax, [ebx]
mov	edx, [eax+4]
lea	esi, [ebp+0Ch]
lea	edi, [ebx+24h]
rep movsd
mov	ecx, ebx
call	edx

loc_65D460:
test	byte ptr [ebp+53h], 4
jz	short loc_65D48A
fld	dword ptr [ebp+2Ch]
fstp	dword ptr [ebx+44h]
fld	dword ptr [ebp+30h]
fstp	dword ptr [ebx+48h]
fld	dword ptr [ebp+34h]
fstp	dword ptr [ebx+4Ch]
fld	dword ptr [ebp+38h]
fstp	dword ptr [ebx+50h]
fld	dword ptr [ebp+3Ch]
fstp	dword ptr [ebx+54h]
fld	dword ptr [ebp+40h]
fstp	dword ptr [ebx+58h]

loc_65D48A:
test	byte ptr [ebp+53h], 80h
jz	short loc_65D49E
movzx	ecx, byte ptr [ebp+52h]
mov	eax, [ebx]
mov	edx, [eax+24h]
push	ecx
mov	ecx, ebx
call	edx

loc_65D49E:
test	byte ptr [ebp+53h], 20h
jz	short loc_65D4B8
mov	esi, [ebx]
sub	esp, 0Ch
mov	ecx, esp
push	ebp
call	sub_65A330
mov	eax, [esi+30h]
mov	ecx, ebx
call	eax

loc_65D4B8:
fld	dword ptr [ebp+44h]
fstp	dword ptr [ebx+1Ch]

loc_65D4BE:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65D3D0 endp

align 10h



sub_65D4D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
mov	ebx, [ebp+48h]
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+4]
push	offset sub_65C540
lea	eax, [esp+20h+var_C]
push	eax
push	edi
push	0
push	esi
mov	[esp+30h+var_4], esi
mov	[esp+30h+var_8], ebx
mov	[esp+30h+var_C], ebx
call	sub_65C560
add	esp, 14h
cmp	eax, edi
jb	short loc_65D522
mov	ecx, [esp+1Ch+arg_4]
push	1
push	ecx
push	ebp
mov	ecx, esi
call	sub_65D270
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_65D522:
mov	edx, [esi]
lea	edi, [edx+eax*4]
mov	eax, [edi]
mov	[esp+1Ch+arg_0], eax
cmp	[eax+14h], ebx
jz	short loc_65D54B
mov	eax, [esp+1Ch+arg_4]
push	1
push	eax
push	ebp
mov	ecx, esi
call	sub_65D270
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_65D54B:
mov	esi, 1
test	eax, eax
jz	short loc_65D557
add	[eax+4], esi

loc_65D557:
mov	ebx, [esp+1Ch+arg_4]
mov	ecx, [esp+1Ch+var_8]
mov	edx, [ebx]
mov	eax, [edx+78h]
mov	[ebx+14h], ecx
mov	ecx, ebx
call	eax
mov	eax, [edi]
mov	ecx, 0FFBFh
and	[eax+76h], cx
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_65D581
call	sub_64A400

loc_65D581:
mov	[edi], ebx
add	[ebx+4], esi
mov	ecx, 8
test	[ebp+53h], cl
jz	short loc_65D595
lea	esi, [ebp+0Ch]
jmp	short loc_65D59C

loc_65D595:
mov	esi, [esp+1Ch+arg_0]
add	esi, 24h

loc_65D59C:
mov	edx, [ebx]
mov	eax, [edx+4]
lea	edi, [ebx+24h]
rep movsd
mov	ecx, ebx
call	eax
test	byte ptr [ebp+53h], 4
mov	esi, [esp+1Ch+arg_0]
lea	eax, [ebp+2Ch]
jnz	short loc_65D5BA
lea	eax, [esi+44h]

loc_65D5BA:
fld	dword ptr [eax]
fstp	dword ptr [ebx+44h]
fld	dword ptr [eax+4]
fstp	dword ptr [ebx+48h]
fld	dword ptr [eax+8]
fstp	dword ptr [ebx+4Ch]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [ebx+50h]
fld	dword ptr [eax+10h]
fstp	dword ptr [ebx+54h]
fld	dword ptr [eax+14h]
fstp	dword ptr [ebx+58h]
test	byte ptr [ebp+53h], 80h
jz	short loc_65D5E9
movzx	eax, byte ptr [ebp+52h]
jmp	short loc_65D5F2

loc_65D5E9:
mov	edx, [esi]
mov	eax, [edx+14h]
mov	ecx, esi
call	eax

loc_65D5F2:
mov	edx, [ebx]
push	eax
mov	eax, [edx+24h]
mov	ecx, ebx
call	eax
fld	dword ptr [ebp+44h]
mov	edi, [ebx]
fstp	dword ptr [ebx+1Ch]
mov	cx, [ebp+50h]
sub	esp, 0Ch
mov	[ebx+74h], cx
mov	ecx, esp
push	ebp
call	sub_65A330
mov	edx, [edi+30h]
mov	ecx, ebx
call	edx
mov	eax, [esi]
mov	edx, [eax+88h]
mov	ecx, esi
call	edx
mov	eax, [esp+1Ch+var_4]
mov	ecx, esi
mov	dword ptr [eax+0Ch], 0
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_65D4D0 endp

align 10h



sub_65D650 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

cmp	[esp+arg_4], 0
push	edi
mov	edi, ecx
jz	short loc_65D66D
mov	eax, [edi]
mov	edx, [esp+4+arg_0]
xor	ecx, ecx
cmp	eax, [edx]
pop	edi
setz	cl
mov	al, cl
retn	8

loc_65D66D:
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi]
cmp	dword ptr [ecx+4], 0
jnz	short loc_65D67F
call	sub_651580

loc_65D67F:
mov	ecx, [edi]
mov	eax, [esi]
mov	edx, [ecx+4]
xor	ecx, ecx
cmp	edx, [eax+4]
pop	esi
setz	cl
mov	al, cl
pop	edi
retn	8
sub_65D650 endp

align 10h



; int __fastcall sub_65D6A0(char *Src, int)
sub_65D6A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
test	ecx, ecx
jz	short loc_65D6E3
mov	al, [ecx]
test	al, al
jz	short loc_65D6E3
cmp	al, 30h
jl	short loc_65D6B3
cmp	al, 39h
jle	short loc_65D6BF

loc_65D6B3:
cmp	al, 2Bh
jz	short loc_65D6BF
cmp	al, 2Dh
jz	short loc_65D6BF
cmp	al, 2Eh
jnz	short loc_65D6E3

loc_65D6BF:
lea	eax, [esp+4+var_4]
push	eax		; char **
push	ecx		; Src
call	sub_67B3C0
mov	eax, [esp+0Ch+var_4]
mov	ecx, [esp+0Ch+arg_0]
add	esp, 8
fstp	qword ptr [ecx]
test	eax, eax
jz	short loc_65D6DF
cmp	byte ptr [eax],	0
jnz	short loc_65D6E3

loc_65D6DF:
mov	al, 1
pop	ecx
retn

loc_65D6E3:
xor	al, al
pop	ecx
retn
sub_65D6A0 endp

align 10h



sub_65D6F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx]
mov	ecx, edx
mov	al, [ecx]
test	al, al
jz	short loc_65D710

loc_65D700:
cmp	al, 30h
jl	short loc_65D719
cmp	al, 39h
jg	short loc_65D719
mov	al, [ecx+1]
inc	ecx
test	al, al
jnz	short loc_65D700

loc_65D710:
mov	[esp+arg_0], edx
jmp	_atoi

loc_65D719:
cmp	byte ptr [ecx],	0
jz	short loc_65D710
or	eax, 0FFFFFFFFh
retn
sub_65D6F0 endp

align 10h



sub_65D730 proc	near
mov	eax, 7
retn
sub_65D730 endp

align 10h



sub_65D740 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 14h
push	ebp
push	edi
mov	edi, [esp+1Ch+arg_0]
xor	ebp, ebp
cmp	[edi+1Ch], ebp
mov	[esp+1Ch+var_10], 0
jle	short loc_65D7D4
push	ebx
push	esi
lea	ebx, [ecx+10h]
lea	ebx, [ebx+0]

loc_65D760:
cmp	[esp+24h+var_10], 5
jb	short loc_65D770
lea	ecx, [esp+24h+var_10]
call	sub_652060

loc_65D770:
mov	eax, [edi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+30h+var_14]
push	ecx
lea	ecx, [esp+34h+var_10]
mov	[esp+34h+var_10], 4
mov	[esp+34h+var_C], ebp
mov	byte ptr [esp+34h+arg_0], 0
call	sub_652F60
mov	esi, [ebx]
lea	edx, [esp+24h+arg_0]
push	edx
push	ebp
mov	ecx, edi
add	esi, 0Ch
call	sub_651EC0
mov	ecx, [edi+18h]
mov	edx, [esi]
push	eax
lea	eax, [esp+2Ch+var_14]
push	eax
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+24h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65D7CC
call	sub_650DF0

loc_65D7CC:
inc	ebp
cmp	ebp, [edi+1Ch]
jl	short loc_65D760
pop	esi
pop	ebx

loc_65D7D4:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
pop	ebp
add	esp, 14h
retn	4
sub_65D740 endp

align 10h



; int __thiscall sub_65D7F0(void *, char)
sub_65D7F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65D800
call	sub_650DF0

loc_65D800:
test	[esp+4+arg_0], 1
jz	short loc_65D810
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_65D810:
mov	eax, esi
pop	esi
retn	4
sub_65D7F0 endp

align 10h



sub_65D820 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_662CF0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65D847

loc_65D833:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65D842
call	sub_652130

loc_65D842:
inc	esi
cmp	esi, ebx
jb	short loc_65D833

loc_65D847:
pop	edi
pop	esi
pop	ebx
retn
sub_65D820 endp

align 10h



sub_65D850 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_6625C0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65D877

loc_65D863:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65D872
call	sub_651F70

loc_65D872:
inc	esi
cmp	esi, ebx
jb	short loc_65D863

loc_65D877:
pop	edi
pop	esi
pop	ebx
retn
sub_65D850 endp

align 10h



sub_65D880 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_6626E0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65D8A7

loc_65D893:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65D8A2
call	sub_651F00

loc_65D8A2:
inc	esi
cmp	esi, ebx
jb	short loc_65D893

loc_65D8A7:
pop	edi
pop	esi
pop	ebx
retn
sub_65D880 endp

align 10h



sub_65D8B0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_662DF0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65D8D7

loc_65D8C3:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65D8D2
call	sub_652160

loc_65D8D2:
inc	esi
cmp	esi, ebx
jb	short loc_65D8C3

loc_65D8D7:
pop	edi
pop	esi
pop	ebx
retn
sub_65D8B0 endp

align 10h



sub_65D8E0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_6627F0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65D907

loc_65D8F3:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65D902
call	sub_651FF0

loc_65D902:
inc	esi
cmp	esi, ebx
jb	short loc_65D8F3

loc_65D907:
pop	edi
pop	esi
pop	ebx
retn
sub_65D8E0 endp

align 10h



sub_65D910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	edi
mov	edi, ecx
mov	eax, [edi+3Ch]
xor	ebx, ebx
mov	[esp+0Ch+var_4], eax
test	eax, eax
jbe	short loc_65D977
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
jmp	short loc_65D930
align 10h

loc_65D930:
mov	ecx, [edi+38h]
lea	esi, ds:0[ebx*4]
cmp	dword ptr [esi+ecx], 0
jz	short loc_65D970
mov	edx, [ebp+0]
mov	eax, [edx+28h]
push	0
push	10h
mov	ecx, ebp
call	eax
test	eax, eax
jz	short loc_65D964
mov	edx, [edi+38h]
mov	ecx, [edx+esi]
add	edx, esi
push	ecx
mov	ecx, eax
call	sub_652330
jmp	short loc_65D966

loc_65D964:
xor	eax, eax

loc_65D966:
mov	edx, [edi+38h]
mov	[esi+edx], eax
mov	eax, [esp+14h+var_4]

loc_65D970:
inc	ebx
cmp	ebx, eax
jb	short loc_65D930
pop	esi
pop	ebp

loc_65D977:
pop	edi
pop	ebx
pop	ecx
retn	4
sub_65D910 endp

align 10h



sub_65D980 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_4]
mov	ebp, ecx
mov	ecx, esi
call	sub_679C50
xor	ebx, ebx
mov	[esp+1Ch+var_10], 0
cmp	[ebp+3Ch], ebx
jbe	loc_65DA28
push	edi
mov	edi, [esp+20h+arg_0]

loc_65D9A8:
test	ebx, ebx
jz	short loc_65D9BA
mov	eax, [esp+20h+arg_8]
push	0FFFFFFFFh
push	eax
mov	ecx, esi
call	sub_679D10

loc_65D9BA:
mov	ecx, [ebp+38h]
cmp	dword ptr [ecx+ebx*4], 0
push	0
lea	eax, [ecx+ebx*4]
push	0FFFFFFFFh
push	edi
jz	short loc_65D9ED
mov	ecx, [eax]
lea	edx, [esp+2Ch+arg_4]
push	edx
call	sub_652F60
mov	eax, [esp+20h+arg_4]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, esi
call	sub_679D10
mov	eax, [esp+20h+arg_4]
jmp	short loc_65DA0F

loc_65D9ED:
lea	edx, [esp+2Ch+arg_0]
push	edx
lea	ecx, [esp+30h+var_10]
call	sub_652F60
mov	eax, [esp+20h+arg_0]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, esi
call	sub_679D10
mov	eax, [esp+20h+arg_0]

loc_65DA0F:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65DA21
call	sub_650DF0

loc_65DA21:
inc	ebx
cmp	ebx, [ebp+3Ch]
jb	short loc_65D9A8
pop	edi

loc_65DA28:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_65D980 endp

align 10h



sub_65DA40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jl	short loc_65DA9C
cmp	edi, [esi+3Ch]
jge	short loc_65DA9C
mov	eax, [esi+38h]
mov	byte ptr [esi+4Ch], 0
cmp	dword ptr [eax+edi*4], 0
jnz	short loc_65DA8C
mov	ecx, dword_1855FC0
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 143h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	10h
push	esi
call	edx
test	eax, eax
jz	short loc_65DA84
mov	byte ptr [eax],	0
jmp	short loc_65DA86

loc_65DA84:
xor	eax, eax

loc_65DA86:
mov	ecx, [esi+38h]
mov	[ecx+edi*4], eax

loc_65DA8C:
mov	edx, [esp+8+arg_4]
mov	eax, [esi+38h]
mov	ecx, [eax+edi*4]
push	edx
call	sub_652520

loc_65DA9C:
pop	edi
pop	esi
retn	8
sub_65DA40 endp

align 10h



sub_65DAB0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4

sub	esp, 1Ch
push	esi
mov	esi, [esp+20h+arg_0]
push	7
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_65DADA
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 1Ch
retn

loc_65DADA:
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_65DAE7
add	edi, 0FFFFFFF0h
jmp	short loc_65DAE9

loc_65DAE7:
xor	edi, edi

loc_65DAE9:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	edx, [ecx+294h]
push	ebx
push	edx
lea	ecx, [esp+2Ch+var_18]
call	sub_679B40
mov	byte ptr [edi+4Ch], 0
cmp	dword ptr [esi+1Ch], 0
jnz	short loc_65DB21
mov	ecx, [esi+18h]
push	offset asc_156087C ; ","
lea	eax, [esp+2Ch+var_18]
push	eax
push	ecx
mov	ecx, edi
call	sub_65D980
jmp	short loc_65DB6B

loc_65DB21:
mov	ebx, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	edx, [esp+34h+var_1C]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+28h+var_1C]
mov	ecx, [eax]
mov	eax, [esi+18h]
push	ecx
lea	edx, [esp+2Ch+var_18]
push	edx
push	eax
mov	ecx, edi
call	sub_65D980
mov	eax, [esp+28h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65DB6B
call	sub_650DF0

loc_65DB6B:
mov	eax, [esp+28h+var_18]
test	eax, eax
jnz	short loc_65DB78
mov	eax, offset byte_146D660

loc_65DB78:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	edx, [esp+28h+var_14]
push	edx
push	eax
call	sub_650F20
mov	edi, eax
mov	ebx, 1
add	[edi+8], ebx
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_65DBA8
mov	ecx, esi
call	sub_652060

loc_65DBA8:
mov	byte ptr [esi],	5
mov	[esi+4], edi
add	[edi+8], ebx
add	dword ptr [edi+8], 0FFFFFFFFh
pop	ebx
jnz	short loc_65DBBF
mov	ecx, edi
call	sub_650DF0

loc_65DBBF:
lea	ecx, [esp+24h+var_18]
call	sub_679B60
pop	edi
pop	esi
add	esp, 1Ch
retn
sub_65DAB0 endp

align 10h



sub_65DBD0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	7
mov	ecx, ebx
call	sub_651C40
test	al, al
jnz	short loc_65DBF4
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, ebx
call	sub_651C60
pop	ebx
retn

loc_65DBF4:
mov	eax, [ebx+8]
push	esi
test	eax, eax
jz	short loc_65DC01
lea	esi, [eax-10h]
jmp	short loc_65DC03

loc_65DC01:
xor	esi, esi

loc_65DC03:
mov	eax, [esi+3Ch]
dec	eax
xor	edx, edx
mov	byte ptr [esi+4Ch], 0
test	eax, eax
jle	short loc_65DC2A
push	ebp
push	edi

loc_65DC13:
mov	ecx, [esi+38h]
mov	ebp, [ecx+eax*4]
mov	edi, [ecx+edx*4]
mov	[ecx+edx*4], ebp
mov	[ecx+eax*4], edi
inc	edx
dec	eax
cmp	edx, eax
jl	short loc_65DC13
pop	edi
pop	ebp

loc_65DC2A:
mov	ecx, [ebx+4]
push	esi
call	sub_652E40
pop	esi
pop	ebx
retn
sub_65DBD0 endp

align 10h



sub_65DC40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
mov	edx, [eax]
push	esi
push	edi
mov	edi, ecx
mov	ecx, edx
mov	al, [ecx]
test	al, al
jz	short loc_65DC6C

loc_65DC55:
cmp	al, 30h
jl	short loc_65DC67
cmp	al, 39h
jg	short loc_65DC67
mov	al, [ecx+1]
inc	ecx
test	al, al
jnz	short loc_65DC55
jmp	short loc_65DC6C

loc_65DC67:
cmp	byte ptr [ecx],	0
jnz	short loc_65DCB4

loc_65DC6C:		; char *
push	edx
call	_atoi
add	esp, 4
test	eax, eax
jl	short loc_65DCB4
cmp	eax, [edi+2Ch]
jge	short loc_65DC9E
mov	ecx, [edi+28h]
cmp	dword ptr [ecx+eax*4], 0
lea	eax, [ecx+eax*4]
jz	short loc_65DC9E
mov	edx, [eax]
mov	ecx, [esp+0Ch+arg_8]
push	edx
call	sub_652520
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_65DC9E:
mov	esi, [esp+0Ch+arg_8]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	0
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_65DCB4:
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	esi, [ebp+0]
add	esi, 27Ch
cmp	byte ptr [ebp+4], 6
jbe	short loc_65DCCE
mov	eax, [esi]
cmp	eax, [ebx]
jmp	short loc_65DCE5

loc_65DCCE:
mov	ecx, [ebx]
cmp	dword ptr [ecx+4], 0
jnz	short loc_65DCDB
call	sub_651580

loc_65DCDB:
mov	ecx, [esi]
mov	edx, [ebx]
mov	eax, [ecx+4]
cmp	eax, [edx+4]

loc_65DCE5:
setz	al
test	al, al
jz	short loc_65DD1E
cmp	byte ptr [edi+3Ch], 0
jz	short loc_65DCF8
cmp	dword ptr [edi+2Ch], 0
jz	short loc_65DD1E

loc_65DCF8:
mov	esi, [esp+10h+arg_8]
cmp	byte ptr [esi],	5
mov	ebx, [edi+2Ch]
jb	short loc_65DD0B
mov	ecx, esi
call	sub_652060

loc_65DD0B:
mov	[esi+4], ebx
pop	ebp
mov	byte ptr [esi],	4
mov	byte ptr [edi+3Ch], 0
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_65DD1E:
mov	ecx, [esp+10h+arg_8]
push	ecx
push	ebx
push	ebp
mov	ecx, edi
call	sub_663C50
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_65DC40 endp

align 10h



sub_65DD40 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_4]
mov	eax, [esi]
cmp	dword ptr [eax+10h], 0
push	edi
mov	edi, ecx
jbe	short loc_65DDA2
mov	eax, [eax]
movsx	ecx, byte ptr [eax]
push	ecx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_65DDA2
push	esi
call	sub_65D6F0
add	esp, 4
test	eax, eax
jl	short loc_65DD98
lea	edx, [esp+18h+var_10]
push	edx
push	eax
lea	ecx, [edi-10h]
mov	[esp+20h+var_10], 0
call	sub_65DA40
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	edi
mov	al, 1
pop	esi
add	esp, 10h
retn	8

loc_65DD98:
pop	edi
xor	al, al
pop	esi
add	esp, 10h
retn	8

loc_65DDA2:
mov	eax, [esp+18h+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_6645F0
pop	edi
pop	esi
add	esp, 10h
retn	8
sub_65DD40 endp

align 10h



sub_65DDC0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_48=	dword ptr -48h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+6Ch+var_4], eax
mov	eax, [esp+6Ch+arg_C]
push	ebx
mov	ebx, [esp+70h+arg_4]
push	ebp
mov	ebp, [esp+74h+arg_0]
push	esi
push	edi
push	eax
mov	eax, [esp+80h+arg_8]
push	eax
push	ebx
mov	esi, ecx
push	ebp
mov	[esp+8Ch+var_60], esi
mov	[esp+8Ch+var_64], ebp
call	sub_662B80
mov	ecx, [esi+2Ch]
mov	[esp+7Ch+var_68], ecx
mov	[esp+7Ch+var_6C], 8
cmp	ecx, 7
ja	short loc_65DE10
mov	[esp+7Ch+var_6C], ecx

loc_65DE10:
xor	edi, edi
cmp	[esp+7Ch+var_6C], edi
jbe	short loc_65DE50
jmp	short loc_65DE20
align 10h

loc_65DE20:
mov	edx, [esi+28h]
cmp	dword ptr [edx+edi*4], 0
lea	eax, [edx+edi*4]
jz	short loc_65DE49
mov	eax, [eax]
mov	ecx, [ebp+0]
mov	edx, [ebx]
mov	edx, [edx+4]
push	0
push	eax
lea	eax, [ecx+edi*4+248h]
push	eax
mov	ecx, ebx
call	edx
mov	ecx, [esp+7Ch+var_68]

loc_65DE49:
inc	edi
cmp	edi, [esp+7Ch+var_6C]
jb	short loc_65DE20

loc_65DE50:
cmp	edi, ecx
jnb	loc_65DF07
jmp	short loc_65DE60
align 10h

loc_65DE60:
mov	eax, [esi+28h]
cmp	dword ptr [eax+edi*4], 0
lea	ebp, ds:0[edi*4]
jz	loc_65DEFE
push	edi
lea	ecx, [esp+80h+var_54]
call	sub_6A29A0
lea	ecx, [esp+7Ch+var_54]
call	sub_6A2C40
lea	ecx, [esp+7Ch+var_5C]
push	ecx
lea	ecx, [esp+80h+var_54]
call	sub_6A23E0
mov	edx, [esp+7Ch+var_64]
mov	eax, [edx]
mov	edx, [esp+7Ch+var_58]
mov	ecx, [eax+280h]
mov	eax, [esp+7Ch+var_5C]
mov	esi, [esi+28h]
push	edx
push	eax
add	esi, ebp
call	sub_650F20
mov	[esp+7Ch+var_6C], eax
inc	dword ptr [eax+8]
mov	eax, [esi]
mov	edx, [ebx]
mov	edx, [edx+4]
push	0
push	eax
lea	ecx, [esp+84h+var_6C]
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+7Ch+var_6C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65DEE5
call	sub_650DF0

loc_65DEE5:
lea	ecx, [esp+7Ch+var_54]
mov	[esp+7Ch+var_48], offset off_143A4DC
call	sub_6A2180
mov	esi, [esp+7Ch+var_60]
mov	ecx, [esp+7Ch+var_68]

loc_65DEFE:
inc	edi
cmp	edi, ecx
jb	loc_65DE60

loc_65DF07:
mov	ecx, [esp+7Ch+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 6Ch
retn	10h
sub_65DDC0 endp

align 10h



sub_65DF20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi]
mov	edx, [eax]
mov	esi, ecx
mov	ecx, edx
mov	al, [ecx]
test	al, al
jz	short loc_65DF4B

loc_65DF34:
cmp	al, 30h
jl	short loc_65DF46
cmp	al, 39h
jg	short loc_65DF46
mov	al, [ecx+1]
inc	ecx
test	al, al
jnz	short loc_65DF34
jmp	short loc_65DF4B

loc_65DF46:
cmp	byte ptr [ecx],	0
jnz	short loc_65DF89

loc_65DF4B:		; char *
push	edx
call	_atoi
add	esp, 4
test	eax, eax
jl	short loc_65DF89
cmp	eax, [esi+2Ch]
jge	short loc_65DF82
mov	ecx, [esi+28h]
cmp	dword ptr [ecx+eax*4], 0
lea	eax, [ecx+eax*4]
jz	short loc_65DF82
mov	eax, [eax]
mov	cl, [eax]
test	cl, cl
jz	short loc_65DF82
cmp	cl, 0Ah
jz	short loc_65DF82
cmp	cl, 1
jz	short loc_65DF82
pop	edi
mov	al, 1
pop	esi
retn	0Ch

loc_65DF82:
pop	edi
xor	al, al
pop	esi
retn	0Ch

loc_65DF89:
mov	edx, [esp+8+arg_8]
mov	eax, [esp+8+arg_0]
push	edx
push	edi
push	eax
mov	ecx, esi
call	sub_663EF0
pop	edi
pop	esi
retn	0Ch
sub_65DF20 endp




sub_65DFA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_65DFCA
push	edi
mov	edi, eax

loc_65DFB4:
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65DFC1
call	sub_650DF0

loc_65DFC1:
sub	esi, 4
sub	edi, 1
jnz	short loc_65DFB4
pop	edi

loc_65DFCA:
pop	esi
retn
sub_65DFA0 endp

align 10h



sub_65DFD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_65E000
mov	eax, [edi]
test	eax, eax
jz	short loc_65DFF5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_65DFF5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_65E000:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_65E033
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_65E033:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 143h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_65DFD0 endp

align 10h



sub_65E060 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	ecx, [eax+280h]
mov	eax, ebp
lea	edx, [eax+1]
jmp	short loc_65E080
align 10h

loc_65E080:
mov	bl, [eax]
inc	eax
test	bl, bl
jnz	short loc_65E080
push	0
sub	eax, edx
push	eax
push	ebp
call	sub_650E40
mov	ecx, [esp+10h+arg_8]
mov	[esp+10h+arg_0], eax
inc	dword ptr [eax+8]
mov	eax, [esp+10h+arg_C]
mov	edx, [esi]
mov	edx, [edx+28h]
push	eax
push	ecx
lea	eax, [esp+18h+arg_0]
push	eax
push	edi
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65E0CA
call	sub_650DF0

loc_65E0CA:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
retn	10h
sub_65E060 endp

align 10h



sub_65E0E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_65E115 ; default
jmp	ds:off_65E118[eax*4] ; switch jump

loc_65E0F0:		; jumptable 0065E0E9 case 0
call	sub_65D820
retn	4

loc_65E0F8:		; jumptable 0065E0E9 case 1
call	sub_65D850
retn	4

loc_65E100:		; jumptable 0065E0E9 case 2
call	sub_65D880
retn	4

loc_65E108:		; jumptable 0065E0E9 case 3
call	sub_65D8B0
retn	4

loc_65E110:		; jumptable 0065E0E9 case 4
call	sub_65D8E0

locret_65E115:		; default
retn	4
sub_65E0E0 endp

off_65E118 dd offset loc_65E0F0	; jump table for switch	statement
dd offset loc_65E0F8
dd offset loc_65E100
dd offset loc_65E108
dd offset loc_65E110
align 10h



sub_65E130 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4

sub	esp, 18h
push	edi
mov	edi, [esp+1Ch+arg_0]
push	7
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_65E15A
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 18h
retn

loc_65E15A:
mov	eax, [edi+8]
push	ebx
push	ebp
push	esi
test	eax, eax
jz	short loc_65E169
lea	ebx, [eax-10h]
jmp	short loc_65E16B

loc_65E169:
xor	ebx, ebx

loc_65E16B:
mov	ebp, 1
add	[ebx+48h], ebp
cmp	dword ptr [ebx+48h], 0FFh
jl	short loc_65E1BC
mov	eax, [ebx+34h]
add	eax, 0Ch
push	offset a256LevelsOfRec ; "256 levels of	recursion is reached\n"
push	eax
call	sub_650A10
mov	ecx, [edi+18h]
mov	edi, [edi+4]
mov	esi, [ecx+78h]
add	esp, 8
cmp	byte ptr [edi],	5
jb	short loc_65E1A5
mov	ecx, edi
call	sub_652060

loc_65E1A5:
mov	byte ptr [edi],	5
mov	eax, [esi+8]
mov	[edi+4], eax
add	[eax+8], ebp
dec	dword ptr [ebx+48h]
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 18h
retn

loc_65E1BC:
mov	edx, [edi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
push	ecx
lea	ecx, [esp+2Ch+var_18]
call	sub_679B40
mov	eax, [edi+18h]
push	offset asc_156087C ; ","
lea	edx, [esp+2Ch+var_18]
push	edx
push	eax
mov	ecx, ebx
call	sub_65D980
mov	eax, [esp+28h+var_18]
test	eax, eax
jnz	short loc_65E1F4
mov	eax, offset byte_146D660

loc_65E1F4:
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	edx, [esp+28h+var_14]
push	edx
push	eax
call	sub_650F20
mov	esi, eax
add	[esi+8], ebp
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_65E21F
mov	ecx, edi
call	sub_652060

loc_65E21F:
mov	byte ptr [edi],	5
mov	[edi+4], esi
add	[esi+8], ebp
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_65E235
mov	ecx, esi
call	sub_650DF0

loc_65E235:
lea	ecx, [esp+28h+var_18]
call	sub_679B60
dec	dword ptr [ebx+48h]
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 18h
retn
sub_65E130 endp

align 10h


; Attributes: thunk

sub_65E250 proc	near
jmp	sub_65E130
sub_65E250 endp

align 10h



sub_65E260 proc	near

var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
mov	ebx, ecx
inc	dword ptr [ebx+38h]
cmp	dword ptr [ebx+38h], 0FFh
push	esi
lea	esi, [ebx-10h]
jl	short loc_65E29A
mov	eax, [esi+34h]
add	eax, 0Ch
push	offset a256LevelsOfRec ; "256 levels of	recursion is reached\n"
push	eax
call	sub_650A10
add	esp, 8
dec	dword ptr [esi+48h]
pop	esi
mov	eax, offset byte_146D660
pop	ebx
add	esp, 18h
retn	4

loc_65E29A:
push	edi
mov	edi, [esp+24h+arg_0]
mov	ecx, [edi+78h]
mov	edx, [ecx+294h]
push	edx
lea	ecx, [esp+28h+var_18]
call	sub_679B40
push	offset asc_156087C ; ","
lea	eax, [esp+28h+var_18]
push	eax
push	edi
mov	ecx, esi
call	sub_65D980
lea	ecx, [esp+24h+var_18]
lea	edi, [ebx+34h]
push	ecx
mov	ecx, edi
call	sub_67A4B0
mov	edi, [edi]
lea	ecx, [esp+24h+var_18]
and	edi, 0FFFFFFFCh
call	sub_679B60
dec	dword ptr [esi+48h]
lea	eax, [edi+8]
pop	edi
pop	esi
pop	ebx
add	esp, 18h
retn	4
sub_65E260 endp




sub_65E2F0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_65E31A
push	edi
mov	edi, eax

loc_65E304:
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_65E311
call	sub_650DF0

loc_65E311:
sub	esi, 4
sub	edi, 1
jnz	short loc_65E304
pop	edi

loc_65E31A:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
retn
sub_65E2F0 endp

align 10h



sub_65E330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_65E36E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_65DFA0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_65E387
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_65DFD0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_65E36E:
cmp	esi, [edi+8]
jb	short loc_65E387
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_65DFD0

loc_65E387:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_65E330 endp

align 10h



sub_65E390 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_65E3A9
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_65E3BE
push	esi
jmp	short loc_65E3B8

loc_65E3A9:
cmp	esi, [edi+8]
jb	short loc_65E3BE
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_65E3B8:
push	edi
call	sub_668FE0

loc_65E3BE:
mov	edx, [edi]
mov	[edi+4], esi
lea	eax, [edx+esi*4-4]
pop	edi
pop	esi
test	eax, eax
jz	short locret_65E3D5
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx

locret_65E3D5:
retn	4
sub_65E390 endp

align 10h



sub_65E3E0 proc	near

arg_0= dword ptr  4

mov	edx, 4
mov	eax, 1505h
push	esi
jmp	short loc_65E3F0
align 10h

loc_65E3F0:
movzx	esi, byte ptr [ecx+edx+3]
imul	eax, 1003Fh
dec	edx
add	eax, esi
test	edx, edx
ja	short loc_65E3F0
and	eax, [esp+4+arg_0]
pop	esi
retn	4
sub_65E3E0 endp

align 10h



sub_65E410 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	ebp, ecx
test	esi, esi
jge	short loc_65E420
xor	esi, esi

loc_65E420:
mov	eax, [ebp+3Ch]
mov	[esp+10h+arg_0], eax
mov	ebx, esi
cmp	esi, eax
jnb	short loc_65E458
lea	ecx, [ecx+0]

loc_65E430:
mov	ecx, [ebp+38h]
mov	edi, [ecx+ebx*4]
test	edi, edi
jz	short loc_65E453
mov	ecx, edi
call	sub_652830
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
mov	eax, [esp+10h+arg_0]

loc_65E453:
inc	ebx
cmp	ebx, eax
jb	short loc_65E430

loc_65E458:
cmp	esi, [ebp+3Ch]
lea	edi, [ebp+38h]
jnb	short loc_65E46C
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_65E485
push	esi
jmp	short loc_65E479

loc_65E46C:
cmp	esi, [edi+8]
jb	short loc_65E485
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_65E479:
push	edi
mov	ecx, edi
call	sub_668FE0
mov	eax, [esp+10h+arg_0]

loc_65E485:
mov	[edi+4], esi
cmp	eax, esi
jnb	short loc_65E49E
lea	esp, [esp+0]

loc_65E490:
mov	ecx, [edi]
mov	dword ptr [ecx+eax*4], 0
inc	eax
cmp	eax, esi
jb	short loc_65E490

loc_65E49E:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65E410 endp

align 10h



sub_65E4B0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	ebx, ecx
push	edi
mov	edi, [ebp+3Ch]
cmp	edi, [ebx+3Ch]
lea	esi, [ebx+38h]
jnb	short loc_65E4D1
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_65E4E6
push	edi
jmp	short loc_65E4DE

loc_65E4D1:
cmp	edi, [esi+8]
jb	short loc_65E4E6
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_65E4DE:
push	esi
mov	ecx, esi
call	sub_668FE0

loc_65E4E6:
mov	[esi+4], edi
mov	ecx, [ebx+3Ch]
xor	eax, eax
test	ecx, ecx
jbe	short loc_65E502

loc_65E4F2:
mov	edx, [ebp+38h]
mov	edx, [edx+eax*4]
mov	edi, [esi]
mov	[edi+eax*4], edx
inc	eax
cmp	eax, ecx
jb	short loc_65E4F2

loc_65E502:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65E4B0 endp

align 10h



sub_65E510 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [eax+3Ch]
mov	ebx, ecx
cmp	esi, [ebx+3Ch]
push	edi
lea	edi, [ebx+38h]
jnb	short loc_65E532
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_65E547
push	esi
jmp	short loc_65E53F

loc_65E532:
cmp	esi, [edi+8]
jb	short loc_65E547
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_65E53F:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_65E547:
mov	[edi+4], esi
mov	eax, [ebx+3Ch]
xor	ebp, ebp
mov	[esp+14h+var_4], eax
test	eax, eax
jbe	short loc_65E5A9
jmp	short loc_65E560
align 10h

loc_65E560:
mov	ebx, [esp+14h+arg_4]
mov	ecx, [ebx+38h]
lea	esi, ds:0[ebp*4]
cmp	dword ptr [esi+ecx], 0
jz	short loc_65E5A4
mov	ecx, [esp+14h+arg_0]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	10h
call	eax
test	eax, eax
jz	short loc_65E599
mov	edx, [ebx+38h]
mov	ecx, [edx+esi]
add	edx, esi
push	ecx
mov	ecx, eax
call	sub_652330
jmp	short loc_65E59B

loc_65E599:
xor	eax, eax

loc_65E59B:
mov	edx, [edi]
mov	[esi+edx], eax
mov	eax, [esp+14h+var_4]

loc_65E5A4:
inc	ebp
cmp	ebp, eax
jb	short loc_65E560

loc_65E5A9:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_65E510 endp

align 10h



sub_65E5C0 proc	near
mov	eax, [ecx+3Ch]
push	esi
lea	esi, [ecx+38h]
push	edi
xor	edi, edi
cmp	eax, edi
jbe	short loc_65E5F6
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_65E604
mov	eax, [esi]
cmp	eax, edi
jz	short loc_65E5ED
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_65E5ED:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn

loc_65E5F6:
cmp	[esi+8], edi
ja	short loc_65E604
push	edi
push	esi
mov	ecx, esi
call	sub_668FE0

loc_65E604:
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_65E5C0 endp

align 10h



sub_65E610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
inc	dword ptr [ebx+48h]
cmp	dword ptr [ebx+48h], 0FFh
jl	short loc_65E63A
mov	eax, [ebx+34h]
add	eax, 0Ch
push	offset a256LevelsOfRec ; "256 levels of	recursion is reached\n"
push	eax
call	sub_650A10
add	esp, 8
dec	dword ptr [ebx+48h]
pop	ebx
retn	8

loc_65E63A:
mov	eax, [esp+4+arg_0]
mov	ecx, [eax+78h]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [ecx+294h]
push	eax
mov	ecx, ebp
mov	[esp+14h+arg_0], edi
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_65E6D4
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 7
jnz	short loc_65E6D4
mov	eax, [esi+3Ch]
test	eax, eax
jz	loc_65E708
mov	ebp, [ebx+3Ch]
add	eax, ebp
push	eax
mov	ecx, ebx
call	sub_65E410
xor	edi, edi
cmp	[esi+3Ch], edi
jbe	short loc_65E708
add	ebp, ebp
add	ebp, ebp

loc_65E693:
mov	ecx, [esp+10h+arg_0]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	10h
call	eax
test	eax, eax
jz	short loc_65E6B9
mov	ecx, [esi+38h]
mov	edx, [ecx+edi*4]
lea	ecx, [ecx+edi*4]
push	edx
mov	ecx, eax
call	sub_652330
jmp	short loc_65E6BB

loc_65E6B9:
xor	eax, eax

loc_65E6BB:
mov	ecx, [ebx+38h]
mov	[ecx+ebp], eax
inc	edi
add	ebp, 4
cmp	edi, [esi+3Ch]
jb	short loc_65E693
dec	dword ptr [ebx+48h]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_65E6D4:
mov	edx, [edi]
mov	eax, [edx+28h]
push	0
push	10h
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_65E6F3
push	ebp
mov	ecx, eax
call	sub_652330
mov	[esp+10h+arg_0], eax
jmp	short loc_65E6FB

loc_65E6F3:
mov	[esp+10h+arg_0], 0

loc_65E6FB:
lea	ecx, [esp+10h+arg_0]
push	ecx
lea	ecx, [ebx+38h]
call	sub_65E390

loc_65E708:
dec	dword ptr [ebx+48h]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_65E610 endp

align 10h



sub_65E720 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	10h
push	esi
call	eax
test	eax, eax
jz	short loc_65E756
mov	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, eax
call	sub_652330
mov	ebx, eax
jmp	short loc_65E758

loc_65E756:
xor	ebx, ebx

loc_65E758:
push	edi
lea	edi, [esi+38h]
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_65E771
mov	edx, [edi+8]
shr	edx, 1
cmp	esi, edx
jnb	short loc_65E786
push	esi
jmp	short loc_65E77E

loc_65E771:
cmp	esi, [edi+8]
jb	short loc_65E786
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax

loc_65E77E:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_65E786:
mov	ecx, [edi]
lea	eax, [ecx+esi*4-4]
mov	[edi+4], esi
pop	edi
test	eax, eax
jz	short loc_65E796
mov	[eax], ebx

loc_65E796:
pop	esi
pop	ebx
pop	ecx
retn	4
sub_65E720 endp

align 10h



sub_65E7A0 proc	near
push	esi
mov	esi, [ecx+3Ch]
push	edi
lea	edi, [ecx+38h]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_65E7BA
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_65E7CF
push	esi
jmp	short loc_65E7C7

loc_65E7BA:
cmp	esi, [edi+8]
jb	short loc_65E7CF
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_65E7C7:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_65E7CF:
mov	edx, [edi]
mov	[edi+4], esi
lea	eax, [edx+esi*4-4]
pop	edi
pop	esi
test	eax, eax
jz	short locret_65E7E4
mov	dword ptr [eax], 0

locret_65E7E4:
retn
sub_65E7A0 endp

align 10h



sub_65E7F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi+3Ch], 0
jz	loc_65E8B3
mov	ecx, [esp+4+arg_4]
push	edi
test	ecx, ecx
jle	short loc_65E83F
push	ebx
mov	ebx, [esp+0Ch+arg_0]
add	ebx, ebx
push	ebp
add	ebx, ebx
mov	ebp, ecx

loc_65E812:
mov	eax, [esi+38h]
mov	edi, [ebx+eax]
test	edi, edi
jz	short loc_65E835
mov	ecx, edi
call	sub_652830
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
mov	ecx, [esp+10h+arg_4]

loc_65E835:
add	ebx, 4
sub	ebp, 1
jnz	short loc_65E812
pop	ebp
pop	ebx

loc_65E83F:
mov	edx, [esp+8+arg_0]
lea	eax, [edx+ecx]
cmp	eax, [esi+3Ch]
jge	short loc_65E873
mov	edx, eax
sub	edx, ecx
add	edx, edx
add	edx, edx

loc_65E853:
mov	ecx, [esi+38h]
mov	edi, [ecx+eax*4]
mov	[edx+ecx], edi
mov	ecx, [esi+38h]
mov	dword ptr [ecx+eax*4], 0
inc	eax
add	edx, 4
cmp	eax, [esi+3Ch]
jl	short loc_65E853
mov	ecx, [esp+8+arg_4]

loc_65E873:
mov	edi, [esi+3Ch]
sub	edi, ecx
add	esi, 38h
cmp	edi, [esi+4]
jnb	short loc_65E89A
mov	edx, [esi+8]
shr	edx, 1
cmp	edi, edx
jnb	short loc_65E8AF
push	edi
push	esi
mov	ecx, esi
call	sub_668FE0
mov	[esi+4], edi
pop	edi
pop	esi
retn	8

loc_65E89A:
cmp	edi, [esi+8]
jb	short loc_65E8AF
mov	eax, edi
shr	eax, 2
add	eax, edi
push	eax
push	esi
mov	ecx, esi
call	sub_668FE0

loc_65E8AF:
mov	[esi+4], edi
pop	edi

loc_65E8B3:
pop	esi
retn	8
sub_65E7F0 endp

align 10h



sub_65E8C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
mov	ebx, ecx
mov	ebp, [ebx+3Ch]
push	esi
push	edi
lea	edi, [eax+ebp]
cmp	edi, [ebx+3Ch]
lea	esi, [ebx+38h]
jnb	short loc_65E8E4
mov	ecx, [esi+8]
shr	ecx, 1
cmp	edi, ecx
jnb	short loc_65E8F9
push	edi
jmp	short loc_65E8F1

loc_65E8E4:
cmp	edi, [esi+8]
jb	short loc_65E8F9
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx

loc_65E8F1:
push	esi
mov	ecx, esi
call	sub_668FE0

loc_65E8F9:
test	ebp, ebp
mov	ebp, [esp+10h+arg_0]
mov	[esi+4], edi
jz	short loc_65E930
mov	eax, [ebx+3Ch]
mov	ecx, [esp+10h+arg_4]
dec	eax
lea	edi, [ecx+ebp]
cmp	eax, edi
jl	short loc_65E930
mov	edx, eax
sub	edx, ecx
add	edx, edx
add	edx, edx
jmp	short loc_65E920
align 10h

loc_65E920:
mov	ecx, [esi]
mov	ebx, [edx+ecx]
mov	[ecx+eax*4], ebx
dec	eax
sub	edx, 4
cmp	eax, edi
jge	short loc_65E920

loc_65E930:
mov	ecx, [esp+10h+arg_4]
test	ecx, ecx
jle	short loc_65E951
lea	eax, ds:0[ebp*4]
nop

loc_65E940:
mov	edx, [esi]
mov	dword ptr [eax+edx], 0
add	eax, 4
sub	ecx, 1
jnz	short loc_65E940

loc_65E951:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_65E8C0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_65EB80

loc_65E960:
push	edi
mov	edi, ecx
cmp	dword ptr [edi+3Ch], 0
jz	loc_65E9FA
mov	eax, [edi+38h]
push	ebx
mov	ebx, [eax]
push	esi
lea	esi, [edi+38h]
test	ebx, ebx
jz	short loc_65E990
mov	ecx, ebx
call	sub_652830
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_65E990:
mov	eax, 1
cmp	[edi+3Ch], eax
jbe	short loc_65E9B1
lea	ebx, [ebx+0]

loc_65E9A0:
mov	ecx, [esi]
mov	edx, [ecx+eax*4]
lea	ecx, [ecx+eax*4]
inc	eax
mov	[ecx-4], edx
cmp	eax, [edi+3Ch]
jb	short loc_65E9A0

loc_65E9B1:
mov	eax, [edi+3Ch]
mov	ecx, [esi]
mov	dword ptr [ecx+eax*4-4], 0
mov	edi, [edi+3Ch]
dec	edi
cmp	edi, [esi+4]
jnb	short loc_65E9E0
mov	edx, [esi+8]
shr	edx, 1
cmp	edi, edx
jnb	short loc_65E9F5
push	edi
push	esi
mov	ecx, esi
call	sub_668FE0
mov	[esi+4], edi
pop	esi
pop	ebx
pop	edi
retn

loc_65E9E0:
cmp	edi, [esi+8]
jb	short loc_65E9F5
mov	eax, edi
shr	eax, 2
add	eax, edi
push	eax
push	esi
mov	ecx, esi
call	sub_668FE0

loc_65E9F5:
mov	[esi+4], edi
pop	esi
pop	ebx

loc_65E9FA:
pop	edi
retn
; END OF FUNCTION CHUNK	FOR sub_65EB80
align 10h



sub_65EA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+3Ch]
mov	byte ptr [esi+4Ch], 0
jl	short loc_65EA1A
lea	eax, [edi+1]
push	eax
call	sub_65E410

loc_65EA1A:
mov	ecx, [esi+38h]
cmp	dword ptr [ecx+edi*4], 0
jnz	short loc_65EA51
mov	ecx, dword_1855FC0
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 143h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	10h
push	esi
call	edx
test	eax, eax
jz	short loc_65EA49
mov	byte ptr [eax],	0
jmp	short loc_65EA4B

loc_65EA49:
xor	eax, eax

loc_65EA4B:
mov	ecx, [esi+38h]
mov	[ecx+edi*4], eax

loc_65EA51:
mov	edx, [esp+8+arg_4]
mov	eax, [esi+38h]
mov	ecx, [eax+edi*4]
push	edx
call	sub_652520
pop	edi
pop	esi
retn	8
sub_65EA00 endp

align 10h



sub_65EA70 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	7
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_65EA94
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_65EA94:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_65EAA1
lea	esi, [eax-10h]
jmp	short loc_65EAA3

loc_65EAA1:
xor	esi, esi

loc_65EAA3:
mov	eax, [esi+3Ch]
mov	byte ptr [esi+4Ch], 0
test	eax, eax
jz	short loc_65EAE4
mov	ecx, [esi+38h]
mov	eax, [ecx+eax*4-4]
test	eax, eax
jz	short loc_65EAC4
mov	ecx, [edi+4]
push	eax
call	sub_652520
jmp	short loc_65EAD1

loc_65EAC4:
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0

loc_65EAD1:
mov	eax, [esi+3Ch]
test	eax, eax
jz	short loc_65EAF1
dec	eax
push	eax
mov	ecx, esi
call	sub_65E410
pop	esi
pop	edi
retn

loc_65EAE4:
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0

loc_65EAF1:
pop	esi
pop	edi
retn
sub_65EA70 endp

align 10h



sub_65EB00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	7
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_65EB24
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_65EB24:
push	ebx
mov	ebx, [esi+8]
test	ebx, ebx
jz	short loc_65EB31
add	ebx, 0FFFFFFF0h
jmp	short loc_65EB33

loc_65EB31:
xor	ebx, ebx

loc_65EB33:
push	edi
xor	edi, edi
cmp	[esi+1Ch], edi
jle	short loc_65EB56
jmp	short loc_65EB40
align 10h

loc_65EB40:
push	edi
mov	ecx, esi
call	sub_651EC0
push	eax
mov	ecx, ebx
call	sub_65E720
inc	edi
cmp	edi, [esi+1Ch]
jl	short loc_65EB40

loc_65EB56:
mov	byte ptr [ebx+4Ch], 0
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	ebx, [ebx+3Ch]
pop	edi
jb	short loc_65EB6D
mov	ecx, esi
call	sub_652060

loc_65EB6D:
mov	[esi+4], ebx
pop	ebx
mov	byte ptr [esi],	4
pop	esi
retn
sub_65EB00 endp

align 10h



sub_65EB80 proc	near

arg_0= dword ptr  4

; FUNCTION CHUNK AT 0065E960 SIZE 0000009C BYTES

push	edi
mov	edi, [esp+8]
push	7
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_65EBA4
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_65EBA4:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_65EBB1
lea	esi, [eax-10h]
jmp	short loc_65EBB3

loc_65EBB1:
xor	esi, esi

loc_65EBB3:
cmp	dword ptr [esi+3Ch], 0
jnz	short loc_65EBC9
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
pop	esi
mov	byte ptr [edi],	0
pop	edi
retn

loc_65EBC9:
mov	eax, [esi+38h]
mov	byte ptr [esi+4Ch], 0
mov	eax, [eax]
test	eax, eax
jz	short loc_65EBE8
mov	ecx, [edi+4]
push	eax
call	sub_652520
mov	ecx, esi
pop	esi
pop	edi
jmp	loc_65E960

loc_65EBE8:
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
mov	ecx, esi
pop	esi
mov	byte ptr [edi],	0
pop	edi
jmp	loc_65E960
sub_65EB80 endp	; sp-analysis failed

align 10h



sub_65EC00 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	7
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_65EC24
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_65EC24:
push	ebx
mov	ebx, [edi+8]
test	ebx, ebx
jz	short loc_65EC31
add	ebx, 0FFFFFFF0h
jmp	short loc_65EC33

loc_65EC31:
xor	ebx, ebx

loc_65EC33:
mov	byte ptr [ebx+4Ch], 0
mov	eax, [edi+1Ch]
test	eax, eax
jle	short loc_65EC68
push	esi
push	eax
push	0
mov	ecx, ebx
call	sub_65E8C0
xor	esi, esi
cmp	[edi+1Ch], esi
jle	short loc_65EC67

loc_65EC50:
push	esi
mov	ecx, edi
call	sub_651EC0
push	eax
push	esi
mov	ecx, ebx
call	sub_65DA40
inc	esi
cmp	esi, [edi+1Ch]
jl	short loc_65EC50

loc_65EC67:
pop	esi

loc_65EC68:
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
mov	ebx, [ebx+3Ch]
jb	short loc_65EC7A
mov	ecx, edi
call	sub_652060

loc_65EC7A:
mov	[edi+4], ebx
pop	ebx
mov	byte ptr [edi],	4
pop	edi
retn
sub_65EC00 endp

align 10h



sub_65EC90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, [ebp+78h]
push	esi
add	ebx, 27Ch
cmp	byte ptr [ebp+7Ch], 6
push	edi
mov	edi, [esp+10h+arg_4]
mov	esi, ecx
jbe	short loc_65ECB3
mov	eax, [ebx]
cmp	eax, [edi]
jmp	short loc_65ECCA

loc_65ECB3:
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
jnz	short loc_65ECC0
call	sub_651580

loc_65ECC0:
mov	edx, [ebx]
mov	ecx, [edi]
mov	eax, [edx+4]
cmp	eax, [ecx+4]

loc_65ECCA:
setz	al
test	al, al
jz	short loc_65ED10
mov	ebx, [esp+10h+arg_8]
push	0
mov	ecx, ebx
call	sub_653400
call	__ftol2_sse
xor	ecx, ecx
test	eax, eax
setl	cl
dec	ecx
and	ecx, eax
push	ecx
lea	ecx, [esi-10h]
call	sub_65E410
mov	edx, [esp+10h+arg_C]
push	edx
push	ebx
push	edi
push	ebp
mov	ecx, esi
mov	byte ptr [esi+3Ch], 1
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h

loc_65ED10:
push	edi
call	sub_65D6F0
mov	ebx, eax
add	esp, 4
test	ebx, ebx
jl	short loc_65ED7B
cmp	ebx, [esi+2Ch]
mov	byte ptr [esi+3Ch], 0
jl	short loc_65ED34
lea	eax, [ebx+1]
push	eax
lea	ecx, [esi-10h]
call	sub_65E410

loc_65ED34:
mov	ecx, [esi+28h]
cmp	dword ptr [ecx+ebx*4], 0
jnz	short loc_65ED62
mov	edx, [ebp+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	10h
call	edx
test	eax, eax
jz	short loc_65ED5A
mov	byte ptr [eax],	0
jmp	short loc_65ED5C

loc_65ED5A:
xor	eax, eax

loc_65ED5C:
mov	ecx, [esi+28h]
mov	[ecx+ebx*4], eax

loc_65ED62:
mov	edx, [esp+10h+arg_8]
mov	eax, [esi+28h]
mov	ecx, [eax+ebx*4]
push	edx
call	sub_652520
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	10h

loc_65ED7B:
mov	ecx, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
mov	ecx, esi
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_65EC90 endp

align 10h



sub_65EDA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
inc	eax
push	eax
push	esi
call	sub_65E330
mov	ecx, [esi+4]
mov	edx, [esi]
lea	ecx, [edx+ecx*4-4]
pop	esi
test	ecx, ecx
jz	short locret_65EDC7
mov	eax, [esp+arg_0]
mov	eax, [eax]
mov	[ecx], eax
inc	dword ptr [eax+8]

locret_65EDC7:
retn	4
sub_65EDA0 endp

align 10h



sub_65EDD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_65EDE9
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_65EDFE
push	esi
jmp	short loc_65EDF8

loc_65EDE9:
cmp	esi, [edi+8]
jb	short loc_65EDFE
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_65EDF8:
push	edi
call	sub_714BE0

loc_65EDFE:
mov	edx, [edi]
mov	[edi+4], esi
lea	eax, [edx+esi*4-4]
pop	edi
pop	esi
test	eax, eax
jz	short locret_65EE15
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx

locret_65EE15:
retn	4
sub_65EDD0 endp

align 10h



sub_65EE20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	edx, [ecx]
mov	[esi], edx
push	edi
mov	edi, [eax+4]
mov	eax, [edi]
test	eax, eax
jz	short loc_65EE44
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_65EE44:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_65EE5A
call	sub_64B3B0
mov	edx, [edi]
pop	edi
mov	[esi+4], edx
pop	esi
retn	4

loc_65EE5A:
mov	eax, [edi]
pop	edi
mov	[esi+4], eax
pop	esi
retn	4
sub_65EE20 endp

align 10h



sub_65EE70 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esi], eax
mov	eax, [edi+4]
test	eax, eax
jz	short loc_65EE90
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_65EE90:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_65EE9C
call	sub_64B3B0

loc_65EE9C:
mov	edx, [edi+4]
pop	edi
mov	[esi+4], edx
mov	eax, esi
pop	esi
retn	4
sub_65EE70 endp

align 10h



; int __thiscall sub_65EEB0(void *, char)
sub_65EEB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_665A40
test	[esp+4+arg_0], 1
jz	short loc_65EEC8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_65EEC8:
mov	eax, esi
pop	esi
retn	4
sub_65EEB0 endp

align 10h



sub_65EED0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_8]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
mov	[esi+4], ecx
mov	[esi], eax
lea	ecx, [esi+8]
mov	byte ptr [ecx+8], 0
mov	eax, [edx]
mov	[ecx], eax
test	eax, eax
jz	short loc_65EF02
push	edi
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi
pop	edi

loc_65EF02:
mov	dword ptr [ecx+4], 0
mov	eax, [edx+4]
test	eax, eax
jz	short loc_65EF20
mov	dl, [edx+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_65EF20:
mov	eax, [esp+4+arg_C]
mov	ecx, [esp+4+arg_10]
mov	[esi+14h], eax
mov	[esi+18h], ecx
mov	eax, esi
pop	esi
retn	14h
sub_65EED0 endp

align 10h



sub_65EF40 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
call	sub_663BE0
lea	ebp, [esi+10h]
mov	ecx, edi
mov	dword ptr [esi], offset	off_143275C
mov	dword ptr [ebp+0], offset off_1432708
call	sub_668000
mov	[esi+34h], eax
xor	ebx, ebx
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
lea	ecx, [esi+44h]
mov	[esi+40h], ebx
call	sub_67AB70
mov	[esi+48h], ebx
mov	[esi+4Ch], bl
mov	ecx, [edi+78h]
add	edi, 78h
push	2
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebp
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65EF40 endp

align 10h



sub_65EFB0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_660100
sub_65EFB0 endp

align 10h



sub_65EFC0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
call	sub_663B00
xor	ebx, ebx
mov	dword ptr [esi], offset	off_143275C
mov	dword ptr [esi+10h], offset off_1432708
mov	[esi+34h], ebx
lea	ebp, [esi+10h]
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
lea	ecx, [esi+44h]
mov	[esi+40h], ebx
call	sub_67AB70
mov	[esi+48h], ebx
mov	[esi+4Ch], bl
mov	ecx, [edi]
push	2
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebp
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_65EFC0 endp

align 10h



sub_65F020 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
xor	ebx, ebx
mov	dword ptr [esi], offset	off_143275C
mov	dword ptr [esi+10h], offset off_1432708
mov	[esi+34h], ebx
lea	edi, [esi+10h]
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
lea	ecx, [esi+44h]
mov	[esi+40h], ebx
call	sub_67AB70
mov	eax, [esp+10h+arg_4]
push	eax
push	ebp
mov	ecx, edi
mov	[esi+48h], ebx
mov	[esi+4Ch], bl
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_65F020 endp

align 10h



sub_65F080 proc	near
push	esi
push	edi
mov	esi, ecx
push	0
mov	dword ptr [esi], offset	off_143275C
mov	dword ptr [esi+10h], offset off_1432708
call	sub_65E410
mov	edi, [esi+44h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_65F0BD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_65F0BD:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+38h]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_664A30
sub_65F080 endp

align 10h



sub_65F0E0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65F118
mov	edi, edi

loc_65F0F0:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65F0FF
call	sub_652840

loc_65F0FF:
mov	ecx, dword_1855FC0
mov	eax, [edi+38h]
mov	edx, [ecx]
mov	eax, [eax+esi*4]
mov	edx, [edx+30h]
push	eax
call	edx
inc	esi
cmp	esi, ebx
jb	short loc_65F0F0

loc_65F118:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+38h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	esi, [edi+44h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_65F14E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_65F14E:
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_664580
sub_65F0E0 endp

align 10h



sub_65F160 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
push	7
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_65F18A
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 10h
retn

loc_65F18A:
mov	eax, [esi+8]
push	ebx
push	edi
test	eax, eax
jz	short loc_65F198
lea	ebx, [eax-10h]
jmp	short loc_65F19A

loc_65F198:
xor	ebx, ebx

loc_65F19A:
mov	byte ptr [ebx+4Ch], 0
mov	ecx, [esi+18h]
mov	eax, [ecx+78h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 10h
push	eax
push	edx
call	sub_671840
mov	edi, eax
test	edi, edi
jz	short loc_65F20A
push	ebx
lea	ecx, [esp+20h+var_10]
call	sub_652700
mov	ecx, [esi+18h]
lea	eax, [esp+1Ch+var_10]
push	eax
push	ecx
mov	ecx, edi
call	sub_65E610
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
xor	ebx, ebx
cmp	[esi+1Ch], ebx
jle	short loc_65F20A
lea	ebx, [ebx+0]

loc_65F1F0:
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	edx, [esi+18h]
push	eax
push	edx
mov	ecx, edi
call	sub_65E610
inc	ebx
cmp	ebx, [esi+1Ch]
jl	short loc_65F1F0

loc_65F20A:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_65F224
mov	ecx, edi
pop	edi
pop	ebx
pop	esi
add	esp, 10h
jmp	sub_64B3B0

loc_65F224:
pop	edi
pop	ebx
pop	esi
add	esp, 10h
retn
sub_65F160 endp

align 10h



sub_65F230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	7
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_65F25A
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, ebp
call	sub_651C60
pop	ebp
add	esp, 8
retn

loc_65F25A:
mov	eax, [ebp+8]
push	ebx
xor	ebx, ebx
push	edi
cmp	eax, ebx
jz	short loc_65F26E
lea	edi, [eax-10h]
mov	[esp+14h+var_4], edi
jmp	short loc_65F274

loc_65F26E:
mov	[esp+14h+var_4], ebx
mov	edi, ebx

loc_65F274:
mov	eax, [edi+3Ch]
push	esi
mov	[edi+4Ch], bl
xor	esi, esi
cmp	dword ptr [ebp+1Ch], 1
mov	[esp+18h+var_8], eax
jl	short loc_65F2B5
mov	ecx, [ebp+18h]
push	ecx
push	ebx
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	esi, eax
cmp	esi, ebx
jge	short loc_65F2AC
add	esi, [edi+3Ch]
jns	short loc_65F2AC
xor	esi, esi

loc_65F2AC:
mov	eax, [edi+3Ch]
cmp	esi, eax
jle	short loc_65F2B5
mov	esi, eax

loc_65F2B5:
cmp	dword ptr [ebp+1Ch], 2
jl	short loc_65F2F8
mov	edx, [ebp+18h]
push	edx
push	1
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ecx, eax
cmp	ecx, ebx
mov	[esp+18h+var_8], ecx
jge	short loc_65F2ED
add	ecx, [edi+3Ch]
mov	[esp+18h+var_8], ecx
jns	short loc_65F2ED
mov	[esp+18h+var_8], ebx
mov	ecx, ebx

loc_65F2ED:
mov	eax, [edi+3Ch]
cmp	ecx, eax
jle	short loc_65F2F8
mov	[esp+18h+var_8], eax

loc_65F2F8:
mov	ecx, [ebp+18h]
mov	eax, [ecx+78h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	ebx
add	eax, 10h
push	eax
push	edx
call	sub_671840
mov	ebx, eax
test	ebx, ebx
jz	short loc_65F384
cmp	esi, [esp+18h+var_8]
mov	ebp, esi
jge	short loc_65F380

loc_65F321:
mov	eax, [edi+38h]
mov	eax, [eax+ebp*4]
test	eax, eax
jz	short loc_65F335
push	eax
mov	ecx, ebx
call	sub_65E720
jmp	short loc_65F379

loc_65F335:
mov	esi, [ebx+3Ch]
lea	edi, [ebx+38h]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_65F34D
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_65F362
push	esi
jmp	short loc_65F35A

loc_65F34D:
cmp	esi, [edi+8]
jb	short loc_65F362
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_65F35A:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_65F362:
mov	eax, [edi]
lea	eax, [eax+esi*4-4]
mov	[edi+4], esi
mov	edi, [esp+18h+var_4]
test	eax, eax
jz	short loc_65F379
mov	dword ptr [eax], 0

loc_65F379:
inc	ebp
cmp	ebp, [esp+18h+var_8]
jl	short loc_65F321

loc_65F380:
mov	ebp, [esp+18h+arg_0]

loc_65F384:
mov	ecx, [ebp+4]
push	ebx
call	sub_652E40
pop	esi
pop	edi
test	ebx, ebx
jz	short loc_65F39F
mov	ecx, ebx
pop	ebx
pop	ebp
add	esp, 8
jmp	sub_64B3B0

loc_65F39F:
pop	ebx
pop	ebp
add	esp, 8
retn
sub_65F230 endp

align 10h



sub_65F3B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	edi
mov	edi, [esp+10h+arg_0]
push	7
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_65F3DA
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 0Ch
retn

loc_65F3DA:
push	ebp
mov	ebp, [edi+8]
test	ebp, ebp
jz	short loc_65F3E7
add	ebp, 0FFFFFFF0h
jmp	short loc_65F3E9

loc_65F3E7:
xor	ebp, ebp

loc_65F3E9:
cmp	dword ptr [edi+1Ch], 0
jnz	short loc_65F402
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
pop	ebp
mov	byte ptr [edi],	0
pop	edi
add	esp, 0Ch
retn

loc_65F402:
push	ebx
mov	byte ptr [ebp+4Ch], 0
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
test	ebx, ebx
jge	short loc_65F42D
add	ebx, [ebp+3Ch]
jns	short loc_65F42D
xor	ebx, ebx

loc_65F42D:
mov	eax, [ebp+3Ch]
cmp	ebx, eax
jle	short loc_65F436
mov	ebx, eax

loc_65F436:
sub	eax, ebx
cmp	dword ptr [edi+1Ch], 2
push	esi
mov	esi, eax
jl	short loc_65F470
mov	ecx, [edi+18h]
push	ecx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	esi, eax
test	esi, esi
jge	short loc_65F462
xor	esi, esi

loc_65F462:
mov	eax, [ebp+3Ch]
lea	edx, [esi+ebx]
cmp	edx, eax
jl	short loc_65F470
sub	eax, ebx
mov	esi, eax

loc_65F470:
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 10h
push	eax
push	edx
call	sub_671840
mov	ecx, eax
mov	[esp+1Ch+var_8], ecx
test	ecx, ecx
jz	loc_65F53B
test	esi, esi
jle	short loc_65F4DB
lea	eax, ds:0[ebx*4]
mov	[esp+1Ch+var_C], eax
mov	[esp+1Ch+var_4], esi
lea	ecx, [ecx+0]

loc_65F4B0:
mov	edx, [ebp+38h]
mov	eax, [esp+1Ch+var_C]
mov	eax, [eax+edx]
test	eax, eax
jz	short loc_65F4C6
push	eax
call	sub_65E720
jmp	short loc_65F4CB

loc_65F4C6:
call	sub_65E7A0

loc_65F4CB:
add	[esp+1Ch+var_C], 4
sub	[esp+1Ch+var_4], 1
mov	ecx, [esp+1Ch+var_8]
jnz	short loc_65F4B0

loc_65F4DB:
push	ecx
mov	ecx, [edi+4]
call	sub_652E40
test	esi, esi
jz	short loc_65F4F1
push	esi
push	ebx
mov	ecx, ebp
call	sub_65E7F0

loc_65F4F1:
mov	eax, [edi+1Ch]
cmp	eax, 3
jl	short loc_65F52B
add	eax, 0FFFFFFFEh
push	eax
push	ebx
mov	ecx, ebp
call	sub_65E8C0
mov	esi, 2
cmp	[edi+1Ch], esi
jle	short loc_65F52B
nop

loc_65F510:
push	esi
mov	ecx, edi
call	sub_651EC0
push	eax
lea	ecx, [ebx+esi-2]
push	ecx
mov	ecx, ebp
call	sub_65DA40
inc	esi
cmp	esi, [edi+1Ch]
jl	short loc_65F510

loc_65F52B:
mov	ecx, [esp+1Ch+var_8]
pop	esi
pop	ebx
pop	ebp
pop	edi
add	esp, 0Ch
jmp	sub_64B3B0

loc_65F53B:
pop	esi
pop	ebx
pop	ebp
pop	edi
add	esp, 0Ch
retn
sub_65F3B0 endp

align 10h



sub_65F550 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_65F59C
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 7
jnz	short loc_65F59C
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_65F59C
mov	eax, [esi+8]
test	eax, eax
jz	short loc_65F598
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_65F5C8
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax
jmp	short loc_65F5C8

loc_65F598:
xor	edi, edi
jmp	short loc_65F5C8

loc_65F59C:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	50h
call	edx
test	eax, eax
jz	short loc_65F5C4
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_65EF40
jmp	short loc_65F5C6

loc_65F5C4:
xor	eax, eax

loc_65F5C6:
mov	edi, eax

loc_65F5C8:
mov	eax, [esi+18h]
mov	edx, [edi+10h]
push	ebx
lea	ebx, [esp+1Ch+arg_0]
push	ebx
lea	ebx, [esp+20h+var_10]
push	ebx
mov	byte ptr [esp+24h+arg_0], 1
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 0
mov	ebx, [eax+78h]
lea	ecx, [edi+10h]
add	ebx, 27Ch
push	ebx
push	eax
mov	eax, [edx+0Ch]
call	eax
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
mov	eax, [esi+1Ch]
pop	ebx
test	eax, eax
jz	short loc_65F652
cmp	eax, 1
jnz	short loc_65F64A
push	0
mov	ecx, esi
call	sub_651EC0
mov	al, [eax]
cmp	al, 3
jz	short loc_65F627
cmp	al, 4
jnz	short loc_65F64A

loc_65F627:
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
push	eax
mov	ecx, edi
call	sub_65E410
jmp	short loc_65F652

loc_65F64A:
push	esi
mov	ecx, edi
call	sub_65D740

loc_65F652:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
mov	ecx, edi
pop	edi
pop	esi
add	esp, 10h
jmp	sub_64B3B0
sub_65F550 endp

align 10h



sub_65F670 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebp
push	esi
mov	esi, [esp+24h+arg_0]
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_65F6A4
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_65EF40
mov	ebp, eax
jmp	short loc_65F6A6

loc_65F6A4:
xor	ebp, ebp

loc_65F6A6:
mov	eax, [esi+18h]
mov	edx, [ebp+10h]
mov	edx, [edx+0Ch]
push	ebx
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esp+30h+var_10]
push	ecx
mov	byte ptr [esp+34h+arg_0], 1
mov	[esp+34h+var_10], 4
mov	[esp+34h+var_C], 0
mov	ecx, [eax+78h]
add	ecx, 27Ch
lea	edi, [ebp+10h]
push	ecx
push	eax
mov	ecx, edi
call	edx
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	ecx, [esi+18h]
push	2
lea	eax, [esp+30h+var_1C]
push	eax
call	sub_66D650
mov	ebx, [esi+18h]
lea	ecx, [esp+2Ch+var_1C]
push	ecx
lea	ecx, [esp+30h+var_10]
add	ebx, 78h
mov	byte ptr [esp+30h+arg_0], 3
call	sub_651E70
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+2Ch+arg_0]
push	eax
mov	eax, [ebx]
lea	ecx, [esp+30h+var_10]
push	ecx
add	eax, 148h
push	eax
push	ebx
mov	ecx, edi
call	edx
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
xor	edi, edi
pop	ebx
cmp	[esi+1Ch], edi
jz	short loc_65F744
push	esi
mov	ecx, ebp
call	sub_65D740

loc_65F744:
mov	ecx, [esi+4]
push	ebp
call	sub_652E40
test	byte ptr [esp+28h+var_14], 2
jnz	short loc_65F761
mov	ecx, [esp+28h+var_1C]
cmp	ecx, edi
jz	short loc_65F761
call	sub_64B3B0

loc_65F761:
test	byte ptr [esp+28h+var_14], 1
mov	[esp+28h+var_1C], edi
jnz	short loc_65F779
mov	ecx, [esp+28h+var_18]
cmp	ecx, edi
jz	short loc_65F779
call	sub_64B3B0

loc_65F779:
mov	ecx, ebp
mov	[esp+28h+var_18], edi
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn
sub_65F670 endp

align 10h



sub_65F790 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_65F7B9
push	esi
mov	ecx, eax
call	sub_65EF40
pop	esi
retn	4

loc_65F7B9:
xor	eax, eax
pop	esi
retn	4
sub_65F790 endp

align 10h



sub_65F7C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_65F020
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+50h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_1432780
mov	dword ptr [esi+10h], offset off_14327A8
mov	dword ptr [ecx], offset	off_14327A4
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_65F7C0 endp

align 10h



sub_65F820 proc	near
sub	ecx, 10h
jmp	sub_660470
sub_65F820 endp

align 10h



sub_65F830 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_65F853
cmp	[esi], ecx
jmp	short loc_65F868

loc_65F853:
cmp	dword ptr [ecx+4], 0
jnz	short loc_65F85E
call	sub_651580

loc_65F85E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_65F868:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_65F8B7
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_65F886
cmp	[esi], ecx
jmp	short loc_65F89B

loc_65F886:
cmp	dword ptr [ecx+4], 0
jnz	short loc_65F891
call	sub_651580

loc_65F891:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_65F89B:
setz	al
test	al, al
jnz	short loc_65F8B7
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_65DC40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_65F8B7:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+40h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_65F830 endp

align 10h



sub_65F8E0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_6625C0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65F907

loc_65F8F3:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65F902
call	sub_651F70

loc_65F902:
inc	esi
cmp	esi, ebx
jb	short loc_65F8F3

loc_65F907:
lea	ecx, [edi+54h]
call	sub_67C000
lea	ecx, [edi+60h]
call	sub_67C000
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_65F966
mov	ebx, [eax+4]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65F966

loc_65F927:
mov	ecx, [edi+6Ch]
mov	edx, [ecx]
mov	ecx, [edx+esi*4]
lea	eax, [edx+esi*4]
test	ecx, ecx
jz	short loc_65F961
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_65F961
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_65F961:
inc	esi
cmp	esi, ebx
jb	short loc_65F927

loc_65F966:
pop	edi
pop	esi
pop	ebx
retn
sub_65F8E0 endp

align 10h



sub_65F970 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_6626E0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65F997

loc_65F983:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65F992
call	sub_651F00

loc_65F992:
inc	esi
cmp	esi, ebx
jb	short loc_65F983

loc_65F997:
lea	ecx, [edi+54h]
call	sub_67BFB0
lea	ecx, [edi+60h]
call	sub_67BFB0
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_65F9E8
mov	ebx, [eax+4]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65F9E8

loc_65F9B7:
mov	ecx, [edi+6Ch]
mov	edx, [ecx]
mov	ecx, [edx+esi*4]
lea	eax, [edx+esi*4]
test	ecx, ecx
jz	short loc_65F9E3
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_65F9E3
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_65F9E3:
inc	esi
cmp	esi, ebx
jb	short loc_65F9B7

loc_65F9E8:
pop	edi
pop	esi
pop	ebx
retn
sub_65F970 endp

align 10h



sub_65F9F0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_6627F0
mov	ebx, [edi+3Ch]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65FA17

loc_65FA03:
mov	eax, [edi+38h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_65FA12
call	sub_651FF0

loc_65FA12:
inc	esi
cmp	esi, ebx
jb	short loc_65FA03

loc_65FA17:
lea	ecx, [edi+54h]
call	sub_67C070
lea	ecx, [edi+60h]
call	sub_67C070
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_65FA83
mov	ebx, [eax+4]
xor	esi, esi
test	ebx, ebx
jbe	short loc_65FA83

loc_65FA37:
mov	ecx, [edi+6Ch]
mov	edx, [ecx]
mov	ecx, [edx+esi*4]
lea	eax, [edx+esi*4]
test	ecx, ecx
jz	short loc_65FA7E
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_65FA7E
test	eax, 0FFFFFFFh
jbe	short loc_65FA69
and	eax, 8FFFFFFFh
push	2
jmp	short loc_65FA75

loc_65FA69:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_65FA75:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_65FA7E:
inc	esi
cmp	esi, ebx
jb	short loc_65FA37

loc_65FA83:
pop	edi
pop	esi
pop	ebx
retn
sub_65F9F0 endp

align 10h



sub_65FA90 proc	near
push	ebx
push	esi
push	edi
mov	esi, ecx
call	sub_662DF0
mov	ebx, [esi+3Ch]
xor	edi, edi
test	ebx, ebx
jbe	short loc_65FAB7

loc_65FAA3:
mov	eax, [esi+38h]
mov	ecx, [eax+edi*4]
test	ecx, ecx
jz	short loc_65FAB2
call	sub_652160

loc_65FAB2:
inc	edi
cmp	edi, ebx
jb	short loc_65FAA3

loc_65FAB7:
lea	ecx, [esi+54h]
call	sub_67C210
lea	ecx, [esi+60h]
call	sub_67C210
mov	eax, [esi+6Ch]
test	eax, eax
jz	short loc_65FAF0
mov	ebx, [eax+4]
xor	edi, edi
test	ebx, ebx
jbe	short loc_65FAF0

loc_65FAD7:
mov	ecx, [esi+6Ch]
mov	edx, [ecx]
mov	ecx, [edx+edi*4]
lea	eax, [edx+edi*4]
test	ecx, ecx
jz	short loc_65FAEB
call	sub_64B020

loc_65FAEB:
inc	edi
cmp	edi, ebx
jb	short loc_65FAD7

loc_65FAF0:
pop	edi
pop	esi
pop	ebx
retn
sub_65FA90 endp

align 10h



sub_65FB00 proc	near
push	ebx
push	esi
push	edi
mov	esi, ecx
call	sub_662CF0
mov	ebx, [esi+3Ch]
xor	edi, edi
test	ebx, ebx
jbe	short loc_65FB27

loc_65FB13:
mov	eax, [esi+38h]
mov	ecx, [eax+edi*4]
test	ecx, ecx
jz	short loc_65FB22
call	sub_652130

loc_65FB22:
inc	edi
cmp	edi, ebx
jb	short loc_65FB13

loc_65FB27:
lea	ecx, [esi+54h]
call	sub_67C1F0
lea	ecx, [esi+60h]
call	sub_67C1F0
mov	eax, [esi+6Ch]
test	eax, eax
jz	short loc_65FB60
mov	ebx, [eax+4]
xor	edi, edi
test	ebx, ebx
jbe	short loc_65FB60

loc_65FB47:
mov	ecx, [esi+6Ch]
mov	edx, [ecx]
mov	ecx, [edx+edi*4]
lea	eax, [edx+edi*4]
test	ecx, ecx
jz	short loc_65FB5B
call	sub_64B3B0

loc_65FB5B:
inc	edi
cmp	edi, ebx
jb	short loc_65FB47

loc_65FB60:
pop	edi
pop	esi
pop	ebx
retn
sub_65FB00 endp

align 10h



sub_65FB70 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+6Ch]
test	eax, eax
jz	short loc_65FB9B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+6Ch]
mov	eax, [eax+30h]
push	edx
call	eax

loc_65FB9B:
mov	ecx, esi
pop	esi
jmp	sub_65F0E0
sub_65FB70 endp

align 10h



sub_65FBB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
push	edi
mov	edi, ecx
mov	[edi], eax
mov	ecx, [esi+4]
mov	[edi+4], ecx
lea	ecx, [edi+8]
xor	edx, edx
mov	[ecx+8], dl
mov	eax, [esi+8]
mov	[ecx], eax
cmp	eax, edx
jz	short loc_65FBE2
push	ebx
mov	ebx, [eax+8]
inc	ebx
and	ebx, 8FFFFFFFh
mov	[eax+8], ebx
pop	ebx

loc_65FBE2:
mov	[ecx+4], edx
mov	eax, [esi+0Ch]
cmp	eax, edx
jz	short loc_65FBFC
mov	dl, [esi+10h]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_65FBFC:
mov	eax, [esi+14h]
mov	[edi+14h], eax
mov	ecx, [esi+18h]
mov	[edi+18h], ecx
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_65FBB0 endp

align 10h



sub_65FC10 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
test	edx, edx
jz	short loc_65FC36
push	esi
mov	esi, [edx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[edx+8], esi
pop	esi

loc_65FC36:
mov	ecx, [ecx+8]
mov	[eax+8], ecx
retn	4
sub_65FC10 endp

align 10h



sub_65FC40 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	qword ptr -44h
var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 50h
push	ebx
mov	ebx, [esp+54h+arg_0]
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	[esp+60h+var_34], 0
test	ebx, ebx
jnz	short loc_65FC60
lea	eax, [esp+60h+var_34]
mov	[esp+60h+arg_0], eax
mov	ebx, eax

loc_65FC60:
mov	ebp, [esp+60h+arg_4]
test	ebp, ebp
jnz	short loc_65FC6C
lea	ebp, [esp+60h+var_34]

loc_65FC6C:
xor	edi, edi
cmp	[esi+8], edi
jz	loc_65FDBB
mov	edi, [esi+14h]
add	edi, 8
mov	byte ptr [esp+60h+var_44], 0
add	dword ptr [edi], 10h
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_65FC93
mov	ecx, edi
call	sub_64B530

loc_65FC93:
mov	edi, [edi]
test	edi, edi
jz	short loc_65FCA1
push	ebp
mov	ecx, edi
call	sub_652330

loc_65FCA1:
mov	edi, [esi+14h]
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
add	edi, 8
cmp	eax, [edi+8]
jb	short loc_65FCBA
mov	ecx, edi
call	sub_64B530

loc_65FCBA:
mov	edi, [edi]
test	edi, edi
jz	short loc_65FCC8
push	ebx
mov	ecx, edi
call	sub_652330

loc_65FCC8:
mov	eax, [esi+14h]
mov	ecx, [eax+8]
sub	ecx, [eax+0Ch]
mov	edx, [eax+1Ch]
shl	edx, 5
sar	ecx, 4
lea	ecx, [ecx+edx-20h]
lea	edx, [esp+60h+var_44]
mov	[esp+60h+var_20], edx
mov	edx, [esi]
mov	[esp+60h+var_1C], edx
xor	edx, edx
push	edx
mov	[esp+64h+var_18], edx
mov	[esp+64h+var_14], edx
mov	edx, [esi+0Ch]
mov	[esp+64h+var_4], ecx
mov	ecx, [esi+8]
mov	[esp+64h+var_C], eax
mov	ebx, 2
push	edx
mov	[esp+68h+var_24], offset off_1431764
mov	[esp+68h+var_10], 0
mov	[esp+68h+var_8], ebx
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+68h+var_24]
push	edx
call	eax
mov	edi, [esi+14h]
add	edi, 8
mov	edi, edi

loc_65FD30:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_65FD48
mov	ecx, edi
call	sub_64B660

loc_65FD48:
sub	ebx, 1
jnz	short loc_65FD30
mov	ecx, [esp+60h+var_20]
test	ecx, ecx
jz	short loc_65FD94
mov	edx, [esi+14h]
push	edx
call	sub_653400
call	__ftol2_sse
test	byte ptr [esi+4], 2
jz	short loc_65FD6B
neg	eax

loc_65FD6B:
lea	ecx, [esp+60h+var_24]
mov	esi, eax
call	sub_64B830
lea	ecx, [esp+60h+var_44]
call	sub_652830
lea	ecx, [esp+60h+var_34]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 50h
retn	8

loc_65FD94:
lea	ecx, [esp+60h+var_24]
call	sub_64B830
lea	ecx, [esp+60h+var_44]
call	sub_652830
lea	ecx, [esp+60h+var_34]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 50h
retn	8

loc_65FDBB:
test	byte ptr [esi+4], 10h
fldz
fst	[esp+60h+var_44]
fstp	qword ptr [esp+60h+var_4C]
jz	loc_65FED9
mov	al, [ebx]
cmp	al, 3
jz	short loc_65FDD9
cmp	al, 4
jnz	short loc_65FDEF

loc_65FDD9:
mov	eax, [esi+14h]
push	eax
mov	ecx, ebx
call	sub_653400
fstp	[esp+60h+var_44]
mov	byte ptr [esp+60h+arg_4], 1
jmp	short loc_65FE2F

loc_65FDEF:
mov	ecx, [esi+14h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+6Ch+var_50]
push	edx
mov	ecx, ebx
call	sub_652F60
mov	eax, [esp+60h+var_50]
mov	ecx, [eax]	; Src
lea	edx, [esp+60h+var_44] ;	int
push	edx
call	sub_65D6A0
mov	byte ptr [esp+64h+arg_4], al
mov	eax, [esp+64h+var_50]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 4
cmp	[eax], edi
jnz	short loc_65FE2F
call	sub_650DF0

loc_65FE2F:
mov	al, [ebp+0]
cmp	al, 3
jz	short loc_65FE3A
cmp	al, 4
jnz	short loc_65FE49

loc_65FE3A:
mov	eax, [esi+14h]
push	eax
mov	ecx, ebp
call	sub_653400
mov	bl, 1
jmp	short loc_65FE8B

loc_65FE49:
mov	ecx, [esi+14h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+6Ch+var_50]
push	edx
mov	ecx, ebp
call	sub_652F60
mov	eax, [esp+60h+var_50]
mov	ecx, [eax]	; Src
lea	edx, [esp+60h+var_4C] ;	int
push	edx
call	sub_65D6A0
mov	bl, al
mov	eax, [esp+64h+var_50]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 4
cmp	[eax], edi
jnz	short loc_65FE87
call	sub_650DF0

loc_65FE87:
fld	qword ptr [esp+60h+var_4C]

loc_65FE8B:
cmp	byte ptr [esp+60h+arg_4], 0
jz	short loc_65FED3
test	bl, bl
jz	short loc_65FED3
fld	[esp+60h+var_44]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_65FEA6
or	edi, 0FFFFFFFFh

loc_65FEA6:
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_65FEB4
mov	edi, 1

loc_65FEB4:
test	byte ptr [esi+4], 2
jz	short loc_65FEBC
neg	edi

loc_65FEBC:
lea	ecx, [esp+60h+var_34]
mov	esi, edi
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 50h
retn	8

loc_65FED3:
mov	ebx, [esp+60h+arg_0]
fstp	st

loc_65FED9:
mov	eax, [esi+14h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+6Ch+arg_4]
push	ecx
mov	ecx, ebx
call	sub_652F60
mov	edx, [esi+14h]
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+6Ch+arg_0]
push	eax
mov	ecx, ebp
call	sub_652F60
mov	eax, [esi+4]
test	eax, 400h
jz	short loc_65FF37
mov	edx, [esp+60h+arg_0]
mov	edi, [edx]
mov	cl, al
not	cl
and	cl, 1
mov	byte ptr [esp+60h+var_50], cl
mov	eax, [esp+60h+var_50]
push	eax
lea	ecx, [esp+64h+arg_0]
call	sub_650650
push	eax
push	edi
lea	ecx, [esp+6Ch+arg_4]
call	sub_6506C0
jmp	short loc_65FF7D

loc_65FF37:
mov	edx, [esp+60h+arg_4]
test	al, 1
jz	short loc_65FF50
mov	ecx, [esp+60h+arg_0]
mov	eax, [ecx]
mov	ecx, [edx]
push	eax		; char *
push	ecx		; char *
call	sub_679A10
jmp	short loc_65FF7D

loc_65FF50:
mov	eax, [esp+60h+arg_0]
mov	ecx, [eax]
mov	eax, [edx]

loc_65FF58:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_65FF78
test	dl, dl
jz	short loc_65FF74
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_65FF78
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_65FF58

loc_65FF74:
xor	eax, eax
jmp	short loc_65FF7D

loc_65FF78:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_65FF7D:
test	byte ptr [esi+4], 2
jz	short loc_65FF85
neg	eax

loc_65FF85:
mov	esi, eax
mov	eax, [esp+60h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65FF9D
call	sub_650DF0

loc_65FF9D:
mov	eax, [esp+60h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_65FFB3
call	sub_650DF0

loc_65FFB3:
lea	ecx, [esp+60h+var_34]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 50h
retn	8
sub_65FC40 endp

align 10h



sub_65FFD0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 3Ch
push	ebx
push	ebp
push	esi
xor	ebp, ebp
push	edi
mov	esi, ecx
mov	[esp+4Ch+var_10], 0
cmp	[esp+4Ch+arg_0], ebp
jnz	short loc_65FFEE
lea	eax, [esp+4Ch+var_10]
mov	[esp+4Ch+arg_0], eax

loc_65FFEE:
cmp	[esp+4Ch+arg_4], ebp
jnz	short loc_65FFFC
lea	ecx, [esp+4Ch+var_10]
mov	[esp+4Ch+arg_4], ecx

loc_65FFFC:
mov	eax, [esi+8]
add	eax, 78h
mov	[esp+4Ch+var_38], eax
mov	[esp+4Ch+var_34], ebp
cmp	[esi+14h], ebp
jbe	loc_6600C4
mov	[esp+4Ch+var_3C], ebp

loc_660017:
mov	edx, [esi+8]
mov	ecx, [esp+4Ch+arg_0]
push	edx
call	sub_652D70
mov	ecx, [esp+4Ch+arg_4]
mov	edi, eax
mov	eax, [esi+8]
push	eax
call	sub_652D70
mov	ebx, eax
test	edi, edi
jz	short loc_6600B1
test	ebx, ebx
jz	short loc_6600B1
mov	ecx, [esi+4]
mov	eax, [edi]
mov	eax, [eax+2Ch]
mov	byte ptr [esp+4Ch+var_20], 0
mov	byte ptr [esp+4Ch+var_30], 0
mov	edx, [ecx]
lea	ecx, [esp+4Ch+var_20]
push	ecx
lea	ebp, [edx+ebp*4]
mov	edx, [esp+50h+var_38]
push	ebp
push	edx
mov	ecx, edi
call	eax
test	al, al
jz	short loc_66009B
mov	ecx, [esp+4Ch+var_38]
mov	edx, [ebx]
mov	edx, [edx+2Ch]
lea	eax, [esp+4Ch+var_30]
push	eax
push	ebp
push	ecx
mov	ecx, ebx
call	edx
test	al, al
jz	short loc_66009B
mov	ecx, [esi+10h]
add	ecx, [esp+4Ch+var_3C]
lea	eax, [esp+4Ch+var_30]
push	eax
lea	edx, [esp+50h+var_20]
push	edx
call	sub_65FC40
mov	edi, eax
test	edi, edi
jnz	short loc_6600D9

loc_66009B:
lea	ecx, [esp+4Ch+var_30]
call	sub_652830
lea	ecx, [esp+4Ch+var_20]
call	sub_652830
mov	ebp, [esp+4Ch+var_34]

loc_6600B1:
add	[esp+4Ch+var_3C], 1Ch
inc	ebp
mov	[esp+4Ch+var_34], ebp
cmp	ebp, [esi+14h]
jb	loc_660017

loc_6600C4:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 3Ch
retn	8

loc_6600D9:
lea	ecx, [esp+4Ch+var_30]
call	sub_652830
lea	ecx, [esp+4Ch+var_20]
call	sub_652830
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn	8
sub_65FFD0 endp




sub_660100 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_65F080
test	[esp+4+arg_0], 1
jz	short loc_66011D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_66011D:
mov	eax, esi
pop	esi
retn	4
sub_660100 endp

align 10h



sub_660130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_65F7C0
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_1432670
push	edi
lea	ecx, [esi+50h]
push	esi
mov	dword ptr [esi], offset	off_1432780
mov	dword ptr [esi+10h], offset off_14327A8
mov	dword ptr [ecx], offset	off_14327A4
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_660130 endp

align 10h



sub_660180 proc	near

arg_0= byte ptr	 4

sub	ecx, 50h
jmp	sub_660470
sub_660180 endp

align 10h



sub_660190 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
mov	ebx, [esp+20h+arg_0]
push	esi
push	edi
push	offset sub_65F550
mov	edi, ecx
push	ebx
mov	[esp+30h+var_14], edi
call	sub_67C3D0
lea	esi, [edi+10h]
xor	eax, eax
mov	dword ptr [edi], offset	off_1432800
mov	dword ptr [esi], offset	off_1439710
mov	[esp+28h+var_18], eax
cmp	ds:off_1432638,	eax
jz	loc_660278
mov	ecx, offset off_1432638
push	ebp

loc_6601D2:
mov	eax, ds:dword_143263C[eax]
mov	edx, [ecx]
mov	ecx, [ebx]
mov	[esp+2Ch+var_C], eax
mov	eax, edx
mov	byte ptr [esp+2Ch+arg_0], 3
mov	[esp+2Ch+var_10], 4
mov	edi, [ecx+280h]
lea	ebp, [eax+1]

loc_6601F5:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6601F5
push	0
sub	eax, ebp
push	eax
push	edx
mov	ecx, edi
call	sub_650E40
mov	[esp+2Ch+var_1C], eax
inc	dword ptr [eax+8]
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+2Ch+arg_0]
push	eax
lea	ecx, [esp+30h+var_10]
push	ecx
lea	eax, [esp+34h+var_1C]
push	eax
push	ebx
mov	ecx, esi
call	edx
mov	eax, [esp+2Ch+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66023F
call	sub_650DF0

loc_66023F:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	eax, [esp+2Ch+var_18]
inc	eax
mov	[esp+2Ch+var_18], eax
add	eax, eax
add	eax, eax
add	eax, eax
cmp	ds:off_1432638[eax], 0
lea	ecx, off_1432638[eax]
jnz	loc_6601D2
mov	eax, [esp+2Ch+var_14]
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4

loc_660278:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4
sub_660190 endp

align 10h



sub_660290 proc	near
or	eax, 0FFFFFFFFh
retn
sub_660290 endp

align 10h



sub_6602A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6602D5 ; default
jmp	ds:off_6602D8[eax*4] ; switch jump

loc_6602B0:		; jumptable 006602A9 case 0
call	sub_65FB00
retn	4

loc_6602B8:		; jumptable 006602A9 case 1
call	sub_65F8E0
retn	4

loc_6602C0:		; jumptable 006602A9 case 2
call	sub_65F970
retn	4

loc_6602C8:		; jumptable 006602A9 case 3
call	sub_65FA90
retn	4

loc_6602D0:		; jumptable 006602A9 case 4
call	sub_65F9F0

locret_6602D5:		; default
retn	4
sub_6602A0 endp

off_6602D8 dd offset loc_6602B0	; jump table for switch	statement
dd offset loc_6602B8
dd offset loc_6602C0
dd offset loc_6602C8
dd offset loc_6602D0
align 10h



sub_6602F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	ecx, [edx+ecx*4-1Ch]
test	eax, eax
jbe	short locret_66034A
push	esi
push	edi
lea	esi, [ecx+0Ch]
mov	edi, eax

loc_660310:
test	byte ptr [esi+4], 2
jnz	short loc_660322
mov	ecx, [esi-4]
test	ecx, ecx
jz	short loc_660322
call	sub_64B3B0

loc_660322:
test	byte ptr [esi+4], 1
mov	dword ptr [esi-4], 0
jnz	short loc_66033A
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66033A
call	sub_64B3B0

loc_66033A:
mov	dword ptr [esi], 0
sub	esi, 1Ch
sub	edi, 1
jnz	short loc_660310
pop	edi
pop	esi

locret_66034A:
retn
sub_6602F0 endp

align 10h



sub_660350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
xor	edx, edx
cmp	ecx, edx
jbe	short locret_66037A
mov	eax, [esp+arg_0]
add	eax, 0Ch
push	esi

loc_660362:
lea	esi, [eax-0Ch]
test	esi, esi
jz	short loc_660371
mov	[eax+4], dl
mov	[eax-4], edx
mov	[eax], edx

loc_660371:
add	eax, 1Ch
sub	ecx, 1
jnz	short loc_660362
pop	esi

locret_66037A:
retn
sub_660350 endp

align 10h



sub_660380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
test	eax, eax
jbe	locret_66040A
push	ebx
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
lea	edi, [ebp+0Ch]
add	esi, 0Ch
mov	ebx, eax

loc_6603A0:
lea	eax, [esi-0Ch]
test	eax, eax
jz	short loc_6603F8
mov	ecx, [ebp+0]
mov	[esi-0Ch], ecx
mov	edx, [edi-8]
mov	[esi-8], edx
mov	byte ptr [esi+4], 0
mov	eax, [edi-4]
lea	ecx, [esi-4]
mov	[ecx], eax
test	eax, eax
jz	short loc_6603D0
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_6603D0:
mov	dword ptr [esi], 0
mov	eax, [edi]
test	eax, eax
jz	short loc_6603EC
mov	dl, [edi+4]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_6603EC:
mov	eax, [edi+8]
mov	[esi+8], eax
mov	ecx, [edi+0Ch]
mov	[esi+0Ch], ecx

loc_6603F8:
add	ebp, 1Ch
add	edi, 1Ch
add	esi, 1Ch
sub	ebx, 1
jnz	short loc_6603A0
pop	edi
pop	esi
pop	ebp
pop	ebx

locret_66040A:
retn
sub_660380 endp

align 10h



sub_660410 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_660460
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_660424:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_660443
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66043D
call	sub_64B3B0

loc_66043D:
mov	dword ptr [esi], 0FFFFFFFEh

loc_660443:
add	edi, 0Ch
sub	ebp, 1
jnz	short loc_660424
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_660460:
pop	ebx
retn
sub_660410 endp

align 10h



sub_660470 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+50h]
mov	dword ptr [esi], offset	off_1432780
mov	dword ptr [esi+10h], offset off_14327A8
mov	dword ptr [ecx], offset	off_14327A4
call	sub_665A40
mov	ecx, esi
call	sub_65F080
test	[esp+4+arg_0], 1
jz	short loc_6604AA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6604AA:
mov	eax, esi
pop	esi
retn	4
sub_660470 endp




sub_6604B0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6604E0
mov	eax, [edi]
test	eax, eax
jz	short loc_6604D5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6604D5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6604E0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_660519
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
sub	ebx, esi
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_660519:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*8]
sub	eax, esi
add	eax, eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6604B0 endp

align 10h



sub_660550 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h

mov	eax, [esp+arg_8]
sub	esp, 14Ch
push	ebp
mov	ebp, [esp+150h+arg_4]
mov	ecx, eax
sub	ecx, ebp
cmp	ecx, 2
jnb	short loc_6605B4
test	[esp+150h+arg_1C], 2
jnz	short loc_660585
mov	ecx, [esp+150h+arg_14]
test	ecx, ecx
jz	short loc_660585
call	sub_64B3B0

loc_660585:
test	[esp+150h+arg_1C], 1
mov	[esp+150h+arg_14], 0
jnz	short loc_6605AA
mov	ecx, [esp+150h+arg_18]
test	ecx, ecx
jz	short loc_6605AA
call	sub_64B3B0

loc_6605AA:
mov	al, 1
pop	ebp
add	esp, 14Ch
retn

loc_6605B4:
push	esi
mov	esi, [esp+154h+arg_0]
push	ebx
lea	ecx, [esp+158h+var_140]
push	edi

loc_6605C2:
mov	[esp+15Ch+var_14C], eax
mov	[esp+15Ch+var_148], ecx
lea	ebx, [ebx+0]

loc_6605D0:
mov	edx, [esp+15Ch+var_14C]
mov	eax, edx
sub	eax, ebp
cmp	eax, 9
jle	loc_66072D
mov	ecx, [esi]
mov	ebx, [esp+15Ch+var_14C]
cdq
sub	eax, edx
mov	edx, [ecx+ebp*4]
sar	eax, 1
add	eax, ebp
mov	edi, [ecx+eax*4]
lea	eax, [ecx+eax*4]
mov	[ecx+ebp*4], edi
mov	[eax], edx
mov	eax, [esi]
mov	ecx, [eax+ebp*4+4]
mov	eax, [eax+ebx*4-4]
lea	edi, [ebp+1]
dec	ebx
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FC40
test	eax, eax
jge	short loc_66062A
mov	eax, [esi]
mov	edx, [eax+edi*4]
mov	ecx, [eax+ebx*4]
mov	[eax+ebx*4], edx
mov	[eax+edi*4], ecx

loc_66062A:
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	eax, [eax+ebp*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FC40
test	eax, eax
jge	short loc_660656
mov	eax, [esi]
mov	ecx, [eax+ebp*4]
mov	edx, [eax+edi*4]
mov	[eax+ebp*4], edx
mov	[esp+15Ch+var_144], ecx
mov	[eax+edi*4], ecx

loc_660656:
mov	eax, [esi]
mov	ecx, [eax+ebp*4]
mov	eax, [eax+ebx*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FC40
test	eax, eax
jge	short loc_660680
mov	eax, [esi]
mov	edx, [eax+ebp*4]
mov	ecx, [eax+ebx*4]
mov	[eax+ebx*4], edx
mov	[eax+ebp*4], ecx
mov	edi, edi

loc_660680:
inc	edi
cmp	edi, [esp+15Ch+var_14C]
jge	loc_6607A9
mov	eax, [esi]
mov	ecx, [eax+ebp*4]
mov	eax, [eax+edi*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FC40
test	eax, eax
jl	short loc_660680

loc_6606A5:
sub	ebx, 1
js	loc_6607A9
mov	eax, [esi]
mov	ecx, [eax+ebx*4]
mov	eax, [eax+ebp*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FC40
test	eax, eax
jl	short loc_6606A5
cmp	edi, ebx
mov	eax, [esi]
mov	edx, [eax+ebx*4]
jg	short loc_6606DC
mov	ecx, [eax+edi*4]
mov	[eax+edi*4], edx
mov	[eax+ebx*4], ecx
jmp	short loc_660680

loc_6606DC:
mov	ecx, [eax+ebp*4]
mov	[eax+ebp*4], edx
mov	[eax+ebx*4], ecx
mov	eax, [esp+15Ch+var_14C]
mov	[esp+15Ch+var_144], ecx
mov	edx, eax
mov	ecx, ebx
sub	edx, edi
sub	ecx, ebp
cmp	ecx, edx
jle	short loc_660712
mov	eax, [esp+15Ch+var_148]
add	[esp+15Ch+var_148], 8
mov	ecx, [esp+15Ch+var_148]
mov	[eax], ebp
mov	[eax+4], ebx
mov	ebp, edi
jmp	loc_6605D0

loc_660712:
mov	ecx, [esp+15Ch+var_148]
add	[esp+15Ch+var_148], 8
mov	[ecx], edi
mov	[ecx+4], eax
mov	ecx, [esp+15Ch+var_148]
mov	[esp+15Ch+var_14C], ebx
jmp	loc_6605D0

loc_66072D:
lea	ebx, [ebp+1]
cmp	ebx, edx
mov	edi, ebp
jge	short loc_660793

loc_660736:
mov	edx, [esi]
mov	ecx, [edx+edi*4]
lea	eax, [edx+edi*4]
mov	eax, [eax+4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FC40
test	eax, eax
jge	short loc_660786

loc_660753:
mov	eax, [esi]
mov	edx, [eax+edi*4]
mov	ecx, [eax+edi*4+4]
lea	eax, [eax+edi*4]
mov	[eax+4], edx
mov	[eax], ecx
cmp	edi, ebp
jz	short loc_660786
mov	eax, [esi]
dec	edi
mov	ecx, [eax+edi*4]
lea	eax, [eax+edi*4]
mov	eax, [eax+4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FC40
test	eax, eax
jl	short loc_660753

loc_660786:
mov	edi, ebx
inc	ebx
cmp	ebx, [esp+15Ch+var_14C]
jl	short loc_660736
mov	ecx, [esp+15Ch+var_148]

loc_660793:
lea	edx, [esp+15Ch+var_140]
cmp	ecx, edx
jbe	short loc_6607F5
mov	ebp, [ecx-8]
mov	eax, [ecx-4]
sub	ecx, 8
jmp	loc_6605C2

loc_6607A9:
test	[esp+15Ch+arg_1C], 2
jnz	short loc_6607C3
mov	ecx, [esp+15Ch+arg_14]
test	ecx, ecx
jz	short loc_6607C3
call	sub_64B3B0

loc_6607C3:
test	[esp+15Ch+arg_1C], 1
mov	[esp+15Ch+arg_14], 0
jnz	short loc_6607E8
mov	ecx, [esp+15Ch+arg_18]
test	ecx, ecx
jz	short loc_6607E8
call	sub_64B3B0

loc_6607E8:
pop	edi
pop	ebx
pop	esi
xor	al, al
pop	ebp
add	esp, 14Ch
retn

loc_6607F5:
test	[esp+15Ch+arg_1C], 2
jnz	short loc_66080F
mov	ecx, [esp+15Ch+arg_14]
test	ecx, ecx
jz	short loc_66080F
call	sub_64B3B0

loc_66080F:
test	[esp+15Ch+arg_1C], 1
mov	[esp+15Ch+arg_14], 0
jnz	short loc_660834
mov	ecx, [esp+15Ch+arg_18]
test	ecx, ecx
jz	short loc_660834
call	sub_64B3B0

loc_660834:
pop	edi
pop	ebx
pop	esi
mov	al, 1
pop	ebp
add	esp, 14Ch
retn
sub_660550 endp

align 10h



sub_660850 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_660872
call	sub_660410
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_660872:
push	esi
cmp	eax, 8
jnb	short loc_66087F
mov	esi, 8
jmp	short loc_6608E4

loc_66087F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_660892
fadd	ds:flt_15FCC08

loc_660892:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6608E4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_660944
xor	eax, eax
jmp	short loc_660930
align 10h

loc_660930:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_660930

loc_660944:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_6609C2
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_660952:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_6609A8
lea	edx, [esi+4]
mov	eax, 4
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_660970:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_660970
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_660AC0
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66099E
call	sub_64B3B0

loc_66099E:
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_6609A8:
add	edi, 0Ch
sub	ebx, 1
jnz	short loc_660952
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_6609C2:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[ebp+0], eax
mov	[esp+18h+arg_4], 0
call	sub_660410
pop	esi
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_660850 endp

align 10h



sub_6609F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_660A37
mov	ecx, [edi]
sub	eax, esi
push	eax
lea	eax, ds:0[esi*8]
sub	eax, esi
lea	edx, [ecx+eax*4]
push	edx
call	sub_6602F0
mov	eax, [edi+8]
shr	eax, 1
add	esp, 8
cmp	esi, eax
jnb	short loc_660A4E
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_6604B0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_660A37:
cmp	esi, [edi+8]
jb	short loc_660A4E
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6604B0

loc_660A4E:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6609F0 endp

align 10h



sub_660A60 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
sub	esp, 1Ch
lea	eax, [esp+28h+arg_4]
mov	ecx, esp
push	eax
call	sub_65FBB0
push	edi
push	0
push	esi
call	sub_660550
add	esp, 28h
test	[esp+0Ch+arg_14], 2
mov	bl, al
jnz	short loc_660A9B
mov	ecx, [esp+0Ch+arg_C]
test	ecx, ecx
jz	short loc_660A9B
call	sub_64B3B0

loc_660A9B:
test	[esp+0Ch+arg_14], 1
mov	[esp+0Ch+arg_C], 0
jnz	short loc_660AB7
mov	ecx, [esp+0Ch+arg_10]
test	ecx, ecx
jz	short loc_660AB7
call	sub_64B3B0

loc_660AB7:
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn
sub_660A60 endp

align 10h



sub_660AC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_660AD4
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_660AF6

loc_660AD4:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_660AFB
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_660AF6:
call	sub_660850

loc_660AFB:
mov	eax, [esi]
mov	ebp, [esp+0Ch+arg_8]
and	ebp, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ebp+ebp*2+0]
lea	ebx, [esi+edx*4+8]
mov	ecx, 0FFFFFFFEh
mov	[esp+0Ch+arg_8], ebx
cmp	[ebx], ecx
jnz	short loc_660B4C
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [ebx], 0FFFFFFFFh
mov	eax, [ecx]
mov	[ebx+4], eax
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_660B40
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_660B40:
mov	eax, [ecx+4]
pop	esi
pop	ebp
mov	[ebx+8], eax
pop	ebx
retn	0Ch

loc_660B4C:
mov	eax, [esi+4]
push	edi
mov	edi, ebp

loc_660B52:
inc	edi
and	edi, eax
lea	edx, [edi+edi*2]
cmp	[esi+edx*4+8], ecx
jnz	short loc_660B52
lea	eax, [edi+edi*2]
lea	ecx, [esi+eax*4+8]
mov	[esp+10h+arg_0], ecx
mov	eax, 4
mov	edx, 1505h

loc_660B73:
movzx	ecx, byte ptr [ebx+eax+3]
imul	edx, 1003Fh
dec	eax
add	edx, ecx
test	eax, eax
ja	short loc_660B73
mov	eax, [esi+4]
and	edx, eax
cmp	edx, ebp
jnz	short loc_660BB2
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_660B9C
push	ebx
call	sub_65FC10

loc_660B9C:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [ebx+4]
call	sub_65EE70
mov	[ebx], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_660BB2:
push	eax
mov	ecx, ebx
call	sub_65E3E0
lea	eax, [eax+eax*2]
cmp	[esi+eax*4+8], ebp
lea	ebx, [esi+eax*4+8]
jz	short loc_660BD6

loc_660BC7:
mov	ebx, [ebx]
lea	ecx, [ebx+ebx*2]
cmp	[esi+ecx*4+8], ebp
lea	ebx, [esi+ecx*4+8]
jnz	short loc_660BC7

loc_660BD6:
mov	ecx, [esp+10h+arg_0]
mov	esi, [esp+10h+arg_8]
test	ecx, ecx
jz	short loc_660BE8
push	esi
call	sub_65FC10

loc_660BE8:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [esi+4]
mov	[ebx], edi
call	sub_65EE70
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_660AC0 endp

align 10h



sub_660C10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [ecx+3Ch]
sub	esp, 8
test	eax, eax
jbe	short loc_660C47
mov	ecx, [ecx+38h]
mov	edx, [esp+8+arg_0]
sub	esp, 1Ch
mov	[esp+24h+var_8], ecx
mov	ecx, esp
push	edx
mov	[esp+28h+var_4], eax
call	sub_65FBB0
lea	eax, [esp+24h+var_8]
push	eax
call	sub_660A60
add	esp, 20h
add	esp, 8
retn	4

loc_660C47:
mov	al, 1
add	esp, 8
retn	4
sub_660C10 endp

align 10h



sub_660C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_660C64
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_660C86

loc_660C64:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_660C8B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_660C86:
call	sub_660850

loc_660C8B:
mov	eax, [esi]
mov	ebp, [esp+0Ch+arg_8]
and	ebp, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ebp+ebp*2+0]
lea	ebx, [esi+edx*4+8]
mov	ecx, 0FFFFFFFEh
mov	[esp+0Ch+arg_8], ebx
cmp	[ebx], ecx
jnz	short loc_660CDF
mov	eax, [esp+0Ch+arg_4]
mov	dword ptr [ebx], 0FFFFFFFFh
mov	ecx, [eax]
mov	edx, [ecx]
mov	[ebx+4], edx
mov	ecx, [eax+4]
mov	eax, [ecx]
test	eax, eax
jz	short loc_660CD4
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_660CD4:
mov	eax, [ecx]
pop	esi
pop	ebp
mov	[ebx+8], eax
pop	ebx
retn	0Ch

loc_660CDF:
mov	eax, [esi+4]
push	edi
mov	edi, ebp

loc_660CE5:
inc	edi
and	edi, eax
lea	edx, [edi+edi*2]
cmp	[esi+edx*4+8], ecx
jnz	short loc_660CE5
lea	eax, [edi+edi*2]
lea	ecx, [esi+eax*4+8]
mov	[esp+10h+arg_0], ecx
mov	eax, 4
mov	edx, 1505h
jmp	short loc_660D10
align 10h

loc_660D10:
movzx	ecx, byte ptr [ebx+eax+3]
imul	edx, 1003Fh
dec	eax
add	edx, ecx
test	eax, eax
ja	short loc_660D10
mov	eax, [esi+4]
and	edx, eax
cmp	edx, ebp
jnz	short loc_660D4F
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_660D39
push	ebx
call	sub_65FC10

loc_660D39:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [ebx+4]
call	sub_65EE20
mov	[ebx], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_660D4F:
push	eax
mov	ecx, ebx
call	sub_65E3E0
lea	eax, [eax+eax*2]
cmp	[esi+eax*4+8], ebp
lea	ebx, [esi+eax*4+8]
jz	short loc_660D73

loc_660D64:
mov	ebx, [ebx]
lea	ecx, [ebx+ebx*2]
cmp	[esi+ecx*4+8], ebp
lea	ebx, [esi+ecx*4+8]
jnz	short loc_660D64

loc_660D73:
mov	ecx, [esp+10h+arg_0]
mov	esi, [esp+10h+arg_8]
test	ecx, ecx
jz	short loc_660D85
push	esi
call	sub_65FC10

loc_660D85:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [esi+4]
mov	[ebx], edi
call	sub_65EE20
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_660C50 endp

align 10h



sub_660DB0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 38h
push	edi
mov	edi, [esp+3Ch+arg_0]
push	7
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_660DDA
push	0
push	0
push	offset aArray	; "Array"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 38h
retn

loc_660DDA:
mov	eax, [edi+8]
push	ebp
push	esi
xor	esi, esi
cmp	eax, esi
jz	short loc_660DEE
lea	ebp, [eax-10h]
mov	[esp+44h+var_38], ebp
jmp	short loc_660DF4

loc_660DEE:
mov	[esp+44h+var_38], esi
mov	ebp, esi

loc_660DF4:
mov	byte ptr [ebp+4Ch], 0
push	ebx
xor	ebx, ebx
cmp	dword ptr [edi+1Ch], 1
mov	[esp+48h+var_2C], 0
mov	[esp+48h+var_34], esi
mov	[esp+48h+var_30], esi
jl	loc_660EB5
push	esi
mov	ecx, edi
call	sub_651EC0
mov	al, [eax]
cmp	al, 8
jz	short loc_660E24
cmp	al, 0Bh
jnz	short loc_660E74

loc_660E24:
mov	eax, [edi+18h]
push	eax
lea	ecx, [esp+4Ch+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
push	eax
lea	ecx, [esp+4Ch+var_34]
call	sub_67C4C0
test	[esp+48h+var_20], 2
jnz	short loc_660E5A
mov	ecx, [esp+48h+var_28]
cmp	ecx, esi
jz	short loc_660E5A
call	sub_64B3B0

loc_660E5A:
test	[esp+48h+var_20], 1
mov	[esp+48h+var_28], esi
jnz	short loc_660E8E
mov	ecx, [esp+48h+var_24]
cmp	ecx, esi
jz	short loc_660E8E
call	sub_64B3B0
jmp	short loc_660E8E

loc_660E74:
mov	edx, [edi+18h]
push	edx
push	esi
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax

loc_660E8E:
cmp	[esp+48h+var_34], esi
jz	short loc_660EB5
cmp	dword ptr [edi+1Ch], 2
jl	short loc_660EB5
mov	eax, [edi+18h]
push	eax
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax

loc_660EB5:
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	esi
add	eax, 10h
push	eax
push	edx
call	sub_671840
mov	esi, eax
test	esi, esi
jz	loc_661046
push	ebp
mov	ecx, esi
call	sub_65E4B0
mov	ecx, [ebp+34h]
mov	edx, [edi+18h]
push	ecx
push	edx
lea	ecx, [esp+50h+var_34]
push	ecx
lea	eax, [esi+10h]
push	ebx
push	eax
lea	ecx, [esp+5Ch+var_1C]
call	sub_65EED0
lea	edx, [esp+48h+var_1C]
push	edx
mov	ecx, esi
call	sub_660C10
test	al, al
jnz	short loc_660F1E
mov	eax, [edi+18h]
push	offset aErrorAtArray_s ; "Error	at Array.sort: sorting failed, ch"...
push	eax
call	sub_66D290
add	esp, 8

loc_660F1E:
test	bl, 4
jz	short loc_660F54
mov	ebp, 1
cmp	[esi+3Ch], ebp
jle	short loc_660F50
lea	ecx, [ecx+0]

loc_660F30:
mov	ecx, [esi+38h]
lea	eax, [ecx+ebp*4]
mov	ecx, [eax]
mov	eax, [eax-4]
push	ecx
push	eax
lea	ecx, [esp+50h+var_1C]
call	sub_65FC40
test	eax, eax
jz	short loc_660F77
inc	ebp
cmp	ebp, [esi+3Ch]
jl	short loc_660F30

loc_660F50:
mov	ebp, [esp+48h+var_38]

loc_660F54:
test	bl, 8
jz	loc_660FF7
mov	edx, [edi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
push	ecx
mov	ecx, esi
call	sub_65D910
push	esi
jmp	loc_661007

loc_660F77:
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_660F86
mov	ecx, edi
call	sub_652060

loc_660F86:
xor	ebx, ebx
mov	ecx, esi
mov	byte ptr [edi],	4
mov	[edi+4], ebx
call	sub_65E5C0
test	[esp+48h+var_C], 2
jnz	short loc_660FA9
mov	ecx, [esp+48h+var_14]
cmp	ecx, ebx
jz	short loc_660FA9
call	sub_64B3B0

loc_660FA9:
test	[esp+48h+var_C], 1
mov	[esp+48h+var_14], ebx
jnz	short loc_660FC1
mov	ecx, [esp+48h+var_10]
cmp	ecx, ebx
jz	short loc_660FC1
call	sub_64B3B0

loc_660FC1:
mov	ecx, esi
mov	[esp+48h+var_10], ebx
call	sub_64B3B0
test	[esp+48h+var_2C], 2
jnz	short loc_660FE0
mov	ecx, [esp+48h+var_34]
cmp	ecx, ebx
jz	short loc_660FE0
call	sub_64B3B0

loc_660FE0:
test	[esp+48h+var_2C], 1
mov	[esp+48h+var_34], ebx
jnz	loc_661076
mov	ecx, [esp+48h+var_30]
cmp	ecx, ebx
jmp	short loc_66106F

loc_660FF7:
push	esi
mov	ecx, ebp
call	sub_65E4B0
mov	ecx, esi
call	sub_65E5C0
push	ebp

loc_661007:
mov	ecx, [edi+4]
call	sub_652E40
test	[esp+48h+var_C], 2
jnz	short loc_661023
mov	ecx, [esp+48h+var_14]
test	ecx, ecx
jz	short loc_661023
call	sub_64B3B0

loc_661023:
test	[esp+48h+var_C], 1
mov	[esp+48h+var_14], 0
jnz	short loc_66103F
mov	ecx, [esp+48h+var_10]
test	ecx, ecx
jz	short loc_66103F
call	sub_64B3B0

loc_66103F:
mov	ecx, esi
call	sub_64B3B0

loc_661046:
test	[esp+48h+var_2C], 2
jnz	short loc_66105A
mov	ecx, [esp+48h+var_34]
test	ecx, ecx
jz	short loc_66105A
call	sub_64B3B0

loc_66105A:
test	[esp+48h+var_2C], 1
mov	[esp+48h+var_34], 0
jnz	short loc_661076
mov	ecx, [esp+48h+var_30]
test	ecx, ecx

loc_66106F:
jz	short loc_661076
call	sub_64B3B0

loc_661076:
pop	ebx
pop	esi
pop	ebp
pop	edi
add	esp, 38h
retn
sub_660DB0 endp

align 10h



sub_661080 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

mov	eax, [esp+arg_8]
sub	esp, 14Ch
push	ebp
mov	ebp, [esp+150h+arg_4]
mov	ecx, eax
sub	ecx, ebp
cmp	ecx, 2
jnb	short loc_6610D2
mov	edx, [esp+150h+arg_20]
mov	eax, [esp+150h+arg_1C]
push	edx
push	eax
call	sub_6602F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+158h+arg_1C]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	al, 1
pop	ebp
add	esp, 14Ch
retn

loc_6610D2:
push	esi
mov	esi, [esp+154h+arg_0]
push	ebx
lea	ecx, [esp+158h+var_140]
push	edi

loc_6610E0:
mov	[esp+15Ch+var_14C], eax
mov	[esp+15Ch+var_148], ecx

loc_6610E8:
mov	edx, [esp+15Ch+var_14C]
mov	eax, edx
sub	eax, ebp
cmp	eax, 9
jle	loc_66124D
mov	ecx, [esi]
mov	ebx, [esp+15Ch+var_14C]
cdq
sub	eax, edx
mov	edx, [ecx+ebp*4]
sar	eax, 1
add	eax, ebp
mov	edi, [ecx+eax*4]
lea	eax, [ecx+eax*4]
mov	[ecx+ebp*4], edi
mov	[eax], edx
mov	eax, [esi]
mov	ecx, [eax+ebp*4+4]
mov	eax, [eax+ebx*4-4]
lea	edi, [ebp+1]
dec	ebx
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FFD0
test	eax, eax
jge	short loc_661142
mov	eax, [esi]
mov	edx, [eax+edi*4]
mov	ecx, [eax+ebx*4]
mov	[eax+ebx*4], edx
mov	[eax+edi*4], ecx

loc_661142:
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	eax, [eax+ebp*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FFD0
test	eax, eax
jge	short loc_66116E
mov	eax, [esi]
mov	ecx, [eax+ebp*4]
mov	edx, [eax+edi*4]
mov	[eax+ebp*4], edx
mov	[esp+15Ch+var_144], ecx
mov	[eax+edi*4], ecx

loc_66116E:
mov	eax, [esi]
mov	ecx, [eax+ebp*4]
mov	eax, [eax+ebx*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FFD0
test	eax, eax
jge	short loc_6611A0
mov	eax, [esi]
mov	edx, [eax+ebp*4]
mov	ecx, [eax+ebx*4]
mov	[eax+ebx*4], edx
mov	[eax+ebp*4], ecx
jmp	short loc_6611A0
align 10h

loc_6611A0:
inc	edi
cmp	edi, [esp+15Ch+var_14C]
jge	loc_6612C9
mov	eax, [esi]
mov	ecx, [eax+ebp*4]
mov	eax, [eax+edi*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FFD0
test	eax, eax
jl	short loc_6611A0

loc_6611C5:
sub	ebx, 1
js	loc_6612C9
mov	eax, [esi]
mov	ecx, [eax+ebx*4]
mov	eax, [eax+ebp*4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FFD0
test	eax, eax
jl	short loc_6611C5
cmp	edi, ebx
mov	eax, [esi]
mov	edx, [eax+ebx*4]
jg	short loc_6611FC
mov	ecx, [eax+edi*4]
mov	[eax+edi*4], edx
mov	[eax+ebx*4], ecx
jmp	short loc_6611A0

loc_6611FC:
mov	ecx, [eax+ebp*4]
mov	[eax+ebp*4], edx
mov	[eax+ebx*4], ecx
mov	eax, [esp+15Ch+var_14C]
mov	[esp+15Ch+var_144], ecx
mov	edx, eax
mov	ecx, ebx
sub	edx, edi
sub	ecx, ebp
cmp	ecx, edx
jle	short loc_661232
mov	eax, [esp+15Ch+var_148]
add	[esp+15Ch+var_148], 8
mov	ecx, [esp+15Ch+var_148]
mov	[eax], ebp
mov	[eax+4], ebx
mov	ebp, edi
jmp	loc_6610E8

loc_661232:
mov	ecx, [esp+15Ch+var_148]
add	[esp+15Ch+var_148], 8
mov	[ecx], edi
mov	[ecx+4], eax
mov	ecx, [esp+15Ch+var_148]
mov	[esp+15Ch+var_14C], ebx
jmp	loc_6610E8

loc_66124D:
lea	ebx, [ebp+1]
cmp	ebx, edx
mov	edi, ebp
jge	short loc_6612B3

loc_661256:
mov	edx, [esi]
mov	ecx, [edx+edi*4]
lea	eax, [edx+edi*4]
mov	eax, [eax+4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FFD0
test	eax, eax
jge	short loc_6612A6

loc_661273:
mov	eax, [esi]
mov	edx, [eax+edi*4]
mov	ecx, [eax+edi*4+4]
lea	eax, [eax+edi*4]
mov	[eax+4], edx
mov	[eax], ecx
cmp	edi, ebp
jz	short loc_6612A6
mov	eax, [esi]
dec	edi
mov	ecx, [eax+edi*4]
lea	eax, [eax+edi*4]
mov	eax, [eax+4]
push	ecx
push	eax
lea	ecx, [esp+164h+arg_C]
call	sub_65FFD0
test	eax, eax
jl	short loc_661273

loc_6612A6:
mov	edi, ebx
inc	ebx
cmp	ebx, [esp+15Ch+var_14C]
jl	short loc_661256
mov	ecx, [esp+15Ch+var_148]

loc_6612B3:
lea	edx, [esp+15Ch+var_140]
cmp	ecx, edx
jbe	short loc_661303
mov	ebp, [ecx-8]
mov	eax, [ecx-4]
sub	ecx, 8
jmp	loc_6610E0

loc_6612C9:
mov	ecx, [esp+15Ch+arg_20]
mov	edx, [esp+15Ch+arg_1C]
push	ecx
push	edx
call	sub_6602F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+164h+arg_1C]
mov	eax, [eax+30h]
add	esp, 8
push	edx
call	eax
pop	edi
pop	ebx
pop	esi
xor	al, al
pop	ebp
add	esp, 14Ch
retn

loc_661303:
mov	ecx, [esp+15Ch+arg_20]
mov	edx, [esp+15Ch+arg_1C]
push	ecx
push	edx
call	sub_6602F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+164h+arg_1C]
mov	eax, [eax+30h]
add	esp, 8
push	edx
call	eax
pop	edi
pop	ebx
pop	esi
mov	al, 1
pop	ebp
add	esp, 14Ch
retn
sub_661080 endp

align 10h



sub_661340 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 20h
mov	eax, [esp+20h+arg_0]
mov	edx, [esp+20h+arg_C]
push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, [esp+28h+arg_4]
mov	[ebp+0], eax
mov	eax, [esp+28h+arg_10]
push	esi
mov	[ebp+4], ecx
mov	ecx, [esp+2Ch+arg_8]
push	edi
lea	edi, [ebp+10h]
mov	[ebp+8], edx
mov	[ebp+0Ch], eax
xor	ebx, ebx
mov	[edi], ebx
mov	[edi+4], ebx
mov	[edi+8], ebx
mov	esi, [ecx+4]
mov	edx, [edi+4]
push	esi
push	edi
mov	ecx, edi
mov	[esp+38h+arg_4], edx
call	sub_6609F0
mov	eax, [esp+30h+arg_4]
cmp	esi, eax
jbe	short loc_6613AB
mov	edx, [edi]
lea	ecx, ds:0[eax*8]
sub	esi, eax
sub	ecx, eax
lea	eax, [edx+ecx*4]
push	esi
push	eax
call	sub_660350
add	esp, 8

loc_6613AB:
mov	[esp+30h+arg_4], ebx
cmp	[ebp+14h], ebx
jbe	loc_661462
mov	[esp+30h+var_20], ebx
lea	esp, [esp+0]

loc_6613C0:
mov	ecx, [esp+30h+arg_8]
mov	edx, [ecx]
mov	eax, [esp+30h+arg_4]
mov	eax, [edx+eax*4]
mov	esi, [edi]
mov	ecx, [esp+30h+arg_0]
add	esi, [esp+30h+var_20]
mov	edx, [esp+30h+arg_C]
mov	[esp+30h+var_18], eax
mov	eax, [esp+30h+arg_10]
mov	[esp+30h+var_1C], ecx
mov	[esp+30h+var_8], edx
mov	[esp+30h+var_4], eax
mov	[esp+30h+var_C], bl
mov	[esp+30h+var_14], ebx
mov	[esp+30h+var_10], ebx
mov	[esi], ecx
mov	edx, [esp+30h+var_18]
lea	eax, [esp+30h+var_14]
push	eax
lea	ecx, [esi+8]
mov	[esi+4], edx
call	sub_67C4C0
mov	ecx, [esp+30h+var_8]
mov	[esi+14h], ecx
mov	edx, [esp+30h+var_4]
mov	[esi+18h], edx
test	[esp+30h+var_C], 2
jnz	short loc_661433
mov	ecx, [esp+30h+var_14]
cmp	ecx, ebx
jz	short loc_661433
call	sub_64B3B0

loc_661433:
test	[esp+30h+var_C], 1
mov	[esp+30h+var_14], ebx
jnz	short loc_66144B
mov	ecx, [esp+30h+var_10]
cmp	ecx, ebx
jz	short loc_66144B
call	sub_64B3B0

loc_66144B:
mov	eax, [esp+30h+arg_4]
add	[esp+30h+var_20], 1Ch
inc	eax
mov	[esp+30h+arg_4], eax
cmp	eax, [ebp+14h]
jb	loc_6613C0

loc_661462:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 20h
retn	14h
sub_661340 endp

align 10h



sub_661470 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	[esp+0Ch+var_4], eax
push	edi
mov	[esp+10h+var_8], esi
mov	eax, 4
mov	edx, 1505h
nop

loc_661490:
movzx	edi, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, edi
test	eax, eax
ja	short loc_661490
push	edx
lea	edx, [esp+14h+var_8]
push	edx
push	ecx
call	sub_660C50
pop	edi
pop	esi
add	esp, 8
retn	8
sub_661470 endp

align 10h



sub_6614C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
mov	[edi+4], edx
mov	ecx, [eax+8]
mov	[edi+8], ecx
mov	edx, [eax+0Ch]
mov	[edi+0Ch], edx
xor	ecx, ecx
lea	esi, [edi+10h]
mov	[esi], ecx
mov	[esi+4], ecx
mov	[esi+8], ecx
mov	ebx, [eax+14h]
mov	eax, [eax+10h]
mov	[esp+0Ch+arg_0], eax
cmp	ebx, ecx
jz	short loc_661528
push	ebp
mov	ebp, [esi+4]
lea	ecx, [ebx+ebp]
push	ecx
push	esi
mov	ecx, esi
call	sub_6609F0
mov	edx, [esp+10h+arg_0]
mov	ecx, [esi]
push	edx
lea	eax, ds:0[ebp*8]
sub	eax, ebp
lea	edx, [ecx+eax*4]
push	ebx
push	edx
call	sub_660380
add	esp, 0Ch
pop	ebp

loc_661528:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_6614C0 endp




sub_661530 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
cmp	eax, ebx
jz	short loc_661567
lea	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, eax
call	sub_660190
jmp	short loc_661569

loc_661567:
xor	eax, eax

loc_661569:
mov	ebp, [esp+24h+arg_0]
mov	[ebp+0], eax
mov	[ebp+8], bl
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebx
push	70h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6615B7
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_14]
push	ecx
mov	ecx, edi
call	sub_660130
mov	ebx, eax
test	ebx, ebx
jz	short loc_6615B7
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6615B7:
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_8], ebx
mov	[esp+2Ch+arg_4], 2
call	sub_661470
mov	ecx, [esp+24h+arg_8]
test	ecx, ecx
jz	short loc_6615E5
call	sub_64B3B0

loc_6615E5:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+arg_8], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+2Ch+var_C]
mov	[esp+2Ch+arg_4], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+28h+arg_4]
mov	edx, [edi]
push	eax
add	esi, 10h
push	esi
lea	eax, [esp+30h+var_14]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
test	ebx, ebx
jz	short loc_661632
mov	ecx, ebx
call	sub_64B3B0

loc_661632:
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_661530 endp

align 10h



sub_661640 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	byte ptr -1Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 60h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+70h+arg_0]
xor	ebp, ebp
push	7
mov	ecx, edi
mov	[esp+74h+var_60], ebp
call	sub_651C40
test	al, al
jnz	short loc_661674
push	ebp
push	ebp
push	offset aArray	; "Array"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_661674:
mov	eax, [edi+8]
cmp	eax, ebp
jz	short loc_661680
lea	esi, [eax-10h]
jmp	short loc_661682

loc_661680:
xor	esi, esi

loc_661682:
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	10h
mov	[esp+78h+var_58], esi
call	eax
mov	edx, 1
cmp	eax, ebp
jz	short loc_6616C0
mov	ecx, [edi+18h]
mov	ecx, [ecx+78h]
mov	[eax], ebp
mov	[eax+4], ebp
mov	[eax+8], ebp
mov	ecx, [ecx+8]
mov	[eax+0Ch], ecx
add	[ecx+8], edx
mov	ebx, eax
jmp	short loc_6616C2

loc_6616C0:
xor	ebx, ebx

loc_6616C2:
mov	[esp+70h+var_44], ebp
mov	[esp+70h+var_40], ebp
mov	[esp+70h+var_3C], ebp
mov	[esp+70h+var_5C], ebp
cmp	[edi+1Ch], ebp
jnz	short loc_661725
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
cmp	ebx, ebp
jz	loc_661C02
mov	ecx, [ebx+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_661708
call	sub_650DF0

loc_661708:
mov	ecx, ebx
call	sub_65E2F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn

loc_661725:
mov	byte ptr [esi+4Ch], 0
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
mov	eax, [eax+0C8h]
add	[eax+8], edx
cmp	[edi+1Ch], edx
mov	[esp+70h+var_50], eax
jl	loc_661851
mov	ecx, [edi+18h]
push	ecx
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebp, eax
test	ebp, ebp
jz	loc_661812
mov	edx, [ebp+10h]
mov	eax, [edx+8]
lea	ecx, [ebp+10h]
call	eax
cmp	eax, 7
jnz	loc_661812
cmp	dword ptr [ebp+3Ch], 0
mov	[esp+70h+var_54], 0
jle	loc_661851
lea	esp, [esp+0]

loc_661790:
mov	ecx, [ebp+38h]
mov	edx, [esp+70h+var_54]
mov	ecx, [ecx+edx*4]
test	ecx, ecx
jz	short loc_6617BB
mov	eax, [edi+18h]
or	[esp+70h+var_60], 1
push	0
push	0FFFFFFFFh
push	eax
lea	edx, [esp+7Ch+var_4C]
push	edx
call	sub_652F60
lea	esi, [esp+70h+var_4C]
jmp	short loc_6617BF

loc_6617BB:
lea	esi, [esp+70h+var_50]

loc_6617BF:
mov	eax, [ebx+4]
inc	eax
push	eax
push	ebx
mov	ecx, ebx
call	sub_65E330
mov	ecx, [ebx+4]
mov	edx, [ebx]
lea	ecx, [edx+ecx*4-4]
test	ecx, ecx
jz	short loc_6617E0
mov	eax, [esi]
mov	[ecx], eax
inc	dword ptr [eax+8]

loc_6617E0:
test	byte ptr [esp+70h+var_60], 1
jz	short loc_661802
mov	eax, [esp+70h+var_4C]
and	[esp+70h+var_60], 0FFFFFFFEh
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_661802
call	sub_650DF0

loc_661802:
mov	eax, [esp+70h+var_54]
inc	eax
cmp	eax, [ebp+3Ch]
mov	[esp+70h+var_54], eax
jl	short loc_661790
jmp	short loc_661851

loc_661812:
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+7Ch+var_4C]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	edx, [esp+70h+var_4C]
push	edx
mov	ecx, ebx
call	sub_65EDA0
mov	eax, [esp+70h+var_4C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_661851
call	sub_650DF0

loc_661851:
xor	ebp, ebp
cmp	[ebx+4], ebp
jle	short loc_6618B3
mov	ecx, [esp+70h+var_40]
lea	esp, [esp+0]

loc_661860:
lea	esi, [ecx+1]
cmp	esi, ecx
jnb	short loc_661879
mov	eax, [esp+70h+var_3C]
shr	eax, 1
cmp	esi, eax
jnb	short loc_661895
push	esi
lea	ecx, [esp+74h+var_44]
push	ecx
jmp	short loc_66188C

loc_661879:
cmp	esi, [esp+70h+var_3C]
jb	short loc_661895
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
lea	eax, [esp+74h+var_44]
push	eax

loc_66188C:
lea	ecx, [esp+78h+var_44]
call	sub_714BE0

loc_661895:
mov	edx, [esp+70h+var_44]
lea	eax, [edx+esi*4-4]
mov	ecx, esi
mov	[esp+70h+var_40], ecx
test	eax, eax
jz	short loc_6618AD
mov	dword ptr [eax], 0

loc_6618AD:
inc	ebp
cmp	ebp, [ebx+4]
jl	short loc_661860

loc_6618B3:
cmp	dword ptr [edi+1Ch], 2
jl	loc_661951
mov	eax, [edi+18h]
push	eax
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebp, eax
test	ebp, ebp
jz	short loc_66191C
mov	edx, [ebp+10h]
mov	eax, [edx+8]
lea	ecx, [ebp+10h]
call	eax
cmp	eax, 7
jnz	short loc_66191C
xor	esi, esi
cmp	[ebp+3Ch], esi
jle	short loc_661951
mov	edi, edi

loc_6618F0:
cmp	esi, [ebx+4]
jge	short loc_661951
mov	ecx, [ebp+38h]
mov	ecx, [ecx+esi*4]
test	ecx, ecx
jz	short loc_661914
mov	edx, [edi+18h]
push	edx
call	sub_653400
call	__ftol2_sse
mov	ecx, [esp+70h+var_44]
mov	[ecx+esi*4], eax

loc_661914:
inc	esi
cmp	esi, [ebp+3Ch]
jl	short loc_6618F0
jmp	short loc_661951

loc_66191C:
mov	edx, [edi+18h]
push	edx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	[esp+70h+var_5C], eax
xor	eax, eax
cmp	[ebx+4], eax
jle	short loc_661951
mov	ecx, [esp+70h+var_44]

loc_661944:
mov	edx, [esp+70h+var_5C]
mov	[ecx+eax*4], edx
inc	eax
cmp	eax, [ebx+4]
jl	short loc_661944

loc_661951:
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
or	ebp, 0FFFFFFFFh
push	ebp
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 10h
push	eax
push	edx
call	sub_671840
mov	esi, eax
test	esi, esi
jz	loc_661B90
mov	ebp, [esp+70h+var_58]
push	ebp
mov	ecx, esi
call	sub_65E4B0
mov	ecx, [ebp+34h]
mov	edx, [edi+18h]
push	ecx
push	edx
lea	ecx, [esp+78h+var_44]
push	ecx
lea	eax, [esi+10h]
push	ebx
push	eax
lea	ecx, [esp+84h+var_38]
call	sub_661340
mov	eax, [esi+3Ch]
test	eax, eax
jbe	short loc_661A0B
mov	edx, [esi+38h]
mov	ebp, eax
lea	eax, [esp+70h+var_38]
push	eax
lea	ecx, [esp+74h+var_1C]
mov	[esp+74h+var_4C], edx
mov	[esp+74h+var_48], ebp
call	sub_6614C0
sub	esp, 1Ch
lea	edx, [esp+8Ch+var_1C]
mov	ecx, esp
push	edx
call	sub_6614C0
push	ebp
lea	eax, [esp+90h+var_4C]
push	0
push	eax
call	sub_661080
mov	ecx, [esp+98h+var_8]
mov	edx, [esp+98h+var_C]
push	ecx
push	edx
call	sub_6602F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+0A0h+var_C]
mov	eax, [eax+30h]
add	esp, 30h
push	edx
call	eax

loc_661A0B:
test	byte ptr [esp+70h+var_5C], 4
jz	short loc_661A40
mov	ebp, 1
cmp	[esi+3Ch], ebp
jle	short loc_661A40
lea	esp, [esp+0]

loc_661A20:
mov	ecx, [esi+38h]
lea	eax, [ecx+ebp*4]
mov	ecx, [eax]
mov	eax, [eax-4]
push	ecx
push	eax
lea	ecx, [esp+78h+var_38]
call	sub_65FFD0
test	eax, eax
jz	short loc_661A65
inc	ebp
cmp	ebp, [esi+3Ch]
jl	short loc_661A20

loc_661A40:
test	byte ptr [esp+70h+var_5C], 8
jz	loc_661B01
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	edx, [ecx+294h]
push	edx
mov	ecx, esi
call	sub_65D910
push	esi
jmp	loc_661B5E

loc_661A65:
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_661A74
mov	ecx, edi
call	sub_652060

loc_661A74:
mov	edx, [esp+70h+var_24]
mov	byte ptr [edi],	4
mov	dword ptr [edi+4], 0
mov	edi, [esp+70h+var_28]
push	edx
push	edi
call	sub_6602F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
add	esp, 8
push	edi
call	edx
mov	ecx, esi
call	sub_64B3B0
mov	ecx, [esp+70h+var_50]
or	ebp, 0FFFFFFFFh
add	[ecx+8], ebp
jnz	short loc_661AB6
call	sub_650DF0

loc_661AB6:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+70h+var_44]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [ebx+0Ch]
add	[ecx+8], ebp
jnz	short loc_661AD5
call	sub_650DF0

loc_661AD5:
mov	eax, [ebx+4]
mov	ecx, [ebx]
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	loc_661BE4
mov	edi, eax

loc_661AE8:
mov	ecx, [esi]
add	[ecx+8], ebp
jnz	short loc_661AF4
call	sub_650DF0

loc_661AF4:
sub	esi, 4
sub	edi, 1
jnz	short loc_661AE8
jmp	loc_661BE4

loc_661B01:
mov	ecx, [esp+70h+var_58]
push	esi
call	sub_65E4B0
cmp	dword ptr [esi+3Ch], 0
lea	ebp, [esi+38h]
jbe	short loc_661B42
test	dword ptr [ebp+8], 0FFFFFFFEh
jbe	short loc_661B52
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_661B39
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [ebp+0], 0

loc_661B39:
mov	dword ptr [ebp+8], 0
jmp	short loc_661B52

loc_661B42:
cmp	dword ptr [ebp+8], 0
ja	short loc_661B52
push	0
push	ebp
mov	ecx, ebp
call	sub_668FE0

loc_661B52:
mov	ecx, [esp+70h+var_58]
mov	dword ptr [ebp+4], 0
push	ecx

loc_661B5E:
mov	ecx, [edi+4]
call	sub_652E40
mov	edx, [esp+70h+var_24]
mov	edi, [esp+70h+var_28]
push	edx
push	edi
call	sub_6602F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
add	esp, 8
push	edi
call	edx
mov	ecx, esi
call	sub_64B3B0
or	ebp, 0FFFFFFFFh

loc_661B90:
mov	ecx, [esp+70h+var_50]
add	[ecx+8], ebp
jnz	short loc_661B9E
call	sub_650DF0

loc_661B9E:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+70h+var_44]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [ebx+0Ch]
add	[ecx+8], ebp
jnz	short loc_661BBD
call	sub_650DF0

loc_661BBD:
mov	eax, [ebx+4]
mov	ecx, [ebx]
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_661BE4
mov	edi, eax
lea	esp, [esp+0]

loc_661BD0:
mov	ecx, [esi]
add	[ecx+8], ebp
jnz	short loc_661BDC
call	sub_650DF0

loc_661BDC:
sub	esi, 4
sub	edi, 1
jnz	short loc_661BD0

loc_661BE4:
mov	ecx, dword_1855FC0
mov	eax, [ebx]
mov	edx, [ecx]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_661C02:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn
sub_661640 endp

align 10h



sub_661C10 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
call	edx
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_661C27
lea	eax, [esi-78h]
pop	esi
retn

loc_661C27:
xor	eax, eax
pop	esi
retn
sub_661C10 endp

align 10h



sub_661C30 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
call	edx
add	eax, 0FFFFFFFAh
cmp	eax, 26h
ja	short loc_661C47
lea	eax, [esi-10h]
pop	esi
retn

loc_661C47:
xor	eax, eax
pop	esi
retn
sub_661C30 endp

align 10h



sub_661C50 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
call	edx
cmp	eax, 2
jnz	short loc_661C64
lea	eax, [esi-78h]
pop	esi
retn

loc_661C64:
xor	eax, eax
pop	esi
retn
sub_661C50 endp

align 10h



sub_661C70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	byte ptr [eax],	0
retn	4
sub_661C70 endp

align 10h



sub_661C80 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
mov	ecx, [esi+8]
mov	edx, [ecx]
push	0
add	eax, 78h
lea	edi, [esp+10h+arg_0]
push	edi
push	eax
mov	eax, [edx+24h]
call	eax
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
pop	ebx
jnz	short locret_661CE7
jmp	sub_650DF0

locret_661CE7:
retn
sub_661C80 endp

align 10h



sub_661CF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_661D5B
push	ebx
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
mov	ecx, [esi+8]
mov	edx, [ecx]
add	eax, 78h
lea	edi, [esp+0Ch+arg_0]
push	edi
push	eax
mov	eax, [edx+50h]
call	eax
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebx
jnz	short loc_661D6C
pop	esi
jmp	sub_650DF0

loc_661D5B:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0

loc_661D6C:
pop	esi
retn
sub_661CF0 endp

align 10h



sub_661D70 proc	near

var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	loc_661E20
push	ebx
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+28h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
mov	ecx, [esi+8]
mov	edx, [ecx]
push	0
add	eax, 78h
lea	edi, [esp+20h+arg_0]
push	edi
push	eax
mov	eax, [edx+24h]
call	eax
mov	bl, al
test	bl, bl
jz	short loc_661DF4
mov	ecx, [esi+8]
lea	eax, [esp+1Ch+var_10]
push	eax
mov	eax, edi
push	eax
mov	eax, [esi+18h]
mov	[esp+24h+var_10], 0
mov	[esp+24h+var_F], 0
mov	edx, [ecx]
mov	edx, [edx+14h]
add	eax, 78h
push	eax
call	edx
test	[esp+1Ch+var_F], 1
jz	short loc_661DEB
xor	bl, bl

loc_661DEB:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830

loc_661DF4:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
mov	eax, [esp+1Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebx
jnz	short loc_661E31
pop	esi
add	esp, 10h
jmp	sub_650DF0

loc_661E20:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0

loc_661E31:
pop	esi
add	esp, 10h
retn
sub_661D70 endp

align 10h



sub_661E40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
push	edi
jl	short loc_661EAB
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
add	eax, 0FFFFFFFEh
cmp	eax, 3
jbe	short loc_661EAB
mov	eax, [esi+8]
test	eax, eax
jz	short loc_661E6A
lea	edi, [eax-10h]
jmp	short loc_661E6C

loc_661E6A:
xor	edi, edi

loc_661E6C:
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
test	eax, eax
jz	short loc_661EAB
mov	ecx, [esi+18h]
mov	edx, [eax]
mov	edx, [edx+48h]
push	ebx
push	0
push	edi
push	ecx
mov	ecx, eax
call	edx
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
pop	ebx
pop	edi
mov	byte ptr [esi],	2
pop	esi
retn

loc_661EAB:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi+4], 0
pop	edi
mov	byte ptr [esi],	2
pop	esi
retn
sub_661E40 endp

align 10h



sub_661EC0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
push	edi
call	edx
cmp	eax, 17h
jnz	short loc_661F02
mov	eax, [esi+18h]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, [eax+78h]
jb	short loc_661EED
mov	ecx, esi
call	sub_652060

loc_661EED:
mov	byte ptr [esi],	5
mov	eax, [edi+158h]
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	edi
pop	esi
add	esp, 10h
retn

loc_661F02:
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_661F62
mov	eax, [esi+8]
test	eax, eax
jz	short loc_661F20
add	eax, 0FFFFFF88h
jmp	short loc_661F22

loc_661F20:
xor	eax, eax

loc_661F22:
mov	ecx, [esi+18h]
push	ecx
push	eax
lea	ecx, [esp+20h+var_10]
call	sub_651CF0
mov	ecx, eax
call	sub_651BE0
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_661F48
mov	ecx, esi
call	sub_652060

loc_661F48:
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	edi
pop	esi
add	esp, 10h
retn

loc_661F62:
mov	edx, [esi+18h]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, [edx+78h]
jb	short loc_661F77
mov	ecx, esi
call	sub_652060

loc_661F77:
mov	byte ptr [esi],	5
mov	eax, [edi+160h]
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	edi
pop	esi
add	esp, 10h
retn
sub_661EC0 endp

align 10h



sub_661F90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+8]
push	ecx
mov	ecx, [eax+4]
call	sub_652EF0
retn
sub_661F90 endp

align 10h



sub_661FB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
push	edi
test	esi, esi
jz	short loc_661FDE
mov	edi, [esp+0Ch+arg_4]
mov	ebx, [esp+0Ch+arg_0]

loc_661FC1:
mov	eax, [esi]
mov	edx, [eax+24h]
push	0
push	edi
push	ebx
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_661FE6
mov	esi, [esi+8]
test	esi, esi
jz	short loc_661FDE
add	esi, 10h
jnz	short loc_661FC1

loc_661FDE:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	8

loc_661FE6:
pop	edi
lea	eax, [esi-10h]
pop	esi
pop	ebx
retn	8
sub_661FB0 endp

align 10h



sub_661FF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

push	ebx
push	ebp
push	esi
lea	esi, [ecx-10h]
push	edi
test	esi, esi
jz	short loc_66202E
mov	bl, [esp+10h+arg_8]
mov	edi, [esp+10h+arg_4]
mov	ebp, [esp+10h+arg_0]

loc_662007:
test	bl, bl
jz	short loc_662023
mov	eax, [esi]
mov	edx, [eax+14h]
push	edi
push	ebp
mov	ecx, esi
call	edx
test	al, al
jz	short loc_662027

loc_66201A:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	0Ch

loc_662023:
cmp	esi, edi
jz	short loc_66201A

loc_662027:
mov	esi, [esi+18h]
test	esi, esi
jnz	short loc_662007

loc_66202E:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	0Ch
sub_661FF0 endp

align 10h



sub_662040 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esi, 78h
push	0
push	38h
call	eax
test	eax, eax
jz	short loc_66206C
push	esi
mov	ecx, eax
call	sub_67BDA0
pop	esi
retn	4

loc_66206C:
xor	eax, eax
pop	esi
retn	4
sub_662040 endp

align 10h



sub_662080 proc	near
mov	edx, [ecx]
mov	eax, [ecx+4]
push	esi
mov	esi, [edx]
cmp	eax, [esi+4]
jg	short loc_6620BC
inc	eax
mov	[ecx+4], eax
mov	esi, [edx]
cmp	eax, [esi+4]
ja	short loc_6620BC
push	ebx
mov	esi, 0FFFFFFFEh
push	edi
nop

loc_6620A0:
mov	ebx, [edx]
lea	edi, [eax+eax*2]
cmp	[ebx+edi*8+8], esi
jnz	short loc_6620BA
inc	eax
mov	[ecx+4], eax
mov	edi, edx
mov	edi, [edi]
mov	ebx, eax
cmp	ebx, [edi+4]
jbe	short loc_6620A0

loc_6620BA:
pop	edi
pop	ebx

loc_6620BC:
pop	esi
retn
sub_662080 endp

align 10h



sub_6620C0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_66211A
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6620D4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6620FD
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6620EF
call	sub_650DF0

loc_6620EF:
lea	ecx, [esi+14h]
call	sub_652840
mov	dword ptr [esi], 0FFFFFFFEh

loc_6620FD:
add	edi, 24h
sub	ebp, 1
jnz	short loc_6620D4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_66211A:
pop	ebx
retn
sub_6620C0 endp

align 10h



sub_662120 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx]
mov	[esi], eax
mov	eax, [ecx+4]
push	edi
lea	edi, [ecx+8]
lea	ebx, [esi+8]
mov	[esi+4], eax
inc	dword ptr [eax+8]
push	edi
mov	ecx, ebx
call	sub_652330
mov	cl, [edi+1]
pop	edi
mov	eax, esi
pop	esi
mov	[ebx+1], cl
pop	ebx
retn	4
sub_662120 endp

align 10h



sub_662160 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	esi, ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66217D
call	sub_650DF0

loc_66217D:
mov	[esi], edi
mov	edi, [ebx+4]
add	esi, 4
push	edi
mov	ecx, esi
call	sub_652520
mov	cl, [edi+1]
pop	edi
mov	[esi+1], cl
pop	esi
pop	ebx
retn	4
sub_662160 endp

align 10h



sub_6621A0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	esi, ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6621BD
call	sub_650DF0

loc_6621BD:
mov	[esi], edi
mov	edi, [ebx+4]
add	esi, 4
push	edi
mov	ecx, esi
call	sub_67C4C0
add	edi, 0Ch
push	edi
lea	ecx, [esi+0Ch]
call	sub_652520
pop	edi
pop	esi
pop	ebx
retn	4
sub_6621A0 endp

align 10h



sub_6621E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx]
inc	dword ptr [edi+8]
mov	esi, ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6621FB
call	sub_650DF0

loc_6621FB:
mov	[esi], edi
lea	edi, [ebx+4]
lea	ebx, [esi+4]
push	edi
mov	ecx, ebx
call	sub_652520
mov	al, [edi+1]
mov	[ebx+1], al
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6621E0 endp

align 10h



sub_662220 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx]
inc	dword ptr [edi+8]
mov	esi, ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66223B
call	sub_650DF0

loc_66223B:
mov	[esi], edi
lea	edi, [ebx+4]
lea	ebx, [esi+4]
push	edi
mov	ecx, ebx
call	sub_67C4C0
add	edi, 0Ch
push	edi
lea	ecx, [ebx+0Ch]
call	sub_652520
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_662220 endp

align 10h



sub_662260 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+8]
call	sub_652830
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_662279
call	sub_650DF0

loc_662279:
mov	dword ptr [esi], 0FFFFFFFEh
pop	esi
retn
sub_662260 endp

align 10h



sub_662290 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
xor	edx, edx
cmp	eax, edx
jnz	short loc_6622A4
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	[eax+4], edx
retn	4

loc_6622A4:
push	esi
mov	esi, [eax+4]
add	eax, 8
jmp	short loc_6622B0
align 10h

loc_6622B0:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_6622BD
inc	edx
add	eax, 24h
cmp	edx, esi
jbe	short loc_6622B0

loc_6622BD:
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	esi
mov	[eax+4], edx
retn	4
sub_662290 endp

align 10h



sub_6622D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [edi+ecx*8+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*8+8]
mov	eax, esi
jz	short loc_662332
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_662332
push	ebp
lea	esp, [esp+0]

loc_662300:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_662318
mov	ebp, [esp+10h+arg_0]
mov	ebp, [ebp+0]
cmp	edx, [ebp+0]
jz	short loc_66232B

loc_662318:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_662328
lea	ecx, [eax+eax*2]
lea	ecx, [edi+ecx*8+8]
jmp	short loc_662300

loc_662328:
or	eax, 0FFFFFFFFh

loc_66232B:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_662332:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_6622D0 endp

align 10h



sub_662340 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [edi+ecx*8+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*8+8]
mov	eax, esi
jz	short loc_66239F
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_66239F
push	ebp
lea	esp, [esp+0]

loc_662370:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_662385
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_662398

loc_662385:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_662395
lea	ecx, [eax+eax*2]
lea	ecx, [edi+ecx*8+8]
jmp	short loc_662370

loc_662395:
or	eax, 0FFFFFFFFh

loc_662398:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_66239F:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_662340 endp

align 10h



sub_6623B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*8]
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_66240F
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_66240F
push	ebp
lea	esp, [esp+0]

loc_6623E0:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_6623F5
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_662408

loc_6623F5:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_662405
lea	ecx, [eax+eax*8]
lea	ecx, [edi+ecx*4+8]
jmp	short loc_6623E0

loc_662405:
or	eax, 0FFFFFFFFh

loc_662408:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_66240F:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_6623B0 endp

align 10h



sub_662420 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	edx, ecx
mov	eax, [edx]
push	esi
lea	ecx, [ebp+ebp*2+0]
cmp	dword ptr [eax+ecx*8+8], 0FFFFFFFEh
lea	esi, [eax+ecx*8+8]
push	edi
mov	[esp+10h+var_4], edx
mov	edi, ebp
jz	short loc_6624A9
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, [eax+4]
cmp	ecx, ebp
jnz	short loc_6624A9
push	ebx
nop

loc_662450:
mov	ecx, [esi+4]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
cmp	eax, ebp
jnz	short loc_662482
mov	ecx, [esp+14h+arg_0]
mov	ebx, [ecx]
mov	ecx, [esi+4]
cmp	dword ptr [ecx+4], 0
jnz	short loc_662475
call	sub_651580
mov	edx, [esp+14h+var_4]

loc_662475:
mov	ecx, [ebx]
mov	eax, [esi+4]
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]
jz	short loc_662494

loc_662482:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_66249E
mov	eax, [edx]
lea	ecx, [edi+edi*2]
lea	esi, [eax+ecx*8+8]
jmp	short loc_662450

loc_662494:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_66249E:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8

loc_6624A9:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8
sub_662420 endp

align 10h



sub_6624C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	edx, ecx
mov	eax, [edx]
push	esi
lea	ecx, [ebp+ebp*8+0]
cmp	dword ptr [eax+ecx*4+8], 0FFFFFFFEh
lea	esi, [eax+ecx*4+8]
push	edi
mov	[esp+10h+var_4], edx
mov	edi, ebp
jz	short loc_662549
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, [eax+4]
cmp	ecx, ebp
jnz	short loc_662549
push	ebx
nop

loc_6624F0:
mov	ecx, [esi+4]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
cmp	eax, ebp
jnz	short loc_662522
mov	ecx, [esp+14h+arg_0]
mov	ebx, [ecx]
mov	ecx, [esi+4]
cmp	dword ptr [ecx+4], 0
jnz	short loc_662515
call	sub_651580
mov	edx, [esp+14h+var_4]

loc_662515:
mov	ecx, [ebx]
mov	eax, [esi+4]
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]
jz	short loc_662534

loc_662522:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_66253E
mov	eax, [edx]
lea	ecx, [edi+edi*8]
lea	esi, [eax+ecx*4+8]
jmp	short loc_6624F0

loc_662534:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_66253E:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8

loc_662549:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8
sub_6624C0 endp

align 10h



sub_662560 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_6625BA
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_662574:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_66259D
lea	ecx, [esi+8]
call	sub_652830
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_662597
call	sub_650DF0

loc_662597:
mov	dword ptr [esi], 0FFFFFFFEh

loc_66259D:
add	edi, 18h
sub	ebp, 1
jnz	short loc_662574
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_6625BA:
pop	ebx
retn
sub_662560 endp

align 10h



sub_6625C0 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+1Ch]
push	esi
lea	esi, [ebp+1Ch]
push	edi
test	ecx, ecx
jnz	short loc_6625D6
xor	eax, eax
jmp	short loc_6625EF

loc_6625D6:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
mov	edi, edi

loc_6625E0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6625ED
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_6625E0

loc_6625ED:
mov	ecx, esi

loc_6625EF:
mov	edi, ecx
mov	esi, eax

loc_6625F3:
test	edi, edi
jz	short loc_662632
mov	eax, [edi]
test	eax, eax
jz	short loc_662632
cmp	esi, [eax+4]
jg	short loc_662632
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_651F70
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_6625F3
inc	esi
cmp	esi, eax
ja	short loc_6625F3
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_662623:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6625F3
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_662623
jmp	short loc_6625F3

loc_662632:
lea	ecx, [ebp+20h]
call	sub_67C000
mov	ecx, [ebp+2Ch]
test	ecx, ecx
jz	short loc_6626A0
push	ebx
lea	eax, [esp+18h+var_8]
push	eax
call	sub_662290
mov	ebx, [eax]
mov	esi, [eax+4]

loc_662651:
test	ebx, ebx
jz	short loc_66269F
mov	eax, [ebx]
test	eax, eax
jz	short loc_66269F
cmp	esi, [eax+4]
jg	short loc_66269F
lea	ecx, [esi+esi*8]
lea	edi, [eax+ecx*4+10h]
mov	ecx, edi
call	sub_67C000
lea	ecx, [edi+0Ch]
call	sub_651F70
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662651
inc	esi
cmp	esi, eax
ja	short loc_662651
lea	edx, [esi+esi*8]
lea	ecx, [ecx+edx*4+8]
jmp	short loc_662690
align 10h

loc_662690:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662651
inc	esi
add	ecx, 24h
cmp	esi, eax
jbe	short loc_662690
jmp	short loc_662651

loc_66269F:
pop	ebx

loc_6626A0:
mov	ecx, [ebp+18h]
pop	edi
pop	esi
pop	ebp
test	ecx, ecx
jz	short loc_6626D5
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6626D5
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6626D5:
add	esp, 8
retn
sub_6625C0 endp

align 10h



sub_6626E0 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+1Ch]
push	esi
lea	esi, [ebp+1Ch]
push	edi
test	ecx, ecx
jnz	short loc_6626F6
xor	eax, eax
jmp	short loc_66270F

loc_6626F6:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
mov	edi, edi

loc_662700:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66270D
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_662700

loc_66270D:
mov	ecx, esi

loc_66270F:
mov	edi, ecx
mov	esi, eax

loc_662713:
test	edi, edi
jz	short loc_662752
mov	eax, [edi]
test	eax, eax
jz	short loc_662752
cmp	esi, [eax+4]
jg	short loc_662752
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_651F00
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662713
inc	esi
cmp	esi, eax
ja	short loc_662713
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_662743:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662713
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_662743
jmp	short loc_662713

loc_662752:
lea	ecx, [ebp+20h]
call	sub_67BFB0
mov	ecx, [ebp+2Ch]
test	ecx, ecx
jz	short loc_6627C0
push	ebx
lea	eax, [esp+18h+var_8]
push	eax
call	sub_662290
mov	ebx, [eax]
mov	esi, [eax+4]

loc_662771:
test	ebx, ebx
jz	short loc_6627BF
mov	eax, [ebx]
test	eax, eax
jz	short loc_6627BF
cmp	esi, [eax+4]
jg	short loc_6627BF
lea	ecx, [esi+esi*8]
lea	edi, [eax+ecx*4+10h]
mov	ecx, edi
call	sub_67BFB0
lea	ecx, [edi+0Ch]
call	sub_651F00
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662771
inc	esi
cmp	esi, eax
ja	short loc_662771
lea	edx, [esi+esi*8]
lea	ecx, [ecx+edx*4+8]
jmp	short loc_6627B0
align 10h

loc_6627B0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662771
inc	esi
add	ecx, 24h
cmp	esi, eax
jbe	short loc_6627B0
jmp	short loc_662771

loc_6627BF:
pop	ebx

loc_6627C0:
mov	ecx, [ebp+18h]
pop	edi
pop	esi
pop	ebp
test	ecx, ecx
jz	short loc_6627E7
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6627E7
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_6627E7:
add	esp, 8
retn
sub_6626E0 endp

align 10h



sub_6627F0 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+1Ch]
push	esi
lea	esi, [ebp+1Ch]
push	edi
test	ecx, ecx
jnz	short loc_662806
xor	eax, eax
jmp	short loc_66281F

loc_662806:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
mov	edi, edi

loc_662810:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66281D
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_662810

loc_66281D:
mov	ecx, esi

loc_66281F:
mov	edi, ecx
mov	esi, eax

loc_662823:
test	edi, edi
jz	short loc_662862
mov	eax, [edi]
test	eax, eax
jz	short loc_662862
cmp	esi, [eax+4]
jg	short loc_662862
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_651FF0
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662823
inc	esi
cmp	esi, eax
ja	short loc_662823
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_662853:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662823
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_662853
jmp	short loc_662823

loc_662862:
lea	ecx, [ebp+20h]
call	sub_67C070
mov	ecx, [ebp+2Ch]
test	ecx, ecx
jz	short loc_6628D0
push	ebx
lea	eax, [esp+18h+var_8]
push	eax
call	sub_662290
mov	ebx, [eax]
mov	esi, [eax+4]

loc_662881:
test	ebx, ebx
jz	short loc_6628CF
mov	eax, [ebx]
test	eax, eax
jz	short loc_6628CF
cmp	esi, [eax+4]
jg	short loc_6628CF
lea	ecx, [esi+esi*8]
lea	edi, [eax+ecx*4+10h]
mov	ecx, edi
call	sub_67C070
lea	ecx, [edi+0Ch]
call	sub_651FF0
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662881
inc	esi
cmp	esi, eax
ja	short loc_662881
lea	edx, [esi+esi*8]
lea	ecx, [ecx+edx*4+8]
jmp	short loc_6628C0
align 10h

loc_6628C0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662881
inc	esi
add	ecx, 24h
cmp	esi, eax
jbe	short loc_6628C0
jmp	short loc_662881

loc_6628CF:
pop	ebx

loc_6628D0:
mov	ecx, [ebp+18h]
pop	edi
pop	esi
pop	ebp
test	ecx, ecx
jz	short loc_66291D
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_66291D
test	eax, 0FFFFFFFh
jbe	short loc_662908
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx
add	esp, 8
retn

loc_662908:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	4
call	edx

loc_66291D:
add	esp, 8
retn
sub_6627F0 endp

align 10h



sub_662930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	edx, [ecx]
mov	[esp+8+var_4], ecx
test	edx, edx
jz	loc_6629DF
mov	eax, [esp+8+arg_0]
mov	eax, [eax]
push	esi
mov	[esp+0Ch+var_8], eax
mov	eax, [eax+0Ch]
push	edi
mov	edi, [edx+4]
and	eax, edi
lea	ecx, [eax+eax*2]
cmp	dword ptr [edx+ecx*8+8], 0FFFFFFFEh
lea	esi, [edx+ecx*8+8]
jz	short loc_6629DD
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, edi
cmp	ecx, eax
jnz	short loc_6629DD
push	ebx
mov	[esp+14h+arg_0], eax
or	ebx, 0FFFFFFFFh
push	ebp

loc_662978:
mov	ecx, [esi+4]
mov	ebp, [ecx+0Ch]
and	ebp, edi
cmp	ebp, [esp+18h+arg_0]
jnz	short loc_66298C
cmp	ecx, [esp+18h+var_8]
jz	short loc_66299E

loc_66298C:
mov	ebx, eax
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_6629DB
lea	ecx, [eax+eax*2]
lea	esi, [edx+ecx*8+8]
jmp	short loc_662978

loc_66299E:
cmp	[esp+18h+arg_0], eax
mov	eax, [esi]
jnz	short loc_6629C5
cmp	eax, 0FFFFFFFFh
jz	short loc_6629CC
lea	eax, [eax+eax*2]
mov	ecx, esi
lea	edi, [edx+eax*8+8]
call	sub_662260
push	edi
mov	ecx, esi
call	sub_662120
mov	esi, edi
jmp	short loc_6629CC

loc_6629C5:
lea	ecx, [ebx+ebx*2]
mov	[edx+ecx*8+8], eax

loc_6629CC:
mov	ecx, esi
call	sub_662260
mov	ecx, [esp+18h+var_4]
mov	eax, [ecx]
dec	dword ptr [eax]

loc_6629DB:
pop	ebp
pop	ebx

loc_6629DD:
pop	edi
pop	esi

loc_6629DF:
add	esp, 8
retn	4
sub_662930 endp

align 10h



sub_6629F0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_662A12
call	sub_662560
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_662A12:
push	esi
cmp	eax, 8
jnb	short loc_662A1F
mov	esi, 8
jmp	short loc_662A84

loc_662A1F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_662A32
fadd	ds:flt_15FCC08

loc_662A32:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_662A84:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*8]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_662AE4
xor	eax, eax
jmp	short loc_662AD0
align 10h

loc_662AD0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 18h
sub	esi, 1
jnz	short loc_662AD0

loc_662AE4:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_662B59
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_662AF7

loc_662AF3:
mov	edi, [esp+1Ch+var_C]

loc_662AF7:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_662B38
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_662EF0
lea	ecx, [esi+4]
call	sub_652830
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_662B32
call	sub_650DF0

loc_662B32:
mov	dword ptr [edi], 0FFFFFFFEh

loc_662B38:
add	ebx, 18h
sub	ebp, 1
jnz	short loc_662AF3
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_662B59:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_6691A0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_6629F0 endp

align 10h



sub_662B80 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
push	ebx
push	ebp
push	esi
lea	esi, [ecx+0Ch]
mov	[esp+24h+var_14], ecx
mov	ecx, [esi]
test	ecx, ecx
jnz	short loc_662B97
xor	eax, eax
jmp	short loc_662BAF

loc_662B97:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
nop

loc_662BA0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662BAD
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_662BA0

loc_662BAD:
mov	ecx, esi

loc_662BAF:
mov	ebx, [esp+24h+arg_4]
mov	ebp, ecx
mov	esi, eax
push	edi

loc_662BB8:
test	ebp, ebp
jz	loc_662CAD
mov	eax, [ebp+0]
test	eax, eax
jz	loc_662CAD
cmp	esi, [eax+4]
jg	loc_662CAD
lea	edi, [esi+esi*2]
add	edi, edi
add	edi, edi
add	edi, edi
mov	cl, [edi+eax+11h]
mov	byte ptr [esp+28h+var_18], cl
test	cl, 1
jz	short loc_662BF5
test	byte ptr [esp+28h+arg_8], 4
jz	loc_662C79

loc_662BF5:
cmp	byte ptr [edi+eax+10h],	0Ah
lea	ecx, [edi+eax+10h]
jz	short loc_662C1A
mov	edx, [ebx]
mov	ebx, [esp+28h+var_18]
mov	edx, [edx+4]
push	ebx
mov	ebx, [esp+2Ch+arg_4]
push	ecx
lea	eax, [edi+eax+0Ch]
push	eax
mov	ecx, ebx
call	edx
jmp	short loc_662C79

loc_662C1A:
test	byte ptr [esp+28h+arg_8], 8
mov	[esp+28h+var_10], 0
jnz	short loc_662C55
mov	ecx, [esp+28h+arg_C]
test	ecx, ecx
jnz	short loc_662C3B
mov	edx, [esp+28h+var_14]
lea	ecx, [edx-10h]
neg	ecx
sbb	ecx, ecx
and	ecx, edx

loc_662C3B:
mov	edx, [ecx]
mov	edx, [edx+2Ch]
lea	ebx, [esp+28h+var_10]
push	ebx
lea	eax, [edi+eax+0Ch]
push	eax
mov	eax, [esp+30h+arg_0]
push	eax
call	edx
mov	ebx, [esp+28h+arg_4]

loc_662C55:
mov	ecx, [esp+28h+var_18]
mov	eax, [ebx]
mov	eax, [eax+4]
push	ecx
mov	ecx, [ebp+0]
lea	edx, [esp+2Ch+var_10]
push	edx
lea	edx, [ecx+edi+0Ch]
push	edx
mov	ecx, ebx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_662C79:
mov	ecx, [ebp+0]
mov	eax, [ecx+4]
cmp	esi, eax
jg	loc_662BB8
inc	esi
cmp	esi, eax
ja	loc_662BB8
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_662C97:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	loc_662BB8
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_662C97
jmp	loc_662BB8

loc_662CAD:
mov	edx, [esp+28h+arg_8]
pop	edi
test	dl, 1
jz	short loc_662CE6
mov	esi, [esp+24h+var_14]
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_662CE6
mov	eax, [esp+24h+arg_C]
test	eax, eax
jnz	short loc_662CD3
lea	eax, [esi-10h]
neg	eax
sbb	eax, eax
and	eax, esi

loc_662CD3:
mov	esi, [ecx+10h]
push	eax
mov	eax, [esp+28h+arg_0]
push	edx
mov	edx, [esi+20h]
add	ecx, 10h
push	ebx
push	eax
call	edx

loc_662CE6:
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	10h
sub_662B80 endp

align 10h



sub_662CF0 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+1Ch]
push	esi
lea	esi, [ebp+1Ch]
push	edi
test	ecx, ecx
jnz	short loc_662D06
xor	eax, eax
jmp	short loc_662D1F

loc_662D06:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
mov	edi, edi

loc_662D10:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662D1D
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_662D10

loc_662D1D:
mov	ecx, esi

loc_662D1F:
mov	edi, ecx
mov	esi, eax

loc_662D23:
test	edi, edi
jz	short loc_662D62
mov	eax, [edi]
test	eax, eax
jz	short loc_662D62
cmp	esi, [eax+4]
jg	short loc_662D62
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_652130
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662D23
inc	esi
cmp	esi, eax
ja	short loc_662D23
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_662D53:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662D23
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_662D53
jmp	short loc_662D23

loc_662D62:
lea	ecx, [ebp+20h]
call	sub_67C1F0
mov	ecx, [ebp+2Ch]
test	ecx, ecx
jz	short loc_662DD0
push	ebx
lea	eax, [esp+18h+var_8]
push	eax
call	sub_662290
mov	ebx, [eax]
mov	esi, [eax+4]

loc_662D81:
test	ebx, ebx
jz	short loc_662DCF
mov	eax, [ebx]
test	eax, eax
jz	short loc_662DCF
cmp	esi, [eax+4]
jg	short loc_662DCF
lea	ecx, [esi+esi*8]
lea	edi, [eax+ecx*4+10h]
mov	ecx, edi
call	sub_67C1F0
lea	ecx, [edi+0Ch]
call	sub_652130
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662D81
inc	esi
cmp	esi, eax
ja	short loc_662D81
lea	edx, [esi+esi*8]
lea	ecx, [ecx+edx*4+8]
jmp	short loc_662DC0
align 10h

loc_662DC0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662D81
inc	esi
add	ecx, 24h
cmp	esi, eax
jbe	short loc_662DC0
jmp	short loc_662D81

loc_662DCF:
pop	ebx

loc_662DD0:
mov	ecx, [ebp+18h]
pop	edi
pop	esi
pop	ebp
test	ecx, ecx
jz	short loc_662DE2
add	esp, 8
jmp	sub_64B3B0

loc_662DE2:
add	esp, 8
retn
sub_662CF0 endp

align 10h



sub_662DF0 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+1Ch]
push	esi
lea	esi, [ebp+1Ch]
push	edi
test	ecx, ecx
jnz	short loc_662E06
xor	eax, eax
jmp	short loc_662E1F

loc_662E06:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
mov	edi, edi

loc_662E10:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662E1D
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_662E10

loc_662E1D:
mov	ecx, esi

loc_662E1F:
mov	edi, ecx
mov	esi, eax

loc_662E23:
test	edi, edi
jz	short loc_662E62
mov	eax, [edi]
test	eax, eax
jz	short loc_662E62
cmp	esi, [eax+4]
jg	short loc_662E62
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_652160
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662E23
inc	esi
cmp	esi, eax
ja	short loc_662E23
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_662E53:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662E23
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_662E53
jmp	short loc_662E23

loc_662E62:
lea	ecx, [ebp+20h]
call	sub_67C210
mov	ecx, [ebp+2Ch]
test	ecx, ecx
jz	short loc_662ED0
push	ebx
lea	eax, [esp+18h+var_8]
push	eax
call	sub_662290
mov	ebx, [eax]
mov	esi, [eax+4]

loc_662E81:
test	ebx, ebx
jz	short loc_662ECF
mov	eax, [ebx]
test	eax, eax
jz	short loc_662ECF
cmp	esi, [eax+4]
jg	short loc_662ECF
lea	ecx, [esi+esi*8]
lea	edi, [eax+ecx*4+10h]
mov	ecx, edi
call	sub_67C210
lea	ecx, [edi+0Ch]
call	sub_652160
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_662E81
inc	esi
cmp	esi, eax
ja	short loc_662E81
lea	edx, [esi+esi*8]
lea	ecx, [ecx+edx*4+8]
jmp	short loc_662EC0
align 10h

loc_662EC0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_662E81
inc	esi
add	ecx, 24h
cmp	esi, eax
jbe	short loc_662EC0
jmp	short loc_662E81

loc_662ECF:
pop	ebx

loc_662ED0:
mov	ecx, [ebp+18h]
pop	edi
pop	esi
pop	ebp
test	ecx, ecx
jz	short loc_662EE2
add	esp, 8
jmp	sub_64B020

loc_662EE2:
add	esp, 8
retn
sub_662DF0 endp

align 10h



sub_662EF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_662F04
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_662F26

loc_662F04:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_662F2B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_662F26:
call	sub_6629F0

loc_662F2B:
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	edx, [esi]
lea	ecx, [eax+eax*2]
lea	edi, [edx+ecx*8+8]
mov	ebx, 0FFFFFFFEh
cmp	[edi], ebx
jnz	short loc_662F74
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [edi], 0FFFFFFFFh
mov	eax, [ecx]
mov	[edi+4], eax
inc	dword ptr [eax+8]
lea	esi, [ecx+4]
add	edi, 8
push	esi
mov	ecx, edi
call	sub_652330
mov	dl, [esi+1]
mov	[edi+1], dl
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_662F74:
mov	ecx, [edx+4]
mov	esi, eax
push	ebp
lea	ebx, [ebx+0]

loc_662F80:
inc	esi
and	esi, ecx
lea	ebp, [esi+esi*2]
cmp	[edx+ebp*8+8], ebx
jnz	short loc_662F80
lea	ebx, [esi+esi*2]
lea	ebx, [edx+ebx*8+8]
mov	[esp+10h+arg_0], ebx
mov	ebx, [edi+4]
mov	ebx, [ebx+0Ch]
lea	ebp, [edi+4]
and	ebx, ecx
cmp	ebx, eax
jnz	short loc_662FC9
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_662FB4
push	edi
call	sub_662120

loc_662FB4:
mov	eax, [esp+10h+arg_4]
push	eax
mov	ecx, ebp
call	sub_6621E0
pop	ebp
mov	[edi], esi
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_662FC9:
lea	ecx, [ebx+ebx*2]
cmp	[edx+ecx*8+8], eax
lea	ebx, [edx+ecx*8+8]
jz	short loc_662FE5

loc_662FD6:
mov	ebx, [ebx]
lea	ecx, [ebx+ebx*2]
cmp	[edx+ecx*8+8], eax
lea	ebx, [edx+ecx*8+8]
jnz	short loc_662FD6

loc_662FE5:
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_662FF3
push	edi
call	sub_662120

loc_662FF3:
mov	edx, [esp+10h+arg_4]
push	edx
mov	ecx, ebp
mov	[ebx], esi
call	sub_6621E0
pop	ebp
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_662EF0 endp

align 10h



sub_663010 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], offset	off_1432940
mov	[eax+4], ecx
mov	[eax+8], ecx
retn
sub_663010 endp

align 10h



sub_663030 proc	near
xor	al, al
retn	0Ch
sub_663030 endp

align 10h



sub_663040 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
mov	dword ptr [edi], offset	off_1432940
test	esi, esi
jz	short loc_663082
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_663071
push	0
push	0
push	0
call	sub_64AA00
mov	ecx, [esi+4]
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+4]
push	edi
push	edx
call	eax

loc_663071:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+4]
mov	edx, [edx+30h]
push	eax
call	edx

loc_663082:
mov	ecx, [edi+8]
pop	edi
pop	esi
test	ecx, ecx
jz	short locret_663090
jmp	sub_64B3B0

locret_663090:
retn
sub_663040 endp

align 10h



sub_6630A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	ecx, ecx
mov	[eax+8], cl
mov	[eax], ecx
mov	[eax+4], ecx
retn	4
sub_6630A0 endp

align 10h



sub_6630C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6630F5 ; default
jmp	ds:off_6630F8[eax*4] ; switch jump

loc_6630D0:		; jumptable 006630C9 case 0
call	sub_662CF0
retn	4

loc_6630D8:		; jumptable 006630C9 case 1
call	sub_6625C0
retn	4

loc_6630E0:		; jumptable 006630C9 case 2
call	sub_6626E0
retn	4

loc_6630E8:		; jumptable 006630C9 case 3
call	sub_662DF0
retn	4

loc_6630F0:		; jumptable 006630C9 case 4
call	sub_6627F0

locret_6630F5:		; default
retn	4
sub_6630C0 endp

off_6630F8 dd offset loc_6630D0	; jump table for switch	statement
dd offset loc_6630D8
dd offset loc_6630E0
dd offset loc_6630E8
dd offset loc_6630F0
align 10h



sub_663110 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h

sub	esp, 24h
push	ebp
mov	ebp, [esp+28h+arg_4]
mov	ecx, [ebp+0]
push	esi
push	edi
push	7
call	sub_66FB00
mov	edi, eax
mov	[esp+30h+var_20], edi
test	edi, edi
jz	short loc_66313A
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_66313A:
mov	esi, [esp+30h+arg_8]
cmp	dword ptr [esi], 0
mov	[esp+30h+var_24], 0
jz	loc_663259
push	ebx
mov	ebx, [esp+34h+arg_0]
add	ebx, 10h
jmp	short loc_663160
align 10h

loc_663160:
mov	ecx, [ebp+0]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	38h
call	eax
test	eax, eax
jz	short loc_663187
mov	ecx, [esi+4]
push	ecx
push	edi
push	ebp
mov	ecx, eax
call	sub_67C390
jmp	short loc_663189

loc_663187:
xor	eax, eax

loc_663189:
lea	edx, [esp+30h+var_18]
push	edx
lea	ecx, [esp+34h+var_C]
mov	byte ptr [esp+34h+var_10], 0
mov	[esp+34h+var_18], eax
mov	[esp+34h+var_14], 0
call	sub_651E70
mov	eax, [ebp+0]
mov	edx, [esi]
mov	esi, [eax+280h]
mov	eax, edx
lea	edi, [eax+1]

loc_6631B8:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6631B8
sub	eax, edi
xor	edi, edi
push	edi
push	eax
push	edx
mov	ecx, esi
call	sub_650E40
mov	[esp+30h+arg_8], eax
inc	dword ptr [eax+8]
mov	eax, [esp+30h+arg_10]
mov	edx, [ebx]
mov	edx, [edx+28h]
push	eax
lea	ecx, [esp+34h+var_C]
push	ecx
lea	eax, [esp+38h+arg_8]
push	eax
push	ebp
mov	ecx, ebx
call	edx
mov	eax, [esp+34h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], edi
jnz	short loc_663202
call	sub_650DF0

loc_663202:
lea	ecx, [esp+34h+var_10]
call	sub_652830
test	byte ptr [esp+34h+var_14], 2
jnz	short loc_66321F
mov	ecx, [esp+34h+var_1C]
cmp	ecx, edi
jz	short loc_66321F
call	sub_64B3B0

loc_66321F:
test	byte ptr [esp+34h+var_14], 1
mov	[esp+34h+var_1C], edi
jnz	short loc_663237
mov	ecx, [esp+34h+var_18]
cmp	ecx, edi
jz	short loc_663237
call	sub_64B3B0

loc_663237:
mov	eax, [esp+34h+var_24]
mov	ecx, [esp+34h+arg_8]
inc	eax
cmp	[ecx+eax*8], edi
lea	esi, [ecx+eax*8]
mov	[esp+34h+var_18], edi
mov	edi, [esp+34h+var_20]
mov	[esp+34h+var_24], eax
jnz	loc_663160
pop	ebx

loc_663259:
test	edi, edi
jz	short loc_663264
mov	ecx, edi
call	sub_64B3B0

loc_663264:
pop	edi
pop	esi
pop	ebp
add	esp, 24h
retn	10h
sub_663110 endp

align 10h



sub_663270 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	esi
push	0
lea	eax, [esp+18h+var_10]
mov	esi, ecx
mov	ecx, [esp+18h+arg_8]
push	eax
call	sub_652DC0
push	eax
lea	ecx, [esi+4]
call	sub_67C4C0
test	[esp+14h+var_8], 2
jnz	short loc_6632A3
mov	ecx, [esp+14h+var_10]
test	ecx, ecx
jz	short loc_6632A3
call	sub_64B3B0

loc_6632A3:
test	[esp+14h+var_8], 1
mov	[esp+14h+var_10], 0
jnz	short loc_6632BF
mov	ecx, [esp+14h+var_C]
test	ecx, ecx
jz	short loc_6632BF
call	sub_64B3B0

loc_6632BF:
mov	ecx, [esp+14h+arg_0]
mov	edx, [ecx+10h]
mov	edx, [edx+28h]
lea	eax, [esp+14h+arg_8]
push	eax
lea	eax, [esp+18h+var_10]
push	eax
mov	eax, [esp+1Ch+arg_4]
mov	esi, [eax]
add	ecx, 10h
add	esi, 148h
push	esi
push	eax
mov	byte ptr [esp+24h+arg_8], 3
mov	byte ptr [esp+24h+var_10], 0Ah
call	edx
lea	ecx, [esp+14h+var_10]
call	sub_652830
mov	al, 1
pop	esi
add	esp, 10h
retn	0Ch
sub_663270 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_6B6FC0

loc_663310:
push	ecx
push	ebx
push	ebp
mov	ebx, ecx
mov	eax, [ebx+1Ch]
push	esi
push	edi
test	eax, eax
jz	short loc_663379
mov	edx, [eax+4]
xor	edi, edi
mov	[esp+14h+var_4], edx
test	edx, edx
jbe	short loc_663379
mov	ebp, [esp+14h+arg_4]
nop

loc_663330:
mov	eax, [ebx+1Ch]
mov	ecx, [eax]
mov	eax, [ecx+edi*4]
lea	ecx, [ecx+edi*4]
test	eax, eax
jz	short loc_66334C
mov	esi, [eax+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[eax+8], esi

loc_66334C:
mov	esi, [ecx]
test	esi, esi
jz	short loc_663374
mov	edx, [esi+10h]
mov	eax, [esp+14h+arg_0]
mov	edx, [edx+48h]
push	1
lea	ecx, [esi+10h]
push	ebp
push	eax
call	edx
mov	ecx, esi
test	al, al
jnz	short loc_663383
call	sub_64B3B0
mov	edx, [esp+14h+var_4]

loc_663374:
inc	edi
cmp	edi, edx
jb	short loc_663330

loc_663379:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	8

loc_663383:
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	8
; END OF FUNCTION CHUNK	FOR sub_6B6FC0
align 10h



sub_6633A0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 38h
push	esi
mov	esi, [esp+3Ch+arg_0]
cmp	dword ptr [esi+1Ch], 2
jl	loc_663556
push	ebx
push	edi
mov	edi, [esi+18h]
xor	ebx, ebx
push	ebx
mov	ecx, esi
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+50h+var_38]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+18h]
push	edx
lea	eax, [esp+48h+var_28]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
cmp	[esp+44h+var_28], ebx
jz	loc_6634FA
cmp	dword ptr [esi+1Ch], 3
mov	[esp+44h+var_2C], bl
mov	[esp+44h+var_34], ebx
mov	[esp+44h+var_30], ebx
jl	short loc_663468
push	2
mov	ecx, esi
call	sub_651EC0
mov	al, [eax]
cmp	al, 8
jz	short loc_663419
cmp	al, 0Bh
jnz	short loc_663468

loc_663419:
mov	ecx, [esi+18h]
push	ecx
lea	edx, [esp+48h+var_1C]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
push	eax
lea	ecx, [esp+48h+var_34]
call	sub_67C4C0
test	[esp+44h+var_14], 2
jnz	short loc_663450
mov	ecx, [esp+44h+var_1C]
cmp	ecx, ebx
jz	short loc_663450
call	sub_64B3B0

loc_663450:
test	[esp+44h+var_14], 1
mov	[esp+44h+var_1C], ebx
jnz	short loc_663468
mov	ecx, [esp+44h+var_18]
cmp	ecx, ebx
jz	short loc_663468
call	sub_64B3B0

loc_663468:
mov	ecx, [esi+18h]
mov	eax, [ecx+78h]
mov	edi, [eax+294h]
call	sub_668AB0
push	eax
push	edi
lea	ecx, [esp+4Ch+var_34]
push	ecx
lea	edx, [esp+50h+var_28]
push	edx
lea	ecx, [esp+54h+var_10]
call	sub_6527E0
mov	ecx, [esi+8]
lea	edx, [esp+44h+arg_0]
push	edx
lea	edx, [esp+48h+var_10]
push	edx
lea	edx, [esp+4Ch+var_38]
push	edx
mov	edx, [esi+18h]
mov	byte ptr [esp+50h+arg_0], bl
mov	eax, [ecx]
mov	eax, [eax+28h]
add	edx, 78h
push	edx
call	eax
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
lea	ecx, [esp+44h+var_10]
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1
call	sub_652830
test	[esp+44h+var_2C], 2
jnz	short loc_6634E0
mov	ecx, [esp+44h+var_34]
cmp	ecx, ebx
jz	short loc_6634E0
call	sub_64B3B0

loc_6634E0:
test	[esp+44h+var_2C], 1
mov	[esp+44h+var_34], ebx
jnz	short loc_66350A
mov	ecx, [esp+44h+var_30]
cmp	ecx, ebx
jz	short loc_66350A
call	sub_64B3B0
jmp	short loc_66350A

loc_6634FA:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	[esi+4], bl

loc_66350A:
test	[esp+44h+var_20], 2
jnz	short loc_66351E
mov	ecx, [esp+44h+var_28]
cmp	ecx, ebx
jz	short loc_66351E
call	sub_64B3B0

loc_66351E:
test	[esp+44h+var_20], 1
mov	[esp+44h+var_28], ebx
jnz	short loc_663536
mov	ecx, [esp+44h+var_24]
cmp	ecx, ebx
jz	short loc_663536
call	sub_64B3B0

loc_663536:
mov	eax, [esp+44h+var_38]
mov	[esp+44h+var_24], ebx
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
pop	edi
pop	ebx
jnz	short loc_663567
call	sub_650DF0
pop	esi
add	esp, 38h
retn

loc_663556:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0

loc_663567:
pop	esi
add	esp, 38h
retn
sub_6633A0 endp

align 10h



sub_663570 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
push	esi
mov	esi, [esp+20h+arg_0]
cmp	dword ptr [esi+1Ch], 2
jl	loc_66367E
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+24h+var_1C]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
cmp	[esp+20h+var_1C], 0
jz	loc_663638
cmp	dword ptr [esi+1Ch], 3
mov	[esp+20h+var_10], 0
jl	short loc_6635C4
push	2
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+24h+var_10]
call	sub_652520

loc_6635C4:
push	ebx
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+34h+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
mov	ecx, [esi+8]
mov	edx, [ecx]
lea	edi, [esp+28h+var_10]
push	edi
lea	edi, [esp+2Ch+var_1C]
push	edi
add	eax, 78h
lea	edi, [esp+30h+arg_0]
push	edi
push	eax
mov	eax, [edx+4Ch]
call	eax
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
mov	eax, [esp+28h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebx
jnz	short loc_66362D
call	sub_650DF0

loc_66362D:
lea	ecx, [esp+20h+var_10]
call	sub_652830
jmp	short loc_663649

loc_663638:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0

loc_663649:
test	[esp+20h+var_14], 2
jnz	short loc_66365D
mov	ecx, [esp+20h+var_1C]
test	ecx, ecx
jz	short loc_66365D
call	sub_64B3B0

loc_66365D:
test	[esp+20h+var_14], 1
mov	[esp+20h+var_1C], 0
jnz	short loc_66368F
mov	ecx, [esp+20h+var_18]
test	ecx, ecx
jz	short loc_66368F
call	sub_64B3B0
pop	esi
add	esp, 1Ch
retn

loc_66367E:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0

loc_66368F:
pop	esi
add	esp, 1Ch
retn
sub_663570 endp

align 10h



sub_6636A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 0
mov	eax, [esi+1Ch]
cmp	eax, 2
jge	short loc_6636DA
push	eax
mov	eax, [esi+18h]
push	offset aErrorTooFewPar ; "Error: Too few parameters for	Object.re"...
push	eax
call	sub_66D290
add	esp, 0Ch

loc_6636D4:
pop	edi
pop	esi
add	esp, 10h
retn

loc_6636DA:
mov	edi, [esi+18h]
push	ebx
push	ebp
mov	ebp, [edi+78h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
push	1
mov	ecx, esi
call	sub_651EC0
mov	al, [eax]
cmp	al, 8
jz	short loc_663713
cmp	al, 0Bh
jnz	loc_663793

loc_663713:
mov	edx, [esi+18h]
push	edx
lea	eax, [esp+24h+var_C]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
mov	eax, [esi+18h]
lea	ecx, [esp+20h+var_C]
push	ecx
lea	edx, [esp+24h+arg_0]
add	eax, 78h
push	edx
push	eax
mov	ecx, ebp
call	sub_672F70
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	byte ptr [esi],	2
mov	[esi+4], bl
test	[esp+20h+var_4], 2
jnz	short loc_66376A
mov	ecx, [esp+20h+var_C]
test	ecx, ecx
jz	short loc_66376A
call	sub_64B3B0

loc_66376A:
test	[esp+20h+var_4], 1
mov	[esp+20h+var_C], 0
jnz	loc_66381A
mov	ecx, [esp+20h+var_8]
test	ecx, ecx
jz	loc_66381A
call	sub_64B3B0
jmp	loc_66381A

loc_663793:
push	1
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	1
jnz	short loc_6637C8
mov	eax, [esi+18h]
lea	ecx, [esp+20h+arg_0]
push	ecx
add	eax, 78h
push	eax
mov	ecx, ebp
call	sub_671A40
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	byte ptr [esi],	2
mov	[esi+4], bl
jmp	short loc_66381A

loc_6637C8:
mov	edi, [esi+18h]
push	1
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+2Ch+var_10]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+20h+var_10]
mov	ecx, [eax]
mov	edx, [esp+20h+arg_0]
mov	eax, [edx]
push	ecx
mov	ecx, [esi+18h]
push	eax
push	offset aErrorSecondPar ; "Error: Second	parameter of Object.regis"...
push	ecx
call	sub_66D290
mov	eax, [esp+30h+var_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 10h
cmp	dword ptr [eax], 0
jnz	short loc_66381A
call	sub_650DF0

loc_66381A:
mov	eax, [esp+20h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
pop	ebx
jnz	loc_6636D4
pop	edi
pop	esi
add	esp, 10h
jmp	sub_650DF0
sub_6636A0 endp

align 10h



sub_663840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_66388A
mov	eax, [esp+4+arg_0]
mov	edx, [eax]
mov	edx, [edx+0Ch]
and	edx, [esi+4]
push	edx
push	eax
call	sub_662340
test	eax, eax
jl	short loc_66388A
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*8+0Ch]
test	eax, eax
jz	short loc_66388A
push	edi
mov	edi, [esp+8+arg_4]
test	edi, edi
jz	short loc_663883
lea	esi, [eax+4]
push	esi
mov	ecx, edi
call	sub_652520
mov	cl, [esi+1]
mov	[edi+1], cl

loc_663883:
pop	edi
mov	al, 1
pop	esi
retn	8

loc_66388A:
xor	al, al
pop	esi
retn	8
sub_663840 endp




sub_663890 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	edx, [esi]
test	edx, edx
jz	short loc_6638E2
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	eax, [eax]
mov	eax, [eax+0Ch]
and	eax, [edx+4]
push	eax
push	ecx
mov	ecx, esi
call	sub_662420
test	eax, eax
jl	short loc_6638E2
mov	edx, [esi]
lea	ecx, [eax+eax*2]
lea	eax, [edx+ecx*8+0Ch]
test	eax, eax
jz	short loc_6638E2
push	edi
mov	edi, [esp+8+arg_4]
test	edi, edi
jz	short loc_6638DB
lea	esi, [eax+4]
push	esi
mov	ecx, edi
call	sub_652520
mov	al, [esi+1]
mov	[edi+1], al

loc_6638DB:
pop	edi
mov	al, 1
pop	esi
retn	8

loc_6638E2:
xor	al, al
pop	esi
retn	8
sub_663890 endp

align 10h



sub_6638F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
xor	ecx, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	[esi+8], cl
mov	eax, [edi]
mov	[esi], eax
cmp	eax, ecx
jz	short loc_663912
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_663912:
mov	[esi+4], ecx
mov	eax, [edi+4]
cmp	eax, ecx
jz	short loc_66392E
mov	cl, [edi+8]
and	cl, 1
movzx	edx, cl
push	edx
push	eax
mov	ecx, esi
call	sub_67C1A0

loc_66392E:
add	edi, 0Ch
push	edi
lea	ecx, [esi+0Ch]
call	sub_652330
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6638F0 endp

align 10h



sub_663950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_663964
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_663986

loc_663964:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_66398B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_663986:
call	sub_6629F0

loc_66398B:
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	edx, [esi]
lea	ecx, [eax+eax*2]
lea	edi, [edx+ecx*8+8]
mov	ebx, 0FFFFFFFEh
cmp	[edi], ebx
jnz	short loc_6639D6
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [edi], 0FFFFFFFFh
mov	edx, [ecx]
mov	eax, [edx]
mov	[edi+4], eax
inc	dword ptr [eax+8]
mov	esi, [ecx+4]
add	edi, 8
push	esi
mov	ecx, edi
call	sub_652330
mov	al, [esi+1]
mov	[edi+1], al
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_6639D6:
mov	ecx, [edx+4]
mov	esi, eax
push	ebp
lea	esp, [esp+0]

loc_6639E0:
inc	esi
and	esi, ecx
lea	ebp, [esi+esi*2]
cmp	[edx+ebp*8+8], ebx
jnz	short loc_6639E0
lea	ebx, [esi+esi*2]
lea	ebx, [edx+ebx*8+8]
mov	[esp+10h+arg_0], ebx
mov	ebx, [edi+4]
mov	ebx, [ebx+0Ch]
lea	ebp, [edi+4]
and	ebx, ecx
cmp	ebx, eax
jnz	short loc_663A29
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_663A14
push	edi
call	sub_662120

loc_663A14:
mov	ecx, [esp+10h+arg_4]
push	ecx
mov	ecx, ebp
call	sub_662160
pop	ebp
mov	[edi], esi
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_663A29:
lea	ecx, [ebx+ebx*2]
cmp	[edx+ecx*8+8], eax
lea	ebx, [edx+ecx*8+8]
jz	short loc_663A45

loc_663A36:
mov	ebx, [ebx]
lea	ecx, [ebx+ebx*2]
cmp	[edx+ecx*8+8], eax
lea	ebx, [edx+ecx*8+8]
jnz	short loc_663A36

loc_663A45:
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_663A53
push	edi
call	sub_662120

loc_663A53:
mov	edx, [esp+10h+arg_4]
push	edx
mov	ecx, ebp
mov	[ebx], esi
call	sub_662160
pop	ebp
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_663950 endp

align 10h



; int __thiscall sub_663A70(void *, char)
sub_663A70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_663040
test	[esp+4+arg_0], 1
jz	short loc_663A88
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_663A88:
mov	eax, esi
pop	esi
retn	4
sub_663A70 endp

align 10h



sub_663A90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
mov	dword ptr [esi+10h], offset off_1432940
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [esi+10h], offset off_1432A28
mov	[esi+1Ch], ebx
mov	[esi+28h], bl
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], bl
mov	[esi+31h], bl
mov	ecx, [esi+18h]
cmp	ecx, ebx
jz	short loc_663ADF
call	sub_64B3B0

loc_663ADF:
mov	[esi+18h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_663A90 endp

align 10h



sub_663AF0 proc	near
mov	eax, 6
retn
sub_663AF0 endp

align 10h



sub_663B00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_663B17
call	sub_668A00
jmp	short loc_663B19

loc_663B17:
xor	eax, eax

loc_663B19:
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
mov	dword ptr [esi+10h], offset off_1432940
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [esi+10h], offset off_1432A28
mov	[esi+1Ch], ebx
mov	[esi+28h], bl
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], bl
mov	[esi+31h], bl
mov	ecx, [esi+18h]
cmp	ecx, ebx
jz	short loc_663B5E
call	sub_64B3B0

loc_663B5E:
mov	[esi+18h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_663B00 endp

align 10h



sub_663B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	ecx, [edi]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_663B88
call	sub_668A00
jmp	short loc_663B8A

loc_663B88:
xor	eax, eax

loc_663B8A:
mov	[esi+4], eax
mov	eax, [esp+0Ch+arg_4]
mov	dword ptr [esi+8], 1
mov	dword ptr [esi+10h], offset off_1432940
mov	[esi+14h], ebx
mov	[esi+18h], ebx
lea	ecx, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [ecx], offset	off_1432A28
mov	[esi+1Ch], ebx
mov	[esi+28h], bl
mov	[esi+20h], ebx
mov	[esi+24h], ebx
push	eax
push	edi
mov	[esi+2Ch], ebx
mov	[esi+30h], bl
mov	[esi+31h], bl
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_663B70 endp

align 10h



sub_663BE0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	ecx, ebx
call	sub_668AB0
mov	[esi+4], eax
xor	eax, eax
mov	dword ptr [esi+8], 1
mov	dword ptr [esi+10h], offset off_1432940
mov	[esi+14h], eax
mov	[esi+18h], eax
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_1432A28
mov	[esi+1Ch], eax
mov	[esi+28h], al
mov	[esi+20h], eax
mov	[esi+24h], eax
mov	[esi+2Ch], eax
mov	[esi+30h], al
mov	[esi+31h], al
mov	ecx, [ebx+78h]
add	ebx, 78h
push	1
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_663BE0 endp

align 10h



sub_663C50 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_0]
cmp	byte ptr [eax+4], 6
push	ebx
push	ebp
push	esi
push	edi
mov	[esp+18h+var_4], ecx
lea	edi, [ecx-10h]
mov	[esp+18h+var_5], 0
jbe	loc_663D9B
test	edi, edi
jz	short loc_663CE8
mov	ebx, [esp+18h+arg_4]
lea	esp, [esp+0]

loc_663C80:
mov	ecx, [esp+18h+arg_0]
mov	ecx, [ecx]
mov	eax, [ebx]
cmp	eax, [ecx+144h]
jz	short loc_663CF4
cmp	eax, [ecx+154h]
jz	loc_663D2B
mov	esi, [edi+1Ch]
lea	ebp, [edi+1Ch]
test	esi, esi
jz	short loc_663CC2
mov	edx, [eax+0Ch]
and	edx, [esi+4]
mov	ecx, ebp
push	edx
push	ebx
call	sub_662340
test	eax, eax
jl	short loc_663CC2
cmp	eax, [esi+4]
jle	loc_663D4A

loc_663CC2:
cmp	[esp+18h+var_5], 0
jnz	short loc_663CE1
cmp	dword ptr [edi+20h], 0
lea	eax, [edi+20h]
jz	short loc_663CE1
mov	ecx, [esp+18h+arg_8]
push	eax
call	sub_6529A0
mov	[esp+18h+var_5], 1

loc_663CE1:
mov	edi, [edi+18h]
test	edi, edi
jnz	short loc_663C80

loc_663CE8:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn	0Ch

loc_663CF4:
mov	edi, [edi+18h]
test	edi, edi
jz	short loc_663D11
mov	ecx, [esp+18h+arg_8]
push	edi
call	sub_652E40
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_663D11:
mov	esi, [esp+18h+arg_8]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	0
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_663D2B:
cmp	dword ptr [edi+20h], 0
lea	eax, [edi+20h]
jz	short loc_663D11
mov	ecx, [esp+18h+arg_8]
push	eax
call	sub_652940
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_663D4A:
lea	eax, [eax+eax*2]
mov	ecx, esi
cmp	byte ptr [ecx+eax*8+10h], 0Ah
lea	eax, [ecx+eax*8+10h]
jnz	short loc_663D85
mov	edx, [esp+18h+var_4]
add	edx, 0FFFFFFF0h
cmp	edi, edx
jz	short loc_663D85
mov	edx, [esp+18h+arg_8]
mov	eax, [edi+10h]
mov	eax, [eax+2Ch]
push	edx
mov	edx, [esp+1Ch+arg_0]
lea	ecx, [edi+10h]
push	ebx
push	edx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_663D85:
mov	ecx, [esp+18h+arg_8]
push	eax
call	sub_652520
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_663D9B:
mov	ebp, [esp+18h+arg_4]
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_663DAD
call	sub_651580

loc_663DAD:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
mov	[esp+18h+arg_4], ebp
jnz	short loc_663DBF
call	sub_651580

loc_663DBF:
test	edi, edi
jz	loc_663CE8
mov	ebx, [esp+18h+arg_8]
jmp	short loc_663DD0
align 10h

loc_663DD0:
mov	ecx, [esp+18h+arg_0]
mov	edx, [ebp+0]
mov	eax, [ecx]
mov	ecx, [edx+4]
mov	edx, [eax+144h]
cmp	[edx+4], ecx
jz	short loc_663E55
mov	eax, [eax+154h]
cmp	[eax+4], ecx
jz	loc_663E84
mov	eax, [edi+1Ch]
lea	esi, [edi+1Ch]
test	eax, eax
jz	short loc_663E25
mov	ecx, [ebp+0]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
lea	edx, [esp+18h+arg_4]
push	eax
push	edx
mov	ecx, esi
call	sub_662420
test	eax, eax
jl	short loc_663E25
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_663E25
cmp	eax, [ecx+4]
jle	short loc_663EA1

loc_663E25:
cmp	[esp+18h+var_5], 0
jnz	short loc_663E42
cmp	dword ptr [edi+20h], 0
lea	eax, [edi+20h]
jz	short loc_663E42
push	eax
mov	ecx, ebx
call	sub_6529A0
mov	[esp+18h+var_5], 1

loc_663E42:
mov	edi, [edi+18h]
test	edi, edi
jnz	short loc_663DD0
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn	0Ch

loc_663E55:
mov	edi, [edi+18h]
mov	ecx, ebx
test	edi, edi
jz	short loc_663E70
push	edi
call	sub_652E40
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_663E70:
call	sub_652060
pop	edi
pop	esi
pop	ebp
mov	byte ptr [ebx],	0
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_663E84:
cmp	dword ptr [edi+20h], 0
lea	eax, [edi+20h]
mov	ecx, ebx
jz	short loc_663E70
push	eax
call	sub_652940
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_663EA1:
lea	eax, [eax+eax*2]
cmp	byte ptr [ecx+eax*8+10h], 0Ah
lea	eax, [ecx+eax*8+10h]
jnz	short loc_663ED6
mov	edx, [esp+18h+var_4]
add	edx, 0FFFFFFF0h
cmp	edi, edx
jz	short loc_663ED6
mov	eax, [edi+10h]
mov	edx, [esp+18h+arg_0]
mov	eax, [eax+2Ch]
push	ebx
lea	ecx, [edi+10h]
push	ebp
push	edx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_663ED6:
push	eax
mov	ecx, ebx
call	sub_652520
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch
sub_663C50 endp

align 10h



sub_663EF0 proc	near

var_10=	word ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, ecx
push	esi
mov	esi, [ebp+0Ch]
xor	ebx, ebx
lea	ecx, [ebp+0Ch]
push	edi
mov	edi, [esp+20h+arg_4]
mov	byte ptr [esp+20h+var_10], bl
mov	byte ptr [esp+20h+var_10+1], bl
cmp	esi, ebx
jz	short loc_663F58
mov	eax, [edi]
mov	edx, [eax+0Ch]
and	edx, [esi+4]
push	edx
push	edi
call	sub_662340
cmp	eax, ebx
jl	short loc_663F58
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*8+0Ch]
cmp	eax, ebx
jz	short loc_663F58
lea	esi, [eax+4]
push	esi
lea	ecx, [esp+24h+var_10]
call	sub_652520
mov	cl, [esi+1]
mov	byte ptr [esp+20h+var_10+1], cl
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch

loc_663F58:
cmp	[esp+20h+arg_8], bl
jz	short loc_663F8F
mov	eax, [ebp+8]
cmp	eax, ebx
jz	short loc_663F8F
mov	edx, [eax+10h]
mov	edx, [edx+24h]
lea	ecx, [eax+10h]
mov	eax, [esp+20h+arg_0]
push	1
push	edi
push	eax
call	edx
lea	ecx, [esp+20h+var_10]
mov	bl, al
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 10h
retn	0Ch

loc_663F8F:
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 10h
retn	0Ch
sub_663EF0 endp

align 10h



sub_663FB0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
push	eax
lea	ecx, [esp+24h+var_10]
call	sub_651E70
mov	ebx, [esp+20h+arg_4]
mov	edx, [esp+20h+arg_0]
lea	ecx, [esp+20h+var_10]
push	ecx
push	ebx
push	edx
mov	ecx, esi
call	sub_663270
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	esi, [esi+4]
mov	ecx, [esp+20h+arg_0]
lea	eax, [esp+20h+arg_8]
lea	ebp, [esi+10h]
mov	esi, [ebx]
push	eax
mov	byte ptr [esp+24h+arg_8], 3
mov	edi, [ebp+0]
push	ecx
lea	ecx, [esp+28h+var_10]
add	esi, 140h
add	edi, 28h
call	sub_652700
mov	edx, [edi]
push	eax
push	esi
push	ebx
mov	ecx, ebp
call	edx
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_663FB0 endp

align 10h



sub_664030 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 2Ch
push	esi
mov	esi, [esp+30h+arg_0]
push	edi
mov	edi, 1
cmp	[esi+1Ch], edi
jl	loc_664141
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
mov	[esp+34h+var_20], 0
mov	al, [ecx]
cmp	al, 3
jz	short loc_664061
cmp	al, 4
jnz	short loc_66407A

loc_664061:
mov	eax, [esi+18h]
push	eax
call	sub_653400
fstp	qword ptr [esp+34h+var_C]
lea	ecx, [esp+34h+var_10]
mov	[esp+34h+var_10], 3
push	ecx
jmp	short loc_664095

loc_66407A:
cmp	al, 2
jnz	short loc_6640A9
mov	edx, [esi+18h]
push	edx
call	sub_651D80
mov	byte ptr [esp+34h+var_C], al
lea	eax, [esp+34h+var_10]
mov	[esp+34h+var_10], 2
push	eax

loc_664095:
lea	ecx, [esp+38h+var_20]
call	sub_652520
lea	ecx, [esp+34h+var_10]
call	sub_652830
jmp	short loc_664110

loc_6640A9:
cmp	al, 5
jnz	short loc_6640FE
mov	edx, [esi+18h]
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
call	sub_652F60
mov	eax, [esp+34h+arg_0]
lea	ecx, [esp+34h+var_10]
push	ecx
mov	[esp+38h+var_10], 5
mov	[esp+38h+var_C], eax
add	[eax+8], edi
lea	ecx, [esp+38h+var_20]
call	sub_652520
lea	ecx, [esp+34h+var_10]
call	sub_652830
mov	eax, [esp+34h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_664110
call	sub_650DF0
jmp	short loc_664110

loc_6640FE:
cmp	al, 6
jz	short loc_664106
cmp	al, 7
jnz	short loc_664138

loc_664106:
push	ecx
lea	ecx, [esp+38h+var_20]
call	sub_652520

loc_664110:
mov	al, [esp+34h+var_20]
test	al, al
jz	short loc_664138
cmp	al, 0Ah
jz	short loc_664138
mov	ecx, [esi+4]
lea	edx, [esp+34h+var_20]
push	edx
call	sub_652520
lea	ecx, [esp+34h+var_20]
call	sub_652830
pop	edi
pop	esi
add	esp, 2Ch
retn

loc_664138:
lea	ecx, [esp+34h+var_20]
call	sub_652830

loc_664141:
mov	eax, [esi+8]
push	ebx
test	eax, eax
jz	short loc_66415F
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_66418B
mov	eax, [ebx+8]
add	eax, edi
and	eax, 8FFFFFFFh
mov	[ebx+8], eax
jmp	short loc_66418B

loc_66415F:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	34h
call	edx
test	eax, eax
jz	short loc_664187
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
jmp	short loc_664189

loc_664187:
xor	eax, eax

loc_664189:
mov	ebx, eax

loc_66418B:
mov	ecx, [esi+18h]
push	ebp
push	edi
lea	edx, [esp+40h+var_2C]
push	edx
call	sub_66D650
mov	edi, [esi+18h]
lea	eax, [esp+3Ch+var_2C]
push	eax
lea	ecx, [esp+40h+var_10]
add	edi, 78h
lea	ebp, [ebx+10h]
mov	byte ptr [esp+40h+arg_0], 3
call	sub_651E70
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+3Ch+arg_0]
push	eax
mov	eax, [edi]
lea	ecx, [esp+40h+var_10]
push	ecx
add	eax, 148h
push	eax
push	edi
mov	ecx, ebp
call	edx
lea	ecx, [esp+3Ch+var_10]
call	sub_652830
mov	ecx, [esi+4]
push	ebx
call	sub_652E40
test	[esp+3Ch+var_24], 2
pop	ebp
jnz	short loc_6641FA
mov	ecx, [esp+38h+var_2C]
test	ecx, ecx
jz	short loc_6641FA
call	sub_64B3B0

loc_6641FA:
xor	esi, esi
test	[esp+38h+var_24], 1
mov	[esp+38h+var_2C], esi
jnz	short loc_664214
mov	ecx, [esp+38h+var_28]
cmp	ecx, esi
jz	short loc_664214
call	sub_64B3B0

loc_664214:
mov	[esp+38h+var_28], esi
cmp	ebx, esi
jz	short loc_664223
mov	ecx, ebx
call	sub_64B3B0

loc_664223:
pop	ebx
pop	edi
pop	esi
add	esp, 2Ch
retn
sub_664030 endp

align 10h



sub_664230 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	offset sub_664030
push	edi
mov	esi, ecx
call	sub_67C3D0
push	7
push	offset off_1432930
lea	eax, [esi+10h]
push	edi
push	eax
mov	dword ptr [esi], offset	off_1432AD8
mov	dword ptr [eax], offset	off_1432A80
call	sub_66FC60
add	esp, 10h
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_664230 endp

align 10h



sub_664270 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_664280
align 10h

loc_664280:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1432AD8
mov	dword ptr [esi+10h], offset off_1432A80
call	sub_67BDD0
test	[esp+4+arg_0], 1
jz	short loc_6642AA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6642AA:
mov	eax, esi
pop	esi
retn	4
sub_664270 endp




sub_6642B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
mov	[esp+8+arg_4], edi
jnz	short loc_6642C9
call	sub_651580

loc_6642C9:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6642F8
mov	eax, [edi]
mov	eax, [eax+0Ch]
and	eax, [ecx+4]
lea	ecx, [esp+8+arg_4]
push	eax
push	ecx
mov	ecx, esi
call	sub_662420
test	eax, eax
jl	short loc_6642F8
mov	ecx, [esp+8+arg_0]
pop	edi
mov	[ecx], esi
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	8

loc_6642F8:
mov	eax, [esp+8+arg_0]
pop	edi
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
pop	esi
retn	8
sub_6642B0 endp

align 10h



sub_664310 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 8
cmp	[esp+8+arg_8], 0
push	esi
mov	esi, ecx
jz	short loc_664360
mov	eax, [esi]
test	eax, eax
jz	short loc_66434A
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
and	edx, [eax+4]
push	edx
push	ecx
mov	ecx, esi
call	sub_662340
test	eax, eax
jl	short loc_66434A
mov	[esp+0Ch+var_4], eax
mov	[esp+0Ch+var_8], esi
lea	eax, [esp+0Ch+var_8]
jmp	short loc_664371

loc_66434A:
mov	[esp+0Ch+var_8], 0
mov	[esp+0Ch+var_4], 0
lea	eax, [esp+0Ch+var_8]
jmp	short loc_664371

loc_664360:
mov	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, esi
call	sub_6642B0

loc_664371:
mov	edx, [eax]
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [eax+4]
mov	[ecx+4], eax
mov	[ecx], edx
mov	eax, ecx
pop	esi
add	esp, 8
retn	0Ch
sub_664310 endp

align 10h



sub_664390 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
mov	[esp+8+arg_0], edi
jnz	short loc_6643A9
call	sub_651580

loc_6643A9:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6643DD
mov	eax, [edi]
mov	eax, [eax+0Ch]
and	eax, [ecx+4]
lea	ecx, [esp+8+arg_0]
push	eax
push	ecx
mov	ecx, esi
call	sub_6624C0
test	eax, eax
jl	short loc_6643DD
lea	edx, [eax+eax*8]
mov	eax, [esi]
lea	eax, [eax+edx*4+0Ch]
test	eax, eax
jz	short loc_6643DD
pop	edi
add	eax, 4
pop	esi
retn	4

loc_6643DD:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_664390 endp

align 10h



sub_6643F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
mov	[esp+8+arg_4], edi
jnz	short loc_664409
call	sub_651580

loc_664409:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_664438
mov	eax, [edi]
mov	eax, [eax+0Ch]
and	eax, [ecx+4]
lea	ecx, [esp+8+arg_4]
push	eax
push	ecx
mov	ecx, esi
call	sub_6624C0
test	eax, eax
jl	short loc_664438
mov	ecx, [esp+8+arg_0]
pop	edi
mov	[ecx], esi
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	8

loc_664438:
mov	eax, [esp+8+arg_0]
pop	edi
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
pop	esi
retn	8
sub_6643F0 endp

align 10h



sub_664450 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	sub_652830
test	byte ptr [esi+10h], 2
jnz	short loc_66446D
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66446D
call	sub_64B3B0

loc_66446D:
test	byte ptr [esi+10h], 1
mov	dword ptr [esi+8], 0
jnz	short loc_664486
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_664486
call	sub_64B3B0

loc_664486:
mov	dword ptr [esi+0Ch], 0
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66449B
call	sub_650DF0

loc_66449B:
mov	dword ptr [esi], 0FFFFFFFEh
pop	esi
retn
sub_664450 endp

align 10h



sub_6644B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	eax, [ebp+0]
push	esi
mov	esi, [eax]
mov	eax, [esi+0Ch]
mov	ebx, ecx
push	edi
mov	edi, [ebx]
mov	[esp+10h+arg_4], eax
test	edi, edi
jz	short loc_664518
mov	ecx, [edi+4]
and	ecx, eax
push	ecx
push	ebp
mov	ecx, ebx
call	sub_6622D0
test	eax, eax
jl	short loc_664514
inc	dword ptr [esi+8]
lea	edx, [eax+eax*2]
mov	ecx, [edi+edx*8+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
lea	edi, [edi+edx*8+0Ch]
jnz	short loc_6644F7
call	sub_650DF0

loc_6644F7:
mov	[edi], esi
mov	ebp, [ebp+4]
lea	esi, [edi+4]
push	ebp
mov	ecx, esi
call	sub_652520
mov	al, [ebp+1]
pop	edi
mov	[esi+1], al
pop	esi
pop	ebp
pop	ebx
retn	8

loc_664514:
mov	eax, [esp+10h+arg_4]

loc_664518:
mov	ecx, [esp+10h+arg_0]
push	eax
push	ebp
push	ecx
mov	ecx, ebx
call	sub_663950
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6644B0 endp

align 10h



sub_664530 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_664571
mov	eax, [eax+4]
push	ebx
push	esi
xor	esi, esi
lea	ebx, [eax+1]

loc_664543:
mov	eax, [edi]
cmp	dword ptr [esi+eax+8], 0FFFFFFFEh
lea	ecx, [esi+eax+8]
jz	short loc_664555
call	sub_664450

loc_664555:
add	esi, 24h
sub	ebx, 1
jnz	short loc_664543
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
mov	[edi], ebx
pop	ebx

loc_664571:
pop	edi
retn
sub_664530 endp

align 10h



sub_664580 proc	near
push	esi
push	edi
mov	edi, ecx
lea	ecx, [edi+1Ch]
call	sub_6691A0
mov	ecx, [edi+2Ch]
test	ecx, ecx
jz	short loc_6645A9
call	sub_6620C0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+2Ch]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6645A9:
mov	esi, [edi+14h]
test	esi, esi
jz	short loc_6645E6
mov	ecx, [esi+4]
push	ebx
lea	ebx, [edi+10h]
test	ecx, ecx
jz	short loc_6645D4
push	0
push	0
push	0
call	sub_64AA00
mov	ecx, [esi+4]
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+4]
push	ebx
push	eax
call	edx

loc_6645D4:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+14h]
mov	eax, [eax+30h]
push	edx
call	eax
pop	ebx

loc_6645E6:
pop	edi
pop	esi
retn
sub_664580 endp

align 10h



sub_6645F0 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
cmp	byte ptr [ebx+4], 6
push	esi
setnbe	al
push	edi
mov	edi, [esp+14h+arg_4]
mov	byte ptr [esp+14h+arg_0], al
lea	esi, [ecx+0Ch]
mov	ecx, [esp+14h+arg_0]
push	ecx
push	edi
lea	edx, [esp+1Ch+var_8]
push	edx
mov	ecx, esi
call	sub_664310
mov	ecx, [eax]
mov	eax, [eax+4]
test	ecx, ecx
jz	short loc_664632
mov	ecx, [ecx]
test	ecx, ecx
jz	short loc_664632
cmp	eax, [ecx+4]
jle	short loc_66463D

loc_664632:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 8
retn	8

loc_66463D:
lea	eax, [eax+eax*2]
test	byte ptr [ecx+eax*8+11h], 2
jnz	short loc_664632
mov	ecx, [ebx]
mov	edx, [edi]
cmp	edx, [ecx+1A4h]
jnz	short loc_66465A
mov	ecx, ebx
call	sub_668F80

loc_66465A:
push	edi
mov	ecx, esi
call	sub_662930
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	8
sub_6645F0 endp

align 10h



sub_664670 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

cmp	[esp+arg_4], 0
jz	short loc_6646AD
push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_6646A7
mov	eax, [esp+4+arg_0]
mov	edx, [eax]
mov	edx, [edx+0Ch]
and	edx, [esi+4]
push	edx
push	eax
call	sub_6623B0
test	eax, eax
jl	short loc_6646A7
lea	eax, [eax+eax*8]
lea	eax, [esi+eax*4+0Ch]
test	eax, eax
jz	short loc_6646A7
add	eax, 4
pop	esi
retn	8

loc_6646A7:
xor	eax, eax
pop	esi
retn	8

loc_6646AD:
mov	edx, [esp+arg_0]
push	edx
call	sub_664390
retn	8
sub_664670 endp

align 10h



sub_6646C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 8
cmp	[esp+8+arg_8], 0
push	esi
mov	esi, ecx
jz	short loc_664710
mov	eax, [esi]
test	eax, eax
jz	short loc_6646FA
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
and	edx, [eax+4]
push	edx
push	ecx
mov	ecx, esi
call	sub_6623B0
test	eax, eax
jl	short loc_6646FA
mov	[esp+0Ch+var_4], eax
mov	[esp+0Ch+var_8], esi
lea	eax, [esp+0Ch+var_8]
jmp	short loc_664721

loc_6646FA:
mov	[esp+0Ch+var_8], 0
mov	[esp+0Ch+var_4], 0
lea	eax, [esp+0Ch+var_8]
jmp	short loc_664721

loc_664710:
mov	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, esi
call	sub_6643F0

loc_664721:
mov	edx, [eax]
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [eax+4]
mov	[ecx+4], eax
mov	[ecx], edx
mov	eax, ecx
pop	esi
add	esp, 8
retn	0Ch
sub_6646C0 endp

align 10h



sub_664740 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	[esi], eax
mov	eax, [ecx+4]
add	ecx, 8
push	ecx
mov	[esi+4], eax
inc	dword ptr [eax+8]
lea	ecx, [esi+8]
call	sub_6638F0
mov	eax, esi
pop	esi
retn	4
sub_664740 endp

align 10h



sub_664770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	edx, ecx
mov	eax, [edx]
mov	[esp+8+var_4], edx
test	eax, eax
jz	loc_664850
mov	ecx, [eax+4]
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	esi, [esi]
mov	esi, [esi]
push	edi
mov	edi, [esi+0Ch]
and	edi, ecx
lea	esi, [edi+edi*8]
cmp	dword ptr [eax+esi*4+8], 0FFFFFFFEh
lea	esi, [eax+esi*4+8]
jz	loc_66484E
push	ebx
mov	ebx, [esi+4]
mov	ebx, [ebx+0Ch]
and	ebx, ecx
cmp	ebx, edi
jnz	loc_66484D
push	ebp
mov	[esp+18h+var_8], edi
or	ebp, 0FFFFFFFFh

loc_6647C0:
mov	ecx, [esi+4]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
cmp	eax, [esp+18h+var_8]
jnz	short loc_6647F4
mov	ecx, [esp+18h+arg_0]
mov	ebx, [ecx]
mov	ecx, [esi+4]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6647E7
call	sub_651580
mov	edx, [esp+18h+var_4]

loc_6647E7:
mov	ecx, [ebx]
mov	eax, [esi+4]
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]
jz	short loc_664808

loc_6647F4:
mov	ebp, edi
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_66484C
mov	eax, [edx]
lea	ecx, [edi+edi*8]
lea	esi, [eax+ecx*4+8]
jmp	short loc_6647C0

loc_664808:
cmp	[esp+18h+var_8], edi
jnz	short loc_664831
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_66483D
mov	ecx, [edx]
lea	eax, [eax+eax*8]
lea	edi, [ecx+eax*4+8]
mov	ecx, esi
call	sub_664450
push	edi
mov	ecx, esi
call	sub_664740
mov	esi, edi
jmp	short loc_66483D

loc_664831:
mov	ecx, [edx]
mov	edx, [esi]
lea	eax, [ebp+ebp*8+0]
mov	[ecx+eax*4+8], edx

loc_66483D:
mov	ecx, esi
call	sub_664450
mov	eax, [esp+18h+var_4]
mov	eax, [eax]
dec	dword ptr [eax]

loc_66484C:
pop	ebp

loc_66484D:
pop	ebx

loc_66484E:
pop	edi
pop	esi

loc_664850:
add	esp, 8
retn	4
sub_664770 endp

align 10h



sub_664860 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	ebp, ebp
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebp
jnz	short loc_664882
call	sub_664530
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_664882:
push	esi
cmp	eax, 8
jnb	short loc_66488F
mov	esi, 8
jmp	short loc_6648F4

loc_66488F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6648A2
fadd	ds:flt_15FCC08

loc_6648A2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6648F4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*8]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebp
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebp
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebp
jbe	short loc_664954
xor	eax, eax
jmp	short loc_664940
align 10h

loc_664940:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 24h
sub	esi, 1
jnz	short loc_664940

loc_664954:
mov	eax, [edi]
cmp	eax, ebp
jz	loc_664A08
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]
jmp	short loc_664974
jmp	short loc_664970
align 10h

loc_664970:
mov	edi, [esp+1Ch+var_C]

loc_664974:
mov	edx, [edi]
cmp	dword ptr [edx+ebp+8], 0FFFFFFFEh
lea	edi, [edx+ebp+8]
jz	short loc_6649E7
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_665050
lea	ecx, [esi+10h]
call	sub_652830
test	byte ptr [esi+0Ch], 2
jnz	short loc_6649B4
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6649B4
call	sub_64B3B0

loc_6649B4:
test	byte ptr [esi+0Ch], 1
mov	dword ptr [esi+4], 0
jnz	short loc_6649CD
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6649CD
call	sub_64B3B0

loc_6649CD:
mov	dword ptr [esi+8], 0
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6649E1
call	sub_650DF0

loc_6649E1:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6649E7:
add	ebp, 24h
sub	ebx, 1
jnz	short loc_664970
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_664A08:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_6620C0
pop	esi
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_664860 endp

align 10h



sub_664A30 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+2Ch]
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [ebx], offset	off_1432A28
test	edi, edi
jz	short loc_664A60
mov	ecx, edi
call	sub_6620C0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_664A60:
test	byte ptr [esi+28h], 2
jnz	short loc_664A72
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_664A72
call	sub_64B3B0

loc_664A72:
test	byte ptr [esi+28h], 1
mov	dword ptr [esi+20h], 0
jnz	short loc_664A8B
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_664A8B
call	sub_64B3B0

loc_664A8B:
lea	ecx, [esi+1Ch]
mov	dword ptr [esi+24h], 0
call	sub_6691A0
mov	ecx, ebx
call	sub_663040
pop	edi
mov	dword ptr [esi], offset	off_1431AF4
pop	esi
pop	ebx
retn
sub_664A30 endp

align 10h



sub_664AB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
cmp	byte ptr [eax+4], 6
push	esi
lea	esi, [ecx+0Ch]
jbe	short loc_664AD3
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	ecx
push	edx
mov	ecx, esi
call	sub_663840
pop	esi
retn	0Ch

loc_664AD3:
mov	eax, [esp+4+arg_4]
mov	ecx, [eax]
cmp	dword ptr [ecx+4], 0
mov	[esp+4+arg_4], eax
jnz	short loc_664AE8
call	sub_651580

loc_664AE8:
mov	eax, [esp+4+arg_8]
push	eax
lea	ecx, [esp+8+arg_4]
push	ecx
mov	ecx, esi
call	sub_663890
pop	esi
retn	0Ch
sub_664AB0 endp

align 10h



sub_664B00 proc	near

var_5D=	byte ptr -5Dh
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 60h
push	ebx
push	ebp
mov	ebp, [esp+68h+arg_0]
push	esi
push	edi
mov	edi, [esp+70h+arg_4]
mov	esi, ecx
mov	eax, [esi+10h]
mov	eax, [eax+10h]
lea	edx, [esp+70h+var_44]
lea	ecx, [esi+10h]
push	edx
push	edi
push	ebp
mov	[esp+7Ch+var_5C], esi
mov	[esp+7Ch+var_44], 0
mov	[esp+7Ch+var_58], ecx
call	eax
cmp	byte ptr [ebp+7Ch], 6
mov	ecx, [esi+2Ch]
mov	[esp+70h+var_54], 0
jbe	short loc_664B7D
mov	esi, [ecx]
test	esi, esi
jz	loc_664D18
mov	edx, [edi]
mov	eax, [edx+0Ch]
and	eax, [esi+4]
mov	byte ptr [esp+70h+arg_4], 0
push	eax
push	edi
mov	[esp+78h+var_5D], 0
call	sub_6623B0
test	eax, eax
jl	loc_664D18
lea	ecx, [eax+eax*8]
lea	eax, [esi+ecx*4+0Ch]
test	eax, eax
jz	loc_664D18
lea	ebx, [eax+4]
jmp	short loc_664B85

loc_664B7D:
push	edi
call	sub_664390
mov	ebx, eax

loc_664B85:
test	ebx, ebx
jz	loc_664D18
mov	edx, [esp+70h+var_5C]
cmp	dword ptr [edx+2Ch], 0
jz	loc_664D18
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_664BB1
mov	ecx, esi
call	sub_64B530

loc_664BB1:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_664BC0
lea	eax, [ebx+0Ch]
push	eax
call	sub_652330

loc_664BC0:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_664BD1
mov	ecx, esi
call	sub_64B530

loc_664BD1:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_664BE1
mov	edx, [esp+70h+arg_8]
push	edx
call	sub_652330

loc_664BE1:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_664BF2
mov	ecx, esi
call	sub_64B530

loc_664BF2:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_664C02
lea	eax, [esp+70h+var_44]
push	eax
call	sub_652330

loc_664C02:
mov	eax, [edi]
mov	[esp+70h+var_30], eax
mov	edi, 1
mov	[esp+70h+var_34], 5
add	[eax+8], edi
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_664C26
mov	ecx, esi
call	sub_64B530

loc_664C26:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_664C36
lea	edx, [esp+70h+var_34]
push	edx
call	sub_652330

loc_664C36:
lea	ecx, [esp+70h+var_34]
call	sub_652830
mov	ecx, [esp+70h+var_5C]
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
mov	ebp, eax
xor	edx, edx
cmp	ebp, edx
jz	short loc_664C5A
add	[ebp+4], edi
lea	ecx, [ebp+78h]
jmp	short loc_664C5E

loc_664C5A:
mov	ecx, [esp+70h+var_58]

loc_664C5E:
mov	eax, [esi]
sub	eax, [esi+4]
mov	edi, [esi+14h]
sar	eax, 4
shl	edi, 5
lea	eax, [eax+edi-20h]
mov	dword ptr [esp+70h+var_1C], ecx
mov	ecx, [esp+70h+arg_0]
push	edx
lea	edi, [esp+74h+var_54]
mov	byte ptr [esp+74h+var_10], dl
mov	[esp+74h+var_18], edx
mov	[esp+74h+var_14], edx
mov	edx, [ebx+4]
mov	[esp+74h+var_20], edi
mov	[esp+74h+var_C], ecx
mov	ecx, [ebx]
mov	edi, 4
mov	dword ptr [esp+74h+var_4], eax
push	edx
mov	[esp+78h+var_24], offset off_1431764
mov	[esp+78h+var_8], edi
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+78h+var_24]
push	edx
call	eax
lea	ecx, [esp+70h+var_24]
call	sub_64B830

loc_664CC1:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_664CD9
mov	ecx, esi
call	sub_64B660

loc_664CD9:
sub	edi, 1
jnz	short loc_664CC1
lea	ecx, [esp+70h+var_54]
push	ecx
mov	ecx, [esp+74h+arg_C]
call	sub_652520
test	ebp, ebp
jz	short loc_664CFA
mov	ecx, ebp
call	sub_64A400

loc_664CFA:
lea	ecx, [esp+70h+var_54]
call	sub_652830
lea	ecx, [esp+70h+var_44]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 60h
retn	10h

loc_664D18:
lea	ecx, [esp+70h+var_54]
call	sub_652830
lea	ecx, [esp+70h+var_44]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 60h
retn	10h
sub_664B00 endp

align 10h



sub_664D40 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

sub	esp, 38h
mov	eax, [esp+38h+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+40h+arg_8]
push	esi
mov	esi, [esp+44h+arg_0]
mov	bl, 0Ah
add	esi, 1Ch
cmp	byte ptr [eax+4], 6
push	edi
mov	edi, ecx
mov	[esp+48h+var_20], 0
mov	[esp+48h+var_1F], 0
mov	[esp+48h+var_10], bl
jbe	short loc_664D7D
lea	ecx, [esp+48h+var_20]
push	ecx
push	ebp
mov	ecx, esi
call	sub_663840
jmp	short loc_664DA0

loc_664D7D:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
mov	[esp+48h+arg_8], ebp
jnz	short loc_664D8F
call	sub_651580

loc_664D8F:
lea	edx, [esp+48h+var_20]
push	edx
lea	eax, [esp+4Ch+arg_8]
push	eax
mov	ecx, esi
call	sub_663890

loc_664DA0:
test	al, al
jz	short loc_664DB2
lea	ecx, [esp+48h+var_20]
push	ecx
lea	ecx, [esp+4Ch+var_10]
call	sub_652520

loc_664DB2:
cmp	[esp+48h+var_10], bl
jz	short loc_664DCB
mov	ecx, [esp+48h+arg_C]
lea	edx, [esp+48h+var_10]
push	edx
call	sub_652520
jmp	loc_664F1F

loc_664DCB:
xor	ebx, ebx
mov	[esp+48h+var_30], 0
mov	[esp+48h+var_38], ebx
mov	[esp+48h+var_34], ebx
cmp	[esp+48h+arg_10], bl
jz	short loc_664DEF
add	edi, 10h
push	edi
lea	ecx, [esp+4Ch+var_38]
call	sub_67C4C0
jmp	short loc_664E63

loc_664DEF:
mov	eax, [edi+4]
mov	[esp+48h+var_24], bl
mov	[esp+48h+var_2C], eax
cmp	eax, ebx
jz	short loc_664E0A
inc	dword ptr [eax+8]
add	eax, 8
and	dword ptr [eax], 8FFFFFFFh

loc_664E0A:
mov	eax, [edi+8]
mov	[esp+48h+var_28], ebx
cmp	eax, ebx
jz	short loc_664E29
mov	cl, [edi+0Ch]
and	cl, 1
movzx	edx, cl
push	edx
push	eax
lea	ecx, [esp+50h+var_2C]
call	sub_67C1A0

loc_664E29:
lea	eax, [esp+48h+var_2C]
push	eax
lea	ecx, [esp+4Ch+var_38]
call	sub_67C4C0
test	[esp+48h+var_24], 2
jnz	short loc_664E4B
mov	ecx, [esp+48h+var_2C]
cmp	ecx, ebx
jz	short loc_664E4B
call	sub_64B3B0

loc_664E4B:
test	[esp+48h+var_24], 1
mov	[esp+48h+var_2C], ebx
jnz	short loc_664E63
mov	ecx, [esp+48h+var_28]
cmp	ecx, ebx
jz	short loc_664E63
call	sub_64B3B0

loc_664E63:
cmp	[esp+48h+var_38], ebx
jnz	short loc_664EE5
mov	esi, [esp+48h+arg_C]
mov	ecx, esi
call	sub_652060
mov	ecx, [esp+48h+arg_0]
mov	[esi], bl
mov	eax, [ecx+18h]
cmp	eax, ebx
jz	short loc_664EF3
mov	edx, [eax+10h]
mov	edx, [edx+2Ch]
lea	ecx, [eax+10h]
mov	eax, [esp+48h+arg_4]
push	esi
push	ebp
push	eax
call	edx
test	[esp+48h+var_30], 2
mov	bl, al
jnz	short loc_664EA9
mov	ecx, [esp+48h+var_38]
test	ecx, ecx
jz	short loc_664EA9
call	sub_64B3B0

loc_664EA9:
xor	esi, esi
test	[esp+48h+var_30], 1
mov	[esp+48h+var_38], esi
jnz	short loc_664EC3
mov	ecx, [esp+48h+var_34]
cmp	ecx, esi
jz	short loc_664EC3
call	sub_64B3B0

loc_664EC3:
lea	ecx, [esp+48h+var_10]
mov	[esp+48h+var_34], esi
call	sub_652830
lea	ecx, [esp+48h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 38h
retn	14h

loc_664EE5:
mov	ecx, [esp+48h+arg_C]
lea	eax, [esp+48h+var_38]
push	eax
call	sub_652940

loc_664EF3:
test	[esp+48h+var_30], 2
jnz	short loc_664F07
mov	ecx, [esp+48h+var_38]
cmp	ecx, ebx
jz	short loc_664F07
call	sub_64B3B0

loc_664F07:
test	[esp+48h+var_30], 1
mov	[esp+48h+var_38], ebx
jnz	short loc_664F1F
mov	ecx, [esp+48h+var_34]
cmp	ecx, ebx
jz	short loc_664F1F
call	sub_64B3B0

loc_664F1F:
lea	ecx, [esp+48h+var_10]
call	sub_652830
lea	ecx, [esp+48h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 38h
retn	14h
sub_664D40 endp

align 10h



sub_664F40 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	dword ptr [esi+4], 0
push	edi
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 0
mov	ebx, [esi+4]
push	esi
call	sub_66E650
cmp	edi, ebx
jbe	short loc_664F86
sub	edi, ebx
mov	eax, [esi]
lea	eax, [eax+ebx*4]
jz	short loc_664F86

loc_664F74:
test	eax, eax
jz	short loc_664F7E
mov	dword ptr [eax], 0

loc_664F7E:
add	eax, 4
sub	edi, 1
jnz	short loc_664F74

loc_664F86:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_664F40 endp

align 10h



sub_664F90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	edx, [ecx]
mov	[esp+8+var_4], ecx
test	edx, edx
jz	loc_66503F
mov	eax, [esp+8+arg_0]
mov	eax, [eax]
push	esi
mov	[esp+0Ch+var_8], eax
mov	eax, [eax+0Ch]
push	edi
mov	edi, [edx+4]
and	eax, edi
lea	ecx, [eax+eax*8]
cmp	dword ptr [edx+ecx*4+8], 0FFFFFFFEh
lea	esi, [edx+ecx*4+8]
jz	short loc_66503D
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, edi
cmp	ecx, eax
jnz	short loc_66503D
push	ebx
mov	[esp+14h+arg_0], eax
or	ebx, 0FFFFFFFFh
push	ebp

loc_664FD8:
mov	ecx, [esi+4]
mov	ebp, [ecx+0Ch]
and	ebp, edi
cmp	ebp, [esp+18h+arg_0]
jnz	short loc_664FEC
cmp	ecx, [esp+18h+var_8]
jz	short loc_664FFE

loc_664FEC:
mov	ebx, eax
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_66503B
lea	ecx, [eax+eax*8]
lea	esi, [edx+ecx*4+8]
jmp	short loc_664FD8

loc_664FFE:
cmp	[esp+18h+arg_0], eax
mov	eax, [esi]
jnz	short loc_665025
cmp	eax, 0FFFFFFFFh
jz	short loc_66502C
lea	eax, [eax+eax*8]
mov	ecx, esi
lea	edi, [edx+eax*4+8]
call	sub_664450
push	edi
mov	ecx, esi
call	sub_664740
mov	esi, edi
jmp	short loc_66502C

loc_665025:
lea	ecx, [ebx+ebx*8]
mov	[edx+ecx*4+8], eax

loc_66502C:
mov	ecx, esi
call	sub_664450
mov	ecx, [esp+18h+var_4]
mov	eax, [ecx]
dec	dword ptr [eax]

loc_66503B:
pop	ebp
pop	ebx

loc_66503D:
pop	edi
pop	esi

loc_66503F:
add	esp, 8
retn	4
sub_664F90 endp

align 10h



sub_665050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_665064
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_665086

loc_665064:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_66508B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_665086:
call	sub_664860

loc_66508B:
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*8]
lea	edi, [ecx+edx*4+8]
mov	edx, [edi]
mov	ebx, 0FFFFFFFEh
mov	[esp+0Ch+arg_0], edi
cmp	edx, ebx
jnz	short loc_6650D2
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [edi], 0FFFFFFFFh
mov	eax, [ecx]
add	ecx, 4
push	ecx
mov	[edi+4], eax
inc	dword ptr [eax+8]
lea	ecx, [edi+8]
call	sub_6638F0
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_6650D2:
push	ebp
mov	ebp, [ecx+4]
mov	esi, eax

loc_6650D8:
inc	esi
and	esi, ebp
lea	edx, [esi+esi*8]
cmp	[ecx+edx*4+8], ebx
jnz	short loc_6650D8
mov	ebx, [edi+4]
mov	ebx, [ebx+0Ch]
add	edi, 4
and	ebx, ebp
lea	edx, [esi+esi*8]
lea	edx, [ecx+edx*4+8]
pop	ebp
cmp	ebx, eax
jnz	short loc_665133
test	edx, edx
jz	short loc_66511B
mov	eax, [esp+0Ch+arg_0]
mov	eax, [eax]
mov	[edx], eax
mov	eax, [edi]
lea	ecx, [edi+4]
push	ecx
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	ecx, [edx+8]
call	sub_6638F0

loc_66511B:
mov	edx, [esp+0Ch+arg_4]
push	edx
mov	ecx, edi
call	sub_662220
mov	eax, [esp+0Ch+arg_0]
pop	edi
mov	[eax], esi
pop	esi
pop	ebx
retn	0Ch

loc_665133:
lea	ebx, [ebx+ebx*8]
cmp	[ecx+ebx*4+8], eax
lea	ebx, [ecx+ebx*4+8]
jz	short loc_66514F

loc_665140:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*8]
cmp	[ecx+ebx*4+8], eax
lea	ebx, [ecx+ebx*4+8]
jnz	short loc_665140

loc_66514F:
test	edx, edx
jz	short loc_66516F
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [edi]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [edi+4]
push	eax
lea	ecx, [edx+8]
call	sub_6638F0

loc_66516F:
mov	ecx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, edi
mov	[ebx], esi
call	sub_662220
mov	edx, [esp+0Ch+arg_0]
pop	edi
pop	esi
mov	dword ptr [edx], 0FFFFFFFFh
pop	ebx
retn	0Ch
sub_665050 endp

align 10h



sub_665190 proc	near

var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 4Ch
test	byte ptr dword_1856024,	1
push	ebx
push	ebp
push	esi
push	edi
mov	ebp, ecx
jnz	short loc_6651BD
or	dword_1856024, 1
push	offset sub_14193E0 ; void (__cdecl *)()
mov	byte_1856014, 0Ah
call	_atexit
add	esp, 4

loc_6651BD:
mov	esi, [esp+5Ch+arg_0]
cmp	byte ptr [esi+7Ch], 6
mov	ebx, [esp+5Ch+arg_4]
setnbe	al
movzx	ecx, al
push	ecx
push	ebx
lea	edx, [esp+64h+var_48]
push	edx
lea	ecx, [ebp+0Ch]
mov	[esp+68h+var_49], 0
call	sub_664310
mov	eax, [esp+5Ch+var_48]
test	eax, eax
jz	short loc_6651FB
cmp	dword ptr [eax], 0
jz	short loc_6651FB
mov	ecx, [eax]
mov	edx, [esp+5Ch+var_44]
cmp	edx, [ecx+4]
jle	short loc_66525E

loc_6651FB:
mov	edi, [ebp+8]
test	edi, edi
jz	short loc_66525E

loc_665202:
cmp	byte ptr [edi+30h], 0
jz	short loc_66523D
cmp	byte ptr [esi+7Ch], 6
lea	edx, [esp+5Ch+var_40]
setnbe	al
movzx	ecx, al
push	ecx
push	ebx
push	edx
lea	ecx, [edi+1Ch]
call	sub_664310
mov	eax, [esp+5Ch+var_40]
test	eax, eax
jz	short loc_665239
cmp	dword ptr [eax], 0
jz	short loc_665239
mov	edx, [eax]
mov	ecx, [esp+5Ch+var_3C]
cmp	ecx, [edx+4]
jle	short loc_665246

loc_665239:
mov	eax, [esp+5Ch+var_48]

loc_66523D:
mov	edi, [edi+18h]
test	edi, edi
jnz	short loc_665202
jmp	short loc_66525E

loc_665246:
mov	edi, [eax]
lea	edx, [ecx+ecx*2]
cmp	byte ptr [edi+edx*8+10h], 9
jnz	short loc_66525A
mov	[esp+5Ch+var_48], eax
mov	[esp+5Ch+var_44], ecx

loc_66525A:
mov	eax, [esp+5Ch+var_48]

loc_66525E:
test	eax, eax
jz	loc_665301
cmp	dword ptr [eax], 0
jz	loc_665301
mov	eax, [eax]
mov	ecx, [esp+5Ch+var_44]
cmp	ecx, [eax+4]
jg	loc_665301
lea	ecx, [ecx+ecx*2]
lea	ecx, [eax+ecx*8+10h]
mov	al, [ecx+1]
mov	[esp+5Ch+var_49], al
cmp	byte ptr [ecx],	9
mov	[esp+5Ch+arg_0], ecx
jnz	short loc_6652F1
push	ecx
lea	ecx, [esp+60h+var_10]
call	sub_652330
mov	edx, [ebp-10h]
mov	eax, [edx+1Ch]
lea	ecx, [ebp-10h]
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6652B8
inc	dword ptr [edi+4]
lea	eax, [edi+78h]
jmp	short loc_6652C1

loc_6652B8:
lea	eax, [ebp-10h]
neg	eax
sbb	eax, eax
and	eax, ebp

loc_6652C1:
mov	ecx, [esp+5Ch+arg_8]
push	ecx
push	eax
push	esi
lea	ecx, [esp+68h+var_10]
call	sub_653CB0
test	edi, edi
jz	short loc_6652DC
mov	ecx, edi
call	sub_64A400

loc_6652DC:
lea	ecx, [esp+5Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 4Ch
retn	10h

loc_6652F1:
test	al, 4
jz	short loc_665313
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 4Ch
retn	10h

loc_665301:
mov	edx, [esp+5Ch+arg_C]
mov	al, [edx]
mov	[esp+5Ch+var_49], al
mov	[esp+5Ch+arg_0], 0

loc_665313:
cmp	dword ptr [ebp+1Ch], 0
mov	edi, [esp+5Ch+arg_8]
mov	[esp+5Ch+var_20], 0
mov	[esp+5Ch+arg_8], edi
jz	short loc_665342
lea	ecx, [esp+5Ch+var_20]
push	ecx
push	edi
push	ebx
push	esi
lea	ecx, [ebp-10h]
call	sub_664B00
test	al, al
jz	short loc_665342
lea	edx, [esp+5Ch+var_20]
mov	[esp+5Ch+arg_8], edx

loc_665342:
cmp	[esp+5Ch+arg_0], 0
jnz	short loc_665379
mov	edx, [esp+5Ch+arg_8]
mov	eax, [ebp+0]
mov	eax, [eax+28h]
lea	ecx, [esp+5Ch+var_49]
push	ecx
push	edx
push	ebx
add	esi, 78h
push	esi
mov	ecx, ebp
call	eax
lea	ecx, [esp+5Ch+var_20]
mov	bl, al
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 4Ch
retn	10h

loc_665379:
cmp	byte ptr [edi],	9
jnz	short loc_665382
mov	byte ptr [ebp+20h], 1

loc_665382:
cmp	byte ptr [esi+7Ch], 6
mov	ecx, [ebx]
jbe	loc_665446
mov	eax, [esi+78h]
cmp	ecx, [eax+144h]
jnz	short loc_6653CF
cmp	byte ptr [edi],	0Ah
jz	loc_665489
mov	ebx, [ebp+0]
push	esi
mov	ecx, edi
add	ebx, 34h
call	sub_652C20
mov	edx, [ebx]
push	eax
lea	eax, [esi+78h]
push	eax
mov	ecx, ebp
call	edx
mov	ecx, esi
call	sub_668A90
mov	[esp+5Ch+arg_8], offset	byte_1856014
jmp	loc_665502

loc_6653CF:
cmp	ecx, [eax+154h]
jnz	short loc_66543B
cmp	byte ptr [edi],	0Ah
jz	loc_6654E9
push	esi
lea	eax, [esp+60h+var_38]
push	eax
mov	ecx, edi
call	sub_652DC0
push	eax
lea	ecx, [ebp+10h]
call	sub_67C4C0
test	[esp+5Ch+var_30], 2
jnz	short loc_66540A
mov	ecx, [esp+5Ch+var_38]
test	ecx, ecx
jz	short loc_66540A
call	sub_64B3B0

loc_66540A:
test	[esp+5Ch+var_30], 1
mov	[esp+5Ch+var_38], 0
jnz	loc_6654E9
mov	ecx, [esp+5Ch+var_34]
test	ecx, ecx
jz	loc_6654E9
call	sub_64B3B0
mov	[esp+5Ch+arg_8], offset	byte_1856014
jmp	loc_665502

loc_66543B:
cmp	ecx, [eax+1A4h]
jmp	loc_6654F9

loc_665446:
cmp	dword ptr [ecx+4], 0
jnz	short loc_665451
call	sub_651580

loc_665451:
mov	eax, [esi+78h]
mov	ebx, [ebx]
mov	ecx, [ebx+4]
mov	edx, [eax+144h]
cmp	[edx+4], ecx
jnz	short loc_665493
cmp	byte ptr [edi],	0Ah
jz	short loc_665489
mov	ebx, [ebp+0]
push	esi
mov	ecx, edi
add	ebx, 34h
call	sub_652C20
push	eax
lea	eax, [esi+78h]
push	eax
mov	eax, [ebx]
mov	ecx, ebp
call	eax
mov	ecx, esi
call	sub_668A90

loc_665489:
mov	[esp+5Ch+arg_8], offset	byte_1856014
jmp	short loc_665502

loc_665493:
mov	edx, [eax+154h]
cmp	[edx+4], ecx
jnz	short loc_6654F3
cmp	byte ptr [edi],	0Ah
jz	short loc_6654E9
push	esi
lea	eax, [esp+60h+var_2C]
push	eax
mov	ecx, edi
call	sub_652DC0
push	eax
lea	ecx, [ebp+10h]
call	sub_67C4C0
test	[esp+5Ch+var_24], 2
jnz	short loc_6654CD
mov	ecx, [esp+5Ch+var_2C]
test	ecx, ecx
jz	short loc_6654CD
call	sub_64B3B0

loc_6654CD:
test	[esp+5Ch+var_24], 1
mov	[esp+5Ch+var_2C], 0
jnz	short loc_6654E9
mov	ecx, [esp+5Ch+var_28]
test	ecx, ecx
jz	short loc_6654E9
call	sub_64B3B0

loc_6654E9:
mov	[esp+5Ch+arg_8], offset	byte_1856014
jmp	short loc_665502

loc_6654F3:
cmp	ebx, [eax+1A4h]

loc_6654F9:
jnz	short loc_665502
mov	ecx, esi
call	sub_668A90

loc_665502:
mov	ecx, [esp+5Ch+arg_8]
push	ecx
mov	ecx, [esp+60h+arg_0]
call	sub_652520
lea	ecx, [esp+5Ch+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 4Ch
retn	10h
sub_665190 endp

align 10h



sub_665530 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 1Ch
push	ebx
push	ebp
mov	ebp, [esp+24h+arg_8]
push	esi
mov	esi, [esp+28h+arg_0]
push	edi
mov	edi, ecx
cmp	byte ptr [edi+21h], 0
mov	[esp+2Ch+arg_8], ebp
jnz	short loc_665584
cmp	byte ptr [ebp+0], 6
jnz	short loc_665584
mov	ebx, [esp+2Ch+arg_4]
mov	eax, [esi]
mov	ecx, [ebx]
cmp	ecx, [eax+150h]
jnz	short loc_665588
push	0
mov	ecx, ebp
call	sub_652C20
test	eax, eax
jz	short loc_665588
mov	edx, [eax+10h]
lea	ecx, [eax+10h]
mov	eax, [edx+8]
call	eax
cmp	eax, 7
jnz	short loc_665588
mov	byte ptr [edi+21h], 1
jmp	short loc_665588

loc_665584:
mov	ebx, [esp+2Ch+arg_4]

loc_665588:
cmp	byte ptr [esi+4], 6
mov	ecx, [ebx]
jbe	loc_66566A
mov	eax, [esi]
cmp	ecx, [eax+144h]
jnz	short loc_6655CD
cmp	byte ptr [ebp+0], 0Ah
jz	short loc_6655C3
mov	ebx, [edi]
push	0
mov	ecx, ebp
call	sub_652C20
mov	edx, [ebx+34h]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	ecx, esi
call	sub_668F80
mov	ebx, [esp+2Ch+arg_4]

loc_6655C3:
mov	[esp+2Ch+arg_8], offset	unk_167D604
jmp	short loc_66563B

loc_6655CD:
cmp	ecx, [eax+154h]
jnz	short loc_66562C
cmp	byte ptr [ebp+0], 0Ah
jz	short loc_665622
push	0
lea	eax, [esp+30h+var_1C]
push	eax
mov	ecx, ebp
call	sub_652DC0
push	eax
lea	ecx, [edi+10h]
call	sub_67C4C0
test	[esp+2Ch+var_14], 2
jnz	short loc_665606
mov	ecx, [esp+2Ch+var_1C]
test	ecx, ecx
jz	short loc_665606
call	sub_64B3B0

loc_665606:
test	[esp+2Ch+var_14], 1
mov	[esp+2Ch+var_1C], 0
jnz	short loc_665622
mov	ecx, [esp+2Ch+var_18]
test	ecx, ecx
jz	short loc_665622
call	sub_64B3B0

loc_665622:
mov	[esp+2Ch+arg_8], offset	unk_167D604
jmp	short loc_66563B

loc_66562C:
cmp	ecx, [eax+1A4h]
jnz	short loc_66563B
mov	ecx, esi
call	sub_668F80

loc_66563B:
mov	eax, [edi+0Ch]
lea	esi, [edi+0Ch]
test	eax, eax
jz	short loc_665661
mov	ecx, [ebx]
mov	edx, [eax+4]
and	edx, [ecx+0Ch]
mov	ecx, esi
push	edx
push	ebx
call	sub_662340
test	eax, eax
jl	short loc_665661
mov	ecx, esi
jmp	loc_66573C

loc_665661:
xor	ecx, ecx
xor	eax, eax
jmp	loc_66573C

loc_66566A:
cmp	dword ptr [ecx+4], 0
jnz	short loc_665675
call	sub_651580

loc_665675:
mov	edx, [ebx]
mov	eax, [esi]
mov	ecx, [edx+4]
mov	ebx, [eax+144h]
cmp	[ebx+4], ecx
jnz	short loc_6656B2
cmp	byte ptr [ebp+0], 0Ah
jz	short loc_6656A8
mov	ebx, [edi]
push	0
mov	ecx, ebp
call	sub_652C20
push	eax
mov	eax, [ebx+34h]
push	esi
mov	ecx, edi
call	eax
mov	ecx, esi
call	sub_668F80

loc_6656A8:
mov	[esp+2Ch+arg_8], offset	unk_167D604
jmp	short loc_665723

loc_6656B2:
mov	ebx, [eax+154h]
cmp	[ebx+4], ecx
jnz	short loc_665714
cmp	byte ptr [ebp+0], 0Ah
jz	short loc_66570A
push	0
lea	ecx, [esp+30h+var_1C]
push	ecx
mov	ecx, ebp
call	sub_652DC0
push	eax
lea	ecx, [edi+10h]
call	sub_67C4C0
test	[esp+2Ch+var_14], 2
jnz	short loc_6656EE
mov	ecx, [esp+2Ch+var_1C]
test	ecx, ecx
jz	short loc_6656EE
call	sub_64B3B0

loc_6656EE:
test	[esp+2Ch+var_14], 1
mov	[esp+2Ch+var_1C], 0
jnz	short loc_66570A
mov	ecx, [esp+2Ch+var_18]
test	ecx, ecx
jz	short loc_66570A
call	sub_64B3B0

loc_66570A:
mov	[esp+2Ch+arg_8], offset	unk_167D604
jmp	short loc_665723

loc_665714:
cmp	edx, [eax+1A4h]
jnz	short loc_665723
mov	ecx, esi
call	sub_668F80

loc_665723:
mov	edx, [esp+2Ch+arg_4]
push	edx
lea	eax, [esp+30h+var_1C]
lea	esi, [edi+0Ch]
push	eax
mov	ecx, esi
call	sub_6642B0
mov	ecx, [eax]
mov	eax, [eax+4]

loc_66573C:
cmp	byte ptr [ebp+0], 9
jnz	short loc_665746
mov	byte ptr [edi+20h], 1

loc_665746:
test	ecx, ecx
jz	short loc_665772
mov	ecx, [ecx]
test	ecx, ecx
jz	short loc_665772
cmp	eax, [ecx+4]
jg	short loc_665772
mov	edx, [esp+2Ch+arg_8]
lea	eax, [eax+eax*2]
push	edx
lea	ecx, [ecx+eax*8+10h]
call	sub_652520
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 1Ch
retn	10h

loc_665772:
mov	ecx, [esp+2Ch+arg_C]
mov	edx, [esp+2Ch+arg_8]
mov	bl, [ecx]
push	edx
lea	ecx, [esp+30h+var_10]
call	sub_652330
mov	eax, [esp+2Ch+arg_4]
lea	edx, [esp+2Ch+var_1C]
lea	ecx, [esp+2Ch+var_10]
push	edx
mov	[esp+30h+var_18], ecx
push	esi
mov	ecx, esi
mov	[esp+34h+var_F], bl
mov	[esp+34h+var_1C], eax
call	sub_6644B0
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 1Ch
retn	10h
sub_665530 endp

align 10h



sub_6657C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 18h
mov	edx, [esp+18h+arg_0]
push	esi
push	edi
mov	edi, [esp+20h+arg_4]
mov	esi, ecx
xor	al, al
lea	ecx, [esp+20h+var_10]
push	ecx
mov	[esp+24h+var_10], al
mov	[esp+24h+var_F], al
mov	eax, [esi]
mov	eax, [eax+14h]
push	edi
push	edx
mov	ecx, esi
call	eax
test	al, al
jz	short loc_665822
mov	cl, [esp+20h+arg_8]
lea	eax, [esp+20h+var_18]
mov	[esp+20h+var_F], cl
lea	ecx, [esi+0Ch]
push	eax
lea	edx, [esp+24h+var_10]
push	ecx
mov	[esp+28h+var_18], edi
mov	[esp+28h+var_14], edx
call	sub_6644B0
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
mov	al, 1
pop	esi
add	esp, 18h
retn	0Ch

loc_665822:
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
xor	al, al
pop	esi
add	esp, 18h
retn	0Ch
sub_6657C0 endp

align 10h



sub_665840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_665854
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_665876

loc_665854:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_66587B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_665876:
call	sub_664860

loc_66587B:
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*8]
lea	edi, [ecx+edx*4+8]
mov	edx, [edi]
mov	ebx, 0FFFFFFFEh
mov	[esp+0Ch+arg_0], edi
cmp	edx, ebx
jnz	short loc_6658C4
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [edi], 0FFFFFFFFh
mov	eax, [ecx]
mov	eax, [eax]
mov	[edi+4], eax
inc	dword ptr [eax+8]
mov	ecx, [ecx+4]
push	ecx
lea	ecx, [edi+8]
call	sub_6638F0
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_6658C4:
push	ebp
mov	ebp, [ecx+4]
mov	esi, eax
lea	ebx, [ebx+0]

loc_6658D0:
inc	esi
and	esi, ebp
lea	edx, [esi+esi*8]
cmp	[ecx+edx*4+8], ebx
jnz	short loc_6658D0
mov	ebx, [edi+4]
mov	ebx, [ebx+0Ch]
add	edi, 4
and	ebx, ebp
lea	edx, [esi+esi*8]
lea	edx, [ecx+edx*4+8]
pop	ebp
cmp	ebx, eax
jnz	short loc_66592B
test	edx, edx
jz	short loc_665913
mov	eax, [esp+0Ch+arg_0]
mov	eax, [eax]
mov	[edx], eax
mov	eax, [edi]
lea	ecx, [edi+4]
push	ecx
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	ecx, [edx+8]
call	sub_6638F0

loc_665913:
mov	edx, [esp+0Ch+arg_4]
push	edx
mov	ecx, edi
call	sub_6621A0
mov	eax, [esp+0Ch+arg_0]
pop	edi
mov	[eax], esi
pop	esi
pop	ebx
retn	0Ch

loc_66592B:
lea	ebx, [ebx+ebx*8]
cmp	[ecx+ebx*4+8], eax
lea	ebx, [ecx+ebx*4+8]
jz	short loc_66594F
jmp	short loc_665940
align 10h

loc_665940:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*8]
cmp	[ecx+ebx*4+8], eax
lea	ebx, [ecx+ebx*4+8]
jnz	short loc_665940

loc_66594F:
test	edx, edx
jz	short loc_66596F
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [edi]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [edi+4]
push	eax
lea	ecx, [edx+8]
call	sub_6638F0

loc_66596F:
mov	ecx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, edi
mov	[ebx], esi
call	sub_6621A0
mov	edx, [esp+0Ch+arg_0]
pop	edi
pop	esi
mov	dword ptr [edx], 0FFFFFFFFh
pop	ebx
retn	0Ch
sub_665840 endp

align 10h



sub_665990 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, ecx
mov	ecx, [ebp+1Ch]
push	esi
push	edi
test	ecx, ecx
jz	loc_665A2A
mov	edi, [esp+0Ch+arg_0]
cmp	byte ptr [edi+4], 6
mov	esi, [esp+0Ch+arg_4]
setnbe	al
mov	byte ptr [esp+0Ch+arg_0], al
mov	edx, [esp+0Ch+arg_0]
push	edx
push	esi
call	sub_664670
test	eax, eax
jz	short loc_665A2A
cmp	byte ptr [edi+4], 6
push	ebx
mov	ebx, [ebp+1Ch]
jbe	short loc_6659D6
push	esi
mov	ecx, ebx
call	sub_664F90
jmp	short loc_6659F3

loc_6659D6:
mov	ecx, [esi]
cmp	dword ptr [ecx+4], 0
mov	[esp+10h+arg_0], esi
jnz	short loc_6659E7
call	sub_651580

loc_6659E7:
lea	eax, [esp+10h+arg_0]
push	eax
mov	ecx, ebx
call	sub_664770

loc_6659F3:
mov	esi, [ebp+1Ch]
mov	eax, [esi]
pop	ebx
test	eax, eax
jz	short loc_665A02
cmp	dword ptr [eax], 0
jnz	short loc_665A22

loc_665A02:
test	esi, esi
jz	short loc_665A1B
mov	ecx, esi
call	sub_6620C0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_665A1B:
mov	dword ptr [ebp+1Ch], 0

loc_665A22:
pop	edi
pop	esi
mov	al, 1
pop	ebp
retn	8

loc_665A2A:
pop	edi
pop	esi
xor	al, al
pop	ebp
retn	8
sub_665990 endp

align 10h



sub_665A40 proc	near
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+1Ch]
xor	ebp, ebp
mov	dword ptr [esi], offset	off_1432704
cmp	edi, ebp
jz	short loc_665A69
mov	ecx, edi
call	sub_688FC0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_665A69:
test	byte ptr [esi+18h], 2
jnz	short loc_665A7B
mov	ecx, [esi+10h]
cmp	ecx, ebp
jz	short loc_665A7B
call	sub_64B3B0

loc_665A7B:
test	byte ptr [esi+18h], 1
mov	[esi+10h], ebp
jnz	short loc_665A90
mov	ecx, [esi+14h]
cmp	ecx, ebp
jz	short loc_665A90
call	sub_64B3B0

loc_665A90:
mov	[esi+14h], ebp
test	byte ptr [esi+0Ch], 2
jnz	short loc_665AA5
mov	ecx, [esi+4]
cmp	ecx, ebp
jz	short loc_665AA5
call	sub_64B3B0

loc_665AA5:
test	byte ptr [esi+0Ch], 1
mov	[esi+4], ebp
jnz	short loc_665ABA
mov	ecx, [esi+8]
cmp	ecx, ebp
jz	short loc_665ABA
call	sub_64B3B0

loc_665ABA:
pop	edi
mov	[esi+8], ebp
pop	esi
pop	ebp
retn
sub_665A40 endp

align 10h



sub_665AD0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	esi
push	edi
mov	edi, ecx
cmp	dword ptr [edi+1Ch], 0
mov	ecx, [esp+18h+arg_8]
jnz	short loc_665B26
test	ecx, ecx
jnz	short loc_665B26
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0Ch
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_665B19
mov	ecx, [esp+18h+arg_4]
push	ecx
mov	ecx, esi
call	sub_664F40
mov	[edi+1Ch], esi
pop	edi
pop	esi
add	esp, 10h
retn	0Ch

loc_665B19:
xor	esi, esi
mov	[edi+1Ch], esi
pop	edi
pop	esi
add	esp, 10h
retn	0Ch

loc_665B26:
mov	edx, [esp+18h+arg_0]
mov	eax, [edx]
mov	esi, [ecx+10h]
push	ebx
lea	ebx, [esp+1Ch+var_10]
push	ebx
add	eax, 140h
add	ecx, 10h
push	eax
push	edx
mov	edx, [esi+2Ch]
mov	[esp+28h+var_10], 0
call	edx
pop	ebx
test	al, al
jz	short loc_665BA0
push	0
lea	ecx, [esp+1Ch+var_10]
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_665B6B
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax

loc_665B6B:
mov	ecx, [edi+1Ch]
mov	edx, [ecx]
mov	eax, [esp+18h+arg_4]
lea	edi, [edx+eax*4]
test	esi, esi
jz	short loc_665B88
mov	ecx, [esi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx

loc_665B88:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_665B93
call	sub_64B3B0

loc_665B93:
mov	[edi], esi
test	esi, esi
jz	short loc_665BA0
mov	ecx, esi
call	sub_64B3B0

loc_665BA0:
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	edi
pop	esi
add	esp, 10h
retn	0Ch
sub_665AD0 endp

align 10h



sub_665BC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_663B00
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
mov	eax, [esp+8+arg_4]
push	eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_665BC0 endp

align 10h



sub_665C20 proc	near

arg_0= byte ptr	 4

sub	ecx, 34h
jmp	sub_665DA0
sub_665C20 endp

align 10h



sub_665C30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_663B70
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_665C30 endp

align 10h



sub_665C90 proc	near
add	ecx, 24h
jmp	sub_665AD0
sub_665C90 endp

align 10h



sub_665CA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_665C30
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_14328E8
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_665CA0 endp

align 10h



sub_665CF0 proc	near
sub	ecx, 10h
jmp	sub_665DA0
sub_665CF0 endp

align 10h



sub_665D00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
push	eax
push	ecx
mov	ecx, esi
call	sub_663B70
mov	dword ptr [esi+34h], offset off_1432704
xor	eax, eax
mov	[esi+40h], al
mov	[esi+38h], eax
mov	[esi+3Ch], eax
mov	[esi+4Ch], al
mov	[esi+44h], eax
mov	[esi+48h], eax
mov	[esi+50h], eax
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [esi+34h], offset off_1439254
mov	eax, esi
pop	esi
retn	8
sub_665D00 endp

align 10h



sub_665D50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_665BC0
lea	edx, [esp+8+arg_4]
push	edx
push	offset off_14328E8
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
mov	byte ptr [esp+18h+arg_4], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_665D50 endp

align 10h



sub_665DA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_665DDA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_665DDA:
mov	eax, esi
pop	esi
retn	4
sub_665DA0 endp




sub_665DE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	eax
mov	esi, ecx
push	edi
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, esi
call	sub_6646C0
mov	eax, [esp+10h+var_8]
test	eax, eax
jz	short loc_665E3C
cmp	dword ptr [eax], 0
jz	short loc_665E3C
mov	ecx, [eax]
mov	eax, [esp+10h+var_4]
cmp	eax, [ecx+4]
jg	short loc_665E3C
mov	edi, [esp+10h+arg_4]
lea	edx, [eax+eax*8]
lea	esi, [ecx+edx*4+10h]
push	edi
mov	ecx, esi
call	sub_67C4C0
add	edi, 0Ch
push	edi
lea	ecx, [esi+0Ch]
call	sub_652520
pop	edi
pop	esi
add	esp, 8
retn	0Ch

loc_665E3C:
mov	ecx, [edi]
mov	eax, [esp+10h+arg_4]
mov	edx, [ecx+0Ch]
mov	[esp+10h+var_4], eax
push	edx
lea	eax, [esp+14h+var_8]
push	eax
push	esi
mov	ecx, esi
mov	[esp+1Ch+var_8], edi
call	sub_665840
pop	edi
pop	esi
add	esp, 8
retn	0Ch
sub_665DE0 endp

align 10h



sub_665E70 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 1Ch
mov	eax, [esp+1Ch+arg_8]
push	ebx
push	esi
xor	ebx, ebx
push	edi
mov	esi, ecx
push	eax
lea	ecx, [esp+2Ch+var_1C]
mov	[esp+2Ch+var_14], bl
mov	[esp+2Ch+var_1C], ebx
mov	[esp+2Ch+var_18], ebx
mov	[esp+2Ch+var_10], bl
call	sub_67C4C0
mov	ecx, [esp+28h+arg_C]
push	ecx
lea	ecx, [esp+2Ch+var_10]
call	sub_652520
mov	edi, [esp+28h+arg_0]
cmp	[esi+1Ch], ebx
jnz	short loc_665ECE
mov	edx, [edi]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	4
call	edx
cmp	eax, ebx
jz	short loc_665EC9
mov	[eax], ebx
jmp	short loc_665ECB

loc_665EC9:
xor	eax, eax

loc_665ECB:
mov	[esi+1Ch], eax

loc_665ECE:
cmp	byte ptr [edi+4], 6
lea	edx, [esp+28h+var_1C]
setnbe	al
movzx	ecx, al
mov	eax, [esp+28h+arg_4]
push	ecx
mov	ecx, [esi+1Ch]
push	edx
push	eax
call	sub_665DE0
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	[esp+28h+var_14], 2
jnz	short loc_665F08
mov	ecx, [esp+28h+var_1C]
cmp	ecx, ebx
jz	short loc_665F08
call	sub_64B3B0

loc_665F08:
test	[esp+28h+var_14], 1
mov	[esp+28h+var_1C], ebx
jnz	short loc_665F20
mov	ecx, [esp+28h+var_18]
cmp	ecx, ebx
jz	short loc_665F20
call	sub_64B3B0

loc_665F20:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 1Ch
retn	10h
sub_665E70 endp

align 10h



sub_665F30 proc	near
mov	eax, [ecx]
test	eax, eax
jz	short locret_665F43
mov	ecx, [ecx+4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
mov	ecx, eax
call	edx

locret_665F43:
retn
sub_665F30 endp

align 10h



sub_665F50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
cmp	dword ptr [ecx], 0
push	esi
jnz	short loc_665FA8
mov	ecx, [ecx+4]
mov	eax, [ecx]
mov	eax, [eax+4]
push	ebx
lea	edx, [esp+10h+var_8]
push	edx
call	eax
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_665F88
mov	edx, [esp+10h+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_665F88
mov	esi, [ecx]
push	edx
mov	edx, [eax+4]
mov	eax, [esi+14h]
push	edx
call	eax
mov	bl, al
jmp	short loc_665F8A

loc_665F88:
xor	bl, bl

loc_665F8A:
mov	ecx, [esp+10h+var_8]
test	ecx, ecx
jz	short loc_665F9E
mov	edx, [ecx]
mov	eax, [esp+10h+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_665F9E:
mov	al, bl
pop	ebx
pop	esi
add	esp, 8
retn	4

loc_665FA8:
mov	eax, [ecx+4]
mov	ecx, [eax+14h]
add	eax, 14h
test	ecx, ecx
jz	short loc_665FD1
mov	edx, [esp+0Ch+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_665FD1
mov	esi, [ecx]
mov	eax, [eax+4]
push	edx
mov	edx, [esi+14h]
push	eax
call	edx
pop	esi
add	esp, 8
retn	4

loc_665FD1:
xor	al, al
pop	esi
add	esp, 8
retn	4
sub_665F50 endp

align 10h



sub_665FE0 proc	near
mov	eax, [ecx+1Ch]
and	eax, 0FFFFFFFCh
add	eax, 8
retn
sub_665FE0 endp

align 10h



sub_665FF0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679AD0
mov	ecx, eax
mov	eax, [esi+8]
xor	eax, ecx
pop	esi
retn
sub_665FF0 endp

align 10h



sub_666020 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_66603B
mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
mov	ecx, edi
call	edx

loc_66603B:
mov	[esi], edi
pop	edi
mov	[esi+4], ebx
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_666020 endp

align 10h



sub_666050 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_666069
mov	eax, [ecx]
mov	edx, [esi+4]
mov	eax, [eax+4]
push	edx
call	eax

loc_666069:
mov	ecx, [esi]
mov	[edi], ecx
mov	edx, [esi+4]
mov	[edi+4], edx
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_666050 endp

align 10h



sub_666080 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_666099
mov	eax, [ecx]
mov	edx, [edi+4]
mov	eax, [eax+4]
push	edx
call	eax

loc_666099:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6660AA
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+8]
push	eax
call	edx

loc_6660AA:
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
pop	edi
mov	[esi+4], ecx
mov	eax, esi
pop	esi
retn	4
sub_666080 endp

align 10h



sub_6660C0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
retn	4
sub_6660C0 endp

align 10h



sub_6660E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	ebx, ecx
mov	ecx, [ebx]
mov	eax, ebp
shl	eax, 4
cmp	dword ptr [eax+ecx+8], 0FFFFFFFEh
push	esi
lea	esi, [eax+ecx+8]
push	edi
mov	edi, ebp
jz	short loc_666136
cmp	[esi+4], ebp
jnz	short loc_666136

loc_666103:
cmp	[esi+4], ebp
jnz	short loc_666119
mov	edx, [esp+10h+arg_0]
push	edx
lea	ecx, [esi+8]
call	sub_665F50
test	al, al
jnz	short loc_66612D

loc_666119:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_666136
mov	ecx, [ebx]
mov	eax, edi
shl	eax, 4
lea	esi, [eax+ecx+8]
jmp	short loc_666103

loc_66612D:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_666136:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_6660E0 endp




sub_666140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
mov	edi, [ecx]
cmp	dword ptr [edi+esi*8+8], 0FFFFFFFEh
lea	ecx, [edi+esi*8+8]
mov	eax, esi
jz	short loc_666196
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	ebp, edx
shr	ebp, 6
xor	ebp, edx
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_666196
lea	ebx, [ebx+0]

loc_666170:
mov	edx, [ecx+4]
mov	ebp, edx
shr	ebp, 6
xor	ebp, edx
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_666189
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_666199

loc_666189:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_666196
lea	ecx, [edi+eax*8+8]
jmp	short loc_666170

loc_666196:
or	eax, 0FFFFFFFFh

loc_666199:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_666140 endp




sub_6661A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_6661E2
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_6661B1:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_6661C4
mov	dword ptr [eax], 0FFFFFFFEh

loc_6661C4:
add	ecx, 10h
sub	edx, 1
jnz	short loc_6661B1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_6661E2:
pop	esi
retn
sub_6661A0 endp

align 10h



sub_6661F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	ebx
xor	ebx, ebx
push	esi
mov	[esp+10h+var_8], ebx
push	edi
cmp	[eax], ebx
jnz	short loc_66621C
mov	ecx, [eax+4]
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+14h+var_8]
push	edx
mov	ebx, 1
call	eax
mov	esi, eax
jmp	short loc_666222

loc_66621C:
mov	esi, [eax+4]
add	esi, 14h

loc_666222:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_666233
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+4]
push	eax
call	edx

loc_666233:
mov	edi, [esi]
mov	esi, [esi+4]
test	bl, 1
jz	short loc_666251
mov	ecx, [esp+14h+var_8]
test	ecx, ecx
jz	short loc_666251
mov	eax, [ecx]
mov	edx, [esp+14h+var_4]
mov	eax, [eax+8]
push	edx
call	eax

loc_666251:
test	edi, edi
jz	short loc_666276
mov	edx, [edi]
mov	eax, [edx+10h]
push	esi
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	ebx, eax
mov	eax, [edx+8]
push	esi
mov	ecx, edi
call	eax
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 8
retn	4

loc_666276:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
add	esp, 8
retn	4
sub_6661F0 endp

align 10h



sub_666290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebp
mov	ebp, ecx
cmp	dword ptr [ebp+0], 0
jz	loc_66636B
mov	eax, [esp+8+arg_0]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6662B5
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+10h]
push	eax
call	edx
jmp	short loc_6662B7

loc_6662B5:
xor	eax, eax

loc_6662B7:
mov	ecx, [ebp+0]
push	esi
push	edi
mov	edi, [ecx+4]
and	edi, eax
mov	eax, edi
shl	eax, 4
cmp	dword ptr [eax+ecx+8], 0FFFFFFFEh
lea	esi, [eax+ecx+8]
jz	loc_666369
cmp	[esi+4], edi
jnz	loc_666369
push	ebx
mov	[esp+14h+var_4], edi
or	ebx, 0FFFFFFFFh

loc_6662E6:
mov	ecx, [esp+14h+var_4]
cmp	[esi+4], ecx
jnz	short loc_666300
mov	edx, [esp+14h+arg_0]
push	edx
lea	ecx, [esi+8]
call	sub_665F50
test	al, al
jnz	short loc_666317

loc_666300:
mov	ebx, edi
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_666368
mov	ecx, [ebp+0]
mov	eax, edi
shl	eax, 4
lea	esi, [eax+ecx+8]
jmp	short loc_6662E6

loc_666317:
cmp	[esp+14h+var_4], edi
jnz	short loc_666351
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_66635D
mov	edx, [ebp+0]
shl	eax, 4
lea	edi, [eax+edx+8]
push	edi
mov	ecx, esi
mov	dword ptr [esi], 0FFFFFFFEh
call	sub_6660C0
pop	ebx
mov	esi, edi
mov	dword ptr [esi], 0FFFFFFFEh
mov	eax, [ebp+0]
dec	dword ptr [eax]
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	4

loc_666351:
mov	eax, [ebp+0]
mov	ecx, [esi]
shl	ebx, 4
mov	[ebx+eax+8], ecx

loc_66635D:
mov	dword ptr [esi], 0FFFFFFFEh
mov	eax, [ebp+0]
dec	dword ptr [eax]

loc_666368:
pop	ebx

loc_666369:
pop	edi
pop	esi

loc_66636B:
pop	ebp
pop	ecx
retn	4
sub_666290 endp




sub_666370 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	edi
mov	edi, [ecx]
mov	[esp+10h+var_4], ecx
test	edi, edi
jz	loc_66642A
mov	eax, [esp+10h+arg_0]
push	ebx
mov	ebx, [edi+4]
push	ebp
mov	ebp, [eax]
mov	edx, ebp
shr	edx, 6
xor	edx, ebp
and	edx, ebx
cmp	dword ptr [edi+edx*8+8], 0FFFFFFFEh
lea	eax, [edi+edx*8+8]
jz	loc_666428
push	esi
mov	esi, [eax+4]
mov	ecx, esi
shr	ecx, 6
xor	ecx, esi
and	ecx, ebx
cmp	ecx, edx
jnz	short loc_666427
mov	[esp+1Ch+var_C], edx
mov	[esp+1Ch+arg_0], 0FFFFFFFFh

loc_6663C2:
mov	esi, [eax+4]
mov	ecx, esi
shr	ecx, 6
xor	ecx, esi
and	ecx, ebx
mov	esi, ecx
mov	ecx, [esp+1Ch+var_C]
cmp	esi, ecx
jnz	short loc_6663DD
cmp	[eax+4], ebp
jz	short loc_6663EE

loc_6663DD:
mov	[esp+1Ch+arg_0], edx
mov	edx, [eax]
cmp	edx, 0FFFFFFFFh
jz	short loc_666427
lea	eax, [edi+edx*8+8]
jmp	short loc_6663C2

loc_6663EE:
cmp	ecx, edx
mov	edx, [eax]
jnz	short loc_666411
cmp	edx, 0FFFFFFFFh
jz	short loc_666419
lea	edx, [edi+edx*8+8]
mov	dword ptr [eax], 0FFFFFFFEh
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	eax, edx
jmp	short loc_666419

loc_666411:
mov	ecx, [esp+1Ch+arg_0]
mov	[edi+ecx*8+8], edx

loc_666419:
mov	edx, [esp+1Ch+var_4]
mov	dword ptr [eax], 0FFFFFFFEh
mov	eax, [edx]
dec	dword ptr [eax]

loc_666427:
pop	esi

loc_666428:
pop	ebp
pop	ebx

loc_66642A:
pop	edi
add	esp, 0Ch
retn	4
sub_666370 endp

align 10h



sub_666440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_666453
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_666475

loc_666453:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_66647A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_666475:
call	sub_6669B0

loc_66647A:
mov	eax, [esi]
inc	dword ptr [eax]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
mov	edx, [esi]
mov	eax, ecx
shl	eax, 4
mov	ebp, [eax+edx+8]
lea	eax, [eax+edx+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_6664B6
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	[eax+8], esi
mov	edx, [edx+4]
pop	esi
mov	[eax+0Ch], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_6664B6:
push	edi
mov	edi, [edx+4]
mov	esi, ecx
push	ebx
lea	ecx, [ecx+0]

loc_6664C0:
inc	esi
and	esi, edi
mov	ebx, esi
shl	ebx, 4
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
jnz	short loc_6664C0
mov	ebx, [eax+4]
mov	edi, esi
shl	edi, 4
lea	edi, [edi+edx+8]
cmp	ebx, ecx
jnz	short loc_666512
test	edi, edi
jz	short loc_6664F7
mov	[edi], ebp
mov	edx, [eax+4]
mov	[edi+4], edx
mov	edx, [eax+8]
mov	[edi+8], edx
mov	edx, [eax+0Ch]
mov	[edi+0Ch], edx

loc_6664F7:
mov	edx, [esp+10h+arg_4]
mov	edi, [edx]
pop	ebx
mov	[eax+8], edi
mov	edx, [edx+4]
pop	edi
mov	[eax], esi
pop	esi
mov	[eax+0Ch], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_666512:
shl	ebx, 4
cmp	[ebx+edx+8], ecx
lea	ebx, [ebx+edx+8]
jz	short loc_66652F
nop

loc_666520:
mov	ebx, [ebx]
shl	ebx, 4
cmp	[ebx+edx+8], ecx
lea	ebx, [ebx+edx+8]
jnz	short loc_666520

loc_66652F:
test	edi, edi
jz	short loc_666547
mov	[edi], ebp
mov	edx, [eax+4]
mov	[edi+4], edx
mov	edx, [eax+8]
mov	[edi+8], edx
mov	edx, [eax+0Ch]
mov	[edi+0Ch], edx

loc_666547:
mov	edx, [esp+10h+arg_4]
mov	[ebx], esi
mov	esi, [edx]
pop	ebx
pop	edi
mov	[eax+8], esi
mov	edx, [edx+4]
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+0Ch], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_666440 endp

align 10h



sub_666570 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_666583
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6665A5

loc_666583:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6665AA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6665A5:
call	sub_666850

loc_6665AA:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, [eax+ecx*8+8]
mov	edi, 0FFFFFFFEh
cmp	edx, edi
jnz	short loc_6665DB
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
mov	edx, [edx]
pop	edi
mov	[eax+ecx*8+0Ch], edx
pop	esi
retn	0Ch

loc_6665DB:
mov	esi, [eax+4]
mov	edx, ecx

loc_6665E0:
inc	edx
and	edx, esi
cmp	[eax+edx*8+8], edi
jnz	short loc_6665E0
mov	edi, [eax+ecx*8+0Ch]
push	ebx
push	ebp
mov	ebp, edi
shr	ebp, 6
xor	ebp, edi
and	ebp, esi
lea	ebx, [eax+edx*8+8]
cmp	ebp, ecx
jnz	short loc_666626
test	ebx, ebx
jz	short loc_666611
mov	esi, [eax+ecx*8+8]
mov	[ebx], esi
mov	esi, [eax+ecx*8+0Ch]
mov	[ebx+4], esi

loc_666611:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebp
pop	ebx
pop	edi
mov	[eax+ecx*8+0Ch], esi
mov	[eax+ecx*8+8], edx
pop	esi
retn	0Ch

loc_666626:
mov	ebp, edi
shr	ebp, 6
xor	ebp, edi
and	ebp, esi
cmp	[eax+ebp*8+8], ecx
lea	esi, [eax+ebp*8+8]
jz	short loc_66664C
lea	esp, [esp+0]

loc_666640:
mov	esi, [esi]
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jnz	short loc_666640

loc_66664C:
test	ebx, ebx
jz	short loc_66665D
mov	edi, [eax+ecx*8+8]
mov	[ebx], edi
mov	edi, [eax+ecx*8+0Ch]
mov	[ebx+4], edi

loc_66665D:
mov	[esi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebp
pop	ebx
pop	edi
mov	[eax+ecx*8+0Ch], edx
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_666570 endp

align 10h



sub_666680 proc	near
push	ebx
push	esi
mov	esi, [ecx+4]
push	edi
lea	edi, [ecx+4]
test	esi, esi
jz	short loc_6666A5
mov	ebx, ds:InterlockedCompareExchange

loc_666693:		; Comperand
push	esi
lea	eax, [esi+1]
push	eax		; Exchange
push	edi		; Destination
call	ebx ; InterlockedCompareExchange
cmp	eax, esi
jz	short loc_6666AB
mov	esi, [edi]
test	esi, esi
jnz	short loc_666693

loc_6666A5:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn

loc_6666AB:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn
sub_666680 endp

align 10h



sub_6666C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
cmp	eax, 1
jnz	short loc_6666DD
push	eax		; Value
mov	eax, [esi+4]
add	eax, 4
push	eax		; Addend
call	ds:InterlockedExchangeAdd
mov	eax, [esi+4]
pop	esi
retn

loc_6666DD:
cmp	eax, 4
jnz	short loc_6666E6
xor	eax, eax
pop	esi
retn

loc_6666E6:
push	ebp
push	edi
mov	edi, [esi+4]
push	0FFFFFFFFh
lea	ecx, [edi+20h]
call	sub_6A1740
mov	ecx, [edi+10h]
mov	ebp, ds:InterlockedExchangeAdd
test	ecx, ecx
jz	short loc_66670D
mov	eax, [edi+10h]
push	1		; Value
add	eax, 4
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd

loc_66670D:
push	ebx
mov	ebx, [edi+10h]
test	ebx, ebx
jz	short loc_666734
push	1		; Value
lea	edx, [ebx+4]
push	edx		; Addend
mov	dword ptr [esi], 1
mov	[esi+4], ebx
call	ebp ; InterlockedExchangeAdd
mov	ecx, edi
call	sub_64A430
mov	eax, ebx
pop	ebx
pop	edi
pop	ebp
pop	esi
retn

loc_666734:
pop	ebx
pop	edi
pop	ebp
mov	dword ptr [esi], 4
xor	eax, eax
pop	esi
retn
sub_6666C0 endp

align 10h



sub_666750 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
lea	ecx, [esi+10h]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1432B1C
call	sub_679E30
mov	dword ptr [esi+8], 1
mov	dword ptr [esi+0Ch], 0
mov	eax, esi
pop	esi
retn
sub_666750 endp




sub_666780 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+10h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6667A9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6667A9:
mov	ecx, edi
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_6667C5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6667C5:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_666780 endp

align 10h



sub_6667D0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
lea	eax, [edi+10h]
mov	dword ptr [esi], offset	off_155F500
push	eax
lea	ecx, [esi+10h]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1432B1C
call	sub_67AF90
mov	ecx, [edi+8]
mov	[esi+8], ecx
mov	edx, [edi+0Ch]
pop	edi
mov	[esi+0Ch], edx
mov	eax, esi
pop	esi
retn	4
sub_6667D0 endp

align 10h



sub_666810 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
xor	edx, edx
cmp	eax, edx
jnz	short loc_666824
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	[eax+4], edx
retn	4

loc_666824:
push	esi
mov	esi, [eax+4]
add	eax, 8
jmp	short loc_666830
align 10h

loc_666830:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_66683D
inc	edx
add	eax, 8
cmp	edx, esi
jbe	short loc_666830

loc_66683D:
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	esi
mov	[eax+4], edx
retn	4
sub_666810 endp

align 10h



sub_666850 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_66686E
call	sub_716800
pop	edi
add	esp, 0Ch
retn	8

loc_66686E:
push	esi
cmp	eax, 8
jnb	short loc_66687B
mov	esi, 8
jmp	short loc_6668E0

loc_66687B:
dec	eax
mov	[esp+14h+arg_4], eax
fild	[esp+14h+arg_4]
test	eax, eax
jge	short loc_66688E
fadd	ds:flt_15FCC08

loc_66688E:
call	__CIlog
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fnstcw	word ptr [esp+14h+arg_4]
movzx	eax, word ptr [esp+14h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+14h+var_8], eax
fldcw	word ptr [esp+14h+var_8]
fistp	[esp+14h+var_8]
mov	cl, byte ptr [esp+14h+var_8]
shl	esi, cl
fldcw	word ptr [esp+14h+arg_4]

loc_6668E0:
mov	ecx, dword_1855FC0
lea	edx, [esp+14h+var_8]
push	edx
mov	[esp+18h+arg_4], 0
mov	dword ptr [esp+18h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, ds:8[esi*8]
push	edx
call	eax
mov	[esp+14h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+14h+arg_4]
lea	ecx, [esi-1]
xor	eax, eax
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_666941
jmp	short loc_666930
align 10h

loc_666930:
mov	ecx, [esp+14h+arg_4]
mov	dword ptr [ecx+eax*8+8], 0FFFFFFFEh
inc	eax
cmp	eax, esi
jb	short loc_666930

loc_666941:
mov	eax, [edi]
test	eax, eax
jz	short loc_6669A1
push	ebx
mov	ebx, [esp+18h+arg_0]
push	ebp
mov	ebp, [eax+4]
xor	edi, edi

loc_666952:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [eax+edi*8+8], 0FFFFFFFEh
lea	esi, [eax+edi*8+8]
jz	short loc_666982
mov	ecx, [esi+4]
lea	eax, [esi+4]
mov	edx, ecx
shr	edx, 6
xor	edx, ecx
push	edx
push	eax
push	ebx
lea	ecx, [esp+28h+arg_4]
call	sub_666570
mov	dword ptr [esi], 0FFFFFFFEh

loc_666982:
inc	edi
cmp	edi, ebp
jbe	short loc_666952
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp
pop	ebx

loc_6669A1:
mov	ecx, [esp+14h+arg_4]
pop	esi
mov	[edi], ecx
pop	edi
add	esp, 0Ch
retn	8
sub_666850 endp

align 10h



sub_6669B0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_4], edi
cmp	eax, ebx
jnz	short loc_6669D2
call	sub_6661A0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_6669D2:
push	esi
cmp	eax, 8
jnb	short loc_6669DF
mov	esi, 8
jmp	short loc_666A44

loc_6669DF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6669F2
fadd	ds:flt_15FCC08

loc_6669F2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_666A44:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
mov	edx, esi
shl	edx, 4
mov	[esp+1Ch+arg_4], ebx
mov	dword ptr [esp+1Ch+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
add	edx, 8
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_666A95
xor	eax, eax

loc_666A81:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_666A81

loc_666A95:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_666AEF
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]

loc_666AA2:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	esi, [ebx+edx+8]
jz	short loc_666AD6
lea	edi, [esi+8]
push	edi
lea	ecx, [esp+20h+arg_4]
call	sub_6661F0
push	eax
mov	eax, [esp+20h+arg_0]
push	edi
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_666440
mov	edi, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_666AD6:
add	ebx, 10h
sub	ebp, 1
jnz	short loc_666AA2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebp

loc_666AEF:
mov	eax, [esp+18h+arg_4]
pop	esi
mov	[edi], eax
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_6669B0 endp

align 10h



sub_666B00 proc	near
push	esi
mov	esi, ecx
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_666B34
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_666B2A
mov	edx, [ecx]
mov	eax, [edx+4]
push	esi
call	eax
mov	dword ptr [esi+8], 0

loc_666B2A:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_666B34:
pop	esi
retn
sub_666B00 endp

align 10h



sub_666B40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1432B20
xor	ebx, ebx
mov	[esi+8], ebx
push	edi
lea	ecx, [esi+1Ch]
mov	[esi+14h], ebx
mov	[esi+18h], ebx
call	sub_679E30
push	ebx
push	ebx
lea	ecx, [esi+20h]
call	sub_6A1D20
mov	edi, [esp+0Ch+arg_0]
cmp	edi, ebx
jz	short loc_666B84
mov	ecx, edi
call	sub_64A420

loc_666B84:
mov	ecx, [esi+8]
cmp	ecx, ebx
jz	short loc_666B90
call	sub_64A430

loc_666B90:
mov	[esi+8], edi
mov	edi, [esp+0Ch+arg_4]
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	ecx, [edi]
cmp	ecx, ebx
jz	short loc_666BAE
mov	eax, [ecx]
mov	edx, [edi+4]
mov	eax, [eax+4]
push	edx
call	eax

loc_666BAE:
mov	ecx, [esi+14h]
cmp	ecx, ebx
jz	short loc_666BC0
mov	edx, [ecx]
mov	eax, [esi+18h]
mov	edx, [edx+8]
push	eax
call	edx

loc_666BC0:
mov	eax, [edi]
mov	[esi+14h], eax
mov	ecx, [edi+4]
pop	edi
mov	[esi+18h], ecx
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_666B40 endp

align 10h



sub_666BE0 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebx, [esi+8]
push	edi
add	ebx, 0Ch
push	ebx		; lpCriticalSection
mov	dword ptr [esi], offset	off_1432B20
call	ds:EnterCriticalSection
mov	eax, [esi+0Ch]
mov	ebp, ds:InterlockedExchangeAdd
test	eax, eax
jnz	short loc_666C17
lea	ecx, [esi+14h]
push	ecx
mov	ecx, [esi+8]
add	ecx, 24h
call	sub_666290
jmp	short loc_666C4E

loc_666C17:
mov	edx, [esi+10h]
test	edx, edx
jz	short loc_666C4E
mov	edi, [esi+10h]
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_666C4E
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_666C44
mov	edx, [ecx]
mov	eax, [edx+4]
push	edi
call	eax
mov	dword ptr [edi+8], 0

loc_666C44:
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_666C4E:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
lea	ecx, [esi+20h]
call	sub_6A1D80
mov	edi, [esi+1Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_666C7E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_666C7E:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_666C90
mov	edx, [ecx]
mov	eax, [esi+18h]
mov	edx, [edx+8]
push	eax
call	edx

loc_666C90:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_666C9C
call	sub_64A430

loc_666C9C:
pop	edi
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
jmp	sub_64A3F0
sub_666BE0 endp

align 10h



sub_666CB0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebx, [esi+8]
push	edi
add	ebx, 0Ch
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	edi, [esp+10h+arg_0]
push	1		; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
mov	[esi+10h], edi
mov	edi, [esi+8]
add	edi, 24h
mov	dword ptr [esi+0Ch], 1
cmp	dword ptr [edi], 0
lea	ebp, [esi+14h]
jz	short loc_666D38
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_666CFF
mov	edx, [ecx]
mov	eax, [ebp+4]
mov	edx, [edx+10h]
push	eax
call	edx
jmp	short loc_666D01

loc_666CFF:
xor	eax, eax

loc_666D01:
mov	ecx, [edi]
mov	ecx, [ecx+4]
and	ecx, eax
push	ecx
push	ebp
mov	ecx, edi
call	sub_6660E0
test	eax, eax
jl	short loc_666D38
inc	eax
shl	eax, 4
add	eax, [edi]
jz	short loc_666D38
mov	ecx, [esp+10h+arg_0]
mov	[eax+4], ecx
mov	dword ptr [eax], 0
mov	edx, [esi+8]
mov	[ecx+8], edx
lea	ecx, [esi+20h]
call	sub_6A2000

loc_666D38:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_666CB0 endp

align 10h



sub_666D50 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+8]
add	edi, 0Ch
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esp+8+arg_0]
push	eax
lea	ecx, [esi+1Ch]
mov	dword ptr [esi+0Ch], 2
call	sub_67A2C0
lea	ecx, [esi+14h]
push	ecx
mov	ecx, [esi+8]
add	ecx, 24h
call	sub_666290
lea	ecx, [esi+20h]
call	sub_6A2000
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_666D50 endp

align 10h



sub_666DA0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
push	edi
lea	ebx, [esi+0Ch]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
cmp	dword ptr [esi+24h], 0
lea	edi, [esi+24h]
jz	short loc_666E12
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_666DCF
mov	eax, [ecx]
mov	edx, [esi+4]
mov	eax, [eax+10h]
push	edx
call	eax
jmp	short loc_666DD1

loc_666DCF:
xor	eax, eax

loc_666DD1:
mov	ecx, [edi]
mov	ecx, [ecx+4]
and	ecx, eax
push	ecx
push	esi
mov	ecx, edi
call	sub_6660E0
test	eax, eax
jl	short loc_666E12
lea	esi, [eax+1]
shl	esi, 4
add	esi, [edi]
jz	short loc_666E12
cmp	dword ptr [esi], 0
jnz	short loc_666E12
mov	ecx, [esi+4]
call	sub_666680
test	al, al
jz	short loc_666E12
mov	esi, [esi+4]
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_666E12:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_666DA0 endp

align 10h



sub_666E30 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+0Ch]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	esi, [esi+8]
test	esi, esi
jz	short loc_666E87
lea	eax, [esp+8+arg_0]
push	eax
lea	ecx, [esi+0Ch]
call	sub_666370
mov	esi, [esp+8+arg_0]
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_666E87
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_666E7D
mov	edx, [ecx]
mov	eax, [edx+4]
push	esi
call	eax
mov	dword ptr [esi+8], 0

loc_666E7D:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_666E87:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_666E30 endp

align 10h



sub_666EA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+0Ch]
push	edi		; lpCriticalSection
mov	[esp+1Ch+var_10], esi
mov	[esp+1Ch+var_C], edi
call	ds:EnterCriticalSection
mov	eax, [esi+8]
test	eax, eax
jz	loc_666F58
push	ebx
push	ebp
lea	ecx, [esp+20h+var_8]
push	ecx
lea	ecx, [eax+0Ch]
call	sub_666810
mov	ebx, [esp+20h+var_8]
mov	ebp, ds:InterlockedExchangeAdd
mov	esi, [esp+20h+var_4]

loc_666EE1:
test	ebx, ebx
jz	short loc_666F43
cmp	dword ptr [ebx], 0
jz	short loc_666F43
mov	eax, [ebx]
cmp	esi, [eax+4]
jg	short loc_666F43
mov	edi, [eax+esi*8+0Ch]
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_666F22
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_666F18
mov	eax, [ecx]
mov	edx, [eax+4]
push	edi
call	edx
mov	dword ptr [edi+8], 0

loc_666F18:
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_666F22:
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_666EE1
inc	esi
cmp	esi, eax
ja	short loc_666EE1
lea	ecx, [ecx+esi*8+8]

loc_666F34:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_666EE1
inc	esi
add	ecx, 8
cmp	esi, eax
jbe	short loc_666F34
jmp	short loc_666EE1

loc_666F43:
mov	eax, [esp+20h+var_10]
mov	ecx, [eax+8]
add	ecx, 0Ch
call	sub_716800
mov	edi, [esp+20h+var_C]
pop	ebp
pop	ebx

loc_666F58:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
pop	esi
add	esp, 10h
retn
sub_666EA0 endp

align 10h



sub_666F70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+0Ch]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ebx, [esp+18h+arg_0]
mov	eax, [ebx]
mov	edx, [eax+4]
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, ebx
call	edx
add	esi, 24h
cmp	dword ptr [esi], 0
mov	edi, eax
jz	short loc_666FD2
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_666FB2
mov	eax, [ecx]
mov	edx, [edi+4]
mov	eax, [eax+10h]
push	edx
call	eax
jmp	short loc_666FB4

loc_666FB2:
xor	eax, eax

loc_666FB4:
mov	ecx, [esi]
mov	ecx, [ecx+4]
and	ecx, eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6660E0
test	eax, eax
jl	short loc_666FD2
lea	edi, [eax+1]
shl	edi, 4
add	edi, [esi]
jmp	short loc_666FD4

loc_666FD2:
xor	edi, edi

loc_666FD4:
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_666FE8
mov	edx, [ecx]
mov	eax, [esp+18h+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_666FE8:
test	edi, edi
jz	short loc_667020
cmp	dword ptr [edi], 0
jnz	short loc_667020
cmp	[edi+4], ebx
jnz	short loc_667020
mov	eax, [ebx]
mov	edx, [eax+4]
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, ebx
call	edx
push	eax
mov	ecx, esi
call	sub_666290
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_667020
mov	eax, [ecx]
mov	edx, [esp+18h+var_4]
mov	eax, [eax+8]
push	edx
call	eax

loc_667020:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_666F70 endp

align 10h



sub_667040 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_666BE0
test	[esp+4+arg_0], 1
jz	short loc_66705D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_66705D:
mov	eax, esi
pop	esi
retn	4
sub_667040 endp

align 10h



sub_667070 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_155F500
xor	ebx, ebx
push	ebx		; int
lea	ecx, [esi+0Ch]	; lpCriticalSection
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1432B3C
call	sub_64D6D0
mov	eax, [esp+2Ch+arg_0]
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+8], eax
cmp	eax, ebx
jz	short loc_6670B3
cmp	[eax+10h], bl
jz	short loc_6670B3
mov	eax, 1000h
jmp	short loc_6670B5

loc_6670B3:
xor	eax, eax

loc_6670B5:
mov	ecx, dword_1855FC0
or	eax, 4
mov	[esp+2Ch+var_20], eax
lea	edx, [esp+2Ch+var_20]
mov	[esp+2Ch+var_4], ebx
mov	[esp+2Ch+var_1C], 40h
mov	[esp+2Ch+var_18], 1000h
mov	[esp+2Ch+var_14], ebx
mov	[esp+2Ch+var_10], 0FFFFFFFFh
mov	[esp+2Ch+var_C], ebx
mov	[esp+2Ch+var_8], 7
mov	eax, [ecx]
mov	eax, [eax+10h]
push	edx
push	offset a_resourcelib_i ; "_ResourceLib_Images"
call	eax
mov	ecx, [esi+28h]
mov	edi, eax
cmp	ecx, ebx
jz	short loc_66710F
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_66710F:
mov	[esi+28h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 20h
retn	4
sub_667070 endp

align 10h



sub_667120 proc	near
push	ebx
mov	ebx, ecx
push	edi
lea	eax, [ebx+0Ch]
push	eax		; lpCriticalSection
mov	dword ptr [ebx], offset	off_1432B3C
call	ds:EnterCriticalSection
mov	ecx, [ebx+24h]
lea	edi, [ebx+24h]
test	ecx, ecx
jnz	short loc_667142
xor	eax, eax
jmp	short loc_66715F

loc_667142:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_667150:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66715D
inc	eax
add	ecx, 10h
cmp	eax, edx
jbe	short loc_667150

loc_66715D:
mov	ecx, edi

loc_66715F:
push	ebp
push	esi
mov	esi, ecx

loc_667163:
test	esi, esi
jz	short loc_6671AF
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6671AF
cmp	eax, [ecx+4]
jg	short loc_6671AF
mov	edx, eax
shl	edx, 4
mov	ecx, [edx+ecx+14h]
mov	dword ptr [ecx+8], 0
mov	edx, [esi]
mov	ecx, [edx+4]
cmp	eax, ecx
jg	short loc_667163
inc	eax
cmp	eax, ecx
ja	short loc_667163
mov	ebp, eax
shl	ebp, 4
lea	edx, [edx+ebp+8]
lea	esp, [esp+0]

loc_6671A0:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_667163
inc	eax
add	edx, 10h
cmp	eax, ecx
jbe	short loc_6671A0
jmp	short loc_667163

loc_6671AF:
lea	eax, [ebx+0Ch]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
mov	ecx, [ebx+28h]
pop	esi
pop	ebp
test	ecx, ecx
jz	short loc_6671C9
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_6671C9:
mov	eax, [edi]
test	eax, eax
jz	short loc_667211
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]
jmp	short loc_6671E0
align 10h

loc_6671E0:
mov	eax, [edi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_6671F3
mov	dword ptr [eax], 0FFFFFFFEh

loc_6671F3:
add	ecx, 10h
sub	edx, 1
jnz	short loc_6671E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [edi], 0

loc_667211:		; lpCriticalSection
lea	ecx, [ebx+0Ch]
call	sub_64D730
pop	edi
mov	ecx, ebx
pop	ebx
jmp	sub_64A3F0
sub_667120 endp

align 10h



sub_667230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+0Ch]
push	ebp		; lpCriticalSection
mov	[esp+1Ch+var_8], esi
call	ds:EnterCriticalSection
cmp	dword ptr [esi+24h], 0
mov	ebx, [esp+18h+arg_4]
lea	edi, [esi+24h]
jz	short loc_6672CA
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_667267
mov	eax, [ecx]
mov	edx, [ebx+4]
mov	eax, [eax+10h]
push	edx
call	eax
jmp	short loc_667269

loc_667267:
xor	eax, eax

loc_667269:
mov	ecx, [edi]
mov	ecx, [ecx+4]
and	ecx, eax
push	ecx
push	ebx
mov	ecx, edi
call	sub_6660E0
test	eax, eax
jl	short loc_6672CA
lea	esi, [eax+1]
shl	esi, 4
add	esi, [edi]
jz	short loc_6672C6
cmp	dword ptr [esi], 0
jnz	short loc_667304
mov	ecx, [esi+4]
call	sub_666680
test	al, al
jz	short loc_6672BE
mov	edx, [esi+4]
mov	eax, [esp+18h+arg_0]
push	ebp		; lpCriticalSection
mov	[eax+4], edx
mov	dword ptr [eax], 1
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
add	esp, 8
retn	8

loc_6672BE:
push	ebx
mov	ecx, edi
call	sub_666290

loc_6672C6:
mov	esi, [esp+18h+var_8]

loc_6672CA:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	4Ch
call	eax
test	eax, eax
jz	short loc_6672EE
push	ebx
push	esi
mov	ecx, eax
call	sub_666B40
mov	esi, eax
test	esi, esi
jnz	short loc_667330

loc_6672EE:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
mov	eax, 4
pop	ebx
add	esp, 8
retn	8

loc_667304:
mov	eax, [esi+4]
mov	edi, [esp+18h+arg_0]
mov	ecx, eax
mov	[edi+4], eax
mov	dword ptr [edi], 2
call	sub_64A420
mov	edi, [edi]
push	ebp		; lpCriticalSection
call	ds:LeaveCriticalSection
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_667330:
lea	ecx, [esp+18h+var_8]
push	ecx
lea	ecx, [esp+1Ch+arg_0]
mov	[esp+1Ch+var_8], 1
mov	[esp+1Ch+var_4], esi
call	sub_6661F0
push	eax
lea	edx, [esp+1Ch+var_8]
push	edx
push	edi
mov	ecx, edi
call	sub_666440
mov	eax, [esp+18h+arg_0]
push	ebp		; lpCriticalSection
mov	[eax+4], esi
mov	dword ptr [eax], 3
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
mov	eax, 3
pop	ebx
add	esp, 8
retn	8
sub_667230 endp

align 10h



sub_667380 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	esi, ecx
lea	ebp, [esi+0Ch]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6673EB
mov	esi, [eax+0Ch]
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	edi
lea	edi, [eax+0Ch]
test	esi, esi
jz	short loc_6673C8
mov	eax, ebx
shr	eax, 6
xor	eax, ebx
and	eax, [esi+4]
lea	ecx, [esp+10h+arg_0]
push	eax
push	ecx
mov	ecx, edi
call	sub_666140
test	eax, eax
jl	short loc_6673C8
lea	eax, [esi+eax*8+0Ch]
test	eax, eax
jnz	short loc_6673E9

loc_6673C8:
mov	edx, ebx
shr	edx, 6
xor	edx, ebx
push	edx
lea	eax, [esp+14h+arg_0]
push	eax
push	edi
mov	ecx, edi
call	sub_666570
push	1		; Value
add	ebx, 4
push	ebx		; Addend
call	ds:InterlockedExchangeAdd

loc_6673E9:
pop	edi
pop	ebx

loc_6673EB:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	esi
pop	ebp
retn	4
sub_667380 endp

align 10h



sub_667400 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1432B24
mov	dword ptr [esi+0Ch], 0
mov	[esi+10h], al
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	2Ch
call	eax
test	eax, eax
jz	short loc_66744A
push	esi
mov	ecx, eax
call	sub_667070
mov	[esi+8], eax
mov	eax, esi
pop	esi
retn	4

loc_66744A:
xor	eax, eax
mov	[esi+8], eax
mov	eax, esi
pop	esi
retn	4
sub_667400 endp

align 10h



sub_667460 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	dword ptr [esi], offset	off_1432B24
test	ecx, ecx
jz	short loc_66747D
call	sub_666EA0
mov	ecx, [esi+8]
call	sub_64A430

loc_66747D:
lea	ecx, [esi+0Ch]
call	sub_716800
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6674A1
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6674A1:
mov	eax, esi
pop	esi
retn	4
sub_667460 endp

align 10h



sub_6674B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_667120
test	[esp+4+arg_0], 1
jz	short loc_6674CD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6674CD:
mov	eax, esi
pop	esi
retn	4
sub_6674B0 endp

align 10h



sub_6674E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	ecx, [eax-61h]
cmp	ecx, 19h
ja	short locret_6674EF
add	eax, 0FFFFFFE0h

locret_6674EF:
retn
sub_6674E0 endp




sub_6674F0 proc	near

arg_0= dword ptr  4

mov	al, [ecx]
mov	ecx, [esp+arg_0]
mov	cl, [ecx]
cmp	al, cl
jz	short loc_66751B
cmp	al, 3
jz	short loc_667504
cmp	al, 4
jnz	short loc_66750E

loc_667504:
cmp	cl, 3
jz	short loc_667513
cmp	cl, 4
jz	short loc_667513

loc_66750E:
xor	eax, eax
retn	4

loc_667513:
mov	eax, 1
retn	4

loc_66751B:
mov	al, 1
retn	4
sub_6674F0 endp




sub_667520 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_653400
fisub	[esp+0Ch+arg_4]
cmp	byte ptr [esi],	5
fstp	[esp+0Ch+var_8]
jb	short loc_667544
mov	ecx, esi
call	sub_652060

loc_667544:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn	8
sub_667520 endp

align 10h



sub_667560 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
call	sub_653400
fstp	[esp+10h+var_8]
mov	ecx, [esp+10h+arg_4]
push	edi
call	sub_653400
fsubr	[esp+10h+var_8]
cmp	byte ptr [esi],	5
fstp	[esp+10h+var_8]
jb	short loc_667593
mov	ecx, esi
call	sub_652060

loc_667593:
fld	[esp+10h+var_8]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
add	esp, 8
retn	8
sub_667560 endp

align 10h



sub_6675B0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
mov	ecx, [esp+10h+arg_4]
push	edi
call	sub_653400
fstp	[esp+10h+var_8]
push	edi
mov	ecx, esi
call	sub_653400
fmul	[esp+10h+var_8]
cmp	byte ptr [esi],	5
fstp	[esp+10h+var_8]
jb	short loc_6675E5
mov	ecx, esi
call	sub_652060

loc_6675E5:
fld	[esp+10h+var_8]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
add	esp, 8
retn	8
sub_6675B0 endp

align 10h



sub_667600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
push	ebx
call	sub_653660
push	ebx
mov	ecx, esi
mov	edi, eax
call	sub_653660
and	edi, eax
cmp	byte ptr [esi],	5
jb	short loc_66762B
mov	ecx, esi
call	sub_652060

loc_66762B:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
pop	ebx
retn	8
sub_667600 endp

align 10h



sub_667640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
push	ebx
call	sub_653660
push	ebx
mov	ecx, esi
mov	edi, eax
call	sub_653660
or	edi, eax
cmp	byte ptr [esi],	5
jb	short loc_66766B
mov	ecx, esi
call	sub_652060

loc_66766B:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
pop	ebx
retn	8
sub_667640 endp

align 10h



sub_667680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
push	ebx
call	sub_653660
push	ebx
mov	ecx, esi
mov	edi, eax
call	sub_653660
xor	edi, eax
cmp	byte ptr [esi],	5
jb	short loc_6676AB
mov	ecx, esi
call	sub_652060

loc_6676AB:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
pop	ebx
retn	8
sub_667680 endp

align 10h



sub_6676C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
push	edi
call	sub_653660
push	edi
mov	ecx, esi
mov	ebx, eax
call	sub_653660
mov	edi, eax
mov	ecx, ebx
shl	edi, cl
cmp	byte ptr [esi],	5
jb	short loc_6676EF
mov	ecx, esi
call	sub_652060

loc_6676EF:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
pop	ebx
retn	8
sub_6676C0 endp

align 10h



sub_667700 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
push	edi
call	sub_653660
push	edi
mov	ecx, esi
mov	ebx, eax
call	sub_653660
mov	edi, eax
mov	ecx, ebx
sar	edi, cl
cmp	byte ptr [esi],	5
jb	short loc_66772F
mov	ecx, esi
call	sub_652060

loc_66772F:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
pop	ebx
retn	8
sub_667700 endp

align 10h



sub_667740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
push	edi
call	sub_653660
push	edi
mov	ecx, esi
mov	ebx, eax
call	sub_653750
mov	edi, eax
mov	ecx, ebx
shr	edi, cl
cmp	byte ptr [esi],	5
jb	short loc_66776F
mov	ecx, esi
call	sub_652060

loc_66776F:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
pop	ebx
retn	8
sub_667740 endp

align 10h



sub_667780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
mov	ecx, [eax]
test	ecx, ecx
jz	short locret_6677A1
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+4]
push	esi
lea	esi, [esp+4+arg_8]
push	esi
mov	esi, [esp+8+arg_4]
push	esi
push	eax
call	edx
pop	esi

locret_6677A1:
retn
sub_667780 endp

align 10h



sub_6677B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_8]
mov	[eax+4], edx
mov	edx, [esp+arg_C]
mov	[eax+8], ecx
mov	ecx, [esp+arg_10]
mov	[eax+0Ch], edx
mov	edx, [esp+arg_14]
mov	[eax+10h], ecx
mov	[eax+14h], edx
retn	18h
sub_6677B0 endp

align 10h



sub_6677E0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+4]
push	edx
call	eax
retn	8
sub_6677E0 endp

align 10h



sub_6677F0 proc	near
mov	eax, [ecx+324h]
test	eax, eax
jnz	short locret_6677FD
lea	eax, [ecx+28h]

locret_6677FD:
retn
sub_6677F0 endp

align 10h



sub_667800 proc	near
push	esi
mov	esi, [ecx+324h]
test	esi, esi
jnz	short loc_66780E
lea	esi, [ecx+28h]

loc_66780E:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_667826
push	2
mov	ecx, esi
call	sub_6A9B70

loc_667826:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	eax, [edx+ecx]
movzx	dx, byte ptr [eax+1]
movzx	ax, byte ptr [eax]
shl	dx, 8
add	ecx, 2
or	dx, ax
mov	[esi+2Ch], ecx
movzx	eax, dx
pop	esi
retn
sub_667800 endp

align 10h



sub_667850 proc	near
mov	eax, ecx
mov	ecx, [eax+324h]
test	ecx, ecx
jnz	short loc_66785F
lea	ecx, [eax+28h]

loc_66785F:
mov	eax, [ecx+34h]
sub	eax, [ecx+30h]
add	eax, [ecx+2Ch]
retn
sub_667850 endp

align 10h



sub_667870 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_8]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	[esi+8], ecx
mov	[esi+0Ch], eax
mov	[esi+10h], edx
test	ecx, ecx
jz	short loc_6678A3
push	edx
push	eax
call	sub_6B3270
call	sub_6B2210
mov	[esi], eax
mov	[esi+4], edx
mov	eax, esi
pop	esi
retn	0Ch

loc_6678A3:
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	eax, esi
pop	esi
retn	0Ch
sub_667870 endp

align 10h



sub_6678C0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+8], 0
jz	short loc_6678E5
call	sub_6B2210
sub	eax, [esi]
mov	ecx, [esi+0Ch]
sbb	edx, [esi+4]
push	edx
push	eax
mov	eax, [esi+10h]
push	eax
push	ecx
mov	ecx, [esi+8]
call	sub_6B3C90

loc_6678E5:
pop	esi
retn
sub_6678C0 endp

align 10h



sub_6678F0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	loc_667A3E
push	ebx
mov	ebx, [esi+18h]
push	edi
push	0
mov	ecx, esi
mov	edi, 0Ah
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+24h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax+10h]
xor	ebx, ebx
cmp	dword ptr [esi+1Ch], 2
jl	short loc_66798A
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	edi, eax
cmp	edi, 2
jl	short loc_667955
cmp	edi, 24h
jle	short loc_6679B5

loc_667955:
call	sub_6794F0
fstp	[esp+18h+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_66796D
mov	ecx, esi
call	sub_652060

loc_66796D:
fld	[esp+18h+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jmp	loc_667A35

loc_66798A:
cmp	ecx, 1
jbe	short loc_6679B9
mov	ecx, [eax]
cmp	byte ptr [ecx],	30h
jnz	short loc_6679B9
mov	cl, [ecx+1]
mov	ebx, 1
lea	edi, [ebx+7]
cmp	cl, 78h
jz	short loc_6679AB
cmp	cl, 58h
jnz	short loc_6679B9

loc_6679AB:
mov	edi, 10h
lea	ebx, [edi-0Eh]
jmp	short loc_6679B9

loc_6679B5:
mov	eax, [esp+18h+arg_0]

loc_6679B9:
push	ebp
mov	ebp, [eax]
mov	[esp+1Ch+var_C], 0
mov	eax, [eax]
push	edi		; int
lea	ecx, [esp+20h+var_C]
push	ecx		; char **
add	eax, ebx
push	eax		; char *
call	_strtol
add	ebp, ebx
add	esp, 0Ch
cmp	ebp, [esp+1Ch+var_C]
mov	dword ptr [esp+1Ch+var_8], eax
pop	ebp
jnz	short loc_667A0D
cmp	edi, 8
jz	short loc_667A0D
call	sub_6794F0
fstp	[esp+18h+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_667A01
mov	ecx, esi
call	sub_652060

loc_667A01:
fld	[esp+18h+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
jmp	short loc_667A26

loc_667A0D:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_667A1C
mov	ecx, esi
call	sub_652060

loc_667A1C:
mov	edx, dword ptr [esp+18h+var_8]
mov	byte ptr [esi],	4
mov	[esi+4], edx

loc_667A26:
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0

loc_667A35:
jnz	short loc_667A3C
call	sub_650DF0

loc_667A3C:
pop	edi
pop	ebx

loc_667A3E:
pop	esi
add	esp, 0Ch
retn
sub_6678F0 endp

align 10h



; int __cdecl sub_667A50(char *)
sub_667A50 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_667ADB
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+20h+var_C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+14h+var_C]
mov	edi, [eax]
lea	edx, [esp+14h+arg_0]
mov	[esp+14h+arg_0], 0
mov	eax, [eax]
push	edx		; char **
push	eax		; Src
call	sub_67B3C0
add	esp, 8
cmp	edi, [esp+14h+arg_0]
pop	edi
jnz	short loc_667AA8
fstp	st
call	sub_6794F0

loc_667AA8:
mov	esi, [esi+4]
fstp	[esp+10h+var_8]
cmp	byte ptr [esi],	5
jb	short loc_667ABB
mov	ecx, esi
call	sub_652060

loc_667ABB:
fld	[esp+10h+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
mov	eax, [esp+10h+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_667ADB
call	sub_650DF0

loc_667ADB:
pop	esi
add	esp, 0Ch
retn
sub_667A50 endp




sub_667AE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_667B5B
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 0
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_667B0C
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_667B22

loc_667B0C:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_667B5A
mov	eax, [esi+8]
test	eax, eax
jz	short loc_667B5A
lea	edi, [eax-78h]

loc_667B22:
test	edi, edi
jz	short loc_667B5A
mov	ecx, [esi+18h]
push	ebp
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	ecx, edi
mov	ebp, eax
call	sub_67EC10
cmp	ebp, eax
pop	ebp
jge	short loc_667B5A
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1

loc_667B5A:
pop	edi

loc_667B5B:
pop	esi
retn
sub_667AE0 endp

align 10h



sub_667B60 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
mov	esi, [esp+10h+arg_0]
mov	ebx, 1
cmp	[esi+1Ch], ebx
jl	short loc_667BB1
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+10h+var_8]
mov	ecx, dword ptr [esp+10h+var_8+4]
mov	eax, ecx
and	eax, 7FF00000h
xor	edx, edx
jnz	short loc_667BAF
cmp	eax, 7FF00000h
jnz	short loc_667BAF
mov	eax, dword ptr [esp+10h+var_8]
and	ecx, 0FFFFFh
or	eax, ecx
jnz	short loc_667BB1

loc_667BAF:
xor	ebx, ebx

loc_667BB1:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
add	esp, 8
retn
sub_667B60 endp

align 10h



sub_667BD0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_667C5A
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fst	[esp+0Ch+var_8]
mov	ecx, dword ptr [esp+0Ch+var_8+4]
mov	eax, ecx
and	eax, 7FF00000h
xor	edx, edx
jnz	short loc_667C1A
cmp	eax, 7FF00000h
jnz	short loc_667C1A
mov	eax, dword ptr [esp+0Ch+var_8]
and	ecx, 0FFFFFh
or	eax, ecx
jnz	short loc_667C58

loc_667C1A:
fst	[esp+0Ch+var_8]
cmp	dword ptr [esp+0Ch+var_8], edx
jnz	short loc_667C2E
cmp	dword ptr [esp+0Ch+var_8+4], 0FFF00000h
jz	short loc_667C58

loc_667C2E:
fstp	[esp+0Ch+var_8]
cmp	dword ptr [esp+0Ch+var_8], edx
jnz	short loc_667C42
cmp	dword ptr [esp+0Ch+var_8+4], 7FF00000h
jz	short loc_667C5A

loc_667C42:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi+4], 1
mov	byte ptr [esi],	2
pop	esi
add	esp, 8
retn

loc_667C58:
fstp	st

loc_667C5A:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi+4], 0
mov	byte ptr [esi],	2
pop	esi
add	esp, 8
retn
sub_667BD0 endp




sub_667C70 proc	near

arg_0= dword ptr  4
arg_8= byte ptr	 0Ch

push	ebx
mov	eax, ecx
mov	bl, [eax+0Dh]
mov	ecx, [eax+4]
mov	edx, [ecx]
mov	edx, [edx+1Ch]
not	bl
and	bl, [esp+4+arg_8]
push	esi
or	bl, [eax+0Ch]
mov	eax, [eax+8]
movzx	esi, bl
push	esi
mov	esi, [esp+0Ch+arg_0]
push	esi
push	eax
call	edx
pop	esi
pop	ebx
retn	0Ch
sub_667C70 endp

align 10h



sub_667CA0 proc	near

var_108= dword ptr -108h
var_104= byte ptr -104h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 108h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+108h+var_4], eax
push	ebp
mov	ebp, [esp+10Ch+arg_8]
push	esi
push	edi
xor	edi, edi
lea	esi, [esp+114h+var_104]
cmp	[esp+114h+arg_4], edi
jbe	loc_667D94
push	ebx

loc_667CD2:
mov	eax, [esp+118h+arg_0]
movzx	ebx, byte ptr [edi+eax]
lea	ecx, [esi+4]
lea	edx, [esp+118h+var_5]
cmp	ecx, edx
jb	short loc_667D00
push	0FFFFFFFFh
lea	eax, [esp+11Ch+var_104]
push	eax
mov	ecx, ebp
mov	byte ptr [esi],	0
call	sub_67A0C0
lea	esi, [esp+118h+var_104]

loc_667D00:
cmp	ebx, 80h
jge	short loc_667D41
mov	ecx, ebx
and	ecx, 8000001Fh
jns	short loc_667D17
dec	ecx
or	ecx, 0FFFFFFE0h
inc	ecx

loc_667D17:
mov	eax, 1
shl	eax, cl
mov	ecx, [esp+118h+arg_C]
mov	[esp+118h+var_108], eax
mov	eax, ebx
cdq
and	edx, 1Fh
add	eax, edx
mov	edx, [esp+118h+var_108]
sar	eax, 5
test	[ecx+eax*4], edx
jz	short loc_667D41
mov	[esi], bl
jmp	short loc_667D84

loc_667D41:
mov	eax, ebx
cdq
and	edx, 0Fh
add	eax, edx
sar	eax, 4
inc	esi
mov	byte ptr [esi-1], 25h
cmp	eax, 9
setnle	dl
dec	dl
and	dl, 0F9h
add	dl, 37h
add	dl, al
mov	[esi], dl
mov	eax, ebx
inc	esi
and	eax, 8000000Fh
jns	short loc_667D72
dec	eax
or	eax, 0FFFFFFF0h
inc	eax

loc_667D72:
cmp	eax, 9
setnle	cl
dec	cl
and	cl, 0F9h
add	cl, 37h
add	cl, al
mov	[esi], cl

loc_667D84:
inc	edi
inc	esi
cmp	edi, [esp+118h+arg_4]
jb	loc_667CD2
pop	ebx

loc_667D94:
push	0FFFFFFFFh
lea	edx, [esp+118h+var_104]
push	edx
mov	ecx, ebp
mov	byte ptr [esi],	0
call	sub_67A0C0
mov	ecx, [esp+114h+var_4]
pop	edi
pop	esi
pop	ebp
xor	ecx, esp
call	sub_7999A3
add	esp, 108h
retn
sub_667CA0 endp

align 10h



sub_667DC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	offset unk_1432CE4
push	eax
push	ecx
push	edx
call	sub_667CA0
add	esp, 10h
retn
sub_667DC0 endp

align 10h



sub_667DE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	offset unk_1432CF4
push	eax
push	ecx
push	edx
call	sub_667CA0
add	esp, 10h
retn
sub_667DE0 endp

align 10h



sub_667E00 proc	near

var_108= dword ptr -108h
var_104= byte ptr -104h
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 108h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+108h+var_4], eax
mov	eax, [esp+108h+arg_4]
push	ebp
mov	ebp, [esp+10Ch+arg_8]
push	esi
mov	esi, [esp+110h+arg_0]
add	eax, esi
push	edi
mov	[esp+114h+var_108], eax
lea	edi, [esp+114h+var_104]
cmp	esi, eax
jnb	loc_667ECC
push	ebx
nop

loc_667E40:
movzx	ebx, byte ptr [esi]
lea	ecx, [edi+1]
lea	edx, [esp+118h+var_5]
inc	esi
cmp	ecx, edx
jb	short loc_667E67
push	0FFFFFFFFh
lea	eax, [esp+11Ch+var_104]
push	eax
mov	ecx, ebp
mov	byte ptr [edi],	0
call	sub_67A0C0
lea	edi, [esp+118h+var_104]

loc_667E67:
cmp	ebx, 25h
jnz	short loc_667EBE
movzx	eax, byte ptr [esi]
lea	ecx, [eax-61h]
cmp	ecx, 19h
ja	short loc_667E7A
add	eax, 0FFFFFFE0h

loc_667E7A:
movzx	ecx, byte ptr [esi+1]
inc	esi
lea	edx, [ecx-61h]
cmp	edx, 19h
lea	edx, [ecx-20h]
jbe	short loc_667E8C
mov	edx, ecx

loc_667E8C:
lea	ecx, [eax-30h]
inc	esi
cmp	ecx, 9
jle	short loc_667E9A
sub	eax, 37h
jmp	short loc_667E9C

loc_667E9A:
mov	eax, ecx

loc_667E9C:
lea	ecx, [edx-30h]
cmp	ecx, 9
jle	short loc_667EA9
sub	edx, 37h
jmp	short loc_667EAB

loc_667EA9:
mov	edx, ecx

loc_667EAB:
cmp	eax, 10h
jge	short loc_667EC1
cmp	edx, 10h
jge	short loc_667EC1
shl	al, 4
add	al, dl
mov	[edi], al
jmp	short loc_667EC0

loc_667EBE:
mov	[edi], bl

loc_667EC0:
inc	edi

loc_667EC1:
cmp	esi, [esp+118h+var_108]
jb	loc_667E40
pop	ebx

loc_667ECC:
push	0FFFFFFFFh
lea	eax, [esp+118h+var_104]
push	eax
mov	ecx, ebp
mov	byte ptr [edi],	0
call	sub_67A0C0
mov	ecx, [esp+114h+var_4]
pop	edi
pop	esi
pop	ebp
xor	ecx, esp
call	sub_7999A3
add	esp, 108h
retn
sub_667E00 endp

align 10h



sub_667F00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
test	ecx, ecx
jz	short loc_667F19
inc	dword ptr [ecx+4]
mov	ecx, [esp+arg_4]
mov	[eax+4], ecx
retn	8

loc_667F19:
mov	edx, [esp+arg_4]
mov	[eax+4], edx
retn	8
sub_667F00 endp

align 10h



sub_667F30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
cmp	dword ptr [esi+0Ch], 0
push	edi
mov	ebx, ecx
jz	short loc_667F42
inc	dword ptr [esi+8]

loc_667F42:
mov	edi, [esp+0Ch+arg_4]
mov	dword ptr [esi+0Ch], 0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+38h]
push	0
push	edi
push	ebx
call	edx
mov	[ebx+8], eax
mov	ecx, [esi]
add	ecx, [esi+8]
push	edi
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	[ebx+0Ch], edi
add	esp, 0Ch
cmp	dword ptr [esi+0Ch], 0
mov	dword ptr [esi+0Ch], 0
jz	short loc_667F84
inc	dword ptr [esi+8]

loc_667F84:
add	[esi+8], edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_667F30 endp

align 10h



sub_667F90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
and	byte ptr [esi+0C6h], 0FDh
mov	[esi+74h], ecx
call	sub_654DD0
mov	[esi+7Ch], al
pop	esi
retn	4
sub_667F90 endp

align 10h



sub_667FB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
or	byte ptr [esi+0C6h], 2
mov	[esi+74h], ecx
call	sub_654DD0
mov	[esi+7Ch], al
pop	esi
retn	4
sub_667FB0 endp

align 10h



sub_667FD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
and	byte ptr [esi+0C6h], 0FDh
mov	ecx, edi
mov	[esi+74h], edi
call	sub_654DD0
mov	[esi+7Ch], al
mov	eax, [edi]
mov	edx, [eax+0D0h]
mov	ecx, edi
call	edx
pop	edi
mov	[esi+78h], eax
pop	esi
retn	4
sub_667FD0 endp




sub_668000 proc	near
mov	ecx, [ecx+74h]
mov	eax, [ecx]
mov	edx, [eax+0A8h]
jmp	edx
sub_668000 endp

align 10h



sub_668010 proc	near
mov	ecx, [ecx+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
jmp	edx
sub_668010 endp

align 10h



sub_668020 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
mov	eax, [edi]
test	dword ptr [eax+0Ch], 4000000h
jz	short loc_668034
mov	al, 1
pop	edi
retn

loc_668034:
push	esi
mov	esi, [eax]
push	3Ah		; int
push	esi		; char *
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_668072
push	2Fh		; int
push	esi		; char *
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_668072
push	2Eh		; int
push	esi		; char *
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_668072
mov	eax, [edi]
or	dword ptr [eax+0Ch], 6000000h
pop	esi
xor	al, al
pop	edi
retn

loc_668072:
mov	eax, [edi]
or	dword ptr [eax+0Ch], 4000000h
pop	esi
mov	al, 1
pop	edi
retn
sub_668020 endp




sub_668080 proc	near
mov	eax, [ecx]
cmp	eax, (offset loc_7FFFFF+1)
ja	loc_668209
cmp	eax, 8000h
jnb	loc_668149
cmp	eax, 80h
jnb	short loc_6680EC
cmp	eax, 8
jnb	short loc_6680C7
cmp	eax, 2
jnb	short loc_6680B7
cmp	eax, 1
sbb	eax, eax
inc	eax
movzx	eax, al
jmp	loc_66820E

loc_6680B7:
cmp	eax, 4
sbb	eax, eax
add	eax, 3
movzx	eax, al
jmp	loc_66820E

loc_6680C7:
cmp	eax, 20h
jnb	short loc_6680DC
cmp	eax, 10h
sbb	eax, eax
add	eax, 5
movzx	eax, al
jmp	loc_66820E

loc_6680DC:
cmp	eax, 40h
sbb	eax, eax
add	eax, 7
movzx	eax, al
jmp	loc_66820E

loc_6680EC:
cmp	eax, 800h
jnb	short loc_66811E
cmp	eax, 200h
jnb	short loc_66810C
cmp	eax, 100h
sbb	eax, eax
add	eax, 9
movzx	eax, al
jmp	loc_66820E

loc_66810C:
cmp	eax, 400h
sbb	eax, eax
add	eax, 0Bh
movzx	eax, al
jmp	loc_66820E

loc_66811E:
cmp	eax, 2000h
jnb	short loc_668137
cmp	eax, 1000h
sbb	eax, eax
add	eax, 0Dh
movzx	eax, al
jmp	loc_66820E

loc_668137:
cmp	eax, 4000h
sbb	eax, eax
add	eax, 0Fh
movzx	eax, al
jmp	loc_66820E

loc_668149:
cmp	eax, (offset loc_7FFFFF+1)
jnb	short loc_6681A7
cmp	eax, 80000h
jnb	short loc_668182
cmp	eax, 20000h
jnb	short loc_668170
cmp	eax, 10000h
sbb	eax, eax
add	eax, 11h
movzx	eax, al
jmp	loc_66820E

loc_668170:
cmp	eax, 40000h
sbb	eax, eax
add	eax, 13h
movzx	eax, al
jmp	loc_66820E

loc_668182:
cmp	eax, 200000h
jnb	short loc_668198
cmp	eax, 100000h
sbb	eax, eax
add	eax, 15h
movzx	eax, al
jmp	short loc_66820E

loc_668198:
cmp	eax, 400000h
sbb	eax, eax
add	eax, 17h
movzx	eax, al
jmp	short loc_66820E

loc_6681A7:
cmp	eax, 8000000h
jnb	short loc_6681D3
cmp	eax, 2000000h
jnb	short loc_6681C4
cmp	eax, (offset sub_FFFFFF+1)
sbb	eax, eax
add	eax, 19h
movzx	eax, al
jmp	short loc_66820E

loc_6681C4:
cmp	eax, 4000000h
sbb	eax, eax
add	eax, 1Bh
movzx	eax, al
jmp	short loc_66820E

loc_6681D3:
cmp	eax, 20000000h
jnb	short loc_6681E9
cmp	eax, 10000000h
sbb	eax, eax
add	eax, 1Dh
movzx	eax, al
jmp	short loc_66820E

loc_6681E9:
cmp	eax, 40000000h
jnb	short loc_6681FA
mov	eax, 1Eh
movzx	eax, al
jmp	short loc_66820E

loc_6681FA:
cmp	eax, 80000000h
sbb	eax, eax
add	eax, 20h
movzx	eax, al
jmp	short loc_66820E

loc_668209:
add	eax, 0FF000019h

loc_66820E:
lea	ecx, [eax-1]
cmp	ecx, 21h
ja	short loc_66821E
mov	eax, dword_167D6C8[eax*4]
retn

loc_66821E:
mov	eax, 2Eh
retn
sub_668080 endp

align 10h



sub_668230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

call	sub_668080
mov	ecx, [esp+arg_4]
mov	edx, [ecx]
mov	eax, [edx+eax*4+8]
mov	ecx, [esp+arg_0]
inc	dword ptr [eax+8]
mov	[ecx], eax
mov	eax, ecx
retn	8
sub_668230 endp

align 10h



sub_668250 proc	near
movsx	edx, word ptr [ecx+8]
add	edx, 0FFFFFFF8h
xor	eax, eax
cmp	edx, 26h	; switch 39 cases
ja	short loc_6682C0 ; default
			; jumptable 00668265 cases 2-4,6-18,20-24,33-36
movzx	edx, ds:byte_668308[edx]
jmp	ds:off_6682CC[edx*4] ; switch jump

loc_66826C:		; jumptable 00668265 case 29
mov	eax, 1
retn

loc_668272:		; jumptable 00668265 case 31
mov	eax, 2
retn

loc_668278:		; jumptable 00668265 case 28
mov	eax, 3
retn

__RTC_NumErrors_3:	; jumptable 00668265 case 27
mov	eax, 4
retn

__RTC_NumErrors_4:	; jumptable 00668265 case 37
mov	eax, 5
retn

loc_66828A:		; jumptable 00668265 case 38
mov	eax, 6
retn

loc_668290:		; jumptable 00668265 case 0
mov	eax, 8
retn

loc_668296:		; jumptable 00668265 case 5
mov	eax, 0Dh
retn

loc_66829C:		; jumptable 00668265 case 30
mov	eax, 0Eh
retn

loc_6682A2:		; jumptable 00668265 case 32
mov	eax, 0Fh
retn

loc_6682A8:		; jumptable 00668265 case 25
mov	eax, 10h
retn

loc_6682AE:		; jumptable 00668265 case 26
mov	eax, 11h
retn

loc_6682B4:		; jumptable 00668265 case 1
mov	eax, 12h
retn

loc_6682BA:		; jumptable 00668265 case 19
mov	eax, 13h
retn

loc_6682C0:		; default
mov	cl, [ecx+0Ah]	; jumptable 00668265 cases 2-4,6-18,20-24,33-36
cmp	cl, 20h
jb	short locret_6682CB
movzx	eax, cl

locret_6682CB:
retn
sub_668250 endp

off_6682CC dd offset loc_668290	; jump table for switch	statement
dd offset loc_6682B4
dd offset loc_668296
dd offset loc_6682BA
dd offset loc_6682A8
dd offset loc_6682AE
dd offset __RTC_NumErrors_3
dd offset loc_668278
dd offset loc_66826C
dd offset loc_66829C
dd offset loc_668272
dd offset loc_6682A2
dd offset __RTC_NumErrors_4
dd offset loc_66828A
dd offset loc_6682C0
byte_668308 db	    0,	   1,	0Eh,   0Eh ; indirect table for	switch statement
db    0Eh,     2,   0Eh,   0Eh
db    0Eh,   0Eh,   0Eh,   0Eh
db    0Eh,   0Eh,   0Eh,   0Eh
db    0Eh,   0Eh,   0Eh,     3
db    0Eh,   0Eh,   0Eh,   0Eh
db    0Eh,     4,     5,     6
db	7,     8,     9,   0Ah
db    0Bh,   0Eh,   0Eh,   0Eh
db    0Eh,   0Ch,   0Dh
align 10h



sub_668330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, eax
inc	edx
neg	edx
sbb	edx, edx
and	edx, eax
mov	eax, [esp+arg_4]
mov	[ecx+48h], edx
cmp	eax, 0FFFFFFFFh
jnz	short loc_66834E
mov	eax, 3E8h

loc_66834E:
mov	[ecx+44h], eax
mov	[ecx+28h], eax
retn	8
sub_668330 endp

align 10h



sub_668360 proc	near

var_11=	byte ptr -11h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
mov	eax, [esp+14h+arg_4]
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+1Ch+var_10]
mov	[esp+1Ch+var_11], 3
call	sub_651E70
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+18h+var_11]
push	eax
mov	eax, [esp+1Ch+arg_0]
lea	ecx, [esp+1Ch+var_10]
push	ecx
mov	ecx, [eax]
add	ecx, 14Ch
push	ecx
push	eax
mov	ecx, esi
call	edx
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	esi
add	esp, 14h
retn	8
sub_668360 endp

align 10h



sub_6683B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_668404
mov	eax, [esi+18h]
push	ebx
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebx, eax
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	esi, [esi+4]
mov	edi, [eax+940h]
add	eax, 934h
mov	ecx, esi
call	sub_652060
and	edi, ebx
cmp	edi, ebx
setz	cl
pop	edi
mov	byte ptr [esi],	2
mov	[esi+4], cl
pop	ebx

loc_668404:
pop	esi
retn
sub_6683B0 endp

align 10h



sub_668410 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
cmp	dword ptr [edi+1Ch], 1
jnz	loc_668501
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18h+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+0Ch+arg_0]
call	sub_679E30
mov	eax, [esp+0Ch+var_4]
mov	ecx, [eax+10h]
push	offset unk_1432CE4
lea	edx, [esp+10h+arg_0]
push	edx
mov	edx, [eax]
push	ecx
push	edx
call	sub_667CA0
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
add	esp, 10h
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_6684AF
mov	ecx, edi
call	sub_652060

loc_6684AF:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6684C5
mov	ecx, esi
call	sub_650DF0

loc_6684C5:
mov	esi, [esp+0Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6684EB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6684EB:
mov	eax, [esp+0Ch+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_668501
call	sub_650DF0

loc_668501:
pop	edi
pop	esi
pop	ecx
retn
sub_668410 endp

align 10h



sub_668510 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
cmp	dword ptr [edi+1Ch], 1
jnz	loc_6685FC
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18h+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+0Ch+arg_0]
call	sub_679E30
mov	eax, [esp+0Ch+var_4]
mov	ecx, [eax+10h]
lea	edx, [esp+0Ch+arg_0]
push	edx
mov	edx, [eax]
push	ecx
push	edx
call	sub_667E00
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	eax, [esp+18h+arg_0]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
add	esp, 0Ch
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_6685AA
mov	ecx, edi
call	sub_652060

loc_6685AA:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6685C0
mov	ecx, esi
call	sub_650DF0

loc_6685C0:
mov	esi, [esp+0Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6685E6
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6685E6:
mov	eax, [esp+0Ch+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6685FC
call	sub_650DF0

loc_6685FC:
pop	edi
pop	esi
pop	ecx
retn
sub_668510 endp




sub_668600 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
cmp	dword ptr [edi+1Ch], 1
jnz	loc_6686EF
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18h+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+0Ch+arg_0]
call	sub_679E30
mov	edx, [esp+0Ch+var_4]
mov	esi, [edx]
lea	eax, [esp+0Ch+arg_0]
push	eax
lea	ecx, [esp+10h+var_4]
call	sub_650650
push	eax
push	esi
call	sub_67A770
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	eax, [esp+0Ch+arg_0]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_66869D
mov	ecx, edi
call	sub_652060

loc_66869D:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6686B3
mov	ecx, esi
call	sub_650DF0

loc_6686B3:
mov	esi, [esp+0Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6686D9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6686D9:
mov	eax, [esp+0Ch+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6686EF
call	sub_650DF0

loc_6686EF:
pop	edi
pop	esi
pop	ecx
retn
sub_668600 endp

align 10h



sub_668700 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
cmp	dword ptr [edi+1Ch], 1
jnz	loc_6687EF
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18h+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+0Ch+arg_0]
call	sub_679E30
mov	edx, [esp+0Ch+var_4]
mov	esi, [edx]
lea	eax, [esp+0Ch+arg_0]
push	eax
lea	ecx, [esp+10h+var_4]
call	sub_650650
push	eax
push	esi
call	sub_67A8C0
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	eax, [esp+0Ch+arg_0]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_66879D
mov	ecx, edi
call	sub_652060

loc_66879D:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6687B3
mov	ecx, esi
call	sub_650DF0

loc_6687B3:
mov	esi, [esp+0Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6687D9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6687D9:
mov	eax, [esp+0Ch+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6687EF
call	sub_650DF0

loc_6687EF:
pop	edi
pop	esi
pop	ecx
retn
sub_668700 endp

align 10h



sub_668800 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+1Ch], 2
jl	loc_6688CE
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
push	edi
call	eax
mov	edx, [eax+8]
lea	ecx, [eax+8]
mov	[esp+10h+var_4], eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	edi, eax
test	edi, edi
jz	loc_6688CD
push	ebx
mov	ebx, [esi+18h]
push	ebp
push	1
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+18h+var_8]
mov	ebx, [edx]
mov	ebp, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebp
lea	ecx, [esp+24h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax]
mov	edx, [edi]
mov	eax, [esp+18h+var_4]
mov	edx, [edx+64h]
push	ebx
push	ecx
push	eax
mov	ecx, edi
call	edx
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
pop	ebx
jnz	short loc_6688AB
call	sub_650DF0

loc_6688AB:
mov	eax, [esp+10h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6688C1
call	sub_650DF0

loc_6688C1:
mov	ecx, edi
pop	edi
pop	esi
add	esp, 8
jmp	sub_64A430

loc_6688CD:
pop	edi

loc_6688CE:
pop	esi
add	esp, 8
retn
sub_668800 endp

align 10h



sub_6688E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
mov	eax, [ebx+18h]
test	eax, eax
jz	loc_6689C1
mov	ecx, [eax+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
push	esi
push	edi
call	edx
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	ecx, [ebx+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	0
push	7
push	offset aUnknown_0 ; "UNKNOWN"
mov	esi, eax
call	sub_650E40
mov	[esp+10h+arg_0], eax
inc	dword ptr [eax+8]
test	esi, esi
jz	short loc_668979
mov	eax, [esi]
mov	edx, [eax+14h]
lea	ecx, [esp+10h+var_4]
push	ecx
mov	ecx, esi
call	edx
mov	eax, [eax]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
lea	ecx, [esp+14h+arg_0]
call	sub_6513F0
mov	edi, [esp+10h+var_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_668979
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_668979:
mov	edi, [ebx+4]
cmp	byte ptr [edi],	5
jb	short loc_668988
mov	ecx, edi
call	sub_652060

loc_668988:
mov	byte ptr [edi],	5
mov	ecx, [esp+10h+arg_0]
mov	[edi+4], ecx
mov	eax, [esp+10h+arg_0]
inc	dword ptr [eax+8]
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6689AF
call	sub_650DF0

loc_6689AF:
pop	edi
test	esi, esi
jz	short loc_6689C0
mov	ecx, esi
pop	esi
pop	ebx
add	esp, 4
jmp	sub_64A430

loc_6689C0:
pop	esi

loc_6689C1:
pop	ebx
pop	ecx
retn
sub_6688E0 endp

align 10h



sub_6689D0 proc	near

arg_0= dword ptr  4
arg_8= byte ptr	 0Ch

push	ebx
mov	bl, [esp+4+arg_8]
push	esi
mov	eax, ecx
mov	ecx, [eax+4]
mov	edx, [ecx+10h]
mov	eax, [eax+8]
mov	edx, [edx+1Ch]
or	bl, 1
movzx	esi, bl
push	esi
mov	esi, [esp+0Ch+arg_0]
add	ecx, 10h
push	esi
push	eax
call	edx
pop	esi
pop	ebx
retn	0Ch
sub_6689D0 endp

align 10h



sub_668A00 proc	near
mov	eax, [ecx+290h]
test	eax, eax
jz	short loc_668A11
mov	eax, [eax+14h]
mov	eax, [eax+0Ch]
retn

loc_668A11:
xor	eax, eax
retn
sub_668A00 endp

align 10h



; int __thiscall sub_668A20(void *, char)
sub_668A20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_668A2F
call	sub_64A430

loc_668A2F:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1432C80
jz	short loc_668A45
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_668A45:
mov	eax, esi
pop	esi
retn	4
sub_668A20 endp

align 10h



sub_668A50 proc	near
mov	ecx, [ecx+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	eax, [eax+2474h]
shr	eax, 2
and	eax, 1
retn
sub_668A50 endp

align 10h



sub_668A70 proc	near
mov	ecx, [ecx+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	eax, [eax+2474h]
shr	eax, 6
not	al
and	eax, 1
retn
sub_668A70 endp

align 10h



sub_668A90 proc	near
cmp	dword ptr [ecx+74h], 0
jz	short locret_668AAB
mov	ecx, [ecx+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
add	eax, 2474h
or	dword ptr [eax], 80000h

locret_668AAB:
retn
sub_668A90 endp

align 10h



sub_668AB0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+74h], 0
jz	short loc_668AD9
mov	ecx, [esi+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
test	eax, eax
jz	short loc_668AD9
mov	ecx, [esi+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	eax, [eax+14h]
mov	eax, [eax+0Ch]
pop	esi
retn

loc_668AD9:
xor	eax, eax
pop	esi
retn
sub_668AB0 endp

align 10h



sub_668AE0 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
cmp	byte ptr [esi+7Ch], 6
push	edi
mov	edi, [esp+14h+arg_4]
jbe	short loc_668B4E
mov	ecx, [edi]
mov	eax, [esi+78h]
mov	ecx, [ecx]
cmp	[eax+108h], ecx
jnz	short loc_668B24

loc_668B00:
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+68h]
push	0
call	eax

loc_668B0C:
mov	ecx, [edi+4]
push	eax
call	sub_6528F0
mov	eax, [esp+14h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax],	1
pop	ebx
pop	ecx
retn	8

loc_668B24:
cmp	[eax+104h], ecx
jnz	loc_668BB7
mov	ecx, [eax+2ACh]
push	ecx
mov	ecx, [edi+4]
call	sub_652E40
mov	eax, [esp+14h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax],	1
pop	ebx
pop	ecx
retn	8

loc_668B4E:
mov	ebp, [edi]
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
mov	ebx, [esi+78h]
jnz	short loc_668B61
call	sub_651580

loc_668B61:
mov	edx, [ebx+108h]
mov	eax, [ebp+0]
mov	ecx, [edx+4]
cmp	ecx, [eax+4]
jz	short loc_668B00
mov	ebp, [edi]
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
mov	ebx, [esi+78h]
jnz	short loc_668B85
call	sub_651580

loc_668B85:
mov	ecx, [ebx+104h]
mov	edx, [ebp+0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]
jnz	short loc_668BB7
mov	ecx, [esi+78h]
mov	edx, [ecx+2ACh]
mov	ecx, [edi+4]
push	edx
call	sub_652E40
mov	eax, [esp+14h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax],	1
pop	ebx
pop	ecx
retn	8

loc_668BB7:
cmp	byte ptr [esi+7Ch], 6
mov	ecx, [edi]
setnbe	al
mov	[esp+14h+arg_4], 0
mov	edx, [ecx]
mov	[esp+14h+var_4], al
mov	eax, [edx]
mov	ecx, dword ptr [esp+14h+var_4]
push	ecx		; char
lea	edx, [esp+18h+arg_4]
push	edx		; int
push	eax		; char *
call	sub_68D7B0
add	esp, 0Ch
cmp	eax, 0FFFFFFFFh
jz	short loc_668C13
mov	ecx, [esp+14h+arg_4]
cmp	byte ptr [ecx],	0
jnz	short loc_668C13
mov	ecx, [esi+74h]
mov	edx, [ecx]
push	eax
mov	eax, [edx+64h]
call	eax
test	eax, eax
jnz	loc_668B0C
mov	eax, [esp+14h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax],	2
pop	ebx
pop	ecx
retn	8

loc_668C13:
mov	eax, [esp+14h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax],	0
pop	ebx
pop	ecx
retn	8
sub_668AE0 endp

align 10h



sub_668C30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

cmp	[esp+arg_4], 0
push	edi
mov	edi, ecx
jnz	short loc_668C40
xor	al, al
pop	edi
retn	0Ch

loc_668C40:
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_8]
push	esi
test	ebp, ebp
jz	short loc_668C98
mov	ebx, [ebp+4]
sub	ebx, 1
js	short loc_668C98

loc_668C53:
mov	eax, [ebp+0]
mov	ecx, [eax+ebx*8+4]
lea	eax, [eax+ebx*8]
mov	eax, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_668C70
test	eax, eax
jz	short loc_668C93
lea	esi, [eax+10h]
jmp	short loc_668C77

loc_668C70:
test	eax, eax
jz	short loc_668C93
lea	esi, [eax+78h]

loc_668C77:
test	esi, esi
jz	short loc_668C93
mov	eax, [esp+10h+arg_0]
mov	edx, [esi]
mov	edx, [edx+24h]
push	0
push	eax
lea	ecx, [edi+78h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_668CD4

loc_668C93:
sub	ebx, 1
jns	short loc_668C53

loc_668C98:
cmp	dword ptr [edi+74h], 0
jz	loc_668D3F
mov	eax, [edi+74h]
mov	ebx, [esp+10h+arg_0]
lea	ecx, [eax+78h]
mov	eax, [ecx]
mov	edx, [eax+24h]
push	0
push	ebx
lea	esi, [edi+78h]
push	esi
call	edx
test	al, al
jz	short loc_668D0D
mov	eax, [edi+74h]
mov	ecx, [esp+10h+arg_4]
push	eax
call	sub_6528F0
pop	esi
pop	ebp
pop	ebx
mov	al, 1
pop	edi
retn	0Ch

loc_668CD4:
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
mov	ecx, [esp+10h+arg_4]
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_668CFB
lea	eax, [esi-78h]
push	eax
call	sub_6528F0
pop	esi
pop	ebp
pop	ebx
mov	al, 1
pop	edi
retn	0Ch

loc_668CFB:
lea	eax, [esi-10h]
push	eax
call	sub_652E40
pop	esi
pop	ebp
pop	ebx
mov	al, 1
pop	edi
retn	0Ch

loc_668D0D:
mov	ecx, [esi]
mov	edi, [ecx+2ACh]
test	edi, edi
jz	short loc_668D3F
mov	edx, [edi+10h]
mov	eax, [edx+24h]
push	0
lea	ecx, [edi+10h]
push	ebx
push	esi
call	eax
test	al, al
jz	short loc_668D3F
mov	ecx, [esp+10h+arg_4]
push	edi
call	sub_652E40
pop	esi
pop	ebp
pop	ebx
mov	al, 1
pop	edi
retn	0Ch

loc_668D3F:
pop	esi
pop	ebp
pop	ebx
xor	al, al
pop	edi
retn	0Ch
sub_668C30 endp

align 10h



sub_668D50 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0CCh]
sub	eax, [esp+arg_0]
jz	short loc_668D69
mov	ecx, [ecx+0C8h]
mov	eax, [ecx+eax*4-4]
retn	4

loc_668D69:
xor	eax, eax
retn	4
sub_668D50 endp

align 10h



sub_668D70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	eax, [ebp+0]
push	esi
mov	esi, [eax]
push	edi
push	3Ah		; int
push	esi		; char *
or	edi, 0FFFFFFFFh
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_668DB4
push	2Eh		; int
push	esi		; char *
call	_strrchr
add	esp, 8
test	eax, eax
jnz	short loc_668DB4
push	2Fh		; int
push	esi		; char *
call	_strrchr
add	esp, 8
test	eax, eax
jnz	short loc_668E03
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_668DB4:
sub	eax, esi
mov	edi, eax
test	edi, edi
jl	short loc_668E03
mov	ecx, [ebp+0]
mov	eax, [ecx]
mov	ebx, [esp+10h+arg_0]
mov	edx, [ebx]
mov	ecx, [edx+280h]
lea	eax, [eax+edi+1]
push	eax
call	sub_651000
mov	ecx, [esp+10h+arg_C]
mov	esi, eax
add	dword ptr [esi+8], 2
mov	ecx, [ecx]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_668DEE
call	sub_650DF0

loc_668DEE:
mov	edx, [esp+10h+arg_C]
mov	[edx], esi
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_668E26
mov	ecx, esi
call	sub_650DF0
jmp	short loc_668E26

loc_668E03:
mov	ebx, [esp+10h+arg_0]
mov	eax, [ebx]
mov	esi, [eax+8]
inc	dword ptr [esi+8]
mov	ecx, [esp+10h+arg_C]
mov	ecx, [ecx]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_668E20
call	sub_650DF0

loc_668E20:
mov	edx, [esp+10h+arg_C]
mov	[edx], esi

loc_668E26:
test	edi, edi
jle	short loc_668E39
mov	eax, [ebp+0]
mov	ecx, [eax]
cmp	byte ptr [ecx+edi-1], 2Fh
jnz	short loc_668E37
dec	edi

loc_668E37:
test	edi, edi

loc_668E39:
jl	short loc_668E7D
mov	edx, [ebp+0]
mov	eax, [edx]
mov	ecx, [ebx]
mov	ecx, [ecx+280h]
push	edi
push	eax
call	sub_650F20
mov	edi, [esp+10h+arg_8]
mov	esi, eax
add	dword ptr [esi+8], 2
mov	ecx, [edi]
or	ebx, 0FFFFFFFFh
add	[ecx+8], ebx
jnz	short loc_668E68
call	sub_650DF0

loc_668E68:
mov	[edi], esi
add	[esi+8], ebx
jnz	short loc_668E96
mov	ecx, esi
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn

loc_668E7D:
mov	ebp, [ebp+0]
inc	dword ptr [ebp+8]
mov	esi, [esp+10h+arg_8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_668E94
call	sub_650DF0

loc_668E94:
mov	[esi], ebp

loc_668E96:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_668D70 endp

align 10h



sub_668EA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_668EAD
cmp	eax, 3
jnz	short loc_668EC6

loc_668EAD:
mov	eax, [ecx+74h]
mov	edx, 100h
test	[eax+76h], dx
jnz	short loc_668EC1
cmp	dword ptr [eax+14h], 0FFFFFFFFh
jge	short loc_668EC6

loc_668EC1:
mov	al, 1
retn	4

loc_668EC6:
mov	eax, [ecx+74h]
mov	al, [eax+76h]
shr	al, 4
and	al, 1
retn	4
sub_668EA0 endp

align 10h



sub_668EE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
cmp	edi, [esi+4]
jb	short loc_668EF2
pop	edi
xor	al, al
pop	esi
retn	4

loc_668EF2:
mov	eax, [esi]
movsx	eax, byte ptr [eax]
mov	ecx, [esi+8]
push	eax		; int
push	ecx		; char *
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_668F11
inc	dword ptr [esi]
mov	edx, [esi]
cmp	edx, [esi+4]
jb	short loc_668EF2

loc_668F11:
mov	eax, [esi]
mov	cl, [eax]
mov	edx, [esp+8+arg_0]
mov	[edx], cl
mov	eax, [esi]
cmp	edi, eax
jz	short loc_668F3E
cmp	eax, [esi+4]
ja	short loc_668F3E
mov	ecx, [esi+0Ch]
sub	eax, edi
and	ecx, 0FFFFFC00h
mov	ecx, [ecx]
push	eax
push	edi
call	sub_650F20
mov	edi, eax
jmp	short loc_668F4C

loc_668F3E:
mov	edx, [esi+0Ch]
and	edx, 0FFFFFC00h
mov	eax, [edx]
mov	edi, [eax+20h]

loc_668F4C:
add	dword ptr [edi+8], 2
mov	ecx, [esi+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_668F5E
call	sub_650DF0

loc_668F5E:
mov	[esi+0Ch], edi
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_668F6E
mov	ecx, edi
call	sub_650DF0

loc_668F6E:
inc	dword ptr [esi]
pop	edi
mov	al, 1
pop	esi
retn	4
sub_668EE0 endp

align 10h



sub_668F80 proc	near
mov	eax, [ecx]
test	eax, eax
jz	short locret_668F97
mov	eax, [eax+290h]
add	eax, 2474h
or	dword ptr [eax], 80000h

locret_668F97:
retn
sub_668F80 endp

align 10h



sub_668FA0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
sub	edx, [ecx+4]
push	esi
mov	esi, [ecx+14h]
dec	esi
shl	esi, 5
sar	edx, 4
add	edx, esi
mov	esi, [esp+4+arg_0]
xor	eax, eax
cmp	esi, edx
ja	short loc_668FD1
mov	ecx, [ecx+10h]
sub	edx, esi
mov	eax, edx
and	edx, 1Fh
shr	eax, 5
shl	edx, 4
add	edx, [ecx+eax*4]
mov	eax, edx

loc_668FD1:
pop	esi
retn	4
sub_668FA0 endp

align 10h



sub_668FE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_669010
mov	eax, [edi]
test	eax, eax
jz	short loc_669005
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_669005:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_669010:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_669043
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_669043:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_668FE0 endp

align 10h



sub_669070 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6690A0
mov	eax, [edi]
test	eax, eax
jz	short loc_669095
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_669095:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6690A0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6690D3
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6690D3:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*8]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 143h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_669070 endp

align 10h



sub_669100 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
cmp	eax, 20h
jnb	short loc_669143
mov	eax, 20h

loc_669111:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+0Fh]
mov	eax, [edi]
shr	esi, 4
shl	esi, 4
test	eax, eax
jz	short loc_66916C
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_669143:
test	eax, eax
jnz	short loc_669111
mov	eax, [edi]
test	eax, eax
jz	short loc_669161
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_669161:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_66916C:
lea	eax, [esp+8+arg_4]
push	eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, ds:0[esi*4]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_669100 endp

align 10h



sub_6691A0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_6691FA
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6691B4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6691DD
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6691CF
call	sub_650DF0

loc_6691CF:
lea	ecx, [esi+8]
call	sub_652840
mov	dword ptr [esi], 0FFFFFFFEh

loc_6691DD:
add	edi, 18h
sub	ebp, 1
jnz	short loc_6691B4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_6691FA:
pop	ebx
retn
sub_6691A0 endp

align 10h



sub_669200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	ecx, [esp+arg_0]
call	sub_651C20
test	eax, eax
jz	short locret_669222
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	22h
mov	ecx, eax
call	edx

locret_669222:
retn
sub_669200 endp

align 10h



sub_669230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
test	eax, eax
jz	short locret_66925A
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	10h
mov	ecx, eax
call	edx

locret_66925A:
retn
sub_669230 endp

align 10h



sub_669260 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esp+14h+var_1], 0
mov	ecx, [eax+280h]
mov	eax, ebp
lea	edx, [eax+1]

loc_669281:
mov	bl, [eax]
inc	eax
test	bl, bl
jnz	short loc_669281
push	0
sub	eax, edx
push	eax
push	ebp
call	sub_650E40
mov	ecx, [esp+14h+arg_8]
mov	[esp+14h+arg_0], eax
inc	dword ptr [eax+8]
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+14h+var_1]
push	eax
push	ecx
lea	eax, [esp+1Ch+arg_0]
push	eax
push	edi
mov	ecx, esi
call	edx
mov	bl, al
mov	eax, [esp+14h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6692CB
call	sub_650DF0

loc_6692CB:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
pop	ecx
retn	0Ch
sub_669260 endp

align 10h



sub_6692E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_1432D4C
mov	eax, [ecx]
mov	edx, [eax+54h]
push	edi
call	edx
mov	ebp, [esp+0Ch+arg_4]
mov	edi, eax
mov	eax, [edi+2474h]
shr	eax, 2
and	al, 1
mov	[esi+8], al
mov	ecx, [edi+2474h]
shr	ecx, 6
not	cl
and	cl, 1
mov	[esi+9], cl
mov	[esi+0Ch], ebp
test	ebp, ebp
jnz	short loc_669328
mov	byte ptr [esi+0Ah], 0
jmp	short loc_66938A

loc_669328:
mov	edx, [edi]
mov	eax, [edx+4]
push	ebx
mov	ecx, edi
call	eax
mov	edx, [eax]
mov	ebx, [esi+0Ch]
mov	ecx, eax
mov	eax, [edx+30h]
call	eax
mov	ecx, ebx
pop	ebx

loc_669341:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_669361
test	dl, dl
jz	short loc_66935D
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_669361
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_669341

loc_66935D:
xor	eax, eax
jmp	short loc_669366

loc_669361:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_669366:
test	eax, eax
jnz	short loc_66937B
mov	ecx, [edi+2474h]
shr	ecx, 3
and	cl, 1
mov	[esi+0Ah], cl
jmp	short loc_66938A

loc_66937B:
mov	edx, [edi+2474h]
shr	edx, 4
and	dl, 1
mov	[esi+0Ah], dl

loc_66938A:
mov	ecx, edi
call	sub_656280
cmp	byte ptr [esi+0Ah], 0
mov	[esi+4], eax
jz	short loc_6693E1
mov	eax, [edi+2474h]
shr	eax, 5
test	al, 1
jnz	short loc_6693E1
mov	eax, ebp
lea	edx, [eax+1]
lea	esp, [esp+0]

loc_6693B0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6693B0
sub	eax, edx
test	eax, eax
jle	short loc_6693E1
mov	edx, [esi+0Ch]

loc_6693C0:
mov	cl, [edx+eax]
cmp	cl, 2Fh
jz	short loc_6693DA
cmp	cl, 5Ch
jz	short loc_6693DA
dec	eax
test	eax, eax
jg	short loc_6693C0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	8

loc_6693DA:
lea	ecx, [edx+eax+1]
mov	[esi+0Ch], ecx

loc_6693E1:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	8
sub_6692E0 endp

align 10h



sub_6693F0 proc	near
mov	al, [ecx+9]
retn
sub_6693F0 endp

align 10h



sub_669400 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+290h]
mov	esi, ecx
test	eax, eax
jz	short loc_66941A
mov	eax, [eax+14h]
mov	eax, [eax+0Ch]
jmp	short loc_66941C

loc_66941A:
xor	eax, eax

loc_66941C:
push	eax
call	sub_663A90
mov	[esi+34h], edi
pop	edi
mov	dword ptr [esi], offset	off_1432DAC
mov	dword ptr [esi+10h], offset off_1432D58
mov	eax, esi
pop	esi
retn	4
sub_669400 endp

align 10h



sub_669440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi]
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	edx, [edi]
cmp	edx, [eax+124h]
jnz	short loc_669492
mov	eax, [ecx+24h]
mov	al, [eax+2B0h]

loc_669460:
mov	esi, [esp+0Ch+arg_8]
mov	ecx, esi
test	al, al
jz	short loc_669482
cmp	al, 1
setz	bl
call	sub_652060
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_669482:
call	sub_652060
pop	edi
mov	byte ptr [esi],	0
pop	esi
xor	al, al
pop	ebx
retn	0Ch

loc_669492:
cmp	edx, [eax+128h]
jnz	short loc_6694A5
mov	ecx, [ecx+24h]
mov	al, [ecx+2B1h]
jmp	short loc_669460

loc_6694A5:
mov	edx, [esp+0Ch+arg_8]
push	edx
push	edi
push	esi
call	sub_663C50
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_669440 endp

align 10h



sub_6694C0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_669530
align 10h

loc_6694D0:
cmp	[esp+arg_0], 0
jz	short loc_6694E4
or	dword ptr [ecx+2474h], 800h
retn	4

loc_6694E4:
and	dword ptr [ecx+2474h], 0FFFFF7FFh
retn	4
align 10h

loc_669500:
cmp	[esp+arg_0], 0
jz	short loc_669514
or	dword ptr [ecx+2474h], 200000h
retn	4

loc_669514:
and	dword ptr [ecx+2474h], 0FFDFFFFFh
retn	4
align 10h

loc_669530:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1432DAC
mov	dword ptr [esi+10h], offset off_1432D58
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_66955A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_66955A:
mov	eax, esi
pop	esi
retn	4
sub_6694C0 endp




sub_669560 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
mov	eax, [ebp+78h]
push	esi
push	edi
mov	edi, [esp+20h+arg_4]
lea	ebx, [ebp+78h]
mov	esi, ecx
mov	ecx, [edi]
cmp	ecx, [eax+124h]
jnz	loc_669667
mov	ecx, [esp+20h+arg_8]
push	ebp
call	sub_651D80
mov	ecx, [esi+24h]
test	al, al
setz	al
inc	al
mov	[ecx+2B0h], al
mov	eax, [esi+24h]
cmp	byte ptr [eax+2B0h], 1
mov	eax, [eax+280h]
push	0
mov	ecx, eax
jnz	short loc_6695FC
push	6
push	offset a3_3_90	; "3.3.90"
call	sub_650E40
mov	edi, eax
lea	edx, [esp+20h+var_10]
push	edx
mov	eax, 1
add	[edi+8], eax
push	offset aGfxversion ; "gfxVersion"
mov	[esp+28h+var_10], 5
mov	[esp+28h+var_C], edi
add	[edi+8], eax
push	ebx
mov	ecx, esi
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_669634
mov	ecx, edi
jmp	short loc_66962F

loc_6695FC:
push	0Ah
push	offset aGfxversion ; "gfxVersion"
call	sub_650E40
mov	[esp+20h+arg_8], eax
inc	dword ptr [eax+8]
mov	eax, [esi]
mov	edx, [eax+18h]
lea	ecx, [esp+20h+arg_8]
push	ecx
push	ebx
mov	ecx, esi
call	edx
mov	eax, [esp+20h+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_669634

loc_66962F:
call	sub_650DF0

loc_669634:
mov	eax, [esp+20h+arg_C]
mov	edx, [esp+20h+arg_4]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
push	edx
push	ebp
mov	ecx, esi
mov	[esp+30h+var_10], 0Ah
call	sub_665190
lea	ecx, [esp+20h+var_10]
mov	bl, al
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 10h
retn	10h

loc_669667:
cmp	ecx, [eax+128h]
jnz	short loc_6696B8
mov	ecx, [esp+20h+arg_8]
push	ebp
call	sub_651D80
mov	ecx, [esi+24h]
mov	edx, [esp+20h+arg_C]
test	al, al
setz	al
inc	al
mov	[ecx+2B1h], al
push	edx
lea	eax, [esp+24h+var_10]
push	eax
push	edi
push	ebp
mov	ecx, esi
mov	[esp+30h+var_10], 0Ah
call	sub_665190
lea	ecx, [esp+20h+var_10]
mov	bl, al
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 10h
retn	10h

loc_6696B8:
mov	edx, [esi+24h]
cmp	byte ptr [edx+2B0h], 1
jnz	short loc_669720
cmp	ecx, [eax+12Ch]
jnz	short loc_6696F3
mov	ecx, [ebp+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_669720
mov	ecx, [esp+20h+arg_8]
push	ebp
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, edi
call	loc_6694D0
jmp	short loc_669720

loc_6696F3:
cmp	ecx, [eax+130h]
jnz	short loc_669720
mov	ecx, [ebp+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_669720
mov	ecx, [esp+20h+arg_8]
push	ebp
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, edi
call	loc_669500

loc_669720:
mov	edx, [esp+20h+arg_C]
mov	eax, [esp+20h+arg_8]
mov	ecx, [esp+20h+arg_4]
push	edx
push	eax
push	ecx
push	ebx
mov	ecx, esi
call	sub_665530
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h
sub_669560 endp

align 10h



sub_669750 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	[eax], edx
test	edx, edx
jz	short loc_669769
mov	ecx, [edx+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edx+8], ecx

loc_669769:
mov	edx, [esp+arg_4]
or	edx, 80000000h
mov	[eax+4], edx
retn	8
sub_669750 endp

align 10h



sub_669780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
sub	esp, 8
push	ebp
push	esi
mov	esi, ecx
mov	[esi+0Ch], eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	ebp, [esp+10h+arg_0]
push	ecx
push	eax
mov	ecx, ebp
mov	[esi+8], eax
call	sub_6A9CB0
mov	ecx, ebp
call	sub_6A98A0
test	al, al
jz	short loc_669829
push	ebx
push	edi
mov	edi, [esi+8]
xor	esi, esi
mov	[esp+18h+var_4], 33h
lea	esp, [esp+0]

loc_6697D0:
mov	bl, [edi+esi]
mov	ecx, esi
inc	esi
test	bl, bl
jns	short loc_6697F7
movzx	dx, byte ptr [edi+esi+1]
movzx	ax, byte ptr [edi+esi]
shl	dx, 8
or	dx, ax
movzx	eax, dx
movzx	eax, ax
add	esi, 2
add	esi, eax

loc_6697F7:
push	ecx
push	offset a4d	; "%4d\t"
push	ebp
call	nullsub_2
add	esp, 0Ch
mov	ecx, ebp
call	sub_9B3060
lea	ecx, [esp+18h+var_8]
push	offset aDisasmIsDisabl ; "<disasm is disabled>\n"
push	ecx
mov	[esp+20h+var_8], eax
call	sub_667780
add	esp, 8
test	bl, bl
jnz	short loc_6697D0
pop	edi
pop	ebx

loc_669829:
pop	esi
pop	ebp
add	esp, 8
retn	8
sub_669780 endp

align 10h



sub_669840 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+6Ch]
mov	ecx, [esp+4+arg_0]
cmp	ecx, eax
jb	short loc_669865
push	eax
push	ecx
push	offset aInvalidLocalRe ; "Invalid local	register %d, stack only	h"...
push	esi
call	sub_669230
add	esp, 10h
lea	eax, [esi+28h]
pop	esi
retn	4

loc_669865:
sub	eax, ecx
dec	eax
shl	eax, 4
add	eax, [esi+68h]
pop	esi
retn	4
sub_669840 endp

align 10h



sub_669880 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [esp+arg_0]
mov	eax, [eax]
sub	esp, 0Ch
cmp	dword ptr [eax+10h], 0
push	ebp
mov	ebp, ecx
jnz	short loc_6698AE
test	byte ptr [ebp+0C6h], 2
jz	short loc_6698A4
xor	eax, eax
pop	ebp
add	esp, 0Ch
retn	8

loc_6698A4:
mov	eax, [ebp+74h]
pop	ebp
add	esp, 0Ch
retn	8

loc_6698AE:
mov	edx, [ebp+78h]
mov	ecx, [ebp+74h]
push	ebx
push	esi
mov	esi, [eax]
mov	eax, [edx+8]
mov	[esp+18h+var_C], eax
inc	dword ptr [eax+8]
cmp	byte ptr [esi],	2Fh
push	edi
mov	[esp+1Ch+var_8], ecx
jnz	short loc_6698DA
mov	eax, [ecx]
mov	edx, [eax+68h]
push	0
call	edx
mov	[esp+1Ch+var_8], eax
inc	esi

loc_6698DA:
mov	byte ptr [esp+1Ch+var_4], 1
mov	ebx, 2

loc_6698E4:
cmp	byte ptr [esi],	0
mov	eax, esi
jz	short loc_66990A
jmp	short loc_6698F0
align 10h

loc_6698F0:
mov	cl, [eax]
cmp	cl, 2Eh
jnz	short loc_6698FF
cmp	[eax+1], cl
jnz	short loc_66992E
inc	eax
jmp	short loc_669904

loc_6698FF:
cmp	cl, 2Fh
jz	short loc_66992E

loc_669904:
inc	eax
cmp	byte ptr [eax],	0
jnz	short loc_6698F0

loc_66990A:
xor	edi, edi

loc_66990C:
cmp	edi, esi
jz	loc_6699A2
mov	eax, [ebp+78h]
mov	ecx, [eax+280h]
test	edi, edi
jz	short loc_669932
mov	edx, edi
sub	edx, esi
push	edx
push	esi
call	sub_650F20
jmp	short loc_669938

loc_66992E:
mov	edi, eax
jmp	short loc_66990C

loc_669932:
push	esi
call	sub_651000

loc_669938:
mov	esi, eax
add	[esi+8], ebx
mov	eax, [esp+1Ch+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_669953
call	sub_650DF0

loc_669953:
mov	[esp+1Ch+var_C], esi
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_669964
mov	ecx, esi
call	sub_650DF0

loc_669964:
mov	ecx, [esp+1Ch+var_C]
cmp	dword ptr [ecx+10h], 0
jz	short loc_66998A
mov	eax, [esp+1Ch+var_4]
mov	ecx, [esp+1Ch+var_8]
mov	edx, [ecx]
mov	edx, [edx+10Ch]
push	eax
lea	eax, [esp+20h+var_C]
push	eax
call	edx
mov	[esp+1Ch+var_8], eax

loc_66998A:
cmp	[esp+1Ch+var_8], 0
jz	short loc_6699C0
test	edi, edi
jz	short loc_6699C0
lea	esi, [edi+1]
mov	byte ptr [esp+1Ch+var_4], 0
jmp	loc_6698E4

loc_6699A2:
test	[esp+1Ch+arg_4], 4
jnz	short loc_6699C0
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [eax]
mov	edx, [ecx]
push	edx
push	offset aErrorInvalidPa ; "Error: invalid path '%s'\n"
push	ebp
call	sub_669230
add	esp, 0Ch

loc_6699C0:
mov	eax, [esp+1Ch+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
pop	ebx
jnz	short loc_6699D9
call	sub_650DF0

loc_6699D9:
mov	eax, [esp+10h+var_8]
pop	ebp
add	esp, 0Ch
retn	8
sub_669880 endp

align 10h



sub_6699F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_669A44
mov	edx, [edi]
sub	eax, esi
lea	ecx, [eax+esi]
shl	ecx, 4
push	ebx
lea	ebx, [ecx+edx-10h]
test	eax, eax
jbe	short loc_669A25
push	ebp
mov	ebp, eax

loc_669A15:
mov	ecx, ebx
call	sub_652830
sub	ebx, 10h
sub	ebp, 1
jnz	short loc_669A15
pop	ebp

loc_669A25:
mov	eax, [edi+8]
shr	eax, 1
pop	ebx
cmp	esi, eax
jnb	short loc_669A5B
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_73A300
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_669A44:
cmp	esi, [edi+8]
jb	short loc_669A5B
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_73A300

loc_669A5B:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6699F0 endp

align 10h



sub_669A70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
cmp	edi, [esi+4]
jnb	short loc_669A9B
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_669AB2
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, esi
call	sub_669070
mov	[esi+4], edi
pop	edi
pop	esi
retn	8

loc_669A9B:
cmp	edi, [esi+8]
jb	short loc_669AB2
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_669070

loc_669AB2:
mov	[esi+4], edi
pop	edi
pop	esi
retn	8
sub_669A70 endp

align 10h



sub_669AC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*4]
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_669B1F
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_669B1F
push	ebp
lea	esp, [esp+0]

loc_669AF0:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_669B05
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_669B18

loc_669B05:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_669B15
lea	ecx, [eax+eax*4]
lea	ecx, [edi+ecx*4+8]
jmp	short loc_669AF0

loc_669B15:
or	eax, 0FFFFFFFFh

loc_669B18:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_669B1F:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_669AC0 endp

align 10h



sub_669B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	edx, ecx
mov	eax, [edx]
push	esi
lea	ecx, [ebp+ebp*4+0]
cmp	dword ptr [eax+ecx*4+8], 0FFFFFFFEh
lea	esi, [eax+ecx*4+8]
push	edi
mov	[esp+10h+var_4], edx
mov	edi, ebp
jz	short loc_669BB9
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, [eax+4]
cmp	ecx, ebp
jnz	short loc_669BB9
push	ebx
nop

loc_669B60:
mov	ecx, [esi+4]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
cmp	eax, ebp
jnz	short loc_669B92
mov	ecx, [esp+14h+arg_0]
mov	ebx, [ecx]
mov	ecx, [esi+4]
cmp	dword ptr [ecx+4], 0
jnz	short loc_669B85
call	sub_651580
mov	edx, [esp+14h+var_4]

loc_669B85:
mov	ecx, [ebx]
mov	eax, [esi+4]
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]
jz	short loc_669BA4

loc_669B92:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_669BAE
mov	eax, [edx]
lea	ecx, [edi+edi*4]
lea	esi, [eax+ecx*4+8]
jmp	short loc_669B60

loc_669BA4:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_669BAE:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8

loc_669BB9:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8
sub_669B30 endp

align 10h



sub_669BD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_1432E60
test	eax, eax
jz	short loc_669BEE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_669BEE:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_669C0A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_669C0A:
mov	eax, esi
pop	esi
retn	4
sub_669BD0 endp




sub_669C10 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
mov	[ecx+23E4h], edx
movzx	edx, byte ptr [eax+4]
mov	[ecx+23E8h], dl
movzx	edx, byte ptr [eax+5]
mov	[ecx+23E9h], dl
fld	dword ptr [eax+0Ch]
fstp	[esp+arg_0]
fld	dword ptr [eax+8]
fstp	dword ptr [ecx+23ECh]
fld	[esp+arg_0]
fstp	dword ptr [ecx+23F0h]
fld	dword ptr [eax+14h]
fstp	[esp+arg_0]
fld	dword ptr [eax+10h]
fstp	dword ptr [ecx+23F4h]
fld	[esp+arg_0]
fstp	dword ptr [ecx+23F8h]
fld	dword ptr [eax+1Ch]
fstp	[esp+arg_0]
fld	dword ptr [eax+18h]
fstp	dword ptr [ecx+23FCh]
fld	[esp+arg_0]
fstp	dword ptr [ecx+2400h]
retn	4
sub_669C10 endp

align 10h



sub_669C90 proc	near
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
xor	esi, esi
push	esi
push	18h
call	edx
cmp	eax, esi
jz	short loc_669CC8
mov	dword ptr [eax], offset	off_155F500
mov	[eax+8], esi
mov	[eax+0Ch], esi
mov	[eax+10h], esi
mov	[eax+14h], esi
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1432E60
pop	esi
retn

loc_669CC8:
xor	eax, eax
pop	esi
retn
sub_669C90 endp

align 10h



sub_669CD0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
mov	ecx, [esp+0Ch+arg_4]
mov	al, [ecx]
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
mov	ebx, [ebp+74h]
xor	dl, dl
mov	byte ptr [esp+14h+arg_0], dl
cmp	al, 5
jnz	loc_669E26
push	esi
push	edi
push	0
push	0FFFFFFFFh
push	ebp
lea	eax, [esp+28h+arg_4]
push	eax
call	sub_652F60
lea	ecx, [esp+1Ch+arg_4]
call	sub_650650
mov	edi, eax
xor	esi, esi
test	edi, edi
jle	loc_669DC9

loc_669D16:
push	esi
lea	ecx, [esp+20h+arg_4]
call	sub_650680
cmp	eax, 3Ah
jnz	short loc_669D66
push	esi
push	0
lea	ecx, [esp+24h+var_C]
push	ecx
lea	ecx, [esp+28h+arg_4]
call	sub_6512A0
push	0
lea	edx, [esp+20h+var_C]
push	edx
mov	ecx, ebp
call	sub_669880
mov	ebx, eax
test	ebx, ebx
jz	short loc_669D50
cmp	esi, edi
jl	short loc_669D6D
xor	ebx, ebx

loc_669D50:
mov	eax, [esp+1Ch+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_669D66
call	sub_650DF0

loc_669D66:
inc	esi
cmp	esi, edi
jl	short loc_669D16
jmp	short loc_669DC9

loc_669D6D:
inc	edi
push	edi
inc	esi
push	esi
lea	eax, [esp+24h+var_8]
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_6512A0
mov	esi, [eax]
inc	dword ptr [esi+8]
mov	eax, [esp+1Ch+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_669D9A
call	sub_650DF0

loc_669D9A:
mov	eax, dword ptr [esp+1Ch+var_8]
mov	ecx, eax
add	eax, 8
mov	[esp+1Ch+arg_4], esi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_669DB3
call	sub_650DF0

loc_669DB3:
mov	eax, [esp+1Ch+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_669DC9
call	sub_650DF0

loc_669DC9:
pop	edi
pop	esi
test	ebx, ebx
jz	short loc_669DF2
mov	ecx, [esp+14h+arg_4]
mov	eax, [ecx]
mov	ecx, [esp+14h+arg_C]
mov	edx, [ebx]
mov	edx, [edx+140h]
push	1
push	ecx
push	eax
mov	ecx, ebx
call	edx
test	al, al
jz	short loc_669DF2
mov	byte ptr [esp+14h+arg_0], 1

loc_669DF2:
mov	eax, [esp+14h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_669E08
call	sub_650DF0

loc_669E08:
mov	al, byte ptr [esp+14h+arg_0]
test	al, al
jz	short loc_669E6F

loc_669E10:
mov	eax, [esp+14h+arg_8]
test	eax, eax
jz	short loc_669E1A
mov	[eax], ebx

loc_669E1A:
mov	al, byte ptr [esp+14h+arg_0]
pop	ebp
pop	ebx
add	esp, 0Ch
retn	10h

loc_669E26:
cmp	al, 6
jz	short loc_669E6D
cmp	al, 3
jz	short loc_669E32
cmp	al, 4
jnz	short loc_669E6D

loc_669E32:
push	ebp
call	sub_653400
fsub	ds:dbl_15FCC40
mov	ecx, [esp+14h+arg_C]
fnstcw	word ptr [esp+14h+arg_0]
movzx	eax, word ptr [esp+14h+arg_0]
or	eax, 0C00h
mov	[esp+14h+arg_4], eax
fldcw	word ptr [esp+14h+arg_4]
fistp	[esp+14h+var_8]
mov	eax, dword ptr [esp+14h+var_8]
mov	[ecx], eax
fldcw	word ptr [esp+14h+arg_0]
mov	byte ptr [esp+14h+arg_0], 1
jmp	short loc_669E10

loc_669E6D:
mov	al, dl

loc_669E6F:
pop	ebp
pop	ebx
add	esp, 0Ch
retn	10h
sub_669CD0 endp

align 10h



sub_669E80 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
xor	edx, edx
cmp	eax, edx
jnz	short loc_669E94
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	[eax+4], edx
retn	4

loc_669E94:
push	esi
mov	esi, [eax+4]
add	eax, 8
jmp	short loc_669EA0
align 10h

loc_669EA0:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_669EAD
inc	edx
add	eax, 18h
cmp	edx, esi
jbe	short loc_669EA0

loc_669EAD:
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	esi
mov	[eax+4], edx
retn	4
sub_669E80 endp

align 10h



sub_669EC0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
push	esi
push	edi
call	sub_65E330
cmp	esi, ebx
jbe	short loc_669EF8
sub	esi, ebx
mov	eax, [edi]
lea	ecx, [eax+ebx*4]
jz	short loc_669EF8
mov	edx, 1

loc_669EE5:
test	ecx, ecx
jz	short loc_669EF1
mov	eax, [edi+0Ch]
mov	[ecx], eax
add	[eax+8], edx

loc_669EF1:
add	ecx, 4
sub	esi, edx
jnz	short loc_669EE5

loc_669EF8:
pop	edi
pop	esi
pop	ebx
retn	4
sub_669EC0 endp

align 10h



sub_669F00 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_669F1C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_669F31
push	esi
jmp	short loc_669F2B

loc_669F1C:
cmp	esi, [edi+8]
jb	short loc_669F31
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_669F2B:
push	edi
call	sub_6CE350

loc_669F31:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_669F55
sub	esi, ebx
mov	eax, [edi]
lea	edx, [ebx+ebx*2]
lea	eax, [eax+edx*4]
jz	short loc_669F55
xor	ecx, ecx

loc_669F46:
cmp	eax, ecx
jz	short loc_669F4D
mov	[eax+8], ecx

loc_669F4D:
add	eax, 0Ch
sub	esi, 1
jnz	short loc_669F46

loc_669F55:
pop	edi
pop	esi
pop	ebx
retn	4
sub_669F00 endp

align 10h



sub_669F60 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_669F79
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_669F8E
push	esi
jmp	short loc_669F88

loc_669F79:
cmp	esi, [edi+8]
jb	short loc_669F8E
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_669F88:
push	edi
call	sub_6CE350

loc_669F8E:
mov	eax, [edi]
lea	edx, [esi+esi*2]
mov	[edi+4], esi
lea	eax, [eax+edx*4-0Ch]
pop	edi
pop	esi
test	eax, eax
jz	short locret_669FB4
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
mov	[eax+8], ecx

locret_669FB4:
retn	4
sub_669F60 endp

align 10h



sub_669FC0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_66A069
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [edi+0F4h]
lea	esp, [esp+0]

loc_669FE0:
cmp	dword ptr [esi+208h], 14h
jb	short loc_66A024
mov	eax, [esi+204h]
lea	edx, [eax+13h]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_66A01A
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_66A03D

loc_66A01A:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_66A03D

loc_66A024:
mov	ecx, [esi]
push	0
push	4
push	14h
test	ecx, ecx
jnz	short loc_66A036
mov	ecx, dword_1855FC0

loc_66A036:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_66A03D:
test	eax, eax
jz	short loc_66A04C
push	ebp
push	edi
mov	ecx, eax
call	sub_6A2830
jmp	short loc_66A04E

loc_66A04C:
xor	eax, eax

loc_66A04E:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_669FE0
pop	esi
pop	ebp

loc_66A069:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_669FC0 endp




sub_66A070 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_66A11C
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [edi+0F4h]
lea	esp, [esp+0]

loc_66A090:
cmp	dword ptr [esi+208h], 14h
jb	short loc_66A0D4
mov	eax, [esi+204h]
lea	edx, [eax+13h]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_66A0CA
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_66A0ED

loc_66A0CA:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_66A0ED

loc_66A0D4:
mov	ecx, [esi]
push	0
push	4
push	14h
test	ecx, ecx
jnz	short loc_66A0E6
mov	ecx, dword_1855FC0

loc_66A0E6:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_66A0ED:
test	eax, eax
jz	short loc_66A0FF
mov	ecx, [ebp+0]
push	ecx
push	edi
mov	ecx, eax
call	sub_6A27F0
jmp	short loc_66A101

loc_66A0FF:
xor	eax, eax

loc_66A101:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_66A090
pop	esi
pop	ebp

loc_66A11C:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_66A070 endp

align 10h



sub_66A130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
mov	ecx, esi
shl	ecx, 4
cmp	dword ptr [ecx+edi+8], 0FFFFFFFEh
lea	ecx, [ecx+edi+8]
mov	eax, esi
jz	short loc_66A191
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_66A191
push	ebp
jmp	short loc_66A160
align 10h

loc_66A160:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_66A175
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_66A18A

loc_66A175:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_66A187
mov	ecx, eax
shl	ecx, 4
lea	ecx, [ecx+edi+8]
jmp	short loc_66A160

loc_66A187:
or	eax, 0FFFFFFFFh

loc_66A18A:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_66A191:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_66A130 endp

align 10h



sub_66A1A0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_66A1C2
call	sub_662560
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_66A1C2:
push	esi
cmp	eax, 8
jnb	short loc_66A1CF
mov	esi, 8
jmp	short loc_66A234

loc_66A1CF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_66A1E2
fadd	ds:flt_15FCC08

loc_66A1E2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_66A234:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*8]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_66A294
xor	eax, eax
jmp	short loc_66A280
align 10h

loc_66A280:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 18h
sub	esi, 1
jnz	short loc_66A280

loc_66A294:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_66A309
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_66A2A7

loc_66A2A3:
mov	edi, [esp+1Ch+var_C]

loc_66A2A7:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_66A2E8
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_66ABD0
lea	ecx, [esi+4]
call	sub_652830
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66A2E2
call	sub_650DF0

loc_66A2E2:
mov	dword ptr [edi], 0FFFFFFFEh

loc_66A2E8:
add	ebx, 18h
sub	ebp, 1
jnz	short loc_66A2A3
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_66A309:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_6691A0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_66A1A0 endp

align 10h



sub_66A330 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+324h]
xor	ebp, ebp
mov	ebx, ecx
cmp	eax, ebp
jnz	short loc_66A348
lea	eax, [esi+28h]

loc_66A348:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	edi
push	ebp
mov	[esp+14h+arg_0], eax
mov	eax, [edx+28h]
push	18h
call	eax
cmp	eax, ebp
jz	short loc_66A384
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1432E60
mov	[eax+8], ebp
mov	[eax+0Ch], ebp
mov	[eax+10h], ebp
mov	[eax+14h], ebp
mov	edi, eax
jmp	short loc_66A386

loc_66A384:
xor	edi, edi

loc_66A386:
mov	ecx, [ebx+4]
cmp	ecx, ebp
jz	short loc_66A392
call	sub_64A430

loc_66A392:
mov	[ebx+4], edi
mov	eax, [esi+324h]
pop	edi
cmp	eax, ebp
jnz	short loc_66A3A3
lea	eax, [esi+28h]

loc_66A3A3:
mov	ecx, eax
call	sub_6A9860
mov	ecx, [esi+324h]
cmp	ecx, ebp
jnz	short loc_66A3B7
lea	ecx, [esi+28h]

loc_66A3B7:
mov	edx, [ecx+30h]
sub	edx, [ecx+34h]
sub	edx, [ecx+2Ch]
mov	ecx, [ebx+4]
add	edx, eax
mov	eax, [esp+0Ch+arg_0]
push	edx
push	eax
call	sub_669780
pop	esi
pop	ebp
pop	ebx
retn	4
sub_66A330 endp

align 10h



sub_66A3E0 proc	near
mov	eax, [ecx+4]
mov	ecx, [ecx]
shr	eax, 1Fh
test	al, 1
jz	short loc_66A3F5
test	ecx, ecx
jz	short locret_66A3FE
jmp	sub_64B3B0

loc_66A3F5:
test	ecx, ecx
jz	short locret_66A3FE
jmp	sub_64A400

locret_66A3FE:
retn
sub_66A3E0 endp

align 10h



sub_66A400 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_4]
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1432E64
test	edi, edi
jz	short loc_66A426
mov	ecx, edi
call	sub_64A420

loc_66A426:
mov	eax, [esp+8+arg_0]
mov	[esi+8], edi
mov	eax, [eax]
mov	dword ptr [esi+0Ch], 0
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi+14h], 0
add	eax, 8
mov	eax, [eax]
mov	[esi+18h], eax
inc	dword ptr [eax+8]
pop	edi
mov	dword ptr [esi+1Ch], 0FFFFFFFFh
mov	eax, esi
pop	esi
retn	8
sub_66A400 endp

align 10h



sub_66A460 proc	near

var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi+40h]
mov	ecx, [esp+14h+arg_4]
cmp	[ecx], eax
jz	short loc_66A484
mov	[ecx], eax
mov	eax, [esp+14h+arg_0]
mov	dword ptr [eax], 1
pop	esi
add	esp, 10h
retn	8

loc_66A484:
mov	eax, [esi+24h]
push	ebp
mov	ebp, [esp+18h+arg_0]
mov	ecx, [ebp+0]
cmp	ecx, eax
jnb	short loc_66A49F
inc	ecx
mov	[ebp+0], ecx
pop	ebp
pop	esi
add	esp, 10h
retn	8

loc_66A49F:
inc	dword ptr [esi+3Ch]
lea	edx, [eax+1]
mov	eax, [esi+2Ch]
push	edi
mov	edi, [esi+8]
mov	[esi+24h], edx
cmp	edi, eax
jb	short loc_66A4B5
mov	eax, edi

loc_66A4B5:
mov	ecx, [esi+44h]
mov	[esi+2Ch], eax
test	ecx, ecx
jz	short loc_66A4C4
cmp	edi, [esi+28h]
ja	short loc_66A4DF

loc_66A4C4:
mov	eax, [esi+48h]
test	eax, eax
jz	loc_66A577
cmp	edx, eax
jb	loc_66A577
cmp	edi, ecx
jbe	loc_66A577

loc_66A4DF:
lea	ecx, [esp+1Ch+var_8]
push	ecx
mov	ecx, esi
mov	[esp+20h+var_4], 0
mov	[esp+20h+var_8], 0
call	sub_64B110
mov	eax, [esi+44h]
mov	ecx, [esp+1Ch+var_4]
cmp	ecx, eax
jbe	short loc_66A50C
mov	[esi+2Ch], edi
mov	[esi+28h], eax

loc_66A50C:
mov	eax, edi
sub	eax, ecx
mov	ecx, [esi+28h]
cmp	eax, ecx
jnb	short loc_66A519
mov	eax, ecx

loc_66A519:
mov	[esp+1Ch+arg_0], eax
fild	[esp+1Ch+arg_0]
mov	[esi+28h], eax
test	eax, eax
jge	short loc_66A52E
fadd	ds:dbl_15FCE08

loc_66A52E:
fmul	ds:dbl_1432E68
fnstcw	word ptr [esp+1Ch+arg_0]
movzx	eax, word ptr [esp+1Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_10], eax
fldcw	word ptr [esp+1Ch+var_10]
fistp	[esp+1Ch+var_10]
mov	eax, dword ptr [esp+1Ch+var_10]
mov	ecx, [esi+2Ch]
fldcw	word ptr [esp+1Ch+arg_0]
cmp	ecx, eax
jnb	short loc_66A560
mov	[esi+28h], eax

loc_66A560:
mov	edx, [esi+3Ch]
mov	eax, [esp+1Ch+var_4]
mov	[esi+40h], edx
mov	dword ptr [esi+24h], 0
mov	[esi+38h], ecx
mov	[esi+34h], eax

loc_66A577:
mov	ecx, [esi+24h]
mov	eax, [esp+1Ch+arg_4]
mov	[esi+30h], edi
mov	[ebp+0], ecx
mov	edx, [esi+40h]
pop	edi
pop	ebp
mov	[eax], edx
pop	esi
add	esp, 10h
retn	8
sub_66A460 endp

align 10h



sub_66A5A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
push	edi
lea	eax, [esp+10h+var_8]
mov	esi, ecx
mov	edi, [esi+8]
push	eax
mov	[esp+14h+var_4], 0
mov	[esp+14h+var_8], 0
call	sub_64B110
mov	eax, [esi+2Ch]
mov	dword ptr [esi+24h], 0
mov	[esi+30h], edi
cmp	edi, eax
jnb	short loc_66A5DE
pop	edi
mov	[esi+2Ch], eax
pop	esi
add	esp, 8
retn

loc_66A5DE:
mov	[esi+2Ch], edi
pop	edi
pop	esi
add	esp, 8
retn
sub_66A5A0 endp

align 10h



sub_66A5F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+8]
lea	eax, [esp+18h+var_8]
xor	ebp, ebp
lea	ebx, [esi+8]
push	eax
mov	[esp+1Ch+var_4], ebp
mov	[esp+1Ch+var_8], ebp
call	sub_64B110
mov	eax, [esi+2Ch]
mov	[esi+24h], ebp
cmp	edi, eax
jb	short loc_66A61F
mov	eax, edi

loc_66A61F:
test	byte ptr [esi+20h], 1
mov	[esi+2Ch], eax
mov	[esi+30h], edi
jnz	short loc_66A636
cmp	[ebx], ebp
jnz	short loc_66A636
mov	ecx, ebx
call	sub_74CD90

loc_66A636:
mov	ecx, [esi+44h]
pop	edi
mov	[esi+2Ch], ebp
mov	[esi+28h], ecx
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_66A5F0 endp

align 10h



sub_66A650 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	0
mov	dword ptr [esi], offset	off_1432E70
call	sub_64B110
lea	ecx, [esi+8]
call	sub_74CD90
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_66A684
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_66A684:
mov	eax, esi
pop	esi
retn	4
sub_66A650 endp

align 10h



sub_66A690 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+14h], 1
jbe	loc_66A71E
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
mov	eax, [ecx+eax*4-4]
mov	edx, [esi+1Ch]
push	ebx
push	edi
lea	edi, [esi+10h]
mov	[eax+80h], edx
mov	[esi+1Ch], eax
mov	eax, [edi+4]
lea	ebx, [eax-1]
cmp	ebx, eax
jnb	short loc_66A6CE
mov	eax, [edi+8]
shr	eax, 1
cmp	ebx, eax
jnb	short loc_66A6E3
push	ebx
jmp	short loc_66A6DB

loc_66A6CE:
cmp	ebx, [edi+8]
jb	short loc_66A6E3
mov	ecx, ebx
shr	ecx, 2
add	ecx, ebx
push	ecx

loc_66A6DB:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_66A6E3:
mov	[edi+4], ebx
mov	eax, [edi]
mov	edx, ebx
mov	eax, [eax+edx*4-4]
mov	[esi+4], eax
sub	eax, 0FFFFFF80h
mov	[esi+8], eax
add	eax, 0FFFFFFFCh
mov	[esi], eax
mov	eax, [esi+14h]
cmp	eax, 1
jbe	short loc_66A714
mov	ecx, [edi]
mov	edx, [ecx+eax*4-8]
add	edx, 7Ch
pop	edi
mov	[esi+0Ch], edx
pop	ebx

loc_66A712:
pop	esi
retn

loc_66A714:
mov	eax, [esi+4]
pop	edi
pop	ebx
mov	[esi+0Ch], eax
pop	esi
retn

loc_66A71E:
add	dword ptr [esi], 4
mov	esi, [esi]
jz	short loc_66A712
mov	dword ptr [esi], 0
pop	esi
retn
sub_66A690 endp

align 10h



; int __cdecl sub_66A730(int, char *, int, int)
sub_66A730 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	ebx
mov	ebx, [esp+308h+arg_C]
push	esi
mov	esi, [esp+30Ch+arg_4]
push	edi
mov	edi, [esp+310h+arg_8]
push	eax
lea	ecx, [esp+314h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+314h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+314h+var_304]
call	sub_669FC0
push	ebx
lea	ecx, [esp+314h+var_304]
call	sub_66A070
lea	ecx, [esp+310h+var_304]
call	sub_6A4090
mov	esi, [esp+310h+var_2F8]
lea	ecx, [esp+310h+var_304]
call	sub_6A4940
mov	ecx, [esp+310h+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_66A730 endp

align 10h



sub_66A7C0 proc	near
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+10h]
push	esi
lea	esi, [ebx+10h]
test	ecx, ecx
jnz	short loc_66A7D2
xor	eax, eax
jmp	short loc_66A7EF

loc_66A7D2:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_66A7E0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66A7ED
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_66A7E0

loc_66A7ED:
mov	ecx, esi

loc_66A7EF:
push	edi
mov	edi, ecx
mov	esi, eax

loc_66A7F4:
test	edi, edi
jz	short loc_66A833
mov	eax, [edi]
test	eax, eax
jz	short loc_66A833
cmp	esi, [eax+4]
jg	short loc_66A833
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_652130
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_66A7F4
inc	esi
cmp	esi, eax
ja	short loc_66A7F4
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_66A824:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66A7F4
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_66A824
jmp	short loc_66A7F4

loc_66A833:
mov	ecx, [ebx+14h]
pop	edi
test	ecx, ecx
jz	short loc_66A840
call	sub_64B3B0

loc_66A840:
lea	ecx, [ebx+28h]
call	sub_652130
pop	esi
lea	ecx, [ebx+38h]
pop	ebx
jmp	sub_652130
sub_66A7C0 endp

align 10h



sub_66A860 proc	near
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+10h]
push	esi
lea	esi, [ebx+10h]
test	ecx, ecx
jnz	short loc_66A872
xor	eax, eax
jmp	short loc_66A88F

loc_66A872:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_66A880:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66A88D
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_66A880

loc_66A88D:
mov	ecx, esi

loc_66A88F:
push	edi
mov	edi, ecx
mov	esi, eax

loc_66A894:
test	edi, edi
jz	short loc_66A8D3
mov	eax, [edi]
test	eax, eax
jz	short loc_66A8D3
cmp	esi, [eax+4]
jg	short loc_66A8D3
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_651F70
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_66A894
inc	esi
cmp	esi, eax
ja	short loc_66A894
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_66A8C4:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66A894
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_66A8C4
jmp	short loc_66A894

loc_66A8D3:
mov	ecx, [ebx+14h]
pop	edi
test	ecx, ecx
jz	short loc_66A906
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_66A906
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_66A906:
lea	ecx, [ebx+28h]
call	sub_651F70
pop	esi
lea	ecx, [ebx+38h]
pop	ebx
jmp	sub_651F70
sub_66A860 endp

align 10h



sub_66A920 proc	near
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+10h]
push	esi
lea	esi, [ebx+10h]
test	ecx, ecx
jnz	short loc_66A932
xor	eax, eax
jmp	short loc_66A94F

loc_66A932:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_66A940:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66A94D
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_66A940

loc_66A94D:
mov	ecx, esi

loc_66A94F:
push	edi
mov	edi, ecx
mov	esi, eax

loc_66A954:
test	edi, edi
jz	short loc_66A993
mov	eax, [edi]
test	eax, eax
jz	short loc_66A993
cmp	esi, [eax+4]
jg	short loc_66A993
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_651F00
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_66A954
inc	esi
cmp	esi, eax
ja	short loc_66A954
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_66A984:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66A954
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_66A984
jmp	short loc_66A954

loc_66A993:
mov	ecx, [ebx+14h]
pop	edi
test	ecx, ecx
jz	short loc_66A9B8
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_66A9B8
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_66A9B8:
lea	ecx, [ebx+28h]
call	sub_651F00
pop	esi
lea	ecx, [ebx+38h]
pop	ebx
jmp	sub_651F00
sub_66A920 endp

align 10h



sub_66A9D0 proc	near
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+10h]
push	esi
lea	esi, [ebx+10h]
test	ecx, ecx
jnz	short loc_66A9E2
xor	eax, eax
jmp	short loc_66A9FF

loc_66A9E2:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_66A9F0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66A9FD
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_66A9F0

loc_66A9FD:
mov	ecx, esi

loc_66A9FF:
push	edi
mov	edi, ecx
mov	esi, eax

loc_66AA04:
test	edi, edi
jz	short loc_66AA43
mov	eax, [edi]
test	eax, eax
jz	short loc_66AA43
cmp	esi, [eax+4]
jg	short loc_66AA43
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_652160
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_66AA04
inc	esi
cmp	esi, eax
ja	short loc_66AA04
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_66AA34:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66AA04
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_66AA34
jmp	short loc_66AA04

loc_66AA43:
mov	ecx, [ebx+14h]
pop	edi
test	ecx, ecx
jz	short loc_66AA50
call	sub_64B020

loc_66AA50:
lea	ecx, [ebx+28h]
call	sub_652160
pop	esi
lea	ecx, [ebx+38h]
pop	ebx
jmp	sub_652160
sub_66A9D0 endp

align 10h



sub_66AA70 proc	near
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+10h]
push	esi
lea	esi, [ebx+10h]
test	ecx, ecx
jnz	short loc_66AA82
xor	eax, eax
jmp	short loc_66AA9F

loc_66AA82:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_66AA90:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66AA9D
inc	eax
add	ecx, 18h
cmp	eax, edx
jbe	short loc_66AA90

loc_66AA9D:
mov	ecx, esi

loc_66AA9F:
push	edi
mov	edi, ecx
mov	esi, eax

loc_66AAA4:
test	edi, edi
jz	short loc_66AAE3
mov	eax, [edi]
test	eax, eax
jz	short loc_66AAE3
cmp	esi, [eax+4]
jg	short loc_66AAE3
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*8+10h]
call	sub_651FF0
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_66AAA4
inc	esi
cmp	esi, eax
ja	short loc_66AAA4
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*8+8]

loc_66AAD4:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_66AAA4
inc	esi
add	ecx, 18h
cmp	esi, eax
jbe	short loc_66AAD4
jmp	short loc_66AAA4

loc_66AAE3:
mov	ecx, [ebx+14h]
pop	edi
test	ecx, ecx
jz	short loc_66AB23
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_66AB23
test	eax, 0FFFFFFFh
jbe	short loc_66AB0E
and	eax, 8FFFFFFFh
push	2
jmp	short loc_66AB1A

loc_66AB0E:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_66AB1A:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_66AB23:
lea	ecx, [ebx+28h]
call	sub_651FF0
pop	esi
lea	ecx, [ebx+38h]
pop	ebx
jmp	sub_651FF0
sub_66AA70 endp

align 10h



sub_66AB40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [ecx]
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
lea	ecx, [edi+edi*2]
cmp	dword ptr [ebx+ecx*4+8], 0FFFFFFFEh
lea	esi, [ebx+ecx*4+8]
mov	eax, edi
jz	short loc_66ABC4
mov	ecx, 4
mov	edx, 1505h

loc_66AB64:
movzx	ebp, byte ptr [esi+ecx+3]
imul	edx, 1003Fh
dec	ecx
add	edx, ebp
test	ecx, ecx
ja	short loc_66AB64
and	edx, [ebx+4]
cmp	edx, edi
jnz	short loc_66ABC4
lea	ecx, [ecx+0]

loc_66AB80:
mov	ecx, 4
mov	edx, 1505h
lea	ebx, [ebx+0]

loc_66AB90:
movzx	ebp, byte ptr [esi+ecx+3]
imul	edx, 1003Fh
dec	ecx
add	edx, ebp
test	ecx, ecx
ja	short loc_66AB90
and	edx, [ebx+4]
cmp	edx, edi
jnz	short loc_66ABB4
mov	edx, [esi+4]
mov	ecx, [esp+10h+arg_0]
cmp	edx, [ecx]
jz	short loc_66ABC7

loc_66ABB4:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_66ABC4
lea	edx, [eax+eax*2]
lea	esi, [ebx+edx*4+8]
jmp	short loc_66AB80

loc_66ABC4:
or	eax, 0FFFFFFFFh

loc_66ABC7:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_66AB40 endp

align 10h



sub_66ABD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_66ABE3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_66AC05

loc_66ABE3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_66AC0A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_66AC05:
call	sub_66A1A0

loc_66AC0A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*2]
lea	esi, [ecx+edx*8+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_66AC4C
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
add	ecx, 4
push	ecx
mov	[esi+4], eax
inc	dword ptr [eax+8]
lea	ecx, [esi+8]
call	sub_652330
pop	esi
pop	ebx
retn	0Ch

loc_66AC4C:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax

loc_66AC53:
inc	edi
and	edi, ebp
lea	edx, [edi+edi*2]
cmp	[ecx+edx*8+8], ebx
jnz	short loc_66AC53
mov	ebx, [esi+4]
mov	ebx, [ebx+0Ch]
and	ebx, ebp
lea	edx, [edi+edi*2]
lea	edx, [ecx+edx*8+8]
cmp	ebx, eax
jnz	short loc_66ACBF
test	edx, edx
jz	short loc_66AC8F
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [esi+8]
push	eax
lea	ecx, [edx+8]
call	sub_652330

loc_66AC8F:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [ebp+0]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66ACA7
call	sub_650DF0

loc_66ACA7:
add	ebp, 4
push	ebp
lea	ecx, [esi+8]
mov	[esi+4], ebx
call	sub_652520
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_66ACBF:
lea	ebx, [ebx+ebx*2]
cmp	[ecx+ebx*8+8], eax
lea	ebx, [ecx+ebx*8+8]
jz	short loc_66ACDF
lea	esp, [esp+0]

loc_66ACD0:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[ecx+ebx*8+8], eax
lea	ebx, [ecx+ebx*8+8]
jnz	short loc_66ACD0

loc_66ACDF:
test	edx, edx
jz	short loc_66ACFC
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
lea	ecx, [esi+8]
push	ecx
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	ecx, [edx+8]
call	sub_652330

loc_66ACFC:
mov	[ebx], edi
mov	ebx, [esp+10h+arg_4]
mov	edi, [ebx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66AD15
call	sub_650DF0

loc_66AD15:
add	ebx, 4
push	ebx
lea	ecx, [esi+8]
mov	[esi+4], edi
call	sub_652520
pop	edi
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_66ABD0 endp

align 10h



sub_66AD40 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx]
inc	dword ptr [edi+8]
mov	esi, ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66AD5B
call	sub_650DF0

loc_66AD5B:
mov	[esi], edi
mov	eax, [ebx+4]
mov	[esi+4], eax
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_66AD77
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_66AD77:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66AD83
call	sub_64B3B0

loc_66AD83:
mov	edx, [ebx+8]
pop	edi
mov	[esi+8], edx
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_66AD40 endp

align 10h



sub_66ADA0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	edx, [esp+10h+arg_4]
mov	eax, [edx]
push	esi
mov	esi, [ecx]
push	edi
add	eax, 148h
lea	edi, [esp+18h+var_10]
push	edi
push	eax
mov	eax, [esi+2Ch]
push	edx
mov	[esp+24h+var_10], 0
call	eax
mov	esi, [esp+18h+arg_0]
mov	ecx, edi
test	al, al
jz	short loc_66ADE6
push	0
push	esi
call	sub_652DC0
mov	ecx, edi
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
add	esp, 10h
retn	8

loc_66ADE6:
mov	byte ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
add	esp, 10h
retn	8
sub_66ADA0 endp

align 10h



sub_66AE10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+4]
push	eax
mov	esi, ecx
call	sub_663A90
mov	edx, [esp+8+arg_4]
mov	dword ptr [esi], offset	off_1432ECC
mov	dword ptr [esi+10h], offset off_1432E78
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx
mov	[esi+34h], edi
mov	dword ptr [esi+38h], 0
mov	[esi+3Ch], edx
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+40h]
mov	byte ptr [ecx+8], 0
mov	eax, [edx]
mov	[ecx], eax
test	eax, eax
jz	short loc_66AE6E
push	ebp
mov	ebp, [eax+8]
inc	ebp
and	ebp, 8FFFFFFFh
mov	[eax+8], ebp
pop	ebp

loc_66AE6E:
mov	dword ptr [ecx+4], 0
mov	eax, [edx+4]
test	eax, eax
jz	short loc_66AE8C
mov	dl, [edx+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_66AE8C:
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_66AEA4
call	sub_64B3B0

loc_66AEA4:
mov	[esi+18h], edi
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_66AE10 endp

align 10h



sub_66AEB0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_66DBF0
sub_66AEB0 endp

align 10h



sub_66AEC0 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+0Ch]
jmp	eax
sub_66AEC0 endp

align 10h



sub_66AED0 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+28h]
jmp	eax
sub_66AED0 endp

align 10h



sub_66AEE0 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+10h]
jmp	eax
sub_66AEE0 endp

align 10h



sub_66AEF0 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+2Ch]
jmp	eax
sub_66AEF0 endp

align 10h



sub_66AF00 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+14h]
jmp	eax
sub_66AF00 endp

align 10h



sub_66AF10 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+18h]
jmp	eax
sub_66AF10 endp

align 10h



sub_66AF20 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+1Ch]
jmp	eax
sub_66AF20 endp

align 10h



sub_66AF30 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
mov	eax, [eax+20h]
add	ecx, 10h
jmp	eax
sub_66AF30 endp

align 10h



sub_66AF40 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx+10h]
add	ecx, 10h
mov	eax, [eax+24h]
jmp	eax
sub_66AF40 endp

align 10h



sub_66AF50 proc	near
push	esi
mov	esi, ecx
call	sub_6626E0
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_66AF7C
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_66AF7C
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_66AF7C:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_66AFA0
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_66AFA0
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_66AFA0:
lea	ecx, [esi+40h]
pop	esi
jmp	sub_67BFB0
sub_66AF50 endp

align 10h



sub_66AFB0 proc	near
push	esi
mov	esi, ecx
call	sub_6625C0
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_66AFEA
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_66AFEA
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_66AFEA:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_66B01C
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_66B01C
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_66B01C:
lea	ecx, [esi+40h]
pop	esi
jmp	sub_67C000
sub_66AFB0 endp

align 10h



sub_66B030 proc	near
push	esi
mov	esi, ecx
call	sub_6627F0
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_66B077
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_66B077
test	eax, 0FFFFFFFh
jbe	short loc_66B062
and	eax, 8FFFFFFFh
push	2
jmp	short loc_66B06E

loc_66B062:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_66B06E:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_66B077:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_66B0C6
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_66B0C6
test	eax, 0FFFFFFFh
jbe	short loc_66B0B1
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx
lea	ecx, [esi+40h]
pop	esi
jmp	sub_67C070

loc_66B0B1:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	4
call	edx

loc_66B0C6:
lea	ecx, [esi+40h]
pop	esi
jmp	sub_67C070
sub_66B030 endp

align 10h



sub_66B0D0 proc	near
push	esi
mov	esi, ecx
call	sub_662CF0
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_66B0E4
call	sub_64B3B0

loc_66B0E4:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_66B0F0
call	sub_64B3B0

loc_66B0F0:
lea	ecx, [esi+40h]
pop	esi
jmp	sub_67C1F0
sub_66B0D0 endp

align 10h



sub_66B100 proc	near
push	esi
mov	esi, ecx
call	sub_662DF0
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_66B114
call	sub_64B020

loc_66B114:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_66B120
call	sub_64B020

loc_66B120:
lea	ecx, [esi+40h]
pop	esi
jmp	sub_67C210
sub_66B100 endp

align 10h



sub_66B130 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_66B165 ; default
jmp	ds:off_66B168[eax*4] ; switch jump

loc_66B140:		; jumptable 0066B139 case 0
call	sub_66B0D0
retn	4

loc_66B148:		; jumptable 0066B139 case 1
call	sub_66AFB0
retn	4

loc_66B150:		; jumptable 0066B139 case 2
call	sub_66AF50
retn	4

loc_66B158:		; jumptable 0066B139 case 3
call	sub_66B100
retn	4

loc_66B160:		; jumptable 0066B139 case 4
call	sub_66B030

locret_66B165:		; default
retn	4
sub_66B130 endp

off_66B168 dd offset loc_66B140	; jump table for switch	statement
dd offset loc_66B148
dd offset loc_66B150
dd offset loc_66B158
dd offset loc_66B160
align 10h



sub_66B180 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
xor	edx, edx
mov	[esi+8], dl
mov	eax, [ecx+30h]
mov	[esi], eax
cmp	eax, edx
jz	short loc_66B1A2
push	edi
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi
pop	edi

loc_66B1A2:
mov	[esi+4], edx
mov	eax, [ecx+34h]
cmp	eax, edx
jz	short loc_66B1BE
mov	cl, [ecx+38h]
and	cl, 1
movzx	edx, cl
push	edx
push	eax
mov	ecx, esi
call	sub_67C1A0

loc_66B1BE:
mov	eax, esi
pop	esi
retn	8
sub_66B180 endp

align 10h



sub_66B1D0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+34h]
jz	short loc_66B247
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_66B1F1
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_66B1F1:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_66B1FD
call	sub_64B3B0

loc_66B1FD:
mov	edx, [esi+34h]
mov	[esi+38h], edx
test	edi, edi
jz	short loc_66B213
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_66B213:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_66B21F
call	sub_64B3B0

loc_66B21F:
mov	eax, edi
mov	[esi+34h], edi
test	eax, eax
jz	short loc_66B235
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_66B235:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_66B241
call	sub_64B3B0

loc_66B241:
mov	edx, [esi+34h]
mov	[esi+18h], edx

loc_66B247:
pop	edi
pop	esi
retn	4
sub_66B1D0 endp

align 10h



sub_66B250 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+48h], 2
jnz	short loc_66B265
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_66B265
call	sub_64B3B0

loc_66B265:
test	byte ptr [esi+48h], 1
mov	dword ptr [esi+40h], 0
jnz	short loc_66B27E
mov	ecx, [esi+44h]
test	ecx, ecx
jz	short loc_66B27E
call	sub_64B3B0

loc_66B27E:
mov	dword ptr [esi+44h], 0
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_66B291
call	sub_64B3B0

loc_66B291:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_66B29D
call	sub_64B3B0

loc_66B29D:
mov	ecx, esi
pop	esi
jmp	sub_664A30
sub_66B250 endp

align 10h



sub_66B2B0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+2F8h]
push	esi
add	eax, 40h
lea	eax, [eax+eax*2]
mov	esi, [ecx+eax*4+4]
push	edi
lea	edi, [ecx+eax*4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_66B2D7
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_66B2EC
push	esi
jmp	short loc_66B2E4

loc_66B2D7:
cmp	esi, [edi+8]
jb	short loc_66B2EC
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_66B2E4:
push	edi
mov	ecx, edi
call	sub_669100

loc_66B2EC:
mov	eax, [edi]
mov	[edi+4], esi
lea	eax, [eax+esi*4-4]
pop	edi
pop	esi
test	eax, eax
jz	short locret_66B301
mov	ecx, [esp+arg_0]
mov	[eax], ecx

locret_66B301:
retn	4
sub_66B2B0 endp

align 10h



sub_66B310 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 118h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+118h+var_4], eax
push	esi
mov	esi, [esp+11Ch+arg_0]
mov	ecx, [esi+4]
test	ecx, ecx
jz	loc_66B3E5
cmp	byte ptr [esi+0Ah], 0
jz	loc_66B3CC
mov	edx, [esp+11Ch+arg_4]
mov	eax, edx
push	edi
lea	edi, [eax+1]
mov	edi, edi

loc_66B350:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_66B350
sub	eax, edi
cmp	byte ptr [eax+edx-1], 0Ah
pop	edi
jnz	short loc_66B362
dec	eax

loc_66B362:
mov	[esp+11Ch+var_118], edx
lea	edx, [esi+0Ch]
push	edx		; int
mov	[esp+120h+var_114], eax
lea	eax, [esp+120h+var_118]
lea	ecx, [esp+120h+var_104]
push	eax		; int
mov	[esp+124h+var_10C], ecx
lea	ecx, [esp+124h+var_110]
push	offset a01	; "{0} : {1}\n"
push	ecx		; int
mov	[esp+12Ch+var_110], 2
mov	[esp+12Ch+var_108], 100h
call	sub_66A730
mov	ecx, [esi+4]
mov	edx, [ecx]
mov	edx, [edx+4]
add	esp, 10h
lea	eax, [esp+11Ch+arg_8]
push	eax
lea	eax, [esp+120h+var_104]
push	eax
push	20h
call	edx
pop	esi
mov	ecx, [esp+118h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn

loc_66B3CC:
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+11Ch+arg_8]
push	edx
mov	edx, [esp+120h+arg_4]
push	edx
push	20h
call	eax

loc_66B3E5:
mov	ecx, [esp+11Ch+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn
sub_66B310 endp

align 10h



sub_66B400 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 118h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+118h+var_4], eax
push	esi
mov	esi, [esp+11Ch+arg_0]
mov	ecx, [esi+4]
test	ecx, ecx
jz	loc_66B4D5
cmp	byte ptr [esi+0Ah], 0
jz	loc_66B4BC
mov	edx, [esp+11Ch+arg_4]
mov	eax, edx
push	edi
lea	edi, [eax+1]
mov	edi, edi

loc_66B440:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_66B440
sub	eax, edi
cmp	byte ptr [eax+edx-1], 0Ah
pop	edi
jnz	short loc_66B452
dec	eax

loc_66B452:
mov	[esp+11Ch+var_118], edx
lea	edx, [esi+0Ch]
push	edx		; int
mov	[esp+120h+var_114], eax
lea	eax, [esp+120h+var_118]
lea	ecx, [esp+120h+var_104]
push	eax		; int
mov	[esp+124h+var_10C], ecx
lea	ecx, [esp+124h+var_110]
push	offset a01	; "{0} : {1}\n"
push	ecx		; int
mov	[esp+12Ch+var_110], 2
mov	[esp+12Ch+var_108], 100h
call	sub_66A730
mov	ecx, [esi+4]
mov	edx, [ecx]
mov	edx, [edx+4]
add	esp, 10h
lea	eax, [esp+11Ch+arg_8]
push	eax
lea	eax, [esp+120h+var_104]
push	eax
push	21h
call	edx
pop	esi
mov	ecx, [esp+118h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn

loc_66B4BC:
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+11Ch+arg_8]
push	edx
mov	edx, [esp+120h+arg_4]
push	edx
push	21h
call	eax

loc_66B4D5:
mov	ecx, [esp+11Ch+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn
sub_66B400 endp

align 10h



sub_66B4F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	ecx, [esp+arg_0]
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	edi, [esp+3Ch+arg_C]
push	edi
lea	eax, [esp+40h+var_30]
push	eax
call	sub_652DC0
mov	esi, [esp+3Ch+arg_4]
xor	ebx, ebx
cmp	esi, ebx
jz	short loc_66B51C
mov	ecx, esi
call	sub_652060
mov	[esi], bl

loc_66B51C:
mov	ecx, [esp+3Ch+var_30]
cmp	ecx, ebx
jz	loc_66B5DB
mov	edx, [esp+3Ch+arg_8]
mov	eax, [esp+3Ch+arg_10]
mov	[esp+3Ch+var_1C], edx
mov	edx, [esp+3Ch+arg_14]
mov	[esp+3Ch+var_4], edx
mov	edx, [esp+3Ch+arg_18]
push	edx
mov	edx, [esp+40h+var_2C]
mov	[esp+40h+var_8], eax
push	edx
mov	[esp+44h+var_24], offset off_1431764
mov	[esp+44h+var_20], esi
mov	[esp+44h+var_10], bl
mov	[esp+44h+var_18], ebx
mov	[esp+44h+var_14], ebx
mov	[esp+44h+var_C], edi
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+44h+var_24]
push	edx
call	eax
test	[esp+3Ch+var_10], 2
mov	[esp+3Ch+var_24], offset off_1431764
jnz	short loc_66B58E
mov	ecx, [esp+3Ch+var_18]
cmp	ecx, ebx
jz	short loc_66B58E
call	sub_64B3B0

loc_66B58E:
test	[esp+3Ch+var_10], 1
mov	[esp+3Ch+var_18], ebx
jnz	short loc_66B5A6
mov	ecx, [esp+3Ch+var_14]
cmp	ecx, ebx
jz	short loc_66B5A6
call	sub_64B3B0

loc_66B5A6:
test	[esp+3Ch+var_28], 2
jnz	short loc_66B5BA
mov	ecx, [esp+3Ch+var_30]
cmp	ecx, ebx
jz	short loc_66B5BA
call	sub_64B3B0

loc_66B5BA:
test	[esp+3Ch+var_28], 1
mov	[esp+3Ch+var_30], ebx
jnz	short loc_66B5D2
mov	ecx, [esp+3Ch+var_2C]
cmp	ecx, ebx
jz	short loc_66B5D2
call	sub_64B3B0

loc_66B5D2:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 30h
retn

loc_66B5DB:
test	[esp+3Ch+var_28], 1
mov	[esp+3Ch+var_30], ebx
jnz	short loc_66B5F3
mov	ecx, [esp+3Ch+var_2C]
cmp	ecx, ebx
jz	short loc_66B5F3
call	sub_64B3B0

loc_66B5F3:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 30h
retn
sub_66B4F0 endp

align 10h



sub_66B600 proc	near

var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  4

sub	esp, 30h
push	ebx
push	esi
mov	esi, [esp+38h+arg_0]
mov	eax, [esi+18h]
movzx	ecx, byte ptr [eax+7Ch]
push	eax
mov	[esp+3Ch+var_28], ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	ebx, eax
mov	[esp+38h+arg_0], ebx
test	ebx, ebx
jz	loc_66B8E8
push	ebp
push	edi
push	1
mov	ecx, esi
call	sub_651EC0
mov	edi, eax
mov	al, [edi]
mov	[esp+40h+var_2C], 0
cmp	al, 5
jnz	short loc_66B6C0
mov	edx, [esi+18h]
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+4Ch+var_24]
push	eax
mov	ecx, edi
call	sub_652F60
mov	edx, [esi+18h]
push	3FFFFFFFh
push	offset asc_156087C ; ","
lea	ecx, [esp+48h+var_24]
push	ecx
push	edx
lea	eax, [esp+50h+var_1C]
push	eax
call	sub_6B5430
mov	ecx, [eax]
add	esp, 14h
test	ecx, ecx
jz	short loc_66B695
mov	edx, [ecx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ecx+8], edx

loc_66B695:
mov	ecx, [esp+40h+var_1C]
mov	eax, [eax]
mov	[esp+40h+var_2C], eax
test	ecx, ecx
jz	short loc_66B6A8
call	sub_64B3B0

loc_66B6A8:
mov	eax, [esp+40h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66B709
call	sub_650DF0
jmp	short loc_66B709

loc_66B6C0:
cmp	al, 6
jnz	loc_66B7CB
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebp, eax
test	ebp, ebp
jz	short loc_66B709
mov	edx, [ebp+10h]
mov	eax, [edx+8]
lea	ebx, [ebp+10h]
mov	ecx, ebx
call	eax
cmp	eax, 7
jnz	short loc_66B740
mov	ecx, [ebp+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebp+8], ecx
mov	[esp+40h+var_2C], ebp

loc_66B705:
mov	ebx, [esp+40h+arg_0]

loc_66B709:
mov	ecx, [esi+18h]
push	ecx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	ecx, eax
and	cl, 7
cmp	dword ptr [esi+1Ch], 3
mov	byte ptr [esp+40h+arg_0], cl
jnz	loc_66B7D8
xor	eax, eax
cmp	[esp+40h+var_28], 5
setnz	al
dec	eax
jmp	loc_66B7F0

loc_66B740:
mov	edx, [ebx]
mov	eax, [edx+8]
mov	ecx, ebx
call	eax
cmp	eax, 8
jnz	loc_66B8E6
mov	ecx, [esi+18h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+4Ch+var_20]
push	edx
mov	ecx, edi
call	sub_652F60
mov	ecx, [esi+18h]
push	3FFFFFFFh
push	offset asc_156087C ; ","
lea	eax, [esp+48h+var_20]
push	eax
push	ecx
lea	edx, [esp+50h+var_18]
push	edx
call	sub_6B5430
mov	ecx, [eax]
add	esp, 14h
test	ecx, ecx
jz	short loc_66B799
mov	edx, [ecx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ecx+8], edx

loc_66B799:
mov	ecx, [esp+40h+var_18]
mov	eax, [eax]
mov	[esp+40h+var_2C], eax
test	ecx, ecx
jz	short loc_66B7AC
call	sub_64B3B0

loc_66B7AC:
mov	eax, [esp+40h+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_66B705
call	sub_650DF0
jmp	loc_66B705

loc_66B7CB:
cmp	al, 1
jnz	loc_66B8E6
jmp	loc_66B709

loc_66B7D8:
mov	edx, [esi+18h]
push	edx
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	cl, byte ptr [esp+40h+arg_0]

loc_66B7F0:
mov	edi, [esi+18h]
and	al, 7
add	edi, 78h
cmp	[esp+40h+var_2C], 0
mov	[esp+40h+var_2D], al
jnz	short loc_66B836
push	0
mov	[esp+44h+var_4], cl
push	0Ch
lea	ecx, [esp+48h+var_10]
mov	[esp+48h+var_3], al
mov	eax, [ebx]
mov	edx, [eax+20h]
push	ecx
push	edi
mov	ecx, ebx
mov	[esp+50h+var_10], offset off_1432D24
mov	[esp+50h+var_C], ebx
mov	[esp+50h+var_8], edi
call	edx
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 30h
retn

loc_66B836:
mov	eax, [esp+40h+var_2C]
mov	eax, [eax+3Ch]
xor	ebp, ebp
mov	[esp+40h+var_14], eax
test	eax, eax
jle	loc_66B8DD
jmp	short loc_66B850
align 10h

loc_66B850:
mov	ecx, [esp+40h+var_2C]
mov	edx, [ecx+38h]
mov	ecx, [edx+ebp*4]
test	ecx, ecx
jz	short loc_66B8D2
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	edx, [esp+4Ch+var_28]
push	edx
call	sub_652F60
mov	eax, [ebx]
mov	eax, [eax+14h]
lea	ecx, [esp+40h+var_10]
push	ecx
lea	edx, [esp+44h+var_28]
push	edx
push	edi
mov	ecx, ebx
mov	byte ptr [esp+4Ch+var_10], 0
mov	byte ptr [esp+4Ch+var_10+1], 0
call	eax
test	al, al
jz	short loc_66B8B3
mov	al, [esp+40h+var_2D]
mov	edx, [ebx]
mov	edx, [edx+1Ch]
not	al
and	al, byte ptr [esp+40h+var_10+1]
or	al, byte ptr [esp+40h+arg_0]
movzx	ecx, al
push	ecx
lea	eax, [esp+44h+var_28]
push	eax
push	edi
mov	ecx, ebx
call	edx

loc_66B8B3:
lea	ecx, [esp+40h+var_10]
call	sub_652830
mov	eax, [esp+40h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66B8D2
call	sub_650DF0

loc_66B8D2:
inc	ebp
cmp	ebp, [esp+40h+var_14]
jl	loc_66B850

loc_66B8DD:
mov	ecx, [esp+40h+var_2C]
call	sub_64B3B0

loc_66B8E6:
pop	edi
pop	ebp

loc_66B8E8:
pop	esi
pop	ebx
add	esp, 30h
retn
sub_66B600 endp

align 10h



sub_66B8F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
cmp	dword ptr [esi+1Ch], 2
jl	loc_66B9F2
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
mov	edi, eax
call	sub_651EC0
mov	ecx, eax
call	sub_653750
cmp	edi, 320h
jnz	loc_66B9F2
cmp	eax, 2
jnz	loc_66B9F2
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	38h
call	eax
test	eax, eax
jz	short loc_66B981
mov	edx, [esi+18h]
add	edx, 78h
push	offset sub_6683B0
push	edx
mov	ecx, eax
call	sub_67C3D0
mov	edi, eax
jmp	short loc_66B983

loc_66B981:
xor	edi, edi

loc_66B983:
mov	[esp+14h+var_4], 0
mov	[esp+14h+var_C], edi
test	edi, edi
jz	short loc_66B99D
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx

loc_66B99D:
mov	ecx, [esi+4]
lea	edx, [esp+14h+var_C]
push	edx
mov	[esp+18h+var_8], 0
call	sub_652940
test	[esp+14h+var_4], 2
jnz	short loc_66B9C6
mov	ecx, [esp+14h+var_C]
test	ecx, ecx
jz	short loc_66B9C6
call	sub_64B3B0

loc_66B9C6:
test	[esp+14h+var_4], 1
mov	[esp+14h+var_C], 0
jnz	short loc_66B9E2
mov	ecx, [esp+14h+var_8]
test	ecx, ecx
jz	short loc_66B9E2
call	sub_64B3B0

loc_66B9E2:
test	edi, edi
jz	short loc_66B9F2
mov	ecx, edi
pop	edi
pop	esi
add	esp, 0Ch
jmp	sub_64B3B0

loc_66B9F2:
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_66B8F0 endp

align 10h



; int __cdecl sub_66BA00(int, int, float)
sub_66BA00 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

sub	esp, 38h
push	ebp
push	esi
mov	esi, [esp+40h+arg_0]
mov	ebp, 1
cmp	[esi+1Ch], ebp
jnz	loc_66BCD2
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
push	ebx
call	edx
mov	[esp+44h+var_34], eax
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_66BCD1
mov	ecx, [ebx+8]
add	ecx, ebp
push	edi
and	ecx, 8FFFFFFFh
mov	[ebx+8], ecx
mov	edx, [esi+18h]
push	0
mov	byte ptr [esp+4Ch+var_10], 0
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
push	ebp
push	offset asc_156C750 ; "x"
mov	byte ptr [esp+54h+arg_0], 0
lea	edi, [ebx+10h]
call	sub_650E40
mov	[esp+48h+var_30], eax
add	[eax+8], ebp
mov	edx, [edi]
mov	edx, [edx+10h]
lea	eax, [esp+48h+var_10]
push	eax
mov	eax, [esi+18h]
lea	ecx, [esp+4Ch+var_30]
push	ecx
push	eax
mov	ecx, edi
call	edx
mov	byte ptr [esp+40h+var_30+3], al
mov	eax, dword ptr [esp+40h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BAB4
call	sub_650DF0

loc_66BAB4:
cmp	byte ptr [esp+40h+var_30+3], 0
jz	short loc_66BAE6
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+44h+var_8]
call	sub_653400
fstp	[esp+40h+arg_8]
fld	[esp+40h+arg_8]
mov	eax, [esp+40h+var_2C]
fsub	dword ptr [eax+80h]
mov	byte ptr [esp+40h+arg_8], 1
fdiv	dword ptr [eax+78h]
fstp	dword ptr [esp+40h+var_28+4]

loc_66BAE6:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	0
push	ebp
push	offset aY_1	; "y"
call	sub_650E40
lea	ecx, [esp+40h+var_8]
push	ecx
mov	dword ptr [esp+44h+var_28], eax
add	[eax+8], ebp
mov	ecx, [esi+18h]
mov	eax, [edi]
lea	edx, [esp+44h+var_28]
push	edx
mov	edx, [eax+10h]
push	ecx
mov	ecx, edi
call	edx
mov	byte ptr [esp+48h+var_38+3], al
mov	eax, [esp+48h+var_30]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BB37
call	sub_650DF0

loc_66BB37:
cmp	byte ptr [esp+48h+var_38+3], 0
jz	short loc_66BB66
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+4Ch+var_10]
call	sub_653400
fstp	[esp+48h+arg_0]
mov	ecx, [esp+48h+var_34]
fld	[esp+48h+arg_0]
fsub	dword ptr [ecx+84h]
fdiv	dword ptr [ecx+7Ch]
fstp	dword ptr [esp+48h+var_28]
jmp	short loc_66BB75

loc_66BB66:
cmp	byte ptr [esp+48h+arg_0], 0
jz	loc_66BCBA
mov	ecx, [esp+48h+var_34]

loc_66BB75:
fld	dword ptr [esp+48h+var_28]
mov	edx, [ecx]
mov	edx, [edx+0C4h]
push	0
sub	esp, 8
fstp	[esp+54h+var_50]
lea	eax, [esp+54h+var_1C]
fld	[esp+54h+var_2C]
fstp	[esp+54h+var_54]
push	eax
call	edx
test	al, al
jz	loc_66BCBA
fld	[esp+48h+var_1C]
mov	ebp, [edi]
lea	eax, [esp+48h+arg_0]
fstp	[esp+48h+var_28]
push	eax
lea	ecx, [esp+4Ch+var_2C]
push	ecx
mov	ecx, [esi+18h]
push	offset asc_156C750 ; "x"
lea	edx, [esp+54h+var_30]
push	edx
mov	byte ptr [esp+58h+var_2C], 3
mov	byte ptr [esp+58h+arg_0], 0
add	ebp, 0Ch
call	sub_651CB0
mov	edx, [ebp+0]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+40h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BBF5
call	sub_650DF0

loc_66BBF5:
lea	ecx, [esp+40h+var_28+4]
call	sub_652830
fld	[esp+40h+var_10]
mov	ebp, [edi]
fstp	qword ptr [esp+20h]
lea	eax, [esp+40h+arg_8]
push	eax
lea	ecx, [esp+44h+var_28+4]
push	ecx
mov	ecx, [esi+18h]
push	offset aY_1	; "y"
lea	edx, [esp+4Ch+var_28]
push	edx
mov	byte ptr [esp+50h+var_28+4], 3
mov	byte ptr [esp+50h+arg_8], 0
add	ebp, 0Ch
call	sub_651CB0
mov	edx, [ebp+0]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+40h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BC53
call	sub_650DF0

loc_66BC53:
lea	ecx, [esp+40h+var_28+4]
call	sub_652830
fld	[esp+40h+var_C]
mov	ebp, [edi]
fstp	qword ptr [esp+20h]
lea	eax, [esp+40h+arg_8]
push	eax
lea	ecx, [esp+44h+var_28+4]
push	ecx
mov	ecx, [esi+18h]
push	offset aZ_0	; "z"
lea	edx, [esp+4Ch+var_28]
push	edx
mov	byte ptr [esp+50h+var_28+4], 3
mov	byte ptr [esp+50h+arg_8], 0
add	ebp, 0Ch
call	sub_651CB0
mov	edx, [ebp+0]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esp+48h+var_30]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BCB1
call	sub_650DF0

loc_66BCB1:
lea	ecx, [esp+48h+var_2C]
call	sub_652830

loc_66BCBA:
lea	ecx, [esp+48h+var_10]
call	sub_652830
pop	edi
mov	ecx, ebx
pop	ebx
pop	esi
pop	ebp
add	esp, 38h
jmp	sub_64B3B0

loc_66BCD1:
pop	ebx

loc_66BCD2:
pop	esi
pop	ebp
add	esp, 38h
retn
sub_66BA00 endp

align 10h


; Attributes: bp-based frame

sub_66BCE0 proc	near

var_88=	qword ptr -88h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	qword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_2C=	word ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	word ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	word ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_4= word ptr	-4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 74h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
cmp	dword ptr [esi+1Ch], 1
push	edi
jl	loc_66C359
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	ebx, eax
mov	[esp+80h+var_4C], ebx
test	ebx, ebx
jz	loc_66C359
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
mov	[esp+80h+var_40], edi
test	edi, edi
jz	loc_66C352
mov	edx, [edi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[edi+8], edx
mov	ebx, [edi+10h]
lea	ecx, [esp+80h+var_3C]
push	ecx
mov	ecx, [esi+18h]
xor	eax, eax
add	edi, 10h
push	offset aTextcolor ; "textColor"
lea	edx, [esp+88h+var_50]
push	edx
mov	[esp+8Ch+var_4], ax
mov	byte ptr [esp+8Ch+var_3C], al
add	ebx, 10h
call	sub_651CB0
mov	edx, [ebx]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+80h+var_50]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BDA3
call	sub_650DF0

loc_66BDA3:
test	bl, bl
jz	short loc_66BDF7
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66BDF7
fld	[esp+80h+var_48]
or	[esp+80h+var_4], 1
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	ecx, dword ptr [esp+80h+var_48]
mov	dword ptr [esp+80h+var_2C], ecx
fldcw	word ptr [esp+80h+var_50]

loc_66BDF7:
mov	ebx, [edi]
mov	ecx, [esi+18h]
lea	edx, [esp+80h+var_3C]
push	edx
push	offset aBackgroundcolo ; "backgroundColor"
lea	eax, [esp+88h+var_48]
push	eax
add	ebx, 10h
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BE36
call	sub_650DF0

loc_66BE36:
test	bl, bl
jz	short loc_66BE8A
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66BE8A
fld	[esp+80h+var_48]
or	[esp+80h+var_4], 2
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	ecx, dword ptr [esp+80h+var_48]
mov	[esp+80h+var_28], ecx
fldcw	word ptr [esp+80h+var_50]

loc_66BE8A:
mov	ebx, [edi]
mov	ecx, [esi+18h]
lea	edx, [esp+80h+var_3C]
push	edx
push	offset aIndexbackgroun ; "indexBackgroundColor"
lea	eax, [esp+88h+var_48]
push	eax
add	ebx, 10h
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BEC9
call	sub_650DF0

loc_66BEC9:
test	bl, bl
jz	short loc_66BF1D
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66BF1D
fld	[esp+80h+var_48]
or	[esp+80h+var_4], 4
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	ecx, dword ptr [esp+80h+var_48]
mov	[esp+80h+var_24], ecx
fldcw	word ptr [esp+80h+var_50]

loc_66BF1D:
mov	ebx, [edi]
mov	ecx, [esi+18h]
lea	edx, [esp+80h+var_3C]
push	edx
push	offset aSelectedtextco ; "selectedTextColor"
lea	eax, [esp+88h+var_48]
push	eax
add	ebx, 10h
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BF5C
call	sub_650DF0

loc_66BF5C:
test	bl, bl
jz	short loc_66BFB0
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66BFB0
fld	[esp+80h+var_48]
or	[esp+80h+var_4], 8
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	ecx, dword ptr [esp+80h+var_48]
mov	dword ptr [esp+80h+var_20], ecx
fldcw	word ptr [esp+80h+var_50]

loc_66BFB0:
mov	ebx, [edi]
mov	ecx, [esi+18h]
lea	edx, [esp+80h+var_3C]
push	edx
push	offset aSelectedtextba ; "selectedTextBackgroundColor"
lea	eax, [esp+88h+var_48]
push	eax
add	ebx, 10h
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66BFEF
call	sub_650DF0

loc_66BFEF:
test	bl, bl
jz	short loc_66C043
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66C043
fld	[esp+80h+var_48]
or	[esp+80h+var_4], 10h
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	ecx, dword ptr [esp+80h+var_48]
mov	[esp+80h+var_1C], ecx
fldcw	word ptr [esp+80h+var_50]

loc_66C043:
mov	ebx, [edi]
mov	ecx, [esi+18h]
lea	edx, [esp+80h+var_3C]
push	edx
push	offset aSelectedindexb ; "selectedIndexBackgroundColor"
lea	eax, [esp+88h+var_48]
push	eax
add	ebx, 10h
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66C082
call	sub_650DF0

loc_66C082:
test	bl, bl
jz	short loc_66C0D6
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66C0D6
fld	[esp+80h+var_48]
or	[esp+80h+var_4], 20h
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	ecx, dword ptr [esp+80h+var_48]
mov	[esp+80h+var_18], ecx
fldcw	word ptr [esp+80h+var_50]

loc_66C0D6:
mov	ebx, [edi]
mov	ecx, [esi+18h]
lea	edx, [esp+80h+var_3C]
push	edx
push	offset aFontsize ; "fontSize"
lea	eax, [esp+88h+var_48]
push	eax
add	ebx, 10h
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66C115
call	sub_650DF0

loc_66C115:
test	bl, bl
jz	short loc_66C169
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66C169
fld	[esp+80h+var_48]
or	[esp+80h+var_4], 40h
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	ecx, dword ptr [esp+80h+var_48]
mov	[esp+80h+var_C], ecx
fldcw	word ptr [esp+80h+var_50]

loc_66C169:
mov	ebx, [edi]
mov	ecx, [esi+18h]
lea	edx, [esp+80h+var_3C]
push	edx
push	offset aReadingwindowt ; "readingWindowTextColor"
lea	eax, [esp+88h+var_48]
push	eax
add	ebx, 10h
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66C1A8
call	sub_650DF0

loc_66C1A8:
test	bl, bl
jz	short loc_66C200
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66C200
fld	[esp+80h+var_48]
mov	ecx, 80h
or	[esp+80h+var_4], cx
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	edx, dword ptr [esp+80h+var_48]
mov	dword ptr [esp+80h+var_14], edx
fldcw	word ptr [esp+80h+var_50]

loc_66C200:
mov	ebx, [edi]
lea	eax, [esp+80h+var_3C]
push	eax
push	offset aReadingwindowb ; "readingWindowBackgroundColor"
lea	ecx, [esp+88h+var_48]
push	ecx
mov	ecx, [esi+18h]
add	ebx, 10h
call	sub_651CB0
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
push	edx
mov	ecx, edi
call	eax
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66C23F
call	sub_650DF0

loc_66C23F:
test	bl, bl
jz	short loc_66C297
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66C297
fld	[esp+80h+var_48]
mov	edx, 100h
or	[esp+80h+var_4], dx
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	eax, dword ptr [esp+80h+var_48]
mov	[esp+80h+var_10], eax
fldcw	word ptr [esp+80h+var_50]

loc_66C297:
mov	ebx, [edi]
lea	ecx, [esp+80h+var_3C]
push	ecx
mov	ecx, [esi+18h]
push	offset aReadingwindowf ; "readingWindowFontSize"
lea	edx, [esp+88h+var_48]
push	edx
add	ebx, 10h
call	sub_651CB0
mov	edx, [ebx]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, dword ptr [esp+80h+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66C2D6
call	sub_650DF0

loc_66C2D6:
test	bl, bl
jz	short loc_66C32E
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_3C]
call	sub_653400
fst	[esp+80h+var_48]
sub	esp, 8
fstp	[esp+88h+var_88]
call	sub_6519E0
test	al, al
jnz	short loc_66C32E
fld	[esp+80h+var_48]
mov	ecx, 200h
or	[esp+80h+var_4], cx
fnstcw	word ptr [esp+80h+var_50]
movzx	eax, word ptr [esp+80h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+80h+var_48], eax
fldcw	word ptr [esp+80h+var_48]
fistp	[esp+80h+var_48]
mov	edx, dword ptr [esp+80h+var_48]
mov	dword ptr [esp+80h+var_8], edx
fldcw	word ptr [esp+80h+var_50]

loc_66C32E:
mov	ecx, [esp+80h+var_4C]
lea	eax, [esp+80h+var_2C]
push	eax
call	sub_6B5EE0
lea	ecx, [esp+80h+var_3C]
call	sub_652830
mov	ecx, [esp+80h+var_40]
call	sub_64B3B0
mov	ebx, [esp+80h+var_4C]

loc_66C352:
mov	ecx, ebx
call	sub_64A430

loc_66C359:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_66BCE0 endp




sub_66C360 proc	near

var_3C=	byte ptr -3Ch
var_38=	qword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 3Ch
push	ebp
push	esi
mov	esi, [esp+44h+arg_0]
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_66C70A
xor	ecx, ecx
lea	edx, [esp+44h+var_2C]
mov	word ptr [esp+44h+var_4], cx
push	edx
mov	ecx, ebp
call	sub_6B5F20
test	al, al
jz	loc_66C6FE
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_66C3D5
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	edi, eax
jmp	short loc_66C3D7

loc_66C3D5:
xor	edi, edi

loc_66C3D7:
mov	al, byte ptr [esp+48h+var_4]
push	ebx
mov	bl, 3
test	al, 1
jz	short loc_66C42C
mov	edx, [esp+4Ch+var_2C]
and	edx, offset sub_FFFFFF
mov	[esp+4Ch+arg_0], edx
fild	[esp+4Ch+arg_0]
mov	[esp+4Ch+var_3C], bl
test	edx, edx
jge	short loc_66C402
fadd	ds:dbl_15FCE08

loc_66C402:
mov	ecx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	eax, [esp+4Ch+var_3C]
push	eax
add	ecx, 78h
push	offset aTextcolor ; "textColor"
push	ecx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830
mov	al, byte ptr [esp+4Ch+var_4]

loc_66C42C:
mov	dl, al
shr	dl, 1
test	dl, 1
jz	short loc_66C47E
mov	eax, [esp+4Ch+var_28]
and	eax, offset sub_FFFFFF
mov	[esp+4Ch+arg_0], eax
fild	[esp+4Ch+arg_0]
mov	[esp+4Ch+var_3C], bl
test	eax, eax
jge	short loc_66C454
fadd	ds:dbl_15FCE08

loc_66C454:
mov	edx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	ecx, [esp+4Ch+var_3C]
push	ecx
push	offset aBackgroundcolo ; "backgroundColor"
add	edx, 78h
push	edx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830
mov	al, byte ptr [esp+4Ch+var_4]

loc_66C47E:
mov	cl, al
shr	cl, 2
test	cl, 1
jz	short loc_66C4D2
mov	edx, [esp+4Ch+var_24]
and	edx, offset sub_FFFFFF
mov	[esp+4Ch+arg_0], edx
fild	[esp+4Ch+arg_0]
mov	[esp+4Ch+var_3C], bl
test	edx, edx
jge	short loc_66C4A8
fadd	ds:dbl_15FCE08

loc_66C4A8:
mov	ecx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	eax, [esp+4Ch+var_3C]
push	eax
add	ecx, 78h
push	offset aIndexbackgroun ; "indexBackgroundColor"
push	ecx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830
mov	al, byte ptr [esp+4Ch+var_4]

loc_66C4D2:
mov	dl, al
shr	dl, 3
test	dl, 1
jz	short loc_66C525
mov	eax, [esp+4Ch+var_20]
and	eax, offset sub_FFFFFF
mov	[esp+4Ch+arg_0], eax
fild	[esp+4Ch+arg_0]
mov	[esp+4Ch+var_3C], bl
test	eax, eax
jge	short loc_66C4FB
fadd	ds:dbl_15FCE08

loc_66C4FB:
mov	edx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	ecx, [esp+4Ch+var_3C]
push	ecx
push	offset aSelectedtextco ; "selectedTextColor"
add	edx, 78h
push	edx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830
mov	al, byte ptr [esp+4Ch+var_4]

loc_66C525:
mov	cl, al
shr	cl, 4
test	cl, 1
jz	short loc_66C579
mov	edx, [esp+4Ch+var_1C]
and	edx, offset sub_FFFFFF
mov	[esp+4Ch+arg_0], edx
fild	[esp+4Ch+arg_0]
mov	[esp+4Ch+var_3C], bl
test	edx, edx
jge	short loc_66C54F
fadd	ds:dbl_15FCE08

loc_66C54F:
mov	ecx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	eax, [esp+4Ch+var_3C]
push	eax
add	ecx, 78h
push	offset aSelectedtextba ; "selectedTextBackgroundColor"
push	ecx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830
mov	al, byte ptr [esp+4Ch+var_4]

loc_66C579:
mov	dl, al
shr	dl, 5
test	dl, 1
jz	short loc_66C5CC
mov	eax, [esp+4Ch+var_18]
and	eax, offset sub_FFFFFF
mov	[esp+4Ch+arg_0], eax
fild	[esp+4Ch+arg_0]
mov	[esp+4Ch+var_3C], bl
test	eax, eax
jge	short loc_66C5A2
fadd	ds:dbl_15FCE08

loc_66C5A2:
mov	edx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	ecx, [esp+4Ch+var_3C]
push	ecx
push	offset aSelectedindexb ; "selectedIndexBackgroundColor"
add	edx, 78h
push	edx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830
mov	al, byte ptr [esp+4Ch+var_4]

loc_66C5CC:
mov	cl, al
shr	cl, 6
test	cl, 1
jz	short loc_66C616
mov	edx, [esp+4Ch+var_C]
fild	[esp+4Ch+var_C]
mov	[esp+4Ch+var_3C], bl
test	edx, edx
jge	short loc_66C5EC
fadd	ds:dbl_15FCE08

loc_66C5EC:
mov	ecx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	eax, [esp+4Ch+var_3C]
push	eax
add	ecx, 78h
push	offset aFontsize ; "fontSize"
push	ecx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830
mov	al, byte ptr [esp+4Ch+var_4]

loc_66C616:
shr	al, 7
test	al, 1
jz	short loc_66C659
mov	edx, [esp+4Ch+var_14]
fild	[esp+4Ch+var_14]
mov	[esp+4Ch+var_3C], bl
test	edx, edx
jge	short loc_66C633
fadd	ds:dbl_15FCE08

loc_66C633:
mov	ecx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	eax, [esp+4Ch+var_3C]
push	eax
add	ecx, 78h
push	offset aReadingwindowt ; "readingWindowTextColor"
push	ecx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830

loc_66C659:
mov	edx, [esp+4Ch+var_4]
shr	edx, 8
test	dl, 1
jz	short loc_66C6A1
mov	eax, [esp+4Ch+var_10]
fild	[esp+4Ch+var_10]
mov	[esp+4Ch+var_3C], bl
test	eax, eax
jge	short loc_66C67B
fadd	ds:dbl_15FCE08

loc_66C67B:
mov	edx, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	ecx, [esp+4Ch+var_3C]
push	ecx
push	offset aReadingwindowb ; "readingWindowBackgroundColor"
add	edx, 78h
push	edx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830

loc_66C6A1:
mov	eax, [esp+4Ch+var_4]
shr	eax, 9
test	al, 1
jz	short loc_66C6E8
mov	ecx, [esp+4Ch+var_8]
fild	[esp+4Ch+var_8]
mov	[esp+4Ch+var_3C], bl
test	ecx, ecx
jge	short loc_66C6C2
fadd	ds:dbl_15FCE08

loc_66C6C2:
mov	eax, [esi+18h]
fstp	[esp+4Ch+var_38]
lea	edx, [esp+4Ch+var_3C]
push	edx
push	offset aReadingwindowf ; "readingWindowFontSize"
add	eax, 78h
push	eax
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+4Ch+var_3C]
call	sub_652830

loc_66C6E8:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
pop	ebx
test	edi, edi
jz	short loc_66C6FD
mov	ecx, edi
call	sub_64B3B0

loc_66C6FD:
pop	edi

loc_66C6FE:
pop	esi
mov	ecx, ebp
pop	ebp
add	esp, 3Ch
jmp	sub_64A430

loc_66C70A:
pop	esi
pop	ebp
add	esp, 3Ch
retn
sub_66C360 endp




; int __cdecl sub_66C710(int, int, int,	char *)
sub_66C710 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= byte ptr -124h
var_114= byte ptr -114h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 14Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14Ch+var_4], eax
mov	eax, [esp+14Ch+arg_8]
push	ebx
mov	ebx, [esp+150h+arg_0]
push	ebp
push	esi
mov	esi, [esp+158h+arg_C]
mov	[esp+158h+var_128], eax
mov	eax, esi
push	edi
mov	edi, [esp+15Ch+arg_4]
mov	[esp+15Ch+var_138], ebx
mov	[esp+15Ch+var_130], esi
lea	ebp, [eax+1]

loc_66C755:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_66C755
sub	eax, ebp
inc	eax
mov	[esp+15Ch+var_12C], eax
mov	ebp, esi
test	edi, edi
jz	short loc_66C776
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx

loc_66C776:
mov	[esp+15Ch+var_148], edi
test	esi, esi
jz	loc_66C8F9
lea	eax, [esp+15Ch+var_104]
dec	eax
mov	[esp+15Ch+var_13C], eax
jmp	short loc_66C794
align 10h

loc_66C790:
mov	esi, [esp+15Ch+var_130]

loc_66C794:		; int
push	2Eh
push	ebp		; char *
call	_strchr
mov	edi, eax
add	esp, 8
mov	[esp+15Ch+var_140], edi
test	edi, edi
jz	short loc_66C7B5
mov	esi, edi
sub	esi, ebp
inc	esi
inc	edi
mov	[esp+15Ch+var_140], edi
jmp	short loc_66C7BB

loc_66C7B5:
sub	esi, ebp
add	esi, [esp+15Ch+var_12C]

loc_66C7BB:
cmp	esi, 100h
jbe	short loc_66C7C8
mov	esi, 100h

loc_66C7C8:
lea	edx, [esi-1]
push	edx
lea	eax, [esp+160h+var_104]
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+168h+var_13C]
mov	edx, [ebx]
add	esp, 0Ch
lea	eax, [esp+15Ch+var_104]
mov	byte ptr [ecx+esi], 0
mov	[esp+15Ch+var_124], 0
mov	ecx, [edx+280h]
push	eax
mov	ebp, edi
call	sub_651000
mov	esi, [esp+15Ch+var_148]
mov	[esp+15Ch+var_144], eax
inc	dword ptr [eax+8]
mov	edx, [esi+10h]
mov	edx, [edx+2Ch]
lea	eax, [esp+15Ch+var_124]
push	eax
add	esi, 10h
lea	ecx, [esp+160h+var_144]
push	ecx
push	ebx
mov	ecx, esi
call	edx
push	0
test	al, al
jz	short loc_66C842
lea	ecx, [esp+160h+var_124]
call	sub_652C20
test	eax, eax
jz	short loc_66C83E
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_66C83E:
mov	edi, eax
jmp	short loc_66C8A3

loc_66C842:
mov	edx, [ebx]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	34h
call	edx
test	eax, eax
jz	short loc_66C866
mov	ecx, [esp+15Ch+var_128]
push	ecx
push	ebx
mov	ecx, eax
call	sub_663B70
jmp	short loc_66C868

loc_66C866:
xor	eax, eax

loc_66C868:
mov	ecx, [esi]
lea	edx, [esp+15Ch+var_14C+3]
push	edx
mov	[esp+160h+var_134], ecx
push	eax
lea	ecx, [esp+164h+var_114]
mov	edi, eax
mov	byte ptr [esp+164h+var_14C+3], 0
call	sub_652700
mov	ebx, [esp+160h+var_138]
push	eax
lea	eax, [esp+164h+var_144]
push	eax
mov	eax, [esp+168h+var_134]
mov	edx, [eax+28h]
push	ebx
mov	ecx, esi
call	edx
lea	ecx, [esp+15Ch+var_114]
call	sub_652830

loc_66C8A3:
test	edi, edi
jz	short loc_66C8B3
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_66C8B3:
mov	ecx, [esp+15Ch+var_148]
call	sub_64B3B0
mov	eax, [esp+15Ch+var_144]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
mov	[esp+15Ch+var_148], edi
jnz	short loc_66C8D6
call	sub_650DF0

loc_66C8D6:
test	edi, edi
jz	short loc_66C8E1
mov	ecx, edi
call	sub_64B3B0

loc_66C8E1:
lea	ecx, [esp+15Ch+var_124]
call	sub_652830
cmp	[esp+15Ch+var_140], 0
jnz	loc_66C790
mov	edi, [esp+15Ch+var_148]

loc_66C8F9:
test	edi, edi
jz	short loc_66C904
mov	ecx, edi
call	sub_64B3B0

loc_66C904:
mov	ecx, [esp+15Ch+var_4]
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14Ch
retn
sub_66C710 endp

align 10h



; int __thiscall sub_66C920(void *, char)
sub_66C920 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_66C92F
call	sub_64B3B0

loc_66C92F:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_15818F8
jz	short loc_66C945
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_66C945:
mov	eax, esi
pop	esi
retn	4
sub_66C920 endp

align 10h



sub_66C950 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 38h
push	ebx
push	ebp
push	esi
mov	esi, [esp+44h+arg_8]
push	edi
mov	edi, ecx
mov	[esp+48h+var_34], edi
mov	[esp+48h+var_38], 0
test	esi, esi
jz	loc_66CBB6
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_66C998
mov	eax, [esi-78h]
mov	edx, [eax+104h]
lea	ecx, [esi-78h]
call	edx
mov	ebx, eax
mov	[esp+48h+arg_8], ebx
jmp	short loc_66C9A1

loc_66C998:
add	esi, 0FFFFFFF0h
mov	[esp+48h+arg_8], esi
mov	ebx, esi

loc_66C9A1:
mov	eax, [edi+2ACh]
lea	ecx, [esp+48h+var_28]
push	ecx
lea	ecx, [eax+1Ch]
call	sub_669E80
mov	ecx, [eax]
mov	eax, [eax+4]
mov	edi, [esp+48h+arg_4]
mov	[esp+48h+var_30], ecx
mov	[esp+48h+var_2C], eax

loc_66C9C5:
test	ecx, ecx
jz	loc_66CBB2
cmp	dword ptr [ecx], 0
jz	loc_66CBB2
mov	ecx, [ecx]
cmp	eax, [ecx+4]
jg	loc_66CBB2
lea	edx, [eax+eax*2]
lea	eax, [ecx+edx*8]
lea	ecx, [ebx+10h]
lea	ebp, [eax+0Ch]
lea	esi, [eax+10h]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 17h
jnz	loc_66CA86
mov	al, [esi]
cmp	al, 8
jz	short loc_66CA0A
cmp	al, 0Bh
jnz	short loc_66CA24

loc_66CA0A:
or	[esp+48h+var_38], 1
push	edi
lea	eax, [esp+4Ch+var_1C]
push	eax
mov	ecx, esi
call	sub_652DC0
cmp	[eax], ebx
jnz	short loc_66CA24
mov	bl, 1
jmp	short loc_66CA26

loc_66CA24:
xor	bl, bl

loc_66CA26:
test	byte ptr [esp+48h+var_38], 1
jz	short loc_66CA64
and	[esp+48h+var_38], 0FFFFFFFEh
test	[esp+48h+var_14], 2
jnz	short loc_66CA46
mov	ecx, [esp+48h+var_1C]
test	ecx, ecx
jz	short loc_66CA46
call	sub_64B3B0

loc_66CA46:
xor	esi, esi
test	[esp+48h+var_14], 1
mov	[esp+48h+var_1C], esi
jnz	short loc_66CA60
mov	ecx, [esp+48h+var_18]
cmp	ecx, esi
jz	short loc_66CA60
call	sub_64B3B0

loc_66CA60:
mov	[esp+48h+var_18], esi

loc_66CA64:
test	bl, bl
jnz	loc_66CB46
mov	ebx, [esp+48h+arg_8]
lea	ecx, [esp+48h+var_30]
call	sub_662080
mov	eax, [esp+48h+var_2C]
mov	ecx, [esp+48h+var_30]
jmp	loc_66C9C5

loc_66CA86:
cmp	byte ptr [esi],	6
jnz	short loc_66CA9B
push	edi
mov	ecx, esi
call	sub_652C20
cmp	eax, ebx
jz	loc_66CB46

loc_66CA9B:
mov	al, [esi]
cmp	al, 8
jz	short loc_66CAA9
cmp	al, 0Bh
jnz	loc_66CB30

loc_66CAA9:
push	edi
lea	ecx, [esp+4Ch+var_28]
push	ecx
mov	ecx, esi
call	sub_652DC0
mov	ecx, [esp+48h+var_28]
lea	eax, [esp+48h+var_10]
push	eax
mov	eax, [esp+4Ch+var_34]
add	eax, 140h
add	ecx, 10h
push	eax
mov	[esp+50h+var_10], 0
mov	edx, [ecx]
mov	edx, [edx+2Ch]
lea	eax, [edi+78h]
push	eax
call	edx
test	al, al
jz	short loc_66CAF5
cmp	[esp+48h+var_10], 6
jnz	short loc_66CAF5
push	edi
lea	ecx, [esp+4Ch+var_10]
call	sub_652C20
cmp	eax, ebx
jz	short loc_66CB5C

loc_66CAF5:
lea	ecx, [esp+48h+var_10]
call	sub_652830
test	[esp+48h+var_20], 2
jnz	short loc_66CB12
mov	ecx, [esp+48h+var_28]
test	ecx, ecx
jz	short loc_66CB12
call	sub_64B3B0

loc_66CB12:
xor	esi, esi
test	[esp+48h+var_20], 1
mov	[esp+48h+var_28], esi
jnz	short loc_66CB2C
mov	ecx, [esp+48h+var_24]
cmp	ecx, esi
jz	short loc_66CB2C
call	sub_64B3B0

loc_66CB2C:
mov	[esp+48h+var_24], esi

loc_66CB30:
lea	ecx, [esp+48h+var_30]
call	sub_662080
mov	eax, [esp+48h+var_2C]
mov	ecx, [esp+48h+var_30]
jmp	loc_66C9C5

loc_66CB46:
mov	ecx, [ebp+0]
mov	eax, [esp+48h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	[eax], ecx
inc	dword ptr [ecx+8]
pop	ebx
add	esp, 38h
retn	0Ch

loc_66CB5C:
mov	esi, [esp+48h+arg_0]
push	offset a_prototype ; ".prototype"
push	esi
mov	ecx, ebp
call	sub_6514F0
lea	ecx, [esp+48h+var_10]
call	sub_652830
test	[esp+48h+var_20], 2
jnz	short loc_66CB8A
mov	ecx, [esp+48h+var_28]
test	ecx, ecx
jz	short loc_66CB8A
call	sub_64B3B0

loc_66CB8A:
test	[esp+48h+var_20], 1
mov	[esp+48h+var_28], 0
jnz	short loc_66CBA6
mov	ecx, [esp+48h+var_24]
test	ecx, ecx
jz	short loc_66CBA6
call	sub_64B3B0

loc_66CBA6:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 38h
retn	0Ch

loc_66CBB2:
mov	edi, [esp+48h+var_34]

loc_66CBB6:
mov	ecx, [edi+0C0h]
mov	eax, [esp+48h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	[eax], ecx
inc	dword ptr [ecx+8]
pop	ebx
add	esp, 38h
retn	0Ch
sub_66C950 endp

align 10h



sub_66CBD0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
mov	edx, [eax+70h]
push	edi
mov	edi, ecx
mov	ecx, ebx
call	edx
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_66CC3A
cmp	dword ptr [ecx+0Ch], 1
jb	short loc_66CC3A
mov	ecx, [ecx+8]
cmp	byte ptr [ecx],	0
jz	short loc_66CC3A
mov	edx, [eax+78h]
mov	ecx, [edx+294h]
push	esi
lea	esi, [eax+78h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	20h
call	edx
test	eax, eax
jz	short loc_66CC22
mov	edi, [edi+4]
push	edi
push	esi
mov	ecx, eax
call	sub_66A400
mov	esi, eax
jmp	short loc_66CC24

loc_66CC22:
xor	esi, esi

loc_66CC24:
push	4
push	esi
mov	ecx, ebx
call	sub_67F1E0
test	esi, esi
jz	short loc_66CC39
mov	ecx, esi
call	sub_64A400

loc_66CC39:
pop	esi

loc_66CC3A:
pop	edi
pop	ebx
retn	4
sub_66CBD0 endp

align 10h



sub_66CC40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_66CCAE
cmp	dword ptr [eax+0Ch], 1
jb	short loc_66CCAE
mov	eax, [eax+8]
cmp	byte ptr [eax],	0
jz	short loc_66CCAE
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
lea	esi, [eax+78h]
mov	eax, [edx+28h]
push	0
push	20h
call	eax
test	eax, eax
jz	short loc_66CC92
mov	ecx, [ebx+4]
push	ecx
push	esi
mov	ecx, eax
call	sub_66A400
mov	esi, eax
jmp	short loc_66CC94

loc_66CC92:
xor	esi, esi

loc_66CC94:
mov	ecx, [esp+0Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_67F1E0
test	esi, esi
jz	short loc_66CCAC
mov	ecx, esi
call	sub_64A400

loc_66CCAC:
pop	edi
pop	esi

loc_66CCAE:
pop	ebx
retn	8
sub_66CC40 endp

align 10h



sub_66CCC0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_66CD2B
cmp	dword ptr [eax+0Ch], 1
jb	short loc_66CD2B
mov	eax, [eax+8]
cmp	byte ptr [eax],	0
jz	short loc_66CD2B
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
lea	esi, [eax+78h]
mov	eax, [edx+28h]
push	0
push	20h
call	eax
test	eax, eax
jz	short loc_66CD12
mov	ecx, [ebx+4]
push	ecx
push	esi
mov	ecx, eax
call	sub_66A400
mov	esi, eax
jmp	short loc_66CD14

loc_66CD12:
xor	esi, esi

loc_66CD14:
push	2
push	esi
mov	ecx, edi
call	sub_67F1E0
test	esi, esi
jz	short loc_66CD29
mov	ecx, esi
call	sub_64A400

loc_66CD29:
pop	edi
pop	esi

loc_66CD2B:
pop	ebx
retn	4
sub_66CCC0 endp

align 10h



sub_66CD30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [eax]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	ecx
lea	esi, [edi+14h]
push	offset aTagDDoactionlo ; "tag %d: DoActionLoader\n"
push	esi
call	nullsub_2
mov	edx, [edi+20h]
mov	eax, [edx+84h]
push	eax
push	offset aActionsInFrame ; "-- actions in	frame %d\n"
push	esi
call	nullsub_2
mov	ecx, [edi+20h]
mov	edx, [ecx+0Ch]
add	ecx, 8
add	esp, 18h
cmp	edx, 8
jb	short loc_66CD80
mov	eax, [ecx]
lea	esi, [eax+8]
add	edx, 0FFFFFFF8h
mov	[ecx], esi
mov	[ecx+4], edx
jmp	short loc_66CD87

loc_66CD80:
push	8
call	sub_6AB110

loc_66CD87:
xor	esi, esi
cmp	eax, esi
jz	short loc_66CD98
mov	dword ptr [eax], offset	off_1432D2C
mov	[eax+4], esi
mov	esi, eax

loc_66CD98:
push	edi
mov	ecx, esi
call	sub_66A330
push	esi
mov	ecx, edi
call	sub_66B2B0
pop	edi
pop	esi
retn	8
sub_66CD30 endp

align 10h



sub_66CDB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_66CDC4
lea	esi, [edi+28h]

loc_66CDC4:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_66CDDC
push	2
mov	ecx, esi
call	sub_6A9B70

loc_66CDDC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
mov	edx, [esp+0Ch+arg_4]
add	eax, 2
mov	[esi+2Ch], eax
mov	eax, [edx]
push	eax
lea	esi, [edi+14h]
push	offset aTagDDoinitacti ; "  tag	%d: DoInitActionLoader\n"
push	esi
movzx	ebp, cx
call	nullsub_2
push	ebp
push	offset aInitActionsFor ; "  -- init actions for	sprite %d\n"
push	esi
call	nullsub_2
mov	ecx, [edi+20h]
mov	eax, [ecx+0Ch]
add	ecx, 8
add	esp, 18h
cmp	eax, 8
jb	short loc_66CE44
mov	edx, [ecx]
add	eax, 0FFFFFFF8h
lea	esi, [edx+8]
mov	[ecx+4], eax
mov	[ecx], esi
mov	eax, edx
jmp	short loc_66CE4B

loc_66CE44:
push	8
call	sub_6AB110

loc_66CE4B:
test	eax, eax
jz	short loc_66CE60
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], offset	off_1432DE4
mov	ebp, eax
jmp	short loc_66CE62

loc_66CE60:
xor	ebp, ebp

loc_66CE62:
push	edi
mov	ecx, ebp
call	sub_66A330
mov	esi, [edi+31Ch]
add	edi, 318h
inc	esi
cmp	esi, [edi+4]
jnb	short loc_66CE88
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_66CE9D
push	esi
jmp	short loc_66CE95

loc_66CE88:
cmp	esi, [edi+8]
jb	short loc_66CE9D
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_66CE95:
push	edi
mov	ecx, edi
call	sub_669100

loc_66CE9D:
mov	eax, [edi]
lea	eax, [eax+esi*4-4]
mov	[edi+4], esi
test	eax, eax
jz	short loc_66CEAC
mov	[eax], ebp

loc_66CEAC:
pop	edi
pop	esi
pop	ebp
retn	8
sub_66CDB0 endp

align 10h



sub_66CEC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1432E64
mov	ecx, [esi+18h]
add	dword ptr [ecx+8], 0FFFFFFFFh
lea	edi, [esi+0Ch]
jnz	short loc_66CEDB
call	sub_650DF0

loc_66CEDB:
mov	ecx, edi
call	sub_65E2F0
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66CEEE
call	sub_64A430

loc_66CEEE:
mov	ecx, esi
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_66CF0A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_66CF0A:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_66CEC0 endp

align 10h



sub_66CF20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	eax, [ebp+8]
cmp	dword ptr [eax+0Ch], 1
push	edi
jb	short loc_66CF38
mov	eax, [eax+8]
cmp	byte ptr [eax],	0
jnz	short loc_66CF3A

loc_66CF38:
xor	eax, eax

loc_66CF3A:
mov	ecx, [ebp+1Ch]
mov	edi, [esp+10h+arg_4]
mov	[esp+10h+var_8], eax
cmp	ecx, edi
jz	loc_66D0C1
push	esi
cmp	ecx, 0FFFFFFFFh
jz	short loc_66CF89
mov	esi, [esp+14h+arg_C]
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
test	al, al
jz	loc_66D0C0
mov	eax, [ebp+1Ch]
mov	ecx, [esp+14h+arg_8]
push	eax
push	ecx
push	edi
push	offset aErrorProcessde ; "Error: ProcessDeclDict(%d, %d) - DeclDi"...
push	esi
call	sub_66B310
add	esp, 14h
pop	esi
pop	edi
pop	ebp
add	esp, 8
retn	10h

loc_66CF89:
mov	[ebp+1Ch], edi
movzx	esi, byte ptr [eax+edi+4]
movzx	edx, byte ptr [eax+edi+3]
shl	esi, 8
or	esi, edx
push	ebx
add	ebp, 0Ch
push	esi
mov	ecx, ebp
mov	[esp+1Ch+arg_4], esi
add	edi, 2
mov	[esp+1Ch+var_4], ebp
call	sub_669EC0
xor	ebx, ebx
test	esi, esi
jbe	loc_66D0BF
jmp	short loc_66CFC4
align 10h

loc_66CFC0:
mov	ebp, [esp+18h+var_4]

loc_66CFC4:
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax]
mov	edx, [esp+18h+var_8]
mov	ecx, [ecx+280h]
lea	eax, [edx+edi+3]
push	eax
call	sub_651000
mov	esi, eax
inc	dword ptr [esi+8]
mov	eax, [esi+8]
mov	ecx, [ebp+0]
inc	eax
lea	ebp, [ecx+ebx*4]
mov	[esi+8], eax
mov	ecx, [ebp+0]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66CFFE
call	sub_650DF0

loc_66CFFE:
mov	[ebp+0], esi
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_66D00E
mov	ecx, esi
call	sub_650DF0

loc_66D00E:
mov	edx, [esp+18h+var_8]
cmp	byte ptr [edx+edi+3], 0
lea	eax, [edx+edi+3]
jz	short loc_66D032
lea	ecx, [ecx+0]

loc_66D020:
cmp	edi, [esp+18h+arg_8]
jnb	short loc_66D044
mov	eax, [esp+18h+var_8]
inc	edi
cmp	byte ptr [eax+edi+3], 0
jnz	short loc_66D020

loc_66D032:
inc	ebx
inc	edi
cmp	ebx, [esp+18h+arg_4]
jb	short loc_66CFC0
pop	ebx
pop	esi
pop	edi
pop	ebp
add	esp, 8
retn	10h

loc_66D044:
mov	esi, [esp+18h+arg_C]
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_66D063
push	offset aErrorActionBuf ; "Error: Action	buffer dict length exceed"...
push	esi
call	sub_66B310
add	esp, 8

loc_66D063:
cmp	ebx, [esp+18h+arg_4]
jnb	short loc_66D0BF
lea	esp, [esp+0]

loc_66D070:
mov	ecx, [esp+18h+arg_0]
mov	edx, [ecx]
mov	ecx, [edx+280h]
push	offset aInvalid_0 ; "<invalid>"
call	sub_651000
mov	ecx, [esp+18h+var_4]
mov	esi, eax
inc	dword ptr [esi+8]
mov	eax, [esi+8]
mov	edx, [ecx]
inc	eax
lea	edi, [edx+ebx*4]
mov	[esi+8], eax
mov	ecx, [edi]
or	ebp, 0FFFFFFFFh
add	[ecx+8], ebp
jnz	short loc_66D0AA
call	sub_650DF0

loc_66D0AA:
mov	[edi], esi
add	[esi+8], ebp
jnz	short loc_66D0B8
mov	ecx, esi
call	sub_650DF0

loc_66D0B8:
inc	ebx
cmp	ebx, [esp+18h+arg_4]
jb	short loc_66D070

loc_66D0BF:
pop	ebx

loc_66D0C0:
pop	esi

loc_66D0C1:
pop	edi
pop	ebp
add	esp, 8
retn	10h
sub_66CF20 endp

align 10h



sub_66D0D0 proc	near
push	esi
mov	esi, [ecx+4]
test	esi, esi
jz	short loc_66D0F6
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_66D0F6:
pop	esi
retn
sub_66D0D0 endp

align 10h



sub_66D100 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
xor	edi, edi
cmp	[esi+4], edi
jnz	short loc_66D12A
mov	ecx, [esi]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	0Ch
call	edx
cmp	eax, edi
jz	short loc_66D125
mov	[eax], edi
mov	[eax+4], edi
mov	[eax+8], edi
jmp	short loc_66D127

loc_66D125:
xor	eax, eax

loc_66D127:
mov	[esi+4], eax

loc_66D12A:
mov	edi, [esi+4]
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_66D142
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_66D157
push	esi
jmp	short loc_66D14F

loc_66D142:
cmp	esi, [edi+8]
jb	short loc_66D157
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_66D14F:
push	edi
mov	ecx, edi
call	sub_669070

loc_66D157:
mov	eax, [esp+8+arg_0]
mov	[edi+4], esi
mov	edi, [edi]
mov	edx, [eax]
mov	[edi+esi*8-8], edx
mov	eax, [eax+4]
mov	[edi+esi*8-4], eax
pop	edi
pop	esi
retn	4
sub_66D100 endp

align 10h



; int __thiscall sub_66D180(void *, char)
sub_66D180 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
test	byte ptr [esi+8], 2
jnz	short loc_66D194
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66D194
call	sub_64B3B0

loc_66D194:
test	byte ptr [esi+8], 1
mov	dword ptr [esi], 0
jnz	short loc_66D1AC
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_66D1AC
call	sub_64B3B0

loc_66D1AC:
test	[esp+4+arg_0], 1
mov	dword ptr [esi+4], 0
jz	short loc_66D1C3
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_66D1C3:
mov	eax, esi
pop	esi
retn	4
sub_66D180 endp

align 10h



sub_66D1D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	ebx, [edi]
mov	esi, ecx
test	ebx, ebx
jle	short loc_66D244
mov	eax, [esi+0A8h]
test	eax, eax
jbe	short loc_66D244
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	edi, edi

loc_66D1F0:
test	ebx, ebx
jl	short loc_66D243
mov	edx, [esi+0A4h]
lea	ecx, [esi+0A4h]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4-0Ch]
mov	edx, [eax+4]
cmp	ebp, edx
jb	short loc_66D229
mov	eax, [eax]
movzx	ebp, byte ptr [eax+2]
movzx	eax, byte ptr [eax+1]
shl	ebp, 8
or	ebp, eax
add	ebp, edx
mov	eax, ebp
mov	ebp, [esp+10h+arg_0]
cmp	ebp, eax
jb	short loc_66D243

loc_66D229:
dec	dword ptr [edi]
mov	edx, [esi+0A8h]
dec	edx
push	edx
call	sub_669F00
mov	eax, [esi+0A8h]
dec	ebx
test	eax, eax
ja	short loc_66D1F0

loc_66D243:
pop	ebp

loc_66D244:
pop	edi
pop	esi
pop	ebx
retn	8
sub_66D1D0 endp

align 10h



sub_66D250 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0A8h]
push	esi
mov	esi, [ecx+0A4h]
add	ecx, 0A4h
lea	edx, [eax+eax*2]
lea	edx, [esi+edx*4-0Ch]
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [edx]
mov	[esi], edi
mov	edi, [edx+4]
mov	edx, [edx+8]
dec	eax
mov	[esi+4], edi
push	eax
mov	[esi+8], edx
call	sub_669F00
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_66D250 endp

align 10h



sub_66D290 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 118h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+118h+var_4], eax
push	esi
push	edi
mov	edi, [esp+120h+arg_0]
mov	esi, [edi+0A0h]
test	esi, esi
jz	loc_66D36A
cmp	dword ptr [esi+4], 0
jz	loc_66D3A3
cmp	byte ptr [esi+0Ah], 0
jz	short loc_66D337
mov	edx, [esp+120h+arg_4]
mov	eax, edx
lea	edi, [eax+1]

loc_66D2D7:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_66D2D7
sub	eax, edi
cmp	byte ptr [eax+edx-1], 0Ah
jnz	short loc_66D2E8
dec	eax

loc_66D2E8:
mov	[esp+120h+var_118], edx
lea	edx, [esi+0Ch]
push	edx		; int
mov	[esp+124h+var_114], eax
lea	eax, [esp+124h+var_118]
lea	ecx, [esp+124h+var_104]
push	eax		; int
mov	[esp+128h+var_10C], ecx
lea	ecx, [esp+128h+var_110]
push	offset a01	; "{0} : {1}\n"
push	ecx		; int
mov	[esp+130h+var_110], 2
mov	[esp+130h+var_108], 100h
call	sub_66A730
mov	ecx, [esi+4]
mov	edx, [ecx]
add	esp, 10h
lea	eax, [esp+120h+arg_8]
push	eax
lea	eax, [esp+124h+var_104]
push	eax
jmp	short loc_66D39C

loc_66D337:
mov	ecx, [esi+4]
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+120h+arg_8]
push	edx
mov	edx, [esp+124h+arg_4]
push	edx
push	20h
call	eax
pop	edi
pop	esi
mov	ecx, [esp+118h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn

loc_66D36A:
mov	ecx, [edi+74h]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
test	eax, eax
jz	short loc_66D3A3
mov	ecx, [edi+74h]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
mov	edx, [eax]
lea	ecx, [esp+120h+arg_8]
push	ecx
mov	ecx, [esp+124h+arg_4]
push	ecx
mov	ecx, eax

loc_66D39C:
mov	edx, [edx+4]
push	20h
call	edx

loc_66D3A3:
mov	ecx, [esp+120h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn
sub_66D290 endp

align 10h



sub_66D3C0 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 118h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+118h+var_4], eax
push	esi
push	edi
mov	edi, [esp+120h+arg_0]
mov	esi, [edi+0A0h]
test	esi, esi
jz	loc_66D49A
cmp	dword ptr [esi+4], 0
jz	loc_66D4D3
cmp	byte ptr [esi+0Ah], 0
jz	short loc_66D467
mov	edx, [esp+120h+arg_4]
mov	eax, edx
lea	edi, [eax+1]

loc_66D407:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_66D407
sub	eax, edi
cmp	byte ptr [eax+edx-1], 0Ah
jnz	short loc_66D418
dec	eax

loc_66D418:
mov	[esp+120h+var_118], edx
lea	edx, [esi+0Ch]
push	edx		; int
mov	[esp+124h+var_114], eax
lea	eax, [esp+124h+var_118]
lea	ecx, [esp+124h+var_104]
push	eax		; int
mov	[esp+128h+var_10C], ecx
lea	ecx, [esp+128h+var_110]
push	offset a01	; "{0} : {1}\n"
push	ecx		; int
mov	[esp+130h+var_110], 2
mov	[esp+130h+var_108], 100h
call	sub_66A730
mov	ecx, [esi+4]
mov	edx, [ecx]
add	esp, 10h
lea	eax, [esp+120h+arg_8]
push	eax
lea	eax, [esp+124h+var_104]
push	eax
jmp	short loc_66D4CC

loc_66D467:
mov	ecx, [esi+4]
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+120h+arg_8]
push	edx
mov	edx, [esp+124h+arg_4]
push	edx
push	21h
call	eax
pop	edi
pop	esi
mov	ecx, [esp+118h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn

loc_66D49A:
mov	ecx, [edi+74h]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
test	eax, eax
jz	short loc_66D4D3
mov	ecx, [edi+74h]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
mov	edx, [eax]
lea	ecx, [esp+120h+arg_8]
push	ecx
mov	ecx, [esp+124h+arg_4]
push	ecx
mov	ecx, eax

loc_66D4CC:
mov	edx, [edx+4]
push	21h
call	edx

loc_66D4D3:
mov	ecx, [esp+120h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 118h
retn
sub_66D3C0 endp

align 10h



sub_66D4F0 proc	near

var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 28h
push	esi
mov	esi, [esp+2Ch+arg_0]
mov	eax, [esi]
push	edi
mov	edi, ecx
mov	ecx, [eax]
mov	edx, [ecx+0Ch]
shr	edx, 19h
test	dl, 1
jnz	loc_66D5C3
push	eax
call	sub_668020
add	esp, 4
test	al, al
jz	loc_66D5C3
mov	eax, [esi]
mov	ecx, [esi+4]
mov	edx, [esi+8]
push	ebx
mov	[esp+34h+var_18], eax
mov	eax, [esi+0Ch]
mov	[esp+34h+var_14], ecx
push	0
mov	[esp+38h+var_C], eax
lea	ecx, [esp+38h+var_28]
mov	[esp+38h+var_10], edx
mov	edx, [esi+14h]
push	0
lea	eax, [esp+3Ch+var_18]
mov	[esp+3Ch+var_8], ecx
push	eax
mov	ecx, edi
mov	[esp+40h+var_28], 0
mov	[esp+40h+var_4], edx
call	sub_672190
mov	bl, al
mov	al, [esp+34h+var_28]
test	al, al
jz	short loc_66D56D
cmp	al, 0Ah
jnz	short loc_66D59E

loc_66D56D:
test	byte ptr [esi+14h], 4
jnz	short loc_66D588
mov	ecx, [esi]
mov	edx, [ecx]
mov	eax, [edx]
push	eax
push	offset aErrorGetvariab ; "Error: GetVariable failed: can't resolv"...
push	edi
call	sub_66D290
add	esp, 0Ch

loc_66D588:
lea	ecx, [esp+34h+var_28]
xor	bl, bl
call	sub_652830
mov	al, bl
pop	ebx
pop	edi
pop	esi
add	esp, 28h
retn	4

loc_66D59E:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_66D5AF
lea	edx, [esp+34h+var_28]
push	edx
call	sub_652520

loc_66D5AF:
lea	ecx, [esp+34h+var_28]
call	sub_652830
mov	al, bl
pop	ebx
pop	edi
pop	esi
add	esp, 28h
retn	4

loc_66D5C3:
push	esi
mov	ecx, edi
call	sub_671C00
pop	edi
pop	esi
add	esp, 28h
retn	4
sub_66D4F0 endp

align 10h



sub_66D5E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	al, [ecx]
cmp	al, 7
jnz	short loc_66D5F7
push	esi
call	sub_651BB0
pop	esi
retn	4

loc_66D5F7:
cmp	al, 5
jnz	short loc_66D636
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+10h+arg_0]
push	eax
call	sub_652F60
push	0
lea	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, esi
call	sub_669880
mov	esi, eax
mov	eax, [esp+4+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66D630
call	sub_650DF0

loc_66D630:
mov	eax, esi
pop	esi
retn	4

loc_66D636:		; "Error: Invalid movie	clip path; neither"...
push	offset aErrorInvalidMo
push	esi
call	sub_66D290
add	esp, 8
xor	eax, eax
pop	esi
retn	4
sub_66D5E0 endp

align 10h



sub_66D650 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebp
push	esi
mov	esi, ecx
mov	edx, [esi+78h]
push	edi
lea	eax, [esi+78h]
lea	ebp, [esp+0Ch]
push	ebp
mov	ebp, [esp+20h+arg_4]
mov	[esp+20h+var_10], 0
mov	ecx, [edx+2ACh]
mov	edi, [ecx+10h]
lea	edx, [edx+ebp*4+8]
add	ecx, 10h
push	edx
push	eax
mov	eax, [edi+2Ch]
call	eax
test	al, al
jz	short loc_66D6B6
mov	al, [esp+1Ch+var_10]
cmp	al, 8
jz	short loc_66D693
cmp	al, 0Bh
jnz	short loc_66D6B6

loc_66D693:
push	esi
mov	esi, [esp+20h+arg_0]
push	esi
lea	ecx, [esp+24h+var_10]
call	sub_652DC0
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 10h
retn	8

loc_66D6B6:
mov	esi, [esp+1Ch+arg_0]
lea	ecx, [esp+1Ch+var_10]
mov	byte ptr [esi+8], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 10h
retn	8
sub_66D650 endp

align 10h



sub_66D6E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+8]
sub	eax, [ecx+0Ch]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [ecx+1Ch]
dec	esi
sar	eax, 4
shl	esi, 5
add	eax, esi
xor	edx, edx
push	edi
cmp	ebx, eax
ja	short loc_66D714
mov	esi, [ecx+18h]
sub	eax, ebx
mov	edx, eax
and	eax, 1Fh
shr	edx, 5
shl	eax, 4
add	eax, [esi+edx*4]
mov	edx, eax

loc_66D714:
mov	dl, [edx]
movzx	eax, dl
sub	eax, 2
jz	short loc_66D748
sub	eax, 3
jz	short loc_66D741
cmp	dl, 3
jz	short loc_66D72D
cmp	dl, 4
jnz	short loc_66D734

loc_66D72D:
mov	edi, 4
jmp	short loc_66D74D

loc_66D734:
mov	eax, [esp+0Ch+arg_0]
pop	edi
pop	esi
mov	byte ptr [eax],	0
pop	ebx
retn	8

loc_66D741:
mov	edi, 3
jmp	short loc_66D74D

loc_66D748:
mov	edi, 5

loc_66D74D:
mov	eax, [ecx+8]
sub	eax, [ecx+0Ch]
mov	edx, [ecx+1Ch]
sar	eax, 4
shl	edx, 5
lea	eax, [eax+edx-20h]
mov	edx, [ecx+78h]
mov	esi, [edx+2ACh]
sub	eax, ebx
push	eax
push	1
lea	eax, [edx+edi*4+8]
push	eax
push	esi
call	sub_671840
mov	edi, [esp+0Ch+arg_0]
mov	esi, eax
push	esi
mov	ecx, edi
call	sub_652700
test	esi, esi
jz	short loc_66D792
mov	ecx, esi
call	sub_64B3B0

loc_66D792:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_66D6E0 endp

align 10h



sub_66D7A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_66D7D5 ; default
jmp	ds:off_66D7D8[eax*4] ; switch jump

loc_66D7B0:		; jumptable 0066D7A9 case 0
call	sub_66A7C0
retn	4

loc_66D7B8:		; jumptable 0066D7A9 case 1
call	sub_66A860
retn	4

loc_66D7C0:		; jumptable 0066D7A9 case 2
call	sub_66A920
retn	4

loc_66D7C8:		; jumptable 0066D7A9 case 3
call	sub_66A9D0
retn	4

loc_66D7D0:		; jumptable 0066D7A9 case 4
call	sub_66AA70

locret_66D7D5:		; default
retn	4
sub_66D7A0 endp

off_66D7D8 dd offset loc_66D7B0	; jump table for switch	statement
dd offset loc_66D7B8
dd offset loc_66D7C0
dd offset loc_66D7C8
dd offset loc_66D7D0
align 10h



sub_66D7F0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], cl
mov	[eax+24h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], ecx
mov	[eax+48h], ecx
mov	ecx, 3E8h
mov	dword ptr [eax+18h], 0FFFFFFFFh
mov	dword ptr [eax], offset	off_1432E70
mov	[eax+28h], ecx
mov	[eax+44h], ecx
retn
sub_66D7F0 endp

align 10h



sub_66D850 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebp
push	esi
mov	esi, ecx
xor	ecx, ecx
mov	[esi], ecx
mov	[esi+4], ecx
mov	[esi+8], ecx
mov	ebp, [eax]
push	edi
mov	edi, [eax+4]
cmp	edi, ecx
jz	short loc_66D894
push	ebx
mov	ebx, [esi+4]
lea	eax, [ebx+edi]
push	eax
push	esi
mov	ecx, esi
call	sub_669A70
mov	edx, [esi]
lea	ecx, ds:0[edi*8]
push	ecx
lea	eax, [edx+ebx*8]
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	ebx

loc_66D894:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_66D850 endp

align 10h



sub_66D8A0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jbe	short loc_66D8D3
lea	esp, [esp+0]

loc_66D8B0:
mov	eax, [esi]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_66D8BD
call	sub_64B3B0

loc_66D8BD:
add	dword ptr [esi], 0FFFFFFFCh
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66D8CE
mov	ecx, esi
call	sub_66A690

loc_66D8CE:
sub	edi, 1
jnz	short loc_66D8B0

loc_66D8D3:
pop	edi
pop	esi
retn	4
sub_66D8A0 endp

align 10h



sub_66D8E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_66D908
push	edi
mov	edi, eax

loc_66D8F4:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66D8FF
call	sub_64B3B0

loc_66D8FF:
sub	esi, 4
sub	edi, 1
jnz	short loc_66D8F4
pop	edi

loc_66D908:
pop	esi
retn
sub_66D8E0 endp

align 10h



sub_66D910 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, [edx]
push	esi
mov	esi, ecx
mov	[esi], eax
inc	dword ptr [eax+8]
lea	ecx, [esi+4]
mov	byte ptr [ecx+8], 0
mov	eax, [edx+4]
mov	[ecx], eax
test	eax, eax
jz	short loc_66D93D
push	edi
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi
pop	edi

loc_66D93D:
mov	dword ptr [ecx+4], 0
mov	eax, [edx+8]
test	eax, eax
jz	short loc_66D95B
mov	dl, [edx+0Ch]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_66D95B:
mov	eax, esi
pop	esi
retn	4
sub_66D910 endp

align 10h



sub_66D970 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_66D97E
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_66D97E:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 4
mov	edx, 1505h
mov	edi, edi

loc_66D990:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_66D990
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_66AB40
pop	esi
pop	ebx
pop	edi
retn	4
sub_66D970 endp

align 10h



sub_66D9C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_66D9D3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_66D9F5

loc_66D9D3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_66D9FA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_66D9F5:
call	sub_66A1A0

loc_66D9FA:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*2]
lea	esi, [ecx+edx*8+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_66DA3E
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	eax, [eax]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	ecx, [ecx+4]
push	ecx
lea	ecx, [esi+8]
call	sub_652330
pop	esi
pop	ebx
retn	0Ch

loc_66DA3E:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax

loc_66DA45:
inc	edi
and	edi, ebp
lea	edx, [edi+edi*2]
cmp	[ecx+edx*8+8], ebx
jnz	short loc_66DA45
mov	ebx, [esi+4]
mov	ebx, [ebx+0Ch]
and	ebx, ebp
lea	edx, [edi+edi*2]
lea	edx, [ecx+edx*8+8]
cmp	ebx, eax
jnz	short loc_66DAB3
test	edx, edx
jz	short loc_66DA81
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [esi+8]
push	eax
lea	ecx, [edx+8]
call	sub_652330

loc_66DA81:
mov	ebp, [esp+10h+arg_4]
mov	ecx, [ebp+0]
mov	ebx, [ecx]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66DA9B
call	sub_650DF0

loc_66DA9B:
mov	[esi+4], ebx
mov	edx, [ebp+4]
push	edx
lea	ecx, [esi+8]
call	sub_652520
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_66DAB3:
lea	ebx, [ebx+ebx*2]
cmp	[ecx+ebx*8+8], eax
lea	ebx, [ecx+ebx*8+8]
jz	short loc_66DACF

loc_66DAC0:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[ecx+ebx*8+8], eax
lea	ebx, [ecx+ebx*8+8]
jnz	short loc_66DAC0

loc_66DACF:
test	edx, edx
jz	short loc_66DAEC
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [esi+8]
push	eax
lea	ecx, [edx+8]
call	sub_652330

loc_66DAEC:
mov	[ebx], edi
mov	ebx, [esp+10h+arg_4]
mov	ecx, [ebx]
mov	edi, [ecx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66DB07
call	sub_650DF0

loc_66DB07:
mov	[esi+4], edi
mov	edx, [ebx+4]
push	edx
lea	ecx, [esi+8]
call	sub_652520
pop	edi
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_66D9C0 endp

align 10h



sub_66DB30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	eax, [eax]
mov	[esi], eax
inc	dword ptr [eax+8]
mov	edx, [ecx+4]
lea	ecx, [esi+4]
mov	byte ptr [ecx+8], 0
mov	eax, [edx]
mov	[ecx], eax
test	eax, eax
jz	short loc_66DB61
push	edi
mov	edi, [eax+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[eax+8], edi
pop	edi

loc_66DB61:
mov	dword ptr [ecx+4], 0
mov	eax, [edx+4]
test	eax, eax
jz	short loc_66DB7F
mov	dl, [edx+8]
and	dl, 1
movzx	edx, dl
push	edx
push	eax
call	sub_67C1A0

loc_66DB7F:
mov	eax, esi
pop	esi
retn	4
sub_66DB30 endp

align 10h



sub_66DB90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, [eax]
inc	dword ptr [edi+8]
mov	esi, ecx
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66DBAD
call	sub_650DF0

loc_66DBAD:
mov	[esi], edi
mov	edi, [ebx+4]
mov	ecx, [edi]
mov	[esi+4], ecx
mov	eax, [edi+4]
test	eax, eax
jz	short loc_66DBCB
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_66DBCB:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66DBE3
call	sub_64B3B0
mov	eax, [edi+4]
pop	edi
mov	[esi+8], eax
pop	esi
pop	ebx
retn	4

loc_66DBE3:
mov	ecx, [edi+4]
pop	edi
mov	[esi+8], ecx
pop	esi
pop	ebx
retn	4
sub_66DB90 endp

align 10h



sub_66DBF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_66B250
test	[esp+4+arg_0], 1
jz	short loc_66DC0D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_66DC0D:
mov	eax, esi
pop	esi
retn	4
sub_66DBF0 endp

align 10h



sub_66DC20 proc	near

var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 24h
push	ebx
mov	ebx, [esp+28h+arg_10]
push	ebp
xor	ebp, ebp
push	esi
test	ebx, ebx
jz	loc_66E01B
mov	edx, [esp+30h+arg_C]
mov	eax, [edx+8]
sub	eax, [edx+0Ch]
mov	ecx, [edx+1Ch]
lea	esi, [edx+8]
sar	eax, 4
shl	ecx, 5
push	edi
lea	edi, [eax+ecx-20h]
mov	al, [ebx]
inc	ebx
mov	[esp+34h+var_18], edi
test	al, al
jz	loc_66DE74
mov	ecx, [esp+34h+arg_14]
lea	ebp, [ecx-4]
lea	edi, [ecx-8]
jmp	short loc_66DC74
align 10h

loc_66DC70:
mov	edx, [esp+34h+arg_C]

loc_66DC74:
cmp	al, 25h
jnz	loc_66DF5B
mov	al, [ebx]
inc	ebx
mov	[esp+34h+var_24], ebx
cmp	al, 64h
jnz	short loc_66DCB6
add	dword ptr [esi], 10h
mov	eax, [esi]
add	edi, 4
add	ebp, 4
cmp	eax, [esi+8]
jb	short loc_66DC9E
mov	ecx, esi
call	sub_64B530

loc_66DC9E:
mov	eax, [esi]
test	eax, eax
jz	loc_66DE4B
mov	ecx, [ebp+0]
mov	byte ptr [eax],	4
mov	[eax+4], ecx
jmp	loc_66DE4B

loc_66DCB6:
cmp	al, 75h
jnz	short loc_66DCEE
add	dword ptr [esi], 10h
mov	eax, [esi]
mov	[esp+34h+var_10], 0
cmp	eax, [esi+8]
jb	short loc_66DCD0
mov	ecx, esi
call	sub_64B530

loc_66DCD0:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66DCE0
lea	edx, [esp+34h+var_10]
push	edx
call	sub_652330

loc_66DCE0:
lea	ecx, [esp+34h+var_10]
call	sub_652830
jmp	loc_66DE4B

loc_66DCEE:
cmp	al, 6Eh
jnz	short loc_66DD15
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_66DD03
mov	ecx, esi
call	sub_64B530

loc_66DD03:
mov	eax, [esi]
test	eax, eax
jz	loc_66DE4B
mov	byte ptr [eax],	1
jmp	loc_66DE4B

loc_66DD15:
cmp	al, 62h
jnz	short loc_66DD4C
add	ebp, 4
add	edi, 4
cmp	dword ptr [ebp+0], 0
setnz	bl
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_66DD37
mov	ecx, esi
call	sub_64B530

loc_66DD37:
mov	eax, [esi]
test	eax, eax
jz	loc_66DE47
mov	byte ptr [eax],	2
mov	[eax+4], bl
jmp	loc_66DE47

loc_66DD4C:
cmp	al, 66h
jnz	short loc_66DD87
fld	qword ptr [edi+8]
add	dword ptr [esi], 10h
mov	eax, [esi]
fstp	[esp+34h+var_20]
add	edi, 8
add	ebp, 8
cmp	eax, [esi+8]
jb	short loc_66DD6E
mov	ecx, esi
call	sub_64B530

loc_66DD6E:
mov	eax, [esi]
test	eax, eax
jz	loc_66DE4B
fld	[esp+34h+var_20]
mov	byte ptr [eax],	3
fstp	qword ptr [eax+4]
jmp	loc_66DE4B

loc_66DD87:
cmp	al, 68h
jnz	short loc_66DDE7
mov	al, [ebx]
inc	ebx
cmp	al, 66h
jnz	short loc_66DDC9
fld	qword ptr [edi+8]
add	dword ptr [esi], 10h
mov	eax, [esi]
fstp	[esp+34h+var_20]
add	edi, 8
add	ebp, 8
cmp	eax, [esi+8]
jb	short loc_66DDB0
mov	ecx, esi
call	sub_64B530

loc_66DDB0:
mov	eax, [esi]
test	eax, eax
jz	loc_66DE4B
fld	[esp+34h+var_20]
mov	byte ptr [eax],	3
fstp	qword ptr [eax+4]
jmp	loc_66DE4B

loc_66DDC9:
mov	ecx, [esp+34h+arg_10]
movsx	eax, al
push	eax
mov	eax, [esp+38h+arg_18]
push	ecx
push	eax
push	offset aErrorInvokepar ; "Error: InvokeParsed('%s','%s') - invali"...
push	edx
call	sub_66D290
add	esp, 14h
jmp	short loc_66DE4B

loc_66DDE7:
cmp	al, 73h
jnz	loc_66DEAF
mov	ecx, [ebp+4]
add	ebp, 4
push	ecx
lea	eax, [esp+38h+var_14]
add	edi, 4
push	eax
mov	ecx, edx
mov	dword ptr [esp+3Ch+var_20], edi
call	sub_64AB70
add	dword ptr [esi], 10h
mov	edi, eax
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_66DE1C
mov	ecx, esi
call	sub_64B530

loc_66DE1C:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66DE2D
mov	byte ptr [ecx],	5
mov	eax, [edi]
mov	[ecx+4], eax
inc	dword ptr [eax+8]

loc_66DE2D:
mov	eax, [esp+34h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66DE43

loc_66DE3E:
call	sub_650DF0

loc_66DE43:
mov	edi, dword ptr [esp+34h+var_20]

loc_66DE47:
mov	ebx, [esp+34h+var_24]

loc_66DE4B:
mov	al, [ebx]
test	al, al
jz	short loc_66DE65

loc_66DE51:
cmp	al, 20h
jz	short loc_66DE5D
cmp	al, 9
jz	short loc_66DE5D
cmp	al, 2Ch
jnz	short loc_66DE65

loc_66DE5D:
mov	al, [ebx+1]
inc	ebx
test	al, al
jnz	short loc_66DE51

loc_66DE65:
mov	al, [ebx]
inc	ebx
test	al, al
jnz	loc_66DC70
mov	edi, [esp+34h+var_18]

loc_66DE74:
mov	ebp, [esi]
sub	ebp, [esi+4]
mov	ecx, [esi+14h]
sar	ebp, 4
shl	ecx, 5
add	ebp, ecx
sub	ebp, edi
sub	ebp, 20h
mov	ecx, ebp
sar	ecx, 1
test	ecx, ecx
jle	loc_66E01A
mov	eax, [esp+34h+var_18]
lea	edx, [edi+1]
add	eax, ebp
mov	[esp+34h+arg_10], edx
mov	dword ptr [esp+34h+var_20], eax
mov	[esp+34h+var_18], ecx
jmp	loc_66DF88

loc_66DEAF:
cmp	al, 6Ch
jnz	loc_66DF3A
mov	al, [ebx]
inc	ebx
mov	[esp+34h+var_24], ebx
cmp	al, 73h
jnz	short loc_66DF19
mov	eax, [ebp+4]
mov	ecx, [edx+78h]
mov	ecx, [ecx+280h]
add	ebp, 4
add	edi, 4
push	eax
mov	dword ptr [esp+38h+var_20], edi
call	sub_651030
mov	edi, eax
mov	ebx, 1
add	[edi+8], ebx
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_66DEF9
mov	ecx, esi
call	sub_64B530

loc_66DEF9:
mov	eax, [esi]
test	eax, eax
jz	short loc_66DF08
mov	byte ptr [eax],	5
mov	[eax+4], edi
add	[edi+8], ebx

loc_66DF08:
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	loc_66DE43
mov	ecx, edi
jmp	loc_66DE3E

loc_66DF19:
mov	ecx, [esp+34h+arg_10]
movsx	eax, al
push	eax
mov	eax, [esp+38h+arg_18]
push	ecx
push	eax
push	offset aErrorInvokep_0 ; "Error: InvokeParsed('%s','%s') - invali"...
push	edx
call	sub_66D290
add	esp, 14h
jmp	loc_66DE4B

loc_66DF3A:
movsx	ecx, al
mov	eax, [esp+34h+arg_10]
push	ecx
mov	ecx, [esp+38h+arg_18]
push	eax
push	ecx
push	offset aErrorInvokep_1 ; "Error: InvokeParsed('%s','%s') - invali"...
push	edx
call	sub_66D290
add	esp, 14h
jmp	loc_66DE4B

loc_66DF5B:
mov	ecx, [esp+34h+arg_10]
movsx	eax, al
push	eax
mov	eax, [esp+38h+arg_18]
push	ecx
push	eax
push	offset aErrorInvokep_2 ; "Error: InvokeParsed('%s','%s') - invali"...
push	edx
call	sub_66D290
add	esp, 14h
jmp	loc_66DE4B
align 10h

loc_66DF80:
mov	eax, dword ptr [esp+34h+var_20]
mov	edx, [esp+34h+arg_10]

loc_66DF88:
mov	ecx, [esi]
sub	ecx, [esi+4]
mov	edi, [esi+14h]
dec	edi
sar	ecx, 4
shl	edi, 5
add	ecx, edi
xor	ebx, ebx
cmp	eax, ecx
ja	short loc_66DFB2
mov	edi, [esi+10h]
mov	ebx, eax
and	ebx, 1Fh
mov	ecx, eax
shr	ecx, 5
shl	ebx, 4
add	ebx, [edi+ecx*4]

loc_66DFB2:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
dec	ecx
sar	eax, 4
shl	ecx, 5
add	eax, ecx
xor	edi, edi
cmp	edx, eax
ja	short loc_66DFDC
mov	ecx, [esi+10h]
mov	edi, edx
and	edi, 1Fh
mov	eax, edx
shr	eax, 5
shl	edi, 4
add	edi, [ecx+eax*4]

loc_66DFDC:
push	edi
lea	ecx, [esp+38h+var_10]
call	sub_652330
push	ebx
mov	ecx, edi
call	sub_652520
lea	edx, [esp+34h+var_10]
push	edx
mov	ecx, ebx
call	sub_652520
lea	ecx, [esp+34h+var_10]
call	sub_652830
mov	eax, 1
add	[esp+34h+arg_10], eax
sub	dword ptr [esp+34h+var_20], eax
sub	[esp+34h+var_18], eax
jnz	loc_66DF80

loc_66E01A:
pop	edi

loc_66E01B:
mov	ecx, [esp+30h+arg_C]
mov	eax, [ecx+8]
sub	eax, [ecx+0Ch]
mov	edx, [ecx+1Ch]
lea	esi, [ecx+8]
shl	edx, 5
sar	eax, 4
lea	eax, [eax+edx-20h]
mov	edx, [esp+30h+arg_18]
push	edx
mov	edx, [esp+34h+arg_0]
push	eax
mov	eax, [esp+38h+arg_8]
push	ebp
push	ecx
mov	ecx, [esp+40h+arg_4]
push	eax
push	ecx
push	edx
call	sub_66B4F0
add	esp, 1Ch
mov	bl, al
test	ebp, ebp
jbe	short loc_66E07D
lea	ebx, [ebx+0]

loc_66E060:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66E078
mov	ecx, esi
call	sub_64B660

loc_66E078:
sub	ebp, 1
jnz	short loc_66E060

loc_66E07D:
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 24h
retn
sub_66DC20 endp

align 10h



sub_66E090 proc	near

var_7FC= dword ptr -7FCh
var_7F8= dword ptr -7F8h
var_7F4= byte ptr -7F4h
var_7E4= byte ptr -7E4h
Dst= byte ptr -7D4h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 7FCh
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+7FCh+var_4], eax
push	esi
mov	esi, [esp+800h+arg_0]
mov	eax, [esi+18h]
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	edi, eax
test	edi, edi
jz	loc_66E1AF
mov	eax, [esi+18h]
mov	edx, [edi]
push	ebp
add	eax, 78h
mov	[esp+808h+var_7F4], 0
mov	ecx, [eax]
lea	ebp, [esp+808h+var_7F4]
push	ebp
add	ecx, 164h
push	ecx
push	eax
mov	eax, [edx+2Ch]
mov	ecx, edi
call	eax
pop	ebp
test	al, al
jz	loc_66E1A6
mov	al, [esp+804h+var_7F4]
cmp	al, 8
jz	short loc_66E108
cmp	al, 0Bh
jnz	loc_66E1A6

loc_66E108:
mov	eax, [esi+18h]
mov	[esp+804h+var_7E4], 0
mov	ecx, [eax+8]
sub	ecx, [eax+0Ch]
mov	edx, [eax+1Ch]
push	0
shl	edx, 5
sar	ecx, 4
lea	ecx, [ecx+edx-1Fh]
push	ecx
push	0
push	eax
push	edi
lea	edx, [esp+818h+var_7E4]
push	edx
lea	eax, [esp+81Ch+var_7F4]
push	eax
call	sub_66B4F0
mov	ecx, [esi+18h]
add	esp, 1Ch
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+810h+var_7F8]
push	edx
lea	ecx, [esp+814h+var_7E4]
call	sub_652F60
mov	eax, [esp+804h+var_7F8]
mov	ecx, [eax]
push	ecx
push	offset aS_12	; "%s\n"
push	esi
call	sub_669200
mov	eax, [esp+810h+var_7F8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 0Ch
cmp	dword ptr [eax], 0
jnz	short loc_66E17D
call	sub_650DF0

loc_66E17D:
lea	ecx, [esp+804h+var_7E4]
call	sub_652830
lea	ecx, [esp+804h+var_7F4]
call	sub_652830
pop	edi
pop	esi
mov	ecx, [esp+7FCh+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 7FCh
retn

loc_66E1A6:
lea	ecx, [esp+804h+var_7F4]
call	sub_652830

loc_66E1AF:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+810h+var_7FC]
push	edx
mov	ecx, eax
call	sub_652F60
mov	ecx, [esp+804h+var_7FC]
mov	eax, [ecx+10h]
mov	edi, eax
cmp	eax, 7D0h
jb	short loc_66E1E1
mov	edi, 7CFh

loc_66E1E1:
mov	eax, [ecx]
push	edi		; MaxCount
push	eax		; Src
lea	ecx, [esp+80Ch+Dst]
push	7D0h		; SizeInBytes
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h
mov	[esp+edi+804h+Dst], 0
cmp	[esp+804h+Dst],	0
lea	eax, [esp+804h+Dst]
jz	short loc_66E215

loc_66E207:
cmp	byte ptr [eax],	0Dh
jnz	short loc_66E20F
mov	byte ptr [eax],	0Ah

loc_66E20F:
inc	eax
cmp	byte ptr [eax],	0
jnz	short loc_66E207

loc_66E215:
mov	edx, [esp+804h+var_7FC]
cmp	dword ptr [edx+10h], 7D0h
jnb	short loc_66E22E
lea	eax, [esp+804h+Dst]
push	eax
push	offset aS_12	; "%s\n"
jmp	short loc_66E238

loc_66E22E:
lea	ecx, [esp+804h+Dst]
push	ecx
push	offset aS___Truncated ;	"%s ...<truncated>\n"

loc_66E238:
push	esi
call	sub_669200
mov	eax, [esp+810h+var_7FC]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 0Ch
cmp	dword ptr [eax], 0
jnz	short loc_66E257
call	sub_650DF0

loc_66E257:
mov	ecx, [esp+804h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 7FCh
retn
sub_66E090 endp

align 10h



sub_66E270 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
add	dword ptr [esi+8], 10h
mov	eax, [esi+8]
add	esi, 8
cmp	eax, [esi+8]
jb	short loc_66E28D
mov	ecx, esi
call	sub_64B530

loc_66E28D:
mov	esi, [esi]
mov	ecx, [esp+8+arg_0]
test	esi, esi
jz	short loc_66E2A2
mov	byte ptr [esi],	5
mov	eax, [ecx]
mov	[esi+4], eax
inc	dword ptr [eax+8]

loc_66E2A2:
mov	eax, [edi+8]
pop	edi
pop	esi
test	eax, eax
jz	short locret_66E2BE
mov	ecx, [ecx]
mov	edx, [ecx]
push	edx
push	offset aEnumeratePushS ; "---enumerate - Push: %s\n"
push	eax
call	nullsub_2
add	esp, 0Ch

locret_66E2BE:
retn	0Ch
sub_66E270 endp

align 10h



sub_66E2D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
xor	esi, esi
mov	[esp+18h+var_8], esi
test	byte ptr [eax+0C6h], 2
jnz	short loc_66E2FB
mov	eax, [eax+74h]
lea	ecx, [eax+78h]
call	sub_661C50
mov	[esp+18h+var_4], eax
jmp	short loc_66E2FF

loc_66E2FB:
mov	[esp+18h+var_4], esi

loc_66E2FF:
cmp	[esp+18h+arg_4], 8Ah
jnz	short loc_66E32B
mov	ecx, [edi+8]
mov	eax, [edi+18h]
movzx	edx, byte ptr [eax+ecx+4]
add	eax, ecx
movzx	ecx, byte ptr [eax+3]
shl	edx, 8
or	edx, ecx
mov	[esp+18h+var_8], edx
movzx	ebp, byte ptr [eax+5]
mov	bl, 1
jmp	short loc_66E36C

loc_66E32B:
mov	eax, [edi]
mov	ecx, [eax+8]
lea	edx, [esp+18h+var_8]
push	edx
push	esi
push	ecx
mov	ecx, [esp+24h+arg_0]
push	eax
call	sub_669CD0
mov	ecx, [edi+8]
mov	esi, [edi]
mov	bl, al
mov	eax, [edi+18h]
movzx	ebp, byte ptr [eax+ecx+3]
mov	ecx, [esi+8]
add	esi, 8
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66E36C
mov	ecx, esi
call	sub_64B660

loc_66E36C:
mov	esi, [esp+18h+var_4]
test	esi, esi
jz	short loc_66E3E1
test	bl, bl
jz	short loc_66E3E1
mov	ecx, [esi+0B8h]
mov	edx, [ecx]
mov	eax, [edx+28h]
call	eax
test	eax, eax
jbe	short loc_66E394
cmp	[esp+18h+var_8], eax
jb	short loc_66E394
dec	eax
mov	[esp+18h+var_8], eax

loc_66E394:
mov	ecx, esi
call	sub_67EC10
cmp	[esp+18h+var_8], eax
jb	short loc_66E3E1
mov	ecx, [esp+18h+arg_0]
mov	edx, [ecx+8]
mov	ebx, [edx+0Ch]
mov	eax, [edi+14h]
xor	esi, esi
test	ebp, ebp
jbe	short loc_66E3DA

loc_66E3B4:
cmp	eax, ebx
jnb	short loc_66E3E1
mov	ecx, [edi+8]
mov	dl, [ecx+eax]
inc	eax
test	dl, dl
jns	short loc_66E3D5
movzx	edx, byte ptr [ecx+eax+1]
movzx	ecx, byte ptr [ecx+eax]
shl	edx, 8
or	edx, ecx
lea	eax, [eax+edx+2]

loc_66E3D5:
inc	esi
cmp	esi, ebp
jb	short loc_66E3B4

loc_66E3DA:
cmp	eax, ebx
jnb	short loc_66E3E1
mov	[edi+14h], eax

loc_66E3E1:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_66E2D0 endp

align 10h



sub_66E3F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 30h
push	ebx
push	ebp
mov	ebp, [esp+38h+arg_0]
mov	eax, [ebp+0]
mov	edx, [eax+10h]
push	esi
push	edi
mov	edi, [esp+40h+arg_8]
mov	ebx, ecx
mov	ecx, [esp+40h+arg_4]
push	edi
push	ecx
push	ebx
mov	ecx, ebp
call	edx
mov	byte ptr [esp+40h+arg_8], al
test	al, al
jz	short loc_66E455
cmp	byte ptr [edi],	9
jnz	short loc_66E455
mov	ecx, ebp
call	sub_661C10
mov	esi, eax
test	esi, esi
jz	short loc_66E432
inc	dword ptr [esi+4]
lea	ebp, [esi+78h]

loc_66E432:
push	edi
push	ebp
push	ebx
mov	ecx, edi
call	sub_6529F0
test	esi, esi
jz	short loc_66E447
mov	ecx, esi
call	sub_64A400

loc_66E447:
mov	al, byte ptr [esp+40h+arg_8]

loc_66E44B:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	0Ch

loc_66E455:
cmp	byte ptr [edi],	0Ch
jnz	short loc_66E44B
lea	eax, [esp+40h+var_30]
push	eax
mov	ecx, edi
call	sub_652860
cmp	[esp+40h+var_30], 0
jz	loc_66E548
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
cmp	eax, [ebx+10h]
lea	esi, [ebx+8]
jb	short loc_66E487
mov	ecx, esi
call	sub_64B530

loc_66E487:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66E49C
mov	edx, [esp+40h+arg_4]
mov	byte ptr [ecx],	5
mov	eax, [edx]
mov	[ecx+4], eax
inc	dword ptr [eax+8]

loc_66E49C:
mov	ecx, ebp
call	sub_661C10
mov	ebp, eax
test	ebp, ebp
jz	short loc_66E4AC
inc	dword ptr [ebp+4]

loc_66E4AC:
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
lea	ecx, [ebp+78h]
test	ebp, ebp
jnz	short loc_66E4C1
mov	ecx, [esp+40h+arg_0]

loc_66E4C1:
mov	eax, [esi]
sub	eax, [esi+4]
mov	edx, [esi+14h]
sar	eax, 4
shl	edx, 5
lea	eax, [eax+edx-20h]
mov	edx, [esp+40h+var_2C]
mov	[esp+40h+var_20], edi
xor	edi, edi
mov	dword ptr [esp+40h+var_1C], ecx
mov	ecx, [esp+40h+var_30]
push	edi
mov	[esp+44h+var_4], eax
push	edx
mov	[esp+48h+var_24], offset off_1431764
mov	byte ptr [esp+48h+var_10], 0
mov	[esp+48h+var_18], edi
mov	[esp+48h+var_14], edi
mov	[esp+48h+var_C], ebx
mov	[esp+48h+var_8], 1
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+48h+var_24]
push	edx
call	eax
lea	ecx, [esp+40h+var_24]
call	sub_64B830
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66E539
mov	ecx, esi
call	sub_64B660

loc_66E539:
mov	bl, 1
cmp	ebp, edi
jz	short loc_66E54A
mov	ecx, ebp
call	sub_64A400
jmp	short loc_66E54A

loc_66E548:
xor	bl, bl

loc_66E54A:
test	byte ptr [esp+40h+var_28], 2
jnz	short loc_66E55E
mov	ecx, [esp+40h+var_30]
test	ecx, ecx
jz	short loc_66E55E
call	sub_64B3B0

loc_66E55E:
test	byte ptr [esp+40h+var_28], 1
mov	[esp+40h+var_30], 0
jnz	short loc_66E57A
mov	ecx, [esp+40h+var_2C]
test	ecx, ecx
jz	short loc_66E57A
call	sub_64B3B0

loc_66E57A:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 30h
retn	0Ch
sub_66E3F0 endp

align 10h



sub_66E590 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
lea	eax, [ecx-30h]
cmp	eax, [esi+4]
jnb	short loc_66E5C3
push	edi
mov	edi, 3

loc_66E5A3:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66E5BB
mov	ecx, esi
call	sub_64B660

loc_66E5BB:
sub	edi, 1
jnz	short loc_66E5A3
pop	edi
pop	esi
retn

loc_66E5C3:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
pop	esi
retn
sub_66E590 endp

align 10h



sub_66E5F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
mov	[esp+8+arg_0], edi
jnz	short loc_66E609
call	sub_651580

loc_66E609:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66E63D
mov	eax, [edi]
mov	eax, [eax+0Ch]
and	eax, [ecx+4]
lea	ecx, [esp+8+arg_0]
push	eax
push	ecx
mov	ecx, esi
call	sub_669B30
test	eax, eax
jl	short loc_66E63D
lea	edx, [eax+eax*4]
mov	eax, [esi]
lea	eax, [eax+edx*4+0Ch]
test	eax, eax
jz	short loc_66E63D
pop	edi
add	eax, 4
pop	esi
retn	4

loc_66E63D:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_66E5F0 endp

align 10h



sub_66E650 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_66E68E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_66D8E0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_66E6A7
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_668FE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_66E68E:
cmp	esi, [edi+8]
jb	short loc_66E6A7
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_668FE0

loc_66E6A7:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_66E650 endp

align 10h



sub_66E6B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
mov	[esp+8+arg_4], edi
jnz	short loc_66E6C9
call	sub_651580

loc_66E6C9:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_66E6F8
mov	eax, [edi]
mov	eax, [eax+0Ch]
and	eax, [ecx+4]
lea	ecx, [esp+8+arg_4]
push	eax
push	ecx
mov	ecx, esi
call	sub_669B30
test	eax, eax
jl	short loc_66E6F8
mov	ecx, [esp+8+arg_0]
pop	edi
mov	[ecx], esi
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	8

loc_66E6F8:
mov	eax, [esp+8+arg_0]
pop	edi
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
pop	esi
retn	8
sub_66E6B0 endp

align 10h



sub_66E710 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
add	eax, 4
mov	[esi], ecx
push	eax
lea	ecx, [esi+4]
call	sub_66D910
mov	eax, esi
pop	esi
retn	4
sub_66E710 endp

align 10h



sub_66E730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebp
push	esi
push	edi
push	eax
mov	esi, ecx
call	sub_670500
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*4]
lea	edi, [ecx+edx*4+8]
mov	edx, [edi]
mov	ebp, 0FFFFFFFEh
mov	[esp+0Ch+arg_0], edi
cmp	edx, ebp
jnz	short loc_66E77B
mov	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [edi+4]
mov	dword ptr [edi], 0FFFFFFFFh
call	sub_66D910
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_66E77B:
push	ebx
mov	ebx, [ecx+4]
mov	esi, eax

loc_66E781:
inc	esi
and	esi, ebx
lea	edx, [esi+esi*4]
cmp	[ecx+edx*4+8], ebp
jnz	short loc_66E781
lea	edx, [esi+esi*4]
lea	ebp, [ecx+edx*4+8]
mov	edx, [edi+4]
mov	edx, [edx+0Ch]
add	edi, 4
and	edx, ebx
cmp	edx, eax
jnz	short loc_66E7EB
test	ebp, ebp
jz	short loc_66E7B9
mov	eax, [esp+10h+arg_0]
mov	eax, [eax]
push	edi
lea	ecx, [ebp+4]
mov	[ebp+0], eax
call	sub_66D910

loc_66E7B9:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [ebp+0]
inc	dword ptr [ebx+8]
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66E7D0
call	sub_650DF0

loc_66E7D0:
add	ebp, 4
push	ebp
lea	ecx, [edi+4]
mov	[edi], ebx
call	sub_67C4C0
mov	ecx, [esp+10h+arg_0]
pop	ebx
pop	edi
mov	[ecx], esi
pop	esi
pop	ebp
retn	0Ch

loc_66E7EB:
lea	edx, [edx+edx*4]
cmp	[ecx+edx*4+8], eax
lea	ebx, [ecx+edx*4+8]
jz	short loc_66E80F
jmp	short loc_66E800
align 10h

loc_66E800:
mov	ebx, [ebx]
lea	edx, [ebx+ebx*4]
cmp	[ecx+edx*4+8], eax
lea	ebx, [ecx+edx*4+8]
jnz	short loc_66E800

loc_66E80F:
test	ebp, ebp
jz	short loc_66E825
mov	eax, [esp+10h+arg_0]
mov	eax, [eax]
push	edi
lea	ecx, [ebp+4]
mov	[ebp+0], eax
call	sub_66D910

loc_66E825:
mov	[ebx], esi
mov	ebx, [esp+10h+arg_4]
mov	esi, [ebx]
inc	dword ptr [esi+8]
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66E83D
call	sub_650DF0

loc_66E83D:
add	ebx, 4
push	ebx
lea	ecx, [edi+4]
mov	[edi], esi
call	sub_67C4C0
mov	ecx, [esp+10h+arg_0]
pop	ebx
pop	edi
pop	esi
mov	dword ptr [ecx], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_66E730 endp

align 10h



sub_66E860 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
inc	dword ptr [edx+8]
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
test	edx, edx
jz	short loc_66E88F
push	esi
mov	esi, [edx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[edx+8], esi
pop	esi

loc_66E88F:
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
retn	4
sub_66E860 endp

align 10h



sub_66E8A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
mov	dword ptr [esi], offset	off_1433250
call	sub_652830
lea	ecx, [esi+28h]
call	sub_652830
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_66E8C5
call	sub_64B3B0

loc_66E8C5:
lea	ecx, [esi+10h]
call	sub_6691A0
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1431AF4
jz	short loc_66E8E8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_66E8E8:
mov	eax, esi
pop	esi
retn	4
sub_66E8A0 endp

align 10h



sub_66E8F0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 28h
fldz
push	edi
fst	[esp+2Ch+var_14]
mov	edi, ecx
mov	eax, [edi]
fst	[esp+2Ch+var_18]
fst	[esp+2Ch+var_C]
mov	[esp+2Ch+var_20], 0
fst	[esp+2Ch+var_10]
mov	[esp+2Ch+var_1C], 0
fst	[esp+2Ch+var_4]
mov	[esp+2Ch+var_1B], 0
fstp	[esp+2Ch+var_8]
mov	ecx, [eax+8]
cmp	ecx, [eax+0Ch]
jbe	short loc_66E931
add	ecx, 0FFFFFFF0h
jmp	short loc_66E934

loc_66E931:
mov	ecx, [eax+14h]

loc_66E934:
push	esi
push	eax
call	sub_651D80
mov	ecx, [edi]
mov	byte ptr [esp+30h+var_24], al
mov	eax, [ecx+8]
push	eax
call	sub_66D5E0
mov	edx, [edi]
mov	[esp+30h+var_20], eax
mov	eax, [edx+8]
sub	eax, [edx+0Ch]
mov	esi, [edx+1Ch]
dec	esi
sar	eax, 4
shl	esi, 5
add	eax, esi
xor	ecx, ecx
cmp	eax, 2
jb	short loc_66E97F
mov	esi, [edx+18h]
add	eax, 0FFFFFFFEh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [esi+ecx*4]
mov	ecx, eax

loc_66E97F:
push	edx
call	sub_651D80
mov	[esp+30h+var_1B], al
test	al, al
jz	loc_66EADE
mov	edx, [edi]
mov	eax, [edx+8]
sub	eax, [edx+0Ch]
mov	esi, [edx+1Ch]
dec	esi
sar	eax, 4
shl	esi, 5
add	eax, esi
xor	ecx, ecx
cmp	eax, 6
jb	short loc_66E9C2
mov	esi, [edx+18h]
add	eax, 0FFFFFFFAh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [esi+ecx*4]
mov	ecx, eax

loc_66E9C2:
push	edx
call	sub_653400
fstp	[esp+30h+var_28]
fld	[esp+30h+var_28]
mov	edx, [edi]
fmul	ds:dbl_15FCE20
xor	ecx, ecx
fstp	[esp+30h+var_18]
mov	eax, [edx+8]
sub	eax, [edx+0Ch]
mov	esi, [edx+1Ch]
dec	esi
sar	eax, 4
shl	esi, 5
add	eax, esi
cmp	eax, 5
jb	short loc_66EA0B
mov	esi, [edx+18h]
add	eax, 0FFFFFFFBh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [esi+ecx*4]
mov	ecx, eax

loc_66EA0B:
push	edx
call	sub_653400
fstp	[esp+30h+var_28]
fld	[esp+30h+var_28]
mov	edx, [edi]
fmul	ds:dbl_15FCE20
xor	ecx, ecx
fstp	[esp+30h+var_14]
mov	eax, [edx+8]
sub	eax, [edx+0Ch]
mov	esi, [edx+1Ch]
dec	esi
sar	eax, 4
shl	esi, 5
add	eax, esi
cmp	eax, 4
jb	short loc_66EA54
mov	esi, [edx+18h]
add	eax, 0FFFFFFFCh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [esi+ecx*4]
mov	ecx, eax

loc_66EA54:
push	edx
call	sub_653400
fstp	[esp+30h+var_28]
fld	[esp+30h+var_28]
mov	edx, [edi]
fmul	ds:dbl_15FCE20
xor	ecx, ecx
fstp	[esp+30h+var_10]
mov	eax, [edx+8]
sub	eax, [edx+0Ch]
mov	esi, [edx+1Ch]
dec	esi
sar	eax, 4
shl	esi, 5
add	eax, esi
cmp	eax, 3
jb	short loc_66EA9D
mov	esi, [edx+18h]
add	eax, 0FFFFFFFDh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [esi+ecx*4]
mov	ecx, eax

loc_66EA9D:
push	ebp
push	edx
call	sub_653400
fstp	[esp+34h+var_28]
fld	[esp+34h+var_28]
mov	esi, [edi]
fmul	ds:dbl_15FCE20
mov	ebp, 4
add	esi, 8
fstp	[esp+34h+var_C]

loc_66EAC0:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66EAD8
mov	ecx, esi
call	sub_64B660

loc_66EAD8:
sub	ebp, 1
jnz	short loc_66EAC0
pop	ebp

loc_66EADE:
cmp	[esp+30h+var_20], 0
pop	esi
jz	short loc_66EB10
mov	edx, [esp+2Ch+var_24]
push	edx
lea	ecx, [esp+30h+var_20]
call	sub_68FDE0
mov	eax, [edi]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
test	eax, eax
jz	short loc_66EB10
lea	ecx, [esp+2Ch+var_20]
push	ecx
mov	ecx, eax
call	sub_669C10

loc_66EB10:
mov	ecx, [edi]
add	ecx, 8
call	sub_66E590
pop	edi
add	esp, 28h
retn
sub_66E8F0 endp

align 10h



sub_66EB20 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h

sub	esp, 2Ch
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	esi, [eax+8]
mov	ecx, esi
cmp	ecx, [eax+0Ch]
jbe	short loc_66EB38
add	ecx, 0FFFFFFF0h
jmp	short loc_66EB3B

loc_66EB38:
mov	ecx, [eax+14h]

loc_66EB3B:
mov	[esp+34h+var_10], 1
mov	dl, [ecx]
push	ebx
cmp	dl, 8
jz	short loc_66EB51
cmp	dl, 0Bh
jnz	loc_66EC03

loc_66EB51:
push	eax
lea	eax, [esp+3Ch+var_2C]
push	eax
call	sub_652DC0
cmp	[esp+38h+var_2C], 0
jz	short loc_66EBD3
mov	ecx, [edi]
push	ecx
mov	ecx, esi
call	sub_652D70
mov	esi, eax
test	esi, esi
jz	short loc_66EBD3
mov	eax, [edi]
mov	ecx, [esp+38h+var_2C]
push	ebp
add	eax, 78h
mov	[esp+3Ch+var_20], 0
mov	edx, [eax]
mov	ebx, [ecx+10h]
lea	ebp, [esp+3Ch+var_20]
push	ebp
add	edx, 140h
add	ecx, 10h
push	edx
mov	edx, [ebx+2Ch]
push	eax
call	edx
pop	ebp
test	al, al
jz	short loc_66EBCA
mov	eax, [edi]
push	eax
lea	ecx, [esp+3Ch+var_20]
call	sub_652C20
mov	edx, [esi]
mov	edx, [edx+48h]
push	1
push	eax
mov	eax, [edi]
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	short loc_66EBCA
push	esi
lea	ecx, [esp+3Ch+var_10]
call	sub_652EF0

loc_66EBCA:
lea	ecx, [esp+38h+var_20]
call	sub_652830

loc_66EBD3:
test	[esp+38h+var_24], 2
jnz	short loc_66EBE7
mov	ecx, [esp+38h+var_2C]
test	ecx, ecx
jz	short loc_66EBE7
call	sub_64B3B0

loc_66EBE7:
test	[esp+38h+var_24], 1
mov	[esp+38h+var_2C], 0
jnz	short loc_66EC03
mov	ecx, [esp+38h+var_28]
test	ecx, ecx
jz	short loc_66EC03
call	sub_64B3B0

loc_66EC03:
mov	esi, [edi]
mov	ecx, [esi+8]
add	esi, 8
lea	eax, [ecx-20h]
cmp	eax, [esi+4]
jnb	short loc_66EC37
mov	ebx, 2

loc_66EC18:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66EC30
mov	ecx, esi
call	sub_64B660

loc_66EC30:
sub	ebx, 1
jnz	short loc_66EC18
jmp	short loc_66EC49

loc_66EC37:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h

loc_66EC49:
mov	esi, [edi]
add	dword ptr [esi+8], 10h
mov	eax, [esi+8]
add	esi, 8
pop	ebx
cmp	eax, [esi+8]
jb	short loc_66EC62
mov	ecx, esi
call	sub_64B530

loc_66EC62:
mov	esi, [esi]
test	esi, esi
jz	short loc_66EC74
lea	ecx, [esp+34h+var_10]
push	ecx
mov	ecx, esi
call	sub_652330

loc_66EC74:
lea	ecx, [esp+34h+var_10]
call	sub_652830
pop	edi
pop	esi
add	esp, 2Ch
retn
sub_66EB20 endp

align 10h



sub_66EC90 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h

sub	esp, 3Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	ecx, [eax+8]
push	ecx
lea	ecx, [esp+50h+var_10]
call	sub_652330
mov	eax, [edi]
mov	ecx, [eax+8]
cmp	ecx, [eax+0Ch]
jbe	short loc_66ECB7
add	ecx, 0FFFFFFF0h
jmp	short loc_66ECBA

loc_66ECB7:
mov	ecx, [eax+14h]

loc_66ECBA:
push	eax
call	sub_653660
mov	esi, [edi]
mov	ecx, [esi+8]
add	esi, 8
lea	edx, [ecx-20h]
mov	ebx, eax
mov	[esp+4Ch+var_3C], ebx
cmp	edx, [esi+4]
jnb	short loc_66ECFF
mov	ebp, 2
jmp	short loc_66ECE0
align 10h

loc_66ECE0:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66ECF8
mov	ecx, esi
call	sub_64B660

loc_66ECF8:
sub	ebp, 1
jnz	short loc_66ECE0
jmp	short loc_66ED11

loc_66ECFF:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h

loc_66ED11:
mov	al, [esp+4Ch+var_10]
cmp	al, 8
jz	short loc_66ED21
cmp	al, 0Bh
jnz	loc_66EE76

loc_66ED21:
mov	eax, [edi]
push	eax
lea	ecx, [esp+50h+var_2C]
push	ecx
lea	ecx, [esp+54h+var_10]
call	sub_652DC0
mov	ecx, [esp+4Ch+var_2C]
test	ecx, ecx
jz	loc_66EE4A
mov	eax, [edi]
add	eax, 78h
mov	[esp+4Ch+var_20], 0
mov	edx, [eax]
mov	esi, [ecx+10h]
lea	ebp, [esp+4Ch+var_20]
push	ebp
add	edx, 140h
add	ecx, 10h
push	edx
mov	edx, [esi+2Ch]
push	eax
call	edx
test	al, al
jz	loc_66EE3D
mov	eax, [edi]
push	eax
mov	ecx, ebp
call	sub_652C20
test	eax, eax
jz	loc_66EE3D
mov	edx, [eax+10h]
mov	edx, [edx+44h]
lea	ebp, [eax+10h]
mov	eax, [edi]
push	0
push	ebx
add	eax, 78h
push	eax
mov	ecx, ebp
call	edx
xor	esi, esi
test	ebx, ebx
jle	loc_66EE3D
lea	esp, [esp+0]

loc_66EDA0:
mov	edx, [edi]
mov	eax, [edx+8]
sub	eax, [edx+0Ch]
mov	ebx, [edx+1Ch]
dec	ebx
sar	eax, 4
shl	ebx, 5
add	eax, ebx
xor	ecx, ecx
cmp	esi, eax
ja	short loc_66EDCF
mov	ebx, [edx+18h]
sub	eax, esi
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [ebx+ecx*4]
mov	ecx, eax

loc_66EDCF:
mov	al, [ecx]
cmp	al, 8
jz	short loc_66EDD9
cmp	al, 0Bh
jnz	short loc_66EE30

loc_66EDD9:
push	edx
lea	edx, [esp+50h+var_38]
push	edx
call	sub_652DC0
mov	ecx, [esp+4Ch+var_38]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_66EE04
mov	eax, [ebp+0]
mov	edx, [eax+44h]
push	ecx
mov	ecx, [edi]
add	ecx, 78h
push	esi
push	ecx
mov	ecx, ebp
call	edx
mov	ecx, [esp+4Ch+var_38]

loc_66EE04:
test	[esp+4Ch+var_30], 2
jnz	short loc_66EE14
cmp	ecx, ebx
jz	short loc_66EE14
call	sub_64B3B0

loc_66EE14:
test	[esp+4Ch+var_30], 1
mov	[esp+4Ch+var_38], ebx
jnz	short loc_66EE2C
mov	ecx, [esp+4Ch+var_34]
cmp	ecx, ebx
jz	short loc_66EE2C
call	sub_64B3B0

loc_66EE2C:
mov	[esp+4Ch+var_34], ebx

loc_66EE30:
mov	ebx, [esp+4Ch+var_3C]
inc	esi
cmp	esi, ebx
jl	loc_66EDA0

loc_66EE3D:
lea	ecx, [esp+4Ch+var_20]
call	sub_652830
mov	ecx, [esp+4Ch+var_2C]

loc_66EE4A:
test	[esp+4Ch+var_24], 2
jnz	short loc_66EE5A
test	ecx, ecx
jz	short loc_66EE5A
call	sub_64B3B0

loc_66EE5A:
test	[esp+4Ch+var_24], 1
mov	[esp+4Ch+var_2C], 0
jnz	short loc_66EE76
mov	ecx, [esp+4Ch+var_28]
test	ecx, ecx
jz	short loc_66EE76
call	sub_64B3B0

loc_66EE76:
mov	ecx, [edi]
push	ebx
add	ecx, 8
call	sub_64C1F0
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn
sub_66EC90 endp

align 10h



sub_66EEA0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h

sub	esp, 48h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [eax+8]
push	edi
push	ecx
lea	ecx, [esp+58h+var_10]
call	sub_652330
mov	eax, [esi]
mov	ecx, [eax+8]
add	eax, 8
cmp	ecx, [eax+4]
jbe	short loc_66EEC9
lea	eax, [ecx-10h]
jmp	short loc_66EECC

loc_66EEC9:
mov	eax, [eax+0Ch]

loc_66EECC:
push	eax
lea	ecx, [esp+58h+var_20]
call	sub_652330
mov	edx, [esi]
push	edx
lea	eax, [esp+58h+var_3C]
push	eax
lea	ecx, [esp+5Ch+var_10]
call	sub_652DC0
mov	ecx, [esi]
push	ecx
lea	edx, [esp+58h+var_48]
push	edx
lea	ecx, [esp+5Ch+var_20]
call	sub_652DC0
mov	eax, [esp+54h+var_3C]
xor	ebx, ebx
cmp	eax, ebx
jz	loc_66EFD3
cmp	[esp+54h+var_48], ebx
jz	loc_66EFD3
lea	ecx, [eax+10h]
mov	eax, [esi]
push	ebp
add	eax, 78h
mov	[esp+58h+var_30], bl
mov	edx, [eax]
mov	edi, [ecx]
lea	ebp, [esp+58h+var_30]
push	ebp
add	edx, 140h
push	edx
push	eax
mov	eax, [edi+2Ch]
call	eax
test	al, al
jz	loc_66EFC9
cmp	[esp+58h+var_30], 6
jnz	loc_66EFC9
mov	ecx, [esi]
push	ecx
mov	ecx, ebp
call	sub_652C20
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_66EF63
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_66EF63:
mov	eax, [esi]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	54h
call	eax
cmp	eax, ebx
jz	short loc_66EF8E
mov	edx, [esi]
add	edx, 78h
push	ebp
push	edx
mov	ecx, eax
call	sub_665D00
mov	edi, eax
jmp	short loc_66EF90

loc_66EF8E:
xor	edi, edi

loc_66EF90:
mov	ecx, [esi]
add	ecx, 78h
push	edi
push	ecx
mov	ecx, [esp+60h+var_48]
call	sub_67BD50
mov	eax, [esi]
lea	edx, [esp+58h+var_3C]
push	edx
add	eax, 78h
push	eax
lea	ecx, [edi+10h]
call	sub_668360
cmp	edi, ebx
jz	short loc_66EFBE
mov	ecx, edi
call	sub_64B3B0

loc_66EFBE:
cmp	ebp, ebx
jz	short loc_66EFC9
mov	ecx, ebp
call	sub_64B3B0

loc_66EFC9:
lea	ecx, [esp+58h+var_30]
call	sub_652830
pop	ebp

loc_66EFD3:
mov	esi, [esi]
mov	ecx, [esi+8]
add	esi, 8
lea	edx, [ecx-20h]
cmp	edx, [esi+4]
jnb	short loc_66F007
mov	edi, 2

loc_66EFE8:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66F000
mov	ecx, esi
call	sub_64B660

loc_66F000:
sub	edi, 1
jnz	short loc_66EFE8
jmp	short loc_66F019

loc_66F007:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h

loc_66F019:
test	[esp+54h+var_40], 2
jnz	short loc_66F02D
mov	ecx, [esp+54h+var_48]
cmp	ecx, ebx
jz	short loc_66F02D
call	sub_64B3B0

loc_66F02D:
test	[esp+54h+var_40], 1
mov	[esp+54h+var_48], ebx
jnz	short loc_66F045
mov	ecx, [esp+54h+var_44]
cmp	ecx, ebx
jz	short loc_66F045
call	sub_64B3B0

loc_66F045:
test	[esp+54h+var_34], 2
mov	[esp+54h+var_44], ebx
jnz	short loc_66F05D
mov	ecx, [esp+54h+var_3C]
cmp	ecx, ebx
jz	short loc_66F05D
call	sub_64B3B0

loc_66F05D:
test	[esp+54h+var_34], 1
mov	[esp+54h+var_3C], ebx
jnz	short loc_66F075
mov	ecx, [esp+54h+var_38]
cmp	ecx, ebx
jz	short loc_66F075
call	sub_64B3B0

loc_66F075:
lea	ecx, [esp+54h+var_20]
mov	[esp+54h+var_38], ebx
call	sub_652830
lea	ecx, [esp+54h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 48h
retn
sub_66EEA0 endp

align 10h



sub_66F0A0 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h

sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	ecx, [eax+8]
mov	edx, ecx
lea	esi, [edx-10h]
cmp	edx, [eax+0Ch]
ja	short loc_66F0BB
mov	esi, [eax+14h]

loc_66F0BB:
mov	dl, [ecx]
xor	bl, bl
mov	[esp+30h+var_1D], bl
cmp	dl, 8
jz	short loc_66F0D1
cmp	dl, 0Bh
jnz	loc_66F179

loc_66F0D1:
push	eax
lea	eax, [esp+34h+var_1C]
push	eax
call	sub_652DC0
cmp	[esp+30h+var_1C], 0
jz	short loc_66F149
mov	ecx, [edi]
push	ecx
mov	ecx, esi
call	sub_652D70
mov	esi, eax
test	esi, esi
jz	short loc_66F149
mov	eax, [edi]
mov	ecx, [esp+30h+var_1C]
add	eax, 78h
mov	[esp+30h+var_10], 0
mov	edx, [eax]
mov	ebx, [ecx+10h]
lea	ebp, [esp+30h+var_10]
push	ebp
add	edx, 140h
add	ecx, 10h
push	edx
mov	edx, [ebx+2Ch]
push	eax
call	edx
test	al, al
jz	short loc_66F13C
mov	eax, [edi]
push	eax
mov	ecx, ebp
call	sub_652C20
mov	edx, [esi]
mov	edx, [edx+48h]
push	1
push	eax
mov	eax, [edi]
push	eax
mov	ecx, esi
call	edx
mov	bl, al
jmp	short loc_66F140

loc_66F13C:
mov	bl, [esp+30h+var_1D]

loc_66F140:
lea	ecx, [esp+30h+var_10]
call	sub_652830

loc_66F149:
test	[esp+30h+var_14], 2
jnz	short loc_66F15D
mov	ecx, [esp+30h+var_1C]
test	ecx, ecx
jz	short loc_66F15D
call	sub_64B3B0

loc_66F15D:
test	[esp+30h+var_14], 1
mov	[esp+30h+var_1C], 0
jnz	short loc_66F179
mov	ecx, [esp+30h+var_18]
test	ecx, ecx
jz	short loc_66F179
call	sub_64B3B0

loc_66F179:
mov	esi, [edi]
mov	ecx, [esi+8]
add	esi, 8
lea	eax, [ecx-20h]
cmp	eax, [esi+4]
jnb	short loc_66F1AF
mov	ebp, 2
mov	edi, edi

loc_66F190:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_66F1A8
mov	ecx, esi
call	sub_64B660

loc_66F1A8:
sub	ebp, 1
jnz	short loc_66F190
jmp	short loc_66F1C1

loc_66F1AF:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h

loc_66F1C1:
mov	esi, [edi]
add	dword ptr [esi+8], 10h
mov	eax, [esi+8]
add	esi, 8
cmp	eax, [esi+8]
jb	short loc_66F1D9
mov	ecx, esi
call	sub_64B530

loc_66F1D9:
mov	esi, [esi]
test	esi, esi
jz	short loc_66F1E5
mov	byte ptr [esi],	2
mov	[esi+4], bl

loc_66F1E5:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_66F0A0 endp

align 10h



sub_66F1F0 proc	near
add	ecx, 10h
jmp	sub_6691A0
sub_66F1F0 endp

align 10h



sub_66F200 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 8
cmp	[esp+8+arg_8], 0
push	esi
mov	esi, ecx
jz	short loc_66F250
mov	eax, [esi]
test	eax, eax
jz	short loc_66F23A
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
and	edx, [eax+4]
push	edx
push	ecx
mov	ecx, esi
call	sub_669AC0
test	eax, eax
jl	short loc_66F23A
mov	[esp+0Ch+var_4], eax
mov	[esp+0Ch+var_8], esi
lea	eax, [esp+0Ch+var_8]
jmp	short loc_66F261

loc_66F23A:
mov	[esp+0Ch+var_8], 0
mov	[esp+0Ch+var_4], 0
lea	eax, [esp+0Ch+var_8]
jmp	short loc_66F261

loc_66F250:
mov	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, esi
call	sub_66E6B0

loc_66F261:
mov	edx, [eax]
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [eax+4]
mov	[ecx+4], eax
mov	[ecx], edx
mov	eax, ecx
pop	esi
add	esp, 8
retn	0Ch
sub_66F200 endp

align 10h



sub_66F280 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+10h], 2
jnz	short loc_66F295
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66F295
call	sub_64B3B0

loc_66F295:
test	byte ptr [esi+10h], 1
mov	dword ptr [esi+8], 0
jnz	short loc_66F2AE
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_66F2AE
call	sub_64B3B0

loc_66F2AE:
mov	dword ptr [esi+0Ch], 0
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66F2C3
call	sub_650DF0

loc_66F2C3:
mov	dword ptr [esi], 0FFFFFFFEh
pop	esi
retn
sub_66F280 endp

align 10h



sub_66F2D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	edx, [ecx]
mov	[esp+8+var_4], ecx
test	edx, edx
jz	loc_66F37F
mov	eax, [esp+8+arg_0]
mov	eax, [eax]
push	esi
mov	[esp+0Ch+var_8], eax
mov	eax, [eax+0Ch]
push	edi
mov	edi, [edx+4]
and	eax, edi
lea	ecx, [eax+eax*4]
cmp	dword ptr [edx+ecx*4+8], 0FFFFFFFEh
lea	esi, [edx+ecx*4+8]
jz	short loc_66F37D
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, edi
cmp	ecx, eax
jnz	short loc_66F37D
push	ebx
mov	[esp+14h+arg_0], eax
or	ebx, 0FFFFFFFFh
push	ebp

loc_66F318:
mov	ecx, [esi+4]
mov	ebp, [ecx+0Ch]
and	ebp, edi
cmp	ebp, [esp+18h+arg_0]
jnz	short loc_66F32C
cmp	ecx, [esp+18h+var_8]
jz	short loc_66F33E

loc_66F32C:
mov	ebx, eax
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_66F37B
lea	ecx, [eax+eax*4]
lea	esi, [edx+ecx*4+8]
jmp	short loc_66F318

loc_66F33E:
cmp	[esp+18h+arg_0], eax
mov	eax, [esi]
jnz	short loc_66F365
cmp	eax, 0FFFFFFFFh
jz	short loc_66F36C
lea	eax, [eax+eax*4]
mov	ecx, esi
lea	edi, [edx+eax*4+8]
call	sub_66F280
push	edi
mov	ecx, esi
call	sub_66E710
mov	esi, edi
jmp	short loc_66F36C

loc_66F365:
lea	ecx, [ebx+ebx*4]
mov	[edx+ecx*4+8], eax

loc_66F36C:
mov	ecx, esi
call	sub_66F280
mov	ecx, [esp+18h+var_4]
mov	eax, [ecx]
dec	dword ptr [eax]

loc_66F37B:
pop	ebp
pop	ebx

loc_66F37D:
pop	edi
pop	esi

loc_66F37F:
add	esp, 8
retn	4
sub_66F2D0 endp

align 10h



sub_66F390 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	edx, ecx
mov	eax, [edx]
mov	[esp+8+var_4], edx
test	eax, eax
jz	loc_66F470
mov	ecx, [eax+4]
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	esi, [esi]
mov	esi, [esi]
push	edi
mov	edi, [esi+0Ch]
and	edi, ecx
lea	esi, [edi+edi*4]
cmp	dword ptr [eax+esi*4+8], 0FFFFFFFEh
lea	esi, [eax+esi*4+8]
jz	loc_66F46E
push	ebx
mov	ebx, [esi+4]
mov	ebx, [ebx+0Ch]
and	ebx, ecx
cmp	ebx, edi
jnz	loc_66F46D
push	ebp
mov	[esp+18h+var_8], edi
or	ebp, 0FFFFFFFFh

loc_66F3E0:
mov	ecx, [esi+4]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
cmp	eax, [esp+18h+var_8]
jnz	short loc_66F414
mov	ecx, [esp+18h+arg_0]
mov	ebx, [ecx]
mov	ecx, [esi+4]
cmp	dword ptr [ecx+4], 0
jnz	short loc_66F407
call	sub_651580
mov	edx, [esp+18h+var_4]

loc_66F407:
mov	ecx, [ebx]
mov	eax, [esi+4]
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]
jz	short loc_66F428

loc_66F414:
mov	ebp, edi
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_66F46C
mov	eax, [edx]
lea	ecx, [edi+edi*4]
lea	esi, [eax+ecx*4+8]
jmp	short loc_66F3E0

loc_66F428:
cmp	[esp+18h+var_8], edi
jnz	short loc_66F451
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_66F45D
mov	ecx, [edx]
lea	eax, [eax+eax*4]
lea	edi, [ecx+eax*4+8]
mov	ecx, esi
call	sub_66F280
push	edi
mov	ecx, esi
call	sub_66E710
mov	esi, edi
jmp	short loc_66F45D

loc_66F451:
mov	ecx, [edx]
mov	edx, [esi]
lea	eax, [ebp+ebp*4+0]
mov	[ecx+eax*4+8], edx

loc_66F45D:
mov	ecx, esi
call	sub_66F280
mov	eax, [esp+18h+var_4]
mov	eax, [eax]
dec	dword ptr [eax]

loc_66F46C:
pop	ebp

loc_66F46D:
pop	ebx

loc_66F46E:
pop	edi
pop	esi

loc_66F470:
add	esp, 8
retn	4
sub_66F390 endp

align 10h



sub_66F480 proc	near

arg_0= dword ptr  4

add	ecx, 28Ch
push	esi
mov	esi, [ecx]
push	edi
mov	edi, [esp+8+arg_0]
test	esi, esi
jz	short loc_66F4D3
mov	eax, [esi+4]
and	eax, [edi+0Ch]
lea	edx, [esp+8+arg_0]
push	eax
push	edx
call	sub_66A130
test	eax, eax
jl	short loc_66F4D3
shl	eax, 4
lea	eax, [eax+esi+0Ch]
test	eax, eax
jz	short loc_66F4D3
lea	esi, [eax+4]
test	esi, esi
jz	short loc_66F4D3
dec	dword ptr [edi+8]
cmp	dword ptr [edi+8], 0
lea	eax, [edi+8]
mov	ecx, edi
jnz	short loc_66F4CC
call	sub_650DF0

loc_66F4CC:
pop	edi
mov	eax, esi
pop	esi
retn	4

loc_66F4D3:
dec	dword ptr [edi+8]
cmp	dword ptr [edi+8], 0
lea	eax, [edi+8]
mov	ecx, edi
jnz	short loc_66F4E6
call	sub_650DF0

loc_66F4E6:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_66F480 endp

align 10h



sub_66F4F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
add	ecx, 288h
cmp	byte ptr [eax+4], 6
push	esi
jbe	short loc_66F52E
mov	esi, [ecx]
test	esi, esi
jz	short loc_66F53C
mov	eax, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+0Ch]
and	edx, [esi+4]
push	edx
push	eax
call	sub_669AC0
test	eax, eax
jl	short loc_66F53C
lea	eax, [eax+eax*4]
lea	eax, [esi+eax*4+0Ch]
test	eax, eax
jz	short loc_66F53C
add	eax, 4
jmp	short loc_66F538

loc_66F52E:
mov	edx, [esp+4+arg_4]
push	edx
call	sub_66E5F0

loc_66F538:
test	eax, eax
jnz	short loc_66F542

loc_66F53C:
xor	al, al
pop	esi
retn	0Ch

loc_66F542:
mov	ecx, [esp+4+arg_8]
test	ecx, ecx
jz	short loc_66F550
push	eax
call	sub_67C4C0

loc_66F550:
mov	al, 1
pop	esi
retn	0Ch
sub_66F4F0 endp

align 10h



sub_66F560 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebx, ecx
mov	eax, [ebx+0CCh]
push	esi
push	edi
test	eax, eax
jbe	loc_66F6F6
mov	ecx, [ebx+0C8h]
mov	eax, [ecx+eax*4-4]
test	eax, eax
jz	short loc_66F590
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_66F590:
mov	[esp+14h+var_4], eax
test	eax, eax
jz	loc_66F6F6
mov	ebp, [esp+14h+arg_0]

loc_66F5A0:
mov	esi, [esp+14h+var_4]
add	esi, 10h
cmp	byte ptr [ebx+7Ch], 6
jbe	short loc_66F5D2
mov	edi, [esi]
test	edi, edi
jz	short loc_66F61C
mov	eax, [ebp+0]
mov	ecx, [edi+4]
and	ecx, [eax+0Ch]
push	ecx
push	ebp
mov	ecx, esi
call	sub_662340
test	eax, eax
jl	short loc_66F61C
lea	edx, [eax+eax*2]
lea	eax, [edi+edx*8+0Ch]
jmp	short loc_66F60D

loc_66F5D2:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
mov	[esp+14h+arg_0], ebp
jnz	short loc_66F5E4
call	sub_651580

loc_66F5E4:
mov	eax, [esi]
test	eax, eax
jz	short loc_66F61C
mov	ecx, [ebp+0]
mov	eax, [eax+4]
and	eax, [ecx+0Ch]
lea	edx, [esp+14h+arg_0]
push	eax
push	edx
mov	ecx, esi
call	sub_662420
test	eax, eax
jl	short loc_66F61C
mov	ecx, [esi]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8+0Ch]

loc_66F60D:
test	eax, eax
jz	short loc_66F61C
lea	esi, [eax+4]
test	esi, esi
jnz	loc_66F6D2

loc_66F61C:
mov	al, [ebx+7Ch]
movzx	edi, al
cmp	edi, 5
jl	short loc_66F65F
mov	esi, [ebx+78h]
add	esi, 118h
cmp	al, 6
jbe	short loc_66F63B
mov	edx, [esi]
cmp	edx, [ebp+0]
jmp	short loc_66F654

loc_66F63B:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_66F649
call	sub_651580

loc_66F649:
mov	eax, [esi]
mov	ecx, [ebp+0]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_66F654:
setz	al
test	al, al
jnz	loc_66F6E9

loc_66F65F:
cmp	edi, 6
jl	short loc_66F69A
mov	esi, [ebx+78h]
add	esi, 100h
cmp	byte ptr [ebx+7Ch], 6
jbe	short loc_66F67A
mov	eax, [esi]
cmp	eax, [ebp+0]
jmp	short loc_66F693

loc_66F67A:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_66F688
call	sub_651580

loc_66F688:
mov	ecx, [esi]
mov	edx, [ebp+0]
mov	eax, [ecx+4]
cmp	eax, [edx+4]

loc_66F693:
setz	al
test	al, al
jnz	short loc_66F6E9

loc_66F69A:
mov	ecx, [esp+14h+var_4]
mov	eax, [ecx+14h]
test	eax, eax
jz	short loc_66F6B2
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_66F6B2:
call	sub_64B3B0
mov	eax, [esp+14h+var_4]
mov	eax, [eax+14h]
mov	[esp+14h+var_4], eax
test	eax, eax
jnz	loc_66F5A0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_66F6D2:
mov	ecx, [esp+14h+var_4]
test	ecx, ecx
jz	short loc_66F6DF
call	sub_64B3B0

loc_66F6DF:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_66F6E9:
mov	ecx, [esp+14h+var_4]
test	ecx, ecx
jz	short loc_66F6F6
call	sub_64B3B0

loc_66F6F6:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	4
sub_66F560 endp




sub_66F700 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_66F78C
mov	eax, [eax+4]
push	esi
push	edi
xor	edi, edi
inc	eax
mov	[esp+14h+var_4], eax
lea	ebx, [ebx+0]

loc_66F720:
mov	eax, [ebp+0]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_66F76C
test	byte ptr [esi+10h], 2
jnz	short loc_66F740
mov	ecx, [esi+8]
cmp	ecx, ebx
jz	short loc_66F740
call	sub_64B3B0

loc_66F740:
test	byte ptr [esi+10h], 1
mov	[esi+8], ebx
jnz	short loc_66F755
mov	ecx, [esi+0Ch]
cmp	ecx, ebx
jz	short loc_66F755
call	sub_64B3B0

loc_66F755:
mov	[esi+0Ch], ebx
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66F766
call	sub_650DF0

loc_66F766:
mov	dword ptr [esi], 0FFFFFFFEh

loc_66F76C:
add	edi, 14h
sub	[esp+14h+var_4], 1
jnz	short loc_66F720
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
mov	[ebp+0], ebx
pop	esi

loc_66F78C:
pop	ebp
pop	ebx
pop	ecx
retn
sub_66F700 endp




sub_66F790 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_66F7EE
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_66F7A4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_66F7D1
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_66F7BD
call	sub_64B3B0

loc_66F7BD:
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66F7CB
call	sub_650DF0

loc_66F7CB:
mov	dword ptr [esi], 0FFFFFFFEh

loc_66F7D1:
add	edi, 10h
sub	ebp, 1
jnz	short loc_66F7A4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_66F7EE:
pop	ebx
retn
sub_66F790 endp




sub_66F7F0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_66F812
call	sub_66F790
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_66F812:
push	esi
cmp	eax, 8
jnb	short loc_66F81F
mov	esi, 8
jmp	short loc_66F884

loc_66F81F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_66F832
fadd	ds:flt_15FCC08

loc_66F832:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_66F884:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
mov	edx, esi
shl	edx, 4
add	edx, 8
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_66F8E4
xor	eax, eax
jmp	short loc_66F8D0
align 10h

loc_66F8D0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_66F8D0

loc_66F8E4:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_66F95D
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_66F8F7

loc_66F8F3:
mov	edi, [esp+1Ch+var_C]

loc_66F8F7:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_66F93C
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_6706A0
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_66F929
call	sub_64B3B0

loc_66F929:
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66F936
call	sub_650DF0

loc_66F936:
mov	dword ptr [edi], 0FFFFFFFEh

loc_66F93C:
add	ebx, 10h
sub	ebp, 1
jnz	short loc_66F8F3
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_66F95D:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_66F790
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_66F7F0 endp

align 10h



sub_66F980 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [ecx+0CCh]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
lea	edi, [ecx+0C8h]
push	esi
push	edi
mov	ecx, edi
call	sub_66E650
cmp	esi, ebx
jbe	short loc_66F9C2
sub	esi, ebx
mov	eax, [edi]
lea	eax, [eax+ebx*4]
jz	short loc_66F9C2
lea	esp, [esp+0]

loc_66F9B0:
test	eax, eax
jz	short loc_66F9BA
mov	dword ptr [eax], 0

loc_66F9BA:
add	eax, 4
sub	esi, 1
jnz	short loc_66F9B0

loc_66F9C2:
pop	edi
pop	esi
pop	ebx
retn	4
sub_66F980 endp

align 10h



sub_66F9D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
mov	eax, [ebp+0]
push	esi
push	edi
push	ecx
mov	esi, ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
xor	ebx, ebx
cmp	eax, ebx
jz	loc_66FAEB
cmp	[eax+4], ebx
lea	edi, [eax+4]
jnz	loc_66FADF
mov	edx, [eax]
lea	ecx, [esp+28h+var_C]
push	esi
push	ecx
call	edx
mov	[esp+30h+var_10], bl
mov	ecx, [eax]
add	esp, 8
mov	[esp+28h+var_18], ecx
cmp	ecx, ebx
jz	short loc_66FA2C
inc	dword ptr [ecx+8]
add	ecx, 8
and	dword ptr [ecx], 8FFFFFFFh

loc_66FA2C:
mov	[esp+28h+var_14], ebx
mov	ecx, [eax+4]
cmp	ecx, ebx
jz	short loc_66FA4A
mov	al, [eax+8]
and	al, 1
movzx	edx, al
push	edx
push	ecx
lea	ecx, [esp+30h+var_18]
call	sub_67C1A0

loc_66FA4A:
test	[esp+28h+var_4], 2
jnz	short loc_66FA5E
mov	ecx, [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_66FA5E
call	sub_64B3B0

loc_66FA5E:
test	[esp+28h+var_4], 1
mov	[esp+28h+var_C], ebx
jnz	short loc_66FA76
mov	ecx, [esp+28h+var_8]
cmp	ecx, ebx
jz	short loc_66FA76
call	sub_64B3B0

loc_66FA76:
mov	eax, [ebp+0]
push	ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
mov	ecx, [esp+28h+var_18]
mov	esi, ecx
lea	edi, [eax+4]
cmp	ecx, ebx
jz	short loc_66FAA2
inc	dword ptr [ecx+8]
and	dword ptr [ecx+8], 8FFFFFFFh
lea	eax, [ecx+8]

loc_66FAA2:
mov	ecx, [edi]
cmp	ecx, ebx
jz	short loc_66FAAD
call	sub_64B3B0

loc_66FAAD:
mov	[edi], esi
test	[esp+28h+var_10], 2
jnz	short loc_66FAC3
mov	ecx, [esp+28h+var_18]
cmp	ecx, ebx
jz	short loc_66FAC3
call	sub_64B3B0

loc_66FAC3:
test	[esp+28h+var_10], 1
mov	[esp+28h+var_18], ebx
jnz	short loc_66FADB
mov	ecx, [esp+28h+var_14]
cmp	ecx, ebx
jz	short loc_66FADB
call	sub_64B3B0

loc_66FADB:
mov	[esp+28h+var_14], ebx

loc_66FADF:
mov	eax, [edi]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	4

loc_66FAEB:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 18h
retn	4
sub_66F9D0 endp

align 10h



sub_66FB00 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
lea	eax, [esp+8+arg_0]
lea	esi, [edi+284h]
push	eax
mov	ecx, esi
call	sub_66D970
test	eax, eax
jl	short loc_66FB2C
mov	edx, [esi]
lea	ecx, [eax+eax*2+3]
lea	eax, [edx+ecx*4]
test	eax, eax
jz	short loc_66FB2C
add	eax, 4
jnz	short loc_66FB5E

loc_66FB2C:
mov	eax, [esp+8+arg_0]
lea	ecx, [edi+eax*4+8]
push	ecx
mov	ecx, edi
call	sub_66F9D0
lea	edx, [esp+8+arg_0]
push	edx
mov	ecx, esi
call	sub_66D970
test	eax, eax
jl	short loc_66FB65
mov	ecx, [esi]
lea	eax, [eax+eax*2+3]
lea	eax, [ecx+eax*4]
test	eax, eax
jz	short loc_66FB65
add	eax, 4
jz	short loc_66FB65

loc_66FB5E:
mov	eax, [eax]
pop	edi
pop	esi
retn	4

loc_66FB65:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_66FB00 endp

align 10h



sub_66FB70 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_4]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_66FB00
mov	ebx, eax
test	ebx, ebx
jz	short loc_66FB95
mov	eax, [ebx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebx+8], eax

loc_66FB95:
mov	ecx, [esi+2ACh]
mov	edi, [esp+20h+arg_0]
lea	eax, [esp+20h+var_10]
push	eax
add	ecx, 10h
lea	eax, [esi+ebp*4+8]
mov	byte ptr [esp+24h+var_10], 0
mov	edx, [ecx]
mov	edx, [edx+2Ch]
push	eax
add	edi, 78h
push	edi
mov	[esp+2Ch+arg_4], ebx
call	edx
test	al, al
jz	short loc_66FC38
mov	eax, [esp+20h+arg_0]
push	eax
lea	ecx, [esp+24h+var_10]
call	sub_652C20
mov	ebp, eax
test	ebp, ebp
jz	short loc_66FC38
mov	ecx, [ebp+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebp+8], ecx
mov	edx, [ebp+10h]
mov	edx, [edx+2Ch]
lea	eax, [esp+20h+var_10]
push	eax
lea	ecx, [ebp+10h]
add	esi, 140h
push	esi
push	edi
call	edx
test	al, al
jz	short loc_66FC31
mov	eax, [esp+20h+arg_0]
push	eax
lea	ecx, [esp+24h+var_10]
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_66FC22
mov	ecx, [esi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx

loc_66FC22:
test	ebx, ebx
jz	short loc_66FC2D
mov	ecx, ebx
call	sub_64B3B0

loc_66FC2D:
mov	[esp+20h+arg_4], esi

loc_66FC31:
mov	ecx, ebp
call	sub_64B3B0

loc_66FC38:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	esi, [esp+20h+arg_4]
test	esi, esi
jz	short loc_66FC50
mov	ecx, esi
call	sub_64B3B0

loc_66FC50:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_66FB70 endp

align 10h



sub_66FC60 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 28h
push	ebp
mov	ebp, [esp+2Ch+arg_4]
mov	ecx, [ebp+0]
push	esi
push	edi
mov	edi, [ecx+294h]
push	7
mov	[esp+38h+var_24], edi
call	sub_66FB00
mov	esi, [esp+34h+arg_8]
cmp	dword ptr [esi], 0
mov	[esp+34h+var_20], eax
jz	loc_66FD9C
push	ebx
mov	ebx, [esp+38h+arg_0]
jmp	short loc_66FCA8
jmp	short loc_66FCA0
align 10h

loc_66FCA0:
mov	edi, [esp+38h+var_24]
mov	esi, [esp+38h+arg_8]

loc_66FCA8:
mov	al, [esp+38h+arg_C]
mov	edx, [edi]
push	0
mov	byte ptr [esp+3Ch+arg_4], al
mov	eax, [edx+28h]
push	38h
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_66FCD4
mov	ecx, [esi+4]
mov	edx, [esp+34h+var_1C]
push	ecx
push	edx
push	ebp
mov	ecx, eax
call	sub_67C390
jmp	short loc_66FCD6

loc_66FCD4:
xor	eax, eax

loc_66FCD6:
mov	[esp+34h+var_18], eax
lea	eax, [esp+34h+var_18]
push	eax
lea	ecx, [esp+38h+var_C]
mov	[esp+38h+var_10], 0
mov	[esp+38h+var_14], 0
call	sub_651E70
mov	edx, [esi]
mov	ecx, [ebp+0]
mov	esi, [ecx+280h]
mov	eax, edx
lea	edi, [eax+1]

loc_66FD05:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_66FD05
sub	eax, edi
xor	edi, edi
push	edi
push	eax
push	edx
mov	ecx, esi
call	sub_650E40
mov	[esp+34h+var_24], eax
inc	dword ptr [eax+8]
mov	edx, [ebx]
mov	edx, [edx+28h]
lea	eax, [esp+34h+arg_8]
push	eax
lea	ecx, [esp+38h+var_C]
push	ecx
lea	eax, [esp+3Ch+var_24]
push	eax
push	ebp
mov	ecx, ebx
call	edx
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], edi
jnz	short loc_66FD4F
call	sub_650DF0

loc_66FD4F:
lea	ecx, [esp+38h+var_10]
call	sub_652830
test	byte ptr [esp+38h+var_14], 2
jnz	short loc_66FD6C
mov	ecx, [esp+38h+var_1C]
cmp	ecx, edi
jz	short loc_66FD6C
call	sub_64B3B0

loc_66FD6C:
test	byte ptr [esp+38h+var_14], 1
mov	[esp+38h+var_1C], edi
jnz	short loc_66FD84
mov	ecx, [esp+38h+var_18]
cmp	ecx, edi
jz	short loc_66FD84
call	sub_64B3B0

loc_66FD84:
mov	eax, [esp+38h+arg_8]
add	eax, 8
mov	[esp+38h+var_18], edi
mov	[esp+38h+arg_8], eax
cmp	[eax], edi
jnz	loc_66FCA0
pop	ebx

loc_66FD9C:
pop	edi
pop	esi
pop	ebp
add	esp, 28h
retn
sub_66FC60 endp

align 10h



sub_66FDB0 proc	near

var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 30h
push	ebx
mov	ebx, [esp+34h+arg_0]
mov	eax, [ebx]
push	ebp
mov	ebp, ecx
xor	ecx, ecx
cmp	[eax+10h], ecx
jnz	short loc_66FDCE
pop	ebp
xor	al, al
pop	ebx
add	esp, 30h
retn	8

loc_66FDCE:
mov	edx, [ebp+78h]
push	esi
mov	esi, [edx+8]
push	edi
lea	edi, [ebp+78h]
mov	edx, 1
add	[esi+8], edx
mov	eax, [edi]
mov	eax, [eax+8]
mov	[esp+40h+arg_0], eax
add	[eax+8], edx
mov	eax, [esp+40h+arg_4]
mov	[esp+40h+var_28], cl
mov	[esp+40h+var_C], ecx
mov	[esp+40h+var_8], ecx
lea	ecx, [esp+40h+var_18]
lea	edx, [esp+40h+var_28]
push	ecx
mov	ecx, ebp
mov	[esp+44h+var_30], esi
mov	[esp+44h+var_18], ebx
mov	[esp+44h+var_14], edx
mov	[esp+44h+var_10], eax
mov	[esp+44h+var_4], 4
call	sub_66D4F0
test	al, al
jz	short loc_66FE65
lea	ecx, [esp+40h+var_28]
call	sub_652830
mov	eax, [esp+40h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66FE48
call	sub_650DF0

loc_66FE48:
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	loc_66FFEE
mov	ecx, esi
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 30h
retn	8

loc_66FE65:
lea	edx, [esp+40h+arg_0]
push	edx
lea	eax, [esp+44h+var_30]
push	eax
push	ebx
push	edi
call	sub_668D70
add	esp, 10h
test	al, al
jz	loc_66FF23
push	4
lea	ecx, [esp+44h+var_30]
push	ecx
mov	ecx, ebp
call	sub_669880
test	eax, eax
jnz	short loc_66FED1
lea	ecx, [esp+40h+var_28]
call	sub_652830
mov	eax, [esp+40h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66FEB2
call	sub_650DF0

loc_66FEB2:
mov	ecx, [esp+40h+var_30]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	loc_6700FA
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 30h
retn	8

loc_66FED1:
mov	edx, [eax+78h]
mov	edx, [edx+2Ch]
lea	ecx, [eax+78h]
lea	eax, [esp+40h+var_28]
push	eax
lea	eax, [esp+44h+arg_0]
push	eax
push	edi
call	edx
lea	ecx, [esp+40h+var_28]
mov	bl, al
call	sub_652830
mov	eax, [esp+40h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66FF08
call	sub_650DF0

loc_66FF08:
mov	ecx, [esp+40h+var_30]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_66FF17
call	sub_650DF0

loc_66FF17:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 30h
retn	8

loc_66FF23:
mov	edx, [esp+40h+arg_4]
test	edx, edx
jz	short loc_66FF75
mov	esi, [edx+4]
sub	esi, 1
js	short loc_66FF75

loc_66FF33:
mov	eax, [edx]
mov	ecx, [eax+esi*8+4]
lea	eax, [eax+esi*8]
mov	eax, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_66FF4F
test	eax, eax
jz	short loc_66FF70
lea	ecx, [eax+10h]
jmp	short loc_66FF56

loc_66FF4F:
test	eax, eax
jz	short loc_66FF70
lea	ecx, [eax+78h]

loc_66FF56:
test	ecx, ecx
jz	short loc_66FF70
mov	edx, [ecx]
mov	edx, [edx+2Ch]
lea	eax, [esp+40h+var_28]
push	eax
push	ebx
push	edi
call	edx
test	al, al
jnz	short loc_66FFC0
mov	edx, [esp+40h+arg_4]

loc_66FF70:
sub	esi, 1
jns	short loc_66FF33

loc_66FF75:
push	ebx
mov	ecx, ebp
call	sub_66F560
test	eax, eax
jnz	short loc_66FFC0
cmp	[ebp+74h], eax
jz	short loc_66FF9E
mov	eax, [ebp+74h]
lea	ecx, [eax+78h]
mov	eax, [ecx]
mov	eax, [eax+2Ch]
lea	edx, [esp+40h+var_28]
push	edx
push	ebx
push	edi
call	eax
test	al, al
jnz	short loc_66FFC0

loc_66FF9E:
cmp	byte ptr [ebp+7Ch], 6
jbe	short loc_66FFFA
mov	ecx, [edi]
mov	eax, [ebx]
cmp	[ecx+0FCh], eax
jz	short loc_66FFC0
cmp	[ecx+108h], eax
jz	short loc_66FFC0
cmp	[ecx+104h], eax
jnz	short loc_67002F

loc_66FFC0:
lea	ecx, [esp+40h+var_28]
call	sub_652830
mov	eax, [esp+40h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_66FFDF
call	sub_650DF0

loc_66FFDF:
mov	ecx, [esp+40h+var_30]
add	dword ptr [ecx+8], 0FFFFFFFFh

loc_66FFE7:
jnz	short loc_66FFEE
call	sub_650DF0

loc_66FFEE:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 30h
retn	8

loc_66FFFA:
mov	ecx, [ebx]
cmp	dword ptr [ecx+4], 0
jnz	short loc_670007
call	sub_651580

loc_670007:
mov	ecx, [edi]
mov	eax, [ebx]
mov	edx, [eax+4]
mov	esi, [ecx+0FCh]
cmp	[esi+4], edx
jz	short loc_66FFC0
mov	esi, [ecx+108h]
cmp	[esi+4], edx
jz	short loc_66FFC0
mov	ecx, [ecx+104h]
cmp	[ecx+4], edx
jz	short loc_66FFC0

loc_67002F:
mov	edx, [eax]
cmp	byte ptr [edx],	5Fh
jnz	short loc_6700A8
cmp	byte ptr [ebp+7Ch], 6
mov	eax, edx
setnbe	cl
mov	[esp+40h+var_2C], cl
mov	edx, dword ptr [esp+40h+var_2C]
push	edx		; char
lea	ecx, [esp+44h+arg_4]
push	ecx		; int
push	eax		; char *
mov	[esp+4Ch+arg_4], 0
call	sub_68D7B0
or	esi, 0FFFFFFFFh
add	esp, 0Ch
cmp	eax, esi
jz	short loc_6700AB
mov	edx, [esp+40h+arg_4]
cmp	byte ptr [edx],	0
jnz	short loc_6700AB
mov	ecx, [ebp+74h]
mov	edx, [ecx]
push	eax
mov	eax, [edx+64h]
call	eax
test	eax, eax
jz	short loc_6700AB

loc_67007D:
lea	ecx, [esp+40h+var_28]
call	sub_652830
mov	eax, [esp+40h+arg_0]
add	[eax+8], esi
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67009C
call	sub_650DF0

loc_67009C:
mov	ecx, [esp+40h+var_30]
add	[ecx+8], esi
jmp	loc_66FFE7

loc_6700A8:
or	esi, 0FFFFFFFFh

loc_6700AB:
mov	ecx, [edi]
mov	eax, [ecx+2ACh]
test	eax, eax
jz	short loc_6700CD
mov	edx, [eax+10h]
mov	edx, [edx+2Ch]
lea	ecx, [eax+10h]
lea	eax, [esp+40h+var_28]
push	eax
push	ebx
push	edi
call	edx
test	al, al
jnz	short loc_67007D

loc_6700CD:
lea	ecx, [esp+40h+var_28]
call	sub_652830
mov	eax, [esp+40h+arg_0]
add	[eax+8], esi
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6700EC
call	sub_650DF0

loc_6700EC:
mov	ecx, [esp+40h+var_30]
add	[ecx+8], esi
jnz	short loc_6700FA
call	sub_650DF0

loc_6700FA:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 30h
retn	8
sub_66FDB0 endp

align 10h



sub_670110 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
test	eax, eax
jz	short loc_67012D
mov	ebp, [eax+4]
sub	ebp, 1
jns	short loc_670157

loc_67012D:
push	ebx
mov	ecx, edi
call	sub_66F560
test	eax, eax
jz	loc_6701D8
mov	ecx, [esp+20h+arg_4]
push	ecx
mov	ecx, eax
call	sub_652520
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch

loc_670153:
mov	eax, [esp+20h+arg_8]

loc_670157:
mov	eax, [eax]
mov	ecx, [eax+ebp*8+4]
lea	eax, [eax+ebp*8]
mov	eax, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_670173
test	eax, eax
jz	short loc_67017C
lea	esi, [eax+10h]
jmp	short loc_67017E

loc_670173:
test	eax, eax
jz	short loc_67017C
lea	esi, [eax+78h]
jmp	short loc_67017E

loc_67017C:
xor	esi, esi

loc_67017E:
mov	[esp+20h+var_10], 0
test	esi, esi
jz	short loc_67019B
mov	edx, [esi]
mov	edx, [edx+10h]
lea	eax, [esp+20h+var_10]
push	eax
push	ebx
push	edi
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_6701AB

loc_67019B:
lea	ecx, [esp+20h+var_10]
call	sub_652830
sub	ebp, 1
jns	short loc_670153
jmp	short loc_67012D

loc_6701AB:
mov	edx, [esp+20h+arg_4]
mov	eax, [esi]
mov	eax, [eax+0Ch]
lea	ecx, [esp+20h+arg_8]
push	ecx
push	edx
push	ebx
push	edi
mov	ecx, esi
mov	byte ptr [esp+30h+arg_8], 0
call	eax
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch

loc_6701D8:
mov	eax, [edi+74h]
lea	ecx, [eax+78h]
lea	eax, [esp+20h+arg_8]
push	eax
mov	eax, [esp+24h+arg_4]
push	eax
mov	byte ptr [esp+28h+arg_8], 0
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	ebx
push	edi
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_670110 endp




sub_670200 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
xor	ebx, ebx
push	ebx
push	48h
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_670271
cmp	[edi+74h], ebx
jz	short loc_670245
mov	ecx, [edi+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
test	eax, eax
jz	short loc_670245
mov	ecx, [edi+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	ecx, [eax+14h]
mov	eax, [ecx+0Ch]
jmp	short loc_670247

loc_670245:
xor	eax, eax

loc_670247:
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
mov	dword ptr [esi], offset	off_1433250
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], bl
mov	[esi+38h], bl
jmp	short loc_670273

loc_670271:
xor	esi, esi

loc_670273:
mov	edx, [edi+0CCh]
add	edi, 0C8h
inc	edx
push	edx
push	edi
mov	ecx, edi
call	sub_66E650
mov	eax, [edi+4]
mov	ecx, [edi]
lea	eax, [ecx+eax*4-4]
cmp	eax, ebx
jz	short loc_6702A9
cmp	esi, ebx
jz	short loc_6702A7
mov	edx, [esi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[esi+8], edx

loc_6702A7:
mov	[eax], esi

loc_6702A9:
cmp	esi, ebx
jz	short loc_6702B4
mov	ecx, esi
call	sub_64B3B0

loc_6702B4:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn
sub_670200 endp

align 10h



sub_6702C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	eax
mov	esi, ecx
push	edi
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, esi
call	sub_664310
mov	eax, [esp+10h+var_8]
test	eax, eax
jz	short loc_67030E
cmp	dword ptr [eax], 0
jz	short loc_67030E
mov	eax, [eax]
mov	ecx, [esp+10h+var_4]
cmp	ecx, [eax+4]
jg	short loc_67030E
mov	edx, [esp+10h+arg_4]
lea	ecx, [ecx+ecx*2]
push	edx
lea	ecx, [eax+ecx*8+10h]
call	sub_652520
pop	edi
pop	esi
add	esp, 8
retn	0Ch

loc_67030E:
mov	eax, [edi]
mov	edx, [esp+10h+arg_4]
mov	ecx, [eax+0Ch]
push	ecx
mov	[esp+14h+var_4], edx
lea	edx, [esp+14h+var_8]
push	edx
push	esi
mov	ecx, esi
mov	[esp+1Ch+var_8], edi
call	sub_66D9C0
pop	edi
pop	esi
add	esp, 8
retn	0Ch
sub_6702C0 endp

align 10h



sub_670340 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	ebp, ebp
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebp
jnz	short loc_670362
call	sub_66F700
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_670362:
push	esi
cmp	eax, 8
jnb	short loc_67036F
mov	esi, 8
jmp	short loc_6703D4

loc_67036F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_670382
fadd	ds:flt_15FCC08

loc_670382:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6703D4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebp
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebp
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebp
jbe	short loc_670434
xor	eax, eax
jmp	short loc_670420
align 10h

loc_670420:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 14h
sub	esi, 1
jnz	short loc_670420

loc_670434:
mov	eax, [edi]
cmp	eax, ebp
jz	loc_6704E0
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]
jmp	short loc_670454
jmp	short loc_670450
align 10h

loc_670450:
mov	edi, [esp+1Ch+var_C]

loc_670454:
mov	edx, [edi]
cmp	dword ptr [edx+ebp+8], 0FFFFFFFEh
lea	edi, [edx+ebp+8]
jz	short loc_6704BF
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_66E730
test	byte ptr [esi+0Ch], 2
jnz	short loc_67048C
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_67048C
call	sub_64B3B0

loc_67048C:
test	byte ptr [esi+0Ch], 1
mov	dword ptr [esi+4], 0
jnz	short loc_6704A5
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6704A5
call	sub_64B3B0

loc_6704A5:
mov	dword ptr [esi+8], 0
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6704B9
call	sub_650DF0

loc_6704B9:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6704BF:
add	ebp, 14h
sub	ebx, 1
jnz	short loc_670450
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_6704E0:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_66F700
pop	esi
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_670340 endp




sub_670500 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
test	eax, eax
jnz	short loc_670515
mov	eax, [esp+arg_0]
push	8
push	eax
call	sub_670340
retn	4

loc_670515:
mov	edx, [eax+4]
push	esi
lea	esi, ds:4[edx*4]
mov	edx, [eax]
lea	edx, [edx+edx*4]
cmp	edx, esi
pop	esi
jbe	short locret_67053C
mov	eax, [eax+4]
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_670340

locret_67053C:
retn	4
sub_670500 endp

align 10h



sub_670540 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_670554
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_670576

loc_670554:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_67057B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_670576:
call	sub_670340

loc_67057B:
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*4]
lea	edi, [ecx+edx*4+8]
mov	edx, [edi]
mov	ebp, 0FFFFFFFEh
mov	[esp+0Ch+arg_0], edi
cmp	edx, ebp
jnz	short loc_6705B7
mov	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [edi+4]
mov	dword ptr [edi], 0FFFFFFFFh
call	sub_66DB30
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_6705B7:
push	ebx
mov	ebx, [ecx+4]
mov	esi, eax
lea	ecx, [ecx+0]

loc_6705C0:
inc	esi
and	esi, ebx
lea	edx, [esi+esi*4]
cmp	[ecx+edx*4+8], ebp
jnz	short loc_6705C0
lea	edx, [esi+esi*4]
lea	ebp, [ecx+edx*4+8]
mov	edx, [edi+4]
mov	edx, [edx+0Ch]
add	edi, 4
and	edx, ebx
cmp	edx, eax
jnz	short loc_67062C
test	ebp, ebp
jz	short loc_6705F8
mov	eax, [esp+10h+arg_0]
mov	eax, [eax]
push	edi
lea	ecx, [ebp+4]
mov	[ebp+0], eax
call	sub_66D910

loc_6705F8:
mov	ebp, [esp+10h+arg_4]
mov	ecx, [ebp+0]
mov	ebx, [ecx]
inc	dword ptr [ebx+8]
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_670611
call	sub_650DF0

loc_670611:
mov	[edi], ebx
mov	edx, [ebp+4]
push	edx
lea	ecx, [edi+4]
call	sub_67C4C0
mov	eax, [esp+10h+arg_0]
pop	ebx
pop	edi
mov	[eax], esi
pop	esi
pop	ebp
retn	0Ch

loc_67062C:
lea	edx, [edx+edx*4]
cmp	[ecx+edx*4+8], eax
lea	ebx, [ecx+edx*4+8]
jz	short loc_67064F
lea	esp, [esp+0]

loc_670640:
mov	ebx, [ebx]
lea	edx, [ebx+ebx*4]
cmp	[ecx+edx*4+8], eax
lea	ebx, [ecx+edx*4+8]
jnz	short loc_670640

loc_67064F:
test	ebp, ebp
jz	short loc_670665
mov	eax, [esp+10h+arg_0]
mov	eax, [eax]
push	edi
lea	ecx, [ebp+4]
mov	[ebp+0], eax
call	sub_66D910

loc_670665:
mov	[ebx], esi
mov	ebx, [esp+10h+arg_4]
mov	ecx, [ebx]
mov	esi, [ecx]
inc	dword ptr [esi+8]
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_67067F
call	sub_650DF0

loc_67067F:
mov	[edi], esi
mov	edx, [ebx+4]
push	edx
lea	ecx, [edi+4]
call	sub_67C4C0
mov	eax, [esp+10h+arg_0]
pop	ebx
pop	edi
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_670540 endp

align 10h



sub_6706A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6706B3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6706D5

loc_6706B3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6706DA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6706D5:
call	sub_66F7F0

loc_6706DA:
mov	eax, [esi]
mov	edx, [esp+8+arg_8]
and	edx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ecx, edx
shl	ecx, 4
lea	esi, [ecx+eax+8]
mov	edi, 0FFFFFFFEh
cmp	[esi], edi
jnz	short loc_670730
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	edx, [ecx+4]
mov	[esi+8], edx
mov	eax, [ecx+8]
test	eax, eax
jz	short loc_670725
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_670725:
mov	eax, [ecx+8]
pop	edi
mov	[esi+0Ch], eax
pop	esi
retn	0Ch

loc_670730:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edx
push	ebp

loc_670737:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edi
jnz	short loc_670737
mov	edi, ebx
shl	edi, 4
lea	edi, [edi+eax+8]
mov	[esp+10h+arg_0], edi
mov	edi, [esi+4]
mov	edi, [edi+0Ch]
lea	ebp, [esi+4]
and	edi, ecx
cmp	edi, edx
jnz	short loc_670784
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_67076F
push	esi
call	sub_66E860

loc_67076F:
mov	ecx, [esp+10h+arg_4]
push	ecx
mov	ecx, ebp
call	sub_66AD40
pop	ebp
mov	[esi], ebx
pop	ebx
pop	edi
pop	esi
retn	0Ch

loc_670784:
shl	edi, 4
cmp	[edi+eax+8], edx
lea	edi, [edi+eax+8]
jz	short loc_6707A0

loc_670791:
mov	ecx, [edi]
shl	ecx, 4
cmp	[ecx+eax+8], edx
lea	edi, [ecx+eax+8]
jnz	short loc_670791

loc_6707A0:
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_6707AE
push	esi
call	sub_66E860

loc_6707AE:
mov	edx, [esp+10h+arg_4]
push	edx
mov	ecx, ebp
mov	[edi], ebx
call	sub_66AD40
pop	ebp
pop	ebx
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_6706A0 endp

align 10h



sub_6707D0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= byte ptr	 4

sub	esp, 24h
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
cmp	[esp+2Ch+arg_0], bl
jz	loc_6709AA
mov	ecx, [esi+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
push	ebx
push	38h
call	edx
cmp	eax, ebx
jz	short loc_670804
push	esi
mov	ecx, eax
call	sub_669400
mov	ebp, eax
jmp	short loc_670806

loc_670804:
xor	ebp, ebp

loc_670806:
push	edi
push	ebx
push	9
mov	[esp+38h+var_14], esi
mov	[esp+38h+var_10], 8
mov	ecx, [esi+280h]
push	offset aGfxplayer ; "gfxPlayer"
call	sub_650E40
mov	dword ptr [esp+30h+var_18], eax
push	ebx
mov	edi, 1
add	[eax+8], edi
mov	eax, [esp+34h+var_14]
mov	ecx, [eax+280h]
push	0Bh
push	offset aGfxlanguage ; "gfxLanguage"
call	sub_650E40
mov	[esp+30h+var_1C], eax
add	[eax+8], edi
mov	ecx, [esp+30h+var_14]
mov	ecx, [ecx+280h]
push	ebx
push	6
push	offset aGfxarg	; "gfxArg"
call	sub_650E40
mov	[esp+30h+var_20], eax
add	[eax+8], edi
mov	eax, [esi+2ACh]
lea	ecx, [eax+10h]
lea	eax, [esp+30h+var_C]
push	eax
lea	eax, [esp+34h+var_18]
push	eax
mov	[esp+38h+var_C], bl
mov	edx, [ecx]
mov	edx, [edx+2Ch]
lea	eax, [esp+38h+var_14]
push	eax
call	edx
mov	eax, [ebp+10h]
mov	eax, [eax+28h]
lea	ecx, [esp+34h+arg_0]
push	ecx
lea	edx, [esp+38h+var_10]
push	edx
lea	edi, [ebp+10h]
lea	ecx, [esp+3Ch+var_1C]
push	ecx
lea	edx, [esp+40h+var_18]
push	edx
mov	ecx, edi
mov	[esp+44h+arg_0], bl
call	eax
mov	eax, [esi+2ACh]
mov	edx, [eax+10h]
mov	edx, [edx+2Ch]
lea	ecx, [eax+10h]
lea	eax, [esp+34h+var_10]
push	eax
lea	eax, [esp+38h+var_20]
push	eax
lea	eax, [esp+3Ch+var_18]
push	eax
call	edx
mov	eax, [edi]
mov	eax, [eax+28h]
lea	ecx, [esp+34h+arg_0]
push	ecx
lea	edx, [esp+38h+var_10]
push	edx
lea	ecx, [esp+3Ch+var_20]
push	ecx
lea	edx, [esp+40h+var_18]
push	edx
mov	ecx, edi
mov	[esp+44h+arg_0], bl
call	eax
mov	eax, [esi+2ACh]
mov	edx, [eax+10h]
lea	ecx, [eax+10h]
lea	eax, [esp+34h+var_10]
mov	edx, [edx+2Ch]
push	eax
lea	eax, [esp+38h+var_24]
push	eax
lea	eax, [esp+3Ch+var_18]
push	eax
call	edx
mov	eax, [edi]
mov	eax, [eax+28h]
lea	ecx, [esp+34h+arg_0]
push	ecx
lea	edx, [esp+38h+var_10]
push	edx
lea	ecx, [esp+3Ch+var_24]
push	ecx
lea	edx, [esp+40h+var_18]
push	edx
mov	ecx, edi
mov	[esp+44h+arg_0], bl
call	eax
mov	ecx, [ebp+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebp+8], ecx
mov	ecx, [esi+2ACh]
pop	edi
cmp	ecx, ebx
jz	short loc_670952
call	sub_64B3B0

loc_670952:
lea	ecx, [esp+30h+var_10]
mov	[esi+2ACh], ebp
call	sub_652830
mov	eax, [esp+30h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_670976
call	sub_650DF0

loc_670976:
mov	eax, [esp+30h+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_67098B
call	sub_650DF0

loc_67098B:
mov	eax, [esp+30h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6709A0
call	sub_650DF0

loc_6709A0:
mov	ecx, ebp
call	sub_64B3B0
pop	ebp
jmp	short loc_6709BF

loc_6709AA:
mov	ecx, [esi+2ACh]
cmp	ecx, ebx
jz	short loc_6709B9
call	sub_64B3B0

loc_6709B9:
mov	[esi+2ACh], ebx

loc_6709BF:
lea	ecx, [esi+288h]
call	sub_66F700
lea	ecx, [esi+28Ch]
call	sub_66F790
lea	ecx, [esi+284h]
call	sub_660410
mov	[esi+290h], ebx
pop	esi
pop	ebx
add	esp, 24h
retn	4
sub_6707D0 endp

align 10h



sub_6709F0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 34h
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
xor	ebx, ebx
push	ebx
push	6Ch
call	eax
cmp	eax, ebx
jz	short loc_670A37
mov	ecx, [ebp+20h]
mov	edx, [esp+40h+arg_0]
push	1
push	ecx
mov	ecx, [ebp+14h]
push	ebx
push	ecx
mov	ecx, [ebp+0]
push	edx
push	ecx
mov	ecx, eax
call	sub_67CCA0
mov	edi, eax
mov	[esp+40h+var_34], edi
jmp	short loc_670A3D

loc_670A37:
mov	[esp+40h+var_34], ebx
mov	edi, ebx

loc_670A3D:
mov	eax, [ebp+8]
mov	edx, [ebp+0]
mov	ecx, [edx+78h]
mov	ecx, [ecx+280h]
push	esi
mov	esi, [ebp+18h]
add	esi, 3
add	eax, esi
push	eax
call	sub_651000
mov	[esp+44h+var_30], eax
inc	dword ptr [eax+8]
mov	edx, [esp+44h+var_30]
mov	eax, [edx+10h]
mov	ecx, [ebp+8]
lea	esi, [esi+eax+1]
movzx	eax, byte ptr [ecx+esi+1]
movzx	edx, byte ptr [ecx+esi]
add	ecx, esi
shl	eax, 8
or	eax, edx
add	esi, 2
cmp	eax, ebx
mov	[esp+44h+arg_0], esi
jle	loc_670BB0
add	edi, 54h
mov	[esp+44h+var_20], eax

loc_670A96:
mov	ecx, [ebp+0]
mov	eax, [ebp+8]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
add	eax, esi
push	eax
call	sub_651000
mov	ebx, eax
inc	dword ptr [ebx+8]
mov	eax, [esp+44h+var_34]
mov	esi, [eax+58h]
mov	edx, [edi+4]
inc	esi
mov	[esp+44h+var_2C], edx
cmp	esi, edx
jnb	short loc_670B16
mov	ecx, [edi]
mov	eax, edx
sub	eax, esi
mov	[esp+44h+var_24], eax
lea	eax, [eax+esi]
lea	eax, [ecx+eax*8-8]
jz	short loc_670B0A
mov	ecx, [esp+44h+var_24]
add	eax, 4
mov	[esp+44h+var_28], eax
mov	[esp+44h+var_24], ecx

loc_670AE7:
mov	ecx, [eax]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_670AF8
call	sub_650DF0
mov	edx, [esp+44h+var_2C]

loc_670AF8:
mov	eax, [esp+44h+var_28]
sub	eax, 8
sub	[esp+44h+var_24], 1
mov	[esp+44h+var_28], eax
jnz	short loc_670AE7

loc_670B0A:
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_670B2F
push	esi
jmp	short loc_670B23

loc_670B16:
cmp	esi, [edi+8]
jb	short loc_670B2F
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_670B23:
push	edi
mov	ecx, edi
call	sub_669070
mov	edx, [esp+44h+var_2C]

loc_670B2F:
mov	[edi+4], esi
cmp	esi, edx
jbe	short loc_670B5A
sub	esi, edx
mov	eax, [edi]
lea	eax, [eax+edx*8]
jz	short loc_670B5A
nop

loc_670B40:
test	eax, eax
jz	short loc_670B52
mov	ecx, [edi+0Ch]
mov	[eax], ecx
mov	ecx, [edi+10h]
mov	[eax+4], ecx
inc	dword ptr [ecx+8]

loc_670B52:
add	eax, 8
sub	esi, 1
jnz	short loc_670B40

loc_670B5A:
mov	edx, [edi+4]
mov	eax, [edi]
lea	esi, [eax+edx*8-8]
mov	dword ptr [esi], 0
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_670B7A
call	sub_650DF0

loc_670B7A:
mov	eax, [esp+44h+arg_0]
mov	ecx, ebx
mov	[esi+4], ebx
mov	edx, [ecx+10h]
add	dword ptr [ebx+8], 0FFFFFFFFh
lea	ecx, [eax+edx+1]
mov	[esp+44h+arg_0], ecx
jnz	short loc_670B9B
mov	ecx, ebx
call	sub_650DF0

loc_670B9B:
sub	[esp+44h+var_20], 1
mov	esi, [esp+44h+arg_0]
jnz	loc_670A96
mov	edi, [esp+44h+var_34]
xor	ebx, ebx

loc_670BB0:
mov	edx, [ebp+8]
movzx	eax, byte ptr [esi+edx+1]
lea	ecx, [esi+edx]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, ecx
mov	[edi+50h], eax
add	[ebp+14h], eax
mov	[esp+44h+var_14], 0
mov	[esp+44h+var_1C], edi
mov	edx, [edi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[edi+8], edx
mov	eax, [ebp+0]
mov	[esp+44h+var_18], ebx
mov	ecx, [eax+0CCh]
cmp	ecx, ebx
jbe	short loc_670C09
mov	eax, [eax+0C8h]
mov	ecx, [eax+ecx*4-4]
cmp	ecx, ebx
jz	short loc_670C09
push	ebx
push	ecx
lea	ecx, [esp+4Ch+var_1C]
call	sub_67C1A0

loc_670C09:
lea	ecx, [esp+44h+var_1C]
push	ecx
lea	ecx, [esp+48h+var_10]
call	sub_651E70
mov	edx, [esp+44h+var_30]
cmp	[edx+10h], ebx
jz	short loc_670C48
mov	eax, [ebp+0]
mov	ecx, [eax+74h]
lea	esi, [esp+44h+arg_0]
push	esi
lea	esi, [esp+48h+var_10]
push	esi
add	ecx, 78h
lea	esi, [esp+4Ch+var_30]
add	eax, 78h
mov	byte ptr [esp+4Ch+arg_0], 0
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+28h]
call	eax

loc_670C48:
mov	ecx, [ebp+0]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	54h
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_670C8C
mov	eax, [ebp+0]
mov	ecx, [eax+78h]
push	1
call	sub_66FB00
mov	ecx, [ebp+0]
push	ebx
lea	edx, [esp+48h+var_1C]
push	edx
add	ecx, 78h
push	eax
push	ecx
mov	ecx, esi
call	sub_67C6C0
mov	[esp+44h+var_20], eax
jmp	short loc_670C90

loc_670C8C:
mov	[esp+44h+var_20], ebx

loc_670C90:
mov	eax, [ebp+0]
mov	edi, [eax+78h]
mov	esi, [edi+284h]
lea	ebx, [edi+284h]
mov	[esp+44h+arg_0], 7
test	esi, esi
jz	short loc_670CF8
mov	ecx, 1505h
mov	eax, 4
jmp	short loc_670CC0
align 10h

loc_670CC0:
movzx	edx, byte ptr [esp+eax+47h]
imul	ecx, 1003Fh
dec	eax
add	ecx, edx
test	eax, eax
ja	short loc_670CC0
mov	eax, [esi+4]
and	eax, ecx
push	eax
lea	ecx, [esp+48h+arg_0]
push	ecx
mov	ecx, ebx
call	sub_66AB40
test	eax, eax
jl	short loc_670CF8
lea	edx, [eax+eax*2+3]
lea	eax, [esi+edx*4]
test	eax, eax
jz	short loc_670CF8
add	eax, 4
jnz	short loc_670D4B

loc_670CF8:
lea	eax, [edi+24h]
push	eax
mov	ecx, edi
call	sub_66F9D0
mov	esi, [ebx]
test	esi, esi
jz	short loc_670D4F
mov	ecx, 1505h
mov	eax, 4

loc_670D13:
movzx	edx, byte ptr [esp+eax+47h]
imul	ecx, 1003Fh
dec	eax
add	ecx, edx
test	eax, eax
ja	short loc_670D13
mov	eax, [esi+4]
and	eax, ecx
push	eax
lea	ecx, [esp+48h+arg_0]
push	ecx
mov	ecx, ebx
call	sub_66AB40
test	eax, eax
jl	short loc_670D4F
lea	edx, [eax+eax*2+3]
lea	eax, [esi+edx*4]
test	eax, eax
jz	short loc_670D4F
add	eax, 4
jz	short loc_670D4F

loc_670D4B:
mov	eax, [eax]
jmp	short loc_670D51

loc_670D4F:
xor	eax, eax

loc_670D51:
mov	ecx, [esp+44h+var_1C]
push	eax
mov	eax, [ebp+0]
add	eax, 78h
push	eax
call	sub_67C2B0
mov	ecx, [ebp+0]
mov	esi, [esp+44h+var_20]
mov	edi, [esp+44h+var_34]
add	ecx, 78h
push	esi
push	ecx
mov	ecx, edi
call	sub_67BD50
mov	edx, [esp+44h+var_30]
xor	ebx, ebx
cmp	[edx+10h], ebx
jnz	short loc_670DB0
mov	ebp, [ebp+0]
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
add	ebp, 8
cmp	eax, [ebp+8]
jb	short loc_670D9D
mov	ecx, ebp
call	sub_64B530

loc_670D9D:
mov	ebp, [ebp+0]
cmp	ebp, ebx
jz	short loc_670DB0
lea	eax, [esp+44h+var_10]
push	eax
mov	ecx, ebp
call	sub_652330

loc_670DB0:
cmp	esi, ebx
jz	short loc_670DBB
mov	ecx, esi
call	sub_64B3B0

loc_670DBB:
lea	ecx, [esp+44h+var_10]
call	sub_652830
test	[esp+44h+var_14], 2
pop	esi
jnz	short loc_670DD9
mov	ecx, [esp+40h+var_1C]
cmp	ecx, ebx
jz	short loc_670DD9
call	sub_64B3B0

loc_670DD9:
test	[esp+40h+var_14], 1
mov	[esp+40h+var_1C], ebx
jnz	short loc_670DF1
mov	ecx, [esp+40h+var_18]
cmp	ecx, ebx
jz	short loc_670DF1
call	sub_64B3B0

loc_670DF1:
mov	eax, [esp+40h+var_30]
mov	ecx, eax
add	eax, 8
mov	[esp+40h+var_18], ebx
dec	dword ptr [eax]
cmp	[eax], ebx
jnz	short loc_670E09
call	sub_650DF0

loc_670E09:
mov	ecx, edi
call	sub_64B3B0
pop	edi
pop	ebp
pop	ebx
add	esp, 34h
retn	4
sub_6709F0 endp

align 10h



sub_670E20 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 38h
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	6Ch
call	eax
test	eax, eax
jz	short loc_670E66
mov	ecx, [ebp+20h]
mov	edx, [esp+40h+arg_0]
push	2
push	ecx
mov	ecx, [ebp+14h]
push	0
push	ecx
mov	ecx, [ebp+0]
push	edx
push	ecx
mov	ecx, eax
call	sub_67CCA0
mov	ebx, eax
mov	[esp+40h+var_34], ebx
jmp	short loc_670E72

loc_670E66:
mov	[esp+40h+var_34], 0
mov	ebx, [esp+40h+var_34]

loc_670E72:
mov	eax, [ebp+8]
mov	edx, [ebp+0]
mov	ecx, [edx+78h]
mov	ecx, [ecx+280h]
push	esi
mov	esi, [ebp+18h]
add	esi, 3
push	edi
add	eax, esi
push	eax
call	sub_651000
mov	[esp+48h+var_38], eax
inc	dword ptr [eax+8]
mov	edx, [esp+48h+var_38]
mov	eax, [edx+10h]
mov	ecx, [ebp+8]
lea	edi, [esi+eax+1]
movzx	edx, byte ptr [ecx+edi]
movzx	eax, byte ptr [ecx+edi+1]
mov	cl, [ecx+edi+2]
add	edi, 2
mov	[ebx+6Bh], cl
mov	ecx, [ebp+8]
inc	edi
add	ecx, edi
shl	eax, 8
or	eax, edx
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	edi, 2
mov	[ebx+68h], cx
test	eax, eax
jle	loc_671026
add	ebx, 54h
mov	[esp+48h+var_28], eax
lea	ecx, [ecx+0]

loc_670EF0:
mov	eax, [ebp+8]
movzx	edx, byte ptr [eax+edi]
inc	edi
lea	esi, [eax+edi]
mov	eax, esi
mov	[esp+48h+var_20], edx
lea	ecx, [eax+1]

loc_670F04:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_670F04
sub	eax, ecx
mov	ecx, [ebp+0]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	eax
push	esi
call	sub_650F20
inc	dword ptr [eax+8]
mov	ecx, [esp+48h+var_34]
mov	esi, [ecx+58h]
mov	ecx, [ebx+4]
inc	esi
mov	[esp+48h+arg_0], eax
mov	[esp+48h+var_24], ecx
cmp	esi, ecx
jnb	short loc_670F8F
mov	edx, [ebx]
sub	ecx, esi
mov	[esp+48h+var_2C], ecx
lea	ecx, [ecx+esi]
lea	ecx, [edx+ecx*8-8]
jz	short loc_670F83
mov	edx, [esp+48h+var_2C]
add	ecx, 4
mov	[esp+48h+var_30], ecx
mov	[esp+48h+var_2C], edx
lea	ebx, [ebx+0]

loc_670F60:
mov	ecx, [ecx]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_670F71
call	sub_650DF0
mov	eax, [esp+48h+arg_0]

loc_670F71:
mov	ecx, [esp+48h+var_30]
sub	ecx, 8
sub	[esp+48h+var_2C], 1
mov	[esp+48h+var_30], ecx
jnz	short loc_670F60

loc_670F83:
mov	ecx, [ebx+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_670FA8
push	esi
jmp	short loc_670F9C

loc_670F8F:
cmp	esi, [ebx+8]
jb	short loc_670FA8
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_670F9C:
push	ebx
mov	ecx, ebx
call	sub_669070
mov	eax, [esp+48h+arg_0]

loc_670FA8:
mov	edx, [esp+48h+var_24]
mov	[ebx+4], esi
cmp	esi, edx
jbe	short loc_670FDA
sub	esi, edx
mov	ecx, [ebx]
lea	ecx, [ecx+edx*8]
jz	short loc_670FDA
lea	esp, [esp+0]

loc_670FC0:
test	ecx, ecx
jz	short loc_670FD2
mov	edx, [ebx+0Ch]
mov	[ecx], edx
mov	edx, [ebx+10h]
mov	[ecx+4], edx
inc	dword ptr [edx+8]

loc_670FD2:
add	ecx, 8
sub	esi, 1
jnz	short loc_670FC0

loc_670FDA:
mov	ecx, [ebx+4]
mov	edx, [ebx]
lea	esi, [edx+ecx*8-8]
mov	ecx, [esp+48h+var_20]
mov	[esi], ecx
inc	dword ptr [eax+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_670FFE
call	sub_650DF0
mov	eax, [esp+48h+arg_0]

loc_670FFE:
mov	[esi+4], eax
mov	edx, eax
mov	ecx, [edx+10h]
add	dword ptr [eax+8], 0FFFFFFFFh
lea	edi, [edi+ecx+1]
jnz	short loc_671017
mov	ecx, eax
call	sub_650DF0

loc_671017:
sub	[esp+48h+var_28], 1
jnz	loc_670EF0
mov	ebx, [esp+48h+var_34]

loc_671026:
mov	edx, [ebp+8]
movzx	eax, byte ptr [edi+edx+1]
movzx	ecx, byte ptr [edi+edx]
add	edi, edx
shl	eax, 8
or	eax, ecx
mov	[ebx+50h], eax
add	[ebp+14h], eax
mov	[esp+48h+var_14], 0
mov	[esp+48h+var_1C], ebx
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx
mov	eax, [ebp+0]
mov	[esp+48h+var_18], 0
mov	ecx, [eax+0CCh]
test	ecx, ecx
jbe	short loc_671084
mov	eax, [eax+0C8h]
mov	ecx, [eax+ecx*4-4]
test	ecx, ecx
jz	short loc_671084
push	0
push	ecx
lea	ecx, [esp+50h+var_1C]
call	sub_67C1A0

loc_671084:
lea	ecx, [esp+48h+var_1C]
push	ecx
lea	ecx, [esp+4Ch+var_10]
call	sub_651E70
mov	edx, [esp+48h+var_38]
cmp	dword ptr [edx+10h], 0
jz	short loc_6710C4
mov	eax, [ebp+0]
mov	ecx, [eax+74h]
lea	esi, [esp+48h+arg_0]
push	esi
lea	esi, [esp+4Ch+var_10]
push	esi
add	ecx, 78h
lea	esi, [esp+50h+var_38]
add	eax, 78h
mov	byte ptr [esp+50h+arg_0], 0
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+28h]
call	eax

loc_6710C4:
mov	esi, [ebp+0]
mov	ecx, [esi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esi, 78h
push	0
push	54h
mov	[esp+50h+var_24], esi
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_67110B
mov	ecx, [ebp+0]
mov	ecx, [ecx+78h]
push	1
call	sub_66FB00
push	0
lea	edx, [esp+4Ch+var_1C]
push	edx
push	eax
push	esi
mov	ecx, edi
call	sub_67C6C0
mov	[esp+48h+var_28], eax
jmp	short loc_671113

loc_67110B:
mov	[esp+48h+var_28], 0

loc_671113:
mov	eax, [ebp+0]
mov	ecx, [eax+78h]
mov	edi, [ecx+284h]
lea	esi, [ecx+284h]
mov	[esp+48h+var_20], ecx
mov	[esp+48h+arg_0], 7
test	edi, edi
jz	short loc_67117C
mov	ecx, 1505h
mov	eax, 4
nop

loc_671140:
movzx	edx, byte ptr [esp+eax+4Bh]
imul	ecx, 1003Fh
dec	eax
add	ecx, edx
test	eax, eax
ja	short loc_671140
mov	eax, [edi+4]
and	eax, ecx
push	eax
lea	ecx, [esp+4Ch+arg_0]
push	ecx
mov	ecx, esi
call	sub_66AB40
test	eax, eax
jl	short loc_671178
lea	edx, [eax+eax*2+3]
lea	eax, [edi+edx*4]
test	eax, eax
jz	short loc_671178
add	eax, 4
jnz	short loc_6711D8

loc_671178:
mov	ecx, [esp+48h+var_20]

loc_67117C:
lea	eax, [ecx+24h]
push	eax
call	sub_66F9D0
mov	edi, [esi]
test	edi, edi
jz	short loc_6711DC
mov	ecx, 1505h
mov	eax, 4
jmp	short loc_6711A0
align 10h

loc_6711A0:
movzx	edx, byte ptr [esp+eax+4Bh]
imul	ecx, 1003Fh
dec	eax
add	ecx, edx
test	eax, eax
ja	short loc_6711A0
mov	eax, [edi+4]
and	eax, ecx
push	eax
lea	ecx, [esp+4Ch+arg_0]
push	ecx
mov	ecx, esi
call	sub_66AB40
test	eax, eax
jl	short loc_6711DC
lea	edx, [eax+eax*2+3]
lea	eax, [edi+edx*4]
test	eax, eax
jz	short loc_6711DC
add	eax, 4
jz	short loc_6711DC

loc_6711D8:
mov	eax, [eax]
jmp	short loc_6711DE

loc_6711DC:
xor	eax, eax

loc_6711DE:
mov	esi, [esp+48h+var_24]
mov	ecx, [esp+48h+var_1C]
push	eax
push	esi
call	sub_67C2B0
mov	edi, [esp+48h+var_28]
push	edi
push	esi
mov	ecx, ebx
call	sub_67BD50
mov	eax, [esp+48h+var_38]
xor	esi, esi
cmp	[eax+10h], esi
jnz	short loc_671231
mov	ebp, [ebp+0]
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
add	ebp, 8
cmp	eax, [ebp+8]
jb	short loc_67121E
mov	ecx, ebp
call	sub_64B530

loc_67121E:
mov	ebp, [ebp+0]
cmp	ebp, esi
jz	short loc_671231
lea	ecx, [esp+48h+var_10]
push	ecx
mov	ecx, ebp
call	sub_652330

loc_671231:
cmp	edi, esi
jz	short loc_67123C
mov	ecx, edi
call	sub_64B3B0

loc_67123C:
lea	ecx, [esp+48h+var_10]
call	sub_652830
test	[esp+48h+var_14], 2
jnz	short loc_671259
mov	ecx, [esp+48h+var_1C]
cmp	ecx, esi
jz	short loc_671259
call	sub_64B3B0

loc_671259:
test	[esp+48h+var_14], 1
mov	[esp+48h+var_1C], esi
jnz	short loc_671271
mov	ecx, [esp+48h+var_18]
cmp	ecx, esi
jz	short loc_671271
call	sub_64B3B0

loc_671271:
mov	eax, [esp+48h+var_38]
mov	[esp+48h+var_18], esi
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], esi
pop	edi
pop	esi
jnz	short loc_67128C
call	sub_650DF0

loc_67128C:
mov	ecx, ebx
call	sub_64B3B0
pop	ebp
pop	ebx
add	esp, 38h
retn	4
sub_670E20 endp

align 10h



sub_6712A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+0C8h]
mov	eax, [ecx+0CCh]
lea	eax, [edx+eax*4-4]
mov	edx, [eax]
push	esi
test	edx, edx
jz	short loc_6712C4
mov	esi, [edx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[edx+8], esi

loc_6712C4:
mov	esi, [eax]
test	esi, esi
jz	short loc_6712EE
cmp	byte ptr [ecx+7Ch], 6
mov	edx, [esp+4+arg_4]
setnbe	al
movzx	ecx, al
mov	eax, [esp+4+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esi+10h]
call	sub_6702C0
mov	ecx, esi
call	sub_64B3B0

loc_6712EE:
pop	esi
retn	8
sub_6712A0 endp

align 10h



sub_671300 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi+0CCh]
test	eax, eax
jz	short loc_671349
mov	ecx, [esi+0C8h]
cmp	dword ptr [ecx+eax*4-4], 0
jz	short loc_671349
push	edi
mov	edi, [esp+18h+arg_0]
push	edi
mov	ecx, esi
call	sub_66F560
test	eax, eax
jnz	short loc_671348
lea	edx, [esp+18h+var_10]
push	edx
push	edi
mov	ecx, esi
mov	[esp+20h+var_10], al
call	sub_6712A0
lea	ecx, [esp+18h+var_10]
call	sub_652830

loc_671348:
pop	edi

loc_671349:
pop	esi
add	esp, 10h
retn	4
sub_671300 endp




sub_671350 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_6C=	byte ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_5C=	byte ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	dword ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 9Ch
push	ebx
push	ebp
push	esi
xor	esi, esi
cmp	[esp+0A8h+arg_8], esi
mov	[esp+0A8h+var_98], esi
push	edi
mov	ebp, ecx
mov	[esp+0ACh+var_30], 0
jge	short loc_67138A
mov	eax, [ebp+8]
sub	eax, [ebp+0Ch]
mov	ecx, [ebp+1Ch]
sar	eax, 4
shl	ecx, 5
lea	edx, [eax+ecx-20h]
mov	[esp+0ACh+arg_8], edx

loc_67138A:
mov	eax, 1
cmp	[esp+0ACh+arg_4], eax
jnz	short loc_6713BA
push	eax
mov	[esp+0B0h+var_98], eax
lea	eax, [esp+0B0h+var_88]
push	eax
mov	ecx, ebp
call	sub_66D650
mov	edi, [esp+0ACh+arg_0]
mov	ecx, [edi]
cmp	ecx, [eax]
jnz	short loc_6713C1
mov	bl, 1
jmp	short loc_6713C3

loc_6713BA:
mov	edi, [esp+0ACh+arg_0]

loc_6713C1:
xor	bl, bl

loc_6713C3:
test	byte ptr [esp+0ACh+var_98], 1
jz	short loc_6713FB
and	[esp+0ACh+var_98], 0FFFFFFFEh
test	byte ptr [esp+0ACh+var_80], 2
jnz	short loc_6713E3
mov	ecx, [esp+0ACh+var_88]
cmp	ecx, esi
jz	short loc_6713E3
call	sub_64B3B0

loc_6713E3:
test	byte ptr [esp+0ACh+var_80], 1
mov	[esp+0ACh+var_88], esi
jnz	short loc_6713FB
mov	ecx, [esp+0ACh+var_84]
cmp	ecx, esi
jz	short loc_6713FB
call	sub_64B3B0

loc_6713FB:
test	bl, bl
jz	loc_6714A9
mov	ecx, [ebp+8]
mov	byte ptr [esp+0ACh+var_88], 0
mov	al, [ecx]
cmp	al, 3
jz	short loc_671431
cmp	al, 4
jz	short loc_671431
cmp	al, 2
jz	short loc_671431
cmp	al, 5
jz	short loc_671431
cmp	al, 6
jz	short loc_671425
cmp	al, 7
jnz	short loc_6714A0

loc_671425:
push	ecx
lea	ecx, [esp+0B0h+var_88]
call	sub_652520
jmp	short loc_671457

loc_671431:
push	esi
lea	edx, [esp+0B0h+var_10]
push	edx
mov	ecx, ebp
call	sub_66D6E0
push	eax
lea	ecx, [esp+0B0h+var_88]
call	sub_652520
lea	ecx, [esp+0ACh+var_10]
call	sub_652830

loc_671457:
mov	al, byte ptr [esp+0ACh+var_88]
test	al, al
jz	short loc_6714A0
cmp	al, 0Ah
jz	short loc_6714A0
push	ebp
lea	ecx, [esp+0B0h+var_88]
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_67147F
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax

loc_67147F:
lea	ecx, [esp+0ACh+var_88]
call	sub_652830
lea	ecx, [esp+0ACh+var_30]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	0Ch

loc_6714A0:
lea	ecx, [esp+0ACh+var_88]
call	sub_652830

loc_6714A9:
mov	eax, [edi]
lea	ecx, [eax+10h]
mov	eax, [ebp+78h]
lea	ebx, [ebp+78h]
lea	esi, [esp+0ACh+var_40]
push	esi
add	eax, 140h
mov	[esp+0B0h+var_40], 0
mov	edx, [ecx]
push	eax
mov	eax, [edx+2Ch]
push	ebx
call	eax
test	al, al
jnz	short loc_6714E1
mov	ecx, [ebx]
push	1
call	sub_66FB00
push	eax
mov	ecx, esi
call	sub_652E40

loc_6714E1:
push	ebp
lea	ecx, [esp+0B0h+var_40]
call	sub_652C20
mov	esi, eax
mov	eax, [edi]
mov	byte ptr [esp+0ACh+var_8C], 0
mov	[esp+0ACh+var_94], eax
test	eax, eax
jz	short loc_671508
inc	dword ptr [eax+8]
add	eax, 8
and	dword ptr [eax], 8FFFFFFFh

loc_671508:
mov	eax, [edi+4]
mov	[esp+0ACh+var_90], 0
test	eax, eax
jz	short loc_67152B
mov	cl, [edi+8]
and	cl, 1
movzx	edx, cl
push	edx
push	eax
lea	ecx, [esp+0B4h+var_94]
call	sub_67C1A0

loc_67152B:
mov	[esp+0ACh+var_50], 0
test	esi, esi
jz	loc_67160F
mov	eax, [ebx]
mov	edx, [esi+10h]
lea	ecx, [esi+10h]
lea	esi, [esp+0ACh+var_50]
push	esi
add	eax, 148h
push	eax
mov	eax, [edx+2Ch]
push	ebx
call	eax
test	al, al
jz	loc_67160F
mov	al, [esp+0ACh+var_50]
cmp	al, 8
jz	short loc_671565
cmp	al, 0Bh
jnz	short loc_671583

loc_671565:
or	[esp+0ACh+var_98], 2
push	ebp
lea	ecx, [esp+0B0h+var_88]
push	ecx
lea	ecx, [esp+0B4h+var_50]
call	sub_652DC0
cmp	dword ptr [eax], 0
mov	byte ptr [esp+0ACh+var_9C+3], 1
jnz	short loc_671588

loc_671583:
mov	byte ptr [esp+0ACh+var_9C+3], 0

loc_671588:
test	byte ptr [esp+0ACh+var_98], 2
jz	short loc_6715BF
test	byte ptr [esp+0ACh+var_80], 2
jnz	short loc_6715A3
mov	ecx, [esp+0ACh+var_88]
test	ecx, ecx
jz	short loc_6715A3
call	sub_64B3B0

loc_6715A3:
test	byte ptr [esp+0ACh+var_80], 1
mov	[esp+0ACh+var_88], 0
jnz	short loc_6715BF
mov	ecx, [esp+0ACh+var_84]
test	ecx, ecx
jz	short loc_6715BF
call	sub_64B3B0

loc_6715BF:
cmp	byte ptr [esp+0ACh+var_9C+3], 0
jz	short loc_67160F
push	ebp
lea	edx, [esp+0B0h+var_88]
push	edx
lea	ecx, [esp+0B4h+var_50]
call	sub_652DC0
push	eax
lea	ecx, [esp+0B0h+var_94]
call	sub_67C4C0
test	byte ptr [esp+0ACh+var_80], 2
jnz	short loc_6715F3
mov	ecx, [esp+0ACh+var_88]
test	ecx, ecx
jz	short loc_6715F3
call	sub_64B3B0

loc_6715F3:
test	byte ptr [esp+0ACh+var_80], 1
mov	[esp+0ACh+var_88], 0
jnz	short loc_67160F
mov	ecx, [esp+0ACh+var_84]
test	ecx, ecx
jz	short loc_67160F
call	sub_64B3B0

loc_67160F:
mov	ecx, [esp+0ACh+var_94]
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebp
call	edx
xor	esi, esi
mov	[esp+0ACh+var_78], eax
cmp	eax, esi
jz	loc_67175D
mov	edi, [eax+10h]
lea	esi, [eax+10h]
push	ebp
lea	ecx, [esp+0B0h+var_40]
add	edi, 34h
call	sub_652C20
push	eax
mov	eax, [edi]
push	ebx
mov	ecx, esi
call	eax
mov	edi, [esp+0ACh+arg_0]
push	edi
push	ebx
mov	ecx, esi
call	sub_668360
mov	eax, [esp+0ACh+arg_8]
mov	edx, [esp+0ACh+arg_4]
mov	dword ptr [esp+0ACh+var_6C], esi
xor	esi, esi
mov	[esp+0ACh+var_54], eax
mov	eax, [edi+4]
lea	ecx, [esp+0ACh+var_20]
mov	dword ptr [esp+0ACh+var_70], ecx
mov	ecx, [edi]
push	esi
mov	ebx, offset off_1431764
mov	[esp+0B0h+var_58], edx
push	eax
mov	byte ptr [esp+0B4h+var_20], 0
mov	[esp+0B4h+var_74], ebx
mov	[esp+0B4h+var_60], 0
mov	[esp+0B4h+var_68], esi
mov	[esp+0B4h+var_64], esi
mov	dword ptr [esp+0B4h+var_5C], ebp
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+0B4h+var_74]
push	eax
call	edx
test	[esp+0ACh+var_60], 2
mov	[esp+0ACh+var_74], ebx
jnz	short loc_6716C8
mov	ecx, [esp+0ACh+var_68]
cmp	ecx, esi
jz	short loc_6716C8
call	sub_64B3B0

loc_6716C8:
test	[esp+0ACh+var_60], 1
mov	[esp+0ACh+var_68], esi
jnz	short loc_6716E0
mov	ecx, [esp+0ACh+var_64]
cmp	ecx, esi
jz	short loc_6716E0
call	sub_64B3B0

loc_6716E0:
mov	edi, [esp+0ACh+var_78]
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
lea	ecx, [esp+0ACh+var_20]
mov	[edi+8], eax
call	sub_652830
lea	ecx, [esp+0ACh+var_50]
call	sub_652830
test	byte ptr [esp+0ACh+var_8C], 2
jnz	short loc_671719
mov	ecx, [esp+0ACh+var_94]
cmp	ecx, esi
jz	short loc_671719
call	sub_64B3B0

loc_671719:
test	byte ptr [esp+0ACh+var_8C], 1
mov	[esp+0ACh+var_94], esi
jnz	short loc_671731
mov	ecx, [esp+0ACh+var_90]
cmp	ecx, esi
jz	short loc_671731
call	sub_64B3B0

loc_671731:
lea	ecx, [esp+0ACh+var_40]
mov	[esp+0ACh+var_90], esi
call	sub_652830
mov	ecx, edi
call	sub_64B3B0
lea	ecx, [esp+0ACh+var_30]
call	sub_652830
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	0Ch

loc_67175D:
mov	eax, [edi]
cmp	eax, esi
jz	short loc_671768
add	eax, 10h
jmp	short loc_67176A

loc_671768:
xor	eax, eax

loc_67176A:
push	eax
push	ebp
lea	ecx, [esp+0B4h+var_78]
push	ecx
mov	ecx, [ebx]
call	sub_66C950
mov	eax, [esp+0ACh+var_94]
cmp	eax, esi
jz	short loc_671785
add	eax, 10h
jmp	short loc_671787

loc_671785:
xor	eax, eax

loc_671787:
mov	ecx, [ebx]
push	eax
push	ebp
lea	edx, [esp+0B4h+var_98]
push	edx
call	sub_66C950
mov	eax, [esp+0ACh+var_78]
mov	ecx, [eax]
mov	edx, [esp+0ACh+var_98]
mov	eax, [edx]
push	ecx
push	eax
push	offset aErrorSCreatene ; "Error: %s::CreateNewObject returned NUL"...
push	ebp
call	sub_66D290
mov	eax, [esp+0BCh+var_98]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 10h
cmp	[eax], esi
jnz	short loc_6717C6
call	sub_650DF0

loc_6717C6:
mov	eax, [esp+0ACh+var_78]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], esi
jnz	short loc_6717DB
call	sub_650DF0

loc_6717DB:
lea	ecx, [esp+0ACh+var_50]
call	sub_652830
test	byte ptr [esp+0ACh+var_8C], 2
jnz	short loc_6717F8
mov	ecx, [esp+0ACh+var_94]
cmp	ecx, esi
jz	short loc_6717F8
call	sub_64B3B0

loc_6717F8:
test	byte ptr [esp+0ACh+var_8C], 1
mov	[esp+0ACh+var_94], esi
jnz	short loc_671810
mov	ecx, [esp+0ACh+var_90]
cmp	ecx, esi
jz	short loc_671810
call	sub_64B3B0

loc_671810:
lea	ecx, [esp+0ACh+var_40]
mov	[esp+0ACh+var_90], esi
call	sub_652830
lea	ecx, [esp+0ACh+var_30]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 9Ch
retn	0Ch
sub_671350 endp

align 10h



sub_671840 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 1Ch
push	esi
mov	esi, ecx
mov	ecx, [esp+20h+arg_0]
mov	eax, [ecx+10h]
mov	eax, [eax+10h]
lea	edx, [esp+20h+var_10]
push	edx
mov	edx, [esp+24h+arg_4]
add	ecx, 10h
push	edx
push	esi
mov	[esp+2Ch+var_10], 0
call	eax
test	al, al
jz	short loc_6718E2
mov	al, [esp+20h+var_10]
cmp	al, 8
jz	short loc_671875
cmp	al, 0Bh
jnz	short loc_6718E2

loc_671875:
mov	ecx, [esp+20h+arg_C]
mov	edx, [esp+20h+arg_8]
push	ecx
push	edx
push	esi
lea	eax, [esp+2Ch+var_1C]
push	eax
lea	ecx, [esp+30h+var_10]
call	sub_652DC0
push	eax
mov	ecx, esi
call	sub_671350
test	[esp+20h+var_14], 2
mov	esi, eax
jnz	short loc_6718AC
mov	ecx, [esp+20h+var_1C]
test	ecx, ecx
jz	short loc_6718AC
call	sub_64B3B0

loc_6718AC:
test	[esp+20h+var_14], 1
mov	[esp+20h+var_1C], 0
jnz	short loc_6718C8
mov	ecx, [esp+20h+var_18]
test	ecx, ecx
jz	short loc_6718C8
call	sub_64B3B0

loc_6718C8:
lea	ecx, [esp+20h+var_10]
mov	[esp+20h+var_18], 0
call	sub_652830
mov	eax, esi
pop	esi
add	esp, 1Ch
retn	10h

loc_6718E2:
lea	ecx, [esp+20h+var_10]
call	sub_652830
xor	eax, eax
pop	esi
add	esp, 1Ch
retn	10h
sub_671840 endp

align 10h



sub_671900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_671913
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_671935

loc_671913:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_67193A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_671935:
call	sub_66F7F0

loc_67193A:
mov	eax, [esi]
mov	edx, [esp+8+arg_8]
and	edx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ecx, edx
shl	ecx, 4
lea	esi, [ecx+eax+8]
mov	edi, 0FFFFFFFEh
cmp	[esi], edi
jnz	short loc_671994
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	edx, [ecx]
mov	eax, [edx]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	eax, [ecx+4]
mov	ecx, [eax]
mov	[esi+8], ecx
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_671989
mov	edx, [ecx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ecx+8], edx

loc_671989:
mov	eax, [eax+4]
pop	edi
mov	[esi+0Ch], eax
pop	esi
retn	0Ch

loc_671994:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edx
push	ebp
jmp	short loc_6719A0
align 10h

loc_6719A0:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edi
jnz	short loc_6719A0
mov	edi, ebx
shl	edi, 4
lea	edi, [edi+eax+8]
mov	[esp+10h+arg_0], edi
mov	edi, [esi+4]
mov	edi, [edi+0Ch]
lea	ebp, [esi+4]
and	edi, ecx
cmp	edi, edx
jnz	short loc_6719ED
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_6719D8
push	esi
call	sub_66E860

loc_6719D8:
mov	ecx, [esp+10h+arg_4]
push	ecx
mov	ecx, ebp
call	sub_66DB90
pop	ebp
mov	[esi], ebx
pop	ebx
pop	edi
pop	esi
retn	0Ch

loc_6719ED:
shl	edi, 4
cmp	[edi+eax+8], edx
lea	edi, [edi+eax+8]
jz	short loc_671A0F
lea	ebx, [ebx+0]

loc_671A00:
mov	ecx, [edi]
shl	ecx, 4
cmp	[ecx+eax+8], edx
lea	edi, [ecx+eax+8]
jnz	short loc_671A00

loc_671A0F:
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_671A1D
push	esi
call	sub_66E860

loc_671A1D:
mov	edx, [esp+10h+arg_4]
push	edx
mov	ecx, ebp
mov	[edi], ebx
call	sub_66DB90
pop	ebp
pop	ebx
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_671900 endp

align 10h



sub_671A40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	byte ptr [ebx+4], 6
push	ebp
push	esi
push	edi
lea	ebp, [ecx+288h]
jbe	short loc_671A84
mov	edi, [ebp+0]
test	edi, edi
jz	short loc_671A94
mov	esi, [esp+10h+arg_4]
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [edi+4]
push	ecx
push	esi
mov	ecx, ebp
call	sub_669AC0
test	eax, eax
jl	short loc_671A94
lea	edx, [eax+eax*4]
lea	eax, [edi+edx*4+0Ch]
test	eax, eax
jz	short loc_671A94
add	eax, 4
jmp	short loc_671A90

loc_671A84:
mov	esi, [esp+10h+arg_4]
push	esi
mov	ecx, ebp
call	sub_66E5F0

loc_671A90:
test	eax, eax
jnz	short loc_671A9D

loc_671A94:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	8

loc_671A9D:
cmp	byte ptr [ebx+4], 6
jbe	short loc_671AB4
push	esi
mov	ecx, ebp
call	sub_66F2D0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8

loc_671AB4:
mov	ecx, [esi]
cmp	dword ptr [ecx+4], 0
mov	[esp+10h+arg_4], esi
jnz	short loc_671AC5
call	sub_651580

loc_671AC5:
lea	eax, [esp+10h+arg_4]
push	eax
mov	ecx, ebp
call	sub_66F390
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8
sub_671A40 endp

align 10h



sub_671AE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+0CCh]
test	eax, eax
jz	short loc_671B2A
mov	ecx, [esi+0C8h]
cmp	dword ptr [ecx+eax*4-4], 0
jz	short loc_671B2A
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	ecx, esi
call	sub_66F560
test	eax, eax
jnz	short loc_671B1D
mov	edx, [esp+8+arg_4]
push	edx
push	edi
mov	ecx, esi
call	sub_6712A0
pop	edi
pop	esi
retn	8

loc_671B1D:
mov	ecx, [esp+8+arg_4]
push	ecx
mov	ecx, eax
call	sub_652520
pop	edi

loc_671B2A:
pop	esi
retn	8
sub_671AE0 endp

align 10h



sub_671B30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	edi
mov	edi, ecx
mov	cl, [ebp+0]
movzx	eax, cl
sub	eax, 2
jz	short loc_671B6E
sub	eax, 3
jz	short loc_671B67
cmp	cl, 3
jz	short loc_671B53
cmp	cl, 4
jnz	short loc_671B5A

loc_671B53:
mov	ebx, 4
jmp	short loc_671B73

loc_671B5A:
mov	eax, [esp+0Ch+arg_0]
pop	edi
pop	ebp
mov	byte ptr [eax],	0
pop	ebx
retn	8

loc_671B67:
mov	ebx, 3
jmp	short loc_671B73

loc_671B6E:
mov	ebx, 5

loc_671B73:
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
cmp	eax, [edi+10h]
push	esi
lea	esi, [edi+8]
jb	short loc_671B8A
mov	ecx, esi
call	sub_64B530

loc_671B8A:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_671B96
push	ebp
call	sub_652330

loc_671B96:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
sar	eax, 4
shl	ecx, 5
lea	ecx, [eax+ecx-20h]
mov	eax, [edi+78h]
mov	edx, [eax+2ACh]
push	ecx
push	1
lea	eax, [eax+ebx*4+8]
push	eax
push	edx
mov	ecx, edi
call	sub_671840
mov	ecx, [esi]
mov	edi, eax
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_671BDB
mov	ecx, esi
call	sub_64B660

loc_671BDB:
mov	esi, [esp+10h+arg_0]
push	edi
mov	ecx, esi
call	sub_652700
test	edi, edi
jz	short loc_671BF2
mov	ecx, edi
call	sub_64B3B0

loc_671BF2:
mov	eax, esi
pop	esi
pop	edi
pop	ebp
pop	ebx
retn	8
sub_671B30 endp

align 10h



sub_671C00 proc	near

var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	byte ptr -28h
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

sub	esp, 44h
push	ebx
push	esi
mov	esi, [esp+4Ch+arg_0]
cmp	dword ptr [esi+4], 0
mov	ebx, ecx
mov	[esp+4Ch+var_3C], ebx
jnz	short loc_671C1F
pop	esi
xor	al, al
pop	ebx
add	esp, 44h
retn	4

loc_671C1F:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_671C46
lea	eax, [esp+4Ch+var_38]
push	eax
mov	byte ptr [esp+50h+var_38], 4
mov	[esp+50h+var_34], 0
call	sub_652520
lea	ecx, [esp+4Ch+var_38]
call	sub_652830

loc_671C46:
mov	eax, [esi+8]
push	ebp
push	edi
test	eax, eax
jz	short loc_671CA8
mov	edi, [eax+4]
sub	edi, 1
js	short loc_671CA8

loc_671C57:
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	ecx, [edx+edi*8+4]
lea	eax, [edx+edi*8]
mov	eax, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_671C7A
test	eax, eax
jz	loc_67217E
lea	ebp, [eax+10h]
jmp	short loc_671C85

loc_671C7A:
test	eax, eax
jz	loc_67217E
lea	ebp, [eax+78h]

loc_671C85:
test	ebp, ebp
jz	loc_67217E
mov	eax, [esi+4]
mov	ecx, [esi]
mov	edx, [ebp+0]
mov	edx, [edx+10h]
push	eax
push	ecx
push	ebx
mov	ecx, ebp
call	edx
test	al, al
jnz	short loc_671CDB
sub	edi, 1
jns	short loc_671C57

loc_671CA8:
test	byte ptr [esi+14h], 1
jnz	loc_672085
mov	eax, [esi]
mov	edi, [esi+4]
push	eax
mov	ecx, ebx
call	sub_66F560
test	eax, eax
jz	short loc_671D26
test	edi, edi
jz	short loc_671D24
push	eax
mov	ecx, edi
call	sub_652520
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_671CDB:
cmp	dword ptr [esi+10h], 0
jz	loc_672157
mov	eax, [ebp+0]
mov	edx, [eax+8]
mov	ecx, ebp
call	edx
mov	ecx, [esi+10h]
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_671D0F
lea	eax, [ebp-78h]
push	eax
call	sub_6528F0
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_671D0F:
lea	eax, [ebp-10h]
push	eax
call	sub_652E40
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_671D24:
test	eax, eax

loc_671D26:
setnz	al
test	al, al
jnz	loc_672157
mov	al, [ebx+7Ch]
cmp	al, 5
jb	loc_672048
mov	edx, [esi]
cmp	al, 6
setnbe	al
mov	byte ptr [esp+54h+arg_0], al
mov	ecx, [esp+54h+arg_0]
mov	eax, [ebx+78h]
lea	ebp, [ebx+78h]
push	ecx
push	edx
lea	ecx, [eax+118h]
call	sub_65D650
test	al, al
jz	loc_671ECA
mov	eax, [ebx+0CCh]
test	eax, eax
jbe	loc_672048
mov	ecx, [ebx+0C8h]
mov	edi, [ecx+eax*4-4]
test	edi, edi
jz	loc_672048
mov	edx, [ebp+0]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	50h
call	edx
test	eax, eax
jz	short loc_671DAC
push	ebx
mov	ecx, eax
call	sub_65EF40
mov	[esp+4Ch+var_3C], eax
jmp	short loc_671DB4

loc_671DAC:
mov	[esp+4Ch+var_3C], 0

loc_671DB4:
mov	eax, [edi+20h]
mov	ecx, [esp+4Ch+var_3C]
push	eax
call	sub_65E410
cmp	dword ptr [edi+20h], 0
mov	[esp+4Ch+arg_8], 0
jle	short loc_671E2F
nop

loc_671DD0:
mov	ecx, [edi+1Ch]
mov	edx, [ecx+8]
sub	edx, [ecx+0Ch]
mov	ebx, [ecx+1Ch]
mov	eax, [edi+24h]
sub	eax, [esp+4Ch+arg_8]
add	ecx, 8
dec	ebx
sar	edx, 4
shl	ebx, 5
add	edx, ebx
mov	[esp+4Ch+var_38], 0
cmp	eax, edx
ja	short loc_671E0E
mov	ecx, [ecx+10h]
mov	edx, eax
and	eax, 1Fh
shr	edx, 5
shl	eax, 4
add	eax, [ecx+edx*4]
jmp	short loc_671E12

loc_671E0E:
mov	eax, [esp+4Ch+var_38]

loc_671E12:
mov	ebx, [esp+4Ch+arg_8]
mov	ecx, [esp+4Ch+var_3C]
push	eax
push	ebx
call	sub_65DA40
inc	ebx
cmp	ebx, [edi+20h]
mov	[esp+4Ch+arg_8], ebx
jl	short loc_671DD0
mov	ebx, [esp+4Ch+var_34]

loc_671E2F:
mov	eax, [ebp+0]
mov	edx, [esp+4Ch+var_3C]
add	eax, 118h
push	edx
lea	ecx, [esp+50h+var_20]
mov	[esp+50h+arg_8], eax
call	sub_652700
push	eax
mov	eax, [esp+50h+arg_8]
push	eax
mov	ecx, ebx
call	sub_6712A0
lea	ecx, [esp+4Ch+var_20]
call	sub_652830
mov	ebx, [esp+4Ch+var_3C]
mov	edx, [ebx+10h]
mov	edx, [edx+28h]
lea	eax, [esp+4Ch+arg_8]
push	eax
mov	eax, [ebp+0]
lea	ecx, [edi+28h]
push	ecx
add	ebx, 10h
add	eax, 11Ch
push	eax
push	ebp
mov	ecx, ebx
mov	byte ptr [esp+5Ch+arg_8], 7
call	edx
mov	edx, [ebp+0]
mov	eax, [ebx]
mov	eax, [eax+28h]
lea	ecx, [esp+54h+arg_0]
push	ecx
add	edi, 38h
push	edi
add	edx, 120h
push	edx
push	ebp
mov	ecx, ebx
mov	byte ptr [esp+64h+arg_0], 7
call	eax
mov	edi, [esp+54h+var_44]
mov	ecx, [esi+4]
push	edi
call	sub_652E40
mov	ecx, edi
call	sub_64B3B0
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_671ECA:
mov	al, [ebx+7Ch]
cmp	al, 6
jb	loc_672048
mov	eax, [ebp+0]
setnbe	cl
mov	byte ptr [esp+54h+arg_0], cl
mov	edx, [esp+54h+arg_0]
mov	ecx, [esi]
push	edx
push	ecx
lea	ecx, [eax+100h]
call	sub_65D650
test	al, al
jz	loc_672048
push	0
mov	ecx, ebx
call	sub_668D50
test	eax, eax
jz	loc_672048
mov	eax, [eax+18h]
test	eax, eax
jz	loc_672048
mov	edi, [eax+8]
test	edi, edi
jz	loc_672048
mov	edx, [edi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[edi+8], edx
mov	eax, [ebp+0]
mov	edx, [esi+8]
add	eax, 0FCh
mov	[esp+54h+var_18], eax
xor	eax, eax
lea	ecx, [esp+54h+var_28]
mov	[esp+54h+var_C], eax
mov	[esp+54h+var_8], eax
mov	[esp+54h+var_4], eax
lea	eax, [esp+54h+var_18]
mov	[esp+54h+var_14], ecx
push	eax
mov	ecx, ebx
mov	[esp+58h+var_28], 0
mov	[esp+58h+var_10], edx
call	sub_66D4F0
mov	edx, [edi+10h]
mov	edx, [edx+38h]
lea	ecx, [edi+10h]
push	ebp
lea	eax, [esp+58h+var_38]
push	eax
call	edx
mov	eax, [ebp+0]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	4Ch
call	eax
mov	[esp+54h+var_3C], eax
test	eax, eax
jz	short loc_671FC0
mov	ecx, [edi+18h]
lea	edx, [esp+54h+var_38]
push	edx
mov	[esp+58h+arg_0], ecx
push	ebx
lea	ecx, [esp+5Ch+var_28]
call	sub_652D70
mov	ecx, [esp+58h+var_3C]
push	eax
mov	eax, [esp+5Ch+arg_0]
push	eax
call	sub_66AE10
mov	[esp+54h+arg_0], eax
jmp	short loc_671FC8

loc_671FC0:
mov	[esp+54h+arg_0], 0

loc_671FC8:
mov	ecx, [esp+54h+arg_0]
push	ecx
mov	ecx, [esi+4]
call	sub_652E40
mov	edx, [esi+4]
mov	eax, [ebp+0]
push	edx
add	eax, 100h
push	eax
mov	ecx, ebx
call	sub_671AE0
test	[esp+54h+var_30], 2
jnz	short loc_671FFD
mov	ecx, [esp+54h+var_38]
test	ecx, ecx
jz	short loc_671FFD
call	sub_64B3B0

loc_671FFD:
xor	esi, esi
test	[esp+54h+var_30], 1
mov	[esp+54h+var_38], esi
jnz	short loc_672017
mov	ecx, [esp+54h+var_34]
cmp	ecx, esi
jz	short loc_672017
call	sub_64B3B0

loc_672017:
lea	ecx, [esp+54h+var_28]
mov	[esp+54h+var_34], esi
call	sub_652830
mov	ecx, edi
call	sub_64B3B0
mov	ecx, [esp+54h+arg_0]
cmp	ecx, esi
jz	loc_672157
call	sub_64B3B0
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_672048:
cmp	byte ptr [ebx+7Ch], 6
mov	eax, [ebx+78h]
setnbe	cl
mov	byte ptr [esp+54h+arg_0], cl
mov	edx, [esp+54h+arg_0]
mov	ecx, [esi]
push	edx
push	ecx
lea	ecx, [eax+0FCh]
call	sub_65D650
test	al, al
jz	short loc_672085
mov	edx, [ebx+74h]
mov	ecx, [esi+4]
push	edx
call	sub_6528F0
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_672085:
cmp	dword ptr [ebx+74h], 0
jz	loc_67217E
mov	edx, [esi+4]
mov	ecx, [ebx+74h]
mov	eax, [ecx+78h]
mov	eax, [eax+2Ch]
push	edx
mov	edx, [esi]
add	ecx, 78h
push	edx
lea	edi, [ebx+78h]
push	edi
call	eax
test	al, al
jz	short loc_6720CA
cmp	dword ptr [esi+10h], 0
jz	loc_672157
mov	ecx, [ebx+74h]
push	ecx
lea	ecx, [esp+58h+var_28]
call	sub_651CF0
lea	edx, [esp+54h+var_28]
push	edx
jmp	short loc_672146

loc_6720CA:
test	byte ptr [esi+14h], 2
mov	eax, [edi]
mov	edi, [eax+2ACh]
jnz	short loc_672116
mov	ecx, [esi]
call	sub_650650
test	eax, eax
jbe	short loc_672116
mov	ecx, [esi]
mov	edx, [ecx]
mov	eax, [edx]
cmp	byte ptr [eax],	5Fh
jnz	short loc_672116
push	esi
lea	ecx, [esp+58h+arg_0]
push	ecx
mov	ecx, ebx
call	sub_668AE0
mov	al, byte ptr [esp+54h+arg_0]
test	al, al
jz	short loc_672116
pop	edi
xor	edx, edx
cmp	al, 1
pop	ebp
setz	dl
pop	esi
mov	al, dl
pop	ebx
add	esp, 44h
retn	4

loc_672116:
test	edi, edi
jz	short loc_672163
mov	edx, [esi+4]
mov	eax, [edi+10h]
mov	eax, [eax+10h]
push	edx
mov	edx, [esi]
lea	ecx, [edi+10h]
push	edx
push	ebx
call	eax
test	al, al
jz	short loc_672163
cmp	dword ptr [esi+10h], 0
jz	short loc_672157
push	edi
lea	ecx, [esp+58h+var_28]
call	sub_652700
lea	ecx, [esp+54h+var_28]
push	ecx

loc_672146:
mov	ecx, [esi+10h]
call	sub_652520
lea	ecx, [esp+54h+var_28]
call	sub_652830

loc_672157:
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
add	esp, 44h
retn	4

loc_672163:
test	byte ptr [esi+14h], 4
jnz	short loc_67217E
mov	edx, [esi]
mov	eax, [edx]
mov	ecx, [eax]
push	ecx
push	offset aGetvariableraw ; "GetVariableRaw(\"%s\") failed, returning "...
push	ebx
call	nullsub_2
add	esp, 0Ch

loc_67217E:
pop	edi
pop	ebp
pop	esi
xor	al, al
pop	ebx
add	esp, 44h
retn	4
sub_671C00 endp

align 10h



sub_672190 proc	near

var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

sub	esp, 68h
push	ebx
mov	ebx, [esp+6Ch+arg_0]
mov	eax, [ebx]
mov	edx, ecx
mov	ecx, [eax]
cmp	dword ptr [ecx+10h], 0
mov	[esp+6Ch+var_64], edx
jnz	short loc_6721C5
mov	ecx, [ebx+4]
test	ecx, ecx
jz	loc_6726D6
mov	edx, [edx+74h]
push	edx
call	sub_6528F0
mov	al, 1
pop	ebx
add	esp, 68h
retn	0Ch

loc_6721C5:
push	ebp
mov	ebp, [ebx+10h]
mov	[esp+70h+var_58], 0
mov	eax, [eax]
push	esi
mov	esi, [eax]
push	edi
mov	edi, [eax+10h]
mov	[esp+78h+var_66], 0
mov	[esp+78h+var_60], offset a_ ; ":./"
test	ebp, ebp
jz	short loc_6721F3
mov	ecx, ebp
call	sub_652060
mov	byte ptr [ebp+0], 0

loc_6721F3:
mov	eax, [ebx+0Ch]
test	eax, eax
jz	short loc_672200
mov	dword ptr [eax], 0

loc_672200:
mov	al, [esi]
cmp	al, 2Fh
jnz	short loc_672244
mov	eax, [esp+78h+var_64]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+68h]
push	0
call	eax
push	eax
lea	ecx, [esp+7Ch+var_58]
call	sub_6528F0
mov	ecx, off_167D754
mov	[esp+78h+var_60], ecx
mov	ecx, [ebx+10h]
inc	esi
dec	edi
mov	[esp+78h+var_66], 1
test	ecx, ecx
jz	short loc_672251
lea	edx, [esp+78h+var_58]
push	edx
call	sub_652520
jmp	short loc_672251

loc_672244:
cmp	al, 2Eh
jnz	short loc_672251
mov	eax, off_167D754
mov	[esp+78h+var_60], eax

loc_672251:
mov	ecx, [esp+78h+var_60]
mov	[esp+78h+var_48], esi
add	edi, esi
mov	esi, [esp+78h+var_64]
mov	edx, [esi+78h]
mov	[esp+78h+var_40], ecx
mov	[esp+78h+var_44], edi
mov	eax, [edx+8]
mov	[esp+78h+var_3C], eax
inc	dword ptr [eax+8]
lea	eax, [esp+78h+var_65]
push	eax
lea	ecx, [esp+7Ch+var_48]
mov	[esp+7Ch+var_65], 0
mov	byte ptr [esp+7Ch+var_5C], 1
call	sub_668EE0
test	al, al
jz	loc_672635
mov	edi, [esp+78h+arg_8]
mov	ebp, offset a_	; ":./"

loc_6722A0:
mov	ecx, [esp+78h+var_3C]
cmp	dword ptr [ecx+10h], 0
jz	loc_672539
test	edi, edi
jz	short loc_6722CA
inc	dword ptr [ecx+8]
mov	esi, ecx
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6722C4
call	sub_650DF0

loc_6722C4:
mov	ecx, [esp+78h+var_3C]
mov	[edi], esi

loc_6722CA:
mov	al, [esp+78h+var_58]
mov	edi, [esp+78h+var_64]
xor	bl, bl
mov	[esp+78h+var_38], 0
cmp	al, 7
jz	loc_672366
cmp	[esp+78h+var_66], bl
jnz	loc_67243E
mov	esi, [edi+78h]
cmp	[esi+0D0h], ecx
jz	short loc_672371
cmp	byte ptr [edi+7Ch], 6
jbe	short loc_672304
cmp	[esi+10Ch], ecx
jmp	short loc_672323

loc_672304:
cmp	dword ptr [ecx+4], 0
jnz	short loc_672317
call	sub_651580
mov	al, [esp+78h+var_58]
mov	ecx, [esp+78h+var_3C]

loc_672317:
mov	edx, [esi+10Ch]
mov	edx, [edx+4]
cmp	edx, [ecx+4]

loc_672323:
setz	cl
test	cl, cl
jnz	short loc_672371
mov	ebp, [esp+78h+arg_0]

loc_67232E:
mov	edx, [ebp+8]
lea	eax, [esp+78h+var_3C]
mov	[esp+78h+var_18], eax
xor	eax, eax
lea	ecx, [esp+78h+var_38]
mov	[esp+78h+var_C], eax
mov	[esp+78h+var_8], eax
mov	[esp+78h+var_4], eax
lea	eax, [esp+78h+var_18]
mov	[esp+78h+var_14], ecx
push	eax
mov	ecx, edi
mov	[esp+7Ch+var_10], edx
call	sub_671C00
mov	bl, al
jmp	loc_6724C1

loc_672366:
cmp	[esp+78h+var_66], 0
jnz	loc_6723F0

loc_672371:
mov	ebp, [esp+78h+arg_0]
mov	ecx, [ebp+8]
test	ecx, ecx
jz	short loc_6723D4
cmp	dword ptr [ecx+4], 0
jbe	short loc_6723D4
mov	eax, ecx
mov	ecx, [eax+4]
mov	edx, [eax]
lea	eax, [edx+ecx*8-8]
mov	ecx, [eax+4]
mov	eax, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_6723A3
test	eax, eax
jz	short loc_6723AC
lea	esi, [eax+10h]
jmp	short loc_6723AE

loc_6723A3:
test	eax, eax
jz	short loc_6723AC
lea	esi, [eax+78h]
jmp	short loc_6723AE

loc_6723AC:
xor	esi, esi

loc_6723AE:
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_6723D0
mov	ecx, esi
call	sub_661C10
push	eax
lea	ecx, [esp+7Ch+var_58]
call	sub_6528F0

loc_6723D0:
mov	al, [esp+78h+var_58]

loc_6723D4:
test	al, al
jz	short loc_6723DC
cmp	al, 0Ah
jnz	short loc_6723E9

loc_6723DC:
mov	ecx, [edi+74h]
push	ecx
lea	ecx, [esp+7Ch+var_58]
call	sub_6528F0

loc_6723E9:
mov	[esp+78h+var_66], 1
jmp	short loc_6723F4

loc_6723F0:
mov	ebp, [esp+78h+arg_0]

loc_6723F4:
push	edi
lea	ecx, [esp+7Ch+var_58]
call	sub_651BB0
test	eax, eax
jz	short loc_67242D
mov	ecx, [esp+78h+var_5C]
mov	edx, [eax]
mov	edx, [edx+10Ch]
push	ecx
lea	ecx, [esp+7Ch+var_3C]
push	ecx
mov	ecx, eax
call	edx
test	eax, eax
jz	short loc_67242D
push	eax
lea	ecx, [esp+7Ch+var_38]
call	sub_6528F0
mov	bl, 1
jmp	loc_6724C1

loc_67242D:
cmp	[esp+78h+var_66], 0
jz	loc_67232E
mov	al, [esp+78h+var_58]
jmp	short loc_672442

loc_67243E:
mov	ebp, [esp+78h+arg_0]

loc_672442:
cmp	al, 3
jz	short loc_672452
cmp	al, 4
jz	short loc_672452
cmp	al, 2
jz	short loc_672452
cmp	al, 5
jnz	short loc_67247A

loc_672452:
lea	ecx, [esp+78h+var_58]
push	ecx
lea	edx, [esp+7Ch+var_28]
push	edx
mov	ecx, edi
call	sub_671B30
push	eax
lea	ecx, [esp+7Ch+var_58]
call	sub_652520
lea	ecx, [esp+78h+var_28]
call	sub_652830
mov	al, [esp+78h+var_58]

loc_67247A:
cmp	al, 6
jz	short loc_67248A
cmp	al, 7
jz	short loc_67248A
cmp	al, 8
jz	short loc_67248A
cmp	al, 0Bh
jnz	short loc_6724B2

loc_67248A:
push	edi
lea	ecx, [esp+7Ch+var_58]
call	sub_652D70
test	eax, eax
jz	short loc_6724C1
mov	edx, [eax]
mov	edx, [edx+10h]
lea	ecx, [esp+78h+var_38]
push	ecx
lea	ecx, [esp+7Ch+var_3C]
push	ecx
push	edi
mov	ecx, eax
call	edx
mov	bl, al
test	bl, bl
jnz	short loc_6724C1

loc_6724B2:
lea	ecx, [esp+78h+var_38]
call	sub_652060
xor	bl, bl
mov	[esp+78h+var_38], bl

loc_6724C1:
mov	ecx, [ebp+10h]
test	ecx, ecx
jz	short loc_6724D2
lea	eax, [esp+78h+var_58]
push	eax
call	sub_652520

loc_6724D2:
cmp	[esp+78h+arg_4], 0
jz	short loc_6724E7
cmp	[esp+78h+var_38], 7
jnz	loc_6725BE

loc_6724E7:
test	bl, bl
jz	loc_6725BE
cmp	[esp+78h+var_38], 9
lea	ecx, [esp+78h+var_58]
jnz	short loc_67250E
push	ecx
push	edi
call	sub_652D70
push	eax
push	edi
lea	ecx, [esp+84h+var_38]
call	sub_6529F0
jmp	short loc_672518

loc_67250E:
lea	edx, [esp+78h+var_38]
push	edx
call	sub_652520

loc_672518:
lea	ecx, [esp+78h+var_38]
mov	[esp+78h+var_66], bl
call	sub_652830
mov	ebx, [esp+78h+arg_0]
mov	esi, [esp+78h+var_64]
mov	edi, [esp+78h+arg_8]
mov	ebp, offset a_	; ":./"

loc_672539:
mov	ecx, off_167D754
mov	al, [esp+78h+var_65]
cmp	[esp+78h+var_60], ecx
jnz	short loc_672573
cmp	al, 3Ah
jnz	short loc_672595
cmp	dword ptr [ebx+0Ch], 0
mov	[esp+78h+var_40], ebp
mov	[esp+78h+var_60], ebp
jz	short loc_6725A1
cmp	[esp+78h+var_58], 7
jnz	short loc_6725A1
push	esi
lea	ecx, [esp+7Ch+var_58]
call	sub_651BB0
mov	ecx, [ebx+0Ch]
mov	[ecx], eax
jmp	short loc_6725A1

loc_672573:
cmp	al, 2Eh
jnz	short loc_672595
cmp	dword ptr [ebx+0Ch], 0
jz	short loc_6725A1
cmp	[esp+78h+var_58], 7
jnz	short loc_6725A1
push	esi
lea	ecx, [esp+7Ch+var_58]
call	sub_651BB0
mov	edx, [ebx+0Ch]
mov	[edx], eax
jmp	short loc_6725A1

loc_672595:
cmp	al, 2Fh
jnz	short loc_6725A1
mov	[esp+78h+var_40], ecx
mov	[esp+78h+var_60], ecx

loc_6725A1:
lea	eax, [esp+78h+var_65]
push	eax
lea	ecx, [esp+7Ch+var_48]
mov	byte ptr [esp+7Ch+var_5C], 0
call	sub_668EE0
test	al, al
jnz	loc_6722A0
jmp	short loc_672635

loc_6725BE:
lea	ecx, [esp+78h+var_58]
call	sub_652060
lea	ecx, [esp+78h+var_65]
push	ecx
lea	ecx, [esp+7Ch+var_48]
mov	[esp+7Ch+var_58], 0
mov	[esp+7Ch+var_66], 0
call	sub_668EE0
test	al, al
jz	short loc_672624
mov	esi, [ebp+10h]
test	esi, esi
jz	short loc_6725F4
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0

loc_6725F4:
mov	eax, [ebp+0Ch]
test	eax, eax
jz	short loc_672601
mov	dword ptr [eax], 0

loc_672601:
mov	ebx, [esp+78h+arg_8]
test	ebx, ebx
jz	short loc_672624
mov	edx, [edi+78h]
mov	esi, [edx+8]
inc	dword ptr [esi+8]
mov	ecx, [ebx]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_672622
call	sub_650DF0

loc_672622:
mov	[ebx], esi

loc_672624:
lea	ecx, [esp+78h+var_38]
call	sub_652830
mov	ebx, [esp+78h+arg_0]
mov	esi, [esp+78h+var_64]

loc_672635:
cmp	dword ptr [ebx+0Ch], 0
jz	short loc_672651
cmp	[esp+78h+var_58], 7
jnz	short loc_672651
push	esi
lea	ecx, [esp+7Ch+var_58]
call	sub_651BB0
mov	ecx, [ebx+0Ch]
mov	[ecx], eax

loc_672651:
mov	esi, [ebx+10h]
test	esi, esi
jz	short loc_672674
mov	al, [esi]
cmp	al, 6
jz	short loc_672674
cmp	al, 7
jz	short loc_672674
cmp	al, 8
jz	short loc_672674
cmp	al, 0Bh
jz	short loc_672674
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0

loc_672674:
cmp	[esp+78h+var_66], 0
pop	edi
pop	esi
pop	ebp
jnz	short loc_6726A6
mov	eax, [esp+6Ch+var_3C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_672694
call	sub_650DF0

loc_672694:
lea	ecx, [esp+6Ch+var_58]
call	sub_652830
xor	al, al
pop	ebx
add	esp, 68h
retn	0Ch

loc_6726A6:
mov	ecx, [ebx+4]
test	ecx, ecx
jz	short loc_6726B7
lea	edx, [esp+6Ch+var_58]
push	edx
call	sub_652520

loc_6726B7:
mov	eax, [esp+6Ch+var_3C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6726CD
call	sub_650DF0

loc_6726CD:
lea	ecx, [esp+6Ch+var_58]
call	sub_652830

loc_6726D6:
mov	al, 1
pop	ebx
add	esp, 68h
retn	0Ch
sub_672190 endp

align 10h



sub_6726E0 proc	near
push	ecx
pop	ecx
retn
sub_6726E0 endp

align 10h



sub_6726F0 proc	near

var_89=	byte ptr -89h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 8Ch
mov	eax, [esp+8Ch+arg_0]
mov	edx, [esp+8Ch+arg_10]
push	ebx
push	ebp
mov	ebp, [esp+94h+arg_4]
push	esi
mov	esi, [esp+98h+arg_8]
push	edi
mov	edi, ecx
mov	ecx, [esp+9Ch+arg_C]
mov	[esp+9Ch+var_C], ecx
lea	ecx, [esp+9Ch+var_18]
mov	[esp+9Ch+var_18], eax
mov	eax, [esp+9Ch+arg_14]
push	ecx
mov	ecx, edi
mov	[esp+0A0h+var_14], ebp
mov	[esp+0A0h+var_10], esi
mov	[esp+0A0h+var_8], edx
mov	[esp+0A0h+var_4], eax
call	sub_66D4F0
xor	ebx, ebx
mov	[esp+9Ch+var_89], al
cmp	al, bl
jz	loc_672822
cmp	byte ptr [ebp+0], 9
jnz	loc_672822
mov	edx, [edi+78h]
lea	ecx, [esp+9Ch+var_30]
add	edx, 0FCh
lea	eax, [esp+9Ch+var_50]
push	ecx
mov	ecx, edi
xor	ebp, ebp
mov	[esp+0A0h+var_50], bl
mov	[esp+0A0h+var_30], edx
mov	[esp+0A0h+var_2C], eax
mov	[esp+0A0h+var_28], esi
mov	[esp+0A0h+var_24], ebx
mov	[esp+0A0h+var_20], ebx
mov	[esp+0A0h+var_1C], ebx
call	sub_671C00
test	al, al
jz	short loc_6727E6
push	edi
lea	ecx, [esp+0A0h+var_50]
call	sub_651BB0
cmp	eax, ebx
jz	short loc_6727C9
inc	dword ptr [eax+4]

loc_6727C9:
mov	esi, eax
cmp	eax, ebx
jnz	short loc_6727F4
push	edi
lea	ecx, [esp+0A0h+var_50]
call	sub_652C20
cmp	eax, ebx
jz	short loc_6727E2
lea	ebp, [eax+10h]
jmp	short loc_6727F0

loc_6727E2:
xor	ebp, ebp
jmp	short loc_6727F0

loc_6727E6:
mov	esi, [edi+74h]
cmp	esi, ebx
jz	short loc_6727F9
inc	dword ptr [esi+4]

loc_6727F0:
cmp	esi, ebx
jz	short loc_6727F9

loc_6727F4:
lea	eax, [esi+78h]
jmp	short loc_6727FB

loc_6727F9:
mov	eax, ebp

loc_6727FB:
mov	ecx, [esp+9Ch+arg_4]
push	ecx
push	eax
push	edi
call	sub_6529F0
lea	ecx, [esp+9Ch+var_50]
call	sub_652830
cmp	esi, ebx
jz	loc_6729D4
mov	ecx, esi
jmp	loc_6729CF

loc_672822:
cmp	byte ptr [ebp+0], 0Ch
jnz	loc_6729D8
mov	eax, [edi+78h]
push	ebx
push	ebx
push	ebx
push	esi
lea	edx, [esp+0ACh+var_40]
push	edx
add	eax, 0FCh
push	eax
mov	ecx, edi
mov	[esp+0B4h+var_84], ebx
mov	[esp+0B4h+var_40], bl
call	sub_6726F0
test	al, al
jz	short loc_672887
push	edi
lea	ecx, [esp+0A0h+var_40]
call	sub_651BB0
cmp	eax, ebx
jz	short loc_672862
inc	dword ptr [eax+4]

loc_672862:
mov	[esp+9Ch+var_88], eax
cmp	eax, ebx
jnz	short loc_672895
push	edi
lea	ecx, [esp+0A0h+var_40]
call	sub_652C20
cmp	eax, ebx
jz	short loc_672881
add	eax, 10h
mov	[esp+9Ch+var_84], eax
jmp	short loc_672895

loc_672881:
mov	[esp+9Ch+var_84], ebx
jmp	short loc_672895

loc_672887:
mov	eax, [edi+74h]
cmp	eax, ebx
jz	short loc_672891
inc	dword ptr [eax+4]

loc_672891:
mov	[esp+9Ch+var_88], eax

loc_672895:
lea	eax, [esp+9Ch+var_80]
push	eax
mov	ecx, ebp
call	sub_652860
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	esi, [edi+8]
jb	short loc_6728B7
mov	ecx, esi
call	sub_64B530

loc_6728B7:
mov	ecx, [esi]
cmp	ecx, ebx
jz	short loc_6728CF
mov	edx, [esp+9Ch+arg_0]
mov	byte ptr [ecx],	5
mov	eax, [edx]
mov	[ecx+4], eax
inc	dword ptr [eax+8]

loc_6728CF:
mov	ecx, ebp
call	sub_652060
mov	ecx, [esp+9Ch+var_88]
mov	[ebp+0], bl
cmp	ecx, ebx
jz	short loc_6728E6
add	ecx, 78h
jmp	short loc_6728EA

loc_6728E6:
mov	ecx, [esp+9Ch+var_84]

loc_6728EA:
mov	eax, [esi]
sub	eax, [esi+4]
mov	edx, [esi+14h]
shl	edx, 5
sar	eax, 4
lea	eax, [eax+edx-20h]
mov	edx, [esp+9Ch+arg_4]
mov	[esp+9Ch+var_70], edx
mov	edx, [esp+9Ch+var_7C]
mov	[esp+9Ch+var_6C], ecx
mov	ecx, [esp+9Ch+var_80]
push	ebx
mov	ebp, offset off_1431764
mov	[esp+0A0h+var_54], eax
push	edx
mov	[esp+0A4h+var_74], ebp
mov	[esp+0A4h+var_60], bl
mov	[esp+0A4h+var_68], ebx
mov	[esp+0A4h+var_64], ebx
mov	[esp+0A4h+var_5C], edi
mov	[esp+0A4h+var_58], 1
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+0A4h+var_74]
push	edx
call	eax
test	[esp+9Ch+var_60], 2
mov	[esp+9Ch+var_74], ebp
jnz	short loc_67295E
mov	ecx, [esp+9Ch+var_68]
cmp	ecx, ebx
jz	short loc_67295E
call	sub_64B3B0

loc_67295E:
test	[esp+9Ch+var_60], 1
mov	[esp+9Ch+var_68], ebx
jnz	short loc_672976
mov	ecx, [esp+9Ch+var_64]
cmp	ecx, ebx
jz	short loc_672976
call	sub_64B3B0

loc_672976:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_67298E
mov	ecx, esi
call	sub_64B660

loc_67298E:
test	[esp+9Ch+var_78], 2
jnz	short loc_6729A2
mov	ecx, [esp+9Ch+var_80]
cmp	ecx, ebx
jz	short loc_6729A2
call	sub_64B3B0

loc_6729A2:
test	[esp+9Ch+var_78], 1
mov	[esp+9Ch+var_80], ebx
jnz	short loc_6729BA
mov	ecx, [esp+9Ch+var_7C]
cmp	ecx, ebx
jz	short loc_6729BA
call	sub_64B3B0

loc_6729BA:
lea	ecx, [esp+9Ch+var_40]
mov	[esp+9Ch+var_7C], ebx
call	sub_652830
mov	ecx, [esp+9Ch+var_88]
cmp	ecx, ebx
jz	short loc_6729D4

loc_6729CF:
call	sub_64A400

loc_6729D4:
mov	al, [esp+9Ch+var_89]

loc_6729D8:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8Ch
retn	18h
sub_6726F0 endp

align 10h



sub_6729F0 proc	near

var_38=	byte ptr -38h
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 38h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
push	edi
call	edx
mov	eax, [eax+2474h]
mov	ebp, [esp+48h+arg_4]
mov	edi, [esp+48h+arg_0]
shr	eax, 2
xor	ebx, ebx
test	al, 1
jz	short loc_672A69
push	esi
lea	ecx, [esp+4Ch+arg_4]
push	ecx
push	ebp
lea	ecx, [esp+54h+var_28]
call	sub_652330
mov	ecx, eax
call	sub_653380
lea	ecx, [esp+48h+var_28]
call	sub_652830
mov	edx, [esp+48h+arg_4]
mov	eax, [edx]
mov	ecx, [edi]
mov	edx, [ecx]
push	eax
push	edx
push	offset aSS	; "-------------- %s = %s\n"
push	esi
call	nullsub_2
mov	eax, [esp+58h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 10h
cmp	[eax], ebx
jnz	short loc_672A69
call	sub_650DF0

loc_672A69:
mov	eax, [edi]
mov	ecx, [eax+0Ch]
shr	ecx, 19h
test	cl, 1
jnz	loc_672B95
push	edi
call	sub_668020
add	esp, 4
test	al, al
jz	loc_672B95
mov	edx, [esi+78h]
mov	ecx, [esp+48h+arg_8]
mov	[esp+48h+var_38], bl
mov	eax, [edx+8]
mov	[esp+48h+arg_4], eax
inc	dword ptr [eax+8]
lea	eax, [esp+48h+var_28]
mov	[esp+48h+var_14], eax
lea	eax, [esp+48h+arg_4]
push	eax
mov	[esp+4Ch+var_10], ecx
push	ebx
lea	ecx, [esp+50h+var_18]
lea	edx, [esp+50h+var_38]
push	ecx
mov	ecx, esi
mov	[esp+54h+var_28], bl
mov	[esp+54h+var_18], edi
mov	[esp+54h+var_C], ebx
mov	[esp+54h+var_8], edx
mov	[esp+54h+var_4], ebx
call	sub_672190
mov	al, [esp+48h+var_38]
cmp	al, bl
jz	short loc_672B3C
cmp	al, 0Ah
jz	short loc_672B3C
push	esi
lea	ecx, [esp+4Ch+var_38]
call	sub_652D70
cmp	eax, ebx
jz	short loc_672B62
mov	edx, [eax]
mov	edx, [edx+0Ch]
lea	ecx, [esp+48h+arg_C]
push	ecx
push	ebp
lea	ecx, [esp+50h+arg_4]
push	ecx
push	esi
mov	ecx, eax
mov	[esp+58h+arg_C], bl
call	edx
lea	ecx, [esp+48h+var_28]
call	sub_652830
mov	eax, [esp+48h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_672B27
call	sub_650DF0

loc_672B27:
lea	ecx, [esp+48h+var_38]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 38h
retn	10h

loc_672B3C:
cmp	[esp+48h+arg_C], bl
jz	short loc_672B62
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_672B62
mov	eax, [edi]
mov	ecx, [eax]
push	ecx
push	offset aErrorSetvariab ; "Error: SetVariable failed: can't resolv"...
push	esi
call	sub_66D290
add	esp, 0Ch

loc_672B62:
lea	ecx, [esp+48h+var_28]
call	sub_652830
mov	eax, [esp+48h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_672B80
call	sub_650DF0

loc_672B80:
lea	ecx, [esp+48h+var_38]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 38h
retn	10h

loc_672B95:
mov	edx, [esp+48h+arg_8]
push	edx
push	ebp
push	edi
mov	ecx, esi
call	sub_670110
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 38h
retn	10h
sub_6729F0 endp

align 10h



sub_672BB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	eax
mov	esi, ecx
push	edi
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, esi
call	sub_66F200
mov	eax, [esp+10h+var_8]
test	eax, eax
jz	short loc_672BFE
cmp	dword ptr [eax], 0
jz	short loc_672BFE
mov	eax, [eax]
mov	ecx, [esp+10h+var_4]
cmp	ecx, [eax+4]
jg	short loc_672BFE
mov	edx, [esp+10h+arg_4]
lea	ecx, [ecx+ecx*4]
push	edx
lea	ecx, [eax+ecx*4+10h]
call	sub_67C4C0
pop	edi
pop	esi
add	esp, 8
retn	0Ch

loc_672BFE:
mov	eax, [edi]
mov	edx, [esp+10h+arg_4]
mov	ecx, [eax+0Ch]
push	ecx
mov	[esp+14h+var_4], edx
lea	edx, [esp+14h+var_8]
push	edx
push	esi
mov	ecx, esi
mov	[esp+1Ch+var_8], edi
call	sub_670540
pop	edi
pop	esi
add	esp, 8
retn	0Ch
sub_672BB0 endp

align 10h



sub_672C30 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 30h
push	ebp
push	edi
mov	edi, [esp+38h+arg_0]
xor	ebp, ebp
cmp	edi, ebp
jz	loc_672D94
cmp	byte ptr [edi],	0
jz	loc_672D94
push	ebx
push	esi
mov	esi, [esp+40h+arg_C]
mov	eax, [esi+78h]
mov	[esp+40h+var_30], ebp
mov	[esp+40h+var_10], 0
mov	[esp+40h+var_20], 0
mov	ecx, [eax+280h]
push	edi
call	sub_651000
push	ebp
lea	ecx, [esp+44h+var_20]
push	ecx
lea	edx, [esp+48h+var_30]
push	edx
mov	[esp+4Ch+arg_0], eax
inc	dword ptr [eax+8]
push	ebp
lea	eax, [esp+50h+var_10]
push	eax
lea	ecx, [esp+54h+arg_0]
push	ecx
mov	ecx, esi
call	sub_6726F0
test	al, al
mov	eax, [esp+40h+arg_0]
setz	bl
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_672CAD
call	sub_650DF0

loc_672CAD:
test	bl, bl
jnz	short loc_672CE2
push	esi
lea	edx, [esp+44h+var_2C]
push	edx
lea	ecx, [esp+48h+var_10]
call	sub_652DC0
cmp	[esp+40h+var_2C], ebp
jnz	short loc_672CFE
test	[esp+40h+var_24], 1
mov	[esp+40h+var_2C], ebp
jnz	short loc_672CDE
mov	ecx, [esp+40h+var_28]
cmp	ecx, ebp
jz	short loc_672CDE
call	sub_64B3B0

loc_672CDE:
mov	[esp+40h+var_28], ebp

loc_672CE2:
lea	ecx, [esp+40h+var_20]
call	sub_652830
lea	ecx, [esp+40h+var_10]
call	sub_652830
pop	esi
pop	ebx
pop	edi
xor	al, al
pop	ebp
add	esp, 30h
retn

loc_672CFE:
mov	al, [esp+40h+var_20]
cmp	al, 7
jz	short loc_672D17
cmp	al, 6
jz	short loc_672D17
mov	eax, [esp+40h+var_30]
cmp	eax, ebp
jz	short loc_672D23
add	eax, 78h
jmp	short loc_672D27

loc_672D17:
push	esi
lea	ecx, [esp+44h+var_20]
call	sub_652D70
jmp	short loc_672D27

loc_672D23:
mov	eax, [esp+40h+arg_8]

loc_672D27:
mov	ecx, [esp+40h+arg_14]
mov	edx, [esp+40h+arg_10]
push	edi
push	ecx
push	edx
push	esi
push	eax
mov	eax, [esp+54h+arg_4]
push	eax
lea	ecx, [esp+58h+var_10]
push	ecx
call	sub_66DC20
add	esp, 1Ch
test	[esp+40h+var_24], 2
mov	bl, al
jnz	short loc_672D5C
mov	ecx, [esp+40h+var_2C]
cmp	ecx, ebp
jz	short loc_672D5C
call	sub_64B3B0

loc_672D5C:
test	[esp+40h+var_24], 1
mov	[esp+40h+var_2C], ebp
jnz	short loc_672D74
mov	ecx, [esp+40h+var_28]
cmp	ecx, ebp
jz	short loc_672D74
call	sub_64B3B0

loc_672D74:
lea	ecx, [esp+40h+var_20]
mov	[esp+40h+var_28], ebp
call	sub_652830
lea	ecx, [esp+40h+var_10]
call	sub_652830
pop	esi
mov	al, bl
pop	ebx
pop	edi
pop	ebp
add	esp, 30h
retn

loc_672D94:
pop	edi
xor	al, al
pop	ebp
add	esp, 30h
retn
sub_672C30 endp

align 10h



sub_672DA0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 30h
push	ebp
push	edi
mov	edi, [esp+38h+arg_0]
xor	ebp, ebp
cmp	edi, ebp
jz	loc_672F04
cmp	byte ptr [edi],	0
jz	loc_672F04
push	ebx
push	esi
mov	esi, [esp+40h+arg_C]
mov	eax, [esi+78h]
mov	[esp+40h+var_30], ebp
mov	[esp+40h+var_10], 0
mov	[esp+40h+var_20], 0
mov	ecx, [eax+280h]
push	edi
call	sub_651000
push	ebp
lea	ecx, [esp+44h+var_20]
push	ecx
lea	edx, [esp+48h+var_30]
push	edx
mov	[esp+4Ch+arg_0], eax
inc	dword ptr [eax+8]
push	ebp
lea	eax, [esp+50h+var_10]
push	eax
lea	ecx, [esp+54h+arg_0]
push	ecx
mov	ecx, esi
call	sub_6726F0
test	al, al
mov	eax, [esp+40h+arg_0]
setz	bl
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_672E1D
call	sub_650DF0

loc_672E1D:
test	bl, bl
jnz	short loc_672E52
push	esi
lea	edx, [esp+44h+var_2C]
push	edx
lea	ecx, [esp+48h+var_10]
call	sub_652DC0
cmp	[esp+40h+var_2C], ebp
jnz	short loc_672E6E
test	[esp+40h+var_24], 1
mov	[esp+40h+var_2C], ebp
jnz	short loc_672E4E
mov	ecx, [esp+40h+var_28]
cmp	ecx, ebp
jz	short loc_672E4E
call	sub_64B3B0

loc_672E4E:
mov	[esp+40h+var_28], ebp

loc_672E52:
lea	ecx, [esp+40h+var_20]
call	sub_652830
lea	ecx, [esp+40h+var_10]
call	sub_652830
pop	esi
pop	ebx
pop	edi
xor	al, al
pop	ebp
add	esp, 30h
retn

loc_672E6E:
mov	al, [esp+40h+var_20]
cmp	al, 7
jz	short loc_672E87
cmp	al, 6
jz	short loc_672E87
mov	eax, [esp+40h+var_30]
cmp	eax, ebp
jz	short loc_672E93
add	eax, 78h
jmp	short loc_672E97

loc_672E87:
push	esi
lea	ecx, [esp+44h+var_20]
call	sub_652D70
jmp	short loc_672E97

loc_672E93:
mov	eax, [esp+40h+arg_8]

loc_672E97:
mov	ecx, [esp+40h+arg_14]
mov	edx, [esp+40h+arg_10]
push	edi
push	ecx
push	edx
push	esi
push	eax
mov	eax, [esp+54h+arg_4]
push	eax
lea	ecx, [esp+58h+var_10]
push	ecx
call	sub_66B4F0
add	esp, 1Ch
test	[esp+40h+var_24], 2
mov	bl, al
jnz	short loc_672ECC
mov	ecx, [esp+40h+var_2C]
cmp	ecx, ebp
jz	short loc_672ECC
call	sub_64B3B0

loc_672ECC:
test	[esp+40h+var_24], 1
mov	[esp+40h+var_2C], ebp
jnz	short loc_672EE4
mov	ecx, [esp+40h+var_28]
cmp	ecx, ebp
jz	short loc_672EE4
call	sub_64B3B0

loc_672EE4:
lea	ecx, [esp+40h+var_20]
mov	[esp+40h+var_28], ebp
call	sub_652830
lea	ecx, [esp+40h+var_10]
call	sub_652830
pop	esi
mov	al, bl
pop	ebx
pop	edi
pop	ebp
add	esp, 30h
retn

loc_672F04:
pop	edi
xor	al, al
pop	ebp
add	esp, 30h
retn
sub_672DA0 endp

align 10h



sub_672F10 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+2B4h]
mov	dword ptr [esi], offset	off_143335C
call	sub_693EA0
mov	ecx, [esi+2ACh]
test	ecx, ecx
jz	short loc_672F33
call	sub_64B3B0

loc_672F33:
lea	ecx, [esi+28Ch]
call	sub_66F790
lea	ecx, [esi+288h]
call	sub_66F700
lea	ecx, [esi+284h]
call	sub_660410
lea	ecx, [esi+8]
call	sub_6B6070
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_672F10 endp

align 10h



sub_672F70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
cmp	byte ptr [eax+4], 6
setnbe	dl
movzx	eax, dl
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	edx
push	eax
add	ecx, 288h
call	sub_672BB0
mov	al, 1
retn	0Ch
sub_672F70 endp

align 10h



sub_672FA0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h

sub	esp, 28h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	[esp+30h+var_28], 0
mov	ecx, [eax+8]
push	edi
push	ecx
lea	ecx, [esp+38h+var_20]
call	sub_652330
mov	al, [esp+34h+var_20]
mov	bl, 5
cmp	al, bl
jz	short loc_673023
cmp	al, 7
jz	short loc_67301B
movzx	edx, byte ptr [esi+34h]
mov	eax, [esi]
push	edx
push	eax
lea	ecx, [esp+3Ch+var_24]
push	ecx
lea	ecx, [esp+40h+var_20]
call	sub_6533A0
mov	edi, eax
cmp	[esp+34h+var_20], bl
jb	short loc_672FF4
lea	ecx, [esp+34h+var_20]
call	sub_652060

loc_672FF4:
mov	[esp+34h+var_20], bl
mov	eax, [edi]
mov	[esp+34h+var_1C], eax
inc	dword ptr [eax+8]
mov	eax, [esp+34h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_673017
call	sub_650DF0

loc_673017:
mov	al, [esp+34h+var_20]

loc_67301B:
cmp	al, bl
jnz	loc_6730D1

loc_673023:
mov	edx, [esi]
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+40h+var_24]
push	eax
lea	ecx, [esp+44h+var_20]
call	sub_652F60
mov	eax, [esp+34h+var_24]
cmp	dword ptr [eax+10h], 0
mov	ecx, eax
setz	bl
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_673055
call	sub_650DF0

loc_673055:
test	bl, bl
jz	short loc_673062
mov	eax, [esi+4]
mov	[esp+34h+var_28], eax
jmp	short loc_6730BC

loc_673062:
mov	eax, [esi]
mov	edi, [esi+20h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+40h+var_24]
mov	[esp+40h+var_10], 0
push	ecx
mov	ecx, [eax+8]
call	sub_652F60
push	0
push	0
lea	edx, [esp+3Ch+var_28]
push	edx
push	edi
lea	eax, [esp+44h+var_10]
push	eax
lea	ecx, [esp+48h+var_24]
push	ecx
mov	ecx, [esi]
call	sub_6726F0
mov	eax, [esp+34h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6730AF
call	sub_650DF0

loc_6730AF:
lea	ecx, [esp+34h+var_10]
call	sub_652830

loc_6730B8:
mov	eax, [esp+34h+var_28]

loc_6730BC:
mov	edi, [esi]
test	eax, eax
jnz	short loc_6730E6
mov	ecx, [esi+4]
or	byte ptr [edi+0C6h], 2
mov	[edi+74h], ecx
jmp	short loc_6730F2

loc_6730D1:
cmp	al, 7
jnz	short loc_6730B8
mov	eax, [esi]
mov	ecx, [eax+8]
push	eax
call	sub_651BB0
mov	[esp+34h+var_28], eax
jmp	short loc_6730BC

loc_6730E6:
and	byte ptr [edi+0C6h], 0FDh
mov	ecx, eax
mov	[edi+74h], eax

loc_6730F2:
call	sub_654DD0
mov	[edi+7Ch], al
mov	esi, [esi]
mov	ecx, [esi+8]
add	esi, 8
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_673118
mov	ecx, esi
call	sub_64B660

loc_673118:
lea	ecx, [esp+34h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 28h
retn
sub_672FA0 endp

align 10h



sub_673130 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 3Ch
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	ecx, [eax+8]
push	ecx
lea	ecx, [esp+48h+var_20]
call	sub_652330
mov	esi, [edi]
mov	ecx, [esi+8]
add	esi, 8
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_673164
mov	ecx, esi
call	sub_64B660

loc_673164:
lea	ecx, [esp+44h+var_30]
mov	[esp+44h+var_30], 0
call	sub_652060
mov	esi, [edi]
add	esi, 8
mov	[esp+44h+var_30], 1
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_67318D
mov	ecx, esi
call	sub_64B530

loc_67318D:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_67319D
lea	edx, [esp+44h+var_30]
push	edx
call	sub_652330

loc_67319D:
cmp	[esp+44h+arg_0], 55h
jnz	short loc_6731BB
mov	eax, [edi]
push	eax
lea	ecx, [esp+48h+var_20]
call	sub_652D70
mov	esi, eax
test	esi, esi
jnz	short loc_673225
jmp	loc_673274

loc_6731BB:
mov	ecx, [edi]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+50h+arg_0]
push	edx
lea	ecx, [esp+54h+var_20]
call	sub_652F60
mov	eax, [edi+20h]
push	0
push	0
push	0
push	eax
lea	eax, [esp+54h+var_10]
push	eax
lea	ecx, [esp+58h+arg_0]
push	ecx
mov	ecx, [edi]
mov	[esp+5Ch+var_10], 0
call	sub_6726F0
lea	ecx, [esp+44h+var_10]
test	al, al
jz	short loc_67325A
mov	edx, [edi]
push	edx
call	sub_652D70
lea	ecx, [esp+44h+var_10]
mov	esi, eax
call	sub_652830
mov	eax, [esp+44h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
test	esi, esi
jz	short loc_67326A
cmp	dword ptr [eax], 0
jnz	short loc_673225
call	sub_650DF0

loc_673225:
mov	eax, [edi]
push	0
add	edi, 24h
push	0Bh
mov	[esp+4Ch+var_38], eax
lea	ecx, [esp+4Ch+var_3C]
mov	[esp+4Ch+var_3C], offset off_1432D04
mov	[esp+4Ch+var_34], edi
mov	edx, [esi]
mov	edx, [edx+20h]
push	ecx
add	eax, 78h
push	eax
mov	ecx, esi
call	edx
mov	[esp+44h+var_3C], offset off_15818F8
jmp	short loc_673274

loc_67325A:
call	sub_652830
mov	eax, [esp+44h+arg_0]
mov	ecx, eax
add	eax, 8
dec	dword ptr [eax]

loc_67326A:
cmp	dword ptr [eax], 0
jnz	short loc_673274
call	sub_650DF0

loc_673274:
lea	ecx, [esp+44h+var_30]
call	sub_652830
lea	ecx, [esp+44h+var_20]
call	sub_652830
pop	edi
pop	esi
add	esp, 3Ch
retn	4
sub_673130 endp

align 10h


; Attributes: bp-based frame

sub_673290 proc	near

var_188= dword ptr -188h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_15D= byte ptr -15Dh
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_118= byte ptr -118h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_101= byte ptr -101h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	byte ptr -0E8h
var_E4=	byte ptr -0E4h
var_E0=	qword ptr -0E0h
var_D8=	qword ptr -0D8h
var_D0=	qword ptr -0D0h
var_C8=	byte ptr -0C8h
var_C0=	byte ptr -0C0h
var_B8=	byte ptr -0B8h
var_A0=	byte ptr -0A0h
var_88=	byte ptr -88h
var_70=	qword ptr -70h
var_64=	byte ptr -64h
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_28=	byte ptr -28h
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 174h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+174h+var_4], eax
mov	eax, [ebp+arg_C]
mov	edx, [ebp+arg_10]
push	ebx
mov	ebx, [ebp+arg_14]
push	esi
mov	esi, dword ptr [ebp+arg_0]
push	edi
mov	edi, ecx
mov	[esp+180h+var_158], edi
mov	[esp+180h+var_108], eax
mov	[esp+180h+var_100], edx
test	ebx, ebx
jz	short loc_6732D3
cmp	ebx, 3
jnz	short loc_6732EF

loc_6732D3:
mov	eax, [esi+74h]
mov	ecx, 100h
test	[eax+76h], cx
jnz	loc_676930
cmp	dword ptr [eax+14h], 0FFFFFFFFh
jl	loc_676930

loc_6732EF:
mov	eax, [esi+74h]
mov	al, [eax+76h]
shr	al, 4
mov	ecx, 1
test	cl, al
jnz	loc_676930
add	[esi+0C0h], ecx
mov	eax, [edi+8]
mov	[esp+180h+var_15C], 0
cmp	[eax+0Ch], ecx
jb	short loc_673323
mov	eax, [eax+8]
cmp	byte ptr [eax],	0
jnz	short loc_673325

loc_673323:
xor	eax, eax

loc_673325:
mov	[esp+180h+var_144], esi
mov	ecx, [esi+74h]
mov	[esp+180h+var_13C], eax
mov	eax, [esi+78h]
mov	[esp+180h+var_140], ecx
mov	ecx, [eax+294h]
mov	[esp+180h+var_128], ecx
test	edx, edx
jz	short loc_673365
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0Ch
call	eax
test	eax, eax
jz	short loc_673365
mov	ecx, [esp+180h+var_100]
push	ecx
mov	ecx, eax
call	sub_66D850
jmp	short loc_673367

loc_673365:
xor	eax, eax

loc_673367:
mov	edx, [esp+180h+var_140]
push	0
push	edx
lea	ecx, [esp+188h+var_120]
mov	[esp+188h+var_124], eax
call	sub_6692E0
mov	eax, [esp+180h+var_144]
mov	ecx, [eax+0A0h]
mov	[esp+180h+var_138], ecx
mov	ecx, [eax+74h]
call	sub_654DD0
movzx	ecx, [esp+180h+var_118]
cmp	ebx, 2
setz	dl
add	dl, dl
mov	byte ptr [esp+180h+var_110], al
mov	al, byte ptr [esp+180h+var_110+2]
add	dl, dl
xor	dl, al
and	dl, 4
xor	al, dl
mov	edx, [esp+180h+var_120]
add	cl, cl
xor	cl, al
and	cl, 2
xor	al, cl
mov	byte ptr [esp+180h+var_110+2], al
mov	eax, [edx+4]
lea	ecx, [esp+180h+var_120]
mov	byte ptr [esp+180h+var_110+1], bl
call	eax
mov	cl, byte ptr [esp+180h+var_110+2]
mov	bl, [esi+0C6h]
mov	dl, cl
xor	dl, al
mov	eax, [edi+8]
and	dl, 1
xor	cl, dl
shr	bl, 1
mov	byte ptr [esp+180h+var_110+2], cl
mov	eax, [eax+0Ch]
mov	ecx, [ebp+arg_8]
not	bl
and	bl, 1
cmp	ecx, eax
mov	byte ptr [esp+180h+var_FC+1], bl
jge	short loc_673401
mov	eax, ecx

loc_673401:
mov	ecx, [ebp+arg_4]
add	eax, ecx
cmp	ecx, eax
mov	[esp+180h+var_134], eax
mov	[esp+180h+var_130], ecx
mov	[esp+180h+var_12C], ecx
mov	[esp+180h+var_16C], 0
jge	loc_6767CA

loc_673422:
mov	edx, [esp+180h+var_124]
test	edx, edx
jz	short loc_673483
mov	eax, [edx+4]
xor	ecx, ecx
test	eax, eax
jbe	short loc_673483
mov	edx, [edx]
mov	edx, [edx+eax*8-4]
mov	edi, [esp+180h+var_12C]
and	edx, 7FFFFFFFh

loc_673443:
cmp	edi, edx
jl	short loc_67344C
inc	ecx
cmp	ecx, eax
jb	short loc_673443

loc_67344C:
test	ecx, ecx
jbe	short loc_673483
mov	ebx, [esp+180h+var_124]
sub	eax, ecx
mov	edi, eax
cmp	edi, [ebx+4]
jnb	short loc_673469
mov	eax, [ebx+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_673480
push	edi
jmp	short loc_673476

loc_673469:
cmp	edi, [ebx+8]
jb	short loc_673480
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_673476:
mov	ecx, [esp+184h+var_124]
push	ecx
call	sub_669070

loc_673480:
mov	[ebx+4], edi

loc_673483:
mov	edx, [esp+180h+var_13C]
mov	ebx, [esp+180h+var_12C]
movzx	ecx, byte ptr [edx+ebx]
test	cl, cl
js	loc_675C79
lea	edx, [ebx+1]
mov	[esp+180h+var_130], edx
cmp	ecx, 69h	; switch 106 cases
ja	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
jmp	ds:off_676948[ecx*4] ; switch jump

loc_6734AE:		; jumptable 006734A7 case 0
mov	eax, [esp+180h+var_134]
mov	[esp+180h+var_130], eax
mov	[esp+180h+var_15C], 0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_6734C3:		; jumptable 006734A7 case 4
test	byte ptr [esi+0C6h], 2
jnz	loc_675EB4
mov	edi, [esi+74h]
mov	ebx, [edi]
mov	edx, [ebx+13Ch]
mov	ecx, edi
call	edx
inc	eax
push	eax
mov	eax, [ebx+144h]
mov	ecx, edi
call	eax
jmp	loc_675EB4

loc_6734F0:		; jumptable 006734A7 case 5
test	byte ptr [esi+0C6h], 2
jnz	loc_67679A
mov	edi, [esi+74h]
mov	ebx, [edi]
mov	eax, [ebx+13Ch]
mov	ecx, edi
call	eax
mov	edx, [ebx+144h]
dec	eax
push	eax
mov	ecx, edi
call	edx
jmp	loc_67679A

loc_67351D:		; jumptable 006734A7 case 6
test	byte ptr [esi+0C6h], 2
jnz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+148h]
push	0
call	eax
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67353E:		; jumptable 006734A7 case 7
test	byte ptr [esi+0C6h], 2
jnz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+148h]
push	1
call	eax
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67355F:		; jumptable 006734A7 case 9
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
test	eax, eax
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
push	0
mov	ecx, eax
call	sub_68E580
test	eax, eax
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	ecx, eax
call	sub_685780
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67358E:		; jumptable 006734A7 case 10
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6735A1
mov	ecx, [edi+0Ch]

loc_6735A1:
push	edx
push	esi
call	sub_653DD0
jmp	loc_6766CF

loc_6735AD:		; jumptable 006734A7 case 11
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6735C0
mov	ecx, [edi+0Ch]

loc_6735C0:
push	edx
push	esi
call	sub_667560
jmp	loc_6766CF

loc_6735CC:		; jumptable 006734A7 case 12
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6735DF
mov	ecx, [edi+0Ch]

loc_6735DF:
push	edx
push	esi
call	sub_6675B0
jmp	loc_6766CF

loc_6735EB:		; jumptable 006734A7 case 13
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6735FE
mov	ecx, [edi+0Ch]

loc_6735FE:
push	edx
push	esi
call	sub_6538D0
jmp	loc_6766CF

loc_67360A:		; jumptable 006734A7 case 14
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_673636
mov	ecx, [edi+0Ch]
mov	ebx, ecx

loc_67361F:
push	edx
push	esi
call	sub_6540A0
movzx	ecx, al
push	ecx
mov	ecx, ebx
call	sub_64A6C0
jmp	loc_6766CF

loc_673636:
lea	ebx, [eax-10h]
jmp	short loc_67361F

loc_67363B:		; jumptable 006734A7 cases 15,72
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_67364E
mov	ecx, [edi+0Ch]

loc_67364E:
push	0FFFFFFFFh
push	edx
push	esi
lea	edx, [esp+18Ch+var_54]
push	edx
call	sub_654580
mov	ebx, eax
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_67366E
mov	ecx, [edi+0Ch]

loc_67366E:
push	ebx
call	sub_652520
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_67368C
mov	ecx, edi
call	sub_64B660

loc_67368C:
mov	ecx, ebx
call	sub_652830
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673698:		; jumptable 006734A7 case 16
mov	eax, [esi+8]
lea	edi, [esi+8]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6736A9
mov	ecx, [edi+0Ch]

loc_6736A9:
push	esi
call	sub_651D80
test	al, al
jz	short loc_6736C3
mov	ecx, [edi]
push	esi
call	sub_651D80
test	al, al
jz	short loc_6736C3
mov	dl, 1
jmp	short loc_6736C5

loc_6736C3:
xor	dl, dl

loc_6736C5:
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6736D2
mov	ecx, [edi+0Ch]

loc_6736D2:
push	edx
call	sub_64A6C0
jmp	loc_6766CF

loc_6736DD:		; jumptable 006734A7 case 17
mov	eax, [esi+8]
lea	edi, [esi+8]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6736EE
mov	ecx, [edi+0Ch]

loc_6736EE:
push	esi
call	sub_651D80
test	al, al
jnz	short loc_673708
mov	ecx, [edi]
push	esi
call	sub_651D80
test	al, al
jnz	short loc_673708
xor	dl, dl
jmp	short loc_67370A

loc_673708:
mov	dl, 1

loc_67370A:
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_673717
mov	ecx, [edi+0Ch]

loc_673717:
push	edx
call	sub_64A6C0
jmp	loc_6766CF

loc_673722:		; jumptable 006734A7 case 18
mov	edi, [esi+8]
cmp	byte ptr [edi],	2
jnz	short loc_673739
cmp	byte ptr [edi+4], 0
setz	al
mov	[edi+4], al
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673739:
mov	ecx, edi
call	sub_651A30
test	al, al
jz	short loc_673750
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 1
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673750:
push	esi
mov	ecx, edi
call	sub_651D80
test	al, al
setz	cl
movzx	edx, cl
push	edx
mov	ecx, edi
call	sub_64A6C0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67376D:		; jumptable 006734A7 case 19
mov	eax, [esi+8]
lea	edi, [esi+8]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_67377E
mov	ecx, [edi+0Ch]

loc_67377E:
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_174]
push	edx
call	sub_6533A0
mov	ecx, [edi]
mov	ebx, eax
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_10C]
push	edx
call	sub_6533A0
mov	[esp+180h+var_170], eax
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_6737B4
add	eax, 0FFFFFFF0h
jmp	short loc_6737B7

loc_6737B4:
mov	eax, [edi+0Ch]

loc_6737B7:
mov	ecx, [ebx]
mov	edx, [esp+180h+var_170]
cmp	ecx, [edx]
setz	cl
movzx	edx, cl
push	edx
mov	ecx, eax
call	sub_64A6C0
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_6737E5
mov	ecx, edi
call	sub_64B660

loc_6737E5:
mov	ecx, [ebx]
or	edi, 0FFFFFFFFh
add	[ecx+8], edi
jnz	short loc_6737F4
call	sub_650DF0

loc_6737F4:
mov	eax, [esp+180h+var_170]
mov	ecx, [eax]
add	[ecx+8], edi
jnz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
call	sub_650DF0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67380D:		; jumptable 006734A7 case 20
movzx	edx, byte ptr [esp+180h+var_110]
mov	ecx, [esi+8]
push	edx
push	esi
lea	eax, [esp+188h+var_174]
push	eax
call	sub_6533A0
mov	ebx, [esi+8]
mov	edi, eax
mov	ecx, edi
call	sub_650650
push	eax
mov	ecx, ebx
call	sub_6B7B70
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
call	sub_650DF0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67384B:		; jumptable 006734A7 case 21
mov	eax, [esi+8]
sub	eax, [esi+0Ch]
mov	edx, [esi+1Ch]
lea	edi, [esi+8]
dec	edx
sar	eax, 4
shl	edx, 5
add	eax, edx
xor	ecx, ecx
cmp	eax, 2
jb	short loc_67387D
mov	edx, [edi+10h]
add	eax, 0FFFFFFFEh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [edx+ecx*4]
mov	ecx, eax

loc_67387D:
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_174]
push	edx
call	sub_6533A0
mov	ecx, [edi]
mov	[esp+180h+var_164], eax
mov	eax, ecx
lea	ebx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6738A1
mov	ebx, [edi+0Ch]

loc_6738A1:
push	esi
call	sub_653660
push	eax
push	esi
mov	ecx, ebx
call	sub_653660
dec	eax
push	eax
mov	eax, [esp+188h+var_164]
push	eax
lea	ecx, [esp+18Ch+var_10C]
push	ecx
call	sub_6B4E40
mov	ecx, [edi]
lea	edx, [ecx-20h]
add	esp, 10h
mov	ebx, eax
cmp	edx, [edi+4]
jnb	short loc_673901
mov	[esp+180h+var_170], 2
jmp	short loc_6738E0
align 10h

loc_6738E0:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_6738F8
mov	ecx, edi
call	sub_64B660

loc_6738F8:
sub	[esp+180h+var_170], 1
jnz	short loc_6738E0
jmp	short loc_673913

loc_673901:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h

loc_673913:
mov	ecx, [edi]
push	ebx
call	sub_64A680
mov	eax, [esp+180h+var_164]
mov	ecx, [eax]
or	edi, 0FFFFFFFFh
add	[ecx+8], edi
jnz	short loc_67392E
call	sub_650DF0

loc_67392E:
mov	ecx, [ebx]
add	[ecx+8], edi
jnz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
call	sub_650DF0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673943:		; jumptable 006734A7 case 24
mov	edi, [esi+8]
push	esi
mov	ecx, edi
call	sub_653660
push	eax
mov	ecx, edi
call	sub_6B7B70
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67395B:		; jumptable 006734A7 case 28
mov	edi, [esi+8]
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18Ch+var_174]
push	ecx
mov	ecx, edi
call	sub_652F60
cmp	byte ptr [esi+7Ch], 6
mov	eax, [esi+78h]
jbe	short loc_6739DE
mov	ecx, [esp+180h+var_174]
cmp	ecx, [eax+134h]
jnz	short loc_67399F
call	sub_6794F0
sub	esp, 8
mov	ecx, edi
fstp	qword ptr [esp+188h+var_188]
call	sub_64A6A0
mov	eax, [esp+180h+var_174]
jmp	loc_6765EC

loc_67399F:
cmp	ecx, [eax+138h]
jz	short loc_673A24
cmp	ecx, [eax+13Ch]
jz	loc_673A5A

loc_6739B3:
mov	ecx, edi
call	sub_652060
push	0
push	0
push	0
mov	byte ptr [edi],	0
mov	edx, [esp+18Ch+var_124]
push	edx
push	edi
lea	eax, [esp+194h+var_174]
push	eax
mov	ecx, esi
call	sub_6726F0
mov	eax, [esp+180h+var_174]
jmp	loc_6765EC

loc_6739DE:
lea	ecx, [esp+180h+var_174]
push	ecx
lea	ecx, [eax+134h]
call	sub_6548C0
test	al, al
jz	short loc_673A0D
call	sub_6794F0
sub	esp, 8
mov	ecx, edi
fstp	qword ptr [esp+188h+var_188]
call	sub_64A6A0
mov	eax, [esp+180h+var_174]
jmp	loc_6765EC

loc_673A0D:
mov	eax, [esi+78h]
lea	edx, [esp+180h+var_174]
push	edx
lea	ecx, [eax+138h]
call	sub_6548C0
test	al, al
jz	short loc_673A3F

loc_673A24:
call	sub_679500
sub	esp, 8
mov	ecx, edi
fstp	qword ptr [esp+188h+var_188]
call	sub_64A6A0
mov	eax, [esp+180h+var_174]
jmp	loc_6765EC

loc_673A3F:
mov	eax, [esi+78h]
lea	ecx, [esp+180h+var_174]
push	ecx
lea	ecx, [eax+13Ch]
call	sub_6548C0
test	al, al
jz	loc_6739B3

loc_673A5A:
call	sub_679510
sub	esp, 8
mov	ecx, edi
fstp	qword ptr [esp+188h+var_188]
call	sub_64A6A0
mov	eax, [esp+180h+var_174]
jmp	loc_6765EC

loc_673A75:		; jumptable 006734A7 case 29
mov	ecx, [esi+8]
cmp	ecx, [esi+0Ch]
lea	edi, [esi+8]
jbe	short loc_673A85
add	ecx, 0FFFFFFF0h
jmp	short loc_673A88

loc_673A85:
mov	ecx, [edi+0Ch]

loc_673A88:
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
push	edx
call	sub_652F60
mov	eax, [esp+180h+var_124]
mov	ecx, [edi]
push	1
push	eax
push	ecx
lea	edx, [esp+18Ch+var_174]
push	edx
mov	ecx, esi
call	sub_6729F0
mov	ecx, [edi]
lea	eax, [ecx-20h]
cmp	eax, [edi+4]
jnb	short loc_673AE6
mov	ebx, 2
lea	esp, [esp+0]

loc_673AC0:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_673AD8
mov	ecx, edi
call	sub_64B660

loc_673AD8:
sub	ebx, 1
jnz	short loc_673AC0
mov	eax, [esp+180h+var_174]
jmp	loc_6765EC

loc_673AE6:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [esp+180h+var_174]
jmp	loc_6765EC

loc_673B01:		; jumptable 006734A7 case 32
lea	ecx, [esp+180h+var_144]
call	sub_672FA0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673B0F:		; jumptable 006734A7 case 33
mov	eax, [esi+8]
lea	edi, [esi+8]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_673B20
mov	ecx, [edi+0Ch]

loc_673B20:
movzx	edx, byte ptr [esp+180h+var_110]
push	edx
push	esi
call	sub_653890
movzx	eax, byte ptr [esp+180h+var_110]
mov	ecx, [edi]
push	eax
push	esi
lea	edx, [esp+188h+var_174]
push	edx
call	sub_6533A0
mov	ebx, eax
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_673B4D
add	eax, 0FFFFFFF0h
jmp	short loc_673B50

loc_673B4D:
mov	eax, [edi+0Ch]

loc_673B50:
push	ebx
push	esi
mov	ecx, eax
call	sub_653960
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_673B71
mov	ecx, edi
call	sub_64B660

loc_673B71:
mov	ecx, [ebx]
add	dword ptr [ecx+8], 0FFFFFFFFh
jmp	loc_6765F7

loc_673B7C:		; jumptable 006734A7 case 34
mov	eax, [esi+8]
cmp	eax, [esi+0Ch]
lea	edi, [esi+8]
jbe	short loc_673B8C
add	eax, 0FFFFFFF0h
jmp	short loc_673B8F

loc_673B8C:
mov	eax, [edi+0Ch]

loc_673B8F:
push	eax
mov	ecx, esi
call	sub_66D5E0
mov	[esp+180h+var_170], eax
test	eax, eax
mov	eax, [edi]
jz	short loc_673BD3
cmp	eax, [edi+4]
jbe	short loc_673BAB
add	eax, 0FFFFFFF0h
jmp	short loc_673BAE

loc_673BAB:
mov	eax, [edi+0Ch]

loc_673BAE:
mov	edx, [esp+180h+var_170]
mov	ebx, [edx]
mov	ecx, [edi]
push	1
push	eax
push	esi
add	ebx, 120h
call	sub_653660
mov	ecx, [esp+188h+var_170]
push	eax
mov	eax, [ebx]
call	eax
jmp	loc_6766CF

loc_673BD3:
lea	ebx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_673BDE
mov	ebx, [edi+0Ch]

loc_673BDE:
mov	ecx, ebx
call	sub_652060
mov	byte ptr [ebx],	0
jmp	loc_6766CF

loc_673BED:		; jumptable 006734A7 case 35
mov	eax, [esi+8]
sub	eax, [esi+0Ch]
mov	edx, [esi+1Ch]
lea	edi, [esi+8]
dec	edx
sar	eax, 4
shl	edx, 5
add	eax, edx
xor	ecx, ecx
cmp	eax, 2
jb	short loc_673C1F
mov	edx, [edi+10h]
add	eax, 0FFFFFFFEh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [edx+ecx*4]
mov	ecx, eax

loc_673C1F:
push	ecx
mov	ecx, esi
call	sub_66D5E0
mov	[esp+180h+var_170], eax
test	eax, eax
jz	short loc_673C5E
mov	eax, [edi]
mov	ecx, eax
cmp	ecx, [edi+4]
jbe	short loc_673C3D
add	ecx, 0FFFFFFF0h
jmp	short loc_673C40

loc_673C3D:
mov	ecx, [edi+0Ch]

loc_673C40:
mov	edx, [esp+180h+var_170]
mov	ebx, [edx]
push	1
push	eax
push	esi
add	ebx, 11Ch
call	sub_653660
mov	ecx, [esp+188h+var_170]
push	eax
mov	eax, [ebx]
call	eax

loc_673C5E:
mov	ecx, edi
call	sub_66E590
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673C6A:		; jumptable 006734A7 case 36
mov	eax, [esi+8]
sub	eax, [esi+0Ch]
mov	edx, [esi+1Ch]
lea	edi, [esi+8]
dec	edx
sar	eax, 4
shl	edx, 5
add	eax, edx
xor	ecx, ecx
cmp	eax, 2
jb	short loc_673C9C
mov	edx, [edi+10h]
add	eax, 0FFFFFFFEh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [edx+ecx*4]
mov	ecx, eax

loc_673C9C:
push	ecx
mov	ecx, esi
call	sub_66D5E0
mov	ebx, eax
test	ebx, ebx
jz	short loc_673CF3
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_673CB7
mov	ecx, [edi+0Ch]

loc_673CB7:
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+18Ch+var_174]
push	eax
call	sub_652F60
mov	ecx, [edi]
push	0
push	esi
call	sub_653660
push	eax
lea	ecx, [esp+188h+var_174]
push	ecx
mov	ecx, ebx
call	sub_658260
mov	eax, [esp+180h+var_174]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_673CF3
call	sub_650DF0

loc_673CF3:
mov	ecx, edi
call	sub_66E590
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673CFF:		; jumptable 006734A7 case 37
mov	eax, [esi+8]
lea	ebx, [esi+8]
push	eax
mov	ecx, esi
call	sub_66D5E0
mov	edi, eax
test	edi, edi
jz	short loc_673D61
cmp	dword ptr [edi+14h], 4000h
jge	short loc_673D5A
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_673D3D
mov	ecx, edi
call	sub_658B70
test	eax, eax
jnz	short loc_673D3D
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
mov	eax, [eax+78h]

loc_673D3D:
mov	ecx, [eax+8]
mov	edx, [ecx]
add	eax, 8
push	edx
lea	eax, [esp+184h+var_120]
push	offset aRemovemoviecli ; "removeMovieClip(\"%s\") failed - depth mu"...
push	eax
call	sub_66B400
add	esp, 0Ch
jmp	short loc_673D61

loc_673D5A:
mov	ecx, edi
call	sub_655100

loc_673D61:
mov	ecx, [ebx]
call	sub_652830
add	dword ptr [ebx], 0FFFFFFF0h
mov	eax, [ebx]
cmp	eax, [ebx+4]
jnb	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	ecx, ebx
call	sub_64B660
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673D82:		; jumptable 006734A7 case 38
mov	ecx, [esi+8]
sub	ecx, [esi+0Ch]
mov	edx, [esi+1Ch]
lea	edi, [esi+8]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
mov	ecx, [edi]
push	eax
push	1
push	esi
push	0
push	ecx
lea	ecx, [esp+194h+var_28]
call	sub_64B7F0
mov	ebx, eax
push	ebx
call	sub_66E090
mov	ecx, [edi]
add	esp, 4
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_673DD0
mov	ecx, edi
call	sub_64B660

loc_673DD0:
mov	eax, [ebx]
mov	edx, [eax]
push	0
mov	ecx, ebx
call	edx
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673DDF:		; jumptable 006734A7 case 39
lea	ecx, [esp+180h+var_144]
call	sub_66E8F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673DED:		; jumptable 006734A7 case 40
mov	ecx, [esi+74h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	dword ptr [eax+23E4h], 0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673E06:		; jumptable 006734A7 case 41
mov	eax, [esi+8]
lea	edi, [esi+8]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_673E17
mov	ecx, [edi+0Ch]

loc_673E17:
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_174]
push	edx
call	sub_6533A0
mov	ecx, [edi]
mov	[esp+180h+var_164], eax
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_10C]
push	edx
call	sub_6533A0
mov	ebx, eax
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_673E4D
add	eax, 0FFFFFFF0h
jmp	short loc_673E50

loc_673E4D:
mov	eax, [edi+0Ch]

loc_673E50:
mov	ecx, [esp+180h+var_164]
push	ebx
mov	[esp+184h+var_170], eax
call	sub_651940
movzx	ecx, al
push	ecx
mov	ecx, [esp+184h+var_170]
call	sub_64A6C0
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_673E83
mov	ecx, edi
call	sub_64B660

loc_673E83:
mov	ecx, [ebx]
or	edi, 0FFFFFFFFh
add	[ecx+8], edi
jnz	short loc_673E92
call	sub_650DF0

loc_673E92:
mov	edx, [esp+180h+var_164]
mov	ecx, [edx]
add	[ecx+8], edi
jmp	loc_6765F7

loc_673EA0:		; jumptable 006734A7 case 42
lea	eax, [esp+180h+var_15C]
push	eax
push	ebx
mov	ecx, esi
call	sub_66D1D0
mov	ecx, [esi+8]
lea	edi, [esi+8]
push	ecx
lea	ecx, [esi+0B0h]
call	sub_652520
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_673ED7
mov	ecx, edi
call	sub_64B660

loc_673ED7:
mov	edx, [ebp+arg_14]
mov	eax, [esp+180h+var_124]
mov	ecx, [esp+180h+var_108]
push	edx
push	eax
mov	eax, [esp+188h+var_130]
push	ecx
mov	ecx, [esp+18Ch+var_158]
lea	edx, [esp+18Ch+var_15C]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_676B90
mov	[esp+180h+var_130], eax
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673F04:		; jumptable 006734A7 case 43
lea	ecx, [esp+180h+var_144]
call	sub_66EB20
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673F12:		; jumptable 006734A7 case 44
lea	ecx, [esp+180h+var_144]
call	sub_66EC90
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673F20:		; jumptable 006734A7 case 48
mov	ecx, [esi+8]
push	esi
call	sub_653660
mov	ebx, eax
cmp	ebx, 1
jge	short loc_673F35
mov	ebx, 1

loc_673F35:
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	edi, [esi+8]
push	eax
call	sub_6B6730
xor	edx, edx
div	ebx
add	esp, 4
mov	ecx, edi
push	edx
call	sub_6B7B70
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673F5C:		; jumptable 006734A7 case 49
movzx	edx, byte ptr [esp+180h+var_110]
mov	ecx, [esi+8]
push	edx
push	esi
lea	eax, [esp+188h+var_174]
push	eax
call	sub_6533A0
mov	edi, eax
mov	ecx, edi
call	sub_650650

loc_673F79:
mov	ecx, [esi+8]
push	eax
call	sub_6B7B70
mov	ecx, edi	; void *
push	0		; char
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673F90:		; jumptable 006734A7 case 50
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18Ch+var_174]
push	ecx
mov	ecx, [esi+8]
call	sub_652F60
mov	edx, [esp+180h+var_174]
mov	eax, [edx]
movsx	ecx, byte ptr [eax]
push	ecx
mov	ecx, [esi+8]
call	sub_6B7B70
push	0		; char
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_673FC4:		; jumptable 006734A7 case 51
mov	ecx, [esi+8]
push	esi
call	sub_653660
mov	edi, [esi+8]
lea	edx, [esp+180h+var_70]
mov	byte ptr [esp+180h+var_70], al
push	edx
lea	eax, [esp+184h+var_E8]
push	eax
mov	ecx, esi
mov	byte ptr [esp+188h+var_70+1], 0
call	sub_64AB70
push	eax
mov	ecx, edi
call	sub_64A680
lea	ecx, [esp+180h+var_E8]
call	sub_4E4250
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67400F:		; jumptable 006734A7 case 52
mov	ecx, [esi+74h]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	ecx, eax
call	sub_68F490
add	dword ptr [esi+8], 10h
mov	dword ptr [esp+180h+var_D8], eax
mov	dword ptr [esp+180h+var_70], eax
mov	eax, edx
mov	ecx, edx
and	eax, 7FFFFFFFh
and	ecx, 80000000h
mov	dword ptr [esp+180h+var_D8+4], eax
fild	[esp+180h+var_D8]
mov	eax, [esi+8]
mov	dword ptr [esp+180h+var_D0+4], ecx
mov	dword ptr [esp+180h+var_D0], 0
fild	[esp+180h+var_D0]
lea	edi, [esi+8]
mov	dword ptr [esp+180h+var_70+4], edx
fchs
faddp	st(1), st
fstp	qword ptr [esp+180h+var_150]
cmp	eax, [edi+8]
jb	short loc_674089
mov	ecx, edi
call	sub_64B530

loc_674089:
mov	edi, [edi]
test	edi, edi
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
fld	qword ptr [esp+180h+var_150]
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_6740A2:		; jumptable 006734A7 case 53
mov	eax, [esi+8]
sub	eax, [esi+0Ch]
mov	edx, [esi+1Ch]
lea	edi, [esi+8]
dec	edx
sar	eax, 4
shl	edx, 5
add	eax, edx
xor	ecx, ecx
cmp	eax, 2
jb	short loc_6740D4
mov	edx, [edi+10h]
add	eax, 0FFFFFFFEh
mov	ecx, eax
and	eax, 1Fh
shr	ecx, 5
shl	eax, 4
add	eax, [edx+ecx*4]
mov	ecx, eax

loc_6740D4:
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_174]
push	edx
call	sub_6533A0
mov	ecx, [edi]
mov	[esp+180h+var_170], eax
mov	eax, ecx
lea	ebx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6740F8
mov	ebx, [edi+0Ch]

loc_6740F8:
push	esi
call	sub_653660
push	eax
push	esi
mov	ecx, ebx
call	sub_653660
dec	eax
push	eax
mov	eax, [esp+188h+var_170]
push	eax
lea	ecx, [esp+18Ch+var_10C]
push	ecx
call	sub_6B4E40
mov	ecx, [edi]
lea	edx, [ecx-20h]
add	esp, 10h
mov	ebx, eax
cmp	edx, [edi+4]
jnb	short loc_674135
push	2
mov	ecx, edi
call	sub_64C1F0
jmp	short loc_674147

loc_674135:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h

loc_674147:
mov	ecx, [edi]
push	ebx
call	sub_64A680
mov	ecx, [esp+180h+var_170]	; void *
push	0		; char
call	sub_65D7F0
push	0		; char
mov	ecx, ebx	; void *
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674168:		; jumptable 006734A7 case 54
movzx	eax, byte ptr [esp+180h+var_110]
mov	ecx, [esi+8]
push	eax
push	esi
lea	edx, [esp+188h+var_174]
push	edx
call	sub_6533A0
mov	edi, eax
mov	eax, [edi]
cmp	dword ptr [eax+10h], 0
jnz	short loc_67418D
xor	eax, eax
jmp	loc_673F79

loc_67418D:
push	0
mov	ecx, edi
call	sub_650680
jmp	loc_673F79

loc_67419B:		; jumptable 006734A7 case 55
mov	ecx, [esi+8]
push	esi
call	sub_653750
mov	edx, [esi+78h]
mov	word ptr [esp+180h+var_70], ax
xor	ecx, ecx
lea	eax, [esp+180h+var_70]
mov	word ptr [esp+180h+var_70+2], cx
mov	ecx, [edx+280h]
push	eax
call	sub_651030
inc	dword ptr [eax+8]
lea	ecx, [esp+180h+var_170]
push	ecx
mov	ecx, [esi+8]
mov	[esp+184h+var_170], eax
call	sub_64A680
lea	ecx, [esp+180h+var_170]
call	sub_4E4250
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_6741EE:		; jumptable 006734A7 case 58
mov	eax, [esi+8]
lea	edi, [esi+8]
mov	byte ptr [esp+180h+var_F8], 0
lea	ebx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_674207
mov	ebx, [edi+0Ch]

loc_674207:
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
push	edx
mov	ecx, eax
call	sub_652F60
cmp	byte ptr [esp+180h+var_110], 6
ja	short loc_67428C
cmp	byte ptr [ebx],	1
jz	short loc_67422F
mov	ecx, ebx
call	sub_651A30
test	al, al
jz	short loc_67428C

loc_67422F:
mov	eax, [esp+180h+var_124]
push	eax
lea	ecx, [esp+184h+var_54]
push	ecx
lea	edx, [esp+188h+var_174]
push	edx
mov	ecx, esi
mov	[esp+18Ch+var_54], 0
call	sub_668C30
test	al, al
jz	short loc_67427E
push	esi
lea	ecx, [esp+184h+var_54]
call	sub_652D70
test	eax, eax
jz	short loc_67427E
mov	edx, [eax]
mov	edx, [edx+18h]
lea	ecx, [esp+180h+var_174]
push	ecx
lea	ecx, [esi+78h]
push	ecx
mov	ecx, eax
call	edx
mov	byte ptr [esp+180h+var_F8], al

loc_67427E:
lea	ecx, [esp+180h+var_54]
call	sub_652830
jmp	short loc_6742BC

loc_67428C:
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_674299
mov	ecx, [edi+0Ch]

loc_674299:
push	esi
call	sub_652D70
test	eax, eax
jz	short loc_6742BC
mov	edx, [eax]
mov	edx, [edx+18h]
lea	ecx, [esp+180h+var_174]
push	ecx
lea	ecx, [esi+78h]
push	ecx
mov	ecx, eax
call	edx
mov	byte ptr [esp+180h+var_F8], al

loc_6742BC:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_6742D4
mov	ecx, edi
call	sub_64B660

loc_6742D4:
mov	eax, [esp+180h+var_F8]
mov	ecx, [edi]
push	eax
call	sub_64A6C0
lea	ecx, [esp+180h+var_174]	; void *
push	0		; char
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_6742F3:		; jumptable 006734A7 case 59
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18Ch+var_174]
push	ecx
mov	ecx, [esi+8]
call	sub_652F60
mov	edx, [esp+180h+var_174]
mov	[esp+180h+var_54], 0
mov	eax, [edx+0Ch]
shr	eax, 19h
test	al, 1
jnz	short loc_674395
lea	ecx, [esp+180h+var_174]
push	ecx
call	sub_668020
add	esp, 4
test	al, al
jz	short loc_674395
mov	ecx, [esp+180h+var_124]
lea	edx, [esp+180h+var_174]
push	edx
push	0
push	0
lea	eax, [esp+18Ch+var_54]
push	eax
push	0
push	ecx
push	0
push	edx
lea	ecx, [esp+1A0h+var_88]
call	sub_6677B0
push	eax
mov	ecx, esi
call	sub_672190
test	al, al
jz	short loc_67436F
lea	ecx, [esp+180h+var_54]
call	sub_651A30
test	al, al
jz	short loc_6743B2

loc_67436F:
mov	ecx, [esi+8]
push	0

loc_674374:
call	sub_64A6C0
push	0		; char
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0
lea	ecx, [esp+180h+var_54]
call	sub_652830
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674395:
mov	eax, [esp+180h+var_124]
push	eax
lea	ecx, [esp+184h+var_54]
push	ecx
lea	edx, [esp+188h+var_174]
push	edx
mov	ecx, esi
call	sub_668C30
test	al, al
jz	short loc_67436F

loc_6743B2:
push	esi
lea	ecx, [esp+184h+var_54]
call	sub_652D70
test	eax, eax
jz	short loc_67436F
mov	edx, [eax]
mov	edx, [edx+18h]
mov	edi, [esi+8]
lea	ecx, [esp+180h+var_174]
push	ecx
lea	ecx, [esi+78h]
push	ecx
mov	ecx, eax
call	edx
movzx	eax, al
push	eax
mov	ecx, edi
jmp	short loc_674374

loc_6743E0:		; jumptable 006734A7 case 60
mov	eax, [esi+8]
lea	edi, [esi+8]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6743F1
mov	ecx, [edi+0Ch]

loc_6743F1:
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
push	edx
call	sub_652F60
test	byte ptr [esp+180h+var_110+2], 4
jnz	short loc_674425
cmp	[ebp+arg_14], 1
jz	short loc_674425
mov	eax, [esp+180h+var_124]
mov	ecx, [edi]
push	1
push	eax
push	ecx
lea	edx, [esp+18Ch+var_174]
push	edx
mov	ecx, esi
call	sub_6729F0
jmp	short loc_674434

loc_674425:
mov	eax, [edi]
push	eax
lea	ecx, [esp+184h+var_174]
push	ecx
mov	ecx, esi
call	sub_671AE0

loc_674434:
mov	ecx, [edi]
lea	edx, [ecx-20h]
cmp	edx, [edi+4]
jnb	short loc_674457
push	2
mov	ecx, edi
call	sub_64C1F0
lea	ecx, [esp+180h+var_174]	; void *
push	0		; char
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674457:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
lea	ecx, [esp+180h+var_174]	; void *
push	0		; char
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674479:		; jumptable 006734A7 case 61
mov	ecx, [esi+8]
lea	ebx, [esi+8]
mov	[esp+180h+var_54], 0
lea	eax, [esp+180h+var_54]
mov	[esp+180h+var_44], 0
cmp	byte ptr [ecx],	5
mov	[esp+180h+var_164], eax
mov	[esp+180h+var_15D], 1
jnz	loc_6745BB
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
push	edx
call	sub_652F60
mov	ecx, [esp+180h+var_124]
push	0
lea	eax, [esp+184h+var_44]
push	eax
push	0
push	ecx
lea	edx, [esp+190h+var_54]
push	edx
lea	eax, [esp+194h+var_174]
push	eax
mov	ecx, esi
call	sub_6726F0
lea	ecx, [esp+180h+var_54]
call	sub_651A10
test	al, al
jnz	loc_6745AE
cmp	[esp+180h+var_54], 6
jnz	loc_674594
push	esi
lea	ecx, [esp+184h+var_54]
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_67451E
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx

loc_67451E:
mov	ecx, [esp+180h+var_16C]
test	ecx, ecx
jz	short loc_67452B
call	sub_64B3B0

loc_67452B:
mov	[esp+180h+var_16C], edi
test	edi, edi
jz	short loc_674594
mov	edx, [edi+10h]
mov	eax, [edx+3Ch]
lea	ecx, [edi+10h]
call	eax
test	al, al
jz	short loc_674594
lea	ecx, [esp+180h+var_54]
call	sub_652830
mov	edx, [edi+10h]
mov	edx, [edx+38h]
lea	eax, [esi+78h]
lea	ecx, [edi+10h]
push	eax
lea	eax, [esp+184h+var_34]
push	eax
call	edx
push	eax
lea	ecx, [esp+184h+var_54]
mov	[esp+184h+var_168], eax
call	sub_651E70
mov	ecx, [esp+180h+var_168]	; void *
push	0		; char
mov	[esp+184h+var_164], eax
call	sub_66D180
push	edi
lea	ecx, [esp+184h+var_44]
call	sub_652E40
jmp	short loc_674599

loc_674594:
mov	[esp+180h+var_15D], 0

loc_674599:
mov	ecx, [esp+180h+var_16C]
test	ecx, ecx
jz	short loc_6745A6
call	sub_64B3B0

loc_6745A6:
mov	[esp+180h+var_16C], 0

loc_6745AE:		; char
push	0
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0
jmp	short loc_6745C8

loc_6745BB:
push	ecx
lea	ecx, [esp+184h+var_54]
call	sub_652520

loc_6745C8:
mov	eax, [ebx]
lea	ecx, [eax-10h]
cmp	eax, [ebx+4]
ja	short loc_6745D5
mov	ecx, [ebx+0Ch]

loc_6745D5:
push	esi
call	sub_653400
fst	[esp+180h+var_70]
sub	esp, 8
fstp	qword ptr [esp+188h+var_188]
call	sub_6519E0
test	al, al
jnz	short loc_674603
fld	[esp+180h+var_70]
call	__ftol2_sse
mov	[esp+180h+var_170], eax
jmp	short loc_67460B

loc_674603:
mov	[esp+180h+var_170], 0

loc_67460B:
cmp	[esp+180h+var_15D], 0
mov	[esp+180h+var_64], 0
jz	loc_6746C1
push	esi
lea	ecx, [esp+184h+var_44]
call	sub_652D70
mov	ecx, [esp+180h+var_164]
mov	edi, eax
push	esi
lea	eax, [esp+184h+var_34]
push	eax
call	sub_652DC0
cmp	dword ptr [eax], 0
mov	[esp+180h+var_154], eax
jz	short loc_67469B
mov	ecx, [ebx]
sub	ecx, [ebx+4]
mov	edx, [ebx+14h]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
add	eax, 0FFFFFFFEh
push	eax
mov	eax, [esp+184h+var_170]
push	eax
push	esi
push	edi
lea	ecx, [esp+190h+var_64]
push	ecx
lea	ecx, [esp+194h+var_28]
call	sub_64B7F0
mov	edi, eax
mov	eax, [esp+180h+var_154]
mov	ecx, [eax]
mov	eax, [eax+4]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
push	eax
push	edi
call	edx
mov	eax, [edi]
mov	edx, [eax]
push	0
mov	ecx, edi
call	edx
jmp	short loc_6746B6

loc_67469B:
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_6746B6
push	offset aErrorCallfunct ; "Error: CallFunction -	attempt	to call	i"...
push	esi
call	sub_66D290
add	esp, 8

loc_6746B6:		; void *
mov	ecx, [esp+180h+var_154]
push	0		; char
call	sub_66D180

loc_6746C1:
mov	eax, [esp+180h+var_170]
inc	eax
push	eax
mov	ecx, ebx
call	sub_64C1F0
lea	ecx, [esp+180h+var_64]
push	ecx
mov	ecx, [ebx]
call	sub_652520
lea	ecx, [esp+180h+var_44]
call	sub_652830
mov	ecx, [esp+180h+var_164]
call	sub_652830
lea	ecx, [esp+180h+var_64]
call	sub_652830

loc_6746FE:
cmp	byte ptr [esi+0B0h], 0Ah
jz	loc_675EB4
mov	eax, [esp+180h+var_12C]
lea	edx, [esp+180h+var_15C]
push	edx
push	eax
mov	ecx, esi
call	sub_66D1D0
mov	ecx, [ebp+arg_14]
mov	edx, [esp+180h+var_124]
mov	eax, [esp+180h+var_108]
push	ecx
push	edx
mov	edx, [esp+188h+var_130]
push	eax
mov	eax, [esp+18Ch+var_158]
lea	ecx, [esp+18Ch+var_15C]
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_676B90
mov	[esp+180h+var_130], eax
jmp	loc_675EB4

loc_674749:		; jumptable 006734A7 case 62
mov	ecx, [esp+180h+var_108]
test	ecx, ecx
jz	short loc_67475A
mov	eax, [esi+8]
push	eax
call	sub_652520

loc_67475A:
mov	ecx, [esi+8]
lea	edi, [esi+8]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	loc_6767A9
mov	ecx, edi
call	sub_64B660
jmp	loc_6767A9

loc_67477F:		; jumptable 006734A7 case 63
mov	ecx, [esi+8]
lea	edi, [esi+8]
push	esi
call	sub_653400
fstp	qword ptr [esp+180h+var_150]
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_67479C
mov	ecx, [edi+0Ch]

loc_67479C:
push	esi
call	sub_653400
fldz
fld	qword ptr [esp+180h+var_150]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_6747BA
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
jmp	short loc_6747C3

loc_6747BA:
fstp	st
fstp	st
call	sub_6794F0

loc_6747C3:
mov	ecx, [edi]
fstp	qword ptr [esp+180h+var_150]
lea	edx, [ecx-20h]
cmp	edx, [edi+4]
jnb	short loc_6747DC
push	2
mov	ecx, edi
call	sub_64C1F0
jmp	short loc_6747EE

loc_6747DC:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h

loc_6747EE:
add	dword ptr [edi], 10h
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_6747FF
mov	ecx, edi
call	sub_64B530

loc_6747FF:
mov	edi, [edi]
test	edi, edi
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
fld	qword ptr [esp+180h+var_150]
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674818:		; jumptable 006734A7 case 64
mov	ecx, [esi+8]
xor	ebx, ebx
push	ebx
push	0FFFFFFFFh
push	esi
lea	eax, [esp+18Ch+var_174]
lea	edi, [esi+8]
push	eax
call	sub_652F60
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_67483A
add	eax, 0FFFFFFF0h
jmp	short loc_67483D

loc_67483A:
mov	eax, [edi+0Ch]

loc_67483D:
push	esi
mov	ecx, eax
call	sub_653400
fst	[esp+180h+var_70]
sub	esp, 8
fstp	qword ptr [esp+188h+var_188]
call	sub_6519E0
test	al, al
jnz	short loc_67486D
fld	[esp+180h+var_70]
call	__ftol2_sse
mov	[esp+180h+var_170], eax
jmp	short loc_674871

loc_67486D:
mov	[esp+180h+var_170], ebx

loc_674871:
mov	ecx, [edi]
lea	edx, [ecx-20h]
cmp	edx, [edi+4]
jnb	short loc_674886
push	2
mov	ecx, edi
call	sub_64C1F0
jmp	short loc_674898

loc_674886:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h

loc_674898:
mov	ecx, [esp+180h+var_16C]
cmp	ecx, ebx
jz	short loc_6748A5
call	sub_64B3B0

loc_6748A5:
mov	eax, [esp+180h+var_124]
push	0
push	0
push	0
push	eax
lea	ecx, [esp+190h+var_54]
push	ecx
lea	edx, [esp+194h+var_174]
push	edx
mov	ecx, esi
mov	[esp+198h+var_54], bl
call	sub_6726F0
test	al, al
jz	short loc_674916
lea	ecx, [esp+180h+var_54]
call	sub_651A10
test	al, al
jz	short loc_674916
push	esi
lea	eax, [esp+184h+var_34]
push	eax
lea	ecx, [esp+188h+var_54]
call	sub_652DC0
mov	ecx, [esp+180h+var_170]
push	0FFFFFFFFh
push	ecx
mov	ebx, eax
push	ebx
mov	ecx, esi
call	sub_671350
push	0		; char
mov	ecx, ebx	; void *
mov	[esp+184h+var_16C], eax
call	sub_66D180
mov	ebx, [esp+180h+var_16C]

loc_674916:
mov	edx, [esp+180h+var_170]
push	edx
mov	ecx, edi
call	sub_64C1F0
add	dword ptr [edi], 10h
mov	eax, [edi]
test	ebx, ebx
jz	loc_6749BA
cmp	eax, [edi+8]
jb	short loc_67493B
mov	ecx, edi
call	sub_64B530

loc_67493B:
mov	edi, [edi]
test	edi, edi
jz	short loc_674949
push	ebx
mov	ecx, edi
call	sub_652700

loc_674949:
mov	ecx, ebx
call	sub_64B3B0

loc_674950:
lea	ecx, [esp+180h+var_54]
mov	[esp+180h+var_16C], 0
call	sub_652830
push	0		; char
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0

loc_67496F:
cmp	byte ptr [esi+0B0h], 0Ah
jz	loc_67679A
mov	edx, [esp+180h+var_12C]
lea	ecx, [esp+180h+var_15C]
push	ecx
push	edx
mov	ecx, esi
call	sub_66D1D0
mov	eax, [ebp+arg_14]
mov	ecx, [esp+180h+var_124]
mov	edx, [esp+180h+var_108]
push	eax
push	ecx
mov	ecx, [esp+188h+var_130]
push	edx
mov	edx, [esp+18Ch+var_158]
lea	eax, [esp+18Ch+var_15C]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_676B90
mov	[esp+180h+var_130], eax
jmp	loc_67679A

loc_6749BA:
mov	[esp+180h+var_44], 0
cmp	eax, [edi+8]
jb	short loc_6749CE
mov	ecx, edi
call	sub_64B530

loc_6749CE:
mov	edi, [edi]
test	edi, edi
jz	short loc_6749E3
lea	eax, [esp+180h+var_44]
push	eax
mov	ecx, edi
call	sub_652330

loc_6749E3:
push	0
lea	ecx, [esp+184h+var_44]
call	sub_64AA20
jmp	loc_674950

loc_6749F6:		; jumptable 006734A7 case 65
mov	ecx, [esi+8]
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
lea	edi, [esi+8]
push	edx
call	sub_652F60
test	byte ptr [esp+180h+var_110+2], 4
jnz	short loc_674A18
cmp	[ebp+arg_14], 1
jnz	short loc_674A24

loc_674A18:
lea	eax, [esp+180h+var_174]
push	eax
mov	ecx, esi
call	sub_671300

loc_674A24:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_674A3C
mov	ecx, edi
call	sub_64B660

loc_674A3C:		; void *
lea	ecx, [esp+180h+var_174]
push	0		; char
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674A4C:		; jumptable 006734A7 case 66
mov	ecx, [esi+8]
lea	edi, [esi+8]
push	esi
call	sub_653400
call	__ftol2_sse
mov	ecx, [edi]
mov	[esp+180h+var_170], eax
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_674A79
mov	ecx, edi
call	sub_64B660

loc_674A79:
mov	ecx, [edi]
sub	ecx, [edi+4]
mov	edx, [edi+14h]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
push	eax
mov	eax, [esp+184h+var_170]
push	eax
push	esi
push	0
lea	ecx, [esp+190h+var_54]
push	ecx
lea	ecx, [esp+194h+var_28]
mov	[esp+194h+var_54], 0
call	sub_64B7F0
mov	ebx, eax
push	ebx
call	sub_65F670
mov	edx, [ebx]
mov	eax, [edx]
add	esp, 4
push	0
mov	ecx, ebx
call	eax
cmp	[esp+180h+var_170], 0
jle	short loc_674AD8
mov	ecx, [esp+180h+var_170]
push	ecx
mov	ecx, edi
call	sub_64C1F0

loc_674AD8:
add	dword ptr [edi], 10h
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_674AE9
mov	ecx, edi
call	sub_64B530

loc_674AE9:
mov	edi, [edi]
test	edi, edi
jz	short loc_674AFE
lea	edx, [esp+180h+var_54]
push	edx
mov	ecx, edi
call	sub_652330

loc_674AFE:
push	0
lea	ecx, [esp+184h+var_54]
call	sub_64AA20
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674B11:		; jumptable 006734A7 case 67
mov	ecx, [esi+8]
lea	edi, [esi+8]
push	esi
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
mov	eax, [esi+78h]
mov	ecx, [eax+2ACh]
push	0FFFFFFFFh
push	0
add	eax, 0Ch
push	eax
push	ecx
mov	ecx, esi
call	sub_671840
mov	ecx, [esp+180h+var_16C]
mov	[esp+180h+var_170], eax
test	ecx, ecx
jz	short loc_674B4E
call	sub_64B3B0

loc_674B4E:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_674B66
mov	ecx, edi
call	sub_64B660

loc_674B66:
cmp	[esp+180h+var_170], 0
jz	loc_674C2C
test	ebx, ebx
jle	loc_674C2C
lea	esp, [esp+0]

loc_674B80:
mov	eax, [edi]
sub	eax, [edi+4]
mov	ecx, [edi+14h]
sar	eax, 4
shl	ecx, 5
lea	edx, [eax+ecx-20h]
cmp	edx, 1
jl	loc_674C23
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_674BA7
add	eax, 0FFFFFFF0h
jmp	short loc_674BAA

loc_674BA7:
mov	eax, [edi+0Ch]

loc_674BAA:
cmp	byte ptr [eax],	5
jnz	short loc_674BFC
mov	ecx, [edi]
cmp	ecx, [edi+4]
jbe	short loc_674BBB
add	ecx, 0FFFFFFF0h
jmp	short loc_674BBE

loc_674BBB:
mov	ecx, [edi+0Ch]

loc_674BBE:
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+18Ch+var_174]
push	eax
call	sub_652F60
mov	ecx, [esp+180h+var_170]
lea	eax, [esp+180h+var_101]
push	eax
mov	eax, [edi]
push	eax
add	ecx, 10h
lea	eax, [esp+188h+var_174]
mov	[esp+188h+var_101], 0
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	eax
push	esi
call	edx
push	0		; char
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0

loc_674BFC:
mov	ecx, [edi]
lea	eax, [ecx-20h]
cmp	eax, [edi+4]
jnb	short loc_674C11
push	2
mov	ecx, edi
call	sub_64C1F0
jmp	short loc_674C23

loc_674C11:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h

loc_674C23:
sub	ebx, 1
jnz	loc_674B80

loc_674C2C:
add	dword ptr [edi], 10h
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_674C3D
mov	ecx, edi
call	sub_64B530

loc_674C3D:
mov	edi, [edi]
mov	ebx, [esp+180h+var_170]
test	edi, edi
jz	short loc_674C4F
push	ebx
mov	ecx, edi
call	sub_652700

loc_674C4F:
test	ebx, ebx
jz	short loc_674C5A
mov	ecx, ebx
call	sub_64B3B0

loc_674C5A:
mov	[esp+180h+var_16C], 0
jmp	loc_67496F

loc_674C67:		; jumptable 006734A7 case 68
mov	ecx, [esi+8]
movzx	eax, byte ptr [ecx]
mov	edi, 33h
cmp	eax, 0Ah	; switch 11 cases
ja	short loc_674CC4 ; default
			; jumptable 00674C77 cases 3,4,9
jmp	ds:off_676AF0[eax*4] ; switch jump

loc_674C7E:		; jumptable 00674C77 case 5
mov	edi, 37h
jmp	short loc_674CD2 ; jumptable 00674C77 cases 0,10

loc_674C85:		; jumptable 00674C77 case 2
mov	edi, 39h
jmp	short loc_674CD2 ; jumptable 00674C77 cases 0,10

loc_674C8C:		; jumptable 00674C77 case 7
push	esi
call	sub_651BB0
test	eax, eax
jz	short loc_674CAF
mov	edx, [eax+78h]
add	eax, 78h
mov	ecx, eax
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jz	short loc_674CAF

loc_674CA8:		; jumptable 00674C77 case 6
mov	edi, 3Bh
jmp	short loc_674CD2 ; jumptable 00674C77 cases 0,10

loc_674CAF:
mov	edi, 3Ah
jmp	short loc_674CD2 ; jumptable 00674C77 cases 0,10

loc_674CB6:		; jumptable 00674C77 case 1
mov	edi, 34h
jmp	short loc_674CD2 ; jumptable 00674C77 cases 0,10

loc_674CBD:		; jumptable 00674C77 case 8
mov	edi, 3Ch
jmp	short loc_674CD2 ; jumptable 00674C77 cases 0,10

loc_674CC4:		; default
call	sub_651A50	; jumptable 00674C77 cases 3,4,9
test	al, al
jz	short loc_674CD2 ; jumptable 00674C77 cases 0,10
mov	edi, 38h

loc_674CD2:		; jumptable 00674C77 cases 0,10
mov	ecx, [esi+78h]
lea	edx, [ecx+edi*4+8]
mov	ecx, [esi+8]
push	edx
call	sub_64A680
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674CE7:		; jumptable 006734A7 case 69
mov	ecx, [esi+8]
push	esi
call	sub_651BB0
test	eax, eax
jz	short loc_674D29
mov	ecx, [eax+94h]
test	ecx, ecx
jnz	short loc_674D16
mov	ecx, eax
call	sub_658B70
mov	ecx, [esi+8]
add	eax, 0Ch
push	eax
call	sub_64A680
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674D16:
mov	eax, ecx
mov	ecx, [esi+8]
add	eax, 0Ch
push	eax
call	sub_64A680
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674D29:
mov	ecx, [esi+8]
call	sub_4E4620
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674D36:		; jumptable 006734A7 cases 70,85
push	ecx
lea	ecx, [esp+184h+var_144]
call	sub_673130
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674D45:		; jumptable 006734A7 case 71
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_674D58
mov	ecx, [edi+0Ch]

loc_674D58:
push	edx
push	esi
call	sub_653DD0
jmp	loc_6766CF

loc_674D64:		; jumptable 006734A7 case 73
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_674D90
mov	ecx, [edi+0Ch]
mov	ebx, ecx

loc_674D79:
push	edx

loc_674D7A:
push	esi
call	sub_6540A0
movzx	eax, al
push	eax
mov	ecx, ebx
call	sub_64A6C0
jmp	loc_6766CF

loc_674D90:
lea	ebx, [eax-10h]
jmp	short loc_674D79

loc_674D95:		; jumptable 006734A7 case 74
mov	ecx, [esi+8]
push	esi
call	sub_653850
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674DA3:		; jumptable 006734A7 case 75
movzx	ecx, byte ptr [esp+180h+var_110]
push	ecx
mov	ecx, [esi+8]
push	esi
call	sub_653890
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674DB7:		; jumptable 006734A7 case 76
mov	ebx, [esi+8]
add	dword ptr [esi+8], 10h
mov	eax, [esi+8]
cmp	eax, [esi+10h]
lea	edi, [esi+8]
jb	short loc_674DD0
mov	ecx, edi
call	sub_64B530

loc_674DD0:
mov	edi, [edi]
test	edi, edi
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
push	ebx
mov	ecx, edi
call	sub_652330
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674DE7:		; jumptable 006734A7 case 77
mov	eax, [esi+8]
cmp	eax, [esi+0Ch]
jbe	short loc_674DF4
add	eax, 0FFFFFFF0h
jmp	short loc_674DF7

loc_674DF4:
mov	eax, [esi+14h]

loc_674DF7:
push	eax
lea	ecx, [esp+184h+var_54]
call	sub_652330
mov	edi, eax
mov	eax, [esi+8]
mov	ecx, eax
cmp	ecx, [esi+0Ch]
jbe	short loc_674E15
add	ecx, 0FFFFFFF0h
jmp	short loc_674E18

loc_674E15:
mov	ecx, [esi+14h]

loc_674E18:
push	eax
call	sub_652520
mov	ecx, [esi+8]
push	edi
call	sub_652520
push	0
mov	ecx, edi
call	sub_64AA20
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_674E35:		; jumptable 006734A7 case 78
mov	edi, [esi+8]
cmp	edi, [esi+0Ch]
jbe	short loc_674E42
add	edi, 0FFFFFFF0h
jmp	short loc_674E45

loc_674E42:
mov	edi, [esi+14h]

loc_674E45:
mov	ebx, [esi+8]
push	esi
mov	ecx, edi
mov	[esp+184h+var_170], ebx
call	sub_652D70
mov	[esp+180h+var_164], eax
test	eax, eax
jnz	loc_674EEA
push	1
lea	edx, [esp+184h+var_54]
push	edx
mov	ecx, esi
call	sub_66D6E0
push	esi
mov	ecx, eax
mov	[esp+184h+var_168], eax
call	sub_652C20
test	eax, eax
jz	short loc_674ED3
add	eax, 10h
mov	[esp+180h+var_164], eax
jz	short loc_674ED3
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+18Ch+var_174]
push	eax
mov	ecx, ebx
call	sub_652F60
mov	edx, [esp+180h+var_164]
push	edi
lea	ecx, [esp+184h+var_174]
push	ecx
push	edx
mov	ecx, esi
call	sub_66E3F0
test	al, al
jnz	short loc_674EB8
mov	ecx, edi
call	sub_4E4620

loc_674EB8:		; char
push	0
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0
mov	ecx, [esp+180h+var_168]
push	0
call	sub_64AA20
jmp	loc_675022

loc_674ED3:
mov	ecx, edi
call	sub_4E4620
mov	ecx, [esp+180h+var_168]
push	0
call	sub_64AA20
jmp	loc_675022

loc_674EEA:
mov	ecx, ebx
call	sub_651A50
test	al, al
jz	loc_674F9D
mov	ecx, [esp+180h+var_164]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 7
jnz	loc_674F9D
mov	ebx, [esp+180h+var_164]
add	ebx, 0FFFFFFF0h
jz	short loc_674F22
mov	eax, [ebx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebx+8], eax

loc_674F22:
cmp	[esp+180h+var_16C], 0
jz	short loc_674F32
mov	ecx, [esp+180h+var_16C]
call	sub_64B3B0

loc_674F32:
mov	ecx, [esp+180h+var_170]
push	esi
call	sub_653400
call	__ftol2_sse
test	eax, eax
jge	short loc_674F7B
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18Ch+var_174]
push	ecx
mov	ecx, [esp+190h+var_170]
call	sub_652F60
push	edi
lea	edx, [esp+184h+var_174]
push	edx
push	esi
lea	ecx, [ebx+10h]
call	sub_6E2610
test	al, al
jnz	loc_675004
mov	ecx, edi
call	sub_4E4620
jmp	loc_675004

loc_674F7B:
cmp	eax, [ebx+3Ch]
jge	short loc_674F94
mov	ecx, [ebx+38h]
mov	eax, [ecx+eax*4]
mov	ecx, edi
test	eax, eax
jz	short loc_674F96
push	eax
call	sub_652520
jmp	short loc_67500F

loc_674F94:
mov	ecx, edi

loc_674F96:
call	sub_4E4620
jmp	short loc_67500F

loc_674F9D:
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
push	edx
mov	ecx, ebx
call	sub_652F60
cmp	byte ptr [edi],	6
jz	short loc_674FBE
mov	ecx, edi
call	sub_651A10
test	al, al
jz	short loc_674FE7

loc_674FBE:
push	esi
mov	ecx, edi
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	short loc_674FD8
mov	eax, [ebx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebx+8], eax

loc_674FD8:
mov	ecx, [esp+180h+var_16C]
test	ecx, ecx
jz	short loc_674FEB
call	sub_64B3B0
jmp	short loc_674FEB

loc_674FE7:
mov	ebx, [esp+180h+var_16C]

loc_674FEB:
mov	ecx, edi
call	sub_4E4620
mov	edx, [esp+180h+var_164]
push	edi
lea	ecx, [esp+184h+var_174]
push	ecx
push	edx
mov	ecx, esi
call	sub_66E3F0

loc_675004:		; char
push	0
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0

loc_67500F:
test	ebx, ebx
jz	short loc_67501A
mov	ecx, ebx
call	sub_64B3B0

loc_67501A:
mov	[esp+180h+var_16C], 0

loc_675022:
mov	ecx, [esi+8]
lea	edi, [esi+8]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_67503E
mov	ecx, edi
call	sub_64B660

loc_67503E:
cmp	byte ptr [esi+0B0h], 0Ah
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	ecx, [esp+180h+var_12C]
lea	eax, [esp+180h+var_15C]
push	eax
push	ecx
mov	ecx, esi
call	sub_66D1D0
jmp	loc_673ED7

loc_675061:		; jumptable 006734A7 case 79
lea	edi, [esi+8]
push	2
mov	ecx, edi
call	sub_668FA0
push	esi
mov	ecx, eax
call	sub_652D70
mov	ebx, eax
test	ebx, ebx
jz	loc_675154
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_67508F
add	eax, 0FFFFFFF0h
mov	[esp+180h+var_164], eax
jmp	short loc_675096

loc_67508F:
mov	edx, [edi+0Ch]
mov	[esp+180h+var_164], edx

loc_675096:
mov	ecx, [esp+180h+var_164]
call	sub_651A50
test	al, al
jz	short loc_675114
mov	eax, [ebx]
mov	edx, [eax+8]
mov	ecx, ebx
call	edx
cmp	eax, 7
jnz	short loc_675114
mov	ecx, [esp+180h+var_164]
push	esi
add	ebx, 0FFFFFFF0h
call	sub_653400
call	__ftol2_sse
test	eax, eax
jl	short loc_6750DE
mov	ecx, [edi]
push	ecx
push	eax
mov	ecx, ebx
call	sub_65EA00
mov	ecx, edi
call	sub_66E590
jmp	loc_67503E

loc_6750DE:
mov	ecx, [esp+180h+var_164]
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
push	edx
call	sub_652F60
mov	ecx, [edi]
lea	eax, [esp+180h+var_FC+3]
push	eax
push	ecx
lea	edx, [esp+188h+var_174]
push	edx
push	esi
lea	ecx, [ebx+10h]
mov	byte ptr [esp+190h+var_FC+3], 0
call	sub_665190
jmp	short loc_675149

loc_675114:
mov	ecx, [esp+180h+var_164]
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+18Ch+var_174]
push	eax
call	sub_652F60
mov	ecx, [edi]
lea	eax, [esp+180h+var_FC+2]
push	eax
push	ecx
lea	eax, [esp+188h+var_174]
mov	byte ptr [esp+188h+var_FC+2], 0
mov	edx, [ebx]
mov	edx, [edx+0Ch]
push	eax
push	esi
mov	ecx, ebx
call	edx

loc_675149:		; char
push	0
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0

loc_675154:
mov	ecx, edi
call	sub_66E590
jmp	loc_67503E

loc_675160:		; jumptable 006734A7 case 80
mov	ecx, [esi+8]
push	1
push	esi
call	sub_653F50
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675170:		; jumptable 006734A7 case 81
mov	ecx, [esi+8]
push	1
push	esi
call	sub_667520
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675180:		; jumptable 006734A7 case 82
lea	edi, [esi+8]
push	2
mov	ecx, edi
call	sub_668FA0
push	esi
mov	ecx, eax
call	sub_653400
fst	[esp+180h+var_70]
sub	esp, 8
fstp	qword ptr [esp+188h+var_188]
call	sub_6519E0
test	al, al
jnz	short loc_6751BC
fld	[esp+180h+var_70]
call	__ftol2_sse
mov	[esp+180h+var_164], eax
jmp	short loc_6751C4

loc_6751BC:
mov	[esp+180h+var_164], 0

loc_6751C4:
mov	ecx, [edi]
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+18Ch+var_174]
push	edx
mov	[esp+190h+var_54], 0
call	sub_652F60
mov	eax, [edi]
mov	[esp+180h+var_154], 0
cmp	eax, [edi+4]
jbe	short loc_6751F1
add	eax, 0FFFFFFF0h
jmp	short loc_6751F4

loc_6751F1:
mov	eax, [edi+0Ch]

loc_6751F4:
push	eax
push	esi
lea	ecx, [esp+188h+var_A0]
call	sub_652B70
mov	ecx, [edi]
call	sub_651A30
test	al, al
jnz	loc_675604
mov	eax, [esp+180h+var_174]
cmp	dword ptr [eax+10h], 0
jz	loc_675604
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_67522C
mov	ecx, [edi+0Ch]

loc_67522C:
call	sub_651A10
test	al, al
jnz	loc_6753D7
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675246
mov	ecx, [edi+0Ch]

loc_675246:
push	esi
call	sub_652D70
mov	ebx, eax
mov	[esp+180h+var_154], ebx
test	ebx, ebx
jz	loc_6753D7
mov	[esp+180h+var_44], 0
mov	edx, [ebx]
mov	eax, [edx+3Ch]
mov	ecx, ebx
call	eax
test	al, al
jz	loc_6752FE
lea	eax, [ebx-10h]
mov	[esp+180h+var_170], eax
test	eax, eax
jz	short loc_67528B
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_67528B:
mov	edx, [esp+180h+var_170]
mov	ecx, [edx+34h]
lea	eax, [esp+180h+var_174]
push	eax
lea	eax, [esi+78h]
push	eax
add	ecx, 10h
call	sub_661FB0
mov	ebx, eax
test	ebx, ebx
jz	short loc_6752B6
mov	ecx, [ebx+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebx+8], ecx

loc_6752B6:
cmp	[esp+180h+var_16C], 0
jz	short loc_6752C6
mov	ecx, [esp+180h+var_16C]
call	sub_64B3B0

loc_6752C6:
mov	[esp+180h+var_16C], ebx
test	ebx, ebx
jz	short loc_6752E9
mov	ecx, [esp+180h+var_170]
push	ebx
call	sub_66B1D0
mov	ecx, ebx
call	sub_64B3B0
mov	[esp+180h+var_16C], 0
jmp	short loc_6752F1

loc_6752E9:
mov	[esp+180h+var_154], 0

loc_6752F1:
mov	ecx, [esp+180h+var_170]
call	sub_64B3B0
mov	ebx, [esp+180h+var_154]

loc_6752FE:
test	ebx, ebx
jz	loc_6753C4
lea	edx, [esp+180h+var_44]
push	edx
lea	eax, [esp+184h+var_174]
push	eax
push	ebx
mov	ecx, esi
call	sub_66E3F0
test	al, al
jz	loc_6753C4
lea	ecx, [esp+180h+var_44]
call	sub_651A10
test	al, al
jz	loc_6753C4
push	esi
lea	ecx, [esp+184h+var_34]
push	ecx
lea	ecx, [esp+188h+var_44]
call	sub_652DC0
cmp	dword ptr [eax], 0
mov	[esp+180h+var_170], eax
jz	short loc_6753BB
mov	edx, [edi]
sub	edx, [edi+4]
mov	eax, [edi+14h]
mov	ecx, [esp+180h+var_164]
shl	eax, 5
sar	edx, 4
lea	eax, [edx+eax-20h]
mov	edx, [esp+180h+var_154]
add	eax, 0FFFFFFFDh
push	eax
push	ecx
push	esi
push	edx
lea	eax, [esp+190h+var_54]
push	eax
lea	ecx, [esp+194h+var_28]
call	sub_64B7F0
mov	ebx, eax
mov	eax, [esp+180h+var_170]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+28h]
mov	[esp+180h+var_168], ecx
mov	ecx, [esp+180h+var_174]
mov	ecx, [ecx]
push	ecx
mov	ecx, [esp+184h+var_168]
push	eax
push	ebx
call	edx
mov	eax, [ebx]
mov	edx, [eax]
push	0
mov	ecx, ebx
call	edx
mov	eax, [esp+180h+var_170]

loc_6753BB:		; char
push	0
mov	ecx, eax	; void *
call	sub_66D180

loc_6753C4:
push	0
lea	ecx, [esp+184h+var_44]
call	sub_64AA20
jmp	loc_6757B5

loc_6753D7:
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6753E4
mov	ecx, [edi+0Ch]

loc_6753E4:
call	sub_651A10
test	al, al
jz	loc_6754EF
mov	eax, [edi]
lea	ebx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_6753FE
mov	ebx, [edi+0Ch]

loc_6753FE:
push	esi
mov	ecx, ebx
call	sub_652C20
test	eax, eax
jz	loc_6754E2
add	eax, 10h
mov	[esp+180h+var_154], eax
test	eax, eax
jz	loc_6757B5
mov	edx, [esp+180h+var_154]
lea	eax, [esp+180h+var_44]
push	eax
lea	ecx, [esp+184h+var_174]
push	ecx
push	edx
mov	ecx, esi
mov	[esp+18Ch+var_44], 0
call	sub_66E3F0
test	al, al
jz	loc_6754CF
push	esi
lea	eax, [esp+184h+var_34]
push	eax
lea	ecx, [esp+188h+var_44]
call	sub_652DC0
cmp	dword ptr [eax], 0
mov	[esp+180h+var_170], eax
jz	short loc_6754C6
mov	ecx, [edi]
sub	ecx, [edi+4]
mov	edx, [edi+14h]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
add	eax, 0FFFFFFFDh
push	eax
mov	eax, [esp+184h+var_164]
push	eax
push	esi
push	ebx
lea	ecx, [esp+190h+var_54]
push	ecx
lea	ecx, [esp+194h+var_28]
call	sub_657730
mov	ebx, eax
mov	eax, [esp+180h+var_170]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+28h]
mov	[esp+180h+var_168], ecx
mov	ecx, [esp+180h+var_174]
mov	ecx, [ecx]
push	ecx
mov	ecx, [esp+184h+var_168]
push	eax
push	ebx
call	edx
mov	eax, [ebx]
mov	edx, [eax]
push	0
mov	ecx, ebx
call	edx
mov	eax, [esp+180h+var_170]

loc_6754C6:		; char
push	0
mov	ecx, eax	; void *
call	sub_66D180

loc_6754CF:
push	0
lea	ecx, [esp+184h+var_44]
call	sub_64AA20
jmp	loc_6757B5

loc_6754E2:
mov	[esp+180h+var_154], 0
jmp	loc_6757B5

loc_6754EF:
push	1
lea	eax, [esp+184h+var_44]
push	eax
mov	ecx, esi
call	sub_66D6E0
cmp	byte ptr [eax],	6
mov	[esp+180h+var_150], eax
jnz	loc_6755F6
push	esi
mov	ecx, eax
call	sub_652C20
test	eax, eax
jz	short loc_67551E
lea	ebx, [eax+10h]
jmp	short loc_675520

loc_67551E:
xor	ebx, ebx

loc_675520:
lea	ecx, [esp+180h+var_64]
push	ecx
lea	edx, [esp+184h+var_174]
push	edx
push	ebx
mov	ecx, esi
mov	[esp+18Ch+var_64], 0
call	sub_66E3F0
test	al, al
jz	loc_6755DC
cmp	[esp+180h+var_64], 8
jnz	loc_6755DC
push	esi
lea	eax, [esp+184h+var_34]
push	eax
lea	ecx, [esp+188h+var_64]
call	sub_652DC0
cmp	dword ptr [eax], 0
mov	[esp+180h+var_170], eax
jz	short loc_6755D3
mov	ecx, [edi]
sub	ecx, [edi+4]
mov	edx, [edi+14h]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
add	eax, 0FFFFFFFDh
push	eax
mov	eax, [esp+184h+var_164]
push	eax
push	esi
push	ebx
lea	ecx, [esp+190h+var_54]
push	ecx
lea	ecx, [esp+194h+var_28]
call	sub_64B7F0
mov	ebx, eax
mov	eax, [esp+180h+var_170]
mov	ecx, [eax]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+28h]
mov	[esp+180h+var_168], ecx
mov	ecx, [esp+180h+var_174]
mov	ecx, [ecx]
push	ecx
mov	ecx, [esp+184h+var_168]
push	eax
push	ebx
call	edx
mov	eax, [ebx]
mov	edx, [eax]
push	0
mov	ecx, ebx
call	edx
mov	eax, [esp+180h+var_170]

loc_6755D3:		; char
push	0
mov	ecx, eax	; void *
call	sub_66D180

loc_6755DC:
push	0
lea	ecx, [esp+184h+var_64]
call	sub_64AA20
mov	eax, [esp+180h+var_150]
mov	[esp+180h+var_154], 0

loc_6755F6:
push	0
mov	ecx, eax
call	sub_64AA20
jmp	loc_6757B5

loc_675604:
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_675610
add	eax, 0FFFFFFF0h
jmp	short loc_675613

loc_675610:
mov	eax, [edi+0Ch]

loc_675613:
push	eax
lea	ecx, [esp+184h+var_44]
call	sub_652330
mov	ecx, [esp+180h+var_16C]
mov	ebx, eax
mov	[esp+180h+var_170], ebx
test	ecx, ecx
jz	short loc_675633
call	sub_64B3B0

loc_675633:
mov	[esp+180h+var_64], 0
cmp	byte ptr [ebx],	6
mov	[esp+180h+var_16C], 0
jnz	loc_6756D0
mov	ecx, [esp+180h+var_170]
push	esi
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	short loc_675668
mov	eax, [ebx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebx+8], eax

loc_675668:
mov	[esp+180h+var_16C], ebx
test	ebx, ebx
jz	short loc_6756D0
mov	edx, [ebx+10h]
mov	eax, [edx+3Ch]
lea	ecx, [ebx+10h]
call	eax
test	al, al
jz	short loc_6756D0
mov	ecx, [esp+180h+var_170]
push	0
call	sub_64AA20
mov	edx, [ebx+10h]
mov	edx, [edx+38h]
lea	eax, [esi+78h]
lea	ecx, [ebx+10h]
push	eax
lea	eax, [esp+184h+var_34]
push	eax
call	edx
push	eax
lea	ecx, [esp+184h+var_44]
mov	[esp+184h+var_150], eax
call	sub_651E70
mov	ecx, [esp+180h+var_150]	; void *
push	0		; char
mov	[esp+184h+var_170], eax
call	sub_66D180
push	ebx
lea	ecx, [esp+184h+var_64]
call	sub_652E40
jmp	short loc_6756F4

loc_6756D0:
mov	eax, [esp+180h+var_124]
mov	edx, [esi+78h]
push	0
push	0
push	0
push	eax
lea	ecx, [esp+190h+var_64]
push	ecx
add	edx, 0FCh
push	edx
mov	ecx, esi
call	sub_6726F0

loc_6756F4:
mov	ebx, [esp+180h+var_170]
mov	ecx, ebx
call	sub_651A10
test	al, al
jz	loc_675789
push	esi
lea	eax, [esp+184h+var_34]
push	eax
mov	ecx, ebx
call	sub_652DC0
cmp	dword ptr [eax], 0
mov	[esp+180h+var_168], eax
jz	short loc_67577C
mov	ecx, [edi]
sub	ecx, [edi+4]
mov	edx, [edi+14h]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
add	eax, 0FFFFFFFDh
push	eax
mov	eax, [esp+184h+var_164]
push	eax
push	esi
lea	ecx, [esp+18Ch+var_64]
push	ecx
lea	edx, [esp+190h+var_54]
push	edx
lea	ecx, [esp+194h+var_28]
call	sub_657730
mov	ebx, eax
mov	eax, [esp+180h+var_168]
mov	ecx, [eax]
mov	eax, [eax+4]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
push	eax
push	ebx
call	edx
mov	eax, [ebx]
mov	edx, [eax]
push	0
mov	ecx, ebx
call	edx
mov	eax, [esp+180h+var_168]

loc_67577C:		; char
push	0
mov	ecx, eax	; void *
call	sub_66D180
mov	ebx, [esp+180h+var_170]

loc_675789:
push	0
lea	ecx, [esp+184h+var_64]
call	sub_64AA20
push	0
mov	ecx, ebx
call	sub_64AA20
mov	ecx, [esp+180h+var_16C]
test	ecx, ecx
jz	short loc_6757AD
call	sub_64B3B0

loc_6757AD:
mov	[esp+180h+var_16C], 0

loc_6757B5:
mov	eax, [esp+180h+var_164]
add	eax, 2
push	eax
mov	ecx, edi
call	sub_64C1F0
lea	ecx, [esp+180h+var_54]
push	ecx
mov	ecx, [edi]
call	sub_652520
cmp	byte ptr [esi+0B0h], 0Ah
jz	short loc_675815
mov	eax, [esp+180h+var_12C]
lea	edx, [esp+180h+var_15C]
push	edx
push	eax
mov	ecx, esi
call	sub_66D1D0
mov	ecx, [ebp+arg_14]
mov	edx, [esp+180h+var_124]
mov	eax, [esp+180h+var_108]
push	ecx
push	edx
mov	edx, [esp+188h+var_130]
push	eax
mov	eax, [esp+18Ch+var_158]
lea	ecx, [esp+18Ch+var_15C]
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_676B90
mov	[esp+180h+var_130], eax

loc_675815:
mov	ecx, [esp+180h+var_154]
test	ecx, ecx
jz	short loc_675848
call	sub_661C10
test	eax, eax
jz	short loc_675831
mov	cl, [eax+76h]
shr	cl, 4
test	cl, 1
jnz	short loc_675848

loc_675831:
mov	edx, [ebp+arg_14]
push	edx
mov	ecx, esi
call	sub_668EA0
test	al, al
jz	short loc_675848
mov	eax, [esp+180h+var_134]
mov	[esp+180h+var_130], eax

loc_675848:
push	0
lea	ecx, [esp+184h+var_54]
call	sub_64AA20
push	0		; char
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0
lea	ecx, [esp+180h+var_A0]
call	sub_652BD0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675872:		; jumptable 006734A7 case 83
mov	eax, [esi+8]
lea	edi, [esi+8]
push	eax
lea	ecx, [esp+184h+var_54]
call	sub_652330
mov	ebx, eax
mov	eax, [edi]
mov	[esp+180h+var_168], ebx
cmp	eax, [edi+4]
jbe	short loc_675897
add	eax, 0FFFFFFF0h
jmp	short loc_67589A

loc_675897:
mov	eax, [edi+0Ch]

loc_67589A:
push	eax
lea	ecx, [esp+184h+var_44]
call	sub_652330
push	2
mov	ecx, edi
mov	[esp+184h+var_154], eax
call	sub_668FA0
push	esi
mov	ecx, eax
call	sub_653400
fst	[esp+180h+var_70]
sub	esp, 8
fstp	qword ptr [esp+188h+var_188]
call	sub_6519E0
test	al, al
jnz	short loc_6758E4
fld	[esp+180h+var_70]
call	__ftol2_sse
mov	[esp+180h+var_164], eax
jmp	short loc_6758EC

loc_6758E4:
mov	[esp+180h+var_164], 0

loc_6758EC:
mov	ecx, edi
call	sub_66E590
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18Ch+var_174]
push	ecx
mov	ecx, ebx
call	sub_652F60
mov	ecx, ebx
call	sub_651A30
test	al, al
jnz	short loc_675956
cmp	byte ptr [ebx],	5
jnz	short loc_67591E
mov	edx, [esp+180h+var_174]
cmp	dword ptr [edx+10h], 0
jz	short loc_675956

loc_67591E:
mov	ecx, [esp+180h+var_154]
lea	eax, [esp+180h+var_64]
push	esi
mov	[esp+184h+var_64], 0
mov	[esp+184h+var_170], eax
call	sub_652D70
test	eax, eax
jz	short loc_675984
lea	ecx, [esp+180h+var_64]
push	ecx
lea	edx, [esp+184h+var_174]
push	edx
push	eax
mov	ecx, esi
call	sub_66E3F0
jmp	short loc_675984

loc_675956:
mov	ecx, [esp+180h+var_154]
push	esi
lea	eax, [esp+184h+var_34]
push	eax
call	sub_652DC0
mov	ebx, eax
push	ebx
lea	ecx, [esp+184h+var_64]
call	sub_651E70
push	0		; char
mov	ecx, ebx	; void *
mov	[esp+184h+var_170], eax
call	sub_66D180

loc_675984:
mov	ecx, [esp+180h+var_170]
call	sub_651A10
test	al, al
jz	short loc_6759DF
push	esi
lea	ecx, [esp+184h+var_34]
push	ecx
mov	ecx, [esp+188h+var_170]
call	sub_652DC0
mov	edx, [esp+180h+var_164]
push	0FFFFFFFFh
mov	ebx, eax
push	edx
push	ebx
mov	ecx, esi
call	sub_671350
cmp	[esp+180h+var_16C], 0
mov	[esp+180h+var_150], eax
jz	short loc_6759C8
mov	ecx, [esp+180h+var_16C]
call	sub_64B3B0

loc_6759C8:
mov	eax, [esp+180h+var_150]
push	0		; char
mov	ecx, ebx	; void *
mov	[esp+184h+var_16C], eax
call	sub_66D180
mov	ebx, [esp+180h+var_16C]
jmp	short loc_6759EE

loc_6759DF:
mov	ecx, [esp+180h+var_16C]
test	ecx, ecx
jz	short loc_6759EC
call	sub_64B3B0

loc_6759EC:
xor	ebx, ebx

loc_6759EE:
mov	ecx, [esp+180h+var_164]
push	ecx
mov	ecx, edi
call	sub_64C1F0
add	dword ptr [edi], 10h
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_675A0B
mov	ecx, edi
call	sub_64B530

loc_675A0B:
mov	edi, [edi]
test	edi, edi
jz	short loc_675A19
push	ebx
mov	ecx, edi
call	sub_652700

loc_675A19:
test	ebx, ebx
jz	short loc_675A24
mov	ecx, ebx
call	sub_64B3B0

loc_675A24:
mov	ecx, [esp+180h+var_168]
push	0
mov	[esp+184h+var_16C], 0
call	sub_64AA20
mov	ecx, [esp+180h+var_154]
push	0
call	sub_64AA20
mov	ecx, [esp+180h+var_170]
push	0
call	sub_64AA20
push	0		; char
lea	ecx, [esp+184h+var_174]	; void *
call	sub_65D7F0
jmp	loc_6746FE

loc_675A5D:		; jumptable 006734A7 case 84
lea	ecx, [esp+180h+var_144]
call	sub_66F0A0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675A6B:		; jumptable 006734A7 case 96
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675A7E
mov	ecx, [edi+0Ch]

loc_675A7E:
push	edx
push	esi
call	sub_667600
jmp	loc_6766CF

loc_675A8A:		; jumptable 006734A7 case 97
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675A9D
mov	ecx, [edi+0Ch]

loc_675A9D:
push	edx
push	esi
call	sub_667640
jmp	loc_6766CF

loc_675AA9:		; jumptable 006734A7 case 98
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675ABC
mov	ecx, [edi+0Ch]

loc_675ABC:
push	edx
push	esi
call	sub_667680
jmp	loc_6766CF

loc_675AC8:		; jumptable 006734A7 case 99
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675ADB
mov	ecx, [edi+0Ch]

loc_675ADB:
push	edx
push	esi
call	sub_6676C0
jmp	loc_6766CF

loc_675AE7:		; jumptable 006734A7 case 100
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675AFA
mov	ecx, [edi+0Ch]

loc_675AFA:
push	edx
push	esi
call	sub_667700
jmp	loc_6766CF

loc_675B06:		; jumptable 006734A7 case 101
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675B19
mov	ecx, [edi+0Ch]

loc_675B19:
push	edx
push	esi
call	sub_667740
jmp	loc_6766CF

loc_675B25:		; jumptable 006734A7 case 102
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675B38
mov	ecx, [edi+0Ch]

loc_675B38:
push	edx
call	sub_6674F0
test	al, al
mov	eax, [edi]
lea	ecx, [eax-10h]
jnz	short loc_675B5B
cmp	eax, [edi+4]
ja	short loc_675B4F
mov	ecx, [edi+0Ch]

loc_675B4F:
push	0
call	sub_64A6C0
jmp	loc_6766CF

loc_675B5B:
cmp	eax, [edi+4]
ja	short loc_675B6B
mov	ecx, [edi+0Ch]
mov	ebx, ecx
push	eax
jmp	loc_674D7A

loc_675B6B:
lea	ebx, [eax-10h]
push	eax
jmp	loc_674D7A

loc_675B74:		; jumptable 006734A7 case 103
mov	edx, [esi+8]
lea	edi, [esi+8]
mov	eax, edx
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675B87
mov	ecx, [edi+0Ch]

loc_675B87:
push	1
push	edx
push	esi
lea	edx, [esp+18Ch+var_54]
push	edx
call	sub_654580
mov	ebx, eax
mov	eax, [edi]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675BA7
mov	ecx, [edi+0Ch]

loc_675BA7:
push	ebx
call	sub_652520
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_675BC5
mov	ecx, edi
call	sub_64B660

loc_675BC5:
push	0
mov	ecx, ebx
call	sub_64AA20
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675BD3:		; jumptable 006734A7 case 104
mov	eax, [esi+8]
lea	edi, [esi+8]
lea	ecx, [eax-10h]
cmp	eax, [edi+4]
ja	short loc_675BE4
mov	ecx, [edi+0Ch]

loc_675BE4:
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_174]
push	edx
call	sub_6533A0
mov	ecx, [edi]
mov	ebx, eax
movzx	eax, byte ptr [esp+180h+var_110]
push	eax
push	esi
lea	edx, [esp+188h+var_10C]
push	edx
call	sub_6533A0
mov	[esp+180h+var_170], eax
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_675C1A
add	eax, 0FFFFFFF0h
jmp	short loc_675C1D

loc_675C1A:
mov	eax, [edi+0Ch]

loc_675C1D:
mov	ecx, [esp+180h+var_170]
push	ecx
mov	ecx, ebx
mov	[esp+184h+var_168], eax
call	sub_651990
mov	ecx, [esp+180h+var_168]
movzx	edx, al
push	edx
call	sub_64A6C0
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_675C52
mov	ecx, edi
call	sub_64B660

loc_675C52:		; char
push	0
mov	ecx, ebx	; void *
call	sub_65D7F0
mov	ecx, [esp+180h+var_170]	; void *
push	0		; char
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675C6B:		; jumptable 006734A7 case 105
lea	ecx, [esp+180h+var_144]
call	sub_66EEA0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675C79:
movzx	eax, byte ptr [edx+ebx+2]
movzx	edi, byte ptr [edx+ebx+1]
shl	eax, 8
or	eax, edi
lea	edi, [eax+ebx+3]
mov	[esp+180h+var_170], eax
lea	eax, [ecx-81h]
mov	[esp+180h+var_130], edi
cmp	eax, 1Eh	; switch 31 cases
ja	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
movzx	eax, ds:byte_676B64[eax]
jmp	ds:off_676B1C[eax*4] ; switch jump

loc_675CB1:		; jumptable 00675CAA case 0
test	byte ptr [esi+0C6h], 2
jnz	loc_675EB4
mov	ecx, [esi+74h]
test	ecx, ecx
jz	loc_675EB4
movzx	edi, byte ptr [edx+ebx+4]
movzx	edx, byte ptr [edx+ebx+3]
mov	eax, [ecx]
mov	eax, [eax+144h]
shl	edi, 8
or	edi, edx
push	edi
call	eax
jmp	loc_675EB4

loc_675CE8:		; jumptable 00675CAA case 2
mov	eax, [esp+180h+var_12C]
mov	edi, [esp+180h+var_13C]
lea	ebx, [edi+eax+3]
mov	eax, ebx
lea	edx, [eax+1]
lea	esp, [esp+0]

loc_675D00:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_675D00
mov	ecx, [esp+180h+var_12C]
sub	eax, edx
push	0Ah		; size_t
add	eax, edi
lea	edi, [eax+ecx+4]
push	offset aFscommand ; "FSCommand:"
push	ebx		; char *
mov	[esp+18Ch+var_150], edi
call	_strncmp
mov	ecx, [esi+74h]
add	esp, 0Ch
test	eax, eax
jnz	short loc_675D9E
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	ecx, [eax+2844h]
push	1Eh
push	1
push	ecx
lea	ecx, [esp+18Ch+var_B8]
call	sub_667870
mov	ecx, [esp+180h+var_140]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	edi, [eax+100h]
add	eax, 100h
test	edi, edi
jz	short loc_675D8D
mov	eax, [edi]
mov	ecx, [esi+74h]
mov	edx, [esp+180h+var_150]
add	eax, 4
mov	[esp+180h+var_168], eax
mov	eax, [ecx]
push	edx
mov	edx, [eax+54h]
add	ebx, 0Ah
push	ebx
call	edx
push	eax
mov	eax, [esp+24h]
mov	edx, [eax]
mov	ecx, edi
call	edx

loc_675D8D:
lea	ecx, [esp+180h+var_B8]
call	sub_6678C0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675D9E:
mov	eax, [ecx]
mov	edx, [eax+54h]
push	0		; int
push	0		; int
push	esi		; char
push	ebx		; int
push	edi		; char *
call	edx
mov	ecx, eax
call	sub_699BE0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675DB8:		; jumptable 00675CAA case 6
test	byte ptr [esp+180h+var_110+2], 4
movzx	eax, byte ptr [edx+ebx+3]
jz	short loc_675DDC
mov	ecx, [esi+8]
push	ecx
push	eax
mov	ecx, esi
call	sub_669840
mov	ecx, eax
call	sub_652520
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675DDC:
cmp	eax, 3
ja	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	ecx, [esi+8]
shl	eax, 4
push	ecx
lea	ecx, [eax+esi+28h]
call	sub_652520
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675DFA:		; jumptable 00675CAA case 7
mov	ecx, [esp+180h+var_158]
lea	edx, [esp+180h+var_120]
push	edx
push	edi
push	ebx
lea	eax, [esi+78h]
push	eax
call	sub_66CF20
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675E13:		; jumptable 00675CAA cases 9,12
mov	eax, [esp+180h+var_158]
push	ecx
push	eax
lea	ecx, [esp+188h+var_144]
call	sub_66E2D0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675E27:		; jumptable 00675CAA case 10
cmp	byte ptr [edx+ebx+3], 0
lea	eax, [edx+ebx+3]
jnz	short loc_675E43
mov	ecx, [esp+180h+var_140]
push	ecx
mov	ecx, esi
call	sub_667F90
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675E43:
push	eax
lea	edx, [esp+184h+var_174]
push	edx
mov	ecx, esi
call	sub_64AB70
mov	edi, eax
push	0
push	edi
mov	ecx, esi
call	sub_669880
mov	ecx, esi
test	eax, eax
jnz	short loc_675E7A
mov	eax, [esp+180h+var_140]
push	eax
call	sub_667FB0
push	0		; char
mov	ecx, edi	; void *
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675E7A:
push	eax
call	sub_667F90
push	0		; char
mov	ecx, edi	; void *
call	sub_65D7F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675E8E:		; jumptable 00675CAA case 11
test	byte ptr [esi+0C6h], 2
jnz	short loc_675EB4
mov	eax, [esi+74h]
lea	ecx, [eax+78h]
lea	edi, [edx+ebx+3]
call	sub_661C50
test	eax, eax
jz	short loc_675EB4
push	0
push	edi
mov	ecx, eax
call	sub_680CC0

loc_675EB4:
mov	ecx, [ebp+arg_14]
push	ecx
mov	ecx, esi
call	sub_668EA0
test	al, al
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	edx, [esp+180h+var_134]
mov	[esp+180h+var_130], edx
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675ED4:		; jumptable 00675CAA case 13
mov	eax, [esp+180h+var_158]
push	eax
lea	ecx, [esp+184h+var_144]
call	sub_670E20
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675EE7:		; jumptable 00675CAA case 14
lea	ecx, [esp+180h+var_15C]
push	ecx
push	ebx
mov	ecx, esi
call	sub_66D1D0
mov	edx, [esp+180h+var_12C]
mov	eax, [esp+180h+var_13C]
inc	[esp+180h+var_15C]
lea	ecx, [eax+edx+3]
mov	eax, [esi+8]
sub	eax, [esi+0Ch]
mov	edx, [esp+180h+var_130]
mov	[esp+180h+var_F4], ecx
mov	ecx, [esi+1Ch]
dec	ecx
shl	ecx, 5
mov	[esp+180h+var_F0], edx
sar	eax, 4
add	eax, ecx
lea	edx, [esp+180h+var_F4]
push	edx
lea	ecx, [esi+0A4h]
mov	[esp+184h+var_EC], eax
call	sub_669F60
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_675F47:		; jumptable 00675CAA case 19
mov	eax, [esp+180h+var_124]
test	eax, eax
jz	short loc_675F55
cmp	dword ptr [eax+4], 8
jnb	short loc_675FCF ; jumptable 006734A7 case 23

loc_675F55:
movzx	edi, byte ptr [edx+ebx+4]
mov	eax, [esp+180h+var_12C]
movzx	ecx, byte ptr [edx+eax+3]
shl	edi, 8
or	edi, ecx
mov	ecx, [esi+8]
add	edi, [esp+180h+var_130]
cmp	byte ptr [ecx],	7
push	esi
jnz	short loc_675FA6
call	sub_651BB0
push	edi
push	eax
lea	ecx, [esp+188h+var_C0]
call	sub_667F00
push	eax
lea	ecx, [esp+184h+var_128]
call	sub_66D100
lea	ecx, [esp+180h+var_C0]
call	sub_66A3E0
lea	edi, [esi+8]
jmp	loc_6766CF

loc_675FA6:
call	sub_652C20
push	edi
push	eax
lea	ecx, [esp+188h+var_C8]
call	sub_669750
push	eax
lea	ecx, [esp+184h+var_128]
call	sub_66D100
lea	ecx, [esp+180h+var_C8]
call	sub_66A3E0

loc_675FCF:		; jumptable 006734A7 case 23
lea	edi, [esi+8]
jmp	loc_6766CF
jmp	short loc_675FE0 ; jumptable 00675CAA case 21
align 10h

loc_675FE0:		; jumptable 00675CAA case 21
mov	eax, [esp+180h+var_13C]
movzx	ecx, byte ptr [ebx+eax+3]
inc	ebx
cmp	ecx, 4
jnz	loc_67607F
movzx	eax, byte ptr [ebx+eax+3]
inc	ebx
mov	[esp+180h+var_150], eax
test	byte ptr [esp+180h+var_110+2], cl
jz	short loc_67603F
push	eax
mov	ecx, esi
call	sub_669840
add	dword ptr [esi+8], 10h
lea	edi, [esi+8]
mov	[esp+180h+var_150], eax
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_676024
mov	ecx, edi
call	sub_64B530

loc_676024:
mov	edi, [edi]
test	edi, edi
jz	loc_6763B2
mov	edx, [esp+180h+var_150]
push	edx
mov	ecx, edi
call	sub_652330
jmp	loc_6763B2

loc_67603F:
add	dword ptr [esi+8], 10h
lea	edi, [esi+8]
cmp	eax, 3
ja	loc_6760D6
mov	ecx, [edi]
cmp	ecx, [edi+8]
jb	short loc_676061
mov	ecx, edi
call	sub_64B530
mov	eax, [esp+180h+var_150]

loc_676061:
mov	edi, [edi]
test	edi, edi
jz	loc_6763B2
shl	eax, 4
lea	eax, [eax+esi+28h]
push	eax
mov	ecx, edi
call	sub_652330
jmp	loc_6763B2

loc_67607F:
cmp	ecx, 8
jnz	loc_676110
movzx	eax, byte ptr [ebx+eax+3]
mov	ecx, [esp+180h+var_158]
inc	ebx
lea	edi, [esi+8]
cmp	eax, [ecx+10h]
jnb	short loc_6760D3
mov	ecx, [ecx+0Ch]
add	dword ptr [edi], 10h
lea	edx, [ecx+eax*4]
mov	eax, [edi]
mov	[esp+180h+var_150], edx
cmp	eax, [edi+8]
jb	short loc_6760B5
mov	ecx, edi
call	sub_64B530

loc_6760B5:
mov	edi, [edi]
test	edi, edi
jz	loc_6763B2
mov	eax, [esp+180h+var_150]
mov	byte ptr [edi],	5
mov	eax, [eax]
mov	[edi+4], eax
inc	dword ptr [eax+8]
jmp	loc_6763B2

loc_6760D3:
add	dword ptr [edi], 10h

loc_6760D6:
mov	eax, [edi]
mov	[esp+180h+var_54], 0
cmp	eax, [edi+8]
jb	short loc_6760EC
mov	ecx, edi
call	sub_64B530

loc_6760EC:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6760FF
lea	edx, [esp+180h+var_54]
push	edx
call	sub_652330

loc_6760FF:
lea	ecx, [esp+180h+var_54]
call	sub_652830
jmp	loc_6763B2

loc_676110:
test	ecx, ecx
jnz	short loc_676176
lea	eax, [ebx+eax+3]
push	eax
lea	ecx, [esp+184h+var_174]
push	ecx
mov	ecx, esi
call	sub_64AB70
mov	edx, [eax]
mov	[esp+180h+var_168], eax
mov	eax, [edx+10h]
add	dword ptr [esi+8], 10h
lea	edi, [esi+8]
lea	ebx, [ebx+eax+1]
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_676147
mov	ecx, edi
call	sub_64B530

loc_676147:
mov	edi, [edi]
test	edi, edi
jz	short loc_67615C
mov	ecx, [esp+180h+var_168]
mov	byte ptr [edi],	5
mov	eax, [ecx]
mov	[edi+4], eax
inc	dword ptr [eax+8]

loc_67615C:
mov	edx, [esp+180h+var_168]
mov	ecx, [edx]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	loc_6763B2
call	sub_650DF0
jmp	loc_6763B2

loc_676176:
cmp	ecx, 1
jnz	short loc_6761B4
mov	eax, [ebx+eax+3]
add	dword ptr [esi+8], 10h
lea	edi, [esi+8]
mov	[esp+180h+var_150], eax
mov	eax, [edi]
add	ebx, 4
cmp	eax, [edi+8]
jb	short loc_67619B
mov	ecx, edi
call	sub_64B530

loc_67619B:
mov	edi, [edi]
test	edi, edi
jz	loc_6763B2
fld	[esp+180h+var_150]
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
jmp	loc_6763B2

loc_6761B4:
cmp	ecx, 2
jnz	short loc_6761FA
lea	ecx, [esp+180h+var_54]
mov	[esp+180h+var_54], 0
call	sub_64A670
add	dword ptr [esi+8], 10h
mov	eax, [esi+8]
cmp	eax, [esi+10h]
lea	edi, [esi+8]
jb	short loc_6761E3
mov	ecx, edi
call	sub_64B530

loc_6761E3:
mov	edi, [edi]
test	edi, edi
jz	loc_6763A4
lea	ecx, [esp+180h+var_54]
push	ecx
jmp	loc_67639D

loc_6761FA:
cmp	ecx, 3
jnz	short loc_676234
add	dword ptr [esi+8], 10h
mov	eax, [esi+8]
lea	edi, [esi+8]
mov	[esp+180h+var_54], 0
cmp	eax, [edi+8]
jb	short loc_67621D
mov	ecx, edi
call	sub_64B530

loc_67621D:
mov	edi, [edi]
test	edi, edi
jz	loc_6763A4
lea	edx, [esp+180h+var_54]
push	edx
jmp	loc_67639D

loc_676234:
cmp	ecx, 5
jnz	short loc_676275
mov	eax, [esp+180h+var_13C]
cmp	byte ptr [ebx+eax+3], 0
lea	edi, [esi+8]
setnz	[esp+180h+var_15D]
add	dword ptr [edi], 10h
mov	eax, [edi]
inc	ebx
cmp	eax, [edi+8]
jb	short loc_67625C
mov	ecx, edi
call	sub_64B530

loc_67625C:
mov	edi, [edi]
test	edi, edi
jz	loc_6763B2
mov	cl, [esp+180h+var_15D]
mov	byte ptr [edi],	2
mov	[edi+4], cl
jmp	loc_6763B2

loc_676275:
cmp	ecx, 6
jnz	short loc_6762C4
mov	edx, [ebx+eax+3]
mov	eax, [ebx+eax+7]
add	dword ptr [esi+8], 10h
lea	edi, [esi+8]
mov	dword ptr [esp+180h+var_E0], eax
mov	eax, [edi]
add	ebx, 8
mov	dword ptr [esp+180h+var_E0+4], edx
cmp	eax, [edi+8]
jb	short loc_6762A8
mov	ecx, edi
call	sub_64B530

loc_6762A8:
mov	edi, [edi]
test	edi, edi
jz	loc_6763B2
fld	[esp+180h+var_E0]
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
jmp	loc_6763B2

loc_6762C4:
cmp	ecx, 7
jnz	short loc_67631D
mov	eax, [esp+180h+var_13C]
movzx	edi, byte ptr [ebx+eax+6]
movzx	ecx, byte ptr [ebx+eax+5]
movzx	edx, byte ptr [ebx+eax+4]
movzx	eax, byte ptr [ebx+eax+3]
add	dword ptr [esi+8], 10h
shl	edi, 8
or	edi, ecx
shl	edi, 8
or	edi, edx
shl	edi, 8
or	edi, eax
mov	eax, [esi+8]
add	ebx, 4
cmp	eax, [esi+10h]
jb	short loc_676307
lea	ecx, [esi+8]
call	sub_64B530

loc_676307:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6763B2
mov	byte ptr [eax],	4
mov	[eax+4], edi
jmp	loc_6763B2

loc_67631D:
cmp	ecx, 9
jnz	loc_6763B2
movzx	ecx, byte ptr [ebx+eax+4]
movzx	edx, byte ptr [ebx+eax+3]
mov	eax, [esp+180h+var_158]
shl	ecx, 8
or	ecx, edx
add	ebx, 2
lea	edi, [esi+8]
cmp	ecx, [eax+10h]
jnb	short loc_676376
mov	eax, [eax+0Ch]
add	dword ptr [edi], 10h
lea	ecx, [eax+ecx*4]
mov	eax, [edi]
mov	[esp+180h+var_150], ecx
cmp	eax, [edi+8]
jb	short loc_67635F
mov	ecx, edi
call	sub_64B530

loc_67635F:
mov	edi, [edi]
test	edi, edi
jz	short loc_6763B2
mov	edx, [esp+180h+var_150]
mov	byte ptr [edi],	5
mov	eax, [edx]
mov	[edi+4], eax
inc	dword ptr [eax+8]
jmp	short loc_6763B2

loc_676376:
add	dword ptr [edi], 10h
mov	eax, [edi]
mov	[esp+180h+var_54], 0
cmp	eax, [edi+8]
jb	short loc_67638F
mov	ecx, edi
call	sub_64B530

loc_67638F:
mov	edi, [edi]
test	edi, edi
jz	short loc_6763A4
lea	eax, [esp+180h+var_54]
push	eax

loc_67639D:
mov	ecx, edi
call	sub_652330

loc_6763A4:
push	0
lea	ecx, [esp+184h+var_54]
call	sub_64AA20

loc_6763B2:
mov	ecx, ebx
sub	ecx, [esp+180h+var_12C]
cmp	ecx, [esp+180h+var_170]
jl	loc_675FE0	; jumptable 00675CAA case 21
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_6763C7:		; jumptable 00675CAA case 24
movzx	ax, byte ptr [edx+ebx+4]
movzx	edx, byte ptr [edx+ebx+3]
shl	ax, 8
movsx	ecx, ax
mov	eax, [esp+180h+var_158]
or	ecx, edx
add	edi, ecx
mov	ecx, [eax+8]
mov	[esp+180h+var_130], edi
cmp	edi, [ecx+0Ch]
jb	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	edx, [esp+180h+var_140]
push	edx
mov	ecx, esi
call	sub_667F90
mov	ecx, [esp+180h+var_16C]
test	ecx, ecx
jz	short loc_67640A
call	sub_64B3B0

loc_67640A:
mov	ecx, [esp+180h+var_144]
mov	eax, [esp+180h+var_138]
mov	[ecx+0A0h], eax
lea	ecx, [esp+180h+var_128]
mov	[esp+180h+var_120], offset off_143F300
call	sub_66D0D0
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+174h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	18h

loc_676440:		; jumptable 00675CAA case 25
mov	edx, [esp+180h+var_13C]
mov	ecx, [esi+8]
mov	bl, [edx+ebx+3]
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+18Ch+var_174]
lea	edi, [esi+8]
push	eax
call	sub_652F60
mov	eax, [edi]
cmp	eax, [edi+4]
jbe	short loc_676469
add	eax, 0FFFFFFF0h
jmp	short loc_67646C

loc_676469:
mov	eax, [edi+0Ch]

loc_67646C:
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+18Ch+var_10C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+180h+var_10C]
mov	eax, [edx]
push	0Ah		; size_t
push	offset aFscommand ; "FSCommand:"
push	eax		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_6764EA
mov	ecx, [esp+180h+var_140]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
add	eax, 100h
mov	eax, [eax]
mov	[esp+180h+var_168], eax
test	eax, eax
jz	loc_6765AB
mov	eax, [esp+180h+var_174]
mov	edx, [esp+180h+var_10C]
mov	eax, [eax]
mov	edx, [edx]
mov	ecx, [esi+74h]
mov	ebx, [esp+180h+var_168]
mov	ebx, [ebx]
push	eax
mov	eax, [ecx]
add	edx, 0Ah
push	edx
mov	edx, [eax+54h]
add	ebx, 4
call	edx
mov	ecx, [esp+20h]
push	eax
mov	eax, [ebx]
call	eax
jmp	loc_6765AB

loc_6764EA:
movzx	eax, bl
and	eax, 3
sub	eax, 1
mov	[esp+180h+var_170], 0
jz	short loc_67650C
sub	eax, 1
jnz	short loc_676514
mov	[esp+180h+var_170], 2
jmp	short loc_676514

loc_67650C:
mov	[esp+180h+var_170], 1

loc_676514:
mov	ecx, [esi+74h]
mov	[esp+180h+var_168], offset byte_146D660
call	sub_654DD0
mov	edx, [esp+180h+var_174]
cmp	eax, 6
mov	eax, [edx]
setnbe	cl
mov	[esp+180h+var_E4], cl
mov	ecx, dword ptr [esp+180h+var_E4]
push	ecx		; char
lea	edx, [esp+184h+var_168]
push	edx		; int
push	eax		; char *
call	sub_68D7B0
add	esp, 0Ch
test	bl, bl
jns	short loc_676574
mov	eax, [esp+180h+var_10C]
mov	edx, [esp+180h+var_170]
mov	eax, [eax]
mov	ecx, [esp+180h+var_174]
mov	ecx, [ecx]
push	edx		; int
push	eax		; int
push	ecx		; char *
mov	ecx, esi
call	sub_668010
mov	ecx, eax
call	sub_695A70
jmp	short loc_6765AB

loc_676574:
test	bl, 40h
jnz	short loc_676587
cmp	eax, 0FFFFFFFFh
jz	short loc_6765AB
mov	eax, [esp+180h+var_168]
cmp	byte ptr [eax],	0
jnz	short loc_6765AB

loc_676587:
mov	ecx, [esp+180h+var_10C]
mov	eax, [ecx]
mov	edx, [esp+180h+var_174]
mov	ecx, [edx]
mov	edx, [esp+180h+var_170]
push	0		; int
push	edx		; int
push	esi		; char
push	eax		; int
push	ecx		; char *
mov	ecx, esi
call	sub_668010
mov	ecx, eax
call	sub_699BE0

loc_6765AB:
mov	ecx, [edi]
lea	eax, [ecx-20h]
cmp	eax, [edi+4]
jnb	short loc_6765C0
push	2
mov	ecx, edi
call	sub_64C1F0
jmp	short loc_6765D2

loc_6765C0:
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h

loc_6765D2:
mov	eax, [esp+180h+var_174]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6765E8
call	sub_650DF0

loc_6765E8:
mov	eax, [esp+180h+var_10C]

loc_6765EC:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0

loc_6765F7:		; default
jnz	loc_6767B1	; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
call	sub_650DF0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_676607:		; jumptable 00675CAA case 26
mov	ecx, [esp+180h+var_158]
push	ecx
lea	ecx, [esp+184h+var_144]
call	sub_6709F0
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_67661A:		; jumptable 00675CAA case 28
mov	eax, [esp+180h+var_13C]
movzx	dx, byte ptr [eax+ebx+4]
movzx	ax, byte ptr [eax+ebx+3]
mov	ecx, [esi+8]
shl	dx, 8
or	dx, ax
lea	edi, [esi+8]
push	esi
movzx	ebx, dx
call	sub_651D80
mov	ecx, [edi]
mov	[esp+180h+var_15D], al
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_67665C
mov	ecx, edi
call	sub_64B660

loc_67665C:
cmp	[esp+180h+var_15D], 0
jz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
movsx	ecx, bx
add	[esp+180h+var_130], ecx
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_676673:		; jumptable 00675CAA case 29
test	byte ptr [esi+0C6h], 2
mov	edx, [esi+74h]
mov	[esp+180h+var_168], edx
jnz	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	eax, [esi+8]
lea	ecx, [esp+180h+var_170]
push	ecx
mov	ecx, [esp+184h+var_158]
lea	edx, [esp+184h+var_168]
lea	edi, [esi+8]
push	edx
push	eax
push	esi
mov	[esp+190h+var_170], 0
call	sub_669CD0
test	al, al
jz	short loc_6766CF
mov	ecx, [esp+180h+var_168]
add	ecx, 78h
call	sub_661C50
test	eax, eax
jz	short loc_6766CF
mov	ecx, [esp+180h+var_170]
mov	edx, [eax]
mov	edx, [edx+168h]
push	ecx
mov	ecx, eax
call	edx

loc_6766CF:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
mov	ecx, edi
call	sub_64B660
jmp	loc_6767B1	; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_6766F0:		; jumptable 00675CAA case 30
mov	al, [edx+ebx+3]
movzx	edi, al
not	edi
and	edi, 1
mov	[esp+180h+var_168], 0
test	al, 2
jz	short loc_67671F
mov	ecx, [esp+180h+var_12C]
movzx	eax, byte ptr [edx+ecx+5]
movzx	ecx, byte ptr [edx+ecx+4]
shl	eax, 8
or	eax, ecx
mov	[esp+180h+var_168], eax

loc_67671F:
mov	edx, [esi+74h]
mov	eax, [esi+8]
lea	ecx, [esp+180h+var_100]
push	ecx
mov	ecx, [esp+184h+var_158]
mov	[esp+184h+var_170], edx
lea	edx, [esp+184h+var_170]
lea	ebx, [esi+8]
push	edx
push	eax
push	esi
mov	[esp+190h+var_100], 0
call	sub_669CD0
test	al, al
jz	short loc_676782
mov	eax, [esp+180h+var_170]
mov	edx, [eax]
mov	eax, [esp+180h+var_100]
mov	ecx, [esp+180h+var_168]
mov	edx, [edx+144h]
add	eax, ecx
mov	ecx, [esp+180h+var_170]
push	eax
call	edx
mov	ecx, [esp+180h+var_170]
mov	eax, [ecx]
mov	edx, [eax+148h]
push	edi
call	edx

loc_676782:
mov	ecx, [ebx]
call	sub_652830
add	dword ptr [ebx], 0FFFFFFF0h
mov	eax, [ebx]
cmp	eax, [ebx+4]
jnb	short loc_67679A
mov	ecx, ebx
call	sub_64B660

loc_67679A:
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, esi
call	sub_668EA0
test	al, al
jz	short loc_6767B1 ; default
			; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27

loc_6767A9:
mov	ecx, [esp+180h+var_134]
mov	[esp+180h+var_130], ecx

loc_6767B1:		; default
mov	eax, [esp+180h+var_130]	; jumptable 006734A7 cases 1-3,8,22,25-27,30,31,45-47,56,57,86-95
			; jumptable 00675CAA cases 1,3-5,8,15-18,20,22,23,27
cmp	eax, [esp+180h+var_134]
mov	[esp+180h+var_12C], eax
jl	loc_673422
mov	bl, byte ptr [esp+180h+var_FC+1]

loc_6767CA:
mov	eax, [esp+180h+var_15C]
test	eax, eax
jle	loc_676899
mov	[esp+180h+var_100], eax
lea	ecx, [ecx+0]

loc_6767E0:
lea	edx, [esp+180h+var_F4]
push	edx
mov	ecx, esi
call	sub_66D250
mov	eax, [esi+8]
sub	eax, [esi+0Ch]
mov	edx, [esi+1Ch]
lea	ecx, [esi+8]
dec	edx
shl	edx, 5
sar	eax, 4
add	eax, edx
mov	edx, [esp+180h+var_EC]
cmp	eax, edx
jbe	short loc_676817
sub	eax, edx
push	eax
call	sub_64C1F0

loc_676817:
mov	eax, [esp+180h+var_F4]
test	byte ptr [eax],	2
jz	short loc_676882
movzx	edx, byte ptr [eax+4]
movzx	ecx, byte ptr [eax+3]
movzx	edi, byte ptr [eax+1]
shl	edx, 8
or	edx, ecx
movzx	ecx, byte ptr [eax+2]
add	edx, [esp+180h+var_F0]
or	byte ptr [esi+0C6h], 1
shl	ecx, 8
or	ecx, edi
add	ecx, edx
mov	edx, [ebp+arg_14]
push	edx
mov	edx, [esp+184h+var_124]
push	edx
mov	edx, [esp+188h+var_108]
push	edx
mov	[esp+18Ch+var_12C], ecx
movzx	edx, byte ptr [eax+6]
movzx	eax, byte ptr [eax+5]
shl	edx, 8
or	edx, eax
push	edx
push	ecx
mov	ecx, [esp+194h+var_158]
push	esi
call	sub_673290
and	byte ptr [esi+0C6h], 0FEh

loc_676882:
mov	eax, [esp+180h+var_100]
dec	eax
mov	[esp+180h+var_100], eax
test	eax, eax
jg	loc_6767E0

loc_676899:
add	dword ptr [esi+0C0h], 0FFFFFFFFh
jnz	short loc_6768C2
cmp	byte ptr [esi+0B0h], 0Ah
lea	edi, [esi+0B0h]
jz	short loc_6768C2
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0Ah
and	byte ptr [esi+0C6h], 0FEh

loc_6768C2:
mov	ecx, [esp+180h+var_140]
mov	[esi+74h], ecx
test	bl, bl
jz	short loc_6768D6
and	byte ptr [esi+0C6h], 0FDh
jmp	short loc_6768DD

loc_6768D6:
or	byte ptr [esi+0C6h], 2

loc_6768DD:
call	sub_654DD0
mov	ecx, [esp+180h+var_16C]
mov	[esi+7Ch], al
test	ecx, ecx
jz	short loc_6768F2
call	sub_64B3B0

loc_6768F2:
mov	ecx, [esp+180h+var_138]
mov	edx, [esp+180h+var_144]
mov	[edx+0A0h], ecx
mov	eax, [esp+180h+var_124]
mov	[esp+180h+var_120], offset off_143F300
test	eax, eax
jz	short loc_676930
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+30h]
mov	esi, eax
mov	eax, [eax]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_676930:
mov	ecx, [esp+180h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	18h
sub_673290 endp

align 4
off_676948 dd offset loc_6734AE, offset	loc_6767B1 ; jump table	for switch statement
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_6734C3, offset loc_6734F0
dd offset loc_67351D, offset loc_67353E
dd offset loc_6767B1, offset loc_67355F
dd offset loc_67358E, offset loc_6735AD
dd offset loc_6735CC, offset loc_6735EB
dd offset loc_67360A, offset loc_67363B
dd offset loc_673698, offset loc_6736DD
dd offset loc_673722, offset loc_67376D
dd offset loc_67380D, offset loc_67384B
dd offset loc_6767B1, offset loc_675FCF
dd offset loc_673943, offset loc_6767B1
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_67395B, offset loc_673A75
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_673B01, offset loc_673B0F
dd offset loc_673B7C, offset loc_673BED
dd offset loc_673C6A, offset loc_673CFF
dd offset loc_673D82, offset loc_673DDF
dd offset loc_673DED, offset loc_673E06
dd offset loc_673EA0, offset loc_673F04
dd offset loc_673F12, offset loc_6767B1
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_673F20, offset loc_673F5C
dd offset loc_673F90, offset loc_673FC4
dd offset loc_67400F, offset loc_6740A2
dd offset loc_674168, offset loc_67419B
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_6741EE, offset loc_6742F3
dd offset loc_6743E0, offset loc_674479
dd offset loc_674749, offset loc_67477F
dd offset loc_674818, offset loc_6749F6
dd offset loc_674A4C, offset loc_674B11
dd offset loc_674C67, offset loc_674CE7
dd offset loc_674D36, offset loc_674D45
dd offset loc_67363B, offset loc_674D64
dd offset loc_674D95, offset loc_674DA3
dd offset loc_674DB7, offset loc_674DE7
dd offset loc_674E35, offset loc_675061
dd offset loc_675160, offset loc_675170
dd offset loc_675180, offset loc_675872
dd offset loc_675A5D, offset loc_674D36
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_6767B1, offset loc_6767B1
dd offset loc_675A6B, offset loc_675A8A
dd offset loc_675AA9, offset loc_675AC8
dd offset loc_675AE7, offset loc_675B06
dd offset loc_675B25, offset loc_675B74
dd offset loc_675BD3, offset loc_675C6B
off_676AF0 dd offset loc_674CD2	; jump table for switch	statement
dd offset loc_674CB6
dd offset loc_674C85
dd offset loc_674CC4
dd offset loc_674CC4
dd offset loc_674C7E
dd offset loc_674CA8
dd offset loc_674C8C
dd offset loc_674CBD
dd offset loc_674CC4
dd offset loc_674CD2
off_676B1C dd offset loc_675CB1	; jump table for switch	statement
dd offset loc_675CE8
dd offset loc_675DB8
dd offset loc_675DFA
dd offset loc_675E13
dd offset loc_675E27
dd offset loc_675E8E
dd offset loc_675ED4
dd offset loc_675EE7
dd offset loc_675F47
dd offset loc_675FE0
dd offset loc_6763C7
dd offset loc_676440
dd offset loc_676607
dd offset loc_67661A
dd offset loc_676673
dd offset loc_6766F0
dd offset loc_6767B1
byte_676B64 db	    0,	 11h,	  1,   11h ; indirect table for	switch statement
db    11h,   11h,     2,     3
db    11h,     4,     5,     6
db	4,     7,     8,   11h
db    11h,   11h,   11h,     9
db    11h,   0Ah,   11h,   11h
db    0Bh,   0Ch,   0Dh,   11h
db    0Eh,   0Fh,   10h
align 10h



sub_676B90 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 34h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esp, [esp+0]

loc_676BA0:
cmp	byte ptr [edi+0B0h], 0Ah
mov	[esp+44h+var_31], 0
jz	loc_67705F
mov	eax, [esp+44h+arg_8]
mov	eax, [eax]
mov	[esp+44h+var_20], eax
test	eax, eax
jle	loc_677029

loc_676BC4:
cmp	[esp+44h+var_31], 0
jnz	short loc_676BA0
mov	ebx, [edi+0A8h]
mov	edx, [edi+0A4h]
lea	ebp, [edi+0A4h]
lea	ecx, [ebx+ebx*2]
mov	esi, [edx+ecx*4-0Ch]
lea	eax, [edx+ecx*4-0Ch]
mov	ecx, [eax+4]
mov	edx, [eax+8]
mov	eax, [ebp+4]
dec	ebx
mov	[esp+44h+var_18], ecx
mov	[esp+44h+var_14], edx
mov	[esp+44h+var_28], eax
cmp	ebx, eax
jnb	short loc_676C0E
mov	ecx, [ebp+8]
shr	ecx, 1
cmp	ebx, ecx
jnb	short loc_676C27
push	ebx
jmp	short loc_676C1B

loc_676C0E:
cmp	ebx, [ebp+8]
jb	short loc_676C27
mov	eax, ebx
shr	eax, 2
add	eax, ebx
push	eax

loc_676C1B:
push	ebp
mov	ecx, ebp
call	sub_6CE350
mov	eax, [esp+44h+var_28]

loc_676C27:
mov	[ebp+4], ebx
cmp	ebx, eax
jbe	short loc_676C53
sub	ebx, eax
mov	edx, [ebp+0]
lea	ecx, [eax+eax*2]
lea	ecx, [edx+ecx*4]
jz	short loc_676C53
jmp	short loc_676C40
align 10h

loc_676C40:
test	ecx, ecx
jz	short loc_676C4B
mov	dword ptr [ecx+8], 0

loc_676C4B:
add	ecx, 0Ch
sub	ebx, 1
jnz	short loc_676C40

loc_676C53:
mov	eax, [esp+44h+arg_8]
dec	dword ptr [eax]
mov	eax, [edi+8]
sub	eax, [edi+0Ch]
mov	ecx, [edi+1Ch]
lea	ebp, [edi+8]
dec	ecx
shl	ecx, 5
sar	eax, 4
add	eax, ecx
mov	ecx, [esp+44h+var_14]
cmp	eax, ecx
jbe	short loc_676CA0
sub	eax, ecx
mov	ebx, eax
jz	short loc_676CA0
lea	esp, [esp+0]

loc_676C80:
mov	ecx, [ebp+0]
call	sub_652830
add	dword ptr [ebp+0], 0FFFFFFF0h
mov	eax, [ebp+0]
cmp	eax, [ebp+4]
jnb	short loc_676C9B
mov	ecx, ebp
call	sub_64B660

loc_676C9B:
sub	ebx, 1
jnz	short loc_676C80

loc_676CA0:
mov	al, [esi]
test	al, 1
jz	loc_676FB2
xor	ebx, ebx
mov	[esp+44h+var_30], ebx
test	al, 4
jz	short loc_676D01
movzx	ecx, byte ptr [esi+7]
mov	eax, [edi+6Ch]
cmp	ecx, eax
jb	short loc_676CE5
push	eax
push	ecx
push	offset aInvalidLocalRe ; "Invalid local	register %d, stack only	h"...
push	edi
call	sub_669230
add	esp, 10h
lea	ecx, [edi+0B0h]
lea	eax, [edi+28h]
push	ecx
mov	ecx, eax
call	sub_652520
jmp	loc_676E38

loc_676CE5:
sub	eax, ecx
dec	eax
shl	eax, 4
add	eax, [edi+68h]
lea	ecx, [edi+0B0h]
push	ecx
mov	ecx, eax
call	sub_652520
jmp	loc_676E38

loc_676D01:
mov	eax, [edi+0CCh]
push	0
mov	ecx, edi
mov	[esp+48h+var_30], eax
call	sub_668D50
mov	ebx, eax
test	ebx, ebx
jz	short loc_676D27
mov	ecx, [ebx+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebx+8], ecx

loc_676D27:
mov	ecx, edi
call	sub_670200
mov	ebp, eax
mov	[esp+44h+arg_4], ebp
test	ebp, ebp
jz	short loc_676D45
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_676D45:
test	ebx, ebx
jz	short loc_676D55
mov	eax, [ebx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebx+8], eax

loc_676D55:
mov	ecx, [ebp+14h]
test	ecx, ecx
jz	short loc_676D61
call	sub_64B3B0

loc_676D61:
mov	[ebp+14h], ebx
mov	eax, [edi+78h]
mov	eax, [eax+8]
mov	[esp+44h+var_2C], eax
inc	dword ptr [eax+8]
mov	al, [esi]
test	al, 1
jz	short loc_676DBE
test	al, 4
jnz	short loc_676DBE
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
lea	eax, [esi+7]
push	eax
call	sub_651000
mov	ebp, eax
add	dword ptr [ebp+8], 2
mov	eax, [esp+44h+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_676DA9
call	sub_650DF0

loc_676DA9:
mov	[esp+44h+var_2C], ebp
add	dword ptr [ebp+8], 0FFFFFFFFh
jnz	short loc_676DBA
mov	ecx, ebp
call	sub_650DF0

loc_676DBA:
mov	ebp, [esp+44h+arg_4]

loc_676DBE:
mov	eax, [edi+0CCh]
test	eax, eax
jz	short loc_676E08
mov	ecx, [edi+0C8h]
cmp	dword ptr [ecx+eax*4-4], 0
jz	short loc_676E08
lea	edx, [esp+44h+var_2C]
push	edx
mov	ecx, edi
call	sub_66F560
test	eax, eax
jnz	short loc_676DFA
lea	eax, [edi+0B0h]
push	eax
lea	eax, [esp+48h+var_2C]
push	eax
mov	ecx, edi
call	sub_6712A0
jmp	short loc_676E08

loc_676DFA:
lea	ecx, [edi+0B0h]
push	ecx
mov	ecx, eax
call	sub_652520

loc_676E08:
mov	eax, [esp+44h+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_676E1E
call	sub_650DF0

loc_676E1E:
test	ebp, ebp
jz	short loc_676E29
mov	ecx, ebp
call	sub_64B3B0

loc_676E29:
test	ebx, ebx
jz	short loc_676E34
mov	ecx, ebx
call	sub_64B3B0

loc_676E34:
mov	ebx, [esp+44h+var_30]

loc_676E38:
lea	ebp, [edi+0B0h]
mov	ecx, ebp
call	sub_652060
mov	ecx, [esp+44h+arg_14]
mov	edx, [esp+44h+arg_10]
mov	eax, [esp+44h+arg_C]
push	ecx
mov	byte ptr [ebp+0], 0Ah
and	byte ptr [edi+0C6h], 0FEh
movzx	ecx, byte ptr [esi+4]
mov	ebp, [esp+48h+var_18]
push	edx
movzx	edx, byte ptr [esi+3]
push	eax
movzx	eax, byte ptr [esi+2]
shl	ecx, 8
or	ecx, edx
push	ecx
movzx	ecx, byte ptr [esi+1]
shl	eax, 8
or	eax, ecx
mov	ecx, [esp+54h+arg_0]
add	eax, ebp
push	eax
push	edi
call	sub_673290
movzx	edx, byte ptr [esi+6]
movzx	eax, byte ptr [esi+5]
movzx	ecx, byte ptr [esi+2]
shl	edx, 8
or	edx, eax
movzx	eax, byte ptr [esi+1]
shl	ecx, 8
or	ecx, eax
movzx	eax, byte ptr [esi+4]
add	ecx, ebp
movzx	ebp, byte ptr [esi+3]
shl	eax, 8
or	eax, ebp
add	ecx, edx
add	eax, ecx
test	byte ptr [esi],	4
mov	[esp+44h+arg_4], eax
mov	[esp+44h+var_31], 1
jz	short loc_676F1D
mov	al, [esi]
mov	[esp+44h+var_10], 0
test	al, 1
jz	short loc_676EDB
test	al, 4
jz	short loc_676EDB
movzx	ecx, byte ptr [esi+7]
jmp	short loc_676EDE

loc_676EDB:
or	ecx, 0FFFFFFFFh

loc_676EDE:
mov	eax, [edi+6Ch]
cmp	ecx, eax
jb	short loc_676EFA
push	eax
push	ecx
push	offset aInvalidLocalRe ; "Invalid local	register %d, stack only	h"...
push	edi
call	sub_669230
add	esp, 10h
lea	eax, [edi+28h]
jmp	short loc_676F03

loc_676EFA:
sub	eax, ecx
dec	eax
shl	eax, 4
add	eax, [edi+68h]

loc_676F03:
lea	ecx, [esp+44h+var_10]
push	ecx
mov	ecx, eax
call	sub_652520
lea	ecx, [esp+44h+var_10]
call	sub_652830
jmp	loc_676FB2

loc_676F1D:
mov	edx, [edi+0CCh]
lea	ebp, [edi+0C8h]
mov	[esp+44h+var_28], edx
cmp	ebx, edx
jnb	loc_67703D
mov	eax, edx
sub	eax, ebx
lea	ecx, [eax+ebx]
mov	ebx, [ebp+0]
lea	ebx, [ebx+ecx*4-4]
jz	short loc_676F69
mov	[esp+44h+var_24], eax
lea	esp, [esp+0]

loc_676F50:
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_676F5F
call	sub_64B3B0
mov	edx, [esp+44h+var_28]

loc_676F5F:
sub	ebx, 4
sub	[esp+44h+var_24], 1
jnz	short loc_676F50

loc_676F69:
mov	eax, [ebp+8]
shr	eax, 1
cmp	[esp+44h+var_30], eax
jnb	short loc_676F85
mov	ecx, [esp+44h+var_30]
push	ecx
push	ebp
mov	ecx, ebp
call	sub_668FE0
mov	edx, [esp+44h+var_28]

loc_676F85:
mov	ebx, [esp+44h+var_30]

loc_676F89:
mov	[ebp+4], ebx
cmp	ebx, edx
jbe	short loc_676FB2
sub	ebx, edx
mov	eax, [ebp+0]
lea	eax, [eax+edx*4]
jz	short loc_676FB2
lea	ebx, [ebx+0]

loc_676FA0:
test	eax, eax
jz	short loc_676FAA
mov	dword ptr [eax], 0

loc_676FAA:
add	eax, 4
sub	ebx, 1
jnz	short loc_676FA0

loc_676FB2:
test	byte ptr [esi],	2
jz	short loc_67700D
movzx	ecx, byte ptr [esi+4]
movzx	edx, byte ptr [esi+3]
movzx	eax, byte ptr [esi+2]
shl	ecx, 8
or	ecx, edx
movzx	edx, byte ptr [esi+1]
add	ecx, [esp+44h+var_18]
or	byte ptr [edi+0C6h], 1
shl	eax, 8
or	eax, edx
mov	edx, [esp+44h+arg_10]
add	eax, ecx
mov	ecx, [esp+44h+arg_14]
push	ecx
mov	ecx, [esp+48h+arg_C]
push	edx
movzx	edx, byte ptr [esi+6]
push	ecx
movzx	ecx, byte ptr [esi+5]
shl	edx, 8
or	edx, ecx
mov	ecx, [esp+50h+arg_0]
push	edx
push	eax
push	edi
call	sub_673290
and	byte ptr [edi+0C6h], 0FEh

loc_67700D:
mov	eax, [esp+44h+var_20]
dec	eax
mov	[esp+44h+var_20], eax
test	eax, eax
jg	loc_676BC4
cmp	[esp+44h+var_31], 0
jnz	loc_676BA0

loc_677029:
mov	edx, [esp+44h+arg_0]
mov	eax, [edx+8]
mov	eax, [eax+0Ch]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	18h

loc_67703D:
cmp	ebx, [ebp+8]
jb	loc_676F89
mov	edx, ebx
shr	edx, 2
add	edx, ebx
push	edx
push	ebp
mov	ecx, ebp
call	sub_668FE0
mov	edx, [esp+44h+var_28]
jmp	loc_676F89

loc_67705F:
mov	eax, [esp+44h+arg_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	18h
sub_676B90 endp

align 10h



sub_677070 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+6Ch]
test	ebp, ebp
jz	short loc_6770AE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6770AE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6770AE
add	eax, 4
jnz	short loc_677127

loc_6770AE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6B6BF0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6770EC
call	sub_64B3B0

loc_6770EC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677127:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677070 endp




sub_677130 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+10h]
test	ebp, ebp
jz	short loc_67716E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67716E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67716E
add	eax, 4
jnz	short loc_6771E7

loc_67716E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_661530
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6771AC
call	sub_64B3B0

loc_6771AC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6771E7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677130 endp




sub_6771F0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+18h]
test	ebp, ebp
jz	short loc_67722E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67722E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67722E
add	eax, 4
jnz	short loc_6772A7

loc_67722E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6B74A0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67726C
call	sub_64B3B0

loc_67726C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6772A7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6771F0 endp




sub_6772B0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+14h]
test	ebp, ebp
jz	short loc_6772EE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6772EE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6772EE
add	eax, 4
jnz	short loc_677367

loc_6772EE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6B5920
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67732C
call	sub_64B3B0

loc_67732C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677367:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6772B0 endp




sub_677370 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+1Ch]
test	ebp, ebp
jz	short loc_6773AE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6773AE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6773AE
add	eax, 4
jnz	short loc_677427

loc_6773AE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6B7A50
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6773EC
call	sub_64B3B0

loc_6773EC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677427:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677370 endp




sub_677430 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+34h]
test	ebp, ebp
jz	short loc_67746E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67746E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67746E
add	eax, 4
jnz	short loc_6774E7

loc_67746E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6B86E0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6774AC
call	sub_64B3B0

loc_6774AC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6774E7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677430 endp




sub_6774F0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+2Ch]
test	ebp, ebp
jz	short loc_67752E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67752E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67752E
add	eax, 4
jnz	short loc_6775A7

loc_67752E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6BCB80
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67756C
call	sub_64B3B0

loc_67756C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6775A7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6774F0 endp




sub_6775B0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+7Ch]
test	ebp, ebp
jz	short loc_6775EE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6775EE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6775EE
add	eax, 4
jnz	short loc_677667

loc_6775EE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6BDF30
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67762C
call	sub_64B3B0

loc_67762C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677667:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6775B0 endp




sub_677670 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+84h]
test	ebp, ebp
jz	short loc_6776B1
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6776B1
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6776B1
add	eax, 4
jnz	short loc_67772A

loc_6776B1:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6BEF90
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6776EF
call	sub_64B3B0

loc_6776EF:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_67772A:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677670 endp

align 10h



sub_677740 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+50h]
test	ebp, ebp
jz	short loc_67777E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67777E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67777E
add	eax, 4
jnz	short loc_6777F7

loc_67777E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6C0070
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6777BC
call	sub_64B3B0

loc_6777BC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6777F7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677740 endp




sub_677800 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+5Ch]
test	ebp, ebp
jz	short loc_67783E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67783E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67783E
add	eax, 4
jnz	short loc_6778B7

loc_67783E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6C2080
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67787C
call	sub_64B3B0

loc_67787C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6778B7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677800 endp




sub_6778C0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+54h]
test	ebp, ebp
jz	short loc_6778FE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6778FE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6778FE
add	eax, 4
jnz	short loc_677977

loc_6778FE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6C2BE0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67793C
call	sub_64B3B0

loc_67793C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677977:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6778C0 endp




sub_677980 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+74h]
test	ebp, ebp
jz	short loc_6779BE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6779BE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6779BE
add	eax, 4
jnz	short loc_677A37

loc_6779BE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6C42B0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6779FC
call	sub_64B3B0

loc_6779FC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677A37:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677980 endp




sub_677A40 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+30h]
test	ebp, ebp
jz	short loc_677A7E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677A7E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677A7E
add	eax, 4
jnz	short loc_677AF7

loc_677A7E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6D54C0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_677ABC
call	sub_64B3B0

loc_677ABC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677AF7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677A40 endp




sub_677B00 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+88h]
test	ebp, ebp
jz	short loc_677B41
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677B41
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677B41
add	eax, 4
jnz	short loc_677BBA

loc_677B41:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6D8050
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_677B7F
call	sub_64B3B0

loc_677B7F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677BBA:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677B00 endp

align 10h



sub_677BD0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+0B4h]
test	ebp, ebp
jz	short loc_677C11
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677C11
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677C11
add	eax, 4
jnz	short loc_677C8A

loc_677C11:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6D9860
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_677C4F
call	sub_64B3B0

loc_677C4F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677C8A:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677BD0 endp

align 10h



sub_677CA0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+58h]
test	ebp, ebp
jz	short loc_677CDE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677CDE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677CDE
add	eax, 4
jnz	short loc_677D57

loc_677CDE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6DC520
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_677D1C
call	sub_64B3B0

loc_677D1C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677D57:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677CA0 endp




sub_677D60 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+0B8h]
test	ebp, ebp
jz	short loc_677DA1
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677DA1
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677DA1
add	eax, 4
jnz	short loc_677E1A

loc_677DA1:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6DE820
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_677DDF
call	sub_64B3B0

loc_677DDF:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677E1A:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677D60 endp

align 10h



sub_677E30 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+278h]
test	ebp, ebp
jz	short loc_677E71
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677E71
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677E71
add	eax, 4
jnz	short loc_677EEA

loc_677E71:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6DF1A0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_677EAF
call	sub_64B3B0

loc_677EAF:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677EEA:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677E30 endp

align 10h



sub_677F00 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+38h]
test	ebp, ebp
jz	short loc_677F3E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677F3E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677F3E
add	eax, 4
jnz	short loc_677FB7

loc_677F3E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E0750
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_677F7C
call	sub_64B3B0

loc_677F7C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_677FB7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677F00 endp




sub_677FC0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+3Ch]
test	ebp, ebp
jz	short loc_677FFE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_677FFE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_677FFE
add	eax, 4
jnz	short loc_678077

loc_677FFE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E2160
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67803C
call	sub_64B3B0

loc_67803C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_678077:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_677FC0 endp




sub_678080 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+40h]
test	ebp, ebp
jz	short loc_6780BE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6780BE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6780BE
add	eax, 4
jnz	short loc_678137

loc_6780BE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E35C0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6780FC
call	sub_64B3B0

loc_6780FC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_678137:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678080 endp




sub_678140 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+44h]
test	ebp, ebp
jz	short loc_67817E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67817E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67817E
add	eax, 4
jnz	short loc_6781F7

loc_67817E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E5EF0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6781BC
call	sub_64B3B0

loc_6781BC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6781F7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678140 endp




sub_678200 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+48h]
test	ebp, ebp
jz	short loc_67823E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67823E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67823E
add	eax, 4
jnz	short loc_6782B7

loc_67823E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E7510
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67827C
call	sub_64B3B0

loc_67827C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6782B7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678200 endp




sub_6782C0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+4Ch]
test	ebp, ebp
jz	short loc_6782FE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6782FE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6782FE
add	eax, 4
jnz	short loc_678377

loc_6782FE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E8BF0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67833C
call	sub_64B3B0

loc_67833C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_678377:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6782C0 endp




sub_678380 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+60h]
test	ebp, ebp
jz	short loc_6783BE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6783BE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6783BE
add	eax, 4
jnz	short loc_678437

loc_6783BE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E9150
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6783FC
call	sub_64B3B0

loc_6783FC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_678437:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678380 endp




sub_678440 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+78h]
test	ebp, ebp
jz	short loc_67847E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_67847E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_67847E
add	eax, 4
jnz	short loc_6784F7

loc_67847E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6E9910
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6784BC
call	sub_64B3B0

loc_6784BC:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6784F7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678440 endp




sub_678500 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+80h]
test	ebp, ebp
jz	short loc_678541
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_678541
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_678541
add	eax, 4
jnz	short loc_6785BA

loc_678541:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6EAA00
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67857F
call	sub_64B3B0

loc_67857F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6785BA:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678500 endp

align 10h



sub_6785D0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+9Ch]
test	ebp, ebp
jz	short loc_678611
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_678611
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_678611
add	eax, 4
jnz	short loc_67868A

loc_678611:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6A76A0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67864F
call	sub_64B3B0

loc_67864F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_67868A:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6785D0 endp

align 10h



sub_6786A0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+0A0h]
test	ebp, ebp
jz	short loc_6786E1
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6786E1
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6786E1
add	eax, 4
jnz	short loc_67875A

loc_6786E1:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6EBBF0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67871F
call	sub_64B3B0

loc_67871F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_67875A:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6786A0 endp

align 10h



sub_678770 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+0A4h]
test	ebp, ebp
jz	short loc_6787B1
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6787B1
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6787B1
add	eax, 4
jnz	short loc_67882A

loc_6787B1:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6ECAA0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6787EF
call	sub_64B3B0

loc_6787EF:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_67882A:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678770 endp

align 10h



sub_678840 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+0A8h]
test	ebp, ebp
jz	short loc_678881
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_678881
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_678881
add	eax, 4
jnz	short loc_6788FA

loc_678881:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6ED370
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6788BF
call	sub_64B3B0

loc_6788BF:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6788FA:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678840 endp

align 10h



sub_678910 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+0ACh]
test	ebp, ebp
jz	short loc_678951
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_678951
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_678951
add	eax, 4
jnz	short loc_6789CA

loc_678951:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6EE630
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_67898F
call	sub_64B3B0

loc_67898F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6789CA:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_678910 endp

align 10h



sub_6789E0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+0B0h]
test	ebp, ebp
jz	short loc_678A21
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_678A21
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_678A21
add	eax, 4
jnz	short loc_678A9A

loc_678A21:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_6EF110
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_678A5F
call	sub_64B3B0

loc_678A5F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_678A9A:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6789E0 endp

align 10h



sub_678AB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_672F10
test	[esp+4+arg_0], 1
jz	short loc_678ACD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_678ACD:
mov	eax, esi
pop	esi
retn	4
sub_678AB0 endp

align 10h


; Attributes: bp-based frame

sub_678AE0 proc	near

var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 6Ch
mov	eax, [ebp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	[esi+290h], eax
mov	eax, [eax+20h]
xor	ebx, ebx
push	edi
mov	[esi+294h], eax
mov	[esp+78h+var_54], esi
mov	byte ptr [esp+78h+var_50], 8
cmp	[esi+2ACh], ebx
jnz	short loc_678B46
mov	ecx, eax
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
cmp	eax, ebx
jz	short loc_678B2F
push	esi
mov	ecx, eax
call	sub_669400
mov	edi, eax
jmp	short loc_678B31

loc_678B2F:
xor	edi, edi

loc_678B31:
mov	ecx, [esi+2ACh]
cmp	ecx, ebx
jz	short loc_678B40
call	sub_64B3B0

loc_678B40:
mov	[esi+2ACh], edi

loc_678B46:
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
cmp	eax, ebx
jz	short loc_678B68
lea	ecx, [esp+78h+var_54]
push	ecx
mov	ecx, eax
call	sub_664230
jmp	short loc_678B6A

loc_678B68:
xor	eax, eax

loc_678B6A:
mov	ecx, [esi+294h]
mov	[esp+78h+var_28], eax
mov	[esp+78h+var_20], bl
mov	[esp+78h+var_24], ebx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
cmp	eax, ebx
jz	short loc_678B98
lea	ecx, [esp+78h+var_54]
push	ecx
mov	ecx, eax
call	sub_67C610
jmp	short loc_678B9A

loc_678B98:
xor	eax, eax

loc_678B9A:
mov	ecx, [esi+294h]
mov	[esp+78h+var_4C], eax
mov	[esp+78h+var_44], bl
mov	[esp+78h+var_48], ebx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	54h
call	eax
cmp	eax, ebx
jz	short loc_678BCD
lea	ecx, [esp+78h+var_28]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, eax
call	sub_665D50
jmp	short loc_678BCF

loc_678BCD:
xor	eax, eax

loc_678BCF:
mov	ecx, [esi+294h]
mov	[esp+78h+var_68], eax
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	54h
call	edx
cmp	eax, ebx
jz	short loc_678C01
mov	edx, [esp+78h+var_68]
push	1
lea	ecx, [esp+7Ch+var_4C]
push	ecx
push	edx
lea	ecx, [esp+84h+var_54]
push	ecx
mov	ecx, eax
call	sub_67C6C0
jmp	short loc_678C03

loc_678C01:
xor	eax, eax

loc_678C03:
mov	ecx, [esp+78h+var_28]
mov	[esp+78h+var_64], eax
mov	edx, [ecx+10h]
mov	edx, [edx+34h]
add	ecx, 10h
push	eax
lea	eax, [esp+7Ch+var_54]
push	eax
call	edx
mov	ecx, [esp+78h+var_4C]
mov	edx, [esp+78h+var_64]
mov	eax, [ecx+10h]
mov	eax, [eax+34h]
add	ecx, 10h
push	edx
lea	edx, [esp+7Ch+var_54]
push	edx
call	eax
lea	ecx, [esp+78h+var_68]
push	ecx
lea	edx, [esp+7Ch+var_58]
lea	edi, [esi+284h]
push	edx
mov	ecx, edi
mov	[esp+80h+var_58], 1
call	sub_661470
lea	eax, [esp+78h+var_64]
push	eax
lea	ecx, [esp+7Ch+var_58]
push	ecx
mov	ecx, edi
mov	[esp+80h+var_58], 7
call	sub_661470
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_678CA3
push	offset sub_67E7A0
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, ebx
call	sub_67C3D0
mov	dword ptr [ebx], offset	off_1432CA0
mov	dword ptr [ebx+10h], offset off_1439710
jmp	short loc_678CA5

loc_678CA3:
xor	ebx, ebx

loc_678CA5:
mov	ecx, [esi+294h]
mov	[esp+78h+var_2C], 0
mov	[esp+78h+var_34], ebx
mov	[esp+78h+var_30], 0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	100h
call	eax
test	eax, eax
jz	short loc_678CE0
mov	ecx, [ebp+arg_0]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, eax
call	sub_6EF580
jmp	short loc_678CE2

loc_678CE0:
xor	eax, eax

loc_678CE2:
mov	ecx, [esi+294h]
mov	byte ptr [esp+78h+var_38], 0
mov	[esp+78h+var_40], eax
mov	[esp+78h+var_3C], 0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	54h
call	edx
test	eax, eax
jz	short loc_678D20
mov	edx, [esp+78h+var_68]
lea	ecx, [esp+78h+var_40]
push	ecx
push	edx
lea	ecx, [esp+80h+var_54]
push	ecx
mov	ecx, eax
call	sub_6EFA00
jmp	short loc_678D22

loc_678D20:
xor	eax, eax

loc_678D22:
lea	edx, [esp+78h+var_5C]
mov	[esp+78h+var_5C], eax
push	edx
lea	eax, [esp+7Ch+var_58]
push	eax
mov	ecx, edi
mov	[esp+80h+var_58], 1Ah
call	sub_661470
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	5Ch
call	eax
test	eax, eax
jz	short loc_678D6C
mov	edx, [esp+78h+var_68]
lea	ecx, [esp+78h+var_34]
push	ecx
push	edx
lea	ecx, [esp+80h+var_54]
push	ecx
mov	ecx, eax
call	sub_689A00
jmp	short loc_678D6E

loc_678D6C:
xor	eax, eax

loc_678D6E:
lea	edx, [esp+78h+var_60]
mov	[esp+78h+var_60], eax
push	edx
lea	eax, [esp+7Ch+var_58]
push	eax
mov	ecx, edi
mov	[esp+80h+var_58], 6
call	sub_661470
mov	eax, [esi+2ACh]
test	eax, eax
jz	short loc_678D9A
add	eax, 10h
jmp	short loc_678D9C

loc_678D9A:
xor	eax, eax

loc_678D9C:
push	0
push	offset off_167D618
lea	ecx, [esp+80h+var_54]
push	ecx
push	eax
call	sub_66FC60
mov	edi, [esi+2ACh]
add	esp, 10h
push	offset sub_668800
lea	edx, [esp+7Ch+var_54]
push	edx
lea	ecx, [esp+80h+var_10]
call	sub_651D30
push	eax
push	offset aImecommand ; "imecommand"
lea	eax, [esp+80h+var_54]
push	eax
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	edi, [esi+2ACh]
push	offset sub_66BCE0
lea	ecx, [esp+7Ch+var_54]
push	ecx
lea	ecx, [esp+80h+var_10]
call	sub_651D30
push	eax
push	offset aSetimecandidat ; "setIMECandidateListStyle"
lea	edx, [esp+80h+var_54]
push	edx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	edi, [esi+2ACh]
push	offset sub_6688E0
lea	eax, [esp+7Ch+var_54]
push	eax
lea	ecx, [esp+80h+var_10]
call	sub_651D30
push	eax
push	offset aGetinputlangua ; "getInputLanguage"
lea	ecx, [esp+80h+var_54]
push	ecx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	edi, [esi+2ACh]
push	offset sub_66C360
lea	edx, [esp+7Ch+var_54]
push	edx
lea	ecx, [esp+80h+var_10]
call	sub_651D30
push	eax
push	offset aGetimecandidat ; "getIMECandidateListStyle"
lea	eax, [esp+80h+var_54]
push	eax
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	edi, [esi+2ACh]
push	offset sub_66BA00
lea	ecx, [esp+7Ch+var_54]
push	ecx
lea	ecx, [esp+80h+var_10]
call	sub_651D30
push	eax
push	offset aScreentoworld ;	"screenToWorld"
lea	edx, [esp+80h+var_54]
push	edx
lea	ecx, [edi+10h]
call	sub_669260
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	ebx, [esi+2ACh]
add	ebx, 10h
mov	[esp+78h+var_69], 0
mov	edi, [ebx]
lea	eax, [esp+78h+var_69]
push	eax
lea	ecx, [esp+7Ch+var_28]
push	ecx
lea	ecx, [esp+80h+var_10]
add	edi, 28h
call	sub_651E70
push	eax
lea	edx, [esi+0Ch]
push	edx
mov	edx, [edi]
lea	eax, [esp+84h+var_54]
push	eax
mov	ecx, ebx
call	edx
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	ebx, [esi+2ACh]
lea	eax, [esp+78h+var_69]
push	eax
lea	ecx, [esp+7Ch+var_4C]
add	ebx, 10h
mov	[esp+7Ch+var_69], 0
mov	edi, [ebx]
push	ecx
lea	ecx, [esp+80h+var_10]
add	edi, 28h
call	sub_651E70
push	eax
lea	edx, [esi+24h]
push	edx
mov	edx, [edi]
lea	eax, [esp+84h+var_54]
push	eax
mov	ecx, ebx
call	edx
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	eax, [esi+2ACh]
lea	ebx, [eax+10h]
lea	eax, [esp+78h+var_69]
push	eax
lea	ecx, [esp+7Ch+var_34]
mov	[esp+7Ch+var_69], 0
mov	edi, [ebx]
push	ecx
lea	ecx, [esp+80h+var_10]
add	edi, 28h
call	sub_651E70
push	eax
lea	edx, [esi+20h]
push	edx
mov	edx, [edi]
lea	eax, [esp+84h+var_54]
push	eax
mov	ecx, ebx
call	edx
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	eax, [esi+2ACh]
lea	ebx, [eax+10h]
lea	eax, [esp+78h+var_69]
push	eax
lea	ecx, [esp+7Ch+var_40]
mov	[esp+7Ch+var_69], 0
mov	edi, [ebx]
push	ecx
lea	ecx, [esp+80h+var_10]
add	edi, 28h
call	sub_651E70
push	eax
lea	edx, [esi+70h]
push	edx
mov	edx, [edi]
lea	eax, [esp+84h+var_54]
push	eax
mov	ecx, ebx
call	edx
lea	ecx, [esp+78h+var_10]
call	sub_652830
mov	eax, [esi+2ACh]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_677070
mov	edx, [esi+2ACh]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_677130
mov	ecx, [esi+2ACh]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_6771F0
mov	eax, [esi+2ACh]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_6772B0
mov	edx, [esi+2ACh]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_677370
mov	ecx, [esi+2ACh]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_677430
mov	eax, [esi+2ACh]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_6774F0
mov	edx, [esi+2ACh]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_6775B0
mov	ecx, [esi+2ACh]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_677670
mov	eax, [esi+2ACh]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_677740
mov	edx, [esi+2ACh]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_677800
mov	ecx, [esi+2ACh]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_6778C0
mov	eax, [esi+2ACh]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_677980
mov	edx, [esi+2ACh]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_677A40
mov	ecx, [esi+2ACh]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_677B00
mov	eax, [esi+2ACh]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_677BD0
mov	edx, [esi+2ACh]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_677CA0
mov	ecx, [esi+2ACh]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_677D60
mov	eax, [esi+2ACh]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_677E30
mov	edx, [esp+78h+var_68]
mov	eax, [esi+2ACh]
push	offset aFlash_geom ; "flash.geom"
push	edx		; int
push	eax		; int
lea	eax, [esp+84h+var_54]
push	eax		; int
call	sub_66C710
add	esp, 10h
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
mov	[esi+298h], eax
call	sub_677F00
mov	edx, [esi+298h]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_677FC0
mov	ecx, [esi+298h]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_678080
mov	eax, [esi+298h]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_678140
mov	edx, [esi+298h]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_678200
mov	ecx, [esp+78h+var_68]
mov	eax, [esi+2ACh]
push	offset aSystem	; "System"
push	ecx		; int
push	eax		; int
lea	edx, [esp+84h+var_54]
push	edx		; int
call	sub_66C710
add	esp, 10h
mov	[esi+29Ch], eax
push	eax
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_6782C0
mov	ecx, [esi+29Ch]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_678380
mov	ecx, [esp+78h+var_68]
mov	eax, [esi+2ACh]
push	offset aFlash_external ; "flash.external"
push	ecx		; int
push	eax		; int
lea	edx, [esp+84h+var_54]
push	edx		; int
call	sub_66C710
add	esp, 10h
push	eax
mov	[esi+2A0h], eax
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_678440
mov	ecx, [esp+78h+var_68]
mov	eax, [esi+2ACh]
push	offset aFlash_display ;	"flash.display"
push	ecx		; int
push	eax		; int
lea	edx, [esp+84h+var_54]
push	edx		; int
call	sub_66C710
add	esp, 10h
push	eax
mov	[esi+2A4h], eax
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_678500
mov	ecx, [esp+78h+var_68]
mov	eax, [esi+2ACh]
push	offset aFlash_filters ;	"flash.filters"
push	ecx		; int
push	eax		; int
lea	edx, [esp+84h+var_54]
push	edx		; int
call	sub_66C710
add	esp, 10h
push	eax
mov	[esi+2A8h], eax
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_6785D0
mov	ecx, [esi+2A8h]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_6786A0
mov	eax, [esi+2A8h]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_678770
mov	edx, [esi+2A8h]
push	edx
lea	eax, [esp+7Ch+var_54]
push	eax
mov	ecx, esi
call	sub_678840
mov	ecx, [esi+2A8h]
push	ecx
lea	edx, [esp+7Ch+var_54]
push	edx
mov	ecx, esi
call	sub_678910
mov	eax, [esi+2A8h]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_6789E0
push	esi
call	sub_65A440
mov	eax, [esi+2ACh]
xor	edi, edi
add	esp, 4
mov	[esp+78h+var_1C], offset off_1432FC0
cmp	eax, edi
jz	short loc_6792FC
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_6792FC:
mov	esi, [esi+2ACh]
mov	[esp+78h+var_18], eax
push	edi
lea	eax, [esp+7Ch+var_54]
mov	[esp+7Ch+var_14], eax
mov	edx, [esi+10h]
mov	edx, [edx+20h]
push	4
lea	eax, [esp+80h+var_1C]
lea	ecx, [esi+10h]
push	eax
lea	eax, [esp+84h+var_54]
push	eax
call	edx
mov	ecx, [esp+78h+var_18]
cmp	ecx, edi
jz	short loc_679333
call	sub_64B3B0

loc_679333:
mov	ecx, [esp+78h+var_60]
mov	[esp+78h+var_1C], offset off_15818F8
cmp	ecx, edi
jz	short loc_679348
call	sub_64B3B0

loc_679348:
mov	ecx, [esp+78h+var_5C]
cmp	ecx, edi
jz	short loc_679355
call	sub_64B3B0

loc_679355:
mov	bl, 2
test	byte ptr [esp+78h+var_38], bl
jnz	short loc_67936A
mov	ecx, [esp+78h+var_40]
cmp	ecx, edi
jz	short loc_67936A
call	sub_64B3B0

loc_67936A:
test	byte ptr [esp+78h+var_38], 1
mov	[esp+78h+var_40], edi
jnz	short loc_679382
mov	ecx, [esp+78h+var_3C]
cmp	ecx, edi
jz	short loc_679382
call	sub_64B3B0

loc_679382:
mov	[esp+78h+var_3C], edi
test	[esp+78h+var_2C], bl
jnz	short loc_679399
mov	ecx, [esp+78h+var_34]
cmp	ecx, edi
jz	short loc_679399
call	sub_64B3B0

loc_679399:
test	[esp+78h+var_2C], 1
mov	[esp+78h+var_34], edi
jnz	short loc_6793B1
mov	ecx, [esp+78h+var_30]
cmp	ecx, edi
jz	short loc_6793B1
call	sub_64B3B0

loc_6793B1:
mov	ecx, [esp+78h+var_64]
mov	[esp+78h+var_30], edi
cmp	ecx, edi
jz	short loc_6793C2
call	sub_64B3B0

loc_6793C2:
mov	ecx, [esp+78h+var_68]
cmp	ecx, edi
jz	short loc_6793CF
call	sub_64B3B0

loc_6793CF:
test	[esp+78h+var_44], bl
jnz	short loc_6793E2
mov	ecx, [esp+78h+var_4C]
cmp	ecx, edi
jz	short loc_6793E2
call	sub_64B3B0

loc_6793E2:
test	[esp+78h+var_44], 1
mov	[esp+78h+var_4C], edi
jnz	short loc_6793FA
mov	ecx, [esp+78h+var_48]
cmp	ecx, edi
jz	short loc_6793FA
call	sub_64B3B0

loc_6793FA:
mov	[esp+78h+var_48], edi
test	[esp+78h+var_20], bl
jnz	short loc_679411
mov	ecx, [esp+78h+var_28]
cmp	ecx, edi
jz	short loc_679411
call	sub_64B3B0

loc_679411:
test	[esp+78h+var_20], 1
mov	[esp+78h+var_28], edi
jnz	short loc_679429
mov	ecx, [esp+78h+var_24]
cmp	ecx, edi
jz	short loc_679429
call	sub_64B3B0

loc_679429:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_678AE0 endp

align 10h



sub_679440 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
mov	edx, [eax+0Ch]
mov	eax, [esp+arg_0]
push	0
push	0
push	0
push	edx
push	0
push	eax
call	sub_673290
retn	4
sub_679440 endp

align 10h



sub_679460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	eax
lea	ecx, [esi+8]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437CB4
call	sub_6B6130
mov	ecx, [esp+4+arg_0]
xor	eax, eax
mov	dword ptr [esi], offset	off_143335C
mov	[esi+284h], eax
mov	[esi+288h], eax
mov	[esi+28Ch], eax
mov	[esi+2ACh], eax
mov	[esi+2B0h], al
push	ecx
mov	[esi+2B1h], al
mov	ecx, esi
mov	[esi+2B4h], eax
call	sub_678AE0
mov	eax, esi
pop	esi
retn	8
sub_679460 endp

align 10h



; int __cdecl sub_6794D0(char *DstBuf, size_t SizeInBytes, char	*Format, char ArgList)
sub_6794D0 proc	near

DstBuf=	dword ptr  4
SizeInBytes= dword ptr	8
Format=	dword ptr  0Ch
ArgList= byte ptr  10h

mov	ecx, [esp+Format]
mov	edx, [esp+SizeInBytes]
lea	eax, [esp+ArgList]
push	eax		; ArgList
mov	eax, [esp+4+DstBuf]
push	ecx		; Format
push	0FFFFFFFFh	; MaxCount
push	edx		; SizeInBytes
push	eax		; DstBuf
call	__vsnprintf_s
add	esp, 14h
retn
sub_6794D0 endp

align 10h



sub_6794F0 proc	near
fld	ds:dbl_143342C
retn
sub_6794F0 endp

align 10h



sub_679500 proc	near
fld	ds:dbl_1433434
retn
sub_679500 endp

align 10h



sub_679510 proc	near
fld	ds:dbl_143343C
retn
sub_679510 endp

align 10h



sub_679520 proc	near
fld	ds:dbl_1433444
retn
sub_679520 endp

align 10h



sub_679530 proc	near
fld	ds:dbl_143344C
retn
sub_679530 endp

align 10h



sub_679540 proc	near

arg_0= byte ptr	 4

mov	eax, 8
mov	ecx, offset unk_143345C
lea	edx, [esp+arg_0]
push	esi
nop

loc_679550:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_679573
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_679550
xor	eax, eax
xor	edx, edx
test	eax, eax
setz	dl
mov	al, dl
pop	esi
retn	8

loc_679573:
movzx	eax, byte ptr [edx]
movzx	esi, byte ptr [ecx]
sub	eax, esi
jnz	short loc_67959F
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_67959F
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_67959F
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_67959F:
sar	eax, 1Fh
or	eax, 1
xor	edx, edx
test	eax, eax
setz	dl
mov	al, dl
pop	esi
retn	8
sub_679540 endp

align 10h



sub_6795C0 proc	near

arg_0= byte ptr	 4

mov	eax, 8
mov	ecx, offset unk_1433454
lea	edx, [esp+arg_0]
push	esi
nop

loc_6795D0:
mov	esi, [edx]
cmp	esi, [ecx]
jnz	short loc_6795F3
sub	eax, 4
add	ecx, 4
add	edx, 4
cmp	eax, 4
jnb	short loc_6795D0
xor	eax, eax
xor	edx, edx
test	eax, eax
setz	dl
mov	al, dl
pop	esi
retn	8

loc_6795F3:
movzx	eax, byte ptr [edx]
movzx	esi, byte ptr [ecx]
sub	eax, esi
jnz	short loc_67961F
movzx	eax, byte ptr [edx+1]
movzx	esi, byte ptr [ecx+1]
sub	eax, esi
jnz	short loc_67961F
movzx	eax, byte ptr [edx+2]
movzx	esi, byte ptr [ecx+2]
sub	eax, esi
jnz	short loc_67961F
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_67961F:
sar	eax, 1Fh
or	eax, 1
xor	edx, edx
test	eax, eax
setz	dl
mov	al, dl
pop	esi
retn	8
sub_6795C0 endp

align 10h



sub_679640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [esp+0Ch+arg_8]
dec	edi
lea	esi, [edi+eax]
mov	byte ptr [esi],	0
test	ecx, ecx
jge	short loc_67965C
neg	ecx

loc_67965C:
xor	ebp, ebp
test	edi, edi
jbe	short loc_67969F
push	ebx

loc_679663:
mov	eax, 0CCCCCCCDh
mul	ecx
shr	edx, 3
mov	al, dl
mov	bl, 0Ah
imul	bl
sub	cl, al
add	cl, 30h
dec	esi
mov	[esi], cl
mov	ecx, edx
test	ecx, ecx
jz	short loc_67968F
inc	ebp
cmp	ebp, edi
jb	short loc_679663
pop	ebx
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	0Ch

loc_67968F:
cmp	ebp, edi
jnb	short loc_67969E
cmp	[esp+10h+arg_0], 0
jge	short loc_67969E
dec	esi
mov	byte ptr [esi],	2Dh

loc_67969E:
pop	ebx

loc_67969F:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	0Ch
sub_679640 endp

align 10h



sub_6796B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_4]
mov	ecx, [esp+arg_C]
sub	ecx, 2
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
lea	ebp, [ebx-1]
lea	eax, [edx+ebp]
push	esi
mov	byte ptr [eax],	0
jz	loc_679751
sub	ecx, 6
jz	short loc_67972A
sub	ecx, 8
jz	short loc_6796ED
mov	eax, [esp+0Ch+arg_0]
push	ebx
push	edx
push	eax
call	sub_679640
pop	esi
pop	ebp
pop	ebx
retn	10h

loc_6796ED:
mov	edx, [esp+0Ch+arg_0]
xor	esi, esi
test	ebp, ebp
jbe	loc_679797
jmp	short loc_679700
align 10h

loc_679700:
mov	cl, dl
and	cl, 0Fh
dec	eax
cmp	cl, 9
movzx	ecx, cl
ja	short loc_679713
add	ecx, 30h
jmp	short loc_679716

loc_679713:
add	ecx, 57h

loc_679716:
shr	edx, 4
mov	[eax], cl
test	edx, edx
jz	short loc_679797
inc	esi
cmp	esi, ebp
jb	short loc_679700
pop	esi
pop	ebp
pop	ebx
retn	10h

loc_67972A:
mov	ecx, [esp+0Ch+arg_0]
xor	esi, esi
test	ebp, ebp
jbe	short loc_679797

loc_679734:
mov	dl, cl
and	dl, 7
dec	eax
add	dl, 30h
shr	ecx, 3
mov	[eax], dl
test	ecx, ecx
jz	short loc_679797
inc	esi
cmp	esi, ebp
jb	short loc_679734
pop	esi
pop	ebp
pop	ebx
retn	10h

loc_679751:
push	edi
mov	edi, [esp+10h+arg_0]
xor	esi, esi
mov	edx, 1
xor	ecx, ecx
nop

loc_679760:
cmp	ecx, ebp
jnb	short loc_679782
dec	eax
test	edi, edx
jz	short loc_679770
mov	byte ptr [eax],	31h
mov	esi, eax
jmp	short loc_679773

loc_679770:
mov	byte ptr [eax],	30h

loc_679773:
add	edx, edx
jnz	short loc_67977C
mov	edx, 1

loc_67977C:
inc	ecx
cmp	ecx, 20h
jb	short loc_679760

loc_679782:
pop	edi
test	esi, esi
jnz	short loc_679795
mov	eax, [esp+0Ch+arg_4]
pop	esi
pop	ebp
lea	eax, [eax+ebx-2]
pop	ebx
retn	10h

loc_679795:
mov	eax, esi

loc_679797:
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_6796B0 endp

align 10h



; int __stdcall	sub_6797A0(double, char	*DstBuf, rsize_t SizeInBytes, int)
sub_6797A0 proc	near

var_10=	qword ptr -10h
arg_0= qword ptr  4
DstBuf=	dword ptr  0Ch
SizeInBytes= dword ptr	10h
arg_10=	dword ptr  14h

mov	ecx, [esp+arg_10]
push	esi
push	edi
mov	esi, offset a_14g ; "%.14g"
test	ecx, ecx
jg	short loc_6797C9
cmp	ecx, 0FFFFFFF2h
jl	short loc_6797B8
neg	ecx
jmp	short loc_6797BD

loc_6797B8:
mov	ecx, 0Eh

loc_6797BD:
mov	esi, ds:Src[ecx*4]
mov	ecx, 0Ah

loc_6797C9:
fld	[esp+8+arg_0]
mov	edi, [esp+8+DstBuf]
fst	[esp+8+arg_0]
mov	eax, dword ptr [esp+8+arg_0+4]
and	eax, 7FF00000h
xor	edx, edx
jnz	loc_67989B
cmp	eax, 7FF00000h
jnz	loc_67989B
fst	[esp+8+arg_0]
mov	ecx, dword ptr [esp+8+arg_0+4]
mov	eax, ecx
and	eax, 7FF00000h
xor	edx, edx
jnz	short loc_679835
cmp	eax, 7FF00000h
jnz	short loc_679835
mov	eax, dword ptr [esp+8+arg_0]
and	ecx, 0FFFFFh
or	eax, ecx
jz	short loc_679835
mov	eax, [esp+8+SizeInBytes]
fstp	st
push	offset Src	; Src
push	eax		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	esi
retn	14h

loc_679835:
fst	[esp+8+arg_0]
cmp	dword ptr [esp+8+arg_0], edx
jnz	short loc_679865
cmp	dword ptr [esp+8+arg_0+4], 7FF00000h
jnz	short loc_679865
mov	ecx, [esp+8+SizeInBytes]
fstp	st
push	offset aInfinity ; "Infinity"
push	ecx		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	esi
retn	14h

loc_679865:
fstp	[esp+8+arg_0]
cmp	dword ptr [esp+8+arg_0], edx
jnz	loc_679903
cmp	dword ptr [esp+8+arg_0+4], 0FFF00000h
jnz	loc_679903
mov	edx, [esp+8+SizeInBytes]
push	offset aInfinity_0 ; "-Infinity"
push	edx		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	esi
retn	14h

loc_67989B:
cmp	ecx, 0Ah
jnz	short loc_67990A
fld	st
call	__ftol2_sse
mov	ecx, eax
mov	[esp+8+arg_10],	ecx
fild	[esp+8+arg_10]
fucomp	st(1)
fnstsw	ax
test	ah, 44h
mov	eax, [esp+8+SizeInBytes]
jp	short loc_6798CF
push	eax
fstp	st
mov	edx, edi
push	edx
push	ecx
call	sub_679640
pop	edi
pop	esi
retn	14h

loc_6798CF:
sub	esp, 8
fstp	[esp+10h+var_10]
push	esi		; Format
push	eax		; SizeInBytes
push	edi		; DstBuf
call	sub_6794D0
add	esp, 14h
cmp	byte ptr [edi],	0
mov	eax, edi
jz	short loc_679903

loc_6798E7:
mov	cl, [eax]
cmp	cl, 2Ch
jz	short loc_679900
cmp	cl, 2Eh
jz	short loc_679900
inc	eax
cmp	byte ptr [eax],	0
jnz	short loc_6798E7
mov	eax, edi
pop	edi
pop	esi
retn	14h

loc_679900:
mov	byte ptr [eax],	2Eh

loc_679903:
mov	eax, edi
pop	edi
pop	esi
retn	14h

loc_67990A:
push	ecx
mov	ecx, [esp+0Ch+SizeInBytes]
push	ecx
mov	edx, edi
push	edx
call	__ftol2_sse
push	eax
call	sub_6796B0
pop	edi
pop	esi
retn	14h
sub_6797A0 endp

align 10h



sub_679930 proc	near
push	esi
mov	esi, [ecx]
and	esi, 0FFFFFFFCh
mov	eax, [esi]
push	edi
mov	edi, eax
shr	eax, 1Fh
and	edi, 7FFFFFFFh
test	al, 1
jz	short loc_67994D
mov	eax, edi
pop	edi
pop	esi
retn

loc_67994D:
push	edi
lea	eax, [esi+8]
push	eax
call	sub_67BC50
cmp	eax, edi
jnz	short loc_679961
or	dword ptr [esi], 80000000h

loc_679961:
pop	edi
pop	esi
retn
sub_679930 endp

align 10h



sub_679970 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
and	eax, 0FFFFFFFCh
push	esi
mov	esi, [esp+4+arg_0]
lea	ecx, [eax+8]
mov	[esp+4+arg_0], ecx
mov	edx, [eax]
shr	edx, 1Fh
test	dl, 1
jz	short loc_6799A0
add	[esp+4+arg_0], esi
lea	eax, [esp+4+arg_0]
push	eax
call	sub_67B600
pop	esi
retn	4
align 10h

loc_6799A0:
lea	ecx, [esp+4+arg_0]
push	ecx
call	sub_67B600
dec	esi
test	eax, eax
jz	short loc_6799B7
test	esi, esi
jge	short loc_6799A0
pop	esi
retn	4

loc_6799B7:
xor	eax, eax
pop	esi
retn	4
sub_679970 endp

align 10h



sub_6799C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
and	eax, 0FFFFFFFCh
push	esi
mov	esi, [esp+4+arg_0]
add	eax, 8
mov	[esp+4+arg_0], eax

loc_6799D1:
lea	ecx, [esp+4+arg_0]
push	ecx
call	sub_67B600
dec	esi
test	eax, eax
jz	short loc_6799F2
test	esi, esi
jge	short loc_6799D1
mov	edx, [esp+4+arg_4]
mov	ecx, [esp+4+arg_0]
mov	[edx], ecx
pop	esi
retn	8

loc_6799F2:
xor	eax, eax
pop	esi
retn	8
sub_6799C0 endp

align 10h


; Attributes: thunk

sub_679A00 proc	near
jmp	sub_67B600
sub_679A00 endp

align 10h



; int __stdcall	sub_679A10(char	*, char	*)
sub_679A10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	eax		; char *
push	ecx		; char *
call	j___stricmp
add	esp, 8
retn	8
sub_679A10 endp

align 10h



sub_679A30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
test	ebx, ebx
jz	short loc_679AB0
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	[esp+0Ch+arg_8], ebx
mov	ecx, esi
push	ebp
lea	ebx, [ebx+0]

loc_679A50:
movsx	edx, byte ptr [edi]
lea	eax, [edx-41h]
cmp	eax, 19h
lea	eax, [edx+20h]
jbe	short loc_679A60
mov	eax, edx

loc_679A60:
movsx	edx, byte ptr [esi]
lea	ebp, [edx-41h]
inc	edi
cmp	ebp, 19h
ja	short loc_679A6F
add	edx, 20h

loc_679A6F:
inc	esi
sub	ebx, 1
jz	short loc_679A82
test	eax, eax
jz	short loc_679A82
cmp	eax, edx
jnz	short loc_679AA7
cmp	byte ptr [esi],	0
jnz	short loc_679A50

loc_679A82:
cmp	eax, edx
jnz	short loc_679AA7
test	ebx, ebx
jnz	short loc_679A8E
cmp	[esi], bl
jz	short loc_679AA7

loc_679A8E:
lea	esi, [ecx+1]

loc_679A91:
mov	dl, [ecx]
inc	ecx
test	dl, dl
jnz	short loc_679A91
mov	eax, [esp+10h+arg_8]
pop	ebp
pop	edi
sub	ecx, esi
pop	esi
sub	eax, ecx
pop	ebx
retn	0Ch

loc_679AA7:
pop	ebp
pop	edi
pop	esi
sub	eax, edx
pop	ebx
retn	0Ch

loc_679AB0:
mov	eax, [esp+4+arg_4]
lea	edx, [eax+1]

loc_679AB7:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_679AB7
sub	eax, edx
neg	eax
pop	ebx
retn	0Ch
sub_679A30 endp

align 10h



sub_679AD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_8]
test	ecx, ecx
jbe	short locret_679AF9
mov	edx, [esp+arg_0]
push	esi
push	edi

loc_679AE2:
movzx	esi, byte ptr [edx+ecx-1]
dec	ecx
mov	edi, eax
shl	edi, 5
add	edi, eax
xor	esi, edi
mov	eax, esi
test	ecx, ecx
ja	short loc_679AE2
pop	edi
pop	esi

locret_679AF9:
retn	0Ch
sub_679AD0 endp

align 10h



sub_679B00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	eax, [esp+arg_8]
test	edx, edx
jbe	short locret_679B32
push	esi
mov	esi, [esp+4+arg_0]
push	edi

loc_679B12:
movzx	ecx, byte ptr [esi+edx-1]
dec	edx
lea	edi, [ecx-41h]
cmp	edi, 19h
ja	short loc_679B23
add	ecx, 20h

loc_679B23:
mov	edi, eax
shl	edi, 5
add	eax, edi
xor	eax, ecx
test	edx, edx
ja	short loc_679B12
pop	edi
pop	esi

locret_679B32:
retn	0Ch
sub_679B00 endp

align 10h



sub_679B40 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+10h], cl
mov	ecx, [esp+arg_0]
mov	dword ptr [eax+0Ch], 200h
mov	[eax+14h], ecx
retn	4
sub_679B40 endp




sub_679B60 proc	near
mov	eax, [ecx]
test	eax, eax
jz	short locret_679B74
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

locret_679B74:
retn
sub_679B60 endp

align 10h



sub_679B80 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
jnz	short loc_679B9E
push	eax
mov	eax, [esi]
push	eax
call	sub_67BC50
cmp	eax, [esi+4]
jnz	short loc_679B9E
mov	byte ptr [esi+10h], 1

loc_679B9E:
pop	esi
retn
sub_679B80 endp




sub_679BA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, [esi+8]
jb	short loc_679BE5
mov	ecx, [esi+0Ch]
mov	edx, [esi]
add	eax, ecx
dec	ecx
not	ecx
and	eax, ecx
mov	[esi+8], eax
test	edx, edx
jnz	short loc_679BD2
mov	ecx, [esi+14h]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	[esi], eax
pop	esi
retn	4

loc_679BD2:
mov	ecx, dword_1855FC0
push	edi
mov	edi, [ecx]
push	eax
push	edx
mov	edx, [edi+2Ch]
call	edx
pop	edi
mov	[esi], eax

loc_679BE5:
pop	esi
retn	4
sub_679BA0 endp

align 10h



sub_679BF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jb	short loc_679C33
mov	ecx, [esi+0Ch]
mov	edx, [esi]
lea	eax, [ecx+edi]
dec	ecx
not	ecx
and	eax, ecx
mov	[esi+8], eax
test	edx, edx
jnz	short loc_679C20
mov	ecx, [esi+14h]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
jmp	short loc_679C31

loc_679C20:
mov	ecx, dword_1855FC0
push	ebx
mov	ebx, [ecx]
push	eax
push	edx
mov	edx, [ebx+2Ch]
call	edx
pop	ebx

loc_679C31:
mov	[esi], eax

loc_679C33:
mov	byte ptr [esi+10h], 0
mov	[esi+4], edi
mov	esi, [esi]
test	esi, esi
jz	short loc_679C44
mov	byte ptr [esi+edi], 0

loc_679C44:
pop	edi
pop	esi
retn	4
sub_679BF0 endp

align 10h



sub_679C50 proc	near
push	0
call	sub_679BF0
retn
sub_679C50 endp

align 10h



sub_679C60 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+4]
push	eax
lea	ecx, [esp+1Ch+var_10]
push	ecx
lea	edx, [esp+20h+var_C]
push	edx
mov	[esp+24h+var_10], 0
call	sub_67B920
mov	eax, [esp+18h+var_10]
add	eax, edi
push	eax
mov	ecx, esi
call	sub_679BF0
mov	ecx, [esp+18h+var_10]
mov	eax, [esi]
push	ecx
lea	edx, [esp+1Ch+var_C]
push	edx
add	eax, edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+24h+var_4]
add	esp, 0Ch
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn	4
sub_679C60 endp

align 10h



sub_679CD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	ebx, ebx
jz	short loc_679D04
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	edi
push	ebp
push	ebx
call	sub_67BA40
mov	edi, [esi+4]
add	eax, edi
push	eax
mov	ecx, esi
call	sub_679BF0
mov	ecx, [esi]
push	ebp
push	ebx
add	ecx, edi
push	ecx
call	sub_67BB00
pop	edi
pop	ebp

loc_679D04:
pop	esi
pop	ebx
retn	8
sub_679CD0 endp

align 10h



sub_679D10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, ecx
test	ebp, ebp
jz	short loc_679D5B
push	esi
mov	esi, [esp+0Ch+arg_4]
test	esi, esi
jz	short loc_679D5A
cmp	esi, 0FFFFFFFFh
jnz	short loc_679D3B
mov	eax, ebp
lea	edx, [eax+1]
nop

loc_679D30:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_679D30
sub	eax, edx
mov	esi, eax

loc_679D3B:
push	edi
mov	edi, [ebx+4]
lea	eax, [edi+esi]
push	eax
mov	ecx, ebx
call	sub_679BF0
mov	ecx, [ebx]
push	esi
add	ecx, edi
push	ebp
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi

loc_679D5A:
pop	esi

loc_679D5B:
pop	ebp
pop	ebx
retn	8
sub_679D10 endp




sub_679D60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebx, [esi+4]
push	edi
test	eax, eax
jge	short loc_679D81
mov	eax, [esp+10h+arg_0]
lea	edx, [eax+1]

loc_679D78:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_679D78
sub	eax, edx

loc_679D81:
cmp	byte ptr [esi+10h], 0
mov	[esp+10h+arg_8], eax
jz	short loc_679D91
mov	ebp, [esp+10h+arg_4]
jmp	short loc_679DA2

loc_679D91:
mov	eax, [esi]
mov	ecx, [esp+10h+arg_4]
push	0FFFFFFFFh
push	eax
push	ecx
call	sub_67BCC0
mov	ebp, eax

loc_679DA2:
mov	edx, [esp+10h+arg_8]
lea	edi, [edx+ebx]
cmp	edi, [esi+8]
jb	short loc_679DF0
mov	ecx, [esi+0Ch]
mov	edx, [esi]
lea	eax, [ecx+edi]
dec	ecx
not	ecx
and	eax, ecx
mov	[esi+8], eax
test	edx, edx
jnz	short loc_679DD1
mov	ecx, [esi+14h]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
jmp	short loc_679DEE

loc_679DD1:
mov	ecx, dword_1855FC0
mov	ecx, [ecx]
mov	[esp+10h+arg_4], ecx
mov	ecx, dword_1855FC0
push	eax
mov	eax, [esp+14h+arg_4]
push	edx
mov	edx, [eax+2Ch]
call	edx

loc_679DEE:
mov	[esi], eax

loc_679DF0:
mov	eax, [esi]
sub	ebx, ebp
inc	ebx
add	eax, ebp
push	ebx
mov	ebx, [esp+14h+arg_8]
push	eax
add	eax, ebx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [esi]
push	ebx
push	ecx
add	edx, ebp
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi]
add	esp, 18h
mov	[esi+4], edi
mov	byte ptr [esi+10h], 0
mov	byte ptr [edi+eax], 0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_679D60 endp

align 10h



sub_679E30 proc	near
push	esi
push	1		; Value
mov	esi, ecx
push	offset dword_167D75C ; Addend
mov	dword ptr [esi], offset	unk_167D758
call	ds:InterlockedExchangeAdd
mov	eax, esi
pop	esi
retn
sub_679E30 endp

align 10h



sub_679E50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	esi
mov	esi, [esp+4+arg_4]
test	esi, esi
jnz	short loc_679E6D
push	1		; Value
push	offset dword_167D75C ; Addend
call	ds:InterlockedExchangeAdd
mov	esi, offset unk_167D758
jmp	short loc_679E92

loc_679E6D:
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
lea	edx, [esi+0Ch]
push	edx
call	eax
mov	byte ptr [eax+esi+8], 0
or	esi, [esp+4+arg_8]
mov	dword ptr [eax+4], 1
mov	[eax], esi
mov	esi, eax

loc_679E92:
mov	ecx, [esp+4+arg_10]
mov	edx, [esp+4+arg_C]
push	ecx
push	edx
lea	eax, [esi+8]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, esi
pop	esi
retn	14h
sub_679E50 endp

align 10h



sub_679EB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, [esp+4+arg_4]
push	edi
test	esi, esi
jnz	short loc_679ECE
push	1		; Value
push	offset dword_167D75C ; Addend
call	ds:InterlockedExchangeAdd
mov	esi, offset unk_167D758
jmp	short loc_679EF3

loc_679ECE:
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
lea	edx, [esi+0Ch]
push	edx
call	eax
mov	byte ptr [eax+esi+8], 0
or	esi, [esp+8+arg_8]
mov	dword ptr [eax+4], 1
mov	[eax], esi
mov	esi, eax

loc_679EF3:
mov	edi, [esp+8+arg_10]
mov	ecx, [esp+8+arg_C]
push	edi
push	ecx
lea	edx, [esi+8]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+14h+arg_18]
mov	ecx, [esp+14h+arg_14]
push	eax
push	ecx
lea	edx, [esi+edi+8]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 18h
pop	edi
mov	eax, esi
pop	esi
retn	1Ch
sub_679EB0 endp

align 10h



sub_679F30 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	ebx
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi]
push	eax
lea	ecx, [esp+20h+var_10]
and	edi, 0FFFFFFFCh
mov	ebx, [edi]
push	ecx
lea	edx, [esp+24h+var_C]
push	edx
and	ebx, 7FFFFFFFh
mov	[esp+28h+var_10], 0
call	sub_67B920
mov	ecx, [esi]
xor	eax, eax
and	ecx, 3
sub	ecx, eax
jz	short loc_679F96
sub	ecx, 1
jz	short loc_679F86
sub	ecx, 1
jnz	short loc_679F9B
mov	eax, [esi+4]
jmp	short loc_679F9B

loc_679F86:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
jmp	short loc_679F9B

loc_679F96:
mov	eax, dword_1855FC0

loc_679F9B:
mov	ecx, [esp+1Ch+var_10]
push	ecx
lea	edx, [esp+20h+var_C]
push	edx
push	ebx
lea	edx, [edi+8]
push	edx
push	0
add	ecx, ebx
push	ecx
push	eax
mov	ecx, esi
call	sub_679EB0
mov	ecx, [esi]
and	ecx, 3
or	ecx, eax
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
mov	[esi], ecx
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_679FDF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_679FDF:
mov	ecx, [esp+1Ch+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn	4
sub_679F30 endp

align 10h



sub_67A000 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, ecx
test	eax, eax
jz	loc_67A0AE
mov	ecx, [esp+4+arg_4]
push	ebp
push	esi
mov	esi, [ebx]
push	edi
and	esi, 0FFFFFFFCh
mov	edi, [esi]
push	ecx
push	eax
and	edi, 7FFFFFFFh
call	sub_67BA40
mov	ecx, [ebx]
mov	ebp, eax
xor	eax, eax
and	ecx, 3
sub	ecx, eax
jz	short loc_67A056
sub	ecx, 1
jz	short loc_67A046
sub	ecx, 1
jnz	short loc_67A05B
mov	eax, [ebx+4]
jmp	short loc_67A05B

loc_67A046:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	ebx
call	eax
jmp	short loc_67A05B

loc_67A056:
mov	eax, dword_1855FC0

loc_67A05B:
push	edi
lea	ecx, [esi+8]
push	ecx
push	0
add	ebp, edi
push	ebp
push	eax
mov	ecx, ebx
call	sub_679E50
mov	edx, [esp+10h+arg_4]
mov	ebp, eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
lea	ecx, [edi+ebp+8]
push	ecx
call	sub_67BB00
mov	eax, [ebx]
and	eax, 3
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
or	eax, ebp
push	edx		; Addend
mov	[ebx], eax
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_67A0AB
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_67A0AB:
pop	edi
pop	esi
pop	ebp

loc_67A0AE:
pop	ebx
retn	8
sub_67A000 endp

align 10h



sub_67A0C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	ebx
mov	ebx, ecx
test	edx, edx
jz	loc_67A172
push	ebp
mov	ebp, [esp+8+arg_4]
test	ebp, ebp
jz	loc_67A171
push	esi
cmp	ebp, 0FFFFFFFFh
jnz	short loc_67A0F2
mov	eax, edx
lea	esi, [eax+1]

loc_67A0E7:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_67A0E7
sub	eax, esi
mov	ebp, eax

loc_67A0F2:
mov	ecx, [ebx]
mov	esi, ecx
and	esi, 0FFFFFFFCh
push	edi
mov	edi, [esi]
xor	eax, eax
and	ecx, 3
and	edi, 7FFFFFFFh
sub	ecx, eax
jz	short loc_67A12E
sub	ecx, 1
jz	short loc_67A11A
sub	ecx, 1
jnz	short loc_67A133
mov	eax, [ebx+4]
jmp	short loc_67A133

loc_67A11A:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebx
call	edx
mov	edx, [esp+10h+arg_0]
jmp	short loc_67A133

loc_67A12E:
mov	eax, dword_1855FC0

loc_67A133:
push	ebp
push	edx
push	edi
lea	ecx, [esi+8]
push	ecx
push	0
add	edi, ebp
push	edi
push	eax
mov	ecx, ebx
call	sub_679EB0
mov	ecx, [ebx]
and	ecx, 3
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
or	ecx, eax
push	edx		; Addend
mov	[ebx], ecx
call	ds:InterlockedExchangeAdd
sub	eax, 1
pop	edi
jnz	short loc_67A170
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_67A170:
pop	esi

loc_67A171:
pop	ebp

loc_67A172:
pop	ebx
retn	8
sub_67A0C0 endp

align 10h



sub_67A180 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
mov	esi, ecx
mov	edx, [esi]
mov	ebp, edx
xor	eax, eax
and	edx, 3
and	ebp, 0FFFFFFFCh
sub	edx, eax
jz	short loc_67A1B3
sub	edx, 1
jz	short loc_67A1A3
sub	edx, 1
jnz	short loc_67A1B8
mov	eax, [esi+4]
jmp	short loc_67A1B8

loc_67A1A3:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
jmp	short loc_67A1B8

loc_67A1B3:
mov	eax, dword_1855FC0

loc_67A1B8:
push	ebx
push	edi
mov	edi, [esp+10h+arg_4]
test	edi, edi
jnz	short loc_67A1D6
push	1		; Value
push	offset dword_167D75C ; Addend
call	ds:InterlockedExchangeAdd
mov	ebx, offset unk_167D758
jmp	short loc_67A1F5

loc_67A1D6:
mov	edx, [eax]
mov	edx, [edx+28h]
push	0
lea	ecx, [edi+0Ch]
push	ecx
mov	ecx, eax
call	edx
mov	byte ptr [eax+edi+8], 0
mov	dword ptr [eax+4], 1
mov	[eax], edi
mov	ebx, eax

loc_67A1F5:
mov	ecx, [esp+10h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edi
lea	edx, [ebx+8]
push	edx
call	eax
mov	eax, [esi]
and	eax, 3
push	0FFFFFFFFh	; Value
lea	ecx, [ebp+4]
or	eax, ebx
push	ecx		; Addend
mov	[esi], eax
call	ds:InterlockedExchangeAdd
sub	eax, 1
pop	edi
pop	ebx
jnz	short loc_67A22F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax

loc_67A22F:
pop	esi
pop	ebp
retn	8
sub_67A180 endp

align 10h



sub_67A240 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi]
push	edi
mov	edi, ecx
xor	eax, eax
and	ecx, 3
and	edi, 0FFFFFFFCh
sub	ecx, eax
jz	short loc_67A273
sub	ecx, 1
jz	short loc_67A263
sub	ecx, 1
jnz	short loc_67A278
mov	eax, [esi+4]
jmp	short loc_67A278

loc_67A263:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
jmp	short loc_67A278

loc_67A273:
mov	eax, dword_1855FC0

loc_67A278:
mov	ecx, [esp+8+arg_4]
mov	edx, [esp+8+arg_0]
push	ecx
push	edx
push	0
push	ecx
push	eax
mov	ecx, esi
call	sub_679E50
mov	ecx, [esi]
and	ecx, 3
or	ecx, eax
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
mov	[esi], ecx
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_67A2B5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_67A2B5:
pop	edi
pop	esi
retn	8
sub_67A240 endp

align 10h



sub_67A2C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
test	esi, esi
jz	short loc_67A2E5
mov	eax, esi
push	edi
lea	edi, [eax+1]
nop

loc_67A2D0:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_67A2D0
sub	eax, edi
pop	edi
push	eax
push	esi
call	sub_67A240
pop	esi
retn	4

loc_67A2E5:
xor	eax, eax
push	eax
push	esi
call	sub_67A240
pop	esi
retn	4
sub_67A2C0 endp

align 10h



sub_67A300 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ebx, [esi]
and	ebx, 0FFFFFFFCh
push	edi
test	eax, eax
jz	short loc_67A31E
push	0FFFFFFFFh
push	eax
call	sub_67BA40
mov	edi, eax
jmp	short loc_67A320

loc_67A31E:
xor	edi, edi

loc_67A320:
mov	edx, [esi]
xor	eax, eax
and	edx, 3
sub	edx, eax
jz	short loc_67A34A
sub	edx, 1
jz	short loc_67A33A
sub	edx, 1
jnz	short loc_67A34F
mov	eax, [esi+4]
jmp	short loc_67A34F

loc_67A33A:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
jmp	short loc_67A34F

loc_67A34A:
mov	eax, dword_1855FC0

loc_67A34F:
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
test	edi, edi
jnz	short loc_67A36A
push	1		; Value
push	offset dword_167D75C ; Addend
call	ebp ; InterlockedExchangeAdd
mov	edi, offset unk_167D758
jmp	short loc_67A389

loc_67A36A:
mov	edx, [eax]
mov	edx, [edx+28h]
push	0
lea	ecx, [edi+0Ch]
push	ecx
mov	ecx, eax
call	edx
mov	byte ptr [eax+edi+8], 0
mov	[eax], edi
mov	dword ptr [eax+4], 1
mov	edi, eax

loc_67A389:
mov	eax, [esp+10h+arg_0]
push	0FFFFFFFFh
push	eax
lea	ecx, [edi+8]
push	ecx
call	sub_67BB00
mov	eax, [esi]
and	eax, 3
push	0FFFFFFFFh	; Value
lea	edx, [ebx+4]
or	eax, edi
push	edx		; Addend
mov	[esi], eax
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
pop	ebp
jnz	short loc_67A3BE
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_67A3BE:
pop	edi
pop	esi
pop	ebx
retn	4
sub_67A300 endp

align 10h



sub_67A3D0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
xor	ebp, ebp
and	eax, 3
sub	eax, ebp
push	edi
jz	short loc_67A402
sub	eax, 1
jz	short loc_67A3F0
sub	eax, 1
jnz	short loc_67A408
mov	ebp, [esi+4]
jmp	short loc_67A408

loc_67A3F0:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
mov	ebp, eax
jmp	short loc_67A408

loc_67A402:
mov	ebp, dword_1855FC0

loc_67A408:
mov	edx, [esp+10h+arg_0]
mov	ecx, [edx]
mov	ebx, [esi]
mov	edi, ecx
xor	eax, eax
and	ecx, 3
and	edi, 0FFFFFFFCh
and	ebx, 0FFFFFFFCh
sub	ecx, eax
jz	short loc_67A440
sub	ecx, 1
jz	short loc_67A430
sub	ecx, 1
jnz	short loc_67A445
mov	eax, [edx+4]
jmp	short loc_67A445

loc_67A430:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
push	edx
mov	edx, [eax+3Ch]
call	edx
jmp	short loc_67A445

loc_67A440:
mov	eax, dword_1855FC0

loc_67A445:
cmp	ebp, eax
jnz	short loc_67A460
mov	eax, [esi]
and	eax, 3
or	eax, edi
push	1		; Value
add	edi, 4
push	edi		; Addend
mov	[esi], eax
call	ds:InterlockedExchangeAdd
jmp	short loc_67A487

loc_67A460:
mov	eax, [edi]
mov	ecx, eax
and	ecx, 7FFFFFFFh
push	ecx
add	edi, 8
push	edi
and	eax, 80000000h
push	eax
push	ecx
push	ebp
mov	ecx, esi
call	sub_679E50
mov	ecx, [esi]
and	ecx, 3
or	ecx, eax
mov	[esi], ecx

loc_67A487:		; Value
push	0FFFFFFFFh
lea	eax, [ebx+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_67A4A6
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_67A4A6:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_67A3D0 endp

align 10h



sub_67A4B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [eax+4]
mov	eax, [eax]
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi]
push	edi
mov	edi, ecx
and	edi, 0FFFFFFFCh
mov	ebp, eax
test	eax, eax
jnz	short loc_67A4D1
mov	ebp, offset byte_146D660

loc_67A4D1:
xor	eax, eax
and	ecx, 3
sub	ecx, eax
jz	short loc_67A4F9
sub	ecx, 1
jz	short loc_67A4E9
sub	ecx, 1
jnz	short loc_67A4FE
mov	eax, [esi+4]
jmp	short loc_67A4FE

loc_67A4E9:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
jmp	short loc_67A4FE

loc_67A4F9:
mov	eax, dword_1855FC0

loc_67A4FE:
push	ebx
push	ebp
push	0
push	ebx
push	eax
mov	ecx, esi
call	sub_679E50
mov	ecx, [esi]
and	ecx, 3
or	ecx, eax
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
mov	[esi], ecx
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_67A533
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_67A533:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_67A4B0 endp

align 10h



sub_67A540 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
push	ebx
push	ebp
mov	ebx, ecx
mov	ecx, [ebx]
push	esi
mov	esi, ecx
push	edi
mov	edi, [eax]
and	esi, 0FFFFFFFCh
mov	ebp, [esi]
and	edi, 0FFFFFFFCh
mov	eax, [edi]
mov	[esp+14h+arg_0], ebp
mov	edx, eax
and	eax, [esp+14h+arg_0]
and	edx, 7FFFFFFFh
and	eax, 80000000h
mov	[esp+14h+arg_0], eax
xor	eax, eax
and	ecx, 3
and	ebp, 7FFFFFFFh
sub	ecx, eax
mov	[esp+14h+var_4], edx
jz	short loc_67A5A6
sub	ecx, 1
jz	short loc_67A596
sub	ecx, 1
jnz	short loc_67A5AB
mov	eax, [ebx+4]
jmp	short loc_67A5AB

loc_67A596:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	ebx
call	eax
jmp	short loc_67A5AB

loc_67A5A6:
mov	eax, dword_1855FC0

loc_67A5AB:
mov	ecx, [esp+14h+var_4]
push	ecx
add	edi, 8
push	edi
push	ebp
lea	edx, [esi+8]
push	edx
mov	edx, [esp+24h+arg_0]
push	edx
add	ecx, ebp
push	ecx
push	eax
mov	ecx, ebx
call	sub_679EB0
mov	ecx, [ebx]
and	ecx, 3
or	ecx, eax
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
mov	[ebx], ecx
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_67A5F1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_67A5F1:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_67A540 endp

align 10h



sub_67A600 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi]
and	esi, 0FFFFFFFCh
mov	eax, [esi]
and	eax, 7FFFFFFFh
mov	[esp+10h+var_4], eax
mov	eax, [esi]
mov	ebx, eax
shr	eax, 1Fh
and	ebx, 7FFFFFFFh
test	al, 1
jnz	short loc_67A63D
push	ebx
lea	eax, [esi+8]
push	eax
call	sub_67BC50
cmp	eax, ebx
jnz	short loc_67A63B
or	dword ptr [esi], 80000000h

loc_67A63B:
mov	ebx, eax

loc_67A63D:
mov	ecx, [esp+10h+arg_0]
cmp	ecx, ebx
jnb	loc_67A713
push	ebp
mov	ebp, [esp+14h+arg_4]
lea	edx, [ecx+ebp]
cmp	edx, ebx
jbe	short loc_67A659
sub	ebx, ecx
mov	ebp, ebx

loc_67A659:
push	0FFFFFFFFh
lea	eax, [esi+8]
push	eax
push	ecx
call	sub_67BCC0
mov	ebx, eax
push	0FFFFFFFFh
lea	eax, [ebx+esi+8]
push	eax
push	ebp
call	sub_67BCC0
mov	ecx, [edi]
mov	ebp, [esi]
and	ecx, 3
and	ebp, 80000000h
sub	ecx, 0
mov	[esp+14h+arg_4], eax
mov	[esp+14h+arg_0], 0
jz	short loc_67A6B9
sub	ecx, 1
jz	short loc_67A6A1
sub	ecx, 1
jnz	short loc_67A6C3
mov	ecx, [edi+4]
jmp	short loc_67A6BF

loc_67A6A1:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	edi
call	eax
mov	[esp+14h+arg_0], eax
mov	eax, [esp+14h+arg_4]
jmp	short loc_67A6C3

loc_67A6B9:
mov	ecx, dword_1855FC0

loc_67A6BF:
mov	[esp+14h+arg_0], ecx

loc_67A6C3:
mov	ecx, [esp+14h+var_4]
sub	ecx, eax
mov	edx, ecx
sub	edx, ebx
push	edx
mov	edx, [edi]
add	edx, eax
lea	eax, [edx+ebx+8]
push	eax
push	ebx
lea	eax, [esi+8]
push	eax
push	ebp
push	ecx
mov	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, edi
call	sub_679EB0
mov	ecx, [edi]
and	ecx, 3
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
or	ecx, eax
push	edx		; Addend
mov	[edi], ecx
call	ds:InterlockedExchangeAdd
sub	eax, 1
pop	ebp
jnz	short loc_67A713
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_67A713:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8
sub_67A600 endp

align 10h



sub_67A720 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
push	1		; Value
push	offset dword_167D75C ; Addend
mov	edi, ecx
call	ebx ; InterlockedExchangeAdd
mov	esi, [edi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_67A754
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_67A754:
mov	eax, [edi]
and	eax, 3
or	eax, offset unk_167D758
mov	[edi], eax
pop	edi
pop	esi
pop	ebx
retn
sub_67A720 endp

align 10h



sub_67A770 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_8= dword ptr  0Ch

sub	esp, 18h
mov	eax, dword_1855FC0
push	esi
push	edi
lea	ecx, [esp+20h+arg_0]
xor	esi, esi
xor	edi, edi
push	ecx
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], edi
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], 200h
mov	[esp+24h+var_8], 0
mov	[esp+24h+var_4], eax
call	sub_67B600
test	eax, eax
jz	loc_67A894
jmp	short loc_67A7B4
align 10h

loc_67A7B0:
mov	edi, [esp+20h+var_14]

loc_67A7B4:
cmp	eax, 3Ch
jnz	short loc_67A7D7
lea	edx, [edi+4]
push	edx
lea	ecx, [esp+24h+var_18]
call	sub_679BF0
mov	eax, dword ptr ds:aLt ;	"&lt;"
mov	esi, [esp+20h+var_18]
mov	[edi+esi], eax
jmp	loc_67A882

loc_67A7D7:
cmp	eax, 3Eh
jnz	short loc_67A7FB
lea	ecx, [edi+4]
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679BF0
mov	edx, dword ptr ds:aGt ;	"&gt;"
mov	esi, [esp+20h+var_18]
mov	[edi+esi], edx
jmp	loc_67A882

loc_67A7FB:
lea	ecx, [esp+20h+var_18]
cmp	eax, 22h
jnz	short loc_67A828
lea	eax, [edi+6]
push	eax
call	sub_679BF0
mov	esi, [esp+20h+var_18]
mov	ecx, dword ptr ds:aQuot	; "&quot;"
mov	[edi+esi], ecx
mov	dx, word ptr ds:aQuot+4
mov	[edi+esi+4], dx
jmp	short loc_67A882

loc_67A828:
cmp	eax, 27h
jnz	short loc_67A851
lea	eax, [edi+6]
push	eax
call	sub_679BF0
mov	esi, [esp+20h+var_18]
mov	ecx, dword ptr ds:aApos	; "&apos;"
mov	[edi+esi], ecx
mov	dx, word ptr ds:aApos+4
mov	[edi+esi+4], dx
jmp	short loc_67A882

loc_67A851:
cmp	eax, 26h
jnz	short loc_67A878
lea	eax, [edi+5]
push	eax
call	sub_679BF0
mov	esi, [esp+20h+var_18]
mov	ecx, dword ptr ds:aAmp ; "&amp;"
mov	[edi+esi], ecx
mov	dl, byte ptr ds:aAmp+4
mov	[edi+esi+4], dl
jmp	short loc_67A882

loc_67A878:
push	eax
call	sub_679C60
mov	esi, [esp+20h+var_18]

loc_67A882:
lea	eax, [esp+20h+arg_0]
push	eax
call	sub_67B600
test	eax, eax
jnz	loc_67A7B0

loc_67A894:
lea	ecx, [esp+20h+var_18]
push	ecx
mov	ecx, [esp+24h+arg_8]
call	sub_67A4B0
test	esi, esi
jz	short loc_67A8B4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_67A8B4:
pop	edi
pop	esi
add	esp, 18h
retn	0Ch
sub_67A770 endp

align 10h



sub_67A8C0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

sub	esp, 38h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+38h+var_4], eax
mov	eax, [esp+38h+arg_0]
mov	ecx, [esp+38h+arg_8]
mov	edx, dword_1855FC0
push	ebp
push	esi
push	edi
mov	[esp+44h+var_38], eax
lea	eax, [esp+44h+var_38]
xor	esi, esi
xor	ebp, ebp
xor	edi, edi
push	eax
mov	[esp+48h+var_18], ecx
mov	[esp+48h+var_30], esi
mov	[esp+48h+var_2C], ebp
mov	[esp+48h+var_28], edi
mov	[esp+48h+var_24], 200h
mov	[esp+48h+var_20], 0
mov	[esp+48h+var_1C], edx
call	sub_67B600
test	eax, eax
jz	loc_67AB37
push	ebx
lea	ecx, [ecx+0]

loc_67A920:
cmp	eax, 26h
jnz	loc_67AA21
mov	ecx, [esp+48h+var_38]
push	5		; size_t
push	offset aQuot_2	; "quot;"
push	ecx		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	loc_67AAB8
mov	edx, [esp+48h+var_38]
push	5		; size_t
push	offset aApos_2	; "apos;"
push	edx		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	loc_67AAD6
mov	eax, [esp+48h+var_38]
push	4		; size_t
push	offset aAmp_2	; "amp;"
push	eax		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	loc_67AAF4
mov	ecx, [esp+48h+var_38]
push	3		; size_t
push	offset aLt_2	; "lt;"
push	ecx		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	loc_67AB12
mov	edx, [esp+48h+var_38]
push	3		; size_t
push	offset aGt_1	; "gt;"
push	edx		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	loc_67AB16
push	26h
lea	eax, [esp+4Ch+var_34]
push	eax
lea	ecx, [esp+50h+var_C]
push	ecx
mov	ebx, ebp
mov	[esp+54h+var_34], 0
call	sub_67B920
mov	edx, [esp+48h+var_34]
add	ebp, edx
cmp	ebp, edi
jb	short loc_67AA08
lea	edi, [ebp+200h]
and	edi, 0FFFFFE00h
test	esi, esi
jnz	short loc_67A9F7
mov	ecx, [esp+48h+var_1C]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	edi
jmp	short loc_67AA04

loc_67A9F7:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+2Ch]
push	edi
push	esi

loc_67AA04:
call	edx
mov	esi, eax

loc_67AA08:
mov	[esp+48h+var_20], 0
test	esi, esi
jz	short loc_67AA15
mov	byte ptr [esi+ebp], 0

loc_67AA15:
mov	eax, [esp+48h+var_34]
push	eax
lea	ecx, [esp+4Ch+var_C]
push	ecx
jmp	short loc_67AA8A

loc_67AA21:
push	eax
lea	edx, [esp+4Ch+var_34]
push	edx
lea	eax, [esp+50h+var_14]
push	eax
mov	ebx, ebp
mov	[esp+54h+var_34], 0
call	sub_67B920
mov	ecx, [esp+48h+var_34]
add	ebp, ecx
cmp	ebp, edi
jb	short loc_67AA73
lea	edi, [ebp+200h]
and	edi, 0FFFFFE00h
test	esi, esi
jnz	short loc_67AA62
mov	ecx, [esp+48h+var_1C]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
jmp	short loc_67AA6F

loc_67AA62:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+2Ch]
push	edi
push	esi

loc_67AA6F:
call	eax
mov	esi, eax

loc_67AA73:
mov	[esp+48h+var_20], 0
test	esi, esi
jz	short loc_67AA80
mov	byte ptr [esi+ebp], 0

loc_67AA80:
mov	ecx, [esp+48h+var_34]
push	ecx
lea	edx, [esp+4Ch+var_14]
push	edx

loc_67AA8A:
add	ebx, esi
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
lea	eax, [esp+48h+var_38]
push	eax
call	sub_67B600
test	eax, eax
jnz	loc_67A920
mov	[esp+48h+var_2C], ebp
mov	[esp+48h+var_30], esi
mov	[esp+48h+var_28], edi
jmp	loc_67AB36

loc_67AAB8:
push	22h
lea	ecx, [esp+4Ch+var_30]
mov	[esp+4Ch+var_2C], ebp
mov	[esp+4Ch+var_30], esi
mov	[esp+4Ch+var_28], edi
call	sub_679C60
add	[esp+48h+var_38], 5
jmp	short loc_67AB32

loc_67AAD6:
push	27h
lea	ecx, [esp+4Ch+var_30]
mov	[esp+4Ch+var_2C], ebp
mov	[esp+4Ch+var_30], esi
mov	[esp+4Ch+var_28], edi
call	sub_679C60
add	[esp+48h+var_38], 5
jmp	short loc_67AB32

loc_67AAF4:
push	26h
lea	ecx, [esp+4Ch+var_30]
mov	[esp+4Ch+var_2C], ebp
mov	[esp+4Ch+var_30], esi
mov	[esp+4Ch+var_28], edi
call	sub_679C60
add	[esp+48h+var_38], 4
jmp	short loc_67AB32

loc_67AB12:
push	3Ch
jmp	short loc_67AB18

loc_67AB16:
push	3Eh

loc_67AB18:
lea	ecx, [esp+4Ch+var_30]
mov	[esp+4Ch+var_2C], ebp
mov	[esp+4Ch+var_30], esi
mov	[esp+4Ch+var_28], edi
call	sub_679C60
add	[esp+48h+var_38], 3

loc_67AB32:
mov	esi, [esp+48h+var_30]

loc_67AB36:
pop	ebx

loc_67AB37:
lea	ecx, [esp+44h+var_30]
push	ecx
mov	ecx, [esp+48h+var_18]
call	sub_67A4B0
test	esi, esi
jz	short loc_67AB57
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_67AB57:
mov	ecx, [esp+44h+var_4]
pop	edi
pop	esi
pop	ebp
xor	ecx, esp
call	sub_7999A3
add	esp, 38h
retn	0Ch
sub_67A8C0 endp

align 10h



sub_67AB70 proc	near
push	esi
push	1		; Value
push	offset dword_167D75C ; Addend
mov	esi, ecx
call	ds:InterlockedExchangeAdd
mov	eax, offset unk_167D758
or	eax, 1
mov	[esi], eax
mov	eax, esi
pop	esi
retn
sub_67AB70 endp

align 10h



sub_67AB90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	esi, ecx
test	ebx, ebx
jz	short loc_67ABAF
mov	eax, ebx
lea	edx, [eax+1]

loc_67ABA2:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_67ABA2
sub	eax, edx
mov	edi, eax
jmp	short loc_67ABB1

loc_67ABAF:
xor	edi, edi

loc_67ABB1:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
push	edi
push	ebx
push	0
push	edi
push	eax
mov	ecx, esi
call	sub_679E50
or	eax, 1
mov	[esi], eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_67AB90 endp

align 10h



sub_67ABE0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, [ebx]
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	edi
and	esi, 0FFFFFFFCh
call	edx
mov	ecx, [ebx]
mov	ebp, eax
xor	eax, eax
and	ecx, 3
sub	ecx, eax
jz	short loc_67AC29
sub	ecx, 1
jz	short loc_67AC19
sub	ecx, 1
jnz	short loc_67AC2E
mov	eax, [ebx+4]
jmp	short loc_67AC2E

loc_67AC19:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebx
call	edx
jmp	short loc_67AC2E

loc_67AC29:
mov	eax, dword_1855FC0

loc_67AC2E:
cmp	eax, ebp
jnz	short loc_67AC4A
push	1		; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
or	esi, 1
mov	[edi], esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_67AC4A:
mov	eax, [esi]
mov	ecx, eax
and	ecx, 7FFFFFFFh
push	ecx
add	esi, 8
push	esi
and	eax, 80000000h
push	eax
push	ecx
push	ebp
mov	ecx, edi
call	sub_679E50
or	eax, 1
mov	[edi], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_67ABE0 endp

align 10h



sub_67AC80 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	1		; Value
mov	esi, ecx
push	offset dword_167D75C ; Addend
mov	[esi+4], eax
call	ds:InterlockedExchangeAdd
mov	ecx, offset unk_167D758
or	ecx, 2
mov	[esi], ecx
mov	eax, esi
pop	esi
retn	4
sub_67AC80 endp

align 10h



sub_67ACB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edx]
mov	esi, ecx
xor	eax, eax
and	ecx, 3
and	esi, 0FFFFFFFCh
sub	ecx, eax
jz	short loc_67ACE7
sub	ecx, 1
jz	short loc_67ACD7
sub	ecx, 1
jnz	short loc_67ACEC
mov	eax, [edx+4]
jmp	short loc_67ACEC

loc_67ACD7:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
push	edx
mov	edx, [eax+3Ch]
call	edx
jmp	short loc_67ACEC

loc_67ACE7:
mov	eax, dword_1855FC0

loc_67ACEC:
mov	edx, [esp+8+arg_4]
test	edx, edx
jnz	short loc_67ACF6
mov	edx, eax

loc_67ACF6:
mov	[edi+4], edx
cmp	eax, edx
jnz	short loc_67AD13
push	1		; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
or	esi, 2
mov	[edi], esi
pop	edi
pop	esi
retn	8

loc_67AD13:
mov	eax, [esi]
mov	ecx, eax
and	ecx, 7FFFFFFFh
push	ecx
add	esi, 8
push	esi
and	eax, 80000000h
push	eax
push	ecx
push	edx
mov	ecx, edi
call	sub_679E50
or	eax, 2
mov	[edi], eax
pop	edi
pop	esi
retn	8
sub_67ACB0 endp

align 10h



sub_67AD40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
xor	edx, edx
push	esi
mov	esi, ecx
push	edi
mov	[esi], edx
mov	[esi+4], edx
mov	[esi+8], edx
mov	dword ptr [esi+0Ch], 200h
mov	[esi+10h], dl
mov	[esi+14h], eax
cmp	ebx, edx
jnz	short loc_67AD6D
mov	ebx, offset byte_146D660

loc_67AD6D:
mov	eax, ebx
lea	edi, [eax+1]

loc_67AD72:
mov	cl, [eax]
inc	eax
cmp	cl, dl
jnz	short loc_67AD72
sub	eax, edi
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_679BF0
mov	ecx, [esi]
push	edi
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_67AD40 endp

align 10h



sub_67ADA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_0]
xor	edx, edx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	[esi], edx
mov	[esi+4], edx
mov	[esi+8], edx
mov	dword ptr [esi+0Ch], 200h
mov	[esi+10h], dl
mov	[esi+14h], eax
cmp	ebx, edx
jz	short loc_67AE00
cmp	edi, edx
jz	short loc_67AE00
cmp	edi, 0FFFFFFFFh
jnz	short loc_67ADEB
mov	eax, ebx
lea	edi, [eax+1]
lea	ebx, [ebx+0]

loc_67ADE0:
mov	cl, [eax]
inc	eax
cmp	cl, dl
jnz	short loc_67ADE0
sub	eax, edi
mov	edi, eax

loc_67ADEB:
push	edi
mov	ecx, esi
call	sub_679BF0
mov	ecx, [esi]
push	edi
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_67AE00:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_67ADA0 endp

align 10h



sub_67AE10 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
test	edx, edx
jz	short loc_67AE2D
mov	eax, edx
push	edi
lea	edi, [eax+1]

loc_67AE21:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_67AE21
sub	eax, edi
pop	edi
jmp	short loc_67AE2F

loc_67AE2D:
xor	eax, eax

loc_67AE2F:
push	eax
push	edx
push	0
push	eax
mov	eax, dword_1855FC0
push	eax
mov	ecx, esi
call	sub_679E50
mov	[esi], eax
mov	eax, esi
pop	esi
retn	4
sub_67AE10 endp

align 10h



sub_67AE50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	[esp+14h+var_4], ecx
test	eax, eax
jz	short loc_67AE71
lea	esi, [eax+1]

loc_67AE64:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_67AE64
sub	eax, esi
mov	ebp, eax
jmp	short loc_67AE73

loc_67AE71:
xor	ebp, ebp

loc_67AE73:
mov	ecx, [esp+14h+arg_4]
test	ecx, ecx
jz	short loc_67AE8D
mov	eax, ecx
lea	esi, [eax+1]

loc_67AE80:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_67AE80
sub	eax, esi
mov	edi, eax
jmp	short loc_67AE8F

loc_67AE8D:
xor	edi, edi

loc_67AE8F:
mov	eax, [esp+14h+arg_8]
test	eax, eax
jz	short loc_67AEAD
lea	esi, [eax+1]
lea	ebx, [ebx+0]

loc_67AEA0:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_67AEA0
sub	eax, esi
mov	ebx, eax
jmp	short loc_67AEAF

loc_67AEAD:
xor	ebx, ebx

loc_67AEAF:
mov	eax, [esp+14h+arg_0]
mov	edx, dword_1855FC0
push	edi
push	ecx
push	ebp
push	eax
push	0
lea	ecx, [ebx+edi]
add	ecx, ebp
push	ecx
mov	ecx, [esp+2Ch+var_4]
push	edx
call	sub_679EB0
mov	esi, eax
mov	eax, [esp+14h+arg_8]
push	ebx
lea	ecx, [esi+edi]
push	eax
lea	edx, [ecx+ebp+8]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+20h+var_4]
add	esp, 0Ch
pop	edi
mov	[eax], esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_67AE50 endp

align 10h



sub_67AF00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, dword_1855FC0
push	esi
push	eax
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
push	ecx
push	0
push	eax
push	edx
mov	ecx, esi
call	sub_679E50
mov	[esi], eax
mov	eax, esi
pop	esi
retn	8
sub_67AF00 endp

align 10h



sub_67AF30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
test	esi, esi
jnz	short loc_67AF50
push	1		; Value
push	offset dword_167D75C ; Addend
call	ds:InterlockedExchangeAdd
mov	eax, offset unk_167D758
jmp	short loc_67AF71

loc_67AF50:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
lea	edx, [esi+0Ch]
push	edx
call	eax
mov	byte ptr [eax+esi+8], 0
mov	dword ptr [eax+4], 1
mov	[eax], esi

loc_67AF71:
mov	ecx, [esp+8+arg_0]
mov	[edi], eax
mov	edx, [ecx]
and	eax, 0FFFFFFFCh
add	eax, 8
push	esi
push	eax
mov	eax, [edx+4]
call	eax
mov	eax, edi
pop	edi
pop	esi
retn	8
sub_67AF30 endp

align 10h



sub_67AF90 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edx]
mov	esi, ecx
xor	eax, eax
and	ecx, 3
and	esi, 0FFFFFFFCh
sub	ecx, eax
jz	short loc_67AFCF
sub	ecx, 1
jz	short loc_67AFB7
sub	ecx, 1
jnz	short loc_67AFC5
mov	eax, [edx+4]
jmp	short loc_67AFC5

loc_67AFB7:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
push	edx
mov	edx, [eax+3Ch]
call	edx

loc_67AFC5:
mov	edx, dword_1855FC0
cmp	eax, edx
jnz	short loc_67AFE4

loc_67AFCF:
mov	[edi], esi
push	1		; Value
add	esi, 4
push	esi		; Addend
call	ds:InterlockedExchangeAdd
mov	eax, edi
pop	edi
pop	esi
retn	4

loc_67AFE4:
mov	eax, [esi]
mov	ecx, eax
and	ecx, 7FFFFFFFh
push	ecx
add	esi, 8
push	esi
and	eax, 80000000h
push	eax
push	ecx
push	edx
mov	ecx, edi
call	sub_679E50
mov	[edi], eax
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_67AF90 endp

align 10h



sub_67B010 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax+4]
mov	eax, [eax]
test	eax, eax
jnz	short loc_67B025
mov	eax, offset byte_146D660

loc_67B025:
push	ecx
push	eax
mov	eax, dword_1855FC0
push	0
push	ecx
push	eax
mov	ecx, esi
call	sub_679E50
mov	[esi], eax
mov	eax, esi
pop	esi
retn	4
sub_67B010 endp

align 10h



sub_67B040 proc	near

arg_0= dword ptr  4

push	esi
push	1		; Value
mov	esi, ecx
push	offset dword_167D75C ; Addend
mov	dword ptr [esi], offset	unk_167D758
call	ds:InterlockedExchangeAdd
mov	eax, [esp+4+arg_0]
test	eax, eax
jz	short loc_67B066
push	eax
mov	ecx, esi
call	sub_67A300

loc_67B066:
mov	eax, esi
pop	esi
retn	4
sub_67B040 endp

align 10h



sub_67B070 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
push	ecx
mov	ecx, esi
call	sub_67AF90
mov	eax, [esp+4+arg_4]
test	eax, eax
jnz	short loc_67B08A
mov	eax, offset byte_146D660

loc_67B08A:
push	0FFFFFFFFh
push	eax
mov	ecx, esi
call	sub_67A0C0
mov	eax, esi
pop	esi
retn	8
sub_67B070 endp

align 10h



sub_67B0A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
push	ecx
mov	ecx, esi
call	sub_67AF90
mov	eax, [esp+4+arg_4]
push	eax
mov	ecx, esi
call	sub_67A540
mov	eax, esi
pop	esi
retn	8
sub_67B0A0 endp

align 10h



sub_67B0C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
and	esi, 0FFFFFFFCh
mov	eax, [esi]
push	edi
mov	edi, eax
shr	eax, 1Fh
and	edi, 7FFFFFFFh
test	al, 1
jz	short loc_67B0E1
mov	eax, edi
jmp	short loc_67B0F5

loc_67B0E1:
push	edi
lea	eax, [esi+8]
push	eax
call	sub_67BC50
cmp	eax, edi
jnz	short loc_67B0F5
or	dword ptr [esi], 80000000h

loc_67B0F5:
mov	ebx, [esp+10h+arg_4]
cmp	ebx, eax
jnb	short loc_67B179
mov	esi, [esp+10h+arg_8]
cmp	ebx, esi
jnb	short loc_67B179
mov	edi, [ebp+0]
and	edi, 0FFFFFFFCh
mov	ecx, [edi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_67B13C
mov	eax, dword_1855FC0
sub	esi, ebx
push	esi
lea	edx, [edi+ebx+8]
push	edx
push	0
push	esi
mov	esi, [esp+20h+arg_0]
push	eax
mov	ecx, esi
call	sub_679E50
pop	edi
mov	[esi], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_67B13C:
push	0FFFFFFFFh
lea	ecx, [edi+8]
push	ecx
push	ebx
call	sub_67BCC0
push	0FFFFFFFFh
lea	edi, [eax+edi+8]
push	edi
sub	esi, ebx
push	esi
call	sub_67BCC0
mov	edx, dword_1855FC0
mov	esi, [esp+10h+arg_0]
push	eax
push	edi
push	0
push	eax
push	edx
mov	ecx, esi
call	sub_679E50
pop	edi
mov	[esi], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_67B179:
mov	esi, [esp+10h+arg_0]
push	1		; Value
push	offset dword_167D75C ; Addend
mov	dword ptr [esi], offset	unk_167D758
call	ds:InterlockedExchangeAdd
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_67B0C0 endp

align 10h



sub_67B1A0 proc	near

var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= byte ptr -204h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20Ch+var_4], eax
mov	eax, [ecx]
push	esi
push	edi
mov	edi, [esp+214h+arg_0]
and	eax, 0FFFFFFFCh
push	1		; Value
add	eax, 8
push	offset dword_167D75C ; Addend
mov	[esp+21Ch+var_208], eax
mov	dword ptr [edi], offset	unk_167D758
call	ds:InterlockedExchangeAdd
mov	[esp+214h+var_20C], 0

loc_67B1E4:
lea	eax, [esp+214h+var_208]
push	eax
call	sub_67B600
mov	esi, eax
test	esi, esi
jz	short loc_67B217
push	esi
call	sub_67B4A0
add	esp, 4
push	eax
lea	ecx, [esp+218h+var_20C]
push	ecx
lea	edx, [esp+21Ch+var_204]
push	edx
call	sub_67B920
cmp	[esp+214h+var_20C], 1F8h
jl	short loc_67B1E4

loc_67B217:
mov	eax, [esp+214h+var_20C]
push	eax
lea	ecx, [esp+218h+var_204]
push	ecx
mov	ecx, edi
call	sub_67A0C0
mov	[esp+214h+var_20C], 0
test	esi, esi
jnz	short loc_67B1E4
mov	ecx, [esp+214h+var_4]
mov	eax, edi
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 20Ch
retn	4
sub_67B1A0 endp

align 10h



sub_67B250 proc	near

var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= byte ptr -204h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20Ch+var_4], eax
mov	eax, [ecx]
push	esi
push	edi
mov	edi, [esp+214h+arg_0]
and	eax, 0FFFFFFFCh
push	1		; Value
add	eax, 8
push	offset dword_167D75C ; Addend
mov	[esp+21Ch+var_208], eax
mov	dword ptr [edi], offset	unk_167D758
call	ds:InterlockedExchangeAdd
mov	[esp+214h+var_20C], 0

loc_67B294:
lea	eax, [esp+214h+var_208]
push	eax
call	sub_67B600
mov	esi, eax
test	esi, esi
jz	short loc_67B2C7
push	esi
call	sub_67B520
add	esp, 4
push	eax
lea	ecx, [esp+218h+var_20C]
push	ecx
lea	edx, [esp+21Ch+var_204]
push	edx
call	sub_67B920
cmp	[esp+214h+var_20C], 1F8h
jl	short loc_67B294

loc_67B2C7:
mov	eax, [esp+214h+var_20C]
push	eax
lea	ecx, [esp+218h+var_204]
push	ecx
mov	ecx, edi
call	sub_67A0C0
mov	[esp+214h+var_20C], 0
test	esi, esi
jnz	short loc_67B294
mov	ecx, [esp+214h+var_4]
mov	eax, edi
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 20Ch
retn	4
sub_67B250 endp

align 10h
; [00000005 BYTES: COLLAPSED FUNCTION j___stricmp. PRESS KEYPAD	"+" TO EXPAND]
align 10h



; int __cdecl sub_67B310(wchar_t *Dst, rsize_t SizeInWords, wchar_t *Src, rsize_t MaxCount)
sub_67B310 proc	near

Dst= dword ptr	4
SizeInWords= dword ptr	8
Src= dword ptr	0Ch
MaxCount= dword	ptr  10h

mov	eax, [esp+MaxCount]
mov	ecx, [esp+Src]
mov	edx, [esp+SizeInWords]
push	esi
mov	esi, [esp+4+Dst]
push	eax		; MaxCount
push	ecx		; Src
push	edx		; SizeInWords
push	esi		; Dst
call	_wcsncpy_s
add	esp, 10h
mov	eax, esi
pop	esi
retn
sub_67B310 endp

align 10h



sub_67B340 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	edx, [eax+2]

loc_67B347:
mov	cx, [eax]
add	eax, 2
test	cx, cx
jnz	short loc_67B347
sub	eax, edx
sar	eax, 1
retn
sub_67B340 endp

align 10h



sub_67B360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [esp+arg_0]

loc_67B368:
mov	ax, [ecx]
cmp	ax, [edx]
jnz	short loc_67B38D
test	ax, ax
jz	short loc_67B38A
mov	ax, [ecx+2]
cmp	ax, [edx+2]
jnz	short loc_67B38D
add	ecx, 4
add	edx, 4
test	ax, ax
jnz	short loc_67B368

loc_67B38A:
xor	eax, eax
retn

loc_67B38D:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
retn
sub_67B360 endp

align 10h



sub_67B3A0 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

mov	eax, [esp+arg_0]
mov	cx, [eax]
cmp	cx, [esp+arg_4]
sbb	eax, eax
neg	eax
retn
sub_67B3A0 endp

align 10h



; int __cdecl sub_67B3C0(char *Src, char **)
sub_67B3C0 proc	near

Dst= byte ptr -160h
var_4= dword ptr -4
Src= dword ptr	4
arg_4= dword ptr  8

sub	esp, 160h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+160h+var_4], eax
push	ebx
push	esi
mov	esi, [esp+168h+Src]
push	edi
mov	edi, [esp+16Ch+arg_4]
call	_localeconv
mov	eax, [eax]
mov	bl, [eax]
cmp	bl, 2Eh
jz	short loc_67B42E
push	esi		; Src
lea	ecx, [esp+170h+Dst]
push	15Ch		; SizeInBytes
push	ecx		; Dst
call	_strcpy_s
add	esp, 0Ch
cmp	[esp+16Ch+Dst],	0
lea	eax, [esp+16Ch+Dst]
jz	short loc_67B426

loc_67B411:
cmp	byte ptr [eax],	2Eh
jz	short loc_67B424
inc	eax
cmp	byte ptr [eax],	0
jnz	short loc_67B411
push	edi
lea	edx, [esp+170h+Dst]
push	edx
jmp	short loc_67B430

loc_67B424:
mov	[eax], bl

loc_67B426:
push	edi
lea	edx, [esp+170h+Dst]
push	edx
jmp	short loc_67B430

loc_67B42E:		; char **
push	edi
push	esi		; char *

loc_67B430:
call	_strtod
mov	ecx, [esp+174h+var_4]
add	esp, 8
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 160h
retn
sub_67B3C0 endp




sub_67B450 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_67B498
push	ebx
push	esi

loc_67B462:
mov	eax, [esp+10h+arg_C]
movzx	ecx, word ptr [eax]
mov	edx, [esp+10h+arg_0]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
push	ecx
lea	eax, [edx+ebx*4]
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	al, al
jz	short loc_67B490
or	ecx, 0FFFFFFFFh
sub	ecx, esi
lea	ebp, [ebx+1]
add	edi, ecx
jmp	short loc_67B492

loc_67B490:
mov	edi, esi

loc_67B492:
test	edi, edi
jg	short loc_67B462
pop	esi
pop	ebx

loc_67B498:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_67B450 endp

align 10h



sub_67B4A0 proc	near

arg_0= dword ptr  4

push	esi
mov	si, word ptr [esp+4+arg_0]
movzx	eax, si
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434B08[ecx*2]
test	edx, edx
jz	short loc_67B516
cmp	edx, 1
jz	short loc_67B4E9
push	edi
mov	ecx, eax
and	ecx, 0Fh
mov	edi, 1
shl	edi, cl
mov	ecx, eax
shr	ecx, 4
and	ecx, 0Fh
add	ecx, edx
movzx	edx, ds:word_1434B08[ecx*2]
and	edi, edx
neg	edi
sbb	edi, edi
neg	edi
pop	edi
jz	short loc_67B516

loc_67B4E9:
push	offset sub_67B3A0
lea	ecx, [esp+8+arg_0]
push	ecx
push	27Ch
movzx	eax, si
push	0
push	offset aAabbccddeeff_0 ; "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsSt"...
mov	[esp+18h+arg_0], eax
call	sub_67B450
movzx	eax, word ptr ds:(aAabbccddeeff_0+2)[eax*4]
add	esp, 14h

loc_67B516:
pop	esi
retn
sub_67B4A0 endp

align 10h



sub_67B520 proc	near

arg_0= dword ptr  4

push	esi
mov	si, word ptr [esp+4+arg_0]
movzx	eax, si
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434E68[ecx*2]
test	edx, edx
jz	short loc_67B596
cmp	edx, 1
jz	short loc_67B569
push	edi
mov	ecx, eax
and	ecx, 0Fh
mov	edi, 1
shl	edi, cl
mov	ecx, eax
shr	ecx, 4
and	ecx, 0Fh
add	ecx, edx
movzx	edx, ds:word_1434E68[ecx*2]
and	edi, edx
neg	edi
sbb	edi, edi
neg	edi
pop	edi
jz	short loc_67B596

loc_67B569:
push	offset sub_67B3A0
lea	ecx, [esp+8+arg_0]
push	ecx
push	2A1h
movzx	eax, si
push	0
push	offset aAabbccddeeffgg ; "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsT"...
mov	[esp+18h+arg_0], eax
call	sub_67B450
movzx	eax, word ptr ds:(aAabbccddeeffgg+2)[eax*4]
add	esp, 14h

loc_67B596:
pop	esi
retn
sub_67B520 endp

align 10h



sub_67B5A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 7Fh
ja	short loc_67B5B1
mov	eax, 1
retn	4

loc_67B5B1:
cmp	eax, 7FFh
ja	short loc_67B5C0
mov	eax, 2
retn	4

loc_67B5C0:
cmp	eax, 0FFFFh
ja	short loc_67B5CF
mov	eax, 3
retn	4

loc_67B5CF:
cmp	eax, 1FFFFFh
ja	short loc_67B5DE
mov	eax, 4
retn	4

loc_67B5DE:
cmp	eax, 3FFFFFFh
ja	short loc_67B5ED
mov	eax, 5
retn	4

loc_67B5ED:
mov	ecx, 7FFFFFFFh
cmp	ecx, eax
sbb	eax, eax
and	eax, 0FFFFFFFAh
add	eax, 6
retn	4
sub_67B5A0 endp

align 10h



sub_67B600 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	al, [edx]
test	al, al
jnz	short loc_67B611
xor	eax, eax
retn	4

loc_67B611:
inc	edx
mov	[ecx], edx
test	al, al
js	short loc_67B61E
movsx	eax, al
retn	4

loc_67B61E:
push	ebx
mov	bl, al
and	bl, 0E0h
push	esi
cmp	bl, 0C0h
jnz	short loc_67B669
movsx	esi, al
mov	al, [edx]
and	esi, 1Fh
shl	esi, 6
test	al, al
jz	loc_67B8E2
mov	bl, al
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
movsx	eax, al
and	eax, 3Fh
inc	edx
or	esi, eax
mov	[ecx], edx
cmp	esi, 80h
jb	loc_67B6E7
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_67B669:
mov	bl, al
and	bl, 0F0h
cmp	bl, 0E0h
jnz	short loc_67B6F1
movsx	esi, al
mov	al, [edx]
and	esi, 0Fh
shl	esi, 0Ch
test	al, al
jz	loc_67B8E2
mov	bl, al
and	bl, 0C0h
cmp	bl, 80h
jnz	short loc_67B6E7
movsx	eax, al
and	eax, 3Fh
inc	edx
shl	eax, 6
or	esi, eax
mov	[ecx], edx
mov	al, [edx]
test	al, al
jz	loc_67B8E2
mov	bl, al
and	bl, 0C0h
cmp	bl, 80h
jnz	short loc_67B6E7
inc	edx
mov	[ecx], edx
movsx	ecx, al
and	ecx, 3Fh
or	esi, ecx
cmp	esi, 800h
jb	short loc_67B6E7
lea	edx, [esi-0D800h]
cmp	edx, 7FFh
jbe	short loc_67B6E7
cmp	esi, 0FFFEh
jz	short loc_67B6E7
cmp	esi, 0FFFFh
jnz	loc_67B90E

loc_67B6E7:
pop	esi
mov	eax, 0FFFDh
pop	ebx
retn	4

loc_67B6F1:
mov	bl, al
and	bl, 0F8h
cmp	bl, 0F0h
jnz	short loc_67B77A
movsx	esi, al
mov	al, [edx]
and	esi, 7
shl	esi, 12h
test	al, al
jz	loc_67B8E2
mov	bl, al
and	bl, 0C0h
cmp	bl, 80h
jnz	short loc_67B6E7
movsx	eax, al
inc	edx
and	eax, 3Fh
shl	eax, 0Ch
mov	[ecx], edx
mov	bl, [edx]
or	esi, eax
test	bl, bl
jz	loc_67B8E2
mov	al, bl
and	al, 0C0h
cmp	al, 80h
jnz	short loc_67B6E7
lea	eax, [edx+1]
movsx	edx, bl
and	edx, 3Fh
shl	edx, 6
or	esi, edx
mov	[ecx], eax
mov	dl, [eax]
test	dl, dl
jz	loc_67B8E2
mov	bl, dl
and	bl, 0C0h
cmp	bl, 80h
jnz	short loc_67B6E7
inc	eax
mov	[ecx], eax
movsx	eax, dl
and	eax, 3Fh
or	esi, eax
cmp	esi, 10000h
jb	loc_67B6E7
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_67B77A:
mov	bl, al
and	bl, 0FCh
cmp	bl, 0F8h
jnz	loc_67B839
movsx	esi, al
mov	al, [edx]
and	esi, 3
shl	esi, 18h
test	al, al
jz	loc_67B8E2
mov	bl, al
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
movsx	eax, al
inc	edx
and	eax, 3Fh
shl	eax, 12h
mov	[ecx], edx
mov	bl, [edx]
or	esi, eax
test	bl, bl
jz	loc_67B8E2
mov	al, bl
and	al, 0C0h
cmp	al, 80h
jnz	loc_67B6E7
lea	eax, [edx+1]
movsx	edx, bl
and	edx, 3Fh
shl	edx, 0Ch
or	esi, edx
mov	[ecx], eax
mov	dl, [eax]
test	dl, dl
jz	loc_67B8E2
mov	bl, dl
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
movsx	edx, dl
and	edx, 3Fh
inc	eax
shl	edx, 6
or	esi, edx
mov	[ecx], eax
mov	dl, [eax]
test	dl, dl
jz	loc_67B8E2
mov	bl, dl
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
inc	eax
mov	[ecx], eax
movsx	eax, dl
and	eax, 3Fh
or	esi, eax
cmp	esi, 200000h
jb	loc_67B6E7
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_67B839:
mov	bl, al
and	bl, 0FEh
cmp	bl, 0FCh
jnz	loc_67B6E7
movsx	esi, al
mov	al, [edx]
and	esi, 1
shl	esi, 1Eh
test	al, al
jz	loc_67B8E2
mov	bl, al
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
movsx	eax, al
inc	edx
and	eax, 3Fh
shl	eax, 18h
mov	[ecx], edx
mov	bl, [edx]
or	esi, eax
test	bl, bl
jz	short loc_67B8E2
mov	al, bl
and	al, 0C0h
cmp	al, 80h
jnz	loc_67B6E7
lea	eax, [edx+1]
movsx	edx, bl
and	edx, 3Fh
shl	edx, 12h
or	esi, edx
mov	[ecx], eax
mov	dl, [eax]
test	dl, dl
jz	short loc_67B8E2
mov	bl, dl
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
movsx	edx, dl
and	edx, 3Fh
inc	eax
shl	edx, 0Ch
or	esi, edx
mov	[ecx], eax
mov	dl, [eax]
test	dl, dl
jz	short loc_67B8E2
mov	bl, dl
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
movsx	edx, dl
and	edx, 3Fh
inc	eax
shl	edx, 6
or	esi, edx
mov	[ecx], eax
mov	dl, [eax]
test	dl, dl
jnz	short loc_67B8E9

loc_67B8E2:
pop	esi
xor	eax, eax
pop	ebx
retn	4

loc_67B8E9:
mov	bl, dl
and	bl, 0C0h
cmp	bl, 80h
jnz	loc_67B6E7
inc	eax
mov	[ecx], eax
movsx	eax, dl
and	eax, 3Fh
or	esi, eax
cmp	esi, 4000000h
jb	loc_67B6E7

loc_67B90E:
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_67B600 endp

align 10h



sub_67B920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
cmp	eax, 7Fh
ja	short loc_67B93D
mov	ecx, [esp+4+arg_4]
mov	edx, [ecx]
mov	esi, [esp+4+arg_0]
mov	[esi+edx], al
inc	dword ptr [ecx]
pop	esi
retn	0Ch

loc_67B93D:
push	edi
cmp	eax, 7FFh
ja	short loc_67B96C
mov	ecx, [esp+8+arg_4]
mov	edi, [ecx]
mov	esi, [esp+8+arg_0]
mov	edx, eax
shr	edx, 6
or	dl, 0C0h
mov	[esi+edi], dl
inc	dword ptr [ecx]
mov	edx, [ecx]
and	al, 3Fh
or	al, 80h
mov	[edx+esi], al
inc	dword ptr [ecx]
pop	edi
pop	esi
retn	0Ch

loc_67B96C:
cmp	eax, 0FFFFh
ja	short loc_67B98D
mov	ecx, [esp+8+arg_4]
mov	edi, [ecx]
mov	esi, [esp+8+arg_0]
mov	edx, eax
shr	edx, 0Ch
or	dl, 0E0h
mov	[esi+edi], dl
jmp	loc_67BA1B

loc_67B98D:
cmp	eax, 1FFFFFh
ja	short loc_67B9AB
mov	ecx, [esp+8+arg_4]
mov	edi, [ecx]
mov	esi, [esp+8+arg_0]
mov	edx, eax
shr	edx, 12h
or	dl, 0F0h
mov	[esi+edi], dl
jmp	short loc_67BA09

loc_67B9AB:
cmp	eax, 3FFFFFFh
ja	short loc_67B9C9
mov	ecx, [esp+8+arg_4]
mov	edi, [ecx]
mov	esi, [esp+8+arg_0]
mov	edx, eax
shr	edx, 18h
or	dl, 0F8h
mov	[esi+edi], dl
jmp	short loc_67B9F7

loc_67B9C9:
cmp	eax, 7FFFFFFFh
ja	short loc_67BA3A
mov	ecx, [esp+8+arg_4]
mov	edi, [ecx]
mov	esi, [esp+8+arg_0]
mov	edx, eax
shr	edx, 1Eh
or	dl, 0FCh
mov	[esi+edi], dl
inc	dword ptr [ecx]
mov	edi, [ecx]
mov	edx, eax
shr	edx, 18h
and	dl, 3Fh
or	dl, 80h
mov	[edi+esi], dl

loc_67B9F7:
inc	dword ptr [ecx]
mov	edi, [ecx]
mov	edx, eax
shr	edx, 12h
and	dl, 3Fh
or	dl, 80h
mov	[edi+esi], dl

loc_67BA09:
inc	dword ptr [ecx]
mov	edi, [ecx]
mov	edx, eax
shr	edx, 0Ch
and	dl, 3Fh
or	dl, 80h
mov	[edi+esi], dl

loc_67BA1B:
inc	dword ptr [ecx]
mov	edi, [ecx]
mov	edx, eax
shr	edx, 6
and	dl, 3Fh
or	dl, 80h
mov	[edi+esi], dl
inc	dword ptr [ecx]
mov	edx, [ecx]
and	al, 3Fh
or	al, 80h
mov	[edx+esi], al
inc	dword ptr [ecx]

loc_67BA3A:
pop	edi
pop	esi
retn	0Ch
sub_67B920 endp

align 10h



sub_67BA40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
xor	ebx, ebx
cmp	esi, 0FFFFFFFFh
jz	short loc_67BA81
xor	edx, edx
push	edi
test	esi, esi
jle	short loc_67BA79
mov	edi, [esp+0Ch+arg_0]
jmp	short loc_67BA60
align 10h

loc_67BA60:
movzx	eax, word ptr [edi+edx*2]
test	ax, ax
jz	short loc_67BA79
movzx	eax, ax
push	eax
call	sub_67B5A0
inc	edx
add	ebx, eax
cmp	edx, esi
jl	short loc_67BA60

loc_67BA79:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_67BA81:
mov	edx, [esp+8+arg_0]
movzx	eax, word ptr [edx]
xor	ecx, ecx
test	ax, ax
jz	short loc_67BAF4
movzx	eax, ax

loc_67BA92:
movzx	eax, ax
cmp	eax, 7Fh
ja	short loc_67BAA1
mov	eax, 1
jmp	short loc_67BAE8

loc_67BAA1:
cmp	eax, 7FFh
ja	short loc_67BAAF
mov	eax, 2
jmp	short loc_67BAE8

loc_67BAAF:
cmp	eax, 0FFFFh
ja	short loc_67BABD
mov	eax, 3
jmp	short loc_67BAE8

loc_67BABD:
cmp	eax, 1FFFFFh
ja	short loc_67BACB
mov	eax, 4
jmp	short loc_67BAE8

loc_67BACB:
cmp	eax, 3FFFFFFh
ja	short loc_67BAD9
mov	eax, 5
jmp	short loc_67BAE8

loc_67BAD9:
mov	esi, 7FFFFFFFh
cmp	esi, eax
sbb	eax, eax
and	eax, 0FFFFFFFAh
add	eax, 6

loc_67BAE8:
inc	ecx
add	ebx, eax
movzx	eax, word ptr [edx+ecx*2]
test	ax, ax
jnz	short loc_67BA92

loc_67BAF4:
pop	esi
mov	eax, ebx
pop	ebx
retn	8
sub_67BA40 endp

align 10h



sub_67BB00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	esi
push	edi
mov	edi, [esp+10h+arg_8]
xor	ecx, ecx
xor	esi, esi
mov	[esp+10h+var_4], ecx
cmp	edi, 0FFFFFFFFh
jz	short loc_67BB54
test	edi, edi
jle	loc_67BBAD
mov	ebx, [esp+10h+arg_0]
push	ebp
mov	ebp, [esp+14h+arg_4]

loc_67BB26:
movzx	eax, word ptr [ebp+esi*2+0]
test	ax, ax
jz	short loc_67BB9D
movzx	eax, ax
push	eax
lea	ecx, [esp+18h+var_4]
push	ecx
push	ebx
call	sub_67B920
inc	esi
cmp	esi, edi
jl	short loc_67BB26
mov	edx, [esp+14h+var_4]
pop	ebp
pop	edi
pop	esi
mov	byte ptr [edx+ebx], 0
pop	ebx
pop	ecx
retn	0Ch

loc_67BB54:
mov	ebx, [esp+10h+arg_4]
movzx	eax, word ptr [ebx]
test	ax, ax
jz	short loc_67BB8F
mov	edi, [esp+10h+arg_0]
movzx	eax, ax

loc_67BB67:
movzx	eax, ax
push	eax
lea	ecx, [esp+14h+var_4]
push	ecx
push	edi
call	sub_67B920
movzx	eax, word ptr [ebx+esi*2+2]
inc	esi
test	ax, ax
jnz	short loc_67BB67
mov	edx, [esp+10h+var_4]
mov	[edx+edi], al
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	0Ch

loc_67BB8F:
mov	eax, [esp+10h+arg_0]
pop	edi
pop	esi
mov	[ecx+eax], cl
pop	ebx
pop	ecx
retn	0Ch

loc_67BB9D:
mov	ecx, [esp+14h+var_4]
pop	ebp
pop	edi
pop	esi
mov	byte ptr [ecx+ebx], 0
pop	ebx
pop	ecx
retn	0Ch

loc_67BBAD:
mov	edx, [esp+10h+arg_0]
pop	edi
pop	esi
mov	[ecx+edx], cl
pop	ebx
pop	ecx
retn	0Ch
sub_67BB00 endp

align 10h



sub_67BBC0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_8]
mov	ebx, esi
cmp	edi, 0FFFFFFFFh
jnz	short loc_67BC0F
lea	eax, [esp+0Ch+arg_4]
push	eax
call	sub_67B600
test	eax, eax
jz	short loc_67BC38

loc_67BBE0:
cmp	eax, 0FFFFh
jb	short loc_67BBEC
mov	eax, 0FFFDh

loc_67BBEC:
lea	ecx, [esp+0Ch+arg_4]
mov	[esi], ax
push	ecx
add	esi, 2
call	sub_67B600
test	eax, eax
jnz	short loc_67BBE0
mov	[esi], ax
mov	eax, esi
pop	edi
sub	eax, ebx
pop	esi
sar	eax, 1
pop	ebx
retn	0Ch

loc_67BC0F:
test	edi, edi
jle	short loc_67BC38

loc_67BC13:
lea	edx, [esp+0Ch+arg_4]
push	edx
call	sub_67B600
dec	edi
test	eax, eax
jz	short loc_67BC38
cmp	eax, 0FFFFh
jb	short loc_67BC2E
mov	eax, 0FFFDh

loc_67BC2E:
mov	[esi], ax
add	esi, 2
test	edi, edi
jg	short loc_67BC13

loc_67BC38:
xor	eax, eax
mov	[esi], ax
mov	eax, esi
pop	edi
sub	eax, ebx
pop	esi
sar	eax, 1
pop	ebx
retn	0Ch
sub_67BBC0 endp

align 10h



sub_67BC50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
xor	esi, esi
mov	[esp+0Ch+arg_0], ebx
cmp	edi, 0FFFFFFFFh
jz	short loc_67BC91
test	edi, edi
jle	short loc_67BCAF
lea	ebx, [ebx+0]

loc_67BC70:
lea	eax, [esp+0Ch+arg_0]
push	eax
call	sub_67B600
test	eax, eax
jz	short loc_67BCAF
mov	ecx, [esp+0Ch+arg_0]
sub	ecx, ebx
inc	esi
cmp	ecx, edi
jl	short loc_67BC70
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8

loc_67BC91:
lea	edx, [esp+0Ch+arg_0]
push	edx
call	sub_67B600
test	eax, eax
jz	short loc_67BCAF
nop

loc_67BCA0:
lea	eax, [esp+0Ch+arg_0]
push	eax
inc	esi
call	sub_67B600
test	eax, eax
jnz	short loc_67BCA0

loc_67BCAF:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_67BC50 endp

align 10h



sub_67BCC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_8]
mov	eax, ebx
mov	[esp+8+arg_4], eax
cmp	esi, 0FFFFFFFFh
jz	short loc_67BD07
push	edi
test	esi, esi
jle	short loc_67BCFF
mov	edi, [esp+0Ch+arg_0]
mov	edi, edi

loc_67BCE0:
test	edi, edi
jle	short loc_67BCFF
lea	eax, [esp+0Ch+arg_4]
push	eax
dec	edi
call	sub_67B600
test	eax, eax
mov	eax, [esp+0Ch+arg_4]
jz	short loc_67BCFF
mov	ecx, eax
sub	ecx, ebx
cmp	ecx, esi
jl	short loc_67BCE0

loc_67BCFF:
pop	edi
pop	esi
sub	eax, ebx
pop	ebx
retn	0Ch

loc_67BD07:
mov	esi, [esp+8+arg_0]
test	esi, esi
jle	short loc_67BD27
nop

loc_67BD10:
lea	edx, [esp+8+arg_4]
push	edx
dec	esi
call	sub_67B600
test	eax, eax
jz	short loc_67BD23
test	esi, esi
jg	short loc_67BD10

loc_67BD23:
mov	eax, [esp+8+arg_4]

loc_67BD27:
pop	esi
sub	eax, ebx
pop	ebx
retn	0Ch
sub_67BCC0 endp

align 10h



sub_67BD30 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_663B00
mov	dword ptr [esi], offset	off_14366A0
mov	dword ptr [esi+10h], offset off_1436778
mov	eax, esi
pop	esi
retn	4
sub_67BD30 endp




sub_67BD50 proc	near

var_11=	byte ptr -11h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_0]
push	ebp
mov	ebp, [ecx+10h]
push	esi
mov	esi, [ebx]
push	edi
lea	edi, [ecx+10h]
mov	ecx, [esp+24h+arg_4]
lea	eax, [esp+24h+var_11]
push	eax
push	ecx
lea	ecx, [esp+2Ch+var_10]
mov	[esp+2Ch+var_11], 0
add	esi, 140h
call	sub_652700
mov	edx, [ebp+28h]
push	eax
push	esi
push	ebx
mov	ecx, edi
call	edx
lea	ecx, [esp+24h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	8
sub_67BD50 endp

align 10h



sub_67BDA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_663B00
mov	dword ptr [esi], offset	off_14366E8
mov	dword ptr [esi+10h], offset off_1436778
mov	dword ptr [esi+34h], 0
mov	eax, esi
pop	esi
retn	4
sub_67BDA0 endp

align 10h



sub_67BDD0 proc	near
mov	dword ptr [ecx], offset	off_14366A0
mov	dword ptr [ecx+10h], offset off_1436778
jmp	sub_664A30
sub_67BDD0 endp

align 10h



sub_67BDF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+18h]
retn	8
sub_67BDF0 endp

align 10h



sub_67BE00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+34h]
push	edi
mov	edi, ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_67BE27
mov	eax, [edi+34h]
cmp	eax, [esi+34h]
jnz	short loc_67BE27
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_67BE27:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_67BE00 endp

align 10h



sub_67BE30 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+18h]
push	esi
mov	esi, [eax+4]
cmp	byte ptr [esi],	5
push	edi
mov	edi, [ecx+78h]
jb	short loc_67BE4B
mov	ecx, esi
call	sub_652060

loc_67BE4B:
mov	byte ptr [esi],	5
mov	eax, [edi+158h]
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	edi
pop	esi
retn
sub_67BE30 endp

align 10h



sub_67BE60 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx+8]
test	eax, eax
jz	short loc_67BE78
mov	ecx, [ecx+4]
add	eax, 0FFFFFFF0h
push	eax
call	sub_652E40
retn

loc_67BE78:
mov	ecx, [ecx+4]
xor	eax, eax
push	eax
call	sub_652E40
retn
sub_67BE60 endp

align 10h



sub_67BE90 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_67BEA0
align 10h

loc_67BEA0:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14366A0
mov	dword ptr [esi+10h], offset off_1436778
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_67BECA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_67BECA:
mov	eax, esi
pop	esi
retn	4
sub_67BE90 endp




sub_67BED0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_67BEF9
push	esi
mov	ecx, eax
call	sub_663BE0
pop	esi
retn	4

loc_67BEF9:
xor	eax, eax
pop	esi
retn	4
sub_67BED0 endp

align 10h



sub_67BF00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+34h]
push	ebx
push	esi
test	eax, eax
jnz	short loc_67BF0D
xor	esi, esi
jmp	short loc_67BF1F

loc_67BF0D:
mov	ecx, [ecx+38h]
push	eax
call	sub_654F00
mov	esi, eax
test	esi, esi
jz	short loc_67BF1F
inc	dword ptr [esi+4]

loc_67BF1F:
xor	ebx, ebx
test	esi, esi
jz	short loc_67BF30
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	ebx, eax

loc_67BF30:
push	edi
mov	edi, [esp+0Ch+arg_4]
test	edi, edi
jz	short loc_67BF4D
test	esi, esi
jz	short loc_67BF40
inc	dword ptr [esi+4]

loc_67BF40:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_67BF4B
call	sub_64A400

loc_67BF4B:
mov	[edi], esi

loc_67BF4D:
pop	edi
test	ebx, ebx
jnz	short loc_67BF59
mov	eax, [esp+8+arg_0]
mov	ebx, [eax+18h]

loc_67BF59:
test	esi, esi
jz	short loc_67BF64
mov	ecx, esi
call	sub_64A400

loc_67BF64:
pop	esi
mov	eax, ebx
pop	ebx
retn	8
sub_67BF00 endp

align 10h



sub_67BF70 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
lea	ecx, [ecx+eax*8-8]
test	eax, eax
jbe	short loc_67BF9E
push	esi
push	edi
lea	esi, [ecx+4]
mov	edi, eax

loc_67BF87:
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_67BF94
call	sub_650DF0

loc_67BF94:
sub	esi, 8
sub	edi, 1
jnz	short loc_67BF87
pop	edi
pop	esi

loc_67BF9E:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx
retn
sub_67BF70 endp




sub_67BFB0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_67BFD6
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_67BFD6
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_67BFD6:
mov	ecx, [esi+4]
pop	esi
test	ecx, ecx
jz	short locret_67BFFB
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short locret_67BFFB
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

locret_67BFFB:
retn
sub_67BFB0 endp

align 10h



sub_67C000 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_67C034
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_67C034
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_67C034:
mov	ecx, [esi+4]
pop	esi
test	ecx, ecx
jz	short locret_67C067
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short locret_67C067
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

locret_67C067:
retn
sub_67C000 endp

align 10h



sub_67C070 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_67C0B1
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_67C0B1
test	eax, 0FFFFFFFh
jbe	short loc_67C09C
and	eax, 8FFFFFFFh
push	2
jmp	short loc_67C0A8

loc_67C09C:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_67C0A8:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_67C0B1:
mov	ecx, [esi+4]
pop	esi
test	ecx, ecx
jz	short locret_67C0F9
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short locret_67C0F9
test	eax, 0FFFFFFFh
jbe	short loc_67C0E4
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx
retn

loc_67C0E4:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	4
call	edx

locret_67C0F9:
retn
sub_67C070 endp

align 10h



sub_67C100 proc	near
push	ebx
mov	ebx, ecx
push	ebp
mov	ebp, [ebx+1Ch]
test	ebp, ebp
jz	short loc_67C116
mov	eax, [ebp+80h]
mov	[ebx+1Ch], eax
jmp	short loc_67C12D

loc_67C116:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+38h]
push	0
push	84h
push	ebx
call	eax
mov	ebp, eax

loc_67C12D:
test	ebp, ebp
jz	short loc_67C18B
push	esi
mov	esi, [ebx+14h]
push	edi
lea	edi, [ebx+10h]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_67C14B
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_67C160
push	esi
jmp	short loc_67C158

loc_67C14B:
cmp	esi, [edi+8]
jb	short loc_67C160
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_67C158:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_67C160:
mov	eax, [edi]
mov	[edi+4], esi
lea	eax, [eax+esi*4-4]
pop	edi
pop	esi
test	eax, eax
jz	short loc_67C171
mov	[eax], ebp

loc_67C171:
mov	ecx, [ebx+8]
mov	[ebx+4], ebp
lea	edx, [ebp+80h]
mov	[ebx], ebp
sub	ecx, 4
pop	ebp
mov	[ebx+0Ch], ecx
mov	[ebx+8], edx
pop	ebx
retn

loc_67C18B:
add	dword ptr [ebx], 0FFFFFFFCh
pop	ebp
pop	ebx
retn
sub_67C100 endp

align 10h



sub_67C1A0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_67C1B5
test	byte ptr [esi+8], 1
jnz	short loc_67C1B5
call	sub_64B3B0

loc_67C1B5:
cmp	[esp+4+arg_4], 0
mov	eax, [esp+4+arg_0]
mov	[esi+4], eax
jz	short loc_67C1C9
or	byte ptr [esi+8], 1
jmp	short loc_67C1CD

loc_67C1C9:
and	byte ptr [esi+8], 0FEh

loc_67C1CD:
test	eax, eax
jz	short loc_67C1E4
test	byte ptr [esi+8], 1
jnz	short loc_67C1E4
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_67C1E4:
pop	esi
retn	8
sub_67C1A0 endp

align 10h



sub_67C1F0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_67C1FE
call	sub_64B3B0

loc_67C1FE:
mov	ecx, [esi+4]
pop	esi
test	ecx, ecx
jz	short locret_67C20B
jmp	sub_64B3B0

locret_67C20B:
retn
sub_67C1F0 endp

align 10h



sub_67C210 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_67C21E
call	sub_64B020

loc_67C21E:
mov	ecx, [esi+4]
pop	esi
test	ecx, ecx
jz	short locret_67C22B
jmp	sub_64B020

locret_67C22B:
retn
sub_67C210 endp

align 10h



sub_67C230 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [ecx+6Ch]
push	esi
mov	esi, [ecx+6Ch]
add	esi, [esp+8+arg_0]
push	edi
lea	edi, [ecx+68h]
push	esi
push	edi
mov	ecx, edi
call	sub_6699F0
cmp	esi, ebx
jbe	short loc_67C267
mov	eax, ebx
shl	eax, 4
add	eax, [edi]
sub	esi, ebx
jz	short loc_67C267

loc_67C258:
test	eax, eax
jz	short loc_67C25F
mov	byte ptr [eax],	0

loc_67C25F:
add	eax, 10h
sub	esi, 1
jnz	short loc_67C258

loc_67C267:
pop	edi
pop	esi
pop	ebx
retn	4
sub_67C230 endp

align 10h



sub_67C270 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [ecx+6Ch]
push	esi
mov	esi, [ecx+6Ch]
sub	esi, [esp+8+arg_0]
push	edi
lea	edi, [ecx+68h]
push	esi
push	edi
mov	ecx, edi
call	sub_6699F0
cmp	esi, ebx
jbe	short loc_67C2A7
mov	eax, ebx
shl	eax, 4
add	eax, [edi]
sub	esi, ebx
jz	short loc_67C2A7

loc_67C298:
test	eax, eax
jz	short loc_67C29F
mov	byte ptr [eax],	0

loc_67C29F:
add	eax, 10h
sub	esi, 1
jnz	short loc_67C298

loc_67C2A7:
pop	edi
pop	esi
pop	ebx
retn	4
sub_67C270 endp

align 10h



sub_67C2B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+10h]
mov	edx, [eax+34h]
sub	esp, 1Ch
push	ebx
mov	ebx, [esp+20h+arg_4]
push	esi
push	edi
mov	edi, [esp+28h+arg_0]
lea	esi, [ecx+10h]
push	ebx
push	edi
mov	ecx, esi
call	edx
push	edi
lea	eax, [esp+2Ch+var_1C]
push	eax
lea	ecx, [ebx+10h]
call	sub_66ADA0
mov	ecx, [esp+28h+var_1C]
test	ecx, ecx
jz	short loc_67C31F
lea	ecx, [esp+28h+var_1C]
push	ecx
lea	ecx, [esp+2Ch+var_10]
mov	byte ptr [esp+2Ch+arg_4], 3
call	sub_651E70
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_4]
push	eax
mov	eax, [edi]
lea	ecx, [esp+2Ch+var_10]
push	ecx
add	eax, 148h
push	eax
push	edi
mov	ecx, esi
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	ecx, [esp+28h+var_1C]

loc_67C31F:
test	[esp+28h+var_14], 2
pop	edi
pop	esi
pop	ebx
jnz	short loc_67C332
test	ecx, ecx
jz	short loc_67C332
call	sub_64B3B0

loc_67C332:
test	[esp+1Ch+var_14], 1
mov	[esp+1Ch+var_1C], 0
jnz	short loc_67C34D
mov	ecx, [esp+1Ch+var_18]
test	ecx, ecx
jz	short loc_67C34D
call	sub_64B3B0

loc_67C34D:
add	esp, 1Ch
retn	8
sub_67C2B0 endp

align 10h



sub_67C360 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	edx, edx
add	ecx, 0FFFFFFF0h
mov	[eax+8], dl
mov	[eax], ecx
mov	[eax+4], edx
cmp	ecx, edx
jz	short locret_67C384
push	esi
mov	esi, [ecx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[ecx+8], esi
pop	esi

locret_67C384:
retn	4
sub_67C360 endp

align 10h



sub_67C390 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_663B00
mov	edx, [esp+8+arg_4]
mov	eax, [esp+8+arg_8]
push	edx
lea	ecx, [esi+10h]
push	edi
mov	dword ptr [esi], offset	off_14366E8
mov	dword ptr [ecx], offset	off_1436778
mov	[esi+34h], eax
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_67C390 endp

align 10h



sub_67C3D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	edi
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_14366E8
mov	dword ptr [ebx], offset	off_1436778
mov	[esi+34h], eax
mov	ecx, [edi]
push	7
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_67C3D0 endp

align 10h



sub_67C410 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 24h
push	ebp
mov	ebp, ecx
cmp	dword ptr [ebp+34h], 0
jz	loc_67C4AE
push	esi
mov	esi, [esp+2Ch+arg_0]
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_67C4A3
mov	eax, [edi]
mov	edx, [eax+3Ch]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_67C4A3
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
mov	edx, [esi+18h]
mov	esi, [esi+4]
mov	[esp+30h+var_4], eax
add	edi, 0FFFFFFF0h
mov	[esp+30h+var_20], esi
mov	esi, [edi+3Ch]
lea	eax, [esp+30h+var_24]
mov	[esp+30h+var_8], ecx
mov	ecx, [ebp+34h]
push	eax
mov	[esp+34h+var_24], offset off_1431764
mov	[esp+34h+var_1C], esi
mov	[esp+34h+var_10], 0
mov	[esp+34h+var_18], 0
mov	[esp+34h+var_14], 0
mov	[esp+34h+var_C], edx
call	ecx
add	esp, 4
mov	ecx, edi
call	sub_64B9E0
lea	ecx, [esp+30h+var_24]
call	sub_64B830
pop	edi
pop	esi
pop	ebp
add	esp, 24h
retn	0Ch

loc_67C4A3:
mov	edx, [ebp+34h]
push	esi
call	edx
add	esp, 4
pop	edi
pop	esi

loc_67C4AE:
pop	ebp
add	esp, 24h
retn	0Ch
sub_67C410 endp

align 10h



sub_67C4C0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	esi, edi
jz	short loc_67C541
test	byte ptr [esi+8], 2
push	ebp
mov	ebp, [esi]
jnz	short loc_67C4E4
test	ebp, ebp
jz	short loc_67C4E4
cmp	ebp, [edi]
jz	short loc_67C4E4
mov	ecx, ebp
call	sub_64B3B0

loc_67C4E4:
test	byte ptr [esi+8], 2
mov	eax, [edi]
mov	[esi], eax
jnz	short loc_67C505
mov	eax, [edi]
test	eax, eax
jz	short loc_67C505
cmp	ebp, eax
jz	short loc_67C505
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_67C505:
mov	eax, [edi+4]
pop	ebp
test	eax, eax
jz	short loc_67C524
mov	dl, [edi+8]
and	dl, 1
movzx	ecx, dl
push	ecx
push	eax
mov	ecx, esi
call	sub_67C1A0
pop	edi
pop	esi
retn	4

loc_67C524:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_67C536
test	byte ptr [esi+8], 1
jnz	short loc_67C536
call	sub_64B3B0

loc_67C536:
and	byte ptr [esi+8], 0FEh
mov	dword ptr [esi+4], 0

loc_67C541:
pop	edi
pop	esi
retn	4
sub_67C4C0 endp

align 10h



sub_67C550 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
cmp	dword ptr [edi+1Ch], 1
jnz	short loc_67C5AA
push	0
mov	ecx, edi
call	sub_651EC0
mov	al, [eax]
cmp	al, 8
jz	short loc_67C58B
cmp	al, 0Bh
jz	short loc_67C58B
push	0
mov	ecx, edi
call	sub_651EC0
cmp	byte ptr [eax],	0Bh
jz	short loc_67C58B
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	1
pop	edi
retn

loc_67C58B:
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ecx, [edi+4]
push	eax
call	sub_652E40
pop	edi
retn

loc_67C5AA:
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	0
push	38h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_67C5E9
mov	eax, [edi+18h]
push	eax
mov	ecx, esi
call	sub_663BE0
mov	dword ptr [esi], offset	off_14366E8
mov	dword ptr [esi+10h], offset off_1436778
mov	dword ptr [esi+34h], 0
jmp	short loc_67C5EB

loc_67C5E9:
xor	esi, esi

loc_67C5EB:
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_67C601
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_64B3B0

loc_67C601:
pop	esi
pop	edi
retn
sub_67C550 endp

align 10h



sub_67C610 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_14366E8
mov	dword ptr [edi], offset	off_1436778
mov	dword ptr [esi+34h], offset sub_67C550
mov	ecx, [ebx]
push	7
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
mov	dword ptr [edi], offset	off_1436778
pop	edi
mov	dword ptr [esi], offset	off_1436730
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_67C610 endp

align 10h



sub_67C660 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx+4]
mov	esi, ecx
cmp	edi, [esi+4]
jnb	short loc_67C67D
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_67C692
push	edi
jmp	short loc_67C68C

loc_67C67D:
cmp	edi, [esi+8]
jb	short loc_67C692
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
mov	ecx, esi

loc_67C68C:
push	esi
call	sub_669070

loc_67C692:
xor	eax, eax
mov	[esi+4], edi
test	edi, edi
jbe	short loc_67C6B8
jmp	short loc_67C6A0
align 10h

loc_67C6A0:
mov	ecx, [ebx]
mov	edi, [ecx+eax*8]
mov	edx, [esi]
mov	[edx+eax*8], edi
mov	ecx, [ecx+eax*8+4]
mov	[edx+eax*8+4], ecx
inc	eax
cmp	eax, [esi+4]
jb	short loc_67C6A0

loc_67C6B8:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_67C660 endp




sub_67C6C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_665C30
cmp	[esp+8+arg_C], 0
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
jz	short loc_67C70D
lea	edx, [esp+8+arg_C]
push	edx
push	offset off_1436678
push	edi
push	esi
mov	[esp+18h+arg_C], 1
call	sub_663110

loc_67C70D:
pop	edi
mov	eax, esi
pop	esi
retn	10h
sub_67C6C0 endp

align 10h



sub_67C720 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 6Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+7Ch+arg_0]
mov	esi, [edi+4]
xor	ebx, ebx
mov	ecx, esi
mov	[esp+7Ch+var_60], ebx
mov	[esp+7Ch+var_64], ebx
mov	[esp+7Ch+var_68], ebx
mov	[esp+7Ch+var_6C], ebx
call	sub_652060
mov	ebp, 1
mov	[esi], bl
cmp	[edi+1Ch], ebp
mov	[esp+7Ch+arg_0], ebx
jl	short loc_67C7B8
mov	eax, [edi+18h]
push	eax
push	ebx
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	[esp+7Ch+var_68], eax
cmp	eax, ebx
jz	short loc_67C7B8
mov	esi, eax
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_67C79F
mov	ecx, esi
call	sub_661C10
cmp	eax, ebx
jz	short loc_67C799
add	[eax+4], ebp

loc_67C799:
mov	[esp+7Ch+var_64], eax
jmp	short loc_67C7B8

loc_67C79F:
lea	eax, [esi-10h]
cmp	eax, ebx
jz	short loc_67C7B4
mov	ecx, [eax+8]
add	ecx, ebp
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_67C7B4:
mov	[esp+7Ch+var_60], eax

loc_67C7B8:
cmp	dword ptr [edi+1Ch], 2
jl	loc_67C84C
mov	edx, [edi+18h]
push	edx
push	ebp
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_67C84C
mov	eax, [ebp+10h]
mov	edx, [eax+8]
lea	ecx, [ebp+10h]
call	edx
cmp	eax, 7
jnz	short loc_67C84C
mov	eax, [ebp+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebp+8], eax
mov	eax, [ebp+3Ch]
cmp	eax, ebx
mov	[esp+7Ch+arg_0], ebp
mov	[esp+7Ch+var_6C], eax
jle	short loc_67C84C
mov	ebx, eax
add	ebx, 0FFFFFFFFh
js	short loc_67C84A

loc_67C810:
mov	esi, [edi+18h]
mov	ecx, [ebp+38h]
mov	edx, [ecx+ebx*4]
add	dword ptr [esi+8], 10h
mov	eax, [esi+8]
add	esi, 8
mov	[esp+7Ch+var_5C], edx
cmp	eax, [esi+8]
jb	short loc_67C833
mov	ecx, esi
call	sub_64B530

loc_67C833:
mov	esi, [esi]
test	esi, esi
jz	short loc_67C845
mov	eax, [esp+7Ch+var_5C]
push	eax
mov	ecx, esi
call	sub_652330

loc_67C845:
sub	ebx, 1
jns	short loc_67C810

loc_67C84A:
xor	ebx, ebx

loc_67C84C:
mov	[esp+7Ch+var_58], 0
cmp	[edi+0Ch], ebx
jz	loc_67C8F7
mov	eax, [edi+18h]
mov	ecx, [eax+8]
sub	ecx, [eax+0Ch]
mov	edx, [eax+1Ch]
mov	esi, [esp+7Ch+var_6C]
shl	edx, 5
sar	ecx, 4
lea	ecx, [ecx+edx-20h]
lea	edx, [esp+7Ch+var_58]
mov	[esp+7Ch+var_44], edx
mov	edx, [esp+7Ch+var_68]
mov	[esp+7Ch+var_40], edx
mov	edx, [edi+10h]
mov	[esp+7Ch+var_28], ecx
mov	ecx, [edi+0Ch]
push	ebx
mov	ebp, offset off_1431764
mov	[esp+80h+var_30], eax
push	edx
mov	[esp+84h+var_48], ebp
mov	[esp+84h+var_34], 0
mov	[esp+84h+var_3C], ebx
mov	[esp+84h+var_38], ebx
mov	[esp+84h+var_2C], esi
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+84h+var_48]
push	edx
call	eax
test	[esp+7Ch+var_34], 2
mov	[esp+7Ch+var_48], ebp
jnz	short loc_67C8D2
mov	ecx, [esp+7Ch+var_3C]
cmp	ecx, ebx
jz	short loc_67C8D2
call	sub_64B3B0

loc_67C8D2:
test	[esp+7Ch+var_34], 1
mov	[esp+7Ch+var_3C], ebx
jnz	loc_67C9B0
mov	ecx, [esp+7Ch+var_38]
cmp	ecx, ebx
jz	loc_67C9B0
call	sub_64B3B0
jmp	loc_67C9B0

loc_67C8F7:
mov	esi, [edi+8]
cmp	esi, ebx
jz	loc_67CA08
add	esi, 0FFFFFFF0h
cmp	esi, ebx
jz	short loc_67C916
mov	ecx, [esi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx

loc_67C916:
mov	eax, [edi+18h]
mov	edx, [eax+8]
sub	edx, [eax+0Ch]
mov	ecx, [eax+1Ch]
sar	edx, 4
shl	ecx, 5
lea	ecx, [edx+ecx-20h]
lea	edx, [esp+7Ch+var_58]
mov	[esp+7Ch+var_20], edx
mov	edx, [esp+7Ch+var_68]
mov	[esp+7Ch+var_C], eax
mov	eax, [esp+7Ch+var_6C]
push	ebx
mov	[esp+80h+var_1C], edx
mov	edx, [esi]
mov	edx, [edx+28h]
mov	[esp+80h+var_8], eax
push	ebx
lea	eax, [esp+84h+var_24]
mov	[esp+84h+var_4], ecx
mov	ebp, offset off_1431764
push	eax
mov	ecx, esi
mov	[esp+88h+var_24], ebp
mov	[esp+88h+var_10], 0
mov	[esp+88h+var_18], ebx
mov	[esp+88h+var_14], ebx
call	edx
test	[esp+7Ch+var_10], 2
mov	[esp+7Ch+var_24], ebp
jnz	short loc_67C98D
mov	ecx, [esp+7Ch+var_18]
cmp	ecx, ebx
jz	short loc_67C98D
call	sub_64B3B0

loc_67C98D:
test	[esp+7Ch+var_10], 1
mov	[esp+7Ch+var_18], ebx
jnz	short loc_67C9A5
mov	ecx, [esp+7Ch+var_14]
cmp	ecx, ebx
jz	short loc_67C9A5
call	sub_64B3B0

loc_67C9A5:
mov	ecx, esi
call	sub_64B3B0
mov	esi, [esp+7Ch+var_6C]

loc_67C9B0:
cmp	esi, ebx
jle	short loc_67C9C0
mov	ecx, [edi+18h]
push	esi
add	ecx, 8
call	sub_64C1F0

loc_67C9C0:
mov	ecx, [edi+4]
lea	eax, [esp+7Ch+var_58]
push	eax
call	sub_652520
lea	ecx, [esp+7Ch+var_58]
call	sub_652830
mov	ecx, [esp+7Ch+arg_0]
cmp	ecx, ebx
jz	short loc_67C9E6
call	sub_64B3B0

loc_67C9E6:
mov	ecx, [esp+7Ch+var_64]
cmp	ecx, ebx
jz	short loc_67C9F3
call	sub_64A400

loc_67C9F3:
mov	ecx, [esp+7Ch+var_60]
pop	edi
pop	esi
pop	ebp
cmp	ecx, ebx
pop	ebx
jz	short loc_67CA04
call	sub_64B3B0

loc_67CA04:
add	esp, 6Ch
retn

loc_67CA08:
xor	esi, esi
jmp	loc_67C916
sub_67C720 endp

align 10h



sub_67CA10 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 68h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+78h+arg_0]
mov	esi, [edi+4]
xor	ebx, ebx
mov	ecx, esi
mov	[esp+78h+var_5C], ebx
mov	[esp+78h+var_60], ebx
mov	[esp+78h+var_68], ebx
mov	[esp+78h+var_64], ebx
call	sub_652060
mov	ebp, 1
mov	[esi], bl
cmp	[edi+1Ch], ebp
jl	short loc_67CA9E
mov	eax, [edi+18h]
push	eax
push	ebx
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	[esp+78h+var_68], eax
cmp	eax, ebx
jz	short loc_67CA9E
mov	esi, eax
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_67CA85
mov	ecx, esi
call	sub_661C10
cmp	eax, ebx
jz	short loc_67CA7F
add	[eax+4], ebp

loc_67CA7F:
mov	[esp+78h+var_60], eax
jmp	short loc_67CA9E

loc_67CA85:
lea	eax, [esi-10h]
cmp	eax, ebx
jz	short loc_67CA9A
mov	ecx, [eax+8]
add	ecx, ebp
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_67CA9A:
mov	[esp+78h+var_5C], eax

loc_67CA9E:
mov	eax, [edi+1Ch]
cmp	eax, 2
jl	short loc_67CAE8
lea	ebp, [eax-1]
cmp	ebp, 1
mov	[esp+78h+var_64], ebp
jl	short loc_67CAE8

loc_67CAB2:
push	ebp
mov	ecx, edi
call	sub_651EC0
mov	esi, [edi+18h]
add	dword ptr [esi+8], 10h
add	esi, 8
mov	ebx, eax
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_67CAD4
mov	ecx, esi
call	sub_64B530

loc_67CAD4:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_67CAE0
push	ebx
call	sub_652330

loc_67CAE0:
dec	ebp
cmp	ebp, 1
jge	short loc_67CAB2
xor	ebx, ebx

loc_67CAE8:
mov	[esp+78h+var_58], 0
cmp	[edi+0Ch], ebx
jz	loc_67CB93
mov	eax, [edi+18h]
mov	edx, [eax+8]
sub	edx, [eax+0Ch]
mov	ecx, [eax+1Ch]
mov	esi, [esp+78h+var_64]
sar	edx, 4
shl	ecx, 5
lea	ecx, [edx+ecx-20h]
lea	edx, [esp+78h+var_58]
mov	[esp+78h+var_44], edx
mov	edx, [esp+78h+var_68]
mov	[esp+78h+var_40], edx
mov	edx, [edi+10h]
mov	[esp+78h+var_28], ecx
mov	ecx, [edi+0Ch]
push	ebx
mov	ebp, offset off_1431764
mov	[esp+7Ch+var_30], eax
push	edx
mov	[esp+80h+var_48], ebp
mov	[esp+80h+var_34], 0
mov	[esp+80h+var_3C], ebx
mov	[esp+80h+var_38], ebx
mov	[esp+80h+var_2C], esi
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+80h+var_48]
push	edx
call	eax
test	[esp+78h+var_34], 2
mov	[esp+78h+var_48], ebp
jnz	short loc_67CB6E
mov	ecx, [esp+78h+var_3C]
cmp	ecx, ebx
jz	short loc_67CB6E
call	sub_64B3B0

loc_67CB6E:
test	[esp+78h+var_34], 1
mov	[esp+78h+var_3C], ebx
jnz	loc_67CC49
mov	ecx, [esp+78h+var_38]
cmp	ecx, ebx
jz	loc_67CC49
call	sub_64B3B0
jmp	loc_67CC49

loc_67CB93:
mov	esi, [edi+8]
cmp	esi, ebx
jz	loc_67CC91
add	esi, 0FFFFFFF0h
cmp	esi, ebx
jz	short loc_67CBB2
mov	ecx, [esi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx

loc_67CBB2:
mov	eax, [edi+18h]
mov	edx, [eax+8]
sub	edx, [eax+0Ch]
mov	ecx, [eax+1Ch]
sar	edx, 4
shl	ecx, 5
lea	ecx, [edx+ecx-20h]
lea	edx, [esp+78h+var_58]
mov	[esp+78h+var_20], edx
mov	edx, [esp+78h+var_68]
mov	[esp+78h+var_C], eax
mov	eax, [esp+78h+var_64]
push	ebx
mov	[esp+7Ch+var_1C], edx
mov	edx, [esi]
mov	edx, [edx+28h]
mov	[esp+7Ch+var_8], eax
push	ebx
lea	eax, [esp+80h+var_24]
mov	[esp+80h+var_4], ecx
mov	ebp, offset off_1431764
push	eax
mov	ecx, esi
mov	[esp+84h+var_24], ebp
mov	[esp+84h+var_10], 0
mov	[esp+84h+var_18], ebx
mov	[esp+84h+var_14], ebx
call	edx
test	[esp+78h+var_10], 2
mov	[esp+78h+var_24], ebp
jnz	short loc_67CC26
mov	ecx, [esp+78h+var_18]
cmp	ecx, ebx
jz	short loc_67CC26
call	sub_64B3B0

loc_67CC26:
test	[esp+78h+var_10], 1
mov	[esp+78h+var_18], ebx
jnz	short loc_67CC3E
mov	ecx, [esp+78h+var_14]
cmp	ecx, ebx
jz	short loc_67CC3E
call	sub_64B3B0

loc_67CC3E:
mov	ecx, esi
call	sub_64B3B0
mov	esi, [esp+78h+var_64]

loc_67CC49:
cmp	esi, ebx
jle	short loc_67CC59
mov	ecx, [edi+18h]
push	esi
add	ecx, 8
call	sub_64C1F0

loc_67CC59:
mov	ecx, [edi+4]
lea	eax, [esp+78h+var_58]
push	eax
call	sub_652520
lea	ecx, [esp+78h+var_58]
call	sub_652830
mov	ecx, [esp+78h+var_60]
cmp	ecx, ebx
jz	short loc_67CC7C
call	sub_64A400

loc_67CC7C:
mov	ecx, [esp+78h+var_5C]
pop	edi
pop	esi
pop	ebp
cmp	ecx, ebx
pop	ebx
jz	short loc_67CC8D
call	sub_64B3B0

loc_67CC8D:
add	esp, 68h
retn

loc_67CC91:
xor	esi, esi
jmp	loc_67CBB2
sub_67CA10 endp

align 10h



sub_67CCA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663BE0
mov	eax, [esp+10h+arg_4]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_1436828
mov	dword ptr [esi+10h], offset off_14367D0
mov	[esi+34h], ebx
mov	[esi+38h], ebx
cmp	eax, ebx
jz	short loc_67CCD0
inc	dword ptr [eax+4]

loc_67CCD0:
mov	ecx, [esp+10h+arg_C]
mov	[esi+3Ch], eax
mov	eax, [esp+10h+arg_8]
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esi+48h], ebx
mov	[esi+4Ch], eax
mov	[esi+50h], ecx
mov	edx, [ebp+78h]
mov	ecx, [edx+8]
lea	edi, [esi+40h]
mov	eax, 1
add	[ecx+8], eax
mov	[esi+54h], ebx
mov	[esi+58h], ebx
mov	[esi+5Ch], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ecx
add	[ecx+8], eax
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_67CD18
call	sub_650DF0

loc_67CD18:
mov	ecx, [esp+10h+arg_10]
xor	eax, eax
mov	[esi+68h], ax
mov	eax, [esp+10h+arg_14]
mov	[esi+6Ah], al
mov	[esi+6Bh], bl
cmp	ecx, ebx
jz	short loc_67CD3C
push	ecx
mov	ecx, edi
call	sub_67C660
mov	eax, [esp+10h+arg_14]

loc_67CD3C:
cmp	eax, 3
jz	short loc_67CD98
cmp	eax, 4
jz	short loc_67CD98
mov	ecx, [ebp+74h]
mov	eax, [ecx+94h]
mov	[esp+10h+arg_14], ecx
cmp	eax, ebx
jnz	short loc_67CD5C
call	sub_658B70

loc_67CD5C:
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_67CD65
inc	dword ptr [ebp+0]

loc_67CD65:
mov	edi, [esi+38h]
cmp	edi, ebx
jz	short loc_67CD87
dec	dword ptr [edi]
cmp	[edi], ebx
jg	short loc_67CD87
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_67CD87:
mov	ecx, [esp+10h+arg_14]
mov	[esi+38h], ebp
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
mov	[esi+34h], eax

loc_67CD98:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	18h
sub_67CCA0 endp

align 10h



sub_67CDB0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_67CE50
sub_67CDB0 endp

align 10h



sub_67CDC0 proc	near
mov	eax, [ecx+58h]
retn
sub_67CDC0 endp

align 10h



sub_67CDD0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+64h]
add	dword ptr [ecx+8], 0FFFFFFFFh
lea	esi, [edi+54h]
jnz	short loc_67CDE5
call	sub_650DF0

loc_67CDE5:
mov	ecx, esi
call	sub_67BF70
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+40h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [edi+3Ch]
test	ecx, ecx
jz	short loc_67CE09
call	sub_64A400

loc_67CE09:
mov	esi, [edi+38h]
test	esi, esi
jz	short loc_67CE2C
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_67CE2C
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_67CE2C:
mov	dword ptr [edi], offset	off_14366A0
mov	dword ptr [edi+10h], offset off_1436778
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_664A30
sub_67CDD0 endp

align 10h



sub_67CE50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_67CDD0
test	[esp+4+arg_0], 1
jz	short loc_67CE6D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_67CE6D:
mov	eax, esi
pop	esi
retn	4
sub_67CE50 endp

align 10h



sub_67CE80 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+64h]
add	dword ptr [ecx+8], 0FFFFFFFFh
push	edi
lea	edi, [esi+54h]
jnz	short loc_67CE95
call	sub_650DF0

loc_67CE95:
mov	ecx, edi
call	sub_67BF70
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+40h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_67CEB9
call	sub_64A400

loc_67CEB9:
mov	dword ptr [esi+3Ch], 0
mov	edi, [esi+38h]
test	edi, edi
jz	short loc_67CEE3
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_67CEE3
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_67CEE3:
pop	edi
mov	dword ptr [esi+38h], 0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_67CE80 endp

align 10h



sub_67CF00 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	byte ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	byte ptr -0B0h
var_A0=	byte ptr -0A0h
var_90=	byte ptr -90h
var_80=	byte ptr -80h
var_70=	byte ptr -70h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h

sub	esp, 0D4h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebx, [esi+4]
push	edi
mov	edi, [esi]
test	edi, edi
jz	short loc_67CF21
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_67CF21:
add	dword ptr [ebx+80h], 4
mov	eax, [ebx+80h]
sub	ebx, 0FFFFFF80h
cmp	eax, [ebx+8]
jb	short loc_67CF3D
mov	ecx, ebx
call	sub_67C100

loc_67CF3D:
mov	ebx, [ebx]
test	ebx, ebx
jz	short loc_67CF56
test	edi, edi
jz	short loc_67CF54
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx

loc_67CF54:
mov	[ebx], edi

loc_67CF56:
test	edi, edi
jz	short loc_67CF61
mov	ecx, edi
call	sub_64B3B0

loc_67CF61:
mov	ecx, [esi+4]
mov	edx, [esi+8]
mov	ebp, [edx+8]
mov	eax, [ecx+78h]
mov	edx, [eax+294h]
mov	eax, [ecx+0CCh]
mov	[esp+0E4h+var_C8], edx
mov	edx, [esi]
mov	[esi+28h], eax
mov	al, [edx+6Ah]
mov	[esp+0E4h+var_D4], ebp
cmp	al, 2
jz	short loc_67CFBC
cmp	al, 1
jz	short loc_67CFBC
mov	eax, [ecx+0CCh]
lea	edi, [ecx+0C8h]
inc	eax
push	eax
push	edi
mov	ecx, edi
call	sub_66E650
mov	ecx, [edi+4]
mov	edx, [edi]
lea	eax, [edx+ecx*4-4]
test	eax, eax
jz	short loc_67D006
mov	dword ptr [eax], 0
jmp	short loc_67D006

loc_67CFBC:
call	sub_670200
mov	edi, eax
test	edi, edi
jz	short loc_67CFD3
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_67CFD3:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_67CFDF
call	sub_64B3B0

loc_67CFDF:
mov	[esi+24h], edi
mov	ebx, [esi+0Ch]
add	edi, 14h
test	ebx, ebx
jz	short loc_67CFF9
mov	ecx, [ebx+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebx+8], ecx

loc_67CFF9:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_67D004
call	sub_64B3B0

loc_67D004:
mov	[edi], ebx

loc_67D006:
mov	ebx, ebp
mov	[esp+0E4h+var_B4], ebx
test	ebp, ebp
jz	short loc_67D06D
mov	ecx, ebp
call	sub_661C10
mov	edi, eax
test	edi, edi
jz	short loc_67D020
inc	dword ptr [edi+4]

loc_67D020:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_67D02C
call	sub_64A400

loc_67D02C:
mov	ecx, ebp
mov	[esi+1Ch], edi
call	sub_661C30
mov	edi, eax
test	edi, edi
jz	short loc_67D049
mov	edx, [edi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[edi+8], edx

loc_67D049:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_67D055
call	sub_64B3B0

loc_67D055:
mov	[esi+20h], edi
mov	eax, [ebp+0]
mov	edx, [eax+3Ch]
mov	ecx, ebp
call	edx
test	al, al
jz	short loc_67D06D
mov	ebp, [ebp+2Ch]
mov	[esp+0E4h+var_D4], ebp

loc_67D06D:
mov	eax, [esi]
cmp	byte ptr [eax+6Ah], 2
jz	loc_67D29E
mov	eax, [esi+4]
movzx	edi, byte ptr [eax+7Ch]
test	ebp, ebp
jz	short loc_67D0BE
push	ebp
lea	ecx, [esp+0E8h+var_60]
mov	[esp+0E8h+var_60], 0
call	sub_652EF0
mov	ecx, [esi+4]
mov	eax, [ecx+78h]
lea	edx, [esp+0E4h+var_60]
push	edx
add	eax, 0FCh
push	eax
call	sub_6712A0
lea	ecx, [esp+0E4h+var_60]
call	sub_652830

loc_67D0BE:
cmp	edi, 6
jl	short loc_67D0CD
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_67D0CD
mov	[eax+18h], ebx

loc_67D0CD:
cmp	dword ptr [esi+24h], 0
jz	loc_67D214
mov	ecx, [esi+8]
mov	eax, [ecx+18h]
test	eax, eax
jz	loc_67D214
cmp	edi, 5
jl	loc_67D214
cmp	[esi+4], eax
jz	short loc_67D10C
mov	edi, [eax+74h]
test	edi, edi
jz	short loc_67D0FD
inc	dword ptr [edi+4]

loc_67D0FD:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_67D109
call	sub_64A400

loc_67D109:
mov	[esi+18h], edi

loc_67D10C:
mov	edx, [esi+8]
mov	ecx, [edx+18h]
mov	eax, [esi+24h]
mov	[eax+1Ch], ecx
mov	edx, [esi+8]
mov	ecx, [edx+1Ch]
mov	eax, [esi+24h]
mov	[eax+20h], ecx
mov	edx, [esi+8]
mov	ecx, [edx+20h]
mov	eax, [esi+24h]
mov	[eax+24h], ecx
mov	ecx, [esi+4]
mov	eax, [ecx+80h]
sub	eax, [ecx+84h]
mov	edx, [ecx+94h]
sub	ecx, 0FFFFFF80h
mov	ecx, [ecx+10h]
dec	edx
shl	edx, 5
sar	eax, 2
add	eax, edx
mov	edx, eax
shr	edx, 5
mov	edx, [ecx+edx*4]
and	eax, 1Fh
mov	eax, [edx+eax*4]
push	eax
lea	ecx, [esp+0E8h+var_50]
call	sub_652700
lea	ecx, [esp+0E4h+var_50]
push	ecx
mov	ecx, [esi+24h]
add	ecx, 28h
call	sub_652520
lea	ecx, [esp+0E4h+var_50]
call	sub_652830
mov	eax, [esi+4]
mov	edx, [eax+80h]
sub	edx, [eax+84h]
mov	ecx, [eax+94h]
dec	ecx
sar	edx, 2
shl	ecx, 5
add	edx, ecx
cmp	edx, 1
jnb	short loc_67D1B8
mov	[esp+0E4h+var_B0], 1
jmp	short loc_67D1FB

loc_67D1B8:
mov	ecx, [eax+80h]
sub	ecx, [eax+84h]
mov	edi, [eax+94h]
dec	edi
sar	ecx, 2
shl	edi, 5
add	ecx, edi
xor	edx, edx
cmp	ecx, 1
jb	short loc_67D1EF
mov	eax, [eax+90h]
dec	ecx
mov	edx, ecx
shr	edx, 5
mov	edx, [eax+edx*4]
and	ecx, 1Fh
lea	edx, [edx+ecx*4]

loc_67D1EF:
mov	eax, [edx]
push	eax
lea	ecx, [esp+0E8h+var_B0]
call	sub_652700

loc_67D1FB:
lea	ecx, [esp+0E4h+var_B0]
push	ecx
mov	ecx, [esi+24h]
add	ecx, 38h
call	sub_652520
lea	ecx, [esp+0E4h+var_B0]
call	sub_652830

loc_67D214:
mov	edx, [esi]
mov	ecx, [esi+8]
mov	eax, [edx+58h]
mov	ebp, [ecx+1Ch]
cmp	ebp, eax
jl	short loc_67D225
mov	ebp, eax

loc_67D225:
xor	edi, edi
test	ebp, ebp
jle	short loc_67D253
jmp	short loc_67D230
align 10h

loc_67D230:
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, [esi+8]
push	edi
lea	ebx, [eax+edi*8]
call	sub_651EC0
mov	ecx, [esi+4]
push	eax
add	ebx, 4
push	ebx
call	sub_6712A0
inc	edi
cmp	edi, ebp
jl	short loc_67D230

loc_67D253:
mov	ecx, [esi]
mov	ebx, [ecx+58h]
cmp	edi, ebx
jge	loc_67D7EF

loc_67D260:
mov	eax, [esi]
mov	[esp+0E4h+var_20], 0
mov	ecx, [eax+54h]
lea	edx, [esp+0E4h+var_20]
push	edx
lea	edx, [ecx+edi*8+4]
mov	ecx, [esi+4]
push	edx
call	sub_6712A0
lea	ecx, [esp+0E4h+var_20]
call	sub_652830
inc	edi
cmp	edi, ebx
jl	short loc_67D260
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0D4h
retn

loc_67D29E:
movzx	eax, byte ptr [eax+6Bh]
mov	ecx, [esi+4]
push	eax
call	sub_67C230
mov	ecx, [esi]
mov	eax, [ecx+58h]
mov	edx, [esi+8]
mov	ecx, [edx+1Ch]
cmp	ecx, eax
jge	short loc_67D2C2
mov	eax, ecx
mov	[esp+0E4h+var_CC], ecx
jmp	short loc_67D2C6

loc_67D2C2:
mov	[esp+0E4h+var_CC], eax

loc_67D2C6:
xor	edi, edi
test	eax, eax
jle	short loc_67D30B
lea	esp, [esp+0]

loc_67D2D0:
mov	eax, [esi]
mov	ecx, [eax+54h]
mov	ebx, [ecx+edi*8]
lea	ebp, [ecx+edi*8]
mov	ecx, [esi+8]
push	edi
call	sub_651EC0
mov	ecx, [esi+4]
push	eax
test	ebx, ebx
jnz	short loc_67D2F7
add	ebp, 4
push	ebp
call	sub_6712A0
jmp	short loc_67D304

loc_67D2F7:
push	ebx
call	sub_669840
mov	ecx, eax
call	sub_652520

loc_67D304:
inc	edi
cmp	edi, [esp+0E4h+var_CC]
jl	short loc_67D2D0

loc_67D30B:
mov	edx, [esi]
mov	ebx, [edx+58h]
cmp	edi, ebx
jge	short loc_67D34F

loc_67D314:
mov	eax, [esi]
mov	ecx, [eax+54h]
cmp	dword ptr [ecx+edi*8], 0
jnz	short loc_67D34A
mov	eax, ecx
lea	edx, [esp+0E4h+var_40]
lea	ecx, [eax+edi*8+4]
push	edx
push	ecx
mov	ecx, [esi+4]
mov	[esp+0ECh+var_40], 0
call	sub_6712A0
lea	ecx, [esp+0E4h+var_40]
call	sub_652830

loc_67D34A:
inc	edi
cmp	edi, ebx
jl	short loc_67D314

loc_67D34F:
mov	edx, [esi]
movzx	eax, word ptr [edx+68h]
mov	[esp+0E4h+var_CC], 0
test	al, 10h
jnz	short loc_67D369
test	al, 20h
jnz	loc_67D489

loc_67D369:
mov	eax, [esp+0E4h+var_B4]
mov	ebp, [eax+8]
test	ebp, ebp
jz	short loc_67D381
mov	ecx, [ebp+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebp+8], ecx

loc_67D381:
mov	ebx, ebp
test	ebp, ebp
jz	loc_67D489
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_67D408
mov	edx, [esi+4]
mov	ecx, [edx+78h]
mov	ecx, [ecx+280h]
push	eax
call	sub_651000
mov	[esp+0E4h+var_C4], eax
inc	dword ptr [eax+8]
mov	eax, [esi+4]
lea	edx, [esp+0E4h+var_C4]
add	eax, 78h
push	edx
push	eax
lea	ecx, [ebp+10h]
call	sub_661FB0
mov	edi, eax
test	edi, edi
jz	short loc_67D3D1
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_67D3D1:
mov	eax, [esp+0E4h+var_C4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67D3E7
call	sub_650DF0

loc_67D3E7:
test	edi, edi
jz	short loc_67D408
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx
mov	ecx, ebp
call	sub_64B3B0
mov	ecx, edi
mov	ebx, edi
call	sub_64B3B0

loc_67D408:
mov	eax, [esi+4]
mov	edx, [ebx+10h]
mov	edx, [edx+38h]
add	eax, 78h
lea	ecx, [ebx+10h]
push	eax
lea	eax, [esp+0E8h+var_C0]
push	eax
call	edx
mov	ecx, [esp+0E4h+var_C8]
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	edi, edi
push	edi
push	4Ch
call	edx
mov	ebp, [esp+0E4h+var_D4]
cmp	eax, edi
jz	short loc_67D44A
mov	ecx, [ebx+18h]
lea	edx, [esp+0E4h+var_C0]
push	edx
push	ebp
push	ecx
mov	ecx, eax
call	sub_66AE10
jmp	short loc_67D44C

loc_67D44A:
xor	eax, eax

loc_67D44C:
test	[esp+0E4h+var_B8], 2
mov	[esp+0E4h+var_CC], eax
jnz	short loc_67D464
mov	ecx, [esp+0E4h+var_C0]
cmp	ecx, edi
jz	short loc_67D464
call	sub_64B3B0

loc_67D464:
test	[esp+0E4h+var_B8], 1
mov	[esp+0E4h+var_C0], edi
jnz	short loc_67D47C
mov	ecx, [esp+0E4h+var_BC]
cmp	ecx, edi
jz	short loc_67D47C
call	sub_64B3B0

loc_67D47C:
mov	ecx, ebx
mov	[esp+0E4h+var_BC], edi
call	sub_64B3B0
jmp	short loc_67D48D

loc_67D489:
mov	ebp, [esp+0E4h+var_D4]

loc_67D48D:
mov	eax, [esi]
mov	ebx, 1
mov	[esp+0E4h+var_D4], ebx
test	[eax+68h], bl
jz	short loc_67D4D0
mov	ecx, [esi+4]
test	ebp, ebp
jz	short loc_67D4B4
push	ebp
push	ebx
call	sub_669840
mov	ecx, eax
call	sub_652EF0
jmp	short loc_67D4C7

loc_67D4B4:
push	1
call	sub_669840
mov	edi, eax
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0

loc_67D4C7:
mov	ebx, 2
mov	[esp+0E4h+var_D4], ebx

loc_67D4D0:
mov	ecx, [esi]
test	byte ptr [ecx+68h], 2
jnz	short loc_67D50A
mov	[esp+0E4h+var_70], 0
test	ebp, ebp
jz	short loc_67D4EB
push	ebp
lea	ecx, [esp+0E8h+var_70]
call	sub_652EF0

loc_67D4EB:
mov	ecx, [esi+4]
mov	eax, [ecx+78h]
lea	edx, [esp+0E4h+var_70]
push	edx
add	eax, 0FCh
push	eax
call	sub_6712A0
lea	ecx, [esp+0E4h+var_70]
call	sub_652830

loc_67D50A:
mov	ecx, [esi]
movzx	eax, word ptr [ecx+68h]
xor	ebp, ebp
test	al, 4
jnz	short loc_67D51A
test	al, 8
jnz	short loc_67D57F

loc_67D51A:
mov	ecx, [esp+0E4h+var_C8]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_67D53C
mov	ecx, [esi+4]
push	ecx
mov	ecx, eax
call	sub_65EF40
mov	ebp, eax
jmp	short loc_67D53E

loc_67D53C:
xor	ebp, ebp

loc_67D53E:
mov	edx, [esi+8]
mov	eax, [edx+1Ch]
push	eax
mov	ecx, ebp
mov	[esp+0E8h+var_C8], ebp
call	sub_65E410
mov	ecx, [esi+8]
xor	edi, edi
cmp	[ecx+1Ch], edi
jle	short loc_67D57B
lea	ebx, [ebx+0]

loc_67D560:
mov	ecx, [esi+8]
push	edi
call	sub_651EC0
push	eax
push	edi
mov	ecx, ebp
call	sub_65DA40
mov	edx, [esi+8]
inc	edi
cmp	edi, [edx+1Ch]
jl	short loc_67D560

loc_67D57B:
mov	ebp, [esp+0E4h+var_C8]

loc_67D57F:
mov	eax, [esi]
test	byte ptr [eax+68h], 4
jz	short loc_67D59D
mov	ecx, [esi+4]
push	ebp
push	ebx
call	sub_669840
mov	ecx, eax
call	sub_652E40
inc	ebx
mov	[esp+0E4h+var_D4], ebx

loc_67D59D:
mov	ecx, [esi]
test	byte ptr [ecx+68h], 8
jnz	loc_67D6E9
mov	edx, [esi+4]
mov	edi, [edx+78h]
push	ebp
lea	ecx, [esp+0E8h+var_10]
call	sub_652700
mov	ecx, [esi+4]
push	eax
add	edi, 118h
push	edi
call	sub_6712A0
lea	ecx, [esp+0E4h+var_10]
call	sub_652830
mov	ecx, [esi+4]
sub	ecx, 0FFFFFF80h
mov	bl, 7
mov	byte ptr [esp+0E4h+var_D0+3], bl
mov	eax, [ecx]
sub	eax, [ecx+4]
mov	edx, [ecx+14h]
mov	ecx, [ecx+10h]
dec	edx
shl	edx, 5
sar	eax, 2
add	eax, edx
mov	edx, eax
shr	edx, 5
mov	edx, [ecx+edx*4]
and	eax, 1Fh
mov	eax, [edx+eax*4]
push	eax
lea	ecx, [esp+0E8h+var_30]
lea	edi, [ebp+10h]
call	sub_652700
mov	eax, [esi+4]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	ecx, [esp+0E4h+var_D0+3]
push	ecx
add	eax, 78h
lea	ecx, [esp+0E8h+var_30]
push	ecx
mov	ecx, [eax]
add	ecx, 11Ch
push	ecx
push	eax
mov	ecx, edi
call	edx
lea	ecx, [esp+0E4h+var_30]
call	sub_652830
mov	eax, [esi+4]
mov	byte ptr [esp+0E4h+var_D0+2], bl
mov	ecx, [eax+80h]
sub	ecx, [eax+84h]
mov	edx, [eax+94h]
dec	edx
sar	ecx, 2
shl	edx, 5
add	ecx, edx
cmp	ecx, 1
jnb	short loc_67D676
mov	[esp+0E4h+var_90], 1
jmp	short loc_67D6B9

loc_67D676:
mov	ecx, [eax+80h]
sub	ecx, [eax+84h]
mov	ebx, [eax+94h]
dec	ebx
sar	ecx, 2
shl	ebx, 5
add	ecx, ebx
xor	edx, edx
cmp	ecx, 1
jb	short loc_67D6AD
mov	eax, [eax+90h]
dec	ecx
mov	edx, ecx
shr	edx, 5
mov	edx, [eax+edx*4]
and	ecx, 1Fh
lea	edx, [edx+ecx*4]

loc_67D6AD:
mov	eax, [edx]
push	eax
lea	ecx, [esp+0E8h+var_90]
call	sub_652700

loc_67D6B9:
mov	eax, [esi+4]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	ecx, [esp+0E4h+var_D0+2]
push	ecx
add	eax, 78h
lea	ecx, [esp+0E8h+var_90]
push	ecx
mov	ecx, [eax]
add	ecx, 120h
push	ecx
push	eax
mov	ecx, edi
call	edx
lea	ecx, [esp+0E4h+var_90]
call	sub_652830
mov	ebx, [esp+0E4h+var_D4]

loc_67D6E9:
mov	eax, [esi]
test	byte ptr [eax+68h], 10h
mov	edi, [esp+0E4h+var_CC]
jz	short loc_67D707
mov	ecx, [esi+4]
push	edi
push	ebx
call	sub_669840
mov	ecx, eax
call	sub_652E40
inc	ebx

loc_67D707:
mov	ecx, [esi]
test	byte ptr [ecx+68h], 20h
jnz	short loc_67D73D
push	edi
lea	ecx, [esp+0E8h+var_80]
mov	[esp+0E8h+var_80], 0
call	sub_652E40
mov	ecx, [esi+4]
mov	eax, [ecx+78h]
lea	edx, [esp+0E4h+var_80]
push	edx
add	eax, 100h
push	eax
call	sub_6712A0
lea	ecx, [esp+0E4h+var_80]
call	sub_652830

loc_67D73D:
mov	ecx, [esi]
test	byte ptr [ecx+68h], 40h
jz	short loc_67D766
mov	edx, [esi+4]
mov	ecx, [edx+74h]
mov	eax, [ecx]
mov	edx, [eax+68h]
push	0
call	edx
mov	ecx, [esi+4]
push	eax
push	ebx
call	sub_669840
mov	ecx, eax
call	sub_6528F0
inc	ebx

loc_67D766:
mov	eax, [esi]
test	byte ptr [eax+68h], 80h
jz	short loc_67D7B0
mov	ecx, [esi+4]
push	0
push	0
push	0
mov	[esp+0F0h+var_A0], 0
mov	eax, [ecx+78h]
push	0
lea	edx, [esp+0F4h+var_A0]
push	edx
add	eax, 10Ch
push	eax
call	sub_6726F0
lea	ecx, [esp+0E4h+var_A0]
push	ecx
mov	ecx, [esi+4]
push	ebx
call	sub_669840
mov	ecx, eax
call	sub_652520
lea	ecx, [esp+0E4h+var_A0]
inc	ebx
call	sub_652830

loc_67D7B0:
mov	edx, [esi]
mov	eax, 100h
test	[edx+68h], ax
jz	short loc_67D7D9
mov	esi, [esi+4]
mov	ecx, [esi+78h]
mov	eax, [ecx+2ACh]
push	eax
push	ebx
mov	ecx, esi
call	sub_669840
mov	ecx, eax
call	sub_652E40

loc_67D7D9:
test	ebp, ebp
jz	short loc_67D7E4
mov	ecx, ebp
call	sub_64B3B0

loc_67D7E4:
test	edi, edi
jz	short loc_67D7EF
mov	ecx, edi
call	sub_64B3B0

loc_67D7EF:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0D4h
retn
sub_67CF00 endp

align 10h



sub_67D800 proc	near

var_10=	byte ptr -10h

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_67D82B
push	edi
lea	edi, [eax+10h]
test	edi, edi
jz	short loc_67D82A
mov	eax, [edi]
mov	edx, [eax+3Ch]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_67D82A
lea	ecx, [edi-10h]
call	sub_64B9E0

loc_67D82A:
pop	edi

loc_67D82B:
mov	eax, [esi]
push	ebx
mov	bl, 2
cmp	[eax+6Ah], bl
jnz	short loc_67D83A
test	[eax+68h], bl
jnz	short loc_67D85F

loc_67D83A:
mov	ecx, [esi+4]
mov	[esp+18h+var_10], 0
mov	edx, [ecx+78h]
lea	eax, [esp+18h+var_10]
push	eax
add	edx, 0FCh
push	edx
call	sub_671AE0
lea	ecx, [esp+18h+var_10]
call	sub_652830

loc_67D85F:
mov	eax, [esi]
cmp	[eax+6Ah], bl
jnz	short loc_67D86C
test	byte ptr [eax+68h], 20h
jnz	short loc_67D891

loc_67D86C:
mov	ecx, [esi+4]
mov	[esp+18h+var_10], 0
mov	edx, [ecx+78h]
lea	eax, [esp+18h+var_10]
push	eax
add	edx, 100h
push	edx
call	sub_671AE0
lea	ecx, [esp+18h+var_10]
call	sub_652830

loc_67D891:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_67D89D
call	nullsub_2

loc_67D89D:
mov	eax, [esi+28h]
mov	ecx, [esi+4]
push	eax
call	sub_66F980
mov	eax, [esi]
cmp	[eax+6Ah], bl
pop	ebx
jnz	short loc_67D8BE
movzx	ecx, byte ptr [eax+6Bh]
push	ecx
mov	ecx, [esi+4]
call	sub_67C270

loc_67D8BE:
mov	esi, [esi+4]
test	esi, esi
jz	short loc_67D8EE
mov	eax, [esi+80h]
mov	ecx, [eax]
sub	esi, 0FFFFFF80h
test	ecx, ecx
jz	short loc_67D8D9
call	sub_64B3B0

loc_67D8D9:
add	dword ptr [esi], 0FFFFFFFCh
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_67D8EE
mov	ecx, esi
pop	esi
add	esp, 10h
jmp	sub_66A690

loc_67D8EE:
pop	esi
add	esp, 10h
retn
sub_67D800 endp

align 10h



sub_67D900 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+38h+arg_0]
mov	esi, ecx
mov	ecx, [edi+8]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_67D93A
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	short loc_67D93A
mov	ecx, [edi+8]
call	sub_661C10
mov	al, [eax+76h]
shr	al, 4
test	al, 1
jnz	loc_67DA42

loc_67D93A:
mov	ecx, [esp+38h+arg_4]
mov	edx, [esp+38h+arg_8]
mov	eax, [esi]
mov	[esp+38h+var_20], ecx
lea	ecx, [esp+38h+var_18]
push	ecx
mov	[esp+3Ch+var_1C], edx
mov	edx, [eax+24h]
push	edi
mov	ecx, esi
mov	[esp+40h+var_2C], esi
mov	[esp+40h+var_24], edi
mov	[esp+40h+var_18], ebx
mov	[esp+40h+var_14], ebx
mov	[esp+40h+var_10], ebx
mov	[esp+40h+var_C], ebx
mov	[esp+40h+var_8], ebx
call	edx
mov	[esp+38h+var_28], eax
mov	ecx, [eax+74h]
mov	dl, [ecx+76h]
shr	dl, 4
test	dl, 1
jz	short loc_67D98E
mov	eax, [edi+18h]
mov	[esp+38h+var_28], eax

loc_67D98E:
movzx	ecx, word ptr [eax+0C4h]
push	ebp
lea	ebp, [ecx+1]
mov	edx, 0FFh
mov	[eax+0C4h], bp
pop	ebp
cmp	cx, dx
jb	short loc_67D9BD
mov	eax, [esp+38h+var_28]
mov	ecx, 0FFFFh
add	[eax+0C4h], cx
jmp	short loc_67DA01

loc_67D9BD:
lea	ecx, [esp+38h+var_2C]
call	sub_67CF00
movzx	edx, byte ptr [esi+6Ah]
mov	ecx, [edi+4]
push	edx
mov	edx, [esi+50h]
lea	eax, [esi+40h]
push	eax
mov	eax, [esi+4Ch]
push	ecx
mov	ecx, [esp+44h+var_28]
push	edx
push	eax
push	ecx
mov	ecx, [esi+3Ch]
call	sub_673290
lea	ecx, [esp+38h+var_2C]
call	sub_67D800
mov	eax, [esp+38h+var_28]
mov	edx, 0FFFFh
add	[eax+0C4h], dx

loc_67DA01:
mov	ecx, [esp+38h+var_8]
cmp	ecx, ebx
jz	short loc_67DA0E
call	sub_64B3B0

loc_67DA0E:
mov	ecx, [esp+38h+var_C]
cmp	ecx, ebx
jz	short loc_67DA1B
call	sub_64B3B0

loc_67DA1B:
mov	ecx, [esp+38h+var_10]
cmp	ecx, ebx
jz	short loc_67DA28
call	sub_64A400

loc_67DA28:
mov	ecx, [esp+38h+var_14]
cmp	ecx, ebx
jz	short loc_67DA35
call	sub_64A400

loc_67DA35:
mov	ecx, [esp+38h+var_18]
cmp	ecx, ebx
jz	short loc_67DA42
call	sub_64A400

loc_67DA42:
pop	edi
pop	esi
pop	ebx
add	esp, 2Ch
retn	0Ch
sub_67D900 endp

align 10h



sub_67DA50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
call	??0DNameNode@@IAE@XZ_2 ; DNameNode::DNameNode(void)
mov	eax, esi
pop	esi
retn	4
sub_67DA50 endp

align 10h



sub_67DA70 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax]

loc_67DA78:
mov	cl, [eax]
cmp	cl, [edx]
jnz	short loc_67DAA2
test	cl, cl
jz	short loc_67DA94
mov	cl, [eax+1]
cmp	cl, [edx+1]
jnz	short loc_67DAA2
add	eax, 2
add	edx, 2
test	cl, cl
jnz	short loc_67DA78

loc_67DA94:
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setz	cl
mov	al, cl
retn	4

loc_67DAA2:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
xor	ecx, ecx
test	eax, eax
setz	cl
mov	al, cl
retn	4
sub_67DA70 endp

align 10h



sub_67DAC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
cmp	eax, 55h
jnb	short loc_67DAE0
mov	ecx, off_167DB78[eax*4]
mov	eax, [esp+arg_4]
xor	edx, edx
test	ecx, ecx
setnz	dl
mov	[eax], ecx
mov	al, dl
retn

loc_67DAE0:
lea	edx, [eax-3E8h]
cmp	edx, 9
ja	short loc_67DB02
mov	ecx, ds:dword_167CD2C[eax*4]
mov	eax, [esp+arg_4]
xor	edx, edx
test	ecx, ecx
setnz	dl
mov	[eax], ecx
mov	al, dl
retn

loc_67DB02:
mov	eax, [esp+arg_4]
xor	edx, edx
mov	dword ptr [eax], 0
cmp	[eax], edx
setnz	dl
mov	al, dl
retn
sub_67DAC0 endp

align 10h



sub_67DB20 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_67DB34
or	dword ptr [ecx+0A0h], 800h
retn	4

loc_67DB34:
and	dword ptr [ecx+0A0h], 0FFFFF7FFh
retn	4
sub_67DB20 endp

align 10h



sub_67DB50 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
movzx	eax, byte ptr [ecx+1E0h]
jz	short loc_67DB69
or	al, 20h
mov	[ecx+1E0h], al
retn	4

loc_67DB69:
and	al, 0DFh
mov	[ecx+1E0h], al
retn	4
sub_67DB50 endp

align 10h



sub_67DB80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
xor	eax, eax
cmp	edx, [ecx+0Ch]
setl	al
retn
sub_67DB80 endp

align 10h



sub_67DBA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	dword ptr [ecx+1C0h], 0
jz	short locret_67DBCC
mov	eax, [ecx+1C0h]
mov	edx, [esp+arg_0]
mov	[eax+14h], edx
mov	eax, [ecx+1C0h]
xor	edx, edx
cmp	[eax+18h], dl
setnz	dl
dec	edx
and	edx, [esp+arg_4]
mov	[eax+10h], edx

locret_67DBCC:
retn	8
sub_67DBA0 endp

align 10h



sub_67DBD0 proc	near
mov	ecx, [ecx+0BCh]
jmp	sub_68E580
sub_67DBD0 endp

align 10h



sub_67DBE0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+20h]
push	ebx
test	ecx, ecx
jz	short loc_67DC29
mov	ebx, [esp+4+arg_0]
test	bl, bl
jnz	short loc_67DC02
mov	dl, [eax+1E0h]
test	dl, 10h
jz	short loc_67DC02
test	dl, 20h
jnz	short loc_67DC29

loc_67DC02:
mov	dl, [eax+76h]
shr	dl, 4
test	dl, 1
jz	short loc_67DC21
pop	ebx
mov	[esp+arg_0], 0
mov	ecx, [eax+0BCh]
jmp	sub_68E580

loc_67DC21:
mov	eax, [ecx]
mov	edx, [eax+68h]
push	ebx
call	edx

loc_67DC29:
pop	ebx
retn	4
sub_67DBE0 endp

align 10h



sub_67DC30 proc	near
push	esi
mov	esi, ecx
test	esi, esi
jz	short loc_67DC53

loc_67DC37:
lea	ecx, [esi+78h]
call	sub_661C50
test	eax, eax
jz	short loc_67DC4C
cmp	dword ptr [eax+1C0h], 0
jnz	short loc_67DC57

loc_67DC4C:
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_67DC37

loc_67DC53:
xor	eax, eax
pop	esi
retn

loc_67DC57:
mov	eax, [eax+1C0h]
mov	eax, [eax+14h]
pop	esi
retn
sub_67DC30 endp

align 10h



sub_67DC70 proc	near
mov	eax, [ecx+1C8h]
test	eax, eax
jz	short loc_67DC7D
mov	eax, [eax]
retn

loc_67DC7D:
mov	eax, 64h
retn
sub_67DC70 endp

align 10h



sub_67DC90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	eax, [ecx+1C8h]
sub	esp, 8
test	eax, eax
jz	short loc_67DCA4
mov	eax, [eax]
mov	[esp+8+var_8], eax
jmp	short loc_67DCAB

loc_67DCA4:
mov	[esp+8+var_8], 64h

loc_67DCAB:
fild	[esp+8+var_8]
push	edi
mov	edi, [ecx+20h]
fdiv	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_8]
test	edi, edi
jz	short loc_67DD0E
push	esi

loc_67DCC1:
mov	edx, [edi+78h]
mov	eax, [edx+8]
lea	esi, [edi+78h]
mov	ecx, esi
call	eax
cmp	eax, 2
jnz	short loc_67DD06
mov	ecx, esi
call	sub_661C50
mov	eax, [eax+1C8h]
test	eax, eax
jz	short loc_67DCEC
mov	ecx, [eax]
mov	[esp+10h+var_4], ecx
jmp	short loc_67DCF4

loc_67DCEC:
mov	[esp+10h+var_4], 64h

loc_67DCF4:
fild	[esp+10h+var_4]
fdiv	ds:dbl_15FCBF8
fmul	[esp+10h+var_8]
fstp	[esp+10h+var_8]

loc_67DD06:
mov	edi, [edi+20h]
test	edi, edi
jnz	short loc_67DCC1
pop	esi

loc_67DD0E:
fld	[esp+0Ch+var_8]
pop	edi
add	esp, 8
retn
sub_67DC90 endp

align 10h



sub_67DD20 proc	near
mov	eax, [ecx+1C8h]
test	eax, eax
jz	short loc_67DD2E
mov	eax, [eax+8]
retn

loc_67DD2E:
xor	eax, eax
retn
sub_67DD20 endp

align 10h



sub_67DD40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	eax, [ecx+1C8h]
sub	esp, 8
test	eax, eax
jz	short loc_67DD55
mov	eax, [eax+8]
mov	[esp+8+var_8], eax
jmp	short loc_67DD5C

loc_67DD55:
mov	[esp+8+var_8], 0

loc_67DD5C:
fild	[esp+8+var_8]
push	edi
mov	edi, [ecx+20h]
fdiv	ds:dbl_15FCBF8
fstp	[esp+0Ch+var_8]
test	edi, edi
jz	short loc_67DDC0
push	esi

loc_67DD72:
mov	edx, [edi+78h]
mov	eax, [edx+8]
lea	esi, [edi+78h]
mov	ecx, esi
call	eax
cmp	eax, 2
jnz	short loc_67DDB8
mov	ecx, esi
call	sub_661C50
mov	eax, [eax+1C8h]
test	eax, eax
jz	short loc_67DD9E
mov	ecx, [eax+8]
mov	[esp+10h+var_4], ecx
jmp	short loc_67DDA6

loc_67DD9E:
mov	[esp+10h+var_4], 0

loc_67DDA6:
fild	[esp+10h+var_4]
fdiv	ds:dbl_15FCBF8
fmul	[esp+10h+var_8]
fstp	[esp+10h+var_8]

loc_67DDB8:
mov	edi, [edi+20h]
test	edi, edi
jnz	short loc_67DD72
pop	esi

loc_67DDC0:
fld	[esp+0Ch+var_8]
pop	edi
add	esp, 8
retn
sub_67DD40 endp

align 10h



sub_67DDD0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	eax, ecx
mov	ecx, [eax+8]
mov	eax, [eax+4]
lea	esi, [esp+8+var_1]
push	esi
mov	esi, [esp+0Ch+arg_4]
push	esi
mov	esi, [esp+10h+arg_0]
add	ecx, 78h
mov	[esp+10h+var_1], 0
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	esi
push	eax
call	edx
pop	esi
pop	ecx
retn	0Ch
sub_67DDD0 endp

align 10h



sub_67DE00 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	esi
push	edi
mov	esi, ecx
call	sub_654DD0
mov	edi, [esp+10h+arg_0]
mov	ecx, [edi]
mov	edx, [ecx+0Ch]
cmp	eax, 6
setnbe	al
shr	edx, 1Fh
mov	[esp+10h+var_4], al
test	dl, 1
jz	loc_67DEDA
test	al, al
jz	short loc_67DE81
mov	eax, [esi+160h]
cmp	[eax+0CCh], ecx
jz	short loc_67DE78
cmp	[eax+0FCh], ecx
jz	short loc_67DE78
cmp	[eax+0D0h], ecx
jz	short loc_67DE6E
cmp	[eax+10Ch], ecx
jz	short loc_67DE6E
cmp	[eax+108h], ecx
jnz	short loc_67DEDA
mov	eax, [esi]
mov	edx, [eax+68h]
push	0
mov	ecx, esi
call	edx
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_67DE6E:
mov	eax, [esi+20h]
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_67DE78:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_67DE81:
cmp	dword ptr [ecx+4], 0
jnz	short loc_67DE8C
call	sub_651580

loc_67DE8C:
mov	eax, [esi+160h]
mov	ecx, [edi]
cmp	[eax+0CCh], ecx
jz	short loc_67DE78
mov	edx, [ecx+4]
mov	ebx, [eax+0FCh]
cmp	[ebx+4], edx
jz	short loc_67DE78
cmp	[eax+0D0h], ecx
jz	short loc_67DE6E
mov	ebx, [eax+10Ch]
cmp	[ebx+4], edx
jz	short loc_67DE6E
mov	eax, [eax+108h]
cmp	[eax+4], edx
jnz	short loc_67DEDA
mov	edx, [esi]
mov	eax, [edx+68h]
push	0
mov	ecx, esi
call	eax
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_67DEDA:
mov	edx, [ecx]
cmp	byte ptr [edx],	5Fh
jnz	short loc_67DF26
cmp	byte ptr [esp+10h+arg_4], 0
jz	short loc_67DF26
mov	eax, dword ptr [esp+10h+var_4]
mov	ecx, edx
push	eax		; char
lea	edx, [esp+14h+arg_4]
push	edx		; int
push	ecx		; char *
mov	[esp+1Ch+arg_4], 0
call	sub_68D7B0
add	esp, 0Ch
cmp	eax, 0FFFFFFFFh
jz	short loc_67DF26
mov	ecx, [esp+10h+arg_4]
cmp	byte ptr [ecx],	0
jnz	short loc_67DF26
mov	ecx, [esi+0BCh]
push	eax
call	sub_68E580
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_67DF26:
push	edi
lea	edx, [esi+160h]
push	edx
lea	ecx, [esi+0C4h]
call	sub_65C5D0
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8
sub_67DE00 endp




sub_67DF40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 4
test	al, 1
jnz	short loc_67DF56

loc_67DF50:
xor	al, al
pop	esi
retn	4

loc_67DF56:
cmp	dword ptr [esi+1BCh], 0
jge	short loc_67DF50
mov	edx, [esi]
mov	eax, [edx+80h]
push	edi
mov	edi, [esp+8+arg_0]
push	edi
call	eax
test	al, al
jnz	short loc_67DF8A
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_67DF8A
mov	edx, [ecx]
mov	eax, [edx+108h]
push	edi
call	eax
pop	edi
pop	esi
retn	4

loc_67DF8A:
pop	edi
xor	al, al
pop	esi
retn	4
sub_67DF40 endp

align 10h



sub_67DFA0 proc	near
add	ecx, 0C4h
jmp	sub_65CF10
sub_67DFA0 endp

align 10h



sub_67DFB0 proc	near

arg_0= dword ptr  4

mov	al, [ecx+76h]
shr	al, 4
test	al, 1
jnz	short loc_67DFD0
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
mov	ecx, [esp+arg_0]
push	eax
call	sub_679440
mov	al, 1
retn	4

loc_67DFD0:
xor	al, al
retn	4
sub_67DFB0 endp

align 10h



sub_67DFE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 10h
xor	eax, eax
xor	edx, edx
mov	[esp+10h+var_C], eax
mov	[esp+10h+var_6], al
mov	[esp+10h+var_4], al
mov	[esp+10h+var_3], al
mov	eax, [ecx]
mov	eax, [eax+80h]
mov	[esp+10h+var_8], dx
lea	edx, [esp+10h+var_10]
push	edx
mov	[esp+14h+var_10], 1000007h
mov	[esp+14h+var_5], 0FFh
call	eax
add	esp, 10h
retn
sub_67DFE0 endp

align 10h



sub_67E020 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 10h
xor	eax, eax
xor	edx, edx
mov	[esp+10h+var_C], eax
mov	[esp+10h+var_6], al
mov	[esp+10h+var_4], al
mov	[esp+10h+var_3], al
mov	eax, [ecx]
mov	eax, [eax+80h]
mov	[esp+10h+var_8], dx
lea	edx, [esp+10h+var_10]
push	edx
mov	[esp+14h+var_10], 1000002h
mov	[esp+14h+var_5], 0FFh
call	eax
add	esp, 10h
retn
sub_67E020 endp

align 10h



sub_67E060 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	esi, ecx
test	bl, 2
jz	short loc_67E07C
push	ebx
push	edi
lea	ecx, [esi+4Ch]
call	sub_65CB10

loc_67E07C:
lea	eax, [esi-78h]
neg	eax
sbb	eax, eax
and	eax, esi
push	eax
mov	eax, [esp+10h+arg_0]
push	ebx
push	edi
push	eax
mov	ecx, esi
call	sub_658510
pop	edi
pop	esi
pop	ebx
retn	10h
sub_67E060 endp

align 10h



sub_67E0A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
push	eax
push	edx
call	sub_659A80
test	al, al
setnz	al
retn	8
sub_67E0A0 endp

align 10h



sub_67E0C0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1D0h], 0
jz	short loc_67E0E2
mov	eax, [esi]
mov	edx, [eax+0B4h]
call	edx
test	al, al
jnz	short loc_67E0E2
mov	eax, [esi+1D0h]
pop	esi
retn

loc_67E0E2:
xor	eax, eax
pop	esi
retn
sub_67E0C0 endp

align 10h



sub_67E0F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+1D0h], 0
jz	short loc_67E11C
mov	eax, [esi]
mov	edx, [eax+0B4h]
call	edx
test	al, al
jnz	short loc_67E11C
cmp	dword ptr [esi+1D0h], 0
jz	short loc_67E11C
push	0
mov	ecx, esi
call	sub_67F760

loc_67E11C:
mov	eax, [esp+4+arg_0]
mov	[esi+1D0h], eax
test	eax, eax
jz	short loc_67E138
or	dword ptr [esi+0A0h], 8000h
pop	esi
retn	4

loc_67E138:
and	dword ptr [esi+0A0h], 0FFFF7FFFh
pop	esi
retn	4
sub_67E0F0 endp

align 10h



sub_67E150 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67E164
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
jmp	short loc_67E17A

loc_67E164:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67E18A
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67E18A
lea	ecx, [eax-78h]

loc_67E17A:
test	ecx, ecx
jz	short loc_67E18A
mov	edx, [ecx]
mov	eax, [edx+148h]
push	0
call	eax

loc_67E18A:
pop	esi
retn
sub_67E150 endp

align 10h



sub_67E190 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67E1A4
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
jmp	short loc_67E1BA

loc_67E1A4:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67E1CA
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67E1CA
lea	ecx, [eax-78h]

loc_67E1BA:
test	ecx, ecx
jz	short loc_67E1CA
mov	edx, [ecx]
mov	eax, [edx+148h]
push	1
call	eax

loc_67E1CA:
pop	esi
retn
sub_67E190 endp

align 10h



sub_67E1D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67E1E4
mov	eax, [esi+18h]
mov	esi, [eax+74h]
jmp	short loc_67E1FA

loc_67E1E4:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67E22A
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67E22A
lea	esi, [eax-78h]

loc_67E1FA:
test	esi, esi
jz	short loc_67E22A
mov	edx, [esi]
mov	eax, [edx+13Ch]
mov	ecx, esi
call	eax
test	eax, eax
jle	short loc_67E21C
mov	edx, [esi]
dec	eax
push	eax
mov	eax, [edx+144h]
mov	ecx, esi
call	eax

loc_67E21C:
mov	edx, [esi]
mov	eax, [edx+148h]
push	1
mov	ecx, esi
call	eax

loc_67E22A:
pop	esi
retn
sub_67E1D0 endp

align 10h



sub_67E230 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67E244
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
jmp	short loc_67E25A

loc_67E244:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67E27C
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67E27C
lea	ecx, [eax-78h]

loc_67E25A:
test	ecx, ecx
jz	short loc_67E27C
push	edi
call	sub_67DC30
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_67E275
mov	ecx, esi
call	sub_652060

loc_67E275:
mov	[esi+4], edi
mov	byte ptr [esi],	4
pop	edi

loc_67E27C:
pop	esi
retn
sub_67E230 endp

align 10h



sub_67E280 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67E294
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
jmp	short loc_67E2AA

loc_67E294:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67E2CC
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67E2CC
lea	ecx, [eax-78h]

loc_67E2AA:
test	ecx, ecx
jz	short loc_67E2CC
push	edi
call	sub_654DD0
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_67E2C5
mov	ecx, esi
call	sub_652060

loc_67E2C5:
mov	[esi+4], edi
mov	byte ptr [esi],	4
pop	edi

loc_67E2CC:
pop	esi
retn
sub_67E280 endp

align 10h



sub_67E2D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_67E2E8
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_67E306

loc_67E2E8:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_67E3FB
mov	edi, [esi+8]
test	edi, edi
jz	loc_67E3FB
add	edi, 0FFFFFF88h

loc_67E306:
test	edi, edi
jz	loc_67E3FB
mov	eax, [esi+1Ch]
test	eax, eax
jle	loc_67E3FB
push	ebx
push	ebp
xor	ebp, ebp
cmp	eax, 1
jle	loc_67E3AB
mov	ebx, [esi+18h]
push	1
mov	ecx, esi
call	sub_651EC0
push	ebp
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	edx, [esp+18h+arg_0]
push	edx
lea	ecx, [esp+1Ch+var_8]
call	sub_6518E0
mov	eax, [esp+18h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_67E365
call	sub_650DF0

loc_67E365:		; "get"
push	offset aGet_1
lea	ecx, [esp+1Ch+arg_0]
call	sub_67DA70
test	al, al
jz	short loc_67E37E
mov	ebp, 1
jmp	short loc_67E395

loc_67E37E:		; "post"
push	offset aPost_1
lea	ecx, [esp+1Ch+arg_0]
call	sub_67DA70
test	al, al
jz	short loc_67E395
mov	ebp, 2

loc_67E395:
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67E3AB
call	sub_650DF0

loc_67E3AB:
mov	ebx, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+18h+var_4]
mov	eax, [edx]
push	0
push	ebp
push	eax
mov	eax, [edi]
mov	edx, [eax+54h]
push	edi
mov	ecx, edi
call	edx
mov	ecx, eax
call	sub_699E40
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
pop	ebx
jnz	short loc_67E3FB
call	sub_650DF0

loc_67E3FB:
pop	edi
pop	esi
add	esp, 8
retn
sub_67E2D0 endp

align 10h



sub_67E410 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67E424
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
jmp	short loc_67E43A

loc_67E424:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67E456
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67E456
lea	ecx, [eax-78h]

loc_67E43A:
test	ecx, ecx
jz	short loc_67E456
mov	edx, [ecx]
mov	eax, [edx+54h]
push	0
push	0
push	offset byte_146D660
push	ecx
call	eax
mov	ecx, eax
call	sub_699E40

loc_67E456:
pop	esi
retn
sub_67E410 endp

align 10h



sub_67E460 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_67E478
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_67E496

loc_67E478:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_67E589
mov	edi, [esi+8]
test	edi, edi
jz	loc_67E589
add	edi, 0FFFFFF88h

loc_67E496:
test	edi, edi
jz	loc_67E589
mov	eax, [esi+1Ch]
test	eax, eax
jle	loc_67E589
push	ebx
push	ebp
xor	ebp, ebp
cmp	eax, 1
jle	loc_67E53B
mov	ebx, [esi+18h]
push	1
mov	ecx, esi
call	sub_651EC0
push	ebp
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	edx, [esp+18h+arg_0]
push	edx
lea	ecx, [esp+1Ch+var_8]
call	sub_6518E0
mov	eax, [esp+18h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_67E4F5
call	sub_650DF0

loc_67E4F5:		; "get"
push	offset aGet_1
lea	ecx, [esp+1Ch+arg_0]
call	sub_67DA70
test	al, al
jz	short loc_67E50E
mov	ebp, 1
jmp	short loc_67E525

loc_67E50E:		; "post"
push	offset aPost_1
lea	ecx, [esp+1Ch+arg_0]
call	sub_67DA70
test	al, al
jz	short loc_67E525
mov	ebp, 2

loc_67E525:
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67E53B
call	sub_650DF0

loc_67E53B:
mov	ebx, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+18h+var_4]
mov	eax, [edx]
push	ebp
push	eax
mov	eax, [edi]
mov	edx, [eax+54h]
push	edi
mov	ecx, edi
call	edx
mov	ecx, eax
call	sub_695E00
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
pop	ebx
jnz	short loc_67E589
call	sub_650DF0

loc_67E589:
pop	edi
pop	esi
add	esp, 8
retn
sub_67E460 endp

align 10h



sub_67E590 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_658AB0
mov	dword ptr [esi+0D0h], 0
pop	esi
retn	4
sub_67E590 endp

align 10h



sub_67E5B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_67E5C6
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_67E5E4

loc_67E5C6:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_67E66C
mov	edi, [esi+8]
test	edi, edi
jz	loc_67E66C
add	edi, 0FFFFFF88h

loc_67E5E4:
test	edi, edi
jz	loc_67E66C
cmp	dword ptr [esi+1Ch], 1
jl	short loc_67E65F
push	ebx
mov	ebx, [esi+18h]
push	0
mov	ecx, esi
mov	[esp+14h+var_4], 0FFFFFFFFh
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
mov	edx, [edi]
mov	edx, [edx+140h]
push	1
lea	ecx, [esp+14h+var_4]
push	ecx
push	eax
mov	ecx, edi
call	edx
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebx
jnz	short loc_67E66C
call	sub_650DF0
pop	edi
pop	esi
pop	ecx
retn

loc_67E65F:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0

loc_67E66C:
pop	edi
pop	esi
pop	ecx
retn
sub_67E5B0 endp




sub_67E670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
mov	eax, [eax]
mov	ecx, [ecx]
cmp	[eax+178h], ecx
jnz	short loc_67E68A
mov	eax, 1
retn

loc_67E68A:
cmp	[eax+17Ch], ecx
jnz	short loc_67E698
mov	eax, 2
retn

loc_67E698:
cmp	[eax+180h], ecx
jnz	short loc_67E6A6
mov	eax, 4
retn

loc_67E6A6:
cmp	[eax+184h], ecx
jnz	short loc_67E6B4
mov	eax, 8
retn

loc_67E6B4:
cmp	[eax+188h], ecx
jnz	short loc_67E6C2
mov	eax, 10h
retn

loc_67E6C2:
cmp	[eax+18Ch], ecx
jnz	short loc_67E6D0
mov	eax, 20h
retn

loc_67E6D0:
cmp	[eax+190h], ecx
jnz	short loc_67E6DE
mov	eax, 40h
retn

loc_67E6DE:
cmp	[eax+1F0h], ecx
jnz	short loc_67E6EC
mov	eax, 80h
retn

loc_67E6EC:
cmp	[eax+1F4h], ecx
jnz	short loc_67E6FA
mov	eax, 100h
retn

loc_67E6FA:
cmp	[eax+1F8h], ecx
jnz	short loc_67E708
mov	eax, 200h
retn

loc_67E708:
cmp	[eax+1FCh], ecx
jnz	short loc_67E716
mov	eax, 400h
retn

loc_67E716:
cmp	[eax+200h], ecx
jnz	short loc_67E724
mov	eax, 800h
retn

loc_67E724:
xor	eax, eax
retn
sub_67E670 endp

align 10h



sub_67E730 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	esi
mov	esi, [esp+18h+arg_4]
mov	eax, [esi]
cmp	dword ptr [eax+10h], 2
push	edi
mov	edi, ecx
jbe	short loc_67E78D
mov	eax, [eax]
cmp	byte ptr [eax],	6Fh
jnz	short loc_67E78D
cmp	byte ptr [eax+1], 6Eh
jnz	short loc_67E78D
mov	eax, [ecx]
mov	eax, [eax+2Ch]
lea	edx, [esp+1Ch+var_10]
push	edx
push	esi
push	ebx
mov	[esp+28h+var_10], 0
call	eax
test	al, al
jz	short loc_67E784
push	esi
push	ebx
call	sub_67E670
movzx	eax, ax
add	esp, 8
test	ax, ax
jz	short loc_67E784
not	eax
and	[edi+28h], ax

loc_67E784:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830

loc_67E78D:
push	esi
push	ebx
mov	ecx, edi
call	sub_6645F0
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	8
sub_67E730 endp

align 10h



sub_67E7A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	short loc_67E7DC
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 0Bh
jnz	short loc_67E7DC
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67E7CF
mov	ecx, [esi+4]
add	eax, 0FFFFFFF0h
push	eax
call	sub_652E40
pop	esi
retn

loc_67E7CF:
mov	ecx, [esi+4]
xor	eax, eax
push	eax
call	sub_652E40
pop	esi
retn

loc_67E7DC:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
retn
sub_67E7A0 endp

align 10h



sub_67E7F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_67E80F
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
lea	ecx, [eax-0Ch]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	10h
call	eax
retn

loc_67E80F:
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
xor	ecx, ecx
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	10h
call	eax
retn
sub_67E7F0 endp

align 10h



sub_67E830 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1436C18
jz	short loc_67E84E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_67E84E:
mov	eax, esi
pop	esi
retn	4
sub_67E830 endp

align 10h



sub_67E860 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_64E8E0
push	esi
mov	ecx, edi
call	sub_654B40
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_67E860 endp

align 10h



; int __stdcall	sub_67E880(int,	int, char *, int, int)
sub_67E880 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_C]
mov	[esi+8], ecx
lea	ebp, [esi+0Ch]
push	edi
mov	ecx, ebp
mov	dword ptr [esi], 1
mov	[esi+4], eax
call	sub_67AB70
fld1
mov	ebx, [esp+10h+arg_4]
fstp	dword ptr [esi+10h]
test	ebx, ebx
jz	short loc_67E8B8
mov	ecx, ebx
call	sub_64A420

loc_67E8B8:
mov	edi, [esp+10h+arg_10]
mov	[esi+1Ch], ebx
test	edi, edi
jz	short loc_67E8CA
mov	ecx, edi
call	sub_64A420

loc_67E8CA:
fldz
mov	[esi+20h], edi
mov	edi, [esp+10h+arg_8]
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+14h]
test	edi, edi
jz	short loc_67E8FA
mov	ecx, [ebx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
push	edi		; char *
push	eax		; char *
call	sub_679A10
test	eax, eax
jz	short loc_67E8FA
push	edi
mov	ecx, ebp
call	sub_67A2C0

loc_67E8FA:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	14h
sub_67E880 endp

align 10h



sub_67E910 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_67E920
push	esi
call	sub_6F4540

loc_67E920:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_67E92C
call	sub_666B00

loc_67E92C:
mov	dword ptr [esi+1Ch], 0
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_67E93F
call	sub_666B00

loc_67E93F:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_67E94B
call	sub_666B00

loc_67E94B:
mov	esi, [esi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_67E970
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_67E970:
pop	esi
retn
sub_67E910 endp

align 10h



sub_67E980 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_67E98F
inc	dword ptr [edi+4]

loc_67E98F:
mov	ecx, [esi+30h]
test	ecx, ecx
jz	short loc_67E99B
call	sub_64A400

loc_67E99B:
mov	[esi+30h], edi
pop	edi
pop	esi
retn	4
sub_67E980 endp

align 10h



sub_67E9B0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
xor	ebx, ebx
cmp	[edi+1DCh], ebx
jnz	short loc_67EA0E
mov	eax, [edi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	5Ch
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_67EA06
mov	ecx, [edi+160h]
mov	ecx, [ecx+280h]
push	ebx
call	sub_651000
fldz
mov	[esi], eax
inc	dword ptr [eax+8]
fstp	dword ptr [esi+4]
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
mov	[esi+58h], bl
jmp	short loc_67EA08

loc_67EA06:
xor	esi, esi

loc_67EA08:
mov	[edi+1DCh], esi

loc_67EA0E:
mov	eax, [esp+10h+arg_0]
mov	esi, [edi+1DCh]
inc	dword ptr [eax+8]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	ebp, eax
jnz	short loc_67EA2A
call	sub_650DF0

loc_67EA2A:
mov	[esi], ebp
mov	eax, [edi+1DCh]
or	byte ptr [eax+58h], 1
mov	edi, [edi+1DCh]
mov	edx, [edi]
mov	eax, [edx]
mov	[edi+48h], eax
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
pop	edi
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
pop	esi
pop	ebp
pop	ebx
jnz	short locret_67EA5C
call	sub_650DF0

locret_67EA5C:
retn	4
sub_67E9B0 endp

align 10h



; int __stdcall	sub_67EA60(float)
sub_67EA60 proc	near

arg_0= dword ptr  4

push	ebx
push	edi
mov	edi, ecx
xor	ebx, ebx
cmp	[edi+1DCh], ebx
jnz	short loc_67EABE
mov	eax, [edi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	ebx
push	5Ch
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_67EAB5
mov	ecx, [edi+160h]
mov	ecx, [ecx+280h]
push	ebx
call	sub_651000
fldz
mov	[esi], eax
inc	dword ptr [eax+8]
fstp	dword ptr [esi+4]
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
mov	[esi+58h], bl
jmp	short loc_67EAB7

loc_67EAB5:
xor	esi, esi

loc_67EAB7:
mov	[edi+1DCh], esi
pop	esi

loc_67EABE:
mov	edx, [edi+1DCh]
fld	[esp+8+arg_0]
fstp	dword ptr [edx+4]
mov	eax, [edi+1DCh]
or	byte ptr [eax+58h], 2
mov	edi, [edi+1DCh]
lea	eax, [edi+4]
mov	[edi+4Ch], eax
pop	edi
pop	ebx
retn	4
sub_67EA60 endp

align 10h



sub_67EAF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
xor	ebx, ebx
cmp	[edi+1DCh], ebx
jnz	short loc_67EB4D
mov	eax, [edi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	5Ch
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_67EB45
mov	ecx, [edi+160h]
mov	ecx, [ecx+280h]
push	ebx
call	sub_651000
fldz
mov	[esi], eax
inc	dword ptr [eax+8]
fstp	dword ptr [esi+4]
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
mov	[esi+58h], bl
jmp	short loc_67EB47

loc_67EB45:
xor	esi, esi

loc_67EB47:
mov	[edi+1DCh], esi

loc_67EB4D:
mov	eax, [edi+1DCh]
mov	esi, [esp+0Ch+arg_4]
or	byte ptr [eax+58h], 3
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [edi+1DCh]
lea	edx, ds:0[esi*4]
push	edx
push	eax
add	ecx, 8
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi+1DCh]
lea	edx, [eax+8]
add	esp, 0Ch
mov	[eax+50h], edx
mov	eax, [edi+1DCh]
pop	edi
mov	[eax+54h], esi
pop	esi
pop	ebx
retn	8
sub_67EAF0 endp

align 10h



sub_67EBA0 proc	near
mov	eax, [ecx+0BCh]
push	eax
call	sub_656470
retn
sub_67EBA0 endp

align 10h



sub_67EBB0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+0C4h]
call	sub_65CFB0
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
pop	esi
retn
sub_67EBB0 endp

align 10h



sub_67EBE0 proc	near
mov	eax, [ecx+90h]
retn
sub_67EBE0 endp

align 10h



sub_67EBF0 proc	near
mov	eax, [ecx+1C0h]
test	eax, eax
jz	short loc_67EBFE
mov	eax, [eax+1Ch]
retn

loc_67EBFE:
mov	ecx, [ecx+20h]
mov	eax, [ecx]
mov	edx, [eax+60h]
jmp	edx
sub_67EBF0 endp

align 10h



sub_67EC10 proc	near
mov	eax, [ecx+1C0h]
test	eax, eax
jz	short loc_67EC24
cmp	byte ptr [eax+18h], 0
jnz	short loc_67EC24
mov	eax, [eax+10h]
retn

loc_67EC24:
mov	ecx, [ecx+0B8h]
mov	eax, [ecx]
mov	edx, [eax+28h]
jmp	edx
sub_67EC10 endp

align 10h



sub_67EC40 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebx, ecx
mov	ebp, [ebx+0C8h]
push	edi
xor	edi, edi
test	ebp, ebp
jbe	short loc_67EC8D
push	esi

loc_67EC52:
mov	eax, [ebx+0C4h]
mov	esi, [eax+edi*4]
test	esi, esi
jz	short loc_67EC87
mov	edx, [esi]
mov	eax, [edx+58h]
mov	ecx, esi
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 8200h
jnz	short loc_67EC87
mov	ecx, [esp+10h+arg_0]
push	esi
call	sub_6F86C0

loc_67EC87:
inc	edi
cmp	edi, ebp
jb	short loc_67EC52
pop	esi

loc_67EC8D:
pop	edi
pop	ebp
pop	ebx
retn	4
sub_67EC40 endp

align 10h



sub_67ECA0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	dword ptr [esi], offset	off_1436C34
test	ecx, ecx
jz	short loc_67ECB7
mov	eax, [ecx]
mov	edx, [eax+0Ch]
call	edx

loc_67ECB7:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_67ECDE
dec	dword ptr [eax+1Ch]
mov	eax, [esi+10h]
cmp	dword ptr [eax+1Ch], 0
jg	short loc_67ECD6
mov	eax, [eax+0Ch]
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+18h]
call	eax

loc_67ECD6:
mov	ecx, [esi+10h]
call	sub_666B00

loc_67ECDE:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_67ECEA
call	sub_64A430

loc_67ECEA:
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_67ECA0 endp

align 10h



sub_67ED00 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+1C8h]
push	ebx
push	esi
push	edi
test	ecx, ecx
jz	short loc_67ED2F
mov	edx, [ecx+10h]
xor	eax, eax
test	edx, edx
jbe	short loc_67ED2F
mov	esi, [ecx+0Ch]
mov	edi, [esp+0Ch+arg_0]
mov	ecx, esi
nop

loc_67ED20:
mov	ebx, [ecx]
cmp	[ebx+0Ch], edi
jz	short loc_67ED37
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_67ED20

loc_67ED2F:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4

loc_67ED37:
mov	eax, [esi+eax*4]
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_67ED57
mov	edx, [ecx]
mov	eax, [edx+14h]
call	eax
test	al, al
jz	short loc_67ED57
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn	4

loc_67ED57:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_67ED00 endp

align 10h



sub_67ED60 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
cmp	dword ptr [ebp+1C8h], 0
jz	loc_67EE0F
push	esi
push	edi
call	sub_67DC90
fstp	[esp+10h+var_4]
mov	eax, [ebp+1C8h]
xor	edi, edi
cmp	[eax+10h], edi
jbe	short loc_67EDC7
lea	esp, [esp+0]

loc_67ED90:
mov	eax, [eax+0Ch]
mov	ecx, [eax+edi*4]
lea	eax, [eax+edi*4]
test	ecx, ecx
jz	short loc_67EDA0
inc	dword ptr [ecx+4]

loc_67EDA0:
mov	esi, [eax]
fld	[esp+10h+var_4]
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ecx
fstp	[esp+14h+var_14]
call	eax
mov	ecx, esi
call	sub_64A400
mov	eax, [ebp+1C8h]
inc	edi
cmp	edi, [eax+10h]
jb	short loc_67ED90

loc_67EDC7:
xor	edi, edi
cmp	[ebp+0C8h], edi
jbe	short loc_67EE0D

loc_67EDD1:
mov	ecx, [ebp+0C4h]
mov	eax, [ecx+edi*4]
mov	dl, [eax+76h]
shr	dl, 7
test	dl, 1
jz	short loc_67EE04
lea	esi, [eax+78h]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
cmp	eax, 2
jnz	short loc_67EE04
mov	ecx, esi
call	sub_661C50
mov	ecx, eax
call	sub_67ED60

loc_67EE04:
inc	edi
cmp	edi, [ebp+0C8h]
jb	short loc_67EDD1

loc_67EE0D:
pop	edi
pop	esi

loc_67EE0F:
pop	ebp
pop	ecx
retn
sub_67ED60 endp

align 10h



sub_67EE20 proc	near

var_14=	dword ptr -14h
var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
cmp	dword ptr [ebp+1C8h], 0
jz	loc_67EECF
push	esi
push	edi
call	sub_67DD40
fstp	[esp+10h+var_4]
mov	eax, [ebp+1C8h]
xor	edi, edi
cmp	[eax+10h], edi
jbe	short loc_67EE87
lea	esp, [esp+0]

loc_67EE50:
mov	eax, [eax+0Ch]
mov	ecx, [eax+edi*4]
lea	eax, [eax+edi*4]
test	ecx, ecx
jz	short loc_67EE60
inc	dword ptr [ecx+4]

loc_67EE60:
mov	esi, [eax]
fld	[esp+10h+var_4]
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ecx
fstp	[esp+14h+var_14]
call	eax
mov	ecx, esi
call	sub_64A400
mov	eax, [ebp+1C8h]
inc	edi
cmp	edi, [eax+10h]
jb	short loc_67EE50

loc_67EE87:
xor	edi, edi
cmp	[ebp+0C8h], edi
jbe	short loc_67EECD

loc_67EE91:
mov	ecx, [ebp+0C4h]
mov	eax, [ecx+edi*4]
mov	dl, [eax+76h]
shr	dl, 7
test	dl, 1
jz	short loc_67EEC4
lea	esi, [eax+78h]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
cmp	eax, 2
jnz	short loc_67EEC4
mov	ecx, esi
call	sub_661C50
mov	ecx, eax
call	sub_67EE20

loc_67EEC4:
inc	edi
cmp	edi, [ebp+0C8h]
jb	short loc_67EE91

loc_67EECD:
pop	edi
pop	esi

loc_67EECF:
pop	ebp
pop	ecx
retn
sub_67EE20 endp

align 10h



sub_67EEE0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+1C8h]
test	eax, eax
jz	short loc_67EF21
xor	esi, esi
cmp	[eax+10h], esi
jbe	short loc_67EF21
lea	ebx, [ebx+0]

loc_67EF00:
mov	eax, [eax+0Ch]
mov	eax, [eax+esi*4]
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_67EF15
mov	edx, [ecx]
mov	eax, [edx+10h]
push	ebx
call	eax

loc_67EF15:
mov	eax, [edi+1C8h]
inc	esi
cmp	esi, [eax+10h]
jb	short loc_67EF00

loc_67EF21:
xor	esi, esi
cmp	[edi+0C8h], esi
jbe	short loc_67EF58
jmp	short loc_67EF30
align 10h

loc_67EF30:
mov	ecx, [edi+0C4h]
mov	ecx, [ecx+esi*4]
mov	dl, [ecx+76h]
shr	dl, 7
test	dl, 1
jz	short loc_67EF4F
mov	eax, [ecx]
mov	edx, [eax+0FCh]
push	ebx
call	edx

loc_67EF4F:
inc	esi
cmp	esi, [edi+0C8h]
jb	short loc_67EF30

loc_67EF58:
pop	edi
pop	esi
pop	ebx
retn	4
sub_67EEE0 endp

align 10h



sub_67EF60 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+1C0h]
inc	dword ptr [esi+0D8h]
push	edi
test	eax, eax
jz	short loc_67EF7F
cmp	byte ptr [eax+18h], 0
jnz	short loc_67EF7F
mov	edi, [eax+10h]
jmp	short loc_67EF8E

loc_67EF7F:
mov	ecx, [esi+0B8h]
mov	eax, [ecx]
mov	edx, [eax+28h]
call	edx
mov	edi, eax

loc_67EF8E:
mov	ecx, [esi+0B8h]
mov	eax, [ecx]
mov	edx, [eax+28h]
call	edx
cmp	edi, eax
jnb	short loc_67EFC2
cmp	[esi+0D8h], edi
jb	short loc_67EFC2
test	edi, edi
jbe	short loc_67EFB7
lea	eax, [edi-1]
pop	edi
mov	[esi+0D8h], eax
pop	esi
retn

loc_67EFB7:
xor	eax, eax
pop	edi
mov	[esi+0D8h], eax
pop	esi
retn

loc_67EFC2:
cmp	[esi+0D8h], eax
jb	short loc_67F010
or	byte ptr [esi+1E0h], 2
mov	dword ptr [esi+0D8h], 0
cmp	eax, 1
jbe	short loc_67F002
push	0
lea	ecx, [esi+0C4h]
call	sub_65C7F0
mov	esi, [esi+0BCh]
add	esi, 2474h
or	dword ptr [esi], 400h
pop	edi
pop	esi
retn

loc_67F002:
mov	eax, [esi]
mov	edx, [eax+148h]
push	1
mov	ecx, esi
call	edx

loc_67F010:
pop	edi
pop	esi
retn
sub_67EF60 endp

align 10h



sub_67F020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebp
mov	ebp, ecx
test	ebp, ebp
jz	short loc_67F02D
inc	dword ptr [ebp+4]

loc_67F02D:
push	edi
mov	edi, [esp+10h+arg_4]
cmp	edi, [esp+10h+arg_8]
ja	short loc_67F080
push	ebx
mov	ebx, [esp+14h+arg_0]
push	esi
mov	edi, edi

loc_67F040:
mov	ecx, [ebp+0B8h]
mov	eax, [ecx]
mov	eax, [eax+2Ch]
push	edi
lea	edx, [esp+1Ch+var_8]
push	edx
call	eax
xor	esi, esi
cmp	[esp+18h+var_4], esi
jbe	short loc_67F077
jmp	short loc_67F060
align 10h

loc_67F060:
mov	ecx, [esp+18h+var_8]
mov	ecx, [ecx+esi*4]
mov	edx, [ecx]
mov	eax, [edx+18h]
push	edi
push	ebx
call	eax
inc	esi
cmp	esi, [esp+18h+var_4]
jb	short loc_67F060

loc_67F077:
inc	edi
cmp	edi, [esp+18h+arg_8]
jbe	short loc_67F040
pop	esi
pop	ebx

loc_67F080:
pop	edi
test	ebp, ebp
jz	short loc_67F08C
mov	ecx, ebp
call	sub_64A400

loc_67F08C:
pop	ebp
add	esp, 8
retn	0Ch
sub_67F020 endp

align 10h



sub_67F0A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+0DCh]
cmp	byte ptr [eax+ebp], 0
jnz	short loc_67F118
inc	dword ptr [esi+4]
mov	ecx, [esi+0B8h]
mov	[esp+10h+var_8], 0
mov	[esp+10h+var_4], 0
mov	edx, [ecx]
mov	edx, [edx+30h]
push	ebp
lea	eax, [esp+14h+var_8]
push	eax
call	edx
test	al, al
jz	short loc_67F111
mov	eax, [esp+10h+var_4]
test	eax, eax
jbe	short loc_67F111
push	edi
xor	edi, edi
test	eax, eax
jbe	short loc_67F106

loc_67F0F0:
mov	eax, [esp+14h+var_8]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
mov	eax, [edx+4]
push	esi
call	eax
inc	edi
cmp	edi, [esp+14h+var_4]
jb	short loc_67F0F0

loc_67F106:
mov	ecx, [esi+0DCh]
mov	byte ptr [ecx+ebp], 1
pop	edi

loc_67F111:
mov	ecx, esi
call	sub_64A400

loc_67F118:
pop	esi
pop	ebp
add	esp, 8
retn	4
sub_67F0A0 endp




sub_67F120 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [eax+1Ch]
mov	esi, [ecx+0Ch]
mov	ecx, [esi+20h]
mov	[esp+20h+var_10], esi
xor	ebx, ebx
xor	ebp, ebp
call	sub_6AB530
mov	[esp+20h+var_C], eax
cmp	eax, ebx
jbe	short loc_67F1B6
jmp	short loc_67F150
align 10h

loc_67F150:
mov	edx, [esi]
mov	edx, [edx+30h]
push	ebp
lea	eax, [esp+24h+var_8]
push	eax
mov	ecx, esi
mov	[esp+28h+var_8], ebx
mov	[esp+28h+var_4], ebx
call	edx
test	al, al
jz	short loc_67F1AF
cmp	[esp+20h+var_4], ebx
jbe	short loc_67F1AF

loc_67F171:
mov	eax, [esp+20h+var_8]
mov	esi, [eax+ebx*4]
mov	edx, [esi]
mov	eax, [edx+14h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_67F196
mov	ecx, [esp+20h+arg_0]
push	1
push	ecx
push	edi
mov	ecx, esi
call	sub_6ABA50
jmp	short loc_67F1A2

loc_67F196:
mov	edx, [esi]
mov	eax, [edx+8]
push	0
push	edi
mov	ecx, esi
call	eax

loc_67F1A2:
inc	ebx
cmp	ebx, [esp+20h+var_4]
jb	short loc_67F171
mov	esi, [esp+20h+var_10]
xor	ebx, ebx

loc_67F1AF:
inc	ebp
cmp	ebp, [esp+20h+var_C]
jb	short loc_67F150

loc_67F1B6:
mov	edi, [edi+0BCh]
add	edi, 2474h
or	dword ptr [edi], 400h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4
sub_67F120 endp

align 10h



sub_67F1E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+8+arg_4]
mov	eax, [edi+0BCh]
push	ecx
lea	ecx, [eax+2408h]
call	sub_696220
mov	esi, eax
test	esi, esi
jz	short loc_67F23A
mov	dword ptr [esi+4], 1
inc	dword ptr [edi+4]
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_67F216
call	sub_64A400

loc_67F216:
mov	[esi+8], edi
mov	edi, [esp+8+arg_0]
test	edi, edi
jz	short loc_67F224
inc	dword ptr [edi+4]

loc_67F224:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_67F230
call	sub_64A400

loc_67F230:
mov	[esi+0Ch], edi
mov	dword ptr [esi+10h], 0

loc_67F23A:
pop	edi
pop	esi
retn	8
sub_67F1E0 endp

align 10h



sub_67F240 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
test	esi, esi
jz	short loc_67F24B
inc	dword ptr [esi+4]

loc_67F24B:
mov	edi, [esp+8+arg_0]
cmp	dword ptr [edi], 8
jnz	short loc_67F268
mov	eax, [esi+0BCh]
cmp	dword ptr [eax+9C4h], 0
jbe	short loc_67F268
call	sub_656B50

loc_67F268:
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_67F28E
push	edi
lea	ecx, [esi+0C4h]
call	sub_65CA70
mov	edx, [esi]
mov	eax, [edx+80h]
push	edi
mov	ecx, esi
call	eax

loc_67F28E:
mov	ecx, esi
call	sub_64A400
pop	edi
pop	esi
retn	4
sub_67F240 endp

align 10h



sub_67F2A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	esi, esi
jz	short loc_67F2AA
inc	dword ptr [esi+4]

loc_67F2AA:
mov	eax, [esi]
mov	edx, [eax+10h]
call	edx
test	al, al
jnz	short loc_67F2C0
mov	ecx, esi
call	sub_64A400
pop	esi
retn	8

loc_67F2C0:
push	ebx
mov	ebx, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
push	edi
push	ebx
lea	ecx, [esi+0C4h]
call	sub_65CAC0
mov	eax, [esi]
mov	edx, [eax+94h]
push	edi
push	ebx
mov	ecx, esi
call	edx
mov	ecx, esi
call	sub_64A400
pop	edi
pop	ebx
pop	esi
retn	8
sub_67F2A0 endp

align 10h



sub_67F300 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esi+0C4h]
call	sub_65D3D0
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
pop	esi
retn	4
sub_67F300 endp

align 10h



sub_67F330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_8]
mov	eax, [ebp+0]
cmp	dword ptr [eax+10h], 0
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	ebx, ecx
jz	short loc_67F350
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebp
mov	ecx, edi
call	eax

loc_67F350:
push	esi
mov	esi, [edi+20h]
test	esi, esi
jz	short loc_67F37C

loc_67F358:
mov	edx, [esi]
mov	eax, [edx+4Ch]
mov	ecx, esi
call	eax
test	eax, eax
jnz	short loc_67F36E
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_67F358
jmp	short loc_67F37C

loc_67F36E:
mov	edx, [edi]
mov	eax, [edx+50h]
or	word ptr [edi+76h], 1
mov	ecx, edi
call	eax

loc_67F37C:
mov	ecx, [esp+10h+arg_0]
push	edi
push	ecx
lea	ecx, [ebx+0C4h]
call	sub_65D4D0
mov	edx, [ebp+0]
cmp	dword ptr [edx+10h], 0
pop	esi
jz	short loc_67F3B2
mov	al, [edi+76h]
shr	al, 7
test	al, 1
jz	short loc_67F3B2
mov	edx, [ebx]
mov	eax, [edx+54h]
push	edi
mov	ecx, ebx
call	eax
mov	ecx, eax
call	sub_69C6D0

loc_67F3B2:
mov	eax, [ebx+0BCh]
or	dword ptr [eax+2474h], 400h
pop	edi
add	eax, 2474h
pop	ebp
pop	ebx
retn	0Ch
sub_67F330 endp

align 10h



sub_67F3D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	esi
push	ecx
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
mov	eax, esp
mov	[eax], ecx
push	edx
lea	ecx, [esi+0C4h]
call	sub_65D150
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
pop	esi
retn	8
sub_67F3D0 endp

align 10h



sub_67F410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
mov	eax, [esi]
mov	edx, [eax+138h]
push	edi
push	ecx
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_67F433
pop	edi
pop	esi
retn	8

loc_67F433:
mov	eax, [edi]
mov	edx, [eax+84h]
mov	ecx, edi
call	edx
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ecx, eax
call	sub_69A320
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
pop	edi
mov	al, 1
pop	esi
retn	8
sub_67F410 endp

align 10h



sub_67F470 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	word ptr -18h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  4

sub	esp, 20h
push	esi
mov	esi, ecx
mov	al, [esi+76h]
shr	al, 4
test	al, 1
jz	short loc_67F489
xor	al, al
pop	esi
add	esp, 20h
retn	4

loc_67F489:
inc	dword ptr [esi+4]
push	ebx
xor	ebx, ebx
push	edi
mov	edi, [esp+2Ch+arg_0]
xor	ecx, ecx
cmp	dword ptr [edi], 1
mov	[esp+2Ch+var_20], 1
mov	[esp+2Ch+var_1C], ebx
mov	[esp+2Ch+var_18], cx
mov	[esp+2Ch+var_16], bl
mov	[esp+2Ch+var_14], bl
mov	[esp+2Ch+var_13], bl
mov	[esp+2Ch+var_15], 0FFh
jnz	short loc_67F4EE
mov	eax, [esi+0A0h]
mov	edx, 0FFDFh
and	[esi+76h], dx
shr	eax, 0Ch
test	al, 1
jnz	short loc_67F4EE
test	byte ptr [esi+1E0h], 80h
jnz	short loc_67F4EE
mov	ecx, esi
call	sub_64A400
pop	edi
pop	ebx
xor	al, al
pop	esi
add	esp, 20h
retn	4

loc_67F4EE:
push	edi
mov	ecx, esi
call	sub_659450
xor	ecx, ecx
cmp	dword ptr [edi], 4
mov	byte ptr [esp+2Ch+arg_0], al
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	[esp+2Ch+var_8], cx
mov	[esp+2Ch+var_6], bl
mov	[esp+2Ch+var_4], bl
mov	[esp+2Ch+var_3], bl
mov	[esp+2Ch+var_5], 0FFh
jnz	short loc_67F543
mov	eax, [esi+0BCh]
or	word ptr [esi+76h], 10h
mov	edx, [eax+280Ch]
mov	[esi+8Ch], edx
mov	[eax+280Ch], esi
inc	dword ptr [esi+4]

loc_67F543:
mov	ecx, esi
call	sub_64A400
mov	al, byte ptr [esp+2Ch+arg_0]
pop	edi
pop	ebx
pop	esi
add	esp, 20h
retn	4
sub_67F470 endp

align 10h



sub_67F560 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
push	edi
mov	esi, ecx
call	sub_658330
test	al, al
jnz	short loc_67F5F0
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
add	eax, 78h
push	eax
lea	eax, [esp+1Ch+arg_0]
push	eax
mov	ecx, edi
call	sub_668230
mov	eax, [esp+18h+arg_0]
cmp	dword ptr [eax+10h], 0
jz	short loc_67F607
mov	eax, [esi+1C4h]
mov	[esp+18h+var_10], 0
test	eax, eax
jnz	short loc_67F5B1
mov	eax, [esi+80h]
test	eax, eax
jz	short loc_67F5FA

loc_67F5B1:
mov	edx, [eax+10h]
mov	edx, [edx+2Ch]
lea	ecx, [eax+10h]
lea	eax, [esp+18h+var_10]
push	eax
lea	eax, [esp+1Ch+arg_0]
push	eax
add	esi, 160h
push	esi
call	edx
test	al, al
jz	short loc_67F5FA
lea	ecx, [esp+18h+var_10]
call	sub_652830
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67F5F0
call	sub_650DF0

loc_67F5F0:
pop	edi
mov	al, 1
pop	esi
add	esp, 10h
retn	4

loc_67F5FA:
lea	ecx, [esp+18h+var_10]
call	sub_652830
mov	eax, [esp+18h+arg_0]

loc_67F607:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67F619
call	sub_650DF0

loc_67F619:
pop	edi
xor	al, al
pop	esi
add	esp, 10h
retn	4
sub_67F560 endp

align 10h



sub_67F630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	esi
mov	esi, ecx
test	esi, esi
jz	short loc_67F640
inc	dword ptr [esi+4]
lea	eax, [esi+78h]
jmp	short loc_67F642

loc_67F640:
xor	eax, eax

loc_67F642:
mov	ecx, [esp+8+arg_C]
mov	edx, [esp+8+arg_8]
push	ecx
push	edx
mov	edx, [esp+10h+arg_4]
lea	ecx, [esi+0E8h]
push	ecx
push	eax
mov	eax, [esp+18h+arg_0]
push	edx
push	eax
call	sub_672C30
add	esp, 18h
mov	bl, al
test	esi, esi
jz	short loc_67F673
mov	ecx, esi
call	sub_64A400

loc_67F673:
pop	esi
mov	al, bl
pop	ebx
retn	10h
sub_67F630 endp

align 10h



sub_67F680 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h

sub	esp, 14h
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	edx, [eax+10h]
call	edx
test	al, al
jnz	short loc_67F696
pop	edi
add	esp, 14h
retn

loc_67F696:
mov	eax, [edi+0A0h]
and	eax, 60h
jnz	loc_67F74F
push	ebx
push	ebp
push	esi
mov	esi, [edi+80h]
test	esi, esi
jz	loc_67F73B
mov	ebx, [esi+10h]
mov	[esp+24h+var_10], al
lea	eax, [esp+24h+var_10]
push	eax
push	offset aTabenabled ; "tabEnabled"
lea	ecx, [esp+2Ch+var_14]
lea	ebp, [edi+0E8h]
push	ecx
add	esi, 10h
mov	ecx, ebp
call	sub_651CB0
push	eax
mov	eax, [ebx+2Ch]
lea	edx, [edi+160h]
push	edx
mov	ecx, esi
call	eax
mov	bl, al
mov	eax, [esp+24h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67F703
call	sub_650DF0

loc_67F703:
test	bl, bl
jz	short loc_67F732
mov	al, [esp+24h+var_10]
test	al, al
jz	short loc_67F732
cmp	al, 0Ah
jz	short loc_67F732
push	ebp
lea	ecx, [esp+28h+var_10]
call	sub_651D80
lea	ecx, [esp+24h+var_10]
mov	bl, al
call	sub_652830
pop	esi
pop	ebp
mov	al, bl
pop	ebx
pop	edi
add	esp, 14h
retn

loc_67F732:
lea	ecx, [esp+24h+var_10]
call	sub_652830

loc_67F73B:
pop	esi
xor	eax, eax
cmp	[edi+0A4h], ax
pop	ebp
pop	ebx
setnle	al
pop	edi
add	esp, 14h
retn

loc_67F74F:
xor	ecx, ecx
cmp	eax, 60h
setz	cl
mov	al, cl
pop	edi
add	esp, 14h
retn
sub_67F680 endp

align 10h



sub_67F760 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+1D0h], 0
push	edi
jz	loc_67F816
mov	eax, [esi]
mov	edx, [eax+0B4h]
call	edx
test	al, al
jnz	short loc_67F7C8
mov	edi, [esi+1D0h]
test	edi, edi
jz	short loc_67F7C8
cmp	dword ptr [edi+1D0h], 0
jz	short loc_67F7B4
mov	eax, [edi]
mov	edx, [eax+0B4h]
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_67F7B4
cmp	dword ptr [edi+1D0h], 0
jz	short loc_67F7B4
push	0
mov	ecx, edi
call	sub_67F760

loc_67F7B4:
and	dword ptr [edi+0A0h], 0FFFF7FFFh
mov	dword ptr [edi+1D0h], 0

loc_67F7C8:
cmp	dword ptr [esi+1D0h], 0
jz	short loc_67F816
mov	eax, [esi]
mov	edx, [eax+0B4h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_67F7F2
mov	ecx, [esi+1D0h]
test	ecx, ecx
jz	short loc_67F7F2
push	0
call	sub_67F760

loc_67F7F2:
cmp	dword ptr [esi+1D0h], 0
jz	short loc_67F816
mov	eax, [esi]
mov	edx, [eax+0B4h]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_67F816
mov	ecx, [esi+1D0h]
call	sub_64A400

loc_67F816:
mov	edi, [esp+8+arg_0]
and	dword ptr [esi+0A0h], 0FFFF7FFFh
mov	[esi+1D0h], edi
test	edi, edi
jz	short loc_67F868
inc	dword ptr [edi+4]
xor	eax, eax
mov	[esi+74h], ax
cmp	[edi+1D0h], eax
jz	short loc_67F860
mov	edx, [edi]
mov	eax, [edx+0B4h]
mov	ecx, edi
call	eax
test	al, al
jz	short loc_67F860
mov	ecx, [edi+1D0h]
test	ecx, ecx
jz	short loc_67F860
push	0
call	sub_67F760

loc_67F860:
push	esi
mov	ecx, edi
call	sub_67E0F0

loc_67F868:
mov	esi, [esi+0BCh]
or	dword ptr [esi+2474h], 400h
add	esi, 2474h
pop	edi
pop	esi
retn	4
sub_67F760 endp

align 10h



sub_67F890 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0C0h]
xor	ecx, ecx
test	eax, eax
setnz	cl
xor	edx, edx
push	edi
mov	edi, [esp+0Ch+arg_0]
test	edi, edi
setnz	dl
cmp	edx, ecx
setnz	bl
test	edi, edi
jnz	short loc_67F8D5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	ecx, 0FFFEh
and	[esi+76h], cx
mov	[esi+0C0h], edi
jmp	short loc_67F914

loc_67F8D5:
test	eax, eax
jnz	short loc_67F8F3
mov	edx, [esi+0BCh]
mov	ecx, [edx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	10h
call	edx
mov	[esi+0C0h], eax

loc_67F8F3:
mov	ecx, [edi]
mov	eax, [esi+0C0h]
mov	[eax], ecx
mov	edx, [edi+4]
mov	[eax+4], edx
mov	ecx, [edi+8]
mov	[eax+8], ecx
mov	edx, [edi+0Ch]
mov	[eax+0Ch], edx
or	word ptr [esi+76h], 1

loc_67F914:
test	bl, bl
jz	short loc_67F921
mov	eax, [esi]
mov	edx, [eax+50h]
mov	ecx, esi
call	edx

loc_67F921:
mov	esi, [esi+0BCh]
or	dword ptr [esi+2474h], 400h
add	esi, 2474h
pop	edi
pop	esi
pop	ebx
retn	4
sub_67F890 endp

align 10h



sub_67F940 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+4Ch]
call	edx
test	eax, eax
setnz	al
mov	ebx, 1
mov	[esp+0Ch+var_1], al
test	[esi+76h], bl
jnz	short loc_67F963
test	al, al
jnz	short loc_67F9A7

loc_67F963:
push	ebp
mov	ebp, [esi+0C8h]
push	edi
xor	edi, edi
test	ebp, ebp
jbe	short loc_67F9A5
jmp	short loc_67F977

loc_67F973:
mov	al, [esp+14h+var_1]

loc_67F977:
mov	ecx, [esi+0C4h]
mov	ecx, [ecx+edi*4]
test	[esi+76h], bl
jnz	short loc_67F989
test	al, al
jz	short loc_67F98F

loc_67F989:
or	[ecx+76h], bx
jmp	short loc_67F998

loc_67F98F:
mov	edx, 0FFFEh
and	[ecx+76h], dx

loc_67F998:
mov	eax, [ecx]
mov	edx, [eax+50h]
call	edx
add	edi, ebx
cmp	edi, ebp
jb	short loc_67F973

loc_67F9A5:
pop	edi
pop	ebp

loc_67F9A7:
pop	esi
pop	ebx
pop	ecx
retn
sub_67F940 endp

align 10h



sub_67F9B0 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	edi
mov	edi, ecx
mov	ecx, [edi+0A0h]
mov	eax, [edi+0C8h]
shr	ecx, 3
and	cl, 1
xor	ebx, ebx
mov	[esp+14h+var_9], cl
mov	[esp+14h+var_4], eax
test	eax, eax
jbe	loc_67FA7E
push	ebp
push	esi
jmp	short loc_67F9E4
align 10h

loc_67F9E0:
mov	cl, [esp+1Ch+var_9]

loc_67F9E4:
mov	eax, [edi+0C4h]
mov	eax, [eax+ebx*4]
mov	dl, [eax+76h]
shr	dl, 7
and	dl, 1
movzx	esi, dl
neg	esi
sbb	esi, esi
and	esi, eax
jz	short loc_67FA71
mov	eax, [edi+0A0h]
shr	eax, 3
test	al, 1
jnz	short loc_67FA12
test	cl, cl
jz	short loc_67FA1B

loc_67FA12:
or	dword ptr [esi+0A0h], 8
jmp	short loc_67FA22

loc_67FA1B:
and	dword ptr [esi+0A0h], 0FFFFFFF7h

loc_67FA22:
mov	edx, [esi]
mov	eax, [edx+128h]
mov	ecx, esi
call	eax
mov	ecx, [esi+0A0h]
mov	edx, [esi]
mov	edx, [edx+124h]
mov	ebp, [edi+0BCh]
shr	ecx, 13h
and	cl, 1
mov	byte ptr [esp+1Ch+var_8], cl
mov	eax, [esp+1Ch+var_8]
push	eax
mov	ecx, esi
call	edx
cmp	eax, 0FFFFFFFFh
jz	short loc_67FA69
cmp	eax, 1
jnz	short loc_67FA71
push	ebp
mov	ecx, esi
call	sub_655A50
jmp	short loc_67FA71

loc_67FA69:
push	ebp
mov	ecx, esi
call	sub_655B00

loc_67FA71:
inc	ebx
cmp	ebx, [esp+1Ch+var_4]
jb	loc_67F9E0
pop	esi
pop	ebp

loc_67FA7E:
pop	edi
pop	ebx
add	esp, 0Ch
retn
sub_67F9B0 endp

align 10h



sub_67FA90 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	edi
mov	edi, ecx
mov	ecx, [edi+0A0h]
mov	eax, [edi+0C8h]
shr	ecx, 2
and	cl, 1
xor	ebx, ebx
mov	[esp+14h+var_9], cl
mov	[esp+14h+var_4], eax
test	eax, eax
jbe	loc_67FB5E
push	ebp
push	esi
jmp	short loc_67FAC4
align 10h

loc_67FAC0:
mov	cl, [esp+1Ch+var_9]

loc_67FAC4:
mov	eax, [edi+0C4h]
mov	eax, [eax+ebx*4]
mov	dl, [eax+76h]
shr	dl, 7
and	dl, 1
movzx	esi, dl
neg	esi
sbb	esi, esi
and	esi, eax
jz	short loc_67FB51
mov	eax, [edi+0A0h]
shr	eax, 2
test	al, 1
jnz	short loc_67FAF2
test	cl, cl
jz	short loc_67FAFB

loc_67FAF2:
or	dword ptr [esi+0A0h], 4
jmp	short loc_67FB02

loc_67FAFB:
and	dword ptr [esi+0A0h], 0FFFFFFFBh

loc_67FB02:
mov	edx, [esi]
mov	eax, [edx+12Ch]
mov	ecx, esi
call	eax
mov	ecx, [esi+0A0h]
mov	edx, [esi]
mov	edx, [edx+124h]
mov	ebp, [edi+0BCh]
shr	ecx, 13h
and	cl, 1
mov	byte ptr [esp+1Ch+var_8], cl
mov	eax, [esp+1Ch+var_8]
push	eax
mov	ecx, esi
call	edx
cmp	eax, 0FFFFFFFFh
jz	short loc_67FB49
cmp	eax, 1
jnz	short loc_67FB51
push	ebp
mov	ecx, esi
call	sub_655A50
jmp	short loc_67FB51

loc_67FB49:
push	ebp
mov	ecx, esi
call	sub_655B00

loc_67FB51:
inc	ebx
cmp	ebx, [esp+1Ch+var_4]
jb	loc_67FAC0
pop	esi
pop	ebp

loc_67FB5E:
pop	edi
pop	ebx
add	esp, 0Ch
retn
sub_67FA90 endp

align 10h



sub_67FB70 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+0C8h]
xor	esi, esi
test	ebx, ebx
jbe	short loc_67FBC5
push	ebp
mov	ebp, [esp+10h+arg_0]
jmp	short loc_67FB90
align 10h

loc_67FB90:
mov	eax, [edi+0C4h]
mov	eax, [eax+esi*4]
mov	cl, [eax+76h]
shr	cl, 7
and	cl, 1
movzx	ecx, cl
neg	ecx
sbb	ecx, ecx
and	ecx, eax
jz	short loc_67FBBF
mov	edx, [ecx]
mov	eax, [edx+130h]
push	ebp
mov	[ecx+0A6h], bp
call	eax

loc_67FBBF:
inc	esi
cmp	esi, ebx
jb	short loc_67FB90
pop	ebp

loc_67FBC5:
pop	edi
pop	esi
pop	ebx
retn	4
sub_67FB70 endp

align 10h



sub_67FBD0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
call	sub_6554F0
mov	ebx, [edi+0C8h]
xor	esi, esi
test	ebx, ebx
jbe	short loc_67FC09
jmp	short loc_67FBF0
align 10h

loc_67FBF0:
mov	eax, [edi+0C4h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_67FC04
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax

loc_67FC04:
inc	esi
cmp	esi, ebx
jb	short loc_67FBF0

loc_67FC09:
pop	edi
pop	esi
pop	ebx
retn
sub_67FBD0 endp

align 10h



sub_67FC10 proc	near
push	edi
push	0
mov	edi, ecx
call	sub_654BF0
test	al, al
jz	short loc_67FC22
mov	al, 1
pop	edi
retn

loc_67FC22:
push	ebx
mov	ebx, [edi+0C8h]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_67FC4D

loc_67FC30:
mov	eax, [edi+0C4h]
mov	ecx, [eax+esi*4]
test	ecx, ecx
jz	short loc_67FC48
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
test	al, al
jnz	short loc_67FC53

loc_67FC48:
inc	esi
cmp	esi, ebx
jb	short loc_67FC30

loc_67FC4D:
pop	esi
pop	ebx
xor	al, al
pop	edi
retn

loc_67FC53:
pop	esi
pop	ebx
mov	al, 1
pop	edi
retn
sub_67FC10 endp

align 10h



sub_67FC60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67FC74
mov	eax, [esi+18h]
mov	esi, [eax+74h]
jmp	short loc_67FC8A

loc_67FC74:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67FCE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67FCE0
lea	esi, [eax-78h]

loc_67FC8A:
test	esi, esi
jz	short loc_67FCE0
mov	eax, [esi+1C0h]
push	edi
test	eax, eax
jz	short loc_67FCA4
cmp	byte ptr [eax+18h], 0
jnz	short loc_67FCA4
mov	edi, [eax+10h]
jmp	short loc_67FCB3

loc_67FCA4:
mov	ecx, [esi+0B8h]
mov	edx, [ecx]
mov	eax, [edx+28h]
call	eax
mov	edi, eax

loc_67FCB3:
mov	edx, [esi]
mov	eax, [edx+13Ch]
mov	ecx, esi
call	eax
cmp	eax, edi
pop	edi
jge	short loc_67FCD2
mov	edx, [esi]
inc	eax
push	eax
mov	eax, [edx+144h]
mov	ecx, esi
call	eax

loc_67FCD2:
mov	edx, [esi]
mov	eax, [edx+148h]
push	1
mov	ecx, esi
call	eax

loc_67FCE0:
pop	esi
retn
sub_67FC60 endp

align 10h



sub_67FCF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67FD04
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
jmp	short loc_67FD1A

loc_67FD04:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67FD48
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67FD48
lea	ecx, [eax-78h]

loc_67FD1A:
test	ecx, ecx
jz	short loc_67FD48
mov	edx, [ecx]
mov	eax, [edx+5Ch]
push	edi
call	eax
mov	ecx, [eax+1Ch]
mov	edx, [ecx+0Ch]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	eax, [edx+20h]
mov	edi, [eax+28h]
jb	short loc_67FD41
mov	ecx, esi
call	sub_652060

loc_67FD41:
mov	[esi+4], edi
mov	byte ptr [esi],	4
pop	edi

loc_67FD48:
pop	esi
retn
sub_67FCF0 endp

align 10h



sub_67FD50 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67FD73
mov	eax, [esi+18h]
mov	ebp, [eax+74h]
jmp	short loc_67FD91

loc_67FD73:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_67FE51
mov	eax, [esi+8]
test	eax, eax
jz	loc_67FE51
lea	ebp, [eax-78h]

loc_67FD91:
test	ebp, ebp
jz	loc_67FE51
mov	eax, [esi+1Ch]
cmp	eax, 2
jl	loc_67FE51
push	ebx
cmp	eax, 3
jnz	short loc_67FDC3
mov	ecx, [esi+18h]
push	ecx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	ebx, eax
jmp	short loc_67FDC5

loc_67FDC3:
xor	ebx, ebx

loc_67FDC5:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+1Ch+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
push	ebx
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
add	eax, 4000h
push	eax
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, ebp
call	sub_658260
mov	edi, eax
pop	ebx
test	edi, edi
jz	short loc_67FE18
inc	dword ptr [edi+4]

loc_67FE18:
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_67FE2E
call	sub_650DF0

loc_67FE2E:
mov	ecx, ebp
call	sub_654DD0
cmp	eax, 6
jb	short loc_67FE43
mov	ecx, [esi+4]
push	edi
call	sub_6528F0

loc_67FE43:
test	edi, edi
jz	short loc_67FE51
mov	ecx, edi
pop	edi
pop	esi
pop	ebp
jmp	sub_64A400

loc_67FE51:
pop	edi
pop	esi
pop	ebp
retn
sub_67FD50 endp

align 10h



sub_67FE60 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67FE83
mov	eax, [esi+18h]
mov	ebx, [eax+74h]
jmp	short loc_67FEA1

loc_67FE83:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_67FF34
mov	ebx, [esi+8]
test	ebx, ebx
jz	loc_67FF34
add	ebx, 0FFFFFF88h

loc_67FEA1:
test	ebx, ebx
jz	loc_67FF34
cmp	dword ptr [esi+1Ch], 1
jge	short loc_67FEDB
mov	eax, [ebx+94h]
test	eax, eax
jnz	short loc_67FEC0
mov	ecx, ebx
call	sub_658B70

loc_67FEC0:
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [esi+18h]
push	edx
push	offset aErrorS_attacha ; "Error: %s.attachAudio() needs	one Argum"...
push	eax
call	sub_66D290
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn

loc_67FEDB:
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_67FF34
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 22h
jnz	short loc_67FF34
mov	ecx, [esi+18h]
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	23h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_67FF34
mov	ecx, esi
call	sub_64A430
mov	edx, [esi]
mov	eax, [edx+14h]
push	ebx
push	edi
mov	ecx, esi
call	eax

loc_67FF34:
pop	edi
pop	esi
pop	ebx
retn
sub_67FE60 endp

align 10h



sub_67FF40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_67FF62
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_67FF78

loc_67FF62:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_67FFC4
mov	eax, [esi+8]
test	eax, eax
jz	short loc_67FFC4
lea	edi, [eax-78h]

loc_67FF78:
test	edi, edi
jz	short loc_67FFC4
cmp	dword ptr [esi+1Ch], 1
jl	short loc_67FFC4
push	0
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	1
jz	short loc_67FFBB
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
test	eax, eax
jz	short loc_67FFBB
lea	ecx, [eax+78h]
call	sub_661C50
push	eax
mov	ecx, edi
call	sub_67F760
pop	edi
pop	esi
retn

loc_67FFBB:
push	0
mov	ecx, edi
call	sub_67F760

loc_67FFC4:
pop	edi
pop	esi
retn
sub_67FF40 endp

align 10h



sub_67FFD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ecx, [edi+8]
test	ecx, ecx
jnz	short loc_67FFE6
mov	eax, [edi+18h]
mov	esi, [eax+74h]
jmp	short loc_680007

loc_67FFE6:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
add	eax, 0FFFFFFFEh
cmp	eax, 3
ja	loc_680122
mov	esi, [edi+8]
test	esi, esi
jz	loc_680122
add	esi, 0FFFFFF88h

loc_680007:
test	esi, esi
jz	loc_680122
cmp	dword ptr [edi+1Ch], 1
jl	loc_680122
mov	ecx, [esi+20h]
push	ebx
push	ebp
mov	[esp+14h+arg_0], ecx
push	0
mov	ecx, edi
call	sub_651EC0
mov	edx, [esi+78h]
lea	ecx, [esi+78h]
mov	ebx, eax
mov	eax, [edx+8]
xor	ebp, ebp
call	eax
mov	cl, [ebx]
sub	eax, 2
neg	eax
sbb	eax, eax
not	eax
and	eax, esi
cmp	cl, 3
jz	short loc_680051
cmp	cl, 4
jnz	short loc_68007B

loc_680051:
mov	ecx, [edi+18h]
push	ecx
mov	ecx, ebx
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
add	ebx, 4000h
cmp	ebx, 7EFFFFFDh
ja	loc_680120
mov	edi, [esp+14h+arg_0]
jmp	short loc_6800C5

loc_68007B:
mov	ecx, [edi+18h]
test	eax, eax
jz	short loc_6800A9
mov	edx, [ecx+74h]
push	eax
mov	[esp+18h+var_4], edx
call	sub_667F90
mov	ecx, [edi+18h]
push	ebx
call	sub_66D5E0
mov	ecx, [edi+18h]
mov	ebp, eax
mov	eax, [esp+14h+var_4]
push	eax
call	sub_667F90
jmp	short loc_6800B1

loc_6800A9:
push	ebx
call	sub_66D5E0
mov	ebp, eax

loc_6800B1:
test	ebp, ebp
jz	short loc_680120
cmp	ebp, esi
jz	short loc_680120
mov	edi, [esp+14h+arg_0]
cmp	edi, [ebp+20h]
jnz	short loc_680120
mov	ebx, [ebp+14h]

loc_6800C5:
cmp	dword ptr [esi+14h], 0
jl	short loc_680120
mov	edx, [esi]
mov	eax, [edx+20h]
push	0
mov	ecx, esi
call	eax
test	edi, edi
jz	short loc_680120
mov	edx, [edi]
mov	eax, [edx+13Ch]
mov	esi, [esi+14h]
mov	ecx, edi
call	eax
push	eax
push	ebx
push	esi
lea	ecx, [edi+0C4h]
call	sub_65CD90
test	al, al
jz	short loc_680120
mov	eax, [edi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
test	ebp, ebp
jz	short loc_680120
mov	edx, [ebp+0]
mov	eax, [edx+20h]
push	0
mov	ecx, ebp
call	eax

loc_680120:
pop	ebp
pop	ebx

loc_680122:
pop	edi
pop	esi
pop	ecx
retn
sub_67FFD0 endp

align 10h



sub_680130 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_680144
mov	eax, [esi+18h]
mov	eax, [eax+74h]
jmp	short loc_68015A

loc_680144:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_680192
mov	eax, [esi+8]
test	eax, eax
jz	short loc_680192
add	eax, 0FFFFFF88h

loc_68015A:
test	eax, eax
jz	short loc_680192
push	edi
lea	ecx, [eax+0C4h]
call	sub_65C5B0
mov	esi, [esi+4]
sub	eax, 3FFFh
mov	ecx, 0
sets	cl
dec	ecx
and	ecx, eax
cmp	byte ptr [esi],	5
mov	edi, ecx
jb	short loc_68018B
mov	ecx, esi
call	sub_652060

loc_68018B:
mov	[esi+4], edi
mov	byte ptr [esi],	4
pop	edi

loc_680192:
pop	esi
retn
sub_680130 endp

align 10h



sub_6801A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_6801C2
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_6801D8

loc_6801C2:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_680237
mov	eax, [esi+8]
test	eax, eax
jz	short loc_680237
lea	edi, [eax-78h]

loc_6801D8:
test	edi, edi
jz	short loc_680237
cmp	dword ptr [esi+1Ch], 1
jl	short loc_680237
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
add	eax, 4000h
add	edi, 0C4h
push	eax
mov	ecx, edi
call	sub_65CBC0
cmp	eax, 0FFFFFFFFh
jz	short loc_680237
mov	edx, [edi]
mov	eax, [edx+eax*4]
test	eax, eax
jz	short loc_680237
mov	cl, [eax+76h]
shr	cl, 7
and	cl, 1
movzx	edx, cl
mov	ecx, [esi+4]
neg	edx
sbb	edx, edx
and	edx, eax
push	edx
call	sub_6528F0

loc_680237:
pop	edi
pop	esi
retn
sub_6801A0 endp

align 10h



; int __stdcall	sub_680240(float, float)
sub_680240 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi+1CCh], 0
jnz	short loc_680294
mov	ecx, [esi+0BCh]
mov	eax, [ecx]
mov	edx, [eax+0F4h]
push	edi
call	edx
mov	edx, [eax]
push	0
mov	ecx, eax
mov	eax, [edx+28h]
push	88h
call	eax
test	eax, eax
jz	short loc_68027C
mov	ecx, eax
call	sub_6F91A0
mov	edi, eax
jmp	short loc_68027E

loc_68027C:
xor	edi, edi

loc_68027E:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_68028D
call	sub_64A400

loc_68028D:
mov	[esi+1CCh], edi
pop	edi

loc_680294:
fld	[esp+4+arg_4]
mov	ecx, [esi+1CCh]
fld	ds:dbl_15FCE20
sub	esp, 8
fmul	st(1), st
fxch	st(1)
fstp	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_4]
fstp	[esp+0Ch+var_8]
fmul	[esp+0Ch+arg_0]
fstp	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_4]
fstp	[esp+0Ch+var_C]
call	sub_6F8D80
mov	ecx, esi
call	sub_654EC0
pop	esi
retn	8
sub_680240 endp

align 10h



; int __stdcall	sub_6802E0(float, float, float,	float)
sub_6802E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
cmp	dword ptr [esi+1CCh], 0
jnz	short loc_68032B
mov	eax, [esi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	88h
call	eax
test	eax, eax
jz	short loc_680313
mov	ecx, eax
call	sub_6F91A0
mov	edi, eax
jmp	short loc_680315

loc_680313:
xor	edi, edi

loc_680315:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_680324
call	sub_64A400

loc_680324:
mov	[esi+1CCh], edi
pop	edi

loc_68032B:
fld	[esp+4+arg_C]
sub	esp, 10h
fld	ds:dbl_15FCE20
mov	ecx, [esi+1CCh]
fmul	st(1), st
fxch	st(1)
fstp	[esp+14h+arg_C]
fld	[esp+14h+arg_C]
fstp	[esp+14h+var_8]
fld	[esp+14h+arg_8]
fmul	st, st(1)
fstp	[esp+14h+arg_C]
fld	[esp+14h+arg_C]
fstp	[esp+14h+var_C]
fld	[esp+14h+arg_4]
fmul	st, st(1)
fstp	[esp+14h+arg_C]
fld	[esp+14h+arg_C]
fstp	[esp+14h+var_10]
fmul	[esp+14h+arg_0]
fstp	[esp+14h+arg_C]
fld	[esp+14h+arg_C]
fstp	[esp+14h+var_14]
call	sub_6F8DB0
mov	ecx, esi
call	sub_654EC0
pop	esi
retn	10h
sub_6802E0 endp

align 10h



sub_6803A0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1CCh], 0
jnz	short loc_6803EB
mov	eax, [esi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	88h
call	eax
test	eax, eax
jz	short loc_6803D3
mov	ecx, eax
call	sub_6F91A0
mov	edi, eax
jmp	short loc_6803D5

loc_6803D3:
xor	edi, edi

loc_6803D5:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_6803E4
call	sub_64A400

loc_6803E4:
mov	[esi+1CCh], edi
pop	edi

loc_6803EB:
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
mov	ecx, esi
call	sub_654EC0
mov	ecx, [esi+1CCh]
pop	esi
jmp	sub_6F9490
sub_6803A0 endp

align 10h



sub_680420 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
movzx	eax, bl
shl	eax, 10h
push	edi
mov	edi, ecx
xor	eax, [edi+0A0h]
mov	ebp, [edi+0C8h]
and	eax, 30000h
xor	[edi+0A0h], eax
xor	esi, esi
test	ebp, ebp
jbe	short loc_680469
lea	ecx, [ecx+0]

loc_680450:
mov	ecx, [edi+0C4h]
mov	ecx, [ecx+esi*4]
mov	edx, [ecx]
mov	eax, [edx+0B8h]
push	ebx
call	eax
inc	esi
cmp	esi, ebp
jb	short loc_680450

loc_680469:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_680420 endp




sub_680470 proc	near
mov	eax, ecx
mov	ecx, [eax+1D4h]
test	ecx, ecx
jz	short loc_680494
mov	eax, [eax+0BCh]
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_680494
lea	ecx, [eax+78h]
jmp	sub_661C50

loc_680494:
xor	eax, eax
retn
sub_680470 endp

align 10h



sub_6804A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_6804B4
mov	eax, [esi+18h]
mov	esi, [eax+74h]
jmp	short loc_6804CA

loc_6804B4:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_6804F6
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6804F6
lea	esi, [eax-78h]

loc_6804CA:
test	esi, esi
jz	short loc_6804F6
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_6804DD
call	sub_6F8DF0

loc_6804DD:
mov	ecx, esi
call	sub_654EC0
mov	esi, [esi+0BCh]
add	esi, 2474h
or	dword ptr [esi], 400h

loc_6804F6:
pop	esi
retn
sub_6804A0 endp

align 10h



sub_680500 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_680516
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_68052C

loc_680516:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_68057F
mov	eax, [esi+8]
test	eax, eax
jz	short loc_68057F
lea	edi, [eax-78h]

loc_68052C:
test	edi, edi
jz	short loc_68057F
cmp	dword ptr [esi+1Ch], 2
jl	short loc_68057F
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+var_4]
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
sub	esp, 8
fstp	[esp+14h+var_10]
mov	ecx, edi
fld	[esp+14h+var_4]
fstp	[esp+14h+var_14]
call	sub_680240

loc_68057F:
pop	edi
pop	esi
pop	ecx
retn
sub_680500 endp

align 10h



sub_680590 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_6805A8
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_6805C6

loc_6805A8:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_680661
mov	eax, [esi+8]
test	eax, eax
jz	loc_680661
lea	edi, [eax-78h]

loc_6805C6:
test	edi, edi
jz	loc_680661
cmp	dword ptr [esi+1Ch], 4
jl	loc_680661
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+var_4]
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+var_8]
mov	eax, [esi+18h]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+var_C]
mov	ecx, [esi+18h]
push	ecx
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
sub	esp, 10h
fstp	[esp+24h+var_18]
mov	ecx, edi
fld	[esp+24h+var_C]
fstp	[esp+24h+var_1C]
fld	[esp+24h+var_8]
fstp	[esp+24h+var_20]
fld	[esp+24h+var_4]
fstp	[esp+24h+var_24]
call	sub_6802E0

loc_680661:
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_680590 endp

align 10h



sub_680670 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, ecx
mov	ecx, [edx+8]
push	eax
push	ecx
call	sub_67E670
add	esp, 8
test	ax, ax
jz	short locret_68068F
mov	edx, [edx+4]
mov	byte ptr [edx+3Ah], 1

locret_68068F:
retn	0Ch
sub_680670 endp

align 10h



sub_6806A0 proc	near

; FUNCTION CHUNK AT 006806B0 SIZE 0000003E BYTES

push	esi
mov	esi, ecx
cmp	word ptr [esi+38h], 0
push	edi
jnz	short loc_6806E4
jmp	short loc_6806B0
sub_6806A0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_6806A0

loc_6806B0:
cmp	byte ptr [esi+3Ah], 0
jnz	short loc_6806E4
mov	edi, [esi+18h]
lea	esp, [esp+0]

loc_6806C0:
test	edi, edi
jz	short loc_6806E9
mov	eax, [esi+18h]
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 0Bh
jz	short loc_6806DB
mov	edi, [edi+18h]
jmp	short loc_6806C0

loc_6806DB:
cmp	word ptr [edi+38h], 0
mov	esi, edi
jz	short loc_6806B0

loc_6806E4:
pop	edi
mov	al, 1
pop	esi
retn

loc_6806E9:
pop	edi
xor	al, al
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_6806A0
align 10h



sub_6806F0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	edx, [ebx]
mov	ecx, eax
shl	ecx, 4
push	esi
lea	esi, [ecx+edx-10h]
test	eax, eax
jbe	short loc_680720
push	edi
mov	edi, eax
lea	esp, [esp+0]

loc_680710:
mov	ecx, esi
call	sub_652830
sub	esi, 10h
sub	edi, 1
jnz	short loc_680710
pop	edi

loc_680720:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
retn
sub_6806F0 endp

align 10h



sub_680740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_680770
mov	eax, [edi]
test	eax, eax
jz	short loc_680765
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_680765:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_680770:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6807A3
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6807A3:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*8]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 109h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_680740 endp

align 10h



sub_6807D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_680800
mov	eax, [edi]
test	eax, eax
jz	short loc_6807F5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6807F5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_680800:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_68082A
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+2Ch]
call	eax
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_68082A:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	esi
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6807D0 endp

align 10h



sub_680850 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_680880
mov	eax, [edi]
test	eax, eax
jz	short loc_680875
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_680875:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_680880:
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6808B3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6808B3:
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	[esp+10h+arg_4], 146h
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_680850 endp

align 10h



sub_6808E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_680910
mov	eax, [edi]
test	eax, eax
jz	short loc_680905
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_680905:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_680910:
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_680943
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_680943:
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	[esp+10h+arg_4], 2
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6808E0 endp

align 10h



sub_680970 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	ecx, [esp+arg_0]
call	sub_9B3060
test	eax, eax
jz	short locret_680992
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	10h
mov	ecx, eax
call	edx

locret_680992:
retn
sub_680970 endp

align 10h



sub_6809A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_6809AD
lea	ecx, [eax-0Ch]
jmp	short loc_6809AF

loc_6809AD:
xor	ecx, ecx

loc_6809AF:
mov	eax, [ecx]
mov	edx, [eax+0A8h]
call	edx
test	eax, eax
jz	short locret_6809D2
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	10h
mov	ecx, eax
call	edx

locret_6809D2:
retn
sub_6809A0 endp

align 10h



sub_6809E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_6809ED
lea	ecx, [eax-0Ch]
jmp	short loc_6809EF

loc_6809ED:
xor	ecx, ecx

loc_6809EF:
mov	eax, [ecx]
mov	edx, [eax+0A8h]
call	edx
test	eax, eax
jz	short locret_680A12
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	11h
mov	ecx, eax
call	edx

locret_680A12:
retn
sub_6809E0 endp

align 10h



sub_680A20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_680A6C
push	ebx
push	esi

loc_680A32:
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
mov	edx, [ecx+ebx*4]
lea	eax, [ecx+ebx*4]
mov	eax, [esp+10h+arg_C]
mov	ecx, [eax]
push	edx
push	ecx
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_680A5C
mov	edi, esi
jmp	short loc_680A66

loc_680A5C:
or	edx, 0FFFFFFFFh
sub	edx, esi
lea	ebp, [ebx+1]
add	edi, edx

loc_680A66:
test	edi, edi
jg	short loc_680A32
pop	esi
pop	ebx

loc_680A6C:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_680A20 endp

align 10h



sub_680A80 proc	near

arg_0= dword ptr  4

fldz
mov	eax, [esp+arg_0]
fst	dword ptr [eax]
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fstp	dword ptr [eax+0Ch]
retn	4
sub_680A80 endp

align 10h



sub_680AA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx+10h]
sub	esp, 14h
cmp	dword ptr [eax+14h], 0
jz	short loc_680B25
mov	ecx, [esp+14h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [eax+14h]
mov	eax, [esp+20h+arg_4]
mov	ebx, [eax+8]
mov	ebp, [eax+4]
push	edi
mov	edi, [eax+0Ch]
mov	eax, [eax]
push	ecx
lea	ecx, [esp+28h+var_14]
mov	[esp+28h+arg_4], eax
call	sub_67AF90
mov	edx, [esp+24h+arg_4]
mov	ecx, [esp+24h+arg_8]
mov	[esp+24h+var_10], edx
mov	[esp+24h+var_C], ebp
mov	[esp+24h+var_8], ebx
mov	[esp+24h+var_4], edi
mov	eax, [esi]
mov	eax, [eax+8]
push	ecx
lea	edx, [esp+28h+var_14]
push	edx
mov	ecx, esi
call	eax
mov	esi, [esp+24h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_680B21
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_680B21:
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_680B25:
add	esp, 14h
retn	0Ch
sub_680AA0 endp

align 10h



sub_680B30 proc	near

var_30=	byte ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 30h
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+1D4h]
test	ecx, ecx
jz	short loc_680B5D
mov	eax, [edi+0BCh]
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_680B5D
lea	ecx, [eax+78h]
call	sub_661C50
mov	esi, eax
jmp	short loc_680B5F

loc_680B5D:
xor	esi, esi

loc_680B5F:
lea	ecx, [esp+38h+var_18]
call	sub_64E8E0
test	esi, esi
jz	short loc_680BD1
fld	dword ptr [esi+44h]
lea	eax, [esp+38h+var_30]
fstp	[esp+38h+var_18]
push	eax
fld	dword ptr [esi+48h]
mov	ecx, esi
fstp	[esp+3Ch+var_14]
fld	dword ptr [esi+4Ch]
fstp	[esp+3Ch+var_10]
fld	dword ptr [esi+50h]
fstp	[esp+3Ch+var_C]
fld	dword ptr [esi+54h]
fstp	[esp+3Ch+var_8]
fld	dword ptr [esi+58h]
fstp	[esp+3Ch+var_4]
mov	edx, [esi]
mov	edx, [edx+0F4h]
call	edx
fldz
mov	esi, [esp+38h+arg_0]
fst	dword ptr [esi]
lea	eax, [esp+38h+var_30]
fst	dword ptr [esi+4]
push	eax
fst	dword ptr [esi+8]
push	esi
fstp	dword ptr [esi+0Ch]
lea	ecx, [esp+40h+var_18]
call	sub_64EF10
pop	edi
mov	eax, esi
pop	esi
add	esp, 30h
retn	4

loc_680BD1:
lea	ecx, [esp+38h+var_30]
call	sub_64E8E0
mov	edx, [edi]
mov	esi, [esp+38h+arg_0]
mov	edx, [edx+34h]
lea	eax, [esp+38h+var_30]
push	eax
push	esi
mov	ecx, edi
call	edx
pop	edi
mov	eax, esi
pop	esi
add	esp, 30h
retn	4
sub_680B30 endp

align 10h



sub_680C00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_67ECA0
test	[esp+4+arg_0], 1
jz	short loc_680C1D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_680C1D:
mov	eax, esi
pop	esi
retn	4
sub_680C00 endp

align 10h



sub_680C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
push	edi
mov	edi, ecx
test	edi, edi
jz	short loc_680C3E
inc	dword ptr [edi+4]

loc_680C3E:
mov	eax, [edi+1C0h]
test	eax, eax
jz	short loc_680C53
cmp	byte ptr [eax+18h], 0
jnz	short loc_680C53
mov	eax, [eax+10h]
jmp	short loc_680C60

loc_680C53:
mov	ecx, [edi+0B8h]
mov	eax, [ecx]
mov	edx, [eax+28h]
call	edx

loc_680C60:
mov	esi, [esp+10h+arg_0]
mov	ecx, edi
cmp	esi, eax
jnb	short loc_680CAA
push	esi
call	sub_67F0A0
mov	ecx, [edi+0B8h]
mov	eax, [ecx]
mov	eax, [eax+2Ch]
push	esi
lea	edx, [esp+14h+var_8]
push	edx
call	eax
xor	esi, esi
cmp	[esp+10h+var_4], esi
jbe	short loc_680CA8
jmp	short loc_680C90
align 10h

loc_680C90:
mov	ecx, [esp+10h+var_8]
mov	ecx, [ecx+esi*4]
mov	edx, [ecx]
mov	eax, [edx+8]
push	4
push	edi
call	eax
inc	esi
cmp	esi, [esp+10h+var_4]
jb	short loc_680C90

loc_680CA8:
mov	ecx, edi

loc_680CAA:
call	sub_64A400
pop	edi
pop	esi
add	esp, 8
retn	4
sub_680C30 endp

align 10h



sub_680CC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
mov	ecx, [esi+0B8h]
push	0
lea	edx, [esp+10h+var_4]
mov	[esp+10h+var_4], 0FFFFFFFFh
mov	eax, [ecx]
mov	eax, [eax+34h]
push	edx
push	edi
call	eax
test	al, al
jz	short loc_680D09
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [esp+0Ch+var_4]
mov	edx, [esi]
mov	edx, [edx+144h]
add	ecx, eax
push	ecx
mov	ecx, esi
call	edx
pop	edi
mov	al, 1
pop	esi
pop	ecx
retn	8

loc_680D09:
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_680D1A
mov	ecx, esi
call	sub_658B70

loc_680D1A:
mov	eax, [eax+0Ch]
mov	ecx, [eax]
push	edi
push	ecx
push	offset aErrorSMovieimp ; "Error: %s, MovieImpl::GotoLabeledFrame("...
add	esi, 0Ch
push	esi
call	sub_6809E0
add	esp, 10h
pop	edi
xor	al, al
pop	esi
pop	ecx
retn	8
sub_680CC0 endp

align 10h



sub_680D40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
mov	ecx, [edi+8]
call	sub_661C50
mov	esi, eax
test	esi, esi
jz	short loc_680D5A
inc	dword ptr [esi+4]

loc_680D5A:
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	edi, [edi+18h]
push	0
push	0
mov	[esp+1Ch+var_8], edi
lea	ecx, [esp+1Ch+var_C]
mov	[esp+1Ch+var_C], offset	off_1436C38
mov	[esp+1Ch+var_4], esi
mov	edx, [eax]
mov	edx, [edx+20h]
push	ecx
add	edi, 78h
push	edi
mov	ecx, eax
call	edx
mov	[esp+14h+var_C], offset	off_15818F8
test	esi, esi
jz	short loc_680DAA
mov	ecx, esi
call	sub_64A400

loc_680DAA:
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_680D40 endp




sub_680DB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= byte ptr	 4

sub	esp, 10h
push	ebx
push	esi
xor	edx, edx
xor	esi, esi
test	byte ptr [ecx+0A0h], 0Ch
jnz	short loc_680E06
mov	al, [ecx+76h]
shr	al, 6
not	al
test	al, 1
jz	short loc_680E06
xor	bl, bl
cmp	[ecx+0D4h], edx
jz	short loc_680DF5
mov	eax, [ecx+0BCh]
cmp	[eax+23E4h], ecx
jz	short loc_680DF5
mov	eax, [ecx+1C8h]
cmp	eax, edx
jz	short loc_680E08
cmp	[eax+10h], edx
jz	short loc_680E08

loc_680DF5:
xor	eax, eax
cmp	[esp+18h+arg_0], dl
pop	esi
setz	al
pop	ebx
add	esp, 10h
retn	4

loc_680E06:
mov	bl, 1

loc_680E08:
cmp	[esp+18h+arg_0], dl
jz	short loc_680E4F
cmp	bl, dl
jnz	short loc_680E44
mov	[esp+18h+var_C], edx
mov	[esp+18h+var_6], dl
mov	[esp+18h+var_4], dl
mov	[esp+18h+var_3], dl
lea	edx, [esp+18h+var_10]
xor	eax, eax
push	edx
mov	[esp+1Ch+var_10], 2
mov	[esp+1Ch+var_8], ax
mov	[esp+1Ch+var_5], 0FFh
call	sub_67F560
test	al, al
jnz	short loc_680E8A

loc_680E44:
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 10h
retn	4

loc_680E4F:
cmp	bl, dl
jnz	short loc_680E8A
mov	[esp+18h+var_C], edx
mov	[esp+18h+var_6], dl
mov	[esp+18h+var_4], dl
mov	[esp+18h+var_3], dl
lea	edx, [esp+18h+var_10]
xor	eax, eax
push	edx
mov	[esp+1Ch+var_10], 2
mov	[esp+1Ch+var_8], ax
mov	[esp+1Ch+var_5], 0FFh
call	sub_67F560
test	al, al
mov	eax, 1
jnz	short loc_680E8C

loc_680E8A:
mov	eax, esi

loc_680E8C:
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_680DB0 endp

align 10h



sub_680EA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	esi
push	edi
push	ecx
mov	esi, ecx
mov	ecx, [ebx+4Ch]
mov	eax, esp
lea	edx, [esp+18h+var_8]
mov	[eax], ecx
mov	ecx, [esi+90h]
push	edx
call	sub_6AFD80
cmp	[esp+14h+var_8], 0
jnz	short loc_680F01
mov	eax, [esi+94h]
movzx	edi, word ptr [ebx+4Ch]
test	eax, eax
jnz	short loc_680EE0
mov	ecx, esi
call	sub_658B70

loc_680EE0:
mov	eax, [eax+0Ch]
mov	ecx, [eax]
push	edi
push	ecx
push	offset aSSpriteReplace ; "%s, Sprite::ReplaceDisplayObject(): unk"...
add	esi, 0Ch
push	esi
call	sub_6809A0
add	esp, 10h
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	8

loc_680F01:
mov	edx, [esp+14h+var_4]
push	edx
push	ecx
mov	ecx, [ebx+4Ch]
mov	eax, esp
mov	[eax], ecx
mov	ecx, [esp+1Ch+var_8]
mov	edx, [ecx]
mov	eax, [edx+24h]
push	esi
call	eax
mov	ecx, [esp+14h+arg_4]
push	ecx
mov	edi, eax
push	edi
push	ebx
mov	ecx, esi
call	sub_67F330
mov	edx, [esi+0D8h]
mov	ecx, edi
mov	[edi+18h], edx
call	sub_64A400
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	8
sub_680EA0 endp

align 10h



sub_680F50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
cmp	edi, 0FFFFFFFFh
jz	loc_68100E
mov	eax, [esi+1C0h]
test	eax, eax
jz	short loc_680F79
cmp	byte ptr [eax+18h], 0
jnz	short loc_680F79
mov	eax, [eax+10h]
jmp	short loc_680F86

loc_680F79:
mov	ecx, [esi+0B8h]
mov	eax, [ecx]
mov	edx, [eax+28h]
call	edx

loc_680F86:
cmp	edi, eax
jnb	loc_68100E
mov	ecx, [esi+0BCh]
push	ebx
push	ebp
lea	eax, [esp+18h+arg_0]
push	eax
add	ecx, 2408h
call	sub_68D8D0
mov	ecx, [esi+0B8h]
mov	edx, [ecx]
mov	edx, [edx+2Ch]
mov	ebp, eax
push	edi
lea	eax, [esp+1Ch+var_8]
push	eax
call	edx
xor	ebx, ebx
cmp	[esp+18h+var_4], ebx
jbe	short loc_680FE8

loc_680FC3:
mov	eax, [esp+18h+var_8]
mov	edi, [eax+ebx*4]
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
test	al, al
jz	short loc_680FE1
mov	edx, [edi]
mov	eax, [edx+4]
push	esi
mov	ecx, edi
call	eax

loc_680FE1:
inc	ebx
cmp	ebx, [esp+18h+var_4]
jb	short loc_680FC3

loc_680FE8:
mov	ecx, [esi+0BCh]
mov	edx, [esp+18h+arg_0]
mov	[ecx+2458h], edx
mov	ecx, [esi+0BCh]
push	ebp
call	sub_69AFD0
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 8
retn	4

loc_68100E:
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_68101F
mov	ecx, esi
call	sub_658B70

loc_68101F:
mov	eax, [eax+0Ch]
mov	ecx, [eax]
push	edi
push	ecx
push	offset aErrorSCallfram ; "Error: %s, CallFrame('%d') - unknown fr"...
add	esi, 0Ch
push	esi
call	sub_6809A0
add	esp, 10h
pop	edi
pop	esi
add	esp, 8
retn	4
sub_680F50 endp

align 10h



sub_681040 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
test	esi, esi
jz	short loc_681050
inc	dword ptr [esi+4]
lea	ecx, [esi+78h]
jmp	short loc_681052

loc_681050:
xor	ecx, ecx

loc_681052:
mov	eax, [esi+0F0h]
sub	eax, [esi+0F4h]
mov	edx, [esi+104h]
sar	eax, 4
shl	edx, 5
lea	eax, [eax+edx-20h]
push	eax
mov	eax, [esp+0Ch+arg_8]
push	eax
mov	eax, [esp+10h+arg_4]
lea	edx, [esi+0E8h]
push	edx
push	ecx
mov	ecx, [esp+18h+arg_0]
push	eax
push	ecx
call	sub_672DA0
add	esp, 18h
mov	bl, al
test	esi, esi
jz	short loc_68109B
mov	ecx, esi
call	sub_64A400

loc_68109B:
pop	esi
mov	al, bl
pop	ebx
retn	0Ch
sub_681040 endp

align 10h



sub_6810B0 proc	near
cmp	dword ptr [ecx+1BCh], 0
jge	short loc_6810E3
mov	eax, [ecx+0A0h]
shr	eax, 4
test	al, 1
jz	short loc_6810E3
mov	eax, [ecx+1C4h]
test	eax, eax
jz	short loc_6810D4
mov	ecx, eax
jmp	short loc_6810DA

loc_6810D4:
mov	ecx, [ecx+80h]

loc_6810DA:
test	ecx, ecx
jz	short loc_6810E3
jmp	sub_6806A0

loc_6810E3:
xor	al, al
retn
sub_6810B0 endp

align 10h



sub_6810F0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h

sub	esp, 14h
push	esi
mov	esi, ecx
mov	al, [esi+1E1h]
test	al, al
jnz	loc_6811EC
push	ebx
mov	ebx, [esi+80h]
test	ebx, ebx
jz	loc_6811AA
push	edi
push	0
mov	[esp+24h+var_10], al
mov	eax, [esi+160h]
mov	ecx, [eax+280h]
lea	edi, [esi+160h]
push	0Ch
push	offset aFocusenabled ; "focusEnabled"
call	sub_650E40
mov	[esp+20h+var_14], eax
inc	dword ptr [eax+8]
mov	edx, [ebx+10h]
mov	edx, [edx+2Ch]
lea	eax, [esp+20h+var_10]
push	eax
lea	ecx, [ebx+10h]
lea	eax, [esp+24h+var_14]
push	eax
push	edi
call	edx
mov	bl, al
mov	eax, [esp+20h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_68116E
call	sub_650DF0

loc_68116E:
test	bl, bl
jz	short loc_6811A1
mov	al, [esp+1Ch+var_10]
test	al, al
jz	short loc_6811A1
cmp	al, 0Ah
jz	short loc_6811A1
add	esi, 0E8h
push	esi
lea	ecx, [esp+20h+var_10]
call	sub_651D80
lea	ecx, [esp+1Ch+var_10]
mov	bl, al
call	sub_652830
mov	al, bl
pop	ebx
pop	esi
add	esp, 14h
retn

loc_6811A1:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830

loc_6811AA:
cmp	dword ptr [esi+1BCh], 0
jge	short loc_6811E4
mov	eax, [esi+0A0h]
shr	eax, 4
test	al, 1
jz	short loc_6811E4
mov	eax, [esi+1C4h]
test	eax, eax
jz	short loc_6811CE
mov	esi, eax
jmp	short loc_6811D4

loc_6811CE:
mov	esi, [esi+80h]

loc_6811D4:
test	esi, esi
jz	short loc_6811E4
pop	ebx
mov	ecx, esi
pop	esi
add	esp, 14h
jmp	sub_6806A0

loc_6811E4:
pop	ebx
xor	al, al
pop	esi
add	esp, 14h
retn

loc_6811EC:
cmp	al, 2
jnz	short loc_681231
cmp	dword ptr [esi+1BCh], 0
jge	short loc_68122A
mov	ecx, [esi+0A0h]
shr	ecx, 4
test	cl, 1
jz	short loc_68122A
mov	eax, [esi+1C4h]
test	eax, eax
jz	short loc_681215
mov	esi, eax
jmp	short loc_68121B

loc_681215:
mov	esi, [esi+80h]

loc_68121B:
test	esi, esi
jz	short loc_68122A
mov	ecx, esi
pop	esi
add	esp, 14h
jmp	sub_6806A0

loc_68122A:
xor	al, al
pop	esi
add	esp, 14h
retn

loc_681231:
xor	edx, edx
cmp	al, 1
setz	dl
mov	al, dl
pop	esi
add	esp, 14h
retn
sub_6810F0 endp

align 10h



sub_681240 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 10h
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	[esi+1BCh], ebx
jge	short loc_6812CF
mov	eax, [esi+0A0h]
shr	eax, 4
test	al, 1
jz	short loc_6812CF
mov	ecx, [esi+1C4h]
cmp	ecx, ebx
jnz	short loc_681272
mov	ecx, [esi+80h]
cmp	ecx, ebx
jz	short loc_6812CF

loc_681272:
call	sub_6806A0
cmp	al, bl
jz	short loc_6812CF
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	eax, [eax+2474h]
shr	eax, 1Ch
and	eax, 3
cmp	eax, 3
jz	short loc_68129A
cmp	eax, 1
jz	short loc_6812CF

loc_68129A:
mov	edx, [esi]
mov	edx, [edx+108h]
xor	ecx, ecx
lea	eax, [esp+18h+var_10]
mov	[esp+18h+var_8], cx
push	eax
mov	ecx, esi
mov	[esp+1Ch+var_10], 2000h
mov	[esp+1Ch+var_C], ebx
mov	[esp+1Ch+var_6], bl
mov	[esp+1Ch+var_4], bl
mov	[esp+1Ch+var_3], bl
mov	[esp+1Ch+var_5], 0FFh
call	edx

loc_6812CF:
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_681240 endp

align 10h



sub_6812E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	[esi+1BCh], ebx
jge	loc_681398
mov	eax, [esi+0A0h]
shr	eax, 4
test	al, 1
jz	loc_681398
mov	ecx, [esi+1C4h]
cmp	ecx, ebx
jnz	short loc_68131A
mov	ecx, [esi+80h]
cmp	ecx, ebx
jz	short loc_681398

loc_68131A:
call	sub_6806A0
cmp	al, bl
jz	short loc_681398
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	ecx, [esp+18h+arg_4]
movzx	edx, byte ptr [eax+ecx+27F4h]
imul	edx, 34h
cmp	[edx+eax+24E0h], bl
jz	short loc_681398
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	eax, [eax+2474h]
shr	eax, 1Ch
and	eax, 3
cmp	eax, 3
jz	short loc_681363
cmp	eax, 1
jz	short loc_681398

loc_681363:
mov	edx, [esi]
mov	edx, [edx+108h]
xor	eax, eax
mov	[esp+18h+var_8], ax
lea	eax, [esp+18h+var_10]
push	eax
mov	ecx, esi
mov	[esp+1Ch+var_10], 4000h
mov	[esp+1Ch+var_C], ebx
mov	[esp+1Ch+var_6], bl
mov	[esp+1Ch+var_4], bl
mov	[esp+1Ch+var_3], bl
mov	[esp+1Ch+var_5], 0FFh
call	edx

loc_681398:
pop	esi
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch
sub_6812E0 endp

align 10h



sub_6813B0 proc	near

var_10=	byte ptr -10h

sub	esp, 10h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1BCh], 0
jge	loc_681462
mov	eax, [esi+0A0h]
shr	eax, 4
test	al, 1
jz	loc_681462
mov	ecx, [esi+1C4h]
test	ecx, ecx
jnz	short loc_6813E8
mov	ecx, [esi+80h]
test	ecx, ecx
jz	short loc_681462

loc_6813E8:
call	sub_6806A0
test	al, al
jz	short loc_681462
mov	edx, [esi]
mov	eax, [edx+6Ch]
push	ebx
push	edi
mov	ecx, esi
call	eax
mov	edi, eax
lea	eax, [edi+78h]
mov	[esp+1Ch+var_10], 0
mov	edx, [eax]
lea	ecx, [esi+78h]
mov	esi, [ecx]
lea	ebx, [esp+1Ch+var_10]
push	ebx
add	edx, 20Ch
push	edx
mov	edx, [esi+2Ch]
push	eax
call	edx
test	al, al
jz	short loc_68144D
mov	al, [esp+1Ch+var_10]
test	al, al
jz	short loc_68143B
cmp	al, 0Ah
jz	short loc_68143B
push	edi
mov	ecx, ebx
call	sub_651D80
test	al, al
jnz	short loc_68144D

loc_68143B:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
pop	ebx
xor	eax, eax
pop	esi
add	esp, 10h
retn

loc_68144D:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
pop	ebx
mov	eax, 1
pop	esi
add	esp, 10h
retn

loc_681462:
xor	eax, eax
pop	esi
add	esp, 10h
retn
sub_6813B0 endp

align 10h



sub_681470 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ecx, [edi+8]
test	ecx, ecx
jnz	short loc_681486
mov	eax, [edi+18h]
mov	esi, [eax+74h]
jmp	short loc_6814A4

loc_681486:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_68156F
mov	eax, [edi+8]
test	eax, eax
jz	loc_68156F
lea	esi, [eax-78h]

loc_6814A4:
test	esi, esi
jz	loc_68156F
cmp	dword ptr [edi+1Ch], 1
jge	short loc_6814DE
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_6814C3
mov	ecx, esi
call	sub_658B70

loc_6814C3:
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
push	edx
push	offset aErrorSGfx_spri ; "Error: %s, GFx_SpriteGotoAndPlay needs "...
add	esi, 0Ch
push	esi
call	sub_656080
add	esp, 0Ch
pop	edi
pop	esi
pop	ecx
retn

loc_6814DE:
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
mov	eax, [edi+18h]
mov	[esp+0Ch+arg_0], 0FFFFFFFFh
cmp	byte ptr [ecx],	5
jnz	short loc_681573
push	0
push	0FFFFFFFFh
push	eax
lea	edx, [esp+18h+var_4]
push	edx
call	sub_652F60
mov	eax, [esp+0Ch+var_4]
mov	eax, [eax]
mov	edx, [esi]
mov	edx, [edx+140h]
push	1
lea	ecx, [esp+10h+arg_0]
push	ecx
push	eax
mov	ecx, esi
call	edx
test	al, al
mov	eax, [esp+0Ch+var_4]
mov	ecx, eax
jnz	short loc_681540
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68156F
call	sub_650DF0
pop	edi
pop	esi
pop	ecx
retn

loc_681540:
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_681550
call	sub_650DF0

loc_681550:
mov	eax, [esp+0Ch+arg_0]

loc_681554:
mov	edx, [esi]
push	eax
mov	eax, [edx+144h]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+148h]
push	0
mov	ecx, esi
call	eax

loc_68156F:
pop	edi
pop	esi
pop	ecx
retn

loc_681573:
push	eax
call	sub_653750
dec	eax
mov	[esp+0Ch+arg_0], eax
jmp	short loc_681554
sub_681470 endp




sub_681580 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ecx, [edi+8]
test	ecx, ecx
jnz	short loc_681596
mov	eax, [edi+18h]
mov	esi, [eax+74h]
jmp	short loc_6815B4

loc_681596:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_68167F
mov	eax, [edi+8]
test	eax, eax
jz	loc_68167F
lea	esi, [eax-78h]

loc_6815B4:
test	esi, esi
jz	loc_68167F
cmp	dword ptr [edi+1Ch], 1
jge	short loc_6815EE
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_6815D3
mov	ecx, esi
call	sub_658B70

loc_6815D3:
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
push	edx
push	offset aErrorSGfx_spri ; "Error: %s, GFx_SpriteGotoAndPlay needs "...
add	esi, 0Ch
push	esi
call	sub_656080
add	esp, 0Ch
pop	edi
pop	esi
pop	ecx
retn

loc_6815EE:
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
mov	eax, [edi+18h]
mov	[esp+0Ch+arg_0], 0FFFFFFFFh
cmp	byte ptr [ecx],	5
jnz	short loc_681683
push	0
push	0FFFFFFFFh
push	eax
lea	edx, [esp+18h+var_4]
push	edx
call	sub_652F60
mov	eax, [esp+0Ch+var_4]
mov	eax, [eax]
mov	edx, [esi]
mov	edx, [edx+140h]
push	1
lea	ecx, [esp+10h+arg_0]
push	ecx
push	eax
mov	ecx, esi
call	edx
test	al, al
mov	eax, [esp+0Ch+var_4]
mov	ecx, eax
jnz	short loc_681650
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68167F
call	sub_650DF0
pop	edi
pop	esi
pop	ecx
retn

loc_681650:
dec	dword ptr [eax+8]
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_681660
call	sub_650DF0

loc_681660:
mov	eax, [esp+0Ch+arg_0]

loc_681664:
mov	edx, [esi]
push	eax
mov	eax, [edx+144h]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+148h]
push	1
mov	ecx, esi
call	eax

loc_68167F:
pop	edi
pop	esi
pop	ecx
retn

loc_681683:
push	eax
call	sub_653750
dec	eax
mov	[esp+0Ch+arg_0], eax
jmp	short loc_681664
sub_681580 endp




sub_681690 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_6816A4
mov	eax, [esi+18h]
mov	esi, [eax+74h]
jmp	short loc_6816BA

loc_6816A4:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_681702
mov	eax, [esi+8]
test	eax, eax
jz	short loc_681702
lea	esi, [eax-78h]

loc_6816BA:
test	esi, esi
jz	short loc_681702
cmp	dword ptr [esi+14h], 4000h
jge	short loc_681704
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_6816E8
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_6816E8
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	eax, [eax+78h]

loc_6816E8:
mov	ecx, [eax+8]
mov	edx, [ecx]
add	eax, 8
push	edx
push	offset aS_removemoviec ; "%s.removeMovieClip() failed -	depth mus"...
add	esi, 0Ch
push	esi
call	sub_64AE70
add	esp, 0Ch

loc_681702:
pop	esi
retn

loc_681704:
mov	ecx, esi
pop	esi
jmp	sub_655100
sub_681690 endp

align 10h



sub_681710 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	qword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_28=	byte ptr -28h
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 54h
push	ebx
push	ebp
mov	ebp, [esp+5Ch+arg_0]
push	esi
mov	esi, [ebp+4]
mov	ecx, esi
call	sub_652060
xor	ebx, ebx
mov	[esi], bl
mov	ecx, [ebp+8]
cmp	ecx, ebx
jnz	short loc_68173B
mov	eax, [ebp+18h]
mov	ecx, [eax+74h]
mov	[esp+60h+arg_0], ecx
jmp	short loc_68175D

loc_68173B:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_6818DE
mov	eax, [ebp+8]
cmp	eax, ebx
jz	loc_6818DE
add	eax, 0FFFFFF88h
mov	[esp+60h+arg_0], eax

loc_68175D:
cmp	[esp+60h+arg_0], ebx
jz	loc_6818DE
cmp	dword ptr [ebp+1Ch], 1
jl	loc_6818DE
mov	eax, [ebp+18h]
push	edi
push	eax
push	ebx
mov	ecx, ebp
lea	edi, [eax+78h]
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	esi, eax
cmp	esi, ebx
jz	loc_6818DD
mov	[esp+64h+var_28], bl
mov	[esp+64h+var_38], bl
mov	ecx, [edi]
mov	edx, [esi]
mov	edx, [edx+2Ch]
lea	eax, [esp+64h+var_28]
push	eax
add	ecx, 210h
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	edx, [edi]
mov	eax, [esi]
mov	eax, [eax+2Ch]
lea	ecx, [esp+64h+var_38]
push	ecx
add	edx, 214h
push	edx
push	edi
mov	ecx, esi
call	eax
mov	al, [esp+64h+var_28]
cmp	al, 3
jz	short loc_6817DA
cmp	al, 4
jnz	loc_6818CB

loc_6817DA:
mov	al, [esp+64h+var_38]
cmp	al, 3
jz	short loc_6817EA
cmp	al, 4
jnz	loc_6818CB

loc_6817EA:
mov	ecx, [ebp+18h]
push	ecx
lea	ecx, [esp+68h+var_38]
call	sub_653400
fstp	[esp+64h+var_50]
mov	edx, [ebp+18h]
push	edx
lea	ecx, [esp+68h+var_28]
call	sub_653400
fstp	[esp+64h+var_54]
fld	[esp+64h+var_54]
mov	ecx, [esp+64h+arg_0]
fld	ds:dbl_15FCE20
lea	eax, [esp+64h+var_18]
fmul	st(1), st
push	eax
fxch	st(1)
fstp	[esp+68h+var_40]
fmul	[esp+68h+var_50]
fstp	[esp+68h+var_3C]
call	sub_6552D0
lea	ecx, [esp+64h+var_40]
push	ecx
lea	edx, [esp+68h+var_50]
push	edx
mov	ecx, eax
call	sub_64E9B0
fld	[esp+64h+var_50]
fst	[esp+64h+var_40]
lea	ecx, [esp+64h+arg_0]
fld	dword ptr [esp+64h+var_4C]
push	ecx
fstp	[esp+68h+var_3C]
mov	ecx, [edi]
mov	eax, [esi]
fdiv	ds:dbl_15FCE20
lea	edx, [esp+68h+var_50]
push	edx
mov	edx, [eax+28h]
add	ecx, 210h
push	ecx
push	edi
mov	ecx, esi
mov	byte ptr [esp+74h+var_50], 3
mov	byte ptr [esp+74h+arg_0], bl
fstp	[esp+74h+var_4C]
call	edx
lea	ecx, [esp+64h+var_50]
call	sub_652830
fld	[esp+64h+var_3C]
fdiv	ds:dbl_15FCE20
mov	eax, [esi]
lea	ecx, [esp+64h+arg_0]
push	ecx
mov	ecx, [edi]
lea	edx, [esp+68h+var_50]
push	edx
mov	edx, [eax+28h]
add	ecx, 214h
push	ecx
push	edi
mov	ecx, esi
mov	byte ptr [esp+74h+var_50], 3
mov	byte ptr [esp+74h+arg_0], bl
fstp	[esp+74h+var_4C]
call	edx
lea	ecx, [esp+64h+var_50]
call	sub_652830

loc_6818CB:
lea	ecx, [esp+64h+var_38]
call	sub_652830
lea	ecx, [esp+64h+var_28]
call	sub_652830

loc_6818DD:
pop	edi

loc_6818DE:
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn
sub_681710 endp

align 10h



sub_6818F0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	qword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_28=	byte ptr -28h
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 54h
push	ebx
push	ebp
mov	ebp, [esp+5Ch+arg_0]
push	esi
mov	esi, [ebp+4]
mov	ecx, esi
call	sub_652060
xor	ebx, ebx
mov	[esi], bl
mov	ecx, [ebp+8]
cmp	ecx, ebx
jnz	short loc_68191B
mov	eax, [ebp+18h]
mov	ecx, [eax+74h]
mov	[esp+60h+arg_0], ecx
jmp	short loc_68193D

loc_68191B:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_681ABE
mov	eax, [ebp+8]
cmp	eax, ebx
jz	loc_681ABE
add	eax, 0FFFFFF88h
mov	[esp+60h+arg_0], eax

loc_68193D:
cmp	[esp+60h+arg_0], ebx
jz	loc_681ABE
cmp	dword ptr [ebp+1Ch], 1
jl	loc_681ABE
mov	eax, [ebp+18h]
push	edi
push	eax
push	ebx
mov	ecx, ebp
lea	edi, [eax+78h]
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	esi, eax
cmp	esi, ebx
jz	loc_681ABD
mov	[esp+64h+var_28], bl
mov	[esp+64h+var_38], bl
mov	ecx, [edi]
mov	edx, [esi]
mov	edx, [edx+2Ch]
lea	eax, [esp+64h+var_28]
push	eax
add	ecx, 210h
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	edx, [edi]
mov	eax, [esi]
mov	eax, [eax+2Ch]
lea	ecx, [esp+64h+var_38]
push	ecx
add	edx, 214h
push	edx
push	edi
mov	ecx, esi
call	eax
mov	al, [esp+64h+var_28]
cmp	al, 3
jz	short loc_6819BA
cmp	al, 4
jnz	loc_681AAB

loc_6819BA:
mov	al, [esp+64h+var_38]
cmp	al, 3
jz	short loc_6819CA
cmp	al, 4
jnz	loc_681AAB

loc_6819CA:
mov	ecx, [ebp+18h]
push	ecx
lea	ecx, [esp+68h+var_38]
call	sub_653400
fstp	[esp+64h+var_50]
mov	edx, [ebp+18h]
push	edx
lea	ecx, [esp+68h+var_28]
call	sub_653400
fstp	[esp+64h+var_54]
fld	[esp+64h+var_54]
mov	ecx, [esp+64h+arg_0]
fld	ds:dbl_15FCE20
lea	eax, [esp+64h+var_18]
fmul	st(1), st
push	eax
fxch	st(1)
fstp	[esp+68h+var_40]
fmul	[esp+68h+var_50]
fstp	[esp+68h+var_3C]
call	sub_6552D0
lea	ecx, [esp+64h+var_40]
push	ecx
lea	edx, [esp+68h+var_50]
push	edx
mov	ecx, eax
call	sub_64EC70
fld	[esp+64h+var_50]
fst	[esp+64h+var_40]
lea	ecx, [esp+64h+arg_0]
fld	dword ptr [esp+64h+var_4C]
push	ecx
fstp	[esp+68h+var_3C]
mov	ecx, [edi]
mov	eax, [esi]
fdiv	ds:dbl_15FCE20
lea	edx, [esp+68h+var_50]
push	edx
mov	edx, [eax+28h]
add	ecx, 210h
push	ecx
push	edi
mov	ecx, esi
mov	byte ptr [esp+74h+var_50], 3
mov	byte ptr [esp+74h+arg_0], bl
fstp	[esp+74h+var_4C]
call	edx
lea	ecx, [esp+64h+var_50]
call	sub_652830
fld	[esp+64h+var_3C]
fdiv	ds:dbl_15FCE20
mov	eax, [esi]
lea	ecx, [esp+64h+arg_0]
push	ecx
mov	ecx, [edi]
lea	edx, [esp+68h+var_50]
push	edx
mov	edx, [eax+28h]
add	ecx, 214h
push	ecx
push	edi
mov	ecx, esi
mov	byte ptr [esp+74h+var_50], 3
mov	byte ptr [esp+74h+arg_0], bl
fstp	[esp+74h+var_4C]
call	edx
lea	ecx, [esp+64h+var_50]
call	sub_652830

loc_681AAB:
lea	ecx, [esp+64h+var_38]
call	sub_652830
lea	ecx, [esp+64h+var_28]
call	sub_652830

loc_681ABD:
pop	edi

loc_681ABE:
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn
sub_6818F0 endp

align 10h



sub_681AD0 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 0C0h
push	ebp
push	esi
mov	esi, [esp+0C8h+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_681AEE
mov	eax, [esi+18h]
mov	ebp, [eax+74h]
jmp	short loc_681B0C

loc_681AEE:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_681D32
mov	ebp, [esi+8]
test	ebp, ebp
jz	loc_681D32
add	ebp, 0FFFFFF88h

loc_681B0C:
test	ebp, ebp
jz	loc_681D32
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
lea	ecx, [esp+0CCh+var_58]
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 0
call	sub_64E8E0
mov	edx, [ebp+0]
mov	edx, [edx+34h]
lea	eax, [esp+0CCh+var_58]
push	eax
lea	ecx, [esp+0D0h+var_78]
push	ecx
mov	ecx, ebp
call	edx
fld	[esp+0CCh+var_70]
fld	[esp+0CCh+var_78]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_681B69
fld	[esp+0CCh+var_6C]
fld	[esp+0CCh+var_74]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_681D31

loc_681B69:
mov	eax, [esi+1Ch]
cmp	eax, 2
jl	loc_681E1B
mov	eax, [esi+18h]
push	ebx
push	eax
xor	bl, bl
push	1
mov	ecx, esi
mov	byte ptr [esp+0D8h+var_BC], bl
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0D0h+var_C0]
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0D0h+var_B8]
cmp	dword ptr [esi+1Ch], 3
fld	[esp+0D0h+var_B8]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+0D0h+var_A8]
fmul	[esp+0D0h+var_C0]
fstp	[esp+0D0h+var_A4]
jl	short loc_681BE9
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
setnz	bl
mov	byte ptr [esp+0D0h+var_BC], bl

loc_681BE9:
cmp	dword ptr [esi+1Ch], 4
jl	short loc_681C0F
mov	eax, [esi+18h]
push	eax
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
neg	al
sbb	al, al
and	al, 2
or	bl, al
mov	byte ptr [esp+0D0h+var_BC], bl

loc_681C0F:
mov	edx, [ebp+0]
mov	eax, [edx+54h]
mov	ecx, ebp
call	eax
push	1
mov	ecx, ebp
mov	edi, eax
call	sub_654BF0
test	al, al
jz	loc_681D3B
test	edi, edi
jz	loc_681D3B
fld	[esp+0D0h+var_A4]
lea	ebx, [edi+0D0h]
fld	dword ptr [edi+84h]
push	1
fld	ds:dbl_15FCE20
mov	ecx, ebp
fmul	st(1), st
fxch	st(1)
fstp	[esp+0D4h+var_C0]
fld	[esp+0D4h+var_C0]
fsubp	st(2), st
fld	dword ptr [edi+9Ch]
fsub	dword ptr [edi+94h]
fstp	[esp+0D4h+var_C0]
fld	[esp+0D4h+var_C0]
fdivp	st(2), st
fld	ds:dbl_15FCC48
fsub	st(2), st
fld	ds:dbl_15FCD70
fmul	st(3), st
fxch	st(3)
fstp	[esp+0D4h+var_B8]
fld	[esp+0D4h+var_A8]
fld	dword ptr [edi+80h]
fmulp	st(3), st
fxch	st(2)
fstp	[esp+0D4h+var_C0]
fld	[esp+0D4h+var_C0]
fsubp	st(2), st
fld	dword ptr [edi+98h]
fsub	dword ptr [edi+90h]
fstp	[esp+0D4h+var_C0]
fld	[esp+0D4h+var_C0]
fdivp	st(2), st
fsubp	st(1), st
fmulp	st(1), st
fstp	dword ptr [ebx]
fld	[esp+0D4h+var_B8]
fchs
fstp	dword ptr [ebx+4]
call	sub_654D00
push	1
mov	ecx, ebp
mov	[esp+0D4h+var_C0], eax
call	sub_654D50
mov	ecx, [esp+0D0h+var_C0]
test	ecx, ecx
jz	short loc_681CE5
mov	[edi+0E0h], ecx

loc_681CE5:
test	eax, eax
jz	short loc_681CEF
mov	[edi+0E4h], eax

loc_681CEF:
lea	ecx, [esp+0D0h+var_40]
push	ecx		; void *
mov	ecx, ebp
call	sub_655290
lea	edx, [esp+0D0h+var_B8]
push	edx
mov	ecx, ebx
mov	[edi+0E8h], eax
call	sub_6A72B0
mov	ecx, [esp+0D0h+var_BC]
mov	eax, [ebp+0]
push	ecx
lea	edx, [esp+0D4h+var_B8]

loc_681D1C:
mov	eax, [eax+44h]
push	edx
mov	ecx, ebp
call	eax
movzx	ecx, al
push	ecx
mov	ecx, [esi+4]
call	sub_64A6C0
pop	ebx

loc_681D31:
pop	edi

loc_681D32:
pop	esi
pop	ebp
add	esp, 0C0h
retn

loc_681D3B:
lea	ecx, [esp+0D0h+var_58]
call	sub_64E8E0
lea	edx, [esp+0D0h+var_58]
push	edx
mov	ecx, ebp
call	sub_654B40
lea	eax, [esp+0D0h+var_A8]
push	eax
lea	ecx, [esp+0D4h+var_90]
push	ecx
lea	ecx, [esp+0D8h+var_58]
call	sub_64EC70
test	byte ptr [ebp+76h], 1
jz	short loc_681D9D
mov	eax, [esp+0D0h+var_BC]
mov	edx, [ebp+0]
mov	edx, [edx+44h]
push	eax
lea	ecx, [esp+0D4h+var_90]
push	ecx
mov	ecx, ebp
call	edx
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
pop	ebx
pop	edi
mov	byte ptr [esi],	2
pop	esi
pop	ebp
add	esp, 0C0h
retn

loc_681D9D:
fld	[esp+0D0h+var_90]
fld	[esp+0D0h+var_70]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_681E04
fld	[esp+0D0h+var_78]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_681E06
fld	[esp+0D0h+var_8C]
fld	[esp+0D0h+var_6C]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_681E04
fld	[esp+0D0h+var_74]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_681E06
test	bl, 1
jnz	short loc_681DF3
mov	ecx, [esi+4]
push	1
call	sub_64A6C0
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 0C0h
retn

loc_681DF3:
mov	ecx, [esp+0D0h+var_BC]
mov	eax, [ebp+0]
push	ecx
lea	edx, [esp+0D4h+var_90]
jmp	loc_681D1C

loc_681E04:
fstp	st

loc_681E06:
mov	ecx, [esi+4]
push	0
call	sub_64A6C0
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 0C0h
retn

loc_681E1B:
cmp	eax, 1
jnz	loc_681D31
push	0
mov	ecx, esi
call	sub_651EC0
xor	edi, edi
cmp	byte ptr [eax],	7
jnz	short loc_681E53
mov	edx, [esi+18h]
push	edx
mov	ecx, eax
call	sub_651BB0
test	eax, eax
jz	loc_681D31
lea	ecx, [eax+78h]
call	sub_661C50
mov	edi, eax
jmp	short loc_681ECE

loc_681E53:
mov	ecx, [esi+18h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+0D8h+var_BC]
push	edx
mov	ecx, eax
call	sub_652F60
push	0
push	0
push	0
push	0
lea	eax, [esp+0DCh+var_58]
push	eax
lea	ecx, [esp+0E0h+var_BC]
push	ecx
mov	ecx, [esi+18h]
mov	[esp+0E4h+var_58], 0
call	sub_6726F0
test	al, al
jz	short loc_681EAF
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0D0h+var_58]
call	sub_651BB0
test	eax, eax
jz	short loc_681EAD
lea	ecx, [eax+78h]
call	sub_661C50
mov	edi, eax
jmp	short loc_681EAF

loc_681EAD:
xor	edi, edi

loc_681EAF:
lea	ecx, [esp+0CCh+var_58]
call	sub_652830
mov	eax, [esp+0CCh+var_BC]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_681ECE
call	sub_650DF0

loc_681ECE:
test	edi, edi
jz	loc_681D31
lea	ecx, [esp+0CCh+var_90]
call	sub_64E8E0
mov	eax, [edi]
mov	eax, [eax+34h]
lea	ecx, [esp+0CCh+var_90]
push	ecx
lea	edx, [esp+0D0h+var_68]
push	edx
mov	ecx, edi
call	eax
fld	[esp+0CCh+var_60]
fld	[esp+0CCh+var_68]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_681F18
fld	[esp+0CCh+var_5C]
fld	[esp+0CCh+var_64]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_681D31

loc_681F18:
push	1
mov	ecx, ebp
call	sub_654BF0
test	al, al
jz	short loc_681F5B
lea	ecx, [esp+0CCh+var_40]
push	ecx		; void *
mov	ecx, ebp
call	sub_655290
fldz
push	0		; float
fst	[esp+0D0h+var_A8]
lea	edx, [esp+0D0h+var_78]
fst	[esp+0D0h+var_A4]
push	edx		; int
fst	[esp+0D4h+var_A0]
lea	ecx, [esp+0D4h+var_A8]
fstp	[esp+0D4h+var_9C]
push	ecx		; int
mov	ecx, eax
call	sub_650330
jmp	short loc_681F8A

loc_681F5B:
lea	edx, [esp+0CCh+var_90]
push	edx
mov	ecx, ebp
call	sub_6552D0
fldz
lea	ecx, [esp+0CCh+var_78]
fst	[esp+0CCh+var_A8]
push	ecx
fst	[esp+0D0h+var_A4]
lea	edx, [esp+0D0h+var_A8]
fst	[esp+0D0h+var_A0]
push	edx
fstp	[esp+0D4h+var_9C]
mov	ecx, eax
call	sub_64EF10

loc_681F8A:
fld	[esp+0CCh+var_A8]
push	1
fstp	[esp+0D0h+var_90]
mov	ecx, edi
fld	[esp+0D0h+var_A4]
fstp	[esp+0D0h+var_8C]
fld	[esp+0D0h+var_A0]
fstp	[esp+0D0h+var_88]
fld	[esp+0D0h+var_9C]
fstp	[esp+0D0h+var_84]
call	sub_654BF0
mov	ecx, edi
test	al, al
jz	short loc_681FED
lea	eax, [esp+0CCh+var_40]
push	eax		; void *
call	sub_655290
fldz
push	0		; float
fst	[esp+0D0h+var_B8]
lea	ecx, [esp+0D0h+var_68]
fst	[esp+0D0h+var_B4]
push	ecx		; int
fst	[esp+0D4h+var_B0]
lea	edx, [esp+0D4h+var_B8]
fstp	[esp+0D4h+var_AC]
push	edx		; int
mov	ecx, eax
call	sub_650330
jmp	short loc_68201A

loc_681FED:
lea	eax, [esp+0CCh+var_A8]
push	eax
call	sub_6552D0
fldz
lea	ecx, [esp+0CCh+var_68]
fst	[esp+0CCh+var_B8]
push	ecx
fst	[esp+0D0h+var_B4]
lea	edx, [esp+0D0h+var_B8]
fst	[esp+0D0h+var_B0]
push	edx
fstp	[esp+0D4h+var_AC]
mov	ecx, eax
call	sub_64EF10

loc_68201A:
fld	[esp+0CCh+var_B8]
fstp	[esp+0CCh+var_A8]
fld	[esp+0CCh+var_B4]
fstp	[esp+0CCh+var_A4]
fld	[esp+0CCh+var_B0]
fstp	[esp+0CCh+var_A0]
fld	[esp+0CCh+var_AC]
fstp	[esp+0CCh+var_9C]
fld	[esp+0CCh+var_84]
fld	[esp+0CCh+var_A4]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_682083
fld	[esp+0CCh+var_9C]
fld	[esp+0CCh+var_8C]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_682083
fld	[esp+0CCh+var_A0]
fld	[esp+0CCh+var_90]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_682083
fld	[esp+0CCh+var_88]
mov	byte ptr [esp+0CCh+var_BC], 1
fld	[esp+0CCh+var_A8]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_682088

loc_682083:
mov	byte ptr [esp+0CCh+var_BC], 0

loc_682088:
mov	eax, [esp+0CCh+var_BC]
mov	ecx, [esi+4]
push	eax
call	sub_64A6C0
pop	edi
pop	esi
pop	ebp
add	esp, 0C0h
retn
sub_681AD0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_682D40

loc_6820A0:
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1CCh], 0
jnz	short loc_6820EB
mov	eax, [esi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	88h
call	eax
test	eax, eax
jz	short loc_6820D3
mov	ecx, eax
call	sub_6F91A0
mov	edi, eax
jmp	short loc_6820D5

loc_6820D3:
xor	edi, edi

loc_6820D5:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_6820E4
call	sub_64A400

loc_6820E4:
mov	[esi+1CCh], edi
pop	edi

loc_6820EB:
mov	ecx, [esi+1CCh]
call	sub_6F8F00
test	al, al
jnz	short loc_68210F
push	0
mov	ecx, esi
call	sub_6803A0
mov	ecx, [esi+1CCh]
pop	esi
jmp	sub_6F8D30

loc_68210F:
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_682D40
align 10h



; int __stdcall	sub_682120(float, int, char, int, int, int, float)
sub_682120 proc	near

var_2C=	dword ptr -2Ch
var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, ecx
cmp	dword ptr [esi+1CCh], 0
push	edi
jnz	short loc_68216A
mov	eax, [esi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	88h
call	eax
test	eax, eax
jz	short loc_682153
mov	ecx, eax
call	sub_6F91A0
mov	edi, eax
jmp	short loc_682155

loc_682153:
xor	edi, edi

loc_682155:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_682164
call	sub_64A400

loc_682164:
mov	[esi+1CCh], edi

loc_68216A:
mov	edi, [esp+8+arg_4]
test	edi, 0FF000000h
jz	loc_68220D
fldz
fcomp	[esp+8+arg_0]
fnstsw	ax
test	ah, 1
jnz	short loc_682191
fld	ds:dword_156F414
fstp	[esp+8+arg_0]

loc_682191:
fld	[esp+8+arg_0]
mov	ecx, [esi+1CCh]
fmul	ds:dbl_15FCE20
mov	edx, [esp+8+arg_C]
mov	eax, dword ptr [esp+8+arg_8]
push	ebx
mov	ebx, [esp+0Ch+arg_14]
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_18]
push	ebp
mov	ebp, [esp+10h+arg_10]
push	ecx		; float
fstp	[esp+14h+var_14]
push	ebx		; int
fld	[esp+18h+arg_0]
push	ebp		; int
push	edx		; int
push	eax		; char
push	edi		; int
push	ecx		; float
fstp	[esp+2Ch+var_2C]
call	sub_6F8E40
test	al, al
jnz	short loc_682206
push	0
mov	ecx, esi
call	sub_6803A0
fld	[esp+10h+arg_18]
mov	edx, dword ptr [esp+10h+arg_8]
push	ecx		; float
mov	ecx, [esp+14h+arg_C]
fstp	[esp+14h+var_14]
fld	[esp+14h+arg_0]
push	ebx		; __int16
push	ebp		; int
push	ecx		; __int16
push	edx		; char
push	edi		; int
push	ecx		; float
mov	ecx, [esi+1CCh]
fstp	[esp+2Ch+var_2C]
call	sub_6F9210

loc_682206:
pop	ebp
pop	ebx

loc_682208:
pop	edi
pop	esi
retn	1Ch

loc_68220D:
mov	ecx, [esi+1CCh]
call	sub_6F8F00
test	al, al
jnz	short loc_682208
push	0
mov	ecx, esi
call	sub_6803A0
mov	ecx, [esi+1CCh]
call	sub_6F8D30
pop	edi
pop	esi
retn	1Ch
sub_682120 endp

align 10h



sub_682240 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	1
mov	esi, ecx
call	sub_6803A0
mov	eax, [esp+4+arg_8]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
push	eax
push	ecx
mov	ecx, [esi+1CCh]
push	edx
call	sub_6F9430
pop	esi
retn	0Ch
sub_682240 endp

align 10h



; int __stdcall	sub_682270(float, float)
sub_682270 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	0
mov	esi, ecx
call	sub_6803A0
fld	[esp+4+arg_4]
fld	ds:dbl_15FCE20
mov	ecx, [esi+1CCh]
fmul	st(1), st
sub	esp, 8
fxch	st(1)
fstp	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_4]
fstp	[esp+0Ch+var_8]
fmul	[esp+0Ch+arg_0]
fstp	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_4]
fstp	[esp+0Ch+var_C]
call	sub_6F8D50
mov	ecx, esi
call	sub_654EC0
pop	esi
retn	8
sub_682270 endp

align 10h



sub_6822C0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

; FUNCTION CHUNK AT 006F8D40 SIZE 00000009 BYTES

sub	esp, 8
push	ebx
push	esi
mov	esi, [esp+10h+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_6822D8
mov	eax, [esi+18h]
mov	ebx, [eax+74h]
jmp	short loc_6822F6

loc_6822D8:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_6823D0
mov	eax, [esi+8]
test	eax, eax
jz	loc_6823D0
lea	ebx, [eax-78h]

loc_6822F6:
test	ebx, ebx
jz	loc_6823D0
cmp	dword ptr [esi+1Ch], 0
jle	loc_6823E4
mov	ecx, [esi+18h]
push	edi
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	edi, eax
or	edi, 0FF000000h
cmp	dword ptr [esi+1Ch], 1
jle	loc_6823BA
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
and	edi, offset sub_FFFFFF
fld	ds:dbl_15FCCF8
fmul	st(1), st
fxch	st(1)
fdiv	ds:dbl_15FCBF8
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_6823D6
fst	[esp+14h+arg_0]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	short loc_68238B
fstp	st

loc_682387:
fld	[esp+14h+arg_0]

loc_68238B:
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fnstcw	word ptr [esp+14h+arg_0]
movzx	eax, word ptr [esp+14h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+14h+var_8], eax
fldcw	word ptr [esp+14h+var_8]
fistp	[esp+14h+var_8]
mov	eax, dword ptr [esp+14h+var_8]
shl	eax, 18h
or	edi, eax
fldcw	word ptr [esp+14h+arg_0]

loc_6823BA:
push	1
mov	ecx, ebx
call	sub_6803A0
mov	ecx, [ebx+1CCh]
push	edi
call	sub_6F93D0
pop	edi

loc_6823D0:
pop	esi
pop	ebx
add	esp, 8
retn

loc_6823D6:
fstp	st
fld	ds:flt_15FCD30
fstp	[esp+14h+arg_0]
jmp	short loc_682387

loc_6823E4:
push	1
mov	ecx, ebx
call	sub_6803A0
mov	ecx, [ebx+1CCh]
pop	esi
pop	ebx
add	esp, 8
jmp	loc_6F8D40
sub_6822C0 endp	; sp-analysis failed

align 10h



sub_682400 proc	near

var_84=	qword ptr -84h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 70h
cmp	dword ptr [esi+1Ch], 0
mov	[esp+70h+var_64], 0
jle	loc_682C04
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+80h+var_58]
push	ecx
mov	ecx, eax
call	sub_652F60
cmp	dword ptr [esi+1Ch], 1
jle	loc_682BED
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_682BED
mov	eax, [edi+10h]
mov	edx, [eax+8]
lea	ecx, [edi+10h]
call	edx
cmp	eax, 7
jnz	loc_682BED
cmp	dword ptr [esi+1Ch], 2
push	ebp
mov	ebp, edi
mov	[esp+78h+var_60], ebp
jle	loc_682BEC
mov	eax, [esi+18h]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_682BEC
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 7
jnz	loc_682BEC
cmp	dword ptr [esi+1Ch], 3
mov	[esp+78h+var_48], edi
jle	loc_682BEC
mov	ecx, [esi+18h]
push	ebx
push	ecx
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_682BEB
mov	edx, [ebx+10h]
mov	eax, [edx+8]
lea	ecx, [ebx+10h]
call	eax
cmp	eax, 7
jnz	loc_682BEB
cmp	dword ptr [esi+1Ch], 4
mov	[esp+7Ch+var_44], ebx
jle	loc_682BEB
mov	eax, [ebp+3Ch]
test	eax, eax
jle	loc_682BEB
cmp	eax, [edi+3Ch]
jnz	loc_682BEB
cmp	eax, [ebx+3Ch]
jnz	loc_682BEB
lea	ecx, [esp+7Ch+var_30]
call	sub_64E8E0
mov	eax, [esi+18h]
push	eax
push	4
mov	ecx, esi
mov	[esp+84h+var_40], 0
lea	ebp, [eax+78h]
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
mov	edx, [ebx+10h]
mov	eax, [edx+8]
lea	edi, [ebx+10h]
mov	ecx, edi
call	eax
cmp	eax, 0Fh
jnz	short loc_682595
mov	ecx, [esi+18h]
push	ecx
lea	edx, [esp+80h+var_18]
push	edx
mov	ecx, ebx
call	sub_6E0A10
fld	dword ptr [eax]
fstp	[esp+7Ch+var_30]
fld	dword ptr [eax+4]
fstp	[esp+7Ch+var_2C]
fld	dword ptr [eax+8]
fstp	[esp+7Ch+var_28]
fld	dword ptr [eax+0Ch]
fstp	[esp+7Ch+var_24]
fld	dword ptr [eax+10h]
fstp	[esp+7Ch+var_20]
fld	dword ptr [eax+14h]
fstp	[esp+7Ch+var_1C]
jmp	loc_682911

loc_682595:
lea	eax, [esp+7Ch+var_40]
push	eax
push	offset aMatrixtype ; "matrixType"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_6825DE
mov	ecx, [esi+18h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+88h+var_5C]
push	edx
lea	ecx, [esp+8Ch+var_40]
mov	ebx, 1
call	sub_652F60
push	offset aBox	; "box"
lea	ecx, [esp+80h+var_5C]
call	sub_67DA70
test	al, al
jz	short loc_6825E2
mov	byte ptr [esp+7Ch+var_70], bl
jmp	short loc_6825E7

loc_6825DE:
mov	bl, byte ptr [esp+7Ch+var_64]

loc_6825E2:
mov	byte ptr [esp+7Ch+var_70], 0

loc_6825E7:
test	bl, 1
jz	short loc_682602
mov	eax, [esp+7Ch+var_5C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_682602
call	sub_650DF0

loc_682602:
cmp	byte ptr [esp+7Ch+var_70], 0
mov	ecx, edi
jz	loc_6827F1
fldz
lea	eax, [esp+7Ch+var_40]
fst	[esp+7Ch+var_68]
push	eax
fst	[esp+80h+var_64]
push	offset asc_156C750 ; "x"
fld	ds:flt_15A0D44
push	ebp
fst	[esp+88h+var_70]
fstp	[esp+88h+var_6C]
fstp	[esp+88h+var_5C]
call	sub_64AEF0
test	al, al
jz	short loc_682650
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	[esp+7Ch+var_68]

loc_682650:
lea	edx, [esp+7Ch+var_40]
push	edx
push	offset aY_1	; "y"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_682677
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	[esp+7Ch+var_64]

loc_682677:
lea	ecx, [esp+7Ch+var_40]
push	ecx
push	offset aW_1	; "w"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_68269E
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	[esp+7Ch+var_70]

loc_68269E:
lea	eax, [esp+7Ch+var_40]
push	eax
push	offset asc_15F5898 ; "h"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_6826C5
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	[esp+7Ch+var_6C]

loc_6826C5:
lea	edx, [esp+7Ch+var_40]
push	edx
push	offset aR	; "r"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_6826EC
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	[esp+7Ch+var_5C]

loc_6826EC:
fld	[esp+7Ch+var_70]
fld	st
fld	ds:dbl_15FCC48
fmul	st(1), st
fld	[esp+7Ch+var_68]
faddp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+var_68]
fld	[esp+7Ch+var_6C]
fld	st
fmulp	st(2), st
fld	[esp+7Ch+var_64]
faddp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+var_64]
fld	ds:dbl_1436D88
fmul	st(2), st
fxch	st(2)
fstp	[esp+7Ch+var_70]
fmulp	st(1), st
fstp	[esp+7Ch+var_6C]
fld	[esp+7Ch+var_5C]
call	__CIcos
fstp	[esp+7Ch+var_54]
fld	[esp+7Ch+var_54]
fstp	dword ptr [esp+7Ch+var_50]
fld	[esp+7Ch+var_5C]
call	__CIsin
fstp	[esp+7Ch+var_54]
fld	[esp+7Ch+var_54]
lea	ecx, [esp+7Ch+var_18]
fstp	[esp+7Ch+var_54]
push	ecx
fld	dword ptr [esp+80h+var_50]
lea	ecx, [esp+80h+var_30]
fst	[esp+80h+var_18]
fld	[esp+80h+var_54]
fld	st
fchs
fstp	[esp+80h+var_14]
fldz
fst	[esp+80h+var_10]
fstp	[esp+80h+var_4]
fstp	[esp+80h+var_C]
fstp	[esp+80h+var_8]
call	sub_64EBB0
fld	[esp+7Ch+var_30]
fld	[esp+7Ch+var_70]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+var_30]
fld	[esp+7Ch+var_2C]
fmul	st, st(1)
fstp	[esp+7Ch+var_2C]
fmul	[esp+7Ch+var_28]
fstp	[esp+7Ch+var_28]
fld	[esp+7Ch+var_24]
fld	[esp+7Ch+var_6C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+var_24]
fld	[esp+7Ch+var_20]
fmul	st, st(1)
fstp	[esp+7Ch+var_20]
fmul	[esp+7Ch+var_1C]
fstp	[esp+7Ch+var_1C]
fld	[esp+7Ch+var_28]
fadd	[esp+7Ch+var_68]
fstp	[esp+7Ch+var_28]
fld	[esp+7Ch+var_1C]
fadd	[esp+7Ch+var_64]
fstp	[esp+7Ch+var_1C]
jmp	loc_682911

loc_6827F1:
lea	edx, [esp+7Ch+var_40]
push	edx
push	offset aA_2	; "a"
push	ebp
call	sub_64AEF0
test	al, al
jz	short loc_682824
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	dword ptr [esp+7Ch+var_50]
fld	dword ptr [esp+7Ch+var_50]
fmul	ds:dbl_1436D88
fstp	[esp+7Ch+var_30]

loc_682824:
lea	ecx, [esp+7Ch+var_40]
push	ecx
push	offset aD_18	; "d"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_682859
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	dword ptr [esp+7Ch+var_50]
fld	dword ptr [esp+7Ch+var_50]
fmul	ds:dbl_1436D88
fstp	[esp+7Ch+var_2C]

loc_682859:
lea	eax, [esp+7Ch+var_40]
push	eax
push	offset aG_0	; "g"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_682880
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	[esp+7Ch+var_28]

loc_682880:
lea	edx, [esp+7Ch+var_40]
push	edx
push	offset aB_1	; "b"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_6828B5
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	dword ptr [esp+7Ch+var_50]
fld	dword ptr [esp+7Ch+var_50]
fmul	ds:dbl_1436D88
fstp	[esp+7Ch+var_24]

loc_6828B5:
lea	ecx, [esp+7Ch+var_40]
push	ecx
push	offset aE_1	; "e"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_6828EA
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	dword ptr [esp+7Ch+var_50]
fld	dword ptr [esp+7Ch+var_50]
fmul	ds:dbl_1436D88
fstp	[esp+7Ch+var_20]

loc_6828EA:
lea	eax, [esp+7Ch+var_40]
push	eax
push	offset asc_15F5898 ; "h"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jz	short loc_682911
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+80h+var_40]
call	sub_653400
fstp	[esp+7Ch+var_1C]

loc_682911:
cmp	dword ptr [esi+1Ch], 5
fldz
fstp	[esp+7Ch+var_70]
mov	byte ptr [esp+7Ch+var_64], 0
jle	loc_682A13
mov	edi, [esi+18h]
push	5
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+88h+var_50]
push	edx
mov	ecx, eax
call	sub_652F60
cmp	dword ptr [esi+1Ch], 6
jle	loc_6829FD
mov	edi, [esi+18h]
push	6
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+88h+var_5C]
push	ecx
mov	ecx, eax
call	sub_652F60
push	offset aLinearrgb ; "linearRGB"
lea	ecx, [esp+80h+var_5C]
call	sub_67DA70
mov	byte ptr [esp+7Ch+var_64], al
mov	eax, [esp+7Ch+var_5C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_682992
call	sub_650DF0

loc_682992:
cmp	dword ptr [esi+1Ch], 7
jle	short loc_6829FD
mov	edx, [esi+18h]
push	edx
push	7
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+7Ch+var_70]
fld	[esp+7Ch+var_70]
sub	esp, 8
fstp	[esp+84h+var_84]
call	sub_64A5D0
test	al, al
jz	short loc_6829CB
fldz
fstp	[esp+7Ch+var_70]
jmp	short loc_6829FD

loc_6829CB:
fld	ds:flt_1431A30
fld	[esp+7Ch+var_70]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6829E6
fstp	st
fstp	[esp+7Ch+var_70]
jmp	short loc_6829FD

loc_6829E6:
fstp	st(1)
fld1
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_6829FB
fstp	[esp+7Ch+var_70]
jmp	short loc_6829FD

loc_6829FB:
fstp	st

loc_6829FD:
mov	eax, dword ptr [esp+7Ch+var_50]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_682A13
call	sub_650DF0

loc_682A13:		; "radial"
push	offset aRadial
lea	ecx, [esp+80h+var_58]
mov	[esp+80h+var_68], 10h
call	sub_67DA70
test	al, al
jz	short loc_682A4A
fldz
mov	[esp+7Ch+var_68], 12h
fcomp	[esp+7Ch+var_70]
fnstsw	ax
test	ah, 44h
jnp	short loc_682A4A
mov	[esp+7Ch+var_68], 13h

loc_682A4A:
push	14h
call	sub_7D2BC0
add	esp, 4
test	eax, eax
jz	loc_682BE2
mov	ecx, [esp+7Ch+var_60]
mov	edx, [ecx+3Ch]
mov	ecx, [esp+7Ch+var_64]
push	ecx
push	edx
mov	edx, [esp+84h+var_68]
push	edx
mov	ecx, eax
call	sub_6FAED0
mov	ebx, eax
test	ebx, ebx
jz	loc_682BE2
fld	[esp+7Ch+var_70]
mov	eax, [esp+7Ch+var_60]
xor	ebp, ebp
fstp	dword ptr [ebx+10h]
cmp	[eax+3Ch], ebp
jle	loc_682BC4

loc_682A95:
mov	ecx, [esp+7Ch+var_60]
mov	edx, [ecx+38h]
mov	eax, [esi+18h]
mov	ecx, [edx+ebp*4]
push	eax
call	sub_653750
mov	ecx, [esp+7Ch+var_48]
mov	edx, [ecx+38h]
mov	ecx, [edx+ebp*4]
mov	edi, eax
mov	eax, [esi+18h]
push	eax
or	edi, 0FF000000h
call	sub_653400
fstp	dword ptr [esp+7Ch+var_50]
fld	dword ptr [esp+7Ch+var_50]
and	edi, offset sub_FFFFFF
fld	ds:dbl_15FCCF8
fmul	st(1), st
fxch	st(1)
fdiv	ds:dbl_15FCBF8
fstp	dword ptr [esp+7Ch+var_50]
fld	dword ptr [esp+7Ch+var_50]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	loc_682C08
fst	[esp+7Ch+var_5C]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	short loc_682B0F
fstp	st

loc_682B0B:
fld	[esp+7Ch+var_5C]

loc_682B0F:
mov	edx, [esp+7Ch+var_44]
fnstcw	word ptr [esp+7Ch+var_70]
movzx	eax, word ptr [esp+7Ch+var_70]
fstp	[esp+7Ch+var_5C]
fld	[esp+7Ch+var_5C]
or	eax, 0C00h
mov	dword ptr [esp+7Ch+var_50], eax
mov	eax, [edx+38h]
fldcw	word ptr [esp+7Ch+var_50]
mov	edx, [esi+18h]
push	edx
fistp	[esp+80h+var_50]
mov	ecx, dword ptr [esp+80h+var_50]
shl	ecx, 18h
or	edi, ecx
mov	ecx, [eax+ebp*4]
fldcw	word ptr [esp+80h+var_70]
call	sub_653400
fstp	[esp+7Ch+var_64]
fld	[esp+7Ch+var_64]
fcom	ds:dbl_15FCCF8
fnstsw	ax
test	ah, 5
jp	loc_682C19
fst	[esp+7Ch+var_5C]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	short loc_682B81
fstp	st

loc_682B7D:
fld	[esp+7Ch+var_5C]

loc_682B81:
mov	eax, [ebx+0Ch]
fnstcw	word ptr [esp+7Ch+var_70]
lea	ecx, [eax+ebp*8]
fstp	[esp+7Ch+var_64]
movzx	eax, word ptr [esp+7Ch+var_70]
fld	[esp+7Ch+var_64]
or	eax, 0C00h
mov	dword ptr [esp+7Ch+var_50], eax
mov	eax, [esp+7Ch+var_60]
fldcw	word ptr [esp+7Ch+var_50]
inc	ebp
fistp	dword ptr [esp+7Ch+var_50]
mov	dl, byte ptr [esp+7Ch+var_50]
mov	[ecx], dl
mov	[ecx+4], edi
cmp	ebp, [eax+3Ch]
fldcw	word ptr [esp+7Ch+var_70]
jl	loc_682A95

loc_682BC4:
mov	edx, [esp+7Ch+var_68]
lea	ecx, [esp+7Ch+var_30]
push	ecx
mov	ecx, [esp+80h+arg_0]
push	ebx
push	edx
call	sub_6FA420
mov	ecx, ebx
call	sub_64A430

loc_682BE2:
lea	ecx, [esp+7Ch+var_40]
call	sub_652830

loc_682BEB:
pop	ebx

loc_682BEC:
pop	ebp

loc_682BED:
mov	eax, [esp+74h+var_58]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_682C04
call	sub_650DF0

loc_682C04:
add	esp, 70h
retn

loc_682C08:
fstp	st
fld	ds:flt_15FCD30
fstp	[esp+7Ch+var_5C]
jmp	loc_682B0B

loc_682C19:
fstp	st
fld	ds:flt_15FCD30
fstp	[esp+7Ch+var_5C]
jmp	loc_682B7D
sub_682400 endp

align 10h



sub_682C30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_682C45
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_682C5B

loc_682C45:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_682C80
mov	eax, [esi+8]
test	eax, eax
jz	short loc_682C80
lea	edi, [eax-78h]

loc_682C5B:
test	edi, edi
jz	short loc_682C80
push	1
mov	ecx, edi
call	sub_6803A0
mov	ecx, [edi+1CCh]
call	sub_6F9300
test	eax, eax
jz	short loc_682C80
push	eax
call	sub_682400
add	esp, 4

loc_682C80:
pop	edi
pop	esi
retn
sub_682C30 endp

align 10h



sub_682C90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_682CA5
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_682CBB

loc_682CA5:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_682CE0
mov	eax, [esi+8]
test	eax, eax
jz	short loc_682CE0
lea	edi, [eax-78h]

loc_682CBB:
test	edi, edi
jz	short loc_682CE0
push	1
mov	ecx, edi
call	sub_6803A0
mov	ecx, [edi+1CCh]
call	sub_6F9370
test	eax, eax
jz	short loc_682CE0
push	eax
call	sub_682400
add	esp, 4

loc_682CE0:
pop	edi
pop	esi
retn
sub_682C90 endp

align 10h



sub_682CF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_682D04
mov	eax, [esi+18h]
mov	esi, [eax+74h]
jmp	short loc_682D1A

loc_682D04:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_682D33
mov	eax, [esi+8]
test	eax, eax
jz	short loc_682D33
lea	esi, [eax-78h]

loc_682D1A:
test	esi, esi
jz	short loc_682D33
push	1
mov	ecx, esi
call	sub_6803A0
mov	ecx, [esi+1CCh]
pop	esi
jmp	loc_6F8D40

loc_682D33:
pop	esi
retn
sub_682CF0 endp

align 10h



sub_682D40 proc	near

var_4C=	dword ptr -4Ch
var_34=	dword ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

; FUNCTION CHUNK AT 006820A0 SIZE 00000071 BYTES

sub	esp, 24h
push	esi
mov	esi, [esp+30h+var_4]
mov	ecx, [esi+8]
push	edi
xor	edi, edi
cmp	ecx, edi
jnz	short loc_682D5E
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
mov	[esp+34h+var_1C], ecx
jmp	short loc_682D80

loc_682D5E:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_6830F5
mov	eax, [esi+8]
cmp	eax, edi
jz	loc_6830F5
add	eax, 0FFFFFF88h
mov	[esp+34h+var_1C], eax

loc_682D80:
mov	ecx, [esp+34h+var_1C]
cmp	ecx, edi
jz	loc_6830F5
cmp	[esi+1Ch], edi
jle	loc_6830FB
mov	ecx, [esi+18h]
push	ebp
push	ecx
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [esp+38h+var_10+4]
cmp	dword ptr [esi+1Ch], 1
fld	ds:flt_15AB038
fstp	dword ptr [esp+0Ch]
mov	ebp, 0FF000000h
mov	[esp+38h+var_10], 0
mov	[esp+10h], edi
mov	[esp+38h+var_20], edi
mov	[esp+38h+var_24], edi
jle	loc_6830C6
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebp, eax
or	ebp, 0FF000000h
cmp	dword ptr [esi+1Ch], 2
jle	loc_6830C6
mov	eax, [esi+18h]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+38h+var_4]
fld	[esp+38h+var_4]
and	ebp, offset sub_FFFFFF
fld	ds:dbl_15FCCF8
fmul	st(1), st
fxch	st(1)
fdiv	ds:dbl_15FCBF8
fstp	[esp+38h+var_4]
fld	[esp+38h+var_4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	loc_682EF1
fst	[esp+38h+var_4]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	short loc_682E5D
fstp	st

loc_682E59:
fld	[esp+38h+var_4]

loc_682E5D:
fstp	[esp+38h+var_4]
fld	[esp+38h+var_4]
fnstcw	word ptr [esp+38h+var_4]
movzx	eax, word ptr [esp+38h+var_4]
or	eax, 0C00h
mov	[esp+38h+var_18], eax
fldcw	word ptr [esp+38h+var_18]
fistp	qword ptr [esp+38h+var_18]
mov	ecx, [esp+38h+var_18]
shl	ecx, 18h
or	ebp, ecx
cmp	dword ptr [esi+1Ch], 3
fldcw	word ptr [esp+38h+var_4]
jle	loc_6830C6
mov	edx, [esi+18h]
push	edx
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
cmp	dword ptr [esi+1Ch], 4
mov	[esp+38h+var_10], al
jle	loc_6830C6
mov	edi, [esi+18h]
push	4
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+44h+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
push	offset aNone_0	; "none"
lea	ecx, [esp+3Ch+var_4]
call	sub_67DA70
test	al, al
jz	short loc_682F02
mov	dword ptr [esp+10h], 6
jmp	short loc_682F38

loc_682EF1:
fstp	st
fld	ds:flt_15FCD30
fstp	[esp+38h+var_4]
jmp	loc_682E59

loc_682F02:		; "vertical"
push	offset aVertical
lea	ecx, [esp+3Ch+var_4]
call	sub_67DA70
test	al, al
jz	short loc_682F1E
mov	dword ptr [esp+10h], 4
jmp	short loc_682F38

loc_682F1E:		; "horizontal"
push	offset aHorizontal
lea	ecx, [esp+3Ch+var_4]
call	sub_67DA70
test	al, al
jz	short loc_682F38
mov	dword ptr [esp+10h], 2

loc_682F38:
cmp	dword ptr [esi+1Ch], 5
jle	loc_6830B0
mov	edi, [esi+18h]
push	5
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+44h+var_18]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+38h+var_18]
inc	dword ptr [eax+8]
mov	edi, eax
mov	eax, [esp+38h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_682F7E
call	sub_650DF0

loc_682F7E:
mov	eax, [esp+38h+var_18]
mov	ecx, eax
add	eax, 8
mov	[esp+38h+var_4], edi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_682F97
call	sub_650DF0

loc_682F97:		; "none"
push	offset aNone_0
lea	ecx, [esp+3Ch+var_4]
call	sub_67DA70
test	al, al
jz	short loc_682FB3
mov	[esp+38h+var_20], 40h
jmp	short loc_682FCD

loc_682FB3:		; "square"
push	offset aSquare
lea	ecx, [esp+3Ch+var_4]
call	sub_67DA70
test	al, al
jz	short loc_682FCD
mov	[esp+38h+var_20], 80h

loc_682FCD:
cmp	dword ptr [esi+1Ch], 6
jle	loc_6830B0
mov	edi, [esi+18h]
push	6
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+44h+var_18]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+38h+var_18]
inc	dword ptr [eax+8]
mov	edi, eax
mov	eax, [esp+38h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_683013
call	sub_650DF0

loc_683013:
mov	eax, [esp+38h+var_18]
mov	ecx, eax
add	eax, 8
mov	[esp+38h+var_4], edi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_68302C
call	sub_650DF0

loc_68302C:		; "miter"
push	offset aMiter
lea	ecx, [esp+3Ch+var_4]
call	sub_67DA70
test	al, al
jz	short loc_683048
mov	[esp+38h+var_24], 20h
jmp	short loc_683062

loc_683048:		; "bevel"
push	offset aBevel
lea	ecx, [esp+3Ch+var_4]
call	sub_67DA70
test	al, al
jz	short loc_683062
mov	[esp+38h+var_24], 10h

loc_683062:
cmp	dword ptr [esi+1Ch], 7
jle	short loc_6830B0
mov	edx, [esi+18h]
push	edx
push	7
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [esp+0Ch]
fld1
fcom	dword ptr [esp+0Ch]
fnstsw	ax
test	ah, 41h
jnz	short loc_683093
fstp	dword ptr [esp+0Ch]
jmp	short loc_683095

loc_683093:
fstp	st

loc_683095:
fld	dword ptr [esp+0Ch]
fcomp	ds:dbl_15FCCF8
fnstsw	ax
test	ah, 41h
jnz	short loc_6830B0
fld	ds:flt_15FCD30
fstp	dword ptr [esp+0Ch]

loc_6830B0:
mov	eax, [esp+38h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6830C6
call	sub_650DF0

loc_6830C6:
fld	dword ptr [esp+0Ch]
mov	eax, [esp+38h+var_24]
mov	edx, [esp+10h]
push	ecx		; float
mov	ecx, [esp+3Ch+var_20]
fstp	dword ptr [esp+0]
fld	dword ptr [esp+3Ch+var_10+4]
push	eax		; int
mov	eax, dword ptr [esp+40h+var_10]
push	ecx		; int
push	edx		; int
push	eax		; char
push	ebp		; int
push	ecx		; float
mov	ecx, [esp+54h+var_1C]
fstp	dword ptr [esp+0]
call	sub_682120
pop	ebp

loc_6830F5:
pop	edi
pop	esi
add	esp, 24h
retn

loc_6830FB:
pop	edi
pop	esi
add	esp, 24h
jmp	loc_6820A0
sub_682D40 endp	; sp-analysis failed

align 10h



sub_683110 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+8]
push	edi
test	ecx, ecx
jnz	short loc_683126
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_68313C

loc_683126:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_68318F
mov	eax, [esi+8]
test	eax, eax
jz	short loc_68318F
lea	edi, [eax-78h]

loc_68313C:
test	edi, edi
jz	short loc_68318F
cmp	dword ptr [esi+1Ch], 2
jl	short loc_68318F
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+var_4]
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
sub	esp, 8
fstp	[esp+14h+var_10]
mov	ecx, edi
fld	[esp+14h+var_4]
fstp	[esp+14h+var_14]
call	sub_682270

loc_68318F:
pop	edi
pop	esi
pop	ecx
retn
sub_683110 endp

align 10h



sub_6831A0 proc	near
mov	eax, 0Bh
retn
sub_6831A0 endp

align 10h



sub_6831B0 proc	near
sub	ecx, 3Ch
jmp	sub_6832B0
sub_6831B0 endp

align 10h



sub_6831C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
xor	edi, edi
test	eax, eax
jz	short loc_6831FB
cmp	[eax+4], edi
jz	short loc_6831E6
mov	ecx, [eax+4]
mov	eax, [esp+8+arg_0]
mov	[eax], ecx
test	ecx, ecx
jz	short loc_683201
inc	dword ptr [ecx+4]
pop	edi
pop	esi
retn	4

loc_6831E6:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6831F9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6831F9:
mov	[esi], edi

loc_6831FB:
mov	eax, [esp+8+arg_0]
mov	[eax], edi

loc_683201:
pop	edi
pop	esi
retn	4
sub_6831C0 endp

align 10h



sub_683210 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_683225
mov	ecx, [eax]
mov	[esi+0Ch], ecx
jmp	short loc_68327F

loc_683225:
mov	ecx, [esi+8]
cmp	ecx, 32h
jnb	short loc_683242
mov	eax, [esi+4]
lea	edx, ds:0[ecx*8]
sub	edx, ecx
inc	ecx
lea	eax, [eax+edx*8]
mov	[esi+8], ecx
jmp	short loc_68327F

loc_683242:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+0Ch+var_4]
push	eax
push	0AF4h
mov	[esp+14h+var_4], 2
call	edx
mov	[eax+0AF0h], ebx
mov	ecx, [esi+4]
cmp	ecx, ebx
jz	short loc_683273
mov	[ecx+0AF0h], eax
jmp	short loc_683275

loc_683273:
mov	[esi], eax

loc_683275:
mov	[esi+4], eax
mov	dword ptr [esi+8], 1

loc_68327F:
cmp	eax, ebx
jz	short loc_6832AC
mov	dword ptr [eax+8], 0FFFFFFFFh
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	[eax+18h], ebx
mov	[eax+1Ch], ebx
mov	[eax+20h], ebx
mov	[eax+24h], ebx
mov	[eax+28h], ebx
mov	[eax+2Ch], ebx
mov	[eax+30h], ebx
mov	byte ptr [eax+34h], 0FFh
mov	[eax+35h], bl

loc_6832AC:
pop	esi
pop	ebx
pop	ecx
retn
sub_683210 endp




sub_6832B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+3Ch]
mov	dword ptr [esi], offset	off_1436E24
mov	dword ptr [esi+10h], offset off_1436DD0
mov	dword ptr [ecx], offset	off_1436FD0
call	sub_665A40
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6832E8
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6832E8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6832E8:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_683304
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_683304:
mov	eax, esi
pop	esi
retn	4
sub_6832B0 endp

align 10h



sub_683310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_683364
mov	edx, [edi]
sub	eax, esi
lea	ecx, [eax+esi]
shl	ecx, 4
push	ebx
lea	ebx, [ecx+edx-10h]
test	eax, eax
jbe	short loc_683345
push	ebp
mov	ebp, eax

loc_683335:
mov	ecx, ebx
call	sub_652830
sub	ebx, 10h
sub	ebp, 1
jnz	short loc_683335
pop	ebp

loc_683345:
mov	eax, [edi+8]
shr	eax, 1
pop	ebx
cmp	esi, eax
jnb	short loc_68337B
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_6C6020
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_683364:
cmp	esi, [edi+8]
jb	short loc_68337B
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6C6020

loc_68337B:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_683310 endp

align 10h



sub_683390 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6833CE
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7D30E0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_6833E7
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_68F9C0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6833CE:
cmp	esi, [edi+8]
jb	short loc_6833E7
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_68F9C0

loc_6833E7:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_683390 endp

align 10h



sub_6833F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_68342E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7D30E0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_683447
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_680850
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_68342E:
cmp	esi, [edi+8]
jb	short loc_683447
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_680850

loc_683447:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6833F0 endp

align 10h



sub_683450 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 13h
and	al, 1
mov	byte ptr [esp+8+var_4],	al
mov	ecx, [esp+8+var_4]
push	ecx
mov	ecx, esi
call	sub_680DB0
cmp	eax, 0FFFFFFFFh
jz	short loc_68348A
cmp	eax, 1
jnz	short loc_683496
mov	edx, [esp+8+arg_0]
push	edx
mov	ecx, esi
call	sub_655A50
pop	esi
pop	ecx
retn	4

loc_68348A:
mov	eax, [esp+8+arg_0]
push	eax
mov	ecx, esi
call	sub_655B00

loc_683496:
pop	esi
pop	ecx
retn	4
sub_683450 endp

align 10h



sub_6834A0 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+40h]
call	sub_67BFB0
lea	ecx, [edi+4Ch]
call	sub_67BFB0
mov	eax, [edi+58h]
test	eax, eax
jz	short loc_683502
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_683500
lea	ebx, [ebx+0]

loc_6834D0:
mov	eax, [edi+58h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6834FB
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6834FB
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6834FB:
inc	esi
cmp	esi, ebx
jb	short loc_6834D0

loc_683500:
pop	esi
pop	ebx

loc_683502:
pop	edi
retn
sub_6834A0 endp

align 10h



sub_683510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx]
push	ebp
mov	ebp, [esp+4+arg_4]
mov	edx, ebp
shl	edx, 4
cmp	dword ptr [edx+ecx+8], 0FFFFFFFEh
push	esi
lea	esi, [edx+ecx+8]
mov	eax, ebp
mov	[esp+8+arg_4], ecx
jz	short loc_6835A1
cmp	[esi+4], ebp
jnz	short loc_6835A1
push	edi
mov	edi, [esp+0Ch+arg_0]
push	ebx
lea	esp, [esp+0]

loc_683540:
cmp	[esi+4], ebp
jnz	short loc_683585
mov	ecx, [edi]
mov	edx, [ecx]
mov	ecx, [esi+8]
and	edx, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	edx, 8
add	ecx, 8

loc_683558:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_683578
test	bl, bl
jz	short loc_683574
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_683578
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_683558

loc_683574:
xor	ecx, ecx
jmp	short loc_68357D

loc_683578:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_68357D:
test	ecx, ecx
jz	short loc_68359A
mov	ecx, [esp+10h+arg_4]

loc_683585:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_683597
mov	edx, eax
shl	edx, 4
lea	esi, [edx+ecx+8]
jmp	short loc_683540

loc_683597:
or	eax, 0FFFFFFFFh

loc_68359A:
pop	ebx
pop	edi
pop	esi
pop	ebp
retn	8

loc_6835A1:
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8
sub_683510 endp

align 10h



sub_6835B0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+34h]
xor	esi, esi
test	eax, eax
jz	short loc_6835D4
cmp	[eax+4], esi
jz	short loc_6835EC
mov	esi, [eax+4]
test	esi, esi
jz	short loc_6835D4
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax

loc_6835D4:
mov	edi, [esp+8+arg_0]
mov	[edi], esi
test	esi, esi
jz	short loc_6835E5
mov	ecx, esi
call	sub_64A400

loc_6835E5:
mov	eax, edi
pop	edi
pop	esi
retn	4

loc_6835EC:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6835FF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6835FF:
mov	[edi+34h], esi
jmp	short loc_6835D4
sub_6835B0 endp

align 10h



sub_683610 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_68365D
cmp	[eax+4], edi
jz	short loc_683647
mov	esi, [eax+4]
cmp	esi, edi
jz	short loc_683642
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax
mov	ecx, esi
call	sub_64A400
mov	ecx, esi
call	sub_64A400

loc_683642:
pop	edi
mov	eax, esi
pop	esi
retn

loc_683647:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_68365A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_68365A:
mov	[esi+34h], edi

loc_68365D:
mov	eax, edi
pop	edi
pop	esi
retn
sub_683610 endp

align 10h



sub_683670 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+14h]
xor	esi, esi
test	eax, eax
jz	short loc_68369C
cmp	[eax+4], esi
jz	short loc_6836B6
mov	esi, [eax+4]
test	esi, esi
jz	short loc_68369C
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax
mov	ecx, esi
call	sub_64A400

loc_68369C:
cmp	esi, [esp+0Ch+arg_0]
setz	bl
test	esi, esi
jz	short loc_6836AE
mov	ecx, esi
call	sub_64A400

loc_6836AE:
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	4

loc_6836B6:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6836C9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6836C9:
mov	[edi+14h], esi
jmp	short loc_68369C
sub_683670 endp

align 10h



sub_6836D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
movzx	eax, byte ptr [edi+esi+27F4h]
imul	eax, 34h
lea	ecx, [eax+esi+24B0h]
push	edx
call	sub_683670
test	al, al
jz	short loc_683717
movzx	eax, byte ptr [edi+esi+27F4h]
imul	eax, 34h
cmp	byte ptr [eax+esi+24E0h], 0
jz	short loc_683717
pop	edi
mov	eax, 1
pop	esi
retn	8

loc_683717:
pop	edi
xor	eax, eax
pop	esi
retn	8
sub_6836D0 endp

align 10h



sub_683720 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	esi
mov	esi, ecx
mov	al, [esi+1E0h]
test	al, 8
jnz	loc_6837C5
push	ebx
push	edi
or	al, 8
xor	ebx, ebx
push	ebx
mov	[esi+1E0h], al
call	sub_680C30
xor	eax, eax
mov	word ptr [esp+1Ch+var_8], ax
mov	eax, [esi+0BCh]
push	5
lea	ecx, [eax+2408h]
mov	[esp+20h+var_10], 1
mov	[esp+20h+var_C], ebx
mov	byte ptr [esp+20h+var_8+2], bl
mov	byte ptr [esp+20h+var_4], bl
mov	byte ptr [esp+20h+var_4+1], bl
mov	byte ptr [esp+20h+var_8+3], 0FFh
call	sub_696220
mov	edi, eax
mov	dword ptr [edi+4], 2
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_683795
call	sub_64A400

loc_683795:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_6837A4
call	sub_64A400

loc_6837A4:
mov	ecx, [esp+1Ch+var_10]
mov	edx, [esp+1Ch+var_C]
mov	eax, [esp+1Ch+var_8]
mov	[edi+0Ch], ebx
mov	[edi+10h], ecx
mov	ecx, [esp+1Ch+var_4]
mov	[edi+14h], edx
mov	[edi+18h], eax
mov	[edi+1Ch], ecx
pop	edi
pop	ebx

loc_6837C5:
pop	esi
add	esp, 10h
retn
sub_683720 endp

align 10h



sub_6837D0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 54h
fldz
push	ebx
push	ebp
push	esi
mov	esi, [esp+60h+arg_0]
fst	dword ptr [esi]
push	edi
fst	dword ptr [esi+4]
mov	edi, ecx
mov	ebx, [edi+0C8h]
fst	dword ptr [esi+8]
fst	dword ptr [esi+0Ch]
lea	ecx, [esp+64h+var_18]
fst	[esp+64h+var_48]
mov	[esp+64h+var_54], edi
fst	[esp+64h+var_44]
mov	[esp+64h+var_4C], ebx
fst	[esp+64h+var_40]
fstp	[esp+64h+var_3C]
call	sub_64E8E0
xor	ebp, ebp
test	ebx, ebx
mov	ebx, [esp+64h+arg_4]
jbe	loc_683999
nop

loc_683820:
mov	eax, [edi+0C4h]
mov	edi, [eax+ebp*4]
test	edi, edi
jz	loc_68398A
fld	dword ptr [ebx]
lea	ecx, [edi+44h]
fstp	[esp+64h+var_18]
push	ecx
fld	dword ptr [ebx+4]
lea	ecx, [esp+68h+var_18]
fstp	[esp+68h+var_14]
fld	dword ptr [ebx+8]
fstp	[esp+68h+var_10]
fld	dword ptr [ebx+0Ch]
fstp	[esp+68h+var_C]
fld	dword ptr [ebx+10h]
fstp	[esp+68h+var_8]
fld	dword ptr [ebx+14h]
fstp	[esp+68h+var_4]
call	sub_64EAF0
mov	edx, [edi]
mov	edx, [edx+34h]
lea	eax, [esp+64h+var_18]
push	eax
lea	ecx, [esp+68h+var_28]
push	ecx
mov	ecx, edi
call	edx
fld	dword ptr [eax+4]
fstp	[esp+64h+arg_0]
fld	dword ptr [eax+8]
fstp	[esp+64h+arg_4]
fld	dword ptr [eax+0Ch]
fstp	[esp+64h+var_50]
fld	dword ptr [eax]
fstp	[esp+64h+var_48]
fld	[esp+64h+arg_0]
fst	[esp+64h+var_44]
fld	[esp+64h+arg_4]
fst	[esp+64h+var_40]
fld	[esp+64h+var_50]
fst	[esp+64h+var_3C]
fld	[esp+64h+var_48]
fcom	st(2)
fnstsw	ax
test	ah, 1
jz	loc_68397A
fxch	st(3)
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	loc_683982
fld	dword ptr [esi]
fld	dword ptr [esi+8]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683969
fld	dword ptr [esi+4]
fld	dword ptr [esi+0Ch]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_683969
fld	dword ptr [esi]
fcomp	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_6838FD
fxch	st(3)
jmp	short loc_683901

loc_6838FD:
fstp	st(3)
fld	dword ptr [esi]

loc_683901:
fstp	[esp+64h+var_38]
fld	dword ptr [esi+8]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_683918
fstp	st(1)
fld	dword ptr [esi+8]
jmp	short loc_68391A

loc_683918:
fxch	st(1)

loc_68391A:
fstp	[esp+64h+var_30]
fld	dword ptr [esi+4]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_68392E
fxch	st(1)
jmp	short loc_683933

loc_68392E:
fstp	st(1)
fld	dword ptr [esi+4]

loc_683933:
fstp	[esp+64h+var_34]
fld	dword ptr [esi+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_683948
fstp	st
fld	dword ptr [esi+0Ch]

loc_683948:
fstp	[esp+64h+var_2C]
fld	[esp+64h+var_38]
fstp	dword ptr [esi]
fld	[esp+64h+var_34]
fstp	dword ptr [esi+4]
fld	[esp+64h+var_30]
fstp	dword ptr [esi+8]
fld	[esp+64h+var_2C]
fstp	dword ptr [esi+0Ch]
jmp	short loc_68398A

loc_683969:
fxch	st(3)
fstp	dword ptr [esi]
fxch	st(2)
fstp	dword ptr [esi+4]
fstp	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
jmp	short loc_68398A

loc_68397A:
fstp	st(2)
fstp	st(2)
fstp	st(1)
jmp	short loc_683988

loc_683982:
fstp	st(2)
fstp	st(1)
fstp	st

loc_683988:
fstp	st

loc_68398A:
mov	edi, [esp+64h+var_54]
inc	ebp
cmp	ebp, [esp+64h+var_4C]
jb	loc_683820

loc_683999:
mov	ecx, [edi+1CCh]
test	ecx, ecx
jz	loc_683ACF
lea	eax, [esp+64h+var_48]
push	eax
call	sub_6F9520
fld	[esp+64h+var_48]
fld	[esp+64h+var_40]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683ACF
fld	[esp+64h+var_44]
fld	[esp+64h+var_3C]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683ACF
fldz
lea	ecx, [esp+64h+var_48]
fst	[esp+64h+var_38]
push	ecx
fst	[esp+68h+var_34]
lea	edx, [esp+68h+var_38]
fst	[esp+68h+var_30]
push	edx
mov	ecx, ebx
fstp	[esp+6Ch+var_2C]
call	sub_64EF10
fld	dword ptr [esi]
fld	dword ptr [esi+8]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683AB4
fld	dword ptr [esi+4]
fld	dword ptr [esi+0Ch]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683AB4
fld	dword ptr [esi]
fld	[esp+64h+var_38]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_683A38
fstp	st
fld	dword ptr [esi]

loc_683A38:
fstp	[esp+64h+var_48]
fld	dword ptr [esi+8]
fld	[esp+64h+var_30]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_683A53
fstp	st
fld	dword ptr [esi+8]

loc_683A53:
fstp	[esp+64h+var_40]
fld	dword ptr [esi+4]
fld	[esp+64h+var_34]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_683A6E
fstp	st
fld	dword ptr [esi+4]

loc_683A6E:
fstp	[esp+64h+var_44]
fld	dword ptr [esi+0Ch]
fld	[esp+64h+var_2C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_683A89
fstp	st
fld	dword ptr [esi+0Ch]

loc_683A89:
fstp	[esp+64h+var_3C]
pop	edi
fld	[esp+60h+var_48]
mov	eax, esi
fstp	dword ptr [esi]
fld	[esp+60h+var_44]
fstp	dword ptr [esi+4]
fld	[esp+60h+var_40]
fstp	dword ptr [esi+8]
fld	[esp+60h+var_3C]
fstp	dword ptr [esi+0Ch]
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn	8

loc_683AB4:
fld	[esp+64h+var_38]
fstp	dword ptr [esi]
fld	[esp+64h+var_34]
fstp	dword ptr [esi+4]
fld	[esp+64h+var_30]
fstp	dword ptr [esi+8]
fld	[esp+64h+var_2C]
fstp	dword ptr [esi+0Ch]

loc_683ACF:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn	8
sub_6837D0 endp

align 10h



; int __stdcall	sub_683AE0(int,	int, float)
sub_683AE0 proc	near

var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_90=	byte ptr -90h
var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 108h
fldz
push	ebx
mov	ebx, [esp+10Ch+arg_0]
fst	dword ptr [ebx]
fst	dword ptr [ebx+4]
push	esi
fst	dword ptr [ebx+8]
mov	esi, ecx
fst	dword ptr [ebx+0Ch]
push	edi
mov	edi, [esi+0C8h]
fst	[esp+114h+var_108]
fst	[esp+114h+var_104]
lea	ecx, [esp+114h+var_D0] ; void *
fst	[esp+114h+var_100]
mov	[esp+114h+var_E8], esi
fstp	[esp+114h+var_FC]
mov	[esp+114h+var_E0], edi
call	sub_64F7C0
xor	eax, eax
mov	[esp+114h+var_E4], eax
test	edi, edi
jbe	loc_683CD2
push	ebp

loc_683B35:
mov	ecx, [esi+0C4h]
mov	ebp, [ecx+eax*4]
test	ebp, ebp
jz	loc_683CBA
mov	esi, [esp+118h+arg_4]
mov	ecx, 10h
lea	edi, [esp+118h+var_D0]
lea	edx, [esp+118h+var_40]
rep movsd
push	edx
mov	ecx, ebp
call	sub_654C20
mov	ecx, 10h
lea	esi, [esp+118h+var_D0]
lea	edi, [esp+118h+var_80]
rep movsd
lea	ecx, [esp+118h+var_80]
push	ecx
push	eax
lea	ecx, [esp+120h+var_D0]
call	sub_64F7E0
mov	eax, [esp+118h+arg_8]
mov	edx, [ebp+0]
mov	edx, [edx+3Ch]
push	eax
lea	ecx, [esp+11Ch+var_D0]
push	ecx
lea	eax, [esp+120h+var_90]
push	eax
mov	ecx, ebp
call	edx
fld	dword ptr [eax+4]
fstp	[esp+118h+var_D4]
fld	dword ptr [eax+8]
fstp	[esp+118h+var_DC]
fld	dword ptr [eax+0Ch]
fstp	[esp+118h+var_D8]
fld	dword ptr [eax]
fstp	[esp+118h+var_108]
fld	[esp+118h+var_D4]
fst	[esp+118h+var_104]
fld	[esp+118h+var_DC]
fst	[esp+118h+var_100]
fld	[esp+118h+var_D8]
fst	[esp+118h+var_FC]
fld	[esp+118h+var_108]
fcom	st(2)
fnstsw	ax
test	ah, 1
jz	loc_683CAA
fxch	st(3)
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	loc_683CB2
fld	dword ptr [ebx]
fld	dword ptr [ebx+8]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683C99
fld	dword ptr [ebx+4]
fld	dword ptr [ebx+0Ch]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_683C99
fld	dword ptr [ebx]
fcomp	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_683C2D
fxch	st(3)
jmp	short loc_683C31

loc_683C2D:
fstp	st(3)
fld	dword ptr [ebx]

loc_683C31:
fstp	[esp+118h+var_F8]
fld	dword ptr [ebx+8]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_683C48
fstp	st(1)
fld	dword ptr [ebx+8]
jmp	short loc_683C4A

loc_683C48:
fxch	st(1)

loc_683C4A:
fstp	[esp+118h+var_F0]
fld	dword ptr [ebx+4]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_683C5E
fxch	st(1)
jmp	short loc_683C63

loc_683C5E:
fstp	st(1)
fld	dword ptr [ebx+4]

loc_683C63:
fstp	[esp+118h+var_F4]
fld	dword ptr [ebx+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_683C78
fstp	st
fld	dword ptr [ebx+0Ch]

loc_683C78:
fstp	[esp+118h+var_EC]
fld	[esp+118h+var_F8]
fstp	dword ptr [ebx]
fld	[esp+118h+var_F4]
fstp	dword ptr [ebx+4]
fld	[esp+118h+var_F0]
fstp	dword ptr [ebx+8]
fld	[esp+118h+var_EC]
fstp	dword ptr [ebx+0Ch]
jmp	short loc_683CBA

loc_683C99:
fxch	st(3)
fstp	dword ptr [ebx]
fxch	st(2)
fstp	dword ptr [ebx+4]
fstp	dword ptr [ebx+8]
fstp	dword ptr [ebx+0Ch]
jmp	short loc_683CBA

loc_683CAA:
fstp	st(2)
fstp	st(2)
fstp	st(1)
jmp	short loc_683CB8

loc_683CB2:
fstp	st(2)
fstp	st(1)
fstp	st

loc_683CB8:
fstp	st

loc_683CBA:
mov	eax, [esp+118h+var_E4]
mov	esi, [esp+118h+var_E8]
inc	eax
mov	[esp+118h+var_E4], eax
cmp	eax, [esp+118h+var_E0]
jb	loc_683B35
pop	ebp

loc_683CD2:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	loc_683E17
lea	eax, [esp+114h+var_108]
push	eax
call	sub_6F9520
fld	[esp+114h+var_108]
fld	[esp+114h+var_100]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683E17
fld	[esp+114h+var_104]
fld	[esp+114h+var_FC]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683E17
fldz
mov	ecx, [esp+114h+arg_8]
push	ecx		; float
fst	[esp+118h+var_F8]
mov	ecx, [esp+118h+arg_4]
fst	[esp+118h+var_F4]
lea	edx, [esp+118h+var_108]
fst	[esp+118h+var_F0]
push	edx		; int
fstp	[esp+11Ch+var_EC]
lea	eax, [esp+11Ch+var_F8]
push	eax		; int
call	sub_650330
fld	dword ptr [ebx]
fld	dword ptr [ebx+8]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683DFC
fld	dword ptr [ebx+4]
fld	dword ptr [ebx+0Ch]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683DFC
fld	dword ptr [ebx]
fld	[esp+114h+var_F8]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_683D7E
fstp	st
fld	dword ptr [ebx]

loc_683D7E:
fstp	[esp+114h+var_108]
fld	dword ptr [ebx+8]
fld	[esp+114h+var_F0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_683D99
fstp	st
fld	dword ptr [ebx+8]

loc_683D99:
fstp	[esp+114h+var_100]
fld	dword ptr [ebx+4]
fld	[esp+114h+var_F4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_683DB4
fstp	st
fld	dword ptr [ebx+4]

loc_683DB4:
fstp	[esp+114h+var_104]
fld	dword ptr [ebx+0Ch]
fld	[esp+114h+var_EC]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_683DCF
fstp	st
fld	dword ptr [ebx+0Ch]

loc_683DCF:
fstp	[esp+114h+var_FC]
pop	edi
fld	[esp+110h+var_108]
pop	esi
fstp	dword ptr [ebx]
mov	eax, ebx
fld	[esp+10Ch+var_104]
fstp	dword ptr [ebx+4]
fld	[esp+10Ch+var_100]
fstp	dword ptr [ebx+8]
fld	[esp+10Ch+var_FC]
fstp	dword ptr [ebx+0Ch]
pop	ebx
add	esp, 108h
retn	0Ch

loc_683DFC:
fld	[esp+114h+var_F8]
fstp	dword ptr [ebx]
fld	[esp+114h+var_F4]
fstp	dword ptr [ebx+4]
fld	[esp+114h+var_F0]
fstp	dword ptr [ebx+8]
fld	[esp+114h+var_EC]
fstp	dword ptr [ebx+0Ch]

loc_683E17:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 108h
retn	0Ch
sub_683AE0 endp

align 10h



sub_683E30 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 50h
fldz
push	ebx
push	ebp
push	esi
mov	esi, [esp+5Ch+arg_0]
push	edi
fst	dword ptr [esi]
mov	edi, ecx
fst	dword ptr [esi+4]
mov	ebx, [edi+0C8h]
fst	dword ptr [esi+8]
lea	ecx, [esp+60h+var_18]
fstp	dword ptr [esi+0Ch]
mov	[esp+60h+var_50], edi
mov	[esp+60h+var_4C], ebx
call	sub_64E8E0
xor	ebp, ebp
test	ebx, ebx
jbe	loc_683FD2
mov	ebx, [esp+60h+arg_4]
jmp	short loc_683E75

loc_683E71:
mov	edi, [esp+60h+var_50]

loc_683E75:
mov	eax, [edi+0C4h]
mov	edi, [eax+ebp*4]
test	edi, edi
jz	loc_683FC7
fld	dword ptr [ebx]
lea	ecx, [edi+44h]
fstp	[esp+60h+var_18]
push	ecx
fld	dword ptr [ebx+4]
lea	ecx, [esp+64h+var_18]
fstp	[esp+64h+var_14]
fld	dword ptr [ebx+8]
fstp	[esp+64h+var_10]
fld	dword ptr [ebx+0Ch]
fstp	[esp+64h+var_C]
fld	dword ptr [ebx+10h]
fstp	[esp+64h+var_8]
fld	dword ptr [ebx+14h]
fstp	[esp+64h+var_4]
call	sub_64EAF0
mov	edx, [edi]
mov	edx, [edx+40h]
lea	eax, [esp+60h+var_18]
push	eax
lea	ecx, [esp+64h+var_28]
push	ecx
mov	ecx, edi
call	edx
fld	dword ptr [eax]
fstp	[esp+60h+var_38]
fld	dword ptr [eax+4]
fstp	[esp+60h+var_34]
fld	dword ptr [eax+8]
fstp	[esp+60h+var_30]
fld	dword ptr [eax+0Ch]
fstp	[esp+60h+var_2C]
fld	[esp+60h+var_38]
fld	[esp+60h+var_30]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_683FBB
fld	[esp+60h+var_34]
fld	[esp+60h+var_2C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_683FBF
fld	dword ptr [esi]
fld	dword ptr [esi+8]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_683FAC
fld	dword ptr [esi+4]
fld	dword ptr [esi+0Ch]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_683FAC
fld	dword ptr [esi]
fcomp	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_683F44
fxch	st(3)
jmp	short loc_683F48

loc_683F44:
fstp	st(3)
fld	dword ptr [esi]

loc_683F48:
fstp	[esp+60h+var_48]
fld	dword ptr [esi+8]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_683F5F
fstp	st(1)
fld	dword ptr [esi+8]
jmp	short loc_683F61

loc_683F5F:
fxch	st(1)

loc_683F61:
fstp	[esp+60h+var_40]
fld	dword ptr [esi+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_683F76
fstp	st
fld	dword ptr [esi+4]

loc_683F76:
fstp	[esp+60h+var_44]
fld	dword ptr [esi+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_683F8B
fstp	st
fld	dword ptr [esi+0Ch]

loc_683F8B:
fstp	[esp+60h+var_3C]
fld	[esp+60h+var_48]
fstp	dword ptr [esi]
fld	[esp+60h+var_44]
fstp	dword ptr [esi+4]
fld	[esp+60h+var_40]
fstp	dword ptr [esi+8]
fld	[esp+60h+var_3C]
fstp	dword ptr [esi+0Ch]
jmp	short loc_683FC7

loc_683FAC:
fxch	st(3)
fstp	dword ptr [esi]
fstp	dword ptr [esi+4]
fstp	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
jmp	short loc_683FC7

loc_683FBB:
fstp	st(1)
jmp	short loc_683FC5

loc_683FBF:
fstp	st(3)
fstp	st
fstp	st

loc_683FC5:
fstp	st

loc_683FC7:
inc	ebp
cmp	ebp, [esp+60h+var_4C]
jb	loc_683E71

loc_683FD2:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 50h
retn	8
sub_683E30 endp

align 10h



sub_683FE0 proc	near
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+0C4h]
push	0
mov	ecx, edi
call	sub_65C7F0
mov	al, [esi+1E0h]
and	al, 0FDh
or	al, 1
push	0
mov	ecx, esi
mov	dword ptr [esi+0D8h], 0
mov	byte ptr [esi+0A9h], 0
mov	[esi+1E0h], al
mov	dword ptr [esi+0D4h], 0
call	sub_680C30
mov	ecx, edi
call	sub_65D220
mov	esi, [esi+0BCh]
or	dword ptr [esi+2474h], 400h
add	esi, 2474h
pop	edi
pop	esi
retn
sub_683FE0 endp

align 10h



sub_684050 proc	near

var_10=	dword ptr -10h
var_C= word ptr	-0Ch
var_8= byte ptr	-8
var_6= byte ptr	-6
var_5= word ptr	-5
var_3= byte ptr	-3
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
cmp	dword ptr [edi], 40h
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+80h]
jnz	loc_6841AC
push	ebx
push	ebp
push	edi
call	edx
mov	ebp, [esp+20h+arg_4]
xor	ebx, ebx
test	dword ptr [ebp+0], 10000h
mov	byte ptr [esp+20h+arg_0], al
jnz	short loc_6840D0
mov	ecx, edi
call	sub_668250
cmp	eax, ebx
jz	short loc_6840D0
mov	word ptr [esp+20h+var_8], ax
mov	eax, [esi]
mov	edx, [eax+80h]
lea	ecx, [esp+20h+var_10]
push	ecx
mov	ecx, esi
mov	[esp+24h+var_10], 20000h
mov	dword ptr [esp+24h+var_C], ebx
mov	[esp+24h+var_6], bl
mov	byte ptr [esp+24h+var_5+1], bl
mov	[esp+24h+var_3], bl
mov	byte ptr [esp+24h+var_5], bl
call	edx
mov	byte ptr [esp+20h+arg_0], al
cmp	al, bl
jz	short loc_6840D0
or	dword ptr [ebp+0], 10000h

loc_6840D0:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ebp, eax
movsx	eax, byte ptr [edi+0Bh]
push	eax
push	esi
mov	ecx, ebp
call	sub_6836D0
test	al, al
jz	loc_68419E
movzx	eax, word ptr [edi+8]
cmp	ax, 0Dh
jz	short loc_684104
cmp	ax, 20h
jnz	loc_68419E

loc_684104:
mov	edx, [esi]
mov	eax, [edx+0D8h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_68412A
mov	eax, [ebp+2474h]
shr	eax, 1Ah
and	eax, 3
cmp	eax, 3
jz	short loc_68419E
cmp	eax, 1
jnz	short loc_68419E

loc_68412A:
mov	dl, [edi+0Bh]
mov	eax, [esi]
mov	ecx, 0Dh
mov	word ptr [esp+20h+var_8], cx
lea	ecx, [esp+20h+var_10]
mov	byte ptr [esp+20h+var_5], dl
mov	edx, [eax+80h]
push	ecx
mov	ecx, esi
mov	[esp+24h+var_10], 400h
mov	dword ptr [esp+24h+var_C], ebx
mov	[esp+24h+var_6], bl
mov	byte ptr [esp+24h+var_5+1], bl
mov	[esp+24h+var_3], bl
call	edx
mov	cl, [edi+0Bh]
mov	edx, [esi]
mov	edx, [edx+80h]
mov	eax, 0Dh
mov	word ptr [esp+20h+var_8], ax
lea	eax, [esp+20h+var_10]
mov	byte ptr [esp+20h+var_5], cl
push	eax
mov	ecx, esi
mov	[esp+24h+var_10], 800h
mov	dword ptr [esp+24h+var_C], ebx
mov	[esp+24h+var_6], bl
mov	byte ptr [esp+24h+var_5+1], bl
mov	[esp+24h+var_3], bl
call	edx

loc_68419E:
mov	al, byte ptr [esp+20h+arg_0]
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 10h
retn	8

loc_6841AC:
push	edi
call	edx
pop	edi
pop	esi
add	esp, 10h
retn	8
sub_684050 endp

align 10h



sub_6841C0 proc	near

var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 24h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
test	byte ptr [edi+1E0h], 40h
jz	short loc_6841DA
mov	eax, [edi+0B8h]
jmp	short loc_6841DC

loc_6841DA:
xor	eax, eax

loc_6841DC:
mov	ebp, [esp+34h+arg_0]
test	eax, eax
jz	short loc_684230
mov	cl, [eax+34h]
test	cl, 7
jz	short loc_684230
mov	eax, [ebp+0]
cmp	eax, 2000h
ja	loc_6843C9
jz	loc_6843DF
cmp	eax, 400h
jz	loc_6843B4
cmp	eax, 800h
jz	loc_6843DF
cmp	eax, 1000h
jnz	short loc_684230

loc_68421D:
test	cl, 1
jz	short loc_684230
push	0
push	offset a_up	; "_up"

loc_684229:
mov	ecx, edi
call	sub_680CC0

loc_684230:
push	ebp
mov	ecx, edi
call	sub_658330
test	al, al
jnz	loc_684338
mov	eax, [edi]
mov	edx, [eax+70h]
mov	ecx, edi
call	edx
add	eax, 78h
push	eax
lea	eax, [esp+38h+var_24]
push	eax
mov	ecx, ebp
call	sub_668230
mov	eax, [esp+34h+var_24]
cmp	dword ptr [eax+10h], 0
jz	loc_684401
mov	eax, [edi+1C4h]
mov	byte ptr [esp+34h+arg_0], 0
mov	[esp+34h+var_10], 0
test	eax, eax
jnz	short loc_684285
mov	eax, [edi+80h]
test	eax, eax
jz	short loc_6842AA

loc_684285:
mov	edx, [eax+10h]
mov	edx, [edx+2Ch]
lea	ecx, [eax+10h]
lea	eax, [esp+34h+var_10]
push	eax
lea	eax, [esp+38h+var_24]
push	eax
lea	eax, [edi+160h]
push	eax
call	edx
test	al, al
jz	short loc_6842AA
mov	byte ptr [esp+34h+arg_0], 1

loc_6842AA:
mov	eax, [ebp+0]
cmp	eax, 40h
jz	short loc_6842B9
cmp	eax, 80h
jnz	short loc_68430E

loc_6842B9:
cmp	byte ptr [edi+164h], 6
jb	loc_6843F4
mov	eax, [edi]
mov	edx, [eax+54h]
movsx	ebx, byte ptr [ebp+0Bh]
mov	ecx, edi
call	edx
mov	esi, eax
movzx	eax, byte ptr [ebx+esi+27F4h]
imul	eax, 34h
lea	ecx, [eax+esi+24B0h]
push	edi
call	sub_683670
test	al, al
jz	loc_6843F4
movzx	ecx, byte ptr [ebx+esi+27F4h]
imul	ecx, 34h
cmp	byte ptr [ecx+esi+24E0h], 0
jz	loc_6843F4

loc_68430E:
cmp	byte ptr [esp+34h+arg_0], 0
jz	loc_6843F4
lea	ecx, [esp+34h+var_10]
call	sub_652830
mov	eax, [esp+34h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_684338
call	sub_650DF0

loc_684338:
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
push	4
lea	ecx, [eax+2408h]
call	sub_696220
mov	esi, eax
test	esi, esi
jz	short loc_6843A8
mov	ecx, [ebp+4]
mov	edx, [ebp+8]
mov	ebx, [ebp+0]
mov	ebp, [ebp+0Ch]
mov	dword ptr [esi+4], 2
inc	dword ptr [edi+4]
mov	[esp+34h+var_1C], ecx
mov	ecx, [esi+8]
mov	[esp+34h+var_18], edx
test	ecx, ecx
jz	short loc_68437E
call	sub_64A400

loc_68437E:
mov	[esi+8], edi
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_68438D
call	sub_64A400

loc_68438D:
mov	eax, [esp+34h+var_1C]
mov	ecx, [esp+34h+var_18]
mov	dword ptr [esi+0Ch], 0
mov	[esi+10h], ebx
mov	[esi+14h], eax
mov	[esi+18h], ecx
mov	[esi+1Ch], ebp

loc_6843A8:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 24h
retn	4

loc_6843B4:
test	cl, 2
jz	loc_684230
push	0
push	offset a_down	; "_down"
jmp	loc_684229

loc_6843C9:
cmp	eax, 4000h
jz	loc_68421D
cmp	eax, 10000h
jnz	loc_684230

loc_6843DF:
test	cl, 4
jz	loc_684230
push	0
push	offset a_over	; "_over"
jmp	loc_684229

loc_6843F4:
lea	ecx, [esp+34h+var_10]
call	sub_652830
mov	eax, [esp+34h+var_24]

loc_684401:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_684413
call	sub_650DF0

loc_684413:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 24h
retn	4
sub_6841C0 endp

align 10h



sub_684420 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	esi, ecx
test	eax, eax
jnz	short loc_684438
or	dword ptr [esi+0A0h], 180h
jmp	short loc_68445E

loc_684438:
jle	short loc_68445E
mov	eax, [esi]
mov	edx, [eax+64h]
push	0
call	edx
test	eax, eax
jz	short loc_68445E
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+0D8h]
call	eax
movzx	ecx, al
push	ecx
mov	ecx, esi
call	sub_6549E0

loc_68445E:
mov	edx, [esi+0BCh]
push	edx
mov	ecx, esi
call	sub_655A10
mov	eax, [esi+0A0h]
mov	edi, [esi+0BCh]
shr	eax, 13h
and	al, 1
mov	byte ptr [esp+8+arg_0],	al
mov	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, esi
call	sub_680DB0
cmp	eax, 0FFFFFFFFh
jz	short loc_6844B0
cmp	eax, 1
jnz	short loc_6844C9
push	edi
mov	ecx, esi
call	sub_655A50
mov	edx, 0FFFFh
pop	edi
mov	[esi+0A6h], dx
pop	esi
retn	4

loc_6844B0:
push	edi
mov	ecx, esi
call	sub_655B00
mov	eax, 0FFFFh
pop	edi
mov	[esi+0A6h], ax
pop	esi
retn	4

loc_6844C9:
mov	ecx, 0FFFFh
pop	edi
mov	[esi+0A6h], cx
pop	esi
retn	4
sub_684420 endp

align 10h



sub_6844E0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
push	esi
mov	esi, ecx
jz	short loc_68450E
or	dword ptr [esi+0A0h], 1

loc_6844F1:
xor	cl, cl

loc_6844F3:
mov	eax, [esi+0A0h]
mov	edx, eax
shr	edx, 3
and	dl, 1
cmp	cl, dl
jz	short loc_684565
test	cl, cl
jz	short loc_68452D
or	eax, 8
jmp	short loc_684530

loc_68450E:
and	dword ptr [esi+0A0h], 0FFFFFFFEh
mov	eax, [esi+0BCh]
mov	ecx, [eax+2474h]
shr	ecx, 0Bh
test	cl, 1
jz	short loc_6844F1
mov	cl, 1
jmp	short loc_6844F3

loc_68452D:
and	eax, 0FFFFFFF7h

loc_684530:
mov	[esi+0A0h], eax
mov	eax, [esi+0BCh]
push	eax
mov	ecx, esi
call	sub_683450
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_684565
mov	ecx, [eax+0A0h]
shr	ecx, 3
test	cl, 1
jnz	short loc_684565
mov	edx, [esi]
mov	eax, [edx+128h]
mov	ecx, esi
call	eax

loc_684565:
mov	esi, [esi+0BCh]
or	dword ptr [esi+2474h], 400h
add	esi, 2474h
pop	esi
retn	4
sub_6844E0 endp

align 10h



sub_684580 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_1B=	byte ptr -1Bh
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 34h
push	ebx
push	esi
mov	esi, [esp+3Ch+arg_0]
mov	ecx, [esi+8]
xor	ebx, ebx
push	edi
cmp	ecx, ebx
jnz	short loc_68459B
mov	eax, [esi+18h]
mov	edi, [eax+74h]
jmp	short loc_6845B9

loc_68459B:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_68474B
mov	eax, [esi+8]
cmp	eax, ebx
jz	loc_68474B
lea	edi, [eax-78h]

loc_6845B9:
cmp	edi, ebx
jz	loc_68474B
cmp	[esi+1Ch], ebx
fldz
fst	[esp+40h+var_14]
mov	[esp+40h+var_20], ebx
fst	[esp+40h+var_18]
mov	[esp+40h+var_1C], bl
fst	[esp+40h+var_C]
mov	[esp+40h+var_1B], bl
fst	[esp+40h+var_10]
mov	byte ptr [esp+40h+arg_0], bl
fst	[esp+40h+var_4]
fstp	[esp+40h+var_8]
jle	loc_68471A
mov	ecx, [esi+18h]
push	ecx
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
cmp	dword ptr [esi+1Ch], 4
mov	byte ptr [esp+40h+arg_0], al
jle	loc_68471A
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
mov	[esp+48h+var_1B], 1
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
mov	eax, [esi+18h]
fmul	ds:dbl_15FCE20
push	eax
push	2
mov	ecx, esi
fstp	[esp+48h+var_30]
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+40h+var_34]
mov	ecx, [esi+18h]
fld	[esp+40h+var_34]
fmul	ds:dbl_15FCE20
push	ecx
push	3
mov	ecx, esi
fstp	[esp+48h+var_2C]
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
mov	edx, [esi+18h]
fmul	ds:dbl_15FCE20
push	edx
push	4
mov	ecx, esi
fstp	[esp+48h+var_28]
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
fmul	ds:dbl_15FCE20
fstp	[esp+40h+var_24]
fld	[esp+40h+var_30]
fld	[esp+40h+var_28]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6846DD
fxch	st(1)
fstp	[esp+40h+var_34]
fstp	[esp+40h+var_30]
fld	[esp+40h+var_34]
fstp	[esp+40h+var_28]
fld	[esp+40h+var_30]
fld	[esp+40h+var_28]

loc_6846DD:
fld	[esp+40h+var_2C]
fld	[esp+40h+var_24]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_684708
fxch	st(1)
fstp	[esp+40h+var_34]
fstp	[esp+40h+var_2C]
fld	[esp+40h+var_34]
fstp	[esp+40h+var_24]
fld	[esp+40h+var_2C]
fld	[esp+40h+var_24]

loc_684708:
fxch	st(3)
fstp	[esp+40h+var_18]
fstp	[esp+40h+var_14]
fstp	[esp+40h+var_10]
fstp	[esp+40h+var_C]

loc_68471A:
mov	eax, [esp+40h+arg_0]
push	eax
lea	ecx, [esp+44h+var_20]
mov	[esp+44h+var_20], edi
call	sub_68FDE0
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
lea	ecx, [esp+40h+var_20]
mov	esi, eax
push	ecx
mov	ecx, esi
call	sub_669C10
push	esi
mov	ecx, edi
call	sub_683450

loc_68474B:
pop	edi
pop	esi
pop	ebx
add	esp, 34h
retn
sub_684580 endp

align 10h



sub_684760 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_684774
mov	eax, [esi+18h]
mov	esi, [eax+74h]
jmp	short loc_68478A

loc_684774:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_6847A9
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6847A9
lea	esi, [eax-78h]

loc_68478A:
test	esi, esi
jz	short loc_6847A9
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, esi
mov	dword ptr [eax+23E4h], 0
call	sub_683450

loc_6847A9:
pop	esi
retn
sub_684760 endp

align 10h



sub_6847B0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_6847CC
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6847E1
push	esi
jmp	short loc_6847DB

loc_6847CC:
cmp	esi, [edi+8]
jb	short loc_6847E1
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6847DB:
push	edi
call	sub_680740

loc_6847E1:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_684804
sub	esi, ebx
mov	edx, [edi]
lea	eax, [edx+ebx*8]
jz	short loc_684804
xor	ecx, ecx

loc_6847F3:
cmp	eax, ecx
jz	short loc_6847FC
mov	[eax], ecx
mov	[eax+4], ecx

loc_6847FC:
add	eax, 8
sub	esi, 1
jnz	short loc_6847F3

loc_684804:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6847B0 endp

align 10h



sub_684810 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
push	edi
jz	short loc_68485F
push	ebx
mov	ebx, [esp+0Ch+arg_0]
mov	eax, [ebx]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edi, [esi]
mov	edx, [edi+4]
and	edx, eax
push	edx
push	ebx
mov	ecx, esi
call	sub_6B2810
pop	ebx
test	eax, eax
jl	short loc_68485F
inc	eax
shl	eax, 4
add	eax, edi
pop	edi
pop	esi
retn	4

loc_68485F:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_684810 endp

align 10h



sub_684870 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_6848EE
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
jmp	short loc_684890
align 10h

loc_684890:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_6848C9
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6848C3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6848C3:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6848C9:
add	ebx, 10h
sub	[esp+14h+var_4], 1
jnz	short loc_684890
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_6848EE:
pop	ebp
pop	ecx
retn
sub_684870 endp

align 10h



sub_684900 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_68491D
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_68491D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_68491D:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_684900 endp

align 10h



sub_684930 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+1BCh], 270Fh
jnz	loc_684A56
mov	eax, [ebx+1C0h]
test	eax, eax
jz	loc_684A56
cmp	dword ptr [eax+1Ch], 0
jz	loc_684A56
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+0Ch]
mov	edx, [ecx+14h]
mov	eax, [esi+14h]
shr	edx, 6
not	dl
push	edi
test	dl, 1
jz	short loc_6849B3
test	eax, eax
jz	short loc_68497D
mov	edi, [eax+28h]
jmp	short loc_68497F

loc_68497D:
xor	edi, edi

loc_68497F:
mov	eax, [ebx+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	24h
call	eax
test	eax, eax
jz	short loc_6849AD
push	edi		; int
push	0		; int
push	offset aImecandidateli ; "$IMECandidateListFont"
push	esi		; int
push	0		; int
mov	ecx, eax
call	sub_67E880
mov	edi, eax
jmp	short loc_684A27

loc_6849AD:
xor	eax, eax
mov	edi, eax
jmp	short loc_684A27

loc_6849B3:
mov	edx, [ecx]
mov	eax, [edx+3Ch]
mov	esi, [ecx+14h]
call	eax
mov	ecx, [ebx+1C0h]
mov	ecx, [ecx+1Ch]
push	0		; int
push	0		; char
push	esi		; int
push	eax		; Src
call	sub_6F5D60
mov	esi, eax
test	esi, esi
jz	short loc_684A54
mov	edx, [ebx+0BCh]
mov	ecx, [edx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	24h
call	edx
test	eax, eax
jz	short loc_684A09
mov	ecx, [esi+20h]
mov	edx, [esi+1Ch]
push	ecx		; int
push	0		; int
push	offset aImecandidateli ; "$IMECandidateListFont"
push	edx		; int
push	0		; int
mov	ecx, eax
call	sub_67E880
jmp	short loc_684A0B

loc_684A09:
xor	eax, eax

loc_684A0B:
add	dword ptr [esi], 0FFFFFFFFh
mov	edi, eax
jnz	short loc_684A27
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_684A27:
test	edi, edi
jz	short loc_684A54
mov	eax, [ebx+1C0h]
mov	ecx, [eax+1Ch]
push	edi
call	sub_6F5C90
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_684A54
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_684A54:
pop	edi
pop	esi

loc_684A56:
pop	ebx
retn	4
sub_684930 endp

align 10h



sub_684A60 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
test	eax, eax
jz	short loc_684A8B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+58h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_684A8B:
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_684AA5
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_684AA5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_684AA5:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_684A60 endp

align 10h



sub_684AB0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
push	esi
push	edi
call	sub_683310
cmp	esi, ebx
jbe	short loc_684AE1
mov	eax, ebx
shl	eax, 4
add	eax, [edi]
sub	esi, ebx
jz	short loc_684AE1

loc_684AD2:
test	eax, eax
jz	short loc_684AD9
mov	byte ptr [eax],	0

loc_684AD9:
add	eax, 10h
sub	esi, 1
jnz	short loc_684AD2

loc_684AE1:
pop	edi
pop	esi
pop	ebx
retn	4
sub_684AB0 endp

align 10h



sub_684AF0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
inc	eax
push	eax
push	esi
call	sub_683310
mov	ecx, [esi+4]
mov	edx, [esi]
shl	ecx, 4
lea	ecx, [ecx+edx-10h]
pop	esi
test	ecx, ecx
jz	short locret_684B14
jmp	sub_652330

locret_684B14:
retn	4
sub_684AF0 endp

align 10h



sub_684B20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
inc	eax
push	eax
push	ecx
mov	ecx, esi
call	sub_6833F0
mov	edx, [esi+4]
mov	eax, [esi]
lea	ecx, [eax+edx*4-4]
pop	esi
test	ecx, ecx
jz	short locret_684B52
mov	edx, [esp+arg_0]
mov	eax, [edx]
test	eax, eax
jz	short loc_684B4E
inc	dword ptr [eax+4]

loc_684B4E:
mov	edx, [edx]
mov	[ecx], edx

locret_684B52:
retn	4
sub_684B20 endp

align 10h



sub_684B60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
mov	eax, [edi+0Ch]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_684B7F
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_684B92
push	esi
mov	ecx, edi
jmp	short loc_684B8C

loc_684B7F:
cmp	esi, [edi+8]
jb	short loc_684B92
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_684B8C:
push	eax
call	sub_6808E0

loc_684B92:
mov	ebx, [esp+0Ch+arg_0]
lea	eax, [esi-1]
mov	[edi+4], esi
cmp	ebx, eax
jnb	short loc_684BBC
mov	ecx, [edi]
sub	esi, ebx
lea	edx, ds:0FFFFFFFCh[esi*4]
lea	eax, [ecx+ebx*4]
push	edx
push	eax
add	eax, 4
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_684BBC:
mov	eax, [edi]
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx]
pop	edi
pop	esi
mov	[eax+ebx*4], edx
pop	ebx
retn	8
sub_684B60 endp

align 10h



sub_684BD0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [ebp+4]
mov	esi, ecx
mov	ebx, [esi+4]
push	edi
push	esi
call	sub_683310
cmp	edi, ebx
jbe	short loc_684C05
mov	eax, ebx
shl	eax, 4
add	eax, [esi]
sub	edi, ebx
jz	short loc_684C05

loc_684BF6:
test	eax, eax
jz	short loc_684BFD
mov	byte ptr [eax],	0

loc_684BFD:
add	eax, 10h
sub	edi, 1
jnz	short loc_684BF6

loc_684C05:
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_684C28
xor	edi, edi
mov	edi, edi

loc_684C10:
mov	eax, [ebp+0]
mov	ecx, [esi]
add	eax, edi
push	eax
add	ecx, edi
call	sub_652520
inc	ebx
add	edi, 10h
cmp	ebx, [esi+4]
jb	short loc_684C10

loc_684C28:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_684BD0 endp

align 10h



sub_684C40 proc	near
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi+0Ch]
xor	edi, edi
cmp	[esi+4], edi
jbe	short loc_684C76
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_684C82
mov	eax, [esi]
cmp	eax, edi
jz	short loc_684C6D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_684C6D:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn

loc_684C76:
cmp	[esi+8], edi
ja	short loc_684C82
push	edi
push	eax
call	sub_6808E0

loc_684C82:
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_684C40 endp

align 10h



sub_684C90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+18h]
push	edi
test	eax, eax
jz	short loc_684CA9
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_684CA9:
mov	edi, [esp+0Ch+arg_4]
mov	edx, [esi+18h]
mov	ebx, [esp+0Ch+arg_0]
mov	[ebx], edx
test	edi, edi
jz	short loc_684CC6
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_684CC6:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_684CD2
call	sub_64B3B0

loc_684CD2:
mov	[esi+18h], edi
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8
sub_684C90 endp

align 10h



sub_684CE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], edx
mov	dword ptr [eax+8], 32h
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], edx
mov	edx, [esp+arg_0]
lea	ecx, [eax+24h]
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	ecx, [esp+arg_8]
mov	[eax+2Ch], ecx
mov	[eax+30h], edx
retn	0Ch
sub_684CE0 endp

align 10h



sub_684D20 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+28h]
lea	ecx, [esi+24h]
cmp	eax, ecx
jz	short loc_684D42
push	edi
mov	edi, edi

loc_684D30:
mov	edx, [eax+4]
mov	edi, [esi+0Ch]
mov	[eax], edi
mov	[esi+0Ch], eax
mov	eax, edx
cmp	edx, ecx
jnz	short loc_684D30
pop	edi

loc_684D42:
mov	[ecx], ecx
mov	[ecx+4], ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+14h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [esi]
test	eax, eax
jz	short loc_684D7A
mov	edi, edi

loc_684D60:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax+0AF0h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_684D60

loc_684D7A:
pop	esi
retn
sub_684D20 endp

align 10h



sub_684D80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, ecx
call	sub_683210
mov	esi, eax
mov	[esp+0Ch+var_4], esi
test	esi, esi
jz	short loc_684DDE
mov	ecx, [edi+24h]
lea	eax, [edi+24h]
mov	[esi], ecx
mov	[esi+4], eax
mov	edx, [eax]
mov	[edx+4], esi
mov	[eax], esi
mov	eax, [esp+0Ch+arg_0]
push	offset sub_67DB80
add	edi, 14h
lea	ecx, [esp+10h+arg_0]
push	ecx
mov	[esi+0Ch], eax
mov	eax, [edi+4]
push	eax
push	0
push	edi
call	sub_680A20
add	esp, 14h
lea	edx, [esp+0Ch+var_4]
push	edx
push	eax
mov	ecx, edi
call	sub_684B60
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	4

loc_684DDE:
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn	4
sub_684D80 endp

align 10h



sub_684DF0 proc	near
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
mov	[esi], ebx
mov	[esi+4], ebx
lea	ecx, [esi+0Ch]
mov	[esi+8], ebx
call	sub_68CFB0
lea	ecx, [esi+2Ch]
call	sub_64E8E0
fldz
mov	dword ptr [esi+4Ch], 40000h
mov	[esi+53h], bl
fstp	dword ptr [esi+44h]
xor	eax, eax
mov	[esi+50h], ax
mov	[esi+48h], ebx
mov	[esi+52h], bl
mov	eax, esi
pop	esi
pop	ebx
retn
sub_684DF0 endp

align 10h



sub_684E30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
mov	ebp, [esp+1Ch+arg_0]
push	esi
mov	esi, [ebp+324h]
push	edi
mov	edi, ecx
test	esi, esi
jnz	short loc_684E49
lea	esi, [ebp+28h]

loc_684E49:
push	ebx
mov	ecx, esi
call	sub_6A9860
mov	ebx, eax
mov	dword ptr [ebp+2F8h], 1
mov	[ebp+2FCh], edi
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	[esp+28h+var_14], ebx
cmp	eax, 2
mov	byte ptr [esi+15h], 0
jge	short loc_684E7F
push	2
mov	ecx, esi
call	sub_6A9B70

loc_684E7F:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	ecx, dx
mov	[esi+2Ch], eax
movzx	eax, cx
cmp	eax, 1
mov	[edi+18h], eax
jge	short loc_684EB3
mov	dword ptr [edi+18h], 1

loc_684EB3:
mov	edx, [edi+18h]
lea	ecx, [edi+20h]
push	edx
call	sub_6847B0
mov	eax, [edi+18h]
push	eax
push	offset aFramesD	; "  frames = %d\n"
push	esi
call	nullsub_2
mov	dword ptr [edi+1Ch], 0
mov	ecx, [esi+34h]
sub	ecx, [esi+30h]
add	esp, 0Ch
add	ecx, [esi+2Ch]
cmp	ecx, ebx
jnb	loc_685006
lea	esp, [esp+0]

loc_684EF0:
lea	edx, [esp+28h+var_10]
push	edx
mov	ecx, esi
call	sub_6AA6E0
mov	ebx, eax
mov	eax, [ebp+20h]
mov	ecx, [eax+24h]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
lea	ecx, [esp+2Ch+var_18]
call	sub_67AE10
push	1
lea	edx, [esp+2Ch+var_10]
push	edx
lea	eax, [esp+30h+var_18]
push	eax
mov	ecx, ebp
call	sub_680AA0
mov	ebp, [esp+28h+var_18]
and	ebp, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [ebp+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_684F4D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax

loc_684F4D:
cmp	ebx, 1
jnz	short loc_684FA7
mov	eax, [edi+24h]
cmp	[edi+1Ch], eax
jnz	short loc_684F85
inc	eax
push	eax
lea	ecx, [edi+20h]
call	sub_6847B0
mov	ecx, [edi+1Ch]
mov	edx, [edi+18h]
mov	eax, [esp+28h+arg_4]
inc	ecx
push	ecx
push	edx
and	eax, 0FFFFh
push	eax
push	offset aAnExtraFrameIs ; "An extra frame is found for sprite id	="...
push	esi
call	sub_680970
add	esp, 14h

loc_684F85:
mov	ecx, [esp+28h+arg_0]
call	sub_6FD640
movzx	ecx, word ptr [esp+28h+arg_4]
push	ecx
push	offset aShowframeSprit ; "  ShowFrame (sprite, char id = %d)\n"
push	esi
call	nullsub_2
add	esp, 0Ch
inc	dword ptr [edi+1Ch]
jmp	short loc_684FE8

loc_684FA7:
cmp	ebx, 55h
jnb	short loc_684FB5
mov	eax, off_167DB78[ebx*4]
jmp	short loc_684FC7

loc_684FB5:
lea	edx, [ebx-3E8h]
cmp	edx, 9
ja	short loc_684FD9
mov	eax, ds:dword_167CD2C[ebx*4]

loc_684FC7:
test	eax, eax
jz	short loc_684FD9
mov	edx, [esp+28h+arg_0]
lea	ecx, [esp+28h+var_10]
push	ecx
push	edx
call	eax ; nullsub_39
jmp	short loc_684FE8

loc_684FD9:
push	ebx
push	offset aNoTagLoaderFor ; "*** no tag loader for	type %d\n"
push	esi
call	nullsub_2
add	esp, 0Ch

loc_684FE8:
mov	ecx, esi
call	sub_6A9DB0
mov	eax, [esi+34h]
sub	eax, [esi+30h]
mov	ebp, [esp+28h+arg_0]
add	eax, [esi+2Ch]
cmp	eax, [esp+28h+var_14]
jb	loc_684EF0

loc_685006:
mov	eax, [ebp+2F8h]
lea	ecx, [eax+eax*2]
cmp	dword ptr [ebp+ecx*4+304h], 0
pop	ebx
ja	short loc_685026
test	eax, eax
jnz	short loc_685061
cmp	[ebp+31Ch], eax
jbe	short loc_685061

loc_685026:
mov	eax, [edi+24h]
cmp	[edi+1Ch], eax
jnz	short loc_68505A
inc	eax
push	eax
lea	ecx, [edi+20h]
call	sub_6847B0
mov	edx, [edi+1Ch]
mov	eax, [edi+18h]
mov	ecx, [esp+24h+arg_4]
inc	edx
push	edx
push	eax
and	ecx, 0FFFFh
push	ecx
push	offset aAnExtraFrameIs ; "An extra frame is found for sprite id	="...
push	esi
call	sub_680970
add	esp, 14h

loc_68505A:
mov	ecx, ebp
call	sub_6FD640

loc_685061:
movzx	edx, word ptr [esp+24h+arg_4]
push	edx
xor	eax, eax
push	offset aSpriteEndCharI ; "  -- sprite END, char	id = %d	--\n"
push	esi
mov	[ebp+2F8h], eax
mov	[ebp+2FCh], eax
call	nullsub_2
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn	8
sub_684E30 endp

align 10h



sub_685090 proc	near
mov	dword ptr [ecx+18h], 1
push	1
add	ecx, 20h
call	sub_6847B0
retn
sub_685090 endp

align 10h



sub_6850B0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_43=	byte ptr -43h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 54h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+54h+var_4], eax
mov	eax, [esp+54h+arg_0]
push	esi
mov	esi, ecx
push	3Fh		; size_t
lea	ecx, [esp+5Ch+var_43]
push	0		; int
push	ecx		; void *
mov	[esi+1BCh], eax
mov	[esp+64h+var_44], 0
call	_memset
lea	eax, [esp+64h+arg_0]
push	eax		; int
lea	ecx, [esp+68h+var_50]
lea	edx, [esp+68h+var_44]
push	offset a_level0	; "_level{0}"
push	ecx		; int
mov	[esp+70h+var_50], 2
mov	[esp+70h+var_4C], edx
mov	[esp+70h+var_48], 40h
call	sub_6574B0
mov	edx, [esi+160h]
mov	ecx, [edx+280h]
add	esp, 18h
lea	eax, [esp+58h+var_44]
push	eax
call	sub_651000
mov	[esp+58h+var_54], eax
inc	dword ptr [eax+8]
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+58h+var_54]
push	eax
mov	ecx, esi
call	edx
mov	eax, [esp+58h+var_54]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
jnz	short loc_68514F
call	sub_650DF0

loc_68514F:
mov	ecx, [esp+54h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 54h
retn	4
sub_6850B0 endp




sub_685160 proc	near

var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebx
mov	ebx, [ecx+0C8h]
push	ebp
xor	ebp, ebp
mov	[esp+2Ch+var_24], ecx
test	ebx, ebx
jbe	loc_68525D
push	esi
push	edi
jmp	short loc_685180
align 10h

loc_685180:
mov	eax, [ecx+0C4h]
mov	esi, [eax+ebp*4]
cmp	word ptr [esi+74h], 0
jbe	loc_685252
mov	edi, [esp+34h+arg_0]
cmp	dword ptr [edi+4], 0
jnz	short loc_6851C4
cmp	ebx, [edi+8]
jb	short loc_6851B3
mov	ecx, ebx
shr	ecx, 2
add	ecx, ebx
push	ecx
push	edi
mov	ecx, edi
call	sub_747320

loc_6851B3:
mov	edx, [edi]
push	ebx		; size_t
push	1		; int
push	edx		; void *
mov	[edi+4], ebx
call	_memset
add	esp, 0Ch

loc_6851C4:
fld	dword ptr [esi+44h]
mov	eax, [esp+34h+arg_4]
fstp	[esp+34h+var_18]
push	eax
fld	dword ptr [esi+48h]
lea	ecx, [esp+38h+var_20]
fstp	[esp+38h+var_14]
push	ecx
fld	dword ptr [esi+4Ch]
lea	ecx, [esp+3Ch+var_18]
fstp	[esp+3Ch+var_10]
fld	dword ptr [esi+50h]
fstp	[esp+3Ch+var_C]
fld	dword ptr [esi+54h]
fstp	[esp+3Ch+var_8]
fld	dword ptr [esi+58h]
fstp	[esp+3Ch+var_4]
call	sub_64EC70
mov	edx, [esi]
mov	edi, [edi]
mov	edx, [edx+44h]
push	1
lea	eax, [esp+38h+var_20]
push	eax
mov	ecx, esi
add	edi, ebp
call	edx
mov	[edi], al
lea	eax, [ebp+1]
cmp	eax, ebx
jnb	short loc_68524B
mov	edi, edi

loc_685220:
mov	ecx, [esp+34h+var_24]
mov	edx, [ecx+0C4h]
mov	ecx, [edx+eax*4]
test	ecx, ecx
jz	short loc_68523A
movzx	edx, word ptr [esi+74h]
cmp	[ecx+14h], edx
jg	short loc_68524B

loc_68523A:
mov	ecx, [esp+34h+arg_0]
mov	ecx, [ecx]
mov	dl, [ecx+ebp]
mov	[ecx+eax], dl
inc	eax
cmp	eax, ebx
jb	short loc_685220

loc_68524B:
mov	ecx, [esp+34h+var_24]
lea	ebp, [eax-1]

loc_685252:
inc	ebp
cmp	ebp, ebx
jb	loc_685180
pop	edi
pop	esi

loc_68525D:
pop	ebp
pop	ebx
add	esp, 24h
retn	0Ch
sub_685160 endp

align 10h



sub_685270 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 9Ch
push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 0Bh
test	al, 1
jnz	short loc_6852B6
mov	edx, [esi]
mov	eax, [edx+10h]
call	eax
test	al, al
jnz	short loc_68529A
cmp	dword ptr [esi+1D8h], 0
jz	short loc_6852B6

loc_68529A:
mov	edx, [esi]
mov	eax, [edx+0B4h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_6852B6
mov	eax, [esp+0A0h+arg_4]
cmp	[eax+4], esi
jnz	short loc_6852C2

loc_6852B6:
xor	eax, eax
pop	esi
add	esp, 9Ch
retn	8

loc_6852C2:
mov	ecx, [eax+8]
mov	edx, [esi]
mov	eax, [eax]
mov	edx, [edx+0C4h]
push	ecx
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	short loc_6852B6
fld	dword ptr [esi+44h]
push	ebp
fstp	[esp+0A4h+var_70]
push	edi
fld	dword ptr [esi+48h]
push	1
fstp	[esp+0ACh+var_6C]
mov	ecx, esi
fld	dword ptr [esi+4Ch]
fstp	[esp+0ACh+var_68]
fld	dword ptr [esi+50h]
fstp	[esp+0ACh+var_64]
fld	dword ptr [esi+54h]
fstp	[esp+0ACh+var_60]
fld	dword ptr [esi+58h]
fstp	[esp+0ACh+var_5C]
call	sub_654BF0
test	al, al
jz	short loc_685388
push	1
mov	ecx, esi
call	sub_654D00
push	1
mov	ecx, esi
mov	edi, eax
call	sub_654D50
mov	ebp, eax
test	edi, edi
jz	short loc_68533B
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E0h], edi

loc_68533B:
test	ebp, ebp
jz	short loc_68534E
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E4h], ebp

loc_68534E:
lea	eax, [esp+0A8h+var_40]
push	eax		; void *
mov	ecx, esi
call	sub_655290
mov	edx, [esi]
mov	edi, eax
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E8h], edi
mov	edx, [esi]
mov	eax, [edx+54h]
lea	ecx, [esp+0A8h+var_9C]
push	ecx
mov	ecx, esi
call	eax
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
jmp	short loc_6853AE

loc_685388:
mov	ecx, [esp+0A8h+arg_0]
push	ecx
lea	edx, [esp+0ACh+var_94]
push	edx
lea	ecx, [esp+0B0h+var_70]
call	sub_64EC70
fld	[esp+0A8h+var_94]
fstp	[esp+0A8h+var_9C]
fld	[esp+0A8h+var_90]
fstp	[esp+0A8h+var_98]

loc_6853AE:
mov	eax, [esi+0C8h]
push	ebx
mov	ecx, esi
mov	[esp+0ACh+var_8C], eax
call	sub_67E0C0
mov	edi, eax
test	edi, edi
jz	loc_6854E0
mov	edx, [edi]
mov	eax, [edx+0B4h]
mov	ecx, edi
call	eax
test	al, al
jz	loc_6854E0
mov	cl, [edi+76h]
shr	cl, 4
test	cl, 1
jnz	loc_6854E0
push	1
mov	ecx, edi
call	sub_654BF0
test	al, al
jz	short loc_685470
push	1
mov	ecx, edi
call	sub_654D00
push	1
mov	ecx, edi
mov	ebp, eax
call	sub_654D50
mov	ebx, eax
test	ebp, ebp
jz	short loc_685423
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E0h], ebp

loc_685423:
test	ebx, ebx
jz	short loc_685436
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E4h], ebx

loc_685436:
lea	ecx, [esp+0ACh+var_40]
push	ecx		; void *
mov	ecx, edi
call	sub_655290
mov	edx, [esi]
mov	ebp, eax
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E8h], ebp
mov	edx, [esi]
mov	eax, [edx+54h]
lea	ecx, [esp+0ACh+var_94]
push	ecx
mov	ecx, esi
call	eax
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
jmp	short loc_6854C8

loc_685470:
lea	ecx, [esp+0ACh+var_58]
call	sub_64E8E0
lea	ecx, [esp+0ACh+var_88]
push	ecx
mov	ecx, edi
call	sub_6552D0
push	eax
lea	ecx, [esp+0B0h+var_58]
call	sub_64E9E0
lea	edx, [esp+0ACh+var_88]
push	edx
mov	ecx, esi
call	sub_6552D0
push	eax
lea	ecx, [esp+0B0h+var_58]
call	sub_64EAF0
lea	eax, [esp+0ACh+var_9C]
push	eax
lea	ecx, [esp+0B0h+var_88]
push	ecx
lea	ecx, [esp+0B4h+var_58]
call	sub_64E9B0
fld	[esp+0ACh+var_88]
fstp	[esp+0ACh+var_94]
fld	[esp+0ACh+var_84]
fstp	[esp+0ACh+var_90]

loc_6854C8:
mov	edx, [edi]
mov	edx, [edx+44h]
push	1
lea	eax, [esp+0B0h+var_94]
push	eax
mov	ecx, edi
call	edx
test	al, al
jz	loc_68560E

loc_6854E0:
push	1
lea	eax, [esp+0B0h+var_9C]
push	eax
lea	ecx, [esp+0B4h+var_88]
xor	edi, edi
push	ecx
mov	ecx, esi
mov	[esp+0B8h+var_88], edi
mov	[esp+0B8h+var_84], edi
mov	[esp+0B8h+var_80], edi
call	sub_685160
mov	ebp, [esp+0ACh+var_8C]
mov	ebx, [esp+0ACh+var_88]
dec	ebp
cmp	ebp, edi
jl	loc_6855D5

loc_685512:
cmp	[esp+0ACh+var_84], 0
mov	edx, [esi+0C4h]
mov	ecx, [edx+ebp*4]
jz	short loc_685537
cmp	byte ptr [ebx+ebp], 0
jz	loc_6855CC
cmp	word ptr [ecx+74h], 0
ja	loc_6855CC

loc_685537:
mov	al, [ecx+76h]
shr	al, 1
test	al, 1
jnz	loc_6855CC
mov	eax, [esp+0ACh+arg_4]
mov	edx, [ecx]
mov	edx, [edx+48h]
push	eax
lea	eax, [esp+0B0h+var_9C]
push	eax
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_68556B
mov	eax, [esp+0ACh+arg_4]
cmp	byte ptr [eax+0Ch], 0
jnz	short loc_6855AB

loc_68556B:
mov	ecx, esi
call	sub_6810B0
test	al, al
jnz	short loc_6855C8
mov	ecx, [esi+1D8h]
test	ecx, ecx
jz	short loc_685589
call	sub_6810B0
test	al, al
jnz	short loc_6855C8

loc_685589:
test	edi, edi
jz	short loc_6855CC
cmp	edi, esi
jz	short loc_6855CC
mov	ecx, [edi+20h]
test	ecx, ecx
jz	loc_685688
mov	edx, [ecx]
mov	eax, [edx+10h]
call	eax
test	al, al
jz	loc_685688

loc_6855AB:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
pop	ebx
mov	eax, edi
pop	edi
pop	ebp
pop	esi
add	esp, 9Ch
retn	8

loc_6855C8:
test	edi, edi
jnz	short loc_68561D

loc_6855CC:
sub	ebp, 1
jns	loc_685512

loc_6855D5:
cmp	dword ptr [esi+1CCh], 0
jz	short loc_685600
mov	ecx, esi
call	sub_6810B0
test	al, al
jz	short loc_685600
mov	ecx, [esi+1CCh]
push	esi
push	1
lea	edx, [esp+0B4h+var_9C]
push	edx
call	sub_6F9660
test	al, al
jnz	short loc_68566B

loc_685600:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_68560E:
pop	ebx
pop	edi
pop	ebp
xor	eax, eax
pop	esi
add	esp, 9Ch
retn	8

loc_68561D:
mov	ecx, [esi+1D8h]
test	ecx, ecx
jz	short loc_68563B
call	sub_6810B0
test	al, al
jz	short loc_68563B
mov	esi, [esi+1D8h]
jmp	loc_6856BC

loc_68563B:
mov	ecx, esi
call	sub_680470
test	eax, eax
jz	short loc_6856A5
mov	edx, eax

loc_685648:
mov	edx, [edx+20h]
test	edx, edx
jz	short loc_685688
cmp	edx, esi
jnz	short loc_685648
mov	ecx, [esp+0ACh+arg_4]
mov	edx, [eax]
mov	edx, [edx+48h]
push	ecx
lea	ecx, [esp+0B0h+var_9C]
push	ecx
mov	ecx, eax
call	edx
mov	esi, eax

loc_68566B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
pop	ebx
pop	edi
pop	ebp
mov	eax, esi
pop	esi
add	esp, 9Ch
retn	8

loc_685688:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
pop	ebx
pop	edi
pop	ebp
xor	eax, eax
pop	esi
add	esp, 9Ch
retn	8

loc_6856A5:
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
cmp	byte ptr [eax+2B1h], 1
jnz	short loc_6856BC
mov	esi, edi

loc_6856BC:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
pop	ebx
pop	edi
pop	ebp
mov	eax, esi
pop	esi
add	esp, 9Ch
retn	8
sub_685270 endp

align 10h



sub_6856E0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+24h]
push	edi
test	ecx, ecx
jz	short loc_685705
mov	eax, [ecx]
mov	edx, [eax+0Ch]
call	edx
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_6856FE
call	sub_64A430

loc_6856FE:
mov	dword ptr [esi+24h], 0

loc_685705:
xor	edi, edi
cmp	[esi+1Ch], edi
jbe	short loc_685721
lea	esp, [esp+0]

loc_685710:
mov	eax, [esi+18h]
mov	ecx, [eax+edi*4]
call	sub_6FE960
inc	edi
cmp	edi, [esi+1Ch]
jb	short loc_685710

loc_685721:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_68572D
call	sub_64A430

loc_68572D:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+18h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, [esi+10h]
mov	ecx, [esi+0Ch]
lea	edi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_685764
push	ebx
mov	ebx, eax
nop

loc_685750:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_68575B
call	sub_64A400

loc_68575B:
sub	edi, 4
sub	ebx, 1
jnz	short loc_685750
pop	ebx

loc_685764:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0Ch]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
retn
sub_6856E0 endp

align 10h



sub_685780 proc	near
push	ebp
mov	ebp, ecx
mov	eax, [ebp+1C8h]
push	esi
push	edi
test	eax, eax
jz	loc_685840
xor	edi, edi
cmp	[eax+10h], edi
jbe	short loc_6857CF
lea	ebx, [ebx+0]

loc_6857A0:
mov	eax, [eax+0Ch]
mov	ecx, [eax+edi*4]
lea	eax, [eax+edi*4]
test	ecx, ecx
jz	short loc_6857B0
inc	dword ptr [ecx+4]

loc_6857B0:
mov	esi, [eax]
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax
mov	ecx, esi
call	sub_64A400
mov	eax, [ebp+1C8h]
inc	edi
cmp	edi, [eax+10h]
jb	short loc_6857A0

loc_6857CF:
mov	esi, [ebp+1C8h]
mov	eax, [esi+10h]
add	esi, 0Ch
test	eax, eax
jbe	short loc_685828
mov	ecx, [esi]
push	ebx
lea	edi, [ecx+eax*4-4]
mov	ebx, eax

loc_6857E8:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6857F3
call	sub_64A400

loc_6857F3:
sub	edi, 4
sub	ebx, 1
jnz	short loc_6857E8
test	dword ptr [esi+8], 0FFFFFFFEh
pop	ebx
jbe	short loc_685838
mov	eax, [esi]
test	eax, eax
jz	short loc_68581F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_68581F:
mov	dword ptr [esi+8], 0
jmp	short loc_685838

loc_685828:
cmp	dword ptr [esi+8], 0
ja	short loc_685838
push	0
push	esi
mov	ecx, esi
call	sub_668FE0

loc_685838:
mov	dword ptr [esi+4], 0
nop

loc_685840:
xor	edi, edi
cmp	[ebp+0C8h], edi
jbe	short loc_68588C
lea	ebx, [ebx+0]

loc_685850:
mov	ecx, [ebp+0C4h]
mov	eax, [ecx+edi*4]
mov	dl, [eax+76h]
shr	dl, 7
test	dl, 1
jz	short loc_685883
lea	esi, [eax+78h]
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
cmp	eax, 2
jnz	short loc_685883
mov	ecx, esi
call	sub_661C50
mov	ecx, eax
call	sub_685780

loc_685883:
inc	edi
cmp	edi, [ebp+0C8h]
jb	short loc_685850

loc_68588C:
pop	edi
pop	esi
pop	ebp
retn
sub_685780 endp




sub_685890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+1C8h]
push	edi
mov	[esp+0Ch+var_4], esi
test	eax, eax
jz	loc_68595C
push	ebp
xor	ebp, ebp
cmp	[eax+10h], ebp
jbe	loc_68595B
push	ebx
jmp	short loc_6858C0
align 10h

loc_6858C0:
mov	eax, [eax+0Ch]
lea	edi, ds:0[ebp*4]
mov	ecx, [eax+edi]
add	eax, edi
test	ecx, ecx
jz	short loc_6858D6
inc	dword ptr [ecx+4]

loc_6858D6:
mov	ebx, [eax]
mov	eax, [esp+14h+arg_0]
cmp	[ebx+10h], eax
jnz	short loc_685943
mov	ecx, [ebx+8]
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax
mov	esi, [esi+1C8h]
add	esi, 0Ch
cmp	dword ptr [esi+4], 1
jnz	short loc_68590A
push	0
push	esi
mov	ecx, esi
call	sub_65CC60
mov	esi, [esp+14h+var_4]
jmp	short loc_685944

loc_68590A:
mov	eax, [esi]
add	eax, edi
mov	eax, [eax]
test	eax, eax
jz	short loc_68591B
mov	ecx, eax
call	sub_64A400

loc_68591B:
mov	ecx, [esi]
mov	edx, [esi+4]
lea	eax, [ecx+edi]
sub	edx, ebp
lea	ecx, ds:0FFFFFFFCh[edx*4]
push	ecx
lea	edx, [eax+4]
push	edx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]
mov	esi, [esp+14h+var_4]
jmp	short loc_685944

loc_685943:
inc	ebp

loc_685944:
mov	ecx, ebx
call	sub_64A400
mov	eax, [esi+1C8h]
cmp	ebp, [eax+10h]
jb	loc_6858C0
pop	ebx

loc_68595B:
pop	ebp

loc_68595C:
xor	edi, edi
cmp	[esi+0C8h], edi
jbe	short loc_6859B6
jmp	short loc_685970
align 10h

loc_685970:
mov	eax, [esi+0C4h]
mov	eax, [eax+edi*4]
mov	cl, [eax+76h]
shr	cl, 7
test	cl, 1
jz	short loc_6859AD
mov	edx, [eax+78h]
lea	esi, [eax+78h]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
cmp	eax, 2
jnz	short loc_6859A9
mov	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, esi
call	sub_661C50
mov	ecx, eax
call	sub_685890

loc_6859A9:
mov	esi, [esp+0Ch+var_4]

loc_6859AD:
inc	edi
cmp	edi, [esi+0C8h]
jb	short loc_685970

loc_6859B6:
pop	edi
pop	esi
pop	ecx
retn	4
sub_685890 endp

align 10h



sub_6859C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+1Ch]
push	edi
push	offset asc_154D83C ; "\n"
call	edx
mov	ebx, [esp+14h+arg_0]
mov	eax, [ebx+18h]
mov	ebp, [esi+4Ch]
push	offset sub_67DB80
lea	edi, [ebx+14h]
lea	ecx, [esp+18h+var_4]
push	ecx
push	eax
push	0
push	edi
mov	[esp+28h+var_4], ebp
call	sub_680A20
add	esp, 14h
test	eax, eax
jz	short loc_685A13
mov	edx, [edi]
dec	eax
mov	eax, [edx+eax*4]
cmp	[eax+0Ch], ebp
jnz	short loc_685A13
test	eax, eax
jz	short loc_685A13
test	byte ptr [eax+35h], 2
jz	short loc_685A50

loc_685A13:
mov	eax, [esi+4Ch]
push	eax
mov	ecx, ebx
call	sub_684D80
mov	ecx, [esp+14h+arg_4]
mov	[eax+30h], esi
mov	[eax+2Ch], esi
mov	[eax+28h], esi
mov	[eax+24h], esi
mov	[eax+20h], esi
mov	[eax+1Ch], esi
mov	[eax+18h], esi
mov	[eax+14h], esi
mov	[eax+10h], esi
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax+34h], 0
mov	[eax+8], ecx
or	byte ptr [eax+35h], 1
pop	ebx
pop	ecx
retn	8

loc_685A50:
mov	edx, [esp+14h+arg_4]
pop	edi
mov	[eax+30h], esi
mov	[eax+2Ch], esi
mov	[eax+28h], esi
mov	[eax+24h], esi
mov	[eax+20h], esi
mov	[eax+1Ch], esi
mov	[eax+18h], esi
mov	[eax+14h], esi
mov	[eax+10h], esi
pop	esi
pop	ebp
mov	[eax+8], edx
or	byte ptr [eax+35h], 1
pop	ebx
pop	ecx
retn	8
sub_6859C0 endp

align 10h



sub_685A80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+1Ch]
push	edi
push	offset asc_154D83C ; "\n"
call	edx
mov	ecx, esi
call	sub_68DC70
mov	edi, [esp+10h+arg_0]
movzx	eax, ax
push	offset sub_67DB80
movzx	ebp, ax
mov	eax, [edi+18h]
add	edi, 14h
lea	ecx, [esp+14h+var_4]
push	ecx
push	eax
push	0
push	edi
mov	[esp+24h+var_4], ebp
call	sub_680A20
add	esp, 14h
test	eax, eax
jz	short loc_685ADC
mov	edx, [edi]
dec	eax
mov	eax, [edx+eax*4]
cmp	[eax+0Ch], ebp
jnz	short loc_685ADC
test	eax, eax
jz	short loc_685ADC
test	byte ptr [eax+35h], 2
jz	short loc_685B17

loc_685ADC:
mov	ecx, [esp+10h+arg_0]
push	ebp
call	sub_684D80
mov	ecx, [esp+10h+arg_4]
mov	byte ptr [eax+34h], 0
mov	[eax+30h], esi
mov	[eax+2Ch], esi
mov	[eax+28h], esi
mov	[eax+24h], esi
mov	[eax+20h], esi
mov	[eax+1Ch], esi
mov	[eax+18h], esi
mov	[eax+14h], esi
mov	[eax+10h], esi
pop	edi
pop	esi
mov	[eax+8], ecx
or	byte ptr [eax+35h], 1
pop	ebp
pop	ecx
retn	8

loc_685B17:
mov	edx, [esp+10h+arg_4]
mov	[eax+30h], esi
mov	[eax+2Ch], esi
mov	[eax+28h], esi
mov	[eax+24h], esi
mov	[eax+20h], esi
mov	[eax+1Ch], esi
mov	[eax+18h], esi
mov	[eax+14h], esi
mov	[eax+10h], esi
pop	edi
pop	esi
mov	[eax+8], edx
or	byte ptr [eax+35h], 1
pop	ebp
pop	ecx
retn	8
sub_685A80 endp

align 10h



sub_685B50 proc	near

var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+1Ch]
push	edi
push	offset asc_154D83C ; "\n"
call	edx
mov	ecx, esi
call	sub_68DDE0
mov	ecx, esi
movzx	edi, ax
call	sub_68DEF0
movzx	ebp, di
mov	edi, [esp+14h+arg_0]
push	offset sub_67DB80
add	edi, 14h
lea	ecx, [esp+18h+var_4]
push	ecx
mov	byte ptr [esp+1Ch+var_8+3], al
mov	eax, [edi+4]
push	eax
push	0
push	edi
mov	dword ptr [esp+28h+var_4], ebp
call	sub_680A20
add	esp, 14h
test	eax, eax
jz	short loc_685BBA
mov	edx, [edi]
mov	edi, [edx+eax*4-4]
dec	eax
cmp	[edi+0Ch], ebp
jnz	short loc_685BBA
test	edi, edi
jz	short loc_685BBA
test	byte ptr [edi+35h], 2
jz	short loc_685BF6

loc_685BBA:
mov	ecx, [esp+14h+arg_0]
push	ebp
call	sub_684D80
mov	cl, byte ptr [esp+14h+var_8+3]
mov	edx, [esp+14h+arg_4]
mov	[eax+34h], cl
pop	edi
mov	[eax+30h], esi
mov	[eax+2Ch], esi
mov	[eax+28h], esi
mov	[eax+24h], esi
mov	[eax+20h], esi
mov	[eax+1Ch], esi
mov	[eax+18h], esi
mov	[eax+14h], esi
mov	[eax+10h], esi
pop	esi
mov	[eax+8], edx
pop	ebp
add	esp, 8
retn	8

loc_685BF6:
movzx	eax, byte ptr [esp+14h+var_8+3]
sub	eax, 1
jz	loc_685C98
sub	eax, 1
jz	short loc_685C34
mov	eax, [esp+14h+arg_4]
mov	[edi+30h], esi
mov	[edi+2Ch], esi
mov	[edi+28h], esi
mov	[edi+24h], esi
mov	[edi+20h], esi
mov	[edi+1Ch], esi
mov	[edi+18h], esi
mov	[edi+14h], esi
mov	[edi+10h], esi
mov	[edi+8], eax
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8

loc_685C34:
cmp	byte ptr [edi+34h], 0
jz	short loc_685C3E
mov	byte ptr [edi+34h], 2

loc_685C3E:
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+14h+arg_0]
push	eax
mov	ecx, esi
call	edx
mov	al, byte ptr [esp+14h+arg_0]
test	al, 4
jz	short loc_685C57
mov	[edi+14h], esi

loc_685C57:
test	al, 8
jz	short loc_685C5E
mov	[edi+18h], esi

loc_685C5E:
test	al, 20h
jz	short loc_685C65
mov	[edi+1Ch], esi

loc_685C65:
test	al, al
jns	short loc_685C6C
mov	[edi+20h], esi

loc_685C6C:
test	al, 1
jz	short loc_685C73
mov	[edi+24h], esi

loc_685C73:
test	al, 40h
jz	short loc_685C7A
mov	[edi+28h], esi

loc_685C7A:
test	al, 10h
jz	short loc_685C81
mov	[edi+2Ch], esi

loc_685C81:
test	al, 2
jz	short loc_685C88
mov	[edi+30h], esi

loc_685C88:
mov	eax, [esp+14h+arg_4]
mov	[edi+8], eax
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8

loc_685C98:
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+14h+arg_4]
push	eax
mov	ecx, esi
call	edx
mov	al, byte ptr [esp+14h+arg_4]
test	al, 4
jz	short loc_685CB1
mov	[edi+14h], esi

loc_685CB1:
test	al, 8
jz	short loc_685CB8
mov	[edi+18h], esi

loc_685CB8:
test	al, 20h
jz	short loc_685CBF
mov	[edi+1Ch], esi

loc_685CBF:
test	al, al
jns	short loc_685CC6
mov	[edi+20h], esi

loc_685CC6:
test	al, 1
jz	short loc_685CCD
mov	[edi+24h], esi

loc_685CCD:
test	al, 40h
jz	short loc_685CD4
mov	[edi+28h], esi

loc_685CD4:
test	al, 10h
jz	short loc_685CDB
mov	[edi+2Ch], esi

loc_685CDB:
test	al, 2
jz	short loc_685CE2
mov	[edi+30h], esi

loc_685CE2:
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8
sub_685B50 endp

align 10h



sub_685CF0 proc	near

var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+1Ch]
push	edi
push	offset asc_154D83C ; "\n"
call	edx
mov	ecx, esi
call	sub_68DEC0
mov	ecx, esi
movzx	edi, ax
call	sub_68DEF0
movzx	ebp, di
mov	edi, [esp+14h+arg_0]
push	offset sub_67DB80
add	edi, 14h
lea	ecx, [esp+18h+var_4]
push	ecx
mov	byte ptr [esp+1Ch+var_8+3], al
mov	eax, [edi+4]
push	eax
push	0
push	edi
mov	dword ptr [esp+28h+var_4], ebp
call	sub_680A20
add	esp, 14h
test	eax, eax
jz	short loc_685D5A
mov	edx, [edi]
mov	edi, [edx+eax*4-4]
dec	eax
cmp	[edi+0Ch], ebp
jnz	short loc_685D5A
test	edi, edi
jz	short loc_685D5A
test	byte ptr [edi+35h], 2
jz	short loc_685D96

loc_685D5A:
mov	ecx, [esp+14h+arg_0]
push	ebp
call	sub_684D80
mov	cl, byte ptr [esp+14h+var_8+3]
mov	edx, [esp+14h+arg_4]
mov	[eax+34h], cl
pop	edi
mov	[eax+30h], esi
mov	[eax+2Ch], esi
mov	[eax+28h], esi
mov	[eax+24h], esi
mov	[eax+20h], esi
mov	[eax+1Ch], esi
mov	[eax+18h], esi
mov	[eax+14h], esi
mov	[eax+10h], esi
pop	esi
mov	[eax+8], edx
pop	ebp
add	esp, 8
retn	8

loc_685D96:
movzx	eax, byte ptr [esp+14h+var_8+3]
sub	eax, 1
jz	loc_685E38
sub	eax, 1
jz	short loc_685DD4
mov	eax, [esp+14h+arg_4]
mov	[edi+30h], esi
mov	[edi+2Ch], esi
mov	[edi+28h], esi
mov	[edi+24h], esi
mov	[edi+20h], esi
mov	[edi+1Ch], esi
mov	[edi+18h], esi
mov	[edi+14h], esi
mov	[edi+10h], esi
mov	[edi+8], eax
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8

loc_685DD4:
cmp	byte ptr [edi+34h], 0
jz	short loc_685DDE
mov	byte ptr [edi+34h], 2

loc_685DDE:
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+14h+arg_0]
push	eax
mov	ecx, esi
call	edx
mov	al, byte ptr [esp+14h+arg_0]
test	al, 4
jz	short loc_685DF7
mov	[edi+14h], esi

loc_685DF7:
test	al, 8
jz	short loc_685DFE
mov	[edi+18h], esi

loc_685DFE:
test	al, 20h
jz	short loc_685E05
mov	[edi+1Ch], esi

loc_685E05:
test	al, al
jns	short loc_685E0C
mov	[edi+20h], esi

loc_685E0C:
test	al, 1
jz	short loc_685E13
mov	[edi+24h], esi

loc_685E13:
test	al, 40h
jz	short loc_685E1A
mov	[edi+28h], esi

loc_685E1A:
test	al, 10h
jz	short loc_685E21
mov	[edi+2Ch], esi

loc_685E21:
test	al, 2
jz	short loc_685E28
mov	[edi+30h], esi

loc_685E28:
mov	eax, [esp+14h+arg_4]
mov	[edi+8], eax
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8

loc_685E38:
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+14h+arg_4]
push	eax
mov	ecx, esi
call	edx
mov	al, byte ptr [esp+14h+arg_4]
test	al, 4
jz	short loc_685E51
mov	[edi+14h], esi

loc_685E51:
test	al, 8
jz	short loc_685E58
mov	[edi+18h], esi

loc_685E58:
test	al, 20h
jz	short loc_685E5F
mov	[edi+1Ch], esi

loc_685E5F:
test	al, al
jns	short loc_685E66
mov	[edi+20h], esi

loc_685E66:
test	al, 1
jz	short loc_685E6D
mov	[edi+24h], esi

loc_685E6D:
test	al, 40h
jz	short loc_685E74
mov	[edi+28h], esi

loc_685E74:
test	al, 10h
jz	short loc_685E7B
mov	[edi+2Ch], esi

loc_685E7B:
test	al, 2
jz	short loc_685E82
mov	[edi+30h], esi

loc_685E82:
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8
sub_685CF0 endp

align 10h



; int __thiscall sub_685E90(int, int)
sub_685E90 proc	near

var_D2=	byte ptr -0D2h
var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	byte ptr -0ACh
var_A8=	byte ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 0D4h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+0A0h]
mov	ecx, eax
and	cl, 3
cmp	cl, 1
jz	short loc_685EB7
test	eax, 8000h
jz	loc_68612A

loc_685EB7:
mov	esi, [esp+0E4h+arg_0]
mov	eax, [esi+4]
mov	ecx, [esi+8]
mov	edx, [esi]
mov	[esp+0E4h+var_BC], eax
mov	eax, [esi+10h]
mov	[esp+0E4h+var_C0], edx
mov	edx, [esi+0Ch]
mov	[esp+0E4h+var_B8], ecx
mov	cl, [esi+14h]
mov	[esp+0E4h+var_B0], eax
mov	eax, [edi+90h]
mov	[esp+0E4h+var_B4], edx
mov	edx, [esi+70h]
mov	[esp+0E4h+var_AC], cl
mov	eax, [eax+1Ch]
add	eax, 18h
lea	ecx, [esp+0E4h+var_60]
mov	[esp+0E4h+var_D0], edx
mov	[esi+70h], eax
call	sub_68CFB0
lea	ecx, [esp+0E4h+var_78]
call	sub_64E8E0
lea	ecx, [esp+0E4h+var_40] ; void *
call	sub_64F7C0
xor	ebx, ebx
cmp	[edi+1D0h], ebx
jz	short loc_685F40
mov	eax, [edi]
mov	edx, [eax+0B4h]
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_685F40
mov	ebp, [edi+1D0h]
jmp	short loc_685F42

loc_685F40:
xor	ebp, ebp

loc_685F42:
mov	[esp+0E4h+var_D1], bl
cmp	ebp, ebx
jz	short loc_685F91
mov	eax, [ebp+0]
mov	edx, [eax+0B4h]
mov	ecx, ebp
call	edx
test	al, al
jz	short loc_685F89
mov	al, [ebp+76h]
shr	al, 4
test	al, 1
jnz	short loc_685F89
lea	ecx, [esp+0E4h+var_40]
push	ecx
lea	edx, [esp+0E8h+var_78]
push	edx
push	ebp
mov	ecx, esi
call	sub_6A7BA0
push	ebp
mov	ecx, esi
call	sub_6A7DC0
mov	[esp+0E4h+var_D1], 1
jmp	short loc_685F91

loc_685F89:
push	ebx
mov	ecx, edi
call	sub_67F760

loc_685F91:
lea	eax, [esp+0E4h+var_60]
push	eax
lea	ecx, [esp+0E8h+var_40]
push	ecx
lea	edx, [esp+0ECh+var_78]
push	edx
push	edi
lea	eax, [esp+0F4h+var_C0]
push	eax
mov	ecx, esi
call	sub_6A7E80
fldz
mov	ebp, [edi+0ACh]
fst	[esp+0E4h+var_9C]
fst	[esp+0E4h+var_98]
mov	[esp+0E4h+var_A8], bl
fst	[esp+0E4h+var_94]
mov	[esp+0E4h+var_7C], ebx
fstp	[esp+0E4h+var_90]
mov	[esp+0E4h+var_A0], ebx
mov	[esp+0E4h+var_A4], ebx
mov	[esp+0E4h+var_D2], bl
cmp	ebp, ebx
jz	short loc_686050
cmp	[ebp+0Ch], bl
jz	short loc_686050
cmp	[ebp+10h], ebx
jz	short loc_68603E
mov	ecx, [ebp+28h]
fld	dword ptr [ebp+18h]
mov	edx, [ebp+24h]
fstp	[esp+0E4h+var_C4]
fld	dword ptr [ebp+1Ch]
push	ecx		; int
fstp	[esp+0E8h+var_C8]
push	edx		; int
fld	dword ptr [ebp+20h]
sub	esp, 10h
fstp	[esp+0FCh+var_CC]
mov	eax, esp
fld	dword ptr [ebp+14h]
add	ebp, 2Ch
fstp	dword ptr [eax]
mov	ecx, esi
fld	[esp+0FCh+var_C4]
fstp	dword ptr [eax+4]
fld	[esp+0FCh+var_C8]
fstp	dword ptr [eax+8]
fld	[esp+0FCh+var_CC]
fstp	dword ptr [eax+0Ch]
mov	eax, [ebp-1Ch]
push	eax		; int
push	ebp		; int
push	edi		; int
call	sub_6A8E50
jmp	loc_6860D6

loc_68603E:
push	ebp
push	edi
lea	eax, [esp+0ECh+var_A8]
push	eax
mov	ecx, esi
call	sub_6A8370
mov	[esp+0E4h+var_D2], al

loc_686050:
cmp	[edi+1CCh], ebx
jz	short loc_686083
mov	ecx, edi
call	sub_654DA0
cmp	[edi+74h], bx
setnbe	cl
movzx	edx, cl
mov	ecx, [esi+4]
push	edx
push	eax
lea	eax, [esp+0ECh+var_60]
push	eax
push	ecx
mov	ecx, [edi+1CCh]
push	esi
call	sub_6F9540

loc_686083:
mov	eax, [edi+1DCh]
xor	bl, bl
test	eax, eax
jz	short loc_6860A2
mov	edx, [esi+48h]
mov	ecx, [edx+0Ch]
mov	edx, [ecx]
add	eax, 48h
push	eax
mov	eax, [edx+4Ch]
call	eax
mov	bl, al

loc_6860A2:
push	esi
lea	ecx, [edi+0C4h]
call	sub_65C840
test	bl, bl
jz	short loc_6860BF
mov	ecx, [esi+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+50h]
call	eax

loc_6860BF:
cmp	[esp+0E4h+var_D2], 0
jz	short loc_6860D6
push	0
push	ebp
push	edi
lea	ecx, [esp+0F0h+var_A8]
push	ecx
mov	ecx, esi
call	sub_6A87F0

loc_6860D6:
mov	edx, [esp+0E4h+var_D0]
lea	eax, [esp+0E4h+var_C0]
push	eax
mov	ecx, esi
mov	[esi+70h], edx
call	sub_6A80B0
mov	edx, [edi]
mov	eax, [edx+114h]
mov	ecx, edi
call	eax
cmp	[esp+0E4h+var_D1], 0
jz	short loc_686103
mov	ecx, esi
call	sub_6A7E50

loc_686103:
mov	esi, [esp+0E4h+var_7C]
test	esi, esi
jz	short loc_68612A
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68612A
test	esi, esi
jz	short loc_68612A
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_68612A:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0D4h
retn	4
sub_685E90 endp

align 10h



sub_686140 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
mov	ecx, [edi+8]
call	sub_661C50
mov	esi, eax
test	esi, esi
jz	short loc_68615A
inc	dword ptr [esi+4]

loc_68615A:
mov	eax, [edi+18h]
push	eax
lea	ecx, [esp+18h+var_C]
push	ecx
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
mov	eax, [esp+14h+var_C]
test	eax, eax
jz	short loc_686180
add	eax, 10h
jmp	short loc_686182

loc_686180:
xor	eax, eax

loc_686182:
push	eax
mov	ecx, esi
call	sub_655130
test	[esp+14h+var_4], 2
jnz	short loc_68619E
mov	ecx, [esp+14h+var_C]
test	ecx, ecx
jz	short loc_68619E
call	sub_64B3B0

loc_68619E:
test	[esp+14h+var_4], 1
mov	[esp+14h+var_C], 0
jnz	short loc_6861BA
mov	ecx, [esp+14h+var_8]
test	ecx, ecx
jz	short loc_6861BA
call	sub_64B3B0

loc_6861BA:
mov	[esp+14h+var_8], 0
test	esi, esi
jz	short loc_6861CD
mov	ecx, esi
call	sub_64A400

loc_6861CD:
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_686140 endp

align 10h



sub_6861E0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+30h]
call	sub_6806F0
test	byte ptr [esi+28h], 2
jnz	short loc_6861FD
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6861FD
call	sub_64B3B0

loc_6861FD:
test	byte ptr [esi+28h], 1
mov	dword ptr [esi+20h], 0
jnz	short loc_686216
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_686216
call	sub_64B3B0

loc_686216:
mov	dword ptr [esi+24h], 0
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_686229
call	sub_64A400

loc_686229:
mov	ecx, [esi+8]
pop	esi
test	ecx, ecx
jz	short locret_686236
jmp	sub_64A400

locret_686236:
retn
sub_6861E0 endp

align 10h



sub_686240 proc	near

var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 20h
push	ebx
mov	ebx, [esp+24h+arg_0]
push	esi
push	edi
mov	edi, [esp+2Ch+arg_4]
push	eax
push	edi
push	ebx
mov	esi, ecx
call	sub_6578A0
test	al, al
jnz	short loc_686289
lea	eax, [ebx-4]
cmp	eax, 41h	; switch 66 cases
ja	loc_686373	; default
			; jumptable 00686273 cases 2-7,9-23,25-28,31,34-64
movzx	ecx, ds:byte_6864C8[eax]
jmp	ds:off_6864A0[ecx*4] ; switch jump

loc_68627A:		; jumptable 00686273 case 0
mov	edx, [esi+0D8h]
inc	edx
push	edx
mov	ecx, edi
call	sub_6B7B70

loc_686289:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_686294:		; jumptable 00686273 case 1
mov	ecx, [esi+0B8h]
mov	eax, [ecx]
mov	edx, [eax+28h]
call	edx
push	eax
mov	ecx, edi
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_6862B4:		; jumptable 00686273 case 8
mov	ecx, esi
call	sub_67EC10
push	eax
mov	ecx, edi
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_6862CE:		; jumptable 00686273 case 24
mov	al, [esi+1E0h]
shr	al, 5
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, edi
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_6862EF:		; jumptable 00686273 case 29
mov	al, [esi+1E1h]
mov	ecx, edi
test	al, al
jz	short loc_68633B
cmp	al, 1
setz	dl
movzx	eax, dl
push	eax
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_686314:		; jumptable 00686273 case 30
mov	al, [esi+1E2h]
test	al, al
jz	short loc_686339
cmp	al, 1
setz	cl
movzx	edx, cl
push	edx
mov	ecx, edi
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_686339:
mov	ecx, edi

loc_68633B:
call	sub_652060
mov	byte ptr [edi],	0

loc_686343:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_68634E:		; jumptable 00686273 case 33
mov	esi, [esi+1D4h]
mov	ecx, edi
test	esi, esi
jz	short loc_68636B
push	esi
call	sub_6528C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_68636B:
call	sub_652060
mov	byte ptr [edi],	0

loc_686373:		; default
pop	edi		; jumptable 00686273 cases 2-7,9-23,25-28,31,34-64
pop	esi
xor	al, al
pop	ebx
add	esp, 20h
retn	0Ch

loc_68637E:		; jumptable 00686273 case 32
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
cmp	byte ptr [eax+7Ch], 8
jb	short loc_686373 ; default
			; jumptable 00686273 cases 2-7,9-23,25-28,31,34-64
cmp	dword ptr [esi+0C0h], 0
jz	short loc_686339
mov	eax, [esi]
mov	edx, [eax+6Ch]
push	ebp
mov	ecx, esi
call	edx
mov	ebp, eax
mov	eax, [ebp+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6863C6
push	ebp
mov	ecx, eax
call	sub_6E4FC0
mov	ebx, eax
jmp	short loc_6863C8

loc_6863C6:
xor	ebx, ebx

loc_6863C8:
mov	esi, [esi+0C0h]
fld	dword ptr [esi+4]
lea	ecx, [esp+30h+var_20]
fld	ds:dbl_15FCE20
push	ecx
fdiv	st(1), st
push	ebp
mov	ecx, ebx
fxch	st(1)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fld	dword ptr [esi+8]
fadd	dword ptr [esi]
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fdiv	st, st(2)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fld	dword ptr [esi+0Ch]
fadd	dword ptr [esi+4]
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fdiv	st, st(3)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fld	dword ptr [esi]
fdivrp	st(4), st
fxch	st(3)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fstp	[esp+38h+var_20]
fxch	st(1)
fstp	[esp+38h+var_18]
fstp	[esp+38h+var_10]
fstp	[esp+38h+var_8]
call	sub_6E39C0
push	ebx
mov	ecx, edi
call	sub_652E40
pop	ebp
test	ebx, ebx
jz	loc_686343
mov	ecx, ebx
call	sub_64B3B0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch

loc_686462:		; jumptable 00686273 case 65
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_686373	; default
			; jumptable 00686273 cases 2-7,9-23,25-28,31,34-64
mov	edx, [esi+0A0h]
shr	edx, 0Bh
and	dl, 1
movzx	eax, dl
push	eax
mov	ecx, edi
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch
sub_686240 endp

align 10h
off_6864A0 dd offset loc_68627A, offset	loc_686294 ; jump table	for switch statement
dd offset loc_6862B4, offset loc_6862CE
dd offset loc_6862EF, offset loc_686314
dd offset loc_68637E, offset loc_68634E
dd offset loc_686462, offset loc_686373
byte_6864C8 db	    0,	   1,	  9,	 9 ; indirect table for	switch statement
db	9,     9,     9,     9
db	2,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	3,     9,     9,     9
db	9,     4,     5,     9
db	6,     7,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     8
align 10h


; Attributes: bp-based frame

sub_686510 proc	near

var_C8=	qword ptr -0C8h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	qword ptr -6Ch
var_64=	byte ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 0B4h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_8]
push	0
push	edi
mov	esi, ecx
call	sub_655BA0
add	esp, 8
test	al, al
jz	loc_6867A9
push	edi
mov	ecx, esi
call	sub_6593C0
mov	ebx, [ebp+arg_C]
mov	edx, [esi]
push	0
push	ebx
mov	[esp+0C8h+var_78], eax
push	eax
mov	eax, [edx+120h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_6865C6
mov	eax, [esp+0C0h+var_78]
add	eax, 0FFFFFFDDh
cmp	eax, 4Fh	; switch 80 cases
ja	loc_6867AC	; default
			; jumptable 00686571 cases 1-72
movzx	ecx, ds:byte_6869C0[eax]
jmp	ds:off_68699C[ecx*4] ; switch jump

loc_686578:		; jumptable 00686571 case 0
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	48h
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6865B1
mov	edx, [esi]
mov	eax, [edx+70h]
push	esi
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_6DF6B0
mov	esi, eax
jmp	short loc_6865B3

loc_6865B1:
xor	esi, esi

loc_6865B3:
push	esi
mov	ecx, ebx
call	sub_652E40
test	esi, esi
jz	short loc_6865C6
mov	ecx, esi
call	sub_64B3B0

loc_6865C6:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6865D1:		; jumptable 00686571 case 79
cmp	dword ptr [esi+1BCh], 0
jl	loc_6867AC	; default
			; jumptable 00686571 cases 1-72
mov	edx, [esi]
mov	eax, [edx+70h]
push	offset aWin8000	; "WIN 8,0,0,0"
lea	ecx, [esp+0C4h+var_78]
push	ecx
mov	ecx, esi
call	eax
mov	ecx, eax
call	sub_651CB0
push	eax
mov	ecx, ebx
call	sub_64A680
mov	eax, [esp+0C0h+var_78]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_686616
call	sub_650DF0

loc_686616:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_686621:		; jumptable 00686571 case 77
mov	ebx, [esi+5Ch]
test	ebx, ebx
jnz	short loc_68662D
mov	ebx, offset unk_167D018

loc_68662D:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	50h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_68665F
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
push	eax
mov	ecx, edi
call	sub_65EF40
mov	edi, eax
jmp	short loc_686661

loc_68665F:
xor	edi, edi

loc_686661:
push	10h
mov	ecx, edi
call	sub_65E410
xor	esi, esi
lea	esp, [esp+0]

loc_686670:
fld	dword ptr [ebx+esi*4]
lea	eax, [esp+0C0h+var_70]
fstp	[esp+0C0h+var_74]
push	eax
fld	[esp+0C4h+var_74]
push	esi
mov	ecx, edi
fstp	[esp+0C8h+var_6C]
mov	byte ptr [esp+0C8h+var_70], 3
call	sub_65DA40
lea	ecx, [esp+0C0h+var_70]
call	sub_652830
inc	esi
cmp	esi, 10h
jl	short loc_686670
mov	ecx, [ebp+arg_C]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6866B4
mov	ecx, edi
call	sub_64B3B0

loc_6866B4:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6866BF:		; jumptable 00686571 case 78
lea	ecx, [esp+0C0h+var_58]
call	sub_64A790
push	0		; float
mov	ecx, esi
call	sub_654A80
sub	esp, 8
mov	ecx, ebx
fstp	[esp+0C8h+var_C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6866E9:		; jumptable 00686571 case 73
lea	ecx, [esp+0C0h+var_58]
call	sub_64A790
lea	ecx, [esp+0C0h+var_58]
push	ecx
mov	ecx, esi
call	sub_655C40
fld	qword ptr [eax+38h]
sub	esp, 8
mov	ecx, ebx
fstp	[esp+0C8h+var_C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_686719:		; jumptable 00686571 case 74
lea	ecx, [esp+0C0h+var_58]
call	sub_64A790
lea	edx, [esp+0C0h+var_58]
push	edx
mov	ecx, esi
call	sub_655C40
fld	qword ptr [eax+40h]
sub	esp, 8
mov	ecx, ebx
fstp	[esp+0C8h+var_C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_686749:		; jumptable 00686571 case 75
lea	ecx, [esp+0C0h+var_58]
call	sub_64A790
lea	eax, [esp+0C0h+var_58]
push	eax
mov	ecx, esi
call	sub_655C40
fld	qword ptr [eax+48h]
sub	esp, 8
mov	ecx, ebx
fstp	[esp+0C8h+var_C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_686779:		; jumptable 00686571 case 76
lea	ecx, [esp+0C0h+var_58]
call	sub_64A790
lea	ecx, [esp+0C0h+var_58]
push	ecx
mov	ecx, esi
call	sub_655C40
fld	qword ptr [eax+50h]
sub	esp, 8
mov	ecx, ebx
fstp	[esp+0C8h+var_C8]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6867A9:
mov	ebx, [ebp+arg_C]

loc_6867AC:		; default
mov	edx, [ebp+arg_0] ; jumptable 00686571 cases 1-72
test	edx, edx
jz	short loc_6867C0
mov	eax, [edx+78h]
mov	ecx, [edi]
cmp	ecx, [eax+144h]
jz	short loc_6867D3

loc_6867C0:
mov	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_6867EC
mov	eax, [eax]
mov	ecx, [edi]
cmp	ecx, [eax+144h]
jnz	short loc_6867EC

loc_6867D3:
mov	edx, [esi+80h]
push	edx
mov	ecx, ebx
call	sub_652E40
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6867EC:
mov	ebx, [esi+1C4h]
test	ebx, ebx
jz	loc_6868B8
mov	eax, [ebx+18h]
test	eax, eax
jz	short loc_68680E
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_68680E:
mov	eax, [ebx+18h]
mov	ecx, eax
mov	[esp+0C0h+var_78], eax
test	ecx, ecx
jz	short loc_686823
call	sub_64B3B0
mov	edx, [ebp+arg_0]

loc_686823:
mov	dword ptr [ebx+18h], 0
xor	bl, bl
test	edx, edx
jz	short loc_68684A
push	[ebp+arg_C]
mov	ecx, [esi+1C4h]
mov	eax, [ecx+10h]
add	ecx, 10h
push	edi
push	edx
mov	edx, [eax+10h]
call	edx
test	al, al
jnz	short loc_68686B

loc_68684A:
mov	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_68686D
push	[ebp+arg_C]
mov	ecx, [esi+1C4h]
mov	edx, [ecx+10h]
add	ecx, 10h
push	edi
push	eax
mov	eax, [edx+2Ch]
call	eax
test	al, al
jz	short loc_68686D

loc_68686B:
mov	bl, 1

loc_68686D:
mov	ecx, [esp+0C0h+var_78]
push	ecx
mov	ecx, [esi+1C4h]
lea	edx, [esp+0C4h+var_74]
push	edx
call	sub_684C90
mov	ecx, [esp+0C0h+var_74]
test	ecx, ecx
jz	short loc_68688F
call	sub_64B3B0

loc_68688F:
mov	ecx, [esp+0C0h+var_78]
test	bl, bl
jz	short loc_6868AF
test	ecx, ecx
jz	loc_6865C6
call	sub_64B3B0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6868AF:
test	ecx, ecx
jz	short loc_6868B8
call	sub_64B3B0

loc_6868B8:
push	edi
lea	eax, [esi+160h]
push	eax
lea	ecx, [esi+0C4h]
call	sub_65C5D0
test	eax, eax
jz	short loc_6868E3
mov	ecx, [ebp+arg_C]
push	eax
call	sub_6528F0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6868E3:
mov	ebx, [esi+80h]
test	ebx, ebx
jz	short loc_68692F
cmp	[ebp+arg_0], 0
jz	short loc_68690F
mov	eax, [ebp+arg_C]
mov	edx, [ebx+10h]
mov	edx, [edx+10h]
push	eax
mov	eax, [ebp+arg_0]
lea	ecx, [ebx+10h]
push	edi
push	eax
call	edx
test	al, al
jnz	loc_6865C6

loc_68690F:
mov	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_68692F
mov	edx, [ebx+10h]
lea	ecx, [ebx+10h]
mov	ebx, [ebp+arg_C]
push	ebx
push	edi
push	eax
mov	eax, [edx+2Ch]
call	eax
test	al, al
jnz	loc_6865C6

loc_68692F:
mov	ecx, edi
call	sub_650650
test	eax, eax
jbe	short loc_68698F
mov	ecx, [edi]
mov	edx, [ecx]
cmp	byte ptr [edx],	5Fh
jnz	short loc_68698F
mov	eax, [ebp+arg_C]
lea	ecx, [esp+0C0h+var_70]
push	ecx
mov	dword ptr [esp+0C4h+var_6C], eax
xor	eax, eax
lea	edx, [esp+0C4h+var_79]
push	edx
lea	ecx, [esi+0E8h]
mov	[esp+0C8h+var_70], edi
mov	dword ptr [esp+0C8h+var_6C+4], eax
mov	dword ptr [esp+0C8h+var_64], eax
mov	[esp+0C8h+var_60], eax
mov	[esp+0C8h+var_5C], eax
call	sub_668AE0
mov	al, [esp+0C0h+var_79]
test	al, al
jz	short loc_68698F
xor	ecx, ecx
cmp	al, 1
setz	cl
mov	al, cl
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_68698F:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_686510 endp

align 4
off_68699C dd offset loc_686578, offset	loc_6866E9 ; jump table	for switch statement
dd offset loc_686719, offset loc_686749
dd offset loc_686779, offset loc_686621
dd offset loc_6866BF, offset loc_6865D1
dd offset loc_6867AC
byte_6869C0 db	    0,	   8,	  8,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     1,     2,     3
db	4,     5,     6,     7



sub_686A10 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0A4h
push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 0Bh
test	al, 1
jz	short loc_686A32
xor	al, al
pop	esi
add	esp, 0A4h
retn	8

loc_686A32:
test	byte ptr [esi+76h], 1
push	ebx
jnz	short loc_686AAF
mov	edx, [esi]
mov	eax, [edx+8]
call	eax
test	al, al
jnz	short loc_686AAF
lea	ecx, [esp+0ACh+var_58]
call	sub_64E8E0
mov	edx, [esi]
mov	edx, [edx+34h]
lea	eax, [esp+0ACh+var_58]
push	eax
lea	ecx, [esp+0B0h+var_8C]
push	ecx
mov	ecx, esi
call	edx
mov	ebx, [esp+0ACh+arg_0]
fld	dword ptr [ebx]
mov	ecx, eax
fld	dword ptr [ecx+8]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_686AA2
fld	dword ptr [ebx]
fld	dword ptr [ecx]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_686AA2
fld	dword ptr [ebx+4]
fld	dword ptr [ecx+0Ch]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_686AA2
fld	dword ptr [ebx+4]
fld	dword ptr [ecx+4]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_686AB6

loc_686AA2:
pop	ebx
xor	al, al
pop	esi
add	esp, 0A4h
retn	8

loc_686AAF:
mov	ebx, [esp+0ACh+arg_0]

loc_686AB6:
mov	al, byte ptr [esp+0ACh+arg_4]
and	al, 2
mov	byte ptr [esp+0ACh+var_A4+3], al
jz	short loc_686AD2
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_686AA2

loc_686AD2:
cmp	dword ptr [esi+1D0h], 0
push	ebp
mov	ebp, [esi+0C8h]
push	edi
jz	loc_686B81
mov	eax, [esi]
mov	edx, [eax+0B4h]
mov	ecx, esi
call	edx
test	al, al
jnz	loc_686B81
mov	edi, [esi+1D0h]
test	edi, edi
jz	short loc_686B81
mov	eax, [edi]
mov	edx, [eax+0B4h]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_686B81
mov	al, [edi+76h]
shr	al, 4
test	al, 1
jnz	short loc_686B81
lea	ecx, [esp+0B4h+var_8C]
call	sub_64E8E0
lea	ecx, [esp+0B4h+var_58]
push	ecx
mov	ecx, edi
call	sub_6552D0
push	eax
lea	ecx, [esp+0B8h+var_8C]
call	sub_64E9E0
lea	edx, [esp+0B4h+var_58]
push	edx
mov	ecx, esi
call	sub_6552D0
push	eax
lea	ecx, [esp+0B8h+var_8C]
call	sub_64EAF0
push	ebx
lea	eax, [esp+0B8h+var_94]
push	eax
lea	ecx, [esp+0BCh+var_8C]
call	sub_64E9B0
mov	eax, [esp+0B4h+arg_4]
mov	edx, [edi]
mov	edx, [edx+44h]
push	eax
lea	ecx, [esp+0B8h+var_94]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	loc_686D6B

loc_686B81:
movzx	eax, byte ptr [esp+0B4h+arg_4]
and	al, 1
mov	byte ptr [esp+0B4h+var_74], al
xor	edi, edi
mov	ecx, esi
mov	[esp+0B4h+var_8C], edi
mov	[esp+0B4h+var_88], edi
mov	[esp+0B4h+var_84], edi
push	eax
push	ebx
lea	eax, [esp+0BCh+var_8C]
push	eax
call	sub_685160
lea	ecx, [esp+0B4h+var_70]
call	sub_64E8E0
fld	dword ptr [ebx]
dec	ebp
cmp	ebp, edi
fstp	[esp+0B4h+var_9C]
fld	dword ptr [ebx+4]
mov	[esp+0B4h+var_A0], ebp
fstp	[esp+0B4h+var_98]
jl	loc_686D1E
mov	edi, edi

loc_686BD0:
cmp	byte ptr [esp+0B4h+var_A4+3], 0
mov	ecx, [esi+0C4h]
mov	edi, [ecx+ebp*4]
jz	short loc_686BF1
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
test	al, al
jz	loc_686D11

loc_686BF1:
cmp	[esp+0B4h+var_88], 0
jz	short loc_686C11
mov	ecx, [esp+0B4h+var_8C]
cmp	byte ptr [ecx+ebp], 0
jz	loc_686D11
cmp	word ptr [edi+74h], 0
ja	loc_686D11

loc_686C11:
push	1
mov	ecx, edi
call	sub_654BF0
test	al, al
jz	loc_686CAE
push	0
mov	ecx, edi
call	sub_654D00
push	0
mov	ecx, edi
mov	ebp, eax
call	sub_654D50
mov	ebx, eax
test	ebp, ebp
jz	short loc_686C4B
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E0h], ebp

loc_686C4B:
test	ebx, ebx
jz	short loc_686C5E
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E4h], ebx

loc_686C5E:		; void *
lea	ecx, [esp+0B4h+var_40]
call	sub_64F7C0
lea	ecx, [esp+0B4h+var_40]
push	ecx
mov	ecx, edi
call	sub_654C80
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
lea	ecx, [esp+0B4h+var_40]
mov	[eax+0E8h], ecx
mov	eax, [esi]
lea	edx, [esp+0B4h+var_9C]
push	edx
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
mov	ebp, [esp+0B4h+var_A0]
mov	ebx, [esp+0B4h+arg_0]
jmp	short loc_686CF7

loc_686CAE:
fld	dword ptr [edi+44h]
push	ebx
fstp	[esp+0B8h+var_70]
lea	eax, [esp+0B8h+var_94]
fld	dword ptr [edi+48h]
push	eax
fstp	[esp+0BCh+var_6C]
lea	ecx, [esp+0BCh+var_70]
fld	dword ptr [edi+4Ch]
fstp	[esp+0BCh+var_68]
fld	dword ptr [edi+50h]
fstp	[esp+0BCh+var_64]
fld	dword ptr [edi+54h]
fstp	[esp+0BCh+var_60]
fld	dword ptr [edi+58h]
fstp	[esp+0BCh+var_5C]
call	sub_64EC70
fld	[esp+0B4h+var_94]
fstp	[esp+0B4h+var_9C]
fld	[esp+0B4h+var_90]
fstp	[esp+0B4h+var_98]

loc_686CF7:
mov	eax, [esp+0B4h+arg_4]
mov	edx, [edi]
mov	edx, [edx+44h]
push	eax
lea	ecx, [esp+0B8h+var_9C]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_686D38

loc_686D11:
sub	ebp, 1
mov	[esp+0B4h+var_A0], ebp
jns	loc_686BD0

loc_686D1E:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_686D59
mov	edx, [esp+0B4h+var_74]
push	esi
push	edx
push	ebx
call	sub_6F9660
test	al, al
jz	short loc_686D59

loc_686D38:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+0B4h+var_8C]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
add	esp, 0A4h
retn	8

loc_686D59:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+0B4h+var_8C]
mov	edx, [edx+30h]
push	eax
call	edx

loc_686D6B:
pop	edi
pop	ebp
pop	ebx
xor	al, al
pop	esi
add	esp, 0A4h
retn	8
sub_686A10 endp

align 10h



sub_686D80 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 1Ch
push	ebx
mov	ebx, ecx
mov	eax, [ebx+0C8h]
mov	[esp+20h+var_14], ebx
mov	[esp+20h+var_1C], eax
test	eax, eax
jz	loc_686F2E
cmp	byte ptr [ebx+1E2h], 0
push	ebp
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
jnz	loc_686E50
cmp	byte ptr [edi+6], 0
jnz	loc_686E50
mov	eax, [ebx+80h]
test	eax, eax
jz	loc_686E50
mov	esi, [eax+10h]
lea	edi, [eax+10h]
lea	eax, [esp+2Ch+var_10]
push	eax
push	offset aTabchildren ; "tabChildren"
lea	ecx, [esp+34h+var_18]
lea	ebp, [ebx+0E8h]
push	ecx
mov	ecx, ebp
mov	[esp+38h+var_10], 0
add	esi, 2Ch
call	sub_651CB0
mov	edx, [esi]
push	eax
add	ebx, 160h
push	ebx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+2Ch+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_686E18
call	sub_650DF0

loc_686E18:
test	bl, bl
jz	short loc_686E3F
mov	al, [esp+2Ch+var_10]
test	al, al
jz	short loc_686E3F
cmp	al, 0Ah
jz	short loc_686E3F
push	ebp
lea	ecx, [esp+30h+var_10]
call	sub_651D80
mov	ecx, [esp+2Ch+arg_0]
neg	al
sbb	al, al
add	al, 2
mov	[ecx+6], al

loc_686E3F:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	ebx, [esp+2Ch+var_14]
mov	edi, [esp+2Ch+arg_0]

loc_686E50:
cmp	byte ptr [ebx+1E2h], 2
jz	loc_686F2B
cmp	byte ptr [edi+6], 2
jz	loc_686F2B
xor	ebp, ebp
cmp	[esp+2Ch+var_1C], ebp
jbe	loc_686F2B

loc_686E73:
mov	edx, [ebx+0C4h]
mov	esi, [edx+ebp*4]
test	esi, esi
jz	loc_686F20
mov	al, [esi+76h]
shr	al, 7
test	al, 1
jz	loc_686F20
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
test	al, al
jz	loc_686F20
inc	dword ptr [esi+4]
cmp	word ptr [esi+0A4h], 0
mov	[esp+2Ch+arg_0], esi
jle	short loc_686ECB
cmp	byte ptr [edi+4], 0
jnz	short loc_686ECB
mov	ecx, [edi]
mov	edx, [ecx+0Ch]
push	0
push	edx
call	sub_6833F0
mov	byte ptr [edi+4], 1

loc_686ECB:
mov	eax, [esi]
mov	edx, [eax+0D4h]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_686EF0
cmp	[edi+5], al
jz	short loc_686F0C
mov	eax, [esi]
mov	edx, [eax+0DCh]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_686F0C

loc_686EF0:
cmp	byte ptr [edi+4], 0
jz	short loc_686F00
cmp	word ptr [esi+0A4h], 0
jle	short loc_686F0C

loc_686F00:
mov	ecx, [edi]
lea	eax, [esp+28h+arg_4]
push	eax
call	sub_684B20

loc_686F0C:
mov	edx, [esi]
mov	eax, [edx+0E4h]
push	edi
mov	ecx, esi
call	eax
mov	ecx, esi
call	sub_64A400

loc_686F20:
inc	ebp
cmp	ebp, [esp+2Ch+var_1C]
jb	loc_686E73

loc_686F2B:
pop	edi
pop	esi
pop	ebp

loc_686F2E:
pop	ebx
add	esp, 1Ch
retn	4
sub_686D80 endp

align 10h



sub_686F40 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_40=	byte ptr -40h
var_3C=	qword ptr -3Ch
var_30=	byte ptr -30h
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_8= byte ptr	 0Ch

sub	esp, 58h
push	ebp
mov	ebp, [esp+5Ch+arg_0]
mov	ecx, [ebp+8]
push	edi
test	ecx, ecx
jnz	short loc_686F58
mov	eax, [ebp+18h]
mov	edi, [eax+74h]
jmp	short loc_686F76

loc_686F58:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_687184
mov	eax, [ebp+8]
test	eax, eax
jz	loc_687184
lea	edi, [eax-78h]

loc_686F76:
test	edi, edi
jz	loc_687184
cmp	dword ptr [ebp+1Ch], 0
jle	short loc_686F9A
mov	ecx, [ebp+18h]
push	ecx
push	0
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
jmp	short loc_686F9C

loc_686F9A:
mov	eax, edi

loc_686F9C:
push	ebx
push	esi
test	eax, eax
jz	short loc_686FAE
lea	ecx, [eax+78h]
call	sub_661C50
mov	esi, eax
jmp	short loc_686FB0

loc_686FAE:
xor	esi, esi

loc_686FB0:
fldz
lea	ecx, [esp+68h+var_30]
fst	[esp+68h+var_58]
fst	[esp+68h+var_54]
fst	[esp+68h+var_50]
fstp	[esp+68h+var_4C]
call	sub_64E8E0
test	esi, esi
jz	short loc_687044
cmp	esi, edi
jz	short loc_687019
lea	ecx, [esp+68h+var_48]
call	sub_64E8E0
lea	edx, [esp+68h+var_48]
push	edx
mov	ecx, esi
call	sub_654AF0
lea	eax, [esp+68h+var_48]
push	eax
lea	ecx, [esp+6Ch+var_30]
call	sub_64E9E0
lea	ecx, [esp+68h+var_48]
call	sub_64E8E0
lea	ecx, [esp+68h+var_48]
push	ecx
mov	ecx, edi
call	sub_654AF0
lea	edx, [esp+68h+var_48]
push	edx
lea	ecx, [esp+6Ch+var_30]
call	sub_64EAF0

loc_687019:
lea	ecx, [esp+68h+var_18]
call	sub_64E8E0
mov	eax, [edi]
mov	eax, [eax+34h]
lea	ecx, [esp+68h+var_18]
push	ecx
lea	edx, [esp+6Ch+var_48]
push	edx
mov	ecx, edi
call	eax
push	eax
lea	ecx, [esp+6Ch+var_58]
push	ecx
lea	ecx, [esp+70h+var_30]
call	sub_64EF10

loc_687044:
mov	edx, [ebp+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_68706E
mov	ecx, [ebp+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	ebx, eax
jmp	short loc_687070

loc_68706E:
xor	ebx, ebx

loc_687070:
fld	[esp+60h+var_50]
mov	esi, [ebp+18h]
fdiv	ds:dbl_15FCE20
mov	edx, [ebx+10h]
mov	edx, [edx+28h]
lea	eax, [esp+60h+arg_8]
push	eax
mov	eax, [esi+78h]
add	esi, 78h
lea	ecx, [esp+64h+var_40]
push	ecx
lea	edi, [ebx+10h]
add	eax, 218h
push	eax
push	esi
mov	ecx, edi
mov	[esp+70h+var_40], 3
mov	[esp+70h+arg_8], 0
fstp	[esp+70h+var_3C]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
fld	[esp+68h+var_50]
fdiv	ds:dbl_15FCE20
mov	eax, [edi]
lea	ecx, [esp+68h+arg_0]
push	ecx
mov	ecx, [esi]
lea	edx, [esp+6Ch+var_48]
push	edx
mov	edx, [eax+28h]
add	ecx, 21Ch
push	ecx
push	esi
mov	ecx, edi
mov	[esp+78h+var_48], 3
mov	byte ptr [esp+78h+arg_0], 0
fstp	qword ptr [esp+34h]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
fld	[esp+68h+var_54]
fdiv	ds:dbl_15FCE20
mov	eax, [edi]
lea	ecx, [esp+68h+arg_0]
push	ecx
mov	ecx, [esi]
lea	edx, [esp+6Ch+var_48]
push	edx
mov	edx, [eax+28h]
add	ecx, 220h
push	ecx
push	esi
mov	ecx, edi
mov	[esp+78h+var_48], 3
mov	byte ptr [esp+78h+arg_0], 0
fstp	qword ptr [esp+34h]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
fld	[esp+68h+var_4C]
fdiv	ds:dbl_15FCE20
mov	eax, [edi]
lea	ecx, [esp+68h+arg_0]
push	ecx
mov	ecx, [esi]
lea	edx, [esp+6Ch+var_48]
push	edx
mov	edx, [eax+28h]
add	ecx, 224h
push	ecx
push	esi
mov	ecx, edi
mov	[esp+78h+var_48], 3
mov	byte ptr [esp+78h+arg_0], 0
fstp	qword ptr [esp+34h]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
mov	ecx, [ebp+4]
push	ebx
call	sub_652E40
mov	ecx, ebx
call	sub_64B3B0
pop	esi
pop	ebx

loc_687184:
pop	edi
pop	ebp
add	esp, 58h
retn
sub_686F40 endp

align 10h



sub_687190 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_40=	byte ptr -40h
var_3C=	qword ptr -3Ch
var_30=	byte ptr -30h
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_8= byte ptr	 0Ch

sub	esp, 58h
push	ebp
mov	ebp, [esp+5Ch+arg_0]
mov	ecx, [ebp+8]
push	edi
test	ecx, ecx
jnz	short loc_6871A8
mov	eax, [ebp+18h]
mov	edi, [eax+74h]
jmp	short loc_6871C6

loc_6871A8:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_6873D4
mov	eax, [ebp+8]
test	eax, eax
jz	loc_6873D4
lea	edi, [eax-78h]

loc_6871C6:
test	edi, edi
jz	loc_6873D4
cmp	dword ptr [ebp+1Ch], 0
jle	short loc_6871EA
mov	ecx, [ebp+18h]
push	ecx
push	0
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
jmp	short loc_6871EC

loc_6871EA:
mov	eax, edi

loc_6871EC:
push	ebx
push	esi
test	eax, eax
jz	short loc_6871FE
lea	ecx, [eax+78h]
call	sub_661C50
mov	esi, eax
jmp	short loc_687200

loc_6871FE:
xor	esi, esi

loc_687200:
fldz
lea	ecx, [esp+68h+var_30]
fst	[esp+68h+var_58]
fst	[esp+68h+var_54]
fst	[esp+68h+var_50]
fstp	[esp+68h+var_4C]
call	sub_64E8E0
test	esi, esi
jz	short loc_687294
cmp	esi, edi
jz	short loc_687269
lea	ecx, [esp+68h+var_48]
call	sub_64E8E0
lea	edx, [esp+68h+var_48]
push	edx
mov	ecx, esi
call	sub_654AF0
lea	eax, [esp+68h+var_48]
push	eax
lea	ecx, [esp+6Ch+var_30]
call	sub_64E9E0
lea	ecx, [esp+68h+var_48]
call	sub_64E8E0
lea	ecx, [esp+68h+var_48]
push	ecx
mov	ecx, edi
call	sub_654AF0
lea	edx, [esp+68h+var_48]
push	edx
lea	ecx, [esp+6Ch+var_30]
call	sub_64EAF0

loc_687269:
lea	ecx, [esp+68h+var_18]
call	sub_64E8E0
mov	eax, [edi]
mov	eax, [eax+40h]
lea	ecx, [esp+68h+var_18]
push	ecx
lea	edx, [esp+6Ch+var_48]
push	edx
mov	ecx, edi
call	eax
push	eax
lea	ecx, [esp+6Ch+var_58]
push	ecx
lea	ecx, [esp+70h+var_30]
call	sub_64EF10

loc_687294:
mov	edx, [ebp+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6872BE
mov	ecx, [ebp+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	ebx, eax
jmp	short loc_6872C0

loc_6872BE:
xor	ebx, ebx

loc_6872C0:
fld	[esp+60h+var_50]
mov	esi, [ebp+18h]
fdiv	ds:dbl_15FCE20
mov	edx, [ebx+10h]
mov	edx, [edx+28h]
lea	eax, [esp+60h+arg_8]
push	eax
mov	eax, [esi+78h]
add	esi, 78h
lea	ecx, [esp+64h+var_40]
push	ecx
lea	edi, [ebx+10h]
add	eax, 218h
push	eax
push	esi
mov	ecx, edi
mov	[esp+70h+var_40], 3
mov	[esp+70h+arg_8], 0
fstp	[esp+70h+var_3C]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
fld	[esp+68h+var_50]
fdiv	ds:dbl_15FCE20
mov	eax, [edi]
lea	ecx, [esp+68h+arg_0]
push	ecx
mov	ecx, [esi]
lea	edx, [esp+6Ch+var_48]
push	edx
mov	edx, [eax+28h]
add	ecx, 21Ch
push	ecx
push	esi
mov	ecx, edi
mov	[esp+78h+var_48], 3
mov	byte ptr [esp+78h+arg_0], 0
fstp	qword ptr [esp+34h]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
fld	[esp+68h+var_54]
fdiv	ds:dbl_15FCE20
mov	eax, [edi]
lea	ecx, [esp+68h+arg_0]
push	ecx
mov	ecx, [esi]
lea	edx, [esp+6Ch+var_48]
push	edx
mov	edx, [eax+28h]
add	ecx, 220h
push	ecx
push	esi
mov	ecx, edi
mov	[esp+78h+var_48], 3
mov	byte ptr [esp+78h+arg_0], 0
fstp	qword ptr [esp+34h]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
fld	[esp+68h+var_4C]
fdiv	ds:dbl_15FCE20
mov	eax, [edi]
lea	ecx, [esp+68h+arg_0]
push	ecx
mov	ecx, [esi]
lea	edx, [esp+6Ch+var_48]
push	edx
mov	edx, [eax+28h]
add	ecx, 224h
push	ecx
push	esi
mov	ecx, edi
mov	[esp+78h+var_48], 3
mov	byte ptr [esp+78h+arg_0], 0
fstp	qword ptr [esp+34h]
call	edx
lea	ecx, [esp+68h+var_48]
call	sub_652830
mov	ecx, [ebp+4]
push	ebx
call	sub_652E40
mov	ecx, ebx
call	sub_64B3B0
pop	esi
pop	ebx

loc_6873D4:
pop	edi
pop	ebp
add	esp, 58h
retn
sub_687190 endp

align 10h



sub_6873E0 proc	near

arg_0= dword ptr  4

push	ebx
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi+8]
test	ecx, ecx
jnz	short loc_6873F5
mov	eax, [edi+18h]
mov	ebx, [eax+74h]
jmp	short loc_68740B

loc_6873F5:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	short loc_68745C
mov	eax, [edi+8]
test	eax, eax
jz	short loc_68745C
lea	ebx, [eax-78h]

loc_68740B:
test	ebx, ebx
jz	short loc_68745C
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	0
push	48h
call	edx
test	eax, eax
jz	short loc_68743A
mov	ecx, [edi+18h]
push	ecx
mov	ecx, eax
call	sub_6D93E0
mov	esi, eax
jmp	short loc_68743C

loc_68743A:
xor	esi, esi

loc_68743C:
push	ebx
mov	ecx, esi
call	sub_6D8180
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_68745B
mov	ecx, esi
pop	esi
pop	edi
pop	ebx
jmp	sub_64B3B0

loc_68745B:
pop	esi

loc_68745C:
pop	edi
pop	ebx
retn
sub_6873E0 endp

align 10h



sub_687460 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 34h
push	esi
mov	esi, [esp+38h+arg_0]
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_68747B
mov	eax, [esi+18h]
mov	ecx, [eax+74h]
mov	[esp+38h+arg_0], ecx
jmp	short loc_68749D

loc_68747B:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_6875FA
mov	eax, [esi+8]
test	eax, eax
jz	loc_6875FA
add	eax, 0FFFFFF88h
mov	[esp+38h+arg_0], eax

loc_68749D:
cmp	[esp+38h+arg_0], 0
jz	loc_6875FA
cmp	dword ptr [esi+1Ch], 0
jle	loc_6875FA
mov	ecx, [esi+18h]
push	ebp
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebp, eax
test	ebp, ebp
jz	loc_6875F9
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx
mov	eax, [ebp+10h]
mov	edx, [eax+8]
lea	ecx, [ebp+10h]
call	edx
cmp	eax, 1Ah
jnz	loc_6875F2
mov	eax, [ebp+34h]
mov	[esp+3Ch+var_34], eax
test	eax, eax
jz	loc_6875F2
push	ebx
lea	ecx, [esp+40h+var_30]
call	sub_64E8E0
cmp	dword ptr [esi+1Ch], 1
jle	loc_6875C4
mov	eax, [esi+18h]
push	edi
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_687579
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 0Fh
jnz	short loc_687579
mov	ecx, [esi+18h]
push	ecx
lea	edx, [esp+48h+var_18]
push	edx
mov	ecx, edi
call	sub_6E0A10
fld	dword ptr [eax]
fstp	[esp+44h+var_30]
fld	dword ptr [eax+4]
fstp	[esp+44h+var_2C]
fld	dword ptr [eax+8]
fstp	[esp+44h+var_28]
fld	dword ptr [eax+0Ch]
fstp	[esp+44h+var_24]
fld	dword ptr [eax+10h]
fstp	[esp+44h+var_20]
fld	dword ptr [eax+14h]
fstp	[esp+44h+var_1C]

loc_687579:
cmp	dword ptr [esi+1Ch], 2
pop	edi
jle	short loc_6875C4
mov	eax, [esi+18h]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
cmp	dword ptr [esi+1Ch], 3
mov	bl, al
jle	short loc_6875C0
mov	ecx, [esi+18h]
push	ecx
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
jz	short loc_6875C0
xor	eax, eax
test	bl, bl
setz	al
add	eax, 40h
jmp	short loc_6875D0

loc_6875C0:
test	bl, bl
jz	short loc_6875CB

loc_6875C4:
mov	eax, 42h
jmp	short loc_6875D0

loc_6875CB:
mov	eax, 43h

loc_6875D0:
mov	ecx, [esp+40h+var_34]
lea	edx, [esp+40h+var_30]
push	edx
push	ecx
mov	ecx, [esp+48h+arg_0]
push	eax
call	sub_682240
mov	ecx, ebp
call	sub_64B3B0
pop	ebx
pop	ebp
pop	esi
add	esp, 34h
retn

loc_6875F2:
mov	ecx, ebp
call	sub_64B3B0

loc_6875F9:
pop	ebp

loc_6875FA:
pop	esi
add	esp, 34h
retn
sub_687460 endp

align 10h



sub_687600 proc	near

var_68=	dword ptr -68h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_40=	dword ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 54h
push	ebx
push	ebp
push	esi
push	edi
lea	eax, [esp+64h+var_54]
push	eax
mov	esi, ecx
call	sub_6835B0
mov	edi, [esp+64h+var_54]
mov	ebp, [esp+64h+arg_0]
mov	ebx, [esp+64h+arg_4]
test	edi, edi
jz	short loc_687632
mov	edx, [edi]
mov	eax, [edx+68h]
push	0
mov	ecx, edi
call	eax
cmp	eax, edi
jz	short loc_687681

loc_687632:
mov	eax, [ebx]
cmp	dword ptr [eax+10h], 2
jbe	short loc_687681
mov	eax, [eax]
cmp	byte ptr [eax],	6Fh
jnz	short loc_687681
cmp	byte ptr [eax+1], 6Eh
jnz	short loc_687681
mov	edx, [esi+10h]
mov	edx, [edx+2Ch]
lea	eax, [esp+64h+var_50]
push	eax
lea	ecx, [esi+10h]
push	ebx
push	ebp
mov	byte ptr [esp+70h+var_50], 0
call	edx
test	al, al
jnz	short loc_687678
push	ebx
push	ebp
call	sub_67E670
movzx	eax, ax
add	esp, 8
test	ax, ax
jz	short loc_687678
or	[esi+38h], ax

loc_687678:
lea	ecx, [esp+64h+var_50]
call	sub_652830

loc_687681:
test	edi, edi
jz	loc_6877B9
mov	eax, [ebx]
mov	ecx, [eax+0Ch]
shr	ecx, 1Fh
test	cl, 1
jz	loc_6877B2
mov	ecx, [ebp+0]
cmp	eax, [ecx+268h]
jnz	short loc_6876DB
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
push	ecx
mov	ecx, esp
push	0
push	0FFFFFFFFh
push	eax
push	ecx
mov	ecx, [esp+78h+arg_8]
call	sub_652F60
mov	ecx, edi
call	sub_67E9B0
mov	ecx, edi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn	0Ch

loc_6876DB:
cmp	eax, [ecx+26Ch]
jnz	short loc_68771A
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	ecx, [esp+64h+arg_8]
push	eax
call	sub_653400
fstp	[esp+64h+arg_8]
fld	[esp+64h+arg_8]
push	ecx		; float
mov	ecx, edi
fstp	[esp+68h+var_68]
call	sub_67EA60
mov	ecx, edi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn	0Ch

loc_68771A:
cmp	eax, [ecx+270h]
jnz	loc_6877B2
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	ecx, [esp+64h+arg_8]
push	eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	short loc_6877B2
mov	ecx, [ebx+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebx+8], ecx
mov	edx, [ebx+10h]
mov	eax, [edx+8]
lea	ecx, [ebx+10h]
call	eax
cmp	eax, 7
jnz	short loc_6877AB
mov	eax, [ebx+3Ch]
cmp	eax, 10h
mov	[esp+64h+arg_8], 10h
jg	short loc_687770
mov	[esp+64h+arg_8], eax

loc_687770:
xor	esi, esi
cmp	[esp+64h+arg_8], esi
jbe	short loc_68779A

loc_687778:
mov	ecx, [ebx+38h]
mov	edx, [edi]
mov	ebp, [ecx+esi*4]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
push	eax
mov	ecx, ebp
call	sub_653400
fstp	[esp+esi*4+64h+var_40]
inc	esi
cmp	esi, [esp+64h+arg_8]
jb	short loc_687778

loc_68779A:
mov	ecx, [esp+64h+arg_8]
push	ecx
lea	edx, [esp+68h+var_40]
push	edx
mov	ecx, edi
call	sub_67EAF0

loc_6877AB:
mov	ecx, ebx
call	sub_64B3B0

loc_6877B2:
mov	ecx, edi
call	sub_64A400

loc_6877B9:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn	0Ch
sub_687600 endp

align 10h



sub_6877D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [esp+10h+arg_8]
push	edi
mov	esi, ecx
push	ebx
push	ebp
lea	ecx, [esi-10h]
call	sub_687600
mov	eax, [esp+10h+arg_C]
push	eax
push	edi
push	ebx
push	ebp
mov	ecx, esi
call	sub_665530
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_6877D0 endp

align 10h



sub_687810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [esp+10h+arg_8]
push	edi
mov	esi, ecx
push	ebx
lea	eax, [ebp+78h]
push	eax
lea	ecx, [esi-10h]
call	sub_687600
mov	ecx, [esp+10h+arg_C]
push	ecx
push	edi
push	ebx
push	ebp
mov	ecx, esi
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_687810 endp

align 10h



sub_687850 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
mov	ebp, ecx
push	edi
xor	edi, edi
lea	esi, [ebp+10h]
mov	[esi], edi
mov	[esi+4], edi
mov	[esi+8], edi
mov	[ebp+1Ch], edi
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+38h]
push	edi
push	204h
push	ebp
call	edx
cmp	dword ptr [esi+8], 0Fh
mov	ebx, eax
jnb	short loc_6878BB
mov	eax, [esi]
mov	ecx, dword_1855FC0
cmp	eax, edi
jz	short loc_68789B
mov	edx, [ecx]
push	40h
push	eax
mov	eax, [edx+2Ch]
call	eax
jmp	short loc_6878B2

loc_68789B:
lea	eax, [esp+14h+var_4]
push	eax
mov	[esp+18h+var_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_6878B2:
mov	[esi], eax
mov	dword ptr [esi+8], 10h

loc_6878BB:
mov	edi, [esi+4]
inc	edi
cmp	edi, [esi+4]
jnb	short loc_6878D0
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_6878E5
push	edi
jmp	short loc_6878DD

loc_6878D0:
cmp	edi, [esi+8]
jb	short loc_6878E5
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_6878DD:
push	esi
mov	ecx, esi
call	sub_668FE0

loc_6878E5:
mov	edx, [esi]
mov	[esi+4], edi
lea	edi, [edx+edi*4-4]
test	edi, edi
jz	short loc_6878F4
mov	[edi], ebx

loc_6878F4:
lea	eax, [ebx+200h]
mov	[ebp+8], eax
mov	[ebp+4], ebx
mov	[ebp+0], ebx
mov	[ebp+0Ch], ebx
mov	eax, ebp
test	ebx, ebx
jz	short loc_68790F
mov	byte ptr [ebx],	0

loc_68790F:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_687850 endp

align 10h



sub_687920 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
xor	edi, edi
lea	esi, [ebx+10h]
mov	[esi], edi
mov	[esi+4], edi
mov	[esi+8], edi
mov	[ebx+1Ch], edi
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+38h]
push	edi
push	84h
push	ebx
call	edx
cmp	dword ptr [esi+8], 0Fh
mov	ebp, eax
jnb	short loc_68798B
mov	eax, [esi]
mov	ecx, dword_1855FC0
cmp	eax, edi
jz	short loc_68796B
mov	edx, [ecx]
push	40h
push	eax
mov	eax, [edx+2Ch]
call	eax
jmp	short loc_687982

loc_68796B:
lea	eax, [esp+14h+var_4]
push	eax
mov	[esp+18h+var_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_687982:
mov	[esi], eax
mov	dword ptr [esi+8], 10h

loc_68798B:
mov	edi, [esi+4]
inc	edi
cmp	edi, [esi+4]
jnb	short loc_6879A0
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_6879B5
push	edi
jmp	short loc_6879AD

loc_6879A0:
cmp	edi, [esi+8]
jb	short loc_6879B5
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_6879AD:
push	esi
mov	ecx, esi
call	sub_668FE0

loc_6879B5:
mov	edx, [esi]
mov	[esi+4], edi
lea	edi, [edx+edi*4-4]
test	edi, edi
jz	short loc_6879C4
mov	[edi], ebp

loc_6879C4:
lea	eax, [ebp+80h]
mov	[ebx+8], eax
mov	[ebx+4], ebp
mov	[ebx], ebp
mov	[ebx+0Ch], ebp
mov	eax, ebx
test	ebp, ebp
jz	short loc_6879E2
mov	dword ptr [ebp+0], 0

loc_6879E2:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_687920 endp

align 10h



sub_6879F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 1
jnz	short loc_687A05
push	0
push	esi
call	sub_683390
pop	esi
retn	4

loc_687A05:
mov	eax, [esi]
push	ebx
mov	ebx, [esp+8+arg_0]
push	edi
lea	edi, ds:0[ebx*4]
add	eax, edi
mov	eax, [eax]
test	eax, eax
jz	short loc_687A23
mov	ecx, eax
call	sub_64A400

loc_687A23:
mov	ecx, [esi+4]
mov	eax, [esi]
sub	ecx, ebx
add	eax, edi
lea	edx, ds:0FFFFFFFCh[ecx*4]
push	edx
lea	ecx, [eax+4]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 0Ch
pop	edi
pop	ebx
pop	esi
retn	4
sub_6879F0 endp

align 10h



sub_687A50 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_687A72
call	sub_684870
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_687A72:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_687A80
mov	esi, 8
jmp	short loc_687AE5

loc_687A80:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_687A93
fadd	ds:flt_15FCC08

loc_687A93:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	cl, byte ptr [esp+1Ch+var_8]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_687AE5:
mov	ecx, dword_1855FC0
mov	ebp, [esp+1Ch+arg_0]
lea	edx, [esp+1Ch+var_8]
push	edx
mov	edx, esi
shl	edx, 4
add	edx, 8
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_687B44
xor	eax, eax
jmp	short loc_687B30
align 10h

loc_687B30:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_687B30

loc_687B44:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_687BF4
mov	eax, [eax+4]
inc	eax
mov	[esp+1Ch+arg_0], ebx
mov	ebx, ds:InterlockedExchangeAdd
mov	dword ptr [esp+1Ch+var_8], eax
jmp	short loc_687B66

loc_687B62:
mov	edi, [esp+1Ch+var_C]

loc_687B66:
mov	edx, [edi]
mov	eax, [esp+1Ch+arg_0]
cmp	dword ptr [eax+edx+8], 0FFFFFFFEh
lea	edi, [eax+edx+8]
jz	short loc_687BCE
mov	eax, [edi+8]
lea	esi, [edi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
push	esi
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_689000
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_687BC8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_687BC8:
mov	dword ptr [edi], 0FFFFFFFEh

loc_687BCE:
add	[esp+1Ch+arg_0], 10h
sub	dword ptr [esp+1Ch+var_8], 1
jnz	short loc_687B62
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
xor	ebx, ebx

loc_687BF4:
mov	ecx, [esp+1Ch+arg_4]
mov	[edi], ecx
lea	ecx, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_4], ebx
call	sub_684870
pop	esi
pop	ebp
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_687A50 endp

align 10h



sub_687C20 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
mov	eax, [ebx+14h]
mov	ecx, [esp+4+arg_0]
push	esi
lea	esi, [ebx+14h]
push	edi
mov	edi, [eax+ecx*4]
mov	edx, [edi]
mov	eax, [edi+4]
mov	[edx+4], eax
mov	eax, [edi]
mov	edx, [edi+4]
mov	[edx], eax
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_687C5E
mov	ecx, esi
call	sub_684C40
mov	edx, [ebx+0Ch]
mov	[edi], edx
mov	[ebx+0Ch], edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_687C5E:
mov	edx, [esi]
sub	eax, ecx
lea	edx, [edx+ecx*4]
lea	eax, ds:0FFFFFFFCh[eax*4]
push	eax
lea	ecx, [edx+4]
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
mov	edx, [ebx+0Ch]
add	esp, 0Ch
mov	[edi], edx
mov	[ebx+0Ch], edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_687C20 endp

align 10h



sub_687C90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	ebp, ecx
xor	edi, edi
mov	[esp+18h+var_4], ebp
cmp	[ebp+1C8h], edi
jnz	short loc_687CE3
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	28h
call	edx
cmp	eax, edi
jz	short loc_687CDB
mov	[eax+0Ch], edi
mov	[eax+10h], edi
mov	[eax+14h], edi
mov	[eax+18h], edi
mov	[eax+1Ch], edi
mov	[eax+20h], edi
mov	[eax+24h], edi
mov	dword ptr [eax], 64h
mov	[eax+8], edi
jmp	short loc_687CDD

loc_687CDB:
xor	eax, eax

loc_687CDD:
mov	[ebp+1C8h], eax

loc_687CE3:
mov	ecx, [ebp+1C8h]
xor	eax, eax
cmp	[ecx+10h], edi
jbe	short loc_687D26
mov	edx, [ecx+0Ch]
mov	ecx, edx

loc_687CF5:
mov	esi, [ecx]
mov	ebx, [esp+18h+arg_0]
cmp	[esi+8], ebx
jz	short loc_687D11
mov	esi, [ebp+1C8h]
inc	eax
add	ecx, 4
cmp	eax, [esi+10h]
jb	short loc_687CF5
jmp	short loc_687D26

loc_687D11:
mov	ecx, [edx+eax*4]
cmp	ecx, edi
jz	short loc_687D1B
inc	dword ptr [ecx+4]

loc_687D1B:
mov	esi, [edx+eax*4]
cmp	esi, edi
jnz	loc_687E43

loc_687D26:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	14h
call	edx
cmp	eax, edi
jz	short loc_687D5A
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1436C34
mov	[eax+8], edi
mov	[eax+0Ch], edi
mov	[eax+10h], edi
mov	ebx, eax
jmp	short loc_687D5C

loc_687D5A:
xor	ebx, ebx

loc_687D5C:
mov	esi, [esp+18h+arg_0]
mov	[esp+18h+var_8], ebx
cmp	esi, edi
jz	short loc_687D6F
mov	ecx, esi
call	sub_64A420

loc_687D6F:
mov	ecx, [ebx+8]
cmp	ecx, edi
jz	short loc_687D7B
call	sub_64A430

loc_687D7B:
mov	[ebx+8], esi
mov	esi, [ebp+1C8h]
mov	edi, [esi+10h]
mov	eax, [esi+10h]
add	esi, 0Ch
inc	edi
cmp	edi, eax
jnb	loc_687E1E
mov	edx, [esi]
sub	eax, edi
lea	ecx, [eax+edi]
lea	ebp, [edx+ecx*4-4]
jz	short loc_687DBD
mov	[esp+18h+arg_0], eax

loc_687DA7:
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_687DB3
call	sub_64A400

loc_687DB3:
sub	ebp, 4
sub	[esp+18h+arg_0], 1
jnz	short loc_687DA7

loc_687DBD:
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_687DCF
push	edi
push	esi
mov	ecx, esi
call	sub_668FE0

loc_687DCF:
mov	ebp, [esp+18h+var_4]

loc_687DD3:
mov	edx, [esi]
mov	[esi+4], edi
lea	edi, [edx+edi*4-4]
test	edi, edi
jz	short loc_687DE9
test	ebx, ebx
jz	short loc_687DE7
inc	dword ptr [ebx+4]

loc_687DE7:
mov	[edi], ebx

loc_687DE9:
mov	eax, [ebp+0A0h]
mov	esi, [ebp+0BCh]
shr	eax, 13h
and	al, 1
mov	byte ptr [esp+18h+arg_0], al
mov	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, ebp
call	sub_680DB0
cmp	eax, 0FFFFFFFFh
jz	short loc_687E35
cmp	eax, 1
jnz	short loc_687E3D
push	esi
mov	ecx, ebp
call	sub_655A50
jmp	short loc_687E3D

loc_687E1E:
cmp	edi, [esi+8]
jb	short loc_687DD3
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
push	esi
mov	ecx, esi
call	sub_668FE0
jmp	short loc_687DD3

loc_687E35:
push	esi
mov	ecx, ebp
call	sub_655B00

loc_687E3D:
mov	esi, [esp+18h+var_8]
xor	edi, edi

loc_687E43:
mov	eax, [esp+18h+arg_8]
mov	edx, [esp+18h+arg_4]
mov	[esi+0Ch], edx
mov	[esi+10h], eax
cmp	eax, edi
jz	short loc_687E60
inc	dword ptr [eax+1Ch]
mov	ecx, [esi+10h]
call	sub_64A420

loc_687E60:
mov	ecx, esi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_687C90 endp

align 10h



sub_687E80 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
xor	ebp, ebp
push	esi
mov	esi, ecx
cmp	ebx, ebp
jnz	short loc_687E9B
cmp	[esi+1C8h], ebp
jz	loc_687F47

loc_687E9B:
cmp	[esi+1C8h], ebp
jnz	short loc_687EDF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
push	28h
call	edx
cmp	eax, ebp
jz	short loc_687ED7
mov	[eax+0Ch], ebp
mov	[eax+10h], ebp
mov	[eax+14h], ebp
mov	[eax+18h], ebp
mov	[eax+1Ch], ebp
mov	[eax+20h], ebp
mov	[eax+24h], ebp
mov	dword ptr [eax], 64h
mov	[eax+8], ebp
jmp	short loc_687ED9

loc_687ED7:
xor	eax, eax

loc_687ED9:
mov	[esi+1C8h], eax

loc_687EDF:
mov	eax, [esi+1C8h]
mov	ecx, [eax+24h]
cmp	ecx, ebp
jz	short loc_687EF3
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax

loc_687EF3:
push	edi
mov	edi, [esi+1C8h]
add	edi, 24h
cmp	ebx, ebp
jz	short loc_687F08
mov	ecx, ebx
call	sub_64A420

loc_687F08:
mov	ecx, [edi]
cmp	ecx, ebp
jz	short loc_687F13
call	sub_64A430

loc_687F13:
mov	[edi], ebx
mov	ecx, [esi+1C8h]
mov	ebx, [ecx+24h]
cmp	ebx, ebp
jz	short loc_687F46
mov	edi, [ebx]
mov	ecx, esi
add	edi, 28h
call	sub_67DC90
mov	edx, [edi]
push	ecx
mov	ecx, ebx
fstp	[esp+14h+var_14]
call	edx
mov	eax, [esp+10h+arg_0]
push	ebp
push	ebp
push	eax
mov	ecx, esi
call	sub_687C90

loc_687F46:
pop	edi

loc_687F47:
pop	esi
pop	ebp
pop	ebx
retn	4
sub_687E80 endp

align 10h



sub_687F50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+1C8h], esi
jnz	short loc_687F9A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	28h
call	edx
cmp	eax, esi
jz	short loc_687F92
mov	[eax+0Ch], esi
mov	[eax+10h], esi
mov	[eax+14h], esi
mov	[eax+18h], esi
mov	[eax+1Ch], esi
mov	[eax+20h], esi
mov	[eax+24h], esi
mov	dword ptr [eax], 64h
mov	[eax+8], esi
jmp	short loc_687F94

loc_687F92:
xor	eax, eax

loc_687F94:
mov	[edi+1C8h], eax

loc_687F9A:
mov	eax, [edi+1C8h]
mov	ecx, [esp+8+arg_0]
mov	[eax], ecx
mov	edx, [edi+1C8h]
mov	eax, [esp+8+arg_4]
mov	ecx, edi
mov	[edx+4], eax
call	sub_67ED60
pop	edi
pop	esi
retn	8
sub_687F50 endp

align 10h



sub_687FC0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+1C8h], esi
jnz	short loc_68800A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	28h
call	edx
cmp	eax, esi
jz	short loc_688002
mov	[eax+0Ch], esi
mov	[eax+10h], esi
mov	[eax+14h], esi
mov	[eax+18h], esi
mov	[eax+1Ch], esi
mov	[eax+20h], esi
mov	[eax+24h], esi
mov	dword ptr [eax], 64h
mov	[eax+8], esi
jmp	short loc_688004

loc_688002:
xor	eax, eax

loc_688004:
mov	[edi+1C8h], eax

loc_68800A:
mov	eax, [edi+1C8h]
mov	ecx, [esp+8+arg_0]
mov	[eax+8], ecx
mov	ecx, edi
call	sub_67EE20
pop	edi
pop	esi
retn	4
sub_687FC0 endp

align 10h



sub_688030 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 28h
mov	eax, [ecx+1C8h]
push	edi
xor	edi, edi
mov	[esp+2Ch+var_24], ecx
cmp	eax, edi
jz	loc_688446
push	ebx
xor	edx, edx
push	ebp
xor	ebx, ebx
push	esi
mov	[esp+38h+var_18], edi
mov	[esp+38h+var_14], edx
mov	[esp+38h+var_10], edi
cmp	[eax+10h], edi
jbe	loc_6880F7

loc_688064:
mov	eax, [eax+0Ch]
lea	esi, [edx+1]
lea	ecx, [eax+ebx*4]
mov	[esp+38h+var_20], ecx
cmp	esi, edx
jnb	loc_688216
mov	ecx, [esp+38h+var_18]
sub	edx, esi
mov	eax, edx
lea	edx, [eax+esi]
lea	edi, [ecx+edx*4-4]
jz	short loc_6880A3
mov	ebp, eax
lea	esp, [esp+0]

loc_688090:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_68809B
call	sub_64A400

loc_68809B:
sub	edi, 4
sub	ebp, 1
jnz	short loc_688090

loc_6880A3:
mov	edx, [esp+38h+var_10]
shr	edx, 1
cmp	esi, edx
jnb	short loc_6880BA
lea	eax, [esp+38h+var_18]
push	esi
push	eax
mov	ecx, eax
call	sub_714BE0

loc_6880BA:
xor	edi, edi

loc_6880BC:
mov	eax, [esp+38h+var_18]
lea	ecx, [eax+esi*4-4]
mov	edx, esi
mov	[esp+38h+var_14], edx
cmp	ecx, edi
jz	short loc_6880E3
mov	esi, [esp+38h+var_20]
mov	eax, [esi]
cmp	eax, edi
jz	short loc_6880DF
inc	dword ptr [eax+4]
mov	edx, [esp+38h+var_14]

loc_6880DF:
mov	eax, [esi]
mov	[ecx], eax

loc_6880E3:
mov	ecx, [esp+38h+var_24]
mov	eax, [ecx+1C8h]
inc	ebx
cmp	ebx, [eax+10h]
jb	loc_688064

loc_6880F7:
mov	[esp+38h+var_C], edi
mov	[esp+38h+var_8], edi
mov	[esp+38h+var_4], edi
mov	[esp+38h+var_28], edi
cmp	edx, edi
jbe	loc_6882E7
nop

loc_688110:
mov	eax, [esp+38h+var_28]
mov	edx, [esp+38h+var_18]
lea	ebx, [edx+eax*4]
mov	eax, [ebx]
mov	esi, 1
test	eax, eax
jz	short loc_68812D
add	[eax+4], esi
mov	edi, [esp+38h+var_8]

loc_68812D:
mov	ebp, [ebx]
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [edx+14h]
mov	[esp+38h+var_20], ebp
call	eax
test	al, al
jnz	loc_6882CE
mov	ecx, [ebp+0Ch]
test	ecx, ecx
jz	short loc_688151
call	sub_6FEBC0

loc_688151:
lea	esi, [edi+1]
cmp	esi, edi
jnb	loc_688239
mov	edx, [esp+38h+var_C]
sub	edi, esi
mov	eax, edi
lea	ecx, [eax+esi]
lea	edi, [edx+ecx*4-4]
jz	short loc_688183
mov	ebp, eax
nop

loc_688170:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_68817B
call	sub_64A400

loc_68817B:
sub	edi, 4
sub	ebp, 1
jnz	short loc_688170

loc_688183:
mov	eax, [esp+38h+var_4]
shr	eax, 1
cmp	esi, eax
jnb	short loc_688198
push	esi
lea	ecx, [esp+3Ch+var_C]
push	ecx
call	sub_714BE0

loc_688198:
mov	ebp, [esp+38h+var_20]

loc_68819C:
mov	ecx, [esp+38h+var_C]
lea	ecx, [ecx+esi*4-4]
mov	edi, esi
mov	[esp+38h+var_8], edi
test	ecx, ecx
jz	short loc_6881BF
mov	eax, [ebx]
test	eax, eax
jz	short loc_6881BB
inc	dword ptr [eax+4]
mov	edi, [esp+38h+var_8]

loc_6881BB:
mov	edx, [ebx]
mov	[ecx], edx

loc_6881BF:
cmp	[esp+38h+var_14], 1
jnz	loc_68825C
mov	eax, [esp+38h+var_18]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6881D9
call	sub_64A400

loc_6881D9:
test	[esp+38h+var_10], 0FFFFFFFEh
jbe	short loc_68820C
cmp	[esp+38h+var_18], 0
jz	short loc_688204
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+38h+var_18]
mov	edx, [edx+30h]
push	eax
call	edx
mov	[esp+38h+var_18], 0

loc_688204:
mov	[esp+38h+var_10], 0

loc_68820C:
mov	[esp+38h+var_14], 0
jmp	short loc_68828B

loc_688216:
cmp	esi, [esp+38h+var_10]
jb	loc_6880BC
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
lea	edx, [esp+3Ch+var_18]
push	edx
mov	ecx, edx
call	sub_714BE0
jmp	loc_6880BC

loc_688239:
cmp	esi, [esp+38h+var_4]
jb	loc_68819C
mov	edx, esi
shr	edx, 2
add	edx, esi
lea	eax, [esp+38h+var_C]
push	edx
push	eax
mov	ecx, eax
call	sub_714BE0
jmp	loc_68819C

loc_68825C:
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_688267
call	sub_64A400

loc_688267:
mov	esi, [esp+38h+var_14]
mov	eax, esi
sub	eax, [esp+38h+var_28]
lea	edx, [ebx+4]
lea	ecx, ds:0FFFFFFFCh[eax*4]
push	ecx
push	edx
push	ebx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	esi
mov	[esp+38h+var_14], esi

loc_68828B:
mov	ebx, [esp+38h+var_24]
mov	eax, [ebx+0A0h]
mov	esi, [ebx+0BCh]
shr	eax, 13h
and	al, 1
mov	byte ptr [esp+38h+var_1C], al
mov	ecx, [esp+38h+var_1C]
push	ecx
mov	ecx, ebx
call	sub_680DB0
cmp	eax, 0FFFFFFFFh
jz	short loc_6882C4
cmp	eax, 1
jnz	short loc_6882D2
push	esi
mov	ecx, ebx
call	sub_655A50
jmp	short loc_6882D2

loc_6882C4:
push	esi
mov	ecx, ebx
call	sub_655B00
jmp	short loc_6882D2

loc_6882CE:
add	[esp+38h+var_28], esi

loc_6882D2:
mov	ecx, ebp
call	sub_64A400
mov	edx, [esp+38h+var_14]
cmp	[esp+38h+var_28], edx
jb	loc_688110

loc_6882E7:
xor	ebx, ebx
mov	[esp+38h+var_28], ebx
cmp	[esp+38h+var_8], ebx
jbe	loc_6883E1
jmp	short loc_688300
align 10h

loc_688300:
mov	ecx, [esp+38h+var_24]
mov	esi, [ecx+1C8h]
mov	eax, [esp+38h+var_C]
mov	edx, [eax+ebx*4]
test	esi, esi
jz	loc_6883D2
mov	ecx, [esi+10h]
xor	edi, edi
test	ecx, ecx
jbe	loc_6883D2
mov	eax, [esi+0Ch]
lea	esp, [esp+0]

loc_688330:
cmp	[eax], edx
jz	short loc_688341
inc	edi
add	eax, 4
cmp	edi, ecx
jb	short loc_688330
jmp	loc_6883D2

loc_688341:
cmp	edi, 0FFFFFFFFh
jz	loc_6883D2
cmp	ecx, 1
jnz	short loc_688396
mov	edi, [esi+0Ch]
mov	ebp, ecx
xor	ebx, ebx

loc_688356:
mov	ecx, [edi]
cmp	ecx, ebx
jz	short loc_688361
call	sub_64A400

loc_688361:
sub	edi, 4
sub	ebp, 1
jnz	short loc_688356
test	dword ptr [esi+14h], 0FFFFFFFEh
jbe	short loc_68838D
mov	eax, [esi+0Ch]
cmp	eax, ebx
jz	short loc_68838A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi+0Ch], ebx

loc_68838A:
mov	[esi+14h], ebx

loc_68838D:
mov	[esi+10h], ebx
mov	ebx, [esp+38h+var_28]
jmp	short loc_6883D2

loc_688396:
mov	eax, [esi+0Ch]
lea	ebp, ds:0[edi*4]
add	eax, ebp
mov	eax, [eax]
test	eax, eax
jz	short loc_6883AF
mov	ecx, eax
call	sub_64A400

loc_6883AF:
mov	ecx, [esi+0Ch]
mov	edx, [esi+10h]
lea	eax, [ecx+ebp]
sub	edx, edi
lea	ecx, ds:0FFFFFFFCh[edx*4]
push	ecx
lea	edx, [eax+4]
push	edx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+10h]

loc_6883D2:
inc	ebx
mov	[esp+38h+var_28], ebx
cmp	ebx, [esp+38h+var_8]
jb	loc_688300

loc_6883E1:
mov	edi, [esp+38h+var_8]
mov	ebx, [esp+38h+var_C]
lea	esi, [ebx+edi*4-4]
test	edi, edi
jbe	short loc_688404

loc_6883F1:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6883FC
call	sub_64A400

loc_6883FC:
sub	esi, 4
sub	edi, 1
jnz	short loc_6883F1

loc_688404:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
mov	edi, [esp+34h+var_10]
mov	ebx, [esp+34h+var_14]
lea	esi, [ebx+edi*4-4]
test	edi, edi
jbe	short loc_688435

loc_688422:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_68842D
call	sub_64A400

loc_68842D:
sub	esi, 4
sub	edi, 1
jnz	short loc_688422

loc_688435:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
pop	esi
pop	ebp
pop	ebx

loc_688446:
pop	edi
add	esp, 28h
retn
sub_688030 endp

align 10h



sub_688450 proc	near

var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_28=	word ptr -28h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_23=	byte ptr -23h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= byte ptr	 4

sub	esp, 30h
push	esi
mov	esi, ecx
test	byte ptr [esi+0A0h], 0Ch
jnz	loc_6885AA
mov	eax, 100h
test	[esi+76h], ax
jnz	loc_6885AA
cmp	dword ptr [esi+14h], 0FFFFFFFFh
jl	loc_6885AA
push	ebx
push	edi
mov	edi, 1
add	[esi+4], edi
xor	ebx, ebx
cmp	[esp+3Ch+arg_0], bl
jz	short loc_6884D6
call	sub_688030
cmp	[esi+0D4h], edi
jz	short loc_6884D6
mov	ecx, [esi+0B8h]
mov	edx, [ecx]
mov	eax, [edx+38h]
call	eax
cmp	eax, ebx
jz	short loc_6884D6
mov	ecx, [esi+0D8h]
mov	edx, [eax]
mov	edx, [edx+4]
push	esi
push	ecx
mov	ecx, [esi+0BCh]
push	ecx
mov	ecx, eax
call	edx
test	al, al
jnz	short loc_6884D6
mov	ecx, [esi+0B8h]
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebx
call	edx

loc_6884D6:
mov	eax, [esi+0BCh]
cmp	[eax+9C4h], ebx
jbe	short loc_6884EB
mov	ecx, esi
call	sub_656B50

loc_6884EB:
cmp	[esp+3Ch+arg_0], bl
jz	loc_6885A1
mov	ecx, esi
cmp	[esi+0D4h], ebx
jnz	short loc_68855B
mov	edi, [esi+0D8h]
call	sub_67EF60
mov	eax, [esi+0D8h]
cmp	eax, edi
jz	short loc_688548
push	eax
mov	ecx, esi
call	sub_67F0A0
push	2
lea	ecx, [esp+40h+var_20]
call	sub_6548F0
mov	edx, [esi]
mov	edx, [edx+80h]
lea	eax, [esp+3Ch+var_20]
push	eax
mov	ecx, esi
call	edx
mov	eax, [esi+0D8h]
push	eax
mov	ecx, esi
call	sub_680C30
jmp	short loc_68858E

loc_688548:
push	2
lea	ecx, [esp+40h+var_10]
call	sub_6548F0
lea	eax, [esp+3Ch+var_10]
mov	ecx, esi
jmp	short loc_688583

loc_68855B:
xor	eax, eax
mov	[esp+3Ch+var_28], ax
mov	dword ptr [esp+3Ch+var_30], 2
mov	[esp+3Ch+var_2C], ebx
mov	[esp+3Ch+var_26], bl
mov	[esp+3Ch+var_24], bl
mov	[esp+3Ch+var_23], bl
mov	[esp+3Ch+var_25], 0FFh
lea	eax, [esp+3Ch+var_30]

loc_688583:
mov	edx, [esi]
mov	edx, [edx+80h]
push	eax
call	edx

loc_68858E:
cmp	[esi+0D8h], ebx
jnz	short loc_6885A1
lea	ecx, [esi+0C4h]
call	sub_65D220

loc_6885A1:
mov	ecx, esi
call	sub_64A400
pop	edi
pop	ebx

loc_6885AA:
pop	esi
add	esp, 30h
retn	8
sub_688450 endp

align 10h



sub_6885C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
mov	edx, [eax+1Ch]
push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	esi
push	edi
push	offset asc_154D83C ; "\n"
call	edx
mov	eax, [ebx+18h]
movzx	ebp, word ptr [esp+10h+arg_0]
push	offset sub_67DB80
lea	esi, [ebx+14h]
lea	ecx, [esp+14h+arg_0]
push	ecx
push	eax
push	0
push	esi
mov	[esp+24h+arg_0], ebp
call	sub_680A20
mov	edi, eax
add	esp, 14h
test	edi, edi
jz	short loc_68861D
mov	edx, [esi]
mov	esi, [edx+edi*4-4]
dec	edi
cmp	[esi+0Ch], ebp
jnz	short loc_68861D
test	esi, esi
jz	short loc_68861D
cmp	byte ptr [esi+34h], 0
jz	short loc_68863B
push	edi
mov	ecx, ebx
call	sub_687C20

loc_68861D:
cmp	dword ptr [ebx+30h], 0
jnz	short loc_688636
push	ebp
mov	ecx, ebx
call	sub_684D80
or	byte ptr [eax+35h], 2
mov	[eax+0Ch], ebp
mov	byte ptr [eax+34h], 3

loc_688636:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_68863B:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_688673
cmp	dword ptr [ebx+30h], 0
jnz	short loc_688673
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx
test	eax, eax
jz	short loc_688673
mov	edx, [eax+4]
xor	ecx, ecx
test	edx, edx
jbe	short loc_688673
mov	eax, [eax]
mov	edi, edi

loc_688660:
mov	ebx, [eax]
test	byte ptr [ebx],	4
jnz	short loc_688680
inc	ecx
add	eax, 4
cmp	ecx, edx
jb	short loc_688660
mov	ebx, [esp+10h+arg_4]

loc_688673:
push	edi
mov	ecx, ebx
call	sub_687C20
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_688680:
or	byte ptr [esi+35h], 2
mov	ebx, [esp+10h+arg_4]
jmp	short loc_68861D
sub_6885C0 endp

align 10h



sub_688690 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
movzx	edx, word ptr [ecx+6]
push	eax
push	edx
call	sub_6885C0
add	esp, 8
retn	8
sub_688690 endp

align 10h



sub_6886B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
movzx	edx, word ptr [ecx+4]
push	eax
push	edx
call	sub_6885C0
add	esp, 8
retn	8
sub_6886B0 endp

align 10h



sub_6886D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	[esi+0D4h], eax
movzx	eax, word ptr [esi+76h]
test	eax, 100h
jnz	short loc_688703
cmp	dword ptr [esi+14h], 0FFFFFFFFh
jl	short loc_688703
shr	al, 4
test	al, 1
jnz	short loc_688703
mov	ecx, [esi+0BCh]
push	ecx
mov	ecx, esi
call	sub_683450

loc_688703:
cmp	dword ptr [esi+0D4h], 1
jnz	short loc_688715
push	0
mov	ecx, esi
call	sub_687E80

loc_688715:
pop	esi
retn	4
sub_6886D0 endp

align 10h



sub_688720 proc	near

var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	byte ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	byte ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	word ptr -28h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_23=	byte ptr -23h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0F0h
push	ebx
push	ebp
push	esi
mov	esi, [esp+0FCh+arg_0]
push	edi
mov	edi, [esi+18h]
mov	ebp, [edi+78h]
xor	ebx, ebx
push	ebx
mov	ecx, esi
mov	[esp+104h+var_E4], bl
mov	[esp+104h+var_EC], ebx
mov	[esp+104h+var_E8], ebx
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+10Ch+var_F0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+100h+var_F0]
cmp	[edx+10h], ebx
jz	loc_688A9A
mov	eax, [esi+18h]
lea	ecx, [esp+100h+var_EC]
push	ecx
lea	edx, [esp+104h+var_F0]
add	eax, 78h
push	edx
push	eax
mov	ecx, ebp
call	sub_66F4F0
mov	ecx, [esi+8]
test	al, al
jz	loc_6889AC
call	sub_661C50
mov	esi, eax
lea	edi, [ebx+1]
cmp	esi, ebx
jz	short loc_68879E
add	[esi+4], edi

loc_68879E:
mov	eax, [esp+100h+var_EC]
cmp	eax, ebx
jz	short loc_6887AB
add	eax, 10h
jmp	short loc_6887AD

loc_6887AB:
xor	eax, eax

loc_6887AD:
push	eax
mov	ecx, esi
call	sub_655130
xor	eax, eax
xor	ecx, ecx
mov	[esp+100h+var_D0], 40000h
mov	[esp+100h+var_CC], ebx
mov	word ptr [esp+100h+var_C8], ax
mov	byte ptr [esp+100h+var_C8+2], bl
mov	byte ptr [esp+100h+var_C4], bl
mov	byte ptr [esp+100h+var_C4+1], bl
mov	byte ptr [esp+100h+var_C8+3], 0FFh
mov	[esp+100h+var_78], ebx
mov	[esp+100h+var_74], ebx
mov	[esp+100h+var_70], ebx
mov	[esp+100h+var_6C], ebx
mov	word ptr [esp+100h+var_68], cx
mov	byte ptr [esp+100h+var_68+2], bl
mov	byte ptr [esp+100h+var_64], bl
mov	byte ptr [esp+100h+var_64+1], bl
mov	byte ptr [esp+100h+var_68+3], 0FFh
mov	[esp+100h+var_58], bl
mov	[esp+100h+var_60], ebx
mov	[esp+100h+var_5C], ebx
mov	[esp+100h+var_50], ebx
mov	[esp+100h+var_4C], ebx
mov	[esp+100h+var_48], ebx
mov	[esp+100h+var_80], ebx
mov	[esp+100h+var_7C], 2
cmp	esi, ebx
jz	short loc_68885F
add	[esi+4], edi

loc_68885F:
mov	edx, [esp+100h+var_D0]
mov	eax, [esp+100h+var_CC]
mov	ecx, [esp+100h+var_C8]
mov	[esp+100h+var_70], edx
mov	edx, [esp+100h+var_C4]
mov	[esp+100h+var_6C], eax
mov	eax, [esi]
mov	[esp+100h+var_68], ecx
mov	[esp+100h+var_64], edx
mov	edx, [eax+54h]
mov	ecx, esi
mov	[esp+100h+var_78], esi
mov	[esp+100h+var_74], ebx
mov	[esp+100h+var_44], ebx
call	edx
push	eax
lea	ecx, [esp+104h+var_80]
call	sub_68EA00
lea	ecx, [esp+100h+var_80]
call	sub_6861E0
xor	eax, eax
mov	[esp+100h+var_38], ebx
mov	[esp+100h+var_34], ebx
mov	[esp+100h+var_30], ebx
mov	[esp+100h+var_2C], ebx
mov	[esp+100h+var_28], ax
mov	[esp+100h+var_26], bl
mov	[esp+100h+var_24], bl
mov	[esp+100h+var_23], bl
mov	[esp+100h+var_25], 0FFh
mov	[esp+100h+var_18], bl
mov	[esp+100h+var_20], ebx
mov	[esp+100h+var_1C], ebx
mov	[esp+100h+var_10], ebx
mov	[esp+100h+var_C], ebx
mov	[esp+100h+var_8], ebx
mov	[esp+100h+var_40], ebx
mov	[esp+100h+var_3C], 3
add	[esi+4], edi
mov	ecx, [esp+100h+var_38]
cmp	ecx, ebx
jz	short loc_688954
call	sub_64A400

loc_688954:
mov	ecx, [esp+100h+var_34]
mov	[esp+100h+var_38], esi
cmp	ecx, ebx
jz	short loc_68896B
call	sub_64A400

loc_68896B:
lea	ecx, [esp+100h+var_EC]
push	ecx
lea	ecx, [esp+104h+var_20]
mov	[esp+104h+var_34], ebx
call	sub_67C4C0
mov	[esp+100h+var_4], ebx
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+104h+var_40]
call	sub_68EA00
lea	ecx, [esp+100h+var_40]
jmp	loc_688A8E

loc_6889AC:
call	sub_661C50
mov	esi, eax
cmp	esi, ebx
jz	short loc_6889BA
inc	dword ptr [esi+4]

loc_6889BA:
xor	ecx, ecx
xor	edx, edx
mov	[esp+100h+var_E0], 40000h
mov	[esp+100h+var_DC], ebx
mov	word ptr [esp+100h+var_D8], cx
mov	byte ptr [esp+100h+var_D8+2], bl
mov	byte ptr [esp+100h+var_D4], bl
mov	byte ptr [esp+100h+var_D4+1], bl
mov	byte ptr [esp+100h+var_D8+3], 0FFh
mov	[esp+100h+var_B8], ebx
mov	[esp+100h+var_B4], ebx
mov	[esp+100h+var_B0], ebx
mov	[esp+100h+var_AC], ebx
mov	word ptr [esp+100h+var_A8], dx
mov	byte ptr [esp+100h+var_A8+2], bl
mov	byte ptr [esp+100h+var_A4], bl
mov	byte ptr [esp+100h+var_A4+1], bl
mov	byte ptr [esp+100h+var_A8+3], 0FFh
mov	[esp+100h+var_98], bl
mov	[esp+100h+var_A0], ebx
mov	[esp+100h+var_9C], ebx
mov	[esp+100h+var_90], ebx
mov	[esp+100h+var_8C], ebx
mov	[esp+100h+var_88], ebx
mov	[esp+100h+var_C0], ebx
mov	[esp+100h+var_BC], 2
cmp	esi, ebx
jz	short loc_688A3E
inc	dword ptr [esi+4]
mov	ecx, [esp+100h+var_B8]
cmp	ecx, ebx
jz	short loc_688A3E
call	sub_64A400

loc_688A3E:
mov	ecx, [esp+100h+var_B4]
mov	[esp+100h+var_B8], esi
cmp	ecx, ebx
jz	short loc_688A4F
call	sub_64A400

loc_688A4F:
mov	eax, [esp+100h+var_E0]
mov	ecx, [esp+100h+var_DC]
mov	edx, [esp+100h+var_D8]
mov	[esp+100h+var_B0], eax
mov	eax, [esp+100h+var_D4]
mov	[esp+100h+var_AC], ecx
mov	[esp+100h+var_A4], eax
mov	[esp+100h+var_B4], ebx
mov	[esp+100h+var_A8], edx
mov	[esp+100h+var_84], ebx
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+104h+var_C0]
call	sub_68EA00
lea	ecx, [esp+100h+var_C0]

loc_688A8E:
call	sub_6861E0
mov	ecx, esi
call	sub_64A400

loc_688A9A:
mov	eax, [esp+100h+var_F0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_688AAF
call	sub_650DF0

loc_688AAF:
test	[esp+100h+var_E4], 2
jnz	short loc_688AC3
mov	ecx, [esp+100h+var_EC]
cmp	ecx, ebx
jz	short loc_688AC3
call	sub_64B3B0

loc_688AC3:
test	[esp+100h+var_E4], 1
mov	[esp+100h+var_EC], ebx
jnz	short loc_688ADB
mov	ecx, [esp+100h+var_E8]
cmp	ecx, ebx
jz	short loc_688ADB
call	sub_64B3B0

loc_688ADB:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0F0h
retn
sub_688720 endp

align 10h



sub_688AF0 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 34h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0BCh]
push	edi
push	eax
call	sub_656470
mov	ecx, [esi+0BCh]
mov	edi, [ecx+2488h]
xor	ebx, ebx
cmp	[esi+1D4h], ebx
jz	short loc_688B49
xor	eax, eax
cmp	edi, ebx
jbe	short loc_688B49
mov	edx, [ecx+2484h]
add	ecx, 2484h
lea	esp, [esp+0]

loc_688B30:
cmp	[edx], esi
jz	short loc_688B3E
inc	eax
add	edx, 4
cmp	eax, edi
jb	short loc_688B30
jmp	short loc_688B49

loc_688B3E:
cmp	eax, 0FFFFFFFFh
jle	short loc_688B49
push	eax
call	sub_6879F0

loc_688B49:
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
lea	ecx, [esi+0C4h]
call	sub_65D1F0
mov	[esp+40h+var_31], al
cmp	al, bl
jz	short loc_688BAD
xor	ecx, ecx
lea	edx, [esp+40h+var_10]
mov	[esp+40h+var_8], cx
push	edx
mov	ecx, esi
mov	[esp+44h+var_10], 4
mov	[esp+44h+var_C], ebx
mov	[esp+44h+var_6], bl
mov	[esp+44h+var_4], bl
mov	[esp+44h+var_3], bl
mov	[esp+44h+var_5], 0FFh
call	sub_67F560
test	al, al
jz	loc_688CD5
mov	[esp+40h+var_31], bl

loc_688BAD:
mov	al, [esi+76h]
shr	al, 5
test	al, 1
jz	loc_688C51
mov	ecx, [esi+0A0h]
shr	ecx, 0Ch
test	cl, 1
jnz	loc_688C51
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
push	4
lea	ecx, [eax+2408h]
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_688C51
xor	ecx, ecx
mov	word ptr [esp+40h+var_28], cx
mov	dword ptr [edi+4], 2
mov	[esp+40h+var_30], 1
mov	[esp+40h+var_2C], ebx
mov	byte ptr [esp+40h+var_28+2], bl
mov	byte ptr [esp+40h+var_24], bl
mov	byte ptr [esp+40h+var_24+1], bl
mov	byte ptr [esp+40h+var_28+3], 0FFh
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_688C23
call	sub_64A400

loc_688C23:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_688C32
call	sub_64A400

loc_688C32:
mov	edx, [esp+40h+var_30]
mov	eax, [esp+40h+var_2C]
mov	ecx, [esp+40h+var_28]
mov	[edi+0Ch], ebx
mov	[edi+10h], edx
mov	edx, [esp+40h+var_24]
mov	[edi+14h], eax
mov	[edi+18h], ecx
mov	[edi+1Ch], edx

loc_688C51:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
push	4
lea	ecx, [eax+2408h]
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_688CD5
xor	eax, eax
mov	dword ptr [edi+4], 2
mov	[esp+40h+var_20], 4
mov	[esp+40h+var_1C], ebx
mov	word ptr [esp+40h+var_18], ax
mov	byte ptr [esp+40h+var_18+2], bl
mov	byte ptr [esp+40h+var_14], bl
mov	byte ptr [esp+40h+var_14+1], bl
mov	byte ptr [esp+40h+var_18+3], 0FFh
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_688CA7
call	sub_64A400

loc_688CA7:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_688CB6
call	sub_64A400

loc_688CB6:
mov	ecx, [esp+40h+var_20]
mov	edx, [esp+40h+var_1C]
mov	eax, [esp+40h+var_18]
mov	[edi+0Ch], ebx
mov	[edi+10h], ecx
mov	ecx, [esp+40h+var_14]
mov	[edi+14h], edx
mov	[edi+18h], eax
mov	[edi+1Ch], ecx

loc_688CD5:
mov	al, [esp+40h+var_31]
pop	edi
pop	esi
pop	ebx
add	esp, 34h
retn
sub_688AF0 endp




sub_688CE0 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi+1D4h]
push	edi
test	ecx, ecx
jz	short loc_688D15
mov	eax, [esi+0BCh]
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_688D15
lea	ecx, [eax+78h]
call	sub_661C50
test	eax, eax
jz	short loc_688D15
mov	dword ptr [eax+1D8h], 0

loc_688D15:
cmp	dword ptr [esi+1D4h], 0
mov	ecx, [esi+0BCh]
mov	edx, [ecx+2488h]
jz	short loc_688D46
xor	eax, eax
test	edx, edx
jbe	short loc_688D46
mov	ecx, [ecx+2484h]

loc_688D36:
cmp	[ecx], esi
jz	loc_688DE7
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_688D36

loc_688D46:
or	ebp, 0FFFFFFFFh

loc_688D49:
mov	ecx, [esp+0Ch+arg_0]
test	ecx, ecx
jz	loc_688DEE
push	ebx
mov	ebx, [ecx+94h]
test	ebx, ebx
jnz	short loc_688D6B
call	sub_658B70
mov	ebx, eax
test	ebx, ebx
jz	short loc_688D6D

loc_688D6B:
inc	dword ptr [ebx]

loc_688D6D:
mov	edi, [esi+1D4h]
test	edi, edi
jz	short loc_688D93
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_688D93
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_688D93:
mov	[esi+1D4h], ebx
pop	ebx
cmp	ebp, 0FFFFFFFFh
jnz	short loc_688DD7
inc	dword ptr [esi+4]
mov	edi, [esi+0BCh]
mov	ecx, [edi+2488h]
add	edi, 2484h
inc	ecx
push	ecx
push	edi
mov	ecx, edi
call	sub_683390
mov	edx, [edi+4]
mov	eax, [edi]
lea	eax, [eax+edx*4-4]
test	eax, eax
jz	short loc_688DD0
inc	dword ptr [esi+4]
mov	[eax], esi

loc_688DD0:
mov	ecx, esi
call	sub_64A400

loc_688DD7:
mov	ecx, [esp+0Ch+arg_0]
pop	edi
mov	[ecx+1D8h], esi
pop	esi
pop	ebp
retn	4

loc_688DE7:
mov	ebp, eax
jmp	loc_688D49

loc_688DEE:
mov	edi, [esi+1D4h]
test	edi, edi
jz	short loc_688E14
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_688E14
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_688E14:
cmp	ebp, 0FFFFFFFFh
mov	dword ptr [esi+1D4h], 0
jle	short loc_688E35
mov	ecx, [esi+0BCh]
push	ebp
add	ecx, 2484h
call	sub_6879F0

loc_688E35:
pop	edi
pop	esi
pop	ebp
retn	4
sub_688CE0 endp

align 10h



sub_688E40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_4]
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
push	ebx
push	edi
mov	esi, ecx
call	sub_64B8D0
test	ebx, ebx
jz	short loc_688EB3
mov	eax, [ebx+10h]
mov	edx, [eax+8]
lea	ecx, [ebx+10h]
call	edx
cmp	eax, 0Bh
jz	short loc_688EB3
lea	eax, [esi-10h]
mov	[esp+18h+var_C], offset	off_1436F4C
test	eax, eax
jz	short loc_688E87
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_688E87:
mov	esi, [esi+8]
push	0
mov	[esp+1Ch+var_8], eax
push	0Dh
lea	ecx, [esi+10h]
lea	eax, [esp+20h+var_C]
mov	[esp+20h+var_4], edi
mov	edx, [ecx]
mov	edx, [edx+20h]
push	eax
push	edi
call	edx
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_688EB3
call	sub_64B3B0

loc_688EB3:
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	8
sub_688E40 endp

align 10h



sub_688EC0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
dec	ecx
shl	ecx, 5
sar	eax, 4
add	eax, ecx
push	edi
push	eax
mov	ecx, esi
call	sub_64C1F0
mov	ecx, [esi]
call	sub_652830
mov	edx, [esi+14h]
mov	eax, [esi+10h]
mov	eax, [eax+edx*4-4]
mov	ecx, [esi+1Ch]
mov	[eax+200h], ecx
mov	[esi+1Ch], eax
lea	ebx, [ebx+0]

loc_688F00:
mov	eax, [esi+1Ch]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [eax+200h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi+1Ch], edi
test	edi, edi
jnz	short loc_688F00
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+10h]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
retn
sub_688EC0 endp

align 10h



sub_688F40 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
dec	ecx
shl	ecx, 5
sar	eax, 2
add	eax, ecx
push	edi
push	eax
mov	ecx, esi
call	sub_66D8A0
mov	eax, [esi]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_688F6A
call	sub_64B3B0

loc_688F6A:
mov	edx, [esi+14h]
mov	eax, [esi+10h]
mov	eax, [eax+edx*4-4]
mov	ecx, [esi+1Ch]
mov	[eax+80h], ecx
mov	[esi+1Ch], eax

loc_688F80:
mov	eax, [esi+1Ch]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [eax+80h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi+1Ch], edi
test	edi, edi
jnz	short loc_688F80
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+10h]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
retn
sub_688F40 endp

align 10h



sub_688FC0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_688FE8
push	edi
mov	edi, eax

loc_688FD4:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_688FDF
call	sub_64B3B0

loc_688FDF:
sub	esi, 4
sub	edi, 1
jnz	short loc_688FD4
pop	edi

loc_688FE8:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
retn
sub_688FC0 endp

align 10h



sub_689000 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_689015
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_689037

loc_689015:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_68903C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_689037:
call	sub_687A50

loc_68903C:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_689080
mov	ebp, [esp+10h+arg_4]
lea	ebx, [esi+8]
push	ebp
mov	ecx, ebx
mov	dword ptr [esi], 0FFFFFFFFh
call	sub_67ABE0
mov	eax, [ebp+4]
mov	[ebx+4], eax
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_689080:
mov	ecx, [eax+4]
mov	ebx, edi

loc_689085:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
jnz	short loc_689085
mov	edx, [esi+4]
mov	ecx, ebx
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	edx, edi
jnz	short loc_6890D2
test	ecx, ecx
jz	short loc_6890AD
push	esi
call	sub_6B2A70

loc_6890AD:
mov	edx, [esp+10h+arg_4]
lea	ebp, [esi+8]
push	edx
mov	ecx, ebp
call	sub_67A3D0
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax+4]
mov	[ebp+4], ecx
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6890D2:
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jz	short loc_6890F0
nop

loc_6890E0:
mov	edx, [ebp+0]
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jnz	short loc_6890E0

loc_6890F0:
test	ecx, ecx
jz	short loc_6890FA
push	esi
call	sub_6B2A70

loc_6890FA:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
lea	ebx, [esi+8]
push	ebp
mov	ecx, ebx
call	sub_67A3D0
mov	eax, [ebp+4]
mov	[ebx+4], eax
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_689000 endp

align 10h



sub_689130 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_689140
align 10h

loc_689140:
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_68915D
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_68915D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_68915D:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_689179
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_689179:
mov	eax, esi
pop	esi
retn	4
sub_689130 endp

align 10h



sub_689180 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
call	sub_663BE0
xor	eax, eax
mov	dword ptr [esi], offset	off_1436FAC
lea	ebx, [esi+10h]
mov	dword ptr [ebx], offset	off_1436F58
mov	[esi+34h], eax
xor	ecx, ecx
push	6
mov	[esi+38h], cx
mov	[esi+3Ah], al
mov	ecx, [edi+78h]
lea	ebp, [edi+78h]
push	edi
call	sub_66FB70
push	eax
push	ebp
mov	ecx, ebx
call	sub_688E40
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_689180 endp

align 10h



sub_6891D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
push	edi
call	sub_668A00
push	eax
mov	ecx, esi
call	sub_663A90
mov	edi, [esp+0Ch+arg_4]
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_1436FAC
mov	dword ptr [ebx], offset	off_1436F58
test	edi, edi
jz	short loc_689206
mov	ecx, edi
call	sub_64A4A0
jmp	short loc_689208

loc_689206:
xor	eax, eax

loc_689208:
mov	[esi+34h], eax
xor	eax, eax
mov	[esi+38h], ax
mov	[esi+3Ah], al
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	ecx, [edi+80h]
push	ecx
add	eax, 78h
push	eax
mov	ecx, ebx
call	sub_688E40
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6891D0 endp

align 10h



sub_689240 proc	near

var_40=	byte ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
sub	esp, 40h
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_652330
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ebp, [esp+50h+arg_0]
cmp	ebp, 15h
mov	edi, eax
jle	short loc_6892E2
test	edi, edi
jz	short loc_6892E2
mov	ebx, [esi+1C4h]
test	ebx, ebx
jz	short loc_6892E2
cmp	dword ptr [ebx+2Ch], 0
jz	short loc_6892E2
lea	ecx, [esp+50h+var_30]
push	ecx
lea	edx, [esp+54h+var_40]
push	edx
lea	eax, [ebp+ebp*2+0]
mov	ecx, off_167D058[eax*4]
push	ecx
lea	edx, [esp+5Ch+arg_4]
push	edx
mov	ecx, edi
mov	byte ptr [esp+60h+var_30], 0
call	sub_651CB0
push	eax
push	edi
mov	ecx, ebx
call	sub_664B00
mov	bl, al
mov	eax, [esp+50h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6892C7
call	sub_650DF0

loc_6892C7:
test	bl, bl
jz	short loc_6892D9
lea	eax, [esp+50h+var_30]
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_652520

loc_6892D9:
lea	ecx, [esp+50h+var_30]
call	sub_652830

loc_6892E2:
mov	ecx, [esp+50h+arg_8]
push	ecx
lea	edx, [esp+54h+var_40]
push	edx
push	ebp
mov	ecx, esi
call	sub_65A510
test	al, al
jnz	short loc_689312 ; jumptable 0068930B cases 0,1,8
lea	eax, [ebp-4]
cmp	eax, 41h	; switch 66 cases
ja	loc_6894AD	; default
			; jumptable 0068930B cases 2-7,9-23,25-28,31,34-64
movzx	eax, ds:byte_6895BC[eax]
jmp	ds:off_68959C[eax*4] ; switch jump

loc_689312:		; jumptable 0068930B cases 0,1,8
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_689327:		; jumptable 0068930B case 24
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, esi
call	sub_67DB50
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_68935A:		; jumptable 0068930B case 29
mov	al, [esp+50h+var_40]
test	al, al
jz	short loc_68939A
cmp	al, 0Ah
jz	short loc_68939A
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_651D80
neg	al
sbb	al, al
add	al, 2
lea	ecx, [esp+50h+var_40]
mov	[esi+1E1h], al
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_68939A:
lea	ecx, [esp+50h+var_40]
mov	byte ptr [esi+1E1h], 0
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_6893B6:		; jumptable 0068930B case 30
mov	al, [esp+50h+var_40]
test	al, al
jz	short loc_6893F6
cmp	al, 0Ah
jz	short loc_6893F6
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_651D80
neg	al
sbb	al, al
add	al, 2
lea	ecx, [esp+50h+var_40]
mov	[esi+1E2h], al
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_6893F6:
lea	ecx, [esp+50h+var_40]
mov	byte ptr [esi+1E2h], 0
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_689412:		; jumptable 0068930B case 65
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6894AD	; default
			; jumptable 0068930B cases 2-7,9-23,25-28,31,34-64
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, esi
call	sub_67DB20
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_68945E:		; jumptable 0068930B case 33
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_651BB0
mov	edi, eax
test	edi, edi
jz	short loc_6894A4
mov	edx, [edi+78h]
mov	eax, [edx+8]
lea	ecx, [edi+78h]
call	eax
cmp	eax, 2
jnz	short loc_6894A4
push	edi
mov	ecx, esi
call	sub_688CE0
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_6894A4:
push	0
mov	ecx, esi
call	sub_688CE0

loc_6894AD:		; default
lea	ecx, [esp+50h+var_40] ;	jumptable 0068930B cases 2-7,9-23,25-28,31,34-64
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 40h
retn	0Ch

loc_6894C2:		; jumptable 0068930B case 32
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
cmp	byte ptr [eax+7Ch], 8
jb	short loc_6894AD ; default
			; jumptable 0068930B cases 2-7,9-23,25-28,31,34-64
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ebx, eax
push	ebx
lea	ecx, [esp+54h+var_40]
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_68957C
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 11h
jnz	short loc_68957C
fldz
lea	ecx, [esp+50h+var_20]
fst	[esp+50h+var_20]
push	ecx
fst	[esp+54h+var_18]
push	ebx
fst	[esp+58h+var_10]
mov	ecx, edi
fstp	[esp+58h+var_8]
call	sub_6E3870
fld	[esp+50h+var_20]
fst	[esp+50h+arg_4]
lea	edx, [esp+50h+var_30]
fld	[esp+50h+arg_4]
push	edx
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+54h+var_30]
fld	[esp+54h+var_18]
fst	[esp+54h+arg_4]
fld	[esp+54h+arg_4]
fmul	st, st(2)
fstp	[esp+54h+var_2C]
fld	[esp+54h+var_10]
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+54h+arg_4]
fld	[esp+54h+arg_4]
fmul	st, st(1)
fstp	[esp+54h+var_28]
fld	[esp+54h+var_8]
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+54h+arg_4]
fmul	[esp+54h+arg_4]
fstp	[esp+54h+var_24]
jmp	short loc_68957E

loc_68957C:
push	0

loc_68957E:
mov	ecx, esi
call	sub_67F890
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch
sub_689240 endp

align 4
off_68959C dd offset loc_689312, offset	loc_689327 ; jump table	for switch statement
dd offset loc_68935A, offset loc_6893B6
dd offset loc_6894C2, offset loc_68945E
dd offset loc_689412, offset loc_6894AD
byte_6895BC db	    0,	   0,	  7,	 7 ; indirect table for	switch statement
db	7,     7,     7,     7
db	0,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	1,     7,     7,     7
db	7,     2,     3,     7
db	4,     5,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     6
align 10h



sub_689600 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+1C8h]
mov	eax, 100h
or	[esi+76h], ax
test	edi, edi
jz	short loc_68962C
mov	ecx, edi
call	sub_6856E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_68962C:
cmp	dword ptr [esi+1D4h], 0
mov	dword ptr [esi+1C8h], 0
jz	short loc_689648
push	0
mov	ecx, esi
call	sub_688CE0

loc_689648:
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
lea	ecx, [esi+0C4h]
call	sub_65CFB0
mov	ecx, esi
call	sub_656AD0
mov	edx, [esi+78h]
mov	eax, [edx+34h]
lea	ecx, [esi+78h]
push	0
add	esi, 160h
push	esi
call	eax
pop	edi
pop	esi
retn
sub_689600 endp

align 10h



sub_689690 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 30h
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
xor	ebx, ebx
lea	ecx, [esp+40h+var_10]
xor	eax, eax
push	ecx
mov	ebp, 1
mov	ecx, esi
mov	[esp+44h+var_10], ebp
mov	[esp+44h+var_C], ebx
mov	[esp+44h+var_8], ax
mov	[esp+44h+var_6], bl
mov	[esp+44h+var_4], bl
mov	[esp+44h+var_3], bl
mov	[esp+44h+var_5], 0FFh
call	sub_658330
test	al, al
mov	eax, [esi+0BCh]
jz	short loc_68974B
xor	edx, edx
push	4
lea	ecx, [eax+2408h]
mov	[esp+44h+var_30], ebp
mov	[esp+44h+var_2C], ebx
mov	word ptr [esp+44h+var_28], dx
mov	byte ptr [esp+44h+var_28+2], bl
mov	byte ptr [esp+44h+var_24], bl
mov	byte ptr [esp+44h+var_24+1], bl
mov	byte ptr [esp+44h+var_28+3], 0FFh
call	sub_696220
mov	edi, eax
mov	dword ptr [edi+4], 2
add	[esi+4], ebp
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68971B
call	sub_64A400

loc_68971B:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68972A
call	sub_64A400

loc_68972A:
mov	eax, [esp+40h+var_30]
mov	ecx, [esp+40h+var_2C]
mov	edx, [esp+40h+var_28]
mov	[edi+0Ch], ebx
mov	[edi+10h], eax
mov	eax, [esp+40h+var_24]
mov	[edi+14h], ecx
mov	[edi+18h], edx
mov	[edi+1Ch], eax
jmp	short loc_6897BE

loc_68974B:
xor	ecx, ecx
mov	word ptr [esp+40h+var_18], cx
push	5
lea	ecx, [eax+2408h]
mov	[esp+44h+var_20], ebp
mov	[esp+44h+var_1C], ebx
mov	byte ptr [esp+44h+var_18+2], bl
mov	byte ptr [esp+44h+var_14], bl
mov	byte ptr [esp+44h+var_14+1], bl
mov	byte ptr [esp+44h+var_18+3], 0FFh
call	sub_696220
mov	edi, eax
mov	dword ptr [edi+4], 2
add	[esi+4], ebp
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_689790
call	sub_64A400

loc_689790:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68979F
call	sub_64A400

loc_68979F:
mov	edx, [esp+40h+var_20]
mov	eax, [esp+40h+var_1C]
mov	ecx, [esp+40h+var_18]
mov	[edi+0Ch], ebx
mov	[edi+10h], edx
mov	edx, [esp+40h+var_14]
mov	[edi+14h], eax
mov	[edi+18h], ecx
mov	[edi+1Ch], edx

loc_6897BE:
or	word ptr [esi+76h], 20h
push	ebx
mov	ecx, esi
call	sub_680C30
mov	eax, [esi+0BCh]
mov	ebp, [eax+2488h]
xor	edi, edi
cmp	ebp, ebx
jbe	short loc_689833
lea	ecx, [ecx+0]

loc_6897E0:
mov	ecx, [esi+0BCh]
mov	edx, [ecx+2484h]
mov	eax, [edx+edi*4]
mov	ecx, [eax+1D4h]
cmp	ecx, ebx
jz	short loc_689813
mov	eax, [eax+0BCh]
push	eax
call	sub_654F00
cmp	eax, ebx
jz	short loc_689813
lea	ecx, [eax+78h]
call	sub_661C50
jmp	short loc_689815

loc_689813:
xor	eax, eax

loc_689815:
cmp	esi, eax
jnz	short loc_68982E
mov	ecx, [esi+0BCh]
mov	edx, [ecx+2484h]
mov	ecx, [edx+edi*4]
push	esi
call	sub_688CE0

loc_68982E:
inc	edi
cmp	edi, ebp
jb	short loc_6897E0

loc_689833:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn
sub_689690 endp

align 10h



sub_689840 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1C4h], 0
jnz	short loc_68989C
mov	eax, [esi+0BCh]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	3Ch
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_689880
mov	edx, [esi]
mov	eax, [edx+0D0h]
push	esi
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_6891D0
mov	edi, eax
jmp	short loc_689882

loc_689880:
xor	edi, edi

loc_689882:
mov	ecx, [esi+1C4h]
test	ecx, ecx
jz	short loc_689891
call	sub_64B3B0

loc_689891:
mov	[esi+1C4h], edi
mov	eax, edi
pop	edi
pop	esi
retn

loc_68989C:
mov	eax, [esi+1C4h]
pop	esi
retn
sub_689840 endp

align 10h


; Attributes: thunk

sub_6898B0 proc	near
jmp	sub_689840
sub_6898B0 endp

align 10h



sub_6898C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	3Ch
call	eax
test	eax, eax
jz	short loc_6898E9
push	esi
mov	ecx, eax
call	sub_689180
pop	esi
retn	4

loc_6898E9:
xor	eax, eax
pop	esi
retn	4
sub_6898C0 endp

align 10h



sub_6898F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
push	eax
mov	dword ptr [esi], offset	off_1436FAC
mov	dword ptr [edi], offset	off_1436F58
xor	ebx, ebx
push	ebp
mov	ecx, edi
mov	[esi+34h], ebx
call	sub_688E40
mov	edx, [esp+10h+arg_8]
mov	[esi+3Ah], bl
xor	ecx, ecx
mov	[esi+38h], cx
lea	ecx, [esi+3Ch]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_1436E24
mov	dword ptr [edi], offset	off_1436DD0
mov	dword ptr [ecx], offset	off_1436FD0
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6898F0 endp

align 10h



sub_689970 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	edi
push	0
push	ebx
mov	edi, ecx
call	sub_655BA0
mov	ebp, [esp+14h+arg_8]
add	esp, 8
test	al, al
jz	short loc_6899B5
push	esi
lea	esi, [edi-78h]
push	ebx
mov	ecx, esi
call	sub_6593C0
mov	edx, [esi]
push	0
push	ebp
push	eax
mov	eax, [edx+11Ch]
mov	ecx, esi
call	eax
pop	esi
test	al, al
jz	short loc_6899B5
pop	edi
pop	ebp
mov	al, 1
pop	ebx
retn	10h

loc_6899B5:
cmp	dword ptr [edi+14Ch], 0
jnz	short loc_6899D2
lea	ecx, [edi-78h]
call	sub_689840
test	eax, eax
jnz	short loc_6899D2
pop	edi
pop	ebp
xor	al, al
pop	ebx
retn	10h

loc_6899D2:
mov	eax, [esp+0Ch+arg_C]
mov	edi, [edi+14Ch]
mov	edx, [edi+10h]
mov	edx, [edx+28h]
push	eax
mov	eax, [esp+10h+arg_0]
push	ebp
lea	ecx, [edi+10h]
push	ebx
push	eax
call	edx
pop	edi
pop	ebp
pop	ebx
retn	10h
sub_689970 endp

align 10h



sub_689A00 proc	near

var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	ebp, ecx
mov	ecx, [esp+20h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebp
call	sub_6898F0
lea	edx, [esp+20h+arg_8]
push	edx
push	offset off_1436AB8
push	esi
lea	ecx, [ebp+3Ch]
lea	edi, [ebp+10h]
mov	bl, 1
push	ebp
mov	dword ptr [ebp+0], offset off_1436E24
mov	dword ptr [edi], offset	off_1436DD0
mov	dword ptr [ecx], offset	off_1436FD0
mov	byte ptr [esp+30h+arg_8], bl
call	sub_663110
mov	[esp+20h+var_C], bl
mov	ebx, [esi]
lea	eax, [esp+20h+var_10]
push	eax
add	ebx, 20Ch
push	ebx
push	esi
lea	ecx, [edi-10h]
mov	byte ptr [esp+2Ch+arg_8], 3
mov	[esp+2Ch+var_10], 2
call	sub_687600
lea	ecx, [esp+20h+arg_8]
push	ecx
lea	edx, [esp+24h+var_10]
push	edx
push	ebx
push	esi
mov	ecx, edi
call	sub_665530
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
push	offset aEnabled	; "enabled"
mov	bl, 0Ah
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], 3
mov	[esp+30h+var_10], bl
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
push	offset aScale9grid ; "scale9Grid"
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], 3
mov	[esp+30h+var_10], bl
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+arg_8]
push	ecx
lea	edx, [esp+24h+var_10]
push	edx
push	offset aTabindex ; "tabIndex"
mov	byte ptr [esp+2Ch+arg_8], 3
mov	[esp+2Ch+var_10], bl
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
push	offset aTrackasmenu ; "trackAsMenu"
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], 3
mov	[esp+30h+var_10], bl
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
push	offset aTransform ; "transform"
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], 3
mov	[esp+30h+var_10], bl
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_689A00 endp

align 10h



sub_689B70 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6832B0
sub_689B70 endp

align 10h



sub_689B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
mov	eax, [eax]
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	esi, [edi]
mov	ebp, eax
test	esi, esi
jz	short loc_689BE8
mov	edx, [esi+4]
and	edx, ebp
push	edx
push	ebx
mov	ecx, edi
call	sub_683510
test	eax, eax
jl	short loc_689BE8
lea	edi, [eax+1]
mov	eax, [ebx]
shl	edi, 4
add	edi, esi
push	eax
mov	ecx, edi
call	sub_67A3D0
mov	ecx, [ebx+4]
mov	edx, [ecx]
mov	[edi+4], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_689BE8:
mov	eax, [esp+10h+arg_0]
push	ebp
push	ebx
push	eax
mov	ecx, edi
call	sub_6B3900
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_689B80 endp

align 10h



sub_689C00 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], offset	off_1436C18
mov	dword ptr [eax+4], 1
mov	[eax+8], ecx
mov	dword ptr [eax+0Ch], 40000h
mov	dword ptr [eax], offset	off_1436FD8
mov	[eax+10h], edx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], cl
retn	4
sub_689C00 endp

align 10h



sub_689C50 proc	near
fld1
retn
sub_689C50 endp

align 10h



sub_689C60 proc	near
mov	ecx, [ecx+10h]
mov	eax, [ecx]
mov	edx, [eax+20h]
jmp	edx
sub_689C60 endp

align 10h



sub_689C70 proc	near
mov	ecx, [ecx+10h]
mov	eax, [ecx]
mov	edx, [eax+44h]
jmp	edx
sub_689C70 endp

align 10h



; int __stdcall	sub_689C80(char	*Src, int, char)
sub_689C80 proc	near

Src= dword ptr	4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, dword ptr [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax		; char
mov	eax, [esp+4+Src]
push	edx		; int
push	eax		; Src
add	ecx, 14h
push	ecx		; int
call	sub_6AE5C0
add	esp, 10h
retn	0Ch
sub_689C80 endp

align 10h



sub_689CA0 proc	near
mov	eax, 8400h
retn
sub_689CA0 endp

align 10h



sub_689CB0 proc	near
mov	eax, [ecx+10h]
mov	ecx, [eax+20h]
fld	dword ptr [ecx+40h]
retn
sub_689CB0 endp

align 10h



sub_689CC0 proc	near
mov	eax, [ecx+10h]
mov	ecx, [eax+20h]
mov	eax, [ecx+28h]
retn
sub_689CC0 endp

align 10h



sub_689CD0 proc	near
mov	eax, [ecx+10h]
mov	ecx, [eax+20h]
mov	eax, [ecx+24h]
and	eax, 0FFFFFFFCh
add	eax, 8
retn
sub_689CD0 endp




sub_689CE0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+1Ch]
mov	ecx, [ecx+20h]
lea	eax, [ecx+eax*8]
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
retn	4
sub_689CE0 endp

align 10h



sub_689D00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+20h]
mov	ecx, [esp+arg_4]
mov	edx, [eax+ecx*8]
lea	ecx, [eax+ecx*8]
mov	eax, [esp+arg_0]
mov	ecx, [ecx+4]
mov	[eax], edx
mov	[eax+4], ecx
retn	8
sub_689D00 endp

align 10h



sub_689D20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fldz
fst	dword ptr [eax]
fstp	dword ptr [eax+4]
fld1
fst	dword ptr [eax+8]
fstp	dword ptr [eax+0Ch]
retn	4
sub_689D20 endp

align 10h



sub_689D40 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
mov	dword ptr [esi], offset	off_1436FD8
cmp	[esi+24h], edi
jbe	short loc_689D62

loc_689D51:
mov	eax, [esi+20h]
lea	ecx, [eax+edi*8]
call	sub_6F9680
inc	edi
cmp	edi, [esi+24h]
jb	short loc_689D51

loc_689D62:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+2Ch]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [esi+30h]
test	ecx, ecx
jz	short loc_689D7F
call	sub_64A400

loc_689D7F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+20h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+14h]
call	sub_684870
pop	edi
mov	dword ptr [esi], offset	off_1436C18
pop	esi
retn
sub_689D40 endp

align 10h



sub_689DB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	esi
mov	edi, ecx
call	sub_65C490
mov	eax, [esi+78h]
mov	edx, [eax+8]
add	esi, 78h
mov	ecx, esi
call	edx
cmp	eax, 2
jnz	short loc_689E20
mov	ecx, esi
call	sub_661C50
cmp	dword ptr [eax+1BCh], 0
jge	short loc_689E20
mov	ecx, [eax+0A0h]
shr	ecx, 4
test	cl, 1
jz	short loc_689E20
mov	ecx, [eax+1C4h]
test	ecx, ecx
jz	short loc_689DFC
mov	eax, ecx
jmp	short loc_689E02

loc_689DFC:
mov	eax, [eax+80h]

loc_689E02:
test	eax, eax
jz	short loc_689E20
mov	ecx, eax
call	sub_6806A0
test	al, al
jz	short loc_689E20
mov	ecx, edi
call	sub_689840
test	eax, eax
jz	short loc_689E20
mov	byte ptr [eax+3Ah], 1

loc_689E20:
mov	eax, [edi+0BCh]
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
pop	edi
pop	esi
retn	4
sub_689DB0 endp

align 10h



sub_689E40 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, ecx
xor	eax, eax
mov	[ebx], eax
mov	[ebx+4], eax
push	esi
mov	[ebx+8], eax
mov	ecx, [ebp+0]
push	edi
mov	edi, [ebp+4]
mov	[esp+10h+arg_0], ecx
cmp	edi, eax
jz	short loc_689E88
mov	esi, [ebx+4]
lea	edx, [esi+edi]
push	edx
push	ebx
mov	ecx, ebx
call	sub_6572D0
imul	esi, 9Ch
mov	eax, [esp+10h+arg_0]
add	esi, [ebx]
push	eax
push	edi
push	esi
call	sub_657110
add	esp, 0Ch

loc_689E88:
lea	esi, [ebp+0Ch]
lea	edi, [ebx+0Ch]
mov	ecx, 8
rep movsd
fld	dword ptr [ebp+2Ch]
fstp	dword ptr [ebx+2Ch]
fld	dword ptr [ebp+30h]
fstp	dword ptr [ebx+30h]
fld	dword ptr [ebp+34h]
fstp	dword ptr [ebx+34h]
fld	dword ptr [ebp+38h]
fstp	dword ptr [ebx+38h]
fld	dword ptr [ebp+3Ch]
fstp	dword ptr [ebx+3Ch]
fld	dword ptr [ebp+40h]
fstp	dword ptr [ebx+40h]
pop	edi
fld	dword ptr [ebp+44h]
pop	esi
fstp	dword ptr [ebx+44h]
mov	ecx, [ebp+48h]
mov	[ebx+48h], ecx
mov	edx, [ebp+4Ch]
mov	[ebx+4Ch], edx
mov	ax, [ebp+50h]
mov	[ebx+50h], ax
mov	cl, [ebp+52h]
mov	[ebx+52h], cl
mov	dl, [ebp+53h]
pop	ebp
mov	[ebx+53h], dl
mov	eax, ebx
pop	ebx
retn	4
sub_689E40 endp

align 10h



sub_689EF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	eax, [esi+14h]
mov	ebx, ecx
push	edi
lea	ecx, [ebx+0C4h]
push	eax
mov	[esp+24h+var_10], ebx
call	sub_65CBC0
cmp	eax, 0FFFFFFFFh
jnz	short loc_689F21

loc_689F15:
xor	al, al
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_689F21:
mov	edi, [esp+20h+arg_4]
push	esi
mov	ecx, edi
call	sub_65C4C0
mov	eax, [edi+78h]
mov	edx, [eax+8]
lea	ebp, [edi+78h]
mov	ecx, ebp
call	edx
cmp	eax, 2
jnz	loc_68A004
mov	eax, [esi+78h]
mov	edx, [eax+8]
lea	ecx, [esi+78h]
call	edx
cmp	eax, 2
jnz	loc_68A004
lea	ecx, [esi+78h]
call	sub_661C50
mov	bl, [eax+1E0h]
shr	bl, 5
mov	ecx, ebp
and	bl, 1
call	sub_661C50
movzx	ecx, byte ptr [eax+1E0h]
test	bl, bl
jz	short loc_689F82
or	cl, 20h
jmp	short loc_689F85

loc_689F82:
and	cl, 0DFh

loc_689F85:
mov	[eax+1E0h], cl
lea	ecx, [esi+78h]
call	sub_661C50
mov	eax, [eax+0ACh]
test	eax, eax
jz	short loc_68A000
cmp	byte ptr [eax+0Dh], 0
jz	short loc_689FEA
push	eax
lea	ecx, [esp+24h+var_C]
call	sub_65A330
mov	eax, [esp+20h+var_8]
dec	eax
push	eax
lea	ecx, [esp+24h+var_C]
call	sub_658810
mov	ebx, [edi]
sub	esp, 0Ch
lea	edx, [esp+2Ch+var_C]
mov	ecx, esp
push	edx
add	ebx, 30h
call	sub_65A330
mov	eax, [ebx]
mov	ecx, edi
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+20h+var_C]
mov	edx, [edx+30h]
push	eax
call	edx
jmp	short loc_68A000

loc_689FEA:
mov	ebx, [edi]
sub	esp, 0Ch
mov	ecx, esp
push	eax
add	ebx, 30h
call	sub_65A330
mov	eax, [ebx]
mov	ecx, edi
call	eax

loc_68A000:
mov	ebx, [esp+20h+var_10]

loc_68A004:
mov	edx, [esi]
mov	eax, [edx+8Ch]
mov	ecx, esi
call	eax
mov	ecx, 100h
or	[esi+76h], cx
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	ecx, ebx
call	eax
mov	ecx, eax
call	sub_69A320
push	esi
mov	ecx, edi
call	sub_656E10
mov	esi, [esi+14h]
push	esi
lea	esi, [ebx+0C4h]
mov	ecx, esi
call	sub_65CBC0
cmp	eax, 0FFFFFFFFh
jz	loc_689F15
push	edi
push	eax
mov	ecx, esi
call	sub_65C7B0
mov	eax, [ebx+0BCh]
pop	edi
pop	esi
add	eax, 2474h
or	dword ptr [eax], 400h
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	8
sub_689EF0 endp

align 10h



sub_68A080 proc	near
push	ebx
push	esi
mov	esi, ecx
lea	ecx, [esi+8]
mov	dword ptr [esi], offset	off_1437044
call	sub_687850
xor	ebx, ebx
mov	[esi+28h], bl
mov	[esi+38h], bl
mov	[esi+48h], bl
mov	[esi+58h], bl
mov	[esi+68h], ebx
mov	[esi+6Ch], ebx
mov	[esi+70h], ebx
mov	[esi+74h], ebx
lea	ecx, [esi+80h]
mov	[esi+78h], ebx
mov	[esi+7Ch], bl
call	sub_687920
mov	[esi+0A0h], ebx
mov	[esi+0A4h], ebx
mov	[esi+0A8h], ebx
mov	[esi+0ACh], ebx
mov	byte ptr [esi+0B0h], 0Ah
and	byte ptr [esi+0C6h], 0FCh
mov	[esi+0C0h], ebx
xor	eax, eax
mov	[esi+0C4h], ax
mov	[esi+0C8h], ebx
mov	[esi+0CCh], ebx
mov	[esi+0D0h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn
sub_68A080 endp

align 10h



sub_68A110 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esi+0C8h]
mov	dword ptr [esi], offset	off_1437044
call	sub_688FC0
lea	ecx, [esi+0B0h]
call	sub_652830
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0A4h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+80h]
call	sub_688F40
lea	ecx, [esi+68h]
call	sub_6806F0
lea	edi, [esi+68h]
mov	ebx, 3

loc_68A160:
sub	edi, 10h
mov	ecx, edi
call	sub_652830
sub	ebx, 1
jns	short loc_68A160
lea	ecx, [esi+8]
call	sub_688EC0
pop	edi
mov	dword ptr [esi], offset	off_143F300
pop	esi
pop	ebx
retn
sub_68A110 endp

align 10h



sub_68A190 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_68A110
test	[esp+4+arg_0], 1
jz	short loc_68A1AD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_68A1AD:
mov	eax, esi
pop	esi
retn	4
sub_68A190 endp

align 10h



sub_68A1C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_689D40
test	[esp+4+arg_0], 1
jz	short loc_68A1DD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_68A1DD:
mov	eax, esi
pop	esi
retn	4
sub_68A1C0 endp

align 10h



sub_68A1F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h

mov	edx, [esp+arg_C]
push	ebx
push	ebp
push	esi
push	edi
push	ecx
mov	eax, esp
mov	esi, ecx
mov	ecx, [esp+14h+arg_10]
mov	[eax], ecx
mov	eax, [esp+14h+arg_4]
push	edx
push	eax
mov	ecx, esi
call	sub_65BDC0
mov	edi, [esp+10h+arg_0]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_14370B0
mov	dword ptr [esi+0Ch], offset off_14370A4
mov	dword ptr [esi+78h], offset off_1437050
cmp	edi, ebx
jz	short loc_68A235
mov	ecx, edi
call	sub_64A420

loc_68A235:
mov	ecx, [esp+10h+arg_8]
mov	[esi+0B8h], edi
mov	[esi+0BCh], ecx
mov	[esi+0C0h], ebx
mov	[esi+0C4h], ebx
mov	[esi+0C8h], ebx
mov	[esi+0CCh], ebx
mov	[esi+0D0h], ebx
mov	[esi+0D4h], ebx
mov	[esi+0D8h], ebx
lea	ebp, [esi+0E8h]
mov	[esi+0DCh], ebx
mov	[esi+0E0h], ebx
mov	ecx, ebp
mov	[esi+0E4h], ebx
call	sub_68A080
mov	dword ptr [esi+1BCh], 0FFFFFFFFh
mov	[esi+1C0h], ebx
mov	[esi+1C4h], ebx
mov	[esi+1CCh], ebx
mov	[esi+1D4h], ebx
mov	[esi+1D8h], ebx
mov	[esi+1DCh], ebx
mov	[esi+1E0h], bl
mov	[esi+1E1h], bl
mov	[esi+1E2h], bl
mov	[esi+1E4h], ebx
mov	[esi+1D0h], ebx
mov	[esi+1C8h], ebx
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
call	eax
and	eax, 0FF00h
cmp	eax, 8400h
jnz	short loc_68A307
mov	ecx, [edi+2Ch]
push	ecx
mov	ecx, esi
call	sub_67F890
or	byte ptr [esi+1E0h], 40h

loc_68A307:
push	esi
mov	ecx, ebp
call	sub_667FD0
movzx	eax, byte ptr [esi+1E0h]
mov	cl, [esp+10h+arg_14]
and	eax, 0FCh
or	al, 1
and	al, 0DFh
mov	[esi+1E0h], al
movzx	eax, al
cmp	cl, bl
jz	short loc_68A334
or	al, 10h
jmp	short loc_68A336

loc_68A334:
and	al, 0EFh

loc_68A336:
mov	edi, [esp+10h+arg_C]
mov	[esi+1E0h], al
cmp	edi, ebx
jz	short loc_68A363
cmp	cl, bl
jnz	short loc_68A363
mov	edx, [edi]
mov	eax, [edx+5Ch]
mov	ecx, edi
call	eax
cmp	eax, [esp+10h+arg_4]
jz	short loc_68A35F
mov	dl, 1
mov	[esp+10h+arg_14], dl
jmp	short loc_68A36D

loc_68A35F:
mov	cl, [esp+10h+arg_14]

loc_68A363:
mov	[esp+10h+arg_14], bl
mov	dl, bl
cmp	cl, bl
jnz	short loc_68A379

loc_68A36D:
cmp	edi, ebx
jz	short loc_68A379
cmp	dl, bl
jz	loc_68A495

loc_68A379:
mov	ecx, [esi+0BCh]
mov	eax, [ecx+3Ch]
add	ecx, 38h
cmp	eax, ecx
jz	short loc_68A3B5
mov	edi, [esi+90h]
nop

loc_68A390:
cmp	[eax+0Ch], edi
jnz	short loc_68A39A
cmp	[eax+18h], dl
jz	short loc_68A3AC

loc_68A39A:
mov	ecx, [esi+0BCh]
mov	eax, [eax+4]
add	ecx, 38h
cmp	eax, ecx
jnz	short loc_68A390
jmp	short loc_68A3B5

loc_68A3AC:
inc	dword ptr [eax+8]
mov	[esi+1C0h], eax

loc_68A3B5:
cmp	[esi+1C0h], ebx
jnz	loc_68A495
mov	ebp, [esp+10h+arg_8]
mov	edi, [ebp+20h]
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebx
push	20h
mov	ecx, edi
call	eax
cmp	eax, ebx
jz	short loc_68A3F4
mov	ecx, [esi+90h]
mov	[eax+0Ch], ecx
mov	cl, [esp+10h+arg_14]
mov	dword ptr [eax+8], 1
mov	[eax+18h], cl
mov	[eax+1Ch], ebx
jmp	short loc_68A3F6

loc_68A3F4:
xor	eax, eax

loc_68A3F6:
mov	edx, [esi+90h]
mov	[esi+1C0h], eax
mov	eax, [edx+1Ch]
mov	eax, [eax+80h]
mov	ecx, [esi+1C0h]
mov	[ecx+14h], eax
cmp	[esp+10h+arg_14], bl
jz	short loc_68A41E
xor	eax, eax
jmp	short loc_68A42B

loc_68A41E:
mov	ecx, [esi+90h]
mov	edx, [ecx]
mov	eax, [edx+14h]
call	eax

loc_68A42B:
mov	ecx, [esi+1C0h]
mov	[ecx+10h], eax
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebx
push	34h
mov	ecx, edi
call	eax
cmp	eax, ebx
jz	short loc_68A45D
mov	ecx, [ebp+10Ch]
mov	edx, [esi+90h]
push	ecx
push	edx
mov	ecx, eax
call	sub_6F5CD0
mov	ebp, eax
jmp	short loc_68A45F

loc_68A45D:
xor	ebp, ebp

loc_68A45F:
mov	edi, [esi+1C0h]
mov	ecx, [edi+1Ch]
add	edi, 1Ch
cmp	ecx, ebx
jz	short loc_68A474
call	sub_64A400

loc_68A474:
mov	[edi], ebp
mov	eax, [esi+0BCh]
mov	edx, [eax+3Ch]
mov	ecx, [esi+1C0h]
add	eax, 38h
mov	[ecx+4], edx
mov	[ecx], eax
mov	edx, [eax+4]
mov	[edx], ecx
mov	[eax+4], ecx

loc_68A495:
mov	ecx, [esi+0B8h]
mov	eax, [ecx]
mov	edx, [eax+28h]
call	edx
mov	edi, eax
cmp	edi, [esi+0E0h]
lea	ebp, [esi+0DCh]
jnb	short loc_68A4BE
mov	eax, [ebp+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_68A4D3
push	edi
jmp	short loc_68A4CB

loc_68A4BE:
cmp	edi, [ebp+8]
jb	short loc_68A4D3
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_68A4CB:
push	ebp
mov	ecx, ebp
call	sub_6807D0

loc_68A4D3:		; size_t
push	edi
mov	[ebp+4], edi
mov	edx, [ebp+0]
push	ebx		; int
push	edx		; void *
call	_memset
add	esp, 0Ch
push	6
lea	eax, [esi+0E8h]
push	eax
mov	ecx, esi
call	sub_655B90
mov	ecx, eax
call	sub_66FB70
mov	edi, eax
cmp	edi, ebx
jz	short loc_68A50D
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_68A50D:
mov	ecx, [esi+80h]
cmp	ecx, ebx
jz	short loc_68A51C
call	sub_64B3B0

loc_68A51C:
mov	[esi+80h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	18h
sub_68A1F0 endp

align 10h



sub_68A530 proc	near
mov	eax, [ecx+0C0h]
retn
sub_68A530 endp

align 10h



sub_68A540 proc	near
lea	eax, [ecx+0E8h]
retn
sub_68A540 endp

align 10h



sub_68A550 proc	near
mov	eax, [ecx+0D8h]
retn
sub_68A550 endp

align 10h



sub_68A560 proc	near
movzx	eax, byte ptr [ecx+1E0h]
shr	eax, 1
and	eax, 1
retn
sub_68A560 endp

align 10h



sub_68A570 proc	near
sub	ecx, 78h
jmp	sub_9D2500
sub_68A570 endp

align 10h



sub_68A580 proc	near
sub	ecx, 0Ch
jmp	sub_68BEC0
sub_68A580 endp

align 10h



sub_68A590 proc	near

arg_0= byte ptr	 4

sub	ecx, 78h
jmp	sub_68BEC0
sub_68A590 endp

align 10h



sub_68A5A0 proc	near
mov	eax, [ecx+0B8h]
retn
sub_68A5A0 endp

align 10h



sub_68A5B0 proc	near
mov	ecx, [ecx+0B8h]
mov	eax, [ecx]
mov	eax, [eax+34h]
jmp	eax
sub_68A5B0 endp

align 10h



sub_68A5C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_8]
mov	eax, [ecx]
mov	eax, [eax+3Ch]
sub	esp, 10h
push	edx
mov	edx, [esp+14h+arg_4]
push	edx
lea	edx, [esp+18h+var_10]
push	edx
call	eax
fld	[esp+10h+var_10]
mov	eax, [esp+10h+arg_0]
fst	dword ptr [eax]
fld	[esp+10h+var_C]
fst	dword ptr [eax+4]
fld	[esp+10h+var_8]
fst	dword ptr [eax+8]
fxch	st(1)
fstp	dword ptr [eax+0Ch]
fstp	dword ptr [eax+10h]
fld	[esp+10h+var_4]
fst	dword ptr [eax+14h]
fstp	dword ptr [eax+1Ch]
fstp	dword ptr [eax+18h]
add	esp, 10h
retn	0Ch
sub_68A5C0 endp

align 10h



sub_68A610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	0
push	eax
add	ecx, 0FFFFFF88h
call	sub_686510
retn	0Ch
sub_68A610 endp

align 10h



sub_68A630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
push	0
add	ecx, 0FFFFFF88h
call	sub_686510
retn	0Ch
sub_68A630 endp

align 10h



sub_68A650 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1D0h], 0
mov	dword ptr [esi], offset	off_14370B0
mov	dword ptr [esi+0Ch], offset off_14370A4
mov	dword ptr [esi+78h], offset off_1437050
jz	short loc_68A6B6
call	ds:off_1437164
test	al, al
jnz	short loc_68A68C
cmp	dword ptr [esi+1D0h], 0
jz	short loc_68A6B6
push	0
mov	ecx, esi
call	sub_67F760

loc_68A68C:
cmp	dword ptr [esi+1D0h], 0
jz	short loc_68A6B6
mov	eax, [esi]
mov	edx, [eax+0B4h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_68A6B6
mov	ecx, [esi+1D0h]
test	ecx, ecx
jz	short loc_68A6B6
push	0
call	sub_67F760

loc_68A6B6:
mov	eax, [esi+1C0h]
push	ebx
push	edi
test	eax, eax
jz	short loc_68A704
dec	dword ptr [eax+8]
mov	eax, [esi+1C0h]
cmp	dword ptr [eax+8], 0
jnz	short loc_68A704
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
mov	[ecx], edx
mov	edi, [esi+1C0h]
test	edi, edi
jz	short loc_68A704
mov	ecx, [edi+1Ch]
test	ecx, ecx
jz	short loc_68A6F6
call	sub_64A400

loc_68A6F6:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_68A704:
mov	edi, [esi+1C8h]
test	edi, edi
jz	short loc_68A723
mov	ecx, edi
call	sub_6856E0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_68A723:
lea	ebx, [esi+0C4h]
mov	ecx, ebx
call	sub_65CFB0
mov	eax, [esi+0BCh]
or	dword ptr [eax+2474h], 400h
mov	ecx, dword_1855FC0
mov	edx, [esi+0C0h]
add	eax, 2474h
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esi+1DCh]
test	edi, edi
jz	short loc_68A77E
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_68A770
call	sub_650DF0

loc_68A770:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_68A77E:
mov	edi, [esi+1D4h]
test	edi, edi
jz	short loc_68A7A4
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_68A7A4
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_68A7A4:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_68A7B3
call	sub_64A400

loc_68A7B3:
mov	ecx, [esi+1C4h]
test	ecx, ecx
jz	short loc_68A7C2
call	sub_64B3B0

loc_68A7C2:
lea	ecx, [esi+0E8h]
call	sub_68A110
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0DCh]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, ebx
call	sub_7D3200
mov	ecx, [esi+0B8h]
pop	edi
pop	ebx
test	ecx, ecx
jz	short loc_68A7F9
call	sub_666B00

loc_68A7F9:
mov	ecx, esi
pop	esi
jmp	sub_65C080
sub_68A650 endp

align 10h



sub_68A810 proc	near

var_138= dword ptr -138h
var_134= byte ptr -134h
var_133= byte ptr -133h
var_132= byte ptr -132h
var_131= byte ptr -131h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	byte ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	byte ptr -0B4h
var_B2=	byte ptr -0B2h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_98=	dword ptr -98h
var_8C=	byte ptr -8Ch
var_7C=	byte ptr -7Ch
var_6C=	byte ptr -6Ch
var_5C=	dword ptr -5Ch
var_50=	byte ptr -50h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 138h
push	ebx
push	ebp
mov	ebp, [esp+140h+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+148h+arg_14]
mov	eax, ecx
shr	eax, 2
and	al, 1
mov	byte ptr [esp+148h+var_138+3], al
mov	al, cl
and	al, 1
mov	[esp+148h+var_133], al
mov	eax, [esp+148h+arg_18]
xor	ebx, ebx
mov	[esp+148h+var_12C], edi
cmp	eax, ebx
jnz	short loc_68A869
push	ecx
mov	ecx, [ebp+4Ch]
mov	eax, esp
lea	edx, [esp+14Ch+var_8]
mov	[eax], ecx
mov	ecx, [edi+90h]
push	edx
call	sub_6AFD80

loc_68A869:
mov	ecx, [eax]
mov	eax, [eax+4]
mov	[esp+148h+var_E0], ecx
mov	[esp+148h+var_DC], eax
cmp	ecx, ebx
jnz	short loc_68A8B6
mov	eax, [edi+94h]
movzx	esi, word ptr [ebp+4Ch]
cmp	eax, ebx
jnz	short loc_68A88F
mov	ecx, edi
call	sub_658B70

loc_68A88F:
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
push	esi
push	edx
push	offset aSGfxspriteAddd ; "%s, GFxSprite::AddDisplayObject(): unkn"...
add	edi, 0Ch
push	edi
call	sub_6809A0
add	esp, 10h

loc_68A8A7:
xor	eax, eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 138h
retn	20h

loc_68A8B6:
mov	edx, [ebp+48h]
lea	eax, [esp+148h+var_132]
push	eax
lea	ecx, [edi+0C4h]
push	edx
mov	[esp+150h+var_132], bl
call	sub_65CC00
mov	esi, eax
cmp	byte ptr [esp+148h+var_138+3], bl
jz	loc_68AB0A
mov	byte ptr [esp+148h+var_138+2], 1
cmp	esi, ebx
jz	short loc_68A911
mov	eax, [esi]
mov	edx, [eax+1Ch]
mov	ecx, esi
call	edx
mov	byte ptr [esp+148h+var_138+2], al
cmp	al, bl
jnz	short loc_68A911
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_68A911
mov	eax, [esi]
mov	edx, [eax+20h]
push	1
mov	ecx, esi
call	edx
mov	byte ptr [esp+148h+var_138+2], 1

loc_68A911:
cmp	[esp+148h+var_132], bl
jnz	short loc_68A925
cmp	esi, ebx
jz	loc_68AABA
cmp	byte ptr [esp+148h+var_138+2], bl
jz	short loc_68A8A7

loc_68A925:
cmp	esi, ebx
jz	loc_68AABA
cmp	dword ptr [esi+14h], 0FFFFFFFFh
jl	loc_68AABA
mov	eax, [esi+10h]
cmp	eax, [ebp+4Ch]
jnz	loc_68AABA
mov	al, [esi+76h]
shr	al, 7
test	al, 1
jz	short loc_68A956
mov	ecx, esi
call	sub_659370
jmp	short loc_68A95F

loc_68A956:
mov	eax, [edi+160h]
add	eax, 8

loc_68A95F:
mov	ebp, [eax]
mov	eax, [ebp+8]
inc	eax
mov	[ebp+8], eax
mov	cl, [esi+76h]
shr	cl, 7
mov	[esp+148h+var_128], eax
test	cl, 1
jz	short loc_68A9AE
mov	edx, [esp+148h+arg_4]
mov	ecx, [edx]
mov	eax, [ecx+10h]
cmp	eax, ebx
jnz	short loc_68A9A6
cmp	[ebp+10h], ebx
jz	short loc_68A9AE
cmp	eax, ebx
jnz	short loc_68A9A6
mov	edx, [esi+0A0h]
shr	edx, 0Eh
test	dl, 1
jnz	short loc_68A9AE
cmp	eax, ebx
jz	loc_68AAA0

loc_68A9A6:
cmp	ebp, ecx
jnz	loc_68AAA0

loc_68A9AE:
mov	eax, [esp+148h+arg_10]
cmp	eax, 0FFFFFFFFh
jnz	short loc_68A9C0
mov	eax, [edi+0D8h]

loc_68A9C0:
cmp	[esi+18h], eax
jnz	loc_68AA9B
mov	eax, [esp+148h+arg_0]
push	eax
lea	ecx, [esp+14Ch+var_5C]
call	sub_689E40
mov	cl, [esi+76h]
shr	cl, 7
test	cl, 1
jz	short loc_68AA05
mov	edx, [esp+148h+arg_0]
mov	al, 20h
test	[edx+53h], al
jnz	short loc_68AA05
cmp	[esi+0ACh], ebx
jz	short loc_68AA05
or	byte ptr [esp+148h+var_C+3], al

loc_68AA05:
mov	eax, [esp+148h+arg_0]
test	byte ptr [eax+53h], 80h
jnz	short loc_68AA2E
mov	edx, [esi]
mov	eax, [edx+14h]
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_68AA2E
or	byte ptr [esp+148h+var_C+3], 80h
mov	byte ptr [esp+148h+var_C+2], bl

loc_68AA2E:
mov	ecx, [esp+148h+arg_0]
mov	bl, 8
test	[ecx+53h], bl
jnz	short loc_68AA5B
lea	ecx, [esi+24h]
call	sub_68CEF0
test	al, al
jnz	short loc_68AA5B
or	byte ptr [esp+148h+var_C+3], bl
lea	ecx, [esp+148h+var_50]
call	sub_68CED0

loc_68AA5B:
lea	edx, [esp+148h+var_5C]
push	edx
mov	ecx, edi
call	sub_67F300
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+148h+var_5C]
mov	eax, [eax+30h]
push	edx
call	eax
add	dword ptr [ebp+8], 0FFFFFFFFh
jnz	short loc_68AA8C
mov	ecx, ebp
call	sub_650DF0

loc_68AA8C:
xor	eax, eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 138h
retn	20h

loc_68AA9B:
mov	[esp+148h+var_133], 1

loc_68AAA0:
mov	eax, [esp+148h+var_128]
dec	eax
mov	[ebp+8], eax
cmp	eax, ebx
jnz	short loc_68AAB3
mov	ecx, ebp
call	sub_650DF0

loc_68AAB3:
mov	ebp, [esp+148h+arg_0]

loc_68AABA:
mov	ecx, [esp+148h+var_DC]
mov	eax, [edi+0BCh]
or	dword ptr [eax+2474h], 400h
mov	edx, [ebp+4Ch]
push	ecx
push	ecx
mov	ecx, [esp+150h+var_E0]
mov	eax, esp
mov	[eax], edx
mov	eax, [ecx]
mov	edx, [eax+24h]
push	edi
call	edx
mov	edi, eax
mov	al, [edi+76h]
shr	al, 7
and	al, 1
movzx	esi, al
neg	esi
sbb	esi, esi
and	esi, edi
mov	[esp+148h+var_104], edi
jz	short loc_68AB11
lea	ecx, [esi+78h]
call	sub_661C50
mov	[esp+148h+var_124], eax
jmp	short loc_68AB15

loc_68AB0A:
mov	[esp+148h+var_133], 1
jmp	short loc_68AABA

loc_68AB11:
mov	[esp+148h+var_124], ebx

loc_68AB15:
mov	ebp, [edi+20h]
mov	ecx, 0FFFEh
and	[edi+76h], cx
mov	[esp+148h+var_134], bl
cmp	ebp, ebx
jz	short loc_68AB55
lea	esp, [esp+0]

loc_68AB30:
mov	edx, [ebp+0]
mov	eax, [edx+4Ch]
mov	ecx, ebp
call	eax
test	eax, eax
jnz	short loc_68AB47
mov	ebp, [ebp+20h]
cmp	ebp, ebx
jnz	short loc_68AB30
jmp	short loc_68AB55

loc_68AB47:
mov	edx, [edi]
mov	eax, [edx+50h]
or	word ptr [edi+76h], 1
mov	ecx, edi
call	eax

loc_68AB55:
cmp	esi, ebx
jz	short loc_68ABAD
mov	ecx, [esp+148h+arg_4]
mov	edx, [ecx]
cmp	[edx+10h], ebx
jz	short loc_68AB76
mov	eax, [edi]
mov	edx, [eax+2Ch]
push	ecx
mov	ecx, edi
call	edx
mov	[esp+148h+var_134], 1

loc_68AB76:
mov	eax, [esp+148h+arg_1C]
cmp	eax, ebx
jz	short loc_68AB8E
mov	edx, [esi]
push	eax
mov	eax, [edx+0F8h]
mov	ecx, esi
call	eax

loc_68AB8E:
test	byte ptr [esp+148h+arg_14], 4
jnz	short loc_68ABA4
mov	edx, [esi]
mov	eax, [edx+20h]
push	ebx
mov	ecx, esi
call	eax
jmp	short loc_68ABAD

loc_68ABA4:
mov	ecx, 200h
or	[esi+76h], cx

loc_68ABAD:
test	byte ptr [esp+148h+arg_14], 4
jz	short loc_68ABC0
mov	edx, 200h
or	[edi+76h], dx

loc_68ABC0:
mov	eax, [esp+148h+arg_10]
cmp	eax, 0FFFFFFFFh
jnz	short loc_68ABD6
mov	eax, [esp+148h+var_12C]
mov	eax, [eax+0D8h]

loc_68ABD6:
mov	ecx, [esp+148h+var_12C]
mov	[edi+18h], eax
mov	edx, [ecx]
mov	eax, [edx+54h]
mov	byte ptr [esp+148h+var_138+2], 1
call	eax
mov	[esp+148h+var_130], eax
cmp	esi, ebx
jz	loc_68AD10
cmp	[esp+148h+arg_8], ebx
jz	loc_68AD10
mov	edi, [esp+148h+arg_8]
mov	eax, [edi+4]
xor	ebp, ebp
mov	[esp+148h+var_128], eax
cmp	eax, ebx
jbe	loc_68AD10
lea	ebx, [ebx+0]

loc_68AC20:
mov	ecx, [edi]
mov	ecx, [ecx+ebp*4]
push	esi
call	sub_698700
cmp	[esp+148h+var_124], ebx
jz	short loc_68AC4F
mov	edx, [edi]
mov	eax, [edx+ebp*4]
test	dword ptr [eax], offset	nullsub_20
jz	short loc_68AC4F
mov	ecx, [esp+148h+var_124]
call	sub_689840
cmp	eax, ebx
jz	short loc_68AC4F
mov	byte ptr [eax+3Ah], 1

loc_68AC4F:
cmp	byte ptr [esp+148h+var_138+3], bl
jz	loc_68AD05
mov	eax, [edi]
mov	eax, [eax+ebp*4]
cmp	dword ptr [eax], 200h
jnz	loc_68AD05
mov	eax, [eax+10h]
cmp	eax, ebx
jz	loc_68AD05
cmp	dword ptr [eax+0Ch], 1
jb	loc_68AD05
mov	ecx, [eax+8]
cmp	[ecx], bl
jz	short loc_68AD05
mov	ecx, [esp+148h+var_130]
push	1
add	ecx, 2408h
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_68ACFE
push	200h
lea	ecx, [esp+14Ch+var_AC]
call	sub_6548F0
mov	dword ptr [edi+4], 2
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68ACC4
call	sub_64A400

loc_68ACC4:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68ACD3
call	sub_64A400

loc_68ACD3:
mov	edx, [esp+148h+var_AC]
mov	eax, [esp+148h+var_A8]
mov	ecx, [esp+148h+var_A4]
mov	[edi+0Ch], ebx
mov	[edi+10h], edx
mov	edx, [esp+148h+var_A0]
mov	[edi+14h], eax
mov	[edi+18h], ecx
mov	[edi+1Ch], edx

loc_68ACFE:
mov	edi, [esp+148h+arg_8]

loc_68AD05:
inc	ebp
cmp	ebp, [esp+148h+var_128]
jb	loc_68AC20

loc_68AD10:
mov	[esp+148h+var_128], ebx
cmp	esi, ebx
jz	loc_68B268
mov	ecx, [esp+148h+var_12C]
mov	eax, [ecx]
mov	edx, [eax+0D0h]
call	edx
push	ecx
mov	ecx, [esp+14Ch+var_E0]
mov	edx, [ecx+0Ch]
mov	ecx, [esp+14Ch+var_104]
mov	ebp, eax
mov	eax, esp
mov	byte ptr [esp+14Ch+var_108], bl
mov	[esp+14Ch+var_110], ebx
mov	[esp+14Ch+var_10C], ebx
mov	[eax], edx
mov	eax, [ecx]
mov	edx, [eax+5Ch]
call	edx
mov	ecx, eax
call	sub_6AECD0
mov	ecx, [esp+148h+var_130]
mov	edi, eax
lea	eax, [esp+148h+var_CC]
add	ecx, 2408h
push	eax
call	sub_68D8D0
mov	[esp+148h+var_128], eax
mov	[esp+148h+var_131], bl
cmp	edi, ebx
jz	loc_68B0CE
mov	ecx, [esp+148h+var_12C]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
mov	ecx, [eax+78h]
mov	eax, [edi]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	ecx, [esp+148h+var_12C]
mov	[esp+148h+var_114], eax
inc	dword ptr [eax+8]
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
lea	ecx, [esp+148h+var_110]
push	ecx
lea	edx, [esp+14Ch+var_114]
push	edx
add	eax, 78h
push	eax
mov	ecx, ebp
call	sub_66F4F0
test	al, al
jz	loc_68AFF9
mov	ebp, [esp+148h+var_130]
add	ebp, 2408h
push	1
mov	ecx, ebp
mov	[esp+14Ch+var_120], ebx
mov	[esp+14Ch+var_11C], ebx
mov	[esp+14Ch+var_118], ebx
call	sub_696220
mov	edi, eax
lea	eax, [esp+148h+var_110]
push	eax
lea	ecx, [esp+14Ch+var_6C]
call	sub_651E70
push	1
lea	ecx, [esp+14Ch+var_120]
push	ecx
call	sub_683310
mov	edx, [esp+148h+var_11C]
mov	eax, [esp+148h+var_120]
shl	edx, 4
lea	ecx, [edx+eax-10h]
cmp	ecx, ebx
jz	short loc_68AE39
lea	edx, [esp+148h+var_6C]
push	edx
call	sub_652330

loc_68AE39:
lea	ecx, [esp+148h+var_6C]
call	sub_652830
cmp	edi, ebx
jz	short loc_68AE85
mov	dword ptr [edi+4], 4
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68AE5F
call	sub_64A400

loc_68AE5F:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68AE6E
call	sub_64A400

loc_68AE6E:
lea	eax, [esp+148h+var_120]
mov	[edi+0Ch], ebx
push	eax
lea	ecx, [edi+30h]
mov	dword ptr [edi+2Ch], offset sub_686140
call	sub_684BD0

loc_68AE85:
push	3
mov	ecx, ebp
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_68AEFC
xor	ecx, ecx
mov	word ptr [esp+148h+var_E8], cx
mov	dword ptr [edi+4], 2
mov	[esp+148h+var_F0], 40000h
mov	[esp+148h+var_EC], ebx
mov	byte ptr [esp+148h+var_E8+2], bl
mov	byte ptr [esp+148h+var_E4], bl
mov	byte ptr [esp+148h+var_E4+1], bl
mov	byte ptr [esp+148h+var_E8+3], 0FFh
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68AECE
call	sub_64A400

loc_68AECE:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68AEDD
call	sub_64A400

loc_68AEDD:
mov	edx, [esp+148h+var_F0]
mov	eax, [esp+148h+var_EC]
mov	ecx, [esp+148h+var_E8]
mov	[edi+0Ch], ebx
mov	[edi+10h], edx
mov	edx, [esp+148h+var_E4]
mov	[edi+14h], eax
mov	[edi+18h], ecx
mov	[edi+1Ch], edx

loc_68AEFC:
mov	ecx, [esp+148h+var_12C]
mov	byte ptr [esp+148h+var_138+2], bl
call	sub_654DD0
cmp	eax, 6
jb	loc_68AFA7
mov	edi, [esp+148h+arg_C]
cmp	edi, ebx
jz	loc_68AFA7
push	ebx
lea	ecx, [esp+14Ch+var_120]
call	sub_684AB0
push	edi
lea	ecx, [esp+14Ch+var_7C]
mov	[esp+14Ch+var_7C], bl
call	sub_652EF0
lea	eax, [esp+148h+var_7C]
push	eax
lea	ecx, [esp+14Ch+var_120]
call	sub_684AF0
push	3
mov	ecx, ebp
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_68AF9B
mov	dword ptr [edi+4], 4
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68AF75
call	sub_64A400

loc_68AF75:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68AF84
call	sub_64A400

loc_68AF84:
lea	ecx, [esp+148h+var_120]
push	ecx
mov	[edi+0Ch], ebx
lea	ecx, [edi+30h]
mov	dword ptr [edi+2Ch], offset sub_680D40
call	sub_684BD0

loc_68AF9B:
lea	ecx, [esp+148h+var_7C]
call	sub_652830

loc_68AFA7:
push	3
mov	ecx, ebp
mov	[esp+14Ch+var_131], 1
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_68AFF0
mov	dword ptr [edi+4], 3
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68AFD1
call	sub_64A400

loc_68AFD1:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68AFE0
call	sub_64A400

loc_68AFE0:
lea	edx, [esp+148h+var_110]
push	edx
lea	ecx, [edi+20h]
mov	[edi+0Ch], ebx
call	sub_67C4C0

loc_68AFF0:
lea	ecx, [esp+148h+var_120]
jmp	loc_68B0B4

loc_68AFF9:
cmp	byte ptr [esp+148h+var_138+3], bl
jz	loc_68B0B9
mov	eax, [esp+148h+var_114]
mov	[esp+148h+var_98], eax
mov	[esp+148h+var_9C], 5
mov	ebp, 1
add	[eax+8], ebp
lea	eax, [esp+148h+var_9C]
push	eax
lea	ecx, [esp+14Ch+var_C8]
mov	dword ptr [esp+14Ch+var_C8], ebx
mov	[esp+14Ch+var_C4], ebx
mov	[esp+14Ch+var_C0], ebx
call	sub_684AF0
lea	ecx, [esp+148h+var_9C]
call	sub_652830
mov	ecx, [esp+148h+var_130]
push	3
add	ecx, 2408h
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_68B0A9
mov	dword ptr [edi+4], 4
add	[esi+4], ebp
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68B080
call	sub_64A400

loc_68B080:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68B08F
call	sub_64A400

loc_68B08F:
lea	ecx, [esp+148h+var_C8]
push	ecx
mov	[edi+0Ch], ebx
lea	ecx, [edi+30h]
mov	dword ptr [edi+2Ch], offset sub_688720
call	sub_684BD0

loc_68B0A9:
mov	byte ptr [esp+148h+var_138+2], bl
lea	ecx, [esp+148h+var_C8]

loc_68B0B4:
call	sub_6806F0

loc_68B0B9:
mov	eax, [esp+148h+var_114]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_68B0CE
call	sub_650DF0

loc_68B0CE:
cmp	byte ptr [esp+148h+var_138+3], bl
jz	loc_68B16A
cmp	byte ptr [esp+148h+var_138+2], bl
jz	loc_68B22E
mov	ecx, [esp+148h+var_130]
push	3
add	ecx, 2408h
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	loc_68B22E
xor	edx, edx
mov	dword ptr [edi+4], 2
mov	[esp+148h+var_100], 40000h
mov	[esp+148h+var_FC], ebx
mov	word ptr [esp+148h+var_F8], dx
mov	byte ptr [esp+148h+var_F8+2], bl
mov	byte ptr [esp+148h+var_F4], bl
mov	byte ptr [esp+148h+var_F4+1], bl
mov	byte ptr [esp+148h+var_F8+3], 0FFh
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68B137
call	sub_64A400

loc_68B137:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68B146
call	sub_64A400

loc_68B146:
mov	eax, [esp+148h+var_100]
mov	ecx, [esp+148h+var_FC]
mov	edx, [esp+148h+var_F8]
mov	[edi+0Ch], ebx
mov	[edi+10h], eax
mov	eax, [esp+148h+var_F4]
mov	[edi+14h], ecx
mov	[edi+18h], edx
mov	[edi+1Ch], eax
jmp	loc_68B22E

loc_68B16A:
cmp	[esp+148h+var_131], bl
jnz	loc_68B22E
mov	ecx, [esp+148h+var_12C]
call	sub_654DD0
cmp	eax, 6
jb	loc_68B22E
mov	eax, [esp+148h+arg_C]
cmp	eax, ebx
jz	loc_68B22E
push	eax
lea	ecx, [esp+14Ch+var_8C]
mov	[esp+14Ch+var_D8], ebx
mov	[esp+14Ch+var_D4], ebx
mov	[esp+14Ch+var_D0], ebx
mov	[esp+14Ch+var_8C], bl
call	sub_652EF0
lea	ecx, [esp+148h+var_8C]
push	ecx
lea	ecx, [esp+14Ch+var_D8]
call	sub_684AF0
mov	ecx, [esp+148h+var_130]
push	3
add	ecx, 2408h
call	sub_696220
mov	edi, eax
cmp	edi, ebx
jz	short loc_68B219
mov	dword ptr [edi+4], 4
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_68B1F3
call	sub_64A400

loc_68B1F3:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_68B202
call	sub_64A400

loc_68B202:
lea	edx, [esp+148h+var_D8]
mov	[edi+0Ch], ebx
push	edx
lea	ecx, [edi+30h]
mov	dword ptr [edi+2Ch], offset sub_680D40
call	sub_684BD0

loc_68B219:
lea	ecx, [esp+148h+var_8C]
call	sub_652830
lea	ecx, [esp+148h+var_D8]
call	sub_6806F0

loc_68B22E:
test	byte ptr [esp+148h+var_108], 2
mov	eax, [esp+148h+var_CC]
mov	ecx, [esp+148h+var_130]
mov	[ecx+2458h], eax
jnz	short loc_68B250
mov	ecx, [esp+148h+var_110]
cmp	ecx, ebx
jz	short loc_68B250
call	sub_64B3B0

loc_68B250:
test	byte ptr [esp+148h+var_108], 1
mov	[esp+148h+var_110], ebx
jnz	short loc_68B268
mov	ecx, [esp+148h+var_10C]
cmp	ecx, ebx
jz	short loc_68B268
call	sub_64B3B0

loc_68B268:
and	[esp+148h+arg_14], 0FFFFFFFEh
cmp	[esp+148h+var_133], bl
jz	short loc_68B27E
or	[esp+148h+arg_14], 1

loc_68B27E:
mov	edi, [esp+148h+var_130]
cmp	esi, ebx
jz	short loc_68B296
push	edi
mov	ecx, esi
call	sub_655A10
push	edi
mov	ecx, esi
call	sub_656230

loc_68B296:
mov	edx, [esp+148h+arg_14]
mov	ebp, [esp+148h+var_104]
mov	eax, [esp+148h+arg_0]
mov	ecx, [esp+148h+var_12C]
push	edx
push	ebp
push	eax
add	ecx, 0C4h
call	sub_65D270
cmp	[esp+148h+var_134], bl
jz	short loc_68B2C8
push	esi
mov	ecx, edi
call	sub_69C6D0

loc_68B2C8:
cmp	esi, ebx
jz	short loc_68B33D
cmp	byte ptr [esp+148h+var_138+3], bl
jnz	short loc_68B33D
mov	ecx, [esp+148h+var_128]
push	ecx
mov	ecx, [esp+14Ch+var_130]
call	sub_69AFD0
mov	edi, [esp+148h+var_124]
cmp	edi, ebx
jz	short loc_68B34C
lea	eax, [esp+148h+var_BC]
xor	edx, edx
push	eax
mov	ecx, edi
mov	[esp+14Ch+var_BC], 1
mov	[esp+14Ch+var_B8], ebx
mov	word ptr [esp+14Ch+var_B4], dx
mov	[esp+14Ch+var_B2], bl
mov	byte ptr [esp+14Ch+var_B0], bl
mov	byte ptr [esp+14Ch+var_B0+1], bl
mov	[esp+14Ch+var_B1], 0FFh
call	sub_67F560
test	al, al
jz	short loc_68B34C
or	byte ptr [edi+1E0h], 80h
jmp	short loc_68B34C

loc_68B33D:
mov	eax, [esp+148h+var_124]
cmp	eax, ebx
jz	short loc_68B34C
or	byte ptr [eax+1E0h], 80h

loc_68B34C:
cmp	esi, ebx
jz	short loc_68B377
cmp	[esp+148h+var_134], bl
jz	short loc_68B377
mov	ecx, [esp+148h+var_12C]
mov	eax, [esp+148h+arg_4]
mov	edx, [ecx+160h]
mov	eax, [eax]
cmp	eax, [edx+228h]
jnz	short loc_68B377
push	esi
call	sub_688CE0

loc_68B377:
mov	ecx, ebp
call	sub_64A400
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 138h
retn	20h
sub_68A810 endp

align 10h



sub_68B390 proc	near

var_8C=	dword ptr -8Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 6Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+7Ch+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	ecx, [edi+8]
xor	ebx, ebx
cmp	ecx, ebx
jnz	short loc_68B3BC
mov	eax, [edi+18h]
mov	esi, [eax+74h]
jmp	short loc_68B3DA

loc_68B3BC:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_68B69F
mov	esi, [edi+8]
cmp	esi, ebx
jz	loc_68B69F
add	esi, 0FFFFFF88h

loc_68B3DA:
cmp	esi, ebx
jz	loc_68B69F
cmp	dword ptr [edi+1Ch], 3
jl	loc_68B69F
mov	ebp, [edi+18h]
push	ebx
mov	ecx, edi
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	ebp
lea	ecx, [esp+88h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+7Ch+arg_0]
mov	[esp+7Ch+var_64], ebx
mov	[esp+7Ch+var_60], ebx
mov	eax, [edx]
push	eax
lea	ecx, [esp+80h+var_6C]
call	sub_67AE10
mov	edx, [esi]
lea	eax, [esp+7Ch+var_6C]
push	eax
mov	eax, [edx+5Ch]
lea	ecx, [esp+80h+var_64]
push	ecx
mov	ecx, esi
call	eax
mov	edx, [esi]
push	eax
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	ecx, eax
call	sub_68F5F0
mov	ebp, [esp+7Ch+var_6C]
test	al, al
setz	bl
and	ebp, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [ebp+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
add	eax, 0FFFFFFFFh
jnz	short loc_68B474
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax

loc_68B474:
test	bl, bl
jz	short loc_68B4AF
mov	eax, [esi+94h]
mov	ecx, [esp+7Ch+arg_0]
mov	edi, [ecx]
test	eax, eax
jnz	short loc_68B492
mov	ecx, esi
call	sub_658B70

loc_68B492:
mov	edx, [eax+0Ch]
mov	eax, [edx]
push	edi
push	eax
push	offset aErrorS_attachm ; "Error: %s.attachMovie() failed - export"...
add	esi, 0Ch
push	esi
call	sub_64AE70
add	esp, 10h
jmp	loc_68B679

loc_68B4AF:
mov	ecx, [esp+7Ch+var_64]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
test	eax, 8000h
jnz	short loc_68B4F8
mov	eax, [esi+94h]
mov	ecx, [esp+7Ch+arg_0]
mov	edi, [ecx]
test	eax, eax
jnz	short loc_68B4DB
mov	ecx, esi
call	sub_658B70

loc_68B4DB:
mov	edx, [eax+0Ch]
mov	eax, [edx]
push	edi
push	eax
push	offset aErrorS_attac_0 ; "Error: %s.attachMovie() failed - \"%s\" i"...
add	esi, 0Ch
push	esi
call	sub_64AE70
add	esp, 10h
jmp	loc_68B679

loc_68B4F8:
mov	ecx, [esp+7Ch+var_60]
fldz
mov	eax, [edi+18h]
mov	edx, [ecx+28h]
mov	ebp, [esp+7Ch+var_64]
push	0		; char
push	0		; char
push	0		; __int16
push	ecx		; float
fstp	[esp+8Ch+var_8C]
push	offset flt_167D000 ; int
push	1		; char
push	offset unk_167D764 ; int
push	1		; char
push	eax
push	2
mov	ecx, edi
mov	[esp+0A4h+var_5C], ebp
mov	[esp+0A4h+var_58], edx
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
add	eax, 4000h
push	eax		; int
push	ecx		; int
mov	ecx, [ebp+0Ch]
mov	eax, esp
mov	[eax], ecx
lea	ecx, [esp+0A4h+var_54]
call	sub_64B940
cmp	[esp+7Ch+var_C], 7EFFFFFDh
ja	loc_68B630
cmp	dword ptr [edi+1Ch], 4
jnz	short loc_68B581
mov	edx, [edi+18h]
push	edx
push	3
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	ebx, eax
jmp	short loc_68B583

loc_68B581:
xor	ebx, ebx

loc_68B583:
mov	ebp, [edi+18h]
push	1
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebp
lea	ecx, [esp+88h+var_68]
push	ecx
mov	ecx, eax
call	sub_652F60
push	0
lea	edx, [esp+80h+var_5C]
push	edx
push	1
push	0FFFFFFFFh
push	ebx
push	0
lea	eax, [esp+94h+var_68]
push	eax
lea	ecx, [esp+98h+var_54]
push	ecx
mov	ecx, esi
call	sub_68A810
mov	ebp, eax
test	ebp, ebp
jz	short loc_68B5C8
inc	dword ptr [ebp+4]

loc_68B5C8:
mov	eax, [esp+7Ch+var_68]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68B5DE
call	sub_650DF0

loc_68B5DE:
test	ebp, ebp
jz	short loc_68B61C
mov	edx, [ebp+0]
mov	eax, [edx+20h]
push	0
mov	ecx, ebp
call	eax
mov	ecx, esi
call	sub_654DD0
cmp	eax, 6
jb	short loc_68B615
mov	cl, [ebp+76h]
shr	cl, 7
and	cl, 1
movzx	edx, cl
mov	ecx, [edi+4]
neg	edx
sbb	edx, edx
and	edx, ebp
push	edx
call	sub_6528F0

loc_68B615:
mov	ecx, ebp
call	sub_64A400

loc_68B61C:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+7Ch+var_54]
mov	eax, [eax+30h]
push	edx
call	eax
jmp	short loc_68B679

loc_68B630:
mov	eax, [esi+94h]
mov	ecx, [esp+7Ch+arg_0]
mov	edi, [ecx]
test	eax, eax
jnz	short loc_68B64A
mov	ecx, esi
call	sub_658B70

loc_68B64A:
mov	edx, [esp+7Ch+var_C]
mov	eax, [eax+0Ch]
mov	ecx, [eax]
push	edx
push	edi
push	ecx
push	offset aErrorS_attac_1 ; "Error: %s.attachMovie(\"%s\")	failed - de"...
add	esi, 0Ch
push	esi
call	sub_64AE70
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+90h+var_54]
mov	edx, [edx+30h]
add	esp, 14h
push	eax
call	edx

loc_68B679:
mov	ecx, [esp+7Ch+var_64]
test	ecx, ecx
jz	short loc_68B686
call	sub_666B00

loc_68B686:
mov	eax, [esp+7Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68B69F
call	sub_650DF0

loc_68B69F:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 6Ch
retn
sub_68B390 endp

align 10h



sub_68B6B0 proc	near

var_10C= dword ptr -10Ch
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_C8=	dword ptr -0C8h
var_80=	dword ptr -80h
var_74=	dword ptr -74h
var_20=	byte ptr -20h
arg_0= dword ptr  4

sub	esp, 0ECh
push	ebx
push	ebp
mov	ebp, [esp+0F4h+arg_0]
push	esi
mov	esi, [ebp+4]
push	edi
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	ecx, [ebp+8]
test	ecx, ecx
jnz	short loc_68B6DD
mov	eax, [ebp+18h]
mov	esi, [eax+74h]
jmp	short loc_68B6FB

loc_68B6DD:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_68BA22
mov	esi, [ebp+8]
test	esi, esi
jz	loc_68BA22
add	esi, 0FFFFFF88h

loc_68B6FB:
test	esi, esi
jz	loc_68BA22
cmp	dword ptr [ebp+1Ch], 2
jl	loc_68BA22
mov	ecx, esi
call	sub_654DD0
cmp	eax, 8
jb	loc_68BA22
mov	ecx, [ebp+18h]
push	ecx
push	0
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
mov	[esp+0FCh+var_E4], ebx
test	ebx, ebx
jz	loc_68B9EF
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx
mov	eax, [ebx+10h]
mov	edx, [eax+8]
lea	ecx, [ebx+10h]
call	edx
cmp	eax, 1Ah
jnz	loc_68B9EF
mov	edi, [ebx+34h]
test	edi, edi
jnz	short loc_68B7B3
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_68B788
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_68B788
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]

loc_68B788:
add	eax, 8
mov	eax, [eax]
mov	ecx, [eax]
push	ecx
push	offset aErrorS_attachb ; "Error: %s.attachBitmap() failed - no im"...
add	esi, 0Ch
push	esi
call	sub_64AE70
add	esp, 0Ch
mov	ecx, ebx
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0ECh
retn

loc_68B7B3:
fldz
mov	edx, [ebp+18h]
push	0		; char
push	0		; char
push	0		; __int16
push	ecx		; float
fstp	[esp+10Ch+var_10C]
push	offset flt_167D000 ; int
push	1		; char
push	offset unk_167D764 ; int
push	1		; char
push	edx
push	1
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
add	eax, 4000h
push	eax		; int
push	ecx		; int
mov	eax, esp
lea	ecx, [esp+124h+var_C8]
mov	dword ptr [eax], 1
call	sub_64B940
cmp	[esp+0FCh+var_80], 7EFFFFFDh
ja	loc_68B99E
cmp	dword ptr [ebp+1Ch], 4
jl	short loc_68B82C
mov	eax, [ebp+18h]
push	eax
push	3
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+0FCh+var_EC], al
jmp	short loc_68B831

loc_68B82C:
mov	byte ptr [esp+0FCh+var_EC], 0

loc_68B831:
mov	ecx, [ebp+18h]
call	sub_668010
mov	ecx, [esp+0FCh+var_EC]
push	0
push	offset byte_146D660
push	ecx
mov	ebx, eax
push	edi
mov	ecx, ebx
call	sub_68E5B0
mov	edi, eax
mov	[esp+0FCh+var_E8], edi
test	edi, edi
jz	loc_68B978
mov	ecx, [ebx+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	1E8h
call	eax
test	eax, eax
jz	loc_68B971
push	1
push	ecx
mov	edx, esp
push	esi
mov	dword ptr [edx], 10001h
mov	edx, [edi+1Ch]
mov	edx, [edx+0Ch]
push	ebx
push	edi
push	edx
mov	ecx, eax
call	sub_68A1F0
mov	edi, eax
test	edi, edi
jz	loc_68B96D
lea	ecx, [esp+0FCh+var_E0]
call	sub_64E8E0
fldz
push	0		; char
push	0		; char
push	0		; __int16
push	ecx		; float
fstp	[esp+10Ch+var_10C]
lea	ecx, [esp+10Ch+var_E0]
push	ecx		; int
push	1		; char
lea	ecx, [esp+114h+var_20]
call	sub_68CFB0
push	eax		; int
push	0		; char
push	1		; int
push	ecx		; int
mov	eax, esp
lea	ecx, [esp+124h+var_74]
mov	dword ptr [eax], 1
call	sub_64B940
mov	edx, [ebp+18h]
mov	eax, [edx+78h]
mov	eax, [eax+8]
mov	[esp+0FCh+var_EC], eax
inc	dword ptr [eax+8]
push	ebx
mov	ecx, edi
call	sub_655A10
push	ebx
mov	ecx, edi
call	sub_656230
push	0
push	0
push	0
push	1
push	0
push	0
lea	ecx, [esp+114h+var_EC]
push	ecx
lea	edx, [esp+118h+var_74]
push	edx
mov	ecx, edi
call	sub_68A810
lea	eax, [esp+0FCh+var_EC]
push	eax
push	edi
lea	ecx, [esp+104h+var_C8]
push	ecx
mov	ecx, esi
call	sub_67F330
mov	edx, [esi]
mov	eax, [edx+20h]
push	0
mov	ecx, esi
call	eax
mov	eax, [esp+0FCh+var_EC]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68B951
call	sub_650DF0

loc_68B951:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+0FCh+var_74]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, edi
call	sub_64A400

loc_68B96D:
mov	edi, [esp+0FCh+var_E8]

loc_68B971:
mov	ecx, edi
call	sub_666B00

loc_68B978:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+0FCh+var_C8]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+0FCh+var_E4]
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0ECh
retn

loc_68B99E:
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_68B9AF
mov	ecx, esi
call	sub_658B70

loc_68B9AF:
mov	ecx, [esp+0FCh+var_80]
mov	edx, [eax+0Ch]
mov	eax, [edx]
push	ecx
push	eax
push	offset aErrorS_attac_2 ; "Error: %s.attachBitmap() failed - depth"...
add	esi, 0Ch
push	esi
call	sub_64AE70
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+10Ch+var_C8]
mov	edx, [edx+30h]
add	esp, 10h
push	eax
call	edx
mov	ecx, ebx
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0ECh
retn

loc_68B9EF:
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_68BA00
mov	ecx, esi
call	sub_658B70

loc_68BA00:
mov	eax, [eax+0Ch]
mov	ecx, [eax]
push	ecx
push	offset aErrorS_attac_3 ; "Error: %s.attachBitmap() failed - the	a"...
add	esi, 0Ch
push	esi
call	sub_64AE70
add	esp, 0Ch
test	ebx, ebx
jz	short loc_68BA22
mov	ecx, ebx
call	sub_64B3B0

loc_68BA22:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0ECh
retn
sub_68B6B0 endp

align 10h



sub_68BA30 proc	near

var_70=	dword ptr -70h
var_54=	dword ptr -54h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 54h
push	ebx
push	esi
push	edi
mov	edi, [esp+60h+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	ecx, [edi+8]
test	ecx, ecx
jnz	short loc_68BA56
mov	eax, [edi+18h]
mov	ebx, [eax+74h]
jmp	short loc_68BA74

loc_68BA56:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_68BB94
mov	ebx, [edi+8]
test	ebx, ebx
jz	loc_68BB94
add	ebx, 0FFFFFF88h

loc_68BA74:
test	ebx, ebx
jz	loc_68BB94
cmp	dword ptr [edi+1Ch], 2
jl	loc_68BB94
fldz
push	0		; char
push	0		; char
push	0		; __int16
push	ecx		; float
mov	ecx, [edi+18h]
fstp	[esp+70h+var_70]
push	offset flt_167D000 ; int
push	1		; char
push	offset unk_167D764 ; int
push	1		; char
push	ecx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
add	eax, 4000h
push	eax		; int
push	ecx		; int
mov	eax, esp
lea	ecx, [esp+88h+var_54]
mov	dword ptr [eax], 10001h
call	sub_64B940
cmp	[esp+60h+var_C], 7EFFFFFDh
ja	loc_68BB82
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+6Ch+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
push	0
push	0
push	1
push	0FFFFFFFFh
push	0
push	0
lea	eax, [esp+78h+arg_0]
push	eax
lea	ecx, [esp+7Ch+var_54]
push	ecx
mov	ecx, ebx
call	sub_68A810
mov	esi, eax
test	esi, esi
jz	short loc_68BB22
inc	dword ptr [esi+4]

loc_68BB22:
mov	eax, [esp+60h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68BB38
call	sub_650DF0

loc_68BB38:
test	esi, esi
jz	short loc_68BB69
mov	edx, [esi]
mov	eax, [edx+20h]
push	0
mov	ecx, esi
call	eax
mov	cl, [esi+76h]
shr	cl, 7
and	cl, 1
movzx	edx, cl
mov	ecx, [edi+4]
neg	edx
sbb	edx, edx
and	edx, esi
push	edx
call	sub_6528F0
mov	ecx, esi
call	sub_64A400

loc_68BB69:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+60h+var_54]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi
pop	esi
pop	ebx
add	esp, 54h
retn

loc_68BB82:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+60h+var_54]
mov	edx, [edx+30h]
push	eax
call	edx

loc_68BB94:
pop	edi
pop	esi
pop	ebx
add	esp, 54h
retn
sub_68BA30 endp

align 10h



sub_68BBA0 proc	near

var_74=	dword ptr -74h
var_54=	dword ptr -54h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 54h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+64h+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	ecx, [edi+8]
test	ecx, ecx
jnz	short loc_68BBC7
mov	eax, [edi+18h]
mov	ebx, [eax+74h]
jmp	short loc_68BBE5

loc_68BBC7:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	eax, 2
jnz	loc_68BD81
mov	eax, [edi+8]
test	eax, eax
jz	loc_68BD81
lea	ebx, [eax-78h]

loc_68BBE5:
test	ebx, ebx
jz	loc_68BD81
cmp	dword ptr [edi+1Ch], 6
jl	loc_68BD81
fldz
push	0		; char
push	0		; char
push	0		; __int16
push	ecx		; float
mov	ecx, [edi+18h]
fstp	[esp+74h+var_74]
push	offset flt_167D000 ; int
push	1		; char
push	offset unk_167D764 ; int
push	1		; char
push	ecx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
add	eax, 4000h
push	eax		; int
push	ecx		; int
mov	eax, esp
lea	ecx, [esp+8Ch+var_54]
mov	dword ptr [eax], 10002h
call	sub_64B940
cmp	[esp+64h+var_C], 7EFFFFFDh
ja	loc_68BD6F
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+70h+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
push	0
push	0
push	1
push	0FFFFFFFFh
push	0
push	0
lea	eax, [esp+7Ch+arg_0]
push	eax
lea	ecx, [esp+80h+var_54]
push	ecx
mov	ecx, ebx
call	sub_68A810
mov	ebx, eax
test	ebx, ebx
jz	short loc_68BC96
inc	dword ptr [ebx+4]

loc_68BC96:
mov	eax, [esp+64h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68BCAC
call	sub_650DF0

loc_68BCAC:
test	ebx, ebx
jz	loc_68BD55
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
mov	cl, [ebx+76h]
shr	cl, 7
and	cl, 1
movzx	esi, cl
neg	esi
sbb	esi, esi
and	esi, ebx
mov	ebp, [esi]
push	0
push	2
mov	ecx, edi
add	ebp, 11Ch
call	sub_651EC0
mov	edx, [ebp+0]
push	eax
push	0
mov	ecx, esi
call	edx
mov	ebp, [esi]
push	0
push	3
mov	ecx, edi
add	ebp, 11Ch
call	sub_651EC0
push	eax
mov	eax, [ebp+0]
push	1
mov	ecx, esi
call	eax
mov	ebp, [esi]
push	0
push	4
mov	ecx, edi
add	ebp, 11Ch
call	sub_651EC0
mov	edx, [ebp+0]
push	eax
push	8
mov	ecx, esi
call	edx
mov	ebp, [esi]
push	0
push	5
mov	ecx, edi
add	ebp, 11Ch
call	sub_651EC0
push	eax
mov	eax, [ebp+0]
push	9
mov	ecx, esi
call	eax
mov	ecx, [edi+4]
push	esi
call	sub_6528F0
mov	ecx, ebx
call	sub_64A400

loc_68BD55:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+64h+var_54]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn

loc_68BD6F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+64h+var_54]
mov	eax, [eax+30h]
push	edx
call	eax

loc_68BD81:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 54h
retn
sub_68BBA0 endp

align 10h



sub_68BD90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ebx, ecx
push	edi
mov	ecx, esi
call	edx
mov	edi, eax
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1E8h
call	edx
test	eax, eax
jz	short loc_68BDD9
mov	edx, [esp+0Ch+arg_4]
push	0
push	ecx
mov	ecx, esp
push	esi
mov	[ecx], edx
mov	ecx, [esp+18h+arg_8]
push	edi
push	ecx
push	ebx
mov	ecx, eax
call	sub_68A1F0
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_68BDD9:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	0Ch
sub_68BD90 endp

align 10h



sub_68BDF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+14h+arg_0]
lea	ebx, [esi+14h]
push	edi
mov	ecx, ebx
call	sub_684810
test	eax, eax
jz	short loc_68BE35
mov	ecx, [esp+14h+arg_4]
mov	eax, [eax+4]
test	ecx, ecx
jz	short loc_68BE35
mov	edx, [esi+1Ch]
push	eax
mov	eax, [edi]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	edx
add	ecx, 0Ch
push	offset aAddframenameDS ; "AddFrameName(%d, '%s') -- frame name al"...
push	ecx
call	sub_67E7F0
add	esp, 14h

loc_68BE35:
mov	ecx, edi
call	sub_679930
test	eax, eax
jbe	short loc_68BE8B
mov	eax, [edi]
and	eax, 0FFFFFFFCh
cmp	byte ptr [eax+8], 5Fh
jnz	short loc_68BE8B
push	offset a_up	; "_up"
mov	ecx, edi
call	sub_654870
test	al, al
jz	short loc_68BE61
or	byte ptr [esi+34h], 1
jmp	short loc_68BE8B

loc_68BE61:		; "_down"
push	offset a_down
mov	ecx, edi
call	sub_654870
test	al, al
jz	short loc_68BE77
or	byte ptr [esi+34h], 2
jmp	short loc_68BE8B

loc_68BE77:		; "_over"
push	offset a_over
mov	ecx, edi
call	sub_654870
test	al, al
jz	short loc_68BE8B
or	byte ptr [esi+34h], 4

loc_68BE8B:
mov	ecx, [esi+1Ch]
lea	eax, [esp+14h+var_8]
push	eax
mov	[esp+18h+arg_0], ecx
lea	edx, [esp+18h+arg_0]
push	ebx
mov	ecx, ebx
mov	[esp+1Ch+var_8], edi
mov	[esp+1Ch+var_4], edx
call	sub_689B80
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	8
sub_68BDF0 endp

align 10h



sub_68BEC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_68A650
test	[esp+4+arg_0], 1
jz	short loc_68BEDD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_68BEDD:
mov	eax, esi
pop	esi
retn	4
sub_68BEC0 endp

align 10h



sub_68BEF0 proc	near

var_37C= dword ptr -37Ch
var_378= dword ptr -378h
var_374= dword ptr -374h
var_370= dword ptr -370h
var_36C= dword ptr -36Ch
var_368= byte ptr -368h
var_348= dword ptr -348h
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= word ptr -324h
var_322= word ptr -322h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
var_314= dword ptr -314h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= dword ptr -304h
var_300= byte ptr -300h
var_2F8= byte ptr -2F8h
var_2F4= byte ptr -2F4h
var_2D4= dword ptr -2D4h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2B4= dword ptr -2B4h
var_2B0= word ptr -2B0h
var_2AE= byte ptr -2AEh
var_2A0= byte ptr -2A0h
var_240= byte ptr -240h
var_1E0= byte ptr -1E0h
var_180= byte ptr -180h
var_120= byte ptr -120h
var_C0=	byte ptr -0C0h
var_60=	byte ptr -60h
arg_0= dword ptr  4

sub	esp, 37Ch
mov	eax, [esp+37Ch+arg_0]
push	ebx
push	ebp
mov	[esp+384h+var_378], ecx
lea	ecx, [eax+24h]
xor	ebx, ebx
push	esi
push	edi
mov	[esp+38Ch+var_37C], ebx
mov	[esp+38Ch+var_304], ecx
cmp	[ecx+4], ecx
jz	loc_68CC82
mov	ebp, [eax+28h]

loc_68BF21:
movzx	eax, byte ptr [ebp+34h]
cmp	eax, 3		; switch 4 cases
ja	loc_68CC6F	; default
jmp	ds:off_68CC90[eax*4] ; switch jump

loc_68BF35:		; jumptable 0068BF2E case 0
lea	ecx, [esp+38Ch+var_368]
mov	[esp+38Ch+var_374], ebx
mov	[esp+38Ch+var_370], ebx
mov	[esp+38Ch+var_36C], ebx
call	sub_68CFB0
lea	ecx, [esp+38Ch+var_348]
call	sub_64E8E0
fldz
mov	ecx, [ebp+10h]
fstp	[esp+38Ch+var_330]
xor	eax, eax
mov	[esp+38Ch+var_324], ax
mov	[esp+38Ch+var_328], 40000h
mov	byte ptr [esp+38Ch+var_322+1], bl
mov	[esp+38Ch+var_32C], ebx
mov	byte ptr [esp+38Ch+var_322], bl
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_374]
push	eax
call	edx
mov	edi, 7
lea	esi, [esp+38Ch+var_2F8]
nop

loc_68BF90:
mov	[esi-8], ebx
mov	[esi-4], ebx
lea	ecx, [esi+4]
mov	[esi], ebx
call	sub_68CFB0
lea	ecx, [esi+24h]
call	sub_64E8E0
fldz
mov	dword ptr [esi+44h], 40000h
mov	[esi+4Bh], bl
fstp	dword ptr [esi+3Ch]
xor	eax, eax
mov	[esi+40h], ebx
mov	[esi+48h], ax
mov	[esi+4Ah], bl
add	esi, 60h
sub	edi, 1
jns	short loc_68BF90
mov	ecx, [ebp+24h]
cmp	ecx, [ebp+10h]
jz	short loc_68BFF2
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_300]
push	eax
call	edx
mov	eax, [esp+38Ch+var_2B8]
or	byte ptr [esp+38Ch+var_322+1], 1
mov	[esp+38Ch+var_32C], eax

loc_68BFF2:
mov	eax, [ebp+30h]
cmp	eax, [ebp+10h]
jz	short loc_68C030
cmp	[ebp+24h], eax
jnz	short loc_68C003
xor	eax, eax
jmp	short loc_68C01A

loc_68C003:
mov	ecx, [ebp+30h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_2A0]
push	eax
call	edx
mov	eax, 1

loc_68C01A:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	ecx, [esp+eax+38Ch+var_2B4]
or	byte ptr [esp+38Ch+var_322+1], 2
mov	[esp+38Ch+var_328], ecx

loc_68C030:
mov	eax, [ebp+14h]
cmp	eax, [ebp+10h]
jz	short loc_68C0A4
cmp	[ebp+24h], eax
jnz	short loc_68C041
xor	eax, eax
jmp	short loc_68C064

loc_68C041:
cmp	[ebp+30h], eax
jnz	short loc_68C04D
mov	eax, 1
jmp	short loc_68C064

loc_68C04D:
mov	ecx, [ebp+14h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_240]
push	eax
call	edx
mov	eax, 2

loc_68C064:
lea	eax, [eax+eax*2]
shl	eax, 5
fld	[esp+eax+38Ch+var_2D4]
or	byte ptr [esp+38Ch+var_322+1], 4
fstp	[esp+38Ch+var_348]
lea	eax, [esp+eax+38Ch+var_2D4]
fld	dword ptr [eax+4]
fstp	[esp+38Ch+var_344]
fld	dword ptr [eax+8]
fstp	[esp+38Ch+var_340]
fld	dword ptr [eax+0Ch]
fstp	[esp+38Ch+var_33C]
fld	dword ptr [eax+10h]
fstp	[esp+38Ch+var_338]
fld	dword ptr [eax+14h]
fstp	[esp+38Ch+var_334]

loc_68C0A4:
mov	eax, [ebp+18h]
cmp	eax, [ebp+10h]
jz	short loc_68C101
cmp	[ebp+24h], eax
jnz	short loc_68C0B5
xor	eax, eax
jmp	short loc_68C0E4

loc_68C0B5:
cmp	[ebp+30h], eax
jnz	short loc_68C0C1
mov	eax, 1
jmp	short loc_68C0E4

loc_68C0C1:
cmp	[ebp+14h], eax
jnz	short loc_68C0CD
mov	eax, 2
jmp	short loc_68C0E4

loc_68C0CD:
mov	ecx, [ebp+18h]
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+38Ch+var_1E0]
push	edx
call	eax
mov	eax, 3

loc_68C0E4:
lea	esi, [eax+eax*2]
shl	esi, 5
lea	esi, [esp+esi+38Ch+var_2F4]
mov	ecx, 8
lea	edi, [esp+38Ch+var_368]
rep movsd
or	byte ptr [esp+38Ch+var_322+1], 8

loc_68C101:
mov	eax, [ebp+20h]
cmp	eax, [ebp+10h]
jz	short loc_68C163
cmp	[ebp+24h], eax
jnz	short loc_68C112
xor	eax, eax
jmp	short loc_68C14D

loc_68C112:
cmp	[ebp+30h], eax
jnz	short loc_68C11E
mov	eax, 1
jmp	short loc_68C14D

loc_68C11E:
cmp	[ebp+14h], eax
jnz	short loc_68C12A
mov	eax, 2
jmp	short loc_68C14D

loc_68C12A:
cmp	[ebp+18h], eax
jnz	short loc_68C136
mov	eax, 3
jmp	short loc_68C14D

loc_68C136:
mov	ecx, [ebp+20h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_180]
push	eax
call	edx
mov	eax, 4

loc_68C14D:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	cl, [esp+eax+38Ch+var_2AE]
or	byte ptr [esp+38Ch+var_322+1], 80h
mov	byte ptr [esp+38Ch+var_322], cl

loc_68C163:
mov	eax, [ebp+28h]
cmp	eax, [ebp+10h]
jz	short loc_68C1D3
cmp	[ebp+24h], eax
jnz	short loc_68C174
xor	eax, eax
jmp	short loc_68C1BB

loc_68C174:
cmp	[ebp+30h], eax
jnz	short loc_68C180
mov	eax, 1
jmp	short loc_68C1BB

loc_68C180:
cmp	[ebp+14h], eax
jnz	short loc_68C18C
mov	eax, 2
jmp	short loc_68C1BB

loc_68C18C:
cmp	[ebp+18h], eax
jnz	short loc_68C198
mov	eax, 3
jmp	short loc_68C1BB

loc_68C198:
cmp	[ebp+20h], eax
jnz	short loc_68C1A4
mov	eax, 4
jmp	short loc_68C1BB

loc_68C1A4:
mov	ecx, [ebp+28h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_120]
push	eax
call	edx
mov	eax, 5

loc_68C1BB:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	cx, [esp+eax+38Ch+var_2B0]
or	byte ptr [esp+38Ch+var_322+1], 40h
mov	[esp+38Ch+var_324], cx

loc_68C1D3:
mov	eax, [ebp+2Ch]
cmp	eax, [ebp+10h]
jz	short loc_68C24D
cmp	[ebp+24h], eax
jnz	short loc_68C1E4
xor	eax, eax
jmp	short loc_68C237

loc_68C1E4:
cmp	[ebp+30h], eax
jnz	short loc_68C1F0
mov	eax, 1
jmp	short loc_68C237

loc_68C1F0:
cmp	[ebp+14h], eax
jnz	short loc_68C1FC
mov	eax, 2
jmp	short loc_68C237

loc_68C1FC:
cmp	[ebp+18h], eax
jnz	short loc_68C208
mov	eax, 3
jmp	short loc_68C237

loc_68C208:
cmp	[ebp+20h], eax
jnz	short loc_68C214
mov	eax, 4
jmp	short loc_68C237

loc_68C214:
cmp	[ebp+28h], eax
jnz	short loc_68C220
mov	eax, 5
jmp	short loc_68C237

loc_68C220:
mov	ecx, [ebp+2Ch]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_C0]
push	eax
call	edx
mov	eax, 6

loc_68C237:
lea	eax, [eax+eax*2]
shl	eax, 5
fld	[esp+eax+38Ch+var_2BC]
or	byte ptr [esp+38Ch+var_322+1], 10h
fstp	[esp+38Ch+var_330]

loc_68C24D:
mov	eax, [ebp+1Ch]
cmp	eax, [ebp+10h]
jz	loc_68C2DD
cmp	[ebp+24h], eax
jnz	short loc_68C262
xor	eax, eax
jmp	short loc_68C2C1

loc_68C262:
cmp	[ebp+30h], eax
jnz	short loc_68C26E
mov	eax, 1
jmp	short loc_68C2C1

loc_68C26E:
cmp	[ebp+14h], eax
jnz	short loc_68C27A
mov	eax, 2
jmp	short loc_68C2C1

loc_68C27A:
cmp	[ebp+18h], eax
jnz	short loc_68C286
mov	eax, 3
jmp	short loc_68C2C1

loc_68C286:
cmp	[ebp+20h], eax
jnz	short loc_68C292
mov	eax, 4
jmp	short loc_68C2C1

loc_68C292:
cmp	[ebp+28h], eax
jnz	short loc_68C29E
mov	eax, 5
jmp	short loc_68C2C1

loc_68C29E:
cmp	[ebp+2Ch], eax
jnz	short loc_68C2AA
mov	eax, 6
jmp	short loc_68C2C1

loc_68C2AA:
mov	ecx, [ebp+1Ch]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_60]
push	eax
call	edx
mov	eax, 7

loc_68C2C1:
lea	eax, [eax+eax*2]
shl	eax, 5
lea	ecx, [esp+eax+38Ch+var_300]
push	ecx
lea	ecx, [esp+390h+var_374]
call	sub_659260
or	byte ptr [esp+38Ch+var_322+1], 20h

loc_68C2DD:
lea	esi, [esp+38Ch]
mov	edi, 7
lea	esp, [esp+0]

loc_68C2F0:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi-60h]
mov	edx, [edx+30h]
sub	esi, 60h
push	eax
call	edx
sub	edi, 1
jns	short loc_68C2F0
mov	esi, [esp+38Ch+var_378]
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	edx, [esp+38Ch+var_31C]
mov	eax, [eax+78h]
cmp	edx, ebx
jnz	short loc_68C32D
mov	ecx, [esp+38Ch+var_308]
add	eax, 8
jmp	short loc_68C351

loc_68C32D:
mov	ecx, [eax+280h]
or	[esp+38Ch+var_37C], 1
push	edx
call	sub_651000
mov	ecx, eax
inc	dword ptr [ecx+8]
mov	[esp+38Ch+var_308], ecx
lea	eax, [esp+38Ch+var_308]

loc_68C351:
mov	eax, [eax]
mov	[esp+38Ch+var_30C], eax
inc	dword ptr [eax+8]
test	byte ptr [esp+38Ch+var_37C], 1
jz	short loc_68C374
and	[esp+38Ch+var_37C], 0FFFFFFFEh
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_68C374
call	sub_650DF0

loc_68C374:
test	byte ptr [ebp+35h], 2
mov	eax, 4
jz	short loc_68C384
mov	eax, 6

loc_68C384:
mov	ecx, [ebp+8]
mov	edx, [esp+38Ch+var_320]
push	ebx
push	ebx
push	eax
push	ecx
push	ebx
push	edx
lea	eax, [esp+3A4h+var_30C]
push	eax
lea	ecx, [esp+3A8h+var_374]
push	ecx
mov	ecx, esi
call	sub_68A810
mov	eax, [esp+38Ch+var_30C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_68C3BD
call	sub_650DF0

loc_68C3BD:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+38Ch+var_374]
mov	edx, [edx+30h]
push	eax
call	edx
jmp	loc_68CC6F	; default

loc_68C3D4:		; jumptable 0068BF2E case 1
lea	ecx, [esp+38Ch+var_368]
mov	[esp+38Ch+var_374], ebx
mov	[esp+38Ch+var_370], ebx
mov	[esp+38Ch+var_36C], ebx
call	sub_68CFB0
lea	ecx, [esp+38Ch+var_348]
call	sub_64E8E0
fldz
mov	ecx, [ebp+10h]
fstp	[esp+38Ch+var_330]
xor	eax, eax
mov	[esp+38Ch+var_324], ax
mov	[esp+38Ch+var_328], 40000h
mov	byte ptr [esp+38Ch+var_322+1], bl
mov	[esp+38Ch+var_32C], ebx
mov	byte ptr [esp+38Ch+var_322], bl
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_374]
push	eax
call	edx
mov	edi, 7
lea	esi, [esp+38Ch+var_2F8]
mov	edi, edi

loc_68C430:
mov	[esi-8], ebx
mov	[esi-4], ebx
lea	ecx, [esi+4]
mov	[esi], ebx
call	sub_68CFB0
lea	ecx, [esi+24h]
call	sub_64E8E0
fldz
mov	dword ptr [esi+44h], 40000h
mov	[esi+4Bh], bl
fstp	dword ptr [esi+3Ch]
xor	eax, eax
mov	[esi+40h], ebx
mov	[esi+48h], ax
mov	[esi+4Ah], bl
add	esi, 60h
sub	edi, 1
jns	short loc_68C430
mov	ecx, [ebp+24h]
cmp	ecx, [ebp+10h]
jz	short loc_68C492
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_300]
push	eax
call	edx
mov	eax, [esp+38Ch+var_2B8]
or	byte ptr [esp+38Ch+var_322+1], 1
mov	[esp+38Ch+var_32C], eax

loc_68C492:
mov	eax, [ebp+30h]
cmp	eax, [ebp+10h]
jz	short loc_68C4D0
cmp	[ebp+24h], eax
jnz	short loc_68C4A3
xor	eax, eax
jmp	short loc_68C4BA

loc_68C4A3:
mov	ecx, [ebp+30h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_2A0]
push	eax
call	edx
mov	eax, 1

loc_68C4BA:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	ecx, [esp+eax+38Ch+var_2B4]
or	byte ptr [esp+38Ch+var_322+1], 2
mov	[esp+38Ch+var_328], ecx

loc_68C4D0:
mov	eax, [ebp+14h]
cmp	eax, [ebp+10h]
jz	short loc_68C544
cmp	[ebp+24h], eax
jnz	short loc_68C4E1
xor	eax, eax
jmp	short loc_68C504

loc_68C4E1:
cmp	[ebp+30h], eax
jnz	short loc_68C4ED
mov	eax, 1
jmp	short loc_68C504

loc_68C4ED:
mov	ecx, [ebp+14h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_240]
push	eax
call	edx
mov	eax, 2

loc_68C504:
lea	eax, [eax+eax*2]
shl	eax, 5
fld	[esp+eax+38Ch+var_2D4]
or	byte ptr [esp+38Ch+var_322+1], 4
fstp	[esp+38Ch+var_348]
lea	eax, [esp+eax+38Ch+var_2D4]
fld	dword ptr [eax+4]
fstp	[esp+38Ch+var_344]
fld	dword ptr [eax+8]
fstp	[esp+38Ch+var_340]
fld	dword ptr [eax+0Ch]
fstp	[esp+38Ch+var_33C]
fld	dword ptr [eax+10h]
fstp	[esp+38Ch+var_338]
fld	dword ptr [eax+14h]
fstp	[esp+38Ch+var_334]

loc_68C544:
mov	eax, [ebp+18h]
cmp	eax, [ebp+10h]
jz	short loc_68C5A1
cmp	[ebp+24h], eax
jnz	short loc_68C555
xor	eax, eax
jmp	short loc_68C584

loc_68C555:
cmp	[ebp+30h], eax
jnz	short loc_68C561
mov	eax, 1
jmp	short loc_68C584

loc_68C561:
cmp	[ebp+14h], eax
jnz	short loc_68C56D
mov	eax, 2
jmp	short loc_68C584

loc_68C56D:
mov	ecx, [ebp+18h]
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+38Ch+var_1E0]
push	edx
call	eax
mov	eax, 3

loc_68C584:
lea	esi, [eax+eax*2]
shl	esi, 5
lea	esi, [esp+esi+38Ch+var_2F4]
mov	ecx, 8
lea	edi, [esp+38Ch+var_368]
rep movsd
or	byte ptr [esp+38Ch+var_322+1], 8

loc_68C5A1:
mov	eax, [ebp+20h]
cmp	eax, [ebp+10h]
jz	short loc_68C603
cmp	[ebp+24h], eax
jnz	short loc_68C5B2
xor	eax, eax
jmp	short loc_68C5ED

loc_68C5B2:
cmp	[ebp+30h], eax
jnz	short loc_68C5BE
mov	eax, 1
jmp	short loc_68C5ED

loc_68C5BE:
cmp	[ebp+14h], eax
jnz	short loc_68C5CA
mov	eax, 2
jmp	short loc_68C5ED

loc_68C5CA:
cmp	[ebp+18h], eax
jnz	short loc_68C5D6
mov	eax, 3
jmp	short loc_68C5ED

loc_68C5D6:
mov	ecx, [ebp+20h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_180]
push	eax
call	edx
mov	eax, 4

loc_68C5ED:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	cl, [esp+eax+38Ch+var_2AE]
or	byte ptr [esp+38Ch+var_322+1], 80h
mov	byte ptr [esp+38Ch+var_322], cl

loc_68C603:
mov	eax, [ebp+28h]
cmp	eax, [ebp+10h]
jz	short loc_68C673
cmp	[ebp+24h], eax
jnz	short loc_68C614
xor	eax, eax
jmp	short loc_68C65B

loc_68C614:
cmp	[ebp+30h], eax
jnz	short loc_68C620
mov	eax, 1
jmp	short loc_68C65B

loc_68C620:
cmp	[ebp+14h], eax
jnz	short loc_68C62C
mov	eax, 2
jmp	short loc_68C65B

loc_68C62C:
cmp	[ebp+18h], eax
jnz	short loc_68C638
mov	eax, 3
jmp	short loc_68C65B

loc_68C638:
cmp	[ebp+20h], eax
jnz	short loc_68C644
mov	eax, 4
jmp	short loc_68C65B

loc_68C644:
mov	ecx, [ebp+28h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_120]
push	eax
call	edx
mov	eax, 5

loc_68C65B:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	cx, [esp+eax+38Ch+var_2B0]
or	byte ptr [esp+38Ch+var_322+1], 40h
mov	[esp+38Ch+var_324], cx

loc_68C673:
mov	eax, [ebp+2Ch]
cmp	eax, [ebp+10h]
jz	short loc_68C6ED
cmp	[ebp+24h], eax
jnz	short loc_68C684
xor	eax, eax
jmp	short loc_68C6D7

loc_68C684:
cmp	[ebp+30h], eax
jnz	short loc_68C690
mov	eax, 1
jmp	short loc_68C6D7

loc_68C690:
cmp	[ebp+14h], eax
jnz	short loc_68C69C
mov	eax, 2
jmp	short loc_68C6D7

loc_68C69C:
cmp	[ebp+18h], eax
jnz	short loc_68C6A8
mov	eax, 3
jmp	short loc_68C6D7

loc_68C6A8:
cmp	[ebp+20h], eax
jnz	short loc_68C6B4
mov	eax, 4
jmp	short loc_68C6D7

loc_68C6B4:
cmp	[ebp+28h], eax
jnz	short loc_68C6C0
mov	eax, 5
jmp	short loc_68C6D7

loc_68C6C0:
mov	ecx, [ebp+2Ch]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_C0]
push	eax
call	edx
mov	eax, 6

loc_68C6D7:
lea	eax, [eax+eax*2]
shl	eax, 5
fld	[esp+eax+38Ch+var_2BC]
or	byte ptr [esp+38Ch+var_322+1], 10h
fstp	[esp+38Ch+var_330]

loc_68C6ED:
mov	eax, [ebp+1Ch]
cmp	eax, [ebp+10h]
jz	loc_68C77D
cmp	[ebp+24h], eax
jnz	short loc_68C702
xor	eax, eax
jmp	short loc_68C761

loc_68C702:
cmp	[ebp+30h], eax
jnz	short loc_68C70E
mov	eax, 1
jmp	short loc_68C761

loc_68C70E:
cmp	[ebp+14h], eax
jnz	short loc_68C71A
mov	eax, 2
jmp	short loc_68C761

loc_68C71A:
cmp	[ebp+18h], eax
jnz	short loc_68C726
mov	eax, 3
jmp	short loc_68C761

loc_68C726:
cmp	[ebp+20h], eax
jnz	short loc_68C732
mov	eax, 4
jmp	short loc_68C761

loc_68C732:
cmp	[ebp+28h], eax
jnz	short loc_68C73E
mov	eax, 5
jmp	short loc_68C761

loc_68C73E:
cmp	[ebp+2Ch], eax
jnz	short loc_68C74A
mov	eax, 6
jmp	short loc_68C761

loc_68C74A:
mov	ecx, [ebp+1Ch]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_60]
push	eax
call	edx
mov	eax, 7

loc_68C761:
lea	eax, [eax+eax*2]
shl	eax, 5
lea	ecx, [esp+eax+38Ch+var_300]
push	ecx
lea	ecx, [esp+390h+var_374]
call	sub_659260
or	byte ptr [esp+38Ch+var_322+1], 20h

loc_68C77D:
lea	esi, [esp+38Ch]
mov	edi, 7
lea	esp, [esp+0]

loc_68C790:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi-60h]
mov	edx, [edx+30h]
sub	esi, 60h
push	eax
call	edx
sub	edi, 1
jns	short loc_68C790
mov	esi, [esp+38Ch+var_378]
lea	eax, [esp+38Ch+var_374]
push	eax
lea	ecx, [esi+0C4h]
call	sub_65D3D0
mov	eax, [esi+0BCh]
add	eax, 2474h
or	dword ptr [eax], 400h
jmp	loc_68C3BD

loc_68C7D3:		; jumptable 0068BF2E case 2
lea	ecx, [esp+38Ch+var_368]
mov	[esp+38Ch+var_374], ebx
mov	[esp+38Ch+var_370], ebx
mov	[esp+38Ch+var_36C], ebx
call	sub_68CFB0
lea	ecx, [esp+38Ch+var_348]
call	sub_64E8E0
fldz
mov	ecx, [ebp+10h]
fstp	[esp+38Ch+var_330]
xor	eax, eax
mov	[esp+38Ch+var_324], ax
mov	[esp+38Ch+var_328], 40000h
mov	byte ptr [esp+38Ch+var_322+1], bl
mov	[esp+38Ch+var_32C], ebx
mov	byte ptr [esp+38Ch+var_322], bl
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_374]
push	eax
call	edx
mov	edi, 7
lea	esi, [esp+38Ch+var_2F8]
lea	ecx, [ecx+0]

loc_68C830:
mov	[esi-8], ebx
mov	[esi-4], ebx
lea	ecx, [esi+4]
mov	[esi], ebx
call	sub_68CFB0
lea	ecx, [esi+24h]
call	sub_64E8E0
fldz
mov	dword ptr [esi+44h], 40000h
mov	[esi+4Bh], bl
fstp	dword ptr [esi+3Ch]
xor	eax, eax
mov	[esi+40h], ebx
mov	[esi+48h], ax
mov	[esi+4Ah], bl
add	esi, 60h
sub	edi, 1
jns	short loc_68C830
mov	ecx, [ebp+24h]
cmp	ecx, [ebp+10h]
jz	short loc_68C892
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_300]
push	eax
call	edx
mov	eax, [esp+38Ch+var_2B8]
or	byte ptr [esp+38Ch+var_322+1], 1
mov	[esp+38Ch+var_32C], eax

loc_68C892:
mov	eax, [ebp+30h]
cmp	eax, [ebp+10h]
jz	short loc_68C8D0
cmp	[ebp+24h], eax
jnz	short loc_68C8A3
xor	eax, eax
jmp	short loc_68C8BA

loc_68C8A3:
mov	ecx, [ebp+30h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_2A0]
push	eax
call	edx
mov	eax, 1

loc_68C8BA:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	ecx, [esp+eax+38Ch+var_2B4]
or	byte ptr [esp+38Ch+var_322+1], 2
mov	[esp+38Ch+var_328], ecx

loc_68C8D0:
mov	eax, [ebp+14h]
cmp	eax, [ebp+10h]
jz	short loc_68C944
cmp	[ebp+24h], eax
jnz	short loc_68C8E1
xor	eax, eax
jmp	short loc_68C904

loc_68C8E1:
cmp	[ebp+30h], eax
jnz	short loc_68C8ED
mov	eax, 1
jmp	short loc_68C904

loc_68C8ED:
mov	ecx, [ebp+14h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_240]
push	eax
call	edx
mov	eax, 2

loc_68C904:
lea	eax, [eax+eax*2]
shl	eax, 5
fld	[esp+eax+38Ch+var_2D4]
or	byte ptr [esp+38Ch+var_322+1], 4
fstp	[esp+38Ch+var_348]
lea	eax, [esp+eax+38Ch+var_2D4]
fld	dword ptr [eax+4]
fstp	[esp+38Ch+var_344]
fld	dword ptr [eax+8]
fstp	[esp+38Ch+var_340]
fld	dword ptr [eax+0Ch]
fstp	[esp+38Ch+var_33C]
fld	dword ptr [eax+10h]
fstp	[esp+38Ch+var_338]
fld	dword ptr [eax+14h]
fstp	[esp+38Ch+var_334]

loc_68C944:
mov	eax, [ebp+18h]
cmp	eax, [ebp+10h]
jz	short loc_68C9A1
cmp	[ebp+24h], eax
jnz	short loc_68C955
xor	eax, eax
jmp	short loc_68C984

loc_68C955:
cmp	[ebp+30h], eax
jnz	short loc_68C961
mov	eax, 1
jmp	short loc_68C984

loc_68C961:
cmp	[ebp+14h], eax
jnz	short loc_68C96D
mov	eax, 2
jmp	short loc_68C984

loc_68C96D:
mov	ecx, [ebp+18h]
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+38Ch+var_1E0]
push	edx
call	eax
mov	eax, 3

loc_68C984:
lea	esi, [eax+eax*2]
shl	esi, 5
lea	esi, [esp+esi+38Ch+var_2F4]
mov	ecx, 8
lea	edi, [esp+38Ch+var_368]
rep movsd
or	byte ptr [esp+38Ch+var_322+1], 8

loc_68C9A1:
mov	eax, [ebp+20h]
cmp	eax, [ebp+10h]
jz	short loc_68CA03
cmp	[ebp+24h], eax
jnz	short loc_68C9B2
xor	eax, eax
jmp	short loc_68C9ED

loc_68C9B2:
cmp	[ebp+30h], eax
jnz	short loc_68C9BE
mov	eax, 1
jmp	short loc_68C9ED

loc_68C9BE:
cmp	[ebp+14h], eax
jnz	short loc_68C9CA
mov	eax, 2
jmp	short loc_68C9ED

loc_68C9CA:
cmp	[ebp+18h], eax
jnz	short loc_68C9D6
mov	eax, 3
jmp	short loc_68C9ED

loc_68C9D6:
mov	ecx, [ebp+20h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_180]
push	eax
call	edx
mov	eax, 4

loc_68C9ED:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	cl, [esp+eax+38Ch+var_2AE]
or	byte ptr [esp+38Ch+var_322+1], 80h
mov	byte ptr [esp+38Ch+var_322], cl

loc_68CA03:
mov	eax, [ebp+28h]
cmp	eax, [ebp+10h]
jz	short loc_68CA73
cmp	[ebp+24h], eax
jnz	short loc_68CA14
xor	eax, eax
jmp	short loc_68CA5B

loc_68CA14:
cmp	[ebp+30h], eax
jnz	short loc_68CA20
mov	eax, 1
jmp	short loc_68CA5B

loc_68CA20:
cmp	[ebp+14h], eax
jnz	short loc_68CA2C
mov	eax, 2
jmp	short loc_68CA5B

loc_68CA2C:
cmp	[ebp+18h], eax
jnz	short loc_68CA38
mov	eax, 3
jmp	short loc_68CA5B

loc_68CA38:
cmp	[ebp+20h], eax
jnz	short loc_68CA44
mov	eax, 4
jmp	short loc_68CA5B

loc_68CA44:
mov	ecx, [ebp+28h]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_120]
push	eax
call	edx
mov	eax, 5

loc_68CA5B:
lea	eax, [eax+eax*2]
shl	eax, 5
mov	cx, [esp+eax+38Ch+var_2B0]
or	byte ptr [esp+38Ch+var_322+1], 40h
mov	[esp+38Ch+var_324], cx

loc_68CA73:
mov	eax, [ebp+2Ch]
cmp	eax, [ebp+10h]
jz	short loc_68CAED
cmp	[ebp+24h], eax
jnz	short loc_68CA84
xor	eax, eax
jmp	short loc_68CAD7

loc_68CA84:
cmp	[ebp+30h], eax
jnz	short loc_68CA90
mov	eax, 1
jmp	short loc_68CAD7

loc_68CA90:
cmp	[ebp+14h], eax
jnz	short loc_68CA9C
mov	eax, 2
jmp	short loc_68CAD7

loc_68CA9C:
cmp	[ebp+18h], eax
jnz	short loc_68CAA8
mov	eax, 3
jmp	short loc_68CAD7

loc_68CAA8:
cmp	[ebp+20h], eax
jnz	short loc_68CAB4
mov	eax, 4
jmp	short loc_68CAD7

loc_68CAB4:
cmp	[ebp+28h], eax
jnz	short loc_68CAC0
mov	eax, 5
jmp	short loc_68CAD7

loc_68CAC0:
mov	ecx, [ebp+2Ch]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_C0]
push	eax
call	edx
mov	eax, 6

loc_68CAD7:
lea	eax, [eax+eax*2]
shl	eax, 5
fld	[esp+eax+38Ch+var_2BC]
or	byte ptr [esp+38Ch+var_322+1], 10h
fstp	[esp+38Ch+var_330]

loc_68CAED:
mov	eax, [ebp+1Ch]
cmp	eax, [ebp+10h]
jz	loc_68CB7D
cmp	[ebp+24h], eax
jnz	short loc_68CB02
xor	eax, eax
jmp	short loc_68CB61

loc_68CB02:
cmp	[ebp+30h], eax
jnz	short loc_68CB0E
mov	eax, 1
jmp	short loc_68CB61

loc_68CB0E:
cmp	[ebp+14h], eax
jnz	short loc_68CB1A
mov	eax, 2
jmp	short loc_68CB61

loc_68CB1A:
cmp	[ebp+18h], eax
jnz	short loc_68CB26
mov	eax, 3
jmp	short loc_68CB61

loc_68CB26:
cmp	[ebp+20h], eax
jnz	short loc_68CB32
mov	eax, 4
jmp	short loc_68CB61

loc_68CB32:
cmp	[ebp+28h], eax
jnz	short loc_68CB3E
mov	eax, 5
jmp	short loc_68CB61

loc_68CB3E:
cmp	[ebp+2Ch], eax
jnz	short loc_68CB4A
mov	eax, 6
jmp	short loc_68CB61

loc_68CB4A:
mov	ecx, [ebp+1Ch]
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [esp+38Ch+var_60]
push	eax
call	edx
mov	eax, 7

loc_68CB61:
lea	eax, [eax+eax*2]
shl	eax, 5
lea	ecx, [esp+eax+38Ch+var_300]
push	ecx
lea	ecx, [esp+390h+var_374]
call	sub_659260
or	byte ptr [esp+38Ch+var_322+1], 20h

loc_68CB7D:
lea	esi, [esp+38Ch]
mov	edi, 7
lea	esp, [esp+0]

loc_68CB90:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi-60h]
mov	edx, [edx+30h]
sub	esi, 60h
push	eax
call	edx
sub	edi, 1
jns	short loc_68CB90
mov	esi, [esp+38Ch+var_378]
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	edx, [esp+38Ch+var_31C]
mov	eax, [eax+78h]
cmp	edx, ebx
jnz	short loc_68CBCA
mov	ecx, [esp+38Ch+var_314]
add	eax, 8
jmp	short loc_68CBE8

loc_68CBCA:
mov	ecx, [eax+280h]
or	[esp+38Ch+var_37C], 2
push	edx
call	sub_651000
mov	ecx, eax
inc	dword ptr [ecx+8]
mov	[esp+38Ch+var_314], ecx
lea	eax, [esp+38Ch+var_314]

loc_68CBE8:
mov	eax, [eax]
mov	[esp+38Ch+var_310], eax
inc	dword ptr [eax+8]
test	byte ptr [esp+38Ch+var_37C], 2
jz	short loc_68CC08
and	[esp+38Ch+var_37C], 0FFFFFFFDh
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_68CC08
call	sub_650DF0

loc_68CC08:
lea	ecx, [esp+38Ch+var_310]
push	ecx
lea	edx, [esp+390h+var_374]
push	edx
mov	ecx, esi
call	sub_680EA0
mov	eax, [esp+38Ch+var_310]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_68CC2E
call	sub_650DF0

loc_68CC2E:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+38Ch+var_374]
mov	eax, [eax+30h]
push	edx
call	eax
jmp	short loc_68CC6F ; default

loc_68CC42:		; jumptable 0068BF2E case 3
mov	eax, [ebp+0Ch]
mov	esi, [esp+38Ch+var_378]
push	ecx
mov	ecx, esp
mov	dword ptr [ecx], 40000h
push	eax
lea	ecx, [esi+0C4h]
call	sub_65D150
mov	eax, [esi+0BCh]
add	eax, 2474h
or	dword ptr [eax], 400h

loc_68CC6F:		; default
mov	ecx, [esp+38Ch+var_304]
cmp	ebp, [ecx]
jz	short loc_68CC82
mov	ebp, [ebp+4]
jmp	loc_68BF21

loc_68CC82:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 37Ch
retn	8
sub_68BEF0 endp

align 10h
off_68CC90 dd offset loc_68BF35	; jump table for switch	statement
dd offset loc_68C3D4
dd offset loc_68C7D3
dd offset loc_68CC42



sub_68CCA0 proc	near

var_34=	byte ptr -34h
arg_0= dword ptr  4

sub	esp, 34h
push	esi
mov	esi, ecx
mov	eax, 100h
test	[esi+76h], ax
jnz	loc_68CE5B
cmp	dword ptr [esi+14h], 0FFFFFFFFh
jl	loc_68CE5B
mov	eax, [esi+1C0h]
test	eax, eax
jz	short loc_68CCD4
cmp	byte ptr [eax+18h], 0
jnz	short loc_68CCD4
mov	eax, [eax+10h]
jmp	short loc_68CCE1

loc_68CCD4:
mov	ecx, [esi+0B8h]
mov	edx, [ecx]
mov	eax, [edx+28h]
call	eax

loc_68CCE1:
mov	ecx, [esp+38h+arg_0]
dec	eax
cmp	ecx, eax
jge	short loc_68CCEC
mov	eax, ecx

loc_68CCEC:
xor	ecx, ecx
test	eax, eax
setl	cl
push	ebx
push	edi
push	0
dec	ecx
and	ecx, eax
mov	edi, ecx
mov	ecx, esi
call	sub_687E80
mov	eax, [esi+0D8h]
cmp	edi, eax
jnb	loc_68CDC5
test	edi, edi
jz	short loc_68CD1A
lea	eax, [edi-1]
jmp	short loc_68CD1C

loc_68CD1A:
xor	eax, eax

loc_68CD1C:
lea	ebx, [esi+0C4h]
push	eax
mov	ecx, ebx
call	sub_65C7F0
cmp	edi, 1
jb	short loc_68CD9D
mov	ecx, [esi+0BCh]
mov	edx, [ecx]
mov	eax, [edx+0F4h]
push	esi
call	eax
push	eax
push	1
lea	ecx, [esp+4Ch+var_34]
call	sub_684CE0
lea	ecx, [edi-1]
push	ecx
push	0
lea	edx, [esp+48h+var_34]
push	edx
mov	ecx, esi
call	sub_67F020
push	4
lea	eax, [esp+44h+var_34]
push	eax
mov	ecx, esi
mov	[esi+0D8h], edi
call	sub_68BEF0
lea	ecx, [esp+40h+var_34]
call	sub_684D20
push	edi
mov	ecx, esi
call	sub_680C30
mov	ecx, ebx
call	sub_65D220
pop	edi
pop	ebx
mov	dword ptr [esi+0D4h], 1
pop	esi
add	esp, 34h
retn	4

loc_68CD9D:
push	edi
mov	ecx, esi
mov	[esi+0D8h], edi
call	sub_680C30
mov	ecx, ebx
call	sub_65D220
pop	edi
pop	ebx
mov	dword ptr [esi+0D4h], 1
pop	esi
add	esp, 34h
retn	4

loc_68CDC5:
jbe	loc_68CE4F
cmp	edi, 1
jbe	short loc_68CE41
inc	eax
cmp	edi, eax
jbe	short loc_68CE41
mov	ecx, [esi+0BCh]
mov	edx, [ecx]
mov	eax, [edx+0F4h]
push	esi
call	eax
push	eax
push	0
lea	ecx, [esp+4Ch+var_34]
call	sub_684CE0
mov	edx, [esi+0D8h]
lea	ecx, [edi-1]
push	ecx
inc	edx
push	edx
lea	eax, [esp+48h+var_34]
push	eax
mov	ecx, esi
call	sub_67F020
mov	ebx, [esi+0D8h]
inc	ebx
cmp	ebx, edi
jnb	short loc_68CE22

loc_68CE15:
push	ebx
mov	ecx, esi
call	sub_67F0A0
inc	ebx
cmp	ebx, edi
jb	short loc_68CE15

loc_68CE22:
push	4
lea	ecx, [esp+44h+var_34]
push	ecx
mov	ecx, esi
mov	[esi+0D8h], edi
call	sub_68BEF0
lea	ecx, [esp+40h+var_34]
call	sub_684D20
jmp	short loc_68CE47

loc_68CE41:
mov	[esi+0D8h], edi

loc_68CE47:
push	edi
mov	ecx, esi
call	sub_680C30

loc_68CE4F:
pop	edi
mov	dword ptr [esi+0D4h], 1
pop	ebx

loc_68CE5B:
pop	esi
add	esp, 34h
retn	4
sub_68CCA0 endp

align 10h



sub_68CE70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [eax+4]
fmul	dword ptr [ecx]
fadd	dword ptr [ecx+4]
fstp	dword ptr [ecx+4]
fld	dword ptr [eax+0Ch]
fmul	dword ptr [ecx+8]
fadd	dword ptr [ecx+0Ch]
fstp	dword ptr [ecx+0Ch]
fld	dword ptr [eax+14h]
fmul	dword ptr [ecx+10h]
fadd	dword ptr [ecx+14h]
fstp	dword ptr [ecx+14h]
fld	dword ptr [eax+1Ch]
fmul	dword ptr [ecx+18h]
fadd	dword ptr [ecx+1Ch]
fstp	dword ptr [ecx+1Ch]
fld	dword ptr [eax]
fmul	dword ptr [ecx]
fstp	dword ptr [ecx]
fld	dword ptr [eax+8]
fmul	dword ptr [ecx+8]
fstp	dword ptr [ecx+8]
fld	dword ptr [eax+10h]
fmul	dword ptr [ecx+10h]
fstp	dword ptr [ecx+10h]
fld	dword ptr [eax+18h]
fmul	dword ptr [ecx+18h]
fstp	dword ptr [ecx+18h]
retn	4
sub_68CE70 endp

align 10h



sub_68CED0 proc	near
fld1
fst	dword ptr [ecx]
fst	dword ptr [ecx+8]
fst	dword ptr [ecx+10h]
fstp	dword ptr [ecx+18h]
fldz
fst	dword ptr [ecx+4]
fst	dword ptr [ecx+0Ch]
fst	dword ptr [ecx+14h]
fstp	dword ptr [ecx+1Ch]
retn
sub_68CED0 endp

align 10h



sub_68CEF0 proc	near
fld1
fcom	dword ptr [ecx]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF49
fcom	dword ptr [ecx+8]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF49
fcom	dword ptr [ecx+10h]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF49
fcomp	dword ptr [ecx+18h]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF4B
fldz
fcom	dword ptr [ecx+4]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF49
fcom	dword ptr [ecx+0Ch]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF49
fcom	dword ptr [ecx+14h]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF49
fcomp	dword ptr [ecx+1Ch]
fnstsw	ax
test	ah, 44h
jp	short loc_68CF4B
mov	eax, 1
retn

loc_68CF49:
fstp	st

loc_68CF4B:
xor	eax, eax
retn
sub_68CEF0 endp

align 10h



sub_68CF50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

; FUNCTION CHUNK AT 006FF890 SIZE 000000B1 BYTES

mov	eax, [esp+arg_20]
cmp	eax, 3		; switch 4 cases
ja	short locret_68CF94 ; default
jmp	ds:off_68CF98[eax*4] ; switch jump

loc_68CF60:		; jumptable 0068CF59 case 0
mov	[esp+arg_20], 0
jmp	loc_6FF890

loc_68CF6D:		; jumptable 0068CF59 case 1
mov	[esp+arg_20], 1
jmp	loc_6FF890

loc_68CF7A:		; jumptable 0068CF59 case 2
mov	[esp+arg_20], 2
jmp	loc_6FF890

loc_68CF87:		; jumptable 0068CF59 case 3
mov	[esp+arg_20], 3
jmp	loc_6FF890

locret_68CF94:		; default
retn	24h
sub_68CF50 endp

align 4
off_68CF98 dd offset loc_68CF60	; jump table for switch	statement
dd offset loc_68CF6D
dd offset loc_68CF7A
dd offset loc_68CF87
align 10h



sub_68CFB0 proc	near
fld1
mov	eax, ecx
fst	dword ptr [eax]
fst	dword ptr [eax+8]
fst	dword ptr [eax+10h]
fstp	dword ptr [eax+18h]
fldz
fst	dword ptr [eax+4]
fst	dword ptr [eax+0Ch]
fst	dword ptr [eax+14h]
fstp	dword ptr [eax+1Ch]
retn
sub_68CFB0 endp

align 10h



sub_68CFD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	dword ptr [eax+8], 0
jnz	short loc_68CFFD
cmp	dword ptr [eax+4], 0
jnz	short loc_68CFFD
mov	edx, [ecx+8]
mov	[eax+4], edx
lea	edx, [ecx+4]
mov	[eax+8], edx
mov	edx, [ecx+8]
mov	[edx+8], eax
mov	[ecx+8], eax
mov	[eax+0Ch], ecx
mov	al, 1
retn	4

loc_68CFFD:
xor	al, al
retn	4
sub_68CFD0 endp

align 10h



sub_68D010 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	ecx, ecx
cmp	[eax+8], ecx
jz	short loc_68D034
cmp	[eax+4], ecx
jz	short loc_68D034
mov	edx, [eax+4]
push	esi
mov	esi, [eax+8]
mov	[edx+8], esi
mov	esi, [eax+4]
mov	edx, [eax+8]
mov	[edx+4], esi
pop	esi

loc_68D034:
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
retn	4
sub_68D010 endp




sub_68D040 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_68D075
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_0]
lea	ebx, [edi+8]

loc_68D054:
test	ebx, ebx
jz	short loc_68D05D
lea	eax, [ebx-4]
jmp	short loc_68D05F

loc_68D05D:
xor	eax, eax

loc_68D05F:
cmp	esi, eax
jz	short loc_68D073
mov	ecx, esi
mov	eax, [ecx]
mov	edx, [eax+4]
mov	esi, [esi+8]
push	ebp
push	edi
call	edx
jmp	short loc_68D054

loc_68D073:
pop	ebp
pop	ebx

loc_68D075:
pop	edi
pop	esi
retn	4
sub_68D040 endp

align 10h



sub_68D080 proc	near
mov	eax, ecx
mov	ecx, [eax+0Ch]
xor	edx, edx
cmp	ecx, edx
jz	short loc_68D097
mov	edx, [ecx]
push	eax
mov	eax, [edx+0C8h]
call	eax
retn

loc_68D097:
cmp	[eax+8], edx
jz	short loc_68D0B5
cmp	[eax+4], edx
jz	short loc_68D0B5
mov	ecx, [eax+4]
push	esi
mov	esi, [eax+8]
mov	[ecx+8], esi
mov	esi, [eax+4]
mov	ecx, [eax+8]
mov	[ecx+4], esi
pop	esi

loc_68D0B5:
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax+0Ch], edx
retn
sub_68D080 endp

align 10h



sub_68D0C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	edx, [esp+10h+arg_4]
mov	eax, edx
shr	eax, 18h
mov	[esp+10h+arg_4], eax
fild	[esp+10h+arg_4]
fmul	dword ptr [ecx+18h]
fadd	dword ptr [ecx+1Ch]
fstp	[esp+10h+arg_4]
fld	[esp+10h+arg_4]
fld	ds:dbl_15FCCF8
fcom	st(1)
fnstsw	ax
fld	ds:flt_15FCD30
fldz
test	ah, 41h
jnz	short loc_68D110
fxch	st(3)
fst	[esp+10h+arg_4]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_68D116
fxch	st(2)
fst	[esp+10h+var_8]
jmp	short loc_68D120

loc_68D110:
fstp	st(3)
fst	[esp+10h+arg_4]

loc_68D116:
fld	[esp+10h+arg_4]
fstp	[esp+10h+var_8]
fxch	st(2)

loc_68D120:
fld	dword ptr [ecx+10h]
movzx	eax, dl
mov	[esp+10h+arg_4], eax
fild	[esp+10h+arg_4]
fmulp	st(1), st
fadd	dword ptr [ecx+14h]
fstp	[esp+10h+arg_4]
fld	[esp+10h+arg_4]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_68D157
fst	[esp+10h+arg_4]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_68D161
fst	[esp+10h+var_C]
jmp	short loc_68D169

loc_68D157:
fstp	st
fxch	st(2)
fst	[esp+10h+arg_4]
fxch	st(2)

loc_68D161:
fld	[esp+10h+arg_4]
fstp	[esp+10h+var_C]

loc_68D169:
mov	eax, edx
shr	eax, 8
movzx	eax, al
mov	[esp+10h+arg_4], eax
fild	[esp+10h+arg_4]
fmul	dword ptr [ecx+8]
fadd	dword ptr [ecx+0Ch]
fstp	[esp+10h+arg_4]
fld	[esp+10h+arg_4]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_68D1A2
fst	[esp+10h+arg_4]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_68D1AC
fst	[esp+10h+var_10]
jmp	short loc_68D1B3

loc_68D1A2:
fstp	st
fxch	st(2)
fst	[esp+10h+arg_4]
fxch	st(2)

loc_68D1AC:
fld	[esp+10h+arg_4]
fstp	[esp+10h+var_10]

loc_68D1B3:
shr	edx, 10h
movzx	edx, dl
mov	[esp+10h+arg_4], edx
fild	[esp+10h+arg_4]
fmul	dword ptr [ecx]
fadd	dword ptr [ecx+4]
fstp	[esp+10h+arg_4]
fld	[esp+10h+arg_4]
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 5
jp	loc_68D2A8
fstp	st(2)
fst	[esp+10h+arg_4]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jnp	short loc_68D1F2
fstp	st

loc_68D1EE:
fld	[esp+10h+arg_4]

loc_68D1F2:
mov	ecx, [esp+10h+arg_0]
fstp	[esp+10h+arg_4]
fld	[esp+10h+arg_4]
fnstcw	word ptr [esp+10h+arg_4]
movzx	eax, word ptr [esp+10h+arg_4]
or	eax, 0C00h
mov	[esp+10h+var_4], eax
fldcw	word ptr [esp+10h+var_4]
fistp	[esp+10h+var_4]
movzx	eax, byte ptr [esp+10h+var_4]
mov	[ecx+2], al
fldcw	word ptr [esp+10h+arg_4]
fld	[esp+10h+var_10]
fnstcw	word ptr [esp+10h+arg_4]
movzx	eax, word ptr [esp+10h+arg_4]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+arg_0]
movzx	edx, byte ptr [esp+10h+arg_0]
mov	[ecx+1], dl
fldcw	word ptr [esp+10h+arg_4]
fld	[esp+10h+var_C]
fnstcw	word ptr [esp+10h+arg_4]
movzx	eax, word ptr [esp+10h+arg_4]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+arg_0]
movzx	eax, byte ptr [esp+10h+arg_0]
mov	[ecx], al
fldcw	word ptr [esp+10h+arg_4]
fld	[esp+10h+var_8]
fnstcw	word ptr [esp+10h+arg_4]
movzx	eax, word ptr [esp+10h+arg_4]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
mov	eax, ecx
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+arg_0]
movzx	edx, byte ptr [esp+10h+arg_0]
mov	[ecx+3], dl
fldcw	word ptr [esp+10h+arg_4]
add	esp, 10h
retn	8

loc_68D2A8:
fstp	st(1)
fstp	st
fstp	[esp+10h+arg_4]
jmp	loc_68D1EE
sub_68D0C0 endp

align 10h



sub_68D2C0 proc	near
push	esi
push	edi
mov	edi, ecx
push	1
mov	dword ptr [edi], offset	off_1437390
call	sub_68D040
mov	edx, [edi+0Ch]
xor	esi, esi
cmp	edx, esi
jz	short loc_68D320
push	ebx
push	ebp
lea	esp, [esp+0]

loc_68D2E0:
lea	eax, [edi+8]
cmp	eax, esi
jz	short loc_68D2EC
add	eax, 0FFFFFFFCh
jmp	short loc_68D2EE

loc_68D2EC:
xor	eax, eax

loc_68D2EE:
cmp	edx, eax
jz	short loc_68D31E
lea	ecx, [edx+8]
mov	eax, edx
mov	edx, [ecx]
cmp	edx, esi
jz	short loc_68D314
cmp	[eax+4], esi
jz	short loc_68D314
mov	ebx, [eax+4]
mov	ebp, [eax+8]
mov	[ebx+8], ebp
mov	ebx, [eax+8]
mov	ebp, [eax+4]
mov	[ebx+4], ebp

loc_68D314:
mov	[eax+4], esi
mov	[ecx], esi
mov	[eax+0Ch], esi
jmp	short loc_68D2E0

loc_68D31E:
pop	ebp
pop	ebx

loc_68D320:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A3F0
sub_68D2C0 endp

align 10h



sub_68D330 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
fldz
mov	edx, [esp+arg_8]
sub	esp, 8
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
mov	[esi+10h], eax
mov	eax, [esp+0Ch+arg_C]
mov	[esi+14h], ecx
mov	ecx, [esp+0Ch+arg_10]
mov	[esi+18h], edx
mov	[esi+1Ch], eax
mov	[esi+20h], ecx
fcomp	dword ptr [esi+10h]
fnstsw	ax
test	ah, 44h
jp	short loc_68D3A1
fld	[esp+0Ch+arg_8]
fstp	[esp+0Ch+var_8]
fld	[esp+0Ch+arg_C]
fld	st
fld1
fld	st
fdivrp	st(2), st
fxch	st(1)
fdivrp	st(2), st
faddp	st(1), st
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
call	__CIsqrt
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
fdivr	[esp+0Ch+var_8]
fmul	ds:dbl_1437460
fstp	dword ptr [esi+10h]

loc_68D3A1:
pop	esi
add	esp, 8
retn	14h
sub_68D330 endp

align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_43. PRESS	KEYPAD "+" TO EXPAND]
align 10h



sub_68D3C0 proc	near
push	0
call	sub_68D040
retn
sub_68D3C0 endp

align 10h



; int __stdcall	sub_68D3D0(int,	void *,	void *,	float, float)
sub_68D3D0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 34h
mov	eax, [esp+34h+arg_0]
fld	dword ptr [eax+0Ch]
fsub	dword ptr [eax+4]
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fabs
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fstp	[esp+34h+var_34]
fld	dword ptr [eax+8]
fsub	dword ptr [eax]
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fabs
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fstp	[esp+34h+arg_0]
fld	dword ptr [eax+8]
fadd	dword ptr [eax]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+34h+var_2C]
fld	dword ptr [eax+0Ch]
fadd	dword ptr [eax+4]
fmul	st, st(1)
fstp	[esp+34h+var_28]
fld	[esp+34h+arg_0]
fmul	st, st(1)
fstp	[esp+34h+var_30]
fld	[esp+34h+var_30]
fstp	[esp+34h+var_30]
fld	[esp+34h+arg_C]
fmul	ds:dbl_1431730
fdiv	ds:dbl_15FCD10
fstp	[esp+34h+arg_C]
fmul	[esp+34h+arg_C]
fstp	[esp+34h+arg_C]
fld	[esp+34h+arg_C]
call	__CItan
fstp	[esp+34h+arg_C]
fld	[esp+34h+arg_C]
fdivr	[esp+34h+var_30]
fstp	[esp+34h+arg_C]
fld	[esp+34h+arg_C]
fchs
fstp	[esp+34h+arg_C]
fld	ds:dword_15FDC54
fld	[esp+34h+arg_C]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_68D494
fstp	st
jmp	short loc_68D496

loc_68D494:
fstp	st(1)

loc_68D496:
mov	al, byte ptr [esp+34h+arg_10]
fstp	[esp+34h+arg_C]
fld	[esp+34h+var_2C]
fst	[esp+34h+var_C]
fld	[esp+34h+var_28]
fst	[esp+34h+var_8]
fld	[esp+34h+arg_C]
fstp	[esp+34h+var_4]
fxch	st(1)
fstp	[esp+34h+var_18]
fstp	[esp+34h+var_14]
fldz
fst	[esp+34h+var_10]
test	al, al
jz	short loc_68D4CE
fld1
jmp	short loc_68D4D4

loc_68D4CE:
fld	ds:flt_1431A30

loc_68D4D4:
fstp	[esp+34h+arg_10]
test	al, al
lea	eax, [esp+34h+var_24]
fst	[esp+34h+var_24]
lea	ecx, [esp+34h+var_18]
fld	[esp+34h+arg_10]
push	eax		; int
fstp	[esp+38h+var_20]
push	ecx		; int
mov	ecx, [esp+3Ch+arg_4] ; void *
lea	edx, [esp+3Ch+var_C]
fstp	[esp+3Ch+var_1C]
push	edx		; int
jz	short loc_68D535
call	sub_650060
fld	ds:flt_15FD77C
mov	ecx, [esp+34h+arg_8] ; void *
sub	esp, 10h
fstp	[esp+44h+var_38]
fld1
fstp	[esp+44h+var_3C]
fld	[esp+44h+var_34]
fstp	[esp+44h+var_40]
fld	[esp+44h+arg_0]
fstp	[esp+44h+var_44]
call	sub_64FD60
add	esp, 34h
retn	14h

loc_68D535:
call	sub_64FE30
fld	ds:flt_15FD77C
mov	ecx, [esp+34h+arg_8] ; void *
sub	esp, 10h
fstp	[esp+44h+var_38]
fld1
fstp	[esp+44h+var_3C]
fld	[esp+44h+var_34]
fstp	[esp+44h+var_40]
fld	[esp+44h+arg_0]
fstp	[esp+44h+var_44]
call	sub_64FD00
add	esp, 34h
retn	14h
sub_68D3D0 endp

align 10h



sub_68D570 proc	near
mov	eax, ecx
lea	ecx, [eax+8]
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1437390
test	ecx, ecx
jz	short loc_68D591
lea	edx, [ecx-4]
jmp	short loc_68D593

loc_68D591:
xor	edx, edx

loc_68D593:
fldz
mov	[ecx], edx
fstp	dword ptr [eax+10h]
mov	[ecx+4], edx
fld	ds:flt_15FCF1C
fstp	dword ptr [eax+14h]
fld	ds:flt_1437388
fstp	dword ptr [eax+18h]
fld	ds:flt_1437384
fstp	dword ptr [eax+1Ch]
fld	ds:flt_1437380
fstp	dword ptr [eax+20h]
mov	dword ptr [eax+24h], 0
retn
sub_68D570 endp

align 10h



sub_68D5D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_68D2C0
test	[esp+4+arg_0], 1
jz	short loc_68D5ED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_68D5ED:
mov	eax, esi
pop	esi
retn	4
sub_68D5D0 endp

align 10h



sub_68D600 proc	near
mov	eax, [ecx]
mov	edx, [eax]
call	edx
test	eax, eax
jz	short locret_68D613
mov	edx, [eax]
mov	edx, [edx+8]
mov	ecx, eax
jmp	edx

locret_68D613:
retn	8
sub_68D600 endp

align 10h



sub_68D620 proc	near
mov	eax, [ecx]
mov	edx, [eax]
call	edx
test	eax, eax
jz	short loc_68D633
mov	edx, [eax]
mov	ecx, eax
mov	edx, [edx+0Ch]
jmp	edx

loc_68D633:
xor	eax, eax
retn	4
sub_68D620 endp

align 10h



sub_68D640 proc	near
mov	eax, [ecx]
mov	edx, [eax]
call	edx
test	eax, eax
jz	short locret_68D653
mov	edx, [eax]
mov	edx, [edx+10h]
mov	ecx, eax
jmp	edx

locret_68D653:
retn	0Ch
sub_68D640 endp

align 10h



; int __thiscall sub_68D660(void *, char)
sub_68D660 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437474
jz	short loc_68D679
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_68D679:
mov	eax, esi
pop	esi
retn	4
sub_68D660 endp

align 10h



sub_68D680 proc	near
push	esi
push	offset aImm32_dll ; "imm32.dll"
mov	esi, ecx
call	ds:LoadLibraryA
mov	[esi+1Ch], eax
test	eax, eax
jz	short loc_68D706
push	edi
mov	edi, ds:GetProcAddress
push	offset aImmgetcontext ;	"ImmGetContext"
push	eax		; hModule
call	edi ; GetProcAddress
mov	[esi], eax
mov	eax, [esi+1Ch]
push	offset aImmreleasecont ; "ImmReleaseContext"
push	eax		; hModule
call	edi ; GetProcAddress
mov	ecx, [esi+1Ch]
push	offset aImmgetcomposit ; "ImmGetCompositionStringA"
push	ecx		; hModule
mov	[esi+4], eax
call	edi ; GetProcAddress
mov	edx, [esi+1Ch]
push	offset aImmgetcompos_0 ; "ImmGetCompositionStringW"
push	edx		; hModule
mov	[esi+8], eax
call	edi ; GetProcAddress
mov	[esi+0Ch], eax
mov	eax, [esi+1Ch]
push	offset aImmisuimessage ; "ImmIsUIMessageA"
push	eax		; hModule
call	edi ; GetProcAddress
mov	ecx, [esi+1Ch]
push	offset aImmisuimessa_0 ; "ImmIsUIMessageW"
push	ecx		; hModule
mov	[esi+10h], eax
call	edi ; GetProcAddress
mov	edx, [esi+1Ch]
push	offset aImmgetdefaulti ; "ImmGetDefaultIMEWnd"
push	edx		; hModule
mov	[esi+14h], eax
call	edi ; GetProcAddress
mov	[esi+18h], eax
pop	edi
mov	dword ptr [esi+20h], 0
mov	eax, esi
pop	esi
retn

loc_68D706:
call	ds:GetLastError
mov	[esi+20h], eax
mov	eax, esi
pop	esi
retn
sub_68D680 endp

align 10h



sub_68D720 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
mov	eax, [eax]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
push	ecx
mov	[esi], eax
inc	dword ptr [eax+8]
lea	ecx, [esi+4]
call	sub_652330
mov	dl, [esp+4+arg_8]
mov	dword ptr [esi+14h], 0
mov	[esi+18h], dl
mov	eax, esi
pop	esi
retn	0Ch
sub_68D720 endp

align 10h



sub_68D750 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+10h]
cmp	eax, [ecx+8]
jbe	short locret_68D771
mov	edx, [esp+arg_4]
cmp	eax, edx
jbe	short locret_68D771
sub	eax, edx
mov	[ecx+10h], eax
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
push	eax
mov	eax, [edx+18h]
call	eax

locret_68D771:
retn	8
sub_68D750 endp

align 10h



sub_68D780 proc	near

arg_0= dword ptr  4

cmp	dword ptr [ecx+30h], 0
jz	short loc_68D7A9
mov	eax, [esp+arg_0]
mov	edx, [eax]
cmp	dword ptr [edx+10h], 0
jz	short loc_68D7A9
mov	ecx, [ecx+30h]
push	0
push	eax
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	ecx, eax
call	sub_669880
retn	4

loc_68D7A9:
xor	eax, eax
retn	4
sub_68D780 endp

align 10h



; int __cdecl sub_68D7B0(char *, int, char)
sub_68D7B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

push	ecx
mov	eax, [esp+4+arg_0]
mov	cl, [eax]
cmp	cl, 30h
jl	short loc_68D7E5
cmp	cl, 39h
jg	short loc_68D7E5
push	0Ah		; int
lea	ecx, [esp+8+arg_0]
push	ecx		; char **
push	eax		; char *
mov	[esp+10h+arg_0], 0
call	_strtol
mov	edx, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
add	esp, 0Ch
mov	[edx], ecx
pop	ecx
retn

loc_68D7E5:
cmp	cl, 5Fh
jnz	short loc_68D80F
cmp	[esp+4+arg_8], 0
jz	short loc_68D814
cmp	byte ptr [eax+1], 6Ch
jnz	short loc_68D80F
cmp	byte ptr [eax+2], 65h
jnz	short loc_68D80F
cmp	byte ptr [eax+3], 76h
jnz	short loc_68D80F
cmp	byte ptr [eax+4], 65h
jnz	short loc_68D80F
cmp	byte ptr [eax+5], 6Ch
jz	short loc_68D855

loc_68D80F:
or	eax, 0FFFFFFFFh
pop	ecx
retn

loc_68D814:
mov	cl, [eax+1]
cmp	cl, 6Ch
jz	short loc_68D821
cmp	cl, 4Ch
jnz	short loc_68D80F

loc_68D821:
mov	cl, [eax+2]
cmp	cl, 65h
jz	short loc_68D82E
cmp	cl, 45h
jnz	short loc_68D80F

loc_68D82E:
mov	cl, [eax+3]
cmp	cl, 76h
jz	short loc_68D83B
cmp	cl, 56h
jnz	short loc_68D80F

loc_68D83B:
mov	cl, [eax+4]
cmp	cl, 65h
jz	short loc_68D848
cmp	cl, 45h
jnz	short loc_68D80F

loc_68D848:
mov	cl, [eax+5]
cmp	cl, 6Ch
jz	short loc_68D855
cmp	cl, 4Ch
jnz	short loc_68D80F

loc_68D855:
mov	cl, [eax+6]
add	eax, 6
cmp	cl, 30h
jl	short loc_68D80F
cmp	cl, 39h
jg	short loc_68D80F
push	0Ah		; int
lea	edx, [esp+8+var_4]
push	edx		; char **
push	eax		; char *
mov	[esp+10h+var_4], 0
call	_strtol
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+var_4]
add	esp, 0Ch
mov	[ecx], edx
pop	ecx
retn
sub_68D7B0 endp

align 10h



sub_68D890 proc	near

arg_0= dword ptr  4

inc	dword ptr [ecx+283Ch]
mov	eax, [ecx+283Ch]
mov	edx, [esp+arg_0]
mov	[edx+3Ch], eax
mov	eax, [ecx+2838h]
test	eax, eax
jnz	short loc_68D8B6
mov	[ecx+2838h], edx
retn	4

loc_68D8B6:
cmp	dword ptr [eax], 0
jz	short loc_68D8C7
jmp	short loc_68D8C0
align 10h

loc_68D8C0:
mov	eax, [eax]
cmp	dword ptr [eax], 0
jnz	short loc_68D8C0

loc_68D8C7:
mov	[eax], edx
retn	4
sub_68D890 endp

align 10h



sub_68D8D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_68D8DD
mov	edx, [ecx+50h]
mov	[eax], edx

loc_68D8DD:
inc	dword ptr [ecx+58h]
mov	eax, [ecx+58h]
mov	[ecx+50h], eax
retn	4
sub_68D8D0 endp

align 10h



sub_68D8F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
lea	esi, [ecx+40h]
mov	ecx, 0Dh
rep movsd
pop	edi
pop	esi
retn	4
sub_68D8F0 endp

align 10h



sub_68D910 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+64h]
mov	[ecx+88h], eax
lea	eax, [ecx+40h]
mov	[esp+arg_0], eax
jmp	edx
sub_68D910 endp

align 10h



sub_68D930 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx+64h]
mov	[ecx+8Ch], eax
lea	eax, [ecx+40h]
mov	[esp+arg_0], eax
jmp	edx
sub_68D930 endp

align 10h



sub_68D950 proc	near
push	ebp
mov	ebp, ecx
push	esi
mov	esi, [ebp+280Ch]
test	esi, esi
jz	short loc_68D9A2
push	edi
nop

loc_68D960:
mov	eax, [esi]
mov	edi, [esi+8Ch]
mov	edx, [eax+88h]
mov	ecx, esi
mov	dword ptr [esi+8Ch], 0
call	edx
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_68D98E
mov	eax, [ecx]
mov	edx, [eax+90h]
push	esi
call	edx

loc_68D98E:
mov	ecx, esi
call	sub_64A400
mov	esi, edi
test	edi, edi
jnz	short loc_68D960
mov	[ebp+280Ch], edi
pop	edi

loc_68D9A2:
pop	esi
pop	ebp
retn
sub_68D950 endp

align 10h



sub_68D9B0 proc	near
cmp	dword ptr [ecx+30h], 0
jz	short loc_68D9C3
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	edx, [eax+13Ch]
jmp	edx

loc_68D9C3:
xor	eax, eax
retn
sub_68D9B0 endp

align 10h



sub_68D9D0 proc	near
cmp	dword ptr [ecx+30h], 0
jz	short loc_68D9E7
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	edx, [eax+164h]
call	edx
movzx	eax, al
retn

loc_68D9E7:
xor	eax, eax
retn
sub_68D9D0 endp

align 10h



sub_68D9F0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
lea	esi, [ecx+9D4h]
mov	edi, 4

loc_68DA02:
push	ebx
mov	ecx, esi
call	sub_6A7AE0
add	esi, 67Ch
sub	edi, 1
jnz	short loc_68DA02
pop	edi
pop	esi
pop	ebx
retn	4
sub_68D9F0 endp

align 10h



sub_68DA20 proc	near
cmp	dword ptr [ecx+30h], 0
jz	short locret_68DA33
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	eax, [eax+144h]
jmp	eax

locret_68DA33:
retn	4
sub_68DA20 endp

align 10h



sub_68DA40 proc	near
cmp	dword ptr [ecx+30h], 0
jz	short locret_68DA53
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	eax, [eax+148h]
jmp	eax

locret_68DA53:
retn	4
sub_68DA40 endp

align 10h



sub_68DA60 proc	near
mov	eax, [ecx+30h]
test	eax, eax
jnz	short loc_68DA6D
mov	eax, 1
retn

loc_68DA6D:
mov	eax, [eax+0D4h]
retn
sub_68DA60 endp

align 10h



sub_68DA80 proc	near
cmp	dword ptr [ecx+30h], 0
jz	short locret_68DA93
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	eax, [eax+0CCh]
jmp	eax

locret_68DA93:
retn	4
sub_68DA80 endp

align 10h



sub_68DAA0 proc	near
cmp	dword ptr [ecx+30h], 0
jz	short loc_68DAB4
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
movzx	eax, al
retn

loc_68DAB4:
xor	eax, eax
retn
sub_68DAA0 endp

align 10h



sub_68DAC0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
lea	eax, [ecx+23CCh]
push	eax
push	edx
call	sub_64ABC0
retn	4
sub_68DAC0 endp

align 10h



sub_68DAE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
cmp	edx, 10h
jnb	short loc_68DB0D
mov	eax, [esp+arg_4]
cmp	eax, 10h
jnb	short loc_68DB0D
mov	[edx+ecx+27F4h], al
cmp	eax, [ecx+27F0h]
jb	short loc_68DB08
inc	eax
mov	[ecx+27F0h], eax

loc_68DB08:
mov	al, 1
retn	8

loc_68DB0D:
xor	al, al
retn	8
sub_68DAE0 endp

align 10h



sub_68DB20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 10h
jb	short loc_68DB2E
xor	eax, eax
retn	4

loc_68DB2E:
movzx	eax, byte ptr [eax+ecx+27F4h]
retn	4
sub_68DB20 endp

align 10h



sub_68DB40 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
xor	eax, eax
push	edi
lea	edx, [eax+1]
add	ecx, 27F5h
lea	edi, [eax+4]

loc_68DB55:
movzx	ebx, byte ptr [ecx-1]
cmp	ebx, esi
jnz	short loc_68DB5F
or	eax, edx

loc_68DB5F:
movzx	ebx, byte ptr [ecx]
add	edx, edx
cmp	ebx, esi
jnz	short loc_68DB6A
or	eax, edx

loc_68DB6A:
movzx	ebx, byte ptr [ecx+1]
add	edx, edx
cmp	ebx, esi
jnz	short loc_68DB76
or	eax, edx

loc_68DB76:
movzx	ebx, byte ptr [ecx+2]
add	edx, edx
cmp	ebx, esi
jnz	short loc_68DB82
or	eax, edx

loc_68DB82:
add	edx, edx
add	ecx, 4
sub	edi, 1
jnz	short loc_68DB55
pop	edi
pop	esi
pop	ebx
retn	4
sub_68DB40 endp

align 10h



sub_68DBA0 proc	near

var_2C=	byte ptr -2Ch
var_4= word ptr	-4
arg_0= dword ptr  4

sub	esp, 2Ch
push	esi
mov	esi, [ecx+2810h]
push	edi
mov	edi, [esp+34h+arg_0]
mov	ecx, 0Bh
test	esi, esi
jnz	short loc_68DBC3
xor	eax, eax
mov	[esp+34h+var_4], ax
lea	esi, [esp+34h+var_2C]

loc_68DBC3:
rep movsd
pop	edi
pop	esi
add	esp, 2Ch
retn	4
sub_68DBA0 endp

align 10h



sub_68DBD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+70h]
push	edi
mov	edi, ecx
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
mov	eax, [eax+8]
push	0
push	0
push	4
push	0FFFFFFFFh
push	0
push	0
lea	ecx, [esp+20h+arg_0]
push	ecx
add	edi, 4
mov	[esp+24h+arg_0], eax
inc	dword ptr [eax+8]
push	edi
mov	ecx, esi
call	sub_68A810
mov	eax, [esp+8+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
jnz	short locret_68DC22
call	sub_650DF0

locret_68DC22:
retn	4
sub_68DBD0 endp

align 10h



sub_68DC30 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	esi
mov	esi, [ecx+34h]
sub	esi, [ecx+30h]
add	esi, [ecx+2Ch]
call	sub_6A9860
sub	eax, esi
pop	esi
retn	4
sub_68DC30 endp

align 10h



sub_68DC50 proc	near

arg_0= dword ptr  4

mov	cl, [ecx+4]
mov	eax, [esp+arg_0]
neg	cl
sbb	cl, cl
and	cl, 8
or	cl, 7
mov	[eax], cl
retn	4
sub_68DC50 endp

align 10h



sub_68DC70 proc	near
movzx	ax, byte ptr [ecx+8]
movzx	cx, byte ptr [ecx+7]
shl	ax, 8
or	ax, cx
retn
sub_68DC70 endp

align 10h



sub_68DC90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
xor	ebx, ebx
mov	[esi+58h], ebx
mov	[esi+54h], ebx
mov	[esi+5Ch], ebx
push	edi
mov	edi, ecx
lea	eax, [edi+5]
mov	[esp+20h+var_10], eax
mov	[esp+20h+var_8], ebx
mov	[esp+20h+var_4], ebx
mov	[esp+20h+var_C], 0FFFFFFFFh
mov	edx, 2
or	[esi+53h], dl
movzx	ecx, byte ptr [eax+1]
movzx	bp, byte ptr [eax]
shl	cx, 8
or	cx, bp
movzx	ecx, cx
mov	[esp+20h+var_8], edx
movzx	edx, cx
mov	[esi+4Ch], edx
or	byte ptr [esi+53h], 1
mov	[esp+20h+var_4], ebx
movzx	ecx, byte ptr [eax+3]
movzx	dx, byte ptr [eax+2]
shl	cx, 8
or	cx, dx
movzx	eax, cx
movzx	eax, ax
mov	ecx, 4
mov	[esp+20h+var_8], ecx
mov	[esi+48h], eax
or	[esi+53h], cl
lea	ecx, [esi+2Ch]
push	ecx
lea	ecx, [esp+24h+var_10]
call	sub_6A9DD0
cmp	[edi+4], bl
jz	short loc_68DD33
or	byte ptr [esi+53h], 8
add	esi, 0Ch
push	esi
lea	ecx, [esp+24h+var_10]
call	sub_6A9F90

loc_68DD33:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4
sub_68DC90 endp

align 10h



sub_68DD40 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 28h
push	esi
mov	esi, ecx
lea	eax, [esi+5]
lea	ecx, [esp+2Ch+var_18]
mov	[esp+2Ch+var_28], eax
mov	[esp+2Ch+var_24], 0FFFFFFFFh
mov	[esp+2Ch+var_20], 0
mov	[esp+2Ch+var_1C], 0
call	sub_64E8E0
cmp	[esp+2Ch+var_1C], 0
jz	short loc_68DD79
inc	[esp+2Ch+var_20]

loc_68DD79:
add	[esp+2Ch+var_20], 4
lea	ecx, [esp+2Ch+var_18]
push	ecx
lea	ecx, [esp+30h+var_28]
mov	[esp+30h+var_1C], 0
call	sub_6A9DD0
mov	edx, [esp+2Ch+arg_0]
dec	edx
cmp	[esp+2Ch+var_20], edx
setb	al
mov	[esi+4], al
pop	esi
add	esp, 28h
retn	4
sub_68DD40 endp

align 10h



sub_68DDB0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	esi
mov	esi, [ecx+34h]
sub	esi, [ecx+30h]
add	esi, [ecx+2Ch]
call	sub_6A9860
sub	eax, esi
pop	esi
retn	8
sub_68DDB0 endp

align 10h



sub_68DDD0 proc	near

arg_0= dword ptr  4

mov	cl, [ecx+4]
mov	eax, [esp+arg_0]
and	cl, 5Fh
mov	[eax], cl
retn	4
sub_68DDD0 endp

align 10h



sub_68DDE0 proc	near
mov	al, [ecx+4]
mov	edx, 1
test	al, al
jns	short loc_68DDF1
mov	edx, 5

loc_68DDF1:
movzx	ax, byte ptr [ecx+edx+5]
movzx	cx, byte ptr [ecx+edx+4]
shl	ax, 8
or	ax, cx
retn
sub_68DDE0 endp

align 10h



sub_68DE10 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_68DE2C
mov	ecx, esi
call	sub_6A9C60

loc_68DE2C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	bl, [eax+ecx]
mov	edx, [esi+34h]
sub	edx, [esi+30h]
inc	eax
mov	[esi+2Ch], eax
lea	eax, [edx+eax-1]
push	eax
mov	ecx, esi
call	sub_6A9D50
movzx	eax, bl
pop	esi
shr	eax, 7
pop	ebx
retn	4
sub_68DE10 endp

align 10h



sub_68DE60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	cl, [eax+4]
mov	[eax], cl
mov	dword ptr [eax+1], 0
retn	4
sub_68DE60 endp

align 10h



sub_68DE80 proc	near

arg_0= dword ptr  4

mov	dl, [ecx+4]
mov	eax, 1
test	dl, dl
jns	short loc_68DE91
mov	eax, 5

loc_68DE91:
mov	al, [ecx+eax+4]
mov	cl, al
and	cl, 0FEh
add	cl, cl
and	al, 1
or	cl, al
mov	eax, [esp+arg_0]
shl	cl, 5
and	dl, 5Fh
or	cl, dl
mov	[eax], cl
retn	4
sub_68DE80 endp

align 10h



sub_68DEC0 proc	near
mov	al, [ecx+4]
mov	edx, 1
test	al, al
jns	short loc_68DED1
mov	edx, 5

loc_68DED1:
movzx	ax, byte ptr [ecx+edx+6]
movzx	cx, byte ptr [ecx+edx+5]
inc	edx
shl	ax, 8
or	ax, cx
retn
sub_68DEC0 endp

align 10h



sub_68DEF0 proc	near
mov	al, [ecx+4]
mov	cl, al
shr	cl, 1
and	cl, 1
and	al, 1
test	cl, cl
jz	short loc_68DF0A
test	al, al
jz	short loc_68DF14
mov	eax, 2
retn

loc_68DF0A:
test	al, al
jz	short loc_68DF14
mov	eax, 1
retn

loc_68DF14:
xor	eax, eax
retn
sub_68DEF0 endp

align 10h



sub_68DF20 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+324h]
mov	ebp, ecx
test	esi, esi
jnz	short loc_68DF36
lea	esi, [edi+28h]

loc_68DF36:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_68DF4E
push	2
mov	ecx, esi
call	sub_6A9B70

loc_68DF4E:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
mov	[ebp+4], cx
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_68DF81
lea	esi, [edi+28h]

loc_68DF81:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_68DF99
push	2
mov	ecx, esi
call	sub_6A9B70

loc_68DF99:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
pop	edi
mov	[esi+2Ch], eax
pop	esi
mov	[ebp+6], cx
pop	ebp
retn	4
sub_68DF20 endp

align 10h



sub_68DFD0 proc	near

arg_0= dword ptr  4

movzx	edx, word ptr [ecx+4]
push	ecx
mov	eax, esp
mov	[eax], edx
movzx	eax, word ptr [ecx+6]
mov	ecx, [esp+4+arg_0]
push	eax
call	sub_67F3D0
retn	4
sub_68DFD0 endp

align 10h



sub_68DFF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+324h]
push	edi
mov	edi, ecx
test	esi, esi
jnz	short loc_68E005
lea	esi, [eax+28h]

loc_68E005:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_68E01D
push	2
mov	ecx, esi
call	sub_6A9B70

loc_68E01D:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
mov	[edi+4], cx
pop	edi
pop	esi
retn	4
sub_68DFF0 endp

align 10h



sub_68E050 proc	near

arg_0= dword ptr  4

push	ecx
mov	eax, esp
mov	dword ptr [eax], 40000h
movzx	eax, word ptr [ecx+4]
mov	ecx, [esp+4+arg_0]
push	eax
call	sub_67F3D0
retn	4
sub_68E050 endp

align 10h



sub_68E070 proc	near
cmp	dword ptr [ecx+7D4h], 64h
jnz	short loc_68E09E
inc	dword ptr [ecx+7D0h]
mov	eax, [ecx+7D0h]
mov	dword ptr [ecx+7D4h], 63h
cmp	eax, 64h
jnz	short loc_68E09E
mov	dword ptr [ecx+7D0h], 0

loc_68E09E:
mov	edx, [ecx+7D4h]
mov	eax, [ecx+7D0h]
add	eax, edx
cmp	eax, 64h
jb	short loc_68E0B4
sub	eax, 64h

loc_68E0B4:
inc	edx
lea	eax, [eax+eax*4]
mov	[ecx+7D4h], edx
lea	eax, [ecx+eax*4]
retn
sub_68E070 endp

align 10h



sub_68E0D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_0]
cmp	ecx, 4
jnb	short locret_68E0FF
mov	edx, 1
shl	edx, cl
or	[eax+7F8h], edx
mov	edx, [esp+arg_4]
fld	dword ptr [edx]
fstp	dword ptr [eax+ecx*8+7D8h]
fld	dword ptr [edx+4]
fstp	dword ptr [eax+ecx*8+7DCh]

locret_68E0FF:
retn	8
sub_68E0D0 endp

align 10h



sub_68E110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= word ptr	 0Ch
arg_C= byte ptr	 10h

fld	ds:flt_15FD4F4
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [esp+8+arg_4]
fcomp	dword ptr [esi]
mov	edx, ecx
fnstsw	ax
test	ah, 44h
jnp	short loc_68E13C
mov	eax, 1
mov	ecx, ebx
shl	eax, cl
not	eax
and	[edx+7F8h], eax

loc_68E13C:
mov	ecx, edx
call	sub_68E070
mov	cx, [esp+8+arg_8]
mov	dl, [esp+8+arg_C]
mov	dword ptr [eax], 0
mov	[eax+10h], bl
fld	dword ptr [esi]
fstp	dword ptr [eax+4]
fld	dword ptr [esi+4]
pop	esi
fstp	dword ptr [eax+8]
mov	[eax+0Ch], cx
mov	[eax+0Fh], dl
pop	ebx
retn	10h
sub_68E110 endp

align 10h



sub_68E170 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

fld	ds:flt_15FD4F4
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [esp+8+arg_4]
fcomp	dword ptr [esi]
mov	edx, ecx
fnstsw	ax
test	ah, 44h
jnp	short loc_68E19C
mov	eax, 1
mov	ecx, ebx
shl	eax, cl
not	eax
and	[edx+7F8h], eax

loc_68E19C:
mov	ecx, edx
call	sub_68E070
mov	cl, [esp+8+arg_8]
mov	dword ptr [eax], 0
mov	[eax+10h], bl
fld	dword ptr [esi]
fstp	dword ptr [eax+4]
xor	edx, edx
fld	dword ptr [esi+4]
pop	esi
fstp	dword ptr [eax+8]
mov	[eax+0Eh], cl
mov	[eax+0Ch], dx
mov	byte ptr [eax+0Fh], 20h
pop	ebx
retn	0Ch
sub_68E170 endp

align 10h



sub_68E1D0 proc	near
mov	eax, [ecx+7D4h]
push	esi
test	eax, eax
jnz	loc_68E28E
push	ebx
push	edi
xor	ebx, ebx
mov	edi, 1
lea	esi, [ecx+7DCh]
mov	edi, edi

loc_68E1F0:
test	[ecx+7F8h], edi
jz	short loc_68E271
cmp	dword ptr [ecx+7D4h], 64h
jnz	short loc_68E226
inc	dword ptr [ecx+7D0h]
mov	eax, [ecx+7D0h]
mov	dword ptr [ecx+7D4h], 63h
cmp	eax, 64h
jnz	short loc_68E226
mov	dword ptr [ecx+7D0h], 0

loc_68E226:
mov	edx, [ecx+7D4h]
mov	eax, [ecx+7D0h]
add	eax, edx
cmp	eax, 64h
jb	short loc_68E23C
sub	eax, 64h

loc_68E23C:
lea	eax, [eax+eax*4]
lea	eax, [ecx+eax*4]
inc	edx
mov	[ecx+7D4h], edx
mov	dword ptr [eax], 0
mov	[eax+10h], bl
fld	dword ptr [esi-4]
fstp	dword ptr [eax+4]
xor	edx, edx
fld	dword ptr [esi]
mov	[eax+0Ch], dx
fstp	dword ptr [eax+8]
mov	byte ptr [eax+0Fh], 40h
mov	eax, edi
not	eax
and	[ecx+7F8h], eax

loc_68E271:
inc	ebx
add	esi, 8
add	edi, edi
cmp	ebx, 4
jb	loc_68E1F0
mov	eax, [ecx+7D4h]
pop	edi
pop	ebx
test	eax, eax
jnz	short loc_68E28E
pop	esi
retn

loc_68E28E:
mov	esi, [ecx+7D0h]
lea	edx, [esi+1]
dec	eax
mov	[ecx+7D0h], edx
mov	[ecx+7D4h], eax
cmp	edx, 64h
jnz	short loc_68E2B3
mov	dword ptr [ecx+7D0h], 0

loc_68E2B3:
lea	edx, [esi+esi*4]
lea	eax, [ecx+edx*4]
pop	esi
retn
sub_68E1D0 endp

align 10h



sub_68E2C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
push	ecx
lea	ecx, [esi+4]
mov	[esi], eax
call	sub_67AF90
mov	edx, [esp+4+arg_8]
push	edx
lea	ecx, [esi+8]
call	sub_67AF90
mov	eax, esi
pop	esi
retn	0Ch
sub_68E2C0 endp

align 10h



sub_68E2F0 proc	near

arg_0= word ptr	 4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h

call	sub_68E070
mov	cx, [esp+arg_0]
mov	dl, [esp+arg_4]
mov	dword ptr [eax], 1
mov	[eax+0Ah], dl
mov	dl, [esp+arg_C]
mov	[eax+8], cx
mov	dword ptr [eax+4], 0
mov	cl, [esp+arg_8]
mov	[eax+0Bh], cl
mov	[eax+0Ch], dl
mov	byte ptr [eax+0Dh], 1
retn	10h
sub_68E2F0 endp

align 10h



sub_68E330 proc	near

arg_0= word ptr	 4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h

call	sub_68E070
mov	cx, [esp+arg_0]
mov	dl, [esp+arg_4]
mov	dword ptr [eax], 1
mov	[eax+8], cx
xor	ecx, ecx
mov	[eax+0Ah], dl
mov	[eax+4], ecx
mov	dl, [esp+arg_8]
mov	[eax+0Bh], dl
mov	dl, [esp+arg_C]
mov	[eax+0Ch], dl
mov	[eax+0Dh], cl
retn	10h
sub_68E330 endp

align 10h



sub_68E370 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

call	sub_68E070
mov	edx, [esp+arg_0]
mov	dword ptr [eax], 1
xor	ecx, ecx
mov	[eax+8], cx
mov	[eax+0Ah], cl
mov	cl, [esp+arg_4]
mov	[eax+4], edx
mov	byte ptr [eax+0Bh], 80h
mov	[eax+0Ch], cl
mov	byte ptr [eax+0Dh], 1
retn	8
sub_68E370 endp

align 10h



sub_68E3A0 proc	near
mov	ecx, esi
call	sub_679E30
mov	eax, [edi]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
cmp	ecx, 4
jbe	short loc_68E405
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
push	offset a_swf	; ".swf"
lea	edx, [eax+ecx+4]
push	edx		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_68E405
mov	ecx, esi
call	sub_67A720
mov	eax, [edi]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
sub	ecx, 4
push	ecx
add	eax, 8
push	eax
mov	ecx, esi
call	sub_67A0C0
push	0FFFFFFFFh
push	offset a_gfx	; ".gfx"
mov	ecx, esi
call	sub_67A0C0

loc_68E405:
mov	eax, esi
retn
sub_68E3A0 endp

align 10h



sub_68E410 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68E43C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68E43C:
mov	esi, [edi+4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68E45D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68E45D:
pop	edi
pop	esi
pop	ebx
retn
sub_68E410 endp

align 10h



sub_68E470 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [eax+14h]
test	ecx, ecx
jz	short loc_68E491
push	1
call	sub_702500
mov	ecx, [esi+4]
mov	ecx, [ecx+14h]
push	1
call	sub_702640

loc_68E491:
mov	edx, [esi+4]
mov	ecx, [edx+0Ch]
call	sub_66A5F0
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	edx, [eax+50h]
call	edx
mov	[esi+0Ch], eax
pop	esi
retn	4
sub_68E470 endp

align 10h



sub_68E4B0 proc	near

var_8= dword ptr -8
var_4= byte ptr	-4

sub	esp, 8
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+23C4h]
mov	ecx, [esi+0F0h]
mov	[esp+10h+var_8], eax
add	ecx, 8
mov	[esp+10h+var_4], 8
mov	edx, [ecx]
mov	eax, [edx+0Ch]
push	1Ch
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_68E4F4
mov	ecx, [esi+23C4h]
mov	edx, [ebp+0]
mov	edx, [edx+0Ch]
lea	eax, [esp+10h+var_8]
push	eax
push	ecx
mov	ecx, ebp
call	edx

loc_68E4F4:
mov	ecx, [esi+0F0h]
mov	eax, [ecx+8]
mov	edx, [eax+0Ch]
add	ecx, 8
push	ebx
push	22h
call	edx
mov	ebx, eax
test	ebx, ebx
jz	short loc_68E523
mov	eax, [ebx]
mov	edx, [esi+23C4h]
mov	eax, [eax+0Ch]
lea	ecx, [esp+10h+var_4]
push	ecx
push	edx
mov	ecx, ebx
call	eax

loc_68E523:
mov	ecx, [esi+0F0h]
mov	edx, [ecx+8]
mov	eax, [edx+0Ch]
add	ecx, 8
push	edi
push	23h
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_68E559
mov	ecx, [esi+23C4h]
mov	edx, [edi]
mov	edx, [edx+18h]
lea	eax, [esp+18h+var_8]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A430

loc_68E559:
pop	edi
test	ebx, ebx
jz	short loc_68E565
mov	ecx, ebx
call	sub_64A430

loc_68E565:
pop	ebx
test	ebp, ebp
jz	short loc_68E571
mov	ecx, ebp
call	sub_64A430

loc_68E571:
pop	esi
pop	ebp
add	esp, 8
retn
sub_68E4B0 endp

align 10h



sub_68E580 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+28h]
push	esi
xor	eax, eax
push	edi
test	edx, edx
jbe	short loc_68E5A0
mov	esi, [ecx+24h]
mov	edi, [esp+8+arg_0]
mov	ecx, esi

loc_68E594:
cmp	[ecx], edi
jz	short loc_68E5A7
inc	eax
add	ecx, 8
cmp	eax, edx
jb	short loc_68E594

loc_68E5A0:
pop	edi
xor	eax, eax
pop	esi
retn	4

loc_68E5A7:
mov	eax, [esi+eax*8+4]
pop	edi
pop	esi
retn	4
sub_68E580 endp




sub_68E5B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_C]
push	ebp
push	esi
push	edi
xor	edi, edi
xor	esi, esi
mov	ebp, ecx
mov	[esp+1Ch+var_C], edi
cmp	ebx, edi
jnz	short loc_68E605
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	54h
call	edx
cmp	eax, edi
jz	short loc_68E5FD
mov	ecx, [ebp+0F0h]
cmp	ecx, edi
jz	short loc_68E5EA
lea	edi, [ecx+8]

loc_68E5EA:
mov	ecx, [ebp+34h]
mov	edx, [ecx+14h]
push	0
push	edi
push	edx
mov	ecx, eax
call	sub_6FDCA0
jmp	short loc_68E5FF

loc_68E5FD:
xor	eax, eax

loc_68E5FF:
mov	[esp+1Ch+var_C], eax
mov	ebx, eax

loc_68E605:
cmp	[esp+1Ch+arg_0], esi
jz	loc_68E6FF
mov	edi, [esp+1Ch+arg_8]
push	0
push	0
push	0
push	0
push	0
lea	edx, [esp+30h+var_8]
push	edi
push	edx
call	sub_6ACC40
mov	esi, [ebp+20h]
add	esp, 1Ch
mov	ecx, esi
test	esi, esi
jnz	short loc_68E63A
mov	ecx, dword_1855FC0

loc_68E63A:
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	24h
call	edx
test	eax, eax
jz	short loc_68E663
push	0
push	0
push	esi
push	edi
push	2
lea	ecx, [esp+30h+var_8]
push	ecx
mov	ecx, eax
call	sub_6B1E10
mov	edi, eax
test	edi, edi
jnz	short loc_68E690

loc_68E663:
mov	ecx, [esp+1Ch+var_8]
test	ecx, ecx
jz	short loc_68E677
mov	edx, [ecx]
mov	eax, [esp+1Ch+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_68E677:
mov	ecx, [esp+1Ch+var_C]
test	ecx, ecx
jz	short loc_68E684
call	sub_64A430

loc_68E684:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 0Ch
retn	10h

loc_68E690:
mov	eax, [esp+1Ch+arg_4]
mov	ecx, [esp+1Ch+arg_0]
push	eax
push	ecx
mov	ecx, [edi+20h]
push	0
call	sub_6B18E0
push	edi
mov	ecx, ebx
call	sub_6FC3A0
mov	edx, [esi]
mov	eax, [edx+28h]
push	0
push	20h
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_68E6E2
mov	ecx, [ebp+0F0h]
mov	ecx, [ecx+14h]
mov	edx, [ebx+3Ch]
mov	ebx, [ebx+8]
push	0
push	1
push	esi
push	ecx
push	0
push	edx
push	ebx
push	edi
mov	ecx, eax
call	sub_6AF570
mov	esi, eax
jmp	short loc_68E6E4

loc_68E6E2:
xor	esi, esi

loc_68E6E4:
mov	ecx, edi
call	sub_666B00
mov	ecx, [esp+1Ch+var_8]
test	ecx, ecx
jz	short loc_68E6FF
mov	edx, [ecx]
mov	eax, [esp+1Ch+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_68E6FF:
mov	ecx, [esp+1Ch+var_C]
test	ecx, ecx
jz	short loc_68E70C
call	sub_64A430

loc_68E70C:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	10h
sub_68E5B0 endp

align 10h



sub_68E720 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
push	edi
mov	edi, ecx
lea	esi, [ebp+0Ch]
mov	ecx, esi
call	sub_679930
test	eax, eax
jz	loc_68E822
push	esi
lea	ecx, [esp+1Ch+var_8]
mov	[esp+1Ch+var_C], 5
call	sub_67AF90
mov	eax, [esp+18h+arg_8]
push	eax
lea	ecx, [esp+1Ch+var_4]
call	sub_67AF90
lea	ecx, [esp+18h+arg_0]
call	sub_679E30
mov	esi, [esp+18h+arg_4]
lea	ecx, [esp+18h+var_C]
push	ecx
lea	edx, [esp+1Ch+arg_0]
push	edx
mov	ecx, esi
call	sub_6FC480
mov	eax, [esp+18h+arg_0]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
lea	ecx, [esp+1Ch+arg_8]
call	sub_67AE10
mov	eax, [esi+8]
mov	eax, [eax+8]
mov	ecx, [ebp+50h]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
lea	eax, [esp+1Ch+arg_8]
push	eax
call	edx
mov	esi, [esp+18h+arg_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68E7CC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68E7CC:
mov	ecx, [edi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
push	ebx
call	eax
mov	ebx, [ebp+50h]
mov	esi, [ebx]
mov	edi, eax
push	edi
lea	ecx, [ebp+40h]
add	esi, 8
call	sub_652C20
mov	edx, [esi]
push	eax
push	edi
mov	ecx, ebx
call	edx
mov	esi, [esp+1Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
pop	ebx
jnz	short loc_68E819
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68E819:
lea	ecx, [esp+18h+var_C]
call	sub_68E410

loc_68E822:
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	0Ch
sub_68E720 endp

align 10h



sub_68E830 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
push	edi
mov	edi, ecx
lea	esi, [ebp+0Ch]
mov	ecx, esi
call	sub_679930
test	eax, eax
jz	loc_68E932
push	esi
lea	ecx, [esp+1Ch+var_8]
mov	[esp+1Ch+var_C], 6
call	sub_67AF90
mov	eax, [esp+18h+arg_8]
push	eax
lea	ecx, [esp+1Ch+var_4]
call	sub_67AF90
lea	ecx, [esp+18h+arg_0]
call	sub_679E30
mov	esi, [esp+18h+arg_4]
lea	ecx, [esp+18h+var_C]
push	ecx
lea	edx, [esp+1Ch+arg_0]
push	edx
mov	ecx, esi
call	sub_6FC480
mov	eax, [esp+18h+arg_0]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
lea	ecx, [esp+1Ch+arg_8]
call	sub_67AE10
mov	eax, [esi+8]
mov	eax, [eax+8]
mov	ecx, [ebp+64h]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
lea	eax, [esp+1Ch+arg_8]
push	eax
call	edx
mov	esi, [esp+18h+arg_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68E8DC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68E8DC:
mov	ecx, [edi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
push	ebx
call	eax
mov	ebx, [ebp+64h]
mov	esi, [ebx]
mov	edi, eax
push	edi
lea	ecx, [ebp+54h]
add	esi, 8
call	sub_652C20
mov	edx, [esi]
push	eax
push	edi
mov	ecx, ebx
call	edx
mov	esi, [esp+1Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
pop	ebx
jnz	short loc_68E929
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68E929:
lea	ecx, [esp+18h+var_C]
call	sub_68E410

loc_68E932:
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	0Ch
sub_68E830 endp

align 10h



sub_68E940 proc	near

arg_0= dword ptr  4

cmp	dword ptr [ecx+30h], 0
jnz	short loc_68E954
mov	ecx, [esp+arg_0]
call	sub_67A720
xor	al, al
retn	4

loc_68E954:
mov	ecx, [ecx+34h]
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	esi, [esp+4+arg_0]
push	eax
mov	ecx, esi
call	sub_67A2C0
push	esi
call	sub_702B10
add	esp, 4
test	al, al
jnz	short loc_68E985
mov	ecx, esi
call	sub_67A720
xor	al, al
pop	esi
retn	4

loc_68E985:
mov	al, 1
pop	esi
retn	4
sub_68E940 endp

align 10h



sub_68E990 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
lea	eax, [eax+eax*2]
mov	eax, [ecx+eax*4]
push	esi
test	eax, eax
jz	short loc_68E9EB
mov	ecx, [esp+4+arg_4]
mov	esi, [ecx+4]

loc_68E9A6:
cmp	[eax+4], esi
jnz	short loc_68E9E5
mov	edx, [eax+0Ch]
cmp	edx, [ecx+0Ch]
jnz	short loc_68E9E5
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnz	short loc_68E9E5
mov	edx, [eax+2Ch]
cmp	edx, [ecx+2Ch]
jnz	short loc_68E9E5
mov	edx, [eax+20h]
cmp	edx, [ecx+20h]
jnz	short loc_68E9E5
mov	edx, [eax+10h]
cmp	edx, [ecx+10h]
jnz	short loc_68E9E5
test	edx, 20000h
jz	short loc_68E9ED
mov	dx, [eax+18h]
cmp	dx, [ecx+18h]
jz	short loc_68E9ED

loc_68E9E5:
mov	eax, [eax]
test	eax, eax
jnz	short loc_68E9A6

loc_68E9EB:
xor	eax, eax

loc_68E9ED:
pop	esi
retn	8
sub_68E990 endp

align 10h



sub_68EA00 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [eax+8]
test	ecx, ecx
jz	short locret_68EA72 ; default
mov	dl, [ecx+76h]
shr	dl, 4
test	dl, 1
jnz	short locret_68EA72 ; default
mov	edx, [eax+4]
dec	edx
cmp	edx, 3		; switch 4 cases
ja	short locret_68EA72 ; default
push	esi
jmp	ds:off_68EA78[edx*4] ; switch jump

loc_68EA25:		; jumptable 0068EA1E case 0
mov	edx, [ecx]
mov	eax, [eax+0Ch]
pop	esi
mov	[esp+arg_0], eax
mov	edx, [edx+14Ch]
jmp	edx

loc_68EA37:		; jumptable 0068EA1E case 1
mov	edx, [ecx]
add	eax, 10h
pop	esi
mov	[esp+arg_0], eax
mov	eax, [edx+150h]
jmp	eax

loc_68EA49:		; jumptable 0068EA1E case 2
mov	edx, [ecx]
lea	esi, [eax+30h]
add	eax, 20h
push	esi
push	eax
mov	eax, [edx+154h]
call	eax
pop	esi
retn	4

loc_68EA5F:		; jumptable 0068EA1E case 3
mov	edx, [ecx]
mov	edx, [edx+158h]
lea	esi, [eax+30h]
mov	eax, [eax+2Ch]
push	esi
push	eax
call	edx
pop	esi

locret_68EA72:		; default
retn	4
sub_68EA00 endp

align 4
off_68EA78 dd offset loc_68EA25	; jump table for switch	statement
dd offset loc_68EA37
dd offset loc_68EA49
dd offset loc_68EA5F
align 10h



sub_68EA90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	esi, ecx
mov	ecx, [esi+2844h]
push	edi
push	ebx
call	sub_6B2EE0
mov	ecx, [esi+2848h]
push	edi
push	ebx
call	sub_6B2EE0
pop	edi
pop	esi
pop	ebx
retn	8
sub_68EA90 endp

align 10h



; int __stdcall	sub_68EAC0(int,	float)
sub_68EAC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+2474h]
shr	eax, 13h
push	esi
test	al, 1
jz	loc_68EB72
xor	ebx, ebx
mov	[ebp+2808h], ebx
and	dword ptr [ebp+2474h], 0FFF7FFFFh
mov	esi, [ebp+2804h]
cmp	esi, ebx
jz	loc_68EBBA
push	edi
jmp	short loc_68EB00
align 10h

loc_68EB00:
mov	cl, [esi+76h]
and	dword ptr [esi+0A0h], 0FFF7FFFFh
mov	edi, [esi+84h]
shr	cl, 6
not	cl
mov	[esi+8Ch], ebx
test	cl, 1
jz	short loc_68EB65
mov	edx, [esi]
mov	eax, [edx+124h]
push	ebx
mov	ecx, esi
call	eax
cmp	eax, 1
jnz	short loc_68EB3D
push	ebp
mov	ecx, esi
call	sub_655A50

loc_68EB3D:
mov	eax, [esp+10h+arg_0]
test	al, al
jnz	short loc_68EB53
mov	ecx, [esi+0A0h]
shr	ecx, 12h
test	cl, 1
jz	short loc_68EB65

loc_68EB53:
fld	[esp+10h+arg_4]
mov	edx, [esi]
push	ecx
fstp	[esp+14h+var_14]
push	eax
mov	eax, [edx+7Ch]
mov	ecx, esi
call	eax

loc_68EB65:
mov	esi, edi
cmp	edi, ebx
jnz	short loc_68EB00
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_68EB72:
mov	ecx, [ebp+2808h]
test	ecx, ecx
jz	short loc_68EBBA
mov	ebx, [esp+0Ch+arg_0]

loc_68EB80:
mov	dl, [ecx+76h]
mov	esi, [ecx+8Ch]
shr	dl, 6
not	dl
test	dl, 1
jz	short loc_68EBB4
test	bl, bl
jnz	short loc_68EBA4
mov	eax, [ecx+0A0h]
shr	eax, 12h
test	al, 1
jz	short loc_68EBB4

loc_68EBA4:
mov	edx, [ecx]
fld	[esp+0Ch+arg_4]
mov	eax, [edx+7Ch]
push	ecx
fstp	[esp+10h+var_10]
push	ebx
call	eax

loc_68EBB4:
mov	ecx, esi
test	esi, esi
jnz	short loc_68EB80

loc_68EBBA:
pop	esi
pop	ebp
pop	ebx
retn	8
sub_68EAC0 endp




sub_68EBC0 proc	near
push	esi
mov	esi, ecx
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68EC00
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_68EBE0
call	sub_64A420

loc_68EBE0:
push	edi
mov	edi, [esi+14h]
test	esi, esi
jz	short loc_68EBF2
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_68EBF2:
test	edi, edi
jz	short loc_68EBFF
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A430

loc_68EBFF:
pop	edi

loc_68EC00:
pop	esi
retn
sub_68EBC0 endp

align 10h



sub_68EC10 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
cmp	dword ptr [ecx+30h], 0
jnz	short loc_68EC21
xor	al, al
add	esp, 10h
retn	0Ch

loc_68EC21:
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	ebx
push	esi
call	edx
mov	edx, [esp+18h+arg_0]
mov	esi, eax
mov	[esp+18h+var_10], 0
mov	eax, [esi+78h]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
push	0
push	0
push	0
mov	[esp+24h+arg_0], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, esi
call	sub_6726F0
mov	bl, al
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68EC7F
call	sub_650DF0

loc_68EC7F:
test	bl, bl
jz	short loc_68ECBA
push	esi
lea	ecx, [esp+1Ch+var_10]
call	sub_651BB0
test	eax, eax
jz	short loc_68ECBA
mov	ecx, [esp+18h+arg_8]
mov	edx, [eax]
mov	edx, [edx+110h]
push	ecx
mov	ecx, [esp+1Ch+arg_4]
push	ecx
mov	ecx, eax
call	edx
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	esi
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch

loc_68ECBA:
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	esi
xor	al, al
pop	ebx
add	esp, 10h
retn	0Ch
sub_68EC10 endp

align 10h



sub_68ECD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx+24A4h]
xor	edx, edx
test	esi, esi
jbe	short loc_68ED14
mov	ecx, [ecx+24A0h]
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, ecx
push	ebx
jmp	short loc_68ECF0
align 10h

loc_68ECF0:
cmp	dword ptr [eax], 0
jz	short loc_68ECFC
mov	ebx, [eax]
cmp	[ebx+30h], edi
jz	short loc_68ED0A

loc_68ECFC:
inc	edx
add	eax, 4
cmp	edx, esi
jb	short loc_68ECF0
pop	ebx
pop	edi
pop	esi
retn	4

loc_68ED0A:
mov	ecx, [ecx+edx*4]
call	sub_6A8F70
pop	ebx
pop	edi

loc_68ED14:
pop	esi
retn	4
sub_68ECD0 endp

align 10h



sub_68ED20 proc	near
fldz
xor	eax, eax
fst	dword ptr [ecx+94Ch]
mov	[ecx+950h], eax
fst	dword ptr [ecx+948h]
mov	[ecx+944h], eax
mov	[ecx+940h], eax
mov	dl, 0E0h
and	[ecx+954h], dl
mov	[ecx+974h], eax
mov	[ecx+968h], eax
mov	[ecx+964h], eax
fst	dword ptr [ecx+970h]
fst	dword ptr [ecx+96Ch]
and	[ecx+978h], dl
mov	[ecx+998h], eax
mov	[ecx+98Ch], eax
mov	[ecx+988h], eax
fst	dword ptr [ecx+994h]
fst	dword ptr [ecx+990h]
and	[ecx+99Ch], dl
mov	[ecx+9BCh], eax
mov	[ecx+9B0h], eax
mov	[ecx+9ACh], eax
fst	dword ptr [ecx+9B8h]
fstp	dword ptr [ecx+9B4h]
and	[ecx+9C0h], dl
retn
sub_68ED20 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_68FF50

loc_68EDC0:
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0CCh], 0
push	edi
jnz	short loc_68EDF2
mov	ecx, [esi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	40h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_68EDEA
mov	ecx, edi	; void *
call	sub_64F7C0
jmp	short loc_68EDEC

loc_68EDEA:
xor	edi, edi

loc_68EDEC:
mov	[esi+0CCh], edi

loc_68EDF2:
cmp	dword ptr [esi+0C8h], 0
jnz	short loc_68EE20
mov	ecx, [esi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	40h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_68EE18
mov	ecx, edi	; void *
call	sub_64F7C0
jmp	short loc_68EE1A

loc_68EE18:
xor	edi, edi

loc_68EE1A:
mov	[esi+0C8h], edi

loc_68EE20:
mov	eax, [esi+8]
mov	edx, [eax+0Ch]
lea	edi, [esi+8]
push	ebx
push	1
mov	ecx, edi
call	edx
mov	ebx, eax
test	ebx, ebx
jz	short loc_68EEAF
push	ebp
mov	ebp, [ebx+0Ch]
test	ebp, ebp
jz	short loc_68EE45
mov	ecx, ebp
call	sub_64A420

loc_68EE45:
mov	ecx, ebx
call	sub_64A430
test	ebp, ebp
jz	short loc_68EEAE
mov	ecx, ebp
call	sub_64A430
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	1
mov	ecx, edi
call	edx
mov	ebx, eax
test	ebx, ebx
jz	short loc_68EED2
mov	edi, [ebx+0Ch]
test	edi, edi
jz	short loc_68EE76
mov	ecx, edi
call	sub_64A420

loc_68EE76:
mov	ecx, ebx
call	sub_64A430

loc_68EE7D:
fld	dword ptr [esi+0ECh]
mov	edx, [esi+0CCh]
mov	eax, [edi]
push	0
push	ecx
mov	ecx, [esi+0C8h]
fstp	[esp+30h+var_30]
push	ecx
push	edx
mov	edx, [eax+60h]
lea	ecx, [esi+90h]
push	ecx
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A430

loc_68EEAE:
pop	ebp

loc_68EEAF:
xor	edi, edi
pop	ebx
cmp	[esi+28h], edi
jbe	short loc_68EECF

loc_68EEB7:
mov	eax, [esi+24h]
mov	ecx, [eax+edi*8+4]
test	ecx, ecx
jz	short loc_68EEC9
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax

loc_68EEC9:
inc	edi
cmp	edi, [esi+28h]
jb	short loc_68EEB7

loc_68EECF:
pop	edi
pop	esi
retn

loc_68EED2:
xor	edi, edi
jmp	short loc_68EE7D
; END OF FUNCTION CHUNK	FOR sub_68FF50
align 10h



sub_68EEE0 proc	near

var_98=	dword ptr -98h
var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 80h
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+0CCh], 0
mov	ecx, [eax+48h]
push	ebp
mov	ebp, [ecx+0Ch]
push	esi
jz	short loc_68EF0B
cmp	dword ptr [ebx+0C8h], 0
jnz	loc_68EFBC

loc_68EF0B:
push	edi
lea	ecx, [esp+90h+var_80] ;	void *
call	sub_64F7C0
lea	ecx, [esp+90h+var_40] ;	void *
call	sub_64F7C0
fld	dword ptr [ebx+0ECh]
mov	edx, [ebp+0]
mov	edx, [edx+60h]
push	0
push	ecx
fstp	[esp+98h+var_98]
lea	eax, [esp+98h+var_40]
push	eax
lea	ecx, [esp+9Ch+var_80]
push	ecx
lea	eax, [ebx+90h]
push	eax
mov	ecx, ebp
call	edx
cmp	dword ptr [ebx+0CCh], 0
jnz	short loc_68EF80
mov	ecx, [ebx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	40h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_68EF6D
mov	ecx, esi	; void *
call	sub_64F7C0
mov	edi, esi
jmp	short loc_68EF6F

loc_68EF6D:
xor	edi, edi

loc_68EF6F:
mov	ecx, 10h
lea	esi, [esp+90h+var_80]
mov	[ebx+0CCh], edi
rep movsd

loc_68EF80:
cmp	dword ptr [ebx+0C8h], 0
jnz	short loc_68EFBB
mov	ecx, [ebx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	40h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_68EFA8
mov	ecx, esi	; void *
call	sub_64F7C0
mov	edi, esi
jmp	short loc_68EFAA

loc_68EFA8:
xor	edi, edi

loc_68EFAA:
mov	ecx, 10h
lea	esi, [esp+90h+var_40]
mov	[ebx+0C8h], edi
rep movsd

loc_68EFBB:
pop	edi

loc_68EFBC:
mov	eax, [ebx+0CCh]
mov	esi, [esp+8Ch+arg_0]
mov	[esi+10h], eax
mov	edx, [ebp+0]
mov	eax, [ebx+0CCh]
mov	edx, [edx+58h]
push	eax
mov	ecx, ebp
call	edx
mov	eax, [ebx+0CCh]
mov	ecx, [ebx+0C8h]
mov	[ebx+0E4h], eax
mov	[esi+0Ch], ecx
mov	edx, [ebp+0]
mov	eax, [ebx+0C8h]
mov	edx, [edx+54h]
push	eax
mov	ecx, ebp
call	edx
mov	eax, [ebx+0C8h]
pop	esi
pop	ebp
mov	[ebx+0E0h], eax
pop	ebx
add	esp, 80h
retn	4
sub_68EEE0 endp

align 10h



sub_68F020 proc	near
mov	eax, [ecx+2474h]
shr	eax, 14h
and	eax, 1
retn
sub_68F020 endp

align 10h



; int __stdcall	sub_68F030(int,	unsigned int CurrentState)
sub_68F030 proc	near

NewValue= dword	ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
CurrentState= dword ptr	 8

sub	esp, 18h
push	ebx
push	edi
mov	edi, ecx
cmp	dword ptr [edi+30h], 0
jz	loc_68F14B
mov	ebx, [esp+20h+arg_0]
test	ebx, ebx
jz	loc_68F14B
push	esi
push	0		; Mask
lea	eax, [esp+28h+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+34h+var_14]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	ecx, [edi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
add	esp, 18h
call	eax
mov	edx, [esp+24h+CurrentState]
mov	esi, eax
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
push	edx
call	sub_651000
push	0
push	0
push	0
mov	[esp+30h+arg_0], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+34h+var_10]
push	eax
lea	ecx, [esp+38h+arg_0]
push	ecx
mov	ecx, esi
mov	[esp+3Ch+var_10], 0
call	sub_6726F0
test	al, al
jz	short loc_68F10A
push	ebx
lea	edx, [esp+28h+var_10]
push	edx
push	esi
mov	ecx, edi
call	sub_64BBC0
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68F0E8
call	sub_650DF0

loc_68F0E8:
mov	eax, [esp+24h+NewValue]
push	30000h		; Mask
push	eax		; NewValue
lea	ecx, [esp+2Ch+CurrentState]
push	ecx		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	esi
pop	edi
mov	al, 1
pop	ebx
add	esp, 18h
retn	8

loc_68F10A:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68F129
call	sub_650DF0

loc_68F129:
mov	edx, [esp+24h+NewValue]
push	30000h		; Mask
push	edx		; NewValue
lea	eax, [esp+2Ch+CurrentState]
push	eax		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	esi
pop	edi
xor	al, al
pop	ebx
add	esp, 18h
retn	8

loc_68F14B:
pop	edi
xor	al, al
pop	ebx
add	esp, 18h
retn	8
sub_68F030 endp

align 10h



sub_68F160 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 14h
cmp	dword ptr [ecx+30h], 0
jnz	short loc_68F171
xor	eax, eax
add	esp, 14h
retn	4

loc_68F171:
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	esi
call	edx
mov	edx, [esp+18h+arg_0]
mov	esi, eax
mov	eax, [esi+78h]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
push	0
push	0
push	0
mov	[esp+24h+var_14], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+var_14]
push	ecx
mov	ecx, esi
mov	[esp+30h+var_10], 0
call	sub_6726F0
test	al, al
jz	short loc_68F20C
cmp	[esp+18h+var_10], 6
jnz	short loc_68F20C
push	esi
lea	ecx, [esp+1Ch+var_10]
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_68F20C
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 7
jnz	short loc_68F20C
mov	esi, [esi+3Ch]
lea	ecx, [esp+18h+var_10]
call	sub_652830
mov	eax, [esp+18h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68F203
call	sub_650DF0

loc_68F203:
mov	eax, esi
pop	esi
add	esp, 14h
retn	4

loc_68F20C:
lea	ecx, [esp+18h+var_10]
call	sub_652830
mov	eax, [esp+18h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68F22B
call	sub_650DF0

loc_68F22B:
xor	eax, eax
pop	esi
add	esp, 14h
retn	4
sub_68F160 endp

align 10h



sub_68F240 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
cmp	dword ptr [ecx+30h], 0
jnz	short loc_68F24D
xor	al, al
pop	ecx
retn	4

loc_68F24D:
mov	ecx, [ecx+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	ebx
push	esi
call	edx
mov	edx, [esp+0Ch+arg_0]
mov	esi, eax
mov	eax, [esi+78h]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
mov	[esp+0Ch+var_4], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+10h+var_4]
push	eax
mov	ecx, esi
call	sub_66FDB0
mov	bl, al
mov	eax, [esp+0Ch+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_68F29B
call	sub_650DF0

loc_68F29B:
pop	esi
mov	al, bl
pop	ebx
pop	ecx
retn	4
sub_68F240 endp

align 10h



sub_68F2B0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
test	bl, bl
jnz	short loc_68F2EE
push	ebp
lea	esi, [edi+9D4h]
mov	ebp, 4
lea	esp, [esp+0]

loc_68F2D0:
mov	ecx, esi
call	sub_6A7870
add	esi, 67Ch
sub	ebp, 1
jnz	short loc_68F2D0
mov	ecx, edi
call	sub_68ED20
pop	ebp
test	bl, bl
jz	short loc_68F2FA

loc_68F2EE:
or	dword ptr [edi+2474h], 40000h
jmp	short loc_68F304

loc_68F2FA:
and	dword ptr [edi+2474h], 0FFFBFFFFh

loc_68F304:
mov	eax, [edi+8]
mov	edx, [eax+0Ch]
lea	ecx, [edi+8]
push	1Bh
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_68F328
mov	eax, [esi]
mov	edx, [eax+44h]
push	edi
mov	ecx, esi
call	edx
mov	ecx, esi
call	sub_64A430

loc_68F328:
pop	edi
pop	esi
pop	ebx
retn	4
sub_68F2B0 endp

align 10h



sub_68F330 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 8Ch
push	ebx
push	edi
mov	edi, [esp+94h+arg_0]
mov	eax, [edi+4]
mov	edx, [edi]
mov	[esp+94h+var_7C], eax
mov	eax, [edi+8]
mov	[esp+94h+var_88], eax
mov	eax, [ecx+247Ch]
xor	ebx, ebx
mov	[esp+94h+var_80], ecx
mov	[esp+94h+var_8C], edx
mov	[esp+94h+var_84], eax
test	eax, eax
jbe	loc_68F3EC
push	ebp
push	esi
jmp	short loc_68F374
align 10h

loc_68F370:
mov	ecx, [esp+9Ch+var_80]

loc_68F374:
mov	ecx, [ecx+2478h]
mov	esi, [ecx+ebx*4]
mov	ebp, [esi+20h]
lea	ecx, [esp+9Ch+var_78]
call	sub_64E8E0
lea	edx, [esp+9Ch+var_78]
push	edx
mov	ecx, ebp
call	sub_654AF0
mov	ebp, [esi+20h]
lea	ecx, [esp+9Ch+var_60]
call	sub_68CFB0
lea	eax, [esp+9Ch+var_60]
push	eax
mov	ecx, ebp
call	sub_654BB0
mov	ebp, [esi+20h]
lea	ecx, [esp+9Ch+var_40] ;	void *
call	sub_64F7C0
lea	ecx, [esp+9Ch+var_40]
push	ecx
mov	ecx, ebp
call	sub_654C80
lea	edx, [esp+9Ch+var_40]
lea	eax, [esp+9Ch+var_78]
lea	ecx, [esp+9Ch+var_60]
mov	[edi+4], eax
mov	[edi], ecx
mov	[edi+8], edx
mov	edx, [esi]
mov	eax, [edx+74h]
push	edi
mov	ecx, esi
call	eax
inc	ebx
cmp	ebx, [esp+9Ch+var_84]
jb	short loc_68F370
pop	esi
pop	ebp

loc_68F3EC:
mov	ecx, [esp+94h+var_7C]
mov	edx, [esp+94h+var_8C]
mov	eax, [esp+94h+var_88]
mov	[edi+4], ecx
mov	[edi], edx
mov	[edi+8], eax
pop	edi
pop	ebx
add	esp, 8Ch
retn	4
sub_68F330 endp

align 10h



sub_68F410 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	ebx, ecx
push	edi
mov	edi, [ebx+2810h]
test	edi, edi
jnz	short loc_68F457
mov	ecx, [ebx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	2Ch
call	edx
test	eax, eax
jz	short loc_68F449
mov	esi, [esp+0Ch+arg_0]
mov	ecx, 0Bh
mov	edi, eax
rep movsd
pop	edi
pop	esi
mov	[ebx+2810h], eax
pop	ebx
retn	4

loc_68F449:
pop	edi
xor	eax, eax
pop	esi
mov	[ebx+2810h], eax
pop	ebx
retn	4

loc_68F457:
mov	esi, [esp+0Ch+arg_0]
mov	ecx, 0Bh
rep movsd
pop	edi
pop	esi
pop	ebx
retn	4
sub_68F410 endp

align 10h



sub_68F470 proc	near

arg_0= byte ptr	 4

mov	eax, [ecx+2474h]
shr	eax, 0Ah
and	al, 1
cmp	[esp+arg_0], 0
jz	short locret_68F48C
and	dword ptr [ecx+2474h], 0FFFFFBFFh

locret_68F48C:
retn	4
sub_68F470 endp

align 10h



sub_68F490 proc	near

var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_4= dword ptr -4

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+8]
mov	edx, [eax+0Ch]
lea	ecx, [edi+8]
push	24h
call	edx
mov	esi, eax
test	esi, esi
jz	loc_68F5AD
push	ebx
mov	ecx, esi
call	sub_64A430
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_68F53A
push	ebp
call	sub_6B2200
push	0
push	3E8h
push	edx
push	eax
call	__aulldiv
mov	ebx, eax
sub	ebx, [edi+2490h]
mov	ebp, edx
sbb	ebp, [edi+2494h]
lea	ecx, [esp+68h+var_54]
push	ebp
push	ebx
call	sub_6A2AA0
lea	ecx, [esp+68h+var_54]
call	sub_6A2C40
mov	ecx, [esp+68h+var_3C]
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	offset aTimer	; "timer"
mov	ecx, esi
call	edx
lea	ecx, [esp+68h+var_54]
mov	[esp+68h+var_48], offset off_143A4DC
call	sub_6A2180
mov	edx, ebp
pop	ebp
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_68F53A:
lea	ecx, [esp+64h+var_58]
call	sub_679E30
mov	eax, [esi]
mov	edx, [eax+4]
lea	ecx, [esp+64h+var_58]
push	ecx
push	offset aTimer	; "timer"
mov	ecx, esi
call	edx
mov	eax, [esp+64h+var_58]
and	eax, 0FFFFFFFCh
push	0Ah		; Radix
add	eax, 8
push	0		; EndPtr
push	eax		; String
call	__strtoui64
mov	esi, [esp+70h+var_58]
add	esp, 0Ch
mov	edi, eax
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
mov	ebx, edx
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68F597
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68F597:
mov	edx, ebx
pop	ebx
mov	eax, edi
pop	edi
pop	esi
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_68F5AD:
call	sub_6B2200
push	0
push	3E8h
push	edx
push	eax
call	__aulldiv
sub	eax, [edi+2490h]
mov	ecx, [esp+60h+var_4]
sbb	edx, [edi+2494h]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn
sub_68F490 endp

align 10h



sub_68F5E0 proc	near
mov	eax, [ecx+14h]
mov	ecx, [eax+0Ch]
jmp	sub_66A5A0
sub_68F5E0 endp

align 10h



sub_68F5F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebp
mov	ebp, [esp+4+arg_0]
push	edi
push	0
mov	edi, ecx
mov	ecx, [esp+0Ch+arg_4]
push	eax
push	ecx
mov	ecx, ebp
call	sub_6AEA50
test	al, al
jz	short loc_68F616
pop	edi
mov	al, 1
pop	ebp
retn	0Ch

loc_68F616:
push	ebx
push	esi
mov	esi, [edi+3Ch]
add	edi, 38h
mov	ebx, ebp
cmp	esi, edi
jz	short loc_68F657

loc_68F624:
mov	ecx, [esi+0Ch]
cmp	ecx, ebp
jz	short loc_68F650
push	ebx
call	sub_6ABA00
test	al, al
jz	short loc_68F650
mov	edx, [esp+10h+arg_8]
mov	eax, [esp+10h+arg_4]
mov	ecx, [esi+0Ch]
push	0
push	edx
push	eax
call	sub_6AEA50
test	al, al
jnz	short loc_68F660
mov	ebx, [esi+0Ch]

loc_68F650:
mov	esi, [esi+4]
cmp	esi, edi
jnz	short loc_68F624

loc_68F657:
pop	esi
pop	ebx
pop	edi
xor	al, al
pop	ebp
retn	0Ch

loc_68F660:
pop	esi
pop	ebx
pop	edi
mov	al, 1
pop	ebp
retn	0Ch
sub_68F5F0 endp

align 10h



sub_68F670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, ecx
xor	ecx, ecx
mov	[edi], eax
xor	edx, edx
mov	[edi+4], ecx
mov	byte ptr [esp+20h+var_8+2], cl
mov	word ptr [esp+20h+var_8], dx
mov	byte ptr [esp+20h+var_8+3], 0FFh
mov	eax, [esp+20h+var_8]
mov	byte ptr [esp+20h+var_4], cl
mov	byte ptr [esp+20h+var_4+1], cl
mov	ecx, [esp+20h+var_4]
mov	[edi+8], eax
xor	ebx, ebx
mov	[edi+0Ch], ecx
cmp	[esi+0Ch], ebx
jz	short loc_68F6B8
inc	dword ptr [esi+8]

loc_68F6B8:
mov	ecx, [esi+8]
mov	edx, [esi]
mov	[esi+0Ch], ebx
movzx	eax, byte ptr [edx+ecx+3]
movzx	ebp, byte ptr [edx+ecx+2]
shl	eax, 8
or	eax, ebp
movzx	ebp, byte ptr [edx+ecx+1]
shl	eax, 8
or	eax, ebp
movzx	ebp, byte ptr [edx+ecx]
shl	eax, 8
add	ecx, 4
or	eax, ebp
mov	[esi+8], ecx
test	dword ptr [edi], 20000h
mov	ebp, eax
jz	short loc_68F707
mov	[esi+0Ch], ebx
mov	dl, [ecx+edx]
movzx	dx, dl
inc	ecx
mov	[esi+8], ecx
mov	[edi+8], dx
lea	ebp, [eax-1]

loc_68F707:
call	sub_669C90
mov	ecx, [edi+10h]
mov	ebx, eax
test	ecx, ecx
jz	short loc_68F71A
call	sub_64A430

loc_68F71A:
push	ebp
push	esi
mov	ecx, ebx
mov	[edi+10h], ebx
call	sub_667F30
mov	eax, [edi+10h]
mov	eax, [eax+0Ch]
cmp	ebp, eax
jz	short loc_68F762
jbe	short loc_68F75D
sub	ebp, eax
mov	edx, ebp
jz	short loc_68F762
mov	ecx, [esi+0Ch]
mov	eax, [esi+8]
mov	edi, edi

loc_68F740:
test	ecx, ecx
jz	short loc_68F745
inc	eax

loc_68F745:
xor	ecx, ecx
inc	eax
sub	edx, 1
jnz	short loc_68F740
pop	edi
mov	[esi+0Ch], edx
mov	[esi+8], eax
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_68F75D:
sub	ebp, eax
add	[esi+8], ebp

loc_68F762:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_68F670 endp

align 10h



sub_68F770 proc	near
mov	eax, ecx
mov	dword ptr [eax], offset	off_143753C
mov	byte ptr [eax+4], 0
retn
sub_68F770 endp

align 10h



; int __thiscall sub_68F780(void *, char)
sub_68F780 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1432C80
jz	short loc_68F799
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_68F799:
mov	eax, esi
pop	esi
retn	4
sub_68F780 endp

align 10h



sub_68F7A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [ecx+1BCh]
test	eax, eax
jnz	short loc_68F82C
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	esi, eax
mov	eax, [esi+2474h]
shr	eax, 11h
test	al, 1
jnz	short loc_68F82C
mov	edx, [esi]
mov	eax, [edx+0B0h]
mov	ecx, esi
call	eax
fmul	ds:dbl_15FCCF8
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
fadd	ds:dbl_15FCC48
fnstcw	word ptr [esp+0Ch+arg_0]
movzx	eax, word ptr [esp+0Ch+arg_0]
or	eax, 0C00h
mov	[esp+0Ch+var_4], eax
fldcw	word ptr [esp+0Ch+var_4]
fistp	[esp+0Ch+var_4]
mov	cl, byte ptr [esp+0Ch+var_4]
mov	[edi+7], cl
mov	edi, [edi+4]
fldcw	word ptr [esp+0Ch+arg_0]
push	ecx
mov	eax, esp
mov	[eax], edi
mov	edx, [esi]
mov	eax, [edx+0A8h]
mov	ecx, esi
call	eax
or	dword ptr [esi+2474h], 20000h

loc_68F82C:
pop	edi
pop	esi
pop	ecx
retn	4
sub_68F7A0 endp

align 10h



sub_68F840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
mov	edx, [eax+18h]
push	edi
mov	ecx, ebx
call	edx
mov	edi, [esp+8+arg_8]
mov	[edi], eax
test	eax, eax
jnz	short loc_68F85E
pop	edi
xor	al, al
pop	ebx
retn

loc_68F85E:
push	esi
lea	ecx, [esp+0Ch+arg_0]
call	sub_679E30
mov	eax, [edi]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	edx, [ebx]
mov	edx, [edx+28h]
mov	esi, eax
mov	eax, [edi]
push	eax
push	esi
mov	ecx, ebx
call	edx
movzx	ecx, word ptr [esi]
mov	eax, [edi]
mov	edx, 0FEFFh
cmp	cx, dx
jnz	short loc_68F8B9
cdq
sub	eax, edx
sar	eax, 1
dec	eax
xor	ecx, ecx
lea	edi, [esi+2]
test	eax, eax
jle	short loc_68F8AC

loc_68F8A7:
inc	ecx
cmp	ecx, eax
jl	short loc_68F8A7

loc_68F8AC:
push	eax
push	edi
lea	ecx, [esp+10h+arg_4]
call	sub_67A000
jmp	short loc_68F91B

loc_68F8B9:
mov	edx, 0FFFEh
cmp	cx, dx
jnz	short loc_68F8F0
cdq
sub	eax, edx
sar	eax, 1
dec	eax
xor	ecx, ecx
lea	edi, [esi+2]
test	eax, eax
jle	short loc_68F8E3

loc_68F8D2:
mov	dx, [edi+ecx*2]
rol	dx, 8
mov	[edi+ecx*2], dx
inc	ecx
cmp	ecx, eax
jl	short loc_68F8D2

loc_68F8E3:
push	eax
push	edi
lea	ecx, [esp+10h+arg_4]
call	sub_67A000
jmp	short loc_68F91B

loc_68F8F0:
cmp	eax, 2
jle	short loc_68F910
cmp	byte ptr [esi],	0EFh
jnz	short loc_68F910
cmp	byte ptr [esi+1], 0BBh
jnz	short loc_68F910
cmp	byte ptr [esi+2], 0BFh
jnz	short loc_68F910
add	eax, 0FFFFFFFDh
push	eax
lea	eax, [esi+3]
push	eax
jmp	short loc_68F912

loc_68F910:
push	eax
push	esi

loc_68F912:
lea	ecx, [esp+10h+arg_4]
call	sub_67A0C0

loc_68F91B:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
and	eax, 0FFFFFFFCh
mov	edx, [eax]
push	ecx
and	edx, 7FFFFFFFh
push	edx
add	eax, 8
push	eax
call	sub_667E00
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
add	esp, 0Ch
push	esi
call	edx
mov	esi, [esp+0Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_68F970
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_68F970:
pop	esi
pop	edi
mov	al, 1
pop	ebx
retn
sub_68F840 endp

align 10h



sub_68F980 proc	near
mov	edx, [ecx]
mov	eax, [ecx+4]
push	esi
mov	esi, [edx]
cmp	eax, [esi+4]
jg	short loc_68F9BC
inc	eax
mov	[ecx+4], eax
mov	esi, [edx]
cmp	eax, [esi+4]
ja	short loc_68F9BC
push	ebx
mov	esi, 0FFFFFFFEh
push	edi
nop

loc_68F9A0:
mov	ebx, [edx]
lea	edi, [eax+eax*2]
cmp	[ebx+edi*4+8], esi
jnz	short loc_68F9BA
inc	eax
mov	[ecx+4], eax
mov	edi, edx
mov	edi, [edi]
mov	ebx, eax
cmp	ebx, [edi+4]
jbe	short loc_68F9A0

loc_68F9BA:
pop	edi
pop	ebx

loc_68F9BC:
pop	esi
retn
sub_68F980 endp

align 10h



sub_68F9C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_68F9F0
mov	eax, [edi]
test	eax, eax
jz	short loc_68F9E5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_68F9E5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_68F9F0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_68FA23
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_68FA23:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_68F9C0 endp

align 10h



sub_68FA50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_68FA80
mov	eax, [edi]
test	eax, eax
jz	short loc_68FA75
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_68FA75:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_68FA80:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_68FAB3
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_68FAB3:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 104h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_68FA50 endp

align 10h



sub_68FAE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_68FAFF
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
lea	ecx, [eax-0Ch]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	21h
call	eax
retn

loc_68FAFF:
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
xor	ecx, ecx
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	21h
call	eax
retn
sub_68FAE0 endp

align 10h



sub_68FB20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437568
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_68FB43
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_68FB43:
mov	eax, esi
pop	esi
retn	4
sub_68FB20 endp

align 10h



sub_68FB50 proc	near
mov	eax, [ecx+14h]
retn
sub_68FB50 endp

align 10h



sub_68FB60 proc	near
sub	ecx, 8
jmp	sub_68FB70
sub_68FB60 endp

align 10h



sub_68FB70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_68FB7F
call	sub_64A430

loc_68FB7F:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_68FB8B
call	sub_64A430

loc_68FB8B:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_68FB97
call	sub_64A430

loc_68FB97:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_68FBA3
call	sub_64A430

loc_68FBA3:
mov	ecx, esi
mov	dword ptr [esi+8], offset off_1437474
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_68FBC6
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_68FBC6:
mov	eax, esi
pop	esi
retn	4
sub_68FB70 endp

align 10h



sub_68FBD0 proc	near
mov	eax, [ecx+14h]
add	eax, 28h
mov	eax, [eax]
xor	ecx, ecx
cmp	eax, 1
setz	cl
mov	al, cl
retn
sub_68FBD0 endp

align 10h



sub_68FBF0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+14h]
add	eax, 20h
mov	eax, [eax]
mov	ecx, [esi+10h]
cmp	eax, 1
setz	al
cmp	byte ptr [ecx+68h], 0
jz	short loc_68FC12
test	al, al
jz	short loc_68FC16
mov	al, 1
pop	esi
retn

loc_68FC12:
test	al, al
jnz	short loc_68FC1A

loc_68FC16:
xor	al, al
pop	esi
retn

loc_68FC1A:
mov	edx, [esi+0Ch]
mov	ecx, [edx+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	ebx
push	ebp
push	edi
call	edx
mov	esi, [esi+10h]
mov	ebp, [esi+50h]
mov	edi, [ebp+0]
mov	ebx, eax
push	ebx
lea	ecx, [esi+40h]
add	edi, 8
call	sub_652C20
push	eax
mov	eax, [edi]
push	ebx
mov	ecx, ebp
call	eax
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
retn
sub_68FBF0 endp




sub_68FC50 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+14h]
add	eax, 20h
mov	eax, [eax]
mov	ecx, [esi+10h]
cmp	eax, 1
setz	al
cmp	byte ptr [ecx+68h], 0
jz	short loc_68FC72
test	al, al
jz	short loc_68FC76
mov	al, 1
pop	esi
retn

loc_68FC72:
test	al, al
jnz	short loc_68FC7A

loc_68FC76:
xor	al, al
pop	esi
retn

loc_68FC7A:
mov	edx, [esi+0Ch]
mov	ecx, [edx+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	ebx
push	ebp
push	edi
call	edx
mov	esi, [esi+10h]
mov	ebp, [esi+64h]
mov	edi, [ebp+0]
mov	ebx, eax
push	ebx
lea	ecx, [esi+54h]
add	edi, 8
call	sub_652C20
push	eax
mov	eax, [edi]
push	ebx
mov	ecx, ebp
call	eax
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
retn
sub_68FC50 endp




sub_68FCB0 proc	near

var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
mov	eax, [edi]
mov	edx, [eax+50h]
mov	esi, ecx
mov	ecx, edi
call	edx
fld	dword ptr [esi+14h]
mov	edx, [edi+30h]
mov	ecx, eax
mov	[esp+20h+arg_0], eax
fild	[esp+20h+arg_0]
mov	[esp+20h+var_8], ecx
mov	[esp+20h+var_4], edx
test	eax, eax
jge	short loc_68FCE8
fadd	ds:flt_15FCC08

loc_68FCE8:
fnstcw	word ptr [esp+20h+arg_0]
mov	ebp, ecx
movzx	eax, word ptr [esp+20h+arg_0]
fmulp	st(1), st
sub	ebp, [esi+0Ch]
or	eax, 0C00h
mov	dword ptr [esp+20h+var_10], eax
fld	st
fldcw	word ptr [esp+20h+var_10]
fistp	[esp+20h+var_10]
mov	ebx, dword ptr [esp+20h+var_10]
add	ebx, edx
add	ebx, [esp+20h+arg_4]
fldcw	word ptr [esp+20h+arg_0]
call	__ftol2_sse
cmp	ebp, eax
jge	short loc_68FD49
mov	eax, [esi+8]
test	eax, eax
jz	short loc_68FD2D
cmp	ebx, eax
ja	short loc_68FD49

loc_68FD2D:
mov	edx, [edi]
mov	eax, [edx+18h]
push	ebx
mov	ecx, edi
call	eax
mov	ecx, [edi+30h]
pop	edi
mov	[esi+10h], ecx
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	8

loc_68FD49:
mov	edx, [esi+4]
mov	ecx, [edx+14h]
test	ecx, ecx
jz	short loc_68FD67
push	1
call	sub_702500
mov	eax, [esi+4]
mov	ecx, [eax+14h]
push	1
call	sub_702640

loc_68FD67:
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
call	sub_66A5F0
mov	edx, [edi]
mov	eax, [edx+50h]
mov	ecx, edi
call	eax
mov	ecx, [esi+8]
mov	[esi+0Ch], eax
test	ecx, ecx
jz	short loc_68FDD3
cmp	ebx, ecx
jbe	short loc_68FDD3
mov	ecx, [esp+20h+var_8]
mov	edx, [esp+20h+arg_4]
mov	ebx, ecx
sub	ebx, eax
cmp	edx, ebx
jbe	short loc_68FDC0
sub	eax, ecx
add	eax, [esp+20h+var_4]
mov	ecx, edi
add	eax, edx
mov	[esi+10h], eax
mov	edx, [edi]
push	eax
mov	eax, [edx+18h]
call	eax
mov	ecx, [edi+30h]
pop	edi
mov	[esi+10h], ecx
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	8

loc_68FDC0:
mov	edx, [edi]
mov	eax, [esi+10h]
mov	edx, [edx+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, [edi+30h]
mov	[esi+10h], eax

loc_68FDD3:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	8
sub_68FCB0 endp

align 10h



sub_68FDE0 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
arg_0= byte ptr	 4

mov	al, [esp+arg_0]
sub	esp, 84h
push	ebp
mov	ebp, ecx
mov	[ebp+4], al
test	al, al
jnz	loc_68FF46
push	esi
push	edi
lea	ecx, [esp+90h+var_58]
call	sub_64E8E0
mov	esi, [ebp+0]
mov	edi, [esi+20h]
test	edi, edi
jz	short loc_68FE52
lea	ecx, [esp+90h+var_7C]
call	sub_64E8E0
lea	eax, [esp+90h+var_7C]
push	eax
mov	ecx, edi
call	sub_654AF0
fld	[esp+90h+var_7C]
fstp	[esp+90h+var_58]
fld	[esp+90h+var_78]
fstp	[esp+90h+var_54]
fld	[esp+90h+var_74]
fstp	[esp+90h+var_50]
fld	[esp+90h+var_70]
fstp	[esp+90h+var_4C]
fld	[esp+90h+var_6C]
fstp	[esp+90h+var_48]
fld	[esp+90h+var_68]
fstp	[esp+90h+var_44]

loc_68FE52:
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
fld	dword ptr [eax+94Ch]
add	eax, 948h
fstp	[esp+90h+var_64]
fld	dword ptr [eax]
lea	ecx, [esp+90h+var_60]
fstp	[esp+90h+var_60]
push	ecx
fld	[esp+94h+var_64]
lea	edx, [esp+94h+var_84]
push	edx
fstp	[esp+98h+var_5C]
lea	ecx, [esp+98h+var_58]
call	sub_64EC70
push	1
mov	ecx, esi
call	sub_654BF0
test	al, al
jz	loc_68FF20
push	ebx
push	1
mov	ecx, esi
call	sub_654D00
push	1
mov	ecx, esi
mov	edi, eax
call	sub_654D50
mov	ebx, eax
test	edi, edi
jz	short loc_68FEC6
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E0h], edi

loc_68FEC6:
test	ebx, ebx
jz	short loc_68FED9
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E4h], ebx

loc_68FED9:
mov	edi, [esi+20h]
lea	ecx, [esp+94h+var_40] ;	void *
call	sub_64F7C0
lea	eax, [esp+94h+var_40]
push	eax
mov	ecx, edi
call	sub_654C80
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
lea	ecx, [esp+94h+var_40]
mov	[eax+0E8h], ecx
mov	eax, [esi]
lea	edx, [esp+94h+var_84]
push	edx
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
pop	ebx

loc_68FF20:
fld	dword ptr [esi+4Ch]
pop	edi
fstp	[esp+8Ch+var_74]
fld	dword ptr [esi+58h]
pop	esi
fstp	[esp+88h+var_68]
fld	[esp+88h+var_74]
fsub	[esp+88h+var_84]
fstp	dword ptr [ebp+18h]
fld	[esp+88h+var_68]
fsub	[esp+88h+var_80]
fstp	dword ptr [ebp+1Ch]

loc_68FF46:
pop	ebp
add	esp, 84h
retn	4
sub_68FDE0 endp




sub_68FF50 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

; FUNCTION CHUNK AT 0068EDC0 SIZE 00000116 BYTES

sub	esp, 50h
push	esi
mov	esi, ecx
fld	dword ptr [esi+90h]
mov	edx, [esi+34h]
fstp	[esp+7Ch+var_38]
fld	dword ptr [esi+94h]
fstp	[esp+7Ch+var_34]
fld	dword ptr [esi+98h]
fstp	[esp+7Ch+var_30]
fld	dword ptr [esi+9Ch]
fstp	[esp+7Ch+var_2C]
fld	dword ptr [esi+80h]
fstp	dword ptr [esp+18h]
fld	dword ptr [esi+84h]
fstp	dword ptr [esp+1Ch]
fld	dword ptr [esi+78h]
fstp	dword ptr [esp+20h]
fld	dword ptr [esi+7Ch]
fstp	dword ptr [esp+24h]
fld	dword ptr [esi+74h]
fstp	dword ptr [esp+28h]
fld1
test	edx, edx
jz	loc_69058E
mov	eax, [esi+48h]
mov	ecx, [esi+4Ch]
mov	[esp+14h], eax
fild	dword ptr [esp+14h]
mov	[esp+14h], ecx
fld	ds:dbl_15FCE20
push	edi
mov	edi, [esi+50h]
fmul	st(1), st
add	edi, eax
mov	eax, [esi+54h]
fxch	st(1)
add	eax, ecx
fstp	[esp+80h+var_50]
mov	ecx, [edx+1Ch]
fild	dword ptr [esp+18h]
mov	edx, [ecx+0Ch]
mov	[esp+18h], edi
mov	ecx, [esi+88h]
fmul	st, st(1)
pop	edi
fstp	[esp+7Ch+var_4C]
fild	dword ptr [esp+14h]
mov	[esp+14h], eax
mov	eax, [edx+20h]
fmul	st, st(1)
fstp	[esp+7Ch+var_48]
fild	dword ptr [esp+14h]
fmul	st, st(1)
fstp	[esp+7Ch+var_44]
fld	[esp+7Ch+var_48]
fsub	[esp+7Ch+var_50]
fstp	dword ptr [esp+10h]
fld	[esp+7Ch+var_44]
fsub	[esp+7Ch+var_4C]
fstp	dword ptr [esp+14h]
fld	dword ptr [eax+30h]
fstp	[esp+7Ch+var_50]
fld	dword ptr [eax+38h]
fstp	[esp+7Ch+var_48]
fld	[esp+7Ch+var_48]
fsub	[esp+7Ch+var_50]
fstp	dword ptr [esp+4]
fld	dword ptr [eax+34h]
fstp	[esp+7Ch+var_4C]
fld	dword ptr [eax+3Ch]
fstp	[esp+7Ch+var_44]
fld	[esp+7Ch+var_44]
fsub	[esp+7Ch+var_4C]
fstp	dword ptr [esp+8]
fldz
cmp	ecx, 3		; switch 4 cases
ja	loc_690532	; default
jmp	ds:off_69076C[ecx*4] ; switch jump

loc_690073:		; jumptable 0069006C case 0
fld	dword ptr [esi+6Ch]
mov	eax, [esi+8Ch]
fmul	dword ptr [esp+10h]
fmul	dword ptr [esi+68h]
fstp	dword ptr [esp+10h]
fld	dword ptr [esp+14h]
fmul	dword ptr [esi+68h]
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+10h]
fld	dword ptr [esp+14h]
cmp	eax, 8		; switch 9 cases
ja	loc_6901A9	; default
jmp	ds:off_69077C[eax*4] ; switch jump

loc_6900AA:		; jumptable 006900A3 case 0
fld	dword ptr [esp+4]
fld	ds:dbl_15FCC48
fmul	st(1), st
fld	st(3)
fmul	st, st(1)
fsubp	st(2), st
fxch	st(1)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fdiv	st, st(5)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
call	__ftol2_sse
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
mov	[esp+14h], eax
fild	dword ptr [esp+14h]
fstp	dword ptr [esi+90h]
fld	dword ptr [esp+8]
fmul	st, st(1)
fld	st(2)
fmulp	st(2), st
fsubrp	st(1), st
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fdiv	st, st(4)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
call	__ftol2_sse
lea	ecx, [eax+eax*4]
add	ecx, ecx
add	ecx, ecx
mov	[esp+14h], ecx
fild	dword ptr [esp+14h]
fstp	dword ptr [esi+94h]
jmp	loc_6901A9	; default

loc_690127:		; jumptable 006900A3 case 5
fxch	st(2)
fst	dword ptr [esi+90h]
fst	dword ptr [esi+94h]
jmp	short loc_6901A7

loc_690137:		; jumptable 006900A3 case 1
fld	dword ptr [esp+4]
fld	ds:dbl_15FCC48
fmul	st(1), st
fmul	st, st(3)
fsubp	st(1), st
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fdiv	st, st(4)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
call	__ftol2_sse
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
mov	[esp+14h], edx
fild	dword ptr [esp+14h]
fstp	dword ptr [esi+90h]
fxch	st(2)
fst	dword ptr [esi+94h]
jmp	short loc_6901A7

loc_69017D:		; jumptable 006900A3 case 6
fld	dword ptr [esp+4]
fsub	st, st(2)
fstp	dword ptr [esi+90h]
fxch	st(2)
fst	dword ptr [esi+94h]
jmp	short loc_6901A7

loc_690193:		; jumptable 006900A3 case 7
fxch	st(2)
fst	dword ptr [esi+90h]
fld	dword ptr [esp+8]
fsub	st, st(3)

loc_6901A1:
fstp	dword ptr [esi+94h]

loc_6901A7:
fxch	st(2)

loc_6901A9:		; default
fld	dword ptr [esi+90h]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+98h]
fadd	dword ptr [esi+94h]
fstp	dword ptr [esi+9Ch]
fld	dword ptr [esi+90h]
fdiv	st, st(2)
fstp	dword ptr [esi+80h]
fld	dword ptr [esi+94h]
fdivrp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+84h]
fld	dword ptr [esi+6Ch]
fmul	dword ptr [esi+68h]
fstp	dword ptr [esi+78h]
fld	dword ptr [esi+68h]
fstp	dword ptr [esi+7Ch]
jmp	loc_6903C7

loc_6901F7:		; jumptable 006900A3 case 2
fld	dword ptr [esp+4]
fld	ds:dbl_15FCC48
fmul	st(1), st
fmul	st, st(3)
fsubp	st(1), st
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fdiv	st, st(4)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
call	__ftol2_sse
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
mov	[esp+14h], eax
fild	dword ptr [esp+14h]

loc_69022D:
fstp	dword ptr [esi+90h]
fld	dword ptr [esp+8]
fsub	st, st(1)
fstp	dword ptr [esi+94h]
jmp	loc_6901A9	; default

loc_690244:		; jumptable 006900A3 case 8
fld	dword ptr [esp+4]
fsub	st, st(2)
jmp	short loc_69022D

loc_69024C:		; jumptable 006900A3 case 3
fxch	st(2)
fst	dword ptr [esi+90h]
fld	dword ptr [esp+8]
fld	ds:dbl_15FCC48
fmul	st(1), st
fmul	st, st(4)
fsubp	st(1), st
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fdiv	st, st(4)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
call	__ftol2_sse
lea	ecx, [eax+eax*4]
add	ecx, ecx
add	ecx, ecx
mov	[esp+14h], ecx
fild	dword ptr [esp+14h]
jmp	loc_6901A1

loc_69028F:		; jumptable 006900A3 case 4
fld	dword ptr [esp+4]
fsub	st, st(2)
fstp	dword ptr [esi+90h]
fld	dword ptr [esp+8]
fld	ds:dbl_15FCC48
fmul	st(1), st
fmul	st, st(2)
fsubp	st(1), st
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fdiv	st, st(4)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
call	__ftol2_sse
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
mov	[esp+14h], edx
fild	dword ptr [esp+14h]
fstp	dword ptr [esi+94h]
jmp	loc_6901A9	; default

loc_6902DC:		; jumptable 0069006C cases 1,3
fstp	st(2)
fld	dword ptr [esi+6Ch]
fmul	dword ptr [esp+10h]
fstp	dword ptr [esp+0Ch]
fld	dword ptr [esp+14h]
fld	dword ptr [esp+4]
fld	dword ptr [esp+8]
cmp	ecx, 1
jnz	short loc_69030D
fld	dword ptr [esp+0Ch]
fdiv	st, st(2)
fld	st(3)
fdiv	st, st(2)
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_69032D

loc_69030D:
cmp	ecx, 3
jnz	loc_6903E4
fld	dword ptr [esp+0Ch]
fdiv	st, st(2)
fld	st(3)
fdiv	st, st(2)
fcompp
fnstsw	ax
test	ah, 5
jp	loc_6903E4

loc_69032D:
fld	st(1)
fmulp	st(3), st
fld	dword ptr [esp+0Ch]
fdivp	st(3), st
fxch	st(2)
fstp	dword ptr [esp+14h]
fxch	st(3)
fst	dword ptr [esi+90h]
fld	ds:dbl_15FCC48
fmul	st(2), st
fld	dword ptr [esp+14h]
fld	st
fmulp	st(2), st
fxch	st(3)
fsubrp	st(1), st
fstp	dword ptr [esi+94h]
fld	dword ptr [esi+90h]
fadd	st, st(4)
fstp	dword ptr [esi+98h]
fld	dword ptr [esi+94h]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+9Ch]
fst	dword ptr [esi+80h]
fld	dword ptr [esi+94h]
fdivrp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+84h]
fld	st
fld	dword ptr [esp+10h]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_6903A8
fdivp	st(2), st
jmp	short loc_6903B0

loc_6903A8:
fstp	st(2)
fstp	st(1)
fldz
fxch	st(1)

loc_6903B0:
fxch	st(1)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fst	dword ptr [esi+78h]
fdiv	dword ptr [esi+6Ch]
fstp	dword ptr [esi+7Ch]

loc_6903C3:
fld1
fxch	st(1)

loc_6903C7:
fcom	dword ptr [esi+7Ch]
fnstsw	ax
fld1
fld	ds:dbl_15FD290
test	ah, 44h
jp	loc_690539
fld	st
jmp	loc_69053E

loc_6903E4:
fld	dword ptr [esp+0Ch]
fmul	st, st(1)
fdiv	st, st(3)
fstp	dword ptr [esp+14h]
fld	ds:dbl_15FCC48
fmul	st(2), st
fld	dword ptr [esp+14h]
fld	st
fmulp	st(2), st
fxch	st(3)
fsubrp	st(1), st
fstp	dword ptr [esi+90h]
fxch	st(4)
fst	dword ptr [esi+94h]
fld	dword ptr [esi+90h]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+98h]
fld	dword ptr [esi+94h]
fadd	st, st(4)
fstp	dword ptr [esi+9Ch]
fld	dword ptr [esi+90h]
fdivrp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+80h]
fxch	st(1)
fst	dword ptr [esi+84h]
fld	st
fucomp	st(2)
fnstsw	ax
test	ah, 44h
jnp	short loc_69046D
fxch	st(2)
fdivrp	st(1), st
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fst	dword ptr [esi+7Ch]
fmul	dword ptr [esi+6Ch]
fstp	dword ptr [esi+78h]
jmp	loc_6903C3

loc_69046D:
fstp	st(1)
fstp	st(1)
fldz
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fst	dword ptr [esi+7Ch]
fmul	dword ptr [esi+6Ch]
fstp	dword ptr [esi+78h]
jmp	loc_6903C3

loc_690489:		; jumptable 0069006C case 2
fstp	st(1)
fst	dword ptr [esi+94h]
fst	dword ptr [esi+90h]
fld	dword ptr [esi+90h]
fadd	dword ptr [esp+4]
fstp	dword ptr [esi+98h]
fld	dword ptr [esi+94h]
fadd	dword ptr [esp+8]
fstp	dword ptr [esi+9Ch]
fst	dword ptr [esi+84h]
fst	dword ptr [esi+80h]
fld	st
fld	dword ptr [esp+10h]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fldz
test	ah, 44h
jnp	short loc_6904EE
fld	dword ptr [esi+98h]
fsub	dword ptr [esi+90h]
fstp	dword ptr [esp+10h]
fld	dword ptr [esp+10h]
fdivrp	st(2), st
jmp	short loc_6904F4

loc_6904EE:
fstp	st(1)
fld	st
fxch	st(1)

loc_6904F4:
fxch	st(1)
fstp	dword ptr [esi+78h]
fld	st(1)
fld	dword ptr [esp+14h]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_690528
fstp	st(1)
fld	dword ptr [esi+9Ch]
fsub	dword ptr [esi+94h]
fstp	dword ptr [esp+14h]
fdivr	dword ptr [esp+14h]
fstp	dword ptr [esi+7Ch]
jmp	loc_6903C7

loc_690528:
fstp	st
fstp	dword ptr [esi+7Ch]
jmp	loc_6903C7

loc_690532:		; default
fstp	st(1)
jmp	loc_6903C7

loc_690539:
fld	dword ptr [esi+7Ch]
fdivr	st, st(2)

loc_69053E:
fld	st(3)
fcomp	dword ptr [esi+78h]
fnstsw	ax
test	ah, 44h
jp	short loc_69054E
fstp	st(2)
jmp	short loc_690557

loc_69054E:
fstp	st(1)
fld	dword ptr [esi+78h]
fdivp	st(2), st
fxch	st(1)

loc_690557:
fstp	dword ptr [esp+10h]
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fld	dword ptr [esp+10h]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_69057F
fstp	st(1)
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fstp	dword ptr [esi+74h]
jmp	short loc_6905A9

loc_69057F:
fstp	st
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+14h]
fstp	dword ptr [esi+74h]
jmp	short loc_6905A9

loc_69058E:
fldz
fst	dword ptr [esi+84h]
fst	dword ptr [esi+80h]
fxch	st(1)
fst	dword ptr [esi+7Ch]
fst	dword ptr [esi+78h]
fst	dword ptr [esi+74h]
fxch	st(1)

loc_6905A9:
fld	dword ptr [esi+90h]
fchs
fstp	[esp+7Ch+var_48]
fld	dword ptr [esi+94h]
fchs
fstp	[esp+7Ch+var_3C]
fxch	st(1)
fst	dword ptr [esi+0B0h]
fxch	st(1)
fst	dword ptr [esi+0B4h]
fld	[esp+7Ch+var_48]
fstp	dword ptr [esi+0B8h]
fstp	dword ptr [esi+0BCh]
fstp	dword ptr [esi+0C0h]
fld	[esp+7Ch+var_3C]
fstp	dword ptr [esi+0C4h]
fild	dword ptr [esi+50h]
fld	dword ptr [esi+98h]
fsub	dword ptr [esi+90h]
fstp	dword ptr [esp+14h]
fdiv	dword ptr [esp+14h]
fstp	dword ptr [esp+10h]
fild	dword ptr [esi+54h]
fld	dword ptr [esi+9Ch]
fsub	dword ptr [esi+94h]
fstp	dword ptr [esp+14h]
fdiv	dword ptr [esp+14h]
fstp	dword ptr [esp+14h]
fld	dword ptr [esp+10h]
fld	st
fmul	dword ptr [esi+0B0h]
fstp	dword ptr [esi+0B0h]
fld	dword ptr [esi+0B4h]
fmul	st, st(1)
fstp	dword ptr [esi+0B4h]
fmul	dword ptr [esi+0B8h]
fstp	dword ptr [esi+0B8h]
fld	dword ptr [esi+0BCh]
fld	dword ptr [esp+14h]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0BCh]
fld	dword ptr [esi+0C0h]
fmul	st, st(1)
fstp	dword ptr [esi+0C0h]
fmul	dword ptr [esi+0C4h]
fstp	dword ptr [esi+0C4h]
fild	dword ptr [esi+4Ch]
fstp	dword ptr [esp+14h]
fild	dword ptr [esi+48h]
fadd	dword ptr [esi+0B8h]
fstp	dword ptr [esi+0B8h]
fld	dword ptr [esi+0C4h]
fadd	dword ptr [esp+14h]
fstp	dword ptr [esi+0C4h]
fld	[esp+7Ch+var_38]
fld	dword ptr [esi+90h]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_69074F
fld	[esp+7Ch+var_30]
fld	dword ptr [esi+98h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69074F
fld	[esp+7Ch+var_34]
fld	dword ptr [esi+94h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69074F
fld	[esp+7Ch+var_2C]
fld	dword ptr [esi+9Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69074F
fld	dword ptr [esp+18h]
fld	dword ptr [esi+80h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69074F
fld	dword ptr [esp+1Ch]
fld	dword ptr [esi+84h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69074F
fld	dword ptr [esp+20h]
fld	dword ptr [esi+78h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69074F
fld	dword ptr [esp+24h]
fld	dword ptr [esi+7Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69074F
fld	dword ptr [esp+28h]
fld	dword ptr [esi+74h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_690764

loc_69074F:
or	dword ptr [esi+2474h], 400h
mov	ecx, esi
pop	esi
add	esp, 50h
jmp	loc_68EDC0

loc_690764:
pop	esi
add	esp, 50h
retn
sub_68FF50 endp	; sp-analysis failed

align 4
off_69076C dd offset loc_690073	; jump table for switch	statement
dd offset loc_6902DC
dd offset loc_690489
dd offset loc_6902DC
off_69077C dd offset loc_6900AA	; jump table for switch	statement
dd offset loc_690137
dd offset loc_6901F7
dd offset loc_69024C
dd offset loc_69028F
dd offset loc_690127
dd offset loc_69017D
dd offset loc_690193
dd offset loc_690244


; Attributes: bp-based frame

sub_6907A0 proc	near

var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 34h
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [ebp+arg_0]
fld	dword ptr [edi+4]
mov	ecx, [ebp+arg_C]
fld	dword ptr [esi+84h]
mov	edx, [ebp+arg_4]
fld	ds:dbl_15FCE20
mov	[esp+40h+var_24], ecx
fmul	st(1), st
mov	cl, [ebp+arg_8]
fxch	st(1)
xor	eax, eax
mov	[esp+40h+var_28], esi
fstp	[esp+40h+var_34]
mov	[esp+40h+var_20], edx
fld	[esp+40h+var_34]
mov	[esp+40h+var_1C], cl
fsubp	st(2), st
fld	dword ptr [esi+9Ch]
fsub	dword ptr [esi+94h]
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
fdivp	st(2), st
fld	ds:dbl_15FCD70
fmul	st(2), st
fld1
fsub	st(3), st
fxch	st(3)
fstp	[esp+40h+var_2C]
fld	dword ptr [edi]
fld	dword ptr [esi+80h]
fmulp	st(3), st
fxch	st(2)
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
fsubp	st(2), st
fld	dword ptr [esi+98h]
fsub	dword ptr [esi+90h]
fstp	[esp+40h+var_34]
fld	[esp+40h+var_34]
fdivp	st(2), st
fmulp	st(1), st
fsubrp	st(1), st
fstp	dword ptr [esi+0D0h]
fld	[esp+40h+var_2C]
fchs
fstp	dword ptr [esi+0D4h]
mov	ebx, [esi+247Ch]
sub	ebx, 1
js	short loc_6908B8
mov	edi, edi

loc_690860:
mov	edx, [esi+2478h]
mov	edi, [edx+ebx*4]
mov	eax, [edi+20h]
lea	ecx, [esp+40h+var_18]
mov	[esp+40h+var_2C], eax
call	sub_64E8E0
lea	ecx, [esp+40h+var_18]
push	ecx
mov	ecx, [esp+44h+var_2C]
call	sub_654AF0
mov	edx, [ebp+arg_0]
push	edx
lea	eax, [esp+44h+var_34]
push	eax
lea	ecx, [esp+48h+var_18]
call	sub_64EC70
mov	edx, [edi]
mov	edx, [edx+48h]
lea	eax, [esp+40h+var_28]
push	eax
lea	ecx, [esp+44h+var_34]
push	ecx
mov	ecx, edi
call	edx
test	eax, eax
jnz	short loc_6908DD
sub	ebx, 1
jns	short loc_690860
mov	edi, [ebp+arg_0]

loc_6908B8:
mov	ebx, [esi+28h]
test	ebx, ebx
jle	short loc_6908DD
nop

loc_6908C0:
mov	eax, [esi+24h]
mov	ecx, [eax+ebx*8-4]
mov	edx, [ecx]
mov	edx, [edx+48h]
lea	eax, [esp+40h+var_28]
push	eax
push	edi
call	edx
test	eax, eax
jnz	short loc_6908DD
dec	ebx
test	ebx, ebx
jg	short loc_6908C0

loc_6908DD:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_6907A0 endp

align 10h



sub_6908F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	edx, [eax+0D8h]
call	edx
mov	esi, [esp+14h+arg_0]
test	al, al
jnz	short loc_69091A
cmp	dword ptr [esi], 8
jz	short loc_690925
pop	edi
pop	esi
xor	eax, eax
pop	ebx
add	esp, 8
retn	4

loc_69091A:
mov	eax, [esi]
cmp	eax, 8
jnz	loc_6909E1

loc_690925:
push	ebp
lea	eax, [edi+9D4h]
mov	ebp, 0FFFFFFFCh
lea	ebx, [esi+4]
mov	[esp+18h+arg_0], eax
sub	ebp, esi
lea	ebx, [ebx+0]

loc_690940:
mov	al, [ebx]
test	al, al
jz	short loc_690993
lea	ecx, [ebx+ebp]
cmp	ecx, 4
sbb	esi, esi
and	esi, [esp+18h+arg_0]
shr	al, 4
and	al, 1
movzx	edx, al
push	edx
push	90h
mov	ecx, esi
call	sub_6A7970
mov	al, [ebx]
shr	al, 3
and	al, 1
movzx	ecx, al
push	ecx
push	14h
mov	ecx, esi
call	sub_6A7970
mov	dl, [ebx]
shr	dl, 5
and	dl, 1
movzx	eax, dl
push	eax
push	91h
mov	ecx, esi
call	sub_6A7970

loc_690993:
add	[esp+18h+arg_0], 67Ch
inc	ebx
lea	ecx, [ebx+ebp]
cmp	ecx, 4
jb	short loc_690940
or	dword ptr [edi+2474h], 40000h
mov	edx, [edi+8]
mov	eax, [edx+0Ch]
lea	ecx, [edi+8]
push	1Bh
call	eax
mov	esi, eax
pop	ebp
test	esi, esi
jz	short loc_6909D3
mov	edx, [esi]
mov	eax, [edx+44h]
push	edi
mov	ecx, esi
call	eax
mov	ecx, esi
call	sub_64A430

loc_6909D3:
pop	edi
pop	esi
mov	eax, 1
pop	ebx
add	esp, 8
retn	4

loc_6909E1:
cmp	eax, 5
jz	short loc_6909EB
cmp	eax, 6
jnz	short loc_690A50

loc_6909EB:
movzx	eax, byte ptr [esi+11h]
cmp	eax, 4
jnb	short loc_690A50
imul	eax, 67Ch
lea	ebx, [eax+edi+9D4h]
test	ebx, ebx
jz	short loc_690A50
mov	al, [esi+10h]
test	al, al
jz	short loc_690A50
shr	al, 4
and	al, 1
movzx	ecx, al
push	ecx
push	90h
mov	ecx, ebx
call	sub_6A7970
mov	dl, [esi+10h]
shr	dl, 3
and	dl, 1
movzx	eax, dl
push	eax
push	14h
mov	ecx, ebx
call	sub_6A7970
mov	cl, [esi+10h]
shr	cl, 5
and	cl, 1
movzx	edx, cl
push	edx
push	91h
mov	ecx, ebx
call	sub_6A7970

loc_690A50:
mov	eax, [esi]
dec	eax
cmp	eax, 0Dh	; switch 14 cases
ja	loc_690D32	; default
			; jumptable 00690A5C cases 6,7,9-11
jmp	ds:off_690D40[eax*4] ; switch jump

loc_690A63:		; jumptable 00690A5C case 0
mov	eax, [esi+14h]
cmp	eax, [edi+9C4h]
jnb	loc_690D32	; default
			; jumptable 00690A5C cases 6,7,9-11
fld	dword ptr [edi+78h]
lea	ecx, [esp+14h+var_8]
fmul	dword ptr [esi+4]
push	ecx
push	eax
lea	ecx, [edi+134h]
fadd	dword ptr [edi+80h]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+1Ch+var_8]
fld	dword ptr [edi+7Ch]
fmul	dword ptr [esi+8]
fadd	dword ptr [edi+84h]
fstp	[esp+1Ch+arg_0]
fmul	[esp+1Ch+arg_0]
fstp	[esp+1Ch+var_4]
call	sub_68E0D0
pop	edi
pop	esi
mov	eax, 3
pop	ebx
add	esp, 8
retn	4

loc_690ACB:		; jumptable 00690A5C case 2
mov	eax, [esi+14h]
cmp	eax, [edi+9C4h]
jnb	loc_690D32	; default
			; jumptable 00690A5C cases 6,7,9-11
fld	dword ptr [edi+78h]
push	80h
fmul	dword ptr [esi+4]
fadd	dword ptr [edi+80h]
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+18h+var_8]
fld	dword ptr [edi+7Ch]
fmul	dword ptr [esi+8]
fadd	dword ptr [edi+84h]
fstp	[esp+18h+arg_0]
fmul	[esp+18h+arg_0]

loc_690B15:
mov	ecx, [esi+10h]
fstp	[esp+18h+var_4]
mov	edx, 1
shl	edx, cl
lea	ecx, [esp+18h+var_8]
push	edx
push	ecx
push	eax
lea	ecx, [edi+134h]
call	sub_68E110

loc_690B35:
pop	edi
pop	esi
mov	eax, 3
pop	ebx
add	esp, 8
retn	4

loc_690B43:		; jumptable 00690A5C case 1
mov	eax, [esi+14h]
cmp	eax, [edi+9C4h]
jnb	loc_690D32	; default
			; jumptable 00690A5C cases 6,7,9-11
fld	dword ptr [edi+78h]
push	0
fmul	dword ptr [esi+4]
fadd	dword ptr [edi+80h]
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+18h+var_8]
fld	dword ptr [edi+7Ch]
fmul	dword ptr [esi+8]
fadd	dword ptr [edi+84h]
fstp	[esp+18h+arg_0]
fmul	[esp+18h+arg_0]
jmp	short loc_690B15

loc_690B8C:		; jumptable 00690A5C case 3
mov	ebx, [esi+14h]
cmp	ebx, [edi+9C4h]
jnb	loc_690D32	; default
			; jumptable 00690A5C cases 6,7,9-11
fld	dword ptr [edi+78h]
fmul	dword ptr [esi+4]
fadd	dword ptr [edi+80h]
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+14h+var_8]
fld	dword ptr [edi+7Ch]
fmul	dword ptr [esi+8]
fadd	dword ptr [edi+84h]
fstp	[esp+14h+arg_0]
fmul	[esp+14h+arg_0]
fstp	[esp+14h+var_4]
fld	dword ptr [esi+0Ch]
call	__ftol2_sse
push	eax
lea	edx, [esp+18h+var_8]
push	edx
push	ebx
lea	ecx, [edi+134h]
call	sub_68E170
pop	edi
pop	esi
mov	eax, 3
pop	ebx
add	esp, 8
retn	4

loc_690BFD:		; jumptable 00690A5C case 4
movzx	eax, byte ptr [esi+11h]
push	eax
mov	ecx, edi
call	sub_654A40
test	eax, eax
jz	short loc_690C22
movzx	ecx, byte ptr [esi+10h]
movzx	edx, byte ptr [esi+8]
push	ecx
mov	ecx, [esi+4]
push	edx
push	ecx
mov	ecx, eax
call	sub_6A79B0

loc_690C22:
movzx	edx, byte ptr [esi+11h]
movzx	eax, byte ptr [esi+10h]
movzx	ecx, byte ptr [esi+8]
push	edx
movzx	edx, word ptr [esi+4]
push	eax
push	ecx
add	edi, 134h
push	edx
mov	ecx, edi
call	sub_68E2F0
mov	eax, [esi+0Ch]
cmp	eax, 20h
jb	loc_690B35
cmp	eax, 7Fh
jz	loc_690B35
movzx	ecx, byte ptr [esi+11h]
push	ecx
push	eax
mov	ecx, edi
call	sub_68E370
pop	edi
pop	esi
mov	eax, 3
pop	ebx
add	esp, 8
retn	4

loc_690C73:		; jumptable 00690A5C case 5
movzx	edx, byte ptr [esi+11h]
push	edx
mov	ecx, edi
call	sub_654A40
test	eax, eax
jz	short loc_690C98
movzx	ecx, byte ptr [esi+10h]
movzx	edx, byte ptr [esi+8]
push	ecx
mov	ecx, [esi+4]
push	edx
push	ecx
mov	ecx, eax
call	sub_6A7A00

loc_690C98:
movzx	edx, byte ptr [esi+11h]
movzx	eax, byte ptr [esi+10h]
movzx	ecx, byte ptr [esi+8]
push	edx
movzx	edx, word ptr [esi+4]
push	eax
push	ecx
push	edx
lea	ecx, [edi+134h]
call	sub_68E330
pop	edi
pop	esi
mov	eax, 3
pop	ebx
add	esp, 8
retn	4

loc_690CC5:		; jumptable 00690A5C case 12
movzx	eax, byte ptr [esi+8]
mov	ecx, [esi+4]
push	eax
push	ecx
lea	ecx, [edi+134h]
call	sub_68E370
pop	edi
pop	esi
mov	eax, 3
pop	ebx
add	esp, 8
retn	4

loc_690CE7:		; jumptable 00690A5C case 13
mov	edx, [edi+8]
mov	eax, [edx+0Ch]
lea	ecx, [edi+8]
push	1Bh
call	eax
mov	ebx, eax
push	esi
test	ebx, ebx
jz	short loc_690D19
mov	edx, [ebx]
mov	eax, [edx+60h]
push	edi
mov	ecx, ebx
call	eax
mov	ecx, ebx
mov	esi, eax
call	sub_64A430
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn	4

loc_690D19:
mov	ecx, edi
call	sub_703180
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	4

loc_690D29:		; jumptable 00690A5C case 8
push	0
mov	ecx, edi
call	sub_68F2B0

loc_690D32:		; default
pop	edi		; jumptable 00690A5C cases 6,7,9-11
pop	esi
xor	eax, eax
pop	ebx
add	esp, 8
retn	4
sub_6908F0 endp

align 10h
off_690D40 dd offset loc_690A63	; jump table for switch	statement
dd offset loc_690B43
dd offset loc_690ACB
dd offset loc_690B8C
dd offset loc_690BFD
dd offset loc_690C73
dd offset loc_690D32
dd offset loc_690D32
dd offset loc_690D29
dd offset loc_690D32
dd offset loc_690D32
dd offset loc_690D32
dd offset loc_690CC5
dd offset loc_690CE7
align 10h


; Attributes: bp-based frame

; int __stdcall	sub_690D80(float, float, int, int)
sub_690D80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
mov	eax, ecx
fld	dword ptr [eax+78h]
push	ebx
fmul	[ebp+arg_0]
push	esi
mov	esi, [ebp+arg_C]
push	edi
fadd	dword ptr [eax+80h]
fstp	[esp+20h+var_10]
fld	[esp+20h+var_10]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+20h+var_8]
fld	dword ptr [eax+7Ch]
fmul	[ebp+arg_4]
fadd	dword ptr [eax+84h]
fstp	[esp+20h+var_10]
fmul	[esp+20h+var_10]
fstp	[esp+20h+var_4]
cmp	esi, [eax+9C4h]
jnb	loc_690E63
lea	ebx, [eax+134h]
cmp	esi, 4
jnb	short loc_690E07
fld	[esp+20h+var_8]
mov	edx, 1
mov	ecx, esi
shl	edx, cl
or	[ebx+7F8h], edx
fstp	dword ptr [ebx+esi*8+7D8h]
fld	[esp+20h+var_4]
fstp	dword ptr [ebx+esi*8+7DCh]

loc_690E07:
lea	ecx, [esi+esi*8]
mov	edx, [eax+ecx*4+940h]
mov	[esp+20h+var_C], edx
mov	edi, 1
mov	[esp+20h+var_10], 10h
jmp	short loc_690E28

loc_690E24:
mov	edx, [esp+20h+var_C]

loc_690E28:
mov	eax, edi
and	eax, [ebp+arg_8]
jz	short loc_690E3D
test	edx, edi
jnz	short loc_690E3D
push	0
push	eax
lea	edx, [esp+28h+var_8]
push	edx
jmp	short loc_690E52

loc_690E3D:
mov	ecx, edi
and	ecx, edx
jz	short loc_690E5A
test	eax, eax
jnz	short loc_690E5A
push	80h
push	ecx
lea	eax, [esp+28h+var_8]
push	eax

loc_690E52:
push	esi
mov	ecx, ebx
call	sub_68E110

loc_690E5A:
add	edi, edi
sub	[esp+20h+var_10], 1
jnz	short loc_690E24

loc_690E63:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_690D80 endp

align 10h



sub_690E70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_0]
sub	esp, 8
cmp	edx, [ecx+9C4h]
jnb	loc_690F03
lea	eax, [edx+edx*8+252h]
fld	dword ptr [ecx+eax*4]
lea	eax, [ecx+eax*4]
fstp	[esp+8+var_8]
fld	dword ptr [eax+4]
mov	eax, [esp+8+arg_4]
fstp	[esp+8+var_4]
fld	[esp+8+var_8]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fsub	dword ptr [ecx+80h]
fdiv	dword ptr [ecx+78h]
fstp	[esp+8+var_8]
fdivr	[esp+8+var_4]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fsub	dword ptr [ecx+84h]
fdiv	dword ptr [ecx+7Ch]
fstp	[esp+8+var_4]
test	eax, eax
jz	short loc_690EE1
fld	[esp+8+var_8]
fstp	dword ptr [eax]

loc_690EE1:
mov	eax, [esp+8+arg_8]
test	eax, eax
jz	short loc_690EEF
fld	[esp+8+var_4]
fstp	dword ptr [eax]

loc_690EEF:
mov	eax, [esp+8+arg_C]
test	eax, eax
jz	short loc_690F03
lea	edx, [edx+edx*8]
mov	ecx, [ecx+edx*4+940h]
mov	[eax], ecx

loc_690F03:
add	esp, 8
retn	10h
sub_690E70 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_690F10(float, float, int, int)
sub_690F10 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 54h
push	ebx
push	esi
push	edi
mov	edi, ecx
fld	dword ptr [edi+78h]
fmul	[ebp+arg_0]
fadd	dword ptr [edi+80h]
fstp	[esp+60h+var_48]
fld	dword ptr [edi+7Ch]
fmul	[ebp+arg_4]
fadd	dword ptr [edi+84h]
fstp	[esp+60h+var_4C]
fld	[esp+60h+var_4C]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+60h+var_4C]
fld	[esp+60h+var_4C]
fld	dword ptr [edi+9Ch]
fsub	dword ptr [edi+94h]
fstp	[esp+60h+var_50]
fdiv	[esp+60h+var_50]
fld	ds:dbl_15FCC48
fsub	st(1), st
fld	ds:dbl_15FCD70
fmul	st(2), st
fxch	st(2)
fstp	[esp+60h+var_40]
fld	[esp+60h+var_48]
fmulp	st(3), st
fxch	st(2)
fstp	[esp+60h+var_50]
fld	[esp+60h+var_50]
fld	dword ptr [edi+98h]
fsub	dword ptr [edi+90h]
fstp	[esp+60h+var_48]
fdiv	[esp+60h+var_48]
fsubrp	st(2), st
fmulp	st(1), st
fstp	dword ptr [edi+0D0h]
fld	[esp+60h+var_40]
fchs
fstp	dword ptr [edi+0D4h]
mov	ebx, [edi+28h]
test	ebx, ebx
jle	loc_6910E1

loc_690FC3:
mov	eax, [edi+24h]
mov	esi, [eax+ebx*8-4]
lea	ecx, [esp+60h+var_18]
call	sub_64E8E0
mov	edx, [esi]
mov	edx, [edx+34h]
lea	eax, [esp+60h+var_18]
push	eax
lea	ecx, [esp+64h+var_38]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+60h+var_50]
fstp	[esp+60h+var_48]
lea	ecx, [esp+60h+var_18]
fld	[esp+60h+var_4C]
fstp	[esp+60h+var_44]
call	sub_64E8E0
lea	eax, [esp+60h+var_18]
push	eax
mov	ecx, esi
call	sub_654AF0
lea	ecx, [esp+60h+var_48]
push	ecx
lea	edx, [esp+64h+var_40]
push	edx
lea	ecx, [esp+68h+var_18]
call	sub_64EC70
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_69106F
fld	[esp+60h+var_40]
fld	[esp+60h+var_30]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_6910D6
fld	[esp+60h+var_38]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_6910D8	; default
fld	[esp+60h+var_3C]
fld	[esp+60h+var_2C]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6910D6
fld	[esp+60h+var_34]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6910D8 ; default

loc_69106F:
mov	eax, [ebp+arg_8]
cmp	eax, 3		; switch 4 cases
ja	short loc_6910D8 ; default
jmp	ds:off_6910EC[eax*4] ; switch jump

loc_69107E:		; jumptable 00691077 case 0
push	0

loc_691080:
mov	eax, [esi]
mov	edx, [eax+44h]
lea	ecx, [esp+64h+var_40]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_6910D8 ; default

loc_691092:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_69109D:		; jumptable 00691077 case 1
push	1
jmp	short loc_691080

loc_6910A1:		; jumptable 00691077 case 2
mov	eax, [ebp+arg_C]
mov	edx, [esi]
mov	edx, [edx+48h]
mov	dword ptr [esp+60h+var_20], eax
lea	eax, [esp+60h+var_28]
push	eax
lea	ecx, [esp+64h+var_40]
push	ecx
mov	ecx, esi
mov	[esp+68h+var_28], edi
mov	dword ptr [esp+68h+var_24], 0
mov	[esp+68h+var_1C], 0
call	edx
test	eax, eax
jnz	short loc_691092
jmp	short loc_6910D8 ; default

loc_6910D2:		; jumptable 00691077 case 3
push	3
jmp	short loc_691080

loc_6910D6:
fstp	st

loc_6910D8:		; default
dec	ebx
test	ebx, ebx
jg	loc_690FC3

loc_6910E1:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_690F10 endp

off_6910EC dd offset loc_69107E	; jump table for switch	statement
dd offset loc_69109D
dd offset loc_6910A1
dd offset loc_6910D2
align 10h



sub_691100 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+30h], 0
jnz	short loc_691111
xor	al, al
pop	esi
pop	ecx
retn	8

loc_691111:
mov	eax, [esi+34h]
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	[esp+0Ch+var_4], 0FFFFFFFFh
mov	ecx, [eax+1Ch]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	edx, [edx+34h]
push	0
lea	eax, [esp+10h+var_4]
push	eax
push	edi
call	edx
test	al, al
jz	short loc_691156
mov	ecx, [esp+8+arg_8]
mov	edx, [esp+8]
mov	eax, [esi]
mov	eax, [eax+10h]
add	edx, ecx
push	edx
mov	ecx, esi
call	eax
pop	edi
mov	al, 1
pop	esi
pop	ecx
retn	8

loc_691156:
mov	edx, [esi+8]
mov	eax, [edx+0Ch]
add	esi, 8
push	4
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_69119A
mov	ecx, eax
call	sub_64A430
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	4
mov	ecx, esi
call	eax
mov	esi, eax
push	edi
lea	ecx, [esi+0Ch]
push	offset aErrorMovieimpl ; "Error: MovieImpl::GotoLabeledFrame('%s'"...
push	ecx
call	sub_650A10
add	esp, 0Ch
test	esi, esi
jz	short loc_69119A
mov	ecx, esi
call	sub_64A430

loc_69119A:
pop	edi
xor	al, al
pop	esi
pop	ecx
retn	8
sub_691100 endp

align 10h



sub_6911B0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	byte ptr -34h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_18=	byte ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 60h
push	esi
push	edi
lea	ecx, [esp+68h+var_30]
call	sub_64E8E0
mov	esi, [esp+68h+arg_0]
lea	eax, [esp+68h+var_30]
push	eax
mov	ecx, esi
call	sub_654B40
lea	ecx, [esp+68h+var_18]
call	sub_64E8E0
mov	edi, [esp+68h+arg_4]
lea	ecx, [esp+68h+var_18]
push	ecx
mov	ecx, edi
call	sub_654B40
mov	edx, [esi]
mov	edx, [edx+0F4h]
lea	eax, [esp+68h+var_60]
push	eax
mov	ecx, esi
call	edx
fldz
push	eax
fst	[esp+70h+var_54]
fst	[esp+70h+var_50]
lea	eax, [esp+70h+var_54]
fst	[esp+70h+var_4C]
push	eax
lea	ecx, [esp+74h+var_34]
fstp	[esp+74h+var_48]
call	sub_64EF10
mov	edx, [edi]
mov	edx, [edx+0F4h]
lea	eax, [esp+6Ch+var_64]
push	eax
mov	ecx, edi
call	edx
fldz
push	eax
fst	[esp+74h+var_48]
fst	[esp+74h+var_44]
lea	eax, [esp+74h+var_48]
fst	[esp+74h+var_40]
push	eax
lea	ecx, [esp+78h+var_20]
fstp	[esp+78h+var_3C]
call	sub_64EF10
fld	[esp+70h+var_58]
fadd	[esp+70h+var_50]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+70h+var_68]
fld	[esp+70h+var_4C]
fld	st
fld	[esp+70h+var_54]
fld	st
faddp	st(2), st
fxch	st(1)
fmul	st, st(3)
fstp	[esp+70h+var_64]
fld	[esp+70h+var_40]
fadd	[esp+70h+var_48]
fmul	st, st(3)
fstp	[esp+70h+var_58]
fld	[esp+70h+var_3C]
fld	st
fld	[esp+70h+var_44]
fld	st
faddp	st(2), st
fxch	st(1)
fmulp	st(5), st
fxch	st(4)
fstp	[esp+70h+var_54]
fxch	st(1)
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+70h+var_4]
fldz
fld	[esp+70h+var_4]
fcom	st(1)
pop	edi
pop	esi
fnstsw	ax
test	ah, 1
jz	short loc_6912BA
fchs

loc_6912BA:
fstp	[esp+68h+var_4]
fld	ds:flt_15FCCD8
fcom	[esp+68h+var_4]
fnstsw	ax
test	ah, 1
jz	short loc_691340
fxch	st(2)
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+68h+var_4]
fld	[esp+68h+var_4]
fcom	st(2)
fnstsw	ax
test	ah, 1
jz	short loc_6912E8
fchs

loc_6912E8:
fstp	[esp+68h+var_4]
fcom	[esp+68h+var_4]
fnstsw	ax
test	ah, 1
jz	short loc_691344
fld	[esp+68h+var_64]
fld	st
fld	[esp+68h+var_54]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+68h+var_4]
fld	[esp+68h+var_4]
fcom	st(4)
fnstsw	ax
fstp	st(4)
fxch	st(3)
test	ah, 1
jz	short loc_69131E
fchs

loc_69131E:
fstp	[esp+68h+var_4]
fxch	st(1)
fcomp	[esp+68h+var_4]
fnstsw	ax
test	ah, 1
jz	short loc_691348
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_69135C

loc_691338:
xor	eax, eax
add	esp, 60h
retn	8

loc_691340:
fstp	st(1)
fstp	st(1)

loc_691344:
fstp	st(1)
jmp	short loc_69134A

loc_691348:
fstp	st

loc_69134A:
fstp	st
fld	[esp+68h+var_68]
fld	[esp+68h+var_58]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_691338

loc_69135C:
mov	eax, 1
add	esp, 60h
retn	8
sub_6911B0 endp	; sp-analysis failed

align 10h



sub_691370 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
movzx	edx, byte ptr [ecx+eax+27F4h]
imul	edx, 34h
lea	ecx, [edx+eax+24B0h]
mov	ecx, [ecx+18h]
push	esi
test	ecx, ecx
jz	short loc_6913AC
push	eax
call	sub_654F00
mov	esi, eax
test	esi, esi
jz	short loc_6913AC
inc	dword ptr [esi+4]
mov	ecx, esi
call	sub_64A400
mov	eax, esi
pop	esi
retn	4

loc_6913AC:
xor	eax, eax
pop	esi
retn	4
sub_691370 endp

align 10h



sub_6913C0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 40h
push	esi
mov	esi, ecx
mov	edx, [esi+28h]
xor	eax, eax
push	edi
test	edx, edx
jbe	short loc_6913E6
mov	edi, [esi+24h]
mov	ecx, edi

loc_6913D5:
cmp	dword ptr [ecx], 0
jz	loc_6914AC
inc	eax
add	ecx, 8
cmp	eax, edx
jb	short loc_6913D5

loc_6913E6:
xor	edi, edi

loc_6913E8:
lea	ecx, [esp+48h+var_18]
call	sub_64E8E0
lea	eax, [esp+48h+var_18]
push	eax
mov	ecx, edi
call	sub_654AF0
fld	dword ptr [esi+0B0h]
fstp	[esp+48h+var_30]
lea	ecx, [esp+48h+arg_8]
fld	dword ptr [esi+0B4h]
push	ecx
fstp	[esp+4Ch+var_2C]
lea	ecx, [esp+4Ch+var_30]
fld	dword ptr [esi+0B8h]
fstp	[esp+4Ch+var_28]
fld	dword ptr [esi+0BCh]
fstp	[esp+4Ch+var_24]
fld	dword ptr [esi+0C0h]
fstp	[esp+4Ch+var_20]
fld	dword ptr [esi+0C4h]
fstp	[esp+4Ch+var_1C]
call	sub_64EAF0
lea	edx, [esp+48h+var_18]
push	edx
lea	ecx, [esp+4Ch+var_30]
call	sub_64EAF0
mov	eax, [esp+48h+arg_4]
fld	dword ptr [eax]
mov	esi, [esp+48h+arg_0]
fld	ds:dbl_15FCE20
lea	ecx, [esp+48h+var_30]
fmul	st(1), st
fxch	st(1)
fstp	[esp+48h+var_40]
fld	dword ptr [eax+4]
fmul	st, st(1)
fstp	[esp+48h+var_3C]
fld	dword ptr [eax+8]
fmul	st, st(1)
fstp	[esp+48h+var_38]
fmul	dword ptr [eax+0Ch]
lea	eax, [esp+48h+var_40]
push	eax
push	esi
fstp	[esp+50h+var_34]
fldz
fst	dword ptr [esi]
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
call	sub_64EF10
pop	edi
mov	eax, esi
pop	esi
add	esp, 40h
retn	20h

loc_6914AC:
mov	edi, [edi+eax*8+4]
jmp	loc_6913E8
sub_6913C0 endp

align 10h



sub_6914C0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [ebx+324h]
push	edi
test	ecx, ecx
jnz	short loc_6914D6
lea	ecx, [ebx+28h]

loc_6914D6:
lea	edi, [esi+4]
push	edi
call	sub_6AAC90
movzx	eax, byte ptr [edi]
movzx	ecx, byte ptr [esi+5]
movzx	edx, byte ptr [esi+6]
push	eax
push	ecx
push	edx
push	offset aSetbackgroundc ; "  SetBackgroundColor:	(%d %d %d)\n"
add	ebx, 14h
push	ebx
call	nullsub_2
add	esp, 14h
pop	edi
pop	esi
pop	ebx
retn	4
sub_6914C0 endp

align 10h



sub_691510 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	esi
mov	esi, ecx
or	byte ptr [esi+20h], 10h
mov	eax, [esi+0Ch]
mov	bl, [esi+20h]
push	edi
mov	edi, [esp+18h+arg_0]
mov	[esi+10h], eax
movzx	ecx, word ptr [edi+0Ch]
test	cx, cx
jz	short loc_691559
mov	dl, [edi+0Fh]
test	dl, 40h
jnz	short loc_691551
test	dl, dl
jns	short loc_691551
cmp	word ptr [edi+0Ch], 0
jz	short loc_691551
movzx	ecx, cx
not	ecx
and	ecx, eax
mov	[esi+0Ch], ecx
jmp	short loc_691559

loc_691551:
movzx	edx, cx
or	edx, eax
mov	[esi+0Ch], edx

loc_691559:
fld	dword ptr [edi+4]
lea	eax, [edi+4]
push	ebp
lea	ebp, [esi+14h]
mov	[esp+1Ch+var_C], eax
mov	[esp+1Ch+var_4], ebp
call	__ftol2_sse
fld	dword ptr [ebp+0]
mov	[esp+1Ch+arg_0], eax
call	__ftol2_sse
mov	ecx, [esp+1Ch+arg_0]
pop	ebp
cmp	ecx, eax
jnz	short loc_6915A0
fld	dword ptr [edi+8]
call	__ftol2_sse
fld	dword ptr [esi+18h]
mov	edi, eax
call	__ftol2_sse
cmp	edi, eax
jnz	short loc_6915A0
and	bl, 0F7h
jmp	short loc_6915A3

loc_6915A0:
or	bl, 8

loc_6915A3:
mov	eax, [esp+18h+var_C]
mov	[esi+20h], bl
fld	dword ptr [eax]
fstp	[esp+18h+var_C]
pop	edi
fld	dword ptr [eax+4]
mov	eax, [esp+14h+var_4]
fstp	[esp+14h+var_8]
pop	esi
fld	[esp+10h+var_C]
pop	ebx
fstp	dword ptr [eax]
fld	[esp+0Ch+var_8]
fstp	dword ptr [eax+4]
add	esp, 0Ch
retn	4
sub_691510 endp

align 10h



sub_6915E0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_691630
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6915F4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_691613
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_69160D
call	sub_64A400

loc_69160D:
mov	dword ptr [esi], 0FFFFFFFEh

loc_691613:
add	edi, 0Ch
sub	ebp, 1
jnz	short loc_6915F4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_691630:
pop	ebx
retn
sub_6915E0 endp

align 10h



sub_691640 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
xor	edx, edx
cmp	eax, edx
jnz	short loc_691654
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	[eax+4], edx
retn	4

loc_691654:
push	esi
mov	esi, [eax+4]
add	eax, 8
jmp	short loc_691660
align 10h

loc_691660:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_69166D
inc	edx
add	eax, 0Ch
cmp	edx, esi
jbe	short loc_691660

loc_69166D:
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	esi
mov	[eax+4], edx
retn	4
sub_691640 endp

align 10h



sub_691680 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_691691
call	sub_650DF0

loc_691691:
mov	dword ptr [esi], 0FFFFFFFEh
pop	esi
retn
sub_691680 endp

align 10h



sub_6916A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6916D0
mov	eax, [edi]
test	eax, eax
jz	short loc_6916C5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6916C5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6916D0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_691703
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_691703:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*8]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6916A0 endp

align 10h



sub_691730 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, ecx
cmp	dword ptr [edi], 0
mov	[esp+8+var_4], edi
jz	loc_691807
push	ebx
mov	ebx, [esp+0Ch+arg_0]
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_69174F
inc	dword ptr [ecx+4]

loc_69174F:
push	esi
mov	[esp+10h+arg_0], ecx
mov	eax, 4
mov	esi, 1505h
mov	edi, edi

loc_691760:
movzx	edx, byte ptr [esp+eax+13h]
imul	esi, 1003Fh
dec	eax
add	esi, edx
test	eax, eax
ja	short loc_691760
test	ecx, ecx
jz	short loc_69177B
call	sub_64A400

loc_69177B:
mov	ecx, [edi]
mov	eax, [ecx+4]
and	eax, esi
lea	edx, [eax+eax*2]
cmp	dword ptr [ecx+edx*4+8], 0FFFFFFFEh
lea	esi, [ecx+edx*4+8]
jz	short loc_691805
cmp	[esi+4], eax
jnz	short loc_691805
mov	edi, eax
or	edx, 0FFFFFFFFh
push	ebp
jmp	short loc_6917A0
align 10h

loc_6917A0:
cmp	[esi+4], edi
jnz	short loc_6917AC
mov	ebp, [esi+8]
cmp	ebp, [ebx]
jz	short loc_6917BE

loc_6917AC:
mov	edx, eax
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_691804
lea	esi, [eax+eax*2]
lea	esi, [ecx+esi*4+8]
jmp	short loc_6917A0

loc_6917BE:
cmp	edi, eax
mov	eax, [esi]
jnz	short loc_6917E3
cmp	eax, 0FFFFFFFFh
jz	short loc_6917EA
lea	eax, [eax+eax*2]
lea	edi, [ecx+eax*4+8]
mov	ecx, esi
call	sub_693FA0
push	edi
mov	ecx, esi
call	sub_7005B0
mov	esi, edi
jmp	short loc_6917EA

loc_6917E3:
lea	edx, [edx+edx*2]
mov	[ecx+edx*4+8], eax

loc_6917EA:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6917F6
call	sub_64A400

loc_6917F6:
mov	ecx, [esp+14h+var_4]
mov	dword ptr [esi], 0FFFFFFFEh
mov	eax, [ecx]
dec	dword ptr [eax]

loc_691804:
pop	ebp

loc_691805:
pop	esi
pop	ebx

loc_691807:
pop	edi
pop	ecx
retn	4
sub_691730 endp

align 10h



sub_691810 proc	near

var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, eax
sub	edx, ecx
sub	esp, 14Ch
cmp	edx, 2
jb	loc_691C38
push	ebp
push	ebx
lea	edx, [esp+154h+var_140]
mov	ebp, ecx
push	esi
mov	[esp+158h+var_144], edx
mov	[esp+158h+var_14C], ebp
push	edi

loc_69183D:
mov	[esp+15Ch+var_148], eax

loc_691841:
mov	eax, [esp+15Ch+var_148]
sub	eax, ebp
cmp	eax, 9
jle	loc_691B5F
mov	ecx, [esp+15Ch+arg_0]
mov	esi, [ecx]
cdq
sub	eax, edx
sar	eax, 1
add	eax, ebp
lea	edi, [esi+eax*4]
mov	eax, [esi+ebp*4]
test	eax, eax
jz	short loc_69186D
inc	dword ptr [eax+4]

loc_69186D:
mov	eax, [edi]
mov	ebx, [esi+ebp*4]
test	eax, eax
jz	short loc_691879
inc	dword ptr [eax+4]

loc_691879:
mov	ecx, [esi+ebp*4]
test	ecx, ecx
jz	short loc_691885
call	sub_64A400

loc_691885:
mov	edx, [edi]
mov	[esi+ebp*4], edx
test	ebx, ebx
jz	short loc_691891
inc	dword ptr [ebx+4]

loc_691891:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_69189C
call	sub_64A400

loc_69189C:
mov	[edi], ebx
test	ebx, ebx
jz	short loc_6918A9
mov	ecx, ebx
call	sub_64A400

loc_6918A9:
mov	eax, [esp+15Ch+arg_0]
mov	ebx, [esp+15Ch+var_148]
mov	esi, [eax]
mov	ebp, [esp+15Ch+var_14C]
mov	ecx, [esi+ebx*4-4]
mov	edx, [esi+ebp*4+4]
mov	ax, [ecx+0A4h]
dec	ebx
inc	ebp
cmp	ax, [edx+0A4h]
jge	short loc_69191D
mov	eax, ecx
test	eax, eax
jz	short loc_6918DD
inc	dword ptr [eax+4]

loc_6918DD:
mov	eax, [esi+ebp*4]
mov	edi, [esi+ebx*4]
test	eax, eax
jz	short loc_6918EA
inc	dword ptr [eax+4]

loc_6918EA:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_6918F6
call	sub_64A400

loc_6918F6:
mov	ecx, [esi+ebp*4]
mov	[esi+ebx*4], ecx
test	edi, edi
jz	short loc_691903
inc	dword ptr [edi+4]

loc_691903:
mov	ecx, [esi+ebp*4]
test	ecx, ecx
jz	short loc_69190F
call	sub_64A400

loc_69190F:
mov	[esi+ebp*4], edi
test	edi, edi
jz	short loc_69191D
mov	ecx, edi
call	sub_64A400

loc_69191D:
mov	edx, [esp+15Ch+arg_0]
mov	esi, [edx]
mov	ecx, [esp+15Ch+var_14C]
mov	eax, [esi+ecx*4]
mov	edx, [esi+ebp*4]
mov	ax, [eax+0A4h]
cmp	ax, [edx+0A4h]
jge	short loc_69198E
mov	eax, [esi+ecx*4]
test	eax, eax
jz	short loc_69194A
inc	dword ptr [eax+4]

loc_69194A:
mov	eax, [esi+ebp*4]
mov	edi, [esi+ecx*4]
test	eax, eax
jz	short loc_691957
inc	dword ptr [eax+4]

loc_691957:
mov	ecx, [esi+ecx*4]
test	ecx, ecx
jz	short loc_691963
call	sub_64A400

loc_691963:
mov	ecx, [esi+ebp*4]
mov	edx, [esp+15Ch+var_14C]
mov	[esi+edx*4], ecx
test	edi, edi
jz	short loc_691974
inc	dword ptr [edi+4]

loc_691974:
mov	ecx, [esi+ebp*4]
test	ecx, ecx
jz	short loc_691980
call	sub_64A400

loc_691980:
mov	[esi+ebp*4], edi
test	edi, edi
jz	short loc_69198E
mov	ecx, edi
call	sub_64A400

loc_69198E:
mov	eax, [esp+15Ch+arg_0]
mov	esi, [eax]
mov	ecx, [esi+ebx*4]
mov	edx, [esp+15Ch+var_14C]
mov	eax, [esi+edx*4]
mov	cx, [ecx+0A4h]
cmp	cx, [eax+0A4h]
jge	short loc_691A07
mov	eax, [esi+ebx*4]
test	eax, eax
jz	short loc_6919BB
inc	dword ptr [eax+4]

loc_6919BB:
mov	edx, [esp+15Ch+var_14C]
mov	eax, [esi+edx*4]
mov	edi, [esi+ebx*4]
test	eax, eax
jz	short loc_6919CC
inc	dword ptr [eax+4]

loc_6919CC:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_6919DC
call	sub_64A400
mov	edx, [esp+15Ch+var_14C]

loc_6919DC:
mov	eax, [esi+edx*4]
mov	[esi+ebx*4], eax
test	edi, edi
jz	short loc_6919E9
inc	dword ptr [edi+4]

loc_6919E9:
mov	ecx, [esi+edx*4]
test	ecx, ecx
jz	short loc_6919F9
call	sub_64A400
mov	edx, [esp+15Ch+var_14C]

loc_6919F9:
mov	[esi+edx*4], edi
test	edi, edi
jz	short loc_691A07

loc_691A00:
mov	ecx, edi
call	sub_64A400

loc_691A07:
mov	edx, 1
lea	esp, [esp+0]

loc_691A10:
mov	ecx, [esp+15Ch+arg_0]
mov	esi, [ecx]
mov	eax, [esp+15Ch+var_14C]
mov	ecx, [esi+eax*4]
movzx	ecx, word ptr [ecx+0A4h]
lea	eax, [esi+ebp*4]
lea	ebx, [ebx+0]

loc_691A30:
mov	edi, [eax+4]
add	eax, 4
add	ebp, edx
cmp	[edi+0A4h], cx
jl	short loc_691A30
lea	eax, [esi+ebx*4]

loc_691A44:
mov	edi, [eax-4]
sub	eax, 4
sub	ebx, edx
cmp	cx, [edi+0A4h]
jl	short loc_691A44
cmp	ebp, ebx
jg	short loc_691AAF
mov	eax, [esi+ebp*4]
test	eax, eax
jz	short loc_691A63
add	[eax+4], edx

loc_691A63:
mov	eax, [esi+ebx*4]
mov	edi, [esi+ebp*4]
test	eax, eax
jz	short loc_691A70
add	[eax+4], edx

loc_691A70:
mov	ecx, [esi+ebp*4]
test	ecx, ecx
jz	short loc_691A81
call	sub_64A400
mov	edx, 1

loc_691A81:
mov	eax, [esi+ebx*4]
mov	[esi+ebp*4], eax
test	edi, edi
jz	short loc_691A8E
add	[edi+4], edx

loc_691A8E:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_691A9F
call	sub_64A400
mov	edx, 1

loc_691A9F:
mov	[esi+ebx*4], edi
test	edi, edi
jz	loc_691A10
jmp	loc_691A00

loc_691AAF:
mov	ecx, [esp+15Ch+arg_0]
mov	esi, [ecx]
mov	eax, [esp+15Ch+var_14C]
mov	eax, [esi+eax*4]
test	eax, eax
jz	short loc_691AC6
add	[eax+4], edx

loc_691AC6:
mov	eax, [esi+ebx*4]
mov	ecx, [esp+15Ch+var_14C]
mov	edi, [esi+ecx*4]
test	eax, eax
jz	short loc_691AD7
add	[eax+4], edx

loc_691AD7:
mov	eax, [esp+15Ch+var_14C]
mov	ecx, [esi+eax*4]
test	ecx, ecx
jz	short loc_691AEC
call	sub_64A400
mov	edx, 1

loc_691AEC:
mov	ecx, [esi+ebx*4]
mov	eax, [esp+15Ch+var_14C]
mov	[esi+eax*4], ecx
test	edi, edi
jz	short loc_691AFD
add	[edi+4], edx

loc_691AFD:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_691B09
call	sub_64A400

loc_691B09:
mov	[esi+ebx*4], edi
test	edi, edi
jz	short loc_691B17
mov	ecx, edi
call	sub_64A400

loc_691B17:
mov	ecx, [esp+15Ch+var_148]
mov	eax, ebx
sub	eax, [esp+15Ch+var_14C]
mov	edx, ecx
sub	edx, ebp
cmp	eax, edx
mov	eax, [esp+15Ch+var_144]
jle	short loc_691B46
mov	ecx, [esp+15Ch+var_14C]
mov	[eax], ecx
mov	[eax+4], ebx
add	eax, 8
mov	[esp+15Ch+var_14C], ebp
mov	[esp+15Ch+var_144], eax
jmp	loc_691841

loc_691B46:
mov	[eax], ebp
mov	ebp, [esp+15Ch+var_14C]
mov	[eax+4], ecx
add	eax, 8
mov	[esp+15Ch+var_148], ebx
mov	[esp+15Ch+var_144], eax
jmp	loc_691841

loc_691B5F:
mov	ebx, [esp+15Ch+var_14C]
lea	ebp, [ebx+1]
cmp	ebp, [esp+15Ch+var_148]
jge	loc_691C10

loc_691B70:
mov	edx, [esp+15Ch+arg_0]
mov	eax, [edx]
mov	edx, [eax+ebx*4+4]
mov	ecx, [eax+ebx*4]
lea	esi, [eax+ebx*4]
mov	ax, [edx+0A4h]
cmp	ax, [ecx+0A4h]
jge	short loc_691C03

loc_691B93:
mov	eax, [esi+4]
test	eax, eax
jz	short loc_691B9D
inc	dword ptr [eax+4]

loc_691B9D:
mov	eax, [esi]
mov	edi, [esi+4]
test	eax, eax
jz	short loc_691BA9
inc	dword ptr [eax+4]

loc_691BA9:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_691BB5
call	sub_64A400

loc_691BB5:
mov	ecx, [esi]
mov	[esi+4], ecx
test	edi, edi
jz	short loc_691BC1
inc	dword ptr [edi+4]

loc_691BC1:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_691BCC
call	sub_64A400

loc_691BCC:
mov	[esi], edi
test	edi, edi
jz	short loc_691BD9
mov	ecx, edi
call	sub_64A400

loc_691BD9:
cmp	ebx, [esp+15Ch+var_14C]
jz	short loc_691C03
mov	edx, [esp+15Ch+arg_0]
mov	eax, [edx]
dec	ebx
mov	edx, [eax+ebx*4+4]
mov	ecx, [eax+ebx*4]
lea	esi, [eax+ebx*4]
mov	ax, [edx+0A4h]
cmp	ax, [ecx+0A4h]
jl	short loc_691B93

loc_691C03:
mov	ebx, ebp
inc	ebp
cmp	ebp, [esp+15Ch+var_148]
jl	loc_691B70

loc_691C10:
mov	eax, [esp+15Ch+var_144]
lea	ecx, [esp+15Ch+var_140]
cmp	eax, ecx
jbe	short loc_691C34
mov	edx, [eax-8]
sub	eax, 8
mov	[esp+15Ch+var_144], eax
mov	eax, [eax+4]
mov	[esp+15Ch+var_14C], edx
mov	ebp, edx
jmp	loc_69183D

loc_691C34:
pop	edi
pop	esi
pop	ebx
pop	ebp

loc_691C38:
add	esp, 14Ch
retn
sub_691810 endp

align 10h



sub_691C40 proc	near

var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	eax, [esp+arg_8]
sub	esp, 150h
push	ebx
mov	ebx, [esp+154h+arg_4]
mov	ecx, eax
sub	ecx, ebx
cmp	ecx, 2
jb	loc_6920B1
push	ebp
push	esi
lea	edx, [esp+15Ch+var_140]
push	edi
mov	[esp+160h+var_144], edx
mov	[esp+160h+var_14C], ebx
mov	[esp+160h+var_148], eax

loc_691C72:
mov	eax, [esp+160h+var_148]
sub	eax, ebx
cmp	eax, 9
jle	loc_691FBD
mov	ecx, [esp+160h+arg_0]
mov	esi, [ecx]
cdq
sub	eax, edx
sar	eax, 1
add	eax, ebx
lea	edi, [esi+eax*4]
mov	eax, [esi+ebx*4]
test	eax, eax
jz	short loc_691C9E
inc	dword ptr [eax+4]

loc_691C9E:
mov	eax, [edi]
mov	ebp, [esi+ebx*4]
test	eax, eax
jz	short loc_691CAA
inc	dword ptr [eax+4]

loc_691CAA:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_691CB6
call	sub_64A400

loc_691CB6:
mov	edx, [edi]
mov	[esi+ebx*4], edx
test	ebp, ebp
jz	short loc_691CC2
inc	dword ptr [ebp+4]

loc_691CC2:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_691CCD
call	sub_64A400

loc_691CCD:
mov	[edi], ebp
test	ebp, ebp
jz	short loc_691CDA
mov	ecx, ebp
call	sub_64A400

loc_691CDA:
mov	eax, [esp+160h+arg_0]
mov	eax, [eax]
mov	ecx, [eax+ebx*4+4]
mov	edi, [esp+160h+var_148]
mov	eax, [eax+edi*4-4]
lea	ebp, [ebx+1]
dec	edi
push	ecx
push	eax
lea	ecx, [esp+168h+arg_C]
call	sub_6911B0
test	al, al
jz	short loc_691D66
mov	ecx, [esp+160h+arg_0]
mov	esi, [ecx]
mov	eax, [esi+edi*4]
test	eax, eax
jz	short loc_691D18
inc	dword ptr [eax+4]

loc_691D18:
mov	ecx, [esi+ebp*4]
mov	eax, [esi+edi*4]
mov	[esp+160h+var_150], eax
test	ecx, ecx
jz	short loc_691D29
inc	dword ptr [ecx+4]

loc_691D29:
mov	ecx, [esi+edi*4]
test	ecx, ecx
jz	short loc_691D39
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691D39:
mov	edx, [esi+ebp*4]
mov	[esi+edi*4], edx
test	eax, eax
jz	short loc_691D46
inc	dword ptr [eax+4]

loc_691D46:
mov	ecx, [esi+ebp*4]
test	ecx, ecx
jz	short loc_691D56
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691D56:
mov	[esi+ebp*4], eax
test	eax, eax
jz	short loc_691D66
mov	ecx, [esp+160h+var_150]
call	sub_64A400

loc_691D66:
mov	eax, [esp+160h+arg_0]
mov	eax, [eax]
mov	ecx, [eax+ebp*4]
mov	eax, [eax+ebx*4]
push	ecx
push	eax
lea	ecx, [esp+168h+arg_C]
call	sub_6911B0
test	al, al
jz	short loc_691DE8
mov	ecx, [esp+160h+arg_0]
mov	esi, [ecx]
mov	eax, [esi+ebx*4]
test	eax, eax
jz	short loc_691D9A
inc	dword ptr [eax+4]

loc_691D9A:
mov	ecx, [esi+ebp*4]
mov	eax, [esi+ebx*4]
mov	[esp+160h+var_150], eax
test	ecx, ecx
jz	short loc_691DAB
inc	dword ptr [ecx+4]

loc_691DAB:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_691DBB
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691DBB:
mov	edx, [esi+ebp*4]
mov	[esi+ebx*4], edx
test	eax, eax
jz	short loc_691DC8
inc	dword ptr [eax+4]

loc_691DC8:
mov	ecx, [esi+ebp*4]
test	ecx, ecx
jz	short loc_691DD8
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691DD8:
mov	[esi+ebp*4], eax
test	eax, eax
jz	short loc_691DE8
mov	ecx, [esp+160h+var_150]
call	sub_64A400

loc_691DE8:
mov	eax, [esp+160h+arg_0]
mov	eax, [eax]
mov	ecx, [eax+ebx*4]
mov	eax, [eax+edi*4]
push	ecx
push	eax
lea	ecx, [esp+168h+arg_C]
call	sub_6911B0
test	al, al
jz	short loc_691E74
mov	ecx, [esp+160h+arg_0]
mov	esi, [ecx]
mov	eax, [esi+edi*4]
test	eax, eax
jz	short loc_691E1C
inc	dword ptr [eax+4]

loc_691E1C:
mov	ecx, [esi+ebx*4]
mov	eax, [esi+edi*4]
mov	[esp+160h+var_150], eax
test	ecx, ecx
jz	short loc_691E2D
inc	dword ptr [ecx+4]

loc_691E2D:
mov	ecx, [esi+edi*4]
test	ecx, ecx
jz	short loc_691E3D
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691E3D:
mov	edx, [esi+ebx*4]
mov	[esi+edi*4], edx
test	eax, eax
jz	short loc_691E4A
inc	dword ptr [eax+4]

loc_691E4A:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_691E5A
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691E5A:
mov	[esi+ebx*4], eax
test	eax, eax
jz	short loc_691E74
mov	ecx, [esp+160h+var_150]
call	sub_64A400
jmp	short loc_691E74
align 10h

loc_691E70:
mov	ebx, [esp+160h+var_14C]

loc_691E74:
mov	esi, [esp+160h+arg_0]
jmp	short loc_691E80
align 10h

loc_691E80:
mov	eax, [esi]
mov	ecx, [eax+ebx*4]
mov	eax, [eax+ebp*4+4]
inc	ebp
push	ecx
push	eax
lea	ecx, [esp+168h+arg_C]
call	sub_6911B0
test	al, al
jnz	short loc_691E80
lea	esp, [esp+0]

loc_691EA0:
mov	eax, [esi]
mov	ecx, [eax+edi*4-4]
mov	eax, [eax+ebx*4]
dec	edi
push	ecx
push	eax
lea	ecx, [esp+168h+arg_C]
call	sub_6911B0
test	al, al
jnz	short loc_691EA0
cmp	ebp, edi
jg	short loc_691F1C
mov	eax, [esp+160h+arg_0]
mov	esi, [eax]
mov	eax, [esi+ebp*4]
test	eax, eax
jz	short loc_691ED3
inc	dword ptr [eax+4]

loc_691ED3:
mov	eax, [esi+edi*4]
mov	ebx, [esi+ebp*4]
test	eax, eax
jz	short loc_691EE0
inc	dword ptr [eax+4]

loc_691EE0:
mov	ecx, [esi+ebp*4]
test	ecx, ecx
jz	short loc_691EEC
call	sub_64A400

loc_691EEC:
mov	ecx, [esi+edi*4]
mov	[esi+ebp*4], ecx
test	ebx, ebx
jz	short loc_691EF9
inc	dword ptr [ebx+4]

loc_691EF9:
mov	ecx, [esi+edi*4]
test	ecx, ecx
jz	short loc_691F05
call	sub_64A400

loc_691F05:
mov	[esi+edi*4], ebx
test	ebx, ebx
jz	loc_691E70
mov	ecx, ebx
call	sub_64A400
jmp	loc_691E70

loc_691F1C:
mov	edx, [esp+160h+arg_0]
mov	esi, [edx]
mov	eax, [esi+ebx*4]
test	eax, eax
jz	short loc_691F2F
inc	dword ptr [eax+4]

loc_691F2F:
mov	ecx, [esi+edi*4]
mov	eax, [esi+ebx*4]
mov	[esp+160h+var_150], eax
test	ecx, ecx
jz	short loc_691F40
inc	dword ptr [ecx+4]

loc_691F40:
mov	ecx, [esi+ebx*4]
test	ecx, ecx
jz	short loc_691F50
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691F50:
mov	ecx, [esi+edi*4]
mov	[esi+ebx*4], ecx
test	eax, eax
jz	short loc_691F5D
inc	dword ptr [eax+4]

loc_691F5D:
mov	ecx, [esi+edi*4]
test	ecx, ecx
jz	short loc_691F6D
call	sub_64A400
mov	eax, [esp+160h+var_150]

loc_691F6D:
mov	[esi+edi*4], eax
test	eax, eax
jz	short loc_691F7D
mov	ecx, [esp+160h+var_150]
call	sub_64A400

loc_691F7D:
mov	ecx, [esp+160h+var_148]
mov	edx, ecx
mov	eax, edi
sub	eax, ebx
sub	edx, ebp
cmp	eax, edx
mov	eax, [esp+160h+var_144]
jle	short loc_691FA8
mov	[eax], ebx
mov	[eax+4], edi
mov	ebx, ebp
add	eax, 8
mov	[esp+160h+var_14C], ebx
mov	[esp+160h+var_144], eax
jmp	loc_691C72

loc_691FA8:
mov	[eax], ebp
mov	[eax+4], ecx
add	eax, 8
mov	[esp+160h+var_148], edi
mov	[esp+160h+var_144], eax
jmp	loc_691C72

loc_691FBD:
mov	ebx, [esp+160h+var_14C]
lea	eax, [ebx+1]
cmp	eax, [esp+160h+var_148]
mov	[esp+160h+var_150], eax
jge	loc_692086
mov	ebp, [esp+160h+arg_0]
lea	esp, [esp+0]

loc_691FE0:
mov	ecx, [ebp+0]
lea	eax, [ecx+ebx*4]
mov	ecx, [eax]
mov	eax, [eax+4]
push	ecx
push	eax
lea	ecx, [esp+168h+arg_C]
call	sub_6911B0
test	al, al
jz	short loc_692071
lea	ecx, [ecx+0]

loc_692000:
mov	edx, [ebp+0]
mov	eax, [edx+ebx*4+4]
lea	esi, [edx+ebx*4]
test	eax, eax
jz	short loc_692011
inc	dword ptr [eax+4]

loc_692011:
mov	eax, [esi]
mov	edi, [esi+4]
test	eax, eax
jz	short loc_69201D
inc	dword ptr [eax+4]

loc_69201D:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_692029
call	sub_64A400

loc_692029:
mov	eax, [esi]
mov	[esi+4], eax
test	edi, edi
jz	short loc_692035
inc	dword ptr [edi+4]

loc_692035:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_692040
call	sub_64A400

loc_692040:
mov	[esi], edi
test	edi, edi
jz	short loc_69204D
mov	ecx, edi
call	sub_64A400

loc_69204D:
cmp	ebx, [esp+160h+var_14C]
jz	short loc_692071
mov	ecx, [ebp+0]
dec	ebx
lea	eax, [ecx+ebx*4]
mov	ecx, [eax]
mov	eax, [eax+4]
push	ecx
push	eax
lea	ecx, [esp+168h+arg_C]
call	sub_6911B0
test	al, al
jnz	short loc_692000

loc_692071:
mov	eax, [esp+160h+var_150]
mov	ebx, eax
inc	eax
cmp	eax, [esp+160h+var_148]
mov	[esp+160h+var_150], eax
jl	loc_691FE0

loc_692086:
mov	eax, [esp+160h+var_144]
lea	edx, [esp+160h+var_140]
cmp	eax, edx
jbe	short loc_6920AE
mov	ecx, [eax-8]
mov	edx, [eax-4]
sub	eax, 8
mov	[esp+160h+var_144], eax
mov	[esp+160h+var_14C], ecx
mov	[esp+160h+var_148], edx
mov	ebx, ecx
jmp	loc_691C72

loc_6920AE:
pop	edi
pop	esi
pop	ebp

loc_6920B1:
pop	ebx
add	esp, 150h
retn
sub_691C40 endp

align 10h



sub_6920C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_692122
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_692122
push	ebp
lea	esp, [esp+0]

loc_6920F0:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_692108
mov	ebp, [esp+10h+arg_0]
mov	ebp, [ebp+0]
cmp	edx, [ebp+0]
jz	short loc_69211B

loc_692108:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_692118
lea	ecx, [eax+eax*2]
lea	ecx, [edi+ecx*4+8]
jmp	short loc_6920F0

loc_692118:
or	eax, 0FFFFFFFFh

loc_69211B:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_692122:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_6920C0 endp

align 10h



sub_692130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_69218F
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_69218F
push	ebp
lea	esp, [esp+0]

loc_692160:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_692175
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_692188

loc_692175:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_692185
lea	ecx, [eax+eax*2]
lea	ecx, [edi+ecx*4+8]
jmp	short loc_692160

loc_692185:
or	eax, 0FFFFFFFFh

loc_692188:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_69218F:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_692130 endp

align 10h



sub_6921A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jz	short loc_6921AC
inc	dword ptr [eax]

loc_6921AC:
mov	eax, [esi+4]
test	eax, eax
jz	short loc_6921C6
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6921C6
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6921C6:
mov	ecx, [esi]
mov	edi, [esp+8+arg_0]
mov	[esi+4], ecx
mov	al, [esi+20h]
mov	dl, al
add	dl, dl
xor	dl, al
and	dl, 2
xor	dl, al
mov	[esi+20h], dl
test	edi, edi
jz	short loc_69221D
push	ebx
mov	ecx, edi
call	sub_64A4A0
mov	ebx, eax
mov	eax, [esi]
test	eax, eax
jz	short loc_692207
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_692207
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_692207:
test	edi, edi
setz	cl
xor	cl, [esi+20h]
mov	[esi], ebx
pop	ebx
and	cl, 1
xor	[esi+20h], cl
pop	edi
pop	esi
retn	4

loc_69221D:
mov	eax, [esi]
test	eax, eax
jz	short loc_692236
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_692236
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_692236:
test	edi, edi
setz	cl
xor	cl, [esi+20h]
pop	edi
and	cl, 1
xor	[esi+20h], cl
mov	dword ptr [esi], 0
pop	esi
retn	4
sub_6921A0 endp

align 10h



sub_692250 proc	near
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
push	edi
xor	edi, edi
lea	ebx, [edi+1]
test	eax, eax
jz	short loc_69227A
cmp	[eax+4], edi
jz	short loc_6922D3
mov	edi, [eax+4]
test	edi, edi
jz	short loc_69227A
add	[edi+4], ebx
add	[edi+4], ebx
mov	ecx, edi
call	sub_64A400

loc_69227A:
mov	eax, [ebp+4]
push	esi
xor	esi, esi
test	eax, eax
jz	short loc_69229D
cmp	[eax+4], esi
jz	short loc_6922EB
mov	esi, [eax+4]
test	esi, esi
jz	short loc_69229D
add	[esi+4], ebx
add	[esi+4], ebx
mov	ecx, esi
call	sub_64A400

loc_69229D:
cmp	edi, esi
jnz	short loc_6922B6
test	edi, edi
jnz	short loc_6922AA
test	[ebp+20h], bl
jz	short loc_6922B6

loc_6922AA:
test	esi, esi
jnz	short loc_6922B4
test	byte ptr [ebp+20h], 2
jz	short loc_6922B6

loc_6922B4:
xor	bl, bl

loc_6922B6:
test	esi, esi
jz	short loc_6922C1
mov	ecx, esi
call	sub_64A400

loc_6922C1:
pop	esi
test	edi, edi
jz	short loc_6922CD
mov	ecx, edi
call	sub_64A400

loc_6922CD:
pop	edi
pop	ebp
mov	al, bl
pop	ebx
retn

loc_6922D3:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6922E6
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6922E6:
mov	[ebp+0], edi
jmp	short loc_69227A

loc_6922EB:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6922FE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6922FE:
mov	[ebp+4], esi
jmp	short loc_69229D
sub_692250 endp

align 10h



sub_692310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, ecx
push	edi
mov	[esi+4], eax
test	ebx, ebx
jz	short loc_692326
inc	dword ptr [ebx]

loc_692326:
mov	edi, [esi+14h]
test	edi, edi
jz	short loc_692349
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_692349
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_692349:
mov	ecx, [esp+0Ch+arg_10]
mov	eax, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_8]
mov	[esi+14h], ebx
mov	[esi+8], ecx
push	eax
lea	ecx, [esi+0Ch]
mov	[esi+10h], edx
mov	dword ptr [esi], 0
call	sub_67A3D0
mov	cl, [esp+0Ch+arg_14]
pop	edi
mov	[esi+18h], cl
mov	dword ptr [esi+3Ch], 0FFFFFFFFh
mov	byte ptr [esi+68h], 0
pop	esi
pop	ebx
retn	18h
sub_692310 endp

align 10h



sub_692390 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h

push	ebx
push	ebp
push	esi
mov	esi, ecx
lea	ebp, [esi+0Ch]
push	edi
mov	ecx, ebp
call	sub_679E30
xor	ebx, ebx
mov	[esi+14h], ebx
mov	[esi+1Ch], bl
mov	[esi+2Ch], bl
mov	[esi+40h], bl
mov	[esi+50h], ebx
mov	[esi+54h], bl
mov	[esi+64h], ebx
cmp	[esp+10h+arg_8], bl
jz	short loc_6923C2
lea	eax, [ebx+4]
jmp	short loc_6923D3

loc_6923C2:
mov	eax, [esp+10h+arg_0]
mov	eax, [eax]
and	eax, 0FFFFFFFCh
add	eax, 8
neg	eax
sbb	eax, eax
inc	eax

loc_6923D3:
mov	[esi+4], eax
mov	edi, [esi+14h]
cmp	edi, ebx
jz	short loc_6923F8
dec	dword ptr [edi]
cmp	[edi], ebx
jg	short loc_6923F8
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6923F8:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_0]
mov	[esi+14h], ebx
mov	[esi+8], ecx
push	edx
mov	ecx, ebp
mov	dword ptr [esi+10h], 0FFFFFFFFh
mov	[esi], ebx
call	sub_67A3D0
mov	al, [esp+10h+arg_C]
pop	edi
mov	[esi+18h], al
mov	[esi+68h], bl
mov	dword ptr [esi+3Ch], 0FFFFFFFFh
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_692390 endp

align 10h



sub_692440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h

push	ebx
push	ebp
push	esi
mov	esi, ecx
lea	ebp, [esi+0Ch]
push	edi
mov	ecx, ebp
call	sub_679E30
xor	ebx, ebx
mov	[esi+14h], ebx
mov	[esi+1Ch], bl
mov	[esi+2Ch], bl
mov	[esi+40h], bl
mov	[esi+50h], ebx
mov	[esi+54h], bl
mov	[esi+64h], ebx
cmp	[esp+10h+arg_C], bl
jz	short loc_692472
lea	eax, [ebx+4]
jmp	short loc_692483

loc_692472:
mov	eax, [esp+10h+arg_4]
mov	eax, [eax]
and	eax, 0FFFFFFFCh
add	eax, 8
neg	eax
sbb	eax, eax
inc	eax

loc_692483:
or	eax, 2
mov	[esi+4], eax
mov	edi, [esi+14h]
cmp	edi, ebx
jz	short loc_6924AB
dec	dword ptr [edi]
cmp	[edi], ebx
jg	short loc_6924AB
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6924AB:
mov	ecx, [esp+10h+arg_8]
mov	eax, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_0]
mov	[esi+14h], ebx
mov	[esi+8], ecx
push	eax
mov	ecx, ebp
mov	[esi+10h], edx
mov	[esi], ebx
call	sub_67A3D0
mov	cl, [esp+10h+arg_10]
pop	edi
mov	[esi+68h], bl
mov	[esi+18h], cl
mov	dword ptr [esi+3Ch], 0FFFFFFFFh
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	14h
sub_692440 endp

align 10h



sub_6924F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h

push	ecx
push	ebx
push	ebp
mov	ebp, ecx
mov	dword ptr [ebp+0], offset off_155F500
push	esi
push	edi
mov	dword ptr [ebp+0], offset off_1437568
mov	dword ptr [ebp+4], 1
mov	dword ptr [ebp+8], 20001h
xor	edi, edi
mov	[ebp+0Ch], edi
lea	ebx, [ebp+18h]
mov	dword ptr [ebp+0], offset off_14375E8
mov	ecx, ebx
mov	[ebp+10h], edi
call	sub_679E30
mov	eax, [esp+14h+arg_4]
lea	ecx, [ebp+1Ch]
push	eax
call	sub_67AF90
lea	ecx, [ebp+20h]
call	sub_679E30
mov	[ebp+24h], edi
mov	[ebp+28h], edi
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	54h
call	eax
mov	esi, eax
cmp	esi, edi
mov	edi, [esp+14h+arg_0]
jz	short loc_692588
mov	ecx, [edi+34h]
mov	edx, [ecx+14h]
mov	eax, [edi+8]
lea	ecx, [edi+8]
mov	[esp+14h+arg_4], edx
mov	edx, [eax]
push	0
call	edx
push	eax
mov	eax, [esp+1Ch+arg_4]
push	eax
mov	ecx, esi
call	sub_6FDCA0
mov	esi, eax
jmp	short loc_69258A

loc_692588:
xor	esi, esi

loc_69258A:
mov	ecx, [ebp+10h]
test	ecx, ecx
jz	short loc_692596
call	sub_64A430

loc_692596:
mov	[ebp+10h], esi
mov	ecx, [edi+34h]
mov	edx, [ecx+1Ch]
mov	eax, [edx+14h]
and	eax, 0FFFFFFFCh
or	eax, 10000h
cmp	[esp+14h+arg_C], 0
mov	[ebp+14h], eax
jz	short loc_6925BC
or	eax, 200000h
mov	[ebp+14h], eax

loc_6925BC:
cmp	dword ptr [edi+30h], 0
jz	short loc_6925E1
mov	ecx, [edi+34h]
mov	eax, [ecx]
mov	edx, [eax+30h]
call	edx
push	eax
mov	ecx, ebx
call	sub_67A2C0
push	ebx
call	sub_702B10
add	esp, 4
test	al, al
jnz	short loc_6925E8

loc_6925E1:
mov	ecx, ebx
call	sub_67A720

loc_6925E8:
cmp	[esp+14h+arg_8], 0
jz	short loc_69262A
lea	edi, [ebp+1Ch]
lea	esi, [esp+14h+var_4]
call	sub_68E3A0
push	eax
lea	ecx, [ebp+20h]
call	sub_67A3D0
mov	esi, [esp+14h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69262A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69262A:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_6924F0 endp

align 10h



sub_692640 proc	near
push	edi
mov	edi, ecx
mov	ecx, [edi+24h]
test	ecx, ecx
jz	short loc_69264F
call	sub_666B00

loc_69264F:
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
mov	esi, [edi+20h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692678
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692678:
mov	esi, [edi+1Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692699
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692699:
mov	esi, [edi+18h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6926BA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6926BA:
mov	ecx, [edi+10h]
pop	esi
pop	ebx
test	ecx, ecx
jz	short loc_6926C8
call	sub_64A430

loc_6926C8:
mov	dword ptr [edi], offset	off_1437568
mov	ecx, edi
pop	edi
jmp	sub_64A3F0
sub_692640 endp

align 10h



sub_6926E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_692640
test	[esp+4+arg_0], 1
jz	short loc_6926FD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6926FD:
mov	eax, esi
pop	esi
retn	4
sub_6926E0 endp

align 10h



sub_692710 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4

sub	esp, 0Ch
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+20h]
mov	ecx, edi
call	sub_679930
test	eax, eax
jbe	short loc_692777
push	edi
lea	ecx, [esp+18h+var_8]
mov	[esp+18h+var_C], 3
call	sub_67AF90
lea	eax, [esi+18h]
push	eax
lea	ecx, [esp+18h+var_4]
call	sub_67AF90
mov	ecx, [esi+14h]
mov	eax, [esi+10h]
push	0
push	0
push	ecx
lea	edx, [esp+20h+var_C]
push	edx
push	eax
call	sub_704640
mov	ecx, [esi+24h]
add	esp, 14h
mov	edi, eax
test	ecx, ecx
jz	short loc_69276B
call	sub_666B00

loc_69276B:
lea	ecx, [esp+14h+var_C]
mov	[esi+24h], edi
call	sub_68E410

loc_692777:
cmp	dword ptr [esi+24h], 0
jnz	short loc_6927D2
lea	eax, [esi+1Ch]
push	eax
lea	ecx, [esp+18h+var_8]
mov	[esp+18h+var_C], 3
call	sub_67AF90
lea	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+18h+var_4]
call	sub_67AF90
mov	edx, [esi+14h]
mov	eax, [esi+10h]
push	0
push	0
push	edx
lea	ecx, [esp+20h+var_C]
push	ecx
push	eax
call	sub_704640
mov	ecx, [esi+24h]
add	esp, 14h
mov	edi, eax
test	ecx, ecx
jz	short loc_6927C6
call	sub_666B00

loc_6927C6:
lea	ecx, [esp+14h+var_C]
mov	[esi+24h], edi
call	sub_68E410

loc_6927D2:		; Value
push	1
add	esi, 28h
push	esi		; Target
call	ds:InterlockedExchange
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_692710 endp

align 10h



sub_6927F0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+64h]
push	edi
lea	edi, [esi+54h]
test	ecx, ecx
jz	short loc_692803
call	sub_64A430

loc_692803:
mov	ecx, edi
call	sub_652830
mov	ecx, [esi+50h]
lea	edi, [esi+40h]
test	ecx, ecx
jz	short loc_692819
call	sub_64A430

loc_692819:
mov	ecx, edi
call	sub_652830
lea	ecx, [esi+2Ch]
call	sub_652830
lea	ecx, [esi+1Ch]
call	sub_652830
mov	edi, [esi+14h]
test	edi, edi
jz	short loc_692853
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_692853
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_692853:
mov	esi, [esi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692878
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692878:
pop	edi
pop	esi
retn
sub_6927F0 endp

align 10h



sub_692880 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_1437568
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 20001h
mov	[esi+0Ch], ebx
mov	dword ptr [esi], offset	off_14375F4
cmp	edi, ebx
jz	short loc_6928B9
mov	ecx, edi
call	sub_64A420

loc_6928B9:
mov	eax, [esp+0Ch+arg_4]
push	eax
lea	ecx, [esi+14h]
mov	[esi+10h], edi
call	sub_67AF90
mov	ecx, [esp+0Ch+arg_8]
push	ecx
lea	ecx, [esi+18h]
call	sub_67AF90
lea	ecx, [esi+1Ch]
call	sub_679E30
mov	[esi+20h], ebx
pop	edi
mov	[esi+24h], ebx
mov	[esi+28h], bl
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_692880 endp

align 10h



sub_6928F0 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+1Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69291C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69291C:
mov	esi, [edi+18h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69293D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69293D:
mov	esi, [edi+14h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69295E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69295E:
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_69296A
call	sub_64A430

loc_69296A:
mov	dword ptr [edi], offset	off_1437568
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_64A3F0
sub_6928F0 endp

align 10h



sub_692980 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6928F0
test	[esp+4+arg_0], 1
jz	short loc_69299D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69299D:
mov	eax, esi
pop	esi
retn	4
sub_692980 endp

align 10h



sub_6929B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4

sub	esp, 10h
push	esi
mov	esi, ecx
push	edi
lea	eax, [esi+18h]
push	eax
lea	ecx, [esp+1Ch+var_8]
mov	[esp+1Ch+var_C], 4
call	sub_67AF90
lea	ecx, [esi+14h]
push	ecx
lea	ecx, [esp+1Ch+var_4]
call	sub_67AF90
lea	ecx, [esp+18h+var_10]
call	sub_679E30
mov	ecx, [esi+10h]
lea	edx, [esp+18h+var_C]
push	edx
lea	eax, [esp+1Ch+var_10]
push	eax
call	sub_6FC480
mov	eax, [esp+18h+var_10]
mov	ecx, [esi+10h]
and	eax, 0FFFFFFFCh
push	0
add	eax, 8
push	eax
call	sub_6FC3E0
mov	edi, eax
test	edi, edi
jz	short loc_692A25
lea	ecx, [esi+20h]
push	ecx
lea	edx, [esi+1Ch]
push	edx
push	edi
call	sub_68F840
add	esp, 0Ch
mov	[esi+28h], al
jmp	short loc_692A29

loc_692A25:
mov	byte ptr [esi+28h], 1

loc_692A29:		; Value
push	1
add	esi, 24h
push	esi		; Target
call	ds:InterlockedExchange
test	edi, edi
jz	short loc_692A40
mov	ecx, edi
call	sub_64A430

loc_692A40:
mov	esi, [esp+18h+var_10]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692A66
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692A66:
lea	ecx, [esp+18h+var_C]
call	sub_68E410
pop	edi
pop	esi
add	esp, 10h
retn
sub_6929B0 endp

align 10h



sub_692A80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_1C=	dword ptr  20h

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_1437568
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 20001h
mov	dword ptr [esi+0Ch], 0
mov	dword ptr [esi], offset	off_1437600
test	edi, edi
jz	short loc_692ABA
mov	ecx, edi
call	sub_64A420

loc_692ABA:
mov	eax, [esp+8+arg_4]
push	eax
lea	ecx, [esi+14h]
mov	[esi+10h], edi
call	sub_67AF90
mov	ecx, [esp+8+arg_8]
push	ecx
lea	ecx, [esi+18h]
call	sub_67AF90
mov	ecx, [esp+8+arg_1C]
test	ecx, ecx
jz	short loc_692AE8
call	sub_64A420
mov	ecx, [esp+8+arg_1C]

loc_692AE8:
mov	[esi+1Ch], ecx
mov	dword ptr [esi+20h], 0
test	ecx, ecx
jz	short loc_692AFB
call	sub_64A430

loc_692AFB:
lea	ecx, [esp+8+arg_C]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
retn	20h
sub_692A80 endp

align 10h



sub_692B10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4

sub	esp, 14h
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	eax, [esi+18h]
push	eax
lea	ecx, [esp+24h+var_8]
mov	[esp+24h+var_C], 5
call	sub_67AF90
lea	ecx, [esi+14h]
push	ecx
lea	ecx, [esp+24h+var_4]
call	sub_67AF90
lea	ecx, [esp+20h+var_14]
call	sub_679E30
mov	ecx, [esi+10h]
lea	edx, [esp+20h+var_C]
push	edx
lea	eax, [esp+24h+var_14]
push	eax
call	sub_6FC480
mov	ecx, [esp+20h+var_14]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
lea	ecx, [esp+24h+var_10]
call	sub_67AE10
mov	eax, [esi+10h]
mov	eax, [eax+8]
mov	eax, [eax+8]
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
lea	eax, [esp+24h+var_10]
push	eax
call	edx
mov	edi, [esp+20h+var_10]
mov	ebx, ds:InterlockedExchangeAdd
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692BAA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_692BAA:		; Value
push	1
add	esi, 20h
push	esi		; Target
call	ds:InterlockedExchange
mov	esi, [esp+20h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692BD8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692BD8:
lea	ecx, [esp+20h+var_C]
call	sub_68E410
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn
sub_692B10 endp

align 10h



sub_692BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_1C=	dword ptr  20h

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_1437568
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 20001h
mov	dword ptr [esi+0Ch], 0
mov	dword ptr [esi], offset	off_143760C
test	edi, edi
jz	short loc_692C2A
mov	ecx, edi
call	sub_64A420

loc_692C2A:
mov	eax, [esp+8+arg_4]
push	eax
lea	ecx, [esi+14h]
mov	[esi+10h], edi
call	sub_67AF90
mov	ecx, [esp+8+arg_8]
push	ecx
lea	ecx, [esi+18h]
call	sub_67AF90
mov	ecx, [esp+8+arg_1C]
test	ecx, ecx
jz	short loc_692C58
call	sub_64A420
mov	ecx, [esp+8+arg_1C]

loc_692C58:
mov	[esi+1Ch], ecx
mov	dword ptr [esi+20h], 0
test	ecx, ecx
jz	short loc_692C6B
call	sub_64A430

loc_692C6B:
lea	ecx, [esp+8+arg_C]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
retn	20h
sub_692BF0 endp

align 10h



sub_692C80 proc	near
push	edi
mov	edi, ecx
mov	ecx, [edi+1Ch]
test	ecx, ecx
jz	short loc_692C8F
call	sub_64A430

loc_692C8F:
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
mov	esi, [edi+18h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692CB8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692CB8:
mov	esi, [edi+14h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692CD9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692CD9:
mov	ecx, [edi+10h]
pop	esi
pop	ebx
test	ecx, ecx
jz	short loc_692CE7
call	sub_64A430

loc_692CE7:
mov	dword ptr [edi], offset	off_1437568
mov	ecx, edi
pop	edi
jmp	sub_64A3F0
sub_692C80 endp

align 10h



sub_692D00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_692C80
test	[esp+4+arg_0], 1
jz	short loc_692D1D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_692D1D:
mov	eax, esi
pop	esi
retn	4
sub_692D00 endp

align 10h



sub_692D30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4

sub	esp, 14h
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	eax, [esi+18h]
push	eax
lea	ecx, [esp+24h+var_8]
mov	[esp+24h+var_C], 6
call	sub_67AF90
lea	ecx, [esi+14h]
push	ecx
lea	ecx, [esp+24h+var_4]
call	sub_67AF90
lea	ecx, [esp+20h+var_14]
call	sub_679E30
mov	ecx, [esi+10h]
lea	edx, [esp+20h+var_C]
push	edx
lea	eax, [esp+24h+var_14]
push	eax
call	sub_6FC480
mov	ecx, [esp+20h+var_14]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
lea	ecx, [esp+24h+var_10]
call	sub_67AE10
mov	eax, [esi+10h]
mov	eax, [eax+8]
mov	eax, [eax+8]
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
lea	eax, [esp+24h+var_10]
push	eax
call	edx
mov	edi, [esp+20h+var_10]
mov	ebx, ds:InterlockedExchangeAdd
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692DCA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_692DCA:		; Value
push	1
add	esi, 20h
push	esi		; Target
call	ds:InterlockedExchange
mov	esi, [esp+20h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_692DF8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_692DF8:
lea	ecx, [esp+20h+var_C]
call	sub_68E410
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn
sub_692D30 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_692E10(int,	float, float, int)
sub_692E10 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	byte ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8Ch
push	ebx
push	esi
push	edi
mov	edi, ecx
fld	dword ptr [edi+78h]
fmul	[ebp+arg_4]
fadd	dword ptr [edi+80h]
fstp	[esp+98h+var_8C]
fld	[esp+98h+var_8C]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+98h+var_78]
fld	dword ptr [edi+7Ch]
fmul	[ebp+arg_8]
fadd	dword ptr [edi+84h]
fstp	[esp+98h+var_8C]
fmul	[esp+98h+var_8C]
fstp	[esp+98h+var_8C]
fld	[esp+98h+var_8C]
fld	dword ptr [edi+9Ch]
fsub	dword ptr [edi+94h]
fstp	[esp+98h+var_88]
fdiv	[esp+98h+var_88]
fld	ds:dbl_15FCC48
fsub	st(1), st
fld	ds:dbl_15FCD70
fmul	st(2), st
fxch	st(2)
fstp	[esp+98h+var_80]
fld	[esp+98h+var_78]
fld	dword ptr [edi+98h]
fsub	dword ptr [edi+90h]
fstp	[esp+98h+var_88]
fdiv	[esp+98h+var_88]
fsubrp	st(1), st
fmulp	st(1), st
fstp	dword ptr [edi+0D0h]
fld	[esp+98h+var_80]
fchs
fstp	dword ptr [edi+0D4h]
mov	ebx, [edi+28h]
test	ebx, ebx
jle	loc_69308B

loc_692EC2:
mov	eax, [edi+24h]
mov	esi, [eax+ebx*8-4]
lea	ecx, [esp+98h+var_18]
call	sub_64E8E0
mov	edx, [esi]
mov	edx, [edx+34h]
lea	eax, [esp+98h+var_18]
push	eax
lea	ecx, [esp+9Ch+var_68]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+98h+var_78]
fstp	[esp+98h+var_80]
lea	ecx, [esp+98h+var_18]
fld	[esp+98h+var_8C]
fstp	[esp+98h+var_7C]
call	sub_64E8E0
lea	eax, [esp+98h+var_18]
push	eax
mov	ecx, esi
call	sub_654AF0
lea	ecx, [esp+98h+var_80]
push	ecx
lea	edx, [esp+9Ch+var_74]
push	edx
lea	ecx, [esp+0A0h+var_18]
call	sub_64EC70
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_692F85
fld	[esp+98h+var_74]
fld	[esp+98h+var_60]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_693080
fld	[esp+98h+var_68]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_693082
fld	[esp+98h+var_70]
fld	[esp+98h+var_5C]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_693080
fld	[esp+98h+var_64]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_693082

loc_692F85:
mov	eax, [ebp+arg_C]
mov	edx, [esi]
push	0
push	1
push	eax
mov	eax, [edx+54h]
lea	ecx, [esp+0A4h+var_80]
push	ecx
mov	ecx, esi
call	eax
mov	ecx, eax
call	sub_6907A0
mov	esi, eax
test	esi, esi
jz	loc_693082
push	1
mov	ecx, esi
call	sub_654BF0
test	al, al
jz	loc_693096
fld	dword ptr [edi+0D8h]
lea	ecx, [esp+98h+var_58] ;	void *
fstp	[esp+98h+var_88]
fld	dword ptr [edi+0DCh]
fstp	[esp+98h+var_84]
call	sub_64F7C0
lea	ecx, [esp+98h+var_58]
push	ecx
mov	ecx, esi
call	sub_654C80
fld	[esp+98h+var_48]
fld	[esp+98h+var_84]
mov	eax, [ebp+arg_0]
fld	st
fmulp	st(2), st
fld	[esp+98h+var_58]
fld	[esp+98h+var_88]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fld	[esp+98h+var_38]
fldz
fmul	st(1), st
fxch	st(2)
faddp	st(1), st
fadd	[esp+98h+var_28]
fstp	[esp+98h+var_74]
fld	[esp+98h+var_44]
fmul	st, st(2)
fld	[esp+98h+var_54]
fmul	st, st(4)
faddp	st(1), st
fld	[esp+98h+var_34]
fmul	st, st(2)
faddp	st(1), st
fadd	[esp+98h+var_24]
fstp	[esp+98h+var_70]
fld	[esp+98h+var_50]
fmulp	st(3), st
fld	[esp+98h+var_40]
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	[esp+98h+var_30]
fmulp	st(2), st
faddp	st(1), st
fadd	[esp+98h+var_20]
fstp	[esp+98h+var_6C]
fld	[esp+98h+var_6C]
fstp	dword ptr [eax+8]
fld	[esp+98h+var_74]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	dword ptr [eax]
fdivr	[esp+98h+var_70]
fstp	dword ptr [eax+4]
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_693080:
fstp	st

loc_693082:
dec	ebx
test	ebx, ebx
jg	loc_692EC2

loc_69308B:
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_693096:
mov	eax, [ebp+arg_0]
fld	[ebp+arg_4]
fstp	dword ptr [eax]
pop	edi
fld	[ebp+arg_8]
pop	esi
fstp	dword ptr [eax+4]
pop	ebx
fldz
fstp	dword ptr [eax+8]
mov	al, 1
mov	esp, ebp
pop	ebp
retn	10h
sub_692E10 endp

align 10h



sub_6930C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
movzx	edx, byte ptr [eax+ecx+27F4h]
imul	edx, 34h
push	ebx
lea	ebx, [edx+ecx+24B0h]
mov	ecx, [esp+4+arg_0]
push	esi
test	ecx, ecx
jnz	short loc_69310E
mov	esi, [ebx+18h]
test	esi, esi
jz	short loc_693102
dec	dword ptr [esi]
cmp	[esi], ecx
jg	short loc_693102
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_693102:
pop	esi
mov	dword ptr [ebx+18h], 0
pop	ebx
retn	8

loc_69310E:
mov	eax, [ecx+94h]
push	edi
test	eax, eax
jnz	short loc_69311E
call	sub_658B70

loc_69311E:
mov	edi, eax
test	edi, edi
jz	short loc_693126
inc	dword ptr [edi]

loc_693126:
mov	esi, [ebx+18h]
test	esi, esi
jz	short loc_693149
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_693149
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_693149:
mov	[ebx+18h], edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_6930C0 endp

align 10h



sub_693160 proc	near

var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= word ptr -154h
var_152= word ptr -152h
var_150= word ptr -150h
var_14E= word ptr -14Eh
var_14C= word ptr -14Ch
var_14A= word ptr -14Ah
var_148= word ptr -148h
var_146= word ptr -146h
var_144= word ptr -144h
var_142= word ptr -142h
var_140= word ptr -140h
var_13E= word ptr -13Eh
var_13C= word ptr -13Ch
var_13A= word ptr -13Ah
var_138= word ptr -138h
var_136= word ptr -136h
var_134= word ptr -134h
var_132= word ptr -132h
var_130= dword ptr -130h
var_12C= word ptr -12Ch
var_12A= word ptr -12Ah
var_128= word ptr -128h
var_126= word ptr -126h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_B8=	byte ptr -0B8h
var_A0=	byte ptr -0A0h
var_60=	byte ptr -60h
var_20=	byte ptr -20h
arg_0= dword ptr  4

sub	esp, 194h
push	ebx
push	ebp
mov	ebp, ecx
xor	eax, eax
push	esi
push	edi
mov	[esp+1A4h+var_11C], ebp
mov	[esp+1A4h+var_170], eax
cmp	[ebp+27F0h], eax
jbe	loc_693801
lea	esi, [ebp+24C4h]
mov	[esp+1A4h+var_174], eax
mov	[esp+1A4h+var_168], esi

loc_693193:
mov	eax, [esi]
test	eax, eax
jz	loc_6937C9
cmp	dword ptr [eax+4], 0
jz	loc_693404
mov	ebx, [eax+4]
mov	[esp+1A4h+var_120], ebx
test	ebx, ebx
jz	loc_6937C9
mov	eax, 1
add	[ebx+4], eax
add	[ebx+4], eax
mov	ecx, ebx
call	sub_64A400
cmp	byte ptr [esi+1Ch], 0
jz	loc_6937C2
mov	edx, [ebx]
mov	eax, [edx+0D8h]
mov	ecx, ebx
call	eax
test	al, al
jz	loc_6937C2
lea	ecx, [esp+1A4h+var_A0] ; void *
call	sub_64F7C0
lea	ecx, [esp+1A4h+var_B8]
call	sub_64E8E0
lea	ecx, [esp+1A4h+var_B8]
push	ecx
mov	ecx, ebx
call	sub_654AF0
mov	edx, [ebx]
mov	edx, [edx+0F4h]
lea	eax, [esp+1A4h+var_100]
push	eax
mov	ecx, ebx
call	edx
fld	[esp+1A4h+var_F8]
fld	[esp+1A4h+var_100]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_693256
fld	[esp+1A4h+var_F4]
fld	[esp+1A4h+var_FC]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_6937FA

loc_693256:		; void *
lea	ecx, [esp+1A4h+var_60]
call	sub_64F7C0
lea	eax, [esp+1A4h+var_60]
push	eax
mov	ecx, ebx
call	sub_654C80
fldz
mov	ecx, 10h
fst	[esp+1A4h+var_164]
lea	esi, [esp+1A4h+var_60]
fst	[esp+1A4h+var_160]
lea	edi, [esp+1A4h+var_A0]
fst	[esp+1A4h+var_15C]
rep movsd
fstp	[esp+1A4h+var_158]
push	0		; float
lea	ecx, [esp+1A8h+var_100]
push	ecx		; int
lea	edx, [esp+1ACh+var_164]
push	edx		; int
lea	ecx, [esp+1B0h+var_A0]
call	sub_650330
fld	dword ptr [ebp+9Ch]
fld	[esp+1A4h+var_160]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6932FF
fld	[esp+1A4h+var_158]
fld	dword ptr [ebp+94h]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6932FF
fld	[esp+1A4h+var_15C]
fld	dword ptr [ebp+90h]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6932FF
fld	dword ptr [ebp+98h]
fld	[esp+1A4h+var_164]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_693316

loc_6932FF:
mov	eax, [esp+1A4h+arg_0]
mov	ecx, [eax+48h]
test	dword ptr [ecx+14h], 100h
jz	loc_6937FA

loc_693316:
mov	edx, [esp+1A4h+arg_0]
fldz
mov	eax, [edx+48h]
mov	esi, [eax+0Ch]
fst	[esp+1A4h+var_184]
push	0		; float
fst	[esp+1A8h+var_180]
lea	ecx, [esp+1A8h+var_100]
fst	[esp+1A8h+var_17C]
push	ecx		; int
fstp	[esp+1ACh+var_178]
lea	edx, [esp+1ACh+var_184]
push	edx		; int
lea	ecx, [esp+1B0h+var_A0]
call	sub_650330
fild	[esp+1A4h+var_170]
mov	eax, [esp+1A4h+var_170]
test	eax, eax
jge	short loc_693362
fadd	ds:flt_15FCC08

loc_693362:
fmul	ds:dbl_15FCE20
lea	ecx, [esp+1A4h+var_20]
fstp	[esp+1A4h+var_194]
fld	[esp+1A4h+var_194]
fst	[esp+1A4h+var_194]
fstp	[esp+1A4h+var_190]
fld	[esp+1A4h+var_184]
fld	[esp+1A4h+var_194]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1A4h+var_184]
fadd	[esp+1A4h+var_17C]
fstp	[esp+1A4h+var_17C]
fld	[esp+1A4h+var_180]
fld	[esp+1A4h+var_190]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1A4h+var_180]
fadd	[esp+1A4h+var_178]
fstp	[esp+1A4h+var_178]
mov	edi, [esi]
call	sub_68CFB0
mov	edx, [edi+40h]
push	eax
mov	ecx, esi
call	edx
lea	ecx, [esp+1A4h+var_D0]
call	sub_64E8E0
mov	eax, [esi]
mov	edx, [eax+38h]
lea	ecx, [esp+1A4h+var_D0]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+1A4h+var_180]
fld	ds:dbl_15FCC18
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_693422
fld	ds:flt_143764C
fst	[esp+1A4h+var_18C]
fld	ds:flt_1437648
jmp	short loc_69344F

loc_693404:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_693417
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_693417:
mov	dword ptr [esi], 0
jmp	loc_6937C9

loc_693422:
fld	ds:flt_1437648
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_69343F
fst	[esp+1A4h+var_18C]
fld	ds:flt_143764C
fxch	st(1)
jmp	short loc_69344F

loc_69343F:
fxch	st(2)
fst	[esp+1A4h+var_18C]
fld	ds:flt_143764C
fxch	st(1)
fxch	st(3)

loc_69344F:
fld	[esp+1A4h+var_184]
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_693466
fstp	st
fxch	st(1)
fst	[esp+1A4h+var_188]
jmp	short loc_69347D

loc_693466:
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_693477
fstp	st
fst	[esp+1A4h+var_188]
jmp	short loc_69347B

loc_693477:
fstp	[esp+1A4h+var_188]

loc_69347B:
fxch	st(1)

loc_69347D:
fld	[esp+1A4h+var_188]
fstp	[esp+1A4h+var_F0]
fld	[esp+1A4h+var_18C]
fstp	[esp+1A4h+var_EC]
fxch	st(3)
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_6934A8
fstp	st
fxch	st(2)
fst	[esp+1A4h+var_194]
jmp	short loc_6934BF

loc_6934A8:
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6934B9
fstp	st
fst	[esp+1A4h+var_194]
jmp	short loc_6934BD

loc_6934B9:
fstp	[esp+1A4h+var_194]

loc_6934BD:
fxch	st(2)

loc_6934BF:
fld	[esp+1A4h+var_17C]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_6934D4
fxch	st(1)
fst	[esp+1A4h+var_190]
jmp	short loc_6934E7

loc_6934D4:
fcom	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_693512
fxch	st(3)
fst	[esp+1A4h+var_190]
fxch	st(3)

loc_6934E5:
fxch	st(1)

loc_6934E7:
fld	[esp+1A4h+var_190]
fst	[esp+1A4h+var_E8]
fld	[esp+1A4h+var_194]
fst	[esp+1A4h+var_E4]
fld	[esp+1A4h+var_178]
fcom	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_693518
fxch	st(3)
fst	[esp+1A4h+var_190]
jmp	short loc_69352B

loc_693512:
fst	[esp+1A4h+var_190]
jmp	short loc_6934E5

loc_693518:
fcom	st(6)
fnstsw	ax
test	ah, 5
jp	short loc_693540
fxch	st(6)
fst	[esp+1A4h+var_190]
fxch	st(6)

loc_693529:
fxch	st(3)

loc_69352B:
fxch	st(4)
fcom	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_693546
fstp	st
fxch	st(3)

loc_69353A:
fstp	[esp+1A4h+var_194]
jmp	short loc_69355D

loc_693540:
fst	[esp+1A4h+var_190]
jmp	short loc_693529

loc_693546:
fstp	st(4)
fxch	st(3)
fcom	st(5)
fnstsw	ax
test	ah, 5
jp	short loc_69353A
fstp	st
fxch	st(4)
fst	[esp+1A4h+var_194]
fxch	st(4)

loc_69355D:
fld	[esp+1A4h+var_194]
fst	[esp+1A4h+var_E0]
fld	[esp+1A4h+var_190]
fst	[esp+1A4h+var_DC]
fxch	st(3)
fcom	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_69358C
fstp	st
fld	ds:flt_143764C

loc_693586:
fstp	[esp+1A4h+var_190]
jmp	short loc_69359F

loc_69358C:
fcom	st(6)
fnstsw	ax
test	ah, 5
jp	short loc_693586
fstp	st
fxch	st(5)
fst	[esp+1A4h+var_190]
fxch	st(5)

loc_69359F:
fld	[esp+1A4h+var_184]
fcom	st(5)
fnstsw	ax
fstp	st(5)
test	ah, 41h
jnz	short loc_6935BA
fstp	st(4)
fstp	st(4)
fld	ds:flt_143764C
jmp	short loc_6935CD

loc_6935BA:
fxch	st(4)
fcom	st(5)
fnstsw	ax
test	ah, 5
jp	short loc_6935C9
fstp	st
jmp	short loc_6935CB

loc_6935C9:
fstp	st(5)

loc_6935CB:
fxch	st(4)

loc_6935CD:
fstp	[esp+1A4h+var_194]
fld	[esp+1A4h+var_194]
fst	[esp+1A4h+var_D8]
fld	[esp+1A4h+var_190]
fst	[esp+1A4h+var_D4]
fld	[esp+1A4h+var_188]
call	__ftol2_sse
fld	[esp+1A4h+var_18C]
mov	word ptr [esp+1A4h+var_118], ax
mov	edi, [esp+1A4h+var_118]
mov	[esp+1A4h+var_154], di
call	__ftol2_sse
fxch	st(5)
mov	word ptr [esp+1A4h+var_114], ax
mov	ebp, [esp+1A4h+var_114]
mov	[esp+1A4h+var_152], bp
call	__ftol2_sse
fxch	st(2)
mov	word ptr [esp+1A4h+var_10C], ax
mov	ebx, [esp+1A4h+var_10C]
mov	[esp+1A4h+var_150], bx
call	__ftol2_sse
fxch	st(1)
mov	word ptr [esp+1A4h+var_110], ax
mov	ecx, [esp+1A4h+var_110]
lea	eax, [ebp+28h]
mov	[esp+1A4h+var_14C], di
lea	ebp, [ecx+28h]
add	edi, 28h
mov	[esp+1A4h+var_14E], cx
mov	[esp+1A4h+var_14A], ax
mov	[esp+1A4h+var_148], bx
mov	[esp+1A4h+var_146], bp
mov	[esp+1A4h+var_144], di
mov	[esp+1A4h+var_142], ax
call	__ftol2_sse
fxch	st(2)
mov	word ptr [esp+1A4h+var_104], ax
mov	edi, [esp+1A4h+var_104]
mov	[esp+1A4h+var_140], di
call	__ftol2_sse
mov	word ptr [esp+1A4h+var_16C], ax
mov	eax, [esp+1A4h+var_16C]
add	eax, 0FFFFFFD8h
lea	ecx, [edi+28h]
add	ebx, 0FFFFFFD8h
mov	[esp+1A4h+var_13E], ax
mov	[esp+1A4h+var_13C], cx
mov	[esp+1A4h+var_13A], ax
mov	[esp+1A4h+var_138], bx
mov	[esp+1A4h+var_136], bp
call	__ftol2_sse
mov	word ptr [esp+1A4h+var_124], ax
mov	ebx, [esp+1A4h+var_124]
lea	edx, [ebx-28h]
mov	[esp+1A4h+var_134], dx
call	__ftol2_sse
mov	word ptr [esp+1A4h+var_108], ax
mov	ecx, [esp+1A4h+var_108]
lea	eax, [ecx-28h]
mov	[esp+1A4h+var_132], ax
mov	word ptr [esp+1A4h+var_130+2], ax
mov	ax, word ptr [esp+1A4h+var_16C]
push	0
push	1
mov	[esp+1ACh+var_12A], ax
mov	[esp+1ACh+var_126], cx
mov	word ptr [esp+1ACh+var_130], bx
mov	[esp+1ACh+var_12C], di
mov	[esp+1ACh+var_128], bx
mov	edx, [esi]
mov	edx, [edx+6Ch]
push	0Ch
lea	eax, [esp+1B0h+var_154]
push	eax
mov	ecx, esi
call	edx
push	ecx
mov	ecx, [esp+1A8h+var_174]
mov	eax, esp
xor	ecx, 0FFFFFF00h
or	ecx, 0FF000000h
mov	[eax], ecx
mov	edx, [esi]
mov	eax, [edx+8Ch]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+70h]
push	0
push	1
push	18h
push	offset unk_1437618
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+78h]
push	8
push	0
push	0Ch
push	0
push	0
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+6Ch]
push	0
push	0
push	0
push	0
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+70h]
push	0
push	0
push	0
push	0
mov	ecx, esi
call	eax
mov	esi, [esp+1A4h+var_168]
mov	ebx, [esp+1A4h+var_120]
mov	ebp, [esp+1A4h+var_11C]

loc_6937C2:
mov	ecx, ebx
call	sub_64A400

loc_6937C9:
mov	eax, [esp+1A4h+var_170]
add	[esp+1A4h+var_174], 1080D0h
inc	eax
add	esi, 34h
mov	[esp+1A4h+var_170], eax
mov	[esp+1A4h+var_168], esi
cmp	eax, [ebp+27F0h]
jb	loc_693193
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 194h
retn	4

loc_6937FA:
mov	ecx, ebx
call	sub_64A400

loc_693801:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 194h
retn	4
sub_693160 endp

align 10h



sub_693810 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
movzx	eax, byte ptr [ecx+ebp+27F4h]
imul	eax, 34h
cmp	byte ptr [eax+ecx+24E0h], 0
push	esi
push	edi
lea	edi, [eax+ecx+24B0h]
jz	short loc_6938AC
mov	eax, [edi+14h]
test	eax, eax
jz	short loc_6938AC
cmp	dword ptr [eax+4], 0
jz	short loc_693881
mov	esi, [eax+4]
test	esi, esi
jz	short loc_6938AC
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax
mov	ecx, esi
call	sub_64A400
cmp	dword ptr [esi+20h], 0
jz	short loc_6938A5
mov	edx, [esi]
mov	eax, [edx+0F0h]
push	2
push	ebp
push	0
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_6938A5
mov	ecx, esi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
retn	4

loc_693881:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_693894
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_693894:
mov	dword ptr [edi+14h], 0
mov	byte ptr [edi+30h], 0
pop	edi
pop	esi
pop	ebp
retn	4

loc_6938A5:
mov	ecx, esi
call	sub_64A400

loc_6938AC:
mov	byte ptr [edi+30h], 0
pop	edi
pop	esi
pop	ebp
retn	4
sub_693810 endp

align 10h



sub_6938C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
push	ebp
push	esi
mov	ebp, ecx
movzx	esi, byte ptr [eax+ebp+27F4h]
add	esi, 0B5h
imul	esi, 34h
mov	eax, [esi+ebp]
add	esi, ebp
push	edi
xor	edi, edi
test	eax, eax
jz	short loc_693903
cmp	[eax+4], edi
jz	short loc_693920
mov	edi, [eax+4]
test	edi, edi
jz	short loc_693903
mov	eax, 1
add	[edi+4], eax
add	[edi+4], eax
mov	ecx, edi
call	sub_64A400

loc_693903:
mov	esi, [esp+0Ch+arg_0]
cmp	edi, esi
jnz	short loc_693937
test	edi, edi
jz	loc_6939F0
mov	ecx, edi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
retn	10h

loc_693920:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_693933
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_693933:
mov	[esi], edi
jmp	short loc_693903

loc_693937:
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
lea	ecx, [ebp+8]
push	ebx
push	1Bh
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_693960
mov	ecx, [esp+10h+arg_4]
push	ecx
push	esi
push	edi
push	ebp
mov	ecx, ebx
call	sub_6B5B40
mov	esi, eax
cmp	edi, esi
jz	short loc_6939DD

loc_693960:
test	edi, edi
jz	short loc_69399E
cmp	dword ptr [edi+20h], 0
jz	short loc_69399E
mov	eax, [esp+10h+arg_C]
mov	ecx, [esp+10h+arg_8]
mov	edx, [edi]
mov	edx, [edx+0F0h]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_69399E
test	ebx, ebx
jz	short loc_6939E8
mov	ecx, ebx
call	sub_64A430
mov	ecx, edi
call	sub_64A400
pop	ebx
pop	edi
pop	esi
pop	ebp
retn	10h

loc_69399E:
test	esi, esi
jz	short loc_6939B3
mov	ecx, [esp+10h+arg_8]
mov	eax, [esi]
mov	edx, [eax+0ECh]
push	ecx
mov	ecx, esi
call	edx

loc_6939B3:
push	0
mov	ecx, ebp
call	sub_68E580
mov	ecx, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+70h]
push	esi
call	eax
push	eax
call	sub_6C1420
add	esp, 10h
test	ebx, ebx
jz	short loc_6939E4

loc_6939DD:
mov	ecx, ebx
call	sub_64A430

loc_6939E4:
test	edi, edi
jz	short loc_6939EF

loc_6939E8:
mov	ecx, edi
call	sub_64A400

loc_6939EF:
pop	ebx

loc_6939F0:
pop	edi
pop	esi
pop	ebp
retn	10h
sub_6938C0 endp

align 10h



sub_693A00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
mov	ebp, ecx
movzx	ecx, byte ptr [eax+ebp+27F4h]
imul	ecx, 34h
mov	eax, [ecx+ebp+24C4h]
push	esi
push	edi
lea	edi, [ecx+ebp+24B0h]
xor	esi, esi
mov	[esp+14h+var_4], ebp
test	eax, eax
jz	short loc_693A50
cmp	[eax+4], esi
jz	loc_693B13
mov	esi, [eax+4]
test	esi, esi
jz	short loc_693A50
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax
mov	ecx, esi
call	sub_64A400

loc_693A50:
mov	ebx, [esp+14h+arg_0]
cmp	esi, ebx
jz	loc_693B00
test	esi, esi
jz	short loc_693A7F
cmp	dword ptr [esi+20h], 0
jz	short loc_693A7F
mov	eax, [esp+14h+arg_8]
mov	ecx, [esp+14h+arg_4]
mov	edx, [esi]
mov	edx, [edx+0E8h]
push	eax
push	ecx
push	ebx
push	0
mov	ecx, esi
call	edx

loc_693A7F:
test	ebx, ebx
jz	loc_693B2E
mov	ecx, ebx
call	sub_64A4A0
mov	ebp, eax
mov	eax, [edi+14h]
test	eax, eax
jz	short loc_693AAA
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_693AAA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_693AAA:
mov	eax, [esp+14h+arg_8]
mov	ecx, [esp+14h+arg_4]
push	eax
push	ecx
mov	[edi+14h], ebp
mov	edx, [ebx]
mov	edx, [edx+0E8h]
push	esi
push	1
mov	ecx, ebx
call	edx
mov	ebp, [esp+14h+var_4]

loc_693ACA:
mov	edx, [ebp+28h]
xor	eax, eax
test	edx, edx
jbe	short loc_693AE5
mov	ebp, [ebp+24h]
mov	ecx, ebp

loc_693AD8:
cmp	dword ptr [ecx], 0
jz	short loc_693B54
inc	eax
add	ecx, 8
cmp	eax, edx
jb	short loc_693AD8

loc_693AE5:
xor	eax, eax

loc_693AE7:
mov	ecx, [esp+14h+arg_4]
mov	edx, [eax]
push	ecx
push	ebx
mov	ecx, eax
mov	eax, [edx+70h]
push	esi
call	eax
push	eax
call	sub_6C1240
add	esp, 10h

loc_693B00:
test	esi, esi
jz	short loc_693B0B
mov	ecx, esi
call	sub_64A400

loc_693B0B:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_693B13:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_693B26
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_693B26:
mov	[edi+14h], esi
jmp	loc_693A50

loc_693B2E:
mov	eax, [edi+14h]
test	eax, eax
jz	short loc_693B48
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_693B48
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_693B48:
mov	dword ptr [edi+14h], 0
jmp	loc_693ACA

loc_693B54:
mov	eax, [ebp+eax*8+4]
jmp	short loc_693AE7
sub_693A00 endp

align 10h



sub_693B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
xor	ebp, ebp
push	esi
push	edi
mov	[esp+14h+var_4], ecx
cmp	[ecx+27F0h], ebp
jbe	short loc_693BCC
lea	edi, [ecx+24C4h]
lea	esp, [esp+0]

loc_693B80:
mov	eax, [edi]
xor	esi, esi
test	eax, eax
jz	short loc_693BA6
cmp	[eax+4], esi
jz	short loc_693BD6
mov	esi, [eax+4]
test	esi, esi
jz	short loc_693BA6
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax
mov	ecx, esi
call	sub_64A400

loc_693BA6:
cmp	esi, [esp+14h+arg_0]
setz	bl
test	esi, esi
jz	short loc_693BB8
mov	ecx, esi
call	sub_64A400

loc_693BB8:
test	bl, bl
jnz	short loc_693BF1
mov	ecx, [esp+14h+var_4]
inc	ebp
add	edi, 34h
cmp	ebp, [ecx+27F0h]
jb	short loc_693B80

loc_693BCC:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	4

loc_693BD6:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_693BE9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_693BE9:
mov	dword ptr [edi], 0
jmp	short loc_693BA6

loc_693BF1:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	4
sub_693B60 endp

align 10h



sub_693C00 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 40h
push	esi
mov	esi, ecx
mov	edx, [esi+28h]
xor	eax, eax
push	edi
test	edx, edx
jbe	short loc_693C26
mov	edi, [esi+24h]
mov	ecx, edi

loc_693C15:
cmp	dword ptr [ecx], 0
jz	loc_693CED
inc	eax
add	ecx, 8
cmp	eax, edx
jb	short loc_693C15

loc_693C26:
xor	edi, edi

loc_693C28:
lea	ecx, [esp+48h+var_18]
call	sub_64E8E0
lea	eax, [esp+48h+var_18]
push	eax
mov	ecx, edi
call	sub_654AF0
fld	dword ptr [esi+0B0h]
fstp	[esp+48h+var_30]
lea	ecx, [esp+48h+arg_8]
fld	dword ptr [esi+0B4h]
push	ecx
fstp	[esp+4Ch+var_2C]
lea	ecx, [esp+4Ch+var_30]
fld	dword ptr [esi+0B8h]
fstp	[esp+4Ch+var_28]
fld	dword ptr [esi+0BCh]
fstp	[esp+4Ch+var_24]
fld	dword ptr [esi+0C0h]
fstp	[esp+4Ch+var_20]
fld	dword ptr [esi+0C4h]
fstp	[esp+4Ch+var_1C]
call	sub_64EAF0
lea	edx, [esp+48h+var_18]
push	edx
lea	ecx, [esp+4Ch+var_30]
call	sub_64EAF0
mov	eax, [esp+48h+arg_4]
fld	dword ptr [eax]
mov	esi, [esp+48h+arg_0]
fstp	[esp+48h+var_40]
lea	ecx, [esp+48h+var_30]
fld	dword ptr [eax+4]
lea	eax, [esp+48h+var_40]
fstp	[esp+48h+var_3C]
push	eax
fld	[esp+4Ch+var_40]
push	esi
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+50h+var_38]
fmul	[esp+50h+var_3C]
fstp	[esp+50h+var_34]
fld	[esp+50h+var_38]
fstp	[esp+50h+var_40]
fld	[esp+50h+var_34]
fstp	[esp+50h+var_3C]
call	sub_64E9B0
pop	edi
mov	eax, esi
pop	esi
add	esp, 40h
retn	20h

loc_693CED:
mov	edi, [edi+eax*8+4]
jmp	loc_693C28
sub_693C00 endp

align 10h



sub_693D00 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 58h
push	esi
push	edi
mov	edi, ecx
mov	edx, [edi+28h]
xor	eax, eax
test	edx, edx
jbe	short loc_693D26
mov	esi, [edi+24h]
mov	ecx, esi

loc_693D15:
cmp	dword ptr [ecx], 0
jz	loc_693DAA
inc	eax
add	ecx, 8
cmp	eax, edx
jb	short loc_693D15

loc_693D26:
xor	ecx, ecx

loc_693D28:
mov	eax, [ecx]
mov	edx, [eax+70h]
push	ebx
call	edx
mov	edx, [esp+64h+arg_0]
mov	esi, eax
mov	[esp+64h+var_40], 0
mov	eax, [esi+78h]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
push	0
push	0
push	0
mov	[esp+70h+arg_0], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+74h+var_40]
push	eax
lea	ecx, [esp+78h+arg_0]
push	ecx
mov	ecx, esi
call	sub_6726F0
mov	bl, al
mov	eax, [esp+64h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_693D82
call	sub_650DF0

loc_693D82:
test	bl, bl
pop	ebx
lea	ecx, [esp+60h+var_40]
jz	short loc_693D9B
push	esi
call	sub_651BB0
mov	esi, eax
test	esi, esi
jnz	short loc_693DB3
lea	ecx, [esp+60h+var_40]

loc_693D9B:
call	sub_652830
pop	edi
xor	al, al
pop	esi
add	esp, 58h
retn	24h

loc_693DAA:
mov	ecx, [esi+eax*8+4]
jmp	loc_693D28

loc_693DB3:
mov	eax, [esp+60h+arg_4]
fld	dword ptr [eax]
lea	ecx, [esp+60h+var_18]
fstp	[esp+60h+var_58]
fld	dword ptr [eax+4]
fstp	[esp+60h+var_54]
fld	[esp+60h+var_58]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+60h+var_50]
fmul	[esp+60h+var_54]
fstp	[esp+60h+var_4C]
fld	[esp+60h+var_50]
fstp	[esp+60h+var_48]
fld	[esp+60h+var_4C]
fstp	[esp+60h+var_44]
call	sub_64E8E0
lea	edx, [esp+60h+var_18]
push	edx
mov	ecx, esi
call	sub_654AF0
fld	dword ptr [edi+0B0h]
fstp	[esp+60h+var_30]
lea	eax, [esp+60h+arg_C]
fld	dword ptr [edi+0B4h]
push	eax
fstp	[esp+64h+var_2C]
lea	ecx, [esp+64h+var_30]
fld	dword ptr [edi+0B8h]
fstp	[esp+64h+var_28]
fld	dword ptr [edi+0BCh]
fstp	[esp+64h+var_24]
fld	dword ptr [edi+0C0h]
fstp	[esp+64h+var_20]
fld	dword ptr [edi+0C4h]
fstp	[esp+64h+var_1C]
call	sub_64EAF0
lea	ecx, [esp+60h+var_18]
push	ecx
lea	ecx, [esp+64h+var_30]
call	sub_64EAF0
lea	edx, [esp+60h+var_48]
push	edx
lea	eax, [esp+64h+var_50]
push	eax
lea	ecx, [esp+68h+var_30]
call	sub_64E9B0
fld	[esp+60h+var_50]
mov	eax, [esp+60h+arg_8]
fstp	dword ptr [eax]
lea	ecx, [esp+60h+var_40]
fld	[esp+60h+var_4C]
fstp	dword ptr [eax+4]
call	sub_652830
pop	edi
mov	al, 1
pop	esi
add	esp, 58h
retn	24h
sub_693D00 endp

align 10h



sub_693EA0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_693EF2
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_693EB4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_693ED5
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_693ECF
call	sub_650DF0

loc_693ECF:
mov	dword ptr [esi], 0FFFFFFFEh

loc_693ED5:
add	edi, 0Ch
sub	ebp, 1
jnz	short loc_693EB4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_693EF2:
pop	ebx
retn
sub_693EA0 endp

align 10h



sub_693F00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
push	esi
mov	esi, [esp+8+arg_4]
cmp	esi, eax
jnb	short loc_693F56
mov	edx, [ebx]
sub	eax, esi
lea	ecx, [eax+esi]
lea	ecx, [edx+ecx*8-8]
jz	short loc_693F38
push	ebp
push	edi
lea	edi, [ecx+4]
mov	ebp, eax

loc_693F23:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_693F2E
call	sub_64A400

loc_693F2E:
sub	edi, 8
sub	ebp, 1
jnz	short loc_693F23
pop	edi
pop	ebp

loc_693F38:
mov	eax, [ebx+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_693F6D
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, ebx
call	sub_6916A0
mov	[ebx+4], esi
pop	esi
pop	ebx
retn	8

loc_693F56:
cmp	esi, [ebx+8]
jb	short loc_693F6D
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6916A0

loc_693F6D:
mov	[ebx+4], esi
pop	esi
pop	ebx
retn	8
sub_693F00 endp

align 10h



sub_693F80 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_693F8F
call	sub_64A430

loc_693F8F:
mov	dword ptr [esi], 0FFFFFFFEh
pop	esi
retn
sub_693F80 endp

align 10h



sub_693FA0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_693FAF
call	sub_64A400

loc_693FAF:
mov	dword ptr [esi], 0FFFFFFFEh
pop	esi
retn
sub_693FA0 endp

align 10h



sub_693FC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	edx, [ecx]
mov	[esp+8+var_4], ecx
test	edx, edx
jz	loc_694091
mov	eax, [esp+8+arg_0]
mov	eax, [eax]
push	esi
mov	[esp+0Ch+var_8], eax
mov	eax, [eax+0Ch]
push	edi
mov	edi, [edx+4]
and	eax, edi
lea	ecx, [eax+eax*2]
cmp	dword ptr [edx+ecx*4+8], 0FFFFFFFEh
lea	esi, [edx+ecx*4+8]
jz	loc_69408F
mov	ecx, [esi+4]
mov	ecx, [ecx+0Ch]
and	ecx, edi
cmp	ecx, eax
jnz	loc_69408F
push	ebx
mov	[esp+14h+arg_0], eax
or	ebx, 0FFFFFFFFh
push	ebp

loc_694010:
mov	ecx, [esi+4]
mov	ebp, [ecx+0Ch]
and	ebp, edi
cmp	ebp, [esp+18h+arg_0]
jnz	short loc_694024
cmp	ecx, [esp+18h+var_8]
jz	short loc_694036

loc_694024:
mov	ebx, eax
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_69408D
lea	ecx, [eax+eax*2]
lea	esi, [edx+ecx*4+8]
jmp	short loc_694010

loc_694036:
cmp	[esp+18h+arg_0], eax
jnz	short loc_694068
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_694071
lea	eax, [eax+eax*2]
mov	ecx, esi
lea	edi, [edx+eax*4+8]
call	sub_691680
mov	ecx, [edi]
mov	[esi], ecx
mov	eax, [edi+4]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi+8]
mov	[esi+8], edx
mov	esi, edi
jmp	short loc_694071

loc_694068:
mov	ecx, [esi]
lea	eax, [ebx+ebx*2]
mov	[edx+eax*4+8], ecx

loc_694071:
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69407F
call	sub_650DF0

loc_69407F:
mov	edx, [esp+18h+var_4]
mov	dword ptr [esi], 0FFFFFFFEh
mov	eax, [edx]
dec	dword ptr [eax]

loc_69408D:
pop	ebp
pop	ebx

loc_69408F:
pop	edi
pop	esi

loc_694091:
add	esp, 8
retn	4
sub_693FC0 endp

align 10h



sub_6940A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, ds:0[esi*8]
sub	ecx, esi
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_694108
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_694108
push	ebp
nop

loc_6940D0:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_6940E8
mov	ebp, [esp+10h+arg_0]
mov	ebp, [ebp+0]
cmp	edx, [ebp+0]
jz	short loc_694101

loc_6940E8:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6940FE
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	ecx, [edi+ecx*4+8]
jmp	short loc_6940D0

loc_6940FE:
or	eax, 0FFFFFFFFh

loc_694101:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_694108:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_6940A0 endp

align 10h



sub_694120 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, ds:0[esi*8]
sub	ecx, esi
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_694185
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	edx, [edx+0Ch]
and	edx, ebx
cmp	edx, esi
jnz	short loc_694185
push	ebp
nop

loc_694150:
mov	edx, [ecx+4]
mov	ebp, [edx+0Ch]
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_694165
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_69417E

loc_694165:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_69417B
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	ecx, [edi+ecx*4+8]
jmp	short loc_694150

loc_69417B:
or	eax, 0FFFFFFFFh

loc_69417E:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_694185:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_694120 endp

align 10h



sub_694190 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_6941B2
call	sub_693EA0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_6941B2:
push	esi
cmp	eax, 8
jnb	short loc_6941BF
mov	esi, 8
jmp	short loc_694224

loc_6941BF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6941D2
fadd	ds:flt_15FCC08

loc_6941D2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_694224:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_694284
xor	eax, eax
jmp	short loc_694270
align 10h

loc_694270:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_694270

loc_694284:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_6942F1
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_694297

loc_694293:
mov	edi, [esp+1Ch+var_C]

loc_694297:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_6942D0
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_695060
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6942CA
call	sub_650DF0

loc_6942CA:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6942D0:
add	ebx, 0Ch
sub	ebp, 1
jnz	short loc_694293
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_6942F1:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_693EA0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_694190 endp

align 10h



sub_694320 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_155F500
push	edi
lea	ecx, [esi+8]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437650
call	sub_67AC80
push	edi
lea	ecx, [esi+10h]
call	sub_67AC80
xor	eax, eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
xor	ecx, ecx
xor	edx, edx
mov	[esi+28h], al
mov	[esi+2Ah], ax
pop	edi
mov	dword ptr [esi+20h], 0FF000000h
mov	[esi+24h], cx
mov	[esi+26h], dx
mov	eax, esi
pop	esi
retn	4
sub_694320 endp

align 10h



sub_694380 proc	near
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_1437650
mov	esi, [edi+1Ch]
test	esi, esi
jz	short loc_6943AB
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_6943AB
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6943AB:
mov	ecx, [edi+18h]
test	ecx, ecx
jz	short loc_6943B7
call	sub_64A400

loc_6943B7:
mov	esi, [edi+10h]
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6943DF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6943DF:
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
pop	ebx
jnz	short loc_694401
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_694401:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A3F0
sub_694380 endp

align 10h



sub_694410 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_694380
test	[esp+4+arg_0], 1
jz	short loc_69442D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69442D:
mov	eax, esi
pop	esi
retn	4
sub_694410 endp

align 10h



sub_694440 proc	near

var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= qword ptr -1B8h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A0= byte ptr -1A0h
var_158= dword ptr -158h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h

sub	esp, 1C4h
push	ebx
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
mov	[esp+1D0h+var_1C4], edi
cmp	[esi+30h], edi
jz	loc_69467B
xor	ebx, ebx
cmp	[esi+28h], edi
jbe	loc_69467B

loc_694465:
mov	eax, [esi+24h]
mov	ecx, [eax+ebx*8+4]
mov	edx, [ecx]
mov	eax, [edx+10h]
call	eax
test	al, al
jnz	short loc_694487
inc	ebx
cmp	ebx, [esi+28h]
jb	short loc_694465
pop	edi
pop	esi
pop	ebx
add	esp, 1C4h
retn

loc_694487:
mov	eax, [esi+0F0h]
mov	[esp+1D0h+var_1BC], edi
cmp	eax, edi
jz	short loc_69449A
lea	edx, [eax+8]
jmp	short loc_69449C

loc_69449A:
xor	edx, edx

loc_69449C:
mov	eax, [esi+34h]
fld	dword ptr [esi+74h]
mov	ecx, [eax+1Ch]
fstp	[esp+1D0h+var_1C4]
mov	eax, [eax+14h]
fld	[esp+1D0h+var_1C4]
mov	eax, [eax+18h]
push	edi		; char
push	edi		; int
lea	ebx, [esi+0B0h]
push	ebx		; int
push	ecx		; float
fstp	[esp+1E0h+var_1E0]
add	ecx, 18h
push	ecx		; int
push	eax		; int
push	edx		; int
lea	ecx, [esp+1ECh+var_1A0]
call	sub_6A8260
mov	eax, [esp+1D0h+var_158]
cmp	eax, edi
jz	loc_694672
cmp	[eax+0Ch], edi
jz	loc_694672
mov	ecx, [esp+1D0h+var_13C]
or	dword ptr [esi+2474h], 2
cmp	ecx, edi
jz	short loc_6944FB
call	sub_64A420

loc_6944FB:
mov	ecx, [esi+0F8h]
cmp	ecx, edi
jz	short loc_69450A
call	sub_64A430

loc_69450A:
mov	ecx, [esp+1D0h+var_13C]
mov	edx, [esp+1D0h+var_158]
mov	[esi+0F8h], ecx
fld	dword ptr [esi+9Ch]
mov	ecx, [edx+0Ch]
mov	edx, [esi+930h]
sub	esp, 10h
fstp	[esp+1E0h+var_1D4]
lea	eax, [esi+40h]
fld	dword ptr [esi+94h]
fstp	[esp+1E0h+var_1D8]
fld	dword ptr [esi+98h]
fstp	[esp+1E0h+var_1DC]
fld	dword ptr [esi+90h]
fstp	[esp+1E0h+var_1E0]
push	eax
push	ecx
mov	eax, esp
mov	[eax], edx
mov	eax, [ecx]
mov	edx, [eax+30h]
call	edx
lea	eax, [esp+1D0h+var_1A0]
push	eax
mov	ecx, esi
call	sub_68EEE0
mov	eax, [esi+0F4h]
lea	ebx, [esi+0F4h]
cmp	eax, edi
jz	loc_69461A
cmp	[eax], edi
jbe	loc_69461A
mov	ecx, [esi+2848h]
push	1
push	1
push	ecx
lea	ecx, [esp+1DCh+var_1B8]
call	sub_667870
lea	edx, [esp+1D0h+var_1C4]
push	edx
mov	ecx, ebx
call	sub_691640

loc_6945A6:
mov	eax, [esp+1D0h+var_1C4]
cmp	eax, edi
jz	short loc_6945F2
cmp	[eax], edi
jz	short loc_6945F2
mov	ecx, [eax]
mov	eax, [esp+1D0h+var_1C0]
cmp	eax, [ecx+4]
jg	short loc_6945F2
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4+10h]
mov	eax, [ecx]
cmp	eax, edi
jz	short loc_6945CD
inc	dword ptr [eax+4]

loc_6945CD:
mov	ebx, [ecx]
mov	eax, [esp+1D0h+var_158]
mov	ecx, [eax+0Ch]
mov	edx, [ebx]
mov	edx, [edx+0Ch]
push	ecx
mov	ecx, ebx
call	edx
mov	ecx, ebx
call	sub_64A400
lea	ecx, [esp+1D0h+var_1C4]
call	sub_68F980
jmp	short loc_6945A6

loc_6945F2:
mov	ebx, [esp+1D0h+var_1B0]
cmp	ebx, edi
jz	short loc_69461A
call	sub_6B2210
sub	eax, dword ptr [esp+1D0h+var_1B8]
mov	ecx, [esp+1D0h+var_1AC]
sbb	edx, dword ptr [esp+1D0h+var_1B8+4]
push	edx
push	eax
mov	eax, [esp+1D8h+var_1A8]
push	eax
push	ecx
mov	ecx, ebx
call	sub_6B3C90

loc_69461A:
cmp	[esi+28h], edi
jbe	short loc_694639
nop

loc_694620:
mov	edx, [esi+24h]
mov	ecx, [edx+edi*8+4]
mov	eax, [ecx]
mov	eax, [eax+74h]
lea	edx, [esp+1D0h+var_1A0]
push	edx
call	eax
inc	edi
cmp	edi, [esi+28h]
jb	short loc_694620

loc_694639:
lea	ecx, [esp+1D0h+var_1A0]
push	ecx
mov	ecx, esi
call	sub_68F330
lea	edx, [esp+1D0h+var_1A0]
push	edx
mov	ecx, esi
call	sub_693160
mov	eax, [esp+1D0h+var_158]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+34h]
call	eax
mov	ecx, [esp+1D0h+var_138]
call	sub_706000
and	dword ptr [esi+2474h], 0FFFFFFFDh

loc_694672:
lea	ecx, [esp+1D0h+var_1A0]
call	sub_6A82F0

loc_69467B:
pop	edi
pop	esi
pop	ebx
add	esp, 1C4h
retn
sub_694440 endp

align 10h



sub_694690 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+2474h]
shr	eax, 14h
and	al, 1
jz	short loc_6946B0
test	bl, bl
jnz	loc_69480D

loc_6946B0:
test	al, al
jnz	short loc_6946BC
test	bl, bl
jz	loc_69480D

loc_6946BC:
push	ebp
test	bl, bl
jz	short loc_6946ED
or	dword ptr [esi+2474h], 100000h
call	sub_6B2200
xor	ebp, ebp
push	ebp
push	3E8h
push	edx
push	eax
call	__aulldiv
mov	[esi+2498h], eax
mov	[esi+249Ch], edx
jmp	short loc_694724

loc_6946ED:
and	dword ptr [esi+2474h], 0FFEFFFFFh
call	sub_6B2200
push	0
push	3E8h
push	edx
push	eax
call	__aulldiv
sub	eax, [esi+2498h]
sbb	edx, [esi+249Ch]
add	[esi+2490h], eax
adc	[esi+2494h], edx
xor	ebp, ebp

loc_694724:
mov	ecx, [esi+2804h]
push	edi
cmp	ecx, ebp
jz	short loc_694747
nop

loc_694730:
mov	eax, [ecx]
mov	edx, [eax+0FCh]
mov	edi, [ecx+84h]
push	ebx
call	edx
mov	ecx, edi
cmp	edi, ebp
jnz	short loc_694730

loc_694747:
mov	eax, [esi+0F4h]
lea	edx, [esi+0F4h]
cmp	eax, ebp
jz	loc_69480B
cmp	[eax], ebp
jbe	loc_69480B
xor	esi, esi
mov	[esp+1Ch+var_C], ebp
mov	[esp+1Ch+var_8], ebp
mov	[esp+1Ch+var_4], ebp
cmp	eax, ebp
jz	short loc_694790
mov	ecx, [eax+4]
add	eax, 8
jmp	short loc_694780
align 10h

loc_694780:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_69478D
inc	esi
add	eax, 0Ch
cmp	esi, ecx
jbe	short loc_694780

loc_69478D:
mov	ebp, edx
nop

loc_694790:
test	ebp, ebp
jz	short loc_6947EF
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_6947EF
cmp	esi, [eax+4]
jg	short loc_6947EF
lea	ecx, [esi+esi*2]
lea	eax, [eax+ecx*4+10h]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6947B0
inc	dword ptr [ecx+4]

loc_6947B0:
mov	edi, [eax]
mov	edx, [edi]
mov	eax, [edx+10h]
push	ebx
mov	ecx, edi
call	eax
mov	ecx, edi
call	sub_64A400
mov	ecx, [ebp+0]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_694790
inc	esi
cmp	esi, eax
ja	short loc_694790
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*4+8]
lea	esp, [esp+0]

loc_6947E0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_694790
inc	esi
add	ecx, 0Ch
cmp	esi, eax
jbe	short loc_6947E0
jmp	short loc_694790

loc_6947EF:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 0Ch
mov	[esp+arg_0], 0
mov	edx, [eax+30h]
jmp	edx

loc_69480B:
pop	edi
pop	ebp

loc_69480D:
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_694690 endp

align 10h



sub_694820 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
movzx	eax, byte ptr [edi+1Eh]
movzx	edx, byte ptr [eax+ecx+27F4h]
imul	edx, 34h
cmp	byte ptr [edi+21h], 0
mov	[esp+14h+var_4], ecx
lea	esi, [edx+ecx+24B0h]
jz	loc_69491D
test	byte ptr [esi],	1
jz	loc_69491D
mov	eax, [edi+8]
test	eax, eax
jl	loc_69491D
cmp	eax, [esi+8]
jge	loc_69491D
mov	ecx, [esi+4]
push	ebx
push	ebp
mov	ebp, [ecx+eax*4]
lea	edx, [esp+1Ch+arg_0]
push	edx
lea	ecx, [esi+14h]
call	sub_6831C0
mov	ebx, [esp+1Ch+arg_0]
test	ebx, ebx
jz	short loc_694895
inc	dword ptr [ebx+4]
mov	ebx, [esp+1Ch+arg_0]
mov	ecx, ebx
call	sub_64A400

loc_694895:
cmp	ebx, ebp
jz	short loc_694910
mov	ax, [edi+1Ch]
mov	[esi+1Ch], ax
fld	dword ptr [edi+10h]
fstp	[esp+1Ch+arg_0]
push	2
fld	dword ptr [edi+14h]
fstp	[esp+20h+var_C]
fld	dword ptr [edi+18h]
fstp	[esp+20h+var_8]
fld	dword ptr [edi+0Ch]
fstp	dword ptr [esi+20h]
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+24h]
fld	[esp+20h+var_C]
fstp	dword ptr [esi+28h]
fld	[esp+20h+var_8]
fstp	dword ptr [esi+2Ch]
movzx	ecx, byte ptr [edi+1Eh]
mov	edi, [esp+20h+var_4]
push	ecx
push	0
push	ebp
mov	ecx, edi
call	sub_6938C0
test	ebp, ebp
jz	short loc_694902
mov	edx, [ebp+0]
mov	eax, [edx+0B0h]
mov	ecx, ebp
call	eax
cmp	eax, 4
jnz	short loc_694902
mov	byte ptr [esi+30h], 0
jmp	short loc_694906

loc_694902:
mov	byte ptr [esi+30h], 1

loc_694906:
or	dword ptr [edi+2474h], 400h

loc_694910:
test	ebx, ebx
jz	short loc_69491B
mov	ecx, ebx
call	sub_64A400

loc_69491B:
pop	ebp
pop	ebx

loc_69491D:
pop	edi
pop	esi
add	esp, 0Ch
retn	4
sub_694820 endp

align 10h



sub_694930 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	ebx, ecx
movzx	esi, byte ptr [ebx+ebp+27F4h]
add	esi, 0B5h
imul	esi, 34h
mov	eax, [esi+ebx]
add	esi, ebx
push	edi
xor	edi, edi
test	eax, eax
jz	short loc_694974
cmp	[eax+4], edi
jz	short loc_6949C8
mov	edi, [eax+4]
test	edi, edi
jz	short loc_694974
mov	eax, 1
add	[edi+4], eax
add	[edi+4], eax
mov	ecx, edi
call	sub_64A400

loc_694974:
mov	esi, [esp+10h+arg_0]
cmp	edi, esi
jz	short loc_6949B6
test	edi, edi
jz	short loc_69499A
cmp	dword ptr [edi+20h], 0
jz	short loc_69499A
mov	edx, [edi]
mov	eax, [edx+0F0h]
push	2
push	ebp
push	esi
mov	ecx, edi
call	eax
test	al, al
jz	short loc_6949BA

loc_69499A:
push	2
push	ebp
push	esi
mov	ecx, ebx
call	sub_693A00
test	esi, esi
jz	short loc_6949B6
mov	edx, [esi]
mov	eax, [edx+0ECh]
push	ebp
mov	ecx, esi
call	eax

loc_6949B6:
test	edi, edi
jz	short loc_6949C1

loc_6949BA:
mov	ecx, edi
call	sub_64A400

loc_6949C1:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_6949C8:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6949DB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6949DB:
mov	[esi], edi
jmp	short loc_694974
sub_694930 endp

align 10h



sub_6949E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+8]
mov	edx, [eax+0Ch]
lea	ecx, [edi+8]
push	1Bh
call	edx
mov	ebx, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
test	eax, eax
jz	short loc_694A72
movzx	esi, byte ptr [ebx+edi+27F4h]
add	esi, 0B5h
imul	esi, 34h
mov	eax, [esi+edi]
add	esi, edi
xor	ebp, ebp
test	eax, eax
jz	short loc_694A3A
cmp	[eax+4], ebp
jz	short loc_694A5B
mov	ebp, [eax+4]
test	ebp, ebp
jz	short loc_694A3A
mov	eax, 1
add	[ebp+4], eax
add	[ebp+4], eax
mov	ecx, ebp
call	sub_64A400

loc_694A3A:
mov	ecx, [esp+14h+arg_0]
push	0
push	ecx
mov	ecx, [esp+1Ch+var_4]
push	ebp
push	edi
call	sub_6B5B40
mov	esi, eax
test	ebp, ebp
jz	short loc_694A76
mov	ecx, ebp
call	sub_64A400
jmp	short loc_694A76

loc_694A5B:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_694A6E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_694A6E:
mov	[esi], ebp
jmp	short loc_694A3A

loc_694A72:
mov	esi, [esp+14h+arg_0]

loc_694A76:
movzx	edx, byte ptr [ebx+edi+27F4h]
imul	edx, 34h
lea	ebp, [edx+edi+24B0h]
test	esi, esi
jz	short loc_694AA3
mov	eax, [esi]
mov	edx, [eax+0B0h]
mov	ecx, esi
call	edx
cmp	eax, 4
jnz	short loc_694AA3
mov	byte ptr [ebp+30h], 0
jmp	short loc_694AA7

loc_694AA3:
mov	byte ptr [ebp+30h], 1

loc_694AA7:
push	ebx
xor	eax, eax
push	esi
mov	ecx, edi
mov	[ebp+1Ch], ax
call	sub_694930
cmp	byte ptr [ebp+30h], 0
jz	short loc_694ADC
test	esi, esi
jz	short loc_694AD6

loc_694AC0:
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_694AD4
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_694AC0

loc_694AD4:
test	esi, esi

loc_694AD6:
setz	cl
mov	[ebp+30h], cl

loc_694ADC:
mov	ecx, [esp+14h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_694AED
call	sub_64A430

loc_694AED:
pop	ecx
retn	8
sub_6949E0 endp

align 10h



sub_694B00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebp
mov	ebp, ecx
cmp	dword ptr [ebp+27F0h], 0
mov	[esp+10h+var_C], 0
jbe	loc_694C22
push	ebx
push	esi
push	edi
lea	edi, [ebp+24C4h]
mov	[esp+1Ch+var_8], edi

loc_694B28:
mov	eax, [edi]
xor	esi, esi
test	eax, eax
jz	short loc_694B52
cmp	[eax+4], esi
jz	loc_694C29
mov	esi, [eax+4]
test	esi, esi
jz	short loc_694B52
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax
mov	ecx, esi
call	sub_64A400

loc_694B52:
cmp	esi, [esp+1Ch+arg_0]
setz	bl
test	esi, esi
jz	short loc_694B64
mov	ecx, esi
call	sub_64A400

loc_694B64:
test	bl, bl
jz	loc_694C03
mov	eax, [edi]
xor	esi, esi
test	eax, eax
jz	short loc_694BD9
cmp	[eax+4], esi
jz	loc_694C47
mov	esi, [eax+4]
test	esi, esi
jz	short loc_694BD9
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax
mov	ecx, esi
call	sub_64A400
mov	ecx, [esp+1Ch+var_C]
push	ecx
mov	ecx, ebp
call	sub_68DB40
mov	edx, [ebp+0]
mov	ebx, eax
mov	eax, [edx+0ECh]
mov	ecx, ebp
call	eax
xor	edi, edi
mov	[esp+1Ch+var_4], eax
test	ebx, ebx
jz	short loc_694BD5
jmp	short loc_694BC0
align 10h

loc_694BC0:
cmp	edi, [esp+1Ch+var_4]
jnb	short loc_694BD5
push	edi
push	0
mov	ecx, ebp
call	sub_694930
inc	edi
shr	ebx, 1
jnz	short loc_694BC0

loc_694BD5:
mov	edi, [esp+1Ch+var_8]

loc_694BD9:
mov	eax, [edi]
test	eax, eax
jz	short loc_694BF2
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_694BF2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_694BF2:
mov	dword ptr [edi], 0
test	esi, esi
jz	short loc_694C03
mov	ecx, esi
call	sub_64A400

loc_694C03:
mov	eax, [esp+1Ch+var_C]
inc	eax
add	edi, 34h
mov	[esp+1Ch+var_C], eax
mov	[esp+1Ch+var_8], edi
cmp	eax, [ebp+27F0h]
jb	loc_694B28
pop	edi
pop	esi
pop	ebx

loc_694C22:
pop	ebp
add	esp, 0Ch
retn	4

loc_694C29:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_694C3C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_694C3C:
mov	dword ptr [edi], 0
jmp	loc_694B52

loc_694C47:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_694C5A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_694C5A:
mov	dword ptr [edi], 0
jmp	loc_694BD9
sub_694B00 endp

align 10h



sub_694C70 proc	near

var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= byte ptr -1F8h
var_1E0= byte ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_18C= dword ptr -18Ch
var_40=	byte ptr -40h

sub	esp, 20Ch
push	ebx
push	ebp
push	esi
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+21Ch+var_208], edi
cmp	[ebp+246Ch], edi
jz	loc_694F13
mov	eax, [ebp+0F0h]
cmp	eax, edi
jz	short loc_694C9D
lea	edx, [eax+8]
jmp	short loc_694C9F

loc_694C9D:
xor	edx, edx

loc_694C9F:
mov	eax, [ebp+34h]
fld	dword ptr [ebp+74h]
mov	ecx, [eax+1Ch]
fstp	[esp+21Ch+var_20C]
mov	eax, [eax+14h]
fld	[esp+21Ch+var_20C]
mov	eax, [eax+18h]
push	1		; char
push	edi		; int
lea	esi, [ebp+0B0h]
push	esi		; int
push	ecx		; float
fstp	[esp+22Ch+var_22C]
add	ecx, 18h
push	ecx		; int
push	eax		; int
push	edx		; int
lea	ecx, [esp+238h+var_1E0]
call	sub_6A8260
mov	eax, [esp+21Ch+var_198]
cmp	eax, edi
jz	loc_694F0A
mov	ecx, [eax+0Ch]
cmp	ecx, edi
jz	loc_694F0A
fld	dword ptr [ebp+9Ch]
sub	esp, 10h
fstp	[esp+22Ch+var_220]
lea	eax, [ebp+40h]
fld	dword ptr [ebp+94h]
fstp	[esp+22Ch+var_224]
fld	dword ptr [ebp+98h]
fstp	[esp+22Ch+var_228]
fld	dword ptr [ebp+90h]
fstp	[esp+22Ch+var_22C]
push	eax
push	ecx
mov	eax, esp
mov	[eax], edi
mov	edx, [ecx]
mov	eax, [edx+30h]
call	eax
mov	eax, [ebp+246Ch]
mov	[esp+21Ch+var_20C], edi
mov	[esp+21Ch+var_208], eax
cmp	eax, edi
jbe	loc_694EF9
lea	ecx, [ecx+0]

loc_694D40:
mov	ecx, [ebp+2468h]
mov	ebx, [ecx+edi*4]
mov	esi, [ebx+0ACh]
test	esi, esi
jz	loc_694EEA
mov	edx, [ebx]
mov	eax, [edx+10h]
mov	ecx, ebx
call	eax
test	al, al
jz	loc_694EEA
mov	edi, [ebx+20h]
lea	ecx, [esp+21Ch+var_1F8]
call	sub_64E8E0
lea	ecx, [esp+21Ch+var_40] ; void *
call	sub_64F7C0
test	edi, edi
jz	short loc_694DCE
push	1
mov	ecx, edi
call	sub_654BF0
test	al, al
jz	short loc_694DB8
lea	ecx, [esp+21Ch+var_40]
push	ecx
mov	ecx, edi
mov	[esp+220h+var_1DC], offset flt_167D000
call	sub_654C80
lea	edx, [esp+21Ch+var_40]
mov	[esp+21Ch+var_18C], edx
jmp	short loc_694DE1

loc_694DB8:
lea	eax, [esp+21Ch+var_1F8]
push	eax
mov	ecx, edi
call	sub_654AF0
lea	ecx, [esp+21Ch+var_1F8]
mov	[esp+21Ch+var_1DC], ecx
jmp	short loc_694DE1

loc_694DCE:
mov	[esp+21Ch+var_1DC], offset flt_167D000
mov	[esp+21Ch+var_18C], 0

loc_694DE1:
mov	[esp+21Ch+var_1D8], offset unk_167D018
mov	dword ptr [esp+21Ch+var_1E0], offset unk_167D764
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_694E17
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_694E17
test	edi, edi
jz	short loc_694E17
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_694E17:
mov	dword ptr [esi+10h], 0
mov	eax, [ebx]
mov	edx, [eax+74h]
lea	ecx, [esp+21Ch+var_1E0]
push	ecx
mov	ecx, ebx
call	edx
fld	[esp+21Ch+var_1B8]
fstp	[esp+21Ch+var_200]
mov	ebx, ds:InterlockedExchangeAdd
fld	[esp+21Ch+var_1B4]
fstp	[esp+21Ch+var_1FC]
fld	[esp+21Ch+var_1B0]
fstp	[esp+21Ch+var_204]
fld	[esp+21Ch+var_1BC]
fstp	dword ptr [esi+14h]
fld	[esp+21Ch+var_200]
fstp	dword ptr [esi+18h]
fld	[esp+21Ch+var_1FC]
fstp	dword ptr [esi+1Ch]
fld	[esp+21Ch+var_204]
fstp	dword ptr [esi+20h]
mov	eax, [esp+21Ch+var_1AC]
mov	[esi+24h], eax
mov	ecx, [esp+21Ch+var_1A8]
mov	[esi+28h], ecx
mov	eax, [esp+21Ch+var_19C]
test	eax, eax
jz	short loc_694E87
push	1		; Value
add	eax, 4
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd

loc_694E87:
mov	edi, [esi+10h]
test	edi, edi
jz	short loc_694EA9
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_694EA9
test	edi, edi
jz	short loc_694EA9
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_694EA9:
mov	eax, [esp+21Ch+var_19C]
mov	[esi+10h], eax
mov	eax, [esp+21Ch+var_19C]
test	eax, eax
jz	short loc_694EDB
mov	esi, eax
push	0FFFFFFFFh	; Value
add	eax, 4
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_694EDB
test	esi, esi
jz	short loc_694EDB
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_694EDB:
mov	edi, [esp+21Ch+var_20C]
mov	[esp+21Ch+var_19C], 0

loc_694EEA:
inc	edi
mov	[esp+21Ch+var_20C], edi
cmp	edi, [esp+21Ch+var_208]
jb	loc_694D40

loc_694EF9:
mov	ecx, [esp+21Ch+var_198]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+34h]
call	eax

loc_694F0A:
lea	ecx, [esp+21Ch+var_1E0]
call	sub_6A82F0

loc_694F13:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20Ch
retn
sub_694C70 endp

align 10h



sub_694F20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
lea	esi, [ebx+1]
push	esi
push	edi
call	sub_683390
cmp	esi, ebx
jbe	short loc_694F52
sub	esi, ebx
mov	eax, [edi]
lea	eax, [eax+ebx*4]
jz	short loc_694F52
nop

loc_694F40:
test	eax, eax
jz	short loc_694F4A
mov	dword ptr [eax], 0

loc_694F4A:
add	eax, 4
sub	esi, 1
jnz	short loc_694F40

loc_694F52:
mov	eax, [edi+4]
mov	esi, [esp+0Ch+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_694F7C
mov	edx, [edi]
sub	eax, esi
lea	eax, ds:0FFFFFFFCh[eax*4]
lea	ecx, [edx+esi*4]
push	eax
push	ecx
add	ecx, 4
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_694F7C:
mov	ecx, [edi]
pop	edi
lea	ecx, [ecx+esi*4]
pop	esi
pop	ebx
test	ecx, ecx
jz	short locret_694F99
mov	edx, [esp+arg_4]
mov	eax, [edx]
test	eax, eax
jz	short loc_694F95
inc	dword ptr [eax+4]

loc_694F95:
mov	edx, [edx]
mov	[ecx], edx

locret_694F99:
retn	8
sub_694F20 endp

align 10h



sub_694FA0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	eax, [edi+0Ch]
mov	ebx, [edi+4]
push	esi
push	eax
call	sub_6833F0
cmp	esi, ebx
jbe	short loc_694FD5
sub	esi, ebx
mov	ecx, [edi]
lea	eax, [ecx+ebx*4]
jz	short loc_694FD5

loc_694FC3:
test	eax, eax
jz	short loc_694FCD
mov	dword ptr [eax], 0

loc_694FCD:
add	eax, 4
sub	esi, 1
jnz	short loc_694FC3

loc_694FD5:
pop	edi
pop	esi
pop	ebx
retn	4
sub_694FA0 endp

align 10h



sub_694FE0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, ecx
test	eax, eax
jz	short loc_694FFC
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_694FFC:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_695007
call	sub_64B3B0

loc_695007:
mov	edx, [ebx]
mov	[edi], edx
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_695014
inc	dword ptr [eax]

loc_695014:
mov	esi, [edi+4]
test	esi, esi
jz	short loc_695037
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_695037
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_695037:
mov	eax, [ebx+4]
add	ebx, 8
push	ebx
lea	ecx, [edi+8]
mov	[edi+4], eax
call	sub_67C4C0
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_694FE0 endp

align 10h



sub_695060 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_695073
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_695095

loc_695073:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_69509A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_695095:
call	sub_694190

loc_69509A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*2]
lea	esi, [ecx+edx*4+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_6950D6
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	eax, [ecx+4]
mov	[esi+8], eax
pop	esi
pop	ebx
retn	0Ch

loc_6950D6:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax
lea	ecx, [ecx+0]

loc_6950E0:
inc	edi
and	edi, ebp
lea	edx, [edi+edi*2]
cmp	[ecx+edx*4+8], ebx
jnz	short loc_6950E0
lea	edx, [edi+edi*2]
lea	ebx, [ecx+edx*4+8]
mov	edx, [esi+4]
mov	edx, [edx+0Ch]
and	edx, ebp
cmp	edx, eax
jnz	short loc_695140
test	ebx, ebx
jz	short loc_695116
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	eax, [esi+8]
mov	[ebx+8], eax

loc_695116:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [ebp+0]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69512E
call	sub_650DF0

loc_69512E:
mov	[esi+4], ebx
mov	ecx, [ebp+4]
mov	[esi+8], ecx
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_695140:
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jz	short loc_69515F
lea	ecx, [ecx+0]

loc_695150:
mov	edx, [edx]
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jnz	short loc_695150

loc_69515F:
test	ebx, ebx
jz	short loc_695176
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	eax, [esi+8]
mov	[ebx+8], eax

loc_695176:
mov	ebx, [esp+10h+arg_4]
mov	[edx], edi
mov	edi, [ebx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69518F
call	sub_650DF0

loc_69518F:
mov	[esi+4], edi
mov	ecx, [ebx+4]
pop	edi
mov	[esi+8], ecx
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_695060 endp

align 10h



sub_6951B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
mov	[esi+0Ch], eax
mov	[esi+10h], ecx
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	dword ptr [esi], offset	off_1437654
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+20h], ebx
mov	dword ptr [esi+24h], 10001h
mov	eax, [esi+10h]
mov	[esi+28h], bl
mov	[esi+2Ch], ebx
mov	[esi+30h], bl
mov	ecx, [eax+14h]
push	edi
mov	byte ptr [esp+0Ch+arg_4], bl
cmp	ecx, ebx
jz	short loc_69522E
mov	edx, [esi+0Ch]
push	edx
call	sub_654F00
mov	edi, eax
cmp	edi, ebx
jz	short loc_695279
inc	dword ptr [edi+4]
mov	eax, [edi]
mov	edx, [eax+5Ch]
mov	ecx, edi
call	edx
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+2Ch]
call	eax
shr	eax, 4
and	al, 1
mov	ecx, edi
mov	byte ptr [esp+0Ch+arg_4], al
call	sub_64A400
jmp	short loc_695279

loc_69522E:
push	ebp
mov	ebp, [eax+10h]
cmp	ebp, 0FFFFFFFFh
jz	short loc_695278
mov	edi, [esi+0Ch]
push	ebp
mov	ecx, edi
call	sub_68E580
mov	ecx, edi
test	eax, eax
jz	short loc_69524B
push	ebp
jmp	short loc_695258

loc_69524B:
push	ebx
call	sub_68E580
test	eax, eax
jz	short loc_695278
push	ebx
mov	ecx, edi

loc_695258:
call	sub_68E580
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+5Ch]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+2Ch]
call	eax
shr	eax, 4
and	al, 1
mov	byte ptr [esp+10h+arg_4], al

loc_695278:
pop	ebp

loc_695279:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	2Ch
call	eax
cmp	eax, ebx
jz	short loc_6952B1
mov	ecx, [esp+8+arg_4]
movzx	edx, byte ptr [ecx+18h]
mov	ecx, [esp+8+arg_8]
push	edx
mov	edx, [esi+10h]
push	ecx
mov	ecx, [esi+0Ch]
add	edx, 0Ch
push	edx
push	ecx
mov	ecx, eax
call	sub_6924F0
mov	edi, eax
jmp	short loc_6952B3

loc_6952B1:
xor	edi, edi

loc_6952B3:
mov	ecx, [esi+14h]
cmp	ecx, ebx
jz	short loc_6952BF
call	sub_64A430

loc_6952BF:
mov	[esi+14h], edi
mov	ecx, [esi+0Ch]
mov	edx, [ecx+8]
mov	eax, [edx+0Ch]
add	ecx, 8
push	17h
call	eax
mov	edi, eax
mov	edx, [edi]
mov	eax, [esi+14h]
mov	edx, [edx+4]
push	eax
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A430
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6951B0 endp




sub_6952F0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437654
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_695305
call	sub_64A400

loc_695305:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_695311
call	sub_64A400

loc_695311:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_69531D
call	sub_64A430

loc_69531D:
mov	dword ptr [esi], offset	off_1437528
mov	esi, [esi+10h]
test	esi, esi
jz	short loc_69533F
mov	ecx, esi
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69533F:
pop	esi
retn
sub_6952F0 endp

align 10h



sub_695350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
xor	ebp, ebp
mov	[esi+0Ch], eax
mov	[esi+4], ebp
mov	[esi+8], ebp
mov	[esi+10h], ecx
mov	dword ptr [esi], offset	off_1437660
mov	[esi+14h], ebp
mov	[esi+18h], ebp
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebp
push	54h
call	eax
mov	edi, eax
cmp	edi, ebp
jz	short loc_6953B0
mov	eax, [esi+0Ch]
mov	ecx, [eax+34h]
mov	edx, [eax+8]
push	ebx
mov	ebx, [ecx+14h]
lea	ecx, [eax+8]
mov	eax, [edx]
push	ebp
call	eax
push	eax
push	ebx
mov	ecx, edi
call	sub_6FDCA0
mov	edi, eax
pop	ebx
jmp	short loc_6953B2

loc_6953B0:
xor	edi, edi

loc_6953B2:
mov	ecx, [esi+18h]
cmp	ecx, ebp
jz	short loc_6953BE
call	sub_64A430

loc_6953BE:
lea	ecx, [esp+0Ch+arg_4]
mov	[esi+18h], edi
call	sub_679E30
mov	eax, [esi+0Ch]
cmp	[eax+30h], ebp
jz	short loc_6953F9
mov	eax, [eax+34h]
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+30h]
call	eax
push	eax
lea	ecx, [esp+10h+arg_4]
call	sub_67A2C0
lea	ecx, [esp+0Ch+arg_4]
push	ecx
call	sub_702B10
add	esp, 4
test	al, al
jnz	short loc_695402

loc_6953F9:
lea	ecx, [esp+0Ch+arg_4]
call	sub_67A720

loc_695402:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	2Ch
call	eax
cmp	eax, ebp
jz	short loc_695432
mov	edx, [esp+0Ch+arg_0]
mov	ecx, [esi+18h]
add	edx, 0Ch
push	edx
lea	edx, [esp+10h+arg_4]
push	edx
push	ecx
mov	ecx, eax
call	sub_692880
mov	edi, eax
jmp	short loc_695434

loc_695432:
xor	edi, edi

loc_695434:
mov	ecx, [esi+14h]
cmp	ecx, ebp
jz	short loc_695440
call	sub_64A430

loc_695440:
mov	[esi+14h], edi
mov	ecx, [esi+0Ch]
mov	eax, [ecx+8]
mov	edx, [eax+0Ch]
add	ecx, 8
push	17h
call	edx
mov	ecx, [esi+14h]
mov	edi, eax
mov	eax, [edi]
mov	edx, [eax+4]
push	ecx
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A430
mov	edi, [esp+0Ch+arg_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69548F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_69548F:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	8
sub_695350 endp

align 10h



sub_6954A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_0]
xor	ebp, ebp
mov	[esi+0Ch], eax
mov	[esi+4], ebp
mov	[esi+8], ebp
mov	[esi+10h], ecx
mov	dword ptr [esi], offset	off_143766C
mov	[esi+14h], ebp
mov	[esi+18h], ebp
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebp
push	54h
call	eax
mov	edi, eax
cmp	edi, ebp
jz	short loc_6954FF
mov	eax, [esi+0Ch]
mov	ecx, [eax+34h]
mov	ebx, [ecx+14h]
mov	edx, [eax+8]
lea	ecx, [eax+8]
mov	eax, [edx]
push	ebp
call	eax
push	eax
push	ebx
mov	ecx, edi
call	sub_6FDCA0
mov	edi, eax
jmp	short loc_695501

loc_6954FF:
xor	edi, edi

loc_695501:
mov	ecx, [esi+18h]
cmp	ecx, ebp
jz	short loc_69550D
call	sub_64A430

loc_69550D:
lea	ecx, [esp+10h+arg_4]
mov	[esi+18h], edi
call	sub_679E30
mov	eax, [esi+0Ch]
cmp	[eax+30h], ebp
jz	short loc_695548
mov	eax, [eax+34h]
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+30h]
call	eax
push	eax
lea	ecx, [esp+14h+arg_4]
call	sub_67A2C0
lea	ecx, [esp+10h+arg_4]
push	ecx
call	sub_702B10
add	esp, 4
test	al, al
jnz	short loc_695551

loc_695548:
lea	ecx, [esp+10h+arg_4]
call	sub_67A720

loc_695551:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	24h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_6955A9
mov	edi, [esp+10h+arg_0]
sub	esp, 14h
mov	ebx, esp
add	edi, 40h
push	edi
mov	ecx, ebx
call	sub_652330
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_695587
call	sub_64A420

loc_695587:
mov	ecx, [edi+10h]
mov	edx, [esp+24h+arg_0]
mov	[ebx+10h], ecx
mov	eax, [esi+18h]
add	edx, 0Ch
push	edx
lea	ecx, [esp+28h+arg_4]
push	ecx
push	eax
mov	ecx, ebp
call	sub_692A80
mov	edi, eax
jmp	short loc_6955AB

loc_6955A9:
xor	edi, edi

loc_6955AB:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6955B7
call	sub_64A430

loc_6955B7:
mov	[esi+14h], edi
mov	ecx, [esi+0Ch]
mov	edx, [ecx+8]
mov	eax, [edx+0Ch]
add	ecx, 8
push	17h
call	eax
mov	edi, eax
mov	edx, [edi]
mov	eax, [esi+14h]
mov	edx, [edx+4]
push	eax
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A430
mov	edi, [esp+10h+arg_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_695606
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_695606:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6954A0 endp

align 10h



sub_695610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_0]
xor	ebp, ebp
mov	[esi+0Ch], eax
mov	[esi+4], ebp
mov	[esi+8], ebp
mov	[esi+10h], ecx
mov	dword ptr [esi], offset	off_1437678
mov	[esi+14h], ebp
mov	[esi+18h], ebp
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebp
push	54h
call	eax
mov	edi, eax
cmp	edi, ebp
jz	short loc_69566F
mov	eax, [esi+0Ch]
mov	ecx, [eax+34h]
mov	ebx, [ecx+14h]
mov	edx, [eax+8]
lea	ecx, [eax+8]
mov	eax, [edx]
push	ebp
call	eax
push	eax
push	ebx
mov	ecx, edi
call	sub_6FDCA0
mov	edi, eax
jmp	short loc_695671

loc_69566F:
xor	edi, edi

loc_695671:
mov	ecx, [esi+18h]
cmp	ecx, ebp
jz	short loc_69567D
call	sub_64A430

loc_69567D:
lea	ecx, [esp+10h+arg_4]
mov	[esi+18h], edi
call	sub_679E30
mov	eax, [esi+0Ch]
cmp	[eax+30h], ebp
jz	short loc_6956B8
mov	eax, [eax+34h]
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+30h]
call	eax
push	eax
lea	ecx, [esp+14h+arg_4]
call	sub_67A2C0
lea	ecx, [esp+10h+arg_4]
push	ecx
call	sub_702B10
add	esp, 4
test	al, al
jnz	short loc_6956C1

loc_6956B8:
lea	ecx, [esp+10h+arg_4]
call	sub_67A720

loc_6956C1:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	24h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_695719
mov	edi, [esp+10h+arg_0]
sub	esp, 14h
mov	ebx, esp
add	edi, 54h
push	edi
mov	ecx, ebx
call	sub_652330
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_6956F7
call	sub_64A420

loc_6956F7:
mov	ecx, [edi+10h]
mov	edx, [esp+24h+arg_0]
mov	[ebx+10h], ecx
mov	eax, [esi+18h]
add	edx, 0Ch
push	edx
lea	ecx, [esp+28h+arg_4]
push	ecx
push	eax
mov	ecx, ebp
call	sub_692BF0
mov	edi, eax
jmp	short loc_69571B

loc_695719:
xor	edi, edi

loc_69571B:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_695727
call	sub_64A430

loc_695727:
mov	[esi+14h], edi
mov	ecx, [esi+0Ch]
mov	edx, [ecx+8]
mov	eax, [edx+0Ch]
add	ecx, 8
push	17h
call	eax
mov	edi, eax
mov	edx, [edi]
mov	eax, [esi+14h]
mov	edx, [edx+4]
push	eax
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A430
mov	edi, [esp+10h+arg_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_695776
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_695776:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_695610 endp

align 10h



sub_695780 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_33=	byte ptr -33h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 40h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+40h+var_4], eax
push	ebx
mov	ebx, [esp+44h+arg_0]
push	esi
push	edi
push	2Fh		; size_t
mov	edi, ecx
inc	dword ptr [edi+23E0h]
lea	eax, [esp+50h+var_33]
push	0		; int
lea	esi, [edi+23E0h]
push	eax		; void *
mov	[esp+58h+var_34], 0
call	_memset
push	esi		; int
lea	edx, [esp+5Ch+var_40]
lea	ecx, [esp+5Ch+var_34]
push	offset aInstance0 ; "instance{0}"
push	edx		; int
mov	[esp+64h+var_40], 2
mov	[esp+64h+var_3C], ecx
mov	[esp+64h+var_38], 30h
call	sub_728240
mov	eax, [edi+23C4h]
mov	ecx, [eax+280h]
add	esp, 18h
lea	edx, [esp+4Ch+var_34]
push	edx
call	sub_651000
mov	ecx, [esp+4Ch+var_4]
mov	[ebx], eax
inc	dword ptr [eax+8]
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 40h
retn	4
sub_695780 endp

align 10h



sub_695820 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
mov	eax, [ebp+4]
push	esi
push	edi
mov	edi, ecx
test	al, 4
jz	short loc_695858
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1Ch
call	edx
test	eax, eax
jz	loc_695A0C
push	edi
push	ebp
mov	ecx, eax
call	sub_695350
mov	ebx, eax
jmp	loc_695A08

loc_695858:
test	al, 8
jz	loc_6958FE
lea	ecx, [ebp+0Ch]
call	sub_679930
test	eax, eax
jz	loc_695A0C
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1Ch
call	edx
test	eax, eax
jz	loc_695A0C
push	edi
push	ebp
mov	ecx, eax
call	sub_6954A0
mov	ebx, eax
test	ebx, ebx
jz	loc_695A0C
mov	ecx, [ebx+10h]
push	0
add	ecx, 40h
call	sub_652C20
test	eax, eax
jz	loc_695A08
mov	ecx, [ebx+10h]
push	0
add	ecx, 40h
call	sub_652C20
mov	esi, [edi+2840h]
mov	[esp+14h+var_4], eax
test	esi, esi
jz	loc_695A08
lea	ecx, [ecx+0]

loc_6958D0:
mov	ebp, [esi+10h]
mov	al, [ebp+40h]
lea	ecx, [ebp+40h]
test	al, al
jz	short loc_6958F2
cmp	al, 0Ah
jz	short loc_6958F2
push	0
call	sub_652C20
cmp	[esp+14h+var_4], eax
jnz	short loc_6958F2
mov	byte ptr [ebp+68h], 1

loc_6958F2:
mov	esi, [esi+4]
test	esi, esi
jnz	short loc_6958D0
jmp	loc_695A04

loc_6958FE:
test	al, 10h
jz	loc_69599E
lea	ecx, [ebp+0Ch]
call	sub_679930
test	eax, eax
jz	loc_695A0C
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1Ch
call	edx
test	eax, eax
jz	loc_695A0C
push	edi
push	ebp
mov	ecx, eax
call	sub_695610
mov	ebx, eax
test	ebx, ebx
jz	loc_695A0C
mov	ecx, [ebx+10h]
push	0
add	ecx, 54h
call	sub_652C20
test	eax, eax
jz	loc_695A08
mov	ecx, [ebx+10h]
push	0
add	ecx, 54h
call	sub_652C20
mov	esi, [edi+2840h]
mov	[esp+14h+var_4], eax
test	esi, esi
jz	loc_695A08

loc_695973:
mov	ebp, [esi+10h]
mov	al, [ebp+54h]
lea	ecx, [ebp+54h]
test	al, al
jz	short loc_695995
cmp	al, 0Ah
jz	short loc_695995
push	0
call	sub_652C20
cmp	[esp+14h+var_4], eax
jnz	short loc_695995
mov	byte ptr [ebp+68h], 1

loc_695995:
mov	esi, [esi+4]
test	esi, esi
jnz	short loc_695973
jmp	short loc_695A04

loc_69599E:
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	34h
call	edx
test	eax, eax
jz	short loc_695A0C
push	edi
push	ebp
mov	ecx, eax
call	sub_6951B0
mov	ebx, eax
test	ebx, ebx
jz	short loc_695A0C
mov	eax, [edi+2840h]
test	eax, eax
jz	short loc_695A08
lea	esp, [esp+0]

loc_6959D0:
mov	esi, [ebx+10h]
mov	ebp, [esi+14h]
mov	edx, [eax+10h]
test	ebp, ebp
jz	short loc_6959EC
mov	ecx, [edx+14h]
test	ecx, ecx
jz	short loc_6959FD
mov	ecx, [ecx+0Ch]
cmp	ecx, [ebp+0Ch]
jmp	short loc_6959F7

loc_6959EC:
mov	ecx, [edx+10h]
cmp	ecx, 0FFFFFFFFh
jz	short loc_6959FD
cmp	ecx, [esi+10h]

loc_6959F7:
jnz	short loc_6959FD
mov	byte ptr [edx+68h], 1

loc_6959FD:
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_6959D0

loc_695A04:
mov	ebp, [esp+14h+arg_0]

loc_695A08:
test	ebx, ebx
jnz	short loc_695A29

loc_695A0C:
mov	ecx, ebp
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_695A29:
inc	dword ptr [edi+283Ch]
mov	eax, [edi+283Ch]
mov	[ebp+3Ch], eax
mov	eax, [edi+2840h]
test	eax, eax
jnz	short loc_695A50
mov	[edi+2840h], ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_695A50:
cmp	dword ptr [eax+4], 0
jz	short loc_695A5F

loc_695A56:
mov	eax, [eax+4]
cmp	dword ptr [eax+4], 0
jnz	short loc_695A56

loc_695A5F:
pop	edi
pop	esi
mov	[eax+4], ebx
pop	ebp
mov	[ebx+8], eax
pop	ebx
pop	ecx
retn	4
sub_695820 endp

align 10h



; int __stdcall	sub_695A70(char	*, int,	int)
sub_695A70 proc	near

var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, ecx
mov	eax, [edi+23C4h]
mov	ecx, [eax+280h]
xor	ebx, ebx
push	esi
mov	[esp+1Ch+var_8], ebx
call	sub_651000
mov	[esp+18h+arg_0], eax
inc	dword ptr [eax+8]
mov	eax, [esp+18h+arg_0]
cmp	[edi+30h], ebx
jz	short loc_695AC9
cmp	[eax+10h], ebx
jz	short loc_695AC9
mov	ecx, [edi+30h]
mov	eax, [ecx]
push	ebx
lea	edx, [esp+1Ch+arg_0]
push	edx
mov	edx, [eax+70h]
call	edx
mov	ecx, eax
call	sub_669880
mov	ebp, eax
mov	eax, [esp+18h+arg_0]
jmp	short loc_695ACB

loc_695AC9:
xor	ebp, ebp

loc_695ACB:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_695ADC
call	sub_650DF0

loc_695ADC:
cmp	ebp, ebx
jz	loc_695B90
lea	ecx, [ebp+78h]
call	sub_661C50
cmp	eax, ebx
jz	short loc_695AFF
mov	esi, [eax+1BCh]
cmp	esi, 0FFFFFFFFh
jnz	loc_695BD4

loc_695AFF:
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	6Ch
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_695B71
mov	eax, [esp+18h+arg_4]
push	eax
lea	ecx, [esp+1Ch+var_4]
call	sub_67AE10
mov	eax, [ebp+94h]
mov	[esp+18h+var_8], 1
cmp	eax, ebx
jnz	short loc_695B39
mov	ecx, ebp
call	sub_658B70

loc_695B39:
lea	ecx, [esi+0Ch]
mov	ebp, eax
call	sub_679E30
mov	ecx, [esp+18h+arg_8]
push	ebx
push	ecx
mov	[esi+14h], ebx
mov	[esi+1Ch], bl
lea	edx, [esp+20h+var_4]
push	edx
mov	[esi+2Ch], bl
push	0FFFFFFFFh
mov	[esi+40h], bl
mov	[esi+50h], ebx
push	ebp
mov	[esi+54h], bl
push	4
mov	ecx, esi
mov	[esi+64h], ebx
call	sub_692310
jmp	short loc_695B73

loc_695B71:
xor	esi, esi

loc_695B73:
test	byte ptr [esp+18h+var_8], 1
jz	loc_695C45
mov	ebp, dword ptr [esp+18h+var_4]
and	ebp, 0FFFFFFFCh
push	0FFFFFFFFh
lea	eax, [ebp+4]
push	eax
jmp	loc_695C2C

loc_695B90:
mov	ecx, [edi+30h]
mov	[esp+18h+arg_0], offset	byte_146D660
call	sub_654DD0
cmp	eax, 6
setnbe	cl
mov	[esp+18h+var_4], cl
mov	edx, dword ptr [esp+18h+var_4]
push	edx		; char
lea	eax, [esp+1Ch+arg_0]
push	eax		; int
push	esi		; char *
call	sub_68D7B0
mov	ecx, [esp+24h+arg_0]
add	esp, 0Ch
mov	esi, eax
cmp	[ecx], bl
jnz	loc_695C7B
cmp	esi, 0FFFFFFFFh
jz	loc_695C7B

loc_695BD4:
mov	ecx, [edi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	6Ch
call	eax
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_695C16
mov	ecx, [esp+18h+arg_4]
push	ecx
lea	ecx, [esp+1Ch+arg_0]
call	sub_67AE10
mov	edx, [esp+18h+arg_8]
push	ebx
push	1
push	edx
lea	eax, [esp+24h+arg_0]
push	eax
push	esi
mov	ecx, ebp
mov	[esp+2Ch+var_8], 2
call	sub_692440
mov	esi, eax
jmp	short loc_695C18

loc_695C16:
xor	esi, esi

loc_695C18:
test	byte ptr [esp+18h+var_8], 2
jz	short loc_695C45
mov	ebp, [esp+18h+arg_0]
and	ebp, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [ebp+4]
push	ecx		; Addend

loc_695C2C:
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_695C45
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax

loc_695C45:
cmp	esi, ebx
jz	short loc_695C7B
mov	edx, [edi+8]
mov	eax, [edx+0Ch]
lea	ecx, [edi+8]
push	17h
call	eax
cmp	eax, ebx
jz	short loc_695C73
mov	ecx, eax
call	sub_64A430
push	esi
mov	ecx, edi
call	sub_695820
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_695C73:
push	esi
mov	ecx, edi
call	sub_68D890

loc_695C7B:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_695A70 endp

align 10h



sub_695C90 proc	near

var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
xor	ebx, ebx
mov	ebp, ecx
mov	[esp+1Ch+var_4], ebx
test	esi, esi
jz	loc_695DF5
push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
mov	[esp+20h+var_D], bl
call	sub_679930
test	eax, eax
jbe	loc_695D91
mov	eax, [edi]
and	eax, 0FFFFFFFCh
mov	al, [eax+8]
cmp	al, 69h
jz	short loc_695CD5
cmp	al, 49h
jnz	loc_695D91

loc_695CD5:
lea	ecx, [esp+20h+var_C]
push	ecx
mov	ecx, edi
call	sub_67B250
push	offset aImg	; "img://"
push	6
push	0
lea	edx, [esp+2Ch+var_4]
push	edx
lea	ecx, [esp+30h+var_C]
mov	ebx, 1
call	sub_67B0C0
mov	ecx, eax
call	sub_654870
test	al, al
jnz	short loc_695D34
push	offset aImgps	; "imgps://"
push	8
push	0
lea	eax, [esp+2Ch+var_8]
push	eax
lea	ecx, [esp+30h+var_C]
mov	ebx, 3
call	sub_67B0C0
mov	ecx, eax
call	sub_654870
mov	[esp+20h+var_E], 0
test	al, al
jz	short loc_695D39

loc_695D34:
mov	[esp+20h+var_E], 1

loc_695D39:
test	bl, 2
jz	short loc_695D4A
lea	ecx, [esp+20h+var_8]
and	ebx, 0FFFFFFFDh
call	sub_4E40F0

loc_695D4A:
test	bl, 1
jz	short loc_695D5B
lea	ecx, [esp+20h+var_4]
and	ebx, 0FFFFFFFEh
call	sub_4E40F0

loc_695D5B:
cmp	[esp+20h+var_E], 0
jz	short loc_695D67
mov	[esp+20h+var_D], 1

loc_695D67:
mov	esi, [esp+20h+var_C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_695D8D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_695D8D:
mov	esi, [esp+20h+arg_0]

loc_695D91:
mov	ecx, edi
call	sub_679930
pop	edi
test	eax, eax
jbe	short loc_695DBF
cmp	[esp+1Ch+var_D], 0
jnz	short loc_695DBF
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
lea	ecx, [ebp+8]
push	17h
or	ebx, 4
call	eax
test	eax, eax
jz	short loc_695DC3
mov	byte ptr [esp+1Ch+arg_0], 1
jmp	short loc_695DC8

loc_695DBF:
mov	eax, [esp+1Ch+arg_0]

loc_695DC3:
mov	byte ptr [esp+1Ch+arg_0], 0

loc_695DC8:
test	bl, 4
jz	short loc_695DD8
test	eax, eax
jz	short loc_695DD8
mov	ecx, eax
call	sub_64A430

loc_695DD8:
cmp	byte ptr [esp+1Ch+arg_0], 0
push	esi
mov	ecx, ebp
jz	short loc_695DF0
call	sub_695820
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4

loc_695DF0:
call	sub_68D890

loc_695DF5:
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4
sub_695C90 endp

align 10h



sub_695E00 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
xor	ebx, ebx
mov	esi, ecx
mov	[esp+18h+var_4], esi
mov	[esp+18h+var_C], ebx
cmp	edi, ebx
jz	loc_695F6B
push	ebp
lea	ecx, [edi+78h]
call	sub_661C50
cmp	eax, ebx
jz	short loc_695E3A
mov	ebp, [eax+1BCh]
cmp	ebp, 0FFFFFFFFh
jnz	loc_695EDD

loc_695E3A:
mov	ecx, [esi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	6Ch
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_695EAC
mov	eax, [esp+1Ch+arg_4]
push	eax
lea	ecx, [esp+20h+arg_0]
call	sub_67AE10
mov	eax, [edi+94h]
mov	[esp+1Ch+var_C], 1
cmp	eax, ebx
jnz	short loc_695E74
mov	ecx, edi
call	sub_658B70

loc_695E74:
lea	ecx, [esi+0Ch]
mov	edi, eax
call	sub_679E30
mov	ecx, [esp+1Ch+arg_8]
push	ebx
push	ecx
mov	[esi+14h], ebx
mov	[esi+1Ch], bl
lea	edx, [esp+24h+arg_0]
push	edx
mov	[esi+2Ch], bl
push	0FFFFFFFFh
mov	[esi+40h], bl
mov	[esi+50h], ebx
push	edi
mov	[esi+54h], bl
push	4
mov	ecx, esi
mov	[esi+64h], ebx
call	sub_692310
jmp	short loc_695EAE

loc_695EAC:
xor	esi, esi

loc_695EAE:
test	byte ptr [esp+1Ch+var_C], 1
jz	short loc_695F31
mov	edi, [esp+1Ch+arg_0]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_695F31
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
jmp	short loc_695F31

loc_695EDD:
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	6Ch
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_695F1F
mov	ecx, [esp+1Ch+arg_4]
push	ecx
lea	ecx, [esp+20h+var_8]
call	sub_67AE10
mov	edx, [esp+1Ch+arg_8]
push	ebx
push	1
push	edx
lea	eax, [esp+28h+var_8]
push	eax
push	ebp
mov	ecx, esi
mov	[esp+30h+var_C], 2
call	sub_692440
mov	esi, eax
jmp	short loc_695F21

loc_695F1F:
xor	esi, esi

loc_695F21:
test	byte ptr [esp+1Ch+var_C], 2
jz	short loc_695F31
lea	ecx, [esp+1Ch+var_8]
call	sub_4E40F0

loc_695F31:
pop	ebp
cmp	esi, ebx
jz	short loc_695F6B
mov	edi, [esp+18h+var_4]
mov	edx, [edi+8]
mov	eax, [edx+0Ch]
lea	ecx, [edi+8]
push	17h
call	eax
cmp	eax, ebx
jz	short loc_695F63
mov	ecx, eax
call	sub_64A430
push	esi
mov	ecx, edi
call	sub_695820
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_695F63:
push	esi
mov	ecx, edi
call	sub_68D890

loc_695F6B:
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_695E00 endp

align 10h



sub_695F80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	esi
push	edi
xor	ebx, ebx
mov	[esp+10h+var_4], ebx
mov	edi, ecx
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	6Ch
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_695FCA
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esp+14h+var_4]
call	sub_67AE10
mov	ecx, [esp+10h+arg_8]
push	0
mov	ebx, 1
push	ebx
push	ecx
lea	edx, [esp+1Ch+var_4]
push	edx
mov	ecx, esi
call	sub_692390
mov	esi, eax
jmp	short loc_695FCC

loc_695FCA:
xor	esi, esi

loc_695FCC:
test	bl, 1
jz	short loc_695FF7
mov	ebx, [esp+10h+var_4]
and	ebx, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [ebx+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_695FF7
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_695FF7:
test	esi, esi
jz	short loc_696037
mov	ecx, [esp+10h+arg_0]
push	ecx
lea	ecx, [esi+2Ch]
call	sub_652E40
mov	edx, [edi+8]
mov	eax, [edx+0Ch]
lea	ecx, [edi+8]
push	17h
call	eax
test	eax, eax
jz	short loc_69602F
mov	ecx, eax
call	sub_64A430
push	esi
mov	ecx, edi
call	sub_695820
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	0Ch

loc_69602F:
push	esi
mov	ecx, edi
call	sub_68D890

loc_696037:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	0Ch
sub_695F80 endp

align 10h



sub_696040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	esi
push	edi
xor	ebx, ebx
mov	[esp+10h+var_4], ebx
mov	edi, ecx
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	6Ch
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_69608B
mov	eax, [esp+10h+arg_8]
push	eax
lea	ecx, [esp+14h+var_4]
call	sub_67AE10
mov	ecx, [esp+10h+arg_C]
push	0
push	0
push	ecx
lea	edx, [esp+1Ch+var_4]
push	edx
mov	ecx, esi
mov	ebx, 1
call	sub_692390
mov	esi, eax
jmp	short loc_69608D

loc_69608B:
xor	esi, esi

loc_69608D:
test	bl, 1
jz	short loc_6960B8
mov	ebx, [esp+10h+var_4]
and	ebx, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [ebx+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6960B8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_6960B8:
test	esi, esi
jz	short loc_69611C
mov	ecx, [esp+10h+arg_0]
push	ecx
lea	ecx, [esi+54h]
mov	dword ptr [esi+4], 10h
call	sub_652E40
mov	ebx, [esp+10h+arg_4]
test	ebx, ebx
jz	short loc_6960DF
mov	ecx, ebx
call	sub_64A420

loc_6960DF:
mov	ecx, [esi+64h]
test	ecx, ecx
jz	short loc_6960EB
call	sub_64A430

loc_6960EB:
lea	ecx, [edi+8]
mov	[esi+64h], ebx
mov	edx, [ecx]
mov	eax, [edx+0Ch]
push	17h
call	eax
test	eax, eax
jz	short loc_696114
mov	ecx, eax
call	sub_64A430
push	esi
mov	ecx, edi
call	sub_695820
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	10h

loc_696114:
push	esi
mov	ecx, edi
call	sub_68D890

loc_69611C:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	10h
sub_696040 endp

align 10h



sub_696130 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	esi
push	edi
xor	ebx, ebx
mov	[esp+10h+var_4], ebx
mov	edi, ecx
mov	ecx, [edi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	6Ch
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_69617B
mov	eax, [esp+10h+arg_8]
push	eax
lea	ecx, [esp+14h+var_4]
call	sub_67AE10
mov	ecx, [esp+10h+arg_C]
push	0
push	0
push	ecx
lea	edx, [esp+1Ch+var_4]
push	edx
mov	ecx, esi
mov	ebx, 1
call	sub_692390
mov	esi, eax
jmp	short loc_69617D

loc_69617B:
xor	esi, esi

loc_69617D:
test	bl, 1
jz	short loc_6961A8
mov	ebx, [esp+10h+var_4]
and	ebx, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [ebx+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6961A8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_6961A8:
test	esi, esi
jz	short loc_69620C
mov	ecx, [esp+10h+arg_0]
push	ecx
lea	ecx, [esi+40h]
mov	dword ptr [esi+4], 8
call	sub_652E40
mov	ebx, [esp+10h+arg_4]
test	ebx, ebx
jz	short loc_6961CF
mov	ecx, ebx
call	sub_64A420

loc_6961CF:
mov	ecx, [esi+50h]
test	ecx, ecx
jz	short loc_6961DB
call	sub_64A430

loc_6961DB:
lea	ecx, [edi+8]
mov	[esi+50h], ebx
mov	edx, [ecx]
mov	eax, [edx+0Ch]
push	17h
call	eax
test	eax, eax
jz	short loc_696204
mov	ecx, eax
call	sub_64A430
push	esi
mov	ecx, edi
call	sub_695820
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	10h

loc_696204:
push	esi
mov	ecx, edi
call	sub_68D890

loc_69620C:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	10h
sub_696130 endp

align 10h



sub_696220 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+4Ch]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_696251
mov	ecx, [eax]
mov	[edi+4Ch], ecx
mov	[eax], ebx
dec	dword ptr [edi+54h]

loc_696238:
mov	ecx, [esp+0Ch+arg_0]
lea	edx, [ecx+ecx*2]
lea	ecx, [edi+edx*4]
mov	edx, [ecx+4]
cmp	edx, ebx
jnz	short loc_6962B8
mov	edx, [ecx]
mov	[eax], edx
mov	[ecx], eax
jmp	short loc_6962C1

loc_696251:
mov	ecx, [edi+5Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	40h
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_6962B0
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+1Ah], bl
mov	[esi+1Ch], bl
xor	ecx, ecx
mov	[esi+18h], cx
mov	[esi+1Dh], bl
mov	byte ptr [esi+1Bh], 0FFh
mov	[esi+28h], bl
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	[esi], ebx
mov	[esi+4], ebx
mov	ecx, [esi+0Ch]
cmp	ecx, ebx
jz	short loc_6962A6
call	sub_64A400

loc_6962A6:
mov	[esi+0Ch], ebx
mov	[esi+3Ch], ebx
mov	eax, esi
jmp	short loc_696238

loc_6962B0:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4

loc_6962B8:
mov	edx, [edx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[edx], eax

loc_6962C1:
mov	[ecx+4], eax
cmp	[eax], ebx
jnz	short loc_6962CB
mov	[ecx+8], eax

loc_6962CB:
mov	ecx, [edi+50h]
mov	[eax+3Ch], ecx
inc	dword ptr [edi+48h]
pop	edi
pop	esi
pop	ebx
retn	4
sub_696220 endp

align 10h



sub_6962E0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+34h]
test	edi, edi
jz	short loc_696307
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_696307
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_696307:
lea	ecx, [esi+18h]
call	sub_6806F0
mov	ecx, [esi+14h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69631D
call	sub_650DF0

loc_69631D:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_696337
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_696337
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_696337:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_696343
call	sub_64B3B0

loc_696343:
test	byte ptr [esi+8], 2
jnz	short loc_696354
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_696354
call	sub_64B3B0

loc_696354:
test	byte ptr [esi+8], 1
mov	dword ptr [esi], 0
jnz	short loc_69636C
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_69636C
call	sub_64B3B0

loc_69636C:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn
sub_6962E0 endp

align 10h



sub_696380 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, ecx
inc	dword ptr [ebx+24ACh]
mov	eax, [ebx+24ACh]
push	esi
push	edi
lea	edi, [ebx+24A0h]
mov	[ebp+30h], eax
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6963B4
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6963C9
push	esi
jmp	short loc_6963C1

loc_6963B4:
cmp	esi, [edi+8]
jb	short loc_6963C9
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_6963C1:
push	edi
mov	ecx, edi
call	sub_68F9C0

loc_6963C9:
mov	edx, [edi]
lea	eax, [edx+esi*4-4]
mov	[edi+4], esi
test	eax, eax
jz	short loc_6963D8
mov	[eax], ebp

loc_6963D8:
mov	eax, [ebx+24ACh]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_696380 endp

align 10h



; int __stdcall	sub_6963F0(int,	int, int, unsigned int CurrentState, int)
sub_6963F0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
NewValue= dword	ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
CurrentState= dword ptr	 10h
arg_10=	dword ptr  14h

sub	esp, 24h
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+30h], 0
jnz	short loc_696405
xor	al, al
pop	ebx
add	esp, 24h
retn	14h

loc_696405:
push	esi
push	0		; Mask
lea	eax, [esp+30h+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+3Ch+var_18]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	ecx, [ebx+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
add	esp, 18h
call	eax
mov	edx, [esp+2Ch+arg_4]
mov	esi, eax
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
push	edx
mov	[esp+30h+var_24], esi
call	sub_651000
push	0
push	0
push	0
mov	[esp+38h+var_1C], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+3Ch+var_10]
push	eax
lea	ecx, [esp+40h+var_1C]
push	ecx
mov	ecx, esi
mov	[esp+44h+var_10], 0
call	sub_6726F0
test	al, al
jz	loc_69690E
cmp	[esp+2Ch+var_10], 6
jnz	loc_69690E
push	esi
lea	ecx, [esp+30h+var_10]
call	sub_652C20
mov	esi, eax
mov	[esp+2Ch+arg_4], esi
test	esi, esi
jz	loc_69690E
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 7
jnz	loc_69690E
mov	ecx, [ebx+23C8h]
mov	dword ptr [ecx+18h], 0
mov	ecx, [ebx+23C8h]
push	1
add	ecx, 8
call	sub_669EC0
mov	ecx, [esp+2Ch+arg_0]
mov	eax, [esi+3Ch]
mov	[esp+2Ch+var_18], eax
cmp	ecx, 5		; switch 6 cases
ja	loc_6968CE	; default
push	ebp
push	edi
jmp	ds:off_696950[ecx*4] ; switch jump

loc_6964EC:		; jumptable 006964E5 case 0
mov	ecx, [esp+34h+arg_10]
xor	esi, esi
mov	ebp, eax
cmp	eax, ecx
jb	short loc_6964FA
mov	ebp, ecx

loc_6964FA:
test	ebp, ebp
jbe	loc_6968CC
mov	edi, [esp+34h+arg_8]
mov	ebx, [esp+34h+CurrentState]
add	edi, edi
add	edi, edi
mov	edi, edi

loc_696510:
mov	edx, [esp+34h+arg_4]
mov	eax, [edx+38h]
mov	ecx, [edi+eax]
test	ecx, ecx
jz	short loc_696532
mov	edx, [esp+34h+var_24]
push	edx
call	sub_653400
call	__ftol2_sse
mov	[ebx+esi*4], eax
jmp	short loc_696539

loc_696532:
mov	dword ptr [ebx+esi*4], 0

loc_696539:
inc	esi
add	edi, 4
cmp	esi, ebp
jb	short loc_696510
jmp	loc_6968CC

loc_696546:		; jumptable 006964E5 case 2
mov	ecx, [esp+34h+arg_10]
xor	esi, esi
mov	ebx, eax
cmp	eax, ecx
jb	short loc_696554
mov	ebx, ecx

loc_696554:
test	ebx, ebx
jbe	loc_6968CC
mov	edi, [esp+34h+arg_8]
mov	ebp, [esp+34h+CurrentState]
add	edi, edi
add	edi, edi
jmp	short loc_696570
align 10h

loc_696570:
mov	eax, [esp+34h+arg_4]
mov	ecx, [eax+38h]
mov	ecx, [edi+ecx]
test	ecx, ecx
jz	short loc_69658E
mov	edx, [esp+34h+var_24]
push	edx
call	sub_653400
fstp	dword ptr [ebp+esi*4+0]
jmp	short loc_696594

loc_69658E:
fldz
fstp	dword ptr [ebp+esi*4+0]

loc_696594:
inc	esi
add	edi, 4
cmp	esi, ebx
jb	short loc_696570
jmp	loc_6968CC

loc_6965A1:		; jumptable 006964E5 case 1
mov	ecx, [esp+34h+arg_10]
xor	esi, esi
mov	ebx, eax
cmp	eax, ecx
jb	short loc_6965AF
mov	ebx, ecx

loc_6965AF:
test	ebx, ebx
jbe	loc_6968CC
mov	edi, [esp+34h+arg_8]
mov	ebp, [esp+34h+CurrentState]
add	edi, edi
add	edi, edi

loc_6965C3:
mov	eax, [esp+34h+arg_4]
mov	ecx, [eax+38h]
mov	ecx, [edi+ecx]
test	ecx, ecx
jz	short loc_6965DD
mov	edx, [esp+34h+var_24]
push	edx
call	sub_653400
jmp	short loc_6965DF

loc_6965DD:
fldz

loc_6965DF:
fstp	qword ptr [ebp+esi*8+0]
inc	esi
add	edi, 4
cmp	esi, ebx
jb	short loc_6965C3
jmp	loc_6968CC

loc_6965F0:		; jumptable 006964E5 case 5
mov	ecx, [esp+34h+arg_10]
cmp	eax, ecx
jb	short loc_6965FA
mov	eax, ecx

loc_6965FA:
test	eax, eax
jbe	loc_6968CC
mov	ebp, [esp+34h+arg_8]
mov	esi, [esp+34h+CurrentState]
add	ebp, ebp
add	ebp, ebp
mov	[esp+34h+CurrentState],	eax

loc_696612:
mov	eax, [esp+34h+arg_4]
mov	ecx, [eax+38h]
mov	edx, [esi]
mov	edi, [ecx+ebp]
mov	eax, [edx+24h]
push	0
mov	ecx, esi
call	eax
test	edi, edi
jz	short loc_69663B
mov	ecx, [esp+34h+var_24]
push	esi
push	edi
push	ecx
mov	ecx, ebx
call	sub_64BBC0
jmp	short loc_696646

loc_69663B:
mov	edx, [esi]
mov	eax, [edx+24h]
push	0
mov	ecx, esi
call	eax

loc_696646:
add	ebp, 4
add	esi, 18h
sub	[esp+34h+CurrentState],	1
jnz	short loc_696612
jmp	loc_6968CC

loc_696658:		; jumptable 006964E5 case 3
mov	esi, [esp+34h+arg_10]
cmp	eax, esi
jnb	short loc_696668
mov	esi, eax
mov	[esp+34h+arg_0], eax
jmp	short loc_69666C

loc_696668:
mov	[esp+34h+arg_0], esi

loc_69666C:
mov	ecx, [ebx+23C8h]
mov	eax, 1
cmp	esi, 1
jb	short loc_69667E
mov	eax, esi

loc_69667E:
push	eax
add	ecx, 8
call	sub_669EC0
xor	edi, edi
test	esi, esi
jbe	loc_6968CC
mov	ecx, [esp+34h+arg_8]
lea	edx, ds:0[ecx*4]
mov	[esp+34h+arg_8], edx

loc_6966A0:
mov	eax, [esp+34h+arg_4]
mov	ecx, [eax+38h]
mov	edx, [esp+34h+arg_8]
mov	ecx, [edx+ecx]
test	ecx, ecx
jz	short loc_69671D
mov	eax, [esp+34h+var_24]
push	0
push	0FFFFFFFFh
push	eax
lea	edx, [esp+40h+arg_10]
push	edx
call	sub_652F60
mov	eax, [esp+34h+arg_10]
mov	ecx, [eax]
mov	edx, [esp+34h+CurrentState]
mov	[edx+edi*4], ecx
mov	eax, [ebx+23C8h]
mov	ecx, [eax+18h]
lea	edx, [ecx+1]
mov	[eax+18h], edx
mov	eax, [ebx+23C8h]
mov	edx, [eax+8]
mov	eax, [esp+34h+arg_10]
inc	dword ptr [eax+8]
lea	esi, [edx+ecx*4]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	ebp, eax
jnz	short loc_696703
call	sub_650DF0

loc_696703:
mov	[esi], ebp
mov	eax, [esp+34h+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_696728
call	sub_650DF0
jmp	short loc_696728

loc_69671D:
mov	eax, [esp+34h+CurrentState]
mov	dword ptr [eax+edi*4], 0

loc_696728:
add	[esp+34h+arg_8], 4
inc	edi
cmp	edi, [esp+34h+arg_0]
jb	loc_6966A0
jmp	loc_6968CC

loc_69673D:		; jumptable 006964E5 case 4
mov	ecx, [esp+34h+arg_10]
mov	[esp+34h+arg_0], 0
cmp	eax, ecx
jnb	short loc_696753
mov	[esp+34h+var_20], eax
jmp	short loc_696759

loc_696753:
mov	eax, ecx
mov	[esp+34h+var_20], ecx

loc_696759:
mov	ecx, [ebx+23C8h]
cmp	eax, 1
jnb	short loc_696769
mov	eax, 1

loc_696769:
push	eax
add	ecx, 8
call	sub_669EC0
xor	ebp, ebp
cmp	[esp+34h+var_18], ebp
jbe	loc_696810
mov	ecx, [esp+34h+arg_8]
lea	edx, ds:0[ecx*4]
mov	[esp+34h+arg_8], edx
lea	ecx, [ecx+0]

loc_696790:
mov	eax, [esp+34h+arg_4]
mov	ecx, [eax+38h]
mov	edx, [esp+34h+arg_8]
mov	ecx, [edx+ecx]
test	ecx, ecx
jz	short loc_696804
mov	eax, [esp+34h+var_24]
push	0
push	0FFFFFFFFh
push	eax
lea	edx, [esp+40h+arg_10]
push	edx
call	sub_652F60
mov	eax, [ebx+23C8h]
mov	ecx, [eax+8]
mov	eax, [esp+34h+arg_10]
inc	dword ptr [eax+8]
lea	esi, [ecx+ebp*4]
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	edi, eax
jnz	short loc_6967D7
call	sub_650DF0

loc_6967D7:
lea	ecx, [esp+34h+arg_10]
mov	[esi], edi
call	sub_650650
mov	edx, [esp+34h+arg_0]
lea	eax, [edx+eax+1]
mov	[esp+34h+arg_0], eax
mov	eax, [esp+34h+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_696804
call	sub_650DF0

loc_696804:
add	[esp+34h+arg_8], 4
inc	ebp
cmp	ebp, [esp+34h+var_18]
jb	short loc_696790

loc_696810:
mov	esi, [esp+34h+arg_0]
mov	edi, [ebx+23C8h]
mov	eax, [edi+4]
lea	esi, [esi+esi+0FFFh]
and	esi, 0FFFFF000h
cmp	eax, esi
jb	short loc_696839
jbe	short loc_69685B
sub	eax, esi
cmp	eax, 1000h
jbe	short loc_69685B

loc_696839:
mov	eax, [edi]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
test	eax, eax
jz	short loc_69684E
push	esi
push	eax
mov	eax, [edx+2Ch]
jmp	short loc_696854

loc_69684E:
mov	eax, [edx+28h]
push	0
push	esi

loc_696854:
call	eax
mov	[edi], eax
mov	[edi+4], esi

loc_69685B:
mov	esi, [edi]
xor	edi, edi
cmp	[esp+34h+var_20], edi
jbe	short loc_6968BC
jmp	short loc_696870
align 10h

loc_696870:
mov	ecx, [ebx+23C8h]
mov	edx, [ecx+8]
mov	eax, [edx+edi*4]
mov	ecx, [eax]
lea	edx, [esp+34h+arg_10]
push	edx
mov	[esp+38h+arg_10], ecx
mov	ebp, esi
call	sub_67B600
test	eax, eax
jz	short loc_6968A6

loc_696892:
mov	[esi], ax
lea	eax, [esp+34h+arg_10]
push	eax
add	esi, 2
call	sub_67B600
test	eax, eax
jnz	short loc_696892

loc_6968A6:
mov	edx, [esp+34h+CurrentState]
xor	ecx, ecx
mov	[esi], cx
mov	[edx+edi*4], ebp
inc	edi
add	esi, 2
cmp	edi, [esp+34h+var_20]
jb	short loc_696870

loc_6968BC:
mov	ecx, [ebx+23C8h]
push	1
add	ecx, 8
call	sub_669EC0

loc_6968CC:
pop	edi
pop	ebp

loc_6968CE:		; default
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	eax, [esp+2Ch+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6968ED
call	sub_650DF0

loc_6968ED:
mov	eax, [esp+2Ch+NewValue]
push	30000h		; Mask
push	eax		; NewValue
lea	ecx, [esp+34h+CurrentState]
push	ecx		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	esi
mov	al, 1
pop	ebx
add	esp, 24h
retn	14h

loc_69690E:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	eax, [esp+2Ch+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69692D
call	sub_650DF0

loc_69692D:
mov	edx, [esp+2Ch+NewValue]
push	30000h		; Mask
push	edx		; NewValue
lea	eax, [esp+34h+CurrentState]
push	eax		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	esi
xor	al, al
pop	ebx
add	esp, 24h
retn	14h
sub_6963F0 endp

align 10h
off_696950 dd offset loc_6964EC	; jump table for switch	statement
dd offset loc_6965A1
dd offset loc_696546
dd offset loc_696658
dd offset loc_69673D
dd offset loc_6965F0
align 10h



sub_696970 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, [ecx+2404h]
push	ebx
lea	edx, [ecx+2404h]
push	ebp
push	esi
push	edi
mov	[esp+14h+var_4], edx
test	eax, eax
jnz	short loc_69698F
xor	ebp, ebp
xor	edi, edi
jmp	short loc_6969A4

loc_69698F:
xor	edi, edi
lea	ecx, [eax+8]

loc_696994:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6969A2
inc	edi
add	ecx, 0Ch
cmp	edi, [eax+4]
jbe	short loc_696994

loc_6969A2:
mov	ebp, edx

loc_6969A4:
test	ebp, ebp
jz	short loc_696A15
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_696A15
cmp	edi, [eax+4]
jg	short loc_696A15
lea	ecx, [edi+edi*2]
mov	esi, [eax+ecx*4+10h]
test	esi, esi
jz	short loc_6969F0
nop

loc_6969C0:
mov	ebx, esi
mov	esi, [esi+14h]
lea	ecx, [ebx+4]
call	sub_652830
mov	ecx, [ebx]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6969DA
call	sub_650DF0

loc_6969DA:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
test	esi, esi
jnz	short loc_6969C0
mov	edx, [esp+14h+var_4]

loc_6969F0:
mov	ecx, [ebp+0]
mov	eax, [ecx+4]
cmp	edi, eax
jg	short loc_6969A4
inc	edi
cmp	edi, eax
ja	short loc_6969A4
lea	esi, [edi+edi*2]
lea	ecx, [ecx+esi*4+8]

loc_696A06:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6969A4
inc	edi
add	ecx, 0Ch
cmp	edi, eax
jbe	short loc_696A06
jmp	short loc_6969A4

loc_696A15:
pop	edi
pop	esi
pop	ebp
mov	ecx, edx
pop	ebx
add	esp, 4
jmp	sub_693EA0
sub_696970 endp

align 10h



sub_696A30 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+30h], 0
jz	loc_696B08
push	ebx
push	ebp
mov	ebp, [esp+1Ch+arg_4]
mov	eax, [ebp+0]
push	edi
test	eax, eax
jz	short loc_696A5B
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_696A5B:
mov	ecx, [ebp+4]
mov	ebx, [ebp+0]
xor	edi, edi
mov	[esp+20h+arg_4], ebx
test	ecx, ecx
jz	short loc_696A7A
push	esi
call	sub_654F00
test	eax, eax
jz	short loc_696A78
inc	dword ptr [eax+4]

loc_696A78:
mov	edi, eax

loc_696A7A:
test	ebx, ebx
jz	short loc_696A83
add	ebx, 10h
jmp	short loc_696A8E

loc_696A83:
test	edi, edi
jz	short loc_696A8C
lea	ebx, [edi+78h]
jmp	short loc_696A8E

loc_696A8C:
xor	ebx, ebx

loc_696A8E:
mov	ecx, [esi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
add	ebp, 8
push	ebp
lea	ecx, [esp+24h+var_10]
mov	esi, eax
call	sub_651E70
mov	ecx, [esi+8]
sub	ecx, [esi+0Ch]
mov	edx, [esi+1Ch]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
mov	ecx, [esp+20h+arg_0]
mov	edx, [esp+20h+arg_C]
push	ecx
push	eax
mov	eax, [esp+28h+arg_8]
push	edx
push	esi
push	ebx
push	eax
lea	ecx, [esp+38h+var_10]
push	ecx
call	sub_66B4F0
add	esp, 1Ch
lea	ecx, [esp+20h+var_10]
mov	bl, al
call	sub_652830
test	edi, edi
jz	short loc_696AEF
mov	ecx, edi
call	sub_64A400

loc_696AEF:
mov	ecx, [esp+20h+arg_4]
test	ecx, ecx
jz	short loc_696AFC
call	sub_64B3B0

loc_696AFC:
pop	edi
pop	ebp
mov	al, bl
pop	ebx
pop	esi
add	esp, 10h
retn	10h

loc_696B08:
xor	al, al
pop	esi
add	esp, 10h
retn	10h
sub_696A30 endp

align 10h



sub_696B20 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 10h
push	edi
mov	edi, ecx
cmp	dword ptr [edi+30h], 0
jz	loc_696BE9
push	ebx
push	ebp
mov	ebp, [esp+1Ch+arg_4]
mov	eax, [ebp+0]
push	esi
test	eax, eax
jz	short loc_696B4B
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_696B4B:
mov	ecx, [ebp+4]
mov	ebx, [ebp+0]
xor	esi, esi
mov	[esp+20h+arg_4], ebx
test	ecx, ecx
jz	short loc_696B6A
push	edi
call	sub_654F00
test	eax, eax
jz	short loc_696B68
inc	dword ptr [eax+4]

loc_696B68:
mov	esi, eax

loc_696B6A:
test	ebx, ebx
jz	short loc_696B73
add	ebx, 10h
jmp	short loc_696B7E

loc_696B73:
test	esi, esi
jz	short loc_696B7C
lea	ebx, [esi+78h]
jmp	short loc_696B7E

loc_696B7C:
xor	ebx, ebx

loc_696B7E:
mov	ecx, [edi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
add	ebp, 8
push	ebp
lea	ecx, [esp+24h+var_10]
mov	edi, eax
call	sub_651E70
mov	ecx, [esp+20h+arg_0]
mov	edx, [esp+20h+arg_10]
mov	eax, [esp+20h+arg_C]
push	ecx
mov	ecx, [esp+24h+arg_8]
push	edx
push	eax
push	edi
push	ebx
push	ecx
lea	edx, [esp+38h+var_10]
push	edx
call	sub_66DC20
add	esp, 1Ch
lea	ecx, [esp+20h+var_10]
mov	bl, al
call	sub_652830
test	esi, esi
jz	short loc_696BD0
mov	ecx, esi
call	sub_64A400

loc_696BD0:
mov	ecx, [esp+20h+arg_4]
test	ecx, ecx
jz	short loc_696BDD
call	sub_64B3B0

loc_696BDD:
pop	esi
pop	ebp
mov	al, bl
pop	ebx
pop	edi
add	esp, 10h
retn	14h

loc_696BE9:
xor	al, al
pop	edi
add	esp, 10h
retn	14h
sub_696B20 endp

align 10h



sub_696C00 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+10h], 2
push	edi
jnz	short loc_696C16
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_696C16
call	sub_64B3B0

loc_696C16:
test	byte ptr [esi+10h], 1
mov	dword ptr [esi+8], 0
jnz	short loc_696C2F
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_696C2F
call	sub_64B3B0

loc_696C2F:
mov	dword ptr [esi+0Ch], 0
mov	edi, [esi+4]
test	edi, edi
jz	short loc_696C59
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_696C59
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_696C59:
mov	ecx, [esi]
pop	edi
pop	esi
test	ecx, ecx
jz	short locret_696C66
jmp	sub_64B3B0

locret_696C66:
retn
sub_696C00 endp

align 10h



sub_696C70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
xor	ebx, ebx
mov	[esp+0Ch+var_4], ecx
mov	[esp+0Ch+var_8], ebx
cmp	[ecx+27F0h], ebx
jbe	loc_696D16
push	ebp
push	esi
push	edi
lea	esi, [ecx+24B4h]

loc_696C93:
test	byte ptr [esi-4], 1
jz	short loc_696CFF
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
cmp	eax, ebx
jbe	short loc_696CE7
mov	ecx, [esi]
lea	edi, [ecx+eax*4-4]
mov	ebp, eax
jmp	short loc_696CB0
align 10h

loc_696CB0:
mov	ecx, [edi]
cmp	ecx, ebx
jz	short loc_696CBB
call	sub_64A400

loc_696CBB:
sub	edi, 4
sub	ebp, 1
jnz	short loc_696CB0
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_696CF5
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_696CE2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_696CE2:
mov	[esi+8], ebx
jmp	short loc_696CF5

loc_696CE7:
cmp	[esi+8], ebx
ja	short loc_696CF5
push	ebx
push	ecx
mov	ecx, esi
call	sub_680850

loc_696CF5:
mov	ecx, [esp+18h+var_4]
mov	[esi+4], ebx
mov	[esi-4], bl

loc_696CFF:
mov	eax, [esp+18h+var_8]
inc	eax
add	esi, 34h
mov	[esp+18h+var_8], eax
cmp	eax, [ecx+27F0h]
jb	short loc_696C93
pop	edi
pop	esi
pop	ebp

loc_696D16:
pop	ebx
add	esp, 8
retn
sub_696C70 endp

align 10h



sub_696D20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
mov	ebp, ecx
xor	ebx, ebx
mov	[esp+10h+var_4], ebp
mov	[esp+10h+var_8], ebx
cmp	[ebp+27F0h], ebx
jbe	loc_696DF1
push	esi
push	edi
lea	esi, [ebp+24B4h]

loc_696D45:
mov	edi, [esi+14h]
cmp	edi, ebx
jz	short loc_696D67
dec	dword ptr [edi]
cmp	[edi], ebx
jg	short loc_696D67
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_696D67:
mov	[esi+14h], ebx
test	byte ptr [esi-4], 1
jz	short loc_696DD1
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
cmp	eax, ebx
jbe	short loc_696DB9
mov	ecx, [esi]
lea	edi, [ecx+eax*4-4]
mov	ebp, eax

loc_696D82:
mov	ecx, [edi]
cmp	ecx, ebx
jz	short loc_696D8D
call	sub_64A400

loc_696D8D:
sub	edi, 4
sub	ebp, 1
jnz	short loc_696D82
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_696DC7
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_696DB4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_696DB4:
mov	[esi+8], ebx
jmp	short loc_696DC7

loc_696DB9:
cmp	[esi+8], ebx
ja	short loc_696DC7
push	ebx
push	ecx
mov	ecx, esi
call	sub_680850

loc_696DC7:
mov	ebp, [esp+18h+var_4]
mov	[esi+4], ebx
mov	[esi-4], bl

loc_696DD1:
mov	eax, [esp+18h+var_8]
xor	ecx, ecx
mov	[esi+18h], cx
inc	eax
add	esi, 34h
mov	[esp+18h+var_8], eax
cmp	eax, [ebp+27F0h]
jb	loc_696D45
pop	edi
pop	esi

loc_696DF1:
pop	ebp
pop	ebx
add	esp, 8
retn
sub_696D20 endp

align 10h



sub_696E00 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	esi
mov	esi, [esp+18h+arg_0]
cmp	byte ptr [esi+20h], 0
push	edi
mov	edi, [esi]
mov	ebx, ecx
jz	short loc_696E2B
mov	al, [edi]
test	al, 1
jz	short loc_696E2B
test	al, 2
jnz	short loc_696E2B
push	0
lea	ecx, [edi+4]
call	sub_694FA0
mov	byte ptr [edi],	0

loc_696E2B:
test	byte ptr [edi],	1
jnz	loc_696EE5
mov	ecx, [edi+18h]
mov	al, [esi+20h]
push	ebp
lea	ebp, [edi+4]
mov	[esp+20h+var_C], 0
mov	[esp+20h+var_A], 0
mov	[esp+20h+var_10], ebp
mov	[esp+20h+var_B], al
test	ecx, ecx
jz	short loc_696E98
push	ebx
call	sub_654F00
mov	esi, eax
test	esi, esi
jz	short loc_696E98
inc	dword ptr [esi+4]
mov	ecx, esi
call	sub_64A400
mov	eax, [esi]
mov	edx, [eax+0E4h]
lea	ecx, [esp+20h+var_10]
push	ecx
mov	ecx, esi
call	edx

loc_696E7B:
cmp	[esp+20h+var_C], 0
jz	short loc_696EBD
movzx	eax, byte_1856037
mov	ecx, [ebp+4]
push	eax
push	ecx
push	0
push	ebp
call	sub_691810
jmp	short loc_696ED1

loc_696E98:
mov	esi, [ebx+28h]
test	esi, esi
jle	short loc_696E7B
nop

loc_696EA0:
mov	ecx, [ebx+24h]
mov	ecx, [ecx+esi*8-4]
mov	edx, [ecx]
mov	edx, [edx+0E4h]
lea	eax, [esp+20h+var_10]
push	eax
call	edx
dec	esi
test	esi, esi
jg	short loc_696EA0
jmp	short loc_696E7B

loc_696EBD:
movzx	edx, byte_1856036
mov	eax, [ebp+4]
push	edx
push	eax
push	0
push	ebp
call	sub_691C40

loc_696ED1:
mov	ecx, [esp+30h+arg_0]
add	esp, 10h
mov	byte ptr [edi],	1
cmp	byte ptr [ecx+20h], 0
pop	ebp
jz	short loc_696EE5
mov	byte ptr [edi],	3

loc_696EE5:
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_696E00 endp

align 10h



sub_696EF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, [esp+4+arg_0]
cmp	byte ptr [esi+21h], 0
jnz	loc_696FFD
mov	eax, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_C]
test	edi, edi
jnz	short loc_696F22
movzx	edx, byte ptr [eax+8]
movzx	edx, byte ptr [edx+ecx+27F4h]
imul	edx, 34h
lea	edi, [edx+ecx+24B0h]

loc_696F22:
mov	[esi], edi
mov	dx, [edi+1Ch]
mov	[esi+1Ch], dx
fld	dword ptr [edi+24h]
mov	dl, [esp+8+arg_8]
fstp	[esp+8+arg_0]
fld	dword ptr [edi+28h]
push	ebp
fstp	[esp+0Ch+arg_C]
push	esi
fld	dword ptr [edi+2Ch]
fstp	[esp+10h+arg_4]
fld	dword ptr [edi+20h]
fstp	dword ptr [esi+0Ch]
fld	[esp+10h+arg_0]
fstp	dword ptr [esi+10h]
fld	[esp+10h+arg_C]
fstp	dword ptr [esi+14h]
fld	[esp+10h+arg_4]
fstp	dword ptr [esi+18h]
mov	[esi+20h], dl
mov	byte ptr [esi+1Fh], 0
mov	al, [eax+8]
mov	[esi+1Eh], al
call	sub_696E00
mov	dword ptr [esi+8], 0FFFFFFFFh
mov	eax, [edi+14h]
xor	ebp, ebp
test	eax, eax
jz	short loc_696F93
cmp	[eax+4], ebp
jz	short loc_696FDD
mov	ebp, [eax+4]
test	ebp, ebp
jz	short loc_696F9A
inc	dword ptr [ebp+4]

loc_696F93:
test	ebp, ebp
jz	short loc_696F9A
inc	dword ptr [ebp+4]

loc_696F9A:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_696FA6
call	sub_64A400

loc_696FA6:
mov	[esi+4], ebp
test	ebp, ebp
jz	short loc_696FB4
mov	ecx, ebp
call	sub_64A400

loc_696FB4:
mov	edx, [esi+4]
pop	ebp
test	edx, edx
jz	short loc_696FF8
mov	ecx, [edi+8]
xor	eax, eax
test	ecx, ecx
jbe	short loc_696FF8
mov	edi, [edi+4]

loc_696FC8:
cmp	[edi], edx
jz	short loc_696FF5
inc	eax
add	edi, 4
cmp	eax, ecx
jb	short loc_696FC8
pop	edi
mov	byte ptr [esi+21h], 1
pop	esi
retn	10h

loc_696FDD:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_696FF0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_696FF0:
mov	[edi+14h], ebp
jmp	short loc_696F93

loc_696FF5:
mov	[esi+8], eax

loc_696FF8:
mov	byte ptr [esi+21h], 1
pop	edi

loc_696FFD:
pop	esi
retn	10h
sub_696EF0 endp

align 10h



sub_697010 proc	near

var_1AC= dword ptr -1ACh
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_60=	byte ptr -60h
var_48=	byte ptr -48h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 198h
cmp	[esp+198h+arg_0], 5
mov	[esp+198h+var_15C], ecx
jnz	loc_698354
push	ebp
mov	ebp, [esp+19Ch+arg_8]
push	esi
mov	esi, [esp+1A0h+arg_4]
movzx	eax, word ptr [esi+4]
cmp	ax, 9
jz	short loc_697081
movzx	edx, byte ptr [esi+8]
movzx	edx, byte ptr [edx+ecx+27F4h]
imul	edx, 34h
cmp	byte ptr [edx+ecx+24E0h], 0
jnz	short loc_697065
cmp	byte ptr [ebp+1Fh], 0
jz	loc_698352

loc_697065:
cmp	ax, 25h
jz	short loc_697081
cmp	ax, 27h
jz	short loc_697081
cmp	ax, 26h
jz	short loc_697081
cmp	ax, 28h
jnz	loc_698352

loc_697081:
push	ebx
push	edi
push	0
push	0
push	esi
push	ebp
call	sub_696EF0
cmp	word ptr [esi+4], 9
mov	ebx, [ebp+0]
mov	eax, [ebx+8]
mov	[esp+1A8h+var_13C], ebx
mov	[esp+1A8h+var_158], eax
jnz	loc_69714C
mov	esi, [ebp+8]
xor	edi, edi
mov	dword ptr [ebp+8], 0FFFFFFFFh
test	eax, eax
jle	loc_697139
jmp	short loc_6970C0
align 10h

loc_6970C0:
mov	ecx, [esp+1A8h+arg_4]
test	byte ptr [ecx+7], 1
jz	short loc_6970D7
sub	esi, 1
jns	short loc_6970DE
lea	esi, [eax-1]
jmp	short loc_6970DE

loc_6970D7:
inc	esi
cmp	esi, eax
jl	short loc_6970DE
xor	esi, esi

loc_6970DE:
mov	edx, [ebx+4]
mov	ecx, [edx+esi*4]
test	ecx, ecx
jz	short loc_69711E
cmp	byte ptr [ebp+20h], 0
jnz	short loc_6970FC
mov	eax, [ecx]
mov	edx, [eax+0D4h]
call	edx
test	al, al
jz	short loc_69711A

loc_6970FC:
mov	eax, [ebx+4]
mov	ecx, [eax+esi*4]
movzx	eax, byte ptr [ebp+1Eh]
mov	edx, [ecx]
mov	edx, [edx+0C4h]
push	eax
mov	eax, [esp+1ACh+var_15C]
push	eax
call	edx
test	al, al
jnz	short loc_697136

loc_69711A:
mov	eax, [esp+1A8h+var_158]

loc_69711E:
inc	edi
cmp	edi, eax
jl	short loc_6970C0
mov	eax, [esp+1A8h+var_15C]
or	dword ptr [eax+2474h], 400h
jmp	loc_698301

loc_697136:
mov	[ebp+8], esi

loc_697139:
mov	eax, [esp+1A8h+var_15C]
or	dword ptr [eax+2474h], 400h
jmp	loc_698301

loc_69714C:
mov	ecx, [ebp+4]
test	ecx, ecx
jz	loc_698301
mov	eax, [ecx]
mov	edx, [eax+0D8h]
call	edx
test	al, al
jnz	short loc_697185
mov	eax, [esp+1A8h+var_15C]
movzx	eax, byte ptr [eax+2477h]
and	eax, 3
cmp	eax, 3
jz	loc_698301
cmp	eax, 1
jnz	loc_698301

loc_697185:
mov	esi, [ebp+4]
lea	ecx, [esp+1A8h+var_78]
call	sub_64E8E0
lea	ecx, [esp+1A8h+var_78]
push	ecx
mov	ecx, esi
call	sub_654B40
mov	ecx, [ebp+4]
mov	edx, [ecx]
mov	edx, [edx+0F4h]
lea	eax, [esp+1A8h+var_30]
push	eax
call	edx
fldz
push	eax
fst	[esp+1ACh+var_18C]
fst	[esp+1ACh+var_188]
lea	eax, [esp+1ACh+var_18C]
fst	[esp+1ACh+var_184]
push	eax
lea	ecx, [esp+1B0h+var_78]
fstp	[esp+1B0h+var_180]
call	sub_64EF10
mov	ecx, [esp+1A8h+arg_4]
movzx	eax, word ptr [ecx+4]
cmp	[ebp+1Ch], ax
jnz	short loc_697225
cmp	ax, 26h
jz	short loc_697215
cmp	ax, 28h
jz	short loc_697215
cmp	ax, 27h
jz	short loc_697205
cmp	ax, 25h
jnz	short loc_697249

loc_697205:
fld	dword ptr [ebp+10h]
fstp	[esp+1A8h+var_188]
fld	dword ptr [ebp+18h]
fstp	[esp+1A8h+var_180]
jmp	short loc_697249

loc_697215:
fld	dword ptr [ebp+0Ch]
fstp	[esp+1A8h+var_18C]
fld	dword ptr [ebp+14h]
fstp	[esp+1A8h+var_184]
jmp	short loc_697249

loc_697225:
fld	[esp+1A8h+var_18C]
fstp	dword ptr [ebp+0Ch]
fld	[esp+1A8h+var_188]
fstp	dword ptr [ebp+10h]
fld	[esp+1A8h+var_184]
fstp	dword ptr [ebp+14h]
fld	[esp+1A8h+var_180]
fstp	dword ptr [ebp+18h]
mov	dx, [ecx+4]
mov	[ebp+1Ch], dx

loc_697249:
movzx	eax, word ptr [ecx+4]
cmp	ax, 27h
jz	loc_697AB4
cmp	ax, 25h
jz	loc_697AB4
cmp	ax, 26h
jz	short loc_697271
cmp	ax, 28h
jnz	loc_698301

loc_697271:
fldz
mov	eax, [esp+1A8h+var_15C]
or	dword ptr [eax+2474h], 400h
fst	[esp+1A8h+var_170]
cmp	word ptr [ecx+4], 28h
fstp	[esp+1A8h+var_16C]
fld	ds:flt_14376A4
mov	edi, [ebp+8]
fst	[esp+1A8h+var_178]
jz	short loc_6972A5
fstp	st
fld	ds:flt_15FDA3C

loc_6972A5:
mov	ecx, [esp+1A8h+var_158]
fstp	[esp+1A8h+var_174]
dec	ecx
xor	bl, bl
mov	[esp+1A8h+var_168], 0
mov	[esp+1A8h+var_194], ecx
test	ecx, ecx
jle	loc_698301
jmp	short loc_6972D0
align 10h

loc_6972D0:
mov	eax, [esp+1A8h+arg_4]
cmp	word ptr [eax+4], 28h
jnz	short loc_6972E1
inc	edi
jmp	short loc_6972E2

loc_6972E1:
dec	edi

loc_6972E2:
cmp	edi, [esp+1A8h+var_158]
jl	short loc_6972EC
xor	edi, edi
jmp	short loc_6972F2

loc_6972EC:
test	edi, edi
jge	short loc_6972F2
mov	edi, ecx

loc_6972F2:
mov	ecx, [esp+1A8h+var_13C]
mov	edx, [ecx+4]
mov	eax, [edx+edi*4]
lea	ecx, [edx+edi*4]
test	eax, eax
jz	short loc_697306
inc	dword ptr [eax+4]

loc_697306:
cmp	byte ptr [ebp+20h], 0
mov	esi, [ecx]
jnz	short loc_697322
mov	eax, [esi]
mov	edx, [eax+0D4h]
mov	ecx, esi
call	edx
test	al, al
jz	loc_697A93

loc_697322:
movzx	ecx, byte ptr [ebp+1Eh]
mov	eax, [esi]
mov	edx, [esp+1A8h+var_15C]
mov	eax, [eax+0C4h]
push	ecx
push	edx
mov	ecx, esi
call	eax
test	al, al
jz	loc_697A93
lea	ecx, [esp+1A8h+var_48]
push	ecx
mov	ecx, esi
call	sub_67E860
mov	edx, [esi]
mov	edx, [edx+0F4h]
lea	eax, [esp+1A8h+var_10]
push	eax
mov	ecx, esi
call	edx
fldz
push	eax
fst	[esp+1ACh+var_108]
fst	[esp+1ACh+var_104]
lea	eax, [esp+1ACh+var_108]
fst	[esp+1ACh+var_100]
push	eax
lea	ecx, [esp+1B0h+var_48]
fstp	[esp+1B0h+var_FC]
call	sub_64EF10
fld	[esp+1A8h+var_188]
mov	ecx, [esp+1A8h+arg_4]
fld	[esp+1A8h+var_180]
movzx	ecx, word ptr [ecx+4]
cmp	cx, 28h
jnz	short loc_6973C3
fld	ds:dbl_15FCC40
fadd	st, st(1)
fstp	[esp+1A8h+var_148]
fld	ds:flt_1437488
jmp	short loc_6973E3

loc_6973C3:
fld	st(1)
fsub	ds:dbl_15FCC40
fstp	[esp+1A8h+var_7C]
fld	ds:flt_15FD4F4
fstp	[esp+1A8h+var_148]
fld	[esp+1A8h+var_7C]

loc_6973E3:
fstp	[esp+1A8h+var_140]
fld	[esp+1A8h+var_FC]
fld	[esp+1A8h+var_148]
fcom	st(1)
fnstsw	ax
fld	[esp+1A8h+var_18C]
fld	[esp+1A8h+var_100]
fld	[esp+1A8h+var_104]
fld	[esp+1A8h+var_108]
test	ah, 41h
jp	loc_6975B1
fstp	st(7)
fstp	st(5)
fld	[esp+1A8h+var_140]
fcomp	st(5)
fnstsw	ax
test	ah, 1
jnz	loc_69757C
fld	[esp+1A8h+var_184]
fcomp	st(6)
fnstsw	ax
test	ah, 1
jnz	loc_69757C
fcom	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_69757C
fxch	st(5)
fst	[esp+1A8h+var_138]
fxch	st(4)
fst	[esp+1A8h+var_134]
fxch	st(5)
fst	[esp+1A8h+var_130]
fxch	st(3)
fst	[esp+1A8h+var_12C]
fcom	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_69751E
fld	[esp+1A8h+var_140]
fcomp	st(6)
fnstsw	ax
test	ah, 1
jnz	loc_69751E
fld	[esp+1A8h+var_184]
fcomp	st(5)
fnstsw	ax
test	ah, 1
jnz	loc_69751E
fxch	st(3)
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	loc_697522
fstp	st(2)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_6974A9:
fldz
fst	[esp+1A8h+var_138]
fstp	[esp+1A8h+var_134]
fldz
fadd	st, st
fstp	[esp+1A8h+var_17C]
fld	[esp+1A8h+var_17C]
fst	[esp+1A8h+var_130]
fstp	[esp+1A8h+var_12C]
fxch	st(3)
fxch	st(4)
fxch	st(2)
fxch	st(3)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_6974D5:
fld	[esp+1A8h+var_130]
fsub	[esp+1A8h+var_138]
fstp	[esp+1A8h+var_198]
fld	[esp+1A8h+var_198]
fcomp	ds:dword_15FDABC
fnstsw	ax
test	ah, 1
jnz	loc_6975B5
test	bl, bl
jnz	loc_6975BF
fstp	st
mov	[ebp+8], edi
fxch	st(3)
mov	bl, 1
fstp	[esp+1A8h+var_178]
fxch	st(2)
fstp	[esp+1A8h+var_174]
fstp	[esp+1A8h+var_170]
fstp	[esp+1A8h+var_16C]
jmp	loc_697A93

loc_69751E:
fstp	st(2)
jmp	short loc_6974A9

loc_697522:
fxch	st(4)
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_697535
fxch	st(1)
fst	[esp+1A8h+var_138]
fxch	st(1)

loc_697535:
fld	[esp+1A8h+var_184]
fcomp	st(5)
fnstsw	ax
test	ah, 5
jp	short loc_69754A
fld	[esp+1A8h+var_184]
fstp	[esp+1A8h+var_130]

loc_69754A:
fxch	st(5)
fcom	st(2)
fnstsw	ax
test	ah, 41h
jz	short loc_69755D
fxch	st(2)
fstp	[esp+1A8h+var_134]
jmp	short loc_69755F

loc_69755D:
fstp	st(2)

loc_69755F:
fld	[esp+1A8h+var_140]
fcom	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_697575
fstp	[esp+1A8h+var_12C]
jmp	loc_6974D5

loc_697575:
fstp	st
jmp	loc_6974D5

loc_69757C:
fstp	st(2)
fld	[esp+1A8h+var_180]
fld	[esp+1A8h+var_188]
fxch	st(6)
fxch	st(1)
fxch	st(5)
fxch	st(1)
fxch	st(3)
fxch	st(1)

loc_697592:
fxch	st(3)
fxch	st(6)
fxch	st(1)
fxch	st(5)
fxch	st(1)

loc_69759C:
test	bl, bl
jz	short loc_6975C7
fstp	st(4)
fstp	st(1)
fstp	st(4)
fstp	st
fstp	st(1)
fstp	st
jmp	loc_697A91

loc_6975B1:
fstp	st(4)
jmp	short loc_697592

loc_6975B5:
fld	[esp+1A8h+var_180]
fld	[esp+1A8h+var_188]
jmp	short loc_69759C

loc_6975BF:
fld	[esp+1A8h+var_180]
fld	[esp+1A8h+var_188]

loc_6975C7:
cmp	cx, 26h
jnz	loc_6977BC
fstp	st(1)
fld	[esp+1A8h+var_184]
fsub	st, st(2)
fstp	[esp+1A8h+var_198]
fld	[esp+1A8h+var_198]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
faddp	st(3), st
fxch	st(2)
fstp	[esp+1A8h+var_F0]
fxch	st(3)
fst	[esp+1A8h+var_BC]
fld	[esp+1A8h+var_16C]
fst	[esp+1A8h+var_9C]
fxch	st(1)
fcomp	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_697620
fxch	st(3)
fst	[esp+1A8h+var_BC]
fxch	st(3)

loc_697620:
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_697634
fxch	st(2)
fstp	[esp+1A8h+var_9C]
jmp	short loc_697636

loc_697634:
fstp	st(2)

loc_697636:
fxch	st(2)
fcom	st(3)
fnstsw	ax
test	ah, 1
jnz	loc_6977A8
fld	[esp+1A8h+var_BC]
fcom	st(3)
fnstsw	ax
test	ah, 1
jnz	loc_6977A6
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+1A8h+var_198]
fld	[esp+1A8h+var_198]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+1A8h+var_198]
fldz
fld	[esp+1A8h+var_198]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_697688
fadd	st, st(2)
jmp	short loc_69768A

loc_697688:
fsub	st, st(2)

loc_69768A:
call	__ftol2_sse
cmp	eax, 3
jle	loc_6977B3
fld	st(3)
push	ecx		; float
fsubp	st(3), st
fxch	st(2)
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fmul	st, st(1)
faddp	st(3), st
fxch	st(2)
fstp	[esp+1ACh+var_E8]
fld	[esp+1ACh+var_170]
fld	[esp+1ACh+var_178]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_D0]
fld	[esp+1ACh+var_E8]
fsub	[esp+1ACh+var_F0]
fstp	[esp+1ACh+var_198]
fdivr	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_164]
fld	[esp+1ACh+var_BC]
fsub	[esp+1ACh+var_188]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_160]
fld	[esp+1ACh+var_D0]
fsub	[esp+1ACh+var_F0]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_154]
fld	[esp+1ACh+var_9C]
fsub	[esp+1ACh+var_188]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_150]
fldz
add	esp, 4
fld	[esp+1A8h+var_160]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_69798A
jmp	loc_697A8F

loc_6977A6:
fstp	st

loc_6977A8:
fstp	st(3)
fstp	st
fstp	st
jmp	loc_697A91

loc_6977B3:
fstp	st(3)
fstp	st
jmp	loc_697A8F

loc_6977BC:
fstp	st
fld	[esp+1A8h+var_184]
fsub	st, st(2)
fstp	[esp+1A8h+var_198]
fld	[esp+1A8h+var_198]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
faddp	st(3), st
fxch	st(2)
fstp	[esp+1A8h+var_F8]
fxch	st(2)
fst	[esp+1A8h+var_B4]
fld	[esp+1A8h+var_174]
fst	[esp+1A8h+var_94]
fxch	st(1)
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_69780B
fxch	st(2)
fst	[esp+1A8h+var_B4]
fxch	st(2)

loc_69780B:
fcomp	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_69781F
fxch	st(1)
fstp	[esp+1A8h+var_94]
jmp	short loc_697821

loc_69781F:
fstp	st(1)

loc_697821:
fxch	st(2)
fcom	st(3)
fnstsw	ax
test	ah, 1
jnz	loc_697A83
fld	[esp+1A8h+var_B4]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jp	loc_697A81
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1A8h+var_198]
fld	[esp+1A8h+var_198]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+1A8h+var_198]
fldz
fld	[esp+1A8h+var_198]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_697873
fadd	st, st(3)
jmp	short loc_697875

loc_697873:
fsub	st, st(3)

loc_697875:
call	__ftol2_sse
cmp	eax, 3
jle	loc_697A8B
fld	st(3)
push	ecx		; float
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fmul	st, st(2)
faddp	st(3), st
fxch	st(2)
fstp	[esp+1ACh+var_D8]
fld	[esp+1ACh+var_170]
fld	[esp+1ACh+var_178]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+1ACh+var_E0]
fld	[esp+1ACh+var_D8]
fsub	[esp+1ACh+var_F8]
fstp	[esp+1ACh+var_198]
fdivr	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_164]
fld	[esp+1ACh+var_B4]
fsub	[esp+1ACh+var_180]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_160]
fld	[esp+1ACh+var_E0]
fsub	[esp+1ACh+var_F8]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_154]
fld	[esp+1ACh+var_94]
fsub	[esp+1ACh+var_180]
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_198]
fld	[esp+1ACh+var_198]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_150]
fldz
add	esp, 4
fld	[esp+1A8h+var_160]
fcom	st(1)
fnstsw	ax
test	ah, 5
jnp	loc_697A8F

loc_69798A:
test	bl, bl
jz	loc_697A1D
fcom	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6979A1
fst	[esp+1A8h+var_17C]
jmp	short loc_6979A9

loc_6979A1:
fld	st
fchs
fstp	[esp+1A8h+var_17C]

loc_6979A9:
fld	[esp+1A8h+var_150]
fcom	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_6979BC
fst	[esp+1A8h+var_190]
jmp	short loc_6979C4

loc_6979BC:
fld	st
fchs
fstp	[esp+1A8h+var_190]

loc_6979C4:
fld	[esp+1A8h+var_17C]
fld	[esp+1A8h+var_190]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_697A4A
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_697A91
fld	[esp+1A8h+var_164]
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	short loc_6979F1
fchs

loc_6979F1:
fstp	[esp+1A8h+var_190]
fld	[esp+1A8h+var_154]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_697A06
fchs

loc_697A06:
fstp	[esp+1A8h+var_17C]
fld	[esp+1A8h+var_190]
fld	[esp+1A8h+var_17C]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_697A50
jmp	short loc_697A93

loc_697A1D:
fstp	st(1)
fld	[esp+1A8h+var_164]
fld	[esp+1A8h+var_150]
fld	[esp+1A8h+var_154]
fld	st(2)
fmulp	st(3), st
fld	st(3)
fmulp	st(4), st
fxch	st(2)
faddp	st(3), st
fld	st(1)
fmulp	st(2), st
fmul	st, st
faddp	st(1), st
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_697A93
jmp	short loc_697A50

loc_697A4A:
fstp	st(2)
fstp	st
fstp	st

loc_697A50:
fld	[esp+1A8h+var_108]
mov	[ebp+8], edi
fstp	[esp+1A8h+var_178]
fld	[esp+1A8h+var_104]
fstp	[esp+1A8h+var_174]
fld	[esp+1A8h+var_100]
fstp	[esp+1A8h+var_170]
fld	[esp+1A8h+var_FC]
fstp	[esp+1A8h+var_16C]
jmp	short loc_697A93

loc_697A81:
fstp	st(2)

loc_697A83:
fstp	st(1)
fstp	st(2)
fstp	st
jmp	short loc_697A91

loc_697A8B:
fstp	st(3)
fstp	st(1)

loc_697A8F:
fstp	st(1)

loc_697A91:
fstp	st

loc_697A93:
mov	ecx, esi
call	sub_64A400
mov	eax, [esp+1A8h+var_168]
mov	ecx, [esp+1A8h+var_194]
inc	eax
cmp	eax, ecx
mov	[esp+1A8h+var_168], eax
jl	loc_6972D0
jmp	loc_698301

loc_697AB4:
mov	eax, [esp+1A8h+var_15C]
fld	ds:flt_14376A4
or	dword ptr [eax+2474h], 400h
cmp	word ptr [ecx+4], 27h
mov	edi, [ebp+8]
jnz	short loc_697AD8
fst	[esp+1A8h+var_170]
jmp	short loc_697AE2

loc_697AD8:
fld	ds:flt_15FDA3C
fstp	[esp+1A8h+var_170]

loc_697AE2:
fld	[esp+1A8h+var_170]
mov	edx, [esp+1A8h+var_158]
fstp	[esp+1A8h+var_178]
lea	eax, [edx-1]
xor	bl, bl
fst	[esp+1A8h+var_16C]
mov	[esp+1A8h+var_198], 0
fstp	[esp+1A8h+var_174]
test	eax, eax
jle	loc_698301
jmp	short loc_697B10
align 10h

loc_697B10:
mov	ecx, [esp+1A8h+arg_4]
cmp	word ptr [ecx+4], 27h
jnz	short loc_697B21
inc	edi
jmp	short loc_697B22

loc_697B21:
dec	edi

loc_697B22:
cmp	edi, edx
jl	short loc_697B2A
xor	edi, edi
jmp	short loc_697B30

loc_697B2A:
test	edi, edi
jge	short loc_697B30
mov	edi, eax

loc_697B30:
mov	edx, [esp+1A8h+var_13C]
mov	eax, [edx+4]
lea	ecx, [eax+edi*4]
mov	eax, [ecx]
test	eax, eax
jz	short loc_697B43
inc	dword ptr [eax+4]

loc_697B43:
cmp	byte ptr [ebp+20h], 0
mov	esi, [ecx]
jnz	short loc_697B5F
mov	edx, [esi]
mov	eax, [edx+0D4h]
mov	ecx, esi
call	eax
test	al, al
jz	loc_6982E2

loc_697B5F:
movzx	eax, byte ptr [ebp+1Eh]
mov	ecx, [esp+1A8h+var_15C]
mov	edx, [esi]
mov	edx, [edx+0C4h]
push	eax
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_6982E2
lea	ecx, [esp+1A8h+var_60]
call	sub_64E8E0
lea	eax, [esp+1A8h+var_60]
push	eax
mov	ecx, esi
call	sub_654B40
mov	edx, [esi]
mov	edx, [edx+0F4h]
lea	eax, [esp+1A8h+var_20]
push	eax
mov	ecx, esi
call	edx
fldz
push	eax
fst	[esp+1ACh+var_118]
fst	[esp+1ACh+var_114]
lea	eax, [esp+1ACh+var_118]
fst	[esp+1ACh+var_110]
push	eax
lea	ecx, [esp+1B0h+var_60]
fstp	[esp+1B0h+var_10C]
call	sub_64EF10
fld	[esp+1A8h+var_18C]
mov	ecx, [esp+1A8h+arg_4]
movzx	ecx, word ptr [ecx+4]
cmp	cx, 27h
jnz	short loc_697C0A
fld	[esp+1A8h+var_184]
fadd	ds:dbl_15FCC40
fstp	[esp+1A8h+var_14C]
fld	ds:flt_1437488
jmp	short loc_697C2A

loc_697C0A:
fld	ds:dbl_15FCC40
fsubr	st, st(1)
fstp	[esp+1A8h+var_80]
fld	ds:flt_15FD4F4
fstp	[esp+1A8h+var_14C]
fld	[esp+1A8h+var_80]

loc_697C2A:
fstp	[esp+1A8h+var_144]
fld	[esp+1A8h+var_10C]
fld	[esp+1A8h+var_188]
fcom	st(1)
fnstsw	ax
fld	[esp+1A8h+var_110]
fld	[esp+1A8h+var_180]
fld	[esp+1A8h+var_114]
fld	[esp+1A8h+var_118]
test	ah, 41h
jp	loc_697DD4
fstp	st(6)
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_697DCE
fld	[esp+1A8h+var_144]
fcomp	st(6)
fnstsw	ax
test	ah, 1
jnz	loc_697DCE
fld	[esp+1A8h+var_14C]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jp	loc_697DCE
fxch	st(5)
fst	[esp+1A8h+var_128]
fxch	st(5)
fst	[esp+1A8h+var_124]
fxch	st(2)
fst	[esp+1A8h+var_120]
fxch	st(4)
fst	[esp+1A8h+var_11C]
fcom	st(3)
fnstsw	ax
test	ah, 1
jnz	short loc_697CE8
fxch	st(1)
fcom	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_697CE6
fld	[esp+1A8h+var_144]
fcomp	st(6)
fnstsw	ax
test	ah, 1
jnz	short loc_697CE6
fld	[esp+1A8h+var_14C]
fcomp	st(5)
fnstsw	ax
test	ah, 41h
jnp	loc_697D69

loc_697CE6:
fxch	st(1)

loc_697CE8:
fldz
fst	[esp+1A8h+var_128]
fstp	[esp+1A8h+var_124]
fldz
fadd	st, st
fstp	[esp+1A8h+var_17C]
fld	[esp+1A8h+var_17C]
fst	[esp+1A8h+var_120]
fstp	[esp+1A8h+var_11C]
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_697D18:
fld	[esp+1A8h+var_11C]
fsub	[esp+1A8h+var_124]
fstp	[esp+1A8h+var_194]
fld	[esp+1A8h+var_194]
fcomp	ds:dword_15FDABC
fnstsw	ax
test	ah, 1
jnz	loc_697DF7
test	bl, bl
jnz	loc_697DFD
fstp	st(3)
mov	[ebp+8], edi
fstp	st(1)
mov	bl, 1
fxch	st(3)
fstp	[esp+1A8h+var_178]
fxch	st(2)
fstp	[esp+1A8h+var_174]
fstp	[esp+1A8h+var_170]
fstp	[esp+1A8h+var_16C]
jmp	loc_6982E2

loc_697D69:
fld	[esp+1A8h+var_14C]
fcomp	st(6)
fnstsw	ax
test	ah, 5
jnp	short loc_697D81
fld	[esp+1A8h+var_14C]
fstp	[esp+1A8h+var_128]

loc_697D81:
fld	[esp+1A8h+var_144]
fcomp	st(5)
fnstsw	ax
test	ah, 5
jp	short loc_697D99
fld	[esp+1A8h+var_144]
fstp	[esp+1A8h+var_120]

loc_697D99:
fxch	st(2)
fcom	st(3)
fnstsw	ax
test	ah, 41h
jz	short loc_697DAF
fxch	st(3)
fst	[esp+1A8h+var_124]
fxch	st(3)

loc_697DAF:
fxch	st(1)
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	loc_697D18
fxch	st(2)
fst	[esp+1A8h+var_11C]
fxch	st(2)
jmp	loc_697D18

loc_697DCE:
fld	[esp+1A8h+var_18C]
fxch	st(6)

loc_697DD4:
fxch	st(6)
fxch	st(3)
fxch	st(5)
fxch	st(2)
fxch	st(3)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_697DE4:
test	bl, bl
jz	short loc_697E01
fstp	st(4)
fstp	st(4)
fstp	st
fstp	st(2)
fstp	st(2)
jmp	loc_6982DE

loc_697DF7:
fld	[esp+1A8h+var_18C]
jmp	short loc_697DE4

loc_697DFD:
fld	[esp+1A8h+var_18C]

loc_697E01:
cmp	cx, 27h
jnz	loc_698000
fstp	st
fld	st(3)
fsubp	st(3), st
fxch	st(2)
fstp	[esp+1A8h+var_194]
fld	[esp+1A8h+var_194]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
faddp	st(4), st
fxch	st(3)
fstp	[esp+1A8h+var_F4]
fxch	st(4)
fst	[esp+1A8h+var_98]
fld	[esp+1A8h+var_178]
fst	[esp+1A8h+var_A8]
fld	[esp+1A8h+var_184]
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnz	short loc_697E5E
fxch	st(1)
fst	[esp+1A8h+var_98]
fxch	st(1)

loc_697E5E:
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_697E6E
fst	[esp+1A8h+var_A8]

loc_697E6E:
fld	[esp+1A8h+var_98]
fcom	st(4)
fnstsw	ax
test	ah, 41h
jp	loc_697FDB
fxch	st(2)
fcom	st(5)
fnstsw	ax
test	ah, 1
jnz	loc_697FE6
fld	st(2)
fsubp	st(5), st
fxch	st(4)
fstp	[esp+1A8h+var_194]
fld	[esp+1A8h+var_194]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+1A8h+var_194]
fldz
fld	[esp+1A8h+var_194]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_697EC2
fadd	st, st(4)
jmp	short loc_697EC4

loc_697EC2:
fsub	st, st(4)

loc_697EC4:
call	__ftol2_sse
cmp	eax, 3
jle	loc_697FF3
fld	st(5)
push	ecx		; float
fsubp	st(5), st
fxch	st(4)
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fmul	st, st(3)
faddp	st(5), st
fxch	st(4)
fstp	[esp+1ACh+var_DC]
fld	[esp+1ACh+var_16C]
fld	[esp+1ACh+var_174]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_D4]
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_194]
fdivr	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_154]
fld	[esp+1ACh+var_DC]
fsub	[esp+1ACh+var_F4]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_150]
fld	[esp+1ACh+var_A8]
fsub	[esp+1ACh+var_184]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_164]
fld	[esp+1ACh+var_D4]
fsub	[esp+1ACh+var_F4]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_160]
fldz
add	esp, 4
fld	[esp+1A8h+var_154]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	loc_6981C6
fstp	st(1)
jmp	loc_6982E0

loc_697FDB:
fstp	st(4)
fstp	st(4)
fstp	st(1)
jmp	loc_6982DC

loc_697FE6:
fstp	st(4)
fstp	st(4)
fstp	st(1)
fstp	st(1)
jmp	loc_6982DE

loc_697FF3:
fstp	st(5)
fstp	st(2)
fstp	st(2)
fstp	st(2)
jmp	loc_6982DE

loc_698000:
fld	st(4)
fsubp	st(4), st
fxch	st(3)
fstp	[esp+1A8h+var_194]
fld	[esp+1A8h+var_194]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
faddp	st(5), st
fxch	st(4)
fstp	[esp+1A8h+var_EC]
fxch	st(4)
fst	[esp+1A8h+var_B0]
fld	[esp+1A8h+var_170]
fst	[esp+1A8h+var_C0]
fxch	st(1)
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_69804D
fxch	st(2)
fst	[esp+1A8h+var_B0]
fxch	st(2)

loc_69804D:
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_698061
fxch	st(1)
fst	[esp+1A8h+var_C0]
fxch	st(1)

loc_698061:
fld	[esp+1A8h+var_B0]
fcom	st(5)
fnstsw	ax
test	ah, 1
jnz	loc_6982C0
fxch	st(4)
fcom	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_6982CC
fld	st(4)
fsubrp	st(6), st
fxch	st(5)
fstp	[esp+1A8h+var_194]
fld	[esp+1A8h+var_194]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+1A8h+var_194]
fldz
fld	[esp+1A8h+var_194]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_6980B5
fadd	st, st(4)
jmp	short loc_6980B7

loc_6980B5:
fsub	st, st(4)

loc_6980B7:
call	__ftol2_sse
cmp	eax, 3
jle	loc_6982D6
fld	st(1)
push	ecx		; float
fsubp	st(6), st
fxch	st(5)
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fmul	st, st(3)
faddp	st(1), st
fstp	[esp+1ACh+var_CC]
fld	[esp+1ACh+var_16C]
fld	[esp+1ACh+var_174]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1ACh+var_E4]
fsubp	st(1), st
fstp	[esp+1ACh+var_194]
fdivr	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_154]
fld	[esp+1ACh+var_CC]
fsub	[esp+1ACh+var_EC]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_150]
fld	[esp+1ACh+var_C0]
fsub	[esp+1ACh+var_18C]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_164]
fld	[esp+1ACh+var_E4]
fsub	[esp+1ACh+var_EC]
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fdiv	ds:dbl_15FCE20
fstp	[esp+1ACh+var_194]
fld	[esp+1ACh+var_194]
fstp	[esp+1ACh+var_1AC]
call	sub_414380
fstp	[esp+1ACh+var_160]
fldz
add	esp, 4
fld	[esp+1A8h+var_154]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6981C6
fstp	st(1)
jmp	loc_6982E0

loc_6981C6:
test	bl, bl
jz	loc_69825C
fcom	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6981DD
fst	[esp+1A8h+var_168]
jmp	short loc_6981E5

loc_6981DD:
fld	st
fchs
fstp	[esp+1A8h+var_168]

loc_6981E5:
fld	[esp+1A8h+var_164]
fcom	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_6981F8
fst	[esp+1A8h+var_190]
jmp	short loc_698200

loc_6981F8:
fld	st
fchs
fstp	[esp+1A8h+var_190]

loc_698200:
fld	[esp+1A8h+var_168]
fld	[esp+1A8h+var_190]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_698289
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_6982E0
fld	[esp+1A8h+var_150]
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	short loc_69822D
fchs

loc_69822D:
fstp	[esp+1A8h+var_168]
fld	[esp+1A8h+var_160]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_698242
fchs

loc_698242:
fstp	[esp+1A8h+var_190]
fld	[esp+1A8h+var_168]
fld	[esp+1A8h+var_190]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_69828F
jmp	loc_6982E2

loc_69825C:
fstp	st(1)
fld	[esp+1A8h+var_150]
fld	[esp+1A8h+var_160]
fld	[esp+1A8h+var_164]
fld	st(2)
fmulp	st(3), st
fld	st(3)
fmulp	st(4), st
fxch	st(2)
faddp	st(3), st
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_6982E2
jmp	short loc_69828F

loc_698289:
fstp	st(2)
fstp	st
fstp	st

loc_69828F:
fld	[esp+1A8h+var_118]
mov	[ebp+8], edi
fstp	[esp+1A8h+var_178]
fld	[esp+1A8h+var_114]
fstp	[esp+1A8h+var_174]
fld	[esp+1A8h+var_110]
fstp	[esp+1A8h+var_170]
fld	[esp+1A8h+var_10C]
fstp	[esp+1A8h+var_16C]
jmp	short loc_6982E2

loc_6982C0:
fstp	st(1)
fstp	st(2)
fstp	st(2)
fstp	st(2)
fstp	st(1)
jmp	short loc_6982E0

loc_6982CC:
fstp	st(1)
fstp	st(2)
fstp	st(1)
fstp	st(2)
jmp	short loc_6982DE

loc_6982D6:
fstp	st(1)
fstp	st(2)
fstp	st(3)

loc_6982DC:
fstp	st

loc_6982DE:
fstp	st

loc_6982E0:
fstp	st

loc_6982E2:
mov	ecx, esi
call	sub_64A400
mov	ecx, [esp+1A8h+var_198]
mov	edx, [esp+1A8h+var_158]
inc	ecx
lea	eax, [edx-1]
cmp	ecx, eax
mov	[esp+1A8h+var_198], ecx
jl	loc_697B10

loc_698301:
mov	eax, [ebp+8]
pop	edi
pop	ebx
test	eax, eax
jl	short loc_69833F
cmp	eax, [esp+1A0h+var_158]
jge	short loc_69833F
mov	edx, [esp+1A0h+var_13C]
mov	ecx, [edx+4]
lea	esi, [ecx+eax*4]
mov	eax, [esi]
test	eax, eax
jz	short loc_698323
inc	dword ptr [eax+4]

loc_698323:
mov	ecx, [ebp+4]
test	ecx, ecx
jz	short loc_69832F
call	sub_64A400

loc_69832F:
mov	edx, [esi]
pop	esi
mov	[ebp+4], edx
pop	ebp
add	esp, 198h
retn	0Ch

loc_69833F:
mov	ecx, [ebp+4]
test	ecx, ecx
jz	short loc_69834B
call	sub_64A400

loc_69834B:
mov	dword ptr [ebp+4], 0

loc_698352:
pop	esi
pop	ebp

loc_698354:
add	esp, 198h
retn	0Ch
sub_697010 endp

align 10h



sub_698360 proc	near

var_30=	byte ptr -30h
var_2C=	word ptr -2Ch
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= byte ptr	 4

sub	esp, 30h
fldz
mov	dl, [esp+30h+arg_0]
push	ebx
fst	[esp+34h+var_18]
push	esi
fst	[esp+38h+var_14]
mov	esi, ecx
fst	[esp+38h+var_10]
xor	eax, eax
fstp	[esp+38h+var_C]
mov	[esp+38h+var_8], ax
mov	ecx, 9
xor	ebx, ebx
mov	[esp+38h+var_2C], cx
lea	eax, [esp+38h+var_24]
push	eax
lea	ecx, [esp+3Ch+var_30]
push	ecx
push	5
mov	ecx, esi
mov	[esp+44h+var_24], ebx
mov	[esp+44h+var_20], ebx
mov	[esp+44h+var_1C], 0FFFFFFFFh
mov	[esp+44h+var_6], bl
mov	[esp+44h+var_5], bl
mov	[esp+44h+var_4], bl
mov	[esp+44h+var_3], bl
mov	[esp+44h+var_29], bl
mov	[esp+44h+var_28], dl
call	sub_697010
lea	edx, [esp+38h+var_24]
push	edx
mov	ecx, esi
call	sub_694820
mov	ecx, [esp+38h+var_20]
pop	esi
cmp	ecx, ebx
pop	ebx
jz	short loc_6983E6
call	sub_64A400

loc_6983E6:
add	esp, 30h
retn	4
sub_698360 endp

align 10h



sub_6983F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 30h
push	ebx
mov	ebx, [esp+34h+arg_0]
mov	eax, [ebx+78h]
mov	edx, [eax+8]
push	esi
lea	esi, [ebx+78h]
push	edi
mov	edi, ecx
mov	ecx, esi
mov	[esp+3Ch+var_2C], edi
call	edx
cmp	eax, 2
jnz	short loc_698426
mov	ecx, esi
call	sub_661C50
cmp	dword ptr [eax+1BCh], 0
jge	loc_698657

loc_698426:
xor	esi, esi
push	ebp
mov	[esp+40h+var_30], esi
cmp	[edi+247Ch], esi
jbe	loc_69862B
mov	eax, [edi]
mov	edx, [eax+0F4h]
mov	ecx, edi
mov	[esp+40h+var_10], esi
mov	[esp+40h+var_C], esi
mov	[esp+40h+var_8], esi
call	edx
mov	[esp+3Ch], eax
mov	eax, [edi]
mov	edx, [eax+0F4h]
xor	ebx, ebx
xor	ebp, ebp
mov	ecx, edi
mov	[esp+3Ch+var_1C], ebp
mov	[esp+3Ch+var_18], ebx
mov	[esp+3Ch+var_14], ebx
call	edx
mov	edi, [esp+3Ch+arg_4]
mov	[esp+3Ch+var_10], eax
mov	[esp+3Ch+var_24], ebx
test	edi, edi
jz	short loc_6984DB

loc_698481:
mov	esi, [esp+3Ch+var_8]
inc	esi
cmp	esi, [esp+3Ch+var_8]
jnb	short loc_69849E
mov	eax, [esp+3Ch+var_4]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6984BA
mov	ecx, [esp+3Ch]
push	esi
push	ecx
jmp	short loc_6984B1

loc_69849E:
cmp	esi, [esp+3Ch+var_4]
jb	short loc_6984BA
mov	eax, [esp+3Ch]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax

loc_6984B1:
lea	ecx, [esp+44h+var_C]
call	sub_6808E0

loc_6984BA:
mov	ecx, [esp+3Ch+var_C]
lea	eax, [ecx+esi*4-4]
mov	[esp+3Ch+var_8], esi
test	eax, eax
jz	short loc_6984CC
mov	[eax], edi

loc_6984CC:
mov	[esp+3Ch+var_24], edi
mov	edi, [edi+20h]
test	edi, edi
jnz	short loc_698481
mov	esi, [esp+3Ch+var_C]

loc_6984DB:
mov	edi, [esp+3Ch+var_28]
mov	eax, [edi+247Ch]
mov	[esp+3Ch+var_20], eax
test	eax, eax
jbe	loc_698607

loc_6984F1:
mov	edx, [edi+2478h]
mov	eax, [esp+3Ch+var_2C]
mov	ecx, [esp+3Ch+arg_4]
cmp	[edx+eax*4], ecx
jz	loc_698686
test	ebx, ebx
jbe	short loc_698538
test	[esp+3Ch+var_14], 0FFFFFFFEh
jbe	short loc_698553
test	ebp, ebp
jz	short loc_69852E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
xor	ebp, ebp
mov	[esp+3Ch+var_1C], ebp

loc_69852E:
mov	[esp+3Ch+var_14], 0
jmp	short loc_698553

loc_698538:
cmp	[esp+3Ch+var_14], 0
ja	short loc_698553
mov	ecx, [esp+3Ch+var_10]
push	0
push	ecx
lea	ecx, [esp+44h+var_1C]
call	sub_6808E0
mov	ebp, [esp+3Ch+var_1C]

loc_698553:
mov	edx, [edi+2478h]
mov	ecx, [esp+3Ch+var_2C]
mov	edi, [edx+ecx*4]
xor	ebx, ebx
xor	eax, eax
mov	[esp+3Ch+var_18], ebx
test	edi, edi
jz	short loc_6985C6
lea	esp, [esp+0]

loc_698570:
lea	esi, [ebx+1]
cmp	esi, ebx
jnb	short loc_698589
mov	edx, [esp+3Ch+var_14]
shr	edx, 1
cmp	esi, edx
jnb	short loc_6985A9
mov	eax, [esp+3Ch+var_10]
push	esi
push	eax
jmp	short loc_69859C

loc_698589:
cmp	esi, [esp+3Ch+var_14]
jb	short loc_6985A9
mov	edx, [esp+3Ch+var_10]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx

loc_69859C:
lea	ecx, [esp+44h+var_1C]
call	sub_6808E0
mov	ebp, [esp+3Ch+var_1C]

loc_6985A9:
lea	eax, [ebp+esi*4-4]
mov	ebx, esi
mov	[esp+3Ch+var_18], ebx
test	eax, eax
jz	short loc_6985B9
mov	[eax], edi

loc_6985B9:
mov	eax, edi
mov	edi, [edi+20h]
test	edi, edi
jnz	short loc_698570
mov	esi, [esp+3Ch+var_C]

loc_6985C6:
mov	ecx, [esp+3Ch+var_24]
cmp	eax, ecx
jnz	loc_698660
mov	eax, [esp+3Ch+var_8]
add	eax, 0FFFFFFFFh
lea	ecx, [ebx-1]
js	loc_69866E

loc_6985E2:
test	ecx, ecx
jl	loc_69866E
mov	edx, [esi+eax*4]
cmp	edx, [ebp+ecx*4+0]
jnz	short loc_6985FB
dec	eax
dec	ecx
test	eax, eax
jge	short loc_6985E2
jmp	short loc_69866E

loc_6985FB:
mov	ecx, [ebp+ecx*4+0]
mov	eax, [edx+14h]
cmp	eax, [ecx+14h]
jge	short loc_69866E

loc_698607:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebp
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	edi, [esp+40h+var_2C]
mov	ebx, [esp+40h+arg_0]

loc_69862B:
test	ebx, ebx
jz	short loc_698632
inc	dword ptr [ebx+4]

loc_698632:
mov	ecx, [esp+40h+var_30]
lea	eax, [esp+40h+arg_0]
push	eax
push	ecx
lea	ecx, [edi+2478h]
mov	[esp+48h+arg_0], ebx
call	sub_694F20
test	ebx, ebx
jz	short loc_698656
mov	ecx, ebx
call	sub_64A400

loc_698656:
pop	ebp

loc_698657:
pop	edi
pop	esi
pop	ebx
add	esp, 30h
retn	4

loc_698660:
mov	edx, [eax+1BCh]
cmp	edx, [ecx+1BCh]
jg	short loc_698607

loc_69866E:
mov	eax, [esp+3Ch+var_2C]
inc	eax
mov	[esp+3Ch+var_2C], eax
cmp	eax, [esp+3Ch+var_20]
jnb	short loc_698607
mov	edi, [esp+3Ch+var_28]
jmp	loc_6984F1

loc_698686:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebp
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 30h
retn	4
sub_6983F0 endp

align 10h



sub_6986B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx+246Ch]
push	edi
lea	edi, [ecx+2468h]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6986D0
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6986E5
push	esi
jmp	short loc_6986DD

loc_6986D0:
cmp	esi, [edi+8]
jb	short loc_6986E5
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_6986DD:
push	edi
mov	ecx, edi
call	sub_714BE0

loc_6986E5:
mov	edx, [edi]
mov	[edi+4], esi
lea	eax, [edx+esi*4-4]
pop	edi
pop	esi
test	eax, eax
jz	short locret_6986FA
mov	ecx, [esp+arg_0]
mov	[eax], ecx

locret_6986FA:
retn	4
sub_6986B0 endp

align 10h



sub_698700 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
mov	ebx, ecx
mov	eax, [ebx+10h]
test	eax, eax
jz	loc_698833
cmp	dword ptr [eax+0Ch], 1
jb	loc_698833
mov	eax, [eax+8]
cmp	byte ptr [eax],	0
jz	loc_698833
mov	ecx, [esp+24h+arg_0]
mov	edx, [ecx]
mov	eax, [edx+70h]
push	ebp
push	esi
push	edi
call	eax
mov	ebp, eax
mov	ecx, [ebp+78h]
mov	edi, [ecx+294h]
mov	edx, [edi]
mov	eax, [edx+28h]
lea	esi, [ebp+78h]
push	0
push	20h
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_698766
mov	ecx, [ebx+10h]
push	ecx
push	esi
mov	ecx, eax
call	sub_66A400
mov	[esp+28h+var_18], eax
jmp	short loc_69876E

loc_698766:
mov	[esp+28h+var_18], 0

loc_69876E:
mov	eax, [ebx]
cmp	eax, 200h
ja	short loc_698783
jz	short loc_69878F
sub	eax, 1
jz	short loc_69878F
sub	eax, 3
jmp	short loc_698788

loc_698783:
cmp	eax, 40000h

loc_698788:
mov	esi, 3
jnz	short loc_698794

loc_69878F:
mov	esi, 4

loc_698794:
mov	edx, [edi]
mov	eax, [edx+28h]
push	0
push	6Ch
mov	ecx, edi
call	eax
xor	edi, edi
cmp	eax, edi
jz	short loc_6987C0
mov	ecx, [ebx+10h]
mov	edx, [ecx+0Ch]
push	esi
mov	esi, [esp+34h+var_20]
push	edi
push	edx
push	edi
push	esi
push	ebp
mov	ecx, eax
call	sub_67CCA0
jmp	short loc_6987C6

loc_6987C0:
mov	esi, [esp+30h+var_20]
xor	eax, eax

loc_6987C6:
lea	edx, [esp+30h+var_1C]
push	edx
lea	ecx, [esp+34h+var_10]
mov	[esp+34h+var_14], 0
mov	[esp+34h+var_1C], eax
mov	[esp+34h+var_18], edi
call	sub_651E70
test	[esp+30h+var_14], 2
jnz	short loc_6987F5
mov	ecx, [esp+30h+var_1C]
cmp	ecx, edi
jz	short loc_6987F5
call	sub_64B3B0

loc_6987F5:
test	[esp+30h+var_14], 1
mov	[esp+30h+var_1C], edi
jnz	short loc_69880D
mov	ecx, [esp+30h+var_18]
cmp	ecx, edi
jz	short loc_69880D
call	sub_64B3B0

loc_69880D:
mov	ecx, [esp+30h+arg_0]
lea	eax, [esp+30h+var_10]
push	eax
push	ebx
call	sub_65C3C0
lea	ecx, [esp+30h+var_10]
call	sub_652830
cmp	esi, edi
jz	short loc_698830
mov	ecx, esi
call	sub_64A400

loc_698830:
pop	edi
pop	esi
pop	ebp

loc_698833:
pop	ebx
add	esp, 20h
retn	4
sub_698700 endp

align 10h



sub_698840 proc	near

var_60=	dword ptr -60h
var_C= dword ptr -0Ch

sub	esp, 60h
push	esi
mov	esi, ecx
xor	eax, eax
test	byte ptr [esi+4], 80h
jz	short loc_698884
mov	eax, [esi+5]
test	eax, eax
jnz	short loc_698884
lea	ecx, [esp+64h+var_60]
call	sub_684DF0
mov	eax, [esi]
mov	edx, [eax+20h]
lea	ecx, [esp+64h+var_60]
push	ecx
mov	ecx, esi
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+64h+var_60]
mov	eax, [eax+30h]
mov	esi, [esp+64h+var_C]
push	edx
call	eax
mov	eax, esi

loc_698884:
pop	esi
add	esp, 60h
retn
sub_698840 endp

align 10h



sub_698890 proc	near

var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 18h
push	ebx
xor	ebx, ebx
mov	[esp+1Ch+var_14], ecx
add	ecx, 4
mov	[esp+1Ch+var_8], ebx
mov	[esp+1Ch+var_10], ecx
mov	[esp+1Ch+var_C], 0FFFFFFFFh
mov	[esp+1Ch+var_4], ebx
mov	dl, [ecx]
push	ebp
mov	[esp+20h+var_16], dl
push	esi
mov	eax, 1
and	dl, 80h
push	edi
mov	[esp+28h+var_8], eax
mov	[esp+28h+var_15], dl
jz	short loc_6988D5
mov	eax, 5
mov	[esp+28h+var_8], eax

loc_6988D5:
mov	ebp, [esp+28h+arg_0]
xor	esi, esi
mov	[esp+28h+var_4], esi
movzx	dx, byte ptr [ecx+eax+1]
movzx	di, byte ptr [ecx+eax]
shl	dx, 8
or	dx, di
movzx	edx, dx
movzx	edx, dx
mov	[ebp+48h], edx
mov	dl, [esp+28h+var_16]
add	eax, 2
mov	[esp+28h+var_8], eax
test	dl, 2
jz	short loc_698938
or	byte ptr [ebp+53h], 2
mov	[esp+28h+var_4], esi
movzx	dx, byte ptr [ecx+eax+1]
movzx	di, byte ptr [ecx+eax]
shl	dx, 8
or	dx, di
movzx	edx, dx
movzx	edx, dx
add	eax, 2
mov	[ebp+4Ch], edx
mov	dl, [esp+28h+var_16]
mov	[esp+28h+var_8], eax

loc_698938:
test	dl, 4
jz	short loc_69895E
or	byte ptr [ebp+53h], 4
lea	eax, [ebp+2Ch]
push	eax
lea	ecx, [esp+2Ch+var_10]
call	sub_6A9DD0
mov	esi, [esp+28h+var_4]
mov	eax, [esp+28h+var_8]
mov	ecx, [esp+28h+var_10]
mov	dl, [esp+28h+var_16]

loc_69895E:
test	dl, 8
jz	short loc_698984
or	byte ptr [ebp+53h], 8
lea	ecx, [ebp+0Ch]
push	ecx
lea	ecx, [esp+2Ch+var_10]
call	sub_6AA130
mov	esi, [esp+28h+var_4]
mov	eax, [esp+28h+var_8]
mov	ecx, [esp+28h+var_10]
mov	dl, [esp+28h+var_16]

loc_698984:
test	dl, 10h
jz	short loc_6989D0
or	byte ptr [ebp+53h], 10h
cmp	esi, ebx
jz	short loc_698996
inc	eax
mov	[esp+28h+var_8], eax

loc_698996:
xor	esi, esi
mov	[esp+28h+var_4], esi
movzx	dx, byte ptr [ecx+eax+1]
movzx	di, byte ptr [ecx+eax]
shl	dx, 8
or	dx, di
movzx	edx, dx
movzx	edx, dx
mov	[esp+28h+arg_0], edx
mov	dl, [esp+28h+var_16]
add	eax, 2
fild	[esp+28h+arg_0]
mov	[esp+28h+var_8], eax
fdiv	ds:dbl_15FCCE8
fstp	dword ptr [ebp+44h]

loc_6989D0:
test	dl, 20h
jz	short loc_698A08
cmp	esi, ebx
jz	short loc_6989DE
inc	eax
mov	[esp+28h+var_8], eax

loc_6989DE:
mov	edx, [esp+28h+var_14]
lea	edx, [eax+edx+4]
mov	[ebp+58h], edx
lea	esp, [esp+0]

loc_6989F0:
xor	esi, esi
mov	[esp+28h+var_4], esi
mov	dl, [ecx+eax]
inc	eax
mov	[esp+28h+var_8], eax
test	dl, dl
jnz	short loc_6989F0
mov	dl, [esp+28h+var_16]
jmp	short loc_698A0B

loc_698A08:
mov	[ebp+58h], ebx

loc_698A0B:
test	dl, 40h
jz	short loc_698A3F
or	byte ptr [ebp+53h], 40h
cmp	esi, ebx
jz	short loc_698A1D
inc	eax
mov	[esp+28h+var_8], eax

loc_698A1D:
xor	esi, esi
mov	[esp+28h+var_4], esi
movzx	di, byte ptr [ecx+eax+1]
movzx	cx, byte ptr [ecx+eax]
shl	di, 8
or	di, cx
movzx	ecx, di
add	eax, 2
mov	[ebp+50h], cx

loc_698A3F:
xor	edi, edi
cmp	[esp+28h+var_15], bl
jz	loc_698BBA
mov	ecx, [esp+28h+var_14]
mov	edi, [ecx+5]
cmp	edi, ebx
jnz	loc_698BBA
cmp	esi, ebx
jz	short loc_698A5F
inc	eax

loc_698A5F:
add	eax, 2
cmp	[esp+28h+arg_4], 6
mov	[esp+28h+var_4], ebx
setnb	dl
mov	[esp+28h+arg_4], dl
test	dl, dl
jz	short loc_698A7B
add	eax, 4
jmp	short loc_698A7E

loc_698A7B:
add	eax, 2

loc_698A7E:
mov	[esp+28h+var_8], eax
mov	eax, dword_1855FC0
mov	edx, [eax]
push	ecx
mov	ecx, eax
mov	eax, [edx+3Ch]
call	eax
mov	edx, [eax]
push	ebx
mov	ecx, eax
mov	eax, [edx+28h]
push	0Ch
call	eax
cmp	eax, ebx
jz	short loc_698AAD
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	edi, eax
jmp	short loc_698AB3

loc_698AAD:
xor	edi, edi
jmp	short loc_698AB3

loc_698AB1:
xor	ebx, ebx

loc_698AB3:
mov	ecx, [esp+28h+var_8]
cmp	[esp+28h+var_4], ebx
jz	short loc_698AC2
inc	ecx
mov	[esp+28h+var_8], ecx

loc_698AC2:
cmp	[esp+28h+arg_4], 0
mov	[esp+28h+var_4], ebx
jz	short loc_698AFA
mov	edx, [esp+28h+var_10]
movzx	eax, byte ptr [edx+ecx+3]
movzx	esi, byte ptr [edx+ecx+2]
shl	eax, 8
or	eax, esi
movzx	esi, byte ptr [edx+ecx+1]
movzx	edx, byte ptr [edx+ecx]
shl	eax, 8
or	eax, esi
shl	eax, 8
or	eax, edx
add	ecx, 4
mov	esi, eax
jmp	short loc_698B19

loc_698AFA:
mov	eax, [esp+28h+var_10]
movzx	dx, byte ptr [eax+ecx+1]
movzx	ax, byte ptr [eax+ecx]
shl	dx, 8
or	dx, ax
movzx	eax, dx
add	ecx, 2
movzx	esi, ax

loc_698B19:
mov	eax, [esp+28h+var_14]
mov	[esp+28h+var_8], ecx
cmp	esi, ebx
jz	loc_698BB3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+3Ch]
push	eax
call	edx
mov	edx, [eax]
push	ebx
mov	ecx, eax
mov	eax, [edx+28h]
push	14h
call	eax
cmp	eax, ebx
jz	short loc_698B64
xor	ecx, ecx
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], cx
mov	[eax+0Ah], cl
mov	[eax+0Ch], cl
mov	[eax+0Dh], cl
mov	byte ptr [eax+0Bh], 0FFh
mov	[eax+10h], ebx
mov	ebx, eax

loc_698B64:
push	esi
lea	edx, [esp+2Ch+var_10]
push	edx
mov	ecx, ebx
call	sub_68F670
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_698B86
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_698B9B
push	esi
jmp	short loc_698B93

loc_698B86:
cmp	esi, [edi+8]
jb	short loc_698B9B
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_698B93:
push	edi
mov	ecx, edi
call	sub_68FA50

loc_698B9B:
mov	edx, [edi]
lea	eax, [edx+esi*4-4]
mov	[edi+4], esi
test	eax, eax
jz	loc_698AB1
mov	[eax], ebx
jmp	loc_698AB1

loc_698BB3:
mov	dl, [esp+28h+var_16]
mov	[eax+5], edi

loc_698BBA:
mov	al, dl
shr	al, 1
and	al, 1
and	dl, 1
mov	[ebp+54h], edi
mov	[ebp+5Ch], ebx
test	al, al
jz	short loc_698BE2
test	dl, dl
jz	short loc_698BED
pop	edi
pop	esi
mov	dword ptr [ebp+5Ch], 2
pop	ebp
pop	ebx
add	esp, 18h
retn	8

loc_698BE2:
test	dl, dl
jz	short loc_698BED
mov	dword ptr [ebp+5Ch], 1

loc_698BED:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_698890 endp

align 10h



sub_698C00 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14376A8
test	byte ptr [esi+4], 80h
mov	[esp+8+var_4], esi
jz	short loc_698C87
push	ebx
mov	ebx, [esi+5]
test	ebx, ebx
jz	short loc_698C7D
push	ebp
mov	ebp, [ebx+4]
push	edi
xor	edi, edi
test	ebp, ebp
jbe	short loc_698C53

loc_698C27:
mov	eax, [ebx]
mov	esi, [eax+edi*4]
test	esi, esi
jz	short loc_698C4A
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_698C3C
call	sub_64A430

loc_698C3C:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_698C4A:
inc	edi
cmp	edi, ebp
jb	short loc_698C27
mov	esi, [esp+14h+var_4]

loc_698C53:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
pop	edi
pop	ebp
pop	ebx
mov	dword ptr [esi], offset	off_1432C80
pop	esi
pop	ecx
retn

loc_698C7D:
pop	ebx
mov	dword ptr [esi], offset	off_1432C80
pop	esi
pop	ecx
retn

loc_698C87:
mov	dword ptr [esi], offset	off_1432C80
pop	esi
pop	ecx
retn
sub_698C00 endp




sub_698C90 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_34=	byte ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 64h
push	ebx
push	ebp
push	esi
xor	ebp, ebp
mov	esi, ecx
xor	ebx, ebx
mov	[esp+70h+var_64], ebx
lea	ecx, [esp+70h+var_54]
mov	[esp+70h+var_60], ebp
mov	[esp+70h+var_5C], ebp
mov	[esp+70h+var_58], ebp
call	sub_68CFB0
lea	ecx, [esp+70h+var_34]
call	sub_64E8E0
fldz
mov	edx, [esi]
fstp	[esp+70h+var_1C]
mov	edx, [edx+20h]
xor	eax, eax
mov	word ptr [esp+70h+var_10], ax
mov	byte ptr [esp+70h+var_10+2], al
lea	eax, [esp+70h+var_60]
push	eax
mov	ecx, esi
mov	[esp+74h+var_14], 40000h
mov	byte ptr [esp+74h+var_10+3], bl
mov	[esp+74h+var_18], ebp
call	edx
mov	eax, [esp+70h+var_4]
sub	eax, ebp
jz	loc_698D8B
sub	eax, 1
jz	short loc_698D78
sub	eax, 1
jnz	loc_698E15
mov	esi, [esp+70h+arg_0]
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	edx, [esp+70h+var_8]
cmp	edx, ebp
jnz	short loc_698D28
mov	ecx, [eax+78h]
mov	eax, [esp+70h+arg_0]
add	ecx, 8
jmp	short loc_698D47

loc_698D28:
mov	eax, [eax+78h]
mov	ecx, [eax+280h]
push	edx
mov	ebx, 2
call	sub_651000
inc	dword ptr [eax+8]
mov	[esp+70h+arg_0], eax
lea	ecx, [esp+70h+arg_0]

loc_698D47:
mov	ecx, [ecx]
mov	[esp+70h+var_64], ecx
inc	dword ptr [ecx+8]
test	bl, 2
jz	short loc_698D62
add	dword ptr [eax+8], 0FFFFFFFFh
jnz	short loc_698D62
mov	ecx, eax
call	sub_650DF0

loc_698D62:
lea	ecx, [esp+70h+var_64]
push	ecx
lea	edx, [esp+74h+var_60]
push	edx
mov	ecx, esi
call	sub_680EA0
jmp	loc_698E00

loc_698D78:
mov	ecx, [esp+70h+arg_0]
lea	eax, [esp+70h+var_60]
push	eax
call	sub_67F300
jmp	loc_698E15

loc_698D8B:
mov	esi, [esp+70h+arg_0]
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	edx, [esp+70h+var_8]
mov	ecx, [eax+78h]
cmp	edx, ebp
jnz	short loc_698DAC
mov	eax, [esp+70h+arg_0]
add	ecx, 8
jmp	short loc_698DC8

loc_698DAC:
mov	ecx, [ecx+280h]
push	edx
mov	ebx, 1
call	sub_651000
add	[eax+8], ebx
mov	[esp+70h+arg_0], eax
lea	ecx, [esp+70h+arg_0]

loc_698DC8:
mov	ecx, [ecx]
mov	[esp+70h+var_64], ecx
inc	dword ptr [ecx+8]
test	bl, 1
jz	short loc_698DE3
add	dword ptr [eax+8], 0FFFFFFFFh
jnz	short loc_698DE3
mov	ecx, eax
call	sub_650DF0

loc_698DE3:
mov	edx, [esp+70h+var_C]
push	ebp
push	ebp
push	4
push	0FFFFFFFFh
push	ebp
push	edx
lea	eax, [esp+88h+var_64]
push	eax
lea	ecx, [esp+8Ch+var_60]
push	ecx
mov	ecx, esi
call	sub_68A810

loc_698E00:
mov	eax, [esp+70h+var_64]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_698E15
call	sub_650DF0

loc_698E15:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+70h+var_60]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebp
pop	ebx
add	esp, 64h
retn	4
sub_698C90 endp




sub_698E30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
lea	esi, [ebx+1]
push	esi
push	edi
call	sub_693F00
cmp	esi, ebx
jbe	short loc_698E63
sub	esi, ebx
mov	eax, [edi]
lea	eax, [eax+ebx*8]
jz	short loc_698E63
nop

loc_698E50:
test	eax, eax
jz	short loc_698E5B
mov	dword ptr [eax+4], 0

loc_698E5B:
add	eax, 8
sub	esi, 1
jnz	short loc_698E50

loc_698E63:
mov	eax, [edi+4]
mov	esi, [esp+0Ch+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_698E8D
mov	edx, [edi]
sub	eax, esi
lea	eax, ds:0FFFFFFF8h[eax*8]
lea	ecx, [edx+esi*8]
push	eax
push	ecx
add	ecx, 8
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_698E8D:
mov	ecx, [edi]
pop	edi
lea	eax, [ecx+esi*8]
pop	esi
pop	ebx
test	eax, eax
jz	short locret_698EB1
mov	edx, [esp+arg_4]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
test	ecx, ecx
jz	short loc_698EAB
inc	dword ptr [ecx+4]

loc_698EAB:
mov	edx, [edx+4]
mov	[eax+4], edx

locret_698EB1:
retn	8
sub_698E30 endp

align 10h



sub_698EC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_698ED3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_698EF5

loc_698ED3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_698EFA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_698EF5:
call	sub_694190

loc_698EFA:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, [eax+eax*2]
lea	esi, [ecx+edx*4+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_698F3A
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	eax, [eax]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	ecx, [ecx+4]
mov	edx, [ecx]
mov	[esi+8], edx
pop	esi
pop	ebx
retn	0Ch

loc_698F3A:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax

loc_698F41:
inc	edi
and	edi, ebp
lea	edx, [edi+edi*2]
cmp	[ecx+edx*4+8], ebx
jnz	short loc_698F41
lea	edx, [edi+edi*2]
lea	ebx, [ecx+edx*4+8]
mov	edx, [esi+4]
mov	edx, [edx+0Ch]
and	edx, ebp
cmp	edx, eax
jnz	short loc_698FA5
test	ebx, ebx
jz	short loc_698F77
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	eax, [esi+8]
mov	[ebx+8], eax

loc_698F77:
mov	ebp, [esp+10h+arg_4]
mov	ecx, [ebp+0]
mov	ebx, [ecx]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_698F91
call	sub_650DF0

loc_698F91:
mov	[esi+4], ebx
mov	edx, [ebp+4]
mov	eax, [edx]
mov	[esi+8], eax
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_698FA5:
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jz	short loc_698FC1

loc_698FB2:
mov	edx, [edx]
lea	edx, [edx+edx*2]
cmp	[ecx+edx*4+8], eax
lea	edx, [ecx+edx*4+8]
jnz	short loc_698FB2

loc_698FC1:
test	ebx, ebx
jz	short loc_698FD8
mov	eax, [esi]
mov	[ebx], eax
mov	eax, [esi+4]
mov	[ebx+4], eax
inc	dword ptr [eax+8]
mov	eax, [esi+8]
mov	[ebx+8], eax

loc_698FD8:
mov	ebx, [esp+10h+arg_4]
mov	[edx], edi
mov	ecx, [ebx]
mov	edi, [ecx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_698FF3
call	sub_650DF0

loc_698FF3:
mov	[esi+4], edi
mov	edx, [ebx+4]
mov	eax, [edx]
pop	edi
mov	[esi+8], eax
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_698EC0 endp

align 10h



sub_699010 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_69902A
mov	edx, [ecx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ecx+8], edx

loc_69902A:
mov	ecx, [eax]
mov	[esi], ecx
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_699037
inc	dword ptr [ecx]

loc_699037:
mov	edx, [eax+4]
mov	[esi+4], edx
lea	ecx, [esi+8]
mov	byte ptr [ecx+8], 0
mov	edx, [eax+8]
mov	[ecx], edx
test	edx, edx
jz	short loc_69905C
push	edi
mov	edi, [edx+8]
inc	edi
and	edi, 8FFFFFFFh
mov	[edx+8], edi
pop	edi

loc_69905C:
mov	dword ptr [ecx+4], 0
mov	edx, [eax+0Ch]
test	edx, edx
jz	short loc_699079
mov	al, [eax+10h]
and	al, 1
movzx	eax, al
push	eax
push	edx
call	sub_67C1A0

loc_699079:
mov	eax, esi
pop	esi
retn	4
sub_699010 endp

align 10h



sub_699080 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], offset off_1437474
mov	dword ptr [esi+10h], offset off_143F300
push	edi
mov	dword ptr [esi], offset	off_14376F0
mov	dword ptr [esi+8], offset off_14376DC
mov	dword ptr [esi+10h], offset off_14376D4
mov	dword ptr [esi+14h], 0
push	0		; int
lea	ecx, [esi+1Ch]	; lpCriticalSection
mov	dword ptr [esi+18h], 0
call	sub_64D6D0
mov	edi, [esp+8+arg_0]
test	edi, edi
jz	short loc_6990DA
mov	ecx, edi
call	sub_64A420

loc_6990DA:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6990E6
call	sub_64A430

loc_6990E6:
mov	[esi+14h], edi
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_699080 endp




sub_6990F0 proc	near
sub	ecx, 8
jmp	sub_699790
sub_6990F0 endp

align 10h



sub_699100 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_699790
sub_699100 endp

align 10h



sub_699110 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_69912E
call	sub_64A420

loc_69912E:
mov	edx, [edi+8]
pop	edi
mov	[esi+8], edx
mov	eax, esi
pop	esi
retn	4
sub_699110 endp

align 10h



sub_699140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*2]
cmp	dword ptr [esi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*4+8]
mov	eax, edx
jz	short loc_69918F
cmp	[ecx+4], edx
jnz	short loc_69918F
push	edi
mov	edi, [esp+8+arg_0]
push	ebx
push	ebp

loc_699163:
cmp	[ecx+4], edx
jnz	short loc_699175
mov	ebx, [ecx+8]
mov	ebp, [edi]
mov	ebx, [ebx+8]
cmp	ebx, [ebp+8]
jz	short loc_699188

loc_699175:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_699185
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*4+8]
jmp	short loc_699163

loc_699185:
or	eax, 0FFFFFFFFh

loc_699188:
pop	ebp
pop	ebx
pop	edi
pop	esi
retn	8

loc_69918F:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_699140 endp

align 10h



sub_6991A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*2]
cmp	dword ptr [esi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*4+8]
mov	eax, edx
jz	short loc_6991EA
cmp	[ecx+4], edx
jnz	short loc_6991EA
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_6991C2:
cmp	[ecx+4], edx
jnz	short loc_6991D1
mov	ebx, [ecx+8]
mov	ebx, [ebx+8]
cmp	ebx, [edi]
jz	short loc_6991E4

loc_6991D1:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6991E1
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*4+8]
jmp	short loc_6991C2

loc_6991E1:
or	eax, 0FFFFFFFFh

loc_6991E4:
pop	ebx
pop	edi
pop	esi
retn	8

loc_6991EA:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6991A0 endp

align 10h



sub_699200 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	[esp+4+var_4], ecx
mov	ecx, [ecx]
test	ecx, ecx
jz	loc_69929E
mov	eax, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [eax]
mov	eax, [ecx+4]
and	eax, edi
lea	edx, [eax+eax*2]
cmp	dword ptr [ecx+edx*4+8], 0FFFFFFFEh
lea	esi, [ecx+edx*4+8]
jz	short loc_69929C
cmp	[esi+4], eax
jnz	short loc_69929C
push	ebx
mov	ebx, eax
or	edx, 0FFFFFFFFh
push	ebp

loc_699235:
cmp	[esi+4], ebx
jnz	short loc_699242
mov	ebp, [esi+8]
cmp	[ebp+8], edi
jz	short loc_699254

loc_699242:
mov	edx, eax
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_69929A
lea	esi, [eax+eax*2]
lea	esi, [ecx+esi*4+8]
jmp	short loc_699235

loc_699254:
cmp	ebx, eax
mov	eax, [esi]
jnz	short loc_699279
cmp	eax, 0FFFFFFFFh
jz	short loc_699280
lea	eax, [eax+eax*2]
lea	edi, [ecx+eax*4+8]
mov	ecx, esi
call	sub_693F80
push	edi
mov	ecx, esi
call	sub_699110
mov	esi, edi
jmp	short loc_699280

loc_699279:
lea	edx, [edx+edx*2]
mov	[ecx+edx*4+8], eax

loc_699280:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_69928C
call	sub_64A430

loc_69928C:
mov	ecx, [esp+14h+var_4]
mov	dword ptr [esi], 0FFFFFFFEh
mov	eax, [ecx]
dec	dword ptr [eax]

loc_69929A:
pop	ebp
pop	ebx

loc_69929C:
pop	edi
pop	esi

loc_69929E:
pop	ecx
retn	4
sub_699200 endp

align 10h



sub_6992B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	edi
push	eax
mov	esi, ecx
call	sub_6996F0
mov	eax, [esi]
mov	ebx, [esp+0Ch+arg_8]
and	ebx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	ecx, [ebx+ebx*2]
lea	edi, [eax+ecx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[edi], edx
jnz	short loc_6992FF
mov	esi, [esp+0Ch+arg_4]
mov	dword ptr [edi], 0FFFFFFFFh
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6992F1
call	sub_64A420

loc_6992F1:
mov	edx, [esi]
mov	[edi+8], edx
mov	[edi+4], ebx
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_6992FF:
mov	ecx, [eax+4]
mov	esi, ebx
push	ebp

loc_699305:
inc	esi
and	esi, ecx
lea	ebp, [esi+esi*2]
cmp	[eax+ebp*4+8], edx
jnz	short loc_699305
mov	edx, [edi+4]
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*4+8]
cmp	edx, ebx
jnz	short loc_699357
test	ecx, ecx
jz	short loc_699329
push	edi
call	sub_699110

loc_699329:
mov	ebp, [esp+10h+arg_4]
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_699339
call	sub_64A420

loc_699339:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_699345
call	sub_64A430

loc_699345:
mov	edx, [ebp+0]
mov	[edi+8], edx
pop	ebp
mov	[edi], esi
mov	[edi+4], ebx
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_699357:
lea	edx, [edx+edx*2]
cmp	[eax+edx*4+8], ebx
lea	ebp, [eax+edx*4+8]
jz	short loc_699375

loc_699364:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*2+0]
cmp	[eax+edx*4+8], ebx
lea	ebp, [eax+edx*4+8]
jnz	short loc_699364

loc_699375:
test	ecx, ecx
jz	short loc_69937F
push	edi
call	sub_699110

loc_69937F:
mov	[ebp+0], esi
mov	esi, [esp+10h+arg_4]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_699391
call	sub_64A420

loc_699391:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_69939D
call	sub_64A430

loc_69939D:
mov	eax, [esi]
mov	[edi+8], eax
pop	ebp
mov	[edi+4], ebx
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_6992B0 endp

align 10h



sub_6993C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [eax]
push	ebp
mov	ebp, [ebx+8]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi]
test	esi, esi
jz	short loc_699417
mov	ecx, [esi+4]
and	ecx, ebp
push	ecx
push	eax
mov	ecx, edi
call	sub_699140
test	eax, eax
jl	short loc_699413
lea	edx, [eax+eax*2]
lea	esi, [esi+edx*4+10h]
test	ebx, ebx
jz	short loc_6993F9
mov	ecx, ebx
call	sub_64A420

loc_6993F9:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_699404
call	sub_64A430

loc_699404:
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax]
pop	edi
mov	[esi], ecx
pop	esi
pop	ebp
pop	ebx
retn	8

loc_699413:
mov	eax, [esp+10h+arg_4]

loc_699417:
mov	edx, [esp+10h+arg_0]
push	ebp
push	eax
push	edx
mov	ecx, edi
call	sub_6992B0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6993C0 endp

align 10h



sub_699430 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	ebx, [edi+14h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	esi, [edi+10h]
mov	ebp, [esp+10h+arg_0]
lea	ecx, [edi+10h]
test	esi, esi
jz	short loc_699486
mov	eax, [esi+4]
and	eax, ebp
push	eax
lea	edx, [esp+14h+arg_0]
push	edx
call	sub_6991A0
test	eax, eax
jl	short loc_699486
lea	eax, [eax+eax*2]
lea	esi, [esi+eax*4+10h]
test	esi, esi
jz	short loc_699486
mov	ecx, [esi]
call	sub_64A420
mov	esi, [esi]
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_699486:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
mov	edi, [edi+0Ch]
test	edi, edi
jz	short loc_6994A7
mov	edx, [edi+8]
mov	eax, [edx+0Ch]
lea	ecx, [edi+8]
push	ebp
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_6994A7:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	4
sub_699430 endp




sub_6994B0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, ecx
push	esi
lea	eax, [ebx+14h]
push	eax		; lpCriticalSection
mov	[esp+14h+var_5], 0
call	ds:EnterCriticalSection
mov	esi, [esp+10h+arg_8]
test	esi, esi
jbe	short loc_699530
push	ebp
mov	ebp, [esp+14h+arg_4]
push	edi
mov	edi, [esp+18h+arg_0]
sub	ebp, edi
mov	[esp+18h+var_4], esi
mov	edi, edi

loc_6994E0:
cmp	dword ptr [edi], 0
jnz	short loc_699520
mov	esi, [ebx+10h]
lea	ecx, [ebx+10h]
test	esi, esi
jz	short loc_69951B
mov	edx, [esi+4]
and	edx, [edi+ebp]
lea	eax, [edi+ebp]
push	edx
push	eax
call	sub_6991A0
test	eax, eax
jl	short loc_69951B
lea	eax, [eax+eax*2]
lea	esi, [esi+eax*4+10h]
test	esi, esi
jz	short loc_69951B
mov	ecx, [esi]
call	sub_64A420
mov	ecx, [esi]
mov	[edi], ecx
jmp	short loc_699520

loc_69951B:
mov	[esp+18h+var_5], 1

loc_699520:
add	edi, 4
sub	[esp+18h+var_4], 1
jnz	short loc_6994E0
mov	esi, [esp+18h+arg_8]
pop	edi
pop	ebp

loc_699530:
lea	eax, [ebx+14h]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
cmp	[esp+10h+var_5], 0
jz	short loc_69955E
mov	eax, [ebx+0Ch]
test	eax, eax
jz	short loc_69955E
mov	edx, [eax+8]
mov	edx, [edx+10h]
lea	ecx, [eax+8]
mov	eax, [esp+10h+arg_4]
push	esi
push	eax
mov	eax, [esp+18h+arg_0]
push	eax
call	edx

loc_69955E:
pop	esi
pop	ebx
add	esp, 8
retn	0Ch
sub_6994B0 endp

align 10h



sub_699570 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_699592
call	sub_7005E0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_699592:
push	esi
cmp	eax, 8
jnb	short loc_69959F
mov	esi, 8
jmp	short loc_699604

loc_69959F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6995B2
fadd	ds:flt_15FCC08

loc_6995B2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_699604:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
mov	[esp+1Ch+arg_4], ebx
mov	dword ptr [esp+1Ch+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_699664
xor	eax, eax
jmp	short loc_699650
align 10h

loc_699650:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_699650

loc_699664:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_6996CF
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_699677

loc_699673:
mov	edi, [esp+1Ch+var_C]

loc_699677:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_6996AE
mov	eax, [edi+8]
mov	ecx, [eax+8]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+8]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_6992B0
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6996A8
call	sub_64A430

loc_6996A8:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6996AE:
add	ebx, 0Ch
sub	ebp, 1
jnz	short loc_699673
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_6996CF:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_7005E0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_699570 endp

align 10h



sub_6996F0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
test	eax, eax
jnz	short loc_699705
mov	eax, [esp+arg_0]
push	8
push	eax
call	sub_699570
retn	4

loc_699705:
mov	edx, [eax+4]
push	esi
lea	esi, ds:4[edx*4]
mov	edx, [eax]
lea	edx, [edx+edx*4]
cmp	edx, esi
pop	esi
jbe	short locret_69972C
mov	eax, [eax+4]
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_699570

locret_69972C:
retn	4
sub_6996F0 endp

align 10h



sub_699730 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
lea	ebx, [edi+14h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	esi, [esp+0Ch+arg_4]
test	esi, esi
jz	short loc_699774
mov	ecx, esi
call	sub_64A420
lea	eax, [esp+0Ch+arg_4]
lea	ecx, [edi+10h]
push	eax
push	ecx
mov	[esp+14h+arg_4], esi
call	sub_6993C0
mov	ecx, esi
call	sub_64A430
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn	8

loc_699774:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
lea	ecx, [edi+10h]
call	sub_699200
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn	8
sub_699730 endp

align 10h



sub_699790 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+1Ch]	; lpCriticalSection
mov	dword ptr [esi], offset	off_14376F0
mov	dword ptr [esi+8], offset off_14376DC
mov	dword ptr [esi+10h], offset off_14376D4
call	sub_64D730
lea	ecx, [esi+18h]
call	sub_7005E0
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6997C3
call	sub_64A430

loc_6997C3:
mov	ecx, esi
mov	dword ptr [esi+10h], offset off_143F300
mov	dword ptr [esi+8], offset off_1437474
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6997ED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6997ED:
mov	eax, esi
pop	esi
retn	4
sub_699790 endp

align 10h



; int __thiscall sub_699800(void *, char)
sub_699800 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_698C00
test	[esp+4+arg_0], 1
jz	short loc_699818
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_699818:
mov	eax, esi
pop	esi
retn	4
sub_699800 endp

align 10h



sub_699820 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	[esi], bl
cmp	eax, ebx
jnz	short loc_69983E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx

loc_69983E:
fldz
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], eax
mov	[esi+14h], ebx
mov	[esi+18h], ebx
xor	eax, eax
mov	[esi+1Ch], ax
fst	dword ptr [esi+20h]
fst	dword ptr [esi+24h]
mov	eax, esi
fst	dword ptr [esi+28h]
fstp	dword ptr [esi+2Ch]
mov	[esi+30h], bl
pop	esi
pop	ebx
retn	4
sub_699820 endp

align 10h



sub_699870 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1437528
test	edi, edi
jz	short loc_699896
mov	ecx, edi
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_699896:
test	[esp+8+arg_0], 1
jz	short loc_6998AB
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6998AB:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_699870 endp

align 10h



sub_6998C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6952F0
test	[esp+4+arg_0], 1
jz	short loc_6998DD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6998DD:
mov	eax, esi
pop	esi
retn	4
sub_6998C0 endp

align 10h



sub_6998F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437660
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_699905
call	sub_64A430

loc_699905:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_699911
call	sub_64A430

loc_699911:
push	edi
mov	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1437528
test	edi, edi
jz	short loc_699934
mov	ecx, edi
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_699934:
test	[esp+8+arg_0], 1
pop	edi
jz	short loc_69994A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69994A:
mov	eax, esi
pop	esi
retn	4
sub_6998F0 endp




sub_699950 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143766C
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_699965
call	sub_64A430

loc_699965:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_699971
call	sub_64A430

loc_699971:
push	edi
mov	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1437528
test	edi, edi
jz	short loc_699994
mov	ecx, edi
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_699994:
test	[esp+8+arg_0], 1
pop	edi
jz	short loc_6999AA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6999AA:
mov	eax, esi
pop	esi
retn	4
sub_699950 endp




sub_6999B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437678
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6999C5
call	sub_64A430

loc_6999C5:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6999D1
call	sub_64A430

loc_6999D1:
push	edi
mov	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1437528
test	edi, edi
jz	short loc_6999F4
mov	ecx, edi
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6999F4:
test	[esp+8+arg_0], 1
pop	edi
jz	short loc_699A0A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_699A0A:
mov	eax, esi
pop	esi
retn	4
sub_6999B0 endp




sub_699A10 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 3Ch
push	ebx
mov	ebx, [esp+40h+arg_0]
push	esi
mov	esi, ecx
xor	eax, eax
cmp	[esi+28h], eax
jbe	short loc_699A38
mov	edx, [esi+24h]
mov	ecx, edx

loc_699A27:
cmp	[ecx], ebx
jge	loc_699BC7
inc	eax
add	ecx, 8
cmp	eax, [esi+28h]
jb	short loc_699A27

loc_699A38:
or	dword ptr [esi+2474h], 100h
push	edi
mov	edi, [esp+48h+arg_4]
mov	[esp+48h+var_38], 0
mov	[esp+48h+var_3C], ebx
test	edi, edi
jz	short loc_699A5A
inc	dword ptr [edi+4]

loc_699A5A:
lea	ecx, [esp+48h+var_3C]
push	ecx
push	eax
lea	ecx, [esi+24h]
mov	[esp+50h+var_38], edi
call	sub_698E30
mov	edx, [edi]
mov	eax, [edx+178h]
push	ebx
mov	ecx, edi
call	eax
test	ebx, ebx
jnz	loc_699BA5
mov	[esi+30h], edi
mov	edx, [edi]
mov	eax, [edx+5Ch]
mov	ecx, edi
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_699A9A
mov	ecx, ebx
call	sub_64A420

loc_699A9A:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_699AA6
call	sub_666B00

loc_699AA6:
mov	ecx, ebx
mov	[esi+34h], ebx
test	ecx, ecx
jz	short loc_699AC4
mov	edx, [ecx]
mov	eax, [edx+30h]
mov	ebx, [esi+2844h]
call	eax
push	eax
mov	ecx, ebx
call	sub_6B2610

loc_699AC4:
mov	ecx, [esi+34h]
mov	ebx, [ecx+10h]
push	ebp
mov	ebp, [esi+0F0h]
add	ebp, 14h
test	ebx, ebx
jz	short loc_699ADF
mov	ecx, ebx
call	sub_64A420

loc_699ADF:
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_699AEB
call	sub_64A430

loc_699AEB:
mov	[ebp+0], ebx
mov	ecx, [esi+34h]
mov	edx, [ecx]
mov	eax, [edx+24h]
call	eax
fld1
test	byte ptr [esi+2474h], 1
fdivrp	st(1), st
fstp	dword ptr [esi+12Ch]
jnz	loc_699BA4
mov	edx, [edi]
mov	eax, [edx+5Ch]
mov	ecx, edi
call	eax
mov	edi, eax
mov	edx, [edi]
mov	eax, [edx+1Ch]
mov	ecx, edi
call	eax
call	__ftol2_sse
mov	edx, [edi]
mov	ebp, eax
mov	eax, [edx+18h]
mov	ecx, edi
call	eax
call	__ftol2_sse
mov	edx, [edi]
mov	ebx, eax
mov	eax, [edx+1Ch]
mov	ecx, edi
call	eax
call	__ftol2_sse
mov	edx, [edi]
mov	[esp+4Ch+arg_0], eax
mov	eax, [edx+18h]
mov	ecx, edi
call	eax
call	__ftol2_sse
fld1
mov	ecx, [esp+4Ch+arg_0]
fst	[esp+4Ch+var_8]
mov	edx, [esi]
fstp	[esp+4Ch+var_C]
mov	edx, [edx+64h]
mov	[esp+4Ch+var_34], eax
xor	eax, eax
mov	[esp+4Ch+var_2C], eax
mov	[esp+4Ch+var_28], eax
mov	[esp+4Ch+var_4], eax
mov	[esp+4Ch+var_10], eax
mov	[esp+4Ch+var_14], eax
mov	[esp+4Ch+var_18], eax
mov	[esp+4Ch+var_1C], eax
lea	eax, [esp+4Ch+var_34]
mov	[esp+4Ch+var_30], ecx
push	eax
mov	ecx, esi
mov	[esp+50h+var_24], ebx
mov	[esp+50h+var_20], ebp
call	edx

loc_699BA4:
pop	ebp

loc_699BA5:
mov	ecx, [esp+48h+var_38]
or	dword ptr [esi+2474h], 80h
pop	edi
test	ecx, ecx
jz	short loc_699BBD
call	sub_64A400

loc_699BBD:
pop	esi
mov	al, 1
pop	ebx
add	esp, 3Ch
retn	8

loc_699BC7:
cmp	[edx+eax*8], ebx
jnz	loc_699A38
pop	esi
xor	al, al
pop	ebx
add	esp, 3Ch
retn	8
sub_699A10 endp

align 10h



; int __stdcall	sub_699BE0(char	*, int,	char, int, int)
sub_699BE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	[esp+14h+var_4], 0
mov	edi, [esp+14h+arg_8]
mov	esi, [esp+14h+arg_0]
mov	ebp, ecx
push	esi
test	edi, edi
jz	short loc_699C2B
mov	eax, [ebp+23C4h]
mov	ecx, [eax+280h]
mov	ebx, 1
call	sub_651000
push	0
lea	ecx, [esp+18h+var_4]
push	ecx
mov	[esp+1Ch+var_4], eax
inc	dword ptr [eax+8]
mov	ecx, edi
call	sub_669880
mov	edi, eax
jmp	short loc_699C76

loc_699C2B:
mov	edx, [ebp+23C4h]
mov	ecx, [edx+280h]
mov	ebx, 2
call	sub_651000
mov	[esp+14h+arg_0], eax
inc	dword ptr [eax+8]
cmp	dword ptr [ebp+30h], 0
jz	short loc_699C74
mov	eax, [esp+14h+arg_0]
cmp	dword ptr [eax+10h], 0
jz	short loc_699C74
mov	ecx, [ebp+30h]
mov	eax, [ecx]
push	0
lea	edx, [esp+18h+arg_0]
push	edx
mov	edx, [eax+70h]
call	edx
mov	ecx, eax
call	sub_669880
mov	edi, eax
jmp	short loc_699C76

loc_699C74:
xor	edi, edi

loc_699C76:
test	bl, 2
jz	short loc_699C94
mov	eax, [esp+14h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFDh
cmp	dword ptr [eax], 0
jnz	short loc_699C94
call	sub_650DF0

loc_699C94:
test	bl, 1
jz	short loc_699CB2
mov	eax, [esp+14h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFEh
cmp	dword ptr [eax], 0
jnz	short loc_699CB2
call	sub_650DF0

loc_699CB2:
test	edi, edi
jz	loc_699D67
lea	ecx, [edi+78h]
call	sub_661C50
test	eax, eax
jz	short loc_699CD5
mov	esi, [eax+1BCh]
cmp	esi, 0FFFFFFFFh
jnz	loc_699DAC

loc_699CD5:
mov	ecx, [ebp+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	6Ch
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_699D53
mov	eax, [esp+14h+arg_4]
push	eax
lea	ecx, [esp+18h+arg_8]
call	sub_67AE10
mov	eax, [edi+94h]
or	ebx, 4
test	eax, eax
jnz	short loc_699D0B
mov	ecx, edi
call	sub_658B70

loc_699D0B:
lea	ecx, [esi+0Ch]
mov	edi, eax
call	sub_679E30
mov	ecx, [esp+14h+arg_C]
xor	eax, eax
mov	[esi+14h], eax
mov	[esi+1Ch], al
mov	[esi+2Ch], al
mov	[esi+40h], al
push	eax
mov	[esi+50h], eax
mov	[esi+54h], al
mov	[esi+64h], eax
mov	eax, [esp+18h+arg_8]
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
lea	edx, [esp+1Ch+arg_8]
push	edx
neg	eax
push	0FFFFFFFFh
sbb	eax, eax
push	edi
inc	eax
push	eax
mov	ecx, esi
call	sub_692310
jmp	short loc_699D55

loc_699D53:
xor	esi, esi

loc_699D55:
test	bl, 4
jz	loc_699E18
mov	edi, [esp+14h+arg_8]
jmp	loc_699DF6

loc_699D67:
mov	ecx, [ebp+30h]
mov	[esp+14h+arg_0], offset	byte_146D660
call	sub_654DD0
cmp	eax, 6
setnbe	cl
mov	byte ptr [esp+14h+arg_8], cl
mov	edx, [esp+14h+arg_8]
push	edx		; char
lea	eax, [esp+18h+arg_0]
push	eax		; int
push	esi		; char *
call	sub_68D7B0
mov	ecx, [esp+20h+arg_0]
add	esp, 0Ch
cmp	byte ptr [ecx],	0
mov	esi, eax
jnz	loc_699E31
cmp	esi, 0FFFFFFFFh
jz	loc_699E31

loc_699DAC:
mov	ecx, [ebp+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	6Ch
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_699DEB
mov	ecx, [esp+14h+arg_4]
push	ecx
lea	ecx, [esp+18h+arg_0]
call	sub_67AE10
mov	edx, [esp+14h+arg_C]
push	0
push	0
push	edx
lea	eax, [esp+20h+arg_0]
push	eax
push	esi
mov	ecx, edi
or	ebx, 8
call	sub_692440
mov	esi, eax
jmp	short loc_699DED

loc_699DEB:
xor	esi, esi

loc_699DED:
test	bl, 8
jz	short loc_699E18
mov	edi, [esp+14h+arg_0]

loc_699DF6:
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_699E18
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_699E18:
test	esi, esi
jz	short loc_699E31
mov	ecx, [esp+14h+arg_10]
push	ecx
lea	ecx, [esi+1Ch]
call	sub_652E40
push	esi
mov	ecx, ebp
call	sub_695C90

loc_699E31:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	14h
sub_699BE0 endp

align 10h



sub_699E40 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
xor	ebx, ebx
mov	esi, ecx
mov	[esp+18h+var_4], esi
mov	[esp+18h+var_C], ebx
cmp	edi, ebx
jz	loc_699F9A
push	ebp
lea	ecx, [edi+78h]
call	sub_661C50
cmp	eax, ebx
jz	short loc_699E7A
mov	ebp, [eax+1BCh]
cmp	ebp, 0FFFFFFFFh
jnz	loc_699F2B

loc_699E7A:
mov	ecx, [esi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	6Ch
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_699EFA
mov	eax, [esp+1Ch+arg_4]
push	eax
lea	ecx, [esp+20h+arg_0]
call	sub_67AE10
mov	eax, [edi+94h]
mov	[esp+1Ch+var_C], 1
cmp	eax, ebx
jnz	short loc_699EB4
mov	ecx, edi
call	sub_658B70

loc_699EB4:
lea	ecx, [esi+0Ch]
mov	edi, eax
call	sub_679E30
mov	ecx, [esp+1Ch+arg_8]
mov	[esi+14h], ebx
mov	[esi+1Ch], bl
mov	[esi+2Ch], bl
mov	[esi+40h], bl
mov	[esi+50h], ebx
mov	[esi+54h], bl
push	ebx
mov	[esi+64h], ebx
mov	eax, [esp+20h+arg_0]
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
lea	edx, [esp+24h+arg_0]
push	edx
neg	eax
push	0FFFFFFFFh
sbb	eax, eax
push	edi
inc	eax
push	eax
mov	ecx, esi
call	sub_692310
jmp	short loc_699EFC

loc_699EFA:
xor	esi, esi

loc_699EFC:
test	byte ptr [esp+1Ch+var_C], 1
jz	short loc_699F7E
mov	edi, [esp+1Ch+arg_0]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_699F7E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
jmp	short loc_699F7E

loc_699F2B:
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	6Ch
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_699F6C
mov	ecx, [esp+1Ch+arg_4]
push	ecx
lea	ecx, [esp+20h+var_8]
call	sub_67AE10
mov	edx, [esp+1Ch+arg_8]
push	ebx
push	ebx
push	edx
lea	eax, [esp+28h+var_8]
push	eax
push	ebp
mov	ecx, esi
mov	[esp+30h+var_C], 2
call	sub_692440
mov	esi, eax
jmp	short loc_699F6E

loc_699F6C:
xor	esi, esi

loc_699F6E:
test	byte ptr [esp+1Ch+var_C], 2
jz	short loc_699F7E
lea	ecx, [esp+1Ch+var_8]
call	sub_4E40F0

loc_699F7E:
pop	ebp
cmp	esi, ebx
jz	short loc_699F9A
mov	ecx, [esp+18h+arg_C]
push	ecx
lea	ecx, [esi+1Ch]
call	sub_652E40
mov	ecx, [esp+18h+var_4]
push	esi
call	sub_695C90

loc_699F9A:
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	10h
sub_699E40 endp

align 10h



sub_699FB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
push	0
push	0
push	0
push	0
push	0
lea	eax, [esp+2Ch+var_8]
push	offset byte_146D660
push	eax
mov	esi, ecx
call	sub_6ACC40
mov	edi, [esi+20h]
add	esp, 1Ch
mov	ecx, edi
test	edi, edi
jnz	short loc_699FE4
mov	ecx, dword_1855FC0

loc_699FE4:
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	24h
call	eax
test	eax, eax
jz	short loc_69A068
push	0
push	0
push	edi
push	offset byte_146D660
push	0
lea	ecx, [esp+2Ch+var_8]
push	ecx
mov	ecx, eax
call	sub_6B1E10
mov	edi, eax
test	edi, edi
jz	short loc_69A068
mov	ecx, [edi+20h]
call	sub_6AD8D0
mov	ebx, [esp+18h+arg_0]
push	edi
mov	ecx, ebx
call	sub_6FC3A0
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	20h
call	eax
test	eax, eax
jz	short loc_69A061
mov	ecx, [esi+0F0h]
mov	ebp, [esi+20h]
mov	ecx, [ecx+14h]
mov	edx, [ebx+3Ch]
mov	ebx, [ebx+8]
push	0
push	1
push	ebp
push	ecx
push	0
push	edx
push	ebx
push	edi
mov	ecx, eax
call	sub_6AF570
mov	ebx, eax
test	ebx, ebx
jnz	short loc_69A088

loc_69A061:
mov	ecx, edi
call	sub_666B00

loc_69A068:
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_69A07C
mov	edx, [ecx]
mov	eax, [esp+18h+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_69A07C:
xor	eax, eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_69A088:
mov	ecx, [esi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1E8h
call	edx
test	eax, eax
jz	short loc_69A0B8
push	1
push	ecx
mov	edx, esp
push	0
push	esi
push	ebx
push	edi
mov	ecx, eax
mov	dword ptr [edx], 40000h
call	sub_68A1F0
mov	ebp, eax
jmp	short loc_69A0BA

loc_69A0B8:
xor	ebp, ebp

loc_69A0BA:
mov	eax, [esp+18h+arg_4]
push	eax
mov	ecx, ebp
call	sub_6850B0
mov	ecx, [esp+18h+arg_4]
push	ebp
push	ecx
mov	ecx, esi
call	sub_699A10
mov	ecx, ebx
call	sub_666B00
mov	ecx, edi
call	sub_666B00
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_69A0F5
mov	edx, [ecx]
mov	eax, [esp+18h+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_69A0F5:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_699FB0 endp

align 10h



sub_69A110 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	esi, [esp+8+arg_0]
xor	ebp, ebp
push	edi
mov	edi, ecx
mov	[esi+4], ebp
mov	ecx, [esi+0Ch]
cmp	ecx, ebp
jz	short loc_69A12A
call	sub_64A400

loc_69A12A:
mov	[esi+0Ch], ebp
mov	ecx, [esi+8]
cmp	ecx, ebp
jz	short loc_69A139
call	sub_64A400

loc_69A139:
mov	[esi+8], ebp
test	byte ptr [esi+28h], 2
jnz	short loc_69A14E
mov	ecx, [esi+20h]
cmp	ecx, ebp
jz	short loc_69A14E
call	sub_64B3B0

loc_69A14E:
test	byte ptr [esi+28h], 1
mov	[esi+20h], ebp
jnz	short loc_69A163
mov	ecx, [esi+24h]
cmp	ecx, ebp
jz	short loc_69A163
call	sub_64B3B0

loc_69A163:
lea	ecx, [esi+30h]
push	ebp
push	ecx
mov	[esi+24h], ebp
call	sub_683310
cmp	dword ptr [edi+54h], 32h
jnb	short loc_69A187
mov	eax, [edi+4Ch]
mov	[esi], eax
inc	dword ptr [edi+54h]
mov	[edi+4Ch], esi
pop	edi
pop	esi
pop	ebp
retn	4

loc_69A187:
mov	ecx, esi
call	sub_6861E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
pop	ebp
retn	4
sub_69A110 endp

align 10h



sub_69A1B0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+4]
mov	eax, [ecx+48h]
push	edi
cmp	eax, [esi]
jz	short loc_69A1CA
mov	dword ptr [esi+0Ch], 0
mov	edx, [ecx+48h]
mov	[esi], edx

loc_69A1CA:
mov	eax, [esi+0Ch]
lea	eax, [eax+eax*2]
mov	edi, [ecx+eax*4]
test	edi, edi
jnz	short loc_69A1FB
mov	edx, 1
lea	esp, [esp+0]

loc_69A1E0:
add	[esi+0Ch], edx
mov	eax, [esi+0Ch]
cmp	eax, 6
jge	short loc_69A1F7
lea	eax, [eax+eax*2]
mov	edi, [ecx+eax*4]
test	edi, edi
jz	short loc_69A1E0
jmp	short loc_69A1FB

loc_69A1F7:
test	edi, edi
jz	short loc_69A223

loc_69A1FB:
mov	eax, [esi+0Ch]
lea	edx, [eax+eax*2]
cmp	edi, [ecx+edx*4+4]
lea	eax, [ecx+edx*4+4]
jnz	short loc_69A20F
mov	ecx, [edi]
mov	[eax], ecx

loc_69A20F:
mov	eax, [esi+0Ch]
mov	ecx, [edi]
lea	edx, [eax+eax*2]
mov	eax, [esi+4]
mov	[eax+edx*4], ecx
mov	dword ptr [edi], 0

loc_69A223:
mov	eax, [esi+0Ch]
lea	edx, [eax+eax*2]
mov	eax, [esi+4]
cmp	dword ptr [eax+edx*4], 0
lea	eax, [eax+edx*4]
jnz	short loc_69A24D
mov	dword ptr [eax+4], 0
mov	eax, [esi+0Ch]
mov	edx, [esi+4]
lea	ecx, [eax+eax*2]
mov	dword ptr [edx+ecx*4+8], 0

loc_69A24D:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_69A25D
mov	ecx, [esi+4]
push	eax
call	sub_69A110

loc_69A25D:
mov	[esi+8], edi
mov	eax, edi
pop	edi
pop	esi
retn
sub_69A1B0 endp

align 10h



sub_69A270 proc	near
push	esi
push	edi
mov	edi, ecx
mov	edx, [edi+4]
mov	eax, [edx+48h]
cmp	eax, [edi]
jz	short loc_69A28A
mov	dword ptr [edi+0Ch], 0
mov	ecx, [edx+48h]
mov	[edi], ecx

loc_69A28A:
xor	esi, esi
cmp	dword ptr [edi+0Ch], 6
jge	short loc_69A307
push	ebx

loc_69A293:
mov	eax, [edi+0Ch]
lea	ecx, [eax+eax*2]
mov	esi, [edx+ecx*4]
xor	ecx, ecx
test	esi, esi
jz	short loc_69A2B2
mov	ebx, [edi+10h]

loc_69A2A5:
cmp	[esi+3Ch], ebx
jz	short loc_69A2BD
mov	ecx, esi
mov	esi, [esi]
test	esi, esi
jnz	short loc_69A2A5

loc_69A2B2:
inc	eax
cmp	eax, 6
mov	[edi+0Ch], eax
jl	short loc_69A293
jmp	short loc_69A306

loc_69A2BD:
test	ecx, ecx
jnz	short loc_69A2CB
mov	ebx, [esi]
lea	eax, [eax+eax*2]
mov	[edx+eax*4], ebx
jmp	short loc_69A2CF

loc_69A2CB:
mov	edx, [esi]
mov	[ecx], edx

loc_69A2CF:
cmp	dword ptr [esi], 0
jnz	short loc_69A2E1
mov	eax, [edi+0Ch]
mov	edx, [edi+4]
lea	eax, [eax+eax*2]
mov	[edx+eax*4+8], ecx

loc_69A2E1:
mov	eax, [edi+0Ch]
mov	edx, [edi+4]
lea	eax, [eax+eax*2]
cmp	esi, [edx+eax*4+4]
lea	eax, [edx+eax*4+4]
jnz	short loc_69A300
mov	edx, [esi]
test	edx, edx
jnz	short loc_69A2FE
mov	[eax], ecx
jmp	short loc_69A300

loc_69A2FE:
mov	[eax], edx

loc_69A300:
mov	dword ptr [esi], 0

loc_69A306:
pop	ebx

loc_69A307:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_69A317
mov	ecx, [edi+4]
push	eax
call	sub_69A110

loc_69A317:
mov	[edi+8], esi
pop	edi
mov	eax, esi
pop	esi
retn
sub_69A270 endp

align 10h



sub_69A320 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	esi
mov	esi, ecx
lea	eax, [esi+2408h]
lea	ecx, [esp+14h+var_10]
mov	[esp+14h+var_C], eax
mov	[esp+14h+var_10], 0
mov	[esp+14h+var_4], 0
mov	[esp+14h+var_8], 0
call	sub_69A1B0
test	eax, eax
jz	short loc_69A36A

loc_69A355:
push	esi
mov	ecx, eax
call	sub_68EA00
lea	ecx, [esp+14h+var_10]
call	sub_69A1B0
test	eax, eax
jnz	short loc_69A355

loc_69A36A:
mov	eax, [esp+14h+var_8]
pop	esi
test	eax, eax
jz	short loc_69A37D
mov	ecx, [esp+10h+var_C]
push	eax
call	sub_69A110

loc_69A37D:
add	esp, 10h
retn
sub_69A320 endp

align 10h



sub_69A390 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 24h
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+50h]
fld	dword ptr [ebx+68h]
mov	eax, [ebx+4Ch]
fstp	[esp+28h+var_14]
mov	edx, [ebx+54h]
fld	dword ptr [ebx+6Ch]
push	ebp
fstp	[esp+2Ch+var_1C]
mov	ebp, [ebx+48h]
or	dword ptr [ebx+2474h], 1
push	esi
mov	esi, [esp+30h+arg_0]
mov	[esp+30h+var_24], ecx
push	edi
lea	edi, [ebx+40h]
mov	ecx, 0Dh
rep movsd
fld	dword ptr [ebx+90h]
fstp	[esp+34h+var_10]
fld	dword ptr [ebx+94h]
fstp	[esp+34h+var_C]
fld	dword ptr [ebx+98h]
fstp	[esp+34h+var_8]
fld	dword ptr [ebx+9Ch]
fstp	[esp+34h+var_4]
mov	ecx, ebx
mov	[esp+34h+var_18], eax
mov	[esp+34h+var_20], edx
call	sub_68FF50
fld	[esp+34h+var_10]
fld	dword ptr [ebx+90h]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_69A4D6
fld	[esp+34h+var_8]
fld	dword ptr [ebx+98h]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_69A4D6
fld	[esp+34h+var_C]
fld	dword ptr [ebx+94h]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_69A4D6
fld	[esp+34h+var_4]
fld	dword ptr [ebx+9Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69A4D6
mov	ecx, [ebx+88h]
fld	[esp+34h+var_1C]
test	ecx, ecx
jnz	short loc_69A4A7
mov	eax, [esp+34h+var_24]
cmp	eax, [ebx+50h]
jnz	short loc_69A4D4
mov	edx, [esp+34h+var_20]
cmp	edx, [ebx+54h]
jnz	short loc_69A4D4
cmp	ebp, [ebx+48h]
jnz	short loc_69A4D4
mov	eax, [esp+34h+var_18]
cmp	eax, [ebx+4Ch]
jnz	short loc_69A4D4
fld	[esp+34h+var_14]
fld	dword ptr [ebx+68h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69A4D4
fld	st
fld	dword ptr [ebx+6Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_69A4D4

loc_69A4A7:
cmp	ecx, 2
jz	loc_69A564
mov	ecx, [esp+34h+var_24]
cmp	ecx, [ebx+50h]
jnz	short loc_69A4D4
mov	edx, [esp+34h+var_20]
cmp	edx, [ebx+54h]
jnz	short loc_69A4D4
fld	dword ptr [ebx+6Ch]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_69A566
jmp	short loc_69A4D6

loc_69A4D4:
fstp	st

loc_69A4D6:
xor	eax, eax
cmp	[ebx+28h], eax
jbe	loc_69A566
mov	edx, [ebx+24h]
mov	ecx, edx

loc_69A4E6:
cmp	dword ptr [ecx], 0
jz	short loc_69A4FE
inc	eax
add	ecx, 8
cmp	eax, [ebx+28h]
jb	short loc_69A4E6
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	4

loc_69A4FE:
cmp	dword ptr [edx+eax*8+4], 0
jz	short loc_69A566
push	4
lea	ecx, [ebx+2408h]
call	sub_696220
mov	esi, eax
test	esi, esi
jz	short loc_69A566
push	0
mov	ecx, ebx
call	sub_68E580
mov	edi, eax
mov	dword ptr [esi+4], 4
test	edi, edi
jz	short loc_69A531
inc	dword ptr [edi+4]

loc_69A531:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_69A53D
call	sub_64A400

loc_69A53D:
mov	[esi+8], edi
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_69A54C
call	sub_64A400

loc_69A54C:
pop	edi
mov	dword ptr [esi+0Ch], 0
mov	dword ptr [esi+2Ch], offset sub_6BFBF0
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	4

loc_69A564:
fstp	st

loc_69A566:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	4
sub_69A390 endp




sub_69A570 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_4]
movzx	eax, word ptr [esi+8]
add	esi, 4
push	edi
mov	ebp, ecx
mov	[esp+20h+var_14], 0
test	ax, ax
jz	loc_69A674
cmp	byte ptr [esi+9], 0
jz	short loc_69A5A9
mov	ecx, 40h
mov	[esp+20h+arg_4], 5
jmp	short loc_69A5B6

loc_69A5A9:
mov	ecx, 80h
mov	[esp+20h+arg_4], 6

loc_69A5B6:
mov	edx, [esi]
mov	edi, [ebp+28h]
movzx	ecx, cl
mov	[esp+20h+var_C], edx
mov	dl, [esi+7]
mov	[esp+20h+var_10], ecx
mov	cl, [esi+8]
mov	[esp+20h+var_8], ax
mov	al, [esi+6]
or	dl, 80h
mov	[esp+20h+var_6], al
mov	byte ptr [esp+20h+var_4], 0
mov	[esp+20h+var_5], cl
mov	byte ptr [esp+20h+var_4+1], dl
test	edi, edi
jle	short loc_69A610
lea	esp, [esp+0]

loc_69A5F0:
mov	eax, [ebp+24h]
mov	ecx, [eax+edi*8-4]
mov	edx, [ecx]
mov	edx, [edx+0A4h]
lea	eax, [esp+20h+var_14]
push	eax
lea	eax, [esp+24h+var_10]
push	eax
call	edx
dec	edi
test	edi, edi
jg	short loc_69A5F0

loc_69A610:
movzx	eax, byte ptr [esi+8]
cmp	eax, 4
jnb	short loc_69A628
imul	eax, 67Ch
lea	ecx, [eax+ebp+9D4h]
jmp	short loc_69A62A

loc_69A628:
xor	ecx, ecx

loc_69A62A:
mov	eax, [esp+20h+arg_4]
mov	edx, [esi]
push	eax
movzx	eax, byte ptr [esi+6]
push	edx
movzx	edx, word ptr [esi+4]
push	eax
mov	eax, [esp+2Ch+arg_0]
push	edx
push	eax
call	sub_6A7A50
mov	eax, [ebp+2474h]
shr	eax, 1Eh
cmp	eax, 3
jz	short loc_69A659
cmp	eax, 1
jz	short loc_69A6CB

loc_69A659:
mov	ecx, [esp+20h+arg_8]
mov	edx, [esp+20h+arg_4]
push	ecx
push	esi
push	edx
mov	ecx, ebp
call	sub_697010
pop	edi
pop	esi
pop	ebp
add	esp, 14h
retn	0Ch

loc_69A674:
cmp	dword ptr [esi], 0
jz	short loc_69A6CB
movzx	ecx, byte ptr [esi+8]
movzx	ecx, byte ptr [ecx+ebp+27F4h]
add	ecx, 0B5h
imul	ecx, 34h
lea	eax, [esp+20h+arg_4]
push	eax
add	ecx, ebp
call	sub_6831C0
mov	eax, [esp+20h+arg_4]
test	eax, eax
jz	short loc_69A6CB
inc	dword ptr [eax+4]
mov	edi, [esp+20h+arg_4]
mov	ecx, edi
call	sub_64A400
movzx	eax, byte ptr [esi+8]
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+98h]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_64A400

loc_69A6CB:
pop	edi
pop	esi
pop	ebp
add	esp, 14h
retn	0Ch
sub_69A570 endp

align 10h



sub_69A6E0 proc	near
push	ebx
push	ebp
push	esi
mov	ebx, ecx
mov	ebp, [ebx+24A4h]
push	edi
xor	edi, edi
test	ebp, ebp
jbe	short loc_69A719

loc_69A6F2:
mov	eax, [ebx+24A0h]
mov	esi, [eax+edi*4]
test	esi, esi
jz	short loc_69A714
mov	ecx, esi
call	sub_6962E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69A714:
inc	edi
cmp	edi, ebp
jb	short loc_69A6F2

loc_69A719:
lea	esi, [ebx+24A0h]
xor	ecx, ecx
cmp	[esi+4], ecx
jbe	short loc_69A756
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_69A770
mov	eax, [esi]
cmp	eax, ecx
jz	short loc_69A749
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_69A749:
xor	eax, eax
pop	edi
mov	[esi+8], eax
mov	[esi+4], eax
pop	esi
pop	ebp
pop	ebx
retn

loc_69A756:
cmp	[esi+8], ecx
ja	short loc_69A770
push	ecx
push	esi
mov	ecx, esi
call	sub_68F9C0
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
pop	ebp
pop	ebx
retn

loc_69A770:
pop	edi
mov	[esi+4], ecx
pop	esi
pop	ebp
pop	ebx
retn
sub_69A6E0 endp

align 10h



sub_69A780 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+247Ch]
push	esi
xor	esi, esi
test	edx, edx
jbe	short loc_69A802
mov	eax, [ecx+2478h]
push	edi
lea	edi, [ecx+2478h]
mov	ecx, [esp+8+arg_0]
mov	edi, edi

loc_69A7A0:
cmp	[eax], ecx
jz	short loc_69A7B1
inc	esi
add	eax, 4
cmp	esi, edx
jb	short loc_69A7A0
pop	edi
pop	esi
retn	4

loc_69A7B1:
cmp	dword ptr [edi+4], 1
jnz	short loc_69A7C6
push	0
push	edi
mov	ecx, edi
call	sub_683390
pop	edi
pop	esi
retn	4

loc_69A7C6:
mov	eax, [edi]
push	ebx
lea	ebx, ds:0[esi*4]
add	eax, ebx
mov	eax, [eax]
test	eax, eax
jz	short loc_69A7DF
mov	ecx, eax
call	sub_64A400

loc_69A7DF:
mov	ecx, [edi+4]
mov	eax, [edi]
sub	ecx, esi
add	eax, ebx
lea	edx, ds:0FFFFFFFCh[ecx*4]
push	edx
lea	ecx, [eax+4]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [edi+4]
pop	ebx
pop	edi

loc_69A802:
pop	esi
retn	4
sub_69A780 endp

align 10h



sub_69A810 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	edx, [esi+246Ch]
xor	eax, eax
test	edx, edx
jbe	loc_69A8B6
mov	ecx, [esi+2468h]
push	edi
mov	edi, [esp+8+arg_0]
mov	edi, edi

loc_69A830:
cmp	[ecx], edi
jz	short loc_69A841
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_69A830
pop	edi
pop	esi
retn	4

loc_69A841:
mov	ecx, edx
cmp	ecx, 1
jnz	short loc_69A88F
test	dword ptr [esi+2470h], 0FFFFFFFEh
jbe	short loc_69A880
mov	eax, [esi+2468h]
test	eax, eax
jz	short loc_69A876
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+2468h], 0

loc_69A876:
mov	dword ptr [esi+2470h], 0

loc_69A880:
pop	edi
mov	dword ptr [esi+246Ch], 0
pop	esi
retn	4

loc_69A88F:
mov	edx, [esi+2468h]
lea	edx, [edx+eax*4]
sub	ecx, eax
lea	eax, ds:0FFFFFFFCh[ecx*4]
push	eax
lea	ecx, [edx+4]
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+246Ch]
pop	edi

loc_69A8B6:
pop	esi
retn	4
sub_69A810 endp

align 10h



sub_69A8C0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_34=	byte ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
arg_0= dword ptr  4

sub	esp, 60h
push	ebx
push	esi
xor	ebx, ebx
mov	esi, ecx
lea	ecx, [esp+68h+var_54]
mov	[esp+68h+var_60], ebx
mov	[esp+68h+var_5C], ebx
mov	[esp+68h+var_58], ebx
call	sub_68CFB0
lea	ecx, [esp+68h+var_34]
call	sub_64E8E0
fldz
mov	edx, [esi]
fstp	[esp+68h+var_1C]
mov	edx, [edx+20h]
xor	eax, eax
mov	[esp+68h+var_10], ax
lea	eax, [esp+68h+var_60]
push	eax
mov	ecx, esi
mov	[esp+6Ch+var_14], 40000h
mov	byte ptr [esp+6Ch+var_E+1], bl
mov	[esp+6Ch+var_18], ebx
mov	byte ptr [esp+6Ch+var_E], bl
call	edx
mov	esi, [esp+68h+arg_0]
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
push	ebx
push	ebx
push	4
push	0FFFFFFFFh
push	ebx
push	ebx
add	eax, 8
push	eax
lea	ecx, [esp+84h+var_60]
push	ecx
mov	ecx, esi
call	sub_68A810
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+68h+var_60]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
add	esp, 60h
retn	4
sub_69A8C0 endp

align 10h



sub_69A960 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14376F4
test	byte ptr [esi+4], 80h
mov	[esp+8+var_4], esi
jz	short loc_69A9E7
push	ebx
mov	ebx, [esi+5]
test	ebx, ebx
jz	short loc_69A9DD
push	ebp
mov	ebp, [ebx+4]
push	edi
xor	edi, edi
test	ebp, ebp
jbe	short loc_69A9B3

loc_69A987:
mov	eax, [ebx]
mov	esi, [eax+edi*4]
test	esi, esi
jz	short loc_69A9AA
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_69A99C
call	sub_64A430

loc_69A99C:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69A9AA:
inc	edi
cmp	edi, ebp
jb	short loc_69A987
mov	esi, [esp+14h+var_4]

loc_69A9B3:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
pop	edi
pop	ebp
pop	ebx
mov	dword ptr [esi], offset	off_1432C80
pop	esi
pop	ecx
retn

loc_69A9DD:
pop	ebx
mov	dword ptr [esi], offset	off_1432C80
pop	esi
pop	ecx
retn

loc_69A9E7:
mov	dword ptr [esi], offset	off_1432C80
pop	esi
pop	ecx
retn
sub_69A960 endp




sub_69A9F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	6
push	eax
call	nullsub_39
retn	4
sub_69A9F0 endp

align 10h



sub_69AA00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	6
push	eax
call	sub_698890
retn	4
sub_69AA00 endp

align 10h



sub_69AA10 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_34=	byte ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 64h
push	ebx
push	ebp
push	esi
xor	ebp, ebp
mov	esi, ecx
xor	ebx, ebx
lea	ecx, [esp+70h+var_54]
mov	[esp+70h+var_64], ebx
mov	[esp+70h+var_60], ebp
mov	[esp+70h+var_5C], ebp
mov	[esp+70h+var_58], ebp
call	sub_68CFB0
lea	ecx, [esp+70h+var_34]
call	sub_64E8E0
fldz
mov	ecx, [esp+70h+arg_4]
fstp	[esp+70h+var_1C]
push	ecx
xor	eax, eax
lea	edx, [esp+74h+var_60]
push	edx
mov	ecx, esi
mov	[esp+78h+var_14], 40000h
mov	[esp+78h+var_D], bl
mov	[esp+78h+var_18], ebp
mov	[esp+78h+var_10], ax
mov	[esp+78h+var_E], al
call	sub_698890
mov	eax, [esp+70h+var_4]
sub	eax, ebp
jz	loc_69AB0E
sub	eax, 1
jz	short loc_69AAFB
sub	eax, 1
jnz	loc_69AB9B
mov	esi, [esp+70h+arg_0]
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	edx, [esp+70h+var_8]
cmp	edx, ebp
jnz	short loc_69AAAB
mov	ecx, [eax+78h]
mov	eax, [esp+70h+arg_0]
add	ecx, 8
jmp	short loc_69AACA

loc_69AAAB:
mov	eax, [eax+78h]
mov	ecx, [eax+280h]
push	edx
mov	ebx, 2
call	sub_651000
inc	dword ptr [eax+8]
mov	[esp+70h+arg_0], eax
lea	ecx, [esp+70h+arg_0]

loc_69AACA:
mov	ecx, [ecx]
mov	[esp+70h+arg_4], ecx
inc	dword ptr [ecx+8]
test	bl, 2
jz	short loc_69AAE5
add	dword ptr [eax+8], 0FFFFFFFFh
jnz	short loc_69AAE5
mov	ecx, eax
call	sub_650DF0

loc_69AAE5:
lea	ecx, [esp+70h+arg_4]
push	ecx
lea	edx, [esp+74h+var_60]
push	edx
mov	ecx, esi
call	sub_680EA0
jmp	loc_69AB86

loc_69AAFB:
mov	ecx, [esp+70h+arg_0]
lea	eax, [esp+70h+var_60]
push	eax
call	sub_67F300
jmp	loc_69AB9B

loc_69AB0E:
mov	esi, [esp+70h+arg_0]
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	edx, [esp+70h+var_8]
mov	ecx, [eax+78h]
cmp	edx, ebp
jnz	short loc_69AB2F
mov	eax, [esp+70h+arg_0]
add	ecx, 8
jmp	short loc_69AB4B

loc_69AB2F:
mov	ecx, [ecx+280h]
push	edx
mov	ebx, 1
call	sub_651000
add	[eax+8], ebx
mov	[esp+70h+arg_0], eax
lea	ecx, [esp+70h+arg_0]

loc_69AB4B:
mov	ecx, [ecx]
mov	[esp+70h+arg_4], ecx
inc	dword ptr [ecx+8]
test	bl, 1
jz	short loc_69AB66
add	dword ptr [eax+8], 0FFFFFFFFh
jnz	short loc_69AB66
mov	ecx, eax
call	sub_650DF0

loc_69AB66:
mov	edx, [esp+70h+var_C]
push	ebp
push	ebp
push	4
push	0FFFFFFFFh
push	ebp
push	edx
lea	eax, [esp+88h+arg_4]
push	eax
lea	ecx, [esp+8Ch+var_60]
push	ecx
mov	ecx, esi
call	sub_68A810

loc_69AB86:
mov	eax, [esp+70h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_69AB9B
call	sub_650DF0

loc_69AB9B:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+70h+var_60]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebp
pop	ebx
add	esp, 64h
retn	8
sub_69AA10 endp

align 10h



sub_69ABC0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_69ABF6
mov	eax, [esp+4+arg_0]
mov	edx, [eax]
mov	edx, [edx+0Ch]
and	edx, [esi+4]
push	edx
push	eax
call	sub_694120
test	eax, eax
jl	short loc_69ABF6
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [esi+ecx*4+0Ch]
test	eax, eax
jz	short loc_69ABF6
add	eax, 4
pop	esi
retn	4

loc_69ABF6:
xor	eax, eax
pop	esi
retn	4
sub_69ABC0 endp

align 10h



sub_69AC00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	eax, [ebp+0]
push	esi
push	edi
mov	edi, [eax]
mov	eax, [edi+0Ch]
mov	ebx, ecx
mov	esi, [ebx]
mov	[esp+10h+arg_4], eax
test	esi, esi
jz	short loc_69AC5B
mov	ecx, [esi+4]
and	ecx, eax
push	ecx
push	ebp
mov	ecx, ebx
call	sub_6920C0
test	eax, eax
jl	short loc_69AC57
inc	dword ptr [edi+8]
lea	edx, [eax+eax*2+3]
mov	ecx, [esi+edx*4]
add	dword ptr [ecx+8], 0FFFFFFFFh
lea	esi, [esi+edx*4]
jnz	short loc_69AC46
call	sub_650DF0

loc_69AC46:
mov	[esi], edi
mov	eax, [ebp+4]
mov	ecx, [eax]
pop	edi
mov	[esi+4], ecx
pop	esi
pop	ebp
pop	ebx
retn	8

loc_69AC57:
mov	eax, [esp+10h+arg_4]

loc_69AC5B:
mov	edx, [esp+10h+arg_0]
push	eax
push	ebp
push	edx
mov	ecx, ebx
call	sub_698EC0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_69AC00 endp




sub_69AC70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	6
push	eax
call	sub_69AA10
retn	4
sub_69AC70 endp

align 10h



; int __thiscall sub_69AC80(void *, char)
sub_69AC80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_69A960
test	[esp+4+arg_0], 1
jz	short loc_69AC98
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_69AC98:
mov	eax, esi
pop	esi
retn	4
sub_69AC80 endp

align 10h



sub_69ACA0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
test	edx, edx
jnz	loc_69AD69
mov	[edi+23E4h], edx
call	sub_69A6E0
cmp	dword ptr [edi+28h], 0
jz	loc_69AD43
lea	esi, [edi+24h]
or	ebx, 0FFFFFFFFh
lea	ecx, [ecx+0]

loc_69ACD0:
mov	eax, [edi+28h]
mov	ecx, [esi]
mov	ebp, [ecx+eax*8-4]
mov	edx, [ebp+0]
mov	eax, [edx+88h]
mov	ecx, ebp
call	eax
mov	ecx, edi
call	sub_69A320
mov	ecx, ebp
call	sub_67EBA0
mov	ebp, [edi+28h]
dec	ebp
cmp	dword ptr [esi+4], 1
jnz	short loc_69AD0A
push	0
push	esi
mov	ecx, esi
call	sub_693F00
jmp	short loc_69AD3D

loc_69AD0A:
mov	ecx, [esi]
lea	eax, [ecx+ebp*8+4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_69AD1B
call	sub_64A400

loc_69AD1B:
mov	edx, [esi]
mov	ecx, [esi+4]
lea	eax, [edx+ebp*8]
sub	ecx, ebp
lea	edx, ds:0FFFFFFF8h[ecx*8]
push	edx
lea	ecx, [eax+8]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	[esi+4], ebx

loc_69AD3D:
cmp	dword ptr [edi+28h], 0
jnz	short loc_69ACD0

loc_69AD43:
fld	ds:flt_1437720
mov	dword ptr [edi+30h], 0
fstp	dword ptr [edi+12Ch]
or	dword ptr [edi+2474h], 100h
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4

loc_69AD69:
xor	ebx, ebx
cmp	[edi+28h], ebx
jbe	short loc_69AD85
mov	ecx, [edi+24h]
lea	esi, [edi+24h]
mov	eax, ecx

loc_69AD78:
cmp	[eax], edx
jz	short loc_69AD8E
inc	ebx
add	eax, 8
cmp	ebx, [edi+28h]
jb	short loc_69AD78

loc_69AD85:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	4

loc_69AD8E:
mov	eax, [ecx+ebx*8+4]
test	eax, eax
jz	short loc_69AD99
inc	dword ptr [eax+4]

loc_69AD99:
mov	ebp, [ecx+ebx*8+4]
mov	edx, [ebp+0]
mov	eax, [edx+88h]
mov	ecx, ebp
call	eax
mov	ecx, edi
call	sub_69A320
mov	ecx, ebp
call	sub_67EBA0
cmp	dword ptr [esi+4], 1
jnz	short loc_69ADCA
push	0
push	esi
mov	ecx, esi
call	sub_693F00
jmp	short loc_69ADFD

loc_69ADCA:
mov	ecx, [esi]
lea	eax, [ecx+ebx*8+4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_69ADDB
call	sub_64A400

loc_69ADDB:
mov	edx, [esi]
mov	ecx, [esi+4]
lea	eax, [edx+ebx*8]
sub	ecx, ebx
lea	edx, ds:0FFFFFFF8h[ecx*8]
push	edx
lea	ecx, [eax+8]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]

loc_69ADFD:
or	dword ptr [edi+2474h], 100h
mov	ecx, ebp
call	sub_64A400
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4
sub_69ACA0 endp

align 10h



sub_69AE20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
lea	esi, [ebx+2Ch]
push	0
mov	ecx, esi
call	sub_652C20
test	eax, eax
jz	loc_69AED1
push	0
mov	ecx, esi
call	sub_652C20
mov	ecx, [edi+30h]
mov	esi, eax
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	edx, [esp+0Ch+arg_8]
mov	edi, eax
mov	eax, [edi+78h]
mov	ecx, [eax+280h]
mov	eax, [edx]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
fild	[esp+0Ch+arg_C]
fldz
mov	[esp+0Ch+arg_0], eax
inc	dword ptr [eax+8]
fcom	qword ptr [esi+40h]
fnstsw	ax
test	ah, 41h
jnz	short loc_69AE99
fstp	qword ptr [esi+40h]
jmp	short loc_69AE9B

loc_69AE99:
fstp	st

loc_69AE9B:
fst	qword ptr [esi+38h]
lea	eax, [esp+0Ch+arg_0]
fadd	qword ptr [esi+40h]
push	eax
push	edi
mov	ecx, esi
fstp	qword ptr [esi+40h]
call	sub_6BEC40
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_69AF6C
call	sub_650DF0
pop	edi
pop	esi
pop	ebx
retn	10h

loc_69AED1:
mov	eax, [ebx+10h]
cmp	eax, 0FFFFFFFFh
jnz	short loc_69AEED
mov	ecx, [ebx+14h]
push	edi
call	sub_654F00
test	eax, eax
jz	short loc_69AEE9
inc	dword ptr [eax+4]

loc_69AEE9:
mov	esi, eax
jmp	short loc_69AF18

loc_69AEED:
push	eax
mov	ecx, edi
call	sub_68E580
test	eax, eax
jz	short loc_69AEFC
inc	dword ptr [eax+4]

loc_69AEFC:
mov	esi, eax
test	eax, eax
jnz	short loc_69AF18
mov	ecx, [ebx+10h]
mov	edx, [esp+0Ch+arg_4]
push	ecx
push	edx
mov	ecx, edi
call	sub_699FB0
mov	esi, eax
test	esi, esi
jz	short loc_69AF6C

loc_69AF18:
mov	eax, [esi]
mov	edx, [eax+0B0h]
mov	ecx, esi
call	edx
cmp	eax, 1Bh
jnz	short loc_69AF49
fild	[esp+0Ch+arg_C]
fldz
fcom	qword ptr [esi+40h]
fnstsw	ax
test	ah, 41h
jnz	short loc_69AF3E
fstp	qword ptr [esi+40h]
jmp	short loc_69AF40

loc_69AF3E:
fstp	st

loc_69AF40:
fst	qword ptr [esi+38h]
fadd	qword ptr [esi+40h]
fstp	qword ptr [esi+40h]

loc_69AF49:
mov	edx, [esp+0Ch+arg_8]
mov	ecx, [edi+30h]
push	edx
lea	eax, [esi+78h]
push	eax
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
push	eax
call	sub_6BE460
add	esp, 0Ch
mov	ecx, esi
call	sub_64A400

loc_69AF6C:
pop	edi
pop	esi
pop	ebx
retn	10h
sub_69AE20 endp

align 10h



sub_69AF80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
mov	[esp+10h+var_C], ecx
mov	[esp+10h+var_10], 0
mov	[esp+10h+var_4], 0
mov	[esp+10h+var_8], 0
mov	edi, edi

loc_69AFA0:
lea	ecx, [esp+10h+var_10]
call	sub_69A1B0
test	eax, eax
jnz	short loc_69AFA0
mov	eax, [esp+10h+var_8]
test	eax, eax
jz	short loc_69AFBE
mov	ecx, [esp+10h+var_C]
push	eax
call	sub_69A110

loc_69AFBE:
add	esp, 10h
retn
sub_69AF80 endp

align 10h



sub_69AFD0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, ecx
mov	ecx, [esp+18h+arg_0]
lea	eax, [esi+2408h]
mov	[esp+18h+var_4], ecx
lea	ecx, [esp+18h+var_14]
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_14], 0
mov	[esp+18h+var_8], 0
mov	[esp+18h+var_C], 0
call	sub_69A270
test	eax, eax
jz	short loc_69B025
lea	ecx, [ecx+0]

loc_69B010:
push	esi
mov	ecx, eax
call	sub_68EA00
lea	ecx, [esp+18h+var_14]
call	sub_69A270
test	eax, eax
jnz	short loc_69B010

loc_69B025:
mov	eax, [esp+18h+var_C]
pop	esi
test	eax, eax
jz	short loc_69B03E
mov	ecx, [esp+14h+var_10]
add	esp, 14h
mov	[esp+arg_0], eax
jmp	sub_69A110

loc_69B03E:
add	esp, 14h
retn	4
sub_69AFD0 endp

align 10h



sub_69B050 proc	near

var_6C=	dword ptr -6Ch
var_68=	qword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_24=	byte ptr -24h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 6Ch
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	ebp
push	esi
push	edi
mov	[esp+7Ch+var_6C], ebx
call	edx
mov	edi, eax
mov	eax, [ebx+2474h]
shr	eax, 0Ch
test	al, 1
jz	loc_69B275
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
lea	esi, [edi+78h]
jnz	loc_69B275
mov	eax, ecx
xor	ebx, ebx
mov	[esp+7Ch+var_54], bl
mov	ecx, [eax+2ACh]
mov	edx, [ecx+10h]
lea	ebp, [esp+7Ch+var_54]
push	ebp
add	eax, 74h
add	ecx, 10h
push	eax
mov	eax, [edx+2Ch]
push	esi
call	eax
mov	ebp, [esp+7Ch+arg_0]
test	al, al
jz	loc_69B25F
push	edi
lea	ecx, [esp+80h+var_54]
call	sub_652C20
cmp	eax, ebx
jz	loc_69B25F
mov	esi, [esi]
mov	edx, [eax+10h]
mov	edx, [edx+10h]
lea	ecx, [eax+10h]
lea	eax, [esp+7Ch+var_44]
push	eax
add	esi, 22Ch
push	esi
push	edi
mov	[esp+88h+var_44], bl
call	edx
test	al, al
jz	loc_69B256
push	edi
lea	eax, [esp+80h+var_60]
push	eax
lea	ecx, [esp+84h+var_44]
call	sub_652DC0
mov	ecx, [esp+7Ch+var_60]
cmp	ecx, ebx
jz	loc_69B22E
mov	ecx, ebp
mov	[esp+7Ch+arg_0], ecx
fild	[esp+7Ch+arg_0]
mov	[esp+7Ch+var_34], bl
test	ecx, ecx
jge	short loc_69B130
fadd	ds:dbl_15FCE08

loc_69B130:
add	dword ptr [edi+8], 10h
fstp	[esp+7Ch+var_68]
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	esi, [edi+8]
jb	short loc_69B14A
mov	ecx, esi
call	sub_64B530

loc_69B14A:
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_69B15A
fld	[esp+7Ch+var_68]
mov	byte ptr [eax],	3
fstp	qword ptr [eax+4]

loc_69B15A:
mov	edx, [esp+7Ch+arg_4]
fild	[esp+7Ch+arg_4]
test	edx, edx
jge	short loc_69B172
fadd	ds:dbl_15FCE08

loc_69B172:
add	dword ptr [esi], 10h
fstp	[esp+7Ch+var_68]
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_69B187
mov	ecx, esi
call	sub_64B530

loc_69B187:
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_69B197
fld	[esp+7Ch+var_68]
mov	byte ptr [eax],	3
fstp	qword ptr [eax+4]

loc_69B197:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
sar	eax, 4
shl	ecx, 5
lea	eax, [eax+ecx-20h]
push	eax
push	2
push	edi
lea	edx, [esp+88h+var_54]
push	edx
lea	eax, [esp+8Ch+var_34]
push	eax
lea	ecx, [esp+90h+var_24]
call	sub_657730
mov	edi, [esp+7Ch+var_5C]
mov	ecx, [esp+7Ch+var_60]
mov	edx, [ecx]
push	ebx
push	edi
push	eax
mov	eax, [edx+28h]
call	eax
lea	ecx, [esp+7Ch+var_24]
call	sub_64B830
mov	ecx, [esi]
lea	edx, [ecx-20h]
cmp	edx, [esi+4]
jnb	short loc_69B20F
mov	edi, 2
lea	ebx, [ebx+0]

loc_69B1F0:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_69B208
mov	ecx, esi
call	sub_64B660

loc_69B208:
sub	edi, 1
jnz	short loc_69B1F0
jmp	short loc_69B221

loc_69B20F:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h

loc_69B221:
lea	ecx, [esp+7Ch+var_34]
call	sub_652830
mov	ecx, [esp+7Ch+var_60]

loc_69B22E:
test	[esp+7Ch+var_58], 2
jnz	short loc_69B23E
cmp	ecx, ebx
jz	short loc_69B23E
call	sub_64B3B0

loc_69B23E:
test	[esp+7Ch+var_58], 1
mov	[esp+7Ch+var_60], ebx
jnz	short loc_69B256
mov	ecx, [esp+7Ch+var_5C]
cmp	ecx, ebx
jz	short loc_69B256
call	sub_64B3B0

loc_69B256:
lea	ecx, [esp+7Ch+var_44]
call	sub_652830

loc_69B25F:
lea	ecx, [esp+7Ch+var_54]
call	sub_652830
mov	ebx, [esp+7Ch+var_6C]
mov	esi, [esp+7Ch+arg_4]
jmp	short loc_69B29B

loc_69B275:
mov	ebp, [esp+7Ch+arg_0]
mov	esi, [esp+7Ch+arg_4]
lea	eax, [ebp+ebp*8+0]
cmp	esi, [ebx+eax*4+950h]
jz	short loc_69B29B
push	esi
push	ebp
push	ebx
call	sub_6C2F70
add	esp, 0Ch

loc_69B29B:
lea	ecx, [ebp+ebp*8+0]
pop	edi
mov	[ebx+ecx*4+950h], esi
pop	esi
pop	ebp
pop	ebx
add	esp, 6Ch
retn	8
sub_69B050 endp




sub_69B2B0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
cmp	dword ptr [edi+23DCh], 0
jz	short loc_69B30F
cmp	dword ptr [edi+30h], 0
jz	short loc_69B30F
mov	ecx, [edi+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	esi
call	edx
mov	eax, [eax+78h]
mov	edx, [esp+8+arg_0]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
mov	esi, eax
inc	dword ptr [esi+8]
mov	ecx, [edi+23DCh]
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], esi
call	sub_69ABC0
add	dword ptr [esi+8], 0FFFFFFFFh
mov	edi, eax
jnz	short loc_69B308
mov	ecx, esi
call	sub_650DF0

loc_69B308:
pop	esi
mov	eax, edi
pop	edi
retn	4

loc_69B30F:
xor	eax, eax
pop	edi
retn	4
sub_69B2B0 endp

align 10h



sub_69B320 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	edi
mov	edi, ecx
test	ebx, ebx
jz	short loc_69B352
push	esi
mov	esi, [edi+4]
lea	eax, [esi+ebx]
push	eax
push	edi
call	sub_6572D0
imul	esi, 9Ch
mov	ecx, [esp+0Ch+arg_0]
add	esi, [edi]
push	ecx
push	ebx
push	esi
call	sub_657110
add	esp, 0Ch
pop	esi

loc_69B352:
pop	edi
pop	ebx
retn	8
sub_69B320 endp

align 10h



sub_69B360 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
xor	eax, eax
mov	ecx, 1
mov	[esi+4], ecx
mov	dword ptr [esi], offset	off_1437724
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	eax, 64h
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	eax, [esp+4+arg_0]
mov	[esi+18h], ecx
push	eax
lea	ecx, [esi+20h]
mov	[esi+1Ch], eax
call	sub_694320
mov	al, [esp+4+arg_4]
mov	[esi+4Ch], al
mov	eax, esi
pop	esi
retn	8
sub_69B360 endp

align 10h



sub_69B3B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+20h]
mov	dword ptr [esi], offset	off_1437724
call	sub_694380
lea	ecx, [esi+0Ch]
call	sub_6915E0
lea	ecx, [esi+8]
call	sub_7005E0
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_69B3ED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69B3ED:
mov	eax, esi
pop	esi
retn	4
sub_69B3B0 endp

align 10h



sub_69B400 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, ecx
lea	ecx, [esp+14h+var_4]
call	sub_679E30
mov	esi, [edi+14h]
mov	eax, [esi+24h]
cmp	eax, 1
jz	short loc_69B428
mov	dl, [esp+14h+var_5]
mov	ebx, [esp+14h+var_4]
xor	al, al
jmp	short loc_69B43D

loc_69B428:
lea	eax, [esi+1Ch]
push	eax
lea	ecx, [esp+18h+var_4]
call	sub_67A3D0
mov	ebx, [esi+20h]
mov	dl, [esi+28h]
mov	al, 1

loc_69B43D:
mov	ecx, [edi+10h]
cmp	byte ptr [ecx+68h], 0
jz	short loc_69B44C
test	al, al
jz	short loc_69B450
jmp	short loc_69B4A6

loc_69B44C:
test	al, al
jnz	short loc_69B47F

loc_69B450:
mov	esi, [esp+14h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69B476
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69B476:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 8
retn

loc_69B47F:
test	dl, dl
jnz	short loc_69B490
add	ecx, 2Ch
cmp	byte ptr [ecx],	6
jnz	short loc_69B490
call	sub_652060

loc_69B490:
mov	edx, [edi+18h]
mov	eax, [edi+10h]
push	ebx
lea	ecx, [esp+18h+var_4]
push	ecx
mov	ecx, [edi+0Ch]
push	edx
push	eax
call	sub_69AE20

loc_69B4A6:
mov	esi, [esp+14h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69B4CC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69B4CC:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn
sub_69B400 endp

align 10h



sub_69B4E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
push	ebx
push	ebp
push	esi
mov	ebp, ecx
push	edi
lea	ecx, [esp+24h+var_14]
call	sub_679E30
mov	ebx, [esp+24h+arg_0]
lea	esi, [ebx+0Ch]
mov	ecx, esi
mov	[esp+24h+var_10], 0
call	sub_679930
mov	edi, [esp+24h+arg_4]
test	eax, eax
jz	loc_69B5D8
push	esi
lea	ecx, [esp+28h+var_8]
mov	[esp+28h+var_C], 4
call	sub_67AF90
mov	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_4]
call	sub_67AF90
lea	ecx, [esp+24h+arg_0]
call	sub_679E30
lea	ecx, [esp+24h+var_C]
push	ecx
lea	edx, [esp+28h+arg_0]
push	edx
mov	ecx, edi
call	sub_6FC480
mov	eax, [esp+24h+arg_0]
and	eax, 0FFFFFFFCh
push	0
add	eax, 8
push	eax
mov	ecx, edi
call	sub_6FC3E0
mov	esi, eax
test	esi, esi
jz	short loc_69B5A9
cmp	byte ptr [ebx+2Ch], 6
jnz	short loc_69B58F
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+var_14]
push	ecx
push	esi
call	sub_68F840
add	esp, 0Ch
test	al, al
jnz	short loc_69B5A2
lea	ecx, [ebx+2Ch]
call	sub_652060
jmp	short loc_69B5A2

loc_69B58F:
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+var_14]
push	eax
push	esi
call	sub_68F840
add	esp, 0Ch

loc_69B5A2:
mov	ecx, esi
call	sub_64A430

loc_69B5A9:
mov	esi, [esp+24h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69B5CF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69B5CF:
lea	ecx, [esp+24h+var_C]
call	sub_68E410

loc_69B5D8:
mov	ecx, [esp+24h+var_10]
push	ecx
lea	edx, [esp+28h+var_14]
push	edx
push	edi
push	ebx
mov	ecx, ebp
call	sub_69AE20
mov	esi, [esp+24h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69B611
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69B611:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	0Ch
sub_69B4E0 endp

align 10h



sub_69B620 proc	near
push	esi
mov	esi, ecx
call	sub_69AF80
mov	esi, [esi+4Ch]
test	esi, esi
jz	loc_69B6CF
push	ebx
push	ebp
push	edi

loc_69B636:
mov	eax, [esi+34h]
mov	edx, [esi+30h]
mov	ebx, [esi]
mov	ecx, eax
shl	ecx, 4
lea	edi, [ecx+edx-10h]
test	eax, eax
jbe	short loc_69B65F
mov	ebp, eax
lea	ecx, [ecx+0]

loc_69B650:
mov	ecx, edi
call	sub_652830
sub	edi, 10h
sub	ebp, 1
jnz	short loc_69B650

loc_69B65F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+30h]
mov	eax, [eax+30h]
push	edx
call	eax
test	byte ptr [esi+28h], 2
jnz	short loc_69B682
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_69B682
call	sub_64B3B0

loc_69B682:
xor	edi, edi
test	byte ptr [esi+28h], 1
mov	[esi+20h], edi
jnz	short loc_69B699
mov	ecx, [esi+24h]
cmp	ecx, edi
jz	short loc_69B699
call	sub_64B3B0

loc_69B699:
mov	[esi+24h], edi
mov	ecx, [esi+0Ch]
cmp	ecx, edi
jz	short loc_69B6A8
call	sub_64A400

loc_69B6A8:
mov	ecx, [esi+8]
cmp	ecx, edi
jz	short loc_69B6B4
call	sub_64A400

loc_69B6B4:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
mov	esi, ebx
cmp	ebx, edi
jnz	loc_69B636
pop	edi
pop	ebp
pop	ebx

loc_69B6CF:
pop	esi
retn
sub_69B620 endp

align 10h



sub_69B6E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
lea	eax, [edi+edi*8]
lea	ecx, [esi+eax*4+934h]
call	sub_692250
test	al, al
jz	short loc_69B718
mov	ecx, [esp+8+arg_4]
xor	eax, eax
test	ecx, ecx
jz	short loc_69B70F
mov	edx, [ecx]
mov	eax, [edx+15Ch]
call	eax

loc_69B70F:
push	eax
push	edi
mov	ecx, esi
call	sub_69B050

loc_69B718:
pop	edi
pop	esi
retn	8
sub_69B6E0 endp

align 10h



sub_69B720 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
NewValue= dword	ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 2Ch
push	ebp
mov	ebp, [esp+30h+arg_0]
mov	[esp+30h+var_2C], ecx
test	ebp, ebp
jnz	short loc_69B739
xor	al, al
pop	ebp
add	esp, 2Ch
retn	14h

loc_69B739:
push	ebx
push	esi
push	edi
push	0		; Mask
lea	eax, [esp+40h+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+4Ch+var_28]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	edx, [ebp+0]
mov	eax, [edx+70h]
add	esp, 18h
mov	ecx, ebp
mov	[esp+3Ch+var_20], 0
call	eax
mov	ebx, [esp+3Ch+arg_10]
lea	edi, [ebx-1]
mov	[esp+3Ch+var_28], eax
test	edi, edi
jl	short loc_69B7DA
mov	edx, [esp+3Ch+arg_C]
lea	ecx, [edi+edi*2]
lea	esi, [eax+8]
lea	ebp, [edx+ecx*8]
lea	esp, [esp+0]

loc_69B790:
mov	ecx, [esp+3Ch+var_2C]
lea	eax, [esp+3Ch+var_10]
push	eax
push	ebp
mov	[esp+44h+var_10], 0
call	sub_64ABC0
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_69B7B5
mov	ecx, esi
call	sub_64B530

loc_69B7B5:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_69B7C5
lea	edx, [esp+3Ch+var_10]
push	edx
call	sub_652330

loc_69B7C5:
lea	ecx, [esp+3Ch+var_10]
call	sub_652830
dec	edi
sub	ebp, 18h
test	edi, edi
jge	short loc_69B790
mov	ebp, [esp+3Ch+arg_0]

loc_69B7DA:
mov	eax, [esp+3Ch+var_2C]
cmp	dword ptr [eax+23DCh], 0
mov	esi, [esp+3Ch+arg_4]
jz	short loc_69B80A
mov	edi, eax
push	esi
mov	ecx, edi
call	sub_69B2B0
test	eax, eax
jz	short loc_69B80A
push	ebx
lea	ecx, [esp+40h+var_20]
push	ecx
push	eax
push	esi
mov	ecx, edi
call	sub_696A30
jmp	short loc_69B818

loc_69B80A:
push	ebx
lea	edx, [esp+40h+var_20]
push	edx
push	esi
mov	ecx, ebp
call	sub_681040

loc_69B818:
mov	ebp, [esp+3Ch+var_28]
mov	byte ptr [esp+3Ch+arg_0], al
mov	edi, ebx
lea	esi, [ebp+8]
test	ebx, ebx
jbe	short loc_69B84D
lea	esp, [esp+0]

loc_69B830:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_69B848
mov	ecx, esi
call	sub_64B660

loc_69B848:
sub	edi, 1
jnz	short loc_69B830

loc_69B84D:
cmp	byte ptr [esp+3Ch+arg_0], 0
pop	edi
pop	esi
pop	ebx
jz	short loc_69B86F
mov	eax, [esp+30h+arg_8]
test	eax, eax
jz	short loc_69B86F
mov	ecx, [esp+30h+var_2C]
push	eax
lea	eax, [esp+34h+var_20]
push	eax
push	ebp
call	sub_64BBC0

loc_69B86F:
lea	ecx, [esp+30h+var_20]
call	sub_652830
mov	ecx, [esp+30h+NewValue]
push	30000h		; Mask
push	ecx		; NewValue
lea	edx, [esp+38h+arg_10]
push	edx		; CurrentState
call	__controlfp_s
mov	al, byte ptr [esp+3Ch+arg_0]
add	esp, 0Ch
pop	ebp
add	esp, 2Ch
retn	14h
sub_69B720 endp

align 10h



; int __cdecl sub_69B8A0(unsigned int NewValue,	int, int, int, char)
sub_69B8A0 proc	near

var_14=	byte ptr -14h
var_10=	byte ptr -10h
NewValue= dword	ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

sub	esp, 14h
push	esi
mov	esi, [esp+18h+NewValue]
cmp	dword ptr [esi+30h], 0
jnz	short loc_69B8B5
xor	al, al
pop	esi
add	esp, 14h
retn

loc_69B8B5:
push	ebx
push	edi
push	0		; Mask
lea	eax, [esp+24h+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+30h+var_14]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	edi, [esp+38h+arg_4]
add	esp, 18h
cmp	dword ptr [esi+23DCh], 0
mov	[esp+20h+var_10], 0
jz	short loc_69B914
push	edi
mov	ecx, esi
call	sub_69B2B0
test	eax, eax
jz	short loc_69B914
mov	ecx, [esp+20h+arg_C]
lea	edx, [esp+20h+arg_10]
push	edx
push	ecx
lea	edx, [esp+28h+var_10]
push	edx
push	eax
push	edi
mov	ecx, esi
call	sub_696B20
jmp	short loc_69B92C

loc_69B914:
mov	ecx, [esp+20h+arg_C]
lea	eax, [esp+20h+arg_10]
push	eax
push	ecx
mov	ecx, [esi+30h]
lea	edx, [esp+28h+var_10]
push	edx
push	edi
call	sub_67F630

loc_69B92C:
mov	bl, al
test	bl, bl
jz	short loc_69B952
mov	eax, [esp+20h+arg_8]
test	eax, eax
jz	short loc_69B952
mov	ecx, [esi+30h]
mov	edx, [ecx]
push	eax
lea	eax, [esp+24h+var_10]
push	eax
mov	eax, [edx+70h]
call	eax
push	eax
mov	ecx, esi
call	sub_64BBC0

loc_69B952:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	ecx, [esp+20h+NewValue]
push	30000h		; Mask
push	ecx		; NewValue
lea	edx, [esp+28h+var_14]
push	edx		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	edi
mov	al, bl
pop	ebx
pop	esi
add	esp, 14h
retn
sub_69B8A0 endp

align 10h



sub_69B980 proc	near

NewValue= dword	ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+30h], 0
jz	loc_69BA58
push	ebx
push	edi
push	0		; Mask
lea	eax, [esp+28h+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+34h+var_14]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	edi, [esp+3Ch+arg_0]
add	esp, 18h
cmp	dword ptr [esi+23DCh], 0
mov	[esp+24h+var_10], 0
jz	short loc_69B9EF
push	edi
mov	ecx, esi
call	sub_69B2B0
test	eax, eax
jz	short loc_69B9EF
mov	edx, [esp+24h+arg_C]
mov	ecx, [esp+24h+arg_8]
push	edx
push	ecx
lea	edx, [esp+2Ch+var_10]
push	edx
push	eax
push	edi
mov	ecx, esi
call	sub_696B20
jmp	short loc_69BA07

loc_69B9EF:
mov	eax, [esp+24h+arg_C]
mov	ecx, [esp+24h+arg_8]
push	eax
push	ecx
mov	ecx, [esi+30h]
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
call	sub_67F630

loc_69BA07:
mov	bl, al
test	bl, bl
jz	short loc_69BA2D
mov	eax, [esp+24h+arg_4]
test	eax, eax
jz	short loc_69BA2D
mov	ecx, [esi+30h]
mov	edx, [ecx]
push	eax
lea	eax, [esp+28h+var_10]
push	eax
mov	eax, [edx+70h]
call	eax
push	eax
mov	ecx, esi
call	sub_64BBC0

loc_69BA2D:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esp+24h+NewValue]
push	30000h		; Mask
push	ecx		; NewValue
lea	edx, [esp+2Ch+arg_C]
push	edx		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	edi
mov	al, bl
pop	ebx
pop	esi
add	esp, 18h
retn	10h

loc_69BA58:
xor	al, al
pop	esi
add	esp, 18h
retn	10h
sub_69B980 endp

align 10h



sub_69BA70 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi+14h]
cmp	dword ptr [eax+14h], 0
jnz	short loc_69BAC1
mov	ecx, [edi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	esi
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_69BAA1
mov	ecx, [edi+20h]
push	0
push	ecx
mov	ecx, eax
call	sub_69B360
mov	ebx, eax
jmp	short loc_69BAA3

loc_69BAA1:
xor	ebx, ebx

loc_69BAA3:
mov	esi, [edi+14h]
mov	ecx, [esi+14h]
add	esi, 14h
test	ecx, ecx
jz	short loc_69BAB5
call	sub_64A400

loc_69BAB5:
mov	[esi], ebx
mov	edx, [edi+14h]
mov	eax, [edx+14h]
pop	esi
pop	ebx
pop	edi
retn

loc_69BAC1:
mov	eax, [eax+14h]
pop	edi
retn
sub_69BA70 endp

align 10h



sub_69BAD0 proc	near

var_28E= byte ptr -28Eh
var_28D= byte ptr -28Dh
var_28C= dword ptr -28Ch
var_288= dword ptr -288h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_279= byte ptr -279h
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= byte ptr -270h
var_264= byte ptr -264h
arg_0= dword ptr  4

sub	esp, 290h
push	ebx
xor	ebx, ebx
mov	[esp+294h+var_278], ecx
add	ecx, 4
mov	[esp+294h+var_284], ebx
mov	[esp+294h+var_28C], ecx
mov	[esp+294h+var_288], 0FFFFFFFFh
mov	[esp+294h+var_280], ebx
mov	dl, [ecx]
push	ebp
mov	[esp+298h+var_28E], dl
push	esi
mov	eax, 1
and	dl, 80h
push	edi
mov	[esp+2A0h+var_284], eax
mov	[esp+2A0h+var_279], dl
jz	short loc_69BB18
mov	eax, 5
mov	[esp+2A0h+var_284], eax

loc_69BB18:
mov	[esp+2A0h+var_280], ebx
mov	dl, [ecx+eax]
inc	eax
mov	[esp+2A0h+var_28D], dl
mov	[esp+2A0h+var_284], eax
xor	esi, esi
mov	[esp+2A0h+var_280], esi
movzx	dx, byte ptr [ecx+eax+1]
movzx	di, byte ptr [ecx+eax]
shl	dx, 8
or	dx, di
mov	edi, [esp+2A0h+arg_0]
movzx	edx, dx
movzx	edx, dx
add	eax, 2
test	[esp+2A0h+var_28E], 2
mov	[esp+2A0h+var_284], eax
mov	[edi+48h], edx
jz	short loc_69BB88
or	byte ptr [edi+53h], 2
mov	[esp+2A0h+var_280], esi
movzx	dx, byte ptr [ecx+eax+1]
movzx	bp, byte ptr [ecx+eax]
shl	dx, 8
or	dx, bp
movzx	edx, dx
movzx	edx, dx
add	eax, 2
mov	[esp+2A0h+var_284], eax
mov	[edi+4Ch], edx

loc_69BB88:
test	[esp+2A0h+var_28E], 4
jz	short loc_69BBAC
or	byte ptr [edi+53h], 4
lea	eax, [edi+2Ch]
push	eax
lea	ecx, [esp+2A4h+var_28C]
call	sub_6A9DD0
mov	esi, [esp+2A0h+var_280]
mov	eax, [esp+2A0h+var_284]
mov	ecx, [esp+2A0h+var_28C]

loc_69BBAC:
test	[esp+2A0h+var_28E], 8
jz	short loc_69BBD0
or	byte ptr [edi+53h], 8
lea	ecx, [edi+0Ch]
push	ecx
lea	ecx, [esp+2A4h+var_28C]
call	sub_6AA130
mov	esi, [esp+2A0h+var_280]
mov	eax, [esp+2A0h+var_284]
mov	ecx, [esp+2A0h+var_28C]

loc_69BBD0:
test	[esp+2A0h+var_28E], 10h
jz	short loc_69BC1A
or	byte ptr [edi+53h], 10h
cmp	esi, ebx
jz	short loc_69BBE4
inc	eax
mov	[esp+2A0h+var_284], eax

loc_69BBE4:
xor	esi, esi
mov	[esp+2A0h+var_280], esi
movzx	dx, byte ptr [ecx+eax+1]
movzx	bp, byte ptr [ecx+eax]
shl	dx, 8
or	dx, bp
movzx	edx, dx
movzx	edx, dx
mov	[esp+2A0h+var_274], edx
add	eax, 2
mov	[esp+2A0h+var_284], eax
fild	[esp+2A0h+var_274]
fdiv	ds:dbl_15FCCE8
fstp	dword ptr [edi+44h]

loc_69BC1A:
test	[esp+2A0h+var_28E], 20h
jz	short loc_69BC49
cmp	esi, ebx
jz	short loc_69BC2A
inc	eax
mov	[esp+2A0h+var_284], eax

loc_69BC2A:
mov	edx, [esp+2A0h+var_278]
lea	edx, [eax+edx+4]
mov	[edi+58h], edx

loc_69BC35:
xor	esi, esi
mov	[esp+2A0h+var_280], esi
mov	dl, [ecx+eax]
inc	eax
mov	[esp+2A0h+var_284], eax
test	dl, dl
jnz	short loc_69BC35
jmp	short loc_69BC4C

loc_69BC49:
mov	[edi+58h], ebx

loc_69BC4C:
test	[esp+2A0h+var_28E], 40h
jz	short loc_69BC86
cmp	esi, ebx
jz	short loc_69BC5C
inc	eax
mov	[esp+2A0h+var_284], eax

loc_69BC5C:
xor	esi, esi
mov	[esp+2A0h+var_280], esi
movzx	dx, byte ptr [ecx+eax+1]
movzx	bp, byte ptr [ecx+eax]
shl	dx, 8
or	dx, bp
movzx	edx, dx
add	eax, 2
mov	[edi+50h], dx
or	byte ptr [edi+53h], 40h
mov	[esp+2A0h+var_284], eax

loc_69BC86:
test	[esp+2A0h+var_28D], 1
jz	loc_69BD2B
or	byte ptr [edi+53h], 20h
mov	ebp, 3
lea	esi, [esp+2A0h+var_264]
mov	edi, edi

loc_69BCA0:
fld	ds:dword_1577A70
mov	[esi-4], ebx
fldz
mov	dword ptr [esi+8], 1
fxch	st(1)
lea	ecx, [esi+20h]
fst	dword ptr [esi]
fstp	dword ptr [esi+4]
fst	dword ptr [esi+0Ch]
fstp	dword ptr [esi+10h]
fld1
fstp	dword ptr [esi+1Ch]
call	sub_68CFB0
add	esi, 9Ch
sub	ebp, 1
jns	short loc_69BCA0
push	4
lea	eax, [esp+2A4h+var_270]
push	eax
lea	ecx, [esp+2A8h+var_28C]
push	ecx
call	sub_7073A0
mov	ebp, eax
add	esp, 0Ch
cmp	ebp, ebx
jz	short loc_69BD1F
push	ebx
mov	ecx, edi
call	sub_658810
mov	esi, [edi+4]
lea	edx, [esi+ebp]
push	edx
push	edi
mov	ecx, edi
call	sub_6572D0
imul	esi, 9Ch
add	esi, [edi]
lea	eax, [esp+2A0h+var_270]
push	eax
push	ebp
push	esi
call	sub_657110
add	esp, 0Ch

loc_69BD1F:
mov	ecx, [esp+2A0h+var_28C]
mov	eax, [esp+2A0h+var_284]
mov	esi, [esp+2A0h+var_280]

loc_69BD2B:
mov	dl, [esp+2A0h+var_28D]
test	dl, 2
jz	short loc_69BD5A
or	byte ptr [edi+53h], 80h
cmp	esi, ebx
jz	short loc_69BD41
inc	eax
mov	[esp+2A0h+var_284], eax

loc_69BD41:
xor	esi, esi
mov	[esp+2A0h+var_280], esi
mov	cl, [ecx+eax]
inc	eax
cmp	cl, 1
jb	short loc_69BD55
cmp	cl, 0Eh
jbe	short loc_69BD57

loc_69BD55:
mov	cl, 1

loc_69BD57:
mov	[edi+52h], cl

loc_69BD5A:
test	dl, 4
jz	short loc_69BD67
cmp	esi, ebx
jz	short loc_69BD64
inc	eax

loc_69BD64:
xor	esi, esi
inc	eax

loc_69BD67:
xor	ebp, ebp
cmp	[esp+2A0h+var_279], bl
jz	loc_69BE9F
mov	edx, [esp+2A0h+var_278]
mov	ebp, [edx+5]
cmp	ebp, ebx
jnz	loc_69BE9F
cmp	esi, ebx
jz	short loc_69BD87
inc	eax

loc_69BD87:
mov	ecx, dword_1855FC0
add	eax, 2
add	eax, 4
mov	[esp+2A0h+var_280], ebx
mov	[esp+2A0h+var_284], eax
mov	eax, [ecx]
push	edx
mov	edx, [eax+3Ch]
call	edx
mov	edx, [eax]
push	ebx
mov	ecx, eax
mov	eax, [edx+28h]
push	0Ch
call	eax
cmp	eax, ebx
jz	short loc_69BDBF
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	ebp, eax
jmp	short loc_69BDC5

loc_69BDBF:
xor	ebp, ebp
jmp	short loc_69BDC5

loc_69BDC3:
xor	ebx, ebx

loc_69BDC5:
mov	eax, [esp+2A0h+var_284]
cmp	[esp+2A0h+var_280], ebx
jz	short loc_69BDD4
inc	eax
mov	[esp+2A0h+var_284], eax

loc_69BDD4:
mov	ecx, [esp+2A0h+var_28C]
mov	[esp+2A0h+var_280], ebx
movzx	esi, byte ptr [ecx+eax+3]
movzx	edx, byte ptr [ecx+eax+2]
shl	esi, 8
or	esi, edx
movzx	edx, byte ptr [ecx+eax+1]
movzx	ecx, byte ptr [ecx+eax]
shl	esi, 8
or	esi, edx
shl	esi, 8
add	eax, 4
or	esi, ecx
mov	[esp+2A0h+var_284], eax
mov	eax, [esp+2A0h+var_278]
cmp	esi, ebx
jz	loc_69BE9C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+3Ch]
push	eax
call	edx
mov	edx, [eax]
push	ebx
mov	ecx, eax
mov	eax, [edx+28h]
push	14h
call	eax
cmp	eax, ebx
jz	short loc_69BE4C
xor	ecx, ecx
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], cx
mov	[eax+0Ah], cl
mov	[eax+0Ch], cl
mov	[eax+0Dh], cl
mov	byte ptr [eax+0Bh], 0FFh
mov	[eax+10h], ebx
mov	ebx, eax

loc_69BE4C:
push	esi
lea	edx, [esp+2A4h+var_28C]
push	edx
mov	ecx, ebx
call	sub_68F670
mov	esi, [ebp+4]
inc	esi
cmp	esi, [ebp+4]
jnb	short loc_69BE6E
mov	eax, [ebp+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_69BE83
push	esi
jmp	short loc_69BE7B

loc_69BE6E:
cmp	esi, [ebp+8]
jb	short loc_69BE83
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_69BE7B:
push	ebp
mov	ecx, ebp
call	sub_68FA50

loc_69BE83:
mov	edx, [ebp+0]
lea	eax, [edx+esi*4-4]
mov	[ebp+4], esi
test	eax, eax
jz	loc_69BDC3
mov	[eax], ebx
jmp	loc_69BDC3

loc_69BE9C:
mov	[eax+5], ebp

loc_69BE9F:
mov	cl, [esp+2A0h+var_28E]
mov	al, cl
shr	al, 1
and	al, 1
and	cl, 1
mov	[edi+54h], ebp
mov	[edi+5Ch], ebx
test	al, al
jz	short loc_69BECE
test	cl, cl
jz	short loc_69BED9
mov	dword ptr [edi+5Ch], 2
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 290h
retn	4

loc_69BECE:
test	cl, cl
jz	short loc_69BED9
mov	dword ptr [edi+5Ch], 1

loc_69BED9:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 290h
retn	4
sub_69BAD0 endp

align 10h



sub_69BEF0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	word ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 3Ch
mov	eax, [esp+3Ch+arg_8]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+4Ch+arg_4]
mov	esi, ecx
mov	cl, [edi+10h]
mov	edx, 1
shl	edx, cl
push	edi
or	[eax], edx
movzx	ebx, byte ptr [edi+10h]
lea	eax, [ebx+ebx*8]
lea	eax, [esi+eax*4]
lea	ecx, [eax+934h]
mov	[esp+50h+arg_4], eax
mov	[esp+50h+var_38], ecx
call	sub_691510
push	0
fld	dword ptr [edi+4]
push	0
fstp	[esp+54h+var_30]
push	ebx
fld	dword ptr [edi+8]
lea	ecx, [esp+58h+var_30]
push	ecx
fstp	[esp+5Ch+var_2C]
mov	ecx, esi
call	sub_6907A0
mov	ebp, eax
mov	[esp+4Ch+var_3C], ebp
test	ebp, ebp
jz	short loc_69BF57
inc	dword ptr [ebp+4]

loc_69BF57:
mov	ecx, [esp+4Ch+var_38]
push	ebp
call	sub_6921A0
cmp	word ptr [edi+0Ch], 0
mov	edx, [esp+4Ch+arg_4]
mov	eax, [edx+940h]
mov	[esp+4Ch+var_34], eax
jz	short loc_69BFD1
mov	edx, [esi+8]
mov	eax, [edx+0Ch]
lea	ecx, [esi+8]
push	1Bh
call	eax
mov	[esp+4Ch+arg_8], eax
test	eax, eax
jz	short loc_69BFD1
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+48h]
push	esi
call	eax
test	al, al
jz	short loc_69BFC8
test	byte ptr [edi+0Fh], 0C0h
jnz	short loc_69BFB8
cmp	word ptr [edi+0Ch], 0
jz	short loc_69BFB8
mov	ecx, [esp+4Ch+var_34]
push	ebp
push	ecx
mov	ecx, [esp+54h+arg_8]
push	esi
call	sub_6B5E90
jmp	short loc_69BFC8

loc_69BFB8:
mov	edx, [esp+4Ch+var_34]
mov	ecx, [esp+4Ch+arg_8]
push	ebp
push	edx
push	esi
call	nullsub_40

loc_69BFC8:
mov	ecx, [esp+4Ch+arg_8]
call	sub_64A430

loc_69BFD1:
cmp	word ptr [edi+0Ch], 0
mov	[esp+4Ch+var_34], 0
jz	short loc_69C00D
test	byte ptr [edi+0Ch], 1
jz	short loc_69C00D
test	byte ptr [edi+0Fh], 0C0h
jnz	short loc_69BFFA
cmp	word ptr [edi+0Ch], 0
jz	short loc_69BFFA
mov	eax, 1
jmp	short loc_69BFFC

loc_69BFFA:
xor	eax, eax

loc_69BFFC:
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, 0FFFFFFF0h
add	eax, 20h
mov	[esp+4Ch+var_34], eax

loc_69C00D:
mov	eax, [esi+28h]
mov	[esp+4Ch+arg_8], eax
test	eax, eax
jle	loc_69C0C3
lea	esp, [esp+0]

loc_69C020:
mov	ecx, [esi+24h]
mov	ebp, [ecx+eax*8-4]
mov	ecx, [esp+4Ch+var_34]
test	ecx, ecx
jz	short loc_69C068
mov	eax, [ebp+0]
xor	edx, edx
mov	[esp+4Ch+var_20], ecx
lea	ecx, [esp+4Ch+var_20]
mov	word ptr [esp+4Ch+var_18], dx
mov	byte ptr [esp+4Ch+var_14+1], dl
mov	byte ptr [esp+4Ch+var_18+2], dl
mov	byte ptr [esp+4Ch+var_14], dl
mov	edx, [eax+0A0h]
push	ecx
mov	ecx, ebp
mov	[esp+50h+var_1C], 0
mov	byte ptr [esp+50h+var_18+3], bl
call	edx
mov	eax, [esp+4Ch+arg_8]

loc_69C068:
mov	ecx, [esp+4Ch+arg_4]
test	byte ptr [ecx+954h], 8
jz	short loc_69C0B2
mov	eax, [ebp+0]
xor	edx, edx
lea	ecx, [esp+4Ch+var_10]
mov	word ptr [esp+4Ch+var_8], dx
mov	byte ptr [esp+4Ch+var_4+1], dl
mov	byte ptr [esp+4Ch+var_8+2], dl
mov	byte ptr [esp+4Ch+var_4], dl
mov	edx, [eax+0A0h]
push	ecx
mov	ecx, ebp
mov	[esp+50h+var_10], 8
mov	[esp+50h+var_C], 0
mov	byte ptr [esp+50h+var_8+3], bl
call	edx
mov	eax, [esp+4Ch+arg_8]

loc_69C0B2:
dec	eax
mov	[esp+4Ch+arg_8], eax
test	eax, eax
jg	loc_69C020
mov	ebp, [esp+4Ch+var_3C]

loc_69C0C3:
mov	eax, [esp+4Ch+arg_4]
test	byte ptr [eax+954h], 8
jz	short loc_69C0EE
mov	eax, [esi+2474h]
shr	eax, 16h
and	eax, 3
cmp	eax, 3
jz	short loc_69C0E6
cmp	eax, 1
jz	short loc_69C0EE

loc_69C0E6:
push	ebx
mov	ecx, esi
call	sub_693810

loc_69C0EE:
test	byte ptr [edi+0Fh], 20h
jz	short loc_69C10A
test	ebp, ebp
jz	short loc_69C10A
movsx	eax, byte ptr [edi+0Eh]
mov	edx, [ebp+0]
mov	edx, [edx+9Ch]
push	eax
mov	ecx, ebp
call	edx

loc_69C10A:
cmp	dword ptr [esi+9D0h], 0
jz	loc_69C249
mov	ecx, [esi+9D0h]
mov	eax, [ecx]
mov	edx, [eax+14h]
call	edx
test	al, al
jnz	loc_69C249
mov	eax, [esp+4Ch+arg_4]
mov	al, [eax+954h]
shr	al, 3
and	al, 1
jnz	short loc_69C14E
cmp	word ptr [edi+0Ch], 0
jnz	short loc_69C14E
test	byte ptr [edi+0Fh], 20h
jz	loc_69C249

loc_69C14E:
mov	edx, [esp+4Ch+arg_0]
mov	ecx, [edx+78h]
cmp	byte ptr [ecx+2B0h], 1
setz	byte ptr [esp+4Ch+arg_4]
test	al, al
jz	short loc_69C174
mov	ecx, [esi+9D0h]
mov	eax, [ecx]
push	ebx
push	edx
mov	edx, [eax+4]
call	edx

loc_69C174:
test	byte ptr [edi+0Fh], 20h
jnz	short loc_69C185
cmp	word ptr [edi+0Ch], 0
jz	loc_69C249

loc_69C185:
fld	dword ptr [edi+4]
push	0
push	1
fstp	[esp+54h+var_28]
fld	dword ptr [edi+8]
push	ebx
lea	eax, [esp+58h+var_28]
fstp	[esp+58h+var_24]
push	eax
mov	ecx, esi
call	sub_6907A0
mov	ebp, eax
test	ebp, ebp
jz	short loc_69C1AD
inc	dword ptr [ebp+4]

loc_69C1AD:
test	byte ptr [edi+0Fh], 20h
jz	short loc_69C1CC
movsx	eax, byte ptr [edi+0Eh]
mov	ecx, [esi+9D0h]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	ebp
push	eax
mov	eax, [esp+54h+arg_0]
push	ebx
push	eax
call	edx

loc_69C1CC:
cmp	word ptr [edi+0Ch], 0
jz	short loc_69C23A
mov	ecx, 1
mov	eax, ecx
mov	[esp+4Ch+arg_8], ecx
mov	[esp+4Ch+var_34], eax

loc_69C1E2:
movzx	edx, word ptr [edi+0Ch]
test	ecx, edx
jz	short loc_69C219
test	byte ptr [edi+0Fh], 0C0h
jnz	short loc_69C204
cmp	word ptr [edi+0Ch], 0
jz	short loc_69C204
mov	ecx, [esi+9D0h]
mov	edx, [ecx]
mov	edx, [edx+8]
jmp	short loc_69C20F

loc_69C204:
mov	ecx, [esi+9D0h]
mov	edx, [ecx]
mov	edx, [edx+0Ch]

loc_69C20F:
push	ebp
push	eax
mov	eax, [esp+54h+arg_0]
push	ebx
push	eax
call	edx

loc_69C219:
cmp	byte ptr [esp+4Ch+arg_4], 0
jz	short loc_69C23A
mov	ecx, [esp+4Ch+arg_8]
mov	eax, [esp+4Ch+var_34]
add	ecx, ecx
movzx	edx, cx
inc	eax
mov	[esp+4Ch+arg_8], ecx
mov	[esp+4Ch+var_34], eax
test	edx, edx
jnz	short loc_69C1E2

loc_69C23A:
test	ebp, ebp
jz	short loc_69C245
mov	ecx, ebp
call	sub_64A400

loc_69C245:
mov	ebp, [esp+4Ch+var_3C]

loc_69C249:
mov	ecx, [esp+4Ch+var_38]
call	sub_692250
test	al, al
jz	short loc_69C272
xor	eax, eax
test	ebp, ebp
jz	short loc_69C269
mov	eax, [ebp+0]
mov	edx, [eax+15Ch]
mov	ecx, ebp
call	edx

loc_69C269:
push	eax
push	ebx
mov	ecx, esi
call	sub_69B050

loc_69C272:
test	byte ptr [edi+0Fh], 0C0h
jnz	loc_69C358
cmp	word ptr [edi+0Ch], 0
jz	loc_69C358
test	byte ptr [edi+0Ch], 1
jz	loc_69C358
movzx	edi, byte ptr [ebx+esi+27F4h]
add	edi, 0B5h
imul	edi, 34h
mov	eax, [edi+esi]
add	edi, esi
mov	[esp+4Ch+arg_4], 0
test	eax, eax
jz	short loc_69C2D8
cmp	dword ptr [eax+4], 0
jz	short loc_69C30F
mov	eax, [eax+4]
mov	[esp+4Ch+arg_4], eax
test	eax, eax
jz	short loc_69C2D8
mov	ecx, [esp+4Ch+arg_4]
mov	eax, 1
add	[ecx+4], eax
add	[ecx+4], eax
call	sub_64A400

loc_69C2D8:
mov	ecx, [esp+4Ch+arg_4]
cmp	ebp, ecx
jz	short loc_69C34B
test	ecx, ecx
jz	short loc_69C32A
mov	edx, [ecx]
mov	eax, [edx+0E0h]
call	eax
test	al, al
jz	short loc_69C32A
test	ebp, ebp
jz	short loc_69C307
mov	edx, [ebp+0]
mov	eax, [edx+0E0h]
mov	ecx, ebp
call	eax
test	al, al
jnz	short loc_69C33F

loc_69C307:
push	1
push	ebx
push	ebp
push	0
jmp	short loc_69C344

loc_69C30F:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_69C322
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_69C322:
mov	dword ptr [edi], 0
jmp	short loc_69C2D8

loc_69C32A:
test	ebp, ebp
jz	short loc_69C34B
mov	edx, [ebp+0]
mov	eax, [edx+0E0h]
mov	ecx, ebp
call	eax
test	al, al
jz	short loc_69C34B

loc_69C33F:
push	1
push	ebx
push	ebp
push	ebp

loc_69C344:
mov	ecx, esi
call	sub_6938C0

loc_69C34B:
mov	ecx, [esp+4Ch+arg_4]
test	ecx, ecx
jz	short loc_69C358
call	sub_64A400

loc_69C358:
mov	ecx, [esp+4Ch+arg_0]
mov	edx, [ecx+78h]
mov	al, [edx+2B0h]
mov	edx, [esp+4Ch+var_38]
dec	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
and	ecx, 0FFFFFFF1h
add	ecx, 10h
push	ecx
push	edx
push	ebx
call	sub_6B8E90
add	esp, 0Ch
test	ebp, ebp
jz	short loc_69C38E
mov	ecx, ebp
call	sub_64A400

loc_69C38E:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn	0Ch
sub_69BEF0 endp

align 10h



sub_69C3A0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20h
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+23C4h]
mov	[esp+2Ch+var_8], eax
mov	[esp+2Ch+var_4], 8
mov	eax, [eax+8]
mov	[esp+2Ch+var_20], eax
mov	ebp, 1
add	[eax+8], ebp
mov	eax, [esp+2Ch+var_8]
mov	eax, [eax+8]
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	[esp+30h+var_18], eax
add	[eax+8], ebp
mov	eax, [esp+30h+arg_0]
lea	edx, [esp+30h+var_20]
push	edx
push	eax
lea	ecx, [esp+38h+var_8]
push	ecx
mov	[esp+3Ch+var_14], edi
call	sub_668D70
add	esp, 10h
test	al, al
jnz	short loc_69C432
mov	eax, [esp+2Ch+var_18]
cmp	dword ptr [eax+10h], 0
jz	loc_69C695
mov	edx, [esp+2Ch+var_8]
mov	esi, [edx+110h]
add	[esi+8], ebp
mov	eax, [esp+2Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69C429
call	sub_650DF0

loc_69C429:
mov	[esp+2Ch+var_20], esi
jmp	loc_69C53A

loc_69C432:
mov	eax, [esp+2Ch+var_20]
cmp	dword ptr [eax+10h], 5
jb	loc_69C4ED
mov	eax, [eax]
cmp	dword ptr [eax], 6F6F725Fh
jnz	loc_69C4D1
add	eax, 4
cmp	byte ptr [eax],	74h
jnz	short loc_69C4D1
mov	esi, [esp+2Ch+var_8]
lea	ecx, [esp+2Ch+var_20]
add	esi, 110h
call	sub_650650
push	eax
push	5
lea	eax, [esp+34h+var_10]
push	eax
lea	ecx, [esp+38h+var_20]
call	sub_6512A0
push	eax
lea	ecx, [esp+30h+arg_0]
push	ecx
mov	ecx, esi
call	sub_651540
mov	esi, [eax]
add	[esi+8], ebp
mov	eax, [esp+2Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69C4A2
call	sub_650DF0

loc_69C4A2:
mov	eax, [esp+2Ch+arg_0]
mov	ecx, eax
add	eax, 8
mov	[esp+2Ch+var_20], esi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_69C4BB
call	sub_650DF0

loc_69C4BB:
mov	eax, [esp+2Ch+var_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69C4D1
call	sub_650DF0

loc_69C4D1:
mov	edx, [esp+2Ch+var_20]
mov	eax, [edx]
cmp	dword ptr [eax], 76656C5Fh
jnz	short loc_69C4ED
add	eax, 4
cmp	byte ptr [eax],	65h
jnz	short loc_69C4ED
cmp	byte ptr [eax+1], 6Ch
jz	short loc_69C53A

loc_69C4ED:
mov	ecx, [esp+2Ch+var_8]
lea	eax, [esp+2Ch+var_20]
push	eax
lea	edx, [esp+30h+arg_0]
add	ecx, 114h
push	edx
call	sub_651540
mov	esi, [eax]
add	[esi+8], ebp
mov	eax, [esp+2Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69C521
call	sub_650DF0

loc_69C521:
mov	eax, [esp+2Ch+arg_0]
mov	ecx, eax
add	eax, 8
mov	[esp+2Ch+var_20], esi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_69C53A
call	sub_650DF0

loc_69C53A:
mov	esi, [edi+2404h]
add	edi, 2404h
mov	[esp+2Ch+var_1C], 0
test	esi, esi
jz	loc_69C628
mov	ecx, [esp+2Ch+var_20]
mov	eax, [esi+4]
and	eax, [ecx+0Ch]
lea	edx, [esp+2Ch+var_20]
push	eax
push	edx
mov	ecx, edi
call	sub_692130
test	eax, eax
jl	loc_69C628
lea	eax, [eax+eax*2+3]
lea	eax, [esi+eax*4]
test	eax, eax
jz	loc_69C628
mov	esi, [eax+4]
test	esi, esi
jz	loc_69C628
mov	ecx, [esp+2Ch+var_18]
mov	eax, esi
mov	[esp+2Ch+var_1C], eax
lea	esp, [esp+0]

loc_69C5A0:
cmp	[eax], ecx
jz	short loc_69C604
mov	eax, [eax+14h]
mov	[esp+2Ch+var_1C], eax
test	eax, eax
jnz	short loc_69C5A0
mov	eax, [esp+2Ch+var_14]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	1Ch
call	eax
test	eax, eax
jz	loc_69C6C6
cmp	[esp+2Ch+arg_8], 2
setz	cl
movzx	edx, cl
mov	ecx, [esp+2Ch+arg_4]
push	edx
push	ecx
lea	edx, [esp+34h+var_18]
push	edx
mov	ecx, eax
call	sub_68D720
mov	[esp+2Ch+var_1C], eax
test	eax, eax
jz	loc_69C691
mov	ecx, [esi+14h]
mov	[eax+14h], ecx
mov	edx, [esp+2Ch+var_1C]
mov	[esi+14h], edx
jmp	loc_69C691

loc_69C604:
mov	ecx, [esp+2Ch+arg_4]
push	ecx
lea	ecx, [eax+4]
call	sub_652520
mov	eax, [esp+2Ch+var_1C]
cmp	byte ptr [eax+18h], 0
jnz	short loc_69C691
cmp	[esp+2Ch+arg_8], 2
setz	dl
mov	[eax+18h], dl
jmp	short loc_69C691

loc_69C628:
mov	eax, [esp+2Ch+var_14]
mov	ecx, [eax+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	1Ch
call	eax
mov	esi, eax
test	esi, esi
jz	loc_69C6C6
mov	ecx, [esp+2Ch+var_18]
mov	edx, [esp+2Ch+arg_4]
mov	[esi], ecx
mov	eax, [esp+2Ch+var_18]
add	[eax+8], ebp
push	edx
lea	ecx, [esi+4]
call	sub_652330
cmp	[esp+2Ch+arg_8], 2
lea	ecx, [esp+2Ch+var_20]
setz	al
mov	[esi+18h], al
lea	eax, [esp+2Ch+var_10]
push	eax
mov	[esp+30h+var_10], ecx
lea	edx, [esp+30h+var_1C]
mov	dword ptr [esi+14h], 0
push	edi
mov	ecx, edi
mov	[esp+34h+var_1C], esi
mov	[esp+34h+var_C], edx
call	sub_69AC00

loc_69C691:
mov	eax, [esp+2Ch+var_18]

loc_69C695:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69C6A7
call	sub_650DF0

loc_69C6A7:
mov	eax, [esp+2Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69C6BD
call	sub_650DF0

loc_69C6BD:
pop	edi
pop	esi
pop	ebp
add	esp, 20h
retn	0Ch

loc_69C6C6:
mov	[esp+2Ch+var_1C], 0
jmp	short loc_69C691
sub_69C3A0 endp




sub_69C6D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+28h+arg_0]
mov	eax, [ecx+94h]
xor	ebx, ebx
push	edi
cmp	eax, ebx
jnz	short loc_69C6EE
call	sub_658B70

loc_69C6EE:
lea	edi, [esi+2404h]
mov	esi, [edi]
lea	ebp, [eax+0Ch]
mov	[esp+2Ch+var_C], ebp
mov	[esp+2Ch+var_10], edi
cmp	esi, ebx
jz	loc_69C81E
mov	eax, [ebp+0]
mov	ecx, [eax+0Ch]
and	ecx, [esi+4]
push	ecx
push	ebp
mov	ecx, edi
call	sub_692130
cmp	eax, ebx
jl	loc_69C81E
lea	edx, [eax+eax*2+3]
lea	esi, [esi+edx*4]
cmp	esi, ebx
jz	loc_69C81E
mov	esi, [esi+4]
mov	[esp+2Ch+var_8], esi
mov	[esp+2Ch+var_18], ebx
mov	[esp+2Ch+var_14], ebx
cmp	esi, ebx
jz	loc_69C816
mov	ebx, [esp+2Ch+arg_0]
add	ebx, 78h

loc_69C750:
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [ecx]
mov	edi, [ebx]
lea	eax, [esp+2Ch+var_1C+3]
push	eax
mov	eax, [edx+70h]
lea	ebp, [esi+4]
push	ebp
push	esi
mov	byte ptr [esp+38h+var_1C+3], 0
add	edi, 0Ch
call	eax
mov	edx, [edi]
push	eax
mov	ecx, ebx
call	edx
cmp	byte ptr [esi+18h], 0
mov	edi, [esi+14h]
jz	short loc_69C7AB
cmp	[esp+2Ch+var_18], 0
jnz	short loc_69C797
mov	[esp+2Ch+var_18], esi
mov	[esp+2Ch+var_14], esi
mov	dword ptr [esi+14h], 0
jmp	short loc_69C7CD

loc_69C797:
mov	eax, [esp+2Ch+var_14]
mov	[eax+14h], esi
mov	[esp+2Ch+var_14], esi
mov	dword ptr [esi+14h], 0
jmp	short loc_69C7CD

loc_69C7AB:
mov	ecx, ebp
call	sub_652830
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69C7BF
call	sub_650DF0

loc_69C7BF:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69C7CD:
mov	esi, edi
test	edi, edi
jnz	loc_69C750
mov	eax, [esp+2Ch+var_18]
test	eax, eax
jz	short loc_69C80E
cmp	eax, [esp+2Ch+var_8]
jz	short loc_69C81E
mov	ecx, [esp+2Ch+var_C]
lea	eax, [esp+2Ch+var_8]
mov	[esp+2Ch+var_8], ecx
mov	ecx, [esp+2Ch+var_10]
push	eax
lea	edx, [esp+30h+var_18]
push	ecx
mov	[esp+34h+var_4], edx
call	sub_69AC00
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	4

loc_69C80E:
mov	edi, [esp+2Ch+var_10]
mov	ebp, [esp+2Ch+var_C]

loc_69C816:
push	ebp
mov	ecx, edi
call	sub_693FC0

loc_69C81E:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	4
sub_69C6D0 endp

align 10h



sub_69C830 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	edx
mov	edx, [esp+8+arg_0]
push	eax
mov	eax, [ecx+30h]
push	edx
push	eax
call	sub_69B720
retn	10h
sub_69C830 endp




sub_69C850 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_69C8AA
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_69C864:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_69C88D
lea	ecx, [esi+8]
call	sub_696C00
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69C887
call	sub_650DF0

loc_69C887:
mov	dword ptr [esi], 0FFFFFFFEh

loc_69C88D:
add	edi, 1Ch
sub	ebp, 1
jnz	short loc_69C864
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_69C8AA:
pop	ebx
retn
sub_69C850 endp

align 10h



sub_69C8B0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_69C8D2
call	sub_69C850
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_69C8D2:
push	esi
cmp	eax, 8
jnb	short loc_69C8DF
mov	esi, 8
jmp	short loc_69C944

loc_69C8DF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_69C8F2
fadd	ds:flt_15FCC08

loc_69C8F2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_69C944:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, ds:0[esi*8]
sub	edx, esi
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_69C9A4
xor	eax, eax
mov	edi, edi

loc_69C990:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 1Ch
sub	esi, 1
jnz	short loc_69C990

loc_69C9A4:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_69CA19
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_69C9B7

loc_69C9B3:
mov	edi, [esp+1Ch+var_C]

loc_69C9B7:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_69C9F8
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_69ECD0
lea	ecx, [esi+4]
call	sub_696C00
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69C9F2
call	sub_650DF0

loc_69C9F2:
mov	dword ptr [edi], 0FFFFFFFEh

loc_69C9F8:
add	ebx, 1Ch
sub	ebp, 1
jnz	short loc_69C9B3
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_69CA19:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_69C850
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_69C8B0 endp

align 10h



sub_69CA40 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+14h]
mov	eax, [eax+28h]
cmp	eax, 1
mov	eax, [esi+10h]
setz	cl
cmp	byte ptr [eax+68h], 0
push	edi
jz	short loc_69CA70
test	cl, cl
jz	loc_69D07B

loc_69CA66:
mov	al, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn

loc_69CA70:
test	cl, cl
jz	loc_69D07B
cmp	dword ptr [esi+20h], 0
jnz	short loc_69CAB4
mov	eax, [eax+14h]
test	eax, eax
jz	short loc_69CAB4
mov	ecx, [esi+0Ch]
push	ecx
mov	ecx, eax
call	sub_654F20
mov	edi, eax
test	edi, edi
jz	short loc_69CA99
inc	dword ptr [edi+4]

loc_69CA99:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_69CAA5
call	sub_64A400

loc_69CAA5:
mov	eax, edi
mov	[esi+20h], edi
test	eax, eax
jz	short loc_69CA66
mov	eax, [eax+10h]
mov	[esi+24h], eax

loc_69CAB4:
mov	ecx, [esi+0Ch]
push	0
call	sub_68E580
test	eax, eax
jz	short loc_69CA66
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+70h]
call	eax
mov	ecx, [esi+10h]
mov	edi, eax
push	edi
add	ecx, 1Ch
call	sub_652C20
mov	edi, [edi+78h]
cmp	byte ptr [edi+2B0h], 1
mov	ebx, eax
mov	eax, [esi+14h]
mov	ebp, [eax+24h]
setz	[esp+24h+var_11]
mov	[esp+24h+var_C], ebx
test	ebp, ebp
jnz	loc_69CC4D
mov	eax, [esi+10h]
mov	ecx, [eax+14h]
test	ecx, ecx
jz	loc_69CBDF
mov	eax, [esi+20h]
mov	ebp, [eax+20h]
test	ebp, ebp
jz	loc_69CA66
push	ecx
mov	eax, esp
mov	dword ptr [eax], 10001h
mov	edx, [ebp+0]
mov	eax, [edx+5Ch]
lea	ecx, [esp+28h+var_8]
push	ecx
mov	ecx, ebp
call	eax
mov	ecx, eax
call	sub_6AFD80
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [esi+24h]
push	ecx
push	ecx
mov	eax, esp
mov	[eax], edx
mov	ecx, [esp+24h]
mov	eax, [ecx]
mov	edx, [eax+24h]
push	ebp
call	edx
mov	edi, eax
mov	eax, [esi+20h]
mov	ecx, [eax+18h]
mov	[edi+18h], ecx
mov	edx, [esi+20h]
mov	eax, [edx+14h]
mov	[edi+14h], eax
mov	ebx, [esi+20h]
mov	ecx, [ebx+0A0h]
shr	ecx, 0Eh
test	cl, 1
jnz	short loc_69CBA3
mov	eax, [ebx+94h]
test	eax, eax
jnz	short loc_69CB96
mov	ecx, ebx
call	sub_658B70
test	eax, eax
jnz	short loc_69CB96
mov	edx, [ebx]
mov	eax, [edx+6Ch]
mov	ecx, ebx
call	eax
mov	eax, [eax+78h]

loc_69CB96:
mov	edx, [edi]
add	eax, 8
push	eax
mov	eax, [edx+28h]
mov	ecx, edi
call	eax

loc_69CBA3:
mov	ecx, [esi+0Ch]
push	ecx
mov	ecx, edi
call	sub_655A10
mov	edx, [ebp+0]
mov	eax, [esi+20h]
mov	edx, [edx+134h]
push	edi
push	eax
mov	ecx, ebp
call	edx
inc	dword ptr [edi+4]
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_69CBCF
call	sub_64A400

loc_69CBCF:
mov	ecx, edi
mov	[esi+20h], edi
call	sub_64A400
mov	ebx, [esp+24h+var_C]
jmp	short loc_69CC08

loc_69CBDF:
mov	eax, [eax+10h]
cmp	eax, 0FFFFFFFFh
jz	short loc_69CC08
mov	ecx, [esi+0Ch]
push	eax
call	sub_68E580
mov	edi, eax
test	edi, edi
jz	short loc_69CBF9
inc	dword ptr [edi+4]

loc_69CBF9:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_69CC05
call	sub_64A400

loc_69CC05:
mov	[esi+20h], edi

loc_69CC08:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_69CC2F
test	ebx, ebx
jz	short loc_69CC2F
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	ecx, [esi+20h]
mov	edx, [ebx]
mov	edx, [edx+30h]
push	0
push	offset aUrlnotfound ; "URLNotFound"
push	ecx
push	eax
mov	ecx, ebx
call	edx

loc_69CC2F:
mov	eax, [esi+10h]
mov	eax, [eax+10h]
cmp	eax, 0FFFFFFFFh
jz	short loc_69CC43
mov	ecx, [esi+0Ch]
push	eax
call	sub_69ACA0

loc_69CC43:
mov	al, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn

loc_69CC4D:
mov	edi, [esi+20h]
test	edi, edi
jz	short loc_69CC72
mov	cl, [edi+76h]
shr	cl, 4
test	cl, 1
jnz	loc_69CA66
mov	ecx, edi
call	sub_6552B0
test	al, al
jnz	loc_69CA66

loc_69CC72:
cmp	byte ptr [esi+28h], 0
jnz	loc_69CE23
mov	eax, [esi+10h]
mov	ecx, [eax+10h]
mov	[esp+24h+var_C], 0
cmp	ecx, 0FFFFFFFFh
jz	short loc_69CCA1
push	ecx
mov	ecx, [esi+0Ch]
call	sub_69ACA0
mov	dword ptr [esi+24h], 40000h
jmp	short loc_69CCB6

loc_69CCA1:
cmp	dword ptr [eax+14h], 0
jz	short loc_69CCB6
mov	eax, [edi+20h]
mov	[esp+24h+var_C], eax
test	eax, eax
jz	loc_69CA66

loc_69CCB6:
mov	edx, [esi+0Ch]
mov	ecx, [edx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1E8h
call	edx
test	eax, eax
jz	short loc_69CCF4
push	1
push	ecx
mov	ecx, [esi+24h]
mov	edx, esp
mov	[edx], ecx
mov	ecx, [esp+2Ch+var_C]
mov	edx, [ebp+1Ch]
mov	edx, [edx+0Ch]
push	ecx
mov	ecx, [esi+0Ch]
push	ecx
push	ebp
push	edx
mov	ecx, eax
call	sub_68A1F0
mov	edi, eax
jmp	short loc_69CCF6

loc_69CCF4:
xor	edi, edi

loc_69CCF6:
cmp	[esp+24h+var_11], 0
jnz	short loc_69CD04
or	dword ptr [edi+0A0h], 4

loc_69CD04:
mov	eax, [esi+10h]
cmp	dword ptr [eax+14h], 0
mov	ecx, edi
jz	short loc_69CD86
mov	edx, [esi+0Ch]
push	edx
call	sub_655A10
mov	eax, [esi+20h]
mov	ecx, [eax+18h]
mov	[edi+18h], ecx
mov	edx, [esi+20h]
mov	eax, [edx+14h]
mov	[edi+14h], eax
mov	eax, [esi+20h]
mov	ecx, [eax+0A0h]
shr	ecx, 0Eh
mov	[esp+24h+var_10], eax
test	cl, 1
jnz	short loc_69CD71
mov	edx, eax
mov	eax, [edx+94h]
test	eax, eax
jnz	short loc_69CD64
mov	ecx, edx
call	sub_658B70
test	eax, eax
jnz	short loc_69CD64
mov	ecx, [esp+24h+var_10]
mov	eax, [ecx]
mov	edx, [eax+6Ch]
call	edx
mov	eax, [eax+78h]

loc_69CD64:
mov	edx, [edi]
add	eax, 8
push	eax
mov	eax, [edx+28h]
mov	ecx, edi
call	eax

loc_69CD71:
mov	ecx, [esp+24h+var_C]
mov	edx, [ecx]
mov	eax, [esi+20h]
mov	edx, [edx+138h]
push	edi
push	eax
call	edx
jmp	short loc_69CDAD

loc_69CD86:
mov	eax, [eax+10h]
push	eax
call	sub_6850B0
mov	ecx, [esi+10h]
mov	edx, [ecx+10h]
mov	ecx, [esi+0Ch]
push	edi
push	edx
call	sub_699A10
mov	eax, [esi+0Ch]
add	eax, 2474h
and	dword ptr [eax], 0FFFFFEFFh

loc_69CDAD:
mov	eax, [edi]
mov	edx, [eax+148h]
push	1
mov	ecx, edi
call	edx
inc	dword ptr [edi+4]
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_69CDCA
call	sub_64A400

loc_69CDCA:
mov	[esi+20h], edi
test	ebx, ebx
jz	short loc_69CE18
mov	ecx, edi
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	ecx, [esi+20h]
mov	edx, [ebx]
mov	edx, [edx+24h]
push	ecx
push	eax
mov	ecx, ebx
mov	[esp+2Ch+var_C], eax
call	edx
mov	eax, [ebp+1Ch]
mov	eax, [eax+80h]
mov	[esi+2Ch], eax
mov	ecx, [ebp+1Ch]
mov	ecx, [ecx+0Ch]
mov	ecx, [ecx+20h]
mov	ecx, [ecx+28h]
mov	edx, [ebx]
mov	edx, [edx+34h]
push	ecx
mov	ecx, [esp+28h+var_C]
push	eax
mov	eax, [esi+20h]
push	eax
push	ecx
mov	ecx, ebx
call	edx

loc_69CE18:
mov	ecx, edi
mov	byte ptr [esi+28h], 1
call	sub_64A400

loc_69CE23:
mov	eax, [ebp+1Ch]
mov	eax, [eax+80h]
cmp	[esi+2Ch], eax
jz	short loc_69CE67
test	ebx, ebx
jz	short loc_69CE67
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
mov	ecx, [ebp+1Ch]
mov	ecx, [ecx+80h]
mov	[esi+2Ch], ecx
mov	edi, [ebp+1Ch]
mov	edi, [edi+0Ch]
mov	edi, [edi+20h]
mov	edi, [edi+28h]
mov	edx, [ebx]
mov	edx, [edx+34h]
push	edi
push	ecx
mov	ecx, [esi+20h]
push	ecx
push	eax
mov	ecx, ebx
call	edx

loc_69CE67:
cmp	[esp+24h+var_11], 0
jz	loc_69CF23
cmp	byte ptr [esi+30h], 0
jnz	loc_69CF23
mov	eax, [ebp+1Ch]
mov	eax, [eax+74h]
test	eax, 100h
jz	loc_69CF23
mov	ecx, [esi+10h]
mov	eax, [ecx+10h]
cmp	eax, 0FFFFFFFFh
jnz	short loc_69CEA5
mov	eax, [esi+20h]
lea	ecx, [eax+78h]
call	sub_661C50
jmp	short loc_69CEAE

loc_69CEA5:
mov	ecx, [esi+0Ch]
push	eax
call	sub_68E580

loc_69CEAE:
test	eax, eax
jz	short loc_69CEB5
inc	dword ptr [eax+4]

loc_69CEB5:
mov	edi, eax
test	edi, edi
jz	short loc_69CF14
mov	edx, [edi]
mov	eax, [edx+148h]
push	0
mov	ecx, edi
call	eax
mov	eax, [ebp+1Ch]
mov	ecx, [eax+80h]
mov	edx, [ebp+0]
mov	eax, [edx+14h]
mov	[esp+24h+var_C], ecx
mov	ecx, ebp
call	eax
mov	ecx, [esp+24h+var_C]
push	eax
push	ecx
mov	ecx, edi
call	sub_67DBA0
mov	ecx, edi
call	sub_683720
mov	ecx, [esi+0Ch]
call	sub_69A320
test	ebx, ebx
jz	short loc_69CF14
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	edx, [ebx]
push	edi
push	eax
mov	eax, [edx+2Ch]
mov	ecx, ebx
call	eax

loc_69CF14:
mov	byte ptr [esi+30h], 1
test	edi, edi
jz	short loc_69CF23
mov	ecx, edi
call	sub_64A400

loc_69CF23:
mov	eax, [ebp+1Ch]
mov	ecx, [eax+74h]
and	cl, 3
cmp	cl, 2
jb	loc_69D07B
mov	eax, [ebp+1Ch]
mov	edx, [eax+74h]
test	dl, 2
jz	loc_69D027
mov	eax, [esi+10h]
mov	eax, [eax+10h]
cmp	eax, 0FFFFFFFFh
jnz	short loc_69CF71
mov	eax, [esi+20h]
lea	ecx, [eax+78h]
call	sub_661C50
test	eax, eax
jz	short loc_69CF61
inc	dword ptr [eax+4]

loc_69CF61:
mov	ecx, [esi+20h]
push	ecx
mov	ecx, [esi+0Ch]
mov	edi, eax
call	sub_69C6D0
jmp	short loc_69CF83

loc_69CF71:
mov	ecx, [esi+0Ch]
push	eax
call	sub_68E580
test	eax, eax
jz	short loc_69CF81
inc	dword ptr [eax+4]

loc_69CF81:
mov	edi, eax

loc_69CF83:
test	edi, edi
jz	loc_69D071
cmp	[esp+24h+var_11], 0
jnz	short loc_69CF99
and	dword ptr [edi+0A0h], 0FFFFFFFBh

loc_69CF99:
test	ebx, ebx
jz	short loc_69CFB3
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	edx, [ebx]
push	0
push	edi
push	eax
mov	eax, [edx+28h]
mov	ecx, ebx
call	eax

loc_69CFB3:
cmp	byte ptr [esi+30h], 0
jnz	short loc_69D012
mov	edx, [edi]
mov	eax, [edx+148h]
push	0
mov	ecx, edi
call	eax
mov	eax, [ebp+1Ch]
mov	ecx, [eax+80h]
mov	edx, [ebp+0]
mov	eax, [edx+14h]
mov	[esp+24h+var_C], ecx
mov	ecx, ebp
call	eax
mov	ecx, [esp+24h+var_C]
push	eax
push	ecx
mov	ecx, edi
call	sub_67DBA0
mov	ecx, edi
call	sub_683720
mov	ecx, [esi+0Ch]
call	sub_69A320
test	ebx, ebx
jz	short loc_69D012
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	edx, [ebx]
push	edi
push	eax
mov	eax, [edx+2Ch]
mov	ecx, ebx
call	eax

loc_69D012:
mov	ecx, edi
mov	byte ptr [esi+30h], 1
call	sub_64A400
mov	al, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn

loc_69D027:
test	ebx, ebx
jz	short loc_69D071
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
mov	ecx, [ebp+1Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+20h]
mov	edx, [ebx]
cmp	dword ptr [ecx+80h], 4
mov	edx, [edx+30h]
mov	ecx, [esi+20h]
push	0
jnz	short loc_69D066
push	offset aError_2	; "Error"
push	ecx
push	eax
mov	ecx, ebx
call	edx
mov	al, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn

loc_69D066:		; "Canceled"
push	offset aCanceled
push	ecx
push	eax
mov	ecx, ebx
call	edx

loc_69D071:
mov	al, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn

loc_69D07B:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 14h
retn
sub_69CA40 endp

align 10h



sub_69D090 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	edi, [esp+14h+arg_0]
mov	ebp, 1
xor	ebx, ebx
mov	[esi+4], ebp
mov	dword ptr [esi+8], offset off_1437474
mov	dword ptr [esi], offset	off_1437758
mov	dword ptr [esi+8], offset off_1437744
cmp	edi, ebx
jz	short loc_69D0CA
mov	ecx, edi
call	sub_64A420

loc_69D0CA:
fld1
mov	[esi+14h], edi
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	eax, [edi+8]
mov	[esi+20h], eax
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+34h], ebx
lea	eax, [esi+38h]
mov	[eax], eax
mov	[eax+4], eax
fst	dword ptr [esi+6Ch]
fst	dword ptr [esi+68h]
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esi+4Ch], ebx
mov	[esi+48h], ebx
mov	[esi+54h], ebp
mov	[esi+50h], ebp
mov	[esi+64h], ebx
mov	[esi+60h], ebx
mov	[esi+5Ch], ebx
mov	[esi+58h], ebx
mov	[esi+70h], ebx
fstp	dword ptr [esi+74h]
fldz
lea	ecx, [esi+0B0h]
fst	dword ptr [esi+90h]
fst	dword ptr [esi+94h]
fst	dword ptr [esi+98h]
fst	dword ptr [esi+9Ch]
fst	dword ptr [esi+0A0h]
fst	dword ptr [esi+0A4h]
fst	dword ptr [esi+0A8h]
fstp	dword ptr [esi+0ACh]
call	sub_64E8E0
fld	ds:flt_1437488
mov	[esi+0C8h], ebx
mov	[esi+0CCh], ebx
fst	dword ptr [esi+0D0h]
fst	dword ptr [esi+0D4h]
mov	[esi+0E0h], ebx
fst	dword ptr [esi+0D8h]
mov	[esi+0E4h], ebx
fstp	dword ptr [esi+0DCh]
mov	[esi+0E8h], ebx
fldz
mov	[esi+0F0h], ebx
mov	[esi+0F4h], ebx
mov	[esi+0F8h], ebx
mov	[esi+0FCh], ebx
mov	[esi+100h], ebx
mov	[esi+104h], ebx
mov	[esi+108h], ebx
mov	[esi+10Ch], ebx
mov	[esi+118h], ebx
mov	[esi+904h], ebx
mov	[esi+908h], ebx
mov	[esi+92Ch], ebx
mov	[esi+932h], bl
mov	[esi+931h], bl
mov	[esi+930h], bl
mov	byte ptr [esi+933h], 0FFh
lea	eax, [esi+934h]
mov	ecx, 3
mov	dl, 0E0h

loc_69D202:
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
fst	dword ptr [eax+18h]
and	[eax+20h], dl
fst	dword ptr [eax+14h]
mov	[eax+1Ch], ebx
mov	[eax+10h], ebx
mov	[eax+0Ch], ebx
add	eax, 24h
sub	ecx, ebp
jns	short loc_69D202
fstp	st
mov	[esi+9C4h], ebp
mov	[esi+9C8h], ebp
mov	[esi+9CCh], ebx
lea	edi, [esi+9D4h]
mov	[esp+14h+var_4], 3

loc_69D245:
mov	ecx, edi
call	sub_6A7B30
add	edi, 67Ch
sub	[esp+14h+var_4], ebp
jns	short loc_69D245
fldz
mov	ecx, [esp+14h+arg_0]
mov	[esi+23C4h], ebx
mov	[esi+23CCh], bl
mov	[esi+23E4h], ebx
mov	[esi+23E8h], bl
mov	[esi+23E9h], bl
fst	dword ptr [esi+23F0h]
fst	dword ptr [esi+23ECh]
mov	[esi+2404h], ebx
fst	dword ptr [esi+23F8h]
lea	eax, [esi+2410h]
fst	dword ptr [esi+23F4h]
fst	dword ptr [esi+2400h]
fstp	dword ptr [esi+23FCh]
mov	edx, [ecx+8]
mov	ecx, 5

loc_69D2B4:
mov	[eax-4], ebx
mov	[eax], ebx
mov	[eax-8], ebx
add	eax, 0Ch
sub	ecx, ebp
jns	short loc_69D2B4
mov	[esi+2450h], ebp
mov	[esi+2460h], ebp
mov	[esi+2458h], ebp
mov	[esi+2464h], edx
mov	[esi+2454h], ebx
mov	[esi+245Ch], ebx
mov	[esi+2468h], ebx
mov	[esi+246Ch], ebx
mov	[esi+2470h], ebx
mov	[esi+2474h], ebx
mov	[esi+2478h], ebx
mov	[esi+247Ch], ebx
mov	[esi+2480h], ebx
mov	[esi+2484h], ebx
mov	[esi+2488h], ebx
mov	[esi+248Ch], ebx
lea	ebp, [esi+24B0h]
mov	[esi+24A0h], ebx
mov	[esi+24A4h], ebx
mov	[esi+24A8h], ebx
mov	[esp+14h+var_4], 0Fh
lea	edi, [ebp+0Ch]
jmp	short loc_69D350
align 10h

loc_69D350:
mov	[ebp+0], bl
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	ebp
call	eax
fldz
mov	[edi-8], ebx
mov	[edi-4], ebx
mov	[edi], ebx
mov	[edi+4], eax
mov	[edi+8], ebx
mov	[edi+0Ch], ebx
xor	ecx, ecx
mov	[edi+10h], cx
fst	dword ptr [edi+14h]
fst	dword ptr [edi+18h]
add	ebp, 34h
fst	dword ptr [edi+1Ch]
add	edi, 34h
sub	[esp+14h+var_4], 1
fstp	dword ptr [edi-14h]
mov	[edi-10h], bl
jns	short loc_69D350
lea	ecx, [esi+2814h]
call	sub_68D680
fldz
mov	[esi+2844h], ebx
mov	[esi+2848h], ebx
or	dword ptr [esi+2474h], 40180h
fstp	dword ptr [esi+128h]
fld	ds:flt_1437720
mov	ecx, [esi+20h]
fstp	dword ptr [esi+12Ch]
mov	[esi+280Ch], ebx
mov	[esi+2808h], ebx
mov	[esi+2804h], ebx
mov	[esi+120h], ebx
mov	[esi+124h], ebx
mov	[esi+130h], ebx
mov	[esi+2838h], ebx
mov	[esi+2840h], ebx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	34h
call	eax
mov	edi, eax
mov	ebp, 1
cmp	edi, ebx
jz	short loc_69D45E
mov	dword ptr [edi], offset	off_155F500
mov	[edi+4], ebp
mov	dword ptr [edi+8], offset off_1437474
mov	dword ptr [edi+10h], offset off_143F300
mov	dword ptr [edi], offset	off_14376F0
mov	dword ptr [edi+8], offset off_14376DC
mov	dword ptr [edi+10h], offset off_14376D4
mov	[edi+14h], ebx
push	ebx		; int
lea	ecx, [edi+1Ch]	; lpCriticalSection
mov	[edi+18h], ebx
call	sub_64D6D0
mov	ecx, [edi+14h]
cmp	ecx, ebx
jz	short loc_69D459
call	sub_64A430

loc_69D459:
mov	[edi+14h], ebx
jmp	short loc_69D460

loc_69D45E:
xor	edi, edi

loc_69D460:
mov	ecx, [esi+0F0h]
cmp	ecx, ebx
jz	short loc_69D46F
call	sub_64A430

loc_69D46F:
mov	[esi+0F0h], edi
mov	[esi+9D0h], ebx
xor	al, al
lea	ecx, [esi+102Ch]

loc_69D483:
mov	[ecx], al
inc	al
add	ecx, 67Ch
cmp	al, 4
jb	short loc_69D483
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	2B8h
call	eax
cmp	eax, ebx
jz	short loc_69D4B9
mov	ecx, [esp+14h+arg_0]
mov	ecx, [ecx+10h]
push	ecx
push	esi
mov	ecx, eax
call	sub_679460
mov	edi, eax
jmp	short loc_69D4BB

loc_69D4B9:
xor	edi, edi

loc_69D4BB:
mov	ecx, [esi+23C4h]
cmp	ecx, ebx
jz	short loc_69D4CA
call	sub_64A400

loc_69D4CA:
mov	[esi+23C4h], edi
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	1Ch
call	eax
cmp	eax, ebx
jz	short loc_69D503
mov	ecx, [esi+23C4h]
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	ecx, [ecx+8]
mov	[eax+14h], ecx
add	[ecx+8], ebp
mov	[eax+18h], ebx
jmp	short loc_69D505

loc_69D503:
xor	eax, eax

loc_69D505:
mov	ecx, [esi+20h]
mov	[esi+23C8h], eax
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	20h
call	eax
cmp	eax, ebx
jz	short loc_69D55D
mov	ecx, [esi+0F0h]
cmp	ecx, ebx
jz	short loc_69D52B
add	ecx, 8
jmp	short loc_69D52D

loc_69D52B:
xor	ecx, ecx

loc_69D52D:
mov	dword ptr [eax], offset	off_155F500
mov	[eax+4], ebp
mov	dword ptr [eax+8], offset off_1437474
mov	dword ptr [eax], offset	off_1437588
mov	dword ptr [eax+8], offset off_1437574
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	[eax+18h], ebx
mov	[eax+1Ch], ecx
mov	edi, eax
jmp	short loc_69D55F

loc_69D55D:
xor	edi, edi

loc_69D55F:
mov	ecx, [esi+10Ch]
cmp	ecx, ebx
jz	short loc_69D56E
call	sub_64A400

loc_69D56E:
fld1
mov	[esi+10Ch], edi
fst	dword ptr [esi+78h]
mov	[esi+23E0h], ebx
fstp	dword ptr [esi+7Ch]
mov	[esi+30h], ebx
fldz
mov	[esi+88h], ebp
fst	dword ptr [esi+84h]
mov	[esi+8Ch], ebx
fstp	dword ptr [esi+80h]
mov	[esi+27F0h], ebp
mov	[esi+27F4h], ebx
mov	[esi+27F8h], ebx
mov	[esi+27FCh], ebx
mov	[esi+2800h], ebx
mov	[esi+24ACh], ebx
mov	[esi+2810h], ebx
call	sub_6B2200
push	ebx
push	3E8h
push	edx
push	eax
call	__aulldiv
fldz
mov	[esi+2490h], eax
mov	[esi+2494h], edx
mov	[esi+2498h], ebx
mov	[esi+249Ch], ebx
fst	dword ptr [esi+0A0h]
fstp	dword ptr [esi+0A4h]
push	ebx
fldz
push	4
fadd	st, st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fst	dword ptr [esi+0A8h]
fstp	dword ptr [esi+0ACh]
mov	ecx, [esi+20h]
mov	[esi+23DCh], ebx
mov	[esi+110h], ebx
mov	[esi+114h], ebx
mov	edx, [ecx]
mov	eax, [edx+28h]
call	eax
cmp	eax, ebx
jz	short loc_69D640
mov	[eax], esi
jmp	short loc_69D642

loc_69D640:
xor	eax, eax

loc_69D642:
mov	ecx, [esi+20h]
mov	[esi+10h], eax
mov	[esi+283Ch], ebx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0A0h
call	eax
cmp	eax, ebx
jz	short loc_69D66A
mov	ecx, eax
call	sub_6B3F30
mov	edi, eax
jmp	short loc_69D66C

loc_69D66A:
xor	edi, edi

loc_69D66C:
mov	ecx, [esi+2844h]
cmp	ecx, ebx
jz	short loc_69D67B
call	sub_64A430

loc_69D67B:
mov	[esi+2844h], edi
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0A0h
call	eax
cmp	eax, ebx
jz	short loc_69D6A0
mov	ecx, eax
call	sub_6B3F30
mov	edi, eax
jmp	short loc_69D6A2

loc_69D6A0:
xor	edi, edi

loc_69D6A2:
mov	ecx, [esi+2848h]
cmp	ecx, ebx
jz	short loc_69D6B1
call	sub_64A430

loc_69D6B1:
fld	ds:flt_1437740
mov	[esi+2848h], edi
pop	edi
fstp	dword ptr [esi+0ECh]
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_69D090 endp

align 10h



sub_69D6D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4
jbe	short loc_69D6DE
mov	eax, 4

loc_69D6DE:
mov	[ecx+9C4h], eax
retn	4
sub_69D6D0 endp

align 10h



sub_69D6F0 proc	near
mov	eax, [ecx+9C4h]
retn
sub_69D6F0 endp

align 10h



sub_69D700 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4
jbe	short loc_69D70E
mov	eax, 4

loc_69D70E:
mov	[ecx+9C8h], eax
retn	4
sub_69D700 endp

align 10h



sub_69D720 proc	near
mov	eax, [ecx+9C8h]
retn
sub_69D720 endp

align 10h



sub_69D730 proc	near
mov	eax, [ecx+8Ch]
retn
sub_69D730 endp

align 10h



sub_69D740 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+930h], eax
retn	4
sub_69D740 endp

align 10h



sub_69D750 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+933h]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fdiv	ds:dbl_15FCCF8
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_69D750 endp

align 10h



sub_69D770 proc	near
mov	eax, [ecx+9CCh]
retn
sub_69D770 endp

align 10h



sub_69D780 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+9CCh], eax
retn	4
sub_69D780 endp

align 10h



sub_69D790 proc	near
sub	ecx, 8
jmp	sub_6A07B0
sub_69D790 endp

align 10h



sub_69D7A0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_69D7B1
or	dword ptr [ecx+2474h], 4
retn	4

loc_69D7B1:
and	dword ptr [ecx+2474h], 0FFFFFFFBh
retn	4
sub_69D7A0 endp

align 10h



sub_69D7C0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_69D7D1
or	dword ptr [ecx+2474h], 40h
retn	4

loc_69D7D1:
and	dword ptr [ecx+2474h], 0FFFFFFBFh
retn	4
sub_69D7C0 endp

align 10h



sub_69D7E0 proc	near
mov	eax, [ecx+0E8h]
test	eax, eax
jz	short loc_69D7EE
add	eax, 8
retn

loc_69D7EE:
xor	eax, eax
retn
sub_69D7E0 endp

align 10h



sub_69D800 proc	near
mov	eax, [ecx+2474h]
shr	eax, 12h
and	eax, 1
retn
sub_69D800 endp

align 10h



; int __stdcall	sub_69D810(float)
sub_69D810 proc	near

var_58=	dword ptr -58h
var_40=	byte ptr -40h
arg_0= dword ptr  4

fld	[esp+arg_0]
sub	esp, 40h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0C8h], 0
fstp	dword ptr [esi+0ECh]
jz	loc_69D8B2
push	ebx
push	ebp
lea	ecx, [esp+4Ch+var_40] ;	void *
call	sub_64F7C0
mov	eax, [esi+8]
mov	edx, [eax+0Ch]
lea	ebx, [esi+8]
push	1
mov	ecx, ebx
call	edx
mov	ebp, eax
test	ebp, ebp
jz	short loc_69D8B0
push	edi
mov	edi, [ebp+0Ch]
test	edi, edi
jz	short loc_69D85C
mov	ecx, edi
call	sub_64A420

loc_69D85C:
mov	ecx, ebp
call	sub_64A430
test	edi, edi
jz	short loc_69D8AF
mov	ecx, edi
call	sub_64A430
lea	eax, [esp+50h+arg_0]
push	eax
mov	ecx, ebx
call	sub_655250
fld	dword ptr [esi+0ECh]
mov	ecx, [eax]
mov	eax, [esi+0C8h]
mov	edx, [ecx]
mov	edx, [edx+60h]
push	0
push	ecx
fstp	[esp+58h+var_58]
push	eax
lea	eax, [esp+5Ch+var_40]
push	eax
add	esi, 90h
push	esi
call	edx
mov	ecx, [esp+50h+arg_0]
test	ecx, ecx
jz	short loc_69D8AF
call	sub_64A430

loc_69D8AF:
pop	edi

loc_69D8B0:
pop	ebp
pop	ebx

loc_69D8B2:
pop	esi
add	esp, 40h
retn	4
sub_69D810 endp

align 10h



sub_69D8C0 proc	near

arg_0= dword ptr  4

fld	dword ptr [ecx+90h]
mov	eax, [esp+arg_0]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [ecx+94h]
fdiv	st, st(1)
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+98h]
fdiv	st, st(1)
fstp	dword ptr [eax+8]
fdivr	dword ptr [ecx+9Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_69D8C0 endp

align 10h



sub_69D900 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [ecx+0A0h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+0A4h]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+0A8h]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0ACh]
fstp	dword ptr [eax+0Ch]
retn	4
sub_69D900 endp

align 10h



sub_69D930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
fld	dword ptr [eax+4]
fstp	[esp+8+arg_0]
fld	dword ptr [eax+8]
fstp	[esp+8+var_8]
fld	dword ptr [eax+0Ch]
fstp	[esp+8+var_4]
fld	dword ptr [eax]
fstp	dword ptr [ecx+0A0h]
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+0A4h]
fld	[esp+8+var_8]
fstp	dword ptr [ecx+0A8h]
fld	[esp+8+var_4]
fstp	dword ptr [ecx+0ACh]
add	esp, 8
retn	4
sub_69D930 endp

align 10h



; int __stdcall	sub_69D980(float)
sub_69D980 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld	[esp+4+arg_0]
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
or	eax, 0C00h
mov	[esp+4+var_4], eax
fldcw	word ptr [esp+4+var_4]
fistp	[esp+4+var_4]
mov	al, byte ptr [esp+4+var_4]
fldcw	word ptr [esp+4+arg_0]
cmp	al, 0FFh
jb	short loc_69D9AF
or	al, 0FFh

loc_69D9AF:
mov	[ecx+933h], al
pop	ecx
retn	4
sub_69D980 endp

align 10h



sub_69D9C0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+0C8h], 0
push	esi
jnz	short loc_69D9F2
mov	ecx, [ebx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	40h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_69D9EA
mov	ecx, esi	; void *
call	sub_64F7C0
jmp	short loc_69D9EC

loc_69D9EA:
xor	esi, esi

loc_69D9EC:
mov	[ebx+0C8h], esi

loc_69D9F2:
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [ebx+0C8h]
mov	ecx, 10h
rep movsd
xor	esi, esi
pop	edi
cmp	[ebx+28h], esi
jbe	short loc_69DA24
lea	esp, [esp+0]

loc_69DA10:
mov	eax, [ebx+24h]
mov	ecx, [eax+esi*8+4]
push	0
call	sub_6554A0
inc	esi
cmp	esi, [ebx+28h]
jb	short loc_69DA10

loc_69DA24:
pop	esi
pop	ebx
retn	4
sub_69D9C0 endp

align 10h



sub_69DA30 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+0CCh], 0
push	esi
jnz	short loc_69DA62
mov	ecx, [ebx+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	40h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_69DA5A
mov	ecx, esi	; void *
call	sub_64F7C0
jmp	short loc_69DA5C

loc_69DA5A:
xor	esi, esi

loc_69DA5C:
mov	[ebx+0CCh], esi

loc_69DA62:
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [ebx+0CCh]
mov	ecx, 10h
rep movsd
xor	esi, esi
pop	edi
cmp	[ebx+28h], esi
jbe	short loc_69DA94
lea	esp, [esp+0]

loc_69DA80:
mov	eax, [ebx+24h]
mov	ecx, [eax+esi*8+4]
push	0
call	sub_6554A0
inc	esi
cmp	esi, [ebx+28h]
jb	short loc_69DA80

loc_69DA94:
pop	esi
pop	ebx
retn	4
sub_69DA30 endp

align 10h



sub_69DAA0 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 5Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+68h+arg_0]
push	edi
lea	eax, [esi+0Ch]
mov	ebp, ecx
push	eax
lea	ecx, [esp+70h+var_58]
call	sub_67AF90
lea	ecx, [esp+6Ch+var_50]
call	sub_679E30
mov	ecx, [esp+6Ch+arg_4]
mov	eax, [ebp+34h]
mov	edx, [ecx+0Ch]
mov	eax, [eax+1Ch]
mov	ecx, [esi+14h]
mov	eax, [eax+14h]
xor	edi, edi
xor	bl, bl
mov	[esp+6Ch+var_48], edi
mov	[esp+6Ch+var_4C], edi
mov	[esp+6Ch+var_44], edx
mov	[esp+6Ch+var_24], eax
mov	[esp+6Ch+var_54], edi
mov	[esp+6Ch+var_3C], edi
cmp	ecx, edi
jz	loc_69DB98
push	ebp
call	sub_654F20
mov	esi, eax
cmp	esi, edi
jz	short loc_69DB09
inc	dword ptr [esi+4]

loc_69DB09:
mov	[esp+6Ch+var_48], esi
cmp	esi, edi
jz	short loc_69DB23
mov	eax, [esi+20h]
mov	[esp+6Ch+var_4C], eax
mov	ecx, esi
cmp	eax, edi
jnz	short loc_69DB77
call	sub_64A400

loc_69DB23:
mov	esi, [esp+6Ch+var_50]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69DB4B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69DB4B:
mov	esi, [esp+6Ch+var_58]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend

loc_69DB58:
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69DB6D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69DB6D:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 5Ch
retn	0Ch

loc_69DB77:
mov	edx, [esi]
mov	eax, [edx+5Ch]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+2Ch]
call	eax
mov	ecx, [esi+10h]
mov	ebx, eax
shr	ebx, 4
and	bl, 1
mov	[esp+6Ch+var_38], ecx
jmp	short loc_69DBF4

loc_69DB98:
mov	edi, [esi+10h]
cmp	edi, 0FFFFFFFFh
jz	short loc_69DB23
push	edi
mov	ecx, ebp
call	sub_68E580
mov	ecx, ebp
test	eax, eax
jz	short loc_69DBB1
push	edi
jmp	short loc_69DBC0

loc_69DBB1:
push	0
call	sub_68E580
test	eax, eax
jz	short loc_69DBDF
push	0
mov	ecx, ebp

loc_69DBC0:
call	sub_68E580
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+5Ch]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+2Ch]
call	eax
mov	ebx, eax
shr	ebx, 4
and	bl, 1

loc_69DBDF:
mov	ecx, [esi+10h]
push	ecx
mov	ecx, ebp
call	sub_69ACA0
mov	[esp+6Ch+var_38], 40000h
xor	edi, edi

loc_69DBF4:
mov	[esp+6Ch+var_30], edi
test	bl, bl
jz	short loc_69DC39
lea	edi, [esp+6Ch+var_58]
lea	esi, [esp+6Ch+var_34]
call	sub_68E3A0
push	eax
lea	ecx, [esp+70h+var_50]
call	sub_67A3D0
mov	esi, [esp+6Ch+var_34]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
add	eax, 0FFFFFFFFh
jnz	short loc_69DC39
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69DC39:
lea	ecx, [esp+6Ch+var_58]
call	sub_679930
test	eax, eax
jz	loc_69DEF7
mov	eax, [esp+6Ch+var_58]
and	eax, 0FFFFFFFCh
cmp	byte ptr [eax+8], 69h
mov	byte ptr [esp+6Ch+var_34], 0
mov	byte ptr [esp+6Ch+var_5C+3], 0
jz	short loc_69DC6B
cmp	byte ptr [eax+8], 49h
jnz	loc_69DE06

loc_69DC6B:
lea	eax, [esp+6Ch+var_40]
push	eax
lea	ecx, [esp+70h+var_58]
call	sub_67B250
push	offset aImg	; "img://"
push	6
push	0
lea	ecx, [esp+78h+var_2C]
push	ecx
lea	ecx, [esp+7Ch+var_40]
call	sub_67B0C0
mov	ecx, eax
call	sub_654870
mov	esi, [esp+6Ch+var_2C]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
mov	bl, al
call	edi ; InterlockedExchangeAdd
add	eax, 0FFFFFFFFh
jnz	short loc_69DCC1
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69DCC1:
test	bl, bl
jz	short loc_69DCCC
mov	byte ptr [esp+6Ch+var_34], 1
jmp	short loc_69DCF9

loc_69DCCC:		; "imgps://"
push	offset aImgps
push	8
push	0
lea	eax, [esp+78h+var_28]
push	eax
lea	ecx, [esp+7Ch+var_40]
call	sub_67B0C0
mov	ecx, eax
call	sub_654870
lea	ecx, [esp+6Ch+var_28]
mov	bl, al
call	sub_4E40F0
test	bl, bl
jz	short loc_69DCFE

loc_69DCF9:
mov	byte ptr [esp+6Ch+var_5C+3], 1

loc_69DCFE:
mov	esi, [esp+6Ch+var_40]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
add	eax, 0FFFFFFFFh
jnz	short loc_69DD20
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69DD20:
cmp	byte ptr [esp+6Ch+var_5C+3], 0
jz	loc_69DE06
mov	ecx, [ebp+0F0h]
mov	edx, [ecx+8]
mov	eax, [edx+0Ch]
add	ecx, 8
push	5
call	eax
mov	ecx, [ebp+20h]
mov	edi, [esp+6Ch+var_44]
mov	esi, eax
mov	eax, [esp+6Ch+var_58]
push	ecx
and	eax, 0FFFFFFFCh
push	edi
add	eax, 8
push	esi
push	eax
call	sub_704250
mov	ebx, eax
add	esp, 10h
test	ebx, ebx
jz	short loc_69DD8F
mov	eax, [esp+6Ch+var_58]
mov	ecx, [esp+6Ch+arg_4]
mov	edx, [esp+6Ch+var_34]
push	ecx
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	edx
push	ebx
mov	ecx, ebp
call	sub_68E5B0
mov	edi, eax
mov	ecx, ebx
mov	[esp+6Ch+var_54], edi
call	sub_666B00
jmp	short loc_69DDB3

loc_69DD8F:
test	edi, edi
jz	short loc_69DDAF
mov	eax, [esp+6Ch+var_58]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	offset aLoadmovieimage ; "LoadMovieImageCallback failed	to load	i"...
add	edi, 0Ch
push	edi
call	sub_68FAE0
add	esp, 0Ch

loc_69DDAF:
mov	edi, [esp+6Ch+var_54]

loc_69DDB3:
test	esi, esi
jz	short loc_69DDBE
mov	ecx, esi
call	sub_64A430

loc_69DDBE:
test	edi, edi
jz	loc_69E098
mov	ecx, [ebp+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	1E8h
call	eax
mov	esi, [esp+6Ch+var_4C]
test	eax, eax
jz	loc_69E08F
push	1
push	ecx
mov	ecx, [esp+74h+var_38]
mov	edx, esp
push	esi
mov	[edx], ecx
mov	edx, [edi+1Ch]
mov	edx, [edx+0Ch]
push	ebp
push	edi
push	edx
mov	ecx, eax
call	sub_68A1F0
mov	ebx, eax
jmp	loc_69DF4B

loc_69DE06:
mov	esi, [esp+6Ch+var_24]
mov	eax, [esp+6Ch+arg_0]
or	esi, 10001h
cmp	byte ptr [eax+18h], 0
jz	short loc_69DE20
or	esi, 200000h

loc_69DE20:
lea	ecx, [esp+6Ch+var_50]
call	sub_679930
mov	ebx, [esp+6Ch+arg_8]
test	eax, eax
jbe	short loc_69DE6C
push	ebx
lea	ecx, [esp+70h+var_50]
push	ecx
push	3
lea	ecx, [esp+78h+var_18]
call	sub_68E2C0
mov	eax, [esp+6Ch+arg_4]
push	0
push	0
push	esi
lea	edx, [esp+78h+var_18]
push	edx
push	eax
call	sub_704640
add	esp, 14h
lea	ecx, [esp+6Ch+var_18]
mov	edi, eax
mov	[esp+6Ch+var_54], eax
call	sub_68E410
test	edi, edi
jnz	short loc_69DEA7

loc_69DE6C:
push	ebx
lea	ecx, [esp+70h+var_58]
push	ecx
push	3
lea	ecx, [esp+78h+var_C]
call	sub_68E2C0
mov	eax, [esp+6Ch+arg_4]
push	0
push	0
push	esi
lea	edx, [esp+78h+var_C]
push	edx
push	eax
call	sub_704640
mov	edi, eax
add	esp, 14h
lea	ecx, [esp+6Ch+var_C]
mov	[esp+6Ch+var_54], edi
call	sub_68E410
test	edi, edi
jz	short loc_69DEBC

loc_69DEA7:
mov	eax, [edi+1Ch]
mov	eax, [eax+0Ch]
mov	eax, [eax+20h]
mov	ecx, [eax+28h]
mov	[esp+6Ch+var_30], ecx
jmp	loc_69DDBE

loc_69DEBC:
mov	ecx, [esp+6Ch+var_44]
test	ecx, ecx
jz	loc_69DDBE
mov	edx, [esp+6Ch+arg_0]
cmp	byte ptr [edx+18h], 0
jnz	loc_69DDBE
mov	eax, [esp+6Ch+var_58]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
add	ecx, 0Ch
push	offset aErrorLoadingUr ; "Error	loading	URL \"%s\"\n"
push	ecx
call	sub_68FAE0
add	esp, 0Ch
jmp	loc_69DDBE

loc_69DEF7:
mov	edi, [ebp+2840h]
test	edi, edi
jz	short loc_69DF41
mov	esi, [esp+6Ch+arg_0]

loc_69DF05:
mov	eax, [edi+10h]
mov	ecx, [eax+3Ch]
cmp	ecx, [esi+3Ch]
jnb	short loc_69DF3A
mov	edx, [esi+10h]
cmp	edx, 0FFFFFFFFh
jz	short loc_69DF24
mov	ecx, [eax+10h]
cmp	ecx, 0FFFFFFFFh
jz	short loc_69DF24
cmp	edx, ecx
jmp	short loc_69DF34

loc_69DF24:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_69DF3A
cmp	dword ptr [eax+14h], 0
jz	short loc_69DF3A
cmp	ecx, [eax+14h]

loc_69DF34:
jnz	short loc_69DF3A
mov	byte ptr [eax+68h], 1

loc_69DF3A:
mov	edi, [edi+4]
test	edi, edi
jnz	short loc_69DF05

loc_69DF41:
mov	edi, [esp+6Ch+var_54]
mov	ebx, edi

loc_69DF47:
mov	esi, [esp+6Ch+var_4C]

loc_69DF4B:
mov	edx, [esp+6Ch+arg_0]
mov	eax, [edx+10h]
test	ebx, ebx
setnz	byte ptr [esp+6Ch+arg_4]
cmp	eax, 0FFFFFFFFh
jnz	loc_69E0A1
test	ebx, ebx
jnz	short loc_69DFA4
push	ecx
mov	eax, esp
mov	dword ptr [eax], 10001h
mov	edx, [esi]
lea	eax, [esp+70h+var_20]
push	eax
mov	eax, [edx+5Ch]
mov	ecx, esi
call	eax
mov	ecx, eax
call	sub_6AFD80
mov	ecx, [esp+64h+var_14]
mov	edx, [esp+64h+var_30]
push	ecx
push	ecx
mov	eax, esp
mov	[eax], edx
mov	ecx, [esp+6Ch+var_18]
mov	eax, [ecx]
mov	edx, [eax+24h]
push	esi
call	edx
mov	ebx, eax
test	ebx, ebx
jz	short loc_69E016

loc_69DFA4:
push	ebp
mov	ecx, ebx
call	sub_655A10
mov	edi, [esp+6Ch+var_48]
mov	eax, [edi+18h]
mov	[ebx+18h], eax
mov	ecx, [edi+14h]
mov	[ebx+14h], ecx
mov	edx, [edi+0A0h]
shr	edx, 0Eh
test	dl, 1
jnz	short loc_69DFF8
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_69DFEB
mov	ecx, edi
call	sub_658B70
test	eax, eax
jnz	short loc_69DFEB
mov	eax, [edi]
mov	edx, [eax+6Ch]
mov	ecx, edi
call	edx
mov	eax, [eax+78h]

loc_69DFEB:
mov	edx, [ebx]
add	eax, 8
push	eax
mov	eax, [edx+28h]
mov	ecx, ebx
call	eax

loc_69DFF8:
mov	edx, [esi]
mov	eax, [edx+138h]
push	ebx
push	edi
mov	ecx, esi
call	eax
push	ebx
mov	ecx, ebp
call	sub_69C6D0
push	ebp
mov	ecx, ebx
call	sub_683450

loc_69E016:
mov	ecx, [ebp+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
mov	ecx, [esp+6Ch+arg_0]
mov	edi, eax
push	edi
add	ecx, 1Ch
call	sub_652C20
cmp	byte ptr [esp+6Ch+arg_4], 0
mov	esi, eax
jz	loc_69E138
test	esi, esi
jz	short loc_69E069
mov	edx, [esi]
mov	eax, [edx+24h]
push	ebx
push	edi
mov	ecx, esi
call	eax
mov	eax, [esp+6Ch+var_30]
mov	edx, [esi]
push	eax
push	eax
mov	eax, [edx+34h]
push	ebx
push	edi
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+28h]
push	0
push	ebx
push	edi
mov	ecx, esi
call	eax

loc_69E069:
mov	ecx, ebx
call	sub_683720
mov	ecx, ebp
call	sub_69A320
test	esi, esi
jz	loc_69E162
mov	edx, [esi]
mov	eax, [edx+2Ch]
push	ebx
push	edi
mov	ecx, esi
call	eax
jmp	loc_69E162

loc_69E08F:
xor	eax, eax
mov	ebx, eax
jmp	loc_69DF4B

loc_69E098:
mov	ebx, [esp+6Ch+var_3C]
jmp	loc_69DF47

loc_69E0A1:
test	ebx, ebx
jz	short loc_69E0CF
push	eax
mov	ecx, ebx
call	sub_6850B0
mov	ecx, [esp+6Ch+arg_0]
mov	edx, [ecx+10h]
push	ebx
push	edx
mov	ecx, ebp
call	sub_699A10
and	dword ptr [ebp+2474h], 0FFFFFEFFh
push	ebx
mov	ecx, ebp
call	sub_69C6D0

loc_69E0CF:
cmp	dword ptr [ebp+30h], 0
jnz	loc_69E016
cmp	[esp+6Ch+var_44], 0
jz	loc_69E016
mov	eax, [esp+6Ch+var_44]
add	eax, 0Ch
push	offset a_level0Unloade ; "_level0 unloaded - no	further	playback "...
push	eax
call	sub_68FAE0
add	esp, 8
test	ebx, ebx
jz	short loc_69E104
mov	ecx, ebx
call	sub_64A400

loc_69E104:
test	edi, edi
jz	short loc_69E10F
mov	ecx, edi
call	sub_666B00

loc_69E10F:
mov	ecx, [esp+6Ch+var_48]
test	ecx, ecx
jz	short loc_69E11C
call	sub_64A400

loc_69E11C:
lea	ecx, [esp+6Ch+var_50]
call	sub_4E40F0
lea	ecx, [esp+6Ch+var_58]
call	sub_4E40F0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 5Ch
retn	0Ch

loc_69E138:
test	esi, esi
jz	short loc_69E162
lea	ecx, [esp+6Ch+var_58]
call	sub_679930
mov	edx, [esi]
test	eax, eax
mov	eax, [edx+30h]
push	0
mov	ecx, esi
jz	short loc_69E159
push	offset aUrlnotfound ; "URLNotFound"
jmp	short loc_69E15E

loc_69E159:		; "Unknown error"
push	offset aUnknownError

loc_69E15E:
push	ebx
push	edi
call	eax

loc_69E162:
lea	ecx, [esp+6Ch+var_58]
call	sub_679930
test	eax, eax
jnz	short loc_69E18F
mov	ecx, [esp+6Ch+var_48]
test	ecx, ecx
jz	short loc_69E17C
call	sub_64A400

loc_69E17C:
mov	ecx, [ebp+20h]
push	ecx
mov	ecx, [ebp+14h]
add	ecx, 18h
xor	esi, esi
call	sub_68E470
jmp	short loc_69E193

loc_69E18F:
mov	esi, [esp+6Ch+var_48]

loc_69E193:
test	ebx, ebx
jz	short loc_69E19E
mov	ecx, ebx
call	sub_64A400

loc_69E19E:
mov	ecx, [esp+6Ch+var_54]
test	ecx, ecx
jz	short loc_69E1AB
call	sub_666B00

loc_69E1AB:
test	esi, esi
jz	short loc_69E1B6
mov	ecx, esi
call	sub_64A400

loc_69E1B6:
mov	esi, [esp+6Ch+var_50]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69E1DE
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_69E1DE:
mov	esi, [esp+6Ch+var_58]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh
lea	eax, [esi+4]
push	eax
jmp	loc_69DB58
sub_69DAA0 endp




sub_69E1F0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
push	edi
mov	edi, ecx
cmp	dword ptr [edi+2838h], 0
jz	loc_69E335
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
lea	ebx, [ebx+0]

loc_69E210:
mov	esi, [edi+2838h]
mov	eax, [esi]
mov	[edi+2838h], eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	54h
call	eax
test	eax, eax
jz	short loc_69E259
mov	ecx, [edi+0F0h]
test	ecx, ecx
jz	short loc_69E242
lea	edx, [ecx+8]
jmp	short loc_69E244

loc_69E242:
xor	edx, edx

loc_69E244:
mov	ecx, [edi+34h]
mov	ecx, [ecx+14h]
push	0
push	edx
push	ecx
mov	ecx, eax
call	sub_6FDCA0
mov	ebx, eax
jmp	short loc_69E25B

loc_69E259:
xor	ebx, ebx

loc_69E25B:
lea	ecx, [esp+10h]
call	sub_679E30
cmp	dword ptr [edi+30h], 0
jz	short loc_69E28F
mov	ecx, [edi+34h]
mov	edx, [ecx]
mov	eax, [edx+30h]
call	eax
push	eax
lea	ecx, [esp+14h]
call	sub_67A2C0
lea	ecx, [esp+10h]
push	ecx
call	sub_702B10
add	esp, 4
test	al, al
jnz	short loc_69E298

loc_69E28F:
lea	ecx, [esp+10h]
call	sub_67A720

loc_69E298:
mov	eax, [esi+4]
test	al, 4
jz	short loc_69E2AF
lea	edx, [esp+10h]
push	edx
push	ebx
push	esi
mov	ecx, edi
call	sub_69B4E0
jmp	short loc_69E2E5

loc_69E2AF:
test	al, 8
jz	short loc_69E2C3
lea	eax, [esp+10h]
push	eax
push	ebx
push	esi
mov	ecx, edi
call	sub_68E720
jmp	short loc_69E2E5

loc_69E2C3:
test	al, 10h
jz	short loc_69E2D7
lea	ecx, [esp+10h]
push	ecx
push	ebx
push	esi
mov	ecx, edi
call	sub_68E830
jmp	short loc_69E2E5

loc_69E2D7:
lea	edx, [esp+10h]
push	edx
push	ebx
push	esi
mov	ecx, edi
call	sub_69DAA0

loc_69E2E5:
mov	ecx, esi
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	esi, [esp+14h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_69E31C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_69E31C:
test	ebx, ebx
jz	short loc_69E327
mov	ecx, ebx
call	sub_64A430

loc_69E327:
cmp	dword ptr [edi+2838h], 0
jnz	loc_69E210
pop	ebp

loc_69E335:
mov	esi, [edi+2840h]
test	esi, esi
jz	short loc_69E354
nop

loc_69E340:
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_69E3A7
mov	esi, [esi+4]
test	esi, esi
jnz	short loc_69E340

loc_69E354:
mov	esi, [edi+2840h]
test	esi, esi
jz	short loc_69E3A7
mov	edi, edi

loc_69E360:
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_69E3A0
mov	ebx, [esi+4]
test	ebx, ebx
jz	short loc_69E37A
mov	ecx, [esi+8]
mov	[ebx+8], ecx

loc_69E37A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_69E384
mov	[eax+4], ebx

loc_69E384:
cmp	[edi+2840h], esi
jnz	short loc_69E392
mov	[edi+2840h], ebx

loc_69E392:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
mov	esi, ebx
jmp	short loc_69E3A3

loc_69E3A0:
mov	esi, [esi+4]

loc_69E3A3:
test	esi, esi
jnz	short loc_69E360

loc_69E3A7:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_69E1F0 endp

align 10h



sub_69E3B0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 38h
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+30h], esi
jz	loc_69E576
fldz
mov	ecx, [edi+30h]
mov	edx, [ecx]
fst	[esp+40h+var_18]
xor	eax, eax
fst	[esp+40h+var_14]
push	ebx
fst	[esp+44h+var_10]
mov	[esp+44h+var_8], ax
fstp	[esp+44h+var_C]
mov	[esp+44h+var_6], al
mov	[esp+44h+var_5], al
mov	[esp+44h+var_4], al
mov	[esp+44h+var_3], al
mov	eax, [edx+70h]
push	ebp
mov	[esp+48h+var_24], esi
mov	[esp+48h+var_20], esi
mov	[esp+48h+var_1C], 0FFFFFFFFh
call	eax
mov	ebx, eax
lea	ecx, [ebx+78h]
mov	[esp+48h+var_38], esi
mov	[esp+48h+var_30], ecx
mov	ecx, [edi+9C4h]
mov	esi, 1
shl	esi, cl
lea	ebp, [edi+134h]
dec	esi
jmp	short loc_69E430
align 10h

loc_69E430:
cmp	dword ptr [ebp+7D4h], 0
jnz	short loc_69E442
cmp	dword ptr [ebp+7F8h], 0
jz	short loc_69E478

loc_69E442:
mov	ecx, ebp
call	sub_68E1D0
mov	ecx, [eax]
cmp	ecx, 1
jnz	short loc_69E464
lea	edx, [esp+48h+var_24]
push	edx
push	eax
mov	eax, [esp+50h+var_30]
push	eax
mov	ecx, edi
call	sub_69A570
jmp	short loc_69E430

loc_69E464:
test	ecx, ecx
jnz	short loc_69E430
lea	ecx, [esp+48h+var_38]
push	ecx
push	eax
push	ebx
mov	ecx, edi
call	sub_69BEF0
jmp	short loc_69E430

loc_69E478:
mov	edx, [edi+2474h]
shr	edx, 7
test	dl, 1
jz	loc_69E54C
mov	eax, esi
and	eax, [esp+48h+var_38]
cmp	eax, esi
jz	loc_69E54C
xor	ebx, ebx
mov	[esp+48h+var_34], 1
cmp	[edi+9C4h], ebx
jbe	loc_69E54C
lea	ebp, [edi+944h]

loc_69E4B4:
mov	ecx, [esp+48h+var_38]
test	[esp+48h+var_34], ecx
jnz	short loc_69E538
test	byte ptr [ebp+10h], 10h
jz	short loc_69E538
mov	edx, [ebp-4]
push	0
mov	[ebp+0], edx
fld	dword ptr [ebp+4]
push	0
fstp	[esp+50h+var_2C]
fld	dword ptr [ebp+8]
push	ebx
lea	eax, [esp+54h+var_2C]
fstp	[esp+54h+var_28]
push	eax
mov	ecx, edi
call	sub_6907A0
mov	esi, eax
test	esi, esi
jz	short loc_69E4F2
inc	dword ptr [esi+4]

loc_69E4F2:
lea	ecx, [ebp-10h]
push	esi
call	sub_6921A0
push	esi
push	ebx
mov	ecx, edi
call	sub_69B6E0
mov	ecx, [esp+48h+var_30]
mov	edx, [ecx]
mov	al, [edx+2B0h]
dec	al
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
and	ecx, 0FFFFFFF1h
add	ecx, 10h
push	ecx
lea	eax, [ebp-10h]
push	eax
push	ebx
call	sub_6B8E90
add	esp, 0Ch
test	esi, esi
jz	short loc_69E538
mov	ecx, esi
call	sub_64A400

loc_69E538:
shl	[esp+48h+var_34], 1
inc	ebx
add	ebp, 24h
cmp	ebx, [edi+9C4h]
jb	loc_69E4B4

loc_69E54C:
lea	edx, [esp+48h+var_24]
push	edx
mov	ecx, edi
call	sub_694820
mov	ecx, [esp+48h+var_20]
and	dword ptr [edi+2474h], 0FFFFFF7Fh
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_69E576
pop	edi
pop	esi
add	esp, 38h
jmp	sub_64A400

loc_69E576:
pop	edi
pop	esi
add	esp, 38h
retn
sub_69E3B0 endp

align 10h



sub_69E580 proc	near

NewValue= dword	ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+30h], 0
jnz	short loc_69E595
xor	al, al
pop	esi
add	esp, 18h
retn	0Ch

loc_69E595:
push	edi
mov	edi, [esp+20h+arg_0]
test	edi, edi
jnz	short loc_69E5EB
mov	eax, [esi+8]
mov	edx, [eax+0Ch]
add	esi, 8
push	4
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_69E5E1
mov	ecx, eax
call	sub_64A430
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	4
mov	ecx, esi
call	edx
mov	esi, eax
lea	eax, [esi+0Ch]
push	offset aErrorNullPatht ; "Error: NULL pathToVar	passed to SetVari"...
push	eax
call	sub_67E7F0
add	esp, 8
test	esi, esi
jz	short loc_69E5E1
mov	ecx, esi
call	sub_64A430

loc_69E5E1:
pop	edi
xor	al, al
pop	esi
add	esp, 18h
retn	0Ch

loc_69E5EB:
push	ebx
push	0		; Mask
lea	ecx, [esp+28h+NewValue]
push	0		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	edx, [esp+34h+var_14]
push	10000h		; NewValue
push	edx		; CurrentState
call	__controlfp_s
mov	ecx, [esi+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
add	esp, 18h
call	edx
mov	eax, [eax+78h]
mov	ecx, [eax+280h]
push	edi
call	sub_651000
mov	edx, [esp+24h+arg_4]
lea	ecx, [esp+24h+var_10]
push	ecx
mov	[esp+28h+arg_0], eax
inc	dword ptr [eax+8]
push	edx
mov	ecx, esi
mov	[esp+2Ch+var_10], 0
call	sub_64ABC0
mov	edi, [esp+24h+arg_8]
mov	ecx, [esi+30h]
test	edi, edi
setz	al
movzx	edx, al
push	edx
push	0
lea	eax, [esp+2Ch+var_10]
push	eax
mov	eax, [ecx]
lea	edx, [esp+30h+arg_0]
push	edx
mov	edx, [eax+70h]
call	edx
mov	ecx, eax
call	sub_6729F0
mov	bl, al
test	bl, bl
jnz	short loc_69E67B
test	edi, edi
jnz	short loc_69E680

loc_69E67B:
cmp	edi, 2
jnz	short loc_69E692

loc_69E680:
push	edi
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, esi
call	sub_69C3A0

loc_69E692:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69E6B1
call	sub_650DF0

loc_69E6B1:
mov	edx, [esp+24h+NewValue]
push	30000h		; Mask
push	edx		; NewValue
lea	eax, [esp+2Ch+arg_4]
push	eax		; CurrentState
call	__controlfp_s
add	esp, 0Ch
mov	al, bl
pop	ebx
pop	edi
pop	esi
add	esp, 18h
retn	0Ch
sub_69E580 endp

align 10h



sub_69E6E0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
NewValue= dword	ptr -84h
var_80=	byte ptr -80h
var_70=	byte ptr -70h
var_64=	qword ptr -64h
var_5C=	qword ptr -5Ch
var_50=	byte ptr -50h
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 90h
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+30h], 0
mov	[esp+94h+var_8C], ebx
jnz	short loc_69E6FF
xor	al, al
pop	ebx
add	esp, 90h
retn	18h

loc_69E6FF:
push	ebp
push	esi
push	edi
push	0		; Mask
lea	eax, [esp+0A4h+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+0B0h+var_90]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	ecx, [ebx+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
add	esp, 18h
call	eax
mov	edx, [esp+0A0h+arg_4]
mov	esi, eax
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
push	edx
call	sub_651000
push	0
push	0
push	0
mov	[esp+0ACh+var_88], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+0B0h+var_80]
push	eax
lea	ecx, [esp+0B4h+var_88]
push	ecx
mov	ecx, esi
mov	[esp+0B8h+var_80], 0
call	sub_6726F0
test	al, al
jz	short loc_69E7A8
cmp	[esp+0A0h+var_80], 6
jnz	short loc_69E7A8
push	esi
lea	ecx, [esp+0A4h+var_80]
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_69E7A8
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 7
jnz	short loc_69E7A8
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx
jmp	short loc_69E7D4

loc_69E7A8:
mov	ecx, [ebx+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_69E7D0
mov	ecx, [ebx+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
push	eax
mov	ecx, esi
call	sub_65EF40
jmp	short loc_69E7D2

loc_69E7D0:
xor	eax, eax

loc_69E7D2:
mov	edi, eax

loc_69E7D4:
mov	ebp, [esp+0A0h+arg_8]
mov	ebx, [esp+0A0h+arg_10]
lea	eax, [ebx+ebp]
cmp	eax, [edi+3Ch]
jbe	short loc_69E7F2
push	eax
mov	ecx, edi
call	sub_65E410

loc_69E7F2:
mov	eax, [esp+0A0h+arg_0]
cmp	eax, 5		; switch 6 cases
ja	loc_69EA4C	; default
jmp	ds:off_69EB04[eax*4] ; switch jump

loc_69E809:		; jumptable 0069E802 case 0
xor	esi, esi
test	ebx, ebx
jbe	loc_69EA4C	; default

loc_69E813:
mov	ecx, [esp+0A0h+arg_C]
mov	edx, [ecx+esi*4]
lea	eax, [esp+0A0h+var_20]
push	eax
lea	ecx, [esi+ebp]
push	ecx
mov	ecx, edi
mov	[esp+0A8h+var_20], 4
mov	[esp+0A8h+var_1C], edx
call	sub_65DA40
lea	ecx, [esp+0A0h+var_20]
call	sub_652830
inc	esi
cmp	esi, ebx
jb	short loc_69E813
jmp	loc_69EA4C	; default

loc_69E855:		; jumptable 0069E802 case 2
xor	esi, esi
test	ebx, ebx
jbe	loc_69EA4C	; default
nop

loc_69E860:
mov	edx, [esp+0A0h+arg_C]
fld	dword ptr [edx+esi*4]
lea	eax, [esp+0A0h+var_44+4]
push	eax
fstp	[esp+0A4h+var_3C]
lea	ecx, [esi+ebp]
push	ecx
mov	ecx, edi
mov	byte ptr [esp+0A8h+var_44+4], 3
call	sub_65DA40
lea	ecx, [esp+0A0h+var_44+4]
call	sub_652830
inc	esi
cmp	esi, ebx
jb	short loc_69E860
jmp	loc_69EA4C	; default

loc_69E896:		; jumptable 0069E802 case 1
xor	esi, esi
test	ebx, ebx
jbe	loc_69EA4C	; default

loc_69E8A0:
mov	edx, [esp+0A0h+arg_C]
fld	qword ptr [edx+esi*8]
lea	eax, [esp+0A0h+var_64+4]
push	eax
fstp	[esp+0A4h+var_5C]
lea	ecx, [esi+ebp]
push	ecx
mov	ecx, edi
mov	byte ptr [esp+0A8h+var_64+4], 3
call	sub_65DA40
lea	ecx, [esp+0A0h+var_64+4]
call	sub_652830
inc	esi
cmp	esi, ebx
jb	short loc_69E8A0
jmp	loc_69EA4C	; default

loc_69E8D6:		; jumptable 0069E802 case 5
xor	esi, esi
test	ebx, ebx
jbe	loc_69EA4C	; default
mov	edx, [esp+0A0h+arg_C]
mov	[esp+0A0h+var_90], edx
jmp	short loc_69E8F0
align 10h

loc_69E8F0:
mov	ecx, [esp+0A0h+var_90]
lea	eax, [esp+0A0h+var_50]
push	eax
push	ecx
mov	ecx, [esp+0A8h+var_8C]
mov	[esp+0A8h+var_50], 0
call	sub_64ABC0
lea	edx, [esp+0A0h+var_50]
push	edx
lea	eax, [esi+ebp]
push	eax
mov	ecx, edi
call	sub_65DA40
lea	ecx, [esp+0A0h+var_50]
call	sub_652830
add	[esp+0A0h+var_90], 18h
inc	esi
cmp	esi, ebx
jb	short loc_69E8F0
jmp	loc_69EA4C	; default

loc_69E930:		; jumptable 0069E802 case 3
mov	[esp+0A0h+var_90], 0
test	ebx, ebx
jbe	loc_69EA4C	; default

loc_69E940:
mov	ecx, [esp+0A0h+arg_C]
mov	edx, [esp+0A0h+var_90]
mov	eax, [ecx+edx*4]
mov	ecx, [esp+0A0h+var_8C]
mov	edx, [ecx+23C4h]
mov	ecx, [edx+280h]
push	eax
call	sub_651000
mov	ecx, [esp+0A0h+var_90]
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	[esp+0A0h+var_30], 5
mov	[esp+0A0h+var_2C], esi
add	[esi+8], eax
lea	eax, [esp+0A0h+var_30]
add	ecx, ebp
push	eax
push	ecx
mov	ecx, edi
call	sub_65DA40
lea	ecx, [esp+0A0h+var_30]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_69E9A3
mov	ecx, esi
call	sub_650DF0

loc_69E9A3:
mov	eax, [esp+0A0h+var_90]
inc	eax
mov	[esp+0A0h+var_90], eax
cmp	eax, ebx
jb	short loc_69E940
jmp	loc_69EA4C	; default

loc_69E9B5:		; jumptable 0069E802 case 4
mov	[esp+0A0h+var_90], 0
test	ebx, ebx
jbe	loc_69EA4C	; default
jmp	short loc_69E9D0
align 10h

loc_69E9D0:
mov	edx, [esp+0A0h+arg_C]
mov	eax, [esp+0A0h+var_90]
mov	eax, [edx+eax*4]
mov	ecx, [esp+0A0h+var_8C]
mov	edx, [ecx+23C4h]
mov	ecx, [edx+280h]
push	eax
call	sub_651030
mov	ecx, [esp+0A0h+var_90]
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	[esp+0A0h+var_10], 5
mov	[esp+0A0h+var_C], esi
add	[esi+8], eax
lea	eax, [esp+0A0h+var_10]
add	ecx, ebp
push	eax
push	ecx
mov	ecx, edi
call	sub_65DA40
lea	ecx, [esp+0A0h+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_69EA3F
mov	ecx, esi
call	sub_650DF0

loc_69EA3F:
mov	eax, [esp+0A0h+var_90]
inc	eax
mov	[esp+0A0h+var_90], eax
cmp	eax, ebx
jb	short loc_69E9D0

loc_69EA4C:		; default
push	edi
lea	ecx, [esp+0A4h+var_70]
mov	[esp+0A4h+var_70], 0
call	sub_652E40
mov	esi, [esp+0A0h+arg_14]
mov	ebp, [esp+0A0h+var_8C]
mov	ecx, [ebp+30h]
test	esi, esi
setz	dl
movzx	eax, dl
push	eax
push	0
lea	edx, [esp+0A8h+var_70]
push	edx
mov	edx, [ecx]
lea	eax, [esp+0ACh+var_88]
push	eax
mov	eax, [edx+70h]
call	eax
mov	ecx, eax
call	sub_6729F0
mov	bl, al
test	bl, bl
jnz	short loc_69EA96
test	esi, esi
jnz	short loc_69EA9B

loc_69EA96:
cmp	esi, 2
jnz	short loc_69EAAD

loc_69EA9B:
push	esi
lea	ecx, [esp+0A4h+var_70]
push	ecx
lea	edx, [esp+0A8h+var_88]
push	edx
mov	ecx, ebp
call	sub_69C3A0

loc_69EAAD:
lea	ecx, [esp+0A0h+var_70]
call	sub_652830
lea	ecx, [esp+0A0h+var_80]
call	sub_652830
mov	ecx, edi
call	sub_64B3B0
mov	eax, [esp+0A0h+var_88]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
pop	ebp
jnz	short loc_69EADF
call	sub_650DF0

loc_69EADF:
mov	eax, [esp+94h+NewValue]
push	30000h		; Mask
push	eax		; NewValue
lea	ecx, [esp+9Ch+var_8C]
push	ecx		; CurrentState
call	__controlfp_s
add	esp, 0Ch
mov	al, bl
pop	ebx
add	esp, 90h
retn	18h
sub_69E6E0 endp

align 4
off_69EB04 dd offset loc_69E809	; jump table for switch	statement
dd offset loc_69E896
dd offset loc_69E855
dd offset loc_69E930
dd offset loc_69E9B5
dd offset loc_69E8D6
align 10h



sub_69EB20 proc	near

var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
push	edi
mov	edi, ecx
cmp	dword ptr [edi+30h], 0
jnz	short loc_69EB35
xor	al, al
pop	edi
add	esp, 24h
retn	0Ch

loc_69EB35:
mov	ecx, [edi+30h]
mov	eax, [ecx]
mov	edx, [eax+70h]
push	esi
call	edx
mov	edx, [esp+2Ch+arg_0]
mov	esi, eax
mov	eax, [esi+78h]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
push	0
push	0
push	0
mov	[esp+38h+var_24], eax
inc	dword ptr [eax+8]
push	0
lea	eax, [esp+3Ch+var_20]
push	eax
lea	ecx, [esp+40h+var_24]
push	ecx
mov	ecx, esi
mov	[esp+44h+var_20], 0
call	sub_6726F0
test	al, al
jz	short loc_69EBF3
cmp	[esp+2Ch+var_20], 6
jnz	short loc_69EBF3
push	esi
lea	ecx, [esp+30h+var_20]
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_69EBF3
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 7
jnz	short loc_69EBF3
mov	ecx, [esi+8]
mov	eax, [esp+2Ch+arg_4]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx
cmp	eax, [esi+3Ch]
jz	short loc_69EBC3
push	eax
mov	ecx, esi
call	sub_65E410

loc_69EBC3:
lea	ecx, [esp+2Ch+var_20]
call	sub_652830
mov	ecx, esi
call	sub_64B3B0
mov	eax, [esp+2Ch+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69EBE9
call	sub_650DF0

loc_69EBE9:
pop	esi
mov	al, 1
pop	edi
add	esp, 24h
retn	0Ch

loc_69EBF3:
mov	ecx, [edi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_69EC1D
mov	ecx, [edi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
push	eax
mov	ecx, esi
call	sub_65EF40
mov	esi, eax
jmp	short loc_69EC1F

loc_69EC1D:
xor	esi, esi

loc_69EC1F:
mov	ecx, [esp+2Ch+arg_4]
push	ebx
push	ebp
push	ecx
mov	ecx, esi
call	sub_65E410
push	esi
lea	ecx, [esp+38h+var_10]
mov	[esp+38h+var_10], 0
call	sub_652E40
mov	ebp, [esp+34h+arg_8]
mov	ecx, [edi+30h]
test	ebp, ebp
setz	dl
movzx	eax, dl
push	eax
push	0
lea	edx, [esp+3Ch+var_10]
push	edx
mov	edx, [ecx]
lea	eax, [esp+40h+var_24]
push	eax
mov	eax, [edx+70h]
call	eax
mov	ecx, eax
call	sub_6729F0
mov	bl, al
test	bl, bl
jnz	short loc_69EC70
test	ebp, ebp
jnz	short loc_69EC75

loc_69EC70:
cmp	ebp, 2
jnz	short loc_69EC87

loc_69EC75:
push	ebp
lea	ecx, [esp+38h+var_10]
push	ecx
lea	edx, [esp+3Ch+var_24]
push	edx
mov	ecx, edi
call	sub_69C3A0

loc_69EC87:
lea	ecx, [esp+34h+var_10]
call	sub_652830
lea	ecx, [esp+34h+var_20]
call	sub_652830
test	esi, esi
jz	short loc_69ECA4
mov	ecx, esi
call	sub_64B3B0

loc_69ECA4:
mov	eax, [esp+34h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_69ECBA
call	sub_650DF0

loc_69ECBA:
pop	ebp
mov	al, bl
pop	ebx
pop	esi
pop	edi
add	esp, 24h
retn	0Ch
sub_69EB20 endp

align 10h



sub_69ECD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_69ECE3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_69ED05

loc_69ECE3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_69ED0A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_69ED05:
call	sub_69C8B0

loc_69ED0A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, ds:0[eax*8]
sub	edx, eax
lea	esi, [ecx+edx*4+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_69ED52
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
add	ecx, 4
push	ecx
mov	[esi+4], eax
inc	dword ptr [eax+8]
lea	ecx, [esi+8]
call	sub_699010
pop	esi
pop	ebx
retn	0Ch

loc_69ED52:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax
lea	esp, [esp+0]

loc_69ED60:
inc	edi
and	edi, ebp
lea	edx, ds:0[edi*8]
sub	edx, edi
cmp	[ecx+edx*4+8], ebx
jnz	short loc_69ED60
mov	ebx, [esi+4]
mov	ebx, [ebx+0Ch]
lea	edx, ds:0[edi*8]
sub	edx, edi
and	ebx, ebp
lea	edx, [ecx+edx*4+8]
cmp	ebx, eax
jnz	short loc_69EDD8
test	edx, edx
jz	short loc_69EDA8
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [esi+8]
push	eax
lea	ecx, [edx+8]
call	sub_699010

loc_69EDA8:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [ebp+0]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69EDC0
call	sub_650DF0

loc_69EDC0:
add	ebp, 4
push	ebp
lea	ecx, [esi+8]
mov	[esi+4], ebx
call	sub_694FE0
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_69EDD8:
lea	ebp, ds:0[ebx*8]
sub	ebp, ebx
cmp	[ecx+ebp*4+8], eax
lea	ebx, [ecx+ebp*4+8]
jz	short loc_69EE05
jmp	short loc_69EDF0
align 10h

loc_69EDF0:
mov	ebx, [ebx]
lea	ebp, ds:0[ebx*8]
sub	ebp, ebx
cmp	[ecx+ebp*4+8], eax
lea	ebx, [ecx+ebp*4+8]
jnz	short loc_69EDF0

loc_69EE05:
test	edx, edx
jz	short loc_69EE22
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
lea	ecx, [esi+8]
push	ecx
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	ecx, [edx+8]
call	sub_699010

loc_69EE22:
mov	[ebx], edi
mov	ebx, [esp+10h+arg_4]
mov	edi, [ebx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69EE3B
call	sub_650DF0

loc_69EE3B:
add	ebx, 4
push	ebx
lea	ecx, [esi+8]
mov	[esi+4], edi
call	sub_694FE0
pop	edi
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_69ECD0 endp

align 10h



; int __stdcall	sub_69EE60(float, int)
sub_69EE60 proc	near

var_98=	dword ptr -98h
var_84=	qword ptr -84h
var_7C=	qword ptr -7Ch
var_74=	qword ptr -74h
var_6C=	qword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
NewValue= dword	ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	qword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	qword ptr -14h
var_C= qword ptr -0Ch
CurrentState= dword ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 84h
push	esi
mov	esi, ecx
mov	eax, [esi+2474h]
shr	eax, 14h
test	al, 1
jz	short loc_69EE86
fld	ds:dword_156F414
pop	esi
add	esp, 84h
retn	8

loc_69EE86:
push	ebx
xor	ebx, ebx
cmp	[esi+28h], ebx
jnz	short loc_69EECA
mov	esi, [esi+34h]
cmp	esi, ebx
jz	short loc_69EEB5
mov	edx, [esi]
mov	eax, [edx+24h]
mov	ecx, esi
call	eax
fld1
fdivrp	st(1), st
pop	ebx
pop	esi
fstp	[esp+84h+NewValue]
fld	[esp+84h+NewValue]
add	esp, 84h
retn	8

loc_69EEB5:
fldz
pop	ebx
fstp	[esp+88h+NewValue]
pop	esi
fld	[esp+84h+NewValue]
add	esp, 84h
retn	8

loc_69EECA:		; Mask
push	ebx
lea	ecx, [esp+90h+NewValue]
push	ebx		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	edx, [esp+9Ch+var_C]
push	10000h		; NewValue
push	edx		; CurrentState
call	__controlfp_s
fldz
fcom	[esp+0A4h+arg_0]
add	esp, 18h
fnstsw	ax
test	ah, 41h
jnz	short loc_69EF09
fstp	[esp+8Ch+arg_0]
jmp	short loc_69EF0B

loc_69EF09:
fstp	st

loc_69EF0B:
or	dword ptr [esi+2474h], 200h
mov	eax, [esi+0F0h]
push	edi
lea	ecx, [eax+8]
push	0Bh
mov	[esp+94h+var_40], ebx
mov	[esp+94h+var_3C], ebx
mov	[esp+94h+var_38], ebx
mov	[esp+94h+var_34], ebx
mov	[esp+94h+var_30], ebx
mov	[esp+94h+var_2C], ebx
mov	[esp+94h+var_28], ebx
mov	dword ptr [esp+94h+var_24], ebx
mov	dword ptr [esp+94h+var_24+4], ebx
mov	[esp+94h+var_1C], ebx
mov	[esp+94h+var_18], ebx
mov	eax, [ecx]
mov	eax, [eax+10h]
push	offset asc_1437938 ; "\a"
lea	edx, [esp+98h+var_40]
push	edx
call	eax
mov	ecx, [esi+0FCh]
mov	edi, [esp+90h+var_40]
cmp	ecx, ebx
jz	short loc_69EF71
call	sub_64A430

loc_69EF71:
mov	[esi+0FCh], edi
mov	ecx, [esi+100h]
mov	edi, [esp+90h+var_3C]
cmp	ecx, ebx
jz	short loc_69EF8A
call	sub_64A430

loc_69EF8A:
mov	[esi+100h], edi
mov	ecx, [esi+104h]
mov	edi, [esp+90h+var_38]
cmp	ecx, ebx
jz	short loc_69EFA3
call	sub_64A430

loc_69EFA3:
mov	ecx, [esp+90h+var_34]
mov	[esi+104h], edi
mov	edi, [esp+90h+var_30]
mov	[esp+90h+var_44], ecx
mov	ecx, [esi+0F8h]
cmp	ecx, ebx
jz	short loc_69EFC4
call	sub_64A430

loc_69EFC4:
mov	[esi+0F8h], edi
mov	edx, [esi+108h]
cmp	edx, [esp+90h+var_1C]
jz	short loc_69EFF7
xor	edi, edi
cmp	[esi+28h], ebx
jbe	short loc_69EFF7
lea	ecx, [ecx+0]

loc_69EFE0:
mov	eax, [esi+24h]
mov	ecx, [eax+edi*8+4]
mov	edx, [ecx]
mov	eax, [edx+0C0h]
call	eax
inc	edi
cmp	edi, [esi+28h]
jb	short loc_69EFE0

loc_69EFF7:
mov	ecx, [esi+108h]
mov	edi, [esp+90h+var_1C]
cmp	ecx, ebx
jz	short loc_69F00A
call	sub_64A430

loc_69F00A:
mov	edx, [esp+90h+var_28]
mov	eax, [esp+90h+var_2C]
push	ebp
mov	ebp, dword ptr [esp+94h+var_24]
mov	[esi+108h], edi
mov	edi, dword ptr [esp+94h+var_24+4]
mov	ecx, [esi+10Ch]
push	edi
push	ebp
push	edx
push	eax
mov	dword ptr [esp+0A4h+var_7C], eax
mov	[esp+0A4h+var_48], edx
call	sub_6F3CC0
mov	byte ptr [esp+94h+var_84], al
test	edi, edi
jz	short loc_69F047
mov	ecx, edi
call	sub_64A430

loc_69F047:
mov	ecx, ebp
test	ecx, ecx
jz	short loc_69F052
call	sub_64A430

loc_69F052:
mov	ecx, [esp+94h+var_48]
test	ecx, ecx
jz	short loc_69F05F
call	sub_64A430

loc_69F05F:
mov	ecx, dword ptr [esp+94h+var_7C]
test	ecx, ecx
jz	short loc_69F06C
call	sub_64A430

loc_69F06C:
mov	ebp, [esp+94h+var_44]
or	dword ptr [esi+2474h], 2
test	ebp, ebp
jz	loc_69F101
test	byte ptr [ebp+0Ch], 1
jz	short loc_69F08E
or	dword ptr [esi+2474h], 4
jmp	short loc_69F095

loc_69F08E:
and	dword ptr [esi+2474h], 0FFFFFFFBh

loc_69F095:
mov	ecx, [ebp+0Ch]
shr	ecx, 1
test	cl, 1
jz	short loc_69F0A8
or	dword ptr [esi+2474h], 40h
jmp	short loc_69F0AF

loc_69F0A8:
and	dword ptr [esi+2474h], 0FFFFFFBFh

loc_69F0AF:
mov	edx, [ebp+0Ch]
shr	edx, 2
test	dl, 1
jz	short loc_69F0C3
or	dword ptr [esi+2474h], 8
jmp	short loc_69F0CA

loc_69F0C3:
and	dword ptr [esi+2474h], 0FFFFFFF7h

loc_69F0CA:
mov	eax, [ebp+0Ch]
shr	eax, 4
test	al, 1
jz	short loc_69F0DD
or	dword ptr [esi+2474h], 20h
jmp	short loc_69F0E4

loc_69F0DD:
and	dword ptr [esi+2474h], 0FFFFFFDFh

loc_69F0E4:
mov	ecx, [ebp+0Ch]
shr	ecx, 3
test	cl, 1
jz	short loc_69F0F8
or	dword ptr [esi+2474h], 10h
jmp	short loc_69F108

loc_69F0F8:
and	dword ptr [esi+2474h], 0FFFFFFEFh
jmp	short loc_69F108

loc_69F101:
and	dword ptr [esi+2474h], 0FFFFFF83h

loc_69F108:
mov	ecx, [esp+94h+var_18]
mov	[esi+110h], ecx
test	ecx, ecx
jz	short loc_69F12E
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax
mov	[esi+114h], eax
test	eax, eax
jz	short loc_69F12E
mov	ecx, eax
call	sub_64A420

loc_69F12E:
mov	edi, [esi+3Ch]
lea	ebx, [esi+38h]
cmp	edi, ebx
jz	short loc_69F170

loc_69F138:
cmp	byte ptr [edi+18h], 0
jnz	short loc_69F15A
mov	ecx, [edi+0Ch]
mov	eax, [ecx+1Ch]
mov	edx, [eax+80h]
mov	ecx, [edi+0Ch]
mov	[edi+14h], edx
mov	eax, [ecx]
mov	edx, [eax+14h]
call	edx
mov	[edi+10h], eax

loc_69F15A:
cmp	byte ptr [esp+94h+var_84], 0
jz	short loc_69F169
mov	ecx, [edi+1Ch]
call	sub_6F4560

loc_69F169:
mov	edi, [edi+4]
cmp	edi, ebx
jnz	short loc_69F138

loc_69F170:
cmp	byte ptr [esp+94h+var_84], 0
jz	short loc_69F19A
xor	edi, edi
cmp	[esi+28h], edi
jbe	short loc_69F19A
mov	ebx, dword ptr [esp+94h+var_84]

loc_69F182:
mov	eax, [esi+24h]
mov	ecx, [eax+edi*8+4]
mov	edx, [ecx]
mov	eax, [edx+0B8h]
push	ebx
call	eax
inc	edi
cmp	edi, [esi+28h]
jb	short loc_69F182

loc_69F19A:
mov	ecx, [esi+30h]
call	sub_67EC10
test	eax, eax
jnz	short loc_69F20A
and	dword ptr [esi+2474h], 0FFFFFFFDh
mov	ecx, [esi+114h]
xor	edi, edi
cmp	ecx, edi
jz	short loc_69F1C4
call	sub_64A430
mov	[esi+114h], edi

loc_69F1C4:
mov	ecx, [esi+110h]
cmp	ecx, edi
jz	short loc_69F1D9
call	sub_64A430
mov	[esi+110h], edi

loc_69F1D9:
cmp	ebp, edi
jz	short loc_69F1E4
mov	ecx, ebp
call	sub_64A430

loc_69F1E4:
mov	ecx, [esp+94h+NewValue]
push	30000h		; Mask
push	ecx		; NewValue
lea	edx, [esp+9Ch+var_48]
push	edx		; CurrentState
call	__controlfp_s
fldz
add	esp, 0Ch
pop	ebp
pop	edi
pop	ebx
pop	esi
add	esp, 84h
retn	8

loc_69F20A:
mov	eax, [esi+2474h]
shr	eax, 8
test	al, 1
jz	short loc_69F25A
mov	ecx, [esi+30h]
call	sub_67EC10
test	eax, eax
jbe	short loc_69F25A
and	dword ptr [esi+2474h], 0FFFFFEFFh
mov	edi, [esi+28h]
test	edi, edi
jle	short loc_69F245

loc_69F234:
mov	ecx, [esi+24h]
mov	ecx, [ecx+edi*8-4]
call	sub_683720
dec	edi
test	edi, edi
jg	short loc_69F234

loc_69F245:
mov	ecx, esi
call	sub_69A320
mov	ecx, esi
call	sub_68D950
mov	ecx, esi
call	sub_69E1F0

loc_69F25A:
fld	[esp+94h+arg_0]
fld	ds:dbl_15FCD88
fmul	st, st(1)
call	__ftol2
fadd	dword ptr [esi+128h]
add	[esi+120h], eax
fstp	dword ptr [esi+128h]
adc	[esi+124h], edx
call	sub_6B2270
fld	dword ptr [esi+12Ch]
mov	ebx, [esi+24A4h]
fstp	dword ptr [esp+94h+var_84]
mov	dword ptr [esp+94h+var_14], eax
mov	dword ptr [esp+94h+var_14+4], edx
test	ebx, ebx
jbe	loc_69F438
xor	ebp, ebp
xor	edi, edi
test	ebx, ebx
jbe	loc_69F438
mov	edx, [esi+24A0h]

loc_69F2C3:
cmp	dword ptr [edx+edi*4], 0
jz	loc_69F353
mov	ecx, [edx+edi*4]
cmp	byte ptr [ecx+38h], 0
jz	loc_69F353
fld	dword ptr [esi+12Ch]
push	ecx		; float
fstp	[esp+98h+var_98]
push	esi		; int
call	sub_6A9140
mov	edx, [esi+24A0h]
mov	eax, [edx+edi*4]
mov	ecx, [eax+28h]
sub	ecx, [esi+120h]
mov	eax, [eax+2Ch]
sbb	eax, [esi+124h]
mov	dword ptr [esp+94h+var_6C], ecx
mov	ecx, eax
and	eax, 7FFFFFFFh
and	ecx, 80000000h
mov	dword ptr [esp+94h+var_6C+4], eax
fild	[esp+94h+var_6C]
mov	dword ptr [esp+94h+var_74+4], ecx
mov	dword ptr [esp+94h+var_74], 0
fild	[esp+94h+var_74]
fchs
faddp	st(1), st
fdiv	ds:dbl_15FCD88
fstp	dword ptr [esp+94h+var_7C]
fld	dword ptr [esp+94h+var_7C]
fld	dword ptr [esp+94h+var_84]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_69F356
fstp	dword ptr [esp+94h+var_84]
jmp	short loc_69F358

loc_69F353:
inc	ebp
jmp	short loc_69F358

loc_69F356:
fstp	st

loc_69F358:
inc	edi
cmp	edi, ebx
jb	loc_69F2C3
test	ebp, ebp
jz	loc_69F438
mov	eax, [esi+24A4h]
xor	ebx, ebx
test	eax, eax
jbe	loc_69F438
mov	dword ptr [esp+94h+var_6C], eax
or	ebp, 0FFFFFFFFh

loc_69F380:
mov	edx, [esi+24A0h]
cmp	dword ptr [edx+ebx*4], 0
lea	eax, [edx+ebx*4]
jz	short loc_69F39D
mov	ecx, [eax]
cmp	byte ptr [ecx+38h], 0
jz	short loc_69F39D
inc	ebx
jmp	loc_69F42D

loc_69F39D:
mov	edi, [eax]
test	edi, edi
jz	short loc_69F3B8
mov	ecx, edi
call	sub_6962E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_69F3B8:
mov	eax, [esi+24A4h]
cmp	eax, 1
jnz	short loc_69F407
test	dword ptr [esi+24A8h], 0FFFFFFFEh
jbe	short loc_69F3FB
mov	eax, [esi+24A0h]
test	eax, eax
jz	short loc_69F3F1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+24A0h], 0

loc_69F3F1:
mov	dword ptr [esi+24A8h], 0

loc_69F3FB:
mov	dword ptr [esi+24A4h], 0
jmp	short loc_69F42D

loc_69F407:
mov	ecx, [esi+24A0h]
sub	eax, ebx
lea	ecx, [ecx+ebx*4]
lea	edx, ds:0FFFFFFFCh[eax*4]
push	edx
lea	eax, [ecx+4]
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	[esi+24A4h], ebp

loc_69F42D:
sub	dword ptr [esp+94h+var_6C], 1
jnz	loc_69F380

loc_69F438:
mov	eax, [esi+0F4h]
test	eax, eax
jz	loc_69F5B8
cmp	dword ptr [eax], 0
jbe	loc_69F5B8
xor	edi, edi
mov	[esp+94h+var_54], edi
mov	[esp+94h+var_50], edi
mov	[esp+94h+var_4C], edi
cmp	eax, edi
jnz	short loc_69F467
mov	dword ptr [esp+94h+var_7C], edi
jmp	short loc_69F490

loc_69F467:
xor	edi, edi
lea	ecx, [eax+8]
lea	esp, [esp+0]

loc_69F470:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_69F47E
inc	edi
add	ecx, 0Ch
cmp	edi, [eax+4]
jbe	short loc_69F470

loc_69F47E:
lea	eax, [esi+0F4h]
mov	dword ptr [esp+94h+var_7C], eax
jmp	short loc_69F490
align 10h

loc_69F490:
mov	eax, dword ptr [esp+94h+var_7C]
test	eax, eax
jz	loc_69F586
mov	eax, [eax]
test	eax, eax
jz	loc_69F586
cmp	edi, [eax+4]
jg	loc_69F586
lea	ecx, [edi+edi*2]
lea	ecx, [eax+ecx*4+10h]
mov	eax, [ecx]
test	eax, eax
jz	short loc_69F4BF
inc	dword ptr [eax+4]

loc_69F4BF:
mov	ebx, [ecx]
mov	edx, [ebx]
mov	eax, [edx+8]
mov	ecx, ebx
call	eax
mov	edx, [ebx]
mov	eax, [edx+14h]
mov	ecx, ebx
call	eax
test	al, al
jz	short loc_69F4FC
mov	edx, [ebx]
mov	eax, [edx+18h]
mov	ecx, ebx
call	eax
fld	dword ptr [esp+94h+var_84]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_69F548
mov	edx, [ebx]
mov	eax, [edx+18h]
mov	ecx, ebx
call	eax
fstp	dword ptr [esp+94h+var_84]
jmp	short loc_69F548

loc_69F4FC:
mov	eax, [esp+94h+var_50]
lea	ebp, [eax+1]
cmp	ebp, eax
jnb	short loc_69F519
mov	ecx, [esp+94h+var_4C]
shr	ecx, 1
cmp	ebp, ecx
jnb	short loc_69F535
push	ebp
lea	edx, [esp+98h+var_54]
push	edx
jmp	short loc_69F52C

loc_69F519:
cmp	ebp, [esp+94h+var_4C]
jb	short loc_69F535
mov	eax, ebp
shr	eax, 2
add	eax, ebp
push	eax
lea	ecx, [esp+98h+var_54]
push	ecx

loc_69F52C:
lea	ecx, [esp+9Ch+var_54]
call	sub_714BE0

loc_69F535:
mov	edx, [esp+94h+var_54]
mov	[esp+94h+var_50], ebp
lea	ebp, [edx+ebp*4-4]
test	ebp, ebp
jz	short loc_69F548
mov	[ebp+0], ebx

loc_69F548:
mov	ecx, ebx
call	sub_64A400
mov	eax, dword ptr [esp+94h+var_7C]
mov	ecx, [eax]
mov	eax, [ecx+4]
cmp	edi, eax
jg	loc_69F490
inc	edi
cmp	edi, eax
ja	loc_69F490
lea	edx, [edi+edi*2]
lea	ecx, [ecx+edx*4+8]

loc_69F570:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	loc_69F490
inc	edi
add	ecx, 0Ch
cmp	edi, eax
jbe	short loc_69F570
jmp	loc_69F490

loc_69F586:
mov	ebx, [esp+94h+var_50]
test	ebx, ebx
jbe	short loc_69F5A6
mov	edi, [esp+94h+var_54]

loc_69F592:
push	edi
lea	ecx, [esi+0F4h]
call	sub_691730
add	edi, 4
sub	ebx, 1
jnz	short loc_69F592

loc_69F5A6:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+94h+var_54]
mov	eax, [eax+30h]
push	edx
call	eax

loc_69F5B8:
mov	ecx, [esi+114h]
test	ecx, ecx
jz	short loc_69F5E6
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax
fstp	dword ptr [esp+94h+var_7C]
fld	dword ptr [esp+94h+var_7C]
fld	dword ptr [esp+94h+var_84]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_69F5E4
fstp	dword ptr [esp+94h+var_84]
jmp	short loc_69F5E6

loc_69F5E4:
fstp	st

loc_69F5E6:
mov	ecx, esi
call	sub_69E3B0
fld	dword ptr [esi+128h]
fld	dword ptr [esi+12Ch]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_69F898
mov	ecx, esi
call	sub_69A320
cmp	[esp+94h+arg_4], 0
ja	short loc_69F625
cmp	dword ptr [esi+130h], 0
mov	byte ptr [esp+94h+var_84+7], 0
jbe	short loc_69F630

loc_69F625:
mov	byte ptr [esp+94h+var_84+7], 1
lea	ebx, [ebx+0]

loc_69F630:
cmp	byte ptr [esp+94h+var_84+7], 0
fld	dword ptr [esi+128h]
jz	short loc_69F645
fsub	dword ptr [esi+12Ch]
jmp	short loc_69F658

loc_69F645:
fld	dword ptr [esi+12Ch]
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fstp	dword ptr [esp+94h+var_7C]
fld	dword ptr [esp+94h+var_7C]

loc_69F658:
fstp	dword ptr [esi+128h]
fld	dword ptr [esi+128h]
fld	dword ptr [esi+12Ch]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_69F677
fldz
jmp	short loc_69F683

loc_69F677:
fld	dword ptr [esi+128h]
fdiv	dword ptr [esi+12Ch]

loc_69F683:
fstp	dword ptr [esp+94h+var_7C]
push	ecx		; float
fld	dword ptr [esp+98h+var_7C]
mov	ecx, esi
fstp	[esp+98h+var_98]
push	1		; int
call	sub_68EAC0
mov	eax, [esi+0F4h]
test	eax, eax
jz	loc_69F818
cmp	dword ptr [eax], 0
jbe	loc_69F818
mov	[esp+94h+var_64], 0
mov	[esp+94h+var_60], 0
mov	[esp+94h+var_5C], 0
test	eax, eax
jnz	short loc_69F6D1
xor	edx, edx
xor	edi, edi
jmp	short loc_69F6EC

loc_69F6D1:
xor	edi, edi
lea	ecx, [eax+8]

loc_69F6D6:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_69F6E4
inc	edi
add	ecx, 0Ch
cmp	edi, [eax+4]
jbe	short loc_69F6D6

loc_69F6E4:
lea	eax, [esi+0F4h]
mov	edx, eax

loc_69F6EC:
mov	dword ptr [esp+94h+var_74], edx

loc_69F6F0:
test	edx, edx
jz	loc_69F7E6
mov	eax, [edx]
test	eax, eax
jz	loc_69F7E6
cmp	edi, [eax+4]
jg	loc_69F7E6
lea	ecx, [edi+edi*2]
lea	ecx, [eax+ecx*4+10h]
mov	eax, [ecx]
test	eax, eax
jz	short loc_69F71B
inc	dword ptr [eax+4]

loc_69F71B:
mov	ebx, [ecx]
mov	edx, [ebx]
mov	eax, [edx+8]
mov	ecx, ebx
call	eax
mov	edx, [ebx]
mov	eax, [edx+14h]
mov	ecx, ebx
call	eax
test	al, al
jz	short loc_69F758
mov	edx, [ebx]
mov	eax, [edx+18h]
mov	ecx, ebx
call	eax
fld	dword ptr [esp+94h+var_84]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_69F7A4
mov	edx, [ebx]
mov	eax, [edx+18h]
mov	ecx, ebx
call	eax
fstp	dword ptr [esp+94h+var_84]
jmp	short loc_69F7A4

loc_69F758:
mov	eax, [esp+94h+var_60]
lea	ebp, [eax+1]
cmp	ebp, eax
jnb	short loc_69F775
mov	ecx, [esp+94h+var_5C]
shr	ecx, 1
cmp	ebp, ecx
jnb	short loc_69F791
push	ebp
lea	edx, [esp+98h+var_64]
push	edx
jmp	short loc_69F788

loc_69F775:
cmp	ebp, [esp+94h+var_5C]
jb	short loc_69F791
mov	eax, ebp
shr	eax, 2
add	eax, ebp
push	eax
lea	ecx, [esp+98h+var_64]
push	ecx

loc_69F788:
lea	ecx, [esp+9Ch+var_64]
call	sub_714BE0

loc_69F791:
mov	edx, [esp+94h+var_64]
mov	[esp+94h+var_60], ebp
lea	ebp, [edx+ebp*4-4]
test	ebp, ebp
jz	short loc_69F7A4
mov	[ebp+0], ebx

loc_69F7A4:
mov	ecx, ebx
call	sub_64A400
mov	edx, dword ptr [esp+94h+var_74]
mov	ecx, [edx]
mov	eax, [ecx+4]
cmp	edi, eax
jg	loc_69F6F0
inc	edi
cmp	edi, eax
ja	loc_69F6F0
lea	ebx, [edi+edi*2]
lea	ecx, [ecx+ebx*4+8]
lea	esp, [esp+0]

loc_69F7D0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	loc_69F6F0
inc	edi
add	ecx, 0Ch
cmp	edi, eax
jbe	short loc_69F7D0
jmp	loc_69F6F0

loc_69F7E6:
mov	ebx, [esp+94h+var_60]
test	ebx, ebx
jbe	short loc_69F806
mov	edi, [esp+94h+var_64]

loc_69F7F2:
push	edi
lea	ecx, [esi+0F4h]
call	sub_691730
add	edi, 4
sub	ebx, 1
jnz	short loc_69F7F2

loc_69F806:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+94h+var_64]
mov	eax, [eax+30h]
push	edx
call	eax

loc_69F818:
mov	ecx, esi
call	sub_69A320
mov	ecx, esi
call	sub_68D950
mov	ecx, esi
call	sub_69E1F0
mov	eax, [esi+130h]
test	eax, eax
jbe	short loc_69F83E
dec	eax
mov	[esi+130h], eax

loc_69F83E:
mov	eax, [esp+94h+arg_4]
mov	ecx, eax
dec	eax
mov	[esp+94h+arg_4], eax
test	ecx, ecx
jbe	short loc_69F86C
fld	dword ptr [esi+128h]
fld	dword ptr [esi+12Ch]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_69F630

loc_69F86C:
cmp	dword ptr [esi+130h], 0
ja	loc_69F630
or	dword ptr [esi+2474h], 80h
mov	ecx, [esi+14h]
mov	ecx, [ecx+0Ch]
lea	edx, [esi+1Ch]
push	edx
lea	eax, [esi+18h]
push	eax
call	sub_66A460
jmp	short loc_69F8ED

loc_69F898:
fld	dword ptr [esi+128h]
push	ecx		; float
fdiv	dword ptr [esi+12Ch]
mov	ecx, esi
fstp	dword ptr [esp+98h+var_7C]
fld	dword ptr [esp+98h+var_7C]
fstp	[esp+98h+var_98]
push	0		; int
call	sub_68EAC0
fld	dword ptr [esi+128h]
fld	dword ptr [esi+12Ch]
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fstp	dword ptr [esp+94h+var_7C]
fld	dword ptr [esp+94h+var_7C]
mov	ecx, esi
fstp	dword ptr [esi+128h]
call	sub_69A320
mov	ecx, esi
call	sub_68D950
mov	ecx, esi
call	sub_69E1F0

loc_69F8ED:
mov	ecx, esi
call	sub_696C70
fld	dword ptr [esp+94h+var_84]
and	dword ptr [esi+2474h], 0FFFFFFFDh
fstp	[esp+94h+var_C]
call	sub_6B2270
sub	eax, dword ptr [esp+94h+var_14]
sbb	edx, dword ptr [esp+94h+var_14+4]
mov	dword ptr [esp+94h+var_74], eax
mov	eax, edx
and	edx, 7FFFFFFFh
mov	dword ptr [esp+94h+var_74+4], edx
fild	[esp+94h+var_74]
and	eax, 80000000h
xor	edi, edi
mov	dword ptr [esp+94h+var_74+4], eax
mov	dword ptr [esp+94h+var_74], edi
fild	[esp+94h+var_74]
fchs
faddp	st(1), st
fdiv	ds:dbl_15FCCE0
fsubr	[esp+94h+var_C]
fstp	dword ptr [esp+94h+var_84]
fldz
fld	dword ptr [esp+94h+var_84]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_69F970
fstp	st
fstp	dword ptr [esp+94h+var_84]
fld	dword ptr [esp+94h+var_84]
jmp	short loc_69F972

loc_69F970:
fstp	st(1)

loc_69F972:
fld	dword ptr [esi+12Ch]
fsub	dword ptr [esi+128h]
fstp	dword ptr [esp+94h+var_7C]
fld	dword ptr [esp+94h+var_7C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_69F993
fstp	st
jmp	short loc_69F995

loc_69F993:
fstp	st(1)

loc_69F995:
mov	ecx, [esi+114h]
fstp	dword ptr [esp+94h+var_6C]
cmp	ecx, edi
jz	short loc_69F9AE
call	sub_64A430
mov	[esi+114h], edi

loc_69F9AE:
mov	ecx, [esi+110h]
cmp	ecx, edi
jz	short loc_69F9C3
call	sub_64A430
mov	[esi+110h], edi

loc_69F9C3:
mov	ecx, [esp+94h+var_44]
cmp	ecx, edi
jz	short loc_69F9D0
call	sub_64A430

loc_69F9D0:
mov	edx, [esp+94h+NewValue]
push	30000h		; Mask
push	edx		; NewValue
lea	eax, [esp+9Ch+CurrentState]
push	eax		; CurrentState
call	__controlfp_s
fld	dword ptr [esp+0A0h+var_6C]
add	esp, 0Ch
pop	ebp
pop	edi
pop	ebx
pop	esi
add	esp, 84h
retn	8
sub_69EE60 endp

align 10h



sub_69FA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_69FA13
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_69FA35

loc_69FA13:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_69FA3A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_69FA35:
call	sub_69C8B0

loc_69FA3A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	ecx, [esi]
lea	edx, ds:0[eax*8]
sub	edx, eax
lea	esi, [ecx+edx*4+8]
mov	edx, [esi]
mov	ebx, 0FFFFFFFEh
cmp	edx, ebx
jnz	short loc_69FA84
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	eax, [eax]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	ecx, [ecx+4]
push	ecx
lea	ecx, [esi+8]
call	sub_699010
pop	esi
pop	ebx
retn	0Ch

loc_69FA84:
push	ebp
mov	ebp, [ecx+4]
push	edi
mov	edi, eax
jmp	short loc_69FA90
align 10h

loc_69FA90:
inc	edi
and	edi, ebp
lea	edx, ds:0[edi*8]
sub	edx, edi
cmp	[ecx+edx*4+8], ebx
jnz	short loc_69FA90
mov	ebx, [esi+4]
mov	ebx, [ebx+0Ch]
lea	edx, ds:0[edi*8]
sub	edx, edi
and	ebx, ebp
lea	edx, [ecx+edx*4+8]
cmp	ebx, eax
jnz	short loc_69FB0A
test	edx, edx
jz	short loc_69FAD8
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [esi+8]
push	eax
lea	ecx, [edx+8]
call	sub_699010

loc_69FAD8:
mov	ebp, [esp+10h+arg_4]
mov	ecx, [ebp+0]
mov	ebx, [ecx]
inc	dword ptr [ebx+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69FAF2
call	sub_650DF0

loc_69FAF2:
mov	[esi+4], ebx
mov	edx, [ebp+4]
push	edx
lea	ecx, [esi+8]
call	sub_694FE0
mov	[esi], edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	0Ch

loc_69FB0A:
lea	ebp, ds:0[ebx*8]
sub	ebp, ebx
cmp	[ecx+ebp*4+8], eax
lea	ebx, [ecx+ebp*4+8]
jz	short loc_69FB35
lea	ecx, [ecx+0]

loc_69FB20:
mov	ebx, [ebx]
lea	ebp, ds:0[ebx*8]
sub	ebp, ebx
cmp	[ecx+ebp*4+8], eax
lea	ebx, [ecx+ebp*4+8]
jnz	short loc_69FB20

loc_69FB35:
test	edx, edx
jz	short loc_69FB52
mov	eax, [esi]
mov	[edx], eax
mov	eax, [esi+4]
mov	[edx+4], eax
inc	dword ptr [eax+8]
lea	eax, [esi+8]
push	eax
lea	ecx, [edx+8]
call	sub_699010

loc_69FB52:
mov	[ebx], edi
mov	ebx, [esp+10h+arg_4]
mov	ecx, [ebx]
mov	edi, [ecx]
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_69FB6D
call	sub_650DF0

loc_69FB6D:
mov	[esi+4], edi
mov	edx, [ebx+4]
push	edx
lea	ecx, [esi+8]
call	sub_694FE0
pop	edi
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_69FA00 endp

align 10h



sub_69FB90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	eax, [ebp+0]
push	esi
push	edi
mov	edi, [eax]
mov	eax, [edi+0Ch]
mov	ebx, ecx
mov	esi, [ebx]
mov	[esp+10h+arg_4], eax
test	esi, esi
jz	short loc_69FBF6
mov	ecx, [esi+4]
and	ecx, eax
push	ecx
push	ebp
mov	ecx, ebx
call	sub_6940A0
test	eax, eax
jl	short loc_69FBF2
inc	dword ptr [edi+8]
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	ecx, [esi+edx*4+0Ch]
add	dword ptr [ecx+8], 0FFFFFFFFh
lea	esi, [esi+edx*4+0Ch]
jnz	short loc_69FBDD
call	sub_650DF0

loc_69FBDD:
mov	[esi], edi
mov	eax, [ebp+4]
push	eax
lea	ecx, [esi+4]
call	sub_694FE0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_69FBF2:
mov	eax, [esp+10h+arg_4]

loc_69FBF6:
mov	ecx, [esp+10h+arg_0]
push	eax
push	ebp
push	ecx
mov	ecx, ebx
call	sub_69FA00
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_69FB90 endp

align 10h



sub_69FC10 proc	near

var_40=	dword ptr -40h
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 28h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi+30h]
xor	ebx, ebx
push	edi
cmp	ecx, ebx
jz	loc_6A00A4
mov	eax, [ecx]
mov	edx, [eax+5Ch]
call	edx
mov	[esp+38h+var_20], eax
cmp	eax, ebx
jz	short loc_69FC3C
mov	ecx, eax
call	sub_64A420

loc_69FC3C:
mov	eax, [esi+28h]
lea	edi, [eax-1]
cmp	edi, ebx
jl	short loc_69FC53

loc_69FC46:
push	edi
mov	ecx, esi
call	sub_69ACA0
sub	edi, 1
jns	short loc_69FC46

loc_69FC53:
lea	ecx, [esi+24h]
push	ebx
push	ecx
call	sub_693F00
mov	eax, [esi+2840h]
xor	ecx, ecx
cmp	eax, ebx
jz	short loc_69FCBD
lea	esp, [esp+0]

loc_69FC70:
mov	edx, [eax+10h]
mov	byte ptr [edx+68h], 1
mov	eax, [eax+4]
inc	ecx
cmp	eax, ebx
jnz	short loc_69FC70
mov	[esp+38h+var_24], ecx
cmp	ecx, ebx
jbe	short loc_69FCBD
jmp	short loc_69FC90
align 10h

loc_69FC90:
mov	edi, [esi+2840h]
xor	ebp, ebp
cmp	edi, ebx
jz	short loc_69FCB9
lea	esp, [esp+0]

loc_69FCA0:
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_69FCAE
inc	ebp

loc_69FCAE:
mov	edi, [edi+4]
cmp	edi, ebx
jnz	short loc_69FCA0
mov	ecx, [esp+38h+var_24]

loc_69FCB9:
cmp	ecx, ebp
ja	short loc_69FC90

loc_69FCBD:
cmp	[esi+2838h], ebx
jz	short loc_69FCF0

loc_69FCC5:
mov	edi, [esi+2838h]
mov	eax, [edi]
mov	ecx, edi
mov	[esi+2838h], eax
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
cmp	[esi+2838h], ebx
jnz	short loc_69FCC5

loc_69FCF0:
cmp	[esi+2840h], ebx
jz	short loc_69FD1F
jmp	short loc_69FD00
align 10h

loc_69FD00:
mov	ecx, [esi+2840h]
mov	edx, [ecx+4]
mov	[esi+2840h], edx
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
cmp	[esi+2840h], ebx
jnz	short loc_69FD00

loc_69FD1F:
mov	ecx, [esi+280Ch]
mov	[esi+2838h], ebx
mov	[esi+2840h], ebx
cmp	ecx, ebx
jz	short loc_69FD57
jmp	short loc_69FD40
align 10h

loc_69FD40:
mov	edi, [ecx+8Ch]
mov	[ecx+8Ch], ebx
call	sub_64A400
mov	ecx, edi
cmp	edi, ebx
jnz	short loc_69FD40

loc_69FD57:
mov	[esi+280Ch], ebx
or	dword ptr [esi+2474h], 80000h
lea	ecx, [esi+8]
mov	[esi+2808h], ebx
mov	[esi+2804h], ebx
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	1Bh
mov	[esp+3Ch+var_25], bl
call	edx
mov	edi, eax
mov	[esp+38h+var_24], edi
cmp	edi, ebx
jz	short loc_69FDAA
mov	eax, [edi]
mov	edx, [eax+48h]
push	esi
mov	ecx, edi
call	edx
test	al, al
jz	short loc_69FDAA
mov	eax, [edi]
mov	edx, [eax+44h]
push	ebx
mov	ecx, edi
mov	[esp+3Ch+var_25], 1
call	edx

loc_69FDAA:
mov	eax, [esi+2810h]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
lea	ecx, [esi+0F4h]
mov	[esi+2810h], ebx
call	sub_6915E0
xor	eax, eax
cmp	[esi+28h], ebx
jbe	short loc_69FDFE
mov	edx, [esi+24h]
mov	ecx, edx
jmp	short loc_69FDE0
align 10h

loc_69FDE0:
cmp	[ecx], ebx
jz	short loc_69FDEF
inc	eax
add	ecx, 8
cmp	eax, [esi+28h]
jb	short loc_69FDE0
jmp	short loc_69FDFE

loc_69FDEF:
mov	eax, [edx+eax*8+4]
cmp	eax, ebx
jz	short loc_69FDFE
mov	ecx, eax
call	sub_685780

loc_69FDFE:
mov	ecx, [esi+23C4h]
call	sub_6726E0
mov	edi, [esi+23C8h]
mov	[esi+9D0h], ebx
cmp	edi, ebx
jz	short loc_69FE53
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_69FE2D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_69FE2D:
mov	ecx, [edi+14h]
add	dword ptr [ecx+8], 0FFFFFFFFh
lea	ebp, [edi+8]
jnz	short loc_69FE3E
call	sub_650DF0

loc_69FE3E:
mov	ecx, ebp
call	sub_65E2F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_69FE53:
mov	ecx, esi
mov	[esi+23C8h], ebx
call	sub_696D20
and	dword ptr [esi+2474h], 3FFFFFh
mov	ebp, [esi+14h]
mov	ecx, [ebp+1Ch]
mov	ecx, [ecx+14h]
mov	edi, [esi+20h]
cmp	ecx, ebx
jz	short loc_69FE8E
push	1
call	sub_702500
mov	edx, [ebp+1Ch]
mov	ecx, [edx+14h]
push	1
call	sub_702640

loc_69FE8E:
mov	eax, [ebp+1Ch]
mov	ecx, [eax+0Ch]
call	sub_66A5F0
mov	edx, [edi]
mov	eax, [edx+50h]
mov	ecx, edi
call	eax
mov	[ebp+24h], eax
mov	edx, [edi]
mov	eax, [edx+18h]
push	20000h
mov	ecx, edi
call	eax
mov	edi, [edi+30h]
mov	ecx, esi
mov	[ebp+28h], edi
call	sub_68ED20
mov	ecx, [esi+23C4h]
push	1
call	sub_6707D0
mov	eax, [esi+14h]
mov	ecx, [eax+0Ch]
call	sub_66A5A0
mov	ecx, [esi+23C4h]
push	esi
call	sub_678AE0
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	1Ch
call	eax
cmp	eax, ebx
jz	short loc_69FF17
mov	ecx, [esi+23C4h]
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	ecx, [ecx+8]
mov	[eax+14h], ecx
inc	dword ptr [ecx+8]
mov	[eax+18h], ebx
jmp	short loc_69FF19

loc_69FF17:
xor	eax, eax

loc_69FF19:
mov	ecx, [esi+20h]
mov	[esi+23C8h], eax
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	1E8h
call	eax
mov	edi, [esp+38h+var_20]
cmp	eax, ebx
jz	short loc_69FF5C
push	ebx
push	ecx
mov	ecx, esp
push	ebx
mov	dword ptr [ecx], 40000h
mov	ecx, [edi+1Ch]
mov	ecx, [ecx+0Ch]
push	esi
push	edi
push	ecx
mov	ecx, eax
call	sub_68A1F0
mov	ebp, eax
mov	[esp+38h+var_1C], ebp
cmp	ebp, ebx
jnz	short loc_69FF7F

loc_69FF5C:
mov	ecx, [esp+38h+var_24]
cmp	ecx, ebx
jz	short loc_69FF69
call	sub_64A430

loc_69FF69:
cmp	edi, ebx
jz	loc_6A00A4
mov	ecx, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
jmp	sub_666B00

loc_69FF7F:
cmp	[esi+0FCh], ebx
jz	short loc_69FFE0
xor	edi, edi
cmp	[esi+9C4h], ebx
jbe	short loc_69FFE0

loc_69FF91:
mov	ecx, [esi+0FCh]
lea	eax, [esp+38h+var_18]
mov	[esp+38h+var_18], 0Ah
mov	[esp+38h+var_14], ebx
mov	[esp+38h+var_10], edi
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	esi
call	edx
mov	ecx, [esi+0FCh]
lea	edx, [esp+38h+var_C]
mov	[esp+38h+var_C], 0Ch
mov	[esp+38h+var_8], ebx
mov	[esp+38h+var_4], edi
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	esi
call	eax
inc	edi
cmp	edi, [esi+9C4h]
jb	short loc_69FF91

loc_69FFE0:
mov	edi, [esi+23DCh]
cmp	edi, ebx
jz	short loc_69FFFF
mov	ecx, edi
call	sub_69C850
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_69FFFF:
push	ebx
mov	ecx, ebp
mov	[esi+23DCh], ebx
call	sub_6850B0
push	ebp
push	ebx
mov	ecx, esi
call	sub_699A10
mov	ecx, esi
call	sub_68E4B0
push	ebp
mov	ecx, esi
call	sub_69C6D0
lea	edi, [esi+9D4h]
mov	ebp, 4

loc_6A0030:
mov	ecx, edi
call	sub_6A7870
add	edi, 67Ch
sub	ebp, 1
jnz	short loc_6A0030
mov	edi, [esp+38h+var_24]
cmp	[esp+38h+var_25], bl
jz	short loc_6A0056
mov	edx, [edi]
mov	eax, [edx+44h]
push	esi
mov	ecx, edi
call	eax

loc_6A0056:
mov	edx, [esi]
fldz
mov	eax, [edx+94h]
push	ebx
push	ecx
mov	ecx, esi
fstp	[esp+40h+var_40]
call	eax
fstp	st
or	dword ptr [esi+2474h], 400h
mov	ecx, [esi+14h]
mov	ecx, [ecx+0Ch]
call	sub_66A5A0
mov	ecx, [esp+38h+var_1C]
call	sub_64A400
cmp	edi, ebx
jz	short loc_6A0094
mov	ecx, edi
call	sub_64A430

loc_6A0094:
mov	ecx, [esp+38h+var_20]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
jmp	sub_666B00

loc_6A00A4:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_69FC10 endp

align 10h



sub_6A00B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 1Ch
push	esi
mov	esi, ecx
cmp	dword ptr [esi+23DCh], 0
jnz	short loc_6A00E4
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	4
call	edx
test	eax, eax
jz	short loc_6A00DC
mov	dword ptr [eax], 0
jmp	short loc_6A00DE

loc_6A00DC:
xor	eax, eax

loc_6A00DE:
mov	[esi+23DCh], eax

loc_6A00E4:
mov	eax, [esp+20h+arg_8]
mov	byte ptr [esp+20h+var_4], 0
mov	dword ptr [esp+20h+var_C], 0
mov	[esp+20h+var_8], 0
test	eax, eax
jz	short loc_6A010E
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6A010E:
mov	[esp+20h+var_14], eax
mov	eax, [esp+20h+arg_4]
test	eax, eax
jz	short loc_6A011C
inc	dword ptr [eax]

loc_6A011C:
mov	edx, [esp+20h+arg_C]
push	edx
lea	ecx, [esp+24h+var_C]
mov	[esp+24h+var_10], eax
call	sub_67C4C0
mov	eax, [esp+20h+arg_0]
mov	ecx, [esi+23DCh]
mov	[esp+20h+var_1C], eax
lea	eax, [esp+20h+var_1C]
push	eax
lea	edx, [esp+24h+var_14]
push	ecx
mov	[esp+28h+var_18], edx
call	sub_69FB90
lea	ecx, [esp+20h+var_14]
call	sub_696C00
pop	esi
add	esp, 1Ch
retn	10h
sub_6A00B0 endp

align 10h



sub_6A0160 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	esi
push	edi
mov	esi, ecx
lea	ecx, [esi+2484h]
push	0
lea	edi, [esi+8]
push	ecx
mov	dword ptr [esi], offset	off_1437758
mov	dword ptr [edi], offset	off_1437744
call	sub_683390
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	1Bh
mov	ecx, edi
call	edx
mov	edi, eax
mov	[esp+1Ch+var_14], edi
test	edi, edi
jz	short loc_6A01B0
mov	eax, [edi]
mov	edx, [eax+48h]
push	esi
mov	ecx, edi
call	edx
test	al, al
jz	short loc_6A01B0
mov	eax, [edi]
mov	edx, [eax+50h]
mov	ecx, edi
call	edx

loc_6A01B0:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+2810h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esi+10Ch]
test	ecx, ecx
jz	short loc_6A01D3
call	sub_64A400

loc_6A01D3:
mov	dword ptr [esi+10Ch], 0
cmp	dword ptr [esi+30h], 0
push	ebp
jz	short loc_6A0212
mov	ecx, [esi+34h]
mov	edx, [esi+23C4h]
mov	eax, [ecx]
mov	ebp, [edx+280h]
mov	edx, [eax+30h]
mov	edi, [esi+30h]
call	edx
push	eax
mov	eax, [edi]
mov	edx, [eax+0A8h]
mov	ecx, edi
call	edx
push	eax
mov	ecx, ebp
call	sub_6509D0

loc_6A0212:
mov	ecx, esi
call	sub_69A6E0
lea	ecx, [esi+0F4h]
call	sub_6915E0
xor	eax, eax
cmp	[esi+28h], eax
jbe	short loc_6A024F
mov	edx, [esi+24h]
mov	ecx, edx

loc_6A0230:
cmp	dword ptr [ecx], 0
jz	short loc_6A0240
inc	eax
add	ecx, 8
cmp	eax, [esi+28h]
jb	short loc_6A0230
jmp	short loc_6A024F

loc_6A0240:
mov	eax, [edx+eax*8+4]
test	eax, eax
jz	short loc_6A024F
mov	ecx, eax
call	sub_685780

loc_6A024F:
mov	edi, [esi+28h]
test	edi, edi
jbe	short loc_6A0271
jmp	short loc_6A0260
align 10h

loc_6A0260:
mov	eax, [esi+24h]
mov	ecx, [eax+edi*8-4]
call	sub_67EBB0
sub	edi, 1
jnz	short loc_6A0260

loc_6A0271:
mov	edi, [esi+28h]
test	edi, edi
jbe	short loc_6A0291
jmp	short loc_6A0280
align 10h

loc_6A0280:
mov	ecx, [esi+24h]
mov	ecx, [ecx+edi*8-4]
call	sub_67EBA0
sub	edi, 1
jnz	short loc_6A0280

loc_6A0291:
push	ebx
lea	ecx, [esi+24h]
push	0
push	ecx
call	sub_693F00
mov	ecx, esi
call	sub_696970
mov	edi, [esi+23C8h]
test	edi, edi
jz	short loc_6A0315
mov	eax, [edi]
test	eax, eax
jz	short loc_6A02C2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6A02C2:
mov	ecx, [edi+14h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6A02D0
call	sub_650DF0

loc_6A02D0:
mov	eax, [edi+0Ch]
mov	ecx, [edi+8]
lea	ebp, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_6A02F6
mov	ebx, eax

loc_6A02E0:
mov	ecx, [ebp+0]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6A02EE
call	sub_650DF0

loc_6A02EE:
sub	ebp, 4
sub	ebx, 1
jnz	short loc_6A02E0

loc_6A02F6:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+8]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6A0315:
mov	eax, [esi+2840h]
xor	ebx, ebx
test	eax, eax
jz	short loc_6A0359

loc_6A0321:
mov	ecx, [eax+10h]
mov	byte ptr [ecx+68h], 1
mov	eax, [eax+4]
inc	ebx
test	eax, eax
jnz	short loc_6A0321
test	ebx, ebx
jbe	short loc_6A0359

loc_6A0334:
mov	edi, [esi+2840h]
xor	ebp, ebp
test	edi, edi
jz	short loc_6A0355

loc_6A0340:
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax
test	al, al
jz	short loc_6A034E
inc	ebp

loc_6A034E:
mov	edi, [edi+4]
test	edi, edi
jnz	short loc_6A0340

loc_6A0355:
cmp	ebx, ebp
ja	short loc_6A0334

loc_6A0359:
cmp	dword ptr [esi+2838h], 0
jz	short loc_6A038E

loc_6A0362:
mov	edi, [esi+2838h]
mov	ecx, [edi]
mov	[esi+2838h], ecx
mov	ecx, edi
call	sub_6927F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
cmp	dword ptr [esi+2838h], 0
jnz	short loc_6A0362

loc_6A038E:
xor	ebx, ebx
cmp	[esi+2840h], ebx
jz	short loc_6A03BF
jmp	short loc_6A03A0
align 10h

loc_6A03A0:
mov	ecx, [esi+2840h]
mov	edx, [ecx+4]
mov	[esi+2840h], edx
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx
cmp	[esi+2840h], ebx
jnz	short loc_6A03A0

loc_6A03BF:
mov	eax, [esi+23C4h]
mov	[eax+290h], ebx
mov	edi, [esi+23DCh]
cmp	edi, ebx
jz	short loc_6A03EA
mov	ecx, edi
call	sub_69C850
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6A03EA:
mov	ecx, [esi+280Ch]
cmp	ecx, ebx
jz	short loc_6A040B

loc_6A03F4:
mov	edi, [ecx+8Ch]
mov	[ecx+8Ch], ebx
call	sub_64A400
mov	ecx, edi
cmp	edi, ebx
jnz	short loc_6A03F4

loc_6A040B:
lea	ecx, [esi+23CCh]
mov	[esi+280Ch], ebx
call	sub_652060
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0C8h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0CCh]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+10h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [esi+23C4h]
push	ebx
call	sub_6707D0
lea	eax, [esi+2408h]
mov	[esp+1Ch+var_4], eax
mov	[esp+1Ch+var_8], ebx
mov	[esp+1Ch+arg_0], ebx
mov	[esp+1Ch], ebx

loc_6A0477:
lea	ecx, [esp+1Ch+var_8]
call	sub_69A1B0
test	eax, eax
jnz	short loc_6A0477
mov	eax, [esp+1Ch]
cmp	eax, ebx
jz	short loc_6A0496
mov	ecx, [esp+1Ch+var_4]
push	eax
call	sub_69A110

loc_6A0496:
mov	eax, [esi+14h]
mov	ecx, [eax+0Ch]
call	sub_66A5A0
mov	ecx, [esp+1Ch+var_C]
cmp	ecx, ebx
jz	short loc_6A04AE
call	sub_64A430

loc_6A04AE:
mov	ecx, [esi+2848h]
cmp	ecx, ebx
jz	short loc_6A04BD
call	sub_64A430

loc_6A04BD:
mov	ecx, [esi+2844h]
cmp	ecx, ebx
jz	short loc_6A04CC
call	sub_64A430

loc_6A04CC:
mov	eax, [esi+2830h]
cmp	eax, ebx
jz	short loc_6A04DD
push	eax		; hLibModule
call	ds:FreeLibrary

loc_6A04DD:
mov	[esp+1Ch+var_C], 0Fh
lea	ebp, [esi+2808h]
jmp	short loc_6A04F0
align 10h

loc_6A04F0:
mov	edi, [ebp-34h]
sub	ebp, 34h
test	edi, edi
jz	short loc_6A0516
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_6A0516
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6A0516:
mov	eax, [ebp-4]
test	eax, eax
jz	short loc_6A0530
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6A0530
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6A0530:
mov	eax, [ebp-10h]
mov	ecx, [ebp-14h]
lea	edi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_6A0553
mov	ebx, eax

loc_6A0540:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6A054B
call	sub_64A400

loc_6A054B:
sub	edi, 4
sub	ebx, 1
jnz	short loc_6A0540

loc_6A0553:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp-14h]
mov	edx, [edx+30h]
push	eax
call	edx
sub	[esp+1Ch+var_C], 1
jns	short loc_6A04F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+24A0h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [esi+2488h]
mov	ecx, [esi+2484h]
lea	edi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_6A05A8
mov	ebp, eax

loc_6A0595:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6A05A0
call	sub_64A400

loc_6A05A0:
sub	edi, 4
sub	ebp, 1
jnz	short loc_6A0595

loc_6A05A8:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+2484h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, [esi+247Ch]
mov	ecx, [esi+2478h]
lea	edi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_6A05E5
mov	ebp, eax

loc_6A05D2:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6A05DD
call	sub_64A400

loc_6A05DD:
sub	edi, 4
sub	ebp, 1
jnz	short loc_6A05D2

loc_6A05E5:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+2478h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+2468h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+2408h]
call	sub_69B620
lea	ecx, [esi+2404h]
call	sub_693EA0
lea	ecx, [esi+23CCh]
call	sub_652830
mov	ecx, [esi+23C4h]
test	ecx, ecx
jz	short loc_6A063D
call	sub_64A400

loc_6A063D:
lea	edi, [esi+23C4h]
mov	ebp, 3
jmp	short loc_6A0650
align 10h

loc_6A0650:
sub	edi, 67Ch
mov	ecx, edi
call	sub_64A3F0
sub	ebp, 1
jns	short loc_6A0650
lea	edi, [esi+9C4h]
mov	ebx, 3
lea	ecx, [ecx+0]

loc_6A0670:
mov	eax, [edi-1Ch]
sub	edi, 24h
test	eax, eax
jz	short loc_6A068D
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6A068D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6A068D:
mov	eax, [edi+4]
test	eax, eax
jz	short loc_6A06A7
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6A06A7
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6A06A7:
mov	eax, [edi]
test	eax, eax
jz	short loc_6A06C0
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6A06C0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6A06C0:
sub	ebx, 1
jns	short loc_6A0670
mov	ecx, [esi+10Ch]
pop	ebx
test	ecx, ecx
jz	short loc_6A06D5
call	sub_64A400

loc_6A06D5:
mov	ecx, [esi+108h]
test	ecx, ecx
jz	short loc_6A06E4
call	sub_64A430

loc_6A06E4:
mov	ecx, [esi+104h]
test	ecx, ecx
jz	short loc_6A06F3
call	sub_64A430

loc_6A06F3:
mov	ecx, [esi+100h]
test	ecx, ecx
jz	short loc_6A0702
call	sub_64A430

loc_6A0702:
mov	ecx, [esi+0FCh]
test	ecx, ecx
jz	short loc_6A0711
call	sub_64A430

loc_6A0711:
mov	ecx, [esi+0F8h]
test	ecx, ecx
jz	short loc_6A0720
call	sub_64A430

loc_6A0720:
lea	ecx, [esi+0F4h]
call	sub_6915E0
mov	ecx, [esi+0F0h]
test	ecx, ecx
jz	short loc_6A073A
call	sub_64A430

loc_6A073A:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_6A0746
call	sub_666B00

loc_6A0746:
mov	eax, [esi+28h]
mov	ecx, [esi+24h]
lea	edi, [ecx+eax*8-8]
test	eax, eax
jbe	short loc_6A0773
add	edi, 4
mov	ebp, eax
lea	esp, [esp+0]

loc_6A0760:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6A076B
call	sub_64A400

loc_6A076B:
sub	edi, 8
sub	ebp, 1
jnz	short loc_6A0760

loc_6A0773:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+24h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [esi+14h]
pop	ebp
test	ecx, ecx
jz	short loc_6A0791
call	sub_64A430

loc_6A0791:
pop	edi
mov	dword ptr [esi+8], offset off_1437474
mov	ecx, esi
pop	esi
add	esp, 14h
jmp	sub_64A3F0
sub_6A0160 endp

align 10h



sub_6A07B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6A0160
test	[esp+4+arg_0], 1
jz	short loc_6A07CD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A07CD:
mov	eax, esi
pop	esi
retn	4
sub_6A07B0 endp

align 10h



sub_6A07E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
push	ebx
push	esi
lea	edx, [eax+0Fh]
lea	esi, [eax+1000h]
add	eax, 0FFFh
and	eax, 0FFFFF000h
push	edi
and	edx, 0FFFFFFF0h
mov	edi, eax
sub	edi, edx
and	esi, 0FFFFFFF0h
mov	dword ptr [ecx], 0
mov	dword ptr [ecx+4], 0
cmp	edi, 10h
jbe	short loc_6A081F
lea	ebx, [eax-10h]
mov	[ecx], ebx

loc_6A081F:
mov	ebx, esi
sub	ebx, eax
cmp	ebx, 10h
jbe	short loc_6A082B
mov	[ecx+4], eax

loc_6A082B:
cmp	edi, ebx
lea	edi, [eax-50h]
ja	short loc_6A0835
lea	edi, [eax+10h]

loc_6A0835:
mov	[ecx+8], edi
pop	edi
mov	[ecx+10h], esi
pop	esi
mov	[ecx+0Ch], edx
mov	[ecx+14h], eax
mov	dword ptr [ecx+18h], 0
pop	ebx
retn
sub_6A07E0 endp

align 10h



sub_6A0850 proc	near
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	esi, offset dword_1856060
lea	ebx, [ebx+0]

loc_6A0860:
mov	eax, [esi]
cmp	eax, offset unk_1856460
jz	short loc_6A087D
mov	ebp, [esi+4]
mov	ecx, [edi]
mov	edx, [ecx]
inc	ebp
push	4
shl	ebp, 4
push	ebp
push	eax
mov	eax, [edx+10h]
call	eax

loc_6A087D:
mov	dword ptr [esi], offset	unk_1856460
mov	dword ptr [esi+4], 0
add	esi, 8
cmp	esi, offset unk_1856460
jl	short loc_6A0860
pop	edi
pop	esi
pop	ebp
retn
sub_6A0850 endp

align 10h



sub_6A08A0 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+24h]
xor	edx, edx
push	esi
test	ecx, ecx
jbe	short loc_6A08CA
mov	esi, [esp+4+arg_0]
mov	edi, edi

loc_6A08B0:
mov	eax, esi
sub	eax, dword_1856060[edx*8]
sar	eax, 4
cmp	eax, dword_1856064[edx*8]
jbe	short loc_6A08D1
inc	edx
cmp	edx, ecx
jb	short loc_6A08B0

loc_6A08CA:
or	eax, 0FFFFFFFFh
pop	esi
retn	4

loc_6A08D1:
shl	eax, 7
or	eax, edx
pop	esi
retn	4
sub_6A08A0 endp

align 10h



sub_6A08E0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	edx, ecx
and	edx, 0FFFFF000h
mov	eax, 5FC0h
cmp	[edx], ax
jnz	short loc_6A091F
mov	eax, [edx+4]
push	esi
mov	esi, eax
and	esi, 7Fh
lea	esi, dword_1856060[esi*8]
shr	eax, 7
and	eax, [esi+4]
shl	eax, 4
add	eax, [esi]
mov	esi, ecx
sub	esi, [eax+0Ch]
cmp	esi, 1000h
pop	esi
jb	short locret_6A095B

loc_6A091F:
mov	eax, 5FC0h
cmp	[edx+0FF0h], ax
jnz	short loc_6A0959
mov	eax, [edx+0FF4h]
mov	edx, eax
and	edx, 7Fh
shr	eax, 7
and	eax, dword_1856064[edx*8]
lea	edx, dword_1856060[edx*8]
shl	eax, 4
add	eax, [edx]
sub	ecx, [eax+0Ch]
cmp	ecx, 1000h
jb	short locret_6A095B

loc_6A0959:
xor	eax, eax

locret_6A095B:
retn	4
sub_6A08E0 endp

align 10h



sub_6A0960 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	edx, [eax+1]
lea	ecx, [ecx+0]

loc_6A0970:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6A0970
mov	ecx, [edi]
sub	eax, edx
lea	esi, [eax+12Ch]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	4
and	esi, 0FFFFFFF0h
push	esi
call	edx
mov	ebp, eax
mov	[esp+10h+var_4], ebp
test	ebp, ebp
jnz	short loc_6A099F
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	0Ch

loc_6A099F:
push	ebx
mov	ecx, ebp
call	sub_64CA10
lea	ecx, [ebp+70h]
mov	ebp, [esp+14h+arg_8]
mov	ebx, eax
test	ecx, ecx
jz	short loc_6A09C7
mov	eax, [ebp+14h]
mov	edx, [ebp+4]
push	eax
mov	eax, [edi]
push	edx
push	ebx
push	eax
call	sub_6A0EA0
jmp	short loc_6A09C9

loc_6A09C7:
xor	eax, eax

loc_6A09C9:
mov	[ebx+0Ch], esi
mov	dword ptr [ebx+10h], 1
mov	dword ptr [ebx+18h], 0
mov	esi, ebp
lea	edi, [ebx+1Ch]
mov	ecx, 8
rep movsd
mov	esi, [esp+14h+var_4]
mov	ecx, [esp+14h+arg_4]
mov	[ebx+3Ch], ecx
add	esi, 11Ch
mov	[ebx+40h], esi
mov	dl, [ebp+0]
not	dl
and	dl, 1
mov	[ebx+64h], dl
mov	ecx, [ebp+0]
mov	ebp, [esp+14h+arg_0]
shr	ecx, 4
not	cl
mov	[ebx+68h], eax
and	cl, 1
mov	eax, ebp
mov	[ebx+65h], cl
lea	edi, [eax+1]
nop

loc_6A0A20:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6A0A20
sub	eax, edi
inc	eax
push	eax
push	ebp
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	0Ch
sub_6A0960 endp

align 10h



sub_6A0A40 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, [esi+0Ch]
push	edi
mov	edi, ecx
mov	ecx, [esi+68h]
call	nullsub_2
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
mov	ecx, [edi]
mov	eax, [ecx]
mov	edx, [eax+10h]
push	4
push	ebx
push	esi
call	edx
pop	edi
pop	esi
pop	ebx
retn	4
sub_6A0A40 endp

align 10h



sub_6A0A80 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
push	edi		; int
lea	ecx, [esi+4]	; lpCriticalSection
mov	[esi], eax
call	sub_64D6D0
lea	eax, [esi+1Ch]
mov	[eax], eax
mov	[eax+4], eax
mov	[esi+24h], edi
mov	[esi+28h], edi
mov	dword_1856468, edi
mov	dword_185646C, edi
mov	eax, offset dword_1856064
mov	ecx, offset unk_1856460
lea	esp, [esp+0]

loc_6A0AC0:
mov	[eax-4], ecx
mov	[eax], edi
add	eax, 8
cmp	eax, offset unk_1856464
jl	short loc_6A0AC0
pop	edi
mov	dword_1856470, esi
mov	eax, esi
pop	esi
retn	4
sub_6A0A80 endp

align 10h



sub_6A0AE0 proc	near
push	esi
mov	esi, ecx
call	sub_6A0850
lea	ecx, [esi+4]
mov	dword_1856470, 0
pop	esi
jmp	sub_64D730
sub_6A0AE0 endp

align 10h



sub_6A0B00 proc	near
push	edi
mov	edi, ecx
mov	ecx, [edi+24h]
cmp	ecx, 80h
jb	short loc_6A0B12
xor	al, al
pop	edi
retn

loc_6A0B12:
push	esi
shr	ecx, 4
mov	esi, 80h
shl	esi, cl
mov	ecx, [edi]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
mov	edx, esi
push	4
shl	edx, 4
push	edx
call	eax
xor	edx, edx
cmp	eax, edx
jnz	short loc_6A0B39
pop	esi
xor	al, al
pop	edi
retn

loc_6A0B39:
mov	ecx, [edi+24h]
mov	dword_1856060[ecx*8], eax
push	ebx
mov	ebx, [edi+24h]
lea	ecx, [esi-1]
mov	dword_1856064[ebx*8], ecx
cmp	esi, edx
jbe	short loc_6A0B7E
lea	ecx, [edi+1Ch]
jmp	short loc_6A0B60
align 10h

loc_6A0B60:
mov	[eax+8], edx
mov	[eax+0Ch], edx
mov	ebx, [ecx+4]
mov	[eax+4], ebx
mov	[eax], ecx
mov	ebx, [ecx+4]
mov	[ebx], eax
mov	[ecx+4], eax
add	eax, 10h
sub	esi, 1
jnz	short loc_6A0B60

loc_6A0B7E:
inc	dword ptr [edi+24h]
pop	ebx
pop	esi
mov	al, 1
pop	edi
retn
sub_6A0B00 endp

align 10h



sub_6A0B90 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  4

sub	esp, 1Ch
push	edi
mov	edi, ecx
lea	eax, [edi+1Ch]
cmp	[eax+4], eax
jnz	short loc_6A0BB0
call	sub_6A0B00
test	al, al
jnz	short loc_6A0BB0
xor	eax, eax
pop	edi
add	esp, 1Ch
retn	4

loc_6A0BB0:
mov	ecx, [edi]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	esi
mov	esi, [edi+20h]
push	4
push	1000h
call	edx
mov	[esi+0Ch], eax
test	eax, eax
jnz	short loc_6A0BD6
mov	[esi+8], eax
pop	esi
pop	edi
add	esp, 1Ch
retn	4

loc_6A0BD6:
mov	eax, [esi]
mov	ecx, [esi+4]
mov	[eax+4], ecx
mov	edx, [esi+4]
mov	eax, [esi]
mov	ecx, [esp+24h+arg_0]
mov	[edx], eax
mov	eax, [esi+0Ch]
lea	edx, [esp+24h+var_1C]
push	edx
push	eax
mov	[esi+8], ecx
call	sub_6A07E0
mov	eax, [esp+2Ch+var_1C]
add	esp, 8
test	eax, eax
jz	short loc_6A0C0D
mov	ecx, 5FC0h
mov	[eax], cx

loc_6A0C0D:
mov	eax, [esp+24h+var_18]
test	eax, eax
jz	short loc_6A0C1D
mov	edx, 5FC0h
mov	[eax], dx

loc_6A0C1D:
mov	eax, esi
pop	esi
pop	edi
add	esp, 1Ch
retn	4
sub_6A0B90 endp

align 10h



sub_6A0C30 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  4

sub	esp, 1Ch
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
lea	eax, [esp+24h+var_1C]
mov	edi, ecx
mov	ecx, [esi+0Ch]
push	eax
push	ecx
call	sub_6A07E0
mov	eax, [esp+2Ch+var_1C]
xor	ecx, ecx
add	esp, 8
cmp	eax, ecx
jz	short loc_6A0C5B
xor	edx, edx
mov	[eax], dx

loc_6A0C5B:
mov	eax, [esp+24h+var_18]
cmp	eax, ecx
jz	short loc_6A0C68
xor	edx, edx
mov	[eax], dx

loc_6A0C68:
mov	eax, [esi+0Ch]
mov	[esi+0Ch], ecx
mov	[esi+8], ecx
mov	ecx, [edi]
mov	edx, [ecx]
push	4
push	1000h
push	eax
mov	eax, [edx+10h]
call	eax
mov	ecx, [edi+20h]
lea	eax, [edi+1Ch]
mov	[esi+4], ecx
mov	[esi], eax
mov	edx, [eax+4]
mov	[edx], esi
pop	edi
mov	[eax+4], esi
pop	esi
add	esp, 1Ch
retn	4
sub_6A0C30 endp

align 10h



sub_6A0CA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
lea	eax, [edx-1]
cmp	eax, 0Fh	; switch 16 cases
ja	short loc_6A0CDE ; default
			; jumptable 006A0CB3 cases 2,4-6,8-14
movzx	eax, ds:byte_6A0D00[eax]
jmp	ds:off_6A0CF0[eax*4] ; switch jump

loc_6A0CBA:		; jumptable 006A0CB3 cases 0,1,3
mov	edx, [esp+arg_0]
mov	[ecx+0Ch], edx
retn	8

loc_6A0CC4:		; jumptable 006A0CB3 case 7
mov	eax, [esp+arg_0]
or	eax, 1
mov	[ecx+0Ch], eax
retn	8

loc_6A0CD1:		; jumptable 006A0CB3 case 15
mov	edx, [esp+arg_0]
or	edx, 2
mov	[ecx+0Ch], edx
retn	8

loc_6A0CDE:		; default
mov	eax, [esp+arg_0] ; jumptable 006A0CB3 cases 2,4-6,8-14
or	eax, 3
mov	[ecx+10h], edx
mov	[ecx+0Ch], eax
retn	8
sub_6A0CA0 endp

align 10h
off_6A0CF0 dd offset loc_6A0CBA	; jump table for switch	statement
dd offset loc_6A0CC4
dd offset loc_6A0CD1
dd offset loc_6A0CDE
byte_6A0D00 db	    0,	   0,	  3,	 0 ; indirect table for	switch statement
db	3,     3,     3,     1
db	3,     3,     3,     3
db	3,     3,     3,     2
; [00000001 BYTES: COLLAPSED FUNCTION nullsub_2. PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_6A0D20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_8]
xor	eax, eax
mov	[esi], eax
mov	[esi+4], eax
push	edi
mov	edi, [esp+8+arg_0]
mov	[esi+8], eax
mov	eax, [esp+8+arg_4]
push	eax
push	edi
add	ecx, 0Ch
call	sub_7088E0
mov	[esi], edi
pop	edi
mov	[esi+8], eax
pop	esi
retn	0Ch
sub_6A0D20 endp

align 10h



sub_6A0D50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
xor	ecx, ecx
mov	[eax], ecx
mov	ecx, [esp+arg_0]
mov	edx, ecx
sub	edx, [esp+arg_4]
mov	[eax+4], ecx
mov	[eax+8], edx
retn	0Ch
sub_6A0D50 endp

align 10h



sub_6A0D70 proc	near

var_1C=	byte ptr -1Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 1Ch
push	edi
mov	edi, ecx
mov	ecx, [esp+20h+arg_8]
xor	eax, eax
cmp	ecx, 800h
jnb	short loc_6A0DCB
mov	edx, [esp+20h+arg_4]
push	esi
lea	esi, [ecx+0Fh]
lea	eax, [esp+24h+var_1C]
push	eax
mov	eax, [esp+28h+arg_0]
lea	ecx, [esp+28h+arg_8]
push	ecx
and	esi, 0FFFFFFF0h
push	esi
push	edx
push	eax
lea	ecx, [edi+0Ch]
call	sub_708AD0
test	eax, eax
jz	short loc_6A0DCA
mov	ecx, [esp+24h+arg_C]
mov	edx, [esp+24h+var_4]
mov	[ecx+8], esi
sub	esi, [esp+24h+arg_8]
mov	[ecx], edx
mov	dword ptr [ecx+4], 0
add	[edi+9Ch], esi

loc_6A0DCA:
pop	esi

loc_6A0DCB:
pop	edi
add	esp, 1Ch
retn	10h
sub_6A0D70 endp

align 10h



sub_6A0DE0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	dword ptr [edx+8], 0
mov	dword ptr [edx+4], 0
mov	dword ptr [edx], 0
mov	eax, [ecx]
push	esi
push	edi
test	eax, eax
jnz	short loc_6A0E09
pop	edi
mov	[ecx], edx
mov	[edx], ecx
pop	esi
retn	4

loc_6A0E09:
mov	edi, edx
cmp	eax, edx
jz	short loc_6A0E32
nop

loc_6A0E10:
mov	ecx, edi
shr	ecx, 1Fh
lea	esi, [eax+ecx*4+4]
mov	ecx, [esi]
add	edi, edi
test	ecx, ecx
jz	short loc_6A0E2C
mov	eax, ecx
cmp	eax, edx
jnz	short loc_6A0E10
pop	edi
pop	esi
retn	4

loc_6A0E2C:
mov	[esi], edx
mov	[edx], eax
xor	eax, eax

loc_6A0E32:
pop	edi
pop	esi
retn	4
sub_6A0DE0 endp

align 10h



sub_6A0E40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax]
test	esi, esi
jz	short loc_6A0E81
mov	edx, [esp+4+arg_4]
cmp	eax, [ecx]
jnz	short loc_6A0E57
mov	[ecx], edx
jmp	short loc_6A0E63

loc_6A0E57:
xor	ecx, ecx
cmp	[esi+4], eax
setnz	cl
mov	[esi+ecx*4+4], edx

loc_6A0E63:
test	edx, edx
jz	short loc_6A0E81
mov	[edx], esi
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_6A0E75
mov	[edx+4], ecx
mov	[ecx], edx

loc_6A0E75:
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_6A0E81
mov	[edx+8], ecx
mov	[ecx], edx

loc_6A0E81:
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], 0
pop	esi
retn	8
sub_6A0E40 endp

align 10h



sub_6A0EA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
mov	[esi], eax
mov	eax, [esp+4+arg_8]
mov	[esi+4], ecx
cmp	eax, 4
jnb	short loc_6A0EBE
mov	eax, 4

loc_6A0EBE:
lea	ecx, [esi+0Ch]
mov	[esi+8], eax
call	sub_708480
mov	edx, [esp+4+arg_C]
lea	eax, [esi+90h]
mov	[eax], eax
mov	[eax+4], eax
xor	eax, eax
mov	[esi+98h], eax
mov	[esi+9Ch], eax
mov	[esi+0A4h], eax
mov	[esi+0A8h], eax
mov	[esi+0A0h], edx
mov	eax, esi
pop	esi
retn	10h
sub_6A0EA0 endp

align 10h



sub_6A0F00 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	edx, [edi+0A0h]
test	edx, edx
jz	short loc_6A0F48
mov	eax, [edi+98h]
lea	ecx, [eax+1000h]
cmp	ecx, edx
jbe	short loc_6A0F48
mov	ecx, [edi+0A4h]
test	ecx, ecx
jz	short loc_6A0F48
mov	esi, [ecx]
sub	eax, edx
mov	edx, [edi+4]
add	eax, 1000h
push	eax
mov	eax, [esi+4]
push	edx
call	eax
mov	ecx, [esp+8+arg_0]
pop	edi
mov	[ecx], al
xor	eax, eax
pop	esi
retn	4

loc_6A0F48:
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	byte ptr [ebp+0], 0
mov	ebx, dword_1856470
add	ebx, 4
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	edx, [edi+4]
mov	ecx, dword_1856470
push	edx
call	sub_6A0B90
mov	esi, eax
test	esi, esi
jz	short loc_6A0FB4
mov	ecx, dword_1856470
push	esi
call	sub_6A08A0
push	eax
push	esi
lea	ecx, [edi+0Ch]
call	sub_708490
add	dword ptr [edi+98h], 1000h
mov	ecx, [edi+94h]
lea	eax, [edi+90h]
mov	[esi+4], ecx
mov	[esi], eax
mov	edx, [eax+4]
mov	[edx], esi
mov	[eax+4], esi
mov	byte ptr [ebp+0], 1

loc_6A0FB4:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	ebp
pop	ebx
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6A0F00 endp

align 10h



sub_6A0FD0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, dword_1856470
push	esi
push	edi
add	ebx, 4
push	ebx		; lpCriticalSection
mov	edi, ecx
call	ds:EnterCriticalSection
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+0Ch]
push	eax
lea	ecx, [edi+0Ch]
call	sub_708630
mov	ecx, [esi]
mov	edx, [esi+4]
mov	[ecx+4], edx
mov	ecx, [esi]
mov	eax, [esi+4]
mov	[eax], ecx
mov	ecx, dword_1856470
push	esi
call	sub_6A0C30
add	dword ptr [edi+98h], 0FFFFF000h
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn	4
sub_6A0FD0 endp

align 10h



sub_6A1030 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_1D], 0
lea	ebp, [esi+0Ch]

loc_6A1044:
lea	eax, [esp+2Ch+var_1C]
push	eax
push	edi
mov	ecx, ebp
call	sub_708690
test	eax, eax
jnz	short loc_6A1073
lea	ecx, [esp+2Ch+var_1D]
push	ecx
mov	ecx, esi
call	sub_6A0F00
cmp	[esp+2Ch+var_1D], 0
jnz	short loc_6A1044
pop	edi
pop	esi
xor	eax, eax
pop	ebp
add	esp, 20h
retn	8

loc_6A1073:
mov	ecx, [esp+2Ch+var_1C]
mov	edx, 1
test	ecx, ecx
jz	short loc_6A1084
add	[ecx+2], dx

loc_6A1084:
mov	ecx, [esp+2Ch+var_18]
test	ecx, ecx
jz	short loc_6A1090
add	[ecx+2], dx

loc_6A1090:
mov	ecx, [esp+2Ch+arg_4]
mov	ebp, [esp+2Ch+var_4]
mov	[ecx+8], edi
mov	[ecx], ebp
mov	dword ptr [ecx+4], 0
add	[esi+0A8h], edx
add	[esi+9Ch], edi
pop	edi
pop	esi
pop	ebp
add	esp, 20h
retn	8
sub_6A1030 endp

align 10h



sub_6A10C0 proc	near

var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20h
push	ebx
mov	ebx, [esp+24h+arg_4]
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+30h+arg_0]
mov	[esp+30h+var_1D], 0
lea	ebp, [esi+0Ch]
lea	esp, [esp+0]

loc_6A10E0:
lea	eax, [esp+30h+var_1C]
push	eax
push	ebx
push	edi
mov	ecx, ebp
call	sub_708920
test	eax, eax
jnz	short loc_6A1111
lea	ecx, [esp+30h+var_1D]
push	ecx
mov	ecx, esi
call	sub_6A0F00
cmp	[esp+30h+var_1D], 0
jnz	short loc_6A10E0
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 20h
retn	0Ch

loc_6A1111:
mov	ecx, [esp+30h+var_1C]
mov	edx, 1
test	ecx, ecx
jz	short loc_6A1122
add	[ecx+2], dx

loc_6A1122:
mov	ecx, [esp+30h+var_18]
test	ecx, ecx
jz	short loc_6A112E
add	[ecx+2], dx

loc_6A112E:
mov	ecx, [esp+30h+arg_8]
mov	ebx, [esp+30h+var_4]
mov	[ecx+8], edi
mov	[ecx], ebx
mov	dword ptr [ecx+4], 0
add	[esi+0A8h], edx
add	[esi+9Ch], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	0Ch
sub_6A10C0 endp

align 10h



sub_6A1160 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
sub	esp, 1Ch
push	esi
push	edi
mov	edi, [esp+24h+arg_0]
mov	esi, ecx
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_1C]
push	ecx
push	edx
push	edi
lea	ecx, [esi+0Ch]
call	sub_7087B0
mov	ecx, [esp+24h+arg_4]
sub	[esi+9Ch], ecx
mov	ecx, [esp+24h+var_1C]
xor	eax, eax
test	ecx, ecx
jz	short loc_6A11A8
mov	edx, 0FFFFh
add	[ecx+2], dx
mov	eax, [esp+24h+var_1C]
movzx	eax, word ptr [eax+2]

loc_6A11A8:
mov	ecx, [esp+24h+var_18]
test	ecx, ecx
jz	short loc_6A11C1
mov	edx, 0FFFFh
add	[ecx+2], dx
mov	eax, [esp+24h+var_18]
movzx	eax, word ptr [eax+2]

loc_6A11C1:
test	eax, eax
jnz	short loc_6A11CD
push	edi
mov	ecx, esi
call	sub_6A0FD0

loc_6A11CD:
dec	dword ptr [esi+0A8h]
pop	edi
pop	esi
add	esp, 1Ch
retn	8
sub_6A1160 endp

align 10h



sub_6A11E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	edx, [esp+4+arg_4]
push	ebx
mov	ebx, [esp+8+arg_0]
add	ebx, 3
push	ebp
mov	eax, 10h
push	esi
and	ebx, 0FFFFFFFCh
cmp	eax, edx
push	edi
sbb	edi, edi
and	edi, 4
mov	esi, ecx
add	edi, eax
mov	eax, [esi+0A0h]
test	eax, eax
jz	short loc_6A126A
lea	ecx, [edi+ebx]
add	ecx, [esi+98h]
cmp	ecx, eax
jbe	short loc_6A126A
cmp	dword ptr [esi+0A4h], 0
jz	short loc_6A126A
mov	ebp, dword_1856470
add	ebp, 4
push	ebp		; lpCriticalSection
call	ds:LeaveCriticalSection
sub	edi, [esi+0A0h]
mov	ecx, [esi+0A4h]
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+4]
add	edi, ebx
add	edi, [esi+98h]
push	edi
push	eax
call	edx
mov	ecx, [esp+14h+arg_8]
push	ebp		; lpCriticalSection
mov	[ecx], al
call	ds:EnterCriticalSection
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	10h

loc_6A126A:
mov	eax, [esp+14h+arg_8]
mov	byte ptr [eax],	0
mov	ecx, [esi]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
push	edx
lea	edx, [edi+ebx]
push	edx
call	eax
mov	[esp+14h+var_4], eax
test	eax, eax
jz	short loc_6A12E0
mov	ecx, dword_1856470
mov	edx, [esp+14h+arg_4]
lea	ebp, [eax+ebx]
mov	eax, [esi+4]
push	edx
mov	[esp+18h+arg_0], ecx
push	eax
mov	ecx, ebp
call	sub_6A0CA0
mov	ecx, [esp+14h+arg_0]
push	ebp
add	ecx, 28h
call	sub_6A0DE0
mov	eax, [esp+14h+arg_C]
mov	ecx, [esp+14h+arg_8]
mov	[eax+8], ebx
mov	dword ptr [eax], 0
mov	[eax+4], ebp
inc	dword ptr [esi+0A8h]
mov	eax, [esp+14h+var_4]
add	edi, ebx
add	[esi+98h], edi
add	[esi+9Ch], ebx
mov	byte ptr [ecx],	1

loc_6A12E0:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_6A11E0 endp

align 10h



; int __stdcall	sub_6A12F0(LPCRITICAL_SECTION lpCriticalSection, int, int)
sub_6A12F0 proc	near

var_4= dword ptr -4
lpCriticalSection= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+lpCriticalSection]
mov	esi, ecx
mov	[esp+0Ch+var_4], esi
cmp	edi, 200h
ja	short loc_6A132D
mov	eax, [esp+0Ch+arg_4]
cmp	eax, 10h
jnb	short loc_6A1313
mov	eax, 10h

loc_6A1313:
mov	ecx, [esp+0Ch+arg_8]
push	ecx
add	edi, 0Fh
push	eax
and	edi, 0FFFFFFF0h
push	edi
mov	ecx, esi
call	sub_6A10C0
pop	edi
pop	esi
pop	ecx
retn	0Ch

loc_6A132D:
push	ebx
mov	ebx, [esp+10h+arg_4]
cmp	ebx, 4
jnb	short loc_6A133C
mov	ebx, 4

loc_6A133C:
cmp	edi, ebx
jnb	short loc_6A1342
mov	edi, ebx

loc_6A1342:
mov	eax, dword_1856470
add	eax, 4
push	ebp
add	edi, 3
push	eax		; lpCriticalSection
and	edi, 0FFFFFFFCh
mov	[esp+18h+lpCriticalSection], eax
call	ds:EnterCriticalSection
mov	ebp, [esp+14h+arg_8]
mov	byte ptr [esp+14h+arg_4], 0

loc_6A1365:
push	ebp
lea	edx, [esp+18h+arg_4]
push	edx
push	ebx
push	edi
mov	ecx, esi
call	sub_6A11E0
mov	esi, eax
test	esi, esi
jnz	short loc_6A1386
cmp	byte ptr [esp+14h+arg_4], al
jz	short loc_6A139B
mov	esi, [esp+14h+var_4]
jmp	short loc_6A1365

loc_6A1386:
mov	eax, [esp+14h+lpCriticalSection]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	ebp
pop	ebx
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	0Ch

loc_6A139B:
mov	ecx, [esp+14h+lpCriticalSection]
push	ecx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	ebp
pop	ebx
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn	0Ch
sub_6A12F0 endp




sub_6A13B0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+8]
lea	esi, [edi+8]
test	eax, eax
jnz	short loc_6A13D0
mov	eax, [edi+4]
lea	esi, [edi+4]
test	eax, eax
jz	short loc_6A13EE
lea	ebx, [ebx+0]

loc_6A13D0:
cmp	dword ptr [eax+8], 0
lea	edx, [eax+8]
jnz	short loc_6A13E2
cmp	dword ptr [eax+4], 0
lea	edx, [eax+4]
jz	short loc_6A13E8

loc_6A13E2:
mov	eax, [edx]
mov	esi, edx
jmp	short loc_6A13D0

loc_6A13E8:
mov	dword ptr [esi], 0

loc_6A13EE:
push	eax
push	edi
call	sub_6A0E40
pop	edi
pop	esi
retn	4
sub_6A13B0 endp

align 10h



sub_6A1400 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, ecx
mov	ecx, dword_1856470
push	edi
push	ebx
add	ecx, 28h
call	sub_6A13B0
mov	eax, [ebx+0Ch]
and	eax, 3
cmp	eax, 3
jnb	short loc_6A1430
lea	ecx, [eax+2]
mov	edi, 1
shl	edi, cl
jmp	short loc_6A1433

loc_6A1430:
mov	edi, [ebx+10h]

loc_6A1433:
mov	ebp, [esp+10h+arg_4]
mov	ecx, [esi]
mov	eax, 10h
cmp	eax, edi
sbb	eax, eax
dec	dword ptr [esi+0A8h]
and	eax, 4
add	eax, 10h
mov	edx, eax
sub	edx, ebp
add	edx, ebx
sub	[esi+98h], edx
sub	eax, edx
add	[esi+9Ch], eax
mov	eax, [ecx]
push	edi
push	edx
mov	edx, [eax+10h]
push	ebp
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6A1400 endp

align 10h



sub_6A1480 proc	near

lpCriticalSection= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+8]
cmp	eax, 10h
jbe	short loc_6A14A3
mov	ecx, [esp+8+arg_4]
mov	edx, [esp+8+arg_0]
push	ecx		; int
push	eax		; int
push	edx		; lpCriticalSection
mov	ecx, esi
call	sub_6A12F0
pop	esi
pop	ecx
retn	8

loc_6A14A3:
push	ebx
mov	ebx, [esp+0Ch+arg_0]
cmp	ebx, 200h
ja	short loc_6A14C7
mov	eax, [esp+0Ch+arg_4]
add	ebx, 0Fh
push	eax
and	ebx, 0FFFFFFF0h
push	ebx
call	sub_6A1030
pop	ebx
pop	esi
pop	ecx
retn	8

loc_6A14C7:
mov	eax, dword_1856470
add	eax, 4
push	ebp
push	eax		; lpCriticalSection
mov	[esp+14h+lpCriticalSection], eax
call	ds:EnterCriticalSection
mov	ebp, [esp+10h+arg_4]
mov	byte ptr [esp+10h+arg_0], 0
push	edi

loc_6A14E5:
mov	edx, [esi+8]
push	ebp
lea	ecx, [esp+18h+arg_0]
push	ecx
push	edx
push	ebx
mov	ecx, esi
call	sub_6A11E0
mov	edi, eax
test	edi, edi
jnz	short loc_6A1518
cmp	byte ptr [esp+14h+arg_0], al
jnz	short loc_6A14E5
mov	ecx, [esp+14h+lpCriticalSection]
push	ecx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	ebp
pop	ebx
xor	eax, eax
pop	esi
pop	ecx
retn	8

loc_6A1518:
mov	eax, [esp+14h+lpCriticalSection]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
mov	eax, edi
pop	edi
pop	ebp
pop	ebx
pop	esi
pop	ecx
retn	8
sub_6A1480 endp

align 10h



sub_6A1530 proc	near

lpCriticalSection= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_0]
mov	eax, [edx+0Ch]
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+18h+arg_8]
add	edi, 3
and	eax, 3
and	edi, 0FFFFFFFCh
mov	esi, ecx
cmp	eax, 3
jnb	short loc_6A155E
lea	ecx, [eax+2]
mov	eax, 1
shl	eax, cl
jmp	short loc_6A1561

loc_6A155E:
mov	eax, [edx+10h]

loc_6A1561:
mov	ecx, 10h
cmp	ecx, eax
sbb	ebp, ebp
and	ebp, 4
add	ebp, 10h
add	edi, 3
mov	ebx, ebp
sub	ebx, [esp+18h+arg_4]
and	edi, 0FFFFFFFCh
add	ebx, edx
add	edi, ebp
mov	[esp+18h+arg_8], eax
mov	[esp+18h+var_4], ebp
cmp	edi, ebx
jbe	short loc_6A1601
cmp	dword ptr [esi+0A0h], 0
jz	short loc_6A1601

loc_6A1595:
mov	edx, [esi+98h]
sub	edx, ebx
add	edx, edi
cmp	edx, [esi+0A0h]
jbe	short loc_6A1601
cmp	dword ptr [esi+0A4h], 0
jz	short loc_6A1601
mov	eax, dword_1856470
add	eax, 4
push	eax		; lpCriticalSection
mov	[esp+1Ch+lpCriticalSection], eax
call	ds:LeaveCriticalSection
mov	edx, [esi+98h]
sub	edx, [esi+0A0h]
mov	ecx, [esi+0A4h]
mov	eax, [ecx]
mov	eax, [eax+4]
sub	edx, ebx
add	edx, edi
push	edx
mov	edx, [esi+4]
push	edx
call	eax
test	al, al
jz	loc_6A1696
mov	ecx, [esp+18h+lpCriticalSection]
push	ecx		; lpCriticalSection
call	ds:EnterCriticalSection
cmp	dword ptr [esi+0A0h], 0
jnz	short loc_6A1595

loc_6A1601:
mov	eax, [esp+18h+arg_0]
mov	ecx, dword_1856470
push	eax
add	ecx, 28h
call	sub_6A13B0
mov	eax, [esp+18h+arg_8]
mov	ecx, [esi]
mov	edx, [ecx]
mov	edx, [edx+14h]
push	eax
mov	eax, [esp+1Ch+arg_4]
push	edi
push	ebx
push	eax
call	edx
mov	[esp+18h+arg_0], eax
test	eax, eax
jz	short loc_6A16AD
mov	ecx, dword_1856470
mov	edx, [esp+18h+arg_8]
mov	ebp, eax
sub	ebp, [esp+18h+var_4]
mov	eax, [esi+4]
push	edx
mov	[esp+1Ch+arg_4], ecx
add	ebp, edi
push	eax
mov	ecx, ebp
call	sub_6A0CA0
mov	ecx, [esp+18h+arg_4]
push	ebp
add	ecx, 28h
call	sub_6A0DE0
mov	eax, [esp+18h+arg_C]
mov	ecx, edi
sub	ecx, [esp+18h+var_4]
mov	edx, edi
mov	[eax+4], ebp
sub	edx, ebx
mov	[eax+8], ecx
mov	dword ptr [eax], 0
add	[esi+98h], edx
mov	eax, [esp+18h+arg_0]
sub	edi, ebx
add	[esi+9Ch], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	10h

loc_6A1696:
mov	edx, [esp+18h+lpCriticalSection]
push	edx		; lpCriticalSection
call	ds:EnterCriticalSection
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 8
retn	10h

loc_6A16AD:
mov	eax, [esp+18h+arg_8]
mov	ecx, [esi+4]
mov	edi, dword_1856470
sub	ebx, ebp
add	ebx, [esp+18h+arg_4]
push	eax
push	ecx
mov	ecx, ebx
call	sub_6A0CA0
push	ebx
lea	ecx, [edi+28h]
call	sub_6A0DE0
mov	eax, [esp+18h+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	10h
sub_6A1530 endp




sub_6A16E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_8]
push	eax
push	ecx
mov	ecx, esi
call	sub_6A1480
mov	ebx, eax
test	ebx, ebx
jz	short loc_6A1734
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_4]
push	edi
push	ebp
lea	ecx, [esi+0Ch]
call	sub_7088E0
mov	edx, [esp+10h+arg_C]
mov	ecx, [edx+8]
cmp	eax, ecx
jb	short loc_6A171C
mov	eax, ecx

loc_6A171C:
push	eax
push	edi
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
push	edi
push	ebp
mov	ecx, esi
call	sub_6A1160
pop	edi
mov	eax, ebx
pop	ebp

loc_6A1734:
pop	esi
pop	ebx
retn	10h
sub_6A16E0 endp

align 10h



sub_6A1740 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+14h]
mov	ecx, edi
call	sub_64D770
mov	eax, [esp+0Ch+arg_0]
test	eax, eax
jz	short loc_6A1792
cmp	eax, 0FFFFFFFFh
jz	short loc_6A176F
mov	cl, [esi+10h]
test	cl, cl
jnz	short loc_6A1792
push	eax
push	edi
lea	ecx, [esi+28h]
call	sub_64DCA0
jmp	short loc_6A1792

loc_6A176F:
mov	dl, [esi+10h]
test	dl, dl
jnz	short loc_6A1792
push	ebp
lea	ebp, [esi+28h]
lea	ebx, [ebx+0]

loc_6A1780:
push	0FFFFFFFFh
push	edi
mov	ecx, ebp
call	sub_64DCA0
mov	al, [esi+10h]
test	al, al
jz	short loc_6A1780
pop	ebp

loc_6A1792:
mov	bl, [esi+10h]
mov	cl, [esi+11h]
test	cl, cl
jz	short loc_6A17A4
mov	byte ptr [esi+11h], 0
mov	byte ptr [esi+10h], 0

loc_6A17A4:
mov	ecx, edi
call	sub_64E350
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	4
sub_6A1740 endp

align 10h



sub_6A17C0 proc	near
mov	al, [ecx+10h]
retn
sub_6A17C0 endp

align 10h



sub_6A17D0 proc	near
test	ecx, ecx
jz	short loc_6A17D8
lea	eax, [ecx+0Ch]
retn

loc_6A17D8:
xor	eax, eax
retn
sub_6A17D0 endp

align 10h



sub_6A17E0 proc	near
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+8]
mov	ecx, edi
call	sub_64D770
mov	al, [esi+5]
test	al, al
jz	short loc_6A17FD
xor	al, al
mov	[esi+5], al
mov	[esi+4], al

loc_6A17FD:
mov	ecx, edi
call	sub_64E350
pop	edi
mov	al, 1
pop	esi
retn
sub_6A17E0 endp

align 10h



sub_6A1810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	eax, [esp+arg_0]
test	edx, edx
jbe	short locret_6A183B
mov	ecx, [esp+arg_8]
push	esi

loc_6A1821:
test	eax, eax
jz	short loc_6A182F
mov	esi, [ecx]
mov	[eax], esi
mov	esi, [ecx+4]
mov	[eax+4], esi

loc_6A182F:
add	ecx, 8
add	eax, 8
sub	edx, 1
jnz	short loc_6A1821
pop	esi

locret_6A183B:
retn
sub_6A1810 endp

align 10h



sub_6A1840 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
cmp	eax, [edi+8]
jb	short loc_6A18C9
test	eax, eax
jnz	short loc_6A1875
mov	eax, [edi]
test	eax, eax
jz	short loc_6A186A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6A186A:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6A1875:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+0Fh]
mov	eax, [edi]
shr	esi, 4
shl	esi, 4
test	eax, eax
jz	short loc_6A18A7
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6A18A7:
lea	eax, [esp+8+arg_4]
push	eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, ds:0[esi*8]
push	eax
call	edx
mov	[edi+8], esi
mov	[edi], eax
pop	esi

loc_6A18C9:
pop	edi
retn	8
sub_6A1840 endp

align 10h



sub_6A18D0 proc	near
mov	eax, 1
test	byte ptr dword_1856478,	al
jnz	short loc_6A18FA
or	dword_1856478, eax
push	offset sub_1419400 ; void (__cdecl *)()
mov	dword_1856474, offset off_1437964
call	_atexit
add	esp, 4

loc_6A18FA:
mov	eax, offset dword_1856474
retn
sub_6A18D0 endp




sub_6A1900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_6A192D
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_6A1944
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, esi
call	sub_6A1840
mov	[esi+4], edi
pop	edi
pop	esi
retn	8

loc_6A192D:
cmp	edi, [esi+8]
jb	short loc_6A1944
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_6A1840

loc_6A1944:
mov	[esi+4], edi
pop	edi
pop	esi
retn	8
sub_6A1900 endp

align 10h



sub_6A1950 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_6A196C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6A1981
push	esi
jmp	short loc_6A197B

loc_6A196C:
cmp	esi, [edi+8]
jb	short loc_6A1981
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6A197B:
push	edi
call	sub_6A1840

loc_6A1981:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_6A19A4
sub	esi, ebx
mov	edx, [edi]
lea	eax, [edx+ebx*8]
jz	short loc_6A19A4
xor	ecx, ecx

loc_6A1993:
cmp	eax, ecx
jz	short loc_6A199C
mov	[eax], ecx
mov	[eax+4], ecx

loc_6A199C:
add	eax, 8
sub	esi, 1
jnz	short loc_6A1993

loc_6A19A4:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6A1950 endp

align 10h



sub_6A19B0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6A19C9
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6A19DE
push	esi
jmp	short loc_6A19D8

loc_6A19C9:
cmp	esi, [edi+8]
jb	short loc_6A19DE
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6A19D8:
push	edi
call	sub_6A1840

loc_6A19DE:
mov	edx, [edi]
mov	[edi+4], esi
lea	eax, [edx+esi*8-8]
pop	edi
pop	esi
test	eax, eax
jz	short locret_6A19FB
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx

locret_6A19FB:
retn	4
sub_6A19B0 endp

align 10h



sub_6A1A00 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437978
jz	short loc_6A1A70
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	0
push	28h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6A1A64
mov	dword ptr [edi+4], 0
mov	dword ptr [edi+8], 0
push	0		; int
lea	ecx, [edi+10h]	; lpCriticalSection
mov	dword ptr [edi+0Ch], 0
call	sub_64D6D0
mov	dword ptr [edi], 1
mov	[esi+8], edi
pop	edi
mov	eax, esi
pop	esi
retn	4

loc_6A1A64:
xor	eax, eax
mov	[esi+8], eax
pop	edi
mov	eax, esi
pop	esi
retn	4

loc_6A1A70:
xor	eax, eax
mov	[esi+8], eax
mov	eax, esi
pop	esi
retn	4
sub_6A1A00 endp

align 10h



sub_6A1A80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	edi
mov	edi, ecx
mov	eax, [edi+8]
test	eax, eax
jnz	short loc_6A1A96
xor	al, al
pop	edi
add	esp, 8
retn	8

loc_6A1A96:
mov	ecx, [esp+0Ch+arg_0]
mov	edx, [esp+0Ch+arg_4]
push	esi
lea	esi, [eax+10h]
push	esi		; lpCriticalSection
mov	[esp+14h+var_8], ecx
mov	[esp+14h+var_4], edx
call	ds:EnterCriticalSection
mov	ecx, [edi+8]
lea	eax, [esp+10h+var_8]
push	eax
add	ecx, 4
call	sub_6A19B0
push	esi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	esi
mov	al, 1
pop	edi
add	esp, 8
retn	8
sub_6A1A80 endp

align 10h



sub_6A1AE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebp
push	esi
mov	esi, ecx
xor	ecx, ecx
mov	[esi], ecx
mov	[esi+4], ecx
mov	[esi+8], ecx
mov	ebp, [eax]
push	edi
mov	edi, [eax+4]
cmp	edi, ecx
jz	short loc_6A1B1D
push	ebx
mov	ebx, [esi+4]
lea	eax, [ebx+edi]
push	eax
push	esi
mov	ecx, esi
call	sub_6A1900
mov	ecx, [esi]
push	ebp
lea	edx, [ecx+ebx*8]
push	edi
push	edx
call	sub_6A1810
add	esp, 0Ch
pop	ebx

loc_6A1B1D:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_6A1AE0 endp

align 10h



sub_6A1B30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+8]
test	eax, eax
jnz	short loc_6A1B40
xor	al, al
pop	esi
retn	8

loc_6A1B40:
push	ebx
push	edi
lea	edi, [eax+10h]
push	edi		; lpCriticalSection
xor	bl, bl
call	ds:EnterCriticalSection
mov	ecx, [esi+8]
mov	edx, [ecx+8]
xor	eax, eax
test	edx, edx
jbe	short loc_6A1BCE
lea	esi, [ecx+4]
mov	ecx, [esi]
push	ebp

loc_6A1B60:
mov	ebp, [ecx]
cmp	ebp, [esp+10h+arg_0]
jnz	short loc_6A1B71
mov	ebp, [esp+10h+arg_4]
cmp	[ecx+4], ebp
jz	short loc_6A1B89

loc_6A1B71:
inc	eax
add	ecx, 8
cmp	eax, edx
jb	short loc_6A1B60
pop	ebp
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	al, bl
pop	ebx
pop	esi
retn	8

loc_6A1B89:
mov	ecx, [esi+4]
cmp	ecx, 1
jnz	short loc_6A1BAC
push	0
mov	ecx, esi
call	sub_6A1950
pop	ebp
push	edi		; lpCriticalSection
mov	bl, 1
call	ds:LeaveCriticalSection
pop	edi
mov	al, bl
pop	ebx
pop	esi
retn	8

loc_6A1BAC:
mov	edx, [esi]
lea	edx, [edx+eax*8]
sub	ecx, eax
lea	eax, ds:0FFFFFFF8h[ecx*8]
push	eax
lea	ecx, [edx+8]
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]
mov	bl, 1
pop	ebp

loc_6A1BCE:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
mov	al, bl
pop	ebx
pop	esi
retn	8
sub_6A1B30 endp

align 10h



; int __fastcall sub_6A1BE0(volatile LONG *Addend)
sub_6A1BE0 proc	near
push	esi
mov	esi, ecx
push	0FFFFFFFFh	; Value
push	esi		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A1C1C
test	esi, esi
jz	short loc_6A1C1C
lea	ecx, [esi+10h]	; lpCriticalSection
call	sub_64D730
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+4]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6A1C1C:
pop	esi
retn
sub_6A1BE0 endp

align 10h



sub_6A1C20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8

sub	esp, 0Ch
push	ebp
push	esi
mov	esi, ecx
lea	ebp, [esi+10h]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6A1C97
cmp	eax, 1
jnz	short loc_6A1C58
mov	esi, [esi+4]
mov	eax, [esi+4]
mov	ecx, [esi]
push	eax
call	ecx
add	esp, 4
push	ebp		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	esi
pop	ebp
add	esp, 0Ch
retn

loc_6A1C58:
push	ebx
push	edi
add	esi, 4
push	esi
lea	ecx, [esp+20h+var_C]
call	sub_6A1AE0
mov	ebx, [esp+1Ch+var_8]
mov	edi, [esp+1Ch+var_C]
xor	esi, esi
test	ebx, ebx
jbe	short loc_6A1C87

loc_6A1C75:
mov	edx, [edi+esi*8+4]
mov	eax, [edi+esi*8]
push	edx
call	eax
inc	esi
add	esp, 4
cmp	esi, ebx
jb	short loc_6A1C75

loc_6A1C87:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
pop	edi
pop	ebx

loc_6A1C97:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	esi
pop	ebp
add	esp, 0Ch
retn
sub_6A1C20 endp

align 10h



sub_6A1CB0 proc	near
mov	ecx, [ecx+8]
test	ecx, ecx
jz	short locret_6A1CBC
jmp	sub_6A1C20

locret_6A1CBC:
retn
sub_6A1CB0 endp

align 10h



sub_6A1CC0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
mov	dword ptr [edi], offset	off_1437978
test	esi, esi
jz	short loc_6A1D0A
push	0FFFFFFFFh	; Value
push	esi		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A1D0A
test	esi, esi
jz	short loc_6A1D0A
lea	ecx, [esi+10h]	; lpCriticalSection
call	sub_64D730
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+4]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6A1D0A:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A3F0
sub_6A1CC0 endp

align 10h



sub_6A1D20 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	eax
mov	esi, ecx
call	sub_6A1A00
push	0
mov	dword ptr [esi+0Ch], offset off_1437964
push	1
lea	ecx, [esi+14h]
mov	dword ptr [esi], offset	off_1437998
mov	dword ptr [esi+0Ch], offset off_1437984
call	sub_64D9B0
lea	ecx, [esi+28h]
call	sub_64DC50
mov	cl, [esp+4+arg_0]
mov	[esi+10h], cl
mov	byte ptr [esi+11h], 0
mov	eax, esi
pop	esi
retn	8
sub_6A1D20 endp

align 10h



sub_6A1D70 proc	near

arg_0= byte ptr	 4

sub	ecx, 0Ch
jmp	sub_6A1FB0
sub_6A1D70 endp

align 10h



sub_6A1D80 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+28h]
mov	dword ptr [esi], offset	off_1437998
mov	dword ptr [esi+0Ch], offset off_1437984
call	sub_64DF80
lea	ecx, [esi+14h]
call	sub_64DF30
mov	dword ptr [esi+0Ch], offset off_1437964
mov	ecx, esi
pop	esi
jmp	sub_6A1CC0
sub_6A1D80 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_6A1E70

loc_6A1DB0:
push	ecx
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+14h]
mov	ecx, edi
call	sub_64D770
mov	byte ptr [esi+10h], 1
lea	ecx, [esi+28h]
mov	byte ptr [esi+11h], 1
call	sub_64D8E0
lea	eax, [esp+0Ch+Addend]
push	eax
mov	ecx, esi
mov	[esp+10h+Addend], 0
call	sub_64E2B0
mov	ecx, edi
call	sub_64E350
mov	esi, [esp+0Ch+Addend]
test	esi, esi
jz	short loc_6A1E2E
mov	ecx, esi
call	sub_6A1C20
push	0FFFFFFFFh	; Value
push	esi		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A1E2E
lea	ecx, [esi+10h]	; lpCriticalSection
call	sub_64D730
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A1E2E:
pop	edi
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_6A1E70
align 10h



sub_6A1E40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6A1CC0
test	[esp+4+arg_0], 1
jz	short loc_6A1E5D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A1E5D:
mov	eax, esi
pop	esi
retn	4
sub_6A1E40 endp

align 10h



sub_6A1E70 proc	near

Addend=	dword ptr -4
arg_0= dword ptr  4

; FUNCTION CHUNK AT 006A1DB0 SIZE 00000082 BYTES

push	esi
mov	esi, [esp+0Ch+Addend]
mov	ecx, [esi]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
test	al, al
jz	short loc_6A1E8B
mov	ecx, [esi+4]
pop	esi
jmp	loc_6A1DB0

loc_6A1E8B:
pop	esi
retn
sub_6A1E70 endp	; sp-analysis failed

align 10h



sub_6A1E90 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4

sub	esp, 3Ch
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
mov	edx, [eax+4]
call	edx
test	al, al
jz	short loc_6A1EAA
mov	al, 1
pop	ebx
add	esp, 3Ch
retn	4

loc_6A1EAA:
push	ebp
push	esi
mov	esi, [esp+48h+arg_0]
xor	ebp, ebp
cmp	esi, ebp
jz	short loc_6A1EEB
push	ebp
push	ebp
lea	ecx, [esp+50h+var_2C]
call	sub_6A1D20
lea	ecx, [esp+48h+var_3C]
push	ecx
lea	eax, [esp+4Ch+var_2C]
push	offset sub_6A1E70
mov	ecx, ebx
mov	[esp+50h+var_3C], ebx
mov	[esp+50h+var_38], eax
call	sub_6A1A80
test	al, al
jnz	short loc_6A1EF6
lea	ecx, [esp+48h+var_2C]
call	sub_6A1D80

loc_6A1EEB:
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 3Ch
retn	4

loc_6A1EF6:
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax
test	al, al
jz	short loc_6A1F28
lea	ecx, [esp+48h+var_3C]
push	ecx
push	offset sub_6A1E70
mov	ecx, ebx
call	sub_6A1B30
lea	ecx, [esp+48h+var_2C]
call	sub_6A1D80
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 3Ch
retn	4

loc_6A1F28:
push	edi
mov	byte ptr [esp+4Ch+arg_0], 0
mov	[esp+4Ch+var_30], ebp
mov	edi, esi
cmp	esi, 0FFFFFFFFh
jz	short loc_6A1F44
call	sub_6B2200
mov	ebp, eax
mov	[esp+4Ch+var_30], edx

loc_6A1F44:
push	esi
lea	ecx, [esp+50h+var_2C]
call	sub_6A1740
test	al, al
jz	short loc_6A1F88

loc_6A1F52:
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax
test	al, al
jnz	short loc_6A1F83
cmp	esi, 0FFFFFFFFh
jz	short loc_6A1F73
call	sub_6B2200
sub	eax, ebp
cmp	eax, esi
jnb	short loc_6A1F88
mov	edi, esi
sub	edi, eax

loc_6A1F73:
push	edi
lea	ecx, [esp+50h+var_2C]
call	sub_6A1740
test	al, al
jnz	short loc_6A1F52
jmp	short loc_6A1F88

loc_6A1F83:
mov	byte ptr [esp+4Ch+arg_0], 1

loc_6A1F88:
lea	ecx, [esp+4Ch+var_3C]
push	ecx
push	offset sub_6A1E70
mov	ecx, ebx
call	sub_6A1B30
lea	ecx, [esp+4Ch+var_2C]
call	sub_6A1D80
mov	al, byte ptr [esp+4Ch+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn	4
sub_6A1E90 endp




sub_6A1FB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+28h]
mov	dword ptr [esi], offset	off_1437998
mov	dword ptr [esi+0Ch], offset off_1437984
call	sub_64DF80
lea	ecx, [esi+14h]
call	sub_64DF30
mov	ecx, esi
mov	dword ptr [esi+0Ch], offset off_1437964
call	sub_6A1CC0
test	[esp+4+arg_0], 1
jz	short loc_6A1FF3
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A1FF3:
mov	eax, esi
pop	esi
retn	4
sub_6A1FB0 endp

align 10h



sub_6A2000 proc	near

Addend=	dword ptr -4

push	ecx
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+14h]
mov	ecx, edi
call	sub_64D770
mov	byte ptr [esi+10h], 1
lea	ecx, [esi+28h]
mov	byte ptr [esi+11h], 0
call	sub_64D8F0
lea	eax, [esp+0Ch+Addend]
push	eax
mov	ecx, esi
mov	[esp+10h+Addend], 0
call	sub_64E2B0
mov	ecx, edi
call	sub_64E350
mov	esi, [esp+0Ch+Addend]
test	esi, esi
jz	short loc_6A207E
mov	ecx, esi
call	sub_6A1C20
push	0FFFFFFFFh	; Value
push	esi		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A207E
lea	ecx, [esi+10h]	; lpCriticalSection
call	sub_64D730
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A207E:
pop	edi
pop	esi
pop	ecx
retn
sub_6A2000 endp

align 10h



sub_6A2090 proc	near

arg_0= word ptr	 4

movzx	edx, [esp+arg_0]
mov	eax, edx
shr	eax, 8
push	esi
movzx	esi, ds:word_1434648[eax*2]
test	esi, esi
jnz	short loc_6A20AB
xor	eax, eax
pop	esi
retn

loc_6A20AB:
mov	eax, 1
cmp	esi, eax
jz	short loc_6A20D3
mov	ecx, edx
shr	edx, 4
and	ecx, 0Fh
and	edx, 0Fh
shl	eax, cl
add	edx, esi
movzx	ecx, ds:word_1434648[edx*2]
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax

loc_6A20D3:
pop	esi
retn
sub_6A2090 endp

align 10h



sub_6A20E0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	[eax], edx
test	edx, edx
jz	short loc_6A2100
push	esi
lea	esi, [edx+1]

loc_6A20F0:
mov	cl, [edx]
inc	edx
test	cl, cl
jnz	short loc_6A20F0
sub	edx, esi
mov	[eax+4], edx
pop	esi
retn	4

loc_6A2100:
xor	ecx, ecx
mov	[eax+4], ecx
retn	4
sub_6A20E0 endp

align 10h



sub_6A2110 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, [ecx]
push	edi
mov	edi, [ecx+4]
xor	edx, edx
test	edi, edi
jbe	short loc_6A2131
mov	cl, [esp+8+arg_4]

loc_6A2121:
mov	al, [esi+edx]
test	al, al
jz	short loc_6A2131
cmp	al, cl
jz	short loc_6A2131
inc	edx
cmp	edx, edi
jb	short loc_6A2121

loc_6A2131:
mov	eax, [esp+8+arg_0]
pop	edi
mov	[eax], esi
mov	[eax+4], edx
pop	esi
retn	8
sub_6A2110 endp

align 10h



; int __thiscall sub_6A2140(void *, char)
sub_6A2140 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14379A4
jz	short loc_6A2159
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6A2159:
mov	eax, esi
pop	esi
retn	4
sub_6A2140 endp

align 10h



sub_6A2160 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+14h]
mov	eax, [esp+arg_0]
mov	ecx, [ecx+18h]
mov	[eax], edx
mov	[eax+4], ecx
retn	4
sub_6A2160 endp

align 10h



sub_6A2180 proc	near
mov	dword ptr [ecx], offset	off_14379A4
retn
sub_6A2180 endp

align 10h



sub_6A2190 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
retn	4
sub_6A2190 endp

align 10h



sub_6A21B0 proc	near
mov	byte ptr [ecx+8], 1
retn
sub_6A21B0 endp

align 10h



sub_6A21C0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+0Ch]
mov	eax, [esp+arg_0]
mov	ecx, [ecx+10h]
mov	[eax], edx
mov	[eax+4], ecx
retn	4
sub_6A21C0 endp

align 10h



sub_6A21E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
cmp	byte ptr [ecx+8], 0
jnz	short loc_6A2237
mov	al, [ecx+0Ch]
test	al, 2
jnz	short loc_6A2233
test	al, 1
lea	eax, [esp+8+var_8]
jz	short loc_6A2219
mov	[esp+8+var_8], offset aTrue ; "true"
mov	[esp+8+var_4], 4
mov	edx, [eax]
mov	eax, [eax+4]
mov	[ecx+10h], edx
mov	[ecx+14h], eax
mov	byte ptr [ecx+8], 1
add	esp, 8
retn

loc_6A2219:		; "false"
mov	[esp+8+var_8], offset aFalse
mov	[esp+8+var_4], 5
mov	edx, [eax]
mov	eax, [eax+4]
mov	[ecx+10h], edx
mov	[ecx+14h], eax

loc_6A2233:
mov	byte ptr [ecx+8], 1

loc_6A2237:
add	esp, 8
retn
sub_6A21E0 endp

align 10h



sub_6A2240 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+10h]
mov	eax, [esp+arg_0]
mov	ecx, [ecx+14h]
mov	[eax], edx
mov	[eax+4], ecx
retn	4
sub_6A2240 endp

align 10h



sub_6A2260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, eax
test	edi, edi
jz	short loc_6A228F
push	edi
call	sub_67B5A0
sub	esi, eax
cmp	[esp+8+arg_0], esi
jbe	short loc_6A227B
xor	eax, eax
pop	esi
pop	ecx
retn

loc_6A227B:
push	edi
lea	eax, [esp+0Ch+var_4]
push	eax
push	esi
mov	[esp+14h+var_4], 0
call	sub_67B920

loc_6A228F:
mov	eax, esi
pop	esi
pop	ecx
retn
sub_6A2260 endp

align 10h



sub_6A22A0 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

cmp	byte ptr [esp+arg_C], 0
mov	eax, dword ptr [esp+arg_4]
mov	edx, dword ptr [esp+arg_4+4]
push	esi
push	edi
mov	esi, ecx
jz	short loc_6A22C5
cmp	[esp+8+arg_10],	0Ah
jnz	short loc_6A22C5
test	byte ptr [esi+5], 7Fh
mov	edi, 3
jnz	short loc_6A22CA

loc_6A22C5:
mov	edi, 3E8h

loc_6A22CA:
test	byte ptr [esi+6], 1
mov	[esp+8+arg_C], offset a0123456789abcd ;	"0123456789ABCDEF"
jnz	short loc_6A22E0
mov	[esp+8+arg_C], offset a0123456789ab_0 ;	"0123456789abcdef"

loc_6A22E0:
mov	ecx, [esp+8+arg_10]
add	ecx, 0FFFFFFFEh
cmp	ecx, 0Eh
ja	short loc_6A233F
push	ebx
push	ebp
mov	edi, edi

loc_6A22F0:
mov	ebp, [esi+8]
cmp	[esp+10h+arg_0], ebp
jz	short loc_6A233D
xor	ecx, ecx
push	ecx
mov	ecx, [esp+14h+arg_10]
push	ecx
push	edx
push	eax
call	__aulldvrm
mov	dword ptr [esp+10h+arg_4+4], ebx
test	edi, edi
jnz	short loc_6A2323
mov	bl, [esi+5]
dec	ebp
add	bl, bl
sar	bl, 1
mov	[esi+8], ebp
mov	edi, 3
mov	[ebp+0], bl

loc_6A2323:
dec	dword ptr [esi+8]
mov	ebx, [esp+10h+arg_C]
mov	ebp, [esi+8]
movzx	ecx, cl
mov	cl, [ecx+ebx]
mov	[ebp+0], cl
mov	ecx, eax
dec	edi
or	ecx, edx
jnz	short loc_6A22F0

loc_6A233D:
pop	ebp
pop	ebx

loc_6A233F:
pop	edi
pop	esi
retn	14h
sub_6A22A0 endp

align 10h



sub_6A2350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h

cmp	[esp+arg_8], 0
mov	eax, [esp+arg_4]
push	ebp
push	esi
jz	short loc_6A236F
cmp	[esp+8+arg_C], 0Ah
jnz	short loc_6A236F
test	byte ptr [ecx+5], 7Fh
mov	esi, 3
jnz	short loc_6A2374

loc_6A236F:
mov	esi, 3E8h

loc_6A2374:
test	byte ptr [ecx+6], 1
mov	ebp, offset a0123456789abcd ; "0123456789ABCDEF"
jnz	short loc_6A2384
mov	ebp, offset a0123456789ab_0 ; "0123456789abcdef"

loc_6A2384:
mov	edx, [esp+8+arg_C]
add	edx, 0FFFFFFFEh
cmp	edx, 0Eh
ja	short loc_6A23CC
push	ebx
push	edi

loc_6A2392:
mov	edi, [ecx+8]
cmp	[esp+10h+arg_0], edi
jz	short loc_6A23CA
xor	edx, edx
div	[esp+10h+arg_C]
test	esi, esi
jnz	short loc_6A23B7
mov	bl, [ecx+5]
dec	edi
add	bl, bl
sar	bl, 1
mov	[ecx+8], edi
mov	esi, 3
mov	[edi], bl

loc_6A23B7:
dec	dword ptr [ecx+8]
mov	edi, [ecx+8]
movzx	edx, dl
mov	dl, [edx+ebp]
dec	esi
mov	[edi], dl
test	eax, eax
jnz	short loc_6A2392

loc_6A23CA:
pop	edi
pop	ebx

loc_6A23CC:
pop	esi
pop	ebp
retn	10h
sub_6A2350 endp

align 10h



sub_6A23E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+14h]
call	edx
mov	edx, [esi+18h]
mov	ecx, eax
mov	eax, [esp+4+arg_0]
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	4
sub_6A23E0 endp

align 10h



sub_6A2400 proc	near
mov	eax, ecx
sub	eax, [eax+18h]
add	eax, 4Ch
retn
sub_6A2400 endp

align 10h



sub_6A2410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	byte ptr [ecx-4], 0
jz	short locret_6A242C
mov	eax, [esp+arg_4]
mov	ecx, [ecx+0Ch]
mov	edx, [esp+arg_0]
push	eax
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

locret_6A242C:
retn	8
sub_6A2410 endp

align 10h



sub_6A2430 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
test	eax, eax
jz	short loc_6A247B
mov	ecx, [eax+14h]
test	ecx, ecx
jz	short loc_6A247B
mov	eax, [ecx]
mov	edx, [eax+8]
push	edi
call	edx
cmp	[esp+8+arg_0], 0
jz	short loc_6A2459
mov	eax, [eax+18h]
lea	ecx, [esi+30h]
push	ecx
jmp	short loc_6A2466

loc_6A2459:
test	byte ptr [esi+15h], 80h
jz	short loc_6A2476
mov	eax, [eax+14h]
lea	edx, [esi+30h]
push	edx

loc_6A2466:
mov	edi, eax
mov	eax, [esi+18h]
call	sub_6A2260
add	esp, 4
mov	[esi+18h], eax

loc_6A2476:
pop	edi

loc_6A2477:
pop	esi
retn	4

loc_6A247B:
cmp	[esp+4+arg_0], 0
jz	short loc_6A248F
dec	dword ptr [esi+18h]
mov	esi, [esi+18h]
mov	byte ptr [esi],	2Dh
pop	esi
retn	4

loc_6A248F:
test	byte ptr [esi+15h], 80h
jz	short loc_6A2477
dec	dword ptr [esi+18h]
mov	esi, [esi+18h]
mov	byte ptr [esi],	2Bh
pop	esi
retn	4
sub_6A2430 endp

align 10h



sub_6A24B0 proc	near

var_54=	qword ptr -54h
Format=	byte ptr -44h
var_43=	byte ptr -43h
var_42=	byte ptr -42h
var_41=	byte ptr -41h
DstBuf=	byte ptr -24h
var_4= dword ptr -4

sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+44h+var_4], eax
push	esi
mov	esi, ecx
cmp	byte ptr [esi+8], 0
jnz	loc_6A2604
mov	eax, [esi+1Ch]
sub	eax, 0
mov	dl, 20h
jz	short loc_6A24FF
sub	eax, 1
jz	short loc_6A24EF
sub	eax, 1
jnz	short loc_6A2501
mov	dl, [esi+16h]
not	dl
and	dl, 1
shl	dl, 5
or	dl, 47h
jmp	short loc_6A2501

loc_6A24EF:
mov	dl, [esi+16h]
not	dl
and	dl, 1
shl	dl, 5
or	dl, 45h
jmp	short loc_6A2501

loc_6A24FF:
mov	dl, 66h

loc_6A2501:
test	byte ptr [esi+15h], 80h
mov	[esp+48h+Format], 25h
mov	[esp+48h+var_43], 25h
lea	eax, [esp+48h+var_42]
jz	short loc_6A251E
mov	[esp+48h+var_42], 2Bh
lea	eax, [esp+48h+var_41]

loc_6A251E:
mov	cl, [esi+16h]
test	cl, 8
jz	short loc_6A252A
mov	byte ptr [eax],	23h
inc	eax

loc_6A252A:
test	cl, 2
jz	short loc_6A2533
mov	byte ptr [eax],	20h
inc	eax

loc_6A2533:
test	cl, 4
jz	short loc_6A253C
mov	byte ptr [eax],	2Dh
inc	eax

loc_6A253C:
mov	cl, [esi+14h]
and	cl, 7Fh
cmp	cl, 30h
jnz	short loc_6A254A
mov	[eax], cl
inc	eax

loc_6A254A:
mov	ecx, [esi+10h]
push	edi
mov	edi, ecx
shr	edi, 5
and	edi, 1Fh
and	ecx, 1Fh
push	ecx
cmp	edi, 1
jz	short loc_6A2592
mov	byte ptr [eax],	25h
mov	byte ptr [eax+1], 64h
inc	eax
mov	byte ptr [eax+1], 2Eh
inc	eax
inc	eax
mov	byte ptr [eax],	25h
inc	eax
mov	byte ptr [eax],	64h
inc	eax
mov	[eax], dl
push	edi		; ArgList
lea	edx, [esp+54h+Format]
push	edx		; Format
mov	byte ptr [eax+1], 0
lea	eax, [esp+58h+DstBuf]
push	20h		; SizeInBytes
push	eax		; DstBuf
call	sub_6794D0
add	esp, 14h
jmp	short loc_6A25B8

loc_6A2592:
mov	byte ptr [eax],	2Eh
inc	eax
mov	byte ptr [eax],	25h
inc	eax
mov	byte ptr [eax],	64h
inc	eax
lea	ecx, [esp+50h+Format]
push	ecx		; Format
mov	[eax], dl
lea	edx, [esp+54h+DstBuf]
push	20h		; SizeInBytes
push	edx		; DstBuf
mov	byte ptr [eax+1], 0
call	sub_6794D0
add	esp, 10h

loc_6A25B8:
fld	qword ptr [esi+20h]
sub	esp, 8
fstp	[esp+54h+var_54]
lea	eax, [esp+54h+DstBuf]
push	eax		; Format
lea	edi, [esi+2Ch]
push	15Ch		; SizeInBytes
push	edi		; DstBuf
call	sub_6794D0
add	esp, 14h
mov	[esi+28h], eax
mov	[esi+18h], edi
cmp	byte ptr [edi],	0
jz	short loc_6A25FC

loc_6A25E2:
mov	eax, [esi+18h]
cmp	byte ptr [eax],	2Ch
jz	short loc_6A25F7
inc	eax
mov	ecx, eax
mov	[esi+18h], eax
cmp	byte ptr [ecx],	0
jnz	short loc_6A25E2
jmp	short loc_6A25FC

loc_6A25F7:
mov	edx, eax
mov	byte ptr [edx],	2Eh

loc_6A25FC:
mov	[esi+18h], edi
mov	byte ptr [esi+8], 1
pop	edi

loc_6A2604:
mov	ecx, [esp+48h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn
sub_6A24B0 endp

align 10h



sub_6A2620 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	esi
mov	esi, ecx
xor	eax, eax
cmp	[esi+8], al
jnz	short loc_6A2674
mov	ecx, [esi+18h]
mov	[esp+14h+var_10], eax
mov	[esp+14h+var_C], eax
cmp	ecx, eax
jz	short loc_6A2668
mov	eax, [ecx]
mov	eax, [eax+8]
lea	edx, [esp+14h+var_10]
push	edx
lea	edx, [esi+0Ch]
push	edx
lea	edx, [esp+1Ch+var_8]
push	edx
call	eax
mov	ecx, [esp+14h+var_4]
mov	eax, [esp+14h+var_8]
mov	[esi+1Ch], eax
mov	[esi+20h], ecx
mov	byte ptr [esi+8], 1
pop	esi
add	esp, 10h
retn

loc_6A2668:
xor	ecx, ecx
mov	[esi+1Ch], eax
mov	[esi+20h], ecx
mov	byte ptr [esi+8], 1

loc_6A2674:
pop	esi
add	esp, 10h
retn
sub_6A2620 endp

align 10h



sub_6A2680 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+1Ch]
mov	eax, [esp+arg_0]
mov	ecx, [ecx+20h]
mov	[eax], edx
mov	[eax+4], ecx
retn	4
sub_6A2680 endp

align 10h



sub_6A26A0 proc	near
mov	eax, [ecx+20h]
retn
sub_6A26A0 endp

align 10h



sub_6A26B0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	ecx, [esp+8+arg_4]
push	esi
lea	esi, [ecx+eax]
push	edi
mov	[esp+10h+var_8], eax
cmp	eax, esi
jz	short loc_6A2723
jmp	short loc_6A26D0
align 10h

loc_6A26D0:
lea	edx, [esp+10h+var_8]
push	edx
call	sub_67B600
test	eax, eax
jz	short loc_6A272B
movzx	eax, ax
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434648[ecx*2]
test	edx, edx
jz	short loc_6A272B
cmp	edx, 1
jz	short loc_6A271D
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1434648[eax*2]
mov	edi, 1
shl	edi, cl
and	edi, edx
neg	edi
sbb	edi, edi
neg	edi
jz	short loc_6A272B

loc_6A271D:
cmp	[esp+10h+var_8], esi
jb	short loc_6A26D0

loc_6A2723:
pop	edi
mov	al, 1
pop	esi
add	esp, 8
retn

loc_6A272B:
pop	edi
xor	al, al
pop	esi
add	esp, 8
retn
sub_6A26B0 endp

align 10h



sub_6A2740 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_6A2782
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_6A2751:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_6A2764
mov	dword ptr [eax], 0FFFFFFFEh

loc_6A2764:
add	ecx, 14h
sub	edx, 1
jnz	short loc_6A2751
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_6A2782:
pop	esi
retn
sub_6A2740 endp

align 10h



sub_6A2790 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	ecx, [eax+4]
cmp	ecx, edx
jnb	short loc_6A279F
mov	edx, ecx

loc_6A279F:
add	[eax], edx
sub	ecx, edx
mov	[eax+4], ecx
retn	4
sub_6A2790 endp

align 10h



sub_6A27B0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	dword ptr [eax+4], 0
mov	byte ptr [eax+8], 0
mov	dword ptr [eax], offset	off_1437A00
mov	[eax+0Ch], edx
test	edx, edx
jz	short loc_6A27E2
push	esi
lea	esi, [edx+1]

loc_6A27D2:
mov	cl, [edx]
inc	edx
test	cl, cl
jnz	short loc_6A27D2
sub	edx, esi
mov	[eax+10h], edx
pop	esi
retn	4

loc_6A27E2:
xor	ecx, ecx
mov	[eax+10h], ecx
retn	4
sub_6A27B0 endp

align 10h



sub_6A27F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
mov	byte ptr [eax+8], 0
mov	dword ptr [eax], offset	off_1437A00
mov	[eax+0Ch], edx
test	edx, edx
jz	short loc_6A2822
push	esi
lea	esi, [edx+1]

loc_6A2812:
mov	cl, [edx]
inc	edx
test	cl, cl
jnz	short loc_6A2812
sub	edx, esi
mov	[eax+10h], edx
pop	esi
retn	8

loc_6A2822:
xor	ecx, ecx
mov	[eax+10h], ecx
retn	8
sub_6A27F0 endp

align 10h



sub_6A2830 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
mov	ecx, [esp+arg_4]
mov	byte ptr [eax+8], 0
mov	dword ptr [eax], offset	off_1437A00
mov	edx, [ecx]
mov	[eax+0Ch], edx
mov	ecx, [ecx+4]
mov	[eax+10h], ecx
retn	8
sub_6A2830 endp

align 10h



sub_6A2860 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
mov	ecx, [esp+arg_4]
mov	byte ptr [eax+8], 0
mov	dword ptr [eax], offset	off_1437A00
mov	edx, [ecx]
and	edx, 0FFFFFFFCh
add	edx, 8
mov	[eax+0Ch], edx
mov	ecx, [ecx]
and	ecx, 0FFFFFFFCh
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	[eax+10h], edx
retn	8
sub_6A2860 endp

align 10h



sub_6A28A0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, ecx
mov	dl, [eax+0Ch]
mov	ecx, [esp+arg_0]
push	ebx
mov	bl, [esp+4+arg_4]
mov	[eax+4], ecx
and	bl, 1
xor	ecx, ecx
and	dl, 0FCh
or	dl, bl
mov	[eax+8], cl
mov	dword ptr [eax], offset	off_1437A40
mov	[eax+0Ch], dl
mov	[eax+10h], ecx
mov	[eax+14h], ecx
pop	ebx
retn	8
sub_6A28A0 endp

align 10h



sub_6A28E0 proc	near

arg_0= dword ptr  4

mov	dword ptr [ecx], offset	off_14379C0
push	ebx
xor	ebx, ebx
mov	[ecx+4], ebx
mov	[ecx+8], bl
mov	eax, [ecx+10h]
mov	dl, [ecx+14h]
and	eax, 0FFFFFC21h
or	eax, 21h
mov	[ecx+10h], eax
movzx	eax, byte ptr [ecx+16h]
mov	[ecx+15h], bl
and	al, 0F1h
mov	[ecx+18h], ebx
or	al, 1
mov	[ecx+16h], al
and	dl, 0A0h
or	dl, 20h
mov	[ecx+14h], dl
mov	dword ptr [ecx+0Ch], offset off_143A4DC
movzx	eax, byte ptr [ecx+20h]
mov	edx, [ecx+1Ch]
and	al, 0FDh
or	al, 1
and	edx, 0FFFFFFEAh
mov	[ecx+20h], al
mov	eax, [esp+4+arg_0]
or	edx, 0Ah
mov	[ecx+1Ch], edx
cdq
mov	[ecx+28h], eax
lea	eax, [ecx+4Ch]
mov	[eax], bl
mov	[ecx+18h], eax
mov	dword ptr [ecx], offset	off_1437A88
mov	dword ptr [ecx+0Ch], offset off_1437A80
mov	[ecx+2Ch], edx
mov	eax, ecx
pop	ebx
retn	4
sub_6A28E0 endp

align 10h



sub_6A2960 proc	near

arg_0= byte ptr	 4

sub	ecx, 0Ch
jmp	loc_6A2970
align 10h

loc_6A2970:
test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi+0Ch], offset off_143A4DC
mov	dword ptr [esi], offset	off_14379A4
jz	short loc_6A2990
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6A2990:
mov	eax, esi
pop	esi
retn	4
sub_6A2960 endp

align 10h



sub_6A29A0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	dword ptr [eax], offset	off_14379C0
xor	edx, edx
mov	[eax+4], edx
mov	[eax+8], dl
mov	ecx, [eax+10h]
and	ecx, 0FFFFFC21h
or	ecx, 21h
mov	[eax+10h], ecx
movzx	ecx, byte ptr [eax+14h]
and	cl, 0A0h
or	cl, 20h
mov	[eax+14h], cl
movzx	ecx, byte ptr [eax+16h]
mov	[eax+15h], dl
and	cl, 0F1h
mov	[eax+18h], edx
or	cl, 1
mov	[eax+16h], cl
mov	dword ptr [eax+0Ch], offset off_143A4DC
mov	ecx, [eax+1Ch]
and	byte ptr [eax+20h], 0FCh
and	ecx, 0FFFFFFEAh
or	ecx, 0Ah
mov	[eax+1Ch], ecx
mov	ecx, [esp+arg_0]
mov	[eax+28h], ecx
lea	ecx, [eax+4Ch]
mov	dword ptr [eax], offset	off_1437A88
mov	dword ptr [eax+0Ch], offset off_1437A80
mov	[eax+2Ch], edx
mov	[eax+18h], ecx
mov	[ecx], dl
retn	4
sub_6A29A0 endp

align 10h



sub_6A2A20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	dword ptr [eax], offset	off_14379C0
xor	edx, edx
mov	[eax+4], edx
mov	[eax+8], dl
mov	ecx, [eax+10h]
and	ecx, 0FFFFFC21h
or	ecx, 21h
mov	[eax+10h], ecx
movzx	ecx, byte ptr [eax+14h]
and	cl, 0A0h
or	cl, 20h
mov	[eax+14h], cl
movzx	ecx, byte ptr [eax+16h]
and	cl, 0F1h
mov	[eax+15h], dl
mov	[eax+18h], edx
or	cl, 1
mov	[eax+16h], cl
mov	dword ptr [eax+0Ch], offset off_143A4DC
mov	ecx, [eax+1Ch]
or	byte ptr [eax+20h], 3
and	ecx, 0FFFFFFEAh
or	ecx, 0Ah
mov	[eax+1Ch], ecx
mov	ecx, [esp+arg_0]
mov	[eax+28h], ecx
mov	ecx, [esp+arg_4]
mov	[eax+2Ch], ecx
lea	ecx, [eax+4Ch]
mov	dword ptr [eax], offset	off_1437A88
mov	dword ptr [eax+0Ch], offset off_1437A80
mov	[eax+18h], ecx
mov	[ecx], dl
retn	8
sub_6A2A20 endp

align 10h



sub_6A2AA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	dword ptr [eax], offset	off_14379C0
xor	edx, edx
mov	[eax+4], edx
mov	[eax+8], dl
mov	ecx, [eax+10h]
and	ecx, 0FFFFFC21h
or	ecx, 21h
mov	[eax+10h], ecx
movzx	ecx, byte ptr [eax+14h]
and	cl, 0A0h
or	cl, 20h
mov	[eax+14h], cl
movzx	ecx, byte ptr [eax+16h]
and	cl, 0F1h
or	cl, 1
mov	[eax+16h], cl
mov	[eax+15h], dl
mov	[eax+18h], edx
mov	dword ptr [eax+0Ch], offset off_143A4DC
mov	ecx, [eax+1Ch]
and	ecx, 0FFFFFFEAh
or	ecx, 0Ah
mov	[eax+1Ch], ecx
movzx	ecx, byte ptr [eax+20h]
and	cl, 0FEh
or	cl, 2
mov	[eax+20h], cl
mov	ecx, [esp+arg_0]
mov	[eax+28h], ecx
mov	ecx, [esp+arg_4]
mov	[eax+2Ch], ecx
lea	ecx, [eax+4Ch]
mov	dword ptr [eax], offset	off_1437A88
mov	dword ptr [eax+0Ch], offset off_1437A80
mov	[eax+18h], ecx
mov	[ecx], dl
retn	8
sub_6A2AA0 endp

align 10h



sub_6A2B30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	[ecx+4], eax
mov	dword ptr [ecx], offset	off_14379C0
mov	byte ptr [ecx+8], 0
mov	edx, [ecx+10h]
mov	al, [ecx+14h]
and	edx, 0FFFFFC21h
or	edx, 21h
mov	[ecx+10h], edx
movzx	edx, byte ptr [ecx+16h]
and	al, 0A0h
mov	byte ptr [ecx+15h], 0
mov	dword ptr [ecx+18h], 0
or	al, 20h
mov	[ecx+14h], al
and	dl, 0F1h
or	dl, 1
mov	[ecx+16h], dl
mov	dword ptr [ecx+0Ch], offset off_143A4DC
movzx	edx, byte ptr [ecx+20h]
mov	eax, [ecx+1Ch]
and	eax, 0FFFFFFEAh
or	eax, 0Ah
mov	[ecx+1Ch], eax
mov	eax, [esp+arg_4]
and	dl, 0FDh
or	dl, 1
mov	[ecx+20h], dl
cdq
mov	[ecx+28h], eax
lea	eax, [ecx+4Ch]
mov	[ecx+18h], eax
mov	byte ptr [eax],	0
mov	dword ptr [ecx], offset	off_1437A88
mov	dword ptr [ecx+0Ch], offset off_1437A80
mov	[ecx+2Ch], edx
mov	eax, ecx
retn	8
sub_6A2B30 endp

align 10h



sub_6A2BC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_14379C0
xor	edx, edx
mov	[eax+8], dl
mov	ecx, [eax+10h]
and	ecx, 0FFFFFC21h
or	ecx, 21h
mov	[eax+10h], ecx
movzx	ecx, byte ptr [eax+14h]
and	cl, 0A0h
or	cl, 20h
mov	[eax+14h], cl
movzx	ecx, byte ptr [eax+16h]
mov	[eax+15h], dl
and	cl, 0F1h
mov	[eax+18h], edx
or	cl, 1
mov	[eax+16h], cl
mov	dword ptr [eax+0Ch], offset off_143A4DC
mov	ecx, [eax+1Ch]
and	byte ptr [eax+20h], 0FCh
and	ecx, 0FFFFFFEAh
or	ecx, 0Ah
mov	[eax+1Ch], ecx
mov	ecx, [esp+arg_4]
mov	[eax+28h], ecx
lea	ecx, [eax+4Ch]
mov	dword ptr [eax], offset	off_1437A88
mov	dword ptr [eax+0Ch], offset off_1437A80
mov	[eax+2Ch], edx
mov	[eax+18h], ecx
mov	[ecx], dl
retn	8
sub_6A2BC0 endp

align 10h



sub_6A2C40 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+8], 0
jnz	loc_6A2EB2
test	byte ptr [esi+10h], 1Fh
push	ebx
lea	ebx, [esi+10h]
push	ebp
push	edi
jnz	short loc_6A2C61
mov	eax, [esi+28h]
or	eax, [esi+2Ch]
jz	short loc_6A2CC8

loc_6A2C61:
mov	al, [esi+20h]
test	al, 2
jz	short loc_6A2C97
mov	eax, [esi+2Ch]
mov	ecx, [esi+28h]
test	eax, eax
jl	short loc_6A2C78
jg	short loc_6A2C7F
test	ecx, ecx
jnb	short loc_6A2C7F

loc_6A2C78:
neg	ecx
adc	eax, 0
neg	eax

loc_6A2C7F:
mov	edx, [esi+1Ch]
and	edx, 1Fh
push	edx
push	1
push	eax
push	ecx
lea	eax, [esi+30h]
push	eax
mov	ecx, ebx
call	sub_6A22A0
jmp	short loc_6A2CC8

loc_6A2C97:
test	al, 1
jz	short loc_6A2CB0
mov	eax, [esi+28h]
test	eax, eax
jge	short loc_6A2CA4
neg	eax

loc_6A2CA4:
mov	ecx, [esi+1Ch]
and	ecx, 1Fh
push	ecx
push	1
push	eax
jmp	short loc_6A2CBD

loc_6A2CB0:
mov	eax, [esi+1Ch]
mov	ecx, [esi+28h]
and	eax, 1Fh
push	eax
push	1
push	ecx

loc_6A2CBD:
lea	edx, [esi+30h]
push	edx
mov	ecx, ebx
call	sub_6A2350

loc_6A2CC8:
mov	ecx, [ebx]
mov	eax, esi
sub	eax, [esi+18h]
and	ecx, 1Fh
add	eax, 4Ch
or	edi, 0FFFFFFFFh
cmp	eax, ecx
jnb	short loc_6A2CF3
lea	esp, [esp+0]

loc_6A2CE0:
add	[esi+18h], edi
mov	ecx, [esi+18h]
mov	byte ptr [ecx],	30h
mov	edx, [ebx]
inc	eax
and	edx, 1Fh
cmp	eax, edx
jb	short loc_6A2CE0

loc_6A2CF3:
test	byte ptr [ebx],	1Fh
jz	short loc_6A2D00
mov	eax, [esi+28h]
or	eax, [esi+2Ch]
jnz	short loc_6A2D0C

loc_6A2D00:
mov	cl, [esi+14h]
and	cl, 0A0h
or	cl, 20h
mov	[esi+14h], cl

loc_6A2D0C:
mov	ecx, [esi+1Ch]
and	ecx, 1Fh
cmp	ecx, 0Ah
jnz	short loc_6A2D8B
mov	dl, [esi+14h]
and	dl, 7Fh
cmp	dl, 30h
jnz	short loc_6A2D65
mov	eax, esi
sub	eax, [esi+18h]
add	eax, 4Ch
lea	ebx, [ebx+0]

loc_6A2D30:
test	byte ptr [esi+15h], 80h
jnz	short loc_6A2D40
test	byte ptr [esi+16h], 2
jnz	short loc_6A2D40
xor	ecx, ecx
jmp	short loc_6A2D45

loc_6A2D40:
mov	ecx, 1

loc_6A2D45:
mov	edx, [ebx]
shr	edx, 5
and	edx, 1Fh
sub	edx, ecx
cmp	eax, edx
jnb	short loc_6A2D65
mov	dl, [esi+14h]
add	[esi+18h], edi
mov	ecx, [esi+18h]
add	dl, dl
sar	dl, 1
mov	[ecx], dl
inc	eax
jmp	short loc_6A2D30

loc_6A2D65:
cmp	dword ptr [esi+2Ch], 0
jg	short loc_6A2D7F
jl	short loc_6A2D73
cmp	dword ptr [esi+28h], 0
jnb	short loc_6A2D7F

loc_6A2D73:
mov	al, 1
mov	ecx, esi
push	eax
call	sub_6A2430
jmp	short loc_6A2DC3

loc_6A2D7F:
xor	al, al
mov	ecx, esi
push	eax
call	sub_6A2430
jmp	short loc_6A2DC3

loc_6A2D8B:
cmp	ecx, 8
jz	short loc_6A2D95
cmp	ecx, 10h
jnz	short loc_6A2DC3

loc_6A2D95:
mov	eax, [esi+28h]
or	eax, [esi+2Ch]
jz	short loc_6A2DC3
mov	al, [esi+16h]
test	al, 8
jz	short loc_6A2DC3
cmp	ecx, 10h
jnz	short loc_6A2DBA
add	[esi+18h], edi
mov	ecx, [esi+18h]
not	al
and	al, 1
shl	al, 5
or	al, 58h
mov	[ecx], al

loc_6A2DBA:
add	[esi+18h], edi
mov	eax, [esi+18h]
mov	byte ptr [eax],	30h

loc_6A2DC3:
test	byte ptr [esi+16h], 2
jz	short loc_6A2DF8
test	byte ptr [esi+15h], 80h
jnz	short loc_6A2DF8
mov	cl, [esi+14h]
and	cl, 0A0h
or	cl, 20h
test	byte ptr [esi+20h], 1
mov	[esi+14h], cl
jz	short loc_6A2DF8
cmp	dword ptr [esi+2Ch], 0
jl	short loc_6A2DF8
jg	short loc_6A2DEF
cmp	dword ptr [esi+28h], 0
jb	short loc_6A2DF8

loc_6A2DEF:
add	[esi+18h], edi
mov	eax, [esi+18h]
mov	byte ptr [eax],	20h

loc_6A2DF8:
mov	ecx, [esi+18h]
mov	ebp, esi
sub	ebp, ecx
add	ebp, 4Ch
test	byte ptr [esi+16h], 4
jz	short loc_6A2E70
mov	eax, [ebx]
shr	eax, 5
and	eax, 1Fh
cmp	ebp, eax
jnb	loc_6A2EAB
mov	edi, esi
sub	edi, eax
push	ebp
push	ecx
add	edi, 4Ch
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	edx, [ebx]
shr	edx, 5
mov	[esi+18h], edi
and	edx, 1Fh
add	esp, 0Ch
add	edi, ebp
mov	eax, ebp
cmp	ebp, edx
jnb	short loc_6A2EAB
lea	ecx, [ecx+0]

loc_6A2E40:
mov	ecx, [esi+1Ch]
and	ecx, 1Fh
cmp	cl, 0Ah
jz	short loc_6A2E56
mov	dl, [esi+14h]
add	dl, dl
sar	dl, 1
mov	[edi], dl
jmp	short loc_6A2E59

loc_6A2E56:
mov	byte ptr [edi],	20h

loc_6A2E59:
mov	ecx, [ebx]
shr	ecx, 5
inc	eax
and	ecx, 1Fh
inc	edi
cmp	eax, ecx
jb	short loc_6A2E40
pop	edi
pop	ebp
pop	ebx
mov	byte ptr [esi+8], 1
pop	esi
retn

loc_6A2E70:
mov	edx, [ebx]
shr	edx, 5
and	edx, 1Fh
cmp	ebp, edx
jnb	short loc_6A2EAB
lea	esp, [esp+0]

loc_6A2E80:
mov	eax, [esi+1Ch]
add	[esi+18h], edi
and	eax, 1Fh
cmp	al, 0Ah
mov	eax, [esi+18h]
jz	short loc_6A2E9B
mov	cl, [esi+14h]
add	cl, cl
sar	cl, 1
mov	[eax], cl
jmp	short loc_6A2E9E

loc_6A2E9B:
mov	byte ptr [eax],	20h

loc_6A2E9E:
mov	edx, [ebx]
shr	edx, 5
inc	ebp
and	edx, 1Fh
cmp	ebp, edx
jb	short loc_6A2E80

loc_6A2EAB:
pop	edi
pop	ebp
mov	byte ptr [esi+8], 1
pop	ebx

loc_6A2EB2:
pop	esi
retn
sub_6A2C40 endp

align 10h



; int __stdcall	sub_6A2EC0(double)
sub_6A2EC0 proc	near

arg_0= qword ptr  4

mov	eax, ecx
fld	[esp+arg_0]
mov	dword ptr [eax], offset	off_14379C0
xor	edx, edx
mov	[eax+4], edx
mov	[eax+8], dl
mov	ecx, [eax+10h]
and	ecx, 0FFFFFC21h
or	ecx, 21h
mov	[eax+10h], ecx
movzx	ecx, byte ptr [eax+14h]
and	cl, 0A0h
or	cl, 20h
mov	[eax+14h], cl
movzx	ecx, byte ptr [eax+16h]
mov	[eax+15h], dl
and	cl, 0F1h
or	cl, 1
mov	[eax+16h], cl
mov	dword ptr [eax+0Ch], offset off_143A4DC
mov	[eax+1Ch], edx
mov	[eax+28h], edx
fstp	qword ptr [eax+20h]
lea	ecx, [eax+187h]
mov	[ecx], dl
mov	dword ptr [eax], offset	off_1437AC8
mov	dword ptr [eax+0Ch], offset off_1437A80
mov	[eax+18h], ecx
mov	edx, [eax+10h]
and	edx, 0FFFFFFE6h
or	edx, 6
mov	[eax+10h], edx
retn	8
sub_6A2EC0 endp

align 10h



; int __stdcall	sub_6A2F40(int,	double)
sub_6A2F40 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8

mov	eax, ecx
fld	[esp+arg_4]
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_14379C0
xor	edx, edx
mov	[eax+8], dl
mov	ecx, [eax+10h]
and	ecx, 0FFFFFC21h
or	ecx, 21h
mov	[eax+10h], ecx
movzx	ecx, byte ptr [eax+14h]
and	cl, 0A0h
or	cl, 20h
mov	[eax+14h], cl
movzx	ecx, byte ptr [eax+16h]
mov	[eax+15h], dl
and	cl, 0F1h
or	cl, 1
mov	[eax+16h], cl
mov	dword ptr [eax+0Ch], offset off_143A4DC
mov	[eax+1Ch], edx
mov	[eax+28h], edx
fstp	qword ptr [eax+20h]
lea	ecx, [eax+187h]
mov	[ecx], dl
mov	dword ptr [eax], offset	off_1437AC8
mov	dword ptr [eax+0Ch], offset off_1437A80
mov	[eax+18h], ecx
mov	edx, [eax+10h]
and	edx, 0FFFFFFE6h
or	edx, 6
mov	[eax+10h], edx
retn	0Ch
sub_6A2F40 endp

align 10h



sub_6A2FC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
xor	edx, edx
push	esi
mov	esi, ecx
mov	[esi+4], eax
mov	eax, [esp+4+arg_4]
mov	[esi+8], dl
mov	dword ptr [esi], offset	off_1437B08
mov	ecx, [eax]
mov	[esi+0Ch], ecx
mov	ecx, [eax+4]
mov	[esi+10h], ecx
mov	ecx, [eax+8]
mov	[esi+18h], edx
mov	[esi+14h], ecx
mov	[esi+1Ch], edx
mov	[esi+20h], edx
mov	eax, [eax+8]
mov	[esi+18h], eax
cmp	eax, edx
jnz	short loc_6A3011
mov	eax, [esi+4]
mov	ecx, [eax+14h]
cmp	ecx, edx
jz	short loc_6A3011
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax
mov	[esi+18h], eax

loc_6A3011:
mov	eax, esi
pop	esi
retn	8
sub_6A2FC0 endp

align 10h



sub_6A3020 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [ebx]
push	esi
xor	esi, esi
cmp	[ebx+4], esi
jbe	short loc_6A3045
mov	cl, [esp+0Ch+arg_8]

loc_6A3034:
mov	al, [esi+ebp]
test	al, al
jz	short loc_6A3045
cmp	al, cl
jz	short loc_6A3045
inc	esi
cmp	esi, [ebx+4]
jb	short loc_6A3034

loc_6A3045:
test	esi, esi
jz	short loc_6A30A6
test	ebp, ebp
jz	short loc_6A30A6
movsx	eax, byte ptr [ebp+0]
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_6A30A6
push	edi
mov	edi, 1
cmp	esi, edi
jbe	short loc_6A3086
jmp	short loc_6A3070
align 10h

loc_6A3070:
movsx	ecx, byte ptr [edi+ebp]
push	ecx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_6A3086
inc	edi
cmp	edi, esi
jb	short loc_6A3070

loc_6A3086:
mov	eax, [ebx+4]
mov	ecx, edi
cmp	eax, edi
pop	edi
jnb	short loc_6A3092
mov	ecx, eax

loc_6A3092:
add	[ebx], ecx
sub	eax, ecx
push	ebp		; char *
mov	[ebx+4], eax
call	_atoi
add	esp, 4
pop	esi
pop	ebp
pop	ebx
retn

loc_6A30A6:
mov	eax, [esp+0Ch+arg_4]
pop	esi
pop	ebp
pop	ebx
retn
sub_6A3020 endp

align 10h



sub_6A30B0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6A30E0
mov	eax, [edi]
test	eax, eax
jz	short loc_6A30D5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6A30D5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6A30E0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6A3113
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*2]
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6A3113:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*2]
add	eax, eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6A30B0 endp

align 10h



sub_6A3140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*4]
cmp	dword ptr [esi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*4+8]
mov	eax, edx
jz	short loc_6A3187
cmp	[ecx+4], edx
jnz	short loc_6A3187
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_6A3162:
cmp	[ecx+4], edx
jnz	short loc_6A316E
mov	ebx, [ecx+8]
cmp	ebx, [edi]
jz	short loc_6A3181

loc_6A316E:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6A317E
lea	ecx, [eax+eax*4]
lea	ecx, [esi+ecx*4+8]
jmp	short loc_6A3162

loc_6A317E:
or	eax, 0FFFFFFFFh

loc_6A3181:
pop	ebx
pop	edi
pop	esi
retn	8

loc_6A3187:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6A3140 endp

align 10h



sub_6A3190 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
test	ecx, ecx
jz	short loc_6A3219
xor	eax, eax
push	edi
test	ecx, ecx
jbe	short loc_6A31B1
mov	edx, [esp+8+arg_0]

loc_6A31A6:
cmp	byte ptr [edx+eax], 2Eh
jz	short loc_6A321D
inc	eax
cmp	eax, ecx
jb	short loc_6A31A6

loc_6A31B1:
or	edi, 0FFFFFFFFh

loc_6A31B4:
mov	eax, [esi]
shr	eax, 5
push	3Ah
and	eax, 1Fh
push	eax
lea	ecx, [esp+10h+arg_0]
push	ecx
call	sub_6A3020
shl	eax, 5
xor	eax, [esi]
add	esp, 0Ch
and	eax, 3E0h
xor	[esi], eax
mov	eax, [esi]
test	edi, edi
pop	edi
jl	short loc_6A3219
mov	edx, [esp+4+arg_4]
and	eax, 0FFFFFFE0h
mov	ecx, 1
mov	[esi], eax
cmp	edx, ecx
jnb	short loc_6A31F3
mov	ecx, edx

loc_6A31F3:
add	[esp+4+arg_0], ecx
sub	edx, ecx
push	3Ah
and	eax, 1Fh
mov	[esp+8+arg_4], edx
push	eax
lea	edx, [esp+0Ch+arg_0]
push	edx
call	sub_6A3020
mov	ecx, [esi]
xor	ecx, eax
and	ecx, 1Fh
add	esp, 0Ch
xor	[esi], ecx

loc_6A3219:
pop	esi
retn	8

loc_6A321D:
mov	edi, eax
jmp	short loc_6A31B4
sub_6A3190 endp

align 10h



sub_6A3230 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, [ecx+24h]
xor	esi, esi
test	edi, edi
jbe	short loc_6A326C
mov	ebx, [esp+14h+arg_0]
xor	edx, edx

loc_6A3245:
cmp	esi, 10h
jnb	short loc_6A3250
lea	eax, [edx+ecx+34h]
jmp	short loc_6A325A

loc_6A3250:
mov	eax, [ecx+28h]
lea	eax, [eax+edx-0C0h]

loc_6A325A:
cmp	dword ptr [eax], 2
jnz	short loc_6A3264
cmp	[eax+4], ebx
jz	short loc_6A3277

loc_6A3264:
inc	esi
add	edx, 0Ch
cmp	esi, edi
jb	short loc_6A3245

loc_6A326C:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 8
retn	0Ch

loc_6A3277:
mov	dl, [esp+14h+arg_8]
mov	ecx, [esp+14h+arg_4]
mov	byte ptr [esp+14h+var_4], dl
mov	esi, [esp+14h+var_4]
mov	edx, 2
mov	[eax], edx
mov	[eax+4], ecx
pop	edi
mov	[eax+8], esi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch
sub_6A3230 endp

align 10h



sub_6A32A0 proc	near

var_8= dword ptr -8

sub	esp, 8
push	ebx
push	ebp
mov	ebp, [ecx+24h]
push	esi
movzx	esi, word ptr [ecx+8]
push	edi
mov	bl, 1
mov	dword ptr [ecx+10h], 0FFFFFFFFh
cmp	esi, ebp
jnb	short loc_6A3306
lea	edi, [esi+esi*2]
add	edi, edi
add	edi, edi

loc_6A32C2:
cmp	esi, 10h
jnb	short loc_6A32CD
lea	edx, [edi+ecx+34h]
jmp	short loc_6A32D7

loc_6A32CD:
mov	eax, [ecx+28h]
lea	edx, [eax+edi-0C0h]

loc_6A32D7:
cmp	dword ptr [edx], 1
jnz	short loc_6A32F6
mov	eax, [edx+4]
mov	edx, [edx+8]
shr	edx, 8
mov	[esp+18h+var_8], eax
cmp	dl, [ecx+5]
jz	short loc_6A3310
test	bl, bl
jz	short loc_6A32FE
xor	bl, bl
jmp	short loc_6A32FE

loc_6A32F6:
test	bl, bl
jz	short loc_6A32FE
inc	word ptr [ecx+8]

loc_6A32FE:
inc	esi
add	edi, 0Ch
cmp	esi, ebp
jb	short loc_6A32C2

loc_6A3306:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn

loc_6A3310:
test	bl, bl
jz	short loc_6A3318
inc	word ptr [ecx+8]

loc_6A3318:
pop	edi
mov	[ecx+10h], esi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn
sub_6A32A0 endp

align 10h



sub_6A3330 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
push	edi
cmp	eax, 10h
jnb	short loc_6A334A
lea	ecx, [eax+eax*2]
lea	edx, [esi+ecx*4+34h]
jmp	short loc_6A3354

loc_6A334A:
mov	ecx, [esi+28h]
lea	edx, [eax+eax*2-30h]
lea	edx, [ecx+edx*4]

loc_6A3354:
mov	ecx, [edx+4]
mov	ebp, [esp+20h+arg_0]
mov	edx, [edx+8]
mov	[esp+20h+var_8], ecx
mov	cl, [esp+20h+arg_4]
mov	byte ptr [esp+20h+var_C], cl
mov	ebx, [esp+20h+var_C]
mov	edi, 2
mov	ecx, ebp
cmp	eax, 10h
jnb	short loc_6A3383
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*4+34h]
jmp	short loc_6A338D

loc_6A3383:
mov	esi, [esi+28h]
lea	eax, [eax+eax*2-30h]
lea	eax, [esi+eax*4]

loc_6A338D:
mov	[eax], edi
mov	[eax+4], ecx
mov	[eax+8], ebx
test	dl, dl
jbe	short loc_6A33B7
mov	ecx, [esp+20h+var_8]
mov	eax, [ebp+0]
movzx	edx, dl
mov	[esp+20h+var_10], ecx
lea	ecx, [esp+20h+var_10]
mov	[esp+20h+var_C], edx
mov	edx, [eax+8]
push	ecx
mov	ecx, ebp
call	edx

loc_6A33B7:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6A3330 endp

align 10h



sub_6A33D0 proc	near

var_2E=	byte ptr -2Eh
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  4

sub	esp, 30h
push	ebx
push	ebp
push	esi
mov	esi, [esp+3Ch+arg_0]
push	edi
mov	ebp, ecx
cmp	esi, 10h
jnb	short loc_6A33EB
lea	eax, [esi+esi*2]
lea	eax, [ebp+eax*4+34h]
jmp	short loc_6A33F5

loc_6A33EB:
mov	edx, [ebp+28h]
lea	ecx, [esi+esi*2-30h]
lea	eax, [edx+ecx*4]

loc_6A33F5:
cmp	dword ptr [eax], 2
jnz	loc_6A3A24
cmp	esi, 10h
jnb	short loc_6A340C
lea	eax, [esi+esi*2]
lea	eax, [ebp+eax*4+34h]
jmp	short loc_6A3416

loc_6A340C:
mov	edx, [ebp+28h]
lea	ecx, [esi+esi*2-30h]
lea	eax, [edx+ecx*4]

loc_6A3416:
mov	ebx, [eax+4]
mov	eax, [ebx]
mov	edx, [eax+18h]
mov	ecx, ebx
mov	[esp+40h+var_2C], ebx
call	edx
mov	[esp+40h+var_2D], al
test	al, al
jnz	short loc_6A344A
cmp	[ebx+8], al
jnz	loc_6A3A24
mov	eax, [ebx]
mov	edx, [eax+0Ch]
mov	ecx, ebx
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	4

loc_6A344A:
test	al, 2
jz	loc_6A3520
dec	esi
mov	[esp+40h+var_28], esi
mov	[esp+40h+var_2E], 0
cmp	esi, 0FFFFFFFFh
jz	loc_6A3508
lea	edi, [esi+esi*2]
add	edi, edi
add	edi, edi
mov	[esp+40h+var_24], edi

loc_6A3470:
cmp	[esp+40h+var_2E], 0
jnz	loc_6A3520
cmp	esi, 10h
jnb	short loc_6A3486
lea	eax, [edi+ebp+34h]
jmp	short loc_6A3490

loc_6A3486:
mov	eax, [ebp+28h]
lea	eax, [eax+edi-0C0h]

loc_6A3490:
mov	eax, [eax]
sub	eax, 0
jz	loc_6A35F3
sub	eax, 2
jnz	short loc_6A34EC
cmp	esi, 10h
jnb	short loc_6A34AB
lea	eax, [edi+ebp+34h]
jmp	short loc_6A34B5

loc_6A34AB:
mov	ecx, [ebp+28h]
lea	eax, [ecx+edi-0C0h]

loc_6A34B5:
mov	esi, [eax+4]
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
test	al, 4
jz	loc_6A356D
mov	esi, [ebx]
push	offset aStub	; "stub"
lea	ecx, [esp+44h+var_18]
add	esi, 1Ch
call	sub_6A20E0
mov	edx, [esi]
push	eax
mov	ecx, ebx
call	edx

loc_6A34E3:
mov	[esp+40h+var_2E], 1

loc_6A34E8:
mov	esi, [esp+40h+var_28]

loc_6A34EC:
dec	esi
sub	edi, 0Ch
mov	[esp+40h+var_28], esi
mov	[esp+40h+var_24], edi
cmp	esi, 0FFFFFFFFh
jnz	loc_6A3470
cmp	[esp+40h+var_2E], 0
jnz	short loc_6A3520

loc_6A3508:
xor	eax, eax
mov	[esp+40h+var_18], eax
mov	[esp+40h+var_14], eax
mov	eax, [ebx]
mov	edx, [eax+1Ch]
lea	ecx, [esp+40h+var_18]
push	ecx
mov	ecx, ebx
call	edx

loc_6A3520:
test	[esp+40h+var_2D], 1
jz	loc_6A3754
mov	eax, [esp+40h+arg_0]
dec	eax
mov	[esp+40h+var_28], eax
mov	[esp+40h+var_2E], 0
cmp	eax, 0FFFFFFFFh
jz	loc_6A373A
mov	edi, eax
lea	ebx, [edi+edi*2]
add	ebx, ebx
add	ebx, ebx
jmp	short loc_6A3550
align 10h

loc_6A3550:
cmp	[esp+40h+var_2E], 0
jnz	loc_6A3754
cmp	edi, 10h
jnb	loc_6A364D
lea	eax, [ebx+ebp+34h]
jmp	loc_6A3657

loc_6A356D:
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
test	al, 8
jz	short loc_6A35A7
mov	eax, [esi]
mov	edx, [eax+2Ch]
mov	ecx, esi
call	edx
cmp	eax, 2
jnz	short loc_6A35A7
mov	esi, [ebx]
push	offset aStub	; "stub"
lea	ecx, [esp+44h+var_10]
add	esi, 1Ch
call	sub_6A20E0
push	eax
mov	eax, [esi]
mov	ecx, ebx
call	eax
jmp	loc_6A34E3

loc_6A35A7:
mov	ecx, [esp+40h+var_28]
push	ecx
mov	ecx, ebp
call	sub_6A33D0
mov	edx, [esi]
mov	eax, [edx+10h]
sub	esp, 8
push	esp
mov	ecx, esi
call	eax
call	sub_6A26B0
add	esp, 8
test	al, al
jnz	loc_6A34E8
mov	edx, [esi]
mov	edi, [ebx]
mov	edx, [edx+10h]
lea	eax, [esp+40h+var_8]
push	eax
mov	ecx, esi
add	edi, 1Ch
call	edx
push	eax
mov	eax, [edi]
mov	ecx, ebx
call	eax
mov	edi, [esp+40h+var_24]
jmp	loc_6A34E3

loc_6A35F3:
cmp	esi, 10h
jnb	short loc_6A35FE
lea	eax, [edi+ebp+34h]
jmp	short loc_6A3608

loc_6A35FE:
mov	ecx, [ebp+28h]
lea	eax, [ecx+edi-0C0h]

loc_6A3608:
movzx	ecx, byte ptr [eax+8]
mov	edx, [eax+4]
sub	esp, 8
mov	[esp+48h+var_20], edx
mov	[esp+48h+var_1C], ecx
mov	eax, esp
mov	[eax], edx
mov	edx, [esp+48h+var_1C]
mov	[eax+4], edx
call	sub_6A26B0
add	esp, 8
test	al, al
jnz	loc_6A34EC
mov	eax, [ebx]
mov	edx, [eax+1Ch]
lea	ecx, [esp+40h+var_20]
push	ecx
mov	ecx, ebx
call	edx
mov	[esp+40h+var_2E], 1
jmp	loc_6A34EC

loc_6A364D:
mov	eax, [ebp+28h]
lea	eax, [eax+ebx-0C0h]

loc_6A3657:
mov	eax, [eax]
sub	eax, 0
jz	short loc_6A36CF
sub	eax, 2
jnz	loc_6A3722
cmp	edi, 10h
jnb	short loc_6A3672
lea	eax, [ebx+ebp+34h]
jmp	short loc_6A367C

loc_6A3672:
mov	ecx, [ebp+28h]
lea	eax, [ecx+ebx-0C0h]

loc_6A367C:
mov	esi, [eax+4]
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
push	edi
mov	ecx, ebp
call	sub_6A33D0
mov	edx, [esi]
mov	eax, [edx+10h]
sub	esp, 8
push	esp
mov	ecx, esi
call	eax
call	sub_6A26B0
add	esp, 8
test	al, al
jnz	short loc_6A3722
mov	ecx, [esp+40h+var_2C]
mov	edi, [ecx]
mov	edx, [esi]
mov	edx, [edx+10h]
lea	eax, [esp+40h+var_8]
push	eax
mov	ecx, esi
add	edi, 1Ch
call	edx
mov	ecx, [esp+40h+var_2C]
push	eax
mov	eax, [edi]
call	eax
mov	edi, [esp+40h+var_28]
jmp	short loc_6A371D

loc_6A36CF:
cmp	edi, 10h
jnb	short loc_6A36DA
lea	eax, [ebx+ebp+34h]
jmp	short loc_6A36E4

loc_6A36DA:
mov	ecx, [ebp+28h]
lea	eax, [ecx+ebx-0C0h]

loc_6A36E4:
movzx	ecx, byte ptr [eax+8]
mov	edx, [eax+4]
sub	esp, 8
mov	[esp+48h+var_20], edx
mov	[esp+48h+var_1C], ecx
mov	eax, esp
mov	[eax], edx
mov	edx, [esp+48h+var_1C]
mov	[eax+4], edx
call	sub_6A26B0
add	esp, 8
test	al, al
jnz	short loc_6A3722
mov	ecx, [esp+40h+var_2C]
mov	eax, [ecx]
mov	eax, [eax+1Ch]
lea	edx, [esp+40h+var_20]
push	edx
call	eax

loc_6A371D:
mov	[esp+40h+var_2E], 1

loc_6A3722:
dec	edi
sub	ebx, 0Ch
mov	[esp+40h+var_28], edi
cmp	edi, 0FFFFFFFFh
jnz	loc_6A3550
cmp	[esp+40h+var_2E], 0
jnz	short loc_6A3754

loc_6A373A:
mov	ecx, [esp+40h+var_2C]
mov	edx, [ecx]
mov	edx, [edx+1Ch]
xor	eax, eax
mov	[esp+40h+var_18], eax
mov	[esp+40h+var_14], eax
lea	eax, [esp+40h+var_18]
push	eax
call	edx

loc_6A3754:
test	[esp+40h+var_2D], 4
jz	loc_6A38B4
mov	ebx, [esp+40h+arg_0]
mov	eax, [ebp+24h]
inc	ebx
mov	[esp+40h+var_24], ebx
mov	[esp+40h+var_2E], 0
mov	[esp+40h+var_20], eax
cmp	ebx, eax
jnb	loc_6A389A
lea	edi, [ebx+ebx*2]
add	edi, edi
add	edi, edi
mov	[esp+40h+var_28], edi
jmp	short loc_6A3790
align 10h

loc_6A3790:
cmp	[esp+40h+var_2E], 0
jnz	loc_6A38B4
cmp	ebx, 10h
jnb	short loc_6A37A6
lea	eax, [edi+ebp+34h]
jmp	short loc_6A37B0

loc_6A37A6:
mov	eax, [ebp+28h]
lea	eax, [eax+edi-0C0h]

loc_6A37B0:
mov	eax, [eax]
sub	eax, 0
jz	short loc_6A382A
sub	eax, 2
jnz	loc_6A387D
cmp	ebx, 10h
jnb	short loc_6A37CB
lea	eax, [edi+ebp+34h]
jmp	short loc_6A37D5

loc_6A37CB:
mov	ecx, [ebp+28h]
lea	eax, [ecx+edi-0C0h]

loc_6A37D5:
mov	esi, [eax+4]
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
push	ebx
mov	ecx, ebp
call	sub_6A33D0
mov	edx, [esi]
mov	eax, [edx+10h]
sub	esp, 8
push	esp
mov	ecx, esi
call	eax
call	sub_6A26B0
add	esp, 8
test	al, al
jnz	short loc_6A387D
mov	ebx, [esp+40h+var_2C]
mov	edx, [esi]
mov	edi, [ebx]
mov	edx, [edx+10h]
lea	eax, [esp+40h+var_8]
push	eax
mov	ecx, esi
add	edi, 24h
call	edx
push	eax
mov	eax, [edi]
mov	ecx, ebx
call	eax
mov	edi, [esp+40h+var_28]
mov	ebx, [esp+40h+var_24]
jmp	short loc_6A3878

loc_6A382A:
cmp	ebx, 10h
jnb	short loc_6A3835
lea	eax, [edi+ebp+34h]
jmp	short loc_6A383F

loc_6A3835:
mov	ecx, [ebp+28h]
lea	eax, [ecx+edi-0C0h]

loc_6A383F:
movzx	ecx, byte ptr [eax+8]
mov	edx, [eax+4]
sub	esp, 8
mov	[esp+48h+var_18], edx
mov	[esp+48h+var_14], ecx
mov	eax, esp
mov	[eax], edx
mov	edx, [esp+48h+var_14]
mov	[eax+4], edx
call	sub_6A26B0
add	esp, 8
test	al, al
jnz	short loc_6A387D
mov	ecx, [esp+40h+var_2C]
mov	eax, [ecx]
mov	eax, [eax+24h]
lea	edx, [esp+40h+var_18]
push	edx
call	eax

loc_6A3878:
mov	[esp+40h+var_2E], 1

loc_6A387D:
inc	ebx
add	edi, 0Ch
mov	[esp+40h+var_24], ebx
mov	[esp+40h+var_28], edi
cmp	ebx, [esp+40h+var_20]
jb	loc_6A3790
cmp	[esp+40h+var_2E], 0
jnz	short loc_6A38B4

loc_6A389A:
mov	ecx, [esp+40h+var_2C]
mov	edx, [ecx]
mov	edx, [edx+24h]
xor	eax, eax
mov	[esp+40h+var_18], eax
mov	[esp+40h+var_14], eax
lea	eax, [esp+40h+var_18]
push	eax
call	edx

loc_6A38B4:
test	[esp+40h+var_2D], 8
jz	loc_6A3A13
mov	ecx, [esp+40h+var_2C]
mov	eax, [ecx]
mov	edx, [eax+2Ch]
call	edx
sub	eax, 1
jz	loc_6A39A5
sub	eax, 1
jz	loc_6A396A
sub	eax, 1
jnz	loc_6A3A13
mov	ecx, [esp+40h+var_2C]
mov	eax, [ecx]
mov	edx, [eax+30h]
call	edx
mov	edi, [ebp+24h]
mov	bl, al
xor	al, al
xor	ecx, ecx
test	edi, edi
jbe	loc_6A3A13
xor	esi, esi

loc_6A3903:
cmp	ecx, 10h
jnb	short loc_6A390E
lea	edx, [esi+ebp+34h]
jmp	short loc_6A3918

loc_6A390E:
mov	edx, [ebp+28h]
lea	edx, [edx+esi-0C0h]

loc_6A3918:
cmp	dword ptr [edx], 2
jnz	short loc_6A3923
cmp	al, bl
jz	short loc_6A3930
inc	al

loc_6A3923:
inc	ecx
add	esi, 0Ch
cmp	ecx, edi
jb	short loc_6A3903
jmp	loc_6A3A13

loc_6A3930:
cmp	ecx, 10h
jnb	short loc_6A394E
lea	eax, [ecx+ecx*2]
mov	esi, [ebp+eax*4+38h]
lea	eax, [ebp+eax*4+34h]
push	ecx
mov	ecx, ebp
call	sub_6A33D0
push	esi
jmp	loc_6A3A08

loc_6A394E:
mov	eax, [ebp+28h]
lea	edx, [ecx+ecx*2-30h]
mov	esi, [eax+edx*4+4]
lea	eax, [eax+edx*4]
push	ecx
mov	ecx, ebp
call	sub_6A33D0
push	esi
jmp	loc_6A3A08

loc_6A396A:
mov	esi, [esp+40h+arg_0]
mov	edx, [ebp+24h]
inc	esi
cmp	esi, edx
jnb	loc_6A3A13
lea	eax, [esi+esi*2]
add	eax, eax
add	eax, eax

loc_6A3981:
cmp	esi, 10h
jnb	short loc_6A398C
lea	ecx, [eax+ebp+34h]
jmp	short loc_6A3996

loc_6A398C:
mov	ecx, [ebp+28h]
lea	ecx, [ecx+eax-0C0h]

loc_6A3996:
cmp	dword ptr [ecx], 2
jz	short loc_6A39DB
inc	esi
add	eax, 0Ch
cmp	esi, edx
jb	short loc_6A3981
jmp	short loc_6A3A13

loc_6A39A5:
mov	esi, [esp+40h+arg_0]
dec	esi
cmp	esi, 0FFFFFFFFh
jz	short loc_6A3A13
lea	eax, [esi+esi*2]
add	eax, eax
add	eax, eax

loc_6A39B6:
cmp	esi, 10h
jnb	short loc_6A39C1
lea	ecx, [eax+ebp+34h]
jmp	short loc_6A39CB

loc_6A39C1:
mov	ecx, [ebp+28h]
lea	ecx, [ecx+eax-0C0h]

loc_6A39CB:
cmp	dword ptr [ecx], 2
jz	short loc_6A39DB
dec	esi
sub	eax, 0Ch
cmp	esi, 0FFFFFFFFh
jnz	short loc_6A39B6
jmp	short loc_6A3A13

loc_6A39DB:
cmp	esi, 10h
jnb	short loc_6A39E9
lea	edx, [esi+esi*2]
lea	eax, [ebp+edx*4+34h]
jmp	short loc_6A39F3

loc_6A39E9:
mov	ecx, [ebp+28h]
lea	eax, [esi+esi*2-30h]
lea	eax, [ecx+eax*4]

loc_6A39F3:
mov	edi, [eax+4]
mov	edx, [edi]
mov	eax, [edx+18h]
mov	ecx, edi
call	eax
push	esi
mov	ecx, ebp
call	sub_6A33D0
push	edi

loc_6A3A08:
mov	ecx, [esp+44h+var_2C]
mov	edx, [ecx]
mov	eax, [edx+34h]
call	eax

loc_6A3A13:
mov	ecx, [esp+40h+var_2C]
cmp	byte ptr [ecx+8], 0
jnz	short loc_6A3A24
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax

loc_6A3A24:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	4
sub_6A33D0 endp

align 10h



sub_6A3A30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+24h]
xor	ebx, ebx
push	edi
xor	edi, edi
mov	[esi+0Ch], ebx
mov	[esp+1Ch+var_C], eax
cmp	eax, ebx
jbe	short loc_6A3AB2
jmp	short loc_6A3A50
align 10h

loc_6A3A50:
cmp	edi, 10h
jnb	short loc_6A3A5B
lea	ebp, [ebx+esi+34h]
jmp	short loc_6A3A65

loc_6A3A5B:
mov	eax, [esi+28h]
lea	ebp, [eax+ebx-0C0h]

loc_6A3A65:
cmp	edi, 10h
jnb	short loc_6A3A70
lea	eax, [ebx+esi+34h]
jmp	short loc_6A3A7A

loc_6A3A70:
mov	ecx, [esi+28h]
lea	eax, [ecx+ebx-0C0h]

loc_6A3A7A:
mov	eax, [eax]
sub	eax, 0
jz	short loc_6A3AA1
sub	eax, 2
jnz	short loc_6A3AA8
push	edi
mov	ecx, esi
call	sub_6A33D0
mov	ecx, [ebp+4]
test	ecx, ecx
jz	short loc_6A3AA8
mov	edx, [ecx]
mov	eax, [edx+14h]
call	eax
add	[esi+0Ch], eax
jmp	short loc_6A3AA8

loc_6A3AA1:
movzx	ecx, byte ptr [ebp+8]
add	[esi+0Ch], ecx

loc_6A3AA8:
inc	edi
add	ebx, 0Ch
cmp	edi, [esp+1Ch+var_C]
jb	short loc_6A3A50

loc_6A3AB2:
mov	eax, [esi+18h]
sub	eax, 0
jz	loc_6A3B97
sub	eax, 1
jz	short loc_6A3AF6
sub	eax, 1
jnz	loc_6A3BA4
mov	eax, [esi+20h]
mov	edi, [esi+1Ch]
mov	edx, [esi]
mov	edx, [edx+4]
push	eax
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi+0Ch]
mov	esi, [esi+20h]
dec	esi
cmp	esi, eax
jnb	short loc_6A3AEA
mov	eax, esi

loc_6A3AEA:
mov	byte ptr [eax+edi], 0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_6A3AF6:
mov	ebp, [esi+1Ch]
mov	eax, [ebp+4]
add	eax, [esi+0Ch]
mov	edi, [esi+24h]
push	eax
mov	ecx, ebp
mov	[esp+20h+var_C], edi
call	sub_679BA0
xor	ebx, ebx
test	edi, edi
jbe	loc_6A3BA4
xor	edi, edi
lea	ebx, [ebx+0]

loc_6A3B20:
cmp	ebx, 10h
jnb	short loc_6A3B2B
lea	ecx, [edi+esi+34h]
jmp	short loc_6A3B35

loc_6A3B2B:
mov	ecx, [esi+28h]
lea	ecx, [ecx+edi-0C0h]

loc_6A3B35:
cmp	ebx, 10h
jnb	short loc_6A3B40
lea	eax, [edi+esi+34h]
jmp	short loc_6A3B4A

loc_6A3B40:
mov	edx, [esi+28h]
lea	eax, [edx+edi-0C0h]

loc_6A3B4A:
mov	eax, [eax]
sub	eax, 0
jz	short loc_6A3B75
sub	eax, 2
jnz	short loc_6A3B85
mov	ecx, [ecx+4]
test	ecx, ecx
jz	short loc_6A3B85
mov	eax, [ecx]
mov	eax, [eax+10h]
lea	edx, [esp+1Ch+var_8]
push	edx
call	eax
mov	ecx, [esp+1Ch+var_4]
mov	edx, [esp+1Ch+var_8]
push	ecx
push	edx
jmp	short loc_6A3B7E

loc_6A3B75:
movzx	eax, byte ptr [ecx+8]
mov	ecx, [ecx+4]
push	eax
push	ecx

loc_6A3B7E:
mov	ecx, ebp
call	sub_679D10

loc_6A3B85:
inc	ebx
add	edi, 0Ch
cmp	ebx, [esp+1Ch+var_C]
jb	short loc_6A3B20
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_6A3B97:
mov	edx, [esi+0Ch]
mov	ecx, [esi+1Ch]
push	edx
push	esi
call	sub_67A180

loc_6A3BA4:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_6A3A30 endp

align 10h



sub_6A3BB0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebp
push	edi
mov	edi, [esp+14h+arg_4]
mov	ebp, ecx
mov	eax, [ebp+24h]
xor	edx, edx
mov	[esp+14h+var_C], eax
mov	[esp+14h+arg_4], edx
test	edi, edi
jz	loc_6A3C76
push	ebx
xor	ebx, ebx
push	esi

loc_6A3BD4:
cmp	edx, [esp+1Ch+var_C]
jnb	loc_6A3C74
cmp	edx, 10h
jnb	short loc_6A3BE9
lea	ecx, [ebx+ebp+34h]
jmp	short loc_6A3BF3

loc_6A3BE9:
mov	ecx, [ebp+28h]
lea	ecx, [ecx+ebx-0C0h]

loc_6A3BF3:
cmp	edx, 10h
jnb	short loc_6A3BFE
lea	eax, [ebx+ebp+34h]
jmp	short loc_6A3C08

loc_6A3BFE:
mov	eax, [ebp+28h]
lea	eax, [eax+ebx-0C0h]

loc_6A3C08:
mov	eax, [eax]
sub	eax, 0
jz	short loc_6A3C3E
sub	eax, 2
jnz	short loc_6A3C64
mov	ecx, [ecx+4]
test	ecx, ecx
jz	short loc_6A3C64
mov	edx, [ecx]
mov	edx, [edx+10h]
lea	eax, [esp+1Ch+var_8]
push	eax
call	edx
mov	esi, [esp+1Ch+var_4]
cmp	edi, esi
jnb	short loc_6A3C31
mov	esi, edi

loc_6A3C31:
mov	eax, [esp+1Ch+var_8]
mov	ecx, [esp+1Ch+arg_0]
push	esi
push	eax
push	ecx
jmp	short loc_6A3C52

loc_6A3C3E:
movzx	esi, byte ptr [ecx+8]
cmp	edi, esi
jnb	short loc_6A3C48
mov	esi, edi

loc_6A3C48:
mov	edx, [ecx+4]
mov	eax, [esp+1Ch+arg_0]
push	esi
push	edx
push	eax

loc_6A3C52:		; Microsoft VisualC 2-9/net runtime
call	unknown_libname_61
mov	edx, [esp+28h+arg_4]
add	esp, 0Ch
sub	edi, esi
add	[esp+1Ch+arg_0], esi

loc_6A3C64:
inc	edx
add	ebx, 0Ch
mov	[esp+1Ch+arg_4], edx
test	edi, edi
jnz	loc_6A3BD4

loc_6A3C74:
pop	esi
pop	ebx

loc_6A3C76:
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_6A3BB0 endp

align 10h



sub_6A3C80 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
mov	ebx, [esp+20h+arg_0]
mov	edx, [ebx]
push	esi
mov	esi, [ebx+4]
xor	eax, eax
push	edi
mov	edi, ecx
test	esi, esi
jbe	short loc_6A3CA8

loc_6A3C97:
mov	cl, [edx+eax]
test	cl, cl
jz	short loc_6A3CA8
cmp	cl, 3Ah
jz	short loc_6A3CA8
inc	eax
cmp	eax, esi
jb	short loc_6A3C97

loc_6A3CA8:
mov	[esp+28h+var_18], eax
mov	eax, [edi+4]
mov	[esp+28h+var_1C], edx
test	eax, eax
jz	short loc_6A3D20
cmp	dword ptr [eax+14h], 0
jz	short loc_6A3D20
lea	ecx, [esp+28h+var_1C]
mov	[esp+28h+var_8], ecx
lea	edx, [esp+28h+var_C]
mov	[esp+28h+var_4], edx
mov	[esp+28h+var_C], eax
mov	eax, [eax+14h]
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+28h+var_C]
push	ecx
mov	ecx, eax
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6A3D20
mov	ecx, [esp+28h+var_18]
mov	eax, [ebx+4]
inc	ecx
cmp	eax, ecx
jnb	short loc_6A3CF6
mov	ecx, eax

loc_6A3CF6:
mov	edx, [ebx]
add	edx, ecx
sub	eax, ecx
mov	[esp+28h+var_14], edx
mov	[esp+28h+var_10], eax
jz	short loc_6A3D14
mov	eax, [esi]
mov	edx, [eax+8]
lea	ecx, [esp+28h+var_14]
push	ecx
mov	ecx, esi
call	edx

loc_6A3D14:
mov	ecx, [edi+4]
push	1
push	esi
push	edi
call	sub_6A3230

loc_6A3D20:
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4
sub_6A3C80 endp

align 10h



sub_6A3D30 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
mov	ebx, [esp+20h+arg_0]
mov	eax, [ebx+4]
push	esi
mov	esi, ecx
xor	ecx, ecx
push	edi
mov	edi, [ebx]
test	eax, eax
jbe	short loc_6A3D58

loc_6A3D47:
mov	dl, [edi+ecx]
test	dl, dl
jz	short loc_6A3D58
cmp	dl, 3Ah
jz	short loc_6A3D58
inc	ecx
cmp	ecx, eax
jb	short loc_6A3D47

loc_6A3D58:
mov	edx, edi
mov	[esp+28h+var_14], edx
mov	[esp+28h+var_10], ecx
test	edx, edx
jz	loc_6A3E56
test	ecx, ecx
jz	loc_6A3E56
cmp	byte ptr [edx],	73h
jnz	short loc_6A3DEA
cmp	byte ptr [edx+1], 77h
jnz	short loc_6A3DEA
inc	ecx
cmp	eax, ecx
jnb	short loc_6A3D84
mov	ecx, eax

loc_6A3D84:
sub	eax, ecx
mov	[esp+28h+var_18], eax
add	edi, ecx
push	3Ah
lea	eax, [esp+2Ch+var_C]
push	eax
lea	ecx, [esp+30h+var_1C]
mov	[esp+30h+var_1C], edi
call	sub_6A2110
mov	ecx, [eax]
mov	bl, [esi+0Ch]
mov	[esi+10h], ecx
mov	edx, [eax+4]
mov	[esi+14h], edx
test	bl, 1
jnz	short loc_6A3DDB
mov	eax, edx
inc	eax
push	eax
lea	ecx, [esp+2Ch+var_1C]
call	sub_6A2790
push	3Ah
lea	ecx, [esp+2Ch+var_C]
push	ecx
lea	ecx, [esp+30h+var_1C]
call	sub_6A2110
mov	edx, [eax]
mov	[esi+10h], edx
mov	eax, [eax+4]
mov	[esi+14h], eax

loc_6A3DDB:
or	bl, 2
pop	edi
mov	[esi+0Ch], bl
pop	esi
pop	ebx
add	esp, 1Ch
retn	4

loc_6A3DEA:
mov	eax, [esi+4]
cmp	dword ptr [eax+14h], 0
jz	short loc_6A3E56
lea	ecx, [esp+28h+var_14]
mov	[esp+28h+var_8], ecx
lea	edx, [esp+28h+var_C]
mov	[esp+28h+var_4], edx
mov	[esp+28h+var_C], eax
mov	eax, [eax+14h]
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+28h+var_C]
push	ecx
mov	ecx, eax
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6A3E56
mov	ecx, [esp+28h+var_10]
mov	eax, [ebx+4]
inc	ecx
cmp	eax, ecx
jnb	short loc_6A3E2C
mov	ecx, eax

loc_6A3E2C:
mov	edx, [ebx]
add	edx, ecx
sub	eax, ecx
mov	[esp+28h+var_1C], edx
mov	[esp+28h+var_18], eax
jz	short loc_6A3E4A
mov	eax, [edi]
mov	edx, [eax+8]
lea	ecx, [esp+28h+var_1C]
push	ecx
mov	ecx, edi
call	edx

loc_6A3E4A:
mov	ecx, [esi+4]
push	1
push	edi
push	esi
call	sub_6A3230

loc_6A3E56:
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4
sub_6A3D30 endp

align 10h



sub_6A3E60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	[esp+arg_4], 0
push	esi
mov	esi, ecx
jz	loc_6A3F21
mov	ecx, [esp+4+arg_0]
test	ecx, ecx
jz	loc_6A3F21
movsx	eax, byte ptr [ecx]
add	eax, 0FFFFFFE0h
cmp	eax, 10h	; switch 17 cases
ja	loc_6A3F0C	; default
			; jumptable 006A3E90 cases 1,2,4-10,12,15
movzx	eax, ds:byte_6A3F44[eax]
jmp	ds:off_6A3F28[eax*4] ; switch jump

loc_6A3E97:		; jumptable 006A3E90 case 13
or	byte ptr [esi+6], 4

loc_6A3E9B:
push	1
lea	ecx, [esp+8+arg_0]
call	sub_6A2790
mov	edx, [eax]
sub	esp, 8
mov	ecx, esp
mov	[ecx], edx
mov	eax, [eax+4]
mov	[ecx+4], eax
mov	ecx, esi
call	sub_6A3E60
pop	esi
retn	8

loc_6A3EC0:		; jumptable 006A3E90 case 0
or	byte ptr [esi+6], 2
jmp	short loc_6A3E9B

loc_6A3EC6:		; jumptable 006A3E90 case 14
and	dword ptr [esi], 0FFFFFFE0h
mov	eax, [esi]
push	3Ah
and	eax, 1Fh
push	eax
push	1
lea	ecx, [esp+10h+arg_0]
call	sub_6A2790
push	eax
call	sub_6A3020
mov	ecx, [esi]
xor	ecx, eax
and	ecx, 1Fh
add	esp, 0Ch
xor	[esi], ecx
pop	esi
retn	8

loc_6A3EF2:		; jumptable 006A3E90 case 11
or	byte ptr [esi+5], 80h
jmp	short loc_6A3E9B

loc_6A3EF8:		; jumptable 006A3E90 case 3
or	byte ptr [esi+6], 8
jmp	short loc_6A3E9B

loc_6A3EFE:		; jumptable 006A3E90 case 16
mov	cl, [esi+4]
and	cl, 0B0h
or	cl, 30h
mov	[esi+4], cl
jmp	short loc_6A3E9B

loc_6A3F0C:		; default
sub	esp, 8		; jumptable 006A3E90 cases 1,2,4-10,12,15
mov	eax, esp
mov	[eax], ecx
mov	ecx, [esp+0Ch+arg_4]
mov	[eax+4], ecx
mov	ecx, esi
call	sub_6A3190

loc_6A3F21:
pop	esi
retn	8
sub_6A3E60 endp

align 4
off_6A3F28 dd offset loc_6A3EC0	; jump table for switch	statement
dd offset loc_6A3EF8
dd offset loc_6A3EF2
dd offset loc_6A3E97
dd offset loc_6A3EC6
dd offset loc_6A3EFE
dd offset loc_6A3F0C
byte_6A3F44 db	    0,	   6,	  6,	 1 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     2
db	6,     3,     4,     6
db	5
align 10h



sub_6A3F60 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebp
mov	ebp, [esp+20h+arg_0]
mov	edx, [ebp+0]
push	esi
mov	esi, [ebp+4]
xor	eax, eax
push	edi
mov	edi, ecx
mov	[esp+28h+var_1C], 0
mov	[esp+28h+var_18], 0
test	esi, esi
jbe	short loc_6A3F99

loc_6A3F88:
mov	cl, [edx+eax]
test	cl, cl
jz	short loc_6A3F99
cmp	cl, 3Ah
jz	short loc_6A3F99
inc	eax
cmp	eax, esi
jb	short loc_6A3F88

loc_6A3F99:
mov	[esp+28h+var_10], eax
mov	eax, [edi+4]
xor	esi, esi
mov	[esp+28h+var_14], edx
cmp	[eax+14h], esi
jz	short loc_6A3FD1
lea	ecx, [esp+28h+var_14]
mov	[esp+28h+var_8], ecx
lea	edx, [edi+0Ch]
mov	[esp+28h+var_4], edx
mov	[esp+28h+var_C], eax
mov	eax, [eax+14h]
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+28h+var_C]
push	ecx
mov	ecx, eax
call	edx
mov	esi, eax

loc_6A3FD1:
mov	edx, [esp+28h+var_10]
mov	eax, [ebp+4]
inc	edx
cmp	eax, edx
jnb	short loc_6A3FDF
mov	edx, eax

loc_6A3FDF:
mov	ecx, [ebp+0]
add	ecx, edx
sub	eax, edx
mov	[esp+28h+var_1C], ecx
mov	[esp+28h+var_18], eax
test	esi, esi
jz	short loc_6A4010
test	eax, eax
jbe	short loc_6A4004
mov	eax, [esi]
mov	edx, [eax+8]
lea	ecx, [esp+28h+var_1C]
push	ecx
mov	ecx, esi
call	edx

loc_6A4004:
mov	ecx, [edi+4]
push	1
push	esi
push	edi
call	sub_6A3230

loc_6A4010:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	4
sub_6A3F60 endp

align 10h



sub_6A4020 proc	near

var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h

sub	esp, 30h
push	esi
lea	eax, [esp+34h+var_30]
mov	esi, ecx
push	eax
push	esi
lea	ecx, [esp+3Ch+var_24]
mov	[esp+3Ch+var_2C], 1
mov	[esp+3Ch+var_28], 0
mov	[esp+3Ch+var_30], 0
call	sub_6A2FC0
mov	ecx, esi
call	sub_6A32A0
test	al, al
jz	short loc_6A4063
push	0
lea	ecx, [esp+38h+var_24]
push	ecx
mov	ecx, esi
call	sub_6A3330

loc_6A4063:
mov	edx, 0FFFFh
add	[esi+6], dx
movzx	eax, word ptr [esi+6]
mov	ecx, esi
test	ax, ax
jz	short loc_6A4081
call	sub_6A4020
pop	esi
add	esp, 30h
retn

loc_6A4081:
call	sub_6A3A30
pop	esi
add	esp, 30h
retn
sub_6A4020 endp

align 10h



sub_6A4090 proc	near
cmp	word ptr [ecx+6], 0
jz	short loc_6A40A0
mov	byte ptr [ecx+5], 0FFh
jmp	sub_6A4020

loc_6A40A0:
jmp	sub_6A3A30
sub_6A4090 endp

align 10h



sub_6A40B0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6A40C9
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6A40DE
push	esi
jmp	short loc_6A40D8

loc_6A40C9:
cmp	esi, [edi+8]
jb	short loc_6A40DE
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6A40D8:
push	edi
call	sub_6A30B0

loc_6A40DE:
mov	eax, [edi]
mov	ecx, [esp+8+arg_0]
mov	[edi+4], esi
lea	edx, [esi+esi*2]
lea	eax, [eax+edx*4-0Ch]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
pop	edi
mov	[eax+8], ecx
pop	esi
retn	4
sub_6A40B0 endp

align 10h



sub_6A4110 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_6A411E
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_6A411E:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 4
mov	edx, 1505h
mov	edi, edi

loc_6A4130:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_6A4130
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_6A3140
pop	esi
pop	ebx
pop	edi
retn	4
sub_6A4110 endp

align 10h



sub_6A4160 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_6A4182
call	sub_6A2740
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_6A4182:
push	esi
cmp	eax, 8
jnb	short loc_6A418F
mov	esi, 8
jmp	short loc_6A41F4

loc_6A418F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6A41A2
fadd	ds:flt_15FCC08

loc_6A41A2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6A41F4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
mov	[esp+1Ch+arg_4], edi
mov	dword ptr [esp+1Ch+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*4]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_6A4254
xor	eax, eax
jmp	short loc_6A4240
align 10h

loc_6A4240:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 14h
sub	esi, 1
jnz	short loc_6A4240

loc_6A4254:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_6A42C6
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_6A4262:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_6A42AC
lea	edx, [esi+8]
mov	eax, 4
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_6A4280:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_6A4280
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_6A49E0
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_6A42AC:
add	edi, 14h
sub	ebx, 1
jnz	short loc_6A4262
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_6A42C6:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_6A4160 endp

align 10h



sub_6A42E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
xor	ecx, ecx
mov	[eax+8], cl
mov	dword ptr [eax], offset	off_1437B50
mov	edx, [edx]
mov	[eax+0Ch], edx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
retn	8
sub_6A42E0 endp

align 10h



sub_6A4310 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 2Ch
mov	eax, [esp+2Ch+arg_0]
mov	edx, [eax]
mov	eax, [eax+4]
push	ebx
push	ebp
xor	ebp, ebp
push	esi
push	edi
mov	esi, ecx
mov	[esp+3Ch+var_28], edx
mov	[esp+3Ch+var_24], eax
mov	[esp+3Ch+var_2C], ebp
cmp	eax, ebp
jz	loc_6A4599

loc_6A4338:
xor	ebx, ebx
cmp	eax, ebp
jbe	short loc_6A4351
mov	edi, edi

loc_6A4340:
mov	cl, [ebx+edx]
test	cl, cl
jz	short loc_6A4351
cmp	cl, 3Ah
jz	short loc_6A4351
inc	ebx
cmp	ebx, eax
jb	short loc_6A4340

loc_6A4351:
mov	edi, edx
cmp	edx, ebp
jz	loc_6A4599
cmp	ebx, ebp
jz	loc_6A4599
lea	ecx, [ebx+1]
cmp	eax, ecx
jnb	short loc_6A436C
mov	ecx, eax

loc_6A436C:
sub	eax, ecx
add	edx, ecx
mov	[esp+3Ch+var_28], edx
mov	[esp+3Ch+var_24], eax
movsx	eax, byte ptr [edi]
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_6A439F

loc_6A4388:		; jumptable 006A43B5 cases 0,3,11,13,14
sub	esp, 8
mov	eax, esp
mov	[eax], edi
lea	ecx, [esi+10h]
mov	[eax+4], ebx
call	sub_6A3E60
jmp	loc_6A4505

loc_6A439F:
movsx	eax, byte ptr [edi]
add	eax, 0FFFFFFE0h
cmp	eax, 58h	; switch 89 cases
ja	loc_6A44C6	; default
			; jumptable 006A43B5 cases 1,2,4-10,12,15-55,57-65,67-78,80-82,84-87
movzx	ecx, ds:byte_6A45C0[eax]
jmp	ds:off_6A45A4[ecx*4] ; switch jump

loc_6A43BC:		; jumptable 006A43B5 case 66
push	4
push	offset aBase_0	; "base"
push	edi		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	loc_6A4505
push	3Ah
lea	edx, [esp+40h+var_28]
push	0Ah
push	edx
call	sub_6A3020
mov	ecx, [esi+1Ch]
xor	ecx, eax
and	ecx, 1Fh
add	esp, 0Ch
xor	[esi+1Ch], ecx
jmp	loc_6A4505

loc_6A43F5:		; jumptable 006A43B5 case 79
mov	edx, [esi+1Ch]
sub	esp, 8
mov	eax, esp
and	edx, 0FFFFFFE8h
push	3Ah
or	edx, 8
push	eax
lea	ecx, [esp+4Ch+var_28]
mov	[esi+1Ch], edx
call	sub_6A2110
lea	ecx, [esi+10h]
call	sub_6A3E60
jmp	loc_6A4505

loc_6A441F:		; jumptable 006A43B5 case 88
and	byte ptr [esi+16h], 0FEh

loc_6A4423:		; jumptable 006A43B5 case 56
mov	ecx, [esi+1Ch]
mov	ebp, [esp+3Ch+var_24]
mov	edi, [esp+3Ch+var_28]
and	ecx, 0FFFFFFF0h
or	ecx, 10h
sub	esp, 8
xor	eax, eax
mov	[esi+1Ch], ecx
mov	edx, esp
test	ebp, ebp
jbe	short loc_6A4453

loc_6A4442:
mov	cl, [eax+edi]
test	cl, cl
jz	short loc_6A4453
cmp	cl, 3Ah
jz	short loc_6A4453
inc	eax
cmp	eax, ebp
jb	short loc_6A4442

loc_6A4453:
lea	ecx, [esi+10h]
mov	[edx], edi
mov	[edx+4], eax
call	sub_6A3E60
xor	ebp, ebp
jmp	loc_6A4505

loc_6A4467:		; jumptable 006A43B5 case 83
cmp	byte ptr [edi+1], 77h
jz	loc_6A4516
push	3		; size_t
push	offset aSep	; "sep"
push	edi		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	loc_6A4505
push	3Ah
lea	edx, [esp+40h+var_20]
push	edx
lea	ecx, [esp+44h+var_28]
call	sub_6A2110
mov	ecx, [esp+3Ch+var_1C]
cmp	ecx, ebp
jz	short loc_6A44B0
mov	eax, [esp+3Ch+var_20]
mov	dl, [eax]
xor	dl, [esi+15h]
and	dl, 7Fh
xor	[esi+15h], dl

loc_6A44B0:
mov	eax, [esp+3Ch+var_24]
cmp	eax, ecx
jnb	short loc_6A44BA
mov	ecx, eax

loc_6A44BA:
add	[esp+3Ch+var_28], ecx
sub	eax, ecx
mov	[esp+3Ch+var_24], eax
jmp	short loc_6A4509

loc_6A44C6:		; default
mov	eax, [esi+4]	; jumptable 006A43B5 cases 1,2,4-10,12,15-55,57-65,67-78,80-82,84-87
cmp	[eax+14h], ebp
jz	short loc_6A4505
mov	ecx, [esi+28h]
mov	[esp+3Ch+var_18], ecx
mov	[esp+3Ch+var_C], eax
lea	edx, [esp+3Ch+var_28]
mov	[esp+3Ch+var_8], edx
lea	ecx, [esp+3Ch+var_18]
mov	[esp+3Ch+var_14], 0
mov	[esp+3Ch+var_10], ebp
mov	[esp+3Ch+var_4], ecx
mov	ecx, [eax+14h]
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+3Ch+var_C]
push	eax
call	edx
mov	[esp+3Ch+var_2C], eax

loc_6A4505:
mov	eax, [esp+3Ch+var_24]

loc_6A4509:
cmp	eax, ebp
jz	short loc_6A4557
mov	edx, [esp+3Ch+var_28]
jmp	loc_6A4338

loc_6A4516:
mov	eax, [esi+4]
push	24h
lea	ecx, [eax+0F4h]
call	sub_64EEA0
cmp	eax, ebp
jz	short loc_6A4547
mov	ecx, [esi+28h]
mov	[esp+3Ch+var_2C], ecx
mov	ecx, [esi+4]
lea	edx, [esp+3Ch+var_2C]
push	edx
push	ecx
mov	ecx, eax
call	sub_6A42E0
mov	[esp+3Ch+var_2C], eax
jmp	short loc_6A454B

loc_6A4547:
mov	[esp+3Ch+var_2C], ebp

loc_6A454B:
mov	eax, [esp+3Ch+var_24]
add	[esp+3Ch+var_28], eax
mov	[esp+3Ch+var_24], ebp

loc_6A4557:
mov	edi, [esp+3Ch+var_2C]
cmp	edi, ebp
jz	short loc_6A4599
mov	edx, [esp+3Ch+arg_0]
mov	eax, [edx+4]
lea	ecx, [ebx+1]
cmp	eax, ecx
jnb	short loc_6A456F
mov	ecx, eax

loc_6A456F:
mov	edx, [edx]
add	edx, ecx
sub	eax, ecx
mov	[esp+3Ch+var_20], edx
mov	[esp+3Ch+var_1C], eax
jz	short loc_6A458D
mov	eax, [edi]
mov	edx, [eax+8]
lea	ecx, [esp+3Ch+var_20]
push	ecx
mov	ecx, edi
call	edx

loc_6A458D:
mov	ecx, [esi+4]
push	1
push	edi
push	esi
call	sub_6A3230

loc_6A4599:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	4
sub_6A4310 endp

align 4
off_6A45A4 dd offset loc_6A4388, offset	loc_6A4423 ; jump table	for switch statement
dd offset loc_6A43BC, offset loc_6A43F5
dd offset loc_6A4467, offset loc_6A441F
dd offset loc_6A44C6
byte_6A45C0 db	    0,	   6,	  6,	 0 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     0
db	6,     0,     0,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	1,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     2,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     3
db	6,     6,     6,     4
db	6,     6,     6,     6
db	5
align 10h



sub_6A4620 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 2Ch
mov	eax, [esp+2Ch+arg_0]
mov	edx, [eax]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [eax+4]
xor	ebp, ebp
mov	[esp+3Ch+var_28], edx
mov	[esp+3Ch+var_24], ecx
mov	[esp+3Ch+var_2C], ebp
cmp	ecx, ebp
jz	loc_6A48C1

loc_6A4648:
xor	ebx, ebx
cmp	ecx, ebp
jbe	short loc_6A4660
mov	edi, edi

loc_6A4650:
mov	al, [ebx+edx]
test	al, al
jz	short loc_6A4660
cmp	al, 3Ah
jz	short loc_6A4660
inc	ebx
cmp	ebx, ecx
jb	short loc_6A4650

loc_6A4660:
mov	esi, edx
cmp	edx, ebp
jz	loc_6A48C1
cmp	ebx, ebp
jz	loc_6A48C1
lea	eax, [ebx+1]
cmp	ecx, eax
jnb	short loc_6A467B
mov	eax, ecx

loc_6A467B:
add	edx, eax
sub	ecx, eax
mov	[esp+3Ch+var_28], edx
mov	[esp+3Ch+var_24], ecx
movsx	eax, byte ptr [esi]
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jnz	short loc_6A46B4 ; jumptable 006A46AD cases 0,3,11,13,14
movsx	eax, byte ptr [esi]
add	eax, 0FFFFFFE0h
cmp	eax, 53h	; switch 84 cases
ja	loc_6A47B0	; default
			; jumptable 006A46AD cases 1,2,4-10,12,15-36,38,40-68,72-82
movzx	ecx, ds:byte_6A48EC[eax]
jmp	ds:off_6A48CC[ecx*4] ; switch jump

loc_6A46B4:		; jumptable 006A46AD cases 0,3,11,13,14
sub	esp, 8
mov	eax, esp
mov	[eax], esi
lea	ecx, [edi+10h]
mov	[eax+4], ebx
call	sub_6A3E60
jmp	loc_6A480D

loc_6A46CB:		; jumptable 006A46AD case 70
sub	esp, 8
mov	edx, esp
push	3Ah
push	edx
lea	ecx, [esp+4Ch+var_28]
mov	[edi+1Ch], ebp
call	sub_6A2110
lea	ecx, [edi+10h]
call	sub_6A3E60
jmp	loc_6A480D

loc_6A46EC:		; jumptable 006A46AD case 69
and	byte ptr [edi+16h], 0FEh

loc_6A46F0:		; jumptable 006A46AD case 37
mov	edx, [esp+3Ch+var_24]
mov	esi, [esp+3Ch+var_28]
sub	esp, 8
xor	eax, eax
mov	dword ptr [edi+1Ch], 1
mov	ebp, esp
test	edx, edx
jbe	short loc_6A4721
lea	ebx, [ebx+0]

loc_6A4710:
mov	cl, [eax+esi]
test	cl, cl
jz	short loc_6A4721
cmp	cl, 3Ah
jz	short loc_6A4721
inc	eax
cmp	eax, edx
jb	short loc_6A4710

loc_6A4721:
mov	[ebp+0], esi
lea	ecx, [edi+10h]
mov	[ebp+4], eax
call	sub_6A3E60
xor	ebp, ebp
jmp	loc_6A480D

loc_6A4736:		; jumptable 006A46AD case 71
and	byte ptr [edi+16h], 0FEh

loc_6A473A:		; jumptable 006A46AD case 39
mov	edx, [esp+3Ch+var_24]
mov	esi, [esp+3Ch+var_28]
sub	esp, 8
xor	eax, eax
mov	dword ptr [edi+1Ch], 2
mov	ebp, esp
test	edx, edx
jbe	short loc_6A4721

loc_6A4754:
mov	cl, [eax+esi]
test	cl, cl
jz	short loc_6A4721
cmp	cl, 3Ah
jz	short loc_6A4721
inc	eax
cmp	eax, edx
jb	short loc_6A4754
jmp	short loc_6A4721

loc_6A4767:		; jumptable 006A46AD case 83
cmp	byte ptr [esi+1], 77h
jz	loc_6A481E
push	3		; size_t
push	offset aSep	; "sep"
push	esi		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	loc_6A480D
push	3Ah
lea	eax, [esp+40h+var_20]
push	eax
lea	ecx, [esp+44h+var_28]
call	sub_6A2110
cmp	[esp+3Ch+var_1C], ebp
jz	short loc_6A480D
mov	cl, [edi+15h]
mov	edx, [esp+3Ch+var_20]
xor	cl, [edx]
and	cl, 7Fh
xor	[edi+15h], cl
jmp	short loc_6A480D

loc_6A47B0:		; default
mov	esi, [edi+4]	; jumptable 006A46AD cases 1,2,4-10,12,15-36,38,40-68,72-82
cmp	[esi+14h], ebp
jz	short loc_6A480D
fld	qword ptr [edi+20h]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A47CE
fadd	ds:dbl_15FCC48
jmp	short loc_6A47D4

loc_6A47CE:
fsub	ds:dbl_15FCC48

loc_6A47D4:
call	__ftol2_sse
mov	[esp+3Ch+var_18], eax
lea	eax, [esp+3Ch+var_28]
mov	[esp+3Ch+var_8], eax
lea	ecx, [esp+3Ch+var_18]
mov	[esp+3Ch+var_14], 1
mov	[esp+3Ch+var_10], ebp
mov	[esp+3Ch+var_C], esi
mov	[esp+3Ch+var_4], ecx
mov	ecx, [esi+14h]
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+3Ch+var_C]
push	eax
call	edx
mov	[esp+3Ch+var_2C], eax

loc_6A480D:
mov	ecx, [esp+3Ch+var_24]
cmp	ecx, ebp
jz	short loc_6A487F
mov	edx, [esp+3Ch+var_28]
jmp	loc_6A4648

loc_6A481E:
mov	eax, [edi+4]
push	24h
lea	ecx, [eax+0F4h]
call	sub_64EEA0
mov	esi, eax
cmp	esi, ebp
jz	short loc_6A486F
fld	qword ptr [edi+20h]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A484A
fadd	ds:dbl_15FCC48
jmp	short loc_6A4850

loc_6A484A:
fsub	ds:dbl_15FCC48

loc_6A4850:
call	__ftol2_sse
lea	ecx, [esp+3Ch+var_2C]
mov	[esp+3Ch+var_2C], eax
mov	eax, [edi+4]
push	ecx
push	eax
mov	ecx, esi
call	sub_6A42E0
mov	[esp+3Ch+var_2C], eax
jmp	short loc_6A4873

loc_6A486F:
mov	[esp+3Ch+var_2C], ebp

loc_6A4873:
mov	edx, [esp+3Ch+var_24]
add	[esp+3Ch+var_28], edx
mov	[esp+3Ch+var_24], ebp

loc_6A487F:
mov	esi, [esp+3Ch+var_2C]
cmp	esi, ebp
jz	short loc_6A48C1
mov	edx, [esp+3Ch+arg_0]
mov	eax, [edx+4]
lea	ecx, [ebx+1]
cmp	eax, ecx
jnb	short loc_6A4897
mov	ecx, eax

loc_6A4897:
mov	edx, [edx]
add	edx, ecx
sub	eax, ecx
mov	[esp+3Ch+var_20], edx
mov	[esp+3Ch+var_1C], eax
jz	short loc_6A48B5
mov	eax, [esi]
mov	edx, [eax+8]
lea	ecx, [esp+3Ch+var_20]
push	ecx
mov	ecx, esi
call	edx

loc_6A48B5:
mov	ecx, [edi+4]
push	1
push	esi
push	edi
call	sub_6A3230

loc_6A48C1:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	4
sub_6A4620 endp

align 4
off_6A48CC dd offset loc_6A46B4, offset	loc_6A46F0 ; jump table	for switch statement
dd offset loc_6A473A, offset loc_6A46EC
dd offset loc_6A46CB, offset loc_6A4736
dd offset loc_6A4767, offset loc_6A47B0
byte_6A48EC db	    0,	   7,	  7,	 0 ; indirect table for	switch statement
db	7,     7,     7,     7
db	7,     7,     7,     0
db	7,     0,     0,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     1,     7,     2
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     3,     4,     5
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     6



sub_6A4940 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
push	edi
mov	edi, ecx
mov	eax, [edi+24h]
xor	ebp, ebp
mov	dword ptr [edi], offset	off_1437B9C
mov	[esp+0Ch+var_4], eax
test	eax, eax
jbe	short loc_6A49BF
push	ebx
push	esi
xor	ebx, ebx
lea	esp, [esp+0]

loc_6A4960:
cmp	ebp, 10h
jnb	short loc_6A496B
lea	eax, [ebx+edi+34h]
jmp	short loc_6A4975

loc_6A496B:
mov	eax, [edi+28h]
lea	eax, [eax+ebx-0C0h]

loc_6A4975:
cmp	dword ptr [eax], 2
jnz	short loc_6A49B3
cmp	byte ptr [eax+8], 0
jz	short loc_6A49B3
mov	esi, [eax+4]
test	esi, esi
jz	short loc_6A49B3
mov	edx, [esi]
mov	eax, [edx]
push	0
mov	ecx, esi
call	eax
lea	ecx, [edi+0F8h]
cmp	esi, ecx
jb	short loc_6A49A5
lea	edx, [edi+2F8h]
cmp	esi, edx
jb	short loc_6A49B3

loc_6A49A5:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A49B3:
inc	ebp
add	ebx, 0Ch
cmp	ebp, [esp+14h+var_4]
jb	short loc_6A4960
pop	esi
pop	ebx

loc_6A49BF:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+28h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	dword ptr [edi], offset	off_143A4DC
pop	edi
pop	ebp
pop	ecx
retn
sub_6A4940 endp

align 10h



sub_6A49E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6A49F3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6A4A15

loc_6A49F3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6A4A1A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6A4A15:
call	sub_6A4160

loc_6A4A1A:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*4]
mov	ebp, [esi+edx*4+8]
lea	eax, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_6A4A5A
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	edx, [edx+8]
pop	esi
mov	[eax+10h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_6A4A5A:
push	edi
mov	edi, [esi+4]
mov	edx, ecx
push	ebx

loc_6A4A61:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*4]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_6A4A61
lea	edi, [edx+edx*4]
lea	ebx, [esi+edi*4+8]
mov	edi, [eax+4]
cmp	edi, ecx
jnz	short loc_6A4ABB
test	ebx, ebx
jz	short loc_6A4A9A
mov	[ebx], ebp
mov	esi, [eax+4]
mov	[ebx+4], esi
mov	esi, [eax+8]
mov	[ebx+8], esi
mov	esi, [eax+0Ch]
mov	[ebx+0Ch], esi
mov	esi, [eax+10h]
mov	[ebx+10h], esi

loc_6A4A9A:
mov	esi, [esp+10h+arg_4]
mov	edi, [esi]
mov	[eax+8], edi
mov	edi, [esi+4]
mov	[eax+0Ch], edi
mov	esi, [esi+8]
pop	ebx
pop	edi
mov	[eax+10h], esi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_6A4ABB:
lea	edi, [edi+edi*4]
cmp	[esi+edi*4+8], ecx
lea	edi, [esi+edi*4+8]
jz	short loc_6A4ADF
jmp	short loc_6A4AD0
align 10h

loc_6A4AD0:
mov	edi, [edi]
lea	edi, [edi+edi*4]
cmp	[esi+edi*4+8], ecx
lea	edi, [esi+edi*4+8]
jnz	short loc_6A4AD0

loc_6A4ADF:
test	ebx, ebx
jz	short loc_6A4AFD
mov	[ebx], ebp
mov	esi, [eax+4]
mov	[ebx+4], esi
mov	esi, [eax+8]
mov	[ebx+8], esi
mov	esi, [eax+0Ch]
mov	[ebx+0Ch], esi
mov	esi, [eax+10h]
mov	[ebx+10h], esi

loc_6A4AFD:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
pop	ebx
mov	[eax+0Ch], esi
mov	edx, [edx+8]
pop	edi
pop	esi
mov	[eax+10h], edx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_6A49E0 endp

align 10h



; int __thiscall sub_6A4B30(void *, char)
sub_6A4B30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_6A2740
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_14379A4
jz	short loc_6A4B51
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6A4B51:
mov	eax, esi
pop	esi
retn	4
sub_6A4B30 endp

align 10h



sub_6A4B60 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+8], 0
jnz	short loc_6A4BB5
push	ebx
push	edi
lea	eax, [esi+0Ch]
lea	edi, [esi+10h]
push	eax
mov	ecx, edi
lea	ebx, [esi+14h]
call	sub_6A4110
test	eax, eax
jl	short loc_6A4BA4
mov	edx, [edi]
lea	ecx, [eax+eax*4]
lea	eax, [edx+ecx*4+10h]
test	eax, eax
jz	short loc_6A4BA4
test	ebx, ebx
jz	short loc_6A4BAF
mov	ecx, [eax+4]
mov	[ebx], ecx
mov	edx, [eax+8]
pop	edi
mov	[ebx+4], edx
pop	ebx
mov	byte ptr [esi+8], 1
pop	esi
retn

loc_6A4BA4:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
mov	[ebx], eax
mov	[ebx+4], ecx

loc_6A4BAF:
pop	edi
mov	byte ptr [esi+8], 1
pop	ebx

loc_6A4BB5:
pop	esi
retn
sub_6A4B60 endp

align 10h



sub_6A4BC0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	edx, edx
mov	[eax+5], dl
mov	[eax+0Ch], edx
mov	[eax+14h], edx
xor	ecx, ecx
mov	[eax+6], cx
mov	dword ptr [eax], offset	off_1437B9C
mov	byte ptr [eax+4], 25h
push	esi
mov	ecx, 0FFFFh
mov	[eax+8], cx
mov	ecx, [esp+4+arg_0]
mov	esi, [ecx]
mov	[eax+18h], esi
mov	esi, [ecx+4]
mov	[eax+1Ch], esi
mov	ecx, [ecx+8]
mov	[eax+20h], ecx
mov	[eax+24h], edx
mov	[eax+28h], edx
mov	[eax+2Ch], edx
mov	[eax+30h], edx
lea	ecx, [eax+0F4h]
mov	[ecx], edx
lea	edx, [ecx+3]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	esi, ecx
sub	esi, edx
add	esi, 204h
mov	[ecx+208h], esi
mov	[ecx+204h], edx
pop	esi
retn	4
sub_6A4BC0 endp

align 10h



; int __thiscall sub_6A4C40(void *, char)
sub_6A4C40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6A4940
test	[esp+4+arg_0], 1
jz	short loc_6A4C58
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6A4C58:
mov	eax, esi
pop	esi
retn	4
sub_6A4C40 endp

align 10h



sub_6A4C60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
mov	eax, [esp+14h+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	al, [eax+4]
mov	byte ptr [esp+18h+var_10], al
mov	eax, [esi+24h]
push	edi
mov	edi, [esp+1Ch+var_10]
xor	edx, edx
mov	[esp+1Ch+var_C], edx
mov	[esp+1Ch+var_8], ecx
mov	[esp+1Ch+var_4], edi
cmp	eax, 10h
jnb	short loc_6A4CA8
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*4+34h]
mov	[eax], edx
mov	[eax+4], ecx
mov	[eax+8], edi
inc	dword ptr [esi+24h]
pop	edi
pop	esi
add	esp, 14h
retn	4

loc_6A4CA8:
lea	ecx, [esp+1Ch+var_C]
push	ecx
lea	ecx, [esi+28h]
call	sub_6A40B0
inc	dword ptr [esi+24h]
pop	edi
pop	esi
add	esp, 14h
retn	4
sub_6A4C60 endp




sub_6A4CC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 14h
mov	eax, [esp+14h+arg_0]
push	esi
mov	esi, ecx
mov	cl, [esp+18h+arg_4]
mov	edx, eax
mov	eax, [esi+24h]
mov	byte ptr [esp+18h+var_10], cl
push	edi
mov	edi, [esp+1Ch+var_10]
mov	ecx, 2
mov	[esp+1Ch+var_C], ecx
mov	[esp+1Ch+var_8], edx
mov	[esp+1Ch+var_4], edi
cmp	eax, 10h
jnb	short loc_6A4D0C
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*4+34h]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], edi
inc	dword ptr [esi+24h]
pop	edi
pop	esi
add	esp, 14h
retn	8

loc_6A4D0C:
lea	ecx, [esp+1Ch+var_C]
push	ecx
lea	ecx, [esi+28h]
call	sub_6A40B0
inc	dword ptr [esi+24h]
pop	edi
pop	esi
add	esp, 14h
retn	8
sub_6A4CC0 endp

align 10h



; int __stdcall	sub_6A4D30(char	*)
sub_6A4D30 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 2Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+3Ch+arg_0]
mov	esi, ecx
xor	ebp, ebp
mov	eax, edi
mov	ecx, 0FFFFh
mov	[esp+3Ch+var_2C], eax
mov	ebx, edi
mov	[esi+8], cx
mov	byte ptr [esp+3Ch+arg_0], 0
test	edi, edi
jz	loc_6A4F74
xor	edx, edx
mov	[esi+6], dx
cmp	[edi], dl
jz	loc_6A4F74
jmp	short loc_6A4D70
align 10h

loc_6A4D70:
mov	ecx, ebp
sub	ecx, 0
jz	loc_6A4E7E
mov	edi, 1
sub	ecx, edi
jnz	loc_6A4E8F
cmp	byte ptr [eax],	7Dh
jnz	loc_6A4E7A
cmp	ebx, eax
jz	loc_6A4E72
movsx	eax, byte ptr [ebx]
push	eax		; int
mov	[esp+40h+var_28], 0FFh
call	_isspace
add	esp, 4
test	eax, eax
jz	short loc_6A4DC4

loc_6A4DB1:
movsx	ecx, byte ptr [ebx+edi]
add	ebx, edi
push	ecx		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_6A4DB1

loc_6A4DC4:
movsx	edx, byte ptr [ebx]
push	edx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_6A4E07
push	ebx		; char *
call	_atoi
mov	cl, [ebx]
add	esp, 4
test	cl, cl
jz	short loc_6A4E0F

loc_6A4DE3:
cmp	cl, 3Ah
jz	short loc_6A4DF8
cmp	cl, 7Dh
jz	short loc_6A4DF8
mov	cl, [ebx+edi]
add	ebx, edi
test	cl, cl
jnz	short loc_6A4DE3
jmp	short loc_6A4E0F

loc_6A4DF8:
mov	cl, [ebx]
test	cl, cl
jz	short loc_6A4E0F
cmp	cl, 3Ah
jnz	short loc_6A4E0F
add	ebx, edi
jmp	short loc_6A4E0F

loc_6A4E07:
add	[esi+6], di
mov	al, byte ptr [esp+3Ch+var_28]

loc_6A4E0F:
mov	cl, byte ptr [esp+3Ch+var_2C]
sub	cl, bl
mov	byte ptr [esp+3Ch+var_20+1], al
mov	eax, [esi+24h]
mov	byte ptr [esp+3Ch+var_20], cl
mov	edx, [esp+3Ch+var_20]
mov	ecx, edi
mov	[esp+3Ch+var_C], ecx
mov	[esp+3Ch+var_8], ebx
mov	[esp+3Ch+var_4], edx
cmp	eax, 10h
jnb	short loc_6A4E48
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*4+34h]
mov	[eax], ecx
mov	[eax+4], ebx
mov	[eax+8], edx
jmp	short loc_6A4E55

loc_6A4E48:
lea	ecx, [esp+3Ch+var_C]
push	ecx
lea	ecx, [esi+28h]
call	sub_6A40B0

loc_6A4E55:
add	[esi+24h], edi
mov	edx, 0FFFFh
cmp	[esi+8], dx
jnz	short loc_6A4E6E
mov	ax, [esi+24h]
sub	ax, di
mov	[esi+8], ax

loc_6A4E6E:
mov	eax, [esp+3Ch+var_2C]

loc_6A4E72:
add	eax, edi
mov	ebx, eax
xor	ebp, ebp
jmp	short loc_6A4E8B

loc_6A4E7A:
add	eax, edi
jmp	short loc_6A4E8B

loc_6A4E7E:
cmp	byte ptr [esp+3Ch+arg_0], 0
jz	short loc_6A4EE8
mov	byte ptr [esp+3Ch+arg_0], 0

loc_6A4E8A:
inc	eax

loc_6A4E8B:
mov	[esp+3Ch+var_2C], eax

loc_6A4E8F:
cmp	byte ptr [eax],	0
jnz	loc_6A4D70
test	ebp, ebp
jnz	loc_6A4F74
cmp	ebx, eax
jz	loc_6A4F74
sub	al, bl
mov	byte ptr [esp+3Ch+var_10], al
mov	eax, [esi+24h]
mov	edx, [esp+3Ch+var_10]
xor	ecx, ecx
mov	[esp+3Ch+var_C], ecx
mov	[esp+3Ch+var_8], ebx
mov	[esp+3Ch+var_4], edx
cmp	eax, 10h
jnb	loc_6A4F64
lea	eax, [eax+eax*2]
lea	eax, [esi+eax*4+34h]
mov	[eax], ecx
mov	[eax+4], ebx
pop	edi
mov	[eax+8], edx
inc	dword ptr [esi+24h]
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	4

loc_6A4EE8:
mov	cl, [eax]
cmp	cl, 7Bh
jnz	short loc_6A4F1A
cmp	ebx, eax
jz	short loc_6A4F0D
lea	ecx, [esp+3Ch+var_1C]
sub	eax, ebx
push	ecx
mov	ecx, esi
mov	[esp+40h+var_1C], ebx
mov	[esp+40h+var_18], eax
call	sub_6A4C60
mov	eax, [esp+3Ch+var_2C]

loc_6A4F0D:
inc	eax
mov	ebx, eax
mov	ebp, 1
jmp	loc_6A4E8B

loc_6A4F1A:
movzx	edx, byte ptr [esi+4]
movsx	ecx, cl
cmp	ecx, edx
jnz	loc_6A4E8A
cmp	byte ptr [eax+1], 0
jz	loc_6A4E8A
cmp	ebx, eax
jz	short loc_6A4F51
lea	edx, [esp+3Ch+var_14]
sub	eax, ebx
push	edx
mov	ecx, esi
mov	[esp+40h+var_14], ebx
mov	[esp+40h+var_10], eax
call	sub_6A4C60
mov	eax, [esp+3Ch+var_2C]

loc_6A4F51:
lea	ebx, [eax+1]
mov	[esp+3Ch+var_2C], ebx
mov	byte ptr [esp+3Ch+arg_0], 1
mov	eax, ebx
jmp	loc_6A4E8F

loc_6A4F64:
lea	ecx, [esp+3Ch+var_C]
push	ecx
lea	ecx, [esi+28h]
call	sub_6A40B0
inc	dword ptr [esi+24h]

loc_6A4F74:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	4
sub_6A4D30 endp

align 10h



sub_6A4F80 proc	near

var_68=	qword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 50h
mov	eax, [esp+50h+arg_0]
push	ebp
mov	ebp, [eax+4]
mov	[esp+54h+var_50], ecx
test	ebp, ebp
jz	short loc_6A4FDD
mov	edx, [eax]
push	ebx
push	esi
push	edi
mov	edi, [esp+60h+arg_4]
lea	ebx, [edi-8]
mov	[esp+60h+var_30], edx
mov	[esp+60h+var_2C], ebp
add	edi, 0FFFFFFFCh
lea	ebx, [ebx+0]

loc_6A4FB0:
xor	esi, esi
xor	eax, eax
test	ebp, ebp
jbe	short loc_6A4FC3

loc_6A4FB8:
cmp	byte ptr [eax+edx], 25h
jz	short loc_6A4FE4
inc	eax
cmp	eax, ebp
jb	short loc_6A4FB8

loc_6A4FC3:
mov	ecx, [esp+60h+var_50]
lea	eax, [esp+60h+var_30]
push	eax
call	sub_6A4C60

loc_6A4FD1:
mov	ecx, [esp+60h+var_50]
call	sub_6A3A30
pop	edi
pop	esi
pop	ebx

loc_6A4FDD:
pop	ebp
add	esp, 50h
retn	8

loc_6A4FE4:
test	eax, eax
jl	short loc_6A4FC3
lea	ecx, [eax+1]
mov	[esp+60h+var_48], eax
cmp	ebp, ecx
jbe	loc_6A5410
cmp	byte ptr [edx+ecx], 25h
mov	[esp+60h+var_48], ecx
jz	loc_6A53E6
mov	[esp+60h+var_44], 0Ah
mov	byte ptr [esp+60h+arg_4], 0
mov	byte ptr [esp+60h+arg_0], 0
mov	[esp+60h+var_40], 0
test	ecx, ecx
jbe	short loc_6A5049
mov	ecx, ebp
sub	ecx, eax
cmp	ebp, ecx
jnb	short loc_6A502D
mov	ecx, ebp

loc_6A502D:
sub	ebp, ecx
mov	ecx, [esp+60h+var_50]
lea	eax, [esp+60h+var_28]
push	eax
mov	[esp+64h+var_28], edx
mov	[esp+64h+var_24], ebp
call	sub_6A4C60
mov	ecx, [esp+60h+var_48]

loc_6A5049:
mov	edx, [esp+60h+var_48]
xor	ebp, ebp
xor	eax, eax
mov	[esp+60h+var_3C], ecx
mov	dword ptr [esp+60h+var_38], ebp
mov	[esp+60h+var_4C], eax
cmp	edx, [esp+60h+var_2C]
jnb	loc_6A51E3
jmp	short loc_6A5070
align 10h

loc_6A5070:
mov	ecx, [esp+60h+var_30]
movsx	ecx, byte ptr [ecx+edx]
add	ecx, 0FFFFFFBBh
cmp	ecx, 33h	; switch 52 cases
ja	short loc_6A50A5 ; default
			; jumptable 006A5087 cases 1,3,5-18,20-30,37,38,40,44,45,47,49,50
movzx	ecx, ds:byte_6A5468[ecx]
jmp	ds:off_6A5424[ecx*4] ; switch jump

loc_6A508E:		; jumptable 006A5087 case 35
mov	eax, 1
jmp	short loc_6A50A1

loc_6A5095:		; jumptable 006A5087 case 39
mov	eax, 2
jmp	short loc_6A50A1

loc_6A509C:		; jumptable 006A5087 case 4
mov	eax, 3

loc_6A50A1:
inc	[esp+60h+var_4C]

loc_6A50A5:		; default
inc	edx		; jumptable 006A5087 cases 1,3,5-18,20-30,37,38,40,44,45,47,49,50
mov	[esp+60h+var_48], edx
cmp	edx, [esp+60h+var_2C]
jb	short loc_6A5070
jmp	loc_6A51E3

loc_6A50B5:		; jumptable 006A5087 case 46
mov	esi, 4
mov	ebp, [edi+esi]
add	edi, esi
add	ebx, esi
mov	dword ptr [esp+60h+var_38], ebp
jmp	loc_6A51E3

loc_6A50CA:		; jumptable 006A5087 cases 31,36
add	edi, 4
add	ebx, 4
cmp	eax, 2
jnz	short loc_6A50E9
mov	esi, eax
mov	eax, [edi]
cdq
mov	ebp, eax
mov	dword ptr [esp+60h+var_38], ebp
mov	dword ptr [esp+60h+var_38+4], edx
jmp	loc_6A51E3

loc_6A50E9:
mov	ebp, [edi]
mov	esi, 1
mov	dword ptr [esp+60h+var_38], ebp
jmp	loc_6A51E3

loc_6A50F9:		; jumptable 006A5087 case 41
mov	edx, [edi+4]
mov	ebp, [edx]
add	edi, 4
mov	esi, 1
add	ebx, 4
mov	dword ptr [esp+60h+var_38], ebp
jmp	loc_6A51E3

loc_6A5112:		; jumptable 006A5087 case 48
mov	ebp, [edi+4]
add	edi, 4
add	ebx, 4
mov	byte ptr [esp+60h+arg_0], 1
mov	dword ptr [esp+60h+var_38], ebp
cmp	eax, 2
jnz	short loc_6A5130
mov	esi, eax
jmp	loc_6A51E3

loc_6A5130:
mov	esi, 1
jmp	loc_6A51E3

loc_6A513A:		; jumptable 006A5087 case 42
mov	ebp, [edi+4]
add	edi, 4
mov	esi, 1
mov	[esp+60h+var_44], 8
mov	byte ptr [esp+60h+arg_0], 1
add	ebx, 4
mov	dword ptr [esp+60h+var_38], ebp
jmp	loc_6A51E3

loc_6A515E:		; jumptable 006A5087 case 19
mov	byte ptr [esp+60h+arg_4], 1

loc_6A5163:		; jumptable 006A5087 case 51
mov	ebp, [edi+4]
add	edi, 4
mov	esi, 1
mov	byte ptr [esp+60h+arg_0], 1
add	ebx, 4
mov	dword ptr [esp+60h+var_38], ebp
mov	[esp+60h+var_44], 10h
jmp	short loc_6A51E3

loc_6A5184:		; jumptable 006A5087 case 43
mov	eax, [edi+4]
mov	ebp, [eax]
add	edi, 4
mov	esi, 1
mov	byte ptr [esp+60h+arg_0], 1
add	ebx, 4
mov	dword ptr [esp+60h+var_38], ebp
mov	[esp+60h+var_44], 10h
jmp	short loc_6A51E3

loc_6A51A7:		; jumptable 006A5087 case 0
mov	byte ptr [esp+60h+arg_4], 1

loc_6A51AC:		; jumptable 006A5087 case 32
mov	[esp+60h+var_40], 1
jmp	short loc_6A51CD

loc_6A51B6:		; jumptable 006A5087 case 2
mov	byte ptr [esp+60h+arg_4], 1

loc_6A51BB:		; jumptable 006A5087 case 34
mov	[esp+60h+var_40], 2
jmp	short loc_6A51CD

loc_6A51C5:		; jumptable 006A5087 case 33
mov	[esp+60h+var_40], 0

loc_6A51CD:
fld	qword ptr [ebx+8]
add	edi, 8
add	ebx, 8
fstp	[esp+60h+var_38]
mov	ebp, dword ptr [esp+60h+var_38]
mov	esi, 3

loc_6A51E3:
dec	esi
cmp	esi, 3		; switch 4 cases
ja	loc_6A527E	; default
jmp	ds:off_6A549C[esi*4] ; switch jump

loc_6A51F4:		; jumptable 006A51ED case 0
mov	eax, [esp+60h+var_3C]
mov	ecx, [esp+60h+var_30]
mov	edx, [esp+60h+var_48]
sub	edx, [esp+60h+var_4C]
add	ecx, eax
mov	[esp+60h+var_20], ecx
mov	ecx, [esp+60h+var_50]
sub	edx, eax
push	50h
add	ecx, 0F4h
mov	[esp+64h+var_1C], edx
call	sub_64EEA0
cmp	byte ptr [esp+60h+arg_0], 0
jz	short loc_6A5238
test	eax, eax
jz	short loc_6A5248
push	ebp
mov	ecx, eax
call	sub_6A29A0
mov	esi, eax
jmp	short loc_6A524A

loc_6A5238:
test	eax, eax
jz	short loc_6A5248
push	ebp
mov	ecx, eax
call	sub_6A28E0
mov	esi, eax
jmp	short loc_6A524A

loc_6A5248:
xor	esi, esi

loc_6A524A:
mov	eax, [esi+1Ch]
xor	eax, [esp+60h+var_44]
and	eax, 1Fh
xor	[esi+1Ch], eax
lea	eax, [esp+60h+var_20]

loc_6A525B:
mov	cl, [esi+16h]
xor	cl, byte ptr [esp+60h+arg_4]
push	eax
and	cl, 1
xor	[esi+16h], cl
mov	edx, [esi]
mov	edx, [edx+8]
mov	ecx, esi
call	edx
mov	ecx, [esp+60h+var_50]

loc_6A5276:
push	1
push	esi

loc_6A5279:
call	sub_6A4CC0

loc_6A527E:		; default
mov	ebp, [esp+60h+var_2C]

loc_6A5282:
mov	eax, [esp+60h+var_48]
inc	eax
cmp	ebp, eax
jnb	short loc_6A528D
mov	eax, ebp

loc_6A528D:
add	[esp+60h+var_30], eax
sub	ebp, eax
mov	[esp+60h+var_2C], ebp
jz	loc_6A4FD1
mov	edx, [esp+60h+var_30]
jmp	loc_6A4FB0

loc_6A52A6:		; jumptable 006A51ED case 1
mov	eax, [esp+60h+var_3C]
mov	ecx, [esp+60h+var_30]
mov	edx, [esp+60h+var_48]
sub	edx, [esp+60h+var_4C]
add	ecx, eax
mov	[esp+60h+var_18], ecx
mov	ecx, [esp+60h+var_50]
sub	edx, eax
push	50h
add	ecx, 0F4h
mov	[esp+64h+var_14], edx
call	sub_64EEA0
cmp	byte ptr [esp+60h+arg_0], 0
jz	short loc_6A5303
test	eax, eax
jz	short loc_6A532C
mov	ecx, dword ptr [esp+60h+var_38+4]
push	ecx
push	ebp
mov	ecx, eax
call	sub_6A2AA0
mov	esi, eax
mov	eax, [esi+1Ch]
xor	eax, [esp+60h+var_44]
and	eax, 1Fh
xor	[esi+1Ch], eax
lea	eax, [esp+60h+var_18]
jmp	loc_6A525B

loc_6A5303:
test	eax, eax
jz	short loc_6A532C
mov	edx, dword ptr [esp+60h+var_38+4]
push	edx
push	ebp
mov	ecx, eax
call	sub_6A2A20
mov	esi, eax
mov	eax, [esi+1Ch]
xor	eax, [esp+60h+var_44]
and	eax, 1Fh
xor	[esi+1Ch], eax
lea	eax, [esp+60h+var_18]
jmp	loc_6A525B

loc_6A532C:
xor	esi, esi
mov	eax, [esi+1Ch]
xor	eax, [esp+60h+var_44]
and	eax, 1Fh
xor	[esi+1Ch], eax
lea	eax, [esp+60h+var_18]
jmp	loc_6A525B

loc_6A5344:		; jumptable 006A51ED case 2
mov	ebp, [esp+60h+var_50]
push	188h
lea	ecx, [ebp+0F4h]
call	sub_64EEA0
test	eax, eax
jz	short loc_6A5371
fld	[esp+60h+var_38]
sub	esp, 8
mov	ecx, eax
fstp	[esp+68h+var_68]
call	sub_6A2EC0
mov	esi, eax
jmp	short loc_6A5373

loc_6A5371:
xor	esi, esi

loc_6A5373:
mov	eax, [esp+60h+var_3C]
mov	ecx, [esp+60h+var_30]
mov	edx, [esp+60h+var_48]
add	ecx, eax
sub	edx, eax
mov	[esp+60h+var_10], ecx
mov	ecx, [esp+60h+var_40]
mov	[esp+60h+var_C], edx
mov	al, [esi+16h]
xor	al, byte ptr [esp+60h+arg_4]
and	al, 1
xor	[esi+16h], al
mov	edx, [esi]
mov	edx, [edx+8]
lea	eax, [esp+60h+var_10]
mov	[esi+1Ch], ecx
push	eax
mov	ecx, esi
call	edx
mov	ecx, ebp
jmp	loc_6A5276

loc_6A53B3:		; jumptable 006A51ED case 3
mov	esi, [esp+60h+var_50]
push	14h
lea	ecx, [esi+0F4h]
call	sub_64EEA0
test	eax, eax
jz	short loc_6A53DA
push	ebp
mov	ecx, eax
call	sub_6A27B0
push	1
push	eax
mov	ecx, esi
jmp	loc_6A5279

loc_6A53DA:
xor	eax, eax
push	1
push	eax
mov	ecx, esi
jmp	loc_6A5279

loc_6A53E6:
mov	ecx, ebp
sub	ecx, eax
dec	ecx
cmp	ebp, ecx
jnb	short loc_6A53F1
mov	ecx, ebp

loc_6A53F1:
mov	eax, ebp
sub	eax, ecx
lea	ecx, [esp+60h+var_8]
push	ecx
mov	ecx, [esp+64h+var_50]
mov	[esp+64h+var_8], edx
mov	[esp+64h+var_4], eax
call	sub_6A4C60
jmp	loc_6A5282

loc_6A5410:
mov	ecx, [esp+60h+var_50]
lea	edx, [esp+60h+var_30]
push	edx
call	sub_6A4C60
jmp	loc_6A5282
sub_6A4F80 endp

align 4
off_6A5424 dd offset loc_6A51A7, offset	loc_6A51B6 ; jump table	for switch statement
dd offset loc_6A509C, offset loc_6A515E
dd offset loc_6A50CA, offset loc_6A51AC
dd offset loc_6A51C5, offset loc_6A51BB
dd offset loc_6A508E, offset loc_6A5095
dd offset loc_6A50F9, offset loc_6A513A
dd offset loc_6A5184, offset loc_6A50B5
dd offset loc_6A5112, offset loc_6A5163
dd offset loc_6A50A5
byte_6A5468 db	    0,	 10h,	  1,   10h ; indirect table for	switch statement
db	2,   10h,   10h,   10h
db    10h,   10h,   10h,   10h
db    10h,   10h,   10h,   10h
db    10h,   10h,   10h,     3
db    10h,   10h,   10h,   10h
db    10h,   10h,   10h,   10h
db    10h,   10h,   10h,     4
db	5,     6,     7,     8
db	4,   10h,   10h,     9
db    10h,   0Ah,   0Bh,   0Ch
db    10h,   10h,   0Dh,   10h
db    0Eh,   10h,   10h,   0Fh
off_6A549C dd offset loc_6A51F4	; jump table for switch	statement
dd offset loc_6A52A6
dd offset loc_6A5344
dd offset loc_6A53B3
align 10h



sub_6A54B0 proc	near

var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 30Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+30Ch+var_4], eax
mov	eax, [esp+30Ch+arg_0]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
mov	eax, [esp+30Ch+arg_4]
mov	[esp+30Ch+var_30C], eax
test	eax, eax
jz	short loc_6A54F5
lea	edx, [eax+1]

loc_6A54E6:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6A54E6
sub	eax, edx
mov	[esp+30Ch+var_308], eax
jmp	short loc_6A54FD

loc_6A54F5:
mov	[esp+30Ch+var_308], 0

loc_6A54FD:
push	esi
lea	ecx, [esp+310h+arg_8]
push	ecx
lea	edx, [esp+314h+var_30C]
push	edx
lea	ecx, [esp+318h+var_304]
call	sub_6A4F80
mov	esi, [esp+310h+var_2F8]
lea	ecx, [esp+310h+var_304]
call	sub_6A4940
mov	ecx, [esp+310h+var_4]
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 30Ch
retn
sub_6A54B0 endp

align 10h



sub_6A5540 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6A5553
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6A5575

loc_6A5553:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6A557A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6A5575:
call	sub_6A4160

loc_6A557A:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*4]
mov	ebp, [esi+edx*4+8]
lea	eax, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_6A55BE
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	esi, [esi]
mov	[eax+8], esi
mov	edx, [edx+4]
mov	esi, [edx]
mov	[eax+0Ch], esi
mov	edx, [edx+4]
pop	esi
mov	[eax+10h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_6A55BE:
push	edi
mov	edi, [esi+4]
mov	edx, ecx
push	ebx

loc_6A55C5:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*4]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_6A55C5
lea	edi, [edx+edx*4]
lea	ebx, [esi+edi*4+8]
mov	edi, [eax+4]
cmp	edi, ecx
jnz	short loc_6A5623
test	ebx, ebx
jz	short loc_6A55FE
mov	[ebx], ebp
mov	esi, [eax+4]
mov	[ebx+4], esi
mov	esi, [eax+8]
mov	[ebx+8], esi
mov	esi, [eax+0Ch]
mov	[ebx+0Ch], esi
mov	esi, [eax+10h]
mov	[ebx+10h], esi

loc_6A55FE:
mov	esi, [esp+10h+arg_4]
mov	edi, [esi]
mov	edi, [edi]
mov	[eax+8], edi
mov	esi, [esi+4]
mov	edi, [esi]
mov	[eax+0Ch], edi
mov	esi, [esi+4]
pop	ebx
mov	[eax+10h], esi
pop	edi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_6A5623:
lea	edi, [edi+edi*4]
cmp	[esi+edi*4+8], ecx
lea	edi, [esi+edi*4+8]
jz	short loc_6A563F

loc_6A5630:
mov	edi, [edi]
lea	edi, [edi+edi*4]
cmp	[esi+edi*4+8], ecx
lea	edi, [esi+edi*4+8]
jnz	short loc_6A5630

loc_6A563F:
test	ebx, ebx
jz	short loc_6A565D
mov	[ebx], ebp
mov	esi, [eax+4]
mov	[ebx+4], esi
mov	esi, [eax+8]
mov	[ebx+8], esi
mov	esi, [eax+0Ch]
mov	[ebx+0Ch], esi
mov	esi, [eax+10h]
mov	[ebx+10h], esi

loc_6A565D:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	esi, [edx]
mov	esi, [esi]
mov	[eax+8], esi
mov	edx, [edx+4]
mov	esi, [edx]
pop	ebx
mov	[eax+0Ch], esi
mov	edx, [edx+4]
pop	edi
mov	[eax+10h], edx
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_6A5540 endp

align 10h



sub_6A5690 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
mov	eax, [esp+14h+arg_0]
push	ebp
mov	ebp, [eax]
push	esi
xor	edx, edx
push	edi
mov	edi, [eax+4]
mov	[esp+20h+var_14], ecx
mov	[esp+20h+var_10], 0
mov	[esp+20h+var_C], 0
mov	[esp+20h+arg_0], edx
lea	esp, [esp+0]

loc_6A56C0:
xor	eax, eax
test	edi, edi
jbe	short loc_6A56D7

loc_6A56C6:
mov	cl, [eax+ebp]
test	cl, cl
jz	short loc_6A56D7
cmp	cl, 3Ah
jz	short loc_6A56D7
inc	eax
cmp	eax, edi
jb	short loc_6A56C6

loc_6A56D7:
lea	ecx, [eax+1]
mov	esi, ebp
mov	[esp+20h+var_10], esi
mov	[esp+20h+var_C], eax
cmp	edi, ecx
jnb	short loc_6A56EA
mov	ecx, edi

loc_6A56EA:
add	ebp, ecx
sub	edi, ecx
test	edx, edx
jnz	short loc_6A571E
test	eax, eax
jz	short loc_6A5771
test	esi, esi
jz	short loc_6A5771
movsx	eax, byte ptr [esi]
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_6A5771
push	esi		; char *
call	_atoi
add	esp, 4
mov	[esp+20h+arg_0], eax
mov	edx, 1
jmp	short loc_6A5760

loc_6A571E:
mov	ecx, [esp+20h+var_14]
lea	edx, [esp+20h+arg_0]
lea	eax, [esp+20h+var_10]
mov	[esp+20h+var_8], edx
mov	[esp+20h+var_4], eax
add	ecx, 10h
mov	edx, 1505h
mov	eax, 4
nop

loc_6A5740:
movzx	esi, byte ptr [esp+eax+23h]
imul	edx, 1003Fh
dec	eax
add	edx, esi
test	eax, eax
ja	short loc_6A5740
push	edx
lea	edx, [esp+24h+var_8]
push	edx
push	ecx
call	sub_6A5540
xor	edx, edx

loc_6A5760:
test	edi, edi
jnz	loc_6A56C0
pop	edi
pop	esi
pop	ebp
add	esp, 14h
retn	4

loc_6A5771:
mov	eax, [esp+20h+var_14]
mov	ecx, [esp+20h+var_10]
mov	edx, [esp+20h+var_C]
pop	edi
pop	esi
mov	[eax+1Ch], ecx
mov	[eax+20h], edx
pop	ebp
add	esp, 14h
retn	4
sub_6A5690 endp

align 10h



sub_6A5790 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [esp+4+arg_0]
fld	dword ptr [edx]
push	ebx
fstp	[esp+8+var_4]
push	ebp
push	esi
mov	esi, [esp+10h+arg_4]
fld	dword ptr [esi]
push	edi
fstp	[esp+14h+arg_0]
fld	dword ptr [ecx+34h]
fld	[esp+14h+arg_0]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx+30h]
fld	[esp+14h+var_4]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+38h]
fstp	dword ptr [edx]
fmul	dword ptr [ecx+40h]
fld	dword ptr [ecx+3Ch]
fmulp	st(2), st
faddp	st(1), st
fadd	dword ptr [ecx+44h]
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fst	dword ptr [esi]
fld	dword ptr [edx]
fld	dword ptr [ecx+68h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_6A57F4
mov	ebp, 1
jmp	short loc_6A57F6

loc_6A57F4:
xor	ebp, ebp

loc_6A57F6:
fld	dword ptr [ecx+6Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A5809
mov	ebx, 1
jmp	short loc_6A580B

loc_6A5809:
xor	ebx, ebx

loc_6A580B:
fld	dword ptr [edx]
fld	dword ptr [ecx+60h]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_6A5820
mov	edi, 1
jmp	short loc_6A5822

loc_6A5820:
xor	edi, edi

loc_6A5822:
fld	dword ptr [ecx+64h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6A5835
mov	eax, 1
jmp	short loc_6A5837

loc_6A5835:
xor	eax, eax

loc_6A5837:
fld	dword ptr [edx]
add	eax, eax
fstp	[esp+14h+arg_4]
or	eax, edi
add	eax, eax
fstp	[esp+14h+arg_0]
or	eax, ebx
add	eax, eax
or	eax, ebp
movzx	eax, ds:byte_1437BAC[eax]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8+88h]
pop	edi
fld	dword ptr [eax+4]
fld	[esp+10h+arg_0]
fld	st
fmulp	st(2), st
fld	dword ptr [eax]
fld	[esp+10h+arg_4]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [eax+8]
fstp	dword ptr [edx]
fmul	dword ptr [eax+10h]
fld	dword ptr [eax+0Ch]
fmulp	st(2), st
faddp	st(1), st
fadd	dword ptr [eax+14h]
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
fst	dword ptr [esi]
fld	dword ptr [edx]
fstp	[esp+10h+arg_4]
fstp	[esp+10h+arg_0]
fld	dword ptr [ecx+74h]
fld	[esp+10h+arg_0]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx+70h]
fld	[esp+10h+arg_4]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+78h]
fstp	dword ptr [edx]
fmul	dword ptr [ecx+80h]
fld	dword ptr [ecx+7Ch]
fmulp	st(2), st
faddp	st(1), st
fadd	dword ptr [ecx+84h]
fstp	dword ptr [esi]
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6A5790 endp

align 10h



sub_6A58E0 proc	near

var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	qword ptr -0D0h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	qword ptr -0B0h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	qword ptr -80h
var_78=	qword ptr -78h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
fld1
sub	esp, 100h
push	ebx
push	ebp
push	esi
mov	esi, ecx
fcom	dword ptr [esi+30h]
lea	ebp, [esi+30h]
push	edi
fnstsw	ax
test	ah, 44h
jp	short loc_6A592A
fldz
fcom	dword ptr [esi+34h]
fnstsw	ax
test	ah, 44h
jp	short loc_6A5928
fcomp	dword ptr [esi+3Ch]
fnstsw	ax
test	ah, 44h
jp	short loc_6A592A
fcomp	dword ptr [esi+40h]
fnstsw	ax
test	ah, 44h
jp	short loc_6A592C
mov	eax, 1
jmp	short loc_6A592E

loc_6A5928:
fstp	st

loc_6A592A:
fstp	st

loc_6A592C:
xor	eax, eax

loc_6A592E:
lea	ecx, [esp+110h+var_30]
mov	[esi+5Ch], al
call	sub_64E8E0
lea	ebx, [esi+18h]
push	ebx
lea	ecx, [esp+114h+var_30]
call	sub_64E9E0
fld	[esp+110h+var_30]
fstp	dword ptr [esi+70h]
lea	edi, [esi+70h]
fld	[esp+110h+var_2C]
lea	ecx, [esp+110h+var_30]
fstp	dword ptr [edi+4]
fld	[esp+110h+var_28]
fstp	dword ptr [edi+8]
fld	[esp+110h+var_24]
fstp	dword ptr [edi+0Ch]
fld	[esp+110h+var_20]
fstp	dword ptr [edi+10h]
fld	[esp+110h+var_1C]
fstp	dword ptr [edi+14h]
call	sub_64E8E0
push	ebp
lea	ecx, [esp+114h+var_30]
call	sub_64E9E0
lea	eax, [esp+110h+var_30]
push	eax
mov	ecx, edi
call	sub_64EBB0
fld	dword ptr [esi+8]
fstp	[esp+110h+var_D8]
fld	dword ptr [esi+0Ch]
fstp	[esp+110h+var_D4]
fld	dword ptr [esi+10h]
fadd	dword ptr [esi+8]
fstp	[esp+110h+var_E0]
fld	dword ptr [esi+14h]
fadd	dword ptr [esi+0Ch]
fstp	[esp+110h+var_DC]
fld	dword ptr [esi+4Ch]
fstp	[esp+110h+var_C0]
fld	dword ptr [esi+50h]
fstp	[esp+110h+var_BC]
fld	dword ptr [esi+54h]
fstp	[esp+110h+var_B4]
fld	dword ptr [esi+58h]
fstp	[esp+110h+var_B8]
fld	[esp+110h+var_C0]
fld	[esp+110h+var_D8]
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FCCA8
test	ah, 41h
jp	short loc_6A5A19
fstp	st(2)
fld	st
fsub	st, st(2)
fstp	[esp+110h+var_C0]
fld	[esp+110h+var_C0]
fxch	st(2)

loc_6A5A19:
fld	[esp+110h+var_BC]
fld	[esp+110h+var_D4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_6A5A3A
fstp	st(1)
fld	st
fsub	st, st(2)
fstp	[esp+110h+var_BC]
fld	[esp+110h+var_BC]
fxch	st(1)

loc_6A5A3A:
fld	[esp+110h+var_B4]
fld	[esp+110h+var_E0]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_6A5C95
fstp	st
fxch	st(3)
fadd	st, st(2)
fstp	[esp+110h+var_B4]
fld	[esp+110h+var_B4]
fxch	st(3)

loc_6A5A5F:
fld	[esp+110h+var_B8]
fld	[esp+110h+var_DC]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_6A5C9C
fstp	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_B8]
fld	[esp+110h+var_B8]
fxch	st(1)

loc_6A5A84:
fld	dword ptr [ebx+4]
fmul	st, st(1)
fld	dword ptr [ebx]
fmul	st, st(5)
faddp	st(1), st
fadd	dword ptr [ebx+8]
fstp	[esp+110h+var_A4]
fld	dword ptr [ebx+10h]
fmul	st, st(1)
fld	dword ptr [ebx+0Ch]
fmul	st, st(5)
faddp	st(1), st
fadd	dword ptr [ebx+14h]
fstp	[esp+110h+var_A0]
fld	dword ptr [ebx+4]
fmul	st, st(1)
fld	dword ptr [ebx]
fmul	st, st(4)
faddp	st(1), st
fadd	dword ptr [ebx+8]
fstp	[esp+110h+var_8C]
fld	dword ptr [ebx+0Ch]
fmul	st, st(3)
fld	dword ptr [ebx+10h]
fmulp	st(2), st
faddp	st(1), st
fadd	dword ptr [ebx+14h]
fstp	[esp+110h+var_94]
fld	dword ptr [ebx+4]
fmul	st, st(1)
fld	st(2)
fmul	dword ptr [ebx]
faddp	st(1), st
fadd	dword ptr [ebx+8]
fstp	[esp+110h+var_98]
fld	dword ptr [ebx+10h]
fmul	st, st(1)
fld	dword ptr [ebx+0Ch]
fmulp	st(3), st
faddp	st(2), st
fld	dword ptr [ebx+14h]
faddp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_90]
fld	dword ptr [ebx+4]
fmul	st, st(1)
fld	dword ptr [ebx]
fmul	st, st(3)
faddp	st(1), st
fadd	dword ptr [ebx+8]
fstp	[esp+110h+var_6C]
fmul	dword ptr [ebx+10h]
fld	dword ptr [ebx+0Ch]
fmulp	st(2), st
faddp	st(1), st
fadd	dword ptr [ebx+14h]
fstp	[esp+110h+var_68]
fld	[esp+110h+var_8C]
fsub	[esp+110h+var_A4]
fstp	[esp+110h+var_9C]
fld	[esp+110h+var_94]
fsub	[esp+110h+var_A0]
fstp	dword ptr [esp+110h+var_D0]
fld	dword ptr [esp+110h+var_D0]
fld	[esp+110h+var_9C]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [esp+110h+var_D0]
fld	dword ptr [esp+110h+var_D0]
call	__CIsqrt
fstp	dword ptr [esp+110h+var_D0]
fld	dword ptr [esp+110h+var_D0]
fstp	dword ptr [esp+110h+var_80]
fld	[esp+110h+var_98]
fsub	[esp+110h+var_8C]
fstp	[esp+110h+var_9C]
fld	[esp+110h+var_90]
fsub	[esp+110h+var_94]
fstp	dword ptr [esp+110h+var_D0]
fld	dword ptr [esp+110h+var_D0]
fld	[esp+110h+var_9C]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [esp+110h+var_D0]
fld	dword ptr [esp+110h+var_D0]
call	__CIsqrt
fstp	dword ptr [esp+110h+var_D0]
fld	dword ptr [esp+110h+var_D0]
fstp	dword ptr [esp+110h+var_D0]
fld	[esp+110h+var_D8]
fsub	[esp+110h+var_C0]
fld	dword ptr [esp+110h+var_80]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_C4]
fld	[esp+110h+var_D4]
fsub	[esp+110h+var_BC]
fld	dword ptr [esp+110h+var_D0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_100]
fld	[esp+110h+var_B4]
fsub	[esp+110h+var_E0]
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_C8]
fld	[esp+110h+var_B8]
fsub	[esp+110h+var_DC]
fdivrp	st(1), st
fstp	[esp+110h+var_FC]
fld	[esp+110h+var_C8]
fld	st
fld	[esp+110h+var_C4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esp+110h+var_B0]
fld1
fld	dword ptr [esp+110h+var_B0]
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FD250
test	ah, 41h
jnz	short loc_6A5CA5
fadd	st(1), st
fxch	st(1)
fstp	dword ptr [esp+110h+var_B0]
fld	dword ptr [esp+110h+var_B0]
fld	st
fdivp	st(4), st
fxch	st(3)
fstp	[esp+110h+var_C4]
fxch	st(3)
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_C8]
fld	[esp+110h+var_C4]
fxch	st(1)

loc_6A5C50:
fld	[esp+110h+var_FC]
fld	st
fld	[esp+110h+var_100]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esp+110h+var_B0]
fld	dword ptr [esp+110h+var_B0]
fcom	st(3)
fnstsw	ax
fstp	st(3)
test	ah, 41h
jnz	short loc_6A5CAB
fxch	st(2)
faddp	st(4), st
fxch	st(3)
fstp	dword ptr [esp+110h+var_B0]
fld	dword ptr [esp+110h+var_B0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_100]
fdivp	st(2), st
fxch	st(1)
fstp	[esp+110h+var_FC]
jmp	short loc_6A5CB3

loc_6A5C95:
fstp	st(4)
jmp	loc_6A5A5F

loc_6A5C9C:
fstp	st(3)
fstp	st
jmp	loc_6A5A84

loc_6A5CA5:
fstp	st(1)
fstp	st(3)
jmp	short loc_6A5C50

loc_6A5CAB:
fstp	st(2)
fstp	st(1)
fstp	st
fstp	st(1)

loc_6A5CB3:
fld	[esp+110h+var_8C]
fld	st
fld	[esp+110h+var_A4]
fld	st
fsubp	st(2), st
fld	st(3)
fmul	st, st(2)
fst	[esp+110h+var_50]
fadd	st, st(1)
fstp	[esp+110h+var_3C]
fld	[esp+110h+var_94]
fld	st
fld	[esp+110h+var_A0]
fld	st
fsubp	st(2), st
fxch	st(6)
fmul	st, st(1)
fst	[esp+110h+var_60]
fadd	st, st(6)
fstp	[esp+110h+var_40]
fld	[esp+110h+var_C8]
fld	st
fmulp	st(5), st
fxch	st(4)
fst	[esp+110h+var_B0]
fsubr	st, st(5)
fstp	[esp+110h+var_54]
fmulp	st(3), st
fxch	st(2)
fst	[esp+110h+var_38]
fsubr	st, st(2)
fstp	[esp+110h+var_64]
fld	[esp+110h+var_98]
fld	st
fsub	st, st(4)
fld	[esp+110h+var_100]
fmul	st, st(1)
faddp	st(5), st
fxch	st(4)
fstp	[esp+110h+var_84]
fld	[esp+110h+var_90]
fld	st
fsub	st, st(4)
fld	[esp+110h+var_100]
fmul	st, st(1)
faddp	st(5), st
fxch	st(4)
fstp	[esp+110h+var_88]
fld	st(1)
fld	[esp+110h+var_FC]
fmulp	st(6), st
fsubrp	st(5), st
fxch	st(4)
fstp	[esp+110h+var_A0]
fld	st(3)
fld	[esp+110h+var_FC]
fmulp	st(4), st
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+110h+var_A4]
fld	[esp+110h+var_6C]
fld	st
fld	st(2)
fsubr	st, st(1)
fst	[esp+110h+var_80]
fmul	[esp+110h+var_FC]
fsubp	st(1), st
fstp	[esp+110h+var_9C]
fld	[esp+110h+var_68]
fld	st
fst	[esp+110h+var_D0]
fsub	st, st(6)
fst	[esp+110h+var_78]
fmul	[esp+110h+var_FC]
fsubr	[esp+110h+var_D0]
fstp	dword ptr [esp+110h+var_D0]
fld	[esp+110h+var_100]
fmul	[esp+110h+var_80]
fadd	st, st(3)
fstp	[esp+110h+var_44]
fld	[esp+110h+var_100]
fmul	[esp+110h+var_78]
lea	ecx, [esp+110h+var_F8]
push	ecx		; int
sub	esp, 10h
fadd	st, st(6)
lea	ecx, [esi+88h]
fstp	dword ptr [esp+124h+var_80]
fld	[esp+124h+var_44]
fadd	[esp+124h+var_50]
fstp	[esp+124h+var_100]
fld	dword ptr [esp+124h+var_80]
fadd	[esp+124h+var_60]
fstp	[esp+124h+var_FC]
fld	[esp+124h+var_84]
fsub	[esp+124h+var_B0]
fstp	dword ptr [esp+124h+var_B0]
fld	[esp+124h+var_88]
fsub	[esp+124h+var_38]
fstp	dword ptr [esp+124h+var_60]
fxch	st(3)
fsubrp	st(1), st
fld	[esp+124h+var_C8]
fld	st
fmul	st, st(2)
fst	[esp+124h+var_8]
fsubr	[esp+124h+var_A0]
fstp	dword ptr [esp+124h+var_50]
fxch	st(4)
fsubrp	st(3), st
fxch	st(3)
fmul	st, st(2)
fst	[esp+124h+var_18]
fsubr	[esp+124h+var_A4]
fstp	dword ptr [esp+124h+var_78]
fld	[esp+124h+var_C4]
fld	st
fmulp	st(4), st
fxch	st(3)
fst	[esp+124h+var_38]
fadd	[esp+124h+var_9C]
fstp	[esp+124h+var_C4]
fxch	st(2)
fmulp	st(1), st
fst	[esp+124h+var_10]
fadd	dword ptr [esp+124h+var_D0]
fstp	[esp+124h+var_C8]
fstp	[esp+124h+var_F8]
fstp	[esp+124h+var_F4]
fld	[esp+124h+var_3C]
fstp	[esp+124h+var_F0]
fld	[esp+124h+var_40]
fstp	[esp+124h+var_EC]
fld	[esp+124h+var_100]
fstp	[esp+124h+var_E8]
fld	[esp+124h+var_FC]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_D4]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_D8]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_BC]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_C0]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	[esp+110h+var_3C]
lea	edx, [esp+110h+var_F8]
fstp	[esp+110h+var_F8]
push	edx		; int
fld	[esp+114h+var_40]
sub	esp, 10h
fstp	[esp+124h+var_F4]
fld	[esp+124h+var_54]
fstp	[esp+124h+var_F0]
fld	[esp+124h+var_64]
fstp	[esp+124h+var_EC]
fld	dword ptr [esp+124h+var_B0]
fstp	[esp+124h+var_E8]
fld	dword ptr [esp+124h+var_60]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_D4]
fstp	[esp+124h+var_118]
lea	ecx, [esi+0A0h]
fld	[esp+124h+var_E0]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_BC]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_D8]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	[esp+110h+var_54]
lea	eax, [esp+110h+var_F8]
fstp	[esp+110h+var_F8]
push	eax		; int
fld	[esp+114h+var_64]
sub	esp, 10h
fstp	[esp+124h+var_F4]
lea	ecx, [esi+0B8h]
fld	[esp+124h+var_8C]
fstp	[esp+124h+var_F0]
fld	[esp+124h+var_94]
fstp	[esp+124h+var_EC]
fld	[esp+124h+var_84]
fstp	[esp+124h+var_E8]
fld	[esp+124h+var_88]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_D4]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_B4]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_BC]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_E0]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	[esp+110h+var_44]
lea	ecx, [esp+110h+var_F8]
fstp	[esp+110h+var_F8]
push	ecx		; int
fld	dword ptr [esp+114h+var_80]
sub	esp, 10h
fstp	[esp+124h+var_F4]
lea	ecx, [esi+0D0h]
fld	[esp+124h+var_100]
fstp	[esp+124h+var_F0]
fld	[esp+124h+var_FC]
fstp	[esp+124h+var_EC]
fld	[esp+124h+var_C4]
fstp	[esp+124h+var_E8]
fld	[esp+124h+var_C8]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_DC]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_D8]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_D4]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_C0]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	[esp+110h+var_100]
lea	edx, [esp+110h+var_F8]
fstp	[esp+110h+var_F8]
push	edx		; int
fld	[esp+114h+var_FC]
sub	esp, 10h
fstp	[esp+124h+var_F4]
fld	dword ptr [esp+124h+var_B0]
fstp	[esp+124h+var_F0]
fld	dword ptr [esp+124h+var_60]
fstp	[esp+124h+var_EC]
fld	dword ptr [esp+124h+var_50]
fstp	[esp+124h+var_E8]
fld	dword ptr [esp+124h+var_78]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_DC]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_E0]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_D4]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_D8]
lea	ecx, [esi+0E8h]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	dword ptr [esp+110h+var_B0]
fstp	[esp+110h+var_F8]
lea	eax, [esp+110h+var_F8]
fld	dword ptr [esp+110h+var_60]
push	eax		; int
fstp	[esp+114h+var_F4]
sub	esp, 10h
fld	[esp+124h+var_84]
lea	ecx, [esi+100h]
fstp	[esp+124h+var_F0]
fld	[esp+124h+var_88]
fstp	[esp+124h+var_EC]
fld	[esp+124h+var_A0]
fstp	[esp+124h+var_E8]
fld	[esp+124h+var_A4]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_DC]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_B4]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_D4]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_E0]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	[esp+110h+var_9C]
lea	ecx, [esp+110h+var_F8]
fstp	[esp+110h+var_F8]
push	ecx		; int
fld	dword ptr [esp+114h+var_D0]
sub	esp, 10h
fstp	[esp+124h+var_F4]
lea	ecx, [esi+118h]
fld	[esp+124h+var_C4]
fstp	[esp+124h+var_F0]
fld	[esp+124h+var_C8]
fstp	[esp+124h+var_EC]
fld	[esp+124h+var_6C]
fadd	[esp+124h+var_38]
fstp	[esp+124h+var_E8]
fld	[esp+124h+var_68]
fadd	[esp+124h+var_10]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_B8]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_D8]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_DC]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_C0]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	[esp+110h+var_C4]
lea	edx, [esp+110h+var_F8]
fstp	[esp+110h+var_F8]
push	edx		; int
fld	[esp+114h+var_C8]
sub	esp, 10h
fstp	[esp+124h+var_F4]
lea	ecx, [esi+130h]
fld	dword ptr [esp+124h+var_50]
fstp	[esp+124h+var_F0]
fld	dword ptr [esp+124h+var_78]
fstp	[esp+124h+var_EC]
fld	[esp+124h+var_98]
fsub	[esp+124h+var_8]
fstp	[esp+124h+var_E8]
fld	[esp+124h+var_90]
fsub	[esp+124h+var_18]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_B8]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_E0]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_DC]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_D8]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	dword ptr [esp+110h+var_50]
fstp	[esp+110h+var_F8]
lea	eax, [esp+110h+var_F8]
fld	dword ptr [esp+110h+var_78]
push	eax		; int
fstp	[esp+114h+var_F4]
sub	esp, 10h
fld	[esp+124h+var_A0]
lea	ecx, [esi+148h]
fstp	[esp+124h+var_F0]
fld	[esp+124h+var_A4]
fstp	[esp+124h+var_EC]
fld	[esp+124h+var_98]
fstp	[esp+124h+var_E8]
fld	[esp+124h+var_90]
fstp	[esp+124h+var_E4]
fld	[esp+124h+var_B8]
fstp	[esp+124h+var_118]
fld	[esp+124h+var_B4]
fstp	[esp+124h+var_11C]
fld	[esp+124h+var_DC]
fstp	[esp+124h+var_120]
fld	[esp+124h+var_E0]
fstp	[esp+124h+var_124]
call	sub_64EE60
fld	[esp+110h+var_D8]
pop	edi
fstp	dword ptr [esi+60h]
fld	[esp+10Ch+var_D4]
fstp	dword ptr [esi+64h]
fld	[esp+10Ch+var_E0]
fstp	dword ptr [esi+68h]
fld	[esp+10Ch+var_DC]
fstp	dword ptr [esi+6Ch]
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6A58E0 endp

align 10h



sub_6A62B0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 18h
push	ebx
push	edi
mov	edi, ecx
xor	ebx, ebx
cmp	[edi+164h], ebx
jbe	loc_6A6396
push	ebp
push	esi
xor	ebp, ebp
lea	esp, [esp+0]

loc_6A62D0:
mov	esi, [edi+160h]
fld	dword ptr [esi+ebp]
add	esi, ebp
fld	dword ptr [esi+8]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_6A6384
fld	dword ptr [esi+4]
fld	dword ptr [esi+0Ch]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_6A6384
fld	dword ptr [esi]
lea	eax, [esp+28h+var_14]
fstp	[esp+28h+var_18]
push	eax
fld	dword ptr [esi+4]
lea	ecx, [esp+2Ch+var_18]
fstp	[esp+2Ch+var_14]
push	ecx
fld	dword ptr [esi+8]
mov	ecx, edi
fstp	[esp+30h+var_10]
fld	dword ptr [esi+4]
fstp	[esp+30h+var_C]
fld	dword ptr [esi+8]
fstp	[esp+30h+var_8]
fld	dword ptr [esi+0Ch]
fstp	[esp+30h+var_4]
call	sub_6A5790
lea	edx, [esp+28h+var_C]
push	edx
lea	eax, [esp+2Ch+var_10]
push	eax
mov	ecx, edi
call	sub_6A5790
lea	ecx, [esp+28h+var_4]
push	ecx
lea	edx, [esp+2Ch+var_8]
push	edx
mov	ecx, edi
call	sub_6A5790
fld	dword ptr [esi+0Ch]
lea	eax, [esp+28h+var_18]
push	eax		; int
sub	esp, 10h
fstp	[esp+3Ch+var_30]
lea	ecx, [esi+10h]
fld	dword ptr [esi+8]
fstp	[esp+3Ch+var_34]
fld	dword ptr [esi+4]
fstp	[esp+3Ch+var_38]
fld	dword ptr [esi]
fstp	[esp+3Ch+var_3C]
call	sub_64EE60

loc_6A6384:
inc	ebx
add	ebp, 28h
cmp	ebx, [edi+164h]
jb	loc_6A62D0
pop	esi
pop	ebp

loc_6A6396:
pop	edi
pop	ebx
add	esp, 18h
retn
sub_6A62B0 endp

align 10h



sub_6A63A0 proc	near

var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 24h
push	edi
mov	edi, ecx
cmp	dword ptr [edi+148h], 0
jz	loc_6A6559
mov	ecx, [esp+28h+arg_4]
push	ebp
mov	ebp, [esp+2Ch+arg_0]
push	esi
push	ebp
call	sub_6FB670
mov	esi, eax
test	esi, esi
jz	loc_6A6557
mov	eax, [ebp+48h]
mov	eax, [eax+0Ch]
mov	edx, [esi]
push	ebx
push	eax
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	edx, [edx+14h]
mov	ebx, eax
lea	eax, [esp+28h+var_4]
push	eax
mov	ecx, esi
call	edx
mov	eax, [esp+28h+arg_0]
mov	ecx, [esp+28h+arg_4]
sub	eax, [esp+28h+var_4]
sub	ecx, [esp+28h]
imul	ecx, eax
test	ecx, ecx
jz	loc_6A6530
cmp	[edi+150h], ebx
jz	loc_6A6530
mov	edx, [esi]
mov	[esp+28h+arg_C], eax
fild	[esp+28h+arg_C]
mov	eax, [edx+4]
mov	ecx, esi
fstp	[esp+28h+arg_C]
call	eax
mov	[esp+28h+arg_10], eax
fild	[esp+28h+arg_10]
test	eax, eax
jge	short loc_6A643C
fadd	ds:flt_15FCC08

loc_6A643C:
fdivr	[esp+28h+arg_C]
mov	ecx, [esp+28h+arg_4]
sub	ecx, [esp+28h]
mov	edx, [esi]
mov	eax, [edx+8]
mov	[esp+28h+arg_C], ecx
mov	ecx, esi
fstp	[esp+28h+arg_10]
fild	[esp+28h+arg_C]
fstp	[esp+28h+arg_C]
call	eax
mov	[esp+28h+var_10], eax
fild	[esp+28h+var_10]
test	eax, eax
jge	short loc_6A6473
fadd	ds:flt_15FCC08

loc_6A6473:
fdivr	[esp+28h+arg_C]
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
fstp	[esp+28h+arg_C]
fild	[esp+28h+var_4]
fstp	[esp+28h+var_18]
call	eax
mov	[esp+28h+var_10], eax
fild	[esp+28h+var_10]
test	eax, eax
jge	short loc_6A649E
fadd	ds:flt_15FCC08

loc_6A649E:
fdivr	[esp+28h+var_18]
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
fstp	dword ptr [esp+28h+var_18]
fild	dword ptr [esp+28h]
fstp	[esp+28h+var_C]
call	eax
mov	[esp+28h+var_10], eax
fild	[esp+28h+var_10]
test	eax, eax
jge	short loc_6A64C9
fadd	ds:flt_15FCC08

loc_6A64C9:
fdivr	[esp+28h+var_C]
xor	ecx, ecx
fstp	[esp+28h+var_10]
cmp	[edi+148h], ecx
jbe	short loc_6A652A
fld	[esp+28h+arg_10]
lea	eax, [edi+18h]
fld	[esp+28h+arg_C]
fld	dword ptr [esp+28h+var_18]
fld	[esp+28h+var_10]

loc_6A64EE:
fld	dword ptr [eax-4]
inc	ecx
fmul	st, st(4)
add	eax, 24h
fadd	st, st(2)
fstp	dword ptr [eax-28h]
fld	dword ptr [eax-24h]
fmul	st, st(3)
fadd	st, st(1)
fstp	dword ptr [eax-24h]
fld	dword ptr [eax-20h]
fmul	st, st(4)
fadd	st, st(2)
fstp	dword ptr [eax-20h]
fld	dword ptr [eax-1Ch]
fmul	st, st(3)
fadd	st, st(1)
fstp	dword ptr [eax-1Ch]
cmp	ecx, [edi+148h]
jb	short loc_6A64EE
fstp	st(3)
fstp	st(1)
fstp	st
fstp	st

loc_6A652A:
mov	[edi+150h], ebx

loc_6A6530:
mov	eax, [edi+148h]
mov	esi, [esp+28h+arg_14]
mov	ecx, [ebp+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	0
push	esi
push	ebx
push	eax
push	0
push	eax
mov	eax, [edx+98h]
add	edi, 4
push	edi
call	eax
pop	ebx

loc_6A6557:
pop	esi
pop	ebp

loc_6A6559:
pop	edi
add	esp, 24h
retn	0Ch
sub_6A63A0 endp




sub_6A6560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	edi
mov	edi, [esp+4+arg_4]
test	edi, edi
jbe	short loc_6A65B2
fld	ds:flt_1437BA8
push	esi
mov	esi, [esp+8+arg_0]
fld	ds:flt_1437BA4
add	esi, 8

loc_6A657D:
lea	eax, [esi-8]
test	eax, eax
jz	short loc_6A65A5
fxch	st(1)
lea	ecx, [esi+8]
fst	dword ptr [esi-8]
fstp	dword ptr [esi-4]
fst	dword ptr [esi]
fstp	dword ptr [esi+4]
call	sub_64E8E0
fld	ds:flt_1437BA8
fld	ds:flt_1437BA4

loc_6A65A5:
add	esi, 28h
sub	edi, 1
jnz	short loc_6A657D
fstp	st(1)
pop	esi
fstp	st

loc_6A65B2:
pop	edi
retn
sub_6A6560 endp

align 10h



sub_6A65C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
mov	eax, [esp+24h+arg_4]
fld	dword ptr [eax]
push	esi
fstp	[esp+28h+arg_4]
mov	esi, ecx
fld	dword ptr [eax+4]
lea	ecx, [esp+28h+arg_4]
fstp	[esp+28h+var_1C]
fld	dword ptr [eax+8]
fstp	[esp+28h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+28h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+28h+var_10]
fld	dword ptr [eax+0Ch]
fstp	[esp+28h+var_C]
fld	dword ptr [eax]
fstp	[esp+28h+var_8]
fld	dword ptr [eax+0Ch]
lea	eax, [esp+28h+var_1C]
push	eax
fstp	[esp+2Ch+var_4]
push	ecx
mov	ecx, esi
call	sub_6A5790
lea	edx, [esp+28h+var_14]
push	edx
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, esi
call	sub_6A5790
lea	ecx, [esp+28h+var_C]
push	ecx
lea	edx, [esp+2Ch+var_10]
push	edx
mov	ecx, esi
call	sub_6A5790
lea	eax, [esp+28h+var_4]
push	eax
lea	ecx, [esp+2Ch+var_8]
push	ecx
mov	ecx, esi
call	sub_6A5790
fld	[esp+28h+arg_4]
fst	[esp+28h+arg_4]
pop	esi
fld	[esp+24h+var_1C]
fst	[esp+24h+var_24]
fst	[esp+24h+var_1C]
fxch	st(1)
fst	[esp+24h+var_20]
fld	[esp+24h+var_18]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A666F
fst	[esp+24h+arg_4]

loc_6A666F:
fld	[esp+24h+var_14]
fcom	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_6A667F
fst	[esp+24h+var_24]

loc_6A667F:
fxch	st(2)
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A6690
fstp	[esp+24h+var_20]
jmp	short loc_6A6692

loc_6A6690:
fstp	st

loc_6A6692:
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_6A66A3
fstp	[esp+24h+var_1C]
jmp	short loc_6A66A5

loc_6A66A3:
fstp	st

loc_6A66A5:
fld	[esp+24h+var_10]
fld	[esp+24h+arg_4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6A66BA
fst	[esp+24h+arg_4]

loc_6A66BA:
fld	[esp+24h+var_C]
fld	[esp+24h+var_24]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6A66CD
fst	[esp+24h+var_24]

loc_6A66CD:
fld	[esp+24h+var_20]
fcomp	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_6A66E2
fxch	st(1)
fstp	[esp+24h+var_20]
jmp	short loc_6A66E4

loc_6A66E2:
fstp	st(1)

loc_6A66E4:
fld	[esp+24h+var_1C]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A66F7
fstp	[esp+24h+var_1C]
jmp	short loc_6A66F9

loc_6A66F7:
fstp	st

loc_6A66F9:
fld	[esp+24h+var_8]
fld	[esp+24h+arg_4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6A670E
fst	[esp+24h+arg_4]

loc_6A670E:
fld	[esp+24h+var_4]
fld	[esp+24h+var_24]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6A6721
fst	[esp+24h+var_24]

loc_6A6721:
fld	[esp+24h+var_20]
fcomp	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_6A6736
fxch	st(1)
fstp	[esp+24h+var_20]
jmp	short loc_6A6738

loc_6A6736:
fstp	st(1)

loc_6A6738:
fld	[esp+24h+var_1C]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A674B
fstp	[esp+24h+var_1C]
jmp	short loc_6A674D

loc_6A674B:
fstp	st

loc_6A674D:
mov	eax, [esp+24h+arg_0]
fld	[esp+24h+arg_4]
fstp	dword ptr [eax]
fld	[esp+24h+var_24]
fstp	dword ptr [eax+4]
fld	[esp+24h+var_20]
fstp	dword ptr [eax+8]
fld	[esp+24h+var_1C]
fstp	dword ptr [eax+0Ch]
add	esp, 24h
retn	8
sub_6A65C0 endp

align 10h



; int __stdcall	sub_6A6780(int,	int, int, float, int)
sub_6A6780 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_155F500
lea	edi, [esi+18h]
mov	ecx, edi
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437BBC
call	sub_64E8E0
lea	ebx, [esi+30h]
mov	ecx, ebx
call	sub_64E8E0
fldz
fst	dword ptr [esi+4Ch]
lea	ecx, [esi+70h]
fst	dword ptr [esi+50h]
fst	dword ptr [esi+54h]
fst	dword ptr [esi+58h]
fst	dword ptr [esi+60h]
fst	dword ptr [esi+64h]
fst	dword ptr [esi+68h]
fstp	dword ptr [esi+6Ch]
call	sub_64E8E0
lea	ebp, [esi+88h]
mov	[esp+14h+var_4], 8
mov	edi, edi

loc_6A67E0:
mov	ecx, ebp
call	sub_64E8E0
add	ebp, 18h
sub	[esp+14h+var_4], 1
jns	short loc_6A67E0
mov	eax, [esp+14h+arg_0]
xor	ecx, ecx
mov	[esi+160h], ecx
mov	[esi+164h], ecx
mov	[esi+168h], ecx
mov	edx, [eax]
mov	[esi+8], edx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	edx, [eax+8]
mov	[esi+10h], edx
mov	eax, [eax+0Ch]
mov	[esi+14h], eax
mov	eax, [esp+14h+arg_4]
fld	dword ptr [eax]
fstp	dword ptr [edi]
fld	dword ptr [eax+4]
fstp	dword ptr [edi+4]
fld	dword ptr [eax+8]
fstp	dword ptr [edi+8]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edi+0Ch]
fld	dword ptr [eax+10h]
fstp	dword ptr [edi+10h]
fld	dword ptr [eax+14h]
mov	eax, [esp+14h+arg_8]
fstp	dword ptr [edi+14h]
pop	edi
fld	dword ptr [eax]
fstp	dword ptr [ebx]
fld	dword ptr [eax+4]
fstp	dword ptr [ebx+4]
fld	dword ptr [eax+8]
fstp	dword ptr [ebx+8]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [ebx+0Ch]
fld	dword ptr [eax+10h]
fstp	dword ptr [ebx+10h]
fld	dword ptr [eax+14h]
mov	eax, [esp+10h+arg_10]
fstp	dword ptr [ebx+14h]
fld	[esp+10h+arg_C]
fstp	dword ptr [esi+48h]
fld	dword ptr [eax+4]
fstp	[esp+10h+arg_0]
fld	dword ptr [eax+8]
fstp	[esp+10h+arg_4]
fld	dword ptr [eax+0Ch]
fstp	[esp+10h+arg_8]
fld	dword ptr [eax]
mov	eax, esi
fstp	dword ptr [esi+4Ch]
fld	[esp+10h+arg_0]
fstp	dword ptr [esi+50h]
fld	[esp+10h+arg_4]
fstp	dword ptr [esi+54h]
fld	[esp+10h+arg_8]
fstp	dword ptr [esi+58h]
mov	[esi+5Ch], cl
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	14h
sub_6A6780 endp

align 10h



sub_6A68C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+160h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6A68F3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6A68F3:
mov	eax, esi
pop	esi
retn	4
sub_6A68C0 endp

align 10h



; int __stdcall	sub_6A6900(int,	int, float, int)
sub_6A6900 proc	near

var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0D8h
fld	[esp+0D8h+arg_8]
mov	eax, [esp+0D8h+arg_C]
fld1
push	ebx
fld	st
mov	ebx, [esp+0DCh+arg_0]
fdivrp	st(2), st
push	ebp
push	esi
mov	esi, ecx
mov	[esi+14Ch], eax
xor	eax, eax
mov	[esi+150h], eax
push	edi
mov	[esp+0E8h+var_CC], esi
fxch	st(1)
fstp	dword ptr [esi]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0E8h+var_90]
fld	dword ptr [ebx+50h]
fstp	[esp+0E8h+var_8C]
fld	dword ptr [ebx+60h]
fstp	[esp+0E8h+var_88]
fld	dword ptr [ebx+64h]
fstp	[esp+0E8h+var_84]
fld	dword ptr [ebx+60h]
fstp	[esp+0E8h+var_80]
fld	dword ptr [ebx+50h]
fstp	[esp+0E8h+var_7C]
fld	dword ptr [ebx+68h]
fstp	[esp+0E8h+var_78]
fld	dword ptr [ebx+64h]
fstp	[esp+0E8h+var_74]
fld	dword ptr [ebx+68h]
fstp	[esp+0E8h+var_70]
fld	dword ptr [ebx+50h]
fstp	[esp+0E8h+var_6C]
fld	dword ptr [ebx+54h]
fstp	[esp+0E8h+var_68]
fld	dword ptr [ebx+64h]
fstp	[esp+0E8h+var_64]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0E8h+var_60]
fld	dword ptr [ebx+64h]
fstp	[esp+0E8h+var_5C]
fld	dword ptr [ebx+60h]
fstp	[esp+0E8h+var_58]
fld	dword ptr [ebx+6Ch]
fstp	[esp+0E8h+var_54]
fld	dword ptr [ebx+60h]
fstp	[esp+0E8h+var_50]
fld	dword ptr [ebx+64h]
fstp	[esp+0E8h+var_4C]
fld	dword ptr [ebx+68h]
fstp	[esp+0E8h+var_48]
fld	dword ptr [ebx+6Ch]
fstp	[esp+0E8h+var_44]
fld	dword ptr [ebx+68h]
fstp	[esp+0E8h+var_40]
fld	dword ptr [ebx+64h]
fstp	[esp+0E8h+var_3C]
fld	dword ptr [ebx+54h]
fstp	[esp+0E8h+var_38]
fld	dword ptr [ebx+6Ch]
fstp	[esp+0E8h+var_34]
fld	dword ptr [ebx+4Ch]
fstp	[esp+0E8h+var_30]
fld	dword ptr [ebx+6Ch]
fstp	[esp+0E8h+var_2C]
fld	dword ptr [ebx+60h]
fstp	[esp+0E8h+var_28]
fld	dword ptr [ebx+58h]
fstp	[esp+0E8h+var_24]
fld	dword ptr [ebx+60h]
fstp	[esp+0E8h+var_20]
fld	dword ptr [ebx+6Ch]
fstp	[esp+0E8h+var_1C]
fld	dword ptr [ebx+68h]
fstp	[esp+0E8h+var_18]
fld	dword ptr [ebx+58h]
fstp	[esp+0E8h+var_14]
fld	dword ptr [ebx+68h]
mov	ebp, [esp+0E8h+arg_4]
fstp	[esp+0E8h+var_10]
lea	ecx, [esp+0E8h+var_C8]
fld	dword ptr [ebx+6Ch]
fstp	[esp+0E8h+var_C]
fld	dword ptr [ebx+54h]
fstp	[esp+0E8h+var_8]
fld	dword ptr [ebx+58h]
mov	[esi+148h], eax
fstp	[esp+0E8h+var_4]
fld	dword ptr [ebp+0]
fstp	[esp+0E8h+var_9C]
fld	dword ptr [ebp+4]
fstp	[esp+0E8h+var_98]
fld	dword ptr [ebp+8]
fsub	dword ptr [ebp+0]
fstp	[esp+0E8h+var_D4]
fld	[esp+0E8h+var_D4]
fdivr	st, st(1)
fstp	[esp+0E8h+var_A0]
fld	dword ptr [ebp+0Ch]
fsub	dword ptr [ebp+4]
fstp	[esp+0E8h+var_D4]
fdiv	[esp+0E8h+var_D4]
fstp	[esp+0E8h+var_94]
call	sub_64E8E0
lea	ecx, [ebx+30h]
push	ecx
lea	ecx, [esp+0ECh+var_C8]
call	sub_64E9E0
fld	[esp+0E8h+var_B4]
fld	[esp+0E8h+var_B8]
lea	edi, [esp+0E8h+var_88]
fld	[esp+0E8h+var_BC]
mov	[esp+0E8h+var_D4], 9

loc_6A6AF6:
fld	dword ptr [edi-8]
fstp	[esp+0E8h+var_D0]
fld	dword ptr [edi-4]
fstp	[esp+0E8h+var_D8]
fld	[esp+0E8h+var_C4]
fld	[esp+0E8h+var_D8]
fld	st
fmulp	st(2), st
fld	[esp+0E8h+var_C8]
fld	[esp+0E8h+var_D0]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	[esp+0E8h+var_C0]
fstp	dword ptr [edi-8]
fmul	st, st(3)
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fadd	st, st(3)
fstp	dword ptr [edi-4]
fld	dword ptr [edi]
fstp	[esp+0E8h+var_D8]
fld	dword ptr [edi+4]
fstp	[esp+0E8h+var_D0]
fld	[esp+0E8h+var_C4]
fld	[esp+0E8h+var_D0]
fld	st
fmulp	st(2), st
fld	[esp+0E8h+var_D8]
fld	st
fmul	[esp+0E8h+var_C8]
faddp	st(3), st
fld	[esp+0E8h+var_C0]
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [edi]
fmul	st, st(3)
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fadd	st, st(3)
fstp	dword ptr [edi+4]
fld	dword ptr [ebp+0]
fstp	[esp+0E8h+var_B0]
fld	dword ptr [ebp+4]
fstp	[esp+0E8h+var_AC]
fld	dword ptr [ebp+8]
fstp	[esp+0E8h+var_A8]
fld	dword ptr [ebp+0Ch]
fstp	[esp+0E8h+var_A4]
fld	dword ptr [edi+4]
fld	[esp+0E8h+var_AC]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_6A6BD3
fld	[esp+0E8h+var_A4]
fld	dword ptr [edi-4]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6A6BD3
fld	[esp+0E8h+var_A8]
fld	dword ptr [edi-8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_6A6BD1
fld	dword ptr [edi]
fld	[esp+0E8h+var_B0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnp	short loc_6A6BED
fstp	st(2)

loc_6A6BD1:
fstp	st(1)

loc_6A6BD3:
fstp	st
fldz
fst	dword ptr [edi-8]
fstp	dword ptr [edi-4]
fldz
fadd	st, st
fstp	[esp+0E8h+var_D0]
fld	[esp+0E8h+var_D0]
fst	dword ptr [edi]
jmp	short loc_6A6C5D

loc_6A6BED:
fld	dword ptr [edi-8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6A6BFE
fstp	st
fld	dword ptr [edi-8]

loc_6A6BFE:
fstp	[esp+0E8h+var_D8]
fld	[esp+0E8h+var_D8]
fstp	dword ptr [edi-8]
fld	dword ptr [edi]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_6A6C18
fstp	st
fld	dword ptr [edi]

loc_6A6C18:
fstp	[esp+0E8h+var_D8]
fld	[esp+0E8h+var_D8]
fstp	dword ptr [edi]
fld	dword ptr [edi-4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6A6C33
fstp	st
fld	dword ptr [edi-4]

loc_6A6C33:
fstp	[esp+0E8h+var_D8]
fld	[esp+0E8h+var_D8]
fstp	dword ptr [edi-4]
fld	dword ptr [edi+4]
fld	[esp+0E8h+var_A4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_6A6C55
fstp	st
fld	dword ptr [edi+4]

loc_6A6C55:
fstp	[esp+0E8h+var_D8]
fld	[esp+0E8h+var_D8]

loc_6A6C5D:
fstp	dword ptr [edi+4]
fld	dword ptr [edi-8]
fld	dword ptr [edi]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_6A6D5B
fld	dword ptr [edi-4]
fld	dword ptr [edi+4]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_6A6D5B
mov	eax, [esi+148h]
fstp	st(2)
fstp	st
lea	edx, [eax+eax*8]
fstp	st
lea	esi, [esi+edx*4+4]
fld	dword ptr [edi-8]
lea	ebp, [esi+4]
fstp	dword ptr [esi]
push	ebp
fld	dword ptr [edi-4]
push	esi
fstp	dword ptr [ebp+0]
mov	ecx, ebx
fld	dword ptr [edi]
fstp	dword ptr [esi+8]
fld	dword ptr [edi+4]
fstp	dword ptr [esi+0Ch]
call	sub_6A5790
lea	eax, [esi+0Ch]
push	eax
lea	eax, [esi+8]
push	eax
mov	ecx, ebx
call	sub_6A5790
fld	dword ptr [esi]
fld	[esp+0E8h+arg_8]
mov	eax, [esp+0E8h+var_CC]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fld	dword ptr [ebp+0]
fmul	st, st(1)
fstp	dword ptr [ebp+0]
mov	ebp, [esp+0E8h+arg_4]
fld	dword ptr [esi+8]
fmul	st, st(1)
fstp	dword ptr [esi+8]
fmul	dword ptr [esi+0Ch]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [edi-8]
fld	[esp+0E8h+var_9C]
fld	st
fsubp	st(2), st
fld	[esp+0E8h+var_A0]
fld	st
fmulp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+10h]
fld	dword ptr [edi-4]
fld	[esp+0E8h+var_98]
fld	st
fsubp	st(2), st
fld	[esp+0E8h+var_94]
fld	st
fmulp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+14h]
fld	dword ptr [edi]
fsubrp	st(3), st
fxch	st(2)
fmulp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+18h]
fsubr	dword ptr [edi+4]
fmulp	st(1), st
fstp	dword ptr [esi+1Ch]
mov	dword ptr [esi+20h], 0FFFFFFFFh
fld	[esp+0E8h+var_B4]
inc	dword ptr [eax+148h]
fld	[esp+0E8h+var_B8]
mov	esi, eax
fld	[esp+0E8h+var_BC]

loc_6A6D5B:
add	edi, 10h
sub	[esp+0E8h+var_D4], 1
jnz	loc_6A6AF6
pop	edi
fstp	st(2)
pop	esi
fstp	st
pop	ebp
fstp	st
pop	ebx
add	esp, 0D8h
retn	10h
sub_6A6900 endp

align 10h



sub_6A6D80 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_6A6D9C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6A6DB1
push	esi
jmp	short loc_6A6DAB

loc_6A6D9C:
cmp	esi, [edi+8]
jb	short loc_6A6DB1
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6A6DAB:
push	edi
call	sub_73F2F0

loc_6A6DB1:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_6A6DCC
mov	eax, [edi]
lea	edx, [ebx+ebx*4]
sub	esi, ebx
lea	ecx, [eax+edx*8]
push	esi
push	ecx
call	sub_6A6560
add	esp, 8

loc_6A6DCC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6A6D80 endp

align 10h



sub_6A6DE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	edi
xor	edi, edi
mov	ebx, ecx
cmp	[ebp+18h], edi
jbe	loc_6A6EC0
push	esi

loc_6A6DF5:
mov	edx, [ebp+24h]
mov	ecx, edi
mov	eax, edi
and	eax, 3Fh
shr	ecx, 6
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
lea	esi, [ecx+eax*8]
mov	eax, [esi+0Ch]
test	eax, eax
jl	short loc_6A6E60
lea	edx, [eax+eax*4]
mov	eax, [esp+10h+arg_4]
test	byte ptr [eax+edx*8], 50h
lea	eax, [eax+edx*8]
jz	short loc_6A6E60
cmp	dword ptr [ebx+164h], 0
jnz	short loc_6A6E3B
mov	ecx, [esp+10h+arg_8]
push	ecx
lea	ecx, [ebx+160h]
call	sub_6A6D80

loc_6A6E3B:
mov	eax, [esi+0Ch]
lea	edx, [eax+eax*4]
mov	eax, [ebx+160h]
lea	eax, [eax+edx*8]
lea	ecx, [eax+0Ch]
push	ecx
lea	edx, [eax+8]
push	edx
lea	ecx, [eax+4]
push	ecx
push	eax
push	esi
call	sub_7093A0
add	esp, 14h

loc_6A6E60:
mov	eax, [esi+10h]
test	eax, eax
jl	short loc_6A6EB5
lea	edx, [eax+eax*4]
mov	eax, [esp+10h+arg_4]
test	byte ptr [eax+edx*8], 50h
lea	eax, [eax+edx*8]
jz	short loc_6A6EB5
cmp	dword ptr [ebx+164h], 0
jnz	short loc_6A6E90
mov	ecx, [esp+10h+arg_8]
push	ecx
lea	ecx, [ebx+160h]
call	sub_6A6D80

loc_6A6E90:
mov	eax, [esi+10h]
lea	edx, [eax+eax*4]
mov	eax, [ebx+160h]
lea	eax, [eax+edx*8]
lea	ecx, [eax+0Ch]
push	ecx
lea	edx, [eax+8]
push	edx
lea	ecx, [eax+4]
push	ecx
push	eax
push	esi
call	sub_7093A0
add	esp, 14h

loc_6A6EB5:
inc	edi
cmp	edi, [ebp+18h]
jb	loc_6A6DF5
pop	esi

loc_6A6EC0:
pop	edi
pop	ebp
pop	ebx
retn	0Ch
sub_6A6DE0 endp

align 10h



; int __stdcall	sub_6A6ED0(int,	int, float, float, float, float)
sub_6A6ED0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_4]
fld	dword ptr [eax+10h]
mov	ecx, [esp+arg_0]
fld	[esp+arg_C]
fld	st
fmulp	st(2), st
fld	dword ptr [eax]
fld	[esp+arg_8]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fld	dword ptr [eax+20h]
fld	[esp+arg_10]
fld	st
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	dword ptr [eax+30h]
fld	[esp+arg_14]
fld	st
fmulp	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	dword ptr [ecx]
fld	dword ptr [eax+4]
fmul	st, st(4)
fld	dword ptr [eax+14h]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax+24h]
fmul	st, st(3)
faddp	st(1), st
fld	dword ptr [eax+34h]
fmul	st, st(2)
faddp	st(1), st
fstp	dword ptr [ecx+4]
fld	dword ptr [eax+8]
fmul	st, st(4)
fld	dword ptr [eax+18h]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax+28h]
fmul	st, st(3)
faddp	st(1), st
fld	dword ptr [eax+38h]
fmul	st, st(2)
faddp	st(1), st
fstp	dword ptr [ecx+8]
fld	dword ptr [eax+0Ch]
fmulp	st(4), st
fld	dword ptr [eax+1Ch]
fmulp	st(3), st
fxch	st(3)
faddp	st(2), st
fmul	dword ptr [eax+2Ch]
faddp	st(1), st
fld	dword ptr [eax+3Ch]
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [ecx+0Ch]
retn	18h
sub_6A6ED0 endp

align 10h



sub_6A6F70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_8]
fld	dword ptr [ecx+10h]
fmul	dword ptr [eax+4]
mov	edx, [esp+arg_0]
fld	dword ptr [ecx]
fmul	dword ptr [eax]
faddp	st(1), st
fld	dword ptr [ecx+20h]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [ecx+30h]
fmul	dword ptr [eax+0Ch]
faddp	st(1), st
fstp	dword ptr [edx]
fld	dword ptr [ecx+4]
fmul	dword ptr [eax]
fld	dword ptr [ecx+14h]
fmul	dword ptr [eax+4]
faddp	st(1), st
fld	dword ptr [ecx+24h]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [ecx+34h]
fmul	dword ptr [eax+0Ch]
faddp	st(1), st
fstp	dword ptr [edx+4]
fld	dword ptr [ecx+8]
fmul	dword ptr [eax]
fld	dword ptr [ecx+18h]
fmul	dword ptr [eax+4]
faddp	st(1), st
fld	dword ptr [ecx+28h]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [ecx+38h]
fmul	dword ptr [eax+0Ch]
faddp	st(1), st
fstp	dword ptr [edx+8]
fld	dword ptr [ecx+0Ch]
fmul	dword ptr [eax]
fld	dword ptr [ecx+1Ch]
fmul	dword ptr [eax+4]
faddp	st(1), st
fld	dword ptr [ecx+2Ch]
fmul	dword ptr [eax+8]
faddp	st(1), st
fld	dword ptr [ecx+3Ch]
fmul	dword ptr [eax+0Ch]
faddp	st(1), st
fstp	dword ptr [edx+0Ch]
retn	0Ch
sub_6A6F70 endp

align 10h



sub_6A7000 proc	near

var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
var_C0=	dword ptr -0C0h
var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 138h
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+10h], 0
jz	loc_6A729B
cmp	dword ptr [ebx+14h], 0
jz	loc_6A729B
cmp	dword ptr [ebx+18h], 0
jz	loc_6A729B
push	esi
push	edi
lea	ecx, [esp+144h+var_100]	; void *
call	sub_64F7C0
lea	ecx, [esp+144h+var_80] ; void *
call	sub_64F7C0
lea	ecx, [esp+144h+var_C0] ; void *
call	sub_64F7C0
mov	eax, [ebx+10h]
push	eax
lea	ecx, [esp+148h+var_C0]
push	ecx
call	sub_64F460
mov	eax, [ebx+18h]
mov	edx, [ebx+14h]
mov	esi, eax
mov	ecx, 10h
lea	edi, [esp+144h+var_80]
rep movsd
mov	esi, eax
mov	ecx, 10h
lea	edi, [esp+144h+var_40]
push	edx
lea	eax, [esp+148h+var_40]
rep movsd
push	eax
lea	ecx, [esp+14Ch+var_80]
call	sub_64F7E0
lea	ecx, [esp+144h+var_80]
push	ecx
lea	edx, [esp+148h+var_100]
push	edx
mov	ecx, edx
call	sub_64F460
fld1
mov	edx, [ebx+10h]
sub	esp, 10h
fstp	[esp+154h+var_148]
fld	ds:flt_15FD214
lea	eax, [esp+154h+var_110]
fstp	[esp+154h+var_14C]
mov	ecx, ebx
fldz
fst	[esp+154h+var_150]
fstp	[esp+154h+var_154]
push	edx		; int
push	eax		; int
call	sub_6A6ED0
fld1
sub	esp, 10h
fstp	[esp+154h+var_148]
fld	ds:flt_15FD84C
lea	ecx, [esp+154h+var_120]
fstp	[esp+154h+var_14C]
fldz
fst	[esp+154h+var_150]
fstp	[esp+154h+var_154]
push	edx		; int
push	ecx		; int
mov	ecx, ebx
call	sub_6A6ED0
fld	[esp+144h+var_104]
sub	esp, 10h
fst	[esp+154h+var_148]
lea	edx, [esp+154h+var_C0]
fld	[esp+154h+var_108]
lea	eax, [esp+154h+var_130]
fmul	st, st(1)
fstp	[esp+154h+var_138]
fld	[esp+154h+var_138]
fstp	[esp+154h+var_14C]
fld	dword ptr [ebx+4]
fmul	st, st(1)
fstp	[esp+154h+var_138]
fld	[esp+154h+var_138]
fstp	[esp+154h+var_150]
fmul	dword ptr [ebx]
fstp	[esp+154h+var_138]
fld	[esp+154h+var_138]
fstp	[esp+154h+var_154]
push	edx		; int
push	eax		; int
mov	ecx, ebx
call	sub_6A6ED0
fld	[esp+144h+var_114]
sub	esp, 10h
fst	[esp+154h+var_148]
mov	ecx, edx
fld	[esp+154h+var_118]
lea	edx, [esp+154h+var_120]
fmul	st, st(1)
fstp	[esp+154h+var_138]
fld	[esp+154h+var_138]
fstp	[esp+154h+var_14C]
fld	dword ptr [ebx+4]
fmul	st, st(1)
fstp	[esp+154h+var_138]
fld	[esp+154h+var_138]
fstp	[esp+154h+var_150]
fmul	dword ptr [ebx]
fstp	[esp+154h+var_138]
fld	[esp+154h+var_138]
fstp	[esp+154h+var_154]
push	ecx		; int
push	edx		; int
mov	ecx, ebx
call	sub_6A6ED0
fld	[esp+144h+var_124]
fld	st
lea	eax, [esp+144h+var_130]
fmul	[esp+144h+var_130]
push	eax
lea	ecx, [esp+148h+var_100]
push	ecx
fstp	[esp+14Ch+var_130]
lea	edx, [esp+14Ch+var_110]
push	edx
fld	st
mov	ecx, ebx
fmul	[esp+150h+var_12C]
fstp	[esp+150h+var_12C]
fmul	[esp+150h+var_128]
fstp	[esp+150h+var_128]
fld1
fst	[esp+150h+var_124]
fld	[esp+150h+var_114]
fld	st
fmul	[esp+150h+var_120]
fstp	[esp+150h+var_120]
fld	[esp+150h+var_11C]
fmul	st, st(1)
fstp	[esp+150h+var_11C]
fmul	[esp+150h+var_118]
fstp	[esp+150h+var_118]
fstp	[esp+150h+var_114]
call	sub_6A6F70
lea	eax, [esp+144h+var_120]
push	eax
lea	ecx, [esp+148h+var_100]
push	ecx
lea	edx, [esp+14Ch+var_130]
push	edx
mov	ecx, ebx
call	sub_6A6F70
fld	[esp+144h+var_128]
fld	[esp+144h+var_108]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+144h+var_138]
fld	st
fchs
fld	[esp+144h+var_138]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+144h+var_134]
fld	[esp+144h+var_130]
fld	[esp+144h+var_110]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+144h+var_138]
mov	eax, [esp+144h+arg_0]
fld	[esp+144h+var_138]
pop	edi
fld	[esp+140h+var_134]
pop	esi
fld	st
fmulp	st(2), st
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+13Ch+var_134]
fld	[esp+13Ch+var_134]
fst	dword ptr [eax]
fstp	dword ptr [ebx+8]
fld	[esp+13Ch+var_12C]
fld	[esp+13Ch+var_10C]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+13Ch+var_134]
fld	[esp+13Ch+var_134]
fmul	st, st(2)
faddp	st(1), st
fstp	[esp+13Ch+var_134]
fld	[esp+13Ch+var_134]
fst	dword ptr [eax+4]
fstp	dword ptr [ebx+0Ch]
fmulp	st(1), st
faddp	st(1), st
fstp	dword ptr [eax+8]

loc_6A729B:
pop	ebx
add	esp, 138h
retn	4
sub_6A7000 endp

align 10h



sub_6A72B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 0Ch
lea	eax, [esp+0Ch+var_C]
push	eax
call	sub_6A7000
fld	[esp+0Ch+var_C]
mov	eax, [esp+0Ch+arg_0]
fstp	dword ptr [eax]
fld	[esp+0Ch+var_8]
fstp	dword ptr [eax+4]
add	esp, 0Ch
retn	4
sub_6A72B0 endp

align 10h



sub_6A72E0 proc	near
mov	dword ptr [ecx], offset	off_1437C14
mov	dword ptr [ecx+10h], offset off_1437BC0
jmp	sub_664A30
sub_6A72E0 endp

align 10h



sub_6A7300 proc	near
mov	eax, 25h
retn
sub_6A7300 endp

align 10h



sub_6A7310 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6A7320
align 10h

loc_6A7320:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437C14
mov	dword ptr [esi+10h], offset off_1437BC0
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6A734A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A734A:
mov	eax, esi
pop	esi
retn	4
sub_6A7310 endp




sub_6A7350 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_663BE0
fld	ds:dword_1577A70
mov	dword ptr [esi], offset	off_1437C14
mov	dword ptr [esi+10h], offset off_1437BC0
fst	dword ptr [esi+40h]
fstp	dword ptr [esi+44h]
mov	dword ptr [esi+3Ch], 0
fldz
mov	dword ptr [esi+48h], 1
fst	dword ptr [esi+4Ch]
lea	ecx, [esi+60h]
fstp	dword ptr [esi+50h]
fld1
fstp	dword ptr [esi+5Ch]
call	sub_68CFB0
mov	cl, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
mov	[esi+34h], cl
mov	[esi+3Ch], edx
mov	eax, esi
pop	esi
retn	0Ch
sub_6A7350 endp

align 10h



sub_6A73B0 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+0D4h]
call	sub_67C000
lea	ecx, [edi+0E0h]
call	sub_67C000
mov	eax, [edi+0ECh]
test	eax, eax
jz	short loc_6A7426
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6A7424

loc_6A73E3:
mov	eax, [edi+0ECh]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6A741F
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6A741F
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6A741F:
inc	esi
cmp	esi, ebx
jb	short loc_6A73E3

loc_6A7424:
pop	esi
pop	ebx

loc_6A7426:
pop	edi
retn
sub_6A73B0 endp

align 10h



sub_6A7430 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	edi
mov	edi, [esp+4+arg_4]
mov	al, [edi]
and	al, 0Fh
cmp	al, 1
jnz	short loc_6A7444
mov	edx, 28h
jmp	short loc_6A746E

loc_6A7444:
test	al, al
jnz	short loc_6A744F
mov	edx, 26h
jmp	short loc_6A746E

loc_6A744F:
cmp	al, 2
jnz	short loc_6A745A
mov	edx, 27h
jmp	short loc_6A746E

loc_6A745A:
cmp	al, 3
jnz	short loc_6A7465
mov	edx, 29h
jmp	short loc_6A746E

loc_6A7465:
cmp	al, 6
jnz	short loc_6A749F
mov	edx, 2Ah

loc_6A746E:
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx+78h]
push	esi
push	0FFFFFFFFh
push	0
lea	edx, [eax+edx*4+8]
mov	eax, [eax+2A8h]
push	edx
push	eax
call	sub_671840
mov	esi, eax
test	esi, esi
jz	short loc_6A749A
push	edi
lea	ecx, [esi+34h]
call	sub_656980

loc_6A749A:
mov	eax, esi
pop	esi
pop	edi
retn

loc_6A749F:
xor	eax, eax
pop	edi
retn
sub_6A7430 endp

align 10h



sub_6A74B0 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+0D4h]
call	sub_67C1F0
lea	ecx, [edi+0E0h]
call	sub_67C1F0
mov	eax, [edi+0ECh]
test	eax, eax
jz	short loc_6A7500
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6A74FE

loc_6A74E3:
mov	eax, [edi+0ECh]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6A74F9
call	sub_64B3B0

loc_6A74F9:
inc	esi
cmp	esi, ebx
jb	short loc_6A74E3

loc_6A74FE:
pop	esi
pop	ebx

loc_6A7500:
pop	edi
retn
sub_6A74B0 endp

align 10h



sub_6A7510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
fld	ds:dword_1577A70
mov	dword ptr [esi], offset	off_1437C14
mov	dword ptr [esi+10h], offset off_1437BC0
fst	dword ptr [esi+40h]
fstp	dword ptr [esi+44h]
lea	edi, [esi+10h]
fldz
mov	dword ptr [esi+3Ch], 0
mov	dword ptr [esi+48h], 1
fst	dword ptr [esi+4Ch]
fstp	dword ptr [esi+50h]
lea	ecx, [esi+60h]
fld1
fstp	dword ptr [esi+5Ch]
call	sub_68CFB0
mov	eax, [esp+0Ch+arg_4]
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6A7510 endp

align 10h



sub_6A7580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_6A7510
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+0D0h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_1437C8C
mov	dword ptr [esi+10h], offset off_1437C38
mov	dword ptr [ecx], offset	off_1437CB0
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6A7580 endp

align 10h



sub_6A75E0 proc	near
sub	ecx, 0D0h
jmp	loc_6A7600
sub_6A75E0 endp

align 10h



sub_6A75F0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6A7600
align 10h

loc_6A7600:
push	esi
mov	esi, ecx
lea	ecx, [esi+0D0h]
mov	dword ptr [esi], offset	off_1437C8C
mov	dword ptr [esi+10h], offset off_1437C38
mov	dword ptr [ecx], offset	off_1437CB0
call	sub_665A40
mov	ecx, esi
mov	dword ptr [esi], offset	off_1437C14
mov	dword ptr [esi+10h], offset off_1437BC0
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6A764A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6A764A:
mov	eax, esi
pop	esi
retn	4
sub_6A75F0 endp




sub_6A7650 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6A7685 ; default
jmp	ds:off_6A7688[eax*4] ; switch jump

loc_6A7660:		; jumptable 006A7659 case 0
call	sub_6A74B0
retn	4

loc_6A7668:		; jumptable 006A7659 case 1
call	sub_6A73B0
retn	4

loc_6A7670:		; jumptable 006A7659 case 2
call	sub_6ECF70
retn	4

loc_6A7678:		; jumptable 006A7659 case 3
call	sub_6EB2F0
retn	4

loc_6A7680:		; jumptable 006A7659 case 4
call	sub_6EEA20

locret_6A7685:		; default
retn	4
sub_6A7650 endp

off_6A7688 dd offset loc_6A7660	; jump table for switch	statement
dd offset loc_6A7668
dd offset loc_6A7670
dd offset loc_6A7678
dd offset loc_6A7680
align 10h



sub_6A76A0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
push	edi
mov	edi, [esp+24h+arg_4]
mov	ecx, [edi+294h]
mov	[esp+24h+var_18], edi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6A76E7
push	0
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, esi
call	sub_67C3D0
mov	dword ptr [esi], offset	off_143C238
mov	dword ptr [esi+10h], offset off_1439710
jmp	short loc_6A76E9

loc_6A76E7:
xor	esi, esi

loc_6A76E9:
mov	ebp, [esp+24h+arg_0]
mov	byte ptr [ebp+8], 0
mov	[ebp+0], esi
mov	dword ptr [ebp+4], 0
mov	ecx, [edi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0F0h
call	eax
mov	esi, eax
test	esi, esi
jz	loc_6A77D9
push	1
mov	ecx, edi
call	sub_66FB00
push	ebp
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, esi
call	sub_6A7580
mov	dword ptr [esi], offset	off_1437C8C
mov	dword ptr [esi+10h], offset off_1437C38
mov	dword ptr [esi+0D0h], offset off_1437CB0
mov	edx, [esi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[esi+8], edx

loc_6A7754:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [edi+284h]
mov	[esp+2Ch+arg_4], esi
mov	[esp+2Ch+arg_0], 25h
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6A7782
call	sub_64B3B0

loc_6A7782:
mov	edx, [edi+2A8h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	ebp
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [edi+9Ch]
push	ecx
mov	ecx, [edi+2A8h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	esi, esi
jz	short loc_6A77D0
mov	ecx, esi
call	sub_64B3B0

loc_6A77D0:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
add	esp, 18h
retn

loc_6A77D9:
xor	esi, esi
jmp	loc_6A7754
sub_6A76A0 endp




sub_6A77E0 proc	near

arg_0= word ptr	 4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

cmp	dword ptr [ecx+648h], 64h
jnb	short locret_6A7863
mov	eax, [ecx+640h]
mov	dx, [esp+arg_0]
shl	eax, 4
mov	[eax+ecx+4], dx
mov	eax, [ecx+640h]
mov	dl, [esp+arg_4]
shl	eax, 4
mov	[eax+ecx+0Ch], dl
mov	eax, [ecx+640h]
mov	edx, [esp+arg_8]
shl	eax, 4
mov	[eax+ecx], edx
mov	eax, [ecx+640h]
mov	edx, [esp+arg_C]
shl	eax, 4
mov	[eax+ecx+8], edx
mov	eax, [ecx+640h]
mov	dl, [esp+arg_10]
shl	eax, 4
mov	[eax+ecx+0Dh], dl
mov	eax, 1
add	[ecx+640h], eax
cmp	dword ptr [ecx+640h], 64h
jb	short loc_6A785D
mov	dword ptr [ecx+640h], 0

loc_6A785D:
add	[ecx+648h], eax

locret_6A7863:
retn	14h
sub_6A77E0 endp

align 10h



sub_6A7870 proc	near
push	esi
mov	esi, ecx
lea	eax, [esi+0Ch]
push	640h		; size_t
push	0		; int
push	eax		; void *
mov	dword ptr [eax+640h], 0
mov	dword ptr [eax+644h], 0
mov	dword ptr [eax+648h], 0
call	_memset
xor	eax, eax
mov	[esi+659h], eax
mov	[esi+65Dh], eax
mov	[esi+661h], eax
mov	[esi+665h], eax
mov	[esi+669h], eax
mov	[esi+66Dh], eax
mov	[esi+671h], eax
mov	[esi+675h], al
mov	[esi+676h], ax
add	esp, 0Ch
mov	[esi+678h], al
pop	esi
retn
sub_6A7870 endp

align 10h



sub_6A78F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
cmp	ecx, 0E4h
ja	short loc_6A791F
mov	eax, ecx
sar	eax, 3
lea	edx, ds:0[eax*8]
sub	ecx, edx
mov	dl, 1
shl	dl, cl
test	[eax+esi+659h],	dl
pop	esi
setnz	al
retn	4

loc_6A791F:
xor	al, al
pop	esi
retn	4
sub_6A78F0 endp

align 10h



sub_6A7930 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	eax, 14h
jz	short loc_6A795A
sub	eax, 7Ch
jz	short loc_6A7951
sub	eax, 1
jz	short loc_6A7948
xor	al, al
retn	4

loc_6A7948:
mov	al, [ecx+678h]
retn	4

loc_6A7951:
mov	al, [ecx+676h]
retn	4

loc_6A795A:
mov	al, [ecx+677h]
retn	4
sub_6A7930 endp

align 10h



sub_6A7970 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [esp+arg_0]
sub	eax, 14h
jz	short loc_6A799D
sub	eax, 7Ch
jz	short loc_6A7990
sub	eax, 1
jnz	short locret_6A79A7
mov	al, [esp+arg_4]
mov	[ecx+678h], al
retn	8

loc_6A7990:
mov	dl, [esp+arg_4]
mov	[ecx+676h], dl
retn	8

loc_6A799D:
mov	al, [esp+arg_4]
mov	[ecx+677h], al

locret_6A79A7:
retn	8
sub_6A7970 endp

align 10h



sub_6A79B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, 0E4h
ja	short loc_6A79F2
mov	eax, edi
sar	eax, 3
lea	edx, ds:0[eax*8]
mov	ecx, edi
sub	ecx, edx
mov	dl, 1
shl	dl, cl
mov	ecx, [esp+8+arg_4]
or	[eax+esi+659h],	dl
mov	eax, [esp+8+arg_8]
push	eax
push	5
push	0
push	ecx
push	edi
lea	ecx, [esi+0Ch]
call	sub_6A77E0

loc_6A79F2:
pop	edi
pop	esi
retn	0Ch
sub_6A79B0 endp

align 10h



sub_6A7A00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, 0E4h
ja	short loc_6A7A44
mov	eax, edi
sar	eax, 3
lea	edx, ds:0[eax*8]
mov	ecx, edi
sub	ecx, edx
mov	dl, 1
shl	dl, cl
mov	ecx, [esp+8+arg_4]
not	dl
and	[eax+esi+659h],	dl
mov	eax, [esp+8+arg_8]
push	eax
push	6
push	0
push	ecx
push	edi
lea	ecx, [esi+0Ch]
call	sub_6A77E0

loc_6A7A44:
pop	edi
pop	esi
retn	0Ch
sub_6A7A00 endp

align 10h



sub_6A7A50 proc	near

arg_4= dword ptr  8
arg_10=	dword ptr  14h

mov	eax, ecx
cmp	dword ptr [eax+8], 0
jz	short locret_6A7AA2
mov	ecx, [esp+arg_10]
cmp	ecx, 5
jnz	short loc_6A7A7F
mov	ecx, [eax+8]
movzx	eax, byte ptr [eax+658h]
mov	edx, [ecx]
mov	edx, [edx+4]
mov	[esp+arg_10], eax
movsx	eax, word ptr [esp+arg_4]
mov	[esp+arg_4], eax
jmp	edx

loc_6A7A7F:
cmp	ecx, 6
jnz	short locret_6A7AA2
mov	ecx, [eax+8]
movzx	eax, byte ptr [eax+658h]
mov	edx, [ecx]
mov	edx, [edx+8]
mov	[esp+arg_10], eax
movsx	eax, word ptr [esp+arg_4]
mov	[esp+arg_4], eax
jmp	edx

locret_6A7AA2:
retn	14h
sub_6A7A50 endp

align 10h



sub_6A7AB0 proc	near

arg_0= word ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

cmp	dword ptr [ecx+8], 0
jz	short locret_6A7ADA
mov	eax, [ecx+8]
movzx	ecx, byte ptr [ecx+658h]
mov	edx, [eax]
mov	edx, [edx+0Ch]
push	ecx
mov	ecx, [esp+4+arg_8]
push	ecx
mov	ecx, [esp+8+arg_4]
push	ecx
movsx	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, eax
call	edx

locret_6A7ADA:
retn	0Ch
sub_6A7AB0 endp

align 10h



sub_6A7AE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+8], eax
retn	4
sub_6A7AE0 endp

align 10h



; int __fastcall sub_6A7AF0(void *)
sub_6A7AF0 proc	near
push	esi
mov	esi, ecx
mov	ecx, 63h
lea	eax, [esi+0Dh]
xor	edx, edx
lea	ecx, [ecx+0]

loc_6A7B00:
mov	[eax], dl
add	eax, 10h
sub	ecx, 1
jns	short loc_6A7B00
push	640h		; size_t
push	edx		; int
push	esi		; void *
mov	[esi+640h], edx
mov	[esi+644h], edx
mov	[esi+648h], edx
call	_memset
add	esp, 0Ch
mov	eax, esi
pop	esi
retn
sub_6A7AF0 endp

align 10h



sub_6A7B30 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
lea	ecx, [esi+0Ch]	; void *
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437CB4
call	sub_6A7AF0
xor	eax, eax
mov	[esi+8], eax
mov	[esi+658h], al
mov	[esi+659h], eax
mov	[esi+65Dh], eax
mov	[esi+661h], eax
mov	[esi+665h], eax
mov	[esi+669h], eax
mov	[esi+66Dh], eax
mov	[esi+671h], eax
mov	[esi+675h], al
mov	[esi+676h], ax
mov	[esi+678h], al
mov	eax, esi
pop	esi
retn
sub_6A7B30 endp

align 10h



sub_6A7BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
push	1
mov	ecx, edi
call	sub_654BF0
mov	ecx, [edi+20h]
test	al, al
jz	short loc_6A7BD3
mov	ebx, [esp+0Ch+arg_8]
push	ebx
call	sub_654C80
pop	edi
mov	[esi+8], ebx
mov	dword ptr [esi+4], offset flt_167D000
pop	esi
pop	ebx
retn	0Ch

loc_6A7BD3:
mov	ebx, [esp+0Ch+arg_4]
push	ebx
call	sub_654AF0
pop	edi
mov	[esi+4], ebx
mov	dword ptr [esi+8], 0
pop	esi
pop	ebx
retn	0Ch
sub_6A7BA0 endp

align 10h



; int __stdcall	sub_6A7BF0(float, float)
sub_6A7BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_0]
fld	st
fmul	dword ptr [ecx+4]
fstp	[esp+arg_0]
fld1
fld	[esp+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6A7C14
fstp	st
fst	[esp+arg_0]
jmp	short loc_6A7C18

loc_6A7C14:
fstp	[esp+arg_0]

loc_6A7C18:
fld	[esp+arg_0]
fstp	dword ptr [ecx+4]
fld	[esp+arg_4]
fld	st
fmul	dword ptr [ecx+8]
fstp	[esp+arg_0]
fld	[esp+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_6A7C3D
fstp	st
jmp	short loc_6A7C3F

loc_6A7C3D:
fstp	st(2)

loc_6A7C3F:
fxch	st(1)
mov	eax, ecx
fstp	[esp+arg_0]
fld	[esp+arg_0]
fstp	dword ptr [ecx+8]
fld	dword ptr [ecx+10h]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [ecx+10h]
fmul	dword ptr [ecx+14h]
fstp	dword ptr [ecx+14h]
retn	8
sub_6A7BF0 endp

align 10h



; int __stdcall	sub_6A7C70(int,	int, int, float, int)
sub_6A7C70 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
push	ebx
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+24h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+10h]
xor	ebx, ebx
push	6
push	offset unk_1437CB8
lea	edx, [esp+2Ch+var_18]
push	edx
mov	[esp+30h+var_18], ebx
mov	[esp+30h+var_14], ebx
mov	[esp+30h+var_10], ebx
mov	[esp+30h+var_C], ebx
mov	[esp+30h+var_8], ebx
mov	[esp+30h+var_4], ebx
call	eax
mov	ecx, [esi+48h]
mov	edi, [esp+24h+var_18]
cmp	ecx, ebx
jz	short loc_6A7CB9
call	sub_64A430

loc_6A7CB9:
mov	[esi+48h], edi
mov	ecx, [esi+58h]
mov	edi, [esp+24h+var_14]
cmp	ecx, ebx
jz	short loc_6A7CCC
call	sub_64A430

loc_6A7CCC:
mov	[esi+58h], edi
mov	ecx, [esi+5Ch]
mov	edi, [esp+24h+var_10]
cmp	ecx, ebx
jz	short loc_6A7CDF
call	sub_64A430

loc_6A7CDF:
mov	[esi+5Ch], edi
mov	ecx, [esi+60h]
mov	edi, [esp+24h+var_C]
cmp	ecx, ebx
jz	short loc_6A7CF2
call	sub_64A430

loc_6A7CF2:
mov	[esi+60h], edi
mov	ecx, [esi+64h]
mov	edi, [esp+24h+var_8]
cmp	ecx, ebx
jz	short loc_6A7D05
call	sub_64A430

loc_6A7D05:
mov	[esi+64h], edi
mov	ecx, [esi+68h]
mov	edi, [esp+24h+var_4]
cmp	ecx, ebx
jz	short loc_6A7D18
call	sub_64A430

loc_6A7D18:
mov	[esi+68h], edi
mov	edi, [esp+24h+arg_4]
cmp	edi, ebx
jz	short loc_6A7D2A
mov	ecx, edi
call	sub_64A420

loc_6A7D2A:
mov	ecx, [esi+6Ch]
cmp	ecx, ebx
jz	short loc_6A7D36
call	sub_64A430

loc_6A7D36:
mov	eax, [esp+24h+arg_10]
fld	[esp+24h+arg_C]
mov	ecx, [esp+24h+arg_8]
mov	[esi+6Ch], edi
fstp	dword ptr [esi+74h]
mov	[esi+4Ch], ebx
mov	[esi+94h], ebx
mov	[esi+9Ch], ebx
mov	[esi+98h], ebx
mov	[esi+20h], ebx
mov	[esi+54h], ebx
mov	[esi+70h], ecx
fld	dword ptr [eax]
fstp	dword ptr [esi+78h]
pop	edi
fld	dword ptr [eax+4]
fstp	dword ptr [esi+7Ch]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+80h]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esi+84h]
fld	dword ptr [eax+10h]
fstp	dword ptr [esi+88h]
fld	dword ptr [eax+14h]
fstp	dword ptr [esi+8Ch]
mov	[esi+50h], ebx
mov	[esi+8], ebx
mov	[esi+14h], bl
mov	[esi+10h], ebx
mov	[esi+0Ch], ebx
mov	dword ptr [esi+4], offset flt_167D000
mov	dword ptr [esi], offset	unk_167D764
pop	esi
pop	ebx
add	esp, 18h
retn	14h
sub_6A7C70 endp

align 10h



sub_6A7DC0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+48h]
push	edi
mov	edi, [eax+0Ch]
mov	edx, [edi]
mov	edx, [edx+0A0h]
xor	eax, eax
cmp	[esi+9Ch], eax
mov	ecx, edi
setnz	al
push	eax
call	edx
mov	eax, [esi+9Ch]
mov	ebx, [esp+10h+arg_0]
cmp	eax, 40h
jnb	short loc_6A7DFA
mov	[esi+eax*4+0A0h], ebx

loc_6A7DFA:
mov	eax, 1
add	[esi+9Ch], eax
add	[esi+98h], eax
add	[esi+94h], eax
mov	eax, [ebx]
mov	edx, [eax+14h]
mov	ebp, [edi]
mov	ecx, ebx
call	edx
push	eax
mov	eax, [ebp+44h]
mov	ecx, edi
call	eax
mov	edx, [ebx]
mov	eax, [edx+74h]
push	esi
mov	ecx, ebx
call	eax
mov	edx, [edi]
mov	eax, [edx+48h]
mov	ecx, edi
call	eax
dec	dword ptr [esi+94h]
mov	edx, [edi]
mov	eax, [edx+0A4h]
mov	ecx, edi
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6A7DC0 endp




sub_6A7E50 proc	near
push	esi
mov	esi, ecx
add	dword ptr [esi+9Ch], 0FFFFFFFFh
jnz	short loc_6A7E76
mov	eax, [esi+48h]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
mov	dword ptr [esi+98h], 0

loc_6A7E76:
pop	esi
retn
sub_6A7E50 endp

align 10h



sub_6A7E80 proc	near

var_C0=	byte ptr -0C0h
var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
mov	eax, [eax+4]
fld	dword ptr [eax]
sub	esp, 0C0h
push	ebx
push	ebp
mov	ebp, [esp+0C8h+arg_4]
push	esi
mov	esi, [esp+0CCh+arg_8]
fstp	dword ptr [esi]
mov	ebx, ecx
fld	dword ptr [eax+4]
push	edi
fstp	dword ptr [esi+4]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+8]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [eax+10h]
fstp	dword ptr [esi+10h]
fld	dword ptr [eax+14h]
fstp	dword ptr [esi+14h]
cmp	byte ptr [ebx+14h], 0
mov	[ebx+50h], ebp
jnz	short loc_6A7EDA
lea	ecx, [ebp+44h]
push	ecx
mov	ecx, esi
call	sub_64EAF0
mov	[ebx+4], esi

loc_6A7EDA:
mov	eax, [esp+0D0h+arg_10]
mov	esi, [ebx]
mov	edi, eax
mov	ecx, 8
lea	edx, [ebp+24h]
rep movsd
push	edx
mov	ecx, eax
call	sub_68CE70
cmp	byte ptr [ebx+14h], 0
mov	eax, [esp+0D0h+arg_10]
mov	[ebx], eax
jnz	short loc_6A7F17
push	0
mov	ecx, ebp
call	sub_654BF0
test	al, al
jz	loc_6A8094

loc_6A7F17:
mov	ecx, [esp+0D0h+arg_0]
mov	esi, [ecx+8]
test	esi, esi
jnz	short loc_6A7F2A
mov	esi, offset unk_167D018

loc_6A7F2A:
mov	edi, [esp+0D0h+arg_C]
mov	ecx, 10h
rep movsd
mov	eax, [ebp+5Ch]
test	eax, eax
jnz	short loc_6A7F44
mov	eax, offset unk_167D018

loc_6A7F44:
mov	esi, eax
mov	ecx, 10h
lea	edi, [esp+0D0h+var_80]
rep movsd
push	0
mov	ecx, ebp
call	sub_654BF0
test	al, al
jz	short loc_6A7F98
cmp	byte ptr [ebx+14h], 0
jnz	short loc_6A7F98
mov	edx, [ebx+4]
push	edx
lea	ecx, [esp+0D4h+var_40]
call	sub_64F570
push	eax
mov	ecx, 10h
lea	esi, [esp+0D4h+var_80]
lea	edi, [esp+0D4h+var_C0]
lea	eax, [esp+0D4h+var_C0]
rep movsd
push	eax
lea	ecx, [esp+0D8h+var_80]
call	sub_64F7E0
mov	byte ptr [ebx+14h], 1
jmp	short loc_6A7FCC

loc_6A7F98:
cmp	byte ptr [ebx+14h], 1
jnz	short loc_6A7FCC
lea	ecx, [ebp+44h]
push	ecx
lea	ecx, [esp+0D4h+var_40]
call	sub_64F570
mov	ecx, 10h
lea	esi, [esp+0D0h+var_80]
lea	edi, [esp+0D0h+var_C0]
push	eax
lea	edx, [esp+0D4h+var_C0]
rep movsd
push	edx
lea	ecx, [esp+0D8h+var_80]
call	sub_64F7E0

loc_6A7FCC:
cmp	byte ptr [ebx+14h], 0
jz	loc_6A8094
mov	eax, [esp+0D0h+arg_C]
mov	esi, eax
mov	ecx, 10h
lea	edi, [esp+0D0h+var_C0]
rep movsd
lea	ecx, [esp+0D0h+var_C0]
push	ecx
lea	edx, [esp+0D4h+var_80]
push	edx
mov	ecx, eax
call	sub_64F7E0
mov	eax, [esp+0D0h+arg_C]
mov	ecx, [ebx+48h]
mov	[ebx+8], eax
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+5Ch]
call	eax
push	0
mov	ecx, ebp
mov	dword ptr [ebx+4], offset flt_167D000
call	sub_654D50
test	eax, eax
jz	short loc_6A8032
push	0
mov	ecx, ebp
call	sub_654D50
jmp	short loc_6A803C

loc_6A8032:
mov	ecx, [esp+0D0h+arg_0]
mov	eax, [ecx+10h]

loc_6A803C:
push	0
mov	ecx, ebp
mov	[ebx+10h], eax
call	sub_654D00
test	eax, eax
jz	short loc_6A8057
push	0
mov	ecx, ebp
call	sub_654D00
jmp	short loc_6A8061

loc_6A8057:
mov	edx, [esp+0D0h+arg_0]
mov	eax, [edx+0Ch]

loc_6A8061:
cmp	dword ptr [ebx+54h], 0
mov	[ebx+0Ch], eax
jnz	short loc_6A8094
mov	eax, [ebx+10h]
test	eax, eax
jz	short loc_6A807F
mov	ecx, [ebx+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+58h]
call	eax

loc_6A807F:
mov	eax, [ebx+0Ch]
test	eax, eax
jz	short loc_6A8094
mov	ecx, [ebx+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+54h]
call	eax

loc_6A8094:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0C0h
retn	14h
sub_6A7E80 endp

align 10h



sub_6A80B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+14h], 0
push	edi
mov	edi, [esp+8+arg_0]
jz	short loc_6A80CF
mov	eax, [esi+48h]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edi+8]
mov	edx, [edx+5Ch]
push	eax
call	edx

loc_6A80CF:
cmp	dword ptr [esi+54h], 0
jnz	short loc_6A80FF
mov	eax, [edi+10h]
test	eax, eax
jz	short loc_6A80EA
mov	ecx, [esi+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+58h]
call	eax

loc_6A80EA:
mov	eax, [edi+0Ch]
test	eax, eax
jz	short loc_6A80FF
mov	ecx, [esi+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+54h]
call	eax

loc_6A80FF:
mov	ecx, [edi]
mov	[esi], ecx
mov	edx, [edi+4]
mov	[esi+4], edx
mov	eax, [edi+8]
mov	[esi+8], eax
mov	ecx, [edi+0Ch]
mov	[esi+0Ch], ecx
mov	edx, [edi+10h]
mov	[esi+10h], edx
mov	al, [edi+14h]
pop	edi
mov	[esi+14h], al
pop	esi
retn	4
sub_6A80B0 endp

align 10h



sub_6A8130 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 10h
movsx	eax, word ptr [ecx+2]
mov	[esp+10h+var_10], eax
movsx	ecx, word ptr [ecx+4]
fild	[esp+10h+var_10]
mov	[esp+10h+var_C], ecx
push	esi
fmul	ds:dbl_15FCC90
fdiv	ds:dbl_1437CD0
fstp	[esp+14h+var_10]
fild	[esp+14h+var_C]
fstp	[esp+14h+var_8]
fld	[esp+14h+var_10]
call	__CIcos
fstp	[esp+14h+var_C]
fld	[esp+14h+var_C]
mov	esi, [esp+14h+arg_0]
fmul	[esp+14h+var_8]
fmul	ds:dbl_15FD250
fstp	dword ptr [esi]
fld	[esp+14h+var_10]
call	__CIsin
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
mov	eax, esi
fmul	[esp+14h+var_8]
fmul	ds:dbl_15FD250
fstp	dword ptr [esi+4]
pop	esi
add	esp, 10h
retn	4
sub_6A8130 endp

align 10h



sub_6A81B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
mov	al, [edi]
mov	esi, ecx
mov	[esi], al
mov	ecx, [edi+8]
mov	[esi+8], ecx
mov	eax, [edi+2Ch]
test	eax, eax
jz	short loc_6A81DC
push	1		; Value
add	eax, 4
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd

loc_6A81DC:
mov	ebx, [esi+2Ch]
test	ebx, ebx
jz	short loc_6A81FE
push	0FFFFFFFFh	; Value
lea	edx, [ebx+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A81FE
test	ebx, ebx
jz	short loc_6A81FE
mov	eax, [ebx]
mov	edx, [eax]
push	1
mov	ecx, ebx
call	edx

loc_6A81FE:
mov	eax, [edi+2Ch]
mov	[esi+2Ch], eax
mov	ecx, [edi+1Ch]
mov	[esi+1Ch], ecx
mov	edx, [edi+20h]
mov	[esi+20h], edx
fld	dword ptr [edi+10h]
fstp	[esp+18h+arg_0]
fld	dword ptr [edi+14h]
fstp	[esp+18h+var_8]
fld	dword ptr [edi+18h]
fstp	[esp+18h+var_4]
fld	dword ptr [edi+0Ch]
fstp	dword ptr [esi+0Ch]
fld	[esp+18h+arg_0]
fstp	dword ptr [esi+10h]
fld	[esp+18h+var_8]
fstp	dword ptr [esi+14h]
fld	[esp+18h+var_4]
fstp	dword ptr [esi+18h]
fld	dword ptr [edi+24h]
fstp	dword ptr [esi+24h]
fld	dword ptr [edi+28h]
pop	edi
fstp	dword ptr [esi+28h]
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_6A81B0 endp

align 10h



; int __stdcall	sub_6A8260(int,	int, int, float, int, int, char)
sub_6A8260 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	byte ptr  1Ch

fldz
xor	eax, eax
push	esi
mov	esi, ecx
mov	cl, [esp+4+arg_18]
mov	dword ptr [esi+4], offset flt_167D000
mov	dword ptr [esi], offset	unk_167D764
mov	[esi+8], eax
mov	[esi+14h], al
mov	[esi+10h], eax
mov	[esi+0Ch], eax
mov	[esi+18h], cl
fst	dword ptr [esi+24h]
mov	[esi+44h], eax
fst	dword ptr [esi+28h]
fst	dword ptr [esi+2Ch]
lea	ecx, [esi+78h]
fstp	dword ptr [esi+30h]
mov	[esi+20h], eax
mov	[esi+1Ch], eax
mov	[esi+48h], eax
mov	[esi+58h], eax
mov	[esi+5Ch], eax
mov	[esi+60h], eax
mov	[esi+64h], eax
mov	[esi+68h], eax
mov	[esi+6Ch], eax
call	sub_64E8E0
fld	[esp+4+arg_C]
mov	eax, [esp+4+arg_10]
mov	edx, [esp+4+arg_14]
push	eax		; int
mov	eax, [esp+8+arg_0]
push	ecx		; float
mov	ecx, [esp+0Ch+arg_8]
fstp	[esp+0Ch+var_C]
push	ecx		; int
mov	[esi+90h], edx
mov	edx, [esp+10h+arg_4]
push	edx		; int
push	eax		; int
mov	ecx, esi
call	sub_6A7C70
mov	eax, esi
pop	esi
retn	1Ch
sub_6A8260 endp

align 10h



sub_6A82F0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+6Ch]
test	ecx, ecx
jz	short loc_6A82FF
call	sub_64A430

loc_6A82FF:
mov	ecx, [esi+68h]
test	ecx, ecx
jz	short loc_6A830B
call	sub_64A430

loc_6A830B:
mov	ecx, [esi+64h]
test	ecx, ecx
jz	short loc_6A8317
call	sub_64A430

loc_6A8317:
mov	ecx, [esi+60h]
test	ecx, ecx
jz	short loc_6A8323
call	sub_64A430

loc_6A8323:
mov	ecx, [esi+5Ch]
test	ecx, ecx
jz	short loc_6A832F
call	sub_64A430

loc_6A832F:
mov	ecx, [esi+58h]
test	ecx, ecx
jz	short loc_6A833B
call	sub_64A430

loc_6A833B:
mov	ecx, [esi+48h]
test	ecx, ecx
jz	short loc_6A8347
call	sub_64A430

loc_6A8347:
mov	esi, [esi+44h]
test	esi, esi
jz	short loc_6A836D
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A836D
test	esi, esi
jz	short loc_6A836D
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_6A836D:
pop	esi
retn
sub_6A82F0 endp

align 10h


; Attributes: bp-based frame

sub_6A8370 proc	near

var_88=	qword ptr -88h
var_3E=	word ptr -3Eh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
mov	eax, [ebp+arg_8]
mov	eax, [eax+4]
sub	esp, 74h
push	ebx
push	esi
push	edi
mov	edi, ecx
xor	ecx, ecx
cmp	eax, ecx
jz	loc_6A87DC
fldz
mov	byte ptr [esp+80h+var_3E], cl
fst	[esp+80h+var_3C]
mov	dword ptr [esp+80h+var_28+4], ecx
fstp	[esp+80h+var_38]
jbe	loc_6A87DC
mov	[esp+80h+var_34], ecx
lea	ebx, [ebx+0]

loc_6A83B0:
mov	ecx, [ebp+arg_8]
fld1
mov	esi, [ecx]
add	esi, [esp+80h+var_34]
fcom	dword ptr [esi+0Ch]
fnstsw	ax
test	ah, 5
jnp	short loc_6A83CF
fcom	dword ptr [esi+10h]
fnstsw	ax
test	ah, 5
jp	short loc_6A83DB

loc_6A83CF:
mov	dl, [esi]
and	dl, 0Fh
cmp	dl, 1
jnz	short loc_6A83DB
jmp	short loc_6A83DD

loc_6A83DB:
xor	dl, dl

loc_6A83DD:
mov	al, [esi+23h]
test	al, al
jbe	short loc_6A83ED
test	byte ptr [esi],	0Fh
jnz	short loc_6A83ED
mov	bl, 1
jmp	short loc_6A83EF

loc_6A83ED:
xor	bl, bl

loc_6A83EF:
test	al, al
jbe	short loc_6A8401
mov	cl, [esi]
and	cl, 0Fh
cmp	cl, 2
jnz	short loc_6A8401
mov	cl, 1
jmp	short loc_6A8403

loc_6A8401:
xor	cl, cl

loc_6A8403:
test	al, al
jbe	short loc_6A8413
mov	al, [esi]
and	al, 0Fh
cmp	al, 3
jnz	short loc_6A8413
mov	al, 1
jmp	short loc_6A8415

loc_6A8413:
xor	al, al

loc_6A8415:
test	dl, dl
jz	short loc_6A8495
mov	ecx, [esi+14h]
fstp	st
fild	dword ptr [esi+14h]
lea	ebx, [esi+14h]
mov	byte ptr [esp+80h+var_3E], 1
test	ecx, ecx
jge	short loc_6A8433
fadd	ds:flt_15FCC08

loc_6A8433:
fmul	dword ptr [esi+0Ch]
sub	esp, 8
fstp	dword ptr [esp+88h+var_30]
fld	dword ptr [esp+88h+var_30]
fstp	[esp+88h+var_88]
call	_ceil
mov	edx, [ebx]
fstp	dword ptr [esp+88h+var_30]
fld	dword ptr [esp+88h+var_30]
fmul	ds:dbl_15FCE20
fadd	[esp+88h+var_3C]
fstp	[esp+88h+var_3C]
fld	dword ptr [esi+10h]
fild	dword ptr [ebx]
test	edx, edx
jge	short loc_6A8470
fadd	ds:flt_15FCC08

loc_6A8470:
fmulp	st(1), st
fstp	dword ptr [esp+88h+var_30]
fld	dword ptr [esp+88h+var_30]
fstp	[esp+88h+var_88]
call	_ceil
fstp	dword ptr [esp+88h+var_30]
fld	dword ptr [esp+88h+var_30]
fmul	ds:dbl_15FCE20
jmp	loc_6A85C1

loc_6A8495:
test	bl, bl
jnz	short loc_6A84B9
test	cl, cl
jnz	short loc_6A84B9
test	al, al
jnz	short loc_6A84B9
mov	al, [esi]
fstp	st
and	al, 0Fh
cmp	al, 6
jnz	loc_6A85CC
mov	byte ptr [esp+80h+var_3E], 1
jmp	loc_6A85CC

loc_6A84B9:
mov	byte ptr [esp+80h+var_3E], 1
test	al, al
jz	short loc_6A84CA
fstp	st
fld	ds:flt_1437CD8

loc_6A84CA:
mov	ecx, [esi+14h]
fstp	dword ptr [esp+80h+var_30]
fild	dword ptr [esi+14h]
test	ecx, ecx
jge	short loc_6A84DE
fadd	ds:flt_15FCC08

loc_6A84DE:
fmul	dword ptr [esi+0Ch]
sub	esp, 8
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_30]
fmul	ds:dbl_15FCE20
fstp	[esp+88h+var_30]
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
mov	edx, [esi+14h]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fmul	[esp+88h+var_30]
fadd	[esp+88h+var_3C]
fstp	[esp+88h+var_3C]
fld	dword ptr [esi+10h]
fild	dword ptr [esi+14h]
test	edx, edx
jge	short loc_6A8529
fadd	ds:flt_15FCC08

loc_6A8529:
fmulp	st(1), st
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
fstp	dword ptr [esp+88h+var_20]
add	esp, 8
fld	dword ptr [esp+80h+var_20]
fmul	[esp+80h+var_30]
fadd	[esp+80h+var_38]
fstp	[esp+80h+var_38]
test	bl, bl
jz	short loc_6A85CC
lea	eax, [esp+80h+var_18]
push	eax
mov	ecx, esi
call	sub_6A8130
fld	[esp+80h+var_18]
fabs
sub	esp, 8
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fmul	[esp+88h+var_30]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fadd	[esp+88h+var_3C]
fstp	[esp+88h+var_3C]
fld	[esp+88h+var_14]
fabs
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fmul	[esp+88h+var_30]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]

loc_6A85C1:
fadd	[esp+88h+var_38]
add	esp, 8
fstp	[esp+80h+var_38]

loc_6A85CC:
mov	eax, dword ptr [esp+80h+var_28+4]
mov	ecx, [ebp+arg_8]
add	[esp+80h+var_34], 9Ch
inc	eax
mov	dword ptr [esp+80h+var_28+4], eax
cmp	eax, [ecx+4]
jb	loc_6A83B0
cmp	byte ptr [esp+80h+var_3E], 0
jz	loc_6A87DC
test	edi, edi
jz	short loc_6A85FD
lea	eax, [edi+18h]
jmp	short loc_6A85FF

loc_6A85FD:
xor	eax, eax

loc_6A85FF:
mov	ecx, [ebp+arg_0]
push	eax
call	sub_6A81B0
lea	esi, [edi+78h]
mov	ecx, esi
call	sub_64EAA0
fstp	dword ptr [edi+3Ch]
mov	ecx, esi
call	sub_64EAC0
fstp	dword ptr [edi+40h]
mov	eax, [edi+4]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	edx, [edx+34h]
push	eax
lea	eax, [esp+84h+var_10]
push	eax
call	edx
fld	dword ptr [eax+4]
fstp	dword ptr [esp+80h+var_20]
lea	esi, [edi+24h]
fld	dword ptr [eax+8]
sub	esp, 8
fstp	dword ptr [esp+88h+var_28+4]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esp+88h+var_30]
fld	dword ptr [eax]
fstp	dword ptr [esi]
fld	dword ptr [esp+88h+var_20]
fstp	dword ptr [esi+4]
fld	dword ptr [esp+88h+var_28+4]
fstp	dword ptr [esi+8]
fld	dword ptr [esp+88h+var_30]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi]
fld	[esp+88h+var_3C]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fadd	dword ptr [esi+8]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+4]
fld	[esp+88h+var_38]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fadd	dword ptr [esi+0Ch]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi+8]
fsub	dword ptr [esi]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fmul	dword ptr [edi+3Ch]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fnstcw	[esp+88h+var_3E]
movzx	eax, [esp+88h+var_3E]
or	eax, 0C00h
mov	dword ptr [esp+88h+var_20], eax
fldcw	word ptr [esp+88h+var_20]
fistp	[esp+88h+var_20]
mov	eax, dword ptr [esp+88h+var_20]
mov	[edi+34h], eax
fldcw	[esp+88h+var_3E]
fld	dword ptr [esi+0Ch]
fsub	dword ptr [esi+4]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fmul	dword ptr [edi+40h]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
fstp	dword ptr [esp+88h+var_20]
add	esp, 8
fld	dword ptr [esp+80h+var_20]
push	1
fnstcw	[esp+84h+var_3E]
movzx	eax, [esp+84h+var_3E]
or	eax, 0C00h
mov	dword ptr [esp+84h+var_20], eax
fldcw	word ptr [esp+84h+var_20]
fistp	[esp+84h+var_20]
mov	eax, dword ptr [esp+84h+var_20]
mov	ecx, [edi+48h]
mov	[edi+38h], eax
mov	ecx, [ecx+0Ch]
fldcw	[esp+84h+var_3E]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
mov	eax, [edi+34h]
push	eax
push	esi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6A8755
push	1		; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd

loc_6A8755:
mov	ebx, [edi+44h]
test	ebx, ebx
jz	short loc_6A877B
push	0FFFFFFFFh	; Value
lea	ecx, [ebx+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A877B
test	ebx, ebx
jz	short loc_6A877B
mov	edx, [ebx]
mov	eax, [edx]
push	1
mov	ecx, ebx
call	eax

loc_6A877B:
mov	[edi+44h], esi
test	esi, esi
jz	short loc_6A87D0
cmp	byte ptr [edi+14h], 0
mov	ecx, [edi]
mov	[edi+20h], ecx
mov	dword ptr [edi], offset	unk_167D764
jz	short loc_6A87B3
mov	edx, [edi+8]
mov	eax, [edi+48h]
mov	[edi+54h], edx
mov	dword ptr [edi+8], offset unk_167D018
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+5Ch]
push	0
call	eax
mov	byte ptr [edi+14h], 0

loc_6A87B3:
mov	ecx, [edi+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+44h]
push	0Dh
call	eax
inc	dword ptr [edi+1Ch]
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6A87D0:
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [edi+18h]
call	sub_6A81B0

loc_6A87DC:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6A8370 endp

align 10h



sub_6A87F0 proc	near

var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 0E4h
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+48h]
mov	ecx, [esp+0ECh+arg_8]
mov	ebx, [ecx+4]
push	esi
push	edi
mov	edi, [eax+0Ch]
mov	eax, [ebp+54h]
lea	esi, [ebx-1]
mov	[esp+0F4h+var_D0], edi
mov	[esp+0F4h+var_CC], ebx
mov	[esp+0F4h+var_D8], esi
test	eax, eax
jz	short loc_6A882C
mov	edx, [edi]
push	eax
mov	eax, [edx+5Ch]
mov	ecx, edi
call	eax

loc_6A882C:
cmp	[esp+0F4h+arg_C], 0
jnz	short loc_6A883F
mov	edx, [edi]
mov	eax, [edx+24h]
mov	ecx, edi
call	eax

loc_6A883F:
cmp	byte ptr [ebp+18h], 0
jz	short loc_6A884F
inc	[esp+0F4h+var_D8]
mov	[esp+0F4h+var_CC], esi
mov	ebx, esi

loc_6A884F:
xor	eax, eax
mov	[esp+0F4h+var_DC], eax
cmp	ebx, eax
jbe	loc_6A8DB2
mov	[esp+0F4h+var_C8], eax

loc_6A8861:
mov	ecx, [esp+0F4h+arg_8]
fld1
mov	esi, [ecx]
add	esi, [esp+0F4h+var_C8]
fcom	dword ptr [esi+0Ch]
fnstsw	ax
test	ah, 5
jnp	short loc_6A88AE
fcomp	dword ptr [esi+10h]
fnstsw	ax
test	ah, 5
jnp	short loc_6A88B0

loc_6A8884:
xor	dl, dl

loc_6A8886:
mov	al, [esi+23h]
test	al, al
jbe	short loc_6A8897
test	byte ptr [esi],	0Fh
mov	byte ptr [esp+0F4h+var_E4+3], 1
jz	short loc_6A889C

loc_6A8897:
mov	byte ptr [esp+0F4h+var_E4+3], 0

loc_6A889C:
test	al, al
jbe	short loc_6A88BC
mov	cl, [esi]
and	cl, 0Fh
cmp	cl, 3
jnz	short loc_6A88BC
mov	bl, 1
jmp	short loc_6A88BE

loc_6A88AE:
fstp	st

loc_6A88B0:
mov	dl, [esi]
and	dl, 0Fh
cmp	dl, 1
jnz	short loc_6A8884
jmp	short loc_6A8886

loc_6A88BC:
xor	bl, bl

loc_6A88BE:
test	al, al
jbe	short loc_6A88CE
mov	al, [esi]
and	al, 0Fh
cmp	al, 2
jnz	short loc_6A88CE
mov	cl, 1
jmp	short loc_6A88D0

loc_6A88CE:
xor	cl, cl

loc_6A88D0:
mov	al, [esi]
and	al, 0Fh
cmp	al, 6
setz	al
mov	byte ptr [esp+0F4h+var_D4+3], al
test	dl, dl
jnz	short loc_6A88F7
cmp	byte ptr [esp+0F4h+var_E4+3], dl
jnz	short loc_6A88F7
test	cl, cl
jnz	short loc_6A88F7
test	al, al
jnz	short loc_6A88F7
test	bl, bl
jz	loc_6A8D97

loc_6A88F7:
mov	edx, [edi]
mov	eax, [edx+38h]
push	offset flt_167D000
mov	ecx, edi
call	eax
mov	ecx, [esp+0F4h+var_DC]
xor	ebx, ebx
cmp	ecx, [esp+0F4h+var_D8]
jz	short loc_6A8950
mov	eax, [ebp+38h]
mov	ecx, [ebp+34h]
mov	edx, [edi]
mov	edx, [edx+28h]
push	ebx
push	eax
push	ecx
lea	eax, [ebp+24h]
push	eax
mov	ecx, edi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6A8939
push	1		; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd

loc_6A8939:
mov	ebx, edi
test	edi, edi
mov	edi, [esp+0F4h+var_D0]
jnz	short loc_6A8963
mov	eax, [esp+0F4h+var_DC]
mov	[esp+0F4h+var_D8], eax
inc	eax
mov	[esp+0F4h+var_CC], eax

loc_6A8950:
cmp	[esp+0F4h+arg_C], 0
jnz	short loc_6A8963
mov	edx, [edi]
mov	eax, [edx+48h]
mov	ecx, edi
call	eax

loc_6A8963:
cmp	byte ptr [esp+0F4h+var_D4+3], 0
jz	loc_6A8B9D
mov	ecx, [esp+0F4h+var_D8]
cmp	[esp+0F4h+var_DC], ecx
jnz	loc_6A8B3A
mov	eax, [ebp+20h]
fld	dword ptr [esi+4Ch]
fmul	dword ptr [eax]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_C4]
fld	dword ptr [esi+50h]
fmul	dword ptr [eax+8]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_C0]
fld	dword ptr [esi+54h]
fmul	dword ptr [eax+10h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_BC]
fld	dword ptr [esi+58h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_B8]
fld	dword ptr [esi+5Ch]
fmul	dword ptr [eax]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_B4]
fld	dword ptr [esi+60h]
fmul	dword ptr [eax+8]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_B0]
fld	dword ptr [esi+64h]
fmul	dword ptr [eax+10h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_AC]
fld	dword ptr [esi+68h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_A8]
fld	dword ptr [esi+6Ch]
fmul	dword ptr [eax]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_A4]
fld	dword ptr [esi+70h]
fmul	dword ptr [eax+8]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_A0]
fld	dword ptr [esi+74h]
fmul	dword ptr [eax+10h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_9C]
fld	dword ptr [esi+78h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_98]
fld	dword ptr [esi+7Ch]
fmul	dword ptr [eax]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_94]
fld	dword ptr [esi+80h]
fmul	dword ptr [eax+8]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_90]
fld	dword ptr [esi+84h]
fmul	dword ptr [eax+10h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_8C]
fld	dword ptr [esi+88h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_88]
fld	dword ptr [esi+8Ch]
fmul	dword ptr [eax]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_84]
fld	dword ptr [esi+90h]
fmul	dword ptr [eax+8]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_80]
fld	dword ptr [esi+94h]
fmul	dword ptr [eax+10h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_7C]
fld	dword ptr [eax+18h]
fmul	dword ptr [esi+98h]
fstp	[esp+0F4h+var_78]
fld	dword ptr [eax+4]
fld	ds:dbl_15FCCF8
fdiv	st(1), st
fld	dword ptr [esi+8Ch]
faddp	st(2), st
fld	dword ptr [eax+18h]
mov	edx, [ebp+34h]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0F4h+var_84]
fld	dword ptr [eax+0Ch]
fdiv	st, st(1)
fadd	dword ptr [esi+90h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_80]
fld	dword ptr [eax+14h]
fdiv	st, st(1)
fadd	dword ptr [esi+94h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_7C]
fdivr	dword ptr [eax+1Ch]
fadd	dword ptr [esi+98h]
fmul	dword ptr [eax+18h]
fstp	[esp+0F4h+var_78]
fldz
fst	[esp+0F4h+var_54]
fstp	[esp+0F4h+var_50]
fild	dword ptr [ebp+34h]
test	edx, edx
jge	short loc_6A8AF6
fadd	ds:flt_15FCC08

loc_6A8AF6:
mov	eax, [ebp+38h]
fstp	[esp+0F4h+var_4C]
fild	dword ptr [ebp+38h]
test	eax, eax
jge	short loc_6A8B0D
fadd	ds:flt_15FCC08

loc_6A8B0D:
mov	edx, [edi]
fstp	[esp+0F4h+var_48]
mov	edx, [edx+0B4h]
lea	eax, [esp+0F4h+var_C4]
push	eax
lea	ecx, [ebp+24h]
push	ecx
mov	ecx, [ebp+44h]
lea	eax, [esp+0FCh+var_54]
push	eax
push	ecx
mov	ecx, edi
call	edx
jmp	loc_6A8D2C

loc_6A8B3A:
fldz
mov	eax, [ebp+34h]
fst	[esp+0F4h+var_64]
fstp	[esp+0F4h+var_60]
fild	dword ptr [ebp+34h]
test	eax, eax
jge	short loc_6A8B5A
fadd	ds:flt_15FCC08

loc_6A8B5A:
mov	ecx, [ebp+38h]
fstp	[esp+0F4h+var_5C]
fild	dword ptr [ebp+38h]
test	ecx, ecx
jge	short loc_6A8B71
fadd	ds:flt_15FCC08

loc_6A8B71:
mov	edx, [edi]
fstp	[esp+0F4h+var_58]
mov	edx, [edx+0B4h]
add	esi, 4Ch
push	esi
lea	eax, [ebp+24h]
push	eax
mov	eax, [ebp+44h]
lea	ecx, [esp+0FCh+var_64]
push	ecx
push	eax
mov	ecx, edi
call	edx
jmp	loc_6A8D2C

loc_6A8B9D:
fld	dword ptr [esi+0Ch]
mov	eax, [esi+8]
mov	ecx, [esi+14h]
fstp	[esp+0F4h+var_40]
fld	dword ptr [esi+10h]
mov	edx, [esi+20h]
fstp	[esp+0F4h+var_3C]
mov	[esp+0F4h+var_44], eax
fld	dword ptr [esi+18h]
mov	eax, [esi+24h]
fstp	[esp+0F4h+var_34]
mov	[esp+0F4h+var_38], ecx
fld	dword ptr [esi+1Ch]
add	esi, 2Ch
fstp	[esp+0F4h+var_30]
mov	ecx, 8
fld	dword ptr [esi-4]
lea	edi, [esp+0F4h+var_20]
fstp	[esp+0F4h+var_24]
mov	[esp+0F4h+var_2C], edx
mov	[esp+0F4h+var_28], eax
rep movsd
mov	ecx, [esp+0F4h+var_D8]
cmp	[esp+0F4h+var_DC], ecx
jnz	short loc_6A8C23
mov	esi, [ebp+20h]
mov	ecx, 8
lea	edi, [esp+0F4h+var_20]
rep movsd

loc_6A8C23:
fld	[esp+0F4h+var_40]
mov	edx, [esp+0F4h+var_44]
mov	eax, [esp+0F4h+var_38]
fstp	[esp+0F4h+var_C0]
fld	[esp+0F4h+var_3C]
mov	ecx, [esp+0F4h+var_2C]
fstp	[esp+0F4h+var_BC]
mov	[esp+0F4h+var_C4], edx
fld	[esp+0F4h+var_34]
mov	edx, [esp+0F4h+var_28]
fstp	[esp+0F4h+var_B4]
mov	[esp+0F4h+var_B8], eax
fld	[esp+0F4h+var_30]
mov	eax, [ebp+34h]
fstp	[esp+0F4h+var_B0]
mov	[esp+0F4h+var_AC], ecx
fld	[esp+0F4h+var_24]
mov	ecx, 8
fstp	[esp+0F4h+var_A4]
lea	esi, [esp+0F4h+var_20]
fldz
lea	edi, [esp+0F4h+var_A0]
fst	[esp+0F4h+var_74]
mov	[esp+0F4h+var_A8], edx
fstp	[esp+0F4h+var_70]
rep movsd
fild	dword ptr [ebp+34h]
test	eax, eax
jge	short loc_6A8CB8
fadd	ds:flt_15FCC08

loc_6A8CB8:
mov	ecx, [ebp+38h]
fstp	[esp+0F4h+var_6C]
fild	dword ptr [ebp+38h]
test	ecx, ecx
jge	short loc_6A8CCF
fadd	ds:flt_15FCC08

loc_6A8CCF:
mov	esi, [esp+0F4h+var_D0]
fstp	[esp+0F4h+var_68]
fld	dword ptr [ebp+40h]
mov	edi, [esi]
fld	ds:dbl_15FCE20
sub	esp, 8
fmul	st(1), st
lea	ecx, [esp+0FCh+var_C4]
fxch	st(1)
fstp	[esp+0FCh+var_E0]
fld	[esp+0FCh+var_E0]
fstp	[esp+0FCh+var_F8]
fmul	dword ptr [ebp+3Ch]
fstp	[esp+0FCh+var_E0]
fld	[esp+0FCh+var_E0]
fstp	[esp+0FCh+var_FC]
call	sub_6A7BF0
mov	ecx, [ebp+44h]
push	eax
lea	edx, [ebp+24h]
push	edx
mov	edx, [edi+0B0h]
lea	eax, [esp+0FCh+var_74]
push	eax
push	ecx
mov	ecx, esi
call	edx
mov	edi, esi

loc_6A8D2C:
mov	eax, [esp+0F4h+var_D8]
cmp	[esp+0F4h+var_DC], eax
jz	short loc_6A8D78
mov	edx, [edi]
mov	eax, [edx+24h]
mov	ecx, edi
call	eax
test	ebx, ebx
jz	short loc_6A8D4F
push	1		; Value
lea	ecx, [ebx+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd

loc_6A8D4F:
mov	esi, [ebp+44h]
test	esi, esi
jz	short loc_6A8D75
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A8D75
test	esi, esi
jz	short loc_6A8D75
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx

loc_6A8D75:
mov	[ebp+44h], ebx

loc_6A8D78:
test	ebx, ebx
jz	short loc_6A8D97
push	0FFFFFFFFh	; Value
lea	eax, [ebx+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A8D97
mov	edx, [ebx]
mov	eax, [edx]
push	1
mov	ecx, ebx
call	eax

loc_6A8D97:
mov	eax, [esp+0F4h+var_DC]
add	[esp+0F4h+var_C8], 9Ch
inc	eax
mov	[esp+0F4h+var_DC], eax
cmp	eax, [esp+0F4h+var_CC]
jb	loc_6A8861

loc_6A8DB2:
mov	eax, [ebp+54h]
mov	ecx, [ebp+20h]
mov	[ebp+0], ecx
test	eax, eax
jz	short loc_6A8DC9
mov	[ebp+8], eax
mov	dword ptr [ebp+54h], 0

loc_6A8DC9:
dec	dword ptr [ebp+1Ch]
cmp	byte ptr [ebp+18h], 0
lea	ebx, [ebp+18h]
jnz	short loc_6A8E1E
mov	esi, [ebp+44h]
test	esi, esi
jz	short loc_6A8DFB
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A8DFB
test	esi, esi
jz	short loc_6A8DFB
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx

loc_6A8DFB:
mov	eax, [esp+0F4h+arg_0]
push	eax
mov	ecx, ebx
mov	dword ptr [ebp+44h], 0
call	sub_6A81B0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0E4h
retn	10h

loc_6A8E1E:
mov	edx, [edi]
mov	eax, [edx+48h]
mov	ecx, edi
call	eax
cmp	dword ptr [ebp+1Ch], 0
jle	short loc_6A8E3C
mov	ecx, [esp+0F4h+arg_0]
push	ecx
mov	ecx, ebx
call	sub_6A81B0

loc_6A8E3C:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0E4h
retn	10h
sub_6A87F0 endp

align 10h



; int __stdcall	sub_6A8E50(int,	int, int, float, float,	float, float, int, int)
sub_6A8E50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
mov	[esi+20h], eax
test	ebx, ebx
jz	short loc_6A8E71
push	1		; Value
lea	ecx, [ebx+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd

loc_6A8E71:
mov	edi, [esi+44h]
test	edi, edi
jz	short loc_6A8E93
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A8E93
test	edi, edi
jz	short loc_6A8E93
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_6A8E93:
fld	[esp+10h+arg_C]
mov	ecx, [esp+10h+arg_20]
mov	eax, [esp+10h+arg_1C]
mov	[esi+44h], ebx
fstp	dword ptr [esi+24h]
fld	[esp+10h+arg_10]
lea	edi, [esi+78h]
fstp	dword ptr [esi+28h]
fld	[esp+10h+arg_14]
fstp	dword ptr [esi+2Ch]
fld	[esp+10h+arg_18]
fstp	dword ptr [esi+30h]
mov	[esi+38h], ecx
mov	ecx, edi
mov	[esi+34h], eax
call	sub_64EAA0
fstp	dword ptr [esi+3Ch]
mov	ecx, edi
call	sub_64EAC0
fstp	dword ptr [esi+40h]
mov	edx, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
push	1
push	edx
push	ecx
lea	eax, [esi+18h]
push	eax
mov	ecx, esi
call	sub_6A87F0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	24h
sub_6A8E50 endp

align 10h



sub_6A8F00 proc	near

arg_0= qword ptr  4
arg_8= qword ptr  0Ch

mov	eax, dword ptr [esp+arg_8+4]
push	ebx
push	esi
push	0
push	0Ah
mov	ebx, ecx
mov	ecx, dword ptr [esp+10h+arg_8]
mov	esi, [ebx+24h]
push	eax
push	ecx
call	__aulldiv
xor	ecx, ecx
cmp	ecx, edx
ja	short loc_6A8F26
jb	short loc_6A8F28
cmp	esi, eax
jb	short loc_6A8F28

loc_6A8F26:
mov	eax, esi

loc_6A8F28:
test	eax, eax
jnz	short loc_6A8F33
pop	esi
xor	edx, edx
pop	ebx
retn	10h

loc_6A8F33:
cdq
push	edi
mov	esi, eax
mov	edi, edx
mov	edx, esi
sub	edx, [ebx+28h]
mov	eax, edi
sbb	eax, [ebx+2Ch]
add	edx, dword ptr [esp+0Ch+arg_0]
push	edi
adc	eax, dword ptr [esp+10h+arg_0+4]
push	esi
push	eax
push	edx
call	__aulldiv
push	edi
push	esi
push	edx
push	eax
call	__allmul
pop	edi
pop	esi
pop	ebx
retn	10h
sub_6A8F00 endp

align 10h



sub_6A8F70 proc	near
mov	byte ptr [ecx+38h], 0
retn
sub_6A8F70 endp

align 10h



sub_6A8F80 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6A8FEB
mov	ecx, [esi+18h]
push	edi
call	sub_668010
mov	edi, eax
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fst	[esp+10h+var_8]
mov	ecx, dword ptr [esp+10h+var_8+4]
mov	eax, ecx
and	eax, 7FF00000h
xor	edx, edx
jnz	short loc_6A8FD5
cmp	eax, 7FF00000h
jnz	short loc_6A8FD5
mov	eax, dword ptr [esp+10h+var_8]
and	ecx, 0FFFFFh
or	eax, ecx
jnz	short loc_6A8FE8

loc_6A8FD5:
call	__ftol2_sse
push	eax
mov	ecx, edi
call	sub_68ECD0
pop	edi
pop	esi
add	esp, 8
retn

loc_6A8FE8:
fstp	st
pop	edi

loc_6A8FEB:
pop	esi
add	esp, 8
retn
sub_6A8F80 endp



; Attributes: thunk

sub_6A8FF0 proc	near
jmp	sub_6A8F80
sub_6A8FF0 endp

align 10h



sub_6A9000 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	[esi+8], bl
mov	eax, [edi]
mov	[esi], eax
cmp	eax, ebx
jz	short loc_6A9023
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6A9023:
mov	[esi+4], ebx
mov	eax, [edi+4]
cmp	eax, ebx
jz	short loc_6A903F
mov	dl, [edi+8]
and	dl, 1
movzx	ecx, dl
push	ecx
push	eax
mov	ecx, esi
call	sub_67C1A0

loc_6A903F:
mov	edx, [esp+0Ch+arg_4]
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	eax, [edx]
mov	eax, [eax+8]
mov	[esi+14h], eax
inc	dword ptr [eax+8]
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
pop	edi
mov	[esi+39h], bl
mov	byte ptr [esi+38h], 1
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6A9000 endp

align 10h



sub_6A9080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
mov	eax, ecx
xor	ecx, ecx
mov	[eax+8], cl
mov	[eax], ecx
mov	[eax+4], ecx
cmp	edx, ecx
jz	short loc_6A90A3
push	esi
mov	esi, [edx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[edx+8], esi
pop	esi

loc_6A90A3:
mov	[eax+0Ch], edx
mov	edx, [esp+arg_4]
mov	[eax+10h], ecx
mov	edx, [edx]
mov	[eax+14h], edx
inc	dword ptr [edx+8]
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	byte ptr [eax+38h], 1
mov	[eax+39h], cl
retn	8
sub_6A9080 endp

align 10h



sub_6A90E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
mov	[esi+8], bl
mov	[esi], ebx
mov	[esi+4], ebx
mov	[esi+0Ch], ebx
cmp	ecx, ebx
jz	short loc_6A9100
call	sub_64A4A0
jmp	short loc_6A9102

loc_6A9100:
xor	eax, eax

loc_6A9102:
mov	[esi+10h], eax
mov	eax, [esp+8+arg_4]
mov	eax, [eax]
mov	[esi+14h], eax
mov	ecx, 1
add	[eax+8], ecx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+39h], bl
mov	[esi+38h], cl
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6A90E0 endp

align 10h



; int __stdcall	sub_6A9140(int,	float)
sub_6A9140 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	qword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 7Ch
push	ebp
mov	ebp, ecx
cmp	byte ptr [ebp+38h], 0
jnz	short loc_6A9155
xor	al, al
pop	ebp
add	esp, 7Ch
retn	8

loc_6A9155:
push	ebx
push	edi
mov	edi, [esp+88h+arg_0]
mov	eax, [edi+124h]
mov	ecx, [edi+120h]
xor	bl, bl
mov	dword ptr [esp+88h+var_64], ecx
mov	dword ptr [esp+88h+var_64+4], eax
cmp	eax, [ebp+2Ch]
jb	loc_6A94ED
ja	short loc_6A9188
cmp	ecx, [ebp+28h]
jb	loc_6A94ED

loc_6A9188:
xor	ebx, ebx
push	esi
mov	[esp+8Ch+var_54], 0
mov	[esp+8Ch+var_5C], ebx
mov	[esp+8Ch+var_58], ebx
mov	[esp+8Ch+var_78], ebx
mov	[esp+8Ch+var_6C], ebx
mov	[esp+8Ch+var_70], ebx
mov	[esp+8Ch+var_7C], ebx
cmp	[ebp+0], ebx
jz	short loc_6A91BC
push	ebp
lea	ecx, [esp+90h+var_5C]
call	sub_67C4C0
jmp	loc_6A92E2

loc_6A91BC:
mov	eax, [ebp+0Ch]
cmp	eax, ebx
jz	short loc_6A91D0
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6A91D0:
mov	esi, [ebp+0Ch]
cmp	esi, ebx
jz	short loc_6A91E4
mov	edx, [esi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[esi+8], edx

loc_6A91E4:
mov	[esp+8Ch+var_6C], esi
cmp	esi, ebx
jz	short loc_6A91FC
mov	ecx, esi
call	sub_64B3B0
add	esi, 10h
mov	[esp+8Ch+var_78], esi
jmp	short loc_6A924C

loc_6A91FC:
lea	eax, [esp+8Ch+var_74]
push	eax
lea	ecx, [ebp+10h]
call	sub_6831C0
mov	esi, [esp+8Ch+var_74]
cmp	esi, ebx
jz	short loc_6A921E
inc	dword ptr [esi+4]
inc	dword ptr [esi+4]
lea	eax, [esi+4]
mov	esi, [esp+8Ch+var_74]

loc_6A921E:
mov	[esp+8Ch+var_70], esi
cmp	esi, ebx
jz	loc_6A92DF
mov	ecx, esi
call	sub_64A400
mov	ecx, esi
call	sub_64A400
mov	edx, [esi]
mov	eax, [edx+70h]
lea	ecx, [esi+78h]
mov	[esp+8Ch+var_78], ecx
mov	ecx, esi
call	eax
mov	[esp+8Ch+var_7C], eax

loc_6A924C:
cmp	[esp+8Ch+var_78], ebx
jz	loc_6A92DF
push	ebx
mov	ecx, edi
mov	[esp+90h+var_44], bl
call	sub_68E580
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+70h]
call	eax
mov	ecx, [esp+8Ch+var_78]
mov	edx, [ecx]
lea	esi, [esp+8Ch+var_44]
push	esi
lea	esi, [ebp+14h]
add	eax, 78h
push	esi
push	eax
mov	eax, [edx+2Ch]
call	eax
test	al, al
jz	short loc_6A92D4
mov	ecx, [esp+8Ch+var_7C]
push	ecx
lea	edx, [esp+90h+var_50]
push	edx
lea	ecx, [esp+94h+var_44]
call	sub_652DC0
push	eax
lea	ecx, [esp+90h+var_5C]
call	sub_67C4C0
test	[esp+8Ch+var_48], 2
jnz	short loc_6A92B8
mov	ecx, [esp+8Ch+var_50]
cmp	ecx, ebx
jz	short loc_6A92B8
call	sub_64B3B0

loc_6A92B8:
test	[esp+8Ch+var_48], 1
mov	[esp+8Ch+var_50], ebx
jnz	short loc_6A92D0
mov	ecx, [esp+8Ch+var_4C]
cmp	ecx, ebx
jz	short loc_6A92D0
call	sub_64B3B0

loc_6A92D0:
mov	[esp+8Ch+var_4C], ebx

loc_6A92D4:
lea	ecx, [esp+8Ch+var_44]
call	sub_652830
jmp	short loc_6A92E2

loc_6A92DF:
mov	[ebp+38h], bl

loc_6A92E2:
cmp	[esp+8Ch+var_5C], ebx
jz	loc_6A9459
mov	[esp+8Ch+var_34], bl
cmp	[esp+8Ch+var_7C], ebx
jnz	short loc_6A9342
mov	ecx, [ebp+34h]
cmp	ecx, ebx
jz	short loc_6A932D
push	edi
call	sub_654F00
mov	esi, eax
cmp	esi, ebx
jz	short loc_6A932D
inc	dword ptr [esi+4]
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	edi, eax
mov	ecx, esi
mov	[esp+8Ch+var_7C], edi
call	sub_64A400
cmp	edi, ebx
jnz	short loc_6A9342
mov	edi, [esp+8Ch+arg_0]

loc_6A932D:
push	ebx
mov	ecx, edi
call	sub_68E580
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+70h]
call	eax
mov	[esp+8Ch+var_7C], eax

loc_6A9342:
mov	edi, [ebp+1Ch]
cmp	edi, ebx
mov	[esp+8Ch+var_68], edi
jle	short loc_6A939A
lea	eax, [edi-1]
cmp	eax, ebx
mov	[esp+8Ch+var_74], eax
jl	short loc_6A939A
mov	esi, [esp+8Ch+var_7C]
mov	ebx, eax
add	esi, 8
shl	ebx, 4

loc_6A9364:
mov	edi, [ebp+18h]
add	dword ptr [esi], 10h
mov	eax, [esi]
add	edi, ebx
cmp	eax, [esi+8]
jb	short loc_6A937A
mov	ecx, esi
call	sub_64B530

loc_6A937A:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6A9386
push	edi
call	sub_652330

loc_6A9386:
mov	eax, [esp+8Ch+var_74]
dec	eax
sub	ebx, 10h
mov	[esp+8Ch+var_74], eax
test	eax, eax
jge	short loc_6A9364
mov	edi, [esp+8Ch+var_68]

loc_6A939A:
mov	esi, [esp+8Ch+var_7C]
mov	ecx, [esi+8]
sub	ecx, [esi+0Ch]
mov	edx, [esi+1Ch]
add	esi, 8
shl	edx, 5
sar	ecx, 4
lea	eax, [ecx+edx-20h]
mov	edx, [esp+8Ch+var_78]
mov	[esp+8Ch+var_1C], edx
xor	edx, edx
lea	ecx, [esp+8Ch+var_34]
mov	[esp+8Ch+var_20], ecx
mov	ecx, [esp+8Ch+var_7C]
push	edx
mov	[esp+90h+var_18], edx
mov	[esp+90h+var_14], edx
mov	edx, [esp+90h+var_58]
mov	[esp+90h+var_C], ecx
mov	ecx, [esp+90h+var_5C]
mov	ebx, offset off_1431764
mov	[esp+90h+var_4], eax
push	edx
mov	[esp+94h+var_24], ebx
mov	[esp+94h+var_10], 0
mov	[esp+94h+var_8], edi
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+94h+var_24]
push	edx
call	eax
test	[esp+8Ch+var_10], 2
mov	[esp+8Ch+var_24], ebx
jnz	short loc_6A9426
mov	ecx, [esp+8Ch+var_18]
test	ecx, ecx
jz	short loc_6A9426
call	sub_64B3B0

loc_6A9426:
test	[esp+8Ch+var_10], 1
mov	[esp+8Ch+var_18], 0
jnz	short loc_6A9442
mov	ecx, [esp+8Ch+var_14]
test	ecx, ecx
jz	short loc_6A9442
call	sub_64B3B0

loc_6A9442:
test	edi, edi
jle	short loc_6A944E
push	edi
mov	ecx, esi
call	sub_64C1F0

loc_6A944E:
lea	ecx, [esp+8Ch+var_34]
call	sub_652830
xor	ebx, ebx

loc_6A9459:
cmp	byte ptr [ebp+39h], 0
jz	short loc_6A9465
mov	byte ptr [ebp+38h], 0
jmp	short loc_6A94A0

loc_6A9465:
fld	[esp+8Ch+arg_4]
fmul	ds:dbl_15FCD88
call	__ftol2
mov	edi, dword ptr [esp+8Ch+var_64+4]
mov	esi, dword ptr [esp+8Ch+var_64]
push	edx
push	eax
push	edi
push	esi
mov	ecx, ebp
call	sub_6A8F00
cmp	edx, ebx
ja	short loc_6A9492
cmp	eax, ebx
jbe	short loc_6A949A

loc_6A9492:
add	[ebp+28h], eax
adc	[ebp+2Ch], edx
jmp	short loc_6A94A0

loc_6A949A:
mov	[ebp+28h], esi
mov	[ebp+2Ch], edi

loc_6A94A0:
mov	ecx, [esp+8Ch+var_70]
mov	bl, 1
pop	esi
test	ecx, ecx
jz	short loc_6A94B0
call	sub_64A400

loc_6A94B0:
mov	ecx, [esp+88h+var_6C]
test	ecx, ecx
jz	short loc_6A94BD
call	sub_64B3B0

loc_6A94BD:
test	[esp+88h+var_54], 2
jnz	short loc_6A94D1
mov	ecx, [esp+88h+var_5C]
test	ecx, ecx
jz	short loc_6A94D1
call	sub_64B3B0

loc_6A94D1:
test	[esp+88h+var_54], 1
mov	[esp+88h+var_5C], 0
jnz	short loc_6A94ED
mov	ecx, [esp+88h+var_58]
test	ecx, ecx
jz	short loc_6A94ED
call	sub_64B3B0

loc_6A94ED:
pop	edi
mov	al, bl
pop	ebx
pop	ebp
add	esp, 7Ch
retn	8
sub_6A9140 endp

align 10h



sub_6A9500 proc	near

var_1C=	qword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 1Ch
push	ebp
push	esi
mov	esi, [esp+24h+arg_0]
push	edi
mov	edi, [esi+4]
xor	ebp, ebp
mov	ecx, edi
mov	dword ptr [esp+28h+var_1C], ebp
call	sub_652060
mov	byte ptr [edi],	0
cmp	dword ptr [esi+1Ch], 2
jl	loc_6A9832
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	edi, [ecx+294h]
push	ebx
mov	ebx, 1
push	ebp
mov	ecx, esi
mov	[esp+30h+arg_0], ebx
call	sub_651EC0
mov	al, [eax]
cmp	al, 8
jz	short loc_6A9553
cmp	al, 0Bh
jnz	loc_6A95D3

loc_6A9553:
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebp
push	40h
mov	ecx, edi
call	eax
mov	edi, eax
cmp	edi, ebp
jz	short loc_6A9591
mov	eax, [esi+18h]
lea	ecx, [eax+78h]
push	ecx
push	eax
lea	ecx, [esp+34h+var_C]
push	ecx
push	ebp
mov	ecx, esi
mov	dword ptr [esp+3Ch+var_1C], ebx
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
push	eax
mov	ecx, edi
call	sub_6A9000
mov	ebx, eax
jmp	short loc_6A9593

loc_6A9591:
xor	ebx, ebx

loc_6A9593:
test	byte ptr [esp+2Ch+var_1C], 1
jz	loc_6A96DD
test	byte ptr [esp+2Ch+var_4], 2
jnz	short loc_6A95B2
mov	ecx, [esp+2Ch+var_C]
cmp	ecx, ebp
jz	short loc_6A95B2
call	sub_64B3B0

loc_6A95B2:
test	byte ptr [esp+2Ch+var_4], 1
mov	[esp+2Ch+var_C], ebp
jnz	short loc_6A95CA
mov	ecx, [esp+2Ch+var_8]
cmp	ecx, ebp
jz	short loc_6A95CA
call	sub_64B3B0

loc_6A95CA:
mov	[esp+2Ch+var_8], ebp
jmp	loc_6A96DD

loc_6A95D3:
push	ebp
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	6
push	ebp
jnz	short loc_6A964D
mov	edx, [edi]
mov	eax, [edx+28h]
push	40h
mov	ecx, edi
call	eax
mov	ebx, eax
cmp	ebx, ebp
jz	short loc_6A963A
mov	edi, [esi+18h]
push	1
mov	ecx, esi
mov	dword ptr [esp+30h+var_1C], 2
call	sub_651EC0
push	ebp
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+38h+var_14]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
lea	edx, [esp+2Ch+var_14]
push	edx
push	eax
push	ebp
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
push	eax
mov	ecx, ebx
call	sub_6A9080
mov	ebx, eax
jmp	short loc_6A963C

loc_6A963A:
xor	ebx, ebx

loc_6A963C:
test	byte ptr [esp+2Ch+var_1C], 2
jz	loc_6A96D5
mov	eax, [esp+2Ch+var_14]
jmp	short loc_6A96C4

loc_6A964D:
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	7
jnz	loc_6A9831
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebp
push	40h
mov	ecx, edi
call	eax
mov	ebx, eax
cmp	ebx, ebp
jz	short loc_6A96B7
mov	edi, [esi+18h]
push	1
mov	ecx, esi
mov	dword ptr [esp+30h+var_1C], 4
call	sub_651EC0
push	ebp
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+38h+var_10]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
lea	edx, [esp+2Ch+var_10]
push	edx
push	eax
push	ebp
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
push	eax
mov	ecx, ebx
call	sub_6A90E0
mov	ebx, eax
jmp	short loc_6A96B9

loc_6A96B7:
xor	ebx, ebx

loc_6A96B9:
test	byte ptr [esp+2Ch+var_1C], 4
jz	short loc_6A96D5
mov	eax, [esp+2Ch+var_10]

loc_6A96C4:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_6A96D5
call	sub_650DF0

loc_6A96D5:
mov	[esp+2Ch+arg_0], 2

loc_6A96DD:
mov	edi, [esp+2Ch+arg_0]
cmp	[esi+1Ch], edi
jg	short loc_6A970B
cmp	ebx, ebp
jz	loc_6A9831
mov	ecx, ebx
call	sub_6962E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn

loc_6A970B:
mov	ecx, [esi+18h]
mov	ecx, [ecx+74h]
cmp	ecx, ebp
jz	short loc_6A9765
mov	edx, [ecx]
mov	eax, [edx+68h]
push	ebp
call	eax
mov	ecx, [eax+94h]
cmp	ecx, ebp
jnz	short loc_6A9732
mov	ecx, eax
call	sub_658B70
mov	ebp, eax
jmp	short loc_6A9734

loc_6A9732:
mov	ebp, ecx

loc_6A9734:
test	ebp, ebp
jz	short loc_6A973B
inc	dword ptr [ebp+0]

loc_6A973B:
mov	edi, [ebx+34h]
test	edi, edi
jz	short loc_6A975E
dec	dword ptr [edi]
cmp	dword ptr [edi], 0
jg	short loc_6A975E
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6A975E:
mov	edi, [esp+2Ch+arg_0]
mov	[ebx+34h], ebp

loc_6A9765:
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+2Ch+arg_0]
movzx	eax, word ptr [esp+2Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+2Ch+var_1C], eax
mov	al, [esp+2Ch+arg_4]
lea	ebp, [edi+1]
fldcw	word ptr [esp+2Ch+var_1C]
mov	[ebx+39h], al
fistp	[esp+2Ch+var_1C]
mov	edx, dword ptr [esp+2Ch+var_1C]
mov	[ebx+24h], edx
cmp	ebp, [esi+1Ch]
fldcw	word ptr [esp+2Ch+arg_0]
jge	short loc_6A97E9
lea	edi, [ebx+18h]
nop

loc_6A97B0:
push	ebp
mov	ecx, esi
call	sub_651EC0
mov	ecx, [edi+4]
inc	ecx
push	ecx
push	edi
mov	ecx, edi
mov	[esp+34h+arg_0], eax
call	sub_683310
mov	edx, [edi+4]
mov	eax, [edi]
shl	edx, 4
lea	ecx, [edx+eax-10h]
test	ecx, ecx
jz	short loc_6A97E3
mov	edx, [esp+2Ch+arg_0]
push	edx
call	sub_652330

loc_6A97E3:
inc	ebp
cmp	ebp, [esi+1Ch]
jl	short loc_6A97B0

loc_6A97E9:
mov	ecx, [esi+18h]
call	sub_668010
mov	edi, eax
push	ebx
mov	ecx, edi
call	sub_696380
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	[esp+2Ch+arg_0], eax
jb	short loc_6A980E
mov	ecx, esi
call	sub_652060

loc_6A980E:
fild	[esp+2Ch+arg_0]
mov	byte ptr [esi],	3
xor	ecx, ecx
fstp	qword ptr [esi+4]
mov	eax, [ebx+24h]
add	eax, [edi+120h]
mov	edx, [edi+124h]
adc	edx, ecx
mov	[ebx+28h], eax
mov	[ebx+2Ch], edx

loc_6A9831:
pop	ebx

loc_6A9832:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn
sub_6A9500 endp

align 10h
; [00000010 BYTES: COLLAPSED FUNCTION __mkgmtime. PRESS	KEYPAD "+" TO EXPAND]



sub_6A9850 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1
push	eax
call	sub_6A9500
add	esp, 8
retn
sub_6A9850 endp




sub_6A9860 proc	near
mov	eax, [ecx+28h]
lea	edx, [eax-1]
cmp	edx, 2
jnb	short loc_6A9870
mov	eax, [ecx+eax*4+1Ch]
retn

loc_6A9870:
xor	eax, eax
retn
sub_6A9860 endp

align 10h



sub_6A9880 proc	near
mov	eax, [ecx+0Ch]
and	eax, 1
retn
sub_6A9880 endp

align 10h



sub_6A9890 proc	near
mov	eax, [ecx+0Ch]
shr	eax, 4
and	eax, 1
retn
sub_6A9890 endp

align 10h



sub_6A98A0 proc	near
mov	eax, [ecx+0Ch]
shr	eax, 1
and	eax, 1
retn
sub_6A98A0 endp

align 10h



sub_6A98B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
mov	edx, ecx
mov	ebx, [edx+0Ch]
push	esi
push	edi
mov	ecx, 8
sub	ecx, ebx
mov	edi, 1
shl	edi, cl
add	ebx, eax
movzx	eax, ds:byte_1437CDC[eax]
dec	edi
cmp	eax, 4		; switch 5 cases
ja	loc_6A9A1C	; default
jmp	ds:off_6A9A30[eax*4] ; switch jump

loc_6A98E4:		; jumptable 006A98DD case 0
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4

loc_6A98EC:		; jumptable 006A98DD case 1
cmp	ebx, 8
ja	short loc_6A9922
mov	ecx, [edx]
mov	eax, [edx+8]
movzx	eax, byte ptr [eax+ecx]
and	eax, edi
mov	ecx, 8

loc_6A9901:
sub	ecx, ebx
test	ecx, ecx
jz	loc_6A9A1E
mov	esi, 8
shr	eax, cl
sub	esi, ecx
pop	edi
mov	[edx+0Ch], esi
pop	esi
pop	ebx
retn	4

loc_6A991D:		; jumptable 006A98DD case 2
cmp	ebx, 10h
ja	short loc_6A9943

loc_6A9922:
mov	ecx, [edx+8]
mov	eax, [edx]
lea	esi, [ecx+eax]
movzx	eax, byte ptr [esi]
movzx	esi, byte ptr [esi+1]
and	eax, edi
shl	eax, 8
or	eax, esi
inc	ecx
mov	[edx+8], ecx
mov	ecx, 10h
jmp	short loc_6A9901

loc_6A9943:
mov	esi, [edx+8]
mov	ecx, [edx]
movzx	eax, byte ptr [ecx+esi]
add	ecx, esi
and	eax, edi
movzx	edi, byte ptr [ecx+1]
shl	eax, 8
or	eax, edi
shl	eax, 8

loc_6A995C:
movzx	ecx, byte ptr [ecx+2]
or	eax, ecx
add	esi, 2
mov	[edx+8], esi
mov	ecx, 18h
jmp	short loc_6A9901

loc_6A996F:		; jumptable 006A98DD case 3
mov	eax, [edx]
mov	esi, [edx+8]
lea	ecx, [esi+eax]
movzx	eax, byte ptr [ecx]
and	eax, edi
movzx	edi, byte ptr [ecx+1]
shl	eax, 8
or	eax, edi
shl	eax, 8
cmp	ebx, 18h
ja	short loc_6A99AD
jmp	short loc_6A995C

loc_6A998F:		; jumptable 006A98DD case 4
cmp	ebx, 20h
ja	short loc_6A99CC
mov	eax, [edx]
mov	esi, [edx+8]
lea	ecx, [esi+eax]
movzx	eax, byte ptr [ecx]
and	eax, edi
movzx	edi, byte ptr [ecx+1]
shl	eax, 8
or	eax, edi
shl	eax, 8

loc_6A99AD:
movzx	edi, byte ptr [ecx+2]
movzx	ecx, byte ptr [ecx+3]
or	eax, edi
shl	eax, 8
or	eax, ecx
add	esi, 3
mov	[edx+8], esi
mov	ecx, 20h
jmp	loc_6A9901

loc_6A99CC:
mov	eax, [edx+8]
mov	ecx, [edx]
movzx	esi, byte ptr [ecx+eax]
and	esi, edi
movzx	edi, byte ptr [ecx+eax+1]
shl	esi, 8
or	esi, edi
movzx	edi, byte ptr [ecx+eax+2]
shl	esi, 8
or	esi, edi
movzx	edi, byte ptr [ecx+eax+3]
shl	esi, 8
or	esi, edi
lea	edi, [eax+4]
mov	[edx+8], edi
movzx	edi, byte ptr [edi+ecx]
lea	eax, [ebx-20h]
mov	ecx, 8
sub	cl, al
shr	edi, cl
mov	ecx, eax
shl	esi, cl
mov	[edx+0Ch], eax
or	edi, esi
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4

loc_6A9A1C:		; default
xor	eax, eax

loc_6A9A1E:
inc	dword ptr [edx+8]
pop	edi
pop	esi
mov	dword ptr [edx+0Ch], 0
pop	ebx
retn	4
sub_6A98B0 endp

align 10h
off_6A9A30 dd offset loc_6A98E4	; jump table for switch	statement
dd offset loc_6A98EC
dd offset loc_6A991D
dd offset loc_6A996F
dd offset loc_6A998F
align 10h



sub_6A9A50 proc	near
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+18h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
mov	dword ptr [esi], offset	off_1437D00
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6A9A7F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6A9A7F:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6A9A8B
call	sub_64A430

loc_6A9A8B:
pop	edi
mov	dword ptr [esi], offset	off_143F300
pop	esi
retn
sub_6A9A50 endp

align 10h



sub_6A9AA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
mov	esi, ecx
cmp	edi, ebx
jz	short loc_6A9AB6
mov	ecx, edi
call	sub_64A420

loc_6A9AB6:
mov	ecx, [esi+10h]
cmp	ecx, ebx
jz	short loc_6A9AC2
call	sub_64A430

loc_6A9AC2:
mov	eax, [esp+0Ch+arg_4]
mov	[esi+10h], edi
mov	[esi+4], eax
mov	eax, [esp+0Ch+arg_8]
mov	[esi+8], eax
cmp	eax, ebx
jz	short loc_6A9ADC
mov	eax, [eax+0Ch]
jmp	short loc_6A9ADE

loc_6A9ADC:
xor	eax, eax

loc_6A9ADE:
mov	[esi+0Ch], eax
mov	[esi+14h], bl
mov	[esi+15h], bl
cmp	edi, ebx
jz	short loc_6A9AFF
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax
push	eax
lea	ecx, [esi+18h]
call	sub_67A2C0
jmp	short loc_6A9B07

loc_6A9AFF:
lea	ecx, [esi+18h]
call	sub_67A720

loc_6A9B07:
mov	[esi+28h], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+38h], bl
cmp	edi, ebx
jz	short loc_6A9B2F
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
pop	edi
mov	[esi+34h], eax
pop	esi
pop	ebx
retn	0Ch

loc_6A9B2F:
pop	edi
mov	[esi+34h], ebx
pop	esi
pop	ebx
retn	0Ch
sub_6A9AA0 endp

align 10h



sub_6A9B40 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+18h]
call	sub_67A720
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6A9B57
call	sub_64A430

loc_6A9B57:
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 0
pop	esi
retn
sub_6A9B40 endp

align 10h



sub_6A9B70 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	[esi+30h], ebx
jnz	short loc_6A9B8F
mov	ecx, [esi+10h]
cmp	ecx, ebx
jz	short loc_6A9B8F
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	[esi+34h], eax
mov	[esi+38h], bl

loc_6A9B8F:
mov	ecx, [esi+2Ch]
mov	eax, [esi+30h]
cmp	ecx, eax
jnb	short loc_6A9BB4
mov	edx, [esi+3Ch]
sub	eax, ecx
push	eax
lea	eax, [edx+ecx]
push	eax
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esi+2Ch]
add	esp, 0Ch
sub	[esi+30h], ecx
jmp	short loc_6A9BB7

loc_6A9BB4:
mov	[esi+30h], ebx

loc_6A9BB7:
mov	ecx, [esi+10h]
mov	[esi+2Ch], ebx
cmp	ecx, ebx
jz	short loc_6A9C2F
mov	eax, [esi+30h]
mov	edx, [ecx]
push	ebp
mov	ebp, [esi+3Ch]
push	edi
mov	edi, [esi+40h]
sub	edi, eax
add	ebp, eax
mov	eax, [edx+28h]
push	edi
push	ebp
call	eax
cmp	eax, edi
jge	short loc_6A9C20
cmp	eax, ebx
jle	short loc_6A9BE7
add	[esi+30h], eax
add	[esi+34h], eax

loc_6A9BE7:
mov	eax, [esi+30h]
mov	ecx, [esi+40h]
mov	edx, [esi+3Ch]
sub	ecx, eax
push	ecx		; size_t
add	edx, eax
push	ebx		; int
push	edx		; void *
call	_memset
mov	edx, [esi+2Ch]
mov	ecx, [esi+30h]
mov	edi, [esp+1Ch+arg_0]
sub	ecx, edx
add	esp, 0Ch
cmp	edi, ecx
setle	al
cmp	ecx, edi
jge	short loc_6A9C19
add	edx, edi
mov	[esi+30h], edx

loc_6A9C19:
pop	edi
pop	ebp
pop	esi
pop	ebx
retn	4

loc_6A9C20:
add	[esi+30h], eax
add	[esi+34h], eax
pop	edi
pop	ebp
pop	esi
mov	al, 1
pop	ebx
retn	4

loc_6A9C2F:		; size_t
push	200h
lea	eax, [esi+44h]
push	ebx		; int
push	eax		; void *
mov	[esi+3Ch], eax
mov	dword ptr [esi+40h], 200h
call	_memset
mov	eax, [esi+40h]
add	[esi+34h], eax
add	esp, 0Ch
mov	[esi+2Ch], ebx
mov	[esi+30h], eax
pop	esi
xor	al, al
pop	ebx
retn	4
sub_6A9B70 endp

align 10h



sub_6A9C60 proc	near
push	1
call	sub_6A9B70
retn
sub_6A9C60 endp

align 10h



sub_6A9C70 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
sub	eax, [esi+30h]
mov	ecx, [esi+10h]
add	eax, [esi+2Ch]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+38h]
call	eax
cmp	eax, 0FFFFFFFFh
jz	short loc_6A9C9F
mov	dword ptr [esi+2Ch], 0
mov	[esi+34h], eax
mov	dword ptr [esi+30h], 0

loc_6A9C9F:
pop	esi
retn
sub_6A9C70 endp

align 10h



sub_6A9CB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, ecx
xor	ebp, ebp
push	edi
cmp	[esi+30h], ebp
jnz	short loc_6A9CCE
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	[esi+34h], eax
mov	byte ptr [esi+38h], 0

loc_6A9CCE:
mov	ecx, [esi+2Ch]
mov	eax, [esi+30h]
mov	edi, [esp+10h+arg_4]
cmp	ecx, eax
jnb	short loc_6A9D03
sub	eax, ecx
mov	ebp, edi
cmp	edi, eax
jb	short loc_6A9CE6
mov	ebp, eax

loc_6A9CE6:
mov	eax, [esi+3Ch]
mov	ebx, [esp+10h+arg_0]
push	ebp
add	eax, ecx
push	eax
push	ebx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	[esi+2Ch], ebp
add	esp, 0Ch
sub	edi, ebp
add	ebx, ebp
jmp	short loc_6A9D07

loc_6A9D03:
mov	ebx, [esp+10h+arg_0]

loc_6A9D07:
mov	ecx, [esi+2Ch]
cmp	ecx, [esi+30h]
jb	short loc_6A9D17
xor	eax, eax
mov	[esi+30h], eax
mov	[esi+2Ch], eax

loc_6A9D17:
test	edi, edi
jz	short loc_6A9D40
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebx
call	eax
add	[esi+34h], eax
add	ebp, eax
cmp	eax, edi
jge	short loc_6A9D40
sub	edi, eax
push	edi		; size_t
add	eax, ebx
push	0		; int
push	eax		; void *
call	_memset
add	esp, 0Ch

loc_6A9D40:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	8
sub_6A9CB0 endp

align 10h



sub_6A9D50 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	edx, [esi+34h]
mov	eax, [esi+30h]
mov	ecx, edx
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
sub	ecx, eax
cmp	edi, ecx
mov	[esi+15h], bl
jl	short loc_6A9D7D
cmp	edi, edx
jge	short loc_6A9D7D
sub	eax, edx
add	eax, edi
pop	edi
mov	[esi+2Ch], eax
pop	esi
pop	ebx
retn	4

loc_6A9D7D:
cmp	[esi+38h], bl
jnz	short loc_6A9D8B
mov	eax, [esi+2Ch]
add	eax, ecx
cmp	eax, edi
jz	short loc_6A9DA7

loc_6A9D8B:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+38h]
push	ebx
push	edi
call	eax
test	eax, eax
jl	short loc_6A9DA7
mov	[esi+38h], bl
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], edi

loc_6A9DA7:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6A9D50 endp

align 10h



sub_6A9DB0 proc	near
push	esi
mov	esi, ecx
dec	dword ptr [esi+28h]
mov	eax, [esi+28h]
mov	eax, [esi+eax*4+20h]
push	eax
call	sub_6A9D50
mov	byte ptr [esi+15h], 0
pop	esi
retn
sub_6A9DB0 endp

align 10h



sub_6A9DD0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
xor	ebx, ebx
push	edi
cmp	[esi+0Ch], ebx
jz	short loc_6A9DE0
inc	dword ptr [esi+8]

loc_6A9DE0:
mov	ebp, [esp+10h+arg_0]
mov	ecx, ebp
mov	[esi+0Ch], ebx
call	sub_64E8E0
mov	edx, [esi+0Ch]
mov	edi, [esi+8]
mov	ecx, 7
sub	ecx, edx
mov	eax, 1
shl	eax, cl
mov	ecx, [esi]
movzx	ecx, byte ptr [edi+ecx]
and	eax, ecx
lea	ecx, [edx+1]
mov	[esi+0Ch], ecx
cmp	ecx, 8
jb	short loc_6A9E1C
inc	edi
mov	[esi+0Ch], ebx
mov	[esi+8], edi

loc_6A9E1C:
fld	ds:dbl_1437D10
cmp	eax, ebx
jz	short loc_6A9E87
push	5
mov	ecx, esi
call	sub_6A98B0
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6A9E58
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6A9E58:
fild	[esp+10h+arg_0]
push	edi
mov	ecx, esi
fmul	st, st(1)
fstp	dword ptr [ebp+0]
call	sub_6A98B0
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6A9E7E
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6A9E7E:
fild	[esp+10h+arg_0]
fmul	st, st(1)
fstp	dword ptr [ebp+10h]

loc_6A9E87:
mov	edx, [esi+0Ch]
mov	edi, [esi+8]
mov	ecx, 7
sub	ecx, edx
mov	eax, 1
shl	eax, cl
mov	ecx, [esi]
movzx	ecx, byte ptr [edi+ecx]
and	eax, ecx
lea	ecx, [edx+1]
mov	[esi+0Ch], ecx
cmp	ecx, 8
jb	short loc_6A9EB9
inc	edi
mov	dword ptr [esi+0Ch], 0
mov	[esi+8], edi

loc_6A9EB9:
test	eax, eax
jz	short loc_6A9F1E
push	5
mov	ecx, esi
call	sub_6A98B0
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6A9EEF
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6A9EEF:
fild	[esp+10h+arg_0]
push	edi
mov	ecx, esi
fmul	st, st(1)
fstp	dword ptr [ebp+0Ch]
call	sub_6A98B0
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6A9F15
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6A9F15:
fimul	[esp+10h+arg_0]
fstp	dword ptr [ebp+4]
jmp	short loc_6A9F20

loc_6A9F1E:
fstp	st

loc_6A9F20:
push	5
mov	ecx, esi
call	sub_6A98B0
mov	edi, eax
test	edi, edi
jle	short loc_6A9F81
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6A9F56
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6A9F56:
fild	[esp+10h+arg_0]
push	edi
mov	ecx, esi
fstp	dword ptr [ebp+8]
call	sub_6A98B0
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6A9F7A
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6A9F7A:
fild	[esp+10h+arg_0]
fstp	dword ptr [ebp+14h]

loc_6A9F81:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6A9DD0 endp

align 10h



sub_6A9F90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0Ch], 0
push	edi
jz	short loc_6A9FA2
inc	dword ptr [esi+8]

loc_6A9FA2:
mov	ecx, [esi]
mov	eax, [esi+8]
add	eax, ecx
mov	dword ptr [esi+0Ch], 0
movzx	edx, byte ptr [eax]
mov	ecx, 0
and	edx, 80h
setnz	cl
mov	dword ptr [esi+0Ch], 1
movzx	ebx, byte ptr [eax]
push	4
and	ebx, 40h
mov	[esp+1Ch+var_4], ecx
mov	ecx, esi
mov	dword ptr [esi+0Ch], 2
call	sub_6A98B0
mov	edi, eax
test	ebx, ebx
jz	loc_6AA076
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+18h+var_8], eax
test	eax, ebx
jz	short loc_6AA013
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+var_8], eax

loc_6AA013:
fild	[esp+18h+var_8]
mov	ebp, [esp+18h+arg_0]
fld	ds:dbl_15FD8A0
push	edi
mov	ecx, esi
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [ebp+0]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebx
jz	short loc_6AA045
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA045:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fmul	st, st(1)
fstp	dword ptr [ebp+8]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebx
jz	short loc_6AA06B
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA06B:
fimul	[esp+18h+arg_0]
fstp	dword ptr [ebp+10h]
fld1
jmp	short loc_6AA085

loc_6AA076:
fld1
mov	ebp, [esp+18h+arg_0]
fst	dword ptr [ebp+0]
fst	dword ptr [ebp+8]
fst	dword ptr [ebp+10h]

loc_6AA085:
cmp	[esp+18h+var_4], 0
fst	dword ptr [ebp+18h]
jz	loc_6AA116
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+18h+arg_0], eax
test	eax, ebx
jz	short loc_6AA0BA
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA0BA:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fstp	dword ptr [ebp+4]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebx
jz	short loc_6AA0DE
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA0DE:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fstp	dword ptr [ebp+0Ch]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebx
jz	short loc_6AA102
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA102:
fild	[esp+18h+arg_0]
pop	edi
pop	esi
fstp	dword ptr [ebp+14h]
fstp	dword ptr [ebp+1Ch]
pop	ebp
pop	ebx
add	esp, 8
retn	4

loc_6AA116:
fstp	st
pop	edi
fldz
pop	esi
fst	dword ptr [ebp+4]
fst	dword ptr [ebp+0Ch]
fst	dword ptr [ebp+14h]
fstp	dword ptr [ebp+1Ch]
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_6A9F90 endp




sub_6AA130 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0Ch], 0
push	edi
jz	short loc_6AA142
inc	dword ptr [esi+8]

loc_6AA142:
mov	ecx, [esi]
mov	eax, [esi+8]
add	eax, ecx
mov	dword ptr [esi+0Ch], 0
movzx	edx, byte ptr [eax]
mov	ecx, 0
and	edx, 80h
setnz	cl
mov	ebp, 1
mov	[esi+0Ch], ebp
movzx	ebx, byte ptr [eax]
push	4
mov	[esp+1Ch+var_4], ecx
mov	ecx, esi
and	ebx, 40h
mov	dword ptr [esi+0Ch], 2
call	sub_6A98B0
mov	edi, eax
test	ebx, ebx
jz	loc_6AA232
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
shl	ebp, cl
mov	[esp+18h+var_8], eax
test	eax, ebp
jz	short loc_6AA1AF
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+var_8], eax

loc_6AA1AF:
fild	[esp+18h+var_8]
mov	ebx, [esp+18h+arg_0]
fld	ds:dbl_15FD8A0
push	edi
mov	ecx, esi
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [ebx]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AA1E0
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA1E0:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fmul	st, st(1)
fstp	dword ptr [ebx+8]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AA206
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA206:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fmul	st, st(1)
fstp	dword ptr [ebx+10h]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AA22C
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA22C:
fimul	[esp+18h+arg_0]
jmp	short loc_6AA240

loc_6AA232:
fld1
mov	ebx, [esp+18h+arg_0]
fst	dword ptr [ebx]
fst	dword ptr [ebx+8]
fst	dword ptr [ebx+10h]

loc_6AA240:
cmp	[esp+18h+var_4], 0
fstp	dword ptr [ebx+18h]
jz	loc_6AA2F2
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebp, 1
shl	ebp, cl
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AA275
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA275:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fstp	dword ptr [ebx+4]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AA299
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA299:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fstp	dword ptr [ebx+0Ch]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AA2BD
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA2BD:
fild	[esp+18h+arg_0]
push	edi
mov	ecx, esi
fstp	dword ptr [ebx+14h]
call	sub_6A98B0
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AA2E1
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AA2E1:
fild	[esp+18h+arg_0]
pop	edi
pop	esi
pop	ebp
fstp	dword ptr [ebx+1Ch]
pop	ebx
add	esp, 8
retn	4

loc_6AA2F2:
fldz
pop	edi
fst	dword ptr [ebx+4]
pop	esi
fst	dword ptr [ebx+0Ch]
pop	ebp
fst	dword ptr [ebx+14h]
fstp	dword ptr [ebx+1Ch]
pop	ebx
add	esp, 8
retn	4
sub_6AA130 endp

align 10h



sub_6AA310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437D00
push	eax
lea	ecx, [esi+18h]
mov	dword ptr [esi+10h], 0
call	sub_67AC80
mov	edx, [esp+4+arg_C]
mov	eax, [esp+4+arg_8]
lea	ecx, [esi+44h]
push	edx
mov	[esi+3Ch], ecx
mov	ecx, [esp+8+arg_0]
push	eax
push	ecx
mov	ecx, esi
mov	dword ptr [esi+40h], 200h
call	sub_6A9AA0
mov	eax, esi
pop	esi
retn	10h
sub_6AA310 endp

align 10h



; int __thiscall sub_6AA360(void *, char)
sub_6AA360 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+18h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
mov	dword ptr [esi], offset	off_1437D00
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AA38F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6AA38F:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6AA39B
call	sub_64A430

loc_6AA39B:
test	[esp+8+arg_0], 1
mov	dword ptr [esi], offset	off_143F300
jz	short loc_6AA3B1
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6AA3B1:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6AA360 endp

align 10h



sub_6AA3C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_8]
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+18h]
mov	dword ptr [esi], offset	off_1437D00
xor	ebx, ebx
push	eax
mov	ecx, edi
mov	[esi+10h], ebx
call	sub_67AC80
mov	eax, [esp+0Ch+arg_0]
mov	[esi+3Ch], eax
cmp	eax, ebx
jz	short loc_6AA3F3
mov	ecx, [esp+0Ch+arg_4]
mov	[esi+40h], ecx
jmp	short loc_6AA3F6

loc_6AA3F3:
mov	[esi+40h], ebx

loc_6AA3F6:
mov	ecx, [esi+10h]
cmp	ecx, ebx
jz	short loc_6AA402
call	sub_64A430

loc_6AA402:
mov	eax, [esp+0Ch+arg_10]
mov	edx, [esp+0Ch+arg_C]
mov	[esi+10h], ebx
mov	[esi+4], edx
mov	[esi+8], eax
cmp	eax, ebx
jz	short loc_6AA41C
mov	eax, [eax+0Ch]
jmp	short loc_6AA41E

loc_6AA41C:
xor	eax, eax

loc_6AA41E:
mov	ecx, edi
mov	[esi+0Ch], eax
mov	[esi+14h], bl
mov	[esi+15h], bl
call	sub_67A720
mov	eax, [esi+40h]
mov	[esi+30h], eax
mov	[esi+34h], eax
pop	edi
mov	[esi+28h], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+2Ch], ebx
mov	[esi+38h], bl
mov	eax, esi
pop	esi
pop	ebx
retn	14h
sub_6AA3C0 endp

align 10h



sub_6AA450 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
xor	ebx, ebx
xor	ebp, ebp
cmp	edi, ebx
mov	esi, ecx
jle	short loc_6AA4DD

loc_6AA462:
mov	al, [esi+15h]
cmp	al, bl
jz	short loc_6AA483
movzx	eax, al
cmp	edi, eax
jl	short loc_6AA4BB
mov	ecx, edi
sub	ecx, eax
movzx	eax, byte ptr [esi+14h]
shl	eax, cl
mov	edi, ecx
mov	[esi+15h], bl
or	ebp, eax
jmp	short loc_6AA4AE

loc_6AA483:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	[esi+15h], bl
cmp	ecx, 1
jge	short loc_6AA49A
push	1
mov	ecx, esi
call	sub_6A9B70

loc_6AA49A:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[esi+2Ch], eax
mov	[esi+14h], cl
mov	byte ptr [esi+15h], 8

loc_6AA4AE:
cmp	edi, ebx
jg	short loc_6AA462
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	4

loc_6AA4BB:
movzx	eax, byte ptr [esi+15h]
mov	dl, [esi+14h]
sub	eax, edi
movzx	edi, dl
mov	cl, al
shr	edi, cl
mov	bl, 1
mov	ecx, eax
shl	bl, cl
or	ebp, edi
mov	[esi+15h], al
dec	bl
and	bl, dl
mov	[esi+14h], bl

loc_6AA4DD:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	4
sub_6AA450 endp

align 10h



sub_6AA4F0 proc	near
push	esi
mov	esi, ecx
mov	al, [esi+15h]
test	al, al
jnz	short loc_6AA52E
mov	[esi+15h], al
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
cmp	eax, 1
jge	short loc_6AA50F
push	1
call	sub_6A9B70

loc_6AA50F:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
movzx	eax, cl
shr	eax, 7
and	cl, 7Fh
mov	byte ptr [esi+15h], 7
mov	[esi+14h], cl
pop	esi
retn

loc_6AA52E:
dec	al
movzx	edx, al
mov	[esi+15h], al
movzx	eax, byte ptr [esi+14h]
push	ebx
mov	cl, dl
shr	eax, cl
mov	bl, 1
mov	ecx, edx
shl	bl, cl
dec	bl
and	bl, [esi+14h]
mov	[esi+14h], bl
pop	ebx
pop	esi
retn
sub_6AA4F0 endp




sub_6AA550 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	sub_6AA450
lea	ecx, [esi-1]
mov	edx, 1
shl	edx, cl
test	eax, edx
jz	short loc_6AA572
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx

loc_6AA572:
pop	esi
retn	4
sub_6AA550 endp

align 10h



sub_6AA580 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6AA59C
push	1
call	sub_6A9B70

loc_6AA59C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
movzx	eax, cl
mov	ecx, [esp+0Ch+arg_0]
test	eax, eax
jg	short loc_6AA5C2
call	sub_67A720
xor	al, al
pop	esi
add	esp, 8
retn	4

loc_6AA5C2:
push	eax
lea	edx, [esp+10h+var_8]
push	edx
mov	[esp+14h+var_8], offset	off_1437D08
mov	[esp+14h+var_4], esi
call	sub_67A180
mov	al, 1
pop	esi
add	esp, 8
retn	4
sub_6AA580 endp

align 10h



sub_6AA5F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
push	edi
xor	edi, edi
mov	[esp+0Ch+var_4], ecx
test	ebp, ebp
jbe	short loc_6AA646
push	ebx
mov	ebx, [esp+10h+arg_0]
push	esi
jmp	short loc_6AA610
align 10h

loc_6AA610:
mov	eax, [esp+14h+var_4]
mov	esi, [eax+4]
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 1
jge	short loc_6AA62F
push	1
mov	ecx, esi
call	sub_6A9B70

loc_6AA62F:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[esi+2Ch], eax
mov	[edi+ebx], cl
inc	edi
cmp	edi, ebp
jb	short loc_6AA610
pop	esi
pop	ebx

loc_6AA646:
pop	edi
pop	ebp
pop	ecx
retn	8
sub_6AA5F0 endp

align 10h



sub_6AA650 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6AA66A
push	1
call	sub_6A9B70

loc_6AA66A:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	ebp, cl
inc	eax
mov	[esi+2Ch], eax
test	ebp, ebp
jg	short loc_6AA685
pop	esi
xor	eax, eax
pop	ebp
retn	4

loc_6AA685:
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	ebx
push	edi
push	0
lea	eax, [ebp+1]
push	eax
call	edx
xor	edi, edi
mov	ebx, eax
test	ebp, ebp
jle	short loc_6AA6CD

loc_6AA6A0:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6AA6B8
push	1
mov	ecx, esi
call	sub_6A9B70

loc_6AA6B8:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
mov	[edi+ebx], cl
inc	edi
cmp	edi, ebp
jl	short loc_6AA6A0

loc_6AA6CD:
mov	byte ptr [edi+ebx], 0
pop	edi
mov	eax, ebx
pop	ebx
pop	esi
pop	ebp
retn	4
sub_6AA650 endp

align 10h



sub_6AA6E0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+30h]
mov	ecx, [esi+2Ch]
mov	ebx, [esi+34h]
sub	ebx, eax
sub	eax, ecx
add	ebx, ecx
cmp	eax, 2
push	edi
mov	byte ptr [esi+15h], 0
jge	short loc_6AA707
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6AA707:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	edx, dx
lea	ecx, [eax+2]
movzx	eax, dx
mov	ebp, eax
and	eax, 3Fh
mov	edi, eax
sar	ebp, 6
mov	[esi+2Ch], ecx
cmp	edi, 3Fh
jnz	short loc_6AA782
mov	edx, [esi+30h]
sub	edx, ecx
cmp	edx, 4
mov	byte ptr [esi+15h], 0
jge	short loc_6AA752
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6AA752:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [eax+edx+2]
lea	ecx, [eax+edx]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
add	edx, 4
mov	[esi+2Ch], edx
mov	edi, eax

loc_6AA782:
mov	eax, [esp+10h+arg_0]
mov	[eax+4], ebx
mov	[eax], ebp
mov	[eax+8], edi
mov	edx, [esi+34h]
sub	edx, [esi+30h]
add	edx, [esi+2Ch]
mov	[eax+0Ch], edx
test	byte ptr [esi+0Ch], 1
jz	short loc_6AA7B1
push	ebx
push	edi
push	ebp
push	offset aTagTypeDTagL_0 ; "---------------Tag type = %d,	Tag lengt"...
push	esi
call	nullsub_2
add	esp, 14h

loc_6AA7B1:
mov	eax, [esi+34h]
sub	eax, [esi+30h]
mov	ecx, [esi+28h]
add	eax, [esi+2Ch]
add	eax, edi
mov	[esi+ecx*4+20h], eax
inc	dword ptr [esi+28h]
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn	4
sub_6AA6E0 endp

align 10h



sub_6AA7D0 proc	near
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
push	edi
cmp	eax, 2
mov	byte ptr [esi+15h], 0
jge	short loc_6AA7EB
push	2
call	sub_6A9B70

loc_6AA7EB:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	edx, dx
lea	ecx, [eax+2]
movzx	eax, dx
mov	ebp, eax
and	eax, 3Fh
mov	edi, eax
sar	ebp, 6
mov	[esi+2Ch], ecx
cmp	edi, 3Fh
jnz	short loc_6AA866
mov	edx, [esi+30h]
sub	edx, ecx
cmp	edx, 4
mov	byte ptr [esi+15h], 0
jge	short loc_6AA836
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6AA836:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [eax+edx+2]
lea	ecx, [eax+edx]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
add	edx, 4
mov	[esi+2Ch], edx
mov	edi, eax

loc_6AA866:
test	byte ptr [esi+0Ch], 1
jz	short loc_6AA87C
push	edi
push	ebp
push	offset aTagTypeDTagLen ; "---------------Tag type = %d,	Tag lengt"...
push	esi
call	nullsub_2
add	esp, 10h

loc_6AA87C:
mov	edx, [esi+34h]
sub	edx, [esi+30h]
mov	eax, [esi+28h]
add	edx, [esi+2Ch]
add	edx, edi
mov	[esi+eax*4+20h], edx
inc	dword ptr [esi+28h]
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
retn
sub_6AA7D0 endp

align 10h



sub_6AA8A0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	ecx, ebp
mov	byte ptr [esi+15h], 0
call	sub_64E8E0
mov	ecx, esi
call	sub_6AA4F0
test	eax, eax
jz	short loc_6AA929
push	5
mov	ecx, esi
call	sub_6AA450
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_6AA450
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6AA8F2
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6AA8F2:
fild	[esp+10h+arg_0]
push	edi
mov	ecx, esi
fmul	ds:dbl_1437D10
fstp	dword ptr [ebp+0]
call	sub_6AA450
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6AA91C
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6AA91C:
fild	[esp+10h+arg_0]
fmul	ds:dbl_1437D10
fstp	dword ptr [ebp+10h]

loc_6AA929:
mov	ecx, esi
call	sub_6AA4F0
test	eax, eax
jz	short loc_6AA99D
push	5
mov	ecx, esi
call	sub_6AA450
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_6AA450
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6AA966
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6AA966:
fild	[esp+10h+arg_0]
push	edi
mov	ecx, esi
fmul	ds:dbl_1437D10
fstp	dword ptr [ebp+0Ch]
call	sub_6AA450
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6AA990
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6AA990:
fild	[esp+10h+arg_0]
fmul	ds:dbl_1437D10
fstp	dword ptr [ebp+4]

loc_6AA99D:
push	5
mov	ecx, esi
call	sub_6AA450
mov	edi, eax
test	edi, edi
jle	short loc_6AA9FE
push	edi
mov	ecx, esi
call	sub_6AA450
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6AA9D3
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6AA9D3:
fild	[esp+10h+arg_0]
push	edi
mov	ecx, esi
fstp	dword ptr [ebp+8]
call	sub_6AA450
mov	[esp+10h+arg_0], eax
test	eax, ebx
jz	short loc_6AA9F7
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx
mov	[esp+10h+arg_0], eax

loc_6AA9F7:
fild	[esp+10h+arg_0]
fstp	dword ptr [ebp+14h]

loc_6AA9FE:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6AA8A0 endp

align 10h



sub_6AAA10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	byte ptr [edi+15h], 0
call	sub_6AA4F0
mov	ecx, edi
mov	[esp+18h+var_4], eax
call	sub_6AA4F0
push	4
mov	ecx, edi
mov	ebx, eax
call	sub_6AA450
mov	esi, eax
test	ebx, ebx
jz	loc_6AAAF6
push	esi
mov	ecx, edi
call	sub_6AA450
lea	ecx, [esi-1]
mov	ebp, 1
shl	ebp, cl
mov	[esp+18h+var_8], eax
test	eax, ebp
jz	short loc_6AAA69
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+var_8], eax

loc_6AAA69:
fild	[esp+18h+var_8]
mov	ebx, [esp+18h+arg_0]
push	esi
mov	ecx, edi
fmul	ds:dbl_15FD8A0
fstp	dword ptr [ebx]
call	sub_6AA450
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AAA96
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AAA96:
fild	[esp+18h+arg_0]
push	esi
mov	ecx, edi
fmul	ds:dbl_15FD8A0
fstp	dword ptr [ebx+8]
call	sub_6AA450
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AAAC0
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AAAC0:
fild	[esp+18h+arg_0]
push	esi
mov	ecx, edi
fmul	ds:dbl_15FD8A0
fstp	dword ptr [ebx+10h]
call	sub_6AA450
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AAAEA
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AAAEA:
fild	[esp+18h+arg_0]
fmul	ds:dbl_15FD8A0
jmp	short loc_6AAB04

loc_6AAAF6:
fld1
mov	ebx, [esp+18h+arg_0]
fst	dword ptr [ebx]
fst	dword ptr [ebx+8]
fst	dword ptr [ebx+10h]

loc_6AAB04:
cmp	[esp+18h+var_4], 0
fstp	dword ptr [ebx+18h]
jz	loc_6AABB6
push	esi
mov	ecx, edi
call	sub_6AA450
lea	ecx, [esi-1]
mov	ebp, 1
shl	ebp, cl
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AAB39
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AAB39:
fild	[esp+18h+arg_0]
push	esi
mov	ecx, edi
fstp	dword ptr [ebx+4]
call	sub_6AA450
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AAB5D
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AAB5D:
fild	[esp+18h+arg_0]
push	esi
mov	ecx, edi
fstp	dword ptr [ebx+0Ch]
call	sub_6AA450
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AAB81
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AAB81:
fild	[esp+18h+arg_0]
push	esi
mov	ecx, edi
fstp	dword ptr [ebx+14h]
call	sub_6AA450
mov	[esp+18h+arg_0], eax
test	eax, ebp
jz	short loc_6AABA5
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+18h+arg_0], eax

loc_6AABA5:
fild	[esp+18h+arg_0]
pop	edi
pop	esi
pop	ebp
fstp	dword ptr [ebx+1Ch]
pop	ebx
add	esp, 8
retn	4

loc_6AABB6:
fldz
pop	edi
fst	dword ptr [ebx+4]
pop	esi
fst	dword ptr [ebx+0Ch]
pop	ebp
fst	dword ptr [ebx+14h]
fstp	dword ptr [ebx+1Ch]
pop	ebx
add	esp, 8
retn	4
sub_6AAA10 endp

align 10h



sub_6AABD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
push	5
mov	byte ptr [edi+15h], 0
call	sub_6AA450
mov	esi, eax
push	esi
mov	ecx, edi
call	sub_6AA450
lea	ecx, [esi-1]
mov	ebx, 1
shl	ebx, cl
mov	[esp+14h+var_4], eax
test	eax, ebx
jz	short loc_6AAC0B
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+14h+var_4], eax

loc_6AAC0B:
fild	[esp+14h+var_4]
mov	ebp, [esp+14h+arg_0]
push	esi
mov	ecx, edi
fstp	dword ptr [ebp+0]
call	sub_6AA450
mov	[esp+14h+arg_0], eax
test	eax, ebx
jz	short loc_6AAC33
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+14h+arg_0], eax

loc_6AAC33:
fild	[esp+14h+arg_0]
push	esi
mov	ecx, edi
fstp	dword ptr [ebp+8]
call	sub_6AA450
mov	[esp+14h+arg_0], eax
test	eax, ebx
jz	short loc_6AAC57
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+14h+arg_0], eax

loc_6AAC57:
fild	[esp+14h+arg_0]
push	esi
mov	ecx, edi
fstp	dword ptr [ebp+4]
call	sub_6AA450
mov	[esp+14h+arg_0], eax
test	eax, ebx
jz	short loc_6AAC7B
or	edx, 0FFFFFFFFh
mov	ecx, esi
shl	edx, cl
or	eax, edx
mov	[esp+14h+arg_0], eax

loc_6AAC7B:
fild	[esp+14h+arg_0]
pop	edi
pop	esi
fstp	dword ptr [ebp+0Ch]
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_6AABD0 endp

align 10h



sub_6AAC90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
push	edi
cmp	eax, 1
mov	byte ptr [esi+15h], 0
jge	short loc_6AACAA
push	1
call	sub_6A9B70

loc_6AACAA:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
mov	edi, [esp+8+arg_0]
inc	eax
mov	[esi+2Ch], eax
mov	[edi+2], cl
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 1
jge	short loc_6AACD6
push	1
mov	ecx, esi
call	sub_6A9B70

loc_6AACD6:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
mov	[edi+1], cl
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 1
jge	short loc_6AACFE
push	1
mov	ecx, esi
call	sub_6A9B70

loc_6AACFE:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
mov	[edi], cl
mov	byte ptr [edi+3], 0FFh
pop	edi
pop	esi
retn	4
sub_6AAC90 endp

align 10h



sub_6AAD20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_6AAC90
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6AAD46
push	1
mov	ecx, esi
call	sub_6A9B70

loc_6AAD46:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
mov	[edi+3], cl
pop	edi
pop	esi
retn	4
sub_6AAD20 endp

align 10h



sub_6AAD60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
xor	ebp, ebp
push	edi
mov	edi, ecx
mov	byte ptr [edi+15h], 0
mov	[esp+1Ch+var_C], ebp
mov	[esp+1Ch+var_8], ebp
mov	[esp+1Ch+var_4], ebp
jmp	short loc_6AAD80
align 10h

loc_6AAD80:
mov	eax, [edi+30h]
sub	eax, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	eax, 1
jge	short loc_6AAD98
push	1
mov	ecx, edi
call	sub_6A9B70

loc_6AAD98:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
mov	bl, [eax+ecx]
inc	eax
mov	[edi+2Ch], eax
lea	esi, [ebp+1]
test	bl, bl
jz	short loc_6AADF4
cmp	esi, ebp
jnb	short loc_6AADC2
mov	edx, [esp+1Ch+var_4]
shr	edx, 1
cmp	esi, edx
jnb	short loc_6AADDE
push	esi
lea	eax, [esp+20h+var_C]
push	eax
jmp	short loc_6AADD5

loc_6AADC2:
cmp	esi, [esp+1Ch+var_4]
jb	short loc_6AADDE
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
lea	edx, [esp+20h+var_C]
push	edx

loc_6AADD5:
lea	ecx, [esp+24h+var_C]
call	sub_747320

loc_6AADDE:
mov	eax, [esp+1Ch+var_C]
lea	eax, [esi+eax-1]
mov	ebp, esi
mov	[esp+1Ch+var_8], ebp
test	eax, eax
jz	short loc_6AAD80
mov	[eax], bl
jmp	short loc_6AAD80

loc_6AADF4:
cmp	esi, ebp
jnb	short loc_6AAE0A
mov	eax, [esp+1Ch+var_4]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6AAE26
push	esi
lea	ecx, [esp+20h+var_C]
push	ecx
jmp	short loc_6AAE1D

loc_6AAE0A:
cmp	esi, [esp+1Ch+var_4]
jb	short loc_6AAE26
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
lea	eax, [esp+20h+var_C]
push	eax

loc_6AAE1D:
lea	ecx, [esp+24h+var_C]
call	sub_747320

loc_6AAE26:
mov	edi, [esp+1Ch+var_C]
lea	eax, [esi+edi-1]
test	eax, eax
jz	short loc_6AAE35
mov	byte ptr [eax],	0

loc_6AAE35:
mov	ecx, [esp+1Ch+arg_0]
test	esi, esi
jnz	short loc_6AAE5C
call	sub_67A720
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 0Ch
retn	4

loc_6AAE5C:
dec	esi
push	esi
push	edi
call	sub_67A240
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	4
sub_6AAD60 endp

align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_39. PRESS	KEYPAD "+" TO EXPAND]
align 10h



; int __thiscall sub_6AAE90(void *, char)
sub_6AAE90 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437DAC
jz	short loc_6AAEA9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6AAEA9:
mov	eax, esi
pop	esi
retn	4
sub_6AAE90 endp

align 10h



sub_6AAEB0 proc	near
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+8]
mov	ecx, edi
call	sub_64D770
cmp	byte ptr [esi+20h], 0
jnz	short loc_6AAED9
push	ebx
lea	ebx, [esi+1Ch]

loc_6AAEC8:
push	0FFFFFFFFh
push	edi
mov	ecx, ebx
call	sub_64DCA0
cmp	byte ptr [esi+20h], 0
jz	short loc_6AAEC8
pop	ebx

loc_6AAED9:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64E350
sub_6AAEB0 endp

align 10h



sub_6AAEF0 proc	near
mov	eax, 1
cmp	[ecx+80h], eax
jg	short locret_6AAF03
mov	[ecx+88h], al

locret_6AAF03:
retn
sub_6AAEF0 endp

align 10h



sub_6AAF10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
mov	ecx, [esi+1Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	edi
call	edx
mov	[esi+78h], eax
test	eax, eax
jz	short loc_6AAF3E
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
push	eax
mov	[esi+7Ch], edi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_6AAF3E:
pop	edi
pop	esi
retn	8
sub_6AAF10 endp

align 10h



sub_6AAF50 proc	near

arg_4= dword ptr  8
arg_C= dword ptr  10h

mov	edx, [esp+arg_C]
mov	ecx, [ecx+4]
mov	eax, [ecx]
mov	eax, [eax+8]
push	edx
mov	edx, [esp+4+arg_4]
push	edx
call	eax
retn	10h
sub_6AAF50 endp

align 10h



sub_6AAF70 proc	near
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+50h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6AAF9D
call	sub_666680
test	al, al
jz	short loc_6AAF9D
mov	esi, [esi+10h]
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn

loc_6AAF9D:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
xor	eax, eax
pop	esi
retn
sub_6AAF70 endp

align 10h



sub_6AAFB0 proc	near
mov	eax, 1
retn	4
sub_6AAFB0 endp

align 10h



sub_6AAFC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_6AAFDF
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
lea	ecx, [eax-0Ch]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	11h
call	eax
retn

loc_6AAFDF:
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
xor	ecx, ecx
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	11h
call	eax
retn
sub_6AAFC0 endp

align 10h



sub_6AB000 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
push	eax
mov	esi, ecx
call	sub_67A3D0
mov	edi, [edi+4]
cmp	dword ptr [edi], 0
jnz	short loc_6AB024
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6AB024
call	sub_64A420

loc_6AB024:
cmp	dword ptr [esi+4], 0
jnz	short loc_6AB036
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6AB036
call	sub_666B00

loc_6AB036:
mov	ecx, [edi]
mov	[esi+4], ecx
mov	edx, [edi+4]
pop	edi
mov	[esi+8], edx
pop	esi
retn	4
sub_6AB000 endp

align 10h



sub_6AB050 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esi], eax
cmp	dword ptr [edi+4], 0
jnz	short loc_6AB06E
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6AB06E
call	sub_64A420

loc_6AB06E:
cmp	dword ptr [esi+4], 0
jnz	short loc_6AB080
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6AB080
call	sub_666B00

loc_6AB080:
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	edx, [edi+8]
pop	edi
mov	[esi+8], edx
mov	eax, esi
pop	esi
retn	4
sub_6AB050 endp

align 10h



sub_6AB0A0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_67A3D0
cmp	dword ptr [edi+4], 0
jnz	short loc_6AB0C0
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6AB0C0
call	sub_64A420

loc_6AB0C0:
cmp	dword ptr [esi+4], 0
jnz	short loc_6AB0D2
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6AB0D2
call	sub_666B00

loc_6AB0D2:
mov	eax, [edi+4]
mov	[esi+4], eax
mov	ecx, [edi+8]
pop	edi
mov	[esi+8], ecx
mov	eax, esi
pop	esi
retn	4
sub_6AB0A0 endp

align 10h



sub_6AB0F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, esi
call	sub_679E30
mov	eax, esi
pop	esi
retn	4
sub_6AB0F0 endp

align 10h



sub_6AB110 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, 0FFAh
jbe	short loc_6AB144
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
add	edi, 4
push	edi
call	edx
test	eax, eax
jz	short loc_6AB15E
mov	ecx, [esi+8]
mov	[eax], ecx
mov	[esi+8], eax
pop	edi
add	eax, 4
pop	esi
retn	4

loc_6AB144:
cmp	edi, [esi+4]
jbe	short loc_6AB179
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	1FF8h
call	eax
test	eax, eax
jnz	short loc_6AB165

loc_6AB15E:
pop	edi
xor	eax, eax
pop	esi
retn	4

loc_6AB165:
mov	ecx, [esi+8]
mov	[eax], ecx
mov	[esi+8], eax
add	eax, 4
mov	[esi], eax
mov	dword ptr [esi+4], 1FF4h

loc_6AB179:
mov	eax, [esi]
sub	[esi+4], edi
lea	edx, [eax+edi]
pop	edi
mov	[esi], edx
pop	esi
retn	4
sub_6AB110 endp

align 10h



sub_6AB190 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
mov	ecx, 1
mov	dword ptr [esi], offset	off_1437DF8
mov	dword ptr [esi+10h], offset off_1437DE4
cmp	[eax+80h], ecx
jg	short loc_6AB1B6
mov	[eax+88h], cl

loc_6AB1B6:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6AB1C2
call	sub_64A430

loc_6AB1C2:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6AB1D4
mov	eax, [ecx]
mov	edx, [esi+18h]
mov	eax, [eax+8]
push	edx
call	eax

loc_6AB1D4:
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+10h], offset off_1437DAC
pop	esi
retn
sub_6AB190 endp

align 10h



sub_6AB1F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
add	ecx, 14h
push	ecx
mov	ecx, esi
call	sub_666050
mov	eax, esi
pop	esi
retn	4
sub_6AB1F0 endp

align 10h



sub_6AB210 proc	near
mov	eax, 8000h
retn
sub_6AB210 endp

align 10h



sub_6AB220 proc	near
test	ecx, ecx
jz	short loc_6AB228
lea	eax, [ecx+10h]
retn

loc_6AB228:
xor	eax, eax
retn
sub_6AB220 endp

align 10h



sub_6AB230 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6AC0E0
sub_6AB230 endp

align 10h



sub_6AB240 proc	near
mov	eax, [ecx+20h]
mov	eax, [eax+2Ch]
retn
sub_6AB240 endp

align 10h



sub_6AB250 proc	near
mov	eax, [ecx+20h]
mov	eax, [eax+84h]
retn
sub_6AB250 endp

align 10h



sub_6AB260 proc	near
mov	eax, [ecx+20h]
mov	eax, [eax+48h]
retn
sub_6AB260 endp

align 10h



sub_6AB270 proc	near
mov	eax, [ecx+20h]
mov	eax, [eax+44h]
retn
sub_6AB270 endp

align 10h



sub_6AB280 proc	near
mov	eax, [ecx+20h]
mov	eax, [eax+11Ch]
retn
sub_6AB280 endp

align 10h



sub_6AB290 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx+20h]
mov	ecx, [esi+11Ch]
test	ecx, ecx
jz	short loc_6AB2A3
call	sub_64A400

loc_6AB2A3:
mov	eax, [esp+4+arg_0]
test	eax, eax
jz	short loc_6AB2AE
inc	dword ptr [eax+4]

loc_6AB2AE:
mov	[esi+11Ch], eax
pop	esi
retn	4
sub_6AB290 endp

align 10h



sub_6AB2C0 proc	near
mov	eax, [ecx+10h]
mov	eax, [eax+1Ch]
retn
sub_6AB2C0 endp

align 10h



sub_6AB2D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 20h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+20h], 0
jnz	short loc_6AB34C
mov	ecx, [esi+1Ch]
push	ebx
lea	edx, [esp+28h+var_20]
mov	[esp+28h+var_4], 0
mov	[esp+28h+var_20], 4
mov	[esp+28h+var_1C], 20h
mov	[esp+28h+var_18], 1000h
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], 0FFFFFFFFh
mov	[esp+28h+var_C], 0
mov	[esp+28h+var_8], 7
mov	eax, [ecx]
mov	eax, [eax+10h]
push	edx
push	offset a_images	; "_Images"
call	eax
mov	ecx, [esi+20h]
mov	ebx, eax
test	ecx, ecx
jz	short loc_6AB341
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_6AB341:
mov	[esi+20h], ebx
mov	eax, ebx
pop	ebx
pop	esi
add	esp, 20h
retn

loc_6AB34C:
mov	eax, [esi+20h]
pop	esi
add	esp, 20h
retn
sub_6AB2D0 endp

align 10h



sub_6AB360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+90h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [esp+8+arg_4]
mov	eax, [esp+8+arg_0]
mov	[esi+80h], ecx
mov	ecx, [esi+90h]
add	ecx, 1Ch
mov	[esi+84h], eax
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350
pop	edi
pop	esi
retn	8
sub_6AB360 endp

align 10h



sub_6AB3B0 proc	near
cmp	dword ptr [ecx+80h], 1
jg	short locret_6AB3C4
mov	ecx, [ecx+90h]
jmp	sub_6AAEB0

locret_6AB3C4:
retn
sub_6AB3B0 endp

align 10h



sub_6AB3D0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	ebx, 1
cmp	[esi+80h], ebx
jg	short loc_6AB434
push	ebp
mov	ebp, [esp+0Ch+arg_0]
cmp	[esi+84h], ebp
ja	short loc_6AB433
push	edi
mov	edi, [esi+90h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
cmp	[esi+80h], ebx
jg	short loc_6AB42B

loc_6AB407:
cmp	[esi+84h], ebp
ja	short loc_6AB42B
mov	eax, [esi+90h]
lea	ecx, [eax+8]
push	0FFFFFFFFh
push	ecx
lea	ecx, [eax+1Ch]
call	sub_64DCA0
cmp	[esi+80h], ebx
jle	short loc_6AB407

loc_6AB42B:
mov	ecx, edi
call	sub_64E350
pop	edi

loc_6AB433:
pop	ebp

loc_6AB434:
pop	esi
pop	ebx
retn	4
sub_6AB3D0 endp

align 10h



sub_6AB440 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+0DCh]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+0F4h]
mov	eax, [esi+84h]
lea	eax, [ecx+eax*8]
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
push	edi		; lpCriticalSection
mov	[eax+4], ecx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_6AB440 endp

align 10h



sub_6AB480 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+0DCh]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+100h]
mov	eax, [esi+84h]
lea	eax, [ecx+eax*8]
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
inc	dword ptr [esi+10Ch]
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_6AB480 endp




sub_6AB4C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi+80h], 2
jl	short loc_6AB4EC
mov	eax, [esi+0F4h]
mov	ecx, [esp+4+arg_4]
mov	edx, [eax+ecx*8]
lea	ecx, [eax+ecx*8]
mov	eax, [esp+4+arg_0]
mov	ecx, [ecx+4]
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	8

loc_6AB4EC:
push	edi
lea	edi, [esi+0DCh]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	edx, [esi+0F4h]
mov	eax, [esp+8+arg_4]
mov	ecx, [edx+eax*8]
mov	esi, [esp+8+arg_0]
lea	eax, [edx+eax*8]
mov	edx, [eax+4]
push	edi		; lpCriticalSection
mov	[esi], ecx
mov	[esi+4], edx
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_6AB4C0 endp

align 10h



sub_6AB530 proc	near
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+0DCh]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	esi, [esi+104h]
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn
sub_6AB530 endp

align 10h



sub_6AB560 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+8]
and	eax, 0FFFFFFFCh
add	eax, 8
retn	4
sub_6AB560 endp




sub_6AB570 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
push	edi
mov	edi, [esp+8+arg_0]
cmp	eax, [edi+0Ch]
jnz	short loc_6AB5BA
mov	ecx, [esi+18h]
cmp	ecx, [edi+18h]
jnz	short loc_6AB5BA
mov	edx, [esi+10h]
cmp	edx, [edi+10h]
jnz	short loc_6AB5BA
mov	eax, [esi+14h]
cmp	eax, [edi+14h]
jnz	short loc_6AB5BA
lea	ecx, [edi+8]
push	ecx
lea	ecx, [esi+8]
call	sub_4E4120
test	al, al
jz	short loc_6AB5BA
mov	edx, [esi+1Ch]
cmp	edx, [edi+1Ch]
jnz	short loc_6AB5BA
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_6AB5BA:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6AB570 endp

align 10h



sub_6AB5D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679AD0
mov	ecx, [esi+1Ch]
xor	ecx, [esi+18h]
mov	edx, eax
xor	ecx, [esi+0Ch]
mov	eax, ecx
shr	eax, 7
xor	eax, [esi+10h]
pop	esi
xor	eax, ecx
xor	eax, edx
retn	4
sub_6AB5D0 endp

align 10h



sub_6AB620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, [eax]
jz	short loc_6AB62D
xor	al, al
retn	8

loc_6AB62D:
mov	eax, [eax+4]
mov	ecx, [esp+arg_0]
push	eax
call	sub_6AB570
retn	8
sub_6AB620 endp

align 10h



sub_6AB640 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+10h]
mov	eax, [eax+24h]
and	eax, 0FFFFFFFCh
add	eax, 8
push	esi
push	eax
call	sub_713740
mov	esi, [esp+8+arg_0]
add	esp, 4
push	eax
mov	ecx, esi
call	sub_67AE10
mov	eax, esi
pop	esi
retn	4
sub_6AB640 endp

align 10h



sub_6AB670 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6AB68A
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	eax, [esi+20h]
mov	byte ptr [eax+3Ch], 1
pop	esi
retn

loc_6AB68A:
mov	ecx, [esi+20h]
mov	byte ptr [ecx+3Ch], 1
pop	esi
retn
sub_6AB670 endp

align 10h



sub_6AB6A0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  8

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+30h]
push	edi
push	offset asc_154D890 ; "\""
call	edx
push	eax
call	sub_713740
add	esp, 4
push	eax
push	offset aMovieview ; "MovieView \""
lea	ecx, [esp+18h]
call	sub_67AE50
mov	eax, [esi+1Ch]
mov	ecx, [eax+14h]
mov	eax, [esp+0Ch]
mov	edx, [esi]
mov	edx, [edx+58h]
shr	ecx, 1Ch
and	cl, 1
movzx	ecx, cl
push	ecx
mov	ecx, [esp+10h+arg_4]
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
mov	ecx, esi
call	edx
mov	ecx, [esp+10h+arg_4]
mov	edi, eax
mov	eax, [esi]
mov	edx, [eax+5Ch]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	ecx, edi
mov	ebx, eax
call	sub_64A430
mov	esi, [esp+10h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AB733
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AB733:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
pop	ecx
retn	8
sub_6AB6A0 endp

align 10h



sub_6AB740 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	2850h
call	edx
test	eax, eax
jz	short loc_6AB7B0
push	esi
mov	ecx, eax
call	sub_69D090
mov	esi, eax
test	esi, esi
jz	short loc_6AB7B0
mov	ecx, [esi+20h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1E8h
call	edx
test	eax, eax
jz	short loc_6AB7A4
push	0
push	ecx
mov	ecx, esp
push	0
mov	dword ptr [ecx], 40000h
mov	ecx, [edi+1Ch]
mov	ecx, [ecx+0Ch]
push	esi
push	edi
push	ecx
mov	ecx, eax
call	sub_68A1F0
mov	edi, eax
test	edi, edi
jnz	short loc_6AB7B8

loc_6AB7A4:
mov	edx, [esi]
mov	eax, [edx+114h]
mov	ecx, esi
call	eax

loc_6AB7B0:
xor	eax, eax
pop	edi
pop	esi
pop	ebx
retn	8

loc_6AB7B8:
push	0
mov	ecx, edi
call	sub_6850B0
push	edi
push	0
mov	ecx, esi
call	sub_699A10
mov	ecx, esi
call	sub_68E4B0
mov	edx, [esi]
mov	eax, [edx+4]
mov	ebx, [esi+2844h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, ebx
call	sub_6B2560
cmp	[esp+0Ch+arg_4], 0
jz	short loc_6AB806
mov	edx, [esi]
fldz
mov	eax, [edx+94h]
push	0
push	ecx
mov	ecx, esi
fstp	[esp+14h+var_14]
call	eax
fstp	st

loc_6AB806:
mov	ecx, edi
call	sub_64A400
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6AB740 endp

align 10h



sub_6AB820 proc	near
push	ebx
mov	ebx, ds:EnterCriticalSection
push	ebp
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+24h]
push	edi		; lpCriticalSection
call	ebx ; EnterCriticalSection
mov	ebp, ds:LeaveCriticalSection
push	edi		; lpCriticalSection
mov	dword ptr [esi+40h], 0
call	ebp ; LeaveCriticalSection
lea	edi, [esi+50h]
push	edi		; lpCriticalSection
call	ebx ; EnterCriticalSection
push	edi		; lpCriticalSection
mov	dword ptr [esi+10h], 0
call	ebp ; LeaveCriticalSection
mov	eax, [esi+74h]
and	al, 0Fh
cmp	al, 1
jg	short loc_6AB862
mov	byte ptr [esi+84h], 1

loc_6AB862:
mov	ecx, [esi+0Ch]
mov	edi, [ecx+20h]
mov	esi, [edi+90h]
add	esi, 8
mov	ecx, esi
call	sub_64D770
mov	ecx, [edi+90h]
add	ecx, 1Ch
call	sub_64D8F0
pop	edi
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
jmp	sub_64E350
sub_6AB820 endp

align 10h



sub_6AB8A0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+78h]
add	esi, 8
mov	ecx, esi
call	sub_64D770
mov	ecx, [edi+78h]
mov	eax, [esp+8+arg_0]
add	ecx, 1Ch
mov	[edi+74h], eax
call	sub_64D8F0
mov	ecx, esi
call	sub_64E350
pop	edi
pop	esi
retn	4
sub_6AB8A0 endp

align 10h



sub_6AB8D0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+78h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	eax, [esi+74h]
mov	ebx, [esp+0Ch+arg_0]
and	eax, 0Fh
cmp	al, 3
jge	short loc_6AB912

loc_6AB8F0:
mov	ecx, [esi+74h]
test	ebx, ecx
jnz	short loc_6AB912
mov	eax, [esi+78h]
push	0FFFFFFFFh
lea	edx, [eax+8]
push	edx
lea	ecx, [eax+1Ch]
call	sub_64DCA0
mov	eax, [esi+74h]
and	eax, 0Fh
cmp	al, 3
jl	short loc_6AB8F0

loc_6AB912:
mov	ecx, [esi+74h]
test	ebx, ecx
mov	ecx, edi
setnz	bl
call	sub_64E350
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	4
sub_6AB8D0 endp

align 10h



sub_6AB930 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+8]
mov	eax, [esp+arg_0]
cmp	edx, [eax+8]
jnz	short loc_6AB984
mov	edx, [ecx+0Ch]
cmp	edx, [eax+0Ch]
jnz	short loc_6AB984
mov	edx, [ecx+10h]
cmp	edx, [eax+10h]
jnz	short loc_6AB984
mov	edx, [ecx+14h]
cmp	edx, [eax+14h]
jnz	short loc_6AB984
mov	edx, [ecx+18h]
cmp	edx, [eax+18h]
jnz	short loc_6AB984
mov	edx, [ecx+1Ch]
cmp	edx, [eax+1Ch]
jnz	short loc_6AB984
mov	edx, [ecx+20h]
cmp	edx, [eax+20h]
jnz	short loc_6AB984
mov	edx, [ecx+24h]
cmp	edx, [eax+24h]
jnz	short loc_6AB984
mov	ecx, [ecx+28h]
cmp	ecx, [eax+28h]
jnz	short loc_6AB984
mov	eax, 1
retn	4

loc_6AB984:
xor	eax, eax
retn	4
sub_6AB930 endp

align 10h



sub_6AB990 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, [edx+0Ch]
mov	ecx, [eax+28h]
xor	ecx, [eax+24h]
xor	ecx, [eax+20h]
xor	ecx, [eax+1Ch]
xor	ecx, [eax+18h]
xor	ecx, [eax+14h]
xor	ecx, [eax+10h]
xor	ecx, [eax+0Ch]
xor	ecx, [eax+8]
xor	ecx, [edx+8]
mov	eax, ecx
shr	eax, 7
xor	eax, ecx
retn	4
sub_6AB990 endp

align 10h



sub_6AB9C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, [eax]
jz	short loc_6AB9CD
xor	al, al
retn	8

loc_6AB9CD:
mov	ecx, [esp+arg_0]
mov	eax, [eax+4]
mov	edx, [ecx+8]
cmp	edx, [eax+8]
jnz	short loc_6AB9F4
mov	eax, [eax+0Ch]
mov	ecx, [ecx+0Ch]
push	eax
call	sub_6AB930
test	al, al
jz	short loc_6AB9F4
mov	eax, 1
retn	8

loc_6AB9F4:
xor	eax, eax
retn	8
sub_6AB9C0 endp

align 10h



sub_6ABA00 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+1Ch]
add	edi, 50h
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	esi, [esi+1Ch]
mov	ecx, [esi+48h]
xor	eax, eax
test	ecx, ecx
jbe	short loc_6ABA30
mov	edx, [esi+44h]
mov	esi, [esp+8+arg_0]

loc_6ABA24:
cmp	[edx], esi
jz	short loc_6ABA3E
inc	eax
add	edx, 4
cmp	eax, ecx
jb	short loc_6ABA24

loc_6ABA30:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
xor	al, al
pop	esi
retn	4

loc_6ABA3E:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
mov	al, 1
pop	esi
retn	4
sub_6ABA00 endp

align 10h



sub_6ABA50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [ecx+4]
push	esi
mov	esi, [eax+1Ch]
push	edi
lea	edi, [esi+50h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
push	edi		; lpCriticalSection
cmp	ebx, [esi+48h]
jb	short loc_6ABA79
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_6ABA79:
mov	ecx, [esi+44h]
mov	esi, [ecx+ebx*4]
call	ds:LeaveCriticalSection
test	esi, esi
jz	short loc_6ABABB
mov	edx, [esi+1Ch]
mov	eax, [edx+0Ch]
mov	ecx, [eax+20h]
cmp	dword ptr [ecx+10Ch], 0
jle	short loc_6ABABB
cmp	[esp+0Ch+arg_8], 0
mov	edi, [esp+0Ch+arg_0]
jz	short loc_6ABAB3
mov	edx, [edi]
mov	eax, [edx+5Ch]
mov	ecx, edi
call	eax
cmp	esi, eax
jz	short loc_6ABABB

loc_6ABAB3:
push	esi
mov	ecx, edi
call	sub_67F120

loc_6ABABB:
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_6ABA50 endp

align 10h



sub_6ABAD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_6ABAF8
push	edi
mov	edi, eax

loc_6ABAE4:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6ABAEF
call	sub_666B00

loc_6ABAEF:
sub	esi, 4
sub	edi, 1
jnz	short loc_6ABAE4
pop	edi

loc_6ABAF8:
pop	esi
retn
sub_6ABAD0 endp

align 10h



sub_6ABB00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6ABB30
mov	eax, [edi]
test	eax, eax
jz	short loc_6ABB25
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6ABB25:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6ABB30:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6ABB63
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6ABB63:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*8]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6ABB00 endp

align 10h



sub_6ABB90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6ABBC0
mov	eax, [edi]
test	eax, eax
jz	short loc_6ABBB5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6ABBB5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6ABBC0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6ABBF3
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6ABBF3:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 109h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6ABB90 endp

align 10h



sub_6ABC20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	ecx, [esp+arg_0]
call	sub_9B3060
test	eax, eax
jz	short locret_6ABC42
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	11h
mov	ecx, eax
call	edx

locret_6ABC42:
retn
sub_6ABC20 endp

align 10h



sub_6ABC50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*2]
cmp	dword ptr [esi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*4+8]
mov	eax, edx
jz	short loc_6ABC97
cmp	[ecx+4], edx
jnz	short loc_6ABC97
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_6ABC72:
cmp	[ecx+4], edx
jnz	short loc_6ABC7E
mov	ebx, [ecx+8]
cmp	ebx, [edi]
jz	short loc_6ABC91

loc_6ABC7E:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6ABC8E
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*4+8]
jmp	short loc_6ABC72

loc_6ABC8E:
or	eax, 0FFFFFFFFh

loc_6ABC91:
pop	ebx
pop	edi
pop	esi
retn	8

loc_6ABC97:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6ABC50 endp

align 10h



sub_6ABCA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
lea	edx, [edi+edi*2]
cmp	dword ptr [ecx+edx*4+8], 0FFFFFFFEh
lea	esi, [ecx+edx*4+8]
mov	eax, edi
mov	[esp+8+arg_4], ecx
jz	short loc_6ABD27
cmp	[esi+4], edi
jnz	short loc_6ABD27
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	ebx

loc_6ABCC7:
cmp	[esi+4], edi
jnz	short loc_6ABD0D
mov	edx, [ebp+0]
mov	ecx, [esi+8]
and	edx, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	edx, 8
add	ecx, 8
mov	edi, edi

loc_6ABCE0:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_6ABD00
test	bl, bl
jz	short loc_6ABCFC
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_6ABD00
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_6ABCE0

loc_6ABCFC:
xor	ecx, ecx
jmp	short loc_6ABD05

loc_6ABD00:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_6ABD05:
test	ecx, ecx
jz	short loc_6ABD20
mov	ecx, [esp+10h+arg_4]

loc_6ABD0D:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_6ABD1D
lea	edx, [eax+eax*2]
lea	esi, [ecx+edx*4+8]
jmp	short loc_6ABCC7

loc_6ABD1D:
or	eax, 0FFFFFFFFh

loc_6ABD20:
pop	ebx
pop	ebp
pop	edi
pop	esi
retn	8

loc_6ABD27:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6ABCA0 endp

align 10h



sub_6ABD30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
mov	ecx, edx
shl	ecx, 4
cmp	dword ptr [ecx+esi+8], 0FFFFFFFEh
lea	ecx, [ecx+esi+8]
mov	eax, edx
jz	short loc_6ABD7B
cmp	[ecx+4], edx
jnz	short loc_6ABD7B
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_6ABD54:
cmp	[ecx+4], edx
jnz	short loc_6ABD60
mov	ebx, [ecx+8]
cmp	ebx, [edi]
jz	short loc_6ABD75

loc_6ABD60:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6ABD72
mov	ecx, eax
shl	ecx, 4
lea	ecx, [ecx+esi+8]
jmp	short loc_6ABD54

loc_6ABD72:
or	eax, 0FFFFFFFFh

loc_6ABD75:
pop	ebx
pop	edi
pop	esi
retn	8

loc_6ABD7B:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6ABD30 endp

align 10h



sub_6ABD90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	[esi+4], edx
mov	ecx, [eax+8]
mov	[esi+8], ecx
mov	eax, [eax+0Ch]
mov	[esi+0Ch], eax
test	ecx, ecx
jnz	short loc_6ABDBC
test	eax, eax
jz	short loc_6ABDBC
mov	ecx, eax
call	sub_64A420

loc_6ABDBC:
mov	eax, esi
pop	esi
retn	4
sub_6ABD90 endp

align 10h



sub_6ABDD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [ecx]
push	ebx
mov	ebx, [esp+8+arg_4]
push	esi
lea	eax, [ebx+ebx*4]
cmp	dword ptr [edx+eax*4+8], 0FFFFFFFEh
lea	esi, [edx+eax*4+8]
push	edi
mov	[esp+10h+var_4], ecx
mov	edi, ebx
jz	short loc_6ABE47
cmp	[esi+4], ebx
jnz	short loc_6ABE47
push	ebp
mov	ebp, [esp+14h+arg_0]

loc_6ABDF8:
cmp	[esi+4], ebx
jnz	short loc_6ABE20
mov	eax, [ebp+0]
mov	eax, [eax]
mov	ecx, [esi+8]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6ABE32
mov	ecx, [esp+14h+var_4]

loc_6ABE20:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_6ABE3C
mov	eax, [ecx]
lea	edx, [edi+edi*4]
lea	esi, [eax+edx*4+8]
jmp	short loc_6ABDF8

loc_6ABE32:
pop	ebp
mov	eax, edi
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_6ABE3C:
pop	ebp
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
pop	ecx
retn	8

loc_6ABE47:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
pop	ecx
retn	8
sub_6ABDD0 endp

align 10h



sub_6ABE60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebp
mov	ebp, ecx
mov	edx, [ebp+0]
mov	ecx, eax
shl	ecx, 4
cmp	dword ptr [ecx+edx+8], 0FFFFFFFEh
push	esi
lea	esi, [ecx+edx+8]
push	edi
mov	edi, eax
jz	short loc_6ABED7
cmp	[esi+4], eax
jnz	short loc_6ABED7
push	ebx
mov	ebx, [esp+10h+arg_0]

loc_6ABE88:
cmp	[esi+4], eax
jnz	short loc_6ABEAF
mov	eax, [ebx]
mov	eax, [eax]
mov	ecx, [esi+8]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6ABEC4
mov	eax, [esp+10h+arg_4]

loc_6ABEAF:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_6ABECD
mov	edx, [ebp+0]
mov	ecx, edi
shl	ecx, 4
lea	esi, [ecx+edx+8]
jmp	short loc_6ABE88

loc_6ABEC4:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn	8

loc_6ABECD:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8

loc_6ABED7:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8
sub_6ABE60 endp




sub_6ABEE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	al, [ecx+24h]
test	al, al
mov	eax, [esp+arg_4]
jz	short loc_6ABF23
mov	edx, [ecx+4]
cmp	eax, edx
jnb	short loc_6ABF23
mov	ecx, [ecx+8]
push	esi
lea	esi, [ecx+eax*8]
mov	ecx, [esi]
push	edi
test	ecx, ecx
jz	short loc_6ABF05
call	sub_64A420

loc_6ABF05:
mov	edi, [esp+8+arg_0]
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6ABF14
call	sub_666B00

loc_6ABF14:
mov	edx, [esi]
mov	[edi], edx
mov	eax, [esi+4]
mov	[edi+4], eax
pop	edi
pop	esi
retn	8

loc_6ABF23:
mov	[esp+arg_4], eax
jmp	sub_714030
sub_6ABEE0 endp

align 10h



sub_6ABF30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [ecx+4]
sub	esp, 8
cmp	dword ptr [ecx], 0
jz	short loc_6ABF6D
push	esi
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, [esp+14h+arg_0]
mov	[esp+14h+var_8], 0
mov	[esp+14h+var_4], 0
call	sub_6ABEE0
mov	ecx, [esp+0Ch+var_8]
mov	esi, ecx
test	ecx, ecx
jz	short loc_6ABF6A
call	sub_666B00

loc_6ABF6A:
mov	eax, esi
pop	esi

loc_6ABF6D:
add	esp, 8
retn	4
sub_6ABF30 endp

align 10h



sub_6ABF80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
cmp	dword ptr [ecx], 0
jnz	short loc_6ABF9B
mov	eax, [esp+8+arg_4]
mov	edx, [esp+8+arg_0]
mov	[eax], edx
mov	eax, [ecx+4]
add	esp, 8
retn	8

loc_6ABF9B:
mov	eax, [ecx+4]
push	esi
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, [esp+14h+arg_0]
mov	[esp+14h+var_8], 0
mov	[esp+14h+var_4], 0
call	sub_6ABEE0
mov	ecx, [esp+0Ch+var_8]
mov	edx, [esp+0Ch+arg_4]
mov	eax, [esp+0Ch+var_4]
mov	[edx], eax
mov	esi, ecx
test	ecx, ecx
jz	short loc_6ABFD7
call	sub_666B00

loc_6ABFD7:
mov	eax, esi
pop	esi
add	esp, 8
retn	8
sub_6ABF80 endp




sub_6ABFE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437E78
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6AC003
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AC003:
mov	eax, esi
pop	esi
retn	4
sub_6ABFE0 endp

align 10h



sub_6AC010 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [ecx+20h]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
push	esi
call	sub_6AB4C0
mov	eax, esi
pop	esi
retn	8
sub_6AC010 endp

align 10h



sub_6AC030 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [ecx+20h]
push	edi
lea	edi, [esi+0DCh]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esp+8+arg_4]
push	edi		; lpCriticalSection
cmp	eax, [esi+104h]
jb	short loc_6AC05C
call	ds:LeaveCriticalSection
pop	edi
xor	al, al
pop	esi
retn	8

loc_6AC05C:
mov	ecx, [esi+100h]
mov	edx, [ecx+eax*8]
lea	eax, [ecx+eax*8]
mov	ecx, [esp+0Ch+arg_0]
mov	[ecx], edx
mov	eax, [eax+4]
mov	[ecx+4], eax
call	ds:LeaveCriticalSection
pop	edi
mov	al, 1
pop	esi
retn	8
sub_6AC030 endp

align 10h



sub_6AC090 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx+20h]
test	edi, edi
jz	short loc_6AC0C0
push	esi
mov	esi, [edi+78h]
add	esi, 8
mov	ecx, esi
call	sub_64D770
mov	ecx, [edi+78h]
mov	eax, [esp+8+arg_0]
add	ecx, 1Ch
mov	[edi+74h], eax
call	sub_64D8F0
mov	ecx, esi
call	sub_64E350
pop	esi

loc_6AC0C0:
pop	edi
retn	4
sub_6AC090 endp

align 10h



sub_6AC0D0 proc	near
mov	eax, 8500h
retn
sub_6AC0D0 endp

align 10h



sub_6AC0E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6AB190
test	[esp+4+arg_0], 1
jz	short loc_6AC0FD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AC0FD:
mov	eax, esi
pop	esi
retn	4
sub_6AC0E0 endp

align 10h



sub_6AC110 proc	near
mov	eax, [ecx+10h]
mov	edx, [eax+3Ch]
add	ecx, 10h
jmp	edx
sub_6AC110 endp

align 10h



sub_6AC120 proc	near
mov	eax, [ecx+10h]
mov	edx, [eax+40h]
add	ecx, 10h
jmp	edx
sub_6AC120 endp

align 10h



sub_6AC130 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_711380
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1436C18
jz	short loc_6AC156
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AC156:
mov	eax, esi
pop	esi
retn	4
sub_6AC130 endp

align 10h



sub_6AC160 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+1Ch]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+20h]
fstp	dword ptr [eax+0Ch]
retn	4
sub_6AC160 endp

align 10h



sub_6AC180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	[esi+4], edx
fld	dword ptr [eax+0Ch]
fstp	[esp+0Ch+arg_0]
push	0
fld	dword ptr [eax+10h]
fstp	[esp+10h+var_8]
fld	dword ptr [eax+14h]
fstp	[esp+10h+var_4]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+8]
fld	[esp+10h+arg_0]
fstp	dword ptr [esi+0Ch]
fld	[esp+10h+var_8]
fstp	dword ptr [esi+10h]
fld	[esp+10h+var_4]
fstp	dword ptr [esi+14h]
fld	dword ptr [eax+18h]
fstp	dword ptr [esi+18h]
mov	ecx, [eax+1Ch]
mov	[esi+1Ch], ecx
mov	edx, [eax+20h]
mov	[esi+20h], edx
mov	ecx, [eax+34h]
mov	edx, [eax+28h]
push	ecx
mov	ecx, [eax+2Ch]
push	edx
mov	edx, [eax+24h]
movzx	eax, word ptr [eax+30h]
push	ecx
push	edx
push	eax
lea	ecx, [esi+24h]
call	sub_704FB0
mov	eax, esi
pop	esi
add	esp, 8
retn	4
sub_6AC180 endp

align 10h



sub_6AC200 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_1437EF0
mov	dword ptr [esi+0Ch], offset off_1437ED8
call	sub_6AB820
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6AC224
call	sub_64A430

loc_6AC224:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6AC230
call	sub_64A430

loc_6AC230:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6AC23C
call	sub_64A430

loc_6AC23C:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6AC248
call	sub_64A430

loc_6AC248:
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+0Ch], offset off_1437474
pop	esi
retn
sub_6AC200 endp

align 10h



sub_6AC260 proc	near
mov	eax, 300h
retn
sub_6AC260 endp

align 10h



sub_6AC270 proc	near
sub	ecx, 0Ch
jmp	sub_6ACCB0
sub_6AC270 endp

align 10h



sub_6AC280 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx+20h]
mov	eax, [edx+1Ch]
retn
sub_6AC280 endp

align 10h



sub_6AC290 proc	near
mov	eax, [ecx+1Ch]
mov	eax, [eax+8]
retn
sub_6AC290 endp

align 10h



sub_6AC2A0 proc	near
mov	eax, [ecx+1Ch]
mov	eax, [eax+0Ch]
retn
sub_6AC2A0 endp

align 10h



sub_6AC2B0 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
jmp	eax
sub_6AC2B0 endp

align 10h



sub_6AC2C0 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx+20h]
fld	dword ptr [edx+40h]
retn
sub_6AC2C0 endp

align 10h



sub_6AC2D0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4

push	ecx
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
fld	dword ptr [eax+38h]
add	eax, 30h
fsub	dword ptr [eax]
sub	esp, 8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fdiv	ds:dbl_15FCE20
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
call	_ceil
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
add	esp, 0Ch
retn
sub_6AC2D0 endp

align 10h



sub_6AC310 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4

push	ecx
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
fld	dword ptr [eax+3Ch]
add	eax, 30h
fsub	dword ptr [eax+4]
sub	esp, 8
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fdiv	ds:dbl_15FCE20
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_C]
call	_ceil
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
add	esp, 0Ch
retn
sub_6AC310 endp




sub_6AC350 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+20h]
jmp	eax
sub_6AC350 endp

align 10h



sub_6AC360 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+44h]
jmp	eax
sub_6AC360 endp

align 10h



sub_6AC370 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx+20h]
mov	eax, [edx+24h]
and	eax, 0FFFFFFFCh
add	eax, 8
retn
sub_6AC370 endp

align 10h



sub_6AC390 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
mov	eax, [ecx+4Ch]
add	ecx, 4Ch
neg	eax
sbb	eax, eax
and	eax, ecx
retn
sub_6AC390 endp

align 10h



sub_6AC3B0 proc	near
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_6AC3BB
add	eax, 8
retn

loc_6AC3BB:
xor	eax, eax
retn
sub_6AC3B0 endp

align 10h



sub_6AC3C0 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx+20h]
mov	eax, [edx+74h]
retn
sub_6AC3C0 endp

align 10h



sub_6AC3D0 proc	near
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
jmp	sub_6AB2D0
sub_6AC3D0 endp

align 10h



sub_6AC3E0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+20h]
fld	dword ptr [ecx+30h]
add	ecx, 30h
fld	ds:dbl_15FCE20
mov	eax, [esp+arg_0]
fdiv	st(1), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [ecx+4]
fdiv	st, st(1)
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
fdiv	st, st(1)
fstp	dword ptr [eax+8]
fdivr	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_6AC3E0 endp

align 10h



sub_6AC420 proc	near
mov	eax, [ecx+1Ch]
add	eax, 7Ch
mov	eax, [eax]
retn
sub_6AC420 endp

align 10h



sub_6AC430 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
mov	eax, [eax+0Ch]
push	edi
mov	edx, 1
jz	short loc_6AC457
mov	ecx, [eax+20h]
cmp	[ecx+80h], edx
jg	short loc_6AC457
mov	[ecx+88h], dl

loc_6AC457:
mov	eax, [eax+20h]
cmp	[eax+80h], edx
jg	short loc_6AC46D
mov	ecx, [eax+90h]
call	sub_6AAEB0

loc_6AC46D:
mov	ecx, [esi+1Ch]
mov	esi, [ecx+78h]
lea	edi, [esi+8]
mov	ecx, edi
call	sub_64D770
cmp	byte ptr [esi+20h], 0
jnz	short loc_6AC498
push	ebx
lea	ebx, [esi+1Ch]

loc_6AC487:
push	0FFFFFFFFh
push	edi
mov	ecx, ebx
call	sub_64DCA0
cmp	byte ptr [esi+20h], 0
jz	short loc_6AC487
pop	ebx

loc_6AC498:
mov	ecx, edi
call	sub_64E350
pop	edi
pop	esi
retn	4
sub_6AC430 endp

align 10h



sub_6AC4B0 proc	near
mov	ecx, [ecx+1Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+20h]
jmp	sub_6AB3D0
sub_6AC4B0 endp

align 10h



sub_6AC4C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+1Ch]
mov	edx, [esp+arg_0]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
push	esi
mov	esi, [esp+4+arg_4]
test	edx, edx
jnz	short loc_6AC4DD
mov	eax, [eax+7Ch]
pop	esi
retn	8

loc_6AC4DD:
mov	ecx, [eax+7Ch]
cmp	esi, ecx
jb	short loc_6AC4E6
mov	esi, ecx

loc_6AC4E6:
mov	eax, [eax+78h]
test	eax, eax
jz	short loc_6AC4F8
push	esi
push	eax
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_6AC4F8:
mov	eax, esi
pop	esi
retn	8
sub_6AC4C0 endp

align 10h



sub_6AC500 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	eax, [ebp+0]
mov	edx, [eax+5Ch]
push	esi
push	edi
mov	edi, ecx
mov	ecx, ebp
call	edx
mov	esi, [eax+1Ch]
mov	ebx, [edi+4]
lea	edi, [esi+50h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
push	edi		; lpCriticalSection
cmp	ebx, [esi+48h]
jb	short loc_6AC537
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_6AC537:
mov	eax, [esi+44h]
mov	ebx, [eax+ebx*4]
call	ds:LeaveCriticalSection
test	ebx, ebx
jz	short loc_6AC561
mov	ecx, [ebx+1Ch]
mov	edx, [ecx+0Ch]
mov	eax, [edx+20h]
cmp	dword ptr [eax+10Ch], 0
jle	short loc_6AC561
push	ebx
mov	ecx, ebp
call	sub_67F120

loc_6AC561:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6AC500 endp

align 10h



sub_6AC570 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_6AC598
push	edi
mov	edi, eax

loc_6AC584:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6AC58F
call	sub_666B00

loc_6AC58F:
sub	esi, 4
sub	edi, 1
jnz	short loc_6AC584
pop	edi

loc_6AC598:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
retn
sub_6AC570 endp

align 10h



sub_6AC5B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
lea	ecx, [eax+eax*2]
push	edi
lea	edi, [edx+ecx*4-0Ch]
test	eax, eax
jbe	short loc_6AC5FB
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	ebp
push	esi
mov	ebp, eax
nop

loc_6AC5D0:
mov	esi, [edi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AC5F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AC5F0:
sub	edi, 0Ch
sub	ebp, 1
jnz	short loc_6AC5D0
pop	esi
pop	ebp
pop	ebx

loc_6AC5FB:
pop	edi
retn
sub_6AC5B0 endp

align 10h



sub_6AC600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6AC63E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_6ABAD0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_6AC657
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_6ABB90
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6AC63E:
cmp	esi, [edi+8]
jb	short loc_6AC657
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_6ABB90

loc_6AC657:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6AC600 endp

align 10h



sub_6AC660 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6AC690
mov	eax, [edi]
test	eax, eax
jz	short loc_6AC685
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6AC685:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6AC690:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6AC6C3
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6AC6C3:
lea	eax, [esp+8+arg_4]
push	eax
mov	[esp+0Ch+arg_4], 109h
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, ds:0[esi*4]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6AC660 endp

align 10h



sub_6AC6F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6AC72E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_6ABAD0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_6AC747
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_6AC660
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6AC72E:
cmp	esi, [edi+8]
jb	short loc_6AC747
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_6AC660

loc_6AC747:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6AC6F0 endp

align 10h



sub_6AC750 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_6AC75E
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_6AC75E:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 4
mov	edx, 1505h
mov	edi, edi

loc_6AC770:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_6AC770
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_6ABC50
pop	esi
pop	ebx
pop	edi
retn	4
sub_6AC750 endp

align 10h



sub_6AC7A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
mov	ecx, edx
shl	ecx, 4
cmp	dword ptr [ecx+esi+8], 0FFFFFFFEh
lea	ecx, [ecx+esi+8]
mov	eax, edx
jz	short loc_6AC7EF
cmp	[ecx+4], edx
jnz	short loc_6AC7EF
push	edi
mov	edi, [esp+8+arg_0]
push	ebx
push	ebp

loc_6AC7C5:
cmp	[ecx+4], edx
jnz	short loc_6AC7D3
mov	ebx, [edi]
mov	ebp, [ecx+8]
cmp	ebp, [ebx]
jz	short loc_6AC7E8

loc_6AC7D3:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6AC7E5
mov	ecx, eax
shl	ecx, 4
lea	ecx, [ecx+esi+8]
jmp	short loc_6AC7C5

loc_6AC7E5:
or	eax, 0FFFFFFFFh

loc_6AC7E8:
pop	ebp
pop	ebx
pop	edi
pop	esi
retn	8

loc_6AC7EF:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6AC7A0 endp

align 10h



sub_6AC800 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
lea	ebx, [eax+8]
lea	esi, [edi+8]
push	ebx
mov	ecx, esi
mov	[edi+4], edx
call	sub_67ABE0
mov	eax, [ebx+4]
mov	[esi+4], eax
mov	ecx, [ebx+8]
mov	[esi+8], ecx
test	eax, eax
jnz	short loc_6AC83A
test	ecx, ecx
jz	short loc_6AC83A
call	sub_64A420

loc_6AC83A:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_6AC800 endp

align 10h



sub_6AC850 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	[edi], eax
mov	ecx, [ebx]
lea	esi, [edi+8]
push	ecx
mov	ecx, esi
call	sub_67ABE0
mov	eax, [ebx+4]
mov	edx, [eax]
mov	[esi+4], edx
mov	eax, [eax+4]
mov	[esi+8], eax
test	edx, edx
jnz	short loc_6AC889
test	eax, eax
jz	short loc_6AC889
mov	ecx, eax
call	sub_64A420

loc_6AC889:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_6AC850 endp

align 10h



sub_6AC8A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
push	edi
mov	[esi], ecx
mov	edx, [eax+4]
lea	edi, [eax+8]
lea	ebx, [esi+8]
push	edi
mov	ecx, ebx
mov	[esi+4], edx
call	sub_67AF90
mov	al, [edi+4]
mov	[ebx+4], al
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6AC8A0 endp

align 10h



sub_6AC8D0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_6AC926
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6AC8E4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6AC909
cmp	dword ptr [esi+8], 0
jnz	short loc_6AC903
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6AC903
call	sub_666B00

loc_6AC903:
mov	dword ptr [esi], 0FFFFFFFEh

loc_6AC909:
add	edi, 10h
sub	ebp, 1
jnz	short loc_6AC8E4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_6AC926:
pop	ebx
retn
sub_6AC8D0 endp

align 10h



sub_6AC930 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
mov	edi, [ecx]
mov	ecx, esi
shl	ecx, 4
cmp	dword ptr [ecx+edi+8], 0FFFFFFFEh
lea	ecx, [ecx+edi+8]
mov	eax, esi
jz	short loc_6AC98B
mov	edx, [ecx+4]
mov	ebx, [edi+4]
mov	ebp, edx
shr	ebp, 8
xor	ebp, edx
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_6AC98B
nop

loc_6AC960:
mov	edx, [ecx+4]
mov	ebp, edx
shr	ebp, 8
xor	ebp, edx
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_6AC979
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_6AC98E

loc_6AC979:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6AC98B
mov	ecx, eax
shl	ecx, 4
lea	ecx, [ecx+edi+8]
jmp	short loc_6AC960

loc_6AC98B:
or	eax, 0FFFFFFFFh

loc_6AC98E:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6AC930 endp

align 10h



sub_6AC9A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+1Ch]
call	sub_64DF80
lea	ecx, [esi+8]
call	sub_64DF30
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6AC9CF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AC9CF:
mov	eax, esi
pop	esi
retn	4
sub_6AC9A0 endp

align 10h



sub_6AC9E0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	dword ptr [esi], offset	off_1437F68
mov	eax, [ecx]
mov	edx, [eax+14h]
push	0
call	edx
mov	dword ptr [esi+18h], offset off_1437D84
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6ACA08
call	sub_64A400

loc_6ACA08:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6ACA14
call	sub_64A430

loc_6ACA14:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6ACA20
call	sub_64A430

loc_6ACA20:
mov	dword ptr [esi], offset	off_1437E78
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6AC9E0 endp

align 10h



sub_6ACA30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6AC9E0
test	[esp+4+arg_0], 1
jz	short loc_6ACA4D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6ACA4D:
mov	eax, esi
pop	esi
retn	4
sub_6ACA30 endp

align 10h



sub_6ACA60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	edi
mov	esi, ecx
push	eax
lea	ecx, [esi+28h]
call	sub_6AC180
mov	edi, [esi+90h]
mov	ebx, [esi+84h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [esi+90h]
add	ecx, 1Ch
mov	[esi+84h], ebx
mov	dword ptr [esi+80h], 1
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350
pop	edi
pop	esi
pop	ebx
retn	4
sub_6ACA60 endp

align 10h



sub_6ACAC0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0A4h]
test	eax, eax
jz	short loc_6ACADF
lea	ebx, [ebx+0]

loc_6ACAD0:
mov	ecx, [eax]
cmp	ecx, [esp+arg_0]
jz	short loc_6ACAE4
mov	eax, [eax+0Ch]
test	eax, eax
jnz	short loc_6ACAD0

loc_6ACADF:
xor	eax, eax
retn	4

loc_6ACAE4:
mov	eax, [eax+4]
retn	4
sub_6ACAC0 endp

align 10h



sub_6ACAF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_155F500
lea	edi, [esi+8]
mov	ecx, edi
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437F6C
call	sub_679E30
mov	eax, [esp+8+arg_0]
mov	dword ptr [esi+0Ch], 0
mov	dword ptr [esi+18h], 0
push	eax
mov	ecx, edi
mov	dword ptr [esi+1Ch], 0
call	sub_67A2C0
mov	edi, [esp+8+arg_C]
mov	ecx, [esp+8+arg_4]
mov	edx, [esp+8+arg_8]
mov	[esi+10h], ecx
mov	[esi+14h], edx
test	edi, edi
jz	short loc_6ACB4F
mov	ecx, edi
call	sub_64A420

loc_6ACB4F:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6ACB5B
call	sub_64A430

loc_6ACB5B:
mov	[esi+0Ch], edi
mov	edi, [esp+8+arg_10]
test	edi, edi
jz	short loc_6ACB6D
mov	ecx, edi
call	sub_64A420

loc_6ACB6D:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6ACB79
call	sub_64A430

loc_6ACB79:
mov	[esi+18h], edi
mov	edi, [esp+8+arg_14]
test	edi, edi
jz	short loc_6ACB8B
mov	ecx, edi
call	sub_64A420

loc_6ACB8B:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6ACB97
call	sub_64A430

loc_6ACB97:
mov	[esi+1Ch], edi
pop	edi
mov	eax, esi
pop	esi
retn	18h
sub_6ACAF0 endp

align 10h



sub_6ACBB0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
push	edi
test	ecx, ecx
jz	short loc_6ACBC0
call	sub_64A430

loc_6ACBC0:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6ACBCC
call	sub_64A430

loc_6ACBCC:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6ACBD8
call	sub_64A430

loc_6ACBD8:
mov	edi, [esi+8]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6ACBFD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6ACBFD:
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6ACBB0 endp

align 10h



sub_6ACC10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6ACBB0
test	[esp+4+arg_0], 1
jz	short loc_6ACC2D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6ACC2D:
mov	eax, esi
pop	esi
retn	4
sub_6ACC10 endp

align 10h



sub_6ACC40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	edi
push	0
push	20h
call	edx
test	eax, eax
jz	short loc_6ACC80
mov	ecx, [esp+8+arg_18]
mov	edx, [esp+8+arg_14]
push	ecx
mov	ecx, [esp+0Ch+arg_10]
push	edx
mov	edx, [esp+10h+arg_C]
push	ecx
mov	ecx, [esp+14h+arg_8]
push	edx
mov	edx, [esp+18h+arg_4]
push	ecx
push	edx
mov	ecx, eax
call	sub_6ACAF0
mov	esi, eax
jmp	short loc_6ACC82

loc_6ACC80:
xor	esi, esi

loc_6ACC82:
mov	edi, [esp+8+arg_0]
push	esi
push	offset off_167D784
mov	ecx, edi
call	sub_666020
test	esi, esi
jz	short loc_6ACC9E
mov	ecx, esi
call	sub_64A430

loc_6ACC9E:
mov	eax, edi
pop	edi
pop	esi
retn
sub_6ACC40 endp

align 10h



sub_6ACCB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6AC200
test	[esp+4+arg_0], 1
jz	short loc_6ACCCD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6ACCCD:
mov	eax, esi
pop	esi
retn	4
sub_6ACCB0 endp

align 10h



sub_6ACCE0 proc	near

var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20h
movzx	eax, byte ptr [esp+20h+arg_8]
push	ebx
mov	ebx, [esp+24h+arg_4]
neg	eax
push	ebp
push	esi
sbb	eax, eax
push	edi
and	eax, 1000h
or	eax, 3
mov	ecx, 8
mov	esi, ebx
lea	edi, [esp+30h+var_20]
rep movsd
or	[esp+30h+var_20], eax
mov	ecx, dword_1855FC0
lea	eax, [esp+30h+var_20]
push	eax
mov	eax, [esp+34h+arg_0]
mov	[esp+34h+var_8], 3
mov	[esp+34h+var_C], 20000h
mov	edx, [ecx]
mov	edx, [edx+10h]
push	eax
call	edx
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+28h]
xor	ebp, ebp
push	ebp
push	30h
mov	ecx, esi
call	edx
cmp	eax, ebp
jz	short loc_6ACD87
fld	ds:dword_15FCCC0
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1437F68
mov	[eax+8], ebp
mov	[eax+0Ch], ebp
mov	[eax+10h], ebp
mov	[eax+14h], ebp
fstp	dword ptr [eax+2Ch]
mov	dword ptr [eax+18h], offset off_1437DD8
mov	[eax+20h], ebp
mov	[eax+24h], ebp
mov	[eax+28h], ebp
mov	[eax+1Ch], eax
mov	edi, eax
jmp	short loc_6ACD89

loc_6ACD87:
xor	edi, edi

loc_6ACD89:
mov	[edi+8], esi
mov	eax, [esi]
mov	edx, [eax+28h]
push	ebp
push	4Ch
mov	ecx, esi
call	edx
cmp	eax, ebp
jz	short loc_6ACDA9
mov	ecx, eax
call	sub_66D7F0
mov	[esp+30h+arg_8], eax
jmp	short loc_6ACDAD

loc_6ACDA9:
mov	[esp+30h+arg_8], ebp

loc_6ACDAD:
mov	ecx, [edi+0Ch]
cmp	ecx, ebp
jz	short loc_6ACDB9
call	sub_64A430

loc_6ACDB9:
mov	eax, [esp+30h+arg_8]
mov	[edi+0Ch], eax
mov	ecx, [ebx+24h]
mov	edx, [ebx+28h]
push	ecx
push	edx
mov	ecx, eax
call	sub_668330
mov	eax, [esi]
mov	edx, [eax+28h]
push	ebp
push	2Ch
mov	ecx, esi
call	edx
cmp	eax, ebp
jz	short loc_6ACDED
push	esi
mov	ecx, eax
call	sub_651650
mov	[esp+30h+arg_8], eax
jmp	short loc_6ACDF1

loc_6ACDED:
mov	[esp+30h+arg_8], ebp

loc_6ACDF1:
mov	ecx, [edi+10h]
cmp	ecx, ebp
jz	short loc_6ACDFD
call	sub_64A430

loc_6ACDFD:
mov	eax, [esp+30h+arg_8]
mov	[edi+10h], eax
mov	ecx, [ebx+14h]
mov	[edi+20h], ecx
fld	dword ptr [ebx+20h]
fstp	dword ptr [edi+2Ch]
mov	edx, [esi]
mov	edx, [edx+14h]
lea	eax, [edi+18h]
push	eax
mov	ecx, esi
call	edx
push	edi
mov	ecx, esi
call	sub_64A350
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	0Ch
sub_6ACCE0 endp

align 10h



sub_6ACE40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
mov	[ecx+80h], eax
add	ecx, 7Ch
mov	[esp+arg_4], edx
mov	[esp+arg_0], ecx
jmp	ds:InterlockedExchange
sub_6ACE40 endp

align 10h



sub_6ACE60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6ACE6F
call	sub_64A430

loc_6ACE6F:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6ACE7B
call	sub_666B00

loc_6ACE7B:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6ACE97
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6ACE97:
mov	eax, esi
pop	esi
retn	4
sub_6ACE60 endp

align 10h



sub_6ACEA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	edi
push	0
push	10h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6ACEF2
mov	edi, [esp+8+arg_4]
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437F70
test	edi, edi
jz	short loc_6ACEDB
mov	ecx, edi
call	sub_64A420

loc_6ACEDB:
mov	[esi+8], edi
mov	edi, [esp+8+arg_8]
test	edi, edi
jz	short loc_6ACEED
mov	ecx, edi
call	sub_64A420

loc_6ACEED:
mov	[esi+0Ch], edi
jmp	short loc_6ACEF4

loc_6ACEF2:
xor	esi, esi

loc_6ACEF4:
mov	edi, [esp+8+arg_0]
push	esi
push	offset off_167D788
mov	ecx, edi
call	sub_666020
test	esi, esi
jz	short loc_6ACF10
mov	ecx, esi
call	sub_64A430

loc_6ACF10:
mov	eax, edi
pop	edi
pop	esi
retn
sub_6ACEA0 endp

align 10h



sub_6ACF20 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
xor	edx, edx
cmp	eax, edx
jnz	short loc_6ACF34
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	[eax+4], edx
retn	4

loc_6ACF34:
push	esi
mov	esi, [eax+4]
add	eax, 8
jmp	short loc_6ACF40
align 10h

loc_6ACF40:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_6ACF4D
inc	edx
add	eax, 10h
cmp	edx, esi
jbe	short loc_6ACF40

loc_6ACF4D:
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	esi
mov	[eax+4], edx
retn	4
sub_6ACF20 endp

align 10h



sub_6ACF60 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_6ACF7C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6ACF91
push	esi
jmp	short loc_6ACF8B

loc_6ACF7C:
cmp	esi, [edi+8]
jb	short loc_6ACF91
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6ACF8B:
push	edi
call	sub_6ABB00

loc_6ACF91:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_6ACFB4
sub	esi, ebx
mov	edx, [edi]
lea	eax, [edx+ebx*8]
jz	short loc_6ACFB4
xor	ecx, ecx

loc_6ACFA3:
cmp	eax, ecx
jz	short loc_6ACFAC
mov	[eax], ecx
mov	[eax+4], ecx

loc_6ACFAC:
add	eax, 8
sub	esi, 1
jnz	short loc_6ACFA3

loc_6ACFB4:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6ACF60 endp

align 10h



sub_6ACFC0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_6AC750
test	eax, eax
jl	short loc_6ACFDE
mov	edx, [esi]
lea	ecx, [eax+eax*2]
lea	eax, [edx+ecx*4+10h]
pop	esi
retn	4

loc_6ACFDE:
xor	eax, eax
pop	esi
retn	4
sub_6ACFC0 endp

align 10h



sub_6ACFF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
jz	short loc_6AD042
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	eax, [eax]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esi]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6ABDD0
pop	edi
test	eax, eax
jl	short loc_6AD042
mov	ecx, [esi]
lea	eax, [eax+eax*4]
lea	eax, [ecx+eax*4+10h]
pop	esi
retn	4

loc_6AD042:
xor	eax, eax
pop	esi
retn	4
sub_6ACFF0 endp

align 10h



sub_6AD050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
jz	short loc_6AD0A4
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi]
mov	eax, [eax]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esi]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6ABDD0
pop	edi
test	eax, eax
jl	short loc_6AD0A4
mov	ecx, [esp+4+arg_0]
mov	[ecx], esi
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	8

loc_6AD0A4:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
pop	esi
retn	8
sub_6AD050 endp

align 10h



sub_6AD0C0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_6AD0CE
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_6AD0CE:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 4
mov	edx, 1505h
mov	edi, edi

loc_6AD0E0:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_6AD0E0
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_6ABD30
pop	esi
pop	ebx
pop	edi
retn	4
sub_6AD0C0 endp

align 10h



sub_6AD110 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
jz	short loc_6AD15F
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	eax, [eax]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esi]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6ABE60
pop	edi
test	eax, eax
jl	short loc_6AD15F
inc	eax
shl	eax, 4
add	eax, [esi]
pop	esi
retn	4

loc_6AD15F:
xor	eax, eax
pop	esi
retn	4
sub_6AD110 endp

align 10h



sub_6AD170 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
jz	short loc_6AD1C4
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi]
mov	eax, [eax]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esi]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6ABE60
pop	edi
test	eax, eax
jl	short loc_6AD1C4
mov	ecx, [esp+4+arg_0]
mov	[ecx], esi
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	8

loc_6AD1C4:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
pop	esi
retn	8
sub_6AD170 endp

align 10h



sub_6AD1E0 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_6AD25E
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
jmp	short loc_6AD200
align 10h

loc_6AD200:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_6AD239
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AD233
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AD233:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6AD239:
add	ebx, 10h
sub	[esp+14h+var_4], 1
jnz	short loc_6AD200
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_6AD25E:
pop	ebp
pop	ecx
retn
sub_6AD1E0 endp

align 10h



sub_6AD270 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_6AD2EE
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
jmp	short loc_6AD290
align 10h

loc_6AD290:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_6AD2C9
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AD2C3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AD2C3:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6AD2C9:
add	ebx, 0Ch
sub	[esp+14h+var_4], 1
jnz	short loc_6AD290
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_6AD2EE:
pop	ebp
pop	ecx
retn
sub_6AD270 endp

align 10h



sub_6AD300 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+1Ch]
mov	eax, [eax+30h]
push	edx
call	eax
mov	esi, [edi+18h]
mov	ebx, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AD33D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AD33D:
mov	esi, [edi+14h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AD35E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AD35E:
pop	edi
pop	esi
pop	ebx
retn
sub_6AD300 endp

align 10h



sub_6AD370 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+18h]
mov	ecx, [ecx+1Ch]
mov	edx, [ecx+0Ch]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
push	edx
push	esi
call	sub_6ACEA0
add	esp, 0Ch
mov	eax, esi
pop	esi
retn	4
sub_6AD370 endp

align 10h



sub_6AD390 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	ecx, ebp
call	sub_6FD640
mov	ecx, ebp
mov	byte ptr [esp+10h+arg_0], 1
call	sub_6FD360
mov	edi, eax
test	edi, edi
jz	short loc_6AD3DA
mov	eax, [esi+84h]
mov	[edi], eax
mov	eax, [ebp+324h]
test	eax, eax
jnz	short loc_6AD3C8
lea	eax, [ebp+28h]

loc_6AD3C8:
mov	ecx, [eax+34h]
sub	ecx, [eax+30h]
sub	ecx, [ebp+26Ch]
add	ecx, [eax+2Ch]
mov	[edi+4], ecx

loc_6AD3DA:
mov	ebp, [esi+90h]
add	ebp, 8
mov	ecx, ebp
call	sub_64D770
mov	bl, [esp+10h+arg_4]
test	edi, edi
jz	short loc_6AD431
cmp	dword ptr [esi+94h], 0
lea	eax, [esi+94h]
push	edi		; Value
jnz	short loc_6AD405
push	eax
jmp	short loc_6AD40F

loc_6AD405:
mov	edx, [esi+98h]
add	edx, 20h
push	edx		; Target

loc_6AD40F:
call	ds:InterlockedExchange
inc	dword ptr [esi+84h]
mov	[esi+98h], edi
test	bl, bl
jz	short loc_6AD458
mov	dword ptr [esi+80h], 2
jmp	short loc_6AD440

loc_6AD431:
mov	dword ptr [esi+80h], 4
mov	byte ptr [esp+10h+arg_0], 0

loc_6AD440:
test	bl, bl
jnz	short loc_6AD44A
cmp	byte ptr [esp+10h+arg_0], bl
jnz	short loc_6AD458

loc_6AD44A:
mov	ecx, [esi+90h]
add	ecx, 1Ch
call	sub_64D8F0

loc_6AD458:
mov	ecx, ebp
call	sub_64E350
mov	al, byte ptr [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6AD390 endp

align 10h



sub_6AD470 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_6AD48E
call	sub_6AC8D0
pop	edi
add	esp, 0Ch
retn	8

loc_6AD48E:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_6AD49C
mov	esi, 8
jmp	short loc_6AD501

loc_6AD49C:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6AD4AF
fadd	ds:flt_15FCC08

loc_6AD4AF:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6AD501:
mov	ecx, dword_1855FC0
mov	ebp, [esp+18h+arg_0]
lea	edx, [esp+18h+var_8]
push	edx
mov	edx, esi
shl	edx, 4
add	edx, 8
mov	[esp+1Ch+arg_4], 0
mov	dword ptr [esp+1Ch+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+18h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_6AD564
xor	eax, eax
jmp	short loc_6AD550
align 10h

loc_6AD550:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_6AD550

loc_6AD564:
mov	eax, [edi]
test	eax, eax
jz	short loc_6AD5D6
mov	eax, [eax+4]
push	ebx
xor	edi, edi
lea	ebx, [eax+1]

loc_6AD573:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6AD5B5
mov	ecx, [esi+4]
lea	eax, [esi+4]
mov	edx, ecx
shr	edx, 8
xor	edx, ecx
push	edx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_6AE480
cmp	dword ptr [esi+8], 0
jnz	short loc_6AD5AF
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6AD5AF
call	sub_666B00

loc_6AD5AF:
mov	dword ptr [esi], 0FFFFFFFEh

loc_6AD5B5:
add	edi, 10h
sub	ebx, 1
jnz	short loc_6AD573
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_6AD5D6:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_6AC8D0
pop	esi
pop	ebp
pop	edi
add	esp, 0Ch
retn	8
sub_6AD470 endp

align 10h



sub_6AD600 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+18h+var_C], edi
cmp	eax, ebx
jnz	short loc_6AD622
call	sub_6AD270
pop	edi
pop	ebx
add	esp, 10h
retn	8

loc_6AD622:
push	esi
cmp	eax, 8
jnb	short loc_6AD62F
mov	esi, 8
jmp	short loc_6AD694

loc_6AD62F:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_6AD642
fadd	ds:flt_15FCC08

loc_6AD642:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	cl, byte ptr [esp+1Ch+var_8]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_6AD694:
mov	ecx, dword_1855FC0
lea	edx, [esp+1Ch+var_8]
push	edx
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_6AD6F4
xor	eax, eax
jmp	short loc_6AD6E0
align 10h

loc_6AD6E0:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_6AD6E0

loc_6AD6F4:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_6AD7B3
mov	eax, [eax+4]
inc	eax
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
mov	[esp+20h+var_10], ebx
mov	ebx, [esp+20h+arg_0]
mov	dword ptr [esp+20h+var_8], eax
jmp	short loc_6AD724
jmp	short loc_6AD720
align 10h

loc_6AD720:
mov	edi, [esp+20h+var_C]

loc_6AD724:
mov	edx, [edi]
mov	eax, [esp+20h+var_10]
cmp	dword ptr [eax+edx+8], 0FFFFFFFEh
lea	edi, [eax+edx+8]
jz	short loc_6AD78C
mov	eax, [edi+8]
lea	esi, [edi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
push	esi
push	ebx
lea	ecx, [esp+2Ch+arg_4]
call	sub_6AEE80
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AD786
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AD786:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6AD78C:
add	[esp+20h+var_10], 0Ch
sub	dword ptr [esp+20h+var_8], 1
jnz	short loc_6AD720
mov	ecx, dword_1855FC0
mov	edx, [esp+20h+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+20h+var_C]
xor	ebx, ebx
pop	ebp

loc_6AD7B3:
mov	ecx, [esp+1Ch+arg_4]
mov	[edi], ecx
lea	ecx, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_4], ebx
call	sub_6AD270
pop	esi
pop	edi
pop	ebx
add	esp, 10h
retn	8
sub_6AD600 endp

align 10h



sub_6AD7D0 proc	near
fldz
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi+4], 0FFFFFFFFh
xor	edi, edi
mov	[esi], edi
fst	dword ptr [esi+8]
fst	dword ptr [esi+0Ch]
lea	ecx, [esi+38h]
fst	dword ptr [esi+10h]
fstp	dword ptr [esi+14h]
mov	[esi+20h], edi
fld1
fstp	dword ptr [esi+18h]
call	sub_679E30
lea	ecx, [esi+3Ch]
call	sub_679E30
mov	[esi+40h], edi
mov	[esi+44h], edi
mov	[esi+48h], edi
mov	[esi+24h], edi
mov	[esi+2Ch], edi
mov	[esi+28h], edi
mov	[esi+34h], edi
xor	eax, eax
mov	[esi+30h], ax
pop	edi
mov	dword ptr [esi+1Ch], 1
mov	eax, esi
pop	esi
retn
sub_6AD7D0 endp

align 10h



sub_6AD830 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437F74
xor	ebx, ebx
mov	[esi+4], ebx
mov	[esi+8], ebx
lea	ecx, [esi+10h]
mov	[esi+0Ch], ebx
call	sub_68CFB0
lea	ecx, [esi+30h]
call	sub_64E8E0
fldz
mov	dword ptr [esi+50h], 40000h
mov	[esi+57h], bl
fstp	dword ptr [esi+48h]
xor	eax, eax
mov	[esi+54h], ax
mov	[esi+4Ch], ebx
mov	[esi+56h], bl
mov	eax, esi
pop	esi
pop	ebx
retn
sub_6AD830 endp

align 10h



sub_6AD880 proc	near

arg_0= dword ptr  4

mov	cl, [ecx+57h]
mov	eax, [esp+arg_0]
mov	[eax], cl
retn	4
sub_6AD880 endp

align 10h



; int __thiscall sub_6AD890(void *, char)
sub_6AD890 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437F74
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+4]
mov	eax, [eax+30h]
push	edx
call	eax
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1432C80
jz	short loc_6AD8C0
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6AD8C0:
mov	eax, esi
pop	esi
retn	4
sub_6AD890 endp

align 10h



sub_6AD8D0 proc	near
push	ebx
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+0DCh]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+44h]
push	eax
lea	ecx, [esi+0F4h]
call	sub_6ACF60
mov	ecx, [esi+44h]
push	ecx
lea	ecx, [esi+100h]
call	sub_6ACF60
push	edi		; lpCriticalSection
mov	dword ptr [esi+10Ch], 0
call	ds:LeaveCriticalSection
mov	edi, [esi+90h]
mov	ebx, [esi+44h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [esi+90h]
add	ecx, 1Ch
mov	[esi+84h], ebx
mov	dword ptr [esi+80h], 2
call	sub_64D8F0
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_64E350
sub_6AD8D0 endp

align 10h



sub_6AD950 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+78h]
add	edi, 8
mov	ecx, edi
mov	dword ptr [esi], offset	off_1437FA0
call	sub_64D770
lea	ebx, [esi+18h]
mov	ecx, ebx
call	sub_7140C0
mov	ecx, edi
call	sub_64E350
mov	ecx, [esi+78h]
test	ecx, ecx
jz	short loc_6AD985
call	sub_64A430

loc_6AD985:
lea	ecx, [esi+68h]
call	sub_6AC570
lea	ecx, [esi+50h]	; lpCriticalSection
call	sub_64D730
lea	ecx, [esi+44h]
call	sub_6AC570
mov	ecx, ebx
call	sub_714290
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6AD9B0
call	sub_666B00

loc_6AD9B0:
pop	edi
mov	ecx, esi
pop	esi
pop	ebx
jmp	sub_64A3F0
sub_6AD950 endp

align 10h



sub_6AD9C0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 38h
test	[esp+38h+arg_4], 803Fh
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
mov	[esp+48h+var_38], ebx
jz	loc_6ADC7E
mov	eax, [ebx+1Ch]
mov	eax, [eax+0Ch]
mov	eax, [eax+20h]
cmp	dword ptr [eax+80h], 2
mov	[esp+48h+var_2C], 0
jge	short loc_6ADA05
mov	[esp+48h+var_2C], eax
add	eax, 0B8h
push	eax		; lpCriticalSection
call	ds:EnterCriticalSection

loc_6ADA05:
mov	eax, [ebx+1Ch]
mov	eax, [eax+0Ch]
mov	eax, [eax+20h]
lea	ecx, [eax+0D0h]
lea	eax, [esp+48h+var_14]
push	eax
call	sub_6ACF20
mov	ecx, [eax]
mov	ebp, [eax+4]
mov	[esp+48h+var_24], ecx
mov	[esp+48h+var_20], ebp
jmp	short loc_6ADA30
align 10h

loc_6ADA30:
mov	eax, [esp+48h+var_24]
xor	edi, edi
cmp	eax, edi
jz	loc_6ADC6A
mov	edx, [eax]
cmp	edx, edi
jz	loc_6ADC6A
cmp	ebp, [edx+4]
jg	loc_6ADC6A
mov	eax, [ebx+1Ch]
mov	esi, ebp
shl	esi, 4
lea	ecx, [eax+18h]
lea	eax, [esi+edx+10h]
mov	[esp+48h+var_34], esi
cmp	[eax], edi
jnz	short loc_6ADA71
mov	edi, [eax+4]
mov	[esp+48h+var_30], edi
jmp	short loc_6ADAD7

loc_6ADA71:
mov	dl, [ecx+24h]
mov	eax, [eax+4]
mov	[esp+48h+var_1C], edi
mov	[esp+48h+var_18], edi
test	dl, dl
jz	short loc_6ADAB7
mov	edx, [ecx+4]
cmp	eax, edx
jnb	short loc_6ADAB7
mov	ecx, [ecx+8]
lea	esi, [ecx+eax*8]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6ADAA8
call	sub_64A420
mov	ecx, [esp+48h+var_1C]
test	ecx, ecx
jz	short loc_6ADAA8
call	sub_666B00

loc_6ADAA8:
mov	ecx, [esi]
mov	[esp+48h+var_1C], ecx
mov	edx, [esi+4]
mov	[esp+48h+var_18], edx
jmp	short loc_6ADAC6

loc_6ADAB7:
push	eax
lea	eax, [esp+4Ch+var_1C]
push	eax
call	sub_714030
mov	ecx, [esp+48h+var_1C]

loc_6ADAC6:
mov	esi, ecx
test	ecx, ecx
jz	short loc_6ADAD1
call	sub_666B00

loc_6ADAD1:
mov	edi, esi
mov	[esp+48h+var_30], esi

loc_6ADAD7:
test	edi, edi
jz	loc_6ADC23	; default
			; jumptable 006ADB14 cases 2,4-129
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	esi, eax
mov	eax, [edx+8]
mov	ecx, edi
and	esi, 0FFh
call	eax
shr	eax, 8
and	eax, 0FFh
dec	eax
cmp	eax, 83h	; switch 132 cases
ja	loc_6ADC23	; default
			; jumptable 006ADB14 cases 2,4-129
movzx	ecx, ds:byte_6ADDF4[eax]
jmp	ds:off_6ADDDC[ecx*4] ; switch jump

loc_6ADB1B:		; jumptable 006ADB14 case 0
cmp	esi, 1
jnz	short loc_6ADB27
test	byte ptr [esp+48h+arg_4], 2
jmp	short loc_6ADB51

loc_6ADB27:
cmp	esi, 2
jnz	loc_6ADC23	; default
			; jumptable 006ADB14 cases 2,4-129
test	byte ptr [esp+48h+arg_4], 4
jmp	short loc_6ADB51

loc_6ADB37:		; jumptable 006ADB14 case 1
test	byte ptr [esp+48h+arg_4], 1
jmp	short loc_6ADB51

loc_6ADB3E:		; jumptable 006ADB14 case 130
test	byte ptr [esp+48h+arg_4], 8
jmp	short loc_6ADB51

loc_6ADB45:		; jumptable 006ADB14 case 3
test	byte ptr [esp+48h+arg_4], 10h
jmp	short loc_6ADB51

loc_6ADB4C:		; jumptable 006ADB14 case 131
test	byte ptr [esp+48h+arg_4], 20h

loc_6ADB51:		; default
jz	loc_6ADC23	; jumptable 006ADB14 cases 2,4-129
mov	eax, [ebx+1Ch]
mov	eax, [eax+0Ch]
mov	eax, [eax+20h]
mov	ecx, [eax+0D4h]
lea	esi, [eax+0D4h]
xor	ebp, ebp
xor	eax, eax
mov	[esp+48h+var_28], ebp
cmp	ecx, ebp
jz	short loc_6ADB90
lea	edx, [ecx+8]
jmp	short loc_6ADB80
align 10h

loc_6ADB80:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_6ADB8E
inc	eax
add	edx, 14h
cmp	eax, [ecx+4]
jbe	short loc_6ADB80

loc_6ADB8E:
mov	ebp, esi

loc_6ADB90:
test	ebp, ebp
jz	short loc_6ADBF0
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_6ADBF0
mov	edi, [ecx+4]
cmp	eax, edi
jg	short loc_6ADBF0
mov	edx, [esp+48h+var_24]
mov	esi, [esp+48h+var_34]
mov	edx, [edx]
lea	edx, [esi+edx+10h]
lea	esi, [eax+eax*4+5]
mov	ebx, [ecx+esi*4]
lea	esi, [ecx+esi*4]
cmp	ebx, [edx]
jnz	short loc_6ADBC6
mov	esi, [esi+4]
cmp	esi, [edx+4]
jz	short loc_6ADBE1

loc_6ADBC6:
inc	eax
cmp	eax, edi
ja	short loc_6ADB90
lea	edx, [eax+eax*4]
lea	ecx, [ecx+edx*4+8]

loc_6ADBD2:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6ADB90
inc	eax
add	ecx, 14h
cmp	eax, edi
jbe	short loc_6ADBD2
jmp	short loc_6ADB90

loc_6ADBE1:
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*4+10h]
and	eax, 0FFFFFFFCh
lea	ecx, [eax+8]
jmp	short loc_6ADBF4

loc_6ADBF0:
mov	ecx, [esp+48h+var_28]

loc_6ADBF4:
mov	edx, [esp+48h+var_24]
mov	eax, [edx]
mov	edx, [esp+48h+var_34]
mov	ebx, [esp+48h+var_38]
push	ecx
lea	eax, [edx+eax+0Ch]
mov	eax, [eax]
push	ecx
mov	ecx, esp
mov	[ecx], eax
mov	ecx, [esp+50h+arg_0]
mov	eax, [esp+50h+var_30]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	ebx
call	edx
mov	ebp, [esp+48h+var_20]

loc_6ADC23:		; default
mov	eax, [esp+48h+var_24] ;	jumptable 006ADB14 cases 2,4-129
mov	ecx, [eax]
mov	eax, [ecx+4]
cmp	ebp, eax
jg	loc_6ADA30
inc	ebp
mov	[esp+48h+var_20], ebp
cmp	ebp, eax
ja	loc_6ADA30
mov	edx, ebp
shl	edx, 4
lea	ecx, [edx+ecx+8]
lea	ebx, [ebx+0]

loc_6ADC50:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	loc_6ADA30
inc	ebp
add	ecx, 10h
mov	[esp+48h+var_20], ebp
cmp	ebp, eax
jbe	short loc_6ADC50
jmp	loc_6ADA30

loc_6ADC6A:
mov	eax, [esp+48h+var_2C]
cmp	eax, edi
jz	short loc_6ADC7E
add	eax, 0B8h
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6ADC7E:
test	[esp+48h+arg_4], 8000h
jz	loc_6ADDD2
mov	edi, [ebx+1Ch]
xor	esi, esi
add	edi, 50h
push	edi		; lpCriticalSection
mov	[esp+4Ch+var_C], esi
mov	[esp+4Ch+var_8], esi
mov	[esp+4Ch+var_4], esi
mov	[esp+4Ch+var_2C], edi
call	ds:EnterCriticalSection
mov	eax, [ebx+1Ch]
mov	eax, [eax+48h]
cmp	eax, esi
jbe	short loc_6ADCC4
push	eax
lea	ecx, [esp+4Ch+var_C]
push	ecx
call	sub_6AC660
mov	esi, [esp+48h+var_8]

loc_6ADCC4:
mov	edx, [esp+48h+var_38]
mov	eax, [edx+1Ch]
xor	ebx, ebx
cmp	[eax+48h], ebx
jbe	loc_6ADD74

loc_6ADCD6:
mov	eax, [eax+44h]
lea	edi, [esi+1]
lea	ecx, [eax+ebx*4]
mov	[esp+48h+var_28], ecx
cmp	edi, esi
jnb	short loc_6ADD1C
mov	eax, [esp+48h+var_C]
sub	esi, edi
lea	edx, [esi+edi]
lea	ebp, [eax+edx*4-4]
jz	short loc_6ADD0A

loc_6ADCF6:
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_6ADD02
call	sub_666B00

loc_6ADD02:
sub	ebp, 4
sub	esi, 1
jnz	short loc_6ADCF6

loc_6ADD0A:
mov	ecx, [esp+48h+var_4]
shr	ecx, 1
cmp	edi, ecx
jnb	short loc_6ADD38
push	edi
lea	edx, [esp+4Ch+var_C]
push	edx
jmp	short loc_6ADD2F

loc_6ADD1C:
cmp	edi, [esp+48h+var_4]
jb	short loc_6ADD38
mov	eax, edi
shr	eax, 2
add	eax, edi
push	eax
lea	ecx, [esp+4Ch+var_C]
push	ecx

loc_6ADD2F:
lea	ecx, [esp+50h+var_C]
call	sub_6AC660

loc_6ADD38:
mov	edx, [esp+48h+var_C]
mov	esi, edi
lea	edi, [edx+edi*4-4]
mov	[esp+48h+var_8], esi
test	edi, edi
jz	short loc_6ADD5F
mov	ebp, [esp+48h+var_28]
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_6ADD5A
call	sub_64A420

loc_6ADD5A:
mov	eax, [ebp+0]
mov	[edi], eax

loc_6ADD5F:
mov	ecx, [esp+48h+var_38]
mov	eax, [ecx+1Ch]
inc	ebx
cmp	ebx, [eax+48h]
jb	loc_6ADCD6
mov	edi, [esp+48h+var_2C]

loc_6ADD74:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
xor	edi, edi
test	esi, esi
jbe	short loc_6ADDA5
mov	ebx, [esp+48h+arg_0]

loc_6ADD85:
mov	ebp, [esp+48h+var_C]
mov	ecx, [ebp+edi*4+0]
test	ecx, ecx
jz	short loc_6ADD9E
mov	eax, [esp+48h+arg_4]
mov	edx, [ecx]
mov	edx, [edx+68h]
push	eax
push	ebx
call	edx

loc_6ADD9E:
inc	edi
cmp	edi, esi
jb	short loc_6ADD85
jmp	short loc_6ADDA9

loc_6ADDA5:
mov	ebp, [esp+48h+var_C]

loc_6ADDA9:
lea	edi, [ebp+esi*4-4]
test	esi, esi
jbe	short loc_6ADDC4

loc_6ADDB1:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6ADDBC
call	sub_666B00

loc_6ADDBC:
sub	edi, 4
sub	esi, 1
jnz	short loc_6ADDB1

loc_6ADDC4:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebp
call	edx

loc_6ADDD2:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 38h
retn	8
sub_6AD9C0 endp

off_6ADDDC dd offset loc_6ADB1B, offset	loc_6ADB37 ; jump table	for switch statement
dd offset loc_6ADB45, offset loc_6ADB3E
dd offset loc_6ADB4C, offset loc_6ADC23
byte_6ADDF4 db	    0,	   1,	  5,	 2 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     3,     4
align 10h



sub_6ADE80 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	loc_6ADF10
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
lea	esp, [esp+0]

loc_6ADEA0:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_6ADEEB
cmp	dword ptr [edi+0Ch], 0
jnz	short loc_6ADEC0
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_6ADEC0
call	sub_666B00

loc_6ADEC0:
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6ADEE5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6ADEE5:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6ADEEB:
add	ebx, 14h
sub	[esp+14h+var_4], 1
jnz	short loc_6ADEA0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_6ADF10:
pop	ebp
pop	ecx
retn
sub_6ADE80 endp

align 10h



sub_6ADF20 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_6ADF42
call	sub_6ADE80
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_6ADF42:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_6ADF50
mov	esi, 8
jmp	short loc_6ADFB5

loc_6ADF50:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_6ADF63
fadd	ds:flt_15FCC08

loc_6ADF63:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	cl, byte ptr [esp+1Ch+var_8]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_6ADFB5:
mov	ecx, dword_1855FC0
mov	ebp, [esp+1Ch+arg_0]
lea	edx, [esp+1Ch+var_8]
push	edx
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*4]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_6AE014
xor	eax, eax
lea	esp, [esp+0]

loc_6AE000:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 14h
sub	esi, 1
jnz	short loc_6AE000

loc_6AE014:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_6AE0D4
mov	eax, [eax+4]
inc	eax
mov	[esp+1Ch+arg_0], eax
jmp	short loc_6AE034
jmp	short loc_6AE030
align 10h

loc_6AE030:
mov	edi, [esp+1Ch+var_C]

loc_6AE034:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_6AE0AE
mov	eax, [edi+8]
lea	esi, [edi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
push	esi
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_6AF0E0
cmp	dword ptr [esi+4], 0
jnz	short loc_6AE084
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6AE084
call	sub_666B00

loc_6AE084:
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AE0A8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AE0A8:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6AE0AE:
add	ebx, 14h
sub	[esp+1Ch+arg_0], 1
jnz	loc_6AE030
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]

loc_6AE0D4:
mov	ecx, [esp+1Ch+arg_4]
mov	[edi], ecx
lea	ecx, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_4], 0
call	sub_6ADE80
pop	esi
pop	ebp
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_6ADF20 endp

align 10h



sub_6AE100 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	ebp, ebp
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebp
jnz	short loc_6AE122
call	sub_6AD1E0
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_6AE122:
push	esi
cmp	eax, 8
jnb	short loc_6AE12F
mov	esi, 8
jmp	short loc_6AE194

loc_6AE12F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6AE142
fadd	ds:flt_15FCC08

loc_6AE142:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6AE194:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
mov	edx, esi
shl	edx, 4
add	edx, 8
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebp
mov	dword ptr [esp+20h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebp
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebp
jbe	short loc_6AE1F4
xor	eax, eax
jmp	short loc_6AE1E0
align 10h

loc_6AE1E0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_6AE1E0

loc_6AE1F4:
mov	eax, [edi]
cmp	eax, ebp
jz	loc_6AE29C
mov	eax, [eax+4]
inc	eax
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
mov	dword ptr [esp+1Ch+var_8], eax
jmp	short loc_6AE214
align 10h

loc_6AE210:
mov	edi, [esp+1Ch+var_C]

loc_6AE214:
mov	edx, [edi]
cmp	dword ptr [edx+ebp+8], 0FFFFFFFEh
lea	edi, [edx+ebp+8]
jz	short loc_6AE279
lea	edx, [edi+8]
mov	eax, 4
mov	ecx, 1505h
mov	edi, edi

loc_6AE230:
movzx	esi, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, esi
test	eax, eax
ja	short loc_6AE230
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_6AF210
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AE273
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AE273:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6AE279:
add	ebp, 10h
sub	dword ptr [esp+1Ch+var_8], 1
jnz	short loc_6AE210
mov	ecx, dword_1855FC0
mov	eax, [esp+1Ch+var_C]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_6AE29C:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[edi], eax
mov	[esp+18h+arg_4], 0
call	sub_6AD1E0
pop	esi
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_6AE100 endp

align 10h



sub_6AE2C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+18h+var_C], edi
cmp	eax, ebx
jnz	short loc_6AE2E2
call	sub_684870
pop	edi
pop	ebx
add	esp, 10h
retn	8

loc_6AE2E2:
push	esi
cmp	eax, 8
jnb	short loc_6AE2EF
mov	esi, 8
jmp	short loc_6AE354

loc_6AE2EF:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_6AE302
fadd	ds:flt_15FCC08

loc_6AE302:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	cl, byte ptr [esp+1Ch+var_8]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_6AE354:
mov	ecx, dword_1855FC0
lea	edx, [esp+1Ch+var_8]
push	edx
mov	edx, esi
shl	edx, 4
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
add	edx, 8
push	edx
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_6AE3A5
xor	eax, eax

loc_6AE391:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_6AE391

loc_6AE3A5:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_6AE463
mov	eax, [eax+4]
inc	eax
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
mov	[esp+20h+var_10], ebx
mov	ebx, [esp+20h+arg_0]
mov	dword ptr [esp+20h+var_8], eax
jmp	short loc_6AE3D4
jmp	short loc_6AE3D0
align 10h

loc_6AE3D0:
mov	edi, [esp+20h+var_C]

loc_6AE3D4:
mov	edx, [edi]
mov	eax, [esp+20h+var_10]
cmp	dword ptr [eax+edx+8], 0FFFFFFFEh
lea	edi, [eax+edx+8]
jz	short loc_6AE43C
mov	eax, [edi+8]
lea	esi, [edi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
push	esi
push	ebx
lea	ecx, [esp+2Ch+arg_4]
call	sub_6AF360
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AE436
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AE436:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6AE43C:
add	[esp+20h+var_10], 10h
sub	dword ptr [esp+20h+var_8], 1
jnz	short loc_6AE3D0
mov	ecx, dword_1855FC0
mov	edx, [esp+20h+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+20h+var_C]
xor	ebx, ebx
pop	ebp

loc_6AE463:
mov	ecx, [esp+1Ch+arg_4]
mov	[edi], ecx
lea	ecx, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_4], ebx
call	sub_684870
pop	esi
pop	edi
pop	ebx
add	esp, 10h
retn	8
sub_6AE2C0 endp

align 10h



sub_6AE480 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6AE492
mov	eax, [esp+4+arg_0]
push	8
push	eax
jmp	short loc_6AE4B4

loc_6AE492:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AE4B9
mov	edx, [eax+4]
mov	ecx, [esp+4+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6AE4B4:
call	sub_6AD470

loc_6AE4B9:
mov	eax, [esi]
mov	edx, [esp+4+arg_8]
and	edx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ecx, edx
shl	ecx, 4
lea	esi, [ecx+eax+8]
mov	ecx, 0FFFFFFFEh
cmp	[esi], ecx
jnz	short loc_6AE50E
mov	eax, [esp+4+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	edx, [eax]
mov	[esi+4], edx
mov	ecx, [eax+4]
mov	[esi+8], ecx
mov	eax, [eax+8]
mov	[esi+0Ch], eax
test	ecx, ecx
jnz	loc_6AE5B5
test	eax, eax
jz	loc_6AE5B5
mov	ecx, eax
call	sub_64A420
pop	esi
retn	0Ch

loc_6AE50E:
push	ebx
mov	ebx, [eax+4]
push	edi
mov	edi, edx
push	ebp

loc_6AE516:
inc	edi
and	edi, ebx
mov	ebp, edi
shl	ebp, 4
cmp	[eax+ebp+8], ecx
jnz	short loc_6AE516
mov	ecx, edi
shl	ecx, 4
lea	ecx, [ecx+eax+8]
mov	[esp+10h+arg_0], ecx
mov	ecx, [esi+4]
mov	ebp, ecx
shr	ebp, 8
xor	ebp, ecx
and	ebp, ebx
cmp	ebp, edx
jnz	short loc_6AE565
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_6AE54F
push	esi
call	sub_6ABD90

loc_6AE54F:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [esi+4]
call	sub_6AB050
pop	ebp
mov	[esi], edi
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_6AE565:
mov	ebp, ecx
shr	ebp, 8
xor	ebp, ecx
and	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
lea	ebx, [eax+ebp+8]
jz	short loc_6AE58F
jmp	short loc_6AE580
align 10h

loc_6AE580:
mov	ecx, [ebx]
shl	ecx, 4
cmp	[ecx+eax+8], edx
lea	ebx, [ecx+eax+8]
jnz	short loc_6AE580

loc_6AE58F:
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_6AE59D
push	esi
call	sub_6ABD90

loc_6AE59D:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [esi+4]
mov	[ebx], edi
call	sub_6AB050
pop	ebp
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	ebx

loc_6AE5B5:
pop	esi
retn	0Ch
sub_6AE480 endp

align 10h



; int __cdecl sub_6AE5C0(int, char *Src, int, char)
sub_6AE5C0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
Src= dword ptr	8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+Src]
test	esi, esi
jz	loc_6AE6D7
mov	al, [esi]
test	al, al
jz	loc_6AE6D7
cmp	[esp+10h+arg_C], 0
push	ebx
jz	loc_6AE676
xor	dl, dl
mov	ecx, esi
lea	ebx, [ebx+0]

loc_6AE5F0:
mov	bl, al
sub	bl, 30h
cmp	bl, 9
ja	short loc_6AE5FE
mov	dl, 1
jmp	short loc_6AE612

loc_6AE5FE:
cmp	al, 2Bh
jz	short loc_6AE606
cmp	al, 2Dh
jnz	short loc_6AE60A

loc_6AE606:
test	dl, dl
jz	short loc_6AE612

loc_6AE60A:
cmp	al, 20h
jz	short loc_6AE612
cmp	al, 9
jnz	short loc_6AE676

loc_6AE612:
mov	al, [ecx+1]
inc	ecx
test	al, al
jnz	short loc_6AE5F0
lea	eax, [esp+14h+var_C]
push	eax		; char **
push	esi		; Src
mov	[esp+1Ch+var_C], 0
call	sub_67B3C0
fnstcw	word ptr [esp+1Ch+Src]
movzx	eax, word ptr [esp+1Ch+Src]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
mov	eax, [esp+1Ch+var_C]
fldcw	word ptr [esp+1Ch+var_8]
add	esp, 8
fistp	[esp+14h+var_8]
mov	ecx, dword ptr [esp+14h+var_8]
fldcw	word ptr [esp+14h+Src]
cmp	eax, esi
jz	short loc_6AE66E
cmp	byte ptr [eax],	0
jnz	short loc_6AE66E
mov	edx, [esp+14h+arg_8]
dec	ecx
pop	ebx
mov	[edx], ecx
mov	al, 1
pop	esi
add	esp, 0Ch
retn

loc_6AE66E:
pop	ebx
xor	al, al
pop	esi
add	esp, 0Ch
retn

loc_6AE676:
push	esi
lea	ecx, [esp+18h+var_8]
call	sub_67AE10
mov	ecx, [esp+14h+arg_0]
mov	[esp+14h+Src], eax
lea	eax, [esp+14h+Src]
push	eax
call	sub_6AD110
test	eax, eax
jz	short loc_6AE6A7
mov	ecx, [esp+14h+arg_8]
test	ecx, ecx
jz	short loc_6AE6A3
mov	edx, [eax+4]
mov	[ecx], edx

loc_6AE6A3:
mov	bl, 1
jmp	short loc_6AE6A9

loc_6AE6A7:
xor	bl, bl

loc_6AE6A9:
mov	esi, dword ptr [esp+14h+var_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AE6CF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6AE6CF:
mov	al, bl
pop	ebx
pop	esi
add	esp, 0Ch
retn

loc_6AE6D7:
xor	al, al
pop	esi
add	esp, 0Ch
retn
sub_6AE5C0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_6AF490

loc_6AE6E0:
push	edi
mov	edi, ecx
cmp	dword ptr [edi+80h], 2
jl	short loc_6AE70E
mov	eax, dword ptr [esp+4+arg_8]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+Src]
push	eax		; char
push	ecx		; int
push	edx		; Src
add	edi, 110h
push	edi		; int
call	sub_6AE5C0
add	esp, 10h
pop	edi
retn	0Ch

loc_6AE70E:
push	ebx
push	esi
lea	esi, [edi+0DCh]
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, dword ptr [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [esp+0Ch+Src]
push	eax		; char
push	ecx		; int
push	edx		; Src
add	edi, 110h
push	edi		; int
call	sub_6AE5C0
add	esp, 10h
push	esi		; lpCriticalSection
mov	bl, al
call	ds:LeaveCriticalSection
pop	esi
mov	al, bl
pop	ebx
pop	edi
retn	0Ch
; END OF FUNCTION CHUNK	FOR sub_6AF490
align 10h



sub_6AE750 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 30h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+40h+arg_0]
push	20003h
push	edi
mov	esi, ecx
call	sub_7042D0
mov	ebx, [esp+40h+arg_4]
xor	eax, eax
mov	dword ptr [esi], offset	off_1437FA4
mov	[esi+14h], eax
mov	dword ptr [esi+18h], 90000h
mov	[esi+1Ch], eax
mov	ecx, [ebx+1Ch]
cmp	ecx, eax
jz	short loc_6AE78D
call	sub_64A420

loc_6AE78D:
mov	eax, [ebx+1Ch]
mov	ecx, [esp+40h+arg_8]
mov	[esi+20h], eax
mov	edx, [esi+20h]
mov	[esi+2Ch], ecx
mov	ecx, [edx+0Ch]
mov	[esi+24h], ecx
mov	eax, [ecx]
mov	edx, [eax+44h]
call	edx
shr	eax, 4
mov	edx, 1
and	al, dl
mov	[esi+28h], al
mov	ecx, [edi+8]
mov	ebp, [ecx+28h]
xor	ecx, ecx
cmp	ebp, ecx
jz	loc_6AE893
test	al, al
jnz	loc_6AE893
mov	eax, [edi+20h]
mov	[esp+40h+var_18], eax
mov	eax, [edi+0Ch]
mov	[esp+40h+var_30], edx
mov	[esp+40h+var_20], ecx
mov	[esp+40h+var_28], ecx
mov	[esp+40h+var_2C], edx
mov	[esp+40h+var_24], edx
mov	[esp+40h+var_8], ecx
mov	[esp+40h+var_1C], ecx
mov	[esp+40h+var_14], eax
mov	[esp+40h+var_10], ecx
mov	[esp+40h+var_C], ecx
cmp	[edi+44h], cl
jnz	short loc_6AE80F
mov	[esp+40h+var_4], cl
cmp	[edi+18h], ecx
jz	short loc_6AE813

loc_6AE80F:
mov	[esp+40h+var_4], dl

loc_6AE813:
mov	edx, [ebx]
mov	eax, [edx+48h]
mov	ecx, ebx
call	eax
mov	ecx, [edi+8]
mov	edx, [ebp+0]
mov	edx, [edx+8]
mov	[esp+40h+var_8], eax
mov	eax, [ecx+10h]
lea	ecx, [esp+40h+var_30]
push	ecx
push	eax
lea	eax, [esi+18h]
push	eax
mov	ecx, ebp
call	edx
mov	ecx, [esi+1Ch]
mov	edi, eax
test	ecx, ecx
jz	short loc_6AE848
call	sub_64A400

loc_6AE848:
mov	[esi+1Ch], edi
mov	edx, [esi+20h]
mov	ecx, edi
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	4
call	eax
test	eax, eax
jz	short loc_6AE882
mov	dword ptr [eax], 0
pop	edi
mov	[esi+30h], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	0Ch

loc_6AE882:
xor	eax, eax
pop	edi
mov	[esi+30h], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	0Ch

loc_6AE893:
pop	edi
mov	[esi+30h], ecx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	0Ch
sub_6AE750 endp

align 10h



sub_6AE8B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, [ecx+20h]
test	esi, esi
jz	short loc_6AE8F2
cmp	[esp+4+arg_0], 0
jz	short loc_6AE8CA
mov	byte ptr [esi+84h], 1
pop	esi
retn	4

loc_6AE8CA:
push	edi
mov	edi, [esi+78h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [esi+78h]
add	ecx, 1Ch
mov	dword ptr [esi+74h], 3
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350
pop	edi

loc_6AE8F2:
pop	esi
retn	4
sub_6AE8B0 endp

align 10h



sub_6AE900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+10h+arg_4]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437FA0
mov	[esi+8], ebp
cmp	edi, ebx
jz	short loc_6AE931
mov	ecx, edi
call	sub_64A420

loc_6AE931:
mov	eax, [esp+10h+arg_8]
mov	[esi+0Ch], edi
lea	edi, [esi+18h]
push	ebp
mov	ecx, edi
mov	[esi+10h], eax
call	sub_714000
mov	[esi+44h], ebx
mov	[esi+48h], ebx
push	ebx		; int
lea	ecx, [esi+50h]	; lpCriticalSection
mov	[esi+4Ch], ebx
call	sub_64D6D0
mov	[esi+68h], ebx
mov	[esi+6Ch], ebx
lea	ebp, [edi+0Ch]
mov	[esi+70h], ebx
push	ebp		; lpCriticalSection
mov	[esi+78h], ebx
call	ds:EnterCriticalSection
mov	ecx, [esp+10h+arg_8]
push	ebp		; lpCriticalSection
mov	[edi+28h], ecx
call	ds:LeaveCriticalSection
mov	edx, [esp+10h+arg_C]
mov	[esi+14h], edx
mov	[esi+84h], bl
mov	[esi+7Ch], ebx
mov	[esi+80h], ebx
mov	[esi+74h], ebx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	24h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6AE9D6
push	ebx
mov	dword ptr [edi], offset	off_155F500
push	1
lea	ecx, [edi+8]
mov	dword ptr [edi+4], 1
mov	dword ptr [edi], offset	off_1437F64
call	sub_64D9B0
lea	ecx, [edi+1Ch]
call	sub_64DC50
mov	[edi+20h], bl
jmp	short loc_6AE9D8

loc_6AE9D6:
xor	edi, edi

loc_6AE9D8:
mov	ecx, [esi+78h]
cmp	ecx, ebx
jz	short loc_6AE9E4
call	sub_64A430

loc_6AE9E4:
mov	[esi+78h], edi
cmp	[esp+10h+arg_10], bl
jz	short loc_6AEA09
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
mov	[esi+7Ch], eax
mov	eax, [esi+0Ch]
mov	ecx, [eax+20h]
mov	edx, [ecx+28h]
mov	[esi+80h], edx

loc_6AEA09:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	14h
sub_6AE900 endp

align 10h



sub_6AEA20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6AD950
test	[esp+4+arg_0], 1
jz	short loc_6AEA3D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AEA3D:
mov	eax, esi
pop	esi
retn	4
sub_6AEA20 endp

align 10h



sub_6AEA50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 1Ch
push	ebx
push	ebp
mov	ebp, ds:EnterCriticalSection
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+1Ch]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
xor	ebx, ebx
xor	esi, esi
cmp	dword ptr [eax+80h], 2
mov	[esp+2Ch+var_14], ebx
mov	[esp+2Ch+var_10], ebx
jge	short loc_6AEA87
mov	esi, eax
add	eax, 0B8h
push	eax		; lpCriticalSection
call	ebp ; EnterCriticalSection

loc_6AEA87:
mov	edx, [edi+1Ch]
mov	eax, [edx+0Ch]
mov	ecx, [esp+2Ch+arg_4]
mov	eax, [eax+20h]
lea	edx, [esp+2Ch+var_1C]
mov	[esp+2Ch+var_1C], ecx
push	edx
lea	ecx, [eax+0D4h]
call	sub_6ACFF0
cmp	eax, ebx
jz	short loc_6AEABD
add	eax, 4
push	eax
lea	ecx, [esp+30h+var_14]
call	sub_6EFC40
mov	bl, 1
jmp	short loc_6AEABF

loc_6AEABD:
xor	bl, bl

loc_6AEABF:
test	esi, esi
jz	short loc_6AEAD0
add	esi, 0B8h
push	esi		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6AEAD0:
test	bl, bl
jz	short loc_6AEB4D
cmp	[esp+2Ch+var_14], 1
mov	esi, [esp+2Ch+arg_0]
jnz	short loc_6AEAF2
mov	ebp, [esp+2Ch+var_10]
mov	ecx, [edi+1Ch]
push	ebp
push	esi
add	ecx, 18h
call	sub_6ABEE0
jmp	short loc_6AEB29

loc_6AEAF2:
mov	eax, [edi+1Ch]
add	eax, 18h
mov	[esi+4], eax
mov	edi, [edi+1Ch]
add	edi, 18h
push	edi
lea	ecx, [esp+30h+var_14]
call	sub_6ABF30
mov	edi, eax
test	edi, edi
jz	short loc_6AEB18
mov	ecx, edi
call	sub_64A420

loc_6AEB18:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6AEB23
call	sub_666B00

loc_6AEB23:
mov	ebp, [esp+2Ch+var_10]
mov	[esi], edi

loc_6AEB29:
cmp	dword ptr [esi], 0
setnz	bl
cmp	[esp+2Ch+var_14], 0
jnz	short loc_6AEB41
test	ebp, ebp
jz	short loc_6AEB41
mov	ecx, ebp
call	sub_666B00

loc_6AEB41:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 1Ch
retn	0Ch

loc_6AEB4D:
mov	esi, [edi+1Ch]
xor	ebx, ebx
add	esi, 50h
push	esi		; lpCriticalSection
mov	[esp+30h+var_C], ebx
mov	[esp+30h+var_8], ebx
mov	[esp+30h+var_4], ebx
mov	[esp+30h+var_18], esi
call	ebp ; EnterCriticalSection
mov	ecx, [edi+1Ch]
mov	eax, [ecx+48h]
test	eax, eax
jbe	short loc_6AEB83
lea	edx, [esp+2Ch+var_C]
push	eax
push	edx
mov	ecx, edx
call	sub_6AC660
mov	ebx, [esp+2Ch+var_8]

loc_6AEB83:
mov	eax, [edi+1Ch]
xor	ecx, ecx
mov	[esp+2Ch+var_1C], ecx
cmp	[eax+48h], ecx
jbe	short loc_6AEBF2

loc_6AEB91:
mov	eax, [eax+44h]
mov	esi, [eax+ecx*4]
cmp	esi, [esp+2Ch+arg_8]
jz	short loc_6AEBDD
test	esi, esi
jz	short loc_6AEBA8
mov	ecx, esi
call	sub_64A420

loc_6AEBA8:
inc	ebx
push	ebx
lea	ecx, [esp+30h+var_C]
push	ecx
call	sub_6AC6F0
mov	ebx, [esp+2Ch+var_8]
mov	edx, [esp+2Ch+var_C]
lea	ebp, [edx+ebx*4-4]
test	ebp, ebp
jz	short loc_6AEBD2
test	esi, esi
jz	short loc_6AEBCF
mov	ecx, esi
call	sub_64A420

loc_6AEBCF:
mov	[ebp+0], esi

loc_6AEBD2:
test	esi, esi
jz	short loc_6AEBDD
mov	ecx, esi
call	sub_666B00

loc_6AEBDD:
mov	ecx, [esp+2Ch+var_1C]
mov	eax, [edi+1Ch]
inc	ecx
mov	[esp+2Ch+var_1C], ecx
cmp	ecx, [eax+48h]
jb	short loc_6AEB91
mov	esi, [esp+2Ch+var_18]

loc_6AEBF2:		; lpCriticalSection
push	esi
call	ds:LeaveCriticalSection
xor	esi, esi
test	ebx, ebx
jbe	short loc_6AEC70
mov	edi, [esp+2Ch+arg_0]

loc_6AEC03:
mov	ebp, [esp+2Ch+var_C]
mov	ecx, [ebp+esi*4+0]
test	ecx, ecx
jz	short loc_6AEC20
mov	eax, [esp+2Ch+arg_4]
push	0
push	eax
push	edi
call	sub_6AEA50
test	al, al
jnz	short loc_6AEC27

loc_6AEC20:
inc	esi
cmp	esi, ebx
jb	short loc_6AEC03
jmp	short loc_6AEC74

loc_6AEC27:
lea	esi, [ebp+ebx*4-4]
jmp	short loc_6AEC30
align 10h

loc_6AEC30:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6AEC3B
call	sub_666B00

loc_6AEC3B:
sub	esi, 4
sub	ebx, 1
jnz	short loc_6AEC30
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
cmp	[esp+2Ch+var_14], ebx
jnz	short loc_6AEC64
mov	ecx, [esp+2Ch+var_10]
test	ecx, ecx
jz	short loc_6AEC64
call	sub_666B00

loc_6AEC64:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 1Ch
retn	0Ch

loc_6AEC70:
mov	ebp, [esp+2Ch+var_C]

loc_6AEC74:
lea	esi, [ebp+ebx*4-4]
test	ebx, ebx
jbe	short loc_6AEC93
lea	esp, [esp+0]

loc_6AEC80:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6AEC8B
call	sub_666B00

loc_6AEC8B:
sub	esi, 4
sub	ebx, 1
jnz	short loc_6AEC80

loc_6AEC93:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
cmp	[esp+2Ch+var_14], 0
jnz	short loc_6AECB5
mov	ecx, [esp+2Ch+var_10]
test	ecx, ecx
jz	short loc_6AECB5
call	sub_666B00

loc_6AECB5:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 1Ch
retn	0Ch
sub_6AEA50 endp

align 10h



sub_6AECD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
push	edi
xor	edi, edi
cmp	dword ptr [eax+80h], 2
jge	short loc_6AECF6
mov	edi, eax
add	eax, 0B8h
push	eax		; lpCriticalSection
call	ds:EnterCriticalSection

loc_6AECF6:
mov	edx, [esi+1Ch]
mov	eax, [edx+0Ch]
mov	esi, [eax+20h]
lea	ecx, [esp+8+arg_0]
add	esi, 0D8h
push	ecx
mov	ecx, esi
call	sub_6AD0C0
test	eax, eax
jl	short loc_6AED22
inc	eax
shl	eax, 4
add	eax, [esi]
jz	short loc_6AED22
lea	esi, [eax+4]
jmp	short loc_6AED24

loc_6AED22:
xor	esi, esi

loc_6AED24:
test	edi, edi
jz	short loc_6AED35
add	edi, 0B8h
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6AED35:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6AECD0 endp

align 10h



sub_6AED40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 10h
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6AED55
pop	edi
add	esp, 10h
retn	4

loc_6AED55:
push	ebx
push	eax
lea	ecx, [esp+1Ch+arg_0]
call	sub_67AE10
mov	eax, [edi+1Ch]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
xor	ebx, ebx
cmp	dword ptr [eax+80h], 2
jge	short loc_6AED82
mov	ebx, eax
add	eax, 0B8h
push	eax		; lpCriticalSection
call	ds:EnterCriticalSection

loc_6AED82:
push	ebp
lea	edx, [esp+1Ch+arg_0]
push	esi
mov	[esp+20h+var_10], edx
mov	edx, [edi+1Ch]
lea	eax, [esp+20h+var_10]
push	eax
mov	eax, [edx+0Ch]
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, [eax+20h]
add	ecx, 0D4h
call	sub_6AD050
mov	ebp, [esp+20h+var_8]
mov	esi, [esp+20h+var_4]
lea	ecx, [esp+20h+var_8]
xor	eax, eax
push	ecx
lea	ecx, [esp+24h+var_10]
mov	[esp+24h+var_10], ebp
mov	[esp+24h+var_C], esi
mov	[esp+24h+var_8], eax
mov	[esp+24h+var_4], eax
call	sub_6F40A0
test	al, al
jz	short loc_6AEE19
test	ebx, ebx
jz	short loc_6AEDE7
add	ebx, 0B8h
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6AEDE7:
mov	esi, [esp+20h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AEE0D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AEE0D:
pop	esi
pop	ebp
pop	ebx
xor	eax, eax
pop	edi
add	esp, 10h
retn	4

loc_6AEE19:
mov	ecx, [ebp+0]
mov	edi, [edi+1Ch]
lea	eax, [esi+esi*4]
lea	eax, [ecx+eax*4+10h]
add	edi, 18h
push	edi
lea	ecx, [eax+4]
call	sub_6ABF30
mov	esi, eax
test	ebx, ebx
jz	short loc_6AEE45
add	ebx, 0B8h
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6AEE45:
mov	edi, [esp+20h+arg_0]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AEE6B
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6AEE6B:
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 10h
retn	4
sub_6AED40 endp

align 10h



sub_6AEE80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_6AEE93
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6AEEB5

loc_6AEE93:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AEEBA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_6AEEB5:
call	sub_6AD600

loc_6AEEBA:
mov	eax, [edi]
mov	esi, [esp+8+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
lea	edx, [esi+esi*2]
lea	edi, [eax+edx*4+8]
mov	edx, [edi]
cmp	edx, 0FFFFFFFEh
jnz	short loc_6AEEF0
mov	eax, [esp+8+arg_4]
push	eax
lea	ecx, [edi+8]
mov	dword ptr [edi], 0FFFFFFFFh
call	sub_67AF90
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_6AEEF0:
mov	ecx, [eax+4]
push	ebx
mov	ebx, esi
push	ebp

loc_6AEEF7:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*2]
cmp	dword ptr [eax+ebp*4+8], 0FFFFFFFEh
jnz	short loc_6AEEF7
mov	ebp, [edi+4]
lea	ecx, [ebx+ebx*2]
lea	ecx, [eax+ecx*4+8]
cmp	ebp, esi
jnz	short loc_6AEF43
test	ecx, ecx
jz	short loc_6AEF2A
mov	[ecx], edx
mov	edx, [edi+4]
lea	eax, [edi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_67AF90

loc_6AEF2A:
mov	ecx, [esp+10h+arg_4]
push	ecx
lea	ecx, [edi+8]
call	sub_67A3D0
pop	ebp
mov	[edi], ebx
pop	ebx
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_6AEF43:
lea	ebp, [ebp+ebp*2+0]
cmp	[eax+ebp*4+8], esi
lea	ebp, [eax+ebp*4+8]
jz	short loc_6AEF62

loc_6AEF51:
mov	ebp, [ebp+0]
lea	ebp, [ebp+ebp*2+0]
cmp	[eax+ebp*4+8], esi
lea	ebp, [eax+ebp*4+8]
jnz	short loc_6AEF51

loc_6AEF62:
test	ecx, ecx
jz	short loc_6AEF7A
mov	[ecx], edx
mov	edx, [edi+4]
lea	eax, [edi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_67AF90

loc_6AEF7A:
mov	ecx, [esp+10h+arg_4]
push	ecx
lea	ecx, [edi+8]
mov	[ebp+0], ebx
call	sub_67A3D0
pop	ebp
pop	ebx
mov	[edi+4], esi
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
retn	0Ch
sub_6AEE80 endp

align 10h



sub_6AEFA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6AEFB2
mov	eax, [esp+4+arg_0]
push	8
push	eax
jmp	short loc_6AEFD4

loc_6AEFB2:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AEFD9
mov	edx, [eax+4]
mov	ecx, [esp+4+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6AEFD4:
call	sub_6AD470

loc_6AEFD9:
mov	eax, [esi]
mov	edx, [esp+4+arg_8]
and	edx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ecx, edx
shl	ecx, 4
lea	esi, [ecx+eax+8]
mov	ecx, 0FFFFFFFEh
cmp	[esi], ecx
jnz	short loc_6AF032
mov	eax, [esp+4+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	edx, [eax]
mov	ecx, [edx]
mov	[esi+4], ecx
mov	eax, [eax+4]
mov	edx, [eax]
mov	[esi+8], edx
mov	eax, [eax+4]
mov	[esi+0Ch], eax
test	edx, edx
jnz	loc_6AF0DA
test	eax, eax
jz	loc_6AF0DA
mov	ecx, eax
call	sub_64A420
pop	esi
retn	0Ch

loc_6AF032:
push	ebx
mov	ebx, [eax+4]
push	edi
mov	edi, edx
push	ebp
lea	ebx, [ebx+0]

loc_6AF040:
inc	edi
and	edi, ebx
mov	ebp, edi
shl	ebp, 4
cmp	[eax+ebp+8], ecx
jnz	short loc_6AF040
mov	ecx, edi
shl	ecx, 4
lea	ecx, [ecx+eax+8]
mov	[esp+10h+arg_0], ecx
mov	ecx, [esi+4]
mov	ebp, ecx
shr	ebp, 8
xor	ebp, ecx
and	ebp, ebx
cmp	ebp, edx
jnz	short loc_6AF08F
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_6AF079
push	esi
call	sub_6ABD90

loc_6AF079:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [esi+4]
call	sub_7146B0
pop	ebp
mov	[esi], edi
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_6AF08F:
mov	ebp, ecx
shr	ebp, 8
xor	ebp, ecx
and	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
lea	ebx, [eax+ebp+8]
jz	short loc_6AF0B4

loc_6AF0A5:
mov	ecx, [ebx]
shl	ecx, 4
cmp	[ecx+eax+8], edx
lea	ebx, [ecx+eax+8]
jnz	short loc_6AF0A5

loc_6AF0B4:
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_6AF0C2
push	esi
call	sub_6ABD90

loc_6AF0C2:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [esi+4]
mov	[ebx], edi
call	sub_7146B0
pop	ebp
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	ebx

loc_6AF0DA:
pop	esi
retn	0Ch
sub_6AEFA0 endp

align 10h



sub_6AF0E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_6AF0F5
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6AF117

loc_6AF0F5:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AF11C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_6AF117:
call	sub_6ADF20

loc_6AF11C:
mov	eax, [edi]
mov	esi, [esp+10h+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
lea	edx, [esi+esi*4]
lea	ebx, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[ebx], edx
jnz	short loc_6AF17B
mov	ebp, [esp+10h+arg_4]
lea	edi, [ebx+8]
push	ebp
mov	ecx, edi
mov	dword ptr [ebx], 0FFFFFFFFh
call	sub_67ABE0
mov	eax, [ebp+4]
mov	[edi+4], eax
mov	ebp, [ebp+8]
mov	[edi+8], ebp
test	eax, eax
jnz	loc_6AF201
test	ebp, ebp
jz	loc_6AF201
mov	ecx, ebp
call	sub_64A420
pop	edi
mov	[ebx+4], esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6AF17B:
mov	ecx, [eax+4]
mov	edi, esi

loc_6AF180:
inc	edi
and	edi, ecx
lea	ebp, [edi+edi*4]
cmp	[eax+ebp*4+8], edx
jnz	short loc_6AF180
mov	edx, [ebx+4]
lea	ecx, [edi+edi*4]
lea	ecx, [eax+ecx*4+8]
cmp	edx, esi
jnz	short loc_6AF1BD
test	ecx, ecx
jz	short loc_6AF1A4
push	ebx
call	sub_6AC800

loc_6AF1A4:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [ebx+8]
call	sub_6AB0A0
mov	[ebx], edi
pop	edi
mov	[ebx+4], esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6AF1BD:
lea	edx, [edx+edx*4]
cmp	[eax+edx*4+8], esi
lea	ebp, [eax+edx*4+8]
jz	short loc_6AF1E1
lea	ebx, [ebx+0]

loc_6AF1D0:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*4+0]
cmp	[eax+edx*4+8], esi
lea	ebp, [eax+edx*4+8]
jnz	short loc_6AF1D0

loc_6AF1E1:
test	ecx, ecx
jz	short loc_6AF1EB
push	ebx
call	sub_6AC800

loc_6AF1EB:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [ebx+8]
mov	[ebp+0], edi
call	sub_6AB0A0
mov	dword ptr [ebx], 0FFFFFFFFh

loc_6AF201:
pop	edi
mov	[ebx+4], esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6AF0E0 endp

align 10h



sub_6AF210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6AF223
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6AF245

loc_6AF223:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AF24A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6AF245:
call	sub_6AE100

loc_6AF24A:
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, [esi]
cmp	edx, 0FFFFFFFEh
jnz	short loc_6AF28A
mov	eax, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	ecx, [eax]
add	eax, 4
mov	[esi+8], ecx
push	eax
lea	ecx, [esi+0Ch]
call	sub_67ABE0
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_6AF28A:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp

loc_6AF291:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	dword ptr [eax+ebp+8], 0FFFFFFFEh
jnz	short loc_6AF291
mov	ebp, [esi+4]
mov	ecx, ebx
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	ebp, edi
jnz	short loc_6AF2EF
test	ecx, ecx
jz	short loc_6AF2CE
mov	[ecx], edx
mov	edx, [esi+4]
mov	[ecx+4], edx
mov	eax, [esi+8]
lea	edx, [esi+0Ch]
mov	[ecx+8], eax
push	edx
add	ecx, 0Ch
call	sub_67ABE0

loc_6AF2CE:
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax]
add	eax, 4
mov	[esi+8], ecx
push	eax
lea	ecx, [esi+0Ch]
call	sub_67A3D0
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_6AF2EF:
shl	ebp, 4
cmp	[eax+ebp+8], edi
lea	ebp, [eax+ebp+8]
jz	short loc_6AF310
lea	esp, [esp+0]

loc_6AF300:
mov	ebp, [ebp+0]
shl	ebp, 4
cmp	[eax+ebp+8], edi
lea	ebp, [eax+ebp+8]
jnz	short loc_6AF300

loc_6AF310:
test	ecx, ecx
jz	short loc_6AF32E
mov	[ecx], edx
mov	edx, [esi+4]
mov	[ecx+4], edx
mov	eax, [esi+8]
lea	edx, [esi+0Ch]
mov	[ecx+8], eax
push	edx
add	ecx, 0Ch
call	sub_67ABE0

loc_6AF32E:
mov	eax, [esp+10h+arg_4]
mov	[ebp+0], ebx
mov	ecx, [eax]
add	eax, 4
mov	[esi+8], ecx
push	eax
lea	ecx, [esi+0Ch]
call	sub_67A3D0
pop	ebp
pop	ebx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_6AF210 endp

align 10h



sub_6AF360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6AF375
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6AF397

loc_6AF375:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AF39C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6AF397:
call	sub_6AE2C0

loc_6AF39C:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6AF3E0
mov	ebp, [esp+10h+arg_4]
lea	ebx, [esi+8]
push	ebp
mov	ecx, ebx
mov	dword ptr [esi], 0FFFFFFFFh
call	sub_67AF90
mov	al, [ebp+4]
mov	[ebx+4], al
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6AF3E0:
mov	ecx, [eax+4]
mov	ebx, edi

loc_6AF3E5:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
jnz	short loc_6AF3E5
mov	edx, [esi+4]
mov	ecx, ebx
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	edx, edi
jnz	short loc_6AF432
test	ecx, ecx
jz	short loc_6AF40D
push	esi
call	sub_6AC8A0

loc_6AF40D:
mov	edx, [esp+10h+arg_4]
lea	ebp, [esi+8]
push	edx
mov	ecx, ebp
call	sub_67A3D0
mov	eax, [esp+10h+arg_4]
mov	cl, [eax+4]
mov	[ebp+4], cl
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6AF432:
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jz	short loc_6AF450
nop

loc_6AF440:
mov	edx, [ebp+0]
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jnz	short loc_6AF440

loc_6AF450:
test	ecx, ecx
jz	short loc_6AF45A
push	esi
call	sub_6AC8A0

loc_6AF45A:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
lea	ebx, [esi+8]
push	ebp
mov	ecx, ebx
call	sub_67A3D0
mov	al, [ebp+4]
mov	[ebx+4], al
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6AF360 endp

align 10h



; int __cdecl sub_6AF490(char *Src, int, char)
sub_6AF490 proc	near

Src= dword ptr	4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

; FUNCTION CHUNK AT 006AE6E0 SIZE 0000006C BYTES

mov	ecx, [ecx+20h]
jmp	loc_6AE6E0
sub_6AF490 endp

align 10h



sub_6AF4A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	dword ptr [esi+80h], 2
jge	short loc_6AF4BE
lea	eax, [esi+0B8h]
push	eax		; lpCriticalSection
mov	ebx, esi
call	ds:EnterCriticalSection

loc_6AF4BE:
mov	eax, [esi+0D0h]
add	esi, 0D0h
test	eax, eax
jz	short loc_6AF4ED
mov	ecx, [esp+8+arg_4]
mov	edx, ecx
shr	edx, 8
xor	edx, ecx
and	edx, [eax+4]
lea	eax, [esp+8+arg_4]
push	edx
push	eax
mov	ecx, esi
call	sub_6AC930
test	eax, eax
jge	short loc_6AF4F1

loc_6AF4ED:
xor	esi, esi
xor	eax, eax

loc_6AF4F1:
test	esi, esi
jz	short loc_6AF552
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6AF552
cmp	eax, [ecx+4]
jg	short loc_6AF552
lea	esi, [eax+1]
shl	esi, 4
add	esi, ecx
cmp	dword ptr [esi], 0
jnz	short loc_6AF519
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6AF519
call	sub_64A420

loc_6AF519:
push	edi
mov	edi, [esp+0Ch+arg_0]
cmp	dword ptr [edi], 0
jnz	short loc_6AF52F
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6AF52F
call	sub_666B00

loc_6AF52F:
mov	ecx, [esi]
mov	[edi], ecx
mov	edx, [esi+4]
mov	[edi+4], edx
pop	edi
test	ebx, ebx
jz	short loc_6AF54B
add	ebx, 0B8h
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6AF54B:
pop	esi
mov	al, 1
pop	ebx
retn	8

loc_6AF552:
test	ebx, ebx
jz	short loc_6AF563
add	ebx, 0B8h
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6AF563:
pop	esi
xor	al, al
pop	ebx
retn	8
sub_6AF4A0 endp

align 10h



sub_6AF570 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 24h
push	ebx
mov	ebx, [esp+28h+arg_14]
push	ebp
mov	ebp, [esp+2Ch+arg_C]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+4], 1
push	edi
xor	edi, edi
mov	[esi+8], edi
mov	dword ptr [esi+0Ch], offset off_1437474
mov	dword ptr [esi], offset	off_1437EF0
mov	dword ptr [esi+0Ch], offset off_1437ED8
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	[esi+1Ch], edi
cmp	ebx, edi
jnz	loc_6AF66B
mov	eax, [esp+34h+arg_0]
mov	ecx, [eax+20h]
mov	eax, [ecx+24h]
and	eax, 0FFFFFFFCh
add	eax, 8
push	offset asc_154D890 ; "\""
push	eax
call	sub_713740
add	esp, 4
push	eax
push	offset aMoviedef ; "MovieDef  \""
lea	ecx, [esp+40h+var_24]
call	sub_67AE50
mov	ecx, dword_1855FC0
mov	eax, 1000h
mov	[esp+34h+var_18], eax
mov	[esp+34h+var_14], eax
mov	edx, ebp
shr	edx, 10h
and	edx, eax
mov	eax, [esp+34h+arg_1C]
mov	[esp+34h+var_4], eax
mov	eax, [esp+34h+var_24]
mov	[esp+34h+var_C], edi
and	eax, 0FFFFFFFCh
lea	edi, [esp+34h+var_20]
add	eax, 8
mov	[esp+34h+var_20], edx
mov	[esp+34h+var_1C], 10h
mov	[esp+34h+var_10], 0FFFFFFFFh
mov	[esp+34h+var_8], 2
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+10h]
call	eax
mov	edi, [esp+34h+var_24]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
mov	ebx, eax
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AF669
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6AF669:
xor	edi, edi

loc_6AF66B:
mov	edx, [ebx]
mov	eax, [edx+28h]
push	edi
push	88h
mov	ecx, ebx
call	eax
cmp	eax, edi
jz	short loc_6AF696
mov	ecx, [esp+34h+arg_18]
mov	edx, [esp+34h+arg_0]
push	ecx
push	ebp
push	esi
push	edx
push	ebx
mov	ecx, eax
call	sub_6AE900
mov	ebp, eax
jmp	short loc_6AF698

loc_6AF696:
xor	ebp, ebp

loc_6AF698:
mov	ecx, [esi+1Ch]
cmp	ecx, edi
jz	short loc_6AF6A4
call	sub_64A430

loc_6AF6A4:
mov	[esi+1Ch], ebp
cmp	[esp+34h+arg_14], edi
jnz	short loc_6AF6B7
mov	eax, ebp
push	eax
mov	ecx, ebx
call	sub_64A350

loc_6AF6B7:
mov	ebx, [esp+34h+arg_8]
cmp	ebx, edi
jz	short loc_6AF6C6
mov	ecx, ebx
call	sub_64A420

loc_6AF6C6:
mov	ecx, [esi+14h]
cmp	ecx, edi
jz	short loc_6AF6D2
call	sub_64A430

loc_6AF6D2:
mov	[esi+14h], ebx
mov	ebx, [esp+34h+arg_4]
cmp	ebx, edi
jz	short loc_6AF6E4
mov	ecx, ebx
call	sub_64A420

loc_6AF6E4:
mov	ecx, [esi+18h]
cmp	ecx, edi
jz	short loc_6AF6F0
call	sub_64A430

loc_6AF6F0:
mov	[esi+18h], ebx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	34h
call	eax
cmp	eax, edi
jz	short loc_6AF717
mov	ecx, [esp+34h+arg_10]
push	ecx
mov	ecx, eax
call	sub_699080
mov	ebx, eax
jmp	short loc_6AF719

loc_6AF717:
xor	ebx, ebx

loc_6AF719:
mov	ecx, [esi+10h]
cmp	ecx, edi
jz	short loc_6AF725
call	sub_64A430

loc_6AF725:
pop	edi
mov	[esi+10h], ebx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	20h
sub_6AF570 endp

align 10h



sub_6AF740 proc	near

; FUNCTION CHUNK AT 00704190 SIZE 0000002F BYTES

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	edi
mov	dword ptr [esi], offset	off_1437FA4
test	eax, eax
jz	loc_6AF82A
mov	ebp, [eax+78h]
test	ebp, ebp
jz	short loc_6AF764
mov	ecx, ebp
call	sub_64A420

loc_6AF764:
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_6AF7B1
mov	eax, [eax+74h]
cmp	eax, 1
jnz	short loc_6AF79E
push	ebx
mov	ebx, [esi+20h]
mov	edi, [ebx+78h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [ebx+78h]
add	ecx, 1Ch
mov	dword ptr [ebx+74h], 3
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350
pop	ebx

loc_6AF79E:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6AF7AA
call	sub_64A430

loc_6AF7AA:
mov	dword ptr [esi+20h], 0

loc_6AF7B1:
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_6AF7CD
mov	ecx, edi
call	sub_6F4100
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6AF7CD:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6AF7D9
call	sub_64A400

loc_6AF7D9:
mov	dword ptr [esi+1Ch], 0
test	ebp, ebp
jz	short loc_6AF808
lea	edi, [ebp+8]
mov	ecx, edi
call	sub_64D770
lea	ecx, [ebp+1Ch]
mov	byte ptr [ebp+20h], 1
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350
mov	ecx, ebp
call	sub_64A430

loc_6AF808:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6AF814
call	sub_64A430

loc_6AF814:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6AF820
call	sub_64A400

loc_6AF820:
pop	edi
mov	ecx, esi
pop	esi
pop	ebp
jmp	loc_704190

loc_6AF82A:
xor	ebp, ebp
jmp	loc_6AF764
sub_6AF740 endp	; sp-analysis failed

align 10h



sub_6AF840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6AF853
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6AF875

loc_6AF853:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AF87A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6AF875:
call	sub_6AE100

loc_6AF87A:
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, [esi]
cmp	edx, 0FFFFFFFEh
jnz	short loc_6AF8BC
mov	eax, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	ecx, [eax]
mov	edx, [ecx]
mov	[esi+8], edx
mov	eax, [eax+4]
push	eax
lea	ecx, [esi+0Ch]
call	sub_67ABE0
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_6AF8BC:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp

loc_6AF8C3:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	dword ptr [eax+ebp+8], 0FFFFFFFEh
jnz	short loc_6AF8C3
mov	ebp, [esi+4]
mov	ecx, ebx
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	ebp, edi
jnz	short loc_6AF923
test	ecx, ecx
jz	short loc_6AF900
mov	[ecx], edx
mov	edx, [esi+4]
mov	[ecx+4], edx
mov	eax, [esi+8]
lea	edx, [esi+0Ch]
mov	[ecx+8], eax
push	edx
add	ecx, 0Ch
call	sub_67ABE0

loc_6AF900:
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax]
mov	edx, [ecx]
mov	[esi+8], edx
mov	eax, [eax+4]
push	eax
lea	ecx, [esi+0Ch]
call	sub_67A3D0
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_6AF923:
shl	ebp, 4
cmp	[eax+ebp+8], edi
lea	ebp, [eax+ebp+8]
jz	short loc_6AF940

loc_6AF930:
mov	ebp, [ebp+0]
shl	ebp, 4
cmp	[eax+ebp+8], edi
lea	ebp, [eax+ebp+8]
jnz	short loc_6AF930

loc_6AF940:
test	ecx, ecx
jz	short loc_6AF95E
mov	[ecx], edx
mov	edx, [esi+4]
mov	[ecx+4], edx
mov	eax, [esi+8]
lea	edx, [esi+0Ch]
mov	[ecx+8], eax
push	edx
add	ecx, 0Ch
call	sub_67ABE0

loc_6AF95E:
mov	eax, [esp+10h+arg_4]
mov	[ebp+0], ebx
mov	ecx, [eax]
mov	edx, [ecx]
mov	[esi+8], edx
mov	eax, [eax+4]
push	eax
lea	ecx, [esi+0Ch]
call	sub_67A3D0
pop	ebp
pop	ebx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_6AF840 endp

align 10h



sub_6AF990 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_6AF9A4
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_6AF9C6

loc_6AF9A4:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AF9CB
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_6AF9C6:
call	sub_6ADF20

loc_6AF9CB:
mov	eax, [edi]
mov	esi, [esp+0Ch+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
lea	edx, [esi+esi*4]
lea	ebp, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[ebp+0], edx
jnz	short loc_6AFA00
mov	eax, [esp+0Ch+arg_4]
push	0FFFFFFFFh
push	eax
mov	ecx, ebp
call	sub_6AC850
pop	edi
mov	[ebp+4], esi
pop	esi
pop	ebp
retn	0Ch

loc_6AFA00:
mov	ecx, [eax+4]
mov	edi, esi
push	ebx

loc_6AFA06:
inc	edi
and	edi, ecx
lea	ebx, [edi+edi*4]
cmp	[eax+ebx*4+8], edx
jnz	short loc_6AFA06
mov	edx, [ebp+4]
lea	ecx, [edi+edi*4]
lea	ecx, [eax+ecx*4+8]
cmp	edx, esi
jnz	short loc_6AFA44
test	ecx, ecx
jz	short loc_6AFA2A
push	ebp
call	sub_6AC800

loc_6AFA2A:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [ebp+8]
call	sub_6AB000
pop	ebx
mov	[ebp+0], edi
pop	edi
mov	[ebp+4], esi
pop	esi
pop	ebp
retn	0Ch

loc_6AFA44:
lea	edx, [edx+edx*4]
cmp	[eax+edx*4+8], esi
lea	ebx, [eax+edx*4+8]
jz	short loc_6AFA60

loc_6AFA51:
mov	ebx, [ebx]
lea	edx, [ebx+ebx*4]
cmp	[eax+edx*4+8], esi
lea	ebx, [eax+edx*4+8]
jnz	short loc_6AFA51

loc_6AFA60:
test	ecx, ecx
jz	short loc_6AFA6A
push	ebp
call	sub_6AC800

loc_6AFA6A:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [ebp+8]
mov	[ebx], edi
call	sub_6AB000
pop	ebx
pop	edi
mov	[ebp+4], esi
pop	esi
mov	dword ptr [ebp+0], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_6AF990 endp

align 10h



sub_6AFA90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6AFAA5
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6AFAC7

loc_6AFAA5:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6AFACC
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6AFAC7:
call	sub_6AE2C0

loc_6AFACC:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6AFB15
mov	ebp, [esp+10h+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67AF90
mov	ecx, [ebp+4]
mov	dl, [ecx]
mov	[ebx+4], dl
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6AFB15:
mov	ecx, [eax+4]
mov	ebx, edi
lea	ebx, [ebx+0]

loc_6AFB20:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
jnz	short loc_6AFB20
mov	edx, [esi+4]
mov	ecx, ebx
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	edx, edi
jnz	short loc_6AFB71
test	ecx, ecx
jz	short loc_6AFB48
push	esi
call	sub_6AC8A0

loc_6AFB48:
mov	edx, [esp+10h+arg_4]
mov	eax, [edx]
lea	ebp, [esi+8]
push	eax
mov	ecx, ebp
call	sub_67A3D0
mov	ecx, [esp+10h+arg_4]
mov	edx, [ecx+4]
mov	al, [edx]
mov	[ebp+4], al
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6AFB71:
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jz	short loc_6AFB90
mov	edi, edi

loc_6AFB80:
mov	edx, [ebp+0]
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jnz	short loc_6AFB80

loc_6AFB90:
test	ecx, ecx
jz	short loc_6AFB9A
push	esi
call	sub_6AC8A0

loc_6AFB9A:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67A3D0
mov	ecx, [ebp+4]
mov	dl, [ecx]
mov	[ebx+4], dl
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6AFA90 endp

align 10h



; int __fastcall sub_6AFBD0(volatile LONG *Target)
sub_6AFBD0 proc	near
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi]
push	0		; Value
push	esi		; Target
call	ds:InterlockedExchange
test	edi, edi
jz	short loc_6AFBEA

loc_6AFBE3:
mov	edi, [edi+20h]
test	edi, edi
jnz	short loc_6AFBE3

loc_6AFBEA:
cmp	dword ptr [esi+8], 0
jz	short loc_6AFC54
push	ebx
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
jmp	short loc_6AFC00
align 10h

loc_6AFC00:
mov	ebx, [esi+8]
mov	eax, [esi+8]
mov	eax, [eax+18h]
mov	[esi+8], eax
mov	edi, [ebx+0Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6AFC2D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6AFC2D:
mov	ecx, [ebx+4]
mov	edx, [ebx]
push	ecx
push	edx
call	sub_6AC5B0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx]
mov	eax, [eax+30h]
add	esp, 8
push	edx
call	eax
cmp	dword ptr [esi+8], 0
jnz	short loc_6AFC00
pop	ebp
pop	ebx

loc_6AFC54:
cmp	dword ptr [esi+18h], 0
jz	short loc_6AFC83
lea	ebx, [ebx+0]

loc_6AFC60:
mov	eax, [esi+18h]
mov	ecx, [esi+18h]
mov	ecx, [ecx+0Ch]
mov	[esi+18h], ecx
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6AFC7D
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+8]
push	eax
call	edx

loc_6AFC7D:
cmp	dword ptr [esi+18h], 0
jnz	short loc_6AFC60

loc_6AFC83:
cmp	dword ptr [esi+10h], 0
jz	short loc_6AFCAE
lea	esp, [esp+0]

loc_6AFC90:
mov	eax, [esi+10h]
mov	ecx, [esi+10h]
mov	ecx, [ecx+0Ch]
mov	[esi+10h], ecx
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_6AFCA8
call	sub_64A430

loc_6AFCA8:
cmp	dword ptr [esi+10h], 0
jnz	short loc_6AFC90

loc_6AFCAE:
pop	edi
pop	esi
retn
sub_6AFBD0 endp

align 10h



sub_6AFCC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6AF740
test	[esp+4+arg_0], 1
jz	short loc_6AFCDD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6AFCDD:
mov	eax, esi
pop	esi
retn	4
sub_6AFCC0 endp

align 10h



sub_6AFCF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	edx, [esp+8+arg_0]
push	esi
push	edi
push	ecx
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	ecx, esp
mov	[ecx], edx
mov	eax, [eax+20h]
lea	ecx, [esp+14h+var_8]
push	ecx
mov	ecx, eax
mov	[esp+18h+var_8], 0
mov	[esp+18h+var_4], 0
call	sub_6AF4A0
test	al, al
jz	short loc_6AFD54
mov	edx, [esp+10h+arg_4]
mov	edi, [esp+10h+var_4]
push	edx
push	edi
lea	ecx, [esi+18h]
call	sub_714110
cmp	[esp+10h+var_8], 0
jnz	short loc_6AFD4A
test	edi, edi
jz	short loc_6AFD4A
mov	ecx, edi
call	sub_666B00

loc_6AFD4A:
mov	al, 1
pop	edi
pop	esi
add	esp, 8
retn	0Ch

loc_6AFD54:
cmp	[esp+10h+var_8], 0
jnz	short loc_6AFD68
mov	ecx, [esp+10h+var_4]
test	ecx, ecx
jz	short loc_6AFD68
call	sub_666B00

loc_6AFD68:
pop	edi
xor	al, al
pop	esi
add	esp, 8
retn	0Ch
sub_6AFCF0 endp

align 10h



sub_6AFD80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	edx, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
mov	eax, [esi+1Ch]
mov	eax, [eax+0Ch]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	eax, [eax+20h]
lea	ecx, [esp+14h+var_8]
push	ecx
mov	ecx, eax
mov	[esp+18h+var_8], 0
mov	[esp+18h+var_4], 0
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
call	sub_6AF4A0
test	al, al
jz	short loc_6AFE01
mov	esi, [esi+1Ch]
lea	edx, [esp+10h+arg_0]
push	edx
add	esi, 18h
push	esi
lea	ecx, [esp+18h+var_8]
call	sub_6ABF80
mov	esi, eax
test	esi, esi
jz	short loc_6AFE01
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	eax, 8000h
jz	short loc_6AFE01
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax+28h]
mov	[edi+4], ecx
mov	[edi], esi

loc_6AFE01:
cmp	[esp+10h+var_8], 0
jnz	short loc_6AFE15
mov	ecx, [esp+10h+var_4]
test	ecx, ecx
jz	short loc_6AFE15
call	sub_666B00

loc_6AFE15:
mov	eax, edi
pop	edi
pop	esi
add	esp, 8
retn	8
sub_6AFD80 endp

align 10h



sub_6AFE20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
mov	ebx, [ebp+0]
push	esi
push	edi
mov	[esp+14h+var_4], ecx
mov	eax, 4
mov	esi, 1505h
lea	ebx, [ebx+0]

loc_6AFE40:
movzx	edx, byte ptr [ebx+eax-1]
imul	esi, 1003Fh
dec	eax
add	esi, edx
test	eax, eax
ja	short loc_6AFE40
mov	edi, [ecx]
test	edi, edi
jz	short loc_6AFE8A
mov	eax, [edi+4]
and	eax, esi
push	eax
push	ebp
call	sub_6AC7A0
test	eax, eax
jl	short loc_6AFE86
mov	ecx, [ebx]
inc	eax
shl	eax, 4
add	eax, edi
mov	[eax], ecx
mov	edx, [ebp+4]
push	edx
lea	ecx, [eax+4]
call	sub_67A3D0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_6AFE86:
mov	ecx, [esp+14h+var_4]

loc_6AFE8A:
mov	eax, [esp+14h+arg_0]
push	esi
push	ebp
push	eax
call	sub_6AF840
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6AFE20 endp

align 10h



sub_6AFEA0 proc	near
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	dword ptr [esi+80h], 2
push	edi
mov	dword ptr [esi], offset	off_1437FBC
jge	short loc_6AFEC5
lea	eax, [esi+0B8h]
push	eax		; lpCriticalSection
mov	ebx, esi
call	ds:EnterCriticalSection

loc_6AFEC5:
xor	edi, edi
cmp	[esi+0F8h], edi
jbe	short loc_6AFEE7
nop

loc_6AFED0:
mov	ecx, [esi+0F4h]
lea	ecx, [ecx+edi*8]
call	sub_6F9680
inc	edi
cmp	edi, [esi+0F8h]
jb	short loc_6AFED0

loc_6AFEE7:
xor	edi, edi
cmp	[esi+104h], edi
jbe	short loc_6AFF08

loc_6AFEF1:
mov	edx, [esi+100h]
lea	ecx, [edx+edi*8]
call	sub_6F9680
inc	edi
cmp	edi, [esi+104h]
jb	short loc_6AFEF1

loc_6AFF08:
mov	edi, [esi+18h]
test	edi, edi
jz	short loc_6AFF24
mov	ecx, edi
call	sub_70BC00
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6AFF24:
mov	eax, [esi+78h]
test	eax, eax
jz	short loc_6AFF40
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+78h], 0

loc_6AFF40:
mov	ecx, [esi+11Ch]
test	ecx, ecx
jz	short loc_6AFF4F
call	sub_64A400

loc_6AFF4F:
test	ebx, ebx
jz	short loc_6AFF60
add	ebx, 0B8h
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6AFF60:
lea	ecx, [esi+110h]
call	sub_684870
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+100h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0F4h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+0DCh]	; lpCriticalSection
call	sub_64D730
lea	ecx, [esi+0D8h]
call	sub_6AD1E0
lea	ecx, [esi+0D4h]
call	sub_6ADE80
lea	ecx, [esi+0D0h]
call	sub_6AC8D0
lea	ecx, [esi+0B8h]	; lpCriticalSection
call	sub_64D730
lea	ecx, [esi+94h]	; Target
call	sub_6AFBD0
mov	ecx, [esi+90h]
test	ecx, ecx
jz	short loc_6AFFE4
call	sub_64A430

loc_6AFFE4:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+68h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esi+64h]
mov	ebx, ds:InterlockedExchangeAdd
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B001C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B001C:
mov	edi, [esi+60h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B003D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B003D:
mov	edi, [esi+24h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B005E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B005E:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6B006C
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_6B006C:
cmp	dword ptr [esi+10h], 0
jz	short loc_6B008C

loc_6B0072:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [eax]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi+10h], edi
test	edi, edi
jnz	short loc_6B0072

loc_6B008C:
pop	edi
mov	ecx, esi
pop	esi
pop	ebx
jmp	sub_64A3F0
sub_6AFEA0 endp

align 10h



sub_6B00A0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
mov	eax, [edi+4]
mov	[esp+2Ch+var_18], ecx
xor	ecx, ecx
xor	ebx, ebx
mov	[esp+2Ch+var_19], 0
cmp	eax, ecx
jbe	loc_6B01CF
mov	[esp+2Ch+arg_0], ecx
jmp	short loc_6B00D2
align 10h

loc_6B00D0:
xor	ecx, ecx

loc_6B00D2:
mov	esi, [edi]
add	esi, [esp+2Ch+arg_0]
mov	ebp, [esp+2Ch+arg_4]
push	ecx
push	esi
lea	eax, [esp+34h+var_8]
mov	[esp+34h+var_8], ecx
mov	[esp+34h+var_4], ecx
push	eax
mov	ecx, ebp
call	sub_6AEA50
test	al, al
jnz	short loc_6B0127
mov	ecx, [esp+2Ch+arg_8]
mov	eax, [ecx+0Ch]
test	eax, eax
jz	short loc_6B014A
mov	edx, [edi+0Ch]
mov	ecx, [esi]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
add	eax, 0Ch
push	offset aImportErrorGfx ; "Import error:	GFxResource '%s' is not e"...
push	eax
call	sub_67E7F0
add	esp, 10h
jmp	short loc_6B014A

loc_6B0127:
mov	eax, [esi]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
lea	edx, [esp+30h+var_8]
push	edx
push	ecx
mov	ecx, [esi+4]
mov	eax, esp
mov	[eax], ecx
mov	ecx, [esp+38h+var_18]
call	sub_6AFCF0
mov	[esp+2Ch+var_19], al

loc_6B014A:
mov	ecx, [esp+2Ch+var_8]
test	ecx, ecx
jz	short loc_6B0157
call	sub_666B00

loc_6B0157:
add	[esp+2Ch+arg_0], 0Ch
inc	ebx
cmp	ebx, [edi+4]
jb	loc_6B00D0
cmp	[esp+2Ch+var_19], 0
jz	short loc_6B01D3
cmp	[esp+2Ch+arg_C], 0
jnz	loc_6B03EE
mov	esi, [esp+2Ch+var_18]
lea	ebx, [esi+50h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
test	ebp, ebp
jz	short loc_6B0191
mov	ecx, ebp
call	sub_64A420

loc_6B0191:
mov	edx, [esi+48h]
add	esi, 44h
inc	edx
push	edx
push	esi
mov	ecx, esi
call	sub_6AC600
mov	eax, [esi+4]
mov	ecx, [esi]
lea	esi, [ecx+eax*4-4]
test	esi, esi
jz	short loc_6B01BB
test	ebp, ebp
jz	short loc_6B01B9
mov	ecx, ebp
call	sub_64A420

loc_6B01B9:
mov	[esi], ebp

loc_6B01BB:
test	ebp, ebp
jz	short loc_6B01C6
mov	ecx, ebp
call	sub_666B00

loc_6B01C6:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
jmp	short loc_6B01DE

loc_6B01CF:
mov	ebp, [esp+2Ch+arg_4]

loc_6B01D3:
cmp	[esp+2Ch+arg_C], 0
jnz	loc_6B03EE

loc_6B01DE:
lea	edx, [esp+2Ch+var_14]
push	edx
lea	ecx, [edi+0Ch]
mov	[esp+30h+arg_C], 0
call	sub_67B250
mov	eax, [esp+2Ch+var_14]
and	eax, 0FFFFFFFCh
add	eax, 8
push	offset a_glyphs	; "_glyphs"
push	eax		; char *
call	_strstr
add	esp, 8
test	eax, eax
jz	short loc_6B0255
mov	[esp+2Ch+arg_C], 1
test	ebp, ebp
jz	short loc_6B021C
mov	ecx, ebp
call	sub_64A420

loc_6B021C:
mov	esi, [esp+2Ch+arg_8]
mov	eax, [esi+4Ch]
add	esi, 48h
inc	eax
push	eax
push	esi
mov	ecx, esi
call	sub_7333A0
mov	ecx, [esi+4]
mov	edx, [esi]
lea	esi, [edx+ecx*4-4]
test	esi, esi
jz	short loc_6B024A
test	ebp, ebp
jz	short loc_6B0248
mov	ecx, ebp
call	sub_64A420

loc_6B0248:
mov	[esi], ebp

loc_6B024A:
test	ebp, ebp
jz	short loc_6B0255
mov	ecx, ebp
call	sub_666B00

loc_6B0255:
mov	eax, [esp+2Ch+var_18]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
mov	ecx, [eax+0A4h]
mov	edx, [ebp+1Ch]
add	eax, 0A4h
mov	eax, [edx+0Ch]
mov	eax, [eax+20h]
mov	ebx, [eax+0A4h]
add	eax, 0A4h
mov	[esp+2Ch+arg_8], ecx
mov	[esp+2Ch+arg_0], ebx
test	ecx, ecx
jz	loc_6B03C8
jmp	short loc_6B0294

loc_6B0290:
mov	ebx, [esp+2Ch+arg_0]

loc_6B0294:
mov	ecx, [esp+2Ch+arg_8]
mov	ebp, [ecx+4]
mov	edx, [ebp+0]
mov	eax, [edx+38h]
mov	ecx, ebp
call	eax
test	eax, eax
jz	short loc_6B02B4
cmp	[esp+2Ch+arg_C], 0
jz	loc_6B03B5

loc_6B02B4:
test	ebx, ebx
jz	loc_6B03B5
lea	esp, [esp+0]

loc_6B02C0:
mov	edi, [ebx+4]
mov	edx, [edi]
mov	eax, [edx+38h]
mov	ecx, edi
call	eax
test	eax, eax
jbe	short loc_6B0320
mov	edx, [edi]
mov	esi, [edi+14h]
mov	eax, [edx+3Ch]
mov	ecx, edi
and	esi, 303h
call	eax
mov	ecx, esi
and	ecx, 300h
neg	ecx
sbb	ecx, ecx
and	ecx, 300h
mov	edx, esi
and	edx, 10h
or	ecx, edx
or	ecx, 3
and	ecx, [ebp+14h]
and	esi, 313h
cmp	ecx, esi
jnz	short loc_6B0320
push	eax		; char *
mov	eax, [ebp+0]
mov	edx, [eax+3Ch]
mov	ecx, ebp
call	edx
push	eax		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6B032C

loc_6B0320:
mov	ebx, [ebx+0Ch]
test	ebx, ebx
jnz	short loc_6B02C0
jmp	loc_6B03B5

loc_6B032C:
mov	ecx, [esp+2Ch+arg_4]
mov	ecx, [ecx+1Ch]
mov	eax, [ebx+8]
xor	edi, edi
add	ecx, 18h
mov	[esp+2Ch+var_10], edi
mov	[esp+2Ch+var_C], edi
mov	dl, [ecx+24h]
test	dl, dl
jz	short loc_6B037E
mov	edx, [ecx+4]
cmp	eax, edx
jnb	short loc_6B037E
mov	ecx, [ecx+8]
lea	esi, [ecx+eax*8]
mov	ecx, [esi]
cmp	ecx, edi
jz	short loc_6B036F
call	sub_64A420
mov	ecx, [esp+2Ch+var_10]
cmp	ecx, edi
jz	short loc_6B036F
call	sub_666B00

loc_6B036F:
mov	edx, [esi]
mov	[esp+2Ch+var_10], edx
mov	eax, [esi+4]
mov	[esp+2Ch+var_C], eax
jmp	short loc_6B0389

loc_6B037E:
push	eax
lea	edx, [esp+30h+var_10]
push	edx
call	sub_714030

loc_6B0389:
cmp	[esp+2Ch+var_10], edi
jz	short loc_6B03B5
mov	ecx, [esp+2Ch+arg_8]
mov	edx, [ecx+8]
mov	ecx, [esp+2Ch+var_18]
lea	eax, [esp+2Ch+var_10]
push	eax
push	edx
add	ecx, 18h
call	sub_714110
mov	ecx, [esp+2Ch+var_10]
test	ecx, ecx
jz	short loc_6B03B5
call	sub_666B00

loc_6B03B5:
mov	eax, [esp+2Ch+arg_8]
mov	eax, [eax+0Ch]
mov	[esp+2Ch+arg_8], eax
test	eax, eax
jnz	loc_6B0290

loc_6B03C8:
mov	esi, [esp+2Ch+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B03EE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B03EE:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	10h
sub_6B00A0 endp

align 10h



sub_6B0400 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
mov	eax, [esp+14h+arg_0]
mov	eax, [eax+4]
push	ebx
push	ebp
push	esi
xor	ebp, ebp
push	edi
mov	edi, ecx
mov	[esp+24h+var_10], edi
mov	[esp+24h+var_14], ebp
cmp	eax, ebp
jbe	loc_6B04FE
lea	ebx, [edi+18h]
mov	[esp+24h+var_C], ebx
jmp	short loc_6B0434
jmp	short loc_6B0430
align 10h

loc_6B0430:
mov	ebx, [esp+24h+var_C]

loc_6B0434:
mov	ecx, [esp+24h+arg_0]
mov	esi, [ecx]
mov	ecx, dword_1855FC0
mov	[esp+24h+var_8], 0
mov	[esp+24h+var_4], ebx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	40h
add	esi, ebp
call	eax
test	eax, eax
jz	short loc_6B0473
mov	edx, [esi]
and	edx, 0FFFFFFFCh
push	0		; int
add	edx, 8
push	edx		; Src
mov	ecx, eax
call	sub_71A760
mov	edi, eax
jmp	short loc_6B0475

loc_6B0473:
xor	edi, edi

loc_6B0475:
or	dword ptr [edi+14h], 40h
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	2Ch
call	eax
test	eax, eax
jz	short loc_6B049B
push	ebx
push	edi
mov	ecx, eax
call	sub_716490
mov	ebx, eax
jmp	short loc_6B049D

loc_6B049B:
xor	ebx, ebx

loc_6B049D:
mov	ecx, [esp+24h+var_8]
test	ecx, ecx
jz	short loc_6B04AA
call	sub_666B00

loc_6B04AA:
mov	[esp+24h+var_8], ebx
mov	eax, [esi]
mov	edx, [esi+4]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
lea	ecx, [esp+28h+var_8]
push	ecx
push	ecx
mov	ecx, [esp+30h+var_10]
mov	eax, esp
mov	[eax], edx
call	sub_6AFCF0
mov	ecx, edi
call	sub_64A430
mov	ecx, [esp+24h+var_8]
test	ecx, ecx
jz	short loc_6B04E1
call	sub_666B00

loc_6B04E1:
mov	eax, [esp+24h+var_14]
mov	ecx, [esp+24h+arg_0]
inc	eax
add	ebp, 0Ch
mov	[esp+24h+var_14], eax
cmp	eax, [ecx+4]
jb	loc_6B0430
mov	edi, [esp+24h+var_10]

loc_6B04FE:
lea	ebp, [edi+50h]
push	ebp		; lpCriticalSection
mov	[esp+28h+arg_0], ebp
call	ds:EnterCriticalSection
mov	esi, [edi+48h]
mov	eax, [edi+48h]
add	edi, 44h
inc	esi
cmp	esi, eax
jnb	short loc_6B0553
mov	ecx, [edi]
sub	eax, esi
lea	edx, [eax+esi]
lea	ebx, [ecx+edx*4-4]
jz	short loc_6B0547
mov	ebp, eax
lea	esp, [esp+0]

loc_6B0530:
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_6B053B
call	sub_666B00

loc_6B053B:
sub	ebx, 4
sub	ebp, 1
jnz	short loc_6B0530
mov	ebp, [esp+24h+arg_0]

loc_6B0547:
mov	edx, [edi+8]
shr	edx, 1
cmp	esi, edx
jnb	short loc_6B0568
push	esi
jmp	short loc_6B0560

loc_6B0553:
cmp	esi, [edi+8]
jb	short loc_6B0568
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax

loc_6B0560:
push	edi
mov	ecx, edi
call	sub_6ABB90

loc_6B0568:
mov	ecx, [edi]
lea	eax, [ecx+esi*4-4]
mov	[edi+4], esi
test	eax, eax
jz	short loc_6B057B
mov	dword ptr [eax], 0

loc_6B057B:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	4
sub_6B0400 endp

align 10h



; int __stdcall	sub_6B0590(char	*, int,	int)
sub_6B0590 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 2Ch
mov	eax, [ecx+1Ch]
mov	edx, [eax+0Ch]
mov	eax, [edx+20h]
push	ebx
push	ebp
push	esi
add	eax, 0A4h
push	edi
mov	edi, [eax]
xor	ebp, ebp
mov	[esp+3Ch+var_24], ecx
mov	[esp+3Ch+var_20], edx
cmp	edi, ebp
jz	loc_6B0684
mov	ebx, [esp+3Ch+arg_4]
mov	esi, ebx
and	esi, 300h
neg	esi
sbb	esi, esi
mov	ecx, ebx
and	esi, 300h
and	ecx, 10h
or	esi, ecx
or	esi, 3
and	ebx, 313h
nop

loc_6B05E0:
mov	ecx, [edi+4]
mov	edx, [ecx+14h]
and	edx, esi
cmp	edx, ebx
jnz	loc_6B0671
mov	eax, [esp+3Ch+arg_0]
mov	edx, [ecx]
push	eax		; char *
mov	eax, [edx+3Ch]
call	eax
push	eax		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_6B0671
mov	ecx, [esp+3Ch+var_24]
mov	ecx, [ecx+1Ch]
mov	eax, [edi+8]
add	ecx, 18h
mov	[esp+3Ch+var_10], ebp
mov	[esp+3Ch+var_C], ebp
mov	dl, [ecx+24h]
test	dl, dl
jz	short loc_6B0658
mov	edx, [ecx+4]
cmp	eax, edx
jnb	short loc_6B0658
mov	ecx, [ecx+8]
lea	ebp, [ecx+eax*8]
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_6B0648
call	sub_64A420
mov	ecx, [esp+3Ch+var_10]
test	ecx, ecx
jz	short loc_6B0648
call	sub_666B00

loc_6B0648:
mov	eax, [ebp+0]
mov	[esp+3Ch+var_10], eax
mov	edx, [ebp+4]
mov	[esp+3Ch+var_C], edx
jmp	short loc_6B0667

loc_6B0658:
push	eax
lea	eax, [esp+40h+var_10]
push	eax
call	sub_714030
mov	eax, [esp+3Ch+var_10]

loc_6B0667:
test	eax, eax
jnz	loc_6B071A
xor	ebp, ebp

loc_6B0671:
mov	edi, [edi+0Ch]
cmp	edi, ebp
jnz	loc_6B05E0
mov	edx, [esp+3Ch+var_20]
mov	ecx, [esp+3Ch+var_24]

loc_6B0684:
mov	eax, [edx+20h]
mov	esi, [eax+9Ch]
add	eax, 9Ch
mov	[esp+3Ch+var_28], esi
cmp	esi, ebp
jnz	loc_6B0784

loc_6B069E:
mov	edx, [ecx]
mov	eax, [esp+3Ch+arg_0]
mov	edx, [edx+6Ch]
push	eax
call	edx
mov	esi, eax
cmp	esi, ebp
jz	loc_6B09EB
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
and	eax, 0FF00h
cmp	eax, 200h
jnz	loc_6B09EB
mov	eax, [esp+3Ch+arg_4]
mov	ecx, eax
and	ecx, 300h
neg	ecx
sbb	ecx, ecx
and	ecx, 300h
mov	edx, eax
and	edx, 10h
or	ecx, edx
mov	edx, [esi+0Ch]
or	ecx, 3
and	ecx, [edx+14h]
and	eax, 313h
cmp	ecx, eax
jnz	loc_6B09EB
mov	eax, [esp+3Ch+arg_8]
cmp	eax, ebp
jz	short loc_6B070E
mov	dword ptr [eax], 6

loc_6B070E:
mov	eax, esi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	0Ch

loc_6B071A:
mov	esi, [esp+3Ch+arg_8]
mov	edi, eax
test	esi, esi
jz	short loc_6B0760
mov	ecx, [eax+0Ch]
mov	edx, [ecx+14h]
shr	edx, 6
not	dl
test	dl, 1
jnz	short loc_6B073C
mov	dword ptr [esi], 2
jmp	short loc_6B0760

loc_6B073C:
test	byte ptr [esp+3Ch+arg_4], 3
jz	short loc_6B075A
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
mov	eax, [esp+3Ch+var_10]
jnz	short loc_6B075A
mov	dword ptr [esi], 3
jmp	short loc_6B0760

loc_6B075A:
mov	dword ptr [esi], 1

loc_6B0760:
test	eax, eax
jz	short loc_6B076B
mov	ecx, eax
call	sub_666B00

loc_6B076B:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	0Ch
jmp	short loc_6B0780
align 10h

loc_6B0780:
mov	esi, [esp+3Ch+var_28]

loc_6B0784:
mov	[esp+3Ch+var_1C], ebp
cmp	[esi+4], ebp
jbe	loc_6B0954
mov	[esp+3Ch+var_2C], ebp

loc_6B0795:
mov	edi, [esp+3Ch+arg_8]
cmp	edi, ebp
jz	short loc_6B07FE
mov	eax, [esi+0Ch]
add	esi, 0Ch
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
add	edi, 4
call	sub_679B00
mov	ebp, [edi]
mov	ebx, eax
test	ebp, ebp
jz	short loc_6B07EE
mov	edx, [ebp+4]
and	edx, ebx
push	edx
push	esi
mov	ecx, edi
call	sub_6ABCA0
test	eax, eax
jl	short loc_6B07EE
lea	eax, [eax+eax*2]
push	esi
lea	ecx, [ebp+eax*4+10h]
call	sub_67A3D0
jmp	short loc_6B07F8

loc_6B07EE:
push	ebx
push	esi
push	edi
mov	ecx, edi
call	sub_6AEE80

loc_6B07F8:
mov	esi, [esp+3Ch+var_28]
xor	ebp, ebp

loc_6B07FE:
mov	ecx, [esi]
mov	edx, [esp+3Ch+var_2C]
mov	eax, [ecx+edx+4]
push	ecx
mov	ecx, esp
mov	[ecx], eax
mov	eax, [esp+40h+var_20]
mov	ecx, [eax+20h]
lea	edx, [esp+40h+var_18]
push	edx
mov	[esp+44h+var_18], ebp
mov	[esp+44h+var_14], ebp
call	sub_6AF4A0
test	al, al
jz	loc_6B096C
mov	eax, [esp+3Ch+var_24]
mov	ecx, [eax+1Ch]
add	ecx, 18h
cmp	[esp+3Ch+var_18], ebp
jnz	short loc_6B0846
mov	ebx, [esp+3Ch+var_14]
mov	edi, ebx
jmp	short loc_6B08AF

loc_6B0846:
mov	dl, [ecx+24h]
mov	[esp+3Ch+var_8], ebp
mov	[esp+3Ch+var_4], ebp
test	dl, dl
jz	short loc_6B0891
mov	eax, [ecx+4]
mov	ebx, [esp+3Ch+var_14]
cmp	ebx, eax
jnb	short loc_6B0895
mov	ecx, [ecx+8]
mov	ebx, [esp+3Ch+var_14]
lea	edi, [ecx+ebx*8]
mov	ecx, [edi]
cmp	ecx, ebp
jz	short loc_6B0882
call	sub_64A420
mov	ecx, [esp+3Ch+var_8]
cmp	ecx, ebp
jz	short loc_6B0882
call	sub_666B00

loc_6B0882:
mov	ecx, [edi]
mov	[esp+3Ch+var_8], ecx
mov	edx, [edi+4]
mov	[esp+3Ch+var_4], edx
jmp	short loc_6B08A4

loc_6B0891:
mov	ebx, [esp+3Ch+var_14]

loc_6B0895:
push	ebx
lea	eax, [esp+40h+var_8]
push	eax
call	sub_714030
mov	ecx, [esp+3Ch+var_8]

loc_6B08A4:
mov	edi, ecx
cmp	ecx, ebp
jz	short loc_6B08AF
call	sub_666B00

loc_6B08AF:
cmp	edi, ebp
jz	short loc_6B092C
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
call	eax
and	eax, 0FF00h
cmp	eax, 200h
jnz	short loc_6B092C
mov	eax, [esp+3Ch+arg_4]
mov	ecx, eax
and	ecx, 300h
neg	ecx
sbb	ecx, ecx
and	ecx, 300h
mov	edx, eax
and	edx, 10h
or	ecx, edx
mov	edx, [edi+0Ch]
or	ecx, 3
and	ecx, [edx+14h]
and	eax, 313h
cmp	ecx, eax
jnz	short loc_6B092C
mov	eax, [esi]
mov	ecx, [esp+3Ch+var_2C]
mov	eax, [ecx+eax]
mov	ebp, [esp+3Ch+arg_0]
and	eax, 0FFFFFFFCh
push	ebp		; char *
add	eax, 8
push	eax		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6B0972
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
push	ebp		; char *
push	eax		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6B0972
xor	ebp, ebp

loc_6B092C:
cmp	[esp+3Ch+var_18], ebp
jnz	short loc_6B093D
cmp	ebx, ebp
jz	short loc_6B093D
mov	ecx, ebx
call	sub_666B00

loc_6B093D:
mov	eax, [esp+3Ch+var_1C]
add	[esp+3Ch+var_2C], 0Ch
inc	eax
mov	[esp+3Ch+var_1C], eax
cmp	eax, [esi+4]
jb	loc_6B0795

loc_6B0954:
mov	esi, [esi+18h]
mov	[esp+3Ch+var_28], esi
cmp	esi, ebp
jnz	loc_6B0780
mov	ecx, [esp+3Ch+var_24]
jmp	loc_6B069E

loc_6B096C:
mov	ebx, [esp+3Ch+var_14]
jmp	short loc_6B092C

loc_6B0972:
mov	ebp, [esp+3Ch+arg_8]
test	ebp, ebp
jz	short loc_6B09CD
mov	ecx, [esi+0Ch]
add	esi, 0Ch
and	ecx, 0FFFFFFFCh
mov	edx, [ecx]
and	edx, 7FFFFFFFh
cmp	edx, 0Eh
jb	short loc_6B09BD
mov	eax, [esi]
mov	ecx, eax
and	eax, 0FFFFFFFCh
mov	eax, [eax]
and	ecx, 0FFFFFFFCh
and	eax, 7FFFFFFFh
push	offset aGfxfontlib_swf ; "gfxfontlib.swf"
lea	eax, [ecx+eax-6]
push	eax		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_6B09BD
mov	dword ptr [ebp+0], 5
jmp	short loc_6B09C4

loc_6B09BD:
mov	dword ptr [ebp+0], 4

loc_6B09C4:
push	esi
lea	ecx, [ebp+8]
call	sub_67A3D0

loc_6B09CD:
cmp	[esp+3Ch+var_18], 0
jnz	short loc_6B09DF
test	ebx, ebx
jz	short loc_6B09DF
mov	ecx, ebx
call	sub_666B00

loc_6B09DF:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	0Ch

loc_6B09EB:
mov	eax, [esp+3Ch+arg_8]
cmp	eax, ebp
jz	short loc_6B09F5
mov	[eax], ebp

loc_6B09F5:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 2Ch
retn	0Ch
sub_6B0590 endp

align 10h



sub_6B0A10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	ebx, ecx
call	sub_659260
lea	esi, [ebp+0Ch]
lea	edi, [ebx+0Ch]
mov	ecx, 8
rep movsd
fld	dword ptr [ebp+2Ch]
fstp	dword ptr [ebx+2Ch]
fld	dword ptr [ebp+30h]
fstp	dword ptr [ebx+30h]
fld	dword ptr [ebp+34h]
fstp	dword ptr [ebx+34h]
fld	dword ptr [ebp+38h]
fstp	dword ptr [ebx+38h]
fld	dword ptr [ebp+3Ch]
fstp	dword ptr [ebx+3Ch]
fld	dword ptr [ebp+40h]
fstp	dword ptr [ebx+40h]
pop	edi
fld	dword ptr [ebp+44h]
pop	esi
fstp	dword ptr [ebx+44h]
mov	eax, [ebp+48h]
mov	[ebx+48h], eax
mov	ecx, [ebp+4Ch]
mov	[ebx+4Ch], ecx
mov	dx, [ebp+50h]
mov	[ebx+50h], dx
mov	al, [ebp+52h]
mov	[ebx+52h], al
mov	cl, [ebp+53h]
pop	ebp
mov	[ebx+53h], cl
mov	eax, ebx
pop	ebx
retn	4
sub_6B0A10 endp




sub_6B0A80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6AFEA0
test	[esp+4+arg_0], 1
jz	short loc_6B0A9D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B0A9D:
mov	eax, esi
pop	esi
retn	4
sub_6B0A80 endp

align 10h



sub_6B0AB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
cmp	dword ptr [esi+80h], 2
jge	short loc_6B0AD1
lea	eax, [esi+0B8h]
push	eax		; lpCriticalSection
mov	edi, esi
call	ds:EnterCriticalSection

loc_6B0AD1:
mov	ecx, [esp+18h+arg_4]
mov	[esp+18h+var_10], 0
mov	[esp+18h+var_C], ecx
test	ecx, ecx
jz	short loc_6B0AEA
call	sub_64A420

loc_6B0AEA:
lea	eax, [esp+18h+var_10]
mov	[esp+18h+var_4], eax
mov	eax, [esp+18h+arg_0]
lea	edx, [esp+18h+arg_0]
mov	[esp+18h+var_8], edx
mov	edx, eax
shr	edx, 8
xor	edx, eax
push	edx
lea	eax, [esp+1Ch+var_8]
lea	ecx, [esi+0D0h]
push	eax
push	ecx
call	sub_6AEFA0
cmp	[esp+18h+var_10], 0
jnz	short loc_6B0B2B
mov	ecx, [esp+18h+var_C]
test	ecx, ecx
jz	short loc_6B0B2B
call	sub_666B00

loc_6B0B2B:
test	edi, edi
jz	short loc_6B0B3C
add	edi, 0B8h
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6B0B3C:
pop	edi
pop	esi
add	esp, 10h
retn	8
sub_6B0AB0 endp

align 10h



sub_6B0B50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0B4h]
push	edi
mov	edi, [esp+14h+arg_0]
mov	dword ptr [edi], 1
mov	[edi+4], eax
inc	dword ptr [esi+0B4h]
xor	ebx, ebx
cmp	dword ptr [esi+80h], 2
jge	short loc_6B0B8B
lea	eax, [esi+0B8h]
push	eax		; lpCriticalSection
mov	ebx, esi
call	ds:EnterCriticalSection

loc_6B0B8B:
mov	edx, [esp+14h+arg_4]
lea	eax, [esp+14h+arg_4]
mov	[esp+14h+var_8], eax
mov	eax, edx
shr	eax, 8
xor	eax, edx
push	eax
lea	edx, [esp+18h+var_8]
lea	ecx, [esi+0D0h]
push	edx
push	ecx
mov	[esp+20h+var_4], edi
call	sub_6AEFA0
test	ebx, ebx
jz	short loc_6B0BC5
lea	eax, [ebx+0B8h]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6B0BC5:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	8
sub_6B0B50 endp




sub_6B0BD0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	byte ptr -28h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_6C=	dword ptr  74h
arg_70=	dword ptr  78h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 78h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	edi
test	eax, eax
jz	loc_6B123A
mov	eax, [eax+74h]
and	eax, 0Fh
cmp	eax, 1
jz	short loc_6B0C0F
test	eax, eax
jnz	loc_6B15CD
mov	eax, [esi+20h]
mov	eax, [eax+74h]
and	eax, 0FFFFFFF1h
or	eax, 1
push	eax
call	sub_6AC090

loc_6B0C0F:
mov	eax, [esi+14h]
test	eax, eax
jz	short loc_6B0C1B
mov	edi, [eax+20h]
jmp	short loc_6B0C2C

loc_6B0C1B:
mov	ecx, [esi+24h]
mov	eax, [ecx+20h]
mov	edi, [eax+94h]
add	eax, 94h

loc_6B0C2C:
mov	[esp+88h+var_74], edi
test	edi, edi
jnz	loc_6B0CE4
mov	edx, [esi+24h]
mov	ebx, [edx+20h]
mov	ebp, [ebx+90h]
add	ebp, 8
mov	ecx, ebp
call	sub_64D770
mov	eax, [esi+14h]
test	eax, eax
jz	short loc_6B0C5A
mov	edi, [eax+20h]
jmp	short loc_6B0C6B

loc_6B0C5A:
mov	eax, [esi+24h]
mov	eax, [eax+20h]
mov	edi, [eax+94h]
add	eax, 94h

loc_6B0C6B:
mov	[esp+88h+var_74], edi
test	edi, edi
jnz	short loc_6B0CC2

loc_6B0C73:
cmp	dword ptr [ebx+80h], 1
jnz	short loc_6B0CBE
mov	eax, [esi+20h]
mov	cl, [eax+84h]
test	cl, cl
jnz	short loc_6B0CBE
mov	eax, [ebx+90h]
push	0FFFFFFFFh
lea	edx, [eax+8]
push	edx
lea	ecx, [eax+1Ch]
call	sub_64DCA0
mov	eax, [esi+14h]
test	eax, eax
jz	short loc_6B0CA9
mov	edi, [eax+20h]
jmp	short loc_6B0CBA

loc_6B0CA9:
mov	eax, [esi+24h]
mov	eax, [eax+20h]
mov	edi, [eax+94h]
add	eax, 94h

loc_6B0CBA:
test	edi, edi
jz	short loc_6B0C73

loc_6B0CBE:
mov	[esp+88h+var_74], edi

loc_6B0CC2:
cmp	dword ptr [ebx+80h], 3
jnz	short loc_6B0CD5
mov	ecx, [esi+20h]
mov	byte ptr [ecx+84h], 1

loc_6B0CD5:
mov	ecx, ebp
call	sub_64E350
test	edi, edi
jz	loc_6B151D

loc_6B0CE4:
mov	eax, [esi+20h]
mov	dl, [eax+84h]
test	dl, dl
jnz	loc_6B151D
mov	eax, [esi+10h]
mov	ecx, [esi+20h]
mov	[esi+14h], edi
mov	[esp+88h+var_78], eax
mov	eax, [ecx+14h]
mov	[esp+88h+var_64], eax
test	eax, 100000h
jnz	loc_6B0FE5
cmp	dword ptr [edi+0Ch], 0
mov	edx, [edi+14h]
mov	[esp+88h+var_70], edx
mov	[esp+88h+var_68], 0
jbe	loc_6B0FE5

loc_6B0D2D:
mov	ebx, [esp+88h+var_70]
mov	eax, [ebx+0Ch]
add	ebx, 0Ch
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
and	ecx, 7FFFFFFFh
cmp	ecx, 0Eh
jb	short loc_6B0DAB
and	eax, 0FFFFFFFCh
push	offset aGfxfontlib_swf ; "gfxfontlib.swf"
lea	edx, [eax+ecx-6]
push	edx		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_6B0DAB
mov	ecx, [esi+20h]
call	sub_6AAF70
mov	ebp, eax
test	ebp, ebp
jz	loc_6B0FC4
mov	eax, [ebp+arg_4]
mov	edx, [eax+0Ch]
lea	ecx, [ebp+arg_4]
push	13h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6B0DA4
mov	eax, [esp+88h+var_70]
mov	ecx, [esi+20h]
push	eax
call	sub_6B0400
mov	ecx, edi
call	sub_64A430
mov	ecx, ebp
call	sub_666B00
jmp	loc_6B0FC4

loc_6B0DA4:
mov	ecx, ebp
call	sub_666B00

loc_6B0DAB:
mov	ecx, [esp+88h+var_78]
call	sub_6FE140
mov	ebp, [esp+88h+var_64]
mov	ecx, [esi+20h]
mov	edx, [ecx+10h]
mov	[esp+88h+var_6C], eax
mov	eax, [esi+2Ch]
or	ebp, 1
mov	[esp+88h+var_48], edx
mov	[esp+88h+var_44], 0
test	eax, eax
jnz	short loc_6B0DE1
lea	eax, [esp+88h+var_48]
mov	[esi+2Ch], eax
jmp	short loc_6B0DF7

loc_6B0DE1:
cmp	dword ptr [eax+4], 0
jz	short loc_6B0DF0

loc_6B0DE7:
mov	eax, [eax+4]
cmp	dword ptr [eax+4], 0
jnz	short loc_6B0DE7

loc_6B0DF0:
lea	ecx, [esp+88h+var_48]
mov	[eax+4], ecx

loc_6B0DF7:
cmp	byte ptr [esi+28h], 0
jz	loc_6B0EA2
mov	eax, [ebx]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	ecx, [edx]
and	ecx, 7FFFFFFFh
cmp	ecx, 4
jbe	loc_6B0EA2
and	eax, 0FFFFFFFCh
push	offset a_swf	; ".swf"
lea	eax, [eax+ecx+4]
push	eax		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_6B0EA2
mov	ecx, [esp+88h+var_78]
add	ecx, 40h
push	ecx
push	ebx
push	1
lea	ecx, [esp+94h+var_2C]
call	sub_68E2C0
lea	ecx, [esp+88h+var_28]
call	sub_67A720
mov	eax, [ebx]
and	eax, 0FFFFFFFCh
mov	edx, [eax]
and	edx, 7FFFFFFFh
sub	edx, 4
push	edx
add	eax, 8
push	eax
lea	ecx, [esp+90h+var_28]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset a_gfx	; ".gfx"
lea	ecx, [esp+90h+var_28]
call	sub_67A0C0
mov	eax, [esi+2Ch]
mov	edx, [esp+88h+var_6C]
push	0
push	eax
push	ebp
lea	ecx, [esp+94h+var_2C]
push	ecx
push	edx
call	sub_704640
add	esp, 14h
lea	ecx, [esp+88h+var_2C]
mov	edi, eax
call	sub_68E410
test	edi, edi
jnz	short loc_6B0EE9

loc_6B0EA2:
push	ebx
lea	ecx, [esp+8Ch+var_1C]
mov	[esp+8Ch+var_20], 1
call	sub_67AF90
mov	eax, [esp+88h+var_78]
add	eax, 40h
push	eax
lea	ecx, [esp+8Ch+var_18]
call	sub_67AF90
mov	ecx, [esi+2Ch]
mov	eax, [esp+88h+var_6C]
push	0
push	ecx
push	ebp
lea	edx, [esp+94h+var_20]
push	edx
push	eax
call	sub_704640
add	esp, 14h
lea	ecx, [esp+88h+var_20]
mov	edi, eax
call	sub_68E410

loc_6B0EE9:
mov	eax, [esi+2Ch]
lea	ecx, [esp+88h+var_48]
cmp	eax, ecx
jnz	short loc_6B0EFD
mov	dword ptr [esi+2Ch], 0
jmp	short loc_6B0F1E

loc_6B0EFD:
cmp	dword ptr [eax+4], 0
jz	short loc_6B0F1E

loc_6B0F03:
mov	ecx, [eax+4]
lea	edx, [esp+88h+var_48]
cmp	ecx, edx
jz	short loc_6B0F18
mov	eax, ecx
cmp	dword ptr [eax+4], 0
jnz	short loc_6B0F03
jmp	short loc_6B0F1E

loc_6B0F18:
mov	edx, [ecx+4]
mov	[eax+4], edx

loc_6B0F1E:
test	edi, edi
jz	loc_6B109B
mov	eax, [edi+1Ch]
cmp	eax, [esi+20h]
mov	ebp, [esp+88h+var_78]
setz	al
mov	byte ptr [esp+88h+var_60], al
test	al, al
jz	short loc_6B0F5C
mov	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_6B0F5C
mov	ecx, [ebx]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
add	eax, 0Ch
push	offset aWarningSelfRec ; "Warning: Self	recursive import detected"...
push	eax
call	sub_6AAFC0
add	esp, 0Ch

loc_6B0F5C:
mov	edx, [esp+88h+var_60]
mov	eax, [esp+88h+var_70]
mov	ecx, [esi+20h]
push	edx
push	ebp
push	edi
push	eax
call	sub_6B00A0
mov	ecx, [ebp+arg_0]
mov	eax, [ecx+14h]
mov	[esp+88h+var_5C], eax
test	eax, eax
jz	short loc_6B0FAD
mov	ecx, [esi+20h]
call	sub_6AAF70
mov	ebp, eax
test	ebp, ebp
jz	short loc_6B0FAD
mov	eax, [ebx]
mov	ecx, [esp+88h+var_5C]
mov	edx, [ecx+0Ch]
mov	edx, [edx+4]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
add	ecx, 0Ch
push	edi
push	ebp
call	edx
mov	ecx, ebp
call	sub_666B00

loc_6B0FAD:
mov	ecx, edi
call	sub_666B00
cmp	[esp+88h+var_6C], 0
jz	short loc_6B0FC4
mov	ecx, [esp+88h+var_6C]
call	sub_64A430

loc_6B0FC4:
mov	eax, [esp+88h+var_68]
mov	ecx, [esp+88h+var_70]
mov	edx, [ecx+18h]
mov	edi, [esp+88h+var_74]
inc	eax
mov	[esp+88h+var_68], eax
mov	[esp+88h+var_70], edx
cmp	eax, [edi+0Ch]
jb	loc_6B0D2D

loc_6B0FE5:
cmp	dword ptr [edi+10h], 0
mov	eax, [esi+20h]
mov	ecx, [eax+8]
mov	ebx, [edi+1Ch]
lea	ebp, [eax+18h]
mov	[esp+88h+var_6C], ebp
mov	[esp+88h+var_74], ecx
mov	[esp+88h+var_68], 0
ja	loc_6B10D4

loc_6B100B:
mov	eax, [edi+8]
test	eax, eax
jz	loc_6B1338
mov	edx, [edi+18h]
xor	ecx, ecx
mov	[esp+88h+var_38], ecx
mov	[esp+88h+var_34], ecx
mov	[esp+88h+var_30], ecx
mov	[esp+88h+var_70], edx
mov	[esp+88h+var_68], ecx
cmp	eax, ecx
jbe	loc_6B1326
jmp	short loc_6B1040
align 10h

loc_6B1040:
mov	ecx, [esp+88h+var_6C]
mov	dl, [ecx+24h]
mov	eax, [esp+88h+var_70]
mov	eax, [eax+8]
xor	ebp, ebp
mov	[esp+88h+var_50], ebp
mov	[esp+88h+var_4C], ebp
test	dl, dl
jz	loc_6B1247
mov	edx, [ecx+4]
cmp	eax, edx
jnb	loc_6B1247
mov	ecx, [ecx+8]
lea	ebx, [ecx+eax*8]
mov	ecx, [ebx]
cmp	ecx, ebp
jz	short loc_6B1089
call	sub_64A420
mov	ecx, [esp+88h+var_50]
cmp	ecx, ebp
jz	short loc_6B1089
call	sub_666B00

loc_6B1089:
mov	edx, [ebx]
mov	[esp+88h+var_50], edx
mov	eax, [ebx+4]
mov	[esp+88h+var_4C], eax
jmp	loc_6B1252

loc_6B109B:
mov	ecx, esi
call	sub_6AB670
mov	eax, [esi+20h]
mov	eax, [eax+74h]
and	eax, 0FFFFFFF4h
or	eax, 4
push	eax
mov	ecx, esi
call	sub_6AC090
mov	ecx, [esp+88h+var_6C]
test	ecx, ecx
jz	short loc_6B10C3
call	sub_64A430

loc_6B10C3:
mov	eax, 4
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6B10D0:
mov	ebp, [esp+88h+var_6C]

loc_6B10D4:
mov	ecx, [ebx]
test	ecx, ecx
jz	loc_6B11A2
mov	eax, [esp+88h+var_74]
push	eax
mov	eax, [esp+8Ch+var_78]
push	eax
lea	eax, [esp+90h+var_58]
push	eax
mov	eax, [ebx+4]
mov	[esp+94h+var_54], ebp
mov	[esp+94h+var_58], 0
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	eax
call	edx
test	al, al
jz	short loc_6B1178
cmp	dword ptr [esi+1Ch], 0
jz	short loc_6B1169
mov	ecx, [esp+88h+var_58]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
and	eax, 0FF00h
cmp	eax, 100h
jnz	short loc_6B1169
mov	ecx, [esi+30h]
lea	eax, [ebx+8]
push	eax
call	sub_6ACFC0
test	eax, eax
jnz	short loc_6B1169
mov	ecx, [esp+88h+var_58]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
cmp	al, 1
jnz	short loc_6B1169
mov	ecx, [esi+20h]
call	sub_6AAF70
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
mov	ebp, eax
mov	eax, [esp+88h+var_58]
push	eax
push	ebx
call	edx
test	ebp, ebp
jz	short loc_6B1169
mov	ecx, ebp
call	sub_666B00

loc_6B1169:
mov	ecx, [ebx+8]
lea	eax, [esp+88h+var_58]
push	eax
push	ecx
mov	ecx, [esp+90h+var_6C]
jmp	short loc_6B1190

loc_6B1178:
mov	eax, [esi+20h]
mov	dl, [eax+84h]
test	dl, dl
jnz	short loc_6B11BC
mov	ecx, [ebx+8]
lea	eax, [esp+88h+var_58]
push	eax
push	ecx
mov	ecx, ebp

loc_6B1190:
call	sub_714110
mov	ecx, [esp+88h+var_58]
test	ecx, ecx
jz	short loc_6B11A2
call	sub_666B00

loc_6B11A2:
mov	eax, [esp+88h+var_68]
mov	ebx, [ebx+0Ch]
inc	eax
mov	[esp+88h+var_68], eax
cmp	eax, [edi+10h]
jb	loc_6B10D0
jmp	loc_6B100B

loc_6B11BC:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6B11CA
mov	edx, [ecx]
mov	eax, [edx+10h]
call	eax

loc_6B11CA:
mov	ecx, [esi+20h]
mov	byte ptr [ecx+3Ch], 1
mov	eax, [esi+20h]
mov	edx, [eax+74h]
and	edx, 0FFFFFFF3h
or	edx, 3
push	edx
mov	ecx, esi
call	sub_6AC090
mov	eax, [esi+20h]
mov	ebx, [eax+78h]
test	ebx, ebx
jz	short loc_6B11F6
mov	ecx, ebx
call	sub_64A420

loc_6B11F6:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6B1202
call	sub_64A430

loc_6B1202:
mov	dword ptr [esi+20h], 0
lea	esi, [ebx+8]
mov	ecx, esi
call	sub_64D770
lea	ecx, [ebx+1Ch]
mov	byte ptr [ebx+20h], 1
call	sub_64D8F0
mov	ecx, esi
call	sub_64E350
mov	ecx, ebx
call	sub_64A430
mov	ecx, [esp+88h+var_58]
test	ecx, ecx
jz	short loc_6B123A
call	sub_666B00

loc_6B123A:
mov	eax, 3
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6B1247:
push	eax
lea	edx, [esp+8Ch+var_50]
push	edx
call	sub_714030

loc_6B1252:
mov	eax, [esp+88h+var_50]
cmp	eax, ebp
jz	short loc_6B12B4
mov	ebp, eax
mov	eax, [esp+88h+var_34]
lea	ebx, [eax+1]
cmp	ebx, eax
jnb	short loc_6B1279
mov	eax, [esp+88h+var_30]
shr	eax, 1
cmp	ebx, eax
jnb	short loc_6B1295
push	ebx
lea	ecx, [esp+8Ch+var_38]
push	ecx
jmp	short loc_6B128C

loc_6B1279:
cmp	ebx, [esp+88h+var_30]
jb	short loc_6B1295
mov	edx, ebx
shr	edx, 2
add	edx, ebx
push	edx
lea	eax, [esp+8Ch+var_38]
push	eax

loc_6B128C:
lea	ecx, [esp+90h+var_38]
call	sub_714BE0

loc_6B1295:
mov	ecx, [esp+88h+var_38]
mov	[esp+88h+var_34], ebx
lea	ebx, [ecx+ebx*4-4]
test	ebx, ebx
jz	short loc_6B12A7
mov	[ebx], ebp

loc_6B12A7:
mov	ecx, [esp+88h+var_50]
test	ecx, ecx
jz	short loc_6B12B4
call	sub_666B00

loc_6B12B4:
mov	eax, [esp+88h+var_68]
mov	edx, [esp+88h+var_70]
mov	ecx, [edx+0Ch]
inc	eax
mov	[esp+88h+var_68], eax
mov	[esp+88h+var_70], ecx
cmp	eax, [edi+8]
jb	loc_6B1040
cmp	[esp+88h+var_34], 0
jz	short loc_6B1326
mov	eax, [esp+88h+var_78]
mov	edx, [eax+8]
cmp	dword ptr [edx+1Ch], 0
jz	short loc_6B1326
cmp	byte ptr [eax+44h], 0
jnz	short loc_6B12F5
cmp	dword ptr [eax+18h], 0
jnz	short loc_6B12F5
xor	ecx, ecx
jmp	short loc_6B12FA

loc_6B12F5:
mov	ecx, 1

loc_6B12FA:
push	ecx
mov	ecx, [esp+8Ch+var_74]
push	ecx
mov	edx, eax
mov	eax, [edx+8]
lea	ecx, [esi+18h]
push	ecx
mov	ecx, [edx+0Ch]
mov	edx, [edx+20h]
push	ecx
mov	ecx, [eax+10h]
mov	eax, [eax+1Ch]
push	edx
push	ecx
lea	edx, [esp+0A0h+var_38]
push	edx
push	eax
call	sub_71D5A0
add	esp, 20h

loc_6B1326:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+88h+var_38]
mov	edx, [edx+30h]
push	eax
call	edx

loc_6B1338:
mov	eax, [edi+4]
mov	ecx, [esi+20h]
mov	[ecx+80h], eax
mov	ecx, [esi+20h]
mov	eax, [ecx+7Ch]
inc	eax
push	eax		; Value
add	ecx, 7Ch
push	ecx		; Target
call	ds:InterlockedExchange
mov	eax, [esi+20h]
mov	edx, [eax+7Ch]
cmp	edx, 1
jnz	short loc_6B1396
mov	eax, [esi+20h]
mov	edi, [eax+74h]
mov	ebx, [esi+20h]
or	edi, 100h
test	ebx, ebx
jz	short loc_6B1396
mov	ebp, [ebx+78h]
add	ebp, 8
mov	ecx, ebp
call	sub_64D770
mov	ecx, [ebx+78h]
add	ecx, 1Ch
mov	[ebx+74h], edi
call	sub_64D8F0
mov	ecx, ebp
call	sub_64E350

loc_6B1396:
mov	ecx, [esi+24h]
mov	eax, [ecx]
mov	edx, [eax+28h]
mov	edi, [esi+20h]
call	edx
mov	ecx, [edi+7Ch]
cmp	ecx, eax
jnz	loc_6B1471
mov	edx, [esi+24h]
mov	eax, [edx+20h]
mov	ecx, [eax+28h]
mov	edx, [esi+20h]
mov	[edx+80h], ecx
mov	eax, [esi+1Ch]
test	eax, eax
jz	short loc_6B1424
mov	edi, [esi+20h]
lea	ebx, [edi+50h]
push	ebx		; lpCriticalSection
mov	[esp+8Ch+var_40], offset off_1437E64
mov	[esp+8Ch+var_3C], eax
call	ds:EnterCriticalSection
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_6B13FC
call	sub_666680
test	al, al
jz	short loc_6B13FC
mov	edi, [edi+10h]
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
jmp	short loc_6B1405

loc_6B13FC:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
xor	edi, edi

loc_6B1405:
mov	eax, [edi]
mov	edx, [eax+68h]
push	2
lea	ecx, [esp+8Ch+var_40]
push	ecx
mov	ecx, edi
call	edx
mov	ecx, edi
call	sub_666B00
mov	[esp+88h+var_40], offset off_143A4DC

loc_6B1424:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6B1432
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx

loc_6B1432:
mov	eax, [esi+20h]
mov	byte ptr [eax+3Ch], 1
mov	eax, [esi+20h]
mov	ebx, [eax+74h]
mov	ebp, [esi+20h]
and	ebx, 0FFFFFFF2h
or	ebx, 202h
test	ebp, ebp
jz	short loc_6B1471
mov	edi, [ebp+arg_70]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [ebp+arg_70]
add	ecx, 1Ch
mov	[ebp+arg_6C], ebx
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350

loc_6B1471:
mov	ecx, [esp+88h+var_78]
mov	ebp, [ecx+14h]
test	ebp, ebp
jz	loc_6B150C
mov	edi, [esi+20h]
mov	ecx, [edi+0Ch]
mov	ebx, [ecx+20h]
mov	edx, [ebx+28h]
mov	eax, [ecx]
mov	[esp+88h+var_5C], edx
mov	edx, [eax+28h]
call	edx
mov	[esp+88h+var_64], eax
mov	eax, [edi+7Ch]
mov	edi, [edi+80h]
add	ebx, 24h
push	ebx
lea	ecx, [esp+8Ch+var_14]
mov	[esp+8Ch+var_60], eax
call	sub_67AF90
mov	edx, [esp+88h+var_60]
mov	eax, [esp+88h+var_64]
mov	ecx, [esp+88h+var_5C]
mov	[esp+88h+var_8], edx
mov	edx, [ebp+0]
mov	edx, [edx+4]
mov	[esp+88h+var_4], eax
lea	eax, [esp+88h+var_14]
mov	[esp+88h+var_C], ecx
push	eax
mov	ecx, ebp
mov	[esp+8Ch+var_10], edi
call	edx
mov	edi, [esp+88h+var_14]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B150C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B150C:
mov	esi, [esi+20h]
mov	eax, [esi+74h]
and	eax, 0Fh
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6B151D:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6B152B
mov	edx, [ecx]
mov	eax, [edx+10h]
call	eax

loc_6B152B:
mov	ecx, [esi+20h]
mov	byte ptr [ecx+3Ch], 1
mov	eax, [esi+20h]
mov	dl, [eax+84h]
xor	eax, eax
test	dl, dl
setz	al
add	eax, 3
mov	edi, eax
mov	eax, [esi+20h]
mov	ebx, [eax+74h]
mov	ebp, [esi+20h]
and	ebx, 0FFFFFFF0h
or	ebx, edi
mov	[esp+88h+var_5C], edi
test	ebp, ebp
jz	short loc_6B1583
mov	edi, [ebp+arg_70]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [ebp+arg_70]
add	ecx, 1Ch
mov	[ebp+arg_6C], ebx
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350
mov	edi, [esp+88h+var_5C]

loc_6B1583:
mov	ecx, [esi+20h]
mov	ebx, [ecx+78h]
test	ebx, ebx
jz	short loc_6B1594
mov	ecx, ebx
call	sub_64A420

loc_6B1594:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6B15A0
call	sub_64A430

loc_6B15A0:
mov	dword ptr [esi+20h], 0
lea	esi, [ebx+8]
mov	ecx, esi
call	sub_64D770
lea	ecx, [ebx+1Ch]
mov	byte ptr [ebx+20h], 1
call	sub_64D8F0
mov	ecx, esi
call	sub_64E350
mov	ecx, ebx
call	sub_64A430
mov	eax, edi

loc_6B15CD:
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6B0BD0 endp

align 10h



sub_6B15E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	[esp+8+var_8], eax
mov	eax, [eax]
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
mov	edx, eax
mov	[esp+0Ch+var_4], ecx
and	edx, 0FFFFFFFCh
mov	ecx, [edx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
lea	eax, [esp+10h+var_8]
push	eax
push	esi
mov	ecx, esi
call	sub_6AF990
pop	esi
add	esp, 8
retn	8
sub_6B15E0 endp

align 10h



sub_6B1630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	[esp+8+var_8], eax
mov	eax, [eax]
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
mov	edx, eax
mov	[esp+0Ch+var_4], ecx
and	edx, 0FFFFFFFCh
mov	ecx, [edx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
lea	eax, [esp+10h+var_8]
push	eax
push	esi
mov	ecx, esi
call	sub_6B3900
pop	esi
add	esp, 8
retn	8
sub_6B1630 endp

align 10h



sub_6B1680 proc	near
push	esi
mov	esi, ecx

loc_6B1683:
mov	ecx, esi
call	sub_6B0BD0
cmp	eax, 1
jz	short loc_6B1683
pop	esi
retn
sub_6B1680 endp

align 10h



sub_6B16A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	edx, edx
add	ecx, 4
mov	[esp+arg_0], ecx
mov	[eax+58h], edx
mov	[eax+54h], edx
mov	[eax+5Ch], edx
mov	ecx, eax
jmp	sub_6B0A10
sub_6B16A0 endp

align 10h



sub_6B16C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
xor	ebx, ebx
mov	ebp, 1
mov	[esi+4], ebp
mov	[esi+14h], eax
mov	[esi+10h], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+1Ch], eax
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	[esi+18h], ebx
mov	dword ptr [esi], offset	off_1437FBC
push	eax
lea	ecx, [esi+24h]
mov	[esi+20h], ebx
call	sub_67AB90
lea	ecx, [esi+28h]
call	sub_6AD7D0
mov	[esi+90h], ebx
mov	[esi+94h], ebx
mov	[esi+98h], ebx
mov	[esi+9Ch], ebx
mov	[esi+0A0h], ebx
mov	[esi+0A4h], ebx
mov	[esi+0A8h], ebx
mov	[esi+0ACh], ebx
push	ebx		; int
lea	ecx, [esi+0B8h]	; lpCriticalSection
mov	[esi+0B0h], ebx
call	sub_64D6D0
mov	[esi+0D0h], ebx
mov	[esi+0D4h], ebx
push	ebx		; int
lea	ecx, [esi+0DCh]	; lpCriticalSection
mov	[esi+0D8h], ebx
call	sub_64D6D0
mov	[esi+0F4h], ebx
mov	[esi+0F8h], ebx
mov	[esi+0FCh], ebx
mov	[esi+100h], ebx
mov	[esi+104h], ebx
mov	[esi+108h], ebx
mov	[esi+110h], ebx
mov	dword ptr [esi+114h], 50000h
mov	ecx, [esi+1Ch]
mov	[esi+118h], ebx
mov	[esi+11Ch], ebx
mov	[esi+74h], ebx
mov	[esi+78h], ebx
mov	[esi+7Ch], ebx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0Ch
call	eax
cmp	eax, ebx
jz	short loc_6B17D2
push	1FF8h
mov	ecx, eax
call	sub_70A040
jmp	short loc_6B17D4

loc_6B17D2:
xor	eax, eax

loc_6B17D4:
mov	[esi+18h], eax
mov	[esi+88h], bl
mov	[esi+80h], ebx
mov	[esi+84h], ebx
mov	[esi+8Ch], ebx
mov	[esi+0B4h], ebx
mov	[esi+10Ch], ebx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	24h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B1837
push	ebx
mov	dword ptr [edi], offset	off_155F500
push	ebp
lea	ecx, [edi+8]
mov	[edi+4], ebp
mov	dword ptr [edi], offset	off_1437F64
call	sub_64D9B0
lea	ecx, [edi+1Ch]
call	sub_64DC50
mov	[edi+20h], bl
jmp	short loc_6B1839

loc_6B1837:
xor	edi, edi

loc_6B1839:
mov	ecx, [esi+90h]
cmp	ecx, ebx
jz	short loc_6B1848
call	sub_64A430

loc_6B1848:
mov	[esi+90h], edi
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
cmp	eax, ebx
jz	short loc_6B186F
mov	ecx, [esp+10h+arg_0]
push	ecx
mov	ecx, eax
call	sub_689C00
mov	ebp, eax
jmp	short loc_6B1871

loc_6B186F:
xor	ebp, ebp

loc_6B1871:
mov	ecx, ebp
call	sub_685090
push	ebp
push	ecx
mov	eax, esp
mov	ecx, esi
mov	dword ptr [eax], 10001h
call	sub_6B0AB0
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	58h
call	eax
cmp	eax, ebx
jz	short loc_6B18A5
mov	ecx, eax
call	sub_6C7430
mov	edi, eax
jmp	short loc_6B18A7

loc_6B18A5:
xor	edi, edi

loc_6B18A7:
mov	ecx, edi
call	sub_6C6980
push	edi
push	ecx
mov	eax, esp
mov	ecx, esi
mov	dword ptr [eax], 10002h
call	sub_6B0AB0
cmp	edi, ebx
jz	short loc_6B18CA
mov	ecx, edi
call	sub_666B00

loc_6B18CA:
cmp	ebp, ebx
jz	short loc_6B18D5
mov	ecx, ebp
call	sub_666B00

loc_6B18D5:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B16C0 endp

align 10h



sub_6B18E0 proc	near

var_AC=	dword ptr -0ACh
var_8C=	dword ptr -8Ch
var_74=	dword ptr -74h
var_20=	byte ptr -20h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
sub	esp, 8Ch
push	ebx
mov	ebx, [esp+90h+arg_4]
push	ebp
push	esi
push	edi
push	ebx
mov	esi, ecx
mov	[esi+28h], eax
push	ecx
mov	eax, esp
xor	ebp, ebp
mov	[eax], ebp
call	sub_6B0AB0
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	8Ch
call	eax
mov	edi, eax
cmp	edi, ebp
jz	short loc_6B1949
mov	dword ptr [edi], offset	off_1436C18
mov	dword ptr [edi+4], 1
mov	[edi+8], ebp
mov	dword ptr [edi+0Ch], 40000h
push	1FF8h
lea	ecx, [edi+10h]
mov	dword ptr [edi], offset	off_1437E80
call	sub_713080
jmp	short loc_6B194B

loc_6B1949:
xor	edi, edi

loc_6B194B:
mov	ecx, [esp+9Ch+arg_8]
push	ecx
push	ebx
mov	ecx, edi
call	sub_713330
push	edi
push	ecx
mov	eax, esp
mov	dword ptr [edi+0Ch], 1
mov	ecx, esi
mov	dword ptr [eax], 1
call	sub_6B0AB0
lea	eax, [esi+0DCh]
push	eax		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+44h]
lea	ebx, [esi+0F4h]
push	eax
mov	ecx, ebx
call	sub_6ACF60
mov	eax, [esi+44h]
push	eax
lea	ecx, [esi+100h]
call	sub_6ACF60
mov	[esi+10Ch], ebp
mov	ecx, [esi+14h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	60h
call	eax
cmp	eax, ebp
jz	loc_6B1A47
mov	ecx, [esi+10h]
lea	ebp, [eax+4]
mov	[eax], ecx
mov	[esi+10h], eax
test	ebp, ebp
jz	short loc_6B1A47
lea	ecx, [ebp+4]
test	ecx, ecx
jz	short loc_6B19D6
call	sub_6AD830

loc_6B19D6:
lea	ecx, [esp+9Ch+var_8C]
call	sub_64E8E0
fldz
push	0		; char
push	0		; char
push	0		; __int16
push	ecx		; float
fstp	[esp+0ACh+var_AC]
lea	edx, [esp+0ACh+var_8C]
push	edx		; int
push	1		; char
lea	ecx, [esp+0B4h+var_20]
call	sub_68CFB0
push	eax		; int
push	0		; char
push	1		; int
push	ecx		; int
mov	eax, esp
lea	ecx, [esp+0C4h+var_74]
mov	dword ptr [eax], 1
call	sub_64B940
lea	eax, [esp+9Ch+var_74]
push	eax
lea	ecx, [ebp+8]
call	sub_6B0A10
lea	eax, [ebp+4]
mov	[ebp+0], eax
mov	ecx, [ebx]
mov	[ecx], ebp
mov	edx, [ebx]
mov	dword ptr [edx+4], 1
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+9Ch+var_74]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6B1A47:
lea	eax, [esi+0DCh]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
mov	ebx, [esi+90h]
mov	ebp, [esi+44h]
add	ebx, 8
mov	ecx, ebx
call	sub_64D770
mov	ecx, [esi+90h]
add	ecx, 1Ch
mov	[esi+84h], ebp
mov	dword ptr [esi+80h], 2
call	sub_64D8F0
mov	ecx, ebx
call	sub_64E350
test	edi, edi
jz	short loc_6B1A97
mov	ecx, edi
call	sub_666B00

loc_6B1A97:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8Ch
retn	0Ch
sub_6B18E0 endp

align 10h



sub_6B1AB0 proc	near

var_34=	qword ptr -34h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [ebx+324h]
mov	esi, ecx
test	edi, edi
jnz	short loc_6B1ACA
lea	edi, [ebx+28h]

loc_6B1ACA:
lea	ebp, [esi+0DCh]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+44h]
push	eax
lea	ecx, [esi+0F4h]
call	sub_6ACF60
mov	ecx, [esi+44h]
push	ecx
lea	ecx, [esi+100h]
call	sub_6ACF60
push	ebp		; lpCriticalSection
call	ds:LeaveCriticalSection
fld	dword ptr [esi+40h]
mov	edx, [esi+44h]
push	edx
sub	esp, 8
fstp	[esp+34h+var_34]
push	offset aNoteSwfFrameRa ; "Note:	SWF Frame Rate = %f, Frames = %d\n"...
push	edi
call	nullsub_2
xor	eax, eax
mov	[esi+8Ch], eax
mov	[esp+3Ch+var_18], eax
mov	byte ptr [esp+3Ch+arg_0], al
mov	eax, 88888889h
mul	dword ptr [esi+28h]
shr	edx, 4
add	esp, 14h
cmp	edx, 2000h
mov	[esp+28h+var_14], edx
jge	short loc_6B1B46
mov	[esp+28h+var_14], 2000h

loc_6B1B46:
mov	eax, [edi+34h]
sub	eax, [edi+30h]
add	eax, [edi+2Ch]
cmp	eax, [ebx+270h]
jnb	loc_6B1CAE
jmp	short loc_6B1B60
align 10h

loc_6B1B60:
mov	cl, [esi+88h]
test	cl, cl
jnz	loc_6B1C86
lea	edx, [esp+28h+var_10]
push	edx
mov	ecx, edi
call	sub_6AA6E0
mov	ebp, eax
mov	eax, [esp+28h+var_8]
add	[esp+28h+var_18], eax
cmp	byte ptr [esp+28h+arg_0], 0
jz	short loc_6B1BC0
cmp	dword ptr [esi+84h], 1
jz	short loc_6B1BA5
mov	ecx, [esp+28h+var_18]
cmp	ecx, [esp+28h+var_14]
jg	short loc_6B1BA5
cmp	eax, 2000h
jle	short loc_6B1BC0

loc_6B1BA5:
mov	ecx, [esi+90h]
add	ecx, 1Ch
call	sub_64D8F0
mov	byte ptr [esp+28h+arg_0], 0
mov	[esp+28h+var_18], 0

loc_6B1BC0:
push	0
lea	edx, [esp+2Ch+var_10]
push	edx
lea	eax, [esi+24h]
push	eax
mov	ecx, ebx
call	sub_680AA0
cmp	ebp, 1
jz	short loc_6B1C14
cmp	ebp, 55h
jnb	short loc_6B1BE5
mov	eax, off_167DB78[ebp*4]
jmp	short loc_6B1BF7

loc_6B1BE5:
lea	ecx, [ebp-3E8h]
cmp	ecx, 9
ja	short loc_6B1C05
mov	eax, ds:dword_167CD2C[ebp*4]

loc_6B1BF7:
test	eax, eax
jz	short loc_6B1C05
lea	edx, [esp+28h+var_10]
push	edx
push	ebx
call	eax ; nullsub_39
jmp	short loc_6B1C14

loc_6B1C05:
push	ebp
push	offset aNoTagLoaderFor ; "*** no tag loader for	type %d\n"
push	edi
call	nullsub_2
add	esp, 0Ch

loc_6B1C14:
mov	ecx, edi
call	sub_6A9DB0
inc	dword ptr [esi+8Ch]
cmp	ebp, 1
jnz	short loc_6B1C5A
push	0
push	ebx
mov	ecx, esi
call	sub_6AD390
test	al, al
jz	loc_6B1CFE
push	offset aShowframe ; "  ShowFrame\n"
push	edi
mov	byte ptr [esp+30h+arg_0], 1
call	nullsub_2
mov	ecx, [esp+30h+arg_4]
add	esp, 8
test	ecx, ecx
jz	short loc_6B1C6F
call	sub_6B0BD0
jmp	short loc_6B1C6F

loc_6B1C5A:
test	ebp, ebp
jnz	short loc_6B1C6F
mov	eax, [edi+34h]
sub	eax, [edi+30h]
add	eax, [edi+2Ch]
cmp	eax, [ebx+270h]
jnz	short loc_6B1CA0

loc_6B1C6F:
mov	ecx, [edi+34h]
sub	ecx, [edi+30h]
add	ecx, [edi+2Ch]
cmp	ecx, [ebx+270h]
jb	loc_6B1B60
jmp	short loc_6B1CAE

loc_6B1C86:
mov	ecx, ebx
call	sub_6FD6D0
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6B1C9C
push	3
call	sub_6AC090

loc_6B1C9C:
push	3
jmp	short loc_6B1CF0

loc_6B1CA0:		; "Warning: GFxLoader -	GFxStream-end tag "...
push	offset aWarningGfxload
push	edi
call	sub_6ABC20
add	esp, 8

loc_6B1CAE:
mov	eax, [ebx+2F8h]
lea	ecx, [eax+eax*2]
cmp	dword ptr [ebx+ecx*4+304h], 0
ja	short loc_6B1CCD
test	eax, eax
jnz	short loc_6B1CEE
cmp	[ebx+31Ch], eax
jbe	short loc_6B1CEE

loc_6B1CCD:
push	1
push	ebx
mov	ecx, esi
call	sub_6AD390
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6B1CFE
call	sub_6B0BD0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8

loc_6B1CEE:
push	2

loc_6B1CF0:
mov	edx, [esi+84h]
push	edx
mov	ecx, esi
call	sub_6AB360

loc_6B1CFE:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_6B1AB0 endp

align 10h



sub_6B1D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
lea	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [esp+14h+var_8]
push	ecx
mov	ecx, esi
mov	[esp+18h+arg_0], edi
call	sub_6AD050
mov	eax, [esp+10h+var_8]
test	eax, eax
jz	short loc_6B1D87
cmp	dword ptr [eax], 0
jz	short loc_6B1D87
mov	ecx, [eax]
mov	eax, [esp+10h+var_4]
cmp	eax, [ecx+4]
jg	short loc_6B1D87
mov	edi, [esp+10h+arg_4]
cmp	dword ptr [edi], 0
lea	edx, [eax+eax*4+5]
lea	esi, [ecx+edx*4]
jnz	short loc_6B1D64
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6B1D64
call	sub_64A420

loc_6B1D64:
cmp	dword ptr [esi], 0
jnz	short loc_6B1D75
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6B1D75
call	sub_666B00

loc_6B1D75:
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
pop	edi
mov	[esi+4], ecx
pop	esi
add	esp, 8
retn	8

loc_6B1D87:
mov	edx, [esp+10h+arg_4]
push	edx
push	edi
mov	ecx, esi
call	sub_6B15E0
pop	edi
pop	esi
add	esp, 8
retn	8
sub_6B1D10 endp

align 10h



sub_6B1DA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
lea	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [esp+14h+var_8]
push	ecx
mov	ecx, esi
mov	[esp+18h+arg_0], edi
call	sub_6AD170
mov	eax, [esp+10h+var_8]
test	eax, eax
jz	short loc_6B1DED
cmp	dword ptr [eax], 0
jz	short loc_6B1DED
mov	ecx, [eax]
mov	eax, [esp+10h+var_4]
cmp	eax, [ecx+4]
jg	short loc_6B1DED
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
shl	eax, 4
pop	edi
mov	[eax+ecx+14h], edx
pop	esi
add	esp, 8
retn	8

loc_6B1DED:
mov	eax, [esp+10h+arg_4]
push	eax
push	edi
mov	ecx, esi
call	sub_6B1630
pop	edi
pop	esi
add	esp, 8
retn	8
sub_6B1DA0 endp

align 10h



sub_6B1E10 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_0]
sub	esp, 24h
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+4], 1
xor	edi, edi
mov	[esi+8], edi
mov	dword ptr [esi+0Ch], 40000h
mov	dword ptr [esi+10h], offset off_1437DAC
push	eax
lea	ecx, [esi+14h]
mov	dword ptr [esi], offset	off_1437DF8
mov	dword ptr [esi+10h], offset off_1437DE4
call	sub_666050
mov	ecx, [esp+34h+arg_4]
mov	ebx, [esp+34h+arg_C]
mov	ebp, [esp+34h+arg_8]
mov	[esi+1Ch], ecx
mov	[esi+20h], edi
cmp	ebx, edi
jnz	loc_6B1F16
push	offset asc_154D890 ; "\""
push	ebp
call	sub_713740
add	esp, 4
push	eax
push	offset aMoviedata ; "MovieData \""
lea	ecx, [esp+40h+var_24]
call	sub_67AE50
movzx	eax, [esp+34h+arg_10]
mov	edx, [esp+34h+arg_14]
mov	ecx, dword_1855FC0
neg	eax
sbb	eax, eax
and	eax, 1000h
or	eax, 4
mov	[esp+34h+var_20], eax
mov	eax, [esp+34h+var_24]
mov	[esp+34h+var_C], edi
mov	[esp+34h+var_14], edi
and	eax, 0FFFFFFFCh
lea	edi, [esp+34h+var_20]
add	eax, 8
mov	[esp+34h+var_1C], 10h
mov	[esp+34h+var_10], 0FFFFFFFFh
mov	[esp+34h+var_18], 2000h
mov	[esp+34h+var_8], 4
mov	[esp+34h+var_4], edx
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+10h]
call	eax
mov	edi, [esp+34h+var_24]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
mov	ebx, eax
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B1F14
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B1F14:
xor	edi, edi

loc_6B1F16:
mov	edx, [ebx]
mov	eax, [edx+28h]
push	edi
push	120h
mov	ecx, ebx
call	eax
cmp	eax, edi
jz	short loc_6B1F37
push	ebx
push	ebp
push	esi
mov	ecx, eax
call	sub_6B16C0
mov	ebp, eax
jmp	short loc_6B1F39

loc_6B1F37:
xor	ebp, ebp

loc_6B1F39:
mov	ecx, [esi+20h]
cmp	ecx, edi
jz	short loc_6B1F45
call	sub_64A430

loc_6B1F45:
mov	[esi+20h], ebp
cmp	[esp+34h+arg_C], edi
jnz	short loc_6B1F58
mov	ecx, ebp
push	ecx
mov	ecx, ebx
call	sub_64A350

loc_6B1F58:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	18h
sub_6B1E10 endp

align 10h



sub_6B1F70 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+0DCh]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esp+8+arg_0]
lea	eax, [esi+84h]
push	eax
push	ecx
lea	ecx, [esi+110h]
call	sub_6B1DA0
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	8
sub_6B1F70 endp

align 10h



sub_6B1FB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebp
push	esi
mov	esi, ecx
xor	ebp, ebp
cmp	dword ptr [esi+80h], 2
jge	short loc_6B1FD1
lea	eax, [esi+0B8h]
push	eax		; lpCriticalSection
mov	ebp, esi
call	ds:EnterCriticalSection

loc_6B1FD1:
mov	ecx, [esp+18h+arg_8]
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	edi
push	ecx
lea	edi, [esi+0D4h]
push	ebx
mov	ecx, edi
call	sub_6B1D10
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
mov	ecx, edi
mov	[esp+28h+arg_8], ebx
call	sub_6AD050
mov	eax, [esp+20h+var_C]
lea	edx, [esp+20h+arg_4]
mov	[esp+20h+var_8], edx
mov	edx, [esp+20h+var_10]
mov	edx, [edx]
lea	eax, [eax+eax*4]
lea	eax, [edx+eax*4+10h]
lea	edx, [esp+20h+var_8]
lea	ecx, [esi+0D8h]
push	edx
push	ecx
mov	[esp+28h+var_4], eax
call	sub_6AFE20
pop	edi
pop	ebx
test	ebp, ebp
jz	short loc_6B2040
add	ebp, 0B8h
push	ebp		; lpCriticalSection
call	ds:LeaveCriticalSection

loc_6B2040:
pop	esi
pop	ebp
add	esp, 10h
retn	0Ch
sub_6B1FB0 endp

align 10h



sub_6B2050 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
mov	ebx, ecx
mov	eax, [ebx+1Ch]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+20h]
add	eax, 9Ch
push	ebp
mov	ebp, [eax]
test	ebp, ebp
jz	loc_6B21F5
push	esi
mov	[esp+24h+var_14], 0
push	edi
lea	esp, [esp+0]

loc_6B2080:
mov	esi, [ebx+1Ch]
add	esi, 50h
push	esi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [ebx+1Ch]
mov	ecx, [ebp+14h]
push	esi		; lpCriticalSection
cmp	ecx, [eax+48h]
jnb	loc_6B21E4
mov	edx, [eax+44h]
mov	edi, [edx+ecx*4]
call	ds:LeaveCriticalSection
cmp	[esp+28h+var_14], 0
lea	esi, [ebp+0Ch]
mov	eax, esi
mov	[esp+28h+var_10], eax
jz	short loc_6B2107
mov	eax, [eax]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esp+28h+var_14]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
lea	eax, [esp+2Ch+var_10]
push	eax
lea	ecx, [esp+30h+var_14]
call	sub_6ABE60
test	eax, eax
jl	short loc_6B2107
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6B2107
cmp	eax, [ecx+4]
jle	loc_6B21C6

loc_6B2107:
test	edi, edi
jz	short loc_6B2121
mov	eax, [esi]
mov	ecx, [esp+28h+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	edi
push	ebx
call	edx

loc_6B2121:
cmp	[esp+28h+var_14], 0
mov	byte ptr [esp+28h+var_18+3], 1
mov	[esp+28h+var_C], esi
jz	short loc_6B2188
mov	eax, [esi]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esp+28h+var_14]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
lea	eax, [esp+2Ch+var_C]
push	eax
lea	ecx, [esp+30h+var_14]
call	sub_6ABE60
test	eax, eax
jl	short loc_6B2188
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6B2188
cmp	eax, [ecx+4]
jg	short loc_6B2188
mov	dl, byte ptr [esp+28h+var_18+3]
shl	eax, 4
mov	[eax+ecx+14h], dl
jmp	short loc_6B21C6

loc_6B2188:
mov	[esp+28h+var_8], esi
mov	esi, [esi]
mov	ecx, esi
lea	eax, [esp+28h+var_18+3]
mov	[esp+28h+var_4], eax
and	ecx, 0FFFFFFFCh
mov	eax, [ecx]
push	1505h
and	eax, 7FFFFFFFh
and	esi, 0FFFFFFFCh
push	eax
add	esi, 8
push	esi
call	sub_679B00
push	eax
lea	edx, [esp+2Ch+var_8]
lea	eax, [esp+2Ch+var_14]
push	edx
push	eax
mov	ecx, eax
call	sub_6AFA90

loc_6B21C6:
mov	ebp, [ebp+18h]
test	ebp, ebp
jnz	loc_6B2080
lea	ecx, [esp+28h+var_14]
call	sub_684870
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	4

loc_6B21E4:
call	ds:LeaveCriticalSection
lea	ecx, [esp+28h+var_14]
call	sub_684870
pop	edi
pop	esi

loc_6B21F5:
pop	ebp
pop	ebx
add	esp, 18h
retn	4
sub_6B2050 endp

align 10h



sub_6B2200 proc	near
call	ds:timeGetTime
mov	ecx, 3E8h
mul	ecx
retn
sub_6B2200 endp

align 10h



sub_6B2210 proc	near

var_8= qword ptr -8

sub	esp, 8
lea	eax, [esp+8+var_8]
push	eax		; lpPerformanceCount
call	ds:QueryPerformanceCounter
mov	eax, dword ptr [esp+8+var_8]
mov	edx, dword ptr [esp+8+var_8+4]
add	esp, 8
retn
sub_6B2210 endp

align 10h



sub_6B2230 proc	near

var_8= qword ptr -8

mov	eax, dword ptr qword_1856480
mov	edx, dword ptr qword_1856480+4
mov	ecx, eax
sub	esp, 8
or	ecx, edx
jnz	short loc_6B2260
lea	edx, [esp+8+var_8]
push	edx		; lpFrequency
call	ds:QueryPerformanceFrequency
mov	eax, dword ptr [esp+8+var_8]
mov	edx, dword ptr [esp+8+var_8+4]
mov	dword ptr qword_1856480, eax
mov	dword ptr qword_1856480+4, edx

loc_6B2260:
add	esp, 8
retn
sub_6B2230 endp

align 10h



sub_6B2270 proc	near

PerformanceCount= LARGE_INTEGER	ptr -10h
Frequency= LARGE_INTEGER ptr -8

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
lea	eax, [esp+20h+PerformanceCount]
push	eax		; lpPerformanceCount
call	ds:QueryPerformanceCounter
mov	esi, dword ptr qword_1856480
mov	edi, dword ptr qword_1856480+4
mov	ebx, dword ptr [esp+20h+PerformanceCount]
mov	ebp, dword ptr [esp+20h+PerformanceCount+4]
mov	ecx, esi
or	ecx, edi
jnz	short loc_6B22BB
lea	edx, [esp+20h+Frequency]
push	edx		; lpFrequency
call	ds:QueryPerformanceFrequency
mov	esi, dword ptr [esp+20h+Frequency]
mov	edi, dword ptr [esp+20h+Frequency+4]
mov	dword ptr qword_1856480, esi
mov	dword ptr qword_1856480+4, edi

loc_6B22BB:
push	0
push	0F4240h
push	ebp
push	ebx
call	__allmul
push	edi
push	esi
push	edx
push	eax
call	__aulldiv
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_6B2270 endp

align 10h



sub_6B22E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 3Eh	; switch 63 cases
ja	loc_6B245C	; default
			; jumptable 006B22ED cases 24,25,61
jmp	ds:off_6B2464[eax*4] ; switch jump

loc_6B22F4:		; jumptable 006B22ED case 0
mov	eax, offset aGfxmovierootDi
retn

loc_6B22FA:		; jumptable 006B22ED case 1
mov	eax, offset aGfxvideoprovid
retn

loc_6B2300:		; jumptable 006B22ED case 2
mov	eax, offset aGfxmeshsetDisp
retn

loc_6B2306:		; jumptable 006B22ED case 3
mov	eax, offset aGfxtexture9gri
retn

loc_6B230C:		; jumptable 006B22ED case 4
mov	eax, offset aGfxmeshDisplay
retn

loc_6B2312:		; jumptable 006B22ED case 5
mov	eax, offset aGfxfontcachema
retn

loc_6B2318:		; jumptable 006B22ED case 6
mov	eax, offset aGfxmovierootAd
retn

loc_6B231E:		; jumptable 006B22ED case 7
mov	eax, offset aGfxmovierootDo
retn

loc_6B2324:		; jumptable 006B22ED case 8
mov	eax, offset aGfxmovierootPr
retn

loc_6B232A:		; jumptable 006B22ED case 9
mov	eax, offset aGfxmovieroot_0
retn

loc_6B2330:		; jumptable 006B22ED case 10
mov	eax, offset aGfxmovieroot_1
retn

loc_6B2336:		; jumptable 006B22ED case 11
mov	eax, offset aGfxmovierootGe
retn

loc_6B233C:		; jumptable 006B22ED case 12
mov	eax, offset aGfxmovieroot_2
retn

loc_6B2342:		; jumptable 006B22ED case 13
mov	eax, offset aGfxshapebaseTe
retn

loc_6B2348:		; jumptable 006B22ED case 14
mov	eax, offset aGfxmovierootIn
retn

loc_6B234E:		; jumptable 006B22ED case 15
mov	eax, offset aGfxmovieroot_3
retn

loc_6B2354:		; jumptable 006B22ED case 16
mov	eax, offset aGfxmovieroot_4
retn

loc_6B235A:		; jumptable 006B22ED case 17
mov	eax, offset aGfxmovieroot_5
retn

loc_6B2360:		; jumptable 006B22ED case 18
mov	eax, offset aGfxmovierootSe
retn

loc_6B2366:		; jumptable 006B22ED case 19
mov	eax, offset aGfxmovieroot_6
retn

loc_6B236C:		; jumptable 006B22ED case 20
mov	eax, offset aGfxmovieroot_7
retn

loc_6B2372:		; jumptable 006B22ED case 21
mov	eax, offset aGfxmovieroot_8
retn

loc_6B2378:		; jumptable 006B22ED case 22
mov	eax, offset aGfxmovieroot_9
retn

loc_6B237E:		; jumptable 006B22ED case 23
mov	eax, offset aGfxmovieroo_10
retn

loc_6B2384:		; jumptable 006B22ED case 26
mov	eax, offset aGfxmovieviewIn
retn

loc_6B238A:		; jumptable 006B22ED case 27
mov	eax, offset aGfxmovieview_0
retn

loc_6B2390:		; jumptable 006B22ED case 28
mov	eax, offset aGfxfillstyleGe
retn

loc_6B2396:		; jumptable 006B22ED case 29
mov	eax, offset aGfxfillstyle_0
retn

loc_6B239C:		; jumptable 006B22ED case 31
mov	eax, offset aGfxexternalint
retn

loc_6B23A2:		; jumptable 006B22ED case 30
mov	eax, offset aGfxfscommandha
retn

loc_6B23A8:		; jumptable 006B22ED case 32
mov	eax, offset aDirectAccessAp
retn

loc_6B23AE:		; jumptable 006B22ED case 33
mov	eax, offset aGfxvalueObject
retn

loc_6B23B4:		; jumptable 006B22ED case 34
mov	eax, offset aGfxvalueObje_0
retn

loc_6B23BA:		; jumptable 006B22ED case 35
mov	eax, offset aGfxvalueObje_1
retn

loc_6B23C0:		; jumptable 006B22ED case 36
mov	eax, offset aGfxvalueObje_2
retn

loc_6B23C6:		; jumptable 006B22ED case 37
mov	eax, offset aGfxvalueObje_3
retn

loc_6B23CC:		; jumptable 006B22ED case 38
mov	eax, offset aGfxvalueObje_4
retn

loc_6B23D2:		; jumptable 006B22ED case 39
mov	eax, offset aGfxvalueObje_5
retn

loc_6B23D8:		; jumptable 006B22ED case 40
mov	eax, offset aGfxvalueObje_6
retn

loc_6B23DE:		; jumptable 006B22ED case 41
mov	eax, offset aGfxvalueObje_7
retn

loc_6B23E4:		; jumptable 006B22ED case 42
mov	eax, offset aGfxvalueObje_8
retn

loc_6B23EA:		; jumptable 006B22ED case 43
mov	eax, offset aGfxvalueObje_9
retn

loc_6B23F0:		; jumptable 006B22ED case 44
mov	eax, offset aGfxvalueObj_10
retn

loc_6B23F6:		; jumptable 006B22ED case 45
mov	eax, offset aGfxvalueObj_11
retn

loc_6B23FC:		; jumptable 006B22ED case 46
mov	eax, offset aGfxvalueObj_12
retn

loc_6B2402:		; jumptable 006B22ED case 47
mov	eax, offset aGfxvalueObj_13
retn

loc_6B2408:		; jumptable 006B22ED case 48
mov	eax, offset aGfxvalueObj_14
retn

loc_6B240E:		; jumptable 006B22ED case 49
mov	eax, offset aGfxvalueObj_15
retn

loc_6B2414:		; jumptable 006B22ED case 50
mov	eax, offset aGfxvalueObj_16
retn

loc_6B241A:		; jumptable 006B22ED case 51
mov	eax, offset aGfxvalueObj_17
retn

loc_6B2420:		; jumptable 006B22ED case 52
mov	eax, offset aGfxvalueObj_18
retn

loc_6B2426:		; jumptable 006B22ED case 53
mov	eax, offset aGfxvalueObj_19
retn

loc_6B242C:		; jumptable 006B22ED case 54
mov	eax, offset aGfxvalueObj_20
retn

loc_6B2432:		; jumptable 006B22ED case 55
mov	eax, offset aGfxvalueObj_21
retn

loc_6B2438:		; jumptable 006B22ED case 56
mov	eax, offset aGfxvalueObj_22
retn

loc_6B243E:		; jumptable 006B22ED case 57
mov	eax, offset aGfxvalueObj_23
retn

loc_6B2444:		; jumptable 006B22ED case 58
mov	eax, offset aGfxvalueObj_24
retn

loc_6B244A:		; jumptable 006B22ED case 59
mov	eax, offset aGfxvalueObj_25
retn

loc_6B2450:		; jumptable 006B22ED case 60
mov	eax, offset aGfxvalueObj_26
retn

loc_6B2456:		; jumptable 006B22ED case 62
mov	eax, offset aGfxampserverWa
retn

loc_6B245C:		; default
mov	eax, offset aUnknownFunctio ; jumptable	006B22ED cases 24,25,61
retn
sub_6B22E0 endp

align 4
off_6B2464 dd offset loc_6B22F4, offset	loc_6B22FA ; jump table	for switch statement
dd offset loc_6B2300, offset loc_6B2306
dd offset loc_6B230C, offset loc_6B2312
dd offset loc_6B2318, offset loc_6B231E
dd offset loc_6B2324, offset loc_6B232A
dd offset loc_6B2330, offset loc_6B2336
dd offset loc_6B233C, offset loc_6B2342
dd offset loc_6B2348, offset loc_6B234E
dd offset loc_6B2354, offset loc_6B235A
dd offset loc_6B2360, offset loc_6B2366
dd offset loc_6B236C, offset loc_6B2372
dd offset loc_6B2378, offset loc_6B237E
dd offset loc_6B245C, offset loc_6B245C
dd offset loc_6B2384, offset loc_6B238A
dd offset loc_6B2390, offset loc_6B2396
dd offset loc_6B23A2, offset loc_6B239C
dd offset loc_6B23A8, offset loc_6B23AE
dd offset loc_6B23B4, offset loc_6B23BA
dd offset loc_6B23C0, offset loc_6B23C6
dd offset loc_6B23CC, offset loc_6B23D2
dd offset loc_6B23D8, offset loc_6B23DE
dd offset loc_6B23E4, offset loc_6B23EA
dd offset loc_6B23F0, offset loc_6B23F6
dd offset loc_6B23FC, offset loc_6B2402
dd offset loc_6B2408, offset loc_6B240E
dd offset loc_6B2414, offset loc_6B241A
dd offset loc_6B2420, offset loc_6B2426
dd offset loc_6B242C, offset loc_6B2432
dd offset loc_6B2438, offset loc_6B243E
dd offset loc_6B2444, offset loc_6B244A
dd offset loc_6B2450, offset loc_6B245C
dd offset loc_6B2456



sub_6B2560 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ecx
lea	ebx, [edi+28h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	esi, [esp+0Ch+arg_0]
test	esi, esi
jz	short loc_6B25B3
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
mov	[edi+4Ch], eax
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
fstp	dword ptr [edi+50h]
mov	eax, [esi]
mov	edx, [eax+1Ch]
mov	ecx, esi
call	edx
fstp	dword ptr [edi+54h]
mov	eax, [esi]
mov	edx, [eax+24h]
mov	ecx, esi
call	edx
fstp	dword ptr [edi+58h]
mov	eax, [esi]
mov	edx, [eax+20h]
mov	ecx, esi
call	edx
mov	[edi+5Ch], eax

loc_6B25B3:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn	4
sub_6B2560 endp




sub_6B25C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_6B2602
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_6B25D1:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_6B25E4
mov	dword ptr [eax], 0FFFFFFFEh

loc_6B25E4:
add	ecx, 28h
sub	edx, 1
jnz	short loc_6B25D1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_6B2602:
pop	esi
retn
sub_6B25C0 endp

align 10h



sub_6B2610 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
lea	edi, [ecx+44h]
push	eax
mov	ecx, edi
call	sub_67A2C0
mov	ecx, edi
call	sub_679930
xor	esi, esi
test	eax, eax
jbe	short loc_6B2690
push	ebx
mov	ebx, [edi]
and	ebx, 0FFFFFFFCh

loc_6B2634:
mov	ecx, eax
sub	ecx, esi
mov	dl, [ebx+ecx+7]
dec	ecx
cmp	dl, 2Fh
jz	short loc_6B2652
cmp	dl, 5Ch
jz	short loc_6B2652
inc	esi
cmp	esi, eax
jb	short loc_6B2634
pop	ebx
pop	edi
pop	esi
retn	4

loc_6B2652:
inc	ecx
push	eax
push	ecx
lea	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, edi
call	sub_67B0C0
push	eax
mov	ecx, edi
call	sub_67A3D0
mov	esi, [esp+0Ch+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B268F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B268F:
pop	ebx

loc_6B2690:
pop	edi
pop	esi
retn	4
sub_6B2610 endp

align 10h



sub_6B26A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
cmp	eax, [edi+8]
jb	loc_6B2733
test	eax, eax
jnz	short loc_6B26D9
mov	eax, [edi]
test	eax, eax
jz	short loc_6B26CE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6B26CE:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6B26D9:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6B270C
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6B270C:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*8]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
mov	[edi], eax
pop	esi

loc_6B2733:
pop	edi
retn	8
sub_6B26A0 endp

align 10h



sub_6B2740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*2]
cmp	dword ptr [esi+ecx*8+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*8+8]
mov	eax, edx
jz	short loc_6B278F
cmp	[ecx+4], edx
jnz	short loc_6B278F
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_6B2762:
cmp	[ecx+4], edx
jnz	short loc_6B2776
mov	ebx, [ecx+8]
cmp	ebx, [edi]
jnz	short loc_6B2776
mov	ebx, [ecx+0Ch]
cmp	ebx, [edi+4]
jz	short loc_6B2789

loc_6B2776:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6B2786
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*8+8]
jmp	short loc_6B2762

loc_6B2786:
or	eax, 0FFFFFFFFh

loc_6B2789:
pop	ebx
pop	edi
pop	esi
retn	8

loc_6B278F:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6B2740 endp

align 10h



sub_6B27A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*4]
cmp	dword ptr [edi+ecx*8+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*8+8]
mov	eax, esi
jz	short loc_6B27FF
cmp	[ecx+4], esi
jnz	short loc_6B27FF
mov	edx, [esp+8+arg_0]
push	ebx

loc_6B27C2:
cmp	[ecx+4], esi
jnz	short loc_6B27E6
mov	ebx, [ecx+8]
cmp	ebx, [edx]
jnz	short loc_6B27E6
mov	ebx, [ecx+0Ch]
cmp	ebx, [edx+4]
jnz	short loc_6B27E6
mov	ebx, [ecx+10h]
cmp	ebx, [edx+8]
jnz	short loc_6B27E6
mov	ebx, [ecx+14h]
cmp	ebx, [edx+0Ch]
jz	short loc_6B27F9

loc_6B27E6:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6B27F6
lea	ecx, [eax+eax*4]
lea	ecx, [edi+ecx*8+8]
jmp	short loc_6B27C2

loc_6B27F6:
or	eax, 0FFFFFFFFh

loc_6B27F9:
pop	ebx
pop	edi
pop	esi
retn	8

loc_6B27FF:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6B27A0 endp

align 10h



sub_6B2810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx]
push	ebp
mov	ebp, [esp+4+arg_4]
mov	edx, ebp
shl	edx, 4
cmp	dword ptr [edx+ecx+8], 0FFFFFFFEh
push	esi
lea	esi, [edx+ecx+8]
mov	eax, ebp
mov	[esp+8+arg_4], ecx
jz	short loc_6B289F
cmp	[esi+4], ebp
jnz	short loc_6B289F
push	edi
mov	edi, [esp+0Ch+arg_0]
push	ebx
lea	esp, [esp+0]

loc_6B2840:
cmp	[esi+4], ebp
jnz	short loc_6B2883
mov	edx, [edi]
mov	ecx, [esi+8]
and	edx, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	edx, 8
add	ecx, 8

loc_6B2856:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_6B2876
test	bl, bl
jz	short loc_6B2872
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_6B2876
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_6B2856

loc_6B2872:
xor	ecx, ecx
jmp	short loc_6B287B

loc_6B2876:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_6B287B:
test	ecx, ecx
jz	short loc_6B2898
mov	ecx, [esp+10h+arg_4]

loc_6B2883:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_6B2895
mov	edx, eax
shl	edx, 4
lea	esi, [edx+ecx+8]
jmp	short loc_6B2840

loc_6B2895:
or	eax, 0FFFFFFFFh

loc_6B2898:
pop	ebx
pop	edi
pop	esi
pop	ebp
retn	8

loc_6B289F:
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8
sub_6B2810 endp

align 10h



sub_6B28B0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
add	ecx, 18h
mov	[eax+14h], edx
mov	edx, [ecx]
mov	[eax+18h], edx
mov	edx, [ecx+4]
mov	[eax+1Ch], edx
mov	edx, [ecx+8]
mov	[eax+20h], edx
mov	ecx, [ecx+0Ch]
mov	[eax+24h], ecx
retn	4
sub_6B28B0 endp

align 10h



sub_6B2900 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_6B2942
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_6B2911:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_6B2924
mov	dword ptr [eax], 0FFFFFFFEh

loc_6B2924:
add	ecx, 20h
sub	edx, 1
jnz	short loc_6B2911
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_6B2942:
pop	esi
retn
sub_6B2900 endp

align 10h



sub_6B2950 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi], edx
mov	eax, [eax+4]
mov	[esi+4], eax
push	edi
mov	edi, [ecx+4]
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6B2972
call	sub_64A420

loc_6B2972:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6B2988
call	sub_64A430
mov	ecx, [edi]
pop	edi
mov	[esi+8], ecx
pop	esi
retn	4

loc_6B2988:
mov	edx, [edi]
pop	edi
mov	[esi+8], edx
pop	esi
retn	4
sub_6B2950 endp

align 10h



sub_6B29A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [edi+ecx*8+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*8+8]
mov	eax, esi
jz	short loc_6B29F3
cmp	[ecx+4], esi
jnz	short loc_6B29F3
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp

loc_6B29C3:
cmp	[ecx+4], esi
jnz	short loc_6B29D9
mov	edx, [ebx]
mov	ebp, [ecx+8]
cmp	ebp, [edx]
jnz	short loc_6B29D9
mov	ebp, [ecx+0Ch]
cmp	ebp, [edx+4]
jz	short loc_6B29EC

loc_6B29D9:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6B29E9
lea	edx, [eax+eax*2]
lea	ecx, [edi+edx*8+8]
jmp	short loc_6B29C3

loc_6B29E9:
or	eax, 0FFFFFFFFh

loc_6B29EC:
pop	ebp
pop	ebx
pop	edi
pop	esi
retn	8

loc_6B29F3:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6B29A0 endp

align 10h



sub_6B2A00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*4]
cmp	dword ptr [edi+ecx*8+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*8+8]
mov	eax, esi
jz	short loc_6B2A63
cmp	[ecx+4], esi
jnz	short loc_6B2A63
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp

loc_6B2A23:
cmp	[ecx+4], esi
jnz	short loc_6B2A49
mov	edx, [ebx]
mov	ebp, [ecx+8]
cmp	ebp, [edx]
jnz	short loc_6B2A49
mov	ebp, [ecx+0Ch]
cmp	ebp, [edx+4]
jnz	short loc_6B2A49
mov	ebp, [ecx+10h]
cmp	ebp, [edx+8]
jnz	short loc_6B2A49
mov	ebp, [ecx+14h]
cmp	ebp, [edx+0Ch]
jz	short loc_6B2A5C

loc_6B2A49:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6B2A59
lea	edx, [eax+eax*4]
lea	ecx, [edi+edx*8+8]
jmp	short loc_6B2A23

loc_6B2A59:
or	eax, 0FFFFFFFFh

loc_6B2A5C:
pop	ebp
pop	ebx
pop	edi
pop	esi
retn	8

loc_6B2A63:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6B2A00 endp

align 10h



sub_6B2A70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
push	edi
mov	[esi], ecx
mov	edx, [eax+4]
lea	edi, [eax+8]
lea	ebx, [esi+8]
push	edi
mov	ecx, ebx
mov	[esi+4], edx
call	sub_67ABE0
mov	eax, [edi+4]
mov	[ebx+4], eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6B2A70 endp

align 10h



sub_6B2AA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	edx, [edi+8]
mov	[esi+8], edx
mov	eax, [edi+0Ch]
mov	[esi+0Ch], eax
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_6B2ACA
call	sub_64A420

loc_6B2ACA:
mov	ecx, [edi+10h]
pop	edi
mov	[esi+10h], ecx
mov	eax, esi
pop	esi
retn	4
sub_6B2AA0 endp

align 10h



sub_6B2AE0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_6B2B30
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6B2AF4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6B2B13
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6B2B0D
call	sub_64A430

loc_6B2B0D:
mov	dword ptr [esi], 0FFFFFFFEh

loc_6B2B13:
add	edi, 18h
sub	ebp, 1
jnz	short loc_6B2AF4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_6B2B30:
pop	ebx
retn
sub_6B2AE0 endp

align 10h



sub_6B2B40 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B2B69
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B2B69:
mov	ecx, edi
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_6B2B85
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B2B85:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_6B2B40 endp

align 10h



sub_6B2B90 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebx, [esi+28h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+8]
add	esi, 8
xor	edi, edi
cmp	ecx, edi
jnz	short loc_6B2BB2
xor	ecx, ecx
xor	eax, eax
jmp	short loc_6B2BCF

loc_6B2BB2:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_6B2BC0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6B2BCD
inc	eax
add	ecx, 28h
cmp	eax, edx
jbe	short loc_6B2BC0

loc_6B2BCD:
mov	ecx, esi

loc_6B2BCF:
mov	esi, ecx

loc_6B2BD1:
cmp	esi, edi
jz	short loc_6B2C13
mov	ecx, [esi]
cmp	ecx, edi
jz	short loc_6B2C13
cmp	eax, [ecx+4]
jg	short loc_6B2C13
lea	edx, [eax+eax*4]
lea	ecx, [ecx+edx*8+20h]
mov	[ecx], edi
mov	[ecx+8], edi
mov	[ecx+0Ch], edi
mov	edx, [esi]
mov	ecx, [edx+4]
cmp	eax, ecx
jg	short loc_6B2BD1
inc	eax
cmp	eax, ecx
ja	short loc_6B2BD1
lea	ebp, [eax+eax*4]
lea	edx, [edx+ebp*8+8]

loc_6B2C04:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_6B2BD1
inc	eax
add	edx, 28h
cmp	eax, ecx
jbe	short loc_6B2C04
jmp	short loc_6B2BD1

loc_6B2C13:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_6B2B90 endp

align 10h



sub_6B2C20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
push	ebp
push	esi
mov	esi, ecx
lea	eax, [esi+28h]
push	edi
push	eax		; lpCriticalSection
mov	[esp+28h+var_C], eax
call	ds:EnterCriticalSection
mov	eax, [esi+8]
lea	edx, [esi+8]
test	eax, eax
jnz	short loc_6B2C47
xor	edx, edx
xor	edi, edi
jmp	short loc_6B2C5D

loc_6B2C47:
mov	ecx, [eax+4]
xor	edi, edi
add	eax, 8
nop

loc_6B2C50:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_6B2C5D
inc	edi
add	eax, 28h
cmp	edi, ecx
jbe	short loc_6B2C50

loc_6B2C5D:
mov	ebx, [esp+24h+arg_0]
mov	[esp+24h+var_8], edx

loc_6B2C65:
test	edx, edx
jz	loc_6B2D5D
mov	esi, [edx]
test	esi, esi
jz	loc_6B2D5D
cmp	edi, [esi+4]
jg	loc_6B2D5D
lea	eax, [edi+edi*4]
mov	ecx, [esi+eax*8+18h]
mov	edx, [esi+eax*8+1Ch]
lea	esi, [esi+eax*8+10h]
mov	[esp+24h+var_10], ecx
mov	eax, ecx
mov	cl, 20h
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
mov	[esp+24h+var_14], eax
call	sub_6B2230
mov	ecx, [esi+18h]
push	0
mov	ebp, eax
mov	eax, edx
mov	edx, [esi+1Ch]
push	0F4240h
push	edx
push	ecx
mov	[esp+34h+arg_0], eax
call	__allmul
mov	ecx, [esp+24h+arg_0]
push	ecx
push	ebp
push	edx
push	eax
call	__aulldiv
cmp	[esp+24h+var_14], 1
jnz	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31
mov	ecx, [esp+24h+var_10]
cmp	ecx, 20h	; switch 33 cases
ja	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31
movzx	edx, ds:byte_6B2DA8[ecx]
jmp	ds:off_6B2D74[edx*4] ; switch jump

loc_6B2CEC:		; jumptable 006B2CE5 case 6
add	[ebx+14h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2CF1:		; jumptable 006B2CE5 case 12
add	[ebx+20h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2CF6:		; jumptable 006B2CE5 case 7
add	[ebx+18h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2CFB:		; jumptable 006B2CE5 case 8
add	[ebx+24h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D00:		; jumptable 006B2CE5 case 10
add	[ebx+28h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D05:		; jumptable 006B2CE5 cases 21-23
add	[ebx+2Ch], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D0A:		; jumptable 006B2CE5 cases 18-20
add	[ebx+30h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D0F:		; jumptable 006B2CE5 cases 14-17
add	[ebx+34h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D14:		; jumptable 006B2CE5 case 0
add	[ebx+38h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D19:		; jumptable 006B2CE5 case 13
add	[ebx+3Ch], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D1E:		; jumptable 006B2CE5 case 28
add	[ebx+40h], eax
jmp	short loc_6B2D26 ; default
			; jumptable 006B2CE5 cases 1-5,9,11,24-27,29-31

loc_6B2D23:		; jumptable 006B2CE5 case 32
add	[ebx+44h], eax

loc_6B2D26:		; default
mov	edx, [esp+24h+var_8] ; jumptable 006B2CE5 cases	1-5,9,11,24-27,29-31
mov	ecx, [edx]
mov	eax, [ecx+4]
cmp	edi, eax
jg	loc_6B2C65
inc	edi
cmp	edi, eax
ja	loc_6B2C65
lea	esi, [edi+edi*4]
lea	ecx, [ecx+esi*8+8]

loc_6B2D47:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	loc_6B2C65
inc	edi
add	ecx, 28h
cmp	edi, eax
jbe	short loc_6B2D47
jmp	loc_6B2C65

loc_6B2D5D:
mov	eax, [esp+24h+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
mov	[esp+arg_0], eax
jmp	ds:LeaveCriticalSection
sub_6B2C20 endp

align 4
off_6B2D74 dd offset loc_6B2D14	; jump table for switch	statement
dd offset loc_6B2CEC
dd offset loc_6B2CF6
dd offset loc_6B2CFB
dd offset loc_6B2D00
dd offset loc_6B2CF1
dd offset loc_6B2D19
dd offset loc_6B2D0F
dd offset loc_6B2D0A
dd offset loc_6B2D05
dd offset loc_6B2D1E
dd offset loc_6B2D23
dd offset loc_6B2D26
byte_6B2DA8 db	    0,	 0Ch,	0Ch,   0Ch ; indirect table for	switch statement
db    0Ch,   0Ch,     1,     2
db	3,   0Ch,     4,   0Ch
db	5,     6,     7,     7
db	7,     7,     8,     8
db	8,     9,     9,     9
db    0Ch,   0Ch,   0Ch,   0Ch
db    0Ah,   0Ch,   0Ch,   0Ch
db    0Bh
align 10h



sub_6B2DD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
jz	short loc_6B2E22
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esi]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6B2810
pop	edi
test	eax, eax
jl	short loc_6B2E22
mov	ecx, [esp+4+arg_0]
mov	[ecx], esi
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	8

loc_6B2E22:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
pop	esi
retn	8
sub_6B2DD0 endp

align 10h



sub_6B2E40 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_6B2E4E
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_6B2E4E:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 8
mov	edx, 1505h
mov	edi, edi

loc_6B2E60:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_6B2E60
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_6B2740
pop	esi
pop	ebx
pop	edi
retn	4
sub_6B2E40 endp

align 10h



sub_6B2E90 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_6B2E9E
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_6B2E9E:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 10h
mov	edx, 1505h
mov	edi, edi

loc_6B2EB0:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_6B2EB0
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_6B27A0
pop	esi
pop	ebx
pop	edi
retn	4
sub_6B2E90 endp

align 10h



sub_6B2EE0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

cmp	[esp+arg_0], 0
push	edi
mov	edi, ecx
jz	short loc_6B2F30
mov	ecx, dword_1855FC0
push	esi
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0F0h
push	edi
call	eax
test	eax, eax
jz	short loc_6B2F1A
mov	ecx, eax
call	sub_71D860
mov	esi, eax
jmp	short loc_6B2F1C

loc_6B2F1A:
xor	esi, esi

loc_6B2F1C:
push	esi
mov	ecx, edi
call	sub_6B2C20
test	esi, esi
jz	short loc_6B2F2F
mov	ecx, esi
call	sub_64A430

loc_6B2F2F:
pop	esi

loc_6B2F30:
cmp	[esp+4+arg_4], 0
jz	short loc_6B2F3E
mov	ecx, edi
call	sub_6B2B90

loc_6B2F3E:
pop	edi
retn	8
sub_6B2EE0 endp

align 10h



sub_6B2F50 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_6B2F72
call	sub_6B2AE0
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_6B2F72:
push	esi
cmp	eax, 8
jnb	short loc_6B2F7F
mov	esi, 8
jmp	short loc_6B2FE4

loc_6B2F7F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6B2F92
fadd	ds:flt_15FCC08

loc_6B2F92:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6B2FE4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*8]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_6B3044
xor	eax, eax
jmp	short loc_6B3030
align 10h

loc_6B3030:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 18h
sub	esi, 1
jnz	short loc_6B3030

loc_6B3044:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_6B30C2
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_6B3052:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_6B30A8
lea	edx, [esi+8]
mov	eax, 8
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_6B3070:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_6B3070
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_6B33B0
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6B309E
call	sub_64A430

loc_6B309E:
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_6B30A8:
add	edi, 18h
sub	ebx, 1
jnz	short loc_6B3052
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_6B30C2:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[ebp+0], eax
mov	[esp+18h+arg_4], 0
call	sub_6B2AE0
pop	esi
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_6B2F50 endp

align 10h



sub_6B30F0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_6B3112
call	sub_6B25C0
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_6B3112:
push	esi
cmp	eax, 8
jnb	short loc_6B311F
mov	esi, 8
jmp	short loc_6B3184

loc_6B311F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6B3132
fadd	ds:flt_15FCC08

loc_6B3132:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6B3184:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*8]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_6B31E4
xor	eax, eax
jmp	short loc_6B31D0
align 10h

loc_6B31D0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 28h
sub	esi, 1
jnz	short loc_6B31D0

loc_6B31E4:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_6B3256
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_6B31F2:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_6B323C
lea	edx, [esi+8]
mov	eax, 10h
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_6B3210:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_6B3210
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_6B3510
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_6B323C:
add	edi, 28h
sub	ebx, 1
jnz	short loc_6B31F2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_6B3256:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_6B30F0 endp

align 10h



sub_6B3270 proc	near

lpCriticalSection= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	eax, [edi+28h]
push	eax		; lpCriticalSection
mov	[esp+18h+lpCriticalSection], eax
call	ds:EnterCriticalSection
mov	ebx, [esp+14h+arg_0]
mov	esi, [esp+14h+arg_4]
cmp	ebx, 1
jnz	short loc_6B32AB
lea	eax, [esi-21h]
cmp	eax, 1Bh
ja	short loc_6B32AB
cmp	dword ptr [edi+14h], 0
jnz	short loc_6B32AB
push	20h
push	1
mov	ecx, edi
call	sub_6B3270

loc_6B32AB:
push	1
push	0
push	0
push	ebx
call	__allmul
xor	ecx, ecx
mov	ebx, eax
add	ebx, esi
mov	esi, [edi+14h]
mov	ebp, edx
adc	ebp, ecx
add	edi, 10h
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6B32D9
mov	edx, [edi+8]
shr	edx, 1
cmp	esi, edx
jnb	short loc_6B32EE
push	esi
jmp	short loc_6B32E6

loc_6B32D9:
cmp	esi, [edi+8]
jb	short loc_6B32EE
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax

loc_6B32E6:
push	edi
mov	ecx, edi
call	sub_6B26A0

loc_6B32EE:
mov	ecx, [edi]
lea	eax, [ecx+esi*8-8]
mov	[edi+4], esi
test	eax, eax
jz	short loc_6B3300
mov	[eax], ebx
mov	[eax+4], ebp

loc_6B3300:
mov	edx, [esp+14h+lpCriticalSection]
push	edx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6B3270 endp

align 10h



sub_6B3320 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_6B339E
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
jmp	short loc_6B3340
align 10h

loc_6B3340:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_6B3379
mov	esi, [edi+10h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B3373
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B3373:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6B3379:
add	ebx, 18h
sub	[esp+14h+var_4], 1
jnz	short loc_6B3340
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_6B339E:
pop	ebp
pop	ecx
retn
sub_6B3320 endp

align 10h



sub_6B33B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6B33C4
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_6B33E6

loc_6B33C4:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6B33EB
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6B33E6:
call	sub_6B2F50

loc_6B33EB:
mov	eax, [esi]
mov	ebp, [esp+0Ch+arg_8]
and	ebp, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [ebp+ebp*2+0]
lea	esi, [eax+edx*8+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6B3439
mov	edi, [esp+0Ch+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [edi]
mov	[esi+8], eax
mov	ecx, [edi+4]
mov	[esi+0Ch], ecx
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6B342A
call	sub_64A420

loc_6B342A:
mov	edx, [edi+8]
mov	[esi+10h], edx
pop	edi
mov	[esi+4], ebp
pop	esi
pop	ebp
retn	0Ch

loc_6B3439:
mov	ecx, [eax+4]
mov	edi, ebp
push	ebx
nop

loc_6B3440:
inc	edi
and	edi, ecx
lea	ebx, [edi+edi*2]
cmp	[eax+ebx*8+8], edx
jnz	short loc_6B3440
mov	edx, [esi+4]
lea	ecx, [edi+edi*2]
lea	ecx, [eax+ecx*8+8]
cmp	edx, ebp
jnz	short loc_6B349D
test	ecx, ecx
jz	short loc_6B3464
push	esi
call	sub_6B2AA0

loc_6B3464:
mov	ebx, [esp+10h+arg_4]
mov	edx, [ebx]
mov	[esi+8], edx
mov	eax, [ebx+4]
mov	[esi+0Ch], eax
mov	ecx, [ebx+8]
test	ecx, ecx
jz	short loc_6B347F
call	sub_64A420

loc_6B347F:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6B348B
call	sub_64A430

loc_6B348B:
mov	ecx, [ebx+8]
mov	[esi+10h], ecx
pop	ebx
mov	[esi], edi
pop	edi
mov	[esi+4], ebp
pop	esi
pop	ebp
retn	0Ch

loc_6B349D:
lea	edx, [edx+edx*2]
cmp	[eax+edx*8+8], ebp
lea	ebx, [eax+edx*8+8]
jz	short loc_6B34BF
lea	ebx, [ebx+0]

loc_6B34B0:
mov	ebx, [ebx]
lea	edx, [ebx+ebx*2]
cmp	[eax+edx*8+8], ebp
lea	ebx, [eax+edx*8+8]
jnz	short loc_6B34B0

loc_6B34BF:
test	ecx, ecx
jz	short loc_6B34C9
push	esi
call	sub_6B2AA0

loc_6B34C9:
mov	[ebx], edi
mov	edi, [esp+10h+arg_4]
mov	eax, [edi]
mov	[esi+8], eax
mov	ecx, [edi+4]
mov	[esi+0Ch], ecx
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6B34E6
call	sub_64A420

loc_6B34E6:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6B34F2
call	sub_64A430

loc_6B34F2:
mov	edx, [edi+8]
pop	ebx
mov	[esi+10h], edx
pop	edi
mov	[esi+4], ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
retn	0Ch
sub_6B33B0 endp

align 10h



sub_6B3510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6B3524
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_6B3546

loc_6B3524:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6B354B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6B3546:
call	sub_6B30F0

loc_6B354B:
mov	eax, [esi]
mov	ebp, [esp+0Ch+arg_8]
and	ebp, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [ebp+ebp*4+0]
lea	ebx, [eax+edx*8+8]
mov	esi, 0FFFFFFFEh
cmp	[ebx], esi
jnz	short loc_6B35AE
mov	eax, [esp+0Ch+arg_4]
mov	dword ptr [ebx], 0FFFFFFFFh
mov	ecx, [eax]
mov	[ebx+8], ecx
mov	edx, [eax+4]
mov	[ebx+0Ch], edx
mov	ecx, [eax+8]
mov	[ebx+10h], ecx
mov	edx, [eax+0Ch]
mov	[ebx+14h], edx
mov	ecx, [eax+10h]
add	eax, 10h
mov	[ebx+18h], ecx
mov	edx, [eax+4]
mov	[ebx+1Ch], edx
mov	ecx, [eax+8]
mov	[ebx+20h], ecx
mov	edx, [eax+0Ch]
mov	[ebx+24h], edx
pop	esi
mov	[ebx+4], ebp
pop	ebp
pop	ebx
retn	0Ch

loc_6B35AE:
mov	edx, [eax+4]
mov	ecx, ebp
jmp	short loc_6B35B9

loc_6B35B5:
mov	ecx, [esp+0Ch+arg_0]

loc_6B35B9:
inc	ecx
and	ecx, edx
mov	[esp+0Ch+arg_0], ecx
lea	ecx, [ecx+ecx*4]
cmp	[eax+ecx*8+8], esi
jnz	short loc_6B35B5
push	edi
mov	edi, [esp+10h+arg_0]
lea	edx, [edi+edi*4]
lea	ecx, [eax+edx*8+8]
mov	edx, [ebx+4]
cmp	edx, ebp
jnz	short loc_6B3604
test	ecx, ecx
jz	short loc_6B35E6
push	ebx
call	sub_6B28B0

loc_6B35E6:
mov	esi, [esp+10h+arg_4]
mov	eax, [esp+10h+arg_0]
lea	edi, [ebx+8]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
mov	[ebx+4], ebp
pop	ebp
mov	[ebx], eax
pop	ebx
retn	0Ch

loc_6B3604:
lea	edx, [edx+edx*4]
cmp	[eax+edx*8+8], ebp
lea	esi, [eax+edx*8+8]
jz	short loc_6B3620

loc_6B3611:
mov	esi, [esi]
lea	edx, [esi+esi*4]
cmp	[eax+edx*8+8], ebp
lea	esi, [eax+edx*8+8]
jnz	short loc_6B3611

loc_6B3620:
test	ecx, ecx
jz	short loc_6B362A
push	ebx
call	sub_6B28B0

loc_6B362A:
mov	[esi], edi
mov	esi, [esp+10h+arg_4]
lea	edi, [ebx+8]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
mov	[ebx+4], ebp
pop	ebp
mov	dword ptr [ebx], 0FFFFFFFFh
pop	ebx
retn	0Ch
sub_6B3510 endp

align 10h



sub_6B3650 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6B3664
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_6B3686

loc_6B3664:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6B368B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6B3686:
call	sub_6B2F50

loc_6B368B:
mov	eax, [esi]
mov	ebx, [esp+0Ch+arg_8]
and	ebx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [ebx+ebx*2]
lea	esi, [eax+edx*8+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6B36DB
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	eax, [eax+4]
mov	[esi+0Ch], eax
mov	edi, [ecx+4]
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6B36CD
call	sub_64A420

loc_6B36CD:
mov	ecx, [edi]
mov	[esi+10h], ecx
pop	edi
mov	[esi+4], ebx
pop	esi
pop	ebx
retn	0Ch

loc_6B36DB:
mov	ecx, [eax+4]
mov	edi, ebx
push	ebp

loc_6B36E1:
inc	edi
and	edi, ecx
lea	ebp, [edi+edi*2]
cmp	[eax+ebp*8+8], edx
jnz	short loc_6B36E1
lea	edx, [edi+edi*2]
lea	ecx, [eax+edx*8+8]
mov	edx, [esi+4]
cmp	edx, ebx
jnz	short loc_6B371E
test	ecx, ecx
jz	short loc_6B3705
push	esi
call	sub_6B2AA0

loc_6B3705:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+8]
call	sub_6B2950
pop	ebp
mov	[esi], edi
pop	edi
mov	[esi+4], ebx
pop	esi
pop	ebx
retn	0Ch

loc_6B371E:
lea	edx, [edx+edx*2]
cmp	[eax+edx*8+8], ebx
lea	ebp, [eax+edx*8+8]
jz	short loc_6B3741
jmp	short loc_6B3730
align 10h

loc_6B3730:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*2+0]
cmp	[eax+edx*8+8], ebx
lea	ebp, [eax+edx*8+8]
jnz	short loc_6B3730

loc_6B3741:
test	ecx, ecx
jz	short loc_6B374B
push	esi
call	sub_6B2AA0

loc_6B374B:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+8]
mov	[ebp+0], edi
call	sub_6B2950
pop	ebp
pop	edi
mov	[esi+4], ebx
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_6B3650 endp

align 10h



sub_6B3770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6B3783
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6B37A5

loc_6B3783:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6B37AA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6B37A5:
call	sub_6B30F0

loc_6B37AA:
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [edi+edi*4]
lea	esi, [eax+edx*8+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6B380C
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	edx, [eax+8]
mov	[esi+10h], edx
mov	eax, [eax+0Ch]
mov	[esi+14h], eax
mov	eax, [ecx+4]
mov	ecx, [eax]
mov	[esi+18h], ecx
mov	edx, [eax+4]
mov	[esi+1Ch], edx
mov	ecx, [eax+8]
mov	[esi+20h], ecx
mov	edx, [eax+0Ch]
mov	[esi+24h], edx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_6B380C:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp

loc_6B3813:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*4]
cmp	[eax+ebp*8+8], edx
jnz	short loc_6B3813
mov	edx, [esi+4]
lea	ecx, [ebx+ebx*4]
lea	ecx, [eax+ecx*8+8]
cmp	edx, edi
jnz	short loc_6B387A
test	ecx, ecx
jz	short loc_6B3837
push	esi
call	sub_6B28B0

loc_6B3837:
mov	ecx, [esp+10h+arg_4]
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	edx, [eax+8]
mov	[esi+10h], edx
mov	eax, [eax+0Ch]
mov	[esi+14h], eax
mov	eax, [ecx+4]
mov	ecx, [eax]
mov	[esi+18h], ecx
mov	edx, [eax+4]
mov	[esi+1Ch], edx
mov	ecx, [eax+8]
mov	[esi+20h], ecx
mov	edx, [eax+0Ch]
mov	[esi+24h], edx
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_6B387A:
lea	edx, [edx+edx*4]
cmp	[eax+edx*8+8], edi
lea	ebp, [eax+edx*8+8]
jz	short loc_6B38A1
jmp	short loc_6B3890
align 10h

loc_6B3890:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*4+0]
cmp	[eax+edx*8+8], edi
lea	ebp, [eax+edx*8+8]
jnz	short loc_6B3890

loc_6B38A1:
test	ecx, ecx
jz	short loc_6B38AB
push	esi
call	sub_6B28B0

loc_6B38AB:
mov	ecx, [esp+10h+arg_4]
mov	[ebp+0], ebx
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	edx, [eax+8]
mov	[esi+10h], edx
mov	eax, [eax+0Ch]
mov	[esi+14h], eax
mov	eax, [ecx+4]
mov	ecx, [eax]
mov	[esi+18h], ecx
mov	edx, [eax+4]
mov	[esi+1Ch], edx
mov	ecx, [eax+8]
mov	[esi+20h], ecx
mov	edx, [eax+0Ch]
pop	ebp
mov	[esi+24h], edx
pop	ebx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_6B3770 endp

align 10h



sub_6B3900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6B3915
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6B3937

loc_6B3915:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6B393C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6B3937:
call	sub_687A50

loc_6B393C:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6B3985
mov	ebp, [esp+10h+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67ABE0
mov	ecx, [ebp+4]
mov	edx, [ecx]
mov	[ebx+4], edx
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6B3985:
mov	ecx, [eax+4]
mov	ebx, edi
lea	ebx, [ebx+0]

loc_6B3990:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
jnz	short loc_6B3990
mov	edx, [esi+4]
mov	ecx, ebx
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	edx, edi
jnz	short loc_6B39E1
test	ecx, ecx
jz	short loc_6B39B8
push	esi
call	sub_6B2A70

loc_6B39B8:
mov	edx, [esp+10h+arg_4]
mov	eax, [edx]
lea	ebp, [esi+8]
push	eax
mov	ecx, ebp
call	sub_67A3D0
mov	ecx, [esp+10h+arg_4]
mov	edx, [ecx+4]
mov	eax, [edx]
mov	[ebp+4], eax
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6B39E1:
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jz	short loc_6B3A00
mov	edi, edi

loc_6B39F0:
mov	edx, [ebp+0]
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jnz	short loc_6B39F0

loc_6B3A00:
test	ecx, ecx
jz	short loc_6B3A0A
push	esi
call	sub_6B2A70

loc_6B3A0A:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67A3D0
mov	ecx, [ebp+4]
mov	edx, [ecx]
mov	[ebx+4], edx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B3900 endp

align 10h



sub_6B3A40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
push	edi
mov	edi, [ebp+0]
mov	[esp+14h+var_4], ecx
mov	eax, 8
mov	esi, 1505h
lea	ebx, [ebx+0]

loc_6B3A60:
movzx	edx, byte ptr [edi+eax-1]
imul	esi, 1003Fh
dec	eax
add	esi, edx
test	eax, eax
ja	short loc_6B3A60
mov	ebx, [ecx]
test	ebx, ebx
jz	short loc_6B3AC4
mov	eax, [ebx+4]
and	eax, esi
push	eax
push	ebp
call	sub_6B29A0
test	eax, eax
jl	short loc_6B3AC0
mov	edx, [edi]
lea	ecx, [eax+eax*2]
lea	esi, [ebx+ecx*8+10h]
mov	[esi], edx
mov	eax, [edi+4]
mov	[esi+4], eax
mov	edi, [ebp+4]
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6B3AA7
call	sub_64A420

loc_6B3AA7:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6B3AB3
call	sub_64A430

loc_6B3AB3:
mov	ecx, [edi]
pop	edi
mov	[esi+8], ecx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_6B3AC0:
mov	ecx, [esp+14h+var_4]

loc_6B3AC4:
mov	edx, [esp+14h+arg_0]
push	esi
push	ebp
push	edx
call	sub_6B3650
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6B3A40 endp

align 10h



sub_6B3AE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
mov	esi, [ebp+0]
push	edi
mov	[esp+14h+var_4], ecx
mov	eax, 10h
mov	edi, 1505h
lea	ebx, [ebx+0]

loc_6B3B00:
movzx	edx, byte ptr [esi+eax-1]
imul	edi, 1003Fh
dec	eax
add	edi, edx
test	eax, eax
ja	short loc_6B3B00
mov	ebx, [ecx]
test	ebx, ebx
jz	short loc_6B3B6D
mov	eax, [ebx+4]
and	eax, edi
push	eax
push	ebp
call	sub_6B2A00
test	eax, eax
jl	short loc_6B3B69
mov	edx, [esi]
lea	ecx, [eax+eax*4]
lea	eax, [ebx+ecx*8+10h]
mov	[eax], edx
mov	ecx, [esi+4]
mov	[eax+4], ecx
mov	edx, [esi+8]
mov	[eax+8], edx
mov	ecx, [esi+0Ch]
mov	[eax+0Ch], ecx
lea	ecx, [eax+10h]
mov	eax, [ebp+4]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
pop	edi
pop	esi
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
pop	ebp
mov	[ecx+0Ch], eax
pop	ebx
pop	ecx
retn	8

loc_6B3B69:
mov	ecx, [esp+14h+var_4]

loc_6B3B6D:
mov	edx, [esp+14h+arg_0]
push	edi
push	ebp
push	edx
call	sub_6B3770
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6B3AE0 endp

align 10h



sub_6B3B90 proc	near

var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	esi
push	edi
push	1
push	0
push	0
push	eax
mov	esi, ecx
call	__allmul
mov	ecx, [esp+18h+arg_4]
xor	edi, edi
add	eax, ecx
adc	edx, edi
mov	dword ptr [esp+18h+var_10+4], edx
lea	edx, [esp+18h+var_10]
lea	edi, [esi+0Ch]
push	edx
mov	ecx, edi
mov	dword ptr [esp+1Ch+var_10], eax
call	sub_6B2E40
test	eax, eax
jl	short loc_6B3BDF
test	edi, edi
jz	short loc_6B3BDF
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6B3BDF
cmp	eax, [ecx+4]
jle	loc_6B3C7F

loc_6B3BDF:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+arg_4]
push	edx
mov	[esp+1Ch+arg_4], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	20h
push	esi
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6B3C1F
mov	dword ptr [esi], offset	off_155F500
lea	ecx, [esi+8]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1438944
call	sub_67AB70
jmp	short loc_6B3C21

loc_6B3C1F:
xor	esi, esi

loc_6B3C21:
mov	ecx, [esp+18h+arg_8]
push	ecx
lea	ecx, [esi+8]
call	sub_67A2C0
mov	edx, [esp+18h+arg_C]
mov	[esi+0Ch], edx
lea	edx, [esp+18h+var_8]
lea	ecx, [esp+18h+arg_0]
push	edx
lea	eax, [esp+1Ch+var_10]
mov	[esp+1Ch+var_4], ecx
push	edi
mov	ecx, edi
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi+14h], 0
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+1Ch], 2
mov	[esp+20h+arg_0], esi
mov	[esp+20h+var_8], eax
call	sub_6B3A40
mov	ecx, [esp+18h+arg_0]
test	ecx, ecx
jz	short loc_6B3C7F
call	sub_64A430

loc_6B3C7F:
pop	edi
pop	esi
add	esp, 10h
retn	10h
sub_6B3B90 endp

align 10h



sub_6B3C90 proc	near

var_30=	dword ptr -30h
lpCriticalSection= dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 30h
push	ebx
push	ebp
push	esi
mov	ebp, ecx
lea	eax, [ebp+28h]
push	edi
push	eax		; lpCriticalSection
mov	[esp+44h+var_30], ebp
mov	[esp+44h+lpCriticalSection], eax
call	ds:EnterCriticalSection
mov	eax, [ebp+14h]
lea	edi, [ebp+10h]
lea	esi, [eax-1]
cmp	esi, eax
jnb	short loc_6B3CC4
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6B3CD9
push	esi
jmp	short loc_6B3CD1

loc_6B3CC4:
cmp	esi, [edi+8]
jb	short loc_6B3CD9
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_6B3CD1:
push	edi
mov	ecx, edi
call	sub_6B26A0

loc_6B3CD9:
mov	edx, [esp+40h+arg_0]
push	1
xor	ebx, ebx
push	ebx
push	ebx
push	edx
mov	[edi+4], esi
call	__allmul
mov	ecx, [esp+40h+arg_4]
xor	esi, esi
add	eax, ecx
adc	edx, esi
mov	dword ptr [esp+40h+var_18], eax
mov	dword ptr [esp+40h+var_18+4], edx
cmp	[ebp+14h], ebx
jnz	short loc_6B3D0D
mov	[esp+40h+var_20], ebx
mov	[esp+40h+var_1C], ebx
jmp	short loc_6B3D22

loc_6B3D0D:
mov	eax, [edi]
mov	ecx, [edi+4]
mov	edx, [eax+ecx*8-8]
mov	[esp+40h+var_20], edx
mov	eax, [eax+ecx*8-4]
mov	[esp+40h+var_1C], eax

loc_6B3D22:
lea	ecx, [esp+40h+var_20]
lea	esi, [ebp+8]
push	ecx
mov	ecx, esi
call	sub_6B2E90
cmp	eax, ebx
jl	short loc_6B3D46
mov	ecx, esi
cmp	esi, ebx
jz	short loc_6B3D46
mov	edx, [esi]
cmp	edx, ebx
jz	short loc_6B3D46
cmp	eax, [edx+4]
jle	short loc_6B3D87

loc_6B3D46:
lea	ecx, [esp+40h+var_28]
push	ecx
lea	edx, [esp+44h+var_20]
lea	eax, [esp+44h+var_10]
push	esi
mov	ecx, esi
mov	[esp+48h+var_10], ebx
mov	[esp+48h+var_8], ebx
mov	[esp+48h+var_4], ebx
mov	[esp+48h+var_28], edx
mov	[esp+48h+var_24], eax
call	sub_6B3AE0
lea	edx, [esp+40h+var_20]
push	edx
mov	ecx, esi
call	sub_6B2E90
cmp	eax, ebx
jl	short loc_6B3D83
mov	ecx, esi
jmp	short loc_6B3D87

loc_6B3D83:
xor	ecx, ecx
xor	eax, eax

loc_6B3D87:
mov	ecx, [ecx]
lea	eax, [eax+eax*4]
inc	dword ptr [ecx+eax*8+20h]
mov	ebp, [ebp+14h]
lea	ecx, [ecx+eax*8+20h]
mov	ebx, 1
cmp	ebp, ebx
jbe	short loc_6B3DCC
mov	eax, [edi]
add	eax, 8

loc_6B3DA5:
mov	edx, [eax-8]
xor	esi, esi
cmp	edx, [esp+40h+var_20]
jnz	short loc_6B3DC4
cmp	esi, [esp+40h+var_1C]
jnz	short loc_6B3DC4
mov	edx, [eax]
cmp	edx, dword ptr [esp+40h+var_18]
jnz	short loc_6B3DC4
cmp	esi, dword ptr [esp+40h+var_18+4]
jz	short loc_6B3DDA

loc_6B3DC4:
inc	ebx
add	eax, 8
cmp	ebx, ebp
jb	short loc_6B3DA5

loc_6B3DCC:
mov	edx, [esp+40h+arg_8]
add	[ecx+8], edx
mov	eax, [esp+40h+arg_C]
adc	[ecx+0Ch], eax

loc_6B3DDA:
mov	ecx, [esp+40h+var_30]
pop	edi
pop	esi
mov	eax, 1
pop	ebp
pop	ebx
cmp	[ecx+14h], eax
jnz	short loc_6B3E0B
cmp	[esp+30h+var_20], 20h
jnz	short loc_6B3E0B
cmp	[esp+30h+var_1C], eax
jnz	short loc_6B3E0B
mov	edx, [esp+30h+arg_C]
push	edx
mov	edx, [esp+34h+arg_8]
push	edx
push	20h
push	eax
call	sub_6B3C90

loc_6B3E0B:
mov	eax, [esp+30h+lpCriticalSection]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
add	esp, 30h
retn	10h
sub_6B3C90 endp

align 10h



sub_6B3E20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	ebp
push	esi
push	edi
mov	esi, ecx
push	ebx
lea	ecx, [esp+24h+arg_0]
call	sub_67AE10
lea	eax, [esp+20h+arg_0]
push	eax
lea	ecx, [esp+24h+var_10]
lea	edi, [esi+98h]
push	ecx
mov	ecx, edi
call	sub_6B2DD0
mov	esi, [esp+20h+arg_0]
mov	ebp, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B3E76
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B3E76:
mov	eax, [esp+20h+var_10]
test	eax, eax
jz	short loc_6B3E8E
cmp	dword ptr [eax], 0
jz	short loc_6B3E8E
mov	ecx, [eax]
mov	eax, [esp+20h+var_C]
cmp	eax, [ecx+4]
jle	short loc_6B3F0D

loc_6B3E8E:
push	ebx
lea	ecx, [esp+24h+arg_0]
mov	[esp+24h+var_10], 1
call	sub_67AE10
lea	eax, [esp+20h+arg_0]
mov	[esp+20h+var_8], eax
mov	eax, [esp+20h+arg_0]
mov	edx, eax
lea	ecx, [esp+20h+var_10]
mov	[esp+20h+var_4], ecx
and	edx, 0FFFFFFFCh
mov	ecx, [edx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
lea	eax, [esp+24h+var_8]
push	eax
push	edi
mov	ecx, edi
call	sub_6B3900
mov	esi, [esp+20h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B3F18
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4

loc_6B3F0D:
shl	eax, 4
inc	dword ptr [eax+ecx+14h]
lea	eax, [eax+ecx+14h]

loc_6B3F18:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	4
sub_6B3E20 endp

align 10h



sub_6B3F30 proc	near
push	ebx
push	ebp
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1438948
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
push	edi
mov	[esi+1Ch], ebx
lea	ebp, [esi+28h]
mov	[esi+20h], ebx
push	ebx		; int
mov	ecx, ebp	; lpCriticalSection
mov	[esi+24h], ebx
call	sub_64D6D0
lea	ecx, [esi+44h]
mov	[esi+40h], ebx
call	sub_67AB70
fldz
fst	dword ptr [esi+50h]
lea	ecx, [esi+60h]
fst	dword ptr [esi+54h]
mov	[esi+48h], ebx
fstp	dword ptr [esi+58h]
mov	[esi+4Ch], ebx
mov	[esi+5Ch], ebx
call	sub_71D750
mov	[esi+88h], ebx
mov	[esi+90h], ebx
mov	[esi+94h], ebx
mov	[esi+98h], ebx
xor	edi, edi
nop

loc_6B3FB0:
push	ebx
push	edi
call	sub_6B22E0
add	esp, 4
push	eax
push	edi
push	1
mov	ecx, esi
call	sub_6B3B90
inc	edi
cmp	edi, 3Fh
jb	short loc_6B3FB0
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, dword_1856488
mov	[esi+40h], eax
inc	eax
push	ebp		; lpCriticalSection
mov	dword_1856488, eax
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn
sub_6B3F30 endp

align 10h



sub_6B3FF0 proc	near
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esi+98h]
call	sub_684870
mov	edi, [esi+44h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B4024
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B4024:		; lpCriticalSection
lea	ecx, [esi+28h]
call	sub_64D730
lea	ecx, [esi+24h]
call	sub_6B3320
lea	ecx, [esi+20h]
call	sub_6B2900
lea	ecx, [esi+1Ch]
call	sub_6B2AE0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+10h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+0Ch]
call	sub_6B2AE0
lea	ecx, [esi+8]
call	sub_6B25C0
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6B3FF0 endp

align 10h



sub_6B4070 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6B3FF0
test	[esp+4+arg_0], 1
jz	short loc_6B408D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B408D:
mov	eax, esi
pop	esi
retn	4
sub_6B4070 endp

align 10h



sub_6B40A0 proc	near
mov	eax, [ecx+24h]
mov	eax, [eax]
retn	4
sub_6B40A0 endp

align 10h



sub_6B40B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, [ebx]
add	esi, 27Ch
cmp	byte ptr [ebx+4], 6
push	edi
mov	edi, [esp+10h+arg_4]
mov	ebp, ecx
jbe	short loc_6B40D2
mov	eax, [esi]
cmp	eax, [edi]
jmp	short loc_6B40E9

loc_6B40D2:
mov	ecx, [edi]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6B40DF
call	sub_651580

loc_6B40DF:
mov	ecx, [esi]
mov	edx, [edi]
mov	eax, [ecx+4]
cmp	eax, [edx+4]

loc_6B40E9:
setz	al
test	al, al
jz	short loc_6B412C
mov	esi, [esp+10h+arg_8]
push	esi
push	edi
push	ebx
mov	ecx, ebp
call	sub_663C50
test	al, al
jz	short loc_6B4107
cmp	byte ptr [esi],	0Ah
jnz	short loc_6B4123

loc_6B4107:
lea	ecx, [ebp+24h]
call	sub_650650
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6B411D
mov	ecx, esi
call	sub_652060

loc_6B411D:
mov	byte ptr [esi],	4
mov	[esi+4], edi

loc_6B4123:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	0Ch

loc_6B412C:
mov	ecx, [esp+10h+arg_8]
push	ecx
push	edi
push	ebx
mov	ecx, ebp
call	sub_663C50
pop	edi
pop	esi
test	al, al
pop	ebp
setnz	al
pop	ebx
retn	0Ch
sub_6B40B0 endp

align 10h



sub_6B4150 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	0
push	0FFFFFFFFh
mov	esi, ecx
push	eax
lea	ecx, [esp+10h+arg_0]
push	ecx
mov	ecx, [esp+14h+arg_4]
call	sub_652F60
mov	edx, [esp+4+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [esi+34h]
call	sub_6513F0
mov	eax, [esp+4+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
jnz	short locret_6B4190
call	sub_650DF0

locret_6B4190:
retn	8
sub_6B4150 endp

align 10h



sub_6B41A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [ecx+34h]
inc	dword ptr [ecx+8]
mov	byte ptr [eax],	5
mov	[eax+4], ecx
retn	4
sub_6B41A0 endp

align 10h



sub_6B41C0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B41EA
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6B41EA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B41F6
add	eax, 0FFFFFFF0h
jmp	short loc_6B41F8

loc_6B41F6:
xor	eax, eax

loc_6B41F8:
cmp	dword ptr [esi+1Ch], 1
push	ebx
push	edi
lea	ebx, [eax+34h]
jl	short loc_6B4249
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, eax
test	edi, edi
jl	short loc_6B4249
mov	ecx, ebx
call	sub_650650
cmp	edi, eax
jge	short loc_6B4249
push	edi
mov	ecx, ebx
call	sub_650680
mov	dword ptr [esp+14h+var_8], eax
fild	dword ptr [esp+14h+var_8]
test	eax, eax
jge	short loc_6B424E
fadd	ds:dbl_15FCE08
jmp	short loc_6B424E

loc_6B4249:
call	sub_6794F0

loc_6B424E:
mov	esi, [esi+4]
fstp	[esp+14h+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6B4261
mov	ecx, esi
call	sub_652060

loc_6B4261:
fld	[esp+14h+var_8]
pop	edi
fstp	qword ptr [esi+4]
pop	ebx
mov	byte ptr [esi],	3
pop	esi
add	esp, 8
retn
sub_6B41C0 endp

align 10h



sub_6B4280 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	edi
mov	edi, [esp+1Ch+arg_0]
push	8
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6B42AA
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 18h
retn

loc_6B42AA:
mov	eax, [edi+8]
push	ebx
test	eax, eax
jz	short loc_6B42B7
lea	ebx, [eax-10h]
jmp	short loc_6B42B9

loc_6B42B7:
xor	ebx, ebx

loc_6B42B9:
cmp	dword ptr [edi+1Ch], 1
jge	short loc_6B42E0
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_6B42CE
mov	ecx, edi
call	sub_652060

loc_6B42CE:
fld	ds:dbl_15FCD60
pop	ebx
fstp	qword ptr [edi+4]
mov	byte ptr [edi],	3
pop	edi
add	esp, 18h
retn

loc_6B42E0:
push	esi
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+24h+var_18]
call	sub_650650
test	eax, eax
jnz	short loc_6B4343
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B431A
mov	ecx, esi
call	sub_652060

loc_6B431A:
fldz
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
mov	eax, [esp+24h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_6B443B
call	sub_650DF0
pop	esi
pop	ebx
pop	edi
add	esp, 18h
retn

loc_6B4343:
mov	edx, [esp+24h+var_18]
mov	eax, [edx]
mov	[esp+24h+var_10], eax
mov	ecx, [ebx+34h]
mov	edx, [ecx]
push	ebp
xor	ebp, ebp
cmp	dword ptr [edi+1Ch], 1
mov	[esp+28h+var_14], edx
jle	short loc_6B437A
mov	eax, [edi+18h]
push	eax
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebp, eax

loc_6B437A:
lea	ecx, [esp+28h+var_10]
push	ecx
call	sub_67B600
lea	edx, [esp+28h+var_14]
push	edx
mov	[esp+2Ch+var_4], eax
xor	ebx, ebx
call	sub_67B600
test	eax, eax
jz	short loc_6B4409

loc_6B4398:
cmp	ebx, ebp
jl	short loc_6B43FA
cmp	eax, [esp+28h+var_4]
jnz	short loc_6B43FA
mov	eax, [esp+28h+var_14]
mov	ecx, [esp+28h+var_10]
lea	edx, [esp+28h+var_C]
push	edx
mov	[esp+2Ch+var_C], eax
mov	[esp+2Ch+var_8], ecx
call	sub_67B600
mov	esi, eax
lea	eax, [esp+28h+var_8]
push	eax
call	sub_67B600
test	esi, esi
jz	short loc_6B43F2
lea	esp, [esp+0]

loc_6B43D0:
test	eax, eax
jz	short loc_6B4442
cmp	esi, eax
jnz	short loc_6B43F2
lea	ecx, [esp+28h+var_C]
push	ecx
call	sub_67B600
lea	edx, [esp+28h+var_8]
push	edx
mov	esi, eax
call	sub_67B600
test	esi, esi
jnz	short loc_6B43D0

loc_6B43F2:
test	eax, eax
jz	short loc_6B4442
test	esi, esi
jz	short loc_6B444D

loc_6B43FA:
lea	eax, [esp+28h+var_14]
push	eax
inc	ebx
call	sub_67B600
test	eax, eax
jnz	short loc_6B4398

loc_6B4409:
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B4418
mov	ecx, esi
call	sub_652060

loc_6B4418:
fld	ds:dbl_15FCD60
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_6B4424:
mov	eax, [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B443A
call	sub_650DF0

loc_6B443A:
pop	ebp

loc_6B443B:
pop	esi
pop	ebx
pop	edi
add	esp, 18h
retn

loc_6B4442:
mov	ecx, [edi+4]
push	ebx
call	sub_6B7B70
jmp	short loc_6B4424

loc_6B444D:
mov	ecx, [edi+4]
push	0FFFFFFFFh
call	sub_6B7B70
jmp	short loc_6B4424
sub_6B4280 endp

align 10h



sub_6B4460 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 24h
push	edi
mov	edi, [esp+28h+arg_0]
push	8
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6B448A
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 24h
retn

loc_6B448A:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6B4496
add	eax, 0FFFFFFF0h
jmp	short loc_6B4498

loc_6B4496:
xor	eax, eax

loc_6B4498:
push	ebx
mov	ebx, 1
cmp	[edi+1Ch], ebx
push	esi
jge	short loc_6B44C6
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B44B3
mov	ecx, esi
call	sub_652060

loc_6B44B3:
fld	ds:dbl_15FCD60
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
pop	ebx
pop	edi
add	esp, 24h
retn

loc_6B44C6:
mov	eax, [eax+34h]
mov	[esp+30h+var_20], eax
add	[eax+8], ebx
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+3Ch+var_24]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+30h+var_24]
call	sub_650650
test	eax, eax
jnz	short loc_6B4537
lea	ecx, [esp+30h+var_20]
call	sub_650650
mov	dword ptr [esp+30h+var_8], eax
fild	dword ptr [esp+30h+var_8]
test	eax, eax
jge	short loc_6B4515
fadd	ds:dbl_15FCE08

loc_6B4515:
mov	esi, [edi+4]
fstp	[esp+30h+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6B4528
mov	ecx, esi
call	sub_652060

loc_6B4528:
fld	[esp+30h+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
jmp	loc_6B4621

loc_6B4537:
cmp	[edi+1Ch], ebx
mov	edx, [esp+30h+var_20]
mov	eax, [edx]
mov	ecx, [esp+30h+var_24]
mov	[esp+30h+var_1C], eax
mov	edx, [ecx]
mov	[esp+30h+var_14], edx
mov	[esp+30h+var_18], 7FFFFFFh
jle	short loc_6B4574
mov	eax, [edi+18h]
push	eax
push	ebx
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	[esp+30h+var_18], eax

loc_6B4574:
push	ebp
lea	ecx, [esp+34h+var_14]
push	ecx
call	sub_67B600
lea	edx, [esp+34h+var_1C]
push	edx
mov	dword ptr [esp+38h+var_8], eax
or	ebp, 0FFFFFFFFh
xor	ebx, ebx
call	sub_67B600
test	eax, eax
jz	short loc_6B460B

loc_6B4596:
cmp	ebx, [esp+34h+var_18]
jg	short loc_6B45FC
cmp	eax, dword ptr [esp+34h+var_8]
jnz	short loc_6B45FC
mov	eax, [esp+34h+var_1C]
mov	ecx, [esp+34h+var_14]
lea	edx, [esp+34h+var_10]
push	edx
mov	[esp+38h+var_10], eax
mov	[esp+38h+var_C], ecx
call	sub_67B600
mov	esi, eax
lea	eax, [esp+34h+var_C]
push	eax
call	sub_67B600
test	esi, esi
jz	short loc_6B45F2
lea	esp, [esp+0]

loc_6B45D0:
test	eax, eax
jz	short loc_6B45F6
cmp	esi, eax
jnz	short loc_6B45F2
lea	ecx, [esp+34h+var_10]
push	ecx
call	sub_67B600
lea	edx, [esp+34h+var_C]
push	edx
mov	esi, eax
call	sub_67B600
test	esi, esi
jnz	short loc_6B45D0

loc_6B45F2:
test	eax, eax
jnz	short loc_6B45F8

loc_6B45F6:
mov	ebp, ebx

loc_6B45F8:
test	esi, esi
jz	short loc_6B460B

loc_6B45FC:
lea	eax, [esp+34h+var_1C]
push	eax
inc	ebx
call	sub_67B600
test	eax, eax
jnz	short loc_6B4596

loc_6B460B:
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B461A
mov	ecx, esi
call	sub_652060

loc_6B461A:
mov	[esi+4], ebp
mov	byte ptr [esi],	4
pop	ebp

loc_6B4621:
mov	eax, [esp+30h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B4637
call	sub_650DF0

loc_6B4637:
mov	eax, [esp+30h+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B464D
call	sub_650DF0

loc_6B464D:
pop	esi
pop	ebx
pop	edi
add	esp, 24h
retn
sub_6B4460 endp

align 10h



sub_6B4660 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B4686
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_6B4686:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B4692
add	eax, 0FFFFFFF0h
jmp	short loc_6B4694

loc_6B4692:
xor	eax, eax

loc_6B4694:
push	edi
lea	ecx, [esp+0Ch+var_4]
push	ecx
lea	ecx, [eax+34h]
call	sub_6518E0
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6B46B3
mov	ecx, esi
call	sub_652060

loc_6B46B3:
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	eax, [esp+0Ch+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_6B46D5
call	sub_650DF0

loc_6B46D5:
pop	esi
pop	ecx
retn
sub_6B4660 endp

align 10h



sub_6B46E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B4706
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_6B4706:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B4712
add	eax, 0FFFFFFF0h
jmp	short loc_6B4714

loc_6B4712:
xor	eax, eax

loc_6B4714:
push	edi
lea	ecx, [esp+0Ch+var_4]
push	ecx
lea	ecx, [eax+34h]
call	sub_651340
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6B4733
mov	ecx, esi
call	sub_652060

loc_6B4733:
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	eax, [esp+0Ch+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_6B4755
call	sub_650DF0

loc_6B4755:
pop	esi
pop	ecx
retn
sub_6B46E0 endp

align 10h



sub_6B4760 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B4784
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_6B4784:
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6B4791
lea	edi, [eax-10h]
jmp	short loc_6B4793

loc_6B4791:
xor	edi, edi

loc_6B4793:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B47A2
mov	ecx, esi
call	sub_652060

loc_6B47A2:
mov	byte ptr [esi],	5
mov	eax, [edi+34h]
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	edi
pop	esi
retn
sub_6B4760 endp

align 10h



sub_6B47C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6B48BE
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B4808
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
pop	ecx
retn

loc_6B4808:
mov	eax, [esi+8]
push	ebp
test	eax, eax
jz	short loc_6B4815
lea	ebp, [eax-10h]
jmp	short loc_6B4817

loc_6B4815:
xor	ebp, ebp

loc_6B4817:
cmp	dword ptr [esi+1Ch], 1
jl	loc_6B48BD
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+1Ch+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
cmp	dword ptr [esi+1Ch], 2
mov	byte ptr [esp+10h+var_4], 1
jl	short loc_6B4866
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
setz	cl
mov	byte ptr [esp+10h+var_4], cl

loc_6B4866:
mov	eax, [esp+10h+var_4]
mov	edx, [esp+10h+arg_0]
mov	edi, [edx]
push	eax
lea	ecx, [esp+14h+arg_0]
call	sub_650650
push	eax
push	edi
lea	ecx, [ebp+34h]
call	sub_6506C0
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	[esp+10h+var_4], eax
jb	short loc_6B4897
mov	ecx, esi
call	sub_652060

loc_6B4897:
fild	[esp+10h+var_4]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B48BD
pop	ebp
pop	edi
pop	esi
add	esp, 4
jmp	sub_650DF0

loc_6B48BD:
pop	ebp

loc_6B48BE:
pop	edi
pop	esi
pop	ecx
retn
sub_6B47C0 endp

align 10h



sub_6B48D0 proc	near

var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 24h
push	ebx
push	esi
mov	esi, [esp+2Ch+arg_0]
xor	ebx, ebx
push	edi
mov	[esp+30h+var_24], ebx
cmp	[esi+8], ebx
jz	loc_6B4991
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 8
jnz	loc_6B4991
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	loc_6B4991
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B491A
lea	edi, [eax-10h]
jmp	short loc_6B491C

loc_6B491A:
xor	edi, edi

loc_6B491C:
cmp	[esi+1Ch], ebx
jle	short loc_6B492C
push	0
mov	ecx, esi
call	sub_651EC0
jmp	short loc_6B494A

loc_6B492C:
mov	eax, [esi+18h]
mov	eax, [eax+78h]
mov	[esp+30h+var_20], 5
mov	eax, [eax+8]
mov	ebx, 1
mov	[esp+30h+var_1C], eax
add	[eax+8], ebx
lea	eax, [esp+30h+var_20]

loc_6B494A:
push	eax
lea	ecx, [esp+34h+var_10]
call	sub_652330
test	bl, 1
jz	short loc_6B4962
lea	ecx, [esp+30h+var_20]
call	sub_652830

loc_6B4962:
mov	ecx, [esi+18h]
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+30h+var_10]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	ecx, [esi+4]
lea	eax, [esp+30h+var_10]
push	eax
call	sub_652520
lea	ecx, [esp+30h+var_10]
call	sub_652830

loc_6B498A:
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn

loc_6B4991:
cmp	[esi+1Ch], ebx
jnz	short loc_6B49BE
mov	ecx, [esi+18h]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, [ecx+78h]
jb	short loc_6B49AB
mov	ecx, esi
call	sub_652060

loc_6B49AB:
mov	byte ptr [esi],	5
mov	eax, [edi+8]
pop	edi
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	esi
pop	ebx
add	esp, 24h
retn

loc_6B49BE:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+3Ch+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B49EA
mov	ecx, esi
call	sub_652060

loc_6B49EA:
mov	byte ptr [esi],	5
mov	eax, [esp+30h+arg_0]
mov	[esi+4], eax
mov	eax, [esp+30h+arg_0]
inc	dword ptr [eax+8]
mov	eax, [esp+30h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	loc_6B498A
pop	edi
pop	esi
pop	ebx
add	esp, 24h
jmp	sub_650DF0
sub_6B48D0 endp

align 10h



sub_6B4A20 proc	near
mov	eax, 8
retn
sub_6B4A20 endp

align 10h



sub_6B4A30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6B4A53
cmp	[esi], ecx
jmp	short loc_6B4A68

loc_6B4A53:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6B4A5E
call	sub_651580

loc_6B4A5E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6B4A68:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6B4AB7
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6B4A86
cmp	[esi], ecx
jmp	short loc_6B4A9B

loc_6B4A86:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6B4A91
call	sub_651580

loc_6B4A91:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6B4A9B:
setz	al
test	al, al
jnz	short loc_6B4AB7
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_6B40B0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6B4AB7:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+28h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B4A30 endp

align 10h



sub_6B4AE0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6B4AED
mov	al, 1
retn	8

loc_6B4AED:
mov	[esp+arg_4], eax
add	ecx, 38h
jmp	loc_663310
sub_6B4AE0 endp

align 10h



sub_6B4B00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
mov	dword ptr [esi], offset	off_14389AC
mov	dword ptr [esi+10h], offset off_1438A90
mov	dword ptr [ecx], offset	off_1438A8C
call	sub_665A40
mov	ecx, [esi+34h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6B4B2C
call	sub_650DF0

loc_6B4B2C:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6B4B48
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B4B48:
mov	eax, esi
pop	esi
retn	4
sub_6B4B00 endp

align 10h



sub_6B4B50 proc	near

arg_0= byte ptr	 4

sub	ecx, 38h
jmp	sub_6B4B00
sub_6B4B50 endp

align 10h



sub_6B4B60 proc	near
sub	ecx, 10h
jmp	sub_6B4B00
sub_6B4B60 endp

align 10h



sub_6B4B70 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+34h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6B4B81
call	sub_650DF0

loc_6B4B81:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6B4B70 endp

align 10h



sub_6B4B90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
mov	dword ptr [esi], offset	off_1438A24
mov	dword ptr [esi+10h], offset off_14389D0
mov	eax, [ebx+78h]
mov	eax, [eax+8]
lea	edi, [esi+10h]
add	ebx, 78h
mov	[esi+34h], eax
inc	dword ptr [eax+8]
mov	ecx, [ebx]
push	3
call	sub_66FB00
mov	edx, [edi]
push	eax
mov	eax, [edx+34h]
push	ebx
mov	ecx, edi
call	eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6B4B90 endp

align 10h



sub_6B4BE0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6B4BF0
align 10h

loc_6B4BF0:
push	esi
mov	esi, ecx
mov	ecx, [esi+34h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6B4C01
call	sub_650DF0

loc_6B4C01:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6B4C1D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B4C1D:
mov	eax, esi
pop	esi
retn	4
sub_6B4BE0 endp

align 10h



sub_6B4C30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	edi
mov	edi, [esp+0Ch+arg_0]
push	8
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6B4C5A
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 8
retn

loc_6B4C5A:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6B4C66
add	eax, 0FFFFFFF0h
jmp	short loc_6B4C68

loc_6B4C66:
xor	eax, eax

loc_6B4C68:
push	ebx
lea	ebx, [eax+34h]
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	eax, [ecx+8]
mov	[esp+10h+var_8], eax
inc	dword ptr [eax+8]
mov	edx, [edi+18h]
push	esi
push	edx
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	esi, eax
test	esi, esi
jl	short loc_6B4CF2
mov	ecx, ebx
call	sub_650650
cmp	esi, eax
jge	short loc_6B4CF2
push	esi
mov	ecx, ebx
call	sub_650680
push	eax
lea	eax, [esp+18h+var_4]
push	eax
lea	ecx, [esp+1Ch+var_8]
call	sub_651230
mov	esi, [eax]
inc	dword ptr [esi+8]
mov	eax, [esp+14h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B4CD9
call	sub_650DF0

loc_6B4CD9:
mov	eax, [esp+14h+var_4]
mov	ecx, eax
add	eax, 8
mov	[esp+14h+var_8], esi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_6B4CF2
call	sub_650DF0

loc_6B4CF2:
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B4D01
mov	ecx, esi
call	sub_652060

loc_6B4D01:
mov	byte ptr [esi],	5
mov	ecx, [esp+14h+var_8]
mov	[esi+4], ecx
mov	eax, [esp+14h+var_8]
inc	dword ptr [eax+8]
mov	eax, [esp+14h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
pop	ebx
jnz	short loc_6B4D2A
call	sub_650DF0

loc_6B4D2A:
pop	edi
add	esp, 8
retn
sub_6B4C30 endp

align 10h



sub_6B4D30 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4

sub	esp, 1Ch
push	esi
mov	esi, [esp+20h+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B4D5A
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 1Ch
retn

loc_6B4D5A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B4D66
add	eax, 0FFFFFFF0h
jmp	short loc_6B4D68

loc_6B4D66:
xor	eax, eax

loc_6B4D68:
mov	eax, [eax+34h]
mov	ecx, dword_1855FC0
mov	edx, [eax+10h]
mov	eax, [eax]
push	edi
push	ecx
push	edx
push	eax
lea	ecx, [esp+30h+var_18]
call	sub_67ADA0
xor	edi, edi
cmp	[esi+1Ch], edi
jle	short loc_6B4DDB
push	ebx
jmp	short loc_6B4D90
align 10h

loc_6B4D90:
mov	ebx, [esi+18h]
push	edi
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+34h+var_1C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+28h+var_1C]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+30h+var_18]
call	sub_679D10
mov	eax, [esp+28h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B4DD4
call	sub_650DF0

loc_6B4DD4:
inc	edi
cmp	edi, [esi+1Ch]
jl	short loc_6B4D90
pop	ebx

loc_6B4DDB:
mov	eax, [esp+24h+var_18]
test	eax, eax
jnz	short loc_6B4DE8
mov	eax, offset byte_146D660

loc_6B4DE8:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	edx, [esp+24h+var_14]
push	edx
push	eax
call	sub_650F20
mov	edi, eax
inc	dword ptr [edi+8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B4E13
mov	ecx, esi
call	sub_652060

loc_6B4E13:
mov	byte ptr [esi],	5
mov	[esi+4], edi
inc	dword ptr [edi+8]
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6B4E29
mov	ecx, edi
call	sub_650DF0

loc_6B4E29:
lea	ecx, [esp+24h+var_18]
call	sub_679B60
pop	edi
pop	esi
add	esp, 1Ch
retn
sub_6B4D30 endp

align 10h



sub_6B4E40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	edi
mov	edi, [esp+4+arg_C]
test	edi, edi
jnz	short loc_6B4E65
mov	eax, [esp+4+arg_4]
mov	ecx, [eax]
mov	eax, [esp+4+arg_0]
and	ecx, 0FFFFFC00h
mov	edx, [ecx]
mov	ecx, [edx+20h]
mov	[eax], ecx
inc	dword ptr [ecx+8]
pop	edi
retn

loc_6B4E65:
push	esi
mov	esi, [esp+8+arg_8]
test	esi, esi
jge	short loc_6B4E70
xor	esi, esi

loc_6B4E70:
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	ecx, ebx
call	sub_650650
cmp	esi, eax
jl	short loc_6B4E99
mov	eax, [ebx]
and	eax, 0FFFFFC00h
mov	ecx, [eax]
mov	ecx, [ecx+20h]
mov	eax, [esp+0Ch+arg_0]
pop	ebx
pop	esi
mov	[eax], ecx
inc	dword ptr [ecx+8]
pop	edi
retn

loc_6B4E99:
test	edi, edi
jl	short loc_6B4EA4
lea	edx, [esi+edi]
cmp	edx, eax
jle	short loc_6B4EA8

loc_6B4EA4:
sub	eax, esi
mov	edi, eax

loc_6B4EA8:
lea	eax, [esi+edi]
push	eax
push	esi
mov	esi, [esp+14h+arg_0]
push	esi
mov	ecx, ebx
call	sub_6512A0
pop	ebx
mov	eax, esi
pop	esi
pop	edi
retn
sub_6B4E40 endp

align 10h



sub_6B4EC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
test	eax, eax
jnz	short loc_6B4EDE
mov	eax, edx
push	esi
lea	esi, [eax+1]

loc_6B4ED2:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6B4ED2
sub	eax, esi
pop	esi
jmp	short loc_6B4EE0

loc_6B4EDE:
sub	eax, edx

loc_6B4EE0:
test	eax, eax
jle	short loc_6B4F03
mov	ecx, [esp+arg_4]
mov	ecx, [ecx]
mov	ecx, [ecx+280h]
push	eax
push	edx
call	sub_650F20
mov	ecx, [esp+arg_0]
inc	dword ptr [eax+8]
mov	[ecx], eax
mov	eax, ecx
retn

loc_6B4F03:
mov	edx, [esp+arg_4]
mov	eax, [edx]
mov	ecx, [eax+8]
mov	eax, [esp+arg_0]
inc	dword ptr [ecx+8]
mov	[eax], ecx
retn
sub_6B4EC0 endp

align 10h



sub_6B4F20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B4F46
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_6B4F46:
mov	eax, [esi+8]
push	ebx
push	ebp
push	edi
test	eax, eax
jz	short loc_6B4F55
lea	ebp, [eax-10h]
jmp	short loc_6B4F57

loc_6B4F55:
xor	ebp, ebp

loc_6B4F57:
xor	ebx, ebx
or	edi, 0FFFFFFFFh
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6B4F8A
mov	eax, [esi+18h]
push	eax
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
test	ebx, ebx
jge	short loc_6B4F8A
lea	ecx, [ebp+34h]
call	sub_650650
add	ebx, eax

loc_6B4F8A:
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6B4FB1
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, eax
test	edi, edi
jge	short loc_6B4FB1
xor	edi, edi

loc_6B4FB1:
push	edi
push	ebx
add	ebp, 34h
lea	edx, [esp+1Ch+var_4]
push	ebp
push	edx
call	sub_6B4E40
mov	esi, [esi+4]
add	esp, 10h
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6B4FD5
mov	ecx, esi
call	sub_652060

loc_6B4FD5:
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	eax, [esp+14h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebp
pop	ebx
jnz	short loc_6B4FF9
call	sub_650DF0

loc_6B4FF9:
pop	esi
pop	ecx
retn
sub_6B4F20 endp

align 10h



sub_6B5000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, [esp+8+arg_0]
push	8
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6B5026
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	ecx
retn

loc_6B5026:
mov	eax, [edi+8]
push	ebp
test	eax, eax
jz	short loc_6B5033
lea	ebp, [eax-10h]
jmp	short loc_6B5035

loc_6B5033:
xor	ebp, ebp

loc_6B5035:
push	ebx
push	esi
xor	esi, esi
or	ebx, 0FFFFFFFFh
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6B505C
mov	eax, [edi+18h]
push	eax
push	esi
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	esi, eax

loc_6B505C:
cmp	dword ptr [edi+1Ch], 2
jl	short loc_6B50B3
mov	ecx, [edi+18h]
push	ecx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
cmp	ebx, esi
jge	short loc_6B50AB
lea	ecx, [ebp+34h]
call	sub_650650
cmp	esi, eax
jl	short loc_6B50A5
mov	edx, [edi+18h]
mov	eax, [edx+78h]
mov	ecx, [edi+4]
add	eax, 8
push	eax
call	sub_64A680
pop	esi
pop	ebx
pop	ebp
pop	edi
pop	ecx
retn

loc_6B50A5:
mov	eax, esi
mov	esi, ebx
mov	ebx, eax

loc_6B50AB:
test	esi, esi
jge	short loc_6B50B1
xor	esi, esi

loc_6B50B1:
sub	ebx, esi

loc_6B50B3:
push	ebx
push	esi
add	ebp, 34h
lea	ecx, [esp+1Ch+var_4]
push	ebp
push	ecx
call	sub_6B4E40
mov	esi, [edi+4]
add	esp, 10h
cmp	byte ptr [esi],	5
mov	ebx, eax
jb	short loc_6B50D7
mov	ecx, esi
call	sub_652060

loc_6B50D7:
mov	byte ptr [esi],	5
mov	eax, [ebx]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	eax, [esp+14h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B50F8
call	sub_650DF0

loc_6B50F8:
pop	esi
pop	ebx
pop	ebp
pop	edi
pop	ecx
retn
sub_6B5000 endp

align 10h



sub_6B5100 proc	near

var_20=	qword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4

mov	eax, dword_1855FC0
sub	esp, 20h
push	esi
push	edi
push	eax
lea	ecx, [esp+2Ch+var_18]
call	sub_679B40
mov	esi, [esp+28h+arg_0]
xor	edi, edi
cmp	[esi+1Ch], edi
jle	short loc_6B5165
nop

loc_6B5120:
mov	ecx, [esi+18h]
push	ecx
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+28h+arg_0]
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_20], eax
lea	ecx, [esp+28h+var_18]
fldcw	word ptr [esp+28h+var_20]
fistp	[esp+28h+var_20]
mov	eax, dword ptr [esp+28h+var_20]
push	eax
fldcw	word ptr [esp+2Ch+arg_0]
call	sub_679C60
inc	edi
cmp	edi, [esi+1Ch]
jl	short loc_6B5120

loc_6B5165:
mov	eax, [esp+28h+var_18]
test	eax, eax
jnz	short loc_6B5172
mov	eax, offset byte_146D660

loc_6B5172:
mov	edx, [esi+18h]
mov	ecx, [edx+78h]
mov	edx, [esp+28h+var_14]
mov	ecx, [ecx+280h]
push	edx
push	eax
call	sub_650F20
mov	edi, eax
inc	dword ptr [edi+8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B519D
mov	ecx, esi
call	sub_652060

loc_6B519D:
mov	byte ptr [esi],	5
mov	[esi+4], edi
inc	dword ptr [edi+8]
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6B51B3
mov	ecx, edi
call	sub_650DF0

loc_6B51B3:
lea	ecx, [esp+28h+var_18]
call	sub_679B60
pop	edi
pop	esi
add	esp, 20h
retn
sub_6B5100 endp

align 10h



sub_6B51D0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
lea	esi, [edi+78h]
push	0
push	38h
call	eax
test	eax, eax
jz	short loc_6B5200
push	edi
mov	ecx, eax
call	sub_6B4B90
mov	edi, eax
jmp	short loc_6B5202

loc_6B5200:
xor	edi, edi

loc_6B5202:
mov	edx, [edi+10h]
mov	edx, [edx+28h]
lea	eax, [esp+18h+arg_0]
push	eax
lea	eax, [esp+1Ch+var_10]
push	eax
mov	eax, [esi]
lea	ecx, [edi+10h]
add	eax, 27Ch
push	eax
push	esi
mov	byte ptr [esp+28h+arg_0], 0
mov	[esp+28h+var_10], 0Ah
call	edx
lea	ecx, [esp+18h+var_10]
call	sub_652830
mov	eax, edi
pop	edi
pop	esi
add	esp, 10h
retn	4
sub_6B51D0 endp

align 10h



sub_6B5240 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+54h]
test	eax, eax
jz	short loc_6B526B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+54h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6B526B:
mov	ecx, [esi+34h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6B5279
call	sub_650DF0

loc_6B5279:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6B5240 endp

align 10h



sub_6B5290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B52B6
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_6B52B6:
mov	eax, [esi+8]
push	ebp
test	eax, eax
jz	short loc_6B52C3
lea	ebp, [eax-10h]
jmp	short loc_6B52C5

loc_6B52C3:
xor	ebp, ebp

loc_6B52C5:
push	ebx
push	edi
xor	edi, edi
or	ebx, 0FFFFFFFFh
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6B52FA
mov	eax, [esi+18h]
push	eax
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, eax
test	edi, edi
jge	short loc_6B52FA
lea	ecx, [ebp+34h]
call	sub_650650
add	edi, eax

loc_6B52FA:
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6B5356
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
test	ebx, ebx
jge	short loc_6B5329
lea	ecx, [ebp+34h]
call	sub_650650
add	ebx, eax

loc_6B5329:
cmp	ebx, edi
jge	short loc_6B5354
mov	edx, [esi+18h]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, [edx+78h]
jb	short loc_6B5342
mov	ecx, esi
call	sub_652060

loc_6B5342:
mov	byte ptr [esi],	5
mov	eax, [edi+8]
pop	edi
pop	ebx
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	ebp
pop	esi
pop	ecx
retn

loc_6B5354:
sub	ebx, edi

loc_6B5356:
push	ebx
push	edi
add	ebp, 34h
lea	eax, [esp+1Ch+var_4]
push	ebp
push	eax
call	sub_6B4E40
mov	esi, [esi+4]
add	esp, 10h
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6B537A
mov	ecx, esi
call	sub_652060

loc_6B537A:
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]
mov	eax, [esp+14h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B539B
call	sub_650DF0

loc_6B539B:
pop	edi
pop	ebx
pop	ebp
pop	esi
pop	ecx
retn
sub_6B5290 endp

align 10h



sub_6B53B0 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+3Ch]
call	sub_67C000
lea	ecx, [edi+48h]
call	sub_67C000
mov	eax, [edi+54h]
test	eax, eax
jz	short loc_6B5420
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B541E
lea	ebx, [ebx+0]

loc_6B53E0:
mov	eax, [edi+54h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B5419
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6B5419
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6B5419:
inc	esi
cmp	esi, ebx
jb	short loc_6B53E0

loc_6B541E:
pop	esi
pop	ebx

loc_6B5420:
pop	edi
retn
sub_6B53B0 endp

align 10h



sub_6B5430 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 24h
mov	ecx, [esp+24h+arg_4]
mov	eax, [ecx+78h]
mov	edx, [eax+2ACh]
push	ebx
push	esi
push	edi
lea	edi, [ecx+78h]
push	0FFFFFFFFh
xor	ebx, ebx
push	ebx
add	eax, 10h
push	eax
push	edx
call	sub_671840
cmp	[esp+30h+arg_10], ebx
mov	ecx, [esp+30h+arg_0]
mov	edx, [esp+30h+arg_8]
mov	[ecx], eax
mov	ecx, [edx]
mov	edx, [ecx]
mov	[esp+30h+arg_4], edx
jge	short loc_6B5471
mov	[esp+30h+arg_10], ebx

loc_6B5471:
mov	esi, [esp+30h+arg_C]
cmp	esi, ebx
jnz	short loc_6B54A5
mov	[esp+30h+var_C], ecx
mov	[esp+30h+var_10], 5
inc	dword ptr [ecx+8]
lea	ecx, [esp+30h+var_10]
push	ecx
mov	ecx, eax
call	sub_65E720
lea	ecx, [esp+30h+var_10]
call	sub_652830
mov	eax, [esp+30h+arg_0]
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn

loc_6B54A5:
cmp	[esi], bl
jnz	loc_6B5585
lea	ecx, [esp+30h+arg_10]
call	sub_679E30
lea	edx, [esp+30h+arg_4]
push	edx
call	sub_67B600
mov	esi, eax
cmp	esi, ebx
jz	loc_6B5550
mov	ebx, 1
nop

loc_6B54D0:
lea	ecx, [esp+30h+arg_10]
call	sub_67A720
push	esi
lea	ecx, [esp+34h+arg_10]
call	sub_679F30
mov	edx, [esp+30h+arg_10]
mov	eax, [edi]
and	edx, 0FFFFFFFCh
mov	esi, [edx]
add	eax, 8
mov	eax, [eax+278h]
and	esi, 7FFFFFFFh
push	esi
add	edx, 8
push	edx
mov	ecx, eax
call	sub_650F20
mov	esi, eax
add	[esi+8], ebx
mov	eax, [esp+30h+arg_0]
mov	ecx, [eax]
lea	edx, [esp+30h+var_10]
mov	[esp+30h+var_10], 5
mov	[esp+30h+var_C], esi
add	[esi+8], ebx
push	edx
call	sub_65E720
lea	ecx, [esp+30h+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6B5540
mov	ecx, esi
call	sub_650DF0

loc_6B5540:
lea	eax, [esp+30h+arg_4]
push	eax
call	sub_67B600
mov	esi, eax
test	esi, esi
jnz	short loc_6B54D0

loc_6B5550:
mov	esi, [esp+30h+arg_10]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
add	eax, 0FFFFFFFFh
jnz	loc_6B56E8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
mov	eax, [esp+30h+arg_0]
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn

loc_6B5585:
push	ebp
mov	[esp+34h+arg_8], ebx
mov	ebp, edx
mov	ebx, 1
jmp	short loc_6B5597

loc_6B5593:
mov	esi, [esp+34h+arg_C]

loc_6B5597:
mov	[esp+34h+var_1C], esi
mov	[esp+34h+var_20], edx
xor	esi, esi

loc_6B55A1:
lea	ecx, [esp+34h+arg_4]
push	ecx
mov	[esp+38h+var_18], edx
call	sub_67B600
lea	edx, [esp+34h+var_1C]
push	edx
mov	[esp+38h+var_24], eax
call	sub_67B600
mov	edx, [esp+34h+arg_4]
mov	[esp+34h+var_14], eax
test	esi, esi
jnz	short loc_6B55CB
mov	esi, edx

loc_6B55CB:
mov	ecx, [esp+34h+var_24]
test	ecx, ecx
jz	short loc_6B55E1
test	eax, eax
jz	short loc_6B55E9
cmp	ecx, eax
jz	short loc_6B55A1
mov	edx, esi
mov	[esp+34h+arg_4], edx

loc_6B55E1:
test	eax, eax
jnz	loc_6B567C

loc_6B55E9:
mov	eax, [esp+34h+arg_10]
cmp	[esp+34h+arg_8], eax
jge	loc_6B56E7
mov	edx, [esp+34h+var_20]
test	edx, edx
jnz	short loc_6B5611
mov	eax, ebp
lea	edx, [eax+1]

loc_6B5604:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6B5604
sub	eax, edx
mov	edx, eax
jmp	short loc_6B5613

loc_6B5611:
sub	edx, ebp

loc_6B5613:
mov	eax, [edi]
add	eax, 8
test	edx, edx
jle	short loc_6B562F
mov	eax, [eax+278h]
push	edx
push	ebp
mov	ecx, eax
call	sub_650F20
mov	esi, eax
jmp	short loc_6B5631

loc_6B562F:
mov	esi, [eax]

loc_6B5631:
add	[esi+8], ebx
mov	ecx, [esp+34h+arg_0]
mov	ecx, [ecx]
lea	edx, [esp+34h+var_10]
mov	[esp+34h+var_10], 5
mov	[esp+34h+var_C], esi
add	[esi+8], ebx
push	edx
call	sub_65E720
lea	ecx, [esp+34h+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6B5666
mov	ecx, esi
call	sub_650DF0

loc_6B5666:
mov	edx, [esp+34h+var_18]
add	[esp+34h+arg_8], ebx
mov	eax, [esp+34h+var_14]
mov	ecx, [esp+34h+var_24]
mov	ebp, edx
mov	[esp+34h+arg_4], edx

loc_6B567C:
test	ecx, ecx
jnz	loc_6B5593
mov	ecx, [esp+34h+arg_10]
cmp	[esp+34h+arg_8], ecx
jge	short loc_6B56E7
test	eax, eax
lea	eax, [esp+34h+arg_10]
jnz	short loc_6B569D
mov	edx, [esp+34h+var_20]
push	edx
jmp	short loc_6B569F

loc_6B569D:
push	0

loc_6B569F:
push	ebp
push	edi
push	eax
call	sub_6B4EC0
mov	ecx, [esp+44h+arg_0]
mov	ecx, [ecx]
mov	[esp+44h+var_10], 5
mov	eax, [eax]
add	esp, 10h
lea	edx, [esp+34h+var_10]
mov	[esp+34h+var_C], eax
add	[eax+8], ebx
push	edx
call	sub_65E720
lea	ecx, [esp+34h+var_10]
call	sub_652830
mov	eax, [esp+34h+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B56E7
call	sub_650DF0

loc_6B56E7:
pop	ebp

loc_6B56E8:
mov	eax, [esp+30h+arg_0]
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn
sub_6B5430 endp

align 10h



sub_6B5700 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	edi
mov	esi, ecx
call	sub_663B00
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [esi], offset	off_1438A24
mov	dword ptr [esi+10h], offset off_14389D0
mov	eax, [edi]
mov	eax, [eax+8]
lea	ebx, [esi+10h]
push	ecx
mov	[esi+34h], eax
inc	dword ptr [eax+8]
push	edi
mov	ecx, ebx
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+38h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_14389AC
mov	dword ptr [ebx], offset	off_1438A90
mov	dword ptr [ecx], offset	off_1438A8C
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6B5700 endp

align 10h



sub_6B5780 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	8
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B57AA
push	0
push	0
push	offset aString_3 ; "String"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6B57AA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B57BA
add	eax, 0FFFFFFF0h
mov	[esp+0Ch+var_4], eax
jmp	short loc_6B57C2

loc_6B57BA:
mov	[esp+0Ch+var_4], 0

loc_6B57C2:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
push	ebx
push	edi
mov	edi, [ecx+8]
inc	dword ptr [edi+8]
xor	ebx, ebx
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6B5825
mov	ebx, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	edx, [esp+20h+var_8]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+14h+var_8]
inc	dword ptr [eax+8]
add	dword ptr [edi+8], 0FFFFFFFFh
mov	ebx, eax
jnz	short loc_6B580B
mov	ecx, edi
call	sub_650DF0

loc_6B580B:
mov	eax, [esp+14h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
mov	edi, ebx
jnz	short loc_6B5823
call	sub_650DF0

loc_6B5823:
mov	ebx, [ebx]

loc_6B5825:
cmp	dword ptr [esi+1Ch], 2
mov	eax, 3FFFFFFFh
jl	short loc_6B584F
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
test	eax, eax
jge	short loc_6B584F
xor	eax, eax

loc_6B584F:
mov	ecx, [esp+14h+var_4]
mov	edx, [esi+18h]
push	eax
push	ebx
add	ecx, 34h
push	ecx
push	edx
lea	eax, [esp+24h+var_4]
push	eax
call	sub_6B5430
mov	ebx, [esp+28h+var_4]
mov	ecx, [esi+4]
add	esp, 14h
push	ebx
call	sub_652E40
test	ebx, ebx
jz	short loc_6B5882
mov	ecx, ebx
call	sub_64B3B0

loc_6B5882:
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6B588F
mov	ecx, edi
call	sub_650DF0

loc_6B588F:
pop	edi
pop	ebx
pop	esi
add	esp, 8
retn
sub_6B5780 endp

align 10h



sub_6B58A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+10h+arg_4]
push	eax
push	ecx
push	ebp
mov	ecx, esi
call	sub_6B5700
mov	dword ptr [esi], offset	off_14389AC
mov	dword ptr [esi+10h], offset off_1438A90
mov	dword ptr [esi+38h], offset off_1438A8C
mov	edx, [ebp+0]
mov	edi, [edx+15Ch]
inc	dword ptr [edi+8]
mov	ecx, [esi+34h]
add	dword ptr [ecx+8], 0FFFFFFFFh
lea	ebx, [esi+38h]
jnz	short loc_6B58ED
call	sub_650DF0

loc_6B58ED:
lea	eax, [esp+10h+arg_8]
push	eax
push	offset off_167D790
push	ebp
push	esi
mov	ecx, ebx
mov	[esi+34h], edi
mov	byte ptr [esp+20h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B58A0 endp

align 10h



sub_6B5920 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B5983
push	offset sub_6B48D0
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
push	7
push	offset off_143899C
lea	ecx, [esp+30h+var_18]
lea	eax, [edi+10h]
push	ecx
push	eax
mov	dword ptr [edi], offset	off_1438A48
mov	dword ptr [eax], offset	off_1439710
call	sub_66FC60
add	esp, 10h
jmp	short loc_6B5985

loc_6B5983:
xor	edi, edi

loc_6B5985:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	58h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B59D2
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6B58A0
mov	ebx, eax
test	ebx, ebx
jz	short loc_6B59D2
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6B59D2:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 3
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6B5A00
call	sub_64B3B0

loc_6B5A00:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 14h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6B5A4C
mov	ecx, ebx
call	sub_64B3B0

loc_6B5A4C:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6B5920 endp

align 10h



sub_6B5A60 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8

sub	esp, 18h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
xor	ebx, ebx
cmp	[eax], ebx
jz	loc_6B5B07
mov	ecx, eax
mov	[esp+20h+var_18], offset off_154CB6C
mov	[esp+20h+var_10], ebx
mov	[esp+20h+var_C], ebx
mov	ecx, [ecx]
mov	edx, [ecx]
mov	edx, [edx+44h]
push	offset a_global_gfx_im ; "_global.gfx_ime_candidate_list_state"
lea	eax, [esp+24h+var_18]
push	eax
call	edx
test	al, al
jnz	short loc_6B5AB2
mov	eax, [esp+20h+var_18]
mov	edx, [eax+24h]
push	3
lea	ecx, [esp+24h+var_18]
call	edx
fldz
fstp	[esp+20h+var_8]

loc_6B5AB2:
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	270Fh
call	sub_68E580
test	eax, eax
jz	short loc_6B5AD8
fld	ds:dbl_15FCD70
fcomp	[esp+20h+var_8]
fnstsw	ax
test	ah, 44h
jp	short loc_6B5AD8
mov	bl, 1

loc_6B5AD8:
mov	ecx, [esp+20h+var_C]
shr	ecx, 6
mov	[esp+20h+var_18], offset off_154CB6C
test	cl, 1
jz	short loc_6B5AFF
mov	edx, dword ptr [esp+20h+var_8]
mov	ecx, [esp+20h+var_10]
push	edx
lea	eax, [esp+24h+var_18]
push	eax
call	sub_64B5D0

loc_6B5AFF:
pop	esi
mov	al, bl
pop	ebx
add	esp, 18h
retn

loc_6B5B07:
pop	esi
xor	al, al
pop	ebx
add	esp, 18h
retn
sub_6B5A60 endp

align 10h



sub_6B5B10 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+68h]
call	edx
mov	esi, [esi+0Ch]
mov	ecx, [esi+4]
add	esi, 4
test	ecx, ecx
jz	short loc_6B5B2C
call	sub_64A400

loc_6B5B2C:
mov	dword ptr [esi], 0
pop	esi
retn
sub_6B5B10 endp

align 10h



sub_6B5B40 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	qword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 28h
push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, [esp+30h+arg_0]
push	esi
xor	ebx, ebx
mov	[esp+34h+var_1C], ebx
mov	eax, [ebp+0]
mov	edx, [eax+48h]
push	edi
push	ecx
mov	ecx, ebp
mov	[esp+3Ch+var_28], ebp
call	edx
mov	edi, [esp+38h+arg_8]
test	al, al
jz	loc_6B5E19
test	edi, edi
jz	loc_6B5C32
mov	eax, [edi]
mov	edx, [eax+0B0h]
mov	ecx, edi
call	edx
cmp	eax, 4
jnz	loc_6B5C32
mov	eax, [edi]
mov	edx, [eax+1C0h]
mov	ecx, edi
call	edx
mov	esi, eax
xor	eax, eax
mov	edi, offset off_154CB6C
mov	dword ptr [esp+38h+var_18], edi
mov	[esp+38h+var_10], eax
mov	[esp+38h+var_C], eax
cmp	esi, eax
jz	short loc_6B5C0B
mov	eax, [ebp+0Ch]
mov	ecx, [eax]
mov	edx, [ecx]
mov	edx, [edx+44h]
push	offset a_global_gfx_im ; "_global.gfx_ime_candidate_list_state"
lea	eax, [esp+3Ch+var_18]
push	eax
call	edx
test	al, al
jnz	short loc_6B5BDF
mov	eax, dword ptr [esp+38h+var_18]
mov	edx, [eax+24h]
push	3
lea	ecx, [esp+3Ch+var_18]
call	edx
fldz
fstp	[esp+38h+var_8]

loc_6B5BDF:
mov	eax, [ebp+0Ch]
mov	ecx, [eax]
push	270Fh
call	sub_68E580
mov	ecx, eax
test	ecx, ecx
jz	short loc_6B5C0B
fld	ds:dbl_15FCD70
fcomp	[esp+38h+var_8]
fnstsw	ax
test	ah, 44h
jp	short loc_6B5C0B
push	esi
call	sub_684930

loc_6B5C0B:
mov	ecx, [esp+38h+var_C]
shr	ecx, 6
mov	dword ptr [esp+38h+var_18], edi
test	cl, 1
jz	short loc_6B5C2E
mov	edx, dword ptr [esp+38h+var_8]
mov	ecx, [esp+38h+var_10]
push	edx
lea	eax, [esp+3Ch+var_18]
push	eax
call	sub_64B5D0

loc_6B5C2E:
mov	edi, [esp+38h+arg_8]

loc_6B5C32:
mov	ecx, [esp+38h+arg_4]
test	ecx, ecx
jz	loc_6B5E58
mov	edx, [ecx]
mov	eax, [edx+0B0h]
call	eax
cmp	eax, 4
jnz	loc_6B5E58
test	edi, edi
jnz	loc_6B5E45
mov	esi, [esp+38h+arg_C]
test	esi, esi
jz	loc_6B5DEB
lea	ecx, [esp+38h+arg_C]
call	sub_679E30
lea	ecx, [esp+38h+arg_C]
push	ecx
mov	ecx, esi
call	sub_6577E0
mov	eax, [esp+38h+arg_C]
mov	edx, [ebp+0]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
mov	eax, [edx+54h]
mov	ecx, ebp
call	eax
test	al, al
jnz	loc_6B5E2E
mov	byte ptr [esp+38h+var_18], bl
jmp	short loc_6B5CA0
align 10h

loc_6B5CA0:
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
or	ebx, 1
call	eax
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	0
push	0Dh
push	offset aIslanguagebar ;	"isLanguageBar"
call	sub_650E40
mov	[esp+38h+var_24], eax
inc	dword ptr [eax+8]
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	edx, [esi+78h]
mov	edx, [edx+2Ch]
lea	ecx, [esp+38h+var_18]
push	ecx
lea	edi, [esi+78h]
lea	ecx, [esp+3Ch+var_24]
push	ecx
add	eax, 78h
push	eax
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_6B5D4C
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
or	ebx, 2
call	edx
mov	[esp+38h+arg_0], eax
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	ebp, [edi]
mov	[esp+38h+var_20], eax
lea	eax, [esp+38h+var_18]
push	eax
push	offset aIsstatuswindow ; "isStatusWindow"
lea	ecx, [esp+40h+var_1C]
push	ecx
mov	ecx, [esp+44h+arg_0]
add	ecx, 78h
add	ebp, 2Ch
call	sub_4E4640
mov	edx, [esp+3Ch+var_20]
push	eax
mov	eax, [ebp+0]
add	edx, 78h
push	edx
mov	ecx, edi
call	eax
mov	ebp, [esp+38h+var_28]
mov	byte ptr [esp+38h+arg_0], 0
test	al, al
jz	short loc_6B5D51

loc_6B5D4C:
mov	byte ptr [esp+38h+arg_0], 1

loc_6B5D51:
test	bl, 2
jz	short loc_6B5D6F
mov	eax, [esp+38h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFDh
cmp	dword ptr [eax], 0
jnz	short loc_6B5D6F
call	sub_650DF0

loc_6B5D6F:
test	bl, 1
jz	short loc_6B5D8D
mov	eax, [esp+38h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFEh
cmp	dword ptr [eax], 0
jnz	short loc_6B5D8D
call	sub_650DF0

loc_6B5D8D:
cmp	byte ptr [esp+38h+arg_0], 0
jnz	loc_6B5E25
mov	esi, [esi+20h]
test	esi, esi
jnz	loc_6B5CA0
mov	eax, [esp+38h+arg_C]
mov	edx, [ebp+0]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
mov	eax, [edx+58h]
mov	ecx, ebp
call	eax
test	al, al
jnz	short loc_6B5E25
mov	eax, [esp+38h+arg_C]
mov	edx, [ebp+0]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
mov	eax, [edx+5Ch]
mov	ecx, ebp
call	eax
lea	ecx, [esp+38h+var_18]
test	al, al
jnz	short loc_6B5E29
call	sub_652830
lea	ecx, [esp+38h+arg_C]
call	sub_4E40F0
mov	edi, [esp+38h+arg_8]

loc_6B5DEB:
mov	ecx, ebp
call	sub_6B5B10

loc_6B5DF2:
xor	dl, dl

loc_6B5DF4:
mov	eax, [ebp+0Ch]
mov	cl, [eax+14h]
mov	byte ptr [esp+38h+arg_4], dl
cmp	cl, dl
jnz	short loc_6B5E19
test	cl, cl
setz	cl
mov	[eax+14h], cl
mov	edx, [ebp+0]
mov	eax, [esp+38h+arg_4]
mov	edx, [edx+7Ch]
push	eax
mov	ecx, ebp
call	edx

loc_6B5E19:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	10h

loc_6B5E25:
lea	ecx, [esp+38h+var_18]

loc_6B5E29:
call	sub_652830

loc_6B5E2E:
lea	ecx, [esp+38h+arg_C]
call	sub_4E40F0
mov	eax, [esp+38h+arg_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	10h

loc_6B5E45:
mov	edx, [edi]
mov	eax, [edx+0B0h]
mov	ecx, edi
call	eax
mov	ecx, ebp
call	sub_6B5B10

loc_6B5E58:
test	edi, edi
jz	short loc_6B5DF2
mov	edx, [edi]
mov	eax, [edx+0B0h]
mov	ecx, edi
call	eax
cmp	eax, 4
jnz	short loc_6B5DF2
mov	edx, [edi]
mov	eax, [edx+194h]
mov	ecx, edi
call	eax
test	al, al
jz	loc_6B5DF2
mov	dl, 1
jmp	loc_6B5DF4
sub_6B5B40 endp

align 10h



sub_6B5E90 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+48h]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	short loc_6B5ED6
mov	eax, [esi+0Ch]
mov	eax, [eax+4]
test	eax, eax
jz	short loc_6B5ED6
cmp	[esp+4+arg_8], eax
jnz	short loc_6B5ED6
mov	edx, [esi]
mov	eax, [edx+68h]
mov	ecx, esi
call	eax
mov	esi, [esi+0Ch]
mov	ecx, [esi+4]
add	esi, 4
test	ecx, ecx
jz	short loc_6B5ED0
call	sub_64A400

loc_6B5ED0:
mov	dword ptr [esi], 0

loc_6B5ED6:
pop	esi
retn	0Ch
sub_6B5E90 endp

align 10h



sub_6B5EE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
cmp	dword ptr [eax], 0
push	edi
mov	edi, [esp+8+arg_0]
jz	short loc_6B5EF8
mov	ecx, [eax]
push	edi
call	sub_68F410

loc_6B5EF8:
mov	ecx, esi
call	sub_6B5A60
test	al, al
jz	short loc_6B5F14
mov	eax, [esi]
mov	edx, [eax+74h]
push	edi
mov	ecx, esi
call	edx
pop	edi
mov	al, 1
pop	esi
retn	4

loc_6B5F14:
pop	edi
xor	al, al
pop	esi
retn	4
sub_6B5EE0 endp

align 10h



sub_6B5F20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
call	sub_6B5A60
test	al, al
jz	short loc_6B5F40
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+78h]
push	ecx
mov	ecx, esi
call	edx
mov	al, 1
pop	esi
retn	4

loc_6B5F40:
mov	esi, [esi+0Ch]
cmp	dword ptr [esi], 0
jz	short loc_6B5F5A
mov	eax, [esp+4+arg_0]
mov	ecx, [esi]
push	eax
call	sub_68DBA0
mov	al, 1
pop	esi
retn	4

loc_6B5F5A:
xor	al, al
pop	esi
retn	4
sub_6B5F20 endp




sub_6B5F60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
movzx	esi, byte ptr [eax+ecx+27F4h]
add	esi, 0B5h
imul	esi, 34h
mov	eax, [esi+ecx]
add	esi, ecx
push	edi
xor	edi, edi
test	eax, eax
jz	short loc_6B5F99
cmp	[eax+4], edi
jz	short loc_6B5FB1
mov	edi, [eax+4]
test	edi, edi
jz	short loc_6B5F99
mov	eax, 1
add	[edi+4], eax
add	[edi+4], eax

loc_6B5F99:
mov	esi, [esp+8+arg_0]
mov	[esi], edi
test	edi, edi
jz	short loc_6B5FAA
mov	ecx, edi
call	sub_64A400

loc_6B5FAA:
pop	edi
mov	eax, esi
pop	esi
retn	8

loc_6B5FB1:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B5FC4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B5FC4:
mov	[esi], edi
jmp	short loc_6B5F99
sub_6B5F60 endp

align 10h



sub_6B5FD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx+0Ch]
cmp	dword ptr [eax], 0
jz	short loc_6B6031
push	ebx
push	esi
push	0
lea	ecx, [esp+10h+var_4]
push	ecx
mov	ecx, [eax]
call	sub_6B5F60
mov	esi, [esp+0Ch+var_4]
test	esi, esi
jz	short loc_6B601C
mov	edx, [esi]
mov	eax, [edx+0B0h]
mov	ecx, esi
call	eax
cmp	eax, 4
jnz	short loc_6B601C
mov	edx, [esi]
mov	eax, [edx+194h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_6B601C
cmp	esi, [esp+0Ch+arg_0]
jnz	short loc_6B601C
mov	bl, 1
jmp	short loc_6B601E

loc_6B601C:
xor	bl, bl

loc_6B601E:
test	esi, esi
jz	short loc_6B6029
mov	ecx, esi
call	sub_64A400

loc_6B6029:
pop	esi
mov	al, bl
pop	ebx
pop	ecx
retn	4

loc_6B6031:
xor	al, al
pop	ecx
retn	4
sub_6B5FD0 endp

align 10h



sub_6B6040 proc	near
mov	eax, 19h
retn
sub_6B6040 endp

align 10h



sub_6B6050 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
call	sub_7323B0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6B6050 endp

align 10h



sub_6B6070 proc	near
push	esi
push	edi
mov	edi, ecx
xor	esi, esi

loc_6B6076:
mov	ecx, [edi+esi*4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6B6084
call	sub_650DF0

loc_6B6084:
mov	dword ptr [edi+esi*4], 0
inc	esi
cmp	esi, 9Eh
jb	short loc_6B6076
mov	ecx, [edi+278h]
pop	edi
pop	esi
test	ecx, ecx
jz	short locret_6B60A5
jmp	sub_64A430

locret_6B60A5:
retn
sub_6B6070 endp

align 10h



sub_6B60B0 proc	near
push	ebx
push	ebp
mov	ebx, ecx
push	esi
mov	ebp, ebx
push	edi
sub	ebp, offset off_167D808
xor	edi, edi

loc_6B60C0:
mov	edx, off_167D808[edi]
mov	eax, edx
lea	esi, [eax+1]
jmp	short loc_6B60D0
align 10h

loc_6B60D0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6B60D0
mov	ecx, [ebx+278h]
push	80000000h
sub	eax, esi
push	eax
push	edx
call	sub_650E40
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	off_167D808[edi+ebp], esi
add	[esi+8], eax
mov	ecx, esi
call	sub_651580
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6B6113
mov	ecx, esi
call	sub_650DF0

loc_6B6113:
add	edi, 4
cmp	edi, 278h
jb	short loc_6B60C0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_6B60B0 endp

align 10h



sub_6B6130 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_6B6143
mov	ecx, edi
call	sub_64A420

loc_6B6143:
mov	ecx, esi
mov	[esi+278h], edi
call	sub_6B60B0
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6B6130 endp

align 10h



sub_6B6160 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fabs
mov	esi, [esi+4]
fstp	[esp+0Ch+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6B6191
mov	ecx, esi
call	sub_652060

loc_6B6191:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6160 endp




sub_6B61A0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIacos
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B61D4
mov	ecx, esi
call	sub_652060

loc_6B61D4:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B61A0 endp

align 10h



sub_6B61F0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIasin
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6224
mov	ecx, esi
call	sub_652060

loc_6B6224:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B61F0 endp

align 10h



sub_6B6240 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIatan
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6274
mov	ecx, esi
call	sub_652060

loc_6B6274:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6240 endp

align 10h



sub_6B6290 proc	near

var_14=	qword ptr -14h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
sub	esp, 8
fstp	[esp+14h+var_14]
call	_ceil
mov	esi, [esi+4]
fstp	[esp+14h+var_8]
add	esp, 8
cmp	byte ptr [esi],	5
jb	short loc_6B62CD
mov	ecx, esi
call	sub_652060

loc_6B62CD:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6290 endp

align 10h



sub_6B62E0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIcos
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6314
mov	ecx, esi
call	sub_652060

loc_6B6314:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B62E0 endp

align 10h



sub_6B6330 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIexp
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6364
mov	ecx, esi
call	sub_652060

loc_6B6364:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6330 endp

align 10h



sub_6B6380 proc	near

var_14=	qword ptr -14h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
sub	esp, 8
fstp	[esp+14h+var_14]
call	_floor
mov	esi, [esi+4]
fstp	[esp+14h+var_8]
add	esp, 8
cmp	byte ptr [esi],	5
jb	short loc_6B63BD
mov	ecx, esi
call	sub_652060

loc_6B63BD:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6380 endp

align 10h



sub_6B63D0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIlog
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6404
mov	ecx, esi
call	sub_652060

loc_6B6404:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B63D0 endp

align 10h



sub_6B6420 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIsin
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6454
mov	ecx, esi
call	sub_652060

loc_6B6454:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6420 endp

align 10h



sub_6B6470 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CIsqrt
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B64A4
mov	ecx, esi
call	sub_652060

loc_6B64A4:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6470 endp

align 10h



sub_6B64C0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__CItan
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B64F4
mov	ecx, esi
call	sub_652060

loc_6B64F4:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B64C0 endp

align 10h



sub_6B6510 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+var_8]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fld	[esp+0Ch+var_8]
fxch	st(1)
call	sub_79A3DA
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6562
mov	ecx, esi
call	sub_652060

loc_6B6562:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6510 endp

align 10h



sub_6B6580 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+var_8]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fld	[esp+0Ch+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6B65C5
fstp	st(1)
jmp	short loc_6B65C7

loc_6B65C5:
fstp	st

loc_6B65C7:
mov	esi, [esi+4]
fstp	[esp+0Ch+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6B65DA
mov	ecx, esi
call	sub_652060

loc_6B65DA:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6580 endp

align 10h



sub_6B65F0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+var_8]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fld	[esp+0Ch+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6B6635
fstp	st(1)
jmp	short loc_6B6637

loc_6B6635:
fstp	st

loc_6B6637:
mov	esi, [esi+4]
fstp	[esp+0Ch+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6B664A
mov	ecx, esi
call	sub_652060

loc_6B664A:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B65F0 endp

align 10h



sub_6B6660 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+0Ch+var_8]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fld	[esp+0Ch+var_8]
fxch	st(1)
call	__CIpow
fstp	[esp+0Ch+var_8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B66B2
mov	ecx, esi
call	sub_652060

loc_6B66B2:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6660 endp

align 10h



sub_6B66D0 proc	near

var_14=	qword ptr -14h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+14h+var_14]
call	_floor
mov	esi, [esi+4]
fstp	[esp+14h+var_8]
add	esp, 8
cmp	byte ptr [esi],	5
jb	short loc_6B6713
mov	ecx, esi
call	sub_652060

loc_6B6713:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B66D0 endp

align 10h



sub_6B6730 proc	near

var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_0]
lea	ecx, [eax+8]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	esi
push	24h
call	edx
mov	esi, eax
test	esi, esi
jz	loc_6B6826
push	edi
mov	ecx, esi
call	sub_64A430
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_6B67B8
call	sub_71D6F0
mov	edi, eax
push	edi
lea	ecx, [esp+64h+var_54]
call	sub_6A29A0
lea	ecx, [esp+60h+var_54]
call	sub_6A2C40
mov	ecx, [esp+60h+var_3C]
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	offset aRandom	; "random"
mov	ecx, esi
call	edx
lea	ecx, [esp+60h+var_54]
mov	[esp+60h+var_48], offset off_143A4DC
call	sub_6A2180

loc_6B67A5:
mov	eax, edi
pop	edi
pop	esi
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_6B67B8:
lea	ecx, [esp+60h+var_58]
call	sub_679E30
mov	eax, [esi]
mov	edx, [eax+4]
lea	ecx, [esp+60h+var_58]
push	ecx
push	offset aRandom	; "random"
mov	ecx, esi
call	edx
mov	eax, [esp+60h+var_58]
and	eax, 0FFFFFFFCh
push	0Ah		; int
add	eax, 8
push	0		; char **
push	eax		; char *
call	_strtoul
mov	esi, [esp+6Ch+var_58]
add	esp, 0Ch
mov	edi, eax
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B67A5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
mov	eax, edi
pop	edi
pop	esi
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_6B6826:
call	sub_71D6F0
mov	ecx, [esp+5Ch+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn
sub_6B6730 endp

align 10h



sub_6B6840 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi+18h]
call	sub_668010
push	eax
call	sub_6B6730
add	esp, 4
mov	[esp+0Ch+arg_0], eax
fild	[esp+0Ch+arg_0]
test	eax, eax
jge	short loc_6B686B
fadd	ds:dbl_15FCE08

loc_6B686B:
fdiv	ds:dbl_14391B8
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
fstp	[esp+0Ch+var_8]
jb	short loc_6B6884
mov	ecx, esi
call	sub_652060

loc_6B6884:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6B6840 endp

align 10h



sub_6B68A0 proc	near

var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
push	offset sub_6EF500
push	edi
mov	ebp, ecx
call	sub_67C3D0
fld	ds:dbl_1439228
lea	eax, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	eax
lea	esi, [ebp+10h]
push	offset aE	; "E"
mov	bl, 3
push	edi
mov	ecx, esi
mov	dword ptr [ebp+0], offset off_143C238
mov	dword ptr [esi], offset	off_1439710
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	ds:dbl_1439220
lea	ecx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	ecx
push	offset unk_1439218
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	ds:dbl_1439210
lea	edx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	edx
push	offset aLog2e	; "LOG2E"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	ds:dbl_1439200
lea	eax, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	eax
push	offset aLn10	; "LN10"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	ds:dbl_14391F0
lea	ecx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	ecx
push	offset aLog10e	; "LOG10E"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	ds:dbl_1431730
lea	edx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	edx
push	offset unk_14391E0
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	ds:dbl_14391D8
mov	[esp+20h+var_10], bl
lea	eax, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	eax
push	offset aSqrt1_2	; "SQRT1_2"
push	edi
mov	ecx, esi
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	ds:dbl_14391C8
lea	ecx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	ecx
push	offset aSqrt2	; "SQRT2"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
push	7
push	offset off_1439120
push	edi
push	esi
call	sub_66FC60
add	esp, 10h
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	4
sub_6B68A0 endp

align 10h



sub_6B6A30 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+38h]
call	sub_67BFB0
lea	ecx, [edi+44h]
call	sub_67BFB0
mov	eax, [edi+50h]
test	eax, eax
jz	short loc_6B6A92
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B6A90
lea	ebx, [ebx+0]

loc_6B6A60:
mov	eax, [edi+50h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B6A8B
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6B6A8B
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6B6A8B:
inc	esi
cmp	esi, ebx
jb	short loc_6B6A60

loc_6B6A90:
pop	esi
pop	ebx

loc_6B6A92:
pop	edi
retn
sub_6B6A30 endp

align 10h



sub_6B6AA0 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+38h]
call	sub_67C070
lea	ecx, [edi+44h]
call	sub_67C070
mov	eax, [edi+50h]
test	eax, eax
jz	short loc_6B6B1D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B6B1B
lea	ebx, [ebx+0]

loc_6B6AD0:
mov	eax, [edi+50h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B6B16
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6B6B16
test	eax, 0FFFFFFFh
jbe	short loc_6B6B01
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6B6B0D

loc_6B6B01:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6B6B0D:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6B6B16:
inc	esi
cmp	esi, ebx
jb	short loc_6B6AD0

loc_6B6B1B:
pop	esi
pop	ebx

loc_6B6B1D:
pop	edi
retn
sub_6B6AA0 endp

align 10h



sub_6B6B20 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+38h]
call	sub_67C1F0
lea	ecx, [edi+44h]
call	sub_67C1F0
mov	eax, [edi+50h]
test	eax, eax
jz	short loc_6B6B6A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B6B68
lea	ebx, [ebx+0]

loc_6B6B50:
mov	eax, [edi+50h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B6B63
call	sub_64B3B0

loc_6B6B63:
inc	esi
cmp	esi, ebx
jb	short loc_6B6B50

loc_6B6B68:
pop	esi
pop	ebx

loc_6B6B6A:
pop	edi
retn
sub_6B6B20 endp

align 10h



sub_6B6B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_1432A28
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [edi], offset	off_1439258
mov	dword ptr [ecx], offset	off_1439254
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6B6B70 endp

align 10h



sub_6B6BF0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+2Ch+arg_4]
mov	ecx, [edi+294h]
mov	[esp+2Ch+var_18], edi
mov	[esp+2Ch+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
cmp	eax, ebx
jz	short loc_6B6C28
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, eax
call	sub_6B68A0
jmp	short loc_6B6C2A

loc_6B6C28:
xor	eax, eax

loc_6B6C2A:
mov	ebp, [esp+2Ch+arg_0]
mov	[ebp+0], eax
mov	[ebp+8], bl
mov	[ebp+4], ebx
mov	ecx, [edi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	54h
call	eax
mov	esi, eax
cmp	esi, ebx
jz	loc_6B6D11
push	1
mov	ecx, edi
call	sub_66FB00
push	ebp
push	eax
lea	ecx, [esp+34h+var_18]
push	ecx
mov	ecx, esi
call	sub_6B6B70
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [esi+34h], offset off_1439254
mov	edx, [esi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[esp+2Ch+arg_0], esi
mov	[esi+8], edx

loc_6B6C8D:
mov	eax, [esp+2Ch+arg_0]
lea	ecx, [esp+2Ch+arg_4]
push	ecx
lea	edx, [esp+30h+var_1C]
push	edx
lea	ecx, [edi+284h]
mov	[esp+34h+arg_4], eax
mov	[esp+34h+var_1C], 19h
call	sub_661470
mov	ecx, [esp+2Ch+arg_4]
cmp	ecx, ebx
jz	short loc_6B6CBF
call	sub_64B3B0

loc_6B6CBF:
mov	ebx, [edi+2ACh]
lea	eax, [esp+2Ch+arg_4]
add	ebx, 10h
mov	byte ptr [esp+2Ch+arg_4], 0
mov	esi, [ebx]
push	eax
push	ebp
lea	ecx, [esp+34h+var_10]
add	esi, 28h
call	sub_651E70
mov	edx, [esi]
push	eax
add	edi, 6Ch
push	edi
lea	ecx, [esp+38h+var_18]
push	ecx
mov	ecx, ebx
call	edx
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	ecx, [esp+2Ch+arg_0]
test	ecx, ecx
jz	short loc_6B6D07
call	sub_64B3B0

loc_6B6D07:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_6B6D11:
mov	[esp+2Ch+arg_0], ebx
jmp	loc_6B6C8D
sub_6B6BF0 endp

align 10h



sub_6B6D20 proc	near

var_5C=	qword ptr -5Ch
DstBuf=	byte ptr -44h
var_4= dword ptr -4

sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+44h+var_4], eax
push	esi
push	0Ah		; int
push	40h		; SizeInBytes
lea	eax, [esp+50h+DstBuf]
mov	esi, ecx
fld	qword ptr [esi+28h]
push	eax		; DstBuf
sub	esp, 8
fstp	[esp+5Ch+var_5C]
call	sub_6797A0
add	esi, 30h
push	eax
mov	ecx, esi
call	sub_67A2C0
mov	eax, [esi]
mov	ecx, [esp+48h+var_4]
and	eax, 0FFFFFFFCh
pop	esi
xor	ecx, esp
add	eax, 8
call	sub_7999A3
add	esp, 44h
retn	4
sub_6B6D20 endp

align 10h



sub_6B6D70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
push	eax
call	sub_653400
fstp	qword ptr [esi+38h]
pop	esi
retn	8
sub_6B6D70 endp

align 10h



sub_6B6D90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	qword ptr [ecx+38h]
fstp	qword ptr [eax+4]
mov	byte ptr [eax],	3
retn	4
sub_6B6D90 endp




sub_6B6DA0 proc	near

var_5C=	qword ptr -5Ch
DstBuf=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+44h+var_4], eax
mov	eax, [esp+44h+arg_0]
push	esi
push	eax		; int
mov	esi, ecx
fld	qword ptr [esi+38h]
push	40h		; SizeInBytes
lea	ecx, [esp+50h+DstBuf]
push	ecx		; DstBuf
sub	esp, 8
fstp	[esp+5Ch+var_5C]
call	sub_6797A0
add	esi, 40h
push	eax
mov	ecx, esi
call	sub_67A2C0
mov	eax, [esi]
mov	ecx, [esp+48h+var_4]
and	eax, 0FFFFFFFCh
pop	esi
xor	ecx, esp
add	eax, 8
call	sub_7999A3
add	esp, 44h
retn	4
sub_6B6DA0 endp




sub_6B6DF0 proc	near

var_18=	qword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 18h
push	esi
mov	esi, [esp+1Ch+arg_0]
push	9
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B6E1A
push	0
push	0
push	offset aNumber_0 ; "Number"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 18h
retn

loc_6B6E1A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B6E26
lea	ecx, [eax-10h]
jmp	short loc_6B6E28

loc_6B6E26:
xor	ecx, ecx

loc_6B6E28:
mov	eax, [esi+18h]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	eax
lea	eax, [esp+20h+var_10]
push	eax
call	edx
mov	ecx, eax
call	sub_653400
fstp	[esp+1Ch+var_18]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6B6E52
mov	ecx, esi
call	sub_652060

loc_6B6E52:
fld	[esp+1Ch+var_18]
lea	ecx, [esp+1Ch+var_10]
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
call	sub_652830
pop	esi
add	esp, 18h
retn
sub_6B6DF0 endp

align 10h



sub_6B6E70 proc	near

var_20=	qword ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
xor	ebx, ebx
push	esi
mov	esi, [esp+28h+arg_0]
mov	dword ptr [esp+28h+var_20], ebx
cmp	[esi+8], ebx
jz	loc_6B6F1D
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 9
jnz	loc_6B6F1D
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6B6F1D
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6B6EB6
lea	edi, [eax-10h]
jmp	short loc_6B6EB8

loc_6B6EB6:
xor	edi, edi

loc_6B6EB8:
cmp	[esi+1Ch], ebx
jle	short loc_6B6EC8
push	0
mov	ecx, esi
call	sub_651EC0
jmp	short loc_6B6ED6

loc_6B6EC8:
mov	ebx, 1
mov	[esp+2Ch+var_10], 0
lea	eax, [esp+2Ch+var_10]

loc_6B6ED6:
push	eax
lea	ecx, [esp+30h+var_20]
call	sub_652330
test	bl, 1
jz	short loc_6B6EEE
lea	ecx, [esp+2Ch+var_10]
call	sub_652830

loc_6B6EEE:
mov	eax, [edi]
mov	edx, [esi+18h]
mov	eax, [eax+0Ch]
lea	ecx, [esp+2Ch+var_20]
push	ecx
push	edx
mov	ecx, edi
call	eax
lea	ecx, [esp+2Ch+var_20]
push	ecx
mov	ecx, [esi+4]
call	sub_652520
lea	ecx, [esp+2Ch+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn

loc_6B6F1D:
cmp	[esi+1Ch], ebx
jnz	short loc_6B6F26
fldz
jmp	short loc_6B6F3A

loc_6B6F26:
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400

loc_6B6F3A:
mov	esi, [esi+4]
fstp	[esp+28h+var_20]
cmp	byte ptr [esi],	5
jb	short loc_6B6F4D
mov	ecx, esi
call	sub_652060

loc_6B6F4D:
fld	[esp+28h+var_20]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
pop	ebx
add	esp, 20h
retn
sub_6B6E70 endp

align 10h



sub_6B6F60 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
fldz
lea	edi, [esi+10h]
fstp	qword ptr [esi+38h]
lea	ecx, [esi+40h]
mov	dword ptr [esi], offset	off_143938C
mov	dword ptr [edi], offset	off_1439338
call	sub_67AB70
mov	ecx, [ebx+78h]
add	ebx, 78h
push	4
call	sub_66FB00
mov	edx, [edi]
push	eax
mov	eax, [edx+34h]
push	ebx
mov	ecx, edi
call	eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6B6F60 endp

align 10h



sub_6B6FB0 proc	near
mov	eax, 9
retn
sub_6B6FB0 endp

align 10h



sub_6B6FC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

; FUNCTION CHUNK AT 00663310 SIZE 00000082 BYTES

sub	ecx, 10h
jmp	loc_6B7160
align 10h

loc_6B6FD0:
push	edi
mov	edi, [esp+4+arg_0]
push	9
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6B6FF4
push	0
push	0
push	offset aNumber_0 ; "Number"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6B6FF4:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6B7001
lea	esi, [eax-10h]
jmp	short loc_6B7003

loc_6B7001:
xor	esi, esi

loc_6B7003:
cmp	dword ptr [edi+1Ch], 0
mov	eax, 0Ah
jle	short loc_6B7027
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse

loc_6B7027:
push	eax
mov	ecx, esi
call	sub_6B6DA0
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	eax
call	sub_651000
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_6B7055
mov	ecx, edi
call	sub_652060

loc_6B7055:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6B706D
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_650DF0

loc_6B706D:
pop	esi
pop	edi
retn

loc_6B7070:
push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	48h
call	eax
test	eax, eax
jz	short loc_6B7099
push	esi
mov	ecx, eax
call	sub_6B6F60
pop	esi
retn	4

loc_6B7099:
xor	eax, eax
pop	esi
retn	4
align 10h

loc_6B70A0:
push	esi
mov	esi, ecx
lea	ecx, [esi+48h]
push	edi
mov	dword ptr [esi], offset	off_1439450
mov	dword ptr [esi+10h], offset off_14393B0
mov	dword ptr [ecx], offset	off_143944C
call	sub_665A40
mov	edi, [esi+40h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B70E4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B70E4:
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_664A30
align 10h

loc_6B70F0:
mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6B70FD
mov	al, 1
retn	8

loc_6B70FD:
mov	[esp+arg_4], eax
add	ecx, 48h
jmp	loc_663310
align 10h

loc_6B7110:
sub	ecx, 48h
jmp	loc_6B7470
align 10h

loc_6B7120:
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+40h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B7149
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B7149:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_664580
align 10h

loc_6B7160:
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+40h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B7189
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B7189:
mov	ecx, edi
call	sub_664A30
test	byte ptr [esp+8+arg_0],	1
jz	short loc_6B71A5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6B71A5:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_6B6FC0 endp

align 10h



sub_6B71B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 1Ch
push	ebx
mov	ebx, [esp+20h+arg_0]
push	esi
push	edi
push	offset sub_6B6E70
mov	edi, ecx
push	ebx
mov	[esp+30h+var_14], edi
call	sub_67C3D0
lea	esi, [edi+10h]
xor	eax, eax
mov	dword ptr [edi], offset	off_1439408
mov	dword ptr [esi], offset	off_1439710
mov	[esp+28h+var_18], eax
cmp	ds:off_1439304,	eax
jz	loc_6B729A
mov	edi, offset off_1439304
push	ebp

loc_6B71F2:
mov	eax, ds:off_1439308[eax]
mov	byte ptr [esp+2Ch+arg_0], 7
call	eax
fstp	[esp+28h+var_C+4]
mov	edx, [edi]
mov	ecx, [ebx]
mov	eax, edx
mov	byte ptr [esp+28h+var_C], 3
mov	edi, [ecx+280h]
lea	ebp, [eax+1]

loc_6B7217:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6B7217
push	0
sub	eax, ebp
push	eax
push	edx
mov	ecx, edi
call	sub_650E40
mov	[esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+var_C]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	ebx
mov	ecx, esi
call	edx
mov	eax, [esp+2Ch+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B7261
call	sub_650DF0

loc_6B7261:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	eax, [esp+2Ch+var_18]
inc	eax
mov	[esp+2Ch+var_18], eax
add	eax, eax
add	eax, eax
add	eax, eax
cmp	ds:off_1439304[eax], 0
lea	edi, off_1439304[eax]
jnz	loc_6B71F2
mov	eax, [esp+2Ch+var_14]
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4

loc_6B729A:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4
sub_6B71B0 endp

align 10h



sub_6B72B0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6B72DC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+64h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6B72DC:
mov	esi, [edi+40h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6B7301
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B7301:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_664580
sub_6B72B0 endp

align 10h



sub_6B7310 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+4Ch]
call	sub_67C000
lea	ecx, [edi+58h]
call	sub_67C000
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6B7380
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B737E
lea	ebx, [ebx+0]

loc_6B7340:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B7379
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6B7379
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6B7379:
inc	esi
cmp	esi, ebx
jb	short loc_6B7340

loc_6B737E:
pop	esi
pop	ebx

loc_6B7380:
pop	edi
retn
sub_6B7310 endp

align 10h



sub_6B7390 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
fldz
lea	edi, [esi+10h]
fstp	qword ptr [esi+38h]
lea	ecx, [esi+40h]
mov	dword ptr [esi], offset	off_143938C
mov	dword ptr [edi], offset	off_1439338
call	sub_67AB70
mov	eax, [esp+0Ch+arg_4]
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+48h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_1439450
mov	dword ptr [edi], offset	off_14393B0
mov	dword ptr [ecx], offset	off_143944C
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6B7390 endp

align 10h



sub_6B7410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6B7390
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_14392EC
push	edi
lea	ecx, [esi+48h]
push	esi
mov	dword ptr [esi], offset	off_1439450
mov	dword ptr [esi+10h], offset off_14393B0
mov	dword ptr [ecx], offset	off_143944C
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6B7410 endp

align 10h



sub_6B7460 proc	near

arg_4= byte ptr	 8

sub	ecx, 10h
jmp	loc_6B7470
align 10h

loc_6B7470:
push	esi
mov	esi, ecx
call	loc_6B70A0
test	[esp+arg_4], 1
jz	short loc_6B748D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B748D:
mov	eax, esi
pop	esi
retn	4
sub_6B7460 endp	; sp-analysis failed

align 10h



sub_6B74A0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
cmp	eax, ebx
jz	short loc_6B74D7
lea	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, eax
call	sub_6B71B0
jmp	short loc_6B74D9

loc_6B74D7:
xor	eax, eax

loc_6B74D9:
mov	ebp, [esp+24h+arg_0]
mov	[ebp+0], eax
mov	[ebp+8], bl
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebx
push	68h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B7527
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_14]
push	ecx
mov	ecx, edi
call	sub_6B7410
mov	ebx, eax
test	ebx, ebx
jz	short loc_6B7527
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6B7527:
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_8], ebx
mov	[esp+2Ch+arg_4], 4
call	sub_661470
mov	ecx, [esp+24h+arg_8]
test	ecx, ecx
jz	short loc_6B7555
call	sub_64B3B0

loc_6B7555:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+arg_8], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+2Ch+var_C]
mov	[esp+2Ch+arg_4], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+28h+arg_4]
mov	edx, [edi]
push	eax
add	esi, 18h
push	esi
lea	eax, [esp+30h+var_14]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
test	ebx, ebx
jz	short loc_6B75A2
mov	ecx, ebx
call	sub_64B3B0

loc_6B75A2:
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6B74A0 endp

align 10h



sub_6B75B0 proc	near
cmp	byte ptr [ecx+24h], 0
mov	eax, offset aTrue ; "true"
jnz	short locret_6B75C0
mov	eax, offset aFalse ; "false"

locret_6B75C0:
retn	4
sub_6B75B0 endp

align 10h



sub_6B75D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
push	eax
call	sub_651D80
mov	[esi+34h], al
pop	esi
retn	8
sub_6B75D0 endp

align 10h



sub_6B75F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	cl, [ecx+34h]
mov	byte ptr [eax],	2
mov	[eax+4], cl
retn	4
sub_6B75F0 endp




sub_6B7600 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, [esp+18h+arg_0]
push	0Ah
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B762A
push	0
push	0
push	offset aBoolean	; "Boolean"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 14h
retn

loc_6B762A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B7636
lea	ecx, [eax-10h]
jmp	short loc_6B7638

loc_6B7636:
xor	ecx, ecx

loc_6B7638:
mov	eax, [ecx]
mov	eax, [eax+10h]
push	edi
mov	edi, [esi+18h]
lea	edx, [esp+1Ch+var_10]
push	edx
call	eax
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+28h+var_14]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
pop	edi
jb	short loc_6B7669
mov	ecx, esi
call	sub_652060

loc_6B7669:
mov	byte ptr [esi],	5
mov	edx, [esp+18h+var_14]
mov	[esi+4], edx
mov	eax, [esp+18h+var_14]
inc	dword ptr [eax+8]
mov	eax, [esp+18h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B7690
call	sub_650DF0

loc_6B7690:
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	esi
add	esp, 14h
retn
sub_6B7600 endp

align 10h



sub_6B76A0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
push	0Ah
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B76CA
push	0
push	0
push	offset aBoolean	; "Boolean"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 10h
retn

loc_6B76CA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B76D6
lea	ecx, [eax-10h]
jmp	short loc_6B76D8

loc_6B76D6:
xor	ecx, ecx

loc_6B76D8:
mov	eax, [esi+18h]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	ebx
push	eax
lea	eax, [esp+1Ch+var_10]
push	eax
call	edx
mov	ecx, eax
call	sub_651D80
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
lea	ecx, [esp+18h+var_10]
mov	byte ptr [esi],	2
mov	[esi+4], bl
call	sub_652830
pop	ebx
pop	esi
add	esp, 10h
retn
sub_6B76A0 endp

align 10h



sub_6B7720 proc	near

var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 24h
push	ebx
push	esi
mov	esi, [esp+2Ch+arg_0]
xor	ebx, ebx
mov	[esp+2Ch+var_24], ebx
cmp	[esi+8], ebx
jz	loc_6B77CD
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 0Ah
jnz	loc_6B77CD
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6B77CD
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6B7766
lea	edi, [eax-10h]
jmp	short loc_6B7768

loc_6B7766:
xor	edi, edi

loc_6B7768:
cmp	[esi+1Ch], ebx
jle	short loc_6B7778
push	0
mov	ecx, esi
call	sub_651EC0
jmp	short loc_6B7786

loc_6B7778:
mov	ebx, 1
mov	[esp+30h+var_10], 0
lea	eax, [esp+30h+var_10]

loc_6B7786:
push	eax
lea	ecx, [esp+34h+var_20]
call	sub_652330
test	bl, 1
jz	short loc_6B779E
lea	ecx, [esp+30h+var_10]
call	sub_652830

loc_6B779E:
mov	eax, [edi]
mov	edx, [esi+18h]
mov	eax, [eax+0Ch]
lea	ecx, [esp+30h+var_20]
push	ecx
push	edx
mov	ecx, edi
call	eax
lea	ecx, [esp+30h+var_20]
push	ecx
mov	ecx, [esi+4]
call	sub_652520
lea	ecx, [esp+30h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn

loc_6B77CD:
cmp	[esi+1Ch], ebx
jz	short loc_6B77E8
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	bl, al

loc_6B77E8:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
add	esp, 24h
retn
sub_6B7720 endp

align 10h



sub_6B7800 proc	near
mov	eax, 0Ah
retn
sub_6B7800 endp

align 10h



sub_6B7810 proc	near
add	ecx, 28h
jmp	sub_665AD0
sub_6B7810 endp

align 10h



sub_6B7820 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
mov	dword ptr [esi], offset	off_14394E4
mov	dword ptr [esi+10h], offset off_1439490
mov	dword ptr [ecx], offset	off_14395C4
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6B785A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6B785A:
mov	eax, esi
pop	esi
retn	4
sub_6B7820 endp




sub_6B7860 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6B7820
sub_6B7860 endp

align 10h



sub_6B7870 proc	near
sub	ecx, 38h
jmp	sub_6B7820
sub_6B7870 endp

align 10h



sub_6B7880 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
lea	ebx, [edi+78h]
push	0
push	38h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6B78DB
push	edi
mov	ecx, esi
call	sub_663BE0
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_143955C
mov	dword ptr [edi], offset	off_1439508
mov	byte ptr [esi+34h], 0
mov	ecx, [ebx]
push	5
call	sub_66FB00
mov	edx, [edi]
push	eax
mov	eax, [edx+34h]
push	ebx
mov	ecx, edi
call	eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_6B78DB:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6B7880 endp

align 10h



sub_6B78F0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+54h]
test	eax, eax
jz	short loc_6B791B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+54h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6B791B:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6B78F0 endp

align 10h



sub_6B7930 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
push	eax
xor	ebx, ebx
push	ebp
mov	ecx, edi
mov	dword ptr [esi], offset	off_143955C
mov	dword ptr [edi], offset	off_1439508
mov	[esi+34h], bl
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+38h]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_14394E4
mov	dword ptr [edi], offset	off_1439490
mov	dword ptr [ecx], offset	off_14395C4
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B7930 endp

align 10h



sub_6B79B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6B7930
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_1439474
push	edi
lea	ecx, [esi+38h]
push	esi
mov	dword ptr [esi], offset	off_14394E4
mov	dword ptr [esi+10h], offset off_1439490
mov	dword ptr [ecx], offset	off_14395C4
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6B79B0 endp

align 10h



sub_6B7A00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6B7A35 ; default
jmp	ds:off_6B7A38[eax*4] ; switch jump

loc_6B7A10:		; jumptable 006B7A09 case 0
call	sub_6BDC00
retn	4

loc_6B7A18:		; jumptable 006B7A09 case 1
call	sub_6B53B0
retn	4

loc_6B7A20:		; jumptable 006B7A09 case 2
call	sub_6B7C20
retn	4

loc_6B7A28:		; jumptable 006B7A09 case 3
call	sub_6B9440
retn	4

loc_6B7A30:		; jumptable 006B7A09 case 4
call	sub_6B8D50

locret_6B7A35:		; default
retn	4
sub_6B7A00 endp

off_6B7A38 dd offset loc_6B7A10	; jump table for switch	statement
dd offset loc_6B7A18
dd offset loc_6B7A20
dd offset loc_6B7A28
dd offset loc_6B7A30
align 10h



sub_6B7A50 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B7A9C
push	offset sub_6B7720
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_1439580
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_6B7A9E

loc_6B7A9C:
xor	edi, edi

loc_6B7A9E:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	58h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B7AEB
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6B79B0
mov	ebx, eax
test	ebx, ebx
jz	short loc_6B7AEB
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6B7AEB:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 5
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6B7B19
call	sub_64B3B0

loc_6B7B19:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 1Ch
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6B7B65
mov	ecx, ebx
call	sub_64B3B0

loc_6B7B65:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6B7A50 endp

align 10h



sub_6B7B70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi],	5
jb	short loc_6B7B8B
call	sub_652060
mov	eax, [esp+4+arg_0]
mov	[esi+4], eax
mov	byte ptr [esi],	4
pop	esi
retn	4

loc_6B7B8B:
mov	ecx, [esp+4+arg_0]
mov	[esi+4], ecx
mov	byte ptr [esi],	4
pop	esi
retn	4
sub_6B7B70 endp

align 10h



sub_6B7BA0 proc	near
mov	eax, 15h
retn
sub_6B7BA0 endp

align 10h



sub_6B7BB0 proc	near
sub	ecx, 10h
jmp	sub_6B7BC0
sub_6B7BB0 endp

align 10h



sub_6B7BC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
mov	dword ptr [esi], offset	off_14397AC
mov	dword ptr [esi+10h], offset off_1439628
mov	dword ptr [ecx], offset	off_1439620
call	sub_665A40
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6B7BF8
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B7BF8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B7BF8:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6B7C14
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B7C14:
mov	eax, esi
pop	esi
retn	4
sub_6B7BC0 endp

align 10h



sub_6B7C20 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+3Ch]
call	sub_67BFB0
lea	ecx, [edi+48h]
call	sub_67BFB0
mov	eax, [edi+54h]
test	eax, eax
jz	short loc_6B7C82
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B7C80
lea	ebx, [ebx+0]

loc_6B7C50:
mov	eax, [edi+54h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B7C7B
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6B7C7B
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6B7C7B:
inc	esi
cmp	esi, ebx
jb	short loc_6B7C50

loc_6B7C80:
pop	esi
pop	ebx

loc_6B7C82:
pop	edi
retn
sub_6B7C20 endp

align 10h



sub_6B7C90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
test	ecx, ecx
jz	short loc_6B7CC5
push	edi
call	sub_64A4A0
mov	edi, eax
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6B7CBD
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B7CBD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B7CBD:
mov	[esi+34h], edi
pop	edi
pop	esi
retn	4

loc_6B7CC5:
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6B7CDF
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B7CDF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B7CDF:
mov	dword ptr [esi+34h], 0
pop	esi
retn	4
sub_6B7C90 endp

align 10h



sub_6B7CF0 proc	near

var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 34h
push	esi
mov	esi, [esp+38h+arg_0]
push	15h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B7D1A
push	0
push	0
push	offset aColor_70 ; "Color"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 34h
retn

loc_6B7D1A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6B7F40
add	eax, 0FFFFFFF0h
jz	loc_6B7F40
push	ebp
push	edi
lea	ecx, [esp+40h+var_34]
push	ecx
lea	ecx, [eax+34h]
call	sub_6831C0
mov	ebp, [esp+40h+var_34]
mov	edi, 1
test	ebp, ebp
jz	short loc_6B7D58
add	[ebp+4], edi
mov	ebp, [esp+40h+var_34]
mov	ecx, ebp
call	sub_64A400

loc_6B7D58:
cmp	[esi+1Ch], edi
jl	loc_6B7F45
test	ebp, ebp
jz	loc_6B7F3E
mov	edx, [esi+18h]
push	ebx
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	ebx, eax
test	ebx, ebx
jz	loc_6B7F36
lea	esi, [ebp+24h]
mov	ecx, 8
lea	edi, [esp+44h+var_20]
rep movsd
mov	edi, [esp+44h+arg_0]
mov	esi, [edi+18h]
lea	eax, [esp+44h+var_30]
push	eax
push	offset unk_1439694
add	esi, 78h
push	esi
mov	ecx, ebx
mov	[esp+50h+var_30], 0
call	sub_64AEF0
test	al, al
jz	short loc_6B7DDA
mov	ecx, [edi+18h]
push	ecx
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
fdiv	ds:dbl_15FCBF8
fstp	[esp+44h+var_10]

loc_6B7DDA:
lea	edx, [esp+44h+var_30]
push	edx
push	offset unk_1439690
push	esi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6B7E0F
mov	eax, [edi+18h]
push	eax
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
fdiv	ds:dbl_15FCBF8
fstp	[esp+44h+var_18]

loc_6B7E0F:
lea	ecx, [esp+44h+var_30]
push	ecx
push	offset unk_143968C
push	esi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6B7E44
mov	edx, [edi+18h]
push	edx
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
fdiv	ds:dbl_15FCBF8
fstp	[esp+44h+var_20]

loc_6B7E44:
lea	eax, [esp+44h+var_30]
push	eax
push	offset unk_1439688
push	esi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6B7E79
mov	ecx, [edi+18h]
push	ecx
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
fdiv	ds:dbl_15FCBF8
fstp	[esp+44h+var_8]

loc_6B7E79:
lea	edx, [esp+44h+var_30]
push	edx
push	offset unk_1439684
push	esi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6B7EA0
mov	eax, [edi+18h]
push	eax
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_C]

loc_6B7EA0:
lea	ecx, [esp+44h+var_30]
push	ecx
push	offset unk_1439680
push	esi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6B7EC7
mov	edx, [edi+18h]
push	edx
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_14]

loc_6B7EC7:
lea	eax, [esp+44h+var_30]
push	eax
push	offset Mode	; "rb"
push	esi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6B7EEE
mov	ecx, [edi+18h]
push	ecx
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_1C]

loc_6B7EEE:
lea	edx, [esp+44h+var_30]
push	edx
push	offset unk_143967C
push	esi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6B7F15
mov	eax, [edi+18h]
push	eax
lea	ecx, [esp+48h+var_30]
call	sub_653400
fstp	[esp+44h+var_4]

loc_6B7F15:
lea	ecx, [esp+44h+var_20]
push	ecx
mov	ecx, ebp
call	sub_64A770
mov	edx, [ebp+0]
mov	eax, [edx+20h]
push	0
mov	ecx, ebp
call	eax
lea	ecx, [esp+44h+var_30]
call	sub_652830

loc_6B7F36:
mov	ecx, ebp
call	sub_64A400
pop	ebx

loc_6B7F3E:
pop	edi
pop	ebp

loc_6B7F40:
pop	esi
add	esp, 34h
retn

loc_6B7F45:
test	ebp, ebp
jz	short loc_6B7F3E
mov	ecx, ebp
call	sub_64A400
pop	edi
pop	ebp
pop	esi
add	esp, 34h
retn
sub_6B7CF0 endp

align 10h



sub_6B7F60 proc	near

var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 2Ch
push	esi
mov	esi, [esp+30h+arg_0]
push	15h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6B7F8A
push	0
push	0
push	offset aColor_70 ; "Color"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 2Ch
retn

loc_6B7F8A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6B809F
add	eax, 0FFFFFFF0h
jz	loc_6B809F
push	ebx
push	edi
lea	ecx, [esp+38h+var_2C]
push	ecx
lea	ecx, [eax+34h]
call	sub_6831C0
mov	ebx, [esp+38h+var_2C]
mov	edi, 1
test	ebx, ebx
jz	short loc_6B7FC8
add	[ebx+4], edi
mov	ebx, [esp+38h+var_2C]
mov	ecx, ebx
call	sub_64A400

loc_6B7FC8:
cmp	[esi+1Ch], edi
jl	loc_6B808C
test	ebx, ebx
jz	loc_6B809D
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+38h+var_2C]
movzx	eax, word ptr [esp+38h+var_2C]
or	eax, 0C00h
mov	dword ptr [esp+38h+var_28], eax
lea	esi, [ebx+24h]
mov	ecx, 8
fldcw	word ptr [esp+38h+var_28]
lea	edi, [esp+38h+var_20]
rep movsd
fistp	[esp+38h+var_28]
fldcw	word ptr [esp+38h+var_2C]
mov	eax, dword ptr [esp+38h+var_28]
mov	ecx, eax
shr	ecx, 10h
and	ecx, 0FFh
fldz
mov	dword ptr [esp+38h+var_28], ecx
mov	edx, eax
fst	[esp+38h+var_10]
shr	edx, 8
fst	[esp+38h+var_18]
and	edx, 0FFh
fstp	[esp+38h+var_20]
movzx	eax, al
fild	dword ptr [esp+38h+var_28]
mov	dword ptr [esp+38h+var_28], edx
lea	ecx, [esp+38h+var_20]
push	ecx
fstp	[esp+3Ch+var_1C]
mov	ecx, ebx
fild	dword ptr [esp+3Ch+var_28]
mov	dword ptr [esp+3Ch+var_28], eax
fstp	[esp+3Ch+var_14]
fild	dword ptr [esp+3Ch+var_28]
fstp	[esp+3Ch+var_C]
call	sub_64A770
mov	edx, [ebx]
mov	eax, [edx+20h]
push	0
mov	ecx, ebx
call	eax
pop	edi
mov	ecx, ebx
pop	ebx
pop	esi
add	esp, 2Ch
jmp	sub_64A400

loc_6B808C:
test	ebx, ebx
jz	short loc_6B809D
pop	edi
mov	ecx, ebx
pop	ebx
pop	esi
add	esp, 2Ch
jmp	sub_64A400

loc_6B809D:
pop	edi
pop	ebx

loc_6B809F:
pop	esi
add	esp, 2Ch
retn
sub_6B7F60 endp

align 10h



sub_6B80B0 proc	near

var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 2Ch
push	ebp
mov	ebp, [esp+30h+arg_0]
push	15h
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_6B80DA
push	0
push	0
push	offset aColor_70 ; "Color"
mov	ecx, ebp
call	sub_651C60

loc_6B80D5:
pop	ebp
add	esp, 2Ch
retn

loc_6B80DA:
mov	eax, [ebp+8]
test	eax, eax
jz	short loc_6B80D5
add	eax, 0FFFFFFF0h
jz	short loc_6B80D5
lea	ecx, [esp+30h+var_2C]
push	ecx
lea	ecx, [eax+34h]
call	sub_6831C0
mov	eax, [esp+30h+var_2C]
test	eax, eax
jz	short loc_6B80D5
inc	dword ptr [eax+4]
push	ebx
mov	ebx, [esp+34h+var_2C]
push	esi
push	edi
mov	ecx, ebx
call	sub_64A400
fnstcw	word ptr [esp+3Ch+var_2C]
movzx	eax, word ptr [esp+3Ch+var_2C]
or	eax, 0C00h
mov	dword ptr [esp+3Ch+var_28], eax
lea	esi, [ebx+24h]
mov	ecx, 8
lea	edi, [esp+3Ch+var_20]
rep movsd
fld	[esp+3Ch+var_1C]
fldcw	word ptr [esp+3Ch+var_28]
fistp	[esp+3Ch+var_28]
mov	esi, dword ptr [esp+3Ch+var_28]
fldcw	word ptr [esp+3Ch+var_2C]
mov	edi, [ebp+4]
and	esi, 0FFh
shl	esi, 8
fld	[esp+3Ch+var_14]
fnstcw	word ptr [esp+3Ch+var_2C]
movzx	eax, word ptr [esp+3Ch+var_2C]
or	eax, 0C00h
mov	dword ptr [esp+3Ch+var_28], eax
fldcw	word ptr [esp+3Ch+var_28]
fistp	[esp+3Ch+var_28]
mov	edx, dword ptr [esp+3Ch+var_28]
and	edx, 0FFh
or	esi, edx
fldcw	word ptr [esp+3Ch+var_2C]
shl	esi, 8
fld	[esp+3Ch+var_C]
fnstcw	word ptr [esp+3Ch+var_2C]
movzx	eax, word ptr [esp+3Ch+var_2C]
or	eax, 0C00h
mov	dword ptr [esp+3Ch+var_28], eax
fldcw	word ptr [esp+3Ch+var_28]
fistp	[esp+3Ch+var_28]
mov	eax, dword ptr [esp+3Ch+var_28]
and	eax, 0FFh
or	esi, eax
cmp	byte ptr [edi],	5
fldcw	word ptr [esp+3Ch+var_2C]
jb	short loc_6B81B6
mov	ecx, edi
call	sub_652060

loc_6B81B6:
mov	[edi+4], esi
mov	byte ptr [edi],	4
pop	edi
pop	esi
mov	ecx, ebx
pop	ebx
pop	ebp
add	esp, 2Ch
jmp	sub_64A400
sub_6B80B0 endp

align 10h



sub_6B81D0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+54h]
test	eax, eax
jz	short loc_6B81FB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+54h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6B81FB:
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6B8215
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B8215
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B8215:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6B81D0 endp

align 10h



sub_6B8220 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	edi
mov	esi, ecx
call	sub_663BE0
mov	ecx, [esp+0Ch+arg_4]
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_14396EC
mov	dword ptr [ebx], offset	off_1439698
test	ecx, ecx
jz	short loc_6B824D
call	sub_64A4A0
jmp	short loc_6B824F

loc_6B824D:
xor	eax, eax

loc_6B824F:
mov	[esi+34h], eax
mov	ecx, [edi+78h]
add	edi, 78h
push	0Bh
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6B8220 endp




sub_6B8270 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	qword ptr -84h
var_7C=	qword ptr -7Ch
var_74=	qword ptr -74h
var_6C=	qword ptr -6Ch
var_64=	qword ptr -64h
var_5C=	qword ptr -5Ch
var_54=	qword ptr -54h
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	qword ptr -34h
var_2C=	qword ptr -2Ch
var_24=	qword ptr -24h
var_1C=	qword ptr -1Ch
var_14=	qword ptr -14h
var_C= qword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 0A8h
push	ebx
mov	ebx, [esp+0ACh+arg_0]
push	15h
mov	ecx, ebx
call	sub_651C40
test	al, al
jnz	short loc_6B82A3
push	0
push	0
push	offset aColor_70 ; "Color"
mov	ecx, ebx
call	sub_651C60

loc_6B829B:
pop	ebx
add	esp, 0A8h
retn

loc_6B82A3:
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_6B829B
add	eax, 0FFFFFFF0h
jz	short loc_6B829B
lea	ecx, [esp+0ACh+var_A4]
push	ecx
lea	ecx, [eax+34h]
call	sub_6831C0
mov	eax, [esp+0ACh+var_A4]
test	eax, eax
jz	short loc_6B829B
inc	dword ptr [eax+4]
push	ebp
push	esi
mov	esi, [esp+0B4h+var_A4]
push	edi
mov	ecx, esi
call	sub_64A400
mov	edx, [ebx+18h]
mov	eax, [edx+78h]
add	esi, 24h
mov	ecx, 8
lea	edi, [esp+0B8h+var_A0]
rep movsd
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6B830D
mov	ecx, [ebx+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	ebp, eax
jmp	short loc_6B830F

loc_6B830D:
xor	ebp, ebp

loc_6B830F:
fld	[esp+0B8h+var_90]
mov	esi, [ebx+18h]
fmul	ds:dbl_15FCBF8
lea	edx, [esp+0B8h+var_24+4]
push	edx
push	offset unk_1439694
fstp	[esp+0C0h+var_A8]
add	esi, 78h
fld	[esp+0C0h+var_A8]
lea	edi, [ebp+10h]
mov	bl, 3
fstp	[esp+0C0h+var_1C]
push	esi
mov	ecx, edi
mov	byte ptr [esp+0C4h+var_24+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_24+4]
call	sub_652830
fld	[esp+0B8h+var_98]
fmul	ds:dbl_15FCBF8
lea	eax, [esp+0B8h+var_14+4]
push	eax
push	offset unk_1439690
fstp	[esp+0C0h+var_A8]
push	esi
fld	[esp+0C4h+var_A8]
mov	ecx, edi
fstp	[esp+0C4h+var_C]
mov	byte ptr [esp+0C4h+var_14+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_14+4]
call	sub_652830
fld	[esp+0B8h+var_A0]
fmul	ds:dbl_15FCBF8
lea	ecx, [esp+0B8h+var_64+4]
push	ecx
push	offset unk_143968C
fstp	[esp+0C0h+var_A8]
push	esi
fld	[esp+0C4h+var_A8]
mov	ecx, edi
fstp	[esp+0C4h+var_5C]
mov	byte ptr [esp+0C4h+var_64+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_64+4]
call	sub_652830
fld	[esp+0B8h+var_88]
fmul	ds:dbl_15FCBF8
lea	edx, [esp+0B8h+var_84+4]
push	edx
push	offset unk_1439688
fstp	[esp+0C0h+var_A8]
push	esi
fld	[esp+0C4h+var_A8]
mov	ecx, edi
fstp	[esp+0C4h+var_7C]
mov	byte ptr [esp+0C4h+var_84+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_84+4]
call	sub_652830
fld	[esp+0B8h+var_8C]
lea	eax, [esp+0B8h+var_44+4]
fstp	[esp+0B8h+var_3C]
push	eax
push	offset unk_1439684
push	esi
mov	ecx, edi
mov	byte ptr [esp+0C4h+var_44+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_44+4]
call	sub_652830
fld	[esp+0B8h+var_94]
lea	ecx, [esp+0B8h+var_74+4]
fstp	[esp+0B8h+var_6C]
push	ecx
push	offset unk_1439680
push	esi
mov	ecx, edi
mov	byte ptr [esp+0C4h+var_74+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_74+4]
call	sub_652830
fld	[esp+0B8h+var_9C]
lea	edx, [esp+0B8h+var_54+4]
fstp	[esp+0B8h+var_4C]
push	edx
push	offset Mode	; "rb"
push	esi
mov	ecx, edi
mov	byte ptr [esp+0C4h+var_54+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_54+4]
call	sub_652830
fld	dword ptr [esp+0B8h+var_84]
lea	eax, [esp+0B8h+var_34+4]
fstp	[esp+0B8h+var_2C]
push	eax
push	offset unk_143967C
push	esi
mov	ecx, edi
mov	byte ptr [esp+0C4h+var_34+4], bl
call	sub_669260
lea	ecx, [esp+0B8h+var_34+4]
call	sub_652830
mov	ecx, [esp+0B8h+arg_0]
mov	ecx, [ecx+4]
push	ebp
call	sub_652E40
test	ebp, ebp
jz	short loc_6B84CC
mov	ecx, ebp
call	sub_64B3B0

loc_6B84CC:
mov	ecx, [esp+0B8h+var_A4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A8h
jmp	sub_64A400
sub_6B8270 endp

align 10h



sub_6B84E0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
xor	ebx, ebx
cmp	dword ptr [esi+1Ch], 1
push	edi
jl	short loc_6B8502
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, [esi+18h]
push	eax
call	sub_66D5E0
mov	ebx, eax

loc_6B8502:
cmp	dword ptr [esi+8], 0
jz	short loc_6B8547
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 15h
jnz	short loc_6B8547
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6B853B
lea	ecx, [eax-10h]
test	ecx, ecx
jz	short loc_6B8531
mov	eax, [ecx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ecx+8], eax

loc_6B8531:
push	ebx
mov	edi, ecx
call	sub_6B7C90
jmp	short loc_6B8574

loc_6B853B:
xor	ecx, ecx
push	ebx
mov	edi, ecx
call	sub_6B7C90
jmp	short loc_6B8574

loc_6B8547:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
test	eax, eax
jz	short loc_6B8570
mov	ecx, [esi+18h]
push	ebx
push	ecx
mov	ecx, eax
call	sub_6B8220
jmp	short loc_6B8572

loc_6B8570:
xor	eax, eax

loc_6B8572:
mov	edi, eax

loc_6B8574:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6B858B
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_64B3B0

loc_6B858B:
pop	edi
pop	esi
pop	ebx
retn
sub_6B84E0 endp

align 10h



sub_6B8590 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
lea	edi, [ebx+78h]
push	0
push	38h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6B85EC
push	ebx
mov	ecx, esi
call	sub_663BE0
mov	dword ptr [esi], offset	off_14396EC
lea	ebx, [esi+10h]
mov	dword ptr [ebx], offset	off_1439698
mov	dword ptr [esi+34h], 0
mov	ecx, [edi]
push	0Bh
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_6B85EC:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6B8590 endp

align 10h



sub_6B8600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
push	eax
mov	dword ptr [esi], offset	off_14396EC
mov	dword ptr [edi], offset	off_1439698
xor	ebx, ebx
push	ebp
mov	ecx, edi
mov	[esi+34h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+38h]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_14397AC
mov	dword ptr [edi], offset	off_1439628
mov	dword ptr [ecx], offset	off_1439620
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B8600 endp

align 10h



sub_6B8680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6B8600
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_14395F8
push	edi
lea	ecx, [esi+38h]
push	esi
mov	dword ptr [esi], offset	off_14397AC
mov	dword ptr [esi+10h], offset off_1439628
mov	dword ptr [ecx], offset	off_1439620
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6B8680 endp

align 10h



sub_6B86D0 proc	near

arg_0= byte ptr	 4

sub	ecx, 38h
jmp	sub_6B7BC0
sub_6B86D0 endp

align 10h



sub_6B86E0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B872C
push	offset sub_6B84E0
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_1439768
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_6B872E

loc_6B872C:
xor	edi, edi

loc_6B872E:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	58h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6B877B
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6B8680
mov	ebx, eax
test	ebx, ebx
jz	short loc_6B877B
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6B877B:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 0Bh
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6B87A9
call	sub_64B3B0

loc_6B87A9:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 34h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6B87F5
mov	ecx, ebx
call	sub_64B3B0

loc_6B87F5:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6B86E0 endp

align 10h



sub_6B8800 proc	near
push	esi
mov	esi, [ecx+324h]
test	esi, esi
jnz	short loc_6B880E
lea	esi, [ecx+28h]

loc_6B880E:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6B8824
mov	ecx, esi
call	sub_6A9C60

loc_6B8824:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	al, [ecx+edx]
inc	ecx
mov	[esi+2Ch], ecx
pop	esi
retn
sub_6B8800 endp

align 10h



sub_6B8840 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
mov	esi, [ebx+324h]
push	edi
test	esi, esi
jnz	short loc_6B8858
lea	esi, [ebx+28h]

loc_6B8858:
mov	[esp+18h+var_4], 4
mov	ebp, 2

loc_6B8865:
mov	edi, [ebx+324h]
test	edi, edi
jnz	short loc_6B8872
lea	edi, [ebx+28h]

loc_6B8872:
mov	eax, [edi+30h]
sub	eax, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	eax, ebp
jge	short loc_6B8888
push	ebp
mov	ecx, edi
call	sub_6A9B70

loc_6B8888:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[edi+2Ch], eax
test	cx, cx
jz	loc_6B89FB
push	ebp
mov	ecx, esi
call	sub_6AA450
push	1
mov	ecx, esi
call	sub_6AA450
push	1
mov	ecx, esi
call	sub_6AA450
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	[esp+1Ch+var_5]
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	[esp+1Ch+var_6]
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	bl
call	sub_6AA450
test	eax, eax
jz	short loc_6B8924
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 4
jge	short loc_6B8920
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6B8920:
add	dword ptr [esi+2Ch], 4

loc_6B8924:
test	bl, bl
jz	short loc_6B8944
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_6B8940
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6B8940:
add	dword ptr [esi+2Ch], 4

loc_6B8944:
cmp	[esp+18h+var_6], 0
jz	short loc_6B8964
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, ebp
jge	short loc_6B8961
push	ebp
mov	ecx, esi
call	sub_6A9B70

loc_6B8961:
add	[esi+2Ch], ebp

loc_6B8964:
cmp	[esp+18h+var_5], 0
jz	loc_6B89F7
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 1
jge	short loc_6B8985
mov	ecx, esi
call	sub_6A9C60

loc_6B8985:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
movzx	eax, cl
test	eax, eax
jle	short loc_6B89F7
mov	edi, eax
jmp	short loc_6B89A0
align 10h

loc_6B89A0:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 4
jge	short loc_6B89B8
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6B89B8:
add	dword ptr [esi+2Ch], 4
mov	eax, [esi+2Ch]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, ebp
mov	byte ptr [esi+15h], 0
jge	short loc_6B89D4
push	ebp
mov	ecx, esi
call	sub_6A9B70

loc_6B89D4:
add	[esi+2Ch], ebp
mov	eax, [esi+2Ch]
mov	edx, [esi+30h]
sub	edx, eax
cmp	edx, ebp
mov	byte ptr [esi+15h], 0
jge	short loc_6B89EF
push	ebp
mov	ecx, esi
call	sub_6A9B70

loc_6B89EF:
add	[esi+2Ch], ebp
sub	edi, 1
jnz	short loc_6B89A0

loc_6B89F7:
mov	ebx, [esp+18h+arg_0]

loc_6B89FB:
sub	[esp+18h+var_4], 1
jnz	loc_6B8865
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_6B8840 endp

align 10h



sub_6B8A10 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0BCh]
xor	ecx, ecx
test	eax, eax
setnz	cl
xor	edx, edx
push	edi
mov	edi, [esp+0Ch+arg_0]
test	edi, edi
setnz	dl
cmp	edx, ecx
setnz	bl
test	edi, edi
jnz	short loc_6B8A55
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	ecx, 0FFFEh
and	[esi+76h], cx
mov	[esi+0BCh], edi
jmp	short loc_6B8A9D

loc_6B8A55:
test	eax, eax
jnz	short loc_6B8A7C
mov	ecx, dword_1855FC0
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	[esp+10h+arg_0], 109h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	10h
push	esi
call	edx
mov	[esi+0BCh], eax

loc_6B8A7C:
mov	ecx, [edi]
mov	eax, [esi+0BCh]
mov	[eax], ecx
mov	edx, [edi+4]
mov	[eax+4], edx
mov	ecx, [edi+8]
mov	[eax+8], ecx
mov	edx, [edi+0Ch]
mov	[eax+0Ch], edx
or	word ptr [esi+76h], 1

loc_6B8A9D:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
or	dword ptr [eax+2474h], 400h
add	eax, 2474h
test	bl, bl
jz	short loc_6B8AC2
mov	eax, [esi]
mov	edx, [eax+50h]
mov	ecx, esi
call	edx

loc_6B8AC2:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6B8A10 endp

align 10h



sub_6B8AD0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
add	ebx, ebx
mov	edi, ecx
mov	eax, [edi+0C0h]
add	ebx, ebx
mov	esi, [ebx+eax]
test	esi, esi
jz	short loc_6B8B3D
mov	cl, [esi+76h]
shr	cl, 7
and	cl, 1
movzx	edx, cl
neg	edx
sbb	edx, edx
test	esi, edx
jz	short loc_6B8B23
mov	eax, [esi]
mov	edx, [eax+8Ch]
mov	ecx, esi
call	edx
mov	ecx, 100h
or	[esi+76h], cx
test	al, al
jz	short loc_6B8B23
mov	edx, [esi]
mov	eax, [edx+88h]
mov	ecx, esi
call	eax

loc_6B8B23:
mov	esi, [edi+0C0h]
mov	ecx, [esi+ebx]
add	esi, ebx
test	ecx, ecx
jz	short loc_6B8B37
call	sub_64A400

loc_6B8B37:
mov	dword ptr [esi], 0

loc_6B8B3D:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6B8AD0 endp

align 10h



sub_6B8B50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6B8B80
mov	eax, [edi]
test	eax, eax
jz	short loc_6B8B75
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6B8B75:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6B8B80:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6B8BB3
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6B8BB3:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 102h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6B8B50 endp

align 10h



sub_6B8BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_6B8BED
add	eax, 0FFFFFFECh
jmp	short loc_6B8BEF

loc_6B8BED:
xor	eax, eax

loc_6B8BEF:
mov	eax, [eax+10h]
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short locret_6B8C0C
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	eax
push	21h
call	edx

locret_6B8C0C:
retn
sub_6B8BE0 endp

align 10h



sub_6B8C10 proc	near
mov	eax, 0Ch
retn
sub_6B8C10 endp

align 10h



sub_6B8C20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6B8C43
cmp	[esi], ecx
jmp	short loc_6B8C58

loc_6B8C43:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6B8C4E
call	sub_651580

loc_6B8C4E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6B8C58:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6B8CA7
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6B8C76
cmp	[esi], ecx
jmp	short loc_6B8C8B

loc_6B8C76:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6B8C81
call	sub_651580

loc_6B8C81:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6B8C8B:
setz	al
test	al, al
jnz	short loc_6B8CA7
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6B8CA7:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+28h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B8C20 endp

align 10h



sub_6B8CD0 proc	near
mov	al, 1
retn
sub_6B8CD0 endp

align 10h



sub_6B8CE0 proc	near
sub	ecx, 10h
jmp	sub_6B8CF0
sub_6B8CE0 endp

align 10h



sub_6B8CF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
mov	dword ptr [esi], offset	off_1439904
mov	dword ptr [esi+10h], offset off_14398B0
mov	dword ptr [ecx], offset	off_1439824
call	sub_665A40
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6B8D28
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B8D28
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B8D28:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6B8D44
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6B8D44:
mov	eax, esi
pop	esi
retn	4
sub_6B8CF0 endp

align 10h



sub_6B8D50 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+3Ch]
call	sub_67C070
lea	ecx, [edi+48h]
call	sub_67C070
mov	eax, [edi+54h]
test	eax, eax
jz	short loc_6B8DCD
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B8DCB
lea	ebx, [ebx+0]

loc_6B8D80:
mov	eax, [edi+54h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B8DC6
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6B8DC6
test	eax, 0FFFFFFFh
jbe	short loc_6B8DB1
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6B8DBD

loc_6B8DB1:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6B8DBD:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6B8DC6:
inc	esi
cmp	esi, ebx
jb	short loc_6B8D80

loc_6B8DCB:
pop	esi
pop	ebx

loc_6B8DCD:
pop	edi
retn
sub_6B8D50 endp

align 10h



sub_6B8DD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+8]
xor	esi, esi
test	eax, eax
jz	short loc_6B8DF4
cmp	[eax+4], esi
jz	short loc_6B8E0C
mov	esi, [eax+4]
test	esi, esi
jz	short loc_6B8DF4
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax

loc_6B8DF4:
mov	edi, [esp+8+arg_0]
mov	[edi], esi
test	esi, esi
jz	short loc_6B8E05
mov	ecx, esi
call	sub_64A400

loc_6B8E05:
mov	eax, edi
pop	edi
pop	esi
retn	4

loc_6B8E0C:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B8E1F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B8E1F:
mov	[edi+8], esi
jmp	short loc_6B8DF4
sub_6B8DD0 endp

align 10h



sub_6B8E30 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
xor	esi, esi
test	eax, eax
jz	short loc_6B8E53
cmp	[eax+4], esi
jz	short loc_6B8E6B
mov	esi, [eax+4]
test	esi, esi
jz	short loc_6B8E53
mov	eax, 1
add	[esi+4], eax
add	[esi+4], eax

loc_6B8E53:
mov	edi, [esp+8+arg_0]
mov	[edi], esi
test	esi, esi
jz	short loc_6B8E64
mov	ecx, esi
call	sub_64A400

loc_6B8E64:
mov	eax, edi
pop	edi
pop	esi
retn	4

loc_6B8E6B:
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B8E7E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B8E7E:
mov	[edi], esi
jmp	short loc_6B8E53
sub_6B8E30 endp

align 10h



sub_6B8E90 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	word ptr -8Ch
var_8A=	byte ptr -8Ah
var_89=	byte ptr -89h
var_88=	word ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	word ptr -7Ch
var_7A=	byte ptr -7Ah
var_79=	byte ptr -79h
var_78=	byte ptr -78h
var_77=	byte ptr -77h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	word ptr -68h
var_66=	byte ptr -66h
var_65=	byte ptr -65h
var_64=	byte ptr -64h
var_63=	byte ptr -63h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	word ptr -58h
var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	word ptr -4Ch
var_48=	byte ptr -48h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_43=	byte ptr -43h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	word ptr -30h
var_2C=	byte ptr -2Ch
var_28=	word ptr -28h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	word ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= byte ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0A0h
push	ebx
push	ebp
push	esi
mov	esi, [esp+0ACh+arg_4]
push	edi
lea	eax, [esp+0B0h+var_9C]
push	eax
mov	ecx, esi
call	sub_6B8DD0
lea	ecx, [esp+0B0h+var_98]
push	ecx
mov	ecx, esi
call	sub_6B8E30
mov	al, [esi+20h]
mov	edx, [esi+0Ch]
xor	edx, [esi+10h]
mov	esi, [esp+0B0h+var_9C]
mov	edi, [esp+0B0h+var_98]
xor	ebx, ebx
shr	al, 2
and	al, 1
mov	[esp+0B0h+var_74], edx
mov	byte ptr [esp+0B0h+var_A0+3], bl
mov	byte ptr [esp+0B0h+var_A0+1], al
mov	byte ptr [esp+0B0h+var_A0], bl
cmp	[esp+0B0h+arg_8], ebx
jbe	loc_6B9292
xor	ebp, ebp
jmp	short loc_6B8EF6

loc_6B8EF2:
mov	edx, [esp+0B0h+var_74]

loc_6B8EF6:
cmp	byte ptr [esp+0B0h+var_A0], bl
mov	ecx, ebp
setnz	byte ptr [esp+0B0h+var_A0+2]
shr	edx, cl
mov	al, 1
shl	al, cl
test	dl, 1
jz	loc_6B90C2
movzx	ebp, al
mov	eax, [esp+0B0h+arg_4]
test	[eax+10h], ebp
jz	loc_6B903F
test	[eax+0Ch], ebp
jnz	loc_6B903F
cmp	esi, ebx
jz	loc_6B8FEB
test	byte ptr [eax+20h], 4
jz	short loc_6B8F87
movzx	edx, byte ptr [esp+0B0h+var_A0+2]
mov	cl, byte ptr [esp+0B0h+var_A0]
neg	edx
sbb	edx, edx
and	edx, 0FF800h
add	edx, 800h
mov	[esp+0B0h+var_8A], cl
mov	[esp+0B0h+var_94], edx
mov	dl, [esp+0B0h+arg_0]
xor	eax, eax
lea	ecx, [esp+0B0h+var_94]
mov	[esp+0B0h+var_90], ebx
mov	[esp+0B0h+var_8C], ax
mov	byte ptr [esp+0B0h+var_88+1], bl
mov	[esp+0B0h+var_89], dl
mov	byte ptr [esp+0B0h+var_88], bl
mov	eax, [esi]
push	ecx
mov	ecx, esi
jmp	loc_6B9037

loc_6B8F87:
mov	eax, [esi+0A0h]
shr	eax, 0Dh
test	al, 1
jnz	short loc_6B8FE4
movzx	ecx, byte ptr [esp+0B0h+var_A0+2]
mov	al, byte ptr [esp+0B0h+var_A0]
neg	ecx
sbb	ecx, ecx
and	ecx, 1FF000h
add	ecx, 1000h
mov	[esp+0B0h+var_40], ecx
mov	cl, [esp+0B0h+arg_0]
xor	edx, edx
mov	word ptr [esp+0B0h+var_38], dx
mov	byte ptr [esp+0B0h+var_38+2], al
mov	byte ptr [esp+0B0h+var_38+3], cl
mov	[esp+0B0h+var_3C], ebx
mov	byte ptr [esp+0B0h+var_34+1], bl
mov	byte ptr [esp+0B0h+var_34], bl
mov	edx, [esi]
mov	edx, [edx+108h]
lea	eax, [esp+0B0h+var_40]
push	eax
mov	ecx, esi
call	edx

loc_6B8FE4:
mov	byte ptr [esp+0B0h+var_A0+3], 1
jmp	short loc_6B903F

loc_6B8FEB:
cmp	edi, ebx
jz	short loc_6B903F
mov	eax, [edi]
mov	edx, [eax+70h]
mov	ecx, edi
call	edx
mov	eax, [eax+78h]
cmp	byte ptr [eax+2B1h], 1
jnz	short loc_6B903F
mov	dl, [esp+0B0h+arg_0]
xor	ecx, ecx
mov	[esp+0B0h+var_58], cx
lea	ecx, [esp+0B0h+var_60]
mov	[esp+0B0h+var_60], 800h
mov	[esp+0B0h+var_5C], ebx
mov	byte ptr [esp+0B0h+var_54+1], bl
mov	[esp+0B0h+var_56], bl
mov	[esp+0B0h+var_55], dl
mov	byte ptr [esp+0B0h+var_54], bl
mov	eax, [edi]
push	ecx
mov	ecx, edi

loc_6B9037:
mov	edx, [eax+108h]
call	edx

loc_6B903F:
mov	eax, [esp+0B0h+arg_4]
test	[eax+10h], ebp
jnz	loc_6B9278
test	[eax+0Ch], ebp
jz	loc_6B9278
cmp	esi, ebx
jz	loc_6B9273
movzx	eax, byte ptr [esp+0B0h+var_A0+2]
mov	dl, byte ptr [esp+0B0h+var_A0]
neg	eax
sbb	eax, eax
and	eax, 7FC00h
add	eax, 400h
mov	[esp+0B0h+var_20], eax
mov	al, [esp+0B0h+arg_0]
xor	ecx, ecx
mov	word ptr [esp+0B0h+var_18], cx
mov	byte ptr [esp+0B0h+var_18+3], al
mov	[esp+0B0h+var_1C], ebx
mov	byte ptr [esp+0B0h+var_14+1], bl
mov	byte ptr [esp+0B0h+var_18+2], dl
mov	byte ptr [esp+0B0h+var_14], bl
mov	edx, [esi]
lea	eax, [esp+0B0h+var_20]
mov	ecx, esi
jmp	loc_6B926A

loc_6B90C2:
mov	ecx, [esp+0B0h+arg_4]
test	[ecx+0Ch], al
jz	loc_6B9278
test	byte ptr [ecx+20h], 4
jnz	short loc_6B914B
cmp	edi, esi
jnz	loc_6B91C1
cmp	esi, ebx
jz	short loc_6B9144
mov	al, [esi+0A9h]
movzx	ecx, al
inc	al
mov	[esi+0A9h], al
movzx	eax, byte ptr [esp+0B0h+var_A0+2]
neg	eax
sbb	eax, eax
and	eax, 3F8000h
add	eax, 8000h
xor	edx, edx
mov	[esp+0B0h+var_84], eax
movzx	eax, byte ptr [esp+0B0h+var_A0]
mov	[esp+0B0h+var_7C], dx
mov	dl, [esp+0B0h+arg_0]
mov	[esp+0B0h+var_78], cl
mov	[esp+0B0h+var_79], dl
mov	[esp+0B0h+var_80], ebx
mov	[esp+0B0h+var_77], bl
mov	[esp+0B0h+var_7A], al
mov	eax, [esi]
mov	edx, [eax+108h]
lea	ecx, [esp+0B0h+var_84]
push	ecx
mov	ecx, esi
call	edx

loc_6B9144:
mov	byte ptr [esp+0B0h+var_A0+1], 1
jmp	short loc_6B91C1

loc_6B914B:
cmp	edi, esi
jz	short loc_6B91C1
cmp	esi, ebx
jz	short loc_6B91BD
mov	al, [esi+0A9h]
cmp	al, bl
jz	short loc_6B916A
dec	al
mov	[esi+0A9h], al
movzx	eax, al
jmp	short loc_6B916D

loc_6B916A:
or	eax, 0FFFFFFFFh

loc_6B916D:
movzx	ecx, byte ptr [esp+0B0h+var_A0+2]
neg	ecx
sbb	ecx, ecx
and	ecx, 7F0000h
add	ecx, 10000h
mov	[esp+0B0h+var_70], ecx
mov	cl, byte ptr [esp+0B0h+var_A0]
xor	edx, edx
mov	[esp+0B0h+var_68], dx
mov	dl, [esp+0B0h+arg_0]
mov	[esp+0B0h+var_66], cl
mov	[esp+0B0h+var_65], dl
mov	[esp+0B0h+var_6C], ebx
mov	[esp+0B0h+var_63], bl
mov	[esp+0B0h+var_64], al
mov	eax, [esi]
mov	edx, [eax+108h]
lea	ecx, [esp+0B0h+var_70]
push	ecx
mov	ecx, esi
call	edx

loc_6B91BD:
mov	byte ptr [esp+0B0h+var_A0+1], bl

loc_6B91C1:
cmp	esi, ebx
jz	short loc_6B91D6
mov	eax, [esi+0A0h]
shr	eax, 0Dh
test	al, 1
jz	loc_6B9278

loc_6B91D6:
cmp	edi, ebx
jz	loc_6B9278
cmp	edi, esi
jz	loc_6B9278
mov	ecx, [edi+0A0h]
shr	ecx, 0Dh
test	cl, 1
jz	loc_6B9278
inc	dword ptr [edi+4]
mov	ecx, [esp+0B0h+var_9C]
cmp	ecx, ebx
jz	short loc_6B9208
call	sub_64A400

loc_6B9208:
mov	edi, [esp+0B0h+var_98]
mov	al, [edi+0A9h]
movzx	edx, byte ptr [esp+0B0h+var_A0+2]
movzx	ecx, al
inc	al
neg	edx
mov	[edi+0A9h], al
sbb	edx, edx
and	edx, 3F8000h
add	edx, 8000h
xor	eax, eax
mov	word ptr [esp+0B0h+var_48], ax
mov	al, [esp+0B0h+arg_0]
mov	[esp+0B0h+var_50], edx
mov	dl, byte ptr [esp+0B0h+var_A0]
mov	esi, edi
mov	[esp+0B0h+var_45], al
mov	[esp+0B0h+var_44], cl
mov	dword ptr [esp+0B0h+var_4C], ebx
mov	[esp+0B0h+var_43], bl
mov	[esp+0B0h+var_46], dl
mov	edx, [edi]
mov	[esp+0B0h+var_9C], esi
lea	eax, [esp+0B0h+var_50]
mov	ecx, edi

loc_6B926A:
mov	edx, [edx+108h]
push	eax
call	edx

loc_6B9273:
mov	byte ptr [esp+0B0h+var_A0+1], 1

loc_6B9278:
mov	al, byte ptr [esp+0B0h+var_A0]
inc	al
movzx	ebp, al
mov	byte ptr [esp+0B0h+var_A0], al
cmp	ebp, [esp+0B0h+arg_8]
jb	loc_6B8EF2

loc_6B9292:
mov	ebp, [esp+0B0h+arg_4]
cmp	[ebp+0Ch], ebx
jnz	loc_6B93AA
cmp	edi, esi
jz	loc_6B93AA
cmp	byte ptr [esp+0B0h+var_A0+3], bl
jnz	short loc_6B9321
cmp	esi, ebx
jz	short loc_6B9321
mov	al, [esi+0A9h]
cmp	al, bl
jz	short loc_6B92CB
dec	al
mov	[esi+0A9h], al
movzx	eax, al
jmp	short loc_6B92CE

loc_6B92CB:
or	eax, 0FFFFFFFFh

loc_6B92CE:
mov	dl, [esp+0B0h+arg_0]
xor	ecx, ecx
mov	[esp+0B0h+var_28], cx
mov	[esp+0B0h+var_25], dl
mov	dword ptr [esp+0B0h+var_30], 4000h
mov	dword ptr [esp+0B0h+var_2C], ebx
mov	byte ptr [esp+0B0h+var_24+1], bl
mov	[esp+0B0h+var_26], bl
mov	byte ptr [esp+0B0h+var_24], al
mov	eax, [esi]
mov	edx, [eax+108h]
lea	ecx, [esp+0B0h+var_30]
push	ecx
mov	ecx, esi
call	edx

loc_6B9321:
cmp	edi, ebx
jz	short loc_6B9330
inc	dword ptr [edi+4]
mov	esi, [esp+0B0h+var_9C]
mov	edi, [esp+0B0h+var_98]

loc_6B9330:
cmp	esi, ebx
jz	short loc_6B933B
mov	ecx, esi
call	sub_64A400

loc_6B933B:
mov	esi, edi
cmp	edi, ebx
jz	short loc_6B93A5
mov	al, [edi+0A9h]
mov	dl, [esp+0B0h+arg_0]
movzx	ecx, al
inc	al
mov	[edi+0A9h], al
xor	eax, eax
mov	[esp+0B0h+var_4], cl
mov	byte ptr [esp+0B0h+var_8+3], dl
mov	dword ptr [esp+0B0h+var_10], 2000h
mov	[esp+0B0h+var_C], ebx
mov	word ptr [esp+0B0h+var_8], ax
mov	[esp+0B0h+var_3], bl
mov	byte ptr [esp+0B0h+var_8+2], bl
mov	eax, [edi]
mov	edx, [eax+108h]
lea	ecx, [esp+0B0h+var_10]
push	ecx
mov	ecx, edi
call	edx

loc_6B93A5:
mov	byte ptr [esp+0B0h+var_A0+1], 1

loc_6B93AA:
mov	al, byte ptr [esp+0B0h+var_A0+1]
add	al, al
add	al, al
xor	al, [ebp+20h]
and	al, 4
xor	[ebp+20h], al
cmp	esi, ebx
jz	short loc_6B93F4
mov	ecx, esi
call	sub_64A4A0
mov	ebp, eax
mov	eax, [esp+0B0h+arg_4]
mov	eax, [eax+8]
cmp	eax, ebx
jz	short loc_6B93E8
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B93E8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B93E8:
mov	ecx, [esp+0B0h+arg_4]
mov	[ecx+8], ebp
jmp	short loc_6B9411

loc_6B93F4:
mov	eax, [ebp+8]
cmp	eax, ebx
jz	short loc_6B940E
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6B940E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6B940E:
mov	[ebp+8], ebx

loc_6B9411:
cmp	edi, ebx
jz	short loc_6B941C
mov	ecx, edi
call	sub_64A400

loc_6B941C:
pop	edi
cmp	esi, ebx
jz	short loc_6B9431
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
jmp	sub_64A400

loc_6B9431:
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn
sub_6B8E90 endp

align 10h



sub_6B9440 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+3Ch]
call	sub_67C210
lea	ecx, [edi+48h]
call	sub_67C210
mov	eax, [edi+54h]
test	eax, eax
jz	short loc_6B948A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B9488
lea	ebx, [ebx+0]

loc_6B9470:
mov	eax, [edi+54h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6B9483
call	sub_64B020

loc_6B9483:
inc	esi
cmp	esi, ebx
jb	short loc_6B9470

loc_6B9488:
pop	esi
pop	ebx

loc_6B948A:
pop	edi
retn
sub_6B9440 endp

align 10h



sub_6B9490 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+8]
xor	esi, esi
test	ebx, ebx
jbe	short loc_6B94B0
mov	edi, edi

loc_6B94A0:
mov	eax, [edi+4]
mov	ecx, [eax+esi*4]
call	sub_64A430
inc	esi
cmp	esi, ebx
jb	short loc_6B94A0

loc_6B94B0:
cmp	dword ptr [edi+8], 0
lea	esi, [edi+4]
jbe	short loc_6B94E5
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_6B94F5
mov	eax, [esi]
test	eax, eax
jz	short loc_6B94DC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_6B94DC:
mov	dword ptr [esi+8], 0
jmp	short loc_6B94F5

loc_6B94E5:
cmp	dword ptr [esi+8], 0
ja	short loc_6B94F5
push	0
push	esi
mov	ecx, esi
call	sub_6B8B50

loc_6B94F5:
mov	dword ptr [esi+4], 0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
retn
sub_6B9490 endp




sub_6B9510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	edi
mov	edi, ecx
test	ebx, ebx
jz	loc_6B95E1
cmp	[esp+8+arg_4], 7
push	esi
mov	esi, [esp+0Ch+arg_0]
jnz	short loc_6B9534
mov	dword ptr [edi], 8
jmp	short loc_6B9576

loc_6B9534:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6B954C
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6B954C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
movzx	edx, cx
mov	[esi+2Ch], eax
mov	[edi], edx
sub	ebx, 2

loc_6B9576:
mov	eax, [edi]
push	ebp
push	eax
push	offset aActionConditio ; "-- action conditions %X\n"
push	esi
call	nullsub_2
push	offset aActionsInButto ; "-- actions in	button\n"
push	esi
call	nullsub_2
add	esp, 14h
call	sub_669C90
mov	ebp, eax
push	ebx
push	esi
mov	ecx, ebp
call	sub_669780
mov	esi, [edi+8]
add	edi, 4
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6B95BB
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_6B95D0
push	esi
jmp	short loc_6B95C8

loc_6B95BB:
cmp	esi, [edi+8]
jb	short loc_6B95D0
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_6B95C8:
push	edi
mov	ecx, edi
call	sub_6B8B50

loc_6B95D0:
mov	eax, [edi]
mov	[edi+4], esi
lea	esi, [eax+esi*4-4]
test	esi, esi
jz	short loc_6B95DF
mov	[esi], ebp

loc_6B95DF:
pop	ebp
pop	esi

loc_6B95E1:
pop	edi
pop	ebx
retn	0Ch
sub_6B9510 endp

align 10h



sub_6B95F0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
lea	edi, [ebx+78h]
push	0
push	38h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6B964C
push	ebx
mov	ecx, esi
call	sub_663BE0
mov	dword ptr [esi], offset	off_1436FAC
lea	ebx, [esi+10h]
mov	dword ptr [ebx], offset	off_1439828
mov	dword ptr [esi+34h], 0
mov	ecx, [edi]
push	9
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_6B964C:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6B95F0 endp

align 10h



sub_6B9660 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
push	eax
mov	dword ptr [esi], offset	off_1436FAC
mov	dword ptr [edi], offset	off_1439828
xor	ebx, ebx
push	ebp
mov	ecx, edi
mov	[esi+34h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+38h]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_1439904
mov	dword ptr [edi], offset	off_14398B0
mov	dword ptr [ecx], offset	off_1439824
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6B9660 endp

align 10h



sub_6B96E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, edi
imul	eax, 54h
lea	esi, [ecx+eax-54h]
test	edi, edi
jbe	short loc_6B9718
jmp	short loc_6B9700
align 10h

loc_6B9700:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
sub	esi, 54h
sub	edi, 1
jnz	short loc_6B9700

loc_6B9718:
pop	edi
pop	esi
retn
sub_6B96E0 endp

align 10h



sub_6B9720 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	edi
mov	edi, [esp+8+arg_4]
xor	ebx, ebx
cmp	edi, ebx
jbe	short loc_6B9766
push	esi
mov	esi, [esp+0Ch+arg_0]
add	esi, 8

loc_6B9734:
lea	eax, [esi-8]
test	eax, eax
jz	short loc_6B975D
mov	[esi-8], ebx
mov	[esi-4], ebx
lea	ecx, [esi+4]
mov	[esi], ebx
call	sub_64E8E0
lea	ecx, [esi+1Ch]
call	sub_68CFB0
mov	dword ptr [esi+3Ch], 40000h
mov	[esi+48h], bl

loc_6B975D:
add	esi, 54h
sub	edi, 1
jnz	short loc_6B9734
pop	esi

loc_6B9766:
pop	edi
pop	ebx
retn
sub_6B9720 endp

align 10h



sub_6B9770 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch

sub	esp, 58h
push	ebx
push	ebp
mov	ebx, ecx
mov	eax, [ebx+0B8h]
xor	ebp, ebp
push	esi
push	edi
mov	[esp+68h+var_4C], ebp
cmp	[eax+1Ch], ebp
jbe	loc_6B9BF7
xor	edi, edi
mov	[esp+68h+var_48], edi

loc_6B9794:
mov	esi, [eax+18h]
mov	ecx, [ebx+0C0h]
lea	eax, ds:0[ebp*4]
add	esi, edi
cmp	dword ptr [eax+ecx], 0
mov	[esp+68h+var_58], eax
mov	eax, [ebx+0D4h]
mov	[esp+68h+var_50], esi
jnz	loc_6B9BAE
test	eax, eax
jnz	short loc_6B97C8
test	byte ptr [esi+50h], 8
jmp	short loc_6B97DC

loc_6B97C8:
cmp	eax, 1
jnz	short loc_6B97D3
test	byte ptr [esi+50h], 2
jmp	short loc_6B97DC

loc_6B97D3:
cmp	eax, 2
jnz	short loc_6B97DE
test	byte ptr [esi+50h], 4

loc_6B97DC:
jnz	short loc_6B97E8

loc_6B97DE:
test	byte ptr [esi+50h], 1
jz	loc_6B9BDC

loc_6B97E8:
mov	edx, [esi+44h]
push	ecx
mov	eax, esp
mov	[eax], edx
mov	ecx, [ebx+90h]
lea	eax, [esp+6Ch+var_40]
push	eax
call	sub_6AFD80
cmp	[esp+68h+var_40], 0
jz	loc_6B9BDC
mov	ecx, [ebx+0B8h]
mov	edx, [ecx+18h]
mov	ecx, [esp+68h+var_3C]
add	edi, edx
mov	edx, [esi+44h]
push	ecx
push	ecx
lea	eax, [edi+24h]
mov	[esp+70h+var_44], eax
mov	eax, esp
mov	[eax], edx
mov	ecx, [esp+70h+var_40]
mov	eax, [ecx]
mov	edx, [eax+24h]
push	ebx
call	edx
mov	esi, [ebx+0C0h]
add	esi, [esp+68h+var_58]
mov	ebp, eax
test	ebp, ebp
jz	short loc_6B9849
inc	dword ptr [ebp+4]

loc_6B9849:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6B9854
call	sub_64A400

loc_6B9854:
mov	[esi], ebp
fld	dword ptr [edi+0Ch]
mov	esi, [esp+68h+var_44]
fstp	dword ptr [ebp+44h]
fld	dword ptr [edi+10h]
mov	ecx, 8
fstp	dword ptr [ebp+48h]
fld	dword ptr [edi+14h]
fstp	dword ptr [ebp+4Ch]
fld	dword ptr [edi+18h]
fstp	dword ptr [ebp+50h]
fld	dword ptr [edi+1Ch]
fstp	dword ptr [ebp+54h]
fld	dword ptr [edi+20h]
lea	edi, [ebp+24h]
fstp	dword ptr [ebp+58h]
mov	eax, [ebp+0]
mov	edx, [eax+4]
rep movsd
mov	ecx, ebp
call	edx
mov	ecx, [esp+68h+var_50]
mov	edx, [ecx+4Ch]
mov	eax, [ebp+0]
mov	eax, [eax+24h]
push	edx
mov	ecx, ebp
call	eax
mov	esi, [ebp+20h]
mov	ecx, 0FFFEh
and	[ebp+76h], cx
test	esi, esi
jz	short loc_6B98D9

loc_6B98B4:
mov	edx, [esi]
mov	eax, [edx+4Ch]
mov	ecx, esi
call	eax
test	eax, eax
jnz	short loc_6B98CA
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_6B98B4
jmp	short loc_6B98D9

loc_6B98CA:
mov	edx, [ebp+0]
mov	eax, [edx+50h]
or	word ptr [ebp+76h], 1
mov	ecx, ebp
call	eax

loc_6B98D9:
mov	cl, [ebp+76h]
shr	cl, 7
and	cl, 1
movzx	esi, cl
neg	esi
sbb	esi, esi
and	esi, ebp
jz	loc_6B9B9D
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	ecx, ebx
call	eax
mov	edx, [esi+78h]
lea	ecx, [esi+78h]
mov	edi, eax
mov	eax, [edx+8]
mov	[esp+68h+var_58], edi
call	eax
cmp	eax, 2
jnz	loc_6B9B80
mov	edx, [ebx]
mov	eax, [edx+0D0h]
mov	ecx, ebx
call	eax
mov	[esp+68h+var_44], eax
xor	eax, eax
push	ecx
mov	ecx, [esp+6Ch+var_50]
mov	edx, [ecx+44h]
mov	[esp+6Ch+var_38], eax
mov	[esp+6Ch+var_34], eax
mov	eax, esp
mov	byte ptr [esp+6Ch+var_30], 0
mov	[eax], edx
mov	eax, [ebp+0]
mov	edx, [eax+5Ch]
mov	ecx, ebp
call	edx
mov	ecx, eax
call	sub_6AECD0
mov	edi, eax
test	edi, edi
jz	loc_6B9B44
mov	eax, [ebx]
mov	edx, [eax+70h]
mov	ecx, ebx
call	edx
mov	eax, [eax+78h]
mov	ecx, [eax+280h]
mov	eax, [edi]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	[esp+68h+var_54], eax
mov	edi, 1
add	[eax+8], edi
mov	eax, [ebx]
mov	edx, [eax+70h]
mov	ecx, ebx
call	edx
lea	ecx, [esp+68h+var_38]
push	ecx
mov	ecx, [esp+6Ch+var_44]
lea	edx, [esp+6Ch+var_54]
push	edx
add	eax, 78h
push	eax
call	sub_66F4F0
test	al, al
jz	loc_6B9A99
mov	eax, [esp+68h+var_38]
test	eax, eax
jz	short loc_6B99C9
add	eax, 10h
jmp	short loc_6B99CB

loc_6B99C9:
xor	eax, eax

loc_6B99CB:
push	eax
mov	ecx, esi
call	sub_655130
mov	ecx, [esp+68h+var_58]
add	ecx, 2408h
push	3
call	sub_696220
mov	edi, eax
test	edi, edi
jz	short loc_6B9A40
push	40000h
lea	ecx, [esp+6Ch+var_20]
call	sub_6548F0
mov	dword ptr [edi+4], 2
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6B9A0E
call	sub_64A400

loc_6B9A0E:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6B9A1D
call	sub_64A400

loc_6B9A1D:
mov	eax, [esp+68h+var_20]
mov	ecx, [esp+68h+var_1C]
mov	edx, [esp+68h+var_18]
mov	dword ptr [edi+0Ch], 0
mov	[edi+10h], eax
mov	eax, [esp+68h+var_14]
mov	[edi+14h], ecx
mov	[edi+18h], edx
mov	[edi+1Ch], eax

loc_6B9A40:
mov	ecx, [esp+68h+var_58]
push	3
add	ecx, 2408h
call	sub_696220
mov	edi, eax
test	edi, edi
jz	loc_6B9B2E
mov	dword ptr [edi+4], 3
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6B9A71
call	sub_64A400

loc_6B9A71:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6B9A80
call	sub_64A400

loc_6B9A80:
lea	ecx, [esp+68h+var_38]
push	ecx
lea	ecx, [edi+20h]
mov	dword ptr [edi+0Ch], 0
call	sub_67C4C0
jmp	loc_6B9B2E

loc_6B9A99:
xor	eax, eax
mov	[esp+68h+var_2C], eax
mov	[esp+68h+var_28], eax
mov	[esp+68h+var_24], eax
mov	eax, [esp+68h+var_54]
lea	edx, [esp+68h+var_10]
mov	[esp+68h+var_10], 5
mov	[esp+68h+var_C], eax
add	[eax+8], edi
push	edx
lea	ecx, [esp+6Ch+var_2C]
call	sub_684AF0
lea	ecx, [esp+68h+var_10]
call	sub_652830
mov	ecx, [esp+68h+var_58]
push	3
add	ecx, 2408h
call	sub_696220
mov	edi, eax
test	edi, edi
jz	short loc_6B9B25
mov	dword ptr [edi+4], 4
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6B9AFB
call	sub_64A400

loc_6B9AFB:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6B9B0A
call	sub_64A400

loc_6B9B0A:
lea	eax, [esp+68h+var_2C]
mov	dword ptr [edi+0Ch], 0
push	eax
lea	ecx, [edi+30h]
mov	dword ptr [edi+2Ch], offset sub_688720
call	sub_684BD0

loc_6B9B25:
lea	ecx, [esp+68h+var_2C]
call	sub_6806F0

loc_6B9B2E:
mov	eax, [esp+68h+var_54]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6B9B44
call	sub_650DF0

loc_6B9B44:
test	byte ptr [esp+68h+var_30], 2
jnz	short loc_6B9B58
mov	ecx, [esp+68h+var_38]
test	ecx, ecx
jz	short loc_6B9B58
call	sub_64B3B0

loc_6B9B58:
test	byte ptr [esp+68h+var_30], 1
mov	[esp+68h+var_38], 0
jnz	short loc_6B9B74
mov	ecx, [esp+68h+var_34]
test	ecx, ecx
jz	short loc_6B9B74
call	sub_64B3B0

loc_6B9B74:
mov	edi, [esp+68h+var_58]
mov	[esp+68h+var_34], 0

loc_6B9B80:
push	edi
mov	ecx, esi
call	sub_655A10
push	edi
mov	ecx, esi
call	sub_656230
mov	edx, [ebp+0]
mov	eax, [edx+84h]
mov	ecx, ebp
call	eax

loc_6B9B9D:
mov	ecx, ebp
call	sub_64A400
mov	ebp, [esp+68h+var_4C]
mov	edi, [esp+68h+var_48]
jmp	short loc_6B9BDC

loc_6B9BAE:
test	eax, eax
jnz	short loc_6B9BB8
test	byte ptr [esi+50h], 8
jmp	short loc_6B9BCC

loc_6B9BB8:
cmp	eax, 1
jnz	short loc_6B9BC3
test	byte ptr [esi+50h], 2
jmp	short loc_6B9BCC

loc_6B9BC3:
cmp	eax, 2
jnz	short loc_6B9BCE
test	byte ptr [esi+50h], 4

loc_6B9BCC:
jnz	short loc_6B9BDC

loc_6B9BCE:
test	byte ptr [esi+50h], 1
jnz	short loc_6B9BDC
push	ebp
mov	ecx, ebx
call	sub_6B8AD0

loc_6B9BDC:
mov	eax, [ebx+0B8h]
inc	ebp
add	edi, 54h
mov	[esp+68h+var_4C], ebp
mov	[esp+68h+var_48], edi
cmp	ebp, [eax+1Ch]
jb	loc_6B9794

loc_6B9BF7:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn
sub_6B9770 endp

align 10h



sub_6B9C00 proc	near

var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	ebp, ecx
mov	ecx, [esp+20h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebp
call	sub_6B9660
lea	edx, [esp+20h+arg_8]
push	edx
push	offset off_14397D0
push	esi
lea	ecx, [ebp+38h]
lea	edi, [ebp+10h]
push	ebp
mov	dword ptr [ebp+0], offset off_1439904
mov	dword ptr [edi], offset	off_14398B0
mov	dword ptr [ecx], offset	off_1439824
mov	byte ptr [esp+30h+arg_8], 1
call	sub_663110
mov	edx, [esi]
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
add	edx, 20Ch
push	edx
mov	bl, 2
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], bl
mov	[esp+30h+var_10], bl
mov	[esp+30h+var_C], 1
call	sub_665530
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
push	offset aBlendmode_0 ; "blendMode"
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], bl
mov	[esp+30h+var_10], 0Ah
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
push	offset aEnabled	; "enabled"
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], bl
mov	[esp+30h+var_10], 0Ah
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+arg_8]
push	ecx
lea	edx, [esp+24h+var_10]
push	edx
push	offset aScale9grid ; "scale9Grid"
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], bl
mov	[esp+30h+var_10], 0Ah
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+arg_8]
mov	byte ptr [esp+20h+arg_8], bl
mov	[esp+20h+var_10], 0Ah
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
push	offset aTabindex ; "tabIndex"
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
push	offset aTrackasmenu ; "trackAsMenu"
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_8], bl
mov	[esp+30h+var_10], 0Ah
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_6B9C00 endp

align 10h



sub_6B9D60 proc	near

arg_0= byte ptr	 4

sub	ecx, 38h
jmp	sub_6B8CF0
sub_6B9D60 endp

align 10h



sub_6B9D70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_8]
push	ebx
push	ebp
push	esi
push	edi
push	ecx
mov	eax, esp
mov	esi, ecx
mov	ecx, [esp+14h+arg_C]
mov	[eax], ecx
mov	eax, [esp+14h+arg_4]
push	edx
push	eax
mov	ecx, esi
call	sub_65BDC0
mov	ecx, [esp+10h+arg_0]
xor	eax, eax
mov	[esi+0B8h], ecx
mov	dword ptr [esi], offset	off_1439988
mov	dword ptr [esi+0Ch], offset off_143997C
mov	dword ptr [esi+78h], offset off_1439928
mov	[esi+0BCh], eax
mov	[esi+0C0h], eax
mov	[esi+0C4h], eax
lea	edi, [esi+0C0h]
mov	[edi+8], eax
mov	[esi+0D0h], eax
mov	[esi+0CCh], eax
mov	[esi+0D4h], eax
mov	[esi+0D8h], eax
mov	ecx, [ecx+30h]
push	ecx
mov	ecx, esi
call	sub_6B8A10
mov	eax, [esi+0B8h]
cmp	byte ptr [eax+14h], 0
jz	short loc_6B9E06
or	dword ptr [esi+0A0h], 2000h
jmp	short loc_6B9E10

loc_6B9E06:
and	dword ptr [esi+0A0h], 0FFFFDFFFh

loc_6B9E10:
mov	ebp, [eax+1Ch]
mov	ebx, [edi+4]
push	ebp
push	edi
mov	ecx, edi
call	sub_65CC60
cmp	ebp, ebx
jbe	short loc_6B9E42
sub	ebp, ebx
mov	edx, [edi]
lea	eax, [edx+ebx*4]
jz	short loc_6B9E42
lea	esp, [esp+0]

loc_6B9E30:
test	eax, eax
jz	short loc_6B9E3A
mov	dword ptr [eax], 0

loc_6B9E3A:
add	eax, 4
sub	ebp, 1
jnz	short loc_6B9E30

loc_6B9E42:
push	9
mov	ecx, esi
call	sub_654DE0
push	eax
mov	ecx, esi
call	sub_655B90
mov	ecx, eax
call	sub_66FB70
mov	edi, eax
test	edi, edi
jz	short loc_6B9E6C
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_6B9E6C:
mov	ecx, [esi+80h]
test	ecx, ecx
jz	short loc_6B9E7B
call	sub_64B3B0

loc_6B9E7B:
mov	ecx, esi
mov	[esi+80h], edi
call	sub_6B9770
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_6B9D70 endp

align 10h



sub_6B9EA0 proc	near
mov	eax, [ecx+0BCh]
retn
sub_6B9EA0 endp

align 10h



sub_6B9EB0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
cmp	dword ptr [edi], 8
mov	esi, ecx
jnz	short loc_6B9EC2
call	sub_656B50

loc_6B9EC2:
mov	eax, [esi]
mov	edx, [eax+80h]
push	edi
mov	ecx, esi
call	edx
pop	edi
pop	esi
retn	4
sub_6B9EB0 endp

align 10h



sub_6B9EE0 proc	near
mov	eax, 0EFFFAFCFh
retn
sub_6B9EE0 endp

align 10h



sub_6B9EF0 proc	near
sub	ecx, 78h
jmp	sub_9144D0
sub_6B9EF0 endp

align 10h



sub_6B9F00 proc	near

arg_0= byte ptr	 4

sub	ecx, 78h
jmp	sub_6BBB60
sub_6B9F00 endp

align 10h



sub_6B9F10 proc	near
sub	ecx, 0Ch
jmp	sub_6BBB60
sub_6B9F10 endp

align 10h



sub_6B9F20 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+4Ch]
call	edx
test	eax, eax
setnz	bl
test	byte ptr [esi+76h], 1
jnz	short loc_6B9F3A
test	bl, bl
jnz	short loc_6B9F7D

loc_6B9F3A:
push	edi
xor	edi, edi
cmp	[esi+0C4h], edi
jbe	short loc_6B9F7C

loc_6B9F45:
mov	eax, [esi+0C0h]
mov	ecx, [eax+edi*4]
test	ecx, ecx
jz	short loc_6B9F73
test	byte ptr [esi+76h], 1
jnz	short loc_6B9F5C
test	bl, bl
jz	short loc_6B9F63

loc_6B9F5C:
or	word ptr [ecx+76h], 1
jmp	short loc_6B9F6C

loc_6B9F63:
mov	edx, 0FFFEh
and	[ecx+76h], dx

loc_6B9F6C:
mov	eax, [ecx]
mov	edx, [eax+50h]
call	edx

loc_6B9F73:
inc	edi
cmp	edi, [esi+0C4h]
jb	short loc_6B9F45

loc_6B9F7C:
pop	edi

loc_6B9F7D:
pop	esi
pop	ebx
retn
sub_6B9F20 endp




sub_6B9F80 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	edi
mov	edi, ecx
mov	ebx, [edi+0A0h]
mov	eax, [edi]
mov	edx, [eax+54h]
shr	ebx, 3
and	bl, 1
call	edx
mov	[esp+0Ch+var_4], eax
test	eax, eax
jz	short loc_6BA016
push	ebp
xor	ebp, ebp
cmp	[edi+0C4h], ebp
jbe	short loc_6BA015
push	esi
lea	esp, [esp+0]

loc_6B9FB0:
mov	eax, [edi+0C0h]
mov	eax, [eax+ebp*4]
test	eax, eax
jz	short loc_6BA00B
mov	cl, [eax+76h]
shr	cl, 7
and	cl, 1
movzx	esi, cl
neg	esi
sbb	esi, esi
and	esi, eax
jz	short loc_6BA00B
mov	edx, [edi+0A0h]
shr	edx, 3
test	dl, 1
jnz	short loc_6B9FE3
test	bl, bl
jz	short loc_6B9FEC

loc_6B9FE3:
or	dword ptr [esi+0A0h], 8
jmp	short loc_6B9FF3

loc_6B9FEC:
and	dword ptr [esi+0A0h], 0FFFFFFF7h

loc_6B9FF3:
mov	eax, [esi]
mov	edx, [eax+128h]
mov	ecx, esi
call	edx
mov	eax, [esp+14h+var_4]
push	eax
mov	ecx, esi
call	sub_656230

loc_6BA00B:
inc	ebp
cmp	ebp, [edi+0C4h]
jb	short loc_6B9FB0
pop	esi

loc_6BA015:
pop	ebp

loc_6BA016:
pop	edi
pop	ebx
pop	ecx
retn
sub_6B9F80 endp

align 10h



sub_6BA020 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	edi
mov	edi, ecx
mov	ebx, [edi+0A0h]
mov	eax, [edi]
mov	edx, [eax+54h]
shr	ebx, 2
and	bl, 1
call	edx
mov	[esp+0Ch+var_4], eax
test	eax, eax
jz	short loc_6BA0B6
push	ebp
xor	ebp, ebp
cmp	[edi+0C4h], ebp
jbe	short loc_6BA0B5
push	esi
lea	esp, [esp+0]

loc_6BA050:
mov	eax, [edi+0C0h]
mov	eax, [eax+ebp*4]
test	eax, eax
jz	short loc_6BA0AB
mov	cl, [eax+76h]
shr	cl, 7
and	cl, 1
movzx	esi, cl
neg	esi
sbb	esi, esi
and	esi, eax
jz	short loc_6BA0AB
mov	edx, [edi+0A0h]
shr	edx, 2
test	dl, 1
jnz	short loc_6BA083
test	bl, bl
jz	short loc_6BA08C

loc_6BA083:
or	dword ptr [esi+0A0h], 4
jmp	short loc_6BA093

loc_6BA08C:
and	dword ptr [esi+0A0h], 0FFFFFFFBh

loc_6BA093:
mov	eax, [esi]
mov	edx, [eax+12Ch]
mov	ecx, esi
call	edx
mov	eax, [esp+14h+var_4]
push	eax
mov	ecx, esi
call	sub_656230

loc_6BA0AB:
inc	ebp
cmp	ebp, [edi+0C4h]
jb	short loc_6BA050
pop	esi

loc_6BA0B5:
pop	ebp

loc_6BA0B6:
pop	edi
pop	ebx
pop	ecx
retn
sub_6BA020 endp

align 10h



sub_6BA0C0 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, bl
jz	short loc_6BA0D5
or	dword ptr [esi+0A0h], 1
jmp	short loc_6BA0DC

loc_6BA0D5:
and	dword ptr [esi+0A0h], 0FFFFFFFEh

loc_6BA0DC:
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
test	eax, eax
jz	short loc_6BA156
test	bl, bl
jnz	short loc_6BA0FC
mov	eax, [eax+2474h]
shr	eax, 0Bh
test	al, 1
jz	short loc_6BA0FC
mov	cl, 1
jmp	short loc_6BA0FE

loc_6BA0FC:
xor	cl, cl

loc_6BA0FE:
mov	eax, [esi+0A0h]
mov	edx, eax
shr	edx, 3
and	dl, 1
cmp	cl, dl
jz	short loc_6BA142
test	cl, cl
jz	short loc_6BA119
or	eax, 8
jmp	short loc_6BA11C

loc_6BA119:
and	eax, 0FFFFFFF7h

loc_6BA11C:
mov	[esi+0A0h], eax
mov	eax, [esi+20h]
test	eax, eax
jz	short loc_6BA142
mov	eax, [eax+0A0h]
shr	eax, 3
test	al, 1
jnz	short loc_6BA142
mov	edx, [esi]
mov	eax, [edx+128h]
mov	ecx, esi
call	eax

loc_6BA142:
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
add	eax, 2474h
or	dword ptr [eax], 400h

loc_6BA156:
pop	esi
pop	ebx
retn	4
sub_6BA0C0 endp

align 10h



sub_6BA160 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebp, [esi+0C4h]
xor	ebx, ebx
push	edi
xor	edi, edi
mov	[esi+0CCh], ebx
mov	[esi+0D0h], ebx
mov	[esi+0D4h], ebx
mov	[esi+0A9h], bl
cmp	ebp, ebx
jbe	short loc_6BA1A9
lea	esp, [esp+0]

loc_6BA190:
mov	eax, [esi+0C0h]
mov	ecx, [eax+edi*4]
cmp	ecx, ebx
jz	short loc_6BA1A4
mov	edx, [ecx]
mov	eax, [edx+78h]
call	eax

loc_6BA1A4:
inc	edi
cmp	edi, ebp
jb	short loc_6BA190

loc_6BA1A9:
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
or	dword ptr [eax+2474h], 400h
pop	edi
pop	esi
add	eax, 2474h
pop	ebp
pop	ebx
retn
sub_6BA160 endp

align 10h



sub_6BA1D0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h

sub	esp, 14h
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+10h]
call	edx
test	al, al
jnz	short loc_6BA1E6
pop	esi
add	esp, 14h
retn

loc_6BA1E6:
mov	eax, [esi+0A0h]
and	eax, 60h
jnz	loc_6BA293
push	ebx
mov	ebx, [esi+80h]
push	edi
test	ebx, ebx
jz	loc_6BA28A
mov	[esp+20h+var_10], al
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	edi, eax
lea	eax, [esp+20h+var_10]
push	eax
push	offset aTabenabled ; "tabEnabled"
lea	ecx, [esp+28h+var_14]
lea	esi, [ebx+10h]
mov	ebx, [esi]
push	ecx
mov	ecx, edi
call	sub_651CB0
push	eax
mov	eax, [ebx+2Ch]
lea	edx, [edi+78h]
push	edx
mov	ecx, esi
call	eax
mov	bl, al
mov	eax, [esp+20h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BA253
call	sub_650DF0

loc_6BA253:
test	bl, bl
jz	short loc_6BA281
mov	al, [esp+20h+var_10]
test	al, al
jz	short loc_6BA281
cmp	al, 0Ah
jz	short loc_6BA281
push	edi
lea	ecx, [esp+24h+var_10]
call	sub_651D80
lea	ecx, [esp+20h+var_10]
mov	bl, al
call	sub_652830
pop	edi
mov	al, bl
pop	ebx
pop	esi
add	esp, 14h
retn

loc_6BA281:
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6BA28A:
pop	edi
pop	ebx
mov	al, 1
pop	esi
add	esp, 14h
retn

loc_6BA293:
xor	ecx, ecx
cmp	eax, 60h
setz	cl
mov	al, cl
pop	esi
add	esp, 14h
retn
sub_6BA1D0 endp

align 10h



sub_6BA2B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	eax, [edi]
mov	ebx, ecx
mov	ecx, [eax+0Ch]
shr	ecx, 1Dh
test	cl, 1
jz	short loc_6BA2F3
mov	edx, [ebx-78h]
push	0
lea	esi, [ebx-78h]
push	ebp
push	edi
mov	ecx, esi
mov	[esp+1Ch+arg_4], edx
call	sub_6593C0
push	eax
mov	eax, [esp+1Ch+arg_4]
mov	edx, [eax+120h]
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_6BA332

loc_6BA2F3:
mov	eax, [ebx+60h]
test	eax, eax
jz	short loc_6BA312
mov	edx, [esp+10h+arg_0]
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	eax, [eax+10h]
push	ebp
push	edi
push	edx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6BA312:
mov	esi, [esp+10h+arg_0]
test	esi, esi
jz	short loc_6BA33B
mov	ecx, [esi+78h]
mov	edx, [edi]
cmp	edx, [ecx+144h]
jnz	short loc_6BA33B
mov	eax, [ebx+8]
push	eax
mov	ecx, ebp
call	sub_652E40

loc_6BA332:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	0Ch

loc_6BA33B:
mov	ebx, [ebx+8]
test	ebx, ebx
jz	short loc_6BA354
mov	edx, [ebx+10h]
mov	eax, [edx+10h]
push	ebp
lea	ecx, [ebx+10h]
push	edi
push	esi
call	eax
test	al, al
jnz	short loc_6BA332

loc_6BA354:
test	esi, esi
jz	short loc_6BA37C
mov	esi, [esi+78h]
mov	ecx, [edi]
cmp	ecx, [esi+104h]
jnz	short loc_6BA37C
mov	edx, [esi+2ACh]
push	edx
mov	ecx, ebp
call	sub_652E40
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	0Ch

loc_6BA37C:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	0Ch
sub_6BA2B0 endp

align 10h



sub_6BA390 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
movzx	eax, bl
push	esi
mov	esi, ecx
mov	ebp, [esi+0C4h]
shl	eax, 10h
xor	eax, [esi+0A0h]
push	edi
and	eax, 30000h
xor	[esi+0A0h], eax
xor	edi, edi
test	ebp, ebp
jbe	short loc_6BA3DD
lea	ecx, [ecx+0]

loc_6BA3C0:
mov	ecx, [esi+0C0h]
mov	ecx, [ecx+edi*4]
test	ecx, ecx
jz	short loc_6BA3D8
mov	edx, [ecx]
mov	eax, [edx+0B8h]
push	ebx
call	eax

loc_6BA3D8:
inc	edi
cmp	edi, ebp
jb	short loc_6BA3C0

loc_6BA3DD:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6BA390 endp

align 10h



sub_6BA3F0 proc	near

var_10=	byte ptr -10h

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+6Ch]
push	edi
call	edx
mov	edi, eax
mov	[esp+18h+var_10], 0
test	edi, edi
jz	short loc_6BA46D
mov	eax, [esi+0A0h]
shr	eax, 4
test	al, 1
jz	short loc_6BA46D
cmp	dword ptr [esi+0D8h], 0
jz	short loc_6BA424
lea	ecx, [esi+78h]
jmp	short loc_6BA431

loc_6BA424:
mov	esi, [esi+80h]
test	esi, esi
jz	short loc_6BA44B
lea	ecx, [esi+10h]

loc_6BA431:
mov	edx, [ecx]
lea	esi, [esp+18h+var_10]
push	esi
mov	esi, [edi+78h]
lea	eax, [edi+78h]
add	esi, 20Ch
push	esi
push	eax
mov	eax, [edx+2Ch]
call	eax

loc_6BA44B:
push	edi
lea	ecx, [esp+1Ch+var_10]
call	sub_651D80
test	al, al
jz	short loc_6BA46D
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	edi
mov	eax, 1
pop	esi
add	esp, 10h
retn

loc_6BA46D:
lea	ecx, [esp+18h+var_10]
call	sub_652830
pop	edi
xor	eax, eax
pop	esi
add	esp, 10h
retn
sub_6BA3F0 endp

align 10h



sub_6BA480 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+0B8h]
xor	esi, esi
cmp	[eax+1Ch], esi
jbe	short loc_6BA4A5

loc_6BA491:
push	esi
mov	ecx, edi
call	sub_6B8AD0
mov	ecx, [edi+0B8h]
inc	esi
cmp	esi, [ecx+1Ch]
jb	short loc_6BA491

loc_6BA4A5:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_656AD0
sub_6BA480 endp

align 10h


; Attributes: bp-based frame

sub_6BA4B0 proc	near

var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 34h
push	ebx
mov	ebx, ecx
mov	eax, [ebx+0A0h]
shr	eax, 0Bh
push	esi
push	edi
test	al, 1
jnz	loc_6BA621
mov	al, byte ptr [ebp+arg_4]
and	al, 2
mov	[esp+40h+var_2D], al
jz	short loc_6BA4E9
mov	edx, [ebx]
mov	eax, [edx+10h]
call	eax
test	al, al
jz	loc_6BA621

loc_6BA4E9:
test	byte ptr [ebx+76h], 1
jnz	short loc_6BA56A
lea	ecx, [esp+40h+var_18]
call	sub_64E8E0
mov	edx, [ebx]
mov	edx, [edx+34h]
lea	eax, [esp+40h+var_18]
push	eax
lea	ecx, [esp+44h+var_28]
push	ecx
mov	ecx, ebx
call	edx
mov	edx, [ebp+arg_0]
fld	dword ptr [edx]
mov	ecx, eax
fld	dword ptr [ecx+8]
fcompp
fnstsw	ax
test	ah, 1
jnz	loc_6BA621
fld	dword ptr [edx]
fld	dword ptr [ecx]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_6BA621
fld	dword ptr [edx+4]
fld	dword ptr [ecx+0Ch]
fcompp
fnstsw	ax
test	ah, 1
jnz	loc_6BA621
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_6BA621
test	byte ptr [ebp+arg_4], 1
jnz	short loc_6BA56A

loc_6BA55F:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6BA56A:
mov	eax, [ebx+0B8h]
xor	edi, edi
cmp	[eax+1Ch], edi
jbe	loc_6BA621
mov	[esp+40h+var_2C], edi

loc_6BA57F:
mov	eax, [eax+18h]
add	eax, [esp+40h+var_2C]
cmp	dword ptr [eax+44h], 40000h
jz	short loc_6BA60C
test	byte ptr [eax+50h], 1
jz	short loc_6BA60C
mov	eax, [ebx+0C0h]
mov	esi, [eax+edi*4]
test	esi, esi
jz	short loc_6BA60C
cmp	[esp+40h+var_2D], 0
jz	short loc_6BA5B6
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_6BA60C

loc_6BA5B6:
fld	dword ptr [esi+44h]
mov	ecx, [ebp+arg_0]
fstp	[esp+40h+var_18]
push	ecx
fld	dword ptr [esi+48h]
lea	edx, [esp+44h+var_28]
fstp	[esp+44h+var_14]
push	edx
fld	dword ptr [esi+4Ch]
lea	ecx, [esp+48h+var_18]
fstp	[esp+48h+var_10]
fld	dword ptr [esi+50h]
fstp	[esp+48h+var_C]
fld	dword ptr [esi+54h]
fstp	[esp+48h+var_8]
fld	dword ptr [esi+58h]
fstp	[esp+48h+var_4]
call	sub_64EC70
mov	ecx, [ebp+arg_4]
mov	eax, [esi]
mov	eax, [eax+44h]
push	ecx
lea	edx, [esp+44h+var_28]
push	edx
mov	ecx, esi
call	eax
test	al, al
jnz	loc_6BA55F

loc_6BA60C:
mov	eax, [ebx+0B8h]
add	[esp+40h+var_2C], 54h
inc	edi
cmp	edi, [eax+1Ch]
jb	loc_6BA57F

loc_6BA621:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6BA4B0 endp

align 10h


; Attributes: bp-based frame

sub_6BA630 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 94h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+10h]
push	edi
call	edx
test	al, al
jz	loc_6BA8A9
mov	eax, [ebp+arg_4]
cmp	[eax+4], esi
jz	loc_6BA8A9
mov	ecx, [eax+8]
mov	edx, [esi]
mov	eax, [eax]
mov	edx, [edx+0C4h]
push	ecx
push	eax
mov	ecx, esi
call	edx
test	al, al
jz	loc_6BA8A9
fld	dword ptr [esi+44h]
push	1
fstp	[esp+0A4h+var_70]
mov	ecx, esi
fld	dword ptr [esi+48h]
fstp	[esp+0A4h+var_6C]
fld	dword ptr [esi+4Ch]
fstp	[esp+0A4h+var_68]
fld	dword ptr [esi+50h]
fstp	[esp+0A4h+var_64]
fld	dword ptr [esi+54h]
fstp	[esp+0A4h+var_60]
fld	dword ptr [esi+58h]
fstp	[esp+0A4h+var_5C]
call	sub_654BF0
test	al, al
jz	loc_6BA733
push	1
mov	ecx, esi
call	sub_654D00
push	1
mov	ecx, esi
mov	edi, eax
call	sub_654D50
mov	ebx, eax
test	edi, edi
jz	short loc_6BA6DB
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E0h], edi

loc_6BA6DB:
test	ebx, ebx
jz	short loc_6BA6EE
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E4h], ebx

loc_6BA6EE:		; void *
lea	ecx, [esp+0A0h+var_40]
call	sub_64F7C0
lea	eax, [esp+0A0h+var_40]
push	eax
mov	ecx, esi
call	sub_654C80
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
lea	ecx, [esp+0A0h+var_40]
mov	[eax+0E8h], ecx
mov	eax, [esi]
lea	edx, [esp+0A0h+var_80]
push	edx
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
jmp	short loc_6BA745

loc_6BA733:
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [esp+0A4h+var_80]
push	ecx
lea	ecx, [esp+0A8h+var_70]
call	sub_64EC70

loc_6BA745:
mov	eax, [esi+0B8h]
xor	ebx, ebx
mov	[esp+0A0h+var_8C], ebx
cmp	[eax+1Ch], ebx
jbe	loc_6BA8A9
mov	[esp+0A0h+var_94], ebx
mov	edi, edi

loc_6BA760:
mov	eax, [eax+18h]
add	eax, [esp+0A0h+var_94]
cmp	dword ptr [eax+44h], 40000h
jz	loc_6BA890
test	byte ptr [eax+50h], 1
jz	loc_6BA890
cmp	ebx, [esi+0C4h]
jnb	loc_6BA890
mov	edx, [esi+0C0h]
mov	edi, [edx+ebx*4]
test	edi, edi
jz	loc_6BA890
fld	dword ptr [edi+44h]
push	1
fstp	[esp+0A4h+var_58]
mov	ecx, edi
fld	dword ptr [edi+48h]
fstp	[esp+0A4h+var_54]
fld	dword ptr [edi+4Ch]
fstp	[esp+0A4h+var_50]
fld	dword ptr [edi+50h]
fstp	[esp+0A4h+var_4C]
fld	dword ptr [edi+54h]
fstp	[esp+0A4h+var_48]
fld	dword ptr [edi+58h]
fstp	[esp+0A4h+var_44]
call	sub_654BF0
test	al, al
jz	loc_6BA859
push	1
mov	ecx, edi
call	sub_654D00
push	1
mov	ecx, edi
mov	ebx, eax
call	sub_654D50
mov	[esp+0A0h+var_90], eax
test	ebx, ebx
jz	short loc_6BA801
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E0h], ebx

loc_6BA801:
cmp	[esp+0A0h+var_90], 0
jz	short loc_6BA81B
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	ecx, [esp+0A0h+var_90]
mov	[eax+0E4h], ecx

loc_6BA81B:
lea	edx, [esp+0A0h+var_40]
push	edx		; void *
mov	ecx, edi
call	sub_655290
mov	ebx, eax
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E8h], ebx
mov	edx, [esi]
lea	eax, [esp+0A0h+var_88]
push	eax
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
mov	ebx, [esp+0A0h+var_8C]
jmp	short loc_6BA87C

loc_6BA859:
lea	ecx, [esp+0A0h+var_80]
push	ecx
lea	edx, [esp+0A4h+var_78]
push	edx
lea	ecx, [esp+0A8h+var_58]
call	sub_64EC70
fld	[esp+0A0h+var_78]
fstp	[esp+0A0h+var_88]
fld	[esp+0A0h+var_74]
fstp	[esp+0A0h+var_84]

loc_6BA87C:
mov	eax, [edi]
mov	edx, [eax+44h]
push	1
lea	ecx, [esp+0A4h+var_88]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jnz	short loc_6BA8B4

loc_6BA890:
mov	eax, [esi+0B8h]
add	[esp+0A0h+var_94], 54h
inc	ebx
mov	[esp+0A0h+var_8C], ebx
cmp	ebx, [eax+1Ch]
jb	loc_6BA760

loc_6BA8A9:
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6BA8B4:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6BA630 endp

align 10h



sub_6BA8C0 proc	near

var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fldz
sub	esp, 28h
push	ebx
push	esi
mov	esi, [esp+30h+arg_0]
fst	dword ptr [esi]
push	edi
fst	dword ptr [esi+4]
mov	edi, ecx
fst	dword ptr [esi+8]
lea	ecx, [esp+34h+var_18]
fstp	dword ptr [esi+0Ch]
call	sub_64E8E0
mov	ebx, [esp+34h+arg_8]
mov	eax, [edi+0C0h]
cmp	dword ptr [eax+ebx*4], 0
lea	ecx, [eax+ebx*4]
jz	short loc_6BA961
mov	eax, [esp+34h+arg_4]
fld	dword ptr [eax]
fstp	[esp+34h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+34h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+34h+var_10]
fld	dword ptr [eax+0Ch]
fstp	[esp+34h+var_C]
fld	dword ptr [eax+10h]
fstp	[esp+34h+var_8]
fld	dword ptr [eax+14h]
fstp	[esp+34h+var_4]
mov	ecx, [ecx]
add	ecx, 44h
push	ecx
lea	ecx, [esp+38h+var_18]
call	sub_64EAF0
mov	edx, [edi+0C0h]
mov	ecx, [edx+ebx*4]
mov	eax, [ecx]
mov	eax, [eax+34h]
lea	edx, [esp+34h+var_18]
push	edx
lea	edx, [esp+38h+var_28]
push	edx
call	eax
fld	dword ptr [eax]
fstp	dword ptr [esi]
fld	dword ptr [eax+4]
fstp	dword ptr [esi+4]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+8]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esi+0Ch]

loc_6BA961:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 28h
retn	0Ch
sub_6BA8C0 endp

align 10h



sub_6BA970 proc	near

var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fldz
sub	esp, 28h
push	ebx
push	esi
mov	esi, [esp+30h+arg_0]
fst	dword ptr [esi]
push	edi
fst	dword ptr [esi+4]
mov	edi, ecx
fst	dword ptr [esi+8]
lea	ecx, [esp+34h+var_18]
fstp	dword ptr [esi+0Ch]
call	sub_64E8E0
mov	ebx, [esp+34h+arg_8]
mov	eax, [edi+0C0h]
cmp	dword ptr [eax+ebx*4], 0
lea	ecx, [eax+ebx*4]
jz	short loc_6BAA11
mov	eax, [esp+34h+arg_4]
fld	dword ptr [eax]
fstp	[esp+34h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+34h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+34h+var_10]
fld	dword ptr [eax+0Ch]
fstp	[esp+34h+var_C]
fld	dword ptr [eax+10h]
fstp	[esp+34h+var_8]
fld	dword ptr [eax+14h]
fstp	[esp+34h+var_4]
mov	ecx, [ecx]
add	ecx, 44h
push	ecx
lea	ecx, [esp+38h+var_18]
call	sub_64EAF0
mov	edx, [edi+0C0h]
mov	ecx, [edx+ebx*4]
mov	eax, [ecx]
mov	eax, [eax+40h]
lea	edx, [esp+34h+var_18]
push	edx
lea	edx, [esp+38h+var_28]
push	edx
call	eax
fld	dword ptr [eax]
fstp	dword ptr [esi]
fld	dword ptr [eax+4]
fstp	dword ptr [esi+4]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+8]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esi+0Ch]

loc_6BAA11:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 28h
retn	0Ch
sub_6BA970 endp

align 10h



sub_6BAA20 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 38h
push	esi
mov	esi, ecx
lea	ecx, [esp+3Ch+var_18]
call	sub_64E8E0
mov	eax, [esi]
mov	eax, [eax+164h]
push	3
lea	ecx, [esp+40h+var_18]
push	ecx
lea	edx, [esp+44h+var_28]
push	edx
mov	ecx, esi
call	eax
fld	dword ptr [eax]
fstp	[esp+3Ch+var_38]
fld	dword ptr [eax+4]
fstp	[esp+3Ch+var_34]
fld	dword ptr [eax+8]
fstp	[esp+3Ch+var_30]
fld	dword ptr [eax+0Ch]
fstp	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_30]
fld	st
fld	[esp+3Ch+var_38]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
fld	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_34]
test	ah, 44h
jp	short loc_6BAA8E
fld	st(1)
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_6BAAAA

loc_6BAA8E:
mov	eax, [esp+3Ch+arg_0]
fxch	st(2)
fstp	dword ptr [eax]
pop	esi
fxch	st(1)
fstp	dword ptr [eax+4]
fxch	st(1)
fstp	dword ptr [eax+8]
fstp	dword ptr [eax+0Ch]
add	esp, 38h
retn	4

loc_6BAAAA:
mov	edx, [esi]
fstp	st(3)
mov	edx, [edx+164h]
fstp	st(1)
push	2
fstp	st
lea	eax, [esp+40h+var_18]
fstp	st
push	eax
lea	ecx, [esp+44h+var_28]
push	ecx
mov	ecx, esi
call	edx
fld	dword ptr [eax]
fstp	[esp+3Ch+var_38]
fld	dword ptr [eax+4]
fstp	[esp+3Ch+var_34]
fld	dword ptr [eax+8]
fstp	[esp+3Ch+var_30]
fld	dword ptr [eax+0Ch]
fstp	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_30]
fld	st
fld	[esp+3Ch+var_38]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
fld	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_34]
test	ah, 44h
jp	short loc_6BAA8E
fld	st(1)
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_6BAA8E
mov	eax, [esi]
fstp	st(3)
mov	eax, [eax+164h]
fstp	st(1)
push	1
fstp	st
lea	ecx, [esp+40h+var_18]
fstp	st
push	ecx
lea	edx, [esp+44h+var_28]
push	edx
mov	ecx, esi
call	eax
fld	dword ptr [eax]
fstp	[esp+3Ch+var_38]
fld	dword ptr [eax+4]
fstp	[esp+3Ch+var_34]
fld	dword ptr [eax+8]
fstp	[esp+3Ch+var_30]
fld	dword ptr [eax+0Ch]
fstp	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_30]
fld	st
fld	[esp+3Ch+var_38]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
fld	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_34]
test	ah, 44h
jp	loc_6BAA8E
fld	st(1)
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_6BAA8E
mov	edx, [esi]
fstp	st(3)
mov	edx, [edx+164h]
fstp	st(1)
push	0
fstp	st
lea	eax, [esp+40h+var_18]
fstp	st
push	eax
lea	ecx, [esp+44h+var_28]
push	ecx
mov	ecx, esi
call	edx
fld	dword ptr [eax]
fstp	[esp+3Ch+var_38]
fld	dword ptr [eax+4]
fstp	[esp+3Ch+var_34]
fld	dword ptr [eax+8]
fstp	[esp+3Ch+var_30]
fld	dword ptr [eax+0Ch]
fstp	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_30]
fld	st
fld	[esp+3Ch+var_38]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
fld	[esp+3Ch+var_2C]
fld	[esp+3Ch+var_34]
test	ah, 44h
jp	loc_6BAA8E
fld	st(1)
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_6BAA8E
mov	eax, [esi]
fstp	st(3)
mov	edx, [eax+34h]
fstp	st(1)
push	edi
fstp	st
mov	edi, [esp+40h+arg_0]
fstp	st
lea	ecx, [esp+40h+var_18]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	eax, edi
pop	edi
pop	esi
add	esp, 38h
retn	4
sub_6BAA20 endp

align 10h



sub_6BAC20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
xor	ecx, ecx
cmp	eax, ecx
jz	short loc_6BAC7E
mov	eax, [eax+2474h]
shr	eax, 1Ch
and	eax, 3
cmp	eax, 3
jz	short loc_6BAC49
cmp	eax, 1
jz	short loc_6BAC7E

loc_6BAC49:
mov	edx, [esi]
mov	edx, [edx+108h]
xor	eax, eax
mov	[esp+14h+var_8], ax
lea	eax, [esp+14h+var_10]
mov	[esp+14h+var_C], ecx
mov	[esp+14h+var_6], cl
mov	[esp+14h+var_4], cl
mov	[esp+14h+var_3], cl
push	eax
mov	ecx, esi
mov	[esp+18h+var_10], 2000h
mov	[esp+18h+var_5], 0FFh
call	edx

loc_6BAC7E:
pop	esi
add	esp, 10h
retn	4
sub_6BAC20 endp

align 10h



sub_6BAC90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_4= dword ptr  8

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
mov	ecx, [esp+14h+arg_4]
movzx	edx, byte ptr [eax+ecx+27F4h]
imul	edx, 34h
xor	ecx, ecx
cmp	[edx+eax+24E0h], cl
jz	short loc_6BAD02
mov	eax, [eax+2474h]
shr	eax, 1Ch
and	eax, 3
cmp	eax, 3
jz	short loc_6BACCD
cmp	eax, 1
jz	short loc_6BAD02

loc_6BACCD:
mov	edx, [esi]
mov	edx, [edx+108h]
xor	eax, eax
mov	[esp+14h+var_8], ax
lea	eax, [esp+14h+var_10]
mov	[esp+14h+var_C], ecx
mov	[esp+14h+var_6], cl
mov	[esp+14h+var_4], cl
mov	[esp+14h+var_3], cl
push	eax
mov	ecx, esi
mov	[esp+18h+var_10], 4000h
mov	[esp+18h+var_5], 0FFh
call	edx

loc_6BAD02:
mov	al, 1
pop	esi
add	esp, 10h
retn	0Ch
sub_6BAC90 endp

align 10h



sub_6BAD10 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 30h
fldz
push	ebp
push	esi
mov	esi, [esp+38h+arg_0]
push	edi
fst	dword ptr [esi]
mov	edi, ecx
fst	dword ptr [esi+4]
mov	eax, [edi+0B8h]
fst	dword ptr [esi+8]
xor	ebp, ebp
fstp	dword ptr [esi+0Ch]
mov	byte ptr [esp+3Ch+arg_0], 0
cmp	[eax+1Ch], ebp
jbe	loc_6BAE96
push	ebx
xor	ebx, ebx

loc_6BAD42:
mov	eax, [eax+18h]
mov	ecx, [edi+0D4h]
add	eax, ebx
test	ecx, ecx
jnz	short loc_6BAD5C
test	byte ptr [eax+50h], 8
jnz	short loc_6BAD7F
jmp	loc_6BAE82

loc_6BAD5C:
cmp	ecx, 1
jnz	short loc_6BAD6C
test	byte ptr [eax+50h], 2
jnz	short loc_6BAD7F
jmp	loc_6BAE82

loc_6BAD6C:
cmp	ecx, 2
jnz	loc_6BAE82
test	byte ptr [eax+50h], 4
jz	loc_6BAE82

loc_6BAD7F:
mov	ecx, [esp+40h+arg_4]
mov	eax, [edi]
mov	eax, [eax+160h]
push	ebp
push	ecx
lea	edx, [esp+48h+var_10]
push	edx
mov	ecx, edi
call	eax
fld	dword ptr [eax]
fstp	[esp+40h+var_20]
fld	dword ptr [eax+4]
fstp	[esp+40h+var_1C]
fld	dword ptr [eax+8]
fstp	[esp+40h+var_18]
fld	dword ptr [eax+0Ch]
fstp	[esp+40h+var_14]
fld	[esp+40h+var_18]
fld	st
fld	[esp+40h+var_20]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
fld	[esp+40h+var_14]
fld	[esp+40h+var_1C]
test	ah, 44h
jp	short loc_6BADE1
fld	st(1)
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_6BAE7A

loc_6BADE1:
cmp	byte ptr [esp+40h+arg_0], 0
jnz	short loc_6BAE03
fxch	st(2)
mov	byte ptr [esp+40h+arg_0], 1
fstp	dword ptr [esi]
fxch	st(1)
fstp	dword ptr [esi+4]
fxch	st(1)
fstp	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
jmp	loc_6BAE82

loc_6BAE03:
fld	dword ptr [esi]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BAE12
fxch	st(2)
jmp	short loc_6BAE16

loc_6BAE12:
fstp	st(2)
fld	dword ptr [esi]

loc_6BAE16:
fstp	[esp+40h+var_30]
fld	dword ptr [esi+8]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BAE2D
fstp	st(2)
fld	dword ptr [esi+8]
jmp	short loc_6BAE2F

loc_6BAE2D:
fxch	st(2)

loc_6BAE2F:
fstp	[esp+40h+var_28]
fld	dword ptr [esi+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_6BAE44
fstp	st
fld	dword ptr [esi+4]

loc_6BAE44:
fstp	[esp+40h+var_2C]
fld	dword ptr [esi+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BAE59
fstp	st
fld	dword ptr [esi+0Ch]

loc_6BAE59:
fstp	[esp+40h+var_24]
fld	[esp+40h+var_30]
fstp	dword ptr [esi]
fld	[esp+40h+var_2C]
fstp	dword ptr [esi+4]
fld	[esp+40h+var_28]
fstp	dword ptr [esi+8]
fld	[esp+40h+var_24]
fstp	dword ptr [esi+0Ch]
jmp	short loc_6BAE82

loc_6BAE7A:
fstp	st(2)
fstp	st(2)
fstp	st
fstp	st

loc_6BAE82:
mov	eax, [edi+0B8h]
inc	ebp
add	ebx, 54h
cmp	ebp, [eax+1Ch]
jb	loc_6BAD42
pop	ebx

loc_6BAE96:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 30h
retn	8
sub_6BAD10 endp

align 10h



sub_6BAEB0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

fldz
sub	esp, 30h
push	ebx
push	ebp
push	esi
mov	esi, [esp+3Ch+arg_0]
mov	ebp, ecx
fst	dword ptr [esi]
mov	eax, [ebp+0B8h]
fst	dword ptr [esi+4]
push	edi
fst	dword ptr [esi+8]
xor	edi, edi
fstp	dword ptr [esi+0Ch]
xor	bl, bl
cmp	[eax+1Ch], edi
jbe	loc_6BAFE8
lea	ecx, [ecx+0]

loc_6BAEE0:
mov	ecx, [esp+40h+arg_4]
push	edi
push	ecx
lea	edx, [esp+48h+var_10]
push	edx
mov	ecx, ebp
call	sub_6BA970
fld	dword ptr [eax]
fstp	[esp+40h+var_20]
fld	dword ptr [eax+4]
fstp	[esp+40h+var_1C]
fld	dword ptr [eax+8]
fstp	[esp+40h+var_18]
fld	dword ptr [eax+0Ch]
fstp	[esp+40h+var_14]
fld	[esp+40h+var_18]
fld	st
fld	[esp+40h+var_20]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
fld	[esp+40h+var_14]
fld	[esp+40h+var_1C]
test	ah, 44h
jp	short loc_6BAF3D
fld	st(1)
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_6BAFD0

loc_6BAF3D:
test	bl, bl
jnz	short loc_6BAF59
fxch	st(2)
mov	bl, 1
fstp	dword ptr [esi]
fxch	st(1)
fstp	dword ptr [esi+4]
fxch	st(1)
fstp	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
jmp	loc_6BAFD8

loc_6BAF59:
fld	dword ptr [esi]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BAF68
fxch	st(2)
jmp	short loc_6BAF6C

loc_6BAF68:
fstp	st(2)
fld	dword ptr [esi]

loc_6BAF6C:
fstp	[esp+40h+var_30]
fld	dword ptr [esi+8]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BAF83
fstp	st(2)
fld	dword ptr [esi+8]
jmp	short loc_6BAF85

loc_6BAF83:
fxch	st(2)

loc_6BAF85:
fstp	[esp+40h+var_28]
fld	dword ptr [esi+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_6BAF9A
fstp	st
fld	dword ptr [esi+4]

loc_6BAF9A:
fstp	[esp+40h+var_2C]
fld	dword ptr [esi+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BAFAF
fstp	st
fld	dword ptr [esi+0Ch]

loc_6BAFAF:
fstp	[esp+40h+var_24]
fld	[esp+40h+var_30]
fstp	dword ptr [esi]
fld	[esp+40h+var_2C]
fstp	dword ptr [esi+4]
fld	[esp+40h+var_28]
fstp	dword ptr [esi+8]
fld	[esp+40h+var_24]
fstp	dword ptr [esi+0Ch]
jmp	short loc_6BAFD8

loc_6BAFD0:
fstp	st(2)
fstp	st(2)
fstp	st
fstp	st

loc_6BAFD8:
mov	eax, [ebp+0B8h]
inc	edi
cmp	edi, [eax+1Ch]
jb	loc_6BAEE0

loc_6BAFE8:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	8
sub_6BAEB0 endp

align 10h



sub_6BB000 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fldz
sub	esp, 30h
push	ebp
push	esi
mov	esi, [esp+38h+arg_0]
push	edi
fst	dword ptr [esi]
mov	edi, ecx
fst	dword ptr [esi+4]
mov	eax, [edi+0B8h]
fst	dword ptr [esi+8]
xor	ebp, ebp
fstp	dword ptr [esi+0Ch]
cmp	[eax+1Ch], ebp
jbe	loc_6BB1A5
push	ebx
mov	ebx, [esp+40h+arg_8]
mov	[esp+40h+arg_0], ebp

loc_6BB033:
mov	eax, [eax+18h]
add	eax, [esp+40h+arg_0]
cmp	ebx, 3
jnz	short loc_6BB04A
test	byte ptr [eax+50h], 1
jnz	short loc_6BB07B
jmp	loc_6BB18F

loc_6BB04A:
cmp	ebx, 2
jnz	short loc_6BB059
test	[eax+50h], bl
jnz	short loc_6BB07B
jmp	loc_6BB18F

loc_6BB059:
cmp	ebx, 1
jnz	short loc_6BB069
test	byte ptr [eax+50h], 4
jnz	short loc_6BB07B
jmp	loc_6BB18F

loc_6BB069:
test	ebx, ebx
jnz	loc_6BB18F
test	byte ptr [eax+50h], 8
jz	loc_6BB18F

loc_6BB07B:
mov	ecx, [esp+40h+arg_4]
mov	eax, [edi]
mov	eax, [eax+160h]
push	ebp
push	ecx
lea	edx, [esp+48h+var_10]
push	edx
mov	ecx, edi
call	eax
fld	dword ptr [eax]
fstp	[esp+40h+var_20]
fld	dword ptr [eax+4]
fstp	[esp+40h+var_1C]
fld	dword ptr [eax+8]
fstp	[esp+40h+var_18]
fld	dword ptr [eax+0Ch]
fstp	[esp+40h+var_14]
fld	[esp+40h+var_18]
fld	st
fld	[esp+40h+var_20]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
fld	[esp+40h+var_14]
fld	[esp+40h+var_1C]
test	ah, 44h
jp	short loc_6BB0DD
fld	st(1)
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_6BB187

loc_6BB0DD:
fld	dword ptr [esi+8]
fld	dword ptr [esi]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6BB110
fld	dword ptr [esi+0Ch]
fld	dword ptr [esi+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6BB110
fxch	st(2)
fstp	dword ptr [esi]
fxch	st(1)
fstp	dword ptr [esi+4]
fxch	st(1)
fstp	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
jmp	loc_6BB18F

loc_6BB110:
fld	dword ptr [esi]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BB11F
fxch	st(2)
jmp	short loc_6BB123

loc_6BB11F:
fstp	st(2)
fld	dword ptr [esi]

loc_6BB123:
fstp	[esp+40h+var_30]
fld	dword ptr [esi+8]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BB13A
fstp	st(2)
fld	dword ptr [esi+8]
jmp	short loc_6BB13C

loc_6BB13A:
fxch	st(2)

loc_6BB13C:
fstp	[esp+40h+var_28]
fld	dword ptr [esi+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_6BB151
fstp	st
fld	dword ptr [esi+4]

loc_6BB151:
fstp	[esp+40h+var_2C]
fld	dword ptr [esi+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6BB166
fstp	st
fld	dword ptr [esi+0Ch]

loc_6BB166:
fstp	[esp+40h+var_24]
fld	[esp+40h+var_30]
fstp	dword ptr [esi]
fld	[esp+40h+var_2C]
fstp	dword ptr [esi+4]
fld	[esp+40h+var_28]
fstp	dword ptr [esi+8]
fld	[esp+40h+var_24]
fstp	dword ptr [esi+0Ch]
jmp	short loc_6BB18F

loc_6BB187:
fstp	st(2)
fstp	st(2)
fstp	st
fstp	st

loc_6BB18F:
mov	eax, [edi+0B8h]
add	[esp+40h+arg_0], 54h
inc	ebp
cmp	ebp, [eax+1Ch]
jb	loc_6BB033
pop	ebx

loc_6BB1A5:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 30h
retn	0Ch
sub_6BB000 endp




sub_6BB1B0 proc	near

var_70=	dword ptr -70h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	word ptr -38h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_28=	word ptr -28h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_23=	byte ptr -23h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	word ptr -18h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 58h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+70h]
push	edi
call	edx
mov	edi, [esp+68h+arg_0]
mov	[esp+68h+var_54], eax
add	eax, 78h
push	eax
lea	eax, [esp+6Ch+var_58]
push	eax
mov	ecx, edi
call	sub_668230
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	ecx, [esp+68h+var_58]
xor	ebx, ebx
mov	ebp, eax
mov	[esp+68h+arg_0], ebp
cmp	[ecx+10h], ebx
jbe	loc_6BB2CF
mov	eax, [edi]
mov	[esp+68h+var_10], bl
cmp	eax, 40h
jz	short loc_6BB20C
cmp	eax, 80h
jnz	loc_6BB2C6

loc_6BB20C:
mov	edx, [esi+78h]
mov	edx, [edx+2Ch]
lea	eax, [esp+68h+var_10]
push	eax
lea	eax, [esp+6Ch+var_58]
push	eax
mov	eax, [esp+70h+var_54]
lea	ecx, [esi+78h]
add	eax, 78h
push	eax
call	edx
test	al, al
jz	loc_6BB2C6
mov	eax, [esp+68h+var_54]
cmp	byte ptr [eax+7Ch], 6
jb	loc_6BB2C6
movsx	ecx, byte ptr [edi+0Bh]
push	ecx
push	esi
mov	ecx, ebp
call	sub_6836D0
test	al, al
jz	short loc_6BB2C6
push	4
lea	ecx, [ebp+2408h]
call	sub_696220
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6BB2C2
mov	edx, [edi]
mov	ecx, [edi+8]
mov	eax, [edi+4]
mov	[esp+68h+var_50], edx
mov	edx, [edi+0Ch]
mov	dword ptr [ebp+4], 2
inc	dword ptr [esi+4]
mov	[esp+68h+var_48], ecx
mov	ecx, [ebp+8]
mov	[esp+68h+var_4C], eax
mov	[esp+68h+var_44], edx
cmp	ecx, ebx
jz	short loc_6BB294
call	sub_64A400

loc_6BB294:
mov	[ebp+8], esi
mov	ecx, [ebp+0Ch]
cmp	ecx, ebx
jz	short loc_6BB2A3
call	sub_64A400

loc_6BB2A3:
mov	eax, [esp+68h+var_50]
mov	ecx, [esp+68h+var_4C]
mov	edx, [esp+68h+var_48]
mov	[ebp+0Ch], ebx
mov	[ebp+10h], eax
mov	eax, [esp+68h+var_44]
mov	[ebp+14h], ecx
mov	[ebp+18h], edx
mov	[ebp+1Ch], eax

loc_6BB2C2:
mov	ebp, [esp+68h+arg_0]

loc_6BB2C6:
lea	ecx, [esp+68h+var_10]
call	sub_652830

loc_6BB2CF:
cmp	dword ptr [edi], 40h
jnz	loc_6BB416
mov	ecx, [esp+68h+arg_4]
test	dword ptr [ecx], 10000h
jnz	short loc_6BB32B
mov	dx, [edi+8]
mov	al, [edi+0Ah]
mov	[esp+68h+var_38], dx
mov	edx, [esi]
mov	edx, [edx+108h]
mov	[esp+32h], al
lea	eax, [esp+68h+var_40]
push	eax
mov	ecx, esi
mov	[esp+6Ch+var_40], 20000h
mov	[esp+6Ch+var_3C], ebx
mov	[esp+38h], bl
mov	[esp+39h], bl
mov	[esp+37h], bl
call	edx
test	al, al
jz	short loc_6BB32B
mov	eax, [esp+68h+arg_4]
or	dword ptr [eax], 10000h

loc_6BB32B:
movsx	eax, byte ptr [edi+0Bh]
push	eax
push	esi
mov	ecx, ebp
call	sub_6836D0
test	al, al
jz	loc_6BB416
movzx	eax, word ptr [edi+8]
cmp	ax, 0Dh
jz	short loc_6BB354
cmp	ax, 20h
jnz	loc_6BB416

loc_6BB354:
mov	edx, [esi]
mov	eax, [edx+0D8h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_6BB382
mov	eax, [ebp+2474h]
shr	eax, 1Ah
and	eax, 3
cmp	eax, 3
jz	loc_6BB416
cmp	eax, 1
jnz	loc_6BB416

loc_6BB382:
mov	dl, [edi+0Bh]
mov	eax, [esi]
mov	ecx, 0Dh
mov	[esp+68h+var_28], cx
lea	ecx, [esp+68h+var_30]
mov	[esp+68h+var_25], dl
mov	edx, [eax+108h]
push	ecx
mov	ecx, esi
mov	dword ptr [esp+6Ch+var_30], 400h
mov	[esp+6Ch+var_2C], ebx
mov	[esp+6Ch+var_26], bl
mov	[esp+6Ch+var_24], bl
mov	[esp+6Ch+var_23], bl
call	edx
fldz
inc	dword ptr [esi+4]
mov	eax, [ebp+0]
mov	edx, [eax+94h]
push	ebx
push	ecx
mov	ecx, ebp
fstp	[esp+70h+var_70]
call	edx
fstp	st
mov	cl, [edi+0Bh]
mov	edx, [esi]
mov	edx, [edx+108h]
mov	eax, 0Dh
mov	[esp+68h+var_18], ax
lea	eax, [esp+68h+var_20]
mov	[esp+68h+var_15], cl
push	eax
mov	ecx, esi
mov	[esp+6Ch+var_20], 800h
mov	dword ptr [esp+6Ch+var_1C], ebx
mov	[esp+6Ch+var_16], bl
mov	[esp+6Ch+var_14], bl
mov	[esp+6Ch+var_13], bl
call	edx
mov	ecx, esi
call	sub_64A400

loc_6BB416:
mov	eax, [esp+68h+var_58]
dec	dword ptr [eax+8]
pop	edi
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
pop	esi
pop	ebp
pop	ebx
jnz	short loc_6BB42F
call	sub_650DF0

loc_6BB42F:
mov	al, 1
add	esp, 58h
retn	8
sub_6BB1B0 endp

align 10h



sub_6BB440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
push	edi
call	sub_668A00
push	eax
mov	ecx, esi
call	sub_663A90
mov	edi, [esp+0Ch+arg_4]
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_1436FAC
mov	dword ptr [ebx], offset	off_1439828
test	edi, edi
jz	short loc_6BB476
mov	ecx, edi
call	sub_64A4A0
jmp	short loc_6BB478

loc_6BB476:
xor	eax, eax

loc_6BB478:
mov	[esi+34h], eax
mov	eax, [edi]
mov	edx, [eax+70h]
mov	ecx, edi
call	edx
mov	ecx, [edi+80h]
push	ecx
add	eax, 78h
push	eax
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6BB440 endp

align 10h



sub_6BB4A0 proc	near

var_D6=	byte ptr -0D6h
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	byte ptr -0ACh
var_A8=	byte ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 0D8h
push	ebx
mov	ebx, ecx
mov	eax, [ebx+0B8h]
push	ebp
xor	ebp, ebp
cmp	[eax+1Ch], ebp
jz	loc_6BB6E2
mov	edx, [ebx+90h]
mov	eax, [edx+1Ch]
push	esi
mov	esi, [esp+0E4h+arg_0]
mov	ecx, [esi+70h]
add	eax, 18h
mov	[esi+70h], eax
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	[esp+0E4h+var_C4], ecx
push	edi
mov	ecx, ebx
call	eax
mov	edi, eax
cmp	edi, ebp
jz	loc_6BB6E0
mov	ecx, [esi+48h]
fldz
mov	edx, [ecx+0Ch]
fst	[esp+0E8h+var_9C]
mov	ecx, [esi+4]
fst	[esp+0E8h+var_98]
mov	eax, [esi]
fst	[esp+0E8h+var_94]
mov	[esp+0E8h+var_D4], edx
fstp	[esp+0E8h+var_90]
mov	edx, [esi+8]
mov	[esp+0E8h+var_BC], ecx
mov	ecx, [esi+10h]
mov	[esp+0E8h+var_C0], eax
mov	eax, [esi+0Ch]
mov	[esp+0E8h+var_B8], edx
mov	dl, [esi+14h]
mov	[esp+0E8h+var_B0], ecx
lea	ecx, [esp+0E8h+var_60]
mov	[esp+0E8h+var_A8], 0
mov	[esp+0E8h+var_7C], ebp
mov	[esp+0E8h+var_A0], ebp
mov	[esp+0E8h+var_A4], ebp
mov	[esp+0E8h+var_B4], eax
mov	[esp+0E8h+var_AC], dl
call	sub_68CFB0
lea	ecx, [esp+0E8h+var_78]
call	sub_64E8E0
lea	ecx, [esp+0E8h+var_40] ; void *
call	sub_64F7C0
mov	eax, [edi+108h]
mov	eax, [eax+1Ch]
shr	eax, 5
and	al, 1
mov	[esp+0E8h+var_D5], al
mov	eax, [ebx+0B8h]
xor	ecx, ecx
mov	[esp+0E8h+var_CC], ecx
cmp	[eax+1Ch], ebp
jbe	loc_6BB698
mov	[esp+0E8h+var_D0], ebp
nop

loc_6BB590:
mov	eax, [eax+18h]
mov	edx, [ebx+0C0h]
add	eax, [esp+0E8h+var_D0]
mov	edi, [edx+ecx*4]
mov	[esp+0E8h+var_C8], eax
cmp	edi, ebp
jz	loc_6BB67F
mov	edx, [ebx+0D4h]
cmp	edx, ebp
jnz	short loc_6BB5C1
test	byte ptr [eax+50h], 8
jnz	short loc_6BB5E4
jmp	loc_6BB67F

loc_6BB5C1:
cmp	edx, 1
jnz	short loc_6BB5D1
test	byte ptr [eax+50h], 2
jnz	short loc_6BB5E4
jmp	loc_6BB67F

loc_6BB5D1:
cmp	edx, 2
jnz	loc_6BB67F
test	byte ptr [eax+50h], 4
jz	loc_6BB67F

loc_6BB5E4:
lea	eax, [esp+0E8h+var_60]
push	eax
lea	ecx, [esp+0ECh+var_40]
push	ecx
lea	edx, [esp+0F0h+var_78]
push	edx
push	ebx
lea	eax, [esp+0F8h+var_C0]
push	eax
mov	ecx, esi
call	sub_6A7E80
mov	ecx, [esp+0E8h+var_D4]
mov	ebp, [ecx]
mov	edx, [edi]
mov	eax, [edx+14h]
mov	ecx, edi
add	ebp, 44h
call	eax
mov	ecx, [esp+0E4h+var_D0]
mov	edx, [ebp+0]
push	eax
call	edx
cmp	byte ptr [esp+0E4h+var_D4+3], 0
jz	short loc_6BB644
mov	eax, [esp+0E4h+var_C4]
push	eax
push	edi
lea	ecx, [esp+0ECh+var_A4]
push	ecx
mov	ecx, esi
call	sub_6A8370
mov	byte ptr [esp+0E4h+var_D4+2], 1
test	al, al
jnz	short loc_6BB649

loc_6BB644:
mov	byte ptr [esp+0E4h+var_D4+2], 0

loc_6BB649:
mov	edx, [edi]
mov	eax, [edx+74h]
push	esi
mov	ecx, edi
call	eax
cmp	[esp+0E8h+var_D6], 0
jz	short loc_6BB66E
mov	ecx, [esp+0E8h+var_C8]
push	0
push	ecx
push	edi
lea	edx, [esp+0F4h+var_A8]
push	edx
mov	ecx, esi
call	sub_6A87F0

loc_6BB66E:
mov	ecx, [esp+0E8h+var_D4]
mov	eax, [ecx]
mov	edx, [eax+48h]
call	edx
mov	ecx, [esp+0E8h+var_CC]
xor	ebp, ebp

loc_6BB67F:
mov	eax, [ebx+0B8h]
add	[esp+0E8h+var_D0], 54h
inc	ecx
mov	[esp+0E8h+var_CC], ecx
cmp	ecx, [eax+1Ch]
jb	loc_6BB590

loc_6BB698:
mov	eax, [esp+0E8h+var_C4]
lea	ecx, [esp+0E8h+var_C0]
push	ecx
mov	ecx, esi
mov	[esi+70h], eax
call	sub_6A80B0
mov	edx, [ebx]
mov	eax, [edx+114h]
mov	ecx, ebx
call	eax
mov	eax, [esp+0E8h+var_7C]
cmp	eax, ebp
jz	short loc_6BB6E0
mov	esi, eax
push	0FFFFFFFFh	; Value
add	eax, 4
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6BB6E0
cmp	esi, ebp
jz	short loc_6BB6E0
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_6BB6E0:
pop	edi
pop	esi

loc_6BB6E2:
pop	ebp
pop	ebx
add	esp, 0D8h
retn	4
sub_6BB4A0 endp

align 10h



sub_6BB6F0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0D8h], 0
jnz	short loc_6BB757
mov	ecx, dword_1855FC0
push	edi
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	38h
push	esi
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6BB73A
mov	edx, [esi]
mov	eax, [edx+0D0h]
push	esi
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_6BB440
mov	edi, eax
jmp	short loc_6BB73C

loc_6BB73A:
xor	edi, edi

loc_6BB73C:
mov	ecx, [esi+0D8h]
test	ecx, ecx
jz	short loc_6BB74B
call	sub_64B3B0

loc_6BB74B:
mov	[esi+0D8h], edi
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn

loc_6BB757:
mov	eax, [esi+0D8h]
pop	esi
pop	ecx
retn
sub_6BB6F0 endp



; Attributes: thunk

sub_6BB760 proc	near
jmp	sub_6BB6F0
sub_6BB760 endp

align 10h



sub_6BB770 proc	near

var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 20h
push	ebp
mov	ebp, [esp+24h+arg_4]
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
push	eax
push	ebp
push	edi
mov	esi, ecx
call	sub_6578A0
test	al, al
jz	short loc_6BB79B
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 20h
retn	0Ch

loc_6BB79B:
push	ebx
cmp	edi, 24h
jz	short loc_6BB7E9
cmp	edi, 45h
jnz	loc_6BB8E7
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6BB8E7
mov	ebx, [esi+0A0h]
shr	ebx, 0Bh
mov	ecx, ebp
and	bl, 1
call	sub_652060
mov	[ebp+4], bl
pop	ebx
pop	edi
pop	esi
mov	byte ptr [ebp+0], 2
mov	al, 1
pop	ebp
add	esp, 20h
retn	0Ch

loc_6BB7E9:
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
cmp	byte ptr [eax+7Ch], 8
jb	loc_6BB8E7
cmp	dword ptr [esi+0BCh], 0
jz	loc_6BB8D0
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	ebx, eax
mov	ecx, [ebx+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6BB838
push	ebx
mov	ecx, eax
call	sub_6E4FC0
mov	edi, eax
jmp	short loc_6BB83A

loc_6BB838:
xor	edi, edi

loc_6BB83A:
mov	eax, [esi+0BCh]
fld	dword ptr [eax+4]
lea	ecx, [esp+30h+var_20]
fld	ds:dbl_15FCE20
push	ecx
fdiv	st(1), st
push	ebx
mov	ecx, edi
fxch	st(1)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fld	dword ptr [eax+8]
fadd	dword ptr [eax]
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fdiv	st, st(2)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fld	dword ptr [eax+0Ch]
fadd	dword ptr [eax+4]
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fdiv	st, st(3)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fld	dword ptr [eax]
fdivrp	st(4), st
fxch	st(3)
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
fstp	[esp+38h+var_20]
fxch	st(1)
fstp	[esp+38h+var_18]
fstp	[esp+38h+var_10]
fstp	[esp+38h+var_8]
call	sub_6E39C0
push	edi
mov	ecx, ebp
call	sub_652E40
test	edi, edi
jz	short loc_6BB8DB
mov	ecx, edi
call	sub_64B3B0
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 20h
retn	0Ch

loc_6BB8D0:
mov	ecx, ebp
call	sub_652060
mov	byte ptr [ebp+0], 0

loc_6BB8DB:
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 20h
retn	0Ch

loc_6BB8E7:
pop	ebx
pop	edi
pop	esi
xor	al, al
pop	ebp
add	esp, 20h
retn	0Ch
sub_6BB770 endp

align 10h



sub_6BB900 proc	near

var_40=	byte ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
sub	esp, 40h
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_652330
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ebp, [esp+50h+arg_0]
cmp	ebp, 15h
mov	edi, eax
jle	short loc_6BB9A9
test	edi, edi
jz	short loc_6BB9A9
mov	ecx, esi
call	sub_6BB6F0
test	eax, eax
jz	short loc_6BB9A9
mov	ebx, [esi+0D8h]
cmp	dword ptr [ebx+2Ch], 0
jz	short loc_6BB9A9
lea	ecx, [esp+50h+var_30]
push	ecx
lea	edx, [esp+54h+var_40]
push	edx
lea	eax, [ebp+ebp*2+0]
mov	ecx, off_167D058[eax*4]
push	ecx
lea	edx, [esp+5Ch+arg_4]
push	edx
mov	ecx, edi
mov	byte ptr [esp+60h+var_30], 0
call	sub_651CB0
push	eax
push	edi
mov	ecx, ebx
call	sub_664B00
mov	bl, al
mov	eax, [esp+50h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BB98E
call	sub_650DF0

loc_6BB98E:
test	bl, bl
jz	short loc_6BB9A0
lea	eax, [esp+50h+var_30]
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_652520

loc_6BB9A0:
lea	ecx, [esp+50h+var_30]
call	sub_652830

loc_6BB9A9:
mov	ecx, [esp+50h+arg_8]
push	ecx
lea	edx, [esp+54h+var_40]
push	edx
push	ebp
mov	ecx, esi
call	sub_65A510
test	al, al
jnz	loc_6BBAE4
cmp	ebp, 24h
jz	short loc_6BBA1D
cmp	ebp, 45h
jnz	loc_6BBAF9
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6BBAF9
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, esi
call	sub_67DB20
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_6BBA1D:
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
cmp	byte ptr [eax+7Ch], 8
jb	loc_6BBAF9
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
mov	ebx, eax
push	ebx
lea	ecx, [esp+54h+var_40]
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6BBADB
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 11h
jnz	short loc_6BBADB
fldz
lea	ecx, [esp+50h+var_20]
fst	[esp+50h+var_20]
push	ecx
fst	[esp+54h+var_18]
push	ebx
fst	[esp+58h+var_10]
mov	ecx, edi
fstp	[esp+58h+var_8]
call	sub_6E3870
fld	[esp+50h+var_20]
fst	[esp+50h+arg_4]
lea	edx, [esp+50h+var_30]
fld	[esp+50h+arg_4]
push	edx
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	[esp+54h+var_30]
fld	[esp+54h+var_18]
fst	[esp+54h+arg_4]
fld	[esp+54h+arg_4]
fmul	st, st(2)
fstp	[esp+54h+var_2C]
fld	[esp+54h+var_10]
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+54h+arg_4]
fld	[esp+54h+arg_4]
fmul	st, st(1)
fstp	[esp+54h+var_28]
fld	[esp+54h+var_8]
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+54h+arg_4]
fmul	[esp+54h+arg_4]
fstp	[esp+54h+var_24]
jmp	short loc_6BBADD

loc_6BBADB:
push	0

loc_6BBADD:
mov	ecx, esi
call	sub_6B8A10

loc_6BBAE4:
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	0Ch

loc_6BBAF9:
lea	ecx, [esp+50h+var_40]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 40h
retn	0Ch
sub_6BB900 endp

align 10h



sub_6BBB10 proc	near
push	esi
mov	esi, ecx
mov	edx, [esi+0BCh]
mov	dword ptr [esi], offset	off_1439988
mov	dword ptr [esi+0Ch], offset off_143997C
mov	dword ptr [esi+78h], offset off_1439928
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esi+0D8h]
test	ecx, ecx
jz	short loc_6BBB4A
call	sub_64B3B0

loc_6BBB4A:
lea	ecx, [esi+0C0h]
call	sub_7D3200
mov	ecx, esi
pop	esi
jmp	sub_65C080
sub_6BBB10 endp

align 10h



sub_6BBB60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6BBB10
test	[esp+4+arg_0], 1
jz	short loc_6BBB7D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6BBB7D:
mov	eax, esi
pop	esi
retn	4
sub_6BBB60 endp

align 10h



sub_6BBB90 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4

sub	esp, 3Ch
push	esi
mov	esi, ecx
movzx	eax, word ptr [esi+76h]
test	eax, 100h
jnz	loc_6BBFA0
cmp	dword ptr [esi+14h], 0FFFFFFFFh
jl	loc_6BBFA0
shr	al, 4
test	al, 1
jnz	loc_6BBFA0
mov	ecx, [esi+0A0h]
mov	eax, ecx
shr	eax, 4
test	al, 1
jz	loc_6BBFA0
push	ebx
push	ebp
mov	ebp, [esp+48h+arg_0]
cmp	byte ptr [ebp+0Ch], 0
push	edi
mov	byte ptr [esp+4Ch+var_3C+3], 0
jnz	loc_6BBEAC
mov	eax, [ebp+0]
cmp	eax, 2000h
ja	short loc_6BBC4A
jz	short loc_6BBC3E
cmp	eax, 400h
jz	short loc_6BBC74
cmp	eax, 800h
jz	short loc_6BBC3E
cmp	eax, 1000h
jnz	short loc_6BBC0E

loc_6BBC04:
mov	dword ptr [esi+0D4h], 0

loc_6BBC0E:
mov	ecx, [esi+0B8h]
xor	ebx, ebx
cmp	[ecx+10h], ebx
jz	loc_6BBCA8
mov	eax, [ebp+0]
cmp	eax, 2000h
ja	short loc_6BBC8E
jz	short loc_6BBC87
cmp	eax, 400h
jz	short loc_6BBC80
cmp	eax, 800h
jnz	short loc_6BBC95
lea	eax, [ebx+3]
jmp	short loc_6BBC9C

loc_6BBC3E:
mov	dword ptr [esi+0D4h], 2
jmp	short loc_6BBC0E

loc_6BBC4A:
cmp	eax, 4000h
jz	short loc_6BBC04
cmp	eax, 8000h
jz	short loc_6BBC74
cmp	eax, 10000h
jnz	short loc_6BBC0E
shr	ecx, 0Dh
not	cl
movzx	ecx, cl
and	ecx, 1
add	ecx, ecx
mov	[esi+0D4h], ecx
jmp	short loc_6BBC0E

loc_6BBC74:
mov	dword ptr [esi+0D4h], 1
jmp	short loc_6BBC0E

loc_6BBC80:
mov	eax, 2
jmp	short loc_6BBC9C

loc_6BBC87:
mov	eax, 1
jmp	short loc_6BBC9C

loc_6BBC8E:
cmp	eax, 4000h
jz	short loc_6BBC9A

loc_6BBC95:
or	eax, 0FFFFFFFFh
jmp	short loc_6BBC9C

loc_6BBC9A:
xor	eax, eax

loc_6BBC9C:
mov	ecx, [ecx+10h]
mov	edx, [ecx]
push	eax
mov	eax, [edx+4]
push	esi
call	eax

loc_6BBCA8:
mov	eax, [ebp+0]
mov	[esp+4Ch+var_38], ebx
mov	[esp+4Ch+var_30], ebx
cmp	eax, 2000h
jnz	short loc_6BBCC4
mov	[esp+4Ch+var_38], 1
jmp	short loc_6BBD3C

loc_6BBCC4:
cmp	eax, 4000h
jnz	short loc_6BBCD5
mov	[esp+4Ch+var_38], 2
jmp	short loc_6BBD3C

loc_6BBCD5:
cmp	eax, 400h
jnz	short loc_6BBCE6
mov	[esp+4Ch+var_38], 4
jmp	short loc_6BBD3C

loc_6BBCE6:
cmp	eax, 800h
jnz	short loc_6BBCF7
mov	[esp+4Ch+var_38], 8
jmp	short loc_6BBD3C

loc_6BBCF7:
cmp	eax, 10000h
jnz	short loc_6BBD08
mov	[esp+4Ch+var_38], 10h
jmp	short loc_6BBD3C

loc_6BBD08:
cmp	eax, 8000h
jnz	short loc_6BBD19
mov	[esp+4Ch+var_38], 20h
jmp	short loc_6BBD3C

loc_6BBD19:
cmp	eax, 1000h
jnz	short loc_6BBD2A
mov	[esp+4Ch+var_38], 40h
jmp	short loc_6BBD3C

loc_6BBD2A:
cmp	eax, 20000h
jnz	short loc_6BBD3C
mov	ecx, ebp
call	sub_668250
mov	[esp+4Ch+var_30], eax

loc_6BBD3C:
mov	ecx, esi
call	sub_6B9770
mov	eax, [esi+20h]
cmp	eax, ebx
jz	loc_6BBEAC
lea	ecx, [eax+78h]
call	sub_661C50
mov	edi, eax
mov	[esp+4Ch+var_34], edi
cmp	edi, ebx
jz	loc_6BBEAC
mov	ecx, [esi+0B8h]
mov	[esp+4Ch+var_28], ebx
cmp	[ecx+28h], ebx
jbe	loc_6BBEAC
jmp	short loc_6BBD80
align 10h

loc_6BBD80:
mov	edx, [esi+0B8h]
mov	eax, [edx+24h]
mov	eax, [ebx+eax]
mov	ecx, eax
and	ecx, [esp+4Ch+var_38]
test	ecx, 0FFFF01FFh
jnz	short loc_6BBDB4
mov	ecx, [esp+4Ch+var_30]
test	ecx, ecx
jle	loc_6BBE91
sar	eax, 9
and	eax, 7Fh
cmp	eax, ecx
jnz	loc_6BBE91

loc_6BBDB4:
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	ecx, [esi+0B8h]
mov	edx, [ecx+24h]
mov	ecx, [edx+ebx+8]
mov	ebp, eax
xor	eax, eax
add	ebp, 78h
mov	[esp+4Ch+var_24], ecx
mov	[esp+4Ch+var_2C], eax
test	ecx, ecx
jbe	loc_6BBE8D
jmp	short loc_6BBDF0
align 10h

loc_6BBDF0:
lea	edi, ds:0[eax*4]
mov	eax, [esi+0B8h]
mov	ecx, [eax+24h]
mov	edx, [ecx+ebx+4]
mov	eax, [edi+edx]
cmp	dword ptr [eax+0Ch], 1
jb	short loc_6BBE65
mov	eax, [eax+8]
cmp	byte ptr [eax],	0
jz	short loc_6BBE65
mov	ecx, [ebp+0]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	20h
call	eax
test	eax, eax
jz	short loc_6BBE4C
mov	ecx, [esi+0B8h]
mov	edx, [ecx+24h]
mov	edx, [edx+ebx+4]
mov	ecx, [edx+edi]
add	edx, edi
push	ecx
push	ebp
mov	ecx, eax
call	sub_66A400
mov	edi, eax
jmp	short loc_6BBE4E

loc_6BBE4C:
xor	edi, edi

loc_6BBE4E:
mov	ecx, [esp+4Ch+var_34]
push	4
push	edi
call	sub_67F1E0
test	edi, edi
jz	short loc_6BBE65
mov	ecx, edi
call	sub_64A400

loc_6BBE65:
mov	eax, [esp+4Ch+var_2C]
mov	ecx, [esp+4Ch+var_24]
inc	eax
mov	[esp+4Ch+var_2C], eax
cmp	eax, ecx
jb	loc_6BBDF0
mov	edi, [esp+4Ch+var_34]
mov	ebp, [esp+4Ch+arg_0]
test	ecx, ecx
jbe	short loc_6BBE91
mov	byte ptr [esp+4Ch+var_3C+3], 1
jmp	short loc_6BBE91

loc_6BBE8D:
mov	ebp, [esp+4Ch+arg_0]

loc_6BBE91:
mov	eax, [esp+4Ch+var_28]
mov	edx, [esi+0B8h]
inc	eax
add	ebx, 10h
mov	[esp+4Ch+var_28], eax
cmp	eax, [edx+28h]
jb	loc_6BBD80

loc_6BBEAC:
mov	eax, [esi]
mov	edx, [eax+70h]
mov	ecx, esi
call	edx
test	eax, eax
jz	loc_6BBF92
lea	edi, [eax+78h]
push	edi
lea	eax, [esp+50h+var_34]
push	eax
mov	ecx, ebp
call	sub_668230
mov	eax, [esp+4Ch+var_34]
cmp	dword ptr [eax+10h], 0
jbe	loc_6BBF80
mov	edx, [esi+78h]
mov	edx, [edx+2Ch]
lea	eax, [esp+4Ch+var_10]
push	eax
lea	ecx, [esi+78h]
lea	eax, [esp+50h+var_34]
push	eax
push	edi
mov	byte ptr [esp+58h+var_10], 0
call	edx
test	al, al
jz	short loc_6BBF73
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
mov	byte ptr [esp+4Ch+var_3C+3], 1
call	edx
push	4
lea	ecx, [eax+2408h]
call	sub_696220
mov	edi, eax
test	edi, edi
jz	short loc_6BBF73
mov	ebx, [ebp+0]
mov	eax, [esp+4Ch+arg_0]
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	ebp, [ebp+4]
mov	dword ptr [edi+4], 2
inc	dword ptr [esi+4]
mov	[esp+4Ch+var_18], ecx
mov	ecx, [edi+8]
mov	[esp+4Ch+var_14], edx
test	ecx, ecx
jz	short loc_6BBF49
call	sub_64A400

loc_6BBF49:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6BBF58
call	sub_64A400

loc_6BBF58:
mov	eax, [esp+4Ch+var_18]
mov	ecx, [esp+4Ch+var_14]
mov	dword ptr [edi+0Ch], 0
mov	[edi+10h], ebx
mov	[edi+14h], ebp
mov	[edi+18h], eax
mov	[edi+1Ch], ecx

loc_6BBF73:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	eax, [esp+4Ch+var_34]

loc_6BBF80:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BBF92
call	sub_650DF0

loc_6BBF92:
mov	al, byte ptr [esp+4Ch+var_3C+3]
pop	edi
pop	ebp
pop	ebx
pop	esi
add	esp, 3Ch
retn	4

loc_6BBFA0:
xor	al, al
pop	esi
add	esp, 3Ch
retn	4
sub_6BBB90 endp

align 10h



sub_6BBFB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	edx, [esp+0Ch+var_4]
mov	esi, ecx
mov	ecx, dword_1855FC0
push	edx
mov	[esp+10h+var_4], 142h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0DCh
push	edi
call	eax
test	eax, eax
jz	short loc_6BBFFA
mov	edx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	ecx, [esp+10h+arg_8]
push	edi
push	ecx
push	esi
mov	ecx, eax
call	sub_6B9D70
pop	edi
pop	esi
pop	ecx
retn	0Ch

loc_6BBFFA:
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn	0Ch
sub_6BBFB0 endp

align 10h



sub_6BC010 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	edx, [ebx]
mov	ecx, eax
shl	ecx, 4
push	esi
lea	esi, [ecx+edx-10h]
test	eax, eax
jbe	short loc_6BC040
push	edi
mov	edi, eax
lea	esp, [esp+0]

loc_6BC030:
mov	ecx, esi
call	sub_6B9490
sub	esi, 10h
sub	edi, 1
jnz	short loc_6BC030
pop	edi

loc_6BC040:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
retn
sub_6BC010 endp

align 10h



sub_6BC060 proc	near

var_270= byte ptr -270h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 270h
push	ebx
push	ebp
mov	ebp, [esp+278h+arg_0]
push	esi
mov	esi, [ebp+324h]
push	edi
mov	edi, ecx
test	esi, esi
jnz	short loc_6BC080
lea	esi, [ebp+28h]

loc_6BC080:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6BC096
mov	ecx, esi
call	sub_6A9C60

loc_6BC096:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	ebx, cl
inc	eax
mov	[esi+2Ch], eax
test	ebx, ebx
jnz	short loc_6BC0B9
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 270h
retn	8

loc_6BC0B9:
mov	esi, [ebp+324h]
test	esi, esi
jnz	short loc_6BC0C6
lea	esi, [ebp+28h]

loc_6BC0C6:		; "-- action record:  "
push	offset aActionRecord
push	esi
call	nullsub_2
add	esp, 8
mov	byte ptr [edi+50h], 0
test	bl, 8
jz	short loc_6BC0EF
push	offset aHittest	; "HitTest "
push	esi
mov	byte ptr [edi+50h], 1
call	nullsub_2
add	esp, 8

loc_6BC0EF:
test	bl, 4
jz	short loc_6BC106
or	byte ptr [edi+50h], 2
push	offset aDown_3	; "Down	"
push	esi
call	nullsub_2
add	esp, 8

loc_6BC106:
test	bl, 2
jz	short loc_6BC11D
or	byte ptr [edi+50h], 4
push	offset aOver	; "Over	"
push	esi
call	nullsub_2
add	esp, 8

loc_6BC11D:
test	bl, 1
jz	short loc_6BC134
or	byte ptr [edi+50h], 8
push	offset aUp_1	; "Up "
push	esi
call	nullsub_2
add	esp, 8

loc_6BC134:		; "\n"
push	offset asc_154D83C
push	esi
call	nullsub_2
add	esp, 8
mov	ecx, ebp
call	sub_667800
mov	ecx, [esp+280h+arg_0]
movzx	ebp, ax
mov	[edi+44h], ebp
call	sub_667800
lea	edx, [edi+0Ch]
push	edx
mov	ecx, esi
mov	[edi+48h], ax
call	sub_6AA8A0
movzx	eax, word ptr [edi+48h]
push	eax
push	ebp
push	offset aCharidDButtonl ; "   CharId = %d, ButtonLayer =	%d\n"
push	esi
call	nullsub_2
push	offset aMat_0	; "   mat:\n"
push	esi
call	nullsub_2
add	esp, 18h
cmp	[esp+280h+arg_4], 22h
jnz	short loc_6BC1AC
lea	ecx, [edi+24h]
push	ecx
mov	ecx, esi
call	sub_6AAA10
push	offset aCxform	; "   cxform:\n"
push	esi
call	nullsub_2
add	esp, 8

loc_6BC1AC:
test	bl, 10h
jz	short loc_6BC201
push	offset aHasfilters ; "	 HasFilters\n"
push	esi
call	nullsub_2
add	esp, 8
push	offset sub_6562E0
push	4
push	9Ch
lea	edx, [esp+28Ch+var_270]
push	edx
call	sub_4078B0
push	4
lea	eax, [esp+284h+var_270]
push	eax
push	esi
call	sub_706670
mov	ebp, eax
add	esp, 0Ch
test	ebp, ebp
jz	short loc_6BC201
push	0
mov	ecx, edi
call	sub_658810
push	ebp
lea	ecx, [esp+284h+var_270]
push	ecx
mov	ecx, edi
call	sub_69B320

loc_6BC201:
test	bl, 20h
jz	short loc_6BC257
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 1
jge	short loc_6BC21C
mov	ecx, esi
call	sub_6A9C60

loc_6BC21C:
mov	ecx, [esi+2Ch]
mov	eax, [esi+3Ch]
mov	al, [ecx+eax]
inc	ecx
mov	[esi+2Ch], ecx
cmp	al, 1
jb	short loc_6BC231
cmp	al, 0Eh
jbe	short loc_6BC233

loc_6BC231:
mov	al, 1

loc_6BC233:
movzx	eax, al
push	eax
push	offset aHasblendingD ; "   HasBlending,	%d\n"
push	esi
mov	[edi+4Ch], eax
call	nullsub_2
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 270h
retn	8

loc_6BC257:
mov	dword ptr [edi+4Ch], 0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 270h
retn	8
sub_6BC060 endp

align 10h



sub_6BC270 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, ecx
xor	eax, eax
mov	[ebx], eax
mov	[ebx+4], eax
push	esi
mov	[ebx+8], eax
mov	ecx, [ebp+0]
push	edi
mov	edi, [ebp+4]
mov	[esp+10h+arg_0], ecx
cmp	edi, eax
jz	short loc_6BC2B8
mov	esi, [ebx+4]
lea	edx, [esi+edi]
push	edx
push	ebx
mov	ecx, ebx
call	sub_6572D0
imul	esi, 9Ch
mov	eax, [esp+10h+arg_0]
add	esi, [ebx]
push	eax
push	edi
push	esi
call	sub_657110
add	esp, 0Ch

loc_6BC2B8:
fld	dword ptr [ebp+0Ch]
lea	esi, [ebp+24h]
fstp	dword ptr [ebx+0Ch]
lea	edi, [ebx+24h]
fld	dword ptr [ebp+10h]
mov	ecx, 8
fstp	dword ptr [ebx+10h]
fld	dword ptr [ebp+14h]
fstp	dword ptr [ebx+14h]
fld	dword ptr [ebp+18h]
fstp	dword ptr [ebx+18h]
fld	dword ptr [ebp+1Ch]
fstp	dword ptr [ebx+1Ch]
fld	dword ptr [ebp+20h]
fstp	dword ptr [ebx+20h]
rep movsd
mov	ecx, [ebp+44h]
mov	[ebx+44h], ecx
mov	dx, [ebp+48h]
mov	[ebx+48h], dx
mov	eax, [ebp+4Ch]
pop	edi
mov	[ebx+4Ch], eax
mov	cl, [ebp+50h]
pop	esi
pop	ebp
mov	[ebx+50h], cl
mov	eax, ebx
pop	ebx
retn	4
sub_6BC270 endp

align 10h



sub_6BC310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6BC340
mov	eax, [edi]
test	eax, eax
jz	short loc_6BC335
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6BC335:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6BC340:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6BC371
mov	edx, [ecx]
push	ebx
mov	ebx, esi
shl	ebx, 4
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6BC371:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
shl	eax, 4
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 102h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6BC310 endp

align 10h



sub_6BC3A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6BC3F4
mov	edx, [edi]
sub	eax, esi
lea	ecx, [eax+esi]
shl	ecx, 4
push	ebx
lea	ebx, [ecx+edx-10h]
test	eax, eax
jbe	short loc_6BC3D5
push	ebp
mov	ebp, eax

loc_6BC3C5:
mov	ecx, ebx
call	sub_6B9490
sub	ebx, 10h
sub	ebp, 1
jnz	short loc_6BC3C5
pop	ebp

loc_6BC3D5:
mov	eax, [edi+8]
shr	eax, 1
pop	ebx
cmp	esi, eax
jnb	short loc_6BC40B
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_6BC310
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6BC3F4:
cmp	esi, [edi+8]
jb	short loc_6BC40B
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6BC310

loc_6BC40B:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6BC3A0 endp

align 10h



sub_6BC420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6BC450
mov	eax, [edi]
test	eax, eax
jz	short loc_6BC445
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6BC445:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6BC450:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6BC481
mov	edx, [ecx]
push	ebx
mov	ebx, esi
imul	ebx, 54h
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6BC481:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
imul	eax, 54h
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 102h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6BC420 endp

align 10h



sub_6BC4B0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	dword ptr [esi], offset	off_1439B84
test	ecx, ecx
jz	short loc_6BC4C8
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6BC4C8:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+30h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+24h]
call	sub_6BC010
mov	ecx, [esi+1Ch]
mov	edx, [esi+18h]
push	ecx
push	edx
call	sub_6B96E0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+18h]
mov	eax, [eax+30h]
add	esp, 8
push	edx
call	eax
mov	dword ptr [esi], offset	off_1436C18
pop	esi
retn
sub_6BC4B0 endp

align 10h



sub_6BC510 proc	near
mov	eax, 8100h
retn
sub_6BC510 endp

align 10h



sub_6BC520 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], offset	off_1436C18
mov	dword ptr [eax+4], 1
mov	[eax+8], ecx
mov	dword ptr [eax+0Ch], 40000h
mov	dword ptr [eax], offset	off_1439B84
mov	[eax+10h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
retn
sub_6BC520 endp

align 10h



sub_6BC560 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6BC4B0
test	[esp+4+arg_0], 1
jz	short loc_6BC57D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6BC57D:
mov	eax, esi
pop	esi
retn	4
sub_6BC560 endp

align 10h



sub_6BC590 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_30=	byte ptr -30h
var_10=	dword ptr -10h
var_C= word ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 60h
mov	eax, [esp+60h+arg_4]
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
mov	[esp+70h+var_60], ebx
cmp	eax, 7
jnz	loc_6BC7DD
xor	eax, eax
lea	ecx, [esp+70h+var_48]
mov	[esp+70h+var_54], eax
mov	[esp+70h+var_50], eax
mov	[esp+70h+var_4C], eax
call	sub_64E8E0
lea	ecx, [esp+70h+var_30]
call	sub_68CFB0
mov	edi, [esp+70h+arg_0]
push	7
push	edi
lea	ecx, [esp+78h+var_54]
mov	[esp+78h+var_10], 40000h
mov	byte ptr [esp+78h+var_4], 0
call	sub_6BC060
test	al, al
jz	loc_6BC737
xor	esi, esi

loc_6BC5F1:
xor	edi, edi
cmp	[ebx+1Ch], esi
jbe	short loc_6BC611
mov	eax, [ebx+18h]
mov	cx, [esp+70h+var_C]
add	eax, 48h

loc_6BC603:
cmp	[eax], cx
ja	short loc_6BC611
inc	edi
add	eax, 54h
cmp	edi, [ebx+1Ch]
jb	short loc_6BC603

loc_6BC611:
mov	ebp, [ebx+1Ch]
lea	ecx, [ebx+18h]
lea	esi, [ebp+1]
cmp	esi, ebp
jnb	short loc_6BC674
mov	ecx, [esp+70h+var_60]
mov	eax, ebp
sub	eax, esi
lea	edx, [eax+esi]
imul	edx, 54h
add	ecx, 18h
mov	ecx, [ecx]
lea	ebx, [edx+ecx-54h]
test	eax, eax
jbe	short loc_6BC65A
mov	[esp+70h+arg_4], eax
lea	ecx, [ecx+0]

loc_6BC640:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
sub	ebx, 54h
sub	[esp+70h+arg_4], 1
jnz	short loc_6BC640

loc_6BC65A:
mov	eax, [esp+70h+var_60]
add	eax, 18h
mov	eax, [eax+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6BC687
mov	ecx, [esp+70h+var_60]
push	esi
add	ecx, 18h
jmp	short loc_6BC681

loc_6BC674:
cmp	esi, [ecx+8]
jb	short loc_6BC687
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_6BC681:
push	ecx
call	sub_6BC420

loc_6BC687:
mov	ebx, [esp+70h+var_60]
mov	[ebx+1Ch], esi
cmp	esi, ebp
jbe	short loc_6BC6A4
sub	esi, ebp
imul	ebp, 54h
add	ebp, [ebx+18h]
push	esi
push	ebp
call	sub_6B9720
add	esp, 8

loc_6BC6A4:
mov	eax, [ebx+1Ch]
lea	ecx, [eax-1]
cmp	edi, ecx
jnb	short loc_6BC6CC
mov	ecx, [ebx+18h]
sub	eax, edi
dec	eax
mov	edx, edi
imul	eax, 54h
imul	edx, 54h
add	ecx, edx
push	eax
push	ecx
add	ecx, 54h
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_6BC6CC:
imul	edi, 54h
add	edi, [ebx+18h]
jz	short loc_6BC6E0
lea	edx, [esp+70h+var_54]
push	edx
mov	ecx, edi
call	sub_6BC270

loc_6BC6E0:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+70h+var_54]
mov	eax, [eax+30h]
push	edx
call	eax
xor	esi, esi
lea	ecx, [esp+70h+var_48]
mov	[esp+70h+var_54], esi
mov	[esp+70h+var_50], esi
mov	[esp+70h+var_4C], esi
call	sub_64E8E0
lea	ecx, [esp+70h+var_30]
call	sub_68CFB0
mov	edi, [esp+70h+arg_0]
push	7
push	edi
lea	ecx, [esp+78h+var_54]
mov	[esp+78h+var_10], 40000h
mov	byte ptr [esp+78h+var_4], 0
call	sub_6BC060
test	al, al
jnz	loc_6BC5F1

loc_6BC737:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+70h+var_54]
mov	edx, [edx+30h]
push	eax
call	edx
mov	esi, [ebx+28h]
lea	ebp, [ebx+24h]
mov	ebx, [ebp+4]
inc	esi
push	esi
push	ebp
mov	ecx, ebp
call	sub_6BC3A0
cmp	esi, ebx
jbe	short loc_6BC78A
mov	eax, ebx
shl	eax, 4
add	eax, [ebp+0]
sub	esi, ebx
jz	short loc_6BC78A
lea	ecx, [eax+0Ch]
xor	edx, edx

loc_6BC771:
cmp	eax, edx
jz	short loc_6BC77D
mov	[ecx-8], edx
mov	[ecx-4], edx
mov	[ecx], edx

loc_6BC77D:
add	eax, 10h
add	ecx, 10h
sub	esi, 1
jnz	short loc_6BC771
jmp	short loc_6BC78C

loc_6BC78A:
xor	edx, edx

loc_6BC78C:
mov	ecx, [edi+324h]
cmp	ecx, edx
jnz	short loc_6BC799
lea	ecx, [edi+28h]

loc_6BC799:
call	sub_6A9860
mov	edx, [edi+324h]
lea	ecx, [edi+28h]
test	edx, edx
jz	short loc_6BC7AF
mov	ecx, edx
jmp	short loc_6BC7B2

loc_6BC7AF:
lea	edx, [edi+28h]

loc_6BC7B2:
mov	esi, [ecx+30h]
sub	esi, [ecx+34h]
sub	esi, [ecx+2Ch]
mov	ecx, [ebp+0]
add	esi, eax
mov	eax, [ebp+4]
push	esi
push	7
shl	eax, 4
push	edx
lea	ecx, [eax+ecx-10h]
call	sub_6B9510

loc_6BC7D3:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn	8

loc_6BC7DD:
cmp	eax, 11h
jnz	short loc_6BC82F
mov	esi, [esp+70h+arg_0]
mov	edx, [esi+10h]
mov	ecx, [edx+34h]
test	ecx, ecx
jz	short loc_6BC80E
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
push	esi
call	eax
pop	edi
pop	esi
pop	ebp
mov	[ebx+10h], eax
pop	ebx
add	esp, 60h
retn	8

loc_6BC80E:
push	esi
call	sub_6B8840
push	offset aGfxbuttonchara ; "GFxButtonCharacterDef::Read: Audio libr"...
add	esi, 14h
push	esi
call	sub_6B8BE0
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn	8

loc_6BC82F:
cmp	eax, 22h
jnz	short loc_6BC7D3
mov	ebp, [esp+70h+arg_0]
mov	ecx, ebp
call	sub_6B8800
test	al, al
setnz	cl
mov	[ebx+14h], cl
mov	ecx, ebp
call	sub_667800
movzx	esi, ax
mov	eax, [ebp+324h]
xor	ecx, ecx
mov	[esp+70h+var_58], esi
cmp	eax, ecx
jnz	short loc_6BC864
lea	eax, [ebp+28h]

loc_6BC864:
mov	edx, [eax+34h]
sub	edx, [eax+30h]
mov	[esp+70h+var_54], ecx
add	edx, [eax+2Ch]
mov	[esp+70h+var_50], ecx
lea	eax, [edx+esi-2]
mov	[esp+70h+var_4C], ecx
lea	ecx, [esp+70h+var_48]
mov	[esp+70h+arg_4], eax
call	sub_64E8E0
lea	ecx, [esp+70h+var_30]
call	sub_68CFB0
push	22h
push	ebp
lea	ecx, [esp+78h+var_54]
mov	[esp+78h+var_10], 40000h
mov	byte ptr [esp+78h+var_4], 0
call	sub_6BC060
test	al, al
jz	loc_6BCA0B
add	ebx, 18h

loc_6BC8B7:
mov	ecx, [esp+70h+var_60]
xor	edi, edi
cmp	[ecx+1Ch], edi
jbe	short loc_6BC8DE
mov	eax, [ebx]
mov	dx, [esp+70h+var_C]
add	eax, 48h
lea	esp, [esp+0]

loc_6BC8D0:
cmp	[eax], dx
ja	short loc_6BC8DE
inc	edi
add	eax, 54h
cmp	edi, [ecx+1Ch]
jb	short loc_6BC8D0

loc_6BC8DE:
mov	ebp, [ecx+1Ch]
add	ecx, 18h
lea	esi, [ebp+1]
cmp	esi, ebp
jnb	short loc_6BC944
mov	ecx, [esp+70h+var_60]
mov	eax, ebp
sub	eax, esi
lea	edx, [eax+esi]
imul	edx, 54h
add	ecx, 18h
mov	ecx, [ecx]
lea	ebx, [edx+ecx-54h]
test	eax, eax
jbe	short loc_6BC92A
mov	[esp+70h+var_5C], eax
lea	ebx, [ebx+0]

loc_6BC910:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
sub	ebx, 54h
sub	[esp+70h+var_5C], 1
jnz	short loc_6BC910

loc_6BC92A:
mov	eax, [esp+70h+var_60]
add	eax, 18h
mov	eax, [eax+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6BC957
mov	ecx, [esp+70h+var_60]
push	esi
add	ecx, 18h
jmp	short loc_6BC951

loc_6BC944:
cmp	esi, [ecx+8]
jb	short loc_6BC957
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_6BC951:
push	ecx
call	sub_6BC420

loc_6BC957:
mov	ebx, [esp+70h+var_60]
add	ebx, 18h
mov	[ebx+4], esi
cmp	esi, ebp
jbe	short loc_6BC976
sub	esi, ebp
imul	ebp, 54h
add	ebp, [ebx]
push	esi
push	ebp
call	sub_6B9720
add	esp, 8

loc_6BC976:
mov	eax, [ebx+4]
lea	ecx, [eax-1]
cmp	edi, ecx
jnb	short loc_6BC99D
mov	ecx, [ebx]
sub	eax, edi
dec	eax
mov	edx, edi
imul	eax, 54h
imul	edx, 54h
add	ecx, edx
push	eax
push	ecx
add	ecx, 54h
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_6BC99D:
imul	edi, 54h
add	edi, [ebx]
jz	short loc_6BC9B0
lea	edx, [esp+70h+var_54]
push	edx
mov	ecx, edi
call	sub_6BC270

loc_6BC9B0:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+70h+var_54]
mov	eax, [eax+30h]
push	edx
call	eax
xor	eax, eax
lea	ecx, [esp+70h+var_48]
mov	[esp+70h+var_54], eax
mov	[esp+70h+var_50], eax
mov	[esp+70h+var_4C], eax
call	sub_64E8E0
lea	ecx, [esp+70h+var_30]
call	sub_68CFB0
mov	ebp, [esp+70h+arg_0]
push	22h
push	ebp
lea	ecx, [esp+78h+var_54]
mov	[esp+78h+var_10], 40000h
mov	byte ptr [esp+78h+var_4], 0
call	sub_6BC060
test	al, al
jnz	loc_6BC8B7
mov	esi, [esp+70h+var_58]

loc_6BCA0B:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+70h+var_54]
mov	edx, [edx+30h]
push	eax
call	edx
test	esi, esi
jle	loc_6BC7D3
mov	ecx, [ebp+324h]
test	ecx, ecx
jnz	short loc_6BCA32
lea	ecx, [ebp+28h]

loc_6BCA32:
mov	eax, [esp+70h+arg_4]
push	eax
call	sub_6A9D50
mov	ebx, [esp+70h+var_60]
add	ebx, 24h

loc_6BCA43:
mov	esi, [ebp+324h]
test	esi, esi
jnz	short loc_6BCA50
lea	esi, [ebp+28h]

loc_6BCA50:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_6BCA68
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6BCA68:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	esi, cx
mov	ecx, ebp
mov	[esp+70h+arg_0], esi
call	sub_667850
mov	edi, [ebx+4]
lea	edx, [eax+esi-2]
mov	eax, [esp+70h+var_60]
mov	esi, [eax+28h]
inc	esi
push	esi
push	ebx
mov	ecx, ebx
mov	[esp+78h+arg_4], edx
call	sub_6BC3A0
cmp	esi, edi
jbe	short loc_6BCAE9
mov	eax, edi
shl	eax, 4
add	eax, [ebx]
sub	esi, edi
jz	short loc_6BCAE9
lea	ecx, [eax+0Ch]
xor	edx, edx
jmp	short loc_6BCAD0
align 10h

loc_6BCAD0:
cmp	eax, edx
jz	short loc_6BCADC
mov	[ecx-8], edx
mov	[ecx-4], edx
mov	[ecx], edx

loc_6BCADC:
add	eax, 10h
add	ecx, 10h
sub	esi, 1
jnz	short loc_6BCAD0
jmp	short loc_6BCAEB

loc_6BCAE9:
xor	edx, edx

loc_6BCAEB:
mov	eax, [esp+70h+arg_0]
cmp	eax, edx
jz	short loc_6BCAF8
lea	esi, [eax-2]
jmp	short loc_6BCB15

loc_6BCAF8:
mov	ecx, [ebp+324h]
cmp	ecx, edx
jnz	short loc_6BCB05
lea	ecx, [ebp+28h]

loc_6BCB05:
call	sub_6A9860
mov	ecx, ebp
mov	esi, eax
call	sub_667850
sub	esi, eax

loc_6BCB15:
push	esi
push	22h
mov	ecx, ebp
call	sub_6677F0
mov	ecx, [ebx+4]
mov	edx, [ebx]
shl	ecx, 4
push	eax
lea	ecx, [ecx+edx-10h]
call	sub_6B9510
cmp	[esp+70h+arg_0], 0
jz	loc_6BC7D3
mov	eax, [ebp+324h]
test	eax, eax
jnz	short loc_6BCB49
lea	eax, [ebp+28h]

loc_6BCB49:
mov	ecx, eax
call	sub_6A9860
mov	ecx, ebp
mov	esi, eax
call	sub_667850
cmp	eax, esi
jge	loc_6BC7D3
mov	eax, [ebp+324h]
test	eax, eax
jnz	short loc_6BCB6E
lea	eax, [ebp+28h]

loc_6BCB6E:
mov	ecx, [esp+70h+arg_4]
push	ecx
mov	ecx, eax
call	sub_6A9D50
jmp	loc_6BCA43
sub_6BC590 endp

align 10h



sub_6BCB80 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6BCBCC
push	offset nullsub_2
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_14397E0
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_6BCBCE

loc_6BCBCC:
xor	edi, edi

loc_6BCBCE:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	58h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6BCC1B
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6B9C00
mov	ebx, eax
test	ebx, ebx
jz	short loc_6BCC1B
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6BCC1B:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 9
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6BCC49
call	sub_64B3B0

loc_6BCC49:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 2Ch
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6BCC95
mov	ecx, ebx
call	sub_64B3B0

loc_6BCC95:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6BCB80 endp

align 10h



sub_6BCCA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	short loc_6BCCFE
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 19h
jnz	short loc_6BCCFE
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6BCCFE
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6BCCDE
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6BCCE0
lea	eax, [edi+10h]
mov	ecx, eax
jmp	short loc_6BCCE4

loc_6BCCDE:
xor	edi, edi

loc_6BCCE0:
xor	eax, eax
xor	ecx, ecx

loc_6BCCE4:
push	eax
mov	eax, [esi+18h]
push	ecx
push	eax
call	sub_6C2350
mov	ecx, [esi+4]
add	esp, 0Ch
push	edi
call	sub_652E40
pop	edi
pop	esi
retn

loc_6BCCFE:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1
pop	esi
retn
sub_6BCCA0 endp

align 10h



sub_6BCD10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 0
cmp	dword ptr [esi+1Ch], 2
jl	loc_6BCF12
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
push	ebx
xor	ebx, ebx
mov	[esp+24h+arg_0], ebx
call	edx
cmp	eax, 19h
jnz	short loc_6BCD5E
mov	eax, [esi+8]
cmp	eax, ebx
jz	short loc_6BCD5A
add	eax, 0FFFFFFF0h
mov	[esp+24h+arg_0], eax
jmp	short loc_6BCD5E

loc_6BCD5A:
mov	[esp+24h+arg_0], ebx

loc_6BCD5E:
mov	edi, [esi+18h]
push	ebp
push	ebx
mov	ecx, esi
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+34h+var_18]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	ebp, 1
push	ebp
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	7
mov	ecx, esi
jnz	short loc_6BCDAA
mov	edx, [esi+18h]
push	edx
push	ebp
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
cmp	eax, ebx
jz	short loc_6BCDA6
add	[eax+4], ebp

loc_6BCDA6:
mov	ebx, eax
jmp	short loc_6BCDF0

loc_6BCDAA:
mov	edi, [esi+18h]
push	ebp
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+34h+var_14]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	ecx, [esi+18h]
push	ebx
lea	edx, [esp+2Ch+var_14]
push	edx
call	sub_669880
cmp	eax, ebx
jz	short loc_6BCDD8
add	[eax+4], ebp

loc_6BCDD8:
mov	ebx, eax
mov	eax, [esp+28h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BCDF0
call	sub_650DF0

loc_6BCDF0:
test	ebx, ebx
jz	short loc_6BCE17
mov	ecx, [esp+28h+arg_0]
mov	eax, [esp+28h+var_18]
mov	eax, [eax]
push	ecx
mov	ecx, [esi+18h]
push	0
push	eax
push	ebx
call	sub_668010
mov	ecx, eax
call	sub_699E40
jmp	loc_6BCEDE

loc_6BCE17:
mov	edx, [esi+18h]
mov	[esp+28h+var_4], offset	byte_146D660
mov	ecx, [edx+74h]
call	sub_654DD0
mov	edi, [esi+18h]
cmp	eax, 6
setnbe	al
push	ebp
mov	ecx, esi
mov	[esp+2Ch+var_8], al
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+34h+var_10]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+28h+var_10]
mov	eax, [edx]
mov	ecx, dword ptr [esp+28h+var_8]
push	ecx		; char
lea	edx, [esp+2Ch+var_4]
push	edx		; int
push	eax		; char *
call	sub_68D7B0
mov	edi, eax
mov	eax, [esp+34h+var_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 0Ch
cmp	dword ptr [eax], 0
jnz	short loc_6BCE81
call	sub_650DF0

loc_6BCE81:
mov	eax, [esp+28h+var_18]
cmp	edi, 0FFFFFFFFh
jz	short loc_6BCEFE
mov	edi, [eax]
mov	ebp, [esi+18h]
push	1
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebp
lea	ecx, [esp+34h+var_C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+28h+var_C]
mov	eax, [edx]
mov	edx, [esp+28h+arg_0]
mov	ecx, [esi+18h]
push	edx		; int
push	0		; int
push	ecx		; char
push	edi		; int
push	eax		; char *
call	sub_668010
mov	ecx, eax
call	sub_699BE0
mov	eax, [esp+28h+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BCEDE
call	sub_650DF0

loc_6BCEDE:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1
test	ebx, ebx
jz	short loc_6BCEFA
mov	ecx, ebx
call	sub_64A400

loc_6BCEFA:
mov	eax, [esp+28h+var_18]

loc_6BCEFE:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BCF10
call	sub_650DF0

loc_6BCF10:
pop	ebp
pop	ebx

loc_6BCF12:
pop	edi
pop	esi
add	esp, 18h
retn
sub_6BCD10 endp

align 10h



sub_6BCF20 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	ebx, 1
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 0
cmp	[esi+1Ch], ebx
jl	loc_6BD038
push	0
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	7
mov	ecx, esi
jnz	short loc_6BCF76
mov	eax, [esi+18h]
push	eax
push	0
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
test	eax, eax
jz	short loc_6BCFB2
add	[eax+4], ebx
mov	edi, eax
jmp	loc_6BD001

loc_6BCF76:
push	0
call	sub_651EC0
mov	al, [eax]
cmp	al, 3
jz	short loc_6BCF87
cmp	al, 4
jnz	short loc_6BCFB6

loc_6BCF87:
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	ecx, [esi+18h]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_68E580
test	eax, eax
jz	short loc_6BCFB2
add	[eax+4], ebx

loc_6BCFB2:
mov	edi, eax
jmp	short loc_6BD001

loc_6BCFB6:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+18h+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
mov	ecx, [esi+18h]
push	0
lea	eax, [esp+10h+arg_0]
push	eax
call	sub_669880
test	eax, eax
jz	short loc_6BCFE9
add	[eax+4], ebx

loc_6BCFE9:
mov	edi, eax
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BD001
call	sub_650DF0

loc_6BD001:
test	edi, edi
jz	short loc_6BD038
mov	ecx, [esi+18h]
push	0
push	0
push	offset byte_146D660
push	edi
call	sub_668010
mov	ecx, eax
call	sub_699E40
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	ecx, edi
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
jmp	sub_64A400

loc_6BD038:
pop	edi
pop	esi
pop	ebx
retn
sub_6BCF20 endp

align 10h



sub_6BD040 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
lea	edx, [edi+edi*4]
cmp	dword ptr [ecx+edx*4+8], 0FFFFFFFEh
lea	esi, [ecx+edx*4+8]
mov	eax, edi
mov	[esp+8+arg_4], ecx
jz	short loc_6BD0C7
cmp	[esi+4], edi
jnz	short loc_6BD0C7
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	ebx

loc_6BD067:
cmp	[esi+4], edi
jnz	short loc_6BD0AD
mov	edx, [ebp+0]
mov	ecx, [esi+8]
and	edx, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	edx, 8
add	ecx, 8
mov	edi, edi

loc_6BD080:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_6BD0A0
test	bl, bl
jz	short loc_6BD09C
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_6BD0A0
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_6BD080

loc_6BD09C:
xor	ecx, ecx
jmp	short loc_6BD0A5

loc_6BD0A0:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_6BD0A5:
test	ecx, ecx
jz	short loc_6BD0C0
mov	ecx, [esp+10h+arg_4]

loc_6BD0AD:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_6BD0BD
lea	edx, [eax+eax*4]
lea	esi, [ecx+edx*4+8]
jmp	short loc_6BD067

loc_6BD0BD:
or	eax, 0FFFFFFFFh

loc_6BD0C0:
pop	ebx
pop	ebp
pop	edi
pop	esi
retn	8

loc_6BD0C7:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_6BD040 endp

align 10h



sub_6BD0D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
push	edi
mov	[esi], ecx
mov	edx, [eax+4]
lea	edi, [eax+8]
lea	ebx, [esi+8]
push	edi
mov	ecx, ebx
mov	[esi+4], edx
call	sub_67ABE0
mov	eax, [edi+4]
mov	[ebx+4], eax
mov	ecx, [edi+8]
pop	edi
mov	eax, esi
pop	esi
mov	[ebx+8], ecx
pop	ebx
retn	4
sub_6BD0D0 endp

align 10h



sub_6BD110 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
push	edi
jz	short loc_6BD160
push	ebx
mov	ebx, [esp+0Ch+arg_0]
mov	eax, [ebx]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edi, [esi]
mov	edx, [edi+4]
and	edx, eax
push	edx
push	ebx
mov	ecx, esi
call	sub_6BD040
pop	ebx
test	eax, eax
jl	short loc_6BD160
lea	eax, [eax+eax*4]
lea	eax, [edi+eax*4+10h]
pop	edi
pop	esi
retn	4

loc_6BD160:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6BD110 endp

align 10h



sub_6BD170 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, [esp+18h+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	loc_6BD2D8
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 19h
jnz	loc_6BD2D7
mov	eax, [esi+8]
push	ebx
push	ebp
test	eax, eax
jz	short loc_6BD1B1
lea	ebp, [eax-10h]
jmp	short loc_6BD1B3

loc_6BD1B1:
xor	ebp, ebp

loc_6BD1B3:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6BD1DD
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	ebx, eax
jmp	short loc_6BD1DF

loc_6BD1DD:
xor	ebx, ebx

loc_6BD1DF:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+30h+var_14]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+24h+var_14]
mov	ecx, [eax]
push	ecx
lea	ecx, [esp+28h+arg_0]
call	sub_67AE10
lea	edx, [esp+24h+arg_0]
push	edx
lea	ecx, [ebp+34h]
call	sub_6BD110
test	eax, eax
jz	short loc_6BD222
lea	ebp, [eax+4]
jmp	short loc_6BD224

loc_6BD222:
xor	ebp, ebp

loc_6BD224:
mov	edi, [esp+24h+arg_0]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6BD24A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6BD24A:
test	ebp, ebp
jz	short loc_6BD2AB
mov	ecx, [ebp+0]
mov	eax, [esi+18h]
lea	edx, [esp+24h+var_10]
push	edx
push	offset aBytesloaded ; "bytesLoaded"
add	eax, 78h
mov	[esp+2Ch+var_C], ecx
lea	edi, [ebx+10h]
push	eax
mov	ecx, edi
mov	[esp+30h+var_10], 4
call	sub_669260
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [ebp+4]
mov	eax, [esi+18h]
lea	edx, [esp+24h+var_10]
push	edx
push	offset aBytestotal ; "bytesTotal"
add	eax, 78h
mov	[esp+2Ch+var_C], ecx
push	eax
mov	ecx, edi
mov	[esp+30h+var_10], 4
call	sub_669260
lea	ecx, [esp+24h+var_10]
call	sub_652830

loc_6BD2AB:
mov	ecx, [esi+4]
push	ebx
call	sub_652E40
mov	eax, [esp+24h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BD2CA
call	sub_650DF0

loc_6BD2CA:
test	ebx, ebx
jz	short loc_6BD2D5
mov	ecx, ebx
call	sub_64B3B0

loc_6BD2D5:
pop	ebp
pop	ebx

loc_6BD2D7:
pop	edi

loc_6BD2D8:
pop	esi
add	esp, 14h
retn
sub_6BD170 endp

align 10h



sub_6BD2E0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_6BD302
call	sub_7323B0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_6BD302:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_6BD310
mov	esi, 8
jmp	short loc_6BD375

loc_6BD310:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_6BD323
fadd	ds:flt_15FCC08

loc_6BD323:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	cl, byte ptr [esp+1Ch+var_8]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_6BD375:
mov	ecx, dword_1855FC0
mov	ebp, [esp+1Ch+arg_0]
lea	edx, [esp+1Ch+var_8]
push	edx
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*4]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_6BD3D4
xor	eax, eax
lea	esp, [esp+0]

loc_6BD3C0:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 14h
sub	esi, 1
jnz	short loc_6BD3C0

loc_6BD3D4:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_6BD484
mov	eax, [eax+4]
inc	eax
mov	[esp+1Ch+arg_0], ebx
mov	ebx, ds:InterlockedExchangeAdd
mov	dword ptr [esp+1Ch+var_8], eax
jmp	short loc_6BD3F6

loc_6BD3F2:
mov	edi, [esp+1Ch+var_C]

loc_6BD3F6:
mov	edx, [edi]
mov	eax, [esp+1Ch+arg_0]
cmp	dword ptr [eax+edx+8], 0FFFFFFFEh
lea	edi, [eax+edx+8]
jz	short loc_6BD45E
mov	eax, [edi+8]
lea	esi, [edi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
push	esi
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_6BD630
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6BD458
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6BD458:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6BD45E:
add	[esp+1Ch+arg_0], 14h
sub	dword ptr [esp+1Ch+var_8], 1
jnz	short loc_6BD3F2
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
xor	ebx, ebx

loc_6BD484:
mov	ecx, [esp+1Ch+arg_4]
mov	[edi], ecx
lea	ecx, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_4], ebx
call	sub_7323B0
pop	esi
pop	ebp
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_6BD2E0 endp

align 10h



sub_6BD4B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
push	ebp
push	esi
lea	esi, [ebx+8]
push	edi
mov	edi, ecx
cmp	eax, [esi+8]
jb	short loc_6BD4D0
mov	ecx, esi
call	sub_64B530

loc_6BD4D0:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6BD4E0
mov	eax, [esp+10h+arg_4]
push	eax
call	sub_651CF0

loc_6BD4E0:
test	edi, edi
jz	short loc_6BD4E9
lea	ebp, [edi+10h]
jmp	short loc_6BD4EB

loc_6BD4E9:
xor	ebp, ebp

loc_6BD4EB:
mov	ecx, [esi]
sub	ecx, [esi+4]
mov	edx, [esi+14h]
mov	eax, [ebx+78h]
push	0
sar	ecx, 4
shl	edx, 5
push	0Bh
lea	edi, [ecx+edx-20h]
mov	ecx, [eax+280h]
push	offset aOnloadstart ; "onLoadStart"
call	sub_650E40
push	edi
push	1
lea	ecx, [esp+18h+arg_0]
push	ecx
push	ebp
mov	[esp+20h+arg_0], eax
inc	dword ptr [eax+8]
push	ebx
call	sub_6C2A80
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BD543
call	sub_650DF0

loc_6BD543:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6BD55B
mov	ecx, esi
call	sub_64B660

loc_6BD55B:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6BD4B0 endp

align 10h



sub_6BD570 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
push	ebp
push	esi
lea	esi, [ebx+8]
push	edi
mov	edi, ecx
cmp	eax, [esi+8]
jb	short loc_6BD590
mov	ecx, esi
call	sub_64B530

loc_6BD590:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6BD5A0
mov	eax, [esp+10h+arg_4]
push	eax
call	sub_651CF0

loc_6BD5A0:
test	edi, edi
jz	short loc_6BD5A9
lea	ebp, [edi+10h]
jmp	short loc_6BD5AB

loc_6BD5A9:
xor	ebp, ebp

loc_6BD5AB:
mov	ecx, [esi]
sub	ecx, [esi+4]
mov	edx, [esi+14h]
mov	eax, [ebx+78h]
push	0
sar	ecx, 4
shl	edx, 5
push	0Ah
lea	edi, [ecx+edx-20h]
mov	ecx, [eax+280h]
push	offset aOnloadinit ; "onLoadInit"
call	sub_650E40
push	edi
push	1
lea	ecx, [esp+18h+arg_0]
push	ecx
push	ebp
mov	[esp+20h+arg_0], eax
inc	dword ptr [eax+8]
push	ebx
call	sub_6C2A80
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BD603
call	sub_650DF0

loc_6BD603:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6BD61B
mov	ecx, esi
call	sub_64B660

loc_6BD61B:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6BD570 endp

align 10h



sub_6BD630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_6BD645
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6BD667

loc_6BD645:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6BD66C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_6BD667:
call	sub_6BD2E0

loc_6BD66C:
mov	eax, [edi]
mov	esi, [esp+10h+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
lea	edx, [esi+esi*4]
lea	edi, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[edi], edx
jnz	short loc_6BD6B4
mov	ebp, [esp+10h+arg_4]
lea	ebx, [edi+8]
push	ebp
mov	ecx, ebx
mov	dword ptr [edi], 0FFFFFFFFh
call	sub_67ABE0
mov	eax, [ebp+4]
mov	[ebx+4], eax
mov	ecx, [ebp+8]
mov	[ebx+8], ecx
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6BD6B4:
mov	ecx, [eax+4]
mov	ebx, esi
lea	esp, [esp+0]

loc_6BD6C0:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*4]
cmp	[eax+ebp*4+8], edx
jnz	short loc_6BD6C0
lea	edx, [ebx+ebx*4]
lea	ecx, [eax+edx*4+8]
mov	edx, [edi+4]
cmp	edx, esi
jnz	short loc_6BD70F
test	ecx, ecx
jz	short loc_6BD6E4
push	edi
call	sub_6BD0D0

loc_6BD6E4:
mov	eax, [esp+10h+arg_4]
lea	ebp, [edi+8]
push	eax
mov	ecx, ebp
call	sub_67A3D0
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax+4]
mov	[ebp+4], ecx
mov	edx, [eax+8]
mov	[ebp+8], edx
mov	[edi], ebx
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6BD70F:
lea	edx, [edx+edx*4]
cmp	[eax+edx*4+8], esi
lea	ebp, [eax+edx*4+8]
jz	short loc_6BD731
lea	esp, [esp+0]

loc_6BD720:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*4+0]
cmp	[eax+edx*4+8], esi
lea	ebp, [eax+edx*4+8]
jnz	short loc_6BD720

loc_6BD731:
test	ecx, ecx
jz	short loc_6BD73B
push	edi
call	sub_6BD0D0

loc_6BD73B:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
lea	ebx, [edi+8]
push	ebp
mov	ecx, ebx
call	sub_67A3D0
mov	eax, [ebp+4]
mov	[ebx+4], eax
mov	ecx, [ebp+8]
mov	[ebx+8], ecx
mov	[edi+4], esi
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6BD630 endp

align 10h



sub_6BD770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
push	ebp
push	esi
lea	esi, [ebx+8]
push	edi
mov	edi, ecx
cmp	eax, [esi+8]
jb	short loc_6BD790
mov	ecx, esi
call	sub_64B530

loc_6BD790:
mov	eax, [esi]
test	eax, eax
jz	short loc_6BD7A0
mov	ecx, [esp+10h+arg_8]
mov	byte ptr [eax],	4
mov	[eax+4], ecx

loc_6BD7A0:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6BD7B1
mov	ecx, esi
call	sub_64B530

loc_6BD7B1:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6BD7C1
mov	edx, [esp+10h+arg_4]
push	edx
call	sub_651CF0

loc_6BD7C1:
test	edi, edi
jz	short loc_6BD7CA
lea	ebp, [edi+10h]
jmp	short loc_6BD7CC

loc_6BD7CA:
xor	ebp, ebp

loc_6BD7CC:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
mov	edx, [ebx+78h]
push	0
shl	ecx, 5
sar	eax, 4
push	0Eh
lea	edi, [eax+ecx-20h]
mov	ecx, [edx+280h]
push	offset aOnloadcomplete ; "onLoadComplete"
call	sub_650E40
push	edi
mov	[esp+14h+arg_0], eax
inc	dword ptr [eax+8]
push	2
lea	eax, [esp+18h+arg_0]
push	eax
push	ebp
push	ebx
call	sub_6C2A80
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BD824
call	sub_650DF0

loc_6BD824:
mov	ecx, [esi]
lea	edx, [ecx-20h]
cmp	edx, [esi+4]
jnb	short loc_6BD857
mov	edi, 2

loc_6BD833:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6BD84B
mov	ecx, esi
call	sub_64B660

loc_6BD84B:
sub	edi, 1
jnz	short loc_6BD833
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6BD857:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6BD770 endp




sub_6BD870 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
lea	esi, [edi+8]
mov	ebx, ecx
cmp	eax, [esi+8]
jb	short loc_6BD890
mov	ecx, esi
call	sub_64B530

loc_6BD890:
mov	eax, [esi]
test	eax, eax
jz	short loc_6BD8A0
mov	ecx, [esp+10h+arg_C]
mov	byte ptr [eax],	4
mov	[eax+4], ecx

loc_6BD8A0:
mov	edx, [edi+78h]
mov	edi, [esp+10h+arg_8]
mov	ecx, [edx+280h]
mov	eax, edi
lea	ebp, [eax+1]

loc_6BD8B2:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_6BD8B2
push	0
sub	eax, ebp
push	eax
push	edi
call	sub_650E40
mov	edi, eax
mov	ebp, 1
add	[edi+8], ebp
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6BD8DF
mov	ecx, esi
call	sub_64B530

loc_6BD8DF:
mov	eax, [esi]
test	eax, eax
jz	short loc_6BD8EE
mov	byte ptr [eax],	5
mov	[eax+4], edi
add	[edi+8], ebp

loc_6BD8EE:
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6BD8FB
mov	ecx, edi
call	sub_650DF0

loc_6BD8FB:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6BD90C
mov	ecx, esi
call	sub_64B530

loc_6BD90C:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6BD91C
mov	eax, [esp+10h+arg_4]
push	eax
call	sub_651CF0

loc_6BD91C:
test	ebx, ebx
jz	short loc_6BD925
add	ebx, 10h
jmp	short loc_6BD927

loc_6BD925:
xor	ebx, ebx

loc_6BD927:
mov	ecx, [esi]
sub	ecx, [esi+4]
mov	edx, [esi+14h]
mov	ebp, [esp+10h+arg_0]
mov	eax, [ebp+78h]
push	0
sar	ecx, 4
shl	edx, 5
push	0Bh
lea	edi, [ecx+edx-20h]
mov	ecx, [eax+280h]
push	offset aOnloaderror ; "onLoadError"
call	sub_650E40
push	edi
push	3
lea	ecx, [esp+18h+arg_0]
push	ecx
push	ebx
mov	[esp+20h+arg_0], eax
inc	dword ptr [eax+8]
push	ebp
call	sub_6C2A80
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BD983
call	sub_650DF0

loc_6BD983:
mov	ecx, esi
call	sub_66E590
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_6BD870 endp

align 10h



sub_6BD9A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6BD9B5
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6BD9D7

loc_6BD9B5:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6BD9DC
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6BD9D7:
call	sub_6BD2E0

loc_6BD9DC:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [edi+edi*4]
lea	esi, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6BDA29
mov	ebp, [esp+10h+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67ABE0
mov	eax, [ebp+4]
mov	ecx, [eax]
mov	[ebx+4], ecx
mov	edx, [eax+4]
mov	[ebx+8], edx
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6BDA29:
mov	ecx, [eax+4]
mov	ebx, edi
mov	edi, edi

loc_6BDA30:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*4]
cmp	[eax+ebp*4+8], edx
jnz	short loc_6BDA30
mov	edx, [esi+4]
lea	ecx, [ebx+ebx*4]
lea	ecx, [eax+ecx*4+8]
cmp	edx, edi
jnz	short loc_6BDA83
test	ecx, ecx
jz	short loc_6BDA54
push	esi
call	sub_6BD0D0

loc_6BDA54:
mov	edx, [esp+10h+arg_4]
mov	eax, [edx]
lea	ebp, [esi+8]
push	eax
mov	ecx, ebp
call	sub_67A3D0
mov	ecx, [esp+10h+arg_4]
mov	eax, [ecx+4]
mov	edx, [eax]
mov	[ebp+4], edx
mov	eax, [eax+4]
mov	[ebp+8], eax
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6BDA83:
lea	edx, [edx+edx*4]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jz	short loc_6BDAA1

loc_6BDA90:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*4+0]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jnz	short loc_6BDA90

loc_6BDAA1:
test	ecx, ecx
jz	short loc_6BDAAB
push	esi
call	sub_6BD0D0

loc_6BDAAB:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67A3D0
mov	eax, [ebp+4]
mov	ecx, [eax]
mov	[ebx+4], ecx
mov	edx, [eax+4]
mov	[ebx+8], edx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6BD9A0 endp

align 10h



sub_6BDAE0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6BDCA0
sub_6BDAE0 endp

align 10h



sub_6BDAF0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
mov	dword ptr [esi], offset	off_1439D0C
lea	edi, [esi+10h]
mov	dword ptr [edi], offset	off_1439CB8
mov	dword ptr [esi+34h], 0
mov	ecx, [ebx+78h]
add	ebx, 78h
push	1Dh
call	sub_66FB00
mov	edx, [edi]
push	eax
mov	eax, [edx+34h]
push	ebx
mov	ecx, edi
call	eax
push	edi
push	ebx
call	sub_6C2A50
add	esp, 8
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6BDAF0 endp

align 10h



sub_6BDB40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	38h
call	eax
test	eax, eax
jz	short loc_6BDB69
push	esi
mov	ecx, eax
call	sub_6BDAF0
pop	esi
retn	4

loc_6BDB69:
xor	eax, eax
pop	esi
retn	4
sub_6BDB40 endp

align 10h



sub_6BDB70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
push	eax
mov	dword ptr [esi], offset	off_1439D0C
mov	dword ptr [edi], offset	off_1439CB8
xor	ebx, ebx
push	ebp
mov	ecx, edi
mov	[esi+34h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+38h]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_1439D9C
mov	dword ptr [edi], offset	off_1439D48
mov	dword ptr [ecx], offset	off_1439D44
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6BDB70 endp

align 10h



sub_6BDBF0 proc	near
sub	ecx, 10h
jmp	sub_6BDC50
sub_6BDBF0 endp

align 10h



sub_6BDC00 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+3Ch]
call	sub_67C1F0
lea	ecx, [edi+48h]
call	sub_67C1F0
mov	eax, [edi+54h]
test	eax, eax
jz	short loc_6BDC4A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6BDC48
lea	ebx, [ebx+0]

loc_6BDC30:
mov	eax, [edi+54h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6BDC43
call	sub_64B3B0

loc_6BDC43:
inc	esi
cmp	esi, ebx
jb	short loc_6BDC30

loc_6BDC48:
pop	esi
pop	ebx

loc_6BDC4A:
pop	edi
retn
sub_6BDC00 endp

align 10h



sub_6BDC50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
mov	dword ptr [esi], offset	off_1439D9C
mov	dword ptr [esi+10h], offset off_1439D48
mov	dword ptr [ecx], offset	off_1439D44
call	sub_665A40
lea	ecx, [esi+34h]
call	sub_7323B0
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6BDC92
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6BDC92:
mov	eax, esi
pop	esi
retn	4
sub_6BDC50 endp

align 10h



sub_6BDCA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
call	sub_7323B0
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6BDCC7
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6BDCC7:
mov	eax, esi
pop	esi
retn	4
sub_6BDCA0 endp

align 10h



sub_6BDCD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6BDB70
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_1439C28
push	edi
lea	ecx, [esi+38h]
push	esi
mov	dword ptr [esi], offset	off_1439D9C
mov	dword ptr [esi+10h], offset off_1439D48
mov	dword ptr [ecx], offset	off_1439D44
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6BDCD0 endp

align 10h



sub_6BDD20 proc	near

arg_0= byte ptr	 4

sub	ecx, 38h
jmp	sub_6BDC50
sub_6BDD20 endp

align 10h



sub_6BDD30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	[esp+8+var_8], eax
mov	eax, [eax]
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
mov	edx, eax
mov	[esp+0Ch+var_4], ecx
and	edx, 0FFFFFFFCh
mov	ecx, [edx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
lea	eax, [esp+10h+var_8]
push	eax
push	esi
mov	ecx, esi
call	sub_6BD9A0
pop	esi
add	esp, 8
retn	8
sub_6BDD30 endp

align 10h



sub_6BDD80 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+54h]
test	eax, eax
jz	short loc_6BDDAB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+54h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6BDDAB:
lea	ecx, [esi+34h]
call	sub_7323B0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6BDD80 endp

align 10h



sub_6BDDC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_4]
push	edi
mov	edi, [esp+18h+arg_C]
mov	ebx, ecx
test	esi, esi
jz	short loc_6BDE50
lea	ecx, [esp+18h+arg_C]
call	sub_679E30
lea	eax, [esp+18h+arg_C]
push	eax
mov	ecx, esi
call	sub_6577E0
lea	ecx, [esp+18h+arg_C]
lea	esi, [ebx+34h]
push	ecx
mov	ecx, esi
call	sub_6BD110
test	eax, eax
jz	short loc_6BDE0D
add	eax, 4
jz	short loc_6BDE0D
mov	edx, [esp+18h+arg_8]
mov	[eax], edx
mov	[eax+4], edi
jmp	short loc_6BDE2A

loc_6BDE0D:
mov	eax, [esp+18h+arg_8]
lea	ecx, [esp+18h+var_8]
push	ecx
lea	edx, [esp+1Ch+arg_C]
push	edx
mov	ecx, esi
mov	[esp+20h+var_8], eax
mov	[esp+20h+var_4], edi
call	sub_6BDD30

loc_6BDE2A:
mov	esi, [esp+18h+arg_C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6BDE50
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6BDE50:
mov	ebp, [esp+18h+arg_0]
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6BDE6A
mov	ecx, esi
call	sub_64B530

loc_6BDE6A:
mov	eax, [esi]
test	eax, eax
jz	short loc_6BDE76
mov	byte ptr [eax],	4
mov	[eax+4], edi

loc_6BDE76:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6BDE87
mov	ecx, esi
call	sub_64B530

loc_6BDE87:
mov	eax, [esi]
test	eax, eax
jz	short loc_6BDE97
mov	ecx, [esp+18h+arg_8]
mov	byte ptr [eax],	4
mov	[eax+4], ecx

loc_6BDE97:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6BDEA8
mov	ecx, esi
call	sub_64B530

loc_6BDEA8:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6BDEB8
mov	edx, [esp+18h+arg_4]
push	edx
call	sub_651CF0

loc_6BDEB8:
test	ebx, ebx
jz	short loc_6BDEC1
add	ebx, 10h
jmp	short loc_6BDEC3

loc_6BDEC1:
xor	ebx, ebx

loc_6BDEC3:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
mov	edx, [ebp+78h]
push	0
shl	ecx, 5
sar	eax, 4
push	0Eh
lea	edi, [eax+ecx-20h]
mov	ecx, [edx+280h]
push	offset aOnloadprogress ; "onLoadProgress"
call	sub_650E40
push	edi
mov	[esp+1Ch+arg_8], eax
inc	dword ptr [eax+8]
push	3
lea	eax, [esp+20h+arg_8]
push	eax
push	ebx
push	ebp
call	sub_6C2A80
mov	eax, [esp+2Ch+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BDF1B
call	sub_650DF0

loc_6BDF1B:
mov	ecx, esi
call	sub_66E590
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	10h
sub_6BDDC0 endp

align 10h



sub_6BDF30 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6BDF7C
push	offset sub_6BCCA0
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_1439C48
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_6BDF7E

loc_6BDF7C:
xor	edi, edi

loc_6BDF7E:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	58h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6BDFCB
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6BDCD0
mov	ebx, eax
test	ebx, ebx
jz	short loc_6BDFCB
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6BDFCB:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 1Dh
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6BDFF9
call	sub_64B3B0

loc_6BDFF9:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 7Ch
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6BE045
mov	ecx, ebx
call	sub_64B3B0

loc_6BE045:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6BDF30 endp

align 10h



sub_6BE050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
push	0
push	edi
lea	eax, [ebx+78h]
push	eax
mov	esi, ecx
call	sub_6657C0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esp+0Ch+arg_4]
push	ecx
push	edx
push	edi
push	ebx
mov	ecx, esi
mov	byte ptr [esp+1Ch+arg_4], 0
call	sub_665190
pop	edi
pop	esi
pop	ebx
retn	10h
sub_6BE050 endp

align 10h



sub_6BE090 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6BE0BA
push	0
push	0
push	offset aLoadvars ; "LoadVars"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6BE0BA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6BE0C6
lea	ecx, [eax-10h]
jmp	short loc_6BE0C8

loc_6BE0C6:
xor	ecx, ecx

loc_6BE0C8:
fldz
mov	esi, [esi+4]
fcomp	qword ptr [ecx+38h]
fnstsw	ax
test	ah, 41h
jnz	short loc_6BE0E6
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
add	esp, 8
retn

loc_6BE0E6:
cmp	byte ptr [esi],	5
fld	qword ptr [ecx+38h]
fstp	[esp+0Ch+var_8]
jb	short loc_6BE0F9
mov	ecx, esi
call	sub_652060

loc_6BE0F9:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6BE090 endp

align 10h



sub_6BE110 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6BE13A
push	0
push	0
push	offset aLoadvars ; "LoadVars"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6BE13A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6BE146
lea	ecx, [eax-10h]
jmp	short loc_6BE148

loc_6BE146:
xor	ecx, ecx

loc_6BE148:
fldz
mov	esi, [esi+4]
fcomp	qword ptr [ecx+40h]
fnstsw	ax
test	ah, 41h
jnz	short loc_6BE166
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
add	esp, 8
retn

loc_6BE166:
cmp	byte ptr [esi],	5
fld	qword ptr [ecx+40h]
fstp	[esp+0Ch+var_8]
jb	short loc_6BE179
mov	ecx, esi
call	sub_652060

loc_6BE179:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6BE110 endp

align 10h



sub_6BE190 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 0
jnz	short loc_6BE1AE
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0

loc_6BE1AC:
pop	esi
retn

loc_6BE1AE:
push	1Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6BE1CD
push	0
push	0
push	offset aLoadvars ; "LoadVars"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_6BE1CD:
push	ebx
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_6BE1DB
add	edi, 0FFFFFFF0h
jmp	short loc_6BE1DD

loc_6BE1DB:
xor	edi, edi

loc_6BE1DD:
mov	ebx, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
fldz
fstp	qword ptr [edi+38h]
push	0
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
mov	ecx, [esi+18h]
push	eax
push	edi
call	sub_668010
mov	ecx, eax
call	sub_695F80
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebx
jnz	loc_6BE1AC
pop	esi
jmp	sub_650DF0
sub_6BE190 endp

align 10h



sub_6BE250 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	short loc_6BE29A
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 1Bh
jnz	short loc_6BE29A
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6BE29A
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6BE28D
mov	ecx, [esi+4]
add	eax, 0FFFFFFF0h
push	eax
call	sub_652E40
pop	esi
retn

loc_6BE28D:
mov	ecx, [esi+4]
xor	eax, eax
push	eax
call	sub_652E40
pop	esi
retn

loc_6BE29A:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1
pop	esi
retn
sub_6BE250 endp

align 10h



sub_6BE2B0 proc	near
mov	eax, 1Bh
retn
sub_6BE2B0 endp

align 10h



sub_6BE2C0 proc	near
add	ecx, 38h
jmp	sub_665AD0
sub_6BE2C0 endp

align 10h



sub_6BE2D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+48h]
mov	dword ptr [esi], offset	off_143A014
mov	dword ptr [esi+10h], offset off_1439FC0
mov	dword ptr [ecx], offset	off_1439E58
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6BE30A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6BE30A:
mov	eax, esi
pop	esi
retn	4
sub_6BE2D0 endp




sub_6BE310 proc	near

arg_0= byte ptr	 4

sub	ecx, 48h
jmp	sub_6BE2D0
sub_6BE310 endp

align 10h



sub_6BE320 proc	near
sub	ecx, 10h
jmp	sub_6BE2D0
sub_6BE320 endp

align 10h



sub_6BE330 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, dword_1855FC0
sub	esp, 20h
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esp+28h+var_18]
call	sub_679B40
lea	ecx, [esp+24h+var_20]
call	sub_679E30
mov	ecx, [esp+24h+arg_0]
mov	eax, [ecx]
mov	ecx, [eax+10h]
lea	edx, [esp+24h+var_20]
push	edx
mov	edx, [eax]
push	ecx
push	edx
call	sub_667DC0
mov	eax, [esp+30h+var_20]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
add	esp, 0Ch
and	ecx, 7FFFFFFFh
push	ecx
add	eax, 8
push	eax
lea	ecx, [esp+2Ch+var_18]
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_156FC2C ; "="
lea	ecx, [esp+2Ch+var_18]
call	sub_679D10
lea	ecx, [esp+24h+var_20]
call	sub_67A720
mov	edx, [esi+4]
mov	ecx, [esp+24h+arg_4]
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+30h+var_1C]
push	eax
call	sub_652F60
mov	eax, [esp+24h+var_1C]
mov	edx, [eax+10h]
mov	eax, [eax]
lea	ecx, [esp+24h+var_20]
push	ecx
push	edx
push	eax
call	sub_667DC0
mov	eax, [esp+30h+var_20]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
add	esp, 0Ch
and	ecx, 7FFFFFFFh
push	ecx
add	eax, 8
push	eax
lea	ecx, [esp+2Ch+var_18]
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_155DDEC ; "&"
lea	ecx, [esp+2Ch+var_18]
call	sub_679D10
mov	ecx, [esi+8]
lea	edx, [esp+24h+var_18]
push	edx
call	sub_67A4B0
mov	eax, [esp+24h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BE41C
call	sub_650DF0

loc_6BE41C:
mov	esi, [esp+24h+var_20]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6BE442
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6BE442:
lea	ecx, [esp+24h+var_18]
call	sub_679B60
pop	esi
add	esp, 20h
retn	0Ch
sub_6BE330 endp

align 10h



sub_6BE460 proc	near

var_49=	byte ptr -49h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, dword_1855FC0
sub	esp, 4Ch
push	esi
push	eax
lea	ecx, [esp+54h+var_30]
call	sub_679B40
mov	ecx, dword_1855FC0
push	ecx
lea	ecx, [esp+54h+var_18]
call	sub_679B40
mov	esi, [esp+50h+arg_8]
mov	edx, [esi]
and	edx, 0FFFFFFFCh
test	dword ptr [edx], 7FFFFFFFh
jnz	short loc_6BE4AD
lea	ecx, [esp+50h+var_18]
call	sub_679B60
lea	ecx, [esp+50h+var_30]
call	sub_679B60
xor	al, al
pop	esi
add	esp, 4Ch
retn

loc_6BE4AD:
push	ebx
push	ebp
push	edi
lea	eax, [esp+5Ch+var_44]
push	eax
push	0
mov	ecx, esi
mov	bl, 1
call	sub_6799C0
mov	ebp, [esp+5Ch+arg_4]
mov	edi, [esp+5Ch+arg_0]
test	eax, eax
jz	loc_6BE5DD

loc_6BE4D0:
cmp	eax, 0Dh
jnz	short loc_6BE4F2
mov	eax, 0Ah

loc_6BE4DA:
test	bl, bl
jz	loc_6BE5BF
cmp	eax, 3Dh
jnz	loc_6BE5B9
xor	bl, bl
jmp	loc_6BE5C9

loc_6BE4F2:
cmp	eax, 26h
jnz	short loc_6BE4DA
mov	eax, [esp+5Ch+var_18]
test	eax, eax
jnz	short loc_6BE504
mov	eax, offset byte_146D660

loc_6BE504:
mov	edx, [esp+5Ch+var_14]
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	edx
push	eax
call	sub_650F20
mov	esi, eax
mov	ebx, 1
add	[esi+8], ebx
mov	[esp+5Ch+var_40], 5
mov	[esp+5Ch+var_3C], esi
add	[esi+8], ebx
mov	eax, [esp+5Ch+var_30]
mov	[esp+5Ch+var_49], 0
test	eax, eax
jnz	short loc_6BE540
mov	eax, offset byte_146D660

loc_6BE540:
mov	edx, [esp+5Ch+var_2C]
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	edx
push	eax
call	sub_650F20
lea	ecx, [esp+5Ch+var_49]
push	ecx
lea	edx, [esp+60h+var_40]
push	edx
mov	[esp+64h+var_48], eax
add	[eax+8], ebx
mov	eax, [ebp+0]
mov	edx, [eax+0Ch]
lea	ecx, [esp+64h+var_48]
push	ecx
push	edi
mov	ecx, ebp
call	edx
mov	eax, [esp+5Ch+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BE58B
call	sub_650DF0

loc_6BE58B:
lea	ecx, [esp+5Ch+var_40]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BE5A1
mov	ecx, esi
call	sub_650DF0

loc_6BE5A1:
lea	ecx, [esp+5Ch+var_30]
call	sub_679C50
lea	ecx, [esp+5Ch+var_18]
call	sub_679C50
mov	esi, [esp+5Ch+arg_8]
jmp	short loc_6BE5C9

loc_6BE5B9:
lea	ecx, [esp+5Ch+var_30]
jmp	short loc_6BE5C3

loc_6BE5BF:
lea	ecx, [esp+5Ch+var_18]

loc_6BE5C3:
push	eax
call	sub_679C60

loc_6BE5C9:
lea	eax, [esp+5Ch+var_44]
push	eax
mov	ecx, esi
call	sub_679A00
test	eax, eax
jnz	loc_6BE4D0

loc_6BE5DD:
lea	ecx, [esp+5Ch+var_30]
call	sub_679B80
test	eax, eax
jbe	loc_6BE698
mov	eax, [esp+5Ch+var_18]
test	eax, eax
jnz	short loc_6BE5FB
mov	eax, offset byte_146D660

loc_6BE5FB:
mov	edx, [esp+5Ch+var_14]
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	edx
push	eax
call	sub_650F20
mov	esi, eax
mov	ebx, 1
add	[esi+8], ebx
mov	[esp+5Ch+var_40], 5
mov	[esp+5Ch+var_3C], esi
add	[esi+8], ebx
mov	eax, [esp+5Ch+var_30]
mov	byte ptr [esp+5Ch+arg_8], 0
test	eax, eax
jnz	short loc_6BE637
mov	eax, offset byte_146D660

loc_6BE637:
mov	edx, [esp+5Ch+var_2C]
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	edx
push	eax
call	sub_650F20
lea	ecx, [esp+5Ch+arg_8]
push	ecx
lea	edx, [esp+60h+var_40]
push	edx
mov	[esp+64h+var_48], eax
add	[eax+8], ebx
mov	eax, [ebp+0]
mov	edx, [eax+0Ch]
lea	ecx, [esp+64h+var_48]
push	ecx
push	edi
mov	ecx, ebp
call	edx
mov	eax, [esp+5Ch+var_48]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BE682
call	sub_650DF0

loc_6BE682:
lea	ecx, [esp+5Ch+var_40]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BE698
mov	ecx, esi
call	sub_650DF0

loc_6BE698:
lea	ecx, [esp+5Ch+var_18]
call	sub_679B60
lea	ecx, [esp+5Ch+var_30]
call	sub_679B60
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
add	esp, 4Ch
retn
sub_6BE460 endp

align 10h



sub_6BE6C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+64h]
test	eax, eax
jz	short loc_6BE6EB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+64h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6BE6EB:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6BE6C0 endp

align 10h



sub_6BE700 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Bh
mov	ecx, esi
call	sub_651C40
mov	ecx, esi
test	al, al
jnz	short loc_6BE724
push	0
push	0
push	offset aLoadvars ; "LoadVars"
call	sub_651C60
pop	esi
retn

loc_6BE724:
call	sub_651C20
test	eax, eax
jz	short loc_6BE73E
add	eax, 0Ch
push	offset aLoadvars_addre ; "LoadVars.addRequestHeader is not implem"...
push	eax
call	sub_650A10
add	esp, 8

loc_6BE73E:
pop	esi
retn
sub_6BE700 endp




sub_6BE740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
cmp	dword ptr [esi+1Ch], 0
jle	loc_6BE81F
push	1Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6BE770
push	0
push	0
push	offset aLoadvars ; "LoadVars"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_6BE770:
mov	eax, [esi+8]
push	ebx
test	eax, eax
jz	short loc_6BE77D
lea	ebx, [eax-10h]
jmp	short loc_6BE77F

loc_6BE77D:
xor	ebx, ebx

loc_6BE77F:
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+1Ch+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+10h+arg_0]
call	sub_679E30
mov	edx, [esp+10h+var_4]
mov	edi, [edx]
lea	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [esp+14h+var_4]
call	sub_650650
push	eax
push	edi
call	sub_667E00
add	esp, 0Ch
pop	edi
test	ebx, ebx
jz	short loc_6BE7CE
lea	eax, [ebx+10h]
jmp	short loc_6BE7D0

loc_6BE7CE:
xor	eax, eax

loc_6BE7D0:
mov	edx, [esi+18h]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
push	eax
push	edx
call	sub_6BE460
mov	esi, [esp+18h+arg_0]
add	esp, 0Ch
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
pop	ebx
jnz	short loc_6BE809
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6BE809:
mov	eax, [esp+8+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BE81F
call	sub_650DF0

loc_6BE81F:
pop	esi
pop	ecx
retn
sub_6BE740 endp

align 10h



sub_6BE830 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Bh
mov	ecx, esi
call	sub_651C40
mov	ecx, esi
test	al, al
jnz	short loc_6BE854
push	0
push	0
push	offset aLoadvars ; "LoadVars"
call	sub_651C60
pop	esi
retn

loc_6BE854:
call	sub_651C20
test	eax, eax
jz	short loc_6BE86E
add	eax, 0Ch
push	offset aLoadvars_sendI ; "LoadVars.send	is not implemented."
push	eax
call	sub_650A10
add	esp, 8

loc_6BE86E:
pop	esi
retn
sub_6BE830 endp




sub_6BE870 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Bh
mov	ecx, esi
call	sub_651C40
mov	ecx, esi
test	al, al
jnz	short loc_6BE894
push	0
push	0
push	offset aLoadvars ; "LoadVars"
call	sub_651C60
pop	esi
retn

loc_6BE894:
call	sub_651C20
test	eax, eax
jz	short loc_6BE8AE
add	eax, 0Ch
push	offset aLoadvars_senda ; "LoadVars.sendAndLoad is not implemented"...
push	eax
call	sub_650A10
add	esp, 8

loc_6BE8AE:
pop	esi
retn
sub_6BE870 endp




sub_6BE8B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	edi
mov	edi, [esp+14h+arg_0]
push	1Bh
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6BE8DA
push	0
push	0
push	offset aLoadvars ; "LoadVars"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 10h
retn

loc_6BE8DA:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6BE8E7
lea	esi, [eax-10h]
jmp	short loc_6BE8E9

loc_6BE8E7:
xor	esi, esi

loc_6BE8E9:
lea	ecx, [esp+18h+var_10]
call	sub_679E30
mov	eax, [edi+18h]
lea	ecx, [esp+18h+var_10]
push	0
mov	[esp+1Ch+var_4], ecx
lea	ecx, [esi+10h]
mov	[esp+1Ch+var_8], eax
push	0
lea	esi, [esp+20h+var_C]
add	eax, 78h
mov	[esp+20h+var_C], offset	off_1439E5C
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+20h]
call	eax
push	1
lea	ecx, [esp+1Ch+var_10]
call	sub_679930
dec	eax
push	eax
lea	ecx, [esp+20h+var_10]
call	sub_67A600
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	eax, [esp+18h+var_10]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_6BE974
mov	ecx, edi
call	sub_652060

loc_6BE974:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BE98A
mov	ecx, esi
call	sub_650DF0

loc_6BE98A:
mov	esi, [esp+18h+var_10]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
mov	[esp+20h+var_C], offset	off_15818F8
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6BE9B8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6BE9B8:
pop	esi
pop	edi
add	esp, 10h
retn
sub_6BE8B0 endp

align 10h



sub_6BE9C0 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+4Ch]
call	sub_67C070
lea	ecx, [edi+58h]
call	sub_67C070
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6BEA3D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6BEA3B
lea	ebx, [ebx+0]

loc_6BE9F0:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6BEA36
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6BEA36
test	eax, 0FFFFFFFh
jbe	short loc_6BEA21
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6BEA2D

loc_6BEA21:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6BEA2D:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6BEA36:
inc	esi
cmp	esi, ebx
jb	short loc_6BE9F0

loc_6BEA3B:
pop	esi
pop	ebx

loc_6BEA3D:
pop	edi
retn
sub_6BE9C0 endp

align 10h



sub_6BEA40 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
push	ebp
mov	ebp, [esp+1Ch+arg_0]
push	esi
push	edi
push	ebp
mov	ebx, ecx
call	sub_663BE0
lea	edi, [ebx+10h]
mov	dword ptr [ebx], offset	off_1439230
mov	dword ptr [edi], offset	off_1439F30
mov	ecx, [ebp+78h]
lea	esi, [ebp+78h]
push	1Fh
call	sub_66FB00
push	eax
push	esi
mov	ecx, edi
call	sub_64B8D0
push	edi
push	esi
call	sub_6C2A50
fld	ds:dbl_15FCD60
push	edi
fst	qword ptr [ebx+38h]
push	edi
fstp	qword ptr [ebx+40h]
push	ebp
call	sub_6C2350
mov	eax, [esi]
add	esp, 14h
push	0
push	21h
mov	byte ptr [esp+2Ch+arg_0], 1
mov	ecx, [eax+280h]
push	offset aApplicationX_0 ; "application/x-www-form-urlencoded"
call	sub_650E40
mov	ebp, eax
mov	eax, 1
add	[ebp+8], eax
mov	[esp+24h+var_10], 5
mov	[esp+24h+var_C], ebp
add	[ebp+8], eax
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	0Bh
push	offset aContenttype ; "contentType"
call	sub_650E40
mov	[esp+24h+var_14], eax
inc	dword ptr [eax+8]
lea	edx, [esp+24h+arg_0]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+var_14]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BEB11
call	sub_650DF0

loc_6BEB11:
lea	ecx, [esp+24h+var_10]
call	sub_652830
add	dword ptr [ebp+8], 0FFFFFFFFh
jnz	short loc_6BEB27
mov	ecx, ebp
call	sub_650DF0

loc_6BEB27:
mov	edx, [esi]
push	0
push	6
mov	byte ptr [esp+2Ch+arg_0], 1
mov	[esp+2Ch+var_10], 0
mov	ecx, [edx+280h]
push	offset aLoaded_0 ; "loaded"
call	sub_650E40
mov	[esp+24h+var_14], eax
inc	dword ptr [eax+8]
lea	eax, [esp+24h+arg_0]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+var_14]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BEB7B
call	sub_650DF0

loc_6BEB7B:
lea	ecx, [esp+24h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 14h
retn	4
sub_6BEA40 endp




sub_6BEB90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	48h
call	eax
test	eax, eax
jz	short loc_6BEBB9
push	esi
mov	ecx, eax
call	sub_6BEA40
pop	esi
retn	4

loc_6BEBB9:
xor	eax, eax
pop	esi
retn	4
sub_6BEB90 endp

align 10h



sub_6BEBC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_1439F30
call	sub_64B8D0
fld	ds:dbl_15FCD60
mov	edx, [esp+0Ch+arg_8]
fst	qword ptr [esi+38h]
lea	ecx, [esi+48h]
fstp	qword ptr [esi+40h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143A014
mov	dword ptr [edi], offset	off_1439FC0
mov	dword ptr [ecx], offset	off_1439E58
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6BEBC0 endp

align 10h



sub_6BEC40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
push	ebp
push	esi
lea	esi, [ebx+8]
push	edi
mov	ebp, ecx
cmp	eax, [esi+8]
jb	short loc_6BEC60
mov	ecx, esi
call	sub_64B530

loc_6BEC60:
mov	eax, [esi]
test	eax, eax
jz	short loc_6BEC75
mov	ecx, [esp+10h+arg_4]
mov	byte ptr [eax],	5
mov	ecx, [ecx]
mov	[eax+4], ecx
inc	dword ptr [ecx+8]

loc_6BEC75:
test	ebp, ebp
jz	short loc_6BEC7E
add	ebp, 10h
jmp	short loc_6BEC80

loc_6BEC7E:
xor	ebp, ebp

loc_6BEC80:
mov	edx, [esi]
sub	edx, [esi+4]
mov	eax, [esi+14h]
mov	ecx, [ebx+78h]
mov	ecx, [ecx+280h]
push	0
push	6
sar	edx, 4
shl	eax, 5
push	offset aOndata	; "onData"
lea	edi, [edx+eax-20h]
call	sub_650E40
push	edi
push	1
lea	edx, [esp+18h+arg_0]
push	edx
push	ebp
mov	[esp+20h+arg_0], eax
inc	dword ptr [eax+8]
push	ebx
call	sub_6C2A80
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BECD8
call	sub_650DF0

loc_6BECD8:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6BECF0
mov	ecx, esi
call	sub_64B660

loc_6BECF0:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6BEC40 endp

align 10h



sub_6BED00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
push	ebp
push	esi
lea	esi, [ebx+8]
push	edi
mov	ebp, ecx
cmp	eax, [esi+8]
jb	short loc_6BED20
mov	ecx, esi
call	sub_64B530

loc_6BED20:
mov	eax, [esi]
test	eax, eax
jz	short loc_6BED30
mov	cl, byte ptr [esp+10h+arg_4]
mov	byte ptr [eax],	2
mov	[eax+4], cl

loc_6BED30:
test	ebp, ebp
jz	short loc_6BED39
add	ebp, 10h
jmp	short loc_6BED3B

loc_6BED39:
xor	ebp, ebp

loc_6BED3B:
mov	edx, [esi]
sub	edx, [esi+4]
mov	eax, [esi+14h]
mov	ecx, [ebx+78h]
mov	ecx, [ecx+280h]
push	0
push	6
sar	edx, 4
shl	eax, 5
push	offset aOnload	; "onLoad"
lea	edi, [edx+eax-20h]
call	sub_650E40
push	edi
push	1
lea	edx, [esp+18h+arg_4]
push	edx
push	ebp
mov	[esp+20h+arg_4], eax
inc	dword ptr [eax+8]
push	ebx
call	sub_6C2A80
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BED93
call	sub_650DF0

loc_6BED93:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6BEDAB
mov	ecx, esi
call	sub_64B660

loc_6BEDAB:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6BED00 endp

align 10h



sub_6BEDC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
push	1Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6BEDEA
push	0
push	0
push	offset aLoadvars ; "LoadVars"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 0Ch
retn

loc_6BEDEA:
mov	eax, [esi+8]
push	ebx
push	edi
test	eax, eax
jz	short loc_6BEDF8
lea	ebx, [eax-10h]
jmp	short loc_6BEDFA

loc_6BEDF8:
xor	ebx, ebx

loc_6BEDFA:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+24h+var_C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+18h+var_C]
mov	eax, [edx]
push	eax
lea	ecx, [esp+1Ch+var_4]
call	sub_67AE10
mov	eax, [esp+18h+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BEE3D
call	sub_650DF0

loc_6BEE3D:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+18h+var_8]
mov	eax, [edx]
push	eax
lea	ecx, [esp+1Ch+var_C]
call	sub_67AE10
test	ebx, ebx
jz	short loc_6BEE73
lea	eax, [ebx+10h]
jmp	short loc_6BEE75

loc_6BEE73:
xor	eax, eax

loc_6BEE75:
mov	edx, [esi+18h]
lea	ecx, [esp+18h+var_C]
push	ecx
push	eax
push	edx
call	sub_6BE460
mov	ecx, [esi+18h]
movzx	eax, al
add	esp, 0Ch
push	eax
push	ecx
mov	ecx, ebx
call	sub_6BED00
mov	esi, [esp+18h+var_C]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6BEEBE
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6BEEBE:
mov	eax, [esp+18h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BEED4
call	sub_650DF0

loc_6BEED4:
mov	esi, [esp+18h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
pop	edi
pop	ebx
jnz	short loc_6BEEF8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6BEEF8:
pop	esi
add	esp, 0Ch
retn
sub_6BEDC0 endp

align 10h



sub_6BEF00 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebp
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	esi, ecx
mov	ecx, [esp+1Ch+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6BEBC0
lea	edx, [esp+1Ch+arg_8]
push	edx
push	offset off_1439E10
push	edi
lea	ecx, [esi+48h]
lea	ebp, [esi+10h]
push	esi
mov	dword ptr [esi], offset	off_143A014
mov	dword ptr [ebp+0], offset off_1439FC0
mov	dword ptr [ecx], offset	off_1439E58
mov	byte ptr [esp+2Ch+arg_8], 1
call	sub_663110
lea	eax, [esp+1Ch+arg_8]
push	eax
push	offset sub_6BEDC0
push	edi
lea	ecx, [esp+28h+var_10]
mov	byte ptr [esp+28h+arg_8], 1
call	sub_651D30
push	eax
push	offset aOndata	; "onData"
push	edi
mov	ecx, ebp
call	sub_65E060
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 10h
retn	0Ch
sub_6BEF00 endp

align 10h



sub_6BEF90 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6BEFDC
push	offset sub_6BE250
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_1439E68
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_6BEFDE

loc_6BEFDC:
xor	edi, edi

loc_6BEFDE:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	68h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6BF02B
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6BEF00
mov	ebx, eax
test	ebx, ebx
jz	short loc_6BF02B
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6BF02B:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 1Fh
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6BF059
call	sub_64B3B0

loc_6BF059:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 84h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6BF0A8
mov	ecx, ebx
call	sub_64B3B0

loc_6BF0A8:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6BEF90 endp

align 10h



sub_6BF0C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 204h
cmp	byte ptr [ebp+4], 6
mov	[esp+10h+var_4], ecx
mov	ecx, [edi]
jbe	short loc_6BF0E5
cmp	[esi], ecx
jmp	short loc_6BF0FA

loc_6BF0E5:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF0F0
call	sub_651580

loc_6BF0F0:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6BF0FA:
setz	al
test	al, al
jnz	short loc_6BF14C
mov	esi, [ebp+0]
add	esi, 208h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6BF114
cmp	[esi], ecx
jmp	short loc_6BF129

loc_6BF114:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF11F
call	sub_651580

loc_6BF11F:
mov	ecx, [esi]
mov	eax, [edi]
mov	edx, [ecx+4]
cmp	edx, [eax+4]

loc_6BF129:
setz	al
test	al, al
jnz	short loc_6BF14C
mov	eax, [esp+10h+arg_C]
mov	ecx, [esp+10h+arg_8]
push	eax
push	ecx
mov	ecx, [esp+18h+var_4]
push	edi
push	ebp
call	sub_665530
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	10h

loc_6BF14C:
pop	edi
pop	esi
mov	al, 1
pop	ebp
pop	ecx
retn	10h
sub_6BF0C0 endp

align 10h



sub_6BF160 proc	near
mov	eax, 18h
retn
sub_6BF160 endp

align 10h



sub_6BF170 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6BF17D
mov	al, 1
retn	8

loc_6BF17D:
mov	[esp+arg_4], eax
add	ecx, 34h
jmp	loc_663310
sub_6BF170 endp

align 10h



sub_6BF190 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
mov	esi, [edi]
mov	ebx, ecx
mov	ecx, [ebp+0]
add	esi, 204h
cmp	byte ptr [edi+4], 6
mov	[esp+14h+var_4], ebx
jbe	short loc_6BF1B8
cmp	[esi], ecx
jmp	short loc_6BF1CE

loc_6BF1B8:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF1C3
call	sub_651580

loc_6BF1C3:
mov	eax, [esi]
mov	ecx, [ebp+0]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6BF1CE:
setz	al
test	al, al
jz	short loc_6BF222
mov	eax, [ebx+28h]
fld	dword ptr [eax+98h]
add	eax, 90h
fsub	dword ptr [eax]
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fdiv	ds:dbl_15FCE20
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]

loc_6BF1FB:
call	__ftol2_sse
mov	esi, [esp+14h+arg_8]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6BF212
mov	ecx, esi
call	sub_652060

loc_6BF212:
mov	byte ptr [esi],	4
mov	[esi+4], edi

loc_6BF218:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	0Ch

loc_6BF222:
mov	esi, [edi]
add	esi, 208h
cmp	byte ptr [edi+4], 6
jbe	short loc_6BF234
cmp	[esi], ecx
jmp	short loc_6BF24A

loc_6BF234:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF23F
call	sub_651580

loc_6BF23F:
mov	ecx, [esi]
mov	eax, [ebp+0]
mov	edx, [ecx+4]
cmp	edx, [eax+4]

loc_6BF24A:
setz	al
test	al, al
jz	short loc_6BF27A
mov	eax, [ebx+28h]
fld	dword ptr [eax+9Ch]
add	eax, 90h
fsub	dword ptr [eax+4]
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fdiv	ds:dbl_15FCE20
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
jmp	short loc_6BF1FB

loc_6BF27A:
cmp	byte ptr [edi+4], 6
mov	eax, [edi]
mov	ecx, [eax+280h]
push	0
push	9
push	offset aScalemode ; "scaleMode"
setnbe	bl
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
test	bl, bl
jz	short loc_6BF2A5
cmp	esi, [ebp+0]
jmp	short loc_6BF2C9

loc_6BF2A5:
cmp	dword ptr [esi+4], 0
jnz	short loc_6BF2B2
mov	ecx, esi
call	sub_651580

loc_6BF2B2:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF2C0
call	sub_651580

loc_6BF2C0:
mov	ecx, [ebp+0]
mov	edx, [esi+4]
cmp	edx, [ecx+4]

loc_6BF2C9:
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BF2D9
mov	ecx, esi
call	sub_650DF0

loc_6BF2D9:
test	bl, bl
jz	loc_6BF366
mov	eax, [esp+14h+var_4]
mov	ecx, [eax+28h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
sub	eax, 0
jz	short loc_6BF313
sub	eax, 2
jz	short loc_6BF30C
sub	eax, 1
jz	short loc_6BF305
mov	eax, offset aShowall ; "showAll"
jmp	short loc_6BF318

loc_6BF305:		; "noBorder"
mov	eax, offset aNoborder
jmp	short loc_6BF318

loc_6BF30C:		; "exactFit"
mov	eax, offset aExactfit
jmp	short loc_6BF318

loc_6BF313:		; "noScale"
mov	eax, offset aNoscale

loc_6BF318:
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
mov	ecx, edi
call	sub_4E4640
mov	esi, [esp+14h+arg_8]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6BF337
mov	ecx, esi
call	sub_652060

loc_6BF337:
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]

loc_6BF342:
mov	eax, [esp+14h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_6BF218
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	0Ch

loc_6BF366:
cmp	byte ptr [edi+4], 6
mov	edx, [edi]
mov	ecx, [edx+280h]
push	0
push	5
push	offset aAlign_0	; "align"
setnbe	bl
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
test	bl, bl
jz	short loc_6BF391
cmp	esi, [ebp+0]
jmp	short loc_6BF3B5

loc_6BF391:
cmp	dword ptr [esi+4], 0
jnz	short loc_6BF39E
mov	ecx, esi
call	sub_651580

loc_6BF39E:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF3AC
call	sub_651580

loc_6BF3AC:
mov	eax, [ebp+0]
mov	ecx, [esi+4]
cmp	ecx, [eax+4]

loc_6BF3B5:
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BF3C5
mov	ecx, esi
call	sub_650DF0

loc_6BF3C5:
test	bl, bl
jz	short loc_6BF43D
mov	edx, [esp+14h+var_4]
mov	ecx, [edx+28h]
mov	eax, [ecx]
mov	edx, [eax+78h]
call	edx
dec	eax
cmp	eax, 7		; switch 8 cases
ja	short loc_6BF41C ; default
jmp	ds:off_6BF458[eax*4] ; switch jump

loc_6BF3E4:		; jumptable 006BF3DD case 0
mov	eax, offset unk_143A0C4
jmp	short loc_6BF421

loc_6BF3EB:		; jumptable 006BF3DD case 1
mov	eax, offset aB_5
jmp	short loc_6BF421

loc_6BF3F2:		; jumptable 006BF3DD case 2
mov	eax, offset unk_143A0C0
jmp	short loc_6BF421

loc_6BF3F9:		; jumptable 006BF3DD case 3
mov	eax, offset unk_143A0BC
jmp	short loc_6BF421

loc_6BF400:		; jumptable 006BF3DD case 4
mov	eax, offset unk_143A0B8
jmp	short loc_6BF421

loc_6BF407:		; jumptable 006BF3DD case 5
mov	eax, offset unk_143A0B4
jmp	short loc_6BF421

loc_6BF40E:		; jumptable 006BF3DD case 6
mov	eax, offset unk_143A0B0
jmp	short loc_6BF421

loc_6BF415:		; jumptable 006BF3DD case 7
mov	eax, offset unk_143A0AC
jmp	short loc_6BF421

loc_6BF41C:		; default
mov	eax, offset byte_146D660

loc_6BF421:
push	eax
lea	eax, [esp+18h+arg_4]
push	eax
mov	ecx, edi
call	sub_4E4640
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_64A680
jmp	loc_6BF342

loc_6BF43D:
mov	ecx, [esp+14h+arg_8]
push	ecx
mov	ecx, [esp+18h+var_4]
push	ebp
push	edi
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_6BF190 endp

align 4
off_6BF458 dd offset loc_6BF3E4	; jump table for switch	statement
dd offset loc_6BF3EB
dd offset loc_6BF3F2
dd offset loc_6BF3F9
dd offset loc_6BF400
dd offset loc_6BF407
dd offset loc_6BF40E
dd offset loc_6BF415
align 10h



sub_6BF480 proc	near

var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
push	offset sub_6EF500
push	esi
mov	ebp, ecx
call	sub_67C3D0
mov	eax, [esp+20h+arg_4]
lea	edi, [ebp+10h]
push	edi
push	esi
mov	dword ptr [ebp+0], offset off_143A168
mov	dword ptr [edi], offset	off_143A110
mov	[ebp+38h], eax
call	sub_6C2A50
mov	eax, [esi]
add	esp, 8
lea	ecx, [esp+20h+arg_0]
push	ecx
lea	edx, [esp+24h+var_10]
push	edx
add	eax, 204h
push	eax
mov	bl, 0Ah
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_0], 0
mov	[esp+30h+var_10], bl
call	sub_665530
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	eax, [esi]
lea	ecx, [esp+20h+arg_0]
push	ecx
lea	edx, [esp+24h+var_10]
push	edx
add	eax, 208h
push	eax
push	esi
mov	ecx, edi
mov	byte ptr [esp+30h+arg_0], 0
mov	[esp+30h+var_10], bl
call	sub_665530
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset aScalemode ; "scaleMode"
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+var_10]
push	edx
push	offset aAlign_0	; "align"
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+var_10]
push	eax
push	offset aShowmenu ; "showMenu"
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], 2
mov	[esp+2Ch+var_C], 1
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
push	7
push	offset off_143A09C
push	esi
push	edi
call	sub_66FC60
add	esp, 10h
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6BF480 endp

align 10h



sub_6BF5A0 proc	near
mov	dword ptr [ecx+38h], 0
jmp	sub_664580
sub_6BF5A0 endp

align 10h



sub_6BF5B0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	qword ptr -40h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_20=	byte ptr -20h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 54h
push	ebx
mov	ebx, [esp+58h+arg_0]
cmp	dword ptr [ebx+1Ch], 0
push	esi
mov	esi, [ebx+18h]
push	edi
jl	loc_6BF729
mov	al, 4
push	0
mov	ecx, ebx
mov	[esp+64h+var_30], al
mov	[esp+64h+var_2C], 0
mov	byte ptr [esp+64h+var_40], al
mov	dword ptr [esp+64h+var_40+4], 0
call	sub_651EC0
push	eax
lea	ecx, [esp+64h+var_20]
call	sub_652330
push	esi
lea	ecx, [esp+64h+var_20]
call	sub_652C20
test	eax, eax
jz	loc_6BF70E
mov	ecx, [esi+78h]
lea	edi, [eax+10h]
mov	eax, [edi]
mov	eax, [eax+10h]
lea	edx, [esp+60h+var_30]
push	edx
add	ecx, 210h
push	ecx
push	esi
mov	ecx, edi
call	eax
mov	eax, [esi+78h]
mov	edx, [edi]
mov	edx, [edx+10h]
lea	ecx, [esp+60h+var_40]
push	ecx
add	eax, 214h
push	eax
push	esi
mov	ecx, edi
call	edx
push	esi
lea	ecx, [esp+64h+var_30]
call	sub_653400
fstp	[esp+60h+arg_0]
push	esi
lea	ecx, [esp+64h+var_40]
call	sub_653400
fstp	[esp+60h+var_54]
fld	[esp+60h+arg_0]
mov	ecx, [ebx+18h]
fstp	[esp+60h+var_50]
fld	[esp+60h+var_54]
fstp	[esp+60h+var_4C]
call	sub_668010
fld	flt_167D000
sub	esp, 18h
mov	edx, esp
fstp	dword ptr [edx]
lea	ecx, [esp+78h+var_50]
fld	flt_167D004
push	ecx
fstp	dword ptr [edx+4]
lea	ecx, [esp+7Ch+var_48]
fld	flt_167D008
push	ecx
fstp	dword ptr [edx+8]
mov	ecx, eax
fld	flt_167D00C
fstp	dword ptr [edx+0Ch]
fld	flt_167D010
fstp	dword ptr [edx+10h]
fld	flt_167D014
fstp	dword ptr [edx+14h]
mov	edx, [eax]
mov	edx, [edx+100h]
call	edx
mov	ecx, [ebx+18h]
mov	eax, [ecx+78h]
mov	edx, [esi+78h]
push	0FFFFFFFFh
push	0
add	eax, 40h
push	eax
mov	eax, [edx+298h]
push	eax
call	sub_671840
fld	[esp+60h+var_48]
lea	ecx, [esp+60h+var_10]
fstp	[esp+60h+var_10]
fld	[esp+60h+var_44]
push	ecx
mov	edi, eax
fstp	[esp+64h+var_8]
push	esi
mov	ecx, edi
call	sub_6E2380
mov	ecx, [ebx+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6BF70E
mov	ecx, edi
call	sub_64B3B0

loc_6BF70E:
lea	ecx, [esp+60h+var_20]
call	sub_652830
lea	ecx, [esp+60h+var_40]
call	sub_652830
lea	ecx, [esp+60h+var_30]
call	sub_652830

loc_6BF729:
pop	edi
pop	esi
pop	ebx
add	esp, 54h
retn
sub_6BF5B0 endp




sub_6BF730 proc	near

var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20h
push	ebx
mov	ebx, [esp+24h+arg_0]
push	esi
push	edi
mov	edi, [esp+2Ch+arg_4]
mov	byte ptr [ebx],	0
mov	eax, [edi+78h]
mov	edx, [eax+298h]
push	0FFFFFFFFh
push	0
lea	ecx, [eax+44h]
push	ecx
push	edx
mov	ecx, edi
call	sub_671840
mov	esi, eax
mov	eax, [esp+2Ch+arg_8]
fld	dword ptr [eax]
mov	ecx, esi
fld	dword ptr [eax+4]
fld	dword ptr [eax+8]
fld	dword ptr [eax+0Ch]
lea	eax, [esp+2Ch+var_20]
fxch	st(3)
push	eax
fstp	[esp+30h+var_20]
push	edi
fxch	st(1)
fstp	[esp+34h+var_18]
fstp	[esp+34h+var_10]
fstp	[esp+34h+var_8]
call	sub_6E39C0
push	esi
mov	ecx, ebx
call	sub_652E40
test	esi, esi
jz	short loc_6BF79F
mov	ecx, esi
call	sub_64B3B0

loc_6BF79F:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 20h
retn
sub_6BF730 endp

align 10h



sub_6BF7B0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
push	ebx
push	ebp
mov	ebp, [esp+2Ch+arg_4]
push	esi
mov	esi, [esp+30h+arg_0]
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
push	edi
mov	[esp+34h+var_24], ecx
jnz	loc_6BFA24
cmp	byte ptr [esi+7Ch], 6
push	0
mov	ecx, eax
mov	ecx, [ecx+280h]
push	0Bh
push	offset aVisiblerect ; "visibleRect"
setnbe	bl
call	sub_650E40
mov	edi, eax
inc	dword ptr [edi+8]
test	bl, bl
jz	short loc_6BF7FE
cmp	edi, [ebp+0]
jmp	short loc_6BF822

loc_6BF7FE:
cmp	dword ptr [edi+4], 0
jnz	short loc_6BF80B
mov	ecx, edi
call	sub_651580

loc_6BF80B:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF819
call	sub_651580

loc_6BF819:
mov	edx, [ebp+0]
mov	eax, [edi+4]
cmp	eax, [edx+4]

loc_6BF822:
setz	bl
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6BF832
mov	ecx, edi
call	sub_650DF0

loc_6BF832:
test	bl, bl
jz	short loc_6BF87D
mov	ecx, esi
call	sub_668010
mov	edx, [eax]
mov	edx, [edx+7Ch]
lea	ecx, [esp+34h+var_20]
push	ecx
mov	ecx, eax
call	edx

loc_6BF84B:
lea	eax, [esp+34h+var_20]
push	eax
lea	ecx, [esp+38h+var_10]
push	esi
push	ecx
call	sub_6BF730
mov	ecx, [esp+40h+arg_8]
add	esp, 0Ch
push	eax
call	sub_652520
lea	ecx, [esp+34h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 24h
retn	0Ch

loc_6BF87D:
cmp	byte ptr [esi+7Ch], 6
mov	edx, [esi+78h]
mov	ecx, [edx+280h]
push	0
push	8
push	offset aSaferect ; "safeRect"
setnbe	bl
call	sub_650E40
mov	edi, eax
inc	dword ptr [edi+8]
test	bl, bl
jz	short loc_6BF8A9
cmp	edi, [ebp+0]
jmp	short loc_6BF8CD

loc_6BF8A9:
cmp	dword ptr [edi+4], 0
jnz	short loc_6BF8B6
mov	ecx, edi
call	sub_651580

loc_6BF8B6:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF8C4
call	sub_651580

loc_6BF8C4:
mov	eax, [ebp+0]
mov	ecx, [edi+4]
cmp	ecx, [eax+4]

loc_6BF8CD:
setz	bl
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6BF8DD
mov	ecx, edi
call	sub_650DF0

loc_6BF8DD:
test	bl, bl
jz	loc_6BF970
mov	ecx, esi
call	sub_668010
mov	edx, [eax]
mov	edx, [edx+88h]
lea	ecx, [esp+34h+var_20]
push	ecx
mov	ecx, eax
call	edx
fld	[esp+34h+var_20]
fld	[esp+34h+var_18]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_6BF923
fld	[esp+34h+var_1C]
fld	[esp+34h+var_14]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_6BF84B

loc_6BF923:
mov	ecx, esi
call	sub_668010
mov	edx, [eax]
mov	edx, [edx+7Ch]
lea	ecx, [esp+34h+var_10]
push	ecx
mov	ecx, eax
call	edx
fld	dword ptr [eax+4]
fstp	[esp+34h+arg_0]
fld	dword ptr [eax+8]
fstp	[esp+34h+arg_4]
fld	dword ptr [eax+0Ch]
fstp	[esp+34h+var_24]
fld	dword ptr [eax]
fstp	[esp+34h+var_20]
fld	[esp+34h+arg_0]
fstp	[esp+34h+var_1C]
fld	[esp+34h+arg_4]
fstp	[esp+34h+var_18]
fld	[esp+34h+var_24]
fstp	[esp+34h+var_14]
jmp	loc_6BF84B

loc_6BF970:
cmp	byte ptr [esi+7Ch], 6
mov	edx, [esi+78h]
mov	ecx, [edx+280h]
push	0
push	0Ch
push	offset aOriginalrect ; "originalRect"
setnbe	bl
call	sub_650E40
mov	edi, eax
inc	dword ptr [edi+8]
test	bl, bl
jz	short loc_6BF99C
cmp	edi, [ebp+0]
jmp	short loc_6BF9C0

loc_6BF99C:
cmp	dword ptr [edi+4], 0
jnz	short loc_6BF9A9
mov	ecx, edi
call	sub_651580

loc_6BF9A9:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BF9B7
call	sub_651580

loc_6BF9B7:
mov	eax, [ebp+0]
mov	ecx, [edi+4]
cmp	ecx, [eax+4]

loc_6BF9C0:
setz	bl
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6BF9D0
mov	ecx, edi
call	sub_650DF0

loc_6BF9D0:
test	bl, bl
jz	short loc_6BFA24
mov	ecx, esi
call	sub_668010
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4]
call	eax
mov	edx, [eax]
mov	edx, [edx+28h]
lea	ecx, [esp+34h+var_10]
push	ecx
mov	ecx, eax
call	edx
lea	eax, [esp+34h+var_10]
push	eax
lea	ecx, [esp+38h+var_20]
push	esi
push	ecx
call	sub_6BF730
mov	ecx, [esp+40h+arg_8]
add	esp, 0Ch
push	eax
call	sub_652520
lea	ecx, [esp+34h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 24h
retn	0Ch

loc_6BFA24:
mov	edx, [esp+34h+arg_8]
mov	ecx, [esp+34h+var_24]
push	edx
push	ebp
push	esi
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	0Ch
sub_6BF7B0 endp

align 10h



sub_6BFA40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6E97F0
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143A07C
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143D1A4
mov	dword ptr [esi+10h], offset off_143D300
mov	dword ptr [ecx], offset	off_143A1D4
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6BFA40 endp

align 10h



sub_6BFA90 proc	near

var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
mov	ebx, ecx
jnz	loc_6BFB89
mov	ecx, edi
call	sub_668010
mov	edx, [eax]
mov	edx, [edx+7Ch]
lea	ecx, [esp+2Ch+var_10]
push	ecx
mov	ecx, eax
call	edx
lea	eax, [esp+2Ch+var_10]
push	eax
lea	ecx, [esp+30h+var_20]
push	edi
push	ecx
call	sub_6BF730
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
lea	esi, [edi+8]
add	esp, 0Ch
cmp	eax, [esi+8]
jb	short loc_6BFAEA
mov	ecx, esi
call	sub_64B530

loc_6BFAEA:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6BFAFA
lea	edx, [esp+2Ch+var_20]
push	edx
call	sub_652330

loc_6BFAFA:
test	ebx, ebx
jz	short loc_6BFB03
add	ebx, 10h
jmp	short loc_6BFB05

loc_6BFB03:
xor	ebx, ebx

loc_6BFB05:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
mov	edx, [edi+78h]
push	ebp
push	0
shl	ecx, 5
sar	eax, 4
push	8
lea	ebp, [eax+ecx-20h]
mov	ecx, [edx+280h]
push	offset aOnresize ; "onResize"
call	sub_650E40
push	ebp
mov	[esp+34h+arg_0], eax
inc	dword ptr [eax+8]
push	1
lea	eax, [esp+38h+arg_0]
push	eax
push	ebx
push	edi
call	sub_6C2A80
mov	eax, [esp+44h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
pop	ebp
jnz	short loc_6BFB5F
call	sub_650DF0

loc_6BFB5F:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6BFB77
mov	ecx, esi
call	sub_64B660

loc_6BFB77:
lea	ecx, [esp+2Ch+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn	4

loc_6BFB89:
test	ebx, ebx
jz	short loc_6BFB92
lea	esi, [ebx+10h]
jmp	short loc_6BFB94

loc_6BFB92:
xor	esi, esi

loc_6BFB94:
mov	ecx, [eax+280h]
push	0
push	8
push	offset aOnresize ; "onResize"
call	sub_650E40
push	0
push	0
lea	ecx, [esp+34h+arg_0]
push	ecx
push	esi
mov	[esp+3Ch+arg_0], eax
inc	dword ptr [eax+8]
push	edi
call	sub_6C2A80
mov	eax, [esp+40h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6BFBD8
call	sub_650DF0

loc_6BFBD8:
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn	4
sub_6BFA90 endp

align 10h



sub_6BFBF0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	esi
mov	esi, [esp+18h+arg_0]
mov	eax, [esi+18h]
add	eax, 78h
mov	[esp+18h+var_10], 0
mov	edx, [eax]
mov	ecx, [edx+2ACh]
push	edi
mov	edi, [ecx+10h]
lea	ebx, [esp+1Ch+var_10]
push	ebx
add	edx, 50h
add	ecx, 10h
push	edx
push	eax
mov	eax, [edi+2Ch]
call	eax
test	al, al
jz	short loc_6BFC4D
cmp	[esp+1Ch+var_10], 0Bh
jz	short loc_6BFC4D
mov	ecx, [esi+18h]
push	ecx
mov	ecx, ebx
call	sub_652C20
test	eax, eax
jz	short loc_6BFC4D
add	eax, 10h
jz	short loc_6BFC4D
mov	edx, [esi+18h]
lea	ecx, [eax-10h]
push	edx
call	sub_6BFA90

loc_6BFC4D:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn
sub_6BFBF0 endp

align 10h



sub_6BFC60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
cmp	byte ptr [edi+7Ch], 6
mov	eax, [edi+78h]
push	0
push	9
mov	[esp+1Ch+var_4], ecx
mov	ecx, [eax+280h]
push	offset aScalemode ; "scaleMode"
setnbe	bl
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
test	bl, bl
jz	short loc_6BFC9D
mov	ebp, [esp+14h+arg_4]
cmp	esi, [ebp+0]
jmp	short loc_6BFCC5

loc_6BFC9D:
cmp	dword ptr [esi+4], 0
jnz	short loc_6BFCAA
mov	ecx, esi
call	sub_651580

loc_6BFCAA:
mov	ebp, [esp+14h+arg_4]
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BFCBC
call	sub_651580

loc_6BFCBC:
mov	ecx, [ebp+0]
mov	edx, [esi+4]
cmp	edx, [ecx+4]

loc_6BFCC5:
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BFCD5
mov	ecx, esi
call	sub_650DF0

loc_6BFCD5:
push	0
test	bl, bl
jz	loc_6BFE62
mov	ecx, [esp+18h+arg_8]
push	0FFFFFFFFh
push	edi
lea	eax, [esp+20h+arg_8]
push	eax
call	sub_652F60
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	0
push	7
push	offset aNoscale	; "noScale"
mov	[esp+20h+arg_4], eax
call	sub_650E40
mov	esi, eax
mov	ebp, 1
add	[esi+8], ebp
cmp	dword ptr [esi+4], 0
jnz	short loc_6BFD30
mov	ecx, esi
call	sub_651580

loc_6BFD30:
mov	ecx, [esp+14h+arg_8]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BFD43
call	sub_651580
mov	ecx, [esp+14h+arg_8]

loc_6BFD43:
mov	edx, [esi+4]
cmp	edx, [ecx+4]
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BFD59
mov	ecx, esi
call	sub_650DF0

loc_6BFD59:
test	bl, bl
jz	short loc_6BFD64
xor	esi, esi
jmp	loc_6BFE20

loc_6BFD64:
mov	eax, [edi+78h]
mov	ecx, [eax+280h]
push	0
push	8
push	offset aExactfit ; "exactFit"
call	sub_650E40
mov	esi, eax
add	[esi+8], ebp
cmp	dword ptr [esi+4], 0
jnz	short loc_6BFD8D
mov	ecx, esi
call	sub_651580

loc_6BFD8D:
mov	ecx, [esp+14h+arg_8]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BFDA0
call	sub_651580
mov	ecx, [esp+14h+arg_8]

loc_6BFDA0:
mov	edx, [esi+4]
cmp	edx, [ecx+4]
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BFDB6
mov	ecx, esi
call	sub_650DF0

loc_6BFDB6:
test	bl, bl
jz	short loc_6BFDC1
mov	esi, 2
jmp	short loc_6BFE20

loc_6BFDC1:
mov	eax, [edi+78h]
mov	ecx, [eax+280h]
push	0
push	8
push	offset aNoborder ; "noBorder"
call	sub_650E40
mov	esi, eax
add	[esi+8], ebp
cmp	dword ptr [esi+4], 0
jnz	short loc_6BFDEA
mov	ecx, esi
call	sub_651580

loc_6BFDEA:
mov	ecx, [esp+14h+arg_8]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BFDFD
call	sub_651580
mov	ecx, [esp+14h+arg_8]

loc_6BFDFD:
mov	edx, [esi+4]
cmp	edx, [ecx+4]
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BFE13
mov	ecx, esi
call	sub_650DF0

loc_6BFE13:
xor	eax, eax
test	bl, bl
setnz	al
lea	eax, [eax+eax+1]
mov	esi, eax

loc_6BFE20:
mov	ebx, [esp+14h+var_4]
mov	ecx, [ebx+28h]
mov	edx, [ecx]
mov	eax, [edx+6Ch]
push	esi
call	eax
cmp	[esp+14h+arg_4], esi
jz	short loc_6BFE42
test	esi, esi
jnz	short loc_6BFE42
push	edi
lea	ecx, [ebx-10h]
call	sub_6BFA90

loc_6BFE42:
mov	eax, [esp+14h+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BFE58
call	sub_650DF0

loc_6BFE58:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6BFE62:
cmp	byte ptr [edi+7Ch], 6
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	5
push	offset aAlign_0	; "align"
setnbe	bl
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
test	bl, bl
jz	short loc_6BFE8C
cmp	esi, [ebp+0]
jmp	short loc_6BFEB0

loc_6BFE8C:
cmp	dword ptr [esi+4], 0
jnz	short loc_6BFE99
mov	ecx, esi
call	sub_651580

loc_6BFE99:
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6BFEA7
call	sub_651580

loc_6BFEA7:
mov	edx, [ebp+0]
mov	eax, [esi+4]
cmp	eax, [edx+4]

loc_6BFEB0:
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6BFEC0
mov	ecx, esi
call	sub_650DF0

loc_6BFEC0:
test	bl, bl
jz	loc_6C0051
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+20h+arg_4]
push	ecx
mov	ecx, [esp+24h+arg_8]
call	sub_652F60
lea	edx, [esp+14h+arg_8]
push	edx
lea	ecx, [esp+18h+arg_4]
call	sub_651340
mov	eax, [esp+14h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6BFEFF
call	sub_650DF0

loc_6BFEFF:
lea	ecx, [esp+14h+arg_8]
xor	esi, esi
call	sub_650650
mov	edi, eax
cmp	edi, 1
jb	loc_6C003B
push	esi
lea	ecx, [esp+18h+arg_8]
call	sub_650680
mov	ebx, eax
cmp	edi, 2
jb	short loc_6BFF33
push	1
lea	ecx, [esp+18h+arg_8]
call	sub_650680
mov	esi, eax

loc_6BFF33:
cmp	ebx, 54h
jnz	short loc_6BFF5B
cmp	esi, 4Ch
jz	short loc_6BFF65
cmp	esi, 52h
jz	short loc_6BFF88
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 1
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6BFF5B:
cmp	ebx, 4Ch
jnz	short loc_6BFF7E
cmp	esi, 54h
jnz	short loc_6BFFCD

loc_6BFF65:
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 5
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6BFF7E:
cmp	ebx, 52h
jnz	short loc_6BFFA1
cmp	esi, 54h
jnz	short loc_6BFFEB

loc_6BFF88:
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 6
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6BFFA1:
cmp	ebx, 42h
jnz	loc_6C003B
cmp	esi, 4Ch
jz	short loc_6BFFD2
cmp	esi, 52h
jz	short loc_6BFFF0
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 2
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6BFFCD:
cmp	esi, 42h
jnz	short loc_6C0009

loc_6BFFD2:
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 7
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6BFFEB:
cmp	esi, 42h
jnz	short loc_6C0022

loc_6BFFF0:
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 8
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6C0009:
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 3
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6C0022:
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
mov	eax, 4
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6C003B:
mov	ecx, [esp+14h+var_4]
mov	ecx, [ecx+28h]
mov	edx, [ecx]
xor	eax, eax
push	eax
mov	eax, [edx+74h]
call	eax
jmp	loc_6BFE42

loc_6C0051:
mov	ecx, [esp+14h+arg_C]
mov	edx, [esp+14h+arg_8]
push	ecx
mov	ecx, [esp+18h+var_4]
push	edx
push	ebp
push	edi
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_6BFC60 endp

align 10h



sub_6C0070 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	3Ch
call	edx
cmp	eax, ebx
jz	short loc_6C00AE
mov	ecx, [esi+290h]
push	ecx
lea	ecx, [esp+28h+var_18]
push	ecx
mov	ecx, eax
call	sub_6BF480
jmp	short loc_6C00B0

loc_6C00AE:
xor	eax, eax

loc_6C00B0:
mov	ebp, [esp+24h+arg_0]
mov	[ebp+0], eax
mov	[ebp+8], bl
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebx
push	54h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6C00FE
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_14]
push	ecx
mov	ecx, edi
call	sub_6BFA40
mov	ebx, eax
test	ebx, ebx
jz	short loc_6C00FE
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6C00FE:
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_8], ebx
mov	[esp+2Ch+arg_4], 12h
call	sub_661470
mov	ecx, [esp+24h+arg_8]
test	ecx, ecx
jz	short loc_6C012C
call	sub_64B3B0

loc_6C012C:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+arg_8], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+2Ch+var_C]
mov	[esp+2Ch+arg_4], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+28h+arg_4]
mov	edx, [edi]
push	eax
add	esi, 50h
push	esi
lea	eax, [esp+30h+var_14]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
test	ebx, ebx
jz	short loc_6C0179
mov	ecx, ebx
call	sub_64B3B0

loc_6C0179:
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6C0070 endp

align 10h



sub_6C0190 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+18h]
push	edi
call	sub_668010
mov	edi, eax
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ecx, [esi+18h]
push	ecx
push	2
mov	ecx, esi
mov	ebx, eax
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	edx, [esi+18h]
push	ebx
push	eax
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
push	eax
mov	ecx, edi
call	sub_693A00
pop	edi
pop	esi
pop	ebx
retn
sub_6C0190 endp

align 10h



sub_6C0200 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C0287
mov	ecx, [esi+18h]
push	ebx
call	sub_668010
mov	ebx, eax
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
cmp	dword ptr [esi+1Ch], 2
mov	edi, eax
jl	short loc_6C0258
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	esi, eax
jmp	short loc_6C025A

loc_6C0258:
xor	esi, esi

loc_6C025A:
test	edi, edi
jz	short loc_6C027C
mov	edx, [edi]
mov	eax, [edx+0B0h]
mov	ecx, edi
call	eax
cmp	eax, 2
jnz	short loc_6C027C
push	esi
push	edi
mov	ecx, ebx
call	sub_6930C0
pop	ebx
pop	edi
pop	esi
retn

loc_6C027C:
push	esi
push	0
mov	ecx, ebx
call	sub_6930C0
pop	ebx

loc_6C0287:
pop	edi
pop	esi
retn
sub_6C0200 endp

align 10h



sub_6C0290 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
cmp	dword ptr [esi+1Ch], 1
mov	edi, eax
jl	short loc_6C02DB
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
push	eax
mov	ecx, edi
call	sub_691370
mov	ecx, [esi+4]
push	eax
call	sub_6528F0
pop	edi
pop	esi
retn

loc_6C02DB:
xor	eax, eax
push	eax
mov	ecx, edi
call	sub_691370
mov	ecx, [esi+4]
push	eax
call	sub_6528F0
pop	edi
pop	esi
retn
sub_6C0290 endp

align 10h



sub_6C0300 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
cmp	dword ptr [esi+1Ch], 1
mov	edi, eax
jl	short loc_6C033C
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
jmp	short loc_6C033E

loc_6C033C:
xor	eax, eax

loc_6C033E:
push	eax
mov	ecx, edi
call	sub_68DB40
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	[esp+10h+arg_0], eax
fild	[esp+10h+arg_0]
fstp	[esp+10h+var_8]
jb	short loc_6C0361
mov	ecx, esi
call	sub_652060

loc_6C0361:
fld	[esp+10h+var_8]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
add	esp, 8
retn
sub_6C0300 endp

align 10h



sub_6C0380 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6C03EF
mov	ecx, [esi+18h]
push	ebx
call	sub_668010
mov	edi, eax
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
mov	ebx, eax
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	edx, [edi]
push	eax
mov	eax, [edx+108h]
push	ebx
mov	ecx, edi
call	eax
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	ebx

loc_6C03EF:
pop	edi
pop	esi
retn
sub_6C0380 endp

align 10h



sub_6C0400 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
cmp	dword ptr [esi+1Ch], 1
mov	edi, eax
jl	short loc_6C043C
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
jmp	short loc_6C043E

loc_6C043C:
xor	eax, eax

loc_6C043E:
mov	edx, [edi]
push	eax
mov	eax, [edx+10Ch]
mov	ecx, edi
call	eax
mov	[esp+10h+arg_0], eax
fild	[esp+10h+arg_0]
test	eax, eax
jge	short loc_6C045D
fadd	ds:dbl_15FCE08

loc_6C045D:
mov	esi, [esi+4]
fstp	[esp+10h+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6C0470
mov	ecx, esi
call	sub_652060

loc_6C0470:
fld	[esp+10h+var_8]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
add	esp, 8
retn
sub_6C0400 endp




sub_6C0480 proc	near

var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 2Ch
push	ebx
push	esi
mov	esi, [esp+34h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
xor	ebx, ebx
mov	byte ptr [edi],	2
mov	[edi+4], bl
mov	edi, 1
cmp	[esi+1Ch], edi
jl	loc_6C05DF
cmp	[esi+18h], ebx
jz	loc_6C05DF
push	ebp
push	ebx
mov	ecx, esi
xor	ebp, ebp
call	sub_651EC0
cmp	byte ptr [eax],	5
mov	ecx, esi
jnz	loc_6C055C
mov	edi, [esi+18h]
push	ebx
mov	[esp+40h+var_28], bl
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+48h+var_2C]
push	ecx
mov	ecx, eax
call	sub_652F60
push	ebx
push	ebx
lea	ecx, [esp+44h+var_18]
lea	edx, [esp+44h+var_2C]
lea	eax, [esp+44h+var_28]
push	ecx
mov	ecx, [esi+18h]
mov	[esp+48h+var_18], edx
mov	[esp+48h+var_14], eax
mov	[esp+48h+var_10], ebx
mov	[esp+48h+var_C], ebx
mov	[esp+48h+var_8], ebx
mov	[esp+48h+var_4], ebx
call	sub_672190
mov	byte ptr [esp+3Ch+arg_0], al
mov	eax, [esp+3Ch+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6C052E
call	sub_650DF0

loc_6C052E:
cmp	byte ptr [esp+3Ch+arg_0], bl
jz	short loc_6C0551
cmp	[esp+3Ch+var_28], 7
jnz	short loc_6C0551
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+40h+var_28]
call	sub_651BB0
cmp	eax, ebx
jz	short loc_6C054F
inc	dword ptr [eax+4]

loc_6C054F:
mov	ebp, eax

loc_6C0551:
lea	ecx, [esp+3Ch+var_28]
call	sub_652830
jmp	short loc_6C0576

loc_6C055C:
mov	eax, [esi+18h]
push	eax
push	ebx
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
cmp	eax, ebx
jz	short loc_6C0574
add	[eax+4], edi

loc_6C0574:
mov	ebp, eax

loc_6C0576:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
xor	edi, edi
cmp	byte ptr [ecx+2B0h], 1
jnz	short loc_6C05A0
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6C05A0
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	edi, eax

loc_6C05A0:
cmp	ebp, ebx
jz	short loc_6C05E6
mov	edx, [ebp+0]
mov	eax, [edx+0DCh]
mov	ecx, ebp
call	eax
test	al, al
jz	short loc_6C05D7
mov	ecx, [esi+18h]
push	edi
push	ebp
call	sub_668010
mov	ecx, eax
call	sub_6949E0
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1

loc_6C05D7:
mov	ecx, ebp
call	sub_64A400
pop	ebp

loc_6C05DF:
pop	edi
pop	esi
pop	ebx
add	esp, 2Ch
retn

loc_6C05E6:
mov	ecx, [esi+18h]
push	edi
push	ebx
call	sub_668010
mov	ecx, eax
call	sub_6949E0
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	ebp
pop	edi
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1
pop	esi
pop	ebx
add	esp, 2Ch
retn
sub_6C0480 endp




sub_6C0610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
mov	[esp+14h+var_4], ecx
jnz	loc_6C0806
mov	ecx, edi
call	sub_668010
mov	ecx, [ebp+0]
mov	ebx, [ecx]
mov	esi, eax
mov	ecx, offset aDisablefocusau ; "disableFocusAutoRelease"
mov	eax, ebx

loc_6C0646:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C0666
test	dl, dl
jz	short loc_6C0662
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C0666
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C0646

loc_6C0662:
xor	eax, eax
jmp	short loc_6C066B

loc_6C0666:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C066B:
test	eax, eax
jnz	short loc_6C069B
mov	ecx, [esp+14h+arg_8]
push	edi
call	sub_651D80
movzx	edx, al
shl	edx, 16h
xor	edx, [esi+2474h]
pop	edi
and	edx, offset loc_C00000
xor	[esi+2474h], edx
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6C069B:		; "alwaysEnableArrowKeys"
mov	ecx, offset aAlwaysenablear
mov	eax, ebx

loc_6C06A2:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C06C2
test	dl, dl
jz	short loc_6C06BE
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C06C2
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C06A2

loc_6C06BE:
xor	eax, eax
jmp	short loc_6C06C7

loc_6C06C2:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C06C7:
test	eax, eax
jnz	short loc_6C06F6
mov	ecx, [esp+14h+arg_8]
push	edi
call	sub_651D80
movzx	eax, al
shl	eax, 18h
xor	eax, [esi+2474h]
pop	edi
and	eax, 3000000h
xor	[esi+2474h], eax
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6C06F6:		; "alwaysEnableKeyboardPress"
push	offset aAlwaysenableke
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6C0732
mov	ecx, [esp+14h+arg_8]
push	edi
call	sub_651D80
movzx	ecx, al
shl	ecx, 1Ah
xor	ecx, [esi+2474h]
pop	edi
and	ecx, 0C000000h
xor	[esi+2474h], ecx
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6C0732:		; "disableFocusRolloverEvent"
push	offset aDisablefocusro
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6C076E
mov	ecx, [esp+14h+arg_8]
push	edi
call	sub_651D80
movzx	edx, al
shl	edx, 1Ch
xor	edx, [esi+2474h]
pop	edi
and	edx, 30000000h
xor	[esi+2474h], edx
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6C076E:		; "disableFocusKeys"
push	offset aDisablefocuske
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6C07AC
mov	ecx, [esp+14h+arg_8]
push	edi
call	sub_651D80
mov	ecx, [esi+2474h]
movzx	eax, al
shl	eax, 1Eh
and	ecx, 3FFFFFFFh
or	eax, ecx
pop	edi
mov	[esi+2474h], eax
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6C07AC:		; "modalClip"
push	offset aModalclip
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6C0806
mov	ecx, [esp+14h+arg_8]
push	edi
call	sub_651BB0
mov	edi, eax
test	edi, edi
jz	short loc_6C07F1
mov	edx, [edi]
mov	eax, [edx+0B0h]
mov	ecx, edi
call	eax
cmp	eax, 2
jnz	short loc_6C07F1
push	0
push	edi
mov	ecx, esi
call	sub_6930C0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6C07F1:
push	0
push	0
mov	ecx, esi
call	sub_6930C0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6C0806:
mov	ecx, [esp+14h+arg_C]
mov	edx, [esp+14h+arg_8]
push	ecx
mov	ecx, [esp+18h+var_4]
push	edx
push	ebp
push	edi
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_6C0610 endp

align 10h



sub_6C0830 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	1
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6C08C4
mov	edx, [ecx+78h]
xor	eax, eax
cmp	byte ptr [edx+2B0h], 1
jnz	short loc_6C086E
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C086E
push	ecx
push	eax
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6C086E:
mov	ecx, [esi+18h]
push	eax
lea	eax, [esp+0Ch+arg_0]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_6B5F60
mov	edi, [esp+8+arg_0]
test	edi, edi
jz	short loc_6C08C4
push	ebp
mov	ebp, [edi+94h]
test	ebp, ebp
jnz	short loc_6C089F
mov	ecx, edi
call	sub_658B70
mov	ebp, eax

loc_6C089F:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6C08AE
mov	ecx, esi
call	sub_652060

loc_6C08AE:
mov	byte ptr [esi],	5
mov	eax, [ebp+0Ch]
pop	ebp
mov	ecx, edi
mov	[esi+4], eax
inc	dword ptr [eax+8]
pop	edi
pop	esi
jmp	sub_64A400

loc_6C08C4:
pop	edi
pop	esi
retn
sub_6C0830 endp

align 10h



sub_6C08D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1
mov	eax, [edi+18h]
xor	esi, esi
cmp	eax, esi
jz	loc_6C0998
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6C0998
push	ebx
mov	ebx, 1
cmp	[edi+1Ch], ebx
jl	loc_6C0997
push	ebp
push	eax
push	esi
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
mov	ebp, eax
cmp	ebp, esi
jz	short loc_6C092A
add	[ebp+4], ebx

loc_6C092A:
mov	[esp+14h+arg_0], esi
mov	edi, edi

loc_6C0930:
mov	ecx, [edi+18h]
push	esi
lea	edx, [esp+18h+var_4]
push	edx
call	sub_668010
mov	ecx, eax
call	sub_6B5F60
mov	ecx, [esp+14h+var_4]
cmp	ecx, ebp
jnz	short loc_6C0951
or	[esp+14h+arg_0], ebx

loc_6C0951:
test	ecx, ecx
jz	short loc_6C095A
call	sub_64A400

loc_6C095A:
inc	esi
add	ebx, ebx
cmp	esi, 4
jb	short loc_6C0930
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
jb	short loc_6C0971
mov	ecx, esi
call	sub_652060

loc_6C0971:
movzx	eax, word ptr [esp+14h+arg_0]
mov	[esp+14h+arg_0], eax
mov	byte ptr [esi],	3
fild	[esp+14h+arg_0]
fstp	qword ptr [esi+4]
test	ebp, ebp
jz	short loc_6C0996
mov	ecx, ebp
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 4
jmp	sub_64A400

loc_6C0996:
pop	ebp

loc_6C0997:
pop	ebx

loc_6C0998:
pop	edi
pop	esi
pop	ecx
retn
sub_6C08D0 endp

align 10h



sub_6C09A0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+4]
cmp	byte ptr [edi],	5
jb	short loc_6C09B8
mov	ecx, edi
call	sub_652060

loc_6C09B8:
fld	ds:dbl_15FCD60
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
mov	ecx, [esi+18h]
test	ecx, ecx
jz	loc_6C0A61
mov	edi, [ecx+78h]
mov	edx, 1
xor	eax, eax
cmp	[edi+2B0h], dl
jnz	short loc_6C09F6
cmp	[esi+1Ch], edx
jl	short loc_6C09F6
push	ecx
push	eax
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6C09F6:
mov	ecx, [esi+18h]
push	eax
lea	eax, [esp+14h+arg_0]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_6B5F60
mov	edi, [esp+10h+arg_0]
test	edi, edi
jz	short loc_6C0A61
mov	edx, [edi]
mov	eax, [edx+0B0h]
mov	ecx, edi
call	eax
cmp	eax, 4
jnz	short loc_6C0A55
mov	edx, [edi]
mov	eax, [edx+17Ch]
mov	ecx, edi
call	eax
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	[esp+10h+arg_0], eax
fild	[esp+10h+arg_0]
fstp	[esp+10h+var_8]
jb	short loc_6C0A4B
mov	ecx, esi
call	sub_652060

loc_6C0A4B:
fld	[esp+10h+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_6C0A55:
mov	ecx, edi
pop	edi
pop	esi
add	esp, 8
jmp	sub_64A400

loc_6C0A61:
pop	edi
pop	esi
add	esp, 8
retn
sub_6C09A0 endp

align 10h



sub_6C0A70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
test	ecx, ecx
jz	loc_6C0B31
mov	edx, [ecx+78h]
xor	eax, eax
cmp	byte ptr [edx+2B0h], 1
jnz	short loc_6C0AB3
cmp	dword ptr [esi+1Ch], 3
jl	short loc_6C0AB3
push	ecx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6C0AB3:
mov	ecx, [esi+18h]
push	ebx
push	eax
lea	eax, [esp+10h+arg_0]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_6B5F60
mov	ebx, [esp+0Ch+arg_0]
test	ebx, ebx
jz	short loc_6C0B30
mov	edx, [ebx]
mov	eax, [edx+0B0h]
mov	ecx, ebx
call	eax
cmp	eax, 4
jnz	short loc_6C0B26
xor	edi, edi
cmp	dword ptr [esi+1Ch], 2
mov	eax, 7FFFFFFFh
jl	short loc_6C0B18
mov	ecx, [esi+18h]
push	ecx
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
mov	edi, eax
call	sub_651EC0
mov	ecx, eax
call	sub_653660

loc_6C0B18:
mov	edx, [ebx]
push	eax
mov	eax, [edx+178h]
push	edi
mov	ecx, ebx
call	eax

loc_6C0B26:
mov	ecx, ebx
pop	ebx
pop	edi
pop	esi
jmp	sub_64A400

loc_6C0B30:
pop	ebx

loc_6C0B31:
pop	edi
pop	esi
retn
sub_6C0A70 endp

align 10h



sub_6C0B40 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+4]
cmp	byte ptr [edi],	5
jb	short loc_6C0B58
mov	ecx, edi
call	sub_652060

loc_6C0B58:
fld	ds:dbl_15FCD60
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
mov	ecx, [esi+18h]
test	ecx, ecx
jz	loc_6C0C0B
mov	edi, [ecx+78h]
mov	edx, 1
xor	eax, eax
cmp	[edi+2B0h], dl
jnz	short loc_6C0B96
cmp	[esi+1Ch], edx
jl	short loc_6C0B96
push	ecx
push	eax
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6C0B96:
mov	ecx, [esi+18h]
push	eax
lea	eax, [esp+14h+arg_0]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_6B5F60
mov	edi, [esp+10h+arg_0]
test	edi, edi
jz	short loc_6C0C0B
mov	edx, [edi]
mov	eax, [edx+0B0h]
mov	ecx, edi
call	eax
cmp	eax, 4
jnz	short loc_6C0BFF
mov	edx, [edi]
mov	eax, [edx+180h]
mov	ecx, edi
call	eax
mov	[esp+10h+arg_0], eax
fild	[esp+10h+arg_0]
test	eax, eax
jge	short loc_6C0BE2
fadd	ds:dbl_15FCE08

loc_6C0BE2:
mov	esi, [esi+4]
fstp	[esp+10h+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6C0BF5
mov	ecx, esi
call	sub_652060

loc_6C0BF5:
fld	[esp+10h+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_6C0BFF:
mov	ecx, edi
pop	edi
pop	esi
add	esp, 8
jmp	sub_64A400

loc_6C0C0B:
pop	edi
pop	esi
add	esp, 8
retn
sub_6C0B40 endp

align 10h



sub_6C0C20 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+4]
cmp	byte ptr [edi],	5
jb	short loc_6C0C38
mov	ecx, edi
call	sub_652060

loc_6C0C38:
fld	ds:dbl_15FCD60
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
mov	ecx, [esi+18h]
test	ecx, ecx
jz	loc_6C0CEB
mov	edi, [ecx+78h]
mov	edx, 1
xor	eax, eax
cmp	[edi+2B0h], dl
jnz	short loc_6C0C76
cmp	[esi+1Ch], edx
jl	short loc_6C0C76
push	ecx
push	eax
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6C0C76:
mov	ecx, [esi+18h]
push	eax
lea	eax, [esp+14h+arg_0]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_6B5F60
mov	edi, [esp+10h+arg_0]
test	edi, edi
jz	short loc_6C0CEB
mov	edx, [edi]
mov	eax, [edx+0B0h]
mov	ecx, edi
call	eax
cmp	eax, 4
jnz	short loc_6C0CDF
mov	edx, [edi]
mov	eax, [edx+184h]
mov	ecx, edi
call	eax
mov	[esp+10h+arg_0], eax
fild	[esp+10h+arg_0]
test	eax, eax
jge	short loc_6C0CC2
fadd	ds:dbl_15FCE08

loc_6C0CC2:
mov	esi, [esi+4]
fstp	[esp+10h+var_8]
cmp	byte ptr [esi],	5
jb	short loc_6C0CD5
mov	ecx, esi
call	sub_652060

loc_6C0CD5:
fld	[esp+10h+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_6C0CDF:
mov	ecx, edi
pop	edi
pop	esi
add	esp, 8
jmp	sub_64A400

loc_6C0CEB:
pop	edi
pop	esi
add	esp, 8
retn
sub_6C0C20 endp

align 10h



sub_6C0D00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
mov	esi, [ebx+4]
push	edi
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
cmp	dword ptr [ebx+1Ch], 1
jl	short loc_6C0D38
mov	eax, [ebx+18h]
push	eax
push	0
mov	ecx, ebx
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+18h+arg_0], al
jmp	short loc_6C0D3D

loc_6C0D38:
mov	byte ptr [esp+18h+arg_0], 1

loc_6C0D3D:
mov	ecx, [ebx+18h]
call	sub_668010
xor	esi, esi
cmp	dword ptr [ebx+1Ch], 2
mov	ebp, eax
jl	short loc_6C0D65
mov	ecx, [ebx+18h]
push	ecx
push	1
mov	ecx, ebx
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	esi, eax

loc_6C0D65:
push	esi
lea	edx, [esp+1Ch+var_8]
push	edx
mov	ecx, ebp
call	sub_6B5F60
mov	edi, [esp+18h+var_8]
test	edi, edi
jnz	short loc_6C0DA7
push	esi
mov	ecx, ebp
call	sub_698360
push	esi
lea	eax, [esp+1Ch+var_4]
push	eax
mov	ecx, ebp
call	sub_6B5F60
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6C0D98
inc	dword ptr [ecx+4]

loc_6C0D98:
mov	ecx, [esp+18h+var_4]
mov	edi, [eax]
test	ecx, ecx
jz	short loc_6C0DA7
call	sub_64A400

loc_6C0DA7:
cmp	byte ptr [esp+18h+arg_0], 0
jz	short loc_6C0DCD
test	edi, edi
jz	short loc_6C0DF0
mov	edx, [edi]
mov	eax, [edx+0DCh]
mov	ecx, edi
call	eax
test	al, al
jz	short loc_6C0DD5
push	esi
push	edi
mov	ecx, ebp
call	sub_6949E0
jmp	short loc_6C0DD5

loc_6C0DCD:
push	esi
mov	ecx, ebp
call	sub_693810

loc_6C0DD5:
test	edi, edi
jz	short loc_6C0DF0
mov	ecx, [ebx+4]
push	edi
call	sub_6528F0
mov	ecx, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
jmp	sub_64A400

loc_6C0DF0:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_6C0D00 endp

align 10h



sub_6C0E00 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	word ptr -2Ch
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  4

sub	esp, 44h
push	ebx
push	esi
push	edi
mov	edi, [esp+50h+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
xor	ebx, ebx
mov	[esi], bl
mov	eax, [edi+1Ch]
cmp	eax, ebx
jz	loc_6C10F2
cmp	eax, 4
mov	[esp+50h+var_40], ebx
jl	short loc_6C0E44
mov	eax, [edi+18h]
push	eax
push	3
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	[esp+50h+var_40], eax

loc_6C0E44:
mov	ecx, [edi+18h]
push	ebp
call	sub_668010
cmp	dword ptr [edi+1Ch], 2
mov	esi, eax
mov	[esp+54h+var_34], esi
jl	short loc_6C0E99
push	1
mov	ecx, edi
call	sub_651EC0
mov	al, [eax]
cmp	al, bl
jz	short loc_6C0E99
cmp	al, 0Ah
jz	short loc_6C0E99
push	1
mov	ecx, edi
call	sub_651EC0
cmp	byte ptr [eax],	1
jz	short loc_6C0E99
mov	ecx, [edi+18h]
push	ecx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
cmp	eax, ebx
jz	short loc_6C0E95
inc	dword ptr [eax+4]

loc_6C0E95:
mov	ebp, eax
jmp	short loc_6C0EC2

loc_6C0E99:
mov	edx, [esp+54h+var_40]
push	edx
lea	eax, [esp+58h+var_38]
push	eax
mov	ecx, esi
call	sub_6B5F60
mov	eax, [eax]
cmp	eax, ebx
jz	short loc_6C0EB3
inc	dword ptr [eax+4]

loc_6C0EB3:
mov	ecx, [esp+54h+var_38]
mov	ebp, eax
cmp	ecx, ebx
jz	short loc_6C0EC2
call	sub_64A400

loc_6C0EC2:
cmp	dword ptr [edi+1Ch], 3
jl	short loc_6C0EE2
mov	ecx, [edi+18h]
push	ecx
push	2
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+54h+var_3C], al
jmp	short loc_6C0EE6

loc_6C0EE2:
mov	byte ptr [esp+54h+var_3C], bl

loc_6C0EE6:
mov	esi, [edi+18h]
push	ebx
mov	ecx, edi
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	esi
lea	edx, [esp+60h+var_44]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+54h+var_44]
mov	esi, [eax]
mov	byte ptr [esp+54h+arg_0], bl
mov	ecx, offset aUp_2 ; "up"
mov	eax, esi

loc_6C0F12:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C0F32
cmp	dl, bl
jz	short loc_6C0F2E
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C0F32
add	eax, 2
add	ecx, 2
cmp	dl, bl
jnz	short loc_6C0F12

loc_6C0F2E:
xor	eax, eax
jmp	short loc_6C0F37

loc_6C0F32:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C0F37:
cmp	eax, ebx
jnz	short loc_6C0F45
mov	eax, 26h
jmp	loc_6C0FE4

loc_6C0F45:		; "down"
mov	ecx, offset aDown_0
mov	eax, esi
lea	esp, [esp+0]

loc_6C0F50:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C0F70
cmp	dl, bl
jz	short loc_6C0F6C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C0F70
add	eax, 2
add	ecx, 2
cmp	dl, bl
jnz	short loc_6C0F50

loc_6C0F6C:
xor	eax, eax
jmp	short loc_6C0F75

loc_6C0F70:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C0F75:
cmp	eax, ebx
jnz	short loc_6C0F80
mov	eax, 28h
jmp	short loc_6C0FE4

loc_6C0F80:		; "left"
push	offset aLeft_0
lea	ecx, [esp+58h+var_44]
call	sub_67DA70
test	al, al
jz	short loc_6C0F99
mov	eax, 25h
jmp	short loc_6C0FE4

loc_6C0F99:		; "right"
push	offset aRight
lea	ecx, [esp+58h+var_44]
call	sub_67DA70
test	al, al
jz	short loc_6C0FB2
mov	eax, 27h
jmp	short loc_6C0FE4

loc_6C0FB2:		; "tab"
push	offset aTab
lea	ecx, [esp+58h+var_44]
call	sub_67DA70
test	al, al
jnz	short loc_6C0FDF
push	offset aShifttab ; "shifttab"
lea	ecx, [esp+58h+var_44]
call	sub_67DA70
test	al, al
jz	loc_6C10A5
mov	byte ptr [esp+54h+arg_0], 1

loc_6C0FDF:
mov	eax, 9

loc_6C0FE4:
fldz
mov	dl, byte ptr [esp+54h+var_40]
mov	esi, [esp+54h+var_34]
fst	[esp+54h+var_18]
xor	ecx, ecx
fst	[esp+54h+var_14]
mov	[esp+54h+var_8], cx
fst	[esp+54h+var_10]
mov	ecx, [esp+54h+var_3C]
fstp	[esp+54h+var_C]
push	ebx
mov	[esp+58h+var_2C], ax
mov	al, byte ptr [esp+58h+arg_0]
push	ecx
mov	[esp+5Ch+var_28], dl
lea	edx, [esp+5Ch+var_30]
mov	[esp+5Ch+var_29], al
push	edx
lea	eax, [esp+60h+var_24]
push	eax
mov	ecx, esi
mov	[esp+64h+var_24], ebx
mov	[esp+64h+var_20], ebx
mov	[esp+64h+var_1C], 0FFFFFFFFh
mov	[esp+64h+var_6], bl
mov	[esp+64h+var_5], bl
mov	[esp+64h+var_4], bl
mov	[esp+64h+var_3], bl
call	sub_696EF0
cmp	ebp, ebx
jz	short loc_6C1054
inc	dword ptr [ebp+4]

loc_6C1054:
mov	ecx, [esp+54h+var_20]
cmp	ecx, ebx
jz	short loc_6C1061
call	sub_64A400

loc_6C1061:
lea	ecx, [esp+54h+var_24]
push	ecx
lea	edx, [esp+58h+var_30]
push	edx
push	5
mov	ecx, esi
mov	[esp+60h+var_20], ebp
mov	[esp+60h+var_5], 1
call	sub_697010
lea	eax, [esp+54h+var_24]
push	eax
mov	ecx, esi
call	sub_694820
mov	ecx, [esp+54h+var_20]
push	ecx
mov	ecx, [edi+4]
call	sub_6528F0
mov	ecx, [esp+54h+var_20]
cmp	ecx, ebx
jz	short loc_6C10D1
call	sub_64A400
jmp	short loc_6C10D1

loc_6C10A5:
mov	ecx, [edi+18h]
call	sub_668000
test	eax, eax
jz	short loc_6C10D1
mov	edx, [esp+54h+var_44]
mov	eax, [edx]
mov	ecx, [edi+18h]
push	eax
push	offset aMovefocusInval ; "moveFocus: invalid string id for key:	'"...
call	sub_668000
add	eax, 0Ch
push	eax
call	sub_6AAFC0
add	esp, 0Ch

loc_6C10D1:
mov	eax, [esp+54h+var_44]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6C10E6
call	sub_650DF0

loc_6C10E6:
cmp	ebp, ebx
jz	short loc_6C10F1
mov	ecx, ebp
call	sub_64A400

loc_6C10F1:
pop	ebp

loc_6C10F2:
pop	edi
pop	esi
pop	ebx
add	esp, 44h
retn
sub_6C0E00 endp

align 10h



sub_6C1100 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 18h
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1
mov	eax, [edi+18h]
test	eax, eax
jz	loc_6C1236
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6C1236
mov	esi, 1
cmp	[edi+1Ch], esi
jl	loc_6C1236
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
mov	[esp+20h+arg_0], eax
test	eax, eax
jz	short loc_6C115B
add	[eax+4], esi

loc_6C115B:
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	ebx
push	ebp
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 10h
push	eax
push	edx
call	sub_671840
mov	ebp, eax
lea	esi, [ebp+38h]
mov	ebx, 4
cmp	[esi+8], ebx
jnb	short loc_6C11BC
mov	eax, [esi]
mov	ecx, dword_1855FC0
test	eax, eax
jz	short loc_6C11A0
mov	edx, [ecx]
push	10h
push	eax
mov	eax, [edx+2Ch]
call	eax
jmp	short loc_6C11B7

loc_6C11A0:
lea	eax, [esp+28h+var_18]
push	eax
mov	[esp+2Ch+var_18], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	10h
push	esi
call	edx

loc_6C11B7:
mov	[esi], eax
mov	[esi+8], ebx

loc_6C11BC:
xor	esi, esi
mov	edi, edi

loc_6C11C0:
mov	ecx, [edi+18h]
push	esi
lea	eax, [esp+2Ch+var_14]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_6B5F60
mov	ebx, [esp+28h+var_14]
cmp	ebx, [esp+28h+arg_0]
jnz	short loc_6C11FD
lea	ecx, [esp+28h+var_10]
push	ecx
mov	ecx, ebp
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], esi
call	sub_65E720
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6C11FD:
test	ebx, ebx
jz	short loc_6C1208
mov	ecx, ebx
call	sub_64A400

loc_6C1208:
inc	esi
cmp	esi, 4
jb	short loc_6C11C0
mov	ecx, [edi+4]
push	ebp
call	sub_652E40
test	ebp, ebp
jz	short loc_6C1222
mov	ecx, ebp
call	sub_64B3B0

loc_6C1222:
mov	ecx, [esp+28h+arg_0]
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_6C1236
pop	edi
pop	esi
add	esp, 18h
jmp	sub_64A400

loc_6C1236:
pop	edi
pop	esi
add	esp, 18h
retn
sub_6C1100 endp

align 10h



sub_6C1240 proc	near

var_24=	qword ptr -24h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 24h
push	ebx
push	ebp
mov	ebp, [esp+2Ch+arg_0]
mov	eax, [ebp+78h]
push	esi
lea	ebx, [ebp+78h]
mov	[esp+30h+var_10], 0
mov	ecx, [eax+2ACh]
mov	edx, [ecx+10h]
lea	esi, [esp+30h+var_10]
push	esi
add	eax, 5Ch
add	ecx, 10h
push	eax
mov	eax, [edx+2Ch]
push	ebx
call	eax
test	al, al
jz	loc_6C1409
push	ebp
mov	ecx, esi
call	sub_652C20
test	eax, eax
jz	loc_6C1409
add	eax, 10h
mov	[esp+30h+var_14], eax
jz	loc_6C1409
mov	ecx, [ebx]
cmp	byte ptr [ecx+2B0h], 1
mov	[esp+30h+arg_0], 2
jnz	short loc_6C12EC
mov	edx, [esp+30h+arg_C]
fild	[esp+30h+arg_C]
test	edx, edx
jge	short loc_6C12BA
fadd	ds:dbl_15FCE08

loc_6C12BA:
add	dword ptr [ebp+8], 10h
fstp	[esp+30h+var_24]
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C12D4
mov	ecx, esi
call	sub_64B530

loc_6C12D4:
mov	esi, [esi]
test	esi, esi
jz	short loc_6C12E4
fld	[esp+30h+var_24]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_6C12E4:
mov	[esp+30h+arg_0], 3

loc_6C12EC:
mov	eax, [esp+30h+arg_8]
push	edi
test	eax, eax
jz	short loc_6C132D
push	eax
lea	ecx, [esp+38h+var_24]
call	sub_651CF0
add	dword ptr [ebp+8], 10h
lea	esi, [ebp+8]
mov	edi, eax
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6C1316
mov	ecx, esi
call	sub_64B530

loc_6C1316:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6C1322
push	edi
call	sub_652330

loc_6C1322:
lea	ecx, [esp+34h+var_24]
call	sub_652830
jmp	short loc_6C134C

loc_6C132D:
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C1343
mov	ecx, esi
call	sub_64B530

loc_6C1343:
mov	eax, [esi]
test	eax, eax
jz	short loc_6C134C
mov	byte ptr [eax],	1

loc_6C134C:
mov	eax, [esp+34h+arg_4]
test	eax, eax
jz	short loc_6C1388
push	eax
lea	ecx, [esp+38h+var_24]
call	sub_651CF0
add	dword ptr [esi], 10h
mov	edi, eax
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6C1371
mov	ecx, esi
call	sub_64B530

loc_6C1371:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6C137D
push	edi
call	sub_652330

loc_6C137D:
lea	ecx, [esp+34h+var_24]
call	sub_652830
jmp	short loc_6C13A2

loc_6C1388:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6C1399
mov	ecx, esi
call	sub_64B530

loc_6C1399:
mov	eax, [esi]
test	eax, eax
jz	short loc_6C13A2
mov	byte ptr [eax],	1

loc_6C13A2:
mov	eax, [esi]
sub	eax, [esi+4]
mov	ecx, [esi+14h]
mov	edx, [ebx]
push	0
shl	ecx, 5
sar	eax, 4
push	0Ah
lea	edi, [eax+ecx-20h]
mov	ecx, [edx+280h]
push	offset aOnsetfocus ; "onSetFocus"
call	sub_650E40
mov	ecx, [esp+34h+var_14]
push	edi
mov	edi, [esp+38h+arg_0]
mov	dword ptr [esp+38h+var_24], eax
inc	dword ptr [eax+8]
push	edi
lea	eax, [esp+3Ch+var_24]
push	eax
push	ecx
push	ebp
call	sub_6C2A80
mov	eax, dword ptr [esp+48h+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6C1400
call	sub_650DF0

loc_6C1400:
push	edi
mov	ecx, esi
call	sub_64C1F0
pop	edi

loc_6C1409:
lea	ecx, [esp+30h+var_10]
call	sub_652830
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn
sub_6C1240 endp

align 10h



sub_6C1420 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_30=	byte ptr -30h
var_2C=	qword ptr -2Ch
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 4Ch
mov	eax, [esp+4Ch+arg_4]
push	ebp
xor	ebp, ebp
push	esi
push	edi
mov	[esp+58h+var_4C], ebp
mov	[esp+58h+var_48], ebp
mov	[esp+58h+var_44], ebp
cmp	eax, ebp
jz	short loc_6C1477
push	eax
lea	ecx, [esp+5Ch+var_10]
call	sub_651CF0
mov	edi, eax
lea	eax, [esp+58h+var_4C]
push	1
push	eax
mov	ecx, eax
call	sub_683310
mov	esi, [esp+58h+var_48]
mov	edx, [esp+58h+var_4C]
mov	ecx, esi
shl	ecx, 4
lea	ecx, [ecx+edx-10h]
cmp	ecx, ebp
jz	short loc_6C1471
push	edi
call	sub_652330

loc_6C1471:
lea	ecx, [esp+58h+var_10]
jmp	short loc_6C14AD

loc_6C1477:
lea	eax, [esp+58h+var_4C]
push	1
push	eax
mov	ecx, eax
mov	[esp+60h+var_20], 1
call	sub_683310
mov	esi, [esp+58h+var_48]
mov	edx, [esp+58h+var_4C]
mov	ecx, esi
shl	ecx, 4
lea	ecx, [ecx+edx-10h]
cmp	ecx, ebp
jz	short loc_6C14A9
lea	eax, [esp+58h+var_20]
push	eax
call	sub_652330

loc_6C14A9:
lea	ecx, [esp+58h+var_20]

loc_6C14AD:
call	sub_652830
mov	ecx, [esp+58h+arg_C]
inc	esi
lea	edx, [esp+58h+var_4C]
push	esi
mov	[esp+5Ch+var_3C], ecx
push	edx
mov	ecx, edx
mov	[esp+60h+var_40], 4
call	sub_683310
mov	esi, [esp+58h+var_48]
mov	ecx, [esp+58h+var_4C]
mov	eax, esi
shl	eax, 4
lea	ecx, [eax+ecx-10h]
cmp	ecx, ebp
jz	short loc_6C14EC
lea	edx, [esp+58h+var_40]
push	edx
call	sub_652330

loc_6C14EC:
lea	ecx, [esp+58h+var_40]
call	sub_652830
fild	[esp+58h+arg_8]
mov	eax, [esp+58h+arg_8]
mov	[esp+58h+var_30], 3
test	eax, eax
jge	short loc_6C150C
fadd	ds:dbl_15FCE08

loc_6C150C:
inc	esi
fstp	[esp+58h+var_2C]
push	esi
lea	ecx, [esp+5Ch+var_4C]
push	ecx
call	sub_683310
mov	edx, [esp+58h+var_48]
mov	eax, [esp+58h+var_4C]
shl	edx, 4
lea	ecx, [edx+eax-10h]
cmp	ecx, ebp
jz	short loc_6C1539
lea	edx, [esp+58h+var_30]
push	edx
call	sub_652330

loc_6C1539:
lea	ecx, [esp+58h+var_30]
call	sub_652830
mov	edi, [esp+58h+arg_0]
mov	ecx, edi
call	sub_668010
push	4
lea	ecx, [eax+2408h]
call	sub_696220
push	ebp
mov	ecx, edi
mov	esi, eax
call	sub_668010
mov	ecx, eax
call	sub_68E580
mov	edi, eax
mov	dword ptr [esi+4], 4
cmp	edi, ebp
jz	short loc_6C157B
inc	dword ptr [edi+4]

loc_6C157B:
mov	ecx, [esi+8]
cmp	ecx, ebp
jz	short loc_6C1587
call	sub_64A400

loc_6C1587:
mov	[esi+8], edi
mov	ecx, [esi+0Ch]
cmp	ecx, ebp
jz	short loc_6C1596
call	sub_64A400

loc_6C1596:
lea	eax, [esp+58h+var_4C]
mov	[esi+0Ch], ebp
push	eax
lea	ecx, [esi+30h]
mov	dword ptr [esi+2Ch], offset sub_6C0190
call	sub_684BD0
lea	ecx, [esp+58h+var_4C]
call	sub_6806F0
pop	edi
pop	esi
pop	ebp
add	esp, 4Ch
retn
sub_6C1420 endp

align 10h



sub_6C15C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6B6B70
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143A238
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6C15C0 endp

align 10h



sub_6C1610 proc	near

var_D1=	byte ptr -0D1h
var_D0=	dword ptr -0D0h
var_C9=	byte ptr -0C9h
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	word ptr -84h
var_82=	byte ptr -82h
var_81=	byte ptr -81h
var_80=	byte ptr -80h
var_7F=	byte ptr -7Fh
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_74=	word ptr -74h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_38=	byte ptr -38h
var_28=	byte ptr -28h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 0D4h
push	ebp
mov	ebp, [esp+0D8h+arg_0]
push	esi
mov	esi, [ebp+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	eax, [ebp+1Ch]
test	eax, eax
jz	loc_6C1CD4
push	edi
xor	edi, edi
cmp	eax, 6
mov	[esp+0E0h+var_D0], edi
jl	short loc_6C165D
mov	eax, [ebp+18h]
push	eax
push	5
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	edi, eax
mov	[esp+0E0h+var_D0], edi

loc_6C165D:
mov	ecx, [ebp+18h]
push	ebx
call	sub_668010
cmp	dword ptr [ebp+1Ch], 4
mov	esi, eax
mov	[esp+0E4h+var_BC], esi
mov	ebx, 1
jl	short loc_6C16B8
push	3
mov	ecx, ebp
call	sub_651EC0
mov	al, [eax]
test	al, al
jz	short loc_6C16B8
cmp	al, 0Ah
jz	short loc_6C16B8
push	3
mov	ecx, ebp
call	sub_651EC0
cmp	[eax], bl
jz	short loc_6C16B8
mov	ecx, [ebp+18h]
push	ecx
push	3
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
test	eax, eax
jz	short loc_6C16B2
add	[eax+4], ebx

loc_6C16B2:
mov	[esp+0E4h+var_C0], eax
jmp	short loc_6C16DF

loc_6C16B8:
push	edi
lea	edx, [esp+0E8h+var_7C]
push	edx
mov	ecx, esi
call	sub_6B5F60
mov	eax, [eax]
test	eax, eax
jz	short loc_6C16CE
add	[eax+4], ebx

loc_6C16CE:
mov	ecx, [esp+0E4h+var_7C]
mov	[esp+0E4h+var_C0], eax
test	ecx, ecx
jz	short loc_6C16DF
call	sub_64A400

loc_6C16DF:
cmp	dword ptr [ebp+1Ch], 5
jl	short loc_6C16FF
mov	eax, [ebp+18h]
push	eax
push	4
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+0E4h+var_B4], al
jmp	short loc_6C1704

loc_6C16FF:
mov	byte ptr [esp+0E4h+var_B4], 0

loc_6C1704:
mov	esi, [ebp+18h]
push	0
mov	ecx, ebp
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+0F0h+var_C4]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edi, [esp+0E4h+var_C4]
mov	esi, [edi]
mov	[esp+0E4h+var_D1], 0
mov	ecx, offset aUp_2 ; "up"
mov	eax, esi

loc_6C1733:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C1753
test	dl, dl
jz	short loc_6C174F
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C1753
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C1733

loc_6C174F:
xor	eax, eax
jmp	short loc_6C1758

loc_6C1753:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C1758:
mov	ebx, 9
test	eax, eax
jnz	short loc_6C176E
mov	[esp+0E4h+var_C8], 26h
jmp	loc_6C1811

loc_6C176E:		; "down"
mov	ecx, offset aDown_0
mov	eax, esi

loc_6C1775:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C1795
test	dl, dl
jz	short loc_6C1791
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C1795
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C1775

loc_6C1791:
xor	eax, eax
jmp	short loc_6C179A

loc_6C1795:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C179A:
test	eax, eax
jnz	short loc_6C17A8
mov	[esp+0E4h+var_C8], 28h
jmp	short loc_6C1811

loc_6C17A8:		; "left"
push	offset aLeft_0
lea	ecx, [esp+0E8h+var_C4]
call	sub_67DA70
test	al, al
jz	short loc_6C17C4
mov	[esp+0E4h+var_C8], 25h
jmp	short loc_6C1811

loc_6C17C4:		; "right"
push	offset aRight
lea	ecx, [esp+0E8h+var_C4]
call	sub_67DA70
test	al, al
jz	short loc_6C17E0
mov	[esp+0E4h+var_C8], 27h
jmp	short loc_6C1811

loc_6C17E0:		; "tab"
push	offset aTab
lea	ecx, [esp+0E8h+var_C4]
call	sub_67DA70
test	al, al
jnz	short loc_6C180D
push	offset aShifttab ; "shifttab"
lea	ecx, [esp+0E8h+var_C4]
call	sub_67DA70
test	al, al
jz	loc_6C1CB2
mov	[esp+0E4h+var_D1], 1

loc_6C180D:
mov	[esp+0E4h+var_C8], ebx

loc_6C1811:
xor	ebx, ebx
xor	esi, esi
cmp	dword ptr [ebp+1Ch], 2
mov	[esp+0E4h+var_B8], ebx
jl	short loc_6C1892
mov	edi, 1
push	edi
mov	ecx, ebp
call	sub_651EC0
push	eax
lea	ecx, [esp+0E8h+var_38]
call	sub_652330
mov	al, [esp+0E4h+var_38]
cmp	al, 1
jz	short loc_6C186B
test	al, al
jz	short loc_6C186B
cmp	al, 0Ah
jz	short loc_6C186B
mov	edx, [ebp+18h]
push	edx
lea	ecx, [esp+0E8h+var_38]
call	sub_651BB0
cmp	eax, esi
jz	short loc_6C1863
add	[eax+4], edi

loc_6C1863:
mov	ebx, eax
mov	[esp+0E4h+var_B8], ebx
jmp	short loc_6C1886

loc_6C186B:
mov	eax, [esp+0E4h+var_D0]
mov	ecx, [esp+0E4h+var_BC]
push	eax
call	sub_691370
cmp	eax, esi
jz	short loc_6C1880
add	[eax+4], edi

loc_6C1880:
mov	ebx, eax
mov	[esp+0E4h+var_B8], eax

loc_6C1886:
lea	ecx, [esp+0E4h+var_38]
call	sub_652830

loc_6C1892:
cmp	dword ptr [ebp+1Ch], 3
jl	short loc_6C18B2
mov	ecx, [ebp+18h]
push	ecx
push	2
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	[esp+0E4h+var_C9], al
jmp	short loc_6C18B7

loc_6C18B2:
mov	[esp+0E4h+var_C9], 0

loc_6C18B7:
fldz
mov	al, byte ptr [esp+0E4h+var_D0]
mov	cx, word ptr [esp+0E4h+var_C8]
fst	[esp+0E4h+var_94]
xor	edx, edx
fst	[esp+0E4h+var_90]
mov	[esp+0E4h+var_84], dx
fst	[esp+0E4h+var_8C]
mov	[esp+0E4h+var_82], dl
fstp	[esp+0E4h+var_88]
mov	[esp+0E4h+var_81], dl
mov	[esp+0E4h+var_80], dl
mov	[esp+0E4h+var_7F], dl
mov	dl, [esp+0E4h+var_D1]
mov	byte ptr [esp+0E4h+var_70], al
mov	eax, [ebp+18h]
mov	[esp+0E4h+var_74], cx
mov	[esp+0E4h+var_A0], esi
mov	[esp+0E4h+var_9C], esi
mov	[esp+0E4h+var_98], 0FFFFFFFFh
mov	[esp+0E4h+var_71], dl
mov	ecx, [eax+78h]
mov	edx, [ecx+294h]
push	edx
lea	ecx, [esp+0E8h+var_6C]
call	sub_699820
cmp	ebx, esi
jz	loc_6C19AE
mov	edi, [ebx+94h]
cmp	edi, esi
jnz	short loc_6C193F
mov	ecx, ebx
call	sub_658B70
mov	edi, eax
cmp	edi, esi
jz	short loc_6C1941

loc_6C193F:
inc	dword ptr [edi]

loc_6C1941:
mov	eax, [esp+0E4h+var_54]
cmp	eax, esi
jz	short loc_6C196A
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jg	short loc_6C196A
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C196A:
cmp	[esp+0E4h+var_C0], 0
mov	[esp+0E4h+var_54], edi
jz	short loc_6C19B2
mov	edi, [esp+0E4h+var_C0]
mov	ecx, edi
call	sub_64A4A0
mov	esi, eax
mov	eax, [esp+0E4h+var_58]
test	eax, eax
jz	short loc_6C19A5
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_6C19A5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6C19A5:
mov	[esp+0E4h+var_58], esi
jmp	short loc_6C19E1

loc_6C19AE:
xor	edi, edi
jmp	short loc_6C1941

loc_6C19B2:
mov	eax, [esp+0E4h+var_58]
test	eax, eax
jz	short loc_6C19D2
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_6C19D2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6C19D2:
mov	edi, [esp+0E4h+var_C0]
mov	[esp+0E4h+var_58], 0

loc_6C19E1:
mov	edx, [esp+0E4h+var_B4]
mov	esi, [esp+0E4h+var_BC]
lea	ecx, [esp+0E4h+var_6C]
push	ecx
push	edx
lea	eax, [esp+0ECh+var_78]
push	eax
lea	ecx, [esp+0F0h+var_A0]
push	ecx
mov	ecx, esi
call	sub_696EF0
lea	edx, [esp+0E4h+var_A0]
push	edx
lea	eax, [esp+0E8h+var_78]
push	eax
push	5
mov	ecx, esi
mov	[esp+0F0h+var_81], 1
call	sub_697010
mov	eax, [esp+0E4h+var_9C]
test	eax, eax
jz	short loc_6C1A32
cmp	eax, edi
jz	short loc_6C1A32
mov	ecx, [ebp+4]
push	eax
call	sub_6528F0
jmp	loc_6C1C1C

loc_6C1A32:
cmp	[esp+0E4h+var_C9], 0
jz	loc_6C1C0F
mov	eax, [esp+0E4h+var_64]
test	eax, eax
jz	loc_6C1C0F
cmp	word ptr [esp+0E4h+var_C8], 9
jnz	short loc_6C1A81
test	[esp+0E4h+var_D1], 1
mov	ecx, [esp+0E4h+var_68]
jnz	short loc_6C1A6F
mov	edx, [ecx]
mov	ecx, [ebp+4]
push	edx
call	sub_6528F0
jmp	loc_6C1C1C

loc_6C1A6F:
mov	edx, [ecx+eax*4-4]
mov	ecx, [ebp+4]
push	edx
call	sub_6528F0
jmp	loc_6C1C1C

loc_6C1A81:
fld	ds:flt_15FD4F4
xor	ebp, ebp
xor	edi, edi
fstp	[esp+0E4h+var_D0]
mov	ebx, eax
test	eax, eax
jbe	loc_6C1B89
lea	esp, [esp+0]

loc_6C1AA0:
mov	eax, [esp+0E4h+var_68]
lea	ecx, [eax+edi*4]
mov	eax, [ecx]
test	eax, eax
jz	short loc_6C1AB0
inc	dword ptr [eax+4]

loc_6C1AB0:
cmp	[esp+0E4h+var_80], 0
mov	esi, [ecx]
jnz	short loc_6C1ACD
mov	edx, [esi]
mov	eax, [edx+0D4h]
mov	ecx, esi
call	eax
test	al, al
jz	loc_6C1B79	; default

loc_6C1ACD:
movzx	eax, [esp+0E4h+var_82]
mov	ecx, [esp+0E4h+var_BC]
mov	edx, [esi]
mov	edx, [edx+0C4h]
push	eax
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_6C1B79	; default
lea	ecx, [esp+0E4h+var_28]
call	sub_64E8E0
lea	eax, [esp+0E4h+var_28]
push	eax
mov	ecx, esi
call	sub_654B40
mov	edx, [esi]
mov	edx, [edx+0F4h]
lea	eax, [esp+0E4h+var_10]
push	eax
mov	ecx, esi
call	edx
fldz
push	eax
fst	[esp+0E8h+var_B0]
fst	[esp+0E8h+var_AC]
lea	eax, [esp+0E8h+var_B0]
fst	[esp+0E8h+var_A8]
push	eax
lea	ecx, [esp+0ECh+var_28]
fstp	[esp+0ECh+var_A4]
call	sub_64EF10
movsx	eax, word ptr [esp+0E4h+var_C8]
add	eax, 0FFFFFFDBh	; switch 4 cases
cmp	eax, 3
ja	short loc_6C1B79 ; default
jmp	ds:off_6C1CE0[eax*4] ; switch jump

loc_6C1B53:		; jumptable 006C1B4C case 40
fld	ds:flt_15FD4F4
fld	[esp+0E4h+var_D0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld	[esp+0E4h+var_AC]

loc_6C1B67:
test	ah, 44h
jnp	short loc_6C1BAA
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_6C1BAC

loc_6C1B77:
fstp	st

loc_6C1B79:		; default
mov	ecx, esi
call	sub_64A400
inc	edi
cmp	edi, ebx
jb	loc_6C1AA0

loc_6C1B89:
mov	ecx, [esp+0E4h+var_68]
mov	edx, [ecx+ebp*4]
mov	eax, [esp+0E4h+arg_0]
mov	ecx, [eax+4]
push	edx
call	sub_6528F0
mov	ebx, [esp+0E4h+var_B8]
mov	edi, [esp+0E4h+var_C0]
jmp	short loc_6C1C1C

loc_6C1BAA:
fstp	st(1)

loc_6C1BAC:
fstp	[esp+0E4h+var_D0]
mov	ebp, edi
jmp	short loc_6C1B79 ; default

loc_6C1BB4:		; jumptable 006C1B4C case 38
fld	ds:flt_15FD4F4
fld	[esp+0E4h+var_D0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld	[esp+0E4h+var_A4]

loc_6C1BC8:
test	ah, 44h
jnp	short loc_6C1BAA
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_6C1B77
fstp	[esp+0E4h+var_D0]
mov	ebp, edi
jmp	short loc_6C1B79 ; default

loc_6C1BE0:		; jumptable 006C1B4C case 37
fld	ds:flt_15FD4F4
fld	[esp+0E4h+var_D0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld	[esp+0E4h+var_A8]
jmp	short loc_6C1BC8

loc_6C1BF6:		; jumptable 006C1B4C case 39
fld	ds:flt_15FD4F4
fld	[esp+0E4h+var_D0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld	[esp+0E4h+var_B0]
jmp	loc_6C1B67

loc_6C1C0F:
mov	esi, [ebp+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1

loc_6C1C1C:
mov	eax, [esp+0E4h+var_54]
test	eax, eax
jz	short loc_6C1C45
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jg	short loc_6C1C45
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C1C45:
mov	eax, [esp+0E4h+var_58]
test	eax, eax
jz	short loc_6C1C65
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_6C1C65
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6C1C65:
lea	ecx, [esp+0E4h+var_68]
call	sub_7D3200
mov	ecx, [esp+0E4h+var_9C]
test	ecx, ecx
jz	short loc_6C1C7B
call	sub_64A400

loc_6C1C7B:
test	ebx, ebx
jz	short loc_6C1C86
mov	ecx, ebx
call	sub_64A400

loc_6C1C86:
mov	eax, [esp+0E4h+var_C4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C1C9C
call	sub_650DF0

loc_6C1C9C:
test	edi, edi
jz	short loc_6C1CD2
mov	ecx, edi
call	sub_64A400
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 0D4h
retn

loc_6C1CB2:
dec	dword ptr [edi+8]
cmp	dword ptr [edi+8], 0
lea	eax, [edi+8]
mov	ecx, edi
jnz	short loc_6C1CC5
call	sub_650DF0

loc_6C1CC5:
mov	ecx, [esp+0E4h+var_C0]
test	ecx, ecx
jz	short loc_6C1CD2
call	sub_64A400

loc_6C1CD2:
pop	ebx
pop	edi

loc_6C1CD4:
pop	esi
pop	ebp
add	esp, 0D4h
retn
sub_6C1610 endp

align 10h
off_6C1CE0 dd offset loc_6C1BE0	; jump table for switch	statement
dd offset loc_6C1BB4
dd offset loc_6C1BF6
dd offset loc_6C1B53



sub_6C1CF0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
push	ebx
push	ebp
mov	[esp+1Ch+var_14], ecx
mov	ecx, [esp+1Ch+arg_0]
mov	eax, [ecx+78h]
cmp	byte ptr [eax+2B0h], 1
lea	ebp, [ecx+78h]
push	esi
push	edi
mov	edi, [esp+24h+arg_4]
jnz	loc_6C205A
call	sub_668010
mov	ecx, [edi]
mov	esi, [ecx]
mov	ebx, eax
mov	ecx, offset aCapturefocus ; "captureFocus"
mov	eax, esi

loc_6C1D28:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C1D48
test	dl, dl
jz	short loc_6C1D44
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C1D48
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C1D28

loc_6C1D44:
xor	eax, eax
jmp	short loc_6C1D4D

loc_6C1D48:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C1D4D:
test	eax, eax
jnz	short loc_6C1D7F
push	offset sub_6C0D00

loc_6C1D56:
push	ebp
lea	ecx, [esp+2Ch+var_10]
call	sub_651D30

loc_6C1D60:
mov	ecx, [esp+24h+arg_8]
push	eax
call	sub_652520
lea	ecx, [esp+24h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	0Ch

loc_6C1D7F:		; "disableFocusAutoRelease"
mov	ecx, offset aDisablefocusau
mov	eax, esi

loc_6C1D86:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C1DA6
test	dl, dl
jz	short loc_6C1DA2
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C1DA6
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C1D86

loc_6C1DA2:
xor	eax, eax
jmp	short loc_6C1DAB

loc_6C1DA6:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C1DAB:
test	eax, eax
jnz	short loc_6C1E0D
mov	eax, [ebx+2474h]
shr	eax, 16h
and	eax, 3
cmp	eax, 3
jz	short loc_6C1DC9
test	eax, eax
jz	short loc_6C1DF3
cmp	eax, 3
jnz	short loc_6C1DCE

loc_6C1DC9:
or	edi, 0FFFFFFFFh
jmp	short loc_6C1DD0

loc_6C1DCE:
mov	edi, eax

loc_6C1DD0:
mov	esi, [esp+24h+arg_8]
mov	ecx, esi
call	sub_652060
cmp	edi, 1
pop	edi
setz	dl
mov	byte ptr [esi],	2
mov	[esi+4], dl
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	0Ch

loc_6C1DF3:
mov	esi, [esp+24h+arg_8]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	0
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	0Ch

loc_6C1E0D:		; "alwaysEnableArrowKeys"
push	offset aAlwaysenablear
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1E57
movzx	eax, byte ptr [ebx+2477h]
and	eax, 3

loc_6C1E27:
cmp	eax, 3
jz	short loc_6C1E35
test	eax, eax
jz	short loc_6C1DF3
cmp	eax, 3
jnz	short loc_6C1E38

loc_6C1E35:
or	eax, 0FFFFFFFFh

loc_6C1E38:
cmp	eax, 1
setz	al
movzx	ecx, al
push	ecx
mov	ecx, [esp+28h+arg_8]
call	sub_64A6C0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	0Ch

loc_6C1E57:		; "alwaysEnableKeyboardPress"
push	offset aAlwaysenableke
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1EA7
mov	eax, [ebx+2474h]
shr	eax, 1Ah
and	eax, 3
cmp	eax, 3
jz	short loc_6C1E85
test	eax, eax
jz	loc_6C1DF3
cmp	eax, 3
jnz	short loc_6C1E88

loc_6C1E85:
or	eax, 0FFFFFFFFh

loc_6C1E88:
mov	ecx, [esp+24h+arg_8]
cmp	eax, 1
setz	dl
movzx	eax, dl
push	eax
call	sub_64A6C0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	0Ch

loc_6C1EA7:		; "disableFocusRolloverEvent"
push	offset aDisablefocusro
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1EF7
mov	eax, [ebx+2474h]
shr	eax, 1Ch
and	eax, 3
cmp	eax, 3
jz	short loc_6C1ED5
test	eax, eax
jz	loc_6C1DF3
cmp	eax, 3
jnz	short loc_6C1ED8

loc_6C1ED5:
or	eax, 0FFFFFFFFh

loc_6C1ED8:
cmp	eax, 1
setz	cl
movzx	edx, cl
mov	ecx, [esp+24h+arg_8]
push	edx
call	sub_64A6C0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	0Ch

loc_6C1EF7:		; "disableFocusKeys"
push	offset aDisablefocuske
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1F15
mov	eax, [ebx+2474h]
shr	eax, 1Eh
jmp	loc_6C1E27

loc_6C1F15:		; "modalClip"
push	offset aModalclip
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1F44
push	0
mov	ecx, ebx
call	sub_691370
mov	ecx, [esp+24h+arg_8]
push	eax
call	sub_6528F0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	0Ch

loc_6C1F44:		; "moveFocus"
push	offset aMovefocus
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1F5E
push	offset sub_6C0E00
jmp	loc_6C1D56

loc_6C1F5E:		; "findFocus"
push	offset aFindfocus
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1F78
push	offset sub_6C1610
jmp	loc_6C1D56

loc_6C1F78:		; "setModalClip"
push	offset aSetmodalclip
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1F92
push	offset sub_6C0200
jmp	loc_6C1D56

loc_6C1F92:		; "getModalClip"
push	offset aGetmodalclip
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1FAC
push	offset sub_6C0290
jmp	loc_6C1D56

loc_6C1FAC:		; "setControllerFocusGroup"
push	offset aSetcontrollerf
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1FC6
push	offset sub_6C0380
jmp	loc_6C1D56

loc_6C1FC6:		; "getControllerFocusGroup"
push	offset aGetcontrollerf
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1FE0
push	offset sub_6C0400
jmp	loc_6C1D56

loc_6C1FE0:		; "getFocusBitmask"
push	offset aGetfocusbitmas
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C1FFA
push	offset sub_6C08D0
jmp	loc_6C1D56

loc_6C1FFA:		; "numFocusGroups"
push	offset aNumfocusgroups
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C2022
mov	edx, [ebx+27F0h]
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], edx
lea	eax, [esp+24h+var_10]
jmp	loc_6C1D60

loc_6C2022:		; "getControllerMaskByFocusGroup"
push	offset aGetcontrollerm
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C203C
push	offset sub_6C0300
jmp	loc_6C1D56

loc_6C203C:		; "getFocusArray"
push	offset aGetfocusarray
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C2056
push	offset sub_6C1100
jmp	loc_6C1D56

loc_6C2056:
mov	ecx, [esp+24h+arg_0]

loc_6C205A:
mov	edx, [esp+24h+arg_8]
push	edx
push	edi
push	ecx
mov	ecx, [esp+30h+var_14]
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	0Ch
sub_6C1CF0 endp

align 10h



sub_6C2080 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6C20ED
push	offset sub_6EF500
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
lea	ebx, [edi+10h]
lea	ecx, [esp+28h+var_18]
push	ebx
push	ecx
mov	dword ptr [edi], offset	off_143C238
mov	dword ptr [ebx], offset	off_143A2C0
call	sub_6C2A50
push	7
push	offset off_143A288
lea	edx, [esp+38h+var_18]
push	edx
push	ebx
call	sub_66FC60
add	esp, 18h
jmp	short loc_6C20EF

loc_6C20ED:
xor	edi, edi

loc_6C20EF:
mov	ebp, [esp+28h+arg_0]
xor	ebx, ebx
mov	byte ptr [ebp+8], 0
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	54h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6C213F
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	eax, [esp+30h+var_18]
push	eax
mov	ecx, edi
call	sub_6C15C0
mov	ebx, eax
test	ebx, ebx
jz	short loc_6C213F
mov	ecx, [ebx+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebx+8], ecx

loc_6C213F:
lea	edx, [esp+28h+arg_4]
push	edx
lea	eax, [esp+2Ch+arg_0]
push	eax
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 15h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6C216D
call	sub_64B3B0

loc_6C216D:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	ecx, [esp+28h+arg_4]
push	ecx
mov	byte ptr [esp+2Ch+arg_4], 0
mov	edi, [eax]
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
push	eax
mov	eax, [edi]
add	esi, 5Ch
push	esi
lea	edx, [esp+34h+var_18]
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6C21B9
mov	ecx, ebx
call	sub_64B3B0

loc_6C21B9:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6C2080 endp

align 10h



sub_6C21D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
test	eax, eax
jnz	short loc_6C21DB
xor	al, al
retn

loc_6C21DB:
mov	ecx, [esp+arg_0]
push	1
push	offset off_143A4AC
push	ecx
push	eax
call	sub_66FC60
add	esp, 10h
mov	al, 1
retn
sub_6C21D0 endp

align 10h



sub_6C2200 proc	near
mov	eax, 24h
retn
sub_6C2200 endp

align 10h



sub_6C2210 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
lea	ebx, [edi+78h]
push	0
push	34h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6C2267
push	edi
mov	ecx, esi
call	sub_663BE0
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143A540
mov	ecx, [ebx]
push	13h
call	sub_66FB00
mov	edx, [edi]
push	eax
mov	eax, [edx+34h]
push	ebx
mov	ecx, edi
call	eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_6C2267:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6C2210 endp

align 10h



sub_6C2270 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+38h]
call	sub_67C210
lea	ecx, [edi+44h]
call	sub_67C210
mov	eax, [edi+50h]
test	eax, eax
jz	short loc_6C22BA
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6C22B8
lea	ebx, [ebx+0]

loc_6C22A0:
mov	eax, [edi+50h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6C22B3
call	sub_64B020

loc_6C22B3:
inc	esi
cmp	esi, ebx
jb	short loc_6C22A0

loc_6C22B8:
pop	esi
pop	ebx

loc_6C22BA:
pop	edi
retn
sub_6C2270 endp

align 10h



sub_6C22C0 proc	near

var_10=	byte ptr -10h
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_10=	dword ptr  14h

sub	esp, 14h
push	ebp
mov	ebp, [esp+18h+arg_4]
test	ebp, ebp
jnz	short loc_6C22D3
xor	al, al
pop	ebp
add	esp, 14h
retn

loc_6C22D3:
push	ebx
mov	ebx, [esp+1Ch+arg_0]
mov	eax, [ebx]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_6C22FD
push	ebx
mov	ecx, eax
call	sub_65EFC0
mov	edi, eax
jmp	short loc_6C22FF

loc_6C22FD:
xor	edi, edi

loc_6C22FF:
mov	esi, [ebx]
mov	ebp, [ebp+0]
lea	ecx, [esp+18h+var_5]
push	ecx
push	edi
lea	ecx, [esp+20h+var_4]
mov	[esp+20h+var_5], 1
add	esi, 150h
call	sub_652700
mov	ecx, [esp+1Ch+arg_10]
mov	edx, [ebp+28h]
push	eax
push	esi
push	ebx
call	edx
lea	ecx, [esp+24h+var_10]
call	sub_652830
test	edi, edi
jz	short loc_6C233E
mov	ecx, edi
call	sub_64B3B0

loc_6C233E:
pop	edi
pop	esi
pop	ebx
mov	al, 1
pop	ebp
add	esp, 14h
retn
sub_6C22C0 endp

align 10h



sub_6C2350 proc	near

var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
sub	esp, 20h
test	ecx, ecx
jz	loc_6C2447
cmp	[esp+20h+arg_8], 0
jz	loc_6C2447
push	ebx
mov	ebx, [esp+24h+arg_0]
mov	edx, [ebx+78h]
push	ebp
push	esi
mov	esi, [ecx]
push	edi
lea	eax, [ebx+78h]
lea	edi, [esp+30h+var_20]
push	edi
add	edx, 150h
push	edx
push	eax
mov	eax, [esi+2Ch]
mov	[esp+3Ch+var_20], 0
call	eax
test	al, al
jz	loc_6C241A
push	ebx
mov	ecx, edi
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_6C241A
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 7
jnz	short loc_6C241A
mov	ecx, [esi+8]
mov	ebp, [esi+3Ch]
inc	ecx
and	ecx, 8FFFFFFFh
xor	edi, edi
mov	[esi+8], ecx
test	ebp, ebp
jbe	short loc_6C23EB
lea	ecx, [ecx+0]

loc_6C23D0:
mov	edx, [esi+38h]
mov	ecx, [edx+edi*4]
test	ecx, ecx
jz	short loc_6C23E6
push	ebx
call	sub_652D70
cmp	eax, [esp+30h+arg_8]
jz	short loc_6C242D

loc_6C23E6:
inc	edi
cmp	edi, ebp
jb	short loc_6C23D0

loc_6C23EB:
mov	eax, [esp+30h+arg_8]
push	eax
lea	ecx, [esp+34h+var_10]
mov	[esp+34h+var_10], 0
call	sub_652EF0
lea	ecx, [esp+30h+var_10]
push	ecx
mov	ecx, esi
call	sub_65E720
lea	ecx, [esp+30h+var_10]
call	sub_652830
mov	ecx, esi
call	sub_64B3B0

loc_6C241A:
lea	ecx, [esp+30h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 20h
retn

loc_6C242D:
mov	ecx, esi
call	sub_64B3B0
lea	ecx, [esp+30h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 20h
retn

loc_6C2447:
xor	al, al
add	esp, 20h
retn
sub_6C2350 endp

align 10h



sub_6C2450 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
sub	esp, 10h
push	ebp
test	ecx, ecx
jz	loc_6C2527
mov	ebp, [esp+14h+arg_8]
test	ebp, ebp
jz	loc_6C2527
push	ebx
mov	ebx, [esp+18h+arg_0]
mov	edx, [ebx+78h]
push	esi
mov	esi, [ecx]
push	edi
lea	eax, [ebx+78h]
lea	edi, [esp+20h+var_10]
push	edi
add	edx, 150h
push	edx
push	eax
mov	eax, [esi+2Ch]
mov	[esp+2Ch+var_10], 0
call	eax
test	al, al
jz	short loc_6C24F0
push	ebx
mov	ecx, edi
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_6C24F0
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 7
jnz	short loc_6C24F0
mov	ecx, [esi+8]
mov	edi, [esi+3Ch]
inc	ecx
and	ecx, 8FFFFFFFh
sub	edi, 1
mov	[esi+8], ecx
js	short loc_6C24E9
lea	esp, [esp+0]

loc_6C24D0:
mov	edx, [esi+38h]
mov	ecx, [edx+edi*4]
test	ecx, ecx
jz	short loc_6C24E4
push	ebx
call	sub_652D70
cmp	eax, ebp
jz	short loc_6C2503

loc_6C24E4:
sub	edi, 1
jns	short loc_6C24D0

loc_6C24E9:
mov	ecx, esi
call	sub_64B3B0

loc_6C24F0:
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebx
xor	al, al
pop	ebp
add	esp, 10h
retn

loc_6C2503:
push	1
push	edi
mov	ecx, esi
call	sub_65E7F0
mov	ecx, esi
call	sub_64B3B0
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebx
mov	al, 1
pop	ebp
add	esp, 10h
retn

loc_6C2527:
xor	al, al
pop	ebp
add	esp, 10h
retn
sub_6C2450 endp

align 10h



sub_6C2530 proc	near

var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 34h
mov	eax, [ecx+8]
mov	ecx, [ecx+4]
mov	[esp+34h+var_4], eax
mov	eax, [esp+34h+arg_8]
push	ebx
lea	edx, [esp+38h+var_34]
mov	[esp+38h+var_20], edx
mov	edx, [esp+38h+arg_4]
xor	ebx, ebx
mov	[esp+38h+var_1C], edx
mov	edx, [esp+38h+arg_0]
mov	[esp+38h+var_8], ecx
mov	ecx, [eax]
mov	eax, [eax+4]
push	ebx
mov	[esp+3Ch+var_C], edx
push	eax
mov	[esp+40h+var_34], bl
mov	[esp+40h+var_24], offset off_1431764
mov	[esp+40h+var_10], bl
mov	[esp+40h+var_18], ebx
mov	[esp+40h+var_14], ebx
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+40h+var_24]
push	eax
call	edx
test	[esp+38h+var_10], 2
mov	[esp+38h+var_24], offset off_1431764
jnz	short loc_6C25A7
mov	ecx, [esp+38h+var_18]
cmp	ecx, ebx
jz	short loc_6C25A7
call	sub_64B3B0

loc_6C25A7:
test	[esp+38h+var_10], 1
mov	[esp+38h+var_18], ebx
jnz	short loc_6C25BF
mov	ecx, [esp+38h+var_14]
cmp	ecx, ebx
jz	short loc_6C25BF
call	sub_64B3B0

loc_6C25BF:
lea	ecx, [esp+38h+var_34]
call	sub_652830
pop	ebx
add	esp, 34h
retn	0Ch
sub_6C2530 endp

align 10h



sub_6C25D0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
sub	esp, 50h
push	ebx
xor	ebx, ebx
cmp	ecx, ebx
jnz	short loc_6C25E5
xor	al, al
pop	ebx
add	esp, 50h
retn

loc_6C25E5:
mov	edx, [ecx]
push	ebp
mov	ebp, [esp+58h+arg_0]
mov	eax, [ebp+78h]
push	esi
push	edi
lea	esi, [ebp+78h]
lea	edi, [esp+60h+var_10]
push	edi
add	eax, 150h
push	eax
mov	eax, [edx+2Ch]
push	esi
mov	byte ptr [esp+6Ch+var_10], bl
call	eax
test	al, al
jz	loc_6C27F7
push	ebp
mov	ecx, edi
call	sub_652C20
mov	edi, eax
mov	[esp+60h+var_4C], edi
cmp	edi, ebx
jz	loc_6C27F7
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 7
jnz	loc_6C27F7
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
cmp	[edi+3Ch], ebx
mov	[edi+8], ecx
jle	loc_6C27F0
mov	edx, [esi]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	50h
call	edx
cmp	eax, ebx
jz	short loc_6C2675
push	ebp
mov	ecx, eax
call	sub_65EF40
mov	[esp+60h+arg_4], eax
jmp	short loc_6C2679

loc_6C2675:
mov	[esp+60h+arg_4], ebx

loc_6C2679:
mov	eax, [esi]
mov	ecx, [eax+294h]
push	edi
push	ecx
mov	ecx, [esp+68h+arg_4]
call	sub_65E510
mov	edx, [esp+60h+arg_4]
mov	ecx, [edx+3Ch]
xor	eax, eax
mov	[esp+60h+var_48], eax
mov	[esp+60h+var_40], ecx
cmp	ecx, ebx
jbe	loc_6C27E7

loc_6C26A5:
mov	ecx, [esp+60h+arg_4]
mov	edx, [ecx+38h]
mov	esi, [edx+eax*4]
cmp	esi, ebx
jz	loc_6C27D4
push	ebp
mov	ecx, esi
call	sub_652D70
mov	edi, eax
cmp	edi, ebx
jz	loc_6C27D0
cmp	byte ptr [esi],	7
mov	[esp+60h+var_50], ebx
push	ebp
mov	ecx, esi
jnz	short loc_6C26E9
call	sub_651BB0
cmp	eax, ebx
jz	short loc_6C26E1
inc	dword ptr [eax+4]

loc_6C26E1:
mov	[esp+60h+var_50], eax
mov	esi, ebx
jmp	short loc_6C2701

loc_6C26E9:
call	sub_652C20
cmp	eax, ebx
jz	short loc_6C26FF
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6C26FF:
mov	esi, eax

loc_6C2701:
mov	ecx, [esp+60h+arg_8]
mov	edx, [edi]
mov	edx, [edx+2Ch]
lea	eax, [esp+60h+var_30]
push	eax
push	ecx
lea	eax, [ebp+78h]
push	eax
mov	ecx, edi
mov	[esp+6Ch+var_30], bl
call	edx
test	al, al
jz	loc_6C27AF
cmp	[esp+60h+var_30], 9
jnz	short loc_6C2756
lea	eax, [esp+60h+var_20]
push	eax
push	edi
push	ebp
lea	ecx, [esp+6Ch+var_30]
mov	[esp+6Ch+var_20], bl
call	sub_6529F0
lea	ecx, [esp+60h+var_20]
push	ecx
lea	ecx, [esp+64h+var_30]
call	sub_652520
lea	ecx, [esp+60h+var_20]
call	sub_652830

loc_6C2756:
push	ebp
lea	edx, [esp+64h+var_3C]
push	edx
lea	ecx, [esp+68h+var_30]
call	sub_652DC0
mov	ecx, [esp+60h+var_3C]
cmp	ecx, ebx
jz	short loc_6C2783
mov	ecx, [esp+60h+arg_C]
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+60h+var_3C]
push	edx
push	edi
push	ebp
call	eax
mov	ecx, [esp+60h+var_3C]

loc_6C2783:
test	[esp+60h+var_34], 2
jnz	short loc_6C2793
cmp	ecx, ebx
jz	short loc_6C2793
call	sub_64B3B0

loc_6C2793:
test	[esp+60h+var_34], 1
mov	[esp+60h+var_3C], ebx
jnz	short loc_6C27AB
mov	ecx, [esp+60h+var_38]
cmp	ecx, ebx
jz	short loc_6C27AB
call	sub_64B3B0

loc_6C27AB:
mov	[esp+60h+var_38], ebx

loc_6C27AF:
lea	ecx, [esp+60h+var_30]
call	sub_652830
mov	ecx, [esp+60h+var_50]
cmp	ecx, ebx
jz	short loc_6C27C5
call	sub_64A400

loc_6C27C5:
cmp	esi, ebx
jz	short loc_6C27D0
mov	ecx, esi
call	sub_64B3B0

loc_6C27D0:
mov	edi, [esp+60h+var_4C]

loc_6C27D4:
mov	eax, [esp+60h+var_48]
inc	eax
mov	[esp+60h+var_48], eax
cmp	eax, [esp+60h+var_40]
jb	loc_6C26A5

loc_6C27E7:
mov	ecx, [esp+60h+arg_4]
call	sub_64B3B0

loc_6C27F0:
mov	ecx, edi
call	sub_64B3B0

loc_6C27F7:
lea	ecx, [esp+60h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 50h
retn
sub_6C25D0 endp

align 10h



sub_6C2810 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
cmp	dword ptr [edi+8], 0
jz	short loc_6C286D
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 24h
jnz	short loc_6C286D
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6C286D
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6C2869
lea	esi, [eax-10h]
test	esi, esi
jz	short loc_6C2853
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax

loc_6C2853:
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6C287C
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_64B3B0

loc_6C2869:
xor	esi, esi
jmp	short loc_6C2853

loc_6C286D:
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	1
pop	edi
retn

loc_6C287C:
pop	esi
pop	edi
retn
sub_6C2810 endp

align 10h



sub_6C2880 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143A540
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143A5A0
mov	dword ptr [edi], offset	off_143A4E8
mov	dword ptr [ecx], offset	off_143A59C
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6C2880 endp

align 10h



sub_6C2900 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C2941
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	ecx, [esi+8]
mov	edx, [esi+18h]
push	eax
push	ecx
push	edx
call	sub_6C2350
mov	esi, [esi+4]
add	esp, 0Ch
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1

loc_6C2941:
pop	esi
retn
sub_6C2900 endp

align 10h



sub_6C2950 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C2994
mov	eax, [esi+18h]
push	ebx
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	ecx, [esi+8]
mov	edx, [esi+18h]
push	eax
push	ecx
push	edx
call	sub_6C2450
mov	esi, [esi+4]
add	esp, 0Ch
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	ebx

loc_6C2994:
pop	esi
retn
sub_6C2950 endp

align 10h



sub_6C29A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6C2880
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143A4AC
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143A5A0
mov	dword ptr [esi+10h], offset off_143A4E8
mov	dword ptr [ecx], offset	off_143A59C
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6C29A0 endp

align 10h



sub_6C29F0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6C2A10
align 10h

loc_6C2A00:
sub	ecx, 34h
jmp	loc_6C2A10
align 10h

loc_6C2A10:
push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143A5A0
mov	dword ptr [esi+10h], offset off_143A4E8
mov	dword ptr [ecx], offset	off_143A59C
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6C2A4A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C2A4A:
mov	eax, esi
pop	esi
retn	4
sub_6C29F0 endp




sub_6C2A50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_0]
test	esi, esi
jz	short loc_6C2A6F
push	1
push	offset off_143A4AC
push	edi
push	esi
call	sub_66FC60
add	esp, 10h

loc_6C2A6F:
push	esi
push	edi
call	sub_6C22C0
add	esp, 8
pop	edi
pop	esi
retn
sub_6C2A50 endp

align 10h



sub_6C2A80 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_4]
sub	esp, 0Ch
test	eax, eax
jnz	short loc_6C2A91
xor	al, al
add	esp, 0Ch
retn

loc_6C2A91:
mov	ecx, [esp+0Ch+arg_C]
mov	edx, [esp+0Ch+arg_10]
mov	[esp+0Ch+var_8], ecx
lea	ecx, [esp+0Ch+var_C]
push	ecx
mov	[esp+10h+var_4], edx
mov	edx, [esp+10h+arg_8]
push	edx
push	eax
mov	eax, [esp+18h+arg_0]
push	eax
mov	[esp+1Ch+var_C], offset	off_143A594
call	sub_6C25D0
add	esp, 10h
mov	al, 1
add	esp, 0Ch
retn
sub_6C2A80 endp

align 10h



sub_6C2AD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	loc_6C2B6D
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+20h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	ecx, [esi+8]
mov	eax, [esi+18h]
test	ecx, ecx
jz	short loc_6C2B45
mov	edx, [esi+1Ch]
mov	edi, [eax+1Ch]
dec	edx
mov	[esp+14h+var_8], edx
mov	edx, [eax+8]
sub	edx, [eax+0Ch]
shl	edi, 5
sar	edx, 4
lea	edx, [edx+edi-24h]
mov	[esp+14h+var_4], edx
lea	edx, [esp+14h+var_C]
push	edx
lea	edx, [esp+18h+arg_0]
push	edx
push	ecx
push	eax
mov	[esp+24h+var_C], offset	off_143A594
call	sub_6C25D0
add	esp, 10h

loc_6C2B45:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	eax, [esp+14h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_6C2B6D
pop	esi
add	esp, 0Ch
jmp	sub_650DF0

loc_6C2B6D:
pop	esi
add	esp, 0Ch
retn
sub_6C2AD0 endp

align 10h



sub_6C2B80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C2BD7
mov	eax, [esi+18h]
push	ebx
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652D70
mov	ebx, [esi+4]
mov	ecx, ebx
mov	edi, eax
call	sub_652060
mov	byte ptr [ebx],	0
mov	esi, [esi+18h]
add	esi, 78h
test	edi, edi
jz	short loc_6C2BCB
push	1
push	offset off_143A4AC
push	esi
push	edi
call	sub_66FC60
add	esp, 10h

loc_6C2BCB:
push	edi
push	esi
call	sub_6C22C0
add	esp, 8
pop	edi
pop	ebx

loc_6C2BD7:
pop	esi
retn
sub_6C2B80 endp

align 10h



sub_6C2BE0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6C2C43
push	offset sub_6C2810
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
push	7
push	offset off_143A4CC
lea	ecx, [esp+30h+var_18]
lea	eax, [edi+10h]
push	ecx
push	eax
mov	dword ptr [edi], offset	off_143A5C8
mov	dword ptr [eax], offset	off_1439710
call	sub_66FC60
add	esp, 10h
jmp	short loc_6C2C45

loc_6C2C43:
xor	edi, edi

loc_6C2C45:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	54h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6C2C92
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6C29A0
mov	ebx, eax
test	ebx, ebx
jz	short loc_6C2C92
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6C2C92:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 13h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6C2CC0
call	sub_64B3B0

loc_6C2CC0:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 54h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6C2D0C
mov	ecx, ebx
call	sub_64B3B0

loc_6C2D0C:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6C2BE0 endp

align 10h



; int __thiscall sub_6C2D20(void *, char)
sub_6C2D20 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143A64C
jz	short loc_6C2D39
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6C2D39:
mov	eax, esi
pop	esi
retn	4
sub_6C2D20 endp

align 10h


; Attributes: thunk

sub_6C2D40 proc	near
jmp	sub_664580
sub_6C2D40 endp

align 10h



sub_6C2D50 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
xor	edi, edi
cmp	[esi+1Ch], edi
mov	ebx, eax
jle	short loc_6C2DAD
mov	eax, [esi+18h]
push	eax
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+14h+arg_0]
movzx	eax, word ptr [esp+14h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+14h+var_8], eax
fldcw	word ptr [esp+14h+var_8]
fistp	[esp+14h+var_8]
mov	edi, dword ptr [esp+14h+var_8]
fldcw	word ptr [esp+14h+arg_0]

loc_6C2DAD:
mov	edx, [ebx]
mov	eax, [edx+0E4h]
mov	ecx, ebx
call	eax
cmp	edi, eax
jnb	short loc_6C2DFA
cmp	edi, 4
jb	short loc_6C2DC6
xor	eax, eax
jmp	short loc_6C2DD0

loc_6C2DC6:
lea	ecx, [edi+edi*8]
lea	eax, [ebx+ecx*4+934h]

loc_6C2DD0:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, [eax+0Ch]
jb	short loc_6C2DE2
mov	ecx, esi
call	sub_652060

loc_6C2DE2:
mov	[esp+14h+arg_0], edi
fild	[esp+14h+arg_0]
mov	byte ptr [esi],	3
test	edi, edi
jge	short loc_6C2DF7
fadd	ds:dbl_15FCE08

loc_6C2DF7:
fstp	qword ptr [esi+4]

loc_6C2DFA:
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_6C2D50 endp

align 10h



sub_6C2E10 proc	near
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_6C2E22
xor	ecx, ecx
cmp	[eax+3Ch], ecx
setz	cl
mov	al, cl
retn

loc_6C2E22:
xor	al, al
retn
sub_6C2E10 endp

align 10h



; int __thiscall sub_6C2E30(void *, char)
sub_6C2E30 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143A4DC
jz	short loc_6C2E49
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6C2E49:
mov	eax, esi
pop	esi
retn	4
sub_6C2E30 endp

align 10h



sub_6C2E50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
mov	edi, eax
cmp	dword ptr [edi+0FCh], 0
jz	short loc_6C2EC2
xor	eax, eax
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C2E95
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6C2E95:
mov	ecx, [edi+0FCh]
mov	[esp+14h+var_4], eax
lea	eax, [esp+14h+var_C]
mov	[esp+14h+var_C], 0Ah
mov	[esp+14h+var_8], 0
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	edi
call	edx
pop	edi
pop	esi
add	esp, 0Ch
retn

loc_6C2EC2:
mov	eax, [esi+18h]
push	offset aWarningNoUse_0 ; "Warning: no user event handler interfac"...
push	eax
call	sub_66D3C0
add	esp, 8
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_6C2E50 endp

align 10h



sub_6C2EE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
mov	edi, eax
cmp	dword ptr [edi+0FCh], 0
jz	short loc_6C2F52
xor	eax, eax
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C2F25
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6C2F25:
mov	ecx, [edi+0FCh]
mov	[esp+14h+var_4], eax
lea	eax, [esp+14h+var_C]
mov	[esp+14h+var_C], 0Bh
mov	[esp+14h+var_8], 0
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	edi
call	edx
pop	edi
pop	esi
add	esp, 0Ch
retn

loc_6C2F52:
mov	eax, [esi+18h]
push	offset aWarningNoUse_1 ; "Warning: no user event handler interfac"...
push	eax
call	sub_66D3C0
add	esp, 8
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_6C2EE0 endp

align 10h



sub_6C2F70 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	ecx, [eax+0FCh]
sub	esp, 0Ch
test	ecx, ecx
jz	short loc_6C2FAE
mov	edx, [esp+0Ch+arg_8]
push	esi
mov	[esp+10h+var_8], edx
mov	edx, [esp+10h+arg_4]
lea	esi, [esp+10h+var_C]
mov	[esp+10h+var_C], 0Ch
mov	[esp+10h+var_4], edx
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+4]
call	eax
mov	al, 1
pop	esi
add	esp, 0Ch
retn

loc_6C2FAE:
xor	al, al
add	esp, 0Ch
retn
sub_6C2F70 endp

align 10h



sub_6C2FC0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	byte ptr  1Ch

sub	esp, 1Ch
mov	eax, [esp+1Ch+arg_4]
mov	edx, [esp+1Ch+arg_8]
mov	[esp+1Ch+var_18], eax
mov	eax, [esp+1Ch+arg_C]
mov	[esp+1Ch+var_10], eax
mov	eax, [esp+1Ch+arg_10]
mov	[esp+1Ch+var_C], eax
mov	eax, [esp+1Ch+arg_14]
mov	[esp+1Ch+var_8], eax
mov	al, [esp+1Ch+arg_18]
mov	[esp+1Ch+var_1C], offset off_143A664
mov	[esp+1Ch+var_14], edx
mov	[esp+1Ch+var_4], al
test	ecx, ecx
jz	short loc_6C3003
lea	eax, [ecx+10h]
jmp	short loc_6C3005

loc_6C3003:
xor	eax, eax

loc_6C3005:
push	esi
lea	ecx, [esp+20h+var_1C]
push	ecx
mov	ecx, [esp+24h+arg_0]
mov	esi, [ecx+78h]
lea	edx, [esi+edx*4+8]
push	edx
push	eax
push	ecx
call	sub_6C25D0
add	esp, 10h
pop	esi
add	esp, 1Ch
retn	1Ch
sub_6C2FC0 endp

align 10h



sub_6C3030 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
lea	eax, [ecx-38h]
mov	ecx, [esp+1Ch+arg_4]
mov	[esp+1Ch+var_18], ecx
xor	ecx, ecx
mov	[esp+1Ch+var_1C], offset off_143A664
mov	[esp+1Ch+var_14], 6Ah
mov	[esp+1Ch+var_10], ecx
mov	[esp+1Ch+var_C], ecx
mov	[esp+1Ch+var_8], ecx
mov	[esp+1Ch+var_4], cl
cmp	eax, ecx
jz	short loc_6C3068
add	eax, 10h
jmp	short loc_6C306A

loc_6C3068:
xor	eax, eax

loc_6C306A:
mov	ecx, [esp+1Ch+arg_0]
lea	edx, [esp+1Ch+var_1C]
push	edx
mov	edx, [ecx+78h]
add	edx, 1B0h
push	edx
push	eax
push	ecx
call	sub_6C25D0
add	esp, 2Ch
retn	8
sub_6C3030 endp

align 10h



sub_6C3090 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	eax, [ebp+78h]
cmp	byte ptr [eax+2B0h], 1
push	esi
push	edi
mov	edi, [esp+18h+arg_4]
mov	esi, ecx
mov	byte ptr [esp+18h+var_C], 0
jnz	loc_6C314D
call	sub_6B2200
push	0
push	3E8h
push	edx
push	eax
call	__aulldiv
mov	ecx, ebp
mov	[esp+18h+arg_4], eax
call	sub_668010
cmp	edi, 4
jb	short loc_6C30DC
xor	eax, eax
jmp	short loc_6C30E6

loc_6C30DC:
lea	ecx, [edi+edi*8]
lea	eax, [eax+ecx*4+934h]

loc_6C30E6:
fld	dword ptr [eax+14h]
push	ebx
fstp	[esp+1Ch+var_8]
fld	dword ptr [eax+18h]
fstp	[esp+1Ch+var_4]
fld	[esp+1Ch+var_8]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
call	__ftol2_sse
fdivr	[esp+1Ch+var_4]
mov	ebx, eax
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
call	__ftol2_sse
mov	edx, [esi+10h]
mov	ecx, [esp+1Ch+arg_4]
add	edx, 12Ch
cmp	ecx, edx
ja	short loc_6C3143
cmp	[esi+8], ebx
jnz	short loc_6C3143
cmp	[esi+0Ch], eax
jnz	short loc_6C3143
mov	byte ptr [esp+1Ch+var_C], 1

loc_6C3143:
mov	[esi+8], ebx
mov	[esi+0Ch], eax
mov	[esi+10h], ecx
pop	ebx

loc_6C314D:
mov	ecx, [esp+18h+arg_C]
test	ecx, ecx
jz	short loc_6C31AA
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_6C3164
call	sub_658B70

loc_6C3164:
mov	eax, [eax+0Ch]
mov	ecx, [esp+18h+arg_8]
mov	[esp+18h+arg_0], eax
inc	dword ptr [eax+8]
mov	eax, [esp+18h+var_C]
push	eax
push	0
push	ecx
lea	edx, [esp+24h+arg_0]
push	edx
push	68h
push	edi
push	ebp
lea	ecx, [esi-38h]
call	sub_6C2FC0
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C31C4
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	10h

loc_6C31AA:
mov	eax, [esp+18h+var_C]
mov	ecx, [esp+18h+arg_8]
push	eax
push	0
push	ecx
push	0
push	68h
push	edi
push	ebp
lea	ecx, [esi-38h]
call	sub_6C2FC0

loc_6C31C4:
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	10h
sub_6C3090 endp

align 10h



sub_6C31D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_C]
test	ecx, ecx
jz	short loc_6C3230
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_6C31EA
call	sub_658B70

loc_6C31EA:
mov	eax, [eax+0Ch]
mov	edx, [esp+4+arg_4]
push	0
mov	[esp+8+arg_C], eax
inc	dword ptr [eax+8]
mov	eax, [esp+8+arg_8]
push	0
push	eax
mov	eax, [esp+10h+arg_0]
lea	ecx, [esp+10h+arg_C]
push	ecx
push	69h
push	edx
push	eax
lea	ecx, [esi-38h]
call	sub_6C2FC0
mov	eax, [esp+4+arg_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C324F
call	sub_650DF0
pop	esi
retn	10h

loc_6C3230:
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
mov	eax, [esp+4+arg_0]
push	0
push	0
push	ecx
push	0
push	69h
push	edx
push	eax
lea	ecx, [esi-38h]
call	sub_6C2FC0

loc_6C324F:
pop	esi
retn	10h
sub_6C31D0 endp

align 10h



sub_6C3260 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_C]
test	ecx, ecx
jz	short loc_6C32C0
mov	eax, [ecx+94h]
test	eax, eax
jnz	short loc_6C327A
call	sub_658B70

loc_6C327A:
mov	eax, [eax+0Ch]
mov	edx, [esp+4+arg_4]
push	0
mov	[esp+8+arg_C], eax
inc	dword ptr [eax+8]
mov	eax, [esp+8+arg_8]
push	eax
mov	eax, [esp+0Ch+arg_0]
push	0
lea	ecx, [esp+10h+arg_C]
push	ecx
push	6Bh
push	edx
push	eax
lea	ecx, [esi-38h]
call	sub_6C2FC0
mov	eax, [esp+4+arg_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C32DF
call	sub_650DF0
pop	esi
retn	10h

loc_6C32C0:
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
mov	eax, [esp+4+arg_0]
push	0
push	ecx
push	0
push	0
push	6Bh
push	edx
push	eax
lea	ecx, [esi-38h]
call	sub_6C2FC0

loc_6C32DF:
pop	esi
retn	10h
sub_6C3260 endp

align 10h



sub_6C32F0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
xor	edi, edi
cmp	[esi+1Ch], edi
mov	ebx, eax
jle	short loc_6C334D
mov	eax, [esi+18h]
push	eax
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+18h+arg_0]
movzx	eax, word ptr [esp+18h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	edi, dword ptr [esp+18h+var_C]
fldcw	word ptr [esp+18h+arg_0]

loc_6C334D:
xor	eax, eax
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6C338B
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+18h+arg_0]
movzx	eax, word ptr [esp+18h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	eax, dword ptr [esp+18h+var_C]
fldcw	word ptr [esp+18h+arg_0]

loc_6C338B:
mov	ecx, [ebx+0FCh]
test	ecx, ecx
jz	short loc_6C33B9
mov	[esp+18h+var_4], eax
lea	eax, [esp+18h+var_C]
mov	dword ptr [esp+18h+var_C], 0Ch
mov	dword ptr [esp+18h+var_C+4], edi
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	ebx
call	edx
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn

loc_6C33B9:
mov	eax, [esi+18h]
push	offset aWarningNoUserE ; "Warning: no user event handler interfac"...
push	eax
call	sub_66D3C0
add	esp, 8
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn
sub_6C32F0 endp

align 10h



sub_6C33E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 3Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+48h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
mov	ebx, 1
xor	edi, edi
cmp	[esi+1Ch], ebx
mov	ebp, eax
mov	byte ptr [esp+4Ch+var_3C], bl
jl	short loc_6C3471
push	edi
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	2
jnz	short loc_6C3496
mov	eax, [esi+18h]
push	eax
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
cmp	dword ptr [esi+1Ch], 2
mov	byte ptr [esp+4Ch+var_3C], al
jl	short loc_6C3471
mov	ecx, [esi+18h]
push	ecx
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+4Ch+arg_0]
movzx	eax, word ptr [esp+4Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+4Ch+var_38], eax
fldcw	word ptr [esp+4Ch+var_38]
fistp	[esp+4Ch+var_38]
mov	edi, dword ptr [esp+4Ch+var_38]
fldcw	word ptr [esp+4Ch+arg_0]

loc_6C3471:
mov	edx, [ebp+0]
mov	eax, [edx+0E4h]
mov	ecx, ebp
call	eax
cmp	edi, eax
jnb	loc_6C3590
cmp	edi, 4
jb	loc_6C3598
xor	eax, eax
jmp	loc_6C35A2

loc_6C3496:
mov	eax, [esi+1Ch]
cmp	eax, ebx
jnz	short loc_6C34D5
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+4Ch+arg_0]
movzx	eax, word ptr [esp+4Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+4Ch+var_38], eax
fldcw	word ptr [esp+4Ch+var_38]
fistp	[esp+4Ch+var_38]
mov	edi, dword ptr [esp+4Ch+var_38]
fldcw	word ptr [esp+4Ch+arg_0]
jmp	short loc_6C3471

loc_6C34D5:
cmp	eax, 2
jl	short loc_6C3471
cmp	eax, 3
jl	short loc_6C34F7
mov	eax, [esi+18h]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+4Ch+var_3C], al

loc_6C34F7:
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+4Ch+var_28]
mov	eax, [esi+18h]
push	eax
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+4Ch+var_20]
mov	ebx, [ebp+30h]
test	ebx, ebx
jz	short loc_6C3590
lea	ecx, [esp+4Ch+var_18]
call	sub_64E8E0
lea	ecx, [esp+4Ch+var_18]
push	ecx
mov	ecx, ebx
call	sub_654AF0
fld	[esp+4Ch+var_28]
fld	ds:dbl_15FCE20
lea	edx, [esp+4Ch+var_38]
fmul	st(1), st
push	edx
fxch	st(1)
lea	eax, [esp+50h+var_30]
push	eax
fstp	dword ptr [esp+54h+var_38]
lea	ecx, [esp+54h+var_18]
fmul	[esp+54h+var_20]
fstp	dword ptr [esp+54h+var_38+4]
call	sub_64E9B0

loc_6C356F:
mov	ecx, [esp+4Ch+var_3C]
push	0
push	ecx
push	edi
lea	edx, [esp+58h+var_30]
push	edx
mov	ecx, ebp
call	sub_6907A0
test	eax, eax
jz	short loc_6C3590
mov	ecx, [esi+4]
push	eax
call	sub_6528F0

loc_6C3590:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn

loc_6C3598:
lea	ecx, [edi+edi*8]
lea	eax, [ebp+ecx*4+934h]

loc_6C35A2:
fld	dword ptr [eax+14h]
fstp	dword ptr [esp+4Ch+var_38]
fld	dword ptr [eax+18h]
fstp	dword ptr [esp+4Ch+var_38+4]
fld	dword ptr [esp+4Ch+var_38]
fstp	[esp+4Ch+var_30]
fld	dword ptr [esp+4Ch+var_38+4]
fstp	[esp+4Ch+var_2C]
jmp	short loc_6C356F
sub_6C33E0 endp

align 10h



sub_6C35D0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+4Ch]
call	sub_67BFB0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C35FF
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6C35FF
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_6C35FF:
mov	ecx, esi
pop	esi
jmp	sub_6626E0
sub_6C35D0 endp

align 10h



sub_6C3610 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+4Ch]
call	sub_67C000
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C364D
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6C364D
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6C364D:
mov	ecx, esi
pop	esi
jmp	sub_6625C0
sub_6C3610 endp

align 10h



sub_6C3660 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+4Ch]
call	sub_67C070
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C36B9
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6C36B9
test	eax, 0FFFFFFFh
jbe	short loc_6C36A4
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx
mov	ecx, esi
pop	esi
jmp	sub_6627F0

loc_6C36A4:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	4
call	edx

loc_6C36B9:
mov	ecx, esi
pop	esi
jmp	sub_6627F0
sub_6C3660 endp

align 10h



sub_6C36D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, 4		; switch 5 cases
ja	short loc_6C3738 ; default
jmp	ds:off_6C373C[eax*4] ; switch jump

loc_6C36E3:		; jumptable 006C36DC case 0
lea	ecx, [esi+4Ch]
call	sub_67C1F0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C36F7
call	sub_64B3B0

loc_6C36F7:
mov	ecx, esi
call	sub_662CF0
pop	esi
retn	4

loc_6C3702:		; jumptable 006C36DC case 1
call	sub_6C3610
pop	esi
retn	4

loc_6C370B:		; jumptable 006C36DC case 2
call	sub_6C35D0
pop	esi
retn	4

loc_6C3714:		; jumptable 006C36DC case 3
lea	ecx, [esi+4Ch]
call	sub_67C210
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C3728
call	sub_64B020

loc_6C3728:
mov	ecx, esi
call	sub_662DF0
pop	esi
retn	4

loc_6C3733:		; jumptable 006C36DC case 4
call	sub_6C3660

loc_6C3738:		; default
pop	esi
retn	4
sub_6C36D0 endp

off_6C373C dd offset loc_6C36E3	; jump table for switch	statement
dd offset loc_6C3702
dd offset loc_6C370B
dd offset loc_6C3714
dd offset loc_6C3733


; Attributes: bp-based frame fpd=10h

sub_6C3750 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+10h]
add	eax, 150h
lea	ebp, [esp+0Ch]
push	ebp
lea	ecx, [esi+10h]
push	eax
mov	eax, [edi+2Ch]
push	edx
mov	[esp+28h+var_10], 0
call	eax
test	al, al
jz	short loc_6C37E1
mov	ecx, [esp+1Ch+arg_4]
push	ecx
mov	ecx, ebp
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_6C37CE
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 7
jnz	short loc_6C37CE
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C37B9
call	sub_64B3B0

loc_6C37B9:
lea	ecx, [esp+1Ch+var_10]
mov	[esi+3Ch], edi
call	sub_652830
pop	edi
pop	esi
pop	ebp
add	esp, 10h
retn	8

loc_6C37CE:
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C37DA
call	sub_64B3B0

loc_6C37DA:
mov	dword ptr [esi+3Ch], 0

loc_6C37E1:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
add	esp, 10h
retn	8
sub_6C3750 endp

align 10h



sub_6C3800 proc	near

var_2C=	qword ptr -2Ch
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	ecx, [esi+18h]
call	sub_668010
xor	edi, edi
cmp	[esi+1Ch], edi
mov	ebx, eax
jle	short loc_6C385D
mov	eax, [esi+18h]
push	eax
push	edi
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+24h+arg_0]
movzx	eax, word ptr [esp+24h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+24h+var_18], eax
fldcw	word ptr [esp+24h+var_18]
fistp	[esp+24h+var_18]
mov	edi, dword ptr [esp+24h+var_18]
fldcw	word ptr [esp+24h+arg_0]

loc_6C385D:
mov	edx, [ebx]
mov	eax, [edx+0E4h]
mov	ecx, ebx
call	eax
cmp	edi, eax
jnb	loc_6C3920
cmp	edi, 4
jb	short loc_6C387A
xor	eax, eax
jmp	short loc_6C3884

loc_6C387A:
lea	ecx, [edi+edi*8]
lea	eax, [ebx+ecx*4+934h]

loc_6C3884:
fld	dword ptr [eax+14h]
mov	edx, [esi+18h]
fstp	dword ptr [esp+24h+var_18]
push	0
fld	dword ptr [eax+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
fstp	dword ptr [esp+28h+var_18+4]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	34h
call	eax
test	eax, eax
jz	short loc_6C38BC
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	edi, eax
jmp	short loc_6C38BE

loc_6C38BC:
xor	edi, edi

loc_6C38BE:
fld	dword ptr [esp+24h+var_18]
sub	esp, 8
fadd	ds:dbl_15FCC48
fstp	[esp+2Ch+var_2C]
call	_floor
fdiv	ds:dbl_15FCE20
fstp	[esp+2Ch+var_10]
fld	dword ptr [esp+2Ch+var_18+4]
fadd	ds:dbl_15FCC48
fstp	[esp+2Ch+var_2C]
call	_floor
fdiv	ds:dbl_15FCE20
mov	eax, [esi+18h]
add	esp, 8
lea	edx, [esp+24h+var_10]
push	edx
push	eax
mov	ecx, edi
fstp	[esp+2Ch+var_8]
call	sub_6E2380
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6C3920
mov	ecx, edi
call	sub_64B3B0

loc_6C3920:
pop	edi
pop	esi
pop	ebx
add	esp, 18h
retn
sub_6C3800 endp

align 10h



sub_6C3930 proc	near

var_28=	qword ptr -28h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_4]
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	eax, [esi+78h]
add	esi, 78h
cmp	byte ptr [eax+2B0h], 1
push	edi
mov	edi, [esp+20h+arg_8]
mov	ebx, ecx
jnz	short loc_6C39D1
mov	ecx, [ebp+0]
cmp	ecx, [eax+22Ch]
jnz	short loc_6C3976
add	ebx, 3Ch
push	ebx
mov	ecx, edi
call	sub_652940
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch

loc_6C3976:
cmp	ecx, [eax+230h]
jnz	short loc_6C3994
cmp	byte ptr [edi],	5
jb	short loc_6C398A
mov	ecx, edi
call	sub_652060

loc_6C398A:
fld1
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
jmp	short loc_6C39D1

loc_6C3994:
cmp	ecx, [eax+234h]
jnz	short loc_6C39B6
cmp	byte ptr [edi],	5
jb	short loc_6C39A8
mov	ecx, edi
call	sub_652060

loc_6C39A8:
fld	ds:dbl_15FCD70
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
jmp	short loc_6C39D1

loc_6C39B6:
cmp	ecx, [eax+238h]
jnz	short loc_6C39E9
fld	ds:dbl_15FCD78
sub	esp, 8

loc_6C39C7:
mov	ecx, edi
fstp	[esp+28h+var_28]
call	sub_64A6A0

loc_6C39D1:
mov	eax, [esp+20h+arg_0]
push	edi
push	ebp
push	eax
mov	ecx, ebx
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch

loc_6C39E9:
cmp	ecx, [eax+23Ch]
jnz	short loc_6C39F8
fldz
sub	esp, 8
jmp	short loc_6C39C7

loc_6C39F8:
cmp	ecx, [eax+240h]
jnz	short loc_6C3A07
fld1
sub	esp, 8
jmp	short loc_6C39C7

loc_6C3A07:
cmp	ecx, [eax+244h]
jnz	short loc_6C3A1A
fld	ds:dbl_15FCD70
sub	esp, 8
jmp	short loc_6C39C7

loc_6C3A1A:		; "getTopMostEntity"
push	offset aGettopmostenti
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6C3A56
push	offset sub_6C33E0
push	esi
lea	ecx, [esp+28h+var_10]
call	sub_651D30
push	eax
mov	ecx, edi
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch

loc_6C3A56:		; "getPosition"
push	offset aGetposition_0
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6C3A92
push	offset sub_6C3800
push	esi
lea	ecx, [esp+28h+var_10]
call	sub_651D30
push	eax
mov	ecx, edi
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch

loc_6C3A92:		; "getButtonsState"
push	offset aGetbuttonsstat
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	loc_6C39D1
push	offset sub_6C2D50
push	esi
lea	ecx, [esp+28h+var_10]
call	sub_651D30
push	eax
mov	ecx, edi
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch
sub_6C3930 endp

align 10h



sub_6C3AE0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	esi
push	0
lea	eax, [esp+28h+var_1C]
push	eax
mov	esi, ecx
mov	ecx, [esp+2Ch+arg_0]
push	offset sub_6C32F0
push	ecx
lea	ecx, [esp+34h+var_10]
call	sub_651D30
mov	ecx, eax
call	sub_652DC0
mov	edx, [esi+4Ch]
cmp	edx, [eax]
setnz	bl
test	[esp+24h+var_14], 2
jnz	short loc_6C3B24
mov	ecx, [esp+24h+var_1C]
test	ecx, ecx
jz	short loc_6C3B24
call	sub_64B3B0

loc_6C3B24:
test	[esp+24h+var_14], 1
mov	[esp+24h+var_1C], 0
jnz	short loc_6C3B40
mov	ecx, [esp+24h+var_18]
test	ecx, ecx
jz	short loc_6C3B40
call	sub_64B3B0

loc_6C3B40:
lea	ecx, [esp+24h+var_10]
mov	[esp+24h+var_18], 0
call	sub_652830
pop	esi
mov	al, bl
pop	ebx
add	esp, 1Ch
retn	4
sub_6C3AE0 endp

align 10h



sub_6C3B60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6B6B70
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143A60C
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6C3B60 endp

align 10h



sub_6C3BB0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
push	offset sub_6EF500
push	edi
mov	esi, ecx
call	sub_67C3D0
mov	dword ptr [esi+38h], offset off_143A64C
lea	eax, [esi+38h]
xor	ecx, ecx
mov	dword ptr [esi], offset	off_143A828
mov	dword ptr [esi+10h], offset off_143A7D0
mov	dword ptr [eax], offset	off_143A7B8
mov	[esi+3Ch], ecx
lea	ebx, [esi+10h]
lea	ebp, [esi+4Ch]
mov	[ebp+8], cl
mov	[ebp+0], ecx
mov	[ebp+4], ecx
mov	ecx, [esp+2Ch+arg_4]
push	ebx
push	edi
mov	[ecx+9D0h], eax
call	sub_6C2A50
add	esp, 8
push	0
push	edi
mov	ecx, esi
call	sub_6C3750
push	7
push	offset off_143A634
push	edi
push	ebx
call	sub_66FC60
add	esp, 10h
xor	ebx, ebx
push	ebx
lea	edx, [esp+30h+var_1C]
push	edx
push	offset sub_6C32F0
push	edi
lea	ecx, [esp+3Ch+var_10]
call	sub_651D30
mov	ecx, eax
call	sub_652DC0
push	eax
mov	ecx, ebp
call	sub_67C4C0
test	[esp+2Ch+var_14], 2
jnz	short loc_6C3C62
mov	ecx, [esp+2Ch+var_1C]
cmp	ecx, ebx
jz	short loc_6C3C62
call	sub_64B3B0

loc_6C3C62:
test	[esp+2Ch+var_14], 1
mov	[esp+2Ch+var_1C], ebx
jnz	short loc_6C3C7A
mov	ecx, [esp+2Ch+var_18]
cmp	ecx, ebx
jz	short loc_6C3C7A
call	sub_64B3B0

loc_6C3C7A:
lea	ecx, [esp+2Ch+var_10]
mov	[esp+2Ch+var_18], ebx
call	sub_652830
pop	edi
mov	[esi+48h], ebx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	8
sub_6C3BB0 endp

align 10h



sub_6C3CA0 proc	near
sub	ecx, 10h
jmp	sub_6C3D10
sub_6C3CA0 endp

align 10h



sub_6C3CB0 proc	near

arg_0= byte ptr	 4

sub	ecx, 38h
jmp	sub_6C3D10
sub_6C3CB0 endp

align 10h



sub_6C3CC0 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+54h], 2
jnz	short loc_6C3CD5
mov	ecx, [esi+4Ch]
test	ecx, ecx
jz	short loc_6C3CD5
call	sub_64B3B0

loc_6C3CD5:
test	byte ptr [esi+54h], 1
mov	dword ptr [esi+4Ch], 0
jnz	short loc_6C3CEE
mov	ecx, [esi+50h]
test	ecx, ecx
jz	short loc_6C3CEE
call	sub_64B3B0

loc_6C3CEE:
mov	dword ptr [esi+50h], 0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6C3D01
call	sub_64B3B0

loc_6C3D01:
mov	dword ptr [esi+38h], offset off_143A64C
mov	ecx, esi
pop	esi
jmp	sub_67BDD0
sub_6C3CC0 endp




sub_6C3D10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6C3CC0
test	[esp+4+arg_0], 1
jz	short loc_6C3D2D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C3D2D:
mov	eax, esi
pop	esi
retn	4
sub_6C3D10 endp

align 10h



sub_6C3D40 proc	near

var_30=	qword ptr -30h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= qword ptr -0Ch
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
mov	eax, [ebp+78h]
mov	al, [eax+2B0h]
cmp	al, 1
push	esi
mov	esi, [esp+24h+arg_8]
setnz	byte ptr [esp+24h+arg_0]
push	edi
cmp	al, 1
jnz	loc_6C3E12
mov	edi, [esp+28h+arg_14]
xor	ebx, ebx
cmp	edi, ebx
jbe	loc_6C3E12
cmp	esi, 68h
jz	short loc_6C3D83
cmp	esi, 69h
jnz	loc_6C3E12

loc_6C3D83:
push	ebp
lea	ecx, [esp+2Ch+var_C]
push	ecx
mov	ecx, [esp+30h+arg_C]
call	sub_652DC0
mov	ecx, dword ptr [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6C3DBE
mov	edx, [ecx]
mov	eax, [edx+40h]
call	eax
test	eax, eax
jg	short loc_6C3DE6
cmp	edi, 1
jbe	short loc_6C3DE1
test	[esp+28h+var_4], 2
jnz	short loc_6C3DBE
mov	ecx, dword ptr [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6C3DBE
call	sub_64B3B0

loc_6C3DBE:
test	[esp+28h+var_4], 1
mov	dword ptr [esp+28h+var_C], ebx
jnz	short loc_6C3DD6
mov	ecx, dword ptr [esp+28h+var_C+4]
cmp	ecx, ebx
jz	short loc_6C3DD6
call	sub_64B3B0

loc_6C3DD6:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 18h
retn

loc_6C3DE1:
mov	byte ptr [esp+28h+arg_0], 1

loc_6C3DE6:
test	[esp+28h+var_4], 2
jnz	short loc_6C3DFA
mov	ecx, dword ptr [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6C3DFA
call	sub_64B3B0

loc_6C3DFA:
test	[esp+28h+var_4], 1
mov	dword ptr [esp+28h+var_C], ebx
jnz	short loc_6C3E12
mov	ecx, dword ptr [esp+28h+var_C+4]
cmp	ecx, ebx
jz	short loc_6C3E12
call	sub_64B3B0

loc_6C3E12:
mov	ecx, [ebp+78h]
cmp	byte ptr [ecx+2B0h], 1
mov	[esp+28h+var_18], 0
jnz	loc_6C3F49
cmp	byte ptr [esp+28h+arg_0], 0
jnz	loc_6C3F49
cmp	esi, 68h
jnz	short loc_6C3E6C
mov	bl, [esp+28h+arg_1C]
test	bl, bl
jz	short loc_6C3E6C
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C3E58
mov	ecx, esi
call	sub_64B530

loc_6C3E58:
mov	esi, [esi]
test	esi, esi
jz	short loc_6C3E64
mov	byte ptr [esi],	2
mov	[esi+4], bl

loc_6C3E64:
mov	[esp+28h+var_18], 1

loc_6C3E6C:
mov	ecx, ebp
call	sub_668010
mov	edi, [esp+28h+arg_4]
cmp	edi, 4
jb	short loc_6C3E80
xor	eax, eax
jmp	short loc_6C3E8A

loc_6C3E80:
lea	edx, [edi+edi*8]
lea	eax, [eax+edx*4+934h]

loc_6C3E8A:
fld	dword ptr [eax+14h]
sub	esp, 8
fstp	[esp+30h+var_14]
fld	dword ptr [eax+18h]
fstp	[esp+30h+var_10]
fld	[esp+30h+var_10]
fadd	ds:dbl_15FCC48
fstp	[esp+30h+var_30]
call	_floor
fdiv	ds:dbl_15FCE20
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
lea	esi, [ebp+8]
add	esp, 8
fstp	[esp+28h+var_C]
cmp	eax, [esi+8]
jb	short loc_6C3ED0
mov	ecx, esi
call	sub_64B530

loc_6C3ED0:
mov	eax, [esi]
test	eax, eax
jz	short loc_6C3EE0
fld	[esp+28h+var_C]
mov	byte ptr [eax],	3
fstp	qword ptr [eax+4]

loc_6C3EE0:
fld	[esp+28h+var_14]
sub	esp, 8
fadd	ds:dbl_15FCC48
fstp	[esp+30h+var_30]
call	_floor
fdiv	ds:dbl_15FCE20
add	dword ptr [esi], 10h
mov	eax, [esi]
add	esp, 8
fstp	[esp+28h+var_C]
cmp	eax, [esi+8]
jb	short loc_6C3F13
mov	ecx, esi
call	sub_64B530

loc_6C3F13:
mov	eax, [esi]
test	eax, eax
jz	short loc_6C3F23
fld	[esp+28h+var_C]
mov	byte ptr [eax],	3
fstp	qword ptr [eax+4]

loc_6C3F23:
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6C3F34
mov	ecx, esi
call	sub_64B530

loc_6C3F34:
mov	esi, [esi]
test	esi, esi
jz	short loc_6C3F40
mov	byte ptr [esi],	4
mov	[esi+4], edi

loc_6C3F40:
add	[esp+28h+var_18], 3
mov	esi, [esp+28h+arg_8]

loc_6C3F49:
cmp	esi, 6Ah
jz	short loc_6C3FB9
mov	edi, [esp+28h+arg_10]
test	edi, edi
jz	short loc_6C3F8B
cmp	esi, 6Bh
jz	short loc_6C3F62
cmp	byte ptr [esp+28h+arg_0], 0
jnz	short loc_6C3F8B

loc_6C3F62:
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C3F78
mov	ecx, esi
call	sub_64B530

loc_6C3F78:
mov	esi, [esi]
test	esi, esi
jz	short loc_6C3FB1
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]
jmp	short loc_6C3FB1

loc_6C3F8B:
cmp	[esp+28h+var_18], 0
jle	short loc_6C3FB9
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C3FA8
mov	ecx, esi
call	sub_64B530

loc_6C3FA8:
mov	esi, [esi]
test	esi, esi
jz	short loc_6C3FB1
mov	byte ptr [esi],	1

loc_6C3FB1:
mov	esi, [esp+28h+arg_8]
inc	[esp+28h+var_18]

loc_6C3FB9:
cmp	esi, 68h
jl	loc_6C408F
cmp	esi, 69h
jle	short loc_6C400A
cmp	esi, 6Bh
jnz	loc_6C408F
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C3FE6
mov	ecx, esi
call	sub_64B530

loc_6C3FE6:
mov	esi, [esi]
test	esi, esi
jz	loc_6C408B
mov	eax, [esp+28h+arg_18]
inc	[esp+28h+var_18]
pop	edi
mov	[esi+4], eax
mov	eax, [esp+24h+var_18]
mov	byte ptr [esi],	4
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6C400A:
mov	eax, [esp+28h+arg_14]
test	eax, eax
jz	short loc_6C4065
cmp	byte ptr [esp+28h+arg_0], 0
jnz	short loc_6C4065
mov	[esp+28h+arg_0], eax
fild	[esp+28h+arg_0]
test	eax, eax
jge	short loc_6C402B
fadd	ds:dbl_15FCE08

loc_6C402B:
add	dword ptr [ebp+8], 10h
fstp	[esp+28h+var_C]
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C4045
mov	ecx, esi
call	sub_64B530

loc_6C4045:
mov	esi, [esi]
test	esi, esi
jz	short loc_6C408B
fld	[esp+28h+var_C]
inc	[esp+28h+var_18]
mov	eax, [esp+28h+var_18]
fstp	qword ptr [esi+4]
pop	edi
mov	byte ptr [esi],	3
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6C4065:
cmp	[esp+28h+var_18], 0
jle	short loc_6C408F
add	dword ptr [ebp+8], 10h
mov	eax, [ebp+8]
cmp	eax, [ebp+10h]
lea	esi, [ebp+8]
jb	short loc_6C4082
mov	ecx, esi
call	sub_64B530

loc_6C4082:
mov	esi, [esi]
test	esi, esi
jz	short loc_6C408B
mov	byte ptr [esi],	1

loc_6C408B:
inc	[esp+28h+var_18]

loc_6C408F:
mov	eax, [esp+28h+var_18]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6C3D40 endp

align 10h



sub_6C40A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_4]
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	eax, [edi+78h]
lea	ebp, [edi+78h]
mov	esi, ecx
mov	ecx, [edx]
cmp	ecx, [eax+22Ch]
jnz	loc_6C4160
mov	bl, 1
cmp	[eax+2B0h], bl
jnz	short loc_6C4137
mov	ecx, [esp+1Ch+arg_8]
push	edi
lea	eax, [esp+20h+var_C]
push	eax
call	sub_652DC0
push	eax
lea	ecx, [esi+3Ch]
call	sub_67C4C0
test	[esp+1Ch+var_4], 2
jnz	short loc_6C40FB
mov	ecx, [esp+1Ch+var_C]
test	ecx, ecx
jz	short loc_6C40FB
call	sub_64B3B0

loc_6C40FB:
mov	[esp+1Ch+var_C], 0
test	[esp+1Ch+var_4], bl
jnz	short loc_6C4116
mov	ecx, [esp+1Ch+var_8]
test	ecx, ecx
jz	short loc_6C4116
call	sub_64B3B0

loc_6C4116:
push	ebp
lea	ecx, [esi-10h]
call	sub_6C3AE0
mov	ecx, edi
mov	bl, al
call	sub_668010
add	eax, 2474h
test	bl, bl
jz	short loc_6C4158
or	dword ptr [eax], 1000h

loc_6C4137:
mov	ecx, [esp+1Ch+arg_C]
mov	edx, [esp+1Ch+arg_8]
mov	eax, [esp+1Ch+arg_4]
push	ecx
push	edx
push	eax
push	edi
mov	ecx, esi
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	10h

loc_6C4158:
and	dword ptr [eax], 0FFFFEFFFh
jmp	short loc_6C4137

loc_6C4160:
cmp	ecx, [eax+150h]
jnz	short loc_6C4137
mov	ecx, [esp+1Ch+arg_C]
mov	eax, [esp+1Ch+arg_8]
push	ecx
push	eax
push	edx
push	edi
mov	ecx, esi
call	sub_665190
push	edi
push	ebp
lea	ecx, [esi-10h]
mov	bl, al
call	sub_6C3750
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 0Ch
retn	10h
sub_6C40A0 endp

align 10h



sub_6C41A0 proc	near

var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 34h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+44h+arg_8]
mov	esi, ecx
push	edi
lea	ecx, [esp+48h+var_34]
call	sub_651E70
movzx	eax, byte ptr [esi+18h]
mov	ecx, [esi+14h]
mov	edx, [esi+10h]
mov	ebp, [esp+44h+arg_0]
push	eax
mov	eax, [esi+0Ch]
push	ecx
push	edx
mov	edx, [esi+8]
push	eax
mov	eax, [esi+4]
lea	ecx, [esp+54h+var_34]
push	ecx
push	edx
push	eax
push	ebp
call	sub_6C3D40
mov	esi, eax
add	esp, 20h
lea	ecx, [esp+44h+var_34]
mov	[esp+44h+arg_8], esi
call	sub_652830
xor	ebx, ebx
cmp	esi, ebx
jl	loc_6C42A1
mov	ecx, [ebp+8]
sub	ecx, [ebp+0Ch]
mov	edx, [ebp+1Ch]
lea	esi, [ebp+8]
shl	edx, 5
sar	ecx, 4
lea	eax, [ecx+edx-20h]
mov	edx, [esp+44h+arg_4]
mov	[esp+44h+var_1C], edx
mov	edx, [edi+4]
lea	ecx, [esp+44h+var_34]
mov	[esp+44h+var_C], ebp
mov	ebp, [esp+44h+arg_8]
mov	[esp+44h+var_20], ecx
mov	ecx, [edi]
push	ebx
mov	[esp+48h+var_4], eax
push	edx
mov	[esp+4Ch+var_34], bl
mov	[esp+4Ch+var_24], offset off_1431764
mov	[esp+4Ch+var_10], bl
mov	[esp+4Ch+var_18], ebx
mov	[esp+4Ch+var_14], ebx
mov	[esp+4Ch+var_8], ebp
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+4Ch+var_24]
push	edx
call	eax
test	[esp+44h+var_10], 2
mov	[esp+44h+var_24], offset off_1431764
jnz	short loc_6C4278
mov	ecx, [esp+44h+var_18]
cmp	ecx, ebx
jz	short loc_6C4278
call	sub_64B3B0

loc_6C4278:
test	[esp+44h+var_10], 1
mov	[esp+44h+var_18], ebx
jnz	short loc_6C4290
mov	ecx, [esp+44h+var_14]
cmp	ecx, ebx
jz	short loc_6C4290
call	sub_64B3B0

loc_6C4290:
push	ebp
mov	ecx, esi
call	sub_64C1F0
lea	ecx, [esp+44h+var_34]
call	sub_652830

loc_6C42A1:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	0Ch
sub_6C41A0 endp

align 10h



sub_6C42B0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	5Ch
call	edx
cmp	eax, ebx
jz	short loc_6C42EE
mov	ecx, [esi+290h]
push	ecx
lea	ecx, [esp+28h+var_18]
push	ecx
mov	ecx, eax
call	sub_6C3BB0
jmp	short loc_6C42F0

loc_6C42EE:
xor	eax, eax

loc_6C42F0:
mov	ebp, [esp+24h+arg_0]
mov	[ebp+0], eax
mov	[ebp+8], bl
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebx
push	54h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6C433E
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_14]
push	ecx
mov	ecx, edi
call	sub_6C3B60
mov	ebx, eax
test	ebx, ebx
jz	short loc_6C433E
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6C433E:
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_8], ebx
mov	[esp+2Ch+arg_4], 1Bh
call	sub_661470
mov	ecx, [esp+24h+arg_8]
test	ecx, ecx
jz	short loc_6C436C
call	sub_64B3B0

loc_6C436C:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+24h+arg_8]
mov	byte ptr [esp+24h+arg_8], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+2Ch+var_C]
mov	[esp+2Ch+arg_4], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+28h+arg_4]
mov	edx, [edi]
push	eax
add	esi, 74h
push	esi
lea	eax, [esp+30h+var_14]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
test	ebx, ebx
jz	short loc_6C43B9
mov	ecx, ebx
call	sub_64B3B0

loc_6C43B9:
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6C42B0 endp

align 10h



sub_6C43D0 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	esi, [esi+4]
lea	esi, [esi+eax-1]
cmp	esi, edx
pop	esi
jl	short loc_6C43F8
mov	ecx, [ecx+4]
lea	edx, [ecx+edx-1]
cmp	edx, eax
jl	short loc_6C43F8
mov	eax, 1
retn	4

loc_6C43F8:
xor	eax, eax
retn	4
sub_6C43D0 endp

align 10h



sub_6C4400 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
cmp	edx, eax
jl	short loc_6C4420
push	esi
mov	esi, [ecx+4]
lea	esi, [esi+eax-1]
cmp	edx, esi
pop	esi
jg	short loc_6C441C
xor	eax, eax
retn	4

loc_6C441C:
cmp	edx, eax
jge	short loc_6C4425

loc_6C4420:
sub	eax, edx
retn	4

loc_6C4425:
mov	ecx, [ecx+4]
sub	ecx, edx
lea	eax, [ecx+eax-1]
retn	4
sub_6C4400 endp

align 10h



sub_6C4440 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
shl	eax, 9
xor	ax, [ecx+16h]
mov	edx, 600h
and	ax, dx
xor	ax, [ecx+16h]
or	ax, 1
mov	[ecx+16h], ax
retn	4
sub_6C4440 endp

align 10h



sub_6C4470 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	dl, 1
shl	dl, cl
shl	ecx, 4
add	ecx, eax
or	[eax+50h], dl
mov	eax, [esp+arg_4]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	al, [eax+0Ch]
mov	[ecx+0Ch], al
retn	8
sub_6C4470 endp

align 10h



sub_6C44A0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6C44B2
or	word ptr [ecx+0E4h], 2
retn	4

loc_6C44B2:
mov	eax, 0FFFDh
and	[ecx+0E4h], ax
retn	4
sub_6C44A0 endp

align 10h



sub_6C44D0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6C44E2
or	word ptr [ecx+0E4h], 4
retn	4

loc_6C44E2:
mov	eax, 0FFFBh
and	[ecx+0E4h], ax
retn	4
sub_6C44D0 endp

align 10h



sub_6C4500 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6C4516
mov	eax, 80h
or	[ecx+0E4h], ax
retn	4

loc_6C4516:
mov	edx, 0FF7Fh
and	[ecx+0E4h], dx
retn	4
sub_6C4500 endp

align 10h



sub_6C4530 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
movzx	edx, byte ptr [ecx+0Ch]
mov	[eax+0Ch], dl
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
movzx	edx, byte ptr [ecx+1Ch]
mov	[eax+1Ch], dl
mov	edx, [ecx+20h]
mov	[eax+20h], edx
mov	edx, [ecx+24h]
mov	[eax+24h], edx
mov	edx, [ecx+28h]
mov	[eax+28h], edx
movzx	edx, byte ptr [ecx+2Ch]
mov	[eax+2Ch], dl
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	edx, [ecx+34h]
mov	[eax+34h], edx
mov	edx, [ecx+38h]
mov	[eax+38h], edx
movzx	edx, byte ptr [ecx+3Ch]
mov	[eax+3Ch], dl
mov	edx, [ecx+40h]
mov	[eax+40h], edx
mov	edx, [ecx+44h]
mov	[eax+44h], edx
mov	edx, [ecx+48h]
mov	[eax+48h], edx
movzx	edx, byte ptr [ecx+4Ch]
mov	[eax+4Ch], dl
mov	cl, [ecx+50h]
mov	[eax+50h], cl
retn	4
sub_6C4530 endp

align 10h



sub_6C45C0 proc	near
mov	eax, [edi]
push	ebx
push	esi
mov	esi, [eax]
mov	ebx, 5
mov	ecx, offset aCompositionseg ; "compositionSegment"
mov	eax, esi

loc_6C45D2:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C45F2
test	dl, dl
jz	short loc_6C45EE
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C45F2
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C45D2

loc_6C45EE:
xor	eax, eax
jmp	short loc_6C45F7

loc_6C45F2:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C45F7:
test	eax, eax
jnz	short loc_6C45FE
pop	esi
pop	ebx
retn

loc_6C45FE:		; "clauseSegment"
mov	ecx, offset aClausesegment
mov	eax, esi

loc_6C4605:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C4625
test	dl, dl
jz	short loc_6C4621
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C4625
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C4605

loc_6C4621:
xor	eax, eax
jmp	short loc_6C462A

loc_6C4625:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C462A:
test	eax, eax
jnz	short loc_6C4636
pop	esi
mov	eax, 1
pop	ebx
retn

loc_6C4636:		; "convertedSegment"
mov	ecx, offset aConvertedsegme
mov	eax, esi
lea	ecx, [ecx+0]

loc_6C4640:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C4660
test	dl, dl
jz	short loc_6C465C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C4660
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C4640

loc_6C465C:
xor	eax, eax
jmp	short loc_6C4665

loc_6C4660:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C4665:
test	eax, eax
jnz	short loc_6C4671
pop	esi
mov	eax, 2
pop	ebx
retn

loc_6C4671:		; "phraseLengthAdj"
push	offset aPhraselengthad
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6C4689
pop	esi
mov	eax, 3
pop	ebx
retn

loc_6C4689:		; "lowConfSegment"
push	offset aLowconfsegment
mov	ecx, edi
call	sub_67DA70
test	al, al
mov	eax, 4
jnz	short loc_6C46A0
mov	eax, ebx

loc_6C46A0:
pop	esi
pop	ebx
retn
sub_6C45C0 endp

align 10h



sub_6C46B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
push	edi
test	ecx, ecx
jz	short loc_6C46C7
call	sub_64A400
mov	dword ptr [esi+1Ch], 0

loc_6C46C7:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_0]
push	eax
lea	edi, [esi+0Ch]
push	ecx
mov	ecx, edi
call	sub_730E30
mov	edi, [edi]
mov	eax, [esi+10h]
test	edi, edi
jnz	short loc_6C46E9
mov	edi, offset szReferrer

loc_6C46E9:
mov	edx, [esi]
push	eax
mov	eax, [edx+4]
push	edi
mov	ecx, esi
call	eax
pop	edi
pop	esi
retn	8
sub_6C46B0 endp

align 10h



sub_6C4700 proc	near
lea	eax, [ecx+0Ch]
retn
sub_6C4700 endp

align 10h



sub_6C4710 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax+4]
mov	edx, [esp+arg_4]
sub	ecx, [edx+4]
mov	eax, 0
sets	al
retn
sub_6C4710 endp

align 10h



sub_6C4730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax+4]
sub	ecx, [esp+arg_4]
mov	eax, 0
sets	al
retn
sub_6C4730 endp

align 10h



sub_6C4750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+4+var_4]
push	edx
mov	edx, [esp+8+arg_0]
push	edx
mov	edx, [esp+0Ch+arg_4]
mov	[esp+0Ch+var_4], 146h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
pop	ecx
retn
sub_6C4750 endp

align 10h



sub_6C4780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_6C47C9
push	ebx
push	esi

loc_6C4792:
mov	ecx, [esp+10h+arg_0]
mov	edx, [esp+10h+arg_C]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
mov	eax, ebx
shl	eax, 4
add	eax, [ecx]
push	edx
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_6C47C1
or	eax, 0FFFFFFFFh
sub	eax, esi
lea	ebp, [ebx+1]
add	edi, eax
jmp	short loc_6C47C3

loc_6C47C1:
mov	edi, esi

loc_6C47C3:
test	edi, edi
jg	short loc_6C4792
pop	esi
pop	ebx

loc_6C47C9:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_6C4780 endp

align 10h



sub_6C47D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_6C481B
push	ebx
push	esi

loc_6C47E2:
mov	ecx, [esp+10h+arg_0]
mov	edx, [esp+10h+arg_C]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
mov	eax, ebx
shl	eax, 4
add	eax, [ecx]
mov	ecx, [edx]
push	ecx
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_6C4813
or	edx, 0FFFFFFFFh
sub	edx, esi
lea	ebp, [ebx+1]
add	edi, edx
jmp	short loc_6C4815

loc_6C4813:
mov	edi, esi

loc_6C4815:
test	edi, edi
jg	short loc_6C47E2
pop	esi
pop	ebx

loc_6C481B:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_6C47D0 endp




sub_6C4820 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143AB58
call	sub_6FFB90
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6C4820 endp

align 10h



sub_6C4840 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143AB58
call	sub_6FFB90
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6C486A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C486A:
mov	eax, esi
pop	esi
retn	4
sub_6C4840 endp




sub_6C4870 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
cmp	eax, edx
jb	short loc_6C488E
mov	ecx, [ecx+8]
sub	eax, edx
mov	[esp+arg_4], eax
mov	[esp+arg_0], edx
jmp	sub_72C640

loc_6C488E:
mov	ecx, [ecx+8]
xor	eax, eax
mov	[esp+arg_4], eax
mov	[esp+arg_0], edx
jmp	sub_72C640
sub_6C4870 endp




sub_6C48A0 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+4Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
mov	dword ptr [esi], offset	off_143AB5C
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C48D2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6C48D2:
mov	edi, [esi+48h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C48F3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6C48F3:
cmp	dword ptr [esi+10h], 0
jnz	short loc_6C4905
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6C4905
call	sub_666B00

loc_6C4905:
pop	edi
mov	dword ptr [esi], offset	off_1436C18
pop	esi
pop	ebx
retn
sub_6C48A0 endp

align 10h



sub_6C4910 proc	near
mov	eax, 8300h
retn
sub_6C4910 endp

align 10h



sub_6C4920 proc	near
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
test	eax, eax
jz	short locret_6C4935
or	dword ptr [eax+2474h], 400h

locret_6C4935:
retn
sub_6C4920 endp

align 10h



sub_6C4940 proc	near
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C4958
mov	al, [eax+68h]
shr	al, 1
and	al, 1
retn

loc_6C4958:
mov	ecx, [ecx+0B8h]
mov	al, [ecx+50h]
shr	al, 5
and	al, 1
retn
sub_6C4940 endp

align 10h



sub_6C4970 proc	near
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C4986
mov	al, [eax+68h]
and	al, 1
retn

loc_6C4986:
mov	ecx, [ecx+0B8h]
mov	al, [ecx+50h]
shr	al, 3
and	al, 1
retn
sub_6C4970 endp

align 10h



sub_6C49A0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0BCh]
mov	eax, [ecx+11Ch]
test	eax, eax
jnz	loc_6C4A94
push	edi
call	sub_71E990
mov	edi, eax
mov	eax, [esi+0B8h]
mov	cl, [eax+50h]
shr	cl, 3
test	cl, 1
jz	short loc_6C49D5
or	word ptr [edi+68h], 1

loc_6C49D5:
mov	edx, [esi+0B8h]
mov	al, [edx+50h]
shr	al, 5
test	al, 1
jz	short loc_6C49EA
or	word ptr [edi+68h], 2

loc_6C49EA:
mov	edx, [esi]
mov	eax, [edx+54h]
push	ebx
mov	ecx, esi
call	eax
mov	edx, [eax+8]
lea	ecx, [eax+8]
mov	eax, [edx]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+0Ch]
push	18h
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_6C4A16
mov	ecx, ebx
call	sub_64A420

loc_6C4A16:
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6C4A22
call	sub_64A430

loc_6C4A22:
mov	[edi+0Ch], ebx
mov	edx, [esi]
mov	eax, [edx+54h]
push	ebp
mov	ecx, esi
call	eax
mov	edx, [eax+8]
lea	ecx, [eax+8]
mov	eax, [edx]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+0Ch]
push	19h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_6C4A51
mov	ecx, ebp
call	sub_64A420

loc_6C4A51:
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_6C4A5D
call	sub_64A430

loc_6C4A5D:
mov	[edi+10h], ebp
test	byte ptr [esi+0E5h], 1
jz	short loc_6C4A70
or	word ptr [edi+68h], 4
jmp	short loc_6C4A79

loc_6C4A70:
mov	ecx, 0FFFBh
and	[edi+68h], cx

loc_6C4A79:
test	ebp, ebp
jz	short loc_6C4A84
mov	ecx, ebp
call	sub_64A430

loc_6C4A84:
pop	ebp
test	ebx, ebx
jz	short loc_6C4A90
mov	ecx, ebx
call	sub_64A430

loc_6C4A90:
pop	ebx
mov	eax, edi
pop	edi

loc_6C4A94:
pop	esi
retn
sub_6C49A0 endp

align 10h



sub_6C4AA0 proc	near
mov	eax, [ecx+0ECh]
test	eax, eax
jz	short loc_6C4AB5
cmp	dword ptr [eax], 0
jz	short loc_6C4AB5
mov	eax, 1
retn

loc_6C4AB5:
xor	eax, eax
retn
sub_6C4AA0 endp

align 10h



sub_6C4AC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	edi
mov	edi, ecx
lea	eax, [edi+0D0h]
mov	[esp+0Ch+var_4], eax
mov	eax, [eax]
cmp	dword ptr [eax+10h], 0
jz	loc_6C4B8A
mov	edx, [edi]
mov	eax, [edx+70h]
push	ebx
call	eax
mov	ebx, eax
test	ebx, ebx
jz	loc_6C4B89
mov	ecx, [edi+0BCh]
push	esi
lea	edx, [esp+14h+var_8]
push	edx
call	sub_71E330
mov	eax, [eax]
mov	ecx, [ebx+78h]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
add	edi, 0D4h
cmp	byte ptr [edi],	5
jb	short loc_6C4B3B
mov	ecx, edi
call	sub_652060

loc_6C4B3B:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6C4B51
mov	ecx, esi
call	sub_650DF0

loc_6C4B51:
mov	esi, [esp+14h+var_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C4B77
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C4B77:
mov	ecx, [esp+14h+var_4]
push	1
push	0
push	edi
push	ecx
mov	ecx, ebx
call	sub_6729F0
pop	esi

loc_6C4B89:
pop	ebx

loc_6C4B8A:
pop	edi
add	esp, 8
retn
sub_6C4AC0 endp

align 10h



sub_6C4B90 proc	near

arg_0= dword ptr  4

xor	edx, edx
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax], edx
mov	[eax+0Ch], dl
push	esi
lea	ecx, [eax+18h]
mov	[eax+10h], ecx
mov	ecx, 200h
mov	[eax+14h], ecx
mov	[eax+41Ch], ecx
lea	ecx, [eax+820h]
lea	esi, [eax+420h]
mov	[eax+418h], esi
mov	esi, [eax+10h]
mov	[ecx], esi
mov	[ecx+4], edx
mov	esi, [eax+10h]
mov	[ecx+8], esi
mov	esi, [eax+14h]
mov	[ecx+0Ch], esi
mov	esi, [eax+418h]
mov	[eax+830h], esi
mov	[eax+834h], edx
mov	edx, [eax+418h]
mov	[eax+838h], edx
mov	edx, [eax+41Ch]
mov	[eax+83Ch], edx
mov	[eax+4], ecx
mov	ecx, [esp+4+arg_0]
mov	[eax+8], ecx
pop	esi
retn	4
sub_6C4B90 endp




sub_6C4C10 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C4E8B
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C4E8B
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C4C42
lea	edi, [eax-78h]
jmp	short loc_6C4C44

loc_6C4C42:
xor	edi, edi

loc_6C4C44:
mov	eax, [edi+0ECh]
test	eax, eax
jz	short loc_6C4C57
cmp	dword ptr [eax], 0
jnz	loc_6C4E8A

loc_6C4C57:
mov	eax, [esi+1Ch]
cmp	eax, 1
jnz	short loc_6C4CC3
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	loc_6C4E8A
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 1Eh
jnz	loc_6C4E8A
push	0FFFFFFFFh
push	0
lea	ecx, [esi+34h]
push	ecx
mov	ecx, [edi+0BCh]
call	sub_71E2D0
mov	ecx, [edi+0BCh]
push	0FFFFFFFFh
push	0
add	esi, 60h
push	esi
call	sub_71E300
mov	ecx, edi
pop	edi
pop	esi
add	esp, 8
jmp	sub_6C4920

loc_6C4CC3:
push	ebx
push	ebp
cmp	eax, 2
jnz	loc_6C4D78
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_6C4E88
mov	eax, [ebx+10h]
mov	edx, [eax+8]
lea	ecx, [ebx+10h]
call	edx
cmp	eax, 1Eh
jnz	loc_6C4E88
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_6C4E86
fnstcw	word ptr [esp+18h+arg_0]
lea	ecx, [ebx+34h]
movzx	eax, word ptr [esp+18h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	esi, dword ptr [esp+18h+var_8]
lea	ebp, [esi+1]
push	ebp
fldcw	word ptr [esp+1Ch+arg_0]
push	esi
push	ecx
mov	ecx, [edi+0BCh]
call	sub_71E2D0
mov	ecx, [edi+0BCh]
push	ebp
push	esi
add	ebx, 60h
push	ebx
call	sub_71E300
pop	ebp
pop	ebx
mov	ecx, edi
pop	edi
pop	esi
add	esp, 8
jmp	sub_6C4920

loc_6C4D78:
cmp	eax, 3
jl	loc_6C4E88
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_6C4E88
mov	eax, [ebx+10h]
mov	edx, [eax+8]
lea	ecx, [ebx+10h]
call	edx
cmp	eax, 1Eh
jnz	loc_6C4E88
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fldz
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6C4DD6
fstp	st(1)
jmp	short loc_6C4DD8

loc_6C4DD6:
fstp	st

loc_6C4DD8:
mov	ecx, [esi+18h]
fstp	[esp+18h+var_8]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fldz
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6C4DFF
fstp	st(1)
jmp	short loc_6C4E01

loc_6C4DFF:
fstp	st

loc_6C4E01:
fld	[esp+18h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_6C4E84
fnstcw	word ptr [esp+18h+arg_0]
lea	edx, [ebx+34h]
movzx	eax, word ptr [esp+18h+arg_0]
fxch	st(1)
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	esi, dword ptr [esp+18h+var_8]
push	esi
fldcw	word ptr [esp+1Ch+arg_0]
fnstcw	word ptr [esp+1Ch+arg_0]
movzx	eax, word ptr [esp+1Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	ebp, dword ptr [esp+1Ch+var_8]
mov	ecx, [edi+0BCh]
push	ebp
fldcw	word ptr [esp+20h+arg_0]
push	edx
call	sub_71E2D0
mov	ecx, [edi+0BCh]
push	esi
push	ebp
add	ebx, 60h
push	ebx
call	sub_71E300
pop	ebp
pop	ebx
mov	ecx, edi
pop	edi
pop	esi
add	esp, 8
jmp	sub_6C4920

loc_6C4E84:
fstp	st(1)

loc_6C4E86:
fstp	st

loc_6C4E88:
pop	ebp
pop	ebx

loc_6C4E8A:
pop	edi

loc_6C4E8B:
pop	esi
add	esp, 8
retn
sub_6C4C10 endp




sub_6C4E90 proc	near

var_820= dword ptr -820h
var_81C= qword ptr -81Ch
var_814= dword ptr -814h
var_810= qword ptr -810h
var_808= dword ptr -808h
var_804= byte ptr -804h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 820h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+820h+var_4], eax
push	esi
mov	esi, [esp+824h+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C5119
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C5119
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_6C4ED6
add	edi, 0FFFFFF88h
jmp	short loc_6C4ED8

loc_6C4ED6:
xor	edi, edi

loc_6C4ED8:
mov	eax, [edi+0ECh]
test	eax, eax
jz	short loc_6C4EEB
cmp	dword ptr [eax], 0
jnz	loc_6C5118

loc_6C4EEB:
cmp	dword ptr [esi+1Ch], 3
jl	loc_6C5118
mov	eax, [esi+18h]
push	ebx
push	ebp
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+830h+var_81C]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+830h+var_810]
mov	ebx, [esi+18h]
push	2
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	edx, [esp+83Ch+var_814]
push	edx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+830h+var_814]
call	sub_650650
fld	[esp+830h+var_81C]
fnstcw	word ptr [esp+830h+var_820]
mov	ebp, eax
movzx	eax, word ptr [esp+830h+var_820]
fld	st
or	eax, 0C00h
mov	dword ptr [esp+830h+var_81C], eax
mov	[esp+830h+var_808], ebp
fldcw	word ptr [esp+830h+var_81C]
fistp	[esp+830h+var_81C]
mov	esi, dword ptr [esp+830h+var_81C]
fldcw	word ptr [esp+830h+var_820]
fld	[esp+830h+var_810]
fnstcw	word ptr [esp+830h+var_820]
fld	st
movzx	eax, word ptr [esp+830h+var_820]
or	eax, 0C00h
mov	dword ptr [esp+830h+var_81C], eax
fldcw	word ptr [esp+830h+var_81C]
fistp	[esp+830h+var_81C]
mov	ecx, dword ptr [esp+830h+var_81C]
fldcw	word ptr [esp+830h+var_820]
mov	[esp+830h+var_820], ecx
fldz
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jp	loc_6C50FC
fcompp
fnstsw	ax
test	ah, 1
jnz	loc_6C5100
cmp	esi, ecx
ja	loc_6C5100
mov	eax, [edi+0BCh]
mov	ecx, [eax+8]
call	sub_726950
mov	ebx, eax
sub	ebx, [esp+830h+var_820]
add	ebx, esi
add	ebx, ebp
cmp	esi, eax
jb	short loc_6C5005
mov	eax, [edi+0BCh]
mov	ecx, [eax+8]
mov	edx, [ecx+1Ch]
mov	dword ptr [esp+830h+var_81C], edx
mov	eax, [eax+8]
mov	ecx, [eax+18h]
mov	dword ptr [esp+830h+var_810], ecx
jmp	short loc_6C501E

loc_6C5005:
mov	ecx, [edi+0BCh]
mov	ecx, [ecx+8]
push	esi
lea	edx, [esp+834h+var_810]
push	edx
lea	eax, [esp+838h+var_81C]
push	eax
call	sub_728B20

loc_6C501E:
cmp	ebp, 400h
jnb	short loc_6C5053
mov	edx, [esp+830h+var_814]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+838h+var_804]
push	ecx
call	sub_67BBC0
mov	edx, [esp+830h+var_820]
mov	ecx, [edi+0BCh]
push	0FFFFFFFFh
push	edx
push	esi
lea	eax, [esp+83Ch+var_804]
push	eax
call	sub_71E550
jmp	short loc_6C5094

loc_6C5053:
lea	ecx, [ebp+ebp+2]
push	ecx
call	sub_4E4090
mov	edx, [esp+830h+var_814]
mov	ebp, eax
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
push	ebp
call	sub_67BBC0
mov	ecx, [esp+830h+var_820]
push	0FFFFFFFFh
push	ecx
mov	ecx, [edi+0BCh]
push	esi
push	ebp
call	sub_71E550
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
mov	ebp, [esp+830h+var_808]

loc_6C5094:
mov	ecx, [edi+0BCh]
mov	ecx, [ecx+11Ch]
test	ecx, ecx
jz	short loc_6C50C1
call	sub_717420
cmp	eax, ebx
jbe	short loc_6C50C1
mov	edx, [edi+0BCh]
mov	ecx, [edx+11Ch]
push	0
push	ebx
call	sub_72F6A0

loc_6C50C1:
mov	eax, dword ptr [esp+830h+var_810]
test	eax, eax
jz	short loc_6C50DA
lea	ecx, [esi+ebp]
push	ecx
mov	ecx, [edi+0BCh]
push	esi
push	eax
call	sub_71E300

loc_6C50DA:
mov	eax, dword ptr [esp+830h+var_81C]
test	eax, eax
jz	short loc_6C50F3
mov	ecx, [edi+0BCh]
lea	edx, [esi+ebp]
push	edx
push	esi
push	eax
call	sub_71E2D0

loc_6C50F3:
mov	ecx, edi
call	sub_6C4920
jmp	short loc_6C5100

loc_6C50FC:
fstp	st(1)
fstp	st

loc_6C5100:
mov	eax, [esp+830h+var_814]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
pop	ebx
jnz	short loc_6C5118
call	sub_650DF0

loc_6C5118:
pop	edi

loc_6C5119:
mov	ecx, [esp+824h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 820h
retn
sub_6C4E90 endp

align 10h



sub_6C5130 proc	near

var_814= dword ptr -814h
var_810= dword ptr -810h
var_80C= dword ptr -80Ch
var_808= dword ptr -808h
var_804= byte ptr -804h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 814h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+814h+var_4], eax
push	edi
mov	edi, [esp+818h+arg_0]
cmp	dword ptr [edi+8], 0
jz	loc_6C52E8
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C52E8
push	esi
mov	esi, [edi+8]
test	esi, esi
jz	short loc_6C5176
add	esi, 0FFFFFF88h
jmp	short loc_6C5178

loc_6C5176:
xor	esi, esi

loc_6C5178:
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6C518B
cmp	dword ptr [eax], 0
jnz	loc_6C52E7

loc_6C518B:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6C52E7
mov	eax, [esi+0BCh]
cmp	dword ptr [eax+11Ch], 0
jz	loc_6C52E7
push	ebx
mov	ebx, [edi+18h]
push	ebp
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+830h+var_814]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+0BCh]
mov	eax, [edx+8]
mov	ecx, [eax+1Ch]
mov	edi, [eax+18h]
mov	[esp+824h+var_808], ecx
lea	ecx, [esp+824h+var_814]
mov	[esp+824h+var_80C], edi
call	sub_650650
mov	edx, [esi+0BCh]
mov	ebp, eax
mov	eax, [edx+11Ch]
mov	eax, [eax+8]
mov	edx, [eax+1Ch]
mov	ecx, [eax+20h]
mov	ebx, edx
cmp	edx, ecx
jb	short loc_6C5206
mov	ebx, ecx

loc_6C5206:
mov	eax, edx
mov	[esp+824h+var_810], eax
cmp	ecx, eax
jb	short loc_6C5214
mov	[esp+824h+var_810], ecx

loc_6C5214:
cmp	ebp, 400h
jnb	short loc_6C5249
mov	ecx, [esp+824h+var_814]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	eax, [esp+82Ch+var_804]
push	eax
call	sub_67BBC0
mov	ecx, [esp+824h+var_810]
push	0FFFFFFFFh
push	ecx
mov	ecx, [esi+0BCh]
push	ebx
lea	edx, [esp+830h+var_804]
push	edx
call	sub_71E550
jmp	short loc_6C528A

loc_6C5249:
lea	eax, [ebp+ebp+2]
push	eax
call	sub_4E4090
mov	ecx, [esp+824h+var_814]
mov	edx, [ecx]
push	0FFFFFFFFh
mov	edi, eax
push	edx
push	edi
call	sub_67BBC0
mov	eax, [esp+824h+var_810]
mov	ecx, [esi+0BCh]
push	0FFFFFFFFh
push	eax
push	ebx
push	edi
call	sub_71E550
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
mov	edi, [esp+824h+var_80C]

loc_6C528A:
mov	ecx, [esi+0BCh]
mov	ecx, [ecx+11Ch]
push	0
add	ebp, ebx
push	ebp
call	sub_72F6A0
test	edi, edi
jz	short loc_6C52B2
mov	ecx, [esi+0BCh]
push	ebp
push	ebx
push	edi
call	sub_71E300

loc_6C52B2:
mov	eax, [esp+824h+var_808]
test	eax, eax
jz	short loc_6C52C8
mov	ecx, [esi+0BCh]
push	ebp
push	ebx
push	eax
call	sub_71E2D0

loc_6C52C8:
mov	ecx, esi
call	sub_6C4920
mov	eax, [esp+824h+var_814]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebp
pop	ebx
jnz	short loc_6C52E7
call	sub_650DF0

loc_6C52E7:
pop	esi

loc_6C52E8:
mov	ecx, [esp+818h+var_4]
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 814h
retn
sub_6C5130 endp

align 10h



sub_6C5300 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
cmp	dword ptr [edi+8], 0
jz	loc_6C53A9
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C53A9
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6C532F
lea	esi, [eax-78h]
jmp	short loc_6C5331

loc_6C532F:
xor	esi, esi

loc_6C5331:
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6C5340
cmp	dword ptr [eax], 0
jnz	short loc_6C53A8

loc_6C5340:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6C53A8
push	ebx
mov	ebx, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+0Ch+arg_0]
mov	eax, [edx]
mov	ecx, [esi+0BCh]
push	0FFFFFFFFh
push	eax
call	sub_71E450
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
pop	ebx
test	eax, eax
jz	short loc_6C5390
or	dword ptr [eax+2474h], 400h

loc_6C5390:
mov	eax, [esp+8+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C53A8
pop	esi
pop	edi
jmp	sub_650DF0

loc_6C53A8:
pop	esi

loc_6C53A9:
pop	edi
retn
sub_6C5300 endp

align 10h



sub_6C53B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C549A
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C549A
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C53E2
lea	edi, [eax-78h]
jmp	short loc_6C53E4

loc_6C53E2:
xor	edi, edi

loc_6C53E4:
cmp	dword ptr [esi+1Ch], 2
jl	loc_6C5499
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+10h+var_8]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fld	ds:dbl_15FCE20
mov	ecx, [edi+0BCh]
fmul	st(1), st
fxch	st(1)
sub	esp, 8
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fstp	[esp+18h+var_14]
fmul	[esp+18h+var_8]
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fstp	[esp+18h+var_18]
call	sub_7243C0
mov	esi, [esi+4]
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_6C5481
cmp	byte ptr [esi],	5
jb	short loc_6C5463
mov	ecx, esi
call	sub_652060

loc_6C5463:
mov	[esp+10h+arg_0], edi
fild	[esp+10h+arg_0]
mov	byte ptr [esi],	3
test	edi, edi
jge	short loc_6C5496
fadd	ds:dbl_15FCE08
pop	edi
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn

loc_6C5481:
cmp	byte ptr [esi],	5
jb	short loc_6C548D
mov	ecx, esi
call	sub_652060

loc_6C548D:
fld	ds:dbl_15FCD60
mov	byte ptr [esi],	3

loc_6C5496:
fstp	qword ptr [esi+4]

loc_6C5499:
pop	edi

loc_6C549A:
pop	esi
add	esp, 8
retn
sub_6C53B0 endp

align 10h



sub_6C54A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C558A
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C558A
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C54D2
lea	edi, [eax-78h]
jmp	short loc_6C54D4

loc_6C54D2:
xor	edi, edi

loc_6C54D4:
cmp	dword ptr [esi+1Ch], 2
jl	loc_6C5589
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+10h+var_8]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fld	ds:dbl_15FCE20
mov	ecx, [edi+0BCh]
fmul	st(1), st
fxch	st(1)
sub	esp, 8
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fstp	[esp+18h+var_14]
fmul	[esp+18h+var_8]
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fstp	[esp+18h+var_18]
call	sub_724AB0
mov	esi, [esi+4]
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_6C5571
cmp	byte ptr [esi],	5
jb	short loc_6C5553
mov	ecx, esi
call	sub_652060

loc_6C5553:
mov	[esp+10h+arg_0], edi
fild	[esp+10h+arg_0]
mov	byte ptr [esi],	3
test	edi, edi
jge	short loc_6C5586
fadd	ds:dbl_15FCE08
pop	edi
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn

loc_6C5571:
cmp	byte ptr [esi],	5
jb	short loc_6C557D
mov	ecx, esi
call	sub_652060

loc_6C557D:
fld	ds:dbl_15FCD60
mov	byte ptr [esi],	3

loc_6C5586:
fstp	qword ptr [esi+4]

loc_6C5589:
pop	edi

loc_6C558A:
pop	esi
add	esp, 8
retn
sub_6C54A0 endp

align 10h



sub_6C5590 proc	near

var_10=	qword ptr -10h
arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C5646
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C5646
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C55BF
lea	edi, [eax-78h]
jmp	short loc_6C55C1

loc_6C55BF:
xor	edi, edi

loc_6C55C1:
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C5645
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
test	eax, eax
jge	short loc_6C55FD
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6C55EE
mov	ecx, esi
call	sub_652060

loc_6C55EE:
fld	ds:dbl_15FCD60
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
retn

loc_6C55FD:
mov	ecx, [edi+0BCh]
push	eax
call	sub_724B80
cmp	eax, 0FFFFFFFFh
jz	short loc_6C5631
mov	[esp+8+arg_0], eax
fild	[esp+8+arg_0]
test	eax, eax
jge	short loc_6C5637
fadd	ds:dbl_15FCE08
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0
pop	edi
pop	esi
retn

loc_6C5631:
fld	ds:dbl_15FCD60

loc_6C5637:
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0

loc_6C5645:
pop	edi

loc_6C5646:
pop	esi
retn
sub_6C5590 endp

align 10h



sub_6C5650 proc	near

var_10=	qword ptr -10h
arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C570C
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C570C
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C567F
lea	edi, [eax-78h]
jmp	short loc_6C5681

loc_6C567F:
xor	edi, edi

loc_6C5681:
cmp	dword ptr [esi+1Ch], 1
jl	loc_6C570B
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
test	eax, eax
jge	short loc_6C56C1
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6C56B2
mov	ecx, esi
call	sub_652060

loc_6C56B2:
fld	ds:dbl_15FCD60
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
retn

loc_6C56C1:
mov	ecx, [edi+0BCh]
push	0
push	eax
call	sub_724BE0
cmp	eax, 0FFFFFFFFh
jz	short loc_6C56F7
mov	[esp+8+arg_0], eax
fild	[esp+8+arg_0]
test	eax, eax
jge	short loc_6C56FD
fadd	ds:dbl_15FCE08
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0
pop	edi
pop	esi
retn

loc_6C56F7:
fld	ds:dbl_15FCD60

loc_6C56FD:
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0

loc_6C570B:
pop	edi

loc_6C570C:
pop	esi
retn
sub_6C5650 endp

align 10h



sub_6C5710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	edi
mov	edi, [esp+0Ch+arg_0]
cmp	dword ptr [edi+8], 0
jz	loc_6C583A
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C583A
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6C5742
lea	esi, [eax-78h]
jmp	short loc_6C5744

loc_6C5742:
xor	esi, esi

loc_6C5744:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6C5839
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
test	eax, eax
jge	short loc_6C5779
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
pop	esi
mov	byte ptr [edi],	0
pop	edi
add	esp, 8
retn

loc_6C5779:
mov	ecx, [esi+0BCh]
lea	edx, [esp+10h+var_8]
push	edx
push	eax
mov	[esp+18h+var_8], 0
call	sub_724C60
mov	esi, eax
lea	ecx, [esp+10h+arg_0]
test	esi, esi
jz	short loc_6C580C
call	sub_679E30
mov	eax, [esp+10h+var_8]
push	eax
push	esi
lea	ecx, [esp+18h+arg_0]
call	sub_67A000
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	eax, [esp+10h+arg_0]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	ecx, [edi+4]
lea	eax, [esp+10h+var_4]
push	eax
mov	[esp+14h+var_4], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6C57FD
mov	ecx, esi
call	sub_650DF0

loc_6C57FD:
lea	ecx, [esp+10h+arg_0]
call	sub_4E40F0
pop	esi
pop	edi
add	esp, 8
retn

loc_6C580C:
push	offset byte_146D660
push	ecx
mov	ecx, [edi+18h]
call	sub_651CB0
mov	ecx, [edi+4]
push	eax
call	sub_64A680
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C5839
call	sub_650DF0

loc_6C5839:
pop	esi

loc_6C583A:
pop	edi
add	esp, 8
retn
sub_6C5710 endp

align 10h



sub_6C5840 proc	near

var_10=	qword ptr -10h
arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C58F6
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C58F6
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C586F
lea	edi, [eax-78h]
jmp	short loc_6C5871

loc_6C586F:
xor	edi, edi

loc_6C5871:
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C58F5
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
test	eax, eax
jge	short loc_6C58AD
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6C589E
mov	ecx, esi
call	sub_652060

loc_6C589E:
fld	ds:dbl_15FCD60
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
retn

loc_6C58AD:
mov	ecx, [edi+0BCh]
push	eax
call	sub_71E940
cmp	eax, 0FFFFFFFFh
jz	short loc_6C58E1
mov	[esp+8+arg_0], eax
fild	[esp+8+arg_0]
test	eax, eax
jge	short loc_6C58E7
fadd	ds:dbl_15FCE08
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0
pop	edi
pop	esi
retn

loc_6C58E1:
fld	ds:dbl_15FCD60

loc_6C58E7:
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0

loc_6C58F5:
pop	edi

loc_6C58F6:
pop	esi
retn
sub_6C5840 endp

align 10h



sub_6C5900 proc	near

var_10=	qword ptr -10h
arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C59B6
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C59B6
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C592F
lea	edi, [eax-78h]
jmp	short loc_6C5931

loc_6C592F:
xor	edi, edi

loc_6C5931:
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C59B5
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
test	eax, eax
jge	short loc_6C596D
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6C595E
mov	ecx, esi
call	sub_652060

loc_6C595E:
fld	ds:dbl_15FCD60
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
retn

loc_6C596D:
mov	ecx, [edi+0BCh]
push	eax
call	sub_724B30
cmp	eax, 0FFFFFFFFh
jz	short loc_6C59A1
mov	[esp+8+arg_0], eax
fild	[esp+8+arg_0]
test	eax, eax
jge	short loc_6C59A7
fadd	ds:dbl_15FCE08
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0
pop	edi
pop	esi
retn

loc_6C59A1:
fld	ds:dbl_15FCD60

loc_6C59A7:
mov	ecx, [esi+4]
sub	esp, 8
fstp	[esp+10h+var_10]
call	sub_64A6A0

loc_6C59B5:
pop	edi

loc_6C59B6:
pop	esi
retn
sub_6C5900 endp

align 10h



sub_6C59C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C5A96
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C5A96
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6C59EE
add	eax, 0FFFFFF88h
jmp	short loc_6C59F0

loc_6C59EE:
xor	eax, eax

loc_6C59F0:
mov	eax, [eax+0BCh]
push	edi
mov	edi, [eax+11Ch]
test	edi, edi
jz	loc_6C5A95
mov	cl, [edi+68h]
mov	eax, [edi+8]
mov	edx, [eax+1Ch]
shr	cl, 2
and	cl, 1
mov	byte ptr [esp+8+arg_0],	cl
mov	ecx, [eax+20h]
push	ebx
push	ebp
mov	ebp, edx
cmp	edx, ecx
jb	short loc_6C5A25
mov	ebp, ecx

loc_6C5A25:
mov	eax, edx
mov	ebx, eax
cmp	ecx, eax
jb	short loc_6C5A2F
mov	ebx, ecx

loc_6C5A2F:
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C5A4D
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+10h+arg_0], al

loc_6C5A4D:
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6C5A69
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebp, eax

loc_6C5A69:
cmp	dword ptr [esi+1Ch], 3
jl	short loc_6C5A85
mov	ecx, [esi+18h]
push	ecx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebx, eax

loc_6C5A85:
mov	edx, [esp+10h+arg_0]
push	edx
push	ebx
push	ebp
mov	ecx, edi
call	sub_72E600
pop	ebp
pop	ebx

loc_6C5A95:
pop	edi

loc_6C5A96:
pop	esi
retn
sub_6C59C0 endp

align 10h



sub_6C5AA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C5B9E
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C5B9E
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6C5AD3
add	eax, 0FFFFFF88h
mov	[esp+8+arg_0], eax
jmp	short loc_6C5ADB

loc_6C5AD3:
mov	[esp+8+arg_0], 0

loc_6C5ADB:
mov	eax, [esp+8+arg_0]
mov	ecx, [eax+0BCh]
push	edi
mov	edi, [ecx+11Ch]
test	edi, edi
jz	loc_6C5B9D
mov	dl, [edi+68h]
mov	eax, [edi+8]
mov	ecx, [eax+20h]
shr	dl, 2
and	dl, 1
mov	byte ptr [esp+0Ch+var_4], dl
mov	edx, [eax+1Ch]
push	ebx
push	ebp
mov	ebp, edx
cmp	edx, ecx
jb	short loc_6C5B14
mov	ebp, ecx

loc_6C5B14:
mov	eax, edx
mov	ebx, eax
cmp	ecx, eax
jb	short loc_6C5B1E
mov	ebx, ecx

loc_6C5B1E:
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C5B3C
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+14h+var_4], al

loc_6C5B3C:
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6C5B58
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebp, eax

loc_6C5B58:
cmp	dword ptr [esi+1Ch], 3
jl	short loc_6C5B74
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebx, eax

loc_6C5B74:
mov	eax, [esp+14h+var_4]
push	eax
push	ebx
push	ebp
mov	ecx, edi
call	sub_72E6E0
mov	ecx, [esp+14h+arg_0]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
pop	ebp
pop	ebx
test	eax, eax
jz	short loc_6C5B9D
or	dword ptr [eax+2474h], 400h

loc_6C5B9D:
pop	edi

loc_6C5B9E:
pop	esi
pop	ecx
retn
sub_6C5AA0 endp

align 10h



sub_6C5BB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C5CAE
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C5CAE
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6C5BE3
add	eax, 0FFFFFF88h
mov	[esp+8+arg_0], eax
jmp	short loc_6C5BEB

loc_6C5BE3:
mov	[esp+8+arg_0], 0

loc_6C5BEB:
mov	eax, [esp+8+arg_0]
mov	ecx, [eax+0BCh]
push	edi
mov	edi, [ecx+11Ch]
test	edi, edi
jz	loc_6C5CAD
mov	dl, [edi+68h]
mov	eax, [edi+8]
mov	ecx, [eax+20h]
shr	dl, 2
and	dl, 1
mov	byte ptr [esp+0Ch+var_4], dl
mov	edx, [eax+1Ch]
push	ebx
push	ebp
mov	ebp, edx
cmp	edx, ecx
jb	short loc_6C5C24
mov	ebp, ecx

loc_6C5C24:
mov	eax, edx
mov	ebx, eax
cmp	ecx, eax
jb	short loc_6C5C2E
mov	ebx, ecx

loc_6C5C2E:
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C5C4C
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+14h+var_4], al

loc_6C5C4C:
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6C5C68
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebp, eax

loc_6C5C68:
cmp	dword ptr [esi+1Ch], 3
jl	short loc_6C5C84
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebx, eax

loc_6C5C84:
mov	eax, [esp+14h+var_4]
push	eax
push	ebx
push	ebp
mov	ecx, edi
call	sub_72E740
mov	ecx, [esp+14h+arg_0]
mov	edx, [ecx]
mov	eax, [edx+54h]
call	eax
pop	ebp
pop	ebx
test	eax, eax
jz	short loc_6C5CAD
or	dword ptr [eax+2474h], 400h

loc_6C5CAD:
pop	edi

loc_6C5CAE:
pop	esi
pop	ecx
retn
sub_6C5BB0 endp

align 10h



sub_6C5CC0 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5D1A
push	esi
mov	esi, [eax+14h]
test	esi, esi
jz	short loc_6C5CF5
inc	dword ptr [esi+4]
push	0FFFFFFFFh
push	offset szReferrer
mov	ecx, esi
call	sub_72EB60
push	0
mov	ecx, esi
call	sub_72EBC0

loc_6C5CF5:
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_6C5D0C
or	dword ptr [eax+2474h], 400h

loc_6C5D0C:
test	esi, esi
jz	short loc_6C5D19
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_64A400

loc_6C5D19:
pop	esi

loc_6C5D1A:
pop	edi
retn
sub_6C5CC0 endp

align 10h



sub_6C5D20 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+0BCh]
mov	ecx, [eax+11Ch]
test	ecx, ecx
jz	short loc_6C5D4F
call	sub_72EC70
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_6C5D4F
or	dword ptr [eax+2474h], 400h

loc_6C5D4F:
pop	esi
retn
sub_6C5D20 endp

align 10h



sub_6C5D60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	edi
mov	edi, ecx
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5DAE
push	esi
mov	esi, [eax+14h]
test	esi, esi
jz	short loc_6C5DAD
mov	ecx, [esp+8+arg_4]
mov	edx, [esp+8+arg_0]
inc	dword ptr [esi+4]
push	ecx
push	edx
mov	ecx, esi
call	sub_72EB60
mov	eax, [edi]
mov	edx, [eax+54h]
mov	ecx, edi
call	edx
test	eax, eax
jz	short loc_6C5DA6
or	dword ptr [eax+2474h], 400h

loc_6C5DA6:
mov	ecx, esi
call	sub_64A400

loc_6C5DAD:
pop	esi

loc_6C5DAE:
pop	edi
retn	8
sub_6C5D60 endp

align 10h



sub_6C5DC0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5E09
push	esi
mov	esi, [eax+14h]
test	esi, esi
jz	short loc_6C5E08
mov	ecx, [esp+8+arg_0]
inc	dword ptr [esi+4]
push	ecx
mov	ecx, esi
call	sub_72EBC0
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_6C5E01
or	dword ptr [eax+2474h], 400h

loc_6C5E01:
mov	ecx, esi
call	sub_64A400

loc_6C5E08:
pop	esi

loc_6C5E09:
pop	edi
retn	4
sub_6C5DC0 endp

align 10h



sub_6C5E10 proc	near
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5E37
mov	ecx, [eax+14h]
test	ecx, ecx
jz	short loc_6C5E37
inc	dword ptr [ecx+4]
push	esi
mov	esi, [ecx+30h]
call	sub_64A400
mov	eax, esi
pop	esi
retn

loc_6C5E37:
or	eax, 0FFFFFFFFh
retn
sub_6C5E10 endp

align 10h



sub_6C5E40 proc	near
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
push	esi
test	eax, eax
jz	short loc_6C5E72
mov	esi, [eax+14h]
test	esi, esi
jz	short loc_6C5E72
inc	dword ptr [esi+4]
push	edi
lea	ecx, [esi+14h]
call	sub_725AB0
mov	ecx, esi
mov	edi, eax
call	sub_64A400
mov	eax, edi
pop	edi
pop	esi
retn

loc_6C5E72:
xor	eax, eax
pop	esi
retn
sub_6C5E40 endp

align 10h



sub_6C5E80 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5EC9
push	esi
mov	esi, [eax+14h]
test	esi, esi
jz	short loc_6C5EC8
mov	ecx, [esp+8+arg_0]
inc	dword ptr [esi+4]
push	ecx
mov	ecx, esi
call	sub_72F570
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_6C5EC1
or	dword ptr [eax+2474h], 400h

loc_6C5EC1:
mov	ecx, esi
call	sub_64A400

loc_6C5EC8:
pop	esi

loc_6C5EC9:
pop	edi
retn	4
sub_6C5E80 endp

align 10h



sub_6C5ED0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	edi
mov	edi, ecx
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5F23
push	esi
mov	esi, [eax+14h]
test	esi, esi
jz	short loc_6C5F22
mov	ecx, [esp+8+arg_8]
mov	edx, [esp+8+arg_4]
mov	eax, [esp+8+arg_0]
inc	dword ptr [esi+4]
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_72F5D0
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_6C5F1B
or	dword ptr [eax+2474h], 400h

loc_6C5F1B:
mov	ecx, esi
call	sub_64A400

loc_6C5F22:
pop	esi

loc_6C5F23:
pop	edi
retn	0Ch
sub_6C5ED0 endp

align 10h



sub_6C5F30 proc	near
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5F44
mov	eax, [eax+5Ch]
retn

loc_6C5F44:
or	eax, 0FFFFFFFFh
retn
sub_6C5F30 endp

align 10h



sub_6C5F50 proc	near
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6C5F64
mov	eax, [eax+58h]
retn

loc_6C5F64:
mov	eax, 0FF000000h
retn
sub_6C5F50 endp

align 10h



sub_6C5F70 proc	near
cmp	dword ptr [ecx+38h], 0
push	esi
jnz	short loc_6C5F96

loc_6C5F77:
mov	esi, [ecx+18h]
test	esi, esi
jz	short loc_6C5F9B
mov	eax, [esi+10h]
mov	edx, [eax+8]
lea	ecx, [esi+10h]
call	edx
cmp	eax, 0Dh
jnz	short loc_6C5F9B
cmp	dword ptr [esi+38h], 0
mov	ecx, esi
jz	short loc_6C5F77

loc_6C5F96:
mov	eax, [ecx+38h]
pop	esi
retn

loc_6C5F9B:
xor	eax, eax
pop	esi
retn
sub_6C5F70 endp

align 10h



sub_6C5FA0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	cl, [ecx+0Ch]
mov	[eax+0Ch], cl
retn	4
sub_6C5FA0 endp

align 10h



sub_6C5FC0 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C5FEC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C5FEC:
mov	esi, [edi+4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C600D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C600D:
mov	ecx, [edi]
pop	edi
pop	esi
pop	ebx
test	ecx, ecx
jz	short locret_6C601B
jmp	sub_64A400

locret_6C601B:
retn
sub_6C5FC0 endp

align 10h



sub_6C6020 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6C6050
mov	eax, [edi]
test	eax, eax
jz	short loc_6C6045
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6C6045:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6C6050:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6C6081
mov	edx, [ecx]
push	ebx
mov	ebx, esi
shl	ebx, 4
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6C6081:
lea	eax, [esp+8+arg_4]
push	eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
mov	eax, esi
shl	eax, 4
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6C6020 endp

align 10h



sub_6C60B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [ecx+4]
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
xor	ebp, ebp
sub	ebx, 1
push	edi
mov	[esp+14h+var_4], ecx
jz	short loc_6C6111

loc_6C60C7:
cmp	ebx, 0FFFFFFFFh
jz	short loc_6C6111
mov	edi, [ecx]
lea	eax, [ebx+ebp]
shr	eax, 1
lea	edx, [eax+eax*2]
lea	edi, [edi+edx*4]
mov	edx, [edi]
cmp	esi, edx
jl	short loc_6C60F2
mov	ecx, [edi+4]
lea	ecx, [ecx+edx-1]
cmp	esi, ecx
jle	short loc_6C6151
cmp	esi, edx
mov	ecx, [esp+14h+var_4]
jge	short loc_6C60F6

loc_6C60F2:
sub	edx, esi
jmp	short loc_6C60FF

loc_6C60F6:
mov	edi, [edi+4]
sub	edi, esi
lea	edx, [edi+edx-1]

loc_6C60FF:
test	edx, edx
jz	short loc_6C6151
jge	short loc_6C610A
lea	ebp, [eax+1]
jmp	short loc_6C610D

loc_6C610A:
lea	ebx, [eax-1]

loc_6C610D:
cmp	ebp, ebx
jb	short loc_6C60C7

loc_6C6111:
cmp	ebp, ebx
jnz	short loc_6C614E
mov	eax, [ecx]
lea	edx, [ebp+ebp*2+0]
lea	ecx, [eax+edx*4]
mov	eax, [ecx]
cmp	esi, eax
jl	short loc_6C6133
mov	edx, [ecx+4]
lea	edx, [edx+eax-1]
cmp	esi, edx
jle	short loc_6C6144
cmp	esi, eax
jge	short loc_6C6137

loc_6C6133:
sub	eax, esi
jmp	short loc_6C6140

loc_6C6137:
mov	ecx, [ecx+4]
sub	ecx, esi
lea	eax, [ecx+eax-1]

loc_6C6140:
test	eax, eax
jnz	short loc_6C614E

loc_6C6144:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_6C614E:
or	eax, 0FFFFFFFFh

loc_6C6151:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_6C60B0 endp

align 10h



sub_6C6160 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
push	eax
mov	esi, ecx
call	sub_67A3D0
mov	edi, [edi+4]
mov	eax, [edi]
test	eax, eax
jz	short loc_6C617C
inc	dword ptr [eax+4]

loc_6C617C:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6C6192
call	sub_64A400
mov	ecx, [edi]
pop	edi
mov	[esi+4], ecx
pop	esi
retn	4

loc_6C6192:
mov	edx, [edi]
pop	edi
mov	[esi+4], edx
pop	esi
retn	4
sub_6C6160 endp

align 10h



sub_6C61A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
cmp	dword ptr [eax], 1
jnz	short loc_6C61CB
mov	eax, [eax+4]
push	eax
push	esi
call	sub_6ABEE0
mov	eax, esi
pop	esi
retn	8

loc_6C61CB:
mov	[esi+4], ecx
cmp	dword ptr [eax], 0
push	edi
jnz	short loc_6C61F6
mov	edi, [eax+4]
test	edi, edi
jz	short loc_6C61ED
mov	ecx, edi
call	sub_64A420
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6C61ED
call	sub_666B00

loc_6C61ED:
mov	[esi], edi
pop	edi
mov	eax, esi
pop	esi
retn	8

loc_6C61F6:
xor	edi, edi
mov	[esi], edi
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_6C61A0 endp

align 10h



sub_6C6210 proc	near

var_4= byte ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
test	byte ptr [ecx+0Ch], 10h
jz	short loc_6C6226
lea	eax, [ecx+4]
mov	ecx, [eax]
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	ecx
retn	4

loc_6C6226:
xor	al, al
mov	[esp+4+var_2], al
mov	[esp+1], al
mov	[esp+4+var_4], al
mov	[esp+4+var_1], al
lea	eax, [esp+4+var_4]
mov	ecx, [eax]
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	ecx
retn	4
sub_6C6210 endp

align 10h



sub_6C6250 proc	near

var_4= byte ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
test	byte ptr [ecx+0Ch], 20h
jz	short loc_6C6266
lea	eax, [ecx+8]
mov	ecx, [eax]
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	ecx
retn	4

loc_6C6266:
xor	al, al
mov	[esp+4+var_2], al
mov	[esp+1], al
mov	[esp+4+var_4], al
mov	[esp+4+var_1], al
lea	eax, [esp+4+var_4]
mov	ecx, [eax]
mov	eax, [esp+4+arg_0]
mov	[eax], ecx
pop	ecx
retn	4
sub_6C6250 endp

align 10h



sub_6C6290 proc	near
xor	eax, eax
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143ABD4
mov	[esi+8], eax
mov	[esi+0Ch], eax
lea	ecx, [esi+20h]
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
call	sub_64E8E0
mov	eax, esi
pop	esi
retn
sub_6C6290 endp

align 10h



sub_6C62D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6C62DF
call	sub_64A400

loc_6C62DF:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6C62EB
call	sub_70E500

loc_6C62EB:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6C6307
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C6307:
mov	eax, esi
pop	esi
retn	4
sub_6C62D0 endp

align 10h



sub_6C6310 proc	near
mov	eax, ecx
xor	ecx, ecx
xor	edx, edx
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_143AB58
mov	dword ptr [eax+8], 0
mov	[eax+0Ch], cx
mov	[eax+0Eh], dx
mov	[eax+10h], cx
mov	[eax+12h], dx
mov	[eax+14h], cx
mov	[eax+16h], dx
retn
sub_6C6310 endp

align 10h



sub_6C6350 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
retn	8
sub_6C6350 endp

align 10h



sub_6C6360 proc	near

arg_4= word ptr	 8

mov	ax, [esp+arg_4]
sub_6C6360 endp	; sp-analysis failed

; [00000003 BYTES: COLLAPSED FUNCTION nullsub_36. PRESS	KEYPAD "+" TO EXPAND]
align 10h



sub_6C6370 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+8], ecx
mov	[eax+4], ecx
mov	[eax], ecx
mov	[eax+0Ch], cl
mov	[eax+18h], ecx
mov	[eax+14h], ecx
mov	[eax+10h], ecx
mov	[eax+1Ch], cl
mov	[eax+28h], ecx
mov	[eax+24h], ecx
mov	[eax+20h], ecx
mov	[eax+2Ch], cl
mov	[eax+38h], ecx
mov	[eax+34h], ecx
mov	[eax+30h], ecx
mov	[eax+3Ch], cl
mov	[eax+48h], ecx
mov	[eax+44h], ecx
mov	[eax+40h], ecx
mov	[eax+4Ch], cl
mov	[eax+50h], cl
retn
sub_6C6370 endp

align 10h



sub_6C63C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6C48A0
test	[esp+4+arg_0], 1
jz	short loc_6C63DD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C63DD:
mov	eax, esi
pop	esi
retn	4
sub_6C63C0 endp

align 10h


; Attributes: bp-based frame

sub_6C63F0 proc	near

var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 34h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
mov	eax, [esi+324h]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6C6410
add	esi, 28h
jmp	short loc_6C6412

loc_6C6410:
mov	esi, eax

loc_6C6412:
lea	ebx, [edi+1Ch]
push	ebx
mov	ecx, esi
call	sub_6AABD0
fld	dword ptr [edi+28h]
sub	esp, 20h
fstp	[esp+60h+var_48]
fld	dword ptr [edi+24h]
fstp	[esp+60h+var_50]
fld	dword ptr [edi+20h]
fstp	[esp+60h+var_58]
fld	dword ptr [ebx]
fstp	[esp+60h+var_60]
push	offset aTextrectLFTFRF ; "  TextRect = { l: %f,	t: %f, r: %f, b: "...
push	esi
call	nullsub_2
add	esp, 28h
push	1
mov	ecx, esi
mov	byte ptr [esi+15h], 0
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	[esp+44h+var_D]
call	sub_6AA450
test	eax, eax
jz	short loc_6C6470
or	word ptr [edi+50h], 1
jmp	short loc_6C6479

loc_6C6470:
mov	eax, 0FFFEh
and	[edi+50h], ax

loc_6C6479:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_6C648D
or	word ptr [edi+50h], 2
jmp	short loc_6C6496

loc_6C648D:
mov	ecx, 0FFFDh
and	[edi+50h], cx

loc_6C6496:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_6C64AA
or	word ptr [edi+50h], 4
jmp	short loc_6C64B3

loc_6C64AA:
mov	edx, 0FFFBh
and	[edi+50h], dx

loc_6C64B3:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_6C64C7
or	word ptr [edi+50h], 8
jmp	short loc_6C64D0

loc_6C64C7:
mov	eax, 0FFF7h
and	[edi+50h], ax

loc_6C64D0:
movzx	eax, word ptr [edi+50h]
mov	ecx, eax
mov	edx, eax
shr	ecx, 3
and	ecx, 1
push	ecx
shr	edx, 2
shr	eax, 1
and	edx, 1
push	edx
and	eax, 1
push	eax
movzx	eax, byte ptr [edi+50h]
and	eax, 1
push	eax
push	offset aWordwrapDMulti ; "  WordWrap = %d, Multiline = %d, Passwo"...
push	esi
call	nullsub_2
add	esp, 18h
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	[esp+44h+var_10]
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	[esp+44h+var_F]
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	bl
call	sub_6AA450
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_6C654D
or	word ptr [edi+50h], 10h
jmp	short loc_6C6556

loc_6C654D:
mov	ecx, 0FFEFh
and	[edi+50h], cx

loc_6C6556:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	[esp+44h+var_E]
call	sub_6AA450
test	eax, eax
jnz	short loc_6C657A
or	word ptr [edi+50h], 20h
jmp	short loc_6C6583

loc_6C657A:
mov	edx, 0FFDFh
and	[edi+50h], dx

loc_6C6583:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_6C6597
or	word ptr [edi+50h], 40h
jmp	short loc_6C65A0

loc_6C6597:
mov	eax, 0FFBFh
and	[edi+50h], ax

loc_6C65A0:
push	1
mov	ecx, esi
call	sub_6AA450
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_6C65C1
mov	ecx, 80h
or	[edi+50h], cx
jmp	short loc_6C65CA

loc_6C65C1:
mov	edx, 0FF7Fh
and	[edi+50h], dx

loc_6C65CA:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jnz	short loc_6C65E2
mov	eax, 100h
or	[edi+50h], ax
jmp	short loc_6C65EB

loc_6C65E2:
mov	ecx, 0FEFFh
and	[edi+50h], cx

loc_6C65EB:
movzx	eax, word ptr [edi+50h]
mov	edx, eax
shr	edx, 8
mov	ecx, eax
and	edx, 1
push	edx
shr	ecx, 7
and	ecx, 1
push	ecx
mov	edx, eax
mov	ecx, eax
shr	edx, 6
and	edx, 1
push	edx
shr	ecx, 5
and	ecx, 1
push	ecx
shr	eax, 4
and	eax, 1
push	eax
push	offset aAutosizeDSelec ; "  AutoSize = %d, Selectable =	%d, Borde"...
push	esi
call	nullsub_2
add	esp, 1Ch
test	bl, bl
jz	loc_6C6731
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6C6648
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C6648:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
movzx	edx, cx
mov	[esi+2Ch], eax
mov	[edi+18h], edx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6C6688
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C6688:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, word ptr [edi+18h]
movzx	edx, cx
mov	[esp+40h+var_C], edx
push	eax
push	offset aHasfontFontIdD ; "  HasFont: font id = %d\n"
fild	[esp+48h+var_C]
push	esi
fstp	dword ptr [edi+2Ch]
call	nullsub_2
mov	eax, [edi+18h]
add	esp, 8
mov	ecx, esp
xor	ebx, ebx
mov	[esp+44h+var_8], ebx
mov	[esp+44h+var_4], ebx
mov	[ecx], eax
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx+20h]
lea	edx, [esp+44h+var_8]
push	edx
call	sub_6AF4A0
mov	ecx, [esp+40h+var_4]
cmp	[esp+40h+var_8], ebx
jnz	short loc_6C6703
cmp	ecx, ebx
jz	short loc_6C6703
call	sub_64A420
mov	ecx, [esp+40h+var_4]

loc_6C6703:
cmp	[edi+10h], ebx
jnz	short loc_6C671A
mov	eax, [edi+14h]
cmp	eax, ebx
jz	short loc_6C671A
mov	ecx, eax
call	sub_666B00
mov	ecx, [esp+40h+var_4]

loc_6C671A:
mov	eax, [esp+40h+var_8]
mov	[edi+10h], eax
mov	[edi+14h], ecx
cmp	eax, ebx
jnz	short loc_6C6731
cmp	ecx, ebx
jz	short loc_6C6731
call	sub_666B00

loc_6C6731:
cmp	[esp+40h+var_10], 0
jz	short loc_6C6751
lea	eax, [edi+30h]
push	eax
mov	ecx, esi
call	sub_6AAD20
push	offset aHascolor ; "  HasColor\n"
push	esi
call	nullsub_2
add	esp, 8

loc_6C6751:
cmp	[esp+40h+var_F], 0
jz	short loc_6C67A7
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_6C6770
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C6770:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, cx
push	eax
push	offset aHasmaxlengthLe ; "  HasMaxLength: len =	%d\n"
push	esi
mov	[edi+34h], eax
call	nullsub_2
add	esp, 0Ch

loc_6C67A7:
cmp	[esp+40h+var_E], 0
jz	loc_6C6939
mov	edx, 200h
or	[edi+50h], dx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6C67D1
mov	ecx, esi
call	sub_6A9C60

loc_6C67D1:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
movzx	edx, cl
mov	[esi+2Ch], eax
mov	[edi+54h], edx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6C67FC
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C67FC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
add	eax, 2
mov	[esp+40h+var_C], edx
mov	[esi+2Ch], eax
fild	[esp+40h+var_C]
fstp	dword ptr [edi+38h]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6C6844
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C6844:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
add	eax, 2
mov	[esp+40h+var_C], edx
mov	[esi+2Ch], eax
fild	[esp+40h+var_C]
fstp	dword ptr [edi+3Ch]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6C688C
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C688C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
add	eax, 2
mov	[esp+40h+var_C], edx
mov	[esi+2Ch], eax
fild	[esp+40h+var_C]
fstp	dword ptr [edi+40h]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6C68D4
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C68D4:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+40h+var_C], edx
sub	esp, 20h
add	eax, 2
fild	[esp+60h+var_C]
mov	[esi+2Ch], eax
mov	eax, [edi+54h]
fstp	[esp+60h+var_C]
fld	[esp+60h+var_C]
fst	dword ptr [edi+44h]
fstp	[esp+60h+var_48]
fld	dword ptr [edi+40h]
fstp	[esp+60h+var_50]
fld	dword ptr [edi+3Ch]
fstp	[esp+60h+var_58]
fld	dword ptr [edi+38h]
fstp	[esp+60h+var_60]
push	eax
push	offset aHaslayoutAlign ; "  HasLayout: alignment = %d, leftmarg	="...
push	esi
call	nullsub_2
add	esp, 2Ch

loc_6C6939:
lea	ebx, [edi+4Ch]
push	ebx
mov	ecx, esi
call	sub_6AAD60
cmp	[esp+40h+var_D], 0
jz	short loc_6C6956
lea	ecx, [edi+48h]
push	ecx
mov	ecx, esi
call	sub_6AAD60

loc_6C6956:
mov	edx, [edi+48h]
mov	eax, [ebx]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	offset aEdittextcharVa ; "EditTextChar,	varname	= %s, text = %s\n"
push	esi
call	nullsub_2
add	esp, 10h
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6C63F0 endp




sub_6C6980 proc	near

var_4= dword ptr -4

push	ecx
fld	ds:flt_143AD60
mov	eax, 800h
or	[ecx+50h], ax
xor	al, al
mov	byte ptr [esp+4+var_4+2], al
mov	byte ptr [esp+4+var_4+1], al
mov	byte ptr [esp+4+var_4],	al
mov	byte ptr [esp+4+var_4+3], 0FFh
mov	edx, [esp+4+var_4]
mov	[ecx+30h], edx
fstp	dword ptr [ecx+2Ch]
mov	eax, 528h
or	[ecx+50h], ax
pop	ecx
retn
sub_6C6980 endp

align 10h



sub_6C69C0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
lea	ecx, [esi-0F4h]
mov	dword ptr [esi+4], 1
mov	byte ptr [esi+8], 0Eh
mov	dword ptr [esi], offset	off_143AD64
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	3
call	eax
test	eax, eax
jz	short loc_6C6A0B
cmp	dword ptr [eax+0Ch], 0
jz	short loc_6C6A04
or	byte ptr [esi+8], 1

loc_6C6A04:
mov	ecx, eax
call	sub_64A430

loc_6C6A0B:
mov	eax, esi
pop	esi
retn
sub_6C69C0 endp

align 10h



sub_6C6A10 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_4= dword ptr  8

mov	eax, [ecx-0F4h]
mov	edx, [eax+54h]
sub	esp, 30h
add	ecx, 0FFFFFF0Ch
push	esi
push	edi
call	edx
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	3
call	eax
mov	edi, eax
test	edi, edi
jz	loc_6C6AFA
mov	esi, [esp+38h+arg_4]
fld	dword ptr [esi+18h]
mov	eax, [esi]
fld	ds:dbl_15FCE20
mov	edx, [esi+8]
fdiv	st(1), st
mov	ecx, [esi+0Ch]
mov	[esp+38h+var_30], eax
mov	eax, [esi+28h]
mov	[esp+38h+var_28], edx
mov	edx, [esi+4]
mov	[esp+38h+var_8], eax
mov	al, [esi+24h]
mov	[esp+38h+var_24], ecx
mov	ecx, [esi+10h]
mov	[esp+38h+var_2C], edx
mov	dl, [esi+2Ch]
mov	byte ptr [esp+38h+var_C], al
xor	eax, eax
mov	[esp+38h+var_20], ecx
mov	[esp+38h+var_4], dl
fxch	st(1)
fstp	[esp+38h+var_18]
fld	dword ptr [esi+20h]
fdiv	st, st(1)
fstp	[esp+38h+var_10]
fld	dword ptr [esi+1Ch]
fdiv	st, st(1)
fstp	[esp+38h+var_14]
fld	dword ptr [esi+14h]
fdiv	st, st(1)
fstp	[esp+38h+var_1C]
test	ecx, ecx
jbe	short loc_6C6AC0

loc_6C6AAC:
mov	ecx, [esi+8]
fld	dword ptr [ecx+eax*4]
lea	ecx, [ecx+eax*4]
fdiv	st, st(1)
inc	eax
fstp	dword ptr [ecx]
cmp	eax, [esp+38h+var_20]
jb	short loc_6C6AAC

loc_6C6AC0:
mov	edx, [edi]
fstp	st
mov	edx, [edx+0Ch]
lea	eax, [esp+38h+var_30]
push	eax
mov	ecx, edi
call	edx
test	al, al
jz	short loc_6C6AF3
mov	cl, [esp+38h+var_4]
mov	eax, [esp+38h+var_8]
mov	[esi+2Ch], cl
mov	ecx, edi
mov	[esi+28h], eax
call	sub_64A430
pop	edi
mov	al, 1
pop	esi
add	esp, 30h
retn	8

loc_6C6AF3:
mov	ecx, edi
call	sub_64A430

loc_6C6AFA:
pop	edi
xor	al, al
pop	esi
add	esp, 30h
retn	8
sub_6C6A10 endp

align 10h



sub_6C6B10 proc	near
mov	eax, [ecx-0F4h]
mov	edx, [eax+54h]
add	ecx, 0FFFFFF0Ch
call	edx
test	eax, eax
jz	short locret_6C6B2F
or	dword ptr [eax+2474h], 400h

locret_6C6B2F:
retn	4
sub_6C6B10 endp

align 10h



sub_6C6B40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_679E30
push	esi
lea	ecx, [edi-0F4h]
call	sub_6577E0
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6C6B40 endp

align 10h



sub_6C6B70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
mov	edx, [eax+8]
sub	edx, [eax+0Ch]
mov	ecx, [eax+1Ch]
shl	ecx, 5
sar	edx, 4
lea	edx, [edx+ecx-21h]
mov	ecx, [esi+1Ch]
push	edx
dec	ecx
push	ecx
mov	ecx, [esi+8]
lea	edx, [esp+10h+arg_0]
push	edx
push	ecx
push	eax
call	sub_6C2A80
mov	eax, [esp+1Ch+arg_0]
dec	dword ptr [eax+8]
add	esp, 14h
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
jnz	short locret_6C6BD9
jmp	sub_650DF0

locret_6C6BD9:
retn
sub_6C6B70 endp

align 10h



sub_6C6BE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	short loc_6C6C4B
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	short loc_6C6C4B
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6C6C06
lea	esi, [eax-78h]
jmp	short loc_6C6C08

loc_6C6C06:
xor	esi, esi

loc_6C6C08:
cmp	dword ptr [esi+14h], 4000h
jge	short loc_6C6C4D
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_6C6C32
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_6C6C32
mov	eax, [esi]
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [eax+78h]

loc_6C6C32:
add	eax, 8
mov	eax, [eax]
mov	ecx, [eax]
push	ecx
push	offset aS_removemoviec ; "%s.removeMovieClip() failed -	depth mus"...
add	esi, 0Ch
push	esi
call	sub_64AE70
add	esp, 0Ch

loc_6C6C4B:
pop	esi
retn

loc_6C6C4D:
mov	ecx, esi
pop	esi
jmp	sub_655100
sub_6C6BE0 endp

align 10h



sub_6C6C60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fldz
sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi+0BCh]
cmp	dword ptr [eax+11Ch], 0
jz	loc_6C6D26
mov	eax, [eax+11Ch]
fst	[esp+14h+var_10]
mov	edx, [esp+14h+arg_4]
fst	[esp+14h+var_C]
push	0
fst	[esp+18h+var_8]
push	0
fstp	[esp+1Ch+var_4]
push	0
push	0
lea	ecx, [esp+24h+var_10]
push	ecx
push	edx
mov	ecx, eax
call	sub_72F0D0
test	al, al
jz	short loc_6C6D24
push	edi
mov	edi, [esp+18h+arg_8]
test	edi, edi
jz	short loc_6C6CD6
mov	ecx, [esi+0BCh]
call	sub_7242A0
mov	[esp+18h+arg_8], eax
fild	[esp+18h+arg_8]
test	eax, eax
jge	short loc_6C6CD4
fadd	ds:flt_15FCC08

loc_6C6CD4:
fstp	dword ptr [edi]

loc_6C6CD6:
mov	edi, [esp+18h+arg_C]
test	edi, edi
jz	short loc_6C6CFD
mov	ecx, [esi+0BCh]
call	sub_7242C0
mov	[esp+18h+arg_8], eax
fild	[esp+18h+arg_8]
test	eax, eax
jge	short loc_6C6CFB
fadd	ds:flt_15FCC08

loc_6C6CFB:
fstp	dword ptr [edi]

loc_6C6CFD:
mov	eax, [esp+18h+arg_0]
fld	[esp+18h+var_10]
fstp	dword ptr [eax]
pop	edi
fld	[esp+14h+var_C]
pop	esi
fstp	dword ptr [eax+4]
fld	[esp+10h+var_8]
fstp	dword ptr [eax+8]
fld	[esp+10h+var_4]
fstp	dword ptr [eax+0Ch]
add	esp, 10h
retn	10h

loc_6C6D24:
fldz

loc_6C6D26:
mov	eax, [esp+14h+arg_8]
test	eax, eax
jz	short loc_6C6D30
fst	dword ptr [eax]

loc_6C6D30:
mov	eax, [esp+14h+arg_C]
test	eax, eax
jz	short loc_6C6D3A
fst	dword ptr [eax]

loc_6C6D3A:
mov	eax, [esp+14h+arg_0]
fst	dword ptr [eax]
pop	esi
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fstp	dword ptr [eax+0Ch]
add	esp, 10h
retn	10h
sub_6C6C60 endp




sub_6C6D50 proc	near

var_8= dword ptr -8

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+0B8h]
movzx	ecx, word ptr [eax+18h]
test	ecx, ecx
jnz	short loc_6C6D6B
xor	eax, eax
pop	esi
add	esp, 8
retn

loc_6C6D6B:
mov	ecx, [esi+0C0h]
push	edi
add	eax, 10h
push	eax
lea	edx, [esp+14h+var_8]
push	edx
call	sub_6C61A0
mov	ecx, [esp+10h+var_8]
test	ecx, ecx
jnz	short loc_6C6DC6
mov	eax, [esi]
mov	edx, [eax+0A8h]
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	loc_6C6E24
mov	ecx, edi
call	sub_64A420
mov	eax, [esi+0B8h]
mov	ecx, [eax+48h]
movzx	edx, word ptr [esi+10h]
movzx	eax, word ptr [eax+18h]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
push	edx
push	eax
push	offset aErrorResourceF ; "Error: Resource for font id =	%d is not"...
jmp	short loc_6C6E11

loc_6C6DC6:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 200h
jz	short loc_6C6E39
mov	edx, [esi]
mov	eax, [edx+0A8h]
mov	ecx, esi
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6C6E24
mov	ecx, edi
call	sub_64A420
mov	eax, [esi+0B8h]
mov	ecx, [eax+48h]
movzx	edx, word ptr [esi+10h]
movzx	eax, word ptr [eax+18h]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
push	edx
push	eax
push	offset aErrorFontIdDIs ; "Error: Font id = %d is referring to non"...

loc_6C6E11:
lea	ecx, [edi+0Ch]
push	ecx
call	sub_67E7F0
add	esp, 14h
mov	ecx, edi
call	sub_64A430

loc_6C6E24:
mov	ecx, [esp+10h+var_8]
test	ecx, ecx
jz	short loc_6C6E31
call	sub_666B00

loc_6C6E31:
pop	edi
xor	eax, eax
pop	esi
add	esp, 8
retn

loc_6C6E39:
mov	ecx, [esp+10h+var_8]
mov	esi, ecx
test	ecx, ecx
jz	short loc_6C6E48
call	sub_666B00

loc_6C6E48:
pop	edi
mov	eax, esi
pop	esi
add	esp, 8
retn
sub_6C6D50 endp




sub_6C6E50 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi+0BCh]
mov	ecx, [eax+11Ch]
test	ecx, ecx
jz	short loc_6C6ED9
push	esi
call	sub_730D00
mov	esi, eax
test	esi, esi
jz	short loc_6C6E72
inc	dword ptr [esi+4]

loc_6C6E72:
mov	ecx, [edi+108h]
test	ecx, ecx
jz	short loc_6C6E8D
call	sub_6C5F70
test	eax, eax
jz	short loc_6C6E8D
push	eax
mov	ecx, esi
call	sub_72E500

loc_6C6E8D:
push	0FFFFFFFFh
push	offset szReferrer
mov	ecx, esi
call	sub_72EB60
mov	ecx, [edi+0BCh]
mov	ecx, [ecx+11Ch]
call	sub_717420
push	eax
mov	ecx, esi
call	sub_72EBC0
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_6C6ECB
or	dword ptr [eax+2474h], 400h

loc_6C6ECB:
test	esi, esi
jz	short loc_6C6ED8
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_64A400

loc_6C6ED8:
pop	esi

loc_6C6ED9:
pop	edi
retn
sub_6C6E50 endp

align 10h



sub_6C6EE0 proc	near
mov	eax, 0Dh
retn
sub_6C6EE0 endp

align 10h



sub_6C6EF0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6C7590
sub_6C6EF0 endp

align 10h



sub_6C6F00 proc	near

var_34=	qword ptr -34h
var_2C=	qword ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+24h+arg_0]
mov	esi, [edi+324h]
xor	ebx, ebx
cmp	esi, ebx
jnz	short loc_6C6F1A
lea	esi, [edi+28h]

loc_6C6F1A:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	[esi+15h], bl
cmp	eax, 2
jge	short loc_6C6F31
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C6F31:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
shl	dx, 8
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
or	dx, cx
movzx	ebp, dx
cmp	esi, ebx
jnz	short loc_6C6F60
lea	esi, [edi+28h]

loc_6C6F60:
push	2
mov	ecx, esi
call	sub_6AA450
push	3
mov	ecx, esi
mov	[esp+28h+arg_0], eax
call	sub_6AA450
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	[esp+24h+var_14], eax
cmp	edx, 4
mov	[esi+15h], bl
jge	short loc_6C6F91
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6C6F91:
mov	ecx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edx, byte ptr [eax+ecx+3]
movzx	ebx, byte ptr [eax+ecx+2]
add	eax, ecx
shl	edx, 8
or	edx, ebx
movzx	ebx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, ebx
shl	edx, 8
or	edx, eax
lea	eax, [ecx+4]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 4
mov	[esp+24h+var_C], edx
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
jge	short loc_6C6FDA
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6C6FDA:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	ebx, byte ptr [edx+ecx+2]
lea	eax, [edx+ecx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, ebx
movzx	ebx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, ebx
add	ecx, 4
shl	edx, 8
or	edx, eax
mov	[esi+2Ch], ecx
mov	ecx, esi
mov	[esp+24h+var_10], edx
call	sub_6A9880
test	al, al
jz	short loc_6C7072
movzx	ecx, bp
push	ecx
lea	esi, [edi+14h]
push	offset aCsmtextsetting ; "CSMTextSettings, id =	%d\n"
push	esi
call	nullsub_2
add	esp, 0Ch
cmp	[esp+24h+arg_0], 0
mov	eax, offset aSystem ; "System"
jz	short loc_6C703D
mov	eax, offset aInternal ;	"Internal"

loc_6C703D:
mov	edx, [esp+24h+var_14]
mov	ecx, ds:off_143AF04[edx*4]
push	ecx
push	eax
push	offset aFlagtypeSGridf ; "  FlagType = %s, GridFit = %s\n"
push	esi
call	nullsub_2
fld	[esp+34h+var_10]
fstp	[esp+34h+var_2C]
fld	[esp+34h+var_C]
fstp	[esp+34h+var_34]
push	offset aThinknessFShar ; "  Thinkness =	%f, Sharpnesss = %f\n"
push	esi
call	nullsub_2
add	esp, 18h

loc_6C7072:
push	ecx
movzx	eax, bp
mov	ecx, esp
xor	ebx, ebx
mov	[esp+28h+var_8], ebx
mov	[esp+28h+var_4], ebx
lea	edx, [esp+28h+var_8]
mov	[ecx], eax
mov	ecx, [edi+20h]
push	edx
call	sub_6AF4A0
cmp	al, bl
jz	short loc_6C70DC
cmp	[esp+24h+var_8], ebx
jnz	short loc_6C70EF
mov	ecx, [esp+24h+var_4]
mov	esi, ecx
cmp	ecx, ebx
jz	short loc_6C70EF
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
and	eax, 0FF00h
cmp	eax, 8300h
jnz	short loc_6C70C3
mov	eax, 400h
or	[esi+50h], ax
jmp	short loc_6C70DC

loc_6C70C3:
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
and	eax, 0FF00h
cmp	eax, 8200h
jnz	short loc_6C70DC
or	byte ptr [esi+44h], 1

loc_6C70DC:
cmp	[esp+24h+var_8], ebx
jnz	short loc_6C70EF
mov	ecx, [esp+24h+var_4]
cmp	ecx, ebx
jz	short loc_6C70EF
call	sub_666B00

loc_6C70EF:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	8
sub_6C6F00 endp

align 10h



sub_6C7100 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_143AF38
test	ecx, ecx
jz	short loc_6C711C
call	sub_64A400
mov	dword ptr [esi+1Ch], 0

loc_6C711C:
lea	ecx, [esi+0Ch]
call	sub_730D80
mov	dword ptr [esi], offset	off_15477D0
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6C7100 endp

align 10h



sub_6C7140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+10h]
push	offset sub_6C4730
lea	esi, [edi+0Ch]
lea	ecx, [esp+14h+arg_0]
push	ecx
push	eax
push	0
push	esi
mov	[esp+24h+arg_0], ebx
call	sub_6C47D0
mov	edi, [edi+10h]
add	esp, 14h
cmp	eax, edi
jnb	short loc_6C71C4
mov	esi, [esi]
shl	eax, 4
add	eax, esi
cmp	[eax+4], ebx
jnz	short loc_6C71C4
test	eax, eax
jz	short loc_6C71C4
mov	ebx, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_4]
lea	esp, [esp+0]

loc_6C7190:
cmp	[eax+0Ch], ebx
jnz	short loc_6C71A1
movzx	ebp, byte ptr [edx]
mov	ecx, [eax+8]
and	ebp, ecx
cmp	ebp, ecx
jz	short loc_6C71C6

loc_6C71A1:
mov	ecx, eax
sub	ecx, esi
sar	ecx, 4
lea	ebp, [ecx+1]
cmp	ebp, edi
jnb	short loc_6C71C4
shl	ecx, 4
mov	ebp, [ecx+esi+14h]
add	ecx, esi
cmp	ebp, [eax+4]
jnz	short loc_6C71C4
lea	eax, [ecx+10h]
test	eax, eax
jnz	short loc_6C7190

loc_6C71C4:
xor	eax, eax

loc_6C71C6:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6C7140 endp

align 10h



sub_6C71D0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+3Ch]
mov	dword ptr [esi], offset	off_143AF40
mov	dword ptr [esi+10h], offset off_143B098
mov	dword ptr [ecx], offset	off_143B094
call	sub_665A40
mov	edx, [esi+38h]
mov	dword ptr [esi], offset	off_143AE9C
mov	dword ptr [esi+10h], offset off_143AE48
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6C7226
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6C7226
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6C7226:
mov	ecx, esi
pop	esi
jmp	sub_664A30
sub_6C71D0 endp

align 10h



sub_6C7230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6C7253
cmp	[esi], ecx
jmp	short loc_6C7268

loc_6C7253:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6C725E
call	sub_651580

loc_6C725E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6C7268:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6C72B7
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6C7286
cmp	[esi], ecx
jmp	short loc_6C729B

loc_6C7286:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6C7291
call	sub_651580

loc_6C7291:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6C729B:
setz	al
test	al, al
jnz	short loc_6C72B7
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6C72B7:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+2Ch]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6C7230 endp

align 10h



sub_6C72E0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6C72ED
mov	al, 1
retn	8

loc_6C72ED:
mov	[esp+arg_4], eax
add	ecx, 3Ch
jmp	loc_663310
sub_6C72E0 endp

align 10h



sub_6C7300 proc	near
sub	ecx, 10h
jmp	loc_6CB5E0
sub_6C7300 endp

align 10h



sub_6C7310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
lea	ecx, [eax+eax*2]
shl	ecx, 4
lea	ecx, [edx+ecx-30h]
test	eax, eax
jbe	short locret_6C7345
push	esi
push	edi
lea	esi, [ecx+28h]
mov	edi, eax
lea	ecx, [ecx+0]

loc_6C7330:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6C733B
call	sub_64A400

loc_6C733B:
sub	esi, 30h
sub	edi, 1
jnz	short loc_6C7330
pop	edi
pop	esi

locret_6C7345:
retn
sub_6C7310 endp

align 10h



sub_6C7350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	eax
mov	esi, ecx
call	sub_6C60B0
cmp	eax, 0FFFFFFFFh
jz	short loc_6C7394
mov	ecx, [esp+4+arg_0]
xor	edx, edx
cmp	eax, edx
mov	[ecx], esi
mov	[ecx+4], edx
jge	short loc_6C737A
mov	[ecx+4], edx
mov	eax, ecx
pop	esi
retn	8

loc_6C737A:
mov	esi, [esi+4]
cmp	eax, esi
jb	short loc_6C738B
dec	esi
mov	[ecx+4], esi
mov	eax, ecx
pop	esi
retn	8

loc_6C738B:
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	8

loc_6C7394:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0FFFFFFFFh
pop	esi
retn	8
sub_6C7350 endp

align 10h



sub_6C73B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
push	edi
mov	[esi], ecx
mov	edx, [eax+4]
lea	edi, [eax+8]
lea	ebx, [esi+8]
push	edi
mov	ecx, ebx
mov	[esi+4], edx
mov	byte ptr [esp+10h+arg_0], 0
call	sub_67ABE0
mov	eax, [edi+4]
test	eax, eax
jz	short loc_6C73E0
inc	dword ptr [eax+4]

loc_6C73E0:
mov	eax, [edi+4]
mov	[ebx+4], eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6C73B0 endp

align 10h



sub_6C73F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
push	edi
mov	[esi], ecx
mov	edx, [eax+4]
lea	edi, [eax+8]
lea	ebx, [esi+8]
push	edi
mov	ecx, ebx
mov	[esi+4], edx
call	sub_67AF90
add	edi, 4
push	edi
lea	ecx, [ebx+4]
call	sub_67AF90
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6C73F0 endp

align 10h



sub_6C7430 proc	near

var_4= dword ptr -4

push	ecx
fldz
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+4], 1
mov	[esi+8], ebx
mov	dword ptr [esi+0Ch], 40000h
mov	dword ptr [esi], offset	off_143AB5C
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
fst	dword ptr [esi+1Ch]
fst	dword ptr [esi+20h]
lea	ecx, [esi+48h]
fst	dword ptr [esi+24h]
fst	dword ptr [esi+28h]
mov	[esi+34h], ebx
fld1
fstp	dword ptr [esi+2Ch]
fst	dword ptr [esi+38h]
fst	dword ptr [esi+3Ch]
fst	dword ptr [esi+40h]
fstp	dword ptr [esi+44h]
call	sub_67AB70
lea	ecx, [esi+4Ch]
call	sub_67AB70
fldz
mov	[esi+54h], ebx
xor	eax, eax
mov	[esi+50h], ax
mov	[esi+32h], bl
mov	[esi+31h], bl
mov	[esi+30h], bl
mov	byte ptr [esi+33h], 0FFh
fst	dword ptr [esi+1Ch]
fstp	dword ptr [esi+20h]
mov	eax, esi
fldz
fadd	st, st
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fst	dword ptr [esi+24h]
fstp	dword ptr [esi+28h]
pop	esi
pop	ebx
pop	ecx
retn
sub_6C7430 endp

align 10h



sub_6C74D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6C74E4
lea	esi, [edi+28h]

loc_6C74E4:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6C74FC
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6C74FC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
mov	[esi+2Ch], eax
mov	eax, [edi+20h]
shl	dx, 8
or	dx, cx
mov	ecx, [eax+1Ch]
movzx	ebx, dx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	58h
call	eax
test	eax, eax
jz	short loc_6C753E
mov	ecx, eax
call	sub_6C7430
mov	esi, eax
jmp	short loc_6C7540

loc_6C753E:
xor	esi, esi

loc_6C7540:
movzx	ebx, bx
push	ebx
lea	ecx, [edi+14h]
push	offset aEdittextcharId ; "EditTextChar,	id = %d\n"
push	ecx
call	nullsub_2
mov	edx, [esp+18h+arg_4]
mov	eax, [edx]
add	esp, 0Ch
push	eax
push	edi
mov	ecx, esi
call	sub_6C63F0
cmp	dword ptr [edi+2F8h], 0
jnz	short loc_6C757B
push	esi
push	ecx
mov	eax, esp
mov	[eax], ebx
mov	ecx, [edi+20h]
call	sub_6B0AB0

loc_6C757B:
test	esi, esi
jz	short loc_6C7586
mov	ecx, esi
call	sub_666B00

loc_6C7586:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6C74D0 endp

align 10h



sub_6C7590 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	edx, [esi+38h]
mov	dword ptr [esi], offset	off_143AE9C
mov	dword ptr [esi+10h], offset off_143AE48
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6C75CB
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6C75CB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6C75CB:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6C75E7
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C75E7:
mov	eax, esi
pop	esi
retn	4
sub_6C7590 endp

align 10h



sub_6C75F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, ecx
mov	ecx, [edi+38h]
test	ecx, ecx
jnz	short loc_6C764F
mov	ecx, dword_1855FC0
push	esi
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 146h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	54h
push	edi
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6C7644
push	ebx
mov	ebx, [esp+10h+arg_0]
push	offset sub_6C5FA0
push	5
push	10h
push	ebx
push	esi
call	sub_490A20
mov	cl, [ebx+50h]
mov	[esi+50h], cl
pop	ebx
mov	[edi+38h], esi
pop	esi
pop	edi
pop	ecx
retn	4

loc_6C7644:
xor	esi, esi
mov	[edi+38h], esi
pop	esi
pop	edi
pop	ecx
retn	4

loc_6C764F:
pop	edi
add	esp, 4
jmp	sub_6C4530
sub_6C75F0 endp

align 10h



sub_6C7660 proc	near
mov	eax, ecx
mov	dword ptr [eax], offset	off_155F500
xor	ecx, ecx
mov	dword ptr [eax+4], 1
mov	dword ptr [eax+8], 18h
mov	dword ptr [eax], offset	off_143AF38
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
retn
sub_6C7660 endp

align 10h



sub_6C7690 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_143AF38
test	ecx, ecx
jz	short loc_6C76AC
call	sub_64A400
mov	dword ptr [esi+1Ch], 0

loc_6C76AC:
lea	ecx, [esi+0Ch]
call	sub_730D80
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6C76D6
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C76D6:
mov	eax, esi
pop	esi
retn	4
sub_6C7690 endp

align 10h



sub_6C76E0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_6C76FC
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6C7711
push	esi
jmp	short loc_6C770B

loc_6C76FC:
cmp	esi, [edi+8]
jb	short loc_6C7711
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6C770B:
push	edi
call	sub_6C6020

loc_6C7711:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_6C7735
mov	eax, ebx
shl	eax, 4
add	eax, [edi]
sub	esi, ebx
jz	short loc_6C7735
or	ecx, 0FFFFFFFFh

loc_6C7726:
test	eax, eax
jz	short loc_6C772D
mov	[eax+4], ecx

loc_6C772D:
add	eax, 10h
sub	esi, 1
jnz	short loc_6C7726

loc_6C7735:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6C76E0 endp

align 10h



sub_6C7740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*4-14h]
test	eax, eax
jbe	short locret_6C7775
push	esi
push	edi
lea	esi, [ecx+8]
mov	edi, eax
lea	ebx, [ebx+0]

loc_6C7760:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6C776B
call	sub_64A400

loc_6C776B:
sub	esi, 14h
sub	edi, 1
jnz	short loc_6C7760
pop	edi
pop	esi

locret_6C7775:
retn
sub_6C7740 endp

align 10h



sub_6C7780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
mov	ecx, eax
imul	ecx, 2Ch
push	edi
lea	edi, [edx+ecx-2Ch]
test	eax, eax
jbe	short loc_6C77F9
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	ebp
push	esi
mov	ebp, eax

loc_6C77A1:
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C77C2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C77C2:
mov	esi, [edi+4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C77E3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C77E3:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6C77EE
call	sub_64A400

loc_6C77EE:
sub	edi, 2Ch
sub	ebp, 1
jnz	short loc_6C77A1
pop	esi
pop	ebp
pop	ebx

loc_6C77F9:
pop	edi
retn
sub_6C7780 endp

align 10h



sub_6C7800 proc	near
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6C7810
call	sub_64A400

loc_6C7810:
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C7835
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C7835:
mov	dword ptr [edi], 0FFFFFFFEh
pop	edi
pop	esi
retn
sub_6C7800 endp

align 10h



sub_6C7840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
mov	[esp+0Ch+var_4], esi
jz	loc_6C7955
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
mov	eax, [ebp+0]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	edi
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	ebx, [esi]
mov	edi, [ebx+4]
and	edi, eax
mov	edx, edi
shl	edx, 4
cmp	dword ptr [edx+ebx+8], 0FFFFFFFEh
lea	esi, [edx+ebx+8]
jz	loc_6C7952
cmp	[esi+4], edi
jnz	loc_6C7952
mov	[esp+18h+arg_0], edi
mov	[esp+18h+var_8], 0FFFFFFFFh
lea	esp, [esp+0]

loc_6C78B0:
mov	eax, [esp+18h+arg_0]
cmp	[esi+4], eax
jnz	short loc_6C78F9
mov	ecx, [ebp+0]
mov	eax, [esi+8]
and	ecx, 0FFFFFFFCh
and	eax, 0FFFFFFFCh
add	ecx, 8
add	eax, 8
jmp	short loc_6C78D0
align 10h

loc_6C78D0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C78F0
test	dl, dl
jz	short loc_6C78EC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C78F0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C78D0

loc_6C78EC:
xor	eax, eax
jmp	short loc_6C78F5

loc_6C78F0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C78F5:
test	eax, eax
jz	short loc_6C790F

loc_6C78F9:
mov	[esp+18h+var_8], edi
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_6C7952
mov	ecx, edi
shl	ecx, 4
lea	esi, [ecx+ebx+8]
jmp	short loc_6C78B0

loc_6C790F:
cmp	[esp+18h+arg_0], edi
jnz	short loc_6C7936
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_6C7943
shl	eax, 4
mov	ecx, esi
lea	edi, [eax+ebx+8]
call	sub_6C7800
push	edi
mov	ecx, esi
call	sub_6C73B0
mov	esi, edi
jmp	short loc_6C7943

loc_6C7936:
mov	eax, [esp+18h+var_8]
mov	edx, [esi]
shl	eax, 4
mov	[eax+ebx+8], edx

loc_6C7943:
mov	ecx, esi
call	sub_6C7800
mov	eax, [esp+18h+var_4]
mov	eax, [eax]
dec	dword ptr [eax]

loc_6C7952:
pop	edi
pop	ebp
pop	ebx

loc_6C7955:
pop	esi
add	esp, 8
retn	4
sub_6C7840 endp

align 10h



sub_6C7960 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_6C79EA
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
jmp	short loc_6C7980
align 10h

loc_6C7980:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_6C79C5
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6C799A
call	sub_64A400

loc_6C799A:
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C79BF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C79BF:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6C79C5:
add	ebx, 10h
sub	[esp+14h+var_4], 1
jnz	short loc_6C7980
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_6C79EA:
pop	ebp
pop	ecx
retn
sub_6C7960 endp

align 10h



sub_6C79F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	[esp+0Ch+var_4], esi
test	eax, eax
jz	loc_6C7A9C
mov	eax, [eax+4]
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	ebp
xor	ebp, ebp
inc	eax
push	edi
mov	[esp+18h+var_8], eax
jmp	short loc_6C7A20
align 10h

loc_6C7A20:
mov	eax, [esi]
cmp	dword ptr [eax+ebp+8], 0FFFFFFFEh
lea	edi, [eax+ebp+8]
jz	short loc_6C7A79
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C7A4E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C7A4E:
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C7A6F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C7A6F:
mov	esi, [esp+18h+var_4]
mov	dword ptr [edi], 0FFFFFFFEh

loc_6C7A79:
add	ebp, 10h
sub	[esp+18h+var_8], 1
jnz	short loc_6C7A20
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	ebp
mov	dword ptr [esi], 0
pop	ebx

loc_6C7A9C:
pop	esi
add	esp, 8
retn
sub_6C79F0 endp

align 10h



sub_6C7AB0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6C7ACD
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6C7ACD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6C7ACD:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+38h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6C7AB0 endp

align 10h



sub_6C7AF0 proc	near

var_28=	dword ptr -28h
var_20=	qword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_C= word ptr	-0Ch
var_A= word ptr	-0Ah
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+38h+arg_0]
mov	esi, ecx
mov	ecx, edi
call	sub_701BF0
mov	ebp, [esp+38h+arg_4]
mov	ecx, ebp
call	sub_700260
mov	eax, [esi+0B8h]
movzx	ecx, word ptr [eax+18h]
test	ecx, ecx
jz	loc_6C7CC5
mov	ecx, [esi+0C0h]
add	eax, 10h
push	eax
lea	edx, [esp+3Ch+var_28]
push	edx
call	sub_6C61A0
mov	ecx, [esp+38h+var_28]
test	ecx, ecx
jnz	short loc_6C7B91
mov	eax, [esi]
mov	edx, [eax+0A8h]
mov	ecx, esi
call	edx
mov	ebx, eax
test	ebx, ebx
jz	loc_6C7CB8
mov	ecx, ebx
call	sub_64A420
mov	eax, [esi+0B8h]
mov	ecx, [eax+48h]
movzx	edx, word ptr [esi+10h]
movzx	eax, word ptr [eax+18h]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
push	edx
push	eax
push	offset aErrorResourceF ; "Error: Resource for font id =	%d is not"...

loc_6C7B79:
lea	ecx, [ebx+0Ch]
push	ecx
call	sub_67E7F0
add	esp, 14h
mov	ecx, ebx
call	sub_64A430
jmp	loc_6C7CB8

loc_6C7B91:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 200h
jz	short loc_6C7BE2
mov	edx, [esi]
mov	eax, [edx+0A8h]
mov	ecx, esi
call	eax
mov	ebx, eax
test	ebx, ebx
jz	loc_6C7CB8
mov	ecx, ebx
call	sub_64A420
mov	eax, [esi+0B8h]
mov	ecx, [eax+48h]
movzx	edx, word ptr [esi+10h]
movzx	eax, word ptr [eax+18h]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
push	edx
push	eax
push	offset aErrorFontIdDIs ; "Error: Font id = %d is referring to non"...
jmp	short loc_6C7B79

loc_6C7BE2:
mov	eax, [esp+38h+var_28]
mov	[esp+38h+arg_0], eax
test	eax, eax
jz	loc_6C7CC5
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
lea	ebx, [eax+0Ch]
mov	eax, [edx+3Ch]
push	0FFFFFFFFh
call	eax
push	eax
mov	ecx, edi
call	sub_701290
mov	ecx, [esi+0B8h]
mov	dl, [ecx+50h]
shr	dl, 7
test	dl, 1
jnz	loc_6C7CB8
mov	eax, [ebx]
mov	ecx, [eax+14h]
shr	ecx, 1
and	cl, 1
movzx	edx, cl
push	edx
mov	ecx, edi
call	sub_701310
mov	eax, [ebx]
mov	cl, [eax+14h]
and	cl, 1
movzx	edx, cl
push	edx
mov	ecx, edi
call	sub_701360
mov	eax, [esi+0B8h]
test	byte ptr [eax+51h], 1
jnz	short loc_6C7CB8
mov	ecx, [ebx]
mov	edx, [ecx+14h]
shr	edx, 6
not	dl
test	dl, 1
jz	short loc_6C7CB8
push	esi
push	24h
call	sub_6C4750
add	esp, 8
test	eax, eax
jz	short loc_6C7C90
mov	ecx, [esi+0C0h]
mov	edx, [ecx+28h]
push	edx		; int
mov	edx, [esp+3Ch+arg_0]
push	0		; int
push	0		; char *
push	edx		; int
push	0		; int
mov	ecx, eax
call	sub_67E880
mov	ebx, eax
jmp	short loc_6C7C92

loc_6C7C90:
xor	ebx, ebx

loc_6C7C92:
push	ebx
mov	ecx, edi
call	sub_7012C0
test	ebx, ebx
jz	short loc_6C7CB8
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_6C7CB8
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_6C7CB8:
mov	ecx, [esp+38h+var_28]
test	ecx, ecx
jz	short loc_6C7CC5
call	sub_666B00

loc_6C7CC5:
mov	eax, [esi+0B8h]
fnstcw	word ptr [esp+38h+arg_0]
fld	dword ptr [eax+2Ch]
movzx	eax, word ptr [esp+38h+arg_0]
or	eax, 0C00h
mov	[esp+38h+arg_4], eax
fldcw	word ptr [esp+38h+arg_4]
fistp	[esp+38h+var_20]
mov	eax, dword ptr [esp+38h+var_20]
cmp	eax, 10000h
movzx	eax, ax
fldcw	word ptr [esp+38h+arg_0]
jbe	short loc_6C7CFF
mov	eax, 0FFFFh

loc_6C7CFF:
or	word ptr [edi+2Ah], 8
mov	[edi+26h], ax
movzx	eax, word ptr [edi+2Ah]
mov	ecx, [esi+0B8h]
mov	edx, [ecx+30h]
or	eax, 1
mov	[edi+2Ah], ax
xor	eax, eax
mov	[edi+20h], edx
xor	ecx, ecx
xor	edx, edx
mov	[esp+38h+var_18], offset off_155F500
mov	[esp+38h+var_C], ax
mov	word ptr [esp+38h+var_8+2], ax
mov	eax, [esi+0B8h]
mov	ebx, offset off_143AB58
mov	[esp+38h+var_14], 1
mov	[esp+38h+var_18], ebx
mov	dword ptr [esp+38h+var_10], 0
mov	[esp+38h+var_A], cx
mov	word ptr [esp+38h+var_8], dx
mov	[esp+38h+var_4], cx
mov	[esp+38h+var_2], dx
mov	eax, [eax+54h]
cmp	eax, 3		; switch 4 cases
ja	short loc_6C7DC8 ; default
jmp	ds:off_6C7EAC[eax*4] ; switch jump

loc_6C7D79:		; jumptable 006C7D72 case 0
mov	cx, [ebp+16h]
mov	edx, 0F9FFh
and	cx, dx
or	cx, 1
jmp	short loc_6C7DC4

loc_6C7D8B:		; jumptable 006C7D72 case 1
mov	ax, [ebp+16h]
mov	ecx, 0FBFFh
and	ax, cx
mov	edx, 201h
or	ax, dx
mov	[ebp+16h], ax
jmp	short loc_6C7DC8 ; default

loc_6C7DA5:		; jumptable 006C7D72 case 2
mov	eax, 601h
or	[ebp+16h], ax
jmp	short loc_6C7DC8 ; default

loc_6C7DB0:		; jumptable 006C7D72 case 3
mov	cx, [ebp+16h]
mov	edx, 0FDFFh
and	cx, dx
mov	eax, 401h
or	cx, ax

loc_6C7DC4:
mov	[ebp+16h], cx

loc_6C7DC8:		; default
mov	ecx, [esi+0B8h]
mov	dx, [ecx+50h]
shr	dx, 9
test	dl, 1
jz	loc_6C7E8B
mov	eax, ecx
fnstcw	word ptr [esp+38h+arg_0]
fld	dword ptr [eax+38h]
fld	ds:dbl_15FCE20
movzx	eax, word ptr [esp+38h+arg_0]
fdiv	st(1), st
or	word ptr [ebp+16h], 10h
or	eax, 0C00h
mov	[esp+38h+arg_4], eax
movzx	edi, word ptr [ebp+16h]
or	edi, 20h
fldcw	word ptr [esp+38h+arg_4]
fxch	st(1)
fistp	[esp+38h+arg_4]
mov	cx, word ptr [esp+38h+arg_4]
mov	[ebp+12h], cx
mov	edx, [esi+0B8h]
fldcw	word ptr [esp+38h+arg_0]
fld	dword ptr [edx+3Ch]
fdiv	st, st(1)
mov	[ebp+16h], di
fnstcw	word ptr [esp+38h+arg_0]
movzx	eax, word ptr [esp+38h+arg_0]
or	eax, 0C00h
mov	[esp+38h+arg_4], eax
fldcw	word ptr [esp+38h+arg_4]
fistp	[esp+38h+arg_4]
mov	ax, word ptr [esp+38h+arg_4]
mov	[ebp+14h], ax
mov	ecx, [esi+0B8h]
fldcw	word ptr [esp+38h+arg_0]
fld	dword ptr [ecx+40h]
fdiv	st, st(1)
call	__ftol2_sse
mov	[ebp+0Eh], ax
or	edi, 4
mov	[ebp+16h], di
mov	edx, [esi+0B8h]
fdivr	dword ptr [edx+44h]
call	__ftol2_sse
or	edi, 8
mov	[ebp+10h], ax
mov	[ebp+16h], di

loc_6C7E8B:
lea	ecx, [esp+38h+var_18]
mov	[esp+38h+var_18], ebx
call	sub_6FFB90
lea	ecx, [esp+38h+var_18]
call	sub_64A3F0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	8
sub_6C7AF0 endp

align 4
off_6C7EAC dd offset loc_6C7D79	; jump table for switch	statement
dd offset loc_6C7D8B
dd offset loc_6C7DA5
dd offset loc_6C7DB0
align 10h



sub_6C7EC0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
lea	ebx, [edi+8]
lea	ebp, [esi+8]
push	ebx
mov	ecx, ebp
call	sub_67A3D0
mov	eax, [ebx+4]
mov	[ebp+4], eax
lea	ebx, [edi+10h]
lea	ebp, [esi+10h]
push	ebx
mov	ecx, ebp
call	sub_67A3D0
mov	ecx, [ebx+4]
mov	[ebp+4], ecx
mov	eax, [edi+18h]
test	eax, eax
jz	short loc_6C7EFC
inc	dword ptr [eax+4]

loc_6C7EFC:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6C7F08
call	sub_64A400

loc_6C7F08:
mov	edx, [edi+18h]
mov	[esi+18h], edx
mov	eax, [edi+1Ch]
test	eax, eax
jz	short loc_6C7F17
inc	dword ptr [eax]

loc_6C7F17:
mov	ebx, [esi+1Ch]
test	ebx, ebx
jz	short loc_6C7F38
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_6C7F38
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_6C7F38:
mov	eax, [edi+1Ch]
mov	[esi+1Ch], eax
mov	ecx, [edi+20h]
mov	[esi+20h], ecx
movzx	edx, word ptr [edi+24h]
mov	[esi+24h], dx
mov	ax, [edi+26h]
mov	[esi+26h], ax
mov	cl, [edi+28h]
mov	[esi+28h], cl
movzx	edx, word ptr [edi+2Ah]
pop	edi
mov	[esi+2Ah], dx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6C7EC0 endp

align 10h



sub_6C7F70 proc	near

var_2C=	byte ptr -2Ch
arg_0= dword ptr  4

sub	esp, 2Ch
push	edi
mov	edi, [esp+30h+arg_0]
cmp	dword ptr [edi+8], 0
jz	loc_6C804D
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C804D
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6C7FA2
lea	esi, [eax-78h]
jmp	short loc_6C7FA4

loc_6C7FA2:
xor	esi, esi

loc_6C7FA4:
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6C7FB7
cmp	dword ptr [eax], 0
jnz	loc_6C804C

loc_6C7FB7:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6C804C
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_6C804C
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 1Eh
jnz	short loc_6C804C
mov	ecx, [esi+0BCh]
mov	eax, [ecx+8]
mov	ecx, [eax+1Ch]
push	ebx
mov	ebx, [eax+18h]
push	ebp
mov	ebp, [esi+0BCh]
lea	edx, [edi+34h]
push	edx
lea	eax, [esp+40h+var_2C]
push	eax
call	sub_7013B0
mov	ecx, [ebp+8]
push	eax
call	sub_729AF0
lea	ecx, [esp+3Ch+var_2C]
call	sub_694380
mov	esi, [esi+0BCh]
add	edi, 60h
push	edi
lea	ecx, [esp+40h+var_2C]
push	ecx
mov	ecx, ebx
call	sub_700920
mov	ecx, [esi+8]
push	eax
call	sub_729BD0
lea	ecx, [esp+3Ch+var_2C]
call	sub_6C4820
pop	ebp
pop	ebx

loc_6C804C:
pop	esi

loc_6C804D:
pop	edi
add	esp, 2Ch
retn
sub_6C7F70 endp

align 10h



sub_6C8060 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7C=	byte ptr -7Ch
var_74=	byte ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	word ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_5A=	word ptr -5Ah
var_58=	byte ptr -58h
var_2C=	byte ptr -2Ch

sub	esp, 8Ch
push	esi
mov	esi, ecx
mov	eax, [esi+0ECh]
test	eax, eax
jz	loc_6C81F8
mov	eax, [eax+8]
test	eax, eax
jbe	loc_6C81F8
push	ebx
push	ebp
mov	[esp+98h+var_8C], 0
mov	[esp+98h+var_88], eax
push	edi

loc_6C8091:
mov	eax, [esi+0ECh]
cmp	dword ptr [eax], 0
jz	loc_6C81E5
mov	eax, [eax]
push	0FFFFFFFFh
push	offset aA_2	; "a"
push	0
lea	ecx, [eax+34h]
call	sub_732F90
mov	ebp, eax
mov	eax, [esi+0ECh]
mov	eax, [eax]
push	0FFFFFFFFh
push	offset aALink	; "a:link"
push	0
lea	ecx, [eax+34h]
call	sub_732F90
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	ebx, eax
mov	eax, [edx+3Ch]
push	esi
call	eax
mov	edi, eax
mov	[esp+9Ch+var_84], offset off_155F500
push	edi
lea	ecx, [esp+0A0h+var_7C]
mov	dword ptr [esp+0A0h+var_80], 1
mov	[esp+0A0h+var_84], offset off_1437650
call	sub_67AC80
push	edi
lea	ecx, [esp+0A0h+var_74]
call	sub_67AC80
xor	edi, edi
xor	ecx, ecx
xor	edx, edx
xor	eax, eax
mov	[esp+9Ch+var_6C], edi
mov	[esp+9Ch+var_68], edi
mov	dword ptr [esp+9Ch+var_64], 0FF000000h
mov	word ptr [esp+9Ch+var_60], cx
mov	word ptr [esp+9Ch+var_60+2], dx
mov	[esp+9Ch+var_5C], cl
mov	[esp+9Ch+var_5A], ax
cmp	ebp, edi
jz	short loc_6C815D
push	ebp
lea	ecx, [esp+0A0h+var_58]
push	ecx
lea	ecx, [esp+0A4h+var_84]
call	sub_7013B0
push	eax
lea	ecx, [esp+0A0h+var_84]
call	sub_6C7EC0
lea	ecx, [esp+9Ch+var_58]
call	sub_694380

loc_6C815D:
cmp	ebx, edi
jz	short loc_6C8183
push	ebx
lea	edx, [esp+0A0h+var_2C]
push	edx
lea	ecx, [esp+0A4h+var_84]
call	sub_7013B0
push	eax
lea	ecx, [esp+0A0h+var_84]
call	sub_6C7EC0
lea	ecx, [esp+9Ch+var_2C]
call	sub_694380

loc_6C8183:
mov	eax, [esi+0ECh]
mov	ecx, [eax+4]
mov	edx, [esp+9Ch+var_8C]
mov	ebx, [ecx+edx]
mov	edi, [ecx+edx+4]
lea	eax, [ecx+edx]
mov	ecx, [esi+0BCh]
add	edi, ebx
push	edi
push	ebx
lea	eax, [esp+0A4h+var_84]
push	eax
call	sub_71E2D0
mov	edx, [esi+0ECh]
mov	ecx, [esi+0BCh]
mov	ebp, [edx+4]
mov	ecx, [ecx+8]
add	ebp, [esp+9Ch+var_8C]
push	edi
push	ebx
call	sub_72E2D0
mov	ecx, [ebp+8]
mov	edi, eax
test	ecx, ecx
jz	short loc_6C81D9
call	sub_64A400

loc_6C81D9:
lea	ecx, [esp+9Ch+var_84]
mov	[ebp+8], edi
call	sub_694380

loc_6C81E5:
add	[esp+9Ch+var_8C], 14h
sub	[esp+9Ch+var_88], 1
jnz	loc_6C8091
pop	edi
pop	ebp
pop	ebx

loc_6C81F8:
pop	esi
add	esp, 8Ch
retn
sub_6C8060 endp




sub_6C8200 proc	near

var_58=	byte ptr -58h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 58h
push	edi
mov	edi, ecx
mov	eax, [edi+0ECh]
test	eax, eax
jz	loc_6C85C3
cmp	dword ptr [eax], 0
jz	loc_6C85C3
mov	ecx, [esp+5Ch+arg_0]
push	ebx
xor	ebx, ebx
cmp	ecx, 3		; switch 4 cases
ja	loc_6C85C2	; default
push	ebp
push	esi
jmp	ds:off_6C85CC[ecx*4] ; switch jump

loc_6C8236:		; jumptable 006C822F case 0
mov	ebx, [esp+68h+arg_4]
cmp	dword ptr [eax+ebx*8+10h], 0
jbe	short loc_6C8279
cmp	byte ptr [eax+ebx*8+15h], 0
jnz	loc_6C85C0
mov	byte ptr [eax+ebx*8+15h], 1
mov	eax, [edi+0ECh]
mov	ecx, [eax+ebx*8+10h]
mov	edx, [eax+4]
lea	ecx, [ecx+ecx*4]
cmp	dword ptr [edx+ecx*4-8], 0
lea	esi, [edx+ecx*4-14h]
jbe	short loc_6C82D4
inc	dword ptr [esi+0Ch]
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 58h
retn	0Ch

loc_6C8279:
mov	ecx, [eax+8]
xor	ebp, ebp
mov	[esp+68h+arg_4], ecx
test	ecx, ecx
jbe	loc_6C85C0
mov	esi, [eax+4]
lea	ecx, [ecx+0]

loc_6C8290:
mov	eax, [esp+68h+arg_8]
push	eax
mov	ecx, esi
call	sub_6C43D0
test	al, al
jnz	short loc_6C82B4
inc	ebp
add	esi, 14h
cmp	ebp, [esp+68h+arg_4]
jb	short loc_6C8290
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 58h
retn	0Ch

loc_6C82B4:
mov	eax, [edi+0ECh]
mov	edx, [eax+4]
lea	ecx, [ebp+ebp*4+0]
inc	ebp
mov	[eax+ebx*8+10h], ebp
mov	eax, [edi+0ECh]
lea	esi, [edx+ecx*4]
mov	byte ptr [eax+ebx*8+15h], 1

loc_6C82D4:
test	esi, esi
jz	loc_6C85C0
mov	eax, [esi+0Ch]
lea	ecx, [eax+1]
mov	[esi+0Ch], ecx
test	eax, eax
jnz	loc_6C85C0
jmp	loc_6C8474

loc_6C82F2:		; jumptable 006C822F case 1
mov	ecx, [esp+68h+arg_4]
cmp	[eax+ecx*8+10h], ebx
jbe	loc_6C85C0
cmp	[eax+ecx*8+15h], bl
jz	loc_6C85C0
mov	edx, eax
mov	[edx+ecx*8+15h], bl
mov	edx, [edi+0ECh]
mov	eax, [edx+ecx*8+10h]
dec	eax
cmp	[edx+ecx*8+14h], bl
jnz	short loc_6C8325
mov	[edx+ecx*8+10h], ebx

loc_6C8325:
mov	ecx, [edi+0ECh]
mov	edx, [ecx+4]
lea	eax, [eax+eax*4]
cmp	[edx+eax*4+0Ch], ebx
lea	esi, [edx+eax*4]
jbe	loc_6C8479
dec	dword ptr [esi+0Ch]
cmp	[esi+0Ch], ebx
jnz	loc_6C85C0
cmp	[esi+10h], ebx
jbe	loc_6C8479
mov	ebx, offset aAHover ; "a:hover"
jmp	loc_6C8479

loc_6C835D:		; jumptable 006C822F case 2
mov	ebx, [esp+68h+arg_4]
cmp	dword ptr [eax+ebx*8+10h], 0
jbe	short loc_6C83A0
cmp	byte ptr [eax+ebx*8+14h], 0
jnz	loc_6C85C0
mov	byte ptr [eax+ebx*8+14h], 1
mov	eax, [edi+0ECh]
mov	ecx, [eax+ebx*8+10h]
mov	edx, [eax+4]
lea	ecx, [ecx+ecx*4]
cmp	dword ptr [edx+ecx*4-4], 0
lea	esi, [edx+ecx*4-14h]
jbe	short loc_6C83F8
inc	dword ptr [esi+10h]
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 58h
retn	0Ch

loc_6C83A0:
mov	ecx, [eax+8]
xor	ebp, ebp
mov	[esp+68h+arg_4], ecx
test	ecx, ecx
jbe	loc_6C85C0
mov	esi, [eax+4]

loc_6C83B4:
mov	eax, [esp+68h+arg_8]
push	eax
mov	ecx, esi
call	sub_6C43D0
test	al, al
jnz	short loc_6C83D8
inc	ebp
add	esi, 14h
cmp	ebp, [esp+68h+arg_4]
jb	short loc_6C83B4
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 58h
retn	0Ch

loc_6C83D8:
mov	eax, [edi+0ECh]
mov	edx, [eax+4]
lea	ecx, [ebp+ebp*4+0]
inc	ebp
mov	[eax+ebx*8+10h], ebp
mov	eax, [edi+0ECh]
lea	esi, [edx+ecx*4]
mov	byte ptr [eax+ebx*8+14h], 1

loc_6C83F8:
test	esi, esi
jz	loc_6C85C0
cmp	dword ptr [esi+0Ch], 0
jnz	loc_6C85C0
mov	eax, [esi+10h]
lea	ecx, [eax+1]
mov	[esi+10h], ecx
test	eax, eax
jnz	loc_6C85C0
mov	ebx, offset aAHover ; "a:hover"
jmp	short loc_6C8479

loc_6C8422:		; jumptable 006C822F case 3
mov	ecx, [esp+68h+arg_4]
cmp	[eax+ecx*8+10h], ebx
jbe	loc_6C85C0
cmp	[eax+ecx*8+14h], bl
jz	loc_6C85C0
mov	edx, eax
mov	[edx+ecx*8+14h], bl
mov	eax, [edi+0ECh]
mov	edx, [eax+ecx*8+10h]
mov	esi, [eax+4]
lea	edx, [edx+edx*4]
lea	esi, [esi+edx*4-14h]
cmp	[eax+ecx*8+15h], bl
jnz	short loc_6C845E
mov	[eax+ecx*8+10h], ebx

loc_6C845E:
cmp	[esi+10h], ebx
jbe	short loc_6C8479
dec	dword ptr [esi+10h]
cmp	[esi+10h], ebx
jnz	loc_6C85C0
cmp	[esi+0Ch], ebx
jbe	short loc_6C8479

loc_6C8474:		; "a:active"
mov	ebx, offset aAActive

loc_6C8479:
cmp	dword ptr [esi+8], 0
jz	short loc_6C84B5
mov	ebp, [esi]
mov	eax, [esi+4]
mov	ecx, [edi+0BCh]
add	eax, ebp
cmp	eax, ebp
jb	short loc_6C8494
sub	eax, ebp
jmp	short loc_6C8496

loc_6C8494:
xor	eax, eax

loc_6C8496:
mov	ecx, [ecx+8]
push	eax
push	ebp
call	sub_72C640
mov	ecx, [esi+8]
mov	edx, [edi+0BCh]
push	0FFFFFFFFh
push	ebp
push	ecx
mov	ecx, [edx+8]
call	sub_72BC90

loc_6C84B5:
test	ebx, ebx
jz	loc_6C85C0
mov	eax, [edi+0ECh]
mov	eax, [eax]
push	0FFFFFFFFh
push	ebx
push	0
lea	ecx, [eax+34h]
call	sub_732F90
mov	[esp+68h+arg_4], eax
test	eax, eax
jz	loc_6C85C0
mov	ecx, [edi+0ECh]
mov	eax, [ecx]
push	0FFFFFFFFh
push	offset aA_2	; "a"
push	0
lea	ecx, [eax+34h]
call	sub_732F90
mov	edx, [edi+0ECh]
push	0FFFFFFFFh
mov	ebx, eax
mov	eax, [edx]
push	offset aALink	; "a:link"
push	0
lea	ecx, [eax+34h]
call	sub_732F90
mov	ecx, dword_1855FC0
mov	ebp, eax
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	edi
call	edx
push	eax
lea	ecx, [esp+6Ch+var_58]
call	sub_694320
test	ebx, ebx
jz	short loc_6C8552
push	ebx
lea	eax, [esp+6Ch+var_2C]
push	eax
lea	ecx, [esp+70h+var_58]
call	sub_7013B0
push	eax
lea	ecx, [esp+6Ch+var_58]
call	sub_6C7EC0
lea	ecx, [esp+68h+var_2C]
call	sub_694380

loc_6C8552:
test	ebp, ebp
jz	short loc_6C8578
push	ebp
lea	ecx, [esp+6Ch+var_2C]
push	ecx
lea	ecx, [esp+70h+var_58]
call	sub_7013B0
push	eax
lea	ecx, [esp+6Ch+var_58]
call	sub_6C7EC0
lea	ecx, [esp+68h+var_2C]
call	sub_694380

loc_6C8578:
mov	edx, [esp+68h+arg_4]
push	edx
lea	eax, [esp+6Ch+var_2C]
push	eax
lea	ecx, [esp+70h+var_58]
call	sub_7013B0
push	eax
lea	ecx, [esp+6Ch+var_58]
call	sub_6C7EC0
lea	ecx, [esp+68h+var_2C]
call	sub_694380
mov	eax, [esi]
mov	ecx, [esi+4]
add	ecx, eax
push	ecx
mov	ecx, [edi+0BCh]
push	eax
lea	edx, [esp+70h+var_58]
push	edx
call	sub_71E2D0
lea	ecx, [esp+68h+var_58]
call	sub_694380

loc_6C85C0:
pop	esi
pop	ebp

loc_6C85C2:		; default
pop	ebx

loc_6C85C3:
pop	edi
add	esp, 58h
retn	0Ch
sub_6C8200 endp

align 4
off_6C85CC dd offset loc_6C8236	; jump table for switch	statement
dd offset loc_6C82F2
dd offset loc_6C835D
dd offset loc_6C8422
align 10h



sub_6C85E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+4]
inc	eax
push	eax
call	sub_6C76E0
mov	eax, [edi+4]
mov	esi, [esp+8+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_6C8619
mov	ecx, [edi]
sub	eax, esi
dec	eax
mov	edx, esi
shl	edx, 4
shl	eax, 4
add	ecx, edx
push	eax
push	ecx
add	ecx, 10h
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_6C8619:
shl	esi, 4
add	esi, [edi]
jz	short loc_6C863A
mov	eax, [esp+8+arg_4]
mov	edx, [eax]
mov	[esi], edx
mov	ecx, [eax+4]
mov	[esi+4], ecx
mov	edx, [eax+8]
mov	[esi+8], edx
mov	eax, [eax+0Ch]
mov	[esi+0Ch], eax

loc_6C863A:
pop	edi
pop	esi
retn	8
sub_6C85E0 endp

align 10h



sub_6C8640 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
test	eax, eax
jz	short loc_6C866B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+58h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6C866B:
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_6C8685
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6C8685
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6C8685:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+38h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6C8640 endp

align 10h



sub_6C86A0 proc	near

var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= word ptr -108h
var_104= word ptr -104h
var_102= word ptr -102h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	word ptr -0F4h
var_F0=	word ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	byte ptr -0E8h
var_E6=	dword ptr -0E6h
var_E2=	word ptr -0E2h
var_E0=	byte ptr -0E0h
var_B4=	dword ptr -0B4h
var_9C=	dword ptr -9Ch
var_84=	byte ptr -84h
var_58=	byte ptr -58h
var_2C=	byte ptr -2Ch

sub	esp, 110h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	edi
push	esi
call	edx
push	eax
lea	ecx, [esp+124h+var_E0]
call	sub_694320
xor	ecx, ecx
mov	[esp+120h+var_110], offset off_155F500
xor	eax, eax
mov	[esp+120h+var_102], cx
xor	edx, edx
mov	word ptr [esp+120h+var_FC], cx
mov	ecx, [esi+0B8h]
mov	[esp+120h+var_104], ax
mov	word ptr [esp+120h+var_100], dx
mov	word ptr [esp+120h+var_100+2], ax
mov	eax, [esi+0BCh]
mov	word ptr [esp+120h+var_FC+2], dx
mov	[esp+120h+var_10C], 1
mov	dword ptr [esp+120h+var_108], 0
mov	ebx, offset off_143AB58
mov	[esp+120h+var_110], ebx
mov	dx, [ecx+50h]
mov	eax, [eax+8]
mov	edi, [eax+1Ch]
mov	ebp, [eax+18h]
shr	dx, 0Bh
test	dl, 1
jnz	loc_6C87B8
lea	eax, [esp+120h+var_110]
push	eax
lea	ecx, [esp+124h+var_E0]
push	ecx
mov	ecx, esi
call	sub_6C7AF0
test	edi, edi
jz	short loc_6C876E
lea	edx, [esp+120h+var_E0]
push	edx
lea	eax, [esp+124h+var_58]
push	eax
mov	ecx, edi
call	sub_7013B0
push	eax
lea	ecx, [esp+124h+var_E0]
call	sub_6C7EC0
lea	ecx, [esp+120h+var_58]
call	sub_694380

loc_6C876E:
test	ebp, ebp
jz	loc_6C88C8
lea	ecx, [esp+120h+var_110]
push	ecx
lea	edx, [esp+124h+var_9C]
push	edx
mov	ecx, ebp
call	sub_700920
push	eax
lea	ecx, [esp+124h+var_110]
call	sub_700370
lea	ecx, [esp+120h+var_9C]
mov	[esp+120h+var_9C], ebx
call	sub_6FFB90
lea	ecx, [esp+120h+var_9C]
call	sub_64A3F0
jmp	loc_6C88C8

loc_6C87B8:
test	edi, edi
jz	short loc_6C87C6
push	edi
lea	ecx, [esp+124h+var_E0]
call	sub_6C7EC0

loc_6C87C6:
test	ebp, ebp
jz	short loc_6C87D4
push	ebp
lea	ecx, [esp+124h+var_110]
call	sub_700370

loc_6C87D4:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
push	eax
lea	ecx, [esp+124h+var_84]
call	sub_694320
xor	ecx, ecx
xor	eax, eax
xor	edx, edx
mov	[esp+120h+var_F8], offset off_155F500
mov	word ptr [esp+120h+var_EC+2], cx
mov	word ptr [esp+120h+var_E6+2], cx
lea	ecx, [esp+120h+var_84]
mov	dword ptr [esp+120h+var_F4], 1
mov	[esp+120h+var_F8], ebx
mov	dword ptr [esp+120h+var_F0], 0
mov	word ptr [esp+120h+var_EC], ax
mov	word ptr [esp+120h+var_E8], dx
mov	word ptr [esp+120h+var_E6], ax
mov	[esp+120h+var_E2], dx
call	sub_701BF0
lea	ecx, [esp+120h+var_F8]
call	sub_700260
lea	eax, [esp+120h+var_E0]
push	eax
lea	ecx, [esp+124h+var_2C]
push	ecx
lea	ecx, [esp+128h+var_84]
call	sub_7013B0
push	eax
lea	ecx, [esp+124h+var_E0]
call	sub_6C7EC0
lea	ecx, [esp+120h+var_2C]
call	sub_694380
lea	edx, [esp+120h+var_110]
push	edx
lea	eax, [esp+124h+var_B4]
push	eax
lea	ecx, [esp+128h+var_F8]
call	sub_700920
push	eax
lea	ecx, [esp+124h+var_110]
call	sub_700370
lea	ecx, [esp+120h+var_B4]
mov	[esp+120h+var_B4], ebx
call	sub_6FFB90
lea	ecx, [esp+120h+var_B4]
call	sub_64A3F0
lea	ecx, [esp+120h+var_F8]
mov	[esp+120h+var_F8], ebx
call	sub_6FFB90
lea	ecx, [esp+120h+var_F8]
call	sub_64A3F0
lea	ecx, [esp+120h+var_84]
call	sub_694380

loc_6C88C8:
mov	edx, [esi+0BCh]
lea	ecx, [esp+120h+var_E0]
push	ecx
mov	ecx, [edx+8]
call	sub_729AF0
mov	ecx, [esi+0BCh]
mov	ecx, [ecx+8]
lea	eax, [esp+120h+var_110]
push	eax
call	sub_729BD0
lea	ecx, [esp+120h+var_110]
mov	[esp+120h+var_110], ebx
call	sub_6FFB90
lea	ecx, [esp+120h+var_110]
call	sub_64A3F0
lea	ecx, [esp+120h+var_E0]
call	sub_694380
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 110h
retn
sub_6C86A0 endp

align 10h



sub_6C8920 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+110h], 0
jz	short loc_6C8970
mov	eax, [esp+4+arg_0]
push	eax
lea	ecx, [esp+8+arg_0]
call	sub_67AE10
lea	ecx, [esp+4+arg_0]
push	ecx
mov	ecx, [esi+110h]
call	sub_6C7840
mov	esi, [esp+4+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C8970
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C8970:
pop	esi
retn	4
sub_6C8920 endp

align 10h



sub_6C8980 proc	near

var_4C=	qword ptr -4Ch
var_44=	byte ptr -44h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4

sub	esp, 4Ch
push	esi
mov	esi, [esp+50h+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C8BBE
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C8BBE
mov	eax, [esi+8]
push	ebp
test	eax, eax
jz	short loc_6C89B2
lea	ebp, [eax-78h]
jmp	short loc_6C89B4

loc_6C89B2:
xor	ebp, ebp

loc_6C89B4:
push	ebx
push	edi
xor	ebx, ebx
or	edi, 0FFFFFFFFh
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6C8A16
mov	eax, [esi+18h]
push	eax
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fldz
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6C89E3
fstp	st(1)
jmp	short loc_6C89F0

loc_6C89E3:
fld	st(1)
fxch	st(2)
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_6C8A14

loc_6C89F0:
fnstcw	word ptr [esp+5Ch+arg_0]
movzx	eax, word ptr [esp+5Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+5Ch+var_4C], eax
fldcw	word ptr [esp+5Ch+var_4C]
fistp	[esp+5Ch+var_4C]
mov	ebx, dword ptr [esp+5Ch+var_4C]
fldcw	word ptr [esp+5Ch+arg_0]
jmp	short loc_6C8A16

loc_6C8A14:
fstp	st

loc_6C8A16:
mov	eax, [esi+1Ch]
cmp	eax, 2
jl	short loc_6C8A76
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fldz
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6C8A41
fstp	st(1)
jmp	short loc_6C8A52

loc_6C8A41:
fld	st(1)
fxch	st(2)
fcompp
fnstsw	ax
test	ah, 1
jnz	loc_6C8AD5

loc_6C8A52:
fnstcw	word ptr [esp+5Ch+arg_0]
movzx	eax, word ptr [esp+5Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+5Ch+var_4C], eax
fldcw	word ptr [esp+5Ch+var_4C]
fistp	[esp+5Ch+var_4C]
mov	edi, dword ptr [esp+5Ch+var_4C]
fldcw	word ptr [esp+5Ch+arg_0]
jmp	short loc_6C8AD7

loc_6C8A76:
cmp	eax, 1
jl	short loc_6C8AD7
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fadd	ds:dbl_15FCC40
fldz
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6C8AA4
fstp	st(1)
jmp	short loc_6C8AB1

loc_6C8AA4:
fld	st(1)
fxch	st(2)
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_6C8AD5

loc_6C8AB1:
fnstcw	word ptr [esp+5Ch+arg_0]
movzx	eax, word ptr [esp+5Ch+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+5Ch+var_4C], eax
fldcw	word ptr [esp+5Ch+var_4C]
fistp	[esp+5Ch+var_4C]
mov	edi, dword ptr [esp+5Ch+var_4C]
fldcw	word ptr [esp+5Ch+arg_0]
jmp	short loc_6C8AD7

loc_6C8AD5:
fstp	st

loc_6C8AD7:
cmp	ebx, edi
ja	loc_6C8BA9
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	edx, [ecx+294h]
push	edx
lea	ecx, [esp+60h+var_2C]
call	sub_694320
lea	ecx, [esp+5Ch+var_44]
call	sub_6C6310
mov	edx, [ebp+0BCh]
push	edi
push	ebx
lea	eax, [esp+64h+var_44]
push	eax
lea	ecx, [esp+68h+var_2C]
push	ecx
mov	ecx, [edx+8]
call	sub_7288D0
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	78h
call	eax
test	eax, eax
jz	short loc_6C8B42
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6D6750
mov	edi, eax
jmp	short loc_6C8B44

loc_6C8B42:
xor	edi, edi

loc_6C8B44:
mov	eax, [esi+18h]
lea	edx, [esp+5Ch+var_2C]
push	edx
add	eax, 78h
push	eax
mov	ecx, edi
call	sub_6D6B90
mov	edx, [esi+18h]
lea	ecx, [esp+5Ch+var_44]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6D6FD0
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6C8B7E
mov	ecx, edi
call	sub_64B3B0

loc_6C8B7E:
lea	ecx, [esp+5Ch+var_44]
mov	dword ptr [esp+5Ch+var_44], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+5Ch+var_44]
call	sub_64A3F0
lea	ecx, [esp+5Ch+var_2C]
call	sub_694380
pop	edi
pop	ebx
pop	ebp
pop	esi
add	esp, 4Ch
retn

loc_6C8BA9:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	edi
pop	ebx
pop	ebp
mov	byte ptr [esi],	0
pop	esi
add	esp, 4Ch
retn

loc_6C8BBE:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
add	esp, 4Ch
retn
sub_6C8980 endp




sub_6C8BD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C8C7C
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C8C7C
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6C8BFE
add	eax, 0FFFFFF88h
jmp	short loc_6C8C00

loc_6C8BFE:
xor	eax, eax

loc_6C8C00:
mov	ecx, [esi+18h]
mov	eax, [eax+0BCh]
mov	eax, [eax+8]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
push	ebx
mov	ebx, [eax+1Ch]
push	ebp
mov	ebp, [eax+18h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	0
push	78h
call	edx
test	eax, eax
jz	short loc_6C8C3C
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6D6750
mov	edi, eax
jmp	short loc_6C8C3E

loc_6C8C3C:
xor	edi, edi

loc_6C8C3E:
test	ebx, ebx
jz	short loc_6C8C51
mov	edx, [esi+18h]
push	ebx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6D6B90

loc_6C8C51:
test	ebp, ebp
jz	short loc_6C8C64
mov	eax, [esi+18h]
push	ebp
add	eax, 78h
push	eax
mov	ecx, edi
call	sub_6D6FD0

loc_6C8C64:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6C8C8B
mov	ecx, edi
pop	edi
pop	ebp
pop	ebx
pop	esi
jmp	sub_64B3B0

loc_6C8C7C:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
retn

loc_6C8C8B:
pop	edi
pop	ebp
pop	ebx
pop	esi
retn
sub_6C8BD0 endp




sub_6C8C90 proc	near

var_38=	qword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 38h
push	esi
mov	esi, [esp+3Ch+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C8DCD
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C8DCD
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C8CC2
lea	edi, [eax-78h]
jmp	short loc_6C8CC4

loc_6C8CC2:
xor	edi, edi

loc_6C8CC4:
cmp	dword ptr [esi+1Ch], 1
jl	loc_6C8DCC
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+40h+arg_0]
movzx	eax, word ptr [esp+40h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+40h+var_38], eax
mov	ecx, [edi+0BCh]
lea	edx, [esp+40h+var_30]
fldcw	word ptr [esp+40h+var_38]
fistp	[esp+40h+var_38]
mov	eax, dword ptr [esp+40h+var_38]
push	eax
push	edx
fldcw	word ptr [esp+48h+arg_0]
fldz
fst	[esp+48h+var_30]
fstp	[esp+48h+var_2C]
fldz
fadd	st, st
fstp	[esp+48h+arg_0]
fld	[esp+48h+arg_0]
fst	[esp+48h+var_28]
fstp	[esp+48h+var_24]
call	sub_724E70
test	al, al
jz	loc_6C8DBF
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6C8D65
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E4FC0
mov	edi, eax
jmp	short loc_6C8D67

loc_6C8D65:
xor	edi, edi

loc_6C8D67:
fld	[esp+40h+var_30]
mov	eax, [esi+18h]
fld	ds:dbl_15FCE20
lea	edx, [esp+40h+var_20]
fdiv	st(1), st
push	edx
push	eax
mov	ecx, edi
fxch	st(1)
fstp	[esp+48h+var_20]
fld	[esp+48h+var_2C]
fdiv	st, st(1)
fstp	[esp+48h+var_18]
fld	[esp+48h+var_28]
fdiv	st, st(1)
fstp	[esp+48h+var_10]
fdivr	[esp+48h+var_24]
fstp	[esp+48h+var_8]
call	sub_6E39C0
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6C8DCC
mov	ecx, edi
call	sub_64B3B0
pop	edi
pop	esi
add	esp, 38h
retn

loc_6C8DBF:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1

loc_6C8DCC:
pop	edi

loc_6C8DCD:
pop	esi
add	esp, 38h
retn
sub_6C8C90 endp

align 10h



sub_6C8DE0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 30h
push	esi
mov	esi, [esp+34h+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6C8EFB
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C8EFB
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C8E12
lea	edi, [eax-78h]
jmp	short loc_6C8E14

loc_6C8E12:
xor	edi, edi

loc_6C8E14:
cmp	dword ptr [esi+1Ch], 1
jl	loc_6C8EFA
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
fldz
mov	ecx, [edi+0BCh]
fst	[esp+38h+var_30]
fstp	[esp+38h+var_2C]
push	eax
fldz
lea	edx, [esp+3Ch+var_30]
fadd	st, st
push	edx
fstp	[esp+40h+arg_0]
fld	[esp+40h+arg_0]
fst	[esp+40h+var_28]
fstp	[esp+40h+var_24]
call	sub_7250A0
test	al, al
jz	loc_6C8EED
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6C8E93
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E4FC0
mov	edi, eax
jmp	short loc_6C8E95

loc_6C8E93:
xor	edi, edi

loc_6C8E95:
fld	[esp+38h+var_30]
mov	eax, [esi+18h]
fld	ds:dbl_15FCE20
lea	edx, [esp+38h+var_20]
fdiv	st(1), st
push	edx
push	eax
mov	ecx, edi
fxch	st(1)
fstp	[esp+40h+var_20]
fld	[esp+40h+var_2C]
fdiv	st, st(1)
fstp	[esp+40h+var_18]
fld	[esp+40h+var_28]
fdiv	st, st(1)
fstp	[esp+40h+var_10]
fdivr	[esp+40h+var_24]
fstp	[esp+40h+var_8]
call	sub_6E39C0
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6C8EFA
mov	ecx, edi
call	sub_64B3B0
pop	edi
pop	esi
add	esp, 30h
retn

loc_6C8EED:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1

loc_6C8EFA:
pop	edi

loc_6C8EFB:
pop	esi
add	esp, 30h
retn
sub_6C8DE0 endp

aGVlt0g	db 'ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌƒì(V‹t$0ƒ~',8,0
jz	loc_6C9137
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6C9137
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6C8F42
lea	edi, [eax-78h]
jmp	short loc_6C8F44

loc_6C8F42:
xor	edi, edi

loc_6C8F44:
cmp	dword ptr [esi+1Ch], 1
jl	loc_6C9136
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
test	eax, eax
jl	loc_6C913C
mov	ecx, [edi+0BCh]
lea	edx, [esp+18h]
push	edx
push	eax
call	sub_724D40
test	al, al
jz	loc_6C913C
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6C8FAE
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	ebp, eax
jmp	short loc_6C8FB0

loc_6C8FAE:
xor	ebp, ebp

loc_6C8FB0:
mov	edx, [esp+24h]
fild	dword ptr [esp+24h]
push	ebx
mov	bl, 3
mov	[esp+10h], bl
test	edx, edx
jge	short loc_6C8FC9
fadd	ds:dbl_15FCE08

loc_6C8FC9:
fdiv	ds:dbl_15FCE20
mov	ecx, [esi+18h]
lea	eax, [esp+10h]
push	eax
add	ecx, 78h
push	offset aAscent	; "ascent"
lea	edi, [ebp+10h]
push	ecx
mov	ecx, edi
fstp	qword ptr [esp+20h]
call	sub_669260
lea	ecx, [esp+10h]
call	sub_652830
fild	dword ptr [esp+2Ch]
mov	edx, [esp+2Ch]
mov	[esp+10h], bl
test	edx, edx
jge	short loc_6C900D
fadd	ds:dbl_15FCE08

loc_6C900D:
fdiv	ds:dbl_15FCE20
mov	ecx, [esi+18h]
lea	eax, [esp+10h]
push	eax
add	ecx, 78h
push	offset aDescent	; "descent"
push	ecx
mov	ecx, edi
fstp	qword ptr [esp+20h]
call	sub_669260
lea	ecx, [esp+10h]
call	sub_652830
fild	dword ptr [esp+20h]
mov	edx, [esp+20h]
mov	[esp+10h], bl
test	edx, edx
jge	short loc_6C904E
fadd	ds:dbl_15FCE08

loc_6C904E:
fdiv	ds:dbl_15FCE20
mov	ecx, [esi+18h]
lea	eax, [esp+10h]
push	eax
add	ecx, 78h
push	offset aWidth	; "width"
push	ecx
mov	ecx, edi
fstp	qword ptr [esp+20h]
call	sub_669260
lea	ecx, [esp+10h]
call	sub_652830
fild	dword ptr [esp+24h]
mov	edx, [esp+24h]
mov	[esp+10h], bl
test	edx, edx
jge	short loc_6C908F
fadd	ds:dbl_15FCE08

loc_6C908F:
fdiv	ds:dbl_15FCE20
mov	ecx, [esi+18h]
lea	eax, [esp+10h]
push	eax
add	ecx, 78h
push	offset aHeight	; "height"
push	ecx
mov	ecx, edi
fstp	qword ptr [esp+20h]
call	sub_669260
lea	ecx, [esp+10h]
call	sub_652830
fild	dword ptr [esp+34h]
mov	eax, [esi+18h]
lea	edx, [esp+10h]
fdiv	ds:dbl_15FCE20
push	edx
push	offset aLeading	; "leading"
add	eax, 78h
push	eax
mov	ecx, edi
mov	[esp+1Ch], bl
fstp	qword ptr [esp+20h]
call	sub_669260
lea	ecx, [esp+10h]
call	sub_652830
fild	dword ptr [esp+30h]
mov	edx, [esi+18h]
lea	ecx, [esp+10h]
fdiv	ds:dbl_15FCE20
push	ecx
push	offset asc_156C750 ; "x"
add	edx, 78h
push	edx
mov	ecx, edi
mov	[esp+1Ch], bl
fstp	qword ptr [esp+20h]
call	sub_669260
lea	ecx, [esp+10h]
call	sub_652830
mov	ecx, [esi+4]
push	ebp
call	sub_652E40
pop	ebx
test	ebp, ebp
jz	short loc_6C9135
mov	ecx, ebp
call	sub_64B3B0

loc_6C9135:
pop	ebp

loc_6C9136:
pop	edi

loc_6C9137:
pop	esi
add	esp, 28h
retn

loc_6C913C:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	0
pop	esi
add	esp, 28h
retn
align 10h



sub_6C9150 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	qword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	qword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 50h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+70h]
push	edi
mov	[esp+5Ch+var_20], esi
call	edx
mov	edi, eax
mov	eax, [esp+5Ch+arg_0]
mov	ebx, [eax+4]
mov	dword ptr [esp+5Ch+var_44], edi
test	ebx, ebx
jbe	loc_6C95CC
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_6C918F
or	dword ptr [eax+2474h], 400h

loc_6C918F:
test	ebx, ebx
jbe	loc_6C95CC
mov	dword ptr [esp+5Ch+var_44+4], 0
mov	[esp+5Ch+var_38], ebx
push	ebp

loc_6C91A4:
mov	ecx, [esp+60h+arg_0]
mov	ebp, [ecx]
mov	ecx, [edi+74h]
add	ebp, dword ptr [esp+60h+var_44+4]
xor	ebx, ebx
mov	[esp+60h+var_18], ebx
mov	[esp+60h+var_14], ebx
mov	edx, [ecx]
mov	eax, [edx+5Ch]
call	eax
mov	esi, eax
mov	[esp+60h+var_48], esi
cmp	esi, ebx
jz	loc_6C95AE
mov	ecx, esi
call	sub_64A420
mov	byte ptr [esp+60h+var_50], bl
lea	ebx, [ebp+4]
mov	ecx, ebx
call	sub_679930
test	eax, eax
jbe	loc_6C932B
mov	ecx, [ebx]
and	ecx, 0FFFFFFFCh
mov	al, [ecx+8]
cmp	al, 69h
jz	short loc_6C9201
cmp	al, 49h
jnz	loc_6C932B

loc_6C9201:
lea	edx, [esp+60h+var_4C]
push	edx
mov	ecx, ebx
call	sub_67B250
push	6
push	0
lea	eax, [esp+68h+var_34]
push	eax
lea	ecx, [esp+6Ch+var_4C]
call	sub_67B0C0
mov	eax, [eax]
and	eax, 0FFFFFFFCh
mov	ecx, offset aImg ; "img://"
add	eax, 8
lea	esp, [esp+0]

loc_6C9230:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C9250
test	dl, dl
jz	short loc_6C924C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C9250
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C9230

loc_6C924C:
xor	eax, eax
jmp	short loc_6C9255

loc_6C9250:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C9255:
mov	esi, [esp+60h+var_34]
mov	edi, ds:InterlockedExchangeAdd
test	eax, eax
setz	bl
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C9282
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C9282:
test	bl, bl
jnz	short loc_6C92F5
push	8
push	0
lea	ecx, [esp+68h+var_30]
push	ecx
lea	ecx, [esp+6Ch+var_4C]
call	sub_67B0C0
mov	eax, [eax]
and	eax, 0FFFFFFFCh
mov	ecx, offset aImgps ; "imgps://"
add	eax, 8

loc_6C92A5:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6C92C5
test	dl, dl
jz	short loc_6C92C1
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6C92C5
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6C92A5

loc_6C92C1:
xor	eax, eax
jmp	short loc_6C92CA

loc_6C92C5:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6C92CA:
mov	esi, [esp+60h+var_30]
test	eax, eax
setz	bl
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C92F1
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6C92F1:
test	bl, bl
jz	short loc_6C92FA

loc_6C92F5:
mov	byte ptr [esp+60h+var_50], 1

loc_6C92FA:
mov	esi, [esp+60h+var_4C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6C931C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C931C:
cmp	byte ptr [esp+60h+var_50], 0
mov	esi, [esp+60h+var_48]
mov	edi, dword ptr [esp+60h+var_44]
jnz	short loc_6C938A

loc_6C932B:
lea	ebx, [ebp+4]
push	ebx
lea	ecx, [esp+64h+var_18]
push	ecx
push	esi
mov	ecx, edi
call	sub_668010
mov	ecx, eax
call	sub_68F5F0
test	al, al
jnz	short loc_6C9363
mov	edx, [ebx]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
push	offset aProcessimageta ; "ProcessImageTags: can't find a resource"...
push	edi
call	sub_66D3C0
add	esp, 0Ch
jmp	loc_6C95A7

loc_6C9363:
mov	ecx, [esp+60h+var_18]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
and	eax, 0FF00h
cmp	eax, 100h
jz	short loc_6C938A
mov	ecx, [esp+60h+var_18]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
jmp	loc_6C95A7

loc_6C938A:
lea	ebx, [ebp+4]
push	ebx
push	edi
call	sub_6EA840
add	esp, 8
mov	[esp+60h+var_1C], eax
test	eax, eax
jnz	short loc_6C93BB
mov	eax, [ebx]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	offset aProcessimage_0 ; "ProcessImageTags: can't load the image "...
push	edi
call	sub_66D3C0
add	esp, 0Ch
jmp	loc_6C95A7

loc_6C93BB:
mov	ecx, [edi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	ebx, [eax+34h]
mov	eax, [edx+28h]
push	0
push	7Ch
call	eax
test	eax, eax
jz	short loc_6C93E6
push	1FF8h
mov	ecx, eax
call	sub_713080
mov	esi, eax
jmp	short loc_6C93E8

loc_6C93E6:
xor	esi, esi

loc_6C93E8:
push	1
push	ebx
mov	ecx, esi
call	sub_713120
mov	edi, [ebp+0]
add	edi, 8
test	esi, esi
jz	short loc_6C9403
mov	ecx, esi
call	sub_70C940

loc_6C9403:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6C940E
call	sub_70E500

loc_6C940E:
mov	[edi], esi
mov	ecx, [ebx+0Ch]
mov	edx, [ecx]
mov	edx, [edx+14h]
lea	eax, [esp+5Ch+var_C]
push	eax
call	edx
mov	eax, [esp+60h+var_8]
sub	eax, [esp+60h+var_10]
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
mov	[esp+60h+var_3C], eax
mov	eax, [esp+60h+var_4]
fild	[esp+60h+var_3C]
sub	eax, [esp+60h+var_C]
fstp	[esp+60h+var_3C]
lea	ecx, [eax+eax*4]
fld	[esp+60h+var_3C]
mov	eax, [ebp+14h]
add	ecx, ecx
fst	[esp+60h+var_50]
add	ecx, ecx
mov	[esp+60h+var_3C], ecx
fild	[esp+60h+var_3C]
fstp	[esp+60h+var_3C]
fld	[esp+60h+var_3C]
fst	[esp+60h+var_3C]
test	eax, eax
jz	short loc_6C9480
mov	[esp+60h+var_24], eax
fild	[esp+60h+var_24]
jge	short loc_6C947C
fadd	ds:flt_15FCC08

loc_6C947C:
fstp	[esp+60h+var_50]

loc_6C9480:
mov	eax, [ebp+18h]
test	eax, eax
jz	short loc_6C949B
mov	[esp+60h+var_24], eax
fild	[esp+60h+var_24]
jge	short loc_6C9497
fadd	ds:flt_15FCC08

loc_6C9497:
fstp	[esp+60h+var_3C]

loc_6C949B:
fld	ds:dbl_15FCE20
fsubr	st, st(1)
fstp	dword ptr [esp+60h+var_2C]
fld	dword ptr [esp+60h+var_2C]
fiadd	dword ptr [ebp+1Ch]
fstp	[esp+60h+var_24]
fld	[esp+60h+var_50]
fld	st
fnstcw	word ptr [esp+60h+var_50]
movzx	eax, word ptr [esp+60h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+60h+var_2C], eax
mov	eax, [ebp+0]
fldcw	word ptr [esp+60h+var_2C]
fistp	[esp+60h+var_2C]
mov	edx, dword ptr [esp+60h+var_2C]
mov	[eax+18h], edx
mov	edx, [ebp+0]
fldcw	word ptr [esp+60h+var_50]
fld	[esp+60h+var_3C]
fld	st
fnstcw	word ptr [esp+60h+var_50]
movzx	eax, word ptr [esp+60h+var_50]
or	eax, 0C00h
mov	dword ptr [esp+60h+var_2C], eax
fldcw	word ptr [esp+60h+var_2C]
fistp	[esp+60h+var_2C]
mov	ecx, dword ptr [esp+60h+var_2C]
mov	[edx+1Ch], ecx
mov	eax, [ebp+0]
fldcw	word ptr [esp+60h+var_50]
add	eax, 20h
fld	dword ptr [eax+8]
fadd	ds:dbl_15FCC10
fstp	dword ptr [eax+8]
fld	dword ptr [eax+14h]
fsub	[esp+60h+var_24]
fstp	dword ptr [eax+14h]
mov	eax, [ebp+0]
fxch	st(1)
add	eax, 20h
fdivrp	st(3), st
fxch	st(2)
fstp	[esp+60h+var_24]
fdivp	st(1), st
fstp	dword ptr [esp+60h+var_2C]
fld	dword ptr [eax]
fld	[esp+60h+var_24]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fld	dword ptr [eax+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
fld	dword ptr [eax+0Ch]
fld	dword ptr [esp+60h+var_2C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+0Ch]
fld	st
fmul	dword ptr [eax+10h]
fstp	dword ptr [eax+10h]
fmul	dword ptr [eax+14h]
fstp	dword ptr [eax+14h]
mov	eax, [esp+60h+var_20]
mov	eax, [eax+0BCh]
or	byte ptr [eax+150h], 2
test	esi, esi
jz	short loc_6C9596
mov	ecx, esi
call	sub_70E500

loc_6C9596:
mov	ecx, [esp+60h+var_1C]
call	sub_64B3B0
mov	esi, [esp+60h+var_48]
mov	edi, dword ptr [esp+60h+var_44]

loc_6C95A7:
mov	ecx, esi
call	sub_666B00

loc_6C95AE:
mov	ecx, [esp+60h+var_18]
test	ecx, ecx
jz	short loc_6C95BB
call	sub_666B00

loc_6C95BB:
add	dword ptr [esp+60h+var_44+4], 2Ch
sub	[esp+60h+var_38], 1
jnz	loc_6C91A4
pop	ebp

loc_6C95CC:
pop	edi
pop	esi
pop	ebx
add	esp, 50h
retn	4
sub_6C9150 endp

align 10h



sub_6C95E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
push	edi
call	sub_668A00
push	eax
mov	ecx, esi
call	sub_663A90
mov	edi, [esp+0Ch+arg_4]
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_143AE9C
mov	dword ptr [ebx], offset	off_143AE48
test	edi, edi
jz	short loc_6C9616
mov	ecx, edi
call	sub_64A4A0
jmp	short loc_6C9618

loc_6C9616:
xor	eax, eax

loc_6C9618:
mov	[esi+34h], eax
mov	eax, [edi]
mov	edx, [eax+70h]
mov	ecx, edi
call	edx
mov	ecx, [edi+80h]
push	ecx
add	eax, 78h
push	eax
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	dword ptr [esi+38h], 0
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6C95E0 endp

align 10h



sub_6C9650 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
lea	edi, [ebx+78h]
push	0
push	3Ch
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6C96B3
push	ebx
mov	ecx, esi
call	sub_663BE0
mov	dword ptr [esi], offset	off_143AE9C
lea	ebx, [esi+10h]
mov	dword ptr [ebx], offset	off_143AE48
mov	dword ptr [esi+34h], 0
mov	dword ptr [esi+38h], 0
mov	ecx, [edi]
push	0Ah
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_6C96B3:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6C9650 endp

align 10h



sub_6C96C0 proc	near

var_24=	qword ptr -24h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_C]
mov	ecx, [eax]
sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
mov	[ebp+0], ecx
mov	edx, [eax+4]
mov	[ebp+4], edx
mov	ecx, [eax+8]
mov	[ebp+8], ecx
mov	dl, [eax+0Ch]
push	esi
mov	esi, [esp+1Ch+arg_4]
mov	ebx, 1
mov	[ebp+0Ch], dl
cmp	[esi+1Ch], ebx
jl	loc_6C9AD8
mov	eax, [esi+18h]
mov	ecx, [esp+1Ch+arg_8]
push	eax
push	ecx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	[esp+1Ch+arg_0], eax
test	eax, eax
jz	loc_6C9AD8
mov	edx, [eax+8]
push	edi
add	edx, ebx
and	edx, 8FFFFFFFh
mov	[eax+8], edx
lea	edi, [eax+10h]
mov	eax, [esi+18h]
push	0
mov	[esp+24h+var_10], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	9
push	offset aTextcolor ; "textColor"
call	sub_650E40
mov	[esp+20h+arg_C], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+10h]
lea	eax, [esp+20h+var_10]
push	eax
mov	eax, [esi+18h]
lea	ecx, [esp+24h+arg_C]
push	ecx
push	eax
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+1Ch+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C9781
call	sub_650DF0

loc_6C9781:
test	bl, bl
jz	short loc_6C9800
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+28h+arg_10]
push	ecx
lea	ecx, [esp+2Ch+var_C]
call	sub_652F60
push	offset aNone_0	; "none"
lea	ecx, [esp+20h+arg_10]
call	sub_67DA70
mov	bl, al
mov	eax, [esp+1Ch+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C97C1
call	sub_650DF0

loc_6C97C1:
test	bl, bl
jz	short loc_6C97CB
and	byte ptr [ebp+0Ch], 0EFh
jmp	short loc_6C9800

loc_6C97CB:
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+20h+var_C]
call	sub_653400
sub	esp, 8
fstp	[esp+24h+var_24]
call	sub_6519E0
test	al, al
jnz	short loc_6C9800
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+20h+var_C]
call	sub_653750
or	eax, 0FF000000h
or	byte ptr [ebp+0Ch], 10h
mov	[ebp+4], eax

loc_6C9800:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	0
push	0Fh
push	offset aBackgroundcolo ; "backgroundColor"
call	sub_650E40
lea	ecx, [esp+1Ch+var_C]
push	ecx
mov	[esp+20h+arg_10], eax
inc	dword ptr [eax+8]
mov	ecx, [esi+18h]
mov	eax, [edi]
lea	edx, [esp+20h+arg_10]
push	edx
mov	edx, [eax+10h]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+1Ch+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C9850
call	sub_650DF0

loc_6C9850:
test	bl, bl
jz	short loc_6C98CF
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+28h+arg_10]
push	ecx
lea	ecx, [esp+2Ch+var_C]
call	sub_652F60
push	offset aNone_0	; "none"
lea	ecx, [esp+20h+arg_10]
call	sub_67DA70
mov	bl, al
mov	eax, [esp+1Ch+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C9890
call	sub_650DF0

loc_6C9890:
test	bl, bl
jz	short loc_6C989A
and	byte ptr [ebp+0Ch], 0F7h
jmp	short loc_6C98CF

loc_6C989A:
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+20h+var_C]
call	sub_653400
sub	esp, 8
fstp	[esp+24h+var_24]
call	sub_6519E0
test	al, al
jnz	short loc_6C98CF
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+20h+var_C]
call	sub_653750
or	eax, 0FF000000h
or	byte ptr [ebp+0Ch], 8
mov	[ebp+0], eax

loc_6C98CF:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	0
push	0Eh
push	offset aUnderlinecolor ; "underlineColor"
call	sub_650E40
lea	ecx, [esp+1Ch+var_C]
push	ecx
mov	[esp+20h+arg_10], eax
inc	dword ptr [eax+8]
mov	ecx, [esi+18h]
mov	eax, [edi]
lea	edx, [esp+20h+arg_10]
push	edx
mov	edx, [eax+10h]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+1Ch+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C991F
call	sub_650DF0

loc_6C991F:
test	bl, bl
jz	short loc_6C999E
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+28h+arg_10]
push	ecx
lea	ecx, [esp+2Ch+var_C]
call	sub_652F60
push	offset aNone_0	; "none"
lea	ecx, [esp+20h+arg_10]
call	sub_67DA70
mov	bl, al
mov	eax, [esp+1Ch+arg_10]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C995F
call	sub_650DF0

loc_6C995F:
test	bl, bl
jz	short loc_6C9969
and	byte ptr [ebp+0Ch], 0DFh
jmp	short loc_6C999E

loc_6C9969:
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+20h+var_C]
call	sub_653400
sub	esp, 8
fstp	[esp+24h+var_24]
call	sub_6519E0
test	al, al
jnz	short loc_6C999E
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+20h+var_C]
call	sub_653750
or	eax, 0FF000000h
or	byte ptr [ebp+0Ch], 20h
mov	[ebp+8], eax

loc_6C999E:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	0
push	0Eh
push	offset aUnderlinestyle ; "underlineStyle"
call	sub_650E40
lea	ecx, [esp+1Ch+var_C]
push	ecx
mov	[esp+20h+arg_10], eax
inc	dword ptr [eax+8]
mov	ecx, [esi+18h]
mov	eax, [edi]
lea	edx, [esp+20h+arg_10]
push	edx
mov	edx, [eax+10h]
push	ecx
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+20h+arg_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_6C99EF
call	sub_650DF0

loc_6C99EF:
test	bl, bl
jz	loc_6C9AC6
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+28h+arg_C]
push	ecx
lea	ecx, [esp+2Ch+var_10]
call	sub_652F60
push	offset aDotted	; "dotted"
lea	ecx, [esp+20h+arg_C]
call	sub_67DA70
test	al, al
jz	short loc_6C9A30
mov	dl, [ebp+0Ch]
and	dl, 0FBh
or	dl, 3
mov	[ebp+0Ch], dl
jmp	loc_6C9AB0

loc_6C9A30:		; "single"
push	offset aSingle
lea	ecx, [esp+20h+arg_C]
call	sub_67DA70
test	al, al
jz	short loc_6C9A4E
mov	al, [ebp+0Ch]
and	al, 0F9h
or	al, 1
mov	[ebp+0Ch], al
jmp	short loc_6C9AB0

loc_6C9A4E:		; "thick"
push	offset aThick
lea	ecx, [esp+20h+arg_C]
call	sub_67DA70
test	al, al
jz	short loc_6C9A6E
mov	cl, [ebp+0Ch]
and	cl, 0FAh
or	cl, 2
mov	[ebp+0Ch], cl
jmp	short loc_6C9AB0

loc_6C9A6E:		; "ditheredSingle"
push	offset aDitheredsingle
lea	ecx, [esp+20h+arg_C]
call	sub_67DA70
test	al, al
jz	short loc_6C9A8E
mov	dl, [ebp+0Ch]
and	dl, 0FCh
or	dl, 4
mov	[ebp+0Ch], dl
jmp	short loc_6C9AB0

loc_6C9A8E:		; "ditheredThick"
push	offset aDitheredthick
lea	ecx, [esp+20h+arg_C]
call	sub_67DA70
test	al, al
jz	short loc_6C9AAC
mov	al, [ebp+0Ch]
and	al, 0FDh
or	al, 5
mov	[ebp+0Ch], al
jmp	short loc_6C9AB0

loc_6C9AAC:
and	byte ptr [ebp+0Ch], 0F8h

loc_6C9AB0:
mov	eax, [esp+1Ch+arg_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C9AC6
call	sub_650DF0

loc_6C9AC6:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
mov	ecx, [esp+1Ch+arg_0]
call	sub_64B3B0

loc_6C9AD8:
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_6C96C0 endp

align 10h



sub_6C9AF0 proc	near

var_14=	qword ptr -14h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebp
push	edi
mov	edi, [esp+18h+arg_0]
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6C9B23
mov	ecx, [edi+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	ebp, eax
jmp	short loc_6C9B25

loc_6C9B23:
xor	ebp, ebp

loc_6C9B25:
push	ebx
push	esi
mov	esi, [esp+20h+arg_4]
mov	al, [esi+0Ch]
test	al, 7
jz	loc_6C9BDD	; default
movzx	eax, al
and	eax, 7
dec	eax
cmp	eax, 4		; switch 5 cases
ja	loc_6C9BDD	; default
jmp	ds:off_6C9CE0[eax*4] ; switch jump

loc_6C9B4D:		; jumptable 006C9B46 case 0
mov	edx, offset aSingle
jmp	short loc_6C9B6E

loc_6C9B54:		; jumptable 006C9B46 case 1
mov	edx, offset aThick
jmp	short loc_6C9B6E

loc_6C9B5B:		; jumptable 006C9B46 case 2
mov	edx, offset aDotted
jmp	short loc_6C9B6E

loc_6C9B62:		; jumptable 006C9B46 case 3
mov	edx, offset aDitheredsingle
jmp	short loc_6C9B6E

loc_6C9B69:		; jumptable 006C9B46 case 4
mov	edx, offset aDitheredthick

loc_6C9B6E:
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	esi, [ecx+280h]
mov	eax, edx
lea	ecx, [eax+1]
nop

loc_6C9B80:
mov	bl, [eax]
inc	eax
test	bl, bl
jnz	short loc_6C9B80
sub	eax, ecx
push	0
push	eax
push	edx
mov	ecx, esi
call	sub_650E40
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	byte ptr [esp+20h+var_14+4], 5
mov	dword ptr [esp+20h+var_C], esi
add	[esi+8], eax
mov	eax, [edi+18h]
lea	edx, [esp+20h+var_14+4]
push	edx
push	offset aUnderlinestyle ; "underlineStyle"
add	eax, 78h
push	eax
lea	ecx, [ebp+10h]
call	sub_669260
lea	ecx, [esp+20h+var_14+4]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6C9BD9
mov	ecx, esi
call	sub_650DF0

loc_6C9BD9:
mov	esi, [esp+20h+arg_4]

loc_6C9BDD:		; default
test	byte ptr [esi+0Ch], 20h
mov	bl, 3
jz	short loc_6C9C2A
mov	ecx, [esi+8]
and	ecx, offset sub_FFFFFF
mov	[esp+20h+arg_4], ecx
fild	[esp+20h+arg_4]
mov	byte ptr [esp+20h+var_14+4], bl
test	ecx, ecx
jge	short loc_6C9C04
fadd	ds:dbl_15FCE08

loc_6C9C04:
mov	eax, [edi+18h]
fstp	[esp+20h+var_C]
lea	edx, [esp+20h+var_14+4]
push	edx
push	offset aUnderlinecolor ; "underlineColor"
add	eax, 78h
push	eax
lea	ecx, [ebp+10h]
call	sub_669260
lea	ecx, [esp+20h+var_14+4]
call	sub_652830

loc_6C9C2A:
test	byte ptr [esi+0Ch], 8
jz	short loc_6C9C74
mov	ecx, [esi]
and	ecx, offset sub_FFFFFF
mov	[esp+20h+arg_4], ecx
fild	[esp+20h+arg_4]
mov	byte ptr [esp+20h+var_14+4], bl
test	ecx, ecx
jge	short loc_6C9C4E
fadd	ds:dbl_15FCE08

loc_6C9C4E:
mov	eax, [edi+18h]
fstp	[esp+20h+var_C]
lea	edx, [esp+20h+var_14+4]
push	edx
push	offset aBackgroundcolo ; "backgroundColor"
add	eax, 78h
push	eax
lea	ecx, [ebp+10h]
call	sub_669260
lea	ecx, [esp+20h+var_14+4]
call	sub_652830

loc_6C9C74:
test	byte ptr [esi+0Ch], 10h
jz	short loc_6C9CBF
mov	ecx, [esi+4]
and	ecx, offset sub_FFFFFF
mov	[esp+20h+arg_4], ecx
fild	[esp+20h+arg_4]
mov	byte ptr [esp+20h+var_14+4], bl
test	ecx, ecx
jge	short loc_6C9C99
fadd	ds:dbl_15FCE08

loc_6C9C99:
mov	eax, [edi+18h]
fstp	[esp+20h+var_C]
lea	edx, [esp+20h+var_14+4]
push	edx
push	offset aTextcolor ; "textColor"
add	eax, 78h
push	eax
lea	ecx, [ebp+10h]
call	sub_669260
lea	ecx, [esp+20h+var_14+4]
call	sub_652830

loc_6C9CBF:
mov	ecx, [edi+4]
push	ebp
call	sub_652E40
pop	esi
pop	ebx
pop	edi
test	ebp, ebp
jz	short loc_6C9CDA
mov	ecx, ebp
pop	ebp
add	esp, 10h
jmp	sub_64B3B0

loc_6C9CDA:
pop	ebp
add	esp, 10h
retn
sub_6C9AF0 endp

align 10h
off_6C9CE0 dd offset loc_6C9B4D	; jump table for switch	statement
dd offset loc_6C9B54
dd offset loc_6C9B5B
dd offset loc_6C9B62
dd offset loc_6C9B69
align 10h



sub_6C9D00 proc	near

var_64=	byte ptr -64h
var_54=	byte ptr -54h
arg_0= dword ptr  4

sub	esp, 64h
push	ebx
mov	ebx, [esp+68h+arg_0]
cmp	dword ptr [ebx+8], 0
jz	loc_6C9DD8
mov	ecx, [ebx+8]
mov	eax, [ecx]
mov	edx, [eax+8]
push	ebp
call	edx
cmp	eax, 4
jnz	short loc_6C9D4F
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_6C9D2E
lea	ecx, [eax-78h]
jmp	short loc_6C9D30

loc_6C9D2E:
xor	ecx, ecx

loc_6C9D30:
mov	eax, [ecx+108h]
test	eax, eax
jz	short loc_6C9D47
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_6C9D47:
mov	ebp, [ecx+108h]
jmp	short loc_6C9D78

loc_6C9D4F:
mov	ecx, [ebx+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 0Dh
jnz	short loc_6C9DD7
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_6C9DDD
lea	ebp, [eax-10h]
test	ebp, ebp
jz	short loc_6C9DD7
mov	eax, [ebp+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebp+8], eax

loc_6C9D78:
test	ebp, ebp
jz	short loc_6C9DD7
cmp	dword ptr [ebx+1Ch], 1
push	esi
push	edi
jl	loc_6C9E48
mov	esi, [ebx+18h]
push	0
mov	ecx, ebx
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+80h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	edi, [esp+74h+arg_0]
call	sub_6C45C0
mov	esi, eax
cmp	esi, 5
jl	short loc_6C9DE1
mov	eax, [esp+74h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C9DCE
call	sub_650DF0

loc_6C9DCE:
mov	ecx, ebp
call	sub_64B3B0
pop	edi
pop	esi

loc_6C9DD7:
pop	ebp

loc_6C9DD8:
pop	ebx
add	esp, 64h
retn

loc_6C9DDD:
xor	ebp, ebp
jmp	short loc_6C9D78

loc_6C9DE1:
mov	ecx, ebp
call	sub_6C5F70
lea	ecx, [esp+74h+var_54]
mov	edi, eax
call	sub_6C6370
test	edi, edi
jz	short loc_6C9E01
push	edi
lea	ecx, [esp+78h+var_54]
call	sub_6C4530

loc_6C9E01:
mov	edx, esi
shl	edx, 4
lea	eax, [esp+edx+74h+var_54]
push	eax
push	1
lea	ecx, [esp+7Ch+var_64]
push	ebx
push	ecx
call	sub_6C96C0
add	esp, 10h
push	eax
push	esi
lea	ecx, [esp+7Ch+var_54]
call	sub_6C4470
lea	edx, [esp+74h+var_54]
push	edx
mov	ecx, ebp
call	sub_6C75F0
mov	eax, [esp+74h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C9E48
call	sub_650DF0

loc_6C9E48:
pop	edi
pop	esi
mov	ecx, ebp
pop	ebp
pop	ebx
add	esp, 64h
jmp	sub_64B3B0
sub_6C9D00 endp

align 10h



sub_6C9E60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
cmp	dword ptr [esi+8], 0
jz	loc_6C9F62
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
push	ebp
call	edx
cmp	eax, 4
jnz	short loc_6C9EBA
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6C9E99
add	eax, 0FFFFFF88h
jmp	short loc_6C9E9B

loc_6C9E99:
xor	eax, eax

loc_6C9E9B:
mov	ecx, [eax+108h]
test	ecx, ecx
jz	short loc_6C9EB2
mov	edx, [ecx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ecx+8], edx

loc_6C9EB2:
mov	ebp, [eax+108h]
jmp	short loc_6C9EEA

loc_6C9EBA:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 0Dh
jnz	loc_6C9F61
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6C9F48
add	eax, 0FFFFFFF0h
test	eax, eax
jz	short loc_6C9EE8
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6C9EE8:
mov	ebp, eax

loc_6C9EEA:
test	ebp, ebp
jz	short loc_6C9F61
push	ebx
mov	ecx, ebp
call	sub_6C5F70
mov	ebx, eax
test	ebx, ebx
jz	short loc_6C9F3D
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+1Ch+arg_0]
push	edx
mov	ecx, eax
call	sub_652F60
lea	edi, [esp+10h+arg_0]
call	sub_6C45C0
cmp	eax, 5
jl	short loc_6C9F4C
mov	eax, [esp+10h+arg_0]

loc_6C9F2B:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6C9F3D
call	sub_650DF0

loc_6C9F3D:
pop	ebx
mov	ecx, ebp
pop	ebp
pop	edi
pop	esi
jmp	sub_64B3B0

loc_6C9F48:
xor	eax, eax
jmp	short loc_6C9EE8

loc_6C9F4C:
shl	eax, 4
add	eax, ebx
push	eax
push	esi
call	sub_6C9AF0
mov	eax, [esp+18h+arg_0]
add	esp, 8
jmp	short loc_6C9F2B

loc_6C9F61:
pop	ebp

loc_6C9F62:
pop	edi
pop	esi
retn
sub_6C9E60 endp

align 10h



sub_6C9F70 proc	near
mov	eax, ecx
mov	dword ptr [eax], offset	off_155F500
xor	ecx, ecx
mov	dword ptr [eax+4], 1
mov	dword ptr [eax+8], 19h
mov	dword ptr [eax], offset	off_143B078
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
retn
sub_6C9F70 endp

align 10h



sub_6C9FA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0Ch]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6C9FD6
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6C9FD6:
mov	eax, esi
pop	esi
retn	4
sub_6C9FA0 endp

align 10h



sub_6C9FE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	ebp, ecx
mov	eax, [ebp+10h]
push	offset sub_6C4710
lea	esi, [ebp+0Ch]
lea	ecx, [esp+24h+var_10]
push	ecx
xor	edi, edi
push	eax
push	edi
mov	ebx, 2
push	esi
mov	[esp+34h+var_10], ebx
mov	[esp+34h+var_C], 10h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 3
mov	[esp+34h+var_C], 10h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], 1
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 6
mov	[esp+34h+var_C], 26h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 7
mov	[esp+34h+var_C], 28h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	[esp+20h+var_10], 4
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_C], 25h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 5
mov	[esp+34h+var_C], 27h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 8
mov	[esp+34h+var_C], 21h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 9
mov	[esp+34h+var_C], 22h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
mov	[esp+2Ch+var_10], 0Ah
mov	[esp+2Ch+var_C], 24h
mov	[esp+2Ch+var_8], edi
mov	[esp+2Ch+var_4], edi
push	edi
push	esi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 0Bh
mov	[esp+34h+var_C], 23h
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 0Ch
mov	[esp+34h+var_C], 21h
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 0Dh
mov	[esp+34h+var_C], 22h
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 0Eh
mov	[esp+34h+var_C], 24h
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	[esp+20h+var_10], 0Fh
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_C], 23h
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 10h
mov	[esp+34h+var_C], 8
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 11h
mov	[esp+34h+var_C], 2Eh
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 12h
mov	[esp+34h+var_C], 0Dh
mov	[esp+34h+var_8], edi
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
mov	[esp+2Ch+var_10], 13h
mov	[esp+2Ch+var_C], 43h
mov	[esp+2Ch+var_8], ebx
mov	[esp+2Ch+var_4], edi
push	edi
push	esi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 13h
mov	[esp+34h+var_C], 2Dh
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 14h
mov	[esp+34h+var_C], 56h
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 14h
mov	[esp+34h+var_C], 2Dh
mov	[esp+34h+var_8], 1
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 15h
mov	[esp+34h+var_C], 58h
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	[esp+20h+var_10], 15h
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_C], 2Eh
mov	[esp+34h+var_8], 1
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
mov	eax, [esi+4]
push	offset sub_6C4710
lea	ecx, [esp+24h+var_10]
push	ecx
push	eax
push	edi
push	esi
mov	[esp+34h+var_10], 16h
mov	[esp+34h+var_C], 41h
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], edi
call	sub_6C4780
add	esp, 14h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_6C85E0
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_6C9FE0 endp

align 10h



sub_6CA5C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
xor	ebx, ebx
push	eax
mov	dword ptr [esi], offset	off_143AE9C
mov	dword ptr [edi], offset	off_143AE48
mov	[esi+34h], ebx
push	ebp
mov	ecx, edi
mov	[esi+38h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+3Ch]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_143AF40
mov	dword ptr [edi], offset	off_143B098
mov	dword ptr [ecx], offset	off_143B094
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6CA5C0 endp

align 10h



sub_6CA640 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	ebp, ebp
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebp
jnz	short loc_6CA662
call	sub_6C7960
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_6CA662:
push	ebx
push	esi
cmp	eax, 8
jnb	short loc_6CA670
mov	esi, 8
jmp	short loc_6CA6D5

loc_6CA670:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_6CA683
fadd	ds:flt_15FCC08

loc_6CA683:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	cl, byte ptr [esp+1Ch+var_8]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_6CA6D5:
mov	ecx, dword_1855FC0
mov	ebx, [esp+1Ch+arg_0]
lea	edx, [esp+1Ch+var_8]
push	edx
mov	edx, esi
shl	edx, 4
add	edx, 8
mov	[esp+20h+arg_4], ebp
mov	dword ptr [esp+20h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebx
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebp
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebp
jbe	short loc_6CA734
xor	eax, eax
jmp	short loc_6CA720
align 10h

loc_6CA720:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_6CA720

loc_6CA734:
mov	eax, [edi]
cmp	eax, ebp
jz	loc_6CA7EE
mov	eax, [eax+4]
inc	eax
mov	[esp+1Ch+arg_0], eax
jmp	short loc_6CA754
jmp	short loc_6CA750
align 10h

loc_6CA750:
mov	edi, [esp+1Ch+var_C]

loc_6CA754:
mov	edx, [edi]
cmp	dword ptr [edx+ebp+8], 0FFFFFFFEh
lea	edi, [edx+ebp+8]
jz	short loc_6CA7C8
mov	eax, [edi+8]
lea	esi, [edi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
push	eax
push	esi
push	ebx
lea	ecx, [esp+28h+arg_4]
call	sub_6CB610
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6CA79E
call	sub_64A400

loc_6CA79E:
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6CA7C2
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6CA7C2:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6CA7C8:
add	ebp, 10h
sub	[esp+1Ch+arg_0], 1
jnz	loc_6CA750
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]

loc_6CA7EE:
mov	ecx, [esp+1Ch+arg_4]
mov	[edi], ecx
lea	ecx, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_4], 0
call	sub_6C7960
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_6CA640 endp

align 10h



sub_6CA810 proc	near

var_10=	dword ptr -10h
var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+18h+var_4], edi
cmp	eax, ebx
jnz	short loc_6CA832
call	sub_6C79F0
pop	edi
pop	ebx
add	esp, 10h
retn	8

loc_6CA832:
push	esi
cmp	eax, 8
jnb	short loc_6CA83F
mov	esi, 8
jmp	short loc_6CA8A4

loc_6CA83F:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_6CA852
fadd	ds:flt_15FCC08

loc_6CA852:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_C], eax
fldcw	word ptr [esp+1Ch+var_C]
fistp	[esp+1Ch+var_C]
mov	cl, byte ptr [esp+1Ch+var_C]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_6CA8A4:
mov	ecx, dword_1855FC0
lea	edx, [esp+1Ch+var_C]
push	edx
mov	edx, esi
shl	edx, 4
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
add	edx, 8
push	edx
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_6CA8F5
xor	eax, eax

loc_6CA8E1:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_6CA8E1

loc_6CA8F5:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_6CA9CA
mov	eax, [eax+4]
inc	eax
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
mov	[esp+20h+var_10], ebx
mov	dword ptr [esp+20h+var_C], eax

loc_6CA912:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	ebx, [ebx+edx+8]
jz	loc_6CA9A3
mov	eax, [ebx+8]
lea	esi, [ebx+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esp+20h+arg_0]
push	eax
push	esi
push	edx
lea	ecx, [esp+2Ch+arg_4]
call	sub_6CB780
mov	edi, [esi+4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6CA979
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6CA979:
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6CA999
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6CA999:
mov	edi, [esp+20h+var_4]
mov	dword ptr [ebx], 0FFFFFFFEh

loc_6CA9A3:
mov	ebx, [esp+20h+var_10]
add	ebx, 10h
sub	dword ptr [esp+20h+var_C], 1
mov	[esp+20h+var_10], ebx
jnz	loc_6CA912
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebp

loc_6CA9CA:
mov	eax, [esp+1Ch+arg_4]
lea	ecx, [esp+1Ch+arg_4]
mov	[edi], eax
mov	[esp+1Ch+arg_4], 0
call	sub_6C79F0
pop	esi
pop	edi
pop	ebx
add	esp, 10h
retn	8
sub_6CA810 endp

align 10h



sub_6CA9F0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_5C=	dword ptr -5Ch
var_50=	byte ptr -50h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	word ptr -28h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_23=	byte ptr -23h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 6Ch
mov	eax, [ecx-0F4h]
mov	edx, [eax+70h]
push	ebx
push	ebp
push	esi
lea	esi, [ecx-0F4h]
mov	ecx, esi
call	edx
xor	ebx, ebx
mov	ebp, eax
xor	eax, eax
mov	[esp+78h+var_38], ebx
mov	[esp+78h+var_34], ebx
mov	[esp+78h+var_30], ebx
mov	[esp+78h+var_2C], ebx
mov	[esp+78h+var_28], ax
mov	[esp+78h+var_26], bl
mov	[esp+78h+var_24], bl
mov	[esp+78h+var_23], bl
mov	[esp+78h+var_25], 0FFh
mov	[esp+78h+var_18], bl
mov	[esp+78h+var_20], ebx
mov	[esp+78h+var_1C], ebx
mov	[esp+78h+var_10], ebx
mov	[esp+78h+var_C], ebx
mov	[esp+78h+var_8], ebx
mov	[esp+78h+var_40], ebx
mov	[esp+78h+var_4], ebx
mov	[esp+78h+var_3C], 4
inc	dword ptr [esi+4]
mov	ecx, ebp
mov	[esp+78h+var_38], esi
mov	[esp+78h+var_34], ebx
mov	[esp+78h+var_14], offset sub_6C6B70
call	sub_668010
lea	ecx, [esp+78h+var_40]
push	ecx
push	4
lea	ecx, [eax+2408h]
call	sub_68E990
test	eax, eax
jnz	loc_6CABA6
mov	edx, [ebp+78h]
mov	ecx, [edx+280h]
push	edi
push	ebx
push	0Ah
push	offset aOnscroller ; "onScroller"
mov	[esp+88h+var_6C], ebx
mov	[esp+88h+var_68], ebx
mov	[esp+88h+var_64], ebx
call	sub_650E40
mov	edi, eax
mov	eax, 1
add	[edi+8], eax
mov	[esp+7Ch+var_60], 5
mov	[esp+7Ch+var_5C], edi
add	[edi+8], eax
push	eax
lea	eax, [esp+80h+var_6C]
push	eax
mov	ecx, eax
call	sub_683310
mov	ecx, [esp+7Ch+var_68]
mov	edx, [esp+7Ch+var_6C]
shl	ecx, 4
lea	ecx, [ecx+edx-10h]
cmp	ecx, ebx
jz	short loc_6CAAF4
lea	eax, [esp+7Ch+var_60]
push	eax
call	sub_652330

loc_6CAAF4:
lea	ecx, [esp+7Ch+var_60]
call	sub_652830
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6CAB0A
mov	ecx, edi
call	sub_650DF0

loc_6CAB0A:
push	esi
lea	ecx, [esp+80h+var_50]
call	sub_651CF0
mov	ecx, [esp+7Ch+var_68]
inc	ecx
push	ecx
lea	edx, [esp+80h+var_6C]
push	edx
mov	ecx, edx
mov	edi, eax
call	sub_683310
mov	eax, [esp+7Ch+var_68]
mov	ecx, [esp+7Ch+var_6C]
shl	eax, 4
lea	ecx, [eax+ecx-10h]
cmp	ecx, ebx
jz	short loc_6CAB41
push	edi
call	sub_652330

loc_6CAB41:
lea	ecx, [esp+7Ch+var_50]
call	sub_652830
mov	ecx, ebp
call	sub_668010
push	4
lea	ecx, [eax+2408h]
call	sub_696220
mov	edi, eax
mov	dword ptr [edi+4], 4
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_6CAB76
call	sub_64A400

loc_6CAB76:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_6CAB85
call	sub_64A400

loc_6CAB85:
lea	edx, [esp+7Ch+var_6C]
mov	[edi+0Ch], ebx
push	edx
lea	ecx, [edi+30h]
mov	dword ptr [edi+2Ch], offset sub_6C6B70
call	sub_684BD0
lea	ecx, [esp+7Ch+var_6C]
call	sub_6806F0
pop	edi

loc_6CABA6:
lea	ecx, [esp+78h+var_40]
call	sub_6861E0
pop	esi
pop	ebp
pop	ebx
add	esp, 6Ch
retn	4
sub_6CA9F0 endp

align 10h



sub_6CABC0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax
call	sub_6CA9F0
retn	8
sub_6CABC0 endp

align 10h


; Attributes: thunk

sub_6CABD0 proc	near
jmp	sub_6CA9F0
sub_6CABD0 endp

align 10h



sub_6CABE0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
mov	edx, [eax+70h]
push	esi
push	edi
call	edx
mov	edi, eax
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
mov	[esp+28h+var_18], 1
jnz	short loc_6CAC3C
mov	ebx, [ebp+10Ch]
cmp	ebx, 0FFFFFFFFh
jz	short loc_6CAC3C
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	esi, [edi+8]
jb	short loc_6CAC28
mov	ecx, esi
call	sub_64B530

loc_6CAC28:
mov	esi, [esi]
test	esi, esi
jz	short loc_6CAC34
mov	byte ptr [esi],	4
mov	[esi+4], ebx

loc_6CAC34:
mov	[esp+28h+var_18], 2

loc_6CAC3C:
push	ebp
lea	ecx, [esp+2Ch+var_10]
call	sub_651CF0
add	dword ptr [edi+8], 10h
lea	esi, [edi+8]
mov	ebx, eax
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6CAC5D
mov	ecx, esi
call	sub_64B530

loc_6CAC5D:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6CAC69
push	ebx
call	sub_652330

loc_6CAC69:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	ecx, [esi]
sub	ecx, [esi+4]
mov	edx, [esi+14h]
mov	eax, [edi+78h]
push	0
sar	ecx, 4
shl	edx, 5
push	9
lea	ebx, [ecx+edx-20h]
mov	ecx, [eax+280h]
push	offset aOnchanged ; "onChanged"
add	ebp, 78h
call	sub_650E40
push	ebx
mov	ebx, [esp+2Ch+var_18]
push	ebx
lea	ecx, [esp+30h+var_14]
push	ecx
push	ebp
mov	[esp+38h+var_14], eax
inc	dword ptr [eax+8]
push	edi
call	sub_6C2A80
mov	eax, [esp+3Ch+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_6CACD0
call	sub_650DF0

loc_6CACD0:
push	ebx
mov	ecx, esi
call	sub_64C1F0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6CABE0 endp




sub_6CACE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	ecx, [esi+0BCh]
cmp	dword ptr [ecx+11Ch], 0
jz	short loc_6CAD5D
mov	eax, [esp+4+arg_C]
mov	edx, [esp+4+arg_8]
push	eax
mov	eax, [esp+8+arg_4]
push	edx
mov	edx, [esp+0Ch+arg_0]
push	eax
push	edx
call	sub_71E550
mov	eax, [esi+0BCh]
cmp	dword ptr [eax+11Ch], 0
jz	short loc_6CAD4F
mov	ecx, [eax+8]
push	edi
call	sub_726950
mov	edi, eax
mov	eax, [esi+0BCh]
mov	ecx, [eax+11Ch]
call	sub_717420
cmp	eax, edi
jbe	short loc_6CAD4E
mov	ecx, [esi+0BCh]
mov	ecx, [ecx+11Ch]
push	0
push	edi
call	sub_72F6A0

loc_6CAD4E:
pop	edi

loc_6CAD4F:
mov	ecx, esi
call	sub_6C4AC0
mov	ecx, esi
call	sub_6CABE0

loc_6CAD5D:
pop	esi
retn	10h
sub_6CACE0 endp

align 10h



sub_6CAD70 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
push	edi
mov	edi, ecx
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
xor	ebp, ebp
cmp	eax, ebp
jz	loc_6CAF54
push	ebx
mov	ebx, [eax+14h]
mov	[esp+28h+var_18], ebx
cmp	ebx, ebp
jz	loc_6CAF53
mov	eax, [esp+28h+arg_0]
inc	dword ptr [ebx+4]
cmp	eax, ebp
jnz	short loc_6CADB9
mov	edx, [ebx+14h]
lea	ecx, [ebx+14h]
mov	[esp+28h+arg_0], edx
call	sub_725AB0
jmp	short loc_6CADC9

loc_6CADB9:
cmp	[esp+28h+arg_4], 0FFFFFFFFh
jnz	short loc_6CADCD
push	eax
call	sub_67B340
add	esp, 4

loc_6CADC9:
mov	[esp+28h+arg_4], eax

loc_6CADCD:
mov	eax, [edi+0BCh]
push	esi
cmp	[eax+110h], ebp
jz	short loc_6CAE0E
mov	ecx, [eax+8]
call	sub_726950
mov	ecx, [esp+2Ch+arg_4]
mov	edx, [edi+0BCh]
add	eax, ecx
cmp	eax, [edx+110h]
jbe	short loc_6CAE0E
mov	eax, edx
mov	ecx, [eax+8]
mov	esi, [eax+110h]
call	sub_726950
sub	esi, eax
mov	[esp+2Ch+arg_4], esi

loc_6CAE0E:
mov	eax, [edi+0BCh]
mov	ecx, [eax+11Ch]
mov	esi, [ebx+30h]
call	sub_717420
cmp	esi, eax
jz	short loc_6CAE3F
mov	ecx, [edi+0BCh]
mov	ecx, [ecx+11Ch]
call	sub_717420
push	eax
mov	ecx, ebx
call	sub_72EBC0

loc_6CAE3F:
push	0FFFFFFFFh
push	offset szReferrer
mov	ecx, ebx
call	sub_72EB60
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
mov	[esp+2Ch+var_1C], ebp
call	eax
mov	[esp+2Ch+var_14], eax
cmp	[esp+2Ch+arg_4], ebp
jbe	loc_6CAF2E
jmp	short loc_6CAE70
align 10h

loc_6CAE70:
cmp	[esp+2Ch+var_14], 0
mov	ecx, [esp+2Ch+arg_0]
movzx	esi, word ptr [ecx+ebp*2]
jz	loc_6CAF07
mov	edx, [edi+0BCh]
cmp	dword ptr [edx+11Ch], 0
jz	short loc_6CAF07
mov	ecx, edi
call	sub_6C4970
test	al, al
jz	short loc_6CAEA8
mov	ecx, edi
call	sub_6C4940
test	al, al
jz	short loc_6CAF07

loc_6CAEA8:
mov	ecx, [edi+104h]
test	ecx, ecx
jz	short loc_6CAF07
push	esi
lea	eax, [esp+30h+var_10]
push	eax
call	sub_6C7350
mov	ecx, [eax+4]
test	ecx, ecx
jl	short loc_6CAECB
mov	edx, [eax]
cmp	ecx, [edx+4]
jb	short loc_6CAF07

loc_6CAECB:
push	esi
call	sub_67B4A0
push	esi
mov	ebx, eax
call	sub_67B520
add	esp, 8
cmp	esi, ebx
mov	esi, ebx
jnz	short loc_6CAEE4
mov	esi, eax

loc_6CAEE4:
mov	ecx, [edi+104h]
push	esi
lea	eax, [esp+30h+var_8]
push	eax
call	sub_6C7350
mov	ecx, [eax+4]
test	ecx, ecx
jl	short loc_6CAF1F
mov	edx, [eax]
cmp	ecx, [edx+4]
jnb	short loc_6CAF1F
mov	ebx, [esp+2Ch+var_18]

loc_6CAF07:
mov	eax, [edi+0BCh]
mov	ecx, [eax+11Ch]
inc	[esp+2Ch+var_1C]
push	esi
call	sub_72FDB0
jmp	short loc_6CAF23

loc_6CAF1F:
mov	ebx, [esp+2Ch+var_18]

loc_6CAF23:
inc	ebp
cmp	ebp, [esp+2Ch+arg_4]
jb	loc_6CAE70

loc_6CAF2E:
mov	ecx, [ebx+30h]
add	ecx, [esp+2Ch+var_1C]
push	ecx
mov	ecx, ebx
call	sub_72EBC0
mov	ecx, edi
call	sub_6C4AC0
mov	ecx, edi
call	sub_6CABE0
mov	ecx, ebx
call	sub_64A400
pop	esi

loc_6CAF53:
pop	ebx

loc_6CAF54:
pop	edi
pop	ebp
add	esp, 1Ch
retn	8
sub_6CAD70 endp

db 14h dup(0CCh)



sub_6CAF70 proc	near

var_64=	byte ptr -64h
var_54=	byte ptr -54h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 64h
mov	eax, [esp+64h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+70h+arg_0]
push	edi
mov	ebp, ecx
mov	ecx, [esp+74h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebp
call	sub_6CA5C0
lea	edi, [ebp+10h]
push	edi
lea	ebx, [ebp+3Ch]
push	esi
mov	dword ptr [ebp+0], offset off_143AF40
mov	dword ptr [edi], offset	off_143B098
mov	dword ptr [ebx], offset	off_143B094
call	sub_6C21D0
add	esp, 8
lea	edx, [esp+74h+arg_8]
push	edx
push	offset off_167DA80
push	esi
push	ebp
mov	ecx, ebx
mov	byte ptr [esp+84h+arg_8], 1
call	sub_663110
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aScroll	; "scroll"
mov	bl, 2
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aHscroll	; "hscroll"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aMaxscroll ; "maxscroll"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aMaxhscroll ; "maxhscroll"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
mov	byte ptr [esp+74h+arg_8], bl
mov	[esp+74h+var_64], 0Ah
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aBackground ; "background"
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aBackgroundcolo ; "backgroundColor"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aBorder_0 ; "border"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aBordercolor ; "borderColor"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aBottomscroll ; "bottomScroll"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aMousewheelenab ; "mouseWheelEnabled"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aAntialiastype ;	"antiAliasType"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aAutosize ; "autoSize"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aCondensewhite ;	"condenseWhite"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aEmbedfonts ; "embedFonts"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aHtml	; "html"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aHtmltext ; "htmlText"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aLength	; "length"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aMaxchars ; "maxChars"
mov	byte ptr [esp+80h+arg_8], bl
mov	[esp+80h+var_64], 0Ah
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aMultiline ; "multiline"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aPassword ; "password"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aRestrict ; "restrict"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 1
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aSelectable ; "selectable"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aStylesheet ; "styleSheet"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aTabindex ; "tabIndex"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
mov	byte ptr [esp+74h+arg_8], bl
mov	[esp+74h+var_64], 0Ah
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aText	; "text"
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aTextcolor ; "textColor"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aTextheight ; "textHeight"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aTextwidth ; "textWidth"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	edx, [esp+74h+arg_8]
push	edx
lea	eax, [esp+78h+var_64]
push	eax
push	offset aType	; "type"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	ecx, [esp+74h+arg_8]
push	ecx
lea	edx, [esp+78h+var_64]
push	edx
push	offset aVariable ; "variable"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
lea	eax, [esp+74h+arg_8]
push	eax
lea	ecx, [esp+78h+var_64]
push	ecx
push	offset aWordwrap ; "wordWrap"
push	esi
mov	ecx, edi
mov	byte ptr [esp+84h+arg_8], bl
mov	[esp+84h+var_64], 0Ah
call	sub_65E060
lea	ecx, [esp+74h+var_64]
call	sub_652830
mov	byte ptr [esp+74h+arg_8], 1
lea	edx, [esp+74h+arg_8]
push	edx
push	offset off_143AA50
push	esi
push	ebp
lea	ecx, [ebp+3Ch]
call	sub_663110
lea	eax, [esp+74h+var_54]
push	eax
call	sub_72ECB0
add	esp, 4
push	eax
mov	ecx, ebp
call	sub_6C75F0
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 64h
retn	0Ch
sub_6CAF70 endp

align 10h



sub_6CB5D0 proc	near

arg_0= byte ptr	 4

sub	ecx, 3Ch
jmp	loc_6CB5E0
align 10h

loc_6CB5E0:
push	esi
mov	esi, ecx
call	sub_6C71D0
test	[esp+4+arg_0], 1
jz	short loc_6CB5FD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6CB5FD:
mov	eax, esi
pop	esi
retn	4
sub_6CB5D0 endp

align 10h



sub_6CB610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6CB625
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6CB647

loc_6CB625:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6CB64C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6CB647:
call	sub_6CA640

loc_6CB64C:
mov	eax, [esi]
mov	ebp, [esp+10h+arg_8]
and	ebp, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, ebp
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6CB69F
mov	ebx, [esp+10h+arg_4]
lea	edi, [esi+8]
push	ebx
mov	ecx, edi
mov	dword ptr [esi], 0FFFFFFFFh
mov	byte ptr [esp+14h+arg_0], 0
call	sub_67ABE0
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_6CB68F
inc	dword ptr [eax+4]

loc_6CB68F:
mov	eax, [ebx+4]
mov	[edi+4], eax
pop	edi
mov	[esi+4], ebp
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CB69F:
mov	ecx, [eax+4]
mov	edi, ebp

loc_6CB6A4:
inc	edi
and	edi, ecx
mov	ebx, edi
shl	ebx, 4
cmp	[ebx+eax+8], edx
jnz	short loc_6CB6A4
mov	edx, [esi+4]
mov	ecx, edi
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	edx, ebp
jnz	short loc_6CB70B
test	ecx, ecx
jz	short loc_6CB6CC
push	esi
call	sub_6C73B0

loc_6CB6CC:
mov	edx, [esp+10h+arg_4]
lea	ebx, [esi+8]
push	edx
mov	ecx, ebx
call	sub_67A3D0
mov	eax, [esp+10h+arg_4]
mov	eax, [eax+4]
test	eax, eax
jz	short loc_6CB6E9
inc	dword ptr [eax+4]

loc_6CB6E9:
mov	ecx, [ebx+4]
test	ecx, ecx
jz	short loc_6CB6F5
call	sub_64A400

loc_6CB6F5:
mov	ecx, [esp+10h+arg_4]
mov	edx, [ecx+4]
mov	[ebx+4], edx
mov	[esi], edi
pop	edi
mov	[esi+4], ebp
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CB70B:
shl	edx, 4
cmp	[edx+eax+8], ebp
lea	ebx, [edx+eax+8]
jz	short loc_6CB72F
jmp	short loc_6CB720
align 10h

loc_6CB720:
mov	edx, [ebx]
shl	edx, 4
cmp	[edx+eax+8], ebp
lea	ebx, [edx+eax+8]
jnz	short loc_6CB720

loc_6CB72F:
test	ecx, ecx
jz	short loc_6CB739
push	esi
call	sub_6C73B0

loc_6CB739:
mov	[ebx], edi
mov	ebx, [esp+10h+arg_4]
lea	edi, [esi+8]
push	ebx
mov	ecx, edi
call	sub_67A3D0
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_6CB754
inc	dword ptr [eax+4]

loc_6CB754:
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6CB760
call	sub_64A400

loc_6CB760:
mov	eax, [ebx+4]
mov	[edi+4], eax
pop	edi
mov	[esi+4], ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6CB610 endp

align 10h



sub_6CB780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6CB795
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6CB7B7

loc_6CB795:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6CB7BC
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6CB7B7:
call	sub_6CA810

loc_6CB7BC:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6CB806
mov	ebp, [esp+10h+arg_4]
lea	ebx, [esi+8]
push	ebp
mov	ecx, ebx
mov	dword ptr [esi], 0FFFFFFFFh
call	sub_67AF90
add	ebp, 4
push	ebp
lea	ecx, [ebx+4]
call	sub_67AF90
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CB806:
mov	ecx, [eax+4]
mov	ebx, edi
jmp	short loc_6CB810
align 10h

loc_6CB810:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
jnz	short loc_6CB810
mov	edx, [esi+4]
mov	ecx, ebx
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	edx, edi
jnz	short loc_6CB863
test	ecx, ecx
jz	short loc_6CB838
push	esi
call	sub_6C73F0

loc_6CB838:
mov	edx, [esp+10h+arg_4]
lea	ebp, [esi+8]
push	edx
mov	ecx, ebp
call	sub_67A3D0
mov	eax, [esp+10h+arg_4]
add	eax, 4
push	eax
lea	ecx, [ebp+4]
call	sub_67A3D0
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CB863:
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jz	short loc_6CB880

loc_6CB870:
mov	edx, [ebp+0]
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jnz	short loc_6CB870

loc_6CB880:
test	ecx, ecx
jz	short loc_6CB88A
push	esi
call	sub_6C73F0

loc_6CB88A:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
lea	ebx, [esi+8]
push	ebp
mov	ecx, ebx
call	sub_67A3D0
add	ebp, 4
push	ebp
lea	ecx, [ebx+4]
call	sub_67A3D0
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6CB780 endp

align 10h



sub_6CB8C0 proc	near
push	esi
lea	esi, [ecx-0F4h]
mov	ecx, esi
call	sub_6C4AC0
mov	ecx, esi
call	sub_6CABE0
pop	esi
retn	4
sub_6CB8C0 endp

align 10h



sub_6CB8E0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [esi]
push	eax
push	ecx
call	sub_6C7780
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
pop	esi
retn
sub_6CB8E0 endp

align 10h



sub_6CB910 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	edi
mov	edi, [esp+14h+arg_0]
cmp	dword ptr [edi+8], 0
jz	loc_6CBA0F
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6CBA0F
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6CB942
lea	esi, [eax-78h]
jmp	short loc_6CB944

loc_6CB942:
xor	esi, esi

loc_6CB944:
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6CB957
cmp	dword ptr [eax], 0
jnz	loc_6CBA0E

loc_6CB957:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6CBA0E
push	ebx
mov	ebx, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+28h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	esi
call	eax
mov	edx, [esp+1Ch+arg_0]
lea	ecx, [esp+1Ch+var_10]
push	ecx
mov	ecx, [esi+0BCh]
push	0
mov	[esp+24h+var_10], 0
mov	[esp+24h+var_C], 0
mov	[esp+24h+var_8], 0
mov	[esp+24h+var_4], eax
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
call	sub_71E4F0
cmp	[esp+1Ch+var_C], 0
pop	ebx
jbe	short loc_6CB9D8
lea	ecx, [esp+18h+var_10]
push	ecx
mov	ecx, esi
call	sub_6C9150

loc_6CB9D8:
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_6CB9EF
or	dword ptr [eax+2474h], 400h

loc_6CB9EF:
lea	ecx, [esp+18h+var_10]
call	sub_6CB8E0
mov	eax, [esp+18h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6CBA0E
call	sub_650DF0

loc_6CBA0E:
pop	esi

loc_6CBA0F:
pop	edi
add	esp, 10h
retn
sub_6CB910 endp

align 10h



sub_6CBA20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+1Ch]
push	esi
mov	[esp+0Ch+var_4], ebx
test	ecx, ecx
jz	short loc_6CBA35
call	sub_64A400

loc_6CBA35:
push	edi
mov	edi, dword_1855FC0
mov	eax, [edi]
mov	edx, [eax+28h]
push	0
push	50h
mov	ecx, edi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6CBA94
mov	dword ptr [esi], offset	off_155F500
mov	ebx, 1
mov	[esi+4], ebx
mov	dword ptr [esi], offset	off_1437724
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
mov	eax, 64h
push	edi
lea	ecx, [esi+20h]
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], ebx
mov	[esi+1Ch], edi
call	sub_694320
mov	[esi+4Ch], bl
mov	ebx, [esp+8+arg_0]
jmp	short loc_6CBA96

loc_6CBA94:
xor	esi, esi

loc_6CBA96:
mov	eax, [edi]
mov	edx, [eax+28h]
push	0
push	24h
mov	ecx, edi
call	edx
pop	edi
test	eax, eax
jz	short loc_6CBAB2
push	esi
mov	ecx, eax
call	sub_72C220
jmp	short loc_6CBAB4

loc_6CBAB2:
xor	eax, eax

loc_6CBAB4:
mov	ecx, [esp+0Ch+arg_0]
push	0FFFFFFFFh
push	0
push	eax
mov	[ebx+1Ch], eax
call	sub_72C380
test	esi, esi
jz	short loc_6CBAD0
mov	ecx, esi
call	sub_64A400

loc_6CBAD0:
pop	esi
pop	ebx
pop	ecx
retn	4
sub_6CBA20 endp

align 10h



sub_6CBAE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
push	edi
test	ecx, ecx
jz	short loc_6CBAF7
call	sub_64A400
mov	dword ptr [esi+1Ch], 0

loc_6CBAF7:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_0]
push	eax
lea	edi, [esi+0Ch]
push	ecx
mov	ecx, edi
call	sub_730E30
mov	edi, [edi]
mov	eax, [esi+10h]
test	edi, edi
jnz	short loc_6CBB19
mov	edi, offset szReferrer

loc_6CBB19:
mov	edx, [esi]
push	eax
mov	eax, [edx+4]
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esp+8+arg_8]
push	ecx
mov	ecx, esi
call	sub_6CBA20
pop	edi
pop	esi
retn	0Ch
sub_6CBAE0 endp

align 10h



sub_6CBB40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6CBB55
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6CBB77

loc_6CBB55:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6CBB7C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6CBB77:
call	sub_6CA640

loc_6CBB7C:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6CBBD3
mov	ebp, [esp+10h+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
mov	byte ptr [esp+14h+arg_0], 0
call	sub_67ABE0
mov	ecx, [ebp+4]
mov	eax, [ecx]
test	eax, eax
jz	short loc_6CBBC4
inc	dword ptr [eax+4]

loc_6CBBC4:
mov	ecx, [ecx]
mov	[ebx+4], ecx
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CBBD3:
mov	ecx, [eax+4]
mov	ebx, edi

loc_6CBBD8:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
jnz	short loc_6CBBD8
mov	edx, ebx
shl	edx, 4
lea	ecx, [edx+eax+8]
mov	edx, [esi+4]
cmp	edx, edi
jnz	short loc_6CBC19
test	ecx, ecx
jz	short loc_6CBC00
push	esi
call	sub_6C73B0

loc_6CBC00:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+8]
call	sub_6C6160
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CBC19:
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jz	short loc_6CBC36

loc_6CBC26:
mov	edx, [ebp+0]
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jnz	short loc_6CBC26

loc_6CBC36:
test	ecx, ecx
jz	short loc_6CBC40
push	esi
call	sub_6C73B0

loc_6CBC40:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+8]
mov	[ebp+0], ebx
call	sub_6C6160
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6CBB40 endp




sub_6CBC60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6CBC75
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_6CBC97

loc_6CBC75:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6CBC9C
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6CBC97:
call	sub_6CA810

loc_6CBC9C:
mov	eax, [esi]
mov	edi, [esp+10h+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	edx, edi
shl	edx, 4
lea	esi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_6CBCE9
mov	ebp, [esp+10h+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67AF90
mov	ecx, [ebp+4]
push	ecx
lea	ecx, [ebx+4]
call	sub_67AF90
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CBCE9:
mov	ecx, [eax+4]
mov	ebx, edi
mov	edi, edi

loc_6CBCF0:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 4
cmp	[eax+ebp+8], edx
jnz	short loc_6CBCF0
mov	edx, ebx
shl	edx, 4
lea	ecx, [edx+eax+8]
mov	edx, [esi+4]
cmp	edx, edi
jnz	short loc_6CBD45
test	ecx, ecx
jz	short loc_6CBD18
push	esi
call	sub_6C73F0

loc_6CBD18:
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax]
lea	ebp, [esi+8]
push	ecx
mov	ecx, ebp
call	sub_67A3D0
mov	edx, [esp+10h+arg_4]
mov	eax, [edx+4]
push	eax
lea	ecx, [ebp+4]
call	sub_67A3D0
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6CBD45:
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jz	short loc_6CBD62

loc_6CBD52:
mov	edx, [ebp+0]
shl	edx, 4
cmp	[edx+eax+8], edi
lea	ebp, [edx+eax+8]
jnz	short loc_6CBD52

loc_6CBD62:
test	ecx, ecx
jz	short loc_6CBD6C
push	esi
call	sub_6C73F0

loc_6CBD6C:
mov	[ebp+0], ebx
mov	ebp, [esp+10h+arg_4]
mov	eax, [ebp+0]
lea	ebx, [esi+8]
push	eax
mov	ecx, ebx
call	sub_67A3D0
mov	ecx, [ebp+4]
push	ecx
lea	ecx, [ebx+4]
call	sub_67A3D0
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6CBC60 endp

align 10h



sub_6CBDA0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+18h], 0
jnz	short loc_6CBDDC
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0Ch
call	edx
test	eax, eax
jz	short loc_6CBDD7
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 0
mov	[esi+18h], eax
pop	esi
retn

loc_6CBDD7:
xor	eax, eax
mov	[esi+18h], eax

loc_6CBDDC:
mov	eax, [esi+18h]
pop	esi
retn
sub_6CBDA0 endp

align 10h



sub_6CBDF0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+18h]
test	esi, esi
jz	short loc_6CBE28
mov	eax, [esi+4]
mov	ecx, [esi]
push	eax
push	ecx
call	sub_6C7310
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6CBE28:
mov	dword ptr [edi+18h], 0
pop	edi
pop	esi
retn
sub_6CBDF0 endp

align 10h



sub_6CBE40 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 0
cmp	dword ptr [esi+8], 0
jz	loc_6CC01C
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6CC01C
mov	eax, [esi+8]
push	ebp
test	eax, eax
jz	short loc_6CBE82
lea	ebp, [eax-78h]
jmp	short loc_6CBE84

loc_6CBE82:
xor	ebp, ebp

loc_6CBE84:
cmp	dword ptr [esi+1Ch], 1
jl	loc_6CC01B
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
cmp	dword ptr [ebp+110h], 0
jz	loc_6CBFFF
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [esp+14h+var_4]
call	sub_67AE10
mov	ecx, [ebp+110h]
lea	edx, [esp+10h+var_4]
push	edx
call	sub_684810
test	eax, eax
jz	short loc_6CBEE1
lea	edi, [eax+4]
jmp	short loc_6CBEE3

loc_6CBEE1:
xor	edi, edi

loc_6CBEE3:
lea	ecx, [esp+10h+var_4]
call	sub_4E40F0
test	edi, edi
jz	loc_6CBFFF
cmp	dword ptr [esi+1Ch], 2
push	ebx
mov	ebx, [edi]
jl	loc_6CBFFE
push	1
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	1
jz	loc_6CBFC5
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651A30
test	al, al
jnz	loc_6CBFC5
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6CBFFE
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 1Ah
jnz	loc_6CBFFE
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
mov	edi, [edi+34h]
push	0
push	7Ch
call	edx
test	eax, eax
jz	short loc_6CBF8B
push	1FF8h
mov	ecx, eax
call	sub_713080
mov	esi, eax
jmp	short loc_6CBF8D

loc_6CBF8B:
xor	esi, esi

loc_6CBF8D:
push	1
push	edi
mov	ecx, esi
call	sub_713120
test	esi, esi
jz	short loc_6CBFA2
mov	ecx, esi
call	sub_70C940

loc_6CBFA2:
mov	ecx, [ebx+8]
test	ecx, ecx
jz	short loc_6CBFAE
call	sub_70E500

loc_6CBFAE:
mov	ecx, ebp
mov	[ebx+8], esi
call	sub_6C4920
test	esi, esi
jz	short loc_6CBFFE
mov	ecx, esi
call	sub_70E500
jmp	short loc_6CBFFE

loc_6CBFC5:
mov	ecx, [ebp+0BCh]
call	sub_6CBDA0
test	eax, eax
jz	short loc_6CBFFE
push	ebx
mov	ecx, eax
call	sub_720540
mov	eax, [ebp+0BCh]
or	byte ptr [eax+150h], 2
mov	eax, [esp+14h+arg_0]
mov	ecx, [eax]
push	ecx
mov	ecx, ebp
call	sub_6C8920
mov	ecx, ebp
call	sub_6C4920

loc_6CBFFE:
pop	ebx

loc_6CBFFF:
mov	eax, [esp+10h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6CC01B
pop	ebp
pop	edi
pop	esi
add	esp, 4
jmp	sub_650DF0

loc_6CC01B:
pop	ebp

loc_6CC01C:
pop	edi
pop	esi
pop	ecx
retn
sub_6CBE40 endp




sub_6CC020 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_4]
mov	eax, [edi]
mov	eax, [eax]
mov	esi, ecx
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
mov	[esp+20h+var_2], 0
mov	[esp+20h+var_1], 0
call	sub_679B00
mov	ebp, [esi]
mov	ebx, eax
test	ebp, ebp
jz	short loc_6CC0A9
mov	edx, [ebp+4]
and	edx, ebx
push	edx
push	edi
mov	ecx, esi
call	sub_683510
test	eax, eax
jl	short loc_6CC0A9
lea	esi, [eax+1]
mov	eax, [edi]
shl	esi, 4
add	esi, ebp
push	eax
mov	ecx, esi
call	sub_67A3D0
mov	edi, [edi+4]
mov	eax, [edi]
test	eax, eax
jz	short loc_6CC090
inc	dword ptr [eax+4]

loc_6CC090:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6CC09C
call	sub_64A400

loc_6CC09C:
mov	ecx, [edi]
pop	edi
mov	[esi+4], ecx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_6CC0A9:
mov	edx, [esp+14h+arg_0]
push	ebx
push	edi
push	edx
mov	ecx, esi
call	sub_6CBB40
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6CC020 endp

align 10h



sub_6CC0C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
mov	eax, [eax]
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	esi, [edi]
mov	ebp, eax
test	esi, esi
jz	short loc_6CC12C
mov	edx, [esi+4]
and	edx, ebp
push	edx
push	ebx
mov	ecx, edi
call	sub_683510
test	eax, eax
jl	short loc_6CC12C
lea	edi, [eax+1]
mov	eax, [ebx]
shl	edi, 4
add	edi, esi
push	eax
mov	ecx, edi
call	sub_67A3D0
mov	ecx, [ebx+4]
push	ecx
lea	ecx, [edi+4]
call	sub_67A3D0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_6CC12C:
mov	edx, [esp+10h+arg_0]
push	ebp
push	ebx
push	edx
mov	ecx, edi
call	sub_6CBC60
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6CC0C0 endp

align 10h



sub_6CC150 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	ebp
mov	ebp, [esp+24h+arg_0]
mov	ecx, [ebp+18h]
push	esi
push	edi
call	sub_668010
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
lea	ecx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_14], ecx
mov	ebx, 1
mov	[esp+2Ch+arg_0], 0
mov	[esp+2Ch+var_18], offset off_143ABCC
mov	edx, [eax]
mov	edx, [edx+68h]
push	ebx
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, eax
call	edx
mov	eax, [esi+8]
mov	edx, [eax+0Ch]
add	esi, 8
push	13h
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6CC1C2
mov	ecx, edi
call	sub_64A430
lea	eax, [esp+2Ch+arg_0]
push	eax
mov	ecx, edi
call	sub_733860

loc_6CC1C2:
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	14h
mov	ecx, esi
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6CC1E8
mov	ecx, esi
call	sub_64A430
mov	edx, [esi]
mov	edx, [edx+8]
lea	eax, [esp+2Ch+arg_0]
push	eax
mov	ecx, esi
call	edx

loc_6CC1E8:
mov	eax, [ebp+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_6CC214
mov	ecx, [ebp+18h]
push	ecx
mov	ecx, eax
call	sub_65EF40
mov	[esp+2Ch+var_1C], eax
jmp	short loc_6CC21C

loc_6CC214:
mov	[esp+2Ch+var_1C], 0

loc_6CC21C:
mov	ecx, [esp+2Ch+arg_0]
test	ecx, ecx
jnz	short loc_6CC228
xor	eax, eax
jmp	short loc_6CC242

loc_6CC228:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8

loc_6CC230:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6CC23E
add	eax, ebx
add	ecx, 10h
cmp	eax, edx
jbe	short loc_6CC230

loc_6CC23E:
lea	ecx, [esp+2Ch+arg_0]

loc_6CC242:
mov	edi, ecx
mov	esi, eax

loc_6CC246:
test	edi, edi
jz	loc_6CC2FB
mov	ecx, [edi]
test	ecx, ecx
jz	loc_6CC2FB
cmp	esi, [ecx+4]
jg	loc_6CC2FB
mov	edx, [ebp+18h]
lea	eax, [esi+1]
shl	eax, 4
add	eax, ecx
mov	ecx, [edx+78h]
mov	eax, [eax]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
add	[eax+8], ebx
mov	[esp+2Ch+var_10], 5
mov	dword ptr [esp+2Ch+var_C], eax
add	[eax+8], ebx
add	dword ptr [eax+8], 0FFFFFFFFh
jnz	short loc_6CC2AD
mov	ecx, eax
call	sub_650DF0

loc_6CC2AD:
mov	ecx, [esp+2Ch+var_1C]
lea	eax, [esp+2Ch+var_10]
push	eax
call	sub_65E720
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	loc_6CC246
add	esi, ebx
cmp	esi, eax
ja	loc_6CC246
mov	edx, esi
shl	edx, 4
lea	ecx, [edx+ecx+8]

loc_6CC2E4:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	loc_6CC246
add	esi, ebx
add	ecx, 10h
cmp	esi, eax
jbe	short loc_6CC2E4
jmp	loc_6CC246

loc_6CC2FB:
mov	esi, [esp+2Ch+var_1C]
mov	ecx, [ebp+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6CC313
mov	ecx, esi
call	sub_64B3B0

loc_6CC313:
lea	ecx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_18], offset off_143A4DC
call	sub_6C79F0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_6CC150 endp

align 10h



sub_6CC330 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	ecx, [esi+4]
push	eax
push	ecx
call	sub_6C7740
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6CC35F
call	sub_64B3B0

loc_6CC35F:
test	[esp+4+arg_0], 1
jz	short loc_6CC374
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6CC374:
mov	eax, esi
pop	esi
retn	4
sub_6CC330 endp

align 10h



sub_6CC380 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+110h]
test	esi, esi
jz	short loc_6CC3A3
mov	ecx, esi
call	sub_6C7960
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6CC3A3:
mov	dword ptr [edi+110h], 0
pop	edi
pop	esi
retn
sub_6CC380 endp




sub_6CC3B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+110h], 0
jnz	short loc_6CC3F0
mov	ecx, dword_1855FC0
lea	edx, [esp+14h+var_C]
push	edx
mov	[esp+18h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	4
push	esi
call	eax
test	eax, eax
jz	short loc_6CC3E8
mov	dword ptr [eax], 0
jmp	short loc_6CC3EA

loc_6CC3E8:
xor	eax, eax

loc_6CC3EA:
mov	[esi+110h], eax

loc_6CC3F0:
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_6CC3FB
inc	dword ptr [eax+4]

loc_6CC3FB:
mov	ecx, [esp+14h+arg_0]
push	ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+var_10], eax
call	sub_67AE10
mov	ecx, [esi+110h]
lea	edx, [esp+14h+arg_4]
mov	[esp+14h+var_8], edx
lea	edx, [esp+14h+var_8]
push	edx
lea	eax, [esp+18h+var_10]
push	ecx
mov	[esp+1Ch+var_4], eax
call	sub_6CC020
mov	esi, [esp+14h+arg_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6CC454
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6CC454:
mov	ecx, [esp+14h+var_10]
pop	esi
test	ecx, ecx
jz	short loc_6CC462
call	sub_64A400

loc_6CC462:
add	esp, 10h
retn	8
sub_6CC3B0 endp

align 10h



sub_6CC470 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	qword ptr -74h
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 80h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+80h+var_4], eax
push	esi
mov	esi, [esp+84h+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [esp+88h+arg_8]
test	ecx, ecx
jz	loc_6CC5BF
cmp	byte ptr [ecx],	6
jnz	loc_6CC5BF
mov	eax, [esi+18h]
push	ebp
push	eax
call	sub_652C20
mov	ecx, [edi+0BCh]
mov	ebp, eax
mov	byte ptr [esp+8Ch+var_74], 0
call	sub_6CBDA0
mov	[esp+8Ch+var_48], eax
lea	ecx, [esp+8Ch+var_74]
test	eax, eax
jz	loc_6CCABB
mov	eax, [esi+18h]
push	ecx
add	eax, 78h
push	offset aSubstring ; "subString"
add	ebp, 10h
push	eax
mov	ecx, ebp
mov	[esp+98h+var_C], 0
call	sub_64AEF0
test	al, al
jz	loc_6CCA64
mov	edx, [esi+18h]
push	ebx
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+9Ch+var_80]
push	eax
lea	ecx, [esp+0A0h+var_74]
call	sub_652F60
lea	ecx, [esp+90h+var_80]
call	sub_650650
mov	ebx, eax
cmp	ebx, 13h
jb	short loc_6CC526
mov	ebx, 13h

loc_6CC526:
mov	edx, [esp+90h+var_80]
mov	eax, [edx]
lea	ecx, [ebx+1]
push	ecx
push	eax
lea	ecx, [esp+98h+var_34]
push	ecx
call	sub_67BBC0
mov	[esp+90h+var_8], bl
cmp	bl, 0Fh
jbe	loc_6CC5D8
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_6CC56C
mov	ecx, edi
call	sub_658B70
test	eax, eax
jnz	short loc_6CC56C
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
mov	eax, [eax+78h]

loc_6CC56C:
mov	ecx, [esp+90h+arg_4]
mov	edx, [eax+8]
add	eax, 8
mov	eax, [edx]
push	ecx
push	eax
push	offset aS_setimagesubs ; "%s.setImageSubstitutions() failed for	#"...
add	edi, 0Ch
push	edi
call	sub_64AE70
mov	eax, [esp+0A0h+var_80]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 10h
cmp	dword ptr [eax], 0
jnz	short loc_6CC5A4
call	sub_650DF0

loc_6CC5A4:
mov	ecx, [esp+90h+var_C]
test	ecx, ecx
jz	short loc_6CC5B4
call	sub_64A400

loc_6CC5B4:
lea	ecx, [esp+90h+var_74]
call	sub_652830
pop	ebx

loc_6CC5BE:
pop	ebp

loc_6CC5BF:
mov	ecx, [esp+88h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 80h
retn	0Ch

loc_6CC5D8:
mov	eax, [esp+90h+var_80]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6CC5EE
call	sub_650DF0

loc_6CC5EE:
mov	eax, [esi+18h]
fldz
lea	ecx, [esp+90h+var_74]
fstp	[esp+90h+var_54]
push	ecx
add	eax, 78h
push	offset aImage	; "image"
push	eax
mov	ecx, ebp
mov	[esp+9Ch+var_78], 0
call	sub_64AEF0
test	al, al
jz	loc_6CC704
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+94h+var_74]
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_6CC704
mov	eax, [ebx+10h]
mov	edx, [eax+8]
lea	ecx, [ebx+10h]
call	edx
cmp	eax, 1Ah
jnz	loc_6CC704
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
mov	ebx, [ebx+34h]
push	0
push	7Ch
call	eax
test	eax, eax
jz	short loc_6CC677
push	1FF8h
mov	ecx, eax
call	sub_713080
mov	[esp+8Ch+var_7C], eax
jmp	short loc_6CC67F

loc_6CC677:
mov	[esp+8Ch+var_7C], 0

loc_6CC67F:
mov	ecx, [esp+8Ch+var_7C]
push	1
push	ebx
call	sub_713120
mov	ecx, [ebx+0Ch]
mov	edx, [ecx]
mov	edx, [edx+14h]
lea	eax, [esp+8Ch+var_40]
push	eax
call	edx
mov	eax, [esp+90h+var_3C]
sub	eax, [esp+90h+var_44]
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
mov	[esp+90h+var_64], eax
mov	eax, [esp+90h+var_38]
fild	[esp+90h+var_64]
sub	eax, [esp+90h+var_40]
fstp	[esp+90h+var_64]
lea	ecx, [eax+eax*4]
fld	[esp+90h+var_64]
add	ecx, ecx
fst	[esp+90h+var_58]
add	ecx, ecx
mov	[esp+90h+var_7C], ecx
fild	[esp+90h+var_7C]
fstp	[esp+90h+var_7C]
fld	[esp+90h+var_7C]
fst	[esp+90h+var_50]
fldz
fld	st
fucomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 44h
jnp	short loc_6CC74C
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_6CC750
mov	ebx, [esp+90h+var_80]
test	ebx, ebx
jnz	loc_6CC7A9

loc_6CC704:
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_6CC725
mov	ecx, edi
call	sub_658B70
test	eax, eax
jnz	short loc_6CC725
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
mov	eax, [eax+78h]

loc_6CC725:
mov	ecx, [esp+90h+arg_4]
mov	edx, [eax+8]
add	eax, 8
mov	eax, [edx]
push	ecx
push	eax
push	offset aS_setimagesu_0 ; "%s.setImageSubstitutions() failed for	#"...
add	edi, 0Ch
push	edi
call	sub_64AE70
add	esp, 10h
jmp	loc_6CC5A4

loc_6CC74C:
fstp	st
fstp	st

loc_6CC750:
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_6CC771
mov	ecx, edi
call	sub_658B70
test	eax, eax
jnz	short loc_6CC771
mov	edx, [edi]
mov	eax, [edx+6Ch]
mov	ecx, edi
call	eax
mov	eax, [eax+78h]

loc_6CC771:
mov	ecx, [esp+90h+arg_4]
mov	edx, [eax+8]
add	eax, 8
mov	eax, [edx]
push	ecx
push	eax
push	offset aS_setimagesu_1 ; "%s.setImageSubstitutions() failed for	#"...
add	edi, 0Ch
push	edi
call	sub_64AE70
mov	ecx, [esp+0A0h+var_80]
add	esp, 10h
test	ecx, ecx
jz	loc_6CC5A4
call	sub_70E500
jmp	loc_6CC5A4

loc_6CC7A9:
mov	eax, [esi+18h]
lea	ecx, [esp+90h+var_74]
push	ecx
add	eax, 78h
push	offset aWidth	; "width"
push	eax
mov	ecx, ebp
call	sub_64AEF0
test	al, al
jz	short loc_6CC7DC
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+94h+var_74]
call	sub_653400
fmul	ds:dbl_15FCE20
fstp	[esp+90h+var_58]

loc_6CC7DC:
mov	eax, [esi+18h]
lea	ecx, [esp+90h+var_74]
push	ecx
add	eax, 78h
push	offset aHeight	; "height"
push	eax
mov	ecx, ebp
call	sub_64AEF0
test	al, al
jz	short loc_6CC80F
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+94h+var_74]
call	sub_653400
fmul	ds:dbl_15FCE20
fstp	[esp+90h+var_50]

loc_6CC80F:
mov	eax, [esi+18h]
lea	ecx, [esp+90h+var_74]
push	ecx
add	eax, 78h
push	offset aBaselinex ; "baseLineX"
push	eax
mov	ecx, ebp
call	sub_64AEF0
test	al, al
jz	short loc_6CC842
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+94h+var_74]
call	sub_653400
fmul	ds:dbl_15FCE20
fstp	[esp+90h+var_54]

loc_6CC842:
mov	eax, [esi+18h]
lea	ecx, [esp+90h+var_74]
push	ecx
add	eax, 78h
push	offset aBaseliney ; "baseLineY"
push	eax
mov	ecx, ebp
call	sub_64AEF0
test	al, al
jz	short loc_6CC873
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+94h+var_74]
call	sub_653400
fmul	ds:dbl_15FCE20
jmp	short loc_6CC87D

loc_6CC873:
fld	[esp+90h+var_7C]
fsub	ds:dbl_15FCE20

loc_6CC87D:
mov	eax, [esi+18h]
fstp	[esp+90h+var_4C]
lea	ecx, [esp+90h+var_74]
push	ecx
add	eax, 78h
push	offset aId_2	; "id"
push	eax
mov	ecx, ebp
call	sub_64AEF0
test	al, al
jz	short loc_6CC8CD
mov	edx, [esi+18h]
push	0
push	0FFFFFFFFh
push	edx
lea	eax, [esp+9Ch+var_78]
push	eax
lea	ecx, [esp+0A0h+var_74]
call	sub_652F60
mov	eax, [esp+90h+var_78]
mov	ebp, [eax]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6CC8D1
call	sub_650DF0
jmp	short loc_6CC8D1

loc_6CC8CD:
mov	ebp, [esp+90h+var_78]

loc_6CC8D1:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
test	eax, eax
jz	short loc_6CC8F7
mov	ecx, eax
call	sub_6C6290
mov	esi, eax
jmp	short loc_6CC8F9

loc_6CC8F7:
xor	esi, esi

loc_6CC8F9:
mov	ecx, [esp+90h+var_C]
test	ecx, ecx
jz	short loc_6CC909
call	sub_64A400

loc_6CC909:
mov	ecx, ebx
mov	[esp+90h+var_C], esi
call	sub_70C940
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6CC923
call	sub_70E500

loc_6CC923:
fld	[esp+90h+var_54]
mov	[esi+8], ebx
call	__ftol2_sse
fld	[esp+90h+var_4C]
mov	ecx, [esp+90h+var_C]
mov	[ecx+10h], eax
call	__ftol2_sse
fld	[esp+90h+var_58]
mov	edx, [esp+90h+var_C]
fnstcw	word ptr [esp+90h+var_80]
mov	[edx+14h], eax
movzx	eax, word ptr [esp+90h+var_80]
mov	ecx, [esp+90h+var_C]
or	eax, 0C00h
mov	dword ptr [esp+90h+var_60], eax
fldcw	word ptr [esp+90h+var_60]
fistp	[esp+90h+var_60]
mov	eax, dword ptr [esp+90h+var_60]
mov	[ecx+18h], eax
fldcw	word ptr [esp+90h+var_80]
fld	[esp+90h+var_50]
fnstcw	word ptr [esp+90h+var_80]
movzx	eax, word ptr [esp+90h+var_80]
or	eax, 0C00h
mov	dword ptr [esp+90h+var_60], eax
mov	eax, [esp+90h+var_C]
fldcw	word ptr [esp+90h+var_60]
fistp	[esp+90h+var_60]
mov	edx, dword ptr [esp+90h+var_60]
mov	[eax+1Ch], edx
fldcw	word ptr [esp+90h+var_80]
test	ebp, ebp
jz	short loc_6CC9C0
mov	ecx, [esp+90h+var_C]
push	ecx
push	ebp
mov	ecx, edi
call	sub_6CC3B0

loc_6CC9C0:
mov	eax, [esp+90h+var_C]
fld	dword ptr [eax+28h]
add	eax, 20h
fsub	[esp+90h+var_54]
mov	ecx, [esp+90h+var_48]
lea	edx, [esp+90h+var_34]
push	edx
fstp	dword ptr [eax+8]
fld	dword ptr [eax+14h]
fsub	[esp+94h+var_4C]
fstp	dword ptr [eax+14h]
mov	eax, [esp+94h+var_C]
fld	[esp+94h+var_58]
add	eax, 20h
fdiv	[esp+94h+var_64]
fstp	dword ptr [esp+94h+var_60]
fld	[esp+94h+var_50]
fdiv	[esp+94h+var_7C]
fstp	[esp+94h+var_78]
fld	dword ptr [esp+94h+var_60]
fld	st
fmul	dword ptr [eax]
fstp	dword ptr [eax]
fld	dword ptr [eax+4]
fmul	st, st(1)
fstp	dword ptr [eax+4]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
fld	dword ptr [eax+0Ch]
fld	[esp+94h+var_78]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+0Ch]
fld	dword ptr [eax+10h]
fmul	st, st(1)
fstp	dword ptr [eax+10h]
fmul	dword ptr [eax+14h]
fstp	dword ptr [eax+14h]
call	sub_720230
mov	eax, [edi+0BCh]
or	byte ptr [eax+150h], 2
mov	ecx, edi
call	sub_6C4920
mov	ecx, ebx
call	sub_70E500
jmp	loc_6CC5A4

loc_6CCA64:
mov	eax, [edi+94h]
test	eax, eax
jnz	short loc_6CCA85
mov	ecx, edi
call	sub_658B70
test	eax, eax
jnz	short loc_6CCA85
mov	eax, [edi]
mov	edx, [eax+6Ch]
mov	ecx, edi
call	edx
mov	eax, [eax+78h]

loc_6CCA85:
mov	ecx, [esp+8Ch+arg_4]
mov	edx, [eax+8]
add	eax, 8
mov	eax, [edx]
push	ecx
push	eax
push	offset aS_setimagesu_2 ; "%s.setImageSubstitutions() failed for	#"...
add	edi, 0Ch
push	edi
call	sub_64AE70
mov	ecx, [esp+9Ch+var_C]
add	esp, 10h
test	ecx, ecx
jz	short loc_6CCAB7
call	sub_64A400

loc_6CCAB7:
lea	ecx, [esp+8Ch+var_74]

loc_6CCABB:
call	sub_652830
jmp	loc_6CC5BE
sub_6CC470 endp

align 10h



sub_6CCAD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0
cmp	dword ptr [edi+8], 0
jz	loc_6CCBF7
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 4
jnz	loc_6CCBF7
push	ebx
mov	ebx, [edi+8]
test	ebx, ebx
jz	short loc_6CCB11
add	ebx, 0FFFFFF88h
jmp	short loc_6CCB13

loc_6CCB11:
xor	ebx, ebx

loc_6CCB13:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6CCBF6
push	0
mov	ecx, edi
call	sub_651EC0
cmp	byte ptr [eax],	1
jnz	short loc_6CCB4E
mov	ecx, ebx
call	sub_6CC380
mov	ecx, [ebx+0BCh]
call	sub_6CBDF0
mov	ebx, [ebx+0BCh]
or	byte ptr [ebx+150h], 2
pop	ebx
pop	edi
pop	esi
retn

loc_6CCB4E:
mov	eax, [edi+18h]
push	ebp
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebp, eax
test	ebp, ebp
jz	short loc_6CCBBB
mov	edx, [ebp+10h]
mov	eax, [edx+8]
lea	ecx, [ebp+10h]
call	eax
cmp	eax, 7
jnz	short loc_6CCBA2
mov	eax, [ebp+3Ch]
xor	esi, esi
mov	[esp+10h+arg_0], eax
test	eax, eax
jle	short loc_6CCBF5

loc_6CCB86:
mov	ecx, [ebp+38h]
mov	edx, [ecx+esi*4]
push	edx
push	esi
push	edi
mov	ecx, ebx
call	sub_6CC470
inc	esi
cmp	esi, [esp+10h+arg_0]
jl	short loc_6CCB86
pop	ebp
pop	ebx
pop	edi
pop	esi
retn

loc_6CCBA2:
push	0
mov	ecx, edi
call	sub_651EC0
push	eax
push	0
push	edi
mov	ecx, ebx
call	sub_6CC470
pop	ebp
pop	ebx
pop	edi
pop	esi
retn

loc_6CCBBB:
mov	eax, [ebx+94h]
test	eax, eax
jnz	short loc_6CCBDC
mov	ecx, ebx
call	sub_658B70
test	eax, eax
jnz	short loc_6CCBDC
mov	eax, [ebx]
mov	edx, [eax+6Ch]
mov	ecx, ebx
call	edx
mov	eax, [eax+78h]

loc_6CCBDC:
add	eax, 8
mov	eax, [eax]
mov	ecx, [eax]
push	ecx
push	offset aS_setimagesu_3 ; "%s.setImageSubstitutions() failed: para"...
add	ebx, 0Ch
push	ebx
call	sub_64AE70
add	esp, 0Ch

loc_6CCBF5:
pop	ebp

loc_6CCBF6:
pop	ebx

loc_6CCBF7:
pop	edi
pop	esi
retn
sub_6CCAD0 endp

align 10h



sub_6CCC00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_4]
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	edi, ecx
mov	ecx, esi
call	edx
and	eax, 0FF00h
cmp	eax, 200h
jnz	short loc_6CCC76
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+3Ch]
call	edx
push	eax
lea	ecx, [esp+14h+arg_4]
call	sub_67AE10
mov	ecx, [edi+4]
lea	eax, [esp+10h+arg_4]
mov	edx, eax
mov	[esp+10h+var_8], eax
lea	eax, [esp+10h+var_8]
push	eax
push	ecx
mov	[esp+18h+var_4], edx
call	sub_6CC0C0
mov	esi, [esp+10h+arg_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6CCC76
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6CCC76:
pop	edi
pop	esi
add	esp, 8
retn	10h
sub_6CCC00 endp

align 10h



sub_6CCC80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	eax, [esp+4+arg_C]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_8]
push	ecx
mov	esi, ecx
mov	ecx, esp
mov	[ecx], eax
mov	[esp+18h+var_4], eax
mov	eax, [esp+18h+arg_4]
push	edi
push	eax
mov	ecx, esi
call	sub_65BDC0
mov	ebp, [esp+14h+arg_0]
lea	ebx, [esi+78h]
mov	dword ptr [esi], offset	off_143B350
mov	dword ptr [esi+0Ch], offset off_143B344
mov	dword ptr [ebx], offset	off_143B2F0
mov	[esi+0B8h], ebp
mov	dword ptr [esi+0BCh], 0
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
mov	ecx, [eax+78h]
mov	eax, [ebp+4Ch]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	[esi+0D0h], eax
inc	dword ptr [eax+8]
lea	ecx, [esi+0E8h]
mov	byte ptr [esi+0D4h], 0
call	sub_67AB70
lea	ecx, [esi+0F4h]
mov	dword ptr [esi+0ECh], 0
mov	byte ptr [esi+0F0h], 1
call	sub_6C69C0
mov	ecx, [esp+14h+arg_4]
xor	eax, eax
mov	[esi+108h], eax
mov	[esi+110h], eax
mov	edx, [ecx+1Ch]
xor	ecx, ecx
add	edx, 18h
mov	[esi+0E4h], cx
mov	[esi+0C0h], edx
mov	dword ptr [esi+10Ch], 0FFFFFFFFh
mov	edx, [ebp+54h]
mov	[esi+0C4h], edx
mov	cl, [ebp+50h]
shr	cl, 2
test	cl, 1
jz	short loc_6CCD88
mov	edx, 4
mov	[esi+0E4h], dx
jmp	short loc_6CCD91

loc_6CCD88:
xor	ecx, ecx
mov	[esi+0E4h], cx

loc_6CCD91:
mov	dl, [ebp+50h]
shr	dl, 7
test	dl, 1
jz	short loc_6CCDA6
or	word ptr [esi+0E4h], 2
jmp	short loc_6CCDB2

loc_6CCDA6:
mov	ecx, 0FFFDh
and	[esi+0E4h], cx

loc_6CCDB2:
mov	[esi+100h], eax
mov	[esi+104h], eax
mov	al, 0FFh
mov	byte ptr [esp+14h+arg_4+2], al
mov	byte ptr [esp+14h+arg_4+1], al
mov	byte ptr [esp+14h+arg_4], al
mov	byte ptr [esp+14h+arg_4+3], 0
mov	ecx, [esp+14h+arg_4]
mov	edx, 80h
or	[esi+0E4h], dx
mov	byte ptr [esp+14h+arg_4+2], 0
mov	byte ptr [esp+14h+arg_4+1], 0
mov	byte ptr [esp+14h+arg_4], 0
mov	byte ptr [esp+14h+arg_4+3], 0
mov	edx, [esp+14h+arg_4]
mov	[esi+0C8h], ecx
mov	[esi+0CCh], edx
mov	cl, [ebp+50h]
shr	cl, 6
test	cl, 1
jz	short loc_6CCE1C
mov	[esi+0CBh], al
mov	[esi+0CFh], al

loc_6CCE1C:
mov	edx, [edi]
mov	eax, [edx+54h]
mov	ecx, edi
call	eax
push	0Ah
mov	ecx, esi
mov	[esp+18h+arg_4], eax
call	sub_654DE0
push	eax
mov	ecx, esi
call	sub_655B90
mov	ecx, eax
call	sub_66FB70
mov	[esp+14h+arg_8], eax
test	eax, eax
jz	short loc_6CCE56
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6CCE56:
mov	ecx, [esi+80h]
test	ecx, ecx
jz	short loc_6CCE69
call	sub_64B3B0
mov	eax, [esp+14h+arg_8]

loc_6CCE69:
mov	[esi+80h], eax
mov	edx, [edi]
mov	eax, [edx+70h]
mov	ecx, edi
call	eax
add	eax, 78h
push	ebx
push	eax
call	sub_6C22C0
mov	edx, [edi]
mov	eax, [edx+70h]
add	esp, 8
push	ebx
push	ebx
mov	ecx, edi
call	eax
push	eax
call	sub_6C2350
mov	ecx, [esp+20h+arg_4]
add	esp, 0Ch
call	sub_69BA70
mov	ebx, eax
mov	[esp+14h+arg_8], ebx
test	ebx, ebx
jz	short loc_6CCEAF
inc	dword ptr [ebx+4]

loc_6CCEAF:
mov	ecx, [esp+14h+arg_4]
mov	ecx, [ecx+20h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	154h
call	eax
mov	[esp+14h+arg_4], eax
test	eax, eax
jz	short loc_6CCEEC
mov	ecx, esi
call	sub_656460
mov	edx, [edi]
push	eax
mov	eax, [edx+60h]
mov	ecx, edi
call	eax
mov	ecx, [esp+18h+arg_4]
push	eax
push	ebx
call	sub_7257C0
mov	edi, eax
jmp	short loc_6CCEEE

loc_6CCEEC:
xor	edi, edi

loc_6CCEEE:
mov	ecx, [esi+0BCh]
test	ecx, ecx
jz	short loc_6CCEFD
call	sub_64A400

loc_6CCEFD:
mov	[esi+0BCh], edi
lea	ebx, [esi+0F4h]
add	edi, 10h
test	ebx, ebx
jz	short loc_6CCF13
inc	dword ptr [ebx+4]

loc_6CCF13:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6CCF1E
call	sub_64A400

loc_6CCF1E:
mov	[edi], ebx
mov	ecx, [esi+0BCh]
mov	eax, [ecx+8]
or	byte ptr [eax+20h], 2
mov	ecx, esi
call	sub_6C86A0
mov	eax, [ebp+34h]
test	eax, eax
jle	short loc_6CCF47
mov	edx, [esi+0BCh]
mov	[edx+110h], eax

loc_6CCF47:
mov	ecx, [esi+0BCh]
push	1
lea	eax, [ebp+1Ch]
push	eax
call	sub_71F2C0
test	byte ptr [ebp+51h], 1
jz	short loc_6CCF78
mov	eax, [esi+0BCh]
or	byte ptr [eax+14Eh], 20h
mov	eax, [esi+0BCh]
or	byte ptr [eax+14Eh], 40h

loc_6CCF78:
mov	cl, [ebp+50h]
mov	eax, [esi+0BCh]
shr	cl, 1
test	cl, 1
jz	short loc_6CCF91
or	byte ptr [eax+14Eh], 4
jmp	short loc_6CCF98

loc_6CCF91:
and	byte ptr [eax+14Eh], 0FBh

loc_6CCF98:
movzx	eax, word ptr [ebp+50h]
mov	bl, al
shr	bl, 4
and	bl, 1
jz	short loc_6CCFB6
test	byte ptr [ebp+50h], 1
jz	short loc_6CCFB2
shr	al, 1
test	al, 1
jnz	short loc_6CCFB6

loc_6CCFB2:
mov	al, 1
jmp	short loc_6CCFB8

loc_6CCFB6:
xor	al, al

loc_6CCFB8:
test	al, al
jz	short loc_6CCFC7
mov	ecx, [esi+0BCh]
call	sub_71DFE0

loc_6CCFC7:
test	bl, bl
jz	short loc_6CCFD6
mov	ecx, [esi+0BCh]
call	sub_71E000

loc_6CCFD6:
test	byte ptr [ebp+50h], 1
jz	short loc_6CCFE7
mov	ecx, [esi+0BCh]
call	sub_71E020

loc_6CCFE7:
mov	dl, [esi+0E4h]
shr	dl, 2
test	dl, 1
jz	short loc_6CD002
mov	eax, [esi+0BCh]
or	byte ptr [eax+14Eh], 10h

loc_6CD002:
mov	eax, [esi+0B8h]
mov	cx, [eax+50h]
shr	cx, 0Ah
test	cl, 1
jz	short loc_6CD022
mov	eax, [esi+0BCh]
or	byte ptr [eax+14Eh], 40h

loc_6CD022:
mov	edx, [esi+0BCh]
mov	eax, [edx+11Ch]
test	eax, eax
jz	short loc_6CD037
mov	al, [eax+68h]
jmp	short loc_6CD043

loc_6CD037:
mov	eax, [esi+0B8h]
mov	al, [eax+50h]
shr	al, 3

loc_6CD043:
and	al, 1
test	al, al
jz	short loc_6CD05A
mov	ecx, [esi+0B8h]
mov	dl, [ecx+50h]
shr	dl, 5
test	dl, 1
jz	short loc_6CD061

loc_6CD05A:
mov	ecx, esi
call	sub_6C49A0

loc_6CD061:
mov	ecx, [esp+14h+arg_8]
test	ecx, ecx
jz	short loc_6CD06E
call	sub_64A400

loc_6CD06E:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_6CCC80 endp

align 10h



sub_6CD080 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8

sub	esp, 10h
push	esi
mov	esi, ecx
movsx	eax, word ptr [esi+12h]
mov	[esp+14h+var_10], eax
movsx	ecx, word ptr [esi+14h]
fild	[esp+14h+var_10]
mov	[esp+14h+var_C], ecx
fmul	ds:dbl_15FCC90
fdiv	ds:dbl_1437CD0
fstp	[esp+14h+var_10]
fild	[esp+14h+var_C]
fstp	[esp+14h+var_8]
fld	[esp+14h+var_10]
call	__CIcos
fstp	[esp+14h+var_C]
fld	[esp+14h+var_C]
fmul	[esp+14h+var_8]
call	__ftol2_sse
fld	[esp+14h+var_10]
mov	[esi+16h], ax
call	__CIsin
fstp	[esp+14h+var_C]
fld	[esp+14h+var_C]
fmul	[esp+14h+var_8]
call	__ftol2_sse
mov	[esi+18h], ax
pop	esi
add	esp, 10h
retn
sub_6CD080 endp

align 10h



sub_6CD100 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+4]
mov	edx, [esp+arg_0]
cmp	edx, eax
jbe	short loc_6CD118
mov	dword ptr [ecx+4], 0
mov	eax, [ecx+4]
retn	4

loc_6CD118:
sub	eax, edx
mov	[ecx+4], eax
retn	4
sub_6CD100 endp




sub_6CD120 proc	near
mov	eax, 100h
test	[ecx+2Ah], ax
jz	short loc_6CD13D
add	ecx, 10h
call	sub_679930
test	eax, eax
jz	short loc_6CD13D
mov	eax, 1
retn

loc_6CD13D:
xor	eax, eax
retn
sub_6CD120 endp




sub_6CD140 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+128h]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fmul	ds:dbl_15FD690
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD140 endp

align 10h



sub_6CD160 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+129h]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fmul	ds:dbl_15FD690
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD160 endp

align 10h



sub_6CD180 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD191
or	byte ptr [ecx+14Fh], 1
retn	4

loc_6CD191:
and	byte ptr [ecx+14Fh], 0FEh
retn	4
sub_6CD180 endp

align 10h



sub_6CD1A0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD1B1
or	byte ptr [ecx+14Fh], 2
retn	4

loc_6CD1B1:
and	byte ptr [ecx+14Fh], 0FDh
retn	4
sub_6CD1A0 endp

align 10h



sub_6CD1C0 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+12Ah]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fmul	ds:dbl_15FD690
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD1C0 endp

align 10h



sub_6CD1E0 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+12Ch]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fmul	ds:dbl_15FD690
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD1E0 endp

align 10h



sub_6CD200 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+12Dh]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fmul	ds:dbl_15FD690
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD200 endp

align 10h



sub_6CD220 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+12Eh]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fmul	ds:dbl_15FD690
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD220 endp

align 10h



sub_6CD240 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD251
or	byte ptr [ecx+12Bh], 20h
retn	4

loc_6CD251:
and	byte ptr [ecx+12Bh], 0DFh
retn	4
sub_6CD240 endp

align 10h



sub_6CD260 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD271
or	byte ptr [ecx+12Bh], 40h
retn	4

loc_6CD271:
and	byte ptr [ecx+12Bh], 0BFh
retn	4
sub_6CD260 endp

align 10h



sub_6CD280 proc	near

arg_0= dword ptr  4

cmp	[esp+arg_0], 1
jbe	short loc_6CD291
or	byte ptr [ecx+12Bh], 80h
retn	4

loc_6CD291:
and	byte ptr [ecx+12Bh], 7Fh
retn	4
sub_6CD280 endp

align 10h



; int __stdcall	sub_6CD2A0(float)
sub_6CD2A0 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
push	esi
fld	ds:dbl_15FD478
mov	esi, ecx
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fmul	ds:dbl_15FCE18
call	__ftol2_sse
lea	ecx, [esi+120h]
mov	[esi+132h], ax
call	sub_6CD080
pop	esi
retn	4
sub_6CD2A0 endp

align 10h



sub_6CD2E0 proc	near

var_4= dword ptr -4

push	ecx
movsx	eax, word ptr [ecx+132h]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fdiv	ds:dbl_15FCE18
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD2E0 endp

align 10h



; int __stdcall	sub_6CD300(float)
sub_6CD300 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
push	esi
fmul	ds:dbl_15FCE20
mov	esi, ecx
call	__ftol2_sse
lea	ecx, [esi+120h]
mov	[esi+134h], ax
call	sub_6CD080
pop	esi
retn	4
sub_6CD300 endp

align 10h



sub_6CD330 proc	near

var_4= dword ptr -4

push	ecx
movsx	eax, word ptr [ecx+134h]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fdiv	ds:dbl_15FCE20
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD330 endp

align 10h



sub_6CD350 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, byte ptr [ecx+12Fh]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fdiv	ds:dbl_15FCCF8
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD350 endp

align 10h



sub_6CD370 proc	near

arg_0= byte ptr	 4

mov	al, [esp+arg_0]
or	byte ptr [ecx+150h], 1
add	al, al
add	al, al
xor	al, [ecx+14Ch]
and	al, 0Ch
xor	[ecx+14Ch], al
retn	4
sub_6CD370 endp




sub_6CD390 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD3A2
or	word ptr [ecx+0E4h], 10h
retn	4

loc_6CD3A2:
mov	eax, 0FFEFh
and	[ecx+0E4h], ax
retn	4
sub_6CD390 endp

align 10h



sub_6CD3C0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD3D2
or	word ptr [ecx+0E4h], 20h
retn	4

loc_6CD3D2:
mov	eax, 0FFDFh
and	[ecx+0E4h], ax
retn	4
sub_6CD3C0 endp

align 10h



sub_6CD3F0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD402
or	word ptr [ecx+0E4h], 8
retn	4

loc_6CD402:
mov	eax, 0FFF7h
and	[ecx+0E4h], ax
retn	4
sub_6CD3F0 endp

align 10h



sub_6CD420 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD436
mov	eax, 100h
or	[ecx+0E4h], ax
retn	4

loc_6CD436:
mov	edx, 0FEFFh
and	[ecx+0E4h], dx
retn	4
sub_6CD420 endp

align 10h



sub_6CD450 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD466
mov	eax, 200h
or	[ecx+0E4h], ax
retn	4

loc_6CD466:
mov	edx, 0FDFFh
and	[ecx+0E4h], dx
retn	4
sub_6CD450 endp

align 10h



sub_6CD480 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD496
mov	eax, 400h
or	[ecx+0E4h], ax
retn	4

loc_6CD496:
mov	edx, 0FBFFh
and	[ecx+0E4h], dx
retn	4
sub_6CD480 endp

align 10h



sub_6CD4B0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6CD4C6
mov	eax, 800h
or	[ecx+0E4h], ax
retn	4

loc_6CD4C6:
mov	edx, 0F7FFh
and	[ecx+0E4h], dx
retn	4
sub_6CD4B0 endp

align 10h



sub_6CD4E0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h

sub	esp, 14h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0D0h]
cmp	dword ptr [eax+10h], 0
lea	ebx, [esi+0D0h]
jz	loc_6CD5C7
mov	edx, [esi]
mov	eax, [edx+70h]
push	edi
call	eax
mov	edi, eax
test	edi, edi
jz	loc_6CD5BE
push	0
push	0
push	0
push	0
lea	ecx, [esp+30h+var_10]
push	ecx
push	ebx
mov	ecx, edi
mov	[esp+38h+var_10], 0
call	sub_6726F0
test	al, al
jz	short loc_6CD5A0
lea	ebx, [esi+0D4h]
push	ebx
push	edi
lea	ecx, [esp+28h+var_10]
call	sub_6540A0
test	al, al
jnz	short loc_6CD5B5
lea	edx, [esp+20h+var_10]
push	edx
mov	ecx, ebx
call	sub_652520
push	0
push	0FFFFFFFFh
push	edi
lea	eax, [esp+2Ch+var_14]
push	eax
lea	ecx, [esp+30h+var_10]
call	sub_652F60
mov	eax, [esp+20h+var_14]
mov	ecx, [eax]
mov	edx, [esi]
mov	edx, [edx+1D4h]
push	0
push	0
push	ecx
mov	ecx, esi
call	edx
mov	eax, [esp+20h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6CD58E
call	sub_650DF0

loc_6CD58E:
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 14h
retn

loc_6CD5A0:
mov	eax, [esi]
mov	edx, [eax+1D4h]
push	0
push	0
push	offset byte_146D660
mov	ecx, esi
call	edx

loc_6CD5B5:
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6CD5BE:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 14h
retn

loc_6CD5C7:
pop	esi
mov	al, 1
pop	ebx
add	esp, 14h
retn
sub_6CD4E0 endp

align 10h



sub_6CD5D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
movzx	edx, word ptr [esi+0E4h]
mov	ecx, [esp+4+arg_4]
mov	al, dl
shr	al, 1
and	al, 1
test	cl, cl
jz	short loc_6CD5F1
test	al, al
jnz	short loc_6CD602
or	edx, 2
jmp	short loc_6CD5FB

loc_6CD5F1:
test	al, al
jz	short loc_6CD602
and	edx, 0FFFDh

loc_6CD5FB:
mov	[esi+0E4h], dx

loc_6CD602:
mov	eax, [esi]
mov	edx, [eax+1D4h]
push	1
push	ecx
mov	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, esi
call	edx
pop	esi
retn	8
sub_6CD5D0 endp

align 10h



sub_6CD620 proc	near

var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	ebx
mov	ebx, [esp+108h+arg_0]
push	ebp
push	esi
mov	esi, ecx
movzx	ecx, word ptr [esi+0E4h]
mov	al, cl
shr	al, 1
and	al, 1
cmp	byte ptr [esp+110h+arg_4], 0
push	edi
jz	short loc_6CD661
test	al, al
jnz	short loc_6CD672
or	ecx, 2
jmp	short loc_6CD66B

loc_6CD661:
test	al, al
jz	short loc_6CD672
and	ecx, 0FFFDh

loc_6CD66B:
mov	[esi+0E4h], cx

loc_6CD672:
push	ebx
call	sub_67B340
mov	edi, eax
add	esp, 4
cmp	edi, 100h
jnb	short loc_6CD68B
lea	ebp, [esp+114h+var_104]
jmp	short loc_6CD6A2

loc_6CD68B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0
lea	edx, [edi+edi*4+1]
push	edx
push	esi
call	eax
mov	ebp, eax

loc_6CD6A2:
push	0FFFFFFFFh
push	ebx
push	ebp
call	sub_67BB00
mov	eax, [esp+114h+arg_4]
mov	edx, [esi]
mov	edx, [edx+1D4h]
push	1
push	eax
push	ebp
mov	ecx, esi
call	edx
cmp	edi, 100h
jb	short loc_6CD6D8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebp
call	edx

loc_6CD6D8:
mov	ecx, [esp+114h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	8
sub_6CD620 endp

align 10h



sub_6CD700 proc	near
mov	eax, offset byte_146D660
retn	4
sub_6CD700 endp

align 10h
; [00000006 BYTES: COLLAPSED FUNCTION __RTC_NumErrors_5. PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_6CD720 proc	near
mov	eax, 627DAFCFh
retn
sub_6CD720 endp

align 10h



sub_6CD730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+10Ch]
mov	edx, [esp+arg_4]
cmp	eax, 0FFFFFFFFh
jz	short loc_6CD743
cmp	eax, edx
jnz	short loc_6CD75A

loc_6CD743:
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_6559B0
test	al, al
jz	short loc_6CD75A
mov	eax, 1
retn	8

loc_6CD75A:
xor	eax, eax
retn	8
sub_6CD730 endp

align 10h



sub_6CD760 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+10Ch]
mov	edx, [esp+arg_4]
cmp	eax, 0FFFFFFFFh
jz	short loc_6CD773
cmp	eax, edx
jnz	short loc_6CD78A

loc_6CD773:
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_654F60
test	al, al
jz	short loc_6CD78A
mov	eax, 1
retn	8

loc_6CD78A:
xor	eax, eax
retn	8
sub_6CD760 endp

align 10h



sub_6CD790 proc	near
sub	ecx, 0Ch
jmp	sub_6D33B0
sub_6CD790 endp

align 10h



sub_6CD7A0 proc	near

arg_0= byte ptr	 4

sub	ecx, 78h
jmp	sub_6D33B0
sub_6CD7A0 endp

align 10h



sub_6CD7B0 proc	near
sub	ecx, 78h
jmp	__RTC_NumErrors_5
sub_6CD7B0 endp

align 10h



sub_6CD7C0 proc	near

arg_0= dword ptr  4

movzx	eax, byte ptr [ecx+12Fh]
mov	edx, [esp+arg_0]
shl	eax, 18h
and	edx, offset sub_FFFFFF
or	eax, edx
mov	[ecx+13Ch], eax
retn	4
sub_6CD7C0 endp

align 10h



sub_6CD7E0 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, word ptr [ecx+14Ah]
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
fdiv	ds:dbl_15FCE20
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_6CD7E0 endp

align 10h



sub_6CD800 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi-0F4h]
mov	edx, [eax+54h]
lea	ecx, [esi-0F4h]
call	edx
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	3
call	eax
test	eax, eax
jz	short loc_6CD833
cmp	dword ptr [eax+0Ch], 0
jz	short loc_6CD833
or	byte ptr [esi+8], 1
jmp	short loc_6CD837

loc_6CD833:
and	byte ptr [esi+8], 0FEh

loc_6CD837:
pop	esi
test	eax, eax
jz	short locret_6CD843
mov	ecx, eax
jmp	sub_64A430

locret_6CD843:
retn
sub_6CD800 endp

align 10h



sub_6CD850 proc	near

arg_0= byte ptr	 4

push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
test	byte ptr [esi+0A0h], 0Ch
jnz	loc_6CD8ED
mov	al, [esi+76h]
shr	al, 6
not	al
test	al, 1
jz	short loc_6CD8ED
mov	cx, [esi+0E4h]
shr	cx, 0Eh
push	edi
test	cl, 1
jnz	short loc_6CD8CD
mov	edx, [esi+0D0h]
cmp	[edx+10h], ebx
jnz	short loc_6CD8CD
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
test	byte ptr [esi+0A0h], 1
mov	ecx, [esi+0BCh]
mov	edi, [ecx+11Ch]
jz	short loc_6CD8DE
test	edi, edi
jz	short loc_6CD8DE
mov	dl, [edi+68h]
not	dl
test	dl, 1
jz	short loc_6CD8C3
push	esi
mov	ecx, eax
call	sub_693B60
test	al, al
jnz	short loc_6CD8CD

loc_6CD8C3:
mov	al, [edi+68h]
shr	al, 5
test	al, 1
jz	short loc_6CD8DE

loc_6CD8CD:
cmp	[esp+0Ch+arg_0], bl
jnz	short loc_6CD902
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn	4

loc_6CD8DE:
cmp	[esp+0Ch+arg_0], bl
jz	short loc_6CD902
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_6CD8ED:
cmp	[esp+8+arg_0], bl
jz	short loc_6CD8FB
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_6CD8FB:
pop	esi
mov	eax, ebx
pop	ebx
retn	4

loc_6CD902:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	4
sub_6CD850 endp

align 10h



sub_6CD910 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	bl, [esi+0E4h]
and	bl, 1
jz	short loc_6CD932
mov	eax, [esi+0BCh]
test	byte ptr [eax+14Eh], 8
jnz	short loc_6CD932
mov	al, 1
jmp	short loc_6CD934

loc_6CD932:
xor	al, al

loc_6CD934:
test	al, al
jz	short loc_6CD945
mov	ecx, [esi+0BCh]
call	sub_71DFE0
jmp	short loc_6CD952

loc_6CD945:
mov	eax, [esi+0BCh]
and	byte ptr [eax+14Eh], 0FEh

loc_6CD952:
test	bl, bl
jz	short loc_6CD963
mov	ecx, [esi+0BCh]
call	sub_71E000
jmp	short loc_6CD970

loc_6CD963:
mov	eax, [esi+0BCh]
and	byte ptr [eax+14Eh], 0FDh

loc_6CD970:
mov	edx, [esi]
mov	eax, [edx+160h]
mov	ecx, esi
pop	esi
pop	ebx
jmp	eax
sub_6CD910 endp

align 10h



sub_6CD980 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

cmp	byte ptr [esp+arg_8], 0
push	esi
push	edi
mov	eax, ecx
jz	short loc_6CDA05
mov	ecx, [eax+0ECh]
test	ecx, ecx
jz	short loc_6CD9D7
cmp	dword ptr [ecx], 0
jz	short loc_6CD9D7
mov	ecx, [esp+8+arg_4]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	eax, [eax+0E8h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	ecx, [esp+8+arg_0]
inc	dword ptr [eax+8]
pop	edi
mov	[ecx], eax
mov	eax, ecx
pop	esi
retn	0Ch

loc_6CD9D7:
mov	cl, [eax+0E4h]
mov	eax, [eax+0BCh]
shr	cl, 1
test	cl, 1
jz	short loc_6CDA0B
lea	edx, [esp+8+arg_8]
push	edx
mov	ecx, eax
call	sub_71E350
mov	ecx, [esp+8+arg_4]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
jmp	short loc_6CDA24

loc_6CDA05:
mov	eax, [eax+0BCh]

loc_6CDA0B:
lea	ecx, [esp+8+arg_8]
push	ecx
mov	ecx, eax
call	sub_71E330
mov	edx, [esp+8+arg_4]
mov	ecx, [edx+78h]
mov	ecx, [ecx+280h]

loc_6CDA24:
mov	eax, [eax]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
inc	dword ptr [eax+8]
mov	esi, [esp+8+arg_8]
mov	edi, [esp+8+arg_0]
mov	[edi], eax
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6CDA6F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6CDA6F:
mov	eax, edi
pop	edi
pop	esi
retn	0Ch
sub_6CD980 endp

align 10h



sub_6CDA80 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 60h
push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 0Bh
test	al, 1
jnz	loc_6CDC67
mov	edx, [esi]
mov	eax, [edx+10h]
call	eax
test	al, al
jz	loc_6CDC67
push	ebp
mov	ebp, [esp+68h+arg_4]
cmp	[ebp+4], esi
jz	loc_6CDC53
mov	eax, [ebp+8]
mov	ecx, [ebp+0]
mov	edx, [esi]
mov	edx, [edx+0C4h]
push	eax
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_6CDC53
fld	dword ptr [esi+44h]
push	1
fstp	[esp+6Ch+var_58]
mov	ecx, esi
fld	dword ptr [esi+48h]
fstp	[esp+6Ch+var_54]
fld	dword ptr [esi+4Ch]
fstp	[esp+6Ch+var_50]
fld	dword ptr [esi+50h]
fstp	[esp+6Ch+var_4C]
fld	dword ptr [esi+54h]
fstp	[esp+6Ch+var_48]
fld	dword ptr [esi+58h]
fstp	[esp+6Ch+var_44]
call	sub_654BF0
test	al, al
jz	short loc_6CDB81
push	ebx
push	edi
push	1
mov	ecx, esi
call	sub_654D00
push	1
mov	ecx, esi
mov	edi, eax
call	sub_654D50
mov	ebx, eax
test	edi, edi
jz	short loc_6CDB32
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E0h], edi

loc_6CDB32:
test	ebx, ebx
jz	short loc_6CDB45
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	[eax+0E4h], ebx

loc_6CDB45:
lea	eax, [esp+70h+var_40]
push	eax		; void *
mov	ecx, esi
call	sub_655290
mov	edx, [esi]
mov	edi, eax
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
mov	[eax+0E8h], edi
mov	edx, [esi]
mov	eax, [edx+54h]
lea	ecx, [esp+70h+var_60]
push	ecx
mov	ecx, esi
call	eax
mov	ecx, eax
add	ecx, 0D0h
call	sub_6A72B0
pop	edi
pop	ebx
jmp	short loc_6CDB94

loc_6CDB81:
mov	ecx, [esp+68h+arg_0]
push	ecx
lea	edx, [esp+6Ch+var_60]
push	edx
lea	ecx, [esp+70h+var_58]
call	sub_64EC70

loc_6CDB94:
cmp	word ptr [esi+74h], 0
jnz	loc_6CDC53
mov	eax, [esi]
mov	edx, [eax+44h]
push	1
lea	ecx, [esp+6Ch+var_60]
push	ecx
mov	ecx, esi
call	edx
test	al, al
jz	loc_6CDC53
cmp	byte ptr [ebp+0Ch], 0
jnz	loc_6CDC5D
mov	ecx, esi
call	sub_6C4940
test	al, al
jnz	loc_6CDC5D
mov	ecx, esi
call	sub_6C4940
test	al, al
jnz	short loc_6CDC13
mov	al, [esi+0E4h]
shr	al, 1
test	al, 1
jz	short loc_6CDC13
mov	ecx, [esi+0BCh]
mov	edx, [ecx+8]
test	byte ptr [edx+20h], 1
jz	short loc_6CDC13
fld	[esp+68h+var_5C]
push	0		; int
sub	esp, 8
fstp	[esp+74h+var_70]
fld	[esp+74h+var_60]
fstp	[esp+74h+var_74]
call	sub_7246F0
test	al, al
jnz	short loc_6CDC5D

loc_6CDC13:
mov	esi, [esi+20h]
test	esi, esi
jz	short loc_6CDC53
lea	ebx, [ebx+0]

loc_6CDC20:
mov	eax, [esi+78h]
mov	edx, [eax+8]
lea	ecx, [esi+78h]
call	edx
cmp	eax, 2
jnz	short loc_6CDC53
cmp	byte ptr [ebp+0Ch], 0
jnz	short loc_6CDC41
mov	ecx, esi
call	sub_6810B0
test	al, al
jz	short loc_6CDC4C

loc_6CDC41:
mov	eax, [ebp+4]
test	eax, eax
jz	short loc_6CDC5D
cmp	esi, eax
jnz	short loc_6CDC5D

loc_6CDC4C:
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_6CDC20

loc_6CDC53:
pop	ebp
xor	eax, eax
pop	esi
add	esp, 60h
retn	8

loc_6CDC5D:
pop	ebp
mov	eax, esi
pop	esi
add	esp, 60h
retn	8

loc_6CDC67:
xor	eax, eax
pop	esi
add	esp, 60h
retn	8
sub_6CDA80 endp




sub_6CDC70 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h

sub	esp, 14h
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+10h]
call	edx
test	al, al
jz	loc_6CDD8E
mov	eax, [esi+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6CDC9A
mov	al, [eax+68h]
jmp	short loc_6CDCA6

loc_6CDC9A:
mov	ecx, [esi+0B8h]
mov	al, [ecx+50h]
shr	al, 3

loc_6CDCA6:
and	al, 1
test	al, al
jnz	loc_6CDD8E
test	byte ptr [esi+0A0h], 60h
push	ebx
push	ebp
push	edi
jnz	loc_6CDD55
mov	edi, [esi+80h]
test	edi, edi
jz	loc_6CDD55
mov	edx, [esi]
mov	[esp+24h+var_10], al
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	ebx, [edi+10h]
lea	ecx, [esp+24h+var_10]
push	ecx
mov	ebp, eax
push	offset aTabenabled ; "tabEnabled"
lea	edx, [esp+2Ch+var_14]
add	edi, 10h
push	edx
mov	ecx, ebp
call	sub_651CB0
mov	edx, [ebx+2Ch]
push	eax
lea	eax, [ebp+78h]
push	eax
mov	ecx, edi
call	edx
mov	bl, al
mov	eax, [esp+24h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6CDD1D
call	sub_650DF0

loc_6CDD1D:
test	bl, bl
jz	short loc_6CDD4C
mov	al, [esp+24h+var_10]
test	al, al
jz	short loc_6CDD4C
cmp	al, 0Ah
jz	short loc_6CDD4C
push	ebp
lea	ecx, [esp+28h+var_10]
call	sub_651D80
lea	ecx, [esp+24h+var_10]
mov	bl, al
call	sub_652830
pop	edi
pop	ebp
mov	al, bl
pop	ebx
pop	esi
add	esp, 14h
retn

loc_6CDD4C:
lea	ecx, [esp+24h+var_10]
call	sub_652830

loc_6CDD55:
mov	esi, [esi+0A0h]
and	esi, 60h
jz	short loc_6CDD7B
cmp	esi, 60h
jz	short loc_6CDD7B
pop	edi
mov	eax, 1
xor	ecx, ecx
test	al, al
pop	ebp
setz	cl
pop	ebx
mov	al, cl
pop	esi
add	esp, 14h
retn

loc_6CDD7B:
pop	edi
xor	eax, eax
xor	ecx, ecx
test	al, al
pop	ebp
setz	cl
pop	ebx
mov	al, cl
pop	esi
add	esp, 14h
retn

loc_6CDD8E:
xor	al, al
pop	esi
add	esp, 14h
retn
sub_6CDC70 endp

align 10h



sub_6CDDA0 proc	near
mov	eax, [ecx+0BCh]
mov	edx, [eax+11Ch]
test	edx, edx
jz	short loc_6CDDB5
mov	al, [edx+68h]
jmp	short loc_6CDDC1

loc_6CDDB5:
mov	eax, [ecx+0B8h]
mov	al, [eax+50h]
shr	al, 3

loc_6CDDC1:
and	al, 1
test	al, al
jz	short loc_6CDDE7
test	edx, edx
jz	short loc_6CDDD2
mov	al, [edx+68h]
shr	al, 1
jmp	short loc_6CDDDE

loc_6CDDD2:
mov	ecx, [ecx+0B8h]
mov	al, [ecx+50h]
shr	al, 5

loc_6CDDDE:
and	al, 1
test	al, al
jnz	short loc_6CDDE7
xor	eax, eax
retn

loc_6CDDE7:
mov	eax, 1
retn
sub_6CDDA0 endp

align 10h



sub_6CDDF0 proc	near
mov	al, [ecx+0E4h]
shr	al, 5
test	al, 1
jz	short loc_6CDE03
mov	eax, 1
retn

loc_6CDE03:
mov	edx, [ecx+0BCh]
mov	eax, [edx+11Ch]
test	eax, eax
jz	short loc_6CDE25
mov	al, [eax+68h]
shr	al, 1
and	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, 2
retn

loc_6CDE25:
mov	eax, [ecx+0B8h]
mov	al, [eax+50h]
shr	al, 5
and	al, 1
movzx	eax, al
neg	eax
sbb	eax, eax
and	eax, 2
retn
sub_6CDDF0 endp

align 10h



sub_6CDE40 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 0Bh
test	al, 1
jz	short loc_6CDE56

loc_6CDE50:
xor	al, al
pop	esi
retn	8

loc_6CDE56:
test	[esp+4+arg_4], 2
jz	short loc_6CDE68
mov	edx, [esi]
mov	eax, [edx+10h]
call	eax
test	al, al
jz	short loc_6CDE50

loc_6CDE68:
mov	ecx, [esi+0BCh]
call	sub_7243A0
mov	edx, [esp+4+arg_0]
fld	dword ptr [edx]
mov	ecx, eax
fld	dword ptr [ecx+8]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_6CDEBB
fld	dword ptr [edx]
fld	dword ptr [ecx]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6CDEBB
fld	dword ptr [edx+4]
fld	dword ptr [ecx+0Ch]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_6CDEBB
fld	dword ptr [edx+4]
fld	dword ptr [ecx+4]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6CDEBB
mov	eax, 1
pop	esi
retn	8

loc_6CDEBB:
xor	eax, eax
pop	esi
retn	8
sub_6CDE40 endp

align 10h



sub_6CDED0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+0BCh]
mov	ecx, [eax+11Ch]
test	ecx, ecx
jz	short loc_6CDF09
mov	edx, [esp+4+arg_4]
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_72E490
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_6CDF09
or	dword ptr [eax+2474h], 400h

loc_6CDF09:
pop	esi
retn	8
sub_6CDED0 endp

align 10h



sub_6CDF10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+0BCh]
cmp	dword ptr [eax+11Ch], 0
jnz	short loc_6CDF27
call	sub_6C49A0

loc_6CDF27:
mov	eax, [esi+0BCh]
cmp	dword ptr [eax+11Ch], 0
jz	short loc_6CDF8C
push	ebx
push	edi
mov	edi, [esp+0Ch+arg_0]
test	edi, edi
jge	short loc_6CDF42
xor	edi, edi

loc_6CDF42:
mov	ebx, [esp+0Ch+arg_4]
test	ebx, ebx
jge	short loc_6CDF4C
xor	ebx, ebx

loc_6CDF4C:
mov	ecx, [eax+8]
call	sub_726950
cmp	eax, edi
jge	short loc_6CDF5A
mov	edi, eax

loc_6CDF5A:
cmp	eax, ebx
jge	short loc_6CDF60
mov	ebx, eax

loc_6CDF60:
mov	ecx, [esi+0BCh]
mov	ecx, [ecx+11Ch]
push	ebx
push	edi
call	sub_730A70
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
pop	edi
pop	ebx
test	eax, eax
jz	short loc_6CDF8C
or	dword ptr [eax+2474h], 400h

loc_6CDF8C:
pop	esi
retn	8
sub_6CDF10 endp




sub_6CDF90 proc	near
mov	edx, ecx
mov	eax, [edx+0BCh]
mov	ecx, [eax+11Ch]
test	ecx, ecx
jz	short loc_6CDFA7
mov	al, [ecx+68h]
jmp	short loc_6CDFB3

loc_6CDFA7:
mov	eax, [edx+0B8h]
mov	al, [eax+50h]
shr	al, 3

loc_6CDFB3:
and	al, 1
test	al, al
jz	short loc_6CDFD7
test	ecx, ecx
jz	short loc_6CDFC4
mov	al, [ecx+68h]
shr	al, 1
jmp	short loc_6CDFD1

loc_6CDFC4:
mov	edx, [edx+0B8h]
movzx	eax, byte ptr [edx+50h]
shr	al, 5

loc_6CDFD1:
and	al, 1
test	al, al
jz	short loc_6CDFE0

loc_6CDFD7:
test	ecx, ecx
jz	short loc_6CDFE0
jmp	sub_717420

loc_6CDFE0:
or	eax, 0FFFFFFFFh
retn
sub_6CDF90 endp

align 10h



sub_6CDFF0 proc	near
mov	eax, [ecx+0BCh]
mov	edx, [eax+11Ch]
test	edx, edx
jz	short loc_6CE005
mov	al, [edx+68h]
jmp	short loc_6CE011

loc_6CE005:
mov	eax, [ecx+0B8h]
mov	al, [eax+50h]
shr	al, 3

loc_6CE011:
and	al, 1
test	al, al
jz	short loc_6CE034
test	edx, edx
jz	short loc_6CE022
mov	al, [edx+68h]
shr	al, 1
jmp	short loc_6CE02E

loc_6CE022:
mov	ecx, [ecx+0B8h]
mov	al, [ecx+50h]
shr	al, 5

loc_6CE02E:
and	al, 1
test	al, al
jz	short loc_6CE048

loc_6CE034:
test	edx, edx
jz	short loc_6CE048
mov	edx, [edx+8]
mov	eax, [edx+20h]
mov	edx, [edx+1Ch]
cmp	edx, eax
jnb	short locret_6CE04A
mov	eax, edx
retn

loc_6CE048:
xor	eax, eax

locret_6CE04A:
retn
sub_6CDFF0 endp

align 10h



sub_6CE050 proc	near
mov	eax, [ecx+0BCh]
mov	edx, [eax+11Ch]
test	edx, edx
jz	short loc_6CE065
mov	al, [edx+68h]
jmp	short loc_6CE071

loc_6CE065:
mov	eax, [ecx+0B8h]
mov	al, [eax+50h]
shr	al, 3

loc_6CE071:
and	al, 1
test	al, al
jz	short loc_6CE094
test	edx, edx
jz	short loc_6CE082
mov	al, [edx+68h]
shr	al, 1
jmp	short loc_6CE08E

loc_6CE082:
mov	ecx, [ecx+0B8h]
mov	al, [ecx+50h]
shr	al, 5

loc_6CE08E:
and	al, 1
test	al, al
jz	short loc_6CE0A8

loc_6CE094:
test	edx, edx
jz	short loc_6CE0A8
mov	edx, [edx+8]
mov	eax, [edx+20h]
mov	edx, [edx+1Ch]
cmp	eax, edx
jnb	short locret_6CE0AA
mov	eax, edx
retn

loc_6CE0A8:
xor	eax, eax

locret_6CE0AA:
retn
sub_6CE050 endp

align 10h



sub_6CE0B0 proc	near

arg_0= byte ptr	 4

mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short locret_6CE0DC
cmp	[esp+arg_0], 0
jz	short loc_6CE0D3
mov	ecx, 80h
or	[eax+68h], cx
retn	4

loc_6CE0D3:
mov	edx, 0FF7Fh
and	[eax+68h], dx

locret_6CE0DC:
retn	4
sub_6CE0B0 endp

align 10h



sub_6CE0E0 proc	near
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6CE0FB
movzx	eax, word ptr [eax+68h]
shr	eax, 7
and	eax, 1
retn

loc_6CE0FB:
xor	al, al
retn
sub_6CE0E0 endp

align 10h



sub_6CE100 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0BCh]
mov	ecx, [eax+11Ch]
test	ecx, ecx
jz	short loc_6CE141
cmp	[esp+4+arg_0], 0
jz	short loc_6CE125
mov	edx, 100h
or	[ecx+68h], dx
jmp	short loc_6CE12A

loc_6CE125:
call	sub_72E510

loc_6CE12A:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_6CE141
or	dword ptr [eax+2474h], 400h

loc_6CE141:
pop	esi
retn	4
sub_6CE100 endp

align 10h



sub_6CE150 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+0E4h]
shr	al, 7
test	al, 1
jz	short loc_6CE1DF
mov	ecx, [esi+0BCh]
mov	eax, [ecx+11Ch]
test	eax, eax
jz	short loc_6CE177
mov	al, [eax+68h]
shr	al, 1
jmp	short loc_6CE183

loc_6CE177:
mov	edx, [esi+0B8h]
mov	al, [edx+50h]
shr	al, 5

loc_6CE183:
and	al, 1
test	al, al
jz	short loc_6CE1DF
push	edi
call	sub_7242C0
mov	edi, eax
sub	edi, [esp+8+arg_0]
jns	short loc_6CE199
xor	edi, edi

loc_6CE199:
mov	ecx, [esi+0BCh]
call	sub_71EBD0
cmp	edi, eax
jle	short loc_6CE1B5
mov	ecx, [esi+0BCh]
call	sub_71EBD0
mov	edi, eax

loc_6CE1B5:
mov	ecx, [esi+0BCh]
push	edi
call	sub_71EFD0
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
pop	edi
test	eax, eax
jz	short loc_6CE1D9
or	dword ptr [eax+2474h], 400h

loc_6CE1D9:
mov	al, 1
pop	esi
retn	4

loc_6CE1DF:
xor	al, al
pop	esi
retn	4
sub_6CE150 endp

align 10h



sub_6CE1F0 proc	near
mov	edx, [ecx]
mov	eax, 2000h
or	[ecx+0E4h], ax
mov	eax, [edx+54h]
call	eax
test	eax, eax
jz	short locret_6CE211
or	dword ptr [eax+2474h], 400h

locret_6CE211:
retn
sub_6CE1F0 endp

align 10h



sub_6CE220 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
test	eax, eax
jz	short loc_6CE25C
lea	ecx, [eax+8]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	edi
push	1Bh
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6CE25B
push	esi
mov	ecx, edi
call	sub_6B5FD0
test	al, al
jz	short loc_6CE254
mov	ecx, edi
call	sub_6B5B10

loc_6CE254:
mov	ecx, edi
call	sub_64A430

loc_6CE25B:
pop	edi

loc_6CE25C:
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_6CE273
or	dword ptr [eax+2474h], 400h

loc_6CE273:
mov	ecx, esi
pop	esi
jmp	sub_656AD0
sub_6CE220 endp

align 10h



sub_6CE280 proc	near
movzx	edx, word ptr [ecx+0E4h]
mov	eax, edx
shr	eax, 0Bh
test	al, 1
jnz	short loc_6CE2C5
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	short loc_6CE2A5
mov	al, [eax+68h]
jmp	short loc_6CE2B1

loc_6CE2A5:
mov	ecx, [ecx+0B8h]
mov	al, [ecx+50h]
shr	al, 3

loc_6CE2B1:
and	al, 1
test	al, al
jnz	short loc_6CE2C5
shr	dl, 2
test	dl, 1
jnz	short loc_6CE2C5
mov	eax, 1
retn

loc_6CE2C5:
xor	eax, eax
retn
sub_6CE280 endp

align 10h



sub_6CE2D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0A0h]
shr	eax, 13h
and	al, 1
mov	byte ptr [esp+8+var_4],	al
mov	ecx, [esp+8+var_4]
push	ecx
mov	ecx, esi
call	sub_6CD850
cmp	eax, 0FFFFFFFFh
jz	short loc_6CE30A
cmp	eax, 1
jnz	short loc_6CE316
mov	edx, [esp+8+arg_0]
push	edx
mov	ecx, esi
call	sub_655A50
pop	esi
pop	ecx
retn	4

loc_6CE30A:
mov	eax, [esp+8+arg_0]
push	eax
mov	ecx, esi
call	sub_655B00

loc_6CE316:
pop	esi
pop	ecx
retn	4
sub_6CE2D0 endp

align 10h



sub_6CE320 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+8]
mov	eax, [esp+arg_0]
cmp	edx, [eax]
jnz	short loc_6CE343
mov	edx, [ecx+0Ch]
cmp	edx, [eax+4]
jnz	short loc_6CE343
mov	ecx, [ecx+10h]
cmp	ecx, [eax+8]
jnz	short loc_6CE343
mov	eax, 1
retn	4

loc_6CE343:
xor	eax, eax
retn	4
sub_6CE320 endp

align 10h



sub_6CE350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6CE380
mov	eax, [edi]
test	eax, eax
jz	short loc_6CE375
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6CE375:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6CE380:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6CE3B3
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*2]
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6CE3B3:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*2]
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6CE350 endp

align 10h



sub_6CE3E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	eax, [ebp+4]
mov	[esp+0Ch+var_4], ebp
test	eax, eax
jnz	short loc_6CE3F8
pop	ebp
add	esp, 8
retn	4

loc_6CE3F8:
push	ebx
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
lea	ebx, [eax-1]
xor	edx, edx
xor	edi, edi
mov	[esp+18h+var_8], edx
test	ebx, ebx
jbe	short loc_6CE467
mov	edi, edi

loc_6CE410:
cmp	ebx, 0FFFFFFFFh
jz	short loc_6CE467
mov	edx, [ebp+0]
lea	eax, [ebx+edi]
shr	eax, 1
lea	ecx, [eax+eax*4]
lea	edx, [edx+ecx*4]
mov	ecx, [edx]
cmp	esi, ecx
jl	short loc_6CE440
mov	ebp, [edx+4]
lea	ebp, [ecx+ebp-1]
cmp	esi, ebp
jle	loc_6CE4D0
cmp	esi, ecx
mov	ebp, [esp+18h+var_4]
jge	short loc_6CE444

loc_6CE440:
sub	ecx, esi
jmp	short loc_6CE44D

loc_6CE444:
mov	edx, [edx+4]
sub	edx, esi
lea	ecx, [edx+ecx-1]

loc_6CE44D:
test	ecx, ecx
jz	short loc_6CE4D0
jge	short loc_6CE45C
mov	[esp+18h+var_8], edi
lea	edi, [eax+1]
jmp	short loc_6CE45F

loc_6CE45C:
lea	ebx, [eax-1]

loc_6CE45F:
mov	edx, [esp+18h+var_8]
cmp	edi, ebx
jb	short loc_6CE410

loc_6CE467:
cmp	edi, ebx
jnz	short loc_6CE48E
mov	ecx, [ebp+0]
lea	eax, [edi+edi*4]
push	esi
lea	ecx, [ecx+eax*4]
call	sub_6C4400
test	eax, eax
jnz	short loc_6CE48A
mov	eax, edi
pop	edi
pop	esi
pop	ebx
pop	ebp
add	esp, 8
retn	4

loc_6CE48A:
mov	edx, [esp+18h+var_8]

loc_6CE48E:
cmp	edx, ebx
jnb	short loc_6CE4CE
mov	ecx, [ebp+0]
lea	eax, [edx+edx*4+5]
lea	ecx, [ecx+eax*4]
lea	esp, [esp+0]

loc_6CE4A0:
mov	eax, [ecx]
cmp	esi, eax
jl	short loc_6CE4B5
mov	edi, [ecx+4]
lea	edi, [edi+eax-1]
cmp	esi, edi
jle	short loc_6CE4CE
cmp	esi, eax
jge	short loc_6CE4B9

loc_6CE4B5:
sub	eax, esi
jmp	short loc_6CE4C2

loc_6CE4B9:
mov	edi, [ecx+4]
sub	edi, esi
lea	eax, [edi+eax-1]

loc_6CE4C2:
test	eax, eax
jge	short loc_6CE4CE
inc	edx
add	ecx, 14h
cmp	edx, ebx
jb	short loc_6CE4A0

loc_6CE4CE:
mov	eax, edx

loc_6CE4D0:
pop	edi
pop	esi
pop	ebx
pop	ebp
add	esp, 8
retn	4
sub_6CE3E0 endp

align 10h



sub_6CE4E0 proc	near
mov	eax, ecx
mov	dl, 40h
mov	[eax+0Ch], dl
mov	[eax+0Dh], dl
mov	edx, 1C2h
mov	[eax+12h], dx
xor	ecx, ecx
mov	edx, 50h
mov	[eax+14h], dx
mov	dword ptr [eax], offset	off_155F500
mov	edx, 39h
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1437CB4
mov	[eax+8], cl
mov	[eax+9], cl
mov	byte ptr [eax+0Ah], 10h
mov	byte ptr [eax+0Bh], 80h
mov	byte ptr [eax+0Eh], 10h
mov	byte ptr [eax+0Fh], 0FFh
mov	[eax+16h], dx
mov	[eax+18h], dx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+10h], cl
retn
sub_6CE4E0 endp

align 10h



; int __cdecl sub_6CE540(float)
sub_6CE540 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fmul	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
cmp	eax, 0FFh
jb	short loc_6CE57D
mov	eax, 0FFh

loc_6CE57D:
add	esp, 8
retn
sub_6CE540 endp

align 10h



; int __stdcall	sub_6CE590(float)
sub_6CE590 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fmul	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
cmp	eax, 0FFh
jb	short loc_6CE5CD
mov	eax, 0FFh

loc_6CE5CD:
mov	[ecx+128h], al
add	esp, 8
retn	4
sub_6CE590 endp

align 10h



; int __stdcall	sub_6CE5E0(float)
sub_6CE5E0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fmul	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
cmp	eax, 0FFh
jb	short loc_6CE61D
mov	eax, 0FFh

loc_6CE61D:
mov	[ecx+129h], al
add	esp, 8
retn	4
sub_6CE5E0 endp

align 10h



; int __stdcall	sub_6CE630(float)
sub_6CE630 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fmul	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
cmp	eax, 0FFh
jb	short loc_6CE66D
mov	eax, 0FFh

loc_6CE66D:
mov	[ecx+12Ah], al
add	esp, 8
retn	4
sub_6CE630 endp

align 10h



; int __stdcall	sub_6CE680(float)
sub_6CE680 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fmul	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
cmp	eax, 0FFh
jb	short loc_6CE6BD
mov	eax, 0FFh

loc_6CE6BD:
mov	[ecx+12Ch], al
add	esp, 8
retn	4
sub_6CE680 endp

align 10h



; int __stdcall	sub_6CE6D0(float)
sub_6CE6D0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fmul	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
cmp	eax, 0FFh
jb	short loc_6CE70D
mov	eax, 0FFh

loc_6CE70D:
mov	[ecx+12Dh], al
add	esp, 8
retn	4
sub_6CE6D0 endp

align 10h



; int __stdcall	sub_6CE720(float)
sub_6CE720 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
fmul	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
cmp	eax, 0FFh
jb	short loc_6CE75D
mov	eax, 0FFh

loc_6CE75D:
mov	[ecx+12Eh], al
add	esp, 8
retn	4
sub_6CE720 endp

align 10h



; int __stdcall	sub_6CE770(float)
sub_6CE770 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld	[esp+4+arg_0]
fld	ds:dbl_15FCCF8
fmul	st(1), st
fxch	st(1)
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_6CE7DF
fst	[esp+4+arg_0]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	short loc_6CE7A9
fstp	st

loc_6CE7A5:
fld	[esp+4+arg_0]

loc_6CE7A9:
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
or	eax, 0C00h
mov	[esp+4+var_4], eax
fldcw	word ptr [esp+4+var_4]
fistp	[esp+4+var_4]
mov	al, byte ptr [esp+4+var_4]
mov	[ecx+12Fh], al
mov	[ecx+13Fh], al
fldcw	word ptr [esp+4+arg_0]
pop	ecx
retn	4

loc_6CE7DF:
fstp	st
fld	ds:flt_15FCD30
fstp	[esp+4+arg_0]
jmp	short loc_6CE7A5
sub_6CE770 endp

align 10h



sub_6CE7F0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
mov	eax, [ecx+0BCh]
mov	eax, [eax+11Ch]
jz	short loc_6CE810
call	sub_6C49A0
or	word ptr [eax+68h], 2
retn	4

loc_6CE810:
test	eax, eax
jz	short locret_6CE81D
mov	ecx, 0FFFDh
and	[eax+68h], cx

locret_6CE81D:
retn	4
sub_6CE7F0 endp




sub_6CE820 proc	near

arg_0= dword ptr  4

movzx	eax, byte ptr [esp+arg_0]
push	esi
mov	esi, ecx
mov	edx, [esi]
shl	eax, 10h
xor	eax, [esi+0A0h]
mov	ecx, 4000h
or	[esi+0E4h], cx
and	eax, 30000h
xor	[esi+0A0h], eax
mov	eax, [edx+54h]
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esi+0A0h]
shr	ecx, 13h
and	cl, 1
mov	byte ptr [esp+8+arg_0],	cl
mov	edx, [esp+8+arg_0]
push	edx
mov	ecx, esi
mov	edi, eax
call	sub_6CD850
cmp	eax, 0FFFFFFFFh
jz	short loc_6CE887
cmp	eax, 1
jnz	short loc_6CE88F
push	edi
mov	ecx, esi
call	sub_655A50
pop	edi
pop	esi
retn	4

loc_6CE887:
push	edi
mov	ecx, esi
call	sub_655B00

loc_6CE88F:
pop	edi
pop	esi
retn	4
sub_6CE820 endp

align 10h



sub_6CE8A0 proc	near

var_1C=	qword ptr -1Ch
var_8= qword ptr -8
arg_0= byte ptr	 4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+0BCh]
call	edx
test	al, 3
jz	short loc_6CE8FD
mov	eax, [esi+0BCh]
test	eax, eax
jz	short loc_6CE8FD
or	byte ptr [eax+150h], 2
lea	ecx, [esi+0F4h]
call	sub_6CD800
mov	cx, [esi+0E4h]
mov	eax, [esi]
shr	cx, 0Ch
and	cl, 1
movzx	edx, cl
mov	ecx, [esi+0E8h]
push	1
and	ecx, 0FFFFFFFCh
push	edx
mov	edx, [eax+1D4h]
add	ecx, 8
push	ecx
mov	ecx, esi
call	edx

loc_6CE8FD:
movzx	eax, word ptr [esi+0E4h]
and	dword ptr [esi+0A0h], 0FFFCFFFFh
mov	ecx, eax
shr	ecx, 0Eh
test	cl, 1
jz	short loc_6CE935
mov	edx, [esi]
and	eax, 0BFFFh
mov	[esi+0E4h], ax
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
push	eax
mov	ecx, esi
call	sub_6CE2D0

loc_6CE935:
cmp	[esp+0Ch+arg_0], 0
jz	short loc_6CE94D
mov	ecx, esi
call	sub_6CD4E0
or	word ptr [esi+0E4h], 40h
jmp	short loc_6CE959

loc_6CE94D:
mov	ecx, 0FFBFh
and	[esi+0E4h], cx

loc_6CE959:
mov	edx, [esi+0BCh]
cmp	dword ptr [edx+11Ch], 0
jz	loc_6CE9FD
mov	eax, [esi]
mov	edx, [eax+54h]
push	ebx
push	edi
mov	ecx, esi
call	edx
mov	edi, eax
mov	eax, [esi+0BCh]
mov	ebx, [eax+11Ch]
push	esi
mov	ecx, edi
call	sub_693B60
test	al, al
jnz	short loc_6CE99C
mov	cl, [ebx+68h]
shr	cl, 5
test	cl, 1
jz	short loc_6CE9FB

loc_6CE99C:
mov	eax, [edi+124h]
mov	edx, [edi+120h]
mov	ecx, eax
mov	dword ptr [esp+14h+var_8], edx
and	eax, 7FFFFFFFh
mov	dword ptr [esp+14h+var_8+4], eax
fild	[esp+14h+var_8]
and	ecx, 80000000h
mov	dword ptr [esp+14h+var_8+4], ecx
mov	dword ptr [esp+14h+var_8], 0
fild	[esp+14h+var_8]
sub	esp, 8
mov	ecx, ebx
fchs
faddp	st(1), st
fdiv	ds:dbl_15FCD88
fstp	[esp+1Ch+var_1C]
call	sub_72FEC0
mov	al, [ebx+68h]
not	al
test	al, 1
jz	short loc_6CE9FB
or	dword ptr [edi+2474h], 400h

loc_6CE9FB:
pop	edi
pop	ebx

loc_6CE9FD:
pop	esi
add	esp, 8
retn	8
sub_6CE8A0 endp

align 10h



sub_6CEA10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
fld	ds:dbl_15FCE20
sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	cl, [eax+0E0h]
shr	cl, 1
lea	ebx, [edi+44h]
test	cl, 1
jz	short loc_6CEA39
fld	qword ptr [eax+8]
fmul	st, st(1)
jmp	short loc_6CEA42

loc_6CEA39:
mov	edx, [edi+98h]
fild	dword ptr [edx+4]

loc_6CEA42:
test	byte ptr [eax+0E0h], 1
fstp	[esp+14h+var_8]
jz	short loc_6CEA53
fmul	qword ptr [eax]
jmp	short loc_6CEA5D

loc_6CEA53:
mov	eax, [edi+98h]
fstp	st
fild	dword ptr [eax]

loc_6CEA5D:
mov	esi, [esp+14h+arg_0]
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
push	esi
fstp	dword ptr [esi]
lea	ecx, [esp+18h+var_8]
fld	[esp+18h+var_8]
push	ecx
mov	ecx, ebx
fstp	dword ptr [esi+4]
call	sub_64EC70
fld	[esp+14h+var_8]
fstp	dword ptr [esi]
fld	[esp+14h+var_4]
fstp	dword ptr [esi+4]
mov	ecx, [edi+0BCh]
call	sub_7243A0
fld	dword ptr [eax]
fstp	[esp+14h+var_8]
push	esi
fld	dword ptr [eax+4]
lea	edx, [esp+18h+var_8]
fstp	[esp+18h+var_4]
push	edx
fld	dword ptr [esi]
mov	ecx, ebx
fsub	[esp+1Ch+var_8]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fsub	[esp+1Ch+var_4]
fstp	dword ptr [esi+4]
call	sub_64E9B0
fld	[esp+14h+var_8]
pop	edi
fld	ds:dbl_15FCE20
mov	eax, esi
fdiv	st(1), st
fxch	st(1)
fstp	dword ptr [esi]
fdivr	[esp+10h+var_4]
fstp	dword ptr [esi+4]
pop	esi
pop	ebx
add	esp, 8
retn	8
sub_6CEA10 endp

align 10h


; Attributes: bp-based frame

sub_6CEAF0 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	qword ptr -30h
var_28=	dword ptr -28h
var_24=	qword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 60h
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	esi, ecx
cmp	edi, 6Fh	; switch 112 cases
ja	loc_6CEE51	; default
			; jumptable 006CEB10 cases 4-7,11-108
movzx	eax, ds:byte_6CEE88[edi]
jmp	ds:off_6CEE70[eax*4] ; switch jump

loc_6CEB17:		; jumptable 006CEB10 case 0
fld	dword ptr [esi+44h]
mov	edx, [esi]
mov	eax, [edx+70h]
fstp	[esp+68h+var_18]
fld	dword ptr [esi+48h]
fstp	[esp+68h+var_14]
fld	dword ptr [esi+4Ch]
fstp	[esp+68h+var_10]
fld	dword ptr [esi+50h]
fstp	[esp+68h+var_C]
fld	dword ptr [esi+54h]
fstp	[esp+68h+var_8]
fld	dword ptr [esi+58h]
fstp	[esp+68h+var_4]
call	eax
mov	ecx, [ebp+arg_4]
push	eax
call	sub_653400
fmul	ds:dbl_15FCE20
lea	ecx, [esp+68h+var_58]
push	ecx
fst	[esp+6Ch+var_30]
lea	edx, [esp+6Ch+var_50]
fstp	[esp+6Ch+var_5C]
push	edx
fld	[esp+70h+var_5C]
lea	ecx, [esp+70h+var_18]
fst	[esp+70h+var_54]
fstp	[esp+70h+var_58]
call	sub_64EC70
fld	[esp+68h+var_50]
mov	ecx, [esi+0BCh]
fstp	[esp+68h+var_58]
fld	[esp+68h+var_4C]
fstp	[esp+68h+var_54]
call	sub_7243A0
fld	[esp+68h+var_58]
lea	ecx, [esp+68h+var_48]
fsub	dword ptr [eax]
lea	eax, [esp+68h+var_58]
push	eax
push	ecx
lea	ecx, [esp+70h+var_18]
fstp	[esp+70h+var_58]
call	sub_64E9B0
fld	[esp+68h+var_48]
fst	[esp+68h+var_58]
push	0
fld	[esp+6Ch+var_44]
lea	edx, [esp+6Ch+var_28]
fstp	[esp+6Ch+var_54]
push	edx
push	0
fdiv	ds:dbl_15FCE20
mov	ecx, esi
mov	byte ptr [esp+74h+var_28], 3
fstp	[esp+74h+var_5C]
fld	[esp+74h+var_5C]
fstp	[esp+74h+var_24]
call	sub_65A510
test	al, al
jz	short loc_6CEC34
mov	esi, [esi+98h]
test	esi, esi
jz	short loc_6CEC21
fldz
fld	[esp+68h+var_30]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_6CEC14
fadd	ds:dbl_15FCC48
jmp	short loc_6CEC1A

loc_6CEC14:
fsub	ds:dbl_15FCC48

loc_6CEC1A:
call	__ftol2_sse
mov	[esi], eax

loc_6CEC21:
lea	ecx, [esp+68h+var_28]
call	sub_652830
mov	al, 1
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6CEC34:
lea	ecx, [esp+68h+var_28]
call	sub_652830
xor	al, al
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6CEC47:		; jumptable 006CEB10 case 1
mov	eax, [esi]
mov	edx, [eax+70h]
call	edx
mov	ecx, [ebp+arg_4]
push	eax
call	sub_653400
fmul	ds:dbl_15FCE20
lea	eax, [esp+68h+var_58]
push	eax
fst	[esp+6Ch+var_30]
lea	ecx, [esp+6Ch+var_40]
fld	dword ptr [esi+44h]
push	ecx
fstp	[esp+70h+var_18]
lea	ecx, [esp+70h+var_18]
fld	dword ptr [esi+48h]
fstp	[esp+70h+var_14]
fld	dword ptr [esi+4Ch]
fstp	[esp+70h+var_10]
fld	dword ptr [esi+50h]
fstp	[esp+70h+var_C]
fld	dword ptr [esi+54h]
fstp	[esp+70h+var_8]
fld	dword ptr [esi+58h]
fstp	[esp+70h+var_4]
fldz
fstp	[esp+70h+var_58]
fstp	[esp+70h+var_54]
call	sub_64EC70
fld	[esp+68h+var_40]
mov	ecx, [esi+0BCh]
fstp	[esp+68h+var_58]
fld	[esp+68h+var_3C]
fstp	[esp+68h+var_54]
call	sub_7243A0
fld	[esp+68h+var_54]
lea	edx, [esp+68h+var_58]
fsub	dword ptr [eax+4]
push	edx
lea	eax, [esp+6Ch+var_38]
push	eax
lea	ecx, [esp+70h+var_18]
fstp	[esp+70h+var_54]
call	sub_64E9B0
fld	[esp+68h+var_38]
fstp	[esp+68h+var_58]
push	0
fld	[esp+6Ch+var_34]
lea	ecx, [esp+6Ch+var_28]
fst	[esp+6Ch+var_54]
push	ecx
fdiv	ds:dbl_15FCE20
push	1
mov	ecx, esi
mov	byte ptr [esp+74h+var_28], 3
fstp	[esp+74h+var_5C]
fld	[esp+74h+var_5C]
fstp	[esp+74h+var_24]
call	sub_65A510
test	al, al
jz	loc_6CEC34
mov	esi, [esi+98h]
test	esi, esi
jz	short loc_6CED51
fldz
fld	[esp+68h+var_30]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_6CED43
fadd	ds:dbl_15FCC48
jmp	short loc_6CED49

loc_6CED43:
fsub	ds:dbl_15FCC48

loc_6CED49:
call	__ftol2_sse
mov	[esi+4], eax

loc_6CED51:
lea	ecx, [esp+68h+var_28]
call	sub_652830
mov	al, 1
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6CED64:		; jumptable 006CEB10 case 8
mov	edx, [esi]
mov	eax, [edx+70h]
call	eax
mov	ecx, [ebp+arg_4]
push	eax
call	sub_653400
fstp	[esp+68h+var_30]
mov	ecx, [esi+0BCh]
call	sub_7243A0
fld	dword ptr [eax+4]
fstp	[esp+68h+var_5C]
fld	dword ptr [eax+0Ch]
fstp	[esp+68h+var_58]
fld	dword ptr [eax]
fstp	[esp+68h+var_28]
fld	[esp+68h+var_5C]
fstp	dword ptr [esp+68h+var_24]
fld	[esp+68h+var_58]
fstp	[esp+68h+var_1C]
fld	[esp+68h+var_30]
fmul	ds:dbl_15FCE20
fstp	[esp+68h+var_58]
fld	[esp+68h+var_58]
fadd	[esp+68h+var_28]
fstp	dword ptr [esp+68h+var_24+4]

loc_6CEDC1:
push	1
lea	ecx, [esp+6Ch+var_28]
push	ecx
mov	ecx, [esi+0BCh]
call	sub_71F2C0
mov	edx, [esi]
mov	eax, [edx+160h]
mov	ecx, esi
call	eax
mov	al, 1
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6CEDE9:		; jumptable 006CEB10 case 9
mov	edx, [esi]
mov	eax, [edx+70h]
call	eax
mov	ecx, [ebp+arg_4]
push	eax
call	sub_653400
fstp	[esp+68h+var_30]
mov	ecx, [esi+0BCh]
call	sub_7243A0
fld	dword ptr [eax+4]
fstp	[esp+68h+var_58]
fld	dword ptr [eax+8]
fstp	[esp+68h+var_5C]
fld	dword ptr [eax]
fstp	[esp+68h+var_28]
fld	[esp+68h+var_58]
fst	dword ptr [esp+68h+var_24]
fld	[esp+68h+var_5C]
fstp	dword ptr [esp+68h+var_24+4]
fld	[esp+68h+var_30]
fmul	ds:dbl_15FCE20
fstp	[esp+68h+var_58]
fadd	[esp+68h+var_58]
fstp	[esp+68h+var_1C]
jmp	loc_6CEDC1

loc_6CEE47:		; jumptable 006CEB10 cases 2,3,10,109-111
mov	edx, [esi]
mov	eax, [edx+160h]
call	eax

loc_6CEE51:		; default
mov	ecx, [ebp+arg_8] ; jumptable 006CEB10 cases 4-7,11-108
mov	edx, [ebp+arg_4]
push	ecx
push	edx
push	edi
mov	ecx, esi
call	sub_65A510
test	al, al
pop	edi
setnz	al
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6CEAF0 endp

align 10h
off_6CEE70 dd offset loc_6CEB17, offset	loc_6CEC47 ; jump table	for switch statement
dd offset loc_6CEE47, offset loc_6CED64
dd offset loc_6CEDE9, offset loc_6CEE51
byte_6CEE88 db	    0,	   1,	  2,	 2 ; indirect table for	switch statement
db	5,     5,     5,     5
db	3,     4,     2,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     2,     2,     2
align 10h



sub_6CEF00 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 28h
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
test	eax, eax
jnz	short loc_6CEF1A
xor	al, al
pop	esi
add	esp, 28h
retn	0Ch

loc_6CEF1A:
mov	ecx, [esp+2Ch+arg_0]
cmp	ecx, 4
jb	short loc_6CEF27
xor	eax, eax
jmp	short loc_6CEF31

loc_6CEF27:
lea	ecx, [ecx+ecx*8]
lea	eax, [eax+ecx*4+934h]

loc_6CEF31:
fld	dword ptr [eax+18h]
lea	ecx, [esp+2Ch+var_18]
fstp	[esp+2Ch+arg_0]
fld	dword ptr [eax+14h]
fstp	[esp+2Ch+var_28]
fld	[esp+2Ch+arg_0]
fstp	[esp+2Ch+var_24]
call	sub_64E8E0
lea	edx, [esp+2Ch+var_18]
push	edx
mov	ecx, esi
call	sub_654AF0
lea	eax, [esp+2Ch+var_28]
push	eax
lea	ecx, [esp+30h+var_20]
push	ecx
lea	ecx, [esp+34h+var_18]
call	sub_64EC70
fld	[esp+2Ch+var_1C]
mov	eax, [esp+2Ch+arg_4]
fld	[esp+2Ch+var_20]
test	eax, eax
jz	short loc_6CEF88
fst	dword ptr [eax]
fxch	st(1)
fst	dword ptr [eax+4]
fxch	st(1)

loc_6CEF88:
mov	edx, [esp+2Ch+arg_8]
fxch	st(1)
mov	ecx, [esi+0BCh]
push	edx		; int
sub	esp, 8
fstp	[esp+38h+var_34]
fstp	[esp+38h+var_38]
call	sub_7246F0
pop	esi
add	esp, 28h
retn	0Ch
sub_6CEF00 endp

align 10h



sub_6CEFB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	edi
mov	edi, [ecx+0ECh]
mov	al, 1
test	edi, edi
jz	short loc_6CF016
push	ebx
mov	ebx, [edi+8]
xor	edx, edx
test	ebx, ebx
jbe	short loc_6CF015
mov	ecx, [esp+8+arg_4]
mov	eax, [ecx+4]
push	ebp
mov	ebp, [ecx]
lea	ecx, [eax+ebp-1]
mov	[esp+0Ch+arg_4], ecx
mov	ecx, [edi+4]
push	esi
lea	ecx, [ecx+0]

loc_6CEFE0:
mov	esi, [ecx]
cmp	[esp+10h+arg_4], esi
jl	short loc_6CF000
mov	eax, [ecx+4]
lea	eax, [eax+esi-1]
cmp	eax, ebp
jl	short loc_6CF000
mov	esi, [esp+10h+arg_0]
lea	eax, [edx+1]
cmp	[edi+esi*8+10h], eax
jnz	short loc_6CF011

loc_6CF000:
inc	edx
add	ecx, 14h
cmp	edx, ebx
jb	short loc_6CEFE0
pop	esi
pop	ebp
pop	ebx
mov	al, 1
pop	edi
retn	8

loc_6CF011:
pop	esi
xor	al, al
pop	ebp

loc_6CF015:
pop	ebx

loc_6CF016:
pop	edi
retn	8
sub_6CEFB0 endp

align 10h



sub_6CF020 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 40h
cmp	dword ptr [eax], 800h
push	edi
mov	edi, ecx
jnz	loc_6CF1F9
mov	cl, [edi+0E4h]
shr	cl, 1
test	cl, 1
jz	loc_6CF1F0
mov	edx, [edi+0BCh]
mov	ecx, [edx+8]
test	byte ptr [ecx+20h], 1
jz	loc_6CF1F0
movsx	eax, byte ptr [eax+0Bh]
push	ebx
xor	ebx, ebx
push	ebx
lea	edx, [esp+4Ch+var_38]
push	edx
push	eax
mov	ecx, edi
call	sub_6CEF00
test	al, al
jz	loc_6CF1EF
fld	[esp+48h+var_34]
mov	ecx, [edi+0BCh]
sub	esp, 8
fstp	[esp+50h+var_4C]
fld	[esp+50h+var_38]
fstp	[esp+50h+var_50]
call	sub_7243C0
cmp	eax, 0FFFFFFFFh
jz	loc_6CF1EF
mov	ecx, [edi+0BCh]
mov	ecx, [ecx+8]
push	eax
push	ebx
lea	edx, [esp+50h+var_40]
push	edx
call	sub_728B20
test	al, al
jz	loc_6CF1EF
mov	ecx, [esp+48h+var_40]
call	sub_6CD120
test	al, al
jz	loc_6CF1EF
mov	eax, [esp+48h+var_40]
mov	edx, [edi]
push	esi
mov	esi, [eax+10h]
mov	eax, [edx+54h]
and	esi, 0FFFFFFFCh
mov	ecx, edi
add	esi, 8
call	eax
mov	[esp+4Ch+var_3C], eax
cmp	eax, ebx
jz	loc_6CF1EE
push	0Bh
push	offset aAsfunction ; "asfunction:"
push	esi
call	sub_679A30
test	eax, eax
jnz	loc_6CF1EE
push	ebp
add	esi, 0Bh
push	2Ch		; int
push	esi		; char *
call	_strchr
add	esp, 8
lea	ecx, [esp+50h+arg_0]
mov	ebp, eax
call	sub_679E30
mov	[esp+50h+var_30], offset off_154CB6C
mov	[esp+50h+var_28], ebx
mov	[esp+50h+var_24], ebx
test	ebp, ebp
jz	short loc_6CF152
mov	ecx, ebp
sub	ecx, esi
push	ecx
push	esi
lea	ecx, [esp+58h+arg_0]
call	sub_67A0C0
inc	ebp
push	ebp
lea	ecx, [esp+54h+var_30]
mov	ebx, 1
call	sub_408960
jmp	short loc_6CF15C

loc_6CF152:
push	esi
lea	ecx, [esp+54h+arg_0]
call	sub_67A2C0

loc_6CF15C:
mov	edi, [edi+20h]
xor	esi, esi
mov	[esp+50h+var_18], offset off_154CB6C
mov	[esp+50h+var_10], esi
mov	[esp+50h+var_C], esi
pop	ebp
cmp	edi, esi
jz	short loc_6CF1A7
inc	dword ptr [edi+4]
lea	ecx, [edi+78h]
call	sub_661C50
cmp	eax, esi
jz	short loc_6CF1A7
push	ebx
lea	edx, [esp+50h+var_30]
push	edx
mov	edx, [esp+54h+arg_0]
lea	ecx, [esp+54h+var_18]
push	ecx
mov	ecx, [esp+58h+var_3C]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
push	eax
call	sub_69B720
jmp	short loc_6CF1C8

loc_6CF1A7:
mov	ecx, [esp+4Ch+var_3C]
mov	eax, [ecx]
mov	eax, [eax+5Ch]
push	ebx
lea	edx, [esp+50h+var_30]
push	edx
lea	edx, [esp+54h+var_18]
push	edx
mov	edx, [esp+58h+arg_0]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
call	eax

loc_6CF1C8:
cmp	edi, esi
jz	short loc_6CF1D3
mov	ecx, edi
call	sub_64A400

loc_6CF1D3:
lea	ecx, [esp+4Ch+var_18]
call	sub_4088B0
lea	ecx, [esp+4Ch+var_30]
call	sub_4088B0
lea	ecx, [esp+4Ch+arg_0]
call	sub_4E40F0

loc_6CF1EE:
pop	esi

loc_6CF1EF:
pop	ebx

loc_6CF1F0:
mov	al, 1
pop	edi
add	esp, 40h
retn	4

loc_6CF1F9:
xor	al, al
pop	edi
add	esp, 40h
retn	4
sub_6CF020 endp

align 10h



sub_6CF210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi+0BCh]
mov	eax, [ecx+11Ch]
push	edi
test	eax, eax
jz	short loc_6CF22D
mov	al, [eax+68h]
shr	al, 1
jmp	short loc_6CF239

loc_6CF22D:
mov	eax, [esi+0B8h]
mov	al, [eax+50h]
shr	al, 5

loc_6CF239:
mov	ebp, [esp+10h+arg_C]
mov	ebx, [esp+10h+arg_8]
mov	edi, [esp+10h+arg_0]
and	al, 1
test	al, al
jz	loc_6CF2FF
cmp	edi, 1
jnz	short loc_6CF2A5
mov	dx, [esi+0E4h]
shr	dx, 0Ah
test	dl, 1
jnz	short loc_6CF27F
cmp	ebp, edi
jz	short loc_6CF27F
mov	ecx, [ecx+8]
call	sub_726950
mov	edx, [esi]
push	eax
mov	eax, [edx+178h]
push	0
mov	ecx, esi
call	eax

loc_6CF27F:
mov	ecx, [esi+0BCh]
mov	[esi+10Ch], ebx
mov	ecx, [ecx+11Ch]
test	ecx, ecx
jz	short loc_6CF2FF
call	sub_72E5A0
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
jmp	short loc_6CF2F1

loc_6CF2A5:
test	edi, edi
jnz	short loc_6CF2FF
mov	dword ptr [esi+10Ch], 0FFFFFFFFh
mov	eax, [ecx+11Ch]
test	eax, eax
jz	short loc_6CF2FF
mov	cx, [esi+0E4h]
shr	cx, 9
test	cl, 1
jnz	short loc_6CF2D7
mov	ecx, [eax+8]
push	edi
push	edi
call	sub_720390

loc_6CF2D7:
mov	edx, [esi+0BCh]
mov	ecx, [edx+11Ch]
call	sub_72E5D0
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx

loc_6CF2F1:
test	eax, eax
jz	short loc_6CF2FF
or	dword ptr [eax+2474h], 400h

loc_6CF2FF:
mov	eax, [esi+0BCh]
mov	ecx, [eax+11Ch]
test	ecx, ecx
jz	short loc_6CF314
mov	al, [ecx+68h]
jmp	short loc_6CF320

loc_6CF314:
mov	edx, [esi+0B8h]
mov	al, [edx+50h]
shr	al, 3

loc_6CF320:
and	al, 1
test	al, al
jz	short loc_6CF343
test	ecx, ecx
jz	short loc_6CF331
mov	al, [ecx+68h]
shr	al, 1
jmp	short loc_6CF33D

loc_6CF331:
mov	eax, [esi+0B8h]
mov	al, [eax+50h]
shr	al, 5

loc_6CF33D:
and	al, 1
test	al, al
jz	short loc_6CF3AF

loc_6CF343:
cmp	edi, 1
jnz	short loc_6CF36A
test	ecx, ecx
jz	short loc_6CF36A
push	edi
push	edi
call	sub_72E490
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, esi
call	eax
test	eax, eax
jz	short loc_6CF36A
or	dword ptr [eax+2474h], 400h

loc_6CF36A:
mov	ecx, [esp+10h+arg_4]
push	ebp
push	ebx
push	ecx
push	edi
mov	ecx, esi
call	sub_658F70
mov	edx, [esi+0BCh]
mov	eax, [edx+11Ch]
test	eax, eax
jz	short loc_6CF3AF
mov	al, [eax+68h]
not	al
test	al, 1
jz	short loc_6CF3AF
mov	edx, [esi]
mov	eax, [edx+54h]
mov	ecx, 4000h
or	[esi+0E4h], cx
mov	ecx, esi
call	eax
push	eax
mov	ecx, esi
call	sub_6CE2D0

loc_6CF3AF:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_6CF210 endp

align 10h



sub_6CF3C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx+0BCh]
push	esi
call	sub_7243A0
fldz
mov	esi, [esp+4+arg_0]
fst	dword ptr [esi]
mov	ecx, [esp+4+arg_4]
fst	dword ptr [esi+4]
push	eax
fst	dword ptr [esi+8]
push	esi
fstp	dword ptr [esi+0Ch]
call	sub_64EF10
mov	eax, esi
pop	esi
retn	8
sub_6CF3C0 endp

align 10h



sub_6CF3F0 proc	near

var_154= dword ptr -154h
var_14D= byte ptr -14Dh
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= word ptr -10Ch
var_10A= word ptr -10Ah
var_108= word ptr -108h
var_106= word ptr -106h
var_104= word ptr -104h
var_102= word ptr -102h
var_100= byte ptr -100h
var_FE=	word ptr -0FEh
var_FC=	byte ptr -0FCh
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_9C=	byte ptr -9Ch
var_5C=	byte ptr -5Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 154h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+154h+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+160h+arg_0]
mov	eax, [esi+48h]
mov	ebp, [eax+0Ch]
push	edi
mov	ebx, ecx
mov	[esp+164h+var_14C], esi
test	ebp, ebp
jz	loc_6CFB71
lea	ecx, [esp+164h+var_140]
call	sub_64E8E0
cmp	byte ptr [esi+14h], 0
jnz	short loc_6CF46B
mov	eax, [esi+4]
fld	dword ptr [eax]
lea	ecx, [ebx+44h]
fstp	[esp+164h+var_140]
push	ecx
fld	dword ptr [eax+4]
lea	ecx, [esp+168h+var_140]
fstp	[esp+168h+var_13C]
fld	dword ptr [eax+8]
fstp	[esp+168h+var_138]
fld	dword ptr [eax+0Ch]
fstp	[esp+168h+var_134]
fld	dword ptr [eax+10h]
fstp	[esp+168h+var_130]
fld	dword ptr [eax+14h]
fstp	[esp+168h+var_12C]
call	sub_64EAF0

loc_6CF46B:
mov	esi, [esi]
mov	ecx, 8
lea	edi, [esp+164h+var_FC]
lea	edx, [ebx+24h]
rep movsd
push	edx
lea	ecx, [esp+168h+var_FC]
call	sub_68CE70
mov	eax, [ebx]
mov	edx, [eax+54h]
mov	ecx, ebx
call	edx
mov	[esp+164h+var_114], eax
test	eax, eax
jz	loc_6CFB71
mov	edx, [esp+164h+var_14C]
mov	eax, [edx+8]
mov	cl, [edx+14h]
mov	[esp+164h+var_110], eax
mov	[esp+164h+var_14D], cl
test	eax, eax
jnz	short loc_6CF4B5
mov	eax, offset unk_167D018

loc_6CF4B5:
cmp	[esp+164h+var_14D], 0
mov	ecx, 10h
mov	esi, eax
lea	edi, [esp+164h+var_9C]
rep movsd
jz	loc_6CF56A
lea	edx, [esp+164h+var_5C]
push	edx
mov	ecx, ebx
call	sub_654C20
mov	ecx, 10h
lea	esi, [esp+164h+var_9C]
lea	edi, [esp+164h+var_DC]
rep movsd
lea	ecx, [esp+164h+var_DC]
push	ecx
push	eax
lea	ecx, [esp+16Ch+var_9C]
call	sub_64F7E0
mov	esi, [esp+164h+var_14C]
mov	edx, [esi+48h]
mov	ecx, [edx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+5Ch]
lea	edx, [esp+164h+var_9C]
push	edx
call	eax
lea	ecx, [esp+164h+var_9C]
mov	[esi+8], ecx
fld	flt_167D000
fstp	[esp+164h+var_140]
mov	edx, esi
fld	flt_167D004
fstp	[esp+164h+var_13C]
fld	flt_167D008
fstp	[esp+164h+var_138]
fld	flt_167D00C
fstp	[esp+164h+var_134]
fld	flt_167D010
fstp	[esp+164h+var_130]
fld	flt_167D014
fstp	[esp+164h+var_12C]

loc_6CF56A:
cmp	dword ptr [edx+8], 0
jnz	loc_6CF604
mov	ecx, [ebx+0BCh]
call	sub_7243A0
fldz
fst	[esp+164h+var_128]
push	eax
fst	[esp+168h+var_124]
lea	edx, [esp+168h+var_128]
fst	[esp+168h+var_120]
push	edx
lea	ecx, [esp+16Ch+var_140]
fstp	[esp+16Ch+var_11C]
call	sub_64EF10
mov	ecx, [esp+164h+var_114]
fld	dword ptr [ecx+9Ch]
fld	[esp+164h+var_124]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6CF5F0
fld	[esp+164h+var_11C]
fld	dword ptr [ecx+94h]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6CF5F0
fld	[esp+164h+var_120]
fld	dword ptr [ecx+90h]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6CF5F0
fld	dword ptr [ecx+98h]
fld	[esp+164h+var_128]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_6CF604

loc_6CF5F0:
mov	eax, [esp+164h+var_14C]
mov	ecx, [eax+48h]
test	dword ptr [ecx+14h], 100h
jz	loc_6CFB71

loc_6CF604:
fld	[esp+164h+var_E4]
fabs
fstp	[esp+164h+var_144]
fld	[esp+164h+var_144]
fcomp	ds:flt_1432128
fnstsw	ax
test	ah, 5
jp	short loc_6CF644
fld	[esp+164h+var_E0]
fabs
fstp	[esp+164h+var_144]
fld	[esp+164h+var_144]
fcomp	ds:flt_15AA9FC
fnstsw	ax
test	ah, 5
jnp	loc_6CFB71

loc_6CF644:
cmp	byte ptr [ebx+0CFh], 0
ja	short loc_6CF65A
cmp	byte ptr [ebx+0CBh], 0
jbe	loc_6CF866

loc_6CF65A:
mov	edx, [ebp+0]
mov	edx, [edx+40h]
lea	eax, [esp+164h+var_FC]
push	eax
mov	ecx, ebp
call	edx
fld	[esp+164h+var_140]
fstp	[esp+164h+var_DC]
mov	ecx, [ebx+0BCh]
fld	[esp+164h+var_13C]
lea	eax, [esp+164h+var_128]
fstp	[esp+164h+var_D8]
push	eax
fld	[esp+168h+var_138]
fstp	[esp+168h+var_D4]
fld	[esp+168h+var_134]
fstp	[esp+168h+var_D0]
fld	[esp+168h+var_130]
fstp	[esp+168h+var_CC]
fld	[esp+168h+var_12C]
fstp	[esp+168h+var_C8]
fldz
fst	[esp+168h+var_128]
fst	[esp+168h+var_124]
fst	[esp+168h+var_120]
fstp	[esp+168h+var_11C]
call	sub_7243A0
push	eax
lea	ecx, [esp+16Ch+var_DC]
push	ecx
call	sub_7340C0
mov	edx, [ebp+0]
mov	edx, [edx+38h]
add	esp, 0Ch
lea	eax, [esp+164h+var_DC]
push	eax
mov	ecx, ebp
call	edx
fld	[esp+164h+var_128]
call	__ftol2_sse
fld	[esp+164h+var_124]
mov	si, ax
mov	[esp+164h+var_10C], si
call	__ftol2_sse
fld	[esp+164h+var_120]
mov	di, ax
mov	[esp+164h+var_10A], di
call	__ftol2_sse
fld	[esp+164h+var_11C]
mov	word ptr [esp+164h+var_148], ax
mov	[esp+164h+var_108], ax
mov	[esp+164h+var_106], di
mov	[esp+164h+var_104], si
call	__ftol2_sse
mov	cx, word ptr [esp+164h+var_148]
mov	[esp+164h+var_102], ax
mov	word ptr [esp+164h+var_100], cx
mov	[esp+164h+var_FE], ax
mov	word ptr [esp+164h+var_18], cx
mov	word ptr [esp+164h+var_14], cx
mov	word ptr [esp+164h+var_14+2], ax
push	ecx
mov	ecx, [ebx+0C8h]
mov	word ptr [esp+168h+var_10+2], ax
mov	eax, esp
mov	word ptr [esp+168h+var_1C], si
mov	word ptr [esp+168h+var_1C+2], di
mov	word ptr [esp+168h+var_18+2], di
mov	word ptr [esp+168h+var_10], si
mov	word ptr [esp+168h+var_C], si
mov	word ptr [esp+168h+var_C+2], di
mov	[eax], ecx
mov	edx, [ebp+0]
mov	eax, [edx+8Ch]
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
push	0
push	1
push	4
lea	eax, [esp+170h+var_10C]
mov	edx, [edx+6Ch]
push	eax
mov	ecx, ebp
call	edx
mov	eax, [ebp+0]
mov	edx, [eax+70h]
push	0
push	1
push	6
push	offset unk_1440798
mov	ecx, ebp
call	edx
mov	eax, [ebp+0]
mov	edx, [eax+78h]
push	2
push	0
push	4
push	0
push	0
mov	ecx, ebp
call	edx
mov	eax, [ebp+0]
mov	edx, [eax+6Ch]
push	0
push	0
push	0
push	0
mov	ecx, ebp
call	edx
mov	eax, [ebp+0]
mov	edx, [eax+6Ch]
push	0
push	1
push	5
lea	ecx, [esp+170h+var_1C]
push	ecx
mov	ecx, ebp
call	edx
push	ecx
mov	ecx, [ebx+0CCh]
mov	eax, esp
mov	[eax], ecx
mov	edx, [ebp+0]
mov	eax, [edx+84h]
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	eax, [edx+7Ch]
push	4
push	0
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	eax, [edx+6Ch]
push	0
push	0
push	0
push	0
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	eax, [edx+70h]
push	0
push	0
push	0
push	0
mov	ecx, ebp
call	eax

loc_6CF866:
movzx	eax, word ptr [ebx+0E4h]
mov	cl, al
shr	cl, 6
and	cl, 1
mov	byte ptr [esp+164h+var_148], cl
mov	ecx, [esp+164h+var_114]
and	eax, 0FFBFh
push	ebx
mov	[ebx+0E4h], ax
call	sub_693B60
mov	edi, [esp+164h+var_14C]
mov	byte ptr [esp+164h+var_144], al
mov	edx, [esp+164h+var_144]
push	edx
lea	eax, [esp+168h+var_FC]
push	eax
lea	ecx, [esp+16Ch+var_140]
push	ecx
mov	ecx, [ebx+0BCh]
push	edi
call	sub_71E8A0
mov	eax, [ebx+100h]
test	eax, eax
jz	loc_6CFACD
xor	ebp, ebp
cmp	[eax+0Ch], ebp
jbe	loc_6CF9F6
jmp	short loc_6CF8D0
align 10h

loc_6CF8D0:
fld	[esp+164h+var_140]
mov	eax, [ebx+100h]
fst	[esp+164h+var_1C]
mov	ecx, 8
fld	[esp+164h+var_13C]
lea	esi, [esp+164h+var_FC]
fst	[esp+164h+var_18]
lea	edi, [esp+164h+var_DC]
fld	[esp+164h+var_138]
rep movsd
fst	[esp+164h+var_14]
fld	[esp+164h+var_134]
fst	[esp+164h+var_10]
fld	[esp+164h+var_130]
fst	[esp+164h+var_C]
fld	[esp+164h+var_12C]
fst	[esp+164h+var_8]
fldz
fst	[esp+164h+var_CC]
fst	[esp+164h+var_D4]
fstp	[esp+164h+var_DC]
movzx	edx, byte ptr [eax+2]
mov	[esp+164h+var_154], edx
fild	[esp+164h+var_154]
fstp	[esp+164h+var_D8]
movzx	ecx, byte ptr [eax+1]
mov	[esp+164h+var_154], ecx
mov	ecx, [esp+164h+var_148]
push	ecx
fild	[esp+168h+var_154]
mov	ecx, [esp+168h+var_14C]
fstp	[esp+168h+var_D0]
movzx	edx, byte ptr [eax]
mov	[esp+168h+var_154], edx
lea	edx, [esp+168h+var_DC]
push	edx
fild	[esp+16Ch+var_154]
fstp	[esp+16Ch+var_C8]
mov	eax, [eax+8]
fld	dword ptr [eax+ebp*8]
lea	eax, [eax+ebp*8]
fstp	[esp+16Ch+var_118]
fld	dword ptr [eax+4]
lea	eax, [esp+16Ch+var_1C]
fstp	[esp+16Ch+var_154]
push	eax
fld	[esp+170h+var_118]
push	ecx
fld	st
mov	ecx, [ebx+0BCh]
fmulp	st(7), st
fld	[esp+174h+var_154]
fmulp	st(6), st
fxch	st(6)
faddp	st(5), st
fxch	st(4)
faddp	st(3), st
fxch	st(2)
fstp	[esp+174h+var_14]
fmulp	st(3), st
fmul	[esp+174h+var_154]
faddp	st(2), st
faddp	st(1), st
fstp	[esp+174h+var_8]
call	sub_7255D0
mov	edx, [ebx+100h]
inc	ebp
cmp	ebp, [edx+0Ch]
jb	loc_6CF8D0
mov	edi, [esp+164h+var_14C]

loc_6CF9F6:
mov	eax, [ebx+100h]
mov	eax, [eax+18h]
test	eax, eax
jz	loc_6CFAD0
xor	esi, esi
test	eax, eax
jbe	loc_6CFAEB

loc_6CFA11:
fld	[esp+164h+var_140]
mov	ecx, [ebx+100h]
fst	[esp+164h+var_1C]
fld	[esp+164h+var_13C]
fst	[esp+164h+var_18]
fld	[esp+164h+var_138]
fst	[esp+164h+var_14]
fld	[esp+164h+var_134]
fst	[esp+164h+var_10]
fld	[esp+164h+var_130]
fst	[esp+164h+var_C]
fld	[esp+164h+var_12C]
fst	[esp+164h+var_8]
mov	edx, [ecx+14h]
fld	dword ptr [edx+esi*8]
lea	eax, [edx+esi*8]
fstp	[esp+164h+var_118]
lea	ecx, [esp+164h+var_FC]
fld	dword ptr [eax+4]
mov	eax, [esp+164h+var_148]
fstp	[esp+164h+var_154]
push	eax
fld	[esp+168h+var_118]
push	ecx
fld	st
mov	ecx, [ebx+0BCh]
fmulp	st(7), st
lea	edx, [esp+16Ch+var_1C]
fld	[esp+16Ch+var_154]
push	edx
fmulp	st(6), st
push	edi
fxch	st(6)
faddp	st(5), st
fxch	st(4)
faddp	st(3), st
fxch	st(2)
fstp	[esp+174h+var_14]
fmulp	st(3), st
fmul	[esp+174h+var_154]
faddp	st(2), st
faddp	st(1), st
fstp	[esp+174h+var_8]
call	sub_7255D0
mov	eax, [ebx+100h]
inc	esi
cmp	esi, [eax+18h]
jb	loc_6CFA11
jmp	short loc_6CFAEB

loc_6CFACD:
mov	[edi+50h], ebx

loc_6CFAD0:
mov	ecx, [esp+164h+var_148]
push	ecx
mov	ecx, [ebx+0BCh]
lea	edx, [esp+168h+var_FC]
push	edx
lea	eax, [esp+16Ch+var_140]
push	eax
push	edi
call	sub_7255D0

loc_6CFAEB:
mov	ecx, [ebx+0BCh]
cmp	dword ptr [ecx+11Ch], 0
jz	short loc_6CFB24
mov	ecx, [esp+164h+var_114]
push	ebx
call	sub_693B60
test	al, al
jz	short loc_6CFB24
mov	ecx, [ebx+0BCh]
mov	ecx, [ecx+11Ch]
lea	edx, [esp+164h+var_FC]
push	edx
lea	eax, [esp+168h+var_140]
push	eax
push	edi
call	sub_72F7D0

loc_6CFB24:
cmp	byte ptr [edi+14h], 0
jz	short loc_6CFB3C
mov	edx, [edi+48h]
mov	ecx, [edx+0Ch]
mov	eax, [ecx]
mov	edx, [esp+164h+var_110]
mov	eax, [eax+5Ch]
push	edx
call	eax

loc_6CFB3C:
mov	cl, [esp+164h+var_14D]
mov	edx, [esp+164h+var_110]
mov	[edi+14h], cl
mov	[edi+8], edx
mov	eax, [ebx]
mov	edx, [eax+114h]
mov	ecx, ebx
call	edx
mov	eax, [esp+164h+var_144]
push	eax
lea	ecx, [esp+168h+var_FC]
push	ecx
mov	ecx, [ebx+0BCh]
lea	edx, [esp+16Ch+var_140]
push	edx
push	edi
call	sub_71DFD0

loc_6CFB71:
mov	ecx, [esp+164h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 154h
retn	4
sub_6CF3F0 endp

align 10h



sub_6CFB90 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6CFBA3
lea	edi, [eax-78h]
jmp	short loc_6CFBA5

loc_6CFBA3:
xor	edi, edi

loc_6CFBA5:
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
test	eax, eax
jz	loc_6CFCC5
mov	cl, [eax+68h]
and	cl, 1
jz	short loc_6CFBCF
mov	dl, [eax+68h]
shr	dl, 1
and	dl, 1
jz	loc_6CFCC5

loc_6CFBCF:
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
sub	eax, 0
jz	short loc_6CFC65
sub	eax, 1
jz	short loc_6CFC25
sub	eax, 1
jnz	loc_6CFCC5
mov	ecx, [edi+0BCh]
mov	edx, [esi+18h]
mov	edi, [ecx+11Ch]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
movzx	eax, ax
push	eax
mov	ecx, edi
call	sub_72FDB0
pop	edi
pop	esi
pop	ecx
retn

loc_6CFC25:
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	edx, eax
sar	edx, 10h
or	dl, 80h
mov	byte ptr [esp+0Ch+arg_0], dl
mov	edx, [edi+0BCh]
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [edx+11Ch]
and	eax, 0FFFFh
push	eax
call	sub_72E550
pop	edi
pop	esi
pop	ecx
retn

loc_6CFC65:
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	ecx, eax
sar	ecx, 10h
mov	esi, eax
mov	eax, [edi+0BCh]
or	cl, 80h
lea	edx, [esp+0Ch+var_1]
push	edx
mov	[esp+10h+var_1], cl
mov	ecx, [eax+11Ch]
and	esi, 0FFFFh
push	esi
call	sub_730320
cmp	esi, 2Dh
jnz	short loc_6CFCC5
mov	esi, [edi]
mov	ecx, edi
call	sub_6CE0E0
test	al, al
mov	eax, [esi+188h]
setz	cl
movzx	edx, cl
push	edx
mov	ecx, edi
call	eax

loc_6CFCC5:
pop	edi
pop	esi
pop	ecx
retn
sub_6CFB90 endp

align 10h



sub_6CFCD0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 28h
push	esi
push	edi
mov	edi, [esp+30h+arg_0]
push	edi
mov	esi, ecx
call	sub_655C40
cmp	[esp+30h+arg_4], 0
jnz	short loc_6CFCFA
mov	eax, 2000h
test	[esi+0E4h], ax
jz	loc_6CFDB5

loc_6CFCFA:
mov	ecx, [esi+0BCh]
call	sub_7243A0
fld	dword ptr [eax]
fstp	[esp+30h+var_28]
fld	dword ptr [eax+4]
fstp	[esp+30h+var_24]
fld	dword ptr [esi+44h]
fstp	[esp+30h+var_18]
fld	dword ptr [esi+48h]
fstp	[esp+30h+var_14]
fld	dword ptr [esi+4Ch]
fstp	[esp+30h+var_10]
fld	dword ptr [esi+50h]
fstp	[esp+30h+var_C]
fld	dword ptr [esi+54h]
fstp	[esp+30h+var_8]
fld	dword ptr [esi+58h]
fstp	[esp+30h+var_4]
fld	[esp+30h+var_28]
fld	st
fmul	[esp+30h+var_18]
fld	[esp+30h+var_24]
fld	st
fmul	[esp+30h+var_14]
faddp	st(2), st
fld	[esp+30h+var_10]
faddp	st(2), st
fld	[esp+30h+var_C]
fmulp	st(3), st
fmul	[esp+30h+var_8]
faddp	st(2), st
fld	[esp+30h+var_4]
faddp	st(2), st
fldz
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FCC48
test	ah, 5
jp	short loc_6CFD7F
fadd	st(2), st
jmp	short loc_6CFD81

loc_6CFD7F:
fsub	st(2), st

loc_6CFD81:
fxch	st(2)
call	__ftol2_sse
fcomp	st(2)
mov	[edi], eax
fnstsw	ax
test	ah, 5
jp	short loc_6CFD97
faddp	st(1), st
jmp	short loc_6CFD99

loc_6CFD97:
fsubp	st(1), st

loc_6CFD99:
call	__ftol2_sse
push	edi
mov	ecx, esi
mov	[edi+4], eax
call	sub_656500
mov	ecx, 0DFFFh
and	[esi+0E4h], cx

loc_6CFDB5:
mov	eax, edi
pop	edi
pop	esi
add	esp, 28h
retn	8
sub_6CFCD0 endp

align 10h



sub_6CFDC0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx+4]
push	esi
mov	esi, [ecx]
mov	[eax], esi
mov	[eax+4], edx
mov	edx, [ecx+8]
pop	esi
test	edx, edx
jz	short loc_6CFDDC
inc	dword ptr [edx+4]

loc_6CFDDC:
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	ecx, [ecx+10h]
mov	[eax+10h], ecx
retn	4
sub_6CFDC0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_6D1680

loc_6CFE00:
mov	eax, ecx
mov	ecx, [esp+arg_0]
movzx	edx, byte ptr [ecx+8]
mov	[eax+8], dl
movzx	edx, byte ptr [ecx+9]
mov	[eax+9], dl
movzx	edx, byte ptr [ecx+0Ah]
mov	[eax+0Ah], dl
movzx	edx, byte ptr [ecx+0Bh]
mov	[eax+0Bh], dl
movzx	edx, byte ptr [ecx+0Ch]
mov	[eax+0Ch], dl
movzx	edx, byte ptr [ecx+0Dh]
mov	[eax+0Dh], dl
movzx	edx, byte ptr [ecx+0Eh]
mov	[eax+0Eh], dl
movzx	edx, byte ptr [ecx+0Fh]
mov	[eax+0Fh], dl
movzx	edx, byte ptr [ecx+10h]
mov	[eax+10h], dl
movzx	edx, word ptr [ecx+12h]
mov	[eax+12h], dx
movzx	edx, word ptr [ecx+14h]
mov	[eax+14h], dx
movzx	edx, word ptr [ecx+16h]
mov	[eax+16h], dx
movzx	edx, word ptr [ecx+18h]
mov	[eax+18h], dx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	ecx, [ecx+20h]
mov	[eax+20h], ecx
retn	4
; END OF FUNCTION CHUNK	FOR sub_6D1680
align 10h


; Attributes: bp-based frame

sub_6CFE80 proc	near

var_88=	qword ptr -88h
var_80=	qword ptr -80h
var_78=	qword ptr -78h
var_70=	qword ptr -70h
var_68=	qword ptr -68h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	qword ptr -40h
var_38=	byte ptr -38h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 8Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+90h+var_38]
call	sub_64E8E0
fldz
fst	[esp+90h+var_40]
xor	eax, eax
fld	ds:dbl_15FCBF8
push	eax
fst	[esp+94h+var_48]
mov	dword ptr [esp+94h+var_58+4], eax
fst	[esp+94h+var_50]
mov	dword ptr [esp+94h+var_58], eax
fstp	[esp+94h+var_18]
lea	eax, [esp+94h+var_58]
push	eax
mov	ecx, esi
fst	[esp+98h+var_8]
fst	[esp+98h+var_10]
fstp	[esp+98h+var_20]
call	sub_6CFCD0
fild	dword ptr [esp+90h+var_58]
mov	edx, [esi]
fld	ds:dbl_15FCE20
mov	eax, [edx+10h]
mov	ecx, esi
fdiv	st(1), st
fxch	st(1)
fstp	[esp+90h+var_80]
fidivr	dword ptr [esp+90h+var_58+4]
fstp	[esp+90h+var_60]
fld	[esp+90h+var_40]
fstp	[esp+90h+var_70]
fld	[esp+90h+var_50]
fstp	[esp+90h+var_88]
fld	[esp+90h+var_48]
fstp	[esp+90h+var_78]
fld	dword ptr [esi+3Ch]
fmul	ds:dbl_15FCBF8
fstp	[esp+90h+var_68]
call	eax
mov	ecx, [ebp+arg_0]
fld	[esp+90h+var_80]
fstp	qword ptr [ecx]
mov	edx, 7FFh
fld	[esp+90h+var_60]
or	[ecx+0E0h], dx
fstp	qword ptr [ecx+8]
mov	[ecx+30h], al
fld	[esp+90h+var_70]
pop	esi
fstp	qword ptr [ecx+10h]
fld	[esp+8Ch+var_88]
fstp	qword ptr [ecx+18h]
fld	[esp+8Ch+var_78]
fstp	qword ptr [ecx+20h]
fld	[esp+8Ch+var_68]
fstp	qword ptr [ecx+28h]
fld	[esp+8Ch+var_20]
fstp	qword ptr [ecx+38h]
fld	[esp+8Ch+var_10]
fstp	qword ptr [ecx+40h]
fld	[esp+8Ch+var_8]
fstp	qword ptr [ecx+48h]
fld	[esp+8Ch+var_18]
fstp	qword ptr [ecx+50h]
mov	esp, ebp
pop	ebp
retn	4
sub_6CFE80 endp

align 10h


; Attributes: bp-based frame

sub_6CFF90 proc	near

var_108= dword ptr -108h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	byte ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
arg_0= dword ptr  8
arg_4= qword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 0F4h
mov	eax, dword ptr [ebp+arg_4]
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	ebx, [esi-78h]
push	eax
mov	ecx, ebx
mov	[esp+104h+var_B4], 0
call	sub_6593C0
mov	edi, [ebp+arg_0]
cmp	eax, 6Bh	; switch 108 cases
ja	loc_6D105B	; default
			; jumptable 006CFFCA cases 2-24,26-37,87-89,97
movzx	ecx, ds:byte_6D1224[eax]
jmp	ds:off_6D110C[ecx*4] ; switch jump

loc_6CFFD1:		; jumptable 006CFFCA case 0
lea	ecx, [esp+100h+var_58]
call	sub_64A790
push	0
lea	edx, [esp+104h+var_58]
push	edx
mov	ecx, ebx
call	sub_6CFCD0
fild	[esp+100h+var_58]
fdiv	ds:dbl_15FCE20

loc_6CFFFB:
mov	ecx, dword ptr [ebp+arg_4+4]
sub	esp, 8
fstp	qword ptr [esp+108h+var_108]
call	sub_64A6A0

loc_6D0009:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0014:		; jumptable 006CFFCA case 1
lea	ecx, [esp+100h+var_58]
call	sub_64A790
push	0
lea	eax, [esp+104h+var_58]
push	eax
mov	ecx, ebx
call	sub_6CFCD0
fild	[esp+100h+var_54]
mov	ecx, dword ptr [ebp+arg_4+4]
sub	esp, 8
fdiv	ds:dbl_15FCE20
fstp	qword ptr [esp+108h+var_108]
call	sub_64A6A0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0057:		; jumptable 006CFFCA case 43
mov	cl, [esi+6Ch]
shr	cl, 1
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0076:		; jumptable 006CFFCA case 44
mov	ecx, ebx
call	sub_6C4AA0
test	al, al
jz	short loc_6D00DA
mov	esi, [esi+70h]
mov	edx, esi
mov	eax, edi
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
and	edx, 0FFFFFFFCh
mov	eax, [edx]
and	eax, 7FFFFFFFh
and	esi, 0FFFFFFFCh
push	eax
add	esi, 8
push	esi
call	sub_650F20
mov	ecx, dword ptr [ebp+arg_4+4]
mov	esi, eax
inc	dword ptr [esi+8]
lea	eax, [esp+100h+var_B8]
push	eax
mov	[esp+104h+var_B8], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	loc_6D01BD
mov	ecx, esi
call	sub_650DF0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D00DA:
mov	cl, [esi+6Ch]
mov	esi, [esi+44h]
shr	cl, 1
mov	edi, 1
test	cl, 1
jz	short loc_6D015D
lea	edx, [esp+100h+var_64]
push	edx
mov	ecx, esi
call	sub_71E350
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	eax, [eax]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	ecx, dword ptr [ebp+arg_4+4]
mov	esi, eax
add	[esi+8], edi
lea	eax, [esp+100h+var_B8]
push	eax
mov	[esp+104h+var_B8], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D0146
mov	ecx, esi
call	sub_650DF0

loc_6D0146:
lea	ecx, [esp+100h+var_64]
call	sub_4E40F0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D015D:
lea	ecx, [esp+100h+var_84]
push	ecx
mov	ecx, esi
call	sub_71E330
mov	eax, [eax]
mov	edx, [ebp+arg_0]
mov	ecx, [edx+78h]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	ecx, dword ptr [ebp+arg_4+4]
mov	esi, eax
add	[esi+8], edi
lea	eax, [esp+100h+var_B8]
push	eax
mov	[esp+104h+var_B8], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D01B4
mov	ecx, esi
call	sub_650DF0

loc_6D01B4:
lea	ecx, [esp+100h+var_84]
call	sub_4E40F0

loc_6D01BD:
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D01C8:		; jumptable 006CFFCA case 38
mov	esi, [esi+44h]
lea	ecx, [esp+100h+var_60]
push	ecx
mov	ecx, esi
call	sub_71E330
mov	eax, [eax]
mov	edx, edi
mov	ecx, [edx+78h]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	ecx, dword ptr [ebp+arg_4+4]
mov	esi, eax
inc	dword ptr [esi+8]
lea	eax, [esp+100h+var_B8]
push	eax
mov	[esp+104h+var_B8], esi
call	sub_64A680
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D0224
mov	ecx, esi
call	sub_650DF0

loc_6D0224:
lea	ecx, [esp+100h+var_60]
call	sub_4E40F0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D023B:		; jumptable 006CFFCA case 41
mov	ecx, [esi+44h]
mov	edx, [ecx+8]
mov	eax, [edx+1Ch]
mov	eax, [eax+20h]
mov	ecx, eax
shr	ecx, 10h
movzx	edx, cl
mov	ecx, eax
shr	ecx, 8
movzx	ecx, cl
shl	edx, 8
or	edx, ecx
mov	ecx, dword ptr [ebp+arg_4+4]
movzx	eax, al
shl	edx, 8
or	edx, eax
push	edx
call	sub_6B7B70
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0278:		; jumptable 006CFFCA case 39
mov	ecx, [esi+44h]
call	sub_7242E0
fstp	[esp+100h+var_B8]
fld	[esp+100h+var_B8]
fdiv	ds:dbl_15FCE20
fstp	[esp+100h+var_B8]
fld	[esp+100h+var_B8]
call	__ftol2_sse
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
jmp	loc_6CFFFB

loc_6D02A8:		; jumptable 006CFFCA case 40
mov	ecx, [esi+44h]
call	sub_724320
fstp	[esp+100h+var_B8]
fld	[esp+100h+var_B8]
fdiv	ds:dbl_15FCE20
fstp	[esp+100h+var_B8]
fld	[esp+100h+var_B8]
call	__ftol2_sse
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
jmp	loc_6CFFFB

loc_6D02D8:		; jumptable 006CFFCA case 42
mov	ecx, [esi+44h]
mov	ecx, [ecx+8]
call	sub_726950
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D02FE:		; jumptable 006CFFCA case 46
test	byte ptr [esi+6Ch], 1
jnz	short loc_6D0327
push	offset aNone_0	; "none"
lea	edx, [esp+104h+var_A4]
push	edx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_A4]
jmp	loc_6D03C5

loc_6D0327:
mov	eax, [esi+44h]
movzx	eax, byte ptr [eax+14Ch]
and	eax, 3
sub	eax, 0
jz	short loc_6D03A1
sub	eax, 1
jz	short loc_6D0381
sub	eax, 1
jz	short loc_6D035B

loc_6D0343:		; default
mov	esi, dword ptr [ebp+arg_4+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D035B:		; "center"
push	offset aCenter
lea	ecx, [esp+104h+var_7C]
push	ecx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_7C]
jmp	short loc_6D03C5

loc_6D0381:		; "right"
push	offset aRight
lea	edx, [esp+104h+var_9C]
push	edx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_9C]
jmp	short loc_6D03C5

loc_6D03A1:		; "left"
push	offset aLeft_0
lea	eax, [esp+104h+var_5C]
push	eax
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_5C]

loc_6D03C5:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_6D0009
call	sub_650DF0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D03E6:		; jumptable 006CFFCA case 47
mov	ecx, [esi+44h]
mov	dl, [ecx+14Eh]
mov	ecx, dword ptr [ebp+arg_4+4]
shr	dl, 3
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D040C:		; jumptable 006CFFCA case 48
mov	ecx, [esi+44h]
mov	dl, [ecx+14Eh]
mov	ecx, dword ptr [ebp+arg_4+4]
shr	dl, 2
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0432:		; jumptable 006CFFCA case 49
cmp	byte ptr [esi+57h], 0
setnz	cl
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0450:		; jumptable 006CFFCA case 50
mov	ecx, [esi+58h]
cmp	dword ptr [ecx+10h], 0
lea	eax, [esi+58h]
jnz	loc_6D0511

loc_6D0460:
mov	esi, dword ptr [ebp+arg_4+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0478:		; jumptable 006CFFCA case 51
mov	ecx, ebx
call	sub_6C4940
mov	ecx, dword ptr [ebp+arg_4+4]
movzx	edx, al
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0496:		; jumptable 006CFFCA case 52
mov	eax, [esi+44h]
mov	cl, [eax+14Eh]
shr	cl, 5
not	cl
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D04BE:		; jumptable 006CFFCA case 66
mov	al, [esi+6Ch]
shr	al, 2
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, dword ptr [ebp+arg_4+4]
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D04DD:		; jumptable 006CFFCA case 67
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	esi, [esi+88h]
test	esi, esi
jz	short loc_6D050E
mov	ecx, dword ptr [ebp+arg_4+4]
lea	eax, [esi+4]
push	eax
call	sub_64A680
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D050E:
add	eax, 8

loc_6D0511:
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0525:		; jumptable 006CFFCA case 68
mov	edx, [edi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	eax, [esi+44h]
mov	ecx, [eax+13Ch]
and	ecx, offset sub_FFFFFF
push	ecx
mov	ecx, dword ptr [ebp+arg_4+4]
call	sub_6B7B70
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0558:		; jumptable 006CFFCA case 54
mov	ecx, [esi+44h]
call	sub_7242A0
mov	ecx, eax
mov	eax, 0CCCCCCCDh
mul	ecx
shr	edx, 4
mov	[esp+100h+var_B8], edx
fild	[esp+100h+var_B8]
test	edx, edx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0587:		; jumptable 006CFFCA case 55
mov	ecx, [esi+44h]
call	sub_7242C0
inc	eax
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D05AB:		; jumptable 006CFFCA case 56
mov	ecx, [esi+44h]
call	sub_71EBD0
inc	eax
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D05CF:		; jumptable 006CFFCA case 57
mov	ecx, [esi+44h]
call	sub_71EBB0
mov	ecx, eax
mov	eax, 0CCCCCCCDh
mul	ecx
shr	edx, 4
mov	[esp+100h+var_B8], edx
fild	[esp+100h+var_B8]
test	edx, edx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D05FE:		; jumptable 006CFFCA case 58
cmp	byte ptr [esi+53h], 0
mov	ecx, dword ptr [ebp+arg_4+4]
setnz	dl
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D061C:		; jumptable 006CFFCA case 59
mov	ecx, [esi+50h]
and	ecx, offset sub_FFFFFF
mov	[esp+100h+var_B4], ecx
fild	[esp+100h+var_B4]
test	ecx, ecx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0640:		; jumptable 006CFFCA case 60
mov	edx, [esi+54h]
and	edx, offset sub_FFFFFF
mov	[esp+100h+var_B4], edx
fild	[esp+100h+var_B4]
test	edx, edx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0664:		; jumptable 006CFFCA case 61
mov	ecx, [esi+44h]
call	sub_725410
inc	eax
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0688:		; jumptable 006CFFCA case 62
mov	ecx, ebx
call	sub_6C4970
test	al, al
jz	short loc_6D06A7
push	offset aDynamic	; "dynamic"
lea	eax, [esp+104h+var_74]
mov	ebx, 1
push	eax
jmp	short loc_6D06B6

loc_6D06A7:		; "input"
push	offset aInput
lea	ecx, [esp+104h+var_94]
mov	ebx, 2
push	ecx

loc_6D06B6:
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
test	bl, 2
jz	short loc_6D06E4
mov	eax, [esp+100h+var_94]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFDh
cmp	dword ptr [eax], 0
jnz	short loc_6D06E4
call	sub_650DF0

loc_6D06E4:
test	bl, 1
jz	loc_6D0009
mov	eax, [esp+100h+var_74]
jmp	loc_6D03C5

loc_6D06F9:		; jumptable 006CFFCA case 63
mov	edx, [esi+44h]
mov	eax, [edx+110h]
test	eax, eax
jz	loc_6D0460
mov	[esp+100h+var_B4], eax
fild	[esp+100h+var_B4]
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0723:		; jumptable 006CFFCA case 64
mov	al, [esi+6Ch]
shr	al, 4
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, dword ptr [ebp+arg_4+4]
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0742:		; jumptable 006CFFCA case 53
mov	edx, [esi+44h]
test	byte ptr [edx+14Eh], 40h
jz	short loc_6D075F
push	offset aAdvanced ; "advanced"
lea	eax, [esp+104h+var_B0]
mov	ebx, 4
push	eax
jmp	short loc_6D076E

loc_6D075F:		; "normal"
push	offset aNormal
lea	ecx, [esp+104h+var_8C]
mov	ebx, 8
push	ecx

loc_6D076E:
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
test	bl, 8
jz	short loc_6D079C
mov	eax, [esp+100h+var_8C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFF7h
cmp	dword ptr [eax], 0
jnz	short loc_6D079C
call	sub_650DF0

loc_6D079C:
test	bl, 4
jz	loc_6D0009
mov	eax, [esp+100h+var_B0]
jmp	loc_6D03C5

loc_6D07AE:		; jumptable 006CFFCA case 65
mov	dl, [esi+6Ch]
mov	ecx, dword ptr [ebp+arg_4+4]
shr	dl, 7
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D07CE:		; jumptable 006CFFCA case 45
mov	edi, dword ptr [ebp+arg_4+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
mov	esi, [esi+74h]
test	esi, esi
jz	loc_6D0009
mov	esi, [esi]
test	esi, esi
jz	loc_6D0009
push	esi
mov	ecx, edi
call	sub_652E40
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0803:		; jumptable 006CFFCA case 69
mov	edx, [ebx]
mov	eax, [edx+70h]
mov	ecx, ebx
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [esi+28h]
mov	ecx, dword ptr [ebp+arg_4+4]
shr	edx, 0Bh
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D083C:		; jumptable 006CFFCA case 70
mov	edx, [ebx]
mov	eax, [edx+70h]
mov	ecx, ebx
call	eax
mov	ecx, [eax+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	dl, [esi+6Ch]
mov	ecx, dword ptr [ebp+arg_4+4]
shr	dl, 3
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0875:		; jumptable 006CFFCA case 71
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [esi+44h]
mov	ecx, [edx+11Ch]
test	ecx, ecx
jz	short loc_6D08B2
call	sub_717420
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D08B2:
fld	ds:dbl_15FCD60
jmp	loc_6CFFFB

loc_6D08BD:		; jumptable 006CFFCA case 79
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, ebx
call	sub_6C4940
test	al, al
jz	short loc_6D08B2
mov	ecx, [esi+44h]
cmp	dword ptr [ecx+11Ch], 0
jz	short loc_6D08B2
mov	edx, [ebx]
mov	eax, [edx+180h]
mov	ecx, ebx
call	eax
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D090B:		; jumptable 006CFFCA case 80
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, ebx
call	sub_6C4940
test	al, al
jz	short loc_6D08B2
mov	edx, [esi+44h]
cmp	dword ptr [edx+11Ch], 0
jz	short loc_6D08B2
mov	eax, [ebx]
mov	edx, [eax+184h]
mov	ecx, ebx
call	edx
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0959:		; jumptable 006CFFCA case 90
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
mov	dl, [ecx+14Eh]
mov	ecx, dword ptr [ebp+arg_4+4]
shr	dl, 7
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D098C:		; jumptable 006CFFCA case 91
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD140
jmp	loc_6CFFFB

loc_6D09A9:		; jumptable 006CFFCA case 92
mov	edx, [edi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD160
jmp	loc_6CFFFB

loc_6D09C6:		; jumptable 006CFFCA case 93
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD1C0
jmp	loc_6CFFFB

loc_6D09E3:		; jumptable 006CFFCA case 94
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [esi+44h]
movzx	eax, byte ptr [edx+14Dh]
mov	[esp+100h+var_B0], eax
fild	[esp+100h+var_B0]
jmp	loc_6CFFFB

loc_6D0A0A:		; jumptable 006CFFCA case 95
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [esi+44h]
mov	al, [edx+14Fh]
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, dword ptr [ebp+arg_4+4]
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0A3C:		; jumptable 006CFFCA case 96
mov	edx, [edi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	eax, [esi+44h]
mov	cl, [eax+14Fh]
shr	cl, 1
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0A71:		; jumptable 006CFFCA case 98
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD350
jmp	loc_6CFFFB

loc_6D0A8E:		; jumptable 006CFFCA case 99
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD2E0
jmp	loc_6CFFFB

loc_6D0AAB:		; jumptable 006CFFCA case 100
mov	edx, [edi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD1E0
jmp	loc_6CFFFB

loc_6D0AC8:		; jumptable 006CFFCA case 101
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD200
jmp	loc_6CFFFB

loc_6D0AE5:		; jumptable 006CFFCA case 102
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD330
jmp	loc_6CFFFB

loc_6D0B02:		; jumptable 006CFFCA case 103
mov	edx, [edi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	eax, [esi+44h]
mov	cl, [eax+12Bh]
shr	cl, 6
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0B38:		; jumptable 006CFFCA case 104
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
mov	dl, [ecx+12Bh]
mov	ecx, dword ptr [ebp+arg_4+4]
shr	dl, 5
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0B6E:		; jumptable 006CFFCA case 105
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [esi+44h]
test	byte ptr [edx+12Bh], 80h
mov	eax, 0
setnz	al
inc	eax
mov	[esp+100h+var_B4], eax
fild	[esp+100h+var_B4]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0BAC:		; jumptable 006CFFCA case 106
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD220
jmp	loc_6CFFFB

loc_6D0BC9:		; jumptable 006CFFCA case 72
mov	edx, [edi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_724360
mov	[esp+100h+var_B8], eax
fild	[esp+100h+var_B8]
test	eax, eax
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0BFC:		; jumptable 006CFFCA case 73
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	esi, [esi+44h]
test	byte ptr [esi+14Eh], 2
jnz	short loc_6D0C3B
push	offset aNone_0	; "none"
lea	ecx, [esp+104h+var_AC]
push	ecx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_AC]
jmp	loc_6D03C5

loc_6D0C3B:
movzx	eax, byte ptr [esi+14Ch]
shr	eax, 2
and	eax, 3
cmp	eax, 3		; switch 4 cases
ja	loc_6D0343	; default
jmp	ds:off_6D1290[eax*4] ; switch jump

loc_6D0C58:		; jumptable 006D0C51 case 0
push	offset aNone_0
lea	edx, [esp+104h+var_6C]
push	edx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_6C]
jmp	loc_6D03C5

loc_6D0C81:		; jumptable 006D0C51 case 1
push	offset aTop_1
lea	eax, [esp+104h+var_A8]
push	eax
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_A8]
jmp	loc_6D03C5

loc_6D0CA4:		; jumptable 006D0C51 case 2
push	offset aBottom
lea	ecx, [esp+104h+var_A0]
push	ecx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_A0]
jmp	loc_6D03C5

loc_6D0CC7:		; jumptable 006D0C51 case 3
push	offset aCenter
lea	edx, [esp+104h+var_98]
push	edx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_98]
jmp	loc_6D03C5

loc_6D0CEA:		; jumptable 006CFFCA case 74
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
call	sub_6CD7E0
mov	ecx, dword ptr [ebp+arg_4+4]
sub	esp, 8
fstp	qword ptr [esp+108h+var_108]
call	sub_64A6A0
jmp	loc_6D0EA3	; jumptable 006CFFCA case 107

loc_6D0D15:		; jumptable 006CFFCA case 75
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [esi+44h]
movzx	eax, byte ptr [edx+14Ch]
shr	eax, 2
and	eax, 3
cmp	eax, 3		; switch 4 cases
ja	loc_6D0343	; default
jmp	ds:off_6D12A0[eax*4] ; switch jump

loc_6D0D45:		; jumptable 006D0D3E case 0
push	offset aNone_0
lea	eax, [esp+104h+var_90]
push	eax
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_90]
jmp	loc_6D03C5

loc_6D0D68:		; jumptable 006D0D3E case 1
push	offset aTop_1
lea	ecx, [esp+104h+var_88]
push	ecx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_88]
jmp	loc_6D03C5

loc_6D0D8B:		; jumptable 006D0D3E case 2
push	offset aBottom
lea	edx, [esp+104h+var_80]
push	edx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_80]
jmp	loc_6D03C5

loc_6D0DB4:		; jumptable 006D0D3E case 3
push	offset aCenter
lea	eax, [esp+104h+var_78]
push	eax
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_78]
jmp	loc_6D03C5

loc_6D0DDD:		; jumptable 006CFFCA case 76
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [esi+44h]
movzx	eax, byte ptr [edx+14Ch]
shr	eax, 4
and	eax, 3
sub	eax, 1
jz	short loc_6D0E53
sub	eax, 1
jz	short loc_6D0E2D
push	offset aNone_0	; "none"
lea	eax, [esp+104h+var_70]
push	eax
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_70]
jmp	short loc_6D0E71

loc_6D0E2D:		; "fit"
push	offset aFit
lea	ecx, [esp+104h+var_68]
push	ecx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_68]
jmp	short loc_6D0E71

loc_6D0E53:		; "shrink"
push	offset aShrink
lea	edx, [esp+104h+var_B4]
push	edx
mov	ecx, edi
call	sub_651CB0
mov	ecx, dword ptr [ebp+arg_4+4]
push	eax
call	sub_64A680
mov	eax, [esp+100h+var_B4]

loc_6D0E71:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D0EA3 ; jumptable 006CFFCA case 107
call	sub_650DF0
jmp	short loc_6D0EA3 ; jumptable 006CFFCA case 107

loc_6D0E85:		; jumptable 006CFFCA case 77
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	short loc_6D0EA3 ; jumptable 006CFFCA case 107
mov	cl, [esi+6Dh]

loc_6D0E94:
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0

loc_6D0EA3:		; jumptable 006CFFCA case 107
mov	eax, [esi+90h]
test	eax, eax
jz	loc_6D1081
mov	edx, dword ptr [ebp+arg_4+4]
push	edx
mov	edx, dword ptr [ebp+arg_4]
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	eax, [eax+10h]
push	edx
push	edi
call	eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0ECD:		; jumptable 006CFFCA case 78
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	short loc_6D0EA3 ; jumptable 006CFFCA case 107
mov	cx, [esi+6Ch]
shr	cx, 9
jmp	short loc_6D0E94

loc_6D0EE3:		; jumptable 006CFFCA case 82
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	short loc_6D0EA3 ; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
mov	eax, [ecx+11Ch]
test	eax, eax
jz	short loc_6D0EA3 ; jumptable 006CFFCA case 107
mov	edx, [eax+5Ch]
fild	dword ptr [eax+5Ch]
test	edx, edx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0F15:		; jumptable 006CFFCA case 81
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	short loc_6D0EA3 ; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
mov	eax, [ecx+11Ch]
test	eax, eax
jz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [eax+58h]
fild	dword ptr [eax+58h]
test	edx, edx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0F4B:		; jumptable 006CFFCA case 84
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
mov	eax, [ecx+11Ch]
test	eax, eax
jz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [eax+64h]
fild	dword ptr [eax+64h]
test	edx, edx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0F85:		; jumptable 006CFFCA case 83
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	ecx, [esi+44h]
mov	eax, [ecx+11Ch]
test	eax, eax
jz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	edx, [eax+60h]
fild	dword ptr [eax+60h]
test	edx, edx
jge	loc_6CFFFB
fadd	ds:dbl_15FCE08
jmp	loc_6CFFFB

loc_6D0FBF:		; jumptable 006CFFCA case 85
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	cx, [esi+6Ch]
shr	cx, 0Ah
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D0FF1:		; jumptable 006CFFCA case 86
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	cx, [esi+6Ch]
shr	cx, 0Bh
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [ebp+arg_4+4]
push	edx
call	sub_64A6C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D1023:		; jumptable 006CFFCA case 25
mov	esi, dword ptr [ebp+arg_4+4]
mov	ecx, esi
call	sub_652060
mov	ecx, edi
mov	byte ptr [esi],	0
call	sub_668000
test	eax, eax
jz	loc_6D0009
add	eax, 0Ch
push	offset aErrorRetrieval ; "Error: Retrieval of the TextField.filte"...
push	eax
call	sub_6AAFC0
add	esp, 8
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D105B:		; default
mov	ecx, dword ptr [ebp+arg_4+4] ; jumptable 006CFFCA cases	2-24,26-37,87-89,97
mov	edx, [ebx]
mov	edx, [edx+120h]
push	0
push	ecx
push	eax
mov	ecx, ebx
call	edx
test	al, al
jz	loc_6D0EA3	; jumptable 006CFFCA case 107
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D1081:
test	edi, edi
jz	short loc_6D10AC
mov	edx, dword ptr [ebp+arg_4]
mov	ecx, [edi+78h]
mov	eax, [edx]
cmp	eax, [ecx+144h]
jnz	short loc_6D10AC
mov	ecx, [esi+8]
push	ecx
mov	ecx, dword ptr [ebp+arg_4+4]
call	sub_652E40
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D10AC:
mov	esi, [esi+8]
test	esi, esi
jz	short loc_6D10CF
mov	eax, dword ptr [ebp+arg_4+4]
mov	edx, [esi+10h]
mov	edx, [edx+10h]
push	eax
mov	eax, dword ptr [ebp+arg_4]
lea	ecx, [esi+10h]
push	eax
push	edi
call	edx
test	al, al
jnz	loc_6D0009

loc_6D10CF:
mov	ecx, dword ptr [ebp+arg_4]
push	offset a_global	; "_global"
call	sub_67DA70
test	al, al
jz	short loc_6D1101
test	edi, edi
jz	short loc_6D1101
mov	eax, [edi+78h]
mov	ecx, [eax+2ACh]
push	ecx
mov	ecx, dword ptr [ebp+arg_4+4]
call	sub_652E40
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6D1101:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6CFF90 endp

off_6D110C dd offset loc_6CFFD1, offset	loc_6D0014 ; jump table	for switch statement
dd offset loc_6D1023, offset loc_6D01C8
dd offset loc_6D0278, offset loc_6D02A8
dd offset loc_6D023B, offset loc_6D02D8
dd offset loc_6D0057, offset loc_6D0076
dd offset loc_6D07CE, offset loc_6D02FE
dd offset loc_6D03E6, offset loc_6D040C
dd offset loc_6D0432, offset loc_6D0450
dd offset loc_6D0478, offset loc_6D0496
dd offset loc_6D0742, offset loc_6D0558
dd offset loc_6D0587, offset loc_6D05AB
dd offset loc_6D05CF, offset loc_6D05FE
dd offset loc_6D061C, offset loc_6D0640
dd offset loc_6D0664, offset loc_6D0688
dd offset loc_6D06F9, offset loc_6D0723
dd offset loc_6D07AE, offset loc_6D04BE
dd offset loc_6D04DD, offset loc_6D0525
dd offset loc_6D0803, offset loc_6D083C
dd offset loc_6D0875, offset loc_6D0BC9
dd offset loc_6D0BFC, offset loc_6D0CEA
dd offset loc_6D0D15, offset loc_6D0DDD
dd offset loc_6D0E85, offset loc_6D0ECD
dd offset loc_6D08BD, offset loc_6D090B
dd offset loc_6D0F15, offset loc_6D0EE3
dd offset loc_6D0F85, offset loc_6D0F4B
dd offset loc_6D0FBF, offset loc_6D0FF1
dd offset loc_6D0959, offset loc_6D098C
dd offset loc_6D09A9, offset loc_6D09C6
dd offset loc_6D09E3, offset loc_6D0A0A
dd offset loc_6D0A3C, offset loc_6D0A71
dd offset loc_6D0A8E, offset loc_6D0AAB
dd offset loc_6D0AC8, offset loc_6D0AE5
dd offset loc_6D0B02, offset loc_6D0B38
dd offset loc_6D0B6E, offset loc_6D0BAC
dd offset loc_6D0EA3, offset loc_6D105B
byte_6D1224 db	    0,	   1,	45h,   45h ; indirect table for	switch statement
db    45h,   45h,   45h,   45h
db    45h,   45h,   45h,   45h
db    45h,   45h,   45h,   45h
db    45h,   45h,   45h,   45h
db    45h,   45h,   45h,   45h
db    45h,     2,   45h,   45h
db    45h,   45h,   45h,   45h
db    45h,   45h,   45h,   45h
db    45h,   45h,     3,     4
db	5,     6,     7,     8
db	9,   0Ah,   0Bh,   0Ch
db    0Dh,   0Eh,   0Fh,   10h
db    11h,   12h,   13h,   14h
db    15h,   16h,   17h,   18h
db    19h,   1Ah,   1Bh,   1Ch
db    1Dh,   1Eh,   1Fh,   20h
db    21h,   22h,   23h,   24h
db    25h,   26h,   27h,   28h
db    29h,   2Ah,   2Bh,   2Ch
db    2Dh,   2Eh,   2Fh,   30h
db    31h,   32h,   33h,   45h
db    45h,   45h,   34h,   35h
db    36h,   37h,   38h,   39h
db    3Ah,   45h,   3Bh,   3Ch
db    3Dh,   3Eh,   3Fh,   40h
db    41h,   42h,   43h,   44h
off_6D1290 dd offset loc_6D0C58	; jump table for switch	statement
dd offset loc_6D0C81
dd offset loc_6D0CA4
dd offset loc_6D0CC7
off_6D12A0 dd offset loc_6D0D45	; jump table for switch	statement
dd offset loc_6D0D68
dd offset loc_6D0D8B
dd offset loc_6D0DB4



sub_6D12B0 proc	near

var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	qword ptr -40h
var_38=	byte ptr -38h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8

sub	esp, 6Ch
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+0B8h]
push	edi
add	ecx, 48h
call	sub_679930
xor	ebx, ebx
test	eax, eax
jbe	short loc_6D1347
mov	eax, [esi+0D0h]
lea	edi, [esi+0D0h]
cmp	[eax+10h], ebx
jz	short loc_6D1312
mov	edx, [esi]
mov	eax, [edx+70h]
mov	ecx, esi
call	eax
cmp	eax, ebx
jz	short loc_6D1312
push	ebx
push	ebx
push	ebx
push	ebx
lea	ecx, [esp+88h+var_68]
push	ecx
push	edi
mov	ecx, eax
mov	byte ptr [esp+90h+var_68], bl
call	sub_6726F0
lea	ecx, [esp+78h+var_68]
mov	[esp+78h+var_69], al
call	sub_652830
cmp	[esp+78h+var_69], bl
jnz	short loc_6D1368

loc_6D1312:
mov	al, [esi+0E4h]
mov	edx, [esi]
mov	edx, [edx+1D4h]
shr	al, 1
and	al, 1
movzx	ecx, al
mov	eax, [esi+0B8h]
push	1
push	ecx
mov	ecx, [eax+48h]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
mov	ecx, esi
call	edx
mov	ecx, esi
call	sub_6C4AC0
jmp	short loc_6D1368

loc_6D1347:
mov	cl, [esi+0E4h]
mov	eax, [esi]
mov	eax, [eax+1D4h]
shr	cl, 1
and	cl, 1
movzx	edx, cl
push	ebx
push	edx
push	offset byte_146D660
mov	ecx, esi
call	eax

loc_6D1368:
mov	ecx, esi
call	sub_6CD4E0
mov	ecx, [esi+0BCh]
call	sub_723480
mov	edx, [esi]
mov	edx, [edx+80h]
xor	ecx, ecx
lea	eax, [esp+78h+var_68]
mov	word ptr [esp+78h+var_60], cx
push	eax
mov	ecx, esi
mov	[esp+7Ch+var_68], 1
mov	[esp+7Ch+var_64], ebx
mov	byte ptr [esp+7Ch+var_60+2], bl
mov	byte ptr [esp+7Ch+var_60+4], bl
mov	byte ptr [esp+7Ch+var_60+5], bl
mov	byte ptr [esp+7Ch+var_60+3], 0FFh
call	edx
cmp	[esi+98h], ebx
jnz	short loc_6D13FA
lea	ecx, [esp+78h+var_38]
call	sub_64E8E0
fldz
fst	[esp+78h+var_40]
push	1
fld	ds:dbl_15FCBF8
lea	eax, [esp+7Ch+var_58]
fst	[esp+7Ch+var_48]
push	eax
fst	[esp+80h+var_50]
mov	ecx, esi
fstp	[esp+80h+var_18]
mov	dword ptr [esp+80h+var_58+4], ebx
mov	dword ptr [esp+80h+var_58], ebx
fst	[esp+80h+var_8]
fst	[esp+80h+var_10]
fstp	[esp+80h+var_20]
call	sub_6CFCD0

loc_6D13FA:
pop	edi
pop	esi
pop	ebx
add	esp, 6Ch
retn
sub_6D12B0 endp

align 10h



sub_6D1410 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6D1429
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6D143E
push	esi
jmp	short loc_6D1438

loc_6D1429:
cmp	esi, [edi+8]
jb	short loc_6D143E
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6D1438:
push	edi
call	sub_6ABB00

loc_6D143E:
mov	edx, [edi]
mov	[edi+4], esi
lea	eax, [edx+esi*8-8]
pop	edi
pop	esi
test	eax, eax
jz	short locret_6D1463
mov	ecx, [esp+arg_0]
fld	dword ptr [ecx+4]
fstp	[esp+arg_0]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
fld	[esp+arg_0]
fstp	dword ptr [eax+4]

locret_6D1463:
retn	4
sub_6D1410 endp

align 10h



sub_6D1470 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
xor	edx, edx
cmp	ecx, edx
jbe	short locret_6D14A0
mov	eax, [esp+arg_0]
add	eax, 10h
push	esi

loc_6D1482:
lea	esi, [eax-10h]
test	esi, esi
jz	short loc_6D1497
mov	[eax-10h], edx
mov	[eax-0Ch], edx
mov	[eax-8], edx
mov	[eax-4], edx
mov	[eax], edx

loc_6D1497:
add	eax, 14h
sub	ecx, 1
jnz	short loc_6D1482
pop	esi

locret_6D14A0:
retn
sub_6D1470 endp

align 10h



sub_6D14B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+4]
test	edi, edi
jbe	loc_6D1542
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	ebx
call	sub_6CE3E0
test	eax, eax
jge	short loc_6D14D3
xor	ecx, ecx
jmp	short loc_6D14DC

loc_6D14D3:
lea	ecx, [edi-1]
cmp	eax, edi
jnb	short loc_6D14DC
mov	ecx, eax

loc_6D14DC:
cmp	ecx, edi
mov	ebp, [esp+10h+arg_4]
jge	short loc_6D1515
mov	edx, [esi]
lea	eax, [ecx+ecx*4]
lea	eax, [edx+eax*4]
test	eax, eax
jz	short loc_6D1515
mov	edi, [eax]
cmp	ebx, edi
jl	short loc_6D1507
mov	edx, [eax+4]
lea	ebx, [edx+edi-1]
cmp	[esp+10h+arg_0], ebx
jle	short loc_6D1510
mov	ebx, [esp+10h+arg_0]

loc_6D1507:
mov	edx, [eax+4]
add	edi, edx
cmp	edi, ebx
jnz	short loc_6D1515

loc_6D1510:
add	edx, ebp
mov	[eax+4], edx

loc_6D1515:
mov	eax, [esi+4]
cmp	ecx, eax
jge	short loc_6D151D
inc	ecx

loc_6D151D:
lea	edx, [ecx+ecx*4]
add	edx, edx
add	edx, edx

loc_6D1524:
test	edx, edx
jl	short loc_6D1540
cmp	ecx, eax
jnb	short loc_6D1540
mov	eax, [esi]
add	[eax+edx], ebp
add	eax, edx
mov	eax, [esi+4]
cmp	ecx, eax
jge	short loc_6D1524
inc	ecx
add	edx, 14h
jmp	short loc_6D1524

loc_6D1540:
pop	ebp
pop	ebx

loc_6D1542:
pop	edi
pop	esi
retn	8
sub_6D14B0 endp

align 10h



sub_6D1550 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6D156C
inc	dword ptr [eax+4]

loc_6D156C:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6D1578
call	sub_64A400

loc_6D1578:
mov	edx, [edi+8]
mov	[esi+8], edx
mov	eax, [edi+0Ch]
mov	[esi+0Ch], eax
mov	ecx, [edi+10h]
pop	edi
mov	[esi+10h], ecx
mov	eax, esi
pop	esi
retn	4
sub_6D1550 endp

align 10h



sub_6D15A0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_6D15BC
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6D15D1
push	esi
jmp	short loc_6D15CB

loc_6D15BC:
cmp	esi, [edi+8]
jb	short loc_6D15D1
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6D15CB:
push	edi
call	sub_6CE350

loc_6D15D1:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_6D15F7
sub	esi, ebx
mov	eax, [edi]
lea	edx, [ebx+ebx*2]
lea	eax, [eax+edx*4]
jz	short loc_6D15F7
xor	ecx, ecx

loc_6D15E6:
cmp	eax, ecx
jz	short loc_6D15EF
mov	[eax], ecx
mov	[eax+4], ecx

loc_6D15EF:
add	eax, 0Ch
sub	esi, 1
jnz	short loc_6D15E6

loc_6D15F7:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6D15A0 endp

align 10h



sub_6D1600 proc	near

var_24=	byte ptr -24h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebx
mov	ebx, ecx
push	esi
lea	ecx, [esp+2Ch+var_24]
call	sub_6CE4E0
xor	esi, esi
cmp	[esp+2Ch+arg_4], esi
jbe	short loc_6D163F
push	edi
xor	edi, edi
jmp	short loc_6D1620
align 10h

loc_6D1620:
mov	eax, [esp+30h+arg_0]
lea	ecx, [edi+eax]
push	ecx
lea	ecx, [esp+34h+var_24]
call	sub_7064F0
inc	esi
add	edi, 9Ch
cmp	esi, [esp+30h+arg_4]
jb	short loc_6D1620
pop	edi

loc_6D163F:
mov	edx, [ebx]
mov	edx, [edx+1D0h]
lea	eax, [esp+2Ch+var_24]
push	eax
mov	ecx, ebx
call	edx
lea	ecx, [esp+2Ch+var_24]
call	sub_64A3F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+2Ch+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
add	esp, 24h
retn	0Ch
sub_6D1600 endp

align 10h



sub_6D1680 proc	near

arg_0= dword ptr  4

; FUNCTION CHUNK AT 006CFE00 SIZE 00000074 BYTES

mov	eax, [ecx+0BCh]
test	eax, eax
jz	short locret_6D1695
lea	ecx, [eax+120h]
jmp	loc_6CFE00

locret_6D1695:
retn	4
sub_6D1680 endp

align 10h



sub_6D16A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
xor	edi, edi
cmp	eax, edi
jbe	short loc_6D16D5
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_6D16E1
mov	eax, [esi]
cmp	eax, edi
jz	short loc_6D16CC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_6D16CC:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn

loc_6D16D5:
cmp	[esi+8], edi
ja	short loc_6D16E1
push	edi
push	esi
call	sub_6ABB00

loc_6D16E1:
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_6D16A0 endp

align 10h



sub_6D16F0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6D1720
mov	eax, [edi]
test	eax, eax
jz	short loc_6D1715
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6D1715:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6D1720:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6D1753
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6D1753:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*4]
add	eax, eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6D16F0 endp

align 10h



sub_6D1780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+4]
inc	eax
push	eax
call	sub_6D15A0
mov	eax, [edi+4]
mov	esi, [esp+8+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_6D17BC
mov	ecx, [edi]
sub	eax, esi
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*4]
dec	eax
lea	edx, [eax+eax*2]
add	edx, edx
add	edx, edx
push	edx
push	ecx
add	ecx, 0Ch
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_6D17BC:
mov	ecx, [edi]
lea	eax, [esi+esi*2]
lea	eax, [ecx+eax*4]
test	eax, eax
jz	short loc_6D17DC
mov	ecx, [esp+8+arg_4]
mov	edx, [ecx+4]
mov	esi, [ecx]
mov	[eax], esi
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx

loc_6D17DC:
pop	edi
pop	esi
retn	8
sub_6D1780 endp

align 10h



sub_6D17F0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	ecx, [edx+8]
mov	[eax+4], ecx
inc	dword ptr [ecx+8]
xor	ecx, ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	byte ptr [esp+arg_0+2],	cl
mov	byte ptr [esp+arg_0+1],	cl
mov	byte ptr [esp+arg_0], cl
mov	byte ptr [esp+arg_0+3],	0FFh
mov	ecx, [esp+arg_0]
mov	[eax], ecx
retn	4
sub_6D17F0 endp

align 10h



sub_6D1830 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 40h
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
call	edx
mov	ebx, eax
mov	[esp+48h+var_40], ebx
test	ebx, ebx
jz	loc_6D1D46
push	edi
mov	edi, [esp+4Ch+arg_0]
cmp	dword ptr [edi], 8
jnz	short loc_6D185D
mov	ecx, esi
call	sub_656B50

loc_6D185D:
movsx	eax, byte ptr [edi+0Bh]
cmp	eax, 4
jb	short loc_6D186A
xor	ecx, ecx
jmp	short loc_6D1874

loc_6D186A:
lea	eax, [eax+eax*8]
lea	ecx, [ebx+eax*4+934h]

loc_6D1874:
push	ebp
lea	edx, [esp+50h+var_3C]
push	edx
call	sub_6B8E30
mov	ebp, [esp+50h+var_3C]
cmp	ebp, esi
jz	short loc_6D18F3
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6D18D1
cmp	dword ptr [eax], 0
jz	short loc_6D18D1
mov	al, [esi+0E4h]
shr	al, 1
test	al, 1
jz	short loc_6D18D1
mov	ecx, [esi+0BCh]
mov	edx, [ecx+8]
test	byte ptr [edx+20h], 1
jz	short loc_6D18D1
movsx	eax, byte ptr [edi+0Bh]
push	0
push	eax
push	1
mov	ecx, esi
call	sub_6C8200
movsx	ecx, byte ptr [edi+0Bh]
push	0
push	ecx
push	3
mov	ecx, esi
call	sub_6C8200

loc_6D18D1:
mov	edx, [esi+0BCh]
mov	eax, [edx+11Ch]
test	eax, eax
jz	loc_6D1D2A
mov	al, [eax+68h]
shr	al, 5
test	al, 1
jz	loc_6D1D2A

loc_6D18F3:
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
test	al, al
jnz	short loc_6D1919
test	ebp, ebp
jz	loc_6D1D44
mov	ecx, ebp
call	sub_64A400
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 40h
retn	4

loc_6D1919:
mov	eax, [edi]
cmp	eax, 8
jz	loc_6D1B57
cmp	eax, 10h
jz	loc_6D1A51
cmp	eax, 20h
jnz	loc_6D1D2A
mov	ecx, esi
call	sub_6C4AA0
test	al, al
jz	loc_6D19C7
mov	cl, [esi+0E4h]
shr	cl, 1
test	cl, 1
jz	short loc_6D19C7
mov	edx, [esi+0BCh]
mov	eax, [edx+8]
test	byte ptr [eax+20h], 1
jz	short loc_6D19C7
movsx	ebp, byte ptr [edi+0Bh]
push	ebp
mov	ecx, ebx
call	sub_654A60
lea	ecx, [esp+50h+var_38]
push	ecx
mov	ebx, eax
xor	eax, eax
push	eax
push	ebp
mov	ecx, esi
mov	[esp+5Ch+var_38], eax
mov	[esp+5Ch+var_34], eax
call	sub_6CEF00
test	al, al
jz	short loc_6D19B3
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6D19B3
cmp	dword ptr [eax], 0
jz	short loc_6D19B3
test	byte ptr [ebx+0Ch], 1
jnz	short loc_6D19B3
movsx	eax, byte ptr [edi+0Bh]
lea	edx, [esp+50h+var_38]
push	edx
push	eax
push	1
mov	ecx, esi
call	sub_6C8200

loc_6D19B3:
movsx	ecx, byte ptr [edi+0Bh]
push	0
push	ecx
push	1
mov	ecx, esi
call	sub_6C8200
mov	ebx, [esp+50h+var_40]

loc_6D19C7:
mov	edx, [esi+0BCh]
cmp	dword ptr [edx+11Ch], 0
jz	loc_6D1D2A
movsx	eax, byte ptr [edi+0Bh]
push	eax
mov	ecx, ebx
call	sub_654A60
lea	ecx, [esp+50h+var_18]
push	ecx
mov	ecx, esi
mov	ebp, eax
call	sub_6552D0
fld	dword ptr [ebp+18h]
lea	edx, [esp+50h+var_30]
fstp	[esp+50h+arg_0]
push	edx
fld	dword ptr [ebp+14h]
lea	eax, [esp+54h+var_38]
fstp	[esp+54h+var_30]
push	eax
fld	[esp+58h+arg_0]
lea	ecx, [esp+58h+var_18]
fstp	[esp+58h+var_2C]
call	sub_64EC70
mov	ecx, [ebp+0Ch]
fld	[esp+50h+var_34]
mov	edx, [esi+0BCh]
push	ecx
mov	ecx, [edx+11Ch]
sub	esp, 8
fstp	[esp+5Ch+var_58]
fld	[esp+5Ch+var_38]
fstp	[esp+5Ch+var_5C]
call	sub_72E4D0
push	ebx
mov	ecx, esi
call	sub_6CE2D0
jmp	loc_6D1D2A

loc_6D1A51:
mov	ecx, esi
call	sub_6C4AA0
test	al, al
jz	short loc_6D1ACD
mov	al, [esi+0E4h]
shr	al, 1
test	al, 1
jz	short loc_6D1ACD
mov	ecx, [esi+0BCh]
mov	edx, [ecx+8]
test	byte ptr [edx+20h], 1
jz	short loc_6D1ACD
movsx	ebp, byte ptr [edi+0Bh]
push	ebp
mov	ecx, ebx
call	sub_654A60
lea	ecx, [esp+50h+var_38]
push	ecx
mov	ebx, eax
xor	eax, eax
push	eax
push	ebp
mov	ecx, esi
mov	[esp+5Ch+var_38], eax
mov	[esp+5Ch+var_34], eax
call	sub_6CEF00
test	al, al
jz	short loc_6D1AC9
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6D1AC9
cmp	dword ptr [eax], 0
jz	short loc_6D1AC9
test	byte ptr [ebx+0Ch], 1
jz	short loc_6D1AC9
movsx	eax, byte ptr [edi+0Bh]
lea	edx, [esp+50h+var_38]
push	edx
push	eax
push	0
mov	ecx, esi
call	sub_6C8200

loc_6D1AC9:
mov	ebx, [esp+50h+var_40]

loc_6D1ACD:
mov	ecx, [esi+0BCh]
cmp	dword ptr [ecx+11Ch], 0
jz	loc_6D1D2A
movsx	edx, byte ptr [edi+0Bh]
push	edx
mov	ecx, ebx
call	sub_654A60
mov	ebp, eax
lea	eax, [esp+50h+var_18]
push	eax
mov	ecx, esi
call	sub_6552D0
fld	dword ptr [ebp+18h]
lea	ecx, [esp+50h+var_28]
fstp	[esp+50h+arg_0]
push	ecx
fld	dword ptr [ebp+14h]
lea	edx, [esp+54h+var_38]
fstp	[esp+54h+var_28]
push	edx
fld	[esp+58h+arg_0]
lea	ecx, [esp+58h+var_18]
fstp	[esp+58h+var_24]
call	sub_64EC70
mov	eax, [ebp+0Ch]
fld	[esp+50h+var_34]
mov	ecx, [esi+0BCh]
mov	ecx, [ecx+11Ch]
push	eax		; float
sub	esp, 8
fstp	[esp+5Ch+var_58]
fld	[esp+5Ch+var_38]
fstp	[esp+5Ch+var_5C]
call	sub_72FFE0
push	ebx
mov	ecx, esi
call	sub_6CE2D0
jmp	loc_6D1D2A

loc_6D1B57:
movsx	eax, byte ptr [edi+0Bh]
cmp	eax, 4
jb	short loc_6D1B68
xor	ebp, ebp
mov	[esp+50h+arg_0], ebp
jmp	short loc_6D1B78

loc_6D1B68:
lea	edx, [eax+eax*8]
lea	eax, [ebx+edx*4+934h]
mov	[esp+50h+arg_0], eax
mov	ebp, eax

loc_6D1B78:
mov	ecx, [esi+0BCh]
cmp	dword ptr [ecx+11Ch], 0
jz	short loc_6D1BDF
lea	edx, [esp+50h+var_18]
push	edx
mov	ecx, esi
call	sub_6552D0
fld	dword ptr [ebp+18h]
fstp	[esp+50h+var_40]
lea	eax, [esp+50h+var_20]
fld	dword ptr [ebp+14h]
push	eax
fstp	[esp+54h+var_20]
lea	ecx, [esp+54h+var_38]
fld	[esp+54h+var_40]
push	ecx
lea	ecx, [esp+58h+var_18]
fstp	[esp+58h+var_1C]
call	sub_64EC70
fld	[esp+50h+var_34]
mov	edx, [esi+0BCh]
mov	ecx, [edx+11Ch]
sub	esp, 8
fstp	[esp+58h+var_54]
fld	[esp+58h+var_38]
fstp	[esp+58h+var_58]
call	sub_730260

loc_6D1BDF:
mov	eax, [esi+0ECh]
xor	ebp, ebp
cmp	eax, ebp
jz	loc_6D1CB4
cmp	[eax], ebp
jz	loc_6D1CB4
mov	al, [esi+0E4h]
shr	al, 1
test	al, 1
jz	loc_6D1CB4
mov	ecx, [esi+0BCh]
mov	edx, [ecx+8]
test	byte ptr [edx+20h], 1
jz	loc_6D1CB4
movsx	ecx, byte ptr [edi+0Bh]
lea	eax, [esp+50h+var_38]
push	eax
push	ebp
push	ecx
mov	ecx, esi
mov	[esp+5Ch+var_38], ebp
mov	[esp+5Ch+var_34], ebp
call	sub_6CEF00
mov	byte ptr [esp+50h+var_40], al
mov	ecx, esi
test	al, al
jz	short loc_6D1C88
movsx	ebp, byte ptr [edi+0Bh]
lea	edx, [esp+50h+var_38]
push	edx
push	ebp
call	sub_6CEFB0
test	al, al
jnz	short loc_6D1C6D
push	0
push	ebp
push	1
mov	ecx, esi
call	sub_6C8200
movsx	eax, byte ptr [edi+0Bh]
push	0
push	eax
push	3
mov	ecx, esi
call	sub_6C8200

loc_6D1C6D:
mov	eax, [esp+50h+arg_0]
movsx	edx, byte ptr [edi+0Bh]
lea	ecx, [esp+50h+var_38]
push	ecx
mov	ecx, [eax+0Ch]
add	ecx, ecx
not	ecx
push	edx
and	ecx, 2
push	ecx
jmp	short loc_6D1C9F

loc_6D1C88:
movsx	edx, byte ptr [edi+0Bh]
push	0
push	edx
push	1
call	sub_6C8200
movsx	eax, byte ptr [edi+0Bh]
push	0
push	eax
push	3

loc_6D1C9F:
mov	ecx, esi
call	sub_6C8200
mov	ecx, [esp+50h+var_40]
push	ecx
mov	ecx, esi
call	sub_6CD3C0
jmp	short loc_6D1D11

loc_6D1CB4:
movzx	eax, word ptr [esi+0E4h]
mov	dl, al
shr	dl, 1
test	dl, 1
jz	short loc_6D1CEE
mov	ecx, [esi+0BCh]
mov	edx, [ecx+8]
test	byte ptr [edx+20h], 1
jz	short loc_6D1CEE
movsx	eax, byte ptr [edi+0Bh]
push	ebp
push	ebp
push	eax
mov	ecx, esi
call	sub_6CEF00
movzx	ecx, al
push	ecx
mov	ecx, esi
call	sub_6CD3C0
jmp	short loc_6D1D11

loc_6D1CEE:
shr	al, 5
test	al, 1
jz	short loc_6D1D2A
movsx	edx, byte ptr [edi+0Bh]
push	0
push	edx
push	3
mov	ecx, esi
call	sub_6C8200
mov	eax, 0FFDFh
and	[esi+0E4h], ax

loc_6D1D11:
mov	edx, [esi]
mov	eax, [edx+15Ch]
mov	ecx, esi
call	eax
movsx	ecx, byte ptr [edi+0Bh]
push	eax
push	ecx
mov	ecx, ebx
call	sub_69B050

loc_6D1D2A:
mov	edx, [esi]
mov	eax, [edx+80h]
push	edi
mov	ecx, esi
call	eax
mov	ecx, [esp+50h+var_3C]
test	ecx, ecx
jz	short loc_6D1D44
call	sub_64A400

loc_6D1D44:
pop	ebp
pop	edi

loc_6D1D46:
pop	esi
pop	ebx
add	esp, 40h
retn	4
sub_6D1830 endp

align 10h



sub_6D1D50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6D1D91
mov	ecx, [edi]
sub	eax, esi
push	eax
lea	eax, [esi+esi*4]
lea	edx, [ecx+eax*4]
push	edx
call	sub_6C7740
mov	eax, [edi+8]
shr	eax, 1
add	esp, 8
cmp	esi, eax
jnb	short loc_6D1DA8
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_6D16F0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6D1D91:
cmp	esi, [edi+8]
jb	short loc_6D1DA8
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6D16F0

loc_6D1DA8:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6D1D50 endp




sub_6D1DB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_6D1DC6
push	0
call	sub_6D15A0
pop	esi
retn	4

loc_6D1DC6:
mov	ecx, [esp+4+arg_0]
sub	eax, ecx
dec	eax
push	edi
mov	edi, [esi]
lea	eax, [eax+eax*2]
lea	edx, [ecx+ecx*2]
add	eax, eax
lea	edx, [edi+edx*4]
add	eax, eax
push	eax
lea	ecx, [edx+0Ch]
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 0Ch
pop	edi
pop	esi
retn	4
sub_6D1DB0 endp

align 10h



sub_6D1E00 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+108h], 0
jnz	short loc_6D1E67
mov	ecx, dword_1855FC0
push	edi
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	3Ch
push	esi
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6D1E4A
mov	edx, [esi]
mov	eax, [edx+0D0h]
push	esi
mov	ecx, esi
call	eax
push	eax
mov	ecx, edi
call	sub_6C95E0
mov	edi, eax
jmp	short loc_6D1E4C

loc_6D1E4A:
xor	edi, edi

loc_6D1E4C:
mov	ecx, [esi+108h]
test	ecx, ecx
jz	short loc_6D1E5B
call	sub_64B3B0

loc_6D1E5B:
mov	[esi+108h], edi
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn

loc_6D1E67:
mov	eax, [esi+108h]
pop	esi
pop	ecx
retn
sub_6D1E00 endp



; Attributes: thunk

sub_6D1E70 proc	near
jmp	sub_6D1E00
sub_6D1E70 endp

align 10h



sub_6D1E80 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 40h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+54h]
push	edi
call	edx
mov	edi, [esp+50h+arg_0]
mov	ebp, eax
movsx	eax, byte ptr [edi+0Bh]
movzx	ecx, byte ptr [eax+ebp+27F4h]
mov	eax, [esp+50h+arg_4]
mov	ebx, 1
shl	ebx, cl
mov	edx, ebx
and	edx, [eax]
test	edx, 0FFFFh
jnz	loc_6D201B
test	ebp, ebp
jz	loc_6D201B
imul	ecx, 34h
lea	ecx, [ecx+ebp+24B0h]
push	esi
call	sub_683670
test	al, al
jz	loc_6D201B
mov	eax, [edi]
mov	[esp+50h+var_40], eax
cmp	eax, 40h
jz	short loc_6D1EF3
cmp	eax, 80h
jnz	loc_6D201B

loc_6D1EF3:
mov	ecx, [esi+0BCh]
cmp	dword ptr [ecx+11Ch], 0
jz	loc_6D2003
mov	ecx, esi
call	sub_6C4970
test	al, al
jz	short loc_6D1F20
mov	ecx, esi
call	sub_6C4940
test	al, al
jz	loc_6D2003

loc_6D1F20:
movzx	edi, byte ptr [edi+0Dh]
mov	edx, [esp+50h+arg_0]
xor	eax, eax
mov	[esp+50h+var_3C], eax
mov	[esp+50h+var_38], eax
mov	[esp+50h+var_34], eax
movsx	eax, word ptr [edx+8]
shl	edi, 10h
or	edi, eax
cmp	[esp+50h+var_40], 40h
jnz	short loc_6D1F67
lea	ecx, [esp+50h+var_30]
push	ecx
lea	ecx, [esp+54h+var_3C]
mov	[esp+54h+var_30], 4
mov	[esp+54h+var_2C], 0
call	sub_684AF0
lea	ecx, [esp+50h+var_30]
jmp	short loc_6D1F86

loc_6D1F67:
lea	edx, [esp+50h+var_20]
push	edx
lea	ecx, [esp+54h+var_3C]
mov	[esp+54h+var_20], 4
mov	[esp+54h+var_1C], 1
call	sub_684AF0
lea	ecx, [esp+50h+var_20]

loc_6D1F86:
call	sub_652830
lea	eax, [esp+50h+var_10]
push	eax
lea	ecx, [esp+54h+var_3C]
mov	[esp+54h+var_10], 4
mov	[esp+54h+var_C], edi
call	sub_684AF0
lea	ecx, [esp+50h+var_10]
call	sub_652830
push	4
lea	ecx, [ebp+2408h]
call	sub_696220
mov	edi, eax
mov	dword ptr [edi+4], 4
inc	dword ptr [esi+4]
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6D1FD0
call	sub_64A400

loc_6D1FD0:
mov	[edi+8], esi
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6D1FDF
call	sub_64A400

loc_6D1FDF:
lea	ecx, [esp+50h+var_3C]
push	ecx
mov	dword ptr [edi+0Ch], 0
lea	ecx, [edi+30h]
mov	dword ptr [edi+2Ch], offset sub_6CFB90
call	sub_684BD0
lea	ecx, [esp+50h+var_3C]
call	sub_6806F0

loc_6D2003:
mov	eax, [esp+50h+arg_4]
pop	edi
pop	esi
and	ebx, 0FFFFh
or	[eax], ebx
pop	ebp
mov	al, 1
pop	ebx
add	esp, 40h
retn	8

loc_6D201B:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 40h
retn	8
sub_6D1E80 endp

align 10h



sub_6D2030 proc	near

var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 44h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	edx, [eax+54h]
call	edx
xor	ebp, ebp
mov	[esp+54h+var_40], eax
cmp	eax, ebp
jz	loc_6D21D1
mov	eax, [edi+0BCh]
mov	eax, [eax+11Ch]
cmp	eax, ebp
jz	loc_6D21D1
mov	cl, [eax+68h]
and	cl, 1
jz	short loc_6D2078
mov	dl, [eax+68h]
shr	dl, 1
and	dl, 1
jz	loc_6D21D1

loc_6D2078:
mov	eax, [edi+10Ch]
cmp	eax, [esp+54h+arg_4]
jnz	loc_6D21D1
mov	ecx, [edi+104h]
mov	esi, [esp+54h+arg_0]
cmp	ecx, ebp
jz	short loc_6D20ED
push	esi
lea	edx, [esp+58h+var_3C]
push	edx
call	sub_6C7350
mov	ecx, eax
call	sub_726090
test	al, al
jz	short loc_6D20ED
push	esi
call	sub_67B4A0
push	esi
mov	ebx, eax
call	sub_67B520
add	esp, 8
cmp	esi, ebx
mov	esi, ebx
jnz	short loc_6D20C5
mov	esi, eax

loc_6D20C5:
mov	ecx, [edi+104h]
push	esi
lea	eax, [esp+58h+var_34]
push	eax
call	sub_6C7350
mov	ecx, eax
call	sub_726090
test	al, al
jz	short loc_6D20ED
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 44h
retn	8

loc_6D20ED:
push	1
lea	ecx, [esp+58h+var_2C]
mov	ebx, 4
push	ecx
mov	[esp+5Ch+var_2C], ebp
mov	[esp+5Ch+var_28], ebp
mov	[esp+5Ch+var_24], ebp
mov	[esp+5Ch+var_20], bl
mov	[esp+5Ch+var_1C], 2
call	sub_683310
mov	ebp, [esp+54h+var_28]
mov	eax, [esp+54h+var_2C]
mov	edx, ebp
shl	edx, 4
lea	ecx, [edx+eax-10h]
test	ecx, ecx
jz	short loc_6D2135
lea	edx, [esp+54h+var_20]
push	edx
call	sub_652330

loc_6D2135:
lea	ecx, [esp+54h+var_20]
call	sub_652830
inc	ebp
lea	eax, [esp+54h+var_2C]
push	ebp
push	eax
mov	ecx, eax
mov	[esp+5Ch+var_10], bl
mov	[esp+5Ch+var_C], esi
call	sub_683310
mov	ecx, [esp+54h+var_28]
mov	edx, [esp+54h+var_2C]
shl	ecx, 4
lea	ecx, [ecx+edx-10h]
test	ecx, ecx
jz	short loc_6D2171
lea	eax, [esp+54h+var_10]
push	eax
call	sub_652330

loc_6D2171:
lea	ecx, [esp+54h+var_10]
call	sub_652830
mov	ecx, [esp+54h+var_40]
push	ebx
add	ecx, 2408h
call	sub_696220
mov	esi, eax
mov	[esi+4], ebx
inc	dword ptr [edi+4]
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6D219E
call	sub_64A400

loc_6D219E:
mov	[esi+8], edi
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6D21AD
call	sub_64A400

loc_6D21AD:
lea	ecx, [esp+54h+var_2C]
push	ecx
mov	dword ptr [esi+0Ch], 0
lea	ecx, [esi+30h]
mov	dword ptr [esi+2Ch], offset sub_6CFB90
call	sub_684BD0
lea	ecx, [esp+54h+var_2C]
call	sub_6806F0

loc_6D21D1:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 44h
retn	8
sub_6D2030 endp

align 10h



sub_6D21E0 proc	near
mov	eax, [ecx+4]
test	eax, eax
jl	short locret_6D21F4
mov	ecx, [ecx]
cmp	eax, [ecx+4]
jnb	short locret_6D21F4
push	eax
call	sub_6D1DB0

locret_6D21F4:
retn
sub_6D21E0 endp

align 10h



sub_6D2200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
lea	ebx, [esi+1]
push	ebx
push	edi
call	sub_6D1D50
cmp	ebx, esi
jbe	short loc_6D222A
mov	ecx, [edi]
lea	eax, [esi+esi*4]
sub	ebx, esi
lea	edx, [ecx+eax*4]
push	ebx
push	edx
call	sub_6D1470
add	esp, 8

loc_6D222A:
mov	eax, [edi+4]
mov	esi, [esp+0Ch+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_6D2258
mov	ecx, [edi]
sub	eax, esi
lea	edx, [esi+esi*4]
lea	ecx, [ecx+edx*4]
dec	eax
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
push	edx
push	ecx
add	ecx, 14h
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_6D2258:
mov	ecx, [edi]
lea	eax, [esi+esi*4]
lea	eax, [ecx+eax*4]
test	eax, eax
jz	short loc_6D228E
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx+4]
mov	esi, [ecx]
mov	[eax], esi
mov	[eax+4], edx
mov	edx, [ecx+8]
test	edx, edx
jz	short loc_6D227C
inc	dword ptr [edx+4]

loc_6D227C:
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	ecx, [ecx+10h]
mov	[eax+10h], ecx

loc_6D228E:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6D2200 endp

align 10h



sub_6D22A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 1Ch
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+4]
test	edi, edi
jbe	loc_6D2647
push	ebx
mov	ebx, [eax]
push	ebx
call	sub_726180
mov	[esp+28h+var_14], esi
test	eax, eax
jge	short loc_6D22CB
xor	edi, edi
jmp	short loc_6D22D4

loc_6D22CB:
cmp	eax, edi
jb	short loc_6D22D2
dec	edi
jmp	short loc_6D22D4

loc_6D22D2:
mov	edi, eax

loc_6D22D4:
mov	ecx, [esi]
push	ebp
lea	ebp, [edi+edi*2]
add	ebp, ebp
add	ebp, ebp
mov	eax, [ecx+ebp]
add	ecx, ebp
cmp	ebx, eax
mov	[esp+2Ch+var_10], edi
jl	loc_6D241B
mov	edx, [esp+2Ch+arg_0]
mov	edx, [edx+4]
add	edx, ebx
mov	[esp+2Ch+var_1C], edx
mov	edx, [ecx+4]
lea	eax, [edx+eax-1]
mov	edx, [esp+2Ch+var_1C]
dec	edx
cmp	edx, eax
jg	loc_6D241B
cmp	[ecx], ebx
jnz	short loc_6D2359
mov	ebx, [esp+2Ch+arg_0]
mov	edx, [ebx+4]
mov	eax, [ecx+4]
cmp	edx, eax
jle	short loc_6D2324
mov	edx, eax

loc_6D2324:
add	[ecx], edx
sub	eax, edx
mov	[ecx+4], eax
mov	eax, [esi]
add	ebp, eax
cmp	dword ptr [ebp+4], 0
jnz	short loc_6D234B
mov	ecx, [ebx]
mov	[ebp+0], ecx
mov	edx, [ebx+4]
mov	[ebp+4], edx
mov	eax, [ebx+8]
mov	[ebp+8], eax
jmp	loc_6D249B

loc_6D234B:
push	ebx
push	edi
mov	ecx, esi
call	sub_6D1780
jmp	loc_6D249B

loc_6D2359:
mov	edx, [ecx+4]
add	edx, [ecx]
cmp	edx, [esp+2Ch+var_1C]
jle	loc_6D23EA
mov	edx, [ecx+4]
mov	eax, [ecx]
mov	[esp+2Ch+var_8], edx
sub	edx, ebx
add	edx, [ecx]
mov	[esp+2Ch+var_C], eax
mov	eax, [ecx+8]
push	edx
mov	[esp+30h+var_4], eax
call	sub_6CD100
mov	eax, [esi]
mov	eax, [eax+ebp+4]
mov	edx, [esp+2Ch+arg_0]
add	eax, [edx+4]
mov	ecx, [esp+2Ch+var_8]
cmp	eax, ecx
jle	short loc_6D239D
mov	eax, ecx

loc_6D239D:
add	[esp+2Ch+var_C], eax
sub	ecx, eax
push	edx
mov	[esp+30h+var_8], ecx
lea	ebx, [edi+1]
push	ebx
mov	ecx, esi
call	sub_6D1780
cmp	edi, [esi+4]
jge	short loc_6D23BE
mov	edi, ebx
mov	[esp+2Ch+var_10], edi

loc_6D23BE:
mov	ebx, [esp+2Ch+var_14]
lea	ecx, [esp+2Ch+var_C]
push	ecx
lea	ebp, [edi+1]
push	ebp
mov	ecx, esi
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_18], edi
call	sub_6D1780
cmp	edi, [esi+4]
jge	loc_6D24B1
mov	edi, ebp
jmp	loc_6D24AD

loc_6D23EA:
mov	ebp, [esp+2Ch+arg_0]
mov	eax, [ebp+4]
push	eax
call	sub_6CD100
cmp	edi, [esi+4]
jge	short loc_6D2401
inc	edi
mov	[esp+2Ch+var_10], edi

loc_6D2401:
mov	ebx, [esp+2Ch+var_14]
push	ebp
push	edi
mov	ecx, esi
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_18], edi
call	sub_6D1780
jmp	loc_6D24A7

loc_6D241B:
mov	eax, [ecx]
cmp	ebx, eax
jl	short loc_6D2469
mov	edx, [ecx+4]
lea	eax, [edx+eax-1]
cmp	ebx, eax
jg	short loc_6D2469
mov	eax, edx
sub	eax, ebx
add	eax, [ecx]
cmp	eax, edx
jbe	short loc_6D243F
mov	dword ptr [ecx+4], 0
jmp	short loc_6D2444

loc_6D243F:
sub	edx, eax
mov	[ecx+4], edx

loc_6D2444:
cmp	edi, [esi+4]
jge	short loc_6D244E
inc	edi
mov	[esp+2Ch+var_10], edi

loc_6D244E:
mov	ecx, [esp+2Ch+arg_0]
mov	ebx, [esp+2Ch+var_14]
push	ecx
push	edi
mov	ecx, esi
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_18], edi
call	sub_6D1780
jmp	short loc_6D24A7

loc_6D2469:
push	ebx
call	sub_6C4400
mov	ecx, esi
test	eax, eax
jle	short loc_6D2482
mov	edx, [esp+2Ch+arg_0]
push	edx
push	edi
call	sub_6D1780
jmp	short loc_6D249B

loc_6D2482:
mov	eax, [esp+2Ch+arg_0]
push	eax
lea	ebx, [edi+1]
push	ebx
call	sub_6D1780
cmp	edi, [esi+4]
jge	short loc_6D249B
mov	edi, ebx
mov	[esp+2Ch+var_10], edi

loc_6D249B:
mov	ebx, [esp+2Ch+var_14]
mov	[esp+2Ch+var_1C], ebx
mov	[esp+2Ch+var_18], edi

loc_6D24A7:
cmp	edi, [esi+4]
jge	short loc_6D24B1
inc	edi

loc_6D24AD:
mov	[esp+2Ch+var_10], edi

loc_6D24B1:
lea	ecx, [esp+2Ch+var_14]
call	sub_726090
test	al, al
jnz	short loc_6D2534
lea	ebp, [edi+edi*2]
add	ebp, ebp
add	ebp, ebp

loc_6D24C5:
mov	eax, [esi]
mov	edx, [esp+2Ch+arg_0]
mov	ecx, [eax+ebp]
mov	edx, [edx]
add	eax, ebp
cmp	ecx, edx
jl	short loc_6D2534
mov	eax, [eax+4]
lea	ecx, [eax+ecx-1]
mov	eax, [esp+2Ch+arg_0]
mov	eax, [eax+4]
lea	edx, [eax+edx-1]
cmp	ecx, edx
jg	short loc_6D2534
test	edi, edi
jl	short loc_6D2527
cmp	edi, [esi+4]
jnb	short loc_6D2527
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_6D2508
push	0
mov	ecx, esi
call	sub_6D15A0
jmp	short loc_6D2527

loc_6D2508:
mov	ecx, [esi]
sub	eax, edi
dec	eax
lea	edx, [eax+eax*2]
add	edx, edx
add	ecx, ebp
add	edx, edx
push	edx
lea	eax, [ecx+0Ch]
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]

loc_6D2527:
lea	ecx, [esp+2Ch+var_14]
call	sub_726090
test	al, al
jz	short loc_6D24C5

loc_6D2534:
test	edi, edi
jl	short loc_6D2576
cmp	edi, [esi+4]
jnb	short loc_6D2576
mov	eax, [esp+2Ch+arg_0]
mov	ecx, [eax+4]
mov	edx, [eax]
mov	esi, [esi]
lea	eax, [edi+edi*2]
lea	eax, [esi+eax*4]
mov	esi, [eax]
lea	ebp, [ecx+edx-1]
cmp	ebp, esi
jl	short loc_6D2576
mov	edi, [eax+4]
lea	esi, [edi+esi-1]
cmp	ebp, esi
jg	short loc_6D2576
sub	ecx, [eax]
add	ecx, edx
mov	edx, edi
cmp	ecx, edx
jle	short loc_6D256F
mov	ecx, edx

loc_6D256F:
add	[eax], ecx
sub	edx, ecx
mov	[eax+4], edx

loc_6D2576:
mov	edx, [esp+2Ch+var_18]
mov	[esp+2Ch+var_10], edx
test	edx, edx
jl	short loc_6D25D5
lea	esi, [edx-1]
test	esi, esi
jl	short loc_6D25D5
cmp	esi, [ebx+4]
jnb	short loc_6D25D5
mov	eax, [ebx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [eax+ecx*4+4], 0
lea	eax, [eax+ecx*4]
jnz	short loc_6D25A7
push	esi
mov	ecx, ebx
call	sub_6D1DB0
jmp	short loc_6D25D5

loc_6D25A7:
mov	edi, [eax+4]
add	edi, [eax]
mov	ecx, [esp+2Ch+arg_0]
cmp	edi, [ecx]
jnz	short loc_6D25D5
mov	edi, [ebx]
mov	ebp, [eax+8]
lea	edx, [edx+edx*2]
cmp	ebp, [edi+edx*4+8]
jnz	short loc_6D25D5
mov	ecx, [ecx+4]
add	[eax+4], ecx
lea	ecx, [esp+2Ch+var_1C]
call	sub_6D21E0
mov	[esp+2Ch+var_18], esi

loc_6D25D5:
mov	edi, [esp+2Ch+var_18]
mov	ecx, [ebx+4]
cmp	edi, ecx
mov	eax, edi
mov	[esp+2Ch+var_14], ebx
mov	[esp+2Ch+var_10], eax
pop	ebp
jge	short loc_6D25F2
lea	eax, [edi+1]
mov	[esp+28h+var_10], eax

loc_6D25F2:
test	eax, eax
jl	short loc_6D2612
cmp	eax, ecx
jnb	short loc_6D2612
mov	edx, [ebx]
lea	ecx, [eax+eax*2]
mov	esi, [edx+ecx*4+4]
lea	ecx, [edx+ecx*4]
test	esi, esi
jnz	short loc_6D261B
push	eax
mov	ecx, ebx
call	sub_6D1DB0

loc_6D2612:
pop	ebx
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_6D261B:
lea	eax, [edi+edi*2]
lea	eax, [edx+eax*4]
mov	edx, [eax+4]
add	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_6D2612
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnz	short loc_6D2612
add	[eax+4], esi
lea	ecx, [esp+28h+var_14]
call	sub_6D21E0
pop	ebx
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_6D2647:
push	eax
push	0
call	sub_6D1780
pop	edi
pop	esi
add	esp, 1Ch
retn	4
sub_6D22A0 endp

align 10h



sub_6D2660 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+4]
test	edi, edi
jbe	loc_6D2896
push	ebp
mov	ebp, [esp+20h+arg_0]
push	ebp
call	sub_726180
mov	[esp+20h+var_14], esi
test	eax, eax
jge	short loc_6D2689
xor	edi, edi
jmp	short loc_6D2692

loc_6D2689:
cmp	eax, edi
jb	short loc_6D2690
dec	edi
jmp	short loc_6D2692

loc_6D2690:
mov	edi, eax

loc_6D2692:
cmp	[esp+20h+arg_4], 0FFFFFFFFh
mov	[esp+20h+var_10], edi
jnz	short loc_6D26A8
mov	eax, 7FFFFFFFh
sub	eax, ebp
mov	[esp+20h+arg_4], eax

loc_6D26A8:
mov	eax, [esi]
push	ebx
lea	ebx, [edi+edi*2]
add	ebx, ebx
add	ebx, ebx
lea	ecx, [ebx+eax]
mov	eax, [ecx]
cmp	ebp, eax
jl	loc_6D279E
mov	edx, [ecx+4]
lea	edx, [edx+eax-1]
mov	eax, [esp+24h+arg_4]
add	eax, ebp
dec	eax
cmp	eax, edx
jg	loc_6D279E
cmp	[ecx], ebp
jnz	short loc_6D2720
mov	edx, [esp+24h+arg_4]
mov	eax, [ecx+4]
mov	[esp+24h+arg_0], edx
cmp	edx, eax
mov	edx, eax
jg	short loc_6D26EE
mov	edx, [esp+24h+arg_0]

loc_6D26EE:
add	[ecx], edx
sub	eax, edx
mov	[ecx+4], eax
mov	ecx, [esi]
cmp	dword ptr [ebx+ecx+4], 0
jnz	loc_6D27CF
test	edi, edi
jl	loc_6D27D9
cmp	edi, [esi+4]
jnb	loc_6D27D9
push	edi
mov	ecx, esi
call	sub_6D1DB0
jmp	loc_6D27D9

loc_6D2720:
mov	edx, [ecx+4]
mov	eax, [esp+24h+arg_4]
add	edx, [ecx]
add	eax, ebp
cmp	edx, eax
jle	short loc_6D2784
mov	eax, [ecx+4]
mov	edx, [ecx]
mov	[esp+24h+var_8], eax
sub	eax, ebp
add	eax, [ecx]
mov	[esp+24h+var_C], edx
mov	edx, [ecx+8]
push	eax
mov	[esp+28h+var_4], edx
call	sub_6CD100
mov	ecx, [esi]
mov	eax, [ebx+ecx+4]
add	eax, [esp+24h+arg_4]
mov	ecx, [esp+24h+var_8]
cmp	eax, ecx
jle	short loc_6D2761
mov	eax, ecx

loc_6D2761:
add	[esp+24h+var_C], eax
sub	ecx, eax
cmp	edi, [esi+4]
mov	[esp+24h+var_8], ecx
jge	short loc_6D2775
inc	edi
mov	[esp+24h+var_10], edi

loc_6D2775:
lea	edx, [esp+24h+var_C]
push	edx
push	edi
mov	ecx, esi
call	sub_6D1780
jmp	short loc_6D27CF

loc_6D2784:
mov	eax, [esp+24h+arg_4]
push	eax
call	sub_6CD100

loc_6D278E:
mov	eax, [esi+4]
cmp	edi, eax
jge	short loc_6D27D9
inc	edi
mov	[esp+24h+var_10], edi
cmp	edi, eax
jmp	short loc_6D27D2

loc_6D279E:
mov	eax, [ecx]
cmp	ebp, eax
jl	short loc_6D27C9
mov	edx, [ecx+4]
lea	eax, [edx+eax-1]
cmp	ebp, eax
jg	short loc_6D27C9
mov	eax, edx
sub	eax, ebp
add	eax, [ecx]
cmp	eax, edx
jbe	short loc_6D27C2
mov	dword ptr [ecx+4], 0
jmp	short loc_6D278E

loc_6D27C2:
sub	edx, eax
mov	[ecx+4], edx
jmp	short loc_6D278E

loc_6D27C9:
push	ebp
call	sub_6C4400

loc_6D27CF:
cmp	edi, [esi+4]

loc_6D27D2:
jge	short loc_6D27D9
inc	edi
mov	[esp+24h+var_10], edi

loc_6D27D9:
lea	ecx, [esp+24h+var_14]
call	sub_726090
test	al, al
jnz	short loc_6D2857
lea	ebx, [edi+edi*2]
add	ebx, ebx
add	ebx, ebx
lea	ecx, [ecx+0]

loc_6D27F0:
mov	eax, [esi]
mov	ecx, [eax+ebx]
add	eax, ebx
cmp	ecx, ebp
jl	short loc_6D2857
mov	edx, [eax+4]
lea	eax, [edx+ecx-1]
mov	edx, [esp+24h+arg_4]
lea	ecx, [edx+ebp-1]
cmp	eax, ecx
jg	short loc_6D285B
test	edi, edi
jl	short loc_6D284A
cmp	edi, [esi+4]
jnb	short loc_6D284A
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_6D282A
push	0
mov	ecx, esi
call	sub_6D15A0
jmp	short loc_6D284A

loc_6D282A:
mov	edx, [esi]
sub	eax, edi
dec	eax
lea	eax, [eax+eax*2]
add	eax, eax
lea	ecx, [ebx+edx]
add	eax, eax
push	eax
lea	edx, [ecx+0Ch]
push	edx
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]

loc_6D284A:
lea	ecx, [esp+24h+var_14]
call	sub_726090
test	al, al
jz	short loc_6D27F0

loc_6D2857:
mov	edx, [esp+24h+arg_4]

loc_6D285B:
pop	ebx
test	edi, edi
jl	short loc_6D2895
cmp	edi, [esi+4]
jnb	short loc_6D2895
mov	esi, [esi]
lea	eax, [edi+edi*2]
lea	eax, [esi+eax*4]
mov	esi, [eax]
lea	ecx, [edx+ebp-1]
cmp	ecx, esi
jl	short loc_6D2895
mov	edi, [eax+4]
lea	esi, [edi+esi-1]
cmp	ecx, esi
jg	short loc_6D2895
sub	ebp, [eax]
mov	ecx, edi
add	ebp, edx
cmp	ebp, ecx
jle	short loc_6D288E
mov	ebp, ecx

loc_6D288E:
add	[eax], ebp
sub	ecx, ebp
mov	[eax+4], ecx

loc_6D2895:
pop	ebp

loc_6D2896:
pop	edi
pop	esi
add	esp, 14h
retn	8
sub_6D2660 endp

align 10h



sub_6D28A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 1
jnz	short loc_6D28B5
push	0
push	esi
call	sub_6D1D50
pop	esi
retn	4

loc_6D28B5:
mov	eax, [esi]
push	ebx
mov	ebx, [esp+8+arg_0]
push	edi
lea	edi, [ebx+ebx*4]
add	edi, edi
add	edi, edi
mov	ecx, [edi+eax+8]
lea	eax, [edi+eax+8]
test	ecx, ecx
jz	short loc_6D28D5
call	sub_64A400

loc_6D28D5:
mov	eax, [esi+4]
mov	ecx, [esi]
sub	eax, ebx
dec	eax
lea	edx, [eax+eax*4]
add	edx, edx
add	ecx, edi
add	edx, edx
push	edx
lea	eax, [ecx+14h]
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 0Ch
pop	edi
pop	ebx
pop	esi
retn	4
sub_6D28A0 endp

align 10h



sub_6D2900 proc	near
mov	eax, [ecx+4]
test	eax, eax
jl	short locret_6D2914
mov	ecx, [ecx]
cmp	eax, [ecx+4]
jnb	short locret_6D2914
push	eax
call	sub_6D28A0

locret_6D2914:
retn
sub_6D2900 endp

align 10h



sub_6D2920 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+104h]
xor	ebp, ebp
mov	[esp+2Ch+var_1C], edi
cmp	esi, ebp
jz	short loc_6D2956
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6D2956:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	0Ch
call	eax
cmp	eax, ebp
jz	short loc_6D2974
mov	[eax], ebp
mov	[eax+4], ebp
mov	[eax+8], ebp
jmp	short loc_6D2976

loc_6D2974:
xor	eax, eax

loc_6D2976:
mov	[edi+104h], eax
cmp	eax, ebp
jnz	short loc_6D298B
pop	edi
pop	esi
xor	al, al
pop	ebp
add	esp, 20h
retn	4

loc_6D298B:
mov	ecx, [esp+2Ch+arg_0]
mov	eax, [ecx]
mov	ecx, [eax]
push	ebx
mov	[esp+30h+var_20], ecx
mov	ebx, [eax+10h]
add	ebx, ecx
xor	esi, esi
mov	byte ptr [esp+30h+arg_0], 0
cmp	ecx, ebx
jnb	loc_6D2A7D
lea	esp, [esp+0]

loc_6D29B0:
lea	edx, [esp+30h+var_20]
push	edx
call	sub_67B600
mov	edi, eax
cmp	edi, 5Eh
jnz	short loc_6D29D2
cmp	byte ptr [esp+30h+arg_0], 0
setz	al
mov	byte ptr [esp+30h+arg_0], al
jmp	loc_6D2A73

loc_6D29D2:
cmp	edi, 5Ch
jnz	short loc_6D29F7
cmp	[esp+30h+var_20], ebx
jnb	loc_6D2A7D
lea	ecx, [esp+30h+var_20]
push	ecx
call	sub_67B600
mov	edi, eax

loc_6D29ED:
xor	eax, eax
cmp	esi, eax
jnz	short loc_6D2A00
mov	esi, edi
jmp	short loc_6D2A06

loc_6D29F7:
cmp	edi, 2Dh
jnz	short loc_6D29ED
mov	esi, ebp
jmp	short loc_6D2A73

loc_6D2A00:
cmp	edi, esi
jnb	short loc_6D2A06
mov	edi, esi

loc_6D2A06:
cmp	byte ptr [esp+30h+arg_0], 0
jnz	short loc_6D2A34
mov	ecx, [esp+30h+var_1C]
mov	ecx, [ecx+104h]
mov	edx, edi
sub	edx, esi
mov	[esp+30h+var_10], eax
lea	eax, [esp+30h+var_18]
inc	edx
push	eax
mov	[esp+34h+var_18], esi
mov	[esp+34h+var_14], edx
call	sub_6D22A0
jmp	short loc_6D2A6F

loc_6D2A34:
mov	ebp, [esp+30h+var_1C]
mov	ecx, [ebp+104h]
cmp	[ecx+4], eax
jnz	short loc_6D2A5D
lea	edx, [esp+30h+var_C]
push	edx
mov	[esp+34h+var_C], eax
mov	[esp+34h+var_8], 10000h
mov	[esp+34h+var_4], eax
call	sub_6D22A0

loc_6D2A5D:
mov	ecx, [ebp+104h]
mov	eax, edi
sub	eax, esi
inc	eax
push	eax
push	esi
call	sub_6D2660

loc_6D2A6F:
mov	ebp, edi
xor	esi, esi

loc_6D2A73:
cmp	[esp+30h+var_20], ebx
jb	loc_6D29B0

loc_6D2A7D:
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 20h
retn	4
sub_6D2920 endp

align 10h



sub_6D2A90 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], cl
mov	[eax+15h], cl
mov	[eax+18h], ecx
mov	[eax+1Ch], cl
mov	[eax+1Dh], cl
mov	[eax+20h], ecx
mov	[eax+24h], cl
mov	[eax+25h], cl
mov	[eax+28h], ecx
mov	[eax+2Ch], cl
mov	[eax+2Dh], cl
retn
sub_6D2A90 endp

align 10h



sub_6D2AD0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 24h
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
test	esi, esi
jbe	loc_6D2E94
mov	eax, [esp+2Ch+arg_0]
push	ebx
push	ebp
mov	ebp, [eax]
push	ebp
call	sub_6CE3E0
mov	[esp+34h+var_1C], edi
test	eax, eax
jge	short loc_6D2AFC
xor	esi, esi
jmp	short loc_6D2B05

loc_6D2AFC:
cmp	eax, esi
jb	short loc_6D2B03
dec	esi
jmp	short loc_6D2B05

loc_6D2B03:
mov	esi, eax

loc_6D2B05:
mov	ecx, [edi]
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
mov	eax, [ecx+ebx]
add	ecx, ebx
cmp	ebp, eax
mov	[esp+34h+var_18], esi
jl	loc_6D2C77
mov	edx, [esp+34h+arg_0]
mov	edx, [edx+4]
add	edx, ebp
mov	[esp+34h+var_24], edx
mov	edx, [ecx+4]
lea	eax, [edx+eax-1]
mov	edx, [esp+34h+var_24]
dec	edx
cmp	edx, eax
jg	loc_6D2C77
cmp	[ecx], ebp
jnz	short loc_6D2B96
mov	ebp, [esp+34h+arg_0]
mov	edx, [ebp+4]
mov	eax, [ecx+4]
cmp	edx, eax
jle	short loc_6D2B54
mov	edx, eax

loc_6D2B54:
add	[ecx], edx
sub	eax, edx
mov	[ecx+4], eax
mov	eax, [edi]
cmp	dword ptr [ebx+eax+4], 0
lea	ecx, [ebx+eax]
push	ebp
jnz	short loc_6D2B6F
call	sub_6D1550
jmp	short loc_6D2B77

loc_6D2B6F:
push	esi
mov	ecx, edi
call	sub_6D2200

loc_6D2B77:
cmp	esi, [edi+4]
mov	ebx, [esp+34h+var_1C]
mov	[esp+34h+var_24], ebx
mov	[esp+34h+var_20], esi
jge	loc_6D2D11
inc	esi
mov	[esp+34h+var_18], esi
jmp	loc_6D2D11

loc_6D2B96:
mov	edx, [ecx+4]
add	edx, [ecx]
cmp	edx, [esp+34h+var_24]
jle	loc_6D2C38
push	ecx
lea	ecx, [esp+38h+var_14]
call	sub_6CFDC0
mov	eax, [edi]
mov	edx, [ebx+eax+4]
mov	ebp, [esp+34h+arg_0]
sub	edx, [ebp+0]
lea	ecx, [ebx+eax]
add	edx, [ecx]
push	edx
call	sub_6CD100
mov	eax, [edi]
mov	eax, [ebx+eax+4]
add	eax, [ebp+4]
mov	ecx, [esp+34h+var_10]
cmp	eax, ecx
jle	short loc_6D2BDA
mov	eax, ecx

loc_6D2BDA:
add	[esp+34h+var_14], eax
sub	ecx, eax
push	ebp
mov	[esp+38h+var_10], ecx
lea	ebx, [esi+1]
push	ebx
mov	ecx, edi
call	sub_6D2200
cmp	esi, [edi+4]
jge	short loc_6D2BFB
mov	esi, ebx
mov	[esp+34h+var_18], esi

loc_6D2BFB:
mov	ebx, [esp+34h+var_1C]
lea	ecx, [esp+34h+var_14]
push	ecx
lea	ebp, [esi+1]
push	ebp
mov	ecx, edi
mov	[esp+3Ch+var_24], ebx
mov	[esp+3Ch+var_20], esi
call	sub_6D2200
cmp	esi, [edi+4]
jge	short loc_6D2C22
mov	esi, ebp
mov	[esp+34h+var_18], esi

loc_6D2C22:
mov	ecx, [esp+34h+var_C]
test	ecx, ecx
jz	loc_6D2D0D
call	sub_64A400
jmp	loc_6D2D0D

loc_6D2C38:
mov	ebp, [esp+34h+arg_0]
mov	eax, [ebp+4]
push	eax
call	sub_6CD100
cmp	esi, [edi+4]
jge	short loc_6D2C4F
inc	esi
mov	[esp+34h+var_18], esi

loc_6D2C4F:
mov	ebx, [esp+34h+var_1C]
push	ebp
push	esi
mov	ecx, edi
mov	[esp+3Ch+var_24], ebx
mov	[esp+3Ch+var_20], esi
call	sub_6D2200
cmp	esi, [edi+4]
jge	loc_6D2D0D
inc	esi
mov	[esp+34h+var_18], esi
jmp	loc_6D2D11

loc_6D2C77:
mov	eax, [ecx]
cmp	ebp, eax
jl	short loc_6D2CC5
mov	edx, [ecx+4]
lea	eax, [edx+eax-1]
cmp	ebp, eax
jg	short loc_6D2CC5
mov	eax, edx
sub	eax, ebp
add	eax, [ecx]
cmp	eax, edx
jbe	short loc_6D2C9B
mov	dword ptr [ecx+4], 0
jmp	short loc_6D2CA0

loc_6D2C9B:
sub	edx, eax
mov	[ecx+4], edx

loc_6D2CA0:
cmp	esi, [edi+4]
jge	short loc_6D2CAA
inc	esi
mov	[esp+34h+var_18], esi

loc_6D2CAA:
mov	ecx, [esp+34h+arg_0]
mov	ebx, [esp+34h+var_1C]
push	ecx
push	esi
mov	ecx, edi
mov	[esp+3Ch+var_24], ebx
mov	[esp+3Ch+var_20], esi
call	sub_6D2200
jmp	short loc_6D2D03

loc_6D2CC5:
push	ebp
call	sub_6C4400
mov	ecx, edi
test	eax, eax
jle	short loc_6D2CDE
mov	edx, [esp+34h+arg_0]
push	edx
push	esi
call	sub_6D2200
jmp	short loc_6D2CF7

loc_6D2CDE:
mov	eax, [esp+34h+arg_0]
push	eax
lea	ebx, [esi+1]
push	ebx
call	sub_6D2200
cmp	esi, [edi+4]
jge	short loc_6D2CF7
mov	esi, ebx
mov	[esp+34h+var_18], esi

loc_6D2CF7:
mov	ebx, [esp+34h+var_1C]
mov	[esp+34h+var_20], esi
mov	[esp+34h+var_24], ebx

loc_6D2D03:
cmp	esi, [edi+4]
jge	short loc_6D2D0D
inc	esi
mov	[esp+34h+var_18], esi

loc_6D2D0D:
mov	ebp, [esp+34h+arg_0]

loc_6D2D11:
lea	ecx, [esp+34h+var_1C]
call	sub_726090
test	al, al
jnz	short loc_6D2D71
lea	ecx, [esi+esi*4]
add	ecx, ecx
add	ecx, ecx
mov	[esp+34h+arg_0], ecx
jmp	short loc_6D2D34
jmp	short loc_6D2D30
align 10h

loc_6D2D30:
mov	ecx, [esp+34h+arg_0]

loc_6D2D34:
mov	eax, [edi]
mov	edx, [ebp+0]
add	eax, ecx
mov	ecx, [eax]
cmp	ecx, edx
jl	short loc_6D2D71
mov	eax, [eax+4]
lea	ecx, [eax+ecx-1]
mov	eax, [ebp+4]
lea	edx, [eax+edx-1]
cmp	ecx, edx
jg	short loc_6D2D71
test	esi, esi
jl	short loc_6D2D64
cmp	esi, [edi+4]
jnb	short loc_6D2D64
push	esi
mov	ecx, edi
call	sub_6D28A0

loc_6D2D64:
lea	ecx, [esp+34h+var_1C]
call	sub_726090
test	al, al
jz	short loc_6D2D30

loc_6D2D71:
test	esi, esi
jl	short loc_6D2DB5
cmp	esi, [edi+4]
jnb	short loc_6D2DB5
mov	ecx, [ebp+4]
mov	edx, [ebp+0]
lea	eax, [esi+esi*4]
mov	esi, [edi]
lea	eax, [esi+eax*4]
mov	esi, [eax]
lea	edi, [ecx+edx-1]
cmp	edi, esi
jl	short loc_6D2DB5
mov	edi, [eax+4]
lea	edi, [edi+esi-1]
lea	esi, [ecx+edx-1]
cmp	esi, edi
jg	short loc_6D2DB5
sub	ecx, [eax]
add	ecx, edx
mov	edx, [eax+4]
cmp	ecx, edx
jle	short loc_6D2DAE
mov	ecx, edx

loc_6D2DAE:
add	[eax], ecx
sub	edx, ecx
mov	[eax+4], edx

loc_6D2DB5:
mov	ecx, [esp+34h+var_20]
mov	[esp+34h+var_18], ecx
test	ecx, ecx
jl	short loc_6D2E1C
lea	edi, [ecx-1]
test	edi, edi
jl	short loc_6D2E1C
cmp	edi, [ebx+4]
jnb	short loc_6D2E1C
mov	eax, [ebx]
lea	edx, [edi+edi*4]
cmp	dword ptr [eax+edx*4+4], 0
lea	esi, [eax+edx*4]
jnz	short loc_6D2DE6
push	edi
mov	ecx, ebx
call	sub_6D28A0
jmp	short loc_6D2E18

loc_6D2DE6:
mov	edx, [esi+4]
add	edx, [esi]
cmp	edx, [ebp+0]
jnz	short loc_6D2E1C
lea	eax, [ecx+ecx*4]
mov	ecx, [ebx]
lea	edx, [ecx+eax*4+8]
push	edx
mov	ecx, esi
call	sub_6CE320
test	al, al
jz	short loc_6D2E18
mov	eax, [ebp+4]
add	[esi+4], eax
lea	ecx, [esp+34h+var_24]
call	sub_6D2900
mov	[esp+34h+var_20], edi

loc_6D2E18:
mov	ecx, [esp+34h+var_20]

loc_6D2E1C:
mov	edx, [ebx+4]
cmp	ecx, edx
mov	eax, ecx
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_18], eax
jge	short loc_6D2E34
lea	eax, [ecx+1]
mov	[esp+34h+var_18], eax

loc_6D2E34:
test	eax, eax
jl	short loc_6D2E54
cmp	eax, edx
jnb	short loc_6D2E54
mov	esi, [ebx]
lea	edx, [eax+eax*4]
mov	edi, [esi+edx*4+4]
lea	edx, [esi+edx*4]
test	edi, edi
jnz	short loc_6D2E5E
push	eax
mov	ecx, ebx
call	sub_6D28A0

loc_6D2E54:
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 24h
retn	4

loc_6D2E5E:
lea	eax, [ecx+ecx*4]
mov	ecx, [esi+eax*4+4]
add	ecx, [esi+eax*4]
lea	esi, [esi+eax*4]
cmp	ecx, [edx]
jnz	short loc_6D2E54
add	edx, 8
push	edx
mov	ecx, esi
call	sub_6CE320
test	al, al
jz	short loc_6D2E54
add	[esi+4], edi
lea	ecx, [esp+34h+var_1C]
call	sub_6D2900
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 24h
retn	4

loc_6D2E94:
mov	edx, [esp+2Ch+arg_0]
push	edx
push	0
call	sub_6D2200
pop	edi
pop	esi
add	esp, 24h
retn	4
sub_6D2AD0 endp

align 10h



sub_6D2EB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi]
push	edi
mov	edi, [esp+8+arg_0]
cmp	ecx, edi
jz	short loc_6D2ED5
test	ecx, ecx
jz	short loc_6D2ED3
cmp	byte ptr [esi+4], 0
jz	short loc_6D2ED3
push	1
mov	byte ptr [esi+4], 0
call	sub_6CC330

loc_6D2ED3:
mov	[esi], edi

loc_6D2ED5:
xor	eax, eax
test	edi, edi
setnz	al
mov	[esi+4], al
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6D2EB0 endp

align 10h



sub_6D2EF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_0]
push	esi
push	edi
mov	edi, [esp+20h+arg_4]
push	edi
push	ebx
mov	esi, ecx
call	sub_6D14B0
mov	eax, [esp+20h+arg_8]
mov	ecx, [eax]
mov	[esp+20h+var_14], ebx
mov	[esp+20h+var_10], edi
test	ecx, ecx
jz	short loc_6D2F1C
inc	dword ptr [ecx+4]

loc_6D2F1C:
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [eax+8]
mov	[esp+20h+var_C], ecx
lea	ecx, [esp+20h+var_14]
push	ecx
mov	ecx, esi
mov	[esp+24h+var_8], edx
mov	[esp+24h+var_4], eax
call	sub_6D2AD0
mov	ecx, [esp+20h+var_C]
pop	edi
pop	esi
pop	ebx
test	ecx, ecx
jz	short loc_6D2F4C
call	sub_64A400

loc_6D2F4C:
add	esp, 14h
retn	0Ch
sub_6D2EF0 endp

db 1Eh dup(0CCh)



sub_6D2F70 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+110h]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_143B350
mov	dword ptr [esi+0Ch], offset off_143B344
mov	dword ptr [esi+78h], offset off_143B2F0
cmp	edi, ebx
jz	short loc_6D2FAA
mov	ecx, edi
call	sub_6C7960
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6D2FAA:
mov	ecx, [esi+0BCh]
mov	[esi+110h], ebx
call	sub_71E590
mov	edi, [esi+100h]
cmp	edi, ebx
jz	short loc_6D3003
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+14h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+8]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [edi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6D2FF5
call	sub_650DF0

loc_6D2FF5:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6D3003:
mov	edi, [esi+104h]
cmp	edi, ebx
jz	short loc_6D302B
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6D302B:
mov	ecx, [esi+108h]
cmp	ecx, ebx
jz	short loc_6D303A
call	sub_64B3B0

loc_6D303A:
lea	ecx, [esi+0F4h]
call	sub_64A3F0
mov	ecx, [esi+0ECh]
cmp	ecx, ebx
jz	short loc_6D306A
cmp	[esi+0F0h], bl
jz	short loc_6D3064
push	1
mov	[esi+0F0h], bl
call	sub_6CC330

loc_6D3064:
mov	[esi+0ECh], ebx

loc_6D306A:
mov	[esi+0F0h], bl
mov	edi, [esi+0E8h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6D3098
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6D3098:
lea	ecx, [esi+0D4h]
call	sub_652830
mov	ecx, [esi+0D0h]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6D30B4
call	sub_650DF0

loc_6D30B4:
mov	ecx, [esi+0BCh]
cmp	ecx, ebx
jz	short loc_6D30C3
call	sub_64A400

loc_6D30C3:
pop	edi
mov	ecx, esi
pop	esi
pop	ebx
jmp	sub_65C080
sub_6D2F70 endp

align 10h



sub_6D30D0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 60h
push	edi
mov	edi, ecx
mov	ecx, [edi+0ECh]
mov	[esp+64h+var_58], edi
test	ecx, ecx
jz	loc_6D33AB
xor	eax, eax
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+18h], eax
mov	[ecx+1Ch], eax
mov	[ecx+20h], eax
push	ebx
mov	[ecx+24h], eax
push	ebp
mov	[ecx+28h], eax
mov	[ecx+2Ch], eax
mov	ecx, [edi+0ECh]
push	esi
add	ecx, 4
push	eax
push	ecx
call	sub_6D1D50
mov	eax, [edi+0BCh]
mov	esi, [eax+8]
lea	ecx, [esp+70h+var_60]
mov	[esp+70h+var_4C], esi
call	sub_679E30
mov	eax, [esi+10h]
xor	ecx, ecx
xor	ebp, ebp
xor	ebx, ebx
mov	[esp+70h+var_48], eax
mov	[esp+70h+var_54], ecx
test	eax, eax
jbe	loc_6D332C
jmp	short loc_6D314A

loc_6D3146:
mov	ecx, [esp+70h+var_54]

loc_6D314A:
cmp	ecx, [esi+10h]
jnb	short loc_6D315B
mov	edx, [esi+0Ch]
mov	eax, [edx+ecx*4]
mov	[esp+70h+var_5C], eax
jmp	short loc_6D3163

loc_6D315B:
mov	[esp+70h+var_5C], 0

loc_6D3163:
lea	ecx, [esp+70h+var_24]
push	ecx
mov	ecx, [esp+74h+var_5C]
call	sub_727120
mov	edx, [esp+70h+var_4]
mov	eax, [esp+70h+var_8]
cmp	edx, [eax+4]
jnb	loc_6D330C

loc_6D3182:
lea	ecx, [esp+70h+var_24]
call	sub_727230
mov	esi, [eax+4]
mov	ecx, [esp+70h+var_5C]
add	esi, [ecx+1Ch]
lea	ecx, [esp+70h+var_24]
mov	[esp+70h+var_50], esi
call	sub_727230
mov	eax, [eax+0Ch]
mov	edx, 100h
test	[eax+2Ah], dx
jz	loc_6D32EA
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	loc_6D32EA
mov	eax, [esp+70h+var_60]
and	eax, 0FFFFFFFCh
test	dword ptr [eax], 7FFFFFFFh
jz	loc_6D32B4
lea	edi, [ebx+ebp]
cmp	esi, edi
jnz	short loc_6D323A
lea	ecx, [esp+70h+var_24]
call	sub_727230
mov	ecx, [eax+0Ch]
mov	ecx, [ecx+10h]
mov	eax, [esp+70h+var_60]
and	ecx, 0FFFFFFFCh
and	eax, 0FFFFFFFCh
add	ecx, 8
add	eax, 8
lea	ecx, [ecx+0]

loc_6D3200:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6D3220
test	dl, dl
jz	short loc_6D321C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6D3220
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6D3200

loc_6D321C:
xor	eax, eax
jmp	short loc_6D3225

loc_6D3220:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6D3225:
test	eax, eax
jnz	short loc_6D323A
lea	ecx, [esp+70h+var_24]
call	sub_727230
add	ebx, [eax+8]
jmp	loc_6D32B4

loc_6D323A:
mov	edx, [esp+70h+var_58]
mov	eax, [edx+0BCh]
mov	ecx, [eax+8]
push	edi
push	ebp
call	sub_72E2D0
mov	ecx, [esp+70h+var_58]
mov	esi, [ecx+0ECh]
push	ebx
add	esi, 4
push	ebp
mov	ecx, esi
mov	edi, eax
call	sub_6D14B0
xor	eax, eax
mov	[esp+70h+var_38], ebp
mov	[esp+70h+var_34], ebx
cmp	edi, eax
jz	short loc_6D3277
inc	dword ptr [edi+4]

loc_6D3277:
lea	edx, [esp+70h+var_38]
push	edx
mov	ecx, esi
mov	[esp+74h+var_30], edi
mov	[esp+74h+var_2C], eax
mov	[esp+74h+var_28], eax
call	sub_6D2AD0
mov	ecx, [esp+70h+var_30]
test	ecx, ecx
jz	short loc_6D329C
call	sub_64A400

loc_6D329C:
lea	ecx, [esp+70h+var_60]
call	sub_67A720
test	edi, edi
jz	short loc_6D32B0
mov	ecx, edi
call	sub_64A400

loc_6D32B0:
mov	esi, [esp+70h+var_50]

loc_6D32B4:
mov	eax, [esp+70h+var_60]
and	eax, 0FFFFFFFCh
test	dword ptr [eax], 7FFFFFFFh
jnz	short loc_6D32EA
lea	ecx, [esp+70h+var_24]
mov	ebp, esi
call	sub_727230
mov	ebx, [eax+8]
lea	ecx, [esp+70h+var_24]
call	sub_727230
mov	eax, [eax+0Ch]
add	eax, 10h
push	eax
lea	ecx, [esp+74h+var_60]
call	sub_67A3D0

loc_6D32EA:
lea	ecx, [esp+70h+var_24]
call	sub_7272D0
mov	ecx, [esp+70h+var_4]
mov	edx, [esp+70h+var_8]
cmp	ecx, [edx+4]
jb	loc_6D3182
mov	edi, [esp+70h+var_58]
mov	esi, [esp+70h+var_4C]

loc_6D330C:
mov	ecx, [esp+70h+var_18]
test	ecx, ecx
jz	short loc_6D3319
call	sub_64A430

loc_6D3319:
mov	eax, [esp+70h+var_54]
inc	eax
mov	[esp+70h+var_54], eax
cmp	eax, [esp+70h+var_48]
jb	loc_6D3146

loc_6D332C:
mov	eax, [esp+70h+var_60]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
test	dword ptr [ecx], 7FFFFFFFh
jz	short loc_6D3384
mov	edx, [edi+0BCh]
mov	ecx, [edx+8]
xor	eax, eax
mov	[esp+70h+var_40], eax
mov	[esp+70h+var_3C], eax
lea	eax, [ebx+ebp]
push	eax
push	ebp
call	sub_72E2D0
lea	ecx, [esp+70h+var_44]
push	ecx
mov	ecx, [edi+0ECh]
push	ebx
mov	esi, eax
push	ebp
add	ecx, 4
mov	[esp+7Ch+var_44], esi
call	sub_6D2EF0
test	esi, esi
jz	short loc_6D3380
mov	ecx, esi
call	sub_64A400

loc_6D3380:
mov	eax, [esp+70h+var_60]

loc_6D3384:
and	eax, 0FFFFFFFCh
mov	esi, eax
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6D33A8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6D33A8:
pop	esi
pop	ebp
pop	ebx

loc_6D33AB:
pop	edi
add	esp, 60h
retn
sub_6D30D0 endp




sub_6D33B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6D2F70
test	[esp+4+arg_0], 1
jz	short loc_6D33CD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6D33CD:
mov	eax, esi
pop	esi
retn	4
sub_6D33B0 endp

align 10h



sub_6D33E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	edx, [esp+0Ch+var_4]
mov	esi, ecx
mov	ecx, dword_1855FC0
push	edx
mov	[esp+10h+var_4], 142h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	114h
push	edi
call	eax
test	eax, eax
jz	short loc_6D342A
mov	edx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	ecx, [esp+10h+arg_8]
push	edi
push	ecx
push	esi
mov	ecx, eax
call	sub_6CCC80
pop	edi
pop	esi
pop	ecx
retn	0Ch

loc_6D342A:
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn	0Ch
sub_6D33E0 endp

align 10h



sub_6D3440 proc	near

var_93A= byte ptr -93Ah
var_938= word ptr -938h
var_934= word ptr -934h
var_930= dword ptr -930h
var_92C= dword ptr -92Ch
var_928= dword ptr -928h
var_924= dword ptr -924h
var_920= dword ptr -920h
var_91C= dword ptr -91Ch
var_918= dword ptr -918h
var_914= dword ptr -914h
var_910= dword ptr -910h
var_90C= dword ptr -90Ch
var_908= dword ptr -908h
var_904= dword ptr -904h
var_900= dword ptr -900h
var_8FC= dword ptr -8FCh
var_8F8= dword ptr -8F8h
var_8E0= dword ptr -8E0h
var_8C8= byte ptr -8C8h
var_89C= byte ptr -89Ch
var_870= byte ptr -870h
var_844= dword ptr -844h
var_838= byte ptr -838h
var_24=	dword ptr -24h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch

sub	esp, 93Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+93Ch+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+0ECh]
mov	ecx, [esp+948h+arg_0]
push	edi
test	eax, eax
jz	short loc_6D347B
cmp	dword ptr [eax], 0
jz	short loc_6D347B
mov	bl, 1
mov	[esp+94Ch+arg_4], bl
jmp	short loc_6D3482

loc_6D347B:
mov	bl, [esp+94Ch+arg_4]

loc_6D3482:
lea	edi, [esi+0E8h]
push	ecx
mov	ecx, edi
call	sub_67A2C0
test	bl, bl
jz	short loc_6D34A2
mov	eax, 1000h
or	[esi+0E4h], ax
jmp	short loc_6D34AE

loc_6D34A2:
mov	ecx, 0EFFFh
and	[esi+0E4h], cx

loc_6D34AE:
mov	edi, [edi]
mov	dl, [esi+0E4h]
and	edi, 0FFFFFFFCh
shr	dl, 3
add	edi, 8
mov	[esp+94Ch+var_93A], 0
test	dl, 1
jnz	loc_6D383B
mov	eax, [esi]
mov	edx, [eax+54h]
mov	ecx, esi
call	edx
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	3
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6D383B
mov	ecx, [esi+0A0h]
shr	ecx, 0Eh
test	cl, 1
jnz	short loc_6D3528
mov	eax, [esi+94h]
test	eax, eax
jnz	short loc_6D351E
mov	ecx, esi
call	sub_658B70
test	eax, eax
jnz	short loc_6D351E
mov	edx, [esi]
mov	eax, [edx+6Ch]
mov	ecx, esi
call	eax
mov	eax, [eax+78h]

loc_6D351E:
mov	ecx, [eax+8]
add	eax, 8
mov	eax, [ecx]
jmp	short loc_6D352D

loc_6D3528:
mov	eax, offset byte_146D660

loc_6D352D:
push	eax
lea	eax, [esp+950h+var_844]
call	sub_6C4B90
test	bl, bl
jz	loc_6D364A
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax
test	al, 1
jnz	loc_6D364A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	esi
call	eax
push	eax
lea	ecx, [esp+950h+var_870]
call	sub_694320
lea	ecx, [esp+94Ch+var_8F8]
call	sub_6C6310
lea	ecx, [esp+94Ch+var_8F8]
push	ecx
lea	edx, [esp+950h+var_870]
push	edx
mov	ecx, esi
call	sub_6C7AF0
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6D35A1
mov	eax, [eax]
test	eax, eax
jz	short loc_6D35A1
add	eax, 34h
jmp	short loc_6D35A3

loc_6D35A1:
xor	eax, eax

loc_6D35A3:
lea	ecx, [esp+94Ch+var_8F8]
push	ecx
lea	edx, [esp+950h+var_870]
push	edx
push	eax
mov	al, [esi+0E4h]
shr	al, 4
and	al, 1
movzx	ecx, al
push	0
push	ecx
mov	ecx, [esi+0BCh]
push	0FFFFFFFFh
push	edi
call	sub_71E370
mov	eax, [esi+0BCh]
mov	ecx, [eax+8]
lea	edx, [esp+94Ch+var_14]
push	edx
call	sub_726A10
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax
shr	eax, 1
test	al, 1
jz	short loc_6D3602
lea	ecx, [esp+94Ch+var_14]
call	sub_730E80

loc_6D3602:
mov	ecx, [esp+94Ch+var_14]
mov	edx, [ebp+0]
mov	edx, [edx+8]
lea	eax, [esp+94Ch+var_844]
mov	[esp+94Ch+var_844], ecx
push	eax
mov	ecx, ebp
call	edx
lea	ecx, [esp+94Ch+var_8F8]
mov	[esp+94Ch+var_8F8], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+94Ch+var_8F8]
call	sub_64A3F0
lea	ecx, [esp+94Ch+var_870]
call	sub_694380
jmp	short loc_6D369C

loc_6D364A:
push	0FFFFFFFFh
push	edi
call	sub_67BC50
inc	eax
push	eax
lea	ecx, [esp+950h+var_14]
call	sub_730DA0
mov	eax, [esp+94Ch+var_14]
push	0FFFFFFFFh
push	edi
push	eax
call	sub_67BBC0
mov	ecx, [esp+94Ch+var_14]
mov	[esp+94Ch+var_844], ecx
test	bl, bl
jz	short loc_6D368A
or	[esp+94Ch+var_838], 4

loc_6D368A:
mov	edx, [ebp+0]
mov	edx, [edx+8]
lea	eax, [esp+94Ch+var_844]
push	eax
mov	ecx, ebp
call	edx

loc_6D369C:
mov	al, [esp+94Ch+var_838]
mov	bl, al
and	bl, 1
jz	loc_6D380D
test	al, 2
jz	loc_6D37AA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
push	eax
lea	ecx, [esp+950h+var_8C8]
call	sub_694320
lea	ecx, [esp+94Ch+var_8E0]
call	sub_6C6310
lea	eax, [esp+94Ch+var_8E0]
push	eax
lea	ecx, [esp+950h+var_8C8]
push	ecx
mov	ecx, esi
call	sub_6C7AF0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	esi
call	eax
xor	edx, edx
mov	[esp+94Ch+var_904], eax
mov	eax, [esi+0ECh]
mov	[esp+94Ch+var_910], edx
mov	[esp+94Ch+var_90C], edx
mov	[esp+94Ch+var_908], edx
cmp	eax, edx
jz	short loc_6D3723
mov	eax, [eax]
cmp	eax, edx
jz	short loc_6D3723
lea	ecx, [eax+34h]
jmp	short loc_6D3725

loc_6D3723:
xor	ecx, ecx

loc_6D3725:
mov	eax, [esp+94Ch+var_24]
cmp	eax, edx
jnz	short loc_6D3735
mov	eax, offset szReferrer

loc_6D3735:
lea	edx, [esp+94Ch+var_8E0]
push	edx
lea	edx, [esp+950h+var_8C8]
push	edx
mov	dl, [esi+0E4h]
push	ecx
shr	dl, 4
lea	ecx, [esp+958h+var_910]
push	ecx
and	dl, 1
movzx	ecx, dl
push	ecx
mov	ecx, [esi+0BCh]
push	0FFFFFFFFh
push	eax
call	sub_71E3E0
cmp	[esp+94Ch+var_90C], 0
jbe	short loc_6D3779
lea	edx, [esp+94Ch+var_910]
push	edx
mov	ecx, esi
call	sub_6C9150

loc_6D3779:
lea	ecx, [esp+94Ch+var_910]
call	sub_6CB8E0
lea	ecx, [esp+94Ch+var_8E0]
mov	[esp+94Ch+var_8E0], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+94Ch+var_8E0]
call	sub_64A3F0
lea	ecx, [esp+94Ch+var_8C8]
call	sub_694380
jmp	short loc_6D3808

loc_6D37AA:
mov	edx, [esi+0BCh]
push	0
lea	eax, [esp+950h+var_900]
push	eax
lea	ecx, [esp+954h+var_8FC]
push	ecx
mov	ecx, [edx+8]
call	sub_728B20
mov	eax, [esp+94Ch+var_8FC]
mov	ecx, [esi+0BCh]
mov	ecx, [ecx+8]
push	eax
call	sub_729C00
mov	edx, [esp+94Ch+var_900]
mov	eax, [esi+0BCh]
mov	ecx, [eax+8]
push	edx
call	sub_726060
mov	eax, [esp+94Ch+var_24]
test	eax, eax
jnz	short loc_6D37FA
mov	eax, offset szReferrer

loc_6D37FA:
mov	ecx, [esi+0BCh]
push	0FFFFFFFFh
push	eax
call	sub_71E2A0

loc_6D3808:
mov	[esp+94Ch+var_93A], 1

loc_6D380D:
lea	ecx, [esp+94Ch+var_14]
call	sub_730D80
lea	ecx, [esp+94Ch+var_24]
call	sub_730D80
mov	ecx, ebp
call	sub_64A430
test	bl, bl
jnz	loc_6D3983
mov	bl, [esp+94Ch+arg_4]

loc_6D383B:
test	bl, bl
jz	loc_6D3975
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	esi
call	eax
push	eax
lea	ecx, [esp+950h+var_89C]
call	sub_694320
xor	ecx, ecx
xor	edx, edx
mov	word ptr [esp+94Ch+var_92C], cx
mov	word ptr [esp+94Ch+var_928+2], cx
lea	ecx, [esp+94Ch+var_938]
mov	word ptr [esp+94Ch+var_92C+2], dx
mov	word ptr [esp+94Ch+var_924], dx
push	ecx
xor	eax, eax
lea	edx, [esp+950h+var_89C]
mov	dword ptr [esp+950h+var_938], offset off_155F500
mov	ebp, offset off_143AB58
xor	ebx, ebx
push	edx
mov	ecx, esi
mov	dword ptr [esp+954h+var_934], 1
mov	dword ptr [esp+954h+var_938], ebp
mov	[esp+954h+var_930], ebx
mov	word ptr [esp+954h+var_928], ax
mov	word ptr [esp+954h+var_924+2], ax
call	sub_6C7AF0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
mov	[esp+94Ch+var_914], eax
mov	eax, [esi+0ECh]
mov	[esp+94Ch+var_920], ebx
mov	[esp+94Ch+var_91C], ebx
mov	[esp+94Ch+var_918], ebx
cmp	eax, ebx
jz	short loc_6D38E8
mov	eax, [eax]
cmp	eax, ebx
jz	short loc_6D38E8
add	eax, 34h
jmp	short loc_6D38EA

loc_6D38E8:
xor	eax, eax

loc_6D38EA:
lea	ecx, [esp+94Ch+var_938]
push	ecx
mov	cl, [esi+0E4h]
lea	edx, [esp+950h+var_89C]
push	edx
push	eax
shr	cl, 4
and	cl, 1
movzx	edx, cl
mov	ecx, [esi+0BCh]
lea	eax, [esp+958h+var_920]
push	eax
push	edx
push	0FFFFFFFFh
push	edi
call	sub_71E370
cmp	[esp+94Ch+var_91C], ebx
jbe	short loc_6D392D
lea	eax, [esp+94Ch+var_920]
push	eax
mov	ecx, esi
call	sub_6C9150

loc_6D392D:
mov	ecx, [esp+94Ch+var_91C]
mov	edx, [esp+94Ch+var_920]
push	ecx
push	edx
call	sub_6C7780
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+954h+var_920]
mov	eax, [eax+30h]
add	esp, 8
push	edx
call	eax
lea	ecx, [esp+94Ch+var_938]
mov	dword ptr [esp+94Ch+var_938], ebp
call	sub_6FFB90
lea	ecx, [esp+94Ch+var_938]
call	sub_64A3F0
lea	ecx, [esp+94Ch+var_89C]
call	sub_694380
jmp	short loc_6D3983

loc_6D3975:
mov	ecx, [esi+0BCh]
push	0FFFFFFFFh
push	edi
call	sub_71E270

loc_6D3983:
mov	eax, [esi+0BCh]
mov	ecx, [eax+11Ch]
test	ecx, ecx
jz	short loc_6D39CE
mov	cl, [ecx+68h]
and	cl, 1
jnz	short loc_6D39CE
mov	ecx, [eax+8]
call	sub_726950
mov	edx, [esi+0BCh]
mov	ecx, [edx+11Ch]
mov	edi, eax
call	sub_717420
cmp	eax, edi
jbe	short loc_6D39CE
mov	eax, [esi+0BCh]
mov	ecx, [eax+11Ch]
push	0
push	edi
call	sub_72F6A0

loc_6D39CE:
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6D39F3
cmp	dword ptr [eax], 0
jz	short loc_6D39F3
mov	ecx, [esi+0BCh]
mov	edx, [ecx+8]
test	byte ptr [edx+20h], 1
jz	short loc_6D39F3
mov	ecx, esi
call	sub_6D30D0

loc_6D39F3:
cmp	[esp+94Ch+arg_8], 0
jz	short loc_6D3A04
mov	ecx, esi
call	sub_6C4AC0

loc_6D3A04:
cmp	[esp+94Ch+var_93A], 0
jz	short loc_6D3A12
mov	ecx, esi
call	sub_6CABE0

loc_6D3A12:
mov	eax, [esi]
mov	edx, [eax+160h]
mov	ecx, esi
call	edx
mov	ecx, [esp+94Ch+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 93Ch
retn	0Ch
sub_6D3440 endp

align 10h



sub_6D3A40 proc	near

var_AC=	qword ptr -0ACh
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	qword ptr -78h
var_70=	dword ptr -70h
var_6C=	qword ptr -6Ch
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
var_40=	byte ptr -40h
var_3C=	byte ptr -3Ch
var_30=	byte ptr -30h
var_10=	dword ptr -10h
var_6= word ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 94h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+94h+var_4], eax
mov	eax, [esp+94h+arg_4]
mov	edx, [esp+94h+arg_C]
push	ebx
push	ebp
push	esi
mov	esi, [esp+0A0h+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [esp+0A4h+arg_8]
mov	dword ptr [esp+0A4h+var_78+4], ecx
lea	ebp, [edi-78h]
push	eax
mov	ecx, ebp
mov	[esp+0A8h+var_94], eax
mov	[esp+0A8h+var_7C], edx
call	sub_6593C0
mov	ebx, eax
mov	eax, dword ptr [esp+0A4h+var_78+4]
push	eax
lea	ecx, [esp+0A8h+var_90]
call	sub_652330
test	ebx, ebx
jl	short loc_6D3AA6
cmp	ebx, 15h
jle	short loc_6D3AF6

loc_6D3AA6:
test	esi, esi
jz	short loc_6D3AF6
mov	ecx, ebp
call	sub_6D1E00
test	eax, eax
jz	short loc_6D3AF6
mov	ecx, [edi+90h]
cmp	dword ptr [ecx+2Ch], 0
jz	short loc_6D3AF6
lea	edx, [esp+0A4h+var_6C]
push	edx
mov	edx, [esp+0A8h+var_94]
lea	eax, [esp+0A8h+var_90]
push	eax
push	edx
push	esi
mov	byte ptr [esp+0B4h+var_6C], 0
call	sub_664B00
test	al, al
jz	short loc_6D3AED
lea	eax, [esp+0A4h+var_6C]
push	eax
lea	ecx, [esp+0A8h+var_90]
call	sub_652520

loc_6D3AED:
lea	ecx, [esp+0A4h+var_6C]
call	sub_652830

loc_6D3AF6:
mov	eax, dword ptr [esp+0A4h+var_78+4]
mov	edx, [ebp+0]
mov	edx, [edx+11Ch]
push	0
push	eax
push	ebx
mov	ecx, ebp
call	edx
test	al, al
jnz	short loc_6D3B3E
lea	eax, [ebx-19h]
cmp	eax, 51h	; switch 82 cases
ja	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
movzx	eax, ds:byte_6D5390[eax]
jmp	ds:off_6D52A8[eax*4] ; switch jump

loc_6D3B29:		; jumptable 006D3B22 case 18
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebp
call	sub_6C44A0

loc_6D3B3E:
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3B4E:		; jumptable 006D3B22 case 19
mov	ecx, ebp
call	sub_654DD0
push	eax
push	esi
lea	edx, [esp+0ACh+var_78+4]
push	edx
lea	ecx, [esp+0B0h+var_90]
call	sub_6533A0
mov	cl, [edi+6Ch]
mov	eax, [ebp+0]
mov	eax, [eax+1D4h]
shr	cl, 1
and	cl, 1
movzx	edx, cl
mov	ecx, dword ptr [esp+0A4h+var_78+4]
push	1
push	edx
mov	edx, [ecx]
push	edx
mov	ecx, ebp
call	eax
mov	eax, dword ptr [esp+0A4h+var_78+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D3B9D
call	sub_650DF0

loc_6D3B9D:
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3BAD:		; jumptable 006D3B22 case 13
push	0
push	1
mov	ecx, ebp
call	sub_6CDED0
mov	ecx, ebp
call	sub_654DD0
push	eax
push	esi
lea	ecx, [esp+0ACh+var_78+4]
push	ecx
lea	ecx, [esp+0B0h+var_90]
call	sub_6533A0
mov	eax, dword ptr [esp+0A4h+var_78+4]
mov	ecx, [eax]
mov	edx, [ebp+0]
mov	edx, [edx+1D4h]
push	1
push	0
push	ecx
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+0A4h+var_78+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D3BFD
call	sub_650DF0

loc_6D3BFD:
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3C0D:		; jumptable 006D3B22 case 16
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
mov	ebx, eax
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
push	ecx
lea	ecx, [esp+0A8h+var_30]
call	sub_694320
mov	edx, [esp+0A4h+var_10]
mov	ecx, [edi+44h]
mov	esi, ebx
push	0FFFFFFFFh
and	edx, 0FF000000h
and	esi, offset sub_FFFFFF
push	0
lea	eax, [esp+0ACh+var_30]
or	edx, esi
mov	ebx, 1
or	[esp+0ACh+var_6], bx
push	eax
mov	[esp+0B0h+var_10], edx
call	sub_71E2D0
mov	ecx, [edi+44h]
mov	edx, [ecx+8]
mov	eax, [edx+1Ch]
push	eax
lea	ecx, [esp+0A8h+var_30]
call	sub_6C7EC0
mov	ecx, [esp+0A4h+var_10]
mov	eax, [edi+44h]
or	[esp+0A4h+var_6], bx
and	ecx, 0FF000000h
or	ecx, esi
lea	edx, [esp+0A4h+var_30]
mov	[esp+0A4h+var_10], ecx
mov	ecx, [eax+8]
push	edx
call	sub_729AF0
mov	ecx, ebp
call	sub_6C4920
lea	ecx, [esp+0A4h+var_30]
call	sub_694380
jmp	loc_6D5282

loc_6D3CBE:		; jumptable 006D3B22 case 21
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+0B0h+var_78+4]
push	ecx
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
cmp	byte ptr [esp+0A4h+var_90], 2
jnz	short loc_6D3CF4
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
test	al, al
jz	short loc_6D3CED
mov	eax, offset aLeft_0 ; "left"
jmp	short loc_6D3CFA

loc_6D3CED:		; "none"
mov	eax, offset aNone_0
jmp	short loc_6D3CFA

loc_6D3CF4:
mov	edx, dword ptr [esp+0A4h+var_78+4]
mov	eax, [edx]

loc_6D3CFA:
push	eax
lea	ecx, [esp+0A8h+var_94]
call	sub_67AE10
mov	eax, [edi+44h]
movzx	esi, byte ptr [eax+14Ch]
mov	bl, [edi+6Ch]
push	offset aNone_0	; "none"
lea	ecx, [esp+0A8h+var_94]
and	esi, 3
and	bl, 1
call	sub_654870
test	al, al
jz	short loc_6D3D41
mov	ecx, 0FFFEh
and	[ebp+0E4h], cx
mov	eax, [edi+44h]
and	byte ptr [eax+14Ch], 0FCh
jmp	short loc_6D3DB7

loc_6D3D41:
or	word ptr [ebp+0E4h], 1
push	offset aLeft_0	; "left"
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D3D67
mov	eax, [edi+44h]
and	byte ptr [eax+14Ch], 0FCh
jmp	short loc_6D3DB7

loc_6D3D67:		; "right"
push	offset aRight
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D3D90
mov	eax, [edi+44h]
mov	dl, [eax+14Ch]
and	dl, 0FDh
or	dl, 1
mov	[eax+14Ch], dl
jmp	short loc_6D3DB7

loc_6D3D90:		; "center"
push	offset aCenter
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D3DBE
mov	eax, [edi+44h]
mov	cl, [eax+14Ch]
and	cl, 0FEh
or	cl, 2
mov	[eax+14Ch], cl

loc_6D3DB7:
or	byte ptr [eax+150h], 1

loc_6D3DBE:
mov	edx, [edi+44h]
movzx	eax, byte ptr [edx+14Ch]
and	eax, 3
cmp	esi, eax
jnz	short loc_6D3DD9
mov	cl, [edi+6Ch]
and	cl, 1
cmp	bl, cl
jz	short loc_6D3DE0

loc_6D3DD9:
mov	ecx, ebp
call	sub_6CD910

loc_6D3DE0:
mov	ecx, ebp
call	sub_6C4920
lea	ecx, [esp+0A4h+var_94]
call	sub_4E40F0
mov	eax, dword ptr [esp+0A4h+var_78+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D3E06
call	sub_650DF0

loc_6D3E06:
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3E16:		; jumptable 006D3B22 case 22
mov	edx, [edi+44h]
mov	bl, [edx+14Eh]
shr	bl, 3
push	esi
lea	ecx, [esp+0A8h+var_90]
and	bl, 1
call	sub_651D80
cmp	al, bl
jz	short loc_6D3E4D
mov	ecx, [edi+44h]
test	al, al
jz	short loc_6D3E41
call	sub_71E020
jmp	short loc_6D3E46

loc_6D3E41:
call	sub_71E040

loc_6D3E46:
mov	ecx, ebp
call	sub_6CD910

loc_6D3E4D:
mov	ecx, ebp
call	sub_6C4920

loc_6D3E54:
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3E64:		; jumptable 006D3B22 case 23
mov	eax, [edi+44h]
mov	bl, [eax+14Eh]
shr	bl, 2
push	esi
lea	ecx, [esp+0A8h+var_90]
and	bl, 1
call	sub_651D80
cmp	bl, al
jz	short loc_6D3E4D
mov	edi, [edi+44h]
test	al, al
jz	short loc_6D3E91
or	byte ptr [edi+14Eh], 4
jmp	short loc_6D3E46

loc_6D3E91:
and	byte ptr [edi+14Eh], 0FBh
jmp	short loc_6D3E46

loc_6D3E9A:		; jumptable 006D3B22 case 24
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
neg	al
sbb	al, al
mov	[edi+57h], al
jmp	short loc_6D3E4D

loc_6D3EAD:		; jumptable 006D3B22 case 25
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+0B0h+var_70]
push	ecx
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
mov	eax, [esp+0A4h+var_70]
inc	dword ptr [eax+8]
mov	ecx, [edi+58h]
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	esi, eax
jnz	short loc_6D3ED7
call	sub_650DF0

loc_6D3ED7:
mov	eax, [esp+0A4h+var_70]
mov	ecx, eax
add	eax, 8
mov	[edi+58h], esi
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_6D3EEF
call	sub_650DF0

loc_6D3EEF:
mov	ecx, ebp
call	sub_6CD4E0
mov	edx, 4000h
or	[ebp+0E4h], dx
mov	eax, [ebp+0]
mov	edx, [eax+54h]
mov	ecx, ebp
call	edx
push	eax
mov	ecx, ebp
call	sub_6CE2D0
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3F24:		; jumptable 006D3B22 case 26
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, ebp
call	sub_6CE7F0
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3F49:		; jumptable 006D3B22 case 27
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
mov	edi, [edi+44h]
test	al, al
jz	short loc_6D3F71
and	byte ptr [edi+14Eh], 0DFh
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3F71:
or	byte ptr [edi+14Eh], 20h
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D3F88:		; jumptable 006D3B22 case 41
mov	bl, [edi+6Ch]
shr	bl, 2
push	esi
lea	ecx, [esp+0A8h+var_90]
and	bl, 1
call	sub_651D80
mov	byte ptr [esp+0A4h+var_78+4], al
cmp	bl, al
jz	loc_6D3E4D
mov	ecx, dword ptr [esp+0A4h+var_78+4]
push	ecx
mov	ecx, ebp
call	sub_6C44D0
cmp	byte ptr [esp+0A4h+var_78+4], 0
mov	eax, [edi+44h]
jz	short loc_6D3FD3
or	byte ptr [eax+14Eh], 10h
mov	edi, [edi+44h]
or	byte ptr [edi+150h], 2
jmp	loc_6D3E4D

loc_6D3FD3:
and	byte ptr [eax+14Eh], 0EFh
mov	edi, [edi+44h]
or	byte ptr [edi+150h], 2
jmp	loc_6D3E4D

loc_6D3FE9:		; jumptable 006D3B22 case 29
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653660
test	eax, eax
jge	short loc_6D3FF9
xor	eax, eax

loc_6D3FF9:
mov	ecx, [edi+44h]
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
push	edx
call	sub_71EF70
jmp	loc_6D3E4D

loc_6D400E:		; jumptable 006D3B22 case 30
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653660
cmp	eax, 1
jge	short loc_6D4022
mov	eax, 1

loc_6D4022:
mov	ecx, [edi+44h]
dec	eax
push	eax
call	sub_71EFD0
jmp	loc_6D3E4D

loc_6D4031:		; jumptable 006D3B22 case 33
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
neg	al
sbb	al, al
mov	[edi+53h], al
jmp	loc_6D3E4D

loc_6D4047:		; jumptable 006D3B22 case 34
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
sub	esp, 8
fstp	[esp+0ACh+var_AC]
call	sub_64A5D0
test	al, al
jnz	loc_6D3E4D
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
mov	ecx, [edi+50h]
and	eax, offset sub_FFFFFF
and	ecx, 0FF000000h
or	ecx, eax
mov	[edi+50h], ecx
jmp	loc_6D3E4D

loc_6D4086:		; jumptable 006D3B22 case 35
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
sub	esp, 8
fstp	[esp+0ACh+var_AC]
call	sub_64A5D0
test	al, al
jnz	loc_6D3E4D
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
mov	ecx, [edi+54h]
and	eax, offset sub_FFFFFF
and	ecx, 0FF000000h
or	ecx, eax
mov	[edi+54h], ecx
jmp	loc_6D3E4D

loc_6D40C5:		; jumptable 006D3B22 case 37
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+0B0h+var_94]
push	eax
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
cmp	byte ptr [esi+7Ch], 6
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
push	0
push	7
push	offset aDynamic	; "dynamic"
setnbe	byte ptr [esp+0B0h+var_7C]
call	sub_650E40
mov	ebx, eax
inc	dword ptr [ebx+8]
cmp	byte ptr [esp+0A4h+var_7C], 0
jz	short loc_6D410A
cmp	ebx, [esp+0A4h+var_94]
jmp	short loc_6D4130

loc_6D410A:
cmp	dword ptr [ebx+4], 0
jnz	short loc_6D4117
mov	ecx, ebx
call	sub_651580

loc_6D4117:
mov	ecx, [esp+0A4h+var_94]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6D412A
call	sub_651580
mov	ecx, [esp+0A4h+var_94]

loc_6D412A:
mov	edx, [ebx+4]
cmp	edx, [ecx+4]

loc_6D4130:
setz	byte ptr [esp+0A4h+var_7C]
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6D4142
mov	ecx, ebx
call	sub_650DF0

loc_6D4142:
cmp	byte ptr [esp+0A4h+var_7C], 0
jz	short loc_6D4164
mov	eax, [edi+44h]
mov	eax, [eax+11Ch]
test	eax, eax
jz	loc_6D41E6
or	word ptr [eax+68h], 1
jmp	loc_6D41E6

loc_6D4164:
cmp	byte ptr [esi+7Ch], 6
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
push	0
push	5
push	offset aInput	; "input"
setnbe	bl
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
test	bl, bl
jz	short loc_6D4191
cmp	esi, [esp+0A4h+var_94]
jmp	short loc_6D41B7

loc_6D4191:
cmp	dword ptr [esi+4], 0
jnz	short loc_6D419E
mov	ecx, esi
call	sub_651580

loc_6D419E:
mov	ecx, [esp+0A4h+var_94]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6D41B1
call	sub_651580
mov	ecx, [esp+0A4h+var_94]

loc_6D41B1:
mov	edx, [esi+4]
cmp	edx, [ecx+4]

loc_6D41B7:
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D41C7
mov	ecx, esi
call	sub_650DF0

loc_6D41C7:
test	bl, bl
jz	short loc_6D41E6
mov	ecx, ebp
call	sub_6C4AA0
test	al, al
jnz	short loc_6D41E6
mov	ecx, ebp
call	sub_6C49A0
mov	ecx, 0FFFEh
and	[eax+68h], cx

loc_6D41E6:
mov	edi, [edi+44h]
or	byte ptr [edi+150h], 1

loc_6D41F0:
mov	eax, [esp+0A4h+var_94]

loc_6D41F4:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_6D3E54
call	sub_650DF0
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D421A:		; jumptable 006D3B22 case 38
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fst	[esp+0A4h+var_6C]
sub	esp, 8
fstp	[esp+0ACh+var_AC]
call	sub_64A5D0
test	al, al
jnz	loc_6D3E54
fldz
fcomp	[esp+0A4h+var_6C]
fnstsw	ax
test	ah, 41h
jp	loc_6D3E54
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
lea	ecx, [esp+0A4h+var_90]
mov	[edi+110h], eax
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D426F:		; jumptable 006D3B22 case 39
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	edx, al
push	edx
mov	ecx, ebp
call	sub_6CD390
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4294:		; jumptable 006D3B22 case 28
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+0B0h+var_94]
push	eax
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
cmp	byte ptr [esi+7Ch], 6
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
push	0
push	6
push	offset aNormal	; "normal"
setnbe	byte ptr [esp+0B0h+var_7C]
call	sub_650E40
mov	ebx, eax
inc	dword ptr [ebx+8]
cmp	byte ptr [esp+0A4h+var_7C], 0
jz	short loc_6D42D9
cmp	ebx, [esp+0A4h+var_94]
jmp	short loc_6D42FF

loc_6D42D9:
cmp	dword ptr [ebx+4], 0
jnz	short loc_6D42E6
mov	ecx, ebx
call	sub_651580

loc_6D42E6:
mov	ecx, [esp+0A4h+var_94]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6D42F9
call	sub_651580
mov	ecx, [esp+0A4h+var_94]

loc_6D42F9:
mov	edx, [ebx+4]
cmp	edx, [ecx+4]

loc_6D42FF:
setz	byte ptr [esp+0A4h+var_7C]
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6D4311
mov	ecx, ebx
call	sub_650DF0

loc_6D4311:
cmp	byte ptr [esp+0A4h+var_7C], 0
jz	short loc_6D432E
mov	edi, [edi+44h]
and	byte ptr [edi+14Eh], 0BFh
mov	ecx, ebp
call	sub_6C4920
jmp	loc_6D41F0

loc_6D432E:
cmp	byte ptr [esi+7Ch], 6
mov	eax, [esi+78h]
mov	ecx, [eax+280h]
push	0
push	8
push	offset aAdvanced ; "advanced"
setnbe	bl
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
test	bl, bl
jz	short loc_6D435B
cmp	esi, [esp+0A4h+var_94]
jmp	short loc_6D4381

loc_6D435B:
cmp	dword ptr [esi+4], 0
jnz	short loc_6D4368
mov	ecx, esi
call	sub_651580

loc_6D4368:
mov	ecx, [esp+0A4h+var_94]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6D437B
call	sub_651580
mov	ecx, [esp+0A4h+var_94]

loc_6D437B:
mov	edx, [esi+4]
cmp	edx, [ecx+4]

loc_6D4381:
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D4391
mov	ecx, esi
call	sub_650DF0

loc_6D4391:
test	bl, bl
jz	short loc_6D439F
mov	edi, [edi+44h]
or	byte ptr [edi+14Eh], 40h

loc_6D439F:
mov	ecx, ebp
call	sub_6C4920
jmp	loc_6D41F0

loc_6D43AB:		; jumptable 006D3B22 case 40
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, ebp
call	sub_6C4500
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D43D0:		; jumptable 006D3B22 case 20
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	loc_6D4471
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 1Fh
jnz	short loc_6D4471
cmp	dword ptr [edi+74h], 0
lea	ebx, [edi+74h]
jnz	short loc_6D441E
push	30h
call	sub_7D2BC0
add	esp, 4
test	eax, eax
jz	short loc_6D4414
mov	ecx, eax
call	sub_6D2A90
jmp	short loc_6D4416

loc_6D4414:
xor	eax, eax

loc_6D4416:
push	eax
mov	ecx, ebx
call	sub_6D2EB0

loc_6D441E:
mov	ecx, [esi+8]
mov	ebx, [ebx]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_6D4438
call	sub_64B3B0

loc_6D4438:
mov	[ebx], esi
mov	edx, [edi+44h]
mov	eax, [edx+11Ch]
test	eax, eax
jz	short loc_6D444C
or	word ptr [eax+68h], 1

loc_6D444C:
mov	ecx, ebp
call	sub_6C4920
mov	ecx, ebp
call	sub_6D30D0
mov	ecx, ebp
call	sub_6C8060
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4471:
mov	edi, [edi+74h]
test	edi, edi
jz	short loc_6D4489
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6D4483
call	sub_64B3B0

loc_6D4483:
mov	dword ptr [edi], 0

loc_6D4489:
mov	ecx, ebp
call	sub_6D30D0
mov	ecx, ebp
call	sub_6C8060
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D44A7:		; jumptable 006D3B22 case 42
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
lea	ebx, [esi+78h]
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	ecx, ebp
call	sub_6C4920
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+0B0h+var_78+4]
push	ecx
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
cmp	dword ptr [edi+88h], 0
mov	edx, dword ptr [esp+0A4h+var_78+4]
mov	eax, [edx]
mov	[esp+0A4h+var_94], eax
jnz	short loc_6D4514
push	20h
call	sub_7D2BC0
add	esp, 4
test	eax, eax
jz	short loc_6D44FF
push	ebx
mov	ecx, eax
call	sub_6D17F0
jmp	short loc_6D4501

loc_6D44FF:
xor	eax, eax

loc_6D4501:
mov	[edi+88h], eax
test	eax, eax
jnz	short loc_6D4514
mov	eax, dword ptr [esp+0A4h+var_78+4]
jmp	loc_6D41F4

loc_6D4514:
mov	ecx, [edi+44h]
mov	eax, [ecx+13Ch]
mov	edx, [edi+88h]
and	eax, offset sub_FFFFFF
mov	[edx], al
mov	edx, [edi+88h]
mov	ecx, eax
shr	ecx, 8
mov	[edx+1], cl
mov	ecx, [edi+88h]
shr	eax, 10h
mov	[ecx+2], al
mov	eax, [edi+44h]
or	byte ptr [eax+12Bh], 1
mov	edi, edi

loc_6D4550:
mov	ecx, [edi+88h]
add	ecx, 8
call	sub_6D16A0
mov	ecx, [edi+88h]
add	ecx, 14h
call	sub_6D16A0
mov	ebx, [esp+0A4h+var_94]
xor	eax, eax

loc_6D4572:
mov	[esp+0A4h+var_7C], eax

loc_6D4576:
mov	cl, [ebx]
test	cl, cl
jz	loc_6D4749
cmp	cl, 73h
jz	loc_6D473A
cmp	cl, 53h
jz	loc_6D473A
cmp	cl, 74h
jz	loc_6D472B
cmp	cl, 54h
jz	loc_6D472B
cmp	cl, 7Bh
jnz	short loc_6D45C3
test	eax, eax
jz	short loc_6D45C3
mov	al, [ebx+1]
inc	ebx
mov	ebp, ebx
test	al, al
jz	short loc_6D45D7

loc_6D45B7:
cmp	al, 2Ch
jz	short loc_6D45D7
mov	al, [ebp+1]
inc	ebp
test	al, al
jnz	short loc_6D45B7

loc_6D45C3:
mov	edx, [edi+88h]
mov	eax, [edx+4]
mov	ecx, [eax]
mov	[esp+0A4h+var_94], ecx
jmp	loc_6D4550

loc_6D45D7:
cmp	byte ptr [ebp+0], 0
jz	short loc_6D45C3
mov	eax, ebp
sub	eax, ebx
cmp	eax, 17h
mov	dword ptr [esp+0A4h+var_78], eax
jg	short loc_6D45C3
mov	edx, eax
push	edx
lea	eax, [esp+0A8h+var_30]
push	ebx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, dword ptr [esp+0B0h+var_78]
add	esp, 0Ch
lea	edx, [esp+0A4h+var_30]
push	edx
lea	eax, [esp+0A8h+var_58]
mov	[esp+ecx+0A8h+var_30], 0
push	eax
mov	ecx, esi
call	sub_64AB70
mov	[esp+0A4h+var_50], 5
mov	eax, [eax]
mov	dword ptr [esp+0A4h+var_4C], eax
inc	dword ptr [eax+8]
push	esi
lea	ecx, [esp+0A8h+var_50]
call	sub_653400
fmul	ds:dbl_15FCE20
lea	ecx, [esp+0A4h+var_50]
fstp	dword ptr [esp+0A4h+var_78]
call	sub_652830
mov	eax, [esp+0A4h+var_58]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D4656
call	sub_650DF0

loc_6D4656:
mov	al, [ebp+1]
inc	ebp
mov	ecx, ebp
test	al, al
jz	loc_6D45C3

loc_6D4664:
cmp	al, 7Dh
jz	short loc_6D4684
mov	al, [ebp+1]
inc	ebp
test	al, al
jnz	short loc_6D4664
mov	edx, [edi+88h]
mov	eax, [edx+4]
mov	ecx, [eax]
mov	[esp+0A4h+var_94], ecx
jmp	loc_6D4550

loc_6D4684:
cmp	byte ptr [ebp+0], 0
jz	loc_6D45C3
mov	ebx, ebp
sub	ebx, ecx
cmp	ebx, 17h
jg	loc_6D45C3
push	ebx
push	ecx
lea	ecx, [esp+0ACh+var_30]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
lea	edx, [esp+0A4h+var_30]
push	edx
lea	eax, [esp+0A8h+var_5C]
push	eax
mov	ecx, esi
mov	[esp+ebx+0ACh+var_30], 0
call	sub_64AB70
mov	[esp+0A4h+var_40], 5
mov	eax, [eax]
mov	dword ptr [esp+0A4h+var_3C], eax
inc	dword ptr [eax+8]
push	esi
lea	ecx, [esp+0A8h+var_40]
call	sub_653400
fmul	ds:dbl_15FCE20
lea	ecx, [esp+0A4h+var_40]
fstp	[esp+0A4h+var_80]
call	sub_652830
mov	eax, [esp+0A4h+var_5C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D4701
call	sub_650DF0

loc_6D4701:
fld	dword ptr [esp+0A4h+var_78]
lea	ecx, [esp+0A4h+var_6C]
fstp	dword ptr [esp+0A4h+var_6C]
push	ecx
fld	[esp+0A8h+var_80]
mov	ecx, [esp+0A8h+var_7C]
fstp	dword ptr [esp+0A8h+var_6C+4]
lea	ebx, [ebp+1]
call	sub_6D1410
mov	eax, [esp+0A4h+var_7C]
jmp	loc_6D4576

loc_6D472B:
mov	eax, [edi+88h]
add	eax, 14h
inc	ebx
jmp	loc_6D4572

loc_6D473A:
mov	eax, [edi+88h]
add	eax, 8
inc	ebx
jmp	loc_6D4572

loc_6D4749:
mov	eax, [esp+0A4h+var_94]
cmp	byte ptr [eax],	0
jz	short loc_6D4793
push	eax
lea	edx, [esp+0A8h+var_54]
push	edx
mov	ecx, esi
call	sub_64AB70
mov	edi, [edi+88h]
mov	esi, [eax]
inc	dword ptr [esi+8]
mov	ecx, [edi+4]
add	edi, 4
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6D477B
call	sub_650DF0

loc_6D477B:
mov	[edi], esi
mov	eax, [esp+0A4h+var_54]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D4793
call	sub_650DF0

loc_6D4793:
mov	eax, dword ptr [esp+0A4h+var_78+4]
jmp	loc_6D41F4

loc_6D479C:		; jumptable 006D3B22 case 43
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	ecx, ebp
call	sub_6C4920
mov	ebx, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
push	eax
mov	ecx, ebx
call	sub_6CD7C0
mov	ecx, [edi+88h]
test	ecx, ecx
jz	loc_6D3E54
mov	edx, [edi+44h]
mov	eax, [edx+13Ch]
and	eax, offset sub_FFFFFF
mov	[ecx], al
mov	edx, [edi+88h]
mov	ecx, eax
shr	ecx, 8
mov	[edx+1], cl
mov	ecx, [edi+88h]
shr	eax, 10h
mov	[ecx+2], al
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4810:		; jumptable 006D3B22 case 44
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [ebp+0]
mov	edx, [eax+70h]
mov	ecx, ebp
call	edx
push	eax
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, ebp
call	sub_67DB20
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D484F:		; jumptable 006D3B22 case 45
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edx, [ebp+0]
mov	eax, [edx+70h]
mov	ecx, ebp
call	eax
push	eax
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebp
call	sub_6CD3F0
mov	edi, [edi+44h]
or	byte ptr [edi+150h], 2
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4898:		; jumptable 006D3B22 case 65
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
mov	edi, [edi+44h]
test	al, al
jz	short loc_6D48C5
or	byte ptr [edi+14Eh], 80h
jmp	loc_6D3E4D

loc_6D48C5:
and	byte ptr [edi+14Eh], 7Fh
jmp	loc_6D3E4D

loc_6D48D1:		; jumptable 006D3B22 case 66
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CE590
jmp	loc_6D3E4D

loc_6D4906:		; jumptable 006D3B22 case 67
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CE5E0
jmp	loc_6D3E4D

loc_6D493B:		; jumptable 006D3B22 case 68
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CE630
jmp	loc_6D3E4D

loc_6D4970:		; jumptable 006D3B22 case 69
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fnstcw	word ptr [esp+0A4h+var_7C]
movzx	eax, word ptr [esp+0A4h+var_7C]
or	eax, 0C00h
mov	[esp+0A4h+var_80], eax
fldcw	word ptr [esp+0A4h+var_80]
fistp	[esp+0A4h+var_80]
mov	cl, byte ptr [esp+0A4h+var_80]
mov	[edi+14Dh], cl
fldcw	word ptr [esp+0A4h+var_7C]
jmp	loc_6D3E4D

loc_6D49BA:		; jumptable 006D3B22 case 70
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, edi
call	sub_6CD180
jmp	loc_6D3E4D

loc_6D49E7:		; jumptable 006D3B22 case 71
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	edx, al
push	edx
mov	ecx, edi
call	sub_6CD1A0
jmp	loc_6D3E4D

loc_6D4A14:		; jumptable 006D3B22 case 73
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CE770
jmp	loc_6D3E4D

loc_6D4A53:		; jumptable 006D3B22 case 74
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CD2A0
jmp	loc_6D3E4D

loc_6D4A92:		; jumptable 006D3B22 case 75
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CE680
jmp	loc_6D3E4D

loc_6D4AD1:		; jumptable 006D3B22 case 76
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CE6D0
jmp	loc_6D3E4D

loc_6D4B10:		; jumptable 006D3B22 case 77
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CD300
jmp	loc_6D3E4D

loc_6D4B4F:		; jumptable 006D3B22 case 78
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, edi
call	sub_6CD260
jmp	loc_6D3E4D

loc_6D4B86:		; jumptable 006D3B22 case 79
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	edx, al
push	edx
mov	ecx, edi
call	sub_6CD240
jmp	loc_6D3E4D

loc_6D4BBD:		; jumptable 006D3B22 case 80
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
push	eax
mov	ecx, edi
call	sub_6CD280
jmp	loc_6D3E4D

loc_6D4BF1:		; jumptable 006D3B22 case 81
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
and	byte ptr [eax+12Bh], 0FEh
mov	edi, [edi+44h]
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
push	ecx		; float
mov	ecx, edi
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_6CE720
jmp	loc_6D3E4D

loc_6D4C30:		; jumptable 006D3B22 case 48
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+0B0h+var_78]
push	eax
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
mov	ecx, dword ptr [esp+0A4h+var_78]
mov	edx, [ecx]
push	edx
lea	ecx, [esp+0A8h+var_94]
call	sub_67AE10
push	offset aNone_0	; "none"
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4C83
mov	eax, [edi+44h]
and	byte ptr [eax+14Eh], 0FDh
push	0
jmp	short loc_6D4CCB

loc_6D4C83:
mov	ecx, [edi+44h]
call	sub_71E000
push	offset aTop_1	; "top"
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4CA1
push	1
jmp	short loc_6D4CCB

loc_6D4CA1:		; "bottom"
push	offset aBottom
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4CB7
push	2
jmp	short loc_6D4CCB

loc_6D4CB7:		; "center"
push	offset aCenter
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4CD3
push	3

loc_6D4CCB:
mov	ecx, [edi+44h]
call	sub_6CD370

loc_6D4CD3:
mov	eax, [ebp+0]
mov	edx, [eax+160h]
mov	ecx, ebp
call	edx

loc_6D4CE0:
mov	ecx, ebp
call	sub_6C4920
lea	ecx, [esp+0A4h+var_94]
call	sub_4E40F0
mov	eax, dword ptr [esp+0A4h+var_78]
jmp	loc_6D41F4

loc_6D4CF9:		; jumptable 006D3B22 case 49
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653400
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6D4D4D
fld	ds:dbl_15FCD88
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6D4D4D
fstp	[esp+0A4h+var_80]
push	ecx		; float
fld	[esp+0A8h+var_80]
mov	ecx, [edi+44h]
fstp	dword ptr [esp+0A8h+var_AC+4]
call	sub_71E8D0
mov	ecx, ebp
call	sub_6C4920
jmp	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64

loc_6D4D4D:
mov	ecx, ebp
fstp	st
call	sub_6C4920
jmp	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64

loc_6D4D5B:		; jumptable 006D3B22 case 50
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+0B0h+var_78]
push	edx
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
mov	eax, dword ptr [esp+0A4h+var_78]
mov	ecx, [eax]
push	ecx
lea	ecx, [esp+0A8h+var_94]
call	sub_67AE10
push	offset aNone_0	; "none"
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4DAF
mov	ecx, [edi+44h]
push	0
call	sub_6CD370
jmp	loc_6D4CE0

loc_6D4DAF:		; "top"
push	offset aTop_1
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4DD0
mov	ecx, [edi+44h]
push	1
call	sub_6CD370
jmp	loc_6D4CE0

loc_6D4DD0:		; "bottom"
push	offset aBottom
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4DF1
mov	ecx, [edi+44h]
push	2
call	sub_6CD370
jmp	loc_6D4CE0

loc_6D4DF1:		; "center"
push	offset aCenter
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	loc_6D4CE0
mov	ecx, [edi+44h]
push	3
call	sub_6CD370
jmp	loc_6D4CE0

loc_6D4E16:		; jumptable 006D3B22 case 51
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+0B0h+var_78]
push	eax
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
mov	ecx, dword ptr [esp+0A4h+var_78]
mov	edx, [ecx]
push	edx
lea	ecx, [esp+0A8h+var_94]
call	sub_67AE10
push	offset aNone_0	; "none"
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4E71
mov	edi, [edi+44h]
and	byte ptr [edi+14Ch], 0CFh
or	byte ptr [edi+150h], 1
jmp	loc_6D4CE0

loc_6D4E71:		; "shrink"
push	offset aShrink
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	short loc_6D4EA2
mov	edi, [edi+44h]
mov	al, [edi+14Ch]
and	al, 0DFh
or	al, 10h
mov	[edi+14Ch], al
or	byte ptr [edi+150h], 1
jmp	loc_6D4CE0

loc_6D4EA2:		; "fit"
push	offset aFit
lea	ecx, [esp+0A8h+var_94]
call	sub_654870
test	al, al
jz	loc_6D4CE0
mov	edi, [edi+44h]
mov	cl, [edi+14Ch]
and	cl, 0EFh
or	cl, 20h
mov	[edi+14Ch], cl
or	byte ptr [edi+150h], 1
jmp	loc_6D4CE0

loc_6D4ED9:		; jumptable 006D3B22 case 52
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [ebp+0]
mov	edx, [eax+70h]
mov	ecx, ebp
call	edx
push	eax
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	eax, al
push	eax
mov	ecx, ebp
call	sub_6CD420
mov	ecx, [edi+44h]
mov	eax, [ecx+11Ch]
test	eax, eax
jz	loc_6D3E54
test	byte ptr [edi+6Dh], 1
jz	short loc_6D4F34
or	word ptr [eax+68h], 4
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4F34:
mov	edx, 0FFFBh
and	[eax+68h], dx
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4F4D:		; jumptable 006D3B22 case 53
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edx, [ebp+0]
mov	eax, [edx+70h]
mov	ecx, ebp
call	eax
push	eax
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebp
call	sub_6CD450
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4F8C:		; jumptable 006D3B22 case 57
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
mov	ebx, [eax+11Ch]
test	ebx, ebx
jz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
mov	ecx, ebx
mov	[ebx+5Ch], eax
call	sub_72E890
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D4FD1:		; jumptable 006D3B22 case 56
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edx, [edi+44h]
mov	ebx, [edx+11Ch]
test	ebx, ebx
jz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
mov	ecx, ebx
mov	[ebx+58h], eax
call	sub_72E890
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D5016:		; jumptable 006D3B22 case 59
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	ecx, [edi+44h]
mov	ebx, [ecx+11Ch]
test	ebx, ebx
jz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
mov	ecx, ebx
mov	[ebx+64h], eax
call	sub_72E890
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D505B:		; jumptable 006D3B22 case 58
mov	edx, [esi+78h]
cmp	byte ptr [edx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	eax, [edi+44h]
mov	ebx, [eax+11Ch]
test	ebx, ebx
jz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_653750
mov	ecx, ebx
mov	[ebx+60h], eax
call	sub_72E890
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D50A0:		; jumptable 006D3B22 case 60
mov	ecx, [esi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D5269	; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	edx, al
push	edx
mov	ecx, ebp
call	sub_6CD480
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D50D5:		; jumptable 006D3B22 case 61
mov	eax, [esi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	short loc_6D5106 ; jumptable 006D3B22 case 0
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_651D80
movzx	ecx, al
push	ecx
mov	ecx, ebp
call	sub_6CD4B0
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D5106:		; jumptable 006D3B22 case 0
push	esi
lea	ecx, [esp+0A8h+var_90]
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_6D3E54
mov	ecx, [esi+78h]
push	2
call	sub_66FB00
mov	edx, [ebx+10h]
push	1
lea	ecx, [ebx+10h]
push	eax
mov	eax, [edx+48h]
push	esi
call	eax
test	al, al
jz	loc_6D3E54
lea	ecx, [esp+0A4h+var_30]
call	sub_6CE4E0
xor	eax, eax
cmp	[ebx+3Ch], eax
mov	byte ptr [esp+0A4h+var_7C], 0
mov	dword ptr [esp+0A4h+var_78], eax
jle	loc_6D51D7

loc_6D5158:
mov	ecx, [ebx+38h]
mov	ecx, [ecx+eax*4]
test	ecx, ecx
jz	short loc_6D519D
push	esi
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_6D519D
mov	ecx, [esi+78h]
push	25h
call	sub_66FB00
mov	edx, [edi+10h]
push	1
lea	ecx, [edi+10h]
push	eax
mov	eax, [edx+48h]
push	esi
call	eax
test	al, al
jz	short loc_6D519D
add	edi, 34h
push	edi
lea	ecx, [esp+0A8h+var_30]
call	sub_7064F0
mov	byte ptr [esp+0A4h+var_7C], 1

loc_6D519D:
mov	eax, dword ptr [esp+0A4h+var_78]
inc	eax
cmp	eax, [ebx+3Ch]
mov	dword ptr [esp+0A4h+var_78], eax
jl	short loc_6D5158
cmp	byte ptr [esp+0A4h+var_7C], 0
jz	short loc_6D51D7
mov	edx, [ebp+0]
mov	edx, [edx+1D0h]
lea	eax, [esp+0A4h+var_30]
push	eax
mov	ecx, ebp
call	edx
mov	ecx, ebp
call	sub_6C4920
mov	eax, [ebp+0]
mov	edx, [eax+20h]
push	0
mov	ecx, ebp
call	edx

loc_6D51D7:
lea	ecx, [esp+0A4h+var_30]
call	sub_64A3F0
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, 1
jmp	loc_6D528D

loc_6D51F0:		; jumptable 006D3B22 case 72
mov	al, byte ptr [esp+0A4h+var_90]
cmp	al, 1
jz	short loc_6D5237
test	al, al
jz	short loc_6D5237
cmp	al, 0Ah
jz	short loc_6D5237
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+0B0h+var_78]
push	eax
lea	ecx, [esp+0B4h+var_90]
call	sub_652F60
lea	ecx, [esp+0A4h+var_78]
push	ecx
mov	ecx, ebp
call	sub_6D2920
mov	eax, dword ptr [esp+0A4h+var_78]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D5269 ; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
call	sub_650DF0
jmp	short loc_6D5269 ; default
			; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64

loc_6D5237:
mov	ebx, [edi+8Ch]
test	ebx, ebx
jz	short loc_6D525F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_6D525F:
mov	dword ptr [edi+8Ch], 0

loc_6D5269:		; default
mov	eax, [esp+0A4h+var_7C] ; jumptable 006D3B22 cases 1-12,14,15,17,31,32,36,46,47,54,55,62-64
mov	edx, [esp+0A4h+var_94]
push	eax
lea	ecx, [esp+0A8h+var_90]
push	ecx
push	edx
push	esi
mov	ecx, edi
call	sub_659B90
mov	bl, al

loc_6D5282:
lea	ecx, [esp+0A4h+var_90]
call	sub_652830
mov	al, bl

loc_6D528D:
mov	ecx, [esp+0A4h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 94h
retn	10h
sub_6D3A40 endp

off_6D52A8 dd offset loc_6D5106, offset	loc_6D3BAD ; jump table	for switch statement
dd offset loc_6D3C0D, offset loc_6D3B29
dd offset loc_6D3B4E, offset loc_6D43D0
dd offset loc_6D3CBE, offset loc_6D3E16
dd offset loc_6D3E64, offset loc_6D3E9A
dd offset loc_6D3EAD, offset loc_6D3F24
dd offset loc_6D3F49, offset loc_6D4294
dd offset loc_6D3FE9, offset loc_6D400E
dd offset loc_6D4031, offset loc_6D4047
dd offset loc_6D4086, offset loc_6D40C5
dd offset loc_6D421A, offset loc_6D426F
dd offset loc_6D43AB, offset loc_6D3F88
dd offset loc_6D44A7, offset loc_6D479C
dd offset loc_6D4810, offset loc_6D484F
dd offset loc_6D4C30, offset loc_6D4CF9
dd offset loc_6D4D5B, offset loc_6D4E16
dd offset loc_6D4ED9, offset loc_6D4F4D
dd offset loc_6D4FD1, offset loc_6D4F8C
dd offset loc_6D505B, offset loc_6D5016
dd offset loc_6D50A0, offset loc_6D50D5
dd offset loc_6D4898, offset loc_6D48D1
dd offset loc_6D4906, offset loc_6D493B
dd offset loc_6D4970, offset loc_6D49BA
dd offset loc_6D49E7, offset loc_6D51F0
dd offset loc_6D4A14, offset loc_6D4A53
dd offset loc_6D4A92, offset loc_6D4AD1
dd offset loc_6D4B10, offset loc_6D4B4F
dd offset loc_6D4B86, offset loc_6D4BBD
dd offset loc_6D4BF1, offset loc_6D5269
byte_6D5390 db	    0,	 39h,	39h,   39h ; indirect table for	switch statement
db    39h,   39h,   39h,   39h
db    39h,   39h,   39h,   39h
db    39h,     1,   39h,   39h
db	2,   39h,     3,     4
db	5,     6,     7,     8
db	9,   0Ah,   0Bh,   0Ch
db    0Dh,   0Eh,   0Fh,   39h
db    39h,   10h,   11h,   12h
db    39h,   13h,   14h,   15h
db    16h,   17h,   18h,   19h
db    1Ah,   1Bh,   39h,   39h
db    1Ch,   1Dh,   1Eh,   1Fh
db    20h,   21h,   39h,   39h
db    22h,   23h,   24h,   25h
db    26h,   27h,   39h,   39h
db    39h,   28h,   29h,   2Ah
db    2Bh,   2Ch,   2Dh,   2Eh
db    2Fh,   30h,   31h,   32h
db    33h,   34h,   35h,   36h
db    37h,   38h
align 10h



sub_6D53F0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+8Ch]
test	ebp, ebp
jz	short loc_6D5431
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_6D5431
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_6D5431
add	eax, 4
jnz	short loc_6D54AA

loc_6D5431:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_739F00
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_6D546F
call	sub_64B3B0

loc_6D546F:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_6D54AA:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_6D53F0 endp

align 10h



sub_6D54C0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6D5523
push	offset nullsub_2
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
push	7
push	offset off_143AAF0
lea	ecx, [esp+2Ch+var_18]
lea	eax, [edi+10h]
push	ecx
push	eax
mov	dword ptr [edi], offset	off_143AB88
mov	dword ptr [eax], offset	off_1439710
call	sub_66FC60
add	esp, 10h
mov	eax, edi
jmp	short loc_6D5525

loc_6D5523:
xor	eax, eax

loc_6D5525:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	5Ch
call	eax
mov	ebx, eax
test	ebx, ebx
jz	loc_6D5610
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebx
call	sub_6CAF70
mov	ebx, eax
test	ebx, ebx
jz	short loc_6D557B
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6D557B:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebx
mov	[esp+2Ch+arg_0], 0Ah
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6D55A9
call	sub_64B3B0

loc_6D55A9:
mov	eax, [esi+2ACh]
push	ebp
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	ebp, [eax]
push	edx
push	edi
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	ebp, 28h
call	sub_651E70
mov	edx, [ebp+0]
push	eax
lea	eax, [esi+30h]
push	eax
lea	ecx, [esp+34h+var_18]
push	ecx
mov	ecx, [esp+38h+arg_0]
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	eax
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, esi
call	sub_6D53F0
pop	ebp
test	ebx, ebx
jz	short loc_6D5607
mov	ecx, ebx
call	sub_64B3B0

loc_6D5607:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 18h
retn

loc_6D5610:
xor	ebx, ebx
jmp	loc_6D557B
sub_6D54C0 endp

align 10h



sub_6D5620 proc	near

Src= dword ptr	4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_14]
mov	edx, dword ptr [esp+arg_10]
push	eax		; int
movzx	eax, [esp+4+arg_4]
neg	eax
sbb	eax, eax
push	edx		; char
xor	edx, edx
and	eax, 2
cmp	[esp+8+arg_8], dl
setnz	dl
or	eax, edx
movzx	edx, [esp+8+arg_C]
neg	edx
sbb	edx, edx
and	edx, 10h
or	eax, edx
push	eax		; int
mov	eax, [esp+0Ch+Src]
push	eax		; Src
call	sub_6F5D60
retn	18h
sub_6D5620 endp

align 10h



sub_6D5660 proc	near

arg_0= byte ptr	 4

movzx	eax, [esp+arg_0]
mov	edx, [ecx+20h]
shl	eax, 18h
and	edx, offset sub_FFFFFF
or	eax, edx
mov	[ecx+20h], eax
mov	eax, 400h
or	[ecx+2Ah], ax
retn	4
sub_6D5660 endp

align 10h



sub_6D5690 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_67A720
mov	eax, 0FEFFh
and	[esi+2Ah], ax
pop	esi
retn
sub_6D5690 endp

align 10h



sub_6D56B0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
mov	edx, 80h
jz	short loc_6D56CC
mov	eax, 8000h
or	[ecx+16h], ax
or	[ecx+16h], dx
retn	4

loc_6D56CC:
mov	eax, 7FFFh
and	[ecx+16h], ax
or	[ecx+16h], dx
retn	4
sub_6D56B0 endp

align 10h



sub_6D56E0 proc	near
movzx	eax, word ptr [ecx+16h]
mov	cl, al
shr	cl, 7
test	cl, 1
jz	short loc_6D56FB
test	eax, 8000h
jz	short loc_6D56FB
mov	eax, 1
retn

loc_6D56FB:
xor	eax, eax
retn
sub_6D56E0 endp

align 10h



sub_6D5700 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_7002C0
or	word ptr [esi+16h], 40h
pop	esi
retn	4
sub_6D5700 endp

align 10h



sub_6D5720 proc	near
push	esi
mov	esi, ecx
call	sub_6FFB90
mov	eax, 0FFBFh
and	[esi+16h], ax
pop	esi
retn
sub_6D5720 endp

align 10h



; int __stdcall	sub_6D5740(float)
sub_6D5740 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
push	esi
fmul	ds:dbl_15FCE20
mov	esi, ecx
call	__ftol2_sse
or	word ptr [esi+2Ah], 2
mov	[esi+24h], ax
pop	esi
retn	4
sub_6D5740 endp

align 10h



; int __stdcall	sub_6D5760(float)
sub_6D5760 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld	[esp+4+arg_0]
fcom	ds:dbl_143B5D0
fnstsw	ax
test	ah, 5
jp	short loc_6D57A7
fmul	ds:dbl_15FCE20
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
or	eax, 0C00h
or	word ptr [ecx+2Ah], 8
mov	[esp+4+var_4], eax
fldcw	word ptr [esp+4+var_4]
fistp	[esp+4+var_4]
mov	ax, word ptr [esp+4+var_4]
movzx	eax, ax
mov	[ecx+26h], ax
fldcw	word ptr [esp+4+arg_0]
pop	ecx
retn	4

loc_6D57A7:
or	word ptr [ecx+2Ah], 8
fstp	st
mov	eax, 0FFFFh
mov	[ecx+26h], ax
pop	ecx
retn	4
sub_6D5760 endp

align 10h



sub_6D57C0 proc	near

var_60=	qword ptr -60h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	qword ptr -3Ch
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	qword ptr -2Ch
var_20=	byte ptr -20h
var_1C=	qword ptr -1Ch
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 48h
push	ebx
push	ebp
push	esi
mov	esi, [esp+54h+arg_8]
push	edi
mov	ebx, ecx
push	esi
lea	ecx, [esp+5Ch+var_30]
call	sub_652330
mov	eax, [esp+58h+arg_4]
mov	ecx, [eax]
mov	edx, [ecx]
mov	edi, offset aAlign_0 ; "align"
mov	eax, edx

loc_6D57E6:
mov	cl, [eax]
cmp	cl, [edi]
jnz	short loc_6D5806
test	cl, cl
jz	short loc_6D5802
mov	cl, [eax+1]
cmp	cl, [edi+1]
jnz	short loc_6D5806
add	eax, 2
add	edi, 2
test	cl, cl
jnz	short loc_6D57E6

loc_6D5802:
xor	eax, eax
jmp	short loc_6D580B

loc_6D5806:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6D580B:
mov	ebp, [esp+58h+arg_0]
test	eax, eax
jnz	loc_6D5933
push	0
push	0FFFFFFFFh
push	ebp
lea	edx, [esp+64h+var_48]
push	edx
mov	ecx, esi
call	sub_652F60
mov	edi, [esp+58h+var_48]
mov	edx, [edi]
mov	esi, offset aLeft_0 ; "left"
mov	eax, edx

loc_6D5835:
mov	cl, [eax]
cmp	cl, [esi]
jnz	short loc_6D5855
test	cl, cl
jz	short loc_6D5851
mov	cl, [eax+1]
cmp	cl, [esi+1]
jnz	short loc_6D5855
add	eax, 2
add	esi, 2
test	cl, cl
jnz	short loc_6D5835

loc_6D5851:
xor	eax, eax
jmp	short loc_6D585A

loc_6D5855:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6D585A:
test	eax, eax
jnz	short loc_6D5877
mov	ax, [ebx+66h]
mov	ecx, 0F9FFh
and	ax, cx
or	ax, 1
mov	[ebx+66h], ax
jmp	loc_6D5919

loc_6D5877:		; "right"
mov	esi, offset aRight
mov	eax, edx
mov	edi, edi

loc_6D5880:
mov	cl, [eax]
cmp	cl, [esi]
jnz	short loc_6D58A0
test	cl, cl
jz	short loc_6D589C
mov	cl, [eax+1]
cmp	cl, [esi+1]
jnz	short loc_6D58A0
add	eax, 2
add	esi, 2
test	cl, cl
jnz	short loc_6D5880

loc_6D589C:
xor	eax, eax
jmp	short loc_6D58A5

loc_6D58A0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6D58A5:
test	eax, eax
jnz	short loc_6D58C3
mov	dx, [ebx+66h]
mov	eax, 0FBFFh
and	dx, ax
mov	ecx, 201h
or	dx, cx
mov	[ebx+66h], dx
jmp	short loc_6D5919

loc_6D58C3:		; "center"
push	offset aCenter
lea	ecx, [esp+5Ch+var_48]
call	sub_67DA70
test	al, al
jz	short loc_6D58E0
mov	edx, 601h
or	[ebx+66h], dx
jmp	short loc_6D5919

loc_6D58E0:		; "justify"
push	offset aJustify_0
lea	ecx, [esp+5Ch+var_48]
call	sub_67DA70
test	al, al
jz	short loc_6D58FE
push	2
lea	ecx, [ebx+50h]
call	sub_6C4440
jmp	short loc_6D5919

loc_6D58FE:
mov	eax, 0F9FEh
and	[ebx+66h], ax
lea	ecx, [esp+58h+var_30]
call	sub_652060
mov	edi, [esp+58h+var_48]
mov	[esp+58h+var_30], 1

loc_6D5919:
mov	ecx, edi
lea	eax, [edi+8]

loc_6D591E:
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	loc_6D6283
call	sub_650DF0
jmp	loc_6D6283

loc_6D5933:		; "blockIndent"
mov	edi, offset aBlockindent
mov	eax, edx
lea	ebx, [ebx+0]

loc_6D5940:
mov	cl, [eax]
cmp	cl, [edi]
jnz	short loc_6D5960
test	cl, cl
jz	short loc_6D595C
mov	cl, [eax+1]
cmp	cl, [edi+1]
jnz	short loc_6D5960
add	eax, 2
add	edi, 2
test	cl, cl
jnz	short loc_6D5940

loc_6D595C:
xor	eax, eax
jmp	short loc_6D5965

loc_6D5960:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6D5965:
test	eax, eax
jnz	short loc_6D59E5
mov	al, [esi]
cmp	al, 1
jz	short loc_6D59D1
test	al, al
jz	short loc_6D59D1
cmp	al, 0Ah
jz	short loc_6D59D1
push	ebp
mov	ecx, esi
call	sub_653660
cmp	[esp+58h+var_30], 5
mov	esi, eax
mov	[esp+58h+arg_0], esi
jb	short loc_6D5995
lea	ecx, [esp+58h+var_30]
call	sub_652060

loc_6D5995:
fild	[esp+58h+arg_0]
mov	[esp+58h+var_30], 3
fstp	[esp+58h+var_2C]
test	esi, esi
jge	short loc_6D59B6
xor	esi, esi
or	word ptr [ebx+66h], 2
mov	[ebx+5Ch], si
jmp	loc_6D6283

loc_6D59B6:
cmp	esi, 2D0h
jle	short loc_6D59C3
mov	esi, 2D0h

loc_6D59C3:
or	word ptr [ebx+66h], 2
mov	[ebx+5Ch], si
jmp	loc_6D6283

loc_6D59D1:
xor	ecx, ecx
mov	edx, 0FFFDh
and	[ebx+66h], dx
mov	[ebx+5Ch], cx
jmp	loc_6D6275

loc_6D59E5:		; "bold"
mov	edi, offset aBold_1
mov	eax, edx
lea	esp, [esp+0]

loc_6D59F0:
mov	cl, [eax]
cmp	cl, [edi]
jnz	short loc_6D5A10
test	cl, cl
jz	short loc_6D5A0C
mov	cl, [eax+1]
cmp	cl, [edi+1]
jnz	short loc_6D5A10
add	eax, 2
add	edi, 2
test	cl, cl
jnz	short loc_6D59F0

loc_6D5A0C:
xor	eax, eax
jmp	short loc_6D5A15

loc_6D5A10:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6D5A15:
test	eax, eax
jnz	short loc_6D5A61
mov	al, [esi]
cmp	al, 1
jz	short loc_6D5A4F
test	al, al
jz	short loc_6D5A4F
cmp	al, 0Ah
jz	short loc_6D5A4F
push	ebp
mov	ecx, esi
call	sub_651D80
mov	byte ptr [esp+58h+arg_0], al
mov	esi, [esp+58h+arg_0]
push	esi
lea	ecx, [esp+5Ch+var_30]
call	sub_64A6C0
push	esi
lea	ecx, [ebx+24h]
call	sub_701310
jmp	loc_6D6283

loc_6D5A4F:
and	byte ptr [ebx+4Ch], 0FEh
mov	eax, 0FFEFh
and	[ebx+4Eh], ax
jmp	loc_6D6275

loc_6D5A61:
mov	edi, [esp+58h+arg_4]
push	offset aBullet	; "bullet"
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5ABB
cmp	byte ptr [esi],	1
jz	short loc_6D5AAD
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5AAD
push	ebp
mov	ecx, esi
call	sub_651D80
mov	byte ptr [esp+58h+arg_0], al
mov	esi, [esp+58h+arg_0]
push	esi
lea	ecx, [esp+5Ch+var_30]
call	sub_64A6C0
push	esi
lea	ecx, [ebx+50h]
call	sub_6D56B0
jmp	loc_6D6283

loc_6D5AAD:
mov	ecx, 7F7Fh
and	[ebx+66h], cx
jmp	loc_6D6275

loc_6D5ABB:		; "color"
push	offset aColor
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5B30
cmp	byte ptr [esi],	1
jz	short loc_6D5B1F
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5B1F
push	ebp
mov	ecx, esi
call	sub_653660
mov	esi, eax
mov	edx, esi
mov	[esp+58h+arg_0], edx
fild	[esp+58h+arg_0]
test	edx, edx
jge	short loc_6D5AF9
fadd	ds:dbl_15FCE08

loc_6D5AF9:
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
mov	eax, [ebx+44h]
xor	eax, esi
and	eax, offset sub_FFFFFF
xor	[ebx+44h], eax
or	word ptr [ebx+4Eh], 1
jmp	loc_6D6283

loc_6D5B1F:
mov	dword ptr [ebx+44h], 0FF000000h
mov	ecx, 0FFFEh
jmp	loc_6D6271

loc_6D5B30:		; "font"
push	offset aFont
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5B9C
cmp	byte ptr [esi],	1
jz	short loc_6D5B8E
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5B8E
push	0
push	0FFFFFFFFh
push	ebp
lea	edx, [esp+64h+var_44]
push	edx
mov	ecx, esi
call	sub_652F60
lea	eax, [esp+58h+var_44]
push	eax
lea	ecx, [esp+5Ch+var_30]
call	sub_64A680
mov	ecx, [esp+58h+var_44]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [ebx+24h]
call	sub_7010A0
mov	eax, [esp+58h+var_44]
mov	ecx, eax
add	eax, 8
jmp	loc_6D591E

loc_6D5B8E:
mov	eax, 0EFFBh
and	[ebx+4Eh], ax
jmp	loc_6D6275

loc_6D5B9C:		; "indent"
push	offset aIndent
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5C27
cmp	byte ptr [esi],	1
jz	short loc_6D5C13
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5C13
push	ebp
mov	ecx, esi
call	sub_653660
mov	esi, eax
mov	[esp+58h+arg_0], esi
fild	[esp+58h+arg_0]
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
cmp	esi, 0FFFFFD30h
jge	short loc_6D5BF8
or	word ptr [ebx+66h], 4
mov	esi, 0FFFFFD30h
mov	[ebx+5Eh], si
jmp	loc_6D6283

loc_6D5BF8:
cmp	esi, 2D0h
jle	short loc_6D5C05
mov	esi, 2D0h

loc_6D5C05:
or	word ptr [ebx+66h], 4
mov	[ebx+5Eh], si
jmp	loc_6D6283

loc_6D5C13:
xor	ecx, ecx
mov	edx, 0FFFBh
and	[ebx+66h], dx
mov	[ebx+5Eh], cx
jmp	loc_6D6275

loc_6D5C27:		; "italic"
push	offset aItalic_1
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5C81
cmp	byte ptr [esi],	1
jz	short loc_6D5C6F
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5C6F
push	ebp
mov	ecx, esi
call	sub_651D80
mov	byte ptr [esp+58h+arg_0], al
mov	esi, [esp+58h+arg_0]
push	esi
lea	ecx, [esp+5Ch+var_30]
call	sub_64A6C0
push	esi
lea	ecx, [ebx+24h]
call	sub_701360
jmp	loc_6D6283

loc_6D5C6F:
and	byte ptr [ebx+4Ch], 0FDh
mov	eax, 0FFDFh
and	[ebx+4Eh], ax
jmp	loc_6D6275

loc_6D5C81:		; "leading"
push	offset aLeading
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5D0C
cmp	byte ptr [esi],	1
jz	short loc_6D5CF8
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5CF8
push	ebp
mov	ecx, esi
call	sub_653660
mov	esi, eax
mov	[esp+58h+arg_0], esi
fild	[esp+58h+arg_0]
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
cmp	esi, 0FFFFFD30h
jge	short loc_6D5CDD
or	word ptr [ebx+66h], 8
mov	esi, 0FFFFFD30h
mov	[ebx+60h], si
jmp	loc_6D6283

loc_6D5CDD:
cmp	esi, 2D0h
jle	short loc_6D5CEA
mov	esi, 2D0h

loc_6D5CEA:
or	word ptr [ebx+66h], 8
mov	[ebx+60h], si
jmp	loc_6D6283

loc_6D5CF8:
xor	ecx, ecx
mov	edx, 0FFF7h
and	[ebx+66h], dx
mov	[ebx+60h], cx
jmp	loc_6D6275

loc_6D5D0C:		; "leftMargin"
push	offset aLeftmargin
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5D90
cmp	byte ptr [esi],	1
jz	short loc_6D5D7C
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5D7C
push	ebp
mov	ecx, esi
call	sub_653660
mov	esi, eax
mov	[esp+58h+arg_0], esi
fild	[esp+58h+arg_0]
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
test	esi, esi
jge	short loc_6D5D61
xor	esi, esi
or	word ptr [ebx+66h], 10h
mov	[ebx+62h], si
jmp	loc_6D6283

loc_6D5D61:
cmp	esi, 2D0h
jle	short loc_6D5D6E
mov	esi, 2D0h

loc_6D5D6E:
or	word ptr [ebx+66h], 10h
mov	[ebx+62h], si
jmp	loc_6D6283

loc_6D5D7C:
xor	eax, eax
mov	ecx, 0FFEFh
and	[ebx+66h], cx
mov	[ebx+62h], ax
jmp	loc_6D6275

loc_6D5D90:		; "rightMargin"
push	offset aRightmargin
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D5E14
cmp	byte ptr [esi],	1
jz	short loc_6D5E00
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5E00
push	ebp
mov	ecx, esi
call	sub_653660
mov	esi, eax
mov	[esp+58h+arg_0], esi
fild	[esp+58h+arg_0]
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
test	esi, esi
jge	short loc_6D5DE5
xor	esi, esi
or	word ptr [ebx+66h], 20h
mov	[ebx+64h], si
jmp	loc_6D6283

loc_6D5DE5:
cmp	esi, 2D0h
jle	short loc_6D5DF2
mov	esi, 2D0h

loc_6D5DF2:
or	word ptr [ebx+66h], 20h
mov	[ebx+64h], si
jmp	loc_6D6283

loc_6D5E00:
xor	edx, edx
mov	eax, 0FFDFh
and	[ebx+66h], ax
mov	[ebx+64h], dx
jmp	loc_6D6275

loc_6D5E14:		; "size"
push	offset aSize
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	loc_6D5EB7
cmp	byte ptr [esi],	1
jz	short loc_6D5EA3
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D5EA3
push	ebp
mov	ecx, esi
call	sub_653660
mov	esi, eax
mov	[esp+58h+arg_0], esi
fild	[esp+58h+arg_0]
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
test	esi, esi
jl	loc_6D6283
cmp	esi, 80h
jge	short loc_6D5E8C
mov	[esp+58h+arg_0], esi
fild	[esp+58h+arg_0]
test	esi, esi
jge	short loc_6D5E7B
fadd	ds:flt_15FCC08

loc_6D5E7B:		; float
push	ecx
lea	ecx, [ebx+24h]
fstp	dword ptr [esp+5Ch+var_60+4]
call	sub_6D5760
jmp	loc_6D6283

loc_6D5E8C:
fld	ds:flt_143B608
push	ecx		; float
lea	ecx, [ebx+24h]
fstp	dword ptr [esp+5Ch+var_60+4]
call	sub_6D5760
jmp	loc_6D6283

loc_6D5EA3:
xor	ecx, ecx
mov	edx, 0FFF7h
and	[ebx+4Eh], dx
mov	[ebx+4Ah], cx
jmp	loc_6D6275

loc_6D5EB7:		; "tabStops"
push	offset aTabstops_0
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	loc_6D5FF4
cmp	byte ptr [esi],	1
jz	loc_6D5FE7
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	loc_6D5FE7
cmp	byte ptr [esi],	6
jnz	loc_6D6283
push	ebp
mov	ecx, esi
call	sub_652C20
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 7
jnz	loc_6D6283
push	ebp
mov	ecx, esi
call	sub_652C20
mov	edi, eax
mov	eax, [edi+3Ch]
lea	ecx, [ebx+50h]
push	eax
call	sub_6D5700
mov	eax, [edi+3Ch]
xor	esi, esi
mov	[esp+58h+var_34], eax
test	eax, eax
jle	short loc_6D5FA6
lea	ebx, [ebx+0]

loc_6D5F30:
mov	ecx, [edi+38h]
mov	edx, [esp+58h+arg_0]
mov	ecx, [ecx+esi*4]
push	edx
call	sub_653400
fnstcw	word ptr [esp+58h+arg_8]
movzx	eax, word ptr [esp+58h+arg_8]
or	eax, 0C00h
mov	dword ptr [esp+58h+var_3C], eax
mov	[esp+58h+var_20], 3
fldcw	word ptr [esp+58h+var_3C]
fistp	[esp+58h+var_3C]
mov	ebp, dword ptr [esp+58h+var_3C]
mov	eax, ebp
fldcw	word ptr [esp+58h+arg_8]
mov	[esp+58h+arg_8], eax
fild	[esp+58h+arg_8]
test	eax, eax
jge	short loc_6D5F7B
fadd	ds:dbl_15FCE08

loc_6D5F7B:
lea	ecx, [esp+58h+var_20]
fstp	[esp+58h+var_1C]
push	ecx
push	esi
mov	ecx, edi
call	sub_65DA40
lea	ecx, [esp+58h+var_20]
call	sub_652830
push	ebp
push	esi
lea	ecx, [ebx+50h]
call	sub_6FFB70
inc	esi
cmp	esi, [esp+58h+var_34]
jl	short loc_6D5F30

loc_6D5FA6:
mov	edx, [esp+58h+arg_C]
push	edx
push	edi
lea	ecx, [esp+60h+var_10]
call	sub_652700
mov	ecx, [esp+5Ch+arg_0]
push	eax
mov	eax, [esp+60h+arg_4]
push	eax
push	ecx
mov	ecx, ebx
call	sub_665190
lea	ecx, [esp+58h+var_10]
mov	bl, al
call	sub_652830
lea	ecx, [esp+58h+var_30]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 48h
retn	10h

loc_6D5FE7:
lea	ecx, [ebx+50h]
call	sub_6D5720
jmp	loc_6D6275

loc_6D5FF4:		; "underline"
push	offset aUnderline
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D604E
cmp	byte ptr [esi],	1
jz	short loc_6D603C
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D603C
push	ebp
mov	ecx, esi
call	sub_651D80
mov	byte ptr [esp+58h+arg_0], al
mov	esi, [esp+58h+arg_0]
push	esi
lea	ecx, [esp+5Ch+var_30]
call	sub_64A6C0
push	esi
lea	ecx, [ebx+24h]
call	sub_6FFAF0
jmp	loc_6D6283

loc_6D603C:
and	byte ptr [ebx+4Ch], 0FBh
mov	edx, 0FFBFh
and	[ebx+4Eh], dx
jmp	loc_6D6275

loc_6D604E:		; "url"
push	offset aUrl
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D60B9
cmp	byte ptr [esi],	1
jz	short loc_6D60AC
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D60AC
push	0
push	0FFFFFFFFh
push	ebp
lea	eax, [esp+64h+var_40]
push	eax
mov	ecx, esi
call	sub_652F60
lea	ecx, [esp+58h+var_40]
push	ecx
lea	ecx, [esp+5Ch+var_30]
call	sub_64A680
mov	edx, [esp+58h+var_40]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [ebx+24h]
call	sub_6FFA30
mov	eax, [esp+58h+var_40]
mov	ecx, eax
add	eax, 8
jmp	loc_6D591E

loc_6D60AC:
lea	ecx, [ebx+24h]
call	sub_6D5690
jmp	loc_6D6275

loc_6D60B9:
cmp	byte ptr [ebp+7Ch], 8
jb	loc_6D61B1
push	offset aLetterspacing ;	"letterSpacing"
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D614D
cmp	byte ptr [esi],	1
jz	short loc_6D613C
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D613C
push	ebp
mov	ecx, esi
call	sub_653660
mov	edi, eax
mov	[esp+58h+arg_0], edi
fild	[esp+58h+arg_0]
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
cmp	edi, 0FFFFFD30h
jge	short loc_6D6116
mov	[esp+58h+arg_0], 0FFFFFD30h
jmp	short loc_6D6126

loc_6D6116:
cmp	edi, 2D0h
jle	short loc_6D6126
mov	[esp+58h+arg_0], 2D0h

loc_6D6126:
fild	[esp+58h+arg_0]
push	ecx		; float
lea	ecx, [ebx+24h]
fstp	dword ptr [esp+5Ch+var_60+4]
call	sub_6D5740
mov	edi, [esp+58h+arg_4]
jmp	short loc_6D61B1

loc_6D613C:
xor	ecx, ecx
mov	edx, 0FFFDh
and	[ebx+4Eh], dx
mov	[ebx+48h], cx
jmp	short loc_6D61A3

loc_6D614D:		; "kerning"
push	offset aKerning
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6D61B1
cmp	byte ptr [esi],	1
jz	short loc_6D6196
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D6196
push	ebp
mov	ecx, esi
call	sub_651D80
mov	byte ptr [esp+58h+arg_0], al
mov	edi, [esp+58h+arg_0]
push	edi
lea	ecx, [esp+5Ch+var_30]
call	sub_64A6C0
push	edi
lea	ecx, [ebx+24h]
call	sub_6FFB10
mov	edi, [esp+58h+arg_4]
jmp	short loc_6D61B1

loc_6D6196:
and	byte ptr [ebx+4Ch], 0F7h
mov	eax, 0FF7Fh
and	[ebx+4Eh], ax

loc_6D61A3:
lea	ecx, [esp+58h+var_30]
call	sub_652060
mov	[esp+58h+var_30], 1

loc_6D61B1:
mov	ecx, [ebp+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	loc_6D6283
push	offset aAlpha	; "alpha"
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	loc_6D6283
cmp	byte ptr [esi],	1
jz	loc_6D6265
mov	ecx, esi
call	sub_651A30
test	al, al
jnz	short loc_6D6265
push	ebp
mov	ecx, esi
call	sub_653660
mov	esi, eax
mov	[esp+58h+arg_0], esi
fild	[esp+58h+arg_0]
sub	esp, 8
lea	ecx, [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_64A6A0
test	esi, esi
jge	short loc_6D6218
mov	[esp+58h+arg_0], 0
jmp	short loc_6D6225

loc_6D6218:
cmp	esi, 64h
jle	short loc_6D6225
mov	[esp+58h+arg_0], 64h

loc_6D6225:
fild	[esp+58h+arg_0]
lea	ecx, [ebx+24h]
fnstcw	word ptr [esp+58h+arg_0]
fmul	ds:dbl_15FCCF8
movzx	eax, word ptr [esp+58h+arg_0]
or	eax, 0C00h
mov	[esp+58h+arg_8], eax
fdiv	ds:dbl_15FCBF8
fldcw	word ptr [esp+58h+arg_8]
fistp	[esp+58h+arg_8]
mov	dl, byte ptr [esp+58h+arg_8]
movzx	eax, dl
push	eax
fldcw	word ptr [esp+5Ch+arg_0]
call	sub_6D5660
jmp	short loc_6D6283

loc_6D6265:
or	dword ptr [ebx+44h], 0FF000000h
mov	ecx, 0FBFFh

loc_6D6271:
and	[ebx+4Eh], cx

loc_6D6275:
lea	ecx, [esp+58h+var_30]
call	sub_652060
mov	[esp+58h+var_30], 1

loc_6D6283:
mov	edx, [esp+58h+arg_C]
mov	ecx, [esp+58h+arg_4]
push	edx
lea	eax, [esp+5Ch+var_30]
push	eax
push	ecx
push	ebp
mov	ecx, ebx
call	sub_665190
lea	ecx, [esp+58h+var_30]
mov	bl, al
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 48h
retn	10h
sub_6D57C0 endp

align 10h



sub_6D62C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
mov	edx, [eax]
lea	ecx, [esi+34h]
push	0
call	edx
mov	eax, [esi+60h]
mov	edx, [eax]
lea	ecx, [esi+60h]
push	0
call	edx
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6D62C0 endp

align 10h



sub_6D62F0 proc	near
mov	eax, 1Eh
retn
sub_6D62F0 endp

align 10h



sub_6D6300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6D6323
cmp	[esi], ecx
jmp	short loc_6D6338

loc_6D6323:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6D632E
call	sub_651580

loc_6D632E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6D6338:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6D6387
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6D6356
cmp	[esi], ecx
jmp	short loc_6D636B

loc_6D6356:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6D6361
call	sub_651580

loc_6D6361:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6D636B:
setz	al
test	al, al
jnz	short loc_6D6387
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6D6387:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+68h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6D6300 endp

align 10h



sub_6D63B0 proc	near
add	ecx, 68h
jmp	sub_665AD0
sub_6D63B0 endp

align 10h



sub_6D63C0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6D63CD
mov	al, 1
retn	8

loc_6D63CD:
mov	[esp+arg_4], eax
add	ecx, 78h
jmp	loc_663310
sub_6D63C0 endp

align 10h



sub_6D63E0 proc	near

arg_0= byte ptr	 4

sub	ecx, 78h
jmp	sub_6D7F50
sub_6D63E0 endp

align 10h



sub_6D63F0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+94h]
test	eax, eax
jz	short loc_6D6421
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+94h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6D6421:
mov	edx, [esi+34h]
mov	eax, [edx]
lea	ecx, [esi+34h]
push	0
call	eax
mov	edx, [esi+60h]
mov	eax, [edx]
lea	ecx, [esi+60h]
push	0
call	eax
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6D63F0 endp

align 10h



sub_6D6450 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+7Ch]
call	sub_67C000
lea	ecx, [edi+88h]
call	sub_67C000
mov	eax, [edi+94h]
test	eax, eax
jz	short loc_6D64C3
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D64C1

loc_6D6480:
mov	eax, [edi+94h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D64BC
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6D64BC
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6D64BC:
inc	esi
cmp	esi, ebx
jb	short loc_6D6480

loc_6D64C1:
pop	esi
pop	ebx

loc_6D64C3:
pop	edi
retn
sub_6D6450 endp

align 10h



sub_6D64D0 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+7Ch]
call	sub_67BFB0
lea	ecx, [edi+88h]
call	sub_67BFB0
mov	eax, [edi+94h]
test	eax, eax
jz	short loc_6D6535
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D6533

loc_6D6500:
mov	eax, [edi+94h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D652E
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6D652E
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6D652E:
inc	esi
cmp	esi, ebx
jb	short loc_6D6500

loc_6D6533:
pop	esi
pop	ebx

loc_6D6535:
pop	edi
retn
sub_6D64D0 endp

align 10h



sub_6D6540 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+7Ch]
call	sub_67C070
lea	ecx, [edi+88h]
call	sub_67C070
mov	eax, [edi+94h]
test	eax, eax
jz	short loc_6D65C0
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D65BE

loc_6D6570:
mov	eax, [edi+94h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D65B9
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6D65B9
test	eax, 0FFFFFFFh
jbe	short loc_6D65A4
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6D65B0

loc_6D65A4:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6D65B0:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6D65B9:
inc	esi
cmp	esi, ebx
jb	short loc_6D6570

loc_6D65BE:
pop	esi
pop	ebx

loc_6D65C0:
pop	edi
retn
sub_6D6540 endp

align 10h



sub_6D65D0 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+7Ch]
call	sub_67C210
lea	ecx, [edi+88h]
call	sub_67C210
mov	eax, [edi+94h]
test	eax, eax
jz	short loc_6D661D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D661B

loc_6D6600:
mov	eax, [edi+94h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D6616
call	sub_64B020

loc_6D6616:
inc	esi
cmp	esi, ebx
jb	short loc_6D6600

loc_6D661B:
pop	esi
pop	ebx

loc_6D661D:
pop	edi
retn
sub_6D65D0 endp

align 10h



sub_6D6620 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+7Ch]
call	sub_67C1F0
lea	ecx, [edi+88h]
call	sub_67C1F0
mov	eax, [edi+94h]
test	eax, eax
jz	short loc_6D666D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D666B

loc_6D6650:
mov	eax, [edi+94h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D6666
call	sub_64B3B0

loc_6D6666:
inc	esi
cmp	esi, ebx
jb	short loc_6D6650

loc_6D666B:
pop	esi
pop	ebx

loc_6D666D:
pop	edi
retn
sub_6D6620 endp

align 10h



sub_6D6670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	edi
mov	esi, ecx
call	sub_663B00
mov	dword ptr [esi], offset	off_143B714
lea	ebx, [esi+10h]
mov	dword ptr [ebx], offset	off_143B6C0
mov	eax, [edi]
mov	ecx, [eax+294h]
push	ecx
lea	ecx, [esi+34h]
call	sub_694320
xor	edx, edx
mov	[esi+6Ch], dx
xor	ecx, ecx
mov	[esi+72h], dx
mov	edx, [esp+0Ch+arg_4]
xor	eax, eax
push	edx
mov	dword ptr [esi+60h], offset off_155F500
mov	[esi+70h], cx
mov	[esi+76h], cx
push	edi
mov	ecx, ebx
mov	dword ptr [esi+64h], 1
mov	dword ptr [esi+60h], offset off_143AB58
mov	dword ptr [esi+68h], 0
mov	[esi+6Eh], ax
mov	[esi+74h], ax
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6D6670 endp

align 10h



sub_6D66F0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6D6700
align 10h

loc_6D6700:
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+60h]
mov	ecx, edi
mov	dword ptr [edi], offset	off_143AB58
call	sub_6FFB90
mov	ecx, edi
call	sub_64A3F0
lea	ecx, [esi+34h]
call	sub_694380
mov	ecx, esi
call	sub_664A30
test	[esp+8+arg_0], 1
jz	short loc_6D673F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6D673F:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6D66F0 endp

align 10h



sub_6D6750 proc	near

var_143= byte ptr -143h
var_142= byte ptr -142h
var_141= byte ptr -141h
var_140= byte ptr -140h
var_13F= byte ptr -13Fh
var_13E= byte ptr -13Eh
var_13D= byte ptr -13Dh
var_13C= byte ptr -13Ch
var_13B= byte ptr -13Bh
var_13A= byte ptr -13Ah
var_139= byte ptr -139h
var_138= byte ptr -138h
var_137= byte ptr -137h
var_136= byte ptr -136h
var_135= byte ptr -135h
var_134= byte ptr -134h
var_133= byte ptr -133h
var_132= byte ptr -132h
var_131= byte ptr -131h
var_130= byte ptr -130h
var_120= byte ptr -120h
var_110= byte ptr -110h
var_100= byte ptr -100h
var_F0=	byte ptr -0F0h
var_E0=	byte ptr -0E0h
var_D0=	byte ptr -0D0h
var_C0=	byte ptr -0C0h
var_B0=	byte ptr -0B0h
var_A0=	byte ptr -0A0h
var_90=	byte ptr -90h
var_80=	byte ptr -80h
var_70=	byte ptr -70h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 144h
push	ebx
push	ebp
push	esi
mov	esi, [esp+150h+arg_0]
push	edi
push	esi
mov	ebp, ecx
call	sub_663BE0
mov	dword ptr [ebp+0], offset off_143B714
lea	edi, [ebp+10h]
mov	dword ptr [edi], offset	off_143B6C0
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
add	esi, 78h
push	ecx
lea	ecx, [ebp+34h]
call	sub_694320
xor	ecx, ecx
mov	dword ptr [ebp+60h], offset off_155F500
xor	edx, edx
xor	eax, eax
mov	ebx, 1
mov	[ebp+64h], ebx
mov	dword ptr [ebp+60h], offset off_143AB58
mov	dword ptr [ebp+68h], 0
mov	[ebp+6Ch], dx
mov	[ebp+6Eh], ax
mov	[ebp+70h], cx
mov	[ebp+72h], dx
mov	[ebp+74h], ax
mov	[ebp+76h], cx
mov	ecx, [esi]
push	20h
call	sub_66FB00
push	eax
push	esi
mov	ecx, edi
call	sub_64B8D0
lea	edx, [esp+154h+var_131]
push	edx
lea	eax, [esp+158h+var_130]
push	eax
push	offset aAlign_0	; "align"
push	esi
mov	ecx, edi
mov	[esp+164h+var_131], 2
mov	[esp+164h+var_130], bl
call	sub_65E060
lea	ecx, [esp+154h+var_130]
call	sub_652830
lea	ecx, [esp+154h+var_132]
push	ecx
lea	edx, [esp+158h+var_20]
push	edx
push	offset aBlockindent ; "blockIndent"
push	esi
mov	ecx, edi
mov	[esp+164h+var_132], 2
mov	[esp+164h+var_20], bl
call	sub_65E060
lea	ecx, [esp+154h+var_20]
call	sub_652830
lea	eax, [esp+154h+var_140]
push	eax
lea	ecx, [esp+158h+var_100]
push	ecx
push	offset aBold_1	; "bold"
push	esi
mov	ecx, edi
mov	[esp+164h+var_140], 2
mov	[esp+164h+var_100], bl
call	sub_65E060
lea	ecx, [esp+154h+var_100]
call	sub_652830
lea	edx, [esp+154h+var_138]
push	edx
lea	eax, [esp+158h+var_80]
push	eax
mov	[esp+15Ch+var_138], 2
mov	[esp+15Ch+var_80], bl
push	offset aBullet	; "bullet"
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+154h+var_80]
call	sub_652830
lea	ecx, [esp+154h+var_13E]
push	ecx
lea	edx, [esp+158h+var_E0]
push	edx
push	offset aColor	; "color"
push	esi
mov	ecx, edi
mov	[esp+164h+var_13E], 2
mov	[esp+164h+var_E0], bl
call	sub_65E060
lea	ecx, [esp+154h+var_E0]
call	sub_652830
lea	eax, [esp+154h+var_134]
push	eax
lea	ecx, [esp+158h+var_40]
push	ecx
push	offset aFont	; "font"
push	esi
mov	ecx, edi
mov	[esp+164h+var_134], 2
mov	[esp+164h+var_40], bl
call	sub_65E060
lea	ecx, [esp+154h+var_40]
call	sub_652830
lea	edx, [esp+154h+var_13C]
push	edx
lea	eax, [esp+158h+var_C0]
push	eax
push	offset aIndent	; "indent"
push	esi
mov	ecx, edi
mov	[esp+164h+var_13C], 2
mov	[esp+164h+var_C0], bl
call	sub_65E060
lea	ecx, [esp+154h+var_C0]
call	sub_652830
lea	ecx, [esp+154h+var_136]
push	ecx
lea	edx, [esp+158h+var_60]
push	edx
push	offset aItalic_1 ; "italic"
push	esi
mov	ecx, edi
mov	[esp+164h+var_136], 2
mov	[esp+164h+var_60], bl
call	sub_65E060
lea	ecx, [esp+154h+var_60]
call	sub_652830
lea	eax, [esp+154h+var_13A]
push	eax
lea	ecx, [esp+158h+var_A0]
push	ecx
push	offset aLeading	; "leading"
push	esi
mov	ecx, edi
mov	[esp+164h+var_13A], 2
mov	[esp+164h+var_A0], bl
call	sub_65E060
lea	ecx, [esp+154h+var_A0]
call	sub_652830
lea	edx, [esp+154h+var_142]
push	edx
lea	eax, [esp+158h+var_120]
push	eax
push	offset aLeftmargin ; "leftMargin"
push	esi
mov	ecx, edi
mov	[esp+164h+var_142], 2
mov	[esp+164h+var_120], bl
call	sub_65E060
lea	ecx, [esp+154h+var_120]
call	sub_652830
lea	ecx, [esp+154h+var_141]
mov	[esp+154h+var_141], 2
mov	[esp+154h+var_110], bl
push	ecx
lea	edx, [esp+158h+var_110]
push	edx
push	offset aRightmargin ; "rightMargin"
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+154h+var_110]
call	sub_652830
lea	eax, [esp+154h+var_13F]
push	eax
lea	ecx, [esp+158h+var_F0]
push	ecx
push	offset aSize	; "size"
push	esi
mov	ecx, edi
mov	[esp+164h+var_13F], 2
mov	[esp+164h+var_F0], bl
call	sub_65E060
lea	ecx, [esp+154h+var_F0]
call	sub_652830
lea	edx, [esp+154h+var_13D]
push	edx
lea	eax, [esp+158h+var_D0]
push	eax
push	offset aTabstops_0 ; "tabStops"
push	esi
mov	ecx, edi
mov	[esp+164h+var_13D], 2
mov	[esp+164h+var_D0], bl
call	sub_65E060
lea	ecx, [esp+154h+var_D0]
call	sub_652830
lea	ecx, [esp+154h+var_13B]
push	ecx
lea	edx, [esp+158h+var_B0]
push	edx
push	offset aTarget_0 ; "target"
push	esi
mov	ecx, edi
mov	[esp+164h+var_13B], 2
mov	[esp+164h+var_B0], bl
call	sub_65E060
lea	ecx, [esp+154h+var_B0]
call	sub_652830
lea	eax, [esp+154h+var_139]
push	eax
lea	ecx, [esp+158h+var_90]
push	ecx
push	offset aUnderline ; "underline"
push	esi
mov	ecx, edi
mov	[esp+164h+var_139], 2
mov	[esp+164h+var_90], bl
call	sub_65E060
lea	ecx, [esp+154h+var_90]
call	sub_652830
lea	edx, [esp+154h+var_137]
push	edx
lea	eax, [esp+158h+var_70]
push	eax
push	offset aUrl	; "url"
push	esi
mov	ecx, edi
mov	[esp+164h+var_137], 2
mov	[esp+164h+var_70], bl
call	sub_65E060
lea	ecx, [esp+154h+var_70]
call	sub_652830
mov	ecx, [esp+154h+arg_0]
cmp	byte ptr [ecx+7Ch], 8
jb	short loc_6D6B39
lea	edx, [esp+154h+var_135]
push	edx
lea	eax, [esp+158h+var_50]
push	eax
push	offset aKerning	; "kerning"
push	esi
mov	ecx, edi
mov	[esp+164h+var_135], 2
mov	[esp+164h+var_50], bl
call	sub_65E060
lea	ecx, [esp+154h+var_50]
call	sub_652830
lea	ecx, [esp+154h+var_133]
push	ecx
lea	edx, [esp+158h+var_30]
push	edx
push	offset aLetterspacing ;	"letterSpacing"
push	esi
mov	ecx, edi
mov	[esp+164h+var_133], 2
mov	[esp+164h+var_30], bl
call	sub_65E060
lea	ecx, [esp+154h+var_30]
call	sub_652830

loc_6D6B39:
mov	eax, [esi]
cmp	[eax+2B0h], bl
jnz	short loc_6D6B75
lea	ecx, [esp+154h+var_143]
push	ecx
lea	edx, [esp+158h+var_10]
push	edx
push	offset aAlpha	; "alpha"
push	esi
mov	ecx, edi
mov	[esp+164h+var_143], 2
mov	[esp+164h+var_10], bl
call	sub_65E060
lea	ecx, [esp+154h+var_10]
call	sub_652830

loc_6D6B75:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 144h
retn	4
sub_6D6750 endp

align 10h



sub_6D6B90 proc	near

var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+34h+arg_4]
mov	esi, ecx
xor	ebx, ebx
push	edi
lea	ecx, [esi+34h]
mov	[esp+38h+var_24], ebx
call	sub_6C7EC0
mov	al, [edi+2Ah]
shr	al, 4
mov	[esp+34h+var_20], 1
test	al, 1
jz	short loc_6D6BD4
mov	cl, [edi+28h]
mov	ebx, 1
and	cl, bl
mov	[esp+34h+var_10], 2
mov	byte ptr [esp+34h+var_C], cl
lea	eax, [esp+34h+var_10]
jmp	short loc_6D6BD8

loc_6D6BD4:
lea	eax, [esp+34h+var_20]

loc_6D6BD8:
mov	ebp, [esp+34h+arg_0]
push	eax
add	esi, 10h
push	offset aBold_1	; "bold"
push	ebp
mov	ecx, esi
mov	[esp+40h+arg_4], esi
call	sub_669260
test	bl, 1
jz	short loc_6D6C02
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFFFEh
call	sub_652830

loc_6D6C02:
mov	dl, [edi+2Ah]
shr	dl, 5
test	dl, 1
jz	short loc_6D6C26
mov	al, [edi+28h]
shr	al, 1
or	ebx, 2
and	al, 1
mov	byte ptr [esp+34h+var_C], al
mov	[esp+34h+var_10], 2
lea	eax, [esp+34h+var_10]
jmp	short loc_6D6C2A

loc_6D6C26:
lea	eax, [esp+34h+var_20]

loc_6D6C2A:
push	eax
push	offset aItalic_1 ; "italic"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 2
jz	short loc_6D6C49
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFFFDh
call	sub_652830

loc_6D6C49:
mov	cl, [edi+2Ah]
shr	cl, 6
test	cl, 1
jz	short loc_6D6C6F
mov	dl, [edi+28h]
shr	dl, 2
or	ebx, 4
and	dl, 1
mov	[esp+34h+var_10], 2
mov	byte ptr [esp+34h+var_C], dl
lea	eax, [esp+34h+var_10]
jmp	short loc_6D6C73

loc_6D6C6F:
lea	eax, [esp+34h+var_20]

loc_6D6C73:
push	eax
push	offset aUnderline ; "underline"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 4
jz	short loc_6D6C92
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFFFBh
call	sub_652830

loc_6D6C92:
mov	al, [edi+2Ah]
shr	al, 3
test	al, 1
jz	short loc_6D6CC8
movzx	ecx, word ptr [edi+26h]
mov	[esp+34h+arg_0], ecx
or	ebx, 8
mov	[esp+34h+var_10], 3
fild	[esp+34h+arg_0]
lea	eax, [esp+34h+var_10]
fdiv	ds:dbl_15FCE20
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fstp	[esp+34h+var_C]
jmp	short loc_6D6CCC

loc_6D6CC8:
lea	eax, [esp+34h+var_20]

loc_6D6CCC:
push	eax
push	offset aSize	; "size"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 8
jz	short loc_6D6CEB
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFFF7h
call	sub_652830

loc_6D6CEB:
mov	dl, [edi+2Ah]
shr	dl, 2
test	dl, 1
jz	short loc_6D6D41
mov	ecx, edi
or	ebx, 30h
call	sub_700520
mov	eax, [eax]
mov	ecx, [ebp+0]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	[esp+34h+var_10], 5
mov	dword ptr [esp+34h+var_C], esi
add	[esi+8], eax
lea	eax, [esp+34h+var_10]
jmp	short loc_6D6D49

loc_6D6D41:
mov	esi, [esp+34h+arg_4]
lea	eax, [esp+34h+var_20]

loc_6D6D49:
mov	ecx, [esp+34h+arg_4]
push	eax
push	offset aFont	; "font"
push	ebp
call	sub_669260
test	bl, 20h
jz	short loc_6D6D6A
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFFDFh
call	sub_652830

loc_6D6D6A:
test	bl, 10h
jz	short loc_6D6D7F
and	ebx, 0FFFFFFEFh
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D6D7F
mov	ecx, esi
call	sub_650DF0

loc_6D6D7F:
test	byte ptr [edi+2Ah], 1
jz	short loc_6D6DB1
mov	eax, [edi+20h]
and	eax, offset sub_FFFFFF
or	ebx, 40h
mov	[esp+34h+arg_0], eax
fild	[esp+34h+arg_0]
mov	[esp+34h+var_10], 3
test	eax, eax
jge	short loc_6D6DA7
fadd	ds:dbl_15FCE08

loc_6D6DA7:
fstp	[esp+34h+var_C]
lea	eax, [esp+34h+var_10]
jmp	short loc_6D6DB5

loc_6D6DB1:
lea	eax, [esp+34h+var_20]

loc_6D6DB5:
mov	esi, [esp+34h+arg_4]
push	eax
push	offset aColor	; "color"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 40h
jz	short loc_6D6DD8
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFFBFh
call	sub_652830

loc_6D6DD8:
mov	cl, [edi+2Ah]
shr	cl, 1
test	cl, 1
jz	short loc_6D6E11
movsx	edx, word ptr [edi+24h]
mov	[esp+34h+arg_0], edx
or	ebx, 80h
mov	[esp+34h+var_10], 3
fild	[esp+34h+arg_0]
lea	eax, [esp+34h+var_10]
fdiv	ds:dbl_15FCE20
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fstp	[esp+34h+var_C]
jmp	short loc_6D6E15

loc_6D6E11:
lea	eax, [esp+34h+var_20]

loc_6D6E15:
push	eax
push	offset aLetterspacing ;	"letterSpacing"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, bl
jns	short loc_6D6E36
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFF7Fh
call	sub_652830

loc_6D6E36:
mov	al, [edi+2Ah]
shr	al, 7
test	al, 1
jz	short loc_6D6E5E
mov	cl, [edi+28h]
shr	cl, 3
or	ebx, 100h
and	cl, 1
mov	[esp+34h+var_10], 2
mov	byte ptr [esp+34h+var_C], cl
lea	eax, [esp+34h+var_10]
jmp	short loc_6D6E62

loc_6D6E5E:
lea	eax, [esp+34h+var_20]

loc_6D6E62:
push	eax
push	offset aKerning	; "kerning"
push	ebp
mov	ecx, esi
call	sub_669260
test	ebx, 100h
jz	short loc_6D6E87
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFEFFh
call	sub_652830

loc_6D6E87:
mov	edx, 100h
test	[edi+2Ah], dx
jz	short loc_6D6EE7
lea	esi, [edi+10h]
mov	ecx, esi
call	sub_679930
test	eax, eax
jz	short loc_6D6EE7
mov	eax, [ebp+0]
mov	ecx, [eax+280h]
mov	eax, [esi]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
or	ebx, 600h
call	sub_650F20
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	[esp+34h+var_10], 5
mov	dword ptr [esp+34h+var_C], esi
add	[esi+8], eax
lea	eax, [esp+34h+var_10]
jmp	short loc_6D6EEF

loc_6D6EE7:
mov	esi, [esp+34h+arg_4]
lea	eax, [esp+34h+var_20]

loc_6D6EEF:
mov	ecx, [esp+34h+arg_4]
push	eax
push	offset aUrl	; "url"
push	ebp
call	sub_669260
test	ebx, 400h
jz	short loc_6D6F16
lea	ecx, [esp+34h+var_10]
and	ebx, 0FFFFFBFFh
call	sub_652830

loc_6D6F16:
test	ebx, 200h
jz	short loc_6D6F31
and	ebx, 0FFFFFDFFh
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D6F31
mov	ecx, esi
call	sub_650DF0

loc_6D6F31:
mov	eax, [ebp+0]
cmp	byte ptr [eax+2B0h], 1
jnz	short loc_6D6F95
test	byte ptr [edi+2Ah], 1
jz	short loc_6D6F70
movzx	ecx, byte ptr [edi+23h]
mov	[esp+34h+arg_0], ecx
or	ebx, 800h
mov	[esp+34h+var_10], 3
fild	[esp+34h+arg_0]
lea	eax, [esp+34h+var_10]
fmul	ds:dbl_15FCBF8
fdiv	ds:dbl_15FCCF8
fstp	[esp+34h+var_C]
jmp	short loc_6D6F74

loc_6D6F70:
lea	eax, [esp+34h+var_20]

loc_6D6F74:
mov	ecx, [esp+34h+arg_4]
push	eax
push	offset aAlpha	; "alpha"
push	ebp
call	sub_669260
test	ebx, 800h
jz	short loc_6D6F95
lea	ecx, [esp+34h+var_10]
call	sub_652830

loc_6D6F95:
lea	ecx, [esp+34h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	8
sub_6D6B90 endp

db 28h dup(0CCh)



sub_6D6FD0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+38h+arg_4]
mov	esi, ecx
xor	ebx, ebx
push	edi
lea	ecx, [esi+60h]
mov	[esp+3Ch+var_28], esi
mov	[esp+3Ch+var_24], ebx
call	sub_700370
test	byte ptr [edi+16h], 1
mov	[esp+38h+var_20], 1
jz	loc_6D70B5
movzx	eax, word ptr [edi+16h]
shr	eax, 9
and	eax, 3
sub	eax, 1
mov	edx, offset aLeft_0 ; "left"
jz	short loc_6D702B
sub	eax, 1
jz	short loc_6D7024
sub	eax, 1
jnz	short loc_6D7030
mov	edx, offset aCenter ; "center"
jmp	short loc_6D7030

loc_6D7024:		; "justify"
mov	edx, offset aJustify_0
jmp	short loc_6D7030

loc_6D702B:		; "right"
mov	edx, offset aRight

loc_6D7030:
mov	ebp, [esp+38h+arg_0]
mov	eax, [ebp+0]
mov	ecx, [eax+280h]
push	edx
call	sub_651000
mov	ecx, [esp+38h+var_28]
mov	esi, eax
lea	edx, [esp+38h+var_10]
push	edx
mov	eax, 1
add	[esi+8], eax
push	offset aAlign_0	; "align"
add	ecx, 10h
mov	[esp+40h+var_10], 5
mov	dword ptr [esp+40h+var_C], esi
add	[esi+8], eax
push	ebp
mov	[esp+44h+arg_4], ecx
call	sub_669260
lea	ecx, [esp+38h+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D708A
mov	ecx, esi
call	sub_650DF0

loc_6D708A:
mov	esi, [esp+38h+arg_4]

loc_6D708E:
movzx	eax, word ptr [edi+16h]
mov	cl, al
shr	cl, 7
test	cl, 1
jz	short loc_6D70D4
shr	eax, 0Fh
mov	ebx, 1
and	eax, ebx
mov	byte ptr [esp+38h+var_C], al
mov	[esp+38h+var_10], 2
lea	eax, [esp+38h+var_10]
jmp	short loc_6D70D8

loc_6D70B5:
mov	ebp, [esp+38h+arg_0]
lea	eax, [esp+38h+var_20]
push	eax
add	esi, 10h
push	offset aAlign_0	; "align"
push	ebp
mov	ecx, esi
mov	[esp+44h+arg_4], esi
call	sub_669260
jmp	short loc_6D708E

loc_6D70D4:
lea	eax, [esp+38h+var_20]

loc_6D70D8:
push	eax
push	offset aBullet	; "bullet"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 1
jz	short loc_6D70F7
lea	ecx, [esp+38h+var_10]
and	ebx, 0FFFFFFFEh
call	sub_652830

loc_6D70F7:
mov	dl, [edi+16h]
shr	dl, 1
test	dl, 1
jz	short loc_6D711F
movzx	eax, word ptr [edi+0Ch]
mov	[esp+38h+arg_0], eax
or	ebx, 2
fild	[esp+38h+arg_0]
mov	[esp+38h+var_10], 3
lea	eax, [esp+38h+var_10]
fstp	[esp+38h+var_C]
jmp	short loc_6D7123

loc_6D711F:
lea	eax, [esp+38h+var_20]

loc_6D7123:
push	eax
push	offset aBlockindent ; "blockIndent"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 2
jz	short loc_6D7142
lea	ecx, [esp+38h+var_10]
and	ebx, 0FFFFFFFDh
call	sub_652830

loc_6D7142:
mov	cl, [edi+16h]
shr	cl, 2
test	cl, 1
jz	short loc_6D716B
movsx	edx, word ptr [edi+0Eh]
mov	[esp+38h+arg_0], edx
or	ebx, 4
fild	[esp+38h+arg_0]
mov	[esp+38h+var_10], 3
lea	eax, [esp+38h+var_10]
fstp	[esp+38h+var_C]
jmp	short loc_6D716F

loc_6D716B:
lea	eax, [esp+38h+var_20]

loc_6D716F:
push	eax
push	offset aIndent	; "indent"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 4
jz	short loc_6D718E
lea	ecx, [esp+38h+var_10]
and	ebx, 0FFFFFFFBh
call	sub_652830

loc_6D718E:
mov	al, [edi+16h]
shr	al, 3
test	al, 1
jz	short loc_6D71B6
movsx	ecx, word ptr [edi+10h]
mov	[esp+38h+arg_0], ecx
or	ebx, 8
fild	[esp+38h+arg_0]
mov	[esp+38h+var_10], 3
lea	eax, [esp+38h+var_10]
fstp	[esp+38h+var_C]
jmp	short loc_6D71BA

loc_6D71B6:
lea	eax, [esp+38h+var_20]

loc_6D71BA:
push	eax
push	offset aLeading	; "leading"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 8
jz	short loc_6D71D9
lea	ecx, [esp+38h+var_10]
and	ebx, 0FFFFFFF7h
call	sub_652830

loc_6D71D9:
mov	dl, [edi+16h]
shr	dl, 4
test	dl, 1
jz	short loc_6D7202
movzx	eax, word ptr [edi+12h]
mov	[esp+38h+arg_0], eax
or	ebx, 10h
fild	[esp+38h+arg_0]
mov	[esp+38h+var_10], 3
lea	eax, [esp+38h+var_10]
fstp	[esp+38h+var_C]
jmp	short loc_6D7206

loc_6D7202:
lea	eax, [esp+38h+var_20]

loc_6D7206:
push	eax
push	offset aLeftmargin ; "leftMargin"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 10h
jz	short loc_6D7225
lea	ecx, [esp+38h+var_10]
and	ebx, 0FFFFFFEFh
call	sub_652830

loc_6D7225:
mov	cl, [edi+16h]
shr	cl, 5
test	cl, 1
jz	short loc_6D724E
movzx	edx, word ptr [edi+14h]
mov	[esp+38h+arg_0], edx
or	ebx, 20h
fild	[esp+38h+arg_0]
mov	[esp+38h+var_10], 3
lea	eax, [esp+38h+var_10]
fstp	[esp+38h+var_C]
jmp	short loc_6D7252

loc_6D724E:
lea	eax, [esp+38h+var_20]

loc_6D7252:
push	eax
push	offset aRightmargin ; "rightMargin"
push	ebp
mov	ecx, esi
call	sub_669260
test	bl, 20h
jz	short loc_6D726E
lea	ecx, [esp+38h+var_10]
call	sub_652830

loc_6D726E:
mov	al, [edi+16h]
shr	al, 6
test	al, 1
jz	loc_6D7347
lea	ecx, [esp+38h+arg_0]
push	ecx
xor	esi, esi
mov	ecx, edi
mov	[esp+3Ch+arg_0], esi
call	sub_6FFB40
mov	edx, [ebp+0]
mov	ecx, [edx+294h]
mov	ebx, eax
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	50h
call	edx
cmp	eax, esi
jz	short loc_6D72B3
push	ebp
mov	ecx, eax
call	sub_65EFC0
mov	edi, eax
jmp	short loc_6D72B5

loc_6D72B3:
xor	edi, edi

loc_6D72B5:
mov	eax, [esp+38h+arg_0]
push	eax
mov	ecx, edi
call	sub_65E410
cmp	[esp+38h+arg_0], 0
jbe	short loc_6D7306
jmp	short loc_6D72D0
align 10h

loc_6D72D0:
mov	ecx, [ebx+esi*4]
fild	dword ptr [ebx+esi*4]
mov	[esp+38h+var_10], 3
test	ecx, ecx
jge	short loc_6D72E5
fadd	ds:dbl_15FCE08

loc_6D72E5:
lea	edx, [esp+38h+var_10]
fstp	[esp+38h+var_C]
push	edx
push	esi
mov	ecx, edi
call	sub_65DA40
lea	ecx, [esp+38h+var_10]
call	sub_652830
inc	esi
cmp	esi, [esp+38h+arg_0]
jb	short loc_6D72D0

loc_6D7306:
push	edi
lea	ecx, [esp+3Ch+var_10]
call	sub_652700
mov	ecx, [esp+38h+arg_4]
push	eax
push	offset aTabstops_0 ; "tabStops"
push	ebp
call	sub_669260
lea	ecx, [esp+38h+var_10]
call	sub_652830
test	edi, edi
jz	short loc_6D7359
mov	ecx, edi
call	sub_64B3B0
lea	ecx, [esp+38h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	8

loc_6D7347:
lea	eax, [esp+38h+var_20]
push	eax
push	offset aTabstops_0 ; "tabStops"
push	ebp
mov	ecx, esi
call	sub_669260

loc_6D7359:
lea	ecx, [esp+38h+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	8
sub_6D6FD0 endp

align 10h



sub_6D7370 proc	near

var_110= qword ptr -110h
var_108= qword ptr -108h
var_100= qword ptr -100h
var_F0=	dword ptr -0F0h
var_EC=	qword ptr -0ECh
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_C0=	byte ptr -0C0h
var_BC=	qword ptr -0BCh
var_B0=	byte ptr -0B0h
var_AC=	qword ptr -0ACh
var_A0=	byte ptr -0A0h
var_9C=	qword ptr -9Ch
var_90=	byte ptr -90h
var_8C=	qword ptr -8Ch
var_80=	byte ptr -80h
var_7C=	qword ptr -7Ch
var_70=	byte ptr -70h
var_4A=	word ptr -4Ah
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4

sub	esp, 110h
push	esi
push	edi
mov	edi, [esp+118h+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
cmp	dword ptr [edi+1Ch], 0
jz	loc_6D791A
push	1Eh
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6D73BC
push	0
push	0
push	offset aTextformat_1 ; "TextFormat"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	esi
add	esp, 110h
retn

loc_6D73BC:
push	ebx
mov	ebx, [edi+8]
test	ebx, ebx
jz	short loc_6D73C9
add	ebx, 0FFFFFFF0h
jmp	short loc_6D73CB

loc_6D73C9:
xor	ebx, ebx

loc_6D73CB:
mov	eax, [edi+18h]
mov	esi, [eax+74h]
mov	[esp+11Ch+var_DC], esi
test	esi, esi
jz	loc_6D7919
inc	dword ptr [esi+4]
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	34h
call	edx
test	eax, eax
jz	short loc_6D740C
mov	ecx, [edi+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	dword ptr [esp+118h+var_108], eax
jmp	short loc_6D7414

loc_6D740C:
mov	dword ptr [esp+118h+var_108], 0

loc_6D7414:
push	ebp
mov	ebp, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebp
lea	edx, [esp+128h+var_EC]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	154h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_6D7479
mov	edx, [esi]
mov	eax, [edx+60h]
push	0
mov	ecx, esi
call	eax
mov	ecx, [edi+18h]
push	eax
call	sub_668010
mov	ecx, eax
call	sub_69BA70
push	eax
mov	ecx, ebp
call	sub_7257C0
mov	esi, eax
jmp	short loc_6D747B

loc_6D7479:
xor	esi, esi

loc_6D747B:
mov	eax, [esi+8]
or	byte ptr [eax+20h], 2
mov	ecx, esi
call	sub_71DFE0
mov	ecx, esi
call	sub_71E000
mov	eax, [edi+18h]
cmp	byte ptr [eax+7Ch], 7
jb	short loc_6D7504
cmp	dword ptr [edi+1Ch], 2
jl	short loc_6D7504
push	eax
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+120h+var_108]
and	byte ptr [esi+14Eh], 0FEh
mov	ecx, esi
call	sub_71E020
fld	[esp+120h+var_108]
fstp	dword ptr [esp+120h+var_110]
push	1
fld	dword ptr [esp+124h+var_110]
lea	ecx, [esp+124h+var_EC]
fmul	ds:dbl_15FCE20
push	ecx
mov	ecx, esi
fstp	dword ptr [esp+128h+var_108]
fldz
fst	dword ptr [esp+128h+var_EC]
fstp	dword ptr [esp+128h+var_EC+4]
fld	dword ptr [esp+128h+var_108]
fldz
fadd	st(1), st
fxch	st(1)
fstp	[esp+128h+var_E4]
fadd	st, st
fstp	[esp+128h+var_E0]
call	sub_71F2C0

loc_6D7504:
or	byte ptr [esi+14Eh], 4
mov	edx, [edi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
push	ecx
lea	ecx, [esp+124h+var_70]
call	sub_694320
lea	ecx, [esp+120h+var_D8]
call	sub_6C6310
lea	ecx, [esp+120h+var_70]
call	sub_701BF0
lea	ecx, [esp+120h+var_D8]
call	sub_700260
lea	edx, [ebx+34h]
push	edx
lea	eax, [esp+124h+var_2C]
push	eax
lea	ecx, [esp+128h+var_70]
call	sub_7013B0
push	eax
lea	ecx, [esp+124h+var_70]
call	sub_6C7EC0
lea	ecx, [esp+120h+var_2C]
call	sub_694380
add	ebx, 60h
push	ebx
lea	ecx, [esp+124h+var_44]
push	ecx
lea	ecx, [esp+128h+var_D8]
call	sub_700920
push	eax
lea	ecx, [esp+124h+var_D8]
call	sub_700370
lea	ecx, [esp+120h+var_44]
mov	[esp+120h+var_44], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+120h+var_44]
call	sub_64A3F0
mov	ecx, [esi+8]
lea	edx, [esp+120h+var_70]
push	edx
call	sub_729AF0
mov	ecx, [esi+8]
lea	eax, [esp+120h+var_D8]
push	eax
call	sub_729BD0
mov	ecx, [esp+120h+var_F0]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
mov	ecx, esi
call	sub_71E270
mov	ecx, esi
call	sub_723480
mov	ecx, esi
call	sub_7242E0
fadd	ds:dbl_143B768
mov	ecx, [edi+18h]
mov	ebp, dword ptr [esp+120h+var_110+4]
fdiv	ds:dbl_15FCE20
lea	eax, [esp+120h+var_100]
push	eax
add	ecx, 78h
push	offset aTextfieldwidth ; "textFieldWidth"
add	ebp, 10h
push	ecx
mov	ecx, ebp
mov	byte ptr [esp+12Ch+var_100], 3
fstp	[esp+12Ch+var_100+4]
call	sub_669260
lea	ecx, [esp+120h+var_100]
call	sub_652830
mov	ecx, esi
call	sub_724320
fadd	ds:dbl_143B768
lea	edx, [esp+120h+var_C0]
push	edx
fdiv	ds:dbl_15FCE20
mov	[esp+124h+var_C0], 3
push	offset aTextfieldheigh ; "textFieldHeight"
fstp	[esp+128h+var_BC]
mov	eax, [edi+18h]
add	eax, 78h
push	eax
mov	ecx, ebp
call	sub_669260
lea	ecx, [esp+120h+var_C0]
call	sub_652830
mov	ecx, esi
call	sub_7242E0
fdiv	ds:dbl_15FCE20
mov	edx, [edi+18h]
lea	ecx, [esp+120h+var_B0]
push	ecx
push	offset aWidth	; "width"
add	edx, 78h
push	edx
mov	ecx, ebp
mov	[esp+12Ch+var_B0], 3
fstp	[esp+12Ch+var_AC]
call	sub_669260
lea	ecx, [esp+120h+var_B0]
call	sub_652830
mov	ecx, esi
call	sub_724320
fdiv	ds:dbl_15FCE20
mov	ecx, [edi+18h]
lea	eax, [esp+120h+var_A0]
push	eax
add	ecx, 78h
push	offset aHeight	; "height"
push	ecx
mov	ecx, ebp
mov	[esp+12Ch+var_A0], 3
fstp	[esp+12Ch+var_9C]
call	sub_669260
lea	ecx, [esp+120h+var_A0]
call	sub_652830
mov	al, [esp+120h+var_48]
mov	bl, al
and	al, 1
shr	bl, 1
lea	ecx, [esp+120h+var_70]
and	bl, 1
mov	byte ptr [esp+120h+var_110], al
call	sub_700520
mov	eax, [eax]
mov	ecx, [esi+0Ch]
xor	edx, edx
and	eax, 0FFFFFFFCh
test	bl, bl
movzx	ebx, byte ptr [esp+120h+var_110]
setnz	dl
neg	ebx
sbb	ebx, ebx
push	0		; int
and	ebx, 2
push	1		; char
add	eax, 8
or	edx, ebx
or	edx, 10h
push	edx		; int
push	eax		; Src
call	sub_6F5D60
mov	ebx, eax
fldz
fld	st
fst	[esp+120h+var_108]
test	ebx, ebx
jz	short loc_6D7762
mov	eax, [ebx+1Ch]
fstp	st
mov	eax, [eax+0Ch]
fld	dword ptr [eax+8]
fld	dword ptr [eax+0Ch]
fst	[esp+120h+var_108]
fld	st(2)
fucomp	st(2)
fnstsw	ax
test	ah, 44h
jp	short loc_6D776A
fstp	st(1)

loc_6D7762:
fld	ds:dbl_143B740
fxch	st(1)

loc_6D776A:
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_6D7781
fld	ds:dbl_15FD320
fsub	st, st(1)
fstp	[esp+120h+var_108]

loc_6D7781:
movzx	ecx, [esp+120h+var_4A]
mov	dword ptr [esp+120h+var_110], ecx
mov	[esp+120h+var_90], 3
fild	dword ptr [esp+120h+var_110]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	dword ptr [esp+120h+var_110]
fld	dword ptr [esp+120h+var_110]
fmul	st, st(1)
fnstcw	word ptr [esp+120h+var_110]
fmul	ds:dbl_143B738
movzx	eax, word ptr [esp+120h+var_110]
or	eax, 0C00h
mov	dword ptr [esp+120h+var_100], eax
fst	[esp+120h+var_EC]
fmulp	st(2), st
fdivp	st(1), st
fldcw	word ptr [esp+120h+var_100]
fistp	[esp+120h+var_100]
mov	edx, dword ptr [esp+120h+var_100]
fldcw	word ptr [esp+120h+var_110]
fild	dword ptr [esp+120h+var_100]
test	edx, edx
jge	short loc_6D77EB
fadd	ds:dbl_15FCE08

loc_6D77EB:
mov	ecx, [edi+18h]
fstp	[esp+120h+var_8C]
lea	eax, [esp+120h+var_90]
push	eax
add	ecx, 78h
push	offset aAscent	; "ascent"
push	ecx
mov	ecx, ebp
call	sub_669260
lea	ecx, [esp+120h+var_90]
call	sub_652830
fld	[esp+120h+var_EC]
fmul	[esp+120h+var_108]
mov	[esp+120h+var_80], 3
fnstcw	word ptr [esp+120h+var_110]
fdiv	ds:dbl_15FCE20
movzx	eax, word ptr [esp+120h+var_110]
or	eax, 0C00h
mov	dword ptr [esp+120h+var_100], eax
fldcw	word ptr [esp+120h+var_100]
fistp	[esp+120h+var_EC]
mov	edx, dword ptr [esp+120h+var_EC]
fldcw	word ptr [esp+120h+var_110]
fild	dword ptr [esp+120h+var_EC]
test	edx, edx
jge	short loc_6D785F
fadd	ds:dbl_15FCE08

loc_6D785F:
mov	ecx, [edi+18h]
fstp	[esp+120h+var_7C]
lea	eax, [esp+120h+var_80]
push	eax
add	ecx, 78h
push	offset aDescent	; "descent"
push	ecx
mov	ecx, ebp
call	sub_669260
lea	ecx, [esp+120h+var_80]
call	sub_652830
mov	ebp, dword ptr [esp+120h+var_110+4]
mov	ecx, [edi+4]
push	ebp
call	sub_652E40
test	ebx, ebx
jz	short loc_6D78B8
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_6D78B8
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_6D78B8:
lea	ecx, [esp+120h+var_D8]
mov	[esp+120h+var_D8], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+120h+var_D8]
call	sub_64A3F0
lea	ecx, [esp+120h+var_70]
call	sub_694380
mov	ecx, esi
call	sub_64A400
mov	eax, [esp+120h+var_F0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D78FB
call	sub_650DF0

loc_6D78FB:
test	ebp, ebp
jz	short loc_6D7906
mov	ecx, ebp
call	sub_64B3B0

loc_6D7906:
mov	ecx, [esp+120h+var_DC]
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 110h
jmp	sub_64A400

loc_6D7919:
pop	ebx

loc_6D791A:
pop	edi
pop	esi
add	esp, 110h
retn
sub_6D7370 endp

align 10h



sub_6D7930 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
mov	esi, [esp+10h+arg_0]
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_6D7985
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 1Eh
jnz	short loc_6D7985
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6D7985
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D797D
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6D7977
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_6D7977:
mov	[esp+14h+var_8], edi
jmp	short loc_6D79B5

loc_6D797D:
xor	edi, edi
mov	[esp+14h+var_8], edi
jmp	short loc_6D79B5

loc_6D7985:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	78h
call	edx
test	eax, eax
jz	short loc_6D79AD
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6D6750
jmp	short loc_6D79AF

loc_6D79AD:
xor	eax, eax

loc_6D79AF:
mov	[esp+14h+var_8], eax
mov	edi, eax

loc_6D79B5:
mov	ebx, 1
cmp	[esi+1Ch], ebx
jl	loc_6D7E37
push	ebp
mov	ebp, [esi+18h]
mov	edx, [ebp+78h]
push	0
add	ebp, 78h
push	4
mov	byte ptr [esp+20h+arg_0], 0
mov	ecx, [edx+280h]
push	offset aFont	; "font"
add	edi, 10h
call	sub_650E40
mov	[esp+18h+var_4], eax
add	[eax+8], ebx
mov	ebx, [edi]
lea	eax, [esp+18h+arg_0]
push	eax
push	0
mov	ecx, esi
add	ebx, 0Ch
call	sub_651EC0
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
lea	ecx, [esp+20h+var_4]
push	ecx
push	edx
mov	ecx, edi
call	eax
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7A29
call	sub_650DF0

loc_6D7A29:
cmp	dword ptr [esi+1Ch], 2
jl	loc_6D7E32
mov	ecx, [ebp+0]
push	0
push	4
mov	byte ptr [esp+20h+arg_0], 0
mov	ecx, [ecx+280h]
push	offset aSize	; "size"
call	sub_650E40
lea	edx, [esp+18h+arg_0]
mov	[esp+18h+var_4], eax
inc	dword ptr [eax+8]
mov	ebx, [edi]
push	edx
push	1
mov	ecx, esi
add	ebx, 0Ch
call	sub_651EC0
mov	ecx, [esi+18h]
mov	edx, [ebx]
push	eax
lea	eax, [esp+20h+var_4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7A8F
call	sub_650DF0

loc_6D7A8F:
cmp	dword ptr [esi+1Ch], 3
jl	loc_6D7E32
mov	ebx, [edi]
lea	eax, [esp+18h+arg_0]
push	eax
push	2
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aColor	; "color"
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
push	edx
mov	ecx, edi
call	eax
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7AE4
call	sub_650DF0

loc_6D7AE4:
cmp	dword ptr [esi+1Ch], 4
jl	loc_6D7E32
mov	ebx, [edi]
lea	ecx, [esp+18h+arg_0]
push	ecx
push	3
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aBold_1	; "bold"
lea	edx, [esp+24h+var_4]
push	edx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [ebx]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7B39
call	sub_650DF0

loc_6D7B39:
cmp	dword ptr [esi+1Ch], 5
jl	loc_6D7E32
mov	ebx, [edi]
lea	eax, [esp+18h+arg_0]
push	eax
push	4
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aItalic_1 ; "italic"
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
push	edx
mov	ecx, edi
call	eax
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7B8E
call	sub_650DF0

loc_6D7B8E:
cmp	dword ptr [esi+1Ch], 6
jl	loc_6D7E32
mov	ebx, [edi]
lea	ecx, [esp+18h+arg_0]
push	ecx
push	5
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aUnderline ; "underline"
lea	edx, [esp+24h+var_4]
push	edx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [ebx]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7BE3
call	sub_650DF0

loc_6D7BE3:
cmp	dword ptr [esi+1Ch], 7
jl	loc_6D7E32
mov	ebx, [edi]
lea	eax, [esp+18h+arg_0]
push	eax
push	6
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aUrl	; "url"
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
push	edx
mov	ecx, edi
call	eax
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7C38
call	sub_650DF0

loc_6D7C38:
cmp	dword ptr [esi+1Ch], 8
jl	loc_6D7E32
mov	ebx, [edi]
lea	ecx, [esp+18h+arg_0]
push	ecx
push	7
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aTarget_0 ; "target"
lea	edx, [esp+24h+var_4]
push	edx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [ebx]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7C8D
call	sub_650DF0

loc_6D7C8D:
cmp	dword ptr [esi+1Ch], 9
jl	loc_6D7E32
mov	ebx, [edi]
lea	eax, [esp+18h+arg_0]
push	eax
push	8
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aAlign_0	; "align"
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
push	edx
mov	ecx, edi
call	eax
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7CE2
call	sub_650DF0

loc_6D7CE2:
cmp	dword ptr [esi+1Ch], 0Ah
jl	loc_6D7E32
mov	ebx, [edi]
lea	ecx, [esp+18h+arg_0]
push	ecx
push	9
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aLeftmargin ; "leftMargin"
lea	edx, [esp+24h+var_4]
push	edx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [ebx]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7D37
call	sub_650DF0

loc_6D7D37:
cmp	dword ptr [esi+1Ch], 0Bh
jl	loc_6D7E32
mov	ebx, [edi]
lea	eax, [esp+18h+arg_0]
push	eax
push	0Ah
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aRightmargin ; "rightMargin"
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
push	edx
mov	ecx, edi
call	eax
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7D8C
call	sub_650DF0

loc_6D7D8C:
cmp	dword ptr [esi+1Ch], 0Ch
jl	loc_6D7E32
mov	ebx, [edi]
lea	ecx, [esp+18h+arg_0]
push	ecx
push	0Bh
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aIndent	; "indent"
lea	edx, [esp+24h+var_4]
push	edx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [ebx]
push	eax
mov	eax, [esi+18h]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7DE1
call	sub_650DF0

loc_6D7DE1:
cmp	dword ptr [esi+1Ch], 0Dh
jl	short loc_6D7E32
mov	ebx, [edi]
lea	eax, [esp+18h+arg_0]
push	eax
push	0Ch
mov	ecx, esi
mov	byte ptr [esp+20h+arg_0], 0
add	ebx, 0Ch
call	sub_651EC0
push	eax
push	offset aLeading	; "leading"
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, ebp
call	sub_4E4640
mov	edx, [esi+18h]
push	eax
mov	eax, [ebx]
push	edx
mov	ecx, edi
call	eax
mov	eax, [esp+18h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D7E32
call	sub_650DF0

loc_6D7E32:
mov	edi, [esp+18h+var_8]
pop	ebp

loc_6D7E37:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6D7E51
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
add	esp, 8
jmp	sub_64B3B0

loc_6D7E51:
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_6D7930 endp

align 10h



sub_6D7E60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	78h
call	eax
test	eax, eax
jz	short loc_6D7E89
push	esi
mov	ecx, eax
call	sub_6D6750
pop	esi
retn	4

loc_6D7E89:
xor	eax, eax
pop	esi
retn	4
sub_6D7E60 endp

align 10h



sub_6D7E90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_6D6670
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+78h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143B770
mov	dword ptr [esi+10h], offset off_143B668
mov	dword ptr [ecx], offset	off_143B660
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6D7E90 endp

align 10h



sub_6D7EF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6D7E90
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143B5BC
push	edi
lea	ecx, [esi+78h]
push	esi
mov	dword ptr [esi], offset	off_143B770
mov	dword ptr [esi+10h], offset off_143B668
mov	dword ptr [ecx], offset	off_143B660
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6D7EF0 endp

align 10h



sub_6D7F40 proc	near
sub	ecx, 10h
jmp	sub_6D7F50
sub_6D7F40 endp

align 10h



sub_6D7F50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+78h]
push	edi
mov	dword ptr [esi], offset	off_143B770
mov	dword ptr [esi+10h], offset off_143B668
mov	dword ptr [ecx], offset	off_143B660
call	sub_665A40
lea	edi, [esi+60h]
mov	ecx, edi
mov	dword ptr [edi], offset	off_143AB58
call	sub_6FFB90
mov	ecx, edi
call	sub_64A3F0
lea	ecx, [esi+34h]
call	sub_694380
mov	ecx, esi
call	sub_664A30
test	[esp+8+arg_0], 1
jz	short loc_6D7FAA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6D7FAA:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6D7F50 endp

align 10h



sub_6D7FC0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6D7FD0
align 10h

loc_6D7FD0:
push	esi
mov	esi, ecx
call	sub_67BDD0
test	[esp+4+arg_0], 1
jz	short loc_6D7FED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6D7FED:
mov	eax, esi
pop	esi
retn	4
sub_6D7FC0 endp

align 10h



sub_6D8000 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6D8035 ; default
jmp	ds:off_6D8038[eax*4] ; switch jump

loc_6D8010:		; jumptable 006D8009 case 0
call	sub_6D6620
retn	4

loc_6D8018:		; jumptable 006D8009 case 1
call	sub_6D6450
retn	4

loc_6D8020:		; jumptable 006D8009 case 2
call	sub_6D64D0
retn	4

loc_6D8028:		; jumptable 006D8009 case 3
call	sub_6D65D0
retn	4

loc_6D8030:		; jumptable 006D8009 case 4
call	sub_6D6540

locret_6D8035:		; default
retn	4
sub_6D8000 endp

off_6D8038 dd offset loc_6D8010	; jump table for switch	statement
dd offset loc_6D8018
dd offset loc_6D8020
dd offset loc_6D8028
dd offset loc_6D8030
align 10h



sub_6D8050 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6D809C
push	offset sub_6D7930
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143B798
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_6D809E

loc_6D809C:
xor	edi, edi

loc_6D809E:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	98h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6D80EE
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6D7EF0
mov	ebx, eax
test	ebx, ebx
jz	short loc_6D80EE
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6D80EE:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 20h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6D811C
call	sub_64B3B0

loc_6D811C:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 88h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6D816B
mov	ecx, ebx
call	sub_64B3B0

loc_6D816B:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6D8050 endp

align 10h



sub_6D8180 proc	near

arg_0= dword ptr  4

add	ecx, 34h
push	ecx
mov	ecx, [esp+4+arg_0]
call	sub_67EC40
retn	4
sub_6D8180 endp




sub_6D8190 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	2Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D81B4
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_6D81B4:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D81E1
add	eax, 0FFFFFFF0h
jz	short loc_6D81E1
push	edi
lea	ecx, [eax+34h]
call	sub_6F6320
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6D81DA
mov	ecx, esi
call	sub_652060

loc_6D81DA:
mov	[esi+4], edi
mov	byte ptr [esi],	4
pop	edi

loc_6D81E1:
pop	esi
retn
sub_6D8190 endp

align 10h



sub_6D81F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	2Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D8214
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_6D8214:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D8289
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6D8288
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6D8288
mov	eax, [esi+18h]
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
cmp	dword ptr [esi+1Ch], 1
mov	edi, eax
jle	short loc_6D825C
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
jmp	short loc_6D8264

loc_6D825C:
lea	ecx, [ebx+34h]
call	sub_6F6320

loc_6D8264:
cmp	eax, edi
ja	short loc_6D826B
lea	eax, [edi+1]

loc_6D826B:
push	eax
push	edi
lea	ecx, [ebx+34h]
call	sub_6F6520
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	byte ptr [esi],	2
mov	[esi+4], bl
pop	edi

loc_6D8288:
pop	ebx

loc_6D8289:
pop	esi
retn
sub_6D81F0 endp

align 10h



sub_6D8290 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	2Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D82B6
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_6D82B6:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D832A
push	ebp
lea	ebp, [eax-10h]
test	ebp, ebp
jz	short loc_6D8329
cmp	dword ptr [esi+1Ch], 3
jl	short loc_6D8329
mov	eax, [esi+18h]
push	ebx
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
mov	ebx, eax
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
mov	edi, eax
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+14h+var_4], al
cmp	edi, ebx
ja	short loc_6D8318
lea	edi, [ebx+1]

loc_6D8318:
mov	eax, [esp+14h+var_4]
push	eax
push	edi
push	ebx
lea	ecx, [ebp+34h]
call	sub_6F89F0
pop	edi
pop	ebx

loc_6D8329:
pop	ebp

loc_6D832A:
pop	esi
pop	ecx
retn
sub_6D8290 endp

align 10h



sub_6D8330 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
push	2Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D835A
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 0Ch
retn

loc_6D835A:
push	ebp
mov	ebp, [esi+8]
test	ebp, ebp
jz	loc_6D8448
add	ebp, 0FFFFFFF0h
jz	loc_6D8448
cmp	dword ptr [esi+1Ch], 3
jl	loc_6D8448
mov	eax, [esi+18h]
push	ebx
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ebx, [esi+18h]
push	1
mov	ecx, esi
mov	edi, eax
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+28h+var_8]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+1Ch+var_4], al
mov	eax, [esp+1Ch+var_8]
mov	ecx, [eax+10h]
mov	edx, [eax]
push	ecx
push	edx
lea	ecx, [esp+24h+var_C]
call	sub_67AF00
mov	eax, [esp+1Ch+var_C]
mov	ecx, [esp+1Ch+var_4]
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
push	edi
lea	ecx, [ebp+34h]
call	sub_6F6070
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6D8404
mov	ecx, esi
call	sub_652060

loc_6D8404:
mov	byte ptr [esi],	4
mov	[esi+4], edi
mov	esi, [esp+1Ch+var_C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
pop	edi
pop	ebx
jnz	short loc_6D8432
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6D8432:
mov	eax, [esp+14h+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8448
call	sub_650DF0

loc_6D8448:
pop	ebp
pop	esi
add	esp, 0Ch
retn
sub_6D8330 endp

align 10h



sub_6D8450 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	edi
mov	edi, [esp+0Ch+arg_0]
push	2Bh
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6D847A
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 8
retn

loc_6D847A:
mov	eax, [edi+8]
test	eax, eax
jz	loc_6D8543
push	esi
lea	esi, [eax-10h]
test	esi, esi
jz	loc_6D8542
cmp	dword ptr [edi+1Ch], 0
jle	short loc_6D84B1
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+10h+var_8], al
jmp	short loc_6D84B6

loc_6D84B1:
mov	byte ptr [esp+10h+var_8], 0

loc_6D84B6:
mov	ecx, [esp+10h+var_8]
push	ecx
lea	edx, [esp+14h+var_4]
push	edx
lea	ecx, [esi+34h]
call	sub_6F63E0
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	eax, [esp+10h+var_4]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_6D8506
mov	ecx, edi
call	sub_652060

loc_6D8506:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D851C
mov	ecx, esi
call	sub_650DF0

loc_6D851C:
mov	esi, [esp+10h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6D8542
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6D8542:
pop	esi

loc_6D8543:
pop	edi
add	esp, 8
retn
sub_6D8450 endp

align 10h



sub_6D8550 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	edi
mov	edi, [esp+0Ch+arg_0]
push	2Bh
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6D857A
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 8
retn

loc_6D857A:
mov	eax, [edi+8]
test	eax, eax
jz	loc_6D868A
push	ebp
lea	ebp, [eax-10h]
test	ebp, ebp
jz	loc_6D8689
cmp	dword ptr [edi+1Ch], 2
jl	loc_6D8689
mov	eax, [edi+18h]
push	ebx
push	esi
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ecx, [edi+18h]
push	ecx
push	1
mov	ecx, edi
mov	ebx, eax
call	sub_651EC0
mov	ecx, eax
call	sub_653750
cmp	dword ptr [edi+1Ch], 3
mov	esi, eax
jge	short loc_6D85D6
mov	byte ptr [esp+18h+var_8], 0
jmp	short loc_6D85EE

loc_6D85D6:
mov	edx, [edi+18h]
push	edx
push	2
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+18h+var_8], al

loc_6D85EE:
cmp	esi, ebx
ja	short loc_6D85F5
lea	esi, [ebx+1]

loc_6D85F5:
mov	eax, [esp+18h+var_8]
push	eax
push	esi
push	ebx
lea	ecx, [esp+24h+var_4]
push	ecx
lea	ecx, [ebp+34h]
call	sub_6F6370
mov	edx, [edi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
mov	eax, [esp+18h+var_4]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
mov	ebx, 1
add	[esi+8], ebx
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_6D864C
mov	ecx, edi
call	sub_652060

loc_6D864C:
mov	byte ptr [edi],	5
mov	[edi+4], esi
add	[esi+8], ebx
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6D8662
mov	ecx, esi
call	sub_650DF0

loc_6D8662:
mov	esi, [esp+18h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, ebx
jnz	short loc_6D8687
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6D8687:
pop	esi
pop	ebx

loc_6D8689:
pop	ebp

loc_6D868A:
pop	edi
add	esp, 8
retn
sub_6D8550 endp

align 10h



sub_6D8690 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
push	2Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D86BA
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 0Ch
retn

loc_6D86BA:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6D8795
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6D8794
cmp	dword ptr [esi+1Ch], 2
jl	loc_6D8794
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+var_4]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+var_8]
cmp	dword ptr [esi+1Ch], 2
jle	short loc_6D872B
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+14h+var_C]
jmp	short loc_6D8731

loc_6D872B:
fldz
fstp	[esp+14h+var_C]

loc_6D8731:
fld	[esp+14h+var_C]
sub	esp, 0Ch
fld	ds:dbl_15FCE20
lea	ecx, [edi+34h]
fmul	st(1), st
fxch	st(1)
fstp	[esp+20h+var_C]
fld	[esp+20h+var_C]
fstp	[esp+20h+var_18]
fld	[esp+20h+var_8]
fmul	st, st(1)
fstp	[esp+20h+var_8]
fld	[esp+20h+var_8]
fstp	[esp+20h+var_1C]
fmul	[esp+20h+var_4]
fstp	[esp+20h+var_4]
fld	[esp+20h+var_4]
fstp	[esp+20h+var_20]
call	sub_6F8280
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	[esp+14h+var_4], eax
jb	short loc_6D878A
mov	ecx, esi
call	sub_652060

loc_6D878A:
fild	[esp+14h+var_4]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_6D8794:
pop	edi

loc_6D8795:
pop	esi
add	esp, 0Ch
retn
sub_6D8690 endp

align 10h



sub_6D87A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	2Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D87C6
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_6D87C6:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D8806
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6D8805
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6D8805
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	[esp+10h+var_4], eax
lea	ecx, [edi+34h]
mov	byte ptr [esp+10h+var_4+3], 0FFh
call	sub_6F65F0

loc_6D8805:
pop	edi

loc_6D8806:
pop	esi
pop	ecx
retn
sub_6D87A0 endp

align 10h



sub_6D8810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
lea	ecx, [esi+4]
mov	dword ptr [esi], offset	off_143A4DC
call	sub_64E8E0
fldz
mov	eax, [esp+4+arg_0]
fst	dword ptr [esi+1Ch]
mov	ecx, [esp+4+arg_4]
fst	dword ptr [esi+20h]
fst	dword ptr [esi+24h]
mov	[esi+44h], eax
fstp	dword ptr [esi+28h]
mov	dword ptr [esi], offset	off_143B8A8
mov	[esi+48h], ecx
mov	eax, esi
pop	esi
retn	8
sub_6D8810 endp

align 10h



sub_6D8850 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
push	esi
lea	esi, [ecx+eax*8-8]
test	eax, eax
jbe	short loc_6D8878
push	edi
mov	edi, eax

loc_6D8864:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6D886F
call	sub_64A400

loc_6D886F:
sub	esi, 8
sub	edi, 1
jnz	short loc_6D8864
pop	edi

loc_6D8878:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
retn
sub_6D8850 endp

align 10h



sub_6D8890 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	qword ptr -38h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 48h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+44h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6D88CB
mov	ecx, [esi+44h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	[esp+58h+var_44], eax
jmp	short loc_6D88D3

loc_6D88CB:
mov	[esp+58h+var_44], 0

loc_6D88D3:
mov	eax, [esi+34h]
mov	edx, [esi+44h]
mov	edi, [esp+58h+var_44]
push	0
mov	[esp+5Ch+var_10], 4
mov	dword ptr [esp+5Ch+var_C], eax
mov	byte ptr [esp+5Ch+var_48+3], 0
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
push	0Ah
push	offset aIndexinrun ; "indexInRun"
add	edi, 10h
call	sub_650E40
mov	[esp+58h+var_44+4], eax
mov	ebx, 1
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8943
call	sub_650DF0

loc_6D8943:
mov	ecx, [esi+30h]
mov	eax, [ecx]
mov	edx, [eax+3Ch]
call	edx
mov	ecx, [esi+44h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	eax
call	sub_651000
mov	ebp, eax
add	[ebp+arg_0], ebx
mov	byte ptr [esp+58h+var_20], 5
mov	dword ptr [esp+58h+var_20+4], ebp
add	[ebp+arg_0], ebx
mov	eax, [esi+44h]
push	0
mov	byte ptr [esp+5Ch+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	4
push	offset aFont	; "font"
call	sub_650E40
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_20]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D89C8
call	sub_650DF0

loc_6D89C8:
lea	ecx, [esp+58h+var_20]
call	sub_652830
add	[ebp+arg_0], 0FFFFFFFFh
jnz	short loc_6D89DE
mov	ecx, ebp
call	sub_650DF0

loc_6D89DE:
cmp	[esp+58h+var_10], 5
mov	ebp, [esi+3Ch]
jb	short loc_6D89F1
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D89F1:
mov	[esp+58h+var_44+4], ebp
fild	[esp+58h+var_44+4]
mov	[esp+58h+var_10], 3
test	ebp, ebp
jge	short loc_6D8A08
fadd	ds:flt_15FCC08

loc_6D8A08:
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
push	0
mov	byte ptr [esp+5Ch+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	5
push	offset aColor	; "color"
call	sub_650E40
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8A64
call	sub_650DF0

loc_6D8A64:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+38h]
fstp	[esp+58h+var_44+4]
jb	short loc_6D8A7B
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8A7B:
mov	eax, [esi+44h]
fld	[esp+58h+var_44+4]
lea	ecx, [esp+58h+var_48+3]
fstp	[esp+58h+var_C]
push	ecx
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	[esp+60h+var_10], 3
mov	edx, [edi]
mov	edx, [edx+0Ch]
mov	byte ptr [esp+60h+var_48+3], 0
mov	ecx, [eax+78h]
add	ecx, 208h
push	ecx
push	eax
mov	ecx, edi
call	edx
mov	al, [esi+40h]
lea	ecx, [esp+58h+var_10]
mov	byte ptr [esp+58h+var_48+3], al
call	sub_652060
mov	cl, byte ptr [esp+58h+var_48+3]
mov	edx, [esi+44h]
push	0
mov	[esp+5Ch+var_10], 2
mov	byte ptr [esp+5Ch+var_C], cl
mov	byte ptr [esp+5Ch+var_48+3], 0
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
push	8
push	offset aSelected ; "selected"
call	sub_650E40
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8B23
call	sub_650DF0

loc_6D8B23:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+4]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_20]
jb	short loc_6D8B48
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8B48:
fld	[esp+58h+var_20]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aMatrix_a ; "matrix_a"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8BA9
call	sub_650DF0

loc_6D8BA9:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+10h]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_20]
jb	short loc_6D8BCE
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8BCE:
fld	[esp+58h+var_20]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aMatrix_b ; "matrix_b"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8C2F
call	sub_650DF0

loc_6D8C2F:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+8]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_20]
jb	short loc_6D8C54
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8C54:
fld	[esp+58h+var_20]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aMatrix_c ; "matrix_c"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8CB5
call	sub_650DF0

loc_6D8CB5:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+14h]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_20]
jb	short loc_6D8CDA
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8CDA:
fld	[esp+58h+var_20]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aMatrix_d ; "matrix_d"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8D3B
call	sub_650DF0

loc_6D8D3B:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+0Ch]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_20]
jb	short loc_6D8D60
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8D60:
fld	[esp+58h+var_20]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aMatrix_tx ; "matrix_tx"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8DC1
call	sub_650DF0

loc_6D8DC1:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+18h]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_20]
jb	short loc_6D8DE6
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8DE6:
fld	[esp+58h+var_20]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aMatrix_ty ; "matrix_ty"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8E47
call	sub_650DF0

loc_6D8E47:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esi+1Ch]
fstp	dword ptr [esp+58h+var_38]
fld	dword ptr [esi+28h]
fstp	dword ptr [esp+58h+var_38+4]
fld	dword ptr [esi+24h]
fstp	dword ptr [esp+58h+var_30]
fld	dword ptr [esi+28h]
fstp	dword ptr [esp+58h+var_30+4]
fld	dword ptr [esi+1Ch]
fstp	dword ptr [esp+58h+var_20]
fld	dword ptr [esi+20h]
fstp	dword ptr [esp+58h+var_20+4]
fld	dword ptr [esi+24h]
fstp	dword ptr [esp+58h+var_28]
fld	dword ptr [esi+20h]
fstp	dword ptr [esp+58h+var_28+4]
fld	dword ptr [esp+58h+var_38]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	qword ptr [esp+58h+var_44+4]
jb	short loc_6D8EA5
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8EA5:
fld	qword ptr [esp+58h+var_44+4]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner0x ; "corner0x"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8F06
call	sub_650DF0

loc_6D8F06:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esp+58h+var_38+4]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_38]
jb	short loc_6D8F2C
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8F2C:
fld	[esp+58h+var_38]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner0y ; "corner0y"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D8F8D
call	sub_650DF0

loc_6D8F8D:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esp+58h+var_30]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_38]
jb	short loc_6D8FB3
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D8FB3:
fld	[esp+58h+var_38]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner1x ; "corner1x"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D9014
call	sub_650DF0

loc_6D9014:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esp+58h+var_30+4]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_30]
jb	short loc_6D903A
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D903A:
fld	[esp+58h+var_30]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner1y ; "corner1y"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D909B
call	sub_650DF0

loc_6D909B:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esp+58h+var_28]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_30]
jb	short loc_6D90C1
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D90C1:
fld	[esp+58h+var_30]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner2x ; "corner2x"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D9122
call	sub_650DF0

loc_6D9122:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esp+58h+var_28+4]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_28]
jb	short loc_6D9148
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D9148:
fld	[esp+58h+var_28]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner2y ; "corner2y"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D91A9
call	sub_650DF0

loc_6D91A9:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esp+58h+var_20]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_28]
jb	short loc_6D91CF
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D91CF:
fld	[esp+58h+var_28]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner3x ; "corner3x"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D9230
call	sub_650DF0

loc_6D9230:
cmp	[esp+58h+var_10], 5
fld	dword ptr [esp+58h+var_20+4]
fdiv	ds:dbl_15FCE20
fstp	[esp+58h+var_44+4]
fld	[esp+58h+var_44+4]
fstp	[esp+58h+var_20]
jb	short loc_6D9256
lea	ecx, [esp+58h+var_10]
call	sub_652060

loc_6D9256:
fld	[esp+58h+var_20]
mov	eax, [esi+44h]
fstp	[esp+58h+var_C]
mov	[esp+58h+var_10], 3
mov	byte ptr [esp+58h+var_48+3], 0
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	offset aCorner3y ; "corner3y"
call	sub_651000
mov	[esp+58h+var_44+4], eax
add	[eax+8], ebx
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+58h+var_48+3]
push	eax
lea	ecx, [esp+5Ch+var_10]
push	ecx
mov	ecx, [esi+44h]
lea	eax, [esp+60h+var_44+4]
push	eax
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+58h+var_44+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6D92B7
call	sub_650DF0

loc_6D92B7:
mov	edi, [esp+58h+var_44]
push	edi
lea	ecx, [esp+5Ch+var_20]
call	sub_652700
mov	ecx, [esi+48h]
push	eax
call	sub_65E720
lea	ecx, [esp+58h+var_20]
call	sub_652830
lea	ecx, [esp+58h+var_10]
call	sub_652830
mov	ecx, edi
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6D8890 endp

align 10h



sub_6D92F0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
arg_0= dword ptr  4

sub	esp, 50h
push	esi
mov	esi, [esp+54h+arg_0]
push	2Bh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D931A
push	0
push	0
push	offset aTextsnapshot ; "TextSnapshot"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 50h
retn

loc_6D931A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6D93D7
add	eax, 0FFFFFFF0h
mov	[esp+54h+var_50], eax
jz	loc_6D93D7
cmp	dword ptr [esi+1Ch], 2
jl	loc_6D93D7
mov	eax, [esi+18h]
push	ebx
push	ebp
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
mov	ebx, eax
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	edx, [esi+18h]
mov	ebp, eax
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_6D9395
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_65EF40
mov	edi, eax
jmp	short loc_6D9397

loc_6D9395:
xor	edi, edi

loc_6D9397:
mov	edx, [esi+18h]
push	edi
push	edx
lea	ecx, [esp+68h+var_4C]
call	sub_6D8810
mov	ecx, [esp+60h+var_50]
push	ebp
push	ebx
lea	eax, [esp+68h+var_4C]
push	eax
add	ecx, 34h
call	sub_6F7CF0
mov	ecx, [esi+4]
push	edi
call	sub_652E40
mov	[esp+60h+var_4C], offset off_143A4DC
test	edi, edi
jz	short loc_6D93D4
mov	ecx, edi
call	sub_64B3B0

loc_6D93D4:
pop	edi
pop	ebp
pop	ebx

loc_6D93D7:
pop	esi
add	esp, 50h
retn
sub_6D92F0 endp

align 10h



sub_6D93E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
lea	edi, [esi+10h]
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143B9BC
mov	dword ptr [edi], offset	off_143B968
call	sub_6F8C40
mov	ecx, [ebx+78h]
add	ebx, 78h
push	2Bh
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6D93E0 endp

align 10h



sub_6D9430 proc	near
mov	eax, 2Bh
retn
sub_6D9430 endp

align 10h



sub_6D9440 proc	near
sub	ecx, 10h
jmp	sub_6D9630
sub_6D9440 endp

align 10h



sub_6D9450 proc	near
push	ebx
push	esi
mov	esi, ecx
lea	ecx, [esi+48h]
push	edi
mov	dword ptr [esi], offset	off_143B9E4
mov	dword ptr [esi+10h], offset off_143BA08
mov	dword ptr [ecx], offset	off_143B9E0
call	sub_665A40
mov	dword ptr [esi], offset	off_143B9BC
mov	dword ptr [esi+10h], offset off_143B968
mov	edi, [esi+40h]
lea	ebx, [esi+34h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6D94A5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6D94A5:
mov	ecx, ebx
call	sub_6D8850
pop	edi
mov	ecx, esi
pop	esi
pop	ebx
jmp	sub_664A30
sub_6D9450 endp

align 10h



sub_6D94C0 proc	near

arg_0= byte ptr	 4

sub	ecx, 48h
jmp	sub_6D97C0
sub_6D94C0 endp

align 10h



sub_6D94D0 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+4Ch]
call	sub_67BFB0
lea	ecx, [edi+58h]
call	sub_67BFB0
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6D9532
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D9530
lea	ebx, [ebx+0]

loc_6D9500:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D952B
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6D952B
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6D952B:
inc	esi
cmp	esi, ebx
jb	short loc_6D9500

loc_6D9530:
pop	esi
pop	ebx

loc_6D9532:
pop	edi
retn
sub_6D94D0 endp

align 10h



sub_6D9540 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+4Ch]
call	sub_67C210
lea	ecx, [edi+58h]
call	sub_67C210
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6D958A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D9588
lea	ebx, [ebx+0]

loc_6D9570:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D9583
call	sub_64B020

loc_6D9583:
inc	esi
cmp	esi, ebx
jb	short loc_6D9570

loc_6D9588:
pop	esi
pop	ebx

loc_6D958A:
pop	edi
retn
sub_6D9540 endp

align 10h



sub_6D9590 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+4Ch]
call	sub_67C1F0
lea	ecx, [edi+58h]
call	sub_67C1F0
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6D95DA
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6D95D8
lea	ebx, [ebx+0]

loc_6D95C0:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6D95D3
call	sub_64B3B0

loc_6D95D3:
inc	esi
cmp	esi, ebx
jb	short loc_6D95C0

loc_6D95D8:
pop	esi
pop	ebx

loc_6D95DA:
pop	edi
retn
sub_6D9590 endp

align 10h



sub_6D95E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6D9615 ; default
jmp	ds:off_6D9618[eax*4] ; switch jump

loc_6D95F0:		; jumptable 006D95E9 case 0
call	sub_6D9590
retn	4

loc_6D95F8:		; jumptable 006D95E9 case 1
call	sub_6B7310
retn	4

loc_6D9600:		; jumptable 006D95E9 case 2
call	sub_6D94D0
retn	4

loc_6D9608:		; jumptable 006D95E9 case 3
call	sub_6D9540
retn	4

loc_6D9610:		; jumptable 006D95E9 case 4
call	sub_6BE9C0

locret_6D9615:		; default
retn	4
sub_6D95E0 endp

off_6D9618 dd offset loc_6D95F0	; jump table for switch	statement
dd offset loc_6D95F8
dd offset loc_6D9600
dd offset loc_6D9608
dd offset loc_6D9610
align 10h



sub_6D9630 proc	near

arg_0= byte ptr	 4

push	ebx
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_143B9BC
mov	dword ptr [esi+10h], offset off_143B968
mov	edi, [esi+40h]
lea	ebx, [esi+34h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6D966A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6D966A:
mov	ecx, ebx
call	sub_6D8850
mov	ecx, esi
call	sub_664A30
test	[esp+0Ch+arg_0], 1
jz	short loc_6D968D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6D968D:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6D9630 endp

align 10h



sub_6D96A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
lea	edi, [esi+10h]
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143B9BC
mov	dword ptr [edi], offset	off_143B968
call	sub_6F8C40
mov	eax, [esp+0Ch+arg_4]
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+48h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143B9E4
mov	dword ptr [edi], offset	off_143BA08
mov	dword ptr [ecx], offset	off_143B9E0
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6D96A0 endp

align 10h



sub_6D9720 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+40h]
lea	ebx, [edi+34h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6D974D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6D974D:
mov	ecx, ebx
call	sub_6D8850
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_664580
sub_6D9720 endp

align 10h



sub_6D9760 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6D96A0
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143B858
push	edi
lea	ecx, [esi+48h]
push	esi
mov	dword ptr [esi], offset	off_143B9E4
mov	dword ptr [esi+10h], offset off_143BA08
mov	dword ptr [ecx], offset	off_143B9E0
mov	byte ptr [esp+18h+arg_8], 6
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6D9760 endp

align 10h



sub_6D97B0 proc	near
sub	ecx, 10h
jmp	sub_6D97C0
sub_6D97B0 endp

align 10h



sub_6D97C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6D9450
test	[esp+4+arg_0], 1
jz	short loc_6D97DD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6D97DD:
mov	eax, esi
pop	esi
retn	4
sub_6D97C0 endp

align 10h



sub_6D97F0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6D981D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+64h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6D981D:
mov	esi, [edi+40h]
lea	ebx, [edi+34h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6D9845
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6D9845:
mov	ecx, ebx
call	sub_6D8850
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_664580
sub_6D97F0 endp

align 10h



sub_6D9860 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6D98A8
push	ebx
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143C238
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_6D98AA

loc_6D98A8:
xor	edi, edi

loc_6D98AA:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	68h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6D98F7
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6D9760
mov	ebx, eax
test	ebx, ebx
jz	short loc_6D98F7
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6D98F7:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 2Bh
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6D9925
call	sub_64B3B0

loc_6D9925:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 0B4h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6D9974
mov	ecx, ebx
call	sub_64B3B0

loc_6D9974:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6D9860 endp

align 10h



sub_6D9980 proc	near
mov	eax, offset aDate ; "Date"
retn	4
sub_6D9980 endp

align 10h



sub_6D9990 proc	near
mov	eax, ecx
and	eax, 80000003h
jns	short loc_6D999E
dec	eax
or	eax, 0FFFFFFFCh
inc	eax

loc_6D999E:
jnz	short loc_6D99DB
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6D99D5
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
sub	ecx, eax
jnz	short loc_6D99DB

loc_6D99D5:
mov	eax, 1
retn

loc_6D99DB:
xor	eax, eax
retn
sub_6D9990 endp

align 10h



sub_6D99E0 proc	near
sub	ecx, 7B2h
lea	edx, [ecx+171h]
mov	eax, 51EB851Fh
imul	edx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
push	esi
mov	esi, eax
lea	edx, [ecx+45h]
mov	eax, 51EB851Fh
imul	edx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
sub	esi, eax
lea	eax, [ecx+1]
imul	ecx, 16Dh
cdq
and	edx, 3
add	eax, edx
sar	eax, 2
add	esi, eax
add	esi, ecx
mov	eax, esi
pop	esi
retn
sub_6D99E0 endp




sub_6D9A30 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+64h]
mov	ecx, [esi+40h]
mov	ebx, [esi+44h]
add	ecx, eax
cdq
add	eax, [esi+38h]
push	edi
mov	edi, [esi+3Ch]
adc	edi, edx
cmp	ecx, 5265C00h
mov	[esi+54h], edi
mov	edi, [esi+48h]
mov	[esi+58h], ecx
mov	[esi+50h], eax
mov	[esi+60h], edi
mov	[esi+5Ch], ebx
jge	short loc_6D9A67
test	ecx, ecx
jge	short loc_6D9AD8

loc_6D9A67:
lea	edx, [ecx+337F9800h]
mov	eax, 31B5D43Bh
imul	edx
sar	edx, 18h
mov	eax, edx
shr	eax, 1Fh
lea	eax, [edx+eax-0Ah]
add	edi, eax
imul	eax, 5265C00h
sub	ecx, eax
mov	[esi+58h], ecx
mov	ecx, ebx
mov	[esi+60h], edi
call	sub_6D9990
xor	ecx, ecx
test	al, al
setnz	cl
add	ecx, 16Dh
mov	eax, ecx
cmp	edi, eax
jl	short loc_6D9AB7
sub	edi, eax
mov	[esi+60h], edi
inc	ebx
pop	edi
mov	[esi+5Ch], ebx
pop	esi
pop	ebx
retn

loc_6D9AB7:
test	edi, edi
jge	short loc_6D9AD8
lea	ecx, [ebx-1]
mov	[esi+5Ch], ecx
call	sub_6D9990
xor	edx, edx
test	al, al
setnz	dl
add	edx, 16Dh
add	edx, edi
mov	[esi+60h], edx

loc_6D9AD8:
pop	edi
pop	esi
pop	ebx
retn
sub_6D9A30 endp

align 10h



sub_6D9AE0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+64h]
mov	ecx, [esi+58h]
mov	ebx, [esi+5Ch]
sub	ecx, eax
push	edi
mov	edi, [esi+50h]
cdq
sub	edi, eax
mov	eax, [esi+54h]
sbb	eax, edx
cmp	ecx, 5265C00h
mov	[esi+38h], edi
mov	edi, [esi+60h]
mov	[esi+40h], ecx
mov	[esi+3Ch], eax
mov	[esi+48h], edi
mov	[esi+44h], ebx
jge	short loc_6D9B19
test	ecx, ecx
jge	short loc_6D9B80

loc_6D9B19:
lea	edx, [ecx+337F9800h]
mov	eax, 31B5D43Bh
imul	edx
sar	edx, 18h
mov	eax, edx
shr	eax, 1Fh
lea	eax, [edx+eax-0Ah]
add	edi, eax
imul	eax, 5265C00h
sub	ecx, eax
mov	[esi+40h], ecx
mov	ecx, ebx
mov	[esi+48h], edi
call	sub_6D9990
xor	ecx, ecx
test	al, al
setnz	cl
add	ecx, 16Dh
mov	eax, ecx
cmp	edi, eax
jl	short loc_6D9B69
sub	edi, eax
mov	[esi+48h], edi
inc	ebx
pop	edi
mov	[esi+44h], ebx
pop	esi
pop	ebx
retn

loc_6D9B69:
test	edi, edi
jge	short loc_6D9B80
lea	ecx, [ebx-1]
mov	[esi+44h], ecx
call	sub_6D9990
movzx	edx, al
add	edx, edi
mov	[esi+48h], edx

loc_6D9B80:
pop	edi
pop	esi
pop	ebx
retn
sub_6D9AE0 endp

align 10h



sub_6D9B90 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D9BBA
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6D9BBA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D9BC6
add	eax, 0FFFFFFF0h
jmp	short loc_6D9BC8

loc_6D9BC6:
xor	eax, eax

loc_6D9BC8:
mov	ecx, [eax+64h]
mov	esi, [esi+4]
mov	eax, 0BA184D8Dh
imul	ecx
sar	edx, 0Eh
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6D9BF7
mov	ecx, esi
call	sub_652060

loc_6D9BF7:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6D9B90 endp

align 10h



sub_6D9C10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
push	23h
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_6D9C36
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, ebp
call	sub_651C60
pop	ebp
pop	ecx
retn

loc_6D9C36:
mov	eax, [ebp+8]
test	eax, eax
jz	short loc_6D9C42
add	eax, 0FFFFFFF0h
jmp	short loc_6D9C44

loc_6D9C42:
xor	eax, eax

loc_6D9C44:
mov	ecx, [eax+5Ch]
push	ebx
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
and	edi, 80000003h
jns	short loc_6D9C5B
dec	edi
or	edi, 0FFFFFFFCh
inc	edi

loc_6D9C5B:
mov	ebx, [eax+60h]
mov	edi, edi

loc_6D9C60:
test	edi, edi
jnz	short loc_6D9CA2
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6D9C9B
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6D9CA2

loc_6D9C9B:
mov	eax, 1
jmp	short loc_6D9CA4

loc_6D9CA2:
xor	eax, eax

loc_6D9CA4:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	edx, [esi+eax*4]
cmp	ebx, ds:dword_143BC88[edx*4]
jl	short loc_6D9CDD
inc	esi
cmp	esi, 0Ch
jl	short loc_6D9C60
mov	esi, [ebp+4]
cmp	byte ptr [esi],	5
jb	short loc_6D9CCB
mov	ecx, esi
call	sub_652060

loc_6D9CCB:
fld	ds:dbl_15FCD60
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	ebp
pop	ecx
retn

loc_6D9CDD:
mov	[esp+14h+var_4], esi
mov	esi, [ebp+4]
cmp	byte ptr [esi],	5
jb	short loc_6D9CF0
mov	ecx, esi
call	sub_652060

loc_6D9CF0:
fild	[esp+14h+var_4]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	ebp
pop	ecx
retn
sub_6D9C10 endp




sub_6D9D00 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	23h
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_6D9D2A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, ebp
call	sub_651C60
pop	ebp
add	esp, 8
retn

loc_6D9D2A:
mov	eax, [ebp+8]
push	edi
test	eax, eax
jz	short loc_6D9D37
lea	edi, [eax-10h]
jmp	short loc_6D9D39

loc_6D9D37:
xor	edi, edi

loc_6D9D39:
push	ebx
push	esi
mov	esi, [edi+5Ch]
mov	ecx, esi
call	sub_6D9990
mov	ecx, [edi+60h]
movzx	ebx, al
lea	eax, [ebx+ebx*2]
shl	eax, 4
cmp	ecx, ds:dword_143BC88[eax]
jge	short loc_6D9D87
mov	esi, [ebp+4]
inc	ecx
mov	dword ptr [esp+18h+var_8], ecx
fild	dword ptr [esp+18h+var_8]

loc_6D9D65:
cmp	byte ptr [esi],	5
fstp	[esp+18h+var_8]
jb	short loc_6D9D75
mov	ecx, esi
call	sub_652060

loc_6D9D75:
fld	[esp+18h+var_8]
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 8
retn

loc_6D9D87:
mov	ebp, esi
and	ebp, 80000003h
mov	edi, 1
jns	short loc_6D9DA0
dec	ebp
or	ebp, 0FFFFFFFCh
inc	ebp
jmp	short loc_6D9DA0
align 10h

loc_6D9DA0:
test	ebp, ebp
jnz	short loc_6D9DE2
mov	eax, 51EB851Fh
imul	esi
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, esi
sub	edx, eax
jnz	short loc_6D9DDB
mov	eax, 51EB851Fh
imul	esi
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, esi
sub	edx, eax
jnz	short loc_6D9DE2

loc_6D9DDB:
mov	eax, 1
jmp	short loc_6D9DE4

loc_6D9DE2:
xor	eax, eax

loc_6D9DE4:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	edx, [edi+eax*4]
cmp	ecx, ds:dword_143BC88[edx*4]
jl	short loc_6D9E23
inc	edi
cmp	edi, 0Ch
jl	short loc_6D9DA0
mov	ecx, [esp+18h+arg_0]
mov	esi, [ecx+4]
cmp	byte ptr [esi],	5
jb	short loc_6D9E0F
mov	ecx, esi
call	sub_652060

loc_6D9E0F:
fld	ds:dbl_15FCD60
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 8
retn

loc_6D9E23:
lea	eax, [ebx+ebx*2]
lea	edx, [edi+eax*4]
sub	ecx, ds:dword_143BC84[edx*4]
mov	eax, [esp+18h+arg_0]
mov	esi, [eax+4]
inc	ecx
mov	dword ptr [esp+18h+var_8], ecx
fild	dword ptr [esp+18h+var_8]
jmp	loc_6D9D65
sub_6D9D00 endp

align 10h



sub_6D9E50 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D9E7A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6D9E7A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D9E86
add	eax, 0FFFFFFF0h
jmp	short loc_6D9E88

loc_6D9E86:
xor	eax, eax

loc_6D9E88:
mov	ecx, [eax+54h]
mov	edx, [eax+50h]
push	0
push	5265C00h
push	ecx
push	edx
call	__alldiv
add	eax, 4
cdq
mov	ecx, 7
idiv	ecx
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], edx
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6D9EC2
mov	ecx, esi
call	sub_652060

loc_6D9EC2:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6D9E50 endp

align 10h



sub_6D9EE0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D9F0A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6D9F0A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D9F16
add	eax, 0FFFFFFF0h
jmp	short loc_6D9F18

loc_6D9F16:
xor	eax, eax

loc_6D9F18:
mov	ecx, [eax+58h]
mov	esi, [esi+4]
mov	eax, 4A90BE59h
imul	ecx
sar	edx, 14h
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6D9F47
mov	ecx, esi
call	sub_652060

loc_6D9F47:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6D9EE0 endp

align 10h



sub_6D9F60 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6D9F8A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6D9F8A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6D9F96
add	eax, 0FFFFFFF0h
jmp	short loc_6D9F98

loc_6D9F96:
xor	eax, eax

loc_6D9F98:
mov	eax, [eax+58h]
cdq
mov	ecx, 36EE80h
idiv	ecx
mov	esi, [esi+4]
mov	eax, 45E7B273h
imul	edx
sar	edx, 0Eh
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6D9FCF
mov	ecx, esi
call	sub_652060

loc_6D9FCF:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6D9F60 endp

align 10h



sub_6D9FE0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DA00A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DA00A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DA016
add	eax, 0FFFFFFF0h
jmp	short loc_6DA018

loc_6DA016:
xor	eax, eax

loc_6DA018:
mov	eax, [eax+58h]
cdq
mov	ecx, 0EA60h
idiv	ecx
mov	esi, [esi+4]
mov	eax, 10624DD3h
imul	edx
sar	edx, 6
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DA04F
mov	ecx, esi
call	sub_652060

loc_6DA04F:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6D9FE0 endp

align 10h



sub_6DA060 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DA08A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DA08A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DA096
add	eax, 0FFFFFFF0h
jmp	short loc_6DA098

loc_6DA096:
xor	eax, eax

loc_6DA098:
mov	eax, [eax+58h]
cdq
mov	ecx, 3E8h
idiv	ecx
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], edx
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DA0BE
mov	ecx, esi
call	sub_652060

loc_6DA0BE:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DA060 endp

align 10h



sub_6DA0D0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DA0FA
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DA0FA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DA106
add	eax, 0FFFFFFF0h
jmp	short loc_6DA108

loc_6DA106:
xor	eax, eax

loc_6DA108:
mov	eax, [eax+5Ch]
mov	esi, [esi+4]
sub	eax, 76Ch
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DA12B
mov	ecx, esi
call	sub_652060

loc_6DA12B:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DA0D0 endp

align 10h



sub_6DA140 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DA16A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DA16A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DA176
add	eax, 0FFFFFFF0h
jmp	short loc_6DA178

loc_6DA176:
xor	eax, eax

loc_6DA178:
fild	dword ptr [eax+5Ch]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
fstp	[esp+0Ch+var_8]
jb	short loc_6DA18E
mov	ecx, esi
call	sub_652060

loc_6DA18E:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DA140 endp

align 10h



sub_6DA1A0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA1C4
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DA1C4:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DA1D1
lea	esi, [eax-10h]
jmp	short loc_6DA1D3

loc_6DA1D1:
xor	esi, esi

loc_6DA1D3:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6DA260
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
cmp	ebx, 63h
ja	short loc_6DA204
add	ebx, 76Ch

loc_6DA204:
mov	edi, [esi+60h]
cmp	edi, 3Ch
jl	short loc_6DA228
mov	ecx, [esi+5Ch]
call	sub_6D9990
movzx	ecx, al
sub	edi, ecx
mov	ecx, ebx
call	sub_6D9990
movzx	edx, al
add	edi, edx
mov	[esi+60h], edi

loc_6DA228:
mov	ecx, ebx
call	sub_6D99E0
add	eax, [esi+60h]
push	0
cdq
push	5265C00h
push	edx
push	eax
call	__allmul
mov	ecx, eax
mov	eax, [esi+58h]
mov	edi, edx
cdq
add	ecx, eax
adc	edi, edx
mov	[esi+5Ch], ebx
mov	[esi+50h], ecx
pop	ebx
mov	[esi+54h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9AE0

loc_6DA260:
pop	esi
pop	edi
retn
sub_6DA1A0 endp

align 10h



sub_6DA270 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA294
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DA294:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DA2A1
lea	esi, [eax-10h]
jmp	short loc_6DA2A3

loc_6DA2A1:
xor	esi, esi

loc_6DA2A3:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DA321
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+60h]
cmp	edi, 3Ch
mov	ebx, eax
jl	short loc_6DA2E9
mov	ecx, [esi+5Ch]
call	sub_6D9990
movzx	ecx, al
sub	edi, ecx
mov	ecx, ebx
call	sub_6D9990
movzx	edx, al
add	edi, edx
mov	[esi+60h], edi

loc_6DA2E9:
mov	ecx, ebx
call	sub_6D99E0
add	eax, [esi+60h]
push	0
cdq
push	5265C00h
push	edx
push	eax
call	__allmul
mov	ecx, eax
mov	eax, [esi+58h]
mov	edi, edx
cdq
add	ecx, eax
adc	edi, edx
mov	[esi+5Ch], ebx
mov	[esi+50h], ecx
pop	ebx
mov	[esi+54h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9AE0

loc_6DA321:
pop	esi
pop	edi
retn
sub_6DA270 endp

align 10h



sub_6DA330 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	edi
mov	edi, [esp+0Ch+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA35A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 8
retn

loc_6DA35A:
push	esi
mov	esi, [edi+8]
test	esi, esi
jz	short loc_6DA367
add	esi, 0FFFFFFF0h
jmp	short loc_6DA369

loc_6DA367:
xor	esi, esi

loc_6DA369:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6DA42C
mov	eax, [edi+18h]
push	ebx
push	ebp
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
push	edi
mov	ebp, eax
call	sub_6D9D00
mov	ecx, [edi+18h]
add	esp, 4
push	ecx
mov	ecx, [edi+4]
call	sub_653400
call	__ftol2_sse
mov	edx, [esi+60h]
xor	ebx, ebx
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], edx
test	ebp, ebp
jle	short loc_6DA3D4
mov	ecx, [esi+5Ch]
call	sub_6D9990
movzx	eax, al
lea	eax, [eax+eax*2]
lea	ecx, [ebp+eax*4+0]
mov	ebx, ds:dword_143BC84[ecx*4]

loc_6DA3D4:
mov	ecx, [esi+5Ch]
call	sub_6D9990
movzx	eax, al
lea	edx, [eax+eax*2]
lea	eax, [ebp+edx*4+0]
mov	eax, ds:dword_143BC88[eax*4]
sub	eax, ebx
cmp	[esp+18h+var_8], eax
jle	short loc_6DA3F9
mov	[esp+18h+var_8], eax

loc_6DA3F9:
mov	ecx, [esp+18h+var_8]
lea	eax, [ebx+ecx-1]
mov	[esi+60h], eax
sub	eax, [esp+18h+var_4]
push	0
cdq
push	5265C00h
push	edx
push	eax
call	__allmul
add	[esi+50h], eax
adc	[esi+54h], edx
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
pop	ebp
mov	byte ptr [edi],	0
pop	ebx

loc_6DA42C:
pop	esi
pop	edi
add	esp, 8
retn
sub_6DA330 endp

align 10h



sub_6DA440 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, [esp+8+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA466
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	ecx
retn

loc_6DA466:
push	esi
mov	esi, [edi+8]
test	esi, esi
jz	short loc_6DA473
add	esi, 0FFFFFFF0h
jmp	short loc_6DA475

loc_6DA473:
xor	esi, esi

loc_6DA475:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6DA513
mov	eax, [edi+18h]
push	ebx
push	ebp
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ecx, [esi+5Ch]
mov	ebx, ecx
xor	edi, edi
and	ebx, 80000003h
mov	[esp+14h+var_4], eax
jns	short loc_6DA4B2
dec	ebx
or	ebx, 0FFFFFFFCh
inc	ebx

loc_6DA4B2:
mov	ebp, [esi+60h]

loc_6DA4B5:
test	ebx, ebx
jnz	short loc_6DA4F7
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DA4F0
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DA4F7

loc_6DA4F0:
mov	eax, 1
jmp	short loc_6DA4F9

loc_6DA4F7:
xor	eax, eax

loc_6DA4F9:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	edx, [edi+eax*4]
cmp	ebp, ds:dword_143BC88[edx*4]
jl	short loc_6DA517
inc	edi
cmp	edi, 0Ch
jl	short loc_6DA4B5
pop	ebp
pop	ebx

loc_6DA513:
pop	esi
pop	edi
pop	ecx
retn

loc_6DA517:
test	edi, edi
jz	short loc_6DA532
call	sub_6D9990
movzx	eax, al
lea	eax, [eax+eax*2]
lea	ecx, [edi+eax*4]
mov	eax, ds:dword_143BC84[ecx*4]
jmp	short loc_6DA534

loc_6DA532:
xor	eax, eax

loc_6DA534:
mov	edx, [esp+14h+var_4]
sub	eax, ebp
lea	eax, [eax+edx-1]
push	0
add	ebp, eax
cdq
push	5265C00h
push	edx
push	eax
mov	[esi+60h], ebp
call	__allmul
add	[esi+50h], eax
pop	ebp
pop	ebx
adc	[esi+54h], edx
mov	ecx, esi
pop	esi
pop	edi
add	esp, 4
jmp	sub_6D9AE0
sub_6DA440 endp

align 10h



sub_6DA570 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA594
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DA594:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DA5A1
lea	esi, [eax-10h]
jmp	short loc_6DA5A3

loc_6DA5A1:
xor	esi, esi

loc_6DA5A3:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DA5F7
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+58h]
mov	ecx, eax
mov	eax, 4A90BE59h
imul	edi
sar	edx, 14h
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
sub	ecx, eax
imul	ecx, 36EE80h
mov	eax, ecx
cdq
add	[esi+50h], eax
adc	[esi+54h], edx
add	edi, ecx
mov	[esi+58h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9AE0

loc_6DA5F7:
pop	esi
pop	edi
retn
sub_6DA570 endp

align 10h



sub_6DA600 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA624
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DA624:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DA631
lea	esi, [eax-10h]
jmp	short loc_6DA633

loc_6DA631:
xor	esi, esi

loc_6DA633:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DA693
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+58h]
mov	ecx, eax
mov	eax, edi
cdq
mov	ebx, 36EE80h
idiv	ebx
mov	eax, 45E7B273h
pop	ebx
imul	edx
sar	edx, 0Eh
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
sub	ecx, eax
imul	ecx, 0EA60h
mov	eax, ecx
cdq
add	[esi+50h], eax
adc	[esi+54h], edx
add	edi, ecx
mov	[esi+58h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9AE0

loc_6DA693:
pop	esi
pop	edi
retn
sub_6DA600 endp

align 10h



sub_6DA6A0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA6C4
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DA6C4:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DA6D1
lea	esi, [eax-10h]
jmp	short loc_6DA6D3

loc_6DA6D1:
xor	esi, esi

loc_6DA6D3:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DA733
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+58h]
mov	ecx, eax
mov	eax, edi
cdq
mov	ebx, 0EA60h
idiv	ebx
mov	eax, 10624DD3h
pop	ebx
imul	edx
sar	edx, 6
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
sub	ecx, eax
imul	ecx, 3E8h
mov	eax, ecx
cdq
add	[esi+50h], eax
adc	[esi+54h], edx
add	edi, ecx
mov	[esi+58h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9AE0

loc_6DA733:
pop	esi
pop	edi
retn
sub_6DA6A0 endp

align 10h



sub_6DA740 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DA764
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DA764:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DA771
lea	esi, [eax-10h]
jmp	short loc_6DA773

loc_6DA771:
xor	esi, esi

loc_6DA773:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DA7BC
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+58h]
mov	ecx, eax
mov	eax, edi
cdq
mov	ebx, 3E8h
idiv	ebx
pop	ebx
sub	ecx, edx
mov	eax, ecx
cdq
add	[esi+50h], eax
adc	[esi+54h], edx
add	edi, ecx
mov	[esi+58h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9AE0

loc_6DA7BC:
pop	esi
pop	edi
retn
sub_6DA740 endp

align 10h



sub_6DA7C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
push	23h
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_6DA7E6
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, ebp
call	sub_651C60
pop	ebp
pop	ecx
retn

loc_6DA7E6:
mov	eax, [ebp+8]
test	eax, eax
jz	short loc_6DA7F2
add	eax, 0FFFFFFF0h
jmp	short loc_6DA7F4

loc_6DA7F2:
xor	eax, eax

loc_6DA7F4:
mov	ecx, [eax+44h]
push	ebx
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
and	edi, 80000003h
jns	short loc_6DA80B
dec	edi
or	edi, 0FFFFFFFCh
inc	edi

loc_6DA80B:
mov	ebx, [eax+48h]
mov	edi, edi

loc_6DA810:
test	edi, edi
jnz	short loc_6DA852
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DA84B
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DA852

loc_6DA84B:
mov	eax, 1
jmp	short loc_6DA854

loc_6DA852:
xor	eax, eax

loc_6DA854:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	edx, [esi+eax*4]
cmp	ebx, ds:dword_143BC88[edx*4]
jl	short loc_6DA88D
inc	esi
cmp	esi, 0Ch
jl	short loc_6DA810
mov	esi, [ebp+4]
cmp	byte ptr [esi],	5
jb	short loc_6DA87B
mov	ecx, esi
call	sub_652060

loc_6DA87B:
fld	ds:dbl_15FCD60
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	ebp
pop	ecx
retn

loc_6DA88D:
mov	[esp+14h+var_4], esi
mov	esi, [ebp+4]
cmp	byte ptr [esi],	5
jb	short loc_6DA8A0
mov	ecx, esi
call	sub_652060

loc_6DA8A0:
fild	[esp+14h+var_4]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	ebp
pop	ecx
retn
sub_6DA7C0 endp




sub_6DA8B0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	23h
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_6DA8DA
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, ebp
call	sub_651C60
pop	ebp
add	esp, 8
retn

loc_6DA8DA:
mov	eax, [ebp+8]
push	edi
test	eax, eax
jz	short loc_6DA8E7
lea	edi, [eax-10h]
jmp	short loc_6DA8E9

loc_6DA8E7:
xor	edi, edi

loc_6DA8E9:
push	ebx
push	esi
mov	esi, [edi+44h]
mov	ecx, esi
call	sub_6D9990
mov	ecx, [edi+48h]
movzx	ebx, al
lea	eax, [ebx+ebx*2]
shl	eax, 4
cmp	ecx, ds:dword_143BC88[eax]
jge	short loc_6DA937
mov	esi, [ebp+4]
inc	ecx
mov	dword ptr [esp+18h+var_8], ecx
fild	dword ptr [esp+18h+var_8]

loc_6DA915:
cmp	byte ptr [esi],	5
fstp	[esp+18h+var_8]
jb	short loc_6DA925
mov	ecx, esi
call	sub_652060

loc_6DA925:
fld	[esp+18h+var_8]
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 8
retn

loc_6DA937:
mov	ebp, esi
and	ebp, 80000003h
mov	edi, 1
jns	short loc_6DA950
dec	ebp
or	ebp, 0FFFFFFFCh
inc	ebp
jmp	short loc_6DA950
align 10h

loc_6DA950:
test	ebp, ebp
jnz	short loc_6DA992
mov	eax, 51EB851Fh
imul	esi
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, esi
sub	edx, eax
jnz	short loc_6DA98B
mov	eax, 51EB851Fh
imul	esi
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, esi
sub	edx, eax
jnz	short loc_6DA992

loc_6DA98B:
mov	eax, 1
jmp	short loc_6DA994

loc_6DA992:
xor	eax, eax

loc_6DA994:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	edx, [edi+eax*4]
cmp	ecx, ds:dword_143BC88[edx*4]
jl	short loc_6DA9D3
inc	edi
cmp	edi, 0Ch
jl	short loc_6DA950
mov	ecx, [esp+18h+arg_0]
mov	esi, [ecx+4]
cmp	byte ptr [esi],	5
jb	short loc_6DA9BF
mov	ecx, esi
call	sub_652060

loc_6DA9BF:
fld	ds:dbl_15FCD60
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 8
retn

loc_6DA9D3:
lea	eax, [ebx+ebx*2]
lea	edx, [edi+eax*4]
sub	ecx, ds:dword_143BC84[edx*4]
mov	eax, [esp+18h+arg_0]
mov	esi, [eax+4]
inc	ecx
mov	dword ptr [esp+18h+var_8], ecx
fild	dword ptr [esp+18h+var_8]
jmp	loc_6DA915
sub_6DA8B0 endp

align 10h



sub_6DAA00 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DAA2A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DAA2A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DAA36
add	eax, 0FFFFFFF0h
jmp	short loc_6DAA38

loc_6DAA36:
xor	eax, eax

loc_6DAA38:
mov	ecx, [eax+3Ch]
mov	edx, [eax+38h]
push	0
push	5265C00h
push	ecx
push	edx
call	__alldiv
add	eax, 4
cdq
mov	ecx, 7
idiv	ecx
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], edx
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DAA72
mov	ecx, esi
call	sub_652060

loc_6DAA72:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DAA00 endp

align 10h



sub_6DAA90 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DAABA
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DAABA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DAAC6
add	eax, 0FFFFFFF0h
jmp	short loc_6DAAC8

loc_6DAAC6:
xor	eax, eax

loc_6DAAC8:
mov	ecx, [eax+40h]
mov	esi, [esi+4]
mov	eax, 4A90BE59h
imul	ecx
sar	edx, 14h
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DAAF7
mov	ecx, esi
call	sub_652060

loc_6DAAF7:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DAA90 endp

align 10h



sub_6DAB10 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DAB3A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DAB3A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DAB46
add	eax, 0FFFFFFF0h
jmp	short loc_6DAB48

loc_6DAB46:
xor	eax, eax

loc_6DAB48:
mov	eax, [eax+40h]
cdq
mov	ecx, 36EE80h
idiv	ecx
mov	esi, [esi+4]
mov	eax, 45E7B273h
imul	edx
sar	edx, 0Eh
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DAB7F
mov	ecx, esi
call	sub_652060

loc_6DAB7F:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DAB10 endp

align 10h



sub_6DAB90 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DABBA
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DABBA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DABC6
add	eax, 0FFFFFFF0h
jmp	short loc_6DABC8

loc_6DABC6:
xor	eax, eax

loc_6DABC8:
mov	eax, [eax+40h]
cdq
mov	ecx, 0EA60h
idiv	ecx
mov	esi, [esi+4]
mov	eax, 10624DD3h
imul	edx
sar	edx, 6
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DABFF
mov	ecx, esi
call	sub_652060

loc_6DABFF:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DAB90 endp

align 10h



sub_6DAC10 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DAC3A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DAC3A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DAC46
add	eax, 0FFFFFFF0h
jmp	short loc_6DAC48

loc_6DAC46:
xor	eax, eax

loc_6DAC48:
mov	eax, [eax+40h]
cdq
mov	ecx, 3E8h
idiv	ecx
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], edx
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DAC6E
mov	ecx, esi
call	sub_652060

loc_6DAC6E:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DAC10 endp

align 10h



sub_6DAC80 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DACAA
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DACAA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DACB6
add	eax, 0FFFFFFF0h
jmp	short loc_6DACB8

loc_6DACB6:
xor	eax, eax

loc_6DACB8:
mov	eax, [eax+44h]
mov	esi, [esi+4]
sub	eax, 76Ch
cmp	byte ptr [esi],	5
mov	dword ptr [esp+0Ch+var_8], eax
fild	dword ptr [esp+0Ch+var_8]
fstp	[esp+0Ch+var_8]
jb	short loc_6DACDB
mov	ecx, esi
call	sub_652060

loc_6DACDB:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DAC80 endp

align 10h



sub_6DACF0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DAD1A
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DAD1A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DAD26
add	eax, 0FFFFFFF0h
jmp	short loc_6DAD28

loc_6DAD26:
xor	eax, eax

loc_6DAD28:
fild	dword ptr [eax+44h]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
fstp	[esp+0Ch+var_8]
jb	short loc_6DAD3E
mov	ecx, esi
call	sub_652060

loc_6DAD3E:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DACF0 endp

align 10h



sub_6DAD50 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DAD74
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DAD74:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DAD81
lea	esi, [eax-10h]
jmp	short loc_6DAD83

loc_6DAD81:
xor	esi, esi

loc_6DAD83:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6DAE10
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
cmp	ebx, 63h
ja	short loc_6DADB4
add	ebx, 76Ch

loc_6DADB4:
mov	edi, [esi+48h]
cmp	edi, 3Ch
jl	short loc_6DADD8
mov	ecx, [esi+44h]
call	sub_6D9990
movzx	ecx, al
sub	edi, ecx
mov	ecx, ebx
call	sub_6D9990
movzx	edx, al
add	edi, edx
mov	[esi+48h], edi

loc_6DADD8:
mov	ecx, ebx
call	sub_6D99E0
add	eax, [esi+48h]
push	0
cdq
push	5265C00h
push	edx
push	eax
call	__allmul
mov	ecx, eax
mov	eax, [esi+40h]
mov	edi, edx
cdq
add	ecx, eax
adc	edi, edx
mov	[esi+44h], ebx
mov	[esi+38h], ecx
pop	ebx
mov	[esi+3Ch], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9A30

loc_6DAE10:
pop	esi
pop	edi
retn
sub_6DAD50 endp

align 10h



sub_6DAE20 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DAE44
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DAE44:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DAE51
lea	esi, [eax-10h]
jmp	short loc_6DAE53

loc_6DAE51:
xor	esi, esi

loc_6DAE53:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DAED1
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+48h]
cmp	edi, 3Ch
mov	ebx, eax
jl	short loc_6DAE99
mov	ecx, [esi+44h]
call	sub_6D9990
movzx	ecx, al
sub	edi, ecx
mov	ecx, ebx
call	sub_6D9990
movzx	edx, al
add	edi, edx
mov	[esi+48h], edi

loc_6DAE99:
mov	ecx, ebx
call	sub_6D99E0
add	eax, [esi+48h]
push	0
cdq
push	5265C00h
push	edx
push	eax
call	__allmul
mov	ecx, eax
mov	eax, [esi+40h]
mov	edi, edx
cdq
add	ecx, eax
adc	edi, edx
mov	[esi+44h], ebx
mov	[esi+38h], ecx
pop	ebx
mov	[esi+3Ch], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9A30

loc_6DAED1:
pop	esi
pop	edi
retn
sub_6DAE20 endp

align 10h



sub_6DAEE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, [esp+8+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DAF06
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	ecx
retn

loc_6DAF06:
push	esi
mov	esi, [edi+8]
test	esi, esi
jz	short loc_6DAF13
add	esi, 0FFFFFFF0h
jmp	short loc_6DAF15

loc_6DAF13:
xor	esi, esi

loc_6DAF15:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6DAFB3
mov	eax, [edi+18h]
push	ebx
push	ebp
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ecx, [esi+44h]
mov	ebx, ecx
xor	edi, edi
and	ebx, 80000003h
mov	[esp+14h+var_4], eax
jns	short loc_6DAF52
dec	ebx
or	ebx, 0FFFFFFFCh
inc	ebx

loc_6DAF52:
mov	ebp, [esi+48h]

loc_6DAF55:
test	ebx, ebx
jnz	short loc_6DAF97
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DAF90
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DAF97

loc_6DAF90:
mov	eax, 1
jmp	short loc_6DAF99

loc_6DAF97:
xor	eax, eax

loc_6DAF99:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	edx, [edi+eax*4]
cmp	ebp, ds:dword_143BC88[edx*4]
jl	short loc_6DAFB7
inc	edi
cmp	edi, 0Ch
jl	short loc_6DAF55
pop	ebp
pop	ebx

loc_6DAFB3:
pop	esi
pop	edi
pop	ecx
retn

loc_6DAFB7:
call	sub_6D9990
mov	edx, [esp+14h+var_4]
movzx	eax, al
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
lea	ecx, [eax+edi]
add	eax, edx
mov	eax, ds:dword_143BC88[eax*4]
sub	eax, ds:dword_143BC88[ecx*4]
push	0
add	ebp, eax
cdq
push	5265C00h
push	edx
push	eax
mov	[esi+48h], ebp
call	__allmul
add	[esi+38h], eax
pop	ebp
pop	ebx
adc	[esi+3Ch], edx
mov	ecx, esi
pop	esi
pop	edi
add	esp, 4
jmp	sub_6D9A30
sub_6DAEE0 endp

align 10h



sub_6DB010 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, [esp+8+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DB036
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	ecx
retn

loc_6DB036:
push	esi
mov	esi, [edi+8]
test	esi, esi
jz	short loc_6DB043
add	esi, 0FFFFFFF0h
jmp	short loc_6DB045

loc_6DB043:
xor	esi, esi

loc_6DB045:
cmp	dword ptr [edi+1Ch], 1
jl	loc_6DB0E3
mov	eax, [edi+18h]
push	ebx
push	ebp
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ecx, [esi+44h]
mov	ebx, ecx
xor	edi, edi
and	ebx, 80000003h
mov	[esp+14h+var_4], eax
jns	short loc_6DB082
dec	ebx
or	ebx, 0FFFFFFFCh
inc	ebx

loc_6DB082:
mov	ebp, [esi+48h]

loc_6DB085:
test	ebx, ebx
jnz	short loc_6DB0C7
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DB0C0
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DB0C7

loc_6DB0C0:
mov	eax, 1
jmp	short loc_6DB0C9

loc_6DB0C7:
xor	eax, eax

loc_6DB0C9:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	edx, [edi+eax*4]
cmp	ebp, ds:dword_143BC88[edx*4]
jl	short loc_6DB0E7
inc	edi
cmp	edi, 0Ch
jl	short loc_6DB085
pop	ebp
pop	ebx

loc_6DB0E3:
pop	esi
pop	edi
pop	ecx
retn

loc_6DB0E7:
test	edi, edi
jz	short loc_6DB102
call	sub_6D9990
movzx	eax, al
lea	eax, [eax+eax*2]
lea	ecx, [edi+eax*4]
mov	eax, ds:dword_143BC84[ecx*4]
jmp	short loc_6DB104

loc_6DB102:
xor	eax, eax

loc_6DB104:
mov	edx, [esp+14h+var_4]
sub	eax, ebp
lea	eax, [eax+edx-1]
push	0
add	ebp, eax
cdq
push	5265C00h
push	edx
push	eax
mov	[esi+48h], ebp
call	__allmul
add	[esi+38h], eax
pop	ebp
pop	ebx
adc	[esi+3Ch], edx
mov	ecx, esi
pop	esi
pop	edi
add	esp, 4
jmp	sub_6D9A30
sub_6DB010 endp

align 10h



sub_6DB140 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DB164
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DB164:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DB171
lea	esi, [eax-10h]
jmp	short loc_6DB173

loc_6DB171:
xor	esi, esi

loc_6DB173:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DB1C7
mov	eax, [edi+18h]
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+40h]
mov	ecx, eax
mov	eax, 4A90BE59h
imul	edi
sar	edx, 14h
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
sub	ecx, eax
imul	ecx, 36EE80h
mov	eax, ecx
cdq
add	[esi+38h], eax
adc	[esi+3Ch], edx
add	edi, ecx
mov	[esi+40h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9A30

loc_6DB1C7:
pop	esi
pop	edi
retn
sub_6DB140 endp

align 10h



sub_6DB1D0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DB1F4
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DB1F4:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DB201
lea	esi, [eax-10h]
jmp	short loc_6DB203

loc_6DB201:
xor	esi, esi

loc_6DB203:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DB263
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+40h]
mov	ecx, eax
mov	eax, edi
cdq
mov	ebx, 36EE80h
idiv	ebx
mov	eax, 45E7B273h
pop	ebx
imul	edx
sar	edx, 0Eh
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
sub	ecx, eax
imul	ecx, 0EA60h
mov	eax, ecx
cdq
add	[esi+38h], eax
adc	[esi+3Ch], edx
add	edi, ecx
mov	[esi+40h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9A30

loc_6DB263:
pop	esi
pop	edi
retn
sub_6DB1D0 endp

align 10h



sub_6DB270 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DB294
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DB294:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DB2A1
lea	esi, [eax-10h]
jmp	short loc_6DB2A3

loc_6DB2A1:
xor	esi, esi

loc_6DB2A3:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DB303
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+40h]
mov	ecx, eax
mov	eax, edi
cdq
mov	ebx, 0EA60h
idiv	ebx
mov	eax, 10624DD3h
pop	ebx
imul	edx
sar	edx, 6
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
sub	ecx, eax
imul	ecx, 3E8h
mov	eax, ecx
cdq
add	[esi+38h], eax
adc	[esi+3Ch], edx
add	edi, ecx
mov	[esi+40h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9A30

loc_6DB303:
pop	esi
pop	edi
retn
sub_6DB270 endp

align 10h



sub_6DB310 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	23h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6DB334
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6DB334:
mov	eax, [edi+8]
push	esi
test	eax, eax
jz	short loc_6DB341
lea	esi, [eax-10h]
jmp	short loc_6DB343

loc_6DB341:
xor	esi, esi

loc_6DB343:
cmp	dword ptr [edi+1Ch], 1
jl	short loc_6DB38C
mov	eax, [edi+18h]
push	ebx
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, [esi+40h]
mov	ecx, eax
mov	eax, edi
cdq
mov	ebx, 3E8h
idiv	ebx
pop	ebx
sub	ecx, edx
mov	eax, ecx
cdq
add	[esi+38h], eax
adc	[esi+3Ch], edx
add	edi, ecx
mov	[esi+40h], edi
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_6D9A30

loc_6DB38C:
pop	esi
pop	edi
retn
sub_6DB310 endp

align 10h



sub_6DB390 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DB3BA
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DB3BA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DB3C6
add	eax, 0FFFFFFF0h
jmp	short loc_6DB3C8

loc_6DB3C6:
xor	eax, eax

loc_6DB3C8:
fild	qword ptr [eax+38h]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
fstp	[esp+0Ch+var_8]
jb	short loc_6DB3DE
mov	ecx, esi
call	sub_652060

loc_6DB3DE:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]
pop	esi
add	esp, 8
retn
sub_6DB390 endp

align 10h


; Attributes: bp-based frame

sub_6DB3F0 proc	near

var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
cmp	dword ptr [esi+1Ch], 2
push	edi
jl	loc_6DB57C
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
lea	ebx, [eax+76Ch]
cmp	eax, 63h
jbe	short loc_6DB42F
mov	ebx, eax

loc_6DB42F:
mov	ecx, ebx
call	sub_6D99E0
mov	ecx, [esi+18h]
mov	[esp+20h+var_14], eax
fild	[esp+20h+var_14]
push	ecx
push	1
mov	ecx, esi
fstp	[esp+28h+var_8]
fldz
fstp	[esp+28h+var_10]
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	edi, eax
test	edi, edi
jz	short loc_6DB486
mov	ecx, ebx
call	sub_6D9990
movzx	eax, al
lea	edx, [eax+eax*2]
lea	eax, [edi+edx*4]
fild	ds:dword_143BC84[eax*4]
fadd	[esp+20h+var_8]
fstp	[esp+20h+var_8]

loc_6DB486:
cmp	dword ptr [esi+1Ch], 3
jl	short loc_6DB4B6
mov	ecx, [esi+18h]
push	ecx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
dec	eax
mov	[esp+20h+var_14], eax
fild	[esp+20h+var_14]
fadd	[esp+20h+var_8]
fstp	[esp+20h+var_8]

loc_6DB4B6:
cmp	dword ptr [esi+1Ch], 4
jl	short loc_6DB4E0
mov	edx, [esi+18h]
push	edx
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fmul	ds:dbl_143BE48
fadd	ds:dbl_15FCC10
fstp	[esp+20h+var_10]

loc_6DB4E0:
cmp	dword ptr [esi+1Ch], 5
jl	short loc_6DB508
mov	eax, [esi+18h]
push	eax
push	4
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fmul	ds:dbl_143BE40
fadd	[esp+20h+var_10]
fstp	[esp+20h+var_10]

loc_6DB508:
cmp	dword ptr [esi+1Ch], 6
jl	short loc_6DB530
mov	ecx, [esi+18h]
push	ecx
push	5
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fmul	ds:dbl_15FCD88
fadd	[esp+20h+var_10]
fstp	[esp+20h+var_10]

loc_6DB530:
cmp	dword ptr [esi+1Ch], 7
jl	short loc_6DB552
mov	edx, [esi+18h]
push	edx
push	6
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fadd	[esp+20h+var_10]
fstp	[esp+20h+var_10]

loc_6DB552:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6DB561
mov	ecx, esi
call	sub_652060

loc_6DB561:
fld	[esp+20h+var_8]
fmul	ds:dbl_143BE38
fadd	[esp+20h+var_10]
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6DB57C:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6DB58B
mov	ecx, esi
call	sub_652060

loc_6DB58B:
fldz
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6DB3F0 endp

align 10h



sub_6DB5A0 proc	near
mov	eax, 23h
retn
sub_6DB5A0 endp

align 10h



sub_6DB5B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6DB5D3
cmp	[esi], ecx
jmp	short loc_6DB5E8

loc_6DB5D3:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6DB5DE
call	sub_651580

loc_6DB5DE:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6DB5E8:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6DB637
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6DB606
cmp	[esi], ecx
jmp	short loc_6DB61B

loc_6DB606:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6DB611
call	sub_651580

loc_6DB611:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6DB61B:
setz	al
test	al, al
jnz	short loc_6DB637
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6DB637:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+58h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6DB5B0 endp

align 10h



sub_6DB660 proc	near
add	ecx, 58h
jmp	sub_665AD0
sub_6DB660 endp

align 10h



sub_6DB670 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6DB67D
mov	al, 1
retn	8

loc_6DB67D:
mov	[esp+arg_4], eax
add	ecx, 68h
jmp	loc_663310
sub_6DB670 endp

align 10h



sub_6DB690 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
xor	eax, eax
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143BED0
mov	[esi+38h], eax
mov	[esi+3Ch], eax
mov	[esi+40h], eax
mov	[esi+44h], eax
mov	[esi+48h], eax
mov	[esi+50h], eax
mov	[esi+54h], eax
mov	[esi+58h], eax
mov	[esi+5Ch], eax
mov	[esi+60h], eax
mov	[esi+64h], eax
mov	ecx, [ebx+78h]
add	ebx, 78h
push	14h
call	sub_66FB00
mov	edx, [edi]
push	eax
mov	eax, [edx+34h]
push	ebx
mov	ecx, edi
call	eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6DB690 endp

align 10h



sub_6DB700 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= qword ptr  4

sub	esp, 0Ch
mov	eax, dword ptr [esp+0Ch+arg_0+4]
push	ebx
push	ebp
push	esi
push	edi
push	0
push	5265C00h
mov	esi, ecx
mov	ecx, dword ptr [esp+24h+arg_0]
push	eax
push	ecx
mov	[esp+2Ch+var_C], esi
call	__alldvrm
push	0
push	23AB1h
push	edx
push	eax
mov	[esp+2Ch+var_4], ebx
mov	[esi+40h], ecx
call	__alldvrm
imul	eax, 190h
add	eax, 7B2h
cmp	dword ptr [esp+1Ch+arg_0+4], 0
mov	edi, ecx
mov	[esp+1Ch+var_4], edx
mov	[esp+1Ch+var_8], edi
mov	ebp, ebx
mov	[esi+44h], eax
jl	loc_6DB853
jg	short loc_6DB770
cmp	dword ptr [esp+1Ch+arg_0], 0
jb	loc_6DB853
lea	ebx, [ebx+0]

loc_6DB770:
mov	ecx, [esi+44h]
mov	edx, ecx
and	edx, 80000003h
jns	short loc_6DB782
dec	edx
or	edx, 0FFFFFFFCh
inc	edx

loc_6DB782:
jnz	short loc_6DB7C2
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DB7BB
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DB7C2

loc_6DB7BB:
mov	eax, 1
jmp	short loc_6DB7C4

loc_6DB7C2:
xor	eax, eax

loc_6DB7C4:
xor	edx, edx
test	al, al
setnz	dl
add	edx, 16Dh
mov	eax, edx
cdq
cmp	ebp, edx
jl	loc_6DB95F
jg	short loc_6DB7E6
cmp	edi, eax
jb	loc_6DB95F

loc_6DB7E6:
mov	eax, ecx
and	eax, 80000003h
jns	short loc_6DB7F4
dec	eax
or	eax, 0FFFFFFFCh
inc	eax

loc_6DB7F4:
jnz	short loc_6DB834
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DB82D
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DB834

loc_6DB82D:
mov	eax, 1
jmp	short loc_6DB836

loc_6DB834:
xor	eax, eax

loc_6DB836:
xor	edx, edx
test	al, al
setnz	dl
add	edx, 16Dh
mov	eax, edx
cdq
sub	edi, eax
sbb	ebp, edx
inc	ecx
mov	[esi+44h], ecx
jmp	loc_6DB770

loc_6DB853:
test	ebp, ebp
jl	short loc_6DB861
jg	short loc_6DB85D
test	edi, edi
jb	short loc_6DB861

loc_6DB85D:
mov	ecx, ebp
jmp	short loc_6DB86A

loc_6DB861:
neg	edi
mov	ecx, ebp
adc	ecx, 0
neg	ecx

loc_6DB86A:
mov	esi, [esi+44h]
mov	eax, esi
and	eax, 80000003h
jns	short loc_6DB87B
dec	eax
or	eax, 0FFFFFFFCh
inc	eax

loc_6DB87B:
jnz	short loc_6DB8BB
mov	eax, 51EB851Fh
imul	esi
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, esi
sub	edx, eax
jnz	short loc_6DB8B4
mov	eax, 51EB851Fh
imul	esi
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, esi
sub	edx, eax
jnz	short loc_6DB8BB

loc_6DB8B4:
mov	eax, 1
jmp	short loc_6DB8BD

loc_6DB8BB:
xor	eax, eax

loc_6DB8BD:
xor	edx, edx
test	al, al
setnz	dl
add	edx, 16Dh
mov	eax, edx
cdq
cmp	ecx, edx
jl	loc_6DB957
jg	short loc_6DB8DB
cmp	edi, eax
jb	short loc_6DB957

loc_6DB8DB:
mov	eax, [esp+1Ch+var_C]
lea	ecx, [esi-1]
mov	edx, ecx
and	edx, 80000003h
mov	[eax+44h], ecx
jns	short loc_6DB8F4
dec	edx
or	edx, 0FFFFFFFCh
inc	edx

loc_6DB8F4:
jnz	short loc_6DB932
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DB92B
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
sub	ecx, eax
jnz	short loc_6DB932

loc_6DB92B:
mov	eax, 1
jmp	short loc_6DB934

loc_6DB932:
xor	eax, eax

loc_6DB934:
mov	esi, [esp+1Ch+var_C]
xor	ecx, ecx
test	al, al
setnz	cl
add	ecx, 16Dh
mov	eax, ecx
cdq
add	[esp+1Ch+var_8], eax
mov	edi, [esp+1Ch+var_8]
adc	ebp, edx
jmp	loc_6DB853

loc_6DB957:
mov	esi, [esp+1Ch+var_C]
mov	edi, [esp+1Ch+var_8]

loc_6DB95F:
mov	edx, dword ptr [esp+1Ch+arg_0]
mov	eax, dword ptr [esp+1Ch+arg_0+4]
mov	ecx, esi
mov	[esi+48h], edi
mov	[esi+38h], edx
mov	[esi+3Ch], eax
call	sub_6D9A30
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_6DB700 endp

align 10h



sub_6DB990 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	23h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DB9B4
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_6DB9B4:
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6DB9C1
lea	edi, [eax-10h]
jmp	short loc_6DB9C3

loc_6DB9C1:
xor	edi, edi

loc_6DB9C3:
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6DB9EB
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2
push	edx
push	eax
mov	ecx, edi
call	sub_6DB700

loc_6DB9EB:
pop	edi
pop	esi
retn
sub_6DB990 endp

align 10h



sub_6DB9F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	68h
call	eax
test	eax, eax
jz	short loc_6DBA19
push	esi
mov	ecx, eax
call	sub_6DB690
pop	esi
retn	4

loc_6DBA19:
xor	eax, eax
pop	esi
retn	4
sub_6DB9F0 endp

align 10h



sub_6DBA20 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+84h]
test	eax, eax
jz	short loc_6DBA51
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+84h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6DBA51:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6DBA20 endp

align 10h



sub_6DBA60 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+6Ch]
call	sub_67C000
lea	ecx, [edi+78h]
call	sub_67C000
mov	eax, [edi+84h]
test	eax, eax
jz	short loc_6DBAD3
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6DBAD1
lea	ecx, [ecx+0]

loc_6DBA90:
mov	eax, [edi+84h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6DBACC
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6DBACC
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6DBACC:
inc	esi
cmp	esi, ebx
jb	short loc_6DBA90

loc_6DBAD1:
pop	esi
pop	ebx

loc_6DBAD3:
pop	edi
retn
sub_6DBA60 endp

align 10h



sub_6DBAE0 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+6Ch]
call	sub_67BFB0
lea	ecx, [edi+78h]
call	sub_67BFB0
mov	eax, [edi+84h]
test	eax, eax
jz	short loc_6DBB45
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6DBB43
lea	ecx, [ecx+0]

loc_6DBB10:
mov	eax, [edi+84h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6DBB3E
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6DBB3E
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6DBB3E:
inc	esi
cmp	esi, ebx
jb	short loc_6DBB10

loc_6DBB43:
pop	esi
pop	ebx

loc_6DBB45:
pop	edi
retn
sub_6DBAE0 endp

align 10h



sub_6DBB50 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+6Ch]
call	sub_67C070
lea	ecx, [edi+78h]
call	sub_67C070
mov	eax, [edi+84h]
test	eax, eax
jz	short loc_6DBBD0
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6DBBCE
lea	ecx, [ecx+0]

loc_6DBB80:
mov	eax, [edi+84h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6DBBC9
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6DBBC9
test	eax, 0FFFFFFFh
jbe	short loc_6DBBB4
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6DBBC0

loc_6DBBB4:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6DBBC0:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6DBBC9:
inc	esi
cmp	esi, ebx
jb	short loc_6DBB80

loc_6DBBCE:
pop	esi
pop	ebx

loc_6DBBD0:
pop	edi
retn
sub_6DBB50 endp

align 10h



sub_6DBBE0 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+6Ch]
call	sub_67C210
lea	ecx, [edi+78h]
call	sub_67C210
mov	eax, [edi+84h]
test	eax, eax
jz	short loc_6DBC2D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6DBC2B
lea	ecx, [ecx+0]

loc_6DBC10:
mov	eax, [edi+84h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6DBC26
call	sub_64B020

loc_6DBC26:
inc	esi
cmp	esi, ebx
jb	short loc_6DBC10

loc_6DBC2B:
pop	esi
pop	ebx

loc_6DBC2D:
pop	edi
retn
sub_6DBBE0 endp

align 10h



; int __cdecl sub_6DBC30(int, char *, int, int,	int, int, int, int, int, int, int)
sub_6DBC30 proc	near

var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= dword ptr -314h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h
arg_28=	dword ptr  2Ch

sub	esp, 31Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+31Ch+var_4], eax
mov	ecx, [esp+31Ch+arg_14]
mov	edx, [esp+31Ch+arg_18]
mov	eax, [esp+31Ch+arg_0]
push	ebx
mov	ebx, [esp+320h+arg_C]
push	ebp
mov	ebp, [esp+324h+arg_10]
mov	[esp+324h+var_318], ecx
mov	ecx, [esp+324h+arg_1C]
push	esi
mov	esi, [esp+328h+arg_4]
mov	[esp+328h+var_308], edx
mov	edx, [esp+328h+arg_20]
mov	[esp+328h+var_310], ecx
mov	ecx, [esp+328h+arg_24]
push	edi
mov	edi, [esp+32Ch+arg_8]
mov	[esp+32Ch+var_31C], edx
mov	edx, [esp+32Ch+arg_28]
mov	[esp+32Ch+var_314], ecx
push	eax
lea	ecx, [esp+330h+var_304]
mov	[esp+330h+var_30C], edx
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+330h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+330h+var_304]
call	sub_66A070
push	ebx
lea	ecx, [esp+330h+var_304]
call	sub_66A070
push	ebp
lea	ecx, [esp+330h+var_304]
call	sub_657150
mov	eax, [esp+32Ch+var_318]
push	eax
lea	ecx, [esp+330h+var_304]
call	sub_657150
mov	ecx, [esp+32Ch+var_308]
push	ecx
lea	ecx, [esp+330h+var_304]
call	sub_657150
mov	edx, [esp+32Ch+var_310]
push	edx
lea	ecx, [esp+330h+var_304]
call	sub_657150
mov	eax, [esp+32Ch+var_31C]
push	eax
lea	ecx, [esp+330h+var_304]
call	sub_657150
mov	ecx, [esp+32Ch+var_314]
push	ecx
lea	ecx, [esp+330h+var_304]
call	sub_657150
mov	edx, [esp+32Ch+var_30C]
push	edx
lea	ecx, [esp+330h+var_304]
call	sub_657150
lea	ecx, [esp+32Ch+var_304]
call	sub_6A4090
mov	esi, [esp+32Ch+var_2F8]
lea	ecx, [esp+32Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+32Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 31Ch
retn
sub_6DBC30 endp

align 10h



sub_6DBD70 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+6Ch]
call	sub_67C1F0
lea	ecx, [edi+78h]
call	sub_67C1F0
mov	eax, [edi+84h]
test	eax, eax
jz	short loc_6DBDBD
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6DBDBB
lea	ecx, [ecx+0]

loc_6DBDA0:
mov	eax, [edi+84h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6DBDB6
call	sub_64B3B0

loc_6DBDB6:
inc	esi
cmp	esi, ebx
jb	short loc_6DBDA0

loc_6DBDBB:
pop	esi
pop	ebx

loc_6DBDBD:
pop	edi
retn
sub_6DBD70 endp

align 10h



sub_6DBDC0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0B0h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0B0h+var_4], eax
push	ebp
mov	ebp, [esp+0B4h+arg_0]
push	23h
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_6DBE0F
push	0
push	0
push	offset aDate	; "Date"
mov	ecx, ebp
call	sub_651C60
pop	ebp
mov	ecx, [esp+0B0h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 0B0h
retn

loc_6DBE0F:
mov	eax, [ebp+8]
push	esi
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_6DBE1F
lea	esi, [eax-10h]
jmp	short loc_6DBE21

loc_6DBE1F:
xor	esi, esi

loc_6DBE21:
mov	ecx, [esi+5Ch]
lea	eax, [esi+5Ch]
push	ebx
mov	ebx, ecx
and	ebx, 80000003h
mov	[esp+0C0h+var_AC], edi
mov	[esp+0C0h+var_A8], edi
mov	[esp+0C0h+var_94], eax
jns	short loc_6DBE43
dec	ebx
or	ebx, 0FFFFFFFCh
inc	ebx

loc_6DBE43:
mov	edx, [esi+60h]

loc_6DBE46:
test	ebx, ebx
jnz	short loc_6DBE8E
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 64h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DBE81
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 7
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
imul	eax, 190h
mov	edx, ecx
sub	edx, eax
jnz	short loc_6DBE8B

loc_6DBE81:
mov	edx, [esi+60h]
mov	eax, 1
jmp	short loc_6DBE90

loc_6DBE8B:
mov	edx, [esi+60h]

loc_6DBE8E:
xor	eax, eax

loc_6DBE90:
movzx	eax, al
lea	eax, [eax+eax*2]
lea	eax, [edi+eax*4]
cmp	edx, ds:dword_143BC88[eax*4]
jl	short loc_6DBEAE
inc	edi
cmp	edi, 0Ch
jl	short loc_6DBE46
mov	ebx, [esp+0C0h+var_AC]
jmp	short loc_6DBED7

loc_6DBEAE:
mov	ebx, edi
test	edi, edi
jz	short loc_6DBECE
call	sub_6D9990
movzx	eax, al
lea	ecx, [eax+eax*2]
lea	edx, [edi+ecx*4]
mov	eax, ds:dword_143BC84[edx*4]
mov	edx, [esi+60h]
jmp	short loc_6DBED0

loc_6DBECE:
xor	eax, eax

loc_6DBED0:
sub	edx, eax
inc	edx
mov	[esp+0C0h+var_A8], edx

loc_6DBED7:
mov	eax, [esi+54h]
mov	ecx, [esi+50h]
test	eax, eax
jl	short loc_6DBF13
jg	short loc_6DBEE7
test	ecx, ecx
jb	short loc_6DBF13

loc_6DBEE7:
push	0
push	5265C00h
push	eax
push	ecx
call	__alldiv
push	0
add	eax, 4
push	7
adc	edx, 0
push	edx
push	eax
call	__allrem
mov	eax, off_167DAC8[eax*4]
mov	[esp+0C0h+var_B0], eax
jmp	short loc_6DBF5D

loc_6DBF13:
neg	ecx
push	0
adc	eax, 0
push	5265C00h
neg	eax
push	eax
push	ecx
call	__alldiv
mov	ecx, 3
sub	ecx, eax
push	0
mov	eax, 0
push	7
sbb	eax, edx
push	eax
push	ecx
call	__allrem
push	0
add	eax, 7
push	7
adc	edx, 0
push	edx
push	eax
call	__allrem
mov	ecx, off_167DAC8[eax*4]
mov	[esp+0C0h+var_B0], ecx

loc_6DBF5D:
mov	eax, [esi+64h]
cdq
mov	ecx, 36EE80h
idiv	ecx
mov	[esp+0C0h+var_90], 2
mov	[esp+0C0h+var_88], 80h
mov	ecx, eax
mov	eax, 45E7B273h
imul	edx
sar	edx, 0Eh
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
mov	[esp+0C0h+var_AC], eax
mov	[esp+0C0h+var_A4], ecx
mov	ecx, [esi+58h]
mov	eax, ecx
cdq
mov	esi, 0EA60h
idiv	esi
mov	eax, 10624DD3h
imul	edx
sar	edx, 6
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
mov	[esp+0C0h+var_98], eax
mov	eax, ecx
cdq
mov	ecx, 36EE80h
idiv	ecx
mov	ecx, eax
mov	eax, 45E7B273h
imul	edx
sar	edx, 0Eh
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
mov	edx, [esp+0C0h+var_94]
push	edx		; int
mov	[esp+0C4h+var_9C], ecx
mov	[esp+0C4h+var_A0], eax
lea	ecx, [esp+0C4h+var_84]
mov	[esp+0C4h+var_8C], ecx
lea	eax, [esp+0C4h+var_AC]
push	eax		; int
lea	ecx, [esp+0C8h+var_A4]
push	ecx		; int
lea	edx, [esp+0CCh+var_98]
push	edx		; int
lea	eax, [esp+0D0h+var_A0]
push	eax		; int
lea	ecx, [esp+0D4h+var_9C]
push	ecx		; int
lea	edx, [esp+0D8h+var_A8]
push	edx		; int
lea	eax, off_167DAE4[ebx*4]
push	eax		; int
lea	ecx, [esp+0E0h+var_B0]
push	ecx		; int
lea	edx, [esp+0E4h+var_90]
push	offset a0122302402502G ; "{0} {1} {2:2}	{3:02}:{4:02}:{5:02} GMT{"...
push	edx		; int
call	sub_6DBC30
mov	eax, [ebp+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
add	esp, 2Ch
lea	edx, [esp+0C0h+var_84]
push	edx
call	sub_651000
mov	esi, eax
inc	dword ptr [esi+8]
mov	edi, [ebp+4]
cmp	byte ptr [edi],	5
pop	ebx
jb	short loc_6DC04F
mov	ecx, edi
call	sub_652060

loc_6DC04F:
mov	byte ptr [edi],	5
mov	[edi+4], esi
inc	dword ptr [esi+8]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6DC065
mov	ecx, esi
call	sub_650DF0

loc_6DC065:
mov	ecx, [esp+0BCh+var_4]
pop	edi
pop	esi
pop	ebp
xor	ecx, esp
call	sub_7999A3
add	esp, 0B0h
retn
sub_6DBDC0 endp

align 10h



sub_6DC080 proc	near

var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	qword ptr -0C0h
var_B8=	word ptr -0B8h
TimeZoneInformation= _TIME_ZONE_INFORMATION ptr	-0B0h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0CCh
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0CCh+var_4], eax
push	esi
mov	esi, [esp+0D0h+arg_0]
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_6DC0D2
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 23h
jnz	short loc_6DC0D2
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DC0CE
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6DC0FE
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax
jmp	short loc_6DC0FE

loc_6DC0CE:
xor	edi, edi
jmp	short loc_6DC0FE

loc_6DC0D2:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	68h
call	edx
test	eax, eax
jz	short loc_6DC0FA
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6DB690
jmp	short loc_6DC0FC

loc_6DC0FA:
xor	eax, eax

loc_6DC0FC:
mov	edi, eax

loc_6DC0FE:
lea	edx, [esp+0D4h+var_C0]
push	edx
call	__ftime64
add	esp, 4
lea	eax, [esp+0D4h+TimeZoneInformation]
push	eax		; lpTimeZoneInformation
call	ds:GetTimeZoneInformation
mov	ecx, [esp+0D4h+TimeZoneInformation.Bias]
cmp	eax, 1
jnz	short loc_6DC127
mov	edx, [esp+0D4h+TimeZoneInformation.StandardBias]
add	ecx, edx
jmp	short loc_6DC135

loc_6DC127:
cmp	eax, 2
jnz	short loc_6DC135
mov	eax, [esp+0D4h+TimeZoneInformation.DaylightBias]
add	ecx, eax

loc_6DC135:
imul	ecx, 0FFFF15A0h
push	ebx
push	0
mov	[edi+64h], ecx
mov	ecx, dword ptr [esp+0DCh+var_C0+4]
mov	edx, dword ptr [esp+0DCh+var_C0]
push	3E8h
push	ecx
push	edx
call	__allmul
mov	ecx, eax
movzx	eax, [esp+0D8h+var_B8]
mov	ebx, edx
cdq
add	ecx, eax
adc	ebx, edx
push	ebx
push	ecx
mov	ecx, edi
call	sub_6DB700
mov	eax, [esi+1Ch]
cmp	eax, 1
jnz	short loc_6DC19B
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2
push	edx
push	eax
mov	ecx, edi
call	sub_6DB700
jmp	loc_6DC31E

loc_6DC19B:
cmp	eax, 2
jl	loc_6DC31E
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
cmp	eax, 63h
ja	short loc_6DC1C7
add	eax, 76Ch

loc_6DC1C7:
push	ebp
mov	ecx, eax
mov	[esp+0DCh+var_CC], eax
call	sub_6D99E0
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
mov	[esp+0E4h+var_C8], eax
mov	ebp, eax
xor	ebx, ebx
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	[esp+0DCh+var_C4], eax
test	eax, eax
jz	short loc_6DC219
mov	ecx, [esp+0DCh+var_CC]
call	sub_6D9990
movzx	eax, al
lea	edx, [eax+eax*2]
mov	eax, [esp+0DCh+var_C4]
lea	ecx, [eax+edx*4]
add	ebp, ds:dword_143BC84[ecx*4]

loc_6DC219:
cmp	dword ptr [esi+1Ch], 3
jl	short loc_6DC23C
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
lea	ebp, [eax+ebp-1]

loc_6DC23C:
cmp	dword ptr [esi+1Ch], 4
jl	short loc_6DC263
mov	eax, [esi+18h]
push	eax
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
mov	ebx, eax
imul	ebx, 36EE80h

loc_6DC263:
cmp	dword ptr [esi+1Ch], 5
jl	short loc_6DC28A
mov	ecx, [esi+18h]
push	ecx
push	4
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
imul	eax, 0EA60h
add	ebx, eax

loc_6DC28A:
cmp	dword ptr [esi+1Ch], 6
jl	short loc_6DC2B1
mov	edx, [esi+18h]
push	edx
push	5
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
imul	eax, 3E8h
add	ebx, eax

loc_6DC2B1:
cmp	dword ptr [esi+1Ch], 7
jl	short loc_6DC2D2
mov	eax, [esi+18h]
push	eax
push	6
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
call	__ftol2_sse
add	ebx, eax

loc_6DC2D2:
mov	edx, [esp+0DCh+var_CC]
push	0
mov	[edi+5Ch], edx
mov	eax, ebp
cdq
push	5265C00h
mov	ecx, ebp
sub	ecx, [esp+0E4h+var_C8]
push	edx
push	eax
mov	[edi+60h], ecx
mov	[edi+58h], ebx
call	__allmul
mov	ecx, eax
mov	ebp, edx
mov	eax, ebx
cdq
add	ecx, eax
adc	ebp, edx
mov	[edi+50h], ecx
mov	ecx, edi
mov	[edi+54h], ebp
call	sub_6D9AE0
mov	edx, [edi+3Ch]
mov	eax, [edi+38h]
push	edx
push	eax
mov	ecx, edi
call	sub_6DB700
pop	ebp

loc_6DC31E:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
mov	ecx, [esi+18h]
push	0
push	0FFFFFFFFh
push	ecx
mov	ecx, [esi+4]
lea	edx, [esp+0E4h+var_CC]
push	edx
call	sub_652F60
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
pop	ebx
jb	short loc_6DC34C
mov	ecx, esi
call	sub_652060

loc_6DC34C:
mov	byte ptr [esi],	5
mov	eax, [esp+0D4h+var_CC]
mov	[esi+4], eax
mov	eax, [esp+0D4h+var_CC]
inc	dword ptr [eax+8]
mov	eax, [esp+0D4h+var_CC]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DC373
call	sub_650DF0

loc_6DC373:
mov	ecx, edi
call	sub_64B3B0
mov	ecx, [esp+0D4h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 0CCh
retn
sub_6DC080 endp

align 10h



sub_6DC3A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143BED0
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+68h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143BEAC
mov	dword ptr [edi], offset	off_143BE58
mov	dword ptr [ecx], offset	off_143BE50
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6DC3A0 endp

align 10h



sub_6DC420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6DC3A0
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143BCE8
push	edi
lea	ecx, [esi+68h]
push	esi
mov	dword ptr [esi], offset	off_143BEAC
mov	dword ptr [esi+10h], offset off_143BE58
mov	dword ptr [ecx], offset	off_143BE50
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6DC420 endp

align 10h



sub_6DC470 proc	near

arg_0= byte ptr	 4

sub	ecx, 68h
jmp	loc_6DC490
align 10h

loc_6DC480:
sub	ecx, 10h
jmp	loc_6DC490
align 10h

loc_6DC490:
push	esi
mov	esi, ecx
lea	ecx, [esi+68h]
mov	dword ptr [esi], offset	off_143BEAC
mov	dword ptr [esi+10h], offset off_143BE58
mov	dword ptr [ecx], offset	off_143BE50
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6DC4CA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DC4CA:
mov	eax, esi
pop	esi
retn	4
sub_6DC470 endp




sub_6DC4D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6DC505 ; default
jmp	ds:off_6DC508[eax*4] ; switch jump

loc_6DC4E0:		; jumptable 006DC4D9 case 0
call	sub_6DBD70
retn	4

loc_6DC4E8:		; jumptable 006DC4D9 case 1
call	sub_6DBA60
retn	4

loc_6DC4F0:		; jumptable 006DC4D9 case 2
call	sub_6DBAE0
retn	4

loc_6DC4F8:		; jumptable 006DC4D9 case 3
call	sub_6DBBE0
retn	4

loc_6DC500:		; jumptable 006DC4D9 case 4
call	sub_6DBB50

locret_6DC505:		; default
retn	4
sub_6DC4D0 endp

off_6DC508 dd offset loc_6DC4E0	; jump table for switch	statement
dd offset loc_6DC4E8
dd offset loc_6DC4F0
dd offset loc_6DC4F8
dd offset loc_6DC500
align 10h



sub_6DC520 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6DC583
push	offset sub_6DC080
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
push	7
push	offset off_143BE28
lea	ecx, [esp+30h+var_18]
lea	eax, [edi+10h]
push	ecx
push	eax
mov	dword ptr [edi], offset	off_143BF60
mov	dword ptr [eax], offset	off_1439710
call	sub_66FC60
add	esp, 10h
jmp	short loc_6DC585

loc_6DC583:
xor	edi, edi

loc_6DC585:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	88h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6DC5D5
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6DC420
mov	ebx, eax
test	ebx, ebx
jz	short loc_6DC5D5
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6DC5D5:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 14h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6DC603
call	sub_64B3B0

loc_6DC603:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 58h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6DC64F
mov	ecx, ebx
call	sub_64B3B0

loc_6DC64F:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6DC520 endp

align 10h



sub_6DC660 proc	near
mov	eax, [ecx]
mov	edx, [eax+14h]
jmp	edx
sub_6DC660 endp

align 10h



sub_6DC670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
lea	eax, [esp+10h+arg_0]
push	eax
mov	edi, ecx
push	0
mov	ecx, esi
call	sub_6799C0
test	eax, eax
jz	short loc_6DC6F5
lea	esp, [esp+0]

loc_6DC690:
lea	ecx, [eax-22h]
cmp	ecx, 5Ch	; switch 93 cases
ja	short loc_6DC6A6 ; default
			; jumptable 006DC69F cases 2,6-9,11-23,27,30-57,59-91
movzx	ecx, ds:byte_6DC728[ecx]
jmp	ds:off_6DC720[ecx*4] ; switch jump

loc_6DC6A6:		; default
movzx	eax, ax		; jumptable 006DC69F cases 2,6-9,11-23,27,30-57,59-91
mov	edx, eax
shr	edx, 8
movzx	edx, ds:word_1434648[edx*2]
test	edx, edx
jz	short loc_6DC6E5
cmp	edx, 1
jz	short loc_6DC714 ; jumptable 006DC69F cases 0,1,3-5,10,24-26,28,29,58,92
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	eax, ds:word_1434648[eax*2]
mov	ebx, 1
shl	ebx, cl
and	ebx, eax
neg	ebx
sbb	ebx, ebx
neg	ebx
jnz	short loc_6DC714 ; jumptable 006DC69F cases 0,1,3-5,10,24-26,28,29,58,92

loc_6DC6E5:
lea	ecx, [esp+10h+arg_0]
push	ecx
mov	ecx, esi
call	sub_679A00
test	eax, eax
jnz	short loc_6DC690

loc_6DC6F5:
push	esi
lea	ecx, [edi+34h]
call	sub_67A3D0
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [edi+38h]
call	sub_67A3D0
pop	edi
pop	esi
mov	al, 1
pop	ebx
pop	ecx
retn	8

loc_6DC714:		; jumptable 006DC69F cases 0,1,3-5,10,24-26,28,29,58,92
pop	edi
pop	esi
xor	al, al
pop	ebx
pop	ecx
retn	8
sub_6DC670 endp

align 10h
off_6DC720 dd offset loc_6DC714, offset	loc_6DC6A6 ; jump table	for switch statement
byte_6DC728 db	    0,	   0,	  1,	 0 ; indirect table for	switch statement
db	0,     0,     1,     1
db	1,     1,     0,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0,     0,     0,     1
db	0,     0,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     0,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0
align 10h



sub_6DC790 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, [esp+4+arg_4]
mov	eax, [esi]
mov	eax, [eax]
mov	edx, offset aData ; "data"
push	ebx
nop

loc_6DC7A0:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6DC7C0
test	bl, bl
jz	short loc_6DC7BC
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6DC7C0
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6DC7A0

loc_6DC7BC:
xor	eax, eax
jmp	short loc_6DC7C5

loc_6DC7C0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DC7C5:
pop	ebx
test	eax, eax
jnz	short loc_6DC7D0
mov	al, 1
pop	esi
retn	10h

loc_6DC7D0:
mov	edx, [esp+4+arg_C]
mov	eax, [esp+4+arg_8]
push	edx
mov	edx, [esp+8+arg_0]
push	eax
push	esi
push	edx
call	sub_665190
pop	esi
retn	10h
sub_6DC790 endp

align 10h



sub_6DC7F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	edx, [ecx+10h]
add	[esi+8], edx
mov	ecx, [esp+4+arg_4]
movzx	eax, byte ptr [ecx]
mov	edx, [esi+8]
add	eax, 0FFFFFFFDh	; switch 4 cases
cmp	eax, 3
ja	short loc_6DC873 ; default
jmp	ds:off_6DC878[eax*4] ; switch jump

loc_6DC818:		; jumptable 006DC811 cases 3,4
add	edx, 4
mov	[esi+8], edx
pop	esi
retn	0Ch

loc_6DC822:		; jumptable 006DC811 case 5
mov	eax, [esi+4]
push	0
push	0FFFFFFFFh
push	eax
lea	edx, [esp+10h+arg_0]
push	edx
call	sub_652F60
mov	eax, [esp+4+arg_0]
mov	ecx, [eax+10h]
add	[esi+8], ecx
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DC873 ; default
call	sub_650DF0
pop	esi
retn	0Ch

loc_6DC854:		; jumptable 006DC811 case 6
mov	edx, [esi+4]
push	edx
call	sub_652C20
mov	edx, [esi+4]
push	0
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	eax, [eax+20h]
push	0
push	esi
add	edx, 78h
push	edx
call	eax

loc_6DC873:		; default
pop	esi
retn	0Ch
sub_6DC7F0 endp

align 4
off_6DC878 dd offset loc_6DC818	; jump table for switch	statement
dd offset loc_6DC818
dd offset loc_6DC822
dd offset loc_6DC854
align 10h



sub_6DC890 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+38h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6DC8BC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DC8BC:
mov	esi, [edi+34h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6DC8DD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DC8DD:
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_664A30
sub_6DC890 endp

align 10h



sub_6DC8F0 proc	near

var_11=	byte ptr -11h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	eax, [edi+78h]
push	0
push	4
mov	esi, ecx
mov	[esp+24h+var_11], 0
mov	ecx, [eax+280h]
push	offset aData	; "data"
call	sub_650E40
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esp+1Ch+var_11]
push	ecx
mov	[esp+20h+arg_0], eax
inc	dword ptr [eax+8]
push	edx
lea	ecx, [esp+24h+var_10]
call	sub_652700
push	eax
lea	eax, [esp+24h+arg_0]
push	eax
push	edi
lea	ecx, [esi+10h]
call	sub_665190
mov	eax, [esp+1Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
jnz	short loc_6DC958
call	sub_650DF0

loc_6DC958:
lea	ecx, [esp+14h+var_10]
call	sub_652830
add	esp, 14h
retn	8
sub_6DC8F0 endp

align 10h



; int __thiscall sub_6DC970(void *, char)
sub_6DC970 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15818F8
jz	short loc_6DC989
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6DC989:
mov	eax, esi
pop	esi
retn	4
sub_6DC970 endp

align 10h



sub_6DC990 proc	near
add	ecx, 2Ch
jmp	sub_665AD0
sub_6DC990 endp

align 10h



sub_6DC9A0 proc	near
sub	ecx, 10h
jmp	loc_6DC9C0
sub_6DC9A0 endp

align 10h



sub_6DC9B0 proc	near

arg_0= byte ptr	 4

sub	ecx, 3Ch
jmp	loc_6DC9C0
align 10h

loc_6DC9C0:
push	esi
mov	esi, ecx
lea	ecx, [esi+3Ch]
mov	dword ptr [esi], offset	off_143BFF8
mov	dword ptr [esi+10h], offset off_143C0C8
mov	dword ptr [ecx], offset	off_143C0C0
call	sub_665A40
mov	ecx, esi
call	sub_6DC890
test	[esp+4+arg_0], 1
jz	short loc_6DC9FA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DC9FA:
mov	eax, esi
pop	esi
retn	4
sub_6DC9B0 endp




sub_6DCA00 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_6DCA5D
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6DCA14:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6DCA40
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6DCA2F
call	sub_650DF0

loc_6DCA2F:
mov	edx, [esi+8]
mov	eax, [edx+4]
lea	ecx, [esi+8]
call	eax
mov	dword ptr [esi], 0FFFFFFFEh

loc_6DCA40:
add	edi, 10h
sub	ebp, 1
jnz	short loc_6DCA14
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_6DCA5D:
pop	ebx
retn
sub_6DCA00 endp

align 10h



sub_6DCA60 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+34h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6DCA8C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DCA8C:
mov	esi, [edi+38h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6DCAAD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DCAAD:
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_664580
sub_6DCA60 endp

align 10h



sub_6DCAC0 proc	near

var_18=	qword ptr -18h
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
mov	ebp, [ecx+eax*4-4]
mov	eax, [esp+24h+arg_8]
push	edi
mov	[esp+28h+var_10], 0
mov	ebx, 1
cmp	eax, 4		; switch 5 cases
ja	loc_6DCBE0	; default
jmp	ds:off_6DCC84[eax*4] ; switch jump

loc_6DCAF1:		; jumptable 006DCAEA case 3
mov	edx, [esp+28h+arg_4]
mov	eax, [edx]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
call	_atof
fstp	[esp+2Ch+var_18]
add	esp, 4
cmp	[esp+28h+var_10], 5
jb	short loc_6DCB1A
lea	ecx, [esp+28h+var_10]
call	sub_652060

loc_6DCB1A:
fld	[esp+28h+var_18]
mov	[esp+28h+var_10], 3
fstp	[esp+28h+var_C]
jmp	loc_6DCBE0	; default

loc_6DCB2C:		; jumptable 006DCAEA case 4
mov	eax, [esi+8]
mov	ecx, [eax+78h]
mov	edx, [esp+28h+arg_4]
mov	eax, [edx]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	edi, eax
add	[edi+8], ebx
cmp	[esp+28h+var_10], 5
jb	short loc_6DCB6D
lea	ecx, [esp+28h+var_10]
call	sub_652060

loc_6DCB6D:
mov	[esp+28h+var_10], 5
mov	dword ptr [esp+28h+var_C], edi
add	[edi+8], ebx
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6DCBE0 ; default
mov	ecx, edi
call	sub_650DF0
jmp	short loc_6DCBE0 ; default

loc_6DCB88:		; jumptable 006DCAEA case 2
mov	eax, [esp+28h+arg_4]
mov	eax, [eax]
and	eax, 0FFFFFFFCh
push	4		; size_t
add	eax, 8
push	offset aTrue	; "true"
push	eax		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
lea	ecx, [esp+28h+var_10]
setz	byte ptr [esp+28h+arg_4]
call	sub_652060
mov	cl, byte ptr [esp+28h+arg_4]
mov	[esp+28h+var_10], 2
mov	byte ptr [esp+28h+var_C], cl
jmp	short loc_6DCBE0 ; default

loc_6DCBC3:		; jumptable 006DCAEA case 0
lea	ecx, [esp+28h+var_10]
call	sub_652060
mov	[esp+28h+var_10], 0
jmp	short loc_6DCBE0 ; default

loc_6DCBD3:		; jumptable 006DCAEA case 1
lea	ecx, [esp+28h+var_10]
call	sub_652060
mov	[esp+28h+var_10], bl

loc_6DCBE0:		; default
cmp	byte ptr [esi+1Ch], 0
jz	short loc_6DCC05
lea	edx, [esp+28h+var_10]
push	edx
mov	ecx, ebp
call	sub_65E720
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	0Ch

loc_6DCC05:
mov	eax, [esi+8]
mov	edx, [esp+28h+arg_0]
mov	byte ptr [esp+28h+arg_4], 0
mov	ecx, [eax+78h]
mov	eax, [edx]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
lea	edx, [esp+28h+arg_4]
push	edx
lea	edx, [esp+2Ch+var_10]
push	edx
mov	[esp+30h+arg_8], eax
add	[eax+8], ebx
mov	eax, [ebp+10h]
mov	eax, [eax+0Ch]
lea	edx, [esp+30h+arg_8]
lea	ecx, [ebp+10h]
push	edx
mov	edx, [esi+8]
push	edx
call	eax
mov	eax, [esp+28h+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DCC71
call	sub_650DF0

loc_6DCC71:
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	0Ch
sub_6DCAC0 endp

off_6DCC84 dd offset loc_6DCBC3	; jump table for switch	statement
dd offset loc_6DCBD3
dd offset loc_6DCB88
dd offset loc_6DCAF1
dd offset loc_6DCB2C
align 10h



sub_6DCCA0 proc	near

var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebp
push	esi
mov	esi, [esp+24h+arg_0]
mov	eax, [esi+78h]
push	edi
push	0
lea	edi, [esi+78h]
push	4
mov	ebp, ecx
mov	[esp+30h+var_10], 0
mov	ecx, [eax+280h]
push	offset aData	; "data"
call	sub_650E40
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_0]
push	edx
mov	[esp+30h+arg_0], eax
inc	dword ptr [eax+8]
push	esi
lea	ecx, [ebp+10h]
call	sub_6E2610
mov	eax, [esp+28h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DCCFB
call	sub_650DF0

loc_6DCCFB:
push	esi
lea	ecx, [esp+2Ch+var_10]
call	sub_652C20
push	0
lea	ecx, [eax+10h]
push	0
lea	edx, [esp+30h+var_1C]
mov	dword ptr [esp+30h+var_1C], offset off_143BFF0
mov	[esp+30h+var_18], esi
mov	[esp+30h+var_14], 0
mov	eax, [ecx]
mov	eax, [eax+20h]
push	edx
push	edi
call	eax
mov	esi, [esp+28h+var_14]
lea	ecx, [esp+28h+var_10]
mov	dword ptr [esp+28h+var_1C], offset off_15818F8
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 1Ch
retn	4
sub_6DCCA0 endp

align 10h



sub_6DCD50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	2Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DCD74
push	0
push	0
push	offset aSharedobject ; "SharedObject"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_6DCD74:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DCDA4
lea	ecx, [eax-10h]
test	ecx, ecx
jz	short loc_6DCDA4
mov	eax, [esi+18h]
push	edi
push	eax
call	sub_6DCCA0
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6DCD9D
mov	ecx, esi
call	sub_652060

loc_6DCD9D:
mov	[esi+4], edi
mov	byte ptr [esi],	4
pop	edi

loc_6DCDA4:
pop	esi
retn
sub_6DCD50 endp

align 10h



sub_6DCDB0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
test	eax, eax
jz	short loc_6DCDDB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+58h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6DCDDB:
mov	ecx, esi
pop	esi
jmp	sub_6DCA60
sub_6DCDB0 endp

align 10h



sub_6DCDF0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_6DCE0E
call	sub_6F4100
pop	edi
add	esp, 0Ch
retn	8

loc_6DCE0E:
push	esi
cmp	eax, 8
jnb	short loc_6DCE1B
mov	esi, 8
jmp	short loc_6DCE80

loc_6DCE1B:
dec	eax
mov	[esp+14h+arg_4], eax
fild	[esp+14h+arg_4]
test	eax, eax
jge	short loc_6DCE2E
fadd	ds:flt_15FCC08

loc_6DCE2E:
call	__CIlog
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fnstcw	word ptr [esp+14h+arg_4]
movzx	eax, word ptr [esp+14h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+14h+var_8], eax
fldcw	word ptr [esp+14h+var_8]
fistp	[esp+14h+var_8]
mov	cl, byte ptr [esp+14h+var_8]
shl	esi, cl
fldcw	word ptr [esp+14h+arg_4]

loc_6DCE80:
mov	ecx, dword_1855FC0
lea	edx, [esp+14h+var_8]
push	edx
mov	[esp+18h+arg_4], 0
mov	dword ptr [esp+18h+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
call	eax
mov	[esp+14h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+14h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_6DCEE4
xor	eax, eax
jmp	short loc_6DCED0
align 10h

loc_6DCED0:
mov	ecx, [esp+14h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_6DCED0

loc_6DCEE4:
mov	eax, [edi]
test	eax, eax
jz	short loc_6DCF4B
mov	eax, [eax+4]
push	ebx
push	ebp
mov	ebp, [esp+1Ch+arg_0]
xor	edi, edi
lea	ebx, [eax+1]
jmp	short loc_6DCF00
align 10h

loc_6DCF00:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6DCF29
mov	ecx, [esi+4]
lea	eax, [esi+4]
push	ecx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_6DCFC0
mov	dword ptr [esi], 0FFFFFFFEh

loc_6DCF29:
add	edi, 0Ch
sub	ebx, 1
jnz	short loc_6DCF00
mov	ecx, dword_1855FC0
mov	eax, [esp+1Ch+var_C]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esp+1Ch+var_C]
pop	ebp
pop	ebx

loc_6DCF4B:
mov	eax, [esp+14h+arg_4]
pop	esi
mov	[edi], eax
pop	edi
add	esp, 0Ch
retn	8
sub_6DCDF0 endp

align 10h



sub_6DCF60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_6DCFB4
mov	ebx, [edi+4]
mov	edx, [ecx+4]
and	edx, ebx
cmp	edx, esi
jnz	short loc_6DCFB4
push	ebp

loc_6DCF86:
mov	edx, [ecx+4]
mov	ebp, edx
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_6DCF9A
mov	ebp, [esp+10h+arg_0]
cmp	edx, [ebp+0]
jz	short loc_6DCFAD

loc_6DCF9A:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_6DCFAA
lea	ecx, [eax+eax*2]
lea	ecx, [edi+ecx*4+8]
jmp	short loc_6DCF86

loc_6DCFAA:
or	eax, 0FFFFFFFFh

loc_6DCFAD:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_6DCFB4:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_6DCF60 endp

align 10h



sub_6DCFC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6DCFD3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6DCFF5

loc_6DCFD3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6DCFFA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6DCFF5:
call	sub_6DCDF0

loc_6DCFFA:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ecx, [esi+edx*4+8]
lea	edx, [esi+edx*4+8]
mov	edi, 0FFFFFFFEh
cmp	ecx, edi
jnz	short loc_6DD035
mov	eax, [esp+8+arg_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	ecx, [eax]
mov	[edx+4], ecx
mov	eax, [eax+4]
pop	edi
mov	[edx+8], eax
pop	esi
retn	0Ch

loc_6DD035:
push	ebx
push	ebp
mov	ebp, [esi+4]
mov	ecx, eax
lea	esp, [esp+0]

loc_6DD040:
inc	ecx
and	ecx, ebp
lea	ebx, [ecx+ecx*2]
cmp	[esi+ebx*4+8], edi
jnz	short loc_6DD040
lea	edi, [ecx+ecx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [edx+4]
and	edi, ebp
cmp	edi, eax
jnz	short loc_6DD088
test	ebx, ebx
jz	short loc_6DD070
mov	eax, [edx]
mov	[ebx], eax
mov	eax, [edx+4]
mov	[ebx+4], eax
mov	eax, [edx+8]
mov	[ebx+8], eax

loc_6DD070:
mov	eax, [esp+10h+arg_4]
mov	esi, [eax]
pop	ebp
mov	[edx+4], esi
mov	eax, [eax+4]
pop	ebx
pop	edi
mov	[edx], ecx
mov	[edx+8], eax
pop	esi
retn	0Ch

loc_6DD088:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_6DD0A4

loc_6DD095:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_6DD095

loc_6DD0A4:
test	ebx, ebx
jz	short loc_6DD0B8
mov	eax, [edx]
mov	[ebx], eax
mov	eax, [edx+4]
mov	[ebx+4], eax
mov	eax, [edx+8]
mov	[ebx+8], eax

loc_6DD0B8:
mov	eax, [esp+10h+arg_4]
mov	[edi], ecx
mov	ecx, [eax]
pop	ebp
pop	ebx
mov	[edx+4], ecx
mov	eax, [eax+4]
pop	edi
mov	dword ptr [edx], 0FFFFFFFFh
mov	[edx+8], eax
pop	esi
retn	0Ch
sub_6DCFC0 endp

align 10h



sub_6DD0E0 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6DD0E0 endp

align 10h



sub_6DD100 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_6DD113
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6DD135

loc_6DD113:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6DD13A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6DD135:
call	sub_6DCDF0

loc_6DD13A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ecx, [esi+edx*4+8]
lea	edx, [esi+edx*4+8]
mov	edi, 0FFFFFFFEh
cmp	ecx, edi
jnz	short loc_6DD179
mov	eax, [esp+8+arg_4]
mov	dword ptr [edx], 0FFFFFFFFh
mov	ecx, [eax]
mov	ecx, [ecx]
mov	[edx+4], ecx
mov	eax, [eax+4]
mov	ecx, [eax]
pop	edi
mov	[edx+8], ecx
pop	esi
retn	0Ch

loc_6DD179:
push	ebx
push	ebp
mov	ebp, [esi+4]
mov	ecx, eax

loc_6DD180:
inc	ecx
and	ecx, ebp
lea	ebx, [ecx+ecx*2]
cmp	[esi+ebx*4+8], edi
jnz	short loc_6DD180
lea	edi, [ecx+ecx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [edx+4]
and	edi, ebp
cmp	edi, eax
jnz	short loc_6DD1CC
test	ebx, ebx
jz	short loc_6DD1B0
mov	eax, [edx]
mov	[ebx], eax
mov	eax, [edx+4]
mov	[ebx+4], eax
mov	eax, [edx+8]
mov	[ebx+8], eax

loc_6DD1B0:
mov	eax, [esp+10h+arg_4]
mov	esi, [eax]
mov	esi, [esi]
mov	[edx+4], esi
mov	eax, [eax+4]
mov	eax, [eax]
pop	ebp
pop	ebx
pop	edi
mov	[edx+8], eax
mov	[edx], ecx
pop	esi
retn	0Ch

loc_6DD1CC:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_6DD1EF
lea	esp, [esp+0]

loc_6DD1E0:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_6DD1E0

loc_6DD1EF:
test	ebx, ebx
jz	short loc_6DD203
mov	eax, [edx]
mov	[ebx], eax
mov	eax, [edx+4]
mov	[ebx+4], eax
mov	eax, [edx+8]
mov	[ebx+8], eax

loc_6DD203:
mov	eax, [esp+10h+arg_4]
mov	[edi], ecx
mov	ecx, [eax]
mov	ecx, [ecx]
mov	[edx+4], ecx
mov	eax, [eax+4]
mov	ecx, [eax]
pop	ebp
pop	ebx
pop	edi
mov	[edx+8], ecx
mov	dword ptr [edx], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_6DD100 endp

align 10h



sub_6DD230 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx]
inc	dword ptr [esi+8]
push	edi
mov	edi, ecx
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6DD24B
call	sub_650DF0

loc_6DD24B:
lea	eax, [ebx+4]
mov	[edi], esi
test	eax, eax
jz	short loc_6DD259
lea	esi, [eax+4]
jmp	short loc_6DD25B

loc_6DD259:
xor	esi, esi

loc_6DD25B:
mov	eax, [esi]
test	eax, eax
jz	short loc_6DD26E
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6DD26E:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6DD27A
call	sub_64B3B0

loc_6DD27A:
mov	edx, [esi]
mov	[edi+8], edx
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_6DD230 endp

align 10h



sub_6DD290 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6DD2A0
align 10h

loc_6DD2A0:
push	esi
mov	esi, ecx
call	sub_6DC890
test	[esp+4+arg_0], 1
jz	short loc_6DD2BD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DD2BD:
mov	eax, esi
pop	esi
retn	4
sub_6DD290 endp

align 10h



; int __thiscall sub_6DD2D0(void *, char)
sub_6DD2D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143C01C
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6DD2E5
call	sub_64B3B0

loc_6DD2E5:
test	[esp+4+arg_0], 1
jz	short loc_6DD2F5
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6DD2F5:
mov	eax, esi
pop	esi
retn	4
sub_6DD2D0 endp

align 10h



sub_6DD300 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6DD330
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DD330:
mov	eax, esi
pop	esi
retn	4
sub_6DD300 endp

align 10h



sub_6DD340 proc	near
push	ebp
mov	ebp, ecx
mov	eax, [ebp+14h]
push	esi
lea	esi, [ebp+10h]
test	eax, eax
jbe	short loc_6DD37A
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_6DD38A
mov	eax, [esi]
test	eax, eax
jz	short loc_6DD371
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_6DD371:
mov	dword ptr [esi+8], 0
jmp	short loc_6DD38A

loc_6DD37A:
cmp	dword ptr [esi+8], 0
ja	short loc_6DD38A
push	0
push	esi
mov	ecx, esi
call	sub_714BE0

loc_6DD38A:
push	edi
mov	dword ptr [esi+4], 0
mov	edi, [esi+4]
inc	edi
cmp	edi, [esi+4]
jnb	short loc_6DD3A7
mov	ecx, [esi+8]
shr	ecx, 1
cmp	edi, ecx
jnb	short loc_6DD3BC
push	edi
jmp	short loc_6DD3B4

loc_6DD3A7:
cmp	edi, [esi+8]
jb	short loc_6DD3BC
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx

loc_6DD3B4:
push	esi
mov	ecx, esi
call	sub_714BE0

loc_6DD3BC:
mov	eax, [esi]
lea	eax, [eax+edi*4-4]
mov	[esi+4], edi
pop	edi
test	eax, eax
jz	short loc_6DD3CF
mov	ecx, [ebp+0Ch]
mov	[eax], ecx

loc_6DD3CF:
pop	esi
pop	ebp
retn
sub_6DD340 endp

align 10h



sub_6DD3E0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
mov	ebp, [ecx+eax*4-4]
mov	ecx, [esi+8]
mov	eax, [ecx+78h]
lea	edi, [esi+10h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 0Ch
push	eax
push	edx
call	sub_671840
cmp	byte ptr [esi+1Ch], 0
mov	ebx, eax
jz	short loc_6DD42E
push	ebx
lea	ecx, [esp+30h+var_10]
call	sub_652700
push	eax
mov	ecx, ebp
call	sub_65E720
jmp	short loc_6DD4AA

loc_6DD42E:
mov	eax, [esi+8]
mov	edx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_19], 0
mov	ecx, [eax+78h]
mov	eax, [edx]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	[esp+2Ch+arg_0], eax
inc	dword ptr [eax+8]
mov	eax, [ebp+10h]
lea	ecx, [esp+2Ch+var_19]
push	ecx
add	ebp, 10h
push	ebx
lea	ecx, [esp+34h+var_10]
mov	[esp+34h+var_18], eax
call	sub_652700
push	eax
mov	eax, [esi+8]
lea	edx, [esp+34h+arg_0]
push	edx
push	eax
mov	eax, [esp+3Ch+var_18]
mov	edx, [eax+0Ch]
mov	ecx, ebp
call	edx
mov	eax, [esp+2Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DD4AA
call	sub_650DF0

loc_6DD4AA:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	byte ptr [esi+1Ch], 0
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6DD4CC
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6DD4E1
push	esi
jmp	short loc_6DD4D9

loc_6DD4CC:
cmp	esi, [edi+8]
jb	short loc_6DD4E1
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_6DD4D9:
push	edi
mov	ecx, edi
call	sub_714BE0

loc_6DD4E1:
mov	edx, [edi]
mov	[edi+4], esi
lea	esi, [edx+esi*4-4]
test	esi, esi
jz	short loc_6DD4F0
mov	[esi], ebx

loc_6DD4F0:
test	ebx, ebx
jz	short loc_6DD4FB
mov	ecx, ebx
call	sub_64B3B0

loc_6DD4FB:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	4
sub_6DD3E0 endp

align 10h



sub_6DD510 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
mov	ebp, [ecx+eax*4-4]
mov	ecx, [esi+8]
mov	eax, [ecx+78h]
lea	edi, [esi+10h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 10h
push	eax
push	edx
call	sub_671840
cmp	byte ptr [esi+1Ch], 0
mov	ebx, eax
jz	short loc_6DD55E
push	ebx
lea	ecx, [esp+30h+var_10]
call	sub_652700
push	eax
mov	ecx, ebp
call	sub_65E720
jmp	short loc_6DD5DA

loc_6DD55E:
mov	eax, [esi+8]
mov	edx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_19], 0
mov	ecx, [eax+78h]
mov	eax, [edx]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	[esp+2Ch+arg_0], eax
inc	dword ptr [eax+8]
mov	eax, [ebp+10h]
lea	ecx, [esp+2Ch+var_19]
push	ecx
add	ebp, 10h
push	ebx
lea	ecx, [esp+34h+var_10]
mov	[esp+34h+var_18], eax
call	sub_652700
push	eax
mov	eax, [esi+8]
lea	edx, [esp+34h+arg_0]
push	edx
push	eax
mov	eax, [esp+3Ch+var_18]
mov	edx, [eax+0Ch]
mov	ecx, ebp
call	edx
mov	eax, [esp+2Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DD5DA
call	sub_650DF0

loc_6DD5DA:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	byte ptr [esi+1Ch], 1
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6DD5FC
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6DD611
push	esi
jmp	short loc_6DD609

loc_6DD5FC:
cmp	esi, [edi+8]
jb	short loc_6DD611
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_6DD609:
push	edi
mov	ecx, edi
call	sub_714BE0

loc_6DD611:
mov	edx, [edi]
mov	[edi+4], esi
lea	esi, [edx+esi*4-4]
test	esi, esi
jz	short loc_6DD620
mov	[esi], ebx

loc_6DD620:
test	ebx, ebx
jz	short loc_6DD62B
mov	ecx, ebx
call	sub_64B3B0

loc_6DD62B:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	4
sub_6DD510 endp

align 10h



sub_6DD640 proc	near
push	ebx
push	esi
mov	ebx, ecx
mov	eax, [ebx+14h]
lea	esi, [ebx+10h]
push	edi
lea	edi, [eax-1]
cmp	edi, eax
jnb	short loc_6DD65E
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_6DD673
push	edi
jmp	short loc_6DD66B

loc_6DD65E:
cmp	edi, [esi+8]
jb	short loc_6DD673
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_6DD66B:
push	esi
mov	ecx, esi
call	sub_714BE0

loc_6DD673:
mov	[esi+4], edi
mov	eax, [esi]
mov	edx, edi
mov	eax, [eax+edx*4-4]
mov	edx, [eax+10h]
lea	ecx, [eax+10h]
mov	eax, [edx+8]
call	eax
cmp	eax, 7
pop	edi
setz	cl
pop	esi
mov	[ebx+1Ch], cl
pop	ebx
retn
sub_6DD640 endp

align 10h



sub_6DD6A0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
lea	edi, [esi+10h]
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143C07C
mov	dword ptr [edi], offset	off_143C028
call	sub_679E30
lea	ecx, [esi+38h]
call	sub_679E30
mov	ecx, [ebx+78h]
add	ebx, 78h
push	2Ch
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6DD6A0 endp

align 10h



sub_6DD6F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	3Ch
call	eax
test	eax, eax
jz	short loc_6DD719
push	esi
mov	ecx, eax
call	sub_6DD6A0
pop	esi
retn	4

loc_6DD719:
xor	eax, eax
pop	esi
retn	4
sub_6DD6F0 endp

align 10h



sub_6DD720 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	3Ch
call	eax
test	eax, eax
jz	short loc_6DD750
mov	ecx, [edi+18h]
push	ecx
mov	ecx, eax
call	sub_6DD6A0
mov	esi, eax
jmp	short loc_6DD752

loc_6DD750:
xor	esi, esi

loc_6DD752:
mov	ecx, [edi+4]
push	esi
call	sub_652E40
pop	edi
test	esi, esi
jz	short loc_6DD768
mov	ecx, esi
pop	esi
jmp	sub_64B3B0

loc_6DD768:
pop	esi
retn
sub_6DD720 endp

align 10h



sub_6DD770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
lea	edi, [esi+10h]
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143C07C
mov	dword ptr [edi], offset	off_143C028
call	sub_679E30
lea	ecx, [esi+38h]
call	sub_679E30
mov	eax, [esp+0Ch+arg_4]
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+3Ch]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143BFF8
mov	dword ptr [edi], offset	off_143C0C8
mov	dword ptr [ecx], offset	off_143C0C0
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6DD770 endp

align 10h



sub_6DD800 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_662CF0
mov	ecx, [esi+38h]
add	esi, 38h
test	ecx, ecx
jnz	short loc_6DD817
xor	eax, eax
jmp	short loc_6DD82F

loc_6DD817:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
nop

loc_6DD820:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DD82D
inc	eax
add	ecx, 10h
cmp	eax, edx
jbe	short loc_6DD820

loc_6DD82D:
mov	ecx, esi

loc_6DD82F:
mov	edi, ecx
mov	esi, eax

loc_6DD833:
test	edi, edi
jz	short loc_6DD876
mov	eax, [edi]
test	eax, eax
jz	short loc_6DD876
cmp	esi, [eax+4]
jg	short loc_6DD876
mov	ecx, esi
shl	ecx, 4
mov	ecx, [ecx+eax+14h]
call	sub_64B3B0
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_6DD833
inc	esi
cmp	esi, eax
ja	short loc_6DD833
mov	edx, esi
shl	edx, 4
lea	ecx, [edx+ecx+8]

loc_6DD867:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DD833
inc	esi
add	ecx, 10h
cmp	esi, eax
jbe	short loc_6DD867
jmp	short loc_6DD833

loc_6DD876:
pop	edi
pop	esi
retn
sub_6DD800 endp

align 10h



sub_6DD880 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_6625C0
mov	ecx, [esi+38h]
add	esi, 38h
test	ecx, ecx
jnz	short loc_6DD897
xor	eax, eax
jmp	short loc_6DD8AF

loc_6DD897:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
nop

loc_6DD8A0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DD8AD
inc	eax
add	ecx, 10h
cmp	eax, edx
jbe	short loc_6DD8A0

loc_6DD8AD:
mov	ecx, esi

loc_6DD8AF:
mov	edi, ecx
mov	esi, eax

loc_6DD8B3:
test	edi, edi
jz	short loc_6DD91F
mov	eax, [edi]
test	eax, eax
jz	short loc_6DD91F
cmp	esi, [eax+4]
jg	short loc_6DD91F
mov	ecx, esi
shl	ecx, 4
mov	ecx, [ecx+eax+14h]
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6DD8F6
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6DD8F6:
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_6DD8B3
inc	esi
cmp	esi, eax
ja	short loc_6DD8B3
mov	edx, esi
shl	edx, 4
lea	ecx, [edx+ecx+8]
lea	ecx, [ecx+0]

loc_6DD910:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DD8B3
inc	esi
add	ecx, 10h
cmp	esi, eax
jbe	short loc_6DD910
jmp	short loc_6DD8B3

loc_6DD91F:
pop	edi
pop	esi
retn
sub_6DD880 endp

align 10h



sub_6DD930 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_6626E0
mov	ecx, [esi+38h]
add	esi, 38h
test	ecx, ecx
jnz	short loc_6DD947
xor	eax, eax
jmp	short loc_6DD95F

loc_6DD947:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
nop

loc_6DD950:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DD95D
inc	eax
add	ecx, 10h
cmp	eax, edx
jbe	short loc_6DD950

loc_6DD95D:
mov	ecx, esi

loc_6DD95F:
mov	edi, ecx
mov	esi, eax

loc_6DD963:
test	edi, edi
jz	short loc_6DD9BF
mov	eax, [edi]
test	eax, eax
jz	short loc_6DD9BF
cmp	esi, [eax+4]
jg	short loc_6DD9BF
mov	ecx, esi
shl	ecx, 4
mov	ecx, [ecx+eax+14h]
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6DD998
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6DD998:
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_6DD963
inc	esi
cmp	esi, eax
ja	short loc_6DD963
mov	edx, esi
shl	edx, 4
lea	ecx, [edx+ecx+8]
nop

loc_6DD9B0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DD963
inc	esi
add	ecx, 10h
cmp	esi, eax
jbe	short loc_6DD9B0
jmp	short loc_6DD963

loc_6DD9BF:
pop	edi
pop	esi
retn
sub_6DD930 endp

align 10h



sub_6DD9D0 proc	near
push	ebx
push	esi
push	edi
mov	esi, ecx
call	sub_662DF0
mov	ecx, [esi+38h]
add	esi, 38h
test	ecx, ecx
jnz	short loc_6DD9E8
xor	eax, eax
jmp	short loc_6DD9FF

loc_6DD9E8:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8

loc_6DD9F0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DD9FD
inc	eax
add	ecx, 10h
cmp	eax, edx
jbe	short loc_6DD9F0

loc_6DD9FD:
mov	ecx, esi

loc_6DD9FF:
mov	ebx, ecx
mov	edi, eax

loc_6DDA03:
test	ebx, ebx
jz	loc_6DDAB8
mov	eax, [ebx]
test	eax, eax
jz	loc_6DDAB8
cmp	edi, [eax+4]
jg	loc_6DDAB8
mov	ecx, edi
shl	ecx, 4
mov	esi, [ecx+eax+14h]
mov	eax, [esi+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 20000000h
jnz	short loc_6DDA83
mov	ecx, eax
shr	ecx, 1Fh
test	cl, 1
jnz	short loc_6DDA83
mov	edx, [esi]
and	eax, 8FFFFFFFh
mov	[esi+8], eax
mov	eax, [edx]
push	3
mov	ecx, esi
call	eax
mov	ecx, [esi+8]
mov	eax, [esi+4]
and	ecx, 70000000h
cmp	ecx, 40000000h
jz	short loc_6DDA83
mov	edx, [eax+1Ch]
mov	[esi+4], edx
mov	[eax+1Ch], esi
mov	eax, [esi+8]
and	eax, 0CFFFFFFFh
or	eax, 40000000h
mov	[esi+8], eax

loc_6DDA83:
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	edi, eax
jg	loc_6DDA03
inc	edi
cmp	edi, eax
ja	loc_6DDA03
mov	edx, edi
shl	edx, 4
lea	ecx, [edx+ecx+8]

loc_6DDAA2:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	loc_6DDA03
inc	edi
add	ecx, 10h
cmp	edi, eax
jbe	short loc_6DDAA2
jmp	loc_6DDA03

loc_6DDAB8:
pop	edi
pop	esi
pop	ebx
retn
sub_6DD9D0 endp

align 10h



sub_6DDAC0 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_6627F0
mov	ecx, [esi+38h]
add	esi, 38h
test	ecx, ecx
jnz	short loc_6DDAD7
xor	eax, eax
jmp	short loc_6DDAEF

loc_6DDAD7:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
nop

loc_6DDAE0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DDAED
inc	eax
add	ecx, 10h
cmp	eax, edx
jbe	short loc_6DDAE0

loc_6DDAED:
mov	ecx, esi

loc_6DDAEF:
mov	edi, ecx
mov	esi, eax

loc_6DDAF3:
test	edi, edi
jz	short loc_6DDB6F
mov	eax, [edi]
test	eax, eax
jz	short loc_6DDB6F
cmp	esi, [eax+4]
jg	short loc_6DDB6F
mov	ecx, esi
shl	ecx, 4
mov	ecx, [ecx+eax+14h]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6DDB43
test	eax, 0FFFFFFFh
jbe	short loc_6DDB2E
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6DDB3A

loc_6DDB2E:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6DDB3A:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6DDB43:
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_6DDAF3
inc	esi
cmp	esi, eax
ja	short loc_6DDAF3
mov	edx, esi
shl	edx, 4
lea	ecx, [edx+ecx+8]
lea	ebx, [ebx+0]

loc_6DDB60:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6DDAF3
inc	esi
add	ecx, 10h
cmp	esi, eax
jbe	short loc_6DDB60
jmp	short loc_6DDAF3

loc_6DDB6F:
pop	edi
pop	esi
retn
sub_6DDAC0 endp

align 10h



sub_6DDB80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	esi
mov	esi, [eax]
inc	dword ptr [esi+8]
push	edi
mov	edi, ecx
mov	ecx, [edi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6DDB9D
call	sub_650DF0

loc_6DDB9D:
mov	[edi], esi
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_6DDBAB
lea	esi, [eax+4]
jmp	short loc_6DDBAD

loc_6DDBAB:
xor	esi, esi

loc_6DDBAD:
mov	eax, [esi]
test	eax, eax
jz	short loc_6DDBC0
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6DDBC0:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_6DDBD7
call	sub_64B3B0
mov	edx, [esi]
mov	[edi+8], edx
pop	edi
pop	esi
pop	ebx
retn	4

loc_6DDBD7:
mov	eax, [esi]
mov	[edi+8], eax
pop	edi
pop	esi
pop	ebx
retn	4
sub_6DDB80 endp

align 10h



sub_6DDBF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_4]
mov	[eax], ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax+4], edx
inc	dword ptr [edx+8]
add	ecx, 4
jz	short loc_6DDC0E
lea	edx, [ecx+4]
jmp	short loc_6DDC10

loc_6DDC0E:
xor	edx, edx

loc_6DDC10:
mov	ecx, [edx]
test	ecx, ecx
jz	short loc_6DDC25
push	esi
mov	esi, [ecx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[ecx+8], esi
pop	esi

loc_6DDC25:
mov	edx, [edx]
mov	[eax+0Ch], edx
mov	dword ptr [eax+8], offset off_143C01C
retn	8
sub_6DDBF0 endp

align 10h



sub_6DDC40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6DD770
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143BFC0
push	edi
lea	ecx, [esi+3Ch]
push	esi
mov	dword ptr [esi], offset	off_143BFF8
mov	dword ptr [esi+10h], offset off_143C0C8
mov	dword ptr [ecx], offset	off_143C0C0
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6DDC40 endp

align 10h



sub_6DDC90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6DDCC5 ; default
jmp	ds:off_6DDCC8[eax*4] ; switch jump

loc_6DDCA0:		; jumptable 006DDC99 case 0
call	sub_6DD800
retn	4

loc_6DDCA8:		; jumptable 006DDC99 case 1
call	sub_6DD880
retn	4

loc_6DDCB0:		; jumptable 006DDC99 case 2
call	sub_6DD930
retn	4

loc_6DDCB8:		; jumptable 006DDC99 case 3
call	sub_6DD9D0
retn	4

loc_6DDCC0:		; jumptable 006DDC99 case 4
call	sub_6DDAC0

locret_6DDCC5:		; default
retn	4
sub_6DDC90 endp

off_6DDCC8 dd offset loc_6DDCA0	; jump table for switch	statement
dd offset loc_6DDCA8
dd offset loc_6DDCB0
dd offset loc_6DDCB8
dd offset loc_6DDCC0
align 10h



sub_6DDCE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_6DDD0D
mov	eax, [esp+4+arg_0]
mov	edx, [esi+4]
and	edx, [eax]
push	edx
push	eax
call	sub_6DCF60
test	eax, eax
jl	short loc_6DDD0D
lea	eax, [eax+eax*2+3]
lea	eax, [esi+eax*4]
test	eax, eax
jz	short loc_6DDD0D
add	eax, 4
pop	esi
retn	4

loc_6DDD0D:
xor	eax, eax
pop	esi
retn	4
sub_6DDCE0 endp

align 10h



sub_6DDD20 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
inc	dword ptr [edx+8]
add	ecx, 8
jz	short loc_6DDD3D
lea	edx, [ecx+4]
jmp	short loc_6DDD3F

loc_6DDD3D:
xor	edx, edx

loc_6DDD3F:
mov	ecx, [edx]
test	ecx, ecx
jz	short loc_6DDD54
push	esi
mov	esi, [ecx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[ecx+8], esi
pop	esi

loc_6DDD54:
mov	ecx, [edx]
mov	[eax+0Ch], ecx
mov	dword ptr [eax+8], offset off_143C01C
retn	4
sub_6DDD20 endp

align 10h



sub_6DDD70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, ecx
mov	ecx, [esp+arg_4]
mov	[eax], ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	edx, [edx]
mov	[eax+4], edx
inc	dword ptr [edx+8]
mov	ecx, [ecx+4]
test	ecx, ecx
jz	short loc_6DDD92
lea	edx, [ecx+4]
jmp	short loc_6DDD94

loc_6DDD92:
xor	edx, edx

loc_6DDD94:
mov	ecx, [edx]
test	ecx, ecx
jz	short loc_6DDDA9
push	esi
mov	esi, [ecx+8]
inc	esi
and	esi, 8FFFFFFFh
mov	[ecx+8], esi
pop	esi

loc_6DDDA9:
mov	ecx, [edx]
mov	[eax+0Ch], ecx
mov	dword ptr [eax+8], offset off_143C01C
retn	8
sub_6DDD70 endp

align 10h



; int __thiscall sub_6DDDC0(void *, char)
sub_6DDDC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+4]
call	sub_6F4100
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_15818F8
jz	short loc_6DDDE1
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6DDDE1:
mov	eax, esi
pop	esi
retn	4
sub_6DDDC0 endp

align 10h



sub_6DDDF0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6DDE00
align 10h

loc_6DDE00:
push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
call	sub_6DCA00
mov	ecx, esi
call	sub_67BDD0
test	[esp+4+arg_0], 1
jz	short loc_6DDE27
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DDE27:
mov	eax, esi
pop	esi
retn	4
sub_6DDDF0 endp

align 10h



sub_6DDE30 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+38h]
call	sub_6DCA00
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6DDE30 endp

align 10h



sub_6DDE50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	[esp+8+var_8], eax
mov	eax, [eax]
mov	[esp+8+var_4], edx
push	eax
lea	edx, [esp+0Ch+var_8]
push	edx
push	ecx
call	sub_6DD100
add	esp, 8
retn	8
sub_6DDE50 endp

align 10h



sub_6DDE80 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_6DDEE5
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6DDE94:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6DDEC8
mov	dword ptr [esi+8], offset off_143C01C
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6DDEB4
call	sub_64B3B0

loc_6DDEB4:
mov	ecx, [esi+4]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6DDEC2
call	sub_650DF0

loc_6DDEC2:
mov	dword ptr [esi], 0FFFFFFFEh

loc_6DDEC8:
add	edi, 10h
sub	ebp, 1
jnz	short loc_6DDE94
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_6DDEE5:
pop	ebx
retn
sub_6DDE80 endp

align 10h



sub_6DDEF0 proc	near

var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h

sub	esp, 20h
push	ebx
push	edi
mov	edi, [esp+28h+arg_4]
mov	ebx, ecx
test	edi, edi
jz	loc_6DDFBF
push	ebp
push	esi
mov	esi, [esp+30h+arg_0]
mov	eax, [esi+78h]
push	0
lea	ebp, [esi+78h]
push	4
mov	[esp+38h+var_10], 0
mov	ecx, [eax+280h]
push	offset aData	; "data"
call	sub_650E40
lea	ecx, [esp+30h+var_10]
push	ecx
lea	edx, [esp+34h+arg_4]
push	edx
mov	[esp+38h+arg_4], eax
inc	dword ptr [eax+8]
push	esi
lea	ecx, [ebx+10h]
call	sub_6E2610
mov	eax, [esp+28h+arg_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DDF58
call	sub_650DF0

loc_6DDF58:
push	esi
lea	ecx, [esp+2Ch+var_8]
call	sub_652C20
mov	ebx, eax
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
mov	[esp+28h+var_18], offset off_143C11C
mov	[esp+28h+var_14], 0
mov	dword ptr [esp+28h+var_10], esi
mov	[esp+28h+var_C], edi
call	edx
mov	eax, [ebx+10h]
mov	eax, [eax+20h]
push	0
push	0
lea	ecx, [ebx+10h]
lea	edx, [esp+28h+var_10]
push	edx
push	ebp
call	eax
mov	edx, [edi]
mov	eax, [edx+1Ch]
mov	ecx, edi
call	eax
lea	ecx, [esp+30h+var_1C]
call	sub_6F4100
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+var_20], offset off_15818F8
call	sub_652830
pop	esi
pop	ebp

loc_6DDFBF:
pop	edi
pop	ebx
add	esp, 20h
retn	8
sub_6DDEF0 endp

align 10h



sub_6DDFD0 proc	near

var_1B4= qword ptr -1B4h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= byte ptr -19Ch
var_198= byte ptr -198h
var_194= byte ptr -194h
var_190= dword ptr -190h
var_18C= byte ptr -18Ch
var_180= byte ptr -180h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1A4h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+1A4h+var_4], eax
mov	eax, [esp+1A4h+arg_0]
mov	eax, [eax]
mov	edx, [eax]
push	esi
push	edi
mov	edi, [esp+1ACh+arg_4]
mov	esi, ecx
mov	ecx, [eax+10h]
push	ecx
push	edx
lea	ecx, [esp+1B4h+var_1A0]
call	sub_67AF00
movzx	eax, byte ptr [edi]
cmp	eax, 6		; switch 7 cases
ja	loc_6DE23B	; default
jmp	ds:off_6DE27C[eax*4] ; switch jump

loc_6DE01B:		; jumptable 006DE014 cases 3,4
mov	eax, [esi+8]
push	eax
mov	ecx, edi
call	sub_653400
sub	esp, 8
lea	ecx, [esp+1B4h+var_18C]
fstp	[esp+1B4h+var_1B4]
call	sub_6A2EC0
lea	ecx, [esp+1ACh+var_18C]
call	sub_6A24B0
lea	ecx, [esp+1ACh+var_18C]
call	sub_9B9CA0
push	eax
lea	ecx, [esp+1B0h+var_180]
push	ecx
lea	ecx, [esp+1B4h+var_1A4]
call	sub_67AF30
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	3
lea	eax, [esp+1B0h+var_1A4]
push	eax
lea	eax, [esp+1B4h+var_1A0]
push	eax
call	edx
lea	ecx, [esp+1ACh+var_1A4]
call	sub_4E40F0
lea	ecx, [esp+1ACh+var_18C]
mov	dword ptr [esp+1ACh+var_180], offset off_143A4DC
call	sub_6A2180
jmp	loc_6DE23B	; default

loc_6DE08B:		; jumptable 006DE014 case 5
mov	eax, [esi+8]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+1B8h+var_190]
push	ecx
mov	ecx, edi
call	sub_652F60
mov	edx, [esp+1ACh+var_190]
mov	eax, [edx]
push	eax
lea	ecx, [esp+1B0h+var_1A4]
call	sub_67AE10
mov	eax, [esp+1ACh+var_190]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DE0C5
call	sub_650DF0

loc_6DE0C5:
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	4
lea	eax, [esp+1B0h+var_1A4]
push	eax
lea	eax, [esp+1B4h+var_1A0]
push	eax
call	edx
lea	ecx, [esp+1ACh+var_1A4]
call	sub_4E40F0
jmp	loc_6DE23B	; default

loc_6DE0E9:		; jumptable 006DE014 case 0
push	offset byte_146D660
lea	ecx, [esp+1B0h+var_19C]
call	sub_67AE10
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	eax, [eax+10h]
push	0
lea	edx, [esp+1B0h+var_19C]
push	edx
lea	edx, [esp+1B4h+var_1A0]
push	edx
call	eax
lea	ecx, [esp+1ACh+var_19C]
call	sub_4E40F0
jmp	loc_6DE23B	; default

loc_6DE11B:		; jumptable 006DE014 case 2
mov	ecx, [esi+8]
push	ecx
mov	ecx, edi
call	sub_651D80
test	al, al
mov	eax, offset aTrue ; "true"
jnz	short loc_6DE134
mov	eax, offset aFalse ; "false"

loc_6DE134:
push	eax
lea	ecx, [esp+1B0h+var_198]
call	sub_67AE10
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	2
lea	eax, [esp+1B0h+var_198]
push	eax
lea	eax, [esp+1B4h+var_1A0]
push	eax
call	edx
lea	ecx, [esp+1ACh+var_198]
call	sub_4E40F0
jmp	loc_6DE23B	; default

loc_6DE162:		; jumptable 006DE014 case 1
push	offset byte_146D660
lea	ecx, [esp+1B0h+var_194]
call	sub_67AE10
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	eax, [eax+10h]
push	1
lea	edx, [esp+1B0h+var_194]
push	edx
lea	edx, [esp+1B4h+var_1A0]
push	edx
call	eax
lea	ecx, [esp+1ACh+var_194]
call	sub_4E40F0
jmp	loc_6DE23B	; default

loc_6DE194:		; jumptable 006DE014 case 6
mov	ecx, [esi+8]
push	ecx
mov	ecx, edi
call	sub_652C20
lea	edx, [esp+1ACh+var_1A4]
lea	edi, [esi+4]
push	edx
mov	ecx, edi
mov	[esp+1B0h+var_1A4], eax
call	sub_6DDCE0
test	eax, eax
jnz	loc_6DE23B	; default
lea	eax, [esp+1ACh+var_1A4]
mov	ecx, eax
push	eax
push	ecx
mov	ecx, edi
call	sub_6DDE50
mov	ecx, [esp+1ACh+var_1A4]
mov	edx, [ecx+10h]
mov	eax, [edx+8]
add	ecx, 10h
call	eax
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
cmp	eax, 7
lea	eax, [esp+1A8h+var_19C]
push	eax
jnz	short loc_6DE211
mov	edx, [edx+0Ch]
call	edx
mov	ecx, [esp+1ACh+var_1A4]
mov	edx, [esi+8]
mov	eax, [ecx+10h]
mov	eax, [eax+20h]
push	0
push	0
add	ecx, 10h
push	esi
add	edx, 78h
push	edx
call	eax
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+18h]
jmp	short loc_6DE239

loc_6DE211:
mov	edx, [edx+8]
call	edx
mov	ecx, [esp+1ACh+var_1A4]
mov	edx, [esi+8]
mov	eax, [ecx+10h]
mov	eax, [eax+20h]
push	0
push	0
add	ecx, 10h
push	esi
add	edx, 78h
push	edx
call	eax
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+14h]

loc_6DE239:
call	eax

loc_6DE23B:		; default
mov	esi, [esp+1ACh+var_1A0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6DE261
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DE261:
mov	ecx, [esp+1ACh+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 1A4h
retn	0Ch
sub_6DDFD0 endp

align 4
off_6DE27C dd offset loc_6DE0E9	; jump table for switch	statement
dd offset loc_6DE162
dd offset loc_6DE11B
dd offset loc_6DE01B
dd offset loc_6DE01B
dd offset loc_6DE08B
dd offset loc_6DE194
align 10h



sub_6DE2A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	2Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6DE2CA
push	0
push	0
push	offset aSharedobject ; "SharedObject"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_6DE2CA:
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	loc_6DE3A2
add	edi, 0FFFFFFF0h
jz	loc_6DE3A2
mov	ecx, [esi+18h]
mov	eax, [ecx+78h]
push	ebx
push	ebp
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 0Ch
push	eax
push	edx
call	sub_671840
mov	ebp, eax
mov	eax, [esi+18h]
push	ebp
push	eax
mov	ecx, edi
mov	[esp+20h+var_4], ebp
call	sub_6DC8F0
mov	ecx, [esi+18h]
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	25h
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_6DE38E
mov	ecx, [esi+18h]
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	0Ah
call	eax
mov	edx, [ebx]
mov	edx, [edx+8]
mov	ebp, eax
push	ebp
lea	eax, [edi+38h]
push	eax
lea	ecx, [edi+34h]
push	ecx
mov	ecx, ebx
call	edx
mov	[esp+18h+var_8], eax
test	ebp, ebp
jz	short loc_6DE366
mov	ecx, ebp
call	sub_64A430

loc_6DE366:
mov	eax, [esp+18h+var_8]
mov	ecx, [esi+18h]
push	eax
push	ecx
mov	ecx, edi
call	sub_6DDEF0
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_6DE383
call	sub_64A400

loc_6DE383:
mov	ecx, ebx
call	sub_64A430
mov	ebp, [esp+18h+var_4]

loc_6DE38E:
test	ebp, ebp
jz	short loc_6DE3A0
mov	ecx, ebp
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 8
jmp	sub_64B3B0

loc_6DE3A0:
pop	ebp
pop	ebx

loc_6DE3A2:
pop	edi
pop	esi
add	esp, 8
retn
sub_6DE2A0 endp

align 10h



sub_6DE3B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
push	2Ch
mov	ecx, ebp
call	sub_651C40
test	al, al
jnz	short loc_6DE3D6
push	0
push	0
push	offset aSharedobject ; "SharedObject"
mov	ecx, ebp
call	sub_651C60
pop	ebp
pop	ecx
retn

loc_6DE3D6:
push	ebx
mov	ebx, [ebp+8]
test	ebx, ebx
jz	loc_6DE470
add	ebx, 0FFFFFFF0h
jz	loc_6DE470
mov	ecx, [ebp+18h]
push	edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	25h
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6DE46F
mov	ecx, [ebp+18h]
push	esi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	0Ah
call	eax
mov	edx, [edi]
mov	edx, [edx+8]
mov	esi, eax
push	esi
lea	eax, [ebx+38h]
push	eax
lea	ecx, [ebx+34h]
push	ecx
mov	ecx, edi
call	edx
mov	[esp+14h+var_4], eax
test	esi, esi
jz	short loc_6DE444
mov	ecx, esi
call	sub_64A430

loc_6DE444:
mov	eax, [esp+14h+var_4]
mov	ecx, [ebp+18h]
push	eax
push	ecx
mov	ecx, ebx
call	sub_6DDEF0
mov	ecx, [esp+14h+var_4]
pop	esi
test	ecx, ecx
jz	short loc_6DE462
call	sub_64A400

loc_6DE462:
mov	ecx, edi
pop	edi
pop	ebx
pop	ebp
add	esp, 4
jmp	sub_64A430

loc_6DE46F:
pop	edi

loc_6DE470:
pop	ebx
pop	ebp
pop	ecx
retn
sub_6DE3B0 endp

align 10h



sub_6DE480 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_6DE4A2
call	sub_6DDE80
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_6DE4A2:
push	esi
cmp	eax, 8
jnb	short loc_6DE4AF
mov	esi, 8
jmp	short loc_6DE514

loc_6DE4AF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6DE4C2
fadd	ds:flt_15FCC08

loc_6DE4C2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6DE514:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
mov	edx, esi
shl	edx, 4
add	edx, 8
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 143h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_6DE574
xor	eax, eax
jmp	short loc_6DE560
align 10h

loc_6DE560:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_6DE560

loc_6DE574:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_6DE5F4
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_6DE587

loc_6DE583:
mov	edi, [esp+1Ch+var_C]

loc_6DE587:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_6DE5D3
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	esi, [edi+4]
push	ecx
push	esi
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_6DE620
mov	dword ptr [esi+4], offset off_143C01C
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6DE5C0
call	sub_64B3B0

loc_6DE5C0:
mov	ecx, [esi]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6DE5CD
call	sub_650DF0

loc_6DE5CD:
mov	dword ptr [edi], 0FFFFFFFEh

loc_6DE5D3:
add	ebx, 10h
sub	ebp, 1
jnz	short loc_6DE583
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_6DE5F4:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_6DCA00
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_6DE480 endp

align 10h



sub_6DE620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_6DE634
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_6DE656

loc_6DE634:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6DE65B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_6DE656:
call	sub_6DE480

loc_6DE65B:
mov	eax, [edi]
mov	esi, [esp+0Ch+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
mov	edx, esi
shl	edx, 4
lea	ebp, [edx+eax+8]
mov	ecx, 0FFFFFFFEh
cmp	[ebp+0], ecx
jnz	short loc_6DE68F
mov	eax, [esp+0Ch+arg_4]
push	0FFFFFFFFh
push	eax
mov	ecx, ebp
call	sub_6DDBF0
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_6DE68F:
push	ebx
mov	ebx, [eax+4]
mov	edi, esi

loc_6DE695:
inc	edi
and	edi, ebx
mov	edx, edi
shl	edx, 4
cmp	[edx+eax+8], ecx
jnz	short loc_6DE695
mov	edx, [ebp+4]
mov	edx, [edx+0Ch]
mov	ecx, edi
shl	ecx, 4
and	edx, ebx
lea	ecx, [ecx+eax+8]
cmp	edx, esi
jnz	short loc_6DE6D9
test	ecx, ecx
jz	short loc_6DE6C2
push	ebp
call	sub_6DDD20

loc_6DE6C2:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [ebp+4]
call	sub_6DD230
pop	ebx
mov	[ebp+0], edi
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_6DE6D9:
shl	edx, 4
cmp	[edx+eax+8], esi
lea	ebx, [edx+eax+8]
jz	short loc_6DE6F5

loc_6DE6E6:
mov	edx, [ebx]
shl	edx, 4
cmp	[edx+eax+8], esi
lea	ebx, [edx+eax+8]
jnz	short loc_6DE6E6

loc_6DE6F5:
test	ecx, ecx
jz	short loc_6DE6FF
push	ebp
call	sub_6DDD20

loc_6DE6FF:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [ebp+4]
mov	[ebx], edi
call	sub_6DD230
pop	ebx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_6DE620 endp

align 10h



sub_6DE720 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_6DE734
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_6DE756

loc_6DE734:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6DE75B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_6DE756:
call	sub_6DE480

loc_6DE75B:
mov	eax, [edi]
mov	esi, [esp+0Ch+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
mov	edx, esi
shl	edx, 4
lea	ebp, [edx+eax+8]
mov	ecx, 0FFFFFFFEh
cmp	[ebp+0], ecx
jnz	short loc_6DE78F
mov	eax, [esp+0Ch+arg_4]
push	0FFFFFFFFh
push	eax
mov	ecx, ebp
call	sub_6DDD70
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_6DE78F:
push	ebx
mov	ebx, [eax+4]
mov	edi, esi

loc_6DE795:
inc	edi
and	edi, ebx
mov	edx, edi
shl	edx, 4
cmp	[edx+eax+8], ecx
jnz	short loc_6DE795
mov	edx, [ebp+4]
mov	edx, [edx+0Ch]
mov	ecx, edi
shl	ecx, 4
and	edx, ebx
lea	ecx, [ecx+eax+8]
cmp	edx, esi
jnz	short loc_6DE7D9
test	ecx, ecx
jz	short loc_6DE7C2
push	ebp
call	sub_6DDD20

loc_6DE7C2:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [ebp+4]
call	sub_6DDB80
pop	ebx
mov	[ebp+0], edi
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_6DE7D9:
shl	edx, 4
cmp	[edx+eax+8], esi
lea	ebx, [edx+eax+8]
jz	short loc_6DE7F5

loc_6DE7E6:
mov	edx, [ebx]
shl	edx, 4
cmp	[edx+eax+8], esi
lea	ebx, [edx+eax+8]
jnz	short loc_6DE7E6

loc_6DE7F5:
test	ecx, ecx
jz	short loc_6DE7FF
push	ebp
call	sub_6DDD20

loc_6DE7FF:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [ebp+4]
mov	[ebx], edi
call	sub_6DDB80
pop	ebx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_6DE720 endp

align 10h



sub_6DE820 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	3Ch
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6DE886
push	offset sub_6DD720
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
push	7
push	offset off_143BFE0
lea	ecx, [esp+30h+var_18]
lea	eax, [edi+10h]
push	ecx
mov	dword ptr [edi], offset	off_143C180
mov	dword ptr [eax], offset	off_143C128
push	eax
mov	[edi+38h], ebx
call	sub_66FC60
add	esp, 10h
jmp	short loc_6DE888

loc_6DE886:
xor	edi, edi

loc_6DE888:
mov	ebp, [esp+28h+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], edi
mov	[ebp+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	5Ch
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6DE8D5
push	ebp
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, edi
call	sub_6DDC40
mov	ebx, eax
test	ebx, ebx
jz	short loc_6DE8D5
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_6DE8D5:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 2Ch
call	sub_661470
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jz	short loc_6DE903
call	sub_64B3B0

loc_6DE903:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 0B8h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_6DE952
mov	ecx, ebx
call	sub_64B3B0

loc_6DE952:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6DE820 endp

align 10h



sub_6DE960 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	[esp+8+var_8], eax
mov	eax, [eax]
mov	[esp+8+var_4], edx
mov	edx, [eax+0Ch]
push	edx
lea	eax, [esp+0Ch+var_8]
push	eax
push	ecx
call	sub_6DE720
add	esp, 8
retn	8
sub_6DE960 endp

align 10h



sub_6DE990 proc	near

var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 54h
push	ebx
push	esi
mov	esi, [esp+5Ch+arg_0]
mov	ebx, 1
cmp	[esi+1Ch], ebx
jl	loc_6DEF4C
push	ebp
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+70h+var_40]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
push	0
push	0
push	offset byte_146D660
call	sub_650E40
mov	ebp, eax
add	[ebp+8], ebx
cmp	[esi+1Ch], ebx
mov	[esp+64h+var_44], ebp
jle	short loc_6DEA3C
mov	edi, [esi+18h]
push	ebx
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+70h+var_3C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+64h+var_3C]
add	[eax+8], ebx
add	dword ptr [ebp+8], 0FFFFFFFFh
mov	edi, eax
jnz	short loc_6DEA20
mov	ecx, ebp
call	sub_650DF0

loc_6DEA20:
mov	eax, [esp+64h+var_3C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
mov	[esp+64h+var_44], edi
jnz	short loc_6DEA3A
call	sub_650DF0

loc_6DEA3A:
mov	ebp, edi

loc_6DEA3C:
mov	edx, [esp+64h+var_40]
mov	eax, [edx]
push	eax
lea	ecx, [esp+68h+var_48]
call	sub_67AE10
mov	ecx, [ebp+0]
push	ecx
lea	ecx, [esp+68h+var_4C]
call	sub_67AE10
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
mov	eax, [esp+64h+var_4C]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	[esp+64h+var_50], eax
add	[eax+8], ebx
push	offset word_1545F80
lea	ecx, [esp+68h+var_50]
call	sub_651470
mov	eax, [esp+64h+var_48]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
lea	ecx, [esp+68h+var_50]
call	sub_651470
push	2Ch
lea	ecx, [esp+68h+var_2C]
push	ecx
mov	ecx, [esi+18h]
call	sub_66D650
mov	ecx, [esp+64h+var_2C]
mov	edi, [ecx+38h]
add	ecx, 38h
mov	[esp+64h+var_38], ecx
test	edi, edi
jz	loc_6DEBCC
mov	eax, [esp+64h+var_50]
mov	edx, [edi+4]
and	edx, [eax+0Ch]
mov	byte ptr [esp+64h+arg_0], 0
push	edx
lea	edx, [esp+68h+var_50]
push	edx
mov	[esp+6Ch+var_51], 0
call	sub_66A130
test	eax, eax
jl	loc_6DEBCC
shl	eax, 4
lea	edi, [eax+edi+0Ch]
test	edi, edi
jz	loc_6DEBCC
lea	eax, [edi+4]
test	eax, eax
jz	loc_6DEBCC
mov	eax, [eax+4]
mov	ecx, [esi+4]
push	eax
call	sub_652E40
test	[esp+64h+var_24], 2
jnz	short loc_6DEB32
mov	ecx, [esp+64h+var_2C]
test	ecx, ecx
jz	short loc_6DEB32
call	sub_64B3B0

loc_6DEB32:
xor	esi, esi
mov	[esp+64h+var_2C], esi
test	[esp+64h+var_24], bl
jnz	short loc_6DEB4B
mov	ecx, [esp+64h+var_28]
cmp	ecx, esi
jz	short loc_6DEB4B
call	sub_64B3B0

loc_6DEB4B:
mov	eax, [esp+64h+var_50]
mov	ecx, eax
add	eax, 8
mov	[esp+64h+var_28], esi
dec	dword ptr [eax]
cmp	[eax], esi
jnz	short loc_6DEB63
call	sub_650DF0

loc_6DEB63:
mov	esi, [esp+64h+var_4C]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, ebx
jnz	short loc_6DEB8A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DEB8A:
mov	esi, [esp+64h+var_48]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, ebx
jnz	short loc_6DEBAB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DEBAB:
add	dword ptr [ebp+8], 0FFFFFFFFh
jnz	short loc_6DEBB8
mov	ecx, ebp
call	sub_650DF0

loc_6DEBB8:
mov	eax, [esp+64h+var_40]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jmp	loc_6DEF43

loc_6DEBCC:
mov	ecx, [esi+18h]
mov	eax, [ecx+78h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 0B8h
push	eax
push	edx
call	sub_671840
mov	ebx, eax
lea	eax, [esp+64h+var_4C]
push	eax
lea	ecx, [esp+68h+var_48]
push	ecx
mov	ecx, ebx
call	sub_6DC670
test	al, al
jnz	loc_6DECCD
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
xor	edi, edi
mov	byte ptr [esi],	1
cmp	ebx, edi
jz	short loc_6DEC1F
mov	ecx, ebx
call	sub_64B3B0

loc_6DEC1F:
test	[esp+64h+var_24], 2
jnz	short loc_6DEC33
mov	ecx, [esp+64h+var_2C]
cmp	ecx, edi
jz	short loc_6DEC33
call	sub_64B3B0

loc_6DEC33:
test	[esp+64h+var_24], 1
mov	[esp+64h+var_2C], edi
jnz	short loc_6DEC4B
mov	ecx, [esp+64h+var_28]
cmp	ecx, edi
jz	short loc_6DEC4B
call	sub_64B3B0

loc_6DEC4B:
mov	eax, [esp+64h+var_50]
mov	ecx, eax
add	eax, 8
mov	[esp+64h+var_28], edi
dec	dword ptr [eax]
cmp	[eax], edi
jnz	short loc_6DEC63
call	sub_650DF0

loc_6DEC63:
mov	esi, [esp+64h+var_4C]
mov	ebx, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6DEC8B
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DEC8B:
mov	esi, [esp+64h+var_48]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6DECAD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6DECAD:
add	dword ptr [ebp+8], 0FFFFFFFFh
jnz	short loc_6DECBA
mov	ecx, ebp
call	sub_650DF0

loc_6DECBA:
mov	eax, [esp+64h+var_40]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], edi
jmp	loc_6DEF43

loc_6DECCD:
mov	ecx, [esi+18h]
mov	eax, [ecx+78h]
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
xor	ebp, ebp
push	ebp
add	eax, 0Ch
push	eax
push	edx
call	sub_671840
mov	ecx, [esi+18h]
mov	edi, eax
mov	eax, [esi+18h]
mov	[esp+64h+var_20], offset off_155F500
mov	[esp+64h+var_1C], 1
mov	[esp+64h+var_20], offset off_143C0A0
mov	[esp+64h+var_18], eax
mov	[esp+64h+var_14], edi
mov	[esp+64h+var_10], ebp
mov	[esp+64h+var_C], ebp
mov	[esp+64h+var_8], ebp
mov	byte ptr [esp+64h+var_4], 0
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	25h
call	eax
mov	ecx, [esi+18h]
mov	[esp+64h+arg_0], eax
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	0Ah
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_6DED5F
mov	ecx, ebp
call	sub_64A430

loc_6DED5F:
mov	ecx, [esp+64h+arg_0]
test	ecx, ecx
jz	loc_6DEE83
mov	edx, [ecx]
mov	edx, [edx+4]
push	ebp
lea	eax, [esp+68h+var_20]
push	eax
lea	eax, [esp+6Ch+var_4C]
push	eax
lea	eax, [esp+70h+var_48]
push	eax
call	edx
test	al, al
jz	loc_6DEE83
mov	eax, [esi+18h]
push	edi
push	eax
mov	ecx, ebx
call	sub_6DC8F0
mov	ecx, [esi+4]
push	ebx
call	sub_652E40
xor	ebp, ebp
cmp	ebx, ebp
jz	short loc_6DEDB2
mov	ecx, [ebx+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[ebx+8], ecx

loc_6DEDB2:
mov	ecx, [esp+64h+var_38]
lea	edx, [esp+64h+var_34]
push	edx
lea	eax, [esp+68h+var_50]
mov	esi, offset off_143C01C
push	eax
mov	[esp+6Ch+var_30], ebx
mov	[esp+6Ch+var_34], esi
call	sub_6DE960
mov	ecx, [esp+64h+var_30]
mov	[esp+64h+var_34], esi
cmp	ecx, ebp
jz	short loc_6DEDE3
call	sub_64B3B0

loc_6DEDE3:
mov	ecx, [esp+64h+arg_0]
call	sub_64A430
lea	ecx, [esp+64h+var_20]
call	sub_6DD0E0
cmp	edi, ebp
jz	short loc_6DEE00
mov	ecx, edi
call	sub_64B3B0

loc_6DEE00:
cmp	ebx, ebp
jz	short loc_6DEE0B
mov	ecx, ebx
call	sub_64B3B0

loc_6DEE0B:
test	[esp+64h+var_24], 2
jnz	short loc_6DEE1F
mov	ecx, [esp+64h+var_2C]
cmp	ecx, ebp
jz	short loc_6DEE1F
call	sub_64B3B0

loc_6DEE1F:
test	[esp+64h+var_24], 1
mov	[esp+64h+var_2C], ebp
jnz	short loc_6DEE37
mov	ecx, [esp+64h+var_28]
cmp	ecx, ebp
jz	short loc_6DEE37
call	sub_64B3B0

loc_6DEE37:
mov	eax, [esp+64h+var_50]
mov	ecx, eax
add	eax, 8
mov	[esp+64h+var_28], ebp
dec	dword ptr [eax]
cmp	[eax], ebp
jnz	short loc_6DEE4F
call	sub_650DF0

loc_6DEE4F:
lea	ecx, [esp+64h+var_4C]
call	sub_4E40F0
lea	ecx, [esp+64h+var_48]
call	sub_4E40F0
mov	ecx, [esp+64h+var_44]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6DEE70
call	sub_650DF0

loc_6DEE70:
mov	eax, [esp+64h+var_40]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jmp	loc_6DEF43

loc_6DEE83:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	ecx, [esp+64h+arg_0]
mov	byte ptr [esi],	1
xor	esi, esi
cmp	ecx, esi
jz	short loc_6DEE9F
call	sub_64A430

loc_6DEE9F:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+64h+var_10]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esp+64h+var_20]
call	sub_64A3F0
cmp	edi, esi
jz	short loc_6DEEC5
mov	ecx, edi
call	sub_64B3B0

loc_6DEEC5:
cmp	ebx, esi
jz	short loc_6DEED0
mov	ecx, ebx
call	sub_64B3B0

loc_6DEED0:
test	[esp+64h+var_24], 2
jnz	short loc_6DEEE4
mov	ecx, [esp+64h+var_2C]
cmp	ecx, esi
jz	short loc_6DEEE4
call	sub_64B3B0

loc_6DEEE4:
test	[esp+64h+var_24], 1
mov	[esp+64h+var_2C], esi
jnz	short loc_6DEEFC
mov	ecx, [esp+64h+var_28]
cmp	ecx, esi
jz	short loc_6DEEFC
call	sub_64B3B0

loc_6DEEFC:
mov	eax, [esp+64h+var_50]
mov	ecx, eax
add	eax, 8
mov	[esp+64h+var_28], esi
dec	dword ptr [eax]
cmp	[eax], esi
jnz	short loc_6DEF14
call	sub_650DF0

loc_6DEF14:
lea	ecx, [esp+64h+var_4C]
call	sub_4E40F0
lea	ecx, [esp+64h+var_48]
call	sub_4E40F0
mov	ecx, [esp+64h+var_44]
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6DEF35
call	sub_650DF0

loc_6DEF35:
mov	eax, [esp+64h+var_40]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], esi

loc_6DEF43:
jnz	short loc_6DEF4A
call	sub_650DF0

loc_6DEF4A:
pop	edi
pop	ebp

loc_6DEF4C:
pop	esi
pop	ebx
add	esp, 54h
retn
sub_6DE990 endp

align 10h



sub_6DEF60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	1
mov	edi, [esi+18h]
test	edi, edi
jz	short loc_6DEFD1
cmp	dword ptr [esi+1Ch], 0
jz	short loc_6DEFD1
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+8+arg_0]
mov	ecx, [esi+18h]
mov	edi, [edx]
call	sub_668010
mov	ecx, [eax+2844h]
add	eax, 2844h
push	edi
call	sub_6B3E20
mov	eax, [esp+8+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DEFD1
pop	edi
pop	esi
jmp	sub_650DF0

loc_6DEFD1:
pop	edi
pop	esi
retn
sub_6DEF60 endp

align 10h



sub_6DEFE0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_4]
mov	eax, [esi]
mov	eax, [eax]
mov	edx, offset aAddmarker ; "addMarker"
push	ebx

loc_6DEFF2:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6DF012
test	bl, bl
jz	short loc_6DF00E
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6DF012
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6DEFF2

loc_6DF00E:
xor	eax, eax
jmp	short loc_6DF017

loc_6DF012:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DF017:
pop	ebx
test	eax, eax
jnz	short loc_6DF04E
mov	ecx, [esp+14h+arg_0]
add	ecx, 78h
push	offset sub_6DEF60
push	ecx
lea	ecx, [esp+1Ch+var_10]
call	sub_651D30
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_652520
lea	ecx, [esp+14h+var_10]
call	sub_652830
mov	al, 1
pop	esi
add	esp, 10h
retn	0Ch

loc_6DF04E:
mov	edx, [esp+14h+arg_8]
mov	eax, [esp+14h+arg_0]
push	edx
push	esi
push	eax
call	sub_6E2610
pop	esi
add	esp, 10h
retn	0Ch
sub_6DEFE0 endp

align 10h



sub_6DF070 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebx, ecx
push	edi
mov	ecx, esi
call	sub_668010
mov	ebp, [esp+10h+arg_4]
mov	edi, eax
mov	eax, [ebp+0]
mov	eax, [eax]
mov	ecx, offset aAddmarker ; "addMarker"

loc_6DF091:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6DF0B1
test	dl, dl
jz	short loc_6DF0AD
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6DF0B1
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6DF091

loc_6DF0AD:
xor	eax, eax
jmp	short loc_6DF0B6

loc_6DF0B1:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DF0B6:
test	eax, eax
jnz	short loc_6DF0FD
push	eax
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+1Ch+arg_8]
push	ecx
mov	ecx, [esp+20h+arg_8]
call	sub_652F60
mov	edx, [esp+10h+arg_8]
mov	eax, [edx]
mov	ecx, [edi+2844h]
push	eax
call	sub_6B3E20
mov	eax, [esp+10h+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6DF0F4
call	sub_650DF0

loc_6DF0F4:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	10h

loc_6DF0FD:
mov	ecx, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	ebp
push	esi
mov	ecx, ebx
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_6DF070 endp

align 10h



sub_6DF120 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+38h]
call	sub_67C000
lea	ecx, [edi+44h]
call	sub_67C000
mov	eax, [edi+50h]
test	eax, eax
jz	short loc_6DF190
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6DF18E
lea	ebx, [ebx+0]

loc_6DF150:
mov	eax, [edi+50h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6DF189
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6DF189
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6DF189:
inc	esi
cmp	esi, ebx
jb	short loc_6DF150

loc_6DF18E:
pop	esi
pop	ebx

loc_6DF190:
pop	edi
retn
sub_6DF120 endp

align 10h



sub_6DF1A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+2Ch+arg_4]
mov	ecx, [edi+294h]
mov	[esp+2Ch+var_18], edi
mov	[esp+2Ch+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_6DF203
push	offset sub_6EF500
lea	eax, [esp+30h+var_18]
push	eax
mov	ecx, esi
call	sub_67C3D0
push	7
push	offset off_143C1D0
lea	ecx, [esp+34h+var_18]
lea	eax, [esi+10h]
push	ecx
push	eax
mov	dword ptr [esi], offset	off_143C238
mov	dword ptr [eax], offset	off_143C1E0
call	sub_66FC60
add	esp, 10h
jmp	short loc_6DF205

loc_6DF203:
xor	esi, esi

loc_6DF205:
mov	ebp, [esp+2Ch+arg_0]
mov	[ebp+8], bl
mov	[ebp+0], esi
mov	[ebp+4], ebx
mov	ecx, [edi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	54h
call	eax
mov	esi, eax
cmp	esi, ebx
jz	loc_6DF2EF
push	1
mov	ecx, edi
call	sub_66FB00
push	ebp
push	eax
lea	ecx, [esp+34h+var_18]
push	ecx
mov	ecx, esi
call	sub_6B6B70
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [esi+34h], offset off_1439254
mov	edx, [esi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[esp+2Ch+arg_0], esi
mov	[esi+8], edx

loc_6DF268:
mov	eax, [esp+2Ch+arg_0]
lea	ecx, [esp+2Ch+arg_4]
push	ecx
lea	edx, [esp+30h+var_1C]
push	edx
lea	ecx, [edi+284h]
mov	[esp+34h+arg_4], eax
mov	[esp+34h+var_1C], 9Ch
call	sub_661470
mov	ecx, [esp+2Ch+arg_4]
cmp	ecx, ebx
jz	short loc_6DF29A
call	sub_64B3B0

loc_6DF29A:
mov	ebx, [edi+2ACh]
lea	eax, [esp+2Ch+arg_4]
add	ebx, 10h
mov	byte ptr [esp+2Ch+arg_4], 0
mov	esi, [ebx]
push	eax
push	ebp
lea	ecx, [esp+34h+var_10]
add	esi, 28h
call	sub_651E70
mov	edx, [esi]
push	eax
add	edi, 278h
push	edi
lea	ecx, [esp+38h+var_18]
push	ecx
mov	ecx, ebx
call	edx
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	ecx, [esp+2Ch+arg_0]
test	ecx, ecx
jz	short loc_6DF2E5
call	sub_64B3B0

loc_6DF2E5:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_6DF2EF:
mov	[esp+2Ch+arg_0], ebx
jmp	loc_6DF268
sub_6DF1A0 endp

align 10h



sub_6DF300 proc	near
push	esi
mov	esi, ecx
call	sub_6626E0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6DF32C
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6DF32C
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_6DF32C:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_6DF350
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6DF350
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

loc_6DF350:
mov	ecx, [esi+44h]
pop	esi
test	ecx, ecx
jz	short locret_6DF375
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short locret_6DF375
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx

locret_6DF375:
retn
sub_6DF300 endp

align 10h



sub_6DF380 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
test	ebx, ebx
jz	short loc_6DF3E1
mov	eax, [ebx+94h]
push	ebp
test	eax, eax
jnz	short loc_6DF39F
mov	ecx, ebx
call	sub_658B70

loc_6DF39F:
mov	ebp, eax
test	ebp, ebp
jz	short loc_6DF3A8
inc	dword ptr [ebp+0]

loc_6DF3A8:
mov	esi, [edi+38h]
test	esi, esi
jz	short loc_6DF3CB
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_6DF3CB
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DF3CB:
mov	[edi+38h], ebp
mov	eax, [ebx]
mov	edx, [eax+54h]
mov	ecx, ebx
call	edx
pop	ebp
mov	[edi+34h], eax
pop	edi
pop	esi
pop	ebx
retn	4

loc_6DF3E1:
mov	dword ptr [edi+34h], 0
mov	esi, [edi+38h]
test	esi, esi
jz	short loc_6DF40B
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_6DF40B
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DF40B:
mov	dword ptr [edi+38h], 0
pop	edi
pop	esi
pop	ebx
retn	4
sub_6DF380 endp

align 10h



sub_6DF420 proc	near
push	esi
mov	esi, ecx
call	sub_6625C0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6DF45A
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6DF45A
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6DF45A:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_6DF48C
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6DF48C
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6DF48C:
mov	ecx, [esi+44h]
pop	esi
test	ecx, ecx
jz	short locret_6DF4BF
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short locret_6DF4BF
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

locret_6DF4BF:
retn
sub_6DF420 endp




sub_6DF4C0 proc	near
push	esi
mov	esi, ecx
call	sub_6627F0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6DF507
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6DF507
test	eax, 0FFFFFFFh
jbe	short loc_6DF4F2
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6DF4FE

loc_6DF4F2:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6DF4FE:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6DF507:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_6DF546
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6DF546
test	eax, 0FFFFFFFh
jbe	short loc_6DF531
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6DF53D

loc_6DF531:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6DF53D:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6DF546:
mov	ecx, [esi+44h]
pop	esi
test	ecx, ecx
jz	short locret_6DF58E
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short locret_6DF58E
test	eax, 0FFFFFFFh
jbe	short loc_6DF579
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	2
call	edx
retn

loc_6DF579:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	4
call	edx

locret_6DF58E:
retn
sub_6DF4C0 endp

align 10h



sub_6DF590 proc	near
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [edi+34h], 0
mov	esi, [edi+38h]
test	esi, esi
jz	short loc_6DF5BE
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_6DF5BE
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DF5BE:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_664580
sub_6DF590 endp

align 10h



sub_6DF5D0 proc	near
push	esi
mov	esi, ecx
call	sub_662CF0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6DF5E4
call	sub_64B3B0

loc_6DF5E4:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_6DF5F0
call	sub_64B3B0

loc_6DF5F0:
mov	ecx, [esi+44h]
pop	esi
test	ecx, ecx
jz	short locret_6DF5FD
jmp	sub_64B3B0

locret_6DF5FD:
retn
sub_6DF5D0 endp

align 10h



sub_6DF600 proc	near
push	esi
mov	esi, ecx
call	sub_662DF0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6DF614
call	sub_64B020

loc_6DF614:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_6DF620
call	sub_64B020

loc_6DF620:
mov	ecx, [esi+44h]
pop	esi
test	ecx, ecx
jz	short locret_6DF62D
jmp	sub_64B020

locret_6DF62D:
retn
sub_6DF600 endp

align 10h



sub_6DF630 proc	near
mov	eax, 14h
retn
sub_6DF630 endp

align 10h



sub_6DF640 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6E0480
sub_6DF640 endp

align 10h



sub_6DF650 proc	near
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+44h]
test	ecx, ecx
jz	short loc_6DF660
call	sub_64B3B0

loc_6DF660:
mov	ecx, [edi+40h]
test	ecx, ecx
jz	short loc_6DF66C
call	sub_64B3B0

loc_6DF66C:
mov	ecx, [edi+3Ch]
test	ecx, ecx
jz	short loc_6DF678
call	sub_64B3B0

loc_6DF678:
mov	esi, [edi+38h]
test	esi, esi
jz	short loc_6DF69B
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_6DF69B
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6DF69B:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_664A30
sub_6DF650 endp

align 10h



sub_6DF6B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
xor	eax, eax
mov	[esi+34h], eax
mov	dword ptr [esi], offset	off_143C2DC
mov	dword ptr [esi+10h], offset off_143C288
mov	[esi+38h], eax
lea	ebp, [esi+10h]
mov	[esi+3Ch], eax
mov	[esi+40h], eax
mov	[esi+44h], eax
mov	eax, [esp+10h+arg_4]
push	eax
mov	ecx, esi
call	sub_6DF380
mov	ecx, [ebx+78h]
lea	edi, [ebx+78h]
push	0Ch
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebp
call	sub_64B8D0
mov	eax, [edi]
mov	edx, [eax+298h]
push	0FFFFFFFFh
push	0
lea	ecx, [eax+3Ch]
push	ecx
push	edx
mov	ecx, ebx
call	sub_671840
mov	ecx, [esi+3Ch]
mov	ebp, eax
test	ecx, ecx
jz	short loc_6DF729
call	sub_64B3B0

loc_6DF729:
mov	[esi+3Ch], ebp
mov	eax, [edi]
mov	edx, [eax+298h]
push	0FFFFFFFFh
push	0
lea	ecx, [eax+48h]
push	ecx
push	edx
mov	ecx, ebx
call	sub_671840
mov	ecx, [esi+40h]
mov	ebp, eax
test	ecx, ecx
jz	short loc_6DF752
call	sub_64B3B0

loc_6DF752:
mov	[esi+40h], ebp
mov	edi, [edi]
mov	ecx, [edi+298h]
push	0FFFFFFFFh
push	0
lea	eax, [edi+44h]
push	eax
push	ecx
mov	ecx, ebx
call	sub_671840
mov	ecx, [esi+44h]
mov	edi, eax
test	ecx, ecx
jz	short loc_6DF77B
call	sub_64B3B0

loc_6DF77B:
mov	[esi+44h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6DF6B0 endp

align 10h



sub_6DF790 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6DF7C5 ; default
jmp	ds:off_6DF7C8[eax*4] ; switch jump

loc_6DF7A0:		; jumptable 006DF799 case 0
call	sub_6DF5D0
retn	4

loc_6DF7A8:		; jumptable 006DF799 case 1
call	sub_6DF420
retn	4

loc_6DF7B0:		; jumptable 006DF799 case 2
call	sub_6DF300
retn	4

loc_6DF7B8:		; jumptable 006DF799 case 3
call	sub_6DF600
retn	4

loc_6DF7C0:		; jumptable 006DF799 case 4
call	sub_6DF4C0

locret_6DF7C5:		; default
retn	4
sub_6DF790 endp

off_6DF7C8 dd offset loc_6DF7A0	; jump table for switch	statement
dd offset loc_6DF7A8
dd offset loc_6DF7B0
dd offset loc_6DF7B8
dd offset loc_6DF7C0
align 10h



sub_6DF7E0 proc	near

var_A5=	byte ptr -0A5h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	qword ptr -40h
var_38=	byte ptr -38h
var_28=	byte ptr -28h
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0A8h
push	ebx
push	esi
push	edi
mov	edi, [esp+0B4h+arg_4]
mov	eax, [edi]
mov	esi, [eax]
mov	ebx, ecx
mov	ecx, offset aPixelbounds ; "pixelBounds"
mov	eax, esi
lea	ecx, [ecx+0]

loc_6DF800:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6DF820
test	dl, dl
jz	short loc_6DF81C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6DF820
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6DF800

loc_6DF81C:
xor	eax, eax
jmp	short loc_6DF825

loc_6DF820:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DF825:
test	eax, eax
jnz	loc_6DF9AB
mov	eax, [ebx+24h]
mov	[esp+0B4h+var_A5], 1
test	eax, eax
jz	loc_6DF985
mov	ecx, [ebx+28h]
push	eax
call	sub_654F00
mov	esi, eax
test	esi, esi
jz	loc_6DF985
inc	dword ptr [esi+4]
mov	edx, [esi]
mov	edx, [edx+34h]
lea	eax, [esi+44h]
push	eax
lea	ecx, [esp+0B8h+var_A0]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+0B4h+var_98]
fld	[esp+0B4h+var_A0]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
fld	ds:dbl_15FCC48
fadd	st(1), st
fxch	st(1)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
call	__ftol2_sse
mov	[esp+0B4h+var_A4], eax
fild	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_94]
fld	[esp+0B4h+var_9C]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
fdiv	st, st(4)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
fadd	st, st(3)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
call	__ftol2_sse
mov	[esp+0B4h+var_A4], eax
fild	[esp+0B4h+var_A4]
fxch	st(5)
fdiv	st, st(4)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
fadd	st, st(3)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
call	__ftol2_sse
mov	[esp+0B4h+var_A4], eax
fild	[esp+0B4h+var_A4]
fxch	st(1)
fdivrp	st(4), st
fxch	st(3)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
faddp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
call	__ftol2_sse
mov	ecx, [esp+0B4h+arg_0]
mov	[esp+0B4h+var_A4], eax
fild	[esp+0B4h+var_A4]
lea	eax, [esp+0B4h+var_58]
fxch	st(2)
push	eax
fst	[esp+0B8h+var_58]
push	ecx
fxch	st(2)
fst	[esp+0BCh+var_50]
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+0BCh+var_48]
faddp	st(1), st
fstp	[esp+0BCh+var_40]
mov	ecx, [ebx+34h]
call	sub_6E39C0
mov	edx, [ebx+34h]
mov	ecx, [esp+0B4h+arg_8]
push	edx
call	sub_652E40
mov	ecx, esi
call	sub_64A400
mov	al, [esp+0B4h+var_A5]
pop	edi
pop	esi
pop	ebx
add	esp, 0A8h
retn	0Ch

loc_6DF985:
mov	esi, [esp+0B4h+arg_8]
mov	ecx, esi
mov	[esp+0B4h+var_A5], 0
call	sub_652060
mov	al, [esp+0B4h+var_A5]
pop	edi
mov	byte ptr [esi],	0
pop	esi
pop	ebx
add	esp, 0A8h
retn	0Ch

loc_6DF9AB:		; "colorTransform"
mov	ecx, offset aColortransform
mov	eax, esi

loc_6DF9B2:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6DF9D2
test	dl, dl
jz	short loc_6DF9CE
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6DF9D2
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6DF9B2

loc_6DF9CE:
xor	eax, eax
jmp	short loc_6DF9D7

loc_6DF9D2:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DF9D7:
test	eax, eax
jnz	loc_6DFA6C
mov	eax, [ebx+24h]
push	ebp
mov	[esp+0B8h+var_A5], 1
test	eax, eax
jz	short loc_6DFA45
mov	ecx, [ebx+28h]
push	eax
call	sub_654F00
mov	ebp, eax
test	ebp, ebp
jz	short loc_6DFA45
inc	dword ptr [ebp+4]
lea	esi, [ebp+24h]
mov	ecx, 8
lea	edi, [esp+0B8h+var_78]
rep movsd
mov	edi, [ebx+30h]
add	edi, 34h
mov	ecx, 8
lea	esi, [esp+0B8h+var_78]
rep movsd
mov	eax, [ebx+30h]
mov	ecx, [esp+0B8h+arg_8]
push	eax
call	sub_652E40
mov	ecx, ebp
call	sub_64A400
mov	al, [esp+0B8h+var_A5]
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 0A8h
retn	0Ch

loc_6DFA45:
mov	esi, [esp+0B8h+arg_8]
mov	ecx, esi
mov	[esp+0B8h+var_A5], 0
call	sub_652060
mov	al, [esp+0B8h+var_A5]
pop	ebp
pop	edi
mov	byte ptr [esi],	0
pop	esi
pop	ebx
add	esp, 0A8h
retn	0Ch

loc_6DFA6C:		; "matrix"
mov	ecx, offset aMatrix
mov	eax, esi

loc_6DFA73:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6DFA93
test	dl, dl
jz	short loc_6DFA8F
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6DFA93
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6DFA73

loc_6DFA8F:
xor	eax, eax
jmp	short loc_6DFA98

loc_6DFA93:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DFA98:
test	eax, eax
jnz	loc_6DFB2F
mov	eax, [ebx+24h]
mov	[esp+0B4h+var_A5], 1
test	eax, eax
jz	loc_6DF985
mov	ecx, [ebx+28h]
push	eax
call	sub_654F00
mov	esi, eax
test	esi, esi
jz	loc_6DF985
inc	dword ptr [esi+4]
fld	dword ptr [esi+44h]
mov	edx, [esp+0B4h+arg_0]
fstp	[esp+0B4h+var_90]
fld	dword ptr [esi+48h]
lea	ecx, [esp+0B4h+var_90]
fstp	[esp+0B4h+var_8C]
push	ecx
fld	dword ptr [esi+4Ch]
mov	ecx, [ebx+2Ch]
fstp	[esp+0B8h+var_88]
add	edx, 78h
fld	dword ptr [esi+50h]
push	edx
fstp	[esp+0BCh+var_84]
fld	dword ptr [esi+54h]
fstp	[esp+0BCh+var_80]
fld	dword ptr [esi+58h]
fstp	[esp+0BCh+var_7C]
call	sub_6E0C70
mov	eax, [ebx+2Ch]
mov	ecx, [esp+0B4h+arg_8]
push	eax
call	sub_652E40
mov	ecx, esi
call	sub_64A400
mov	al, [esp+0B4h+var_A5]
pop	edi
pop	esi
pop	ebx
add	esp, 0A8h
retn	0Ch

loc_6DFB2F:		; "concatenatedColorTransform"
push	offset aConcatenatedco
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	loc_6DFC01
lea	ecx, [esp+0B4h+var_78]
call	sub_68CFB0
mov	eax, [ebx+24h]
test	eax, eax
jz	short loc_6DFB8B
mov	ebx, [ebx+28h]
push	eax
mov	ecx, ebx
call	sub_654F00
mov	edi, eax
test	edi, edi
jz	short loc_6DFB8B
inc	dword ptr [edi+4]
mov	esi, edi
lea	esp, [esp+0]

loc_6DFB70:
lea	ecx, [esi+24h]
push	ecx
lea	ecx, [esp+0B8h+var_78]
call	sub_68CE70
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_6DFB70
mov	ecx, edi
call	sub_64A400

loc_6DFB8B:
mov	esi, [esp+0B4h+arg_0]
mov	edx, [esi+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	54h
call	edx
test	eax, eax
jz	short loc_6DFBB6
push	esi
mov	ecx, eax
call	sub_6E6E40
mov	ebx, eax
jmp	short loc_6DFBB8

loc_6DFBB6:
xor	ebx, ebx

loc_6DFBB8:
lea	edi, [ebx+34h]
mov	ecx, 8
lea	esi, [esp+0B4h+var_78]
rep movsd
push	ebx
lea	ecx, [esp+0B8h+var_28]
call	sub_652700
mov	ecx, [esp+0B4h+arg_8]
push	eax
call	sub_652520
lea	ecx, [esp+0B4h+var_28]
call	sub_652830
mov	ecx, ebx
call	sub_64B3B0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0A8h
retn	0Ch

loc_6DFC01:		; "concatenatedMatrix"
push	offset aConcatenatedma
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	loc_6DFCDA
lea	ecx, [esp+0B4h+var_18]
call	sub_64E8E0
mov	eax, [ebx+24h]
test	eax, eax
jz	short loc_6DFC5E
mov	ebx, [ebx+28h]
push	eax
mov	ecx, ebx
call	sub_654F00
mov	edi, eax
test	edi, edi
jz	short loc_6DFC5E
inc	dword ptr [edi+4]
mov	esi, edi
mov	edi, edi

loc_6DFC40:
lea	eax, [esi+44h]
push	eax
lea	ecx, [esp+0B8h+var_18]
call	sub_64EAF0
mov	esi, [esi+20h]
test	esi, esi
jnz	short loc_6DFC40
mov	ecx, edi
call	sub_64A400

loc_6DFC5E:
mov	esi, [esp+0B4h+arg_0]
mov	ecx, [esi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
lea	edi, [esi+78h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6DFC8C
push	esi
mov	ecx, eax
call	sub_6E18B0
mov	esi, eax
jmp	short loc_6DFC8E

loc_6DFC8C:
xor	esi, esi

loc_6DFC8E:
lea	ecx, [esp+0B4h+var_18]
push	ecx
push	edi
mov	ecx, esi
call	sub_6E0C70
push	esi
lea	ecx, [esp+0B8h+var_38]
call	sub_652700
mov	ecx, [esp+0B4h+arg_8]
push	eax
call	sub_652520
lea	ecx, [esp+0B4h+var_38]
call	sub_652830
test	esi, esi
jz	short loc_6DFCCC
mov	ecx, esi
call	sub_64B3B0

loc_6DFCCC:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0A8h
retn	0Ch

loc_6DFCDA:
mov	edx, [esp+0B4h+arg_8]
mov	eax, [esp+0B4h+arg_0]
push	edx
push	edi
push	eax
mov	ecx, ebx
call	sub_6E2610
pop	edi
pop	esi
pop	ebx
add	esp, 0A8h
retn	0Ch
sub_6DF7E0 endp

align 10h



sub_6DFD00 proc	near

var_70=	byte ptr -70h
var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	qword ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 70h
push	ebx
push	esi
push	edi
mov	edi, [esp+7Ch+arg_4]
mov	eax, [edi]
mov	esi, [eax]
mov	edx, offset aPixelbounds ; "pixelBounds"
mov	eax, esi

loc_6DFD18:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6DFD38
test	bl, bl
jz	short loc_6DFD34
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6DFD38
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6DFD18

loc_6DFD34:
xor	eax, eax
jmp	short loc_6DFD3D

loc_6DFD38:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DFD3D:
test	eax, eax
jz	loc_6DFDED
mov	edx, offset aColortransform ; "colorTransform"
mov	eax, esi
lea	esp, [esp+0]

loc_6DFD50:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6DFD70
test	bl, bl
jz	short loc_6DFD6C
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6DFD70
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6DFD50

loc_6DFD6C:
xor	eax, eax
jmp	short loc_6DFD75

loc_6DFD70:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DFD75:
test	eax, eax
jnz	short loc_6DFDF8
mov	eax, [ecx+24h]
test	eax, eax
jz	short loc_6DFDED
mov	ecx, [ecx+28h]
push	eax
call	sub_654F00
mov	esi, eax
test	esi, esi
jz	short loc_6DFDED
mov	ecx, [esp+7Ch+arg_0]
inc	dword ptr [esi+4]
push	ecx
mov	ecx, [esp+80h+arg_8]
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_6DFDE6
mov	edx, [edi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[edi+8], edx
mov	eax, [edi+10h]
mov	edx, [eax+8]
lea	ecx, [edi+10h]
call	edx
cmp	eax, 12h
jnz	short loc_6DFDDF
lea	eax, [edi+34h]
push	eax
mov	ecx, esi
call	sub_64A770
mov	edx, [esi]
mov	eax, [edx+20h]
push	0
mov	ecx, esi
call	eax

loc_6DFDDF:
mov	ecx, edi
call	sub_64B3B0

loc_6DFDE6:
mov	ecx, esi
call	sub_64A400

loc_6DFDED:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 70h
retn	10h

loc_6DFDF8:		; "matrix"
mov	edx, offset aMatrix
mov	eax, esi
nop

loc_6DFE00:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6DFE20
test	bl, bl
jz	short loc_6DFE1C
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6DFE20
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6DFE00

loc_6DFE1C:
xor	eax, eax
jmp	short loc_6DFE25

loc_6DFE20:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6DFE25:
test	eax, eax
jnz	loc_6DFF3D
mov	eax, [ecx+24h]
test	eax, eax
jz	short loc_6DFDED
mov	ecx, [ecx+28h]
push	eax
call	sub_654F00
mov	esi, eax
test	esi, esi
jz	short loc_6DFDED
mov	ebx, [esp+7Ch+arg_0]
mov	ecx, [esp+7Ch+arg_8]
inc	dword ptr [esi+4]
push	ebx
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	short loc_6DFDE6
mov	ecx, [edi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[edi+8], ecx
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 0Fh
jnz	loc_6DFDDF
push	ebx
lea	ecx, [esp+80h+var_70]
push	ecx
mov	ecx, edi
call	sub_6E0A10
fld	[esp+7Ch+var_68]
fld	ds:dbl_15FCE20
lea	edx, [esp+7Ch+var_70]
fmul	st(1), st
push	edx
fxch	st(1)
mov	ecx, esi
fstp	[esp+80h+var_68]
fmul	[esp+80h+var_5C]
fstp	[esp+80h+var_5C]
call	sub_64A6E0
lea	ecx, [esp+7Ch+var_58]
call	sub_64A790
lea	eax, [esp+7Ch+var_58]
push	eax
mov	ecx, esi
call	sub_655C40
lea	ecx, [esp+7Ch+var_70]
call	sub_9CA2D0
call	__ftol2_sse
lea	ecx, [esp+7Ch+var_70]
mov	[esp+7Ch+var_58], eax
call	sub_64EA90
call	__ftol2_sse
lea	ecx, [esp+7Ch+var_70]
mov	[esp+7Ch+var_54], eax
call	sub_64EAE0
fmul	ds:dbl_15FCD10
lea	ecx, [esp+7Ch+var_70]
fdiv	ds:dbl_1431730
fstp	[esp+7Ch+var_40]
call	sub_64EAA0
fmul	ds:dbl_15FCBF8
lea	ecx, [esp+7Ch+var_70]
fstp	[esp+7Ch+var_50]
call	sub_64EAC0
fmul	ds:dbl_15FCBF8
lea	ecx, [esp+7Ch+var_58]
push	ecx
mov	ecx, esi
fstp	[esp+80h+var_48]
call	sub_656500
jmp	loc_6DFDDF

loc_6DFF3D:
mov	edx, [esp+7Ch+arg_C]
mov	eax, [esp+7Ch+arg_8]
push	edx
mov	edx, [esp+80h+arg_0]
push	eax
push	edi
push	edx
call	sub_665190
pop	edi
pop	esi
pop	ebx
add	esp, 70h
retn	10h
sub_6DFD00 endp

align 10h



sub_6DFF70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jl	loc_6E003A
push	ebx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, [esi+18h]
push	eax
call	sub_66D5E0
mov	ebx, eax
test	ebx, ebx
jnz	short loc_6DFFA7
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	[esi], bl
pop	ebx
pop	esi
retn

loc_6DFFA7:
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_6DFFEB
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 14h
jnz	short loc_6DFFEB
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6DFFEB
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6DFFE7
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6E0019
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax
jmp	short loc_6E0019

loc_6DFFE7:
xor	edi, edi
jmp	short loc_6E0019

loc_6DFFEB:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	48h
call	edx
test	eax, eax
jz	short loc_6E0015
mov	ecx, [esi+18h]
push	0
push	ecx
mov	ecx, eax
call	sub_6DF6B0
jmp	short loc_6E0017

loc_6E0015:
xor	eax, eax

loc_6E0017:
mov	edi, eax

loc_6E0019:
push	ebx
mov	ecx, edi
call	sub_6DF380
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6E0038
mov	ecx, edi
pop	edi
pop	ebx
pop	esi
jmp	sub_64B3B0

loc_6E0038:
pop	edi
pop	ebx

loc_6E003A:
pop	esi
retn
sub_6DFF70 endp

align 10h



sub_6E0040 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	48h
call	eax
test	eax, eax
jz	short loc_6E006B
push	0
push	esi
mov	ecx, eax
call	sub_6DF6B0
pop	esi
retn	4

loc_6E006B:
xor	eax, eax
pop	esi
retn	4
sub_6E0040 endp

align 10h



sub_6E0080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_143C2DC
mov	dword ptr [esi+10h], offset off_143C288
mov	[esi+34h], ebx
lea	edi, [esi+10h]
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
push	eax
mov	[esi+40h], ebx
push	ebp
mov	ecx, edi
mov	[esi+44h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+48h]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_143C3F8
mov	dword ptr [edi], offset	off_143C358
mov	dword ptr [ecx], offset	off_143C3F4
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6E0080 endp

align 10h



sub_6E0110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6E0133
cmp	[esi], ecx
jmp	short loc_6E0148

loc_6E0133:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6E013E
call	sub_651580

loc_6E013E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6E0148:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6E0197
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6E0166
cmp	[esi], ecx
jmp	short loc_6E017B

loc_6E0166:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6E0171
call	sub_651580

loc_6E0171:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6E017B:
setz	al
test	al, al
jnz	short loc_6E0197
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6E0197:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+38h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6E0110 endp

align 10h



sub_6E01C0 proc	near
sub	ecx, 48h
jmp	loc_6E0710
sub_6E01C0 endp

align 10h



sub_6E01D0 proc	near
push	edi
mov	edi, ecx
call	sub_6DF300
lea	ecx, [edi+4Ch]
call	sub_67BFB0
lea	ecx, [edi+58h]
call	sub_67BFB0
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6E0232
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E0230
lea	ebx, [ebx+0]

loc_6E0200:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E022B
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6E022B
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6E022B:
inc	esi
cmp	esi, ebx
jb	short loc_6E0200

loc_6E0230:
pop	esi
pop	ebx

loc_6E0232:
pop	edi
retn
sub_6E01D0 endp

align 10h



sub_6E0240 proc	near
push	edi
mov	edi, ecx
call	sub_6DF420
lea	ecx, [edi+4Ch]
call	sub_67C000
lea	ecx, [edi+58h]
call	sub_67C000
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6E02B0
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E02AE
lea	ebx, [ebx+0]

loc_6E0270:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E02A9
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6E02A9
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6E02A9:
inc	esi
cmp	esi, ebx
jb	short loc_6E0270

loc_6E02AE:
pop	esi
pop	ebx

loc_6E02B0:
pop	edi
retn
sub_6E0240 endp

align 10h



sub_6E02C0 proc	near
push	edi
mov	edi, ecx
call	sub_6DF4C0
lea	ecx, [edi+4Ch]
call	sub_67C070
lea	ecx, [edi+58h]
call	sub_67C070
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6E033D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E033B
lea	ebx, [ebx+0]

loc_6E02F0:
mov	eax, [edi+64h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E0336
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6E0336
test	eax, 0FFFFFFFh
jbe	short loc_6E0321
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6E032D

loc_6E0321:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6E032D:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6E0336:
inc	esi
cmp	esi, ebx
jb	short loc_6E02F0

loc_6E033B:
pop	esi
pop	ebx

loc_6E033D:
pop	edi
retn
sub_6E02C0 endp

align 10h



sub_6E0340 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_6E036C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+64h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6E036C:
mov	dword ptr [edi+34h], 0
mov	esi, [edi+38h]
test	esi, esi
jz	short loc_6E0396
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_6E0396
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E0396:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_664580
sub_6E0340 endp

align 10h



sub_6E03A0 proc	near
push	esi
mov	esi, ecx
call	sub_662CF0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6E03B4
call	sub_64B3B0

loc_6E03B4:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_6E03C0
call	sub_64B3B0

loc_6E03C0:
mov	ecx, [esi+44h]
test	ecx, ecx
jz	short loc_6E03CC
call	sub_64B3B0

loc_6E03CC:
lea	ecx, [esi+4Ch]
call	sub_67C1F0
lea	ecx, [esi+58h]
call	sub_67C1F0
mov	eax, [esi+64h]
test	eax, eax
jz	short loc_6E040A
push	ebx
mov	ebx, [eax+4]
push	edi
xor	edi, edi
test	ebx, ebx
jbe	short loc_6E0408
mov	edi, edi

loc_6E03F0:
mov	eax, [esi+64h]
mov	ecx, [eax]
lea	eax, [ecx+edi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E0403
call	sub_64B3B0

loc_6E0403:
inc	edi
cmp	edi, ebx
jb	short loc_6E03F0

loc_6E0408:
pop	edi
pop	ebx

loc_6E040A:
pop	esi
retn
sub_6E03A0 endp

align 10h



sub_6E0410 proc	near
push	esi
mov	esi, ecx
call	sub_662DF0
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6E0424
call	sub_64B020

loc_6E0424:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_6E0430
call	sub_64B020

loc_6E0430:
mov	ecx, [esi+44h]
test	ecx, ecx
jz	short loc_6E043C
call	sub_64B020

loc_6E043C:
lea	ecx, [esi+4Ch]
call	sub_67C210
lea	ecx, [esi+58h]
call	sub_67C210
mov	eax, [esi+64h]
test	eax, eax
jz	short loc_6E047A
push	ebx
mov	ebx, [eax+4]
push	edi
xor	edi, edi
test	ebx, ebx
jbe	short loc_6E0478
mov	edi, edi

loc_6E0460:
mov	eax, [esi+64h]
mov	ecx, [eax]
lea	eax, [ecx+edi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E0473
call	sub_64B020

loc_6E0473:
inc	edi
cmp	edi, ebx
jb	short loc_6E0460

loc_6E0478:
pop	edi
pop	ebx

loc_6E047A:
pop	esi
retn
sub_6E0410 endp

align 10h



sub_6E0480 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6DF650
test	[esp+4+arg_0], 1
jz	short loc_6E049D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E049D:
mov	eax, esi
pop	esi
retn	4
sub_6E0480 endp

align 10h



sub_6E04B0 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	ebp, ecx
mov	ecx, [esp+20h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebp
call	sub_6E0080
lea	edx, [esp+20h+arg_8]
push	edx
push	offset unk_143C27C
push	esi
lea	ecx, [ebp+48h]
lea	edi, [ebp+10h]
push	ebp
mov	dword ptr [ebp+0], offset off_143C3F8
mov	dword ptr [edi], offset	off_143C358
mov	dword ptr [ecx], offset	off_143C3F4
mov	byte ptr [esp+30h+arg_8], 6
call	sub_663110
mov	eax, [esi]
push	0
push	6
mov	[esp+28h+var_10], 0
mov	byte ptr [esp+28h+arg_8], 2
mov	ecx, [eax+280h]
push	offset aMatrix	; "matrix"
call	sub_650E40
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	[esp+24h+arg_4], eax
mov	ebx, 1
add	[eax+8], ebx
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E0557
call	sub_650DF0

loc_6E0557:
mov	ecx, [esi]
push	0
push	12h
mov	byte ptr [esp+28h+arg_8], 6
mov	ecx, [ecx+280h]
push	offset aConcatenatedma ; "concatenatedMatrix"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebx
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E05A6
call	sub_650DF0

loc_6E05A6:
mov	edx, [esi]
push	0
push	0Eh
mov	byte ptr [esp+28h+arg_8], 2
mov	ecx, [edx+280h]
push	offset aColortransform ; "colorTransform"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebx
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
lea	edx, [esp+28h+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E05F5
call	sub_650DF0

loc_6E05F5:
mov	eax, [esi]
push	0
push	1Ah
mov	byte ptr [esp+28h+arg_8], 6
mov	ecx, [eax+280h]
push	offset aConcatenatedco ; "concatenatedColorTransform"
call	sub_650E40
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	[esp+24h+arg_4], eax
add	[eax+8], ebx
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E0644
call	sub_650DF0

loc_6E0644:
mov	ecx, [esi]
push	0
push	0Bh
mov	byte ptr [esp+28h+arg_8], 2
mov	ecx, [ecx+280h]
push	offset aPixelbounds ; "pixelBounds"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebx
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E0693
call	sub_650DF0

loc_6E0693:
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_6E04B0 endp

align 10h



sub_6E06B0 proc	near

arg_0= dword ptr  4

sub	ecx, 10h
jmp	loc_6E0710
align 10h

loc_6E06C0:
mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6E06F5 ; default
jmp	ds:off_6E06F8[eax*4] ; switch jump

loc_6E06D0:		; jumptable 006E06C9 case 0
call	sub_6E03A0
retn	4

loc_6E06D8:		; jumptable 006E06C9 case 1
call	sub_6E0240
retn	4

loc_6E06E0:		; jumptable 006E06C9 case 2
call	sub_6E01D0
retn	4

loc_6E06E8:		; jumptable 006E06C9 case 3
call	sub_6E0410
retn	4

loc_6E06F0:		; jumptable 006E06C9 case 4
call	sub_6E02C0

locret_6E06F5:		; default
retn	4
off_6E06F8 dd offset loc_6E06D0	; jump table for switch	statement
dd offset loc_6E06D8
dd offset loc_6E06E0
dd offset loc_6E06E8
dd offset loc_6E06F0
align 10h

loc_6E0710:
push	esi
mov	esi, ecx
lea	ecx, [esi+48h]
mov	dword ptr [esi], offset	off_143C3F8
mov	dword ptr [esi+10h], offset off_143C358
mov	dword ptr [ecx], offset	off_143C3F4
call	sub_665A40
mov	ecx, esi
call	sub_6DF650
test	byte ptr [esp+4+arg_0],	1
jz	short loc_6E074A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E074A:
mov	eax, esi
pop	esi
retn	4
sub_6E06B0 endp




sub_6E0750 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6E079C
push	offset sub_6DFF70
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143C3B0
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6E079E

loc_6E079C:
xor	eax, eax

loc_6E079E:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	68h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E0876
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6E04B0
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E07F4
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E07F4:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 0Ch
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E0822
call	sub_64B3B0

loc_6E0822:
mov	edx, [esi+298h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+38h]
push	ecx
mov	ecx, [esi+298h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E086D
mov	ecx, ebp
call	sub_64B3B0

loc_6E086D:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E0876:
xor	ebp, ebp
jmp	loc_6E07F4
sub_6E0750 endp

align 10h



sub_6E0880 proc	near
mov	eax, 0Fh
retn
sub_6E0880 endp

align 10h



sub_6E0890 proc	near
sub	ecx, 34h
jmp	loc_6E2120
sub_6E0890 endp

align 10h



sub_6E08A0 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
mov	esi, [esp+1Ch+arg_4]
push	edi
push	esi
lea	edi, [ecx+10h]
push	offset aA_2	; "a"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jnz	short loc_6E08E6
lea	eax, [esp+20h+var_10]
push	eax
mov	ecx, esi
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 1
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6E08E6:
lea	ebx, [esi+10h]
push	ebx
push	offset aB_1	; "b"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jnz	short loc_6E091D
lea	ecx, [esp+20h+var_10]
push	ecx
mov	ecx, ebx
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 0
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6E091D:
lea	ebx, [esi+20h]
push	ebx
push	offset aC_15	; "c"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jnz	short loc_6E0954
lea	edx, [esp+20h+var_10]
push	edx
mov	ecx, ebx
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 0
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6E0954:
lea	ebx, [esi+30h]
push	ebx
push	offset aD_18	; "d"
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jnz	short loc_6E098B
lea	eax, [esp+20h+var_10]
push	eax
mov	ecx, ebx
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 1
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6E098B:
lea	ebx, [esi+40h]
push	ebx
push	offset unk_143C574
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jnz	short loc_6E09C2
lea	ecx, [esp+20h+var_10]
push	ecx
mov	ecx, ebx
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 0
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6E09C2:
lea	ebx, [esi+50h]
push	ebx
push	offset unk_143C570
push	ebp
mov	ecx, edi
call	sub_64AEF0
test	al, al
jnz	short loc_6E09F9
lea	edx, [esp+20h+var_10]
push	edx
mov	ecx, ebx
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 0
call	sub_652520
lea	ecx, [esp+20h+var_10]
call	sub_652830

loc_6E09F9:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6E08A0 endp

align 10h



sub_6E0A10 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	ebx, ecx
push	edi
mov	ecx, esi
call	sub_64E8E0
mov	ebp, [esp+20h+arg_4]
lea	eax, [esp+20h+var_10]
push	eax
push	offset aA_2	; "a"
lea	edi, [ebp+78h]
add	ebx, 10h
push	edi
mov	ecx, ebx
mov	[esp+2Ch+var_10], 0
call	sub_64AEF0
test	al, al
jz	short loc_6E0A57
push	ebp
lea	ecx, [esp+24h+var_10]
call	sub_653400
fstp	dword ptr [esi]
jmp	short loc_6E0A5B

loc_6E0A57:
fld1
fstp	dword ptr [esi]

loc_6E0A5B:
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset aB_1	; "b"
push	edi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6E0A80
push	ebp
lea	ecx, [esp+24h+var_10]
call	sub_653400
fstp	dword ptr [esi+0Ch]
jmp	short loc_6E0A85

loc_6E0A80:
fldz
fstp	dword ptr [esi+0Ch]

loc_6E0A85:
lea	edx, [esp+20h+var_10]
push	edx
push	offset aC_15	; "c"
push	edi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6E0AAA
push	ebp
lea	ecx, [esp+24h+var_10]
call	sub_653400
fstp	dword ptr [esi+4]
jmp	short loc_6E0AAF

loc_6E0AAA:
fldz
fstp	dword ptr [esi+4]

loc_6E0AAF:
lea	eax, [esp+20h+var_10]
push	eax
push	offset aD_18	; "d"
push	edi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6E0AD4
push	ebp
lea	ecx, [esp+24h+var_10]
call	sub_653400
fstp	dword ptr [esi+10h]
jmp	short loc_6E0AD9

loc_6E0AD4:
fld1
fstp	dword ptr [esi+10h]

loc_6E0AD9:
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset unk_143C574
push	edi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6E0AFE
push	ebp
lea	ecx, [esp+24h+var_10]
call	sub_653400
fstp	dword ptr [esi+8]
jmp	short loc_6E0B03

loc_6E0AFE:
fldz
fstp	dword ptr [esi+8]

loc_6E0B03:
lea	edx, [esp+20h+var_10]
push	edx
push	offset unk_143C570
push	edi
mov	ecx, ebx
call	sub_64AEF0
test	al, al
jz	short loc_6E0B3B
push	ebp
lea	ecx, [esp+24h+var_10]
call	sub_653400
fstp	dword ptr [esi+14h]
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6E0B3B:
fldz
lea	ecx, [esp+20h+var_10]
fstp	dword ptr [esi+14h]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6E0A10 endp

align 10h



sub_6E0B60 proc	near

var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_4]
fld	dword ptr [ebp+0]
push	esi
mov	esi, [esp+1Ch+arg_0]
fstp	[esp+1Ch+var_C]
push	edi
lea	eax, [esp+20h+var_10]
push	eax
lea	edi, [ecx+10h]
push	offset aA_2	; "a"
add	esi, 78h
mov	bl, 3
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [ebp+0Ch]
lea	ecx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	ecx
push	offset aB_1	; "b"
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [ebp+4]
lea	edx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	edx
push	offset aC_15	; "c"
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [ebp+10h]
lea	eax, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	eax
push	offset aD_18	; "d"
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [ebp+8]
lea	ecx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	ecx
push	offset unk_143C574
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [ebp+14h]
lea	edx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	edx
push	offset unk_143C570
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6E0B60 endp

align 10h



sub_6E0C70 proc	near

var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
push	edi
mov	edi, [esp+20h+arg_4]
fld	dword ptr [edi]
lea	eax, [esp+20h+var_10]
push	eax
fstp	[esp+24h+var_C]
lea	esi, [ecx+10h]
push	offset aA_2	; "a"
mov	bl, 3
push	ebp
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [edi+0Ch]
lea	ecx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	ecx
push	offset aB_1	; "b"
push	ebp
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [edi+4]
lea	edx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	edx
push	offset aC_15	; "c"
push	ebp
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [edi+10h]
lea	eax, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	eax
push	offset aD_18	; "d"
push	ebp
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [edi+8]
fdiv	ds:dbl_15FCE20
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset unk_143C574
push	ebp
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
fstp	[esp+2Ch+var_C]
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	dword ptr [edi+14h]
fdiv	ds:dbl_15FCE20
lea	edx, [esp+20h+var_10]
push	edx
push	offset unk_143C570
push	ebp
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
fstp	[esp+2Ch+var_C]
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6E0C70 endp

align 10h



sub_6E0D80 proc	near

var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 8Ch
push	esi
mov	esi, [esp+90h+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E0DB3
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8Ch
retn

loc_6E0DB3:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E1090
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6E108F
push	offset sub_4E4600
push	6
push	10h
lea	eax, [esp+0A0h+var_60]
push	eax
call	sub_4078B0
mov	edx, [esi+18h]
lea	ecx, [esp+94h+var_60]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E08A0
mov	edi, [esi+18h]
push	0
push	edi
lea	eax, [esp+9Ch+var_88]
push	eax
lea	ecx, [esp+0A0h+var_60]
call	sub_6539E0
push	0
push	6
push	edi
lea	ecx, [esp+0A0h+var_78]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+94h+var_88]
call	sub_652830
mov	edi, [esi+18h]
push	0
push	edi
lea	edx, [esp+9Ch+var_88]
push	edx
lea	ecx, [esp+0A0h+var_50]
call	sub_6539E0
push	0
push	6
push	edi
lea	ecx, [esp+0A0h+var_74]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+94h+var_88]
call	sub_652830
mov	edi, [esi+18h]
push	0
push	edi
lea	edx, [esp+9Ch+var_88]
push	edx
lea	ecx, [esp+0A0h+var_40]
call	sub_6539E0
push	0
push	6
push	edi
lea	ecx, [esp+0A0h+var_70]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+94h+var_88]
call	sub_652830
mov	edi, [esi+18h]
push	0
push	edi
lea	edx, [esp+9Ch+var_88]
push	edx
lea	ecx, [esp+0A0h+var_30]
call	sub_6539E0
push	0
push	6
push	edi
lea	ecx, [esp+0A0h+var_6C]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+94h+var_88]
call	sub_652830
mov	edi, [esi+18h]
push	0
push	edi
lea	edx, [esp+9Ch+var_88]
push	edx
lea	ecx, [esp+0A0h+var_20]
call	sub_6539E0
push	0
push	6
push	edi
lea	ecx, [esp+0A0h+var_68]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+94h+var_88]
call	sub_652830
mov	edi, [esi+18h]
push	0
push	edi
lea	edx, [esp+9Ch+var_88]
push	edx
lea	ecx, [esp+0A0h+var_10]
call	sub_6539E0
push	0
push	6
push	edi
lea	ecx, [esp+0A0h+var_64]
push	ecx
mov	ecx, eax
call	sub_652F60
lea	ecx, [esp+94h+var_88]
call	sub_652830
lea	ecx, [esp+94h+var_8C]
call	sub_679E30
push	0FFFFFFFFh
push	offset aA_4	; "(a="
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
mov	edx, [esp+94h+var_78]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aB_2	; ", b="
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
mov	ecx, [esp+94h+var_74]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aC_8	; ", c="
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
mov	eax, [esp+94h+var_70]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aD_9	; ", d="
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
mov	edx, [esp+94h+var_6C]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aTx	; ", tx="
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
mov	ecx, [esp+94h+var_68]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aTy	; ", ty="
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
mov	eax, [esp+94h+var_64]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset asc_15A0580 ; ")"
lea	ecx, [esp+9Ch+var_8C]
call	sub_67A0C0
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
mov	eax, [esp+94h+var_8C]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	edi, eax
inc	dword ptr [edi+8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6E102D
mov	ecx, esi
call	sub_652060

loc_6E102D:
mov	byte ptr [esi],	5
mov	[esi+4], edi
inc	dword ptr [edi+8]
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6E1043
mov	ecx, edi
call	sub_650DF0

loc_6E1043:
mov	esi, [esp+94h+var_8C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6E1069
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E1069:
push	offset sub_4E4250
push	6
push	4
lea	ecx, [esp+0A0h+var_78]
push	ecx
call	sub_40F3E0
push	offset sub_652830
push	6
push	10h
lea	edx, [esp+0A0h+var_60]
push	edx
call	sub_40F3E0

loc_6E108F:
pop	edi

loc_6E1090:
pop	esi
add	esp, 8Ch
retn
sub_6E0D80 endp

align 10h



sub_6E10A0 proc	near

var_30=	byte ptr -30h
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 30h
push	esi
mov	esi, [esp+34h+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E10CA
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 30h
retn

loc_6E10CA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E1142
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6E1141
cmp	dword ptr [esi+1Ch], 0
jle	short loc_6E1141
mov	eax, [esi+18h]
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 0Fh
jnz	short loc_6E1140
mov	ecx, [esi+18h]
push	ecx
lea	edx, [esp+40h+var_30]
push	edx
mov	ecx, ebx
call	sub_6E0A10
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+40h+var_18]
push	ecx
mov	ecx, edi
call	sub_6E0A10
push	eax
lea	ecx, [esp+40h+var_30]
call	sub_64EBB0
mov	eax, [esi+18h]
lea	edx, [esp+3Ch+var_30]
push	edx
push	eax
mov	ecx, ebx
call	sub_6E0B60

loc_6E1140:
pop	edi

loc_6E1141:
pop	ebx

loc_6E1142:
pop	esi
add	esp, 30h
retn
sub_6E10A0 endp

align 10h



sub_6E1150 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 4Ch
push	esi
mov	esi, [esp+50h+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E117A
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 4Ch
retn

loc_6E117A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E130B
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6E130A
cmp	dword ptr [esi+1Ch], 1
jle	loc_6E130A
lea	ecx, [esp+54h+var_30]
call	sub_64E8E0
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_38]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_34]
cmp	dword ptr [esi+1Ch], 2
fldz
fst	[esp+54h+var_4C]
fst	[esp+54h+var_48]
fstp	[esp+54h+var_44]
jle	short loc_6E123C
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_4C]
cmp	dword ptr [esi+1Ch], 3
jle	short loc_6E123C
mov	eax, [esi+18h]
push	eax
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_48]
cmp	dword ptr [esi+1Ch], 4
jle	short loc_6E123C
mov	ecx, [esi+18h]
push	ecx
push	4
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_44]

loc_6E123C:
fld	[esp+54h+var_4C]
call	__CIcos
fstp	[esp+54h+var_40]
fld	[esp+54h+var_40]
fstp	[esp+54h+var_3C]
fld	[esp+54h+var_4C]
call	__CIsin
fstp	[esp+54h+var_40]
fld	[esp+54h+var_40]
lea	edx, [esp+54h+var_18]
fstp	[esp+54h+var_40]
push	edx
fld	[esp+58h+var_3C]
lea	ecx, [esp+58h+var_30]
fst	[esp+58h+var_18]
fld	[esp+58h+var_40]
fld	st
fchs
fstp	[esp+58h+var_14]
fldz
fst	[esp+58h+var_10]
fstp	[esp+58h+var_4]
fstp	[esp+58h+var_C]
fstp	[esp+58h+var_8]
call	sub_64EBB0
fld	[esp+54h+var_30]
mov	ecx, [esi+18h]
fld	[esp+54h+var_38]
lea	eax, [esp+54h+var_30]
fld	st
push	eax
fmulp	st(2), st
push	ecx
fxch	st(1)
mov	ecx, edi
fstp	[esp+5Ch+var_30]
fld	[esp+5Ch+var_2C]
fmul	st, st(1)
fstp	[esp+5Ch+var_2C]
fmul	[esp+5Ch+var_28]
fstp	[esp+5Ch+var_28]
fld	[esp+5Ch+var_24]
fld	[esp+5Ch+var_34]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+5Ch+var_24]
fld	[esp+5Ch+var_20]
fmul	st, st(1)
fstp	[esp+5Ch+var_20]
fmul	[esp+5Ch+var_1C]
fstp	[esp+5Ch+var_1C]
fld	[esp+5Ch+var_28]
fadd	[esp+5Ch+var_48]
fstp	[esp+5Ch+var_28]
fld	[esp+5Ch+var_1C]
fadd	[esp+5Ch+var_44]
fstp	[esp+5Ch+var_1C]
call	sub_6E0B60

loc_6E130A:
pop	edi

loc_6E130B:
pop	esi
add	esp, 4Ch
retn
sub_6E1150 endp




sub_6E1310 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 4Ch
push	esi
mov	esi, [esp+50h+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E133A
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 4Ch
retn

loc_6E133A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E150F
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6E150E
cmp	dword ptr [esi+1Ch], 1
jle	loc_6E150E
lea	ecx, [esp+54h+var_30]
call	sub_64E8E0
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_4C]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_48]
cmp	dword ptr [esi+1Ch], 2
fldz
fstp	[esp+54h+var_44]
fld	[esp+54h+var_4C]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+54h+var_40]
fmul	[esp+54h+var_48]
fstp	[esp+54h+var_3C]
jle	short loc_6E1426
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_44]
cmp	dword ptr [esi+1Ch], 3
jle	short loc_6E1426
mov	eax, [esi+18h]
push	eax
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_38]
cmp	dword ptr [esi+1Ch], 4
fld	[esp+54h+var_38]
fadd	[esp+54h+var_40]
fstp	[esp+54h+var_40]
jle	short loc_6E1426
mov	ecx, [esi+18h]
push	ecx
push	4
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+54h+var_38]
fld	[esp+54h+var_38]
fadd	[esp+54h+var_3C]
fstp	[esp+54h+var_3C]

loc_6E1426:
fld	[esp+54h+var_4C]
fld	ds:dbl_1436D88
fmul	st(1), st
fxch	st(1)
fstp	[esp+54h+var_4C]
fmul	[esp+54h+var_48]
fstp	[esp+54h+var_48]
fld	[esp+54h+var_44]
call	__CIcos
fstp	[esp+54h+var_38]
fld	[esp+54h+var_38]
fstp	[esp+54h+var_34]
fld	[esp+54h+var_44]
call	__CIsin
fstp	[esp+54h+var_38]
fld	[esp+54h+var_38]
lea	edx, [esp+54h+var_18]
fstp	[esp+54h+var_38]
push	edx
fld	[esp+58h+var_34]
lea	ecx, [esp+58h+var_30]
fst	[esp+58h+var_18]
fld	[esp+58h+var_38]
fld	st
fchs
fstp	[esp+58h+var_14]
fldz
fst	[esp+58h+var_10]
fstp	[esp+58h+var_4]
fstp	[esp+58h+var_C]
fstp	[esp+58h+var_8]
call	sub_64EBB0
fld	[esp+54h+var_30]
mov	ecx, [esi+18h]
fld	[esp+54h+var_4C]
lea	eax, [esp+54h+var_30]
fld	st
push	eax
fmulp	st(2), st
push	ecx
fxch	st(1)
mov	ecx, edi
fstp	[esp+5Ch+var_30]
fld	[esp+5Ch+var_2C]
fmul	st, st(1)
fstp	[esp+5Ch+var_2C]
fmul	[esp+5Ch+var_28]
fstp	[esp+5Ch+var_28]
fld	[esp+5Ch+var_24]
fld	[esp+5Ch+var_48]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+5Ch+var_24]
fld	[esp+5Ch+var_20]
fmul	st, st(1)
fstp	[esp+5Ch+var_20]
fmul	[esp+5Ch+var_1C]
fstp	[esp+5Ch+var_1C]
fld	[esp+5Ch+var_28]
fadd	[esp+5Ch+var_40]
fstp	[esp+5Ch+var_28]
fld	[esp+5Ch+var_1C]
fadd	[esp+5Ch+var_3C]
fstp	[esp+5Ch+var_1C]
call	sub_6E0B60

loc_6E150E:
pop	edi

loc_6E150F:
pop	esi
add	esp, 4Ch
retn
sub_6E1310 endp

align 10h



sub_6E1520 proc	near

var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 18h
push	edi
mov	edi, [esp+1Ch+arg_0]
push	0Fh
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6E154A
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 18h
retn

loc_6E154A:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6E1573
push	esi
lea	esi, [eax-10h]
test	esi, esi
jz	short loc_6E1572
lea	ecx, [esp+20h+var_18]
call	sub_64E8E0
mov	ecx, [edi+18h]
lea	eax, [esp+20h+var_18]
push	eax
push	ecx
mov	ecx, esi
call	sub_6E0B60

loc_6E1572:
pop	esi

loc_6E1573:
pop	edi
add	esp, 18h
retn
sub_6E1520 endp

align 10h



sub_6E1580 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 30h
push	ebx
mov	ebx, [esp+34h+arg_0]
push	0Fh
mov	ecx, ebx
call	sub_651C40
test	al, al
jnz	short loc_6E15AA
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, ebx
call	sub_651C60
pop	ebx
add	esp, 30h
retn

loc_6E15AA:
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_6E160F
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6E160E
mov	eax, [ebx+18h]
push	esi
push	eax
lea	ecx, [esp+40h+var_18]
push	ecx
mov	ecx, edi
call	sub_6E0A10
mov	esi, eax
fld	dword ptr [esi]
lea	edx, [esp+3Ch+var_30]
fstp	[esp+3Ch+var_30]
push	edx
fld	dword ptr [esi+4]
mov	ecx, esi
fstp	[esp+40h+var_2C]
fld	dword ptr [esi+8]
fstp	[esp+40h+var_28]
fld	dword ptr [esi+0Ch]
fstp	[esp+40h+var_24]
fld	dword ptr [esi+10h]
fstp	[esp+40h+var_20]
fld	dword ptr [esi+14h]
fstp	[esp+40h+var_1C]
call	sub_64E9E0
mov	eax, [ebx+18h]
push	esi
push	eax
mov	ecx, edi
call	sub_6E0B60
pop	esi

loc_6E160E:
pop	edi

loc_6E160F:
pop	ebx
add	esp, 30h
retn
sub_6E1580 endp

align 10h



sub_6E1620 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 3Ch
push	esi
mov	esi, [esp+40h+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E164A
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 3Ch
retn

loc_6E164A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E1702
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6E1701
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E1701
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+44h+var_3C]
mov	ecx, [esi+18h]
push	ecx
lea	edx, [esp+48h+var_18]
push	edx
mov	ecx, edi
call	sub_6E0A10
fld	[esp+44h+var_3C]
call	__CIcos
fstp	[esp+44h+var_38]
fld	[esp+44h+var_38]
fstp	[esp+44h+var_34]
fld	[esp+44h+var_3C]
call	__CIsin
fstp	[esp+44h+var_38]
fld	[esp+44h+var_38]
lea	eax, [esp+44h+var_30]
fstp	[esp+44h+var_38]
push	eax
fld	[esp+48h+var_34]
lea	ecx, [esp+48h+var_18]
fst	[esp+48h+var_30]
fld	[esp+48h+var_38]
fld	st
fchs
fstp	[esp+48h+var_2C]
fldz
fst	[esp+48h+var_28]
fstp	[esp+48h+var_1C]
fstp	[esp+48h+var_24]
fstp	[esp+48h+var_20]
call	sub_64EBB0
mov	edx, [esi+18h]
lea	ecx, [esp+44h+var_18]
push	ecx
push	edx
mov	ecx, edi
call	sub_6E0B60

loc_6E1701:
pop	edi

loc_6E1702:
pop	esi
add	esp, 3Ch
retn
sub_6E1620 endp

align 10h



sub_6E1710 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
push	esi
mov	esi, [esp+24h+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E173A
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 20h
retn

loc_6E173A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E17F4
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6E17F3
cmp	dword ptr [esi+1Ch], 1
jle	loc_6E17F3
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+28h+var_20]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+28h+var_1C]
mov	edx, [esi+18h]
push	edx
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_6E0A10
fld	[esp+28h+var_18]
fld	[esp+28h+var_20]
mov	edx, [esi+18h]
fld	st
lea	ecx, [esp+28h+var_18]
fmulp	st(2), st
push	ecx
fxch	st(1)
push	edx
mov	ecx, edi
fstp	[esp+30h+var_18]
fld	[esp+30h+var_14]
fmul	st, st(1)
fstp	[esp+30h+var_14]
fmul	[esp+30h+var_10]
fstp	[esp+30h+var_10]
fld	[esp+30h+var_C]
fld	[esp+30h+var_1C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+30h+var_C]
fld	[esp+30h+var_8]
fmul	st, st(1)
fstp	[esp+30h+var_8]
fmul	[esp+30h+var_4]
fstp	[esp+30h+var_4]
call	sub_6E0B60

loc_6E17F3:
pop	edi

loc_6E17F4:
pop	esi
add	esp, 20h
retn
sub_6E1710 endp

align 10h



sub_6E1800 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
push	esi
mov	esi, [esp+24h+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E182A
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 20h
retn

loc_6E182A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E18A8
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6E18A7
cmp	dword ptr [esi+1Ch], 1
jle	short loc_6E18A7
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+28h+var_20]
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+28h+var_1C]
mov	edx, [esi+18h]
push	edx
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, edi
call	sub_6E0A10
fld	[esp+28h+var_10]
fadd	[esp+28h+var_20]
mov	edx, [esi+18h]
lea	ecx, [esp+28h+var_18]
push	ecx
fstp	[esp+2Ch+var_10]
push	edx
fld	[esp+30h+var_4]
mov	ecx, edi
fadd	[esp+30h+var_1C]
fstp	[esp+30h+var_4]
call	sub_6E0B60

loc_6E18A7:
pop	edi

loc_6E18A8:
pop	esi
add	esp, 20h
retn
sub_6E1800 endp

align 10h



sub_6E18B0 proc	near

var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+28h+arg_0]
push	edi
mov	esi, ecx
call	sub_663BE0
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [ebx], offset	off_143C5A8
mov	ecx, [edi+78h]
lea	ebp, [edi+78h]
push	0Dh
call	sub_66FB00
push	eax
push	ebp
mov	ecx, ebx
call	sub_64B8D0
lea	ecx, [esp+28h+var_18]
call	sub_64E8E0
lea	eax, [esp+28h+var_18]
push	eax
push	edi
mov	ecx, esi
call	sub_6E0B60
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	4
sub_6E18B0 endp

align 10h



sub_6E1910 proc	near

var_18=	byte ptr -18h
arg_0= dword ptr  4

sub	esp, 18h
push	esi
mov	esi, [esp+1Ch+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E193A
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 18h
retn

loc_6E193A:
mov	eax, [esi+8]
push	ebx
test	eax, eax
jz	short loc_6E1949
lea	ebx, [eax-10h]
test	ebx, ebx
jnz	short loc_6E195C

loc_6E1949:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	ebx
mov	byte ptr [esi],	0
pop	esi
add	esp, 18h
retn

loc_6E195C:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E1987
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E18B0
mov	edi, eax
jmp	short loc_6E1989

loc_6E1987:
xor	edi, edi

loc_6E1989:
mov	edx, [esi+18h]
push	edx
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, ebx
call	sub_6E0A10
mov	ecx, [esi+18h]
push	eax
push	ecx
mov	ecx, edi
call	sub_6E0B60
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6E19BF
mov	ecx, edi
pop	edi
pop	ebx
pop	esi
add	esp, 18h
jmp	sub_64B3B0

loc_6E19BF:
pop	edi
pop	ebx
pop	esi
add	esp, 18h
retn
sub_6E1910 endp

align 10h



sub_6E19D0 proc	near

var_8C=	qword ptr -8Ch
var_84=	qword ptr -84h
var_7C=	qword ptr -7Ch
var_74=	qword ptr -74h
var_6C=	qword ptr -6Ch
var_64=	qword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 88h
push	esi
mov	esi, [esp+8Ch+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E1A03
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 88h
retn

loc_6E1A03:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E1C6F
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	loc_6E1C6E
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E1C6E
mov	eax, [esi+18h]
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E1C6D
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 10h
jnz	loc_6E1C6D
mov	ecx, [esi+18h]
push	ecx
lea	edx, [esp+98h+var_58]
push	edx
mov	ecx, ebx
call	sub_6E0A10
push	offset sub_4E4600
push	2
push	10h
lea	eax, [esp+0A0h+var_20]
push	eax
call	sub_4078B0
mov	edx, [esi+18h]
lea	ecx, [esp+94h+var_20]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E22E0
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E1ABA
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	edi, eax
jmp	short loc_6E1ABC

loc_6E1ABA:
xor	edi, edi

loc_6E1ABC:
push	offset sub_4E4600
push	2
push	10h
lea	edx, [esp+0A0h+var_40]
push	edx
call	sub_4078B0
fld	[esp+94h+var_58]
mov	ecx, [esi+18h]
fstp	[esp+94h+var_74]
lea	eax, [esp+94h+var_20]
push	eax
push	ecx
mov	bl, 3
lea	ecx, [esp+9Ch+var_7C+4]
mov	byte ptr [esp+9Ch+var_7C+4], bl
call	sub_6675B0
fld	[esp+94h+var_54]
mov	eax, [esi+18h]
fstp	[esp+94h+var_64]
lea	edx, [esp+94h+var_10]
push	edx
push	eax
lea	ecx, [esp+9Ch+var_6C+4]
mov	byte ptr [esp+9Ch+var_6C+4], bl
call	sub_6675B0
fld	[esp+94h+var_50]
lea	ecx, [esp+94h+var_8C+4]
fstp	[esp+94h+var_84]
push	ecx
lea	ecx, [esp+98h+var_40]
mov	byte ptr [esp+98h+var_8C+4], bl
call	sub_652520
lea	ecx, [esp+94h+var_8C+4]
call	sub_652830
mov	eax, [esi+18h]
lea	edx, [esp+94h+var_7C+4]
push	edx
push	eax
lea	ecx, [esp+9Ch+var_40]
call	sub_653DD0
mov	edx, [esi+18h]
lea	ecx, [esp+94h+var_6C+4]
push	ecx
push	edx
lea	ecx, [esp+9Ch+var_40]
call	sub_653DD0
fld	[esp+94h+var_4C]
lea	eax, [esp+94h+var_8C+4]
fstp	[esp+94h+var_84]
push	eax
lea	ecx, [esp+98h+var_7C+4]
mov	byte ptr [esp+98h+var_8C+4], bl
call	sub_652520
lea	ecx, [esp+94h+var_8C+4]
call	sub_652830
mov	edx, [esi+18h]
lea	ecx, [esp+94h+var_20]
push	ecx
push	edx
lea	ecx, [esp+9Ch+var_7C+4]
call	sub_6675B0
fld	[esp+94h+var_48]
lea	eax, [esp+94h+var_8C+4]
fstp	[esp+94h+var_84]
push	eax
lea	ecx, [esp+98h+var_6C+4]
mov	byte ptr [esp+98h+var_8C+4], bl
call	sub_652520
lea	ecx, [esp+94h+var_8C+4]
call	sub_652830
mov	edx, [esi+18h]
lea	ecx, [esp+94h+var_10]
push	ecx
push	edx
lea	ecx, [esp+9Ch+var_6C+4]
call	sub_6675B0
fld	[esp+94h+var_44]
lea	eax, [esp+94h+var_8C+4]
fstp	[esp+94h+var_84]
mov	byte ptr [esp+94h+var_8C+4], bl
push	eax
lea	ecx, [esp+98h+var_30]
call	sub_652520
lea	ecx, [esp+94h+var_8C+4]
call	sub_652830
mov	edx, [esi+18h]
lea	ecx, [esp+94h+var_7C+4]
push	ecx
push	edx
lea	ecx, [esp+9Ch+var_30]
call	sub_653DD0
mov	ecx, [esi+18h]
lea	eax, [esp+94h+var_6C+4]
push	eax
push	ecx
lea	ecx, [esp+9Ch+var_30]
call	sub_653DD0
mov	eax, [esi+18h]
lea	edx, [esp+94h+var_40]
push	edx
add	eax, 78h
push	eax
mov	ecx, edi
call	sub_6E2320
mov	ecx, [esi+4]
push	edi
call	sub_652E40
lea	ecx, [esp+94h+var_6C+4]
call	sub_652830
lea	ecx, [esp+94h+var_7C+4]
call	sub_652830
push	offset sub_652830
push	2
push	10h
lea	ecx, [esp+0A0h+var_40]
push	ecx
call	sub_40F3E0
test	edi, edi
jz	short loc_6E1C57
mov	ecx, edi
call	sub_64B3B0

loc_6E1C57:
push	offset sub_652830
push	2
push	10h
lea	edx, [esp+0A0h+var_20]
push	edx
call	sub_40F3E0

loc_6E1C6D:
pop	edi

loc_6E1C6E:
pop	ebx

loc_6E1C6F:
pop	esi
add	esp, 88h
retn
sub_6E19D0 endp

align 10h



sub_6E1C80 proc	near

var_7C=	qword ptr -7Ch
var_74=	qword ptr -74h
var_6C=	qword ptr -6Ch
var_64=	qword ptr -64h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 78h
push	esi
mov	esi, [esp+7Ch+arg_0]
push	0Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E1CAD
push	0
push	0
push	offset aMatrix_0 ; "Matrix"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 78h
retn

loc_6E1CAD:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E1EB1
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	loc_6E1EB0
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E1EB0
mov	eax, [esi+18h]
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E1EAF
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 10h
jnz	loc_6E1EAF
mov	ecx, [esi+18h]
push	ecx
lea	edx, [esp+88h+var_58]
push	edx
mov	ecx, ebx
call	sub_6E0A10
push	offset sub_4E4600
push	2
push	10h
lea	eax, [esp+90h+var_20]
push	eax
call	sub_4078B0
mov	edx, [esi+18h]
lea	ecx, [esp+84h+var_20]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E22E0
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E1D61
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	edi, eax
jmp	short loc_6E1D63

loc_6E1D61:
xor	edi, edi

loc_6E1D63:
push	offset sub_4E4600
push	2
push	10h
lea	edx, [esp+90h+var_40]
push	edx
call	sub_4078B0
fld	[esp+84h+var_58]
mov	ecx, [esi+18h]
fstp	[esp+84h+var_74]
lea	eax, [esp+84h+var_20]
push	eax
push	ecx
mov	bl, 3
lea	ecx, [esp+8Ch+var_7C+4]
mov	byte ptr [esp+8Ch+var_7C+4], bl
call	sub_6675B0
fld	[esp+84h+var_54]
lea	edx, [esp+84h+var_6C+4]
fstp	[esp+84h+var_64]
push	edx
lea	ecx, [esp+88h+var_40]
mov	byte ptr [esp+88h+var_6C+4], bl
call	sub_652520
lea	ecx, [esp+84h+var_6C+4]
call	sub_652830
mov	ecx, [esi+18h]
lea	eax, [esp+84h+var_10]
push	eax
push	ecx
lea	ecx, [esp+8Ch+var_40]
call	sub_6675B0
mov	eax, [esi+18h]
lea	edx, [esp+84h+var_7C+4]
push	edx
push	eax
lea	ecx, [esp+8Ch+var_40]
call	sub_653DD0
fld	[esp+84h+var_4C]
lea	ecx, [esp+84h+var_6C+4]
fstp	[esp+84h+var_64]
push	ecx
lea	ecx, [esp+88h+var_7C+4]
mov	byte ptr [esp+88h+var_6C+4], bl
call	sub_652520
lea	ecx, [esp+84h+var_6C+4]
call	sub_652830
mov	eax, [esi+18h]
lea	edx, [esp+84h+var_20]
push	edx
push	eax
lea	ecx, [esp+8Ch+var_7C+4]
call	sub_6675B0
fld	[esp+84h+var_48]
lea	ecx, [esp+84h+var_6C+4]
fstp	[esp+84h+var_64]
push	ecx
lea	ecx, [esp+88h+var_30]
mov	byte ptr [esp+88h+var_6C+4], bl
call	sub_652520
lea	ecx, [esp+84h+var_6C+4]
call	sub_652830
mov	eax, [esi+18h]
lea	edx, [esp+84h+var_10]
push	edx
push	eax
lea	ecx, [esp+8Ch+var_30]
call	sub_6675B0
mov	edx, [esi+18h]
lea	ecx, [esp+84h+var_7C+4]
push	ecx
push	edx
lea	ecx, [esp+8Ch+var_30]
call	sub_653DD0
mov	ecx, [esi+18h]
lea	eax, [esp+84h+var_40]
add	ecx, 78h
push	eax
push	ecx
mov	ecx, edi
call	sub_6E2320
push	edi
mov	ecx, [esi+4]
call	sub_652E40
lea	ecx, [esp+84h+var_7C+4]
call	sub_652830
push	offset sub_652830
push	2
push	10h
lea	edx, [esp+90h+var_40]
push	edx
call	sub_40F3E0
test	edi, edi
jz	short loc_6E1E9C
mov	ecx, edi
call	sub_64B3B0

loc_6E1E9C:
push	offset sub_652830
push	2
push	10h
lea	eax, [esp+90h+var_20]
push	eax
call	sub_40F3E0

loc_6E1EAF:
pop	edi

loc_6E1EB0:
pop	ebx

loc_6E1EB1:
pop	esi
add	esp, 78h
retn
sub_6E1C80 endp

align 10h



sub_6E1EC0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E1EE9
push	esi
mov	ecx, eax
call	sub_6E18B0
pop	esi
retn	4

loc_6E1EE9:
xor	eax, eax
pop	esi
retn	4
sub_6E1EC0 endp

align 10h



sub_6E1EF0 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	esi, [esp+8+arg_0]
cmp	dword ptr [esi+8], 0
jz	short loc_6E1F36
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 0Fh
jnz	short loc_6E1F36
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6E1F36
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E1F5E
add	eax, 0FFFFFFF0h
test	eax, eax
jz	short loc_6E1F60
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx
jmp	short loc_6E1F60

loc_6E1F36:
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E1F5E
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E18B0
jmp	short loc_6E1F60

loc_6E1F5E:
xor	eax, eax

loc_6E1F60:
mov	ecx, [esi+4]
mov	ebp, eax
push	ebp
call	sub_652E40
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E202E
push	ebx
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
add	edi, 78h
lea	ebx, [ebp+10h]
call	sub_651EC0
push	eax
push	offset aA_2	; "a"
push	edi
mov	ecx, ebx
call	sub_669260
cmp	dword ptr [esi+1Ch], 1
jle	loc_6E202C
push	1
mov	ecx, esi
call	sub_651EC0
push	eax
push	offset aB_1	; "b"
push	edi
mov	ecx, ebx
call	sub_669260
cmp	dword ptr [esi+1Ch], 2
jle	short loc_6E202C
push	2
mov	ecx, esi
call	sub_651EC0
push	eax
push	offset aC_15	; "c"
push	edi
mov	ecx, ebx
call	sub_669260
cmp	dword ptr [esi+1Ch], 3
jle	short loc_6E202C
push	3
mov	ecx, esi
call	sub_651EC0
push	eax
push	offset aD_18	; "d"
push	edi
mov	ecx, ebx
call	sub_669260
cmp	dword ptr [esi+1Ch], 4
jle	short loc_6E202C
push	4
mov	ecx, esi
call	sub_651EC0
push	eax
push	offset unk_143C574
push	edi
mov	ecx, ebx
call	sub_669260
cmp	dword ptr [esi+1Ch], 5
jle	short loc_6E202C
push	5
mov	ecx, esi
call	sub_651EC0
push	eax
push	offset unk_143C570
push	edi
mov	ecx, ebx
call	sub_669260

loc_6E202C:
pop	edi
pop	ebx

loc_6E202E:
pop	esi
test	ebp, ebp
jz	short loc_6E203B
mov	ecx, ebp
pop	ebp
jmp	sub_64B3B0

loc_6E203B:
pop	ebp
retn
sub_6E1EF0 endp

align 10h



sub_6E2040 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143C5A8
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143C54C
mov	dword ptr [edi], offset	off_143C4F8
mov	dword ptr [ecx], offset	off_143C644
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6E2040 endp

align 10h



sub_6E20C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6E2040
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143C488
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143C54C
mov	dword ptr [esi+10h], offset off_143C4F8
mov	dword ptr [ecx], offset	off_143C644
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6E20C0 endp

align 10h



sub_6E2110 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6E2120
align 10h

loc_6E2120:
push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143C54C
mov	dword ptr [esi+10h], offset off_143C4F8
mov	dword ptr [ecx], offset	off_143C644
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6E215A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E215A:
mov	eax, esi
pop	esi
retn	4
sub_6E2110 endp




sub_6E2160 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6E21AC
push	offset sub_6E1EF0
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143C600
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6E21AE

loc_6E21AC:
xor	eax, eax

loc_6E21AE:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	54h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E2286
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6E20C0
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E2204
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E2204:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 0Dh
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E2232
call	sub_64B3B0

loc_6E2232:
mov	edx, [esi+298h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+3Ch]
push	ecx
mov	ecx, [esi+298h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E227D
mov	ecx, ebp
call	sub_64B3B0

loc_6E227D:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E2286:
xor	ebp, ebp
jmp	loc_6E2204
sub_6E2160 endp

align 10h



sub_6E2290 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+78h]
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	eax, [edi+10h]
mov	edx, [eax+2Ch]
add	esi, 78h
push	ebx
add	ecx, 210h
add	edi, 10h
push	ecx
push	esi
mov	ecx, edi
call	edx
mov	ecx, [esi]
mov	eax, [edi]
mov	edx, [eax+2Ch]
add	ebx, 10h
push	ebx
add	ecx, 214h
push	ecx
push	esi
mov	ecx, edi
call	edx
pop	edi
pop	esi
pop	ebx
retn
sub_6E2290 endp

align 10h



sub_6E22E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+10h]
mov	edx, [eax+2Ch]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	esi, [ecx+10h]
mov	ecx, [edi]
push	ebx
add	ecx, 210h
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	ecx, [edi]
mov	eax, [esi]
mov	edx, [eax+2Ch]
add	ebx, 10h
push	ebx
add	ecx, 214h
push	ecx
push	edi
mov	ecx, esi
call	edx
pop	edi
pop	esi
pop	ebx
retn	8
sub_6E22E0 endp




sub_6E2320 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	edx, [edi]
lea	esi, [ecx+10h]
lea	ecx, [esp+10h+var_1]
push	ecx
push	ebp
add	edx, 210h
push	edx
push	edi
mov	ecx, esi
mov	[esp+20h+var_1], 0
call	eax
mov	ecx, [edi]
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+10h+arg_4]
push	eax
add	ebp, 10h
push	ebp
add	ecx, 214h
push	ecx
push	edi
mov	ecx, esi
mov	byte ptr [esp+20h+arg_4], 0
call	edx
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8
sub_6E2320 endp

align 10h



sub_6E2380 proc	near

var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [ecx+10h]
push	ebp
mov	ebp, [esp+14h+arg_4]
fld	qword ptr [ebp+0]
push	esi
mov	esi, [esp+18h+arg_0]
fstp	[esp+18h+var_C]
push	edi
lea	edi, [ecx+10h]
lea	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, [esi+78h]
add	esi, 78h
lea	edx, [esp+20h+var_10]
push	edx
mov	edx, [eax+28h]
add	ecx, 210h
push	ecx
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], 3
mov	byte ptr [esp+2Ch+arg_0], 0
call	edx
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
fld	qword ptr [ebp+8]
mov	eax, [edi]
fstp	[esp+1Ch+var_C]
lea	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, [esi]
lea	edx, [esp+20h+var_10]
push	edx
mov	edx, [eax+28h]
add	ecx, 214h
push	ecx
push	esi
mov	ecx, edi
mov	[esp+2Ch+var_10], 3
mov	byte ptr [esp+2Ch+arg_0], 0
call	edx
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
add	esp, 10h
retn	8
sub_6E2380 endp

align 10h



sub_6E2410 proc	near

var_78=	qword ptr -78h
var_70=	byte ptr -70h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_4C=	qword ptr -4Ch
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 78h
push	esi
push	edi
call	sub_6794F0
fstp	[esp+80h+var_78]
mov	esi, [esp+80h+arg_0]
mov	edi, [esi+4]
cmp	byte ptr [edi],	5
jb	short loc_6E2434
mov	ecx, edi
call	sub_652060

loc_6E2434:
fld	[esp+80h+var_78]
mov	byte ptr [edi],	3
fstp	qword ptr [edi+4]
cmp	dword ptr [esi+1Ch], 1
jle	loc_6E25F7
mov	eax, [esi+18h]
push	ebx
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
mov	edi, eax
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	edi, edi
jz	loc_6E25F6
test	ebx, ebx
jz	loc_6E25F6
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 10h
jz	short loc_6E24B9
mov	edx, [ebx+10h]
mov	eax, [edx+8]
lea	ecx, [ebx+10h]
call	eax
cmp	eax, 10h
jz	short loc_6E24B9
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	ebx
pop	edi
mov	byte ptr [esi],	0
pop	esi
add	esp, 78h
retn

loc_6E24B9:
push	offset sub_4E4600
push	2
push	10h
lea	ecx, [esp+90h+var_20]
push	ecx
call	sub_4078B0
push	offset sub_4E4600
push	2
push	10h
lea	edx, [esp+90h+var_40]
push	edx
call	sub_4078B0
mov	ecx, [esi+18h]
lea	eax, [esp+84h+var_20]
push	eax
push	edi
push	ecx
call	sub_6E2290
mov	eax, [esi+18h]
lea	edx, [esp+90h+var_40]
push	edx
push	ebx
push	eax
call	sub_6E2290
add	esp, 18h
lea	ecx, [esp+84h+var_40]
push	ecx
lea	ecx, [esp+88h+var_70]
call	sub_652330
mov	eax, [esi+18h]
lea	edx, [esp+84h+var_20]
push	edx
push	eax
lea	ecx, [esp+8Ch+var_70]
call	sub_667560
mov	edx, [esi+18h]
lea	ecx, [esp+84h+var_70]
push	ecx
push	edx
call	sub_6675B0
lea	eax, [esp+84h+var_30]
push	eax
lea	ecx, [esp+88h+var_60]
call	sub_652330
mov	edx, [esi+18h]
lea	ecx, [esp+84h+var_10]
push	ecx
push	edx
lea	ecx, [esp+8Ch+var_60]
call	sub_667560
mov	ecx, [esi+18h]
lea	eax, [esp+84h+var_60]
push	eax
push	ecx
mov	ecx, eax
call	sub_6675B0
mov	eax, [esi+18h]
lea	edx, [esp+84h+var_60]
push	edx
push	eax
lea	ecx, [esp+8Ch+var_70]
call	sub_653DD0
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+88h+var_70]
call	sub_653400
call	__CIsqrt
fstp	[esp+84h+var_4C]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+88h+var_50]
mov	[esp+88h+var_50], 3
call	sub_653400
fstp	[esp+84h+var_78]
lea	ecx, [esp+84h+var_50]
call	sub_652830
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6E25B4
mov	ecx, esi
call	sub_652060

loc_6E25B4:
fld	[esp+84h+var_78]
lea	ecx, [esp+84h+var_60]
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
call	sub_652830
lea	ecx, [esp+84h+var_70]
call	sub_652830
push	offset sub_652830
push	2
push	10h
lea	eax, [esp+90h+var_40]
push	eax
call	sub_40F3E0
push	offset sub_652830
push	2
push	10h
lea	ecx, [esp+90h+var_20]
push	ecx
call	sub_40F3E0

loc_6E25F6:
pop	ebx

loc_6E25F7:
pop	edi
pop	esi
add	esp, 78h
retn
sub_6E2410 endp

align 10h



sub_6E2600 proc	near
mov	eax, 10h
retn
sub_6E2600 endp

align 10h



sub_6E2610 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
add	edx, 78h
mov	[esp+arg_0], edx
mov	eax, [eax+2Ch]
jmp	eax
sub_6E2610 endp

align 10h



sub_6E2630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6E2653
cmp	[esi], ecx
jmp	short loc_6E2668

loc_6E2653:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6E265E
call	sub_651580

loc_6E265E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6E2668:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6E26B7
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6E2686
cmp	[esi], ecx
jmp	short loc_6E269B

loc_6E2686:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6E2691
call	sub_651580

loc_6E2691:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6E269B:
setz	al
test	al, al
jnz	short loc_6E26B7
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6E26B7:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+24h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6E2630 endp

align 10h



sub_6E26E0 proc	near

var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 28h
push	ebx
mov	ebx, [esp+2Ch+arg_0]
mov	edx, [ebx+78h]
push	esi
push	edi
mov	edi, [esp+34h+arg_4]
lea	esi, [ebx+78h]
xor	al, al
lea	ecx, [esp+34h+var_20]
push	ecx
mov	[esp+38h+var_20], al
mov	[esp+38h+var_10], al
mov	eax, [edi+10h]
mov	eax, [eax+2Ch]
add	edi, 10h
add	edx, 210h
push	edx
push	esi
mov	ecx, edi
call	eax
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+2Ch]
lea	eax, [esp+34h+var_10]
push	eax
add	ecx, 214h
push	ecx
push	esi
mov	ecx, edi
call	edx
push	ebx
lea	ecx, [esp+38h+var_20]
call	sub_653400
fstp	[esp+34h+var_28]
push	ebx
lea	ecx, [esp+38h+var_10]
call	sub_653400
fld	[esp+34h+var_28]
mov	eax, [esp+34h+arg_8]
fstp	qword ptr [eax]
lea	esi, [esp+34h]
mov	edi, 1
fstp	qword ptr [eax+8]
mov	edi, edi

loc_6E2760:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E2760
pop	edi
pop	esi
pop	ebx
add	esp, 28h
retn
sub_6E26E0 endp

align 10h



sub_6E2780 proc	near

var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
push	ebx
mov	ebx, [esp+2Ch+arg_0]
mov	edx, [ebx+78h]
push	esi
push	edi
lea	edi, [ecx+10h]
lea	esi, [ebx+78h]
xor	al, al
lea	ecx, [esp+34h+var_20]
push	ecx
mov	[esp+38h+var_20], al
mov	byte ptr [esp+38h+var_10], al
mov	eax, [edi]
mov	eax, [eax+2Ch]
add	edx, 210h
push	edx
push	esi
mov	ecx, edi
call	eax
mov	ecx, [esi]
mov	edx, [edi]
mov	edx, [edx+2Ch]
lea	eax, [esp+34h+var_10]
push	eax
add	ecx, 214h
push	ecx
push	esi
mov	ecx, edi
call	edx
push	ebx
lea	ecx, [esp+38h+var_20]
call	sub_653400
fstp	[esp+34h+var_28]
push	ebx
lea	ecx, [esp+38h+var_10]
call	sub_653400
fld	[esp+34h+var_28]
mov	eax, [esp+34h+arg_4]
fstp	qword ptr [eax]
lea	esi, [esp+34h]
mov	edi, 1
fstp	qword ptr [eax+8]
lea	esp, [esp+0]

loc_6E2800:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E2800
pop	edi
pop	esi
pop	ebx
add	esp, 28h
retn	8
sub_6E2780 endp

align 10h



sub_6E2820 proc	near

var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
xor	bl, bl
cmp	dword ptr [esi+1Ch], 0
push	edi
jle	loc_6E28D9
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E28D9
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 10h
jnz	short loc_6E28D9
push	eax
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E2887
push	0
push	0
push	offset aPoint	; "Point"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn

loc_6E2887:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E2893
lea	ecx, [eax-10h]
jmp	short loc_6E2895

loc_6E2893:
xor	ecx, ecx

loc_6E2895:
mov	eax, [esi+18h]
lea	edx, [esp+2Ch+var_10]
push	edx
push	eax
call	sub_6E2780
mov	edx, [esi+18h]
lea	ecx, [esp+2Ch+var_20]
push	ecx
push	edi
push	edx
call	sub_6E26E0
fld	[esp+38h+var_20]
fcomp	[esp+38h+var_10]
add	esp, 0Ch
fnstsw	ax
test	ah, 44h
jp	short loc_6E28D7
fld	[esp+2Ch+var_18]
fcomp	[esp+2Ch+var_8]
fnstsw	ax
test	ah, 44h
jp	short loc_6E28D7
mov	bl, 1
jmp	short loc_6E28D9

loc_6E28D7:
xor	bl, bl

loc_6E28D9:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
add	esp, 20h
retn
sub_6E2820 endp




sub_6E28F0 proc	near

var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 30h
push	esi
mov	esi, [esp+34h+arg_0]
push	10h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E291A
push	0
push	0
push	offset aPoint	; "Point"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 30h
retn

loc_6E291A:
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6E2927
lea	edi, [eax-10h]
jmp	short loc_6E2929

loc_6E2927:
xor	edi, edi

loc_6E2929:
cmp	dword ptr [esi+1Ch], 0
mov	[esp+38h+var_10], 0
mov	[esp+38h+var_20], 0
jle	short loc_6E2965
push	0
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+3Ch+var_10]
call	sub_652520
cmp	dword ptr [esi+1Ch], 1
jle	short loc_6E2965
push	1
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+3Ch+var_20]
call	sub_652520

loc_6E2965:
mov	ecx, [esi+18h]
lea	eax, [esp+38h+var_30]
push	eax
push	ecx
mov	ecx, edi
call	sub_6E2780
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+3Ch+var_10]
call	sub_653400
fadd	[esp+38h+var_30]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+3Ch+var_20]
fstp	[esp+3Ch+var_30]
call	sub_653400
fadd	[esp+38h+var_28]
mov	edx, [esi+18h]
lea	ecx, [esp+38h+var_30]
push	ecx
fstp	[esp+3Ch+var_28]
push	edx
mov	ecx, edi
call	sub_6E2380
lea	ecx, [esp+38h+var_20]
call	sub_652830
lea	ecx, [esp+38h+var_10]
call	sub_652830
pop	edi
pop	esi
add	esp, 30h
retn
sub_6E28F0 endp

align 10h



sub_6E29D0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 2Ch
push	esi
mov	esi, [esp+30h+arg_0]
push	10h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E29FA
push	0
push	0
push	offset aPoint	; "Point"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 2Ch
retn

loc_6E29FA:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E2B61
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6E2B60
push	offset sub_4E4600
push	2
push	10h
lea	eax, [esp+40h+var_20]
push	eax
call	sub_4078B0
mov	edx, [esi+18h]
lea	ecx, [esp+34h+var_20]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E22E0
mov	eax, [esi+18h]
push	0
push	6
push	eax
lea	ecx, [esp+40h+var_28]
push	ecx
lea	ecx, [esp+44h+var_20]
call	sub_652F60
mov	edx, [esi+18h]
push	0
push	6
push	edx
lea	eax, [esp+40h+var_24]
push	eax
lea	ecx, [esp+44h+var_10]
call	sub_652F60
lea	ecx, [esp+34h+var_2C]
call	sub_679E30
push	0FFFFFFFFh
push	offset asc_143C750 ; "(x="
lea	ecx, [esp+3Ch+var_2C]
call	sub_67A0C0
mov	ecx, [esp+34h+var_28]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+3Ch+var_2C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aY_2	; ", y="
lea	ecx, [esp+3Ch+var_2C]
call	sub_67A0C0
mov	eax, [esp+34h+var_24]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+3Ch+var_2C]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset asc_15A0580 ; ")"
lea	ecx, [esp+3Ch+var_2C]
call	sub_67A0C0
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
mov	eax, [esp+34h+var_2C]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	edi, eax
inc	dword ptr [edi+8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6E2AFE
mov	ecx, esi
call	sub_652060

loc_6E2AFE:
mov	byte ptr [esi],	5
mov	[esi+4], edi
inc	dword ptr [edi+8]
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6E2B14
mov	ecx, edi
call	sub_650DF0

loc_6E2B14:
mov	esi, [esp+34h+var_2C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6E2B3A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E2B3A:
push	offset sub_4E4250
push	2
push	4
lea	ecx, [esp+40h+var_28]
push	ecx
call	sub_40F3E0
push	offset sub_652830
push	2
push	10h
lea	edx, [esp+40h+var_20]
push	edx
call	sub_40F3E0

loc_6E2B60:
pop	edi

loc_6E2B61:
pop	esi
add	esp, 2Ch
retn
sub_6E29D0 endp

align 10h



sub_6E2B70 proc	near

var_20=	byte ptr -20h
var_1C=	qword ptr -1Ch
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
sub	esp, 20h
push	esi
mov	esi, [eax+78h]
push	edi
mov	edi, [edx]
cmp	edi, [esi+27Ch]
jnz	short loc_6E2BD5
lea	edx, [esp+28h+var_10]
push	edx
push	eax
add	ecx, 0FFFFFFF0h
call	sub_6E2780
fld	[esp+28h+var_10]
fmul	st, st
mov	[esp+28h+var_20], 3
fld	[esp+28h+var_8]
fmul	st, st
faddp	st(1), st
call	__CIsqrt
fstp	[esp+28h+var_1C]
mov	ecx, [esp+28h+arg_8]
lea	eax, [esp+28h+var_20]
push	eax
call	sub_652520
lea	ecx, [esp+28h+var_20]
call	sub_652830
pop	edi
mov	al, 1
pop	esi
add	esp, 20h
retn	0Ch

loc_6E2BD5:
mov	esi, [esp+28h+arg_8]
push	esi
push	edx
push	eax
call	sub_6E2610
pop	edi
pop	esi
add	esp, 20h
retn	0Ch
sub_6E2B70 endp

align 10h



sub_6E2BF0 proc	near

var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 28h
push	esi
mov	esi, [esp+2Ch+arg_0]
push	10h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E2C1A
push	0
push	0
push	offset aPoint	; "Point"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 28h
retn

loc_6E2C1A:
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6E2C27
lea	edi, [eax-10h]
jmp	short loc_6E2C29

loc_6E2C27:
xor	edi, edi

loc_6E2C29:
cmp	dword ptr [esi+1Ch], 0
jle	short loc_6E2CAB
push	0
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+34h+var_10]
call	sub_652330
mov	ecx, [esi+18h]
lea	eax, [esp+30h+var_20]
push	eax
push	ecx
mov	ecx, edi
call	sub_6E2780
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+34h+var_10]
call	sub_653400
fstp	[esp+30h+var_28]
fld	[esp+30h+var_20]
fmul	st, st
fld	[esp+30h+var_18]
fmul	st, st
faddp	st(1), st
call	__CIsqrt
fdivr	[esp+30h+var_28]
mov	ecx, [esi+18h]
lea	eax, [esp+30h+var_20]
push	eax
push	ecx
mov	ecx, edi
fld	[esp+38h+var_20]
fmul	st, st(1)
fstp	[esp+38h+var_20]
fmul	[esp+38h+var_18]
fstp	[esp+38h+var_18]
call	sub_6E2380
lea	ecx, [esp+30h+var_10]
call	sub_652830
pop	edi
pop	esi
add	esp, 28h
retn

loc_6E2CAB:
mov	edx, [esi+18h]
push	offset byte_185648C
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E2320
pop	edi
pop	esi
add	esp, 28h
retn
sub_6E2BF0 endp

align 10h



sub_6E2CD0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	edi
mov	esi, ecx
call	sub_663BE0
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [ebx], offset	off_143C758
mov	ecx, [edi+78h]
add	edi, 78h
push	0Eh
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
push	offset unk_167DB14
push	edi
mov	ecx, esi
call	sub_6E2320
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6E2CD0 endp

align 10h



sub_6E2D20 proc	near

var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E2D54
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	edi, eax
jmp	short loc_6E2D56

loc_6E2D54:
xor	edi, edi

loc_6E2D56:
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E2E11
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_6E2E11
push	10h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E2DB0
push	0
push	0
push	offset aPoint	; "Point"
mov	ecx, esi
call	sub_651C60

loc_6E2D9B:
test	edi, edi
jz	loc_6E2E32
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
add	esp, 20h
jmp	sub_64B3B0

loc_6E2DB0:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E2DBC
lea	ecx, [eax-10h]
jmp	short loc_6E2DBE

loc_6E2DBC:
xor	ecx, ecx

loc_6E2DBE:
mov	edx, [esi+18h]
lea	eax, [esp+2Ch+var_20]
push	eax
push	edx
call	sub_6E2780
mov	ecx, [esi+18h]
lea	eax, [esp+2Ch+var_10]
push	eax
push	ebx
push	ecx
call	sub_6E26E0
fld	[esp+38h+var_20]
fadd	[esp+38h+var_10]
mov	eax, [esi+18h]
add	esp, 0Ch
lea	edx, [esp+2Ch+var_20]
fstp	[esp+2Ch+var_20]
push	edx
fld	[esp+30h+var_18]
push	eax
fadd	[esp+34h+var_8]
mov	ecx, edi
fstp	[esp+34h+var_18]
call	sub_6E2380
mov	ecx, [esi+4]
push	edi
call	sub_652E40
jmp	short loc_6E2D9B

loc_6E2E11:
mov	ecx, [esi+18h]
add	ecx, 78h
push	offset byte_185648C
push	ecx
mov	ecx, edi
call	sub_6E2320
mov	ecx, [esi+4]
push	edi
call	sub_652E40
jmp	loc_6E2D9B

loc_6E2E32:
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn
sub_6E2D20 endp

align 10h



sub_6E2E40 proc	near

var_20=	byte ptr -20h
var_18=	byte ptr -18h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
mov	ebx, [esp+24h+arg_0]
push	10h
mov	ecx, ebx
call	sub_651C40
test	al, al
jnz	short loc_6E2E6A
push	0
push	0
push	offset aPoint	; "Point"
mov	ecx, ebx
call	sub_651C60
pop	ebx
add	esp, 20h
retn

loc_6E2E6A:
mov	eax, [ebx+8]
push	ebp
push	edi
test	eax, eax
jz	short loc_6E2E78
lea	edi, [eax-10h]
jmp	short loc_6E2E7A

loc_6E2E78:
xor	edi, edi

loc_6E2E7A:
mov	eax, [ebx+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E2EA4
mov	ecx, [ebx+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	ebp, eax
jmp	short loc_6E2EA6

loc_6E2EA4:
xor	ebp, ebp

loc_6E2EA6:
push	esi
mov	esi, [ebx+18h]
add	esi, 78h
mov	[esp+28h+var_18], 0
mov	[esp+28h+var_8], 0
mov	ecx, [esi]
mov	edx, [edi+10h]
mov	edx, [edx+2Ch]
lea	eax, [esp+28h+var_18]
push	eax
add	ecx, 210h
add	edi, 10h
push	ecx
push	esi
mov	ecx, edi
call	edx
mov	edx, [esi]
mov	eax, [edi]
mov	eax, [eax+2Ch]
lea	ecx, [esp+30h+var_10]
push	ecx
add	edx, 214h
push	edx
push	esi
mov	ecx, edi
call	eax
lea	ecx, [esp+30h+var_20]
push	ecx
push	esi
mov	ecx, ebp
call	sub_6E2320
mov	ecx, [ebx+4]
push	ebp
call	sub_652E40
lea	esi, [esp+30h]
mov	edi, 1
lea	ebx, [ebx+0]

loc_6E2F10:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E2F10
pop	esi
test	ebp, ebp
jz	short loc_6E2F2B
mov	ecx, ebp
call	sub_64B3B0

loc_6E2F2B:
pop	edi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_6E2E40 endp

align 10h



sub_6E2F40 proc	near

var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E2F74
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	edi, eax
jmp	short loc_6E2F76

loc_6E2F74:
xor	edi, edi

loc_6E2F76:
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E3035
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_6E3035
push	10h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E2FD0
push	0
push	0
push	offset aPoint	; "Point"
mov	ecx, esi
call	sub_651C60

loc_6E2FBB:
test	edi, edi
jz	loc_6E3056
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
add	esp, 20h
jmp	sub_64B3B0

loc_6E2FD0:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E2FDC
lea	ecx, [eax-10h]
jmp	short loc_6E2FDE

loc_6E2FDC:
xor	ecx, ecx

loc_6E2FDE:
mov	edx, [esi+18h]
lea	eax, [esp+2Ch+var_20]
push	eax
push	edx
call	sub_6E2780
mov	ecx, [esi+18h]
lea	eax, [esp+2Ch+var_10]
push	eax
push	ebx
push	ecx
call	sub_6E26E0
fld	[esp+38h+var_10]
mov	eax, [esi+18h]
fchs
fadd	[esp+38h+var_20]
add	esp, 0Ch
lea	edx, [esp+2Ch+var_20]
push	edx
fstp	[esp+30h+var_20]
push	eax
fld	[esp+34h+var_8]
mov	ecx, edi
fchs
fadd	[esp+34h+var_18]
fstp	[esp+34h+var_18]
call	sub_6E2380
mov	ecx, [esi+4]
push	edi
call	sub_652E40
jmp	short loc_6E2FBB

loc_6E3035:
mov	ecx, [esi+18h]
add	ecx, 78h
push	offset byte_185648C
push	ecx
mov	ecx, edi
call	sub_6E2320
mov	ecx, [esi+4]
push	edi
call	sub_652E40
jmp	loc_6E2FBB

loc_6E3056:
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn
sub_6E2F40 endp

align 10h



sub_6E3060 proc	near

var_40=	qword ptr -40h
var_38=	qword ptr -38h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 40h
push	ebx
push	esi
mov	esi, [esp+48h+arg_0]
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E3093
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	ebx, eax
jmp	short loc_6E3095

loc_6E3093:
xor	ebx, ebx

loc_6E3095:
cmp	dword ptr [esi+1Ch], 2
mov	byte ptr [esp+48h+arg_0], 0
jle	loc_6E316A
mov	edx, [esi+18h]
push	ebp
push	edi
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
push	2
mov	ecx, esi
mov	ebp, eax
call	sub_651EC0
push	eax
lea	ecx, [esp+54h+var_10]
call	sub_652330
test	edi, edi
jz	short loc_6E3158
test	ebp, ebp
jz	short loc_6E3158
mov	edx, [esi+18h]
lea	ecx, [esp+50h+var_40]
push	ecx
push	edi
push	edx
call	sub_6E26E0
mov	ecx, [esi+18h]
lea	eax, [esp+5Ch+var_30]
push	eax
push	ebp
push	ecx
call	sub_6E26E0
mov	edx, [esi+18h]
add	esp, 18h
push	edx
lea	ecx, [esp+54h+var_10]
call	sub_653400
fld	[esp+50h+var_40]
fld	[esp+50h+var_30]
mov	ecx, [esi+18h]
fsub	st(1), st
lea	eax, [esp+50h+var_20]
fxch	st(1)
push	eax
push	ecx
fmul	st, st(2)
mov	ecx, ebx
faddp	st(1), st
fstp	[esp+58h+var_20]
fld	[esp+58h+var_38]
fld	[esp+58h+var_28]
fsub	st(1), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+58h+var_18]
call	sub_6E2380
mov	byte ptr [esp+50h+arg_0], 1

loc_6E3158:
lea	ecx, [esp+50h+var_10]
call	sub_652830
cmp	byte ptr [esp+50h+arg_0], 0
pop	edi
pop	ebp
jnz	short loc_6E317D

loc_6E316A:
mov	edx, [esi+18h]
push	offset byte_185648C
add	edx, 78h
push	edx
mov	ecx, ebx
call	sub_6E2320

loc_6E317D:
mov	ecx, [esi+4]
push	ebx
call	sub_652E40
pop	esi
test	ebx, ebx
jz	short loc_6E3196
mov	ecx, ebx
pop	ebx
add	esp, 40h
jmp	sub_64B3B0

loc_6E3196:
pop	ebx
add	esp, 40h
retn
sub_6E3060 endp

align 10h



sub_6E31A0 proc	near

var_40=	qword ptr -40h
var_38=	qword ptr -38h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 40h
push	esi
mov	esi, [esp+44h+arg_0]
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E31D3
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
mov	edi, eax
jmp	short loc_6E31D5

loc_6E31D3:
xor	edi, edi

loc_6E31D5:
cmp	dword ptr [esi+1Ch], 1
jle	loc_6E3269
push	0
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+4Ch+var_10]
call	sub_652330
push	1
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+4Ch+var_20]
call	sub_652330
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+4Ch+var_10]
call	sub_653400
fstp	[esp+48h+var_40]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+4Ch+var_20]
call	sub_653400
fst	[esp+48h+var_38]
call	__CIcos
fmul	[esp+48h+var_40]
fstp	[esp+48h+var_30]
fld	[esp+48h+var_38]
call	__CIsin
fmul	[esp+48h+var_40]
mov	edx, [esi+18h]
lea	ecx, [esp+48h+var_30]
push	ecx
fstp	[esp+4Ch+var_28]
push	edx
mov	ecx, edi
call	sub_6E2380
lea	ecx, [esp+48h+var_20]
call	sub_652830
lea	ecx, [esp+48h+var_10]
call	sub_652830
jmp	short loc_6E327C

loc_6E3269:
mov	eax, [esi+18h]
push	offset byte_185648C
add	eax, 78h
push	eax
mov	ecx, edi
call	sub_6E2320

loc_6E327C:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6E3295
mov	ecx, edi
pop	edi
pop	esi
add	esp, 40h
jmp	sub_64B3B0

loc_6E3295:
pop	edi
pop	esi
add	esp, 40h
retn
sub_6E31A0 endp

align 10h



sub_6E32A0 proc	near

var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 20h
push	ebp
push	esi
mov	esi, [esp+28h+arg_0]
cmp	dword ptr [esi+8], 0
jz	short loc_6E32E9
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 10h
jnz	short loc_6E32E9
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6E32E9
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E3311
add	eax, 0FFFFFFF0h
test	eax, eax
jz	short loc_6E3313
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx
jmp	short loc_6E3313

loc_6E32E9:
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E3311
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E2CD0
jmp	short loc_6E3313

loc_6E3311:
xor	eax, eax

loc_6E3313:
mov	ecx, [esi+4]
mov	ebp, eax
push	ebp
call	sub_652E40
cmp	dword ptr [esi+1Ch], 0
jle	short loc_6E3385
push	edi
push	0
mov	ecx, esi
mov	[esp+30h+var_20], 0
mov	[esp+30h+var_10], 0
call	sub_651EC0
push	eax
lea	ecx, [esp+30h+var_20]
call	sub_652520
mov	edi, 1
cmp	[esi+1Ch], edi
jle	short loc_6E335E
push	edi
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+30h+var_10]
call	sub_652520

loc_6E335E:
mov	eax, [esi+18h]
lea	edx, [esp+2Ch+var_20]
push	edx
add	eax, 78h
push	eax
mov	ecx, ebp
call	sub_6E2320
lea	esi, [esp+2Ch]

loc_6E3375:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E3375
pop	edi

loc_6E3385:
pop	esi
test	ebp, ebp
jz	short loc_6E3395
mov	ecx, ebp
pop	ebp
add	esp, 20h
jmp	sub_64B3B0

loc_6E3395:
pop	ebp
add	esp, 20h
retn
sub_6E32A0 endp

align 10h



sub_6E33A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E33C9
push	esi
mov	ecx, eax
call	sub_6E2CD0
pop	esi
retn	4

loc_6E33C9:
xor	eax, eax
pop	esi
retn	4
sub_6E33A0 endp

align 10h



sub_6E33D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143C758
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143C724
mov	dword ptr [edi], offset	off_143C6D0
mov	dword ptr [ecx], offset	off_143C7AC
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6E33D0 endp

align 10h



sub_6E3450 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebx
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	esi, ecx
mov	ecx, [esp+1Ch+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6E33D0
lea	edx, [esp+1Ch+arg_8]
push	edx
push	offset off_143C670
push	edi
lea	ecx, [esi+34h]
lea	ebx, [esi+10h]
push	esi
mov	dword ptr [esi], offset	off_143C724
mov	dword ptr [ebx], offset	off_143C6D0
mov	dword ptr [ecx], offset	off_143C7AC
mov	byte ptr [esp+2Ch+arg_8], 6
call	sub_663110
mov	eax, [edi]
push	0
push	6
mov	byte ptr [esp+24h+arg_8], 2
mov	[esp+24h+var_10], 4
mov	[esp+24h+var_C], 0
mov	ecx, [eax+280h]
push	offset aLength	; "length"
call	sub_650E40
lea	ecx, [esp+1Ch+arg_8]
push	ecx
mov	[esp+20h+arg_4], eax
inc	dword ptr [eax+8]
lea	edx, [esp+20h+var_10]
push	edx
lea	eax, [esp+24h+arg_4]
push	eax
push	edi
mov	ecx, ebx
call	sub_665530
mov	eax, [esp+1Ch+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E34F8
call	sub_650DF0

loc_6E34F8:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 10h
retn	0Ch
sub_6E3450 endp

align 10h



sub_6E3510 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6E3530
align 10h

loc_6E3520:
sub	ecx, 34h
jmp	loc_6E3530
align 10h

loc_6E3530:
push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143C724
mov	dword ptr [esi+10h], offset off_143C6D0
mov	dword ptr [ecx], offset	off_143C7AC
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6E356A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E356A:
mov	eax, esi
pop	esi
retn	4
sub_6E3510 endp




sub_6E3570 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6E35A5 ; default
jmp	ds:off_6E35A8[eax*4] ; switch jump

loc_6E3580:		; jumptable 006E3579 case 0
call	sub_6B6B20
retn	4

loc_6E3588:		; jumptable 006E3579 case 1
call	sub_6DF120
retn	4

loc_6E3590:		; jumptable 006E3579 case 2
call	sub_6B6A30
retn	4

loc_6E3598:		; jumptable 006E3579 case 3
call	sub_6C2270
retn	4

loc_6E35A0:		; jumptable 006E3579 case 4
call	sub_6B6AA0

locret_6E35A5:		; default
retn	4
sub_6E3570 endp

off_6E35A8 dd offset loc_6E3580	; jump table for switch	statement
dd offset loc_6E3588
dd offset loc_6E3590
dd offset loc_6E3598
dd offset loc_6E35A0
align 10h



sub_6E35C0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6E3623
push	offset sub_6E32A0
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
push	7
push	offset off_143C6B0
lea	ecx, [esp+2Ch+var_18]
lea	eax, [edi+10h]
push	ecx
push	eax
mov	dword ptr [edi], offset	off_143C7B0
mov	dword ptr [eax], offset	off_1439710
call	sub_66FC60
add	esp, 10h
mov	eax, edi
jmp	short loc_6E3625

loc_6E3623:
xor	eax, eax

loc_6E3625:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	54h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E36FD
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6E3450
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E367B
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E367B:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 0Eh
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E36A9
call	sub_64B3B0

loc_6E36A9:
mov	edx, [esi+298h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+40h]
push	ecx
mov	ecx, [esi+298h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E36F4
mov	ecx, ebp
call	sub_64B3B0

loc_6E36F4:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E36FD:
xor	ebp, ebp
jmp	loc_6E367B
sub_6E35C0 endp

align 10h



sub_6E3710 proc	near
mov	eax, 11h
retn
sub_6E3710 endp

align 10h



sub_6E3720 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143C95C
mov	dword ptr [esi+10h], offset off_143C908
mov	dword ptr [ecx], offset	off_143C900
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6E375A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E375A:
mov	eax, esi
pop	esi
retn	4
sub_6E3720 endp




sub_6E3760 proc	near
sub	ecx, 10h
jmp	sub_6E3720
sub_6E3760 endp

align 10h



sub_6E3770 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+50h]
test	eax, eax
jz	short loc_6E379B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+50h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6E379B:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6E3770 endp

align 10h



sub_6E37B0 proc	near
push	ebx
push	esi
push	edi
mov	ebx, eax
mov	esi, ecx
push	ebx
mov	edi, edx
push	offset asc_156C750 ; "x"
add	esi, 78h
add	edi, 10h
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	eax, [ebx+10h]
push	eax
push	offset aY_1	; "y"
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	ecx, [ebx+20h]
push	ecx
push	offset aWidth	; "width"
push	esi
mov	ecx, edi
call	sub_64AEF0
add	ebx, 30h
push	ebx
push	offset aHeight	; "height"
push	esi
mov	ecx, edi
call	sub_64AEF0
pop	edi
pop	esi
pop	ebx
retn
sub_6E37B0 endp

align 10h



sub_6E3810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
push	edi
lea	esi, [ecx+10h]
push	offset asc_156C750 ; "x"
push	ebx
mov	ecx, esi
call	sub_64AEF0
lea	eax, [edi+10h]
push	eax
push	offset aY_1	; "y"
push	ebx
mov	ecx, esi
call	sub_64AEF0
lea	ecx, [edi+20h]
push	ecx
push	offset aWidth	; "width"
push	ebx
mov	ecx, esi
call	sub_64AEF0
add	edi, 30h
push	edi
push	offset aHeight	; "height"
push	ebx
mov	ecx, esi
call	sub_64AEF0
pop	edi
pop	esi
pop	ebx
retn	8
sub_6E3810 endp

align 10h



sub_6E3870 proc	near

var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 58h
push	ebx
xor	al, al
push	esi
mov	esi, [esp+60h+arg_0]
push	edi
mov	[esp+64h+var_40], al
mov	[esp+64h+var_30], al
mov	[esp+64h+var_20], al
mov	[esp+64h+var_10], al
lea	eax, [esp+64h+var_40]
push	eax
lea	ebx, [ecx+10h]
push	offset asc_156C750 ; "x"
lea	edi, [esi+78h]
push	edi
mov	ecx, ebx
call	sub_64AEF0
lea	ecx, [esp+64h+var_30]
push	ecx
push	offset aY_1	; "y"
push	edi
mov	ecx, ebx
call	sub_64AEF0
lea	edx, [esp+64h+var_20]
push	edx
push	offset aWidth	; "width"
push	edi
mov	ecx, ebx
call	sub_64AEF0
lea	eax, [esp+64h+var_10]
push	eax
push	offset aHeight	; "height"
push	edi
mov	ecx, ebx
call	sub_64AEF0
push	esi
lea	ecx, [esp+68h+var_20]
call	sub_653400
fstp	[esp+64h+var_50]
push	esi
lea	ecx, [esp+68h+var_10]
call	sub_653400
fstp	[esp+64h+var_48]
push	esi
lea	ecx, [esp+68h+var_40]
call	sub_653400
fstp	[esp+64h+var_58]
push	esi
lea	ecx, [esp+68h+var_30]
call	sub_653400
fld	[esp+64h+var_58]
mov	eax, [esp+64h+arg_4]
fst	qword ptr [eax]
lea	esi, [esp+64h]
fxch	st(1)
mov	edi, 3
fst	qword ptr [eax+8]
fld	[esp+64h+var_50]
faddp	st(2), st
fxch	st(1)
fstp	qword ptr [eax+10h]
fadd	[esp+64h+var_48]
fstp	qword ptr [eax+18h]
jmp	short loc_6E3940
align 10h

loc_6E3940:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E3940
pop	edi
pop	esi
pop	ebx
add	esp, 58h
retn	8
sub_6E3870 endp

align 10h



sub_6E3960 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
push	edi
lea	esi, [ecx+10h]
push	offset asc_156C750 ; "x"
push	ebx
mov	ecx, esi
call	sub_669260
lea	eax, [edi+10h]
push	eax
push	offset aY_1	; "y"
push	ebx
mov	ecx, esi
call	sub_669260
lea	ecx, [edi+20h]
push	ecx
push	offset aWidth	; "width"
push	ebx
mov	ecx, esi
call	sub_669260
add	edi, 30h
push	edi
push	offset aHeight	; "height"
push	ebx
mov	ecx, esi
call	sub_669260
pop	edi
pop	esi
pop	ebx
retn	8
sub_6E3960 endp

align 10h



sub_6E39C0 proc	near

var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_4]
fld	qword ptr [esi]
push	edi
mov	edi, [esp+20h+arg_0]
fstp	[esp+20h+var_C]
lea	eax, [esp+20h+var_10]
push	eax
lea	ebp, [ecx+10h]
push	offset asc_156C750 ; "x"
add	edi, 78h
mov	bl, 3
push	edi
mov	ecx, ebp
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	qword ptr [esi+8]
lea	ecx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	ecx
push	offset aY_1	; "y"
push	edi
mov	ecx, ebp
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	qword ptr [esi+10h]
fsub	qword ptr [esi]
lea	edx, [esp+20h+var_10]
push	edx
push	offset aWidth	; "width"
push	edi
fstp	[esp+2Ch+var_C]
mov	ecx, ebp
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
fld	qword ptr [esi+18h]
fsub	qword ptr [esi+8]
lea	eax, [esp+20h+var_10]
push	eax
push	offset aHeight	; "height"
push	edi
fstp	[esp+2Ch+var_C]
mov	ecx, ebp
mov	[esp+2Ch+var_10], bl
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6E39C0 endp

align 10h



sub_6E3A80 proc	near

var_48=	qword ptr -48h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 48h
push	ebx
push	esi
mov	esi, [esp+50h+arg_0]
mov	ebx, 1
cmp	[esi+1Ch], ebx
jle	loc_6E3BB8
push	0
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+54h+var_30]
call	sub_652330
push	ebx
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_652330
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E3ADE
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
jmp	loc_6E3BA0

loc_6E3ADE:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E3AEA
lea	ecx, [eax-10h]
jmp	short loc_6E3AEC

loc_6E3AEA:
xor	ecx, ecx

loc_6E3AEC:
fldz
mov	edx, [esi+18h]
lea	eax, [esp+50h+var_20]
fst	[esp+50h+var_20]
fst	[esp+50h+var_18]
push	eax
fst	[esp+54h+var_10]
push	edx
fstp	[esp+58h+var_8]
call	sub_6E3870
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+54h+var_30]
call	sub_653400
fstp	[esp+50h+var_48]
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+54h+var_40]
call	sub_653400
fld	[esp+50h+var_10]
fld	st
fld	[esp+50h+var_48]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld1
test	ah, 44h
jp	short loc_6E3B43
fadd	st(1), st

loc_6E3B43:
fld	[esp+50h+var_8]
fld	st
fucomp	st(5)
fnstsw	ax
test	ah, 44h
jp	short loc_6E3B84
fxch	st(4)
faddp	st(1), st
fxch	st(3)

loc_6E3B58:
fxch	st(2)
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6E3B88
fcomp	[esp+50h+var_20]
fnstsw	ax
test	ah, 1
jnz	short loc_6E3B8A
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6E3B8C
fcomp	[esp+50h+var_18]
fnstsw	ax
test	ah, 1
jnz	short loc_6E3B8E
jmp	short loc_6E3B90

loc_6E3B84:
fstp	st(1)
jmp	short loc_6E3B58

loc_6E3B88:
fstp	st(2)

loc_6E3B8A:
fstp	st(1)

loc_6E3B8C:
fstp	st

loc_6E3B8E:
xor	ebx, ebx

loc_6E3B90:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	[esi+4], bl

loc_6E3BA0:
lea	ecx, [esp+50h+var_40]
call	sub_652830
lea	ecx, [esp+50h+var_30]
call	sub_652830
pop	esi
pop	ebx
add	esp, 48h
retn

loc_6E3BB8:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0
pop	esi
pop	ebx
add	esp, 48h
retn
sub_6E3A80 endp

align 10h



sub_6E3BD0 proc	near

var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	qword ptr -40h
var_38=	qword ptr -38h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 50h
push	esi
mov	esi, [esp+54h+arg_0]
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E3D67
mov	eax, [esi+18h]
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E3D66
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E3C24
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
add	esp, 50h
retn

loc_6E3C24:
push	ebx
mov	ebx, [esi+8]
test	ebx, ebx
jz	short loc_6E3C31
add	ebx, 0FFFFFFF0h
jmp	short loc_6E3C33

loc_6E3C31:
xor	ebx, ebx

loc_6E3C33:
fldz
push	offset sub_4E4600
push	2
fst	[esp+64h+var_40]
push	10h
fst	[esp+68h+var_38]
lea	ecx, [esp+68h+var_20]
fst	[esp+68h+var_30]
push	ecx
fstp	[esp+6Ch+var_28]
call	sub_4078B0
mov	eax, [esi+18h]
lea	edx, [esp+5Ch+var_40]
push	edx
push	eax
mov	ecx, ebx
call	sub_6E3870
mov	edx, [esi+18h]
lea	ecx, [esp+5Ch+var_20]
push	ecx
push	edi
push	edx
call	sub_6E2290
mov	eax, [edi+10h]
mov	edx, [eax+8]
lea	ecx, [edi+10h]
add	esp, 0Ch
call	edx
cmp	eax, 10h
jz	short loc_6E3CAF
mov	al, [esp+5Ch+var_20]
test	al, al
jz	loc_6E3D52
cmp	al, 0Ah
jz	loc_6E3D52
lea	ecx, [esp+5Ch+var_10]
call	sub_651A30
test	al, al
jnz	loc_6E3D52

loc_6E3CAF:
mov	edx, [esi+18h]
lea	ecx, [esp+5Ch+var_50]
push	ecx
push	edx
mov	ecx, edi
call	sub_6E2780
fld	[esp+5Ch+var_30]
fld	st
fld	[esp+5Ch+var_50]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld1
test	ah, 44h
jp	short loc_6E3CE0
fadd	st(1), st
fxch	st(1)
fst	[esp+5Ch+var_50]
fxch	st(1)

loc_6E3CE0:
fld	[esp+5Ch+var_28]
fld	st
fld	[esp+5Ch+var_48]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_6E3D36
faddp	st(2), st
fxch	st(1)
fst	[esp+5Ch+var_48]
fxch	st(1)

loc_6E3CFF:
fxch	st(3)
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_6E3D3A
fld	[esp+5Ch+var_40]
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_6E3D3C
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_6E3D3E
fcomp	[esp+5Ch+var_38]
fnstsw	ax
test	ah, 1
jnz	short loc_6E3D40
mov	ebx, 1
jmp	short loc_6E3D42

loc_6E3D36:
fstp	st(2)
jmp	short loc_6E3CFF

loc_6E3D3A:
fstp	st(1)

loc_6E3D3C:
fstp	st

loc_6E3D3E:
fstp	st

loc_6E3D40:
xor	ebx, ebx

loc_6E3D42:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	[esi+4], bl

loc_6E3D52:
push	offset sub_652830
push	2
push	10h
lea	eax, [esp+68h+var_20]
push	eax
call	sub_40F3E0
pop	ebx

loc_6E3D66:
pop	edi

loc_6E3D67:
pop	esi
add	esp, 50h
retn
sub_6E3BD0 endp

align 10h



sub_6E3D70 proc	near

var_78=	qword ptr -78h
var_70=	qword ptr -70h
var_68=	qword ptr -68h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 78h
push	esi
mov	esi, [esp+7Ch+arg_0]
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E3F29
mov	eax, [esi+18h]
push	ebx
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	loc_6E3F28
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E3DC7
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	ebx
pop	esi
add	esp, 78h
retn

loc_6E3DC7:
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_6E3DD4
add	edi, 0FFFFFFF0h
jmp	short loc_6E3DD6

loc_6E3DD4:
xor	edi, edi

loc_6E3DD6:
fldz
push	offset sub_4E4600
push	4
fst	[esp+8Ch+var_60]
push	10h
fst	[esp+90h+var_58]
lea	ecx, [esp+90h+var_40]
fst	[esp+90h+var_50]
push	ecx
fstp	[esp+94h+var_48]
call	sub_4078B0
mov	eax, [esi+18h]
lea	edx, [esp+84h+var_60]
push	edx
push	eax
mov	ecx, edi
call	sub_6E3870
mov	ecx, [esi+18h]
lea	eax, [esp+84h+var_40]
mov	edx, ebx
call	sub_6E37B0
mov	al, [esp+84h+var_40]
pop	edi
test	al, al
jz	loc_6E3F15
cmp	al, 0Ah
jz	loc_6E3F15
mov	al, [esp+80h+var_30]
test	al, al
jz	loc_6E3F15
cmp	al, 0Ah
jz	loc_6E3F15
lea	ecx, [esp+80h+var_20]
call	sub_651A30
test	al, al
jnz	loc_6E3F15
lea	ecx, [esp+80h+var_10]
call	sub_651A30
test	al, al
jnz	loc_6E3F15
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+84h+var_20]
call	sub_653400
fstp	[esp+80h+var_70]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+84h+var_10]
call	sub_653400
fstp	[esp+80h+var_68]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+84h+var_40]
call	sub_653400
fstp	[esp+80h+var_78]
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+84h+var_30]
call	sub_653400
fld	[esp+80h+var_70]
fld	[esp+80h+var_78]
fadd	st(1), st
fld	[esp+80h+var_68]
fadd	st, st(3)
fxch	st(2)
fcomp	[esp+80h+var_50]
fnstsw	ax
test	ah, 41h
jp	short loc_6E3EEB
fxch	st(1)
fcomp	[esp+80h+var_48]
fnstsw	ax
test	ah, 41h
jp	short loc_6E3EED
fcomp	[esp+80h+var_60]
fnstsw	ax
test	ah, 1
jnz	short loc_6E3EEF
fcomp	[esp+80h+var_58]
fnstsw	ax
test	ah, 1
jnz	short loc_6E3EF1
mov	eax, 1
jmp	short loc_6E3EF3

loc_6E3EEB:
fstp	st(2)

loc_6E3EED:
fstp	st(1)

loc_6E3EEF:
fstp	st

loc_6E3EF1:
xor	eax, eax

loc_6E3EF3:
mov	ecx, [esi+4]
push	eax
call	sub_64A6C0
push	offset sub_652830
push	4
push	10h
lea	edx, [esp+8Ch+var_40]
push	edx
call	sub_40F3E0
pop	ebx
pop	esi
add	esp, 78h
retn

loc_6E3F15:
push	offset sub_652830
push	4
push	10h
lea	eax, [esp+8Ch+var_40]
push	eax
call	sub_40F3E0

loc_6E3F28:
pop	ebx

loc_6E3F29:
pop	esi
add	esp, 78h
retn
sub_6E3D70 endp

align 10h



sub_6E3F30 proc	near

var_48=	qword ptr -48h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 48h
push	esi
mov	esi, [esp+4Ch+arg_0]
cmp	dword ptr [esi+1Ch], 0
mov	[esp+4Ch+var_30], 0
mov	[esp+4Ch+var_40], 0
jle	short loc_6E3F74
push	0
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+50h+var_30]
call	sub_652520
cmp	dword ptr [esi+1Ch], 1
jle	short loc_6E3F74
push	1
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+50h+var_40]
call	sub_652520

loc_6E3F74:
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E3FA8
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
lea	ecx, [esp+4Ch+var_40]
call	sub_652830
lea	ecx, [esp+4Ch+var_30]
call	sub_652830
pop	esi
add	esp, 48h
retn

loc_6E3FA8:
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6E3FB5
lea	edi, [eax-10h]
jmp	short loc_6E3FB7

loc_6E3FB5:
xor	edi, edi

loc_6E3FB7:
fldz
mov	ecx, [esi+18h]
lea	eax, [esp+50h+var_20]
fst	[esp+50h+var_20]
push	eax
fst	[esp+54h+var_18]
push	ecx
fst	[esp+58h+var_10]
mov	ecx, edi
fstp	[esp+58h+var_8]
call	sub_6E3870
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+54h+var_30]
call	sub_653400
fstp	[esp+50h+var_48]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_653400
fld	[esp+50h+var_20]
fld	[esp+50h+var_48]
mov	edx, [esi+18h]
fsub	st(1), st
lea	ecx, [esp+50h+var_20]
fxch	st(1)
push	ecx
push	edx
fstp	[esp+58h+var_20]
mov	ecx, edi
fadd	[esp+58h+var_10]
fstp	[esp+58h+var_10]
fld	[esp+58h+var_18]
fsub	st, st(1)
fstp	[esp+58h+var_18]
fadd	[esp+58h+var_8]
fstp	[esp+58h+var_8]
call	sub_6E39C0
lea	ecx, [esp+50h+var_40]
call	sub_652830
lea	ecx, [esp+50h+var_30]
call	sub_652830
pop	edi
pop	esi
add	esp, 48h
retn
sub_6E3F30 endp

align 10h



sub_6E4050 proc	near

var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 30h
push	esi
mov	esi, [esp+34h+arg_0]
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E413E
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E4084
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 30h
retn

loc_6E4084:
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6E4091
lea	edi, [eax-10h]
jmp	short loc_6E4093

loc_6E4091:
xor	edi, edi

loc_6E4093:
mov	eax, [esi+18h]
push	ebx
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jnz	short loc_6E40C8
mov	ecx, [esi+18h]
add	ecx, 78h
push	offset byte_18564B0
push	ecx
mov	ecx, edi
call	sub_6E3960
pop	ebx
pop	edi
pop	esi
add	esp, 30h
retn

loc_6E40C8:
fldz
mov	eax, [esi+18h]
lea	edx, [esp+3Ch+var_20]
fst	[esp+3Ch+var_20]
fst	[esp+3Ch+var_18]
push	edx
fst	[esp+40h+var_10]
push	eax
mov	ecx, edi
fstp	[esp+44h+var_8]
call	sub_6E3870
mov	edx, [esi+18h]
lea	ecx, [esp+3Ch+var_30]
push	ecx
push	ebx
push	edx
call	sub_6E26E0
fld	[esp+48h+var_20]
fld	[esp+48h+var_30]
mov	ecx, [esi+18h]
fsub	st(1), st
add	esp, 0Ch
fxch	st(1)
lea	eax, [esp+3Ch+var_20]
push	eax
fstp	[esp+40h+var_20]
push	ecx
mov	ecx, edi
fadd	[esp+44h+var_10]
fstp	[esp+44h+var_10]
fld	[esp+44h+var_18]
fld	[esp+44h+var_28]
fsub	st(1), st
fxch	st(1)
fstp	[esp+44h+var_18]
fadd	[esp+44h+var_8]
fstp	[esp+44h+var_8]
call	sub_6E39C0
pop	ebx
pop	edi

loc_6E413E:
pop	esi
add	esp, 30h
retn
sub_6E4050 endp

align 10h


; Attributes: bp-based frame

sub_6E4150 proc	near

var_A9=	byte ptr -0A9h
var_A8=	qword ptr -0A8h
var_A0=	qword ptr -0A0h
var_98=	qword ptr -98h
var_90=	qword ptr -90h
var_88=	qword ptr -88h
var_80=	qword ptr -80h
var_78=	qword ptr -78h
var_68=	qword ptr -68h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_8= qword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0ACh
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E4186
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6E4186:
mov	eax, [esi+8]
mov	[esp+0B8h+var_A9], 0
test	eax, eax
jz	short loc_6E4197
lea	ebx, [eax-10h]
jmp	short loc_6E4199

loc_6E4197:
xor	ebx, ebx

loc_6E4199:
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E4365
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E4365
fldz
push	offset sub_4E4600
push	4
fst	[esp+0C0h+var_A8]
push	10h
fst	[esp+0C4h+var_A0]
lea	ecx, [esp+0C4h+var_60]
fst	[esp+0C4h+var_98]
push	ecx
fstp	[esp+0C8h+var_90]
call	sub_4078B0
mov	eax, [esi+18h]
lea	edx, [esp+0B8h+var_A8]
push	edx
push	eax
mov	ecx, ebx
call	sub_6E3870
mov	ecx, [esi+18h]
lea	eax, [esp+0B8h+var_60]
mov	edx, edi
call	sub_6E37B0
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0BCh+var_40]
call	sub_653400
fstp	[esp+0B8h+var_88]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0BCh+var_30]
call	sub_653400
fstp	[esp+0B8h+var_80]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+0BCh+var_60]
call	sub_653400
fstp	[esp+0B8h+var_68]
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0BCh+var_50]
call	sub_653400
fld	[esp+0B8h+var_88]
fld	[esp+0B8h+var_68]
fadd	st(1), st
fld	[esp+0B8h+var_80]
fadd	st, st(3)
fstp	[esp+0B8h+var_8]
fldz
fst	[esp+0B8h+var_88]
fld	st
fxch	st(1)
fst	[esp+0B8h+var_78]
fld	st
fxch	st(5)
fcom	[esp+0B8h+var_90]
fnstsw	ax
test	ah, 41h
jp	loc_6E4302
fld	[esp+0B8h+var_A0]
fcomp	[esp+0B8h+var_8]
fnstsw	ax
test	ah, 41h
jp	short loc_6E4302
fld	[esp+0B8h+var_A8]
fcomp	st(5)
fnstsw	ax
test	ah, 41h
jp	short loc_6E4302
fld	[esp+0B8h+var_98]
fcom	st(4)
fnstsw	ax
test	ah, 1
jnz	short loc_6E430A
fstp	st(6)
fstp	st(2)
fld	[esp+0B8h+var_A8]
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E42C0
fstp	st(3)
jmp	short loc_6E42C2

loc_6E42C0:
fstp	st

loc_6E42C2:
fxch	st(4)
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E42D1
fstp	st
jmp	short loc_6E42D3

loc_6E42D1:
fstp	st(3)

loc_6E42D3:
fld	[esp+0B8h+var_A0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E42E4
fstp	st(1)
jmp	short loc_6E42E6

loc_6E42E4:
fstp	st

loc_6E42E6:
fld	[esp+0B8h+var_8]
fld	[esp+0B8h+var_90]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E42FE
fstp	st
jmp	short loc_6E4326

loc_6E42FE:
fstp	st(1)
jmp	short loc_6E4326

loc_6E4302:
fstp	st
fstp	st(2)
fstp	st(2)
jmp	short loc_6E4314

loc_6E430A:
fstp	st(1)
fstp	st(3)
fstp	st(3)
fstp	st(1)
fxch	st(1)

loc_6E4314:
fld	[esp+0B8h+var_78]
fld	[esp+0B8h+var_88]
fxch	st(2)
fxch	st(4)
fxch	st(1)
fxch	st(3)
fxch	st(1)

loc_6E4326:
fxch	st(3)
mov	[esp+0B8h+var_A9], 1
fsubrp	st(2), st
fxch	st(1)
fucomp	st(3)
fnstsw	ax
test	ah, 44h
jnp	short loc_6E4347
fsubp	st(1), st
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6E4352
jmp	short loc_6E434D

loc_6E4347:
fstp	st(2)
fstp	st
fstp	st

loc_6E434D:
mov	[esp+0B8h+var_A9], 0

loc_6E4352:
push	offset sub_652830
push	4
push	10h
lea	edx, [esp+0C4h+var_60]
push	edx
call	sub_40F3E0

loc_6E4365:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	al, [esp+0B8h+var_A9]
pop	edi
mov	byte ptr [esi],	2
mov	[esi+4], al
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6E4150 endp




sub_6E4380 proc	near

var_60=	qword ptr -60h
var_50=	qword ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 50h
push	ebx
push	esi
mov	esi, [esp+58h+arg_0]
push	11h
mov	ecx, esi
call	sub_651C40
xor	ebx, ebx
test	al, al
jnz	short loc_6E43AC
push	ebx
push	ebx
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ebx
add	esp, 50h
retn

loc_6E43AC:
mov	eax, [esi+8]
cmp	eax, ebx
jz	short loc_6E43B8
lea	ecx, [eax-10h]
jmp	short loc_6E43BA

loc_6E43B8:
xor	ecx, ecx

loc_6E43BA:
mov	edx, [esi+18h]
lea	eax, [esp+58h+var_40]
push	eax
add	edx, 78h
push	edx
mov	[esp+60h+var_40], bl
mov	[esp+60h+var_30], bl
mov	[esp+60h+var_20], bl
mov	[esp+60h+var_10], bl
call	sub_6E3810
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+5Ch+var_20]
call	sub_653400
fstp	[esp+58h+var_50]
mov	ecx, dword ptr [esp+58h+var_50+4]
mov	eax, ecx
xor	edx, edx
and	eax, 7FF00000h
cmp	edx, ebx
jnz	short loc_6E4412
cmp	eax, 7FF00000h
jnz	short loc_6E4412
mov	eax, dword ptr [esp+58h+var_50]
and	ecx, 0FFFFFh
or	eax, ecx
jnz	short loc_6E448A

loc_6E4412:
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+5Ch+var_10]
call	sub_653400
sub	esp, 8
fstp	[esp+60h+var_60]
call	sub_64A5D0
test	al, al
jnz	short loc_6E448A
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+5Ch+var_40]
call	sub_653400
fstp	st
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+5Ch+var_30]
call	sub_653400
fstp	st
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+5Ch+var_20]
call	sub_653400
fstp	[esp+58h+var_50]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+5Ch+var_10]
call	sub_653400
fld	[esp+58h+var_50]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_6E4486
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_6E448A
jmp	short loc_6E448C

loc_6E4486:
fstp	st(1)
fstp	st

loc_6E448A:
mov	bl, 1

loc_6E448C:
mov	esi, [esi+4]
push	edi
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	[esi+4], bl
lea	esi, [esp+5Ch]
mov	edi, 3

loc_6E44A6:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E44A6
pop	edi
pop	esi
pop	ebx
add	esp, 50h
retn
sub_6E4380 endp

align 10h



sub_6E44C0 proc	near

var_78=	qword ptr -78h
var_70=	byte ptr -70h
var_6C=	qword ptr -6Ch
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 78h
push	ebx
push	esi
mov	esi, [esp+80h+arg_0]
push	11h
mov	ecx, esi
call	sub_651C40
xor	ebx, ebx
test	al, al
jnz	short loc_6E44EF
push	ebx
push	ebx
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ebx
add	esp, 78h
retn

loc_6E44EF:
cmp	[esi+1Ch], ebx
mov	[esp+80h+var_50], bl
mov	[esp+80h+var_60], bl
jle	short loc_6E4527
push	ebx
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+84h+var_50]
call	sub_652520
cmp	dword ptr [esi+1Ch], 1
jle	short loc_6E4527
push	1
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+84h+var_60]
call	sub_652520

loc_6E4527:
mov	eax, [esi+8]
push	edi
cmp	eax, ebx
jz	short loc_6E4534
lea	edi, [eax-10h]
jmp	short loc_6E4536

loc_6E4534:
xor	edi, edi

loc_6E4536:
mov	ecx, [esi+18h]
lea	eax, [esp+84h+var_40]
add	ecx, 78h
push	eax
push	ecx
mov	ecx, edi
mov	[esp+8Ch+var_40], bl
mov	[esp+8Ch+var_30], bl
mov	[esp+8Ch+var_20], bl
mov	[esp+8Ch+var_10], bl
call	sub_6E3810
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+88h+var_40]
call	sub_653400
fstp	[esp+84h+var_78]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+88h+var_50]
call	sub_653400
fadd	[esp+84h+var_78]
lea	ecx, [esp+84h+var_70]
push	ecx
mov	ebx, 3
fstp	[esp+88h+var_6C]
lea	ecx, [esp+88h+var_40]
mov	[esp+88h+var_70], bl
call	sub_652520
lea	ecx, [esp+84h+var_70]
call	sub_652830
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+88h+var_30]
call	sub_653400
fstp	[esp+84h+var_78]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+88h+var_60]
call	sub_653400
fadd	[esp+84h+var_78]
lea	ecx, [esp+84h+var_70]
push	ecx
lea	ecx, [esp+88h+var_30]
fstp	[esp+88h+var_6C]
mov	[esp+88h+var_70], bl
call	sub_652520
lea	ecx, [esp+84h+var_70]
call	sub_652830
mov	eax, [esi+18h]
lea	edx, [esp+84h+var_40]
push	edx
add	eax, 78h
push	eax
mov	ecx, edi
call	sub_6E3960
lea	esi, [esp+84h]
mov	edi, ebx
lea	esp, [esp+0]

loc_6E4600:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E4600
lea	ecx, [esp+84h+var_60]
call	sub_652830
lea	ecx, [esp+84h+var_50]
call	sub_652830
pop	edi
pop	esi
pop	ebx
add	esp, 78h
retn
sub_6E44C0 endp

align 10h



sub_6E4630 proc	near

var_80=	qword ptr -80h
var_70=	byte ptr -70h
var_6C=	qword ptr -6Ch
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
arg_0= dword ptr  4

sub	esp, 80h
push	esi
mov	esi, [esp+84h+arg_0]
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E48B8
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E466D
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 80h
retn

loc_6E466D:
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	short loc_6E467A
add	edi, 0FFFFFFF0h
jmp	short loc_6E467C

loc_6E467A:
xor	edi, edi

loc_6E467C:
mov	eax, [esi+18h]
push	ebx
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
push	offset sub_4E4600
push	4
push	10h
lea	ecx, [esp+98h+var_40]
push	ecx
mov	ebx, eax
call	sub_4078B0
test	ebx, ebx
jnz	loc_6E473B
mov	eax, [esi+18h]
lea	edx, [esp+8Ch+var_40]
push	edx
add	eax, 78h
push	eax
mov	ecx, edi
call	sub_6E3810
call	sub_6794F0
fstp	[esp+8Ch+var_80+4]
lea	ecx, [esp+8Ch+var_80]
push	ecx
mov	bl, 3
lea	ecx, [esp+90h+var_40]
mov	byte ptr [esp+90h+var_80], bl
call	sub_652520
lea	ecx, [esp+8Ch+var_80]
call	sub_652830
call	sub_6794F0
fstp	[esp+8Ch+var_80+4]
lea	edx, [esp+8Ch+var_80]
push	edx
lea	ecx, [esp+90h+var_30]
mov	byte ptr [esp+90h+var_80], bl
call	sub_652520
lea	ecx, [esp+8Ch+var_80]
call	sub_652830
mov	ecx, [esi+18h]
lea	eax, [esp+8Ch+var_40]
add	ecx, 78h
push	eax
push	ecx
mov	ecx, edi
call	sub_6E3960
push	offset sub_652830
push	4
push	10h
lea	edx, [esp+98h+var_40]
push	edx
call	sub_40F3E0
pop	ebx
pop	edi
pop	esi
add	esp, 80h
retn

loc_6E473B:
push	offset sub_4E4600
push	2
push	10h
lea	eax, [esp+98h+var_60]
push	eax
call	sub_4078B0
mov	edx, [esi+18h]
lea	ecx, [esp+8Ch+var_60]
push	ecx
push	ebx
push	edx
call	sub_6E2290
mov	eax, [ebx+10h]
mov	edx, [eax+8]
lea	ecx, [ebx+10h]
add	esp, 0Ch
call	edx
cmp	eax, 10h
jz	short loc_6E47E6
mov	al, [esp+8Ch+var_60]
test	al, al
jz	short loc_6E4789
cmp	al, 0Ah
jz	short loc_6E4789
lea	ecx, [esp+8Ch+var_50]
call	sub_651A30
test	al, al
jz	short loc_6E47E6

loc_6E4789:
mov	ecx, [esi+18h]
lea	eax, [esp+8Ch+var_40]
add	ecx, 78h
push	eax
push	ecx
mov	ecx, edi
call	sub_6E3810
call	sub_6794F0
fstp	[esp+8Ch+var_80+4]
lea	edx, [esp+8Ch+var_80]
mov	bl, 3
push	edx
lea	ecx, [esp+90h+var_40]
mov	byte ptr [esp+90h+var_80], bl
call	sub_652520
lea	ecx, [esp+8Ch+var_80]
call	sub_652830
call	sub_6794F0
fstp	[esp+8Ch+var_80+4]
lea	eax, [esp+8Ch+var_80]
push	eax
lea	ecx, [esp+90h+var_30]
mov	byte ptr [esp+90h+var_80], bl
call	sub_652520
lea	ecx, [esp+8Ch+var_80]
jmp	loc_6E4878

loc_6E47E6:
mov	eax, [esi+18h]
lea	edx, [esp+8Ch+var_40]
push	edx
add	eax, 78h
push	eax
mov	ecx, edi
call	sub_6E3810
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+90h+var_60]
call	sub_653400
fstp	[esp+8Ch+var_80]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+90h+var_40]
call	sub_653400
fadd	[esp+8Ch+var_80]
lea	eax, [esp+8Ch+var_70]
mov	bl, 3
push	eax
fstp	[esp+90h+var_6C]
lea	ecx, [esp+90h+var_40]
mov	[esp+90h+var_70], bl
call	sub_652520
lea	ecx, [esp+8Ch+var_70]
call	sub_652830
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+90h+var_50]
call	sub_653400
fstp	[esp+8Ch+var_80]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+90h+var_30]
call	sub_653400
fadd	[esp+8Ch+var_80]
lea	eax, [esp+8Ch+var_70]
push	eax
lea	ecx, [esp+90h+var_30]
fstp	[esp+90h+var_6C]
mov	[esp+90h+var_70], bl
call	sub_652520
lea	ecx, [esp+8Ch+var_70]

loc_6E4878:
call	sub_652830
mov	edx, [esi+18h]
lea	ecx, [esp+8Ch+var_40]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E3960
push	offset sub_652830
push	2
push	10h
lea	eax, [esp+98h+var_60]
push	eax
call	sub_40F3E0
push	offset sub_652830
push	4
push	10h
lea	ecx, [esp+98h+var_40]
push	ecx
call	sub_40F3E0
pop	ebx
pop	edi

loc_6E48B8:
pop	esi
add	esp, 80h
retn
sub_6E4630 endp




sub_6E48C0 proc	near

var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 20h
push	esi
mov	esi, [esp+24h+arg_0]
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E48EA
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 20h
retn

loc_6E48EA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E48F6
lea	ecx, [eax-10h]
jmp	short loc_6E48F8

loc_6E48F6:
xor	ecx, ecx

loc_6E48F8:
fldz
mov	edx, [esi+18h]
lea	eax, [esp+24h+var_20]
fst	[esp+24h+var_20]
fst	[esp+24h+var_18]
push	eax
fst	[esp+28h+var_10]
push	edx
fstp	[esp+2Ch+var_8]
call	sub_6E39C0
pop	esi
add	esp, 20h
retn
sub_6E48C0 endp

align 10h



sub_6E4920 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 54h
push	esi
mov	esi, [esp+58h+arg_0]
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E494A
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 54h
retn

loc_6E494A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_6E4B21
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_6E4B20
push	offset sub_4E4600
push	4
push	10h
lea	eax, [esp+68h+var_40]
push	eax
call	sub_4078B0
mov	edx, [esi+18h]
lea	ecx, [esp+5Ch+var_40]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E3810
mov	eax, [esi+18h]
push	0
push	6
push	eax
lea	ecx, [esp+68h+var_50]
push	ecx
lea	ecx, [esp+6Ch+var_40]
call	sub_652F60
mov	edx, [esi+18h]
push	0
push	6
push	edx
lea	eax, [esp+68h+var_4C]
push	eax
lea	ecx, [esp+6Ch+var_30]
call	sub_652F60
mov	ecx, [esi+18h]
push	0
push	6
push	ecx
lea	edx, [esp+68h+var_48]
push	edx
lea	ecx, [esp+6Ch+var_20]
call	sub_652F60
mov	eax, [esi+18h]
push	0
push	6
push	eax
lea	ecx, [esp+68h+var_44]
push	ecx
lea	ecx, [esp+6Ch+var_10]
call	sub_652F60
lea	ecx, [esp+5Ch+var_54]
call	sub_679E30
push	0FFFFFFFFh
push	offset asc_143C750 ; "(x="
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
mov	edx, [esp+5Ch+var_50]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aY_2	; ", y="
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
mov	ecx, [esp+5Ch+var_4C]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aWidth_4	; ", width="
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
mov	eax, [esp+5Ch+var_48]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset aHeight_7 ; ", height="
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
mov	edx, [esp+5Ch+var_44]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
push	0FFFFFFFFh
push	offset asc_15A0580 ; ")"
lea	ecx, [esp+64h+var_54]
call	sub_67A0C0
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	eax, [esp+5Ch+var_54]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	edi, eax
inc	dword ptr [edi+8]
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6E4ABE
mov	ecx, esi
call	sub_652060

loc_6E4ABE:
mov	byte ptr [esi],	5
mov	[esi+4], edi
inc	dword ptr [edi+8]
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6E4AD4
mov	ecx, edi
call	sub_650DF0

loc_6E4AD4:
mov	esi, [esp+5Ch+var_54]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6E4AFA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E4AFA:
push	offset sub_4E4250
push	4
push	4
lea	ecx, [esp+68h+var_50]
push	ecx
call	sub_40F3E0
push	offset sub_652830
push	4
push	10h
lea	edx, [esp+68h+var_40]
push	edx
call	sub_40F3E0

loc_6E4B20:
pop	edi

loc_6E4B21:
pop	esi
add	esp, 54h
retn
sub_6E4920 endp

align 10h


; Attributes: bp-based frame

sub_6E4B30 proc	near

var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_C]
sub	esp, 34h
test	byte ptr [eax],	4
push	ebx
push	esi
push	edi
mov	edi, ecx
jz	short loc_6E4B51
xor	al, al
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6E4B51:
mov	ebx, [ebp+arg_4]
mov	ecx, [ebx]
mov	esi, [ecx]
mov	ecx, offset aLeft_0 ; "left"
mov	eax, esi
nop

loc_6E4B60:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E4B80
test	dl, dl
jz	short loc_6E4B7C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E4B80
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E4B60

loc_6E4B7C:
xor	eax, eax
jmp	short loc_6E4B85

loc_6E4B80:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E4B85:
test	eax, eax
jnz	short loc_6E4BCF
fldz
lea	edx, [esp+40h+var_20]
lea	esi, [edi-10h]
fst	[esp+40h+var_18]
mov	edi, [ebp+arg_0]
fst	[esp+40h+var_10]
push	edx
fstp	[esp+44h+var_8]
push	edi
mov	ecx, esi
call	sub_6E3870
mov	ecx, [ebp+arg_8]
push	edi
call	sub_653400
fstp	[esp+40h+var_20]
lea	eax, [esp+40h+var_20]
push	eax
push	edi
mov	ecx, esi
call	sub_6E39C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6E4BCF:		; "top"
mov	ecx, offset aTop_1
mov	eax, esi

loc_6E4BD6:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E4BF6
test	dl, dl
jz	short loc_6E4BF2
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E4BF6
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E4BD6

loc_6E4BF2:
xor	eax, eax
jmp	short loc_6E4BFB

loc_6E4BF6:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E4BFB:
test	eax, eax
jnz	short loc_6E4C45
fldz
lea	ecx, [esp+40h+var_20]
lea	esi, [edi-10h]
fst	[esp+40h+var_20]
mov	edi, [ebp+arg_0]
fst	[esp+40h+var_10]
push	ecx
fstp	[esp+44h+var_8]
push	edi
mov	ecx, esi
call	sub_6E3870
mov	ecx, [ebp+arg_8]
push	edi
call	sub_653400
fstp	[esp+40h+var_18]
lea	edx, [esp+40h+var_20]
push	edx
push	edi
mov	ecx, esi
call	sub_6E39C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6E4C45:		; "right"
push	offset aRight
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E4C9B
fldz
lea	eax, [esp+40h+var_20]
lea	esi, [edi-10h]
fst	[esp+40h+var_20]
mov	edi, [ebp+arg_0]
fst	[esp+40h+var_18]
push	eax
fstp	[esp+44h+var_8]
push	edi
mov	ecx, esi
call	sub_6E3870
mov	ecx, [ebp+arg_8]
push	edi
call	sub_653400
fstp	[esp+40h+var_10]
lea	ecx, [esp+40h+var_20]
push	ecx
push	edi
mov	ecx, esi
call	sub_6E39C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6E4C9B:		; "bottom"
push	offset aBottom
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E4CF1
fldz
lea	edx, [esp+40h+var_20]
lea	esi, [edi-10h]
fst	[esp+40h+var_20]
mov	edi, [ebp+arg_0]
fst	[esp+40h+var_18]
push	edx
fstp	[esp+44h+var_10]
push	edi
mov	ecx, esi
call	sub_6E3870
mov	ecx, [ebp+arg_8]
push	edi
call	sub_653400
fstp	[esp+40h+var_8]
lea	eax, [esp+40h+var_20]
push	eax
push	edi
mov	ecx, esi
call	sub_6E39C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6E4CF1:		; "topLeft"
push	offset aTopleft
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E4D6A
fldz
mov	esi, [ebp+arg_0]
lea	ecx, [esp+40h+var_20]
fst	[esp+40h+var_20]
push	ecx
fst	[esp+44h+var_18]
add	edi, 0FFFFFFF0h
fst	[esp+44h+var_10]
push	esi
fstp	[esp+48h+var_8]
mov	ecx, edi
call	sub_6E3870
mov	ecx, [ebp+arg_8]
push	esi
call	sub_652C20
test	eax, eax
jz	short loc_6E4D52
lea	edx, [esp+40h+var_30]
push	edx
push	eax
push	esi
call	sub_6E26E0
fld	[esp+4Ch+var_30]
fstp	[esp+4Ch+var_20]
add	esp, 0Ch
fld	[esp+40h+var_28]
fstp	[esp+40h+var_18]

loc_6E4D52:
lea	eax, [esp+40h+var_20]
push	eax
push	esi
mov	ecx, edi
call	sub_6E39C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6E4D6A:		; "bottomRight"
push	offset aBottomright
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E4DE3
fldz
mov	esi, [ebp+arg_0]
lea	ecx, [esp+40h+var_20]
fst	[esp+40h+var_20]
push	ecx
fst	[esp+44h+var_18]
add	edi, 0FFFFFFF0h
fst	[esp+44h+var_10]
push	esi
fstp	[esp+48h+var_8]
mov	ecx, edi
call	sub_6E3870
mov	ecx, [ebp+arg_8]
push	esi
call	sub_652C20
test	eax, eax
jz	short loc_6E4DCB
lea	edx, [esp+40h+var_30]
push	edx
push	eax
push	esi
call	sub_6E26E0
fld	[esp+4Ch+var_30]
fstp	[esp+4Ch+var_10]
fld	[esp+4Ch+var_28]

loc_6E4DC4:
fstp	[esp+4Ch+var_8]
add	esp, 0Ch

loc_6E4DCB:
lea	eax, [esp+40h+var_20]
push	eax
push	esi
mov	ecx, edi
call	sub_6E39C0
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_6E4DE3:		; "size"
push	offset aSize
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E4E4A
fldz
mov	esi, [ebp+arg_0]
lea	ecx, [esp+40h+var_20]
fst	[esp+40h+var_20]
push	ecx
fst	[esp+44h+var_18]
add	edi, 0FFFFFFF0h
fst	[esp+44h+var_10]
push	esi
fstp	[esp+48h+var_8]
mov	ecx, edi
call	sub_6E3870
mov	ecx, [ebp+arg_8]
push	esi
call	sub_652C20
test	eax, eax
jz	short loc_6E4DCB
lea	edx, [esp+40h+var_30]
push	edx
push	eax
push	esi
call	sub_6E26E0
fld	[esp+4Ch+var_30]
fadd	[esp+4Ch+var_20]
fstp	[esp+4Ch+var_10]
fld	[esp+4Ch+var_18]
fadd	[esp+4Ch+var_28]
jmp	loc_6E4DC4

loc_6E4E4A:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_0]
push	ecx
push	edx
push	ebx
push	eax
mov	ecx, edi
call	sub_665190
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_6E4B30 endp

align 10h



; int __cdecl sub_6E4E70(double, double)
sub_6E4E70 proc	near

var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= qword ptr  4
arg_8= qword ptr  0Ch

mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
sub	esp, 10h
push	esi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E4E98
push	edi
mov	ecx, eax
call	sub_6E2CD0
mov	esi, eax
jmp	short loc_6E4E9A

loc_6E4E98:
xor	esi, esi

loc_6E4E9A:
fld	[esp+14h+arg_0]
lea	ecx, [esp+14h+var_10]
fstp	[esp+14h+var_10]
push	ecx
fld	[esp+18h+arg_8]
push	edi
mov	ecx, esi
fstp	[esp+1Ch+var_8]
call	sub_6E2380
push	esi
mov	ecx, ebx
call	sub_652700
test	esi, esi
jz	short loc_6E4ECA
mov	ecx, esi
call	sub_64B3B0

loc_6E4ECA:
mov	eax, ebx
pop	esi
add	esp, 10h
retn
sub_6E4E70 endp

align 10h



; int __cdecl sub_6E4EE0(int, int, int,	int, double, double)
sub_6E4EE0 proc	near

var_10=	qword ptr -10h
var_8= qword ptr -8
arg_10=	qword ptr  14h
arg_18=	qword ptr  1Ch

mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
sub	esp, 10h
push	esi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E4F08
push	edi
mov	ecx, eax
call	sub_6E2CD0
mov	esi, eax
jmp	short loc_6E4F0A

loc_6E4F08:
xor	esi, esi

loc_6E4F0A:
fld	[esp+14h+arg_10]
lea	ecx, [esp+14h+var_10]
fstp	[esp+14h+var_10]
push	ecx
fld	[esp+18h+arg_18]
push	edi
mov	ecx, esi
fstp	[esp+1Ch+var_8]
call	sub_6E2380
push	esi
mov	ecx, ebx
call	sub_652700
test	esi, esi
jz	short loc_6E4F3A
mov	ecx, esi
call	sub_64B3B0

loc_6E4F3A:
mov	eax, ebx
pop	esi
add	esp, 10h
retn
sub_6E4EE0 endp

align 10h



; int __cdecl sub_6E4F50(double, double, double, double)
sub_6E4F50 proc	near

var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= qword ptr  4
arg_8= qword ptr  0Ch
arg_10=	qword ptr  14h
arg_18=	qword ptr  1Ch

mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
sub	esp, 10h
push	esi
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E4F78
push	edi
mov	ecx, eax
call	sub_6E2CD0
mov	esi, eax
jmp	short loc_6E4F7A

loc_6E4F78:
xor	esi, esi

loc_6E4F7A:
fld	[esp+14h+arg_10]
lea	ecx, [esp+14h+var_10]
fsub	[esp+14h+arg_0]
push	ecx
push	edi
mov	ecx, esi
fstp	[esp+1Ch+var_10]
fld	[esp+1Ch+arg_18]
fsub	[esp+1Ch+arg_8]
fstp	[esp+1Ch+var_8]
call	sub_6E2380
push	esi
mov	ecx, ebx
call	sub_652700
test	esi, esi
jz	short loc_6E4FB2
mov	ecx, esi
call	sub_64B3B0

loc_6E4FB2:
mov	eax, ebx
pop	esi
add	esp, 10h
retn
sub_6E4F50 endp

align 10h



sub_6E4FC0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	edi
mov	esi, ecx
call	sub_663BE0
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [ebx], offset	off_143C9B0
mov	ecx, [edi+78h]
add	edi, 78h
push	0Fh
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
push	offset unk_167DB38
push	edi
mov	ecx, esi
call	sub_6E3960
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6E4FC0 endp

align 10h


; Attributes: bp-based frame

sub_6E5010 proc	near

var_30=	byte ptr -30h
var_2C=	qword ptr -2Ch
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 34h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_4]
mov	eax, [edi]
mov	esi, [eax]
mov	ebx, ecx
mov	ecx, offset aLeft_0 ; "left"
mov	eax, esi
lea	esp, [esp+0]

loc_6E5030:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E5050
test	dl, dl
jz	short loc_6E504C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E5050
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E5030

loc_6E504C:
xor	eax, eax
jmp	short loc_6E5055

loc_6E5050:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E5055:
test	eax, eax
jnz	short loc_6E509E
mov	edx, [ebp+arg_0]
fldz
lea	ecx, [esp+40h+var_20]
fstp	[esp+40h+var_20]
push	ecx
push	edx
lea	ecx, [ebx-10h]
call	sub_6E3870
fld	[esp+40h+var_20]

loc_6E5074:
fstp	[esp+40h+var_2C]
mov	[esp+40h+var_30], 3
lea	eax, [esp+40h+var_30]

loc_6E5081:
mov	ecx, [ebp+arg_8]
push	eax
call	sub_652520
lea	ecx, [esp+40h+var_30]
call	sub_652830
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6E509E:		; "right"
mov	ecx, offset aRight
mov	eax, esi

loc_6E50A5:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E50C5
test	dl, dl
jz	short loc_6E50C1
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E50C5
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E50A5

loc_6E50C1:
xor	eax, eax
jmp	short loc_6E50CA

loc_6E50C5:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E50CA:
test	eax, eax
jnz	short loc_6E50EB
mov	edx, [ebp+arg_0]
fldz
lea	ecx, [esp+40h+var_20]
fstp	[esp+40h+var_10]
push	ecx
push	edx
lea	ecx, [ebx-10h]
call	sub_6E3870
fld	[esp+40h+var_10]
jmp	short loc_6E5074

loc_6E50EB:		; "top"
mov	ecx, offset aTop_1
mov	eax, esi

loc_6E50F2:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E5112
test	dl, dl
jz	short loc_6E510E
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E5112
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E50F2

loc_6E510E:
xor	eax, eax
jmp	short loc_6E5117

loc_6E5112:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E5117:
test	eax, eax
jnz	short loc_6E513B
mov	edx, [ebp+arg_0]
fldz
lea	ecx, [esp+40h+var_20]
fstp	[esp+40h+var_18]
push	ecx
push	edx
lea	ecx, [ebx-10h]
call	sub_6E3870
fld	[esp+40h+var_18]
jmp	loc_6E5074

loc_6E513B:		; "bottom"
push	offset aBottom
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6E516B
mov	edx, [ebp+arg_0]
fldz
lea	ecx, [esp+40h+var_20]
fstp	[esp+40h+var_8]
push	ecx
push	edx
lea	ecx, [ebx-10h]
call	sub_6E3870
fld	[esp+40h+var_8]
jmp	loc_6E5074

loc_6E516B:		; "topLeft"
push	offset aTopleft
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6E51CF
fldz
mov	edi, [ebp+arg_0]
lea	ecx, [esp+40h+var_20]
fst	[esp+40h+var_20]
push	ecx
fst	[esp+44h+var_18]
fst	[esp+44h+var_10]
push	edi
lea	ecx, [ebx-10h]
fstp	[esp+48h+var_8]
call	sub_6E3870
fld	[esp+40h+var_20]
sub	esp, 20h
mov	eax, esp
fstp	qword ptr [eax]
lea	ebx, [esp+60h+var_30]
fld	[esp+60h+var_18]
fstp	qword ptr [eax+8]
fld	[esp+60h+var_10]
fstp	qword ptr [eax+10h]
fld	[esp+60h+var_8]
fstp	qword ptr [eax+18h]
call	sub_6E4E70
add	esp, 20h
jmp	loc_6E5081

loc_6E51CF:		; "bottomRight"
push	offset aBottomright
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6E5233
fldz
mov	edi, [ebp+arg_0]
lea	edx, [esp+40h+var_20]
fst	[esp+40h+var_20]
fst	[esp+40h+var_18]
push	edx
fst	[esp+44h+var_10]
push	edi
lea	ecx, [ebx-10h]
fstp	[esp+48h+var_8]
call	sub_6E3870
fld	[esp+40h+var_20]
sub	esp, 20h
mov	eax, esp
fstp	qword ptr [eax]
lea	ebx, [esp+60h+var_30]
fld	[esp+60h+var_18]
fstp	qword ptr [eax+8]
fld	[esp+60h+var_10]
fstp	qword ptr [eax+10h]
fld	[esp+60h+var_8]
fstp	qword ptr [eax+18h]
call	sub_6E4EE0
add	esp, 20h
jmp	loc_6E5081

loc_6E5233:		; "size"
push	offset aSize
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6E5297
fldz
mov	edi, [ebp+arg_0]
lea	eax, [esp+40h+var_20]
fst	[esp+40h+var_20]
fst	[esp+40h+var_18]
push	eax
fst	[esp+44h+var_10]
push	edi
lea	ecx, [ebx-10h]
fstp	[esp+48h+var_8]
call	sub_6E3870
fld	[esp+40h+var_20]
sub	esp, 20h
mov	eax, esp
fstp	qword ptr [eax]
lea	ebx, [esp+60h+var_30]
fld	[esp+60h+var_18]
fstp	qword ptr [eax+8]
fld	[esp+60h+var_10]
fstp	qword ptr [eax+10h]
fld	[esp+60h+var_8]
fstp	qword ptr [eax+18h]
call	sub_6E4F50
add	esp, 20h
jmp	loc_6E5081

loc_6E5297:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_0]
push	ecx
push	edi
push	edx
mov	ecx, ebx
call	sub_6E2610
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6E5010 endp




sub_6E52B0 proc	near

var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 40h
push	esi
mov	esi, [esp+44h+arg_0]
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E52DA
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 40h
retn

loc_6E52DA:
mov	eax, [esi+8]
push	ebp
push	edi
test	eax, eax
jz	short loc_6E52E8
lea	ebp, [eax-10h]
jmp	short loc_6E52EA

loc_6E52E8:
xor	ebp, ebp

loc_6E52EA:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E5314
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E4FC0
mov	edi, eax
jmp	short loc_6E5316

loc_6E5314:
xor	edi, edi

loc_6E5316:
mov	eax, [esi+18h]
lea	edx, [esp+4Ch+var_40]
push	edx
add	eax, 78h
push	eax
mov	ecx, ebp
mov	[esp+54h+var_40], 0
mov	[esp+54h+var_30], 0
mov	[esp+54h+var_20], 0
mov	[esp+54h+var_10], 0
call	sub_6E3810
mov	edx, [esi+18h]
lea	ecx, [esp+4Ch+var_40]
push	ecx
add	edx, 78h
push	edx
mov	ecx, edi
call	sub_6E3960
mov	ecx, [esi+4]
push	edi
call	sub_652E40
lea	esi, [esp+4Ch]
mov	ebp, 3

loc_6E5362:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	ebp, 1
jns	short loc_6E5362
test	edi, edi
jz	short loc_6E537C
mov	ecx, edi
call	sub_64B3B0

loc_6E537C:
pop	edi
pop	ebp
pop	esi
add	esp, 40h
retn
sub_6E52B0 endp

align 10h


; Attributes: bp-based frame

sub_6E5390 proc	near

var_40=	qword ptr -40h
var_38=	qword ptr -38h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 44h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
xor	bl, bl
cmp	dword ptr [esi+1Ch], 0
push	edi
jle	loc_6E54A4
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E54A4
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 11h
jnz	loc_6E54A4
push	eax
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E5400
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6E5400:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E540C
lea	ecx, [eax-10h]
jmp	short loc_6E540E

loc_6E540C:
xor	ecx, ecx

loc_6E540E:
fldz
mov	edx, [edi+8]
inc	edx
fst	[esp+50h+var_20]
fst	[esp+50h+var_18]
and	edx, 8FFFFFFFh
fst	[esp+50h+var_10]
lea	eax, [esp+50h+var_20]
fst	[esp+50h+var_8]
mov	[edi+8], edx
mov	edx, [esi+18h]
fst	[esp+50h+var_40]
push	eax
fst	[esp+54h+var_38]
fst	[esp+54h+var_30]
push	edx
fstp	[esp+58h+var_28]
call	sub_6E3870
mov	ecx, [esi+18h]
lea	eax, [esp+50h+var_40]
push	eax
push	ecx
mov	ecx, edi
call	sub_6E3870
fld	[esp+50h+var_40]
fcomp	[esp+50h+var_20]
fnstsw	ax
test	ah, 44h
jp	short loc_6E549B
fld	[esp+50h+var_30]
fcomp	[esp+50h+var_10]
fnstsw	ax
test	ah, 44h
jp	short loc_6E549B
fld	[esp+50h+var_38]
fcomp	[esp+50h+var_18]
fnstsw	ax
test	ah, 44h
jp	short loc_6E549B
fld	[esp+50h+var_28]
fcomp	[esp+50h+var_8]
fnstsw	ax
test	ah, 44h
jp	short loc_6E549B
mov	bl, 1
jmp	short loc_6E549D

loc_6E549B:
xor	bl, bl

loc_6E549D:
mov	ecx, edi
call	sub_64B3B0

loc_6E54A4:
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6E5390 endp

align 10h


; Attributes: bp-based frame

sub_6E54C0 proc	near

var_98=	qword ptr -98h
var_90=	qword ptr -90h
var_88=	qword ptr -88h
var_80=	qword ptr -80h
var_78=	qword ptr -78h
var_70=	qword ptr -70h
var_68=	qword ptr -68h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 9Ch
fldz
push	ebx
push	esi
fst	[esp+0A4h+var_98]
mov	esi, [ebp+arg_0]
fst	[esp+0A4h+var_90]
push	edi
fst	[esp+0A8h+var_88]
push	11h
fstp	[esp+0ACh+var_80]
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E5508
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6E5508:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E5514
lea	ebx, [eax-10h]
jmp	short loc_6E5516

loc_6E5514:
xor	ebx, ebx

loc_6E5516:
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E56E0
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E56E0
fldz
push	offset sub_4E4600
push	4
fst	[esp+0B0h+var_78]
push	10h
fst	[esp+0B4h+var_70]
lea	ecx, [esp+0B4h+var_40]
fst	[esp+0B4h+var_68]
push	ecx
fstp	[esp+0B8h+var_60]
call	sub_4078B0
mov	eax, [esi+18h]
lea	edx, [esp+0A8h+var_78]
push	edx
push	eax
mov	ecx, ebx
call	sub_6E3870
mov	ecx, [esi+18h]
lea	eax, [esp+0A8h+var_40]
mov	edx, edi
call	sub_6E37B0
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0ACh+var_20]
call	sub_653400
fstp	[esp+0A8h+var_50]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0ACh+var_10]
call	sub_653400
fstp	[esp+0A8h+var_48]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+0ACh+var_40]
call	sub_653400
fstp	[esp+0A8h+var_58]
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0ACh+var_30]
call	sub_653400
fld	[esp+0A8h+var_50]
fld	[esp+0A8h+var_58]
fadd	st(1), st
fld	[esp+0A8h+var_48]
fadd	st, st(3)
fld	[esp+0A8h+var_60]
fcom	st(4)
fnstsw	ax
test	ah, 1
jnz	loc_6E566F
fld	[esp+0A8h+var_70]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jp	short loc_6E566F
fld	[esp+0A8h+var_78]
fcom	st(4)
fnstsw	ax
test	ah, 41h
jp	short loc_6E5679
fld	[esp+0A8h+var_68]
fcom	st(4)
fnstsw	ax
test	ah, 1
jnz	short loc_6E5685
fxch	st(1)
fcom	st(4)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E561E
fstp	st(4)
jmp	short loc_6E5620

loc_6E561E:
fstp	st

loc_6E5620:
fxch	st(3)
fstp	[esp+0A8h+var_98]
fxch	st(2)
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E5635
fstp	st
jmp	short loc_6E5637

loc_6E5635:
fstp	st(3)

loc_6E5637:
fxch	st(2)
fstp	[esp+0A8h+var_88]
fld	[esp+0A8h+var_70]
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E564E
fstp	st(3)
jmp	short loc_6E5650

loc_6E564E:
fstp	st

loc_6E5650:
fxch	st(2)
fstp	[esp+0A8h+var_90]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6E5667
fstp	st(1)
fstp	[esp+0A8h+var_80]
jmp	short loc_6E5693

loc_6E5667:
fstp	st
fstp	[esp+0A8h+var_80]
jmp	short loc_6E5693

loc_6E566F:
fstp	st(4)
fstp	st(1)
fstp	st(1)
fstp	st
jmp	short loc_6E5691

loc_6E5679:
fstp	st(5)
fstp	st(2)
fstp	st(2)
fstp	st(2)
fstp	st
jmp	short loc_6E5691

loc_6E5685:
fstp	st(6)
fstp	st(3)
fstp	st(3)
fstp	st(1)
fstp	st(2)
fstp	st(1)

loc_6E5691:
fstp	st

loc_6E5693:
fld	[esp+0A8h+var_88]
fsub	[esp+0A8h+var_98]
fldz
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_6E56B9
fld	[esp+0A8h+var_80]
fsub	[esp+0A8h+var_90]
fucomp	st(1)
fnstsw	ax
test	ah, 44h
jp	short loc_6E56CB

loc_6E56B9:
fst	[esp+0A8h+var_98]
fst	[esp+0A8h+var_90]
fst	[esp+0A8h+var_88]
fstp	[esp+0A8h+var_80]
jmp	short loc_6E56CD

loc_6E56CB:
fstp	st

loc_6E56CD:
push	offset sub_652830
push	4
push	10h
lea	edx, [esp+0B4h+var_40]
push	edx
call	sub_40F3E0

loc_6E56E0:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E570A
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E4FC0
mov	edi, eax
jmp	short loc_6E570C

loc_6E570A:
xor	edi, edi

loc_6E570C:
mov	eax, [esi+18h]
lea	edx, [esp+0A4h+var_98+4]
push	edx
push	eax
mov	ecx, edi
call	sub_6E39C0
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6E5730
mov	ecx, edi
call	sub_64B3B0

loc_6E5730:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6E54C0 endp

align 10h


; Attributes: bp-based frame

sub_6E5740 proc	near

var_C8=	qword ptr -0C8h
var_98=	qword ptr -98h
var_90=	qword ptr -90h
var_88=	qword ptr -88h
var_80=	qword ptr -80h
var_78=	qword ptr -78h
var_70=	qword ptr -70h
var_68=	qword ptr -68h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	qword ptr -48h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 0B4h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
push	11h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E5776
push	0
push	0
push	offset aRectangle ; "Rectangle"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_6E5776:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6E5786
add	eax, 0FFFFFFF0h
mov	dword ptr [esp+0C0h+var_98], eax
jmp	short loc_6E578E

loc_6E5786:
mov	dword ptr [esp+0C0h+var_98], 0

loc_6E578E:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E57B8
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E4FC0
mov	ebx, eax
jmp	short loc_6E57BA

loc_6E57B8:
xor	ebx, ebx

loc_6E57BA:
mov	ecx, [esi+4]
push	ebx
call	sub_652E40
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E5990
call	sub_6794F0
fstp	[esp+0C0h+var_90]
call	sub_6794F0
fstp	[esp+0C0h+var_88]
call	sub_6794F0
fstp	[esp+0C0h+var_80]
call	sub_6794F0
fstp	[esp+0C0h+var_78]
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E597E
fldz
push	offset sub_4E4600
push	4
fst	[esp+0C8h+var_70]
push	10h
fst	[esp+0CCh+var_68]
lea	eax, [esp+0CCh+var_40]
fst	[esp+0CCh+var_60]
push	eax
fstp	[esp+0D0h+var_58]
call	sub_4078B0
mov	edx, [esi+18h]
lea	ecx, [esp+0C0h+var_70]
push	ecx
mov	ecx, dword ptr [esp+0C4h+var_98]
push	edx
call	sub_6E3870
mov	ecx, [esi+18h]
lea	eax, [esp+0C0h+var_40]
mov	edx, edi
call	sub_6E37B0
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+0C4h+var_20]
call	sub_653400
fstp	[esp+0C0h+var_50]
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0C4h+var_10]
call	sub_653400
fstp	[esp+0C0h+var_48]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0C4h+var_40]
call	sub_653400
fstp	[esp+0C0h+var_98]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+0C4h+var_30]
call	sub_653400
fld	[esp+0C0h+var_50]
fld	[esp+0C0h+var_98]
fadd	st(1), st
fld	[esp+0C0h+var_48]
fadd	st, st(3)
fld	[esp+0C0h+var_70]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E58C7
fstp	st
jmp	short loc_6E58C9

loc_6E58C7:
fstp	st(2)

loc_6E58C9:
fxch	st(1)
fstp	[esp+0C0h+var_90]
fld	[esp+0C0h+var_60]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E58E0
fstp	st(2)
jmp	short loc_6E58E2

loc_6E58E0:
fstp	st

loc_6E58E2:
fxch	st(1)
fstp	[esp+0C0h+var_80]
fld	[esp+0C0h+var_68]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E58F9
fstp	st
jmp	short loc_6E58FB

loc_6E58F9:
fstp	st(2)

loc_6E58FB:
fxch	st(1)
fstp	[esp+0C0h+var_88]
fld	[esp+0C0h+var_58]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6E5912
fstp	st(1)
jmp	short loc_6E5914

loc_6E5912:
fstp	st

loc_6E5914:
mov	ecx, [esi+18h]
fstp	[esp+0C0h+var_78]
push	ecx
lea	ecx, [esp+0C4h+var_40]
call	sub_653400
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jz	short loc_6E5940
call	sub_6794F0
fstp	[esp+0C0h+var_90]

loc_6E5940:
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0C4h+var_30]
call	sub_653400
sub	esp, 8
fstp	[esp+0C8h+var_C8]
call	sub_64A5D0
test	al, al
jz	short loc_6E5968
call	sub_6794F0
fstp	[esp+0C0h+var_88]

loc_6E5968:
push	offset sub_652830
push	4
push	10h
lea	eax, [esp+0CCh+var_40]
push	eax
call	sub_40F3E0

loc_6E597E:
mov	edx, [esi+18h]
lea	ecx, [esp+0C0h+var_90]
push	ecx
push	edx
mov	ecx, ebx
call	sub_6E39C0
jmp	short loc_6E59A3

loc_6E5990:
mov	eax, [esi+18h]
push	offset byte_18564B0
add	eax, 78h
push	eax
mov	ecx, ebx
call	sub_6E3960

loc_6E59A3:
test	ebx, ebx
jz	short loc_6E59AE
mov	ecx, ebx
call	sub_64B3B0

loc_6E59AE:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_6E5740 endp

align 10h



sub_6E59C0 proc	near

var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 40h
push	ebx
push	ebp
push	esi
mov	esi, [esp+4Ch+arg_0]
xor	ebx, ebx
cmp	[esi+8], ebx
jz	short loc_6E5A0B
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 11h
jnz	short loc_6E5A0B
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_6E5A0B
mov	eax, [esi+8]
cmp	eax, ebx
jz	short loc_6E5A32
add	eax, 0FFFFFFF0h
cmp	eax, ebx
jz	short loc_6E5A34
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx
jmp	short loc_6E5A34

loc_6E5A0B:
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	34h
call	eax
cmp	eax, ebx
jz	short loc_6E5A32
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_6E4FC0
jmp	short loc_6E5A34

loc_6E5A32:
xor	eax, eax

loc_6E5A34:
mov	ecx, [esi+4]
mov	ebp, eax
push	ebp
call	sub_652E40
cmp	[esi+1Ch], ebx
jle	loc_6E5AE0
push	edi
push	ebx
mov	ecx, esi
mov	[esp+54h+var_40], bl
mov	[esp+54h+var_30], bl
mov	[esp+54h+var_20], bl
mov	[esp+54h+var_10], bl
call	sub_651EC0
push	eax
lea	ecx, [esp+54h+var_40]
call	sub_652520
cmp	dword ptr [esi+1Ch], 1
mov	edi, 3
jle	short loc_6E5AB9
push	1
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+54h+var_30]
call	sub_652520
cmp	dword ptr [esi+1Ch], 2
jle	short loc_6E5AB9
push	2
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+54h+var_20]
call	sub_652520
cmp	[esi+1Ch], edi
jle	short loc_6E5AB9
push	edi
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+54h+var_10]
call	sub_652520

loc_6E5AB9:
mov	eax, [esi+18h]
lea	edx, [esp+50h+var_40]
push	edx
add	eax, 78h
push	eax
mov	ecx, ebp
call	sub_6E3960
lea	esi, [esp+50h]

loc_6E5AD0:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6E5AD0
pop	edi

loc_6E5AE0:
pop	esi
cmp	ebp, ebx
jz	short loc_6E5AF1
mov	ecx, ebp
pop	ebp
pop	ebx
add	esp, 40h
jmp	sub_64B3B0

loc_6E5AF1:
pop	ebp
pop	ebx
add	esp, 40h
retn
sub_6E59C0 endp

align 10h



sub_6E5B00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_6E5B29
push	esi
mov	ecx, eax
call	sub_6E4FC0
pop	esi
retn	4

loc_6E5B29:
xor	eax, eax
pop	esi
retn	4
sub_6E5B00 endp

align 10h



sub_6E5B30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143C9B0
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143C95C
mov	dword ptr [edi], offset	off_143C908
mov	dword ptr [ecx], offset	off_143C900
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6E5B30 endp

align 10h



sub_6E5BB0 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	ebp, ecx
mov	ecx, [esp+20h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebp
call	sub_6E5B30
lea	edx, [esp+20h+arg_8]
push	edx
push	offset off_143C880
push	esi
lea	ecx, [ebp+34h]
lea	edi, [ebp+10h]
push	ebp
mov	dword ptr [ebp+0], offset off_143C95C
mov	dword ptr [edi], offset	off_143C908
mov	dword ptr [ecx], offset	off_143C900
mov	byte ptr [esp+30h+arg_8], 6
call	sub_663110
mov	eax, [esi]
push	0
push	4
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [eax+280h]
push	offset aLeft_0	; "left"
call	sub_650E40
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	[esp+24h+arg_4], eax
mov	ebx, 1
add	[eax+8], ebx
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E5C5F
call	sub_650DF0

loc_6E5C5F:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	ecx, [esi]
push	0
push	3
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [ecx+280h]
push	offset aTop_1	; "top"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebx
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E5CC4
call	sub_650DF0

loc_6E5CC4:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	edx, [esi]
push	0
push	5
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [edx+280h]
push	offset aRight	; "right"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebx
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
lea	edx, [esp+28h+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E5D29
call	sub_650DF0

loc_6E5D29:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	eax, [esi]
push	0
push	6
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [eax+280h]
push	offset aBottom	; "bottom"
call	sub_650E40
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	[esp+24h+arg_4], eax
add	[eax+8], ebx
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E5D8E
call	sub_650DF0

loc_6E5D8E:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	ecx, [esi]
push	0
push	7
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [ecx+280h]
push	offset aTopleft	; "topLeft"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebx
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E5DF3
call	sub_650DF0

loc_6E5DF3:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	edx, [esi]
push	0
push	0Bh
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [edx+280h]
push	offset aBottomright ; "bottomRight"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebx
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
lea	edx, [esp+28h+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E5E58
call	sub_650DF0

loc_6E5E58:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	eax, [esi]
push	0
push	4
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [eax+280h]
push	offset aSize	; "size"
call	sub_650E40
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	[esp+24h+arg_4], eax
add	[eax+8], ebx
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E5EBD
call	sub_650DF0

loc_6E5EBD:
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_6E5BB0 endp

align 10h



sub_6E5EE0 proc	near

arg_0= byte ptr	 4

sub	ecx, 34h
jmp	sub_6E3720
sub_6E5EE0 endp

align 10h



sub_6E5EF0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6E5F3C
push	offset sub_6E59C0
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143CA08
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6E5F3E

loc_6E5F3C:
xor	eax, eax

loc_6E5F3E:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	54h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E6016
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6E5BB0
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E5F94
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E5F94:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 0Fh
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E5FC2
call	sub_64B3B0

loc_6E5FC2:
mov	edx, [esi+298h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+44h]
push	ecx
mov	ecx, [esi+298h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E600D
mov	ecx, ebp
call	sub_64B3B0

loc_6E600D:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E6016:
xor	ebp, ebp
jmp	loc_6E5F94
sub_6E5EF0 endp

align 10h



sub_6E6020 proc	near

var_40=	byte ptr -40h
var_3C=	qword ptr -3Ch
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 40h
push	ebp
mov	ebp, [esp+44h+arg_4]
mov	eax, [ebp+0]
push	esi
mov	esi, [eax]
push	edi
mov	edi, ecx
mov	ecx, offset aRedmultiplier ; "redMultiplier"
mov	eax, esi

loc_6E6038:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E6058
test	dl, dl
jz	short loc_6E6054
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E6058
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E6038

loc_6E6054:
xor	eax, eax
jmp	short loc_6E605D

loc_6E6058:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E605D:
test	eax, eax
jnz	short loc_6E608F
fld	dword ptr [edi+24h]

loc_6E6064:
lea	ecx, [esp+4Ch+var_40]
push	ecx

loc_6E6069:
mov	ecx, [esp+50h+arg_8]
fstp	[esp+50h+var_3C]
mov	[esp+50h+var_40], 3
call	sub_652520
lea	ecx, [esp+4Ch+var_40]
call	sub_652830
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 40h
retn	0Ch

loc_6E608F:		; "greenMultiplier"
mov	ecx, offset aGreenmultiplie
mov	eax, esi

loc_6E6096:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E60B6
test	dl, dl
jz	short loc_6E60B2
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E60B6
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E6096

loc_6E60B2:
xor	eax, eax
jmp	short loc_6E60BB

loc_6E60B6:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E60BB:
test	eax, eax
jnz	short loc_6E60C9
fld	dword ptr [edi+2Ch]
lea	edx, [esp+4Ch+var_40]
push	edx
jmp	short loc_6E6069

loc_6E60C9:		; "blueMultiplier"
mov	ecx, offset aBluemultiplier
mov	eax, esi

loc_6E60D0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E60F0
test	dl, dl
jz	short loc_6E60EC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E60F0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E60D0

loc_6E60EC:
xor	eax, eax
jmp	short loc_6E60F5

loc_6E60F0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E60F5:
test	eax, eax
jnz	short loc_6E6106
fld	dword ptr [edi+34h]
lea	eax, [esp+4Ch+var_40]
push	eax
jmp	loc_6E6069

loc_6E6106:		; "alphaMultiplier"
push	offset aAlphamultiplie
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E611E
fld	dword ptr [edi+3Ch]
jmp	loc_6E6064

loc_6E611E:		; "redOffset"
push	offset aRedoffset
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E613B
fld	dword ptr [edi+28h]
lea	edx, [esp+4Ch+var_40]
push	edx
jmp	loc_6E6069

loc_6E613B:		; "greenOffset"
push	offset aGreenoffset
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E6158
fld	dword ptr [edi+30h]
lea	eax, [esp+4Ch+var_40]
push	eax
jmp	loc_6E6069

loc_6E6158:		; "blueOffset"
push	offset aBlueoffset
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E6170
fld	dword ptr [edi+38h]
jmp	loc_6E6064

loc_6E6170:		; "alphaOffset"
push	offset aAlphaoffset
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E618D
fld	dword ptr [edi+40h]
lea	edx, [esp+4Ch+var_40]
push	edx
jmp	loc_6E6069

loc_6E618D:
push	offset unk_143CA64
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	loc_6E628C
fld	dword ptr [edi+28h]
mov	[esp+4Ch+var_10], 0
fnstcw	word ptr [esp+4Ch+arg_4]
mov	[esp+4Ch+var_20], 0
movzx	eax, word ptr [esp+4Ch+arg_4]
or	eax, 0C00h
mov	[esp+4Ch+arg_0], eax
mov	[esp+4Ch+var_30], 0
mov	[esp+4Ch+var_40], 3
fldcw	word ptr [esp+4Ch+arg_0]
fistp	[esp+4Ch+arg_0]
mov	al, byte ptr [esp+4Ch+arg_0]
movzx	ecx, al
shl	ecx, 8
fldcw	word ptr [esp+4Ch+arg_4]
fld	dword ptr [edi+30h]
fnstcw	word ptr [esp+4Ch+arg_4]
movzx	eax, word ptr [esp+4Ch+arg_4]
or	eax, 0C00h
mov	[esp+4Ch+arg_0], eax
fldcw	word ptr [esp+4Ch+arg_0]
fistp	[esp+4Ch+arg_0]
movzx	edx, byte ptr [esp+4Ch+arg_0]
movzx	eax, dl
fldcw	word ptr [esp+4Ch+arg_4]
or	ecx, eax
shl	ecx, 8
fld	dword ptr [edi+38h]
fnstcw	word ptr [esp+4Ch+arg_4]
movzx	eax, word ptr [esp+4Ch+arg_4]
or	eax, 0C00h
mov	[esp+4Ch+arg_0], eax
fldcw	word ptr [esp+4Ch+arg_0]
fistp	[esp+4Ch+arg_0]
movzx	edx, byte ptr [esp+4Ch+arg_0]
movzx	eax, dl
fldcw	word ptr [esp+4Ch+arg_4]
or	ecx, eax
mov	[esp+4Ch+arg_4], ecx
fild	[esp+4Ch+arg_4]
test	ecx, ecx
jge	short loc_6E624B
fadd	ds:dbl_15FCE08

loc_6E624B:
lea	ecx, [esp+4Ch+var_40]
fstp	[esp+4Ch+var_3C]
push	ecx
mov	ecx, [esp+50h+arg_8]
call	sub_652520
lea	ecx, [esp+4Ch+var_40]
call	sub_652830
lea	ecx, [esp+4Ch+var_30]
call	sub_652830
lea	ecx, [esp+4Ch+var_20]
call	sub_652830
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 40h
retn	0Ch

loc_6E628C:
mov	edx, [esp+4Ch+arg_8]
mov	eax, [esp+4Ch+arg_0]
push	edx
push	ebp
push	eax
mov	ecx, edi
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
add	esp, 40h
retn	0Ch
sub_6E6020 endp

align 10h



sub_6E62B0 proc	near

var_24=	qword ptr -24h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_4]
mov	eax, [ebx]
push	esi
mov	esi, [eax]
push	edi
mov	edi, ecx
mov	[esp+18h+var_C], edi
mov	ecx, offset aRedmultiplier ; "redMultiplier"
mov	eax, esi
jmp	short loc_6E62D0
align 10h

loc_6E62D0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E62F0
test	dl, dl
jz	short loc_6E62EC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E62F0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E62D0

loc_6E62EC:
xor	eax, eax
jmp	short loc_6E62F5

loc_6E62F0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E62F5:
test	eax, eax
jnz	short loc_6E6315
mov	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, [esp+1Ch+arg_8]
call	sub_653400
fstp	dword ptr [edi+24h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E6315:		; "greenMultiplier"
mov	ecx, offset aGreenmultiplie
mov	eax, esi
lea	esp, [esp+0]

loc_6E6320:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E6340
test	dl, dl
jz	short loc_6E633C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E6340
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E6320

loc_6E633C:
xor	eax, eax
jmp	short loc_6E6345

loc_6E6340:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E6345:
test	eax, eax
jnz	short loc_6E6365
mov	edx, [esp+18h+arg_0]
mov	ecx, [esp+18h+arg_8]
push	edx
call	sub_653400
fstp	dword ptr [edi+2Ch]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E6365:		; "blueMultiplier"
mov	ecx, offset aBluemultiplier
mov	eax, esi
lea	esp, [esp+0]

loc_6E6370:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E6390
test	dl, dl
jz	short loc_6E638C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E6390
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6E6370

loc_6E638C:
xor	eax, eax
jmp	short loc_6E6395

loc_6E6390:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E6395:
test	eax, eax
jnz	short loc_6E63B5
mov	eax, [esp+18h+arg_0]
mov	ecx, [esp+18h+arg_8]
push	eax
call	sub_653400
fstp	dword ptr [edi+34h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E63B5:		; "alphaMultiplier"
push	offset aAlphamultiplie
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E63E1
mov	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, [esp+1Ch+arg_8]
call	sub_653400
fstp	dword ptr [edi+3Ch]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E63E1:		; "redOffset"
push	offset aRedoffset
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E640D
mov	edx, [esp+18h+arg_0]
mov	ecx, [esp+18h+arg_8]
push	edx
call	sub_653400
fstp	dword ptr [edi+28h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E640D:		; "greenOffset"
push	offset aGreenoffset
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E6439
mov	eax, [esp+18h+arg_0]
mov	ecx, [esp+18h+arg_8]
push	eax
call	sub_653400
fstp	dword ptr [edi+30h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E6439:		; "blueOffset"
push	offset aBlueoffset
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E6465
mov	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, [esp+1Ch+arg_8]
call	sub_653400
fstp	dword ptr [edi+38h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E6465:		; "alphaOffset"
push	offset aAlphaoffset
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6E6491
mov	edx, [esp+18h+arg_0]
mov	ecx, [esp+18h+arg_8]
push	edx
call	sub_653400
fstp	dword ptr [edi+40h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E6491:
push	offset unk_143CA64
mov	ecx, ebx
call	sub_67DA70
mov	ecx, [esp+18h+arg_8]
test	al, al
jz	loc_6E6568
fldz
push	ebp
mov	ebp, [esp+1Ch+arg_0]
fst	dword ptr [edi+24h]
fst	dword ptr [edi+2Ch]
push	ebp
fstp	dword ptr [edi+34h]
xor	esi, esi
xor	edi, edi
xor	ebx, ebx
call	sub_653400
sub	esp, 8
fstp	[esp+24h+var_24]
call	sub_64A5D0
test	al, al
jnz	short loc_6E6519
mov	ecx, [esp+1Ch+arg_8]
push	ebp
call	sub_653400
fnstcw	word ptr [esp+1Ch+arg_8]
movzx	eax, word ptr [esp+1Ch+arg_8]
or	eax, 0C00h
mov	[esp+1Ch+arg_0], eax
fldcw	word ptr [esp+1Ch+arg_0]
fistp	[esp+1Ch+var_8]
mov	eax, dword ptr [esp+1Ch+var_8]
mov	esi, eax
shr	esi, 10h
fldcw	word ptr [esp+1Ch+arg_8]
mov	edi, eax
shr	edi, 8
and	esi, 0FFh
and	edi, 0FFh
movzx	ebx, al

loc_6E6519:
mov	[esp+1Ch+arg_8], esi
fild	[esp+1Ch+arg_8]
test	esi, esi
jge	short loc_6E652B
fadd	ds:flt_15FCC08

loc_6E652B:
mov	eax, [esp+1Ch+var_C]
mov	[esp+1Ch+arg_8], edi
fstp	dword ptr [eax+28h]
fild	[esp+1Ch+arg_8]
test	edi, edi
jge	short loc_6E6544
fadd	ds:flt_15FCC08

loc_6E6544:
mov	[esp+1Ch+arg_8], ebx
fstp	dword ptr [eax+30h]
fild	[esp+1Ch+arg_8]
test	ebx, ebx
jge	short loc_6E6559
fadd	ds:flt_15FCC08

loc_6E6559:
pop	ebp
fstp	dword ptr [eax+38h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	10h

loc_6E6568:
mov	eax, [esp+18h+arg_C]
mov	edx, [esp+18h+arg_0]
push	eax
push	ecx
push	ebx
push	edx
mov	ecx, edi
call	sub_665190
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	10h
sub_6E62B0 endp

align 10h



sub_6E6590 proc	near
mov	eax, 12h
retn
sub_6E6590 endp

align 10h



sub_6E65A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6E65C3
cmp	[esi], ecx
jmp	short loc_6E65D8

loc_6E65C3:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6E65CE
call	sub_651580

loc_6E65CE:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6E65D8:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6E6627
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6E65F6
cmp	[esi], ecx
jmp	short loc_6E660B

loc_6E65F6:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6E6601
call	sub_651580

loc_6E6601:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6E660B:
setz	al
test	al, al
jnz	short loc_6E6627
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6E6627:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+44h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6E65A0 endp

align 10h



sub_6E6650 proc	near
add	ecx, 44h
jmp	sub_665AD0
sub_6E6650 endp

align 10h



sub_6E6660 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6E666D
mov	al, 1
retn	8

loc_6E666D:
mov	[esp+arg_4], eax
add	ecx, 54h
jmp	loc_663310
sub_6E6660 endp

align 10h



sub_6E6680 proc	near

arg_0= byte ptr	 4

sub	ecx, 54h
jmp	sub_6E7480
sub_6E6680 endp

align 10h



sub_6E6690 proc	near

var_48=	byte ptr -48h
var_44=	qword ptr -44h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 48h
push	esi
mov	esi, [esp+4Ch+arg_0]
push	12h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E66BA
push	0
push	0
push	offset aColortransfo_0 ; "ColorTransform"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 48h
retn

loc_6E66BA:
mov	eax, [esi+8]
push	ebx
push	edi
test	eax, eax
jz	short loc_6E66C8
lea	edi, [eax-10h]
jmp	short loc_6E66CA

loc_6E66C8:
xor	edi, edi

loc_6E66CA:
mov	eax, [esi+18h]
fld	dword ptr [edi+34h]
push	0
fstp	[esp+58h+var_44]
push	6
push	eax
lea	ecx, [esp+60h+var_20]
push	ecx
mov	bl, 3
lea	ecx, [esp+64h+var_48]
mov	[esp+64h+var_48], bl
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
fld	dword ptr [edi+3Ch]
mov	edx, [esi+18h]
fstp	[esp+54h+var_44]
push	0
push	6
push	edx
lea	eax, [esp+60h+var_1C]
push	eax
lea	ecx, [esp+64h+var_48]
mov	[esp+64h+var_48], bl
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
fld	dword ptr [edi+44h]
mov	ecx, [esi+18h]
fstp	[esp+54h+var_44]
push	0
push	6
push	ecx
lea	edx, [esp+60h+var_18]
push	edx
lea	ecx, [esp+64h+var_48]
mov	[esp+64h+var_48], bl
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
fld	dword ptr [edi+4Ch]
mov	eax, [esi+18h]
fstp	[esp+54h+var_44]
push	0
push	6
push	eax
lea	ecx, [esp+60h+var_14]
push	ecx
lea	ecx, [esp+64h+var_48]
mov	[esp+64h+var_48], bl
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
fld	dword ptr [edi+38h]
mov	edx, [esi+18h]
fstp	[esp+54h+var_44]
push	0
push	6
push	edx
lea	eax, [esp+60h+var_10]
push	eax
lea	ecx, [esp+64h+var_48]
mov	[esp+64h+var_48], bl
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
fld	dword ptr [edi+40h]
mov	ecx, [esi+18h]
fstp	[esp+54h+var_44]
push	0
push	6
push	ecx
lea	edx, [esp+60h+var_C]
push	edx
lea	ecx, [esp+64h+var_48]
mov	[esp+64h+var_48], bl
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
fld	dword ptr [edi+48h]
mov	[esp+54h+var_48], bl
mov	eax, [esi+18h]
fstp	[esp+54h+var_44]
push	0
push	6
push	eax
lea	ecx, [esp+60h+var_8]
push	ecx
lea	ecx, [esp+64h+var_48]
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
fld	dword ptr [edi+50h]
mov	edx, [esi+18h]
fstp	[esp+54h+var_44]
push	0
push	6
push	edx
lea	eax, [esp+60h+var_4]
push	eax
lea	ecx, [esp+64h+var_48]
mov	[esp+64h+var_48], bl
call	sub_652F60
lea	ecx, [esp+54h+var_48]
call	sub_652830
mov	ecx, dword_1855FC0
push	ecx
lea	ecx, [esp+58h+var_38]
call	sub_679B40
push	0FFFFFFFFh
push	offset aRedmultiplie_0 ; "(redMultiplier="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	edx, [esp+54h+var_20]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset aGreenmultipl_0 ; ", greenMultiplier="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	ecx, [esp+54h+var_1C]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset aBluemultipli_0 ; ", blueMultiplier="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	eax, [esp+54h+var_18]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset aAlphamultipl_0 ; ", alphaMultiplier="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	edx, [esp+54h+var_14]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset aRedoffset_0 ; ", redOffset="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	ecx, [esp+54h+var_10]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset aGreenoffset_0 ;	", greenOffset="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	eax, [esp+54h+var_C]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset aBlueoffset_0 ; ", blueOffset="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	edx, [esp+54h+var_8]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset aAlphaoffset_0 ;	", alphaOffset="
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	ecx, [esp+54h+var_4]
mov	edx, [ecx]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_15A0580 ; ")"
lea	ecx, [esp+5Ch+var_38]
call	sub_679D10
mov	eax, [esp+54h+var_38]
test	eax, eax
jnz	short loc_6E6959
mov	eax, offset byte_146D660

loc_6E6959:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
mov	edx, [esp+54h+var_34]
push	edx
push	eax
call	sub_650F20
mov	edi, eax
mov	ebx, 1
add	[edi+8], ebx
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6E6989
mov	ecx, esi
call	sub_652060

loc_6E6989:
mov	byte ptr [esi],	5
mov	[esi+4], edi
add	[edi+8], ebx
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_6E699F
mov	ecx, edi
call	sub_650DF0

loc_6E699F:
lea	ecx, [esp+54h+var_38]
call	sub_679B60
lea	esi, [esp+54h]
mov	edi, 7

loc_6E69B1:
mov	ecx, [esi-4]
sub	esi, 4
add	dword ptr [ecx+8], 0FFFFFFFFh
jnz	short loc_6E69C2
call	sub_650DF0

loc_6E69C2:
sub	edi, ebx
jns	short loc_6E69B1
pop	edi
pop	ebx
pop	esi
add	esp, 48h
retn
sub_6E6690 endp

align 10h



sub_6E69D0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+70h]
test	eax, eax
jz	short loc_6E69FB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+70h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6E69FB:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6E69D0 endp

align 10h



sub_6E6A10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
push	ebx
push	offset aRedmultiplier ;	"redMultiplier"
add	esi, 78h
add	edi, 10h
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	eax, [ebx+10h]
push	eax
push	offset aGreenmultiplie ; "greenMultiplier"
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	ecx, [ebx+20h]
push	ecx
push	offset aBluemultiplier ; "blueMultiplier"
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	edx, [ebx+30h]
push	edx
push	offset aAlphamultiplie ; "alphaMultiplier"
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	eax, [ebx+40h]
push	eax
push	offset aRedoffset ; "redOffset"
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	ecx, [ebx+50h]
push	ecx
push	offset aGreenoffset ; "greenOffset"
push	esi
mov	ecx, edi
call	sub_64AEF0
lea	edx, [ebx+60h]
push	edx
push	offset aBlueoffset ; "blueOffset"
push	esi
mov	ecx, edi
call	sub_64AEF0
add	ebx, 70h
push	ebx
push	offset aAlphaoffset ; "alphaOffset"
push	esi
mov	ecx, edi
call	sub_64AEF0
pop	edi
pop	esi
pop	ebx
retn
sub_6E6A10 endp

align 10h



sub_6E6AB0 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_70=	byte ptr -70h
var_60=	byte ptr -60h
var_50=	byte ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 0A0h
push	esi
mov	esi, [esp+0A4h+arg_0]
cmp	dword ptr [esi+1Ch], 0
jle	loc_6E6C23
mov	eax, [esi+18h]
push	edi
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_6E6C22
push	12h
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_6E6B0D
push	0
push	0
push	offset aColortransfo_0 ; "ColorTransform"
mov	ecx, esi
call	sub_651C60
pop	edi
pop	esi
add	esp, 0A0h
retn

loc_6E6B0D:
mov	eax, [esi+8]
push	ebx
test	eax, eax
jz	short loc_6E6B1A
lea	ebx, [eax-10h]
jmp	short loc_6E6B1C

loc_6E6B1A:
xor	ebx, ebx

loc_6E6B1C:
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 12h
jnz	short loc_6E6B42
add	edi, 34h
push	edi
lea	ecx, [ebx+34h]
call	sub_68CE70
pop	ebx
pop	edi
pop	esi
add	esp, 0A0h
retn

loc_6E6B42:
push	offset sub_4E4600
push	8
push	10h
lea	ecx, [esp+0B8h+var_80]
push	ecx
call	sub_4078B0
mov	eax, [esi+18h]
lea	edx, [esp+0ACh+var_80]
push	edx
push	edi
push	eax
call	sub_6E6A10
add	esp, 0Ch
lea	ecx, [esp+0ACh+var_A0]
call	sub_68CFB0
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0B0h+var_80]
call	sub_653400
fstp	[esp+0ACh+var_A0]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0B0h+var_70]
call	sub_653400
fstp	[esp+0ACh+var_98]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+0B0h+var_60]
call	sub_653400
fstp	[esp+0ACh+var_90]
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0B0h+var_50]
call	sub_653400
fstp	[esp+0ACh+var_88]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0B0h+var_40]
call	sub_653400
fstp	[esp+0ACh+var_9C]
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+0B0h+var_30]
call	sub_653400
fstp	[esp+0ACh+var_94]
mov	ecx, [esi+18h]
push	ecx
lea	ecx, [esp+0B0h+var_20]
call	sub_653400
fstp	[esp+0ACh+var_8C]
mov	edx, [esi+18h]
push	edx
lea	ecx, [esp+0B0h+var_10]
call	sub_653400
fstp	[esp+0ACh+var_84]
lea	eax, [esp+0ACh+var_A0]
push	eax
lea	ecx, [ebx+34h]
call	sub_68CE70
push	offset sub_652830
push	8
push	10h
lea	ecx, [esp+0B8h+var_80]
push	ecx
call	sub_40F3E0
pop	ebx

loc_6E6C22:
pop	edi

loc_6E6C23:
pop	esi
add	esp, 0A0h
retn
sub_6E6AB0 endp

align 10h



sub_6E6C30 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+58h]
call	sub_67C000
lea	ecx, [edi+64h]
call	sub_67C000
mov	eax, [edi+70h]
test	eax, eax
jz	short loc_6E6CA0
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E6C9E
lea	ebx, [ebx+0]

loc_6E6C60:
mov	eax, [edi+70h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E6C99
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6E6C99
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6E6C99:
inc	esi
cmp	esi, ebx
jb	short loc_6E6C60

loc_6E6C9E:
pop	esi
pop	ebx

loc_6E6CA0:
pop	edi
retn
sub_6E6C30 endp

align 10h



sub_6E6CB0 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+58h]
call	sub_67BFB0
lea	ecx, [edi+64h]
call	sub_67BFB0
mov	eax, [edi+70h]
test	eax, eax
jz	short loc_6E6D12
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E6D10
lea	ebx, [ebx+0]

loc_6E6CE0:
mov	eax, [edi+70h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E6D0B
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6E6D0B
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6E6D0B:
inc	esi
cmp	esi, ebx
jb	short loc_6E6CE0

loc_6E6D10:
pop	esi
pop	ebx

loc_6E6D12:
pop	edi
retn
sub_6E6CB0 endp

align 10h



sub_6E6D20 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+58h]
call	sub_67C070
lea	ecx, [edi+64h]
call	sub_67C070
mov	eax, [edi+70h]
test	eax, eax
jz	short loc_6E6D9D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E6D9B
lea	ebx, [ebx+0]

loc_6E6D50:
mov	eax, [edi+70h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E6D96
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6E6D96
test	eax, 0FFFFFFFh
jbe	short loc_6E6D81
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6E6D8D

loc_6E6D81:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6E6D8D:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6E6D96:
inc	esi
cmp	esi, ebx
jb	short loc_6E6D50

loc_6E6D9B:
pop	esi
pop	ebx

loc_6E6D9D:
pop	edi
retn
sub_6E6D20 endp

align 10h



sub_6E6DA0 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+58h]
call	sub_67C210
lea	ecx, [edi+64h]
call	sub_67C210
mov	eax, [edi+70h]
test	eax, eax
jz	short loc_6E6DEA
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E6DE8
lea	ebx, [ebx+0]

loc_6E6DD0:
mov	eax, [edi+70h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E6DE3
call	sub_64B020

loc_6E6DE3:
inc	esi
cmp	esi, ebx
jb	short loc_6E6DD0

loc_6E6DE8:
pop	esi
pop	ebx

loc_6E6DEA:
pop	edi
retn
sub_6E6DA0 endp

align 10h



sub_6E6DF0 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+58h]
call	sub_67C1F0
lea	ecx, [edi+64h]
call	sub_67C1F0
mov	eax, [edi+70h]
test	eax, eax
jz	short loc_6E6E3A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E6E38
lea	ebx, [ebx+0]

loc_6E6E20:
mov	eax, [edi+70h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E6E33
call	sub_64B3B0

loc_6E6E33:
inc	esi
cmp	esi, ebx
jb	short loc_6E6E20

loc_6E6E38:
pop	esi
pop	ebx

loc_6E6E3A:
pop	edi
retn
sub_6E6DF0 endp

align 10h



sub_6E6E40 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
lea	edi, [esi+10h]
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143CB90
call	sub_68CFB0
mov	ecx, [ebx+78h]
add	ebx, 78h
push	10h
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6E6E40 endp

align 10h



sub_6E6E90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
jz	loc_6E6FB1
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 12h
jnz	loc_6E6FB1
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	loc_6E6FA9
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_6E6ED1
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax

loc_6E6ED1:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
cmp	dword ptr [esi+1Ch], 7
jle	loc_6E6F9C
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+34h]
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+3Ch]
mov	eax, [esi+18h]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+44h]
mov	ecx, [esi+18h]
push	ecx
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+4Ch]
mov	edx, [esi+18h]
push	edx
push	4
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+38h]
mov	eax, [esi+18h]
push	eax
push	5
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+40h]
mov	ecx, [esi+18h]
push	ecx
push	6
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+48h]
mov	edx, [esi+18h]
push	edx
push	7
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [edi+50h]

loc_6E6F9C:
test	edi, edi
jz	short loc_6E6FB0
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64B3B0

loc_6E6FA9:
xor	edi, edi
jmp	loc_6E6ED1

loc_6E6FB0:
pop	edi

loc_6E6FB1:
pop	esi
retn
sub_6E6E90 endp

align 10h



sub_6E6FC0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
lea	edi, [ebx+78h]
push	0
push	54h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6E701D
push	ebx
mov	ecx, esi
call	sub_663BE0
lea	ebx, [esi+10h]
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [ebx], offset	off_143CB90
call	sub_68CFB0
mov	ecx, [edi]
push	10h
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_6E701D:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6E6FC0 endp

align 10h



sub_6E7030 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
lea	edi, [esi+10h]
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143CB90
call	sub_68CFB0
mov	eax, [esp+0Ch+arg_4]
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+54h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143CADC
mov	dword ptr [edi], offset	off_143CC30
mov	dword ptr [ecx], offset	off_143CAD8
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6E7030 endp

align 10h



sub_6E70B0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
mov	eax, [esp+14h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
mov	ebx, ecx
mov	ecx, [esp+24h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebx
mov	[esp+30h+var_14], ebx
call	sub_6E7030
lea	edx, [esp+24h+arg_8]
push	edx
push	offset off_143CA4C
push	esi
lea	ecx, [ebx+54h]
lea	edi, [ebx+10h]
push	ebx
mov	dword ptr [ebx], offset	off_143CADC
mov	dword ptr [edi], offset	off_143CC30
mov	dword ptr [ecx], offset	off_143CAD8
mov	byte ptr [esp+34h+arg_8], 6
call	sub_663110
mov	eax, [esi]
xor	ebx, ebx
push	ebx
push	0Dh
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [eax+280h]
push	offset aRedmultiplier ;	"redMultiplier"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
mov	ebp, 1
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E715E
call	sub_650DF0

loc_6E715E:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esi]
push	ebx
push	0Fh
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [ecx+280h]
push	offset aGreenmultiplie ; "greenMultiplier"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+arg_8]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E71BD
call	sub_650DF0

loc_6E71BD:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	edx, [esi]
push	ebx
push	0Eh
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [edx+280h]
push	offset aBluemultiplier ; "blueMultiplier"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E721C
call	sub_650DF0

loc_6E721C:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	0Fh
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [eax+280h]
push	offset aAlphamultiplie ; "alphaMultiplier"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E727B
call	sub_650DF0

loc_6E727B:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esi]
push	ebx
push	9
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [ecx+280h]
push	offset aRedoffset ; "redOffset"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+arg_8]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E72DA
call	sub_650DF0

loc_6E72DA:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	edx, [esi]
push	ebx
push	0Bh
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [edx+280h]
push	offset aGreenoffset ; "greenOffset"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E7339
call	sub_650DF0

loc_6E7339:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	0Ah
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [eax+280h]
push	offset aBlueoffset ; "blueOffset"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E7398
call	sub_650DF0

loc_6E7398:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esi]
push	ebx
push	0Bh
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [ecx+280h]
push	offset aAlphaoffset ; "alphaOffset"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+arg_8]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6E73F7
call	sub_650DF0

loc_6E73F7:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	edx, [esi]
push	ebx
push	3
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], 4
mov	[esp+2Ch+var_C], ebx
mov	ecx, [edx+280h]
push	offset unk_143CA64
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
pop	edi
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
pop	esi
pop	ebp
pop	ebx
jnz	short loc_6E745A
call	sub_650DF0

loc_6E745A:
lea	ecx, [esp+14h+var_10]
call	sub_652830
mov	eax, [esp+14h+var_14]
add	esp, 14h
retn	0Ch
sub_6E70B0 endp

align 10h



sub_6E7470 proc	near
sub	ecx, 10h
jmp	sub_6E7480
sub_6E7470 endp

align 10h



sub_6E7480 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+54h]
mov	dword ptr [esi], offset	off_143CADC
mov	dword ptr [esi+10h], offset off_143CC30
mov	dword ptr [ecx], offset	off_143CAD8
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6E74BA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E74BA:
mov	eax, esi
pop	esi
retn	4
sub_6E7480 endp




sub_6E74C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6E74F5 ; default
jmp	ds:off_6E74F8[eax*4] ; switch jump

loc_6E74D0:		; jumptable 006E74C9 case 0
call	sub_6E6DF0
retn	4

loc_6E74D8:		; jumptable 006E74C9 case 1
call	sub_6E6C30
retn	4

loc_6E74E0:		; jumptable 006E74C9 case 2
call	sub_6E6CB0
retn	4

loc_6E74E8:		; jumptable 006E74C9 case 3
call	sub_6E6DA0
retn	4

loc_6E74F0:		; jumptable 006E74C9 case 4
call	sub_6E6D20

locret_6E74F5:		; default
retn	4
sub_6E74C0 endp

off_6E74F8 dd offset loc_6E74D0	; jump table for switch	statement
dd offset loc_6E74D8
dd offset loc_6E74E0
dd offset loc_6E74E8
dd offset loc_6E74F0
align 10h



sub_6E7510 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6E755C
push	offset sub_6E6E90
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143CBE8
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6E755E

loc_6E755C:
xor	eax, eax

loc_6E755E:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	74h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E7636
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6E70B0
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E75B4
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E75B4:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 10h
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E75E2
call	sub_64B3B0

loc_6E75E2:
mov	edx, [esi+298h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+48h]
push	ecx
mov	ecx, [esi+298h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E762D
mov	ecx, ebp
call	sub_64B3B0

loc_6E762D:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E7636:
xor	ebp, ebp
jmp	loc_6E75B4
sub_6E7510 endp

align 10h



sub_6E7640 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, dword_1855FC0
sub	esp, 74h
push	ebp
push	esi
push	edi
mov	edi, [esp+80h+arg_4]
push	eax
lea	ecx, [esp+84h+var_4C]
call	sub_679B40
mov	ecx, edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	22h
call	eax
mov	esi, eax
xor	ebp, ebp
cmp	esi, ebp
jz	short loc_6E76CD
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
mov	ecx, esi
mov	[esp+80h+var_6C], eax
call	sub_64A430

loc_6E768E:
mov	esi, [esp+80h+var_6C]
push	ebx
mov	[esp+84h+var_70], ebp
mov	ebx, 1
cmp	esi, ebp
jz	short loc_6E76D3
mov	edx, [esi]
mov	edx, [edx+4]
lea	eax, [esp+84h+var_70]
push	eax
mov	ecx, esi
call	edx
push	0FFFFFFFFh
push	offset aAT	; "A=t"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
test	byte ptr [esp+84h+var_70], bl
jnz	short loc_6E76E3
push	0FFFFFFFFh
push	offset aMp3T	; "&MP3=t"
jmp	short loc_6E76EA

loc_6E76CD:
mov	[esp+80h+var_6C], ebp
jmp	short loc_6E768E

loc_6E76D3:
push	0FFFFFFFFh
push	offset aAT	; "A=t"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10

loc_6E76E3:
push	0FFFFFFFFh
push	offset aMp3F	; "&MP3=f"

loc_6E76EA:
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
cmp	esi, ebp
jz	short loc_6E7707
test	byte ptr [esp+84h+var_70], 4
jnz	short loc_6E7707
push	0FFFFFFFFh
push	offset aSaT	; "&SA=t"
jmp	short loc_6E770E

loc_6E7707:
push	0FFFFFFFFh
push	offset aSaF	; "&SA=f"

loc_6E770E:
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aSvF	; "&SV=f"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aEvF	; "&EV=f"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aIme	; "&IME="
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
mov	ecx, edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
cmp	eax, ebp
jz	short loc_6E7771
mov	ecx, eax
call	sub_64A430
push	0FFFFFFFFh
push	offset aT_0	; "t"
jmp	short loc_6E7778

loc_6E7771:
push	0FFFFFFFFh
push	offset asc_1577388 ; "f"

loc_6E7778:
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aAeF	; "&AE=f"
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aVeF	; "&VE=f"
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aAccF	; "&ACC=f"
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aPrF	; "&PR=f"
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aSpF	; "&SP=f"
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aSbF	; "&SB=f"
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aDebF	; "&DEB=f"
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aV_1	; "&V="
lea	ecx, [esp+88h+var_48]
call	sub_679D10
lea	ecx, [esp+80h+var_70]
call	sub_679E30
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	ebp
push	0Bh
push	offset aWin8000	; "WIN 8,0,0,0"
call	sub_650E40
mov	esi, eax
add	[esi+8], ebx
add	[esi+8], ebx
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E7835
mov	ecx, esi
call	sub_650DF0

loc_6E7835:
mov	edx, [esi]
push	edx
lea	ecx, [esp+84h+var_5C]
call	sub_67AE10
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E784E
mov	ecx, esi
call	sub_650DF0

loc_6E784E:
mov	eax, [esp+80h+var_5C]
and	eax, 0FFFFFFFCh
mov	edx, [eax]
lea	ecx, [esp+80h+var_70]
push	ecx
and	edx, 7FFFFFFFh
push	edx
add	eax, 8
push	eax
call	sub_667DC0
mov	eax, [esp+8Ch+var_70]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
add	esp, 0Ch
and	ecx, 7FFFFFFFh
push	ecx
add	eax, 8
push	eax
lea	ecx, [esp+88h+var_48]
call	sub_679D10
push	0FFFFFFFFh
push	offset aM	; "&M="
lea	ecx, [esp+88h+var_48]
call	sub_679D10
lea	ecx, [esp+80h+var_70]
call	sub_67A720
mov	edx, [edi+78h]
mov	ecx, [edx+280h]
push	ebp
push	11h
push	offset aScaleformWindo ; "Scaleform Windows"
call	sub_650E40
mov	esi, eax
add	[esi+8], ebx
add	[esi+8], ebx
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E78D0
mov	ecx, esi
call	sub_650DF0

loc_6E78D0:
mov	eax, [esi]
push	eax
lea	ecx, [esp+84h+var_60]
call	sub_67AE10
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E78E9
mov	ecx, esi
call	sub_650DF0

loc_6E78E9:
mov	eax, [esp+80h+var_60]
and	eax, 0FFFFFFFCh
mov	edx, [eax]
lea	ecx, [esp+80h+var_70]
push	ecx
and	edx, 7FFFFFFFh
push	edx
add	eax, 8
push	eax
call	sub_667DC0
mov	eax, [esp+8Ch+var_70]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
add	esp, 0Ch
and	ecx, 7FFFFFFFh
push	ecx
add	eax, 8
push	eax
lea	ecx, [esp+88h+var_48]
call	sub_679D10
fld1
fst	[esp+80h+var_4]
mov	ecx, edi
fstp	[esp+80h+var_8]
mov	[esp+80h+var_30], ebp
mov	[esp+80h+var_2C], ebp
mov	[esp+80h+var_24], ebp
mov	[esp+80h+var_28], ebp
mov	[esp+80h+var_1C], ebx
mov	[esp+80h+var_20], ebx
mov	[esp+80h+var_C], ebp
mov	[esp+80h+var_10], ebp
mov	[esp+80h+var_14], ebp
mov	[esp+80h+var_18], ebp
mov	[esp+80h], ebp
call	sub_668010
mov	edx, [eax]
mov	edx, [edx+68h]
lea	ecx, [esp+80h+var_30]
push	ecx
mov	ecx, eax
call	edx
push	0FFFFFFFFh
push	offset aR_1	; "&R="
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
mov	eax, [esp+84h+var_34]
push	ebp
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+90h+var_6C]
push	ecx
lea	ecx, [esp+94h+var_5C]
mov	byte ptr [esp+94h+var_5C], 4
mov	[esp+94h+var_58], eax
call	sub_652F60
mov	edx, [esp+84h+var_6C]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
mov	eax, [esp+84h+var_6C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_6E79CB
call	sub_650DF0

loc_6E79CB:
lea	ecx, [esp+84h+var_5C]
call	sub_652830
push	0FFFFFFFFh
push	offset asc_156C750 ; "x"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
mov	ecx, [esp+84h+var_30]
push	ebp
push	0FFFFFFFFh
push	edi
lea	edx, [esp+90h+var_6C]
mov	[esp+90h+var_58], ecx
push	edx
lea	ecx, [esp+94h+var_5C]
mov	byte ptr [esp+94h+var_5C], 4
call	sub_652F60
mov	eax, [esp+84h+var_6C]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
mov	eax, [esp+84h+var_6C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebp
jnz	short loc_6E7A2A
call	sub_650DF0

loc_6E7A2A:
lea	ecx, [esp+84h+var_5C]
call	sub_652830
push	0FFFFFFFFh
push	offset aDp72	; "&DP=72"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aColColor ; "&COL=color"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aAr1_0	; "&AR=1.0"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aOs_0	; "&OS="
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
lea	ecx, [esp+84h+var_74]
call	sub_67A720
mov	edx, [edi+78h]
mov	ecx, [edx+280h]
push	ebp
push	7
push	offset aWindows	; "Windows"
call	sub_650E40
mov	esi, eax
add	[esi+8], ebx
add	[esi+8], ebx
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E7AA7
mov	ecx, esi
call	sub_650DF0

loc_6E7AA7:
mov	eax, [esi]
push	eax
lea	ecx, [esp+88h+var_68]
call	sub_67AE10
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E7AC0
mov	ecx, esi
call	sub_650DF0

loc_6E7AC0:
mov	eax, [esp+84h+var_68]
and	eax, 0FFFFFFFCh
mov	edx, [eax]
lea	ecx, [esp+84h+var_74]
push	ecx
and	edx, 7FFFFFFFh
push	edx
add	eax, 8
push	eax
call	sub_667DC0
mov	eax, [esp+90h+var_74]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
add	esp, 0Ch
and	ecx, 7FFFFFFFh
push	ecx
add	eax, 8
push	eax
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aLEn	; "&L=en"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aPtExternal ; "&PT=External"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aAvdF	; "&AVD=f"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aLfdF	; "&LFD=f"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
push	0FFFFFFFFh
push	offset aWdF	; "&WD=f"
lea	ecx, [esp+8Ch+var_4C]
call	sub_679D10
mov	eax, [esp+84h+var_4C]
cmp	eax, ebp
jnz	short loc_6E7B5B
mov	eax, offset byte_146D660

loc_6E7B5B:
mov	edx, [edi+78h]
mov	ecx, [edx+280h]
mov	edx, [esp+84h+var_48]
push	edx
push	eax
call	sub_650F20
add	[eax+8], ebx
mov	esi, [esp+84h+var_68]
mov	ebp, [esp+84h+arg_0]
mov	edi, ds:InterlockedExchangeAdd
mov	[ebp+0], eax
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, ebx
jnz	short loc_6E7BA3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E7BA3:
mov	esi, [esp+84h+var_64]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, ebx
jnz	short loc_6E7BC4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E7BC4:
mov	esi, [esp+84h+var_60]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, ebx
jnz	short loc_6E7BE5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E7BE5:
mov	esi, [esp+84h+var_74]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, ebx
pop	ebx
jnz	short loc_6E7C07
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6E7C07:
lea	ecx, [esp+80h+var_4C]
call	sub_679B60
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
add	esp, 74h
retn
sub_6E7640 endp

align 10h



sub_6E7C20 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	byte ptr -1Ch
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 28h
push	ebp
push	esi
mov	esi, [esp+30h+arg_0]
push	edi
mov	edi, ecx
push	esi
mov	[esp+38h+var_24], edi
call	sub_67BDA0
mov	dword ptr [edi], offset	off_143C238
push	0
add	edi, 10h
mov	dword ptr [edi], offset	off_143CF20
mov	eax, [esi]
push	11h
mov	byte ptr [esp+3Ch+arg_0], 6
mov	[esp+3Ch+var_20], 2
mov	[esp+3Ch+var_1C], 0
mov	ecx, [eax+280h]
push	offset aAvhardwaredisa ; "avHardwareDisable"
call	sub_650E40
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	[esp+38h+var_28], eax
mov	ebp, 1
add	[eax+8], ebp
lea	edx, [esp+38h+var_20]
push	edx
lea	eax, [esp+3Ch+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7CA3
call	sub_650DF0

loc_6E7CA3:
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	10h
push	offset aHasaccessibili ; "hasAccessibility"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+34h+arg_0]
push	edx
lea	eax, [esp+38h+var_20]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7CED
call	sub_650DF0

loc_6E7CED:
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	8
push	offset aHasaudio ; "hasAudio"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+34h+arg_0]
push	eax
lea	ecx, [esp+38h+var_20]
push	ecx
lea	edx, [esp+3Ch+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7D37
call	sub_650DF0

loc_6E7D37:
mov	eax, [esi]
mov	ecx, [eax+280h]
push	0
push	0Fh
push	offset aHasaudioencode ; "hasAudioEncoder"
call	sub_650E40
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+var_20]
push	edx
lea	eax, [esp+3Ch+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7D81
call	sub_650DF0

loc_6E7D81:
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	10h
push	offset aHasembeddedvid ; "hasEmbeddedVideo"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+34h+arg_0]
push	edx
lea	eax, [esp+38h+var_20]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7DCB
call	sub_650DF0

loc_6E7DCB:
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	6
push	offset aHasime	; "hasIME"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+34h+arg_0]
push	eax
lea	ecx, [esp+38h+var_20]
push	ecx
lea	edx, [esp+3Ch+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7E15
call	sub_650DF0

loc_6E7E15:
mov	eax, [esi]
mov	ecx, [eax+280h]
push	0
push	6
push	offset aHasmp3	; "hasMP3"
call	sub_650E40
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+var_20]
push	edx
lea	eax, [esp+3Ch+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7E5F
call	sub_650DF0

loc_6E7E5F:
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	0Bh
push	offset aHasprinting ; "hasPrinting"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+34h+arg_0]
push	edx
lea	eax, [esp+38h+var_20]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7EA9
call	sub_650DF0

loc_6E7EA9:
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	12h
push	offset aHasscreenbroad ; "hasScreenBroadcast"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+34h+arg_0]
push	eax
lea	ecx, [esp+38h+var_20]
push	ecx
lea	edx, [esp+3Ch+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7EF3
call	sub_650DF0

loc_6E7EF3:
mov	eax, [esi]
mov	ecx, [eax+280h]
push	0
push	11h
push	offset aHasscreenplayb ; "hasScreenPlayback"
call	sub_650E40
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+var_20]
push	edx
lea	eax, [esp+3Ch+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7F3D
call	sub_650DF0

loc_6E7F3D:
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	11h
push	offset aHasstreamingau ; "hasStreamingAudio"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+34h+arg_0]
push	edx
lea	eax, [esp+38h+var_20]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7F87
call	sub_650DF0

loc_6E7F87:
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	11h
push	offset aHasstreamingvi ; "hasStreamingVideo"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+34h+arg_0]
push	eax
lea	ecx, [esp+38h+var_20]
push	ecx
lea	edx, [esp+3Ch+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E7FD1
call	sub_650DF0

loc_6E7FD1:
mov	eax, [esi]
mov	ecx, [eax+280h]
push	0
push	0Fh
push	offset aHasvideoencode ; "hasVideoEncoder"
call	sub_650E40
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+var_20]
push	edx
lea	eax, [esp+3Ch+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E801B
call	sub_650DF0

loc_6E801B:
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	0Ah
push	offset aIsdebugger ; "isDebugger"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+34h+arg_0]
push	edx
lea	eax, [esp+38h+var_20]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E8065
call	sub_650DF0

loc_6E8065:
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	14h
push	offset aLocalfilereadd ; "localFileReadDisable"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+34h+arg_0]
push	eax
lea	ecx, [esp+38h+var_20]
push	ecx
lea	edx, [esp+3Ch+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E80AF
call	sub_650DF0

loc_6E80AF:
mov	eax, [esi]
mov	ecx, [eax+280h]
push	ebx
push	0
push	2
push	offset aEn_0	; "en"
call	sub_650E40
mov	ebx, eax
add	[ebx+8], ebp
mov	[esp+38h+var_10], 5
mov	[esp+38h+var_C], ebx
add	[ebx+8], ebp
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	8
push	offset aLanguage ; "language"
call	sub_650E40
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+arg_0]
push	edx
lea	eax, [esp+3Ch+var_10]
push	eax
lea	ecx, [esp+40h+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E8121
call	sub_650DF0

loc_6E8121:
lea	ecx, [esp+38h+var_10]
call	sub_652830
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E8137
mov	ecx, ebx
call	sub_650DF0

loc_6E8137:
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	11h
push	offset aScaleformWindo ; "Scaleform Windows"
call	sub_650E40
mov	ebx, eax
add	[ebx+8], ebp
add	[ebx+8], ebp
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E8162
mov	ecx, ebx
call	sub_650DF0

loc_6E8162:
mov	[esp+38h+var_10], 5
mov	[esp+38h+var_C], ebx
add	[ebx+8], ebp
mov	eax, [esi]
mov	ecx, [eax+280h]
push	0
push	0Ch
push	offset aManufacturer ; "manufacturer"
call	sub_650E40
lea	ecx, [esp+38h+arg_0]
push	ecx
mov	[esp+3Ch+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+3Ch+var_10]
push	edx
lea	eax, [esp+40h+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E81B8
call	sub_650DF0

loc_6E81B8:
lea	ecx, [esp+38h+var_10]
call	sub_652830
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E81CE
mov	ecx, ebx
call	sub_650DF0

loc_6E81CE:
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	7
push	offset aWindows	; "Windows"
call	sub_650E40
mov	ebx, eax
add	[ebx+8], ebp
add	[ebx+8], ebp
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E81F9
mov	ecx, ebx
call	sub_650DF0

loc_6E81F9:
mov	[esp+38h+var_10], 5
mov	[esp+38h+var_C], ebx
add	[ebx+8], ebp
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	2
push	offset aOs	; "os"
call	sub_650E40
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+38h+arg_0]
push	eax
lea	ecx, [esp+3Ch+var_10]
push	ecx
lea	edx, [esp+40h+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E824F
call	sub_650DF0

loc_6E824F:
lea	ecx, [esp+38h+var_10]
call	sub_652830
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E8265
mov	ecx, ebx
call	sub_650DF0

loc_6E8265:
mov	eax, [esi]
push	0
push	10h
mov	[esp+40h+var_10], 4
mov	[esp+40h+var_C], ebp
mov	ecx, [eax+280h]
push	offset aPixelaspectrat ; "pixelAspectRatio"
call	sub_650E40
lea	ecx, [esp+38h+arg_0]
push	ecx
mov	[esp+3Ch+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+3Ch+var_10]
push	edx
lea	eax, [esp+40h+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E82B8
call	sub_650DF0

loc_6E82B8:
lea	ecx, [esp+38h+var_10]
call	sub_652830
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	8
push	offset aExternal ; "External"
call	sub_650E40
mov	ebx, eax
add	[ebx+8], ebp
mov	[esp+38h+var_10], 5
mov	[esp+38h+var_C], ebx
add	[ebx+8], ebp
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	0Ah
push	offset aPlayertype ; "playerType"
call	sub_650E40
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+38h+arg_0]
push	eax
lea	ecx, [esp+3Ch+var_10]
push	ecx
lea	edx, [esp+40h+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E8332
call	sub_650DF0

loc_6E8332:
lea	ecx, [esp+38h+var_10]
call	sub_652830
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E8348
mov	ecx, ebx
call	sub_650DF0

loc_6E8348:
mov	eax, [esi]
mov	ecx, [eax+280h]
push	0
push	5
push	offset aColor	; "color"
call	sub_650E40
mov	ebx, eax
add	[ebx+8], ebp
mov	[esp+38h+var_10], 5
mov	[esp+38h+var_C], ebx
add	[ebx+8], ebp
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	0Bh
push	offset aScreencolor ; "screenColor"
call	sub_650E40
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+arg_0]
push	edx
lea	eax, [esp+3Ch+var_10]
push	eax
lea	ecx, [esp+40h+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E83B9
call	sub_650DF0

loc_6E83B9:
lea	ecx, [esp+38h+var_10]
call	sub_652830
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E83CF
mov	ecx, ebx
call	sub_650DF0

loc_6E83CF:
mov	edx, [esi]
push	0
push	9
mov	[esp+40h+var_10], 4
mov	[esp+40h+var_C], 48h
mov	ecx, [edx+280h]
push	offset aScreendpi ; "screenDPI"
call	sub_650E40
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+38h+arg_0]
push	eax
lea	ecx, [esp+3Ch+var_10]
push	ecx
lea	edx, [esp+40h+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E8426
call	sub_650DF0

loc_6E8426:
lea	ecx, [esp+38h+var_10]
call	sub_652830
mov	eax, [esi]
mov	ecx, [eax+280h]
push	0
push	0Bh
push	offset aWin8000	; "WIN 8,0,0,0"
call	sub_650E40
mov	ebx, eax
add	[ebx+8], ebp
add	[ebx+8], ebp
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E845A
mov	ecx, ebx
call	sub_650DF0

loc_6E845A:
mov	[esp+38h+var_10], 5
mov	[esp+38h+var_C], ebx
add	[ebx+8], ebp
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	7
push	offset aVersion_0 ; "version"
call	sub_650E40
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+arg_0]
push	edx
lea	eax, [esp+3Ch+var_10]
push	eax
lea	ecx, [esp+40h+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E84B0
call	sub_650DF0

loc_6E84B0:
lea	ecx, [esp+38h+var_10]
call	sub_652830
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E84C6
mov	ecx, ebx
call	sub_650DF0

loc_6E84C6:
mov	edx, [esi]
mov	ecx, [edx+280h]
push	0
push	11h
push	offset aWindowlessdisa ; "windowlessDisable"
call	sub_650E40
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+38h+arg_0]
push	eax
lea	ecx, [esp+3Ch+var_20]
push	ecx
lea	edx, [esp+40h+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+38h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebx
jnz	short loc_6E8511
call	sub_650DF0

loc_6E8511:
mov	eax, [esi]
push	0
push	11h
mov	[esp+3Ch+var_10], 0Ah
mov	ecx, [eax+280h]
push	offset aScreenresoluti ; "screenResolutionX"
call	sub_650E40
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	[esp+38h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+38h+var_10]
push	edx
lea	eax, [esp+3Ch+var_28]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E8560
call	sub_650DF0

loc_6E8560:
lea	ecx, [esp+34h+var_10]
call	sub_652830
mov	ecx, [esi]
push	0
push	11h
mov	[esp+3Ch+var_10], 0Ah
mov	ecx, [ecx+280h]
push	offset aScreenresolu_0 ; "screenResolutionY"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	edx, [esp+34h+arg_0]
push	edx
lea	eax, [esp+38h+var_10]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E85B8
call	sub_650DF0

loc_6E85B8:
lea	ecx, [esp+34h+var_10]
call	sub_652830
mov	edx, [esi]
push	0
push	0Ch
mov	[esp+3Ch+var_10], 0Ah
mov	ecx, [edx+280h]
push	offset aServerstring ; "serverString"
call	sub_650E40
mov	[esp+34h+var_28], eax
add	[eax+8], ebp
lea	eax, [esp+34h+arg_0]
push	eax
lea	ecx, [esp+38h+var_10]
push	ecx
lea	edx, [esp+3Ch+var_28]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+34h+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
pop	ebp
jnz	short loc_6E8613
call	sub_650DF0

loc_6E8613:
lea	ecx, [esp+28h+var_10]
call	sub_652830
lea	ecx, [esp+28h+var_20]
call	sub_652830
mov	eax, [esp+28h+var_24]
add	esp, 28h
retn	4
sub_6E7C20 endp

align 10h



sub_6E8630 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 4Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+5Ch+arg_0]
mov	[esp+5Ch+var_48], ecx
mov	ecx, edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	22h
call	eax
mov	esi, eax
xor	ebx, ebx
cmp	esi, ebx
jz	short loc_6E86C4
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
mov	ecx, esi
mov	ebp, eax
mov	[esp+5Ch+arg_0], eax
call	sub_64A430

loc_6E8673:
mov	[esp+5Ch+var_4C], ebx
cmp	ebp, ebx
jz	short loc_6E868A
mov	edx, [ebp+0]
mov	edx, [edx+4]
lea	eax, [esp+5Ch+var_4C]
push	eax
mov	ecx, ebp
call	edx

loc_6E868A:
cmp	byte ptr [edi+7Ch], 6
jbe	loc_6E8922
mov	ebp, [esp+5Ch+arg_4]
mov	eax, [ebp+0]
mov	esi, [eax]
mov	ecx, offset aScreenresoluti ; "screenResolutionX"
mov	eax, esi

loc_6E86A4:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E86CC
cmp	dl, bl
jz	short loc_6E86C0
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E86CC
add	eax, 2
add	ecx, 2
cmp	dl, bl
jnz	short loc_6E86A4

loc_6E86C0:
xor	eax, eax
jmp	short loc_6E86D1

loc_6E86C4:
xor	ebp, ebp
mov	[esp+5Ch+arg_0], ebp
jmp	short loc_6E8673

loc_6E86CC:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E86D1:
cmp	eax, ebx
jnz	loc_6E8759

loc_6E86D9:
fld1
mov	eax, 1
fst	[esp+5Ch+var_8]
mov	ecx, edi
fstp	[esp+5Ch+var_C]
mov	[esp+5Ch+var_34], ebx
mov	[esp+5Ch+var_30], ebx
mov	[esp+5Ch+var_28], ebx
mov	[esp+5Ch+var_2C], ebx
mov	[esp+5Ch+var_20], eax
mov	[esp+5Ch+var_24], eax
mov	[esp+5Ch+var_10], ebx
mov	[esp+5Ch+var_14], ebx
mov	[esp+5Ch+var_18], ebx
mov	[esp+5Ch+var_1C], ebx
mov	[esp+5Ch+var_4], ebx
call	sub_668010
mov	edx, [eax]
mov	edx, [edx+68h]
lea	ecx, [esp+5Ch+var_34]
push	ecx
mov	ecx, eax
call	edx
mov	eax, [esp+5Ch+var_34]

loc_6E872D:
mov	[esp+5Ch+var_44], 4
mov	[esp+5Ch+var_40], eax

loc_6E8736:
lea	ecx, [esp+5Ch+var_44]
push	ecx

loc_6E873B:
mov	ecx, [esp+60h+arg_8]
call	sub_652520
lea	ecx, [esp+5Ch+var_44]
call	sub_652830

loc_6E874D:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 4Ch
retn	0Ch

loc_6E8759:		; "screenResolutionY"
mov	ecx, offset aScreenresolu_0
mov	eax, esi

loc_6E8760:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6E8780
cmp	dl, bl
jz	short loc_6E877C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6E8780
add	eax, 2
add	ecx, 2
cmp	dl, bl
jnz	short loc_6E8760

loc_6E877C:
xor	eax, eax
jmp	short loc_6E8785

loc_6E8780:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E8785:
cmp	eax, ebx
jnz	short loc_6E87E2

loc_6E8789:
fld1
mov	eax, 1
fst	[esp+5Ch+var_8]
mov	ecx, edi
fstp	[esp+5Ch+var_C]
mov	[esp+5Ch+var_34], ebx
mov	[esp+5Ch+var_30], ebx
mov	[esp+5Ch+var_28], ebx
mov	[esp+5Ch+var_2C], ebx
mov	[esp+5Ch+var_20], eax
mov	[esp+5Ch+var_24], eax
mov	[esp+5Ch+var_10], ebx
mov	[esp+5Ch+var_14], ebx
mov	[esp+5Ch+var_18], ebx
mov	[esp+5Ch+var_1C], ebx
mov	[esp+5Ch+var_4], ebx
call	sub_668010
mov	edx, [eax]
mov	edx, [edx+68h]
lea	ecx, [esp+5Ch+var_34]
push	ecx
mov	ecx, eax
call	edx
mov	eax, [esp+5Ch+var_30]
jmp	loc_6E872D

loc_6E87E2:		; "hasIME"
push	offset aHasime
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E882D

loc_6E87F2:
mov	ecx, edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_6E8815
mov	ecx, esi
call	sub_64A430

loc_6E8815:
cmp	esi, ebx
setnz	cl
lea	edx, [esp+5Ch+var_44]
mov	[esp+5Ch+var_44], 2
mov	byte ptr [esp+5Ch+var_40], cl
push	edx
jmp	loc_6E873B

loc_6E882D:		; "hasAudio"
push	offset aHasaudio
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E8852

loc_6E883D:
cmp	[esp+5Ch+arg_0], ebx
mov	[esp+5Ch+var_44], 2
setnz	al
mov	byte ptr [esp+5Ch+var_40], al
jmp	loc_6E8736

loc_6E8852:		; "hasMP3"
push	offset aHasmp3
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E8884

loc_6E8862:
cmp	[esp+5Ch+arg_0], ebx
jz	short loc_6E8871
test	byte ptr [esp+5Ch+var_4C], 1
jnz	short loc_6E8871
mov	bl, 1

loc_6E8871:
lea	edx, [esp+5Ch+var_44]
mov	[esp+5Ch+var_44], 2
mov	byte ptr [esp+5Ch+var_40], bl
push	edx
jmp	loc_6E873B

loc_6E8884:		; "hasStreamingAudio"
push	offset aHasstreamingau
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E88B6

loc_6E8894:
cmp	[esp+5Ch+arg_0], ebx
jz	short loc_6E88A3
test	byte ptr [esp+5Ch+var_4C], 4
jnz	short loc_6E88A3
mov	bl, 1

loc_6E88A3:
lea	eax, [esp+5Ch+var_44]
mov	[esp+5Ch+var_44], 2
mov	byte ptr [esp+5Ch+var_40], bl
push	eax
jmp	loc_6E873B

loc_6E88B6:		; "serverString"
push	offset aServerstring
mov	ecx, ebp
call	sub_67DA70
test	al, al

loc_6E88C4:
jz	loc_6E8B94
lea	ecx, [esp+5Ch+arg_4]
push	edi
push	ecx
call	sub_6E7640
mov	ecx, [esp+64h+arg_8]
mov	[esp+64h+var_44], 5
mov	eax, [eax]
add	esp, 8
lea	edx, [esp+5Ch+var_44]
mov	[esp+5Ch+var_40], eax
inc	dword ptr [eax+8]
push	edx
call	sub_652520
lea	ecx, [esp+5Ch+var_44]
call	sub_652830
mov	eax, [esp+5Ch+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	loc_6E874D
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 4Ch
retn	0Ch

loc_6E8922:
mov	eax, [edi+78h]
mov	ecx, [eax+280h]
push	ebx
push	11h
push	offset aScreenresoluti ; "screenResolutionX"
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
cmp	[esi+4], ebx
jnz	short loc_6E8949
mov	ecx, esi
call	sub_651580

loc_6E8949:
mov	ebp, [esp+5Ch+arg_4]
mov	ecx, [ebp+0]
cmp	[ecx+4], ebx
jnz	short loc_6E895A
call	sub_651580

loc_6E895A:
mov	ecx, [ebp+0]
mov	edx, [esi+4]
cmp	edx, [ecx+4]
setz	byte ptr [esp+5Ch+arg_4]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E8975
mov	ecx, esi
call	sub_650DF0

loc_6E8975:
cmp	byte ptr [esp+5Ch+arg_4], bl
jnz	loc_6E86D9
mov	edx, [edi+78h]
mov	ecx, [edx+280h]
push	ebx
push	11h
push	offset aScreenresolu_0 ; "screenResolutionY"
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
cmp	[esi+4], ebx
jnz	short loc_6E89A6
mov	ecx, esi
call	sub_651580

loc_6E89A6:
mov	ecx, [ebp+0]
cmp	[ecx+4], ebx
jnz	short loc_6E89B3
call	sub_651580

loc_6E89B3:
mov	eax, [ebp+0]
mov	ecx, [esi+4]
cmp	ecx, [eax+4]
setz	byte ptr [esp+5Ch+arg_4]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E89CE
mov	ecx, esi
call	sub_650DF0

loc_6E89CE:
cmp	byte ptr [esp+5Ch+arg_4], bl
jnz	loc_6E8789
mov	edx, [edi+78h]
mov	ecx, [edx+280h]
push	ebx
push	6
push	offset aHasime	; "hasIME"
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
cmp	[esi+4], ebx
jnz	short loc_6E89FF
mov	ecx, esi
call	sub_651580

loc_6E89FF:
mov	ecx, [ebp+0]
cmp	[ecx+4], ebx
jnz	short loc_6E8A0C
call	sub_651580

loc_6E8A0C:
mov	eax, [ebp+0]
mov	ecx, [esi+4]
cmp	ecx, [eax+4]
setz	byte ptr [esp+5Ch+arg_4]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E8A27
mov	ecx, esi
call	sub_650DF0

loc_6E8A27:
cmp	byte ptr [esp+5Ch+arg_4], bl
jnz	loc_6E87F2
mov	eax, [edi+78h]
mov	ecx, [eax+280h]
push	ebx
push	8
push	offset aHasaudio ; "hasAudio"
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
cmp	[esi+4], ebx
jnz	short loc_6E8A58
mov	ecx, esi
call	sub_651580

loc_6E8A58:
mov	ecx, [ebp+0]
cmp	[ecx+4], ebx
jnz	short loc_6E8A65
call	sub_651580

loc_6E8A65:
mov	ecx, [ebp+0]
mov	edx, [esi+4]
cmp	edx, [ecx+4]
setz	byte ptr [esp+5Ch+arg_4]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E8A80
mov	ecx, esi
call	sub_650DF0

loc_6E8A80:
cmp	byte ptr [esp+5Ch+arg_4], bl
jnz	loc_6E883D
mov	edx, [edi+78h]
mov	ecx, [edx+280h]
push	ebx
push	6
push	offset aHasmp3	; "hasMP3"
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
cmp	[esi+4], ebx
jnz	short loc_6E8AB1
mov	ecx, esi
call	sub_651580

loc_6E8AB1:
mov	ecx, [ebp+0]
cmp	[ecx+4], ebx
jnz	short loc_6E8ABE
call	sub_651580

loc_6E8ABE:
mov	eax, [ebp+0]
mov	ecx, [esi+4]
cmp	ecx, [eax+4]
setz	byte ptr [esp+5Ch+arg_4]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E8AD9
mov	ecx, esi
call	sub_650DF0

loc_6E8AD9:
cmp	byte ptr [esp+5Ch+arg_4], bl
jnz	loc_6E8862
mov	eax, [edi+78h]
mov	ecx, [eax+280h]
push	ebx
push	11h
push	offset aHasstreamingau ; "hasStreamingAudio"
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
cmp	[esi+4], ebx
jnz	short loc_6E8B0A
mov	ecx, esi
call	sub_651580

loc_6E8B0A:
mov	ecx, [ebp+0]
cmp	[ecx+4], ebx
jnz	short loc_6E8B17
call	sub_651580

loc_6E8B17:
mov	ecx, [ebp+0]
mov	edx, [esi+4]
cmp	edx, [ecx+4]
setz	byte ptr [esp+5Ch+arg_4]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E8B32
mov	ecx, esi
call	sub_650DF0

loc_6E8B32:
cmp	byte ptr [esp+5Ch+arg_4], bl
jnz	loc_6E8894
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	ebx
push	0Ch
push	offset aServerstring ; "serverString"
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
cmp	[esi+4], ebx
jnz	short loc_6E8B63
mov	ecx, esi
call	sub_651580

loc_6E8B63:
mov	ecx, [ebp+0]
cmp	[ecx+4], ebx
jnz	short loc_6E8B70
call	sub_651580

loc_6E8B70:
mov	edx, [ebp+0]
mov	eax, [esi+4]
cmp	eax, [edx+4]
setz	byte ptr [esp+5Ch+arg_4]
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E8B8B
mov	ecx, esi
call	sub_650DF0

loc_6E8B8B:
cmp	byte ptr [esp+5Ch+arg_4], bl
jmp	loc_6E88C4

loc_6E8B94:
mov	eax, [edi+78h]
cmp	byte ptr [eax+2B0h], 1
jnz	short loc_6E8BC8
push	offset aNumcontrollers ; "numControllers"
mov	ecx, ebp
call	sub_67DA70
test	al, al
jz	short loc_6E8BC8
mov	ecx, edi
call	sub_668010
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+0ECh]
call	eax
jmp	loc_6E872D

loc_6E8BC8:
mov	edx, [esp+5Ch+arg_8]
mov	ecx, [esp+5Ch+var_48]
push	edx
push	ebp
push	edi
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 4Ch
retn	0Ch
sub_6E8630 endp

align 10h



sub_6E8BF0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
test	eax, eax
jz	short loc_6E8C26
lea	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, eax
call	sub_6E7C20
jmp	short loc_6E8C28

loc_6E8C26:
xor	eax, eax

loc_6E8C28:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	54h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E8D00
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_665CA0
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E8C7E
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E8C7E:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 11h
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E8CAC
call	sub_64B3B0

loc_6E8CAC:
mov	edx, [esi+29Ch]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+4Ch]
push	ecx
mov	ecx, [esi+29Ch]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E8CF7
mov	ecx, ebp
call	sub_64B3B0

loc_6E8CF7:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E8D00:
xor	ebp, ebp
jmp	loc_6E8C7E
sub_6E8BF0 endp

align 10h



sub_6E8D10 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+18h]
test	ecx, ecx
jz	loc_6E8DB3
push	edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+280h]
push	0
push	7
push	offset aUnknown_0 ; "UNKNOWN"
mov	edi, eax
call	sub_650E40
mov	[esp+8+arg_0], eax
inc	dword ptr [eax+8]
test	edi, edi
jz	short loc_6E8D6F
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
push	eax
lea	ecx, [esp+0Ch+arg_0]
call	sub_6513F0

loc_6E8D6F:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
jb	short loc_6E8D7E
mov	ecx, esi
call	sub_652060

loc_6E8D7E:
mov	byte ptr [esi],	5
mov	eax, [esp+8+arg_0]
mov	[esi+4], eax
mov	eax, [esp+8+arg_0]
inc	dword ptr [eax+8]
mov	eax, [esp+8+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E8DA5
call	sub_650DF0

loc_6E8DA5:
test	edi, edi
jz	short loc_6E8DB2
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A430

loc_6E8DB2:
pop	edi

loc_6E8DB3:
pop	esi
retn
sub_6E8D10 endp

align 10h



sub_6E8DC0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
mov	ecx, [edi+18h]
test	ecx, ecx
jz	loc_6E8E53
push	ebx
push	esi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	esi, eax
xor	bl, bl
test	esi, esi
jz	short loc_6E8E33
mov	ebx, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esp+0Ch+arg_0]
mov	eax, [edx]
mov	edx, [esi]
push	eax
mov	eax, [edx+3Ch]
mov	ecx, esi
call	eax
mov	bl, al
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E8E33
call	sub_650DF0

loc_6E8E33:
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	[edi+4], bl
test	esi, esi
jz	short loc_6E8E51
mov	ecx, esi
pop	esi
pop	ebx
pop	edi
jmp	sub_64A430

loc_6E8E51:
pop	esi
pop	ebx

loc_6E8E53:
pop	edi
retn
sub_6E8DC0 endp

align 10h



sub_6E8E60 proc	near

var_C= qword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
mov	ecx, [ebp+18h]
test	ecx, ecx
jz	loc_6E8EFA
push	ebx
push	esi
push	edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	esi, eax
xor	bl, bl
test	esi, esi
jz	short loc_6E8ED6
mov	ecx, [ebp+18h]
mov	edi, [esi]
push	ecx
push	0
mov	ecx, ebp
add	edi, 4
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+18h+arg_0]
movzx	eax, word ptr [esp+18h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C+4], eax
mov	eax, [edi]
mov	ecx, esi
fldcw	word ptr [esp+18h+var_C+4]
fistp	[esp+18h+var_C+4]
mov	edx, dword ptr [esp+18h+var_C+4]
push	edx
fldcw	word ptr [esp+1Ch+arg_0]
call	eax
mov	bl, al

loc_6E8ED6:
mov	edi, [ebp+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	[edi+4], bl
pop	edi
test	esi, esi
jz	short loc_6E8EF8
mov	ecx, esi
pop	esi
pop	ebx
pop	ebp
add	esp, 8
jmp	sub_64A430

loc_6E8EF8:
pop	esi
pop	ebx

loc_6E8EFA:
pop	ebp
add	esp, 8
retn
sub_6E8E60 endp

align 10h



sub_6E8F00 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
mov	ecx, [ebp+18h]
test	ecx, ecx
jz	short loc_6E8F71
push	ebx
push	esi
push	edi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	esi, eax
xor	bl, bl
test	esi, esi
jz	short loc_6E8F50
mov	ecx, [ebp+18h]
mov	edi, [esi]
push	ecx
push	0
mov	ecx, ebp
add	edi, 0Ch
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
movzx	edx, al
mov	eax, [edi]
push	edx
mov	ecx, esi
call	eax
mov	bl, al

loc_6E8F50:
mov	edi, [ebp+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	[edi+4], bl
pop	edi
test	esi, esi
jz	short loc_6E8F6F
mov	ecx, esi
pop	esi
pop	ebx
pop	ebp
jmp	sub_64A430

loc_6E8F6F:
pop	esi
pop	ebx

loc_6E8F71:
pop	ebp
retn
sub_6E8F00 endp

align 10h



sub_6E8F80 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
mov	ecx, [edi+18h]
test	ecx, ecx
jz	short loc_6E8FCE
push	esi
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Bh
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6E8FCD
mov	edx, [esi]
mov	eax, [edx+10h]
push	ebx
mov	ecx, esi
call	eax
mov	edi, [edi+4]
mov	ecx, edi
mov	bl, al
call	sub_652060
mov	[edi+4], bl
pop	ebx
mov	ecx, esi
pop	esi
mov	byte ptr [edi],	2
pop	edi
jmp	sub_64A430

loc_6E8FCD:
pop	esi

loc_6E8FCE:
pop	edi
retn
sub_6E8F80 endp




sub_6E8FD0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+28h+arg_0]
push	offset sub_664030
mov	ebx, ecx
push	edi
mov	[esp+30h+var_14], ebx
call	sub_67C3D0
lea	esi, [ebx+10h]
push	esi
push	edi
mov	dword ptr [ebx], offset	off_143D130
mov	dword ptr [esi], offset	off_1439710
call	sub_6C2A50
push	7
push	offset off_143D0F8
push	edi
push	esi
call	sub_66FC60
xor	eax, eax
add	esp, 18h
mov	[esp+28h+var_18], eax
cmp	ds:off_143D0B0,	eax
jz	loc_6E90D6
mov	ecx, offset off_143D0B0
push	ebp
lea	ebx, [ebx+0]

loc_6E9030:
mov	eax, ds:dword_143D0B4[eax]
mov	edx, [ecx]
mov	ecx, [edi]
mov	[esp+2Ch+var_C], eax
mov	byte ptr [esp+2Ch+arg_0], 7
mov	[esp+2Ch+var_10], 4
mov	ebp, [ecx+280h]
mov	eax, edx
lea	ecx, [eax+1]

loc_6E9053:
mov	bl, [eax]
inc	eax
test	bl, bl
jnz	short loc_6E9053
sub	eax, ecx
push	0
push	eax
push	edx
mov	ecx, ebp
call	sub_650E40
mov	[esp+2Ch+var_1C], eax
inc	dword ptr [eax+8]
mov	edx, [esi]
mov	edx, [edx+28h]
lea	eax, [esp+2Ch+arg_0]
push	eax
lea	ecx, [esp+30h+var_10]
push	ecx
lea	eax, [esp+34h+var_1C]
push	eax
push	edi
mov	ecx, esi
call	edx
mov	eax, [esp+2Ch+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E909D
call	sub_650DF0

loc_6E909D:
lea	ecx, [esp+2Ch+var_10]
call	sub_652830
mov	eax, [esp+2Ch+var_18]
inc	eax
mov	[esp+2Ch+var_18], eax
add	eax, eax
add	eax, eax
add	eax, eax
cmp	ds:off_143D0B0[eax], 0
lea	ecx, off_143D0B0[eax]
jnz	loc_6E9030
mov	eax, [esp+2Ch+var_14]
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4

loc_6E90D6:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 1Ch
retn	4
sub_6E8FD0 endp

align 10h



sub_6E90F0 proc	near
xor	eax, eax
retn	4
sub_6E90F0 endp

align 10h



sub_6E9100 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6B6B70
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143D068
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143A794
mov	dword ptr [esi+10h], offset off_1439258
mov	dword ptr [ecx], offset	off_1439254
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6E9100 endp

align 10h



sub_6E9150 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
test	eax, eax
jz	short loc_6E9186
lea	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, eax
call	sub_6E8FD0
jmp	short loc_6E9188

loc_6E9186:
xor	eax, eax

loc_6E9188:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	54h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E9260
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6E9100
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E91DE
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E91DE:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 16h
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E920C
call	sub_64B3B0

loc_6E920C:
mov	edx, [esi+29Ch]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+60h]
push	ecx
mov	ecx, [esi+29Ch]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E9257
mov	ecx, ebp
call	sub_64B3B0

loc_6E9257:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E9260:
xor	ebp, ebp
jmp	loc_6E91DE
sub_6E9150 endp

align 10h



sub_6E9270 proc	near

arg_0= byte ptr	 4

sub	ecx, 34h
jmp	sub_6E98D0
sub_6E9270 endp

align 10h



sub_6E9280 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
cmp	byte ptr [edi+7Ch], 6
mov	eax, [edi+78h]
push	0
push	9
mov	[esp+1Ch+var_4], ecx
mov	ecx, [eax+280h]
push	offset aAvailable ; "available"
setnbe	bl
call	sub_650E40
mov	esi, eax
inc	dword ptr [esi+8]
test	bl, bl
jz	short loc_6E92BD
mov	ebp, [esp+14h+arg_4]
cmp	esi, [ebp+0]
jmp	short loc_6E92E5

loc_6E92BD:
cmp	dword ptr [esi+4], 0
jnz	short loc_6E92CA
mov	ecx, esi
call	sub_651580

loc_6E92CA:
mov	ebp, [esp+14h+arg_4]
mov	ecx, [ebp+0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_6E92DC
call	sub_651580

loc_6E92DC:
mov	ecx, [ebp+0]
mov	edx, [esi+4]
cmp	edx, [ecx+4]

loc_6E92E5:
setz	bl
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_6E92F5
mov	ecx, esi
call	sub_650DF0

loc_6E92F5:
test	bl, bl
jz	short loc_6E9326
mov	ecx, edi
call	sub_668010
mov	esi, [esp+14h+arg_8]
mov	edi, [eax+104h]
mov	ecx, esi
call	sub_652060
test	edi, edi
setnz	al
pop	edi
mov	[esi+4], al
mov	byte ptr [esi],	2
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	0Ch

loc_6E9326:
mov	ecx, [esp+14h+arg_8]
push	ecx
mov	ecx, [esp+18h+var_4]
push	ebp
push	edi
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_6E9280 endp

align 10h



sub_6E9340 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	ecx, [esp+arg_0]
call	sub_651C20
test	eax, eax
jz	short locret_6E9362
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+arg_8]
push	ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	21h
mov	ecx, eax
call	edx

locret_6E9362:
retn
sub_6E9340 endp

align 10h



sub_6E9370 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	esi
push	edi
push	offset sub_6FE350
push	ebx
mov	esi, ecx
call	sub_67C3D0
lea	eax, [esp+1Ch+var_10]
push	eax
lea	edi, [esi+10h]
push	offset aAvailable ; "available"
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_143D220
mov	dword ptr [edi], offset	off_143D1C8
mov	[esp+28h+var_10], 0Ah
call	sub_669260
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
push	7
push	offset off_143D18C
push	ebx
push	edi
call	sub_66FC60
add	esp, 10h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_6E9370 endp

align 10h



sub_6E93E0 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= qword ptr -108h
var_100= dword ptr -100h
var_F0=	byte ptr -0F0h
arg_0= dword ptr  4

sub	esp, 118h
push	ebp
push	edi
mov	edi, [esp+120h+arg_0]
mov	ecx, [edi+18h]
call	sub_668010
xor	ebp, ebp
mov	[esp+120h+var_110], eax
cmp	[eax+104h], ebp
jz	loc_6E95E3
mov	ecx, [eax+2844h]
push	esi
mov	[esp+124h+var_100], ecx
lea	esi, [ebp+1]
cmp	ecx, ebp
jz	short loc_6E9432
push	1Fh
push	esi
call	sub_6B3270
call	sub_6B2210
mov	dword ptr [esp+124h+var_108], eax
mov	dword ptr [esp+124h+var_108+4],	edx
jmp	short loc_6E943A

loc_6E9432:
mov	dword ptr [esp+124h+var_108], ebp
mov	dword ptr [esp+124h+var_108+4],	ebp

loc_6E943A:
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
push	ebx
mov	ebx, [ecx+8]
add	[ebx+8], esi
cmp	[edi+1Ch], esi
mov	[esp+128h+var_118], ebx
jl	loc_6E94D5
mov	ebp, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebp
lea	edx, [esp+134h+var_10C]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+128h+var_10C]
add	[eax+8], esi
add	dword ptr [ebx+8], 0FFFFFFFFh
mov	ebp, eax
jnz	short loc_6E9487
mov	ecx, ebx
call	sub_650DF0

loc_6E9487:
mov	eax, [esp+128h+var_10C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
mov	[esp+128h+var_118], ebp
jnz	short loc_6E94A1
call	sub_650DF0

loc_6E94A1:
mov	ebp, [edi+1Ch]
sub	ebp, esi
cmp	ebp, 0Ah
jbe	short loc_6E94D1
mov	eax, [edi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [ebp+ebp*2+0]
add	eax, eax
add	eax, eax
push	0
add	eax, eax
push	eax
call	edx
mov	ebx, [esp+128h+var_118]
jmp	short loc_6E94D9

loc_6E94D1:
mov	ebx, [esp+128h+var_118]

loc_6E94D5:
lea	eax, [esp+128h+var_F0]

loc_6E94D9:
mov	[esp+128h+var_114], eax
xor	eax, eax
test	ebp, ebp
jbe	short loc_6E9522
mov	esi, [esp+128h+var_114]

loc_6E94E7:
lea	ebx, [eax+1]
push	ebx
mov	ecx, edi
call	sub_651EC0
xor	ecx, ecx
cmp	esi, ecx
jz	short loc_6E9506
mov	[esi+8], ecx
mov	[esi+0Ch], ecx
mov	dword ptr [esi], offset	off_154CB6C
mov	ecx, esi

loc_6E9506:
push	ecx
mov	ecx, [edi+18h]
push	eax
push	ecx
mov	ecx, [esp+134h+var_110]
call	sub_64BBC0
mov	eax, ebx
add	esi, 18h
cmp	eax, ebp
jb	short loc_6E94E7
mov	ebx, [esp+128h+var_118]

loc_6E9522:
mov	esi, [esp+128h+var_110]
add	esi, 23CCh
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
cmp	dword ptr [ebx+10h], 0
jnz	short loc_6E9546
mov	[esp+128h+var_118], 0
jmp	short loc_6E954C

loc_6E9546:
mov	edx, [ebx]
mov	[esp+128h+var_118], edx

loc_6E954C:
mov	eax, [esp+128h+var_110]
mov	ecx, [eax+104h]
mov	eax, [esp+128h+var_114]
mov	edx, [ecx]
mov	edx, [edx+4]
push	ebp
push	eax
mov	eax, [esp+130h+var_118]
push	eax
mov	eax, [esp+134h+var_110]
push	eax
call	edx
mov	ecx, [edi+4]
push	esi
call	sub_652520
test	ebp, ebp
jbe	short loc_6E9592
mov	edi, [esp+128h+var_114]
mov	esi, ebp

loc_6E9580:
mov	eax, [edi]
mov	edx, [eax]
push	0
mov	ecx, edi
call	edx
add	edi, 18h
sub	esi, 1
jnz	short loc_6E9580

loc_6E9592:
cmp	ebp, 3Ch
jbe	short loc_6E95A9
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+128h+var_114]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6E95A9:
add	dword ptr [ebx+8], 0FFFFFFFFh
jnz	short loc_6E95B6
mov	ecx, ebx
call	sub_650DF0

loc_6E95B6:
mov	esi, [esp+128h+var_100]
pop	ebx
test	esi, esi
jz	short loc_6E95D9
call	sub_6B2210
sub	eax, dword ptr [esp+124h+var_108]
mov	ecx, esi
sbb	edx, dword ptr [esp+124h+var_108+4]
push	edx
push	eax
push	1Fh
push	1
call	sub_6B3C90

loc_6E95D9:
pop	esi
pop	edi
pop	ebp
add	esp, 118h
retn

loc_6E95E3:		; "Warning: ExternalInterface.call - handl"...
push	offset aWarningExterna
push	edi
call	sub_6E9340
mov	edi, [edi+4]
add	esp, 8
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
pop	edi
pop	ebp
add	esp, 118h
retn
sub_6E93E0 endp

align 10h



sub_6E9610 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
cmp	dword ptr [esi+1Ch], 3
jl	loc_6E9784
mov	ecx, [esi+18h]
push	ebx
push	ebp
call	sub_668010
mov	edi, [esi+18h]
push	0
mov	ecx, esi
mov	[esp+24h+var_10], eax
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+18h]
push	edx
lea	eax, [esp+24h+var_C]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652DC0
push	1
mov	ecx, esi
xor	edi, edi
xor	ebx, ebx
call	sub_651EC0
cmp	byte ptr [eax],	7
jnz	short loc_6E96C5
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651BB0
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E96EC
inc	dword ptr [ebp+4]
mov	eax, [ebp+94h]
test	eax, eax
jnz	short loc_6E96B8
mov	ecx, ebp
call	sub_658B70
test	eax, eax
jz	short loc_6E96BA

loc_6E96B8:
inc	dword ptr [eax]

loc_6E96BA:
mov	ecx, ebp
mov	edi, eax
call	sub_64A400
jmp	short loc_6E96EC

loc_6E96C5:
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
test	eax, eax
jz	short loc_6E96EA
mov	ecx, [eax+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[eax+8], ecx

loc_6E96EA:
mov	ebx, eax

loc_6E96EC:
mov	ecx, [esp+20h+var_10]
lea	edx, [esp+20h+var_C]
push	edx
push	ebx
push	edi
lea	eax, [esp+2Ch+arg_0]
push	eax
call	sub_6A00B0
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1
xor	esi, esi
cmp	ebx, esi
jz	short loc_6E971F
mov	ecx, ebx
call	sub_64B3B0

loc_6E971F:
pop	ebp
pop	ebx
cmp	edi, esi
jz	short loc_6E9740
dec	dword ptr [edi]
cmp	[edi], esi
jg	short loc_6E9740
mov	ecx, edi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6E9740:
test	[esp+18h+var_4], 2
jnz	short loc_6E9754
mov	ecx, [esp+18h+var_C]
cmp	ecx, esi
jz	short loc_6E9754
call	sub_64B3B0

loc_6E9754:
test	[esp+18h+var_4], 1
mov	[esp+18h+var_C], esi
jnz	short loc_6E976C
mov	ecx, [esp+18h+var_8]
cmp	ecx, esi
jz	short loc_6E976C
call	sub_64B3B0

loc_6E976C:
mov	eax, [esp+18h+arg_0]
mov	ecx, eax
add	eax, 8
mov	[esp+18h+var_8], esi
dec	dword ptr [eax]
cmp	[eax], esi
jnz	short loc_6E9784
call	sub_650DF0

loc_6E9784:
pop	edi
pop	esi
add	esp, 10h
retn
sub_6E9610 endp

align 10h



sub_6E9790 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
lea	edi, [ebx+78h]
push	0
push	34h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6E97E5
push	ebx
mov	ecx, esi
call	sub_663BE0
lea	ebx, [esi+10h]
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [ebx], offset	off_143D2A8
mov	ecx, [edi]
push	1Ch
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_6E97E5:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6E9790 endp

align 10h



sub_6E97F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143D2A8
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143D1A4
mov	dword ptr [edi], offset	off_143D300
mov	dword ptr [ecx], offset	off_143A1D4
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6E97F0 endp

align 10h



sub_6E9870 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6E97F0
lea	edx, [esp+8+arg_8]
push	edx
push	offset unk_143D184
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143D1A4
mov	dword ptr [esi+10h], offset off_143D300
mov	dword ptr [ecx], offset	off_143A1D4
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6E9870 endp

align 10h



sub_6E98C0 proc	near
sub	ecx, 10h
jmp	sub_6E98D0
sub_6E98C0 endp

align 10h



sub_6E98D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143D1A4
mov	dword ptr [esi+10h], offset off_143D300
mov	dword ptr [ecx], offset	off_143A1D4
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6E990A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E990A:
mov	eax, esi
pop	esi
retn	4
sub_6E98D0 endp




sub_6E9910 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
test	eax, eax
jz	short loc_6E9946
lea	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, eax
call	sub_6E9370
jmp	short loc_6E9948

loc_6E9946:
xor	eax, eax

loc_6E9948:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	54h
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6E9A20
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6E9870
mov	ebp, eax
test	ebp, ebp
jz	short loc_6E999E
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6E999E:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 1Ch
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6E99CC
call	sub_64B3B0

loc_6E99CC:
mov	edx, [esi+2A0h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+78h]
push	ecx
mov	ecx, [esi+2A0h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6E9A17
mov	ecx, ebp
call	sub_64B3B0

loc_6E9A17:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6E9A20:
xor	ebp, ebp
jmp	loc_6E999E
sub_6E9910 endp

align 10h



sub_6E9A30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	eax, [edi]
mov	esi, [eax]
mov	edx, offset aWidth ; "width"
mov	eax, esi

loc_6E9A42:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6E9A62
test	bl, bl
jz	short loc_6E9A5E
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6E9A62
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6E9A42

loc_6E9A5E:
xor	eax, eax
jmp	short loc_6E9A67

loc_6E9A62:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E9A67:
test	eax, eax
jz	short loc_6E9AB6
mov	edx, offset aHeight ; "height"
mov	eax, esi

loc_6E9A72:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6E9A92
test	bl, bl
jz	short loc_6E9A8E
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6E9A92
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6E9A72

loc_6E9A8E:
xor	eax, eax
jmp	short loc_6E9A97

loc_6E9A92:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E9A97:
test	eax, eax
jz	short loc_6E9AB6
mov	edx, [esp+0Ch+arg_C]
mov	eax, [esp+0Ch+arg_8]
push	edx
mov	edx, [esp+10h+arg_0]
push	eax
push	edi
push	edx
call	sub_665190
pop	edi
pop	esi
pop	ebx
retn	10h

loc_6E9AB6:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	10h
sub_6E9A30 endp

align 10h



sub_6E9AC0 proc	near
mov	eax, 1Ah
retn
sub_6E9AC0 endp

align 10h



sub_6E9AD0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6E9B20
align 10h

loc_6E9AE0:
push	esi
mov	esi, ecx
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_6E9AEF
call	sub_666B00

loc_6E9AEF:
mov	dword ptr [esi+34h], 0
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_6E9B02
call	sub_666B00

loc_6E9B02:
mov	dword ptr [esi+38h], 0
mov	ecx, esi
pop	esi
jmp	sub_664580
align 10h

loc_6E9B20:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143D3D4
mov	dword ptr [esi+10h], offset off_143D380
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_6E9B3C
call	sub_666B00

loc_6E9B3C:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_6E9B48
call	sub_666B00

loc_6E9B48:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6E9B64
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6E9B64:
mov	eax, esi
pop	esi
retn	4
sub_6E9AD0 endp

align 10h



sub_6E9B70 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_8= byte ptr	 0Ch

sub	esp, 14h
push	esi
mov	esi, [esp+18h+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [esi+78h]
add	esi, 78h
push	1Eh
call	sub_66FB00
mov	edx, [edi+10h]
add	edi, 10h
push	eax
mov	eax, [edx+34h]
push	esi
mov	ecx, edi
call	eax
mov	ecx, [esi]
push	0
push	5
mov	[esp+1Ch+arg_8], 4
mov	[esp+1Ch+var_8], 0Ah
mov	ecx, [ecx+280h]
push	offset aWidth	; "width"
call	sub_650E40
mov	[esp+14h+var_C], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+14h+arg_8]
push	eax
lea	ecx, [esp+18h+var_8]
push	ecx
lea	eax, [esp+1Ch+var_C]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, [esp+14h+var_C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6E9BED
call	sub_650DF0

loc_6E9BED:
lea	ecx, [esp+14h+var_8]
call	sub_652830
mov	eax, [esi]
push	0
push	6
mov	[esp+1Ch+arg_8], 4
mov	[esp+1Ch+var_8], 0Ah
mov	ecx, [eax+280h]
push	offset aHeight	; "height"
call	sub_650E40
mov	[esp+14h+var_C], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+14h+arg_8]
push	eax
lea	ecx, [esp+18h+var_8]
push	ecx
lea	eax, [esp+1Ch+var_C]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, [esp+1Ch+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	esi
jnz	short loc_6E9C4E
call	sub_650DF0

loc_6E9C4E:
lea	ecx, [esp+14h+var_10]
call	sub_652830
add	esp, 14h
retn	4
sub_6E9B70 endp

align 10h



sub_6E9C60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [ecx+24h]
test	edi, edi
jz	loc_6E9D4C
mov	eax, [ebp+0]
mov	esi, [eax]
mov	edx, offset aWidth ; "width"
mov	eax, esi
nop

loc_6E9C80:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6E9CA0
test	bl, bl
jz	short loc_6E9C9C
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6E9CA0
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6E9C80

loc_6E9C9C:
xor	eax, eax
jmp	short loc_6E9CA5

loc_6E9CA0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E9CA5:
test	eax, eax
jnz	short loc_6E9CEE
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6E9CBB
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax
mov	edi, eax
jmp	short loc_6E9CBD

loc_6E9CBB:
xor	edi, edi

loc_6E9CBD:
mov	esi, [esp+10h+arg_8]
cmp	byte ptr [esi],	5
jb	short loc_6E9CCD
mov	ecx, esi
call	sub_652060

loc_6E9CCD:
mov	[esp+10h+arg_8], edi
fild	[esp+10h+arg_8]

loc_6E9CD5:
mov	byte ptr [esi],	3
test	edi, edi
jge	short loc_6E9CE2
fadd	ds:dbl_15FCE08

loc_6E9CE2:
pop	edi
fstp	qword ptr [esi+4]
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	0Ch

loc_6E9CEE:		; "height"
mov	edx, offset aHeight
mov	eax, esi

loc_6E9CF5:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6E9D15
test	bl, bl
jz	short loc_6E9D11
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6E9D15
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6E9CF5

loc_6E9D11:
xor	eax, eax
jmp	short loc_6E9D1A

loc_6E9D15:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6E9D1A:
test	eax, eax
jnz	short loc_6E9D4C
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6E9D30
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	edi, eax
jmp	short loc_6E9D32

loc_6E9D30:
xor	edi, edi

loc_6E9D32:
mov	esi, [esp+10h+arg_8]
cmp	byte ptr [esi],	5
jb	short loc_6E9D42
mov	ecx, esi
call	sub_652060

loc_6E9D42:
mov	[esp+10h+arg_8], edi
fild	[esp+10h+arg_8]
jmp	short loc_6E9CD5

loc_6E9D4C:
mov	edx, [esp+10h+arg_8]
mov	eax, [esp+10h+arg_0]
push	edx
push	ebp
push	eax
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6E9C60 endp

align 10h



sub_6E9D70 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
test	eax, eax
jz	short loc_6E9D9B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+58h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6E9D9B:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_6E9DA7
call	sub_666B00

loc_6E9DA7:
mov	dword ptr [esi+34h], 0
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_6E9DBA
call	sub_666B00

loc_6E9DBA:
mov	dword ptr [esi+38h], 0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6E9D70 endp

align 10h



sub_6E9DD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_663BE0
xor	eax, eax
mov	dword ptr [esi], offset	off_143D3D4
mov	dword ptr [esi+10h], offset off_143D380
mov	[esi+34h], eax
push	edi
mov	ecx, esi
mov	[esi+38h], eax
call	sub_6E9B70
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6E9DD0 endp

align 10h



sub_6E9E10 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+40h]
call	sub_67C000
lea	ecx, [edi+4Ch]
call	sub_67C000
mov	eax, [edi+58h]
test	eax, eax
jz	short loc_6E9E80
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E9E7E
lea	ebx, [ebx+0]

loc_6E9E40:
mov	eax, [edi+58h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E9E79
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_6E9E79
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6E9E79:
inc	esi
cmp	esi, ebx
jb	short loc_6E9E40

loc_6E9E7E:
pop	esi
pop	ebx

loc_6E9E80:
pop	edi
retn
sub_6E9E10 endp

align 10h



sub_6E9E90 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+40h]
call	sub_67C070
lea	ecx, [edi+4Ch]
call	sub_67C070
mov	eax, [edi+58h]
test	eax, eax
jz	short loc_6E9F0D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6E9F0B
lea	ebx, [ebx+0]

loc_6E9EC0:
mov	eax, [edi+58h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6E9F06
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6E9F06
test	eax, 0FFFFFFFh
jbe	short loc_6E9EF1
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6E9EFD

loc_6E9EF1:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6E9EFD:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6E9F06:
inc	esi
cmp	esi, ebx
jb	short loc_6E9EC0

loc_6E9F0B:
pop	esi
pop	ebx

loc_6E9F0D:
pop	edi
retn
sub_6E9E90 endp

align 10h



sub_6E9F10 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_40=	byte ptr -40h
var_30=	byte ptr -30h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 60h
push	ebx
push	ebp
push	esi
mov	esi, [esp+6Ch+arg_4]
xor	ebx, ebx
push	edi
mov	ebp, ecx
cmp	esi, ebx
jz	short loc_6E9F2A
mov	ecx, esi
call	sub_64A420

loc_6E9F2A:
mov	ecx, [ebp+34h]
cmp	ecx, ebx
jz	short loc_6E9F36
call	sub_666B00

loc_6E9F36:
mov	edi, [esp+70h+arg_8]
mov	[ebp+34h], esi
cmp	edi, ebx
jz	short loc_6E9F48
mov	ecx, edi
call	sub_64A420

loc_6E9F48:
mov	ecx, [ebp+38h]
cmp	ecx, ebx
jz	short loc_6E9F54
call	sub_666B00

loc_6E9F54:
mov	[ebp+38h], edi
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+70h+var_60]
push	edx
call	eax
lea	ecx, [esp+70h+var_50]
push	ecx
lea	ecx, [esp+74h+var_40]
mov	[esp+74h+var_40], bl
mov	[esp+74h+var_30], bl
mov	[esp+74h+var_20], bl
mov	[esp+74h+var_10], bl
mov	byte ptr [esp+74h+var_50], 4
mov	dword ptr [esp+74h+var_50+4], ebx
call	sub_652520
lea	ecx, [esp+70h+var_50]
call	sub_652830
lea	edx, [esp+70h+var_50]
push	edx
lea	ecx, [esp+74h+var_30]
mov	byte ptr [esp+74h+var_50], 4
mov	dword ptr [esp+74h+var_50+4], ebx
call	sub_652520
lea	ecx, [esp+70h+var_50]
call	sub_652830
mov	eax, [esp+70h+var_58]
sub	eax, [esp+70h+var_60]
lea	ecx, [esp+70h+var_50]
mov	[esp+70h+arg_4], eax
fild	[esp+70h+arg_4]
push	ecx
lea	ecx, [esp+74h+var_20]
fstp	[esp+74h+var_50+4]
mov	byte ptr [esp+74h+var_50], 3
call	sub_652520
lea	ecx, [esp+70h+var_50]
call	sub_652830
mov	edx, [esp+70h+var_54]
sub	edx, [esp+70h+var_5C]
lea	eax, [esp+70h+var_50]
mov	[esp+70h+arg_4], edx
fild	[esp+70h+arg_4]
push	eax
lea	ecx, [esp+74h+var_10]
fstp	[esp+74h+var_50+4]
mov	byte ptr [esp+74h+var_50], 3
call	sub_652520
lea	ecx, [esp+70h+var_50]
call	sub_652830
mov	ecx, [esp+70h+arg_0]
mov	eax, [ecx+78h]
lea	esi, [ecx+78h]
push	0FFFFFFFFh
push	ebx
lea	edx, [eax+44h]
mov	eax, [eax+298h]
push	edx
push	eax
call	sub_671840
lea	ecx, [esp+70h+var_40]
push	ecx
mov	edi, eax
push	esi
mov	ecx, edi
call	sub_6E3960
mov	edx, [esi]
push	ebx
push	9
mov	byte ptr [esp+78h+arg_4], 4
mov	ecx, [edx+280h]
push	offset aRectangle_0 ; "rectangle"
call	sub_650E40
mov	[esp+70h+arg_8], eax
inc	dword ptr [eax+8]
mov	ebx, [ebp+10h]
lea	eax, [esp+70h+arg_4]
add	ebp, 10h
push	eax
push	edi
lea	ecx, [esp+78h+var_50]
call	sub_652700
mov	edx, [ebx+28h]
push	eax
lea	ecx, [esp+78h+arg_8]
push	ecx
push	esi
mov	ecx, ebp
call	edx
mov	eax, [esp+70h+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EA0A2
call	sub_650DF0

loc_6EA0A2:
lea	ecx, [esp+70h+var_50]
call	sub_652830
test	edi, edi
jz	short loc_6EA0B6
mov	ecx, edi
call	sub_64B3B0

loc_6EA0B6:
lea	esi, [esp+70h]
mov	edi, 3
nop

loc_6EA0C0:
sub	esi, 10h
mov	ecx, esi
call	sub_652830
sub	edi, 1
jns	short loc_6EA0C0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn	0Ch
sub_6E9F10 endp

align 10h



sub_6EA0E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	0
push	3Ch
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6EA135
push	edi
mov	edi, [ebx+18h]
push	edi
mov	ecx, esi
call	sub_663BE0
mov	dword ptr [esi], offset	off_143D3D4
mov	dword ptr [esi+10h], offset off_143D380
mov	dword ptr [esi+34h], 0
push	edi
mov	ecx, esi
mov	dword ptr [esi+38h], 0
call	sub_6E9B70
pop	edi
jmp	short loc_6EA137

loc_6EA135:
xor	esi, esi

loc_6EA137:
mov	ecx, [ebx+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6EA14D
mov	ecx, esi
pop	esi
pop	ebx
jmp	sub_64B3B0

loc_6EA14D:
pop	esi
pop	ebx
retn
sub_6EA0E0 endp




sub_6EA150 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_143D3D4
mov	dword ptr [edi], offset	off_143D380
xor	ebx, ebx
push	eax
mov	[esi+34h], ebx
push	ebp
mov	ecx, edi
mov	[esi+38h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+3Ch]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_143D454
mov	dword ptr [edi], offset	off_143D400
mov	dword ptr [ecx], offset	off_143D3F8
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6EA150 endp

align 10h



sub_6EA1D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax+74h]
mov	edx, [ecx]
mov	eax, [edx+5Ch]
push	ebx
push	ebp
push	esi
xor	ebx, ebx
push	edi
mov	[esp+28h+var_14], ebx
call	eax
mov	esi, eax
mov	[esp+28h+var_10], esi
cmp	esi, ebx
jz	loc_6EA514
mov	ecx, esi
call	sub_64A420
mov	ecx, [esp+28h+arg_4]
mov	edi, [ecx]
mov	ebp, ds:InterlockedExchangeAdd
and	edi, 0FFFFFFFCh
mov	al, [edi+8]
add	edi, 8
mov	byte ptr [esp+28h+var_18+3], bl
cmp	al, 69h
jz	short loc_6EA225
cmp	al, 49h
jnz	loc_6EA3FF

loc_6EA225:
lea	edx, [esp+28h+var_C]
push	edx
call	sub_67B250
push	6
push	ebx
lea	eax, [esp+30h+var_8]
push	eax
lea	ecx, [esp+34h+var_C]
call	sub_67B0C0
mov	eax, [eax]
and	eax, 0FFFFFFFCh
mov	ecx, offset aImg ; "img://"
add	eax, 8
lea	ecx, [ecx+0]

loc_6EA250:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EA270
test	dl, dl
jz	short loc_6EA26C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EA270
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EA250

loc_6EA26C:
xor	eax, eax
jmp	short loc_6EA275

loc_6EA270:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EA275:
mov	esi, [esp+28h+var_8]
cmp	eax, ebx
setz	bl
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6EA29C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6EA29C:
test	bl, bl
jnz	short loc_6EA2E6
push	offset aImgps	; "imgps://"
push	8
push	0
lea	ecx, [esp+34h+var_8]
push	ecx
lea	ecx, [esp+38h+var_C]
call	sub_67B0C0
mov	ecx, eax
call	sub_654870
mov	esi, [esp+28h+var_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
mov	bl, al
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6EA2E2
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EA2E2:
test	bl, bl
jz	short loc_6EA2EB

loc_6EA2E6:
mov	byte ptr [esp+28h+var_18+3], 1

loc_6EA2EB:
mov	esi, [esp+28h+var_C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6EA30D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6EA30D:
cmp	byte ptr [esp+28h+var_18+3], 0
jz	loc_6EA3F5
mov	ebx, [esp+28h+arg_0]
mov	ecx, ebx
call	sub_668010
add	eax, 0F0h
mov	eax, [eax]
test	eax, eax
jz	short loc_6EA333
lea	esi, [eax+8]
jmp	short loc_6EA335

loc_6EA333:
xor	esi, esi

loc_6EA335:
mov	ecx, [ebx+78h]
mov	edx, [esi]
mov	ebp, [ecx+294h]
mov	eax, [edx+0Ch]
push	4
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	ebx, eax
mov	eax, [edx+0Ch]
push	5
mov	ecx, esi
call	eax
push	ebp
mov	esi, eax
push	ebx
push	esi
push	edi
call	sub_704250
add	esp, 10h
mov	[esp+28h+var_C], eax
test	esi, esi
jz	short loc_6EA373
mov	ecx, esi
call	sub_64A430

loc_6EA373:
test	ebx, ebx
jz	short loc_6EA37E
mov	ecx, ebx
call	sub_64A430

loc_6EA37E:
cmp	[esp+28h+var_C], 0
jz	short loc_6EA3CD
mov	edx, [ebp+0]
mov	eax, [edx+28h]
push	0
push	3Ch
mov	ecx, ebp
call	eax
test	eax, eax
jz	short loc_6EA3A9
mov	ecx, [esp+28h+arg_0]
push	ecx
mov	ecx, eax
call	sub_6E9DD0
mov	[esp+28h+var_14], eax
jmp	short loc_6EA3B1

loc_6EA3A9:
mov	[esp+28h+var_14], 0

loc_6EA3B1:
mov	esi, [esp+28h+var_C]
mov	edx, [esp+28h+arg_0]
mov	ecx, [esp+28h+var_14]
push	0
push	esi
push	edx
call	sub_6E9F10
mov	ecx, esi
jmp	loc_6EA506

loc_6EA3CD:
mov	eax, [esp+28h+arg_0]
push	edi
push	offset aGasbitmapdataL ; "GASBitmapData::LoadBitmap: LoadMovieIma"...
push	eax
call	sub_66D3C0
mov	ecx, [esp+34h+var_10]
add	esp, 0Ch
call	sub_666B00
mov	eax, [esp+28h+var_14]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6EA3F5:
mov	ecx, [esp+28h+arg_4]
mov	esi, [esp+28h+var_10]
xor	ebx, ebx

loc_6EA3FF:
mov	ecx, [ecx]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
lea	ecx, [esp+2Ch+var_C]
mov	[esp+2Ch+var_8], ebx
mov	[esp+2Ch+var_4], ebx
call	sub_67AE10
mov	ecx, [esp+28h+arg_0]
lea	edx, [esp+28h+var_C]
push	edx
lea	eax, [esp+2Ch+var_8]
push	eax
push	esi
call	sub_668010
mov	ecx, eax
call	sub_68F5F0
mov	esi, [esp+28h+var_C]
test	al, al
setz	bl
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6EA45B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6EA45B:
mov	ecx, [esp+28h+var_8]
test	bl, bl
jz	short loc_6EA47F
test	ecx, ecx
jz	short loc_6EA46C
call	sub_666B00

loc_6EA46C:
mov	ecx, [esp+28h+var_10]
call	sub_666B00
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 18h
retn

loc_6EA47F:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 100h
jz	short loc_6EA4B2
mov	ecx, [esp+28h+var_8]
test	ecx, ecx
jz	short loc_6EA49F
call	sub_666B00

loc_6EA49F:
mov	ecx, [esp+28h+var_10]
call	sub_666B00
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 18h
retn

loc_6EA4B2:
mov	eax, [esp+28h+var_8]
mov	esi, eax
test	eax, eax
jz	short loc_6EA50B
mov	edi, [esp+28h+arg_0]
mov	ecx, [edi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	3Ch
call	eax
test	eax, eax
jz	short loc_6EA4E6
push	edi
mov	ecx, eax
call	sub_6E9DD0
mov	[esp+28h+var_14], eax
jmp	short loc_6EA4EE

loc_6EA4E6:
mov	[esp+28h+var_14], 0

loc_6EA4EE:
mov	ecx, [esp+28h+var_10]
push	ecx
mov	ecx, [esp+2Ch+var_14]
push	esi
push	edi
call	sub_6E9F10
mov	ecx, [esp+28h+var_8]
test	ecx, ecx
jz	short loc_6EA50B

loc_6EA506:
call	sub_666B00

loc_6EA50B:
mov	ecx, [esp+28h+var_10]
call	sub_666B00

loc_6EA514:
mov	eax, [esp+28h+var_14]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_6EA1D0 endp




sub_6EA520 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
mov	ecx, [edi+74h]
mov	eax, [ecx]
mov	edx, [eax+5Ch]
xor	ebx, ebx
mov	[esp+2Ch+var_18], ebx
call	edx
mov	ebp, eax
mov	[esp+2Ch+var_C], ebp
cmp	ebp, ebx
jz	loc_6EA82F
mov	ecx, ebp
call	sub_64A420
mov	esi, [esp+2Ch+arg_4]
mov	eax, [esi]
mov	eax, [eax]
mov	[esp+2Ch+var_10], eax
mov	al, [eax]
mov	[esp+2Ch+var_19], bl
cmp	al, 69h
jz	short loc_6EA56E
cmp	al, 49h
jnz	loc_6EA72A

loc_6EA56E:
lea	ecx, [esp+2Ch+var_14]
push	ecx
mov	ecx, esi
call	sub_6518E0
push	6
push	ebx
lea	edx, [esp+34h+var_8]
push	edx
lea	ecx, [esp+38h+var_14]
call	sub_6512A0
mov	eax, [eax]
mov	eax, [eax]
mov	ecx, offset aImg ; "img://"

loc_6EA594:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EA5B4
test	dl, dl
jz	short loc_6EA5B0
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EA5B4
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EA594

loc_6EA5B0:
xor	eax, eax
jmp	short loc_6EA5B9

loc_6EA5B4:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EA5B9:
cmp	eax, ebx
mov	eax, [esp+2Ch+var_8]
setz	bl
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EA5D4
call	sub_650DF0

loc_6EA5D4:
test	bl, bl
jnz	short loc_6EA612
push	offset aImgps	; "imgps://"
push	8
push	0
lea	ecx, [esp+38h+var_8]
push	ecx
lea	ecx, [esp+3Ch+var_14]
call	sub_6512A0
mov	ecx, eax
call	sub_67DA70
mov	bl, al
mov	eax, [esp+2Ch+var_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EA60E
call	sub_650DF0

loc_6EA60E:
test	bl, bl
jz	short loc_6EA617

loc_6EA612:
mov	[esp+2Ch+var_19], 1

loc_6EA617:
mov	eax, [esp+2Ch+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EA62D
call	sub_650DF0

loc_6EA62D:
cmp	[esp+2Ch+var_19], 0
jz	loc_6EA728
mov	ecx, edi
call	sub_668010
add	eax, 0F0h
mov	eax, [eax]
test	eax, eax
jz	short loc_6EA64F
lea	esi, [eax+8]
jmp	short loc_6EA651

loc_6EA64F:
xor	esi, esi

loc_6EA651:
mov	edx, [edi+78h]
mov	eax, [esi]
mov	edi, [edx+294h]
mov	edx, [eax+0Ch]
push	4
mov	ecx, esi
call	edx
mov	ebp, eax
mov	eax, [esi]
mov	edx, [eax+0Ch]
push	5
mov	ecx, esi
call	edx
push	edi
mov	esi, eax
mov	eax, [esp+30h+var_10]
push	ebp
push	esi
push	eax
call	sub_704250
add	esp, 10h
mov	ebx, eax
test	esi, esi
jz	short loc_6EA691
mov	ecx, esi
call	sub_64A430

loc_6EA691:
test	ebp, ebp
jz	short loc_6EA69C
mov	ecx, ebp
call	sub_64A430

loc_6EA69C:
test	ebx, ebx
jz	short loc_6EA6FA
mov	edx, [edi]
mov	eax, [edx+28h]
push	0
push	3Ch
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_6EA6C3
mov	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, eax
call	sub_6E9DD0
mov	[esp+2Ch+var_18], eax
jmp	short loc_6EA6CB

loc_6EA6C3:
mov	[esp+2Ch+var_18], 0

loc_6EA6CB:
mov	edx, [esp+2Ch+arg_0]
mov	ecx, [esp+2Ch+var_18]
push	0
push	ebx
push	edx
call	sub_6E9F10
mov	ecx, ebx
call	sub_666B00
mov	ebp, [esp+2Ch+var_C]
mov	ecx, ebp
call	sub_666B00
mov	eax, [esp+2Ch+var_18]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_6EA6FA:
mov	eax, [esp+2Ch+var_10]
mov	ecx, [esp+2Ch+arg_0]
push	eax
push	offset aGasbitmapdataL ; "GASBitmapData::LoadBitmap: LoadMovieIma"...
push	ecx
call	sub_66D3C0
mov	ebp, [esp+38h+var_C]
add	esp, 0Ch
mov	ecx, ebp
call	sub_666B00
mov	eax, [esp+2Ch+var_18]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_6EA728:
xor	ebx, ebx

loc_6EA72A:
mov	edx, [esi]
mov	[esp+2Ch+var_8], ebx
mov	[esp+2Ch+var_4], ebx
mov	eax, [edx]
push	eax
lea	ecx, [esp+30h+arg_0]
call	sub_67AE10
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	edx, [esp+30h+var_8]
push	edx
push	ebp
mov	ecx, edi
call	sub_668010
mov	ecx, eax
call	sub_68F5F0
mov	esi, [esp+2Ch+arg_0]
test	al, al
setz	bl
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6EA784
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6EA784:
mov	ecx, [esp+2Ch+var_8]
test	bl, bl
jz	short loc_6EA7A6
test	ecx, ecx
jz	short loc_6EA795
call	sub_666B00

loc_6EA795:
mov	ecx, ebp
call	sub_666B00
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 1Ch
retn

loc_6EA7A6:
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 100h
jz	short loc_6EA7D7
mov	ecx, [esp+2Ch+var_8]
test	ecx, ecx
jz	short loc_6EA7C6
call	sub_666B00

loc_6EA7C6:
mov	ecx, ebp
call	sub_666B00
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 1Ch
retn

loc_6EA7D7:
mov	eax, [esp+2Ch+var_8]
mov	esi, eax
test	eax, eax
jz	short loc_6EA828
mov	ecx, [edi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	3Ch
call	eax
test	eax, eax
jz	short loc_6EA807
push	edi
mov	ecx, eax
call	sub_6E9DD0
mov	[esp+2Ch+var_18], eax
jmp	short loc_6EA80F

loc_6EA807:
mov	[esp+2Ch+var_18], 0

loc_6EA80F:
mov	ecx, [esp+2Ch+var_18]
push	ebp
push	esi
push	edi
call	sub_6E9F10
mov	ecx, [esp+2Ch+var_8]
test	ecx, ecx
jz	short loc_6EA828
call	sub_666B00

loc_6EA828:
mov	ecx, ebp
call	sub_666B00

loc_6EA82F:
mov	eax, [esp+2Ch+var_18]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_6EA520 endp

align 10h


; Attributes: thunk

sub_6EA840 proc	near
jmp	sub_6EA1D0
sub_6EA840 endp

align 10h



sub_6EA850 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6EA150
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143D360
push	edi
lea	ecx, [esi+3Ch]
push	esi
mov	dword ptr [esi], offset	off_143D454
mov	dword ptr [esi+10h], offset off_143D400
mov	dword ptr [ecx], offset	off_143D3F8
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EA850 endp

align 10h



sub_6EA8A0 proc	near

arg_0= byte ptr	 4

sub	ecx, 3Ch
jmp	loc_6EA8C0
align 10h

loc_6EA8B0:
sub	ecx, 10h
jmp	loc_6EA8C0
align 10h

loc_6EA8C0:
push	esi
mov	esi, ecx
lea	ecx, [esi+3Ch]
mov	dword ptr [esi], offset	off_143D454
mov	dword ptr [esi+10h], offset off_143D400
mov	dword ptr [ecx], offset	off_143D3F8
call	sub_665A40
mov	dword ptr [esi], offset	off_143D3D4
mov	dword ptr [esi+10h], offset off_143D380
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_6EA8F7
call	sub_666B00

loc_6EA8F7:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_6EA903
call	sub_666B00

loc_6EA903:
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6EA91F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EA91F:
mov	eax, esi
pop	esi
retn	4
sub_6EA8A0 endp

align 10h



sub_6EA930 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	1
cmp	dword ptr [esi+1Ch], 1
jl	short loc_6EA9A5
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+18h]
lea	edx, [esp+8+arg_0]
push	edx
push	eax
call	sub_6EA520
mov	edi, eax
add	esp, 8
test	edi, edi
jz	short loc_6EA98D
mov	ecx, [esi+4]
push	edi
call	sub_652E40
mov	ecx, edi
call	sub_64B3B0

loc_6EA98D:
mov	eax, [esp+8+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EA9A5
pop	edi
pop	esi
jmp	sub_650DF0

loc_6EA9A5:
pop	edi
pop	esi
retn
sub_6EA930 endp

align 10h



sub_6EA9B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_6EA9E5 ; default
jmp	ds:off_6EA9E8[eax*4] ; switch jump

loc_6EA9C0:		; jumptable 006EA9B9 case 0
call	sub_7D54F0
retn	4

loc_6EA9C8:		; jumptable 006EA9B9 case 1
call	sub_6E9E10
retn	4

loc_6EA9D0:		; jumptable 006EA9B9 case 2
call	sub_6834A0
retn	4

loc_6EA9D8:		; jumptable 006EA9B9 case 3
call	sub_7D54A0
retn	4

loc_6EA9E0:		; jumptable 006EA9B9 case 4
call	sub_6E9E90

locret_6EA9E5:		; default
retn	4
sub_6EA9B0 endp

off_6EA9E8 dd offset loc_6EA9C0	; jump table for switch	statement
dd offset loc_6EA9C8
dd offset loc_6EA9D0
dd offset loc_6EA9D8
dd offset loc_6EA9E0
align 10h



sub_6EAA00 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6EAA63
push	offset sub_6EA0E0
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
push	7
push	offset off_143D370
lea	ecx, [esp+2Ch+var_18]
lea	eax, [edi+10h]
push	ecx
push	eax
mov	dword ptr [edi], offset	off_143C238
mov	dword ptr [eax], offset	off_1439710
call	sub_66FC60
add	esp, 10h
mov	eax, edi
jmp	short loc_6EAA65

loc_6EAA63:
xor	eax, eax

loc_6EAA65:
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	byte ptr [edi+8], 0
mov	dword ptr [edi+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	5Ch
call	eax
mov	ebp, eax
test	ebp, ebp
jz	loc_6EAB40
push	edi
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebp
call	sub_6EA850
mov	ebp, eax
test	ebp, ebp
jz	short loc_6EAABB
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6EAABB:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], ebp
mov	[esp+2Ch+arg_0], 1Eh
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_6EAAE9
call	sub_64B3B0

loc_6EAAE9:
mov	edx, [esi+2A4h]
push	ebx
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], 0
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+80h]
push	ecx
mov	ecx, [esi+2A4h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	ebx
test	ebp, ebp
jz	short loc_6EAB37
mov	ecx, ebp
call	sub_64B3B0

loc_6EAB37:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_6EAB40:
xor	ebp, ebp
jmp	loc_6EAABB
sub_6EAA00 endp

align 10h



sub_6EAB50 proc	near
mov	eax, 26h
retn
sub_6EAB50 endp

align 10h



sub_6EAB60 proc	near

var_1C=	qword ptr -1Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, [ebx]
push	esi
mov	esi, [eax]
push	edi
mov	edi, ecx
mov	ecx, offset aAlpha ; "alpha"
mov	eax, esi

loc_6EAB77:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EAB97
test	dl, dl
jz	short loc_6EAB93
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EAB97
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EAB77

loc_6EAB93:
xor	eax, eax
jmp	short loc_6EAB9C

loc_6EAB97:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EAB9C:
test	eax, eax
jnz	short loc_6EABED
mov	al, [edi+47h]
test	al, al
jnz	short loc_6EABAB
fldz
jmp	short loc_6EABBC

loc_6EABAB:
movzx	ecx, al
mov	[esp+14h+arg_4], ecx
fild	[esp+14h+arg_4]
fdiv	ds:dbl_15FCCF8

loc_6EABBC:
mov	esi, [esp+14h+arg_8]
fstp	[esp+14h+arg_4]
cmp	byte ptr [esi],	5
fld	[esp+14h+arg_4]
fstp	[esp+14h+var_8]
jb	short loc_6EABD8
mov	ecx, esi
call	sub_652060

loc_6EABD8:
fld	[esp+14h+var_8]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EABED:		; "angle"
mov	ecx, offset aAngle_0
mov	eax, esi

loc_6EABF4:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EAC14
test	dl, dl
jz	short loc_6EAC10
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EAC14
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EABF4

loc_6EAC10:
xor	eax, eax
jmp	short loc_6EAC19

loc_6EAC14:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EAC19:
test	eax, eax
jnz	short loc_6EAC56
movsx	ecx, word ptr [edi+26h]
mov	esi, [esp+14h+arg_8]
mov	eax, 66666667h
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
cmp	byte ptr [esi],	5
movsx	edi, ax
jb	short loc_6EAC45
mov	ecx, esi
call	sub_652060

loc_6EAC45:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EAC56:		; "blurX"
mov	ecx, offset aBlurx
mov	eax, esi
lea	ecx, [ecx+0]

loc_6EAC60:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EAC80
test	dl, dl
jz	short loc_6EAC7C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EAC80
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EAC60

loc_6EAC7C:
xor	eax, eax
jmp	short loc_6EAC85

loc_6EAC80:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EAC85:
test	eax, eax
jnz	short loc_6EACB5
fld	dword ptr [edi+30h]

loc_6EAC8C:
mov	esi, [esp+14h+arg_8]
fstp	[esp+14h+arg_4]
cmp	byte ptr [esi],	5
jb	short loc_6EACA0
mov	ecx, esi
call	sub_652060

loc_6EACA0:
fld	[esp+14h+arg_4]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EACB5:		; "blurY"
push	offset aBlury
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EACCA
fld	dword ptr [edi+34h]
jmp	short loc_6EAC8C

loc_6EACCA:		; "color"
push	offset aColor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EACF8
mov	ecx, [edi+44h]
and	ecx, offset sub_FFFFFF
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EACF8:		; "distance"
push	offset aDistance_0
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EAD35
movsx	ecx, word ptr [edi+28h]
mov	eax, 66666667h
imul	ecx
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
movsx	ecx, ax
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EAD35:		; "hideObject"
push	offset aHideobject
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EAD66
mov	dl, [edi+24h]
mov	ecx, [esp+14h+arg_8]
shr	dl, 6
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EAD66:		; "inner"
push	offset aInner
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EAD97
mov	ecx, [edi+2Ch]
shr	ecx, 9
and	cl, 1
movzx	edx, cl
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EAD97:		; "knockout"
push	offset aKnockout
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EADC7
mov	al, [edi+24h]
shr	al, 5
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EADC7:		; "quality"
push	offset aQuality
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EADEF
mov	edx, [edi+38h]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EADEF:		; "strength"
push	offset aStrength_0
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EAE1C
fld	dword ptr [edi+4Ch]
mov	ecx, [esp+14h+arg_8]
sub	esp, 8
fstp	[esp+1Ch+var_1C]
call	sub_64A6A0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EAE1C:
mov	eax, [esp+14h+arg_8]
mov	ecx, [esp+14h+arg_0]
push	eax
push	ebx
push	ecx
mov	ecx, edi
call	sub_6E2610
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch
sub_6EAB60 endp

align 10h



sub_6EAE40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0D0h]
mov	dword ptr [esi], offset	off_143D5E0
mov	dword ptr [esi+10h], offset off_143D588
mov	dword ptr [ecx], offset	off_143D5DC
call	sub_665A40
mov	ecx, esi
mov	dword ptr [esi], offset	off_143D53C
mov	dword ptr [esi+10h], offset off_143D4E8
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6EAE8A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EAE8A:
mov	eax, esi
pop	esi
retn	4
sub_6EAE40 endp




sub_6EAE90 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6EAEC0
align 10h

loc_6EAEA0:
sub	ecx, 10h
jmp	sub_6EAE40
align 10h

loc_6EAEB0:
sub	ecx, 0D0h
jmp	sub_6EAE40
align 10h

loc_6EAEC0:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143D53C
mov	dword ptr [esi+10h], offset off_143D4E8
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6EAEEA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EAEEA:
mov	eax, esi
pop	esi
retn	4
sub_6EAE90 endp




sub_6EAEF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0D0h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6EAF33
push	2
push	0
push	edi
mov	ecx, esi
call	sub_6A7350
pop	edi
mov	dword ptr [esi], offset	off_143D53C
mov	dword ptr [esi+10h], offset off_143D4E8
mov	eax, esi
pop	esi
retn	4

loc_6EAF33:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6EAEF0 endp

align 10h



sub_6EAF40 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+0ECh]
test	eax, eax
jz	short loc_6EAF71
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0ECh]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6EAF71:
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_6EAF40 endp

align 10h



sub_6EAF80 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, [eax]
mov	esi, ecx
mov	ecx, offset aAlpha ; "alpha"
mov	eax, edi

loc_6EAF97:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EAFB7
test	dl, dl
jz	short loc_6EAFB3
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EAFB7
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EAF97

loc_6EAFB3:
xor	eax, eax
jmp	short loc_6EAFBC

loc_6EAFB7:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EAFBC:
test	eax, eax
jnz	short loc_6EB00C
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653400
fstp	[esp+14h+arg_8]
fld	[esp+14h+arg_8]
pop	edi
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+10h+arg_8]
movzx	eax, word ptr [esp+10h+arg_8]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
mov	al, 1
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+arg_0]
mov	dl, byte ptr [esp+10h+arg_0]
mov	[esi+47h], dl
pop	esi
fldcw	word ptr [esp+0Ch+arg_8]
pop	ebx
add	esp, 8
retn	10h

loc_6EB00C:		; "angle"
mov	ecx, offset aAngle_0
mov	eax, edi

loc_6EB013:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EB033
test	dl, dl
jz	short loc_6EB02F
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EB033
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EB013

loc_6EB02F:
xor	eax, eax
jmp	short loc_6EB038

loc_6EB033:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EB038:
test	eax, eax
jnz	short loc_6EB07E
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653660
lea	ecx, [eax+eax*4]
add	ecx, ecx
lea	edx, [esp+14h+var_8]
mov	[esi+26h], cx
push	edx
lea	ecx, [esi+24h]
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+14h+arg_8]
pop	edi
fld	dword ptr [eax]
mov	al, 1
fstp	dword ptr [esi+3Ch]
fld	[esp+10h+arg_8]
fstp	dword ptr [esi+40h]
pop	esi
pop	ebx
add	esp, 8
retn	10h

loc_6EB07E:		; "blurX"
mov	ecx, offset aBlurx
mov	eax, edi

loc_6EB085:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EB0A5
test	dl, dl
jz	short loc_6EB0A1
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EB0A5
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EB085

loc_6EB0A1:
xor	eax, eax
jmp	short loc_6EB0AA

loc_6EB0A5:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EB0AA:
test	eax, eax
jnz	short loc_6EB0CA
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653400
fstp	dword ptr [esi+30h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB0CA:		; "blurY"
push	offset aBlury
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EB0F6
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653400
fstp	dword ptr [esi+34h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB0F6:		; "color"
push	offset aColor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EB128
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_653750
mov	cl, [esi+47h]
mov	[esi+44h], eax
pop	edi
mov	[esi+47h], cl
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB128:		; "distance"
push	offset aDistance_0
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EB17C
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653660
lea	ecx, [eax+eax*4]
add	ecx, ecx
add	ecx, ecx
lea	edx, [esp+14h+var_8]
mov	[esi+28h], cx
push	edx
lea	ecx, [esi+24h]
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+14h+arg_8]
pop	edi
fld	dword ptr [eax]
mov	al, 1
fstp	dword ptr [esi+3Ch]
fld	[esp+10h+arg_8]
fstp	dword ptr [esi+40h]
pop	esi
pop	ebx
add	esp, 8
retn	10h

loc_6EB17C:		; "hideObject"
push	offset aHideobject
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EB1CA
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_651D80
test	al, al
jz	short loc_6EB1B4
or	byte ptr [esi+24h], 40h
or	dword ptr [esi+2Ch], 400h
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB1B4:
and	byte ptr [esi+24h], 0BFh
and	dword ptr [esi+2Ch], 0FFFFFBFFh
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB1CA:		; "inner"
push	offset aInner
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EB210
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_651D80
test	al, al
jz	short loc_6EB1FE
or	dword ptr [esi+2Ch], 200h
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB1FE:
and	dword ptr [esi+2Ch], 0FFFFFDFFh
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB210:		; "knockout"
push	offset aKnockout
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EB25E
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_651D80
test	al, al
jz	short loc_6EB248
or	byte ptr [esi+24h], 20h
or	dword ptr [esi+2Ch], 100h
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB248:
and	byte ptr [esi+24h], 0DFh
and	dword ptr [esi+2Ch], 0FFFFFEFFh
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB25E:		; "quality"
push	offset aQuality
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EB2AC
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653400
fnstcw	word ptr [esp+14h+arg_8]
movzx	eax, word ptr [esp+14h+arg_8]
or	eax, 0C00h
mov	[esp+14h+arg_0], eax
pop	edi
mov	al, 1
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+var_8]
mov	ecx, dword ptr [esp+10h+var_8]
mov	[esi+38h], ecx
pop	esi
pop	ebx
fldcw	word ptr [esp+8+arg_8]
add	esp, 8
retn	10h

loc_6EB2AC:		; "strength"
push	offset aStrength_0
mov	ecx, ebx
call	sub_67DA70
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
test	al, al
jz	short loc_6EB2D8
push	edx
call	sub_653400
fstp	dword ptr [esi+4Ch]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EB2D8:
mov	eax, [esp+14h+arg_C]
push	eax
push	ecx
push	ebx
push	edx
mov	ecx, esi
call	sub_665190
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	10h
sub_6EAF80 endp




sub_6EB2F0 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+0D4h]
call	sub_67C210
lea	ecx, [edi+0E0h]
call	sub_67C210
mov	eax, [edi+0ECh]
test	eax, eax
jz	short loc_6EB340
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6EB33E

loc_6EB323:
mov	eax, [edi+0ECh]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6EB339
call	sub_64B020

loc_6EB339:
inc	esi
cmp	esi, ebx
jb	short loc_6EB323

loc_6EB33E:
pop	esi
pop	ebx

loc_6EB340:
pop	edi
retn
sub_6EB2F0 endp

align 10h



sub_6EB350 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	26h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6EB374
push	0
push	0
push	offset aDropshadowfilt ; "DropShadowFilter"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6EB374:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6EB3C8
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6EB3C7
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	esi
push	0FFFFFFFFh
push	0
lea	edx, [eax+0A0h]
mov	eax, [eax+2A8h]
push	edx
push	eax
call	sub_671840
mov	esi, eax
add	ebx, 34h
push	ebx
lea	ecx, [esi+34h]
call	sub_656980
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6EB3C6
mov	ecx, esi
pop	esi
pop	ebx
pop	edi
jmp	sub_64B3B0

loc_6EB3C6:
pop	esi

loc_6EB3C7:
pop	ebx

loc_6EB3C8:
pop	edi
retn
sub_6EB350 endp

align 10h



sub_6EB3D0 proc	near

var_18=	qword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_0]
xor	ebx, ebx
push	edi
cmp	[esi+8], ebx
jz	short loc_6EB411
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 26h
jnz	short loc_6EB411
mov	eax, [esi+8]
cmp	eax, ebx
jz	short loc_6EB40D
lea	ebp, [eax-10h]
cmp	ebp, ebx
jz	short loc_6EB451
mov	eax, [ebp+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebp+8], eax
jmp	short loc_6EB451

loc_6EB40D:
xor	ebp, ebp
jmp	short loc_6EB451

loc_6EB411:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	0D0h
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6EB44D
mov	eax, [esi+18h]
push	2
push	ebx
push	eax
mov	ecx, edi
call	sub_6A7350
mov	dword ptr [edi], offset	off_143D53C
mov	dword ptr [edi+10h], offset off_143D4E8
jmp	short loc_6EB44F

loc_6EB44D:
xor	edi, edi

loc_6EB44F:
mov	ebp, edi

loc_6EB451:
mov	ecx, [esi+4]
push	ebp
call	sub_652E40
mov	ecx, 50h
lea	edx, [esp+28h+var_18]
mov	[ebp+38h], cx
lea	edi, [ebp+34h]
push	edx
mov	ecx, edi
mov	dword ptr [ebp+48h], 1
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
lea	ecx, [esp+28h+var_18]
fld	dword ptr [eax]
mov	eax, 1C2h
fstp	dword ptr [ebp+4Ch]
push	ecx
fld	[esp+2Ch+arg_0]
mov	ecx, edi
fstp	dword ptr [ebp+50h]
mov	[ebp+36h], ax
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [ebp+4Ch]
fld	[esp+28h+arg_0]
fstp	dword ptr [ebp+50h]
mov	[ebp+54h], ebx
fld	ds:flt_15AACC4
and	byte ptr [edi],	9Fh
and	dword ptr [ebp+3Ch], 0FFFFFAFFh
fst	dword ptr [ebp+40h]
fstp	dword ptr [ebp+44h]
mov	byte ptr [ebp+57h], 0FFh
fld1
fstp	dword ptr [ebp+5Ch]
cmp	[esi+1Ch], ebx
jle	loc_6EB71A
mov	edx, [esi+18h]
push	edx
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
lea	eax, [eax+eax*4]
add	eax, eax
lea	ecx, [esp+28h+var_18]
add	eax, eax
push	ecx
mov	ecx, edi
mov	[ebp+38h], ax
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [ebp+4Ch]
fld	[esp+28h+arg_0]
fstp	dword ptr [ebp+50h]
cmp	dword ptr [esi+1Ch], 1
jle	loc_6EB71A
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
lea	eax, [eax+eax*4]
lea	ecx, [esp+28h+var_18]
add	eax, eax
push	ecx
mov	ecx, edi
mov	[ebp+36h], ax
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [ebp+4Ch]
fld	[esp+28h+arg_0]
fstp	dword ptr [ebp+50h]
cmp	dword ptr [esi+1Ch], 2
jle	loc_6EB71A
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	cl, [ebp+57h]
mov	[ebp+54h], eax
mov	[ebp+57h], cl
cmp	dword ptr [esi+1Ch], 3
jle	loc_6EB71A
mov	eax, [esi+18h]
push	eax
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+28h+arg_0]
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_18], eax
fldcw	word ptr [esp+28h+var_18]
fistp	dword ptr [esp+28h+var_18]
mov	cl, byte ptr [esp+28h+var_18]
mov	[ebp+57h], cl
cmp	dword ptr [esi+1Ch], 4
fldcw	word ptr [esp+28h+arg_0]
jle	loc_6EB71A
mov	edx, [esi+18h]
push	edx
push	4
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+40h]
cmp	dword ptr [esi+1Ch], 5
jle	loc_6EB71A
mov	eax, [esi+18h]
push	eax
push	5
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+44h]
cmp	dword ptr [esi+1Ch], 6
jle	loc_6EB71A
mov	ecx, [esi+18h]
push	ecx
push	6
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+5Ch]
cmp	dword ptr [esi+1Ch], 7
jle	loc_6EB71A
mov	edx, [esi+18h]
push	edx
push	7
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+28h+arg_0]
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_18], eax
fldcw	word ptr [esp+28h+var_18]
fistp	[esp+28h+var_18]
mov	eax, dword ptr [esp+28h+var_18]
mov	[ebp+48h], eax
cmp	dword ptr [esi+1Ch], 8
fldcw	word ptr [esp+28h+arg_0]
jle	loc_6EB71A
mov	ecx, [esi+18h]
push	ecx
push	8
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
jz	short loc_6EB6AB
or	dword ptr [ebp+3Ch], 200h
jmp	short loc_6EB6B2

loc_6EB6AB:
and	dword ptr [ebp+3Ch], 0FFFFFDFFh

loc_6EB6B2:
cmp	dword ptr [esi+1Ch], 9
jle	short loc_6EB71A
mov	edx, [esi+18h]
push	edx
push	9
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
jz	short loc_6EB6DC
or	byte ptr [edi],	20h
or	dword ptr [ebp+3Ch], 100h
jmp	short loc_6EB6E6

loc_6EB6DC:
and	byte ptr [edi],	0DFh
and	dword ptr [ebp+3Ch], 0FFFFFEFFh

loc_6EB6E6:
cmp	dword ptr [esi+1Ch], 0Ah
jle	short loc_6EB71A
mov	eax, [esi+18h]
push	eax
push	0Ah
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
jz	short loc_6EB710
or	byte ptr [edi],	40h
or	dword ptr [ebp+3Ch], 400h
jmp	short loc_6EB71A

loc_6EB710:
and	byte ptr [edi],	0BFh
and	dword ptr [ebp+3Ch], 0FFFFFBFFh

loc_6EB71A:
mov	esi, [esi+18h]
mov	ecx, [esi+78h]
push	ebx
add	esi, 78h
push	8
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [ecx+280h]
push	offset aDistance_0 ; "distance"
lea	edi, [ebp+10h]
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB777
call	sub_650DF0

loc_6EB777:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aAngle_0	; "angle"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB7D3
call	sub_650DF0

loc_6EB7D3:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aColor	; "color"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB82F
call	sub_650DF0

loc_6EB82F:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aAlpha	; "alpha"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB88B
call	sub_650DF0

loc_6EB88B:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aBlurx	; "blurX"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB8E7
call	sub_650DF0

loc_6EB8E7:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aBlury	; "blurY"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB943
call	sub_650DF0

loc_6EB943:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	8
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aStrength_0 ; "strength"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB99F
call	sub_650DF0

loc_6EB99F:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	8
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aKnockout ; "knockout"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EB9FB
call	sub_650DF0

loc_6EB9FB:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	0Ah
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aHideobject ; "hideObject"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EBA57
call	sub_650DF0

loc_6EBA57:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aInner	; "inner"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EBAB3
call	sub_650DF0

loc_6EBAB3:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	7
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aQuality	; "quality"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EBB0F
call	sub_650DF0

loc_6EBB0F:
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	ecx, ebp
pop	ebp
pop	ebx
add	esp, 18h
jmp	sub_64B3B0
sub_6EB3D0 endp

align 10h



sub_6EBB30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_6A7510
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+0D0h]
mov	dword ptr [esi+3Ch], 2
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143D5E0
mov	dword ptr [esi+10h], offset off_143D588
mov	dword ptr [ecx], offset	off_143D5DC
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EBB30 endp

align 10h



sub_6EBBA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6EBB30
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143D4D8
push	edi
lea	ecx, [esi+0D0h]
push	esi
mov	dword ptr [esi], offset	off_143D5E0
mov	dword ptr [esi+10h], offset off_143D588
mov	dword ptr [ecx], offset	off_143D5DC
mov	byte ptr [esp+18h+arg_8], 0
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EBBA0 endp




sub_6EBBF0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	eax, [esi+9Ch]
push	edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
xor	ebx, ebx
cmp	eax, ebx
jnz	short loc_6EBC50
lea	eax, [esp+28h+var_10]
push	esi
push	eax
call	sub_6A76A0
add	esp, 8
test	byte ptr [esp+28h+var_8], 2
jnz	short loc_6EBC38
mov	ecx, [esp+28h+var_10]
cmp	ecx, ebx
jz	short loc_6EBC38
call	sub_64B3B0

loc_6EBC38:
test	byte ptr [esp+28h+var_8], 1
mov	[esp+28h+var_10], ebx
jnz	short loc_6EBC50
mov	ecx, [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6EBC50
call	sub_64B3B0

loc_6EBC50:
mov	ecx, [esi+294h]
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6EBC91
push	offset sub_6EB3D0
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143D608
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6EBC93

loc_6EBC91:
xor	eax, eax

loc_6EBC93:
mov	edi, [esp+28h+arg_0]
mov	[edi], eax
mov	[edi+8], bl
mov	[edi+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0F0h
call	eax
mov	ebp, eax
cmp	ebp, ebx
jz	loc_6EBD69
push	edi
push	25h
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, ebp
call	sub_6EBBA0
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6EBCE6
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6EBCE6:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebp
mov	[esp+30h+arg_0], 26h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
cmp	ecx, ebx
jz	short loc_6EBD14
call	sub_64B3B0

loc_6EBD14:
mov	edx, [esi+2A8h]
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], bl
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+0A0h]
push	ecx
mov	ecx, [esi+2A8h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebp, ebp
jz	short loc_6EBD5F
mov	ecx, ebp
call	sub_64B3B0

loc_6EBD5F:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6EBD69:
xor	ebp, ebp
jmp	loc_6EBCE6
sub_6EBBF0 endp




sub_6EBD70 proc	near
mov	eax, 27h
retn
sub_6EBD70 endp

align 10h



sub_6EBD80 proc	near

var_1C=	qword ptr -1Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, [ebx]
push	esi
mov	esi, [eax]
push	edi
mov	edi, ecx
mov	ecx, offset aAlpha ; "alpha"
mov	eax, esi

loc_6EBD97:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EBDB7
test	dl, dl
jz	short loc_6EBDB3
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EBDB7
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EBD97

loc_6EBDB3:
xor	eax, eax
jmp	short loc_6EBDBC

loc_6EBDB7:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EBDBC:
test	eax, eax
jnz	short loc_6EBE0D
mov	al, [edi+47h]
test	al, al
jnz	short loc_6EBDCB
fldz
jmp	short loc_6EBDDC

loc_6EBDCB:
movzx	ecx, al
mov	[esp+14h+arg_4], ecx
fild	[esp+14h+arg_4]
fdiv	ds:dbl_15FCCF8

loc_6EBDDC:
mov	esi, [esp+14h+arg_8]
fstp	[esp+14h+arg_4]
cmp	byte ptr [esi],	5
fld	[esp+14h+arg_4]
fstp	[esp+14h+var_8]
jb	short loc_6EBDF8
mov	ecx, esi
call	sub_652060

loc_6EBDF8:
fld	[esp+14h+var_8]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EBE0D:		; "blurX"
mov	ecx, offset aBlurx
mov	eax, esi

loc_6EBE14:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EBE34
test	dl, dl
jz	short loc_6EBE30
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EBE34
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EBE14

loc_6EBE30:
xor	eax, eax
jmp	short loc_6EBE39

loc_6EBE34:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EBE39:
test	eax, eax
jnz	short loc_6EBE69
fld	dword ptr [edi+30h]

loc_6EBE40:
mov	esi, [esp+14h+arg_8]
fstp	[esp+14h+arg_4]
cmp	byte ptr [esi],	5
jb	short loc_6EBE54
mov	ecx, esi
call	sub_652060

loc_6EBE54:
fld	[esp+14h+arg_4]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EBE69:		; "blurY"
mov	ecx, offset aBlury
mov	eax, esi

loc_6EBE70:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EBE90
test	dl, dl
jz	short loc_6EBE8C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EBE90
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EBE70

loc_6EBE8C:
xor	eax, eax
jmp	short loc_6EBE95

loc_6EBE90:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EBE95:
test	eax, eax
jnz	short loc_6EBE9E
fld	dword ptr [edi+34h]
jmp	short loc_6EBE40

loc_6EBE9E:		; "color"
push	offset aColor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EBECC
mov	edx, [edi+44h]
mov	ecx, [esp+14h+arg_8]
and	edx, offset sub_FFFFFF
push	edx
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EBECC:		; "inner"
push	offset aInner
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EBEFC
mov	eax, [edi+2Ch]
shr	eax, 9
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EBEFC:		; "knockout"
push	offset aKnockout
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EBF2D
mov	dl, [edi+24h]
mov	ecx, [esp+14h+arg_8]
shr	dl, 5
and	dl, 1
movzx	eax, dl
push	eax
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EBF2D:		; "quality"
push	offset aQuality
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EBF55
mov	ecx, [edi+38h]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EBF55:		; "strength"
push	offset aStrength_0
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EBF82
fld	dword ptr [edi+4Ch]
mov	ecx, [esp+14h+arg_8]
sub	esp, 8
fstp	[esp+1Ch+var_1C]
call	sub_64A6A0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	0Ch

loc_6EBF82:
mov	edx, [esp+14h+arg_8]
mov	eax, [esp+14h+arg_0]
push	edx
push	ebx
push	eax
mov	ecx, edi
call	sub_6E2610
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch
sub_6EBD80 endp

align 10h



sub_6EBFA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_6EBFC3
cmp	[esi], ecx
jmp	short loc_6EBFD8

loc_6EBFC3:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6EBFCE
call	sub_651580

loc_6EBFCE:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6EBFD8:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_6EC027
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_6EBFF6
cmp	[esi], ecx
jmp	short loc_6EC00B

loc_6EBFF6:
cmp	dword ptr [ecx+4], 0
jnz	short loc_6EC001
call	sub_651580

loc_6EC001:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_6EC00B:
setz	al
test	al, al
jnz	short loc_6EC027
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_6EC027:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+0C0h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6EBFA0 endp

align 10h



sub_6EC050 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0D0h]
mov	dword ptr [esi], offset	off_143D72C
mov	dword ptr [esi+10h], offset off_143D6D8
mov	dword ptr [ecx], offset	off_143D750
call	sub_665A40
mov	ecx, esi
mov	dword ptr [esi], offset	off_143D6B4
mov	dword ptr [esi+10h], offset off_143D660
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6EC09A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EC09A:
mov	eax, esi
pop	esi
retn	4
sub_6EC050 endp




sub_6EC0A0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6EC050
sub_6EC0A0 endp

align 10h



sub_6EC0B0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6EC0C0
align 10h

loc_6EC0C0:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143D6B4
mov	dword ptr [esi+10h], offset off_143D660
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6EC0EA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EC0EA:
mov	eax, esi
pop	esi
retn	4
sub_6EC0B0 endp




sub_6EC0F0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, [ebx]
push	esi
mov	esi, [eax]
push	edi
mov	edi, ecx
mov	ecx, offset aAlpha ; "alpha"
mov	eax, esi

loc_6EC107:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EC127
test	dl, dl
jz	short loc_6EC123
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EC127
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EC107

loc_6EC123:
xor	eax, eax
jmp	short loc_6EC12C

loc_6EC127:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EC12C:
test	eax, eax
jnz	short loc_6EC17C
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653400
fstp	[esp+14h+arg_8]
fld	[esp+14h+arg_8]
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+14h+arg_8]
movzx	eax, word ptr [esp+14h+arg_8]
or	eax, 0C00h
mov	[esp+14h+arg_0], eax
mov	al, 1
fldcw	word ptr [esp+14h+arg_0]
fistp	[esp+14h+arg_0]
mov	dl, byte ptr [esp+14h+arg_0]
mov	[edi+47h], dl
pop	edi
fldcw	word ptr [esp+10h+arg_8]
pop	esi
pop	ebx
add	esp, 8
retn	10h

loc_6EC17C:		; "blurX"
mov	ecx, offset aBlurx
mov	eax, esi

loc_6EC183:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EC1A3
test	dl, dl
jz	short loc_6EC19F
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EC1A3
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EC183

loc_6EC19F:
xor	eax, eax
jmp	short loc_6EC1A8

loc_6EC1A3:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EC1A8:
test	eax, eax
jnz	short loc_6EC1C8
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653400
fstp	dword ptr [edi+30h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC1C8:		; "blurY"
mov	ecx, offset aBlury
mov	eax, esi
nop

loc_6EC1D0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EC1F0
test	dl, dl
jz	short loc_6EC1EC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EC1F0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EC1D0

loc_6EC1EC:
xor	eax, eax
jmp	short loc_6EC1F5

loc_6EC1F0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EC1F5:
test	eax, eax
jnz	short loc_6EC215
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653400
fstp	dword ptr [edi+34h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC215:		; "color"
push	offset aColor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EC247
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_653750
mov	cl, [edi+47h]
mov	[edi+44h], eax
mov	[edi+47h], cl
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC247:		; "inner"
push	offset aInner
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EC28D
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_651D80
test	al, al
jz	short loc_6EC27B
or	dword ptr [edi+2Ch], 200h
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC27B:
and	dword ptr [edi+2Ch], 0FFFFFDFFh
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC28D:		; "knockout"
push	offset aKnockout
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EC2DB
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_651D80
test	al, al
jz	short loc_6EC2C5
or	byte ptr [edi+24h], 20h
or	dword ptr [edi+2Ch], 100h
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC2C5:
and	byte ptr [edi+24h], 0DFh
and	dword ptr [edi+2Ch], 0FFFFFEFFh
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC2DB:		; "quality"
push	offset aQuality
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EC329
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_653400
fnstcw	word ptr [esp+14h+arg_8]
movzx	eax, word ptr [esp+14h+arg_8]
or	eax, 0C00h
mov	[esp+14h+arg_0], eax
fldcw	word ptr [esp+14h+arg_0]
fistp	[esp+14h+var_8]
mov	eax, dword ptr [esp+14h+var_8]
mov	[edi+38h], eax
pop	edi
fldcw	word ptr [esp+10h+arg_8]
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC329:		; "strength"
push	offset aStrength_0
mov	ecx, ebx
call	sub_67DA70
mov	ecx, [esp+14h+arg_0]
test	al, al
jz	short loc_6EC355
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653400
fstp	dword ptr [edi+4Ch]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EC355:
mov	edx, [esp+14h+arg_C]
mov	eax, [esp+14h+arg_8]
push	edx
push	eax
push	ebx
push	ecx
mov	ecx, edi
call	sub_665190
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	10h
sub_6EC0F0 endp

align 10h



sub_6EC380 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0D0h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6EC3C3
push	2
push	2
push	edi
mov	ecx, esi
call	sub_6A7350
pop	edi
mov	dword ptr [esi], offset	off_143D6B4
mov	dword ptr [esi+10h], offset off_143D660
mov	eax, esi
pop	esi
retn	4

loc_6EC3C3:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6EC380 endp

align 10h



sub_6EC3D0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	27h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6EC3F4
push	0
push	0
push	offset aGlowfilter ; "GlowFilter"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6EC3F4:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6EC448
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6EC447
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	esi
push	0FFFFFFFFh
push	0
lea	edx, [eax+0A4h]
mov	eax, [eax+2A8h]
push	edx
push	eax
call	sub_671840
mov	esi, eax
add	ebx, 34h
push	ebx
lea	ecx, [esi+34h]
call	sub_656980
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6EC446
mov	ecx, esi
pop	esi
pop	ebx
pop	edi
jmp	sub_64B3B0

loc_6EC446:
pop	esi

loc_6EC447:
pop	ebx

loc_6EC448:
pop	edi
retn
sub_6EC3D0 endp

align 10h



sub_6EC450 proc	near

var_18=	qword ptr -18h
var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_0]
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_6EC48F
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 27h
jnz	short loc_6EC48F
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6EC48B
lea	ebp, [eax-10h]
test	ebp, ebp
jz	short loc_6EC4D1
mov	eax, [ebp+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebp+8], eax
jmp	short loc_6EC4D1

loc_6EC48B:
xor	ebp, ebp
jmp	short loc_6EC4D1

loc_6EC48F:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0D0h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6EC4CD
mov	eax, [esi+18h]
push	2
push	2
push	eax
mov	ecx, edi
call	sub_6A7350
mov	dword ptr [edi], offset	off_143D6B4
mov	dword ptr [edi+10h], offset off_143D660
jmp	short loc_6EC4CF

loc_6EC4CD:
xor	edi, edi

loc_6EC4CF:
mov	ebp, edi

loc_6EC4D1:
mov	ecx, [esi+4]
push	ebp
call	sub_652E40
xor	ecx, ecx
lea	edx, [esp+24h+var_18]
mov	[ebp+38h], cx
lea	edi, [ebp+34h]
push	edx
mov	ecx, edi
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+24h+arg_0]
lea	ecx, [esp+24h+var_18]
fld	dword ptr [eax]
xor	eax, eax
fstp	dword ptr [ebp+4Ch]
push	ecx
fld	[esp+28h+arg_0]
mov	ecx, edi
fstp	dword ptr [ebp+50h]
mov	[ebp+36h], ax
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+24h+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [ebp+4Ch]
fld	[esp+24h+arg_0]
fstp	dword ptr [ebp+50h]
mov	dword ptr [ebp+54h], 0FF0000h
fld	ds:flt_1573A78
and	byte ptr [edi],	9Fh
and	dword ptr [ebp+3Ch], 0FFFFFAFFh
fst	dword ptr [ebp+40h]
fstp	dword ptr [ebp+44h]
mov	byte ptr [ebp+57h], 0FFh
fld	ds:flt_1437CD8
fstp	dword ptr [ebp+5Ch]
cmp	dword ptr [esi+1Ch], 0
jle	loc_6EC6D1
mov	edx, [esi+18h]
push	edx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	cl, [ebp+57h]
mov	[ebp+54h], eax
mov	[ebp+57h], cl
cmp	dword ptr [esi+1Ch], 1
jle	loc_6EC6D1
mov	eax, [esi+18h]
push	eax
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_0]
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+24h+arg_0]
movzx	eax, word ptr [esp+24h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+24h+var_18], eax
fldcw	word ptr [esp+24h+var_18]
fistp	dword ptr [esp+24h+var_18]
mov	cl, byte ptr [esp+24h+var_18]
mov	[ebp+57h], cl
cmp	dword ptr [esi+1Ch], 2
fldcw	word ptr [esp+24h+arg_0]
jle	loc_6EC6D1
mov	edx, [esi+18h]
push	edx
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+40h]
cmp	dword ptr [esi+1Ch], 3
jle	loc_6EC6D1
mov	eax, [esi+18h]
push	eax
push	3
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+44h]
cmp	dword ptr [esi+1Ch], 4
jle	loc_6EC6D1
mov	ecx, [esi+18h]
push	ecx
push	4
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+5Ch]
cmp	dword ptr [esi+1Ch], 5
jle	loc_6EC6D1
mov	edx, [esi+18h]
push	edx
push	5
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+24h+arg_0]
movzx	eax, word ptr [esp+24h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+24h+var_18], eax
fldcw	word ptr [esp+24h+var_18]
fistp	[esp+24h+var_18]
mov	eax, dword ptr [esp+24h+var_18]
mov	[ebp+48h], eax
cmp	dword ptr [esi+1Ch], 6
fldcw	word ptr [esp+24h+arg_0]
jle	short loc_6EC6D1
mov	ecx, [esi+18h]
push	ecx
push	6
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
jz	short loc_6EC696
or	dword ptr [ebp+3Ch], 200h
jmp	short loc_6EC69D

loc_6EC696:
and	dword ptr [ebp+3Ch], 0FFFFFDFFh

loc_6EC69D:
cmp	dword ptr [esi+1Ch], 7
jle	short loc_6EC6D1
mov	edx, [esi+18h]
push	edx
push	7
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
jz	short loc_6EC6C7
or	byte ptr [edi],	20h
or	dword ptr [ebp+3Ch], 100h
jmp	short loc_6EC6D1

loc_6EC6C7:
and	byte ptr [edi],	0DFh
and	dword ptr [ebp+3Ch], 0FFFFFEFFh

loc_6EC6D1:
mov	esi, [esi+18h]
mov	eax, [esi+78h]
push	ebx
push	0
add	esi, 78h
mov	bl, 0Ah
push	5
mov	[esp+30h+var_10], bl
mov	byte ptr [esp+30h+arg_0], 0
mov	ecx, [eax+280h]
push	offset aColor	; "color"
lea	edi, [ebp+10h]
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EC733
call	sub_650DF0

loc_6EC733:
lea	ecx, [esp+24h+var_C]
call	sub_652830
mov	eax, [esi]
push	0
push	5
mov	[esp+2Ch+var_C], bl
mov	[esp+2Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aAlpha	; "alpha"
call	sub_650E40
mov	dword ptr [esp+24h+var_18+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
lea	eax, [esp+2Ch+var_18+4]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EC791
call	sub_650DF0

loc_6EC791:
lea	ecx, [esp+24h+var_C]
call	sub_652830
mov	eax, [esi]
push	0
push	5
mov	[esp+2Ch+var_C], bl
mov	[esp+2Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aBlurx	; "blurX"
call	sub_650E40
mov	dword ptr [esp+24h+var_18+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
lea	eax, [esp+2Ch+var_18+4]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EC7EF
call	sub_650DF0

loc_6EC7EF:
lea	ecx, [esp+24h+var_C]
call	sub_652830
mov	eax, [esi]
push	0
push	5
mov	[esp+2Ch+var_C], bl
mov	[esp+2Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aBlury	; "blurY"
call	sub_650E40
mov	dword ptr [esp+24h+var_18+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
lea	eax, [esp+2Ch+var_18+4]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EC84D
call	sub_650DF0

loc_6EC84D:
lea	ecx, [esp+24h+var_C]
call	sub_652830
mov	eax, [esi]
push	0
push	8
mov	[esp+2Ch+var_C], bl
mov	[esp+2Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aStrength_0 ; "strength"
call	sub_650E40
mov	dword ptr [esp+24h+var_18+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
lea	eax, [esp+2Ch+var_18+4]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EC8AB
call	sub_650DF0

loc_6EC8AB:
lea	ecx, [esp+24h+var_C]
call	sub_652830
mov	eax, [esi]
push	0
push	8
mov	[esp+2Ch+var_C], bl
mov	[esp+2Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aKnockout ; "knockout"
call	sub_650E40
mov	dword ptr [esp+24h+var_18+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
lea	eax, [esp+2Ch+var_18+4]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EC909
call	sub_650DF0

loc_6EC909:
lea	ecx, [esp+24h+var_C]
call	sub_652830
mov	eax, [esi]
push	0
push	5
mov	[esp+2Ch+var_C], bl
mov	[esp+2Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aInner	; "inner"
call	sub_650E40
mov	dword ptr [esp+24h+var_18+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
lea	eax, [esp+2Ch+var_18+4]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18+4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EC967
call	sub_650DF0

loc_6EC967:
lea	ecx, [esp+24h+var_C]
call	sub_652830
mov	eax, [esi]
push	0
push	7
mov	[esp+2Ch+var_C], bl
mov	[esp+2Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aQuality	; "quality"
call	sub_650E40
mov	dword ptr [esp+24h+var_18+4], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
lea	eax, [esp+2Ch+var_18+4]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebx
jnz	short loc_6EC9C6
call	sub_650DF0

loc_6EC9C6:
lea	ecx, [esp+24h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	ecx, ebp
pop	ebp
add	esp, 18h
jmp	sub_64B3B0
sub_6EC450 endp

align 10h



sub_6EC9E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_6A7510
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+0D0h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143D72C
mov	dword ptr [esi+10h], offset off_143D6D8
mov	dword ptr [ecx], offset	off_143D750
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EC9E0 endp

align 10h



sub_6ECA40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6EC9E0
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143D64C
push	edi
lea	ecx, [esi+0D0h]
push	esi
mov	dword ptr [esi], offset	off_143D72C
mov	dword ptr [esi+10h], offset off_143D6D8
mov	dword ptr [ecx], offset	off_143D750
mov	byte ptr [esp+18h+arg_8], 0
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6ECA40 endp




sub_6ECA90 proc	near
sub	ecx, 0D0h
jmp	sub_6EC050
sub_6ECA90 endp

align 10h



sub_6ECAA0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	eax, [esi+9Ch]
push	edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
xor	ebx, ebx
cmp	eax, ebx
jnz	short loc_6ECB00
lea	eax, [esp+28h+var_10]
push	esi
push	eax
call	sub_6A76A0
add	esp, 8
test	byte ptr [esp+28h+var_8], 2
jnz	short loc_6ECAE8
mov	ecx, [esp+28h+var_10]
cmp	ecx, ebx
jz	short loc_6ECAE8
call	sub_64B3B0

loc_6ECAE8:
test	byte ptr [esp+28h+var_8], 1
mov	[esp+28h+var_10], ebx
jnz	short loc_6ECB00
mov	ecx, [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6ECB00
call	sub_64B3B0

loc_6ECB00:
mov	ecx, [esi+294h]
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6ECB41
push	offset sub_6EC450
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143D758
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6ECB43

loc_6ECB41:
xor	eax, eax

loc_6ECB43:
mov	edi, [esp+28h+arg_0]
mov	[edi], eax
mov	[edi+8], bl
mov	[edi+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0F0h
call	eax
mov	ebp, eax
cmp	ebp, ebx
jz	loc_6ECC19
push	edi
push	25h
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, ebp
call	sub_6ECA40
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6ECB96
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6ECB96:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebp
mov	[esp+30h+arg_0], 27h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
cmp	ecx, ebx
jz	short loc_6ECBC4
call	sub_64B3B0

loc_6ECBC4:
mov	edx, [esi+2A8h]
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], bl
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+0A4h]
push	ecx
mov	ecx, [esi+2A8h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebp, ebp
jz	short loc_6ECC0F
mov	ecx, ebp
call	sub_64B3B0

loc_6ECC0F:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6ECC19:
xor	ebp, ebp
jmp	loc_6ECB96
sub_6ECAA0 endp




sub_6ECC20 proc	near
mov	eax, 28h
retn
sub_6ECC20 endp

align 10h



sub_6ECC30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
push	esi
mov	esi, [eax]
push	edi
mov	edi, ecx
mov	ecx, offset aBlurx ; "blurX"
mov	eax, esi

loc_6ECC44:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ECC64
test	dl, dl
jz	short loc_6ECC60
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ECC64
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ECC44

loc_6ECC60:
xor	eax, eax
jmp	short loc_6ECC69

loc_6ECC64:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ECC69:
test	eax, eax
jnz	short loc_6ECC86
mov	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [esp+10h+arg_8]
call	sub_653400
fstp	dword ptr [edi+30h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	10h

loc_6ECC86:		; "blurY"
mov	ecx, offset aBlury
mov	eax, esi
lea	ecx, [ecx+0]

loc_6ECC90:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ECCB0
test	dl, dl
jz	short loc_6ECCAC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ECCB0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ECC90

loc_6ECCAC:
xor	eax, eax
jmp	short loc_6ECCB5

loc_6ECCB0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ECCB5:
test	eax, eax
jnz	short loc_6ECCD2
mov	edx, [esp+0Ch+arg_0]
mov	ecx, [esp+0Ch+arg_8]
push	edx
call	sub_653400
fstp	dword ptr [edi+34h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	10h

loc_6ECCD2:		; "quality"
mov	ecx, offset aQuality
mov	eax, esi
lea	esp, [esp+0]

loc_6ECCE0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ECD00
test	dl, dl
jz	short loc_6ECCFC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ECD00
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ECCE0

loc_6ECCFC:
xor	eax, eax
jmp	short loc_6ECD05

loc_6ECD00:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ECD05:
test	eax, eax
jnz	short loc_6ECD2A
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [esp+0Ch+arg_8]
push	eax
call	sub_653400
call	__ftol2_sse
movsx	ecx, ax
mov	[edi+38h], ecx
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	10h

loc_6ECD2A:
mov	edx, [esp+0Ch+arg_C]
mov	eax, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_0]
push	edx
push	eax
push	ebx
push	ecx
mov	ecx, edi
call	sub_665190
pop	edi
pop	esi
pop	ebx
retn	10h
sub_6ECC30 endp

align 10h



sub_6ECD50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	eax, [edi]
mov	esi, [eax]
mov	edx, offset aBlurx ; "blurX"
mov	eax, esi

loc_6ECD62:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6ECD82
test	bl, bl
jz	short loc_6ECD7E
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6ECD82
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6ECD62

loc_6ECD7E:
xor	eax, eax
jmp	short loc_6ECD87

loc_6ECD82:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ECD87:
test	eax, eax
jnz	short loc_6ECDB4
fld	dword ptr [ecx+30h]

loc_6ECD8E:
mov	esi, [esp+0Ch+arg_8]
fstp	[esp+0Ch+arg_4]
cmp	byte ptr [esi],	5
jb	short loc_6ECDA2
mov	ecx, esi
call	sub_652060

loc_6ECDA2:
fld	[esp+0Ch+arg_4]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ECDB4:		; "blurY"
mov	edx, offset aBlury
mov	eax, esi
jmp	short loc_6ECDC0
align 10h

loc_6ECDC0:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6ECDE0
test	bl, bl
jz	short loc_6ECDDC
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6ECDE0
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6ECDC0

loc_6ECDDC:
xor	eax, eax
jmp	short loc_6ECDE5

loc_6ECDE0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ECDE5:
test	eax, eax
jnz	short loc_6ECDEE
fld	dword ptr [ecx+34h]
jmp	short loc_6ECD8E

loc_6ECDEE:		; "quality"
mov	edx, offset aQuality
mov	eax, esi

loc_6ECDF5:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6ECE15
test	bl, bl
jz	short loc_6ECE11
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6ECE15
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6ECDF5

loc_6ECE11:
xor	eax, eax
jmp	short loc_6ECE1A

loc_6ECE15:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ECE1A:
test	eax, eax
jnz	short loc_6ECE3F
mov	esi, [esp+0Ch+arg_8]
cmp	byte ptr [esi],	5
mov	edi, [ecx+38h]
jb	short loc_6ECE31
mov	ecx, esi
call	sub_652060

loc_6ECE31:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ECE3F:
mov	edx, [esp+0Ch+arg_8]
mov	eax, [esp+0Ch+arg_0]
push	edx
push	edi
push	eax
call	sub_6E2610
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_6ECD50 endp

align 10h



sub_6ECE60 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_6ECE6D
mov	al, 1
retn	8

loc_6ECE6D:
mov	[esp+arg_4], eax
add	ecx, 0D0h
jmp	loc_663310
sub_6ECE60 endp

align 10h



sub_6ECE80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0D0h]
mov	dword ptr [esi], offset	off_143D87C
mov	dword ptr [esi+10h], offset off_143D828
mov	dword ptr [ecx], offset	off_143D8A0
call	sub_665A40
mov	ecx, esi
mov	dword ptr [esi], offset	off_143D804
mov	dword ptr [esi+10h], offset off_143D7B0
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6ECECA
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6ECECA:
mov	eax, esi
pop	esi
retn	4
sub_6ECE80 endp




sub_6ECED0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6ECE80
sub_6ECED0 endp

align 10h



sub_6ECEE0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6ECEF0
align 10h

loc_6ECEF0:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143D804
mov	dword ptr [esi+10h], offset off_143D7B0
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6ECF1A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6ECF1A:
mov	eax, esi
pop	esi
retn	4
sub_6ECEE0 endp




sub_6ECF20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0D0h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6ECF63
push	1
push	1
push	edi
mov	ecx, esi
call	sub_6A7350
pop	edi
mov	dword ptr [esi], offset	off_143D804
mov	dword ptr [esi+10h], offset off_143D7B0
mov	eax, esi
pop	esi
retn	4

loc_6ECF63:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6ECF20 endp

align 10h



sub_6ECF70 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+0D4h]
call	sub_67BFB0
lea	ecx, [edi+0E0h]
call	sub_67BFB0
mov	eax, [edi+0ECh]
test	eax, eax
jz	short loc_6ECFD8
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6ECFD6

loc_6ECFA3:
mov	eax, [edi+0ECh]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6ECFD1
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_6ECFD1
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_6ECFD1:
inc	esi
cmp	esi, ebx
jb	short loc_6ECFA3

loc_6ECFD6:
pop	esi
pop	ebx

loc_6ECFD8:
pop	edi
retn
sub_6ECF70 endp

align 10h



sub_6ECFE0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	28h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6ED004
push	0
push	0
push	offset aBlurfilter ; "BlurFilter"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6ED004:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6ED058
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6ED057
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	esi
push	0FFFFFFFFh
push	0
lea	edx, [eax+0A8h]
mov	eax, [eax+2A8h]
push	edx
push	eax
call	sub_671840
mov	esi, eax
add	ebx, 34h
push	ebx
lea	ecx, [esi+34h]
call	sub_656980
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6ED056
mov	ecx, esi
pop	esi
pop	ebx
pop	edi
jmp	sub_64B3B0

loc_6ED056:
pop	esi

loc_6ED057:
pop	ebx

loc_6ED058:
pop	edi
retn
sub_6ECFE0 endp

align 10h



sub_6ED060 proc	near

var_18=	qword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_0]
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_6ED09F
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 28h
jnz	short loc_6ED09F
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6ED09B
lea	ebp, [eax-10h]
test	ebp, ebp
jz	short loc_6ED0E1
mov	eax, [ebp+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebp+8], eax
jmp	short loc_6ED0E1

loc_6ED09B:
xor	ebp, ebp
jmp	short loc_6ED0E1

loc_6ED09F:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0D0h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6ED0DD
mov	eax, [esi+18h]
push	1
push	1
push	eax
mov	ecx, edi
call	sub_6A7350
mov	dword ptr [edi], offset	off_143D804
mov	dword ptr [edi+10h], offset off_143D7B0
jmp	short loc_6ED0DF

loc_6ED0DD:
xor	edi, edi

loc_6ED0DF:
mov	ebp, edi

loc_6ED0E1:
mov	ecx, [esi+4]
push	ebp
call	sub_652E40
fld	ds:flt_15AACC4
fst	dword ptr [ebp+40h]
mov	byte ptr [ebp+57h], 0FFh
fstp	dword ptr [ebp+44h]
fld1
fstp	dword ptr [ebp+5Ch]
cmp	dword ptr [esi+1Ch], 0
jle	short loc_6ED178
mov	ecx, [esi+18h]
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+40h]
cmp	dword ptr [esi+1Ch], 1
jle	short loc_6ED178
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [ebp+44h]
cmp	dword ptr [esi+1Ch], 2
jle	short loc_6ED178
mov	eax, [esi+18h]
push	eax
push	2
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+24h+arg_0]
movzx	eax, word ptr [esp+24h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+24h+var_18], eax
fldcw	word ptr [esp+24h+var_18]
fistp	[esp+24h+var_18]
mov	ecx, dword ptr [esp+24h+var_18]
mov	[ebp+48h], ecx
fldcw	word ptr [esp+24h+arg_0]

loc_6ED178:
mov	esi, [esi+18h]
mov	edx, [esi+78h]
push	0
add	esi, 78h
push	5
mov	[esp+2Ch+var_10], 0Ah
mov	byte ptr [esp+2Ch+arg_0], 0
mov	ecx, [edx+280h]
push	offset aBlurx	; "blurX"
lea	edi, [ebp+10h]
call	sub_650E40
lea	ecx, [esp+24h+arg_0]
push	ecx
lea	edx, [esp+28h+var_10]
push	edx
mov	dword ptr [esp+2Ch+var_18], eax
inc	dword ptr [eax+8]
mov	eax, [edi]
mov	edx, [eax+28h]
lea	ecx, [esp+2Ch+var_18]
push	ecx
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6ED1D8
call	sub_650DF0

loc_6ED1D8:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	0
push	5
mov	[esp+2Ch+var_10], 0Ah
mov	byte ptr [esp+2Ch+arg_0], 0
mov	ecx, [eax+280h]
push	offset aBlury	; "blurY"
call	sub_650E40
mov	dword ptr [esp+24h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_0]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	eax, [esp+2Ch+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6ED237
call	sub_650DF0

loc_6ED237:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	0
push	7
mov	[esp+2Ch+var_10], 0Ah
mov	byte ptr [esp+2Ch+arg_0], 0
mov	ecx, [eax+280h]
push	offset aQuality	; "quality"
call	sub_650E40
mov	dword ptr [esp+24h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+24h+arg_0]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	eax, [esp+2Ch+var_18]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, dword ptr [esp+24h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6ED296
call	sub_650DF0

loc_6ED296:
lea	ecx, [esp+24h+var_10]
call	sub_652830
pop	edi
pop	esi
mov	ecx, ebp
pop	ebp
add	esp, 18h
jmp	sub_64B3B0
sub_6ED060 endp

align 10h



sub_6ED2B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_6A7510
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+0D0h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143D87C
mov	dword ptr [esi+10h], offset off_143D828
mov	dword ptr [ecx], offset	off_143D8A0
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6ED2B0 endp

align 10h



sub_6ED310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6ED2B0
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143D79C
push	edi
lea	ecx, [esi+0D0h]
push	esi
mov	dword ptr [esi], offset	off_143D87C
mov	dword ptr [esi+10h], offset off_143D828
mov	dword ptr [ecx], offset	off_143D8A0
mov	byte ptr [esp+18h+arg_8], 0
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6ED310 endp




sub_6ED360 proc	near
sub	ecx, 0D0h
jmp	sub_6ECE80
sub_6ED360 endp

align 10h



sub_6ED370 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	eax, [esi+9Ch]
push	edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
xor	ebx, ebx
cmp	eax, ebx
jnz	short loc_6ED3D0
lea	eax, [esp+28h+var_10]
push	esi
push	eax
call	sub_6A76A0
add	esp, 8
test	byte ptr [esp+28h+var_8], 2
jnz	short loc_6ED3B8
mov	ecx, [esp+28h+var_10]
cmp	ecx, ebx
jz	short loc_6ED3B8
call	sub_64B3B0

loc_6ED3B8:
test	byte ptr [esp+28h+var_8], 1
mov	[esp+28h+var_10], ebx
jnz	short loc_6ED3D0
mov	ecx, [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6ED3D0
call	sub_64B3B0

loc_6ED3D0:
mov	ecx, [esi+294h]
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6ED411
push	offset sub_6ED060
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143D8A8
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6ED413

loc_6ED411:
xor	eax, eax

loc_6ED413:
mov	edi, [esp+28h+arg_0]
mov	[edi], eax
mov	[edi+8], bl
mov	[edi+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0F0h
call	eax
mov	ebp, eax
cmp	ebp, ebx
jz	loc_6ED4E9
push	edi
push	25h
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, ebp
call	sub_6ED310
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6ED466
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6ED466:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebp
mov	[esp+30h+arg_0], 28h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
cmp	ecx, ebx
jz	short loc_6ED494
call	sub_64B3B0

loc_6ED494:
mov	edx, [esi+2A8h]
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], bl
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+0A8h]
push	ecx
mov	ecx, [esi+2A8h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebp, ebp
jz	short loc_6ED4DF
mov	ecx, ebp
call	sub_64B3B0

loc_6ED4DF:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6ED4E9:
xor	ebp, ebp
jmp	loc_6ED466
sub_6ED370 endp




sub_6ED4F0 proc	near
mov	eax, 29h
retn
sub_6ED4F0 endp

align 10h



sub_6ED500 proc	near
add	ecx, 0C0h
jmp	sub_665AD0
sub_6ED500 endp

align 10h



sub_6ED510 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6ED530
align 10h

loc_6ED520:
sub	ecx, 0D0h
jmp	sub_6EE5E0
align 10h

loc_6ED530:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143D954
mov	dword ptr [esi+10h], offset off_143D900
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6ED55A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6ED55A:
mov	eax, esi
pop	esi
retn	4
sub_6ED510 endp




; int __stdcall	sub_6ED560(float, int, int)
sub_6ED560 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
push	esi
mov	esi, [eax]
push	edi
mov	edi, ecx
mov	ecx, offset aAngle_0 ; "angle"
mov	eax, esi

loc_6ED574:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ED594
test	dl, dl
jz	short loc_6ED590
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ED594
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ED574

loc_6ED590:
xor	eax, eax
jmp	short loc_6ED599

loc_6ED594:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ED599:
test	eax, eax
jnz	short loc_6ED5D3
movsx	ecx, word ptr [edi+26h]
mov	esi, [esp+0Ch+arg_8]
mov	eax, 66666667h
imul	ecx
sar	edx, 2
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
cmp	byte ptr [esi],	5
movsx	edi, cx
jb	short loc_6ED5C5
mov	ecx, esi
call	sub_652060

loc_6ED5C5:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED5D3:		; "blurX"
mov	ecx, offset aBlurx
mov	eax, esi
lea	ebx, [ebx+0]

loc_6ED5E0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ED600
test	dl, dl
jz	short loc_6ED5FC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ED600
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ED5E0

loc_6ED5FC:
xor	eax, eax
jmp	short loc_6ED605

loc_6ED600:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ED605:
test	eax, eax
jnz	short loc_6ED632
fld	dword ptr [edi+30h]

loc_6ED60C:
mov	esi, [esp+0Ch+arg_8]
fstp	[esp+0Ch+arg_0]
cmp	byte ptr [esi],	5
jb	short loc_6ED620
mov	ecx, esi
call	sub_652060

loc_6ED620:
fld	[esp+0Ch+arg_0]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_6ED62A:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED632:		; "blurY"
mov	ecx, offset aBlury
mov	eax, esi
lea	esp, [esp+0]

loc_6ED640:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ED660
test	dl, dl
jz	short loc_6ED65C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ED660
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ED640

loc_6ED65C:
xor	eax, eax
jmp	short loc_6ED665

loc_6ED660:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ED665:
test	eax, eax
jnz	short loc_6ED66E
fld	dword ptr [edi+34h]
jmp	short loc_6ED60C

loc_6ED66E:		; "distance"
push	offset aDistance_0
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED6A8
movsx	ecx, word ptr [edi+28h]
mov	eax, 66666667h
imul	ecx
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
movsx	ecx, ax
push	ecx
mov	ecx, [esp+10h+arg_8]
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED6A8:		; "highlightAlpha"
push	offset aHighlightalpha
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED6F3
mov	al, [edi+47h]
test	al, al
jnz	short loc_6ED6C3
fldz
jmp	short loc_6ED6D4

loc_6ED6C3:
movzx	edx, al
mov	[esp+0Ch+arg_0], edx
fild	[esp+0Ch+arg_0]
fdiv	ds:dbl_15FCCF8

loc_6ED6D4:
mov	ecx, [esp+0Ch+arg_8]
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
sub	esp, 8
fstp	qword ptr [esp+14h+var_14]
call	sub_64A6A0
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED6F3:		; "highlightColor"
push	offset aHighlightcolor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED71D
mov	eax, [edi+44h]
mov	ecx, [esp+0Ch+arg_8]
and	eax, offset sub_FFFFFF
push	eax
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED71D:		; "shadowAlpha"
push	offset aShadowalpha
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED768
mov	al, [edi+4Bh]
test	al, al
jnz	short loc_6ED738
fldz
jmp	short loc_6ED749

loc_6ED738:
movzx	ecx, al
mov	[esp+0Ch+arg_0], ecx
fild	[esp+0Ch+arg_0]
fdiv	ds:dbl_15FCCF8

loc_6ED749:
mov	ecx, [esp+0Ch+arg_8]
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
sub	esp, 8
fstp	qword ptr [esp+14h+var_14]
call	sub_64A6A0
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED768:		; "shadowColor"
push	offset aShadowcolor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED793
mov	edx, [edi+48h]
mov	ecx, [esp+0Ch+arg_8]
and	edx, offset sub_FFFFFF
push	edx
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED793:		; "knockout"
push	offset aKnockout
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED7C0
mov	al, [edi+24h]
shr	al, 5
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, [esp+10h+arg_8]
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED7C0:		; "quality"
push	offset aQuality
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED7E5
mov	edx, [edi+38h]
mov	ecx, [esp+0Ch+arg_8]
push	edx
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED7E5:		; "type"
push	offset aType
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED84A
mov	eax, [edi+2Ch]
shr	eax, 9
test	al, 1
jz	short loc_6ED80B
push	offset aInner	; "inner"
lea	ecx, [esp+10h+arg_0]
push	ecx
jmp	short loc_6ED815

loc_6ED80B:		; "outer"
push	offset aOuter_0
lea	edx, [esp+10h+arg_0]
push	edx

loc_6ED815:
mov	ecx, [esp+14h+arg_0]
call	sub_64AB70
mov	ecx, [esp+0Ch+arg_8]
push	eax
call	sub_64A680
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_6ED62A
call	sub_650DF0
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED84A:		; "strength"
push	offset aStrength_0
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6ED874
fld	dword ptr [edi+4Ch]
mov	ecx, [esp+0Ch+arg_8]
sub	esp, 8
fstp	qword ptr [esp+14h+var_14]
call	sub_64A6A0
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_6ED874:
mov	eax, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_0]
push	eax
push	ebx
push	ecx
mov	ecx, edi
call	sub_6E2610
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_6ED560 endp

align 10h



sub_6ED890 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0D0h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6ED8D3
push	6
push	3
push	edi
mov	ecx, esi
call	sub_6A7350
pop	edi
mov	dword ptr [esi], offset	off_143D954
mov	dword ptr [esi+10h], offset off_143D900
mov	eax, esi
pop	esi
retn	4

loc_6ED8D3:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6ED890 endp

align 10h



sub_6ED8E0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, [eax]
mov	esi, ecx
mov	ecx, offset aAngle_0 ; "angle"
mov	eax, edi

loc_6ED8F7:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ED917
test	dl, dl
jz	short loc_6ED913
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ED917
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ED8F7

loc_6ED913:
xor	eax, eax
jmp	short loc_6ED91C

loc_6ED917:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ED91C:
test	eax, eax
jnz	short loc_6ED962
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653660
lea	edx, [eax+eax*4]
add	edx, edx
lea	eax, [esp+14h+var_8]
mov	[esi+26h], dx
push	eax

loc_6ED93C:
lea	ecx, [esi+24h]
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+14h+arg_8]
fld	dword ptr [eax]
fstp	dword ptr [esi+3Ch]
fld	[esp+14h+arg_8]
fstp	dword ptr [esi+40h]

loc_6ED957:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6ED962:		; "blurX"
mov	ecx, offset aBlurx
mov	eax, edi
lea	esp, [esp+0]

loc_6ED970:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ED990
test	dl, dl
jz	short loc_6ED98C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ED990
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ED970

loc_6ED98C:
xor	eax, eax
jmp	short loc_6ED995

loc_6ED990:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ED995:
test	eax, eax
jnz	short loc_6ED9B5
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653400
fstp	dword ptr [esi+30h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6ED9B5:		; "blurY"
mov	ecx, offset aBlury
mov	eax, edi
lea	esp, [esp+0]

loc_6ED9C0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6ED9E0
test	dl, dl
jz	short loc_6ED9DC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6ED9E0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6ED9C0

loc_6ED9DC:
xor	eax, eax
jmp	short loc_6ED9E5

loc_6ED9E0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6ED9E5:
test	eax, eax
jnz	short loc_6EDA05
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_653400
fstp	dword ptr [esi+34h]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EDA05:		; "distance"
push	offset aDistance_0
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDA38
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653660
lea	ecx, [eax+eax*4]
add	ecx, ecx
add	ecx, ecx
lea	edx, [esp+14h+var_8]
mov	[esi+28h], cx
push	edx
jmp	loc_6ED93C

loc_6EDA38:		; "highlightAlpha"
push	offset aHighlightalpha
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDA94
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653400
fstp	[esp+14h+arg_8]
fld	[esp+14h+arg_8]
pop	edi
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+10h+arg_8]
movzx	eax, word ptr [esp+10h+arg_8]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
mov	al, 1
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+arg_0]
mov	cl, byte ptr [esp+10h+arg_0]
mov	[esi+47h], cl
pop	esi
fldcw	word ptr [esp+0Ch+arg_8]
pop	ebx
add	esp, 8
retn	10h

loc_6EDA94:		; "highlightColor"
push	offset aHighlightcolor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDAC6
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_653750
mov	cl, [esi+47h]
mov	[esi+44h], eax
pop	edi
mov	[esi+47h], cl
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EDAC6:		; "shadowAlpha"
push	offset aShadowalpha
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDB22
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_653400
fstp	[esp+14h+arg_8]
fld	[esp+14h+arg_8]
pop	edi
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+10h+arg_8]
movzx	eax, word ptr [esp+10h+arg_8]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
mov	al, 1
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+arg_0]
mov	cl, byte ptr [esp+10h+arg_0]
mov	[esi+4Bh], cl
pop	esi
fldcw	word ptr [esp+0Ch+arg_8]
pop	ebx
add	esp, 8
retn	10h

loc_6EDB22:		; "shadowColor"
push	offset aShadowcolor
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDB54
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	edx
call	sub_653750
mov	cl, [esi+4Bh]
mov	[esi+48h], eax
pop	edi
mov	[esi+4Bh], cl
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EDB54:		; "knockout"
push	offset aKnockout
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDBA2
mov	eax, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
push	eax
call	sub_651D80
test	al, al
jz	short loc_6EDB8C
or	byte ptr [esi+24h], 20h
or	dword ptr [esi+2Ch], 100h
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EDB8C:
and	byte ptr [esi+24h], 0DFh
and	dword ptr [esi+2Ch], 0FFFFFEFFh
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EDBA2:		; "quality"
push	offset aQuality
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDBF0
mov	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, [esp+18h+arg_8]
call	sub_653400
fnstcw	word ptr [esp+14h+arg_8]
movzx	eax, word ptr [esp+14h+arg_8]
or	eax, 0C00h
mov	[esp+14h+arg_0], eax
pop	edi
mov	al, 1
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+var_8]
mov	edx, dword ptr [esp+10h+var_8]
mov	[esi+38h], edx
pop	esi
pop	ebx
fldcw	word ptr [esp+8+arg_8]
add	esp, 8
retn	10h

loc_6EDBF0:		; "type"
push	offset aType
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_6EDC5E
mov	eax, [esp+14h+arg_0]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	ecx, [esp+24h+arg_8]
call	sub_652F60
push	offset aInner	; "inner"
lea	ecx, [esp+18h+arg_8]
call	sub_67DA70
test	al, al
jz	short loc_6EDC32
or	dword ptr [esi+2Ch], 200h
jmp	short loc_6EDC39

loc_6EDC32:
and	dword ptr [esi+2Ch], 0FFFFFDFFh

loc_6EDC39:
mov	eax, [esp+14h+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_6ED957
call	sub_650DF0
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EDC5E:		; "strength"
push	offset aStrength_0
mov	ecx, ebx
call	sub_67DA70
mov	edx, [esp+14h+arg_0]
mov	ecx, [esp+14h+arg_8]
test	al, al
jz	short loc_6EDC8A
push	edx
call	sub_653400
fstp	dword ptr [esi+4Ch]
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 8
retn	10h

loc_6EDC8A:
mov	eax, [esp+14h+arg_C]
push	eax
push	ecx
push	ebx
push	edx
mov	ecx, esi
call	sub_665190
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	10h
sub_6ED8E0 endp

align 10h



sub_6EDCB0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	29h
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6EDCD4
push	0
push	0
push	offset aBevelfilter ; "BevelFilter"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6EDCD4:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6EDD28
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6EDD27
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	esi
push	0FFFFFFFFh
push	0
lea	edx, [eax+0ACh]
mov	eax, [eax+2A8h]
push	edx
push	eax
call	sub_671840
mov	esi, eax
add	ebx, 34h
push	ebx
lea	ecx, [esi+34h]
call	sub_656980
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6EDD26
mov	ecx, esi
pop	esi
pop	ebx
pop	edi
jmp	sub_64B3B0

loc_6EDD26:
pop	esi

loc_6EDD27:
pop	ebx

loc_6EDD28:
pop	edi
retn
sub_6EDCB0 endp

align 10h



sub_6EDD30 proc	near

var_18=	qword ptr -18h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+28h+arg_0]
xor	ebx, ebx
cmp	[edi+8], ebx
jz	short loc_6EDD6D
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 29h
jnz	short loc_6EDD6D
mov	eax, [edi+8]
cmp	eax, ebx
jz	short loc_6EDDAA
lea	esi, [eax-10h]
cmp	esi, ebx
jz	short loc_6EDDAC
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
jmp	short loc_6EDDAC

loc_6EDD6D:
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	0D0h
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_6EDDAA
mov	eax, [edi+18h]
push	6
push	3
push	eax
mov	ecx, esi
call	sub_6A7350
mov	dword ptr [esi], offset	off_143D954
mov	dword ptr [esi+10h], offset off_143D900
jmp	short loc_6EDDAC

loc_6EDDAA:
xor	esi, esi

loc_6EDDAC:
mov	ecx, [edi+4]
push	esi
call	sub_652E40
mov	ecx, 50h
lea	edx, [esp+28h+var_18]
mov	[esi+38h], cx
lea	ebp, [esi+34h]
push	edx
mov	ecx, ebp
mov	dword ptr [esi+48h], 1
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
lea	ecx, [esp+28h+var_18]
fld	dword ptr [eax]
mov	eax, 1C2h
fstp	dword ptr [esi+4Ch]
push	ecx
fld	[esp+2Ch+arg_0]
mov	ecx, ebp
fstp	dword ptr [esi+50h]
mov	[esi+36h], ax
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
mov	cl, 0FFh
fld	dword ptr [eax]
fstp	dword ptr [esi+4Ch]
fld	[esp+28h+arg_0]
fstp	dword ptr [esi+50h]
mov	[esi+54h], ebx
fld	ds:flt_15AACC4
mov	[esi+57h], cl
mov	dword ptr [esi+58h], offset sub_FFFFFF
fst	dword ptr [esi+40h]
and	byte ptr [ebp+0], 9Fh
fstp	dword ptr [esi+44h]
fld1
and	dword ptr [esi+3Ch], 0FFFFFAFFh
fstp	dword ptr [esi+5Ch]
mov	[esi+5Bh], cl
cmp	[edi+1Ch], ebx
jle	loc_6EE0FA
mov	edx, [edi+18h]
push	edx
push	ebx
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
lea	eax, [eax+eax*4]
add	eax, eax
lea	ecx, [esp+28h+var_18]
add	eax, eax
push	ecx
mov	ecx, ebp
mov	[esi+38h], ax
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [esi+4Ch]
fld	[esp+28h+arg_0]
fstp	dword ptr [esi+50h]
cmp	dword ptr [edi+1Ch], 1
jle	loc_6EE0FA
mov	edx, [edi+18h]
push	edx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
lea	eax, [eax+eax*4]
lea	ecx, [esp+28h+var_18]
add	eax, eax
push	ecx
mov	ecx, ebp
mov	[esi+36h], ax
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+28h+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [esi+4Ch]
fld	[esp+28h+arg_0]
fstp	dword ptr [esi+50h]
cmp	dword ptr [edi+1Ch], 2
jle	loc_6EE0FA
mov	edx, [edi+18h]
push	edx
push	2
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	cl, [esi+57h]
mov	[esi+54h], eax
mov	[esi+57h], cl
cmp	dword ptr [edi+1Ch], 3
jle	loc_6EE0FA
mov	eax, [edi+18h]
push	eax
push	3
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+28h+arg_0]
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_18], eax
fldcw	word ptr [esp+28h+var_18]
fistp	dword ptr [esp+28h+var_18]
mov	cl, byte ptr [esp+28h+var_18]
mov	[esi+57h], cl
cmp	dword ptr [edi+1Ch], 4
fldcw	word ptr [esp+28h+arg_0]
jle	loc_6EE0FA
mov	edx, [edi+18h]
push	edx
push	4
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653750
mov	cl, [esi+5Bh]
mov	[esi+58h], eax
mov	[esi+5Bh], cl
cmp	dword ptr [edi+1Ch], 5
jle	loc_6EE0FA
mov	eax, [edi+18h]
push	eax
push	5
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
fmul	ds:dbl_15FCCF8
fnstcw	word ptr [esp+28h+arg_0]
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_18], eax
fldcw	word ptr [esp+28h+var_18]
fistp	dword ptr [esp+28h+var_18]
mov	cl, byte ptr [esp+28h+var_18]
mov	[esi+5Bh], cl
cmp	dword ptr [edi+1Ch], 6
fldcw	word ptr [esp+28h+arg_0]
jle	loc_6EE0FA
mov	edx, [edi+18h]
push	edx
push	6
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [esi+40h]
cmp	dword ptr [edi+1Ch], 7
jle	loc_6EE0FA
mov	eax, [edi+18h]
push	eax
push	7
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [esi+44h]
cmp	dword ptr [edi+1Ch], 8
jle	loc_6EE0FA
mov	ecx, [edi+18h]
push	ecx
push	8
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fstp	dword ptr [esi+5Ch]
cmp	dword ptr [edi+1Ch], 9
jle	loc_6EE0FA
mov	edx, [edi+18h]
push	edx
push	9
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_653400
fnstcw	word ptr [esp+28h+arg_0]
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_18], eax
fldcw	word ptr [esp+28h+var_18]
fistp	[esp+28h+var_18]
mov	eax, dword ptr [esp+28h+var_18]
mov	[esi+48h], eax
cmp	dword ptr [edi+1Ch], 0Ah
fldcw	word ptr [esp+28h+arg_0]
jle	loc_6EE0FA
mov	ecx, [edi+18h]
mov	dword ptr [esp+28h+var_18], ecx
push	0Ah
mov	ecx, edi
call	sub_651EC0
mov	edx, dword ptr [esp+28h+var_18]
push	ebx
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
push	offset aInner	; "inner"
lea	ecx, [esp+2Ch+arg_0]
call	sub_67DA70
test	al, al
jz	short loc_6EE0A8
or	dword ptr [esi+3Ch], 200h
jmp	short loc_6EE0AF

loc_6EE0A8:
and	dword ptr [esi+3Ch], 0FFFFFDFFh

loc_6EE0AF:
cmp	dword ptr [edi+1Ch], 0Bh
jle	short loc_6EE0E5
mov	edx, [edi+18h]
push	edx
push	0Bh
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
test	al, al
jz	short loc_6EE0DA
or	byte ptr [ebp+0], 20h
or	dword ptr [esi+3Ch], 100h
jmp	short loc_6EE0E5

loc_6EE0DA:
and	byte ptr [ebp+0], 0DFh
and	dword ptr [esi+3Ch], 0FFFFFEFFh

loc_6EE0E5:
mov	eax, [esp+28h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE0FA
call	sub_650DF0

loc_6EE0FA:
mov	edi, [edi+18h]
mov	eax, [edi+78h]
push	ebx
add	edi, 78h
push	0Bh
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aShadowcolor ; "shadowColor"
lea	ebp, [esi+10h]
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE158
call	sub_650DF0

loc_6EE158:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	0Bh
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aShadowalpha ; "shadowAlpha"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE1B5
call	sub_650DF0

loc_6EE1B5:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	0Eh
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aHighlightcolor ; "highlightColor"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE212
call	sub_650DF0

loc_6EE212:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	0Eh
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aHighlightalpha ; "highlightAlpha"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE26F
call	sub_650DF0

loc_6EE26F:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aBlurx	; "blurX"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE2CC
call	sub_650DF0

loc_6EE2CC:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aBlury	; "blurY"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE329
call	sub_650DF0

loc_6EE329:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	8
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aStrength_0 ; "strength"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE386
call	sub_650DF0

loc_6EE386:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	8
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aKnockout ; "knockout"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE3E3
call	sub_650DF0

loc_6EE3E3:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	5
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aInner	; "inner"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE440
call	sub_650DF0

loc_6EE440:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	4
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aType	; "type"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE49D
call	sub_650DF0

loc_6EE49D:
lea	ecx, [esp+28h+var_10]
call	sub_652830
mov	eax, [edi]
push	ebx
push	7
mov	[esp+30h+var_10], 0Ah
mov	byte ptr [esp+30h+arg_0], bl
mov	ecx, [eax+280h]
push	offset aQuality	; "quality"
call	sub_650E40
mov	dword ptr [esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, dword ptr [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6EE4FA
call	sub_650DF0

loc_6EE4FA:
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
jmp	sub_64B3B0
sub_6EDD30 endp

align 10h



sub_6EE520 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_6A7510
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+0D0h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143D9D4
mov	dword ptr [esi+10h], offset off_143D980
mov	dword ptr [ecx], offset	off_143D978
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EE520 endp

align 10h



sub_6EE580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6EE520
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143D8EC
push	edi
lea	ecx, [esi+0D0h]
push	esi
mov	dword ptr [esi], offset	off_143D9D4
mov	dword ptr [esi+10h], offset off_143D980
mov	dword ptr [ecx], offset	off_143D978
mov	byte ptr [esp+18h+arg_8], 0
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EE580 endp




sub_6EE5D0 proc	near
sub	ecx, 10h
jmp	sub_6EE5E0
sub_6EE5D0 endp

align 10h



sub_6EE5E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0D0h]
mov	dword ptr [esi], offset	off_143D9D4
mov	dword ptr [esi+10h], offset off_143D980
mov	dword ptr [ecx], offset	off_143D978
call	sub_665A40
mov	ecx, esi
mov	dword ptr [esi], offset	off_143D954
mov	dword ptr [esi+10h], offset off_143D900
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6EE62A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EE62A:
mov	eax, esi
pop	esi
retn	4
sub_6EE5E0 endp




sub_6EE630 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	eax, [esi+9Ch]
push	edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
xor	ebx, ebx
cmp	eax, ebx
jnz	short loc_6EE690
lea	eax, [esp+28h+var_10]
push	esi
push	eax
call	sub_6A76A0
add	esp, 8
test	byte ptr [esp+28h+var_8], 2
jnz	short loc_6EE678
mov	ecx, [esp+28h+var_10]
cmp	ecx, ebx
jz	short loc_6EE678
call	sub_64B3B0

loc_6EE678:
test	byte ptr [esp+28h+var_8], 1
mov	[esp+28h+var_10], ebx
jnz	short loc_6EE690
mov	ecx, [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6EE690
call	sub_64B3B0

loc_6EE690:
mov	ecx, [esi+294h]
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6EE6D1
push	offset sub_6EDD30
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143DA20
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6EE6D3

loc_6EE6D1:
xor	eax, eax

loc_6EE6D3:
mov	edi, [esp+28h+arg_0]
mov	[edi], eax
mov	[edi+8], bl
mov	[edi+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0F0h
call	eax
mov	ebp, eax
cmp	ebp, ebx
jz	loc_6EE7A9
push	edi
push	25h
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, ebp
call	sub_6EE580
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6EE726
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6EE726:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebp
mov	[esp+30h+arg_0], 29h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
cmp	ecx, ebx
jz	short loc_6EE754
call	sub_64B3B0

loc_6EE754:
mov	edx, [esi+2A8h]
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], bl
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+0ACh]
push	ecx
mov	ecx, [esi+2A8h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebp, ebp
jz	short loc_6EE79F
mov	ecx, ebp
call	sub_64B3B0

loc_6EE79F:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6EE7A9:
xor	ebp, ebp
jmp	loc_6EE726
sub_6EE630 endp




sub_6EE7B0 proc	near
mov	eax, 2Ah
retn
sub_6EE7B0 endp

align 10h



sub_6EE7C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+0D0h]
mov	dword ptr [esi], offset	off_143DB48
mov	dword ptr [esi+10h], offset off_143DAF0
mov	dword ptr [ecx], offset	off_143DB44
call	sub_665A40
mov	ecx, esi
mov	dword ptr [esi], offset	off_143DACC
mov	dword ptr [esi+10h], offset off_143DA78
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6EE80A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EE80A:
mov	eax, esi
pop	esi
retn	4
sub_6EE7C0 endp




sub_6EE810 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_6EE7C0
sub_6EE810 endp

align 10h



sub_6EE820 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6EE830
align 10h

loc_6EE830:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143DACC
mov	dword ptr [esi+10h], offset off_143DA78
call	sub_6A72E0
test	[esp+4+arg_0], 1
jz	short loc_6EE85A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EE85A:
mov	eax, esi
pop	esi
retn	4
sub_6EE820 endp




sub_6EE860 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 50h
push	ebp
push	esi
mov	esi, [esp+58h+arg_4]
mov	eax, [esi]
mov	eax, [eax]
mov	ebp, ecx
mov	ecx, offset aMatrix ; "matrix"

loc_6EE874:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EE894
test	dl, dl
jz	short loc_6EE890
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EE894
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EE874

loc_6EE890:
xor	eax, eax
jmp	short loc_6EE899

loc_6EE894:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EE899:
mov	ecx, [esp+58h+arg_8]
test	eax, eax
jnz	loc_6EE9AE
push	ebx
mov	ebx, [esp+5Ch+arg_0]
push	edi
push	ebx
call	sub_652C20
mov	edi, eax
xor	esi, esi
cmp	edi, esi
jz	loc_6EE9A2
mov	ecx, [ebx+78h]
push	2
call	sub_66FB00
mov	edx, [edi+10h]
push	1
lea	ecx, [edi+10h]
push	eax
mov	eax, [edx+48h]
push	ebx
call	eax
test	al, al
jz	loc_6EE9A2
cmp	[edi+3Ch], esi
mov	[esp+60h+var_50], esi
mov	[esp+60h+var_4C], 1
mov	[esp+60h+var_48], 2
mov	[esp+60h+var_44], 3
mov	[esp+60h+var_40], 10h
mov	[esp+60h+var_3C], 4
mov	[esp+60h+var_38], 5
mov	[esp+60h+var_34], 6
mov	[esp+60h+var_30], 7
mov	[esp+60h+var_2C], 11h
mov	[esp+60h+var_28], 8
mov	[esp+60h+var_24], 9
mov	[esp+60h+var_20], 0Ah
mov	[esp+60h+var_1C], 0Bh
mov	[esp+60h+var_18], 12h
mov	[esp+60h+var_14], 0Ch
mov	[esp+60h+var_10], 0Dh
mov	[esp+60h+var_C], 0Eh
mov	[esp+60h+var_8], 0Fh
mov	[esp+60h+var_4], 13h
jle	short loc_6EE9A2
nop

loc_6EE980:
mov	ecx, [edi+38h]
mov	ecx, [ecx+esi*4]
push	ebx
call	sub_653400
fstp	[esp+60h+arg_8]
mov	edx, [esp+esi*4+60h+var_50]
fld	[esp+60h+arg_8]
inc	esi
fstp	dword ptr [ebp+edx*4+70h]
cmp	esi, [edi+3Ch]
jl	short loc_6EE980

loc_6EE9A2:
pop	edi
pop	ebx
pop	esi
mov	al, 1
pop	ebp
add	esp, 50h
retn	10h

loc_6EE9AE:
mov	eax, [esp+58h+arg_C]
mov	edx, [esp+58h+arg_0]
push	eax
push	ecx
push	esi
push	edx
mov	ecx, ebp
call	sub_665190
pop	esi
pop	ebp
add	esp, 50h
retn	10h
sub_6EE860 endp

align 10h



sub_6EE9D0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0D0h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6EEA13
push	0
push	6
push	edi
mov	ecx, esi
call	sub_6A7350
pop	edi
mov	dword ptr [esi], offset	off_143DACC
mov	dword ptr [esi+10h], offset off_143DA78
mov	eax, esi
pop	esi
retn	4

loc_6EEA13:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6EE9D0 endp

align 10h



sub_6EEA20 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+0D4h]
call	sub_67C070
lea	ecx, [edi+0E0h]
call	sub_67C070
mov	eax, [edi+0ECh]
test	eax, eax
jz	short loc_6EEAA3
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_6EEAA1

loc_6EEA53:
mov	eax, [edi+0ECh]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_6EEA9C
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_6EEA9C
test	eax, 0FFFFFFFh
jbe	short loc_6EEA87
and	eax, 8FFFFFFFh
push	2
jmp	short loc_6EEA93

loc_6EEA87:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_6EEA93:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_6EEA9C:
inc	esi
cmp	esi, ebx
jb	short loc_6EEA53

loc_6EEAA1:
pop	esi
pop	ebx

loc_6EEAA3:
pop	edi
retn
sub_6EEA20 endp

align 10h



sub_6EEAB0 proc	near

var_74=	qword ptr -74h
var_64=	qword ptr -64h
var_5C=	qword ptr -5Ch
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 60h
push	ebp
push	esi
push	edi
mov	edi, [esp+6Ch+arg_4]
mov	eax, [edi]
mov	esi, [eax]
mov	ebp, ecx
mov	ecx, offset aMatrix ; "matrix"
mov	eax, esi

loc_6EEAC7:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EEAE7
test	dl, dl
jz	short loc_6EEAE3
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EEAE7
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EEAC7

loc_6EEAE3:
xor	eax, eax
jmp	short loc_6EEAEC

loc_6EEAE7:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EEAEC:
test	eax, eax
jnz	loc_6EEC19
mov	esi, [esp+6Ch+arg_0]
mov	ecx, [esi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
push	eax
mov	[esp+70h+var_50], eax
mov	eax, [edx+28h]
push	50h
mov	[esp+74h+var_4C], 1
mov	[esp+74h+var_48], 2
mov	[esp+74h+var_44], 3
mov	[esp+74h+var_40], 10h
mov	[esp+74h+var_3C], 4
mov	[esp+74h+var_38], 5
mov	[esp+74h+var_34], 6
mov	[esp+74h+var_30], 7
mov	[esp+74h+var_2C], 11h
mov	[esp+74h+var_28], 8
mov	[esp+74h+var_24], 9
mov	[esp+74h+var_20], 0Ah
mov	[esp+74h+var_1C], 0Bh
mov	[esp+74h+var_18], 12h
mov	[esp+74h+var_14], 0Ch
mov	[esp+74h+var_10], 0Dh
mov	[esp+74h+var_C], 0Eh
mov	[esp+74h+var_8], 0Fh
mov	[esp+74h+var_4], 13h
call	eax
test	eax, eax
jz	short loc_6EEBB7
push	esi
mov	ecx, eax
call	sub_65EF40
mov	edi, eax
jmp	short loc_6EEBB9

loc_6EEBB7:
xor	edi, edi

loc_6EEBB9:
push	14h
mov	ecx, edi
call	sub_65E410
xor	esi, esi

loc_6EEBC4:
mov	ecx, [esp+esi*4+6Ch+var_50]
fld	dword ptr [ebp+ecx*4+70h]
lea	edx, [esp+6Ch+var_64+4]
fstp	[esp+6Ch+arg_0]
push	edx
fld	[esp+70h+arg_0]
push	esi
mov	ecx, edi
fstp	[esp+74h+var_5C]
mov	byte ptr [esp+74h+var_64+4], 3
call	sub_65DA40
lea	ecx, [esp+6Ch+var_64+4]
call	sub_652830
inc	esi
cmp	esi, 14h
jl	short loc_6EEBC4
mov	ecx, [esp+6Ch+arg_8]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_6EEC0E
mov	ecx, edi
call	sub_64B3B0

loc_6EEC0E:
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 60h
retn	0Ch

loc_6EEC19:		; "blurX"
mov	ecx, offset aBlurx
mov	eax, esi

loc_6EEC20:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EEC40
test	dl, dl
jz	short loc_6EEC3C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EEC40
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EEC20

loc_6EEC3C:
xor	eax, eax
jmp	short loc_6EEC45

loc_6EEC40:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EEC45:
test	eax, eax
jnz	short loc_6EEC75
fld	dword ptr [ebp+30h]

loc_6EEC4C:
mov	esi, [esp+6Ch+arg_8]
fstp	[esp+6Ch+arg_0]
cmp	byte ptr [esi],	5
jb	short loc_6EEC60
mov	ecx, esi
call	sub_652060

loc_6EEC60:
fld	[esp+6Ch+arg_0]
pop	edi
fstp	qword ptr [esi+4]
mov	byte ptr [esi],	3
pop	esi
mov	al, 1
pop	ebp
add	esp, 60h
retn	0Ch

loc_6EEC75:		; "blurY"
mov	ecx, offset aBlury
mov	eax, esi
lea	esp, [esp+0]

loc_6EEC80:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_6EECA0
test	dl, dl
jz	short loc_6EEC9C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_6EECA0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_6EEC80

loc_6EEC9C:
xor	eax, eax
jmp	short loc_6EECA5

loc_6EECA0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6EECA5:
test	eax, eax
jnz	short loc_6EECAE
fld	dword ptr [ebp+34h]
jmp	short loc_6EEC4C

loc_6EECAE:		; "color"
push	offset aColor
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6EECDB
mov	eax, [ebp+44h]
mov	ecx, [esp+6Ch+arg_8]
and	eax, offset sub_FFFFFF
push	eax
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 60h
retn	0Ch

loc_6EECDB:		; "inner"
push	offset aInner
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6EED0C
mov	ecx, [ebp+2Ch]
shr	ecx, 9
and	cl, 1
movzx	edx, cl
mov	ecx, [esp+6Ch+arg_8]
push	edx
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 60h
retn	0Ch

loc_6EED0C:		; "knockout"
push	offset aKnockout
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6EED3C
mov	al, [ebp+24h]
shr	al, 5
and	al, 1
movzx	ecx, al
push	ecx
mov	ecx, [esp+70h+arg_8]
call	sub_64A6C0
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 60h
retn	0Ch

loc_6EED3C:		; "quality"
push	offset aQuality
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6EED64
mov	edx, [ebp+38h]
mov	ecx, [esp+6Ch+arg_8]
push	edx
call	sub_6B7B70
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 60h
retn	0Ch

loc_6EED64:		; "strength"
push	offset aStrength_0
mov	ecx, edi
call	sub_67DA70
test	al, al
jz	short loc_6EED91
fld	dword ptr [ebp+4Ch]
mov	ecx, [esp+6Ch+arg_8]
sub	esp, 8
fstp	[esp+74h+var_74]
call	sub_64A6A0
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 60h
retn	0Ch

loc_6EED91:
mov	eax, [esp+6Ch+arg_8]
mov	ecx, [esp+6Ch+arg_0]
push	eax
push	edi
push	ecx
mov	ecx, ebp
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
add	esp, 60h
retn	0Ch
sub_6EEAB0 endp

align 10h



sub_6EEDB0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
push	2Ah
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_6EEDD4
push	0
push	0
push	offset aColormatrixfil ; "ColorMatrixFilter"
mov	ecx, edi
call	sub_651C60
pop	edi
retn

loc_6EEDD4:
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6EEE28
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6EEE27
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	esi
push	0FFFFFFFFh
push	0
lea	edx, [eax+0B0h]
mov	eax, [eax+2A8h]
push	edx
push	eax
call	sub_671840
mov	esi, eax
add	ebx, 34h
push	ebx
lea	ecx, [esi+34h]
call	sub_656980
mov	ecx, [edi+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_6EEE26
mov	ecx, esi
pop	esi
pop	ebx
pop	edi
jmp	sub_64B3B0

loc_6EEE26:
pop	esi

loc_6EEE27:
pop	ebx

loc_6EEE28:
pop	edi
retn
sub_6EEDB0 endp

align 10h



sub_6EEE30 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 64h
push	ebx
push	esi
mov	esi, [esp+6Ch+arg_0]
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_6EEE6F
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 2Ah
jnz	short loc_6EEE6F
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6EEE6B
lea	ebx, [eax-10h]
test	ebx, ebx
jz	short loc_6EEEB1
mov	eax, [ebx+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebx+8], eax
jmp	short loc_6EEEB1

loc_6EEE6B:
xor	ebx, ebx
jmp	short loc_6EEEB1

loc_6EEE6F:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0D0h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6EEEAD
mov	eax, [esi+18h]
push	0
push	6
push	eax
mov	ecx, edi
call	sub_6A7350
mov	dword ptr [edi], offset	off_143DACC
mov	dword ptr [edi+10h], offset off_143DA78
jmp	short loc_6EEEAF

loc_6EEEAD:
xor	edi, edi

loc_6EEEAF:
mov	ebx, edi

loc_6EEEB1:
mov	ecx, [esi+4]
push	ebx
call	sub_652E40
cmp	dword ptr [esi+1Ch], 0
jle	loc_6EEFD9
mov	ecx, [esi+18h]
push	ebp
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebp, eax
test	ebp, ebp
jz	loc_6EEFD8
mov	edx, [esi+18h]
mov	ecx, [edx+78h]
push	2
call	sub_66FB00
mov	edx, [ebp+10h]
mov	edx, [edx+48h]
push	1
lea	ecx, [ebp+10h]
push	eax
mov	eax, [esi+18h]
push	eax
call	edx
test	al, al
jz	loc_6EEFD8
xor	edi, edi
cmp	[ebp+3Ch], edi
mov	[esp+74h+var_50], edi
mov	[esp+74h+var_4C], 1
mov	[esp+74h+var_48], 2
mov	[esp+74h+var_44], 3
mov	[esp+74h+var_40], 10h
mov	[esp+74h+var_3C], 4
mov	[esp+74h+var_38], 5
mov	[esp+74h+var_34], 6
mov	[esp+74h+var_30], 7
mov	[esp+74h+var_2C], 11h
mov	[esp+74h+var_28], 8
mov	[esp+74h+var_24], 9
mov	[esp+74h+var_20], 0Ah
mov	[esp+74h+var_1C], 0Bh
mov	[esp+74h+var_18], 12h
mov	[esp+74h+var_14], 0Ch
mov	[esp+74h+var_10], 0Dh
mov	[esp+74h+var_C], 0Eh
mov	[esp+74h+var_8], 0Fh
mov	[esp+74h+var_4], 13h
jle	short loc_6EEFD8
lea	ecx, [ecx+0]

loc_6EEFB0:
mov	eax, [ebp+38h]
mov	edx, [esi+18h]
mov	ecx, [eax+edi*4]
push	edx
call	sub_653400
fstp	[esp+74h+arg_0]
mov	eax, [esp+edi*4+74h+var_50]
fld	[esp+74h+arg_0]
inc	edi
fstp	dword ptr [ebx+eax*4+80h]
cmp	edi, [ebp+3Ch]
jl	short loc_6EEFB0

loc_6EEFD8:
pop	ebp

loc_6EEFD9:
mov	esi, [esi+18h]
mov	ecx, [esi+78h]
push	0
add	esi, 78h
push	6
mov	byte ptr [esp+78h+var_60], 0Ah
mov	byte ptr [esp+78h+arg_0], 0
mov	ecx, [ecx+280h]
push	offset aMatrix	; "matrix"
lea	edi, [ebx+10h]
call	sub_650E40
mov	[esp+70h+var_64], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+28h]
lea	eax, [esp+70h+arg_0]
push	eax
lea	ecx, [esp+74h+var_60]
push	ecx
lea	eax, [esp+78h+var_64]
push	eax
push	esi
mov	ecx, edi
call	edx
mov	eax, [esp+70h+var_64]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6EF039
call	sub_650DF0

loc_6EF039:
lea	ecx, [esp+70h+var_60]
call	sub_652830
pop	edi
pop	esi
mov	ecx, ebx
pop	ebx
add	esp, 64h
jmp	sub_64B3B0
sub_6EEE30 endp

align 10h



sub_6EF050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	eax
push	edi
mov	esi, ecx
call	sub_6A7510
mov	edx, [esp+8+arg_8]
lea	ecx, [esi+0D0h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	edi
push	esi
mov	dword ptr [esi], offset	off_143DB48
mov	dword ptr [esi+10h], offset off_143DAF0
mov	dword ptr [ecx], offset	off_143DB44
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EF050 endp

align 10h



sub_6EF0B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6EF050
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143DA64
push	edi
lea	ecx, [esi+0D0h]
push	esi
mov	dword ptr [esi], offset	off_143DB48
mov	dword ptr [esi+10h], offset off_143DAF0
mov	dword ptr [ecx], offset	off_143DB44
mov	byte ptr [esp+18h+arg_8], 0
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EF0B0 endp




sub_6EF100 proc	near
sub	ecx, 0D0h
jmp	sub_6EE7C0
sub_6EF100 endp

align 10h



sub_6EF110 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	eax, [esi+9Ch]
push	edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
xor	ebx, ebx
cmp	eax, ebx
jnz	short loc_6EF170
lea	eax, [esp+28h+var_10]
push	esi
push	eax
call	sub_6A76A0
add	esp, 8
test	byte ptr [esp+28h+var_8], 2
jnz	short loc_6EF158
mov	ecx, [esp+28h+var_10]
cmp	ecx, ebx
jz	short loc_6EF158
call	sub_64B3B0

loc_6EF158:
test	byte ptr [esp+28h+var_8], 1
mov	[esp+28h+var_10], ebx
jnz	short loc_6EF170
mov	ecx, [esp+28h+var_C]
cmp	ecx, ebx
jz	short loc_6EF170
call	sub_64B3B0

loc_6EF170:
mov	ecx, [esi+294h]
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	38h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_6EF1B1
push	offset sub_6EEE30
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_143DB70
mov	dword ptr [edi+10h], offset off_1439710
mov	eax, edi
jmp	short loc_6EF1B3

loc_6EF1B1:
xor	eax, eax

loc_6EF1B3:
mov	edi, [esp+28h+arg_0]
mov	[edi], eax
mov	[edi+8], bl
mov	[edi+4], ebx
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0F0h
call	eax
mov	ebp, eax
cmp	ebp, ebx
jz	loc_6EF289
push	edi
push	25h
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, ebp
call	sub_6EF0B0
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6EF206
mov	edx, [ebp+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebp+8], edx

loc_6EF206:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebp
mov	[esp+30h+arg_0], 2Ah
call	sub_661470
mov	ecx, [esp+28h+arg_4]
cmp	ecx, ebx
jz	short loc_6EF234
call	sub_64B3B0

loc_6EF234:
mov	edx, [esi+2A8h]
lea	eax, [esp+28h+arg_4]
push	eax
mov	byte ptr [esp+2Ch+arg_4], bl
mov	ebx, [edx+10h]
push	edi
lea	ecx, [esp+30h+var_10]
call	sub_651E70
push	eax
mov	eax, [ebx+28h]
lea	ecx, [esi+0B0h]
push	ecx
mov	ecx, [esi+2A8h]
lea	edx, [esp+34h+var_18]
push	edx
add	ecx, 10h
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebp, ebp
jz	short loc_6EF27F
mov	ecx, ebp
call	sub_64B3B0

loc_6EF27F:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_6EF289:
xor	ebp, ebp
jmp	loc_6EF206
sub_6EF110 endp




sub_6EF290 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

movzx	eax, [esp+arg_C]
mov	dl, [esp+arg_4]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+arg_0]
mov	[eax+4], ecx
mov	ecx, [esp+arg_8]
mov	[eax+8], dl
mov	[eax+0Ch], ecx
retn	10h
sub_6EF290 endp

align 10h



sub_6EF2C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6EF2D2
lea	edi, [eax-10h]
jmp	short loc_6EF2D4

loc_6EF2D2:
xor	edi, edi

loc_6EF2D4:
mov	ecx, [esi+18h]
push	ebx
mov	ebx, [ecx+78h]
mov	edx, 1
xor	eax, eax
cmp	[ebx+2B0h], dl
pop	ebx
jnz	short loc_6EF300
cmp	[esi+1Ch], edx
jl	short loc_6EF300
push	ecx
push	eax
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6EF300:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
lea	eax, [eax+eax*2]
movzx	edi, byte ptr [edi+eax*4+40h]
jb	short loc_6EF317
mov	ecx, esi
call	sub_652060

loc_6EF317:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
retn
sub_6EF2C0 endp




sub_6EF320 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+8]
push	edi
test	eax, eax
jz	short loc_6EF332
lea	edi, [eax-10h]
jmp	short loc_6EF334

loc_6EF332:
xor	edi, edi

loc_6EF334:
mov	ecx, [esi+18h]
push	ebx
mov	ebx, [ecx+78h]
mov	edx, 1
xor	eax, eax
cmp	[ebx+2B0h], dl
pop	ebx
jnz	short loc_6EF360
cmp	[esi+1Ch], edx
jl	short loc_6EF360
push	ecx
push	eax
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6EF360:
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
lea	eax, [eax+eax*2+0Fh]
mov	edi, [edi+eax*4]
jb	short loc_6EF376
mov	ecx, esi
call	sub_652060

loc_6EF376:
mov	[esi+4], edi
pop	edi
mov	byte ptr [esi],	4
pop	esi
retn
sub_6EF320 endp

align 10h



sub_6EF380 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, 1
cmp	[esi+1Ch], ebx
jge	short loc_6EF3A4
mov	eax, [esi+18h]
push	offset aErrorKeyisdown ; "Error: KeyIsDown needs one Argument (th"...
push	eax
call	sub_66D290
add	esp, 8
pop	esi
pop	ebx
retn

loc_6EF3A4:
mov	ecx, [esi+18h]
push	edi
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	edi, eax
xor	eax, eax
cmp	[edx+2B0h], bl
jnz	short loc_6EF3E1
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6EF3E1
push	ecx
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6EF3E1:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6EF3ED
add	ecx, 0FFFFFFF0h
jmp	short loc_6EF3EF

loc_6EF3ED:
xor	ecx, ecx

loc_6EF3EF:
cmp	eax, 4
jnb	short loc_6EF427
mov	ecx, [ecx+0FCh]
imul	eax, 67Ch
lea	ecx, [eax+ecx+9D4h]
test	ecx, ecx
jz	short loc_6EF427
push	edi
call	sub_6A78F0
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
retn

loc_6EF427:
mov	esi, [esi+4]
mov	ecx, esi
xor	bl, bl
call	sub_652060
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
retn
sub_6EF380 endp

align 10h



sub_6EF440 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, 1
cmp	[esi+1Ch], ebx
jge	short loc_6EF464
mov	eax, [esi+18h]
push	offset aErrorKeyistogg ; "Error: KeyIsToggled needs one	Argument "...
push	eax
call	sub_66D290
add	esp, 8
pop	esi
pop	ebx
retn

loc_6EF464:
mov	ecx, [esi+18h]
push	edi
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	edi, eax
xor	eax, eax
cmp	[edx+2B0h], bl
jnz	short loc_6EF4A1
cmp	dword ptr [esi+1Ch], 2
jl	short loc_6EF4A1
push	ecx
push	ebx
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653750

loc_6EF4A1:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6EF4AD
add	ecx, 0FFFFFFF0h
jmp	short loc_6EF4AF

loc_6EF4AD:
xor	ecx, ecx

loc_6EF4AF:
cmp	eax, 4
jnb	short loc_6EF4E7
mov	ecx, [ecx+0FCh]
imul	eax, 67Ch
lea	ecx, [eax+ecx+9D4h]
test	ecx, ecx
jz	short loc_6EF4E7
push	edi
call	sub_6A7930
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
retn

loc_6EF4E7:
mov	esi, [esi+4]
mov	ecx, esi
xor	bl, bl
call	sub_652060
pop	edi
mov	[esi+4], bl
mov	byte ptr [esi],	2
pop	esi
pop	ebx
retn
sub_6EF440 endp

align 10h



sub_6EF500 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	1
pop	esi
retn
sub_6EF500 endp

align 10h



sub_6EF520 proc	near
mov	eax, 16h
retn
sub_6EF520 endp

align 10h



sub_6EF530 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_143DCAC
mov	dword ptr [esi+10h], offset off_143DE50
mov	dword ptr [ecx], offset	off_143DCA8
call	sub_665A40
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6EF56A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EF56A:
mov	eax, esi
pop	esi
retn	4
sub_6EF530 endp




sub_6EF570 proc	near
sub	ecx, 10h
jmp	sub_6EF530
sub_6EF570 endp

align 10h



sub_6EF580 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
push	offset sub_6EF500
push	edi
mov	ebp, ecx
call	sub_67C3D0
mov	dword ptr [ebp+38h], offset off_14406D8
lea	esi, [ebp+10h]
mov	dword ptr [ebp+0], offset off_143DDB0
mov	dword ptr [esi], offset	off_143DD58
mov	dword ptr [ebp+38h], offset off_143DD48
lea	eax, [ebp+3Ch]
mov	ecx, 0Fh
mov	edi, edi

loc_6EF5C0:
mov	dword ptr [eax], 0
mov	byte ptr [eax+4], 0
mov	dword ptr [eax+8], 0
add	eax, 0Ch
sub	ecx, 1
jns	short loc_6EF5C0
mov	eax, [esp+20h+arg_4]
push	esi
push	edi
mov	[ebp+0FCh], eax
call	sub_6C2A50
add	esp, 8
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset aBackspace ; "BACKSPACE"
mov	bl, 4
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 8
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+var_10]
push	edx
push	offset aCapslock ; "CAPSLOCK"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 14h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+var_10]
push	eax
push	offset aControl	; "CONTROL"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 11h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset aDeletekey ; "DELETEKEY"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 2Eh
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+var_10]
push	edx
push	offset aDown	; "DOWN"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 28h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+var_10]
push	eax
push	offset aEnd_1	; "END"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 23h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset aEnter	; "ENTER"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 0Dh
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+var_10]
mov	[esp+20h+var_10], bl
mov	[esp+20h+var_C], 1Bh
push	edx
push	offset aEscape	; "ESCAPE"
push	edi
mov	ecx, esi
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+var_10]
push	eax
push	offset aHome	; "HOME"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 24h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset aInsert	; "INSERT"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 2Dh
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+var_10]
push	edx
push	offset aLeft_1	; "LEFT"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 25h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+var_10]
push	eax
push	offset aPgdn	; "PGDN"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 22h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+var_10]
push	ecx
push	offset aPgup	; "PGUP"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 21h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+var_10]
push	edx
push	offset aRight_0	; "RIGHT"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 27h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+var_10]
push	eax
push	offset aShift	; "SHIFT"
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 10h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	ecx, [esp+20h+var_10]
push	ecx
mov	[esp+24h+var_10], bl
mov	[esp+24h+var_C], 20h
push	offset aSpace	; "SPACE"
push	edi
mov	ecx, esi
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+var_10]
push	edx
push	offset unk_143DCD4
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 9
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	eax, [esp+20h+var_10]
push	eax
push	offset unk_143DCD0
push	edi
mov	ecx, esi
mov	[esp+2Ch+var_10], bl
mov	[esp+2Ch+var_C], 26h
call	sub_669260
lea	ecx, [esp+20h+var_10]
call	sub_652830
push	0
push	offset off_143DC14
push	edi
push	esi
call	sub_66FC60
mov	ecx, [esp+30h+arg_4]
add	esp, 10h
lea	eax, [ebp+38h]
push	eax
call	sub_68D9F0
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6EF580 endp

align 10h



sub_6EF8E0 proc	near
mov	dword ptr [ecx+0FCh], 0
jmp	sub_664580
sub_6EF8E0 endp

align 10h



sub_6EF8F0 proc	near

arg_0= byte ptr	 4

sub	ecx, 38h
jmp	loc_6EF910
align 10h

loc_6EF900:
sub	ecx, 10h
jmp	loc_6EF910
align 10h

loc_6EF910:
push	esi
mov	esi, ecx
mov	dword ptr [esi+38h], offset off_14406D8
call	sub_67BDD0
test	[esp+4+arg_0], 1
jz	short loc_6EF934
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EF934:
mov	eax, esi
pop	esi
retn	4
sub_6EF8F0 endp

align 10h



sub_6EF940 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_6EF950
align 10h

loc_6EF950:
push	esi
mov	esi, ecx
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_6EF96D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EF96D:
mov	eax, esi
pop	esi
retn	4
sub_6EF940 endp

align 10h



sub_6EF980 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+0Ch+arg_4]
lea	edi, [esi+10h]
push	eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], offset	off_1439230
mov	dword ptr [edi], offset	off_143DDF8
call	sub_64B8D0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [esi+34h]
mov	dword ptr [ecx], offset	off_1432704
xor	eax, eax
mov	[ecx+0Ch], al
mov	[ecx+4], eax
mov	[ecx+8], eax
push	edx
mov	[ecx+18h], al
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+1Ch], eax
push	ebx
push	esi
mov	dword ptr [esi], offset	off_143DCAC
mov	dword ptr [edi], offset	off_143DE50
mov	dword ptr [ecx], offset	off_143DCA8
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6EF980 endp

align 10h



sub_6EFA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_6EF980
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_143DBDC
push	edi
lea	ecx, [esi+34h]
push	esi
mov	dword ptr [esi], offset	off_143DCAC
mov	dword ptr [esi+10h], offset off_143DE50
mov	dword ptr [ecx], offset	off_143DCA8
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_6EFA00 endp

align 10h



sub_6EFA50 proc	near

arg_0= byte ptr	 4

sub	ecx, 34h
jmp	sub_6EF530
sub_6EFA50 endp

align 10h



sub_6EFA60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h
arg_14=	dword ptr  18h

sub	esp, 10h
push	ebx
push	ebp
push	esi
movzx	esi, byte ptr [esp+1Ch+arg_14]
mov	ebx, ecx
mov	ecx, [esp+1Ch+arg_4]
lea	eax, [esi+esi*2+0Fh]
mov	[ebx+eax*4], ecx
mov	cl, [esp+1Ch+arg_8]
lea	edx, [esi+esi*2]
lea	eax, [ebx+edx*4]
mov	edx, [esp+1Ch+arg_C]
mov	[eax+40h], cl
mov	[eax+44h], edx
movzx	eax, [esp+1Ch+arg_10]
mov	edx, [esp+1Ch+arg_0]
xor	ecx, ecx
mov	[esp+1Ch+var_10], eax
push	edx
lea	eax, [esp+20h+arg_14]
mov	[esp+20h+var_8], cx
mov	[esp+20h+var_6], cl
mov	[esp+20h+var_4], cl
mov	[esp+20h+var_3], cl
xor	ebp, ebp
push	eax
lea	ecx, [esp+24h+var_10]
mov	[esp+24h+var_C], ebp
mov	[esp+24h+var_5], 0FFh
call	sub_668230
mov	ecx, [ebx+0FCh]
cmp	ecx, ebp
jz	loc_6EFB5A
push	ebp
call	sub_68E580
cmp	eax, ebp
jz	short loc_6EFB5A
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+70h]
push	edi
call	eax
mov	edi, eax
cmp	edi, ebp
jz	short loc_6EFB59
mov	ecx, [edi+78h]
cmp	byte ptr [ecx+2B0h], 1
jnz	short loc_6EFB23
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	ebp, [edi+8]
jb	short loc_6EFB10
mov	ecx, ebp
call	sub_64B530

loc_6EFB10:
mov	ebp, [ebp+0]
test	ebp, ebp
jz	short loc_6EFB1E
mov	byte ptr [ebp+0], 4
mov	[ebp+4], esi

loc_6EFB1E:
mov	ebp, 1

loc_6EFB23:
mov	edx, [edi+8]
sub	edx, [edi+0Ch]
mov	ecx, [edi+1Ch]
lea	esi, [edi+8]
shl	ecx, 5
sar	edx, 4
lea	edx, [edx+ecx-20h]
push	edx
push	ebp
lea	ecx, [esp+28h+arg_14]
push	ecx
lea	eax, [ebx+10h]
push	eax
push	edi
call	sub_6C2A80
add	esp, 14h
test	ebp, ebp
jz	short loc_6EFB59
push	ebp
mov	ecx, esi
call	sub_64C1F0

loc_6EFB59:
pop	edi

loc_6EFB5A:
mov	eax, [esp+1Ch+arg_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
pop	ebp
pop	ebx
jnz	short loc_6EFB73
call	sub_650DF0

loc_6EFB73:
add	esp, 10h
retn	18h
sub_6EFA60 endp

align 10h



sub_6EFB80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_10]
mov	edx, [esp+arg_C]
push	eax
mov	eax, [esp+4+arg_8]
push	40h
push	edx
mov	edx, [esp+0Ch+arg_4]
push	eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
add	ecx, 0FFFFFFC8h
call	sub_6EFA60
retn	14h
sub_6EFB80 endp

align 10h



sub_6EFBB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_10]
mov	edx, [esp+arg_C]
push	eax
mov	eax, [esp+4+arg_8]
push	80h
push	edx
mov	edx, [esp+0Ch+arg_4]
push	eax
mov	eax, [esp+10h+arg_0]
push	edx
push	eax
add	ecx, 0FFFFFFC8h
call	sub_6EFA60
retn	14h
sub_6EFBB0 endp

align 10h



sub_6EFBE0 proc	near
push	esi
mov	esi, [ecx+324h]
push	edi
test	esi, esi
jnz	short loc_6EFBEF
lea	esi, [ecx+28h]

loc_6EFBEF:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_6EFC07
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6EFC07:
mov	edx, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	eax, byte ptr [ecx+edx+3]
movzx	edi, byte ptr [ecx+edx+2]
add	ecx, edx
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
add	edx, 4
shl	eax, 8
pop	edi
mov	[esi+2Ch], edx
or	eax, ecx
pop	esi
retn
sub_6EFBE0 endp

align 10h



sub_6EFC40 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
cmp	dword ptr [edi], 0
mov	esi, ecx
jnz	short loc_6EFC59
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6EFC59
call	sub_64A420

loc_6EFC59:
cmp	dword ptr [esi], 0
jnz	short loc_6EFC6A
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6EFC6A
call	sub_666B00

loc_6EFC6A:
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
pop	edi
mov	[esi+4], ecx
mov	eax, esi
pop	esi
retn	4
sub_6EFC40 endp

align 10h



sub_6EFC80 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
cmp	dword ptr [edi], 0
mov	esi, ecx
jnz	short loc_6EFC99
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6EFC99
call	sub_64A420

loc_6EFC99:
cmp	dword ptr [esi], 0
jnz	short loc_6EFCAA
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6EFCAA
call	sub_666B00

loc_6EFCAA:
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
pop	edi
mov	[esi+4], ecx
pop	esi
retn	4
sub_6EFC80 endp

align 10h



sub_6EFCC0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	3
push	eax
call	sub_698890
retn	4
sub_6EFCC0 endp

align 10h



sub_6EFCD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	3
push	eax
call	sub_69AA10
retn	4
sub_6EFCD0 endp

align 10h



sub_6EFCE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	3
push	eax
call	nullsub_39
retn	4
sub_6EFCE0 endp

align 10h



sub_6EFCF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+2Ch], 0
jnz	short loc_6EFD1A
mov	ecx, dword_1855FC0
lea	edx, [esp+8+var_4]
push	edx
mov	[esp+0Ch+var_4], 109h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	10h
push	esi
call	eax
mov	[esi+2Ch], eax

loc_6EFD1A:
mov	eax, [esp+8+arg_0]
mov	ecx, [esi+2Ch]
fld	dword ptr [eax]
fstp	dword ptr [ecx]
pop	esi
fld	dword ptr [eax+4]
fstp	dword ptr [ecx+4]
fld	dword ptr [eax+8]
fsub	dword ptr [eax]
fstp	dword ptr [ecx+8]
fld	dword ptr [eax+0Ch]
fsub	dword ptr [eax+4]
fstp	dword ptr [ecx+0Ch]
pop	ecx
retn	4
sub_6EFCF0 endp

align 10h



sub_6EFD50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+30h], 0
jnz	short loc_6EFD7A
mov	ecx, dword_1855FC0
lea	edx, [esp+8+var_4]
push	edx
mov	[esp+0Ch+var_4], 109h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	10h
push	esi
call	eax
mov	[esi+30h], eax

loc_6EFD7A:
mov	eax, [esp+8+arg_0]
mov	ecx, [esi+30h]
fld	dword ptr [eax]
fstp	dword ptr [ecx]
pop	esi
fld	dword ptr [eax+4]
fstp	dword ptr [ecx+4]
fld	dword ptr [eax+8]
fsub	dword ptr [eax]
fstp	dword ptr [ecx+8]
fld	dword ptr [eax+0Ch]
fsub	dword ptr [eax+4]
fstp	dword ptr [ecx+0Ch]
pop	ecx
retn	4
sub_6EFD50 endp

align 10h



sub_6EFDB0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+20h]
mov	ecx, [eax+1Ch]
push	ecx
lea	ecx, [esp+10h+var_8]
call	sub_67AC80
mov	ecx, [esi+324h]
test	ecx, ecx
jnz	short loc_6EFDD5
lea	ecx, [esi+28h]

loc_6EFDD5:
lea	edx, [esp+0Ch+var_8]
push	edx
call	sub_6AAD60
cmp	dword ptr [esi+2F8h], 1
mov	eax, [esi+10h]
mov	eax, [eax+0Ch]
push	eax
lea	eax, [esp+10h+var_8]
push	eax
jnz	short loc_6EFE01
mov	ecx, [esi+2FCh]
mov	edx, [ecx]
mov	edx, [edx+48h]
jmp	short loc_6EFE09

loc_6EFE01:
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	edx, [edx+4]

loc_6EFE09:
call	edx
mov	esi, [esp+0Ch+var_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6EFE31
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6EFE31:
pop	esi
add	esp, 8
retn	8
sub_6EFDB0 endp

align 10h



sub_6EFE40 proc	near

DstBuf=	byte ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
push	esi
push	edi
lea	ecx, [esp+14h+var_4]
call	sub_679E30
mov	ebp, [esp+14h+arg_0]
mov	edi, 10h
jmp	short loc_6EFE60
align 10h

loc_6EFE60:
mov	esi, [ebp+324h]
test	esi, esi
jnz	short loc_6EFE6D
lea	esi, [ebp+28h]

loc_6EFE6D:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6EFE83
mov	ecx, esi
call	sub_6A9C60

loc_6EFE83:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
push	10h		; Radix
mov	[esi+2Ch], eax
push	3		; Size
lea	edx, [esp+1Ch+DstBuf]
movzx	eax, cl
push	edx		; DstBuf
push	eax		; Value
call	__itoa_s
add	esp, 10h
push	0FFFFFFFFh
lea	ecx, [esp+18h+DstBuf]
push	ecx
lea	ecx, [esp+1Ch+var_4]
call	sub_67A0C0
sub	edi, 1
jnz	short loc_6EFE60
mov	esi, [esp+14h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6EFEE0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6EFEE0:
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8
sub_6EFE40 endp

align 10h



sub_6EFEF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6EFF03
lea	esi, [edi+28h]

loc_6EFF03:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6EFF1B
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6EFF1B:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
mov	eax, [edi+20h]
movzx	edx, cx
pop	edi
mov	[eax+74h], edx
pop	esi
retn	8
sub_6EFEF0 endp

align 10h



sub_6EFF50 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	edx, [ebx]
lea	ecx, [eax+eax*4]
push	esi
lea	esi, [edx+ecx*8-28h]
test	eax, eax
jbe	short loc_6EFF7A
push	edi
mov	edi, eax

loc_6EFF67:
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
sub	esi, 28h
sub	edi, 1
jnz	short loc_6EFF67
pop	edi

loc_6EFF7A:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
retn
sub_6EFF50 endp

align 10h



sub_6EFF90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_6EFF9D
add	eax, 0FFFFFFECh
jmp	short loc_6EFF9F

loc_6EFF9D:
xor	eax, eax

loc_6EFF9F:
mov	eax, [eax+10h]
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short locret_6EFFBC
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	eax
push	10h
call	edx

locret_6EFFBC:
retn
sub_6EFF90 endp

align 10h



sub_6EFFC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_6EFFCD
add	eax, 0FFFFFFECh
jmp	short loc_6EFFCF

loc_6EFFCD:
xor	eax, eax

loc_6EFFCF:
mov	eax, [eax+10h]
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short locret_6EFFEC
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	eax
push	11h
call	edx

locret_6EFFEC:
retn
sub_6EFFC0 endp

align 10h



sub_6EFFF0 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+20h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F001C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F001C:
mov	esi, [edi+10h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F003D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F003D:
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_64A3F0
sub_6EFFF0 endp

align 10h



sub_6F0050 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6EFFF0
test	[esp+4+arg_0], 1
jz	short loc_6F006D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F006D:
mov	eax, esi
pop	esi
retn	4
sub_6F0050 endp

align 10h



sub_6F0080 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143DF54
cmp	dword ptr [esi+8], 0
jnz	short loc_6F009B
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6F009B
call	sub_666B00

loc_6F009B:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6F00B7
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F00B7:
mov	eax, esi
pop	esi
retn	4
sub_6F0080 endp

align 10h



sub_6F00C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+10h]
mov	ebx, [eax+24h]
test	ebx, ebx
jnz	short loc_6F00E6
push	offset aErrorJpegSyste ; "Error: Jpeg System is	not installed -	c"...
add	edi, 14h
push	edi
call	sub_6EFF90
add	esp, 8
pop	edi
pop	ebx
retn	8

loc_6F00E6:
mov	ecx, [esp+8+arg_4]
cmp	dword ptr [ecx+8], 0
jle	short loc_6F011D
push	esi
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F00FE
lea	esi, [edi+28h]

loc_6F00FE:
mov	ecx, esi
call	sub_6A9C70
mov	byte ptr [esi+38h], 1
mov	esi, [esi+10h]
mov	edx, [ebx]
mov	eax, [edx+4]
push	esi
mov	ecx, ebx
call	eax
mov	[edi+2C4h], eax
pop	esi

loc_6F011D:
pop	edi
pop	ebx
retn	8
sub_6F00C0 endp

align 10h



sub_6F0130 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F0145
lea	esi, [edi+28h]

loc_6F0145:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F015D
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F015D:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
add	eax, 2
mov	[esi+2Ch], eax
mov	eax, [edi+10h]
mov	ebx, [eax+24h]
or	dx, cx
movzx	edx, dx
xor	esi, esi
mov	[esp+10h+arg_0], edx
test	ebx, ebx
jnz	short loc_6F01AF
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_6F019C
lea	eax, [edi+28h]

loc_6F019C:		; "Error: Jpeg System is not installed - c"...
push	offset aErrorJpegSyste
push	eax
call	sub_680970
add	esp, 8
jmp	loc_6F024B

loc_6F01AF:
mov	ecx, [edi+324h]
test	ecx, ecx
jnz	short loc_6F01BC
lea	ecx, [edi+28h]

loc_6F01BC:
call	sub_6A9C70
mov	esi, [edi+2C4h]
test	esi, esi
jnz	short loc_6F0213
mov	eax, [edi+2C8h]
mov	ecx, [edi+10h]
push	eax
call	sub_6FC380
test	eax, eax
jz	short loc_6F01E6
mov	ebp, dword_1855FC0
jmp	short loc_6F01F0

loc_6F01E6:
mov	ecx, [edi+20h]
call	sub_6AB2D0
mov	ebp, eax

loc_6F01F0:
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F01FD
lea	esi, [edi+28h]

loc_6F01FD:
mov	ecx, esi
call	sub_6A9C70
mov	byte ptr [esi+38h], 1
mov	edx, [ebx]
mov	esi, [esi+10h]
mov	eax, [edx+8]
push	ebp
jmp	short loc_6F0244

loc_6F0213:
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
mov	edx, [edi+2C8h]
mov	ecx, [edi+10h]
push	edx
call	sub_6FC380
test	eax, eax
jz	short loc_6F0236
mov	eax, dword_1855FC0
jmp	short loc_6F023E

loc_6F0236:
mov	ecx, [edi+20h]
call	sub_6AB2D0

loc_6F023E:
mov	edx, [ebx]
push	eax
mov	eax, [edx+14h]

loc_6F0244:
push	esi
mov	ecx, ebx
call	eax
mov	esi, eax

loc_6F024B:
push	esi
push	ecx
movzx	ecx, word ptr [esp+18h+arg_0]
mov	eax, esp
mov	[eax], ecx
mov	ecx, edi
call	sub_6FDAF0
test	esi, esi
jz	short loc_6F0268
mov	ecx, esi
call	sub_64A400

loc_6F0268:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6F0130 endp

align 10h



sub_6F0270 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+324h]
test	edi, edi
jnz	short loc_6F0285
lea	edi, [esi+28h]

loc_6F0285:
mov	eax, [edi+30h]
sub	eax, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	eax, 2
jge	short loc_6F029D
push	2
mov	ecx, edi
call	sub_6A9B70

loc_6F029D:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
shl	dx, 8
mov	[edi+2Ch], eax
mov	eax, [esi+324h]
or	dx, cx
movzx	ecx, dx
test	eax, eax
jnz	short loc_6F02CC
lea	eax, [esi+28h]

loc_6F02CC:
mov	edx, [eax+34h]
sub	edx, [eax+30h]
movzx	ecx, cx
add	edx, [eax+2Ch]
lea	ebp, [esi+14h]
push	edx
push	ecx
push	offset aGfx_definebits ; "  GFx_DefineBitsJpeg2Loader: charid =	%"...
push	ebp
mov	[esp+20h+arg_0], ecx
call	nullsub_2
mov	ecx, [esi+10h]
mov	ebx, [ecx+24h]
add	esp, 10h
xor	edi, edi
test	ebx, ebx
jnz	short loc_6F030B
push	offset aErrorJpegSys_0 ; "Error: Jpeg system is	not installed -	c"...
push	ebp
call	sub_6EFF90
add	esp, 8
jmp	short loc_6F0355

loc_6F030B:
mov	eax, [esi+2C8h]
push	eax
call	sub_6FC380
test	eax, eax
jz	short loc_6F0323
mov	ebp, dword_1855FC0
jmp	short loc_6F032D

loc_6F0323:
mov	ecx, [esi+20h]
call	sub_6AB2D0
mov	ebp, eax

loc_6F032D:
mov	edi, [esi+324h]
test	edi, edi
jnz	short loc_6F033A
lea	edi, [esi+28h]

loc_6F033A:
mov	ecx, edi
call	sub_6A9C70
mov	byte ptr [edi+38h], 1
mov	edi, [edi+10h]
mov	edx, [ebx]
mov	eax, [edx+10h]
push	ebp
push	edi
mov	ecx, ebx
call	eax
mov	edi, eax

loc_6F0355:
push	edi
push	ecx
mov	ecx, [esp+18h+arg_0]
mov	eax, esp
mov	[eax], ecx
mov	ecx, esi
call	sub_6FDAF0
test	edi, edi
jz	short loc_6F0371
mov	ecx, edi
call	sub_64A400

loc_6F0371:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6F0270 endp

align 10h



sub_6F0380 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+10h]
mov	edx, [eax+4]
push	esi
mov	esi, [esp+4+arg_0]
add	ecx, 10h
push	esi
call	edx
mov	eax, esi
pop	esi
retn	4
sub_6F0380 endp

align 10h



sub_6F03A0 proc	near
mov	eax, [ecx+10h]
mov	eax, [eax+8]
add	ecx, 10h
jmp	eax
sub_6F03A0 endp

align 10h



sub_6F03B0 proc	near
mov	eax, [ecx+10h]
mov	eax, [eax+44h]
add	ecx, 10h
jmp	eax
sub_6F03B0 endp

align 10h



sub_6F03C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
call	sub_70D050
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1436C18
jz	short loc_6F03E6
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F03E6:
mov	eax, esi
pop	esi
retn	4
sub_6F03C0 endp

align 10h



sub_6F03F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F0404
lea	esi, [edi+28h]

loc_6F0404:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F041C
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F041C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	esi, cx
push	esi
lea	edx, [edi+14h]
push	offset aShapemorphload ; "  ShapeMorphLoader: id = %d\n"
push	edx
call	nullsub_2
mov	eax, [edi+20h]
mov	ecx, [eax+1Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
add	esp, 0Ch
push	0
push	0D0h
call	edx
test	eax, eax
jz	short loc_6F0476
mov	ecx, eax
call	sub_73BBC0
mov	ebx, eax
jmp	short loc_6F0478

loc_6F0476:
xor	ebx, ebx

loc_6F0478:
mov	eax, [esp+0Ch+arg_4]
push	1
push	eax
push	edi
mov	ecx, ebx
call	sub_73BD20
cmp	dword ptr [edi+2F8h], 0
jnz	short loc_6F049E
push	ebx
push	ecx
mov	eax, esp
mov	[eax], esi
mov	ecx, [edi+20h]
call	sub_6B0AB0

loc_6F049E:
test	ebx, ebx
jz	short loc_6F04A9
mov	ecx, ebx
call	sub_666B00

loc_6F04A9:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6F03F0 endp

align 10h



sub_6F04B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F04C8
lea	esi, [edi+28h]

loc_6F04C8:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F04E0
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F04E0:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	ebp, cx
push	ebp
lea	edx, [edi+14h]
add	eax, 2
push	offset aFontIdD	; "  Font: id =	%d\n"
push	edx
mov	[esi+2Ch], eax
call	nullsub_2
mov	edx, [edi+20h]
mov	eax, [edx+4Ch]
lea	ecx, [edx+4Ch]
add	esp, 0Ch
xor	bl, bl
neg	eax
sbb	eax, eax
and	eax, ecx
jz	short loc_6F0532
test	byte ptr [eax+10h], 10h
jz	short loc_6F0532
mov	bl, 1

loc_6F0532:
mov	eax, [esp+18h+arg_4]
mov	eax, [eax]
cmp	eax, 3EDh
jnz	short loc_6F0582
mov	ecx, [edx+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	64h
call	eax
test	eax, eax
jz	short loc_6F056C
mov	ecx, eax
call	sub_7174D0
mov	ecx, [esp+18h+arg_4]
push	ecx
push	edi
mov	ecx, eax
mov	esi, eax
call	sub_717560
jmp	loc_6F0605

loc_6F056C:
mov	ecx, [esp+18h+arg_4]
xor	eax, eax
push	ecx
push	edi
mov	ecx, eax
mov	esi, eax
call	sub_717560
jmp	loc_6F0605

loc_6F0582:
cmp	eax, 30h
jz	short loc_6F058C
cmp	eax, 4Bh
jnz	short loc_6F05D9

loc_6F058C:
test	bl, bl
jnz	short loc_6F05D9
mov	eax, [edi+10h]
mov	eax, [eax+8]
cmp	dword ptr [eax+24h], 0
jz	short loc_6F05D9
mov	ecx, [edx+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	6Ch
call	eax
test	eax, eax
jz	short loc_6F05C6
mov	ecx, eax
call	sub_717E70
mov	ecx, [esp+18h+arg_4]
push	ecx
push	edi
mov	ecx, eax
mov	esi, eax
call	sub_718900
jmp	short loc_6F0605

loc_6F05C6:
mov	ecx, [esp+18h+arg_4]
xor	eax, eax
push	ecx
push	edi
mov	ecx, eax
mov	esi, eax
call	sub_718900
jmp	short loc_6F0605

loc_6F05D9:
mov	ecx, [edx+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	40h
call	eax
test	eax, eax
jz	short loc_6F05F4
mov	ecx, eax
call	sub_71A6A0
jmp	short loc_6F05F6

loc_6F05F4:
xor	eax, eax

loc_6F05F6:
mov	ecx, [esp+18h+arg_4]
push	ecx
push	edi
mov	ecx, eax
mov	esi, eax
call	sub_71ACA0

loc_6F0605:
push	esi
push	ecx
mov	eax, esp
lea	edx, [esp+20h+var_8]
push	edx
mov	ecx, edi
mov	[eax], ebp
call	sub_6FD980
cmp	[esp+18h+var_8], 0
jnz	short loc_6F062B
mov	ecx, [esp+18h+var_4]
test	ecx, ecx
jz	short loc_6F062B
call	sub_666B00

loc_6F062B:
test	esi, esi
jz	short loc_6F0636
mov	ecx, esi
call	sub_64A430

loc_6F0636:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_6F04B0 endp




sub_6F0640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F0653
lea	esi, [edi+28h]

loc_6F0653:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F066B
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F066B:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	esi, cx
push	ecx
mov	eax, esp
mov	[eax], esi
mov	ecx, [edi+20h]
call	sub_6ACAC0
test	eax, eax
jz	short loc_6F06C5
mov	ecx, [edi+324h]
test	ecx, ecx
jnz	short loc_6F06AE
lea	ecx, [edi+28h]

loc_6F06AE:
mov	edx, [esp+8+arg_4]
mov	edx, [edx]
pop	edi
pop	esi
mov	[esp+arg_4], edx
mov	[esp+arg_0], ecx
mov	ecx, eax
jmp	sub_71AA00

loc_6F06C5:
push	esi
push	offset aGfx_definefont ; "GFx_DefineFontInfoLoader: can't find GF"...
add	edi, 14h
push	edi
call	sub_6EFF90
add	esp, 0Ch
pop	edi
pop	esi
retn	8
sub_6F0640 endp

align 10h



sub_6F06E0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F06F4
lea	esi, [edi+28h]

loc_6F06F4:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F070C
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F070C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	esi, cx
movzx	edx, si
push	edx
lea	eax, [edi+14h]
push	offset aSpriteCharIdD ;	"  sprite\n  char id = %d\n"
push	eax
call	nullsub_2
mov	eax, [edi+20h]
mov	ecx, [eax+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esp, 0Ch
push	0
push	38h
call	eax
test	eax, eax
jz	short loc_6F076A
mov	ecx, [edi+24h]
push	ecx
mov	ecx, eax
call	sub_689C00
mov	ebx, eax
jmp	short loc_6F076C

loc_6F076A:
xor	ebx, ebx

loc_6F076C:
push	ecx
mov	eax, esp
push	edi
mov	ecx, ebx
mov	[eax], esi
call	sub_684E30
mov	edi, [edi+20h]
push	ebx
push	ecx
mov	eax, esp
mov	[ebx+0Ch], esi
mov	ecx, edi
mov	[eax], esi
call	sub_6B0AB0
test	ebx, ebx
jz	short loc_6F0797
mov	ecx, ebx
call	sub_666B00

loc_6F0797:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6F06E0 endp

align 10h



sub_6F07A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F07B4
lea	esi, [edi+28h]

loc_6F07B4:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F07CC
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F07CC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	esi, cx
push	esi
lea	edx, [edi+14h]
push	offset aButtonGfxchara ; "  button GFxCharacter	loader:	CharId = "...
push	edx
call	nullsub_2
mov	eax, [edi+20h]
mov	ecx, [eax+1Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
add	esp, 0Ch
push	0
push	34h
call	edx
test	eax, eax
jz	short loc_6F0823
mov	ecx, eax
call	sub_6BC520
mov	ebx, eax
jmp	short loc_6F0825

loc_6F0823:
xor	ebx, ebx

loc_6F0825:
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [eax]
push	ecx
push	edi
mov	ecx, ebx
call	sub_6BC590
cmp	dword ptr [edi+2F8h], 0
jnz	short loc_6F084B
push	ebx
push	ecx
mov	eax, esp
mov	[eax], esi
mov	ecx, [edi+20h]
call	sub_6B0AB0

loc_6F084B:
test	ebx, ebx
jz	short loc_6F0856
mov	ecx, ebx
call	sub_666B00

loc_6F0856:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6F07A0 endp

align 10h



sub_6F0860 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax+10h]
mov	ecx, [ecx+30h]
test	ecx, ecx
jz	short loc_6F0880
mov	edx, [ecx]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
push	eax
mov	eax, [edx+1Ch]
call	eax
pop	esi
retn	8

loc_6F0880:
mov	ecx, [eax+324h]
test	ecx, ecx
jnz	short loc_6F088D
lea	ecx, [eax+28h]

loc_6F088D:		; "GFx_DefineVideoStream: Video	libarary i"...
push	offset aGfx_definevide
push	ecx
call	nullsub_2
add	esp, 8
retn	8
sub_6F0860 endp

align 10h



sub_6F08A0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F08B3
lea	esi, [edi+28h]

loc_6F08B3:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F08CB
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F08CB:
add	dword ptr [esi+2Ch], 2
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F08DC
lea	esi, [edi+28h]

loc_6F08DC:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_6F08F4
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F08F4:
add	dword ptr [esi+2Ch], 2
push	offset aSettabindexUnu ; "SetTabIndex (unused) \n"
add	edi, 14h
push	edi
call	nullsub_2
add	esp, 8
pop	edi
pop	esi
retn	8
sub_6F08A0 endp

align 10h


; Attributes: bp-based frame

sub_6F0910 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F092C
lea	esi, [edi+28h]

loc_6F092C:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F0944
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F0944:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	esi, cx
push	esi
lea	eax, [edi+14h]
push	offset aExportCountD ; "  export: count	= %d\n"
push	eax
call	nullsub_2
add	esp, 0Ch
test	esi, esi
jbe	loc_6F0AA7
mov	[esp+20h+var_14], esi

loc_6F0987:
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F0994
lea	esi, [edi+28h]

loc_6F0994:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F09AC
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F09AC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
mov	[esi+2Ch], eax
mov	eax, [edi+20h]
mov	eax, [eax+1Ch]
shl	dx, 8
or	dx, cx
push	eax
lea	ecx, [esp+24h+var_8]
movzx	ebx, dx
call	sub_67AC80
lea	edx, [esp+20h+var_8]
push	edx
mov	ecx, edi
call	sub_6677F0
mov	ecx, eax
call	sub_6AAD60
mov	eax, [esp+20h+var_8]
and	eax, 0FFFFFFFCh
movzx	esi, bx
add	eax, 8
push	eax
push	esi
push	offset aExportIdDNameS ; "  export: id = %d, name = %s\n"
lea	ebx, [edi+14h]
push	ebx
call	nullsub_2
xor	eax, eax
mov	[esp+30h+var_10], eax
mov	[esp+30h+var_C], eax
add	esp, 0Ch
mov	eax, esp
mov	[eax], esi
mov	ecx, [edi+20h]
lea	eax, [esp+24h+var_10]
push	eax
call	sub_6AF4A0
test	al, al
jz	short loc_6F0A49
lea	ecx, [esp+20h+var_10]
push	ecx
push	ecx
mov	eax, esp
lea	edx, [esp+28h+var_8]
mov	[eax], esi
mov	ecx, [edi+20h]
push	edx
call	sub_6B1FB0
jmp	short loc_6F0A62

loc_6F0A49:
mov	eax, [esp+20h+var_8]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	offset aExportErrorDon ; "Export error:	don't know how to export "...
push	ebx
call	sub_6EFF90
add	esp, 0Ch

loc_6F0A62:
cmp	[esp+20h+var_10], 0
jnz	short loc_6F0A76
mov	ecx, [esp+20h+var_C]
test	ecx, ecx
jz	short loc_6F0A76
call	sub_666B00

loc_6F0A76:
mov	esi, [esp+20h+var_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F0A9C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F0A9C:
sub	[esp+20h+var_14], 1
jnz	loc_6F0987

loc_6F0AA7:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6F0910 endp




sub_6F0AB0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+324h]
push	edi
test	ecx, ecx
jnz	short loc_6F0AC4
lea	ecx, [esi+28h]

loc_6F0AC4:
call	sub_6A9860
mov	ecx, [esi+324h]
test	ecx, ecx
jnz	short loc_6F0AD6
lea	ecx, [esi+28h]

loc_6F0AD6:
mov	edi, [ecx+30h]
sub	edi, [ecx+34h]
push	0
sub	edi, [ecx+2Ch]
mov	ecx, dword_1855FC0
add	edi, eax
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [edi+1]
push	edx
call	eax
mov	ebx, eax
test	ebx, ebx
jz	loc_6F0B81
push	ebp
xor	ebp, ebp
test	edi, edi
jle	short loc_6F0B45

loc_6F0B05:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F0B14
add	esi, 28h
jmp	short loc_6F0B16

loc_6F0B14:
mov	esi, eax

loc_6F0B16:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 1
jge	short loc_6F0B2C
mov	ecx, esi
call	sub_6A9C60

loc_6F0B2C:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[esi+2Ch], eax
mov	esi, [esp+10h+arg_0]
mov	[ebx+ebp], cl
inc	ebp
cmp	ebp, edi
jl	short loc_6F0B05

loc_6F0B45:
mov	ecx, [esi+20h]
push	edi
push	ebx
call	sub_6AAF10
cmp	edi, 0FFh
pop	ebp
jl	short loc_6F0B5D
mov	edi, 0FFh

loc_6F0B5D:
push	ebx
push	offset aMetadataS ; "  metadata: %s\n"
add	esi, 14h
push	esi
mov	byte ptr [edi+ebx], 0
call	nullsub_2
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
add	esp, 0Ch
push	ebx
call	edx

loc_6F0B81:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6F0AB0 endp

align 10h



sub_6F0B90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	word ptr  14h
arg_14=	word ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	byte ptr  20h

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
sub	esp, 10h
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
push	edi
push	0
push	24h
mov	dword ptr [ebx], 0
mov	dword ptr [ebx+4], 0
call	edx
mov	esi, eax
test	esi, esi
jz	loc_6F0CCA
mov	ecx, esi
call	sub_666750
lea	edi, [esi+20h]
mov	ecx, edi
mov	dword ptr [esi], offset	off_143DF50
call	sub_679E30
mov	ecx, [esp+1Ch+arg_8]
xor	eax, eax
push	ecx
lea	ecx, [esi+10h]
mov	[esi+16h], ax
mov	dword ptr [esi+18h], 1
call	sub_67A2C0
mov	edx, [esp+1Ch+arg_C]
push	edx
mov	ecx, edi
call	sub_67A2C0
mov	eax, [ebp+20h]
mov	ecx, [eax+4Ch]
movzx	edx, [esp+1Ch+arg_10]
add	eax, 4Ch
neg	ecx
sbb	ecx, ecx
and	ecx, eax
mov	ax, [esp+1Ch+arg_14]
mov	[esi+0Ch], ecx
mov	cx, [esp+1Ch+arg_18]
mov	[esi+8], edx
mov	dl, [esp+1Ch+arg_1C]
mov	[esi+14h], ax
mov	[esi+16h], cx
mov	[esi+1Ch], dl
mov	eax, [esp+1Ch+arg_4]
and	eax, 0FFF0000h
cmp	eax, 60000h
jnz	short loc_6F0C49
mov	dword ptr [esi+18h], 3

loc_6F0C49:
lea	ecx, [esp+1Ch+var_8]
push	esi
push	ecx
call	sub_6FC9C0
mov	edx, [esp+24h+arg_4]
add	esp, 8
push	eax
push	ecx
mov	eax, esp
mov	[eax], edx
lea	eax, [esp+24h+var_10]
push	eax
mov	ecx, ebp
call	sub_6FD8B0
mov	edi, eax
cmp	dword ptr [edi], 0
jnz	short loc_6F0C80
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6F0C80
call	sub_64A420

loc_6F0C80:
cmp	dword ptr [ebx], 0
jnz	short loc_6F0C91
mov	ecx, [ebx+4]
test	ecx, ecx
jz	short loc_6F0C91
call	sub_666B00

loc_6F0C91:
cmp	[esp+1Ch+var_10], 0
mov	ecx, [edi]
mov	edx, [edi+4]
mov	[ebx], ecx
mov	[ebx+4], edx
jnz	short loc_6F0CAF
mov	ecx, [esp+1Ch+var_C]
test	ecx, ecx
jz	short loc_6F0CAF
call	sub_666B00

loc_6F0CAF:
mov	ecx, [esp+1Ch+var_8]
test	ecx, ecx
jz	short loc_6F0CC3
mov	eax, [ecx]
mov	edx, [esp+1Ch+var_4]
mov	eax, [eax+8]
push	edx
call	eax

loc_6F0CC3:
mov	ecx, esi
call	sub_64A400

loc_6F0CCA:
pop	edi
pop	esi
mov	eax, ebx
pop	ebp
add	esp, 10h
retn
sub_6F0B90 endp

align 10h



sub_6F0CE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_0]
push	ebp
push	esi
mov	esi, [ebx+324h]
push	edi
test	esi, esi
jnz	short loc_6F0CFE
lea	eax, [ebx+28h]
mov	[esp+24h+var_10], eax
jmp	short loc_6F0D02

loc_6F0CFE:
mov	[esp+24h+var_10], esi

loc_6F0D02:
test	esi, esi
jnz	short loc_6F0D09
lea	esi, [ebx+28h]

loc_6F0D09:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_6F0D21
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F0D21:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
mov	esi, [ebx+324h]
movzx	edx, cx
mov	[esp+24h+var_8], edx
test	esi, esi
jnz	short loc_6F0D57
lea	esi, [ebx+28h]

loc_6F0D57:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F0D6F
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F0D6F:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	edx, dx
mov	[esi+2Ch], eax
mov	esi, [ebx+324h]
mov	[esp+24h+var_C], edx
test	esi, esi
jnz	short loc_6F0DA2
lea	esi, [ebx+28h]

loc_6F0DA2:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F0DBA
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F0DBA:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
shl	dx, 8
mov	[esi+2Ch], eax
mov	esi, [ebx+324h]
or	dx, cx
movzx	ebp, dx
test	esi, esi
jnz	short loc_6F0DE9
lea	esi, [ebx+28h]

loc_6F0DE9:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F0E01
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F0E01:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
lea	ecx, [esp+24h+var_14]
movzx	edi, dx
mov	[esi+2Ch], eax
call	sub_679E30
lea	ecx, [esp+24h+arg_0]
call	sub_679E30
mov	esi, [esp+24h+var_10]
lea	edx, [esp+24h+var_14]
push	edx
mov	ecx, esi
call	sub_6AA580
lea	eax, [esp+24h+arg_0]
push	eax
mov	ecx, esi
call	sub_6AA580
mov	eax, [esp+24h+var_14]
mov	ecx, [esp+24h+arg_0]
movzx	edx, di
push	edx
and	eax, 0FFFFFFFCh
movzx	edx, bp
push	edx
mov	edx, [esp+2Ch+arg_4]
add	eax, 8
push	eax
movzx	eax, word ptr [esp+30h+var_C]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
mov	ecx, [esp+34h+var_8]
push	eax
mov	eax, [edx]
push	ecx
push	eax
push	offset aDefineexternal ; "  DefineExternalImage: tagInfo.TagType "...
push	esi
call	nullsub_2
mov	eax, [esp+48h+var_14]
mov	ecx, [esp+48h+arg_0]
mov	edx, [esp+48h+var_C]
add	esp, 24h
push	1
push	edi
push	ebp
and	eax, 0FFFFFFFCh
push	edx
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax
add	ecx, 8
push	ecx
push	ecx
mov	ecx, [esp+40h+var_8]
mov	eax, esp
push	ebx
lea	ebx, [esp+44h+var_8]
mov	[eax], ecx
call	sub_6F0B90
add	esp, 20h
cmp	[esp+24h+var_8], 0
jnz	short loc_6F0ED8
mov	ecx, [esp+24h+var_4]
test	ecx, ecx
jz	short loc_6F0ED8
call	sub_666B00

loc_6F0ED8:
mov	esi, [esp+24h+arg_0]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F0F00
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F0F00:
mov	esi, [esp+24h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F0F22
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F0F22:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	8
sub_6F0CE0 endp

align 10h



sub_6F0F30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_0]
mov	eax, [esi+20h]
mov	ecx, [eax+4Ch]
add	eax, 4Ch
neg	ecx
sbb	ecx, ecx
and	ecx, eax
movzx	edx, word ptr [ecx+0Ch]
mov	eax, [esi+324h]
push	edi
mov	[esp+28h+var_10], edx
test	eax, eax
jnz	short loc_6F0F5F
lea	eax, [esi+28h]

loc_6F0F5F:
mov	ecx, esi
mov	[esp+28h+var_14], eax
call	sub_6EFBE0
mov	edi, [esi+324h]
mov	ebp, eax
test	edi, edi
jnz	short loc_6F0F79
lea	edi, [esi+28h]

loc_6F0F79:
mov	ecx, [edi+30h]
sub	ecx, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	ecx, 2
jge	short loc_6F0F91
push	2
mov	ecx, edi
call	sub_6A9B70

loc_6F0F91:
mov	eax, [edi+2Ch]
mov	edx, [edi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	edx, dx
mov	[edi+2Ch], eax
mov	edi, [esi+324h]
mov	[esp+28h+var_C], edx
test	edi, edi
jnz	short loc_6F0FC4
lea	edi, [esi+28h]

loc_6F0FC4:
mov	eax, [edi+30h]
sub	eax, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	eax, 2
jge	short loc_6F0FDC
push	2
mov	ecx, edi
call	sub_6A9B70

loc_6F0FDC:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	edx, dx
mov	[edi+2Ch], eax
mov	edi, [esi+324h]
mov	[esp+28h+var_8], edx
test	edi, edi
jnz	short loc_6F100F
lea	edi, [esi+28h]

loc_6F100F:
mov	eax, [edi+30h]
sub	eax, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	eax, 2
jge	short loc_6F1027
push	2
mov	ecx, edi
call	sub_6A9B70

loc_6F1027:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
lea	ecx, [esp+28h+var_18]
movzx	ebx, dx
mov	[edi+2Ch], eax
call	sub_679E30
lea	ecx, [esp+28h+arg_0]
call	sub_679E30
mov	edi, [esp+28h+var_14]
lea	edx, [esp+28h+var_18]
push	edx
mov	ecx, edi
call	sub_6AA580
lea	eax, [esp+28h+arg_0]
push	eax
mov	ecx, edi
call	sub_6AA580
mov	ecx, 36Eh
cmp	word ptr [esp+28h+var_10], cx
jb	short loc_6F10B9
mov	edi, [esi+324h]
test	edi, edi
jnz	short loc_6F1090
lea	edi, [esi+28h]

loc_6F1090:
mov	edx, [edi+30h]
sub	edx, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	edx, 1
jge	short loc_6F10A6
mov	ecx, edi
call	sub_6A9C60

loc_6F10A6:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
mov	dl, [eax+ecx]
inc	eax
mov	byte ptr [esp+28h+var_10], dl
mov	[edi+2Ch], eax
jmp	short loc_6F10BE

loc_6F10B9:
mov	byte ptr [esp+28h+var_10], 1

loc_6F10BE:
mov	edi, [esp+28h+var_8]
mov	eax, [esp+28h+var_18]
mov	ecx, [esp+28h+arg_0]
movzx	edx, bx
push	edx
and	eax, 0FFFFFFFCh
movzx	edx, di
push	edx
add	eax, 8
push	eax
movzx	eax, word ptr [esp+34h+var_C]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
mov	ecx, [esp+38h+arg_4]
mov	edx, [ecx]
push	eax
mov	eax, [esp+3Ch+var_14]
push	ebp
push	edx
push	offset aDefineextern_0 ; "  DefineExternalImage2: tagInfo.TagType"...
push	eax
call	nullsub_2
mov	edx, [esp+4Ch+var_10]
mov	eax, [esp+4Ch+var_18]
mov	ecx, [esp+4Ch+arg_0]
add	esp, 24h
push	edx
mov	edx, [esp+2Ch+var_C]
push	ebx
push	edi
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
push	ecx
mov	eax, esp
and	ebp, 9FFFFh
push	esi
lea	ebx, [esp+48h+var_8]
mov	[eax], ebp
call	sub_6F0B90
add	esp, 20h
cmp	[esp+28h+var_8], 0
jnz	short loc_6F114E
mov	ecx, [esp+28h+var_4]
test	ecx, ecx
jz	short loc_6F114E
call	sub_666B00

loc_6F114E:
mov	esi, [esp+28h+arg_0]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F1176
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F1176:
mov	esi, [esp+28h+var_18]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F1198
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F1198:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_6F0F30 endp

align 10h



sub_6F11B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6F11BF
call	sub_666B00

loc_6F11BF:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6F11DB
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F11DB:
mov	eax, esi
pop	esi
retn	4
sub_6F11B0 endp

align 10h



sub_6F11F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+10h]
mov	ecx, [eax+34h]
test	ecx, ecx
jz	short loc_6F1219
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+0Ch]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi
retn	8

loc_6F1219:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F1226
lea	eax, [esi+28h]

loc_6F1226:		; "GFx_StartSoundLoader: Audio library is "...
push	offset aGfx_startsound
push	eax
call	nullsub_2
add	esp, 8
pop	esi
retn	8
sub_6F11F0 endp

align 10h



sub_6F1240 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+10h]
mov	ecx, [eax+34h]
test	ecx, ecx
jz	short loc_6F1269
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+8]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi
retn	8

loc_6F1269:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F1276
lea	eax, [esi+28h]

loc_6F1276:		; "GFx_DefineSoundLoader: Audio	library	is"...
push	offset aGfx_definesoun
push	eax
call	nullsub_2
add	esp, 8
pop	esi
retn	8
sub_6F1240 endp

align 10h



sub_6F1290 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+10h]
mov	ecx, [eax+34h]
test	ecx, ecx
jz	short loc_6F12B9
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+10h]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi
retn	8

loc_6F12B9:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F12C6
lea	eax, [esi+28h]

loc_6F12C6:		; "GFx_ButtonSoundLoader: Audio	library	is"...
push	offset aGfx_buttonsoun
push	eax
call	nullsub_2
add	esp, 8
pop	esi
retn	8
sub_6F1290 endp

align 10h



sub_6F12E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+10h]
mov	ecx, [eax+34h]
test	ecx, ecx
jz	short loc_6F1309
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+1Ch]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi
retn	8

loc_6F1309:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F1316
lea	eax, [esi+28h]

loc_6F1316:		; "GFx_SoundStreamHeadLoader: Audio librar"...
push	offset aGfx_soundstrea
push	eax
call	nullsub_2
add	esp, 8
pop	esi
retn	8
sub_6F12E0 endp

align 10h



sub_6F1330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+10h]
mov	ecx, [eax+34h]
test	ecx, ecx
jz	short loc_6F1359
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+20h]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi
retn	8

loc_6F1359:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F1366
lea	eax, [esi+28h]

loc_6F1366:		; "GFx_SoundStreamBlockLoader: Audio libra"...
push	offset aGfx_soundstr_0
push	eax
call	nullsub_2
add	esp, 8
pop	esi
retn	8
sub_6F1330 endp

align 10h



sub_6F1380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+10h]
mov	ecx, [eax+34h]
test	ecx, ecx
jz	short loc_6F13A9
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+14h]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi
retn	8

loc_6F13A9:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F13B6
lea	eax, [esi+28h]

loc_6F13B6:		; "GFx_DefineExternalSoundLoader: Audio	li"...
push	offset aGfx_defineexte
push	eax
call	nullsub_2
add	esp, 8
pop	esi
retn	8
sub_6F1380 endp

align 10h



sub_6F13D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+10h]
mov	ecx, [eax+34h]
test	ecx, ecx
jz	short loc_6F13F9
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	ecx, [esp+4+arg_4]
mov	edx, [eax]
mov	edx, [edx+18h]
push	ecx
push	esi
mov	ecx, eax
call	edx
pop	esi
retn	8

loc_6F13F9:
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F1406
lea	eax, [esi+28h]

loc_6F1406:		; "GFx_DefineExternalStreamSoundLoader:	Au"...
push	offset aGfx_defineex_0
push	eax
call	nullsub_2
add	esp, 8
pop	esi
retn	8
sub_6F13D0 endp

align 10h



sub_6F1420 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+18h+arg_0]
mov	eax, [esi+324h]
push	edi
test	eax, eax
jnz	short loc_6F143A
add	esi, 28h
jmp	short loc_6F143C

loc_6F143A:
mov	esi, eax

loc_6F143C:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F1454
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F1454:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	edx, dx
lea	ecx, [eax+2]
movzx	eax, dx
mov	edx, [esi+30h]
or	eax, 50000h
sub	edx, ecx
cmp	edx, 2
mov	[esi+2Ch], ecx
mov	ebp, eax
mov	byte ptr [esi+15h], 0
jge	short loc_6F1497
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F1497:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	edi, dx
mov	edx, [esi+30h]
add	eax, 2
sub	edx, eax
cmp	edx, 2
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
jge	short loc_6F14D0
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F14D0:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
lea	ecx, [esp+1Ch+var_C]
movzx	ebx, dx
mov	[esi+2Ch], eax
call	sub_679E30
lea	edx, [esp+1Ch+var_C]
push	edx
mov	ecx, esi
call	sub_6AA580
mov	eax, [esp+1Ch+var_C]
movzx	ecx, bx
push	ecx
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
mov	eax, [esp+24h+arg_4]
mov	ecx, [eax]
movzx	edx, di
push	edx
push	ebp
push	ecx
push	offset aDefineextern_1 ; "  DefineExternalGradientImage: tagInfo."...
push	esi
call	nullsub_2
mov	eax, [esp+38h+var_C]
mov	edx, [esp+38h+arg_0]
add	esp, 1Ch
push	1
push	0
push	0
push	edi
and	eax, 0FFFFFFFCh
push	offset byte_146D660
add	eax, 8
push	eax
push	ecx
mov	eax, esp
push	edx
lea	ebx, [esp+3Ch+var_8]
mov	[eax], ebp
call	sub_6F0B90
add	esp, 20h
cmp	[esp+1Ch+var_8], 0
jnz	short loc_6F1571
mov	ecx, [esp+1Ch+var_4]
test	ecx, ecx
jz	short loc_6F1571
call	sub_666B00

loc_6F1571:
mov	esi, [esp+1Ch+var_C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F1597
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F1597:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_6F1420 endp

align 10h



sub_6F15B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
add	eax, 14h
push	offset aDeprecatedTag1 ; "Deprecated tag 1004 -	DefineGradientMap"...
push	eax
call	sub_6EFFC0
add	esp, 8
retn	8
sub_6F15B0 endp

align 10h



sub_6F15D0 proc	near

var_2C=	qword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	ebp
mov	ebp, [esp+1Ch+arg_0]
push	esi
mov	esi, [ebp+324h]
push	edi
test	esi, esi
jnz	short loc_6F15E7
lea	esi, [ebp+28h]

loc_6F15E7:
fldz
fst	[esp+24h+var_10]
fst	[esp+24h+var_C]
fst	[esp+24h+var_8]
fstp	[esp+24h+var_4]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F1611
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F1611:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
lea	edx, [esp+24h+var_10]
add	eax, 2
movzx	edi, cx
push	edx
mov	ecx, esi
mov	[esi+2Ch], eax
call	sub_6AABD0
mov	ecx, esi
call	sub_6A9880
test	al, al
jz	short loc_6F1687
fld	[esp+24h+var_4]
call	__ftol2_sse
fld	[esp+24h+var_8]
push	eax
call	__ftol2_sse
fld	[esp+28h+var_C]
push	eax
call	__ftol2_sse
fld	[esp+2Ch+var_10]
push	eax
call	__ftol2_sse
push	eax
push	edi
lea	eax, [ebp+14h]
push	offset aScale9gridload ; "Scale9GridLoader, id=%d, x=%d, y=%d, w="...
push	eax
call	nullsub_2
add	esp, 1Ch

loc_6F1687:
fld	[esp+24h+var_10]
fld	[esp+24h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_6F16C0
fsubrp	st(1), st
sub	esp, 8
add	ebp, 14h
fdiv	ds:dbl_15FCE20
fstp	[esp+2Ch+var_2C]
push	offset aScale9gridHasN ; "Scale9Grid has negative width	%f\n"
push	ebp
call	sub_6EFFC0
add	esp, 10h
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn	8

loc_6F16C0:
fstp	st(1)
fstp	st
fld	[esp+24h+var_C]
fld	[esp+24h+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_6F16FD
fsubrp	st(1), st
sub	esp, 8
add	ebp, 14h
fdiv	ds:dbl_15FCE20
fstp	[esp+2Ch+var_2C]
push	offset aScale9gridHa_0 ; "Scale9Grid has negative height %f\n"
push	ebp
call	sub_6EFFC0
add	esp, 10h
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn	8

loc_6F16FD:
push	ecx
fstp	st(1)
mov	eax, esp
fstp	st
mov	[esp+28h+var_18], 0
mov	[esp+28h+var_14], 0
lea	edx, [esp+28h+var_18]
mov	[eax], edi
mov	ecx, [ebp+20h]
push	edx
call	sub_6AF4A0
test	al, al
jz	short loc_6F1778
cmp	[esp+24h+var_18], 0
jnz	short loc_6F178C
mov	ecx, [esp+24h+var_14]
mov	esi, ecx
test	ecx, ecx
jz	short loc_6F178C
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
and	eax, 0FF00h
mov	ecx, esi
cmp	eax, 8400h
jnz	short loc_6F1759
lea	eax, [esp+24h+var_10]
push	eax
call	sub_6EFCF0
jmp	short loc_6F1778

loc_6F1759:
mov	edx, [esi]
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 8100h
jnz	short loc_6F1778
lea	ecx, [esp+24h+var_10]
push	ecx
mov	ecx, esi
call	sub_6EFD50

loc_6F1778:
cmp	[esp+24h+var_18], 0
jnz	short loc_6F178C
mov	ecx, [esp+24h+var_14]
test	ecx, ecx
jz	short loc_6F178C
call	sub_666B00

loc_6F178C:
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn	8
sub_6F15D0 endp

align 10h



sub_6F17A0 proc	near

var_3C=	dword ptr -3Ch
var_24=	dword ptr -24h
var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebx
push	ebp
push	esi
mov	esi, [esp+30h+arg_0]
push	edi
mov	edi, [esi+324h]
test	edi, edi
jnz	short loc_6F17B8
lea	edi, [esi+28h]

loc_6F17B8:
mov	eax, [edi+30h]
sub	eax, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	eax, 2
jge	short loc_6F17D0
push	2
mov	ecx, edi
call	sub_6A9B70

loc_6F17D0:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	ebx, cx
add	eax, 2
push	ebx
mov	[edi+2Ch], eax
lea	eax, [esi+14h]
push	offset aShapeloaderIdD ; "  ShapeLoader: id = %d\n"
push	eax
call	nullsub_2
mov	eax, [esi+20h]
mov	ecx, [eax+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esp, 0Ch
push	0
push	60h
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6F1849
mov	dword ptr [edi], offset	off_1436C18
mov	dword ptr [edi+4], 1
mov	dword ptr [edi+8], 0
mov	dword ptr [edi+0Ch], 40000h
lea	ecx, [edi+10h]
mov	dword ptr [edi], offset	off_143E020
call	sub_712EC0
jmp	short loc_6F184B

loc_6F1849:
xor	edi, edi

loc_6F184B:
mov	ecx, [esi+324h]
test	ecx, ecx
jnz	short loc_6F1858
lea	ecx, [esi+28h]

loc_6F1858:
mov	eax, [ecx+34h]
sub	eax, [ecx+30h]
mov	edx, [esp+34h+arg_4]
add	eax, [ecx+2Ch]
mov	ecx, [edx+0Ch]
add	ecx, [edx+8]
mov	edx, [edx]
push	1
sub	ecx, eax
push	ecx
push	edx
push	esi
lea	ecx, [edi+10h]
call	sub_712F10
mov	eax, [esi+10h]
mov	eax, [eax+8]
mov	ebp, [eax+20h]
test	ebp, ebp
jz	short loc_6F18DF
mov	al, [ebp+10h]
movzx	ecx, al
neg	ecx
push	0FFFFFFFFh
sbb	ecx, ecx
and	ecx, 10h
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+40h+var_24]
call	sub_73C940
mov	edx, [edi]
fld	dword ptr [ebp+0Ch]
mov	edx, [edx+2Ch]
lea	eax, [esp+34h+var_24]
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
push	eax
push	ecx
mov	ecx, edi
fstp	[esp+3Ch+var_3C]
call	edx
mov	ecx, [esp+34h+var_18]
test	ecx, ecx
jz	short loc_6F18CE
call	sub_64A430

loc_6F18CE:
lea	ecx, [esp+34h+var_24]
mov	[esp+34h+var_24], offset off_15477D0
call	sub_64A3F0

loc_6F18DF:
lea	eax, [esi+14h]
push	offset aBoundRect ; "  bound rect:"
push	eax
call	nullsub_2
add	esp, 8
cmp	dword ptr [esi+2F8h], 0
jnz	short loc_6F1907
push	edi
push	ecx
mov	eax, esp
mov	[eax], ebx
mov	ecx, [esi+20h]
call	sub_6B0AB0

loc_6F1907:
test	edi, edi
jz	short loc_6F1912
mov	ecx, edi
call	sub_666B00

loc_6F1912:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	8
sub_6F17A0 endp

align 10h



sub_6F1920 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F1938
lea	esi, [edi+28h]

loc_6F1938:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F1950
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F1950:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
movzx	edx, cx
mov	[esp+2Ch+var_14], edx
test	esi, esi
jnz	short loc_6F1986
lea	esi, [edi+28h]

loc_6F1986:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F199E
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F199E:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	ecx, dx
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
movzx	ebx, cx
test	esi, esi
jnz	short loc_6F19D0
lea	esi, [edi+28h]

loc_6F19D0:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F19E8
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F19E8:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	edx, dx
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
mov	[esp+2Ch+arg_0], edx
test	esi, esi
jnz	short loc_6F1A1B
lea	esi, [edi+28h]

loc_6F1A1B:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F1A33
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F1A33:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	edx, dx
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
mov	[esp+2Ch+var_1C], edx
test	esi, esi
jnz	short loc_6F1A66
lea	esi, [edi+28h]

loc_6F1A66:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F1A7E
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F1A7E:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	edx, dx
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
mov	[esp+2Ch+var_18], edx
test	esi, esi
jnz	short loc_6F1AB1
lea	esi, [edi+28h]

loc_6F1AB1:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F1AC9
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F1AC9:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
add	eax, 2
mov	[esi+2Ch], eax
or	dx, cx
mov	ecx, dword_1855FC0
movzx	ebp, dx
mov	edx, [ecx]
mov	eax, [edx+28h]
xor	esi, esi
push	esi
push	20h
call	eax
cmp	eax, esi
jz	short loc_6F1B2C
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_143E2E4
mov	dword ptr [eax+8], 40000h
mov	[eax+0Ch], esi
mov	[eax+10h], esi
mov	[eax+14h], esi
mov	[eax+18h], esi
mov	[eax+1Ch], esi
mov	esi, eax

loc_6F1B2C:
movzx	ecx, word ptr [esp+2Ch+var_1C]
movzx	edx, word ptr [esp+2Ch+var_18]
or	ebx, 90000h
mov	eax, ebx
mov	[esi+8], eax
movzx	eax, word ptr [esp+2Ch+arg_0]
mov	[esi+14h], ecx
movzx	ebp, bp
lea	ecx, [esp+2Ch+var_10]
push	esi
push	ecx
mov	[esi+10h], eax
mov	[esi+18h], edx
mov	[esi+1Ch], ebp
call	sub_6FCCB0
add	esp, 8
lea	edx, [esp+2Ch+var_10]
push	edx
push	ecx
mov	ecx, [esp+34h+var_14]
mov	eax, esp
lea	edx, [esp+34h+var_8]
mov	[eax], ecx
push	edx
mov	ecx, edi
call	sub_6FD8B0
cmp	[esp+2Ch+var_8], 0
jnz	short loc_6F1B91
mov	ecx, [esp+2Ch+var_4]
test	ecx, ecx
jz	short loc_6F1B91
call	sub_666B00

loc_6F1B91:
mov	ecx, [esp+2Ch+var_10]
test	ecx, ecx
jz	short loc_6F1BA5
mov	eax, [ecx]
mov	edx, [esp+2Ch+var_C]
mov	eax, [eax+8]
push	edx
call	eax

loc_6F1BA5:
test	esi, esi
jz	short loc_6F1BB0
mov	ecx, esi
call	sub_64A400

loc_6F1BB0:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	8
sub_6F1920 endp

align 10h



sub_6F1BC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6F1C01
mov	ecx, [edi]
sub	eax, esi
push	eax
lea	eax, [esi+esi*2]
lea	edx, [ecx+eax*4]
push	edx
call	sub_6AC5B0
mov	eax, [edi+8]
shr	eax, 1
add	esp, 8
cmp	esi, eax
jnb	short loc_6F1C18
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_6CE350
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6F1C01:
cmp	esi, [edi+8]
jb	short loc_6F1C18
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6CE350

loc_6F1C18:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6F1BC0 endp




sub_6F1C20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
push	esi
xor	esi, esi
cmp	ecx, esi
jbe	short loc_6F1C6B
mov	eax, [esp+4+arg_0]
fldz
add	eax, 14h
lea	edx, [esi+1]
push	ebp

loc_6F1C38:
lea	ebp, [eax-14h]
test	ebp, ebp
jz	short loc_6F1C61
mov	dword ptr [eax-14h], offset off_155F500
mov	[eax-10h], edx
mov	dword ptr [eax-14h], offset off_143DF54
mov	[eax-0Ch], esi
mov	[eax-8], esi
fst	dword ptr [eax-4]
fst	dword ptr [eax]
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]

loc_6F1C61:
add	eax, 28h
sub	ecx, edx
jnz	short loc_6F1C38
fstp	st
pop	ebp

loc_6F1C6B:
pop	esi
retn
sub_6F1C20 endp

align 10h



sub_6F1C70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6F1CA0
mov	eax, [edi]
test	eax, eax
jz	short loc_6F1C95
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6F1C95:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6F1CA0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6F1CD5
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6F1CD5:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*4]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6F1C70 endp

align 10h



sub_6F1D10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_6F1D65
mov	edx, [ebx]
sub	eax, edi
lea	ecx, [eax+edi]
lea	ecx, [ecx+ecx*4]
push	esi
lea	esi, [edx+ecx*8-28h]
jz	short loc_6F1D46
push	ebp
mov	ebp, eax

loc_6F1D33:
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
sub	esi, 28h
sub	ebp, 1
jnz	short loc_6F1D33
pop	ebp

loc_6F1D46:
mov	eax, [ebx+8]
shr	eax, 1
pop	esi
cmp	edi, eax
jnb	short loc_6F1D7C
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, ebx
call	sub_6F1C70
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8

loc_6F1D65:
cmp	edi, [ebx+8]
jb	short loc_6F1D7C
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_6F1C70

loc_6F1D7C:
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8
sub_6F1D10 endp

align 10h



sub_6F1D90 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_6F1DE6
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_6F1DA4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_6F1DC9
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_6F1DC3
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6F1DC3
call	sub_666B00

loc_6F1DC3:
mov	dword ptr [esi], 0FFFFFFFEh

loc_6F1DC9:
add	edi, 14h
sub	ebp, 1
jnz	short loc_6F1DA4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_6F1DE6:
pop	ebx
retn
sub_6F1D90 endp

align 10h



sub_6F1DF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi+20h]
mov	edx, [ecx+0Ch]
add	ecx, 8
cmp	edx, 8
jb	short loc_6F1E13
mov	eax, [ecx]
lea	esi, [eax+8]
add	edx, 0FFFFFFF8h
mov	[ecx], esi
mov	[ecx+4], edx
jmp	short loc_6F1E1A

loc_6F1E13:
push	8
call	sub_6AB110

loc_6F1E1A:
test	eax, eax
jz	short loc_6F1E28
mov	dword ptr [eax], offset	off_143DEC4
mov	esi, eax
jmp	short loc_6F1E2A

loc_6F1E28:
xor	esi, esi

loc_6F1E2A:
push	edi
mov	ecx, esi
call	sub_6914C0
push	esi
mov	ecx, edi
call	sub_66B2B0
pop	edi
pop	esi
retn	8
sub_6F1DF0 endp

align 10h



sub_6F1E40 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 24h
push	ebp
mov	ebp, [esp+28h+arg_0]
cmp	dword ptr [ebp+0Ch], 1
jnz	loc_6F2192
push	ebx
push	esi
mov	esi, [ebp+10h]
push	edi
mov	edi, [ebp+14h]
lea	esi, ds:8[esi*4]
add	edi, 2
imul	edi, esi
mov	eax, edi
shr	eax, 2
add	eax, edi
xor	ebx, ebx
push	eax
lea	ecx, [esp+38h+var_C]
push	ecx
mov	[esp+3Ch+var_C], ebx
mov	[esp+3Ch+var_8], ebx
mov	[esp+3Ch+var_4], ebx
call	sub_747320
cmp	edi, ebx
jnz	short loc_6F1EA6
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+34h+var_C]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
pop	ebp
add	esp, 24h
retn

loc_6F1EA6:
mov	edi, [esp+34h+var_C]
push	esi		; size_t
push	ebx		; int
push	edi		; void *
call	_memset
mov	eax, [ebp+14h]
inc	eax
imul	eax, esi
push	esi		; size_t
add	eax, edi
push	ebx		; int
push	eax		; void *
call	_memset
add	esp, 18h
cmp	[ebp+14h], ebx
jbe	loc_6F1F72
mov	ecx, 5
sub	ecx, esi
mov	[esp+34h+var_20], ecx
mov	ecx, 4
sub	ecx, esi
mov	[esp+34h+var_24], ecx
mov	ecx, 3
sub	ecx, esi
mov	[esp+34h+var_18], ecx
mov	eax, 6
sub	eax, esi
mov	ecx, 2
sub	ecx, esi
lea	edi, [edi+esi*2-4]
mov	[esp+34h+var_1C], eax
mov	[esp+34h+var_14], ecx
jmp	short loc_6F1F14
align 10h

loc_6F1F10:
mov	eax, [esp+34h+var_1C]

loc_6F1F14:
mov	edx, [ebp+18h]
mov	ecx, [ebp+10h]
imul	edx, ebx
add	edx, [ebp+1Ch]
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
lea	eax, [eax+edi+2]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esp+40h+var_20]
mov	edx, [esp+40h+var_24]
mov	eax, [esp+40h+var_18]
mov	byte ptr [ecx+edi+2], 0
mov	ecx, [esp+40h+var_14]
mov	byte ptr [edx+edi+2], 0
mov	byte ptr [eax+edi+2], 0
mov	byte ptr [ecx+edi+2], 0
mov	byte ptr [edi+3], 0
mov	byte ptr [edi+2], 0
mov	byte ptr [edi+1], 0
mov	byte ptr [edi],	0
inc	ebx
add	esp, 0Ch
add	edi, esi
cmp	ebx, [ebp+14h]
jb	short loc_6F1F10
mov	edi, [esp+34h+var_C]

loc_6F1F72:
xor	eax, eax
mov	[esp+34h+var_20], eax
cmp	[ebp+14h], eax
jbe	loc_6F2181
mov	edx, 0FFFFFFF8h
lea	ecx, [edi+esi+0Bh]
sub	edx, esi
mov	[esp+34h+var_1C], ecx
mov	[esp+34h+var_10], edx

loc_6F1F94:
mov	ebx, [ebp+18h]
imul	ebx, eax
add	ebx, [ebp+1Ch]
cmp	dword ptr [ebp+10h], 0
mov	[esp+34h+var_24], 0
jbe	loc_6F216D
inc	ebx
lea	edi, [edx+ecx]

loc_6F1FB3:
mov	al, [ebx+2]
cmp	al, 10h
jnb	loc_6F20F4
movzx	edx, byte ptr [edi+esi]
movzx	ebp, byte ptr [ecx+esi-4]
movzx	eax, byte ptr [edi+8]
add	ebp, edx
movzx	edx, byte ptr [edi+4]
add	ebp, eax
movzx	eax, byte ptr [ecx-4]
add	ebp, edx
movzx	edx, byte ptr [ecx+esi]
add	ebp, eax
movzx	eax, byte ptr [ecx+esi-8]
add	ebp, edx
movzx	edx, byte ptr [ecx]
add	ebp, eax
movzx	eax, byte ptr [edi]
add	ebp, edx
add	ebp, eax
jz	loc_6F213C
movzx	edx, byte ptr [esi+ecx-7]
movzx	eax, byte ptr [edi+esi-3]
add	eax, edx
movzx	edx, byte ptr [edi+5]
add	eax, edx
movzx	edx, byte ptr [edi-3]
add	eax, edx
movzx	edx, byte ptr [edi+1]
add	eax, edx
movzx	edx, byte ptr [ecx-3]
add	eax, edx
movzx	edx, byte ptr [ecx-7]
add	eax, edx
movzx	edx, byte ptr [ecx+esi-3]
add	eax, edx
movzx	edx, byte ptr [ecx+esi-0Bh]
add	eax, edx
shl	eax, 8
xor	edx, edx
div	ebp
movzx	edx, byte ptr [ecx+esi-6]
mov	[esp+34h+var_14], eax
movzx	eax, byte ptr [edi+esi-2]
add	eax, edx
movzx	edx, byte ptr [edi+6]
add	eax, edx
movzx	edx, byte ptr [edi-2]
add	eax, edx
movzx	edx, byte ptr [edi+2]
add	eax, edx
movzx	edx, byte ptr [ecx-6]
add	eax, edx
movzx	edx, byte ptr [ecx-2]
add	eax, edx
movzx	edx, byte ptr [ecx+esi-2]
add	eax, edx
movzx	edx, byte ptr [ecx+esi-0Ah]
add	eax, edx
shl	eax, 8
xor	edx, edx
div	ebp
movzx	edx, byte ptr [ecx+esi-5]
mov	[esp+34h+var_18], eax
movzx	eax, byte ptr [edi+esi-1]
add	eax, edx
movzx	edx, byte ptr [edi+7]
add	eax, edx
movzx	edx, byte ptr [edi+3]
add	eax, edx
movzx	edx, byte ptr [edi-1]
add	eax, edx
movzx	edx, byte ptr [ecx-5]
add	eax, edx
movzx	edx, byte ptr [ecx-1]
add	eax, edx
movzx	edx, byte ptr [ecx+esi-1]
add	eax, edx
movzx	edx, byte ptr [ecx+esi-9]
add	eax, edx
xor	edx, edx
shl	eax, 8
div	ebp
mov	ebp, [esp+34h+var_14]
mov	edx, ebp
cmp	ebp, 0FFh
jbe	short loc_6F20D0
mov	edx, 0FFh

loc_6F20D0:
mov	[ebx-1], dl
mov	edx, [esp+34h+var_18]
cmp	edx, 0FFh
jbe	short loc_6F20E4
mov	edx, 0FFh

loc_6F20E4:
mov	[ebx], dl
cmp	eax, 0FFh
jbe	short loc_6F2139
mov	eax, 0FFh
jmp	short loc_6F2139

loc_6F20F4:
movzx	edx, al
movzx	ebp, word_167DCF8[edx*2]
mov	dl, [ebx-1]
cmp	dl, al
jbe	short loc_6F2108
mov	dl, al

loc_6F2108:
movzx	edx, dl
imul	edx, ebp
shr	edx, 8
mov	[ebx-1], dl
mov	dl, [ebx]
cmp	dl, al
jbe	short loc_6F211C
mov	dl, al

loc_6F211C:
movzx	edx, dl
imul	edx, ebp
shr	edx, 8
mov	[ebx], dl
mov	dl, [ebx+1]
cmp	dl, al
ja	short loc_6F2130
mov	al, dl

loc_6F2130:
movzx	eax, al
imul	eax, ebp
shr	eax, 8

loc_6F2139:
mov	[ebx+1], al

loc_6F213C:
mov	eax, [esp+34h+var_24]
mov	edx, [esp+34h+arg_0]
inc	eax
add	edi, 4
add	ecx, 4
add	ebx, 4
mov	[esp+34h+var_24], eax
cmp	eax, [edx+10h]
jb	loc_6F1FB3
mov	edi, [esp+34h+var_C]
mov	eax, [esp+34h+var_20]
mov	ecx, [esp+34h+var_1C]
mov	ebp, edx
mov	edx, [esp+34h+var_10]

loc_6F216D:
inc	eax
add	ecx, esi
mov	[esp+34h+var_20], eax
mov	[esp+34h+var_1C], ecx
cmp	eax, [ebp+14h]
jb	loc_6F1F94

loc_6F2181:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx
pop	edi
pop	esi
pop	ebx

loc_6F2192:
pop	ebp
add	esp, 24h
retn
sub_6F1E40 endp

align 10h



sub_6F21A0 proc	near

anonymous_0= word ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, [esi+324h]
test	edi, edi
jnz	short loc_6F21B8
lea	edi, [esi+28h]

loc_6F21B8:
mov	eax, [edi+30h]
sub	eax, [edi+2Ch]
mov	byte ptr [edi+15h], 0
cmp	eax, 2
jge	short loc_6F21D0
push	2
mov	ecx, edi
call	sub_6A9B70

loc_6F21D0:
mov	eax, [edi+2Ch]
mov	ecx, [edi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
shl	dx, 8
mov	[edi+2Ch], eax
mov	eax, [esi+324h]
or	dx, cx
movzx	ecx, dx
test	eax, eax
jnz	short loc_6F21FF
lea	eax, [esi+28h]

loc_6F21FF:
mov	edx, [eax+34h]
sub	edx, [eax+30h]
movzx	ecx, cx
add	edx, [eax+2Ch]
lea	ebp, [esi+14h]
push	edx
push	ecx
push	offset aGfx_definebi_0 ; "  GFx_DefineBitsJpeg3Loader: charid =	%"...
push	ebp
mov	[esp+28h+var_4], ecx
call	nullsub_2
add	esp, 10h
mov	ecx, esi
call	sub_6EFBE0
mov	ecx, [esi+324h]
test	ecx, ecx
jnz	short loc_6F2236
lea	ecx, [esi+28h]

loc_6F2236:
mov	edi, [ecx+34h]
sub	edi, [ecx+30h]
xor	ebx, ebx
add	edi, [ecx+2Ch]
mov	ecx, [esi+10h]
add	edi, eax
mov	eax, [ecx+28h]
mov	[esp+18h+var_8], eax
test	eax, eax
jnz	short loc_6F2264
push	offset aErrorGfxzlibst ; "Error: GFxZlibState is not set - can't "...
push	ebp
call	sub_6EFF90
add	esp, 8
jmp	loc_6F234B

loc_6F2264:
mov	ebp, [ecx+24h]
test	ebp, ebp
jnz	short loc_6F2281
lea	eax, [esi+14h]
push	offset aErrorJpegSyste ; "Error: Jpeg System is	not installed -	c"...
push	eax
call	sub_6EFF90
add	esp, 8
jmp	loc_6F234B

loc_6F2281:
mov	eax, [esi+2C8h]
push	eax
call	sub_6FC380
test	eax, eax
jz	short loc_6F229D
mov	ecx, dword_1855FC0
mov	[esp+18h+arg_0], ecx
jmp	short loc_6F22A9

loc_6F229D:
mov	ecx, [esi+20h]
call	sub_6AB2D0
mov	[esp+18h+arg_0], eax

loc_6F22A9:
mov	ebx, [esi+324h]
test	ebx, ebx
jnz	short loc_6F22B6
lea	ebx, [esi+28h]

loc_6F22B6:
mov	ecx, ebx
call	sub_6A9C70
mov	eax, [esp+18h+arg_0]
mov	byte ptr [ebx+38h], 1
mov	ebx, [ebx+10h]
mov	edx, [ebp+0]
mov	edx, [edx+18h]
push	eax
push	ebx
mov	ecx, ebp
call	edx
mov	ebx, eax
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F22E3
lea	eax, [esi+28h]

loc_6F22E3:
push	edi
mov	ecx, eax
call	sub_6A9D50
mov	edi, [ebx+14h]
imul	edi, [ebx+10h]
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	edi
call	edx
mov	ebp, eax
mov	eax, [esi+324h]
test	eax, eax
jnz	short loc_6F2311
lea	eax, [esi+28h]

loc_6F2311:
mov	ecx, [esp+18h+var_8]
mov	edx, [ecx]
push	edi
push	ebp
push	eax
mov	eax, [edx+8]
call	eax
xor	eax, eax
test	edi, edi
jle	short loc_6F2334

loc_6F2325:
mov	dl, [eax+ebp]
mov	ecx, [ebx+1Ch]
mov	[ecx+eax*4+3], dl
inc	eax
cmp	eax, edi
jl	short loc_6F2325

loc_6F2334:
push	ebx
call	sub_6F1E40
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
add	esp, 4
push	ebp
call	edx

loc_6F234B:
push	ebx
push	ecx
mov	ecx, [esp+20h+var_4]
mov	eax, esp
mov	[eax], ecx
mov	ecx, esi
call	sub_6FDAF0
test	ebx, ebx
jz	short loc_6F2367
mov	ecx, ebx
call	sub_64A400

loc_6F2367:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_6F21A0 endp

align 10h



sub_6F2380 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+28h+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F2398
lea	esi, [edi+28h]

loc_6F2398:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F23B0
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F23B0:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	edx, dx
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
mov	[esp+28h+var_C], edx
test	esi, esi
jnz	short loc_6F23E3
lea	esi, [edi+28h]

loc_6F23E3:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6F23F9
mov	ecx, esi
call	sub_6A9C60

loc_6F23F9:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	dl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
mov	[esp+28h+var_15], dl
test	esi, esi
jnz	short loc_6F2417
lea	esi, [edi+28h]

loc_6F2417:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F242F
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F242F:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
shl	dx, 8
mov	[esi+2Ch], eax
mov	esi, [edi+324h]
or	dx, cx
movzx	ebp, dx
test	esi, esi
jnz	short loc_6F245E
lea	esi, [edi+28h]

loc_6F245E:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F2476
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F2476:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, [esp+28h+var_15]
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, word ptr [esp+28h+var_C]
movzx	ebx, cx
push	ebx
movzx	esi, bp
push	esi
push	edx
push	eax
mov	[esp+38h+var_4], eax
mov	eax, [esp+38h+arg_4]
mov	edx, [eax]
push	edx
lea	ecx, [edi+14h]
push	offset aDefbitslossles ; "  DefBitsLossless2: tagInfo.TagType =	%"...
push	ecx
mov	[esp+44h+var_8], ebx
call	nullsub_2
mov	ecx, [edi+10h]
mov	ebp, [ecx+28h]
add	esp, 1Ch
mov	[esp+28h+var_14], 0
test	ebp, ebp
jnz	short loc_6F24F4
lea	eax, [edi+14h]
push	offset aErrorGfxzlibst ; "Error: GFxZlibState is not set - can't "...
push	eax
call	sub_6EFF90
add	esp, 8
jmp	loc_6F29F8

loc_6F24F4:
mov	eax, [edi+2C8h]
push	eax
call	sub_6FC380
test	eax, eax
jz	short loc_6F250B
mov	eax, dword_1855FC0
jmp	short loc_6F2513

loc_6F250B:
mov	ecx, [edi+20h]
call	sub_6AB2D0

loc_6F2513:
mov	ecx, [esp+28h+arg_4]
cmp	dword ptr [ecx], 14h
push	eax
push	ebx
push	esi
jnz	loc_6F27B6
push	2
call	sub_73D6D0
mov	[esp+28h+var_14], eax
mov	al, [esp+28h+var_15]
cmp	al, 3
jnz	loc_6F2615
mov	ecx, edi
call	sub_6B8800
lea	ecx, [esi+3]
and	ecx, 0FFFFFFFCh
mov	edi, ebx
imul	edi, ecx
movzx	eax, al
inc	eax
lea	eax, [eax+eax*2]
mov	[esp+28h+var_C], ecx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
add	edi, eax
push	0
mov	[esp+2Ch+var_8], eax
mov	eax, [edx+28h]
push	edi
call	eax
mov	ecx, [esp+28h+arg_0]
mov	[esp+28h+arg_4], eax
mov	eax, [ecx+324h]
test	eax, eax
jnz	short loc_6F2584
mov	eax, ecx
add	eax, 28h

loc_6F2584:
mov	ecx, [esp+28h+arg_4]
mov	edx, [ebp+0]
mov	edx, [edx+8]
push	edi
push	ecx
push	eax
mov	ecx, ebp
call	edx
xor	ecx, ecx
mov	[esp+28h+var_10], ecx
test	ebx, ebx
jle	short loc_6F25FE
mov	edx, [esp+28h+arg_4]
mov	eax, [esp+28h+var_8]
lea	ebp, [eax+edx]
mov	edx, [esp+28h+var_14]
mov	edi, edi

loc_6F25B0:
mov	eax, [edx+18h]
imul	eax, ecx
add	eax, [edx+1Ch]
xor	edi, edi
test	esi, esi
jle	short loc_6F25F1
add	eax, 2

loc_6F25C2:
movzx	ecx, byte ptr [edi+ebp]
mov	edx, [esp+28h+arg_4]
lea	edx, [edx+ecx*2]
add	ecx, edx
movzx	edx, byte ptr [ecx]
mov	[eax-2], dl
movzx	edx, byte ptr [ecx+1]
mov	[eax-1], dl
mov	cl, [ecx+2]
mov	[eax], cl
inc	edi
add	eax, 3
cmp	edi, esi
jl	short loc_6F25C2
mov	edx, [esp+28h+var_14]
mov	ecx, [esp+28h+var_10]

loc_6F25F1:
add	ebp, [esp+28h+var_C]
inc	ecx
cmp	ecx, ebx
mov	[esp+28h+var_10], ecx
jl	short loc_6F25B0

loc_6F25FE:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+28h+arg_4]
mov	edx, [edx+30h]
push	eax
call	edx
jmp	loc_6F29F4

loc_6F2615:
cmp	al, 4
jnz	loc_6F26F4
lea	eax, [esi+esi+3]
and	eax, 0FFFFFFFCh
mov	ecx, ebx
imul	ecx, eax
push	ecx
mov	[esp+2Ch+var_8], eax
mov	[esp+2Ch+arg_4], ecx
call	sub_4E4090
mov	ecx, [edi+324h]
mov	[esp+28h+var_10], eax
test	ecx, ecx
jnz	short loc_6F2648
lea	ecx, [edi+28h]

loc_6F2648:
mov	edi, [esp+28h+arg_4]
mov	edx, [ebp+0]
push	edi
push	eax
mov	eax, [edx+8]
push	ecx
mov	ecx, ebp
call	eax
xor	eax, eax
mov	[esp+28h+arg_4], eax
test	ebx, ebx
jle	short loc_6F26DD
mov	ebp, [esp+28h+var_10]
jmp	short loc_6F2670
align 10h

loc_6F2670:
mov	ecx, [esp+28h+var_14]
mov	edi, [ecx+18h]
imul	edi, eax
add	edi, [ecx+1Ch]
xor	ecx, ecx
test	esi, esi
jle	short loc_6F26D0
add	edi, 2
jmp	short loc_6F2690
align 10h

loc_6F2690:
movzx	dx, byte ptr [ebp+ecx*2+1]
movzx	ax, byte ptr [ebp+ecx*2+0]
shl	dx, 8
or	dx, ax
movzx	eax, dx
mov	edx, eax
shr	edx, 7
and	dl, 0F8h
mov	[edi-2], dl
mov	edx, eax
add	al, al
shr	edx, 2
add	al, al
and	dl, 0F8h
add	al, al
mov	[edi-1], dl
mov	[edi], al
inc	ecx
add	edi, 3
cmp	ecx, esi
jl	short loc_6F2690
mov	eax, [esp+28h+arg_4]

loc_6F26D0:
add	ebp, [esp+28h+var_8]
inc	eax
cmp	eax, ebx
mov	[esp+28h+arg_4], eax
jl	short loc_6F2670

loc_6F26DD:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+28h+var_10]
mov	eax, [eax+30h]
push	edx
call	eax
jmp	loc_6F29F4

loc_6F26F4:
cmp	al, 5
jnz	loc_6F29F8
lea	ecx, ds:0[esi*4]
mov	eax, ebx
imul	eax, ecx
push	eax
mov	[esp+2Ch+arg_4], eax
call	sub_4E4090
mov	[esp+28h+var_C], eax
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_6F2723
lea	eax, [edi+28h]

loc_6F2723:
mov	ecx, [esp+28h+arg_4]
mov	edi, [esp+28h+var_C]
mov	edx, [ebp+0]
mov	edx, [edx+8]
push	ecx
push	edi
push	eax
mov	ecx, ebp
call	edx
xor	ebp, ebp
test	ebx, ebx
jle	short loc_6F279F
add	edi, 2
mov	[esp+28h+var_10], edi

loc_6F2745:
mov	ecx, [esp+28h+var_14]
mov	eax, [ecx+18h]
imul	eax, ebp
add	eax, [ecx+1Ch]
test	esi, esi
jle	short loc_6F2789
lea	ecx, [eax+2]
mov	eax, edi
mov	edi, esi
lea	ecx, [ecx+0]

loc_6F2760:
movzx	ebx, byte ptr [eax]
mov	dl, [eax-1]
mov	byte ptr [esp+28h+arg_4], bl
mov	bl, [eax+1]
mov	[ecx-2], dl
movzx	edx, byte ptr [esp+28h+arg_4]
mov	[ecx-1], dl
mov	[ecx], bl
add	eax, 4
add	ecx, 3
sub	edi, 1
jnz	short loc_6F2760
mov	ebx, [esp+28h+var_8]

loc_6F2789:
mov	edi, [esp+28h+var_10]
lea	eax, ds:0[esi*4]
inc	ebp
add	edi, eax
cmp	ebp, ebx
mov	[esp+28h+var_10], edi
jl	short loc_6F2745

loc_6F279F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+28h+var_C]
mov	eax, [eax+30h]
push	edx
call	eax
jmp	loc_6F29F4

loc_6F27B6:
push	1
call	sub_73D6D0
mov	[esp+28h+var_14], eax
mov	al, [esp+28h+var_15]
cmp	al, 3
jnz	loc_6F289E
mov	ecx, edi
call	sub_6B8800
lea	ecx, [esi+3]
and	ecx, 0FFFFFFFCh
movzx	eax, al
mov	edi, ebx
imul	edi, ecx
inc	eax
add	eax, eax
add	eax, eax
mov	[esp+28h+var_10], ecx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
add	edi, eax
push	0
mov	[esp+2Ch+var_8], eax
mov	eax, [edx+28h]
push	edi
call	eax
mov	ecx, [esp+28h+arg_0]
mov	[esp+28h+arg_4], eax
mov	eax, [ecx+324h]
test	eax, eax
jnz	short loc_6F2818
mov	eax, ecx
add	eax, 28h

loc_6F2818:
mov	ecx, [esp+28h+arg_4]
mov	edx, [ebp+0]
mov	edx, [edx+8]
push	edi
push	ecx
push	eax
mov	ecx, ebp
call	edx
xor	ecx, ecx
mov	[esp+28h+var_C], ecx
test	ebx, ebx
jle	loc_6F25FE
mov	edx, [esp+28h+arg_4]
mov	eax, [esp+28h+var_8]
lea	ebp, [eax+edx]
mov	edx, [esp+28h+var_14]

loc_6F2846:
mov	eax, [edx+18h]
imul	eax, ecx
add	eax, [edx+1Ch]
xor	edi, edi
test	esi, esi
jle	short loc_6F288C
add	eax, 2

loc_6F2858:
movzx	ecx, byte ptr [edi+ebp]
mov	edx, [esp+28h+arg_4]
lea	ecx, [edx+ecx*4]
movzx	edx, byte ptr [ecx]
mov	[eax-2], dl
movzx	edx, byte ptr [ecx+1]
mov	[eax-1], dl
movzx	edx, byte ptr [ecx+2]
mov	[eax], dl
mov	cl, [ecx+3]
mov	[eax+1], cl
inc	edi
add	eax, 4
cmp	edi, esi
jl	short loc_6F2858
mov	edx, [esp+28h+var_14]
mov	ecx, [esp+28h+var_C]

loc_6F288C:
add	ebp, [esp+28h+var_10]
inc	ecx
cmp	ecx, ebx
mov	[esp+28h+var_C], ecx
jl	short loc_6F2846
jmp	loc_6F25FE

loc_6F289E:
cmp	al, 4
jnz	loc_6F2966
lea	eax, [esi+esi+3]
and	eax, 0FFFFFFFCh
mov	ecx, ebx
imul	ecx, eax
push	ecx
mov	[esp+2Ch+var_8], eax
mov	[esp+2Ch+arg_4], ecx
call	sub_4E4090
mov	ecx, [edi+324h]
mov	[esp+28h+var_C], eax
test	ecx, ecx
jnz	short loc_6F28D1
lea	ecx, [edi+28h]

loc_6F28D1:
mov	edi, [esp+28h+arg_4]
mov	edx, [ebp+0]
push	edi
push	eax
mov	eax, [edx+8]
push	ecx
mov	ecx, ebp
call	eax
xor	eax, eax
mov	[esp+28h+arg_4], eax
test	ebx, ebx
jle	loc_6F279F
mov	ebp, [esp+28h+var_C]

loc_6F28F4:
mov	edx, [esp+28h+var_14]
mov	ecx, [edx+18h]
imul	ecx, eax
add	ecx, [edx+1Ch]
xor	edi, edi
test	esi, esi
jle	short loc_6F2954
add	ecx, 2
lea	ebx, [ebx+0]

loc_6F2910:
movzx	dx, byte ptr [ebp+edi*2+1]
movzx	ax, byte ptr [ebp+edi*2+0]
shl	dx, 8
or	dx, ax
movzx	eax, dx
mov	edx, eax
shr	edx, 7
and	dl, 0F8h
mov	[ecx-1], dl
mov	edx, eax
add	al, al
shr	edx, 2
add	al, al
and	dl, 0F8h
add	al, al
mov	byte ptr [ecx-2], 0FFh
mov	[ecx], dl
mov	[ecx+1], al
inc	edi
add	ecx, 4
cmp	edi, esi
jl	short loc_6F2910
mov	eax, [esp+28h+arg_4]

loc_6F2954:
add	ebp, [esp+28h+var_8]
inc	eax
cmp	eax, ebx
mov	[esp+28h+arg_4], eax
jl	short loc_6F28F4
jmp	loc_6F279F

loc_6F2966:
cmp	al, 5
jnz	loc_6F29F8
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_6F297B
lea	eax, [edi+28h]

loc_6F297B:
mov	edx, [ebp+0]
mov	edx, [edx+8]
mov	ecx, esi
imul	ecx, ebx
add	ecx, ecx
add	ecx, ecx
push	ecx
mov	ecx, [esp+2Ch+var_14]
mov	ecx, [ecx+1Ch]
push	ecx
push	eax
mov	ecx, ebp
call	edx
xor	ebp, ebp
test	ebx, ebx
jle	short loc_6F29E7
mov	edi, edi

loc_6F29A0:
mov	ecx, [esp+28h+var_14]
mov	eax, [ecx+18h]
imul	eax, ebp
add	eax, [ecx+1Ch]
test	esi, esi
jle	short loc_6F29E2
add	eax, 2
mov	edi, esi

loc_6F29B6:
movzx	ebx, byte ptr [eax]
mov	dl, [eax-1]
mov	cl, [eax-2]
mov	byte ptr [esp+28h+arg_4], bl
mov	bl, [eax+1]
mov	[eax-2], dl
movzx	edx, byte ptr [esp+28h+arg_4]
mov	[eax-1], dl
mov	[eax], bl
mov	[eax+1], cl
add	eax, 4
sub	edi, 1
jnz	short loc_6F29B6
mov	ebx, [esp+28h+var_8]

loc_6F29E2:
inc	ebp
cmp	ebp, ebx
jl	short loc_6F29A0

loc_6F29E7:
mov	eax, [esp+28h+var_14]
push	eax
call	sub_6F1E40
add	esp, 4

loc_6F29F4:
mov	edi, [esp+28h+arg_0]

loc_6F29F8:
mov	esi, [esp+28h+var_14]
push	esi
push	ecx
mov	ecx, [esp+30h+var_4]
mov	eax, esp
mov	[eax], ecx
mov	ecx, edi
call	sub_6FDAF0
test	esi, esi
jz	short loc_6F2A18
mov	ecx, esi
call	sub_64A400

loc_6F2A18:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_6F2380 endp

align 10h



sub_6F2A30 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
lea	eax, [ebx+14h]
push	offset aPlaceobject ; "	 PlaceObject\n"
push	eax
call	nullsub_2
mov	ebp, [ebx+324h]
add	esp, 8
test	ebp, ebp
jnz	short loc_6F2A56
lea	ebp, [ebx+28h]

loc_6F2A56:
push	ebp
mov	[esp+14h+arg_0], ebp
call	sub_68DC30
mov	ecx, [ebx+20h]
mov	edx, [ecx+0Ch]
mov	edi, eax
add	ecx, 8
lea	eax, [edi+0Ah]
and	eax, 0FFFFFFFCh
cmp	eax, edx
ja	short loc_6F2A89
mov	esi, [ecx]
lea	ebp, [esi+eax]
sub	edx, eax
mov	[ecx], ebp
mov	ebp, [esp+10h+arg_0]
mov	[ecx+4], edx
mov	eax, esi
jmp	short loc_6F2A8F

loc_6F2A89:
push	eax
call	sub_6AB110

loc_6F2A8F:
test	eax, eax
jz	short loc_6F2A9E
mov	ecx, eax
call	sub_68F770
mov	esi, eax
jmp	short loc_6F2AA0

loc_6F2A9E:
xor	esi, esi

loc_6F2AA0:
push	edi
lea	ecx, [esi+5]
push	ecx
mov	ecx, ebp
call	sub_6A9CB0
push	edi
mov	ecx, esi
call	sub_68DD40
push	esi
mov	ecx, ebx
call	sub_66B2B0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6F2A30 endp

align 10h



sub_6F2AD0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
push	edi
lea	eax, [ebx+14h]
push	offset aPlaceobject2 ; "  PlaceObject2\n"
push	eax
call	nullsub_2
mov	eax, [ebx+324h]
add	esp, 8
lea	ebp, [ebx+28h]
test	eax, eax
jz	short loc_6F2AF9
mov	ebp, eax

loc_6F2AF9:
mov	ecx, [ebx+20h]
mov	eax, [ecx+2Ch]
push	eax
push	ebp
call	sub_68DDB0
push	ebp
mov	edi, eax
call	sub_68DE10
mov	[esp+14h+var_1], al
test	al, al
jz	short loc_6F2B19
add	edi, 4

loc_6F2B19:
mov	eax, [ebx+20h]
cmp	dword ptr [eax+2Ch], 6
mov	edx, [eax+0Ch]
lea	ecx, [eax+8]
lea	eax, [edi+0Ah]
jb	short loc_6F2B58
and	eax, 0FFFFFFFCh
cmp	eax, edx
ja	short loc_6F2B44
mov	esi, [ecx]
lea	ebx, [esi+eax]
sub	edx, eax
mov	[ecx], ebx
mov	ebx, [esp+14h+arg_0]
mov	[ecx+4], edx
jmp	short loc_6F2B4C

loc_6F2B44:
push	eax
call	sub_6AB110
mov	esi, eax

loc_6F2B4C:
test	esi, esi
jz	short loc_6F2B85
mov	dword ptr [esi], offset	off_14376F4
jmp	short loc_6F2B87

loc_6F2B58:
and	eax, 0FFFFFFFCh
cmp	eax, edx
ja	short loc_6F2B71
mov	esi, [ecx]
lea	ebx, [esi+eax]
sub	edx, eax
mov	[ecx], ebx
mov	ebx, [esp+14h+arg_0]
mov	[ecx+4], edx
jmp	short loc_6F2B79

loc_6F2B71:
push	eax
call	sub_6AB110
mov	esi, eax

loc_6F2B79:
test	esi, esi
jz	short loc_6F2B85
mov	dword ptr [esi], offset	off_143DF24
jmp	short loc_6F2B87

loc_6F2B85:
xor	esi, esi

loc_6F2B87:
cmp	[esp+14h+var_1], 0
jz	short loc_6F2BB6
add	edi, 0FFFFFFFCh
push	edi
lea	edx, [esi+8]
push	edx
mov	ecx, ebp
call	sub_6A9CB0
lea	eax, [esi+4]
push	eax
call	sub_68DE60
push	esi
mov	ecx, ebx
call	sub_66B2B0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_6F2BB6:
push	edi
lea	ecx, [esi+4]
push	ecx
mov	ecx, ebp
call	sub_6A9CB0
push	esi
mov	ecx, ebx
call	sub_66B2B0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6F2AD0 endp

align 10h



sub_6F2BE0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
push	edi
lea	eax, [ebx+14h]
push	offset aPlaceobject3 ; "  PlaceObject3\n"
push	eax
call	nullsub_2
mov	eax, [ebx+324h]
add	esp, 8
lea	ebp, [ebx+28h]
test	eax, eax
jz	short loc_6F2C09
mov	ebp, eax

loc_6F2C09:
push	ebp
call	sub_68DC30
push	ebp
mov	edi, eax
call	sub_68DE10
mov	[esp+14h+var_1], al
test	al, al
jz	short loc_6F2C22
add	edi, 4

loc_6F2C22:
mov	ecx, [ebx+20h]
mov	edx, [ecx+0Ch]
add	ecx, 8
lea	eax, [edi+0Ah]
and	eax, 0FFFFFFFCh
cmp	eax, edx
ja	short loc_6F2C47
mov	esi, [ecx]
lea	ebx, [esi+eax]
sub	edx, eax
mov	[ecx], ebx
mov	ebx, [esp+14h+arg_0]
mov	[ecx+4], edx
jmp	short loc_6F2C4F

loc_6F2C47:
push	eax
call	sub_6AB110
mov	esi, eax

loc_6F2C4F:
test	esi, esi
jz	short loc_6F2C5B
mov	dword ptr [esi], offset	off_14376A8
jmp	short loc_6F2C5D

loc_6F2C5B:
xor	esi, esi

loc_6F2C5D:
cmp	[esp+14h+var_1], 0
jz	short loc_6F2C8C
add	edi, 0FFFFFFFCh
push	edi
lea	ecx, [esi+8]
push	ecx
mov	ecx, ebp
call	sub_6A9CB0
lea	edx, [esi+4]
push	edx
call	sub_68DE60
push	esi
mov	ecx, ebx
call	sub_66B2B0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_6F2C8C:
push	edi
lea	eax, [esi+4]
push	eax
mov	ecx, ebp
call	sub_6A9CB0
push	esi
mov	ecx, ebx
call	sub_66B2B0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_6F2BE0 endp

align 10h



sub_6F2CB0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi+20h]
mov	edx, [ecx+0Ch]
add	ecx, 8
cmp	edx, 8
jb	short loc_6F2CD3
mov	eax, [ecx]
lea	esi, [eax+8]
add	edx, 0FFFFFFF8h
mov	[ecx], esi
mov	[ecx+4], edx
jmp	short loc_6F2CDA

loc_6F2CD3:
push	8
call	sub_6AB110

loc_6F2CDA:
test	eax, eax
jz	short loc_6F2CE8
mov	dword ptr [eax], offset	off_143DEE4
mov	esi, eax
jmp	short loc_6F2CEA

loc_6F2CE8:
xor	esi, esi

loc_6F2CEA:
push	edi
mov	ecx, esi
call	sub_68DF20
movzx	eax, word ptr [esi+6]
movzx	ecx, word ptr [esi+4]
push	eax
push	ecx
lea	edx, [edi+14h]
push	offset aRemoveobjectDD ; "  RemoveObject(%d, %d)\n"
push	edx
call	nullsub_2
add	esp, 10h
push	esi
mov	ecx, edi
call	sub_66B2B0
pop	edi
pop	esi
retn	8
sub_6F2CB0 endp

align 10h



sub_6F2D20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi+20h]
mov	edx, [ecx+0Ch]
add	ecx, 8
cmp	edx, 8
jb	short loc_6F2D43
mov	eax, [ecx]
lea	esi, [eax+8]
add	edx, 0FFFFFFF8h
mov	[ecx], esi
mov	[ecx+4], edx
jmp	short loc_6F2D4A

loc_6F2D43:
push	8
call	sub_6AB110

loc_6F2D4A:
test	eax, eax
jz	short loc_6F2D58
mov	dword ptr [eax], offset	off_143DF04
mov	esi, eax
jmp	short loc_6F2D5A

loc_6F2D58:
xor	esi, esi

loc_6F2D5A:
push	edi
mov	ecx, esi
call	sub_68DFF0
movzx	eax, word ptr [esi+4]
push	eax
lea	ecx, [edi+14h]
push	offset aRemoveobject2D ; "  RemoveObject2(%d)\n"
push	ecx
call	nullsub_2
add	esp, 0Ch
push	esi
mov	ecx, edi
call	sub_66B2B0
pop	edi
pop	esi
retn	8
sub_6F2D20 endp

align 10h



sub_6F2D90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	esi
mov	esi, ecx
lea	ecx, [esp+10h+var_C]
call	sub_679E30
mov	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [esp+14h+var_C]
call	sub_67A2C0
mov	eax, [esi+4]
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
inc	eax
push	eax
mov	[esp+14h+var_8], ecx
push	esi
mov	ecx, esi
mov	[esp+18h+var_4], edx
call	sub_6F1BC0
mov	eax, [esi+4]
mov	edx, [esi]
lea	ecx, [eax+eax*2]
lea	esi, [edx+ecx*4-0Ch]
test	esi, esi
jz	short loc_6F2DF4
lea	eax, [esp+10h+var_C]
push	eax
mov	ecx, esi
call	sub_67AF90
mov	ecx, [esp+10h+var_8]
mov	[esi+4], ecx
mov	edx, [esp+10h+var_4]
mov	[esi+8], edx

loc_6F2DF4:
mov	esi, [esp+10h+var_C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F2E1A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F2E1A:
pop	esi
add	esp, 0Ch
retn	0Ch
sub_6F2D90 endp

align 10h



sub_6F2E30 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143E6E8
mov	dword ptr [esi+8], 30h
mov	dword ptr [esi+0Ch], 3
mov	eax, 400h
mov	[esi+10h], eax
mov	[esi+14h], eax
xor	eax, eax
push	edi
lea	edi, [esi+20h]
mov	[edi], eax
mov	[edi+4], eax
mov	[edi+8], eax
mov	[esi+2Ch], eax
mov	al, [esp+10h+arg_4]
push	ebp
mov	[esi+30h], al
mov	ebx, [edi+4]
push	edi
mov	ecx, edi
call	sub_6F1D10
cmp	ebp, ebx
jbe	short loc_6F2EA1
mov	edx, [edi]
lea	ecx, [ebx+ebx*4]
sub	ebp, ebx
lea	eax, [edx+ecx*8]
push	ebp
push	eax
call	sub_6F1C20
add	esp, 8

loc_6F2EA1:
pop	edi
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+1Ch], 1
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6F2E30 endp

align 10h



sub_6F2EC0 proc	near

var_80=	qword ptr -80h
var_78=	qword ptr -78h
var_70=	qword ptr -70h
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 50h
push	ebx
push	ebp
push	esi
mov	esi, [eax+324h]
xor	ebx, ebx
push	edi
cmp	esi, ebx
jnz	short loc_6F2EDA
lea	esi, [eax+28h]

loc_6F2EDA:
mov	ecx, [esi+30h]
mov	eax, [eax+20h]
sub	ecx, [esi+2Ch]
mov	eax, [eax+1Ch]
cmp	ecx, 4
mov	[esp+60h+var_30], eax
mov	[esi+15h], bl
jge	short loc_6F2EFB
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6F2EFB:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
lea	eax, [ecx+4]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 2
mov	[esp+60h+var_4C], edx
mov	[esi+2Ch], eax
mov	[esi+15h], bl
jge	short loc_6F2F43
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F2F43:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
lea	ecx, [esp+60h+var_50]
movzx	edi, dx
mov	[esi+2Ch], eax
call	sub_679E30
lea	edx, [esp+60h+var_50]
push	edx
mov	ecx, esi
call	sub_6AA580
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	[esi+15h], bl
cmp	eax, 2
jge	short loc_6F2F91
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F2F91:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	ecx, [esi+30h]
add	eax, 2
sub	ecx, eax
cmp	ecx, 2
mov	[esi+2Ch], eax
mov	[esp+60h+var_8], edx
mov	[esi+15h], bl
jge	short loc_6F2FD0
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F2FD0:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	ecx, [esi+30h]
add	eax, 2
sub	ecx, eax
cmp	ecx, 1
mov	[esi+2Ch], eax
mov	[esp+60h+var_4], edx
mov	[esi+15h], bl
jge	short loc_6F300D
mov	ecx, esi
call	sub_6A9C60

loc_6F300D:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
mov	edx, [esi+30h]
inc	eax
movzx	ecx, cl
sub	edx, eax
cmp	edx, 2
mov	[esi+2Ch], eax
mov	[esp+60h+var_C], ecx
mov	[esi+15h], bl
jge	short loc_6F3037
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F3037:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
mov	ebx, [esp+60h+var_4]
mov	ebp, [esp+60h+var_8]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
mov	[esi+2Ch], eax
mov	eax, [esp+60h+var_50]
shl	dx, 8
or	dx, cx
push	ebx
movzx	ecx, dx
and	eax, 0FFFFFFFCh
push	ebp
add	eax, 8
push	eax
movzx	edx, cx
mov	ecx, [esp+6Ch+var_4C]
movzx	eax, di
push	eax
mov	[esp+70h+var_10], edx
mov	edx, [esp+70h+arg_4]
mov	eax, [edx]
push	ecx
push	eax
push	offset aFonttextureinf ; "  FontTextureInfo: tagInfo.TagType = %d"...
push	esi
call	nullsub_2
mov	eax, [esp+80h+var_50]
mov	edx, [esp+80h+arg_0]
add	esp, 20h
push	1
push	ebx
push	ebp
push	edi
and	eax, 0FFFFFFFCh
push	offset byte_146D660
add	eax, 8
push	eax
push	ecx
mov	ecx, [esp+7Ch+var_4C]
mov	eax, esp
push	edx
lea	ebx, [esp+80h+var_24]
mov	[eax], ecx
call	sub_6F0B90
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
xor	ebp, ebp
add	esp, 20h
cmp	eax, 2
mov	[esp+60h+var_1C], ebp
mov	[esp+60h+var_18], ebp
mov	[esp+60h+var_14], ebp
mov	byte ptr [esi+15h], 0
jge	short loc_6F30EB
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F30EB:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
mov	edx, [esp+60h+var_10]
movzx	edi, cx
add	eax, 2
push	edi
push	edx
mov	[esi+2Ch], eax
mov	eax, [esp+68h+var_C]
push	eax
push	offset aPadpixelsDNomi ; "  PadPixels =	%d, nominal glyph size = "...
push	esi
mov	[esp+74h+var_2C], edi
call	nullsub_2
add	esp, 14h
mov	[esp+60h+arg_4], ebp
test	edi, edi
jbe	loc_6F3486
lea	esp, [esp+0]

loc_6F3140:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 4
jge	short loc_6F3158
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6F3158:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
lea	eax, [ecx+4]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 4
mov	[esp+60h+var_48], edx
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
jge	short loc_6F31A1
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6F31A1:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
lea	eax, [ecx+4]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 4
mov	[esp+60h+var_44], edx
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
jge	short loc_6F31EA
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6F31EA:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
lea	eax, [ecx+4]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 4
mov	[esp+60h+var_40], edx
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
jge	short loc_6F3233
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6F3233:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
lea	eax, [ecx+4]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 4
mov	[esp+60h+var_3C], edx
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
jge	short loc_6F327C
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6F327C:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
lea	eax, [ecx+4]
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 4
mov	[esp+60h+var_38], edx
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
jge	short loc_6F32C5
push	4
mov	ecx, esi
call	sub_6A9B70

loc_6F32C5:
mov	ecx, [esi+2Ch]
fld	[esp+60h+var_3C]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
sub	esp, 20h
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
fstp	qword ptr [esp+80h+var_68]
fld	[esp+80h+var_40]
fstp	[esp+80h+var_70]
movzx	eax, byte ptr [eax]
fld	[esp+80h+var_44]
fstp	[esp+80h+var_78]
fld	[esp+80h+var_48]
add	ecx, 4
fstp	[esp+80h+var_80]
shl	edx, 8
mov	[esi+2Ch], ecx
mov	ecx, [esp+80h+arg_4]
or	edx, edi
push	ecx
shl	edx, 8
or	edx, eax
push	offset aTexglyphDUvbnd ; "  TEXGLYPH[%d]: uvBnd.Left = %f, uvBnd."...
push	esi
mov	[esp+8Ch+var_34], edx
call	nullsub_2
add	esp, 1Ch
fld	[esp+70h+var_34]
fstp	qword ptr [esp+70h+var_68]
fld	[esp+70h+var_38]
fstp	[esp+70h+var_70]
push	offset aUvorigin_xFUvo ; "		  uvOrigin.x = %f, uvOrig"...
push	esi
call	nullsub_2
mov	ecx, [esp+78h+var_30]
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esp, 18h
xor	ebx, ebx
push	ebx
push	28h
call	eax
cmp	eax, ebx
jz	short loc_6F338B
fldz
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_143DF54
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
fst	dword ptr [eax+10h]
fst	dword ptr [eax+14h]
mov	edi, eax
fst	dword ptr [eax+18h]
fstp	dword ptr [eax+1Ch]
jmp	short loc_6F338D

loc_6F338B:
xor	edi, edi

loc_6F338D:
cmp	[esp+60h+var_24], ebx
jnz	short loc_6F33A0
mov	ecx, [esp+60h+var_20]
cmp	ecx, ebx
jz	short loc_6F33A0
call	sub_64A420

loc_6F33A0:
cmp	[edi+8], ebx
jnz	short loc_6F33B1
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_6F33B1
call	sub_666B00

loc_6F33B1:
mov	ecx, [esp+60h+var_24]
fld	[esp+60h+var_48]
mov	[edi+8], ecx
mov	edx, [esp+60h+var_20]
mov	[edi+0Ch], edx
fstp	dword ptr [edi+10h]
fld	[esp+60h+var_44]
lea	ebx, [ebp+1]
fstp	dword ptr [edi+14h]
fld	[esp+60h+var_40]
fstp	dword ptr [edi+18h]
fld	[esp+60h+var_3C]
fstp	dword ptr [edi+1Ch]
fld	[esp+60h+var_38]
fstp	dword ptr [edi+20h]
fld	[esp+60h+var_34]
fstp	dword ptr [edi+24h]
cmp	ebx, ebp
jnb	short loc_6F342D
mov	edx, [esp+60h+var_1C]
sub	ebp, ebx
mov	eax, ebp
lea	ecx, [eax+ebx]
lea	ebp, [edx+ecx*4-4]
jz	short loc_6F341B
mov	[esp+60h+var_34], eax

loc_6F3405:
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_6F3411
call	sub_64A400

loc_6F3411:
sub	ebp, 4
sub	[esp+60h+var_34], 1
jnz	short loc_6F3405

loc_6F341B:
mov	eax, [esp+60h+var_14]
shr	eax, 1
cmp	ebx, eax
jnb	short loc_6F3449
push	ebx
lea	ecx, [esp+64h+var_1C]
push	ecx
jmp	short loc_6F3440

loc_6F342D:
cmp	ebx, [esp+60h+var_14]
jb	short loc_6F3449
mov	edx, ebx
shr	edx, 2
add	edx, ebx
push	edx
lea	eax, [esp+64h+var_1C]
push	eax

loc_6F3440:
lea	ecx, [esp+68h+var_1C]
call	sub_714BE0

loc_6F3449:
mov	ecx, [esp+60h+var_1C]
mov	ebp, ebx
lea	ebx, [ecx+ebx*4-4]
mov	[esp+60h+var_18], ebp
test	ebx, ebx
jz	short loc_6F3468
test	edi, edi
jz	short loc_6F3466
inc	dword ptr [edi+4]
mov	ebp, [esp+60h+var_18]

loc_6F3466:
mov	[ebx], edi

loc_6F3468:
test	edi, edi
jz	short loc_6F3473
mov	ecx, edi
call	sub_64A400

loc_6F3473:
mov	eax, [esp+60h+arg_4]
inc	eax
mov	[esp+60h+arg_4], eax
cmp	eax, [esp+60h+var_2C]
jb	loc_6F3140

loc_6F3486:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F349E
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F349E:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edi, cx
push	edi
add	eax, 2
push	offset aNumfontsD ; "  NumFonts	= %d\n"
push	esi
mov	[esi+2Ch], eax
call	nullsub_2
add	esp, 0Ch
test	edi, edi
jbe	loc_6F36BF
mov	[esp+60h+var_34], edi

loc_6F34DE:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F34F6
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F34F6:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
mov	edx, [esp+60h+arg_0]
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, cx
push	ecx
mov	ecx, esp
mov	[ecx], eax
mov	ecx, [edx+20h]
mov	[esp+64h+var_28], eax
call	sub_6ACAC0
mov	edi, eax
test	edi, edi
jz	loc_6F36B0
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx
test	eax, eax
jz	short loc_6F354A
inc	dword ptr [eax+4]

loc_6F354A:
mov	ebx, eax
test	eax, eax
jnz	short loc_6F35A7
mov	ecx, [esp+60h+var_30]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	34h
call	edx
mov	ebx, eax
test	ebx, ebx
jz	short loc_6F3579
mov	eax, [edi]
mov	edx, [eax+38h]
push	1
mov	ecx, edi
call	edx
push	eax
mov	ecx, ebx
call	sub_6F2E30
jmp	short loc_6F357B

loc_6F3579:
xor	eax, eax

loc_6F357B:
mov	ebx, eax
test	eax, eax
jz	short loc_6F35BC
mov	ecx, [esp+60h+var_10]
mov	edx, [esp+60h+var_C]
mov	[eax+8], ecx
mov	ecx, [esp+60h+var_8]
mov	[eax+0Ch], edx
mov	edx, [esp+60h+var_4]
mov	[eax+10h], ecx
mov	[eax+14h], edx
mov	edx, [edi]
push	eax
mov	eax, [edx+8]
mov	ecx, edi
call	eax

loc_6F35A7:
mov	edx, [esp+60h+var_4C]
lea	ecx, [esp+60h+var_24]
push	ecx
push	ecx
mov	eax, esp
mov	ecx, ebx
mov	[eax], edx
call	sub_71AC10

loc_6F35BC:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F35D4
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F35D4:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	ecx, dx
mov	[esi+2Ch], eax
movzx	eax, cx
test	eax, eax
jbe	loc_6F36A5
mov	ebp, [esp+60h+var_1C]
mov	[esp+60h+arg_4], eax
lea	esp, [esp+0]

loc_6F3610:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F3628
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F3628:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
mov	edx, [esi+30h]
add	eax, 2
sub	edx, eax
cmp	edx, 2
mov	[esi+2Ch], eax
movzx	edi, cx
mov	byte ptr [esi+15h], 0
jge	short loc_6F3664
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F3664:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
movzx	ecx, dx
mov	[esi+2Ch], eax
test	ebx, ebx
jz	short loc_6F369A
movzx	edx, cx
mov	eax, [ebp+edx*4+0]
push	eax
push	edi
mov	ecx, ebx
call	sub_71A550

loc_6F369A:
sub	[esp+60h+arg_4], 1
jnz	loc_6F3610

loc_6F36A5:
test	ebx, ebx
jz	short loc_6F36B0
mov	ecx, ebx
call	sub_64A400

loc_6F36B0:
sub	[esp+60h+var_34], 1
jnz	loc_6F34DE
mov	ebp, [esp+60h+var_18]

loc_6F36BF:		; "\n"
push	offset asc_154D83C
push	esi
call	nullsub_2
mov	ebx, [esp+68h+var_1C]
add	esp, 8
lea	esi, [ebx+ebp*4-4]
test	ebp, ebp
jbe	short loc_6F36EE
mov	edi, ebp

loc_6F36DB:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6F36E6
call	sub_64A400

loc_6F36E6:
sub	esi, 4
sub	edi, 1
jnz	short loc_6F36DB

loc_6F36EE:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
cmp	[esp+60h+var_24], 0
jnz	short loc_6F3710
mov	ecx, [esp+60h+var_20]
test	ecx, ecx
jz	short loc_6F3710
call	sub_666B00

loc_6F3710:
mov	esi, [esp+60h+var_50]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F3736
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F3736:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 50h
retn	8
sub_6F2EC0 endp




sub_6F3740 proc	near
mov	ecx, [ecx+20h]
mov	eax, [ecx+0Ch]
add	ecx, 8
push	esi
push	edi
cmp	eax, 1Ch
jb	short loc_6F375F
mov	esi, [ecx]
lea	edx, [esi+1Ch]
add	eax, 0FFFFFFE4h
mov	[ecx], edx
mov	[ecx+4], eax
jmp	short loc_6F3768

loc_6F375F:
push	1Ch
call	sub_6AB110
mov	esi, eax

loc_6F3768:
xor	edi, edi
cmp	esi, edi
jz	short loc_6F378C
mov	[esi], edi
mov	[esi+4], edi
lea	ecx, [esi+0Ch]
mov	[esi+8], edi
call	sub_67AB70
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
pop	edi
mov	eax, esi
pop	esi
retn

loc_6F378C:
pop	edi
xor	eax, eax
pop	esi
retn
sub_6F3740 endp

align 10h



sub_6F37A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+2Ch]
call	sub_6F1D90
lea	ecx, [esi+20h]
call	sub_6EFF50
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6F37CF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F37CF:
mov	eax, esi
pop	esi
retn	4
sub_6F37A0 endp

align 10h



sub_6F37E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
mov	esi, [ebp+324h]
push	edi
test	esi, esi
jnz	short loc_6F37F8
lea	esi, [ebp+28h]

loc_6F37F8:
lea	ecx, [esp+1Ch+var_C]
call	sub_679E30
lea	eax, [esp+1Ch+var_C]
push	eax
mov	ecx, esi
call	sub_6AAD60
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_6F3825
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F3825:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	ebx, [esp+1Ch+arg_4]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
cmp	dword ptr [ebx], 47h
movzx	edi, cx
mov	ecx, offset aImportassetsSo ; "	 importAssets: SourceUrl = %s, count ="...
jnz	short loc_6F385D
mov	ecx, offset aImportassets2S ; "	 importAssets2:	SourceUrl = %s,	count "...

loc_6F385D:
mov	edx, [esp+1Ch+var_C]
and	edx, 0FFFFFFFCh
push	edi
add	edx, 8
push	edx
lea	eax, [ebp+14h]
push	ecx
push	eax
call	nullsub_2
add	esp, 10h
cmp	dword ptr [ebx], 47h
jnz	short loc_6F3882
mov	ecx, ebp
call	sub_667800

loc_6F3882:
mov	ecx, ebp
call	sub_6F3740
mov	ebx, eax
mov	eax, [ebp+20h]
mov	ecx, [eax+84h]
lea	edx, [esp+1Ch+var_C]
mov	[ebx+10h], ecx
push	edx
lea	ecx, [ebx+0Ch]
call	sub_67A3D0
test	edi, edi
jle	loc_6F398D
mov	[esp+1Ch+arg_4], edi

loc_6F38B0:
lea	ecx, [esp+1Ch+arg_0]
call	sub_679E30
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F38D1
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F38D1:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	edi, dx
lea	edx, [esp+1Ch+arg_0]
add	eax, 2
push	edx
mov	ecx, esi
mov	[esi+2Ch], eax
call	sub_6AAD60
mov	eax, [esp+1Ch+arg_0]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
movzx	edi, di
push	edi
lea	eax, [ebp+14h]
push	offset aImportIdDNameS ; "  import: id = %d, name = %s\n"
push	eax
call	nullsub_2
add	esp, 0Ch
mov	eax, esp
lea	edx, [esp+20h+var_8]
mov	[eax], edi
mov	ecx, [ebp+20h]
push	edx
call	sub_6B0B50
mov	eax, [esp+1Ch+var_4]
mov	ecx, [esp+1Ch+arg_0]
push	eax
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	edi
push	ecx
mov	ecx, ebx
call	sub_6F2D90
cmp	[esp+1Ch+var_8], 0
jnz	short loc_6F395C
mov	ecx, [esp+1Ch+var_4]
test	ecx, ecx
jz	short loc_6F395C
call	sub_666B00

loc_6F395C:
mov	edi, [esp+1Ch+arg_0]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F3982
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6F3982:
sub	[esp+1Ch+arg_4], 1
jnz	loc_6F38B0

loc_6F398D:		; Value
push	ebx
mov	ecx, ebp
call	sub_6FDA90
mov	ecx, [ebp+20h]
mov	edx, [ecx+0Ch]
add	ecx, 8
cmp	edx, 8
jb	short loc_6F39B2
mov	eax, [ecx]
lea	esi, [eax+8]
add	edx, 0FFFFFFF8h
mov	[ecx], esi
mov	[ecx+4], edx
jmp	short loc_6F39B9

loc_6F39B2:
push	8
call	sub_6AB110

loc_6F39B9:
xor	ecx, ecx
cmp	eax, ecx
jz	short loc_6F39CE
mov	dword ptr [eax], offset	off_143DEA4
mov	[eax+4], ecx
mov	[esp+1Ch+arg_0], eax
jmp	short loc_6F39D2

loc_6F39CE:
mov	[esp+1Ch+arg_0], ecx

loc_6F39D2:
mov	eax, [ebx+14h]
mov	ecx, [esp+1Ch+arg_0]
lea	edi, [ebp+318h]
mov	[ecx+4], eax
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_6F39F7
mov	edx, [edi+8]
shr	edx, 1
cmp	esi, edx
jnb	short loc_6F3A0C
push	esi
jmp	short loc_6F3A04

loc_6F39F7:
cmp	esi, [edi+8]
jb	short loc_6F3A0C
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax

loc_6F3A04:
push	edi
mov	ecx, edi
call	sub_669100

loc_6F3A0C:
mov	ecx, [edi]
mov	[edi+4], esi
lea	esi, [ecx+esi*4-4]
test	esi, esi
jz	short loc_6F3A1F
mov	edx, [esp+1Ch+arg_0]
mov	[esi], edx

loc_6F3A1F:
mov	esi, [esp+1Ch+var_C]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F3A45
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F3A45:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_6F37E0 endp

align 10h



sub_6F3A50 proc	near
test	eax, eax
jz	short loc_6F3AA5
test	al, 10h
jz	short loc_6F3A82
mov	ecx, eax
and	ecx, 3
cmp	cl, 3
jnz	short loc_6F3A68
mov	eax, off_167DF14
retn

loc_6F3A68:
test	al, 2
jz	short loc_6F3A72
mov	eax, off_167DF0C
retn

loc_6F3A72:
test	al, 1
jz	short loc_6F3A7C
mov	eax, off_167DF10
retn

loc_6F3A7C:
mov	eax, off_167DF08
retn

loc_6F3A82:
mov	edx, eax
and	edx, 3
cmp	dl, 3
jnz	short loc_6F3A92
mov	eax, off_167DF04
retn

loc_6F3A92:
test	al, 2
jz	short loc_6F3A9C
mov	eax, off_167DEFC
retn

loc_6F3A9C:
test	al, 1
mov	eax, off_167DF00
jnz	short locret_6F3AAA

loc_6F3AA5:
mov	eax, off_167DEF8

locret_6F3AAA:
retn
sub_6F3A50 endp

align 10h



sub_6F3AB0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax]
push	esi
mov	esi, ecx
mov	ecx, [esi]
cmp	ecx, eax
jnz	short loc_6F3AC5
mov	al, 1
pop	esi
retn	4

loc_6F3AC5:
mov	edx, [eax+1Ch]
mov	edx, [edx+0Ch]
mov	edx, [edx+14h]
or	edx, [eax+8]
push	edi
mov	edi, [ecx+1Ch]
mov	edi, [edi+0Ch]
mov	edi, [edi+14h]
or	edi, [ecx+8]
xor	edx, edi
test	edx, 313h
jnz	short loc_6F3B41
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFFCh
test	dword ptr [ecx], 7FFFFFFFh
jnz	short loc_6F3B07
mov	eax, [eax+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
mov	edi, eax
jmp	short loc_6F3B0A

loc_6F3B07:
lea	edi, [ecx+8]

loc_6F3B0A:
mov	ecx, [esi]
mov	eax, [ecx+0Ch]
and	eax, 0FFFFFFFCh
test	dword ptr [eax], 7FFFFFFFh
jnz	short loc_6F3B29
mov	ecx, [ecx+1Ch]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
jmp	short loc_6F3B2C

loc_6F3B29:
add	eax, 8

loc_6F3B2C:		; char *
push	edi
push	eax		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_6F3B41
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_6F3B41:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6F3AB0 endp

align 10h



sub_6F3B50 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx]
push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	edx, eax
and	edx, 300h
neg	edx
sbb	edx, edx
push	edi
and	edx, 300h
mov	edi, eax
and	edi, 10h
or	edx, edi
mov	edi, [ecx+1Ch]
mov	edi, [edi+0Ch]
mov	edi, [edi+14h]
or	edi, [ecx+8]
or	edx, 3
and	edx, edi
and	eax, 313h
cmp	edx, eax
jnz	short loc_6F3BC5
mov	eax, [ecx+0Ch]
and	eax, 0FFFFFFFCh
test	dword ptr [eax], 7FFFFFFFh
jnz	short loc_6F3BAB
mov	eax, [ecx+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
jmp	short loc_6F3BAE

loc_6F3BAB:
add	eax, 8

loc_6F3BAE:
mov	ecx, [esi]
push	ecx		; char *
push	eax		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_6F3BC5
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_6F3BC5:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6F3B50 endp

align 10h



sub_6F3BD0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, [edi+0Ch]
and	eax, 0FFFFFFFCh
test	dword ptr [eax], 7FFFFFFFh
jnz	short loc_6F3BF4
mov	eax, [edi+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
jmp	short loc_6F3BF7

loc_6F3BF4:
add	eax, 8

loc_6F3BF7:
mov	ecx, [edi+1Ch]
mov	edx, [ecx+0Ch]
mov	edi, [edi+8]
mov	esi, [edx+14h]
or	edi, esi
mov	ecx, eax
and	edi, 3
lea	ebx, [ecx+1]
lea	ecx, [ecx+0]

loc_6F3C10:
mov	dl, [ecx]
inc	ecx
test	dl, dl
jnz	short loc_6F3C10
push	1505h
sub	ecx, ebx
push	ecx
push	eax
call	sub_679B00
or	esi, edi
and	esi, 3
pop	edi
xor	eax, esi
pop	esi
pop	ebx
retn	4
sub_6F3BD0 endp

align 10h



sub_6F3C40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, 13h
jnz	short loc_6F3C5F
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6F3C58
call	sub_64A420

loc_6F3C58:
mov	eax, [esi+4]
pop	esi
retn	4

loc_6F3C5F:
cmp	eax, 15h
jnz	short loc_6F3C77
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6F3C70
call	sub_64A420

loc_6F3C70:
mov	eax, [esi+8]
pop	esi
retn	4

loc_6F3C77:
cmp	eax, 14h
jnz	short loc_6F3C8F
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6F3C88
call	sub_64A420

loc_6F3C88:
mov	eax, [esi+0Ch]
pop	esi
retn	4

loc_6F3C8F:
cmp	eax, 3
jnz	short loc_6F3CA7
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6F3CA0
call	sub_64A420

loc_6F3CA0:
mov	eax, [esi+10h]
pop	esi
retn	4

loc_6F3CA7:
mov	ecx, [esi+14h]
mov	edx, [ecx]
mov	[esp+4+arg_0], eax
mov	eax, [edx+0Ch]
pop	esi
jmp	eax
sub_6F3C40 endp

align 10h



sub_6F3CC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
xor	bl, bl
cmp	[esi+0Ch], edi
jz	short loc_6F3CEA
test	edi, edi
jz	short loc_6F3CDB
mov	ecx, edi
call	sub_64A420

loc_6F3CDB:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6F3CE7
call	sub_64A430

loc_6F3CE7:
mov	[esi+0Ch], edi

loc_6F3CEA:
mov	edi, [esp+0Ch+arg_4]
cmp	[esi+10h], edi
jz	short loc_6F3D0F
mov	bl, 1
test	edi, edi
jz	short loc_6F3D00
mov	ecx, edi
call	sub_64A420

loc_6F3D00:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6F3D0C
call	sub_64A430

loc_6F3D0C:
mov	[esi+10h], edi

loc_6F3D0F:
mov	edi, [esp+0Ch+arg_8]
cmp	[esi+14h], edi
jz	short loc_6F3D35
or	bl, 2
test	edi, edi
jz	short loc_6F3D26
mov	ecx, edi
call	sub_64A420

loc_6F3D26:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6F3D32
call	sub_64A430

loc_6F3D32:
mov	[esi+14h], edi

loc_6F3D35:
mov	edi, [esp+0Ch+arg_C]
cmp	[esi+18h], edi
jz	short loc_6F3D5B
or	bl, 3
test	edi, edi
jz	short loc_6F3D4C
mov	ecx, edi
call	sub_64A420

loc_6F3D4C:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6F3D58
call	sub_64A430

loc_6F3D58:
mov	[esi+18h], edi

loc_6F3D5B:
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	10h
sub_6F3CC0 endp

align 10h



sub_6F3D70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
test	edi, edi
jz	loc_6F3DF9
push	esi
push	offset asc_143E910 ; "	 "
lea	ecx, [esp+0Ch+var_4]
call	sub_67AE10
xor	esi, esi
cmp	[edi], esi
jle	short loc_6F3DB3
push	ebx
lea	ebx, [edi+4]

loc_6F3D92:
mov	eax, [esp+0Ch+var_4]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
push	ecx
add	eax, 8
push	eax
mov	ecx, ebx
call	sub_679D10
inc	esi
cmp	esi, [edi]
jl	short loc_6F3D92
pop	ebx

loc_6F3DB3:
mov	edx, [esp+8+arg_0]
push	0FFFFFFFFh
lea	esi, [edi+4]
push	edx
mov	ecx, esi
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D83C ; "\n"
mov	ecx, esi
call	sub_679D10
mov	esi, [esp+8+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F3DF8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F3DF8:
pop	esi

loc_6F3DF9:
pop	ecx
retn
sub_6F3D70 endp

align 10h



sub_6F3E00 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	edi
mov	edi, eax
test	edi, edi
jz	short loc_6F3E68
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+20h+var_18]
call	sub_679B40
mov	ecx, [esp+1Ch+arg_0]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	edx, [esp+1Ch+arg_4]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_8]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+var_18]
test	eax, eax
jnz	short loc_6F3E56
mov	eax, offset byte_146D660

loc_6F3E56:
push	eax
call	sub_6F3D70
add	esp, 4
lea	ecx, [esp+1Ch+var_18]
call	sub_679B60

loc_6F3E68:
pop	edi
add	esp, 18h
retn
sub_6F3E00 endp

align 10h



sub_6F3E70 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
push	edi
mov	edi, eax
test	edi, edi
jz	loc_6F3F01
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+20h+var_18]
call	sub_679B40
mov	ecx, [esp+1Ch+arg_0]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	edx, [esp+1Ch+arg_4]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_8]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_C]
push	0FFFFFFFFh
call	sub_6F3A50
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	ecx, [esp+1Ch+arg_10]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+var_18]
test	eax, eax
jnz	short loc_6F3EEF
mov	eax, offset byte_146D660

loc_6F3EEF:
push	eax
call	sub_6F3D70
add	esp, 4
lea	ecx, [esp+1Ch+var_18]
call	sub_679B60

loc_6F3F01:
pop	edi
add	esp, 18h
retn
sub_6F3E70 endp

align 10h



sub_6F3F10 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 18h
push	edi
mov	edi, eax
test	edi, edi
jz	loc_6F3FD6
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+20h+var_18]
call	sub_679B40
mov	ecx, [esp+1Ch+arg_0]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	edx, [esp+1Ch+arg_4]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_8]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_C]
push	0FFFFFFFFh
call	sub_6F3A50
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	ecx, [esp+1Ch+arg_10]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	edx, [esp+1Ch+arg_14]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_18]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_1C]
push	0FFFFFFFFh
call	sub_6F3A50
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+var_18]
test	eax, eax
jnz	short loc_6F3FC4
mov	eax, offset byte_146D660

loc_6F3FC4:
push	eax
call	sub_6F3D70
add	esp, 4
lea	ecx, [esp+1Ch+var_18]
call	sub_679B60

loc_6F3FD6:
pop	edi
add	esp, 18h
retn
sub_6F3F10 endp

align 10h



sub_6F3FE0 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 18h
push	edi
mov	edi, eax
test	edi, edi
jz	loc_6F4081
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+20h+var_18]
call	sub_679B40
mov	ecx, [esp+1Ch+arg_0]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	edx, [esp+1Ch+arg_4]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_8]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	ecx, [esp+1Ch+arg_C]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	edx, [esp+1Ch+arg_10]
push	0FFFFFFFFh
push	edx
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+arg_14]
push	0FFFFFFFFh
call	sub_6F3A50
push	eax
lea	ecx, [esp+24h+var_18]
call	sub_679D10
mov	eax, [esp+1Ch+var_18]
test	eax, eax
jnz	short loc_6F406F
mov	eax, offset byte_146D660

loc_6F406F:
push	eax
call	sub_6F3D70
add	esp, 4
lea	ecx, [esp+1Ch+var_18]
call	sub_679B60

loc_6F4081:
pop	edi
add	esp, 18h
retn
sub_6F3FE0 endp

align 10h



sub_6F4090 proc	near
mov	eax, [ecx+18h]
inc	dword ptr [eax]
mov	eax, [ecx+18h]
retn
sub_6F4090 endp

align 10h



sub_6F40A0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
push	esi
mov	esi, [esp+4+arg_0]
push	edi
test	eax, eax
jz	short loc_6F40BB
cmp	dword ptr [eax], 0
jz	short loc_6F40BB
mov	edx, [eax]
mov	edi, [ecx+4]
cmp	edi, [edx+4]
jle	short loc_6F40D7

loc_6F40BB:
mov	edx, [esi]
test	edx, edx
jz	short loc_6F40D0
cmp	dword ptr [edx], 0
jz	short loc_6F40D0
mov	edx, [edx]
mov	edi, [esi+4]
cmp	edi, [edx+4]
jle	short loc_6F40D7

loc_6F40D0:
pop	edi
mov	al, 1
pop	esi
retn	4

loc_6F40D7:
cmp	eax, [esi]
jnz	short loc_6F40ED
mov	eax, [ecx+4]
cmp	eax, [esi+4]
jnz	short loc_6F40ED
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_6F40ED:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6F40A0 endp

align 10h



sub_6F4100 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_6F4142
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_6F4111:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_6F4124
mov	dword ptr [eax], 0FFFFFFFEh

loc_6F4124:
add	ecx, 0Ch
sub	edx, 1
jnz	short loc_6F4111
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_6F4142:
pop	esi
retn
sub_6F4100 endp

align 10h



sub_6F4150 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx], 0
jz	loc_6F4235
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax]
push	esi
push	edi
push	ecx
lea	ecx, [esp+18h+arg_0]
call	sub_6F3BD0
mov	ecx, [ebx]
mov	esi, [ecx+4]
and	esi, eax
lea	edx, [esi+esi*2]
cmp	dword ptr [ecx+edx*4+8], 0FFFFFFFEh
lea	edi, [ecx+edx*4+8]
jz	loc_6F4233
cmp	[edi+4], esi
jnz	loc_6F4233
push	ebp
mov	[esp+18h+var_8], esi
or	ebp, 0FFFFFFFFh
jmp	short loc_6F41A0
align 10h

loc_6F41A0:
mov	eax, [esp+18h+var_8]
cmp	[edi+4], eax
jnz	short loc_6F41C4
mov	ecx, [esp+18h+arg_0]
mov	edx, [ecx]
lea	eax, [esp+18h+var_4]
push	eax
lea	ecx, [edi+8]
mov	[esp+1Ch+var_4], edx
call	sub_6F3AB0
test	al, al
jnz	short loc_6F41D8

loc_6F41C4:
mov	ebp, esi
mov	esi, [edi]
cmp	esi, 0FFFFFFFFh
jz	short loc_6F4232
mov	edx, [ebx]
lea	ecx, [esi+esi*2]
lea	edi, [edx+ecx*4+8]
jmp	short loc_6F41A0

loc_6F41D8:
cmp	[esp+18h+var_8], esi
jnz	short loc_6F421C
mov	eax, [edi]
cmp	eax, 0FFFFFFFFh
jz	short loc_6F4228
mov	ecx, [ebx]
mov	dword ptr [edi], 0FFFFFFFEh
lea	eax, [eax+eax*2]
mov	edx, [ecx+eax*4+8]
lea	eax, [ecx+eax*4+8]
mov	[edi], edx
mov	ecx, [eax+4]
mov	[edi+4], ecx
mov	edx, [eax+8]
mov	[edi+8], edx
mov	edi, eax
pop	ebp
mov	dword ptr [edi], 0FFFFFFFEh
mov	eax, [ebx]
dec	dword ptr [eax]
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	4

loc_6F421C:
mov	ecx, [ebx]
mov	edx, [edi]
lea	eax, [ebp+ebp*2+0]
mov	[ecx+eax*4+8], edx

loc_6F4228:
mov	dword ptr [edi], 0FFFFFFFEh
mov	eax, [ebx]
dec	dword ptr [eax]

loc_6F4232:
pop	ebp

loc_6F4233:
pop	edi
pop	esi

loc_6F4235:
pop	ebx
add	esp, 8
retn	4
sub_6F4150 endp

align 10h



sub_6F4240 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+0]
push	esi
lea	eax, [ebx+ebx*2]
cmp	dword ptr [ecx+eax*4+8], 0FFFFFFFEh
lea	esi, [ecx+eax*4+8]
push	edi
mov	edi, ebx
jz	short loc_6F4294
cmp	[esi+4], ebx
jnz	short loc_6F4294

loc_6F4262:
cmp	[esi+4], ebx
jnz	short loc_6F4278
mov	edx, [esp+10h+arg_0]
push	edx
lea	ecx, [esi+8]
call	sub_6F3B50
test	al, al
jnz	short loc_6F428B

loc_6F4278:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_6F4294
mov	ecx, [ebp+0]
lea	eax, [edi+edi*2]
lea	esi, [ecx+eax*4+8]
jmp	short loc_6F4262

loc_6F428B:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_6F4294:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_6F4240 endp

align 10h



sub_6F42A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], 1
mov	eax, [edi+4]
mov	[esi+4], eax
mov	ecx, [edi+8]
lea	edx, [edi+0Ch]
mov	[esi+8], ecx
push	edx
lea	ecx, [esi+0Ch]
call	sub_67ABE0
fld	dword ptr [edi+10h]
fstp	dword ptr [esi+10h]
fld	dword ptr [edi+14h]
fstp	dword ptr [esi+14h]
fld	dword ptr [edi+18h]
fstp	dword ptr [esi+18h]
mov	ecx, [edi+1Ch]
test	ecx, ecx
jz	short loc_6F42E4
call	sub_64A420

loc_6F42E4:
mov	eax, [edi+1Ch]
mov	[esi+1Ch], eax
mov	ecx, [edi+20h]
test	ecx, ecx
jz	short loc_6F42F6
call	sub_64A420

loc_6F42F6:
mov	ecx, [edi+20h]
pop	edi
mov	[esi+20h], ecx
mov	eax, esi
pop	esi
retn	4
sub_6F42A0 endp

align 10h



sub_6F4310 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx], 0
jnz	short loc_6F431F
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_6F431F:
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	ebp, [edi]
mov	eax, ebp
lea	edx, [eax+1]
lea	ecx, [ecx+0]

loc_6F4330:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6F4330
mov	esi, [edi+4]
push	1505h
sub	eax, edx
push	eax
push	ebp
call	sub_679B00
and	esi, 3
xor	esi, eax
mov	eax, [ebx]
and	esi, [eax+4]
mov	ecx, ebx
push	esi
push	edi
call	sub_6F4240
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6F4310 endp

align 10h



sub_6F4370 proc	near

var_10=	dword ptr -10h
var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebp
push	edi
xor	ebp, ebp
mov	edi, ecx
mov	[esp+18h+var_4], edi
cmp	eax, ebp
jnz	short loc_6F4392
call	sub_6F4100
pop	edi
pop	ebp
add	esp, 10h
retn	8

loc_6F4392:
push	esi
cmp	eax, 8
jnb	short loc_6F439F
mov	esi, 8
jmp	short loc_6F4404

loc_6F439F:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_6F43B2
fadd	ds:flt_15FCC08

loc_6F43B2:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_C], eax
fldcw	word ptr [esp+1Ch+var_C]
fistp	[esp+1Ch+var_C]
mov	cl, byte ptr [esp+1Ch+var_C]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_6F4404:
mov	ecx, dword_1855FC0
lea	edx, [esp+1Ch+var_C]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+24h+arg_0]
mov	[esp+24h+arg_4], ebp
mov	dword ptr [esp+24h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebp
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebp
jbe	short loc_6F4464
xor	eax, eax
jmp	short loc_6F4450
align 10h

loc_6F4450:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_6F4450

loc_6F4464:
mov	eax, [edi]
cmp	eax, ebp
jz	loc_6F4527
mov	eax, [eax+4]
inc	eax
mov	[esp+1Ch+var_10], ebp
mov	dword ptr [esp+1Ch+var_C], eax
push	ebx
jmp	short loc_6F4480
align 10h

loc_6F4480:
mov	edx, [edi]
cmp	dword ptr [edx+ebp+8], 0FFFFFFFEh
lea	ebp, [edx+ebp+8]
jz	short loc_6F4500
mov	edi, [ebp+8]
mov	eax, [edi+0Ch]
and	eax, 0FFFFFFFCh
test	dword ptr [eax], 7FFFFFFFh
jnz	short loc_6F44AD
mov	eax, [edi+1Ch]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
jmp	short loc_6F44B0

loc_6F44AD:
add	eax, 8

loc_6F44B0:
mov	ecx, [edi+1Ch]
mov	edx, [ecx+0Ch]
mov	esi, [edx+14h]
mov	edi, [edi+8]
or	edi, esi
mov	ecx, eax
and	edi, 3
lea	edx, [ecx+1]

loc_6F44C6:
mov	bl, [ecx]
inc	ecx
test	bl, bl
jnz	short loc_6F44C6
push	1505h
sub	ecx, edx
push	ecx
push	eax
call	sub_679B00
or	esi, edi
and	esi, 3
xor	esi, eax
push	esi
lea	eax, [ebp+8]
push	eax
mov	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+arg_4]
call	sub_6F4710
mov	edi, [esp+20h+var_4]
mov	dword ptr [ebp+0], 0FFFFFFFEh

loc_6F4500:
mov	ebp, [esp+20h+var_10]
add	ebp, 0Ch
sub	dword ptr [esp+20h+var_C], 1
mov	[esp+20h+var_10], ebp
jnz	loc_6F4480
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_6F4527:
mov	eax, [esp+1Ch+arg_4]
pop	esi
mov	[edi], eax
pop	edi
pop	ebp
add	esp, 10h
retn	8
sub_6F4370 endp

align 10h



sub_6F4540 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, [ecx+18h]
jz	short locret_6F4556
lea	edx, [esp+arg_0]
push	edx
add	ecx, 8
call	sub_6F4150

locret_6F4556:
retn	4
sub_6F4540 endp

align 10h



sub_6F4560 proc	near
push	ebp
push	esi
push	edi
lea	edi, [ecx+8]
mov	ecx, [edi]
test	ecx, ecx
jnz	short loc_6F4572
xor	esi, esi
xor	eax, eax
jmp	short loc_6F4590

loc_6F4572:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8
lea	ebx, [ebx+0]

loc_6F4580:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_6F458D
inc	eax
add	ecx, 0Ch
cmp	eax, edx
jbe	short loc_6F4580

loc_6F458D:
mov	esi, edi
nop

loc_6F4590:
test	esi, esi
jz	short loc_6F45D1
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6F45D1
cmp	eax, [ecx+4]
jg	short loc_6F45D1
lea	edx, [eax+eax*2]
mov	ecx, [ecx+edx*4+10h]
mov	dword ptr [ecx+4], 0
mov	edx, [esi]
mov	ecx, [edx+4]
cmp	eax, ecx
jg	short loc_6F4590
inc	eax
cmp	eax, ecx
ja	short loc_6F4590
lea	ebp, [eax+eax*2]
lea	edx, [edx+ebp*4+8]

loc_6F45C2:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_6F4590
inc	eax
add	edx, 0Ch
cmp	eax, ecx
jbe	short loc_6F45C2
jmp	short loc_6F4590

loc_6F45D1:
mov	eax, [edi]
test	eax, eax
jz	short loc_6F4611
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]
nop

loc_6F45E0:
mov	eax, [edi]
cmp	dword ptr [eax+ecx+8], 0FFFFFFFEh
lea	eax, [eax+ecx+8]
jz	short loc_6F45F3
mov	dword ptr [eax], 0FFFFFFFEh

loc_6F45F3:
add	ecx, 0Ch
sub	edx, 1
jnz	short loc_6F45E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [edi], 0

loc_6F4611:
pop	edi
pop	esi
pop	ebp
retn
sub_6F4560 endp

align 10h



sub_6F4620 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
test	edx, edx
jnz	short loc_6F4638
mov	edx, [esp+arg_0]
xor	ecx, ecx
xor	eax, eax
mov	[edx+4], eax
mov	[edx], ecx
mov	eax, edx
retn	4

loc_6F4638:
push	esi
mov	esi, [edx+4]
xor	eax, eax
add	edx, 8

loc_6F4641:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_6F464E
inc	eax
add	edx, 0Ch
cmp	eax, esi
jbe	short loc_6F4641

loc_6F464E:
mov	edx, [esp+4+arg_0]
mov	[edx+4], eax
pop	esi
mov	[edx], ecx
mov	eax, edx
retn	4
sub_6F4620 endp

align 10h



sub_6F4660 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_6F4709
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [edi+0F4h]
lea	esp, [esp+0]

loc_6F4680:
cmp	dword ptr [esi+208h], 14h
jb	short loc_6F46C4
mov	eax, [esi+204h]
lea	edx, [eax+13h]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_6F46BA
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_6F46DD

loc_6F46BA:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_6F46DD

loc_6F46C4:
mov	ecx, [esi]
push	0
push	4
push	14h
test	ecx, ecx
jnz	short loc_6F46D6
mov	ecx, dword_1855FC0

loc_6F46D6:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_6F46DD:
test	eax, eax
jz	short loc_6F46EC
push	ebp
push	edi
mov	ecx, eax
call	sub_6A2860
jmp	short loc_6F46EE

loc_6F46EC:
xor	eax, eax

loc_6F46EE:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_6F4680
pop	esi
pop	ebp

loc_6F4709:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_6F4660 endp




sub_6F4710 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6F4723
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6F4745

loc_6F4723:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6F474A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6F4745:
call	sub_6F4370

loc_6F474A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ebp, [esi+edx*4+8]
lea	ecx, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_6F477E
mov	edx, [esp+8+arg_4]
mov	dword ptr [ecx], 0FFFFFFFFh
mov	edx, [edx]
pop	esi
mov	[ecx+8], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_6F477E:
push	edi
mov	edi, [esi+4]
mov	edx, eax
push	ebx

loc_6F4785:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_6F4785
lea	edi, [edx+edx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [ecx+4]
cmp	edi, eax
jnz	short loc_6F47C7
test	ebx, ebx
jz	short loc_6F47B2
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_6F47B2:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebx
pop	edi
mov	[ecx+8], esi
pop	esi
mov	[ecx], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_6F47C7:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_6F47E3

loc_6F47D4:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_6F47D4

loc_6F47E3:
test	ebx, ebx
jz	short loc_6F47F5
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_6F47F5:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[ecx+8], edx
mov	dword ptr [ecx], 0FFFFFFFFh
mov	[ecx+4], eax
pop	ebp
retn	0Ch
sub_6F4710 endp




; int __cdecl sub_6F4810(int, char *, int, int)
sub_6F4810 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	ebx
mov	ebx, [esp+308h+arg_C]
push	esi
mov	esi, [esp+30Ch+arg_4]
push	edi
mov	edi, [esp+310h+arg_8]
push	eax
lea	ecx, [esp+314h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+314h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+314h+var_304]
call	sub_66A070
push	ebx
lea	ecx, [esp+314h+var_304]
call	sub_66A070
lea	ecx, [esp+310h+var_304]
call	sub_6A4090
mov	esi, [esp+310h+var_2F8]
lea	ecx, [esp+310h+var_304]
call	sub_6A4940
mov	ecx, [esp+310h+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_6F4810 endp

align 10h



; int __cdecl sub_6F48A0(int, char *, int, int,	int)
sub_6F48A0 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	ebx
mov	ebx, [esp+308h+arg_C]
push	ebp
mov	ebp, [esp+30Ch+arg_10]
push	esi
mov	esi, [esp+310h+arg_4]
push	edi
mov	edi, [esp+314h+arg_8]
push	eax
lea	ecx, [esp+318h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+318h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+318h+var_304]
call	sub_66A070
push	ebx
lea	ecx, [esp+318h+var_304]
call	sub_66A070
push	ebp
lea	ecx, [esp+318h+var_304]
call	sub_6F4660
lea	ecx, [esp+314h+var_304]
call	sub_6A4090
mov	esi, [esp+314h+var_2F8]
lea	ecx, [esp+314h+var_304]
call	sub_6A4940
mov	ecx, [esp+314h+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_6F48A0 endp

align 10h



sub_6F4940 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6F4953
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6F4975

loc_6F4953:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6F497A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6F4975:
call	sub_6F4370

loc_6F497A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ebp, [esi+edx*4+8]
lea	ecx, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_6F49AE
mov	edx, [esp+8+arg_4]
mov	edx, [edx]
mov	dword ptr [ecx], 0FFFFFFFFh
pop	esi
mov	[ecx+8], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_6F49AE:
push	edi
mov	edi, [esi+4]
mov	edx, eax
push	ebx

loc_6F49B5:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_6F49B5
lea	edi, [edx+edx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [ecx+4]
cmp	edi, eax
jnz	short loc_6F49F7
test	ebx, ebx
jz	short loc_6F49E2
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_6F49E2:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebx
pop	edi
mov	[ecx+8], esi
pop	esi
mov	[ecx], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_6F49F7:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_6F4A13

loc_6F4A04:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_6F4A04

loc_6F4A13:
test	ebx, ebx
jz	short loc_6F4A25
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_6F4A25:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[ecx+8], edx
mov	dword ptr [ecx], 0FFFFFFFFh
mov	[ecx+4], eax
pop	ebp
retn	0Ch
sub_6F4940 endp



; Attributes: bp-based frame

sub_6F4A40 proc	near

var_434= dword ptr -434h
var_430= dword ptr -430h
var_42C= dword ptr -42Ch
var_428= dword ptr -428h
var_424= dword ptr -424h
var_420= dword ptr -420h
var_41C= dword ptr -41Ch
var_418= dword ptr -418h
var_414= dword ptr -414h
var_410= dword ptr -410h
var_40C= byte ptr -40Ch
var_408= byte ptr -408h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 434h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+434h+var_4], eax
mov	eax, [ebp+arg_0]
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, edx
mov	[esp+440h+var_424], eax
mov	[esp+440h+var_428], ebx
test	edi, edi
jz	loc_6F4E53
mov	eax, [ebx]
cmp	eax, 1
jnz	short loc_6F4ADA
mov	eax, [ebp+arg_4]
call	sub_6F3A50
lea	edx, [esp+440h+var_428]
mov	[esp+440h+var_428], eax
push	edx		; int
lea	eax, [esp+444h+var_424]
push	eax		; int
mov	[esp+448h+var_434], 2
mov	[esp+448h+var_42C], 400h
push	offset aMovieResource0 ; "Movie	resource: \"{0}\" {1} found."

loc_6F4AA6:
lea	ecx, [esp+44Ch+var_408]
mov	[esp+44Ch+var_430], ecx
lea	ecx, [esp+44Ch+var_434]
push	ecx		; int
call	sub_6F4810
lea	edx, [esp+450h+var_408]
push	edx

loc_6F4ABD:
call	sub_6F3D70
add	esp, 14h
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+434h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_6F4ADA:
cmp	eax, 3
jnz	short loc_6F4B3E
mov	eax, [ebp+arg_4]
call	sub_6F3A50
lea	ecx, [esp+440h+var_428]
push	ecx		; int
lea	edx, [esp+444h+var_424]
push	edx		; int
push	offset aMovieResourc_0 ; "Movie	resource: \"{0}\" {1} found, requir"...

loc_6F4AF6:
mov	[esp+44Ch+var_428], eax
lea	eax, [esp+44Ch+var_408]
mov	[esp+44Ch+var_430], eax
lea	eax, [esp+44Ch+var_434]
push	eax		; int
mov	[esp+450h+var_42C], 400h
mov	[esp+450h+var_434], 2
call	sub_6F4810
lea	ecx, [esp+450h+var_408]
push	ecx
call	sub_6F3D70
add	esp, 14h
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+434h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_6F4B3E:
cmp	eax, 2
jnz	short loc_6F4BA2
mov	eax, [ebp+arg_4]
call	sub_6F3A50
mov	[esp+440h+var_428], eax
lea	eax, [esp+440h+var_428]
push	eax		; int
lea	ecx, [esp+444h+var_424]
lea	edx, [esp+444h+var_408]
push	ecx		; int
mov	[esp+448h+var_430], edx
lea	edx, [esp+448h+var_434]
push	offset aMovieResourc_1 ; "Movie	resource: \"{0}\" {1} ref found, re"...
push	edx		; int
mov	[esp+450h+var_434], 2
mov	[esp+450h+var_42C], 400h
call	sub_6F4810
lea	eax, [esp+450h+var_408]
push	eax
call	sub_6F3D70
add	esp, 14h
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+434h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_6F4BA2:
mov	esi, [ebp+arg_4]
mov	eax, esi
call	sub_6F3A50
lea	edx, [esp+440h+var_420]
push	edx		; int
mov	[esp+444h+var_420], eax
lea	eax, [esp+444h+var_424]
lea	ecx, [esp+444h+var_408]
push	eax		; int
mov	[esp+448h+var_430], ecx
lea	ecx, [esp+448h+var_434]
push	offset aMovieResourc_2 ; "Movie	resource: \"{0}\" {1} not found."
push	ecx		; int
mov	[esp+450h+var_434], 2
mov	[esp+450h+var_42C], 400h
call	sub_6F4810
lea	edx, [esp+450h+var_408]
push	edx
call	sub_6F3D70
mov	eax, [ebx]
add	esp, 14h
cmp	eax, 4
jz	loc_6F4E06
cmp	eax, 5
jnz	short loc_6F4C23
cmp	[ebp+arg_8], 0
jz	loc_6F4E06
mov	eax, esi
call	sub_6F3A50
lea	ecx, [esp+440h+var_428]
push	ecx
lea	edx, [esp+444h+var_424]
push	edx
push	offset aImports01Impor ; "Imports	: \"{0}\" {1} import delega"...
jmp	loc_6F4AF6

loc_6F4C23:
mov	eax, esi
call	sub_6F3A50
mov	[esp+440h+var_420], eax
lea	eax, [esp+440h+var_420]
push	eax		; int
lea	ecx, [esp+444h+var_424]
lea	edx, [esp+444h+var_408]
push	ecx		; int
mov	[esp+448h+var_430], edx
lea	edx, [esp+448h+var_434]
push	offset aImports01NotFo ; "Imports	: \"{0}\" {1} not found."
push	edx		; int
mov	[esp+450h+var_434], 2
mov	[esp+450h+var_42C], 400h
call	sub_6F4810
lea	eax, [esp+450h+var_408]
push	eax
call	sub_6F3D70
lea	eax, [ebx+4]
mov	[esp+454h+var_418], eax
mov	eax, [eax]
add	esp, 14h
test	eax, eax
jz	loc_6F4DA7
cmp	dword ptr [eax], 0
jbe	loc_6F4DA7
lea	ecx, [esp+440h+var_420]
call	sub_679E30
lea	ecx, [esp+440h+var_414]
push	ecx
mov	ecx, [esp+444h+var_418]
call	sub_6F4620
lea	ecx, [ecx+0]

loc_6F4CA0:
mov	ebx, [esp+440h+var_414]
test	ebx, ebx
jz	loc_6F4D61
cmp	dword ptr [ebx], 0
jz	loc_6F4D61
mov	edx, [ebx]
mov	esi, [esp+440h+var_410]
cmp	esi, [edx+4]
jg	loc_6F4D5E
mov	ecx, [esp+440h+var_428]
lea	eax, [esp+440h+var_434]
push	eax
add	ecx, 4
call	sub_6F4620
push	eax
lea	ecx, [esp+444h+var_414]
call	sub_6F40A0
test	al, al
jnz	short loc_6F4CF3
push	0FFFFFFFFh
push	offset asc_1545F0C ; ",	"
lea	ecx, [esp+448h+var_420]
call	sub_67A0C0

loc_6F4CF3:
mov	edx, [ebx]
lea	ecx, [esi+esi*2]
lea	eax, [edx+ecx*4+10h]
push	offset asc_154D890 ; "\""
lea	ecx, [esp+444h+var_418]
push	ecx
push	eax
lea	edx, [esp+44Ch+var_40C]
push	edx
push	offset asc_154D890 ; "\""
lea	ecx, [esp+454h+var_41C]
call	sub_67AE10
mov	ecx, eax
call	sub_67B0A0
mov	ecx, eax
call	sub_67B070
push	eax
lea	ecx, [esp+444h+var_420]
call	sub_67A540
lea	ecx, [esp+440h+var_418]
call	sub_4E40F0
lea	ecx, [esp+440h+var_40C]
call	sub_4E40F0
lea	ecx, [esp+440h+var_41C]
call	sub_4E40F0
lea	ecx, [esp+440h+var_414]
call	sub_68F980
mov	esi, [ebp+arg_4]
jmp	loc_6F4CA0

loc_6F4D5E:
mov	esi, [ebp+arg_4]

loc_6F4D61:
lea	ecx, [esp+440h+var_420]
push	ecx		; int
lea	edx, [esp+444h+var_434]
lea	eax, [esp+444h+var_408]
push	offset a0_	; "		 : {0}."
push	edx		; int
mov	[esp+44Ch+var_434], 2
mov	[esp+44Ch+var_430], eax
mov	[esp+44Ch+var_42C], 400h
call	sub_728350
lea	eax, [esp+44Ch+var_408]
push	eax
call	sub_6F3D70
add	esp, 10h
lea	ecx, [esp+440h+var_420]
call	sub_4E40F0
mov	ebx, [esp+440h+var_428]

loc_6F4DA7:
mov	eax, esi
call	sub_6F3A50
cmp	dword ptr [ebx], 6
mov	[esp+440h+var_41C], eax
mov	[esp+440h+var_434], 2
mov	[esp+440h+var_42C], 400h
jnz	short loc_6F4DDB
lea	edx, [esp+440h+var_41C]
push	edx
lea	eax, [esp+444h+var_424]
push	eax
push	offset aExported01Foun ; "Exported	: \"{0}\" {1} found."
jmp	loc_6F4AA6

loc_6F4DDB:
lea	ecx, [esp+440h+var_41C]
push	ecx		; int
lea	edx, [esp+444h+var_424]
lea	eax, [esp+444h+var_408]
push	edx		; int
mov	[esp+448h+var_430], eax
lea	eax, [esp+448h+var_434]
push	offset aExported01NotF ; "Exported	: \"{0}\" {1} not found."
push	eax		; int
call	sub_6F4810
lea	ecx, [esp+450h+var_408]
push	ecx
jmp	loc_6F4ABD

loc_6F4E06:
mov	eax, esi
call	sub_6F3A50
mov	[esp+440h+var_41C], eax
add	ebx, 8
push	ebx		; int
lea	eax, [esp+444h+var_41C]
push	eax		; int
lea	ecx, [esp+448h+var_424]
lea	edx, [esp+448h+var_408]
push	ecx		; int
mov	[esp+44Ch+var_430], edx
lea	edx, [esp+44Ch+var_434]
push	offset aImports01Found ; "Imports	: \"{0}\" {1} found in \"{2}"...
push	edx		; int
mov	[esp+454h+var_434], 2
mov	[esp+454h+var_42C], 400h
call	sub_6F48A0
lea	eax, [esp+454h+var_408]
push	eax
call	sub_6F3D70
add	esp, 18h

loc_6F4E53:
mov	ecx, [esp+440h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_6F4A40 endp

align 10h



sub_6F4E70 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F4E99
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F4E99:
lea	ecx, [edi+4]
pop	edi
pop	esi
jmp	sub_6AD270
sub_6F4E70 endp

align 10h



sub_6F4EB0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
push	eax
lea	ecx, [esp+0Ch+arg_0]
call	sub_6F3BD0
push	eax
push	edi
push	esi
mov	ecx, esi
call	sub_6F4940
pop	edi
pop	esi
retn	4
sub_6F4EB0 endp

align 10h



sub_6F4EE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	ebp, ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
mov	[esp+1Ch+var_8], 105h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	40h
push	ebp
call	eax
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_6F4F19
mov	ecx, eax
call	sub_71A6A0
mov	[esp+18h+var_8], eax
jmp	short loc_6F4F1D

loc_6F4F19:
mov	[esp+18h+var_8], ebx

loc_6F4F1D:
mov	ecx, dword_1855FC0
lea	eax, [esp+18h+var_4]
push	eax
mov	[esp+1Ch+var_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	2Ch
push	ebp
call	edx
cmp	eax, ebx
jz	short loc_6F4F4F
mov	ecx, [esp+18h+var_8]
push	ebx
push	ecx
mov	ecx, eax
call	sub_716490
mov	edi, eax
jmp	short loc_6F4F51

loc_6F4F4F:
xor	edi, edi

loc_6F4F51:
mov	ecx, dword_1855FC0
lea	eax, [esp+18h+var_4]
push	eax
mov	[esp+1Ch+var_4], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	24h
push	ebp
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_6F4FA8
lea	ecx, [esi+0Ch]
mov	dword ptr [esi], 1
mov	[esi+4], ebx
mov	[esi+8], ebx
call	sub_67AB70
fld1
fstp	dword ptr [esi+10h]
cmp	edi, ebx
jz	short loc_6F4F98
mov	ecx, edi
call	sub_64A420

loc_6F4F98:
fldz
mov	[esi+1Ch], edi
mov	[esi+20h], ebx
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+14h]
jmp	short loc_6F4FAA

loc_6F4FA8:
xor	esi, esi

loc_6F4FAA:
mov	ebx, [ebp+18h]
test	ebx, ebx
jz	short loc_6F4FCB
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_6F4FCB
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_6F4FCB:
mov	[ebp+18h], esi
test	edi, edi
jz	short loc_6F4FD9
mov	ecx, edi
call	sub_666B00

loc_6F4FD9:
mov	ecx, [esp+18h+var_8]
pop	edi
pop	esi
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_6F4FED
add	esp, 8
jmp	sub_64A430

loc_6F4FED:
add	esp, 8
retn
sub_6F4EE0 endp

align 10h



sub_6F5000 proc	near
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_143EAC8
mov	esi, [edi+30h]
test	esi, esi
jz	short loc_6F502B
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_6F502B
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F502B:
mov	esi, [edi+1Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F5050
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F5050:
mov	esi, [edi+18h]
test	esi, esi
jz	short loc_6F5071
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_6F5071
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F5071:
lea	ecx, [edi+8]
call	sub_6F4100
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A3F0
sub_6F5000 endp

align 10h



; int __thiscall sub_6F5090(int, char *, int, int, int)
sub_6F5090 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 70h
mov	eax, [esp+70h+arg_4]
push	ebp
mov	ebp, ecx
mov	[esp+74h+var_28], eax
mov	eax, [ebp+14h]
mov	ecx, [eax+0Ch]
mov	edx, [eax+14h]
mov	eax, [eax+10h]
push	esi
push	edi
mov	edi, [esp+7Ch+arg_0]
xor	esi, esi
mov	[esp+7Ch+var_54], ecx
lea	ecx, [esp+7Ch+var_4]
mov	[esp+7Ch+var_2C], edi
mov	[esp+7Ch+var_6C], esi
mov	[esp+7Ch+var_4C], edx
mov	[esp+7Ch+var_44], eax
mov	[esp+7Ch+var_50], esi
mov	[esp+7Ch+var_8], esi
call	sub_679E30
mov	eax, [ebp+30h]
mov	[esp+7Ch+var_48], esi
mov	byte ptr [esp+7Ch+var_70+3], 0
cmp	eax, esi
jz	short loc_6F5157
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFFCh
test	dword ptr [ecx], 7FFFFFFFh
jnz	short loc_6F5107
mov	ecx, [eax+1Ch]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
jmp	short loc_6F510A

loc_6F5107:
lea	eax, [ecx+8]

loc_6F510A:		; char *
push	edi
push	eax		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_6F5157
mov	eax, [ebp+30h]
inc	dword ptr [eax]
mov	esi, [esp+7Ch+var_4]
mov	ebp, [ebp+30h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F5143
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F5143:
lea	ecx, [esp+7Ch+var_8]
call	sub_6AD270
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
add	esp, 70h
retn	10h

loc_6F5157:
push	ebx
mov	ebx, [esp+80h+arg_C]
nop

loc_6F5160:
test	ebx, ebx
jz	short loc_6F5174
inc	[esp+80h+var_50]
inc	dword ptr [ebx]
lea	ecx, [esp+80h+var_C]
mov	[esp+80h+var_48], ecx
jmp	short loc_6F51D6

loc_6F5174:
cmp	dword ptr [ebp+8], 0
lea	edi, [ebp+8]
jz	short loc_6F51D6
mov	eax, [esp+80h+arg_0]
lea	edx, [eax+1]

loc_6F5187:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6F5187
sub	eax, edx
mov	edx, [esp+80h+arg_0]
push	1505h
push	eax
push	edx
call	sub_679B00
mov	ecx, [esp+80h+arg_4]
and	ecx, 3
xor	ecx, eax
mov	eax, [edi]
and	ecx, [eax+4]
push	ecx
lea	ecx, [esp+84h+var_2C]
push	ecx
mov	ecx, edi
call	sub_6F4240
test	eax, eax
jl	short loc_6F51D6
lea	edx, [eax+eax*2]
mov	eax, [edi]
lea	eax, [eax+edx*4+10h]
test	eax, eax
jnz	loc_6F5999

loc_6F51D6:
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_6F51FF
mov	eax, [esp+80h+var_48]
mov	ecx, [ebp+0Ch]
mov	edx, [ecx]
mov	edx, [edx+70h]
push	eax
mov	eax, [esp+84h+arg_4]
push	eax
mov	eax, [esp+88h+arg_0]
push	eax
call	edx
mov	edi, eax
jmp	short loc_6F5201

loc_6F51FF:
xor	edi, edi

loc_6F5201:
mov	eax, [ebp+14h]
cmp	dword ptr [eax+0Ch], 0
mov	eax, [esp+80h+arg_4]
setnz	cl
movzx	edx, cl
mov	ecx, [esp+80h+arg_0]
push	edx
push	eax
push	ecx
lea	edx, [esp+8Ch+var_C]
mov	ecx, ebx
call	sub_6F4A40
add	esp, 0Ch
test	edi, edi
jz	loc_6F5317
mov	ecx, [edi+0Ch]
mov	edx, [ecx+14h]
shr	edx, 6
not	dl
test	dl, 1
jz	loc_6F5317
test	byte ptr [esp+80h+arg_4], 3
jz	short loc_6F5265
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jz	loc_6F59B4

loc_6F5265:
mov	ecx, dword_1855FC0
lea	edx, [esp+80h+var_40]
push	edx
mov	[esp+84h+var_40], 146h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	24h
push	ebp
call	eax
mov	esi, eax
test	esi, esi
jz	loc_6F5311
mov	ecx, [esp+80h+arg_C]
neg	ecx
sbb	ecx, ecx
not	ecx
and	ecx, ebp
mov	[esi+4], ecx
lea	ebx, [esi+0Ch]
mov	ecx, ebx
mov	dword ptr [esi], 1
mov	dword ptr [esi+8], 0
call	sub_67AB70
fld1
mov	ecx, edi
fstp	dword ptr [esi+10h]
call	sub_64A420
fldz
cmp	[esp+80h+arg_0], 0
mov	[esi+1Ch], edi
mov	dword ptr [esi+20h], 0
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+14h]
jz	short loc_6F5308
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+3Ch]
call	eax
mov	ecx, [esp+80h+arg_0]
push	ecx		; char *
push	eax		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6F5308
mov	edx, [esp+80h+arg_0]
push	edx
mov	ecx, ebx
call	sub_67A2C0

loc_6F5308:
mov	ebx, [esp+80h+arg_C]
jmp	short loc_6F5313

loc_6F5311:
xor	esi, esi

loc_6F5313:
mov	[esp+80h+var_6C], esi

loc_6F5317:
fld1
mov	eax, [esp+80h+arg_0]
mov	ecx, [esp+80h+arg_4]
fstp	[esp+80h+var_64]
fldz
mov	[esp+80h+var_60], eax
fst	[esp+80h+var_5C]
mov	[esp+80h+var_68], ecx
fstp	[esp+80h+var_58]
mov	[esp+80h+var_40], 0
test	esi, esi
jnz	loc_6F5700
cmp	[esp+80h+var_44], esi
jz	loc_6F5556
mov	ecx, [esp+80h+var_44]
mov	edx, eax
push	edx
lea	edi, [ebp+1Ch]
push	edi
call	sub_73E3E0
test	al, al
jz	loc_6F5556
mov	eax, [edi]
and	eax, 0FFFFFFFCh
add	eax, 8
mov	[esp+80h+var_60], eax
mov	eax, [edi+10h]
cmp	eax, 10h
jnz	short loc_6F538C
mov	eax, [esp+80h+arg_4]
jmp	short loc_6F539B

loc_6F538C:
mov	ecx, [esp+80h+arg_4]
and	eax, 0FFFFFFF3h
and	ecx, 0FFFFFFFCh
or	eax, ecx

loc_6F539B:
fld	dword ptr [ebp+20h]
mov	ecx, [edi+10h]
fstp	[esp+80h+var_64]
mov	[esp+80h+var_68], eax
fld	dword ptr [ebp+24h]
fstp	[esp+80h+var_5C]
fld	dword ptr [ebp+28h]
fstp	[esp+80h+var_58]
test	cl, 0Ch
jz	short loc_6F53C3
mov	eax, ecx
sar	eax, 2
jmp	short loc_6F53C5

loc_6F53C3:
xor	eax, eax

loc_6F53C5:
and	eax, 3
and	ecx, 20h
or	eax, ecx
mov	[esp+80h+var_40], eax
test	ebx, ebx
jz	short loc_6F5405
mov	edx, [esp+80h+var_68]
mov	eax, [esp+80h+var_60]
mov	ecx, [esp+80h+arg_0]
push	edx
push	offset asc_154D890 ; "\""
push	eax
push	offset aMappedTo ; "\"	mapped to \""
push	ecx
push	offset aApplyingGfxfon ; "Applying GFxFontMap: \""
mov	eax, ebx
call	sub_6F3FE0
add	esp, 18h
jmp	loc_6F5556

loc_6F5405:
mov	edx, [esp+80h+var_60]
mov	eax, [esp+80h+var_68]
lea	ecx, [esp+80h+var_24]
lea	ebx, [ebp+8]
push	ecx
mov	ecx, ebx
mov	[esp+84h+var_24], edx
mov	[esp+84h+var_20], eax
call	sub_6F4310
test	eax, eax
jl	loc_6F54B1
lea	edx, [eax+eax*2]
mov	eax, [ebx]
lea	edi, [eax+edx*4+10h]
test	edi, edi
jz	short loc_6F54B1
mov	ecx, [edi]
fld	dword ptr [ecx+10h]
fld	[esp+80h+var_64]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_6F59DA
mov	ecx, dword_1855FC0
lea	eax, [esp+80h+var_6C]
push	eax
mov	[esp+84h+var_6C], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	24h
push	ebp
call	edx
test	eax, eax
jz	short loc_6F5496
mov	edx, [edi]
mov	ecx, [edx+20h]
mov	edx, [edx+1Ch]
push	ecx		; int
mov	ecx, [esp+84h+arg_4]
push	ecx		; int
mov	ecx, [esp+88h+arg_0]
push	ecx		; char *
push	edx		; int
push	ebp		; int
mov	ecx, eax
call	sub_67E880
mov	esi, eax
jmp	short loc_6F5498

loc_6F5496:
xor	esi, esi

loc_6F5498:
fld	[esp+80h+var_64]
mov	[esp+80h+var_6C], esi
fstp	dword ptr [esi+10h]
fld	[esp+80h+var_5C]
fstp	dword ptr [esi+14h]
fld	[esp+80h+var_58]
fstp	dword ptr [esi+18h]

loc_6F54B1:
mov	edx, [esp+80h+arg_0]
mov	eax, [esp+80h+var_68]
lea	ecx, [esp+80h+var_1C]
push	ecx
mov	ecx, ebx
mov	[esp+84h+var_1C], edx
mov	dword ptr [esp+84h+var_18], eax
call	sub_6F4310
test	eax, eax
jl	short loc_6F5547
lea	edx, [eax+eax*2]
mov	eax, [ebx]
lea	edi, [eax+edx*4+10h]
test	edi, edi
jz	short loc_6F5547
mov	ecx, [edi]
fld	dword ptr [ecx+10h]
fld	[esp+80h+var_64]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_6F59DA
push	ebp
push	24h
call	sub_6C4750
add	esp, 8
test	eax, eax
jz	short loc_6F552C
mov	edx, [edi]
mov	esi, [edx+20h]
mov	ecx, [esp+80h+arg_4]
mov	edx, [edx+1Ch]
push	esi		; int
push	ecx		; int
mov	ecx, [esp+88h+arg_0]
push	ecx		; char *
push	edx		; int
push	ebp		; int
mov	ecx, eax
call	sub_67E880
mov	esi, eax
jmp	short loc_6F552E

loc_6F552C:
xor	esi, esi

loc_6F552E:
fld	[esp+80h+var_64]
mov	[esp+80h+var_6C], esi
fstp	dword ptr [esi+10h]
fld	[esp+80h+var_5C]
fstp	dword ptr [esi+14h]
fld	[esp+80h+var_58]
fstp	dword ptr [esi+18h]

loc_6F5547:
mov	ebx, [esp+80h+arg_C]
test	esi, esi
jnz	loc_6F5700

loc_6F5556:
cmp	[esp+80h+var_54], 0
jz	loc_6F5700
mov	ecx, [ebp+14h]
xor	eax, eax
mov	[esp+80h+var_3C], eax
mov	[esp+80h+var_38], eax
cmp	ecx, eax
jz	short loc_6F5575
lea	eax, [ecx+8]

loc_6F5575:
mov	edi, [ebp+10h]
mov	ecx, [esp+80h+var_54]
mov	edx, [ecx]
mov	edx, [edx+4]
push	edi
mov	edi, [esp+84h+var_60]
push	eax
mov	eax, [ebp+0Ch]
push	eax
mov	eax, [esp+8Ch+var_68]
push	eax
push	edi
lea	eax, [esp+94h+var_3C]
push	eax
call	edx
test	al, al
jz	loc_6F56D8
mov	edi, [esp+80h+var_40]
test	edi, edi
jz	loc_6F565C
mov	eax, [esp+80h+arg_0]
lea	ecx, [esp+80h+var_14]
lea	esi, [ebp+8]
push	ecx
mov	ecx, esi
mov	[esp+84h+var_14], eax
mov	[esp+84h+var_10], edi
call	sub_6F4310
test	eax, eax
jl	short loc_6F55DF
lea	edx, [eax+eax*2]
mov	eax, [esi]
lea	eax, [eax+edx*4+10h]
test	eax, eax
jnz	loc_6F59F5

loc_6F55DF:
mov	ecx, dword_1855FC0
lea	eax, [esp+80h+var_40]
push	eax
mov	[esp+84h+var_40], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	24h
push	ebp
call	edx
test	eax, eax
jz	short loc_6F5629
mov	ecx, [esp+80h+var_3C]
mov	edx, [esp+80h+arg_0]
push	ecx		; int
mov	ecx, [esp+84h+var_38]
push	edi		; int
push	edx		; char *
mov	edx, ebx
neg	edx
sbb	edx, edx
not	edx
push	ecx		; int
and	edx, ebp
push	edx		; int
mov	ecx, eax
call	sub_67E880
mov	esi, eax
jmp	short loc_6F562B

loc_6F5629:
xor	esi, esi

loc_6F562B:
fld	[esp+80h+var_64]
mov	eax, [esp+80h+arg_0]
fstp	dword ptr [esi+10h]
push	offset aFound_	; " found."
fld	[esp+84h+var_5C]
push	edi
fstp	dword ptr [esi+14h]
push	offset asc_154D8EC ; "\" "
fld	[esp+8Ch+var_58]
mov	[esp+8Ch+var_6C], esi
fstp	dword ptr [esi+18h]
push	eax
jmp	loc_6F56E8

loc_6F565C:
mov	ecx, dword_1855FC0
lea	eax, [esp+80h+var_40]
push	eax
mov	[esp+84h+var_40], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	24h
push	ebp
call	edx
test	eax, eax
jz	short loc_6F56A7
mov	ecx, [esp+80h+var_3C]
mov	edx, [esp+80h+arg_0]
push	ecx		; int
mov	ecx, [esp+84h+var_38]
push	0		; int
push	edx		; char *
mov	edx, ebx
neg	edx
sbb	edx, edx
not	edx
push	ecx		; int
and	edx, ebp
push	edx		; int
mov	ecx, eax
call	sub_67E880
mov	esi, eax
jmp	short loc_6F56A9

loc_6F56A7:
xor	esi, esi

loc_6F56A9:
fld	[esp+80h+var_64]
mov	eax, [esp+80h+var_68]
mov	ecx, [esp+80h+var_60]
fstp	dword ptr [esi+10h]
fld	[esp+80h+var_5C]
push	offset aFound_	; " found."
push	eax
fstp	dword ptr [esi+14h]
fld	[esp+88h+var_58]
push	offset asc_154D8EC ; "\" "
fstp	dword ptr [esi+18h]
mov	[esp+8Ch+var_6C], esi
push	ecx
jmp	short loc_6F56E8

loc_6F56D8:
mov	edx, [esp+80h+var_68]
push	offset aNotFound_ ; " not found."
push	edx
push	offset asc_154D8EC ; "\" "
push	edi

loc_6F56E8:		; "Searching GFxFontLib: \""
push	offset aSearchingGfxfo
mov	eax, ebx
call	sub_6F3E70
add	esp, 14h
lea	ecx, [esp+80h+var_3C]
call	sub_733380

loc_6F5700:
cmp	byte ptr [esp+80h+var_70+3], 0
jnz	short loc_6F5731
test	ebx, ebx
jz	short loc_6F5731
test	esi, esi
jnz	loc_6F5809
cmp	[esp+80h+var_54], esi
jnz	short loc_6F5739
cmp	dword ptr [esp+80h+var_C], 2
jnz	short loc_6F5739
push	offset aGfxfontlibNotI ; "GFxFontLib not installed."
mov	edi, ebx
call	sub_6F3D70
add	esp, 4
jmp	short loc_6F5739

loc_6F5731:
test	esi, esi
jnz	loc_6F5802

loc_6F5739:
mov	ecx, [esp+80h+var_4C]
test	ecx, ecx
jz	loc_6F5802
mov	eax, [ebp+0Ch]
test	eax, eax
jz	short loc_6F5754
mov	eax, [eax+14h]
mov	eax, [eax+18h]
jmp	short loc_6F5757

loc_6F5754:
mov	eax, [ebp+10h]

loc_6F5757:
mov	edi, [esp+80h+var_60]
push	eax
push	ecx
mov	ecx, [esp+88h+var_68]
push	ecx
push	edi
call	sub_7178E0
mov	edx, [esp+90h+var_68]
add	esp, 10h
mov	[esp+80h+var_40], eax
test	eax, eax
mov	eax, ebx
jz	loc_6F5833
push	offset aFound_	; " found."
push	edx
push	offset asc_154D8EC ; "\" "
push	edi
push	offset aSearchingGfx_0 ; "Searching GFxFontProvider: \""
call	sub_6F3E70
mov	ecx, dword_1855FC0
add	esp, 14h
lea	edx, [esp+80h+var_6C]
push	edx
mov	[esp+84h+var_6C], 146h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	24h
push	ebp
call	eax
test	eax, eax
jz	short loc_6F57DE
mov	ecx, [esp+80h+arg_0]
mov	edx, [esp+80h+var_40]
push	0		; int
push	0		; int
push	ecx		; char *
mov	ecx, ebx
neg	ecx
sbb	ecx, ecx
not	ecx
and	ecx, ebp
push	edx		; int
push	ecx		; int
mov	ecx, eax
call	sub_67E880
mov	esi, eax
jmp	short loc_6F57E0

loc_6F57DE:
xor	esi, esi

loc_6F57E0:
fld	[esp+80h+var_64]
mov	ecx, [esp+80h+var_40]
fstp	dword ptr [esi+10h]
mov	[esp+80h+var_6C], esi
fld	[esp+80h+var_5C]
fstp	dword ptr [esi+14h]
fld	[esp+80h+var_58]
fstp	dword ptr [esi+18h]
call	sub_666B00

loc_6F5802:
cmp	byte ptr [esp+80h+var_70+3], 0
jnz	short loc_6F584E

loc_6F5809:
test	ebx, ebx
jz	short loc_6F584E
test	esi, esi
jnz	loc_6F5A19
cmp	[esp+80h+var_4C], esi
jnz	short loc_6F5856
cmp	dword ptr [esp+80h+var_C], 2
jnz	short loc_6F5856
push	offset aGfxfontprovide ; "GFxFontProvider not installed."
mov	edi, ebx
call	sub_6F3D70
add	esp, 4
jmp	short loc_6F5856

loc_6F5833:		; " not	found."
push	offset aNotFound_
push	edx
push	offset asc_154D8EC ; "\" "
push	edi
push	offset aSearchingGfx_0 ; "Searching GFxFontProvider: \""
call	sub_6F3E70
add	esp, 14h
jmp	short loc_6F5802

loc_6F584E:
test	esi, esi
jnz	loc_6F5A19

loc_6F5856:
cmp	[esp+80h+var_54], 0
jz	loc_6F5953
mov	eax, [esp+80h+var_68]
test	al, 10h
jz	loc_6F5953
and	eax, 0FFFFFFEFh
xor	ecx, ecx
mov	edi, eax
mov	eax, [ebp+14h]
mov	[esp+80h+var_34], ecx
mov	[esp+80h+var_30], ecx
cmp	eax, ecx
jz	short loc_6F5888
add	eax, 8
jmp	short loc_6F588A

loc_6F5888:
xor	eax, eax

loc_6F588A:
mov	ecx, [esp+80h+var_54]
mov	edx, [ecx]
mov	edx, [edx+4]
push	0
push	eax
mov	eax, [ebp+0Ch]
push	eax
mov	eax, [esp+8Ch+var_60]
push	edi
push	eax
lea	eax, [esp+94h+var_34]
push	eax
call	edx
test	al, al
jz	short loc_6F5923
mov	ecx, dword_1855FC0
lea	edx, [esp+80h+var_40]
push	edx
mov	[esp+84h+var_40], 146h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	24h
push	ebp
call	eax
test	eax, eax
jz	short loc_6F58F6
mov	ecx, [esp+80h+var_34]
mov	edx, [esp+80h+arg_0]
push	ecx		; int
mov	ecx, [esp+84h+var_30]
push	10h		; int
push	edx		; char *
mov	edx, ebx
neg	edx
sbb	edx, edx
not	edx
push	ecx		; int
and	edx, ebp
push	edx		; int
mov	ecx, eax
call	sub_67E880
mov	esi, eax
jmp	short loc_6F58F8

loc_6F58F6:
xor	esi, esi

loc_6F58F8:
fld	[esp+80h+var_64]
mov	eax, [esp+80h+var_60]
fstp	dword ptr [esi+10h]
push	offset aFound_	; " found."
fld	[esp+84h+var_5C]
push	edi
fstp	dword ptr [esi+14h]
push	offset asc_154D8EC ; "\" "
fld	[esp+8Ch+var_58]
mov	[esp+8Ch+var_6C], esi
fstp	dword ptr [esi+18h]
push	eax
jmp	short loc_6F5933

loc_6F5923:
mov	ecx, [esp+80h+var_60]
push	offset aNotFound_ ; " not found."
push	edi
push	offset asc_154D8EC ; "\" "
push	ecx

loc_6F5933:		; "Searching GFxFontLib	without	[Device] f"...
push	offset aSearchingGfx_1
mov	eax, ebx
call	sub_6F3E70
add	esp, 14h
lea	ecx, [esp+80h+var_34]
call	sub_733380
test	esi, esi
jnz	loc_6F5A19

loc_6F5953:
test	byte ptr [esp+80h+arg_4], 10h
jz	loc_6F5A5A
push	offset aSearchingAgain ; "Searching again without [Device] flag:"
mov	edi, ebx
call	sub_6F3D70
mov	eax, [esp+84h+arg_4]
and	eax, 0FFFFFFEFh
add	esp, 4
mov	[esp+80h+arg_4], eax
mov	[esp+80h+var_28], eax
xor	eax, eax
mov	[esp+80h+var_4C], eax
mov	[esp+80h+var_54], eax
mov	byte ptr [esp+80h+var_70+3], 1
jmp	loc_6F5160

loc_6F5999:
mov	ecx, [eax]
inc	dword ptr [ecx]
mov	esi, [eax]
lea	ecx, [esp+80h+var_C]
call	sub_6F4E70
pop	ebx
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 70h
retn	10h

loc_6F59B4:
mov	eax, [esp+80h+arg_8]
test	eax, eax
jz	loc_6F5A64
lea	ecx, [esp+80h+var_C]
mov	[eax], edi
call	sub_6F4E70
pop	ebx
pop	edi
pop	esi
xor	eax, eax
pop	ebp
add	esp, 70h
retn	10h

loc_6F59DA:
mov	eax, ecx
inc	dword ptr [eax]
mov	edi, [edi]
lea	ecx, [esp+80h+var_C]
call	sub_6F4E70
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 70h
retn	10h

loc_6F59F5:
mov	ecx, [eax]
inc	dword ptr [ecx]
mov	esi, [eax]
lea	ecx, [esp+80h+var_3C]
call	sub_733380
lea	ecx, [esp+80h+var_C]
call	sub_6F4E70
pop	ebx
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 70h
retn	10h

loc_6F5A19:
test	ebx, ebx
jz	short loc_6F5A38
mov	edx, [esp+80h+var_50]
sub	[ebx], edx
lea	ecx, [esp+80h+var_C]
call	sub_6F4E70
pop	ebx
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 70h
retn	10h

loc_6F5A38:
lea	eax, [esp+80h+var_6C]
push	eax
lea	ecx, [ebp+8]
call	sub_6F4EB0
lea	ecx, [esp+80h+var_C]
call	sub_6F4E70
pop	ebx
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 70h
retn	10h

loc_6F5A5A:
test	ebx, ebx
jz	short loc_6F5A64
mov	ecx, [esp+80h+var_50]
sub	[ebx], ecx

loc_6F5A64:
lea	ecx, [esp+80h+var_C]
call	sub_6F4E70
pop	ebx
pop	edi
pop	esi
xor	eax, eax
pop	ebp
add	esp, 70h
retn	10h
sub_6F5090 endp

align 10h



; int __thiscall sub_6F5A80(int, char *, int, int)
sub_6F5A80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [esp+20h+arg_8]
xor	ebx, ebx
mov	ebp, ecx
mov	[esp+20h+var_8], ebx
cmp	edi, ebx
jz	short loc_6F5AC0
mov	ecx, [esp+20h+arg_4]
mov	eax, [edi]
push	offset byte_146D660
push	ecx
push	offset asc_154D8EC ; "\" "
mov	[esp+2Ch+var_8], eax
push	esi
push	offset aSearchingForFo ; "Searching for	font: \""
mov	eax, edi
call	sub_6F3E70
add	esp, 14h

loc_6F5AC0:
mov	eax, [esp+20h+arg_4]
push	edi		; int
lea	edx, [esp+24h+var_10]
push	edx		; int
push	eax		; int
push	esi		; char *
mov	ecx, ebp	; int
mov	[esp+30h+var_10], ebx
call	sub_6F5090
mov	ebx, eax
test	ebx, ebx
jnz	loc_6F5BD3
mov	eax, [esp+20h+arg_4]
mov	ecx, eax
and	ecx, 3
mov	[esp+20h+var_4], ecx
jz	loc_6F5BD3
and	eax, 0FFFFFFFCh
mov	[esp+20h+var_C], eax
test	edi, edi
jz	short loc_6F5B20
inc	dword ptr [edi]
push	offset byte_146D660
push	eax
push	offset asc_154D8EC ; "\" "
push	esi
push	offset aSearchingForFo ; "Searching for	font: \""
mov	eax, edi
call	sub_6F3E70
mov	eax, [esp+34h+var_C]
add	esp, 14h

loc_6F5B20:		; int
push	edi
push	0		; int
push	eax		; int
push	esi		; char *
mov	ecx, ebp	; int
call	sub_6F5090
mov	[esp+20h+arg_0], eax
test	eax, eax
jz	loc_6F5BD3
mov	ecx, dword_1855FC0
lea	eax, [esp+20h+arg_8]
push	eax
mov	[esp+24h+arg_8], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	24h
push	ebp
call	edx
test	eax, eax
jz	short loc_6F5B69
mov	ecx, [esp+20h+arg_0]
push	ecx
mov	ecx, eax
call	sub_6F42A0
mov	ebx, eax
jmp	short loc_6F5B6B

loc_6F5B69:
xor	ebx, ebx

loc_6F5B6B:
mov	edx, [esp+20h+var_4]
or	[ebx+8], edx
mov	[esp+20h+arg_8], ebx
test	edi, edi
jnz	short loc_6F5B89
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [ebp+8]
call	sub_6F4EB0
jmp	short loc_6F5BB3

loc_6F5B89:
mov	ecx, [esp+20h+var_C]
mov	edx, [esp+20h+arg_4]
push	ecx
push	offset asc_154D890 ; "\""
push	esi
push	offset aWillBeGenerate ; " will	be generated from \""
push	edx
push	offset asc_154D8EC ; "\" "
push	esi
push	offset aFont_0	; "Font	\""
mov	eax, edi
call	sub_6F3F10
add	esp, 20h

loc_6F5BB3:
mov	ecx, [esp+20h+arg_0]
add	dword ptr [ecx], 0FFFFFFFFh
jnz	short loc_6F5BD3
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+20h+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax

loc_6F5BD3:
test	edi, edi
jz	short loc_6F5BDD
mov	ecx, [esp+20h+var_8]
mov	[edi], ecx

loc_6F5BDD:
test	ebx, ebx
jnz	loc_6F5C75
cmp	[esp+20h+var_10], ebx
jz	short loc_6F5C68
push	offset aIsCreated ; "\"	is created"
push	esi
push	offset aEmptyFont ; "Empty font: \""
mov	eax, edi
call	sub_6F3E00
mov	ecx, dword_1855FC0
add	esp, 0Ch
lea	eax, [esp+20h+arg_4]
push	eax
mov	[esp+24h+arg_4], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	24h
push	ebp
call	edx
test	eax, eax
jz	short loc_6F5C3F
mov	ecx, [esp+20h+var_10]
push	ebx		; int
mov	edx, edi
neg	edx
push	ebx		; int
sbb	edx, edx
push	esi		; char *
not	edx
push	ecx		; int
and	edx, ebp
push	edx		; int
mov	ecx, eax
call	sub_67E880
mov	ebx, eax
jmp	short loc_6F5C41

loc_6F5C3F:
xor	ebx, ebx

loc_6F5C41:
mov	[esp+20h+arg_8], ebx
test	edi, edi
jnz	short loc_6F5C64
push	ebx
lea	ecx, [esp+24h+arg_4]
add	ebp, 8
call	sub_6F3BD0
push	eax
lea	eax, [esp+24h+arg_8]
push	eax
push	ebp
mov	ecx, ebp
call	sub_6F4940

loc_6F5C64:
test	ebx, ebx
jnz	short loc_6F5C75

loc_6F5C68:		; "Font	not found."
push	offset aFontNotFound_
call	sub_6F3D70
add	esp, 4

loc_6F5C75:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 10h
retn	0Ch
sub_6F5A80 endp

align 10h



sub_6F5C90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
test	ebx, ebx
jz	short loc_6F5C9F
inc	dword ptr [ebx]

loc_6F5C9F:
mov	esi, [edi+30h]
test	esi, esi
jz	short loc_6F5CC0
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_6F5CC0
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F5CC0:
mov	[edi+30h], ebx
pop	edi
pop	esi
pop	ebx
retn	4
sub_6F5C90 endp

align 10h



sub_6F5CD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143EAC8
xor	ebx, ebx
lea	edi, [esi+1Ch]
mov	[esi+8], ebx
mov	ecx, edi
mov	[esi+18h], ebx
call	sub_679E30
fld1
mov	ecx, [esp+0Ch+arg_4]
fstp	dword ptr [edi+4]
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [edi+10h], 10h
mov	[esi+30h], ebx
mov	[esi+14h], ecx
mov	ecx, esi
mov	[esi+0Ch], eax
mov	[esi+10h], ebx
call	sub_6F4EE0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_6F5CD0 endp

align 10h



sub_6F5D30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6F5000
test	[esp+4+arg_0], 1
jz	short loc_6F5D4D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F5D4D:
mov	eax, esi
pop	esi
retn	4
sub_6F5D30 endp

align 10h



; int __stdcall	sub_6F5D60(char	*Src, int, char, int)
sub_6F5D60 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
Dst= byte ptr -84h
var_4= dword ptr -4
Src= dword ptr	4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h

sub	esp, 8Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+8Ch+var_4], eax
cmp	[esp+8Ch+arg_8], 0
mov	eax, [esp+8Ch+arg_C]
push	edi
mov	edi, [esp+90h+Src]
mov	[esp+90h+var_8C], ecx
mov	[esp+90h+var_88], eax
jnz	short loc_6F5DBC
push	eax		; int
mov	eax, [esp+94h+arg_4]
push	eax		; int
push	edi		; char *
call	sub_6F5A80
pop	edi
mov	ecx, [esp+8Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 8Ch
retn	10h

loc_6F5DBC:
push	ebx
push	ebp
push	esi
xor	ebp, ebp

loc_6F5DC1:		; int
push	2Ch
push	edi		; char *
call	_strchr
mov	ebx, eax
add	esp, 8
test	ebx, ebx
jz	short loc_6F5DFB
mov	esi, ebx
sub	esi, edi
cmp	esi, 7Fh
ja	short loc_6F5E1A
push	esi		; MaxCount
push	edi		; Src
lea	ecx, [esp+0A4h+Dst]
push	7Fh		; SizeInBytes
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h
mov	[esp+esi+9Ch+Dst], 0
lea	eax, [esp+9Ch+Dst]
lea	edi, [edi+esi+1]
jmp	short loc_6F5DFD

loc_6F5DFB:
mov	eax, edi

loc_6F5DFD:
mov	edx, [esp+9Ch+var_88]
mov	ecx, [esp+9Ch+arg_4]
push	edx		; int
push	ecx		; int
mov	ecx, [esp+0A4h+var_8C] ; int
push	eax		; char *
call	sub_6F5A80
mov	ebp, eax
test	ebp, ebp
jnz	short loc_6F5E1E

loc_6F5E1A:
test	ebx, ebx
jnz	short loc_6F5DC1

loc_6F5E1E:
mov	ecx, [esp+9Ch+var_4]
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
pop	edi
xor	ecx, esp
call	sub_7999A3
add	esp, 8Ch
retn	10h
sub_6F5D60 endp

align 10h



sub_6F5E40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
movzx	edx, byte ptr [eax+8]
mov	[ecx+8], dl
movzx	edx, byte ptr [eax+9]
mov	[ecx+9], dl
mov	byte ptr [ecx+7], 80h
movzx	edx, byte ptr [eax+0Ah]
mov	[ecx+0Ah], dl
mov	dl, [eax+0Bh]
test	dl, 1
jnz	short loc_6F5E96
and	dl, 0FEh
mov	[ecx+13h], dl
movzx	edx, byte ptr [eax+0Ch]
mov	[ecx+14h], dl
movzx	edx, byte ptr [eax+0Dh]
mov	[ecx+15h], dl
movzx	edx, byte ptr [eax+0Eh]
mov	[ecx+16h], dl
mov	edx, [eax+1Ch]
mov	[ecx+18h], edx
movzx	edx, word ptr [eax+16h]
mov	[ecx+1Ch], dx
movzx	edx, word ptr [eax+18h]
mov	[ecx+1Eh], dx

loc_6F5E96:
mov	edx, [eax+20h]
mov	[ecx+20h], edx
mov	al, [eax+10h]
mov	[ecx+24h], al
retn	4
sub_6F5E40 endp

align 10h



; int __stdcall	sub_6F5EB0(float)
sub_6F5EB0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

fld	ds:flt_143EC40
sub	esp, 8
fld	[esp+8+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_6F5F12
fld	ds:dbl_15FD398
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
fmul	st, st(1)
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_0]
test	al, 0Fh
jz	short loc_6F5F12
mov	dx, [ecx+4]
fstp	st
or	word ptr [ecx+6], 10h
xor	dx, ax
mov	eax, 0FFFh
and	dx, ax
xor	[ecx+4], dx
add	esp, 8
retn	4

loc_6F5F12:
fnstcw	word ptr [esp+8+arg_0]
mov	edx, 0FFEFh
movzx	eax, word ptr [esp+8+arg_0]
and	[ecx+6], dx
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
mov	edx, 0FFFh
fldcw	word ptr [esp+8+var_8]
fistp	dword ptr [esp+8+var_8]
mov	ax, word ptr [esp+8+var_8]
xor	ax, [ecx+4]
fldcw	word ptr [esp+8+arg_0]
and	ax, dx
xor	[ecx+4], ax
add	esp, 8
retn	4
sub_6F5EB0 endp




sub_6F5F50 proc	near

var_4= dword ptr -4

push	ecx
movzx	eax, word ptr [ecx+4]
and	eax, 0FFFh
test	byte ptr [ecx+6], 10h
jnz	short loc_6F5F72
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
test	eax, eax
jge	short loc_6F5F8E
fadd	ds:flt_15FCC08
pop	ecx
retn

loc_6F5F72:
mov	[esp+4+var_4], eax
fild	[esp+4+var_4]
test	eax, eax
jge	short loc_6F5F82
fadd	ds:flt_15FCC08

loc_6F5F82:
fmul	ds:dbl_15FD690
fstp	[esp+4+var_4]
fld	[esp+4+var_4]

loc_6F5F8E:
pop	ecx
retn
sub_6F5F50 endp




sub_6F5F90 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_6F5FEE
cmp	eax, [esi+4]
jnb	short loc_6F5FEE
cmp	dword ptr [esi+58h], 0
jnz	short loc_6F5FAE
movzx	ecx, word ptr [eax+4]
shr	ecx, 0Ch
mov	[esi+58h], ecx

loc_6F5FAE:
add	eax, 8
mov	edx, 0F000h
mov	[esi], eax
test	[eax+4], dx
jbe	short loc_6F5FE6
cmp	dword ptr [esi+58h], 0
jbe	short loc_6F5FE6
push	edi
lea	edi, [esi+0Ch]
mov	ecx, edi
call	sub_73ED30
test	al, al
jnz	short loc_6F5FE5
mov	eax, [esi+58h]
push	eax
mov	ecx, edi
call	sub_73F2D0
mov	dword ptr [esi+58h], 0

loc_6F5FE5:
pop	edi

loc_6F5FE6:
mov	ecx, esi
pop	esi
jmp	sub_735210

loc_6F5FEE:
pop	esi
retn
sub_6F5F90 endp




; int __stdcall	sub_6F5FF0(float)
sub_6F5FF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx]
fld	[esp+4+arg_0]
shr	eax, 1Fh
test	al, 1
jz	short loc_6F6025
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
or	eax, 0C00h
mov	[esp+4+var_4], eax
fldcw	word ptr [esp+4+var_4]
fistp	[esp+4+var_4]
mov	dx, word ptr [esp+4+var_4]
mov	[ecx+1Ah], dx
fldcw	word ptr [esp+4+arg_0]
pop	ecx
retn	4

loc_6F6025:
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
or	eax, 0C00h
mov	[esp+4+var_4], eax
fldcw	word ptr [esp+4+var_4]
fistp	[esp+4+var_4]
mov	ax, word ptr [esp+4+var_4]
mov	[ecx+26h], ax
fldcw	word ptr [esp+4+arg_0]
pop	ecx
retn	4
sub_6F5FF0 endp

align 10h



sub_6F6050 proc	near
mov	eax, [ecx]
shr	eax, 1Fh
test	al, 1
jz	short loc_6F605E
movzx	eax, word ptr [ecx+16h]
retn

loc_6F605E:
mov	eax, [ecx+18h]
retn
sub_6F6050 endp

align 10h



sub_6F6070 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
lea	eax, [esp+1Ch+arg_4]
push	eax
mov	esi, ecx
call	sub_67B600
mov	ecx, [esi+0Ch]
and	ecx, 0FFFFFFFCh
lea	edx, [esp+1Ch+var_C]
add	ecx, 8
push	edx
mov	[esp+20h+var_8], eax
mov	[esp+20h+var_C], ecx
xor	ebp, ebp
call	sub_67B600
mov	esi, eax
test	esi, esi
jz	short loc_6F60D7
mov	bl, byte ptr [esp+1Ch+arg_8]
lea	ebx, [ebx+0]

loc_6F60B0:
cmp	ebp, [esp+1Ch+arg_0]
jl	short loc_6F60C0
test	bl, bl
jz	short loc_6F60E4
cmp	esi, [esp+1Ch+var_8]
jz	short loc_6F6102

loc_6F60C0:
cmp	esi, 0Ah
jnz	short loc_6F60C6
dec	ebp

loc_6F60C6:
lea	edx, [esp+1Ch+var_C]
push	edx
inc	ebp
call	sub_67B600
mov	esi, eax
test	esi, esi
jnz	short loc_6F60B0

loc_6F60D7:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_6F60E4:
lea	eax, [esi-61h]
lea	edi, [esi-20h]
cmp	eax, 19h
jbe	short loc_6F60F1
mov	edi, esi

loc_6F60F1:
mov	ecx, [esp+1Ch+var_8]
push	ecx
call	sub_6674E0
add	esp, 4
cmp	edi, eax
jnz	short loc_6F60C0

loc_6F6102:
mov	edx, [esp+1Ch+var_C]
mov	eax, [esp+1Ch+arg_4]
mov	[esp+1Ch+var_4], edx
mov	[esp+1Ch+arg_8], eax

loc_6F6112:
lea	ecx, [esp+1Ch+arg_8]
push	ecx
or	edi, 0FFFFFFFFh
call	sub_67B600
mov	esi, eax

loc_6F6121:
lea	edx, [esp+1Ch+var_4]
push	edx
call	sub_67B600
inc	edi
cmp	eax, 0Ah
jz	short loc_6F6121
test	eax, eax
jz	short loc_6F615F
test	esi, esi
jz	short loc_6F6172
test	bl, bl
jz	short loc_6F6141
cmp	eax, esi
jmp	short loc_6F615D

loc_6F6141:
lea	ecx, [eax-61h]
lea	edx, [eax-20h]
cmp	ecx, 19h
jbe	short loc_6F614E
mov	edx, eax

loc_6F614E:
lea	ecx, [esi-61h]
cmp	ecx, 19h
lea	ecx, [esi-20h]
jbe	short loc_6F615B
mov	ecx, esi

loc_6F615B:
cmp	edx, ecx

loc_6F615D:
jz	short loc_6F6112

loc_6F615F:
test	esi, esi
jz	short loc_6F6172
test	eax, eax
jz	loc_6F60D7
sub	ebp, edi
jmp	loc_6F60C6

loc_6F6172:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_6F6070 endp

align 10h



sub_6F6180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_0]
fld	dword ptr [eax]
fstp	[esp+4+arg_0]
fld	dword ptr [eax+4]
mov	eax, [esp+4+arg_4]
fstp	[esp+4+var_4]
fld	dword ptr [eax]
fld	[esp+4+arg_0]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+4+arg_0]
fld	dword ptr [eax+4]
fld	[esp+4+var_4]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+4+arg_4]
fldz
fld	st
fld	[esp+4+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld	[esp+4+arg_4]
test	ah, 44h
jp	short loc_6F61E9
fld	st(2)
fucomp	st(1)
fnstsw	ax
test	ah, 44h
jp	short loc_6F61E9
fstp	st(1)
fstp	st
fstp	st(2)
fstp	st
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
pop	ecx
retn

loc_6F61E9:
mov	eax, [esp+4+arg_8]
fstp	st(2)
fld	st(1)
fld	st(1)
fld	dword ptr [eax+4]
fsubrp	st(5), st
fxch	st(4)
fmulp	st(3), st
fld	dword ptr [eax]
fsubrp	st(5), st
fxch	st(4)
fmulp	st(1), st
faddp	st(1), st
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fdivrp	st(1), st
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
pop	ecx
retn
sub_6F6180 endp

align 10h



sub_6F6220 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jl	short loc_6F6238
mov	[ecx+2], ax
mov	eax, 0FFBFh
and	[ecx+6], ax
retn	4

loc_6F6238:
or	word ptr [ecx+6], 40h
neg	eax
mov	[ecx+2], ax
retn	4
sub_6F6220 endp

align 10h



sub_6F6250 proc	near

var_4= dword ptr -4

push	ecx
fldz
push	esi
mov	esi, [ecx+4]
fstp	[esp+8+var_4]
push	edi
xor	edi, edi
cmp	esi, 4
jl	short loc_6F62AA
mov	eax, [ecx]
lea	edx, [esi-4]
shr	edx, 2
add	eax, 0Ch
inc	edx
lea	edi, ds:0[edx*4]

loc_6F6276:
fld	dword ptr [eax-8]
add	eax, 20h
sub	edx, 1
fadd	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fadd	dword ptr [eax-20h]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fadd	dword ptr [eax-18h]
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fadd	dword ptr [eax-10h]
fstp	[esp+0Ch+var_4]
jnz	short loc_6F6276

loc_6F62AA:
cmp	edi, esi
jnb	short loc_6F62C8
mov	eax, [ecx]
lea	eax, [eax+edi*8+4]
sub	esi, edi

loc_6F62B6:
fld	dword ptr [eax]
add	eax, 8
sub	esi, 1
fadd	[esp+0Ch+var_4]
fstp	[esp+0Ch+var_4]
jnz	short loc_6F62B6

loc_6F62C8:
fld	[esp+0Ch+var_4]
pop	edi
pop	esi
pop	ecx
retn
sub_6F6250 endp




sub_6F62D0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [edx]
fld	dword ptr [ecx+18h]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_6F6316
fld	dword ptr [edx]
fld	dword ptr [ecx+10h]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6F6316
fld	dword ptr [edx+4]
fld	dword ptr [ecx+1Ch]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_6F6316
fld	dword ptr [edx+4]
fld	dword ptr [ecx+14h]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6F6316
mov	eax, 1
retn	0Ch

loc_6F6316:
xor	eax, eax
retn	0Ch
sub_6F62D0 endp

align 10h



sub_6F6320 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
mov	ebx, [ecx+4]
push	ebp
push	esi
push	edi
xor	edx, edx
xor	esi, esi
xor	edi, edi
xor	ebp, ebp
cmp	ebx, 2
mov	[esp+14h+var_4], edx
jl	short loc_6F6358
mov	eax, [ecx]
lea	edx, [ebx-2]
shr	edx, 1
add	eax, 0Ch
inc	edx
lea	ebp, [edx+edx]

loc_6F6347:
add	esi, [eax-8]
add	edi, [eax]
add	eax, 10h
sub	edx, 1
jnz	short loc_6F6347
mov	edx, [esp+14h+var_4]

loc_6F6358:
cmp	ebp, ebx
jnb	short loc_6F6362
mov	eax, [ecx]
mov	edx, [eax+ebp*8+4]

loc_6F6362:
lea	eax, [edi+esi]
pop	edi
pop	esi
pop	ebp
add	eax, edx
pop	ebx
pop	ecx
retn
sub_6F6320 endp

align 10h



sub_6F6370 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

push	ebp
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_679E30
mov	eax, [edi+0Ch]
mov	edi, [esp+0Ch+arg_4]
mov	ebp, [esp+0Ch+arg_8]
and	eax, 0FFFFFFFCh
add	eax, 8
mov	[esp+0Ch+arg_0], eax
cmp	edi, ebp
jnb	short loc_6F63D0
push	ebx
mov	bl, [esp+10h+arg_C]
mov	edi, edi

loc_6F63A0:
lea	eax, [esp+10h+arg_0]
push	eax
call	sub_67B600
test	eax, eax
jz	short loc_6F63CF
cmp	eax, 0Ah
jz	short loc_6F63BE
push	eax
mov	ecx, esi
call	sub_679F30
inc	edi
jmp	short loc_6F63CB

loc_6F63BE:
test	bl, bl
jz	short loc_6F63CB
push	0Ah
mov	ecx, esi
call	sub_679F30

loc_6F63CB:
cmp	edi, ebp
jb	short loc_6F63A0

loc_6F63CF:
pop	ebx

loc_6F63D0:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	10h
sub_6F6370 endp

align 10h



sub_6F63E0 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_38=	byte ptr -38h
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 68h
push	ebx
push	ebp
mov	ebp, [esp+70h+arg_0]
push	esi
mov	ebx, ecx
push	edi
mov	ecx, ebp
call	sub_679E30
mov	eax, [ebx+0Ch]
xor	edi, edi
and	eax, 0FFFFFFFCh
add	eax, 8
xor	esi, esi
mov	[esp+78h+arg_0], edi
mov	[esp+78h+var_68], eax
mov	[esp+78h+var_64], edi
cmp	[ebx+4], edi
jbe	loc_6F650F
jmp	short loc_6F6420
align 10h

loc_6F6420:
mov	eax, [ebx]
mov	eax, [eax+edi*8]
mov	ecx, [eax+174h]
test	ecx, ecx
jz	loc_6F6501
push	0FFFFFFFFh
push	0
lea	edx, [esp+80h+var_38]
push	edx
call	sub_73F440
lea	ecx, [esp+78h+var_38]
call	sub_73EF10
test	al, al
jnz	loc_6F64F7

loc_6F6452:
lea	eax, [esp+78h+var_60]
push	eax
lea	ecx, [esp+7Ch+var_38]
call	sub_73F160
mov	eax, [esp+78h+var_60]
add	eax, [esp+78h+arg_0]
mov	ecx, [esp+78h+var_5C]
lea	edi, [ecx+eax]
mov	[esp+78h+var_60], eax
cmp	edi, esi
jbe	short loc_6F64D7
cmp	esi, eax
jnb	short loc_6F6497
jmp	short loc_6F6480
align 10h

loc_6F6480:
lea	edx, [esp+78h+var_68]
push	edx
call	sub_67B600
cmp	eax, 0Ah
jnz	short loc_6F6490
dec	esi

loc_6F6490:
inc	esi
cmp	esi, [esp+78h+var_60]
jb	short loc_6F6480

loc_6F6497:
cmp	esi, edi
jnb	short loc_6F64D5
jmp	short loc_6F64A0
align 10h

loc_6F64A0:
lea	eax, [esp+78h+var_68]
push	eax
call	sub_67B600
cmp	[esp+78h+arg_4], 0
jz	short loc_6F64C3
cmp	eax, 0Ah
jnz	short loc_6F64C8
push	eax
mov	ecx, ebp
call	sub_679F30
jmp	short loc_6F64A0

loc_6F64C3:
cmp	eax, 0Ah
jz	short loc_6F64A0

loc_6F64C8:
push	eax
mov	ecx, ebp
call	sub_679F30
inc	esi
cmp	esi, edi
jb	short loc_6F64A0

loc_6F64D5:
mov	esi, edi

loc_6F64D7:
push	0
lea	ecx, [esp+7Ch+var_38]
call	sub_73F1B0
lea	ecx, [esp+78h+var_38]
call	sub_73EF10
test	al, al
jz	loc_6F6452
mov	edi, [esp+78h+var_64]

loc_6F64F7:
mov	ecx, [ebx]
mov	edx, [ecx+edi*8+4]
add	[esp+78h+arg_0], edx

loc_6F6501:
inc	edi
mov	[esp+78h+var_64], edi
cmp	edi, [ebx+4]
jb	loc_6F6420

loc_6F650F:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 68h
retn	8
sub_6F63E0 endp

align 10h



sub_6F6520 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
lea	ecx, [esp+14h+var_4]
call	sub_679E30
xor	esi, esi
xor	edi, edi
cmp	[ebx+4], esi
jbe	short loc_6F658A
mov	ebp, [esp+14h+arg_0]
lea	ecx, [ecx+0]

loc_6F6540:
mov	eax, [ebx]
mov	ecx, [eax+edi*8]
mov	ecx, [ecx+174h]
lea	eax, [eax+edi*8]
test	ecx, ecx
jz	short loc_6F6584
cmp	esi, ebp
ja	short loc_6F6563
mov	edx, [eax+4]
add	edx, esi
cmp	ebp, edx
jb	short loc_6F6569
cmp	esi, ebp
jb	short loc_6F657E

loc_6F6563:
cmp	esi, [esp+14h+arg_4]
jnb	short loc_6F657E

loc_6F6569:
mov	eax, [esp+14h+arg_4]
sub	eax, esi
mov	edx, ebp
push	eax
sub	edx, esi
push	edx
call	sub_73EEC0
test	al, al
jnz	short loc_6F65BA

loc_6F657E:
mov	eax, [ebx]
add	esi, [eax+edi*8+4]

loc_6F6584:
inc	edi
cmp	edi, [ebx+4]
jb	short loc_6F6540

loc_6F658A:
mov	esi, [esp+14h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F65B0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F65B0:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	8

loc_6F65BA:
mov	esi, [esp+14h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F65E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F65E0:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	8
sub_6F6520 endp

align 10h



sub_6F65F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
push	edi
lea	ebx, [esi+10h]
xor	edi, edi
mov	[ebx], ecx
cmp	[esi+4], edi
jbe	short loc_6F662B
jmp	short loc_6F6610
align 10h

loc_6F6610:
mov	edx, [esi]
mov	eax, [edx+edi*8]
mov	ecx, [eax+174h]
test	ecx, ecx
jz	short loc_6F6625
push	ebx
call	sub_73EE90

loc_6F6625:
inc	edi
cmp	edi, [esi+4]
jb	short loc_6F6610

loc_6F662B:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6F65F0 endp

align 10h



sub_6F6640 proc	near

var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_28=	dword ptr -28h
var_24=	word ptr -24h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	word ptr -18h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= word ptr	-0Ch
var_A= word ptr	-0Ah
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 74h
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+78h]
push	esi
mov	esi, [esp+80h+arg_0]
mov	[esp+80h+var_74], eax
mov	eax, [esi+4]
fld	dword ptr [eax]
push	edi
fstp	[esp+84h+var_60]
lea	ecx, [ebp+44h]
fld	dword ptr [eax+4]
push	ecx
fstp	[esp+88h+var_5C]
lea	ecx, [esp+88h+var_60]
fld	dword ptr [eax+8]
fstp	[esp+88h+var_58]
fld	dword ptr [eax+0Ch]
fstp	[esp+88h+var_54]
fld	dword ptr [eax+10h]
fstp	[esp+88h+var_50]
fld	dword ptr [eax+14h]
fstp	[esp+88h+var_4C]
call	sub_64EAF0
mov	esi, [esi]
mov	ecx, 8
lea	edi, [esp+84h+var_48]
lea	edx, [ebp+24h]
rep movsd
push	edx
lea	ecx, [esp+88h+var_48]
call	sub_68CE70
mov	edi, [esp+84h+arg_0]
fldz
mov	esi, [esp+84h+var_74]
xor	ebx, ebx
cmp	[edi+8], ebx
jnz	loc_6F674A
lea	eax, [esi+10h]
fst	[esp+84h+var_70]
push	eax
fst	[esp+88h+var_6C]
lea	ecx, [esp+88h+var_70]
fst	[esp+88h+var_68]
push	ecx
fstp	[esp+8Ch+var_64]
lea	ecx, [esp+8Ch+var_60]
call	sub_64EF10
mov	edx, [ebp+0]
mov	eax, [edx+54h]
mov	ecx, ebp
call	eax
mov	ecx, eax
fld	dword ptr [ecx+9Ch]
add	ecx, 90h
fld	[esp+84h+var_6C]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6F6738
fld	[esp+84h+var_64]
fld	dword ptr [ecx+4]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6F6738
fld	[esp+84h+var_68]
fld	dword ptr [ecx]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_6F6738
fld	dword ptr [ecx+8]
fld	[esp+84h+var_70]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_6F674C

loc_6F6738:
mov	ecx, [edi+48h]
test	dword ptr [ecx+14h], 100h
jz	loc_6F6873
jmp	short loc_6F674C

loc_6F674A:
fstp	st

loc_6F674C:
xor	ecx, ecx
mov	al, 10h
mov	[esp+84h+var_18], cx
lea	ecx, [ebp+150h]
xor	edx, edx
mov	[esp+84h+var_1E], al
mov	[esp+84h+var_12], al
xor	eax, eax
push	ecx
lea	ecx, [esp+88h+var_28]
mov	[esp+88h+var_28], ebx
mov	[esp+88h+var_24], dx
mov	[esp+88h+var_22], bl
mov	[esp+88h+var_21], bl
mov	[esp+88h+var_20], bl
mov	[esp+88h+var_1F], bl
mov	[esp+88h+var_1D], bl
mov	[esp+88h+var_1C], ebx
mov	[esp+88h+var_16], bl
mov	[esp+88h+var_15], bl
mov	[esp+88h+var_14], bl
mov	[esp+88h+var_13], bl
mov	[esp+88h+var_11], bl
mov	[esp+88h+var_10], ebx
mov	[esp+88h+var_C], dx
mov	[esp+88h+var_A], ax
mov	[esp+88h+var_8], ebx
mov	[esp+88h+var_4], bl
call	sub_6F5E40
test	byte ptr [esi+44h], 1
jz	short loc_6F67D2
mov	al, 3
or	[esp+84h+var_21], al
or	[esp+84h+var_15], al

loc_6F67D2:
add	esi, 20h
push	esi
lea	ecx, [esp+88h+var_60]
call	sub_64EAF0
mov	esi, [ebp+174h]
cmp	esi, ebx
jz	short loc_6F6841
cmp	[esi+18h], bl
jnz	short loc_6F6815
fldz
sub	esp, 8
fst	[esp+8Ch+var_88]
lea	edx, [ebp+94h]
fstp	[esp+8Ch+var_8C]
lea	eax, [ebp+7Ch]
push	ebx		; int
push	edx		; int
push	eax		; int
lea	ecx, [esi+1Ch]
push	ecx		; int
mov	ecx, esi
call	sub_73F580
mov	byte ptr [esi+18h], 1

loc_6F6815:
mov	eax, [ebp+174h]
lea	ecx, [eax+1Ch]
mov	eax, [ecx+8]
cmp	eax, ebx
jz	short loc_6F6841
cmp	[eax+54h], ebx
jnz	short loc_6F682F
cmp	[eax+60h], ebx
jz	short loc_6F6841

loc_6F682F:
push	ebx
push	ebx
lea	edx, [esp+8Ch+var_48]
push	edx
lea	eax, [esp+90h+var_60]
push	eax
push	edi
call	sub_6F9540

loc_6F6841:
mov	[edi+50h], ebp
mov	dl, [ebp+178h]
shr	dl, 1
push	ebx
and	dl, 1
movzx	eax, dl
lea	ecx, [esp+88h+var_28]
push	ecx
push	eax
lea	ecx, [esp+90h+var_48]
push	ecx
lea	edx, [esp+94h+var_60]
push	edx
push	edi
lea	ecx, [ebp+7Ch]
call	sub_7356C0
and	byte ptr [ebp+178h], 0FDh

loc_6F6873:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 74h
retn	4
sub_6F6640 endp

align 10h



sub_6F6880 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 28h
mov	eax, [esp+28h+arg_4]
fld	dword ptr [eax]
mov	ecx, [esp+28h+arg_8]
fstp	[esp+28h+var_20]
xor	edx, edx
fld	dword ptr [eax+4]
fstp	[esp+28h+var_1C]
fld	dword ptr [eax+8]
fstp	[esp+28h+var_10]
fld	dword ptr [eax+4]
fstp	[esp+28h+var_C]
fld	dword ptr [eax]
fstp	[esp+28h+var_18]
fld	dword ptr [eax+0Ch]
fstp	[esp+28h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+28h+var_8]
fld	dword ptr [eax+0Ch]
fstp	[esp+28h+var_4]
fld	dword ptr [ecx]
fld	[esp+28h+var_20]
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld	[esp+28h+var_10]
test	ah, 1
jz	short loc_6F68ED
fld	dword ptr [ecx]
mov	edx, 2
fcomp	st(1)
fnstsw	ax
test	ah, 1
jz	short loc_6F68ED
mov	edx, 1

loc_6F68ED:
fld	dword ptr [ecx+4]
fld	[esp+28h+var_1C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld	[esp+28h+var_14]
test	ah, 1
jz	short loc_6F6917
fld	dword ptr [ecx+4]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6F6914
or	edx, 20h
jmp	short loc_6F6917

loc_6F6914:
or	edx, 10h

loc_6F6917:		; switch 35 cases
cmp	edx, 22h
ja	loc_6F6AB9	; default
			; jumptable 006F6927 cases 3-15,19-31
movzx	eax, ds:byte_6F6AF8[edx]
jmp	ds:off_6F6AD4[eax*4] ; switch jump

loc_6F692E:		; jumptable 006F6927 case 0
mov	eax, [esp+28h+arg_0]
fstp	st
fstp	st(1)
fxch	st(1)
fstp	dword ptr [eax]
fstp	dword ptr [eax+4]
add	esp, 28h
retn

loc_6F6941:		; jumptable 006F6927 case 16
fstp	st(1)
push	ecx
fstp	st
lea	ecx, [esp+2Ch+var_18]
push	ecx
fstp	st(1)
lea	edx, [esp+30h+var_20]
fstp	st
push	edx
call	sub_6F6180
fstp	[esp+34h+arg_4]
fld	[esp+34h+var_18]
fld	[esp+34h+var_20]
fld	st
fsubp	st(2), st
fld	[esp+34h+arg_4]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+34h+var_28]
fld	[esp+34h+var_14]

loc_6F697D:
fld	[esp+34h+var_1C]

loc_6F6981:
mov	eax, [esp+34h+arg_0]
fld	st
fsubp	st(2), st
add	esp, 0Ch
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+28h+var_24]
fld	[esp+28h+var_28]
fstp	dword ptr [eax]
fld	[esp+28h+var_24]
fstp	dword ptr [eax+4]
add	esp, 28h
retn

loc_6F69A6:		; jumptable 006F6927 case 32
mov	eax, [esp+28h+arg_0]
fstp	st(1)
fstp	st(2)
fstp	st
fld	[esp+28h+var_18]
fstp	dword ptr [eax]
fstp	dword ptr [eax+4]
add	esp, 28h
retn

loc_6F69BD:		; jumptable 006F6927 case 1
fstp	st(1)
push	ecx
fstp	st
lea	eax, [esp+2Ch+var_10]
push	eax
fstp	st(1)
lea	ecx, [esp+30h+var_20]
fstp	st
push	ecx
call	sub_6F6180
fstp	[esp+34h+arg_4]
fld	[esp+34h+var_10]
fld	[esp+34h+var_20]
fld	st
fsubp	st(2), st
fld	[esp+34h+arg_4]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+34h+var_28]
fld	[esp+34h+var_C]
jmp	short loc_6F697D

loc_6F69FB:		; jumptable 006F6927 cases 17,33
fstp	st(1)
push	ecx
fstp	st
lea	edx, [esp+2Ch+var_8]
push	edx
fstp	st(1)
lea	eax, [esp+30h+var_18]
fstp	st
push	eax
call	sub_6F6180
fstp	[esp+34h+arg_4]
fld	[esp+34h+var_8]
fld	[esp+34h+var_18]
fld	st
fsubp	st(2), st
fld	[esp+34h+arg_4]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+34h+var_28]
fld	[esp+34h+var_4]
fld	[esp+34h+var_14]
jmp	loc_6F6981

loc_6F6A40:		; jumptable 006F6927 case 2
mov	eax, [esp+28h+arg_0]
fstp	st(1)
fstp	st
fstp	st(1)
fstp	dword ptr [eax]
fld	[esp+28h+var_C]
fstp	dword ptr [eax+4]
add	esp, 28h
retn

loc_6F6A57:		; jumptable 006F6927 case 18
fstp	st(1)
push	ecx
fstp	st
lea	ecx, [esp+2Ch+var_8]
push	ecx
fstp	st(1)
lea	edx, [esp+30h+var_10]
fstp	st
push	edx
call	sub_6F6180
fstp	[esp+34h+arg_4]
fld	[esp+34h+var_8]
fld	[esp+34h+var_10]
fld	st
fsubp	st(2), st
fld	[esp+34h+arg_4]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+34h+var_28]
fld	[esp+34h+var_4]
fld	[esp+34h+var_C]
jmp	loc_6F6981

loc_6F6A9C:		; jumptable 006F6927 case 34
mov	eax, [esp+28h+arg_0]
fstp	st(1)
fstp	st
fstp	st(1)
fstp	st
fld	[esp+28h+var_8]
fstp	dword ptr [eax]
fld	[esp+28h+var_4]
fstp	dword ptr [eax+4]
add	esp, 28h
retn

loc_6F6AB9:		; default
mov	eax, [esp+28h+arg_0] ; jumptable 006F6927 cases	3-15,19-31
fstp	st(1)
fstp	st
fstp	st(1)
fstp	st
fld	ds:flt_1437488
fst	dword ptr [eax]
fstp	dword ptr [eax+4]
add	esp, 28h
retn
sub_6F6880 endp

off_6F6AD4 dd offset loc_6F692E	; jump table for switch	statement
dd offset loc_6F69BD
dd offset loc_6F6A40
dd offset loc_6F6941
dd offset loc_6F69FB
dd offset loc_6F6A57
dd offset loc_6F69A6
dd offset loc_6F6A9C
dd offset loc_6F6AB9
byte_6F6AF8 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	3,     4,     5,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	6,     4,     7
align 10h



sub_6F6B20 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_6F6B3C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6F6B51
push	esi
jmp	short loc_6F6B4B

loc_6F6B3C:
cmp	esi, [edi+8]
jb	short loc_6F6B51
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_6F6B4B:
push	edi
call	sub_6ABB00

loc_6F6B51:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_6F6B7A
sub	esi, ebx
mov	edx, [edi]
lea	eax, [edx+ebx*8]
jz	short loc_6F6B7A
fldz

loc_6F6B63:
test	eax, eax
jz	short loc_6F6B70
fst	dword ptr [eax+4]
mov	dword ptr [eax], 0FFFFFFFFh

loc_6F6B70:
add	eax, 8
sub	esi, 1
jnz	short loc_6F6B63
fstp	st

loc_6F6B7A:
pop	edi
pop	esi
pop	ebx
retn	4
sub_6F6B20 endp




sub_6F6B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

xor	eax, eax
push	esi
mov	esi, ecx
mov	[esi+1Ch], eax
mov	[esi+24h], eax
mov	[esi+28h], eax
mov	[esi+2Ch], eax
or	ecx, 0FFFFFFFFh
mov	[esi+18h], ecx
mov	[esi+20h], ecx
mov	ecx, [esp+4+arg_4]
mov	[esi+38h], eax
mov	[esi+34h], eax
mov	[esi+30h], eax
mov	[esi+3Ch], al
mov	[esi+14h], eax
mov	[esi+10h], eax
mov	[esi+40h], eax
mov	[esi+44h], eax
mov	[esi+48h], eax
mov	[esi+4Ch], eax
mov	[esi+50h], eax
mov	[esi+54h], eax
mov	[esi+58h], eax
mov	eax, [esp+4+arg_0]
lea	edx, [eax+ecx*8]
mov	[esi], eax
mov	eax, [esp+4+arg_8]
mov	ecx, esi
mov	[esi+4], edx
mov	[esi+8], eax
call	sub_735210
mov	eax, esi
pop	esi
retn	0Ch
sub_6F6B80 endp

align 10h



sub_6F6BF0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+50h]
test	ecx, ecx
jz	short loc_6F6BFF
call	sub_64A400

loc_6F6BFF:
mov	esi, [esi+4Ch]
test	esi, esi
jz	short loc_6F6C20
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_6F6C20
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F6C20:
pop	esi
retn
sub_6F6BF0 endp

align 10h



sub_6F6C30 proc	near

var_B4=	dword ptr -0B4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0A0h
mov	edx, [esp+0A0h+arg_8]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+0B0h+arg_0]
push	ecx
mov	esi, ecx
mov	ecx, [esp+0B4h+arg_C]
mov	eax, esp
push	edx
mov	[eax], ecx
push	edi
mov	ecx, esi
mov	[esp+0BCh+var_64], esi
call	sub_656EE0
lea	ecx, [esi+7Ch]
mov	dword ptr [esi], offset	off_143ECC8
mov	dword ptr [esi+0Ch], offset off_143ECC0
call	sub_735570
lea	ecx, [esi+150h]
call	sub_6CE4E0
xor	ebx, ebx
mov	[esi+174h], ebx
mov	[esi+178h], bl
fld	dword ptr [edi+20h]
fstp	[esp+0B0h+var_54]
lea	eax, [esp+0B0h+var_2C]
fld	dword ptr [edi+24h]
push	eax
fstp	[esp+0B4h+var_50]
lea	ecx, [esp+0B4h+var_54]
fld	dword ptr [edi+28h]
fstp	[esp+0B4h+var_4C]
fld	dword ptr [edi+2Ch]
fstp	[esp+0B4h+var_48]
fld	dword ptr [edi+30h]
fstp	[esp+0B4h+var_44]
fld	dword ptr [edi+34h]
fstp	[esp+0B4h+var_40]
fld	[esp+0B4h+var_54]
fstp	[esp+0B4h+var_2C]
fld	[esp+0B4h+var_50]
fstp	[esp+0B4h+var_28]
fld	[esp+0B4h+var_4C]
fstp	[esp+0B4h+var_24]
fld	[esp+0B4h+var_48]
fstp	[esp+0B4h+var_20]
fld	[esp+0B4h+var_44]
fstp	[esp+0B4h+var_1C]
fld	[esp+0B4h+var_40]
fstp	[esp+0B4h+var_18]
call	sub_64E9E0
fldz
lea	ecx, [edi+10h]
fst	[esp+0B0h+var_90]
push	ecx
fst	[esp+0B4h+var_8C]
lea	edx, [esp+0B4h+var_90]
fst	[esp+0B4h+var_88]
push	edx
lea	ecx, [esp+0B8h+var_54]
fstp	[esp+0B8h+var_84]
call	sub_64EF10
fldz
fcom	[esp+0B0h+var_90]
mov	[esp+0B0h+var_68], ebx
fnstsw	ax
test	ah, 41h
jz	short loc_6F6D47
fst	[esp+0B0h+var_90]

loc_6F6D47:
fcom	[esp+0B0h+var_8C]
fnstsw	ax
test	ah, 41h
jz	short loc_6F6D56
fst	[esp+0B0h+var_8C]

loc_6F6D56:
fld	[esp+0B0h+var_88]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_6F6D6F
fxch	st(1)
fst	[esp+0B0h+var_88]
fxch	st(1)

loc_6F6D6F:
fld	[esp+0B0h+var_84]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_6F6D82
fstp	[esp+0B0h+var_84]
jmp	short loc_6F6D84

loc_6F6D82:
fstp	st

loc_6F6D84:
mov	eax, [edi+3Ch]
mov	[esp+0B0h+var_78], ebx
mov	[esp+0B0h+var_38], eax
cmp	eax, ebx
jbe	loc_6F742C
jmp	short loc_6F6DA0
align 10h

loc_6F6DA0:
mov	ebx, [esp+0B0h+arg_0]
mov	eax, [ebx+38h]
mov	ecx, [esp+0B0h+var_78]
mov	ebp, [eax+ecx*4]
mov	edi, [esp+0B0h+arg_4]
mov	eax, [edi+1Ch]
lea	ecx, [eax+18h]
xor	eax, eax
mov	[esp+0B0h+var_70], eax
mov	[esp+0B0h+var_6C], eax
cmp	dword ptr [ebp+0Ch], 1
jnz	short loc_6F6E1D
mov	dl, [ecx+24h]
mov	eax, [ebp+10h]
test	dl, dl
jz	short loc_6F6E0C
mov	edx, [ecx+4]
cmp	eax, edx
jnb	short loc_6F6E0C
mov	ecx, [ecx+8]
lea	esi, [ecx+eax*8]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6F6DFD
call	sub_64A420
mov	ecx, [esp+0B0h+var_70]
test	ecx, ecx
jz	short loc_6F6DFD
call	sub_666B00

loc_6F6DFD:
mov	eax, [esi]
mov	[esp+0B0h+var_70], eax
mov	edx, [esi+4]
mov	[esp+0B0h+var_6C], edx
jmp	short loc_6F6E4B

loc_6F6E0C:
push	eax
lea	eax, [esp+0B4h+var_70]
push	eax
call	sub_714030
mov	eax, [esp+0B0h+var_70]
jmp	short loc_6F6E4B

loc_6F6E1D:
mov	[esp+0B0h+var_6C], ecx
cmp	[ebp+0Ch], eax
jnz	loc_6F6F5B
mov	esi, [ebp+10h]
cmp	esi, eax
jz	short loc_6F6E45
mov	ecx, esi
call	sub_64A420
mov	ecx, [esp+0B0h+var_70]
test	ecx, ecx
jz	short loc_6F6E45
call	sub_666B00

loc_6F6E45:
mov	eax, esi
mov	[esp+0B0h+var_70], eax

loc_6F6E4B:
mov	[esp+0B0h+var_60], eax
test	eax, eax
jz	loc_6F74E6
test	byte ptr [ebx+44h], 2
jnz	loc_6F6EF6
mov	ecx, [edi+1Ch]
mov	edx, [ecx+0Ch]
mov	eax, [edx+20h]
mov	edi, [eax+9Ch]
add	eax, 9Ch
test	edi, edi
jz	short loc_6F6EF6
lea	esp, [esp+0]

loc_6F6E80:
cmp	dword ptr [edi+4], 0
mov	[esp+0B0h+var_98], 0
jbe	short loc_6F6EEF
xor	ebx, ebx

loc_6F6E90:
mov	eax, [edi]
mov	ecx, [ebx+eax+8]
cmp	ecx, [ebp+10h]
jnz	short loc_6F6EDE
mov	ecx, [esp+0B0h+arg_4]
mov	edx, [ecx+0Ch]
mov	eax, [edx+0Ch]
add	ecx, 0Ch
push	4
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6F6EDE
mov	ecx, esi
call	sub_64A430
mov	ecx, [edi]
mov	edx, [ebx+ecx]
movzx	eax, word ptr [ebp+24h]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
push	eax
push	offset aWarningStaticT ; "Warning: static text uses imported font"...
add	esi, 0Ch
push	esi
call	sub_6AAFC0
add	esp, 10h

loc_6F6EDE:
mov	eax, [esp+0B0h+var_98]
inc	eax
add	ebx, 0Ch
mov	[esp+0B0h+var_98], eax
cmp	eax, [edi+4]
jb	short loc_6F6E90

loc_6F6EEF:
mov	edi, [edi+18h]
test	edi, edi
jnz	short loc_6F6E80

loc_6F6EF6:
mov	ecx, dword_1855FC0
mov	edi, [esp+0B0h+var_64]
lea	eax, [esp+0B0h+var_3C]
push	eax
mov	[esp+0B4h+var_3C], 146h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	24h
push	edi
call	edx
mov	esi, eax
xor	eax, eax
cmp	esi, eax
jz	short loc_6F6F62
lea	ecx, [esi+0Ch]
mov	dword ptr [esi], 1
mov	[esi+4], eax
mov	[esi+8], eax
call	sub_67AB70
fld1
mov	ebx, [esp+0B0h+var_60]
fstp	dword ptr [esi+10h]
mov	ecx, ebx
call	sub_64A420
fldz
mov	[esi+1Ch], ebx
mov	dword ptr [esi+20h], 0
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+14h]
mov	[esp+0B0h+var_94], esi
jmp	short loc_6F6F66

loc_6F6F5B:
xor	esi, esi
jmp	loc_6F6E45

loc_6F6F62:
mov	[esp+0B0h+var_94], eax

loc_6F6F66:
mov	ebx, [ebp+4]
mov	esi, [esp+0B0h+var_60]
mov	[esp+0B0h+var_5C], ebx
cmp	ebx, 0FFh
ja	short loc_6F6F93
mov	eax, [esi+0Ch]
mov	ecx, [eax+14h]
shr	ecx, 0Dh
test	cl, 1
jnz	short loc_6F6F93
mov	edx, [esp+0B0h+var_78]
push	0
push	2
push	ebx
push	edx
jmp	short loc_6F6F9D

loc_6F6F93:
mov	eax, [esp+0B0h+var_78]
push	1
push	2
push	ebx
push	eax

loc_6F6F9D:
lea	ecx, [edi+7Ch]
call	sub_735650
mov	edi, eax
mov	ecx, [edi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_6F6FC3
mov	edx, [edi+8]
xor	edx, [esp+0B0h+var_68]
and	edx, offset sub_FFFFFF
xor	[edi+8], edx
jmp	short loc_6F6FCA

loc_6F6FC3:
mov	eax, [esp+0B0h+var_68]
mov	[edi+8], eax

loc_6F6FCA:
mov	ecx, [esi+0Ch]
fld	dword ptr [ebp+18h]
mov	edx, [ecx+14h]
fstp	[esp+0B0h+var_80]
add	[esp+0B0h+var_68], ebx
fld	dword ptr [ebp+1Ch]
shr	edx, 0Dh
fstp	[esp+0B0h+var_7C]
test	dl, 1
jz	loc_6F70A2
fld	dword ptr [ebp+20h]
mov	eax, [edi]
fmul	ds:dbl_143B738
shr	eax, 1Fh
fld	[esp+0B0h+var_7C]
fsub	dword ptr [ebp+20h]
fstp	[esp+0B0h+var_7C]
fld	[esp+0B0h+var_90]
fchs
fadd	[esp+0B0h+var_80]
fstp	[esp+0B0h+var_80]
fld	[esp+0B0h+var_8C]
fchs
fadd	[esp+0B0h+var_7C]
fstp	[esp+0B0h+var_7C]
fld	dword ptr [ebp+20h]
fstp	[esp+0B0h+var_98]
fld	[esp+0B0h+var_98]
test	al, 1
jz	short loc_6F706A
fnstcw	word ptr [esp+0B0h+var_A0]
movzx	eax, word ptr [esp+0B0h+var_A0]
or	eax, 0C00h
mov	[esp+0B0h+var_9C], eax
fldcw	word ptr [esp+0B0h+var_9C]
fistp	[esp+0B0h+var_9C]
mov	cx, word ptr [esp+0B0h+var_9C]
mov	[edi+1Ah], cx
mov	eax, [esi+0Ch]
fldcw	word ptr [esp+0B0h+var_A0]
fmul	dword ptr [eax+0Ch]
fadd	dword ptr [ebp+20h]
fstp	[esp+0B0h+var_9C]
fldz
jmp	short loc_6F70C4

loc_6F706A:
fnstcw	word ptr [esp+0B0h+var_A0]
movzx	eax, word ptr [esp+0B0h+var_A0]
or	eax, 0C00h
mov	[esp+0B0h+var_9C], eax
fldcw	word ptr [esp+0B0h+var_9C]
fistp	[esp+0B0h+var_9C]
mov	dx, word ptr [esp+0B0h+var_9C]
mov	[edi+26h], dx
mov	eax, [esi+0Ch]
fldcw	word ptr [esp+0B0h+var_A0]
fmul	dword ptr [eax+0Ch]
fadd	dword ptr [ebp+20h]
fstp	[esp+0B0h+var_9C]
fldz
jmp	short loc_6F70C4

loc_6F70A2:
fld	[esp+0B0h+var_90]
fchs
fadd	[esp+0B0h+var_80]
fstp	[esp+0B0h+var_80]
fld	[esp+0B0h+var_8C]
fchs
fadd	[esp+0B0h+var_7C]
fstp	[esp+0B0h+var_7C]
fldz
fst	[esp+0B0h+var_9C]

loc_6F70C4:
fld	[esp+0B0h+var_7C]
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FCC48
test	ah, 41h
jnz	short loc_6F70DB
fadd	st(1), st
jmp	short loc_6F70DD

loc_6F70DB:
fsub	st(1), st

loc_6F70DD:
fxch	st(1)
call	__ftol2_sse
fld	[esp+0B0h+var_80]
fcom	st(2)
mov	esi, eax
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnz	short loc_6F70F9
faddp	st(1), st
jmp	short loc_6F70FB

loc_6F70F9:
fsubp	st(1), st

loc_6F70FB:
call	__ftol2_sse
mov	ecx, [edi]
mov	[edi+0Ch], eax
mov	[edi+10h], esi
mov	edx, [edi]
shr	edx, 1Fh
shr	ecx, 1Fh
test	dl, 1
jz	short loc_6F7125
xor	eax, eax
xor	ecx, ecx
mov	[edi+14h], ax
mov	[edi+16h], cx
xor	esi, esi
jmp	short loc_6F712D

loc_6F7125:
xor	esi, esi
mov	[edi+14h], esi
mov	[edi+18h], esi

loc_6F712D:
mov	edx, [edi]
shr	edx, 1Fh
test	dl, 1
jz	short loc_6F7140
lea	eax, [edi+1Eh]
mov	[esp+0B0h+var_58], eax
jmp	short loc_6F7147

loc_6F7140:
lea	ecx, [edi+2Ah]
mov	[esp+0B0h+var_58], ecx

loc_6F7147:
mov	ecx, edi
call	sub_733C80
mov	[esp+0B0h+var_C], esi
mov	[esp+0B0h+var_98], esi
mov	[esp+0B0h+var_A0], esi
cmp	ebx, esi
jbe	loc_6F7258
mov	esi, [esp+0B0h+var_58]
mov	ebx, eax
add	esi, 6
mov	edi, edi

loc_6F7170:
xor	edx, edx
mov	[esi], dx
mov	eax, 1000h
mov	[esi-2], ax
mov	ecx, [ebp+0]
mov	eax, [esp+0B0h+var_A0]
mov	dx, [ecx+eax*8]
mov	[esi-6], dx
mov	ecx, [ebp+0]
fld	dword ptr [ecx+eax*8+4]
call	__ftol2_sse
test	eax, eax
jl	short loc_6F71A8
xor	edx, edx
mov	[esi-4], ax
mov	[esi], dx
jmp	short loc_6F71B6

loc_6F71A8:
neg	eax
mov	[esi-4], ax
mov	eax, 40h
mov	[esi], ax

loc_6F71B6:
mov	ecx, [ebp+0]
mov	edx, [esp+0B0h+var_A0]
fld	dword ptr [ecx+edx*8+4]
call	__ftol2_sse
fld	dword ptr [ebp+20h]
fdiv	ds:dbl_15FCE20
add	[esp+0B0h+var_98], eax
push	ecx		; float
lea	ecx, [esi-6]
fstp	[esp+0B4h+var_74]
fld	[esp+0B4h+var_74]
fstp	[esp+0B4h+var_B4]
call	sub_6F5EB0
cmp	[esp+0B0h+var_A0], 0
jnz	short loc_6F7221
mov	eax, 4000h
or	[esi], ax
mov	eax, [esp+0B0h+var_94]
mov	ecx, 2000h
or	[esi], cx
mov	[ebx], eax
inc	dword ptr [eax]
mov	eax, [ebp+14h]
mov	edx, 4000h
or	[esi], dx
add	ebx, 4
mov	ecx, 1000h
or	[esi], cx
mov	[ebx], eax
add	ebx, 4

loc_6F7221:
mov	eax, 1
add	[esp+0B0h+var_A0], eax
cmp	[esp+0B0h+var_58], 0
jz	short loc_6F7248
mov	edx, [esp+0B0h+var_C]
cmp	edx, [esp+0B0h+var_5C]
jnb	short loc_6F7248
add	[esp+0B0h+var_C], eax
add	esi, 8

loc_6F7248:
mov	eax, [esp+0B0h+var_5C]
cmp	[esp+0B0h+var_A0], eax
jb	loc_6F7170
mov	ebx, eax

loc_6F7258:
mov	ecx, [esp+0B0h+var_60]
mov	edx, [ecx+0Ch]
mov	eax, [edx+14h]
shr	eax, 0Dh
test	al, 1
jz	loc_6F736F
fldz
fld	[esp+0B0h+var_9C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_6F7286
fadd	ds:dbl_15FCC48
jmp	short loc_6F728C

loc_6F7286:
fsub	ds:dbl_15FCC48

loc_6F728C:
call	__ftol2_sse
mov	ecx, [esp+0B0h+var_98]
xor	edx, edx
test	ecx, ecx
setl	dl
mov	esi, eax
mov	eax, [edi]
shr	eax, 1Fh
dec	edx
and	ecx, edx
test	al, 1
jz	short loc_6F72B4
mov	[edi+14h], cx
mov	[edi+16h], si
jmp	short loc_6F72BA

loc_6F72B4:
mov	[edi+14h], ecx
mov	[edi+18h], esi

loc_6F72BA:
mov	ecx, [edi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_6F72C9
mov	[edi+0Bh], bl
jmp	short loc_6F72CC

loc_6F72C9:
mov	[edi+20h], ebx

loc_6F72CC:
mov	eax, [edi]
mov	esi, [edi+10h]
shr	eax, 1Fh
and	al, 1
test	al, al
jz	short loc_6F72E0
movzx	edx, word ptr [edi+16h]
jmp	short loc_6F72E3

loc_6F72E0:
mov	edx, [edi+18h]

loc_6F72E3:
mov	ecx, [edi+0Ch]
test	al, al
jz	short loc_6F72F0
movzx	edi, word ptr [edi+14h]
jmp	short loc_6F72F3

loc_6F72F0:
mov	edi, [edi+14h]

loc_6F72F3:
add	edi, ecx
mov	[esp+0B0h+var_74], edi
fild	[esp+0B0h+var_74]
add	edx, esi
mov	[esp+0B0h+var_74], edx
fstp	[esp+0B0h+var_34]
fild	[esp+0B0h+var_74]
fstp	[esp+0B0h+var_30]
fld	[esp+0B0h+var_90]
fld	[esp+0B0h+var_34]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	short loc_6F7329
fst	[esp+0B0h+var_90]

loc_6F7329:
fld	[esp+0B0h+var_8C]
fld	[esp+0B0h+var_30]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jz	short loc_6F7343
fst	[esp+0B0h+var_8C]

loc_6F7343:
fld	[esp+0B0h+var_88]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jz	short loc_6F7358
fxch	st(1)
fstp	[esp+0B0h+var_88]
jmp	short loc_6F735A

loc_6F7358:
fstp	st(1)

loc_6F735A:
fld	[esp+0B0h+var_84]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_6F736D
fstp	[esp+0B0h+var_84]
jmp	short loc_6F736F

loc_6F736D:
fstp	st

loc_6F736F:
mov	eax, [esp+0B0h+var_94]
test	eax, eax
jz	loc_6F73FF
add	dword ptr [eax], 0FFFFFFFFh
jnz	short loc_6F73FF
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_6F7393
mov	edx, eax
push	edx
call	sub_6F4540
mov	eax, [esp+0B0h+var_94]

loc_6F7393:
mov	ecx, [eax+1Ch]
test	ecx, ecx
jz	short loc_6F73A3
call	sub_666B00
mov	eax, [esp+0B0h+var_94]

loc_6F73A3:
mov	dword ptr [eax+1Ch], 0
mov	ecx, [eax+20h]
test	ecx, ecx
jz	short loc_6F73BA
call	sub_666B00
mov	eax, [esp+0B0h+var_94]

loc_6F73BA:
mov	eax, [eax+1Ch]
test	eax, eax
jz	short loc_6F73C8
mov	ecx, eax
call	sub_666B00

loc_6F73C8:
mov	edi, [esp+0B0h+var_94]
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F73F1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F73F1:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6F73FF:
mov	ecx, [esp+0B0h+var_70]
test	ecx, ecx
jz	short loc_6F740C
call	sub_666B00

loc_6F740C:
mov	eax, [esp+0B0h+var_78]
inc	eax
mov	[esp+0B0h+var_78], eax
cmp	eax, [esp+0B0h+var_38]
jb	loc_6F6DA0
mov	edi, [esp+0B0h+arg_0]
mov	esi, [esp+0B0h+var_64]
xor	ebx, ebx

loc_6F742C:
fld	[esp+0B0h+var_90]
mov	al, 10h
fstp	dword ptr [esi+94h]
mov	edx, 1C2h
fld	[esp+0B0h+var_8C]
mov	ecx, 39h
fstp	dword ptr [esi+98h]
fld	[esp+0B0h+var_88]
fstp	dword ptr [esi+9Ch]
fld	[esp+0B0h+var_84]
fstp	dword ptr [esi+0A0h]
or	byte ptr [esi+0F0h], 4
mov	[esi+15Ah], al
mov	[esi+15Eh], al
mov	[esi+162h], dx
mov	eax, 50h
mov	[esi+164h], ax
mov	byte ptr [esi+158h], 0
mov	byte ptr [esi+159h], 0
mov	byte ptr [esi+15Bh], 80h
mov	byte ptr [esi+15Ch], 40h
mov	byte ptr [esi+15Dh], 40h
mov	byte ptr [esi+15Fh], 0FFh
mov	[esi+166h], cx
mov	edx, ecx
mov	[esi+168h], dx
mov	[esi+16Ch], ebx
mov	[esi+170h], ebx
mov	byte ptr [esi+160h], 0
or	byte ptr [edi+44h], 2
mov	eax, esi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn	10h

loc_6F74E6:
mov	edx, [edi+0Ch]
mov	eax, [edx+0Ch]
lea	ecx, [edi+0Ch]
push	4
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6F7516
mov	ecx, esi
call	sub_64A430
movzx	ecx, word ptr [ebp+24h]
push	ecx
push	offset aErrorTextStyle ; "Error: text style with undefined font; "...
add	esi, 0Ch
push	esi
call	sub_67E7F0
add	esp, 0Ch

loc_6F7516:
mov	ecx, [esp+0B0h+var_70]
test	ecx, ecx
jz	short loc_6F7523
call	sub_666B00

loc_6F7523:
mov	eax, [esp+0B0h+var_64]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A0h
retn	10h
sub_6F6C30 endp

align 10h



sub_6F7540 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6F7551
or	byte ptr [ecx+178h], 2
retn	8

loc_6F7551:
and	byte ptr [ecx+178h], 0FDh
retn	8
sub_6F7540 endp

align 10h



sub_6F7560 proc	near

arg_0= byte ptr	 4

sub	ecx, 0Ch
jmp	sub_6F8CC0
sub_6F7560 endp

align 10h



sub_6F7570 proc	near
add	ecx, 150h
jmp	loc_6CFE00
sub_6F7570 endp

align 10h



sub_6F7580 proc	near

var_24=	byte ptr -24h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebx
mov	ebx, ecx
push	esi
lea	ecx, [esp+2Ch+var_24]
call	sub_6CE4E0
xor	esi, esi
cmp	[esp+2Ch+arg_4], esi
jbe	short loc_6F75BF
push	edi
xor	edi, edi
jmp	short loc_6F75A0
align 10h

loc_6F75A0:
mov	eax, [esp+30h+arg_0]
lea	ecx, [edi+eax]
push	ecx
lea	ecx, [esp+34h+var_24]
call	sub_7064F0
inc	esi
add	edi, 9Ch
cmp	esi, [esp+30h+arg_4]
jb	short loc_6F75A0
pop	edi

loc_6F75BF:
mov	edx, [ebx]
mov	edx, [edx+0C4h]
lea	eax, [esp+2Ch+var_24]
push	eax
mov	ecx, ebx
call	edx
lea	ecx, [esp+2Ch+var_24]
call	sub_64A3F0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+2Ch+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
add	esp, 24h
retn	0Ch
sub_6F7580 endp

align 10h



sub_6F7600 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+6Ch]
mov	dword ptr [esi], offset	off_143ED90
call	sub_6FABB0
lea	ecx, [esi+44h]
call	sub_6FA020
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+28h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6F7636
call	sub_70E500

loc_6F7636:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6F7652
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F7652:
mov	eax, esi
pop	esi
retn	4
sub_6F7600 endp

align 10h



sub_6F7660 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
shr	eax, 1Fh
and	al, 1
push	esi
push	edi
jz	short loc_6F7671
movzx	edi, byte ptr [ecx+1Ch]
jmp	short loc_6F7674

loc_6F7671:
mov	edi, [ecx+4]

loc_6F7674:
lea	esi, [ecx+1Eh]
test	al, al
jnz	short loc_6F767E
lea	esi, [ecx+2Ah]

loc_6F767E:
call	sub_733C80
push	eax
push	edi
push	esi
mov	esi, [esp+14h+arg_0]
mov	ecx, esi
call	sub_6F6B80
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6F7660 endp

align 10h



sub_6F76A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
push	esi
mov	ebp, ecx
call	sub_6F6B20
xor	edi, edi
test	esi, esi
jle	short loc_6F7702
push	ebx
jmp	short loc_6F76C0
align 10h

loc_6F76C0:
mov	eax, [esp+14h+arg_8]
mov	esi, [ebp+0]
mov	ecx, [esp+14h+arg_0]
lea	ebx, ds:0[edi*8]
push	eax
add	esi, ebx
call	sub_6AA450
mov	ecx, [esp+14h+arg_C]
mov	[esi], eax
mov	esi, [ebp+0]
push	ecx
mov	ecx, [esp+18h+arg_0]
add	esi, ebx
call	sub_6AA550
mov	[esp+14h+var_4], eax
fild	[esp+14h+var_4]
inc	edi
cmp	edi, [esp+14h+arg_4]
fstp	dword ptr [esi+4]
jl	short loc_6F76C0
pop	ebx

loc_6F7702:
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	10h
sub_6F76A0 endp

align 10h



sub_6F7710 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+10h+var_4]
push	edx
mov	[esp+14h+var_4], 102h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	28h
push	esi
call	eax
mov	ebx, eax
xor	ebp, ebp
cmp	ebx, ebp
jz	short loc_6F7772
fldz
mov	[ebx], ebp
mov	[ebx+4], ebp
mov	[ebx+8], ebp
mov	[ebx+0Ch], ebp
mov	[ebx+10h], ebp
fst	dword ptr [ebx+1Ch]
fstp	dword ptr [ebx+18h]
xor	ecx, ecx
fld1
mov	[ebx+24h], cx
fstp	dword ptr [ebx+20h]
push	edi
mov	edi, [esi+4]
inc	edi
cmp	edi, [esi+4]
jnb	short loc_6F7779
mov	edx, [esi+8]
shr	edx, 1
cmp	edi, edx
jnb	short loc_6F778E
push	edi
jmp	short loc_6F7786

loc_6F7772:
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn

loc_6F7779:
cmp	edi, [esi+8]
jb	short loc_6F778E
mov	eax, edi
shr	eax, 2
add	eax, edi
push	eax

loc_6F7786:
push	esi
mov	ecx, esi
call	sub_6B8B50

loc_6F778E:
mov	ecx, [esi]
lea	eax, [ecx+edi*4-4]
mov	[esi+4], edi
pop	edi
cmp	eax, ebp
jz	short loc_6F779E
mov	[eax], ebx

loc_6F779E:
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
pop	ecx
retn
sub_6F7710 endp

align 10h


; Attributes: bp-based frame

sub_6F77B0 proc	near

var_A0=	qword ptr -0A0h
var_98=	qword ptr -98h
var_90=	qword ptr -90h
var_88=	qword ptr -88h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_37=	byte ptr -37h
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 74h
mov	eax, [ebp+arg_0]
push	ebx
push	esi
mov	esi, [eax+324h]
push	edi
xor	edi, edi
mov	[esp+80h+var_34], ecx
cmp	esi, edi
jnz	short loc_6F77D2
lea	esi, [eax+28h]

loc_6F77D2:
lea	ebx, [ecx+10h]
push	ebx
mov	ecx, esi
call	sub_6AABD0
mov	eax, [esp+80h+var_34]
fld	dword ptr [eax+1Ch]
sub	esp, 20h
fstp	[esp+0A0h+var_88]
fld	dword ptr [eax+18h]
fstp	[esp+0A0h+var_90]
fld	dword ptr [eax+14h]
fstp	[esp+0A0h+var_98]
fld	dword ptr [ebx]
fstp	[esp+0A0h+var_A0]
push	offset aTextrectLFTFRF ; "  TextRect = { l: %f,	t: %f, r: %f, b: "...
push	esi
call	nullsub_2
mov	eax, [esp+0A8h+var_34]
add	esp, 28h
add	eax, 20h
push	eax
mov	ecx, esi
call	sub_6AA8A0
push	offset aMat	; "  mat:\n"
push	esi
call	nullsub_2
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
add	esp, 8
cmp	ecx, 1
mov	byte ptr [esi+15h], 0
jge	short loc_6F783F
mov	ecx, esi
call	sub_6A9C60

loc_6F783F:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
mov	edx, [esi+30h]
inc	eax
movzx	ecx, cl
sub	edx, eax
cmp	edx, 1
mov	[esi+2Ch], eax
mov	[esp+80h+var_1C], ecx
mov	byte ptr [esi+15h], 0
jge	short loc_6F7868
mov	ecx, esi
call	sub_6A9C60

loc_6F7868:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	edx, cl
inc	eax
push	offset aBeginTextRecor ; "begin	text records\n"
push	esi
mov	[esi+2Ch], eax
mov	[esp+88h+var_20], edx
call	nullsub_2
add	esp, 8
fldz
mov	[esp+80h+var_39], 0
fst	[esp+80h+var_30]
mov	[esp+80h+var_28], edi
fst	[esp+80h+var_C]
mov	[esp+80h+var_18], edi
fstp	[esp+80h+var_10]
mov	[esp+80h+var_14], edi

loc_6F78A9:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6F78BF
mov	ecx, esi
call	sub_6A9C60

loc_6F78BF:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	ebx, cl
inc	eax
mov	[esi+2Ch], eax
cmp	ebx, edi
jz	loc_6F7C00
cmp	[esp+80h+var_39], 0
jnz	loc_6F7B58
mov	eax, ebx
sar	eax, 3
and	al, 1
mov	[esp+80h+var_38], al
mov	eax, ebx
sar	eax, 2
and	al, 1
mov	[esp+80h+var_37], al
mov	eax, ebx
sar	eax, 1
and	al, 1
push	offset aTextStyleChang ; "  text style change\n"
and	bl, 1
push	esi
mov	[esp+88h+var_39], 1
mov	[esp+88h+var_35], al
mov	[esp+88h+var_36], bl
call	nullsub_2
add	esp, 8
cmp	[esp+80h+var_38], 0
jz	loc_6F79E2
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F793F
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F793F:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	ebx, cx
push	ebx
movzx	edx, cx
add	eax, 2
push	offset aHasfontFontIdD ; "  HasFont: font id = %d\n"
push	esi
mov	[esi+2Ch], eax
mov	[esp+8Ch+var_28], edx
call	nullsub_2
add	esp, 8
mov	eax, esp
mov	[esp+84h+var_8], edi
mov	[esp+84h+var_4], edi
mov	[eax], ebx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
lea	edx, [esp+84h+var_8]
push	edx
call	sub_6AF4A0
mov	ecx, [esp+80h+var_4]
cmp	[esp+80h+var_8], edi
jnz	short loc_6F79B0
cmp	ecx, edi
jz	short loc_6F79B0
call	sub_64A420
mov	ecx, [esp+80h+var_4]

loc_6F79B0:
cmp	[esp+80h+var_18], edi
jnz	short loc_6F79C9
mov	eax, [esp+80h+var_14]
cmp	eax, edi
jz	short loc_6F79C9
mov	ecx, eax
call	sub_666B00
mov	ecx, [esp+80h+var_4]

loc_6F79C9:
mov	eax, [esp+80h+var_8]
mov	[esp+80h+var_18], eax
mov	[esp+80h+var_14], ecx
cmp	eax, edi
jnz	short loc_6F79E2
cmp	ecx, edi
jz	short loc_6F79E2
call	sub_666B00

loc_6F79E2:
cmp	[esp+80h+var_37], 0
jz	short loc_6F7A17
cmp	[ebp+arg_4], 0Bh
jnz	short loc_6F79FD
lea	eax, [esp+80h+var_2C]
push	eax
mov	ecx, esi
call	sub_6AAC90
jmp	short loc_6F7A09

loc_6F79FD:
lea	ecx, [esp+80h+var_2C]
push	ecx
mov	ecx, esi
call	sub_6AAD20

loc_6F7A09:		; "  HasColor\n"
push	offset aHascolor
push	esi
call	nullsub_2
add	esp, 8

loc_6F7A17:
cmp	[esp+80h+var_36], 0
jz	short loc_6F7A7F
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_6F7A36
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F7A36:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+80h+var_24], edx
sub	esp, 8
add	eax, 2
fild	[esp+88h+var_24]
mov	[esi+2Ch], eax
fstp	[esp+88h+var_10]
fld	[esp+88h+var_10]
fstp	[esp+88h+var_88]
push	offset aXoffsetG ; "  XOffset =	%g\n"
push	esi
call	nullsub_2
add	esp, 10h

loc_6F7A7F:
cmp	[esp+80h+var_35], 0
jz	short loc_6F7AE7
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F7A9E
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F7A9E:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+80h+var_24], edx
sub	esp, 8
add	eax, 2
fild	[esp+88h+var_24]
mov	[esi+2Ch], eax
fstp	[esp+88h+var_C]
fld	[esp+88h+var_C]
fstp	[esp+88h+var_88]
push	offset aYoffsetG ; "  YOffset =	%g\n"
push	esi
call	nullsub_2
add	esp, 10h

loc_6F7AE7:
cmp	[esp+80h+var_38], 0
jz	loc_6F78A9
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F7B0A
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F7B0A:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	[esp+80h+var_24], edx
sub	esp, 8
add	eax, 2
fild	[esp+88h+var_24]
mov	[esi+2Ch], eax
fstp	[esp+88h+var_30]
fld	[esp+88h+var_30]
fstp	[esp+88h+var_88]
push	offset aTextheightG ; "	 TextHeight = %g\n"
push	esi
call	nullsub_2
add	esp, 10h
jmp	loc_6F78A9

loc_6F7B58:
mov	ecx, [esp+80h+var_34]
add	ecx, 38h
mov	[esp+80h+var_39], 0
call	sub_6F7710
mov	edi, eax
test	edi, edi
jz	short loc_6F7BEA
cmp	[esp+80h+var_18], 0
fld	[esp+80h+var_10]
fstp	dword ptr [edi+18h]
fld	[esp+80h+var_C]
fstp	dword ptr [edi+1Ch]
jnz	short loc_6F7B91
mov	ecx, [esp+80h+var_14]
test	ecx, ecx
jz	short loc_6F7B91
call	sub_64A420

loc_6F7B91:
cmp	dword ptr [edi+0Ch], 0
jnz	short loc_6F7BA3
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_6F7BA3
call	sub_666B00

loc_6F7BA3:
mov	eax, [esp+80h+var_18]
fld	[esp+80h+var_30]
mov	ecx, [esp+80h+var_14]
mov	[edi+10h], ecx
mov	ecx, [esp+80h+var_20]
mov	[edi+0Ch], eax
fstp	dword ptr [edi+20h]
mov	edx, [esp+80h+var_2C]
mov	ax, word ptr [esp+80h+var_28]
push	ecx
mov	[edi+14h], edx
mov	edx, [esp+84h+var_1C]
push	edx
push	ebx
push	esi
mov	ecx, edi
mov	[edi+24h], ax
call	sub_6F76A0
mov	ecx, edi
call	sub_6F6250
fadd	[esp+80h+var_10]
fstp	[esp+80h+var_10]

loc_6F7BEA:
push	ebx
push	offset aGlyphrecordsCo ; "  GlyphRecords: count	= %d\n"
push	esi
call	nullsub_2
add	esp, 0Ch
xor	edi, edi
jmp	loc_6F78A9

loc_6F7C00:		; "end text records\n"
push	offset aEndTextRecords
push	esi
call	nullsub_2
add	esp, 8
cmp	[esp+80h+var_18], edi
jnz	short loc_6F7C21
mov	ecx, [esp+80h+var_14]
cmp	ecx, edi
jz	short loc_6F7C21
call	sub_666B00

loc_6F7C21:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6F77B0 endp

align 10h



sub_6F7C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	edx, [esp+0Ch+var_4]
mov	esi, ecx
mov	ecx, dword_1855FC0
push	edx
mov	[esp+10h+var_4], 142h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	17Ch
push	edi
call	eax
test	eax, eax
jz	short loc_6F7C7A
mov	edx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	ecx, [esp+10h+arg_8]
push	edi
push	ecx
push	esi
mov	ecx, eax
call	sub_6F6C30
pop	edi
pop	esi
pop	ecx
retn	0Ch

loc_6F7C7A:
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn	0Ch
sub_6F7C30 endp

align 10h



sub_6F7C90 proc	near
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+1Ch]
lea	ecx, [esi+6Ch]
mov	dword ptr [esi], offset	off_143ED90
call	sub_6FABB0
lea	ecx, [esi+44h]
call	sub_6FA020
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+28h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6F7CCA
call	sub_70E500

loc_6F7CCA:
mov	ecx, esi
call	sub_64A3F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
retn
sub_6F7C90 endp

align 10h



sub_6F7CF0 proc	near

var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0F8h
push	ebx
push	esi
mov	esi, [esp+100h+arg_0]
xor	ebx, ebx
mov	[esp+100h+var_D8], ecx
cmp	esi, ebx
jz	loc_6F8272
mov	edx, [ecx+4]
xor	eax, eax
mov	[esp+100h+var_E4], ebx
mov	[esp+100h+var_DC], eax
mov	[esp+100h+var_A0], edx
cmp	edx, ebx
jbe	loc_6F8272
push	ebp
push	edi
jmp	short loc_6F7D34
align 10h

loc_6F7D30:
mov	ecx, [esp+108h+var_D8]

loc_6F7D34:
mov	ecx, [ecx]
fldz
mov	eax, [ecx+eax*8]
fldz
fstp	[esp+108h+var_E8]
lea	ecx, [eax+44h]
fld	dword ptr [ecx+4]
add	eax, 7Ch
fmul	st, st(1)
mov	[esp+108h+var_A8], ecx
fld	dword ptr [ecx]
mov	[esp+108h+var_9C], eax
fmul	st, st(2)
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	[esp+108h+var_AC]
fld	dword ptr [ecx+10h]
fmul	st, st(1)
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
faddp	st(1), st
fadd	dword ptr [ecx+14h]
xor	ecx, ecx
mov	[esp+108h+var_94], ecx
fstp	[esp+108h+var_88]
jmp	short loc_6F7D84
align 10h

loc_6F7D80:
mov	ecx, [esp+108h+var_94]

loc_6F7D84:
cmp	eax, ebx
jz	loc_6F825D
cmp	ecx, [eax+4]
jnb	loc_6F825D
cmp	ecx, ebx
jl	loc_6F825D
mov	edx, [eax]
mov	ecx, [edx+ecx*4]
mov	eax, [ecx+0Ch]
mov	edx, [ecx]
mov	[esp+108h+var_F8], eax
fild	[esp+108h+var_F8]
shr	edx, 1Fh
and	dl, 1
mov	[esp+108h+var_E0], ebx
fstp	[esp+108h+var_F0]
fld	[esp+108h+var_F0]
fld	[esp+108h+var_E8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6F7DD4
fstp	[esp+108h+var_E8]
jmp	short loc_6F7DD6

loc_6F7DD4:
fstp	st

loc_6F7DD6:
mov	edi, [ecx+10h]
cmp	dl, bl
jz	short loc_6F7DE3
movsx	eax, byte ptr [ecx+1Dh]
jmp	short loc_6F7DE7

loc_6F7DE3:
movsx	eax, word ptr [ecx+28h]

loc_6F7DE7:
add	eax, edi
mov	[esp+108h+var_F0], eax
fild	[esp+108h+var_F0]
fstp	[esp+108h+var_A4]
cmp	dl, bl
jz	short loc_6F7DFF
movzx	ebp, byte ptr [ecx+1Ch]
jmp	short loc_6F7E02

loc_6F7DFF:
mov	ebp, [ecx+4]

loc_6F7E02:
lea	edi, [ecx+1Eh]
cmp	dl, bl
jnz	short loc_6F7E0C
lea	edi, [ecx+2Ah]

loc_6F7E0C:
call	sub_733C80
or	ecx, 0FFFFFFFFh
mov	[esp+108h+var_6C], ecx
mov	[esp+108h+var_64], ecx
lea	ecx, [edi+ebp*8]
mov	[esp+108h+var_80], ecx
lea	ecx, [esp+108h+var_84]
mov	[esp+108h+var_68], ebx
mov	[esp+108h+var_60], ebx
mov	[esp+108h+var_5C], ebx
mov	[esp+108h+var_58], ebx
mov	[esp+108h+var_4C], ebx
mov	[esp+108h+var_50], ebx
mov	[esp+108h+var_54], ebx
mov	[esp+108h+var_48], bl
mov	[esp+108h+var_70], ebx
mov	[esp+108h+var_74], ebx
mov	[esp+108h+var_44], ebx
mov	[esp+108h+var_40], ebx
mov	[esp+108h+var_3C], ebx
mov	[esp+108h+var_38], ebx
mov	[esp+108h+var_34], ebx
mov	[esp+108h+var_30], ebx
mov	[esp+108h+var_2C], ebx
mov	[esp+108h+var_84], edi
mov	[esp+108h+var_7C], eax
call	sub_735210
mov	eax, [esp+108h+var_38]
cmp	eax, ebx
jz	short loc_6F7ECD
mov	ebp, [eax+1Ch]
jmp	short loc_6F7ECF

loc_6F7ECD:
xor	ebp, ebp

loc_6F7ECF:
mov	edx, [ebp+0Ch]
mov	eax, [esp+108h+var_44]
mov	[esi+30h], edx
mov	[esp+108h+var_F0], ebp
mov	[esi+3Ch], eax

loc_6F7EE3:
mov	eax, [esp+108h+var_84]
lea	ebx, [ebx+0]

loc_6F7EF0:
cmp	eax, ebx
jz	loc_6F81B9
cmp	eax, [esp+108h+var_80]
jnb	loc_6F81B9
mov	ecx, [esp+108h+var_E4]
mov	edi, eax
cmp	ecx, [esp+108h+arg_4]
jb	loc_6F810B
cmp	ecx, [esp+108h+arg_8]
jnb	loc_6F810B
mov	ecx, [esp+108h+var_E0]
mov	[esi+34h], ecx
movzx	ecx, word ptr [eax+4]
and	ecx, 0FFFh
test	byte ptr [eax+6], 10h
jnz	short loc_6F7F50
mov	[esp+108h+var_F4], ecx
fild	[esp+108h+var_F4]
test	ecx, ecx
jge	short loc_6F7F68
fadd	ds:flt_15FCC08
jmp	short loc_6F7F68

loc_6F7F50:
mov	[esp+108h+var_F4], ecx
fild	[esp+108h+var_F4]
test	ecx, ecx
jge	short loc_6F7F62
fadd	ds:flt_15FCC08

loc_6F7F62:
fmul	ds:dbl_15FD690

loc_6F7F68:
fstp	[esp+108h+var_F8]
lea	ecx, [esp+108h+var_C4]
fld	[esp+108h+var_F8]
fstp	dword ptr [esi+38h]
call	sub_64E8E0
mov	ecx, [esp+108h+var_A8]
call	sub_64EAE0
fstp	[esp+108h+var_F8]
fld	[esp+108h+var_F8]
call	__CIcos
fstp	[esp+108h+var_EC]
fld	[esp+108h+var_EC]
fstp	[esp+108h+var_F4]
fld	[esp+108h+var_F8]
call	__CIsin
fstp	[esp+108h+var_EC]
fld	[esp+108h+var_EC]
lea	edx, [esp+108h+var_18]
fstp	[esp+108h+var_EC]
push	edx
fld	[esp+10Ch+var_F4]
lea	ecx, [esp+10Ch+var_C4]
fst	[esp+10Ch+var_18]
fld	[esp+10Ch+var_EC]
fld	st
fchs
fstp	[esp+10Ch+var_14]
fldz
fst	[esp+10Ch+var_10]
fstp	[esp+10Ch+var_4]
fstp	[esp+10Ch+var_C]
fstp	[esp+10Ch+var_8]
call	sub_64EBB0
fld	[esp+108h+var_AC]
mov	ecx, 0FFFFh
fadd	[esp+108h+var_E8]
fstp	[esp+108h+var_F4]
fld	[esp+108h+var_F4]
fadd	[esp+108h+var_BC]
fstp	[esp+108h+var_BC]
fld	[esp+108h+var_88]
fadd	[esp+108h+var_A4]
fstp	[esp+108h+var_F4]
fld	[esp+108h+var_F4]
fadd	[esp+108h+var_B0]
fstp	[esp+108h+var_B0]
fld	[esp+108h+var_C4]
fstp	dword ptr [esi+4]
fld	[esp+108h+var_C0]
fstp	dword ptr [esi+8]
fld	[esp+108h+var_BC]
fstp	dword ptr [esi+0Ch]
fld	[esp+108h+var_B8]
fstp	dword ptr [esi+10h]
fld	[esp+108h+var_B4]
fstp	dword ptr [esi+14h]
fld	[esp+108h+var_B0]
fstp	dword ptr [esi+18h]
movzx	eax, word ptr [edi]
fldz
fst	[esp+108h+var_28]
fst	[esp+108h+var_24]
fst	[esp+108h+var_20]
fstp	[esp+108h+var_1C]
cmp	ax, cx
jnb	short loc_6F8089
movzx	eax, ax
jmp	short loc_6F808C

loc_6F8089:
or	eax, 0FFFFFFFFh

loc_6F808C:
mov	ecx, [ebp+0Ch]
mov	edx, [ecx]
lea	ebp, [esp+108h+var_28]
push	ebp
push	eax
mov	eax, [edx+30h]
call	eax
fldz
mov	ecx, ebp
fst	[esp+108h+var_D4]
push	ecx
fst	[esp+10Ch+var_D0]
lea	edx, [esp+10Ch+var_D4]
fst	[esp+10Ch+var_CC]
push	edx
fstp	[esp+110h+var_C8]
lea	ecx, [esp+110h+var_C4]
call	sub_64EF10
fld	[esp+108h+var_D4]
mov	eax, [esp+108h+var_E4]
fstp	dword ptr [esi+1Ch]
fld	[esp+108h+var_D0]
lea	ecx, [eax+1]
fstp	dword ptr [esi+20h]
push	ecx
fld	[esp+10Ch+var_CC]
mov	ecx, [esp+10Ch+var_D8]
fstp	dword ptr [esi+24h]
push	eax
fld	[esp+110h+var_C8]
fstp	dword ptr [esi+28h]
call	sub_6F6520
mov	edx, [esi]
mov	[esi+40h], al
mov	eax, [edx+4]
mov	ecx, esi
call	eax
inc	[esp+108h+var_E0]
mov	eax, [esp+108h+var_84]
mov	ebp, [esp+108h+var_F0]

loc_6F810B:
mov	cl, [edi+6]
shr	cl, 6
test	cl, 1
jnz	short loc_6F8120
movzx	edx, word ptr [edi+2]
mov	[esp+108h+var_F8], edx
jmp	short loc_6F812A

loc_6F8120:
movzx	ecx, word ptr [edi+2]
neg	ecx
mov	[esp+108h+var_F8], ecx

loc_6F812A:
fild	[esp+108h+var_F8]
inc	[esp+108h+var_E4]
fadd	[esp+108h+var_E8]
fstp	[esp+108h+var_E8]
cmp	eax, ebx
jz	short loc_6F81B9
cmp	eax, [esp+108h+var_80]
jnb	loc_6F7EF0
mov	ecx, [esp+108h+var_2C]
cmp	ecx, ebx
jnz	short loc_6F8164
movzx	ecx, word ptr [eax+4]
shr	ecx, 0Ch
mov	[esp+108h+var_2C], ecx

loc_6F8164:
add	eax, 8
mov	edx, 0F000h
mov	[esp+108h+var_84], eax
test	[eax+4], dx
jbe	short loc_6F81A8
cmp	ecx, ebx
jbe	short loc_6F81A8
lea	ecx, [esp+108h+var_78]
call	sub_73ED30
test	al, al
jnz	short loc_6F81A8
mov	eax, [esp+108h+var_2C]
push	eax
lea	ecx, [esp+10Ch+var_78]
call	sub_73F2D0
mov	[esp+108h+var_2C], ebx

loc_6F81A8:
lea	ecx, [esp+108h+var_84]
call	sub_735210
jmp	loc_6F7EE3

loc_6F81B9:
mov	ecx, [esp+108h+var_34]
cmp	ecx, ebx
jz	short loc_6F81C9
call	sub_64A400

loc_6F81C9:
mov	edi, [esp+108h+var_38]
cmp	edi, ebx
jz	short loc_6F8241
dec	dword ptr [edi]
cmp	[edi], ebx
jnz	short loc_6F8241
mov	ecx, [edi+4]
cmp	ecx, ebx
jz	short loc_6F81E7
push	edi
call	sub_6F4540

loc_6F81E7:
mov	ecx, [edi+1Ch]
cmp	ecx, ebx
jz	short loc_6F81F3
call	sub_666B00

loc_6F81F3:
mov	[edi+1Ch], ebx
mov	ecx, [edi+20h]
cmp	ecx, ebx
jz	short loc_6F8202
call	sub_666B00

loc_6F8202:
mov	ecx, [edi+1Ch]
cmp	ecx, ebx
jz	short loc_6F820E
call	sub_666B00

loc_6F820E:
mov	ebp, [edi+0Ch]
and	ebp, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [ebp+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6F8233
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax

loc_6F8233:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6F8241:
mov	edx, [esp+108h+var_9C]
mov	ecx, [esp+108h+var_94]
mov	eax, edx
cmp	ecx, [edx+4]
jnb	loc_6F7D80
inc	[esp+108h+var_94]
jmp	loc_6F7D80

loc_6F825D:
mov	eax, [esp+108h+var_DC]
inc	eax
mov	[esp+108h+var_DC], eax
cmp	eax, [esp+108h+var_A0]
jb	loc_6F7D30
pop	edi
pop	ebp

loc_6F8272:
pop	esi
pop	ebx
add	esp, 0F8h
retn	0Ch
sub_6F7CF0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_6F8280(float, float, float)
sub_6F8280 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0ACh
fld	ds:flt_1437488
push	ebx
fstp	[esp+0B0h+var_A8]
push	esi
fldz
push	edi
fst	[esp+0B8h+var_A0]
xor	edi, edi
fstp	[esp+0B8h+var_A4]
mov	ebx, ecx
fld	[ebp+arg_0]
mov	[esp+0B8h+var_9C], edi
fstp	[esp+0B8h+var_7C]
mov	[esp+0B8h+var_98], edi
fld	[ebp+arg_4]
mov	[esp+0B8h+var_94], edi
fstp	[esp+0B8h+var_78]
cmp	[ebx+4], edi
jbe	loc_6F85A4
lea	ebx, [ebx+0]

loc_6F82D0:
mov	eax, [ebx]
mov	esi, [eax+edi*8]
lea	ecx, [esp+0B8h+var_7C]
push	ecx
lea	edx, [esp+0BCh+var_88]
push	edx
lea	ecx, [esi+44h]
call	sub_64EC70
fld	[esp+0B8h+var_88]
fld	dword ptr [esi+9Ch]
lea	ecx, [esi+94h]
fcomp	st(1)
fnstsw	ax
fld	[esp+0B8h+var_84]
test	ah, 1
jnz	short loc_6F832B
fld	dword ptr [ecx]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jp	short loc_6F832B
fld	dword ptr [ecx+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_6F832B
fld	dword ptr [ecx+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_6F83DE

loc_6F832B:
lea	eax, [esp+0B8h+var_88]
fstp	st(1)
push	eax
fstp	st
push	ecx
lea	ecx, [esp+0C0h+var_90]
push	ecx
call	sub_6F6880
fld	[esp+0C4h+var_90]
fsub	[esp+0C4h+var_88]
add	esp, 0Ch
fstp	[esp+0B8h+var_AC]
fld	[esp+0B8h+var_8C]
fsub	[esp+0B8h+var_84]
fstp	[esp+0B8h+var_80]
fld	[esp+0B8h+var_80]
fld	[esp+0B8h+var_AC]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0B8h+var_AC]
fld	[esp+0B8h+var_AC]
call	__CIsqrt
fstp	[esp+0B8h+var_AC]
fld	[esp+0B8h+var_AC]
fstp	[esp+0B8h+var_AC]
fld	[esp+0B8h+var_AC]
fld	[ebp+arg_8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6F83C2
fld	[esp+0B8h+var_A8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_6F83C2
mov	edx, [esp+0B8h+var_98]
fstp	[esp+0B8h+var_A8]
fld	[esp+0B8h+var_90]
mov	[esp+0B8h+var_9C], esi
fstp	[esp+0B8h+var_A0]
mov	[esp+0B8h+var_94], edx
fld	[esp+0B8h+var_8C]
fstp	[esp+0B8h+var_A4]
jmp	short loc_6F83C8

loc_6F83C2:
mov	esi, [esp+0B8h+var_9C]
fstp	st

loc_6F83C8:
mov	eax, [ebx]
mov	ecx, [eax+edi*8+4]
add	[esp+0B8h+var_98], ecx
inc	edi
cmp	edi, [ebx+4]
jb	loc_6F82D0
jmp	short loc_6F83F4

loc_6F83DE:
mov	edx, [esp+0B8h+var_98]
fxch	st(1)
fstp	[esp+0B8h+var_A0]
mov	[esp+0B8h+var_9C], esi
mov	[esp+0B8h+var_94], edx
fstp	[esp+0B8h+var_A4]

loc_6F83F4:
test	esi, esi
jz	loc_6F85A4
fld	[esp+0B8h+var_A0]
lea	eax, [esp+0B8h+var_90]
fsub	dword ptr [esi+94h]
push	eax
lea	ecx, [esp+0BCh+var_74]
push	ecx
fstp	[esp+0C0h+var_A0]
lea	ecx, [esi+7Ch]
fld	[esp+0C0h+var_A0]
fstp	[esp+0C0h+var_90]
fld	[esp+0C0h+var_A4]
fsub	dword ptr [esi+98h]
fstp	[esp+0C0h+var_8C]
call	sub_734DE0
mov	ecx, [esp+0B8h+var_74]
test	ecx, ecx
jz	loc_6F85A4
mov	eax, [esp+0B8h+var_6C]
cmp	eax, [ecx+4]
jnb	loc_6F85A4
test	eax, eax
jl	loc_6F85A4
mov	edx, [ecx]
mov	esi, [edx+eax*4]
mov	ecx, [esi]
shr	ecx, 1Fh
and	cl, 1
jz	short loc_6F846B
mov	eax, [esi+0Ch]
mov	[esp+0B8h+var_A8], eax
jmp	short loc_6F8472

loc_6F846B:
mov	edx, [esi+0Ch]
mov	[esp+0B8h+var_A8], edx

loc_6F8472:
fild	[esp+0B8h+var_A8]
fstp	[esp+0B8h+var_AC]
fld	[esp+0B8h+var_A0]
fld	[esp+0B8h+var_AC]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_6F85A0
test	cl, cl
jz	short loc_6F849D
movzx	eax, word ptr [esi+14h]
mov	[esp+0B8h+var_A8], eax
jmp	short loc_6F84A4

loc_6F849D:
mov	edx, [esi+14h]
mov	[esp+0B8h+var_A8], edx

loc_6F84A4:
fild	[esp+0B8h+var_A8]
fadd	st, st(1)
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_6F85A0
fsubp	st(1), st
mov	[esp+0B8h+var_A4], 0
fstp	[esp+0B8h+var_AC]
test	cl, cl
jz	short loc_6F84CF
movzx	ebx, byte ptr [esi+1Ch]
jmp	short loc_6F84D2

loc_6F84CF:
mov	ebx, [esi+4]

loc_6F84D2:
lea	edi, [esi+1Eh]
test	cl, cl
jnz	short loc_6F84DC
lea	edi, [esi+2Ah]

loc_6F84DC:
mov	ecx, esi
call	sub_733C80
push	eax
push	ebx
push	edi
lea	ecx, [esp+0C4h+var_60]
call	sub_6F6B80
xor	edi, edi

loc_6F84F1:
mov	ecx, [esp+0B8h+var_60]
test	ecx, ecx
jz	short loc_6F8538
cmp	ecx, [esp+0B8h+var_5C]
jnb	short loc_6F8538
mov	al, [ecx+6]
shr	al, 6
test	al, 1
movzx	eax, word ptr [ecx+2]
jz	short loc_6F850F
neg	eax

loc_6F850F:
add	[esp+0B8h+var_A4], eax
fild	[esp+0B8h+var_A4]
fld	[esp+0B8h+var_AC]
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_6F8538
movzx	ecx, word ptr [ecx+4]
shr	ecx, 0Ch
add	edi, ecx
lea	ecx, [esp+0B8h+var_60]
call	sub_6F5F90
jmp	short loc_6F84F1

loc_6F8538:
mov	edx, [esi]
mov	esi, [esi+8]
shr	edx, 1Fh
test	dl, 1
jz	short loc_6F8556
and	esi, offset sub_FFFFFF
cmp	esi, offset sub_FFFFFF
jnz	short loc_6F8556
or	esi, 0FFFFFFFFh

loc_6F8556:
mov	ecx, [esp+0B8h+var_10]
add	esi, edi
add	esi, [esp+0B8h+var_94]
test	ecx, ecx
jz	short loc_6F856C
call	sub_64A400

loc_6F856C:
mov	eax, [esp+0B8h+var_14]
test	eax, eax
jz	short loc_6F8595
dec	dword ptr [eax]
mov	edi, eax
cmp	dword ptr [edi], 0
jnz	short loc_6F8595
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6F8595:
mov	eax, esi
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_6F85A0:
fstp	st
fstp	st

loc_6F85A4:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_6F8280 endp




sub_6F85B0 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ebp, [edi+4]
xor	esi, esi
xor	ebx, ebx
cmp	ebp, esi
jbe	short loc_6F8608

loc_6F85C1:
mov	eax, [edi]
cmp	[eax+ebx*4], esi
lea	eax, [eax+ebx*4]
jz	short loc_6F8601
mov	esi, [eax]
test	esi, esi
jz	short loc_6F8601
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_6F85E3
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6F85E3
call	sub_666B00

loc_6F85E3:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F8601:
inc	ebx
xor	esi, esi
cmp	ebx, ebp
jb	short loc_6F85C1

loc_6F8608:
cmp	[edi+4], esi
jbe	short loc_6F8637
test	dword ptr [edi+8], 0FFFFFFFEh
jbe	short loc_6F8645
mov	eax, [edi]
cmp	eax, esi
jz	short loc_6F862C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[edi], esi

loc_6F862C:
mov	[edi+8], esi
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_6F8637:
cmp	[edi+8], esi
ja	short loc_6F8645
push	esi
push	edi
mov	ecx, edi
call	sub_6B8B50

loc_6F8645:
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_6F85B0 endp

align 10h



sub_6F8650 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+174h], 0
jnz	short loc_6F86AD
mov	eax, [esi]
mov	edx, [eax+54h]
push	edi
call	edx
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+0F4h]
call	eax
mov	edx, [eax]
push	0
mov	ecx, eax
mov	eax, [edx+28h]
push	0A4h
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_6F86A0
mov	ecx, edi
call	sub_73F3D0
lea	ecx, [edi+1Ch]
call	sub_6F91A0
mov	[esi+174h], edi
mov	eax, edi
pop	edi
pop	esi
retn

loc_6F86A0:
xor	edi, edi
mov	[esi+174h], edi
mov	eax, edi
pop	edi
pop	esi
retn

loc_6F86AD:
mov	eax, [esi+174h]
pop	esi
retn
sub_6F8650 endp

align 10h



sub_6F86C0 proc	near

var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 88h
mov	edx, [esp+88h+arg_0]
push	ebx
push	ebp
xor	ebx, ebx
mov	ebp, ecx
mov	[esp+90h+var_7C], ebp
cmp	edx, ebx
jz	short loc_6F86DE
inc	dword ptr [edx+4]

loc_6F86DE:
fldz
push	esi
xor	ecx, ecx
fstp	[esp+94h+var_84]
push	edi
mov	[esp+98h+var_74], ebx
mov	[esp+98h+var_85], 1
mov	[esp+98h+var_C], ecx
jmp	short loc_6F8710
align 10h

loc_6F8700:
mov	ecx, [esp+98h+var_C]
jmp	short loc_6F8710
align 10h

loc_6F8710:
lea	eax, [edx+7Ch]
cmp	eax, ebx
jz	loc_6F8950
cmp	ecx, [eax+4]
jnb	loc_6F8950
cmp	ecx, ebx
jl	loc_6F8950
mov	eax, [eax]
mov	esi, [eax+ecx*4]
mov	ecx, [esi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_6F8744
mov	edx, [esi+0Ch]
mov	[esp+98h+var_80], edx
jmp	short loc_6F874B

loc_6F8744:
mov	eax, [esi+0Ch]
mov	[esp+98h+var_80], eax

loc_6F874B:
fild	[esp+98h+var_80]
fstp	[esp+98h+var_80]
cmp	[esp+98h+var_85], bl
jnz	short loc_6F8776
fld	[esp+98h+var_80]
fld	[esp+98h+var_84]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6F877E
push	0Ah
lea	ecx, [ebp+0Ch]
call	sub_679F30
jmp	short loc_6F877E

loc_6F8776:
fld	[esp+98h+var_80]
fstp	[esp+98h+var_84]

loc_6F877E:
mov	eax, [esi]
shr	eax, 1Fh
and	al, 1
jz	short loc_6F878D
movzx	ebp, byte ptr [esi+1Ch]
jmp	short loc_6F8790

loc_6F878D:
mov	ebp, [esi+4]

loc_6F8790:
lea	edi, [esi+1Eh]
cmp	al, bl
jnz	short loc_6F879A
lea	edi, [esi+2Ah]

loc_6F879A:
mov	ecx, esi
call	sub_733C80
lea	ecx, [edi+ebp*8]
or	esi, 0FFFFFFFFh
mov	[esp+98h+var_6C], ecx
lea	ecx, [esp+98h+var_70]
mov	[esp+98h+var_58], esi
mov	[esp+98h+var_54], ebx
mov	[esp+98h+var_50], esi
mov	[esp+98h+var_4C], ebx
mov	[esp+98h+var_48], ebx
mov	[esp+98h+var_44], ebx
mov	[esp+98h+var_38], ebx
mov	[esp+98h+var_3C], ebx
mov	[esp+98h+var_40], ebx
mov	[esp+98h+var_34], bl
mov	[esp+98h+var_5C], ebx
mov	[esp+98h+var_60], ebx
mov	[esp+98h+var_30], ebx
mov	[esp+98h+var_2C], ebx
mov	[esp+98h+var_28], ebx
mov	[esp+98h+var_24], ebx
mov	[esp+98h+var_20], ebx
mov	[esp+98h+var_1C], ebx
mov	[esp+98h+var_18], ebx
mov	[esp+98h+var_70], edi
mov	[esp+98h+var_68], eax
call	sub_735210
mov	eax, [esp+98h+var_24]
cmp	eax, ebx
jz	short loc_6F8818
mov	ecx, [eax+1Ch]
jmp	short loc_6F881A

loc_6F8818:
xor	ecx, ecx

loc_6F881A:
mov	edi, [ecx+0Ch]
cmp	edi, ebx
jnz	short loc_6F8832
mov	ecx, [esp+98h+var_20]
cmp	ecx, ebx
jz	loc_6F88FE
jmp	loc_6F88F5

loc_6F8832:
mov	eax, [esp+98h+var_70]

loc_6F8836:
cmp	eax, ebx
jz	loc_6F88E9
cmp	eax, [esp+98h+var_6C]
jnb	loc_6F88E9
movzx	eax, word ptr [eax]
mov	ecx, 0FFFFh
cmp	ax, cx
movzx	eax, ax
jb	short loc_6F885A
mov	eax, esi

loc_6F885A:
mov	edx, [edi]
push	eax
mov	eax, [edx+34h]
mov	ecx, edi
call	eax
cmp	eax, esi
jz	short loc_6F8879
mov	ecx, [esp+98h+var_7C]
inc	[esp+98h+var_74]
push	eax
add	ecx, 0Ch
call	sub_679F30

loc_6F8879:
mov	eax, [esp+98h+var_70]
cmp	eax, ebx
jz	short loc_6F88E9
cmp	eax, [esp+98h+var_6C]
jnb	short loc_6F8836
mov	ecx, [esp+98h+var_18]
cmp	ecx, ebx
jnz	short loc_6F88A0
movzx	ecx, word ptr [eax+4]
shr	ecx, 0Ch
mov	[esp+98h+var_18], ecx

loc_6F88A0:
add	eax, 8
mov	edx, 0F000h
mov	[esp+98h+var_70], eax
test	[eax+4], dx
jbe	short loc_6F88DB
cmp	ecx, ebx
jbe	short loc_6F88DB
lea	ecx, [esp+98h+var_64]
call	sub_73ED30
test	al, al
jnz	short loc_6F88DB
mov	eax, [esp+98h+var_18]
push	eax
lea	ecx, [esp+9Ch+var_64]
call	sub_73F2D0
mov	[esp+98h+var_18], ebx

loc_6F88DB:
lea	ecx, [esp+98h+var_70]
call	sub_735210
jmp	loc_6F8832

loc_6F88E9:
mov	ecx, [esp+98h+var_20]
mov	[esp+98h+var_85], bl
cmp	ecx, ebx
jz	short loc_6F88FA

loc_6F88F5:
call	sub_64A400

loc_6F88FA:
mov	eax, [esp+98h+var_24]

loc_6F88FE:
cmp	eax, ebx
jz	short loc_6F891F
dec	dword ptr [eax]
mov	esi, eax
cmp	[esi], ebx
jnz	short loc_6F891F
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F891F:
mov	eax, [esp+98h+arg_0]
mov	ecx, [esp+98h+var_C]
mov	ebp, [esp+98h+var_7C]
mov	edx, [esp+98h+arg_0]
add	eax, 7Ch
cmp	ecx, [eax+4]
jnb	loc_6F8700
inc	[esp+98h+var_C]
jmp	loc_6F8700

loc_6F8950:
mov	esi, [ebp+4]
mov	eax, [ebp+4]
inc	esi
cmp	esi, eax
jnb	short loc_6F8998
mov	edi, [ebp+0]
sub	eax, esi
lea	ecx, [eax+esi]
lea	edi, [edi+ecx*8-8]
jz	short loc_6F898C
mov	[esp+98h+var_84], eax
lea	ecx, [ecx+0]

loc_6F8970:
mov	ecx, [edi]
cmp	ecx, ebx
jz	short loc_6F8982
call	sub_64A400
mov	edx, [esp+98h+arg_0]

loc_6F8982:
sub	edi, 8
sub	[esp+98h+var_84], 1
jnz	short loc_6F8970

loc_6F898C:
mov	eax, [ebp+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_6F89B4
push	esi
jmp	short loc_6F89A5

loc_6F8998:
cmp	esi, [ebp+8]
jb	short loc_6F89B4
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_6F89A5:
push	ebp
mov	ecx, ebp
call	sub_6ABB00
mov	edx, [esp+98h+arg_0]

loc_6F89B4:
mov	eax, [ebp+0]
lea	eax, [eax+esi*8-8]
pop	edi
mov	[ebp+4], esi
pop	esi
cmp	eax, ebx
jz	short loc_6F89D4
cmp	edx, ebx
jz	short loc_6F89CB
inc	dword ptr [edx+4]

loc_6F89CB:
mov	ecx, [esp+90h+var_74]
mov	[eax], edx
mov	[eax+4], ecx

loc_6F89D4:
pop	ebp
cmp	edx, ebx
pop	ebx
jz	short loc_6F89E1
mov	ecx, edx
call	sub_64A400

loc_6F89E1:
add	esp, 88h
retn	4
sub_6F86C0 endp

align 10h



sub_6F89F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 30h
mov	eax, [esp+30h+arg_4]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+40h+arg_0]
mov	ebp, ecx
xor	edx, edx
sub	eax, edi
xor	esi, esi
xor	ebx, ebx
mov	[esp+40h+var_30], eax
cmp	[ebp+4], edx
jbe	loc_6F8AED

loc_6F8A16:
mov	eax, [ebp+0]
mov	ecx, [eax+ebx*8+4]
lea	eax, [eax+ebx*8]
add	ecx, esi
mov	[esp+40h+var_2C], ecx
cmp	edi, esi
ja	short loc_6F8A3A
xor	edx, edx
cmp	esi, [esp+40h+arg_4]
jb	short loc_6F8A42
cmp	edi, esi
jb	loc_6F8AE1

loc_6F8A3A:
cmp	edi, ecx
jnb	loc_6F8AE1

loc_6F8A42:
mov	eax, [eax]
mov	ecx, [eax+174h]
cmp	ecx, edx
jnz	short loc_6F8A59
mov	ecx, eax
call	sub_6F8650
mov	ecx, eax
xor	edx, edx

loc_6F8A59:
mov	eax, [ebp+10h]
mov	[esp+40h+var_24], edx
mov	[esp+40h+var_20], 0FFFFFFFFh
mov	[esp+40h+var_1C], edx
mov	[esp+40h+var_18], edx
mov	[esp+40h+var_14], edx
mov	[esp+40h+var_8], edx
mov	[esp+40h+var_C], edx
mov	[esp+40h+var_4], 8
mov	[esp+40h+var_10], eax
cmp	esi, edi
jbe	short loc_6F8A8D
xor	edi, edi
jmp	short loc_6F8A8F

loc_6F8A8D:
sub	edi, esi

loc_6F8A8F:
mov	edx, [ebp+0]
mov	esi, [esp+40h+var_30]
mov	[esp+40h+var_28], edi
mov	edx, [edx+ebx*8+4]
sub	edx, edi
cmp	esi, edx
jnb	short loc_6F8AA6
mov	edx, esi

loc_6F8AA6:
cmp	[esp+40h+arg_8], 0
mov	[esp+40h+var_24], edx
mov	[esp+40h+var_18], edx
mov	[esp+40h+var_1C], edi
jz	short loc_6F8AC5
lea	eax, [esp+40h+var_28]
push	eax
call	sub_740570
jmp	short loc_6F8ACF

loc_6F8AC5:
lea	edx, [esp+40h+var_28]
push	edx
call	sub_7406E0

loc_6F8ACF:
sub	esi, [esp+40h+var_24]
mov	edi, [esp+40h+arg_0]
mov	ecx, [esp+40h+var_2C]
mov	[esp+40h+var_30], esi
xor	edx, edx

loc_6F8AE1:
inc	ebx
mov	esi, ecx
cmp	ebx, [ebp+4]
jb	loc_6F8A16

loc_6F8AED:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	0Ch
sub_6F89F0 endp

align 10h



sub_6F8B00 proc	near
fldz
push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+4], 1
xor	ebx, ebx
mov	[esi+8], ebx
mov	dword ptr [esi+0Ch], 40000h
mov	dword ptr [esi], offset	off_143EE2C
fst	dword ptr [esi+10h]
fst	dword ptr [esi+14h]
lea	ecx, [esi+20h]
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+1Ch]
call	sub_64E8E0
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
mov	[esi+40h], ebx
mov	[esi+44h], bl
mov	eax, esi
pop	esi
pop	ebx
retn
sub_6F8B00 endp

align 10h



sub_6F8B50 proc	near
mov	eax, 8200h
retn
sub_6F8B50 endp

align 10h



sub_6F8B60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+18h]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+1Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_6F8B60 endp

align 10h



sub_6F8B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_6F8B94
lea	esi, [edi+28h]

loc_6F8B94:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6F8BAC
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6F8BAC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
add	eax, 2
mov	[esi+2Ch], eax
mov	eax, [edi+20h]
shl	dx, 8
or	dx, cx
mov	ecx, [eax+1Ch]
movzx	ebx, dx
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	48h
call	eax
test	eax, eax
jz	short loc_6F8BEE
mov	ecx, eax
call	sub_6F8B00
mov	esi, eax
jmp	short loc_6F8BF0

loc_6F8BEE:
xor	esi, esi

loc_6F8BF0:
movzx	ebx, bx
push	ebx
lea	ecx, [edi+14h]
push	offset aTextcharacterI ; "TextCharacter, id = %d\n"
push	ecx
call	nullsub_2
mov	edx, [esp+18h+arg_4]
mov	eax, [edx]
add	esp, 0Ch
push	eax
push	edi
mov	ecx, esi
call	sub_6F77B0
cmp	dword ptr [edi+2F8h], 0
jnz	short loc_6F8C2B
push	esi
push	ecx
mov	eax, esp
mov	[eax], ebx
mov	ecx, [edi+20h]
call	sub_6B0AB0

loc_6F8C2B:
test	esi, esi
jz	short loc_6F8C36
mov	ecx, esi
call	sub_666B00

loc_6F8C36:
pop	edi
pop	esi
pop	ebx
retn	8
sub_6F8B80 endp

align 10h



sub_6F8C40 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
lea	ecx, [esi+0Ch]
mov	dword ptr [esi+8], 0
call	sub_67AB70
mov	al, 0FFh
mov	byte ptr [esp+8+var_4+2], al
mov	byte ptr [esp+8+var_4+1], al
mov	byte ptr [esp+8+var_4+3], al
mov	byte ptr [esp+8+var_4],	0
mov	eax, [esp+8+var_4]
mov	[esi+10h], eax
mov	eax, esi
pop	esi
pop	ecx
retn
sub_6F8C40 endp

align 10h



sub_6F8C80 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+38h]
mov	ecx, edi
call	sub_6F85B0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi]
mov	eax, [eax+30h]
push	edx
call	eax
test	[esp+8+arg_0], 1
mov	dword ptr [esi], offset	off_1436C18
jz	short loc_6F8CB9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6F8CB9:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6F8C80 endp




sub_6F8CC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+174h]
mov	dword ptr [esi], offset	off_143ECC8
mov	dword ptr [esi+0Ch], offset off_143ECC0
test	edi, edi
jz	short loc_6F8CF0
mov	ecx, edi
call	sub_6F7C90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_6F8CF0:
lea	ecx, [esi+150h]
call	sub_64A3F0
lea	ecx, [esi+7Ch]
call	sub_737D30
mov	ecx, esi
call	sub_6552F0
test	[esp+8+arg_0], 1
jz	short loc_6F8D1F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6F8D1F:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_6F8CC0 endp

align 10h



sub_6F8D30 proc	near
xor	eax, eax
mov	[ecx+14h], eax
mov	[ecx+85h], al
retn
sub_6F8D30 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_6822C0

loc_6F8D40:
xor	eax, eax
mov	[ecx+0Ch], eax
mov	[ecx+10h], eax
retn
; END OF FUNCTION CHUNK	FOR sub_6822C0
align 10h



; int __stdcall	sub_6F8D50(float, float)
sub_6F8D50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
push	esi
push	0
mov	esi, ecx
call	__ftol2_sse
fld	[esp+8+arg_0]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esi+0Ch]
call	sub_70C1B0
pop	esi
retn	8
sub_6F8D50 endp

align 10h



; int __stdcall	sub_6F8D80(float, float)
sub_6F8D80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
push	esi
mov	esi, ecx
call	__ftol2_sse
fld	[esp+4+arg_0]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esi+0Ch]
call	sub_711110
mov	byte ptr [esi+85h], 0
pop	esi
retn	8
sub_6F8D80 endp

align 10h



; int __stdcall	sub_6F8DB0(float, float, float,	float)
sub_6F8DB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	[esp+arg_C]
push	esi
mov	esi, ecx
call	__ftol2_sse
fld	[esp+4+arg_8]
push	eax
call	__ftol2_sse
fld	[esp+8+arg_4]
push	eax
call	__ftol2_sse
fld	[esp+0Ch+arg_0]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esi+0Ch]
call	sub_711130
mov	byte ptr [esi+85h], 0
pop	esi
retn	10h
sub_6F8DB0 endp

align 10h



sub_6F8DF0 proc	near
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esi+0Ch]
call	sub_70A190
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	7Ch
call	edx
test	eax, eax
jz	short loc_6F8E21
push	1FF8h
mov	ecx, eax
call	sub_713080
mov	edi, eax
jmp	short loc_6F8E23

loc_6F8E21:
xor	edi, edi

loc_6F8E23:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6F8E2F
call	sub_70E500

loc_6F8E2F:
mov	[esi+8], edi
pop	edi
mov	byte ptr [esi+84h], 0
pop	esi
retn
sub_6F8DF0 endp

align 10h



; int __stdcall	sub_6F8E40(float, int, char, int, int, int, float)
sub_6F8E40 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [ecx+8]
sub	esp, 8
cmp	dword ptr [eax+60h], 0
jnz	short loc_6F8E54

loc_6F8E4C:
xor	al, al
add	esp, 8
retn	1Ch

loc_6F8E54:
cmp	dword ptr [ecx+14h], 0
jz	short loc_6F8E4C
mov	ecx, [eax+60h]
mov	edx, [eax+5Ch]
lea	ecx, [ecx+ecx*2]
cmp	dword ptr [edx+ecx*8-0Ch], 0
lea	ecx, [edx+ecx*8-18h]
jnz	short loc_6F8E4C
mov	eax, [ecx+8]
cmp	eax, [esp+8+arg_4]
jnz	short loc_6F8EF0
fld	[esp+8+arg_0]
movzx	edx, word ptr [ecx+4]
fnstcw	word ptr [esp+8+arg_4]
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+arg_0], eax
fldcw	word ptr [esp+8+arg_0]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
fldcw	word ptr [esp+8+arg_4]
cmp	edx, eax
jnz	short loc_6F8EF0
mov	dl, [ecx+10h]
and	dl, 1
cmp	dl, [esp+8+arg_8]
jnz	short loc_6F8EF0
movzx	eax, word ptr [ecx+10h]
mov	edx, eax
and	edx, 6
cmp	edx, [esp+8+arg_C]
jnz	short loc_6F8EF0
mov	edx, eax
and	edx, 0C0h
cmp	edx, [esp+8+arg_10]
jnz	short loc_6F8EF0
and	eax, 30h
cmp	eax, [esp+8+arg_14]
jnz	short loc_6F8EF0
fld	dword ptr [ecx+14h]
fld	[esp+8+arg_18]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6F8EF0
mov	eax, 1
add	esp, 8
retn	1Ch

loc_6F8EF0:
xor	eax, eax
add	esp, 8
retn	1Ch
sub_6F8E40 endp

align 10h



sub_6F8F00 proc	near
mov	eax, [ecx+8]
cmp	dword ptr [eax+60h], 0
jz	short loc_6F8F12
cmp	dword ptr [ecx+14h], 0
jz	short loc_6F8F12
xor	eax, eax
retn

loc_6F8F12:
mov	eax, 1
retn
sub_6F8F00 endp

align 10h



sub_6F8F20 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
mov	eax, [ecx+8]
jz	short loc_6F8F31
or	byte ptr [eax+24h], 8
retn	4

loc_6F8F31:
and	byte ptr [eax+24h], 0F7h
retn	4
sub_6F8F20 endp

align 10h



sub_6F8F40 proc	near
mov	eax, [ecx+8]
add	ecx, 0Ch
cmp	dword ptr [ecx+28h], 0
jz	short locret_6F8F59
lea	edx, [eax+34h]
push	edx
add	eax, 28h
push	eax
call	sub_70BCD0

locret_6F8F59:
retn
sub_6F8F40 endp

align 10h



sub_6F8F60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6F8F90
mov	eax, [edi]
test	eax, eax
jz	short loc_6F8F85
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6F8F85:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6F8F90:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6F8FC5
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6F8FC5:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*4]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 103h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6F8F60 endp

align 10h



sub_6F9000 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_6F9030
mov	eax, [edi]
test	eax, eax
jz	short loc_6F9025
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_6F9025:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_6F9030:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_6F9065
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*2]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_6F9065:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 103h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_6F9000 endp

align 10h



sub_6F90A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_6F90F2
mov	edx, [edi]
sub	eax, esi
lea	ecx, [eax+esi]
lea	ecx, [ecx+ecx*4]
push	ebx
lea	ebx, [edx+ecx*8-28h]
jz	short loc_6F90D3
push	ebp
mov	ebp, eax

loc_6F90C3:
mov	ecx, ebx
call	sub_6FA020
sub	ebx, 28h
sub	ebp, 1
jnz	short loc_6F90C3
pop	ebp

loc_6F90D3:
mov	eax, [edi+8]
shr	eax, 1
pop	ebx
cmp	esi, eax
jnb	short loc_6F9109
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_6F8F60
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_6F90F2:
cmp	esi, [edi+8]
jb	short loc_6F9109
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6F8F60

loc_6F9109:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_6F90A0 endp

align 10h



sub_6F9120 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_6F9175
mov	edx, [ebx]
sub	eax, edi
lea	ecx, [eax+edi]
lea	ecx, [ecx+ecx*2]
push	esi
lea	esi, [edx+ecx*8-18h]
jz	short loc_6F9156
push	ebp
mov	ebp, eax

loc_6F9143:
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
sub	esi, 18h
sub	ebp, 1
jnz	short loc_6F9143
pop	ebp

loc_6F9156:
mov	eax, [ebx+8]
shr	eax, 1
pop	esi
cmp	edi, eax
jnb	short loc_6F918C
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, ebx
call	sub_6F9000
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8

loc_6F9175:
cmp	edi, [ebx+8]
jb	short loc_6F918C
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_6F9000

loc_6F918C:
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8
sub_6F9120 endp

align 10h



sub_6F91A0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143ED90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	7Ch
call	edx
test	eax, eax
jz	short loc_6F91D9
push	1FF8h
mov	ecx, eax
call	sub_713080
jmp	short loc_6F91DB

loc_6F91D9:
xor	eax, eax

loc_6F91DB:
lea	ecx, [esi+0Ch]
mov	[esi+8], eax
call	sub_70F3B0
lea	ecx, [esi+44h]
call	sub_6FA2A0
lea	ecx, [esi+6Ch]
call	sub_6FA090
mov	byte ptr [esi+84h], 0
mov	byte ptr [esi+85h], 0
mov	eax, esi
pop	esi
retn
sub_6F91A0 endp

align 10h



; int __stdcall	sub_6F9210(float, int, char, __int16, int, __int16, float)
sub_6F9210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= word ptr	 10h
arg_10=	dword ptr  14h
arg_14=	word ptr  18h
arg_18=	dword ptr  1Ch

push	ecx
fld	[esp+4+arg_0]
push	ebx
fnstcw	word ptr [esp+8+arg_0]
mov	ebx, ecx
movzx	eax, word ptr [esp+8+arg_0]
mov	ecx, [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+var_4], eax
push	ebp
push	esi
fldcw	word ptr [esp+10h+var_4]
lea	esi, [ebx+6Ch]
mov	edx, 0FFFEh
fistp	[esp+10h+var_4]
mov	ax, word ptr [esp+10h+var_4]
mov	[ebx+70h], ax
mov	[ebx+74h], ecx
and	[esi+10h], dx
fldcw	word ptr [esp+10h+arg_0]
cmp	[esp+10h+arg_8], 0
movzx	eax, word ptr [esi+10h]
jz	short loc_6F9266
or	eax, 1
mov	[esi+10h], ax

loc_6F9266:
mov	ax, [esi+10h]
fld	[esp+10h+arg_18]
xor	ax, [esp+10h+arg_C]
mov	edx, 0FF3Fh
and	ax, 6
xor	[esi+10h], ax
movzx	ecx, word ptr [esi+10h]
mov	eax, [esp+10h+arg_10]
and	cx, dx
and	eax, 0C0h
or	cx, ax
mov	edx, 0FCFFh
and	cx, dx
add	eax, eax
add	eax, eax
or	cx, ax
mov	[esi+10h], cx
movzx	ecx, cx
xor	cx, [esp+10h+arg_14]
push	edi
and	cx, 30h
xor	[esi+10h], cx
mov	ebp, [ebx+8]
lea	edi, [ebp+5Ch]
fstp	dword ptr [ebx+80h]
mov	edx, [edi+4]
inc	edx
push	edx
push	edi
mov	ecx, edi
call	sub_6F9120
mov	eax, [edi+4]
mov	ecx, [edi]
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*8-18h]
pop	edi
test	ecx, ecx
jz	short loc_6F92E7
push	esi
call	sub_6FB940

loc_6F92E7:
mov	edx, [ebp+60h]
pop	esi
pop	ebp
mov	[ebx+14h], edx
mov	byte ptr [ebx+85h], 1
pop	ebx
pop	ecx
retn	1Ch
sub_6F9210 endp

align 10h



sub_6F9300 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+44h]
push	0
mov	ecx, ebp
call	sub_6FA050
mov	ebx, [esi+8]
lea	edi, [ebx+50h]
mov	dword ptr [esi+48h], 0
mov	eax, [edi+4]
inc	eax
push	eax
push	edi
mov	ecx, edi
call	sub_6F90A0
mov	eax, [edi+4]
mov	edx, [edi]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*8-28h]
test	ecx, ecx
jz	short loc_6F9342
push	ebp
call	sub_6FAB80

loc_6F9342:
mov	eax, [ebx+54h]
mov	[esi+0Ch], eax
mov	dword ptr [esi+10h], 0
mov	esi, [esi+8]
mov	eax, [esi+54h]
mov	edx, [esi+50h]
pop	edi
pop	esi
lea	ecx, [eax+eax*4]
pop	ebp
lea	eax, [edx+ecx*8-28h]
pop	ebx
retn
sub_6F9300 endp

align 10h



sub_6F9370 proc	near

; FUNCTION CHUNK AT 006FA4A0 SIZE 0000005C BYTES

push	edi
mov	edi, ecx
cmp	byte ptr [edi+85h], 0
jnz	short loc_6F93B2
push	ebx
mov	ebx, [edi+8]
mov	eax, [ebx+60h]
push	esi
lea	esi, [ebx+5Ch]
inc	eax
push	eax
push	esi
mov	ecx, esi
call	sub_6F9120
mov	eax, [esi+4]
mov	edx, [esi]
lea	ecx, [eax+eax*2]
lea	ecx, [edx+ecx*8-18h]
test	ecx, ecx
jz	short loc_6F93AA
lea	eax, [edi+6Ch]
push	eax
call	sub_6FB940

loc_6F93AA:
mov	ecx, [ebx+60h]
pop	esi
mov	[edi+14h], ecx
pop	ebx

loc_6F93B2:
mov	edi, [edi+8]
mov	eax, [edi+60h]
lea	edx, [eax+eax*2]
mov	eax, [edi+5Ch]
lea	ecx, [eax+edx*8-18h]
pop	edi
jmp	loc_6FA4A0
sub_6F9370 endp	; sp-analysis failed

align 10h



sub_6F93D0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	ebx, [edi+44h]
push	0
mov	ecx, ebx
call	sub_6FA050
mov	ebp, [edi+8]
mov	eax, [esp+10h+arg_0]
lea	esi, [ebp+50h]
mov	[edi+48h], eax
mov	ecx, [esi+4]
inc	ecx
push	ecx
push	esi
mov	ecx, esi
call	sub_6F90A0
mov	eax, [esi+4]
lea	edx, [eax+eax*4]
mov	eax, [esi]
lea	ecx, [eax+edx*8-28h]
test	ecx, ecx
jz	short loc_6F9412
push	ebx
call	sub_6FAB80

loc_6F9412:
mov	ecx, [ebp+54h]
mov	[edi+0Ch], ecx
mov	dword ptr [edi+10h], 0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_6F93D0 endp

align 10h



sub_6F9430 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

call	sub_6F9300
test	eax, eax
jz	short locret_6F9440
mov	ecx, eax
jmp	sub_6FA370

locret_6F9440:
retn	0Ch
sub_6F9430 endp

align 10h



sub_6F9450 proc	near

var_38=	byte ptr -38h
var_1C=	dword ptr -1Ch
var_3= byte ptr	-3

sub	esp, 38h
push	esi
mov	esi, ecx
lea	ecx, [esp+3Ch+var_38]
call	sub_70F3B0
lea	eax, [esi+34h]
push	eax
add	esi, 28h
push	esi
lea	ecx, [esp+44h+var_38]
mov	[esp+44h+var_3], 1
call	sub_70BCD0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+3Ch+var_1C]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
add	esp, 38h
retn
sub_6F9450 endp

align 10h



sub_6F9490 proc	near

arg_0= byte ptr	 4

push	ebx
push	edi
mov	edi, ecx
xor	ebx, ebx
cmp	[edi+34h], ebx
jz	short loc_6F950F
cmp	[edi+0Ch], ebx
push	esi
lea	esi, [edi+0Ch]
jz	short loc_6F94AB
mov	ecx, esi
call	sub_711160

loc_6F94AB:
cmp	[edi+84h], bl
jz	short loc_6F94BB
mov	ecx, [edi+8]
call	sub_6F9450

loc_6F94BB:
mov	eax, [edi+8]
cmp	[esi+28h], ebx
jz	short loc_6F94D2
lea	ecx, [eax+34h]
push	ecx
add	eax, 28h
push	eax
mov	ecx, esi
call	sub_70BCD0

loc_6F94D2:
mov	ecx, [edi+8]
call	sub_709D30
mov	eax, [edi+8]
and	byte ptr [eax+24h], 0EFh
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+28h], ebx
mov	[esi+35h], bl
mov	edx, [esi+18h]
mov	eax, [esi+14h]
push	ebx
push	edx
push	eax
mov	ecx, esi
call	sub_70C1B0
mov	cl, [esp+0Ch+arg_0]
pop	esi
mov	[edi+84h], cl
pop	edi
mov	al, 1
pop	ebx
retn	4

loc_6F950F:
pop	edi
xor	al, al
pop	ebx
retn	4
sub_6F9490 endp

align 10h



sub_6F9520 proc	near
push	esi
push	1
mov	esi, ecx
call	sub_6F9490
mov	ecx, [esi+8]
mov	eax, [ecx]
pop	esi
mov	eax, [eax+14h]
jmp	eax
sub_6F9520 endp

align 10h



sub_6F9540 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

sub	esp, 6Ch
push	ebx
push	ebp
xor	ebx, ebx
push	ebx
mov	ebp, ecx
call	sub_6F9490
mov	ecx, [ebp+8]
cmp	[ecx+54h], ebx
jnz	short loc_6F9560
cmp	[ecx+60h], ebx
jz	loc_6F964F

loc_6F9560:
test	byte ptr [ecx+24h], 10h
jnz	short loc_6F95C4
fldz
lea	edx, [esp+74h+var_60]
fst	[esp+74h+var_60]
push	edx
fst	[esp+78h+var_5C]
fst	[esp+78h+var_58]
fstp	[esp+78h+var_54]
mov	eax, [ecx]
mov	eax, [eax+14h]
call	eax
fld	[esp+74h+var_5C]
mov	eax, [ebp+8]
fstp	[esp+74h+var_6C]
fld	[esp+74h+var_58]
add	eax, 4
fstp	[esp+74h+var_68]
fld	[esp+74h+var_54]
fstp	[esp+74h+var_64]
fld	[esp+74h+var_60]
fstp	dword ptr [eax]
fld	[esp+74h+var_6C]
fstp	dword ptr [eax+4]
fld	[esp+74h+var_68]
fstp	dword ptr [eax+8]
fld	[esp+74h+var_64]
fstp	dword ptr [eax+0Ch]
mov	eax, [ebp+8]
or	byte ptr [eax+24h], 10h

loc_6F95C4:
mov	eax, [esp+74h+arg_4]
fld	dword ptr [eax]
mov	ecx, [esp+74h+arg_0]
mov	edx, [esp+74h+arg_C]
fstp	[esp+74h+var_44]
fld	dword ptr [eax+4]
push	esi
mov	esi, [esp+78h+arg_8]
fstp	[esp+78h+var_40]
fld	dword ptr [eax+8]
mov	[esp+78h+var_50], ecx
fstp	[esp+78h+var_3C]
push	edi
fld	dword ptr [eax+0Ch]
mov	[esp+7Ch+var_4C], ebx
fstp	[esp+7Ch+var_38]
mov	[esp+7Ch+var_48], ebx
fld	dword ptr [eax+10h]
mov	ecx, 8
fstp	[esp+7Ch+var_34]
lea	edi, [esp+7Ch+var_2C]
fld	dword ptr [eax+14h]
fstp	[esp+7Ch+var_30]
rep movsd
mov	ecx, [ebp+8]
mov	[esp+7Ch+var_C], edx
mov	[esp+7Ch+var_8], ebx
mov	[esp+7Ch+var_4], ebx
mov	eax, [ecx]
mov	eax, [eax+2Ch]
lea	edx, [esp+7Ch+var_50]
push	edx
call	eax
mov	ecx, dword ptr [esp+7Ch+arg_10]
push	ebx		; float
push	ecx		; char
mov	ecx, [ebp+8]
lea	edx, [esp+84h+var_50]
push	edx		; int
call	sub_70B610
pop	edi
pop	esi

loc_6F964F:
pop	ebp
pop	ebx
add	esp, 6Ch
retn	14h
sub_6F9540 endp

align 10h



sub_6F9660 proc	near
push	esi
push	1
mov	esi, ecx
call	sub_6F9490
mov	ecx, [esi+8]
mov	eax, [ecx]
pop	esi
mov	eax, [eax+0Ch]
jmp	eax
sub_6F9660 endp

align 10h



sub_6F9680 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
cmp	[esi+4], edi
jbe	short loc_6F96B3
jmp	short loc_6F9690
align 10h

loc_6F9690:
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
mov	eax, [edx]
push	0
call	eax
inc	edi
cmp	edi, [esi+4]
jb	short loc_6F9690
pop	edi
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
pop	esi
retn

loc_6F96B3:
mov	[esi], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_6F9680 endp

align 10h



sub_6F96C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	edx, [esp+0Ch+var_4]
mov	esi, ecx
mov	ecx, dword_1855FC0
push	edx
mov	[esp+10h+var_4], 142h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	7Ch
push	edi
call	eax
test	eax, eax
jz	short loc_6F9702
mov	edx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, esp
push	edi
mov	[ecx], edx
push	esi
mov	ecx, eax
call	sub_656EE0
pop	edi
pop	esi
pop	ecx
retn	0Ch

loc_6F9702:
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn	0Ch
sub_6F96C0 endp

align 10h



sub_6F9710 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+4]
call	sub_64E8E0
mov	eax, esi
pop	esi
retn
sub_6F9710 endp

align 10h



sub_6F9720 proc	near
mov	eax, [ecx]
cmp	eax, 1
jnz	short loc_6F972F
mov	ecx, [ecx+4]
jmp	sub_666B00

loc_6F972F:
cmp	eax, 2
jl	short locret_6F973C
mov	ecx, [ecx+4]
jmp	sub_64A430

locret_6F973C:
retn
sub_6F9720 endp

align 10h



sub_6F9740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+324h]
push	edi
mov	edi, ecx
test	esi, esi
jnz	short loc_6F9756
lea	esi, [ebx+28h]

loc_6F9756:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_6F976C
mov	ecx, esi
call	sub_6A9C60

loc_6F976C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
mov	edx, [esp+0Ch+arg_4]
inc	eax
mov	[esi+2Ch], eax
mov	[edi], cl
push	edx
add	edi, 4
push	edi
mov	ecx, ebx
call	sub_6FC320
pop	edi
pop	esi
pop	ebx
retn	8
sub_6F9740 endp

align 10h



; int __stdcall	sub_6F97A0(float, float)
sub_6F97A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
fld	[esp+4+arg_0]
push	esi
mov	esi, ecx
fsub	dword ptr [esi+4]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_4]
fsub	dword ptr [esi+8]
fstp	[esp+8+arg_4]
fld	[esp+8+arg_0]
fld	st
fmul	dword ptr [esi+8]
fld	dword ptr [esi+4]
fld	[esp+8+arg_4]
fld	st
fmulp	st(2), st
fxch	st(2)
fsubrp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fld	dword ptr [esi+0Ch]
fmulp	st(2), st
fmul	st, st
fsubp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fabs
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
call	__CIsqrt
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fld	dword ptr [esi+4]
fmul	[esp+8+arg_0]
fld	[esp+8+arg_4]
fmul	dword ptr [esi+8]
faddp	st(1), st
faddp	st(1), st
fmul	dword ptr [esi+10h]
pop	esi
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
pop	ecx
retn	8
sub_6F97A0 endp




sub_6F9830 proc	near

var_4= dword ptr -4

push	ecx
fld	dword ptr [ecx]
fmul	st, st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fst	dword ptr [ecx+0Ch]
fld	dword ptr [ecx+8]
fld	dword ptr [ecx+4]
fld	st
fmulp	st(1), st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fld	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
faddp	st(1), st
fsubr	st, st(1)
fstp	[esp+4+var_4]
fldz
fcom	[esp+4+var_4]
fnstsw	ax
test	ah, 44h
jp	short loc_6F98E8
fcom	dword ptr [ecx+4]
fnstsw	ax
fld1
test	ah, 44h
jnp	short loc_6F9893
fxch	st(1)
fcom	dword ptr [ecx+4]
fnstsw	ax
fld	dword ptr [ecx+4]
test	ah, 41h
jnz	short loc_6F988C
fadd	st, st(2)
jmp	short loc_6F988E

loc_6F988C:
fsub	st, st(2)

loc_6F988E:
fstp	dword ptr [ecx+4]
fxch	st(1)

loc_6F9893:
fld	st(1)
fcomp	dword ptr [ecx+8]
fnstsw	ax
test	ah, 44h
jnp	short loc_6F98BB
fxch	st(1)
fcomp	dword ptr [ecx+8]
fnstsw	ax
test	ah, 41h
jnz	short loc_6F98B3
fadd	dword ptr [ecx+8]
fstp	dword ptr [ecx+8]
jmp	short loc_6F98BF

loc_6F98B3:
fsubr	dword ptr [ecx+8]
fstp	dword ptr [ecx+8]
jmp	short loc_6F98BF

loc_6F98BB:
fstp	st(1)
fstp	st

loc_6F98BF:
fld	dword ptr [ecx+8]
fld	dword ptr [ecx+4]
fmul	st, st
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
fld	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4+var_4]
fadd	[esp+4+var_4]
fsubp	st(1), st
fstp	[esp+4+var_4]
fld	dword ptr [ecx]
fdiv	[esp+4+var_4]
fstp	dword ptr [ecx+10h]
pop	ecx
retn

loc_6F98E8:
fstp	st
fstp	st
fld	dword ptr [ecx]
fdiv	[esp+4+var_4]
fstp	dword ptr [ecx+10h]
pop	ecx
retn
sub_6F9830 endp

align 10h



; int __cdecl sub_6F9900(int, float)
sub_6F9900 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

movzx	eax, word ptr [esp+arg_0]
mov	[esp+arg_0], eax
fild	[esp+arg_0]
fdiv	ds:dbl_15FCCE8
fstp	[esp+arg_0]
fld	[esp+arg_0]
fld	[esp+arg_4]
call	__CIpow
fstp	[esp+arg_0]
fld	[esp+arg_0]
sub	esp, 8
fmul	ds:dbl_15FCCF8
fadd	ds:dbl_15FCC48
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	[esp+8+var_8]
call	_floor
fnstcw	word ptr [esp+8+arg_0]
add	esp, 8
movzx	eax, word ptr [esp+arg_0]
or	eax, 0C00h
mov	[esp+arg_4], eax
fldcw	word ptr [esp+arg_4]
fistp	[esp+arg_4]
mov	al, byte ptr [esp+arg_4]
fldcw	word ptr [esp+arg_0]
retn
sub_6F9900 endp

db 1Fh dup(0CCh)



sub_6F9990 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
mov	edx, ecx
mov	dword ptr [esp+0Ch+var_8], edx
test	eax, eax
jz	short loc_6F99BF
cmp	byte ptr [eax+10h], 0
jnz	short loc_6F99BF
mov	eax, [eax+0Ch]
test	eax, eax
jnz	loc_6FA014
mov	eax, 40h
test	eax, eax
jnz	loc_6FA014

loc_6F99BF:
fldz
push	ebp
movzx	ebp, word ptr [edx+0Ah]
fst	[esp+10h+arg_0]
mov	ecx, 1
cmp	ebp, ecx
jbe	loc_6F9F46
push	ebx
lea	eax, [ebp-1]
cmp	eax, 4
push	esi
push	edi
jl	loc_6F9E05
mov	eax, [edx+0Ch]
lea	ebx, [ebp-5]
shr	ebx, 2
inc	ebx
lea	edi, [eax+0Eh]
lea	esi, [eax+5]
lea	ecx, ds:1[ebx*4]

loc_6F99FD:
movzx	edx, byte ptr [edi-6]
movzx	eax, byte ptr [edi-0Eh]
mov	[esp+1Ch+var_C], edx
fild	[esp+1Ch+var_C]
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fsubr	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	loc_6F9AFE
movzx	edx, byte ptr [edi]
movzx	eax, byte ptr [esi+1]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9A5F
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9A61

loc_6F9A5F:
fstp	st

loc_6F9A61:
movzx	edx, byte ptr [edi-1]
movzx	eax, byte ptr [esi]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9A94
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9A96

loc_6F9A94:
fstp	st

loc_6F9A96:
movzx	edx, byte ptr [edi-2]
movzx	eax, byte ptr [esi-1]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9ACA
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9ACC

loc_6F9ACA:
fstp	st

loc_6F9ACC:
movzx	edx, byte ptr [edi+1]
movzx	eax, byte ptr [esi+2]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fidivr	[esp+1Ch+var_C]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9AFE
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9B00

loc_6F9AFE:
fstp	st

loc_6F9B00:
movzx	eax, byte ptr [edi+2]
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fld	st
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	loc_6F9BFA
movzx	edx, byte ptr [esi+11h]
movzx	eax, byte ptr [edi]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9B5A
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9B5C

loc_6F9B5A:
fstp	st

loc_6F9B5C:
movzx	edx, byte ptr [esi+10h]
movzx	eax, byte ptr [edi-1]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9B90
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9B92

loc_6F9B90:
fstp	st

loc_6F9B92:
movzx	edx, byte ptr [esi+0Fh]
movzx	eax, byte ptr [edi-2]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9BC6
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9BC8

loc_6F9BC6:
fstp	st

loc_6F9BC8:
movzx	edx, byte ptr [esi+12h]
movzx	eax, byte ptr [edi+1]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fidivr	[esp+1Ch+var_C]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9BFA
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9BFC

loc_6F9BFA:
fstp	st

loc_6F9BFC:
movzx	eax, byte ptr [edi+0Ah]
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fld	st
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	loc_6F9CF7
movzx	edx, byte ptr [esi+19h]
movzx	eax, byte ptr [esi+11h]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9C57
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9C59

loc_6F9C57:
fstp	st

loc_6F9C59:
movzx	edx, byte ptr [esi+18h]
movzx	eax, byte ptr [esi+10h]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9C8D
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9C8F

loc_6F9C8D:
fstp	st

loc_6F9C8F:
movzx	edx, byte ptr [esi+17h]
movzx	eax, byte ptr [esi+0Fh]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9CC3
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9CC5

loc_6F9CC3:
fstp	st

loc_6F9CC5:
movzx	edx, byte ptr [esi+1Ah]
movzx	eax, byte ptr [esi+12h]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fidivr	[esp+1Ch+var_C]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9CF7
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9CF9

loc_6F9CF7:
fstp	st

loc_6F9CF9:
movzx	eax, byte ptr [edi+12h]
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fsubrp	st(1), st
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_6F9DF0
movzx	edx, byte ptr [esi+21h]
movzx	eax, byte ptr [esi+19h]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9D50
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9D52

loc_6F9D50:
fstp	st

loc_6F9D52:
movzx	edx, byte ptr [esi+20h]
movzx	eax, byte ptr [esi+18h]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9D86
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9D88

loc_6F9D86:
fstp	st

loc_6F9D88:
movzx	edx, byte ptr [esi+1Fh]
movzx	eax, byte ptr [esi+17h]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9DBC
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9DBE

loc_6F9DBC:
fstp	st

loc_6F9DBE:
movzx	edx, byte ptr [esi+22h]
movzx	eax, byte ptr [esi+1Ah]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fidivr	[esp+1Ch+var_C]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9DF0
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9DF2

loc_6F9DF0:
fstp	st

loc_6F9DF2:
add	esi, 20h
add	edi, 20h
sub	ebx, 1
jnz	loc_6F99FD
mov	edx, dword ptr [esp+1Ch+var_8]

loc_6F9E05:
cmp	ecx, ebp
jnb	loc_6F9F30
mov	eax, [edx+0Ch]
lea	edi, [eax+ecx*8]
sub	ebp, ecx
lea	esi, [edi-3]
mov	ebx, ebp

loc_6F9E1A:
movzx	ecx, byte ptr [edi]
movzx	edx, byte ptr [esi-5]
mov	[esp+1Ch+var_C], ecx
fild	[esp+1Ch+var_C]
mov	[esp+1Ch+var_C], edx
fild	[esp+1Ch+var_C]
fsubp	st(1), st
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_6F9F1B
movzx	ecx, byte ptr [esi+9]
movzx	eax, byte ptr [esi+1]
sub	eax, ecx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9E7C
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9E7E

loc_6F9E7C:
fstp	st

loc_6F9E7E:
movzx	edx, byte ptr [esi+8]
movzx	eax, byte ptr [esi]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9EB1
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9EB3

loc_6F9EB1:
fstp	st

loc_6F9EB3:
movzx	ecx, byte ptr [esi+7]
movzx	eax, byte ptr [esi-1]
sub	eax, ecx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fild	[esp+1Ch+var_C]
fdiv	st, st(1)
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9EE7
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9EE9

loc_6F9EE7:
fstp	st

loc_6F9EE9:
movzx	edx, byte ptr [esi+0Ah]
movzx	eax, byte ptr [esi+2]
sub	eax, edx
cdq
xor	eax, edx
sub	eax, edx
mov	[esp+1Ch+var_C], eax
fidivr	[esp+1Ch+var_C]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_6F9F1B
fstp	[esp+1Ch+arg_0]
jmp	short loc_6F9F1D

loc_6F9F1B:
fstp	st

loc_6F9F1D:
add	edi, 8
add	esi, 8
sub	ebx, 1
jnz	loc_6F9E1A
mov	edx, dword ptr [esp+1Ch+var_8]

loc_6F9F30:
fld	st
pop	edi
fld	[esp+18h+arg_0]
pop	esi
fucom	st(1)
pop	ebx
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_6F9F54
fstp	st

loc_6F9F46:
fstp	st
mov	eax, 40h
pop	ebp
add	esp, 0Ch
retn	4

loc_6F9F54:
cmp	byte ptr [edx+8], 0
jz	short loc_6F9F66
fmul	ds:dbl_15FCD58
fstp	[esp+10h+arg_0]
jmp	short loc_6F9F68

loc_6F9F66:
fstp	st

loc_6F9F68:
cmp	byte ptr [edx+9], 13h
jnz	short loc_6F9FA8
fld	dword ptr [edx+10h]
fabs
fstp	dword ptr [esp+10h+var_8]
fld	dword ptr [esp+10h+var_8]
fstp	dword ptr [esp+10h+var_8]
fld	ds:flt_15AAEF8
fld	dword ptr [esp+10h+var_8]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_6F9FA6
fld	ds:dbl_15FD888
fsubrp	st(1), st
fdivr	[esp+10h+arg_0]
fstp	[esp+10h+arg_0]
jmp	short loc_6F9FA8

loc_6F9FA6:
fstp	st

loc_6F9FA8:
fcom	[esp+10h+arg_0]
fnstsw	ax
test	ah, 41h
jnz	short loc_6F9FB9
fstp	[esp+10h+arg_0]
jmp	short loc_6F9FBB

loc_6F9FB9:
fstp	st

loc_6F9FBB:
fld	[esp+10h+arg_0]
fadd	ds:dbl_143EEC8
fmul	ds:dbl_15FCED0
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
call	__CIsqrt
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+10h+var_8], eax
fldcw	word ptr [esp+10h+var_8]
fistp	[esp+10h+var_8]
mov	eax, dword ptr [esp+10h+var_8]
fldcw	word ptr [esp+10h+arg_0]
cmp	eax, 12h
jb	short loc_6FA00C
mov	eax, 11h

loc_6FA00C:
mov	eax, ds:dword_143EE70[eax*4]
pop	ebp

loc_6FA014:
add	esp, 0Ch
retn	4
sub_6F9990 endp

align 10h



sub_6FA020 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi],	10h
jz	short loc_6FA034
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FA034
call	sub_64A430

loc_6FA034:
cmp	dword ptr [esi+8], 0
jnz	short loc_6FA047
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FA047
pop	esi
jmp	sub_666B00

loc_6FA047:
pop	esi
retn
sub_6FA020 endp

align 10h



sub_6FA050 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
test	byte ptr [esi],	10h
jz	short loc_6FA06E
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FA078
call	sub_64A430
mov	al, [esp+4+arg_0]
mov	[esi], al
pop	esi
retn	4

loc_6FA06E:
mov	cl, [esp+4+arg_0]
mov	[esi], cl
pop	esi
retn	4

loc_6FA078:
mov	dl, [esp+4+arg_0]
mov	[esi], dl
pop	esi
retn	4
sub_6FA050 endp

align 10h



sub_6FA090 proc	near
fld1
mov	eax, ecx
xor	ecx, ecx
fstp	dword ptr [eax+14h]
xor	edx, edx
mov	dword ptr [eax], offset	off_143EED0
mov	[eax+4], cx
mov	[eax+0Ch], ecx
mov	[eax+10h], dx
retn
sub_6FA090 endp

align 10h



sub_6FA0B0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_6FA0C3
mov	ecx, edi
call	sub_64A420

loc_6FA0C3:
cmp	dword ptr [esi], 0
jnz	short loc_6FA0D4
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FA0D4
call	sub_666B00

loc_6FA0D4:
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0
mov	eax, esi
pop	esi
retn	4
sub_6FA0B0 endp

align 10h



sub_6FA0F0 proc	near

arg_0= word ptr	 4

push	ebx
mov	bx, [esp+4+arg_0]
push	ebp
mov	ebp, ecx
cmp	bx, [ebp+0Ah]
jnz	short loc_6FA106
pop	ebp
mov	al, 1
pop	ebx
retn	4

loc_6FA106:
push	edi
xor	edi, edi
test	bx, bx
jz	short loc_6FA134
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+28h]
movzx	edx, bx
add	edx, edx
add	edx, edx
push	edi
add	edx, edx
push	edx
call	eax
mov	edi, eax
test	edi, edi
jnz	short loc_6FA134
pop	edi
pop	ebp
xor	al, al
pop	ebx
retn	4

loc_6FA134:
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_6FA195
movzx	eax, word ptr [ebp+0Ah]
cmp	bx, ax
jnb	short loc_6FA148
movzx	eax, bx
jmp	short loc_6FA14B

loc_6FA148:
movzx	eax, ax

loc_6FA14B:
movzx	edx, ax
push	esi
xor	esi, esi
test	edx, edx
jbe	short loc_6FA183
jmp	short loc_6FA160
align 10h

loc_6FA160:
mov	eax, [ebp+0Ch]
lea	ecx, ds:0[esi*8]
mov	bl, [eax+ecx]
add	eax, ecx
mov	[ecx+edi], bl
mov	eax, [eax+4]
inc	esi
mov	[ecx+edi+4], eax
cmp	esi, edx
jb	short loc_6FA160
mov	bx, [esp+10h+arg_0]

loc_6FA183:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0Ch]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi

loc_6FA195:
mov	[ebp+0Ch], edi
pop	edi
mov	[ebp+0Ah], bx
pop	ebp
mov	al, 1
pop	ebx
retn	4
sub_6FA0F0 endp

align 10h



sub_6FA1B0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	edi
movzx	edi, word ptr [ecx+0Ah]
cmp	di, [edx+0Ah]
jnz	short loc_6FA222
mov	al, [ecx+9]
cmp	al, [edx+9]
jnz	short loc_6FA222
fld	dword ptr [ecx+10h]
fld	dword ptr [edx+10h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6FA222
mov	al, [ecx+8]
cmp	al, [edx+8]
jnz	short loc_6FA222
push	ebx
push	ebp
movzx	edi, di
push	esi
xor	esi, esi
test	edi, edi
jbe	short loc_6FA210
mov	edx, [edx+0Ch]
mov	eax, [ecx+0Ch]
mov	ebp, edx
lea	ecx, [edx+4]
sub	ebp, eax

loc_6FA1F7:
mov	dl, [eax]
cmp	dl, [eax+ebp]
jnz	short loc_6FA219
mov	ebx, [ecx]
cmp	[eax+4], ebx
jnz	short loc_6FA219
inc	esi
add	ecx, 8
add	eax, 8
cmp	esi, edi
jb	short loc_6FA1F7

loc_6FA210:
pop	esi
pop	ebp
pop	ebx
mov	al, 1
pop	edi
retn	4

loc_6FA219:
pop	esi
pop	ebp
pop	ebx
xor	al, al
pop	edi
retn	4

loc_6FA222:
xor	al, al
pop	edi
retn	4
sub_6FA1B0 endp

align 10h



sub_6FA230 proc	near
mov	eax, 3
retn	4
sub_6FA230 endp

align 10h



sub_6FA240 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
movzx	eax, byte ptr [ecx+9]
push	esi
movzx	esi, word ptr [ecx+0Ah]
test	esi, esi
jbe	short loc_6FA271
mov	ecx, [ecx+0Ch]
push	ebx
push	edi

loc_6FA256:
mov	edx, [ecx+4]
movzx	ebx, byte ptr [ecx]
mov	edi, edx
shr	edi, 10h
xor	edi, ebx
xor	edi, edx
xor	eax, edi
add	ecx, 8
sub	esi, 1
jnz	short loc_6FA256
pop	edi
pop	ebx

loc_6FA271:
pop	esi
retn	4
sub_6FA240 endp

align 10h



sub_6FA280 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, [eax]
jz	short loc_6FA28D
xor	al, al
retn	8

loc_6FA28D:
mov	eax, [eax+4]
mov	ecx, [esp+arg_0]
push	eax
call	sub_6FA1B0
retn	8
sub_6FA280 endp

align 10h



sub_6FA2A0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
call	sub_64E8E0
mov	byte ptr [esi],	0
mov	byte ptr [esi+1], 2
mov	dword ptr [esi+4], 0
mov	eax, esi
pop	esi
retn
sub_6FA2A0 endp

align 10h



sub_6FA2D0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
test	byte ptr [edi],	10h
mov	esi, ecx
jz	short loc_6FA2E9
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_6FA2E9
call	sub_64A420

loc_6FA2E9:
test	byte ptr [esi],	10h
jz	short loc_6FA2FA
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FA2FA
call	sub_64A430

loc_6FA2FA:
mov	al, [edi]
mov	[esi], al
mov	cl, [edi+1]
mov	[esi+1], cl
mov	edx, [edi+4]
mov	[esi+4], edx
cmp	dword ptr [edi+8], 0
jnz	short loc_6FA31C
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6FA31C
call	sub_64A420

loc_6FA31C:
cmp	dword ptr [esi+8], 0
jnz	short loc_6FA32E
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FA32E
call	sub_666B00

loc_6FA32E:
mov	eax, [edi+8]
mov	[esi+8], eax
mov	ecx, [edi+0Ch]
mov	[esi+0Ch], ecx
fld	dword ptr [edi+10h]
fstp	dword ptr [esi+10h]
mov	eax, esi
fld	dword ptr [edi+14h]
fstp	dword ptr [esi+14h]
fld	dword ptr [edi+18h]
fstp	dword ptr [esi+18h]
fld	dword ptr [edi+1Ch]
fstp	dword ptr [esi+1Ch]
fld	dword ptr [edi+20h]
fstp	dword ptr [esi+20h]
fld	dword ptr [edi+24h]
pop	edi
fstp	dword ptr [esi+24h]
pop	esi
retn	4
sub_6FA2D0 endp

align 10h



sub_6FA370 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
test	byte ptr [esi],	10h
push	edi
jz	short loc_6FA385
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FA385
call	sub_64A430

loc_6FA385:
mov	al, [esp+8+arg_0]
mov	[esi], al
mov	eax, [esp+8+arg_8]
mov	byte ptr [esi+1], 2
fld	dword ptr [eax]
fstp	dword ptr [esi+10h]
mov	edi, [esp+8+arg_4]
fld	dword ptr [eax+4]
fstp	dword ptr [esi+14h]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+18h]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esi+1Ch]
fld	dword ptr [eax+10h]
fstp	dword ptr [esi+20h]
fld	dword ptr [eax+14h]
fstp	dword ptr [esi+24h]
fld	dword ptr [esi+10h]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [esi+10h]
fld	dword ptr [esi+14h]
fmul	st, st(1)
fstp	dword ptr [esi+14h]
fld	dword ptr [esi+18h]
fmul	st, st(1)
fstp	dword ptr [esi+18h]
fld	dword ptr [esi+1Ch]
fmul	st, st(1)
fstp	dword ptr [esi+1Ch]
fld	dword ptr [esi+20h]
fmul	st, st(1)
fstp	dword ptr [esi+20h]
fmul	dword ptr [esi+24h]
fstp	dword ptr [esi+24h]
test	edi, edi
jz	short loc_6FA3FB
mov	ecx, edi
call	sub_64A420

loc_6FA3FB:
cmp	dword ptr [esi+8], 0
jnz	short loc_6FA40D
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FA40D
call	sub_666B00

loc_6FA40D:
mov	[esi+0Ch], edi
pop	edi
mov	dword ptr [esi+8], 0
pop	esi
retn	0Ch
sub_6FA370 endp

align 10h



sub_6FA420 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	al, [esi]
shr	al, 4
and	al, 1
push	edi
mov	edi, [esp+8+arg_4]
jz	short loc_6FA436
cmp	edi, [esi+4]
jz	short loc_6FA45A

loc_6FA436:
test	al, al
jz	short loc_6FA446
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FA446
call	sub_64A430

loc_6FA446:
mov	al, [esp+8+arg_0]
mov	[esi], al
mov	[esi+4], edi
test	edi, edi
jz	short loc_6FA45A
mov	ecx, edi
call	sub_64A420

loc_6FA45A:
mov	eax, [esp+8+arg_8]
fld	dword ptr [eax]
pop	edi
fstp	dword ptr [esi+10h]
fld	dword ptr [eax+4]
fstp	dword ptr [esi+14h]
fld	dword ptr [eax+8]
fstp	dword ptr [esi+18h]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esi+1Ch]
fld	dword ptr [eax+10h]
fstp	dword ptr [esi+20h]
fld	dword ptr [eax+14h]
fstp	dword ptr [esi+24h]
fld	dword ptr [esi+18h]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [esi+18h]
fmul	dword ptr [esi+24h]
fstp	dword ptr [esi+24h]
pop	esi
retn	0Ch
sub_6FA420 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_6F9370

loc_6FA4A0:
push	edi
mov	edi, ecx
cmp	dword ptr [edi+0Ch], 0
jnz	short loc_6FA4F7
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	0
push	28h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6FA4ED
lea	ecx, [esi+10h]
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
call	sub_64E8E0
mov	byte ptr [esi],	0
mov	byte ptr [esi+1], 2
mov	dword ptr [esi+4], 0
mov	[edi+0Ch], esi
mov	eax, esi
pop	esi
pop	edi
retn

loc_6FA4ED:
xor	esi, esi
mov	[edi+0Ch], esi
mov	eax, esi
pop	esi
pop	edi
retn

loc_6FA4F7:
mov	eax, [edi+0Ch]
pop	edi
retn
; END OF FUNCTION CHUNK	FOR sub_6F9370
align 10h



sub_6FA500 proc	near

arg_0= dword ptr  4

push	ecx
mov	ecx, [ecx+8]
mov	eax, esp
mov	[eax], ecx
mov	ecx, [esp+4+arg_0]
mov	edx, [ecx]
mov	eax, [edx+84h]
call	eax
retn	4
sub_6FA500 endp

align 10h



sub_6FA520 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_6FA533
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_6FA555

loc_6FA533:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_6FA55A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_6FA555:
call	sub_6FAD50

loc_6FA55A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ebp, [esi+edx*4+8]
lea	ecx, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_6FA58E
mov	edx, [esp+8+arg_4]
mov	dword ptr [ecx], 0FFFFFFFFh
mov	edx, [edx]
pop	esi
mov	[ecx+8], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_6FA58E:
push	edi
mov	edi, [esi+4]
mov	edx, eax
push	ebx

loc_6FA595:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_6FA595
lea	edi, [edx+edx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [ecx+4]
cmp	edi, eax
jnz	short loc_6FA5D7
test	ebx, ebx
jz	short loc_6FA5C2
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_6FA5C2:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebx
pop	edi
mov	[ecx+8], esi
pop	esi
mov	[ecx], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_6FA5D7:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_6FA5F3

loc_6FA5E4:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_6FA5E4

loc_6FA5F3:
test	ebx, ebx
jz	short loc_6FA605
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_6FA605:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[ecx+8], edx
mov	dword ptr [ecx], 0FFFFFFFFh
mov	[ecx+4], eax
pop	ebp
retn	0Ch
sub_6FA520 endp




sub_6FA620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1436C18
lea	edi, [esi+10h]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], offset	off_143EF08
mov	ecx, edi
mov	dword ptr [esi+0Ch], 0
call	??0DNameNode@@IAE@XZ_2 ; DNameNode::DNameNode(void)
mov	ebx, [esp+0Ch+arg_0]
test	ebx, ebx
jz	short loc_6FA65B
inc	dword ptr [ebx+4]

loc_6FA65B:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FA667
call	sub_64A400

loc_6FA667:
mov	eax, [esp+0Ch+arg_4]
push	eax
mov	ecx, edi
mov	[esi+0Ch], ebx
call	sub_666080
mov	ecx, [esp+0Ch+arg_8]
pop	edi
mov	[esi+18h], ecx
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_6FA620 endp

align 10h



sub_6FA690 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	dword ptr [eax], 0
retn	4
sub_6FA690 endp

align 10h



sub_6FA6A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, esi
call	sub_666050
mov	eax, esi
pop	esi
retn	4
sub_6FA6A0 endp

align 10h



sub_6FA6C0 proc	near
mov	eax, [ecx+18h]
or	eax, 100h
retn
sub_6FA6C0 endp

align 10h



sub_6FA6D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6FA6E5
mov	eax, [ecx]
mov	edx, [esi+14h]
mov	eax, [eax+8]
push	edx
call	eax

loc_6FA6E5:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FA6F1
call	sub_64A400

loc_6FA6F1:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1436C18
jz	short loc_6FA70C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6FA70C:
mov	eax, esi
pop	esi
retn	4
sub_6FA6D0 endp

align 10h



sub_6FA720 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_143EED8
test	eax, eax
jz	short loc_6FA73E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_6FA73E:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_6FA75A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6FA75A:
mov	eax, esi
pop	esi
retn	4
sub_6FA720 endp




; int __cdecl sub_6FA760(int, int, int,	int, int, float)
sub_6FA760 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ebx
fld	[esp+4+arg_14]
push	ebp
mov	ebp, [esp+8+arg_8]
movzx	eax, word ptr [ebp+0]
push	esi
mov	esi, [esp+0Ch+arg_4]
movzx	ecx, word ptr [esi]
movzx	edx, cx
sub	eax, edx
imul	eax, [esp+0Ch+arg_C]
push	edi
mov	edi, [esp+10h+arg_10]
cdq
idiv	edi
push	ecx		; float
fstp	[esp+14h+var_14]
add	eax, ecx
push	eax		; int
call	sub_6F9900
fld	[esp+18h+arg_14]
movzx	ecx, word ptr [esi+2]
fstp	[esp+18h+var_14]
mov	ebx, [esp+18h+arg_0]
mov	[ebx+2], al
movzx	eax, word ptr [ebp+2]
movzx	edx, cx
sub	eax, edx
imul	eax, [esp+18h+arg_C]
cdq
idiv	edi
add	esp, 4
add	eax, ecx
push	eax		; int
call	sub_6F9900
fld	[esp+18h+arg_14]
movzx	ecx, word ptr [esi+4]
fstp	[esp+18h+var_14]
mov	[ebx+1], al
movzx	eax, word ptr [ebp+4]
movzx	edx, cx
sub	eax, edx
imul	eax, [esp+18h+arg_C]
cdq
idiv	edi
add	esp, 4
add	eax, ecx
push	eax		; int
call	sub_6F9900
movzx	ecx, word ptr [esi+6]
mov	[ebx], al
movzx	eax, word ptr [ebp+6]
sub	eax, ecx
imul	eax, [esp+18h+arg_C]
mov	ecx, edi
cdq
shl	ecx, 8
or	ecx, edi
idiv	ecx
add	esp, 8
pop	edi
add	al, [esi+6]
pop	esi
mov	[ebx+3], al
pop	ebp
mov	eax, ebx
pop	ebx
retn
sub_6FA760 endp

align 10h



; int __stdcall	sub_6FA820(int,	int, float)
sub_6FA820 proc	near

var_260= qword ptr -260h
var_248= dword ptr -248h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= word ptr -23Ch
var_23A= word ptr -23Ah
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= word ptr -204h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 248h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+248h+var_4], eax
push	ebx
mov	ebx, [esp+24Ch+arg_0]
push	ebp
mov	ebp, [esp+250h+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	[esp+258h+var_230], edi
test	ebp, ebp
jz	short loc_6FA854
test	ebx, ebx
jnz	short loc_6FA890

loc_6FA854:
mov	byte ptr [esp+258h+var_238], 0
mov	[esp+258h+var_234], 0FF000000h
lea	ebx, [esp+258h+var_238]

loc_6FA865:
xor	eax, eax

loc_6FA867:
mov	edx, [ebx+4]
mov	[edi+eax*4], edx
inc	eax
cmp	eax, 100h
jb	short loc_6FA867

loc_6FA875:
mov	ecx, [esp+258h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 248h
retn	0Ch

loc_6FA890:
cmp	ebp, 1
jbe	short loc_6FA865
fld1
fst	[esp+258h+var_218]
fcomp	[esp+258h+arg_8]
fnstsw	ax
test	ah, 44h
jp	short loc_6FA8CC
xor	eax, eax
jmp	short loc_6FA8B0
align 10h

loc_6FA8B0:
movzx	ecx, ax
mov	edx, ecx
shl	edx, 8
or	edx, ecx
mov	[esp+eax*2+258h+var_204], dx
inc	eax
cmp	eax, 100h
jb	short loc_6FA8B0
jmp	loc_6FA96C

loc_6FA8CC:
xor	esi, esi
mov	edi, edi

loc_6FA8D0:
mov	eax, esi
mov	[esp+258h+var_21C], eax
fild	[esp+258h+var_21C]
test	eax, eax
jge	short loc_6FA8E4
fadd	ds:flt_15FCC08

loc_6FA8E4:
fdiv	ds:dbl_15FCCF8
fstp	[esp+258h+var_248]
fld	[esp+258h+var_248]
fld	[esp+258h+arg_8]
call	__CIpow
fstp	[esp+258h+var_248]
fld	[esp+258h+var_248]
sub	esp, 8
fmul	ds:dbl_15FCCE8
fadd	ds:dbl_15FCC48
fstp	[esp+260h+var_248]
fld	[esp+260h+var_248]
fstp	[esp+260h+var_260]
call	_floor
fnstcw	word ptr [esp+260h+var_244]
inc	esi
movzx	eax, word ptr [esp+260h+var_244]
or	eax, 0C00h
mov	[esp+260h+var_248], eax
add	esp, 8
fldcw	word ptr [esp+258h+var_248]
fistp	[esp+258h+var_248]
mov	cx, word ptr [esp+258h+var_248]
mov	word ptr [esp+esi*2+258h+var_208+2], cx
fldcw	word ptr [esp+258h+var_244]
cmp	esi, 100h
jb	loc_6FA8D0
fld	[esp+258h+arg_8]
fld1
fdivrp	st(1), st
fstp	[esp+258h+var_218]

loc_6FA96C:
movzx	esi, byte ptr [ebx]
mov	eax, [ebx+4]
xor	edx, edx
mov	[esp+258h+var_224], eax
test	esi, esi
jbe	short loc_6FA984
mov	ecx, esi
rep stosd
mov	edi, [esp+258h+var_230]

loc_6FA984:
cmp	ebp, 1
jbe	loc_6FAB66
lea	ecx, [ebx+6]
dec	ebp
mov	[esp+258h+var_22C], ecx
mov	[esp+258h+var_248], ebp
jmp	short loc_6FA9A4
jmp	short loc_6FA9A0
align 10h

loc_6FA9A0:
mov	ecx, [esp+258h+var_22C]

loc_6FA9A4:
movzx	edi, byte ptr [ecx+2]
mov	[esp+258h+var_244], edi
cmp	edi, esi
jnb	short loc_6FA9B6
mov	[esp+258h+var_244], esi
mov	edi, esi

loc_6FA9B6:
movzx	edx, byte ptr [ecx]
fld1
mov	bp, [esp+edx*2+258h+var_204]
fcomp	[esp+258h+arg_8]
movzx	edx, byte ptr [ecx-1]
movzx	edx, [esp+edx*2+258h+var_204]
movzx	eax, byte ptr [ecx+1]
movzx	ebx, byte ptr [ecx+8]
movzx	ebx, [esp+ebx*2+258h+var_204]
mov	word ptr [esp+258h+var_240+2], dx
movzx	edx, byte ptr [ecx-2]
movzx	edx, [esp+edx*2+258h+var_204]
mov	[esp+258h+var_23C], dx
mov	edx, eax
shl	edx, 8
or	edx, eax
movzx	eax, byte ptr [ecx+9]
mov	word ptr [esp+258h+var_238], bx
movzx	ebx, byte ptr [ecx+7]
movzx	ebx, [esp+ebx*2+258h+var_204]
mov	word ptr [esp+258h+var_238+2], bx
movzx	ebx, byte ptr [ecx+6]
movzx	ebx, [esp+ebx*2+258h+var_204]
mov	word ptr [esp+258h+var_234], bx
mov	ebx, eax
shl	ebx, 8
or	ebx, eax
sub	edi, esi
fnstsw	ax
mov	word ptr [esp+258h+var_240], bp
mov	[esp+258h+var_23A], dx
mov	word ptr [esp+258h+var_234+2], bx
test	ah, 44h
jp	loc_6FAAF3
cmp	esi, [esp+258h+var_244]
jnb	loc_6FAB3A
movzx	edx, dx
movzx	eax, bx
movzx	ebx, word ptr [esp+258h+var_234]
sub	eax, edx
movzx	edx, [esp+258h+var_23C]
mov	ecx, edi
shl	ecx, 8
sub	ebx, edx
movzx	edx, word ptr [esp+258h+var_238+2]
or	ecx, edi
movzx	edi, word ptr [esp+258h+var_240+2]
sub	edx, edi
movzx	edi, word ptr [esp+258h+var_238]
movzx	ebp, bp
sub	edi, ebp
mov	[esp+258h+var_21C], eax
mov	[esp+258h+var_210], ebx
mov	[esp+258h+var_20C], edx
mov	[esp+258h+var_214], edi
mov	[esp+258h+var_220], eax
mov	ebp, edx

loc_6FAA90:
mov	eax, edi
cdq
idiv	ecx
add	edi, [esp+258h+var_214]
inc	esi
add	al, byte ptr [esp+258h+var_240]
mov	byte ptr [esp+258h+var_228+2], al
mov	eax, ebp
cdq
idiv	ecx
add	ebp, [esp+258h+var_20C]
add	al, byte ptr [esp+258h+var_240+2]
mov	byte ptr [esp+258h+var_228+1], al
mov	eax, ebx
cdq
idiv	ecx
add	ebx, [esp+258h+var_210]
add	al, byte ptr [esp+258h+var_23C]
mov	byte ptr [esp+258h+var_228], al
mov	eax, [esp+258h+var_220]
cdq
idiv	ecx
mov	edx, [esp+258h+var_230]
add	al, byte ptr [esp+258h+var_23A]
mov	byte ptr [esp+258h+var_228+3], al
mov	eax, [esp+258h+var_228]
mov	[edx+esi*4-4], eax
mov	[esp+258h+var_224], eax
mov	eax, [esp+258h+var_21C]
add	[esp+258h+var_220], eax
cmp	esi, [esp+258h+var_244]
jb	short loc_6FAA90
jmp	short loc_6FAB36

loc_6FAAF3:
cmp	esi, [esp+258h+var_244]
jnb	short loc_6FAB3A
mov	ebx, 1
mov	edi, edi

loc_6FAB00:
fld	[esp+258h+var_218]
push	ecx		; float
fstp	dword ptr [esp+25Ch+var_260+4]
push	edi		; int
push	ebx		; int
lea	ecx, [esp+264h+var_238]
push	ecx		; int
lea	edx, [esp+268h+var_240]
push	edx		; int
lea	eax, [esp+26Ch+var_208]
push	eax		; int
call	sub_6FA760
mov	eax, [eax]
mov	ecx, [esp+270h+var_230]
mov	[ecx+esi*4], eax
inc	esi
add	esp, 18h
inc	ebx
mov	[esp+258h+var_224], eax
cmp	esi, [esp+258h+var_244]
jb	short loc_6FAB00

loc_6FAB36:
mov	ecx, [esp+258h+var_22C]

loc_6FAB3A:
add	ecx, 8
sub	[esp+258h+var_248], 1
mov	[esp+258h+var_22C], ecx
jnz	loc_6FA9A0
cmp	[esp+258h+var_244], 100h
jnb	loc_6FA875
mov	edx, [esp+258h+var_244]
mov	eax, [esp+258h+var_224]
mov	edi, [esp+258h+var_230]

loc_6FAB66:
mov	ecx, 100h
lea	edi, [edi+edx*4]
sub	ecx, edx
rep stosd
jmp	loc_6FA875
sub_6FA820 endp

align 10h



sub_6FAB80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
lea	ecx, [esi+10h]
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
call	sub_64E8E0
mov	eax, [esp+4+arg_0]
push	eax
mov	ecx, esi
mov	byte ptr [esi],	0
call	sub_6FA2D0
mov	eax, esi
pop	esi
retn	4
sub_6FAB80 endp

align 10h



sub_6FABB0 proc	near
push	esi
mov	esi, [ecx+0Ch]
mov	dword ptr [ecx], offset	off_143EED0
test	esi, esi
jz	short loc_6FABEF
test	byte ptr [esi],	10h
jz	short loc_6FABCF
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FABCF
call	sub_64A430

loc_6FABCF:
cmp	dword ptr [esi+8], 0
jnz	short loc_6FABE1
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FABE1
call	sub_666B00

loc_6FABE1:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6FABEF:
pop	esi
retn
sub_6FABB0 endp

align 10h



sub_6FAC00 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
mov	ax, [ebp+4]
push	esi
push	edi
mov	edi, ecx
mov	[edi+4], ax
mov	ecx, [ebp+8]
mov	[edi+8], ecx
mov	dx, [ebp+10h]
mov	esi, [edi+0Ch]
mov	[edi+10h], dx
fld	dword ptr [ebp+14h]
fstp	dword ptr [edi+14h]
test	esi, esi
jz	short loc_6FAC64
test	byte ptr [esi],	10h
jz	short loc_6FAC3D
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FAC3D
call	sub_64A430

loc_6FAC3D:
cmp	dword ptr [esi+8], 0
jnz	short loc_6FAC4F
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FAC4F
call	sub_666B00

loc_6FAC4F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	dword ptr [edi+0Ch], 0

loc_6FAC64:
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_6FACB5
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	28h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6FACB0
mov	ebp, [ebp+0Ch]
lea	ecx, [esi+10h]
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
call	sub_64E8E0
push	ebp
mov	ecx, esi
mov	byte ptr [esi],	0
call	sub_6FA2D0
mov	[edi+0Ch], esi
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn	4

loc_6FACB0:
xor	esi, esi
mov	[edi+0Ch], esi

loc_6FACB5:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn	4
sub_6FAC00 endp

align 10h



sub_6FACC0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_6FACFC
test	byte ptr [esi],	10h
jz	short loc_6FACDC
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FACDC
call	sub_64A430

loc_6FACDC:
cmp	dword ptr [esi+8], 0
jnz	short loc_6FACEE
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FACEE
call	sub_666B00

loc_6FACEE:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6FACFC:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	28h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6FAD40
lea	ecx, [esi+10h]
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
call	sub_64E8E0
mov	eax, [esp+8+arg_0]
push	eax
mov	ecx, esi
mov	byte ptr [esi],	0
call	sub_6FA2D0
mov	[edi+0Ch], esi
pop	edi
pop	esi
retn	4

loc_6FAD40:
xor	eax, eax
mov	[edi+0Ch], eax
pop	edi
pop	esi
retn	4
sub_6FACC0 endp

align 10h



sub_6FAD50 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_6FAD72
call	sub_6F4100
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_6FAD72:
push	esi
cmp	eax, 8
jnb	short loc_6FAD7F
mov	esi, 8
jmp	short loc_6FADE4

loc_6FAD7F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_6FAD92
fadd	ds:flt_15FCC08

loc_6FAD92:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_6FADE4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_6FAE44
xor	eax, eax
jmp	short loc_6FAE30
align 10h

loc_6FAE30:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_6FAE30

loc_6FAE44:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_6FAEB6
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_6FAE52:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_6FAE9C
lea	edx, [esi+8]
mov	eax, 4
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_6FAE70:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_6FAE70
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_6FA520
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_6FAE9C:
add	edi, 0Ch
sub	ebx, 1
jnz	short loc_6FAE52
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_6FAEB6:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_6FAD50 endp

align 10h



sub_6FAED0 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	edx, [esp+arg_4]
mov	al, [esp+arg_0]
push	esi
mov	esi, ecx
xor	ecx, ecx
mov	dword ptr [esi], offset	off_155F500
mov	[esi+0Ah], cx
push	edx
mov	ecx, esi
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143EED8
mov	[esi+9], al
mov	dword ptr [esi+0Ch], 0
call	sub_6FA0F0
fldz
mov	al, [esp+4+arg_8]
fstp	dword ptr [esi+10h]
mov	[esi+8], al
mov	eax, esi
pop	esi
retn	0Ch
sub_6FAED0 endp

align 10h


; Attributes: bp-based frame

sub_6FAF20 proc	near

var_488= qword ptr -488h
var_43C= dword ptr -43Ch
var_438= dword ptr -438h
var_434= dword ptr -434h
var_430= dword ptr -430h
var_42C= dword ptr -42Ch
var_428= dword ptr -428h
var_424= dword ptr -424h
var_420= qword ptr -420h
var_414= dword ptr -414h
var_410= dword ptr -410h
var_40C= dword ptr -40Ch
var_400= dword ptr -400h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 474h
push	ebx
push	esi
mov	esi, ecx
cmp	byte ptr [esi+8], 0
push	edi
mov	[esp+480h+var_438], 0
jz	short loc_6FAF47
fld	ds:flt_143EF28
jmp	short loc_6FAF49

loc_6FAF47:
fld1

loc_6FAF49:
mov	ecx, [esi+0Ch]
fstp	[esp+480h+var_430]
movzx	eax, word ptr [esi+0Ah]
fld	[esp+480h+var_430]
push	ecx		; float
fstp	dword ptr [esp+484h+var_488+4]
push	eax		; int
push	ecx		; int
lea	ecx, [esp+48Ch+var_400]
call	sub_6FA820
movzx	eax, byte ptr [esi+9]
sub	eax, 10h
jz	loc_6FB3CE
sub	eax, 2
jz	loc_6FB1B8
sub	eax, 1
jnz	loc_6FB444
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, esi
call	sub_6F9990
mov	ecx, [ebp+arg_4]
mov	edi, eax
push	ecx
push	edi
push	edi
push	1
mov	[esp+490h+var_42C], edi
call	sub_73D6D0
mov	[esp+480h+var_438], eax
test	eax, eax
jz	loc_6FB444
mov	edx, eax
lea	eax, [edx+14h]
mov	[esp+480h+var_424], eax
mov	eax, [eax]
mov	[esp+480h+var_43C], eax
fild	[esp+480h+var_43C]
test	eax, eax
jge	short loc_6FAFD0
fadd	ds:flt_15FCC08

loc_6FAFD0:
fmul	ds:dbl_15FCC48
lea	ecx, [esp+480h+var_414]
lea	ebx, [edi-1]
fstp	[esp+480h+var_434]
fld	[esp+480h+var_434]
fsub	ds:dbl_15FCC40
fstp	[esp+480h+var_428]
fld	[esp+480h+var_428]
fst	[esp+480h+var_414]
fmul	dword ptr [esi+10h]
fstp	[esp+480h+var_410]
fldz
fstp	[esp+480h+var_40C]
call	sub_6F9830
mov	edi, 1
cmp	ebx, edi
jbe	loc_6FB111
add	edx, 0Ch
mov	[esp+480h+var_430], edx

loc_6FB01D:
mov	ecx, edi
mov	[esp+480h+var_43C], ecx
fild	[esp+480h+var_43C]
mov	esi, 1
test	ecx, ecx
jge	short loc_6FB036
fadd	ds:flt_15FCC08

loc_6FB036:
fsub	[esp+480h+var_434]
fadd	ds:dbl_15FCC48
fstp	dword ptr [esp+480h+var_420]

loc_6FB044:
fld	dword ptr [esp+480h+var_420]
mov	edx, esi
sub	esp, 8
mov	[esp+488h+var_43C], edx
fstp	dword ptr [esp+488h+var_488+4]
fild	[esp+488h+var_43C]
test	edx, edx
jge	short loc_6FB063
fadd	ds:flt_15FCC08

loc_6FB063:
fsub	[esp+488h+var_434]
lea	ecx, [esp+488h+var_414]
fadd	ds:dbl_15FCC48
fstp	[esp+488h+var_43C]
fld	[esp+488h+var_43C]
fstp	dword ptr [esp+488h+var_488]
call	sub_6F97A0
fmul	ds:dbl_143EF20
sub	esp, 8
fdiv	[esp+488h+var_428]
fadd	ds:dbl_15FCC48
fstp	[esp+488h+var_43C]
fld	[esp+488h+var_43C]
fstp	[esp+488h+var_488]
call	_floor
fstp	[esp+488h+var_43C]
add	esp, 8
fld	[esp+480h+var_43C]
call	__ftol2_sse
cmp	eax, 0FFh
jg	short loc_6FB0C2
cmp	eax, 100h
jb	short loc_6FB0C7

loc_6FB0C2:
mov	eax, 0FFh

loc_6FB0C7:
mov	eax, [esp+eax*4+480h+var_400]
mov	ecx, eax
shr	ecx, 18h
shl	ecx, 8
movzx	edx, al
or	ecx, edx
mov	edx, eax
shr	edx, 8
shl	ecx, 8
movzx	edx, dl
or	ecx, edx
shr	eax, 10h
movzx	eax, al
shl	ecx, 8
or	ecx, eax
push	ecx
mov	ecx, [esp+484h+var_430]
push	edi
push	esi
call	sub_73CA00
inc	esi
cmp	esi, ebx
jb	loc_6FB044
inc	edi
cmp	edi, ebx
jb	loc_6FB01D

loc_6FB111:
mov	eax, [esp+480h+var_4]
mov	ecx, eax
mov	edx, eax
mov	ebx, eax
mov	edi, 1
shr	ecx, 10h
shr	edx, 8
shr	ebx, 18h
cmp	[esp+480h+var_42C], edi
jbe	loc_6FB444
movzx	esi, bl
mov	ebx, [esp+480h+var_438]
shl	esi, 8
movzx	eax, al
or	esi, eax
shl	esi, 8
movzx	edx, dl
or	esi, edx
movzx	eax, cl
shl	esi, 8
or	esi, eax
add	ebx, 0Ch

loc_6FB158:
push	esi
push	0
push	edi
mov	ecx, ebx
call	sub_73CA00
mov	ecx, [esp+480h+var_438]
mov	edx, [ecx+10h]
push	esi
push	edi
dec	edx
push	edx
mov	ecx, ebx
call	sub_73CA00
mov	eax, [esp+480h+var_424]
mov	ecx, [eax]
mov	edx, [esp+480h+var_438]
mov	eax, [edx+10h]
push	esi
dec	ecx
sub	eax, edi
push	ecx
dec	eax
push	eax
mov	ecx, ebx
call	sub_73CA00
mov	ecx, [esp+480h+var_424]
mov	edx, [ecx]
sub	edx, edi
push	esi
dec	edx
push	edx
push	0
mov	ecx, ebx
call	sub_73CA00
inc	edi
cmp	edi, [esp+480h+var_42C]
jb	short loc_6FB158
mov	eax, [esp+480h+var_438]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6FB1B8:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, esi
call	sub_6F9990
mov	ecx, [ebp+arg_4]
mov	esi, eax
push	ecx
push	esi
push	esi
push	1
mov	[esp+490h+var_42C], esi
call	sub_73D6D0
mov	[esp+480h+var_438], eax
test	eax, eax
jz	loc_6FB444
mov	edx, [eax+14h]
fild	dword ptr [eax+14h]
test	edx, edx
jge	short loc_6FB1F2
fadd	ds:flt_15FCC08

loc_6FB1F2:
fmul	ds:dbl_15FCC48
lea	ebx, [esi-1]
mov	edi, 1
fstp	[esp+480h+var_434]
fld	[esp+480h+var_434]
fsub	ds:dbl_15FCC40
fstp	[esp+480h+var_428]
cmp	ebx, edi
jbe	loc_6FB323
add	eax, 0Ch
mov	[esp+480h+var_430], eax

loc_6FB221:
mov	eax, edi
mov	[esp+480h+var_43C], eax
fild	[esp+480h+var_43C]
mov	esi, 1
test	eax, eax
jge	short loc_6FB23A
fadd	ds:flt_15FCC08

loc_6FB23A:
fsub	[esp+480h+var_434]
fadd	ds:dbl_15FCC48
fstp	[esp+480h+var_43C]
fld	[esp+480h+var_43C]
fmul	st, st
fstp	[esp+480h+var_420]

loc_6FB252:
mov	ecx, esi
mov	[esp+480h+var_43C], ecx
fild	[esp+480h+var_43C]
test	ecx, ecx
jge	short loc_6FB266
fadd	ds:flt_15FCC08

loc_6FB266:
fsub	[esp+480h+var_434]
fadd	ds:dbl_15FCC48
fstp	[esp+480h+var_43C]
fld	[esp+480h+var_43C]
fmul	st, st
fadd	[esp+480h+var_420]
fstp	[esp+480h+var_43C]
fld	[esp+480h+var_43C]
call	__CIsqrt
fstp	[esp+480h+var_43C]
fld	[esp+480h+var_43C]
sub	esp, 8
fmul	ds:dbl_143EF20
fdiv	[esp+488h+var_428]
fadd	ds:dbl_15FCC48
fstp	[esp+488h+var_43C]
fld	[esp+488h+var_43C]
fstp	[esp+488h+var_488]
call	_floor
fstp	[esp+488h+var_43C]
add	esp, 8
fld	[esp+480h+var_43C]
call	__ftol2_sse
cmp	eax, 0FFh
jg	short loc_6FB2D4
cmp	eax, 100h
jb	short loc_6FB2D9

loc_6FB2D4:
mov	eax, 0FFh

loc_6FB2D9:
mov	eax, [esp+eax*4+480h+var_400]
mov	edx, eax
shr	edx, 18h
movzx	ecx, al
shl	edx, 8
or	edx, ecx
mov	ecx, eax
shr	ecx, 8
movzx	ecx, cl
shl	edx, 8
or	edx, ecx
mov	ecx, [esp+480h+var_430]
shr	eax, 10h
movzx	eax, al
shl	edx, 8
or	edx, eax
push	edx
push	edi
push	esi
call	sub_73CA00
inc	esi
cmp	esi, ebx
jb	loc_6FB252
inc	edi
cmp	edi, ebx
jb	loc_6FB221

loc_6FB323:
mov	eax, [esp+480h+var_4]
mov	ecx, eax
mov	edx, eax
mov	ebx, eax
mov	edi, 1
shr	ecx, 10h
shr	edx, 8
shr	ebx, 18h
cmp	[esp+480h+var_42C], edi
jbe	loc_6FB444
movzx	esi, bl
mov	ebx, [esp+480h+var_438]
shl	esi, 8
movzx	eax, al
or	esi, eax
shl	esi, 8
movzx	edx, dl
or	esi, edx
movzx	eax, cl
shl	esi, 8
or	esi, eax
add	ebx, 0Ch
lea	ebx, [ebx+0]

loc_6FB370:
push	esi
push	0
push	edi
mov	ecx, ebx
call	sub_73CA00
mov	ecx, [esp+480h+var_438]
mov	edx, [ecx+10h]
push	esi
push	edi
dec	edx
push	edx
mov	ecx, ebx
call	sub_73CA00
mov	eax, [esp+480h+var_438]
mov	ecx, [eax+14h]
mov	edx, [eax+10h]
push	esi
dec	ecx
sub	edx, edi
push	ecx
dec	edx
push	edx
mov	ecx, ebx
call	sub_73CA00
mov	eax, [esp+480h+var_438]
mov	ecx, [eax+14h]
sub	ecx, edi
push	esi
dec	ecx
push	ecx
push	0
mov	ecx, ebx
call	sub_73CA00
inc	edi
cmp	edi, [esp+480h+var_42C]
jb	short loc_6FB370
mov	eax, [esp+480h+var_438]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8

loc_6FB3CE:
mov	edx, [ebp+arg_4]
push	edx
push	1
push	100h
push	1
call	sub_73D6D0
mov	[esp+480h+var_438], eax
test	eax, eax
jz	short loc_6FB444
xor	esi, esi
cmp	[eax+10h], esi
jbe	short loc_6FB444
mov	edi, eax
add	edi, 0Ch

loc_6FB3F4:
mov	eax, esi
cmp	esi, 100h
jb	short loc_6FB403
mov	eax, 0FFh

loc_6FB403:
mov	eax, [esp+eax*4+480h+var_400]
mov	ecx, eax
shr	ecx, 18h
shl	ecx, 8
movzx	edx, al
or	ecx, edx
mov	edx, eax
shr	edx, 8
shl	ecx, 8
movzx	edx, dl
or	ecx, edx
shr	eax, 10h
movzx	eax, al
shl	ecx, 8
or	ecx, eax
push	ecx
push	0
push	esi
mov	ecx, edi
call	sub_73CA00
mov	ecx, [esp+480h+var_438]
inc	esi
cmp	esi, [ecx+10h]
jb	short loc_6FB3F4

loc_6FB444:
mov	eax, [esp+480h+var_438]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_6FAF20 endp

align 10h



; int __stdcall	sub_6FB460(int,	int, float, int)
sub_6FB460 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 48h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+58h+arg_4]
mov	eax, [edi+48h]
mov	ebp, [eax+0Ch]
mov	esi, ecx
lea	ecx, [esp+58h+var_30]
call	sub_64E8E0
xor	ebx, ebx
cmp	[esi+8], ebx
jnz	short loc_6FB491
mov	eax, [esi+0Ch]
cmp	eax, ebx
jnz	short loc_6FB4C3
cmp	[esi+8], ebx
jnz	short loc_6FB491
jmp	short loc_6FB4BB

loc_6FB491:
mov	ecx, [esi+0Ch]
push	ecx
mov	ecx, [edi+70h]
lea	edx, [esp+5Ch+var_48]
push	edx
mov	[esp+60h+var_48], ebx
mov	[esp+60h+var_44], ebx
call	sub_6ABEE0
mov	ecx, [esp+58h+var_48]
mov	edi, ecx
cmp	ecx, ebx
jz	short loc_6FB4B9
call	sub_666B00

loc_6FB4B9:
mov	eax, edi

loc_6FB4BB:
cmp	eax, ebx
jz	loc_6FB654

loc_6FB4C3:
mov	edi, [eax+0Ch]
cmp	edi, ebx
jz	loc_6FB654
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	ebp
mov	ecx, edi
call	edx
mov	[esp+58h+var_48], eax
cmp	eax, ebx
jz	loc_6FB654
movzx	eax, byte ptr [esi]
add	eax, 0FFFFFFC0h
xor	ebp, ebp
mov	ecx, 1
mov	[esp+58h+arg_4], ecx
cmp	eax, 3		; switch 4 cases
ja	short loc_6FB51D ; default
jmp	ds:off_6FB660[eax*4] ; switch jump

loc_6FB501:		; jumptable 006FB4FA case 0
xor	ebp, ebp
mov	[esp+58h+arg_4], ecx
jmp	short loc_6FB51D ; default

loc_6FB509:		; jumptable 006FB4FA case 1
mov	[esp+58h+arg_4], ecx
jmp	short loc_6FB51B

loc_6FB50F:		; jumptable 006FB4FA case 2
xor	ebp, ebp
mov	[esp+58h+arg_4], ebx
jmp	short loc_6FB51D ; default

loc_6FB517:		; jumptable 006FB4FA case 3
mov	[esp+58h+arg_4], ebx

loc_6FB51B:
mov	ebp, ecx

loc_6FB51D:		; default
fld	dword ptr [esi+10h]
mov	eax, [esp+58h+arg_C]
fstp	[esp+58h+var_30]
fld	dword ptr [esi+14h]
fstp	[esp+58h+var_2C]
fld	dword ptr [esi+18h]
fstp	[esp+58h+var_28]
fld	dword ptr [esi+1Ch]
fstp	[esp+58h+var_24]
fld	dword ptr [esi+20h]
fstp	[esp+58h+var_20]
fld	dword ptr [esi+24h]
fstp	[esp+58h+var_1C]
cmp	eax, ebx
jz	short loc_6FB559
push	eax
lea	ecx, [esp+5Ch+var_30]
call	sub_64EBB0

loc_6FB559:
mov	eax, [edi]
mov	edx, [eax+14h]
lea	ecx, [esp+58h+var_40]
push	ecx
mov	ecx, edi
call	edx
mov	ebx, [esp+58h+arg_0]
mov	eax, [esp+58h+var_48]
lea	ecx, [esp+58h+var_30]
lea	esi, [ebx+4]
push	ecx
mov	ecx, esi
mov	[ebx], eax
call	sub_64E9E0
fld	[esp+58h+arg_8]
fst	[esp+58h+var_18]
lea	edx, [esp+58h+var_18]
fldz
push	edx
fst	[esp+5Ch+var_14]
mov	ecx, esi
fst	[esp+5Ch+var_10]
fst	[esp+5Ch+var_C]
fstp	[esp+5Ch+var_4]
fstp	[esp+5Ch+var_8]
call	sub_64EAF0
fild	[esp+58h+var_40]
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
fadd	dword ptr [esi+8]
fstp	dword ptr [esi+8]
fild	[esp+58h+var_3C]
fadd	dword ptr [esi+14h]
fstp	dword ptr [esi+14h]
call	edx
mov	[esp+58h+arg_C], eax
fild	[esp+58h+arg_C]
test	eax, eax
jge	short loc_6FB5D9
fadd	ds:flt_15FCC08

loc_6FB5D9:
fld1
mov	eax, [edi]
fdivrp	st(1), st
mov	edx, [eax+8]
mov	ecx, edi
fstp	[esp+58h+arg_C]
call	edx
mov	[esp+58h+arg_0], eax
fild	[esp+58h+arg_0]
test	eax, eax
jge	short loc_6FB5FC
fadd	ds:flt_15FCC08

loc_6FB5FC:
fld1
mov	eax, [esp+58h+arg_4]
fdivrp	st(1), st
pop	edi
fstp	[esp+54h+arg_0]
fld	dword ptr [esi]
fld	[esp+54h+arg_C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fmul	st, st(1)
fstp	dword ptr [esi+4]
fmul	dword ptr [esi+8]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fld	[esp+54h+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi+10h]
fmul	st, st(1)
fstp	dword ptr [esi+10h]
fmul	dword ptr [esi+14h]
fstp	dword ptr [esi+14h]
pop	esi
mov	[ebx+1Ch], ebp
mov	[ebx+20h], eax
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	10h

loc_6FB654:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 48h
retn	10h
sub_6FB460 endp

off_6FB660 dd offset loc_6FB501	; jump table for switch	statement
dd offset loc_6FB509
dd offset loc_6FB50F
dd offset loc_6FB517



sub_6FB670 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
test	byte ptr [ecx],	50h
jz	short loc_6FB6C8
cmp	dword ptr [ecx+8], 0
jnz	short loc_6FB683
mov	ecx, [ecx+0Ch]
jmp	short loc_6FB6BB

loc_6FB683:
mov	eax, [ecx+0Ch]
mov	edx, [esp+8+arg_0]
push	esi
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, [edx+70h]
mov	[esp+14h+var_8], 0
mov	[esp+14h+var_4], 0
call	sub_6ABEE0
mov	ecx, [esp+0Ch+var_8]
mov	esi, ecx
test	ecx, ecx
jz	short loc_6FB6B8
call	sub_666B00

loc_6FB6B8:
mov	ecx, esi
pop	esi

loc_6FB6BB:
test	ecx, ecx
jz	short loc_6FB6C8
mov	eax, [ecx+0Ch]
add	esp, 8
retn	4

loc_6FB6C8:
xor	eax, eax
add	esp, 8
retn	4
sub_6FB670 endp




sub_6FB6D0 proc	near

var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	al, [esi]
push	edi
mov	edi, ecx
mov	[edi], al
test	al, al
jnz	short loc_6FB71C
fld	[esp+20h+arg_8]
mov	ecx, [esp+20h+arg_4]
mov	edx, [ecx+4]
sub	esp, 8
mov	eax, esp
fstp	[esp+28h+var_24]
mov	[eax], edx
push	ecx		; int
mov	ecx, [esi+4]
mov	eax, esp
lea	edx, [esp+2Ch+arg_8]
push	edx		; int
mov	[eax], ecx
call	sub_740830
mov	eax, [eax]
mov	[edi+4], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch

loc_6FB71C:
test	al, 10h
jz	loc_6FB89E
mov	ecx, [esp+20h+arg_4]
mov	edx, [ecx+4]
mov	ecx, [edi+4]
mov	ebx, [esi+4]
mov	[esp+20h+var_C], edx
test	ecx, ecx
jz	short loc_6FB73E
call	sub_64A430

loc_6FB73E:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	14h
call	edx
test	eax, eax
jz	short loc_6FB774
mov	cl, [esi+1]
movzx	edx, byte ptr [esi]
and	cl, 1
mov	byte ptr [esp+20h+var_10], cl
movzx	ecx, word ptr [ebx+0Ah]
mov	ebp, [esp+20h+var_10]
push	ebp
push	ecx
push	edx
mov	ecx, eax
call	sub_6FAED0
jmp	short loc_6FB776

loc_6FB774:
xor	eax, eax

loc_6FB776:
mov	[edi+4], eax
test	eax, eax
jz	loc_6FB857
movzx	eax, word ptr [eax+0Ah]
xor	edx, edx
xor	ebp, ebp
cmp	dx, ax
jnb	loc_6FB857

loc_6FB792:
mov	eax, [ebx+0Ch]
movzx	ecx, byte ptr [eax+ebp*8]
lea	esi, ds:0[ebp*8]
mov	[esp+20h+var_10], ecx
mov	ecx, [esp+20h+var_C]
mov	edx, [ecx+0Ch]
movzx	eax, byte ptr [edx+esi]
fild	[esp+20h+var_10]
fstp	[esp+20h+var_8]
mov	[esp+20h+var_10], eax
sub	esp, 8
fild	[esp+28h+var_10]
fld	[esp+28h+var_8]
fld	st
fsubp	st(2), st
fld	[esp+28h+arg_8]
fld	st
fmulp	st(3), st
fxch	st(2)
fnstcw	word ptr [esp+28h+var_10]
movzx	eax, word ptr [esp+28h+var_10]
faddp	st(1), st
or	eax, 0C00h
fstp	[esp+28h+var_8]
fld	[esp+28h+var_8]
mov	[esp+28h+var_8], eax
fadd	ds:dbl_15FCC48
mov	eax, [edi+4]
fldcw	word ptr [esp+28h+var_8]
mov	eax, [eax+0Ch]
fistp	[esp+28h+var_8]
mov	dl, byte ptr [esp+28h+var_8]
mov	[esi+eax], dl
mov	eax, [ecx+0Ch]
mov	edx, [eax+esi+4]
fldcw	word ptr [esp+28h+var_10]
add	eax, esi
mov	ecx, esp
mov	[ecx], edx
mov	eax, [ebx+0Ch]
add	eax, esi
mov	eax, [eax+4]
fstp	[esp+28h+var_24]
push	ecx		; int
mov	ecx, esp
mov	[ecx], eax
lea	ecx, [esp+2Ch+var_4]
push	ecx		; int
call	sub_740830
mov	edx, [edi+4]
mov	ecx, [edx+0Ch]
mov	edx, [eax]
mov	[ecx+esi+4], edx
mov	eax, [edi+4]
movzx	ecx, word ptr [eax+0Ah]
inc	ebp
cmp	ebp, ecx
jb	loc_6FB792
mov	esi, [esp+20h+arg_0]

loc_6FB857:
fld	dword ptr [ebx+10h]
mov	edx, [esp+20h+var_C]
mov	eax, [edi+4]
fstp	[esp+20h+arg_0]
fld	dword ptr [edx+10h]
xor	ebx, ebx
fld	[esp+20h+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+20h+arg_8]
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	dword ptr [eax+10h]
cmp	[edi+8], ebx
jnz	short loc_6FB896
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_6FB896
call	sub_666B00

loc_6FB896:
mov	[edi+8], ebx
mov	[edi+0Ch], ebx
jmp	short loc_6FB8AE

loc_6FB89E:
test	al, 40h
jz	short loc_6FB8AE
lea	ecx, [esi+8]
push	ecx
lea	ecx, [edi+8]
call	sub_6EFC40

loc_6FB8AE:
mov	edx, [esp+20h+arg_4]
fld	[esp+20h+arg_8]
push	ecx		; float
fstp	[esp+24h+var_24]
add	edx, 10h
push	edx		; int
add	esi, 10h
push	esi		; int
lea	ecx, [edi+10h]
call	sub_64E900
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_6FB6D0 endp

align 10h



; int __thiscall sub_6FB8E0(void *, char)
sub_6FB8E0 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
mov	dword ptr [edi], offset	off_143EED0
test	esi, esi
jz	short loc_6FB922
test	byte ptr [esi],	10h
jz	short loc_6FB902
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FB902
call	sub_64A430

loc_6FB902:
cmp	dword ptr [esi+8], 0
jnz	short loc_6FB914
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FB914
call	sub_666B00

loc_6FB914:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6FB922:
test	[esp+8+arg_0], 1
jz	short loc_6FB932
push	edi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6FB932:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_6FB8E0 endp

align 10h



sub_6FB940 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
push	eax
mov	dword ptr [esi], offset	off_143EED0
mov	dword ptr [esi+0Ch], 0
call	sub_6FAC00
mov	eax, esi
pop	esi
retn	4
sub_6FB940 endp




sub_6FB960 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	eax, 4
mov	edx, 1505h

loc_6FB970:
movzx	edi, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, edi
test	eax, eax
ja	short loc_6FB970
push	edx
push	esi
push	ecx
call	sub_6FA520
pop	edi
pop	esi
retn	4
sub_6FB960 endp

align 10h



sub_6FB990 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h

sub	esp, 40h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
push	edi
push	offset off_167DF1C
lea	ecx, [esp+58h+var_38]
call	sub_666020
mov	esi, [esp+50h+arg_0]
lea	eax, [esp+50h+var_38]
push	eax
lea	ecx, [esp+54h+var_40]
xor	ebx, ebx
push	ecx
mov	ecx, esi
xor	ebp, ebp
mov	[esp+58h+var_40], ebx
mov	[esp+58h+var_3C], ebx
call	sub_667230
cmp	eax, 3
jnz	loc_6FBAB1
mov	eax, [esi+28h]
mov	edx, [esp+50h+arg_4]
push	eax
push	edx
mov	ecx, edi
call	sub_6FAF20
mov	[esp+50h+arg_0], eax
cmp	eax, ebx
jz	loc_6FBA90
mov	dl, [esp+50h+arg_14]
mov	esi, [esi+28h]
mov	ecx, 1
mov	[esp+50h+var_30], ecx
mov	[esp+50h+var_24], ecx
mov	ecx, [esp+50h+arg_10]
mov	[esp+50h+var_14], ecx
mov	ecx, [esp+50h+arg_8]
mov	[esp+50h+var_20], eax
mov	eax, [esp+50h+arg_C]
xor	edi, edi
mov	[esp+50h+var_28], ebx
mov	[esp+50h+var_2C], 2
mov	[esp+50h+var_1C], ebx
mov	[esp+50h+var_18], eax
mov	[esp+50h+var_10], ebx
mov	[esp+50h+var_C], ebx
mov	[esp+50h+var_4], dl
mov	[esp+50h+var_8], esi
cmp	ecx, ebx
jz	short loc_6FBA52
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+50h+var_30]
push	edx
call	eax
mov	esi, [esp+50h+var_8]
mov	edi, eax

loc_6FBA52:
mov	edx, [esi]
mov	eax, [edx+28h]
push	ebx
push	1Ch
mov	ecx, esi
call	eax
cmp	eax, ebx
jz	short loc_6FBAAD
push	2
lea	ecx, [esp+54h+var_38]
push	ecx
push	edi
mov	ecx, eax
call	sub_6FA620
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FBA81
mov	ecx, [esp+50h+var_3C]
push	ebp
call	sub_666CB0

loc_6FBA81:
cmp	edi, ebx
jz	short loc_6FBA8C
mov	ecx, edi
call	sub_64A400

loc_6FBA8C:
cmp	ebp, ebx
jnz	short loc_6FBA9E

loc_6FBA90:
mov	ecx, [esp+50h+var_3C]
push	offset aFailedToCreate ; "Failed to create gradient"
call	sub_666D50

loc_6FBA9E:
mov	ecx, [esp+50h+arg_0]
cmp	ecx, ebx
jz	short loc_6FBABC
call	sub_64A400
jmp	short loc_6FBABC

loc_6FBAAD:
xor	ebp, ebp
jmp	short loc_6FBA81

loc_6FBAB1:
lea	ecx, [esp+50h+var_40]
call	sub_6666C0
mov	ebp, eax

loc_6FBABC:
mov	eax, [esp+50h+var_40]
cmp	eax, 1
jnz	short loc_6FBAD0
mov	ecx, [esp+50h+var_3C]
call	sub_666B00
jmp	short loc_6FBADE

loc_6FBAD0:
cmp	eax, 2
jl	short loc_6FBADE
mov	ecx, [esp+50h+var_3C]
call	sub_64A430

loc_6FBADE:
mov	ecx, [esp+50h+var_38]
cmp	ecx, ebx
jz	short loc_6FBAF2
mov	edx, [ecx]
mov	eax, [esp+50h+var_34]
mov	edx, [edx+8]
push	eax
call	edx

loc_6FBAF2:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 40h
retn	18h
sub_6FB990 endp

align 10h



sub_6FBB00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
cmp	byte ptr [eax+44h], 0
push	ebx
push	esi
push	edi
jnz	short loc_6FBB17
cmp	dword ptr [eax+18h], 0
jnz	short loc_6FBB17
xor	ebx, ebx
jmp	short loc_6FBB1C

loc_6FBB17:
mov	ebx, 1

loc_6FBB1C:
mov	edx, [eax+0Ch]
mov	ecx, [eax+8]
mov	esi, [eax+20h]
mov	edi, [ecx+10h]
mov	ecx, [ecx+18h]
mov	eax, [eax+38h]
push	ebx
push	edx
push	esi
push	edi
push	ecx
mov	ecx, [esp+20h+arg_0]
push	eax
call	sub_6FB990
mov	edi, [esp+0Ch+arg_4]
mov	ecx, [edi]
mov	esi, eax
test	ecx, ecx
jz	short loc_6FBB4E
call	sub_666B00

loc_6FBB4E:
mov	[edi], esi
xor	eax, eax
pop	edi
test	esi, esi
pop	esi
setnz	al
pop	ebx
retn	10h
sub_6FBB00 endp

align 10h



sub_6FBB60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
mov	ebp, [edi+324h]
mov	esi, ecx
test	ebp, ebp
jnz	short loc_6FBB7A
lea	ebp, [edi+28h]

loc_6FBB7A:
mov	eax, [ebp+30h]
sub	eax, [ebp+2Ch]
mov	byte ptr [ebp+15h], 0
cmp	eax, 1
jge	short loc_6FBB90
mov	ecx, ebp
call	sub_6A9C60

loc_6FBB90:
mov	eax, [ebp+2Ch]
mov	ecx, [ebp+3Ch]
mov	cl, [eax+ecx]
movzx	edx, cl
inc	eax
mov	[ebp+2Ch], eax
push	edx
lea	ebp, [edi+14h]
push	offset aFillstyleReadT ; "  FillStyle read type	= 0x%X\n"
push	ebp
mov	[esi], cl
mov	byte ptr [esi+1], 0
call	nullsub_2
mov	al, [esi]
add	esp, 0Ch
test	al, al
jnz	short loc_6FBBF9
mov	eax, [esp+20h+arg_4]
push	eax
lea	ecx, [esp+24h+arg_4]
push	ecx
mov	ecx, edi
call	sub_6FC320
push	offset aColor_0	; "  color: "
push	ebp
call	nullsub_2
add	esp, 8
cmp	byte ptr [esp+20h+arg_4+3], 0FFh
jnb	short loc_6FBBE8
or	byte ptr [esi+1], 2

loc_6FBBE8:
mov	edx, [esp+20h+arg_4]
mov	[esi+4], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6FBBF9:
test	al, 10h
jz	loc_6FBE50
mov	ecx, [edi+324h]
test	ecx, ecx
jnz	short loc_6FBC0E
lea	ecx, [edi+28h]

loc_6FBC0E:
lea	eax, [esi+10h]
push	eax
call	sub_6AA8A0
mov	ebx, [edi+324h]
test	ebx, ebx
jnz	short loc_6FBC24
lea	ebx, [edi+28h]

loc_6FBC24:
mov	ecx, [ebx+30h]
sub	ecx, [ebx+2Ch]
mov	byte ptr [ebx+15h], 0
cmp	ecx, 1
jge	short loc_6FBC3A
mov	ecx, ebx
call	sub_6A9C60

loc_6FBC3A:
mov	eax, [ebx+2Ch]
mov	edx, [ebx+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[ebx+2Ch], eax
movzx	ax, cl
movzx	ebx, ax
test	bl, 10h
jz	short loc_6FBC57
or	byte ptr [esi+1], 1

loc_6FBC57:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
and	ebx, 0Fh
push	14h
mov	[esp+28h+var_10], ebx
call	eax
test	eax, eax
jz	short loc_6FBC90
mov	cl, [esi+1]
and	cl, 1
mov	byte ptr [esp+20h+arg_0], cl
mov	edx, [esp+20h+arg_0]
movzx	ecx, byte ptr [esi]
push	edx
push	ebx
push	ecx
mov	ecx, eax
call	sub_6FAED0
jmp	short loc_6FBC92

loc_6FBC90:
xor	eax, eax

loc_6FBC92:
mov	[esi+4], eax
test	eax, eax
jz	loc_6FBE3C
movzx	ecx, word ptr [eax+0Ah]
cmp	cx, bx
jnz	loc_6FBE35
movzx	ecx, word ptr [esp+20h+var_10]
xor	ebx, ebx
mov	[esp+20h+arg_0], ecx
test	ecx, ecx
jle	short loc_6FBCF5
add	eax, 0Ch
lea	esp, [esp+0]

loc_6FBCC0:
mov	edx, [esp+20h+arg_4]
mov	ecx, [eax]
push	edx
lea	ebp, ds:0[ebx*8]
push	edi
add	ecx, ebp
call	sub_6F9740
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
add	eax, 0Ch
cmp	byte ptr [ecx+ebp+7], 0FFh
jnb	short loc_6FBCEA
or	byte ptr [esi+1], 2

loc_6FBCEA:
inc	ebx
cmp	ebx, [esp+20h+arg_0]
jl	short loc_6FBCC0
mov	ecx, [esp+20h+arg_0]

loc_6FBCF5:
push	ecx
lea	eax, [edi+14h]
push	offset aGradientsNumgr ; "  gradients: numGradients = %d\n"
push	eax
call	nullsub_2
add	esp, 0Ch
cmp	byte ptr [esi],	13h
jnz	short loc_6FBD32
mov	ecx, edi
call	sub_667800
movsx	edx, ax
mov	eax, [esi+4]
mov	[esp+20h+arg_4], edx
fild	[esp+20h+arg_4]
fmul	ds:dbl_15FD8A0
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fstp	dword ptr [eax+10h]

loc_6FBD32:
mov	eax, [edi+20h]
mov	ebx, [eax+114h]
lea	ecx, [ebx+1]
mov	[eax+114h], ecx
mov	eax, [edi+20h]
lea	ecx, [eax+4Ch]
mov	eax, [ecx]
neg	eax
sbb	eax, eax
and	eax, ecx
jz	short loc_6FBDAE
test	byte ptr [eax+10h], 2
jz	short loc_6FBDAE
push	ecx
xor	ebp, ebp
mov	eax, esp
mov	[esp+24h+var_10], ebp
mov	[esp+24h+var_C], ebp
mov	[eax], ebx
mov	edi, [edi+20h]
lea	edx, [esp+24h+var_10]
push	edx
mov	ecx, edi
call	sub_6AF4A0
test	al, al
jz	short loc_6FBD89
lea	eax, [esp+20h+var_10]
push	eax
lea	ecx, [esi+8]
call	sub_6EFC80

loc_6FBD89:
cmp	[esp+20h+var_10], ebp
jnz	loc_6FBEC5
mov	ecx, [esp+20h+var_C]
cmp	ecx, ebp
jz	loc_6FBEC5
call	sub_666B00
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6FBDAE:
mov	ebp, [esi+4]
mov	edx, off_167DF18
mov	eax, [edx+4]
push	ebp
mov	ecx, offset off_167DF18
call	eax
lea	ecx, [esp+20h+var_8]
push	ecx
push	ecx
mov	eax, esp
lea	edx, [esp+28h+var_10]
mov	[esp+28h+var_8], offset	off_167DF18
mov	[esp+28h+var_4], ebp
push	edx
mov	ecx, edi
mov	[eax], ebx
call	sub_6FD8B0
cmp	[esp+20h+var_10], 0
jnz	short loc_6FBDF2
cmp	[esp+20h+var_C], 0
jz	short loc_6FBE13

loc_6FBDF2:
lea	eax, [esp+20h+var_10]
push	eax
lea	ecx, [esi+8]
call	sub_6EFC80
cmp	[esp+20h+var_10], 0
jnz	short loc_6FBE13
mov	ecx, [esp+20h+var_C]
test	ecx, ecx
jz	short loc_6FBE13
call	sub_666B00

loc_6FBE13:
mov	ecx, [esp+20h+var_8]
test	ecx, ecx
jz	loc_6FBEC5
mov	edx, [ecx]
mov	eax, [esp+20h+var_4]
mov	edx, [edx+8]
push	eax
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6FBE35:
mov	ecx, eax
call	sub_64A430

loc_6FBE3C:
mov	dword ptr [esi+4], 0
mov	byte ptr [esi],	0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_6FBE50:
test	al, 40h
jz	short loc_6FBEC5
mov	ecx, edi
call	sub_667800
movzx	ebx, ax
movzx	eax, bx
push	eax
push	offset aBitmapcharD ; "	 BitmapChar = %d\n"
push	ebp
call	nullsub_2
add	esp, 8
mov	eax, esp
lea	edx, [esi+8]
mov	[eax], ebx
mov	ecx, [edi+20h]
push	edx
call	sub_6AF4A0
test	al, al
jz	short loc_6FBEA9
mov	ecx, [edi+2D0h]
test	ecx, ecx
jz	short loc_6FBEA9
mov	al, [esi]
cmp	al, 42h
jz	short loc_6FBE98
cmp	al, 40h
jnz	short loc_6FBEA9

loc_6FBE98:
mov	eax, [esi+0Ch]
lea	edx, [esp+20h+arg_4]
push	edx
mov	[esp+24h+arg_4], eax
call	sub_6FB960

loc_6FBEA9:
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_6FBEB6
lea	eax, [edi+28h]

loc_6FBEB6:
lea	ecx, [esi+10h]
push	ecx
mov	ecx, eax
call	sub_6AA8A0
or	byte ptr [esi+1], 2

loc_6FBEC5:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_6FBB60 endp

align 10h



; int __stdcall	sub_6FBED0(int,	int, float, int)
sub_6FBED0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 38h
push	ebx
push	ebp
push	esi
mov	esi, [esp+44h+arg_4]
mov	eax, [esi+48h]
push	edi
mov	edi, ecx
mov	ecx, [eax+0Ch]
mov	[esp+48h+arg_4], ecx
lea	ecx, [esp+48h+var_30]
call	sub_64E8E0
lea	ebx, [edi+8]
xor	eax, eax
cmp	[ebx], eax
jnz	short loc_6FBEFE
mov	ebp, [ebx+4]
jmp	short loc_6FBF26

loc_6FBEFE:
mov	edx, [ebx+4]
mov	ecx, [esi+70h]
mov	[esp+48h+var_38], eax
mov	[esp+48h+var_34], eax
push	edx
lea	eax, [esp+4Ch+var_38]
push	eax
call	sub_6ABEE0
mov	ecx, [esp+48h+var_38]
mov	ebp, ecx
test	ecx, ecx
jz	short loc_6FBF26
call	sub_666B00

loc_6FBF26:
test	ebp, ebp
jnz	short loc_6FBF6A
cmp	dword ptr [ebx], 1
jz	loc_6FC094
mov	eax, [esi+64h]
mov	ecx, [esi+48h]
mov	edx, [esi+5Ch]
mov	ebp, [esi+58h]
mov	esi, [esi+6Ch]
push	0
push	eax
push	ecx
mov	ecx, [edi+4]
push	edx
push	ebp
push	esi
call	sub_6FB990
mov	ebp, eax
test	ebp, ebp
jz	loc_6FC094
push	ebp
mov	ecx, ebx
call	sub_6FA0B0
mov	ecx, ebp
call	sub_666B00

loc_6FBF6A:
mov	ecx, [ebp+0Ch]
test	ecx, ecx
jz	loc_6FC094
mov	edx, [ecx]
mov	eax, [esp+48h+arg_4]
mov	edx, [edx+0Ch]
push	eax
call	edx
mov	ecx, [esp+48h+arg_0]
mov	[ecx], eax
mov	eax, 1
lea	esi, [ecx+4]
mov	[ecx+1Ch], eax
mov	[ecx+20h], eax
mov	ecx, esi
call	sub_64E8E0
fld	dword ptr [esi]
fld	ds:dbl_143EFA8
cmp	byte ptr [edi],	10h
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fmul	st, st(1)
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fmul	st, st(1)
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fmul	st, st(1)
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi+10h]
fmul	st, st(1)
fstp	dword ptr [esi+10h]
fmul	dword ptr [esi+14h]
fstp	dword ptr [esi+14h]
fld	dword ptr [esi+8]
jnz	short loc_6FBFEC
fadd	ds:dbl_15FCC48
fstp	dword ptr [esi+8]
fld	dword ptr [esi+14h]
fadd	ds:dbl_15FCC10
jmp	short loc_6FBFFC

loc_6FBFEC:
fld	ds:dbl_15FCC48
fadd	st(1), st
fxch	st(1)
fstp	dword ptr [esi+8]
fadd	dword ptr [esi+14h]

loc_6FBFFC:
mov	eax, [esp+48h+arg_C]
fstp	dword ptr [esi+14h]
fld	dword ptr [edi+10h]
fstp	[esp+48h+var_30]
fld	dword ptr [edi+14h]
fstp	[esp+48h+var_2C]
fld	dword ptr [edi+18h]
fstp	[esp+48h+var_28]
fld	dword ptr [edi+1Ch]
fstp	[esp+48h+var_24]
fld	dword ptr [edi+20h]
fstp	[esp+48h+var_20]
fld	dword ptr [edi+24h]
fstp	[esp+48h+var_1C]
test	eax, eax
jz	short loc_6FC03B
push	eax
lea	ecx, [esp+4Ch+var_30]
call	sub_64EBB0

loc_6FC03B:
lea	ecx, [esp+48h+var_18]
call	sub_64E8E0
lea	eax, [esp+48h+var_30]
push	eax
lea	ecx, [esp+4Ch+var_18]
call	sub_64E9E0
lea	ecx, [esp+48h+var_18]
push	ecx
mov	ecx, esi
call	sub_64EAF0
fld	[esp+48h+arg_8]
fst	[esp+48h+var_18]
lea	edx, [esp+48h+var_18]
fldz
push	edx
fst	[esp+4Ch+var_14]
mov	ecx, esi
fst	[esp+4Ch+var_10]
fst	[esp+4Ch+var_C]
fstp	[esp+4Ch+var_4]
fstp	[esp+4Ch+var_8]
call	sub_64EAF0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 38h
retn	10h

loc_6FC094:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 38h
retn	10h
sub_6FBED0 endp




sub_6FC0A0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+38h+arg_0]
mov	esi, [edi+324h]
mov	ebp, ecx
test	esi, esi
jnz	short loc_6FC0BA
lea	esi, [edi+28h]

loc_6FC0BA:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_6FC0D2
push	2
mov	ecx, esi
call	sub_6A9B70

loc_6FC0D2:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
add	eax, 2
mov	[esi+2Ch], eax
mov	esi, [esp+38h+arg_4]
movzx	ecx, dx
xor	ebx, ebx
mov	[ebp+4], cx
cmp	esi, 53h
jnz	short loc_6FC131
mov	ecx, edi
call	sub_667800
movzx	ebx, ax
mov	[ebp+10h], bx
test	bl, 20h
jz	short loc_6FC131
mov	ecx, edi
call	sub_667800
movzx	edx, ax
mov	[esp+38h+arg_0], edx
fild	[esp+38h+arg_0]
fmul	ds:dbl_15FD8A0
fstp	dword ptr [ebp+14h]

loc_6FC131:
test	bl, 8
jz	loc_6FC1FC
xor	ebx, ebx
lea	ecx, [esp+38h+var_18]
mov	[esp+38h+var_20], ebx
mov	[esp+38h+var_1C], ebx
call	sub_64E8E0
mov	eax, [edi+20h]
mov	byte ptr [esp+38h+var_28], bl
mov	byte ptr [esp+38h+var_28+1], 2
mov	[esp+38h+var_24], ebx
mov	ecx, [eax+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	28h
call	eax
mov	esi, eax
cmp	esi, ebx
jz	short loc_6FC189
lea	ecx, [esi+10h]
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
call	sub_64E8E0
mov	[esi], bl
mov	byte ptr [esi+1], 2
mov	[esi+4], ebx
jmp	short loc_6FC18B

loc_6FC189:
xor	esi, esi

loc_6FC18B:
mov	[ebp+0Ch], esi
cmp	esi, ebx
jnz	short loc_6FC196
lea	esi, [esp+38h+var_28]

loc_6FC196:
mov	ecx, [esp+38h+arg_4]
push	ecx
push	edi
mov	ecx, esi
call	sub_6FBB60
mov	al, [esi]
test	al, al
jnz	short loc_6FC1B1
mov	edx, [esi+4]
mov	[ebp+8], edx
jmp	short loc_6FC1CB

loc_6FC1B1:
test	al, 10h
jz	short loc_6FC1CB
mov	esi, [esi+4]
cmp	esi, ebx
jz	short loc_6FC1CB
cmp	[esi+0Ah], bx
jbe	short loc_6FC1CB
mov	eax, [esi+0Ch]
mov	ecx, [eax+4]
mov	[ebp+8], ecx

loc_6FC1CB:
test	byte ptr [esp+38h+var_28], 10h
jz	short loc_6FC1DF
mov	ecx, [esp+38h+var_24]
cmp	ecx, ebx
jz	short loc_6FC1DF
call	sub_64A430

loc_6FC1DF:
cmp	[esp+38h+var_20], ebx
jnz	short loc_6FC208
mov	ecx, [esp+38h+var_1C]
cmp	ecx, ebx
jz	short loc_6FC208
call	sub_666B00
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	8

loc_6FC1FC:
push	esi
add	ebp, 8
push	ebp
mov	ecx, edi
call	sub_6FC320

loc_6FC208:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	8
sub_6FC0A0 endp

align 10h



; int __stdcall	sub_6FC220(int,	int, float, int)
sub_6FC220 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	al, [ecx]
test	al, 10h
jz	short loc_6FC245
mov	eax, [esp+arg_C]
fld	[esp+arg_8]
mov	edx, [esp+arg_4]
push	eax		; int
mov	eax, [esp+4+arg_0]
push	ecx		; float
fstp	[esp+8+var_8]
push	edx		; int
push	eax		; int
call	sub_6FBED0
retn	10h

loc_6FC245:
test	al, 40h
jz	short loc_6FC268
mov	edx, [esp+arg_C]
fld	[esp+arg_8]
mov	eax, [esp+arg_4]
push	edx		; int
mov	edx, [esp+4+arg_0]
push	ecx		; float
fstp	[esp+8+var_8]
push	eax		; int
push	edx		; int
call	sub_6FB460
retn	10h

loc_6FC268:
xor	al, al
retn	10h
sub_6FC220 endp

align 10h



; int __stdcall	sub_6FC270(int,	float, int)
sub_6FC270 proc	near

var_38=	dword ptr -38h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
push	ebx
mov	ebx, [esp+28h+arg_0]
mov	eax, [ebx+48h]
push	esi
mov	esi, ecx
cmp	byte ptr [esi],	0
push	edi
mov	edi, [eax+0Ch]
jnz	short loc_6FC2A4
push	ecx
mov	ecx, [esi+4]
mov	eax, esp
mov	[eax], ecx
mov	edx, [edi]
mov	eax, [edx+8Ch]
mov	ecx, edi
call	eax
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn	0Ch

loc_6FC2A4:
lea	ecx, [esp+30h+var_20]
call	sub_64E8E0
mov	al, [esi]
mov	[esp+30h+var_24], 0
test	al, 10h
jz	short loc_6FC2D7
mov	ecx, [esp+30h+arg_8]
fld	[esp+30h+arg_4]
push	ecx		; int
push	ecx		; float
fstp	[esp+38h+var_38]
push	ebx		; int
lea	edx, [esp+3Ch+var_24]
push	edx		; int
mov	ecx, esi
call	sub_6FBED0
jmp	short loc_6FC2F5

loc_6FC2D7:
test	al, 40h
jz	short loc_6FC30D
mov	eax, [esp+30h+arg_8]
fld	[esp+30h+arg_4]
push	eax		; int
push	ecx		; float
fstp	[esp+38h+var_38]
push	ebx		; int
lea	ecx, [esp+3Ch+var_24]
push	ecx		; int
mov	ecx, esi
call	sub_6FB460

loc_6FC2F5:
cmp	[esp+30h+var_24], 0
jz	short loc_6FC30D
mov	edx, [edi]
mov	edx, [edx+90h]
lea	eax, [esp+30h+var_24]
push	eax
mov	ecx, edi
call	edx

loc_6FC30D:
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn	0Ch
sub_6FC270 endp

align 10h



sub_6FC320 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	[esp+arg_4], 16h
mov	eax, [ecx+324h]
jg	short loc_6FC343
test	eax, eax
jnz	short loc_6FC334
lea	eax, [ecx+28h]

loc_6FC334:
mov	ecx, [esp+arg_0]
push	ecx
mov	ecx, eax
call	sub_6AAC90
retn	8

loc_6FC343:
test	eax, eax
jnz	short loc_6FC34A
lea	eax, [ecx+28h]

loc_6FC34A:
mov	edx, [esp+arg_0]
push	edx
mov	ecx, eax
call	sub_6AAD20
retn	8
sub_6FC320 endp

align 10h



; int __thiscall sub_6FC360(void *, char)
sub_6FC360 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143EEB8
jz	short loc_6FC379
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_6FC379:
mov	eax, esi
pop	esi
retn	4
sub_6FC360 endp

align 10h



sub_6FC380 proc	near

arg_0= byte ptr	 4

xor	eax, eax
test	[esp+arg_0], 80h
jnz	short locret_6FC39A
mov	ecx, [ecx+8]
mov	ecx, [ecx+10h]
test	ecx, ecx
jz	short locret_6FC39A
cmp	[ecx+0Ch], al
jnz	short locret_6FC39A
mov	eax, ecx

locret_6FC39A:
retn	4
sub_6FC380 endp

align 10h



sub_6FC3A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
lea	esi, [ecx+40h]
mov	ecx, [eax+20h]
mov	edx, [ecx+24h]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
mov	ecx, esi
call	sub_67A2C0
push	esi
call	sub_702B10
add	esp, 4
test	al, al
jnz	short loc_6FC3D0
mov	ecx, esi
call	sub_67A720

loc_6FC3D0:
pop	esi
retn	4
sub_6FC3A0 endp

align 10h



sub_6FC3E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [ecx+8]
mov	eax, [eax+8]
push	ebx
xor	ebx, ebx
mov	[esp+8+var_4], ebx
test	eax, eax
jnz	short loc_6FC420
mov	ecx, [ecx+0Ch]
test	ecx, ecx
jz	short loc_6FC419
test	[esp+8+arg_4], 200000h
jnz	short loc_6FC419
mov	edx, [esp+8+arg_0]
push	edx
add	ecx, 0Ch
push	offset aErrorGfxloader ; "Error: GFxLoader failed to open '%s', G"...
push	ecx
call	sub_67E7F0
add	esp, 0Ch

loc_6FC419:
xor	eax, eax
pop	ebx
pop	ecx
retn	8

loc_6FC420:
test	[esp+8+arg_4], 200000h
push	esi
push	edi
jz	short loc_6FC43D
xor	edi, edi
mov	ebx, 1
mov	[esp+10h+arg_4], edi
lea	ecx, [esp+10h+arg_4]
jmp	short loc_6FC444

loc_6FC43D:
mov	edi, [esp+10h+arg_4]
add	ecx, 0Ch

loc_6FC444:
mov	ecx, [ecx]
mov	edx, [eax]
mov	edx, [edx+0Ch]
push	1B6h
push	21h
push	ecx
mov	ecx, [esp+1Ch+arg_0]
push	ecx
mov	ecx, eax
call	edx
mov	esi, eax
test	bl, 1
jz	short loc_6FC46E
test	edi, edi
jz	short loc_6FC46E
mov	ecx, edi
call	sub_64A430

loc_6FC46E:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn	8
sub_6FC3E0 endp

align 10h



sub_6FC480 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+8]
mov	ecx, [eax+0Ch]
test	ecx, ecx
jnz	short loc_6FC49F
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	ecx
push	edx
call	sub_702A80
add	esp, 8
retn	8

loc_6FC49F:
mov	eax, [ecx]
mov	eax, [eax+4]
jmp	eax
sub_6FC480 endp

align 10h



sub_6FC4B0 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+18h]
test	ecx, ecx
jnz	short loc_6FC4BC
xor	al, al
retn	4

loc_6FC4BC:
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+4]
push	edx
call	eax
test	al, al
setnz	al
retn	4
sub_6FC4B0 endp




sub_6FC4D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	ecx, [eax+10h]
mov	edx, [eax+28h]
mov	eax, [eax+0Ch]
push	1
push	ecx
push	edx
push	eax
mov	eax, [esp+14h+arg_0]
push	eax
lea	ecx, [esi+28h]
call	sub_705320
test	al, al
jnz	short loc_6FC4F9
pop	esi
retn	4

loc_6FC4F9:
lea	ecx, [esi+278h]
push	ecx
mov	ecx, [esi+20h]
call	sub_6ACA60
mov	al, 1
pop	esi
retn	4
sub_6FC4D0 endp

align 10h



sub_6FC510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 0
mov	dword ptr [esi], offset	off_143EF08
push	edi
lea	ecx, [esi+10h]
mov	dword ptr [esi+0Ch], 0
call	??0DNameNode@@IAE@XZ_2 ; DNameNode::DNameNode(void)
mov	edi, [esp+8+arg_0]
test	edi, edi
jz	short loc_6FC548
inc	dword ptr [edi+4]

loc_6FC548:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FC554
call	sub_64A400

loc_6FC554:
mov	eax, [esp+8+arg_4]
mov	[esi+0Ch], edi
mov	[esi+18h], eax
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_6FC510 endp

align 10h



sub_6FC570 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [ebp+0Ch]
push	edi
mov	edi, [esp+10h+arg_8]
test	ecx, ecx
jz	short loc_6FC596
mov	edx, [esp+10h+arg_C]
mov	eax, [ecx]
mov	eax, [eax+10h]
push	edx
push	edi
call	eax
mov	ebx, eax
jmp	short loc_6FC598

loc_6FC596:
xor	ebx, ebx

loc_6FC598:
mov	edx, [ebp+0]
mov	eax, [edx+14h]
mov	ecx, ebp
call	eax
push	eax
push	ebx
mov	ecx, esi
call	sub_6FC510
test	ebx, ebx
jz	short loc_6FC5B6
mov	ecx, ebx
call	sub_64A400

loc_6FC5B6:
mov	dword ptr [esi], offset	off_143F034
mov	eax, [edi+0Ch]
mov	ecx, [edi+8]
mov	edx, [edi+4]
mov	edi, [edi]
mov	[esi+24h], ecx
mov	ecx, [esp+10h+arg_4]
mov	[esi+1Ch], edi
mov	[esi+28h], eax
pop	edi
mov	[esi+20h], edx
mov	[esi+2Ch], ecx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_6FC570 endp

align 10h



sub_6FC5F0 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+2Ch]
mov	eax, [esp+arg_0]
mov	[eax], ecx
retn	4
sub_6FC5F0 endp

align 10h



sub_6FC600 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
sub	esp, 50h
push	ebx
push	ebp
push	esi
push	edi
xor	ebx, ebx
push	ebx
push	24h
call	edx
mov	edi, [esp+60h+arg_0]
mov	esi, eax
cmp	esi, ebx
jz	short loc_6FC657
push	edi
mov	ecx, esi
call	sub_6667D0
lea	ecx, [esi+20h]
mov	dword ptr [esi], offset	off_143DF50
call	sub_679E30
mov	ax, [edi+14h]
mov	[esi+14h], ax
mov	cx, [edi+16h]
mov	[esi+16h], cx
mov	edx, [edi+18h]
mov	ebp, esi
mov	[esi+18h], edx
mov	[esp+60h+arg_0], ebp
jmp	short loc_6FC65D

loc_6FC657:
mov	[esp+60h+arg_0], ebx
mov	ebp, ebx

loc_6FC65D:
cmp	dword ptr [ebp+8], 1
jnz	short loc_6FC66F
mov	eax, [ebp+0Ch]
cmp	eax, ebx
jz	short loc_6FC66F
mov	eax, [eax]
mov	[ebp+8], eax

loc_6FC66F:
lea	ecx, [edi+10h]
push	ecx
lea	ecx, [esp+64h+var_38]
mov	[esp+64h+var_3C], 2
call	sub_67AF90
mov	esi, [esp+60h+arg_8]
lea	edx, [esi+40h]
push	edx
lea	ecx, [esp+64h+var_34]
call	sub_67AF90
mov	ecx, [esi+8]
mov	ecx, [ecx+0Ch]
lea	eax, [ebp+10h]
cmp	ecx, ebx
jnz	short loc_6FC6B2
lea	edx, [esp+60h+var_3C]
push	edx
push	eax
call	sub_702A80
add	esp, 8
jmp	short loc_6FC6BF

loc_6FC6B2:
mov	edx, [ecx]
lea	ebp, [esp+60h+var_3C]
push	ebp
push	eax
mov	eax, [edx+4]
call	eax

loc_6FC6BF:
mov	ecx, [esi+38h]
mov	ebp, [ecx+28h]
mov	eax, [esi+8]
mov	edx, [eax+10h]
mov	eax, [eax+8]
mov	ecx, [esp+60h+arg_0]
push	ebp
push	edx
push	eax
push	ecx
lea	edx, [esp+70h+var_44]
push	edx
call	sub_740B80
add	esp, 14h
lea	ecx, [esp+60h+var_50]
call	sub_679E30
mov	ecx, [esi+38h]
lea	eax, [esp+60h+var_44]
push	eax
lea	edx, [esp+64h+var_4C]
push	edx
mov	[esp+68h+var_4C], ebx
mov	[esp+68h+var_48], ebx
call	sub_667230
cmp	eax, 3
jnz	loc_6FC840
movzx	ecx, byte ptr [edi+1Ch]
mov	eax, [edi+18h]
mov	edx, [esp+60h+arg_0]
and	ecx, 1
mov	[esp+60h+var_2C], eax
mov	eax, [esi+8]
mov	[esp+60h+var_24], ecx
mov	[esp+60h+var_20], edx
mov	edx, [esi+20h]
mov	[esp+60h+var_1C], ebx
mov	[esp+60h+var_18], ebx
mov	[esp+60h+var_14], ebx
mov	[esp+60h+var_10], ebx
mov	[esp+60h+var_C], ebx
mov	[esp+60h+var_28], ebx
mov	byte ptr [esp+60h+var_4], bl
mov	[esp+60h+var_30], 2
mov	[esp+60h+var_8], ebp
mov	ecx, [eax+8]
mov	[esp+60h+var_1C], ecx
mov	ecx, [esi+0Ch]
mov	[esp+60h+var_18], edx
mov	edx, [esi+24h]
mov	[esp+60h+var_14], ecx
mov	ecx, [esi+2Ch]
mov	[esp+60h+var_10], edx
mov	[esp+60h+var_C], ecx
cmp	[esi+44h], bl
jnz	short loc_6FC785
mov	byte ptr [esp+60h+var_4], bl
cmp	[esi+18h], ebx
jz	short loc_6FC78A

loc_6FC785:
mov	byte ptr [esp+60h+var_4], 1

loc_6FC78A:
mov	edx, [edi+20h]
and	edx, 0FFFFFFFCh
add	edx, 8
mov	[esp+60h+var_28], edx
mov	eax, [eax+10h]
xor	edi, edi
cmp	eax, ebx
jz	short loc_6FC7EE
mov	edx, [eax]
mov	edx, [edx+4]
lea	ecx, [esp+60h+var_30]
push	ecx
mov	ecx, eax
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6FC7EE
mov	ecx, [esp+60h+var_8]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	1Ch
call	edx
cmp	eax, ebx
jz	short loc_6FC7DA
mov	ecx, [esp+60h+var_2C]
push	ecx
lea	edx, [esp+64h+var_44]
push	edx
push	edi
mov	ecx, eax
call	sub_6FA620
jmp	short loc_6FC7DC

loc_6FC7DA:
xor	eax, eax

loc_6FC7DC:
mov	ebp, eax
cmp	eax, ebx
jz	short loc_6FC7F0
mov	ecx, [esp+60h+var_48]
push	eax
call	sub_666CB0
jmp	short loc_6FC833

loc_6FC7EE:
mov	ebp, ebx

loc_6FC7F0:		; "Failed to load image	'"
push	offset aFailedToLoadIm
lea	ecx, [esp+64h+var_50]
call	sub_67A2C0
mov	eax, [esp+60h+arg_0]
add	eax, 10h
push	eax
lea	ecx, [esp+64h+var_50]
call	sub_67A540
push	0FFFFFFFFh
push	offset asc_154D8A0 ; "'"
lea	ecx, [esp+68h+var_50]
call	sub_67A0C0
mov	eax, [esp+60h+var_50]
mov	ecx, [esp+60h+var_48]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
call	sub_666D50

loc_6FC833:
cmp	edi, ebx
jz	short loc_6FC87A
mov	ecx, edi
call	sub_64A400
jmp	short loc_6FC87A

loc_6FC840:
lea	ecx, [esp+60h+var_4C]
call	sub_6666C0
mov	[esp+60h+arg_8], eax
cmp	eax, ebx
jnz	loc_6FC91B
cmp	[esp+60h+var_4C], 2
jl	short loc_6FC867
mov	ecx, [esp+60h+var_48]
call	sub_665FE0
jmp	short loc_6FC86C

loc_6FC867:
mov	eax, offset byte_146D660

loc_6FC86C:
push	eax
lea	ecx, [esp+64h+var_50]
call	sub_67A2C0
mov	ebp, [esp+60h+arg_8]

loc_6FC87A:
cmp	ebp, ebx
jnz	loc_6FC91F
mov	ecx, [esp+60h+var_50]
mov	edx, [esi+0Ch]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
add	edx, 0Ch
push	offset aErrorS_0 ; "Error: %s\n"
push	edx
call	sub_67E7F0
mov	eax, [esp+6Ch+var_4C]
add	esp, 0Ch
cmp	eax, 1
jnz	short loc_6FC8B5
mov	ecx, [esp+60h+var_48]
call	sub_666B00
jmp	short loc_6FC8C3

loc_6FC8B5:
cmp	eax, 2
jl	short loc_6FC8C3
mov	ecx, [esp+60h+var_48]
call	sub_64A430

loc_6FC8C3:
mov	esi, [esp+60h+var_50]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6FC8E9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6FC8E9:
mov	ecx, [esp+60h+var_44]
cmp	ecx, ebx
jz	short loc_6FC8FD
mov	edx, [ecx]
mov	eax, [esp+60h+var_40]
mov	edx, [edx+8]
push	eax
call	edx

loc_6FC8FD:
lea	ecx, [esp+60h+var_3C]
call	sub_68E410
mov	ecx, [esp+60h+arg_0]
call	sub_64A400
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 50h
retn	10h

loc_6FC91B:
mov	ebp, [esp+60h+arg_8]

loc_6FC91F:
mov	ecx, ebp
call	sub_64A420
mov	esi, [esp+60h+arg_4]
mov	ecx, [esi]
cmp	ecx, ebx
jz	short loc_6FC935
call	sub_666B00

loc_6FC935:
mov	[esi], ebp
cmp	ebp, ebx
jz	short loc_6FC942
mov	ecx, ebp
call	sub_666B00

loc_6FC942:
mov	eax, [esp+60h+var_4C]
cmp	eax, 1
jnz	short loc_6FC956
mov	ecx, [esp+60h+var_48]
call	sub_666B00
jmp	short loc_6FC964

loc_6FC956:
cmp	eax, 2
jl	short loc_6FC964
mov	ecx, [esp+60h+var_48]
call	sub_64A430

loc_6FC964:
mov	esi, [esp+60h+var_50]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6FC98A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_6FC98A:
mov	ecx, [esp+60h+var_44]
cmp	ecx, ebx
jz	short loc_6FC99E
mov	edx, [ecx]
mov	eax, [esp+60h+var_40]
mov	edx, [edx+8]
push	eax
call	edx

loc_6FC99E:
lea	ecx, [esp+60h+var_3C]
call	sub_68E410
mov	ecx, [esp+60h+arg_0]
call	sub_64A400
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 50h
retn	10h
sub_6FC600 endp

align 10h



sub_6FC9C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, 1
test	byte ptr dword_18564F4,	al
jnz	short loc_6FC9EA
or	dword_18564F4, eax
push	offset sub_1419520 ; void (__cdecl *)()
mov	dword_18564F0, offset off_143EFB0
call	_atexit
add	esp, 4

loc_6FC9EA:
mov	eax, dword_18564F0
mov	edx, [eax+4]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
mov	ecx, offset dword_18564F0
call	edx
mov	eax, [esp+4+arg_0]
mov	[eax+4], esi
mov	dword ptr [eax], offset	dword_18564F0
pop	esi
retn
sub_6FC9C0 endp

align 10h



sub_6FCA10 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 30h
mov	eax, [esp+30h+arg_0]
mov	[esp+30h+var_20], eax
mov	eax, [esp+30h+arg_8]
mov	ecx, [eax+20h]
mov	edx, [eax+0Ch]
push	ebx
xor	ebx, ebx
push	ebp
mov	ebp, 1
mov	[esp+38h+var_18], ecx
mov	ecx, [eax+24h]
mov	[esp+38h+var_14], edx
mov	edx, [eax+2Ch]
push	esi
mov	[esp+3Ch+var_30], ebp
mov	[esp+3Ch+var_28], ebx
mov	[esp+3Ch+var_2C], ebx
mov	[esp+3Ch+var_24], ebp
mov	[esp+3Ch+var_1C], ebx
mov	[esp+3Ch+var_10], ecx
mov	[esp+3Ch+var_C], edx
cmp	[eax+44h], bl
jnz	short loc_6FCA67
mov	byte ptr [esp+3Ch+var_4], bl
cmp	[eax+18h], ebx
jz	short loc_6FCA6C

loc_6FCA67:
mov	byte ptr [esp+3Ch+var_4], 1

loc_6FCA6C:
mov	esi, [esp+3Ch+arg_C]
mov	eax, [eax+8]
mov	[esp+3Ch+var_8], esi
mov	ecx, [eax+10h]
cmp	ecx, ebx
jnz	short loc_6FCA89
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 30h
retn	10h

loc_6FCA89:
mov	edx, [ecx]
mov	edx, [edx+4]
push	edi
lea	eax, [esp+40h+var_30]
push	eax
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6FCAC2
mov	eax, [esi]
mov	edx, [eax+28h]
push	ebx
push	1Ch
mov	ecx, esi
call	edx
cmp	eax, ebx
jz	short loc_6FCABB
push	ebp
push	edi
mov	ecx, eax
call	sub_6FC510
mov	esi, eax
cmp	esi, ebx
jnz	short loc_6FCACE

loc_6FCABB:
mov	ecx, edi
call	sub_64A400

loc_6FCAC2:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 30h
retn	10h

loc_6FCACE:
mov	ecx, esi
call	sub_64A420
mov	ebp, [esp+40h+arg_4]
mov	ecx, [ebp+0]
cmp	ecx, ebx
jz	short loc_6FCAE5
call	sub_666B00

loc_6FCAE5:
mov	ecx, esi
mov	[ebp+0], esi
call	sub_666B00
mov	ecx, edi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 30h
retn	10h
sub_6FCA10 endp

align 10h



sub_6FCB10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, 1
test	byte ptr dword_18564FC,	al
jnz	short loc_6FCB3A
or	dword_18564FC, eax
push	offset sub_1419530 ; void (__cdecl *)()
mov	dword_18564F8, offset off_143EFC0
call	_atexit
add	esp, 4

loc_6FCB3A:
push	esi
mov	esi, [esp+4+arg_4]
test	esi, esi
jz	short loc_6FCB62
mov	eax, dword_18564F8
mov	edx, [eax+4]
push	esi
mov	ecx, offset dword_18564F8
call	edx
mov	eax, [esp+4+arg_0]
mov	[eax+4], esi
mov	dword ptr [eax], offset	dword_18564F8
pop	esi
retn

loc_6FCB62:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
pop	esi
retn
sub_6FCB10 endp

align 10h



sub_6FCB80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
mov	eax, [ebx+0Ch]
push	ebp
mov	ebp, [esp+18h+arg_4]
push	esi
push	edi
xor	edi, edi
mov	[esp+20h+arg_0], eax
cmp	eax, edi
jnz	loc_6FCC38
mov	ecx, [ebp+4]
mov	eax, [ebx+8]
mov	[esp+20h+var_10], edi
mov	[esp+20h+var_C], edi
mov	ecx, [ecx+28h]
mov	ecx, [ecx+1Ch]
mov	ecx, [ecx+0Ch]
push	ecx
mov	edx, esp
mov	[edx], eax
mov	ecx, [ecx+20h]
lea	edx, [esp+24h+var_10]
push	edx
call	sub_6AF4A0
mov	ecx, [ebp+4]
cmp	[esp+20h+var_10], edi
jnz	short loc_6FCBD8
mov	esi, [esp+20h+var_C]
jmp	short loc_6FCBFE

loc_6FCBD8:
mov	eax, [esp+20h+var_C]
push	eax
lea	edx, [esp+24h+var_8]
push	edx
mov	[esp+28h+var_8], edi
mov	[esp+28h+var_4], edi
call	sub_6ABEE0
mov	ecx, [esp+20h+var_8]
mov	esi, ecx
cmp	ecx, edi
jz	short loc_6FCBFE
call	sub_666B00

loc_6FCBFE:
cmp	esi, edi
jz	short loc_6FCC1B
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
and	eax, 0FF00h
cmp	eax, 100h
jnz	short loc_6FCC1B
mov	[esp+20h+arg_0], esi

loc_6FCC1B:
cmp	[esp+20h+var_10], edi
jnz	short loc_6FCC2E
mov	ecx, [esp+20h+var_C]
cmp	ecx, edi
jz	short loc_6FCC2E
call	sub_666B00

loc_6FCC2E:
cmp	[esp+20h+arg_0], edi
jz	short loc_6FCC9B
mov	eax, [esp+20h+arg_0]

loc_6FCC38:
mov	esi, [eax+0Ch]
mov	eax, [esi]
mov	edx, [eax+18h]
mov	ecx, esi
call	edx
test	eax, eax
jnz	short loc_6FCC50
push	edi
mov	ecx, esi
call	sub_741150

loc_6FCC50:
mov	esi, [esp+20h+arg_C]
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
push	30h
mov	ecx, esi
call	edx
cmp	eax, edi
jz	short loc_6FCC7E
push	esi
add	ebx, 10h
push	ebx
push	ecx
mov	ecx, [esp+2Ch+arg_0]
mov	edx, esp
push	ecx
mov	ecx, eax
mov	[edx], edi
call	sub_6FC570
mov	esi, eax
jmp	short loc_6FCC80

loc_6FCC7E:
xor	esi, esi

loc_6FCC80:
mov	ecx, [ebp+0]
cmp	ecx, edi
jz	short loc_6FCC8C
call	sub_666B00

loc_6FCC8C:
mov	[ebp+0], esi
mov	al, 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h

loc_6FCC9B:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 10h
retn	10h
sub_6FCB80 endp

align 10h



sub_6FCCB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, 1
test	byte ptr dword_1856504,	al
jnz	short loc_6FCCDA
or	dword_1856504, eax
push	offset sub_1419540 ; void (__cdecl *)()
mov	dword_1856500, offset off_143EFD0
call	_atexit
add	esp, 4

loc_6FCCDA:
mov	eax, dword_1856500
mov	edx, [eax+4]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
mov	ecx, offset dword_1856500
call	edx
mov	eax, [esp+4+arg_0]
mov	[eax+4], esi
mov	dword ptr [eax], offset	dword_1856500
pop	esi
retn
sub_6FCCB0 endp

align 10h



sub_6FCD00 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 24h
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+2Ch+arg_0]
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143F094
push	edi
xor	edi, edi
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	[esi+1Ch], edi
mov	[esi+20h], edi
mov	[esi+24h], edi
push	9
mov	[esi+28h], edi
mov	eax, [ecx]
mov	eax, [eax+10h]
push	offset asc_143F070 ; "\n"
lea	edx, [esp+38h+var_24]
push	edx
mov	[esp+3Ch+var_24], edi
mov	[esp+3Ch+var_20], edi
mov	[esp+3Ch+var_1C], edi
mov	[esp+3Ch+var_18], edi
mov	[esp+3Ch+var_14], edi
mov	[esp+3Ch+var_10], edi
mov	[esp+3Ch+var_C], edi
mov	[esp+3Ch+var_8], edi
mov	[esp+3Ch+var_4], edi
call	eax
mov	ecx, [esi+8]
mov	ebx, [esp+30h+var_24]
cmp	ecx, edi
jz	short loc_6FCD83
call	sub_64A430

loc_6FCD83:
mov	[esi+8], ebx
mov	ecx, [esi+0Ch]
mov	ebx, [esp+30h+var_20]
cmp	ecx, edi
jz	short loc_6FCD96
call	sub_64A430

loc_6FCD96:
mov	[esi+0Ch], ebx
mov	ecx, [esi+10h]
mov	ebx, [esp+30h+var_1C]
cmp	ecx, edi
jz	short loc_6FCDA9
call	sub_64A430

loc_6FCDA9:
mov	[esi+10h], ebx
mov	ecx, [esi+14h]
mov	ebx, [esp+30h+var_18]
cmp	ecx, edi
jz	short loc_6FCDBC
call	sub_64A430

loc_6FCDBC:
mov	[esi+14h], ebx
mov	ecx, [esi+18h]
mov	ebx, [esp+30h+var_14]
cmp	ecx, edi
jz	short loc_6FCDCF
call	sub_64A430

loc_6FCDCF:
mov	[esi+18h], ebx
mov	ecx, [esi+1Ch]
mov	ebx, [esp+30h+var_10]
cmp	ecx, edi
jz	short loc_6FCDE2
call	sub_64A430

loc_6FCDE2:
mov	[esi+1Ch], ebx
mov	ecx, [esi+20h]
mov	ebx, [esp+30h+var_C]
cmp	ecx, edi
jz	short loc_6FCDF5
call	sub_64A430

loc_6FCDF5:
mov	[esi+20h], ebx
mov	ecx, [esi+24h]
mov	ebx, [esp+30h+var_8]
cmp	ecx, edi
jz	short loc_6FCE08
call	sub_64A430

loc_6FCE08:
mov	[esi+24h], ebx
mov	ecx, [esi+28h]
mov	ebx, [esp+30h+var_4]
cmp	ecx, edi
jz	short loc_6FCE1B
call	sub_64A430

loc_6FCE1B:
pop	edi
mov	[esi+28h], ebx
mov	eax, esi
pop	esi
pop	ebx
add	esp, 24h
retn	4
sub_6FCD00 endp

align 10h



sub_6FCE30 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+28h]
test	ecx, ecx
jz	short loc_6FCE3F
call	sub_64A430

loc_6FCE3F:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_6FCE4B
call	sub_64A430

loc_6FCE4B:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6FCE57
call	sub_64A430

loc_6FCE57:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6FCE63
call	sub_64A430

loc_6FCE63:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6FCE6F
call	sub_64A430

loc_6FCE6F:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6FCE7B
call	sub_64A430

loc_6FCE7B:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6FCE87
call	sub_64A430

loc_6FCE87:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FCE93
call	sub_64A430

loc_6FCE93:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6FCE9F
call	sub_64A430

loc_6FCE9F:
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6FCE30 endp

align 10h



sub_6FCEB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6FCE30
test	[esp+4+arg_0], 1
jz	short loc_6FCECD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6FCECD:
mov	eax, esi
pop	esi
retn	4
sub_6FCEB0 endp

align 10h



sub_6FCEE0 proc	near

arg_0= dword ptr  4

push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143F094
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	ecx, [edi+8]
cmp	ecx, ebx
jz	short loc_6FCF25
call	sub_64A420

loc_6FCF25:
mov	ecx, [esi+8]
cmp	ecx, ebx
jz	short loc_6FCF31
call	sub_64A430

loc_6FCF31:
mov	eax, [edi+8]
mov	[esi+8], eax
mov	ecx, [edi+0Ch]
cmp	ecx, ebx
jz	short loc_6FCF43
call	sub_64A420

loc_6FCF43:
mov	ecx, [esi+0Ch]
cmp	ecx, ebx
jz	short loc_6FCF4F
call	sub_64A430

loc_6FCF4F:
mov	ecx, [edi+0Ch]
mov	[esi+0Ch], ecx
mov	ecx, [edi+10h]
cmp	ecx, ebx
jz	short loc_6FCF61
call	sub_64A420

loc_6FCF61:
mov	ecx, [esi+10h]
cmp	ecx, ebx
jz	short loc_6FCF6D
call	sub_64A430

loc_6FCF6D:
mov	edx, [edi+10h]
mov	[esi+10h], edx
mov	ecx, [edi+14h]
cmp	ecx, ebx
jz	short loc_6FCF7F
call	sub_64A420

loc_6FCF7F:
mov	ecx, [esi+14h]
cmp	ecx, ebx
jz	short loc_6FCF8B
call	sub_64A430

loc_6FCF8B:
mov	eax, [edi+14h]
mov	[esi+14h], eax
mov	ecx, [edi+1Ch]
cmp	ecx, ebx
jz	short loc_6FCF9D
call	sub_64A420

loc_6FCF9D:
mov	ecx, [esi+1Ch]
cmp	ecx, ebx
jz	short loc_6FCFA9
call	sub_64A430

loc_6FCFA9:
mov	ecx, [edi+1Ch]
mov	[esi+1Ch], ecx
mov	ecx, [edi+18h]
cmp	ecx, ebx
jz	short loc_6FCFBB
call	sub_64A420

loc_6FCFBB:
mov	ecx, [esi+18h]
cmp	ecx, ebx
jz	short loc_6FCFC7
call	sub_64A430

loc_6FCFC7:
mov	edx, [edi+18h]
mov	[esi+18h], edx
mov	ecx, [edi+20h]
cmp	ecx, ebx
jz	short loc_6FCFD9
call	sub_64A420

loc_6FCFD9:
mov	ecx, [esi+20h]
cmp	ecx, ebx
jz	short loc_6FCFE5
call	sub_64A430

loc_6FCFE5:
mov	eax, [edi+20h]
mov	[esi+20h], eax
mov	ecx, [edi+24h]
cmp	ecx, ebx
jz	short loc_6FCFF7
call	sub_64A420

loc_6FCFF7:
mov	ecx, [esi+24h]
cmp	ecx, ebx
jz	short loc_6FD003
call	sub_64A430

loc_6FD003:
mov	ecx, [edi+24h]
mov	[esi+24h], ecx
mov	ecx, [edi+28h]
cmp	ecx, ebx
jz	short loc_6FD015
call	sub_64A420

loc_6FD015:
mov	ecx, [esi+28h]
cmp	ecx, ebx
jz	short loc_6FD021
call	sub_64A430

loc_6FD021:
mov	edx, [edi+28h]
pop	edi
mov	[esi+28h], edx
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_6FCEE0 endp

align 10h



sub_6FD030 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	edx, [esp+4+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
xor	ecx, ecx
push	esi
push	edi
mov	[esp+14h+var_4], ecx
cmp	[edx+4Ch], ecx
jbe	loc_6FD0EF
lea	esp, [esp+0]

loc_6FD050:
mov	eax, [edx+48h]
mov	eax, [eax+ecx*4]
mov	[esp+14h+arg_0], eax
mov	eax, [eax+1Ch]
mov	eax, [eax+0Ch]
mov	eax, [eax+20h]
mov	ebx, [eax+0A4h]
add	eax, 0A4h
test	ebx, ebx
jz	short loc_6FD0E1

loc_6FD072:
mov	edi, [ebx+4]
mov	edx, [edi]
mov	eax, [edx+38h]
mov	ecx, edi
call	eax
test	eax, eax
jbe	short loc_6FD0D2
mov	edx, [edi]
mov	esi, [edi+14h]
mov	eax, [edx+3Ch]
mov	ecx, edi
and	esi, 303h
call	eax
mov	ecx, esi
and	ecx, 300h
neg	ecx
sbb	ecx, ecx
and	ecx, 300h
mov	edx, esi
and	edx, 10h
or	ecx, edx
or	ecx, 3
and	ecx, [ebp+14h]
and	esi, 313h
cmp	ecx, esi
jnz	short loc_6FD0D2
push	eax		; char *
mov	eax, [ebp+0]
mov	edx, [eax+3Ch]
mov	ecx, ebp
call	edx
push	eax		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6FD13F

loc_6FD0D2:
mov	ebx, [ebx+0Ch]
test	ebx, ebx
jnz	short loc_6FD072
mov	edx, [esp+14h+arg_8]
mov	ecx, [esp+14h+var_4]

loc_6FD0E1:
inc	ecx
mov	[esp+14h+var_4], ecx
cmp	ecx, [edx+4Ch]
jb	loc_6FD050

loc_6FD0EF:
mov	eax, [ebp+0]
mov	edx, [eax+40h]
mov	ecx, ebp
call	edx
test	al, al
jnz	short loc_6FD10F
mov	eax, [ebp+0]
mov	edx, [eax+3Ch]
mov	ecx, ebp
call	edx
test	eax, eax
jz	short loc_6FD10F
or	dword ptr [ebp+14h], 40h

loc_6FD10F:
mov	esi, [esp+14h+arg_4]
cmp	dword ptr [esi], 0
jnz	loc_6FD1B2
mov	ecx, [esp+14h+arg_C]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	2Ch
call	edx
test	eax, eax
jz	short loc_6FD1A3
mov	ecx, [esi+4]
push	ecx
push	ebp
mov	ecx, eax
call	sub_716490
mov	edi, eax
jmp	short loc_6FD1A5

loc_6FD13F:
mov	eax, [esp+14h+arg_0]
mov	ecx, [eax+1Ch]
mov	dl, [ecx+3Ch]
mov	ebx, [ebx+8]
add	ecx, 18h
test	dl, dl
jz	short loc_6FD18E
mov	eax, [ecx+4]
cmp	ebx, eax
jnb	short loc_6FD18E
mov	ecx, [ecx+8]
lea	esi, [ecx+ebx*8]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6FD16B
call	sub_64A420

loc_6FD16B:
mov	edi, [esp+14h+arg_4]
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_6FD17A
call	sub_666B00

loc_6FD17A:
mov	edx, [esi]
mov	[edi], edx
mov	eax, [esi+4]
mov	[edi+4], eax
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6FD18E:
mov	edx, [esp+14h+arg_4]
push	ebx
push	edx
call	sub_714030
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	10h

loc_6FD1A3:
xor	edi, edi

loc_6FD1A5:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6FD1B0
call	sub_666B00

loc_6FD1B0:
mov	[esi], edi

loc_6FD1B2:
xor	eax, eax
cmp	[esi], eax
pop	edi
pop	esi
pop	ebp
setnz	al
pop	ebx
pop	ecx
retn	10h
sub_6FD030 endp

align 10h



sub_6FD1D0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+274h]
call	sub_6AD300
mov	ecx, esi
pop	esi
jmp	sub_6A9A50
sub_6FD1D0 endp

align 10h



sub_6FD1F0 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi+2C4h]
xor	ebx, ebx
push	edi
mov	dword ptr [esi], offset	off_143F0A0
mov	dword ptr [esi+14h], offset off_143F098
cmp	ecx, ebx
jz	short loc_6FD217
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_6FD217:
mov	eax, [esi+20h]
mov	edi, [eax+90h]
cmp	edi, ebx
jz	short loc_6FD22B
mov	ecx, edi
call	sub_64A420

loc_6FD22B:
lea	ebp, [esi+28h]
mov	ecx, ebp
call	sub_6A9B40
mov	ecx, [esi+20h]
cmp	ecx, ebx
jz	short loc_6FD241
call	sub_64A430

loc_6FD241:
mov	[esi+20h], ebx
mov	ecx, [esi+1Ch]
cmp	ecx, ebx
jz	short loc_6FD250
call	sub_64A430

loc_6FD250:
mov	[esi+1Ch], ebx
lea	ebx, [edi+8]
mov	ecx, ebx
call	sub_64D770
lea	ecx, [edi+1Ch]
mov	byte ptr [edi+20h], 1
call	sub_64D8F0
mov	ecx, ebx
call	sub_64E350
mov	ecx, edi
call	sub_64A430
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+318h]
mov	edx, [edx+30h]
lea	edi, [esi+318h]
push	eax
call	edx
mov	ebx, 1
jmp	short loc_6FD2A0
align 10h

loc_6FD2A0:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi-0Ch]
mov	eax, [eax+30h]
sub	edi, 0Ch
push	edx
call	eax
sub	ebx, 1
jns	short loc_6FD2A0
lea	ecx, [ebp+274h]
call	sub_6AD300
mov	ecx, ebp
call	sub_6A9A50
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6FD2D7
call	sub_64A430

loc_6FD2D7:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6FD2E3
call	sub_64A430

loc_6FD2E3:
pop	edi
mov	dword ptr [esi+14h], offset off_143F300
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
jmp	loc_704190
sub_6FD1F0 endp

align 10h



sub_6FD300 proc	near

arg_0= byte ptr	 4

sub	ecx, 14h
jmp	sub_6FD570
sub_6FD300 endp

align 10h



sub_6FD310 proc	near
mov	eax, [ecx+1Ch]
push	eax
push	ecx
mov	ecx, [ecx+20h]
call	sub_6B1AB0
retn
sub_6FD310 endp

align 10h



sub_6FD320 proc	near

arg_0= dword ptr  4

push	ebx
mov	bl, byte ptr [esp+4+arg_0]
push	esi
mov	esi, ecx
test	bl, bl
jz	short loc_6FD334
mov	ecx, [esi+20h]
call	sub_6AAEF0

loc_6FD334:
mov	eax, [esi+1Ch]
test	eax, eax
jz	short loc_6FD357
test	bl, bl
jnz	short loc_6FD357
mov	eax, [eax+20h]
test	eax, eax
jz	short loc_6FD357
pop	esi
pop	ebx
mov	[esp+arg_0], 3
mov	ecx, eax
jmp	sub_6AB8A0

loc_6FD357:
pop	esi
pop	ebx
retn	4
sub_6FD320 endp

align 10h



sub_6FD360 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
mov	edx, [ecx+0Ch]
add	ecx, 8
cmp	edx, 24h
jb	short loc_6FD382
mov	eax, [ecx]
push	edi
lea	edi, [eax+24h]
add	edx, 0FFFFFFDCh
mov	[ecx], edi
mov	[ecx+4], edx
pop	edi
jmp	short loc_6FD389

loc_6FD382:
push	24h
call	sub_6AB110

loc_6FD389:
xor	ecx, ecx
cmp	eax, ecx
jz	short loc_6FD405
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	edx, [esi+2D4h]
mov	[eax+0Ch], edx
mov	edx, [esi+2E4h]
mov	[eax+14h], edx
mov	edx, [esi+2DCh]
mov	[eax+8], edx
mov	edx, [esi+2F0h]
mov	[eax+18h], edx
mov	edx, [esi+2D8h]
mov	[eax+10h], edx
mov	edx, [esi+2E8h]
mov	[eax+1Ch], edx
mov	[esi+2D4h], ecx
mov	[esi+2D8h], ecx
mov	[esi+2DCh], ecx
mov	[esi+2E4h], ecx
mov	[esi+2E8h], ecx
mov	[esi+2F0h], ecx
pop	esi
retn

loc_6FD405:
xor	eax, eax
pop	esi
retn
sub_6FD360 endp

align 10h



sub_6FD410 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	0
push	0
push	eax
push	0
mov	esi, ecx
call	sub_6AA310
lea	ecx, [esi+250h]
call	sub_6AD7D0
mov	eax, esi
pop	esi
retn	4
sub_6FD410 endp

align 10h



sub_6FD440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
push	edi
push	20001h
push	eax
mov	esi, ecx
call	sub_7042D0
mov	ebp, [esp+10h+arg_0]
mov	dword ptr [esi+14h], offset off_143F300
xor	edi, edi
mov	dword ptr [esi], offset	off_143F0A0
mov	dword ptr [esi+14h], offset off_143F098
mov	[esi+1Ch], edi
mov	[esi+20h], edi
mov	ecx, [ebp+20h]
mov	edx, [ecx+1Ch]
push	edi
push	edi
push	edx
lea	ebx, [esi+28h]
push	edi
mov	ecx, ebx
call	sub_6AA310
lea	ecx, [ebx+250h]
call	sub_6AD7D0
mov	eax, [esp+10h+arg_4]
mov	[esi+300h], edi
mov	[esi+304h], edi
mov	[esi+308h], edi
mov	[esi+30Ch], edi
mov	[esi+310h], edi
mov	[esi+314h], edi
mov	[esi+318h], edi
mov	[esi+31Ch], edi
mov	[esi+320h], edi
mov	eax, [eax+10h]
cmp	eax, edi
jz	short loc_6FD4DA
mov	eax, [eax+0Ch]
jmp	short loc_6FD4DC

loc_6FD4DA:
xor	eax, eax

loc_6FD4DC:
mov	[esi+18h], eax
mov	ecx, [ebp+20h]
cmp	ecx, edi
jz	short loc_6FD4EB
call	sub_64A420

loc_6FD4EB:
mov	ecx, [esi+20h]
cmp	ecx, edi
jz	short loc_6FD4F7
call	sub_64A430

loc_6FD4F7:
mov	ecx, [ebp+20h]
mov	edx, [esp+10h+arg_8]
mov	[esi+20h], ecx
mov	[esi+2FCh], edi
mov	[esi+2C4h], edi
mov	[esi+2F8h], edi
mov	[esi+2CCh], edi
mov	[esi+2D4h], edi
mov	[esi+2D8h], edi
mov	[esi+2DCh], edi
mov	[esi+2E0h], edi
mov	[esi+2E4h], edi
mov	[esi+2ECh], edi
mov	[esi+2E8h], edi
mov	[esi+2F4h], edi
mov	[esi+2F0h], edi
mov	[esi+324h], edi
mov	[esi+2D0h], edi
pop	edi
mov	[esi+24h], ebp
mov	[esi+2C8h], edx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6FD440 endp

align 10h



sub_6FD570 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6FD1F0
test	[esp+4+arg_0], 1
jz	short loc_6FD58D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6FD58D:
mov	eax, esi
pop	esi
retn	4
sub_6FD570 endp

align 10h



sub_6FD5A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
test	eax, eax
jz	short loc_6FD637
mov	ecx, [ecx+20h]
mov	edx, [ecx+0Ch]
push	ebx
lea	ebx, ds:0[eax*4]
add	ecx, 8
lea	eax, [ebx+3]
and	eax, 0FFFFFFFCh
cmp	eax, edx
ja	short loc_6FD5EF
mov	edi, [ecx]
push	ebp
lea	ebp, [edi+eax]
sub	edx, eax
mov	[ecx], ebp
mov	eax, edi
mov	edi, [esp+10h+arg_0]
mov	[ecx+4], edx
pop	ebp
jmp	short loc_6FD5F5

loc_6FD5EF:
push	eax
call	sub_6AB110

loc_6FD5F5:
mov	[edi], eax
test	eax, eax
jz	short loc_6FD60E
mov	ecx, [esi]
push	ebx
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi+4]
add	esp, 0Ch
mov	[edi+4], edx

loc_6FD60E:
cmp	dword ptr [esi+4], 0
pop	ebx
jbe	short loc_6FD620
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_6FD630
jmp	short loc_6FD626

loc_6FD620:
cmp	dword ptr [esi+8], 0
ja	short loc_6FD630

loc_6FD626:
push	0
push	esi
mov	ecx, esi
call	sub_669100

loc_6FD630:
mov	dword ptr [esi+4], 0

loc_6FD637:
mov	eax, edi
pop	edi
pop	esi
retn	8
sub_6FD5A0 endp

align 10h



sub_6FD640 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+2F8h]
push	edi
cmp	eax, 1
jnz	short loc_6FD67F
mov	eax, [esi+2FCh]
mov	edi, [eax]
lea	ecx, [esi+30Ch]
push	ecx
lea	edx, [esp+14h+var_8]
push	edx
mov	ecx, esi
call	sub_6FD5A0
mov	ecx, [esi+2FCh]
push	eax
mov	eax, [edi+44h]
call	eax
pop	edi
pop	esi
add	esp, 8
retn

loc_6FD67F:
lea	ecx, [eax+eax*2+0C0h]
push	ebx
mov	ebx, [esi+20h]
mov	edi, [ebx]
lea	edx, [esi+ecx*4]
push	edx
lea	eax, [esp+18h+var_8]
push	eax
mov	ecx, esi
add	edi, 8
call	sub_6FD5A0
mov	edx, [edi]
push	eax
mov	ecx, ebx
call	edx
mov	ebx, [esi+20h]
mov	edi, [ebx]
lea	eax, [esi+318h]
push	eax
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, esi
add	edi, 0Ch
call	sub_6FD5A0
mov	edx, [edi]
push	eax
mov	ecx, ebx
call	edx
pop	ebx
pop	edi
pop	esi
add	esp, 8
retn
sub_6FD640 endp

align 10h



sub_6FD6D0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
push	edi
mov	esi, ecx
xor	ebx, ebx
xor	edi, edi
cmp	[esi+310h], ebx
jbe	short loc_6FD6FB

loc_6FD6E2:
mov	eax, [esi+30Ch]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax
inc	edi
cmp	edi, [esi+310h]
jb	short loc_6FD6E2

loc_6FD6FB:
xor	edi, edi
cmp	[esi+304h], ebx
jbe	short loc_6FD71E

loc_6FD705:
mov	ecx, [esi+300h]
mov	ecx, [ecx+edi*4]
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax
inc	edi
cmp	edi, [esi+304h]
jb	short loc_6FD705

loc_6FD71E:
xor	edi, edi
cmp	[esi+31Ch], ebx
jbe	short loc_6FD749
jmp	short loc_6FD730
align 10h

loc_6FD730:
mov	ecx, [esi+318h]
mov	ecx, [ecx+edi*4]
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax
inc	edi
cmp	edi, [esi+31Ch]
jb	short loc_6FD730

loc_6FD749:
mov	eax, [esi+310h]
lea	edi, [esi+30Ch]
cmp	eax, ebx
jbe	short loc_6FD7AA
test	dword ptr [edi+8], 0FFFFFFFEh
jbe	short loc_6FD7B8
mov	eax, [edi]
mov	ecx, dword_1855FC0
cmp	eax, ebx
jz	short loc_6FD786
mov	edx, [ecx]
push	80h
push	eax
mov	eax, [edx+2Ch]
call	eax
mov	[edi], eax
mov	dword ptr [edi+8], 20h
jmp	short loc_6FD7B8

loc_6FD786:
lea	eax, [esp+10h+var_4]
mov	[esp+10h+var_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
push	80h
call	edx
mov	[edi], eax
mov	dword ptr [edi+8], 20h
jmp	short loc_6FD7B8

loc_6FD7AA:
cmp	[edi+8], ebx
ja	short loc_6FD7B8
push	ebx
push	edi
mov	ecx, edi
call	sub_669100

loc_6FD7B8:
mov	[edi+4], ebx
cmp	[esi+304h], ebx
lea	edi, [esi+300h]
jbe	short loc_6FD81A
test	dword ptr [edi+8], 0FFFFFFFEh
jbe	short loc_6FD828
mov	eax, [edi]
mov	ecx, dword_1855FC0
cmp	eax, ebx
jz	short loc_6FD7F6
mov	edx, [ecx]
push	80h
push	eax
mov	eax, [edx+2Ch]
call	eax
mov	[edi], eax
mov	dword ptr [edi+8], 20h
jmp	short loc_6FD828

loc_6FD7F6:
lea	eax, [esp+10h+var_4]
mov	[esp+10h+var_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
push	80h
call	edx
mov	[edi], eax
mov	dword ptr [edi+8], 20h
jmp	short loc_6FD828

loc_6FD81A:
cmp	[edi+8], ebx
ja	short loc_6FD828
push	ebx
push	edi
mov	ecx, edi
call	sub_669100

loc_6FD828:
add	esi, 318h
mov	[edi+4], ebx
cmp	[esi+4], ebx
jbe	short loc_6FD893
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_6FD8A1
mov	eax, [esi]
mov	ecx, dword_1855FC0
cmp	eax, ebx
jz	short loc_6FD869
mov	edx, [ecx]
push	80h
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	edi
mov	[esi+4], ebx
mov	[esi], eax
mov	dword ptr [esi+8], 20h
pop	esi
pop	ebx
pop	ecx
retn

loc_6FD869:
lea	eax, [esp+10h+var_4]
mov	[esp+10h+var_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
push	80h
call	edx
pop	edi
mov	[esi+4], ebx
mov	[esi], eax
mov	dword ptr [esi+8], 20h
pop	esi
pop	ebx
pop	ecx
retn

loc_6FD893:
cmp	[esi+8], ebx
ja	short loc_6FD8A1
push	ebx
push	esi
mov	ecx, esi
call	sub_669100

loc_6FD8A1:
pop	edi
mov	[esi+4], ebx
pop	esi
pop	ebx
pop	ecx
retn
sub_6FD6D0 endp

align 10h



sub_6FD8B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
push	ecx
mov	edi, ecx
mov	ecx, [esp+14h+arg_4]
mov	eax, esp
mov	[eax], ecx
mov	ecx, [edi+20h]
push	ebx
call	sub_6B0B50
mov	ebp, [edi+20h]
mov	eax, [ebp+0Ch]
lea	ecx, [ebp+8]
cmp	eax, 10h
jb	short loc_6FD8E9
mov	esi, [ecx]
lea	edx, [esi+10h]
add	eax, 0FFFFFFF0h
mov	[ecx], edx
mov	[ecx+4], eax
jmp	short loc_6FD8F2

loc_6FD8E9:
push	10h
call	sub_6AB110
mov	esi, eax

loc_6FD8F2:
xor	eax, eax
cmp	esi, eax
jz	short loc_6FD975
mov	ebx, [esp+10h+arg_8]
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+0Ch], eax
mov	ecx, [ebx]
cmp	ecx, eax
jz	short loc_6FD915
mov	eax, [ecx]
mov	edx, [ebx+4]
mov	eax, [eax+4]
push	edx
call	eax

loc_6FD915:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_6FD926
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+8]
push	eax
call	edx

loc_6FD926:
mov	eax, [ebx]
mov	[esi], eax
mov	ecx, [ebx+4]
mov	ebx, [esp+10h+arg_0]
mov	[esi+4], ecx
mov	eax, [ebx+4]
mov	[esi+8], eax
cmp	dword ptr [edi+2E8h], 0
jnz	short loc_6FD949
mov	[edi+2E8h], esi

loc_6FD949:
cmp	dword ptr [ebp+0ACh], 0
lea	eax, [ebp+0ACh]
push	esi		; Value
jz	short loc_6FD962
mov	eax, [ebp+0B0h]
add	eax, 0Ch

loc_6FD962:		; Target
push	eax
call	ds:InterlockedExchange
mov	[ebp+0B0h], esi
inc	dword ptr [edi+2D8h]

loc_6FD975:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn	0Ch
sub_6FD8B0 endp

align 10h



sub_6FD980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, off_167DF20
mov	edx, [eax+4]
push	ebx
mov	ebx, [esp+0Ch+arg_8]
push	ebp
push	esi
push	edi
mov	edi, ecx
push	ebx
mov	ecx, offset off_167DF20
call	edx
mov	edx, [esp+18h+arg_0]
lea	eax, [esp+18h+var_8]
push	eax
push	ecx
mov	ecx, [esp+20h+arg_4]
mov	eax, esp
mov	[eax], ecx
push	edx
mov	ecx, edi
mov	[esp+24h+var_8], offset	off_167DF20
mov	[esp+24h+var_4], ebx
call	sub_6FD8B0
mov	eax, [edi+20h]
lea	ecx, [eax+8]
mov	eax, [ecx+4]
cmp	eax, 10h
jb	short loc_6FD9E0
mov	esi, [ecx]
lea	edx, [esi+10h]
add	eax, 0FFFFFFF0h
mov	[ecx], edx
mov	[ecx+4], eax
jmp	short loc_6FD9E9

loc_6FD9E0:
push	10h
call	sub_6AB110
mov	esi, eax

loc_6FD9E9:
xor	eax, eax
cmp	esi, eax
jz	short loc_6FDA66
mov	dword ptr [esi], 40000h
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	ecx, [esp+18h+arg_4]
mov	ebp, [edi+20h]
mov	[esi], ecx
cmp	ebx, eax
jz	short loc_6FDA12
mov	ecx, ebx
call	sub_64A420

loc_6FDA12:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_6FDA1E
call	sub_64A430

loc_6FDA1E:
mov	edx, [esp+18h+arg_0]
mov	[esi+4], ebx
mov	eax, [edx+4]
mov	[esi+8], eax
cmp	dword ptr [edi+2F0h], 0
jnz	short loc_6FDA3A
mov	[edi+2F0h], esi

loc_6FDA3A:
cmp	dword ptr [ebp+0A4h], 0
lea	eax, [ebp+0A4h]
push	esi		; Value
jz	short loc_6FDA53
mov	eax, [ebp+0A8h]
add	eax, 0Ch

loc_6FDA53:		; Target
push	eax
call	ds:InterlockedExchange
mov	[ebp+0A8h], esi
inc	dword ptr [edi+2DCh]

loc_6FDA66:
mov	edx, off_167DF20
mov	eax, [edx+8]
push	ebx
mov	ecx, offset off_167DF20
call	eax
mov	eax, [esp+18h+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_6FD980 endp

align 10h



; int __stdcall	sub_6FDA90(LONG	Value)
sub_6FDA90 proc	near

Value= dword ptr  4

push	ebx
mov	ebx, [esp+4+Value]
push	esi
mov	esi, ecx
mov	eax, [esi+2CCh]
mov	[ebx+14h], eax
inc	dword ptr [esi+2CCh]
cmp	dword ptr [esi+2E4h], 0
push	edi
jnz	short loc_6FDAB7
mov	[esi+2E4h], ebx

loc_6FDAB7:
mov	edi, [esi+20h]
add	edi, 94h
cmp	dword ptr [edi+8], 0
lea	eax, [edi+8]
push	ebx		; Value
jnz	short loc_6FDACD
push	eax
jmp	short loc_6FDAD4

loc_6FDACD:
mov	ecx, [edi+0Ch]
add	ecx, 18h
push	ecx		; Target

loc_6FDAD4:
call	ds:InterlockedExchange
mov	[edi+0Ch], ebx
inc	dword ptr [esi+2D4h]
pop	edi
pop	esi
pop	ebx
retn	4
sub_6FDA90 endp

align 10h



sub_6FDAF0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 40h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
xor	ebx, ebx
test	byte ptr [esi+2C8h], 80h
push	edi
mov	[esp+50h+var_38], esi
jnz	loc_6FDC36
mov	ecx, [eax+8]
cmp	[ecx+10h], ebx
jz	loc_6FDC36
mov	edx, [ecx+10h]
cmp	[edx+0Ch], bl
jnz	loc_6FDC36
cmp	edx, ebx
jz	loc_6FDC36
mov	ecx, [esi+20h]
mov	[esp+50h+var_1C], ebx
mov	[esp+50h+var_18], ebx
mov	[esp+50h+var_14], ebx
mov	[esp+50h+var_10], ebx
mov	[esp+50h+var_C], ebx
mov	[esp+50h+var_8], ebx
mov	[esp+50h+var_30], ebx
mov	[esp+50h+var_20], ebx
mov	[esp+50h+var_28], ebx
mov	[esp+50h+var_2C], ebx
mov	[esp+50h+var_24], 1
mov	byte ptr [esp+50h+var_4], bl
mov	ebp, [ecx+1Ch]
mov	[esp+50h+var_8], ebp
mov	edx, [eax+2Ch]
mov	esi, [eax+24h]
mov	edi, [eax+0Ch]
mov	ecx, [eax+20h]
mov	[esp+50h+var_1C], ebx
mov	[esp+50h+var_18], ecx
mov	[esp+50h+var_14], edi
mov	[esp+50h+var_10], esi
mov	[esp+50h+var_C], edx
cmp	[eax+44h], bl
jnz	short loc_6FDB9B
cmp	[eax+18h], ebx
mov	byte ptr [esp+50h+var_4], bl
jz	short loc_6FDBA0

loc_6FDB9B:
mov	byte ptr [esp+50h+var_4], 1

loc_6FDBA0:
mov	ecx, [esp+50h+arg_4]
cmp	ecx, ebx
jz	short loc_6FDBB4
mov	[esp+50h+var_30], 1
mov	[esp+50h+var_20], ecx

loc_6FDBB4:
mov	ecx, [eax+8]
cmp	[ecx+10h], ebx
jz	short loc_6FDBD5
mov	eax, ecx
mov	ecx, [eax+10h]
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+50h+var_30]
push	edx
call	eax
mov	ebp, [esp+50h+var_8]
mov	edi, eax
jmp	short loc_6FDBD7

loc_6FDBD5:
mov	edi, ebx

loc_6FDBD7:
mov	edx, [ebp+0]
mov	eax, [edx+28h]
push	ebx
push	1Ch
mov	ecx, ebp
call	eax
cmp	eax, ebx
jz	short loc_6FDBF6
push	1
push	edi
mov	ecx, eax
call	sub_6FC510
mov	esi, eax
jmp	short loc_6FDBF8

loc_6FDBF6:
xor	esi, esi

loc_6FDBF8:
mov	ecx, [esp+50h+var_38]
cmp	[ecx+2F8h], ebx
jnz	short loc_6FDC16
mov	edx, [esp+50h+arg_0]
push	esi
push	ecx
mov	eax, esp
mov	[eax], edx
mov	ecx, [ecx+20h]
call	sub_6B0AB0

loc_6FDC16:
cmp	esi, ebx
jz	short loc_6FDC21
mov	ecx, esi
call	sub_666B00

loc_6FDC21:
cmp	edi, ebx
jz	short loc_6FDC89
mov	ecx, edi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn	8

loc_6FDC36:
mov	eax, [esp+50h+arg_4]
push	eax
lea	ecx, [esp+54h+var_38]
push	ecx
call	sub_6FCB10
add	esp, 8
lea	edx, [esp+50h+var_38]
push	edx
push	ecx
mov	ecx, [esp+58h+arg_0]
mov	eax, esp
lea	edx, [esp+58h+var_40]
mov	[eax], ecx
push	edx
mov	ecx, esi
call	sub_6FD8B0
cmp	[esp+50h+var_40], ebx
jnz	short loc_6FDC75
mov	ecx, [esp+50h+var_3C]
cmp	ecx, ebx
jz	short loc_6FDC75
call	sub_666B00

loc_6FDC75:
mov	ecx, [esp+50h+var_38]
cmp	ecx, ebx
jz	short loc_6FDC89
mov	eax, [ecx]
mov	edx, [esp+50h+var_34]
mov	eax, [eax+8]
push	edx
call	eax

loc_6FDC89:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn	8
sub_6FDAF0 endp

align 10h



sub_6FDCA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
xor	ebx, ebx
push	ebp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143F0AC
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], ebx
push	edi
lea	ecx, [esi+40h]
mov	[esi+3Ch], ebx
call	sub_679E30
mov	ebp, [esp+10h+arg_0]
mov	[esi+44h], bl
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
cmp	ebp, ebx
jz	short loc_6FDD08
mov	ecx, ebp
call	sub_64A420

loc_6FDD08:
mov	ecx, [esi+3Ch]
cmp	ecx, ebx
jz	short loc_6FDD14
call	sub_64A430

loc_6FDD14:
mov	[esi+3Ch], ebp
mov	edi, [ebp+18h]
cmp	edi, ebx
jz	short loc_6FDD25
mov	ecx, edi
call	sub_64A420

loc_6FDD25:
mov	ecx, [esi+38h]
cmp	ecx, ebx
jz	short loc_6FDD31
call	sub_64A430

loc_6FDD31:
mov	[esi+38h], edi
mov	edi, [esp+10h+arg_4]
cmp	edi, ebx
jnz	short loc_6FDD3F
lea	edi, [ebp+8]

loc_6FDD3F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
mov	ebp, [esp+10h+arg_8]
push	ebx
push	2Ch
call	edx
cmp	ebp, ebx
jz	short loc_6FDD67
cmp	eax, ebx
jz	short loc_6FDD77
push	ebp
mov	ecx, eax
call	sub_6FCEE0
mov	ebp, eax
jmp	short loc_6FDD79

loc_6FDD67:
cmp	eax, ebx
jz	short loc_6FDD77
push	edi
mov	ecx, eax
call	sub_6FCD00
mov	ebp, eax
jmp	short loc_6FDD79

loc_6FDD77:
xor	ebp, ebp

loc_6FDD79:
mov	ecx, [esi+8]
cmp	ecx, ebx
jz	short loc_6FDD85
call	sub_64A430

loc_6FDD85:
mov	[esi+8], ebp
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	4
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDDA0
mov	ecx, ebp
call	sub_64A420

loc_6FDDA0:
mov	ecx, [esi+0Ch]
cmp	ecx, ebx
jz	short loc_6FDDAC
call	sub_64A430

loc_6FDDAC:
mov	[esi+0Ch], ebp
cmp	ebp, ebx
jz	short loc_6FDDBA
mov	ecx, ebp
call	sub_64A430

loc_6FDDBA:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	0Dh
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDDD2
mov	ecx, ebp
call	sub_64A420

loc_6FDDD2:
mov	ecx, [esi+10h]
cmp	ecx, ebx
jz	short loc_6FDDDE
call	sub_64A430

loc_6FDDDE:
mov	[esi+10h], ebp
cmp	ebp, ebx
jz	short loc_6FDDEC
mov	ecx, ebp
call	sub_64A430

loc_6FDDEC:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	0Eh
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDE04
mov	ecx, ebp
call	sub_64A420

loc_6FDE04:
mov	ecx, [esi+14h]
cmp	ecx, ebx
jz	short loc_6FDE10
call	sub_64A430

loc_6FDE10:
mov	[esi+14h], ebp
cmp	ebp, ebx
jz	short loc_6FDE1E
mov	ecx, ebp
call	sub_64A430

loc_6FDE1E:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	12h
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDE36
mov	ecx, ebp
call	sub_64A420

loc_6FDE36:
mov	ecx, [esi+1Ch]
cmp	ecx, ebx
jz	short loc_6FDE42
call	sub_64A430

loc_6FDE42:
mov	[esi+1Ch], ebp
cmp	ebp, ebx
jz	short loc_6FDE50
mov	ecx, ebp
call	sub_64A430

loc_6FDE50:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	17h
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDE68
mov	ecx, ebp
call	sub_64A420

loc_6FDE68:
mov	ecx, [esi+18h]
cmp	ecx, ebx
jz	short loc_6FDE74
call	sub_64A430

loc_6FDE74:
mov	[esi+18h], ebp
cmp	ebp, ebx
jz	short loc_6FDE82
mov	ecx, ebp
call	sub_64A430

loc_6FDE82:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	1
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDE9A
mov	ecx, ebp
call	sub_64A420

loc_6FDE9A:
mov	ecx, [esi+20h]
cmp	ecx, ebx
jz	short loc_6FDEA6
call	sub_64A430

loc_6FDEA6:
mov	[esi+20h], ebp
cmp	ebp, ebx
jz	short loc_6FDEB4
mov	ecx, ebp
call	sub_64A430

loc_6FDEB4:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	1Dh
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDECC
mov	ecx, ebp
call	sub_64A420

loc_6FDECC:
mov	ecx, [esi+24h]
cmp	ecx, ebx
jz	short loc_6FDED8
call	sub_64A430

loc_6FDED8:
mov	[esi+24h], ebp
cmp	ebp, ebx
jz	short loc_6FDEE6
mov	ecx, ebp
call	sub_64A430

loc_6FDEE6:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	1Eh
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDEFE
mov	ecx, ebp
call	sub_64A420

loc_6FDEFE:
mov	ecx, [esi+28h]
cmp	ecx, ebx
jz	short loc_6FDF0A
call	sub_64A430

loc_6FDF0A:
mov	[esi+28h], ebp
cmp	ebp, ebx
jz	short loc_6FDF18
mov	ecx, ebp
call	sub_64A430

loc_6FDF18:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	21h
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDF30
mov	ecx, ebp
call	sub_64A420

loc_6FDF30:
mov	ecx, [esi+2Ch]
cmp	ecx, ebx
jz	short loc_6FDF3C
call	sub_64A430

loc_6FDF3C:
mov	[esi+2Ch], ebp
cmp	ebp, ebx
jz	short loc_6FDF4A
mov	ecx, ebp
call	sub_64A430

loc_6FDF4A:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	23h
mov	ecx, edi
call	edx
mov	ebp, eax
cmp	ebp, ebx
jz	short loc_6FDF62
mov	ecx, ebp
call	sub_64A420

loc_6FDF62:
mov	ecx, [esi+30h]
cmp	ecx, ebx
jz	short loc_6FDF6E
call	sub_64A430

loc_6FDF6E:
mov	[esi+30h], ebp
cmp	ebp, ebx
jz	short loc_6FDF7C
mov	ecx, ebp
call	sub_64A430

loc_6FDF7C:
mov	eax, [edi]
mov	edx, [eax+0Ch]
push	22h
mov	ecx, edi
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_6FDF94
mov	ecx, edi
call	sub_64A420

loc_6FDF94:
mov	ecx, [esi+34h]
cmp	ecx, ebx
jz	short loc_6FDFA0
call	sub_64A430

loc_6FDFA0:
mov	[esi+34h], edi
cmp	edi, ebx
jz	short loc_6FDFAE
mov	ecx, edi
call	sub_64A430

loc_6FDFAE:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_6FDCA0 endp

align 10h



sub_6FDFC0 proc	near
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esi+48h]
mov	dword ptr [esi], offset	off_143F0AC
call	sub_6AC570
mov	edi, [esi+40h]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6FDFF7
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_6FDFF7:
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6FE003
call	sub_64A430

loc_6FE003:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_6FE00F
call	sub_64A430

loc_6FE00F:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_6FE01B
call	sub_64A430

loc_6FE01B:
mov	ecx, [esi+30h]
test	ecx, ecx
jz	short loc_6FE027
call	sub_64A430

loc_6FE027:
mov	ecx, [esi+2Ch]
test	ecx, ecx
jz	short loc_6FE033
call	sub_64A430

loc_6FE033:
mov	ecx, [esi+28h]
test	ecx, ecx
jz	short loc_6FE03F
call	sub_64A430

loc_6FE03F:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_6FE04B
call	sub_64A430

loc_6FE04B:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6FE057
call	sub_64A430

loc_6FE057:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6FE063
call	sub_64A430

loc_6FE063:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6FE06F
call	sub_64A430

loc_6FE06F:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6FE07B
call	sub_64A430

loc_6FE07B:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6FE087
call	sub_64A430

loc_6FE087:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FE093
call	sub_64A430

loc_6FE093:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6FE09F
call	sub_64A430

loc_6FE09F:
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_6FDFC0 endp

align 10h



sub_6FE0B0 proc	near
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143F0AC
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], ebx
lea	ecx, [esi+40h]
mov	[esi+3Ch], ebx
call	sub_679E30
mov	[esi+44h], bl
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn
sub_6FE0B0 endp

align 10h



sub_6FE110 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_6FDFC0
test	[esp+4+arg_0], 1
jz	short loc_6FE12D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6FE12D:
mov	eax, esi
pop	esi
retn	4
sub_6FE110 endp

align 10h



sub_6FE140 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	2Ch
call	edx
test	eax, eax
jz	short loc_6FE169
mov	ecx, [edi+8]
push	ecx
mov	ecx, eax
call	sub_6FCEE0
mov	ebx, eax
jmp	short loc_6FE16B

loc_6FE169:
xor	ebx, ebx

loc_6FE16B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	54h
call	edx
test	eax, eax
jz	loc_6FE346
mov	ecx, eax
call	sub_6FE0B0
mov	esi, eax
test	esi, esi
jz	loc_6FE335
test	ebx, ebx
jz	short loc_6FE1A0
mov	ecx, ebx
call	sub_64A420

loc_6FE1A0:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_6FE1AC
call	sub_64A430

loc_6FE1AC:
mov	[esi+8], ebx
mov	ecx, [edi+3Ch]
test	ecx, ecx
jz	short loc_6FE1BB
call	sub_64A420

loc_6FE1BB:
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6FE1C7
call	sub_64A430

loc_6FE1C7:
mov	eax, [edi+3Ch]
mov	[esi+3Ch], eax
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_6FE1D9
call	sub_64A420

loc_6FE1D9:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_6FE1E5
call	sub_64A430

loc_6FE1E5:
mov	ecx, [edi+0Ch]
mov	[esi+0Ch], ecx
mov	ecx, [edi+14h]
test	ecx, ecx
jz	short loc_6FE1F7
call	sub_64A420

loc_6FE1F7:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_6FE203
call	sub_64A430

loc_6FE203:
mov	edx, [edi+14h]
mov	[esi+14h], edx
mov	ecx, [edi+18h]
test	ecx, ecx
jz	short loc_6FE215
call	sub_64A420

loc_6FE215:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6FE221
call	sub_64A430

loc_6FE221:
mov	eax, [edi+18h]
mov	[esi+18h], eax
mov	ecx, [edi+1Ch]
test	ecx, ecx
jz	short loc_6FE233
call	sub_64A420

loc_6FE233:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_6FE23F
call	sub_64A430

loc_6FE23F:
mov	ecx, [edi+1Ch]
mov	[esi+1Ch], ecx
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_6FE251
call	sub_64A420

loc_6FE251:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_6FE25D
call	sub_64A430

loc_6FE25D:
mov	edx, [edi+10h]
mov	[esi+10h], edx
mov	ecx, [edi+38h]
test	ecx, ecx
jz	short loc_6FE26F
call	sub_64A420

loc_6FE26F:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_6FE27B
call	sub_64A430

loc_6FE27B:
mov	eax, [edi+38h]
mov	[esi+38h], eax
mov	ecx, [edi+24h]
test	ecx, ecx
jz	short loc_6FE28D
call	sub_64A420

loc_6FE28D:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_6FE299
call	sub_64A430

loc_6FE299:
mov	ecx, [edi+24h]
mov	[esi+24h], ecx
mov	ecx, [edi+28h]
test	ecx, ecx
jz	short loc_6FE2AB
call	sub_64A420

loc_6FE2AB:
mov	ecx, [esi+28h]
test	ecx, ecx
jz	short loc_6FE2B7
call	sub_64A430

loc_6FE2B7:
mov	edx, [edi+28h]
mov	[esi+28h], edx
mov	ecx, [edi+2Ch]
test	ecx, ecx
jz	short loc_6FE2C9
call	sub_64A420

loc_6FE2C9:
mov	ecx, [esi+2Ch]
test	ecx, ecx
jz	short loc_6FE2D5
call	sub_64A430

loc_6FE2D5:
mov	eax, [edi+2Ch]
mov	[esi+2Ch], eax
mov	ecx, [edi+20h]
test	ecx, ecx
jz	short loc_6FE2E7
call	sub_64A420

loc_6FE2E7:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_6FE2F3
call	sub_64A430

loc_6FE2F3:
mov	ecx, [edi+20h]
mov	[esi+20h], ecx
mov	ecx, [edi+34h]
test	ecx, ecx
jz	short loc_6FE305
call	sub_64A420

loc_6FE305:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_6FE311
call	sub_64A430

loc_6FE311:
mov	edx, [edi+34h]
mov	[esi+34h], edx
mov	ecx, [edi+30h]
test	ecx, ecx
jz	short loc_6FE323
call	sub_64A420

loc_6FE323:
mov	ecx, [esi+30h]
test	ecx, ecx
jz	short loc_6FE32F
call	sub_64A430

loc_6FE32F:
mov	eax, [edi+30h]
mov	[esi+30h], eax

loc_6FE335:
test	ebx, ebx
jz	short loc_6FE340
mov	ecx, ebx
call	sub_64A430

loc_6FE340:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn

loc_6FE346:
xor	esi, esi
jmp	short loc_6FE335
sub_6FE140 endp

align 10h



sub_6FE350 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
retn
sub_6FE350 endp

align 10h



sub_6FE370 proc	near
mov	eax, ecx
mov	ecx, [eax+3Ch]
test	ecx, ecx
jnz	short loc_6FE37C

loc_6FE379:
xor	eax, eax
retn

loc_6FE37C:
mov	eax, [eax+40h]
test	eax, eax
jz	short loc_6FE379
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_6FE379
lea	ecx, [eax+78h]
jmp	sub_661C50
sub_6FE370 endp

align 10h



sub_6FE3A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+18h]
call	sub_668010
test	eax, eax
jz	loc_6FE521
lea	ecx, [eax+8]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	edi
push	22h
call	edx
mov	edi, eax
test	edi, edi
jz	loc_6FE520
mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
mov	ecx, edi
call	edx
mov	ebx, eax
mov	ecx, edi
mov	[esp+10h+var_4], ebx
call	sub_64A430
test	ebx, ebx
jz	loc_6FE51F
cmp	dword ptr [esi+8], 0
jz	loc_6FE51F
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 20h
jnz	loc_6FE51F
mov	ebx, [esi+8]
test	ebx, ebx
jz	loc_6FE51F
add	ebx, 0FFFFFFF0h
jz	loc_6FE51F
push	ebp
mov	ecx, ebx
call	sub_6FE370
mov	ebp, eax
test	ebp, ebp
jz	loc_6FE51E
cmp	dword ptr [esi+1Ch], 0
mov	[esp+14h+arg_0], 0
jle	short loc_6FE455
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	[esp+14h+arg_0], eax

loc_6FE455:
cmp	dword ptr [esi+1Ch], 1
jle	short loc_6FE475
mov	ecx, [esi+18h]
push	ecx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	edi, eax
test	edi, edi
jnz	short loc_6FE47A

loc_6FE475:
mov	edi, 1

loc_6FE47A:
cmp	dword ptr [ebx+38h], 0
jnz	short loc_6FE490
push	ebx
mov	ecx, ebp
call	sub_67ED00
test	al, al
jnz	loc_6FE51E

loc_6FE490:
mov	eax, [ebx+34h]
mov	ecx, [esp+14h+var_4]
mov	edx, [ecx]
push	1
push	eax
mov	eax, [edx+14h]
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6FE51E
cmp	[esp+14h+arg_0], 0
jg	short loc_6FE4B2
test	edi, edi
jle	short loc_6FE4CC

loc_6FE4B2:
fldz
mov	edx, [esi]
mov	eax, [edx+20h]
sub	esp, 8
fstp	[esp+1Ch+var_18]
mov	ecx, esi
fild	[esp+1Ch+arg_0]
fstp	[esp+1Ch+var_1C]
push	edi
call	eax

loc_6FE4CC:
mov	edi, [esi]
mov	ecx, ebp
add	edi, 28h
call	sub_67DC90
mov	edx, [edi]
push	ecx
mov	ecx, esi
fstp	[esp+18h+var_18]
call	edx
mov	edi, [esi]
mov	ecx, ebp
add	edi, 30h
call	sub_67DD40
mov	eax, [edi]
push	ecx
mov	ecx, esi
fstp	[esp+18h+var_18]
call	eax
mov	edx, [esi]
mov	eax, [edx+10h]
push	0
mov	ecx, esi
call	eax
mov	ecx, [ebx+38h]
push	ecx
push	ebx
push	esi
mov	ecx, ebp
call	sub_687C90
pop	ebp
pop	ebx
pop	edi
mov	ecx, esi
pop	esi
add	esp, 4
jmp	sub_64A430

loc_6FE51E:
pop	ebp

loc_6FE51F:
pop	ebx

loc_6FE520:
pop	edi

loc_6FE521:
pop	esi
pop	ecx
retn
sub_6FE3A0 endp

align 10h



sub_6FE530 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	edi
mov	edi, [esp+14h+arg_0]
mov	eax, [edi+8]
test	eax, eax
jz	loc_6FE674
add	eax, 0FFFFFFF0h
jz	loc_6FE674
mov	ecx, [eax+3Ch]
test	ecx, ecx
jz	loc_6FE674
mov	eax, [eax+40h]
test	eax, eax
jz	loc_6FE674
push	eax
call	sub_654F00
test	eax, eax
jz	loc_6FE674
lea	ecx, [eax+78h]
call	sub_661C50
mov	[esp+14h+var_C], eax
test	eax, eax
jz	loc_6FE674
cmp	dword ptr [edi+1Ch], 0
jle	loc_6FE6BF
push	ebx
push	esi
mov	esi, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+28h+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6FE5B9
lea	ebx, [eax-10h]
jmp	short loc_6FE5BB

loc_6FE5B9:
xor	ebx, ebx

loc_6FE5BB:
mov	edx, [edi+18h]
mov	ecx, [edx+74h]
mov	eax, [ecx]
mov	edx, [eax+5Ch]
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_6FE5D5
mov	ecx, esi
call	sub_64A420

loc_6FE5D5:
test	ebx, ebx
jz	loc_6FE698
test	esi, esi
jz	loc_6FE6A3
mov	eax, [esp+1Ch+arg_0]
mov	[esp+1Ch+var_8], 0
mov	[esp+1Ch+var_4], 0
mov	ecx, [eax]
push	ecx
lea	ecx, [esp+20h+var_10]
call	sub_67AE10
mov	ecx, [edi+18h]
lea	edx, [esp+1Ch+var_10]
push	edx
lea	eax, [esp+20h+var_8]
push	eax
push	esi
call	sub_668010
mov	ecx, eax
call	sub_68F5F0
test	al, al
lea	ecx, [esp+1Ch+var_10]
setz	bl
call	sub_4E40F0
mov	ecx, [esp+1Ch+var_8]
test	bl, bl
jnz	short loc_6FE64C
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 400h
jz	short loc_6FE679
mov	ecx, [esp+1Ch+var_8]

loc_6FE64C:
test	ecx, ecx
jz	short loc_6FE655
call	sub_666B00

loc_6FE655:
mov	ecx, esi
call	sub_666B00
mov	eax, [esp+1Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6FE672
call	sub_650DF0

loc_6FE672:
pop	esi
pop	ebx

loc_6FE674:
pop	edi
add	esp, 10h
retn

loc_6FE679:
mov	eax, [esp+1Ch+var_8]
test	eax, eax
jz	short loc_6FE698
mov	ecx, [esp+1Ch+var_C]
push	eax
call	sub_685890
mov	ecx, [esp+1Ch+var_8]
test	ecx, ecx
jz	short loc_6FE698
call	sub_666B00

loc_6FE698:
test	esi, esi
jz	short loc_6FE6A3
mov	ecx, esi
call	sub_666B00

loc_6FE6A3:
mov	eax, [esp+1Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6FE672
pop	esi
pop	ebx
pop	edi
add	esp, 10h
jmp	sub_650DF0

loc_6FE6BF:
mov	ecx, eax
pop	edi
add	esp, 10h
jmp	sub_685780
sub_6FE530 endp

align 10h



sub_6FE6D0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6FE718
add	eax, 0FFFFFFF0h
jz	short loc_6FE718
cmp	dword ptr [eax+38h], 0
jnz	short loc_6FE718
mov	ecx, [eax+34h]
mov	eax, [ecx]
mov	edx, [eax+14h]
push	ebx
call	edx
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
mov	ebx, eax
jb	short loc_6FE711
mov	ecx, esi
call	sub_652060

loc_6FE711:
mov	[esi+4], ebx
mov	byte ptr [esi],	4
pop	ebx

loc_6FE718:
pop	edi
pop	esi
retn
sub_6FE6D0 endp

align 10h



sub_6FE720 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
mov	eax, [edi+8]
test	eax, eax
jz	short loc_6FE768
add	eax, 0FFFFFFF0h
jz	short loc_6FE768
cmp	dword ptr [eax+38h], 0
jnz	short loc_6FE768
mov	ecx, [eax+34h]
mov	eax, [ecx]
mov	edx, [eax+10h]
push	ebx
call	edx
mov	esi, [edi+4]
cmp	byte ptr [esi],	5
mov	ebx, eax
jb	short loc_6FE761
mov	ecx, esi
call	sub_652060

loc_6FE761:
mov	[esi+4], ebx
mov	byte ptr [esi],	4
pop	ebx

loc_6FE768:
pop	edi
pop	esi
retn
sub_6FE720 endp

align 10h



sub_6FE770 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6FE7C5
add	eax, 0FFFFFFF0h
jz	short loc_6FE7C5
mov	ecx, [eax+3Ch]
test	ecx, ecx
jz	short loc_6FE7C5
mov	eax, [eax+40h]
test	eax, eax
jz	short loc_6FE7C5
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_6FE7C5
lea	ecx, [eax+78h]
call	sub_661C50
test	eax, eax
jz	short loc_6FE7C5
push	edi
mov	ecx, eax
call	sub_67DD20
mov	esi, [esi+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6FE7BE
mov	ecx, esi
call	sub_652060

loc_6FE7BE:
mov	[esi+4], edi
mov	byte ptr [esi],	4
pop	edi

loc_6FE7C5:
pop	esi
retn
sub_6FE770 endp

align 10h



sub_6FE7D0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+8]
push	esi
push	edi
test	eax, eax
jz	short loc_6FE7E3
lea	esi, [eax-10h]
jmp	short loc_6FE7E5

loc_6FE7E3:
xor	esi, esi

loc_6FE7E5:
mov	edi, [ebx+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0
test	esi, esi
jz	short loc_6FE838
mov	ecx, [esi+3Ch]
test	ecx, ecx
jz	short loc_6FE838
mov	esi, [esi+40h]
test	esi, esi
jz	short loc_6FE838
push	esi
call	sub_654F00
test	eax, eax
jz	short loc_6FE838
lea	ecx, [eax+78h]
call	sub_661C50
test	eax, eax
jz	short loc_6FE838
mov	ecx, eax
call	sub_67DC70
mov	esi, [ebx+4]
cmp	byte ptr [esi],	5
mov	edi, eax
jb	short loc_6FE832
mov	ecx, esi
call	sub_652060

loc_6FE832:
mov	byte ptr [esi],	4
mov	[esi+4], edi

loc_6FE838:
pop	edi
pop	esi
pop	ebx
retn
sub_6FE7D0 endp

align 10h



sub_6FE840 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jge	short loc_6FE85E
mov	eax, [esi+18h]
push	offset aErrorSound_set ; "Error: Sound.SetPan needs one	Argument\n"...
push	eax
call	sub_66D290
add	esp, 8
pop	esi
retn

loc_6FE85E:
mov	ecx, [esi+18h]
push	edi
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	esi, [esi+8]
mov	edi, eax
test	esi, esi
jz	short loc_6FE8AF
lea	eax, [esi-10h]
test	eax, eax
jz	short loc_6FE8AF
mov	ecx, [eax+3Ch]
test	ecx, ecx
jz	short loc_6FE8AF
mov	eax, [eax+40h]
test	eax, eax
jz	short loc_6FE8AF
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_6FE8AF
lea	ecx, [eax+78h]
call	sub_661C50
test	eax, eax
jz	short loc_6FE8AF
push	edi
mov	ecx, eax
call	sub_687FC0

loc_6FE8AF:
pop	edi
pop	esi
retn
sub_6FE840 endp

align 10h



sub_6FE8C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+1Ch], 1
jge	short loc_6FE8DE
mov	eax, [esi+18h]
push	offset aErrorSound_s_0 ; "Error: Sound.SetVolume needs,	at least,"...
push	eax
call	sub_66D290
add	esp, 8
pop	esi
retn

loc_6FE8DE:
mov	ecx, [esi+18h]
push	ebx
push	ebp
push	ecx
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
cmp	dword ptr [esi+1Ch], 1
mov	ebp, eax
mov	ebx, 64h
jle	short loc_6FE917
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_653660
mov	ebx, eax

loc_6FE917:
mov	esi, [esi+8]
test	esi, esi
jz	short loc_6FE952
lea	eax, [esi-10h]
test	eax, eax
jz	short loc_6FE952
mov	ecx, [eax+3Ch]
test	ecx, ecx
jz	short loc_6FE952
mov	eax, [eax+40h]
test	eax, eax
jz	short loc_6FE952
push	eax
call	sub_654F00
test	eax, eax
jz	short loc_6FE952
lea	ecx, [eax+78h]
call	sub_661C50
test	eax, eax
jz	short loc_6FE952
push	ebx
push	ebp
mov	ecx, eax
call	sub_687F50

loc_6FE952:
pop	ebp
pop	ebx
pop	esi
retn
sub_6FE8C0 endp

align 10h



sub_6FE960 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+3Ch]
test	esi, esi
jz	short loc_6FE987
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jg	short loc_6FE987
mov	ecx, esi
call	sub_654ED0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_6FE987:
mov	dword ptr [edi+3Ch], 0
pop	edi
pop	esi
retn
sub_6FE960 endp

align 10h



sub_6FE9A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, [esp+18h+arg_0]
mov	ecx, [esi+18h]
call	sub_668010
test	eax, eax
jz	loc_6FEAFF
lea	ecx, [eax+8]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	edi
push	22h
call	edx
mov	edi, eax
test	edi, edi
jz	loc_6FEAFE
mov	eax, [edi]
mov	edx, [eax+4]
push	ebx
mov	ecx, edi
call	edx
mov	ebx, eax
mov	ecx, edi
mov	[esp+20h+var_C], ebx
call	sub_64A430
test	ebx, ebx
jz	loc_6FEAFD
cmp	dword ptr [esi+1Ch], 1
jge	short loc_6FEA0C
mov	eax, [esi+18h]
push	offset aErrorSound_att ; "Error: Sound.AttachSound needs one Argu"...
push	eax
call	sub_66D290
add	esp, 8
pop	ebx
pop	edi
pop	esi
add	esp, 14h
retn

loc_6FEA0C:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+2Ch+arg_0]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	eax, [esi+8]
test	eax, eax
jz	short loc_6FEA39
add	eax, 0FFFFFFF0h
mov	[esp+20h+var_14], eax
jmp	short loc_6FEA41

loc_6FEA39:
mov	[esp+20h+var_14], 0

loc_6FEA41:
mov	edx, [esi+18h]
mov	ecx, [edx+74h]
mov	eax, [ecx]
mov	edx, [eax+5Ch]
push	ebp
call	edx
mov	ebp, eax
test	ebp, ebp
jz	short loc_6FEA5C
mov	ecx, ebp
call	sub_64A420

loc_6FEA5C:
cmp	[esp+24h+var_14], 0
jz	loc_6FEB85
test	ebp, ebp
jz	loc_6FEB90
mov	eax, [esp+24h+arg_0]
mov	[esp+24h+var_8], 0
mov	[esp+24h+var_4], 0
mov	ecx, [eax]
push	ecx
lea	ecx, [esp+28h+var_10]
call	sub_67AE10
mov	ecx, [esi+18h]
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+var_8]
push	eax
push	ebp
call	sub_668010
mov	ecx, eax
call	sub_68F5F0
test	al, al
lea	ecx, [esp+24h+var_10]
setz	bl
call	sub_4E40F0
mov	ecx, [esp+24h+var_8]
test	bl, bl
jnz	short loc_6FEAD6
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
and	eax, 0FF00h
cmp	eax, 400h
jz	short loc_6FEB04
mov	ecx, [esp+24h+var_8]

loc_6FEAD6:
test	ecx, ecx
jz	short loc_6FEADF
call	sub_666B00

loc_6FEADF:
mov	ecx, ebp
call	sub_666B00
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6FEAFC
call	sub_650DF0

loc_6FEAFC:
pop	ebp

loc_6FEAFD:
pop	ebx

loc_6FEAFE:
pop	edi

loc_6FEAFF:
pop	esi
add	esp, 14h
retn

loc_6FEB04:
mov	eax, [esp+24h+var_8]
mov	[esp+24h+var_10], eax
test	eax, eax
jz	short loc_6FEB85
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [esp+24h+var_C]
mov	edx, [edx+0Ch]
push	eax
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_6FEB31
push	1		; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd

loc_6FEB31:
mov	ebx, [esp+24h+var_14]
mov	esi, [ebx+34h]
test	esi, esi
jz	short loc_6FEB5B
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6FEB5B
test	esi, esi
jz	short loc_6FEB5B
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_6FEB5B:
mov	esi, [esp+24h+var_10]
mov	ecx, esi
mov	[ebx+34h], edi
call	sub_64A420
mov	ecx, [ebx+38h]
test	ecx, ecx
jz	short loc_6FEB75
call	sub_666B00

loc_6FEB75:
mov	ecx, [esp+24h+var_8]
mov	[ebx+38h], esi
test	ecx, ecx
jz	short loc_6FEB85
call	sub_666B00

loc_6FEB85:
test	ebp, ebp
jz	short loc_6FEB90
mov	ecx, ebp
call	sub_666B00

loc_6FEB90:
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_6FEAFC
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 14h
jmp	sub_650DF0
sub_6FE9A0 endp

align 10h



sub_6FEBC0 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	byte ptr -48h
var_44=	byte ptr -44h
var_34=	byte ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 58h
push	ebx
push	edi
mov	edi, ecx
mov	ecx, [edi+3Ch]
xor	ebx, ebx
cmp	ecx, ebx
jz	loc_6FED1A
mov	eax, [edi+40h]
cmp	eax, ebx
jz	loc_6FED1A
push	eax
call	sub_654F00
cmp	eax, ebx
jz	loc_6FED1A
lea	ecx, [eax+78h]
call	sub_661C50
cmp	eax, ebx
jz	loc_6FED1A
mov	edx, [eax]
push	ebp
mov	ecx, eax
mov	eax, [edx+70h]
push	esi
call	eax
mov	esi, eax
push	ebx
mov	[esp+6Ch+var_44], bl
mov	ecx, [esi+78h]
mov	ecx, [ecx+280h]
lea	ebp, [esi+78h]
push	0Fh
push	offset aOnsoundcomplet ; "onSoundComplete"
call	sub_650E40
mov	[esp+68h+var_54], eax
inc	dword ptr [eax+8]
mov	edx, [edi+10h]
mov	edx, [edx+2Ch]
lea	eax, [esp+68h+var_44]
push	eax
add	edi, 10h
lea	ecx, [esp+6Ch+var_54]
push	ecx
push	ebp
mov	ecx, edi
call	edx
mov	byte ptr [esp+68h+var_58+3], al
mov	eax, [esp+68h+var_54]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_6FEC5F
call	sub_650DF0

loc_6FEC5F:
cmp	byte ptr [esp+68h+var_58+3], bl
jz	loc_6FED0F
push	esi
lea	eax, [esp+6Ch+var_50]
push	eax
lea	ecx, [esp+70h+var_44]
call	sub_652DC0
mov	ecx, [esi+8]
sub	ecx, [esi+0Ch]
mov	edx, [esi+1Ch]
sar	ecx, 4
shl	edx, 5
lea	eax, [ecx+edx-20h]
mov	[esp+68h+var_4], eax
mov	eax, [esp+68h+var_4C]
lea	ecx, [esp+68h+var_34]
mov	[esp+68h+var_20], ecx
mov	ecx, [esp+68h+var_50]
push	ebx
push	eax
mov	[esp+70h+var_34], bl
mov	[esp+70h+var_24], offset off_1431764
mov	dword ptr [esp+70h+var_1C], edi
mov	byte ptr [esp+70h+var_10], bl
mov	[esp+70h+var_18], ebx
mov	[esp+70h+var_14], ebx
mov	[esp+70h+var_C], esi
mov	[esp+70h+var_8], ebx
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+70h+var_24]
push	eax
call	edx
lea	ecx, [esp+68h+var_24]
call	sub_64B830
lea	ecx, [esp+68h+var_34]
call	sub_652830
test	[esp+68h+var_48], 2
jnz	short loc_6FECF7
mov	ecx, [esp+68h+var_50]
cmp	ecx, ebx
jz	short loc_6FECF7
call	sub_64B3B0

loc_6FECF7:
test	[esp+68h+var_48], 1
mov	[esp+68h+var_50], ebx
jnz	short loc_6FED0F
mov	ecx, [esp+68h+var_4C]
cmp	ecx, ebx
jz	short loc_6FED0F
call	sub_64B3B0

loc_6FED0F:
lea	ecx, [esp+68h+var_44]
call	sub_652830
pop	esi
pop	ebp

loc_6FED1A:
pop	edi
pop	ebx
add	esp, 58h
retn
sub_6FEBC0 endp




sub_6FED20 proc	near

var_98=	dword ptr -98h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_54=	byte ptr -54h
var_50=	byte ptr -50h
var_44=	byte ptr -44h
var_3C=	byte ptr -3Ch
var_34=	byte ptr -34h
var_2C=	byte ptr -2Ch
var_24=	byte ptr -24h
arg_0= dword ptr  4

sub	esp, 8Ch
push	esi
push	edi
mov	edi, [esp+94h+arg_0]
mov	ecx, [edi+18h]
call	sub_668010
mov	esi, eax
test	esi, esi
jz	loc_6FF293
mov	eax, [esi+8]
mov	edx, [eax+0Ch]
lea	ecx, [esi+8]
push	ebx
push	22h
call	edx
mov	ebx, eax
test	ebx, ebx
jz	loc_6FF292
mov	eax, [ebx]
mov	edx, [eax+4]
push	ebp
mov	ecx, ebx
call	edx
mov	ebp, eax
mov	ecx, ebx
mov	[esp+9Ch+var_7C], ebp
call	sub_64A430
test	ebp, ebp
jz	loc_6FF291
mov	ebp, [edi+8]
test	ebp, ebp
jz	short loc_6FED84
add	ebp, 0FFFFFFF0h
jmp	short loc_6FED86

loc_6FED84:
xor	ebp, ebp

loc_6FED86:
mov	ecx, [ebp+3Ch]
test	ecx, ecx
jz	loc_6FF291
mov	eax, [ebp+40h]
test	eax, eax
jz	loc_6FF291
push	eax
call	sub_654F00
test	eax, eax
jz	loc_6FF291
lea	ecx, [eax+78h]
call	sub_661C50
mov	[esp+9Ch+var_68], eax
test	eax, eax
jz	loc_6FF291
cmp	dword ptr [edi+1Ch], 1
jge	short loc_6FEDE0
mov	eax, [edi+18h]
push	offset aErrorSound_att ; "Error: Sound.AttachSound needs one Argu"...
push	eax
call	sub_66D290
add	esp, 8
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 8Ch
retn

loc_6FEDE0:
mov	ebx, [edi+18h]
push	0
mov	ecx, edi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+0A8h+var_64]
push	ecx
mov	ecx, eax
call	sub_652F60
cmp	dword ptr [edi+1Ch], 1
mov	byte ptr [esp+9Ch+var_6C], 0
jle	short loc_6FEE20
mov	edx, [edi+18h]
push	edx
push	1
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+9Ch+var_6C], al

loc_6FEE20:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	54h
call	edx
cmp	eax, ebx
jz	short loc_6FEE5A
mov	ecx, [esi+0F0h]
cmp	ecx, ebx
jz	short loc_6FEE43
lea	ebx, [ecx+8]

loc_6FEE43:
mov	ecx, [esi+34h]
mov	edx, [ecx+14h]
push	0
push	ebx
push	edx
mov	ecx, eax
call	sub_6FDCA0
mov	[esp+94h+var_70], eax
jmp	short loc_6FEE5E

loc_6FEE5A:
mov	[esp+94h+var_70], ebx

loc_6FEE5E:
lea	ecx, [esp+94h+var_6C]
call	sub_679E30
lea	edx, [esp+94h+var_6C]
push	edx
mov	ecx, esi
call	sub_68E940
mov	eax, [esp+94h+var_5C]
mov	eax, [eax]
push	eax
lea	ecx, [esp+98h+var_84]
call	sub_67AE10
push	eax
lea	ecx, [esp+98h+var_54]
mov	dword ptr [esp+98h+var_58], 0
call	sub_67AF90
lea	ecx, [esp+94h+var_6C]
push	ecx
lea	ecx, [esp+98h+var_50]
call	sub_67AF90
lea	ecx, [esp+94h+var_84]
call	sub_4E40F0
lea	ecx, [esp+94h+var_68]
call	sub_679E30
mov	ecx, [esp+94h+var_70]
lea	edx, [esp+94h+var_58]
push	edx
lea	eax, [esp+98h+var_68]
push	eax
call	sub_6FC480
mov	eax, [esp+94h+var_68]
mov	ecx, [esp+94h+var_74]
mov	esi, [esp+94h+var_64]
mov	edx, [ecx]
and	eax, 0FFFFFFFCh
add	eax, 8
push	esi
push	eax
mov	eax, [edx+8]
call	eax
mov	ebx, eax
mov	[esp+94h+var_84], ebx
test	ebx, ebx
jnz	loc_6FF029
mov	ecx, [edi+18h]
mov	esi, [ebp+10h]
lea	edx, [esp+94h+var_3C]
push	edx
mov	[esp+98h+var_3C], al
add	ebp, 10h
push	offset aOnload	; "onLoad"
lea	eax, [esp+9Ch+var_84]
push	eax
lea	ebx, [ecx+78h]
add	esi, 2Ch
call	sub_651CB0
mov	edx, [esi]
push	eax
push	ebx
mov	ecx, ebp
call	edx
mov	bl, al
mov	eax, [esp+9Ch+var_8C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6FEF38
call	sub_650DF0

loc_6FEF38:
test	bl, bl
jz	loc_6FF01B
mov	eax, [edi+18h]
push	eax
lea	ecx, [esp+0A0h+var_88]
push	ecx
lea	ecx, [esp+0A4h+var_44]
call	sub_652DC0
mov	esi, [edi+18h]
add	esi, 8
mov	[esp+9Ch+var_54], 0
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6FEF6E
mov	ecx, esi
call	sub_64B530

loc_6FEF6E:
mov	esi, [esi]
test	esi, esi
jz	short loc_6FEF7B
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0

loc_6FEF7B:
mov	eax, [edi+18h]
mov	edx, [eax+8]
sub	edx, [eax+0Ch]
mov	ecx, [eax+1Ch]
sar	edx, 4
shl	ecx, 5
lea	ecx, [edx+ecx-20h]
push	ecx
push	1
push	eax
push	ebp
lea	edx, [esp+0ACh+var_54]
push	edx
lea	ecx, [esp+0B0h+var_24]
call	sub_64B7F0
mov	esi, [esp+9Ch+var_84]
mov	ecx, [esp+9Ch+var_88]
mov	edx, [ecx]
push	0
push	esi
push	eax
mov	eax, [edx+28h]
call	eax
lea	ecx, [esp+9Ch+var_24]
call	sub_64B830
mov	esi, [edi+18h]
mov	ecx, [esi+8]
add	esi, 8
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6FEFE2
mov	ecx, esi
call	sub_64B660

loc_6FEFE2:
lea	ecx, [esp+9Ch+var_54]
call	sub_652830
test	byte ptr [esp+9Ch+var_80], 2
jnz	short loc_6FEFFF
mov	ecx, [esp+9Ch+var_88]
test	ecx, ecx
jz	short loc_6FEFFF
call	sub_64B3B0

loc_6FEFFF:
test	byte ptr [esp+9Ch+var_80], 1
mov	[esp+9Ch+var_88], 0
jnz	short loc_6FF01B
mov	ecx, [esp+9Ch+var_84]
test	ecx, ecx
jz	short loc_6FF01B
call	sub_64B3B0

loc_6FF01B:
lea	ecx, [esp+9Ch+var_44]
call	sub_652830
jmp	loc_6FF253

loc_6FF029:
mov	ecx, [ebp+38h]
test	ecx, ecx
jz	short loc_6FF035
call	sub_666B00

loc_6FF035:
lea	eax, [ebx+4]
push	1		; Value
push	eax		; Addend
mov	dword ptr [ebp+38h], 0
call	ds:InterlockedExchangeAdd
mov	esi, [ebp+34h]
test	esi, esi
jz	short loc_6FF06E
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6FF06E
test	esi, esi
jz	short loc_6FF06E
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_6FF06E:
cmp	byte ptr [esp+94h+var_64], 0
mov	[ebp+34h], ebx
jz	short loc_6FF0DF
mov	ecx, [esp+94h+var_74]
mov	edx, [ecx]
mov	eax, ebx
push	1
push	eax
mov	eax, [edx+14h]
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_6FF0DF
mov	ebx, [esi]
mov	ecx, [esp+94h+var_60]
add	ebx, 28h
call	sub_67DC90
mov	edx, [ebx]
push	ecx
mov	ecx, esi
fstp	[esp+98h+var_98]
call	edx
mov	ebx, [esi]
mov	ecx, [esp+94h+var_60]
add	ebx, 30h
call	sub_67DD40
mov	eax, [ebx]
push	ecx
mov	ecx, esi
fstp	[esp+98h+var_98]
call	eax
mov	edx, [esi]
mov	eax, [edx+10h]
push	0
mov	ecx, esi
call	eax
mov	ecx, [ebp+38h]
push	ecx
mov	ecx, [esp+98h+var_60]
push	ebp
push	esi
call	sub_687C90
mov	ecx, esi
call	sub_64A430

loc_6FF0DF:
mov	ecx, [edi+18h]
lea	edx, [esp+94h+var_2C]
push	edx
mov	[esp+98h+var_2C], 0
mov	esi, [ebp+10h]
add	ebp, 10h
push	offset aOnload	; "onLoad"
lea	eax, [esp+9Ch+var_74]
push	eax
lea	ebx, [ecx+78h]
add	esi, 2Ch
call	sub_651CB0
mov	edx, [esi]
push	eax
push	ebx
mov	ecx, ebp
call	edx
mov	bl, al
mov	eax, [esp+9Ch+var_7C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6FF127
call	sub_650DF0

loc_6FF127:
test	bl, bl
jz	loc_6FF20A
mov	eax, [edi+18h]
push	eax
lea	ecx, [esp+0A0h+var_88]
push	ecx
lea	ecx, [esp+0A4h+var_34]
call	sub_652DC0
mov	esi, [edi+18h]
add	esi, 8
mov	[esp+9Ch+var_54], 0
add	dword ptr [esi], 10h
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_6FF15D
mov	ecx, esi
call	sub_64B530

loc_6FF15D:
mov	esi, [esi]
test	esi, esi
jz	short loc_6FF16A
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1

loc_6FF16A:
mov	eax, [edi+18h]
mov	edx, [eax+8]
sub	edx, [eax+0Ch]
mov	ecx, [eax+1Ch]
sar	edx, 4
shl	ecx, 5
lea	ecx, [edx+ecx-20h]
push	ecx
push	1
push	eax
push	ebp
lea	edx, [esp+0ACh+var_54]
push	edx
lea	ecx, [esp+0B0h+var_24]
call	sub_64B7F0
mov	esi, [esp+9Ch+var_84]
mov	ecx, [esp+9Ch+var_88]
mov	edx, [ecx]
push	0
push	esi
push	eax
mov	eax, [edx+28h]
call	eax
lea	ecx, [esp+9Ch+var_24]
call	sub_64B830
mov	esi, [edi+18h]
mov	ecx, [esi+8]
add	esi, 8
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_6FF1D1
mov	ecx, esi
call	sub_64B660

loc_6FF1D1:
lea	ecx, [esp+9Ch+var_54]
call	sub_652830
test	byte ptr [esp+9Ch+var_80], 2
jnz	short loc_6FF1EE
mov	ecx, [esp+9Ch+var_88]
test	ecx, ecx
jz	short loc_6FF1EE
call	sub_64B3B0

loc_6FF1EE:
test	byte ptr [esp+9Ch+var_80], 1
mov	[esp+9Ch+var_88], 0
jnz	short loc_6FF20A
mov	ecx, [esp+9Ch+var_84]
test	ecx, ecx
jz	short loc_6FF20A
call	sub_64B3B0

loc_6FF20A:
mov	edi, [edi+18h]
mov	ecx, [edi+8]
add	edi, 8
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_6FF229
mov	ecx, edi
call	sub_64B660

loc_6FF229:
lea	ecx, [esp+9Ch+var_34]
call	sub_652830
mov	eax, [esp+9Ch+var_8C]
push	0FFFFFFFFh	; Value
add	eax, 4
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_6FF253
mov	ecx, [esp+9Ch+var_8C]
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_6FF253:
lea	ecx, [esp+9Ch+var_70]
call	sub_4E40F0
lea	ecx, [esp+9Ch+var_60]
call	sub_68E410
lea	ecx, [esp+9Ch+var_74]
call	sub_4E40F0
mov	ecx, [esp+9Ch+var_78]
test	ecx, ecx
jz	short loc_6FF27B
call	sub_64A430

loc_6FF27B:
mov	eax, [esp+9Ch+var_64]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_6FF291
call	sub_650DF0

loc_6FF291:
pop	ebp

loc_6FF292:
pop	ebx

loc_6FF293:
pop	edi
pop	esi
add	esp, 8Ch
retn
sub_6FED20 endp

align 10h



sub_6FF2A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_4]
movzx	eax, byte ptr [esi]
movzx	ecx, byte ptr [esi+1]
movzx	edx, byte ptr [esi+2]
movzx	esi, byte ptr [esi+3]
push	edi
mov	ebp, 100h
sub	ebp, [esp+10h+arg_18]
mov	ebx, 100h
sub	ebx, [esp+10h+arg_14]
mov	edi, ebp
imul	ebp, [esp+10h+arg_14]
imul	edi, ebx
imul	ebx, [esp+10h+arg_18]
imul	eax, edi
imul	ecx, edi
imul	edx, edi
imul	esi, edi
mov	edi, [esp+10h+arg_8]
movzx	edi, byte ptr [edi]
imul	edi, ebp
add	eax, 8000h
add	eax, edi
mov	edi, [esp+10h+arg_8]
movzx	edi, byte ptr [edi+1]
imul	edi, ebp
add	ecx, 8000h
add	ecx, edi
mov	edi, [esp+10h+arg_8]
movzx	edi, byte ptr [edi+2]
imul	edi, ebp
add	edx, 8000h
add	edx, edi
mov	edi, [esp+10h+arg_8]
movzx	edi, byte ptr [edi+3]
imul	edi, ebp
add	esi, 8000h
add	esi, edi
mov	edi, [esp+10h+arg_C]
movzx	ebp, byte ptr [edi]
imul	ebp, ebx
add	eax, ebp
movzx	ebp, byte ptr [edi+1]
imul	ebp, ebx
add	ecx, ebp
movzx	ebp, byte ptr [edi+2]
movzx	edi, byte ptr [edi+3]
imul	ebp, ebx
imul	edi, ebx
mov	ebx, [esp+10h+arg_10]
add	esi, edi
mov	edi, [esp+10h+arg_14]
imul	edi, [esp+10h+arg_18]
add	edx, ebp
movzx	ebp, byte ptr [ebx]
imul	ebp, edi
add	eax, ebp
movzx	ebp, byte ptr [ebx+1]
imul	ebp, edi
add	ecx, ebp
movzx	ebp, byte ptr [ebx+2]
movzx	ebx, byte ptr [ebx+3]
imul	ebp, edi
imul	ebx, edi
mov	edi, [esp+10h+arg_0]
sar	eax, 10h
add	esi, ebx
mov	[edi], al
add	edx, ebp
mov	eax, esi
sar	ecx, 10h
sar	edx, 10h
sar	eax, 10h
mov	[edi+1], cl
mov	[edi+2], dl
mov	[edi+3], al
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_6FF2A0 endp

align 10h



sub_6FF3B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	ebx
mov	edx, [esp+4+arg_4]
movzx	eax, byte ptr [edx]
movzx	ecx, byte ptr [edx+1]
movzx	edx, byte ptr [edx+2]
push	ebp
mov	ebp, [esp+8+arg_14]
push	esi
push	edi
mov	edi, 100h
sub	edi, [esp+10h+arg_18]
mov	esi, 100h
mov	ebx, edi
imul	edi, ebp
sub	esi, ebp
imul	ebp, [esp+10h+arg_18]
imul	ebx, esi
imul	esi, [esp+10h+arg_18]
imul	eax, ebx
imul	ecx, ebx
imul	edx, ebx
mov	ebx, [esp+10h+arg_8]
movzx	ebx, byte ptr [ebx]
imul	ebx, edi
add	eax, 8000h
add	eax, ebx
mov	ebx, [esp+10h+arg_8]
movzx	ebx, byte ptr [ebx+1]
imul	ebx, edi
add	ecx, 8000h
add	ecx, ebx
mov	ebx, [esp+10h+arg_8]
movzx	ebx, byte ptr [ebx+2]
imul	ebx, edi
mov	edi, [esp+10h+arg_C]
add	edx, 8000h
add	edx, ebx
movzx	ebx, byte ptr [edi]
imul	ebx, esi
add	eax, ebx
movzx	ebx, byte ptr [edi+1]
movzx	edi, byte ptr [edi+2]
imul	ebx, esi
imul	edi, esi
mov	esi, [esp+10h+arg_10]
add	edx, edi
movzx	edi, byte ptr [esi]
imul	edi, ebp
add	eax, edi
movzx	edi, byte ptr [esi+1]
movzx	esi, byte ptr [esi+2]
imul	edi, ebp
imul	esi, ebp
add	ecx, ebx
add	edx, esi
mov	esi, [esp+10h+arg_0]
add	ecx, edi
pop	edi
sar	eax, 10h
sar	ecx, 10h
sar	edx, 10h
mov	[esi], al
mov	[esi+1], cl
mov	[esi+2], dl
pop	esi
pop	ebp
pop	ebx
retn
sub_6FF3B0 endp

align 10h



sub_6FF480 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	ebx
mov	edx, [esp+4+arg_4]
movzx	eax, byte ptr [edx]
movzx	ecx, byte ptr [edx+1]
movzx	edx, byte ptr [edx+2]
push	ebp
mov	ebp, [esp+8+arg_14]
push	esi
push	edi
mov	edi, 100h
sub	edi, [esp+10h+arg_18]
mov	esi, 100h
mov	ebx, edi
imul	edi, ebp
sub	esi, ebp
imul	ebp, [esp+10h+arg_18]
imul	ebx, esi
imul	esi, [esp+10h+arg_18]
imul	eax, ebx
imul	ecx, ebx
imul	edx, ebx
mov	ebx, [esp+10h+arg_8]
movzx	ebx, byte ptr [ebx]
imul	ebx, edi
add	eax, 8000h
add	eax, ebx
mov	ebx, [esp+10h+arg_8]
movzx	ebx, byte ptr [ebx+1]
imul	ebx, edi
add	ecx, 8000h
add	ecx, ebx
mov	ebx, [esp+10h+arg_8]
movzx	ebx, byte ptr [ebx+2]
imul	ebx, edi
mov	edi, [esp+10h+arg_C]
add	edx, 8000h
add	edx, ebx
movzx	ebx, byte ptr [edi]
imul	ebx, esi
add	eax, ebx
movzx	ebx, byte ptr [edi+1]
movzx	edi, byte ptr [edi+2]
imul	ebx, esi
imul	edi, esi
mov	esi, [esp+10h+arg_10]
add	edx, edi
movzx	edi, byte ptr [esi]
imul	edi, ebp
add	eax, edi
movzx	edi, byte ptr [esi+1]
movzx	esi, byte ptr [esi+2]
imul	edi, ebp
imul	esi, ebp
add	ecx, ebx
add	edx, esi
mov	esi, [esp+10h+arg_0]
add	ecx, edi
pop	edi
sar	eax, 10h
sar	ecx, 10h
sar	edx, 10h
mov	[esi], al
mov	[esi+1], cl
mov	[esi+2], dl
mov	byte ptr [esi+3], 0FFh
pop	esi
pop	ebp
pop	ebx
retn
sub_6FF480 endp

align 10h



sub_6FF560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	edx, [esp+arg_14]
push	ebx
mov	ebx, [esp+4+arg_C]
movzx	ebx, byte ptr [ebx]
push	esi
mov	esi, [esp+8+arg_18]
push	edi
mov	edi, [esp+0Ch+arg_8]
movzx	edi, byte ptr [edi]
mov	eax, 100h
sub	eax, edx
imul	ebx, eax
mov	ecx, 100h
imul	ebx, esi
sub	ecx, esi
imul	edi, ecx
imul	edi, edx
add	edi, ebx
mov	ebx, [esp+0Ch+arg_4]
movzx	ebx, byte ptr [ebx]
imul	ebx, ecx
imul	ebx, eax
mov	eax, [esp+0Ch+arg_10]
movzx	ecx, byte ptr [eax]
mov	eax, [esp+0Ch+arg_0]
imul	ecx, edx
imul	ecx, esi
add	edi, ebx
lea	edx, [edi+ecx+8000h]
pop	edi
sar	edx, 10h
pop	esi
mov	[eax], dl
pop	ebx
retn
sub_6FF560 endp

align 10h



sub_6FF5D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_6FF62C
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_6FF628
mov	ecx, dword_1855FC0
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
mov	[esp+8+arg_0], 2
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+28h]
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_6FF628:
xor	eax, eax
mov	[esi], eax

loc_6FF62C:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_6FF5D0 endp

align 10h



sub_6FF640 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h
arg_28=	dword ptr  2Ch

sub	esp, 34h
push	ebx
push	ebp
mov	ebp, [esp+3Ch+arg_18]
push	esi
push	edi
mov	edi, [esp+44h+arg_4]
xor	ebx, ebx
push	ebx
push	edi
lea	ecx, [esp+4Ch+var_20]
mov	[esp+4Ch+var_20], ebx
mov	[esp+4Ch+var_1C], ebx
mov	[esp+4Ch+var_18], ebx
call	sub_6FF5D0
mov	eax, ebp
shl	eax, 7
cdq
idiv	edi
mov	esi, eax
mov	eax, ebp
shl	eax, 8
cdq
idiv	edi
mov	ecx, edx
cmp	ecx, ebx
jg	short loc_6FF686
lea	edx, [ecx+edi]
mov	ecx, edx
dec	eax

loc_6FF686:
sub	edx, edi
xor	ebx, ebx
test	edi, edi
jle	short loc_6FF6AD
add	esi, 0FFFFFF80h

loc_6FF691:
mov	ebp, [esp+44h+var_20]
mov	[ebp+ebx*4+0], esi
add	edx, ecx
add	esi, eax
test	edx, edx
jle	short loc_6FF6A4
sub	edx, edi
inc	esi

loc_6FF6A4:
inc	ebx
cmp	ebx, edi
jl	short loc_6FF691
mov	ebp, [esp+44h+arg_18]

loc_6FF6AD:
mov	edi, [esp+44h+arg_1C]
mov	esi, [esp+44h+arg_8]
mov	eax, edi
shl	eax, 7
cdq
idiv	esi
mov	ecx, eax
mov	eax, edi
shl	eax, 8
cdq
idiv	esi
mov	[esp+44h+var_10], eax
mov	eax, edx
mov	[esp+44h+var_C], eax
mov	[esp+44h+var_8], eax
test	eax, eax
jg	short loc_6FF6E7
add	eax, esi
dec	[esp+44h+var_10]
mov	[esp+44h+var_8], eax
mov	[esp+44h+var_C], eax

loc_6FF6E7:
sub	[esp+44h+var_8], esi
mov	edx, [esp+44h+arg_0]
mov	[esp+44h+var_34], edx
test	esi, esi
jle	loc_6FF870
lea	eax, [ebp-1]
mov	[esp+44h+var_2C], eax
imul	eax, [esp+44h+arg_24]
add	ecx, 0FFFFFF80h
mov	[esp+44h+var_24], eax
mov	[esp+44h+arg_0], ecx
mov	[esp+44h+var_30], esi
jmp	short loc_6FF720
align 10h

loc_6FF720:
mov	ebx, ecx
sar	ebx, 8
and	ecx, 0FFh
mov	[esp+44h+arg_18], ecx
test	ebx, ebx
jge	short loc_6FF739
mov	edi, [esp+44h+arg_14]
jmp	short loc_6FF744

loc_6FF739:
mov	edi, ebx
imul	edi, [esp+44h+arg_20]
add	edi, [esp+44h+arg_14]

loc_6FF744:
mov	eax, [esp+44h+arg_1C]
inc	ebx
cmp	ebx, eax
jl	short loc_6FF750
lea	ebx, [eax-1]

loc_6FF750:
imul	ebx, [esp+44h+arg_20]
add	ebx, [esp+44h+arg_14]
xor	esi, esi
cmp	[esp+44h+arg_4], esi
mov	ebp, edx
jle	short loc_6FF796

loc_6FF763:
mov	eax, [esp+44h+var_20]
mov	eax, [eax+esi*4]
test	eax, 0FFFFFF00h
jge	short loc_6FF796
mov	ecx, [esp+44h+arg_18]
push	ecx
and	eax, 0FFh
push	eax
push	ebx
push	ebx
push	edi
push	edi
push	ebp
call	[esp+60h+arg_28]
add	ebp, [esp+60h+arg_10]
inc	esi
add	esp, 1Ch
cmp	esi, [esp+44h+arg_4]
jl	short loc_6FF763

loc_6FF796:
cmp	esi, [esp+44h+arg_4]
jge	short loc_6FF7F5
lea	esp, [esp+0]

loc_6FF7A0:
mov	edx, [esp+44h+var_20]
mov	ecx, [edx+esi*4]
mov	[esp+44h+var_28], ecx
sar	ecx, 8
cmp	ecx, [esp+44h+var_2C]
jge	short loc_6FF7F5
mov	edx, [esp+44h+arg_24]
mov	eax, ecx
imul	eax, edx
inc	ecx
imul	ecx, edx
mov	edx, [esp+44h+arg_18]
push	edx
mov	edx, [esp+48h+var_28]
and	edx, 0FFh
push	edx
lea	edx, [ecx+ebx]
push	edx
lea	edx, [eax+ebx]
push	edx
add	ecx, edi
push	ecx
add	eax, edi
push	eax
push	ebp
call	[esp+60h+arg_28]
add	ebp, [esp+60h+arg_10]
inc	esi
add	esp, 1Ch
cmp	esi, [esp+44h+arg_4]
jl	short loc_6FF7A0

loc_6FF7F5:
mov	eax, [esp+44h+var_24]
add	edi, eax
add	ebx, eax
cmp	esi, [esp+44h+arg_4]
jge	short loc_6FF830

loc_6FF803:
mov	ecx, [esp+44h+var_20]
mov	eax, [esp+44h+arg_18]
mov	edx, [ecx+esi*4]
push	eax
and	edx, 0FFh
push	edx
push	ebx
push	ebx
push	edi
push	edi
push	ebp
call	[esp+60h+arg_28]
add	ebp, [esp+60h+arg_10]
inc	esi
add	esp, 1Ch
cmp	esi, [esp+44h+arg_4]
jl	short loc_6FF803

loc_6FF830:
mov	eax, [esp+44h+var_8]
mov	ecx, [esp+44h+arg_0]
add	eax, [esp+44h+var_C]
add	ecx, [esp+44h+var_10]
mov	[esp+44h+var_8], eax
mov	[esp+44h+arg_0], ecx
test	eax, eax
jle	short loc_6FF859
sub	eax, [esp+44h+arg_8]
inc	ecx
mov	[esp+44h+var_8], eax
mov	[esp+44h+arg_0], ecx

loc_6FF859:
mov	edx, [esp+44h+var_34]
add	edx, [esp+44h+arg_C]
sub	[esp+44h+var_30], 1
mov	[esp+44h+var_34], edx
jnz	loc_6FF720

loc_6FF870:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+44h+var_20]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn
sub_6FF640 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_68CF50

loc_6FF890:
push	esi
mov	esi, [esp+4+arg_4]
push	edi
test	esi, esi
jle	loc_6FF93C	; default
mov	edx, [esp+8+arg_8]
test	edx, edx
jle	loc_6FF93C	; default
mov	ecx, [esp+8+arg_14]
test	ecx, ecx
jle	loc_6FF93C	; default
mov	eax, [esp+8+arg_18]
test	eax, eax
jle	short loc_6FF93C ; default
mov	edi, [esp+8+arg_20]
cmp	edi, 3		; switch 4 cases
ja	short loc_6FF93C ; default
jmp	ds:off_6FF944[edi*4] ; switch jump

loc_6FF8CE:		; jumptable 006FF8C7 case 0
mov	edi, [esp+8+arg_1C]
push	offset sub_6FF3B0
push	3
push	edi
push	eax
mov	eax, [esp+18h+arg_10]
push	ecx
push	eax
push	3
jmp	short loc_6FF928

loc_6FF8E5:		; jumptable 006FF8C7 case 1
mov	edi, [esp+8+arg_1C]
push	offset sub_6FF2A0
push	4
push	edi
push	eax
mov	eax, [esp+18h+arg_10]
push	ecx
push	eax
push	4
jmp	short loc_6FF928

loc_6FF8FC:		; jumptable 006FF8C7 case 2
mov	edi, [esp+8+arg_1C]
push	offset sub_6FF480
push	3
push	edi
push	eax
mov	eax, [esp+18h+arg_10]
push	ecx
push	eax
push	4
jmp	short loc_6FF928

loc_6FF913:		; jumptable 006FF8C7 case 3
mov	edi, [esp+8+arg_1C]
push	offset sub_6FF560
push	1
push	edi
push	eax
mov	eax, [esp+18h+arg_10]
push	ecx
push	eax
push	1

loc_6FF928:
mov	ecx, [esp+24h+arg_C]
push	ecx
push	edx
mov	edx, [esp+2Ch+arg_0]
push	esi
push	edx
call	sub_6FF640
add	esp, 2Ch

loc_6FF93C:		; default
pop	edi
pop	esi
retn	24h
; END OF FUNCTION CHUNK	FOR sub_68CF50
align 4
off_6FF944 dd offset loc_6FF8CE	; jump table for switch	statement
dd offset loc_6FF8E5
dd offset loc_6FF8FC
dd offset loc_6FF913
align 10h



sub_6FF960 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax]
mov	ecx, [ecx]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
retn	4
sub_6FF960 endp

align 10h



sub_6FF980 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+38h]
push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	edx, [esi+38h]
and	edx, 0FFFFFFFCh
and	eax, 0FFFFFFFCh
add	edx, 8
add	eax, 8

loc_6FF998:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6FF9B8
test	bl, bl
jz	short loc_6FF9B4
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6FF9B8
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6FF998

loc_6FF9B4:
xor	eax, eax
jmp	short loc_6FF9BD

loc_6FF9B8:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6FF9BD:
test	eax, eax
jnz	short loc_6FFA26
mov	edx, [esi+3Ch]
mov	eax, [ecx+3Ch]
and	edx, 0FFFFFFFCh
and	eax, 0FFFFFFFCh
add	edx, 8
add	eax, 8

loc_6FF9D3:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_6FF9F3
test	bl, bl
jz	short loc_6FF9EF
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_6FF9F3
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_6FF9D3

loc_6FF9EF:
xor	eax, eax
jmp	short loc_6FF9F8

loc_6FF9F3:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_6FF9F8:
test	eax, eax
jnz	short loc_6FFA26
mov	eax, [ecx+40h]
cmp	eax, [esi+40h]
jnz	short loc_6FFA26
mov	edx, [ecx+44h]
cmp	edx, [esi+44h]
jnz	short loc_6FFA26
mov	eax, [ecx+48h]
cmp	eax, [esi+48h]
jnz	short loc_6FFA26
mov	cl, [ecx+4Ch]
cmp	cl, [esi+4Ch]
jnz	short loc_6FFA26
pop	esi
mov	eax, 1
pop	ebx
retn	4

loc_6FFA26:
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_6FF980 endp

align 10h



sub_6FFA30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	ebx, ecx
cmp	edi, 0FFFFFFFFh
jnz	short loc_6FFA53
mov	eax, ebp
lea	edx, [eax+1]

loc_6FFA48:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_6FFA48
sub	eax, edx
mov	edi, eax

loc_6FFA53:
lea	esi, [ebx+10h]
mov	ecx, esi
call	sub_67A720
push	edi
push	ebp
mov	ecx, esi
call	sub_67A0C0
pop	edi
pop	esi
mov	eax, 100h
or	[ebx+2Ah], ax
pop	ebp
pop	ebx
retn	8
sub_6FFA30 endp

align 10h



sub_6FFA80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	esi, ecx
cmp	ebx, 0FFFFFFFFh
jnz	short loc_6FFA9E
push	ebp
call	sub_67B340
add	esp, 4
mov	ebx, eax

loc_6FFA9E:
lea	edi, [esi+10h]
mov	ecx, edi
call	sub_67A720
push	ebx
push	ebp
mov	ecx, edi
call	sub_67A000
pop	edi
mov	eax, 100h
or	[esi+2Ah], ax
pop	esi
pop	ebp
pop	ebx
retn	8
sub_6FFA80 endp

align 10h



sub_6FFAD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
push	eax
lea	ecx, [esi+10h]
call	sub_67A3D0
mov	ecx, 100h
or	[esi+2Ah], cx
pop	esi
retn	4
sub_6FFAD0 endp

align 10h



sub_6FFAF0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6FFB03
or	byte ptr [ecx+28h], 4
or	word ptr [ecx+2Ah], 40h
retn	4

loc_6FFB03:
and	byte ptr [ecx+28h], 0FBh
or	word ptr [ecx+2Ah], 40h
retn	4
sub_6FFAF0 endp

align 10h



sub_6FFB10 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_6FFB27
or	byte ptr [ecx+28h], 8
mov	eax, 80h
or	[ecx+2Ah], ax
retn	4

loc_6FFB27:
and	byte ptr [ecx+28h], 0F7h
mov	eax, 80h
or	[ecx+2Ah], ax
retn	4
sub_6FFB10 endp

align 10h



sub_6FFB40 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
test	eax, eax
jz	short loc_6FFB5C
mov	edx, [esp+arg_0]
test	edx, edx
jz	short loc_6FFB53
mov	eax, [eax]
mov	[edx], eax

loc_6FFB53:
mov	eax, [ecx+8]
add	eax, 4
retn	4

loc_6FFB5C:
xor	eax, eax
retn	4
sub_6FFB40 endp

align 10h



sub_6FFB70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+8]
test	eax, eax
jz	short locret_6FFB87
mov	ecx, [esp+arg_0]
cmp	ecx, [eax]
jnb	short locret_6FFB87
mov	edx, [esp+arg_4]
mov	[eax+ecx*4+4], edx

locret_6FFB87:
retn	8
sub_6FFB70 endp

align 10h



sub_6FFB90 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+8]
mov	eax, [eax+30h]
push	edx
call	eax
mov	dword ptr [esi+8], 0
pop	esi
retn
sub_6FFB90 endp

align 10h



sub_6FFBB0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
mov	edx, [esp+arg_0]
cmp	eax, edx
jnz	short loc_6FFBC0
mov	al, 1
retn	4

loc_6FFBC0:
test	eax, eax
jz	loc_6FFC67
test	edx, edx
jz	loc_6FFC67
mov	ecx, [eax]
cmp	ecx, [edx]
jnz	loc_6FFC67
add	ecx, ecx
push	esi
add	ecx, ecx
add	edx, 4
push	edi
lea	esi, [eax+4]
cmp	ecx, 4
jb	short loc_6FFC04
jmp	short loc_6FFBF0
align 10h

loc_6FFBF0:
mov	eax, [esi]
cmp	eax, [edx]
jnz	short loc_6FFC08
sub	ecx, 4
add	edx, 4
add	esi, 4
cmp	ecx, 4
jnb	short loc_6FFBF0

loc_6FFC04:
test	ecx, ecx
jz	short loc_6FFC57

loc_6FFC08:
movzx	eax, byte ptr [esi]
movzx	edi, byte ptr [edx]
sub	eax, edi
jnz	short loc_6FFC43
cmp	ecx, 1
jbe	short loc_6FFC57
movzx	eax, byte ptr [esi+1]
movzx	edi, byte ptr [edx+1]
sub	eax, edi
jnz	short loc_6FFC43
cmp	ecx, 2
jbe	short loc_6FFC57
movzx	eax, byte ptr [esi+2]
movzx	edi, byte ptr [edx+2]
sub	eax, edi
jnz	short loc_6FFC43
cmp	ecx, 3
jbe	short loc_6FFC57
movzx	eax, byte ptr [esi+3]
movzx	ecx, byte ptr [edx+3]
sub	eax, ecx

loc_6FFC43:
sar	eax, 1Fh
or	eax, 1
xor	edx, edx
test	eax, eax
setz	dl
pop	edi
mov	al, dl
pop	esi
retn	4

loc_6FFC57:
xor	eax, eax
xor	edx, edx
test	eax, eax
setz	dl
pop	edi
mov	al, dl
pop	esi
retn	4

loc_6FFC67:
xor	al, al
retn	4
sub_6FFBB0 endp

align 10h



sub_6FFC70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_0]
cmp	eax, [edi+4]
jnz	short loc_6FFCDF
mov	ecx, [esi+1Ch]
cmp	ecx, [edi+1Ch]
jnz	short loc_6FFCDF
mov	edx, [esi+8]
cmp	edx, [edi+8]
jnz	short loc_6FFCDF
lea	eax, [edi+0Ch]
push	eax
lea	ecx, [esi+0Ch]
call	sub_4E4120
test	al, al
jz	short loc_6FFCDF
fld	dword ptr [esi+10h]
fld	dword ptr [edi+10h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6FFCDF
mov	ecx, [esi+20h]
cmp	ecx, [edi+20h]
jnz	short loc_6FFCDF
fld	dword ptr [esi+14h]
fld	dword ptr [edi+14h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6FFCDF
fld	dword ptr [esi+18h]
fld	dword ptr [edi+18h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_6FFCDF
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_6FFCDF:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6FFC70 endp

align 10h



sub_6FFCF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_6FFCFF
inc	dword ptr [edi+4]

loc_6FFCFF:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_6FFD0B
call	sub_64A400

loc_6FFD0B:
mov	[esi+18h], edi
mov	eax, 200h
or	[esi+2Ah], ax
pop	edi
pop	esi
retn	4
sub_6FFCF0 endp

align 10h



sub_6FFD20 proc	near

var_4= dword ptr -4

push	ecx
xor	edx, edx
mov	[esp+4+var_4], edx
mov	ax, [ecx+2Ah]
shr	ax, 9
test	al, 1
jz	short loc_6FFD3A
lea	eax, [ecx+18h]
mov	ecx, [esp+4+var_4]
jmp	short loc_6FFD47

loc_6FFD3A:
xor	ecx, ecx
mov	edx, 1
mov	[esp+4+var_4], ecx
lea	eax, [esp+4+var_4]

loc_6FFD47:
push	esi
mov	esi, [eax]
test	dl, 1
jz	short loc_6FFD58
test	ecx, ecx
jz	short loc_6FFD58
call	sub_64A400

loc_6FFD58:
mov	eax, esi
pop	esi
pop	ecx
retn
sub_6FFD20 endp

align 10h



sub_6FFD60 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
movzx	eax, word ptr [edi+2Ah]
mov	esi, ecx
movzx	ecx, word ptr [esi+2Ah]
cmp	cx, ax
jnz	loc_6FFE6B
mov	dl, [esi+28h]
cmp	dl, [edi+28h]
jnz	loc_6FFE6B
mov	edx, [esi+20h]
cmp	edx, [edi+20h]
jnz	loc_6FFE6B
mov	dx, [esi+26h]
cmp	dx, [edi+26h]
jnz	loc_6FFE6B
shr	cl, 2
shr	al, 2
and	cl, 1
and	al, 1
cmp	cl, al
jnz	loc_6FFE6B
test	cl, cl
jz	short loc_6FFDCA
lea	eax, [edi+8]
push	eax
lea	ecx, [esi+8]
call	sub_6FF960
test	eax, eax
jnz	loc_6FFE6B

loc_6FFDCA:
mov	cx, [esi+24h]
cmp	cx, [edi+24h]
jnz	loc_6FFE6B
mov	ax, [esi+2Ah]
mov	dx, [edi+2Ah]
shr	ax, 0Bh
shr	dx, 0Bh
and	al, 1
and	dl, 1
cmp	al, dl
jnz	short loc_6FFE6B
test	al, al
jz	short loc_6FFE11
mov	ecx, [esi+1Ch]
mov	eax, [edi+1Ch]
cmp	ecx, eax
jz	short loc_6FFE11
test	ecx, ecx
jz	short loc_6FFE6B
test	eax, eax
jz	short loc_6FFE6B
push	eax
call	sub_6FFC70
test	al, al
jz	short loc_6FFE6B

loc_6FFE11:
push	ebx
mov	ecx, edi
call	sub_6CD120
mov	ecx, esi
mov	bl, al
call	sub_6CD120
cmp	al, bl
pop	ebx
jnz	short loc_6FFE6B
mov	ecx, esi
call	sub_6CD120
test	al, al
jz	short loc_6FFE42
lea	eax, [edi+10h]
push	eax
lea	ecx, [esi+10h]
call	sub_6FF960
test	eax, eax
jnz	short loc_6FFE6B

loc_6FFE42:
mov	esi, [esi+18h]
test	esi, esi
jz	short loc_6FFE5C
mov	eax, [edi+18h]
test	eax, eax
jz	short loc_6FFE5C
push	eax
mov	ecx, esi
call	sub_6FF980
test	al, al
jnz	short loc_6FFE61

loc_6FFE5C:
cmp	esi, [edi+18h]
jnz	short loc_6FFE6B

loc_6FFE61:
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_6FFE6B:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6FFD60 endp

align 10h



sub_6FFE80 proc	near

arg_0= dword ptr  4

mov	dx, [ecx+16h]
mov	eax, [esp+arg_0]
cmp	dx, [eax+16h]
jnz	short loc_6FFED5
mov	dx, [ecx+0Ch]
cmp	dx, [eax+0Ch]
jnz	short loc_6FFED5
mov	dx, [ecx+0Eh]
cmp	dx, [eax+0Eh]
jnz	short loc_6FFED5
mov	dx, [ecx+10h]
cmp	dx, [eax+10h]
jnz	short loc_6FFED5
mov	dx, [ecx+12h]
cmp	dx, [eax+12h]
jnz	short loc_6FFED5
mov	dx, [ecx+14h]
cmp	dx, [eax+14h]
jnz	short loc_6FFED5
mov	eax, [eax+8]
push	eax
call	sub_6FFBB0
test	al, al
jz	short loc_6FFED5
mov	eax, 1
retn	4

loc_6FFED5:
xor	eax, eax
retn	4
sub_6FFE80 endp

align 10h



sub_6FFEE0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+40h]
mov	ecx, [edi+44h]
mov	edx, [edi+48h]
mov	[esp+1Ch+var_10], eax
movzx	eax, byte ptr [edi+4Ch]
mov	[esp+1Ch+var_4], eax
mov	[esp+1Ch+var_C], ecx
mov	[esp+1Ch+var_8], edx
mov	eax, 10h
mov	ebx, 1505h
nop

loc_6FFF10:
movzx	ecx, [esp+eax+1Ch+var_11]
imul	ebx, 1003Fh
dec	eax
add	ebx, ecx
test	eax, eax
ja	short loc_6FFF10
mov	eax, [edi+38h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	ecx, [edx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	esi, eax
mov	eax, [edi+3Ch]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
xor	esi, ebx
call	sub_679B00
pop	edi
xor	eax, esi
pop	esi
pop	ebx
add	esp, 10h
retn
sub_6FFEE0 endp

align 10h



sub_6FFF80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+2Ah]
shr	al, 2
push	edi
mov	edi, [esp+8+arg_0]
test	al, 1
jz	short loc_6FFFBA
mov	cl, [edi+2Ah]
shr	cl, 2
test	cl, 1
jz	short loc_6FFFBA
mov	eax, [edi+8]
mov	ecx, [esi+8]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
test	eax, eax
jz	short loc_6FFFDB

loc_6FFFBA:
mov	dx, [esi+2Ah]
shr	dx, 0Bh
test	dl, 1
jz	short loc_6FFFFA
mov	ax, [edi+2Ah]
shr	ax, 0Bh
test	al, 1
jz	short loc_6FFFFA
mov	ecx, [esi+1Ch]
cmp	ecx, [edi+1Ch]
jnz	short loc_6FFFFA

loc_6FFFDB:
mov	al, [esi+28h]
mov	cl, [edi+28h]
mov	dl, al
xor	dl, cl
test	dl, 1
jnz	short loc_6FFFFA
xor	al, cl
test	al, 2
jnz	short loc_6FFFFA
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_6FFFFA:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_6FFF80 endp

align 10h



sub_700010 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+2Ah]
shr	al, 2
push	edi
mov	edi, [esp+8+arg_0]
test	al, 1
jz	short loc_70004A
mov	cl, [edi+2Ah]
shr	cl, 2
test	cl, 1
jz	short loc_70004A
mov	eax, [edi+8]
mov	ecx, [esi+8]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
test	eax, eax
jz	short loc_700077

loc_70004A:
mov	dx, [esi+2Ah]
shr	dx, 0Bh
test	dl, 1
jz	loc_70011F
mov	ax, [edi+2Ah]
shr	ax, 0Bh
test	al, 1
jz	loc_70011F
mov	ecx, [esi+1Ch]
cmp	ecx, [edi+1Ch]
jnz	loc_70011F

loc_700077:
mov	edx, [edi+20h]
xor	edx, [esi+20h]
test	edx, offset sub_FFFFFF
jnz	loc_70011F
mov	al, [esi+23h]
cmp	al, [edi+23h]
jnz	loc_70011F
movzx	ecx, word ptr [esi+26h]
mov	[esp+8+arg_0], ecx
movzx	edx, word ptr [edi+26h]
fild	[esp+8+arg_0]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
mov	[esp+8+arg_0], edx
fild	[esp+8+arg_0]
fdiv	st, st(2)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_70011D
mov	al, [edi+28h]
xor	al, [esi+28h]
test	al, 8
jnz	short loc_70011D
movsx	ecx, word ptr [esi+24h]
mov	[esp+8+arg_0], ecx
movsx	edx, word ptr [edi+24h]
fild	[esp+8+arg_0]
fdiv	st, st(1)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
mov	[esp+8+arg_0], edx
fild	[esp+8+arg_0]
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_70011F
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_70011D:
fstp	st

loc_70011F:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_700010 endp

align 10h



sub_700130 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
xor	ecx, ecx
xor	esi, esi
test	byte ptr [edi+2Ah], 1
mov	[esp+18h+var_8], ecx
mov	[esp+18h+var_4], ecx
jnz	short loc_700157
mov	ax, [edi+2Ah]
shr	ax, 0Ah
test	al, 1
jz	short loc_70015A

loc_700157:
mov	esi, [edi+20h]

loc_70015A:
movzx	eax, word ptr [edi+2Ah]
mov	dl, al
shr	dl, 1
test	dl, 1
jz	short loc_70016B
movsx	ecx, word ptr [edi+24h]

loc_70016B:
mov	dl, al
shr	dl, 3
test	dl, 1
jz	short loc_70017E
movzx	edx, word ptr [edi+26h]
shl	edx, 10h
or	ecx, edx

loc_70017E:
movzx	edx, byte ptr [edi+28h]
shl	edx, 18h
or	esi, edx
movzx	edx, ax
shl	edx, 18h
or	ecx, edx
cmp	dword ptr [edi+1Ch], 0
mov	[esp+18h+var_10], esi
mov	[esp+18h+var_C], ecx
jz	short loc_7001A5
mov	[esp+18h+var_8], 1

loc_7001A5:
shr	eax, 9
test	al, 1
jz	short loc_7001BC
mov	ecx, [edi+18h]
test	ecx, ecx
jz	short loc_7001BC
call	sub_6FFEE0
mov	[esp+18h+var_4], eax

loc_7001BC:
push	ebp
mov	eax, 10h
mov	ebp, 1505h
jmp	short loc_7001D0
align 10h

loc_7001D0:
movzx	ecx, [esp+eax+1Ch+var_11]
imul	ebp, 1003Fh
dec	eax
add	ebp, ecx
test	eax, eax
ja	short loc_7001D0
mov	dl, [edi+2Ah]
shr	dl, 2
mov	esi, ebp
test	dl, 1
jz	short loc_700215
mov	eax, [edi+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	esi, eax
xor	esi, ebp

loc_700215:
mov	edx, 100h
pop	ebp
test	[edi+2Ah], dx
jz	short loc_700252
add	edi, 10h
mov	ecx, edi
call	sub_679930
test	eax, eax
jz	short loc_700252
mov	eax, [edi]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
xor	esi, eax

loc_700252:
pop	edi
mov	eax, esi
pop	esi
add	esp, 10h
retn	4
sub_700130 endp

align 10h



sub_700260 proc	near
xor	edx, edx
xor	eax, eax
push	esi
mov	esi, ecx
mov	[esi+10h], dx
mov	dx, [esi+16h]
mov	[esi+0Ch], ax
mov	[esi+12h], ax
mov	eax, 7940h
and	dx, ax
mov	eax, [esi+8]
xor	ecx, ecx
or	dx, 1
mov	[esi+16h], dx
mov	[esi+0Eh], cx
mov	[esi+14h], cx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, 0FFBFh
and	[esi+16h], ax
mov	dword ptr [esi+8], 0
pop	esi
retn
sub_700260 endp

align 10h



sub_7002C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+8]
mov	eax, [eax+30h]
push	edi
push	edx
call	eax
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi+8], 0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
lea	eax, ds:4[edi*4]
push	eax
call	edx
mov	[esi+8], eax
mov	[eax], edi
pop	edi
pop	esi
retn	4
sub_7002C0 endp

align 10h



sub_700310 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+8]
test	ebx, ebx
jz	short loc_700351
push	edi
mov	edi, [ebx]
test	eax, eax
jz	short loc_70032A
cmp	[eax], edi
jz	short loc_700330

loc_70032A:
push	edi
call	sub_7002C0

loc_700330:
mov	ecx, [esi+8]
lea	eax, ds:0[edi*4]
push	eax
add	ebx, 4
add	ecx, 4
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	4

loc_700351:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi+8], 0
pop	esi
pop	ebx
retn	4
sub_700310 endp

align 10h



sub_700370 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
movzx	ecx, word ptr [eax+0Ch]
mov	[esi+0Ch], cx
movzx	edx, word ptr [eax+0Eh]
mov	[esi+0Eh], dx
movzx	ecx, word ptr [eax+10h]
mov	[esi+10h], cx
movzx	edx, word ptr [eax+12h]
mov	[esi+12h], dx
movzx	ecx, word ptr [eax+14h]
mov	[esi+14h], cx
movzx	edx, word ptr [eax+16h]
mov	[esi+16h], dx
mov	eax, [eax+8]
push	eax
mov	ecx, esi
call	sub_700310
mov	eax, esi
pop	esi
retn	4
sub_700370 endp

align 10h



sub_7003C0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
movzx	ebx, word ptr [edi+16h]
mov	al, bl
shr	al, 6
xor	esi, esi
test	al, 1
jz	short loc_700404
cmp	[edi+8], esi
jz	short loc_700404
mov	edx, [edi+8]
mov	eax, [edx]
lea	eax, ds:4[eax*4]
mov	ecx, 1505h
test	eax, eax
jbe	short loc_700402

loc_7003F0:
movzx	esi, byte ptr [edx+eax-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, esi
test	eax, eax
ja	short loc_7003F0

loc_700402:
mov	esi, ecx

loc_700404:
mov	cl, bl
shr	cl, 1
test	cl, 1
jz	short loc_700413
movzx	edx, word ptr [edi+0Ch]
xor	esi, edx

loc_700413:
mov	al, bl
shr	al, 2
test	al, 1
jz	short loc_700425
movsx	ecx, word ptr [edi+0Eh]
shl	ecx, 8
xor	esi, ecx

loc_700425:
mov	dl, bl
shr	dl, 3
test	dl, 1
jz	short loc_700438
movsx	eax, word ptr [edi+10h]
shl	eax, 0Ch
xor	esi, eax

loc_700438:
mov	cl, bl
shr	cl, 4
test	cl, 1
jz	short loc_70044B
movzx	edx, word ptr [edi+12h]
shl	edx, 10h
xor	esi, edx

loc_70044B:
mov	al, bl
shr	al, 5
test	al, 1
jz	short loc_70045D
movzx	ecx, word ptr [edi+14h]
shl	ecx, 12h
xor	esi, ecx

loc_70045D:
mov	dl, bl
shr	dl, 7
test	dl, 1
jz	short loc_700476
test	ebx, 8000h
jz	short loc_700476
mov	edx, 1
jmp	short loc_700478

loc_700476:
xor	edx, edx

loc_700478:
movzx	ecx, word ptr [edi+16h]
mov	eax, ecx
shr	eax, 8
mov	edi, ecx
and	eax, 6
shl	edi, 9
or	eax, edi
movzx	edx, dl
shr	ecx, 1
or	eax, edx
and	ecx, 0C00h
xor	eax, ecx
pop	edi
xor	eax, esi
pop	esi
pop	ebx
retn	4
sub_7003C0 endp

align 10h



sub_7004B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143AB58
mov	dword ptr [esi+8], 0
movzx	ecx, word ptr [eax+0Ch]
mov	[esi+0Ch], cx
movzx	edx, word ptr [eax+0Eh]
mov	[esi+0Eh], dx
movzx	ecx, word ptr [eax+10h]
mov	[esi+10h], cx
movzx	edx, word ptr [eax+12h]
mov	[esi+12h], dx
movzx	ecx, word ptr [eax+14h]
mov	[esi+14h], cx
movzx	edx, word ptr [eax+16h]
mov	[esi+16h], dx
mov	eax, [eax+8]
push	eax
mov	ecx, esi
call	sub_700310
mov	eax, esi
pop	esi
retn	4
sub_7004B0 endp

align 10h



sub_700520 proc	near
test	byte ptr dword_185650C,	1
push	esi
mov	esi, ecx
jnz	short loc_70054A
or	dword_185650C, 1
mov	ecx, offset dword_1856508
call	sub_679E30
push	offset sub_1419550 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_70054A:
mov	al, [esi+2Ah]
shr	al, 2
test	al, 1
lea	eax, [esi+8]
jnz	short loc_70055C
mov	eax, offset dword_1856508

loc_70055C:
pop	esi
retn
sub_700520 endp

align 10h



sub_700560 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
test	eax, eax
jz	short loc_70057F
cmp	dword ptr [eax], 0
jbe	short loc_70057F
push	eax
call	sub_700310
or	word ptr [esi+16h], 40h
pop	esi
retn	4

loc_70057F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+8]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, 0FFBFh
and	[esi+16h], cx
mov	dword ptr [esi+8], 0
pop	esi
retn	4
sub_700560 endp

align 10h



sub_7005B0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
test	edx, edx
jz	short loc_7005CA
inc	dword ptr [edx+4]

loc_7005CA:
mov	ecx, [ecx+8]
mov	[eax+8], ecx
retn	4
sub_7005B0 endp

align 10h



sub_7005E0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx]
test	eax, eax
jz	short loc_700630
mov	eax, [eax+4]
push	ebp
push	esi
push	edi
xor	edi, edi
lea	ebp, [eax+1]

loc_7005F4:
mov	eax, [ebx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_700613
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_70060D
call	sub_64A430

loc_70060D:
mov	dword ptr [esi], 0FFFFFFFEh

loc_700613:
add	edi, 0Ch
sub	ebp, 1
jnz	short loc_7005F4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	[ebx], ebp
pop	ebp

loc_700630:
pop	ebx
retn
sub_7005E0 endp

align 10h



sub_700640 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	edi
push	eax
mov	esi, ecx
call	sub_702020
mov	eax, [esi]
mov	ebx, [esp+0Ch+arg_8]
and	ebx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	ecx, [ebx+ebx*2]
lea	edi, [eax+ecx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[edi], edx
jnz	short loc_70068F
mov	esi, [esp+0Ch+arg_4]
mov	dword ptr [edi], 0FFFFFFFFh
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_700681
call	sub_64A420

loc_700681:
mov	edx, [esi]
mov	[edi+8], edx
mov	[edi+4], ebx
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_70068F:
mov	ecx, [eax+4]
mov	esi, ebx
push	ebp

loc_700695:
inc	esi
and	esi, ecx
lea	ebp, [esi+esi*2]
cmp	[eax+ebp*4+8], edx
jnz	short loc_700695
mov	edx, [edi+4]
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*4+8]
cmp	edx, ebx
jnz	short loc_7006E5
test	ecx, ecx
jz	short loc_7006B9
push	edi
call	sub_699110

loc_7006B9:
mov	edx, [esp+10h+arg_4]
mov	ebp, [edx]
test	ebp, ebp
jz	short loc_7006CA
mov	ecx, ebp
call	sub_64A420

loc_7006CA:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_7006D6
call	sub_64A430

loc_7006D6:
mov	[edi+8], ebp
pop	ebp
mov	[edi], esi
mov	[edi+4], ebx
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_7006E5:
lea	edx, [edx+edx*2]
cmp	[eax+edx*4+8], ebx
lea	ebp, [eax+edx*4+8]
jz	short loc_700703

loc_7006F2:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*2+0]
cmp	[eax+edx*4+8], ebx
lea	ebp, [eax+edx*4+8]
jnz	short loc_7006F2

loc_700703:
test	ecx, ecx
jz	short loc_70070D
push	edi
call	sub_699110

loc_70070D:
mov	eax, [esp+10h+arg_4]
mov	[ebp+0], esi
mov	esi, [eax]
test	esi, esi
jz	short loc_700721
mov	ecx, esi
call	sub_64A420

loc_700721:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_70072D
call	sub_64A430

loc_70072D:
mov	[edi+8], esi
pop	ebp
mov	[edi+4], ebx
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_700640 endp




sub_700740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebp
push	esi
push	edi
push	eax
mov	esi, ecx
call	sub_702060
mov	eax, [esi]
mov	edi, [esp+0Ch+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	ecx, [edi+edi*2]
mov	ebp, [eax+ecx*4+8]
lea	esi, [eax+ecx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_70078D
mov	ecx, [esp+0Ch+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
test	eax, eax
jz	short loc_70077F
inc	dword ptr [eax+4]

loc_70077F:
mov	edx, [ecx]
mov	[esi+8], edx
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_70078D:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi

loc_700793:
inc	ebx
and	ebx, ecx
lea	edx, [ebx+ebx*2]
cmp	dword ptr [eax+edx*4+8], 0FFFFFFFEh
jnz	short loc_700793
lea	ecx, [ebx+ebx*2]
lea	edx, [eax+ecx*4+8]
mov	ecx, [esi+4]
cmp	ecx, edi
jnz	short loc_7007F2
test	edx, edx
jz	short loc_7007CA
mov	[edx], ebp
mov	eax, [esi+4]
mov	[edx+4], eax
mov	eax, [esi+8]
test	eax, eax
jz	short loc_7007C4
inc	dword ptr [eax+4]

loc_7007C4:
mov	ecx, [esi+8]
mov	[edx+8], ecx

loc_7007CA:
mov	edx, [esp+10h+arg_4]
mov	ebp, [edx]
test	ebp, ebp
jz	short loc_7007D7
inc	dword ptr [ebp+4]

loc_7007D7:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_7007E3
call	sub_64A400

loc_7007E3:
mov	[esi+8], ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
retn	0Ch

loc_7007F2:
lea	ecx, [ecx+ecx*2]
cmp	[eax+ecx*4+8], edi
lea	ecx, [eax+ecx*4+8]
jz	short loc_70080F
nop

loc_700800:
mov	ecx, [ecx]
lea	ecx, [ecx+ecx*2]
cmp	[eax+ecx*4+8], edi
lea	ecx, [eax+ecx*4+8]
jnz	short loc_700800

loc_70080F:
test	edx, edx
jz	short loc_70082B
mov	[edx], ebp
mov	eax, [esi+4]
mov	[edx+4], eax
mov	eax, [esi+8]
test	eax, eax
jz	short loc_700825
inc	dword ptr [eax+4]

loc_700825:
mov	eax, [esi+8]
mov	[edx+8], eax

loc_70082B:
mov	[ecx], ebx
mov	ecx, [esp+10h+arg_4]
mov	ebx, [ecx]
test	ebx, ebx
jz	short loc_70083A
inc	dword ptr [ebx+4]

loc_70083A:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_700846
call	sub_64A400

loc_700846:
mov	[esi+8], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebp
retn	0Ch
sub_700740 endp

align 10h



sub_700860 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+0]
push	esi
lea	eax, [ebx+ebx*2]
cmp	dword ptr [ecx+eax*4+8], 0FFFFFFFEh
lea	esi, [ecx+eax*4+8]
push	edi
mov	edi, ebx
jz	short loc_7008B6
cmp	[esi+4], ebx
jnz	short loc_7008B6

loc_700882:
cmp	[esi+4], ebx
jnz	short loc_70089A
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
mov	ecx, [esi+8]
push	eax
call	sub_6FFD60
test	al, al
jnz	short loc_7008AD

loc_70089A:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_7008B6
mov	ecx, [ebp+0]
lea	eax, [edi+edi*2]
lea	esi, [ecx+eax*4+8]
jmp	short loc_700882

loc_7008AD:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_7008B6:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_700860 endp




sub_7008C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [ecx]
push	esi
lea	eax, [ebx+ebx*2]
cmp	dword ptr [ebp+eax*4+8], 0FFFFFFFEh
lea	esi, [ebp+eax*4+8]
push	edi
mov	edi, ebx
jz	short loc_700911
cmp	[esi+4], ebx
jnz	short loc_700911
nop

loc_7008E0:
cmp	[esi+4], ebx
jnz	short loc_7008F8
mov	ecx, [esp+10h+arg_0]
mov	edx, [ecx]
mov	ecx, [esi+8]
push	edx
call	sub_6FFE80
test	al, al
jnz	short loc_700908

loc_7008F8:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_700911
lea	eax, [edi+edi*2]
lea	esi, [ebp+eax*4+8]
jmp	short loc_7008E0

loc_700908:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_700911:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_7008C0 endp

align 10h



sub_700920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	ecx
mov	ecx, esi
call	sub_7004B0
mov	edi, [esp+8+arg_4]
test	byte ptr [edi+16h], 1
jz	short loc_70095D
movzx	eax, word ptr [edi+16h]
shr	eax, 9
and	eax, 3
shl	eax, 9
xor	ax, [esi+16h]
mov	ecx, 600h
and	ax, cx
xor	ax, [esi+16h]
or	ax, 1
mov	[esi+16h], ax

loc_70095D:
movzx	eax, word ptr [edi+16h]
mov	dl, al
shr	dl, 7
test	dl, 1
jz	short loc_70098F
test	eax, 8000h
jz	short loc_70097D
mov	eax, 8000h
or	[esi+16h], ax
jmp	short loc_700986

loc_70097D:
mov	ecx, 7FFFh
and	[esi+16h], cx

loc_700986:
mov	edx, 80h
or	[esi+16h], dx

loc_70098F:
mov	al, [edi+16h]
shr	al, 1
test	al, 1
jz	short loc_7009A5
movzx	eax, word ptr [edi+0Ch]
or	word ptr [esi+16h], 2
mov	[esi+0Ch], ax

loc_7009A5:
mov	cl, [edi+16h]
shr	cl, 2
test	cl, 1
jz	short loc_7009BD
movsx	eax, word ptr [edi+0Eh]
or	word ptr [esi+16h], 4
mov	[esi+0Eh], ax

loc_7009BD:
mov	dl, [edi+16h]
shr	dl, 3
test	dl, 1
jz	short loc_7009D5
movsx	eax, word ptr [edi+10h]
or	word ptr [esi+16h], 8
mov	[esi+10h], ax

loc_7009D5:
mov	al, [edi+16h]
shr	al, 4
test	al, 1
jz	short loc_7009EC
movzx	eax, word ptr [edi+12h]
or	word ptr [esi+16h], 10h
mov	[esi+12h], ax

loc_7009EC:
mov	cl, [edi+16h]
shr	cl, 5
test	cl, 1
jz	short loc_700A04
movzx	eax, word ptr [edi+14h]
or	word ptr [esi+16h], 20h
mov	[esi+14h], ax

loc_700A04:
mov	dl, [edi+16h]
shr	dl, 6
test	dl, 1
jz	short loc_700A4B
mov	eax, [edi+8]
test	eax, eax
jz	short loc_700A2A
cmp	dword ptr [eax], 0
jbe	short loc_700A2A
push	eax
mov	ecx, esi
call	sub_700310
or	word ptr [esi+16h], 40h
jmp	short loc_700A4B

loc_700A2A:
mov	eax, [esi+8]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	ecx, 0FFBFh
and	[esi+16h], cx
mov	dword ptr [esi+8], 0

loc_700A4B:
movzx	eax, word ptr [edi+16h]
mov	edx, eax
shr	edx, 8
test	dl, 1
jz	short loc_700A7E
shr	eax, 0Bh
and	eax, 3
shl	eax, 0Bh
xor	ax, [esi+16h]
mov	ecx, 1800h
and	ax, cx
xor	ax, [esi+16h]
mov	edx, 100h
or	ax, dx
mov	[esi+16h], ax

loc_700A7E:
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_700920 endp

align 10h



sub_700A90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
xor	eax, eax
xor	ecx, ecx
xor	edx, edx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143AB58
mov	dword ptr [esi+8], 0
mov	[esi+0Ch], ax
mov	[esi+0Eh], cx
mov	[esi+10h], dx
mov	[esi+12h], ax
mov	[esi+14h], cx
mov	[esi+16h], dx
test	byte ptr [edi+16h], 1
jz	short loc_700B09
test	byte ptr [ebp+16h], 1
jz	short loc_700B09
movzx	eax, word ptr [ebp+16h]
mov	cx, [edi+16h]
xor	cx, ax
mov	edx, 600h
test	dx, cx
jnz	short loc_700B09
shr	eax, 9
and	eax, 3
and	eax, 3
shl	eax, 9
or	eax, 1
mov	[esi+16h], ax

loc_700B09:
movzx	eax, word ptr [edi+16h]
mov	cl, al
shr	cl, 7
test	cl, 1
jz	short loc_700B4D
movzx	edx, word ptr [ebp+16h]
mov	cl, dl
shr	cl, 7
test	cl, 1
jz	short loc_700B4D
shr	eax, 0Fh
and	eax, 1
and	edx, 8000h
mov	ecx, 0
setnz	cl
cmp	al, cl
jnz	short loc_700B4D
xor	eax, eax
test	dx, dx
setnz	al
mov	ecx, esi
push	eax
call	sub_6D56B0

loc_700B4D:
mov	dl, [edi+16h]
shr	dl, 1
test	dl, 1
jz	short loc_700B76
mov	al, [ebp+16h]
shr	al, 1
test	al, 1
jz	short loc_700B76
movzx	eax, word ptr [ebp+0Ch]
cmp	[edi+0Ch], ax
jnz	short loc_700B76
or	word ptr [esi+16h], 2
movzx	eax, ax
mov	[esi+0Ch], ax

loc_700B76:
mov	cl, [edi+16h]
shr	cl, 2
test	cl, 1
jz	short loc_700BA0
mov	dl, [ebp+16h]
shr	dl, 2
test	dl, 1
jz	short loc_700BA0
movzx	eax, word ptr [ebp+0Eh]
cmp	[edi+0Eh], ax
jnz	short loc_700BA0
or	word ptr [esi+16h], 4
cwde
mov	[esi+0Eh], ax

loc_700BA0:
mov	al, [edi+16h]
shr	al, 3
test	al, 1
jz	short loc_700BC9
mov	cl, [ebp+16h]
shr	cl, 3
test	cl, 1
jz	short loc_700BC9
movzx	eax, word ptr [ebp+10h]
cmp	[edi+10h], ax
jnz	short loc_700BC9
or	word ptr [esi+16h], 8
cwde
mov	[esi+10h], ax

loc_700BC9:
mov	dl, [edi+16h]
shr	dl, 4
test	dl, 1
jz	short loc_700BF4
mov	al, [ebp+16h]
shr	al, 4
test	al, 1
jz	short loc_700BF4
movzx	eax, word ptr [ebp+12h]
cmp	[edi+12h], ax
jnz	short loc_700BF4
or	word ptr [esi+16h], 10h
movzx	eax, ax
mov	[esi+12h], ax

loc_700BF4:
mov	cl, [edi+16h]
shr	cl, 5
test	cl, 1
jz	short loc_700C20
mov	dl, [ebp+16h]
shr	dl, 5
test	dl, 1
jz	short loc_700C20
movzx	eax, word ptr [ebp+14h]
cmp	[edi+14h], ax
jnz	short loc_700C20
or	word ptr [esi+16h], 20h
movzx	eax, ax
mov	[esi+14h], ax

loc_700C20:
mov	al, [edi+16h]
shr	al, 6
test	al, 1
jz	short loc_700C4E
mov	cl, [ebp+16h]
shr	cl, 6
test	cl, 1
jz	short loc_700C4E
push	ebx
mov	ebx, [ebp+8]
push	ebx
mov	ecx, edi
call	sub_6FFBB0
test	al, al
jz	short loc_700C4D
push	ebx
mov	ecx, esi
call	sub_700560

loc_700C4D:
pop	ebx

loc_700C4E:
movzx	ecx, word ptr [edi+16h]
mov	edx, ecx
shr	edx, 8
test	dl, 1
jz	short loc_700C99
movzx	eax, word ptr [ebp+16h]
mov	edx, eax
shr	edx, 8
test	dl, 1
jz	short loc_700C99
xor	ecx, eax
test	ecx, 1800h
jnz	short loc_700C99
shr	eax, 0Bh
and	eax, 3
shl	eax, 0Bh
xor	ax, [esi+16h]
mov	ecx, 1800h
and	ax, cx
xor	ax, [esi+16h]
mov	edx, 100h
or	ax, dx
mov	[esi+16h], ax

loc_700C99:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	8
sub_700A90 endp

align 10h



sub_700CB0 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, ecx
mov	ebx, [ebp+0]
mov	eax, [ebp+4]
mov	ecx, [ebx]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4+10h]
push	esi
mov	[esp+1Ch+var_4], eax
mov	eax, [eax]
push	edi
push	eax
lea	ecx, [esp+24h+var_D]
call	sub_700130
mov	ecx, [ebx]
mov	esi, [ecx+4]
and	esi, eax
lea	edx, [esi+esi*2]
cmp	dword ptr [ecx+edx*4+8], 0FFFFFFFEh
lea	edi, [ecx+edx*4+8]
jz	loc_700D8E
cmp	[edi+4], esi
jnz	loc_700D8E
mov	[esp+20h+var_C], esi
mov	[esp+20h+var_8], 0FFFFFFFFh

loc_700D06:
mov	eax, [esp+20h+var_C]
cmp	[edi+4], eax
jnz	short loc_700D22
mov	ecx, [esp+20h+var_4]
mov	eax, [ecx]
mov	ecx, [edi+8]
push	eax
call	sub_6FFD60
test	al, al
jnz	short loc_700D38

loc_700D22:
mov	[esp+20h+var_8], esi
mov	esi, [edi]
cmp	esi, 0FFFFFFFFh
jz	short loc_700D8E
mov	eax, [ebx]
lea	edx, [esi+esi*2]
lea	edi, [eax+edx*4+8]
jmp	short loc_700D06

loc_700D38:
cmp	esi, [ebp+4]
jnz	short loc_700D8E
cmp	[esp+20h+var_C], esi
jnz	short loc_700D69
mov	eax, [edi]
cmp	eax, 0FFFFFFFFh
jz	short loc_700D78
mov	edx, [ebx]
lea	ecx, [eax+eax*2]
lea	esi, [edx+ecx*4+8]
mov	ecx, edi
call	sub_693F80
push	esi
mov	ecx, edi
call	sub_699110
dec	dword ptr [ebp+4]
mov	edi, esi
jmp	short loc_700D78

loc_700D69:
mov	eax, [esp+20h+var_8]
mov	ecx, [ebx]
mov	edx, [edi]
lea	eax, [eax+eax*2]
mov	[ecx+eax*4+8], edx

loc_700D78:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_700D84
call	sub_64A430

loc_700D84:
mov	dword ptr [edi], 0FFFFFFFEh
mov	ebx, [ebx]
dec	dword ptr [ebx]

loc_700D8E:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_700CB0 endp

align 10h



sub_700DA0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 14h
push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+0]
mov	eax, [ebp+4]
mov	ebx, [ecx]
lea	eax, [eax+eax*2]
push	esi
lea	eax, [ebx+eax*4+10h]
mov	eax, [eax]
push	edi
mov	[esp+24h+var_4], ecx
push	eax
lea	ecx, [esp+28h+var_11]
mov	[esp+28h+var_8], eax
call	sub_7003C0
mov	esi, eax
and	esi, [ebx+4]
lea	ecx, [esi+esi*2]
cmp	dword ptr [ebx+ecx*4+8], 0FFFFFFFEh
lea	edi, [ebx+ecx*4+8]
jz	loc_700E84
cmp	[edi+4], esi
jnz	loc_700E84
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], 0FFFFFFFFh
jmp	short loc_700E00
align 10h

loc_700E00:
mov	edx, [esp+24h+var_10]
cmp	[edi+4], edx
jnz	short loc_700E1A
mov	eax, [esp+24h+var_8]
mov	ecx, [edi+8]
push	eax
call	sub_6FFE80
test	al, al
jnz	short loc_700E2E

loc_700E1A:
mov	[esp+24h+var_C], esi
mov	esi, [edi]
cmp	esi, 0FFFFFFFFh
jz	short loc_700E84
lea	ecx, [esi+esi*2]
lea	edi, [ebx+ecx*4+8]
jmp	short loc_700E00

loc_700E2E:
cmp	esi, [ebp+4]
jnz	short loc_700E84
cmp	[esp+24h+var_10], esi
jnz	short loc_700E5D
mov	eax, [edi]
cmp	eax, 0FFFFFFFFh
jz	short loc_700E6A
lea	edx, [eax+eax*2]
mov	ecx, edi
lea	ebx, [ebx+edx*4+8]
call	sub_693FA0
push	ebx
mov	ecx, edi
call	sub_7005B0
dec	dword ptr [ebp+4]
mov	edi, ebx
jmp	short loc_700E6A

loc_700E5D:
mov	eax, [esp+24h+var_C]
mov	ecx, [edi]
lea	eax, [eax+eax*2]
mov	[ebx+eax*4+8], ecx

loc_700E6A:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_700E76
call	sub_64A400

loc_700E76:
mov	edx, [esp+24h+var_4]
mov	dword ptr [edi], 0FFFFFFFEh
mov	eax, [edx]
dec	dword ptr [eax]

loc_700E84:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_700DA0 endp

align 10h



sub_700E90 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	edi, [esp+10h+arg_0]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1437650
mov	eax, ebp
test	ebp, ebp
jnz	short loc_700EBA
mov	eax, [edi+0Ch]

loc_700EBA:
push	eax
lea	eax, [edi+8]
push	eax
lea	ecx, [esi+8]
mov	[esp+18h+var_2], 0
call	sub_67ACB0
test	ebp, ebp
jnz	short loc_700ED3
mov	ebp, [edi+0Ch]

loc_700ED3:
push	ebp
lea	ecx, [edi+10h]
push	ecx
lea	ecx, [esi+10h]
mov	[esp+18h+var_1], 0
call	sub_67ACB0
mov	eax, [edi+18h]
test	eax, eax
jz	short loc_700EEF
inc	dword ptr [eax+4]

loc_700EEF:
mov	edx, [edi+18h]
mov	[esi+18h], edx
mov	eax, [edi+1Ch]
test	eax, eax
jz	short loc_700EFE
inc	dword ptr [eax]

loc_700EFE:
mov	eax, [edi+1Ch]
mov	[esi+1Ch], eax
mov	ecx, [edi+20h]
mov	[esi+20h], ecx
movzx	edx, word ptr [edi+24h]
mov	[esi+24h], dx
mov	ax, [edi+26h]
mov	[esi+26h], ax
mov	cl, [edi+28h]
mov	[esi+28h], cl
movzx	edx, word ptr [edi+2Ah]
pop	edi
mov	[esi+2Ah], dx
mov	eax, esi
pop	esi
pop	ebp
pop	ecx
retn	8
sub_700E90 endp

align 10h



sub_700F40 proc	near

var_4= dword ptr -4

push	ecx
xor	edx, edx
mov	[esp+4+var_4], edx
mov	ax, [ecx+2Ah]
shr	ax, 0Bh
push	esi
push	edi
test	al, 1
jz	short loc_700F5D
mov	esi, [esp+0Ch+var_4]
lea	eax, [ecx+1Ch]
jmp	short loc_700F6C

loc_700F5D:
xor	esi, esi
mov	edx, 1
mov	[esp+0Ch+var_4], esi
lea	eax, [esp+0Ch+var_4]

loc_700F6C:
mov	edi, [eax]
test	dl, 1
jz	short loc_700F91
test	esi, esi
jz	short loc_700F91
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_700F91
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_700F91:
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn
sub_700F40 endp

align 10h



sub_700FA0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+1Ch]
test	esi, esi
jz	short loc_700FC5
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_700FC5
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_700FC5:
mov	dword ptr [edi+1Ch], 0
mov	eax, 0F7FFh
and	[edi+2Ah], ax
pop	edi
pop	esi
retn
sub_700FA0 endp

align 10h



sub_700FE0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	ax, [esi+2Ah]
shr	ax, 0Bh
push	edi
test	al, 1
jz	short loc_70105A
lea	edi, [esi+8]
push	ebp
mov	ecx, edi
call	sub_679930
mov	ecx, ebx
mov	ebp, eax
call	sub_679930
cmp	ebp, eax
pop	ebp
jnz	short loc_701029
mov	eax, [ebx]
mov	ecx, [edi]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
test	eax, eax
jz	short loc_70105A

loc_701029:
mov	edi, [esi+1Ch]
test	edi, edi
jz	short loc_70104A
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_70104A
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_70104A:
mov	ecx, 0F7FFh
mov	dword ptr [esi+1Ch], 0
and	[esi+2Ah], cx

loc_70105A:
lea	edi, [esi+8]
push	ebx
mov	ecx, edi
call	sub_67A3D0
mov	eax, [edi]
or	word ptr [esi+2Ah], 4
and	eax, 0FFFFFFFCh
add	eax, 8
push	2Ch		; int
push	eax		; char *
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_701090
mov	edx, 1000h
or	[esi+2Ah], dx
pop	edi
pop	esi
pop	ebx
retn	4

loc_701090:
mov	eax, 0EFFFh
and	[esi+2Ah], ax
pop	edi
pop	esi
pop	ebx
retn	4
sub_700FE0 endp

align 10h



sub_7010A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	esi, ecx
cmp	ebx, 0FFFFFFFFh
jnz	short loc_7010C3
mov	eax, ebp
lea	edx, [eax+1]

loc_7010B8:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7010B8
sub	eax, edx
mov	ebx, eax

loc_7010C3:
mov	ax, [esi+2Ah]
shr	ax, 0Bh
test	al, 1
jz	short loc_701122
lea	edi, [esi+8]
mov	ecx, edi
call	sub_679930
cmp	eax, ebx
jnz	short loc_7010F1
mov	eax, [edi]
push	ebx
and	eax, 0FFFFFFFCh
push	ebp
add	eax, 8
push	eax
call	sub_679A30
test	eax, eax
jz	short loc_701122

loc_7010F1:
mov	edi, [esi+1Ch]
test	edi, edi
jz	short loc_701112
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_701112
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_701112:
mov	ecx, 0F7FFh
mov	dword ptr [esi+1Ch], 0
and	[esi+2Ah], cx

loc_701122:
lea	edi, [esi+8]
mov	ecx, edi
call	sub_67A720
push	ebx
push	ebp
mov	ecx, edi
call	sub_67A0C0
mov	edi, [edi]
or	word ptr [esi+2Ah], 4
and	edi, 0FFFFFFFCh
push	2Ch		; int
add	edi, 8
push	edi		; char *
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_701161
pop	edi
mov	edx, 1000h
or	[esi+2Ah], dx
pop	esi
pop	ebp
pop	ebx
retn	8

loc_701161:
pop	edi
mov	eax, 0EFFFh
and	[esi+2Ah], ax
pop	esi
pop	ebp
pop	ebx
retn	8
sub_7010A0 endp

align 10h



sub_701180 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	esi
push	edi
mov	edi, ecx
cmp	ebx, 0FFFFFFFFh
jnz	short loc_70119E
mov	eax, [esp+10h+arg_0]
push	eax
call	sub_67B340
add	esp, 4
mov	ebx, eax

loc_70119E:
mov	cx, [edi+2Ah]
shr	cx, 0Bh
test	cl, 1
jz	loc_70122E
lea	ecx, [edi+8]
call	sub_679930
cmp	eax, ebx
jnz	short loc_701227
xor	esi, esi
test	ebx, ebx
jbe	short loc_70122E

loc_7011C1:
mov	eax, [edi+8]
and	eax, 0FFFFFFFCh
movsx	dx, byte ptr [eax+esi+8]
movzx	eax, dx
push	eax
call	sub_67B520
mov	ecx, [esp+14h+arg_0]
movzx	edx, word ptr [ecx+esi*2]
push	edx
mov	ebp, eax
call	sub_67B520
add	esp, 8
cmp	ebp, eax
jnz	short loc_7011F4
inc	esi
cmp	esi, ebx
jb	short loc_7011C1
jmp	short loc_70122E

loc_7011F4:
mov	esi, [edi+1Ch]
test	esi, esi
jz	short loc_701215
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_701215
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_701215:
mov	eax, 0F7FFh
mov	dword ptr [edi+1Ch], 0
and	[edi+2Ah], ax
jmp	short loc_70122E

loc_701227:
mov	ecx, edi
call	sub_700FA0

loc_70122E:
lea	esi, [edi+8]
mov	ecx, esi
call	sub_67A720
mov	ecx, [esp+10h+arg_0]
push	ebx
push	ecx
mov	ecx, esi
call	sub_67A000
mov	esi, [esi]
or	word ptr [edi+2Ah], 4
and	esi, 0FFFFFFFCh
push	2Ch		; int
add	esi, 8
push	esi		; char *
call	_strchr
add	esp, 8
test	eax, eax
jnz	short loc_701271
mov	edx, 1000h
or	[edi+2Ah], dx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_701271:
mov	eax, 0EFFFh
and	[edi+2Ah], ax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_701180 endp

align 10h



sub_701290 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, [esp+4+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_7012AE
mov	eax, edi
push	esi
lea	esi, [eax+1]

loc_7012A4:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_7012A4
sub	eax, esi
pop	esi

loc_7012AE:
push	eax
push	edi
call	sub_7010A0
pop	edi
retn	8
sub_701290 endp

align 10h



sub_7012C0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, ecx
test	ebx, ebx
jz	short loc_7012CF
inc	dword ptr [ebx]

loc_7012CF:
mov	esi, [edi+1Ch]
test	esi, esi
jz	short loc_7012F0
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_7012F0
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7012F0:
mov	[edi+1Ch], ebx
mov	eax, 800h
or	[edi+2Ah], ax
pop	edi
pop	esi
pop	ebx
retn	4
sub_7012C0 endp

align 10h



sub_701310 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	ax, [esi+2Ah]
shr	ax, 0Bh
test	al, 1
jz	short loc_701335
mov	cl, [esi+28h]
and	cl, 1
cmp	cl, bl
jz	short loc_701335
mov	ecx, esi
call	sub_700FA0

loc_701335:
test	bl, bl
jz	short loc_701347
or	byte ptr [esi+28h], 1
or	word ptr [esi+2Ah], 10h
pop	esi
pop	ebx
retn	4

loc_701347:
and	byte ptr [esi+28h], 0FEh
or	word ptr [esi+2Ah], 10h
pop	esi
pop	ebx
retn	4
sub_701310 endp

align 10h



sub_701360 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	ax, [esi+2Ah]
shr	ax, 0Bh
test	al, 1
jz	short loc_701387
mov	cl, [esi+28h]
shr	cl, 1
and	cl, 1
cmp	cl, bl
jz	short loc_701387
mov	ecx, esi
call	sub_700FA0

loc_701387:
test	bl, bl
jz	short loc_701399
or	byte ptr [esi+28h], 2
or	word ptr [esi+2Ah], 20h
pop	esi
pop	ebx
retn	4

loc_701399:
and	byte ptr [esi+28h], 0FDh
or	word ptr [esi+2Ah], 20h
pop	esi
pop	ebx
retn	4
sub_701360 endp

align 10h



sub_7013B0 proc	near

var_38=	byte ptr -38h
var_37=	byte ptr -37h
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= word ptr	-0Ch
var_A= dword ptr -0Ah
var_6= dword ptr -6
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 38h
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
push	edi
push	eax
lea	ecx, [esi+8]
mov	[esp+44h+var_30], offset off_155F500
push	ecx
mov	edi, 1
lea	ecx, [esp+48h+var_28]
mov	[esp+48h+var_34], 0
mov	[esp+48h+var_2C], edi
mov	[esp+48h+var_30], offset off_1437650
mov	[esp+48h+var_38], 0
call	sub_67ACB0
mov	edx, [esi+0Ch]
push	edx
lea	eax, [esi+10h]
push	eax
lea	ecx, [esp+48h+var_20]
mov	[esp+48h+var_37], 0
call	sub_67ACB0
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_70140E
add	[eax+4], edi

loc_70140E:
mov	eax, [esi+1Ch]
mov	ecx, [esi+18h]
mov	[esp+40h+var_18], ecx
test	eax, eax
jz	short loc_70141E
add	[eax], edi

loc_70141E:
movzx	edx, word ptr [esi+24h]
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
mov	[esp+40h+var_C], dx
movzx	edx, word ptr [esi+26h]
mov	word ptr [esp+40h+var_A], dx
movzx	edx, byte ptr [esi+28h]
mov	si, [esi+2Ah]
push	ebx
push	ebp
mov	ebp, [esp+48h+arg_4]
mov	byte ptr [esp+48h+var_A+2], dl
movzx	edx, byte ptr [ebp+2Ah]
shr	dl, 4
mov	[esp+48h+var_14], eax
mov	[esp+48h+var_10], ecx
mov	word ptr [esp+48h+var_6], si
test	dl, 1
jz	short loc_7014D0
mov	edx, [esp+48h+var_6]
mov	bl, [ebp+28h]
shr	edx, 0Bh
and	bl, 1
test	dl, 1
jz	short loc_7014B7
mov	dl, byte ptr [esp+48h+var_A+2]
and	dl, 1
cmp	dl, bl
jz	short loc_7014B7
test	eax, eax
jz	short loc_7014A0
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_7014A0
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7014A0:
mov	si, word ptr [esp+48h+var_6]
mov	ecx, 0F7FFh
xor	eax, eax
and	si, cx
mov	ecx, [esp+48h+var_10]
mov	[esp+48h+var_14], eax

loc_7014B7:
test	bl, bl
jz	short loc_7014C2
or	byte ptr [esp+48h+var_A+2], 1
jmp	short loc_7014C7

loc_7014C2:
and	byte ptr [esp+48h+var_A+2], 0FEh

loc_7014C7:
or	si, 10h
mov	word ptr [esp+48h+var_6], si

loc_7014D0:
mov	dl, [ebp+2Ah]
shr	dl, 5
test	dl, 1
jz	short loc_701550
mov	bl, [ebp+28h]
mov	edx, [esp+48h+var_6]
shr	bl, 1
shr	edx, 0Bh
and	bl, 1
test	dl, 1
jz	short loc_701537
mov	dl, byte ptr [esp+48h+var_A+2]
shr	dl, 1
and	dl, 1
cmp	dl, bl
jz	short loc_701537
test	eax, eax
jz	short loc_70151E
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_70151E
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_70151E:
mov	si, word ptr [esp+48h+var_6]
mov	ecx, [esp+48h+var_10]
mov	eax, 0F7FFh
mov	[esp+48h+var_14], 0
and	si, ax

loc_701537:
test	bl, bl
jz	short loc_701542
or	byte ptr [esp+48h+var_A+2], 2
jmp	short loc_701547

loc_701542:
and	byte ptr [esp+48h+var_A+2], 0FDh

loc_701547:
or	si, 20h
mov	word ptr [esp+48h+var_6], si

loc_701550:
movzx	eax, word ptr [ebp+2Ah]
mov	dl, al
shr	dl, 6
test	dl, 1
jz	short loc_701579
mov	dl, 4
test	[ebp+28h], dl
jz	short loc_70156B
or	byte ptr [esp+48h+var_A+2], dl
jmp	short loc_701570

loc_70156B:
and	byte ptr [esp+48h+var_A+2], 0FBh

loc_701570:
or	si, 40h
mov	word ptr [esp+48h+var_6], si

loc_701579:
mov	bl, al
shr	bl, 7
mov	edx, 8
test	bl, 1
jz	short loc_7015A5
test	[ebp+28h], dl
jz	short loc_701593
or	byte ptr [esp+48h+var_A+2], dl
jmp	short loc_701598

loc_701593:
and	byte ptr [esp+48h+var_A+2], 0F7h

loc_701598:
mov	ebx, 80h
or	si, bx
mov	word ptr [esp+48h+var_6], si

loc_7015A5:
test	byte ptr [ebp+2Ah], 1
jz	short loc_7015BA
mov	ecx, [ebp+20h]
or	si, di
mov	[esp+48h+var_10], ecx
mov	word ptr [esp+48h+var_6], si

loc_7015BA:
mov	ebx, eax
shr	ebx, 0Ah
test	bl, 1
jz	short loc_7015E4
movzx	ebx, byte ptr [ebp+23h]
and	ecx, offset sub_FFFFFF
shl	ebx, 18h
or	ebx, ecx
mov	ecx, 400h
or	si, cx
mov	[esp+48h+var_10], ebx
mov	word ptr [esp+48h+var_6], si

loc_7015E4:
mov	cl, al
shr	cl, 1
test	cl, 1
jz	short loc_7015FF
mov	cx, [ebp+24h]
or	si, 2
mov	[esp+48h+var_C], cx
mov	word ptr [esp+48h+var_6], si

loc_7015FF:
mov	cl, al
shr	cl, 3
test	cl, 1
jz	short loc_701627
movzx	ecx, word ptr [ebp+26h]
cmp	ecx, 10000h
jbe	short loc_70161A
mov	ecx, 0FFFFh

loc_70161A:
or	si, dx
mov	word ptr [esp+48h+var_A], cx
mov	word ptr [esp+48h+var_6], si

loc_701627:
shr	al, 2
test	al, 1
jz	short loc_701671
test	byte ptr dword_185650C,	1
jnz	short loc_701654
or	dword_185650C, edi
mov	ecx, offset dword_1856508
call	sub_679E30
push	offset sub_1419550 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_701654:
mov	dl, [ebp+2Ah]
shr	dl, 2
lea	eax, [ebp+8]
test	dl, 1
jnz	short loc_701667
mov	eax, offset dword_1856508

loc_701667:
push	eax
lea	ecx, [esp+4Ch+var_30]
call	sub_700FE0

loc_701671:
mov	ax, [ebp+2Ah]
shr	ax, 0Bh
test	al, 1
jz	short loc_7016C5
mov	ecx, ebp
call	sub_700F40
mov	edi, eax
test	edi, edi
jz	short loc_70168C
inc	dword ptr [edi]

loc_70168C:
mov	eax, [esp+48h+var_14]
test	eax, eax
jz	short loc_7016B2
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_7016B2
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7016B2:
mov	ecx, 800h
or	word ptr [esp+48h+var_6], cx
mov	[esp+48h+var_14], edi
mov	edi, 1

loc_7016C5:
mov	edx, 100h
test	[ebp+2Ah], dx
jz	short loc_7016F1
lea	ecx, [ebp+10h]
call	sub_679930
test	eax, eax
jnz	short loc_7016F1
lea	ecx, [esp+48h+var_20]
call	sub_67A720
mov	eax, 0FEFFh
and	word ptr [esp+48h+var_6], ax
jmp	short loc_70171E

loc_7016F1:
mov	ecx, 100h
test	[ebp+2Ah], cx
jz	short loc_70171E
lea	esi, [ebp+10h]
mov	ecx, esi
call	sub_679930
test	eax, eax
jz	short loc_70171E
push	esi
lea	ecx, [esp+4Ch+var_20]
call	sub_67A3D0
mov	edx, 100h
or	word ptr [esp+48h+var_6], dx

loc_70171E:
mov	ax, [ebp+2Ah]
shr	ax, 9
test	al, 1
jz	short loc_70174F
mov	esi, [ebp+18h]
test	esi, esi
jz	short loc_701734
add	[esi+4], edi

loc_701734:
mov	ecx, [esp+48h+var_18]
test	ecx, ecx
jz	short loc_701741
call	sub_64A400

loc_701741:
mov	ecx, 200h
or	word ptr [esp+48h+var_6], cx
mov	[esp+48h+var_18], esi

loc_70174F:
mov	esi, [esp+48h+arg_0]
mov	edx, [esp+48h+var_24]
push	edx
lea	eax, [esp+4Ch+var_28]
mov	dword ptr [esi], offset	off_155F500
push	eax
lea	ecx, [esi+8]
mov	[esi+4], edi
mov	dword ptr [esi], offset	off_1437650
mov	[esp+50h+var_36], 0
call	sub_67ACB0
mov	ecx, [esp+48h+var_24]
push	ecx
lea	edx, [esp+4Ch+var_20]
push	edx
lea	ecx, [esi+10h]
mov	[esp+50h+var_35], 0
call	sub_67ACB0
mov	eax, [esp+48h+var_18]
pop	ebp
pop	ebx
test	eax, eax
jz	short loc_7017A1
add	[eax+4], edi
mov	eax, [esp+40h+var_18]

loc_7017A1:
mov	[esi+18h], eax
mov	eax, [esp+40h+var_14]
test	eax, eax
jz	short loc_7017B2
add	[eax], edi
mov	eax, [esp+40h+var_14]

loc_7017B2:
movzx	ecx, [esp+40h+var_C]
mov	dx, word ptr [esp+40h+var_A]
mov	[esi+1Ch], eax
mov	eax, [esp+40h+var_10]
mov	[esi+24h], cx
movzx	ecx, word ptr [esp+40h+var_6]
mov	[esi+20h], eax
mov	al, byte ptr [esp+40h+var_A+2]
mov	[esi+2Ah], cx
lea	ecx, [esp+40h+var_30]
mov	[esi+26h], dx
mov	[esi+28h], al
call	sub_694380
pop	edi
mov	eax, esi
pop	esi
add	esp, 38h
retn	8
sub_7013B0 endp

align 10h



sub_701800 proc	near

var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= word ptr	-6
var_4= byte ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 34h
push	esi
mov	esi, [esp+38h+arg_4]
mov	eax, [esi+0Ch]
push	edi
mov	edi, ecx
push	eax
lea	ecx, [esp+40h+var_2C]
call	sub_694320
mov	cl, [edi+2Ah]
shr	cl, 4
test	cl, 1
jz	short loc_701848
mov	dl, [esi+2Ah]
shr	dl, 4
test	dl, 1
jz	short loc_701848
movzx	eax, byte ptr [esi+28h]
mov	cl, [edi+28h]
and	al, 1
and	cl, 1
cmp	cl, al
jnz	short loc_701848
push	eax
lea	ecx, [esp+40h+var_2C]
call	sub_701310

loc_701848:
mov	dl, [edi+2Ah]
shr	dl, 5
test	dl, 1
jz	short loc_70187B
mov	al, [esi+2Ah]
shr	al, 5
test	al, 1
jz	short loc_70187B
movzx	eax, byte ptr [esi+28h]
mov	cl, [edi+28h]
shr	al, 1
shr	cl, 1
and	al, 1
and	cl, 1
cmp	cl, al
jnz	short loc_70187B
push	eax
lea	ecx, [esp+40h+var_2C]
call	sub_701360

loc_70187B:
movzx	edx, word ptr [edi+2Ah]
mov	al, dl
shr	al, 6
test	al, 1
jz	short loc_7018BE
mov	cl, [esi+2Ah]
shr	cl, 6
test	cl, 1
jz	short loc_7018BE
mov	al, [esi+28h]
mov	cl, [edi+28h]
shr	al, 2
shr	cl, 2
and	al, 1
and	cl, 1
cmp	cl, al
jnz	short loc_7018BE
test	al, al
jz	short loc_7018B3
or	[esp+3Ch+var_4], 4
jmp	short loc_7018B8

loc_7018B3:
and	[esp+3Ch+var_4], 0FBh

loc_7018B8:
or	[esp+3Ch+var_2], 40h

loc_7018BE:
mov	al, dl
shr	al, 7
push	ebx
mov	ebx, 8
test	al, 1
jz	short loc_701906
mov	cl, [esi+2Ah]
shr	cl, 7
test	cl, 1
jz	short loc_701906
mov	al, [esi+28h]
mov	cl, [edi+28h]
shr	al, 3
shr	cl, 3
and	al, 1
and	cl, 1
cmp	cl, al
jnz	short loc_701906
test	al, al
jz	short loc_7018F7
or	[esp+40h+var_4], bl
jmp	short loc_7018FC

loc_7018F7:
and	[esp+40h+var_4], 0F7h

loc_7018FC:
mov	eax, 80h
or	[esp+40h+var_2], ax

loc_701906:
test	byte ptr [edi+2Ah], 1
jz	short loc_70192A
test	byte ptr [esi+2Ah], 1
jz	short loc_70192A
mov	eax, [esi+20h]
mov	[esp+40h+var_30], eax
cmp	[edi+20h], eax
jnz	short loc_70192A
or	[esp+40h+var_2], 1
mov	[esp+40h+var_C], eax
jmp	short loc_70192E

loc_70192A:
mov	eax, [esp+40h+var_C]

loc_70192E:
mov	ecx, edx
shr	ecx, 0Ah
test	cl, 1
jz	short loc_701968
mov	cx, [esi+2Ah]
shr	cx, 0Ah
test	cl, 1
jz	short loc_701968
mov	cl, [esi+23h]
cmp	[edi+23h], cl
jnz	short loc_701968
movzx	ecx, cl
and	eax, offset sub_FFFFFF
shl	ecx, 18h
or	ecx, eax
mov	eax, 400h
or	[esp+40h+var_2], ax
mov	[esp+40h+var_C], ecx

loc_701968:
mov	cl, dl
shr	cl, 1
test	cl, 1
jz	short loc_7019C7
mov	al, [esi+2Ah]
shr	al, 1
test	al, 1
jz	short loc_7019C7
movsx	eax, word ptr [edi+24h]
mov	[esp+40h+arg_4], eax
movzx	ecx, word ptr [esi+24h]
fild	[esp+40h+arg_4]
fld	ds:dbl_15FCE20
movsx	eax, cx
fdiv	st(1), st
fxch	st(1)
fstp	[esp+40h+arg_4]
fld	[esp+40h+arg_4]
mov	[esp+40h+arg_4], eax
fild	[esp+40h+arg_4]
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+40h+arg_4]
fld	[esp+40h+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7019C7
or	[esp+40h+var_2], 2
mov	[esp+40h+var_8], cx

loc_7019C7:
mov	cl, dl
shr	cl, 3
test	cl, 1
jz	short loc_701A05
mov	al, [esi+2Ah]
shr	al, 3
test	al, 1
jz	short loc_701A05
movzx	eax, word ptr [esi+26h]
cmp	[edi+26h], ax
jnz	short loc_701A05
movzx	eax, ax
cmp	eax, 10000h
ja	short loc_7019F6
mov	[esp+40h+var_6], ax
jmp	short loc_701A00

loc_7019F6:
mov	ecx, 0FFFFh
mov	[esp+40h+var_6], cx

loc_701A00:
or	[esp+40h+var_2], bx

loc_701A05:
shr	dl, 2
test	dl, 1
jz	short loc_701A45
mov	dl, [esi+2Ah]
shr	dl, 2
test	dl, 1
jz	short loc_701A45
mov	eax, [esi+8]
mov	ecx, [edi+8]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, ebx
push	ecx		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_701A45
mov	ecx, esi
call	sub_700520
push	eax
lea	ecx, [esp+44h+var_2C]
call	sub_700FE0

loc_701A45:
mov	ax, [edi+2Ah]
shr	ax, 0Bh
test	al, 1
jz	short loc_701A83
mov	cx, [esi+2Ah]
shr	cx, 0Bh
test	cl, 1
jz	short loc_701A83
mov	ecx, esi
call	sub_700F40
mov	ecx, edi
mov	ebx, eax
call	sub_700F40
cmp	eax, ebx
jnz	short loc_701A83
mov	ecx, esi
call	sub_700F40
push	eax
lea	ecx, [esp+44h+var_2C]
call	sub_7012C0

loc_701A83:
mov	edx, 100h
test	[edi+2Ah], dx
jz	short loc_701AE7
lea	ebx, [edi+10h]
mov	ecx, ebx
call	sub_679930
test	eax, eax
jz	short loc_701AE7
mov	eax, 100h
test	[esi+2Ah], ax
jz	short loc_701AE7
push	ebp
lea	ebp, [esi+10h]
mov	ecx, ebp
call	sub_679930
test	eax, eax
jz	short loc_701AE6
mov	eax, [ebp+0]
mov	ecx, [ebx]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_701AE6
push	ebp
lea	ecx, [esp+48h+var_1C]
call	sub_67A3D0
mov	ecx, 100h
or	[esp+44h+var_2], cx

loc_701AE6:
pop	ebp

loc_701AE7:
mov	dx, [edi+2Ah]
shr	dx, 9
test	dl, 1
jz	short loc_701B3F
mov	ax, [esi+2Ah]
shr	ax, 9
test	al, 1
jz	short loc_701B3F
mov	ecx, esi
call	sub_6FFD20
mov	ecx, edi
mov	ebx, eax
call	sub_6FFD20
cmp	eax, ebx
jnz	short loc_701B3F
mov	ecx, esi
call	sub_6FFD20
mov	esi, eax
test	esi, esi
jz	short loc_701B24
inc	dword ptr [esi+4]

loc_701B24:
mov	ecx, [esp+40h+var_14]
test	ecx, ecx
jz	short loc_701B31
call	sub_64A400

loc_701B31:
mov	ecx, 200h
or	[esp+40h+var_2], cx
mov	[esp+40h+var_14], esi

loc_701B3F:
mov	esi, [esp+40h+arg_0]
mov	edx, [esp+40h+var_20]
push	edx
lea	eax, [esp+44h+var_24]
mov	dword ptr [esi], offset	off_155F500
mov	edi, 1
push	eax
lea	ecx, [esi+8]
mov	[esi+4], edi
mov	dword ptr [esi], offset	off_1437650
mov	byte ptr [esp+48h+arg_4], 0
call	sub_67ACB0
mov	ecx, [esp+40h+var_20]
push	ecx
lea	edx, [esp+44h+var_1C]
push	edx
lea	ecx, [esi+10h]
mov	[esp+48h+var_31], 0
call	sub_67ACB0
mov	eax, [esp+40h+var_14]
pop	ebx
test	eax, eax
jz	short loc_701B95
add	[eax+4], edi
mov	eax, [esp+3Ch+var_14]

loc_701B95:
mov	[esi+18h], eax
mov	eax, [esp+3Ch+var_10]
test	eax, eax
jz	short loc_701BA6
add	[eax], edi
mov	eax, [esp+3Ch+var_10]

loc_701BA6:
movzx	ecx, [esp+3Ch+var_8]
mov	dx, [esp+3Ch+var_6]
mov	[esi+1Ch], eax
mov	eax, [esp+3Ch+var_C]
mov	[esi+24h], cx
movzx	ecx, [esp+3Ch+var_2]
mov	[esi+20h], eax
mov	al, [esp+3Ch+var_4]
mov	[esi+2Ah], cx
lea	ecx, [esp+3Ch+var_2C]
mov	[esi+26h], dx
mov	[esi+28h], al
call	sub_694380
pop	edi
mov	eax, esi
pop	esi
add	esp, 34h
retn	8
sub_701800 endp

align 10h



sub_701BF0 proc	near

var_8= dword ptr -8

push	esi
mov	esi, ecx
and	dword ptr [esi+20h], 0FF000000h
or	word ptr [esi+2Ah], 1
push	0FFFFFFFFh
push	offset aTimesNewRoman ;	"Times New Roman"
call	sub_7010A0
fld	ds:flt_15FCF38
push	ecx		; float
mov	ecx, esi
fstp	[esp+8+var_8]
call	sub_6D5760
mov	ax, [esi+2Ah]
shr	ax, 0Bh
test	al, 1
jz	short loc_701C35
test	byte ptr [esi+28h], 1
jz	short loc_701C35
mov	ecx, esi
call	sub_700FA0

loc_701C35:
or	word ptr [esi+2Ah], 10h
movzx	eax, word ptr [esi+2Ah]
and	byte ptr [esi+28h], 0FEh
mov	cl, [esi+28h]
shr	eax, 0Bh
test	al, 1
jz	short loc_701C58
test	cl, 2
jz	short loc_701C58
mov	ecx, esi
call	sub_700FA0

loc_701C58:
mov	dx, [esi+2Ah]
and	byte ptr [esi+28h], 0F1h
or	dword ptr [esi+20h], 0FF000000h
xor	ecx, ecx
mov	[esi+24h], cx
mov	eax, 0FBFDh
and	dx, ax
mov	ecx, 0E0h
or	dx, cx
lea	ecx, [esi+10h]
mov	[esi+2Ah], dx
call	sub_67A720
mov	edx, 0FEFFh
and	[esi+2Ah], dx
pop	esi
retn
sub_701BF0 endp

align 10h



sub_701CA0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_701CC2
call	sub_7005E0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_701CC2:
push	esi
cmp	eax, 8
jnb	short loc_701CCF
mov	esi, 8
jmp	short loc_701D34

loc_701CCF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_701CE2
fadd	ds:flt_15FCC08

loc_701CE2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_701D34:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_701D94
xor	eax, eax
jmp	short loc_701D80
align 10h

loc_701D80:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_701D80

loc_701D94:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_701E06
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_701DA7

loc_701DA3:
mov	edi, [esp+1Ch+var_C]

loc_701DA7:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_701DE5
mov	eax, [edi+8]
lea	esi, [edi+8]
push	eax
lea	ecx, [esp+20h+arg_0]
call	sub_700130
push	eax
mov	eax, [esp+20h+arg_0]
push	esi
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_700640
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_701DDF
call	sub_64A430

loc_701DDF:
mov	dword ptr [edi], 0FFFFFFFEh

loc_701DE5:
add	ebx, 0Ch
sub	ebp, 1
jnz	short loc_701DA3
mov	ecx, dword_1855FC0
mov	eax, [esp+1Ch+var_C]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_701E06:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[edi], eax
mov	[esp+18h+arg_4], 0
call	sub_7005E0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_701CA0 endp

align 10h



sub_701E30 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_701E52
call	sub_6915E0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_701E52:
push	esi
cmp	eax, 8
jnb	short loc_701E5F
mov	esi, 8
jmp	short loc_701EC4

loc_701E5F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_701E72
fadd	ds:flt_15FCC08

loc_701E72:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_701EC4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_701F24
xor	eax, eax
jmp	short loc_701F10
align 10h

loc_701F10:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_701F10

loc_701F24:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_701F96
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_701F37

loc_701F33:
mov	edi, [esp+1Ch+var_C]

loc_701F37:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_701F75
mov	eax, [edi+8]
lea	esi, [edi+8]
push	eax
lea	ecx, [esp+20h+arg_0]
call	sub_7003C0
mov	ecx, [esp+1Ch+arg_0]
push	eax
push	esi
push	ecx
lea	ecx, [esp+28h+arg_4]
call	sub_700740
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_701F6F
call	sub_64A400

loc_701F6F:
mov	dword ptr [edi], 0FFFFFFFEh

loc_701F75:
add	ebx, 0Ch
sub	ebp, 1
jnz	short loc_701F33
mov	ecx, dword_1855FC0
mov	eax, [esp+1Ch+var_C]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_701F96:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[edi], eax
mov	[esp+18h+arg_4], 0
call	sub_6915E0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_701E30 endp

align 10h



sub_701FC0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx], 0
jz	short loc_702012
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
test	esi, esi
jz	short loc_701FD9
inc	dword ptr [esi+4]

loc_701FD9:
push	esi
lea	ecx, [esp+14h+arg_0]
call	sub_7003C0
mov	edi, eax
mov	eax, [ebx]
and	edi, [eax+4]
test	esi, esi
jz	short loc_701FF5
mov	ecx, esi
call	sub_64A400

loc_701FF5:
push	edi
push	ebp
mov	ecx, ebx
call	sub_7008C0
pop	edi
pop	esi
pop	ebp
test	eax, eax
jl	short loc_702012
mov	edx, [ebx]
lea	ecx, [eax+eax*2]
lea	eax, [edx+ecx*4+10h]
pop	ebx
retn	4

loc_702012:
xor	eax, eax
pop	ebx
retn	4
sub_701FC0 endp

align 10h



sub_702020 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
test	eax, eax
jnz	short loc_702035
mov	eax, [esp+arg_0]
push	8
push	eax
call	sub_701CA0
retn	4

loc_702035:
mov	edx, [eax+4]
push	esi
lea	esi, ds:4[edx*4]
mov	edx, [eax]
lea	edx, [edx+edx*4]
cmp	edx, esi
pop	esi
jbe	short locret_70205C
mov	eax, [eax+4]
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_701CA0

locret_70205C:
retn	4
sub_702020 endp

align 10h



sub_702060 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
test	eax, eax
jnz	short loc_702075
mov	eax, [esp+arg_0]
push	8
push	eax
call	sub_701E30
retn	4

loc_702075:
mov	edx, [eax+4]
push	esi
lea	esi, ds:4[edx*4]
mov	edx, [eax]
lea	edx, [edx+edx*4]
cmp	edx, esi
pop	esi
jbe	short locret_70209C
mov	eax, [eax+4]
lea	edx, [eax+eax+2]
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_701E30

locret_70209C:
retn	4
sub_702060 endp

align 10h



sub_7020A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	[esp+10h+var_4], 0
test	eax, eax
jnz	short loc_7020BD
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_7020DF

loc_7020BD:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_7020E4
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_7020DF:
call	sub_701CA0

loc_7020E4:
mov	eax, [esi]
mov	ebp, [esp+10h+arg_8]
and	ebp, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [ebp+ebp*2+0]
lea	ebx, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[ebx], edx
jnz	short loc_702140
mov	eax, [esp+10h+arg_4]
mov	esi, [eax]
test	esi, esi
jz	short loc_702113
mov	ecx, esi
call	sub_64A420

loc_702113:
mov	dword ptr [ebx], 0FFFFFFFFh
test	esi, esi
jz	short loc_702124
mov	ecx, esi
call	sub_64A420

loc_702124:
mov	[ebx+8], esi
test	esi, esi
jz	loc_702218
mov	ecx, esi
call	sub_64A430
pop	esi
mov	[ebx+4], ebp
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_702140:
mov	ecx, [eax+4]
mov	esi, ebp
push	edi

loc_702146:
inc	esi
and	esi, ecx
lea	edi, [esi+esi*2]
cmp	[eax+edi*4+8], edx
jnz	short loc_702146
mov	edx, [ebx+4]
lea	ecx, [esi+esi*2]
lea	ecx, [eax+ecx*4+8]
cmp	edx, ebp
jnz	short loc_7021AD
test	ecx, ecx
jz	short loc_70216A
push	ebx
call	sub_699110

loc_70216A:
mov	edx, [esp+14h+arg_4]
mov	edi, [edx]
test	edi, edi
jz	short loc_702186
mov	ecx, edi
call	sub_64A420
test	edi, edi
jz	short loc_702186
mov	ecx, edi
call	sub_64A420

loc_702186:
mov	ecx, [ebx+8]
test	ecx, ecx
jz	short loc_702192
call	sub_64A430

loc_702192:
mov	[ebx+8], edi
test	edi, edi
jz	short loc_7021A0
mov	ecx, edi
call	sub_64A430

loc_7021A0:
pop	edi
mov	[ebx], esi
pop	esi
mov	[ebx+4], ebp
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_7021AD:
lea	edx, [edx+edx*2]
cmp	[eax+edx*4+8], ebp
lea	edi, [eax+edx*4+8]
jz	short loc_7021CF
lea	ebx, [ebx+0]

loc_7021C0:
mov	edi, [edi]
lea	edx, [edi+edi*2]
cmp	[eax+edx*4+8], ebp
lea	edi, [eax+edx*4+8]
jnz	short loc_7021C0

loc_7021CF:
test	ecx, ecx
jz	short loc_7021D9
push	ebx
call	sub_699110

loc_7021D9:
mov	eax, [esp+14h+arg_4]
mov	[edi], esi
mov	esi, [eax]
test	esi, esi
jz	short loc_7021F7
mov	ecx, esi
call	sub_64A420
test	esi, esi
jz	short loc_7021F7
mov	ecx, esi
call	sub_64A420

loc_7021F7:
mov	ecx, [ebx+8]
test	ecx, ecx
jz	short loc_702203
call	sub_64A430

loc_702203:
mov	[ebx+8], esi
test	esi, esi
jz	short loc_702211
mov	ecx, esi
call	sub_64A430

loc_702211:
mov	dword ptr [ebx], 0FFFFFFFFh
pop	edi

loc_702218:
pop	esi
mov	[ebx+4], ebp
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_7020A0 endp

align 10h



sub_702230 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	[esp+10h+var_4], 0
test	eax, eax
jnz	short loc_70224D
mov	eax, [esp+10h+arg_0]
push	8
push	eax
jmp	short loc_70226F

loc_70224D:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_702274
mov	edx, [eax+4]
mov	ecx, [esp+10h+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_70226F:
call	sub_701E30

loc_702274:
mov	eax, [esi]
mov	ebx, [esp+10h+arg_8]
and	ebx, [eax+4]
mov	edx, 1
add	[eax], edx
mov	eax, [esi]
lea	ecx, [ebx+ebx*2]
mov	ebp, [eax+ecx*4+8]
lea	esi, [eax+ecx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_7022CA
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7022A3
add	[ecx+4], edx

loc_7022A3:
mov	dword ptr [esi], 0FFFFFFFFh
test	ecx, ecx
jz	short loc_7022B0
add	[ecx+4], edx

loc_7022B0:
mov	[esi+8], ecx
test	ecx, ecx
jz	loc_7023B2
call	sub_64A400
mov	[esi+4], ebx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_7022CA:
mov	ecx, [eax+4]
push	edi
mov	edi, ebx

loc_7022D0:
inc	edi
and	edi, ecx
lea	edx, [edi+edi*2]
cmp	dword ptr [eax+edx*4+8], 0FFFFFFFEh
jnz	short loc_7022D0
lea	ecx, [edi+edi*2]
lea	edx, [eax+ecx*4+8]
mov	ecx, [esi+4]
cmp	ecx, ebx
jnz	short loc_702342
test	edx, edx
jz	short loc_702307
mov	[edx], ebp
mov	eax, [esi+4]
mov	[edx+4], eax
mov	eax, [esi+8]
test	eax, eax
jz	short loc_702301
inc	dword ptr [eax+4]

loc_702301:
mov	ecx, [esi+8]
mov	[edx+8], ecx

loc_702307:
mov	edx, [esp+14h+arg_4]
mov	ebp, [edx]
test	ebp, ebp
jz	short loc_70231B
inc	dword ptr [ebp+4]
test	ebp, ebp
jz	short loc_70231B
inc	dword ptr [ebp+4]

loc_70231B:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_702327
call	sub_64A400

loc_702327:
mov	[esi+8], ebp
test	ebp, ebp
jz	short loc_702335
mov	ecx, ebp
call	sub_64A400

loc_702335:
mov	[esi], edi
pop	edi
mov	[esi+4], ebx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch

loc_702342:
lea	ecx, [ecx+ecx*2]
cmp	[eax+ecx*4+8], ebx
lea	ecx, [eax+ecx*4+8]
jz	short loc_70235F
nop

loc_702350:
mov	ecx, [ecx]
lea	ecx, [ecx+ecx*2]
cmp	[eax+ecx*4+8], ebx
lea	ecx, [eax+ecx*4+8]
jnz	short loc_702350

loc_70235F:
test	edx, edx
jz	short loc_70237B
mov	[edx], ebp
mov	eax, [esi+4]
mov	[edx+4], eax
mov	eax, [esi+8]
test	eax, eax
jz	short loc_702375
inc	dword ptr [eax+4]

loc_702375:
mov	eax, [esi+8]
mov	[edx+8], eax

loc_70237B:
mov	[ecx], edi
mov	ecx, [esp+14h+arg_4]
mov	edi, [ecx]
test	edi, edi
jz	short loc_702391
inc	dword ptr [edi+4]
test	edi, edi
jz	short loc_702391
inc	dword ptr [edi+4]

loc_702391:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_70239D
call	sub_64A400

loc_70239D:
mov	[esi+8], edi
test	edi, edi
jz	short loc_7023AB
mov	ecx, edi
call	sub_64A400

loc_7023AB:
mov	dword ptr [esi], 0FFFFFFFFh
pop	edi

loc_7023B2:
mov	[esi+4], ebx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_702230 endp

align 10h



sub_7023C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	esi, [edi]
mov	ebx, ecx
test	esi, esi
jz	short loc_7023D7
mov	ecx, esi
call	sub_64A420

loc_7023D7:
push	esi
lea	ecx, [esp+14h+arg_4]
call	sub_700130
mov	ebp, eax
test	esi, esi
jz	short loc_7023EE
mov	ecx, esi
call	sub_64A430

loc_7023EE:
mov	eax, [ebx]
test	eax, eax
jz	short loc_702448
mov	eax, [eax+4]
and	eax, ebp
push	eax
push	edi
mov	ecx, ebx
call	sub_700860
mov	esi, eax
test	esi, esi
jl	short loc_702448
mov	edi, [edi]
test	edi, edi
jz	short loc_702415
mov	ecx, edi
call	sub_64A420

loc_702415:
mov	edx, [ebx]
lea	ecx, [esi+esi*2]
lea	esi, [edx+ecx*4+10h]
test	edi, edi
jz	short loc_702429
mov	ecx, edi
call	sub_64A420

loc_702429:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_702434
call	sub_64A430

loc_702434:
mov	[esi], edi
test	edi, edi
jz	short loc_702456
mov	ecx, edi
call	sub_64A430
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_702448:
mov	eax, [esp+10h+arg_0]
push	ebp
push	edi
push	eax
mov	ecx, ebx
call	sub_7020A0

loc_702456:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_7023C0 endp

align 10h



sub_702460 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_4]
push	ebp
push	esi
mov	esi, [ebx]
push	edi
mov	edi, ecx
test	esi, esi
jz	short loc_702474
inc	dword ptr [esi+4]

loc_702474:
push	esi
lea	ecx, [esp+18h+var_1]
mov	byte ptr [esp+18h+arg_4], 0
call	sub_7003C0
mov	ebp, eax
test	esi, esi
jz	short loc_702490
mov	ecx, esi
call	sub_64A400

loc_702490:
mov	eax, [edi]
test	eax, eax
jz	short loc_7024E1
mov	eax, [eax+4]
and	eax, ebp
push	eax
push	ebx
mov	ecx, edi
call	sub_7008C0
test	eax, eax
jl	short loc_7024E1
mov	esi, [ebx]
test	esi, esi
jz	short loc_7024B1
inc	dword ptr [esi+4]

loc_7024B1:
mov	edx, [edi]
lea	ecx, [eax+eax*2]
lea	edi, [edx+ecx*4+10h]
test	esi, esi
jz	short loc_7024C1
inc	dword ptr [esi+4]

loc_7024C1:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7024CC
call	sub_64A400

loc_7024CC:
mov	[edi], esi
test	esi, esi
jz	short loc_7024EF
mov	ecx, esi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_7024E1:
mov	eax, [esp+14h+arg_0]
push	ebp
push	ebx
push	eax
mov	ecx, edi
call	sub_702230

loc_7024EF:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_702460 endp

align 10h



sub_702500 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 4

sub	esp, 0Ch
push	ebx
push	esi
mov	ebx, ecx
mov	eax, [ebx+8]
push	edi
lea	edi, [ebx+8]
xor	esi, esi
cmp	eax, esi
jnz	short loc_70251A
mov	[esp+18h+var_C], esi
jmp	short loc_702520

loc_70251A:
mov	eax, [eax]
mov	[esp+18h+var_C], eax

loc_702520:
mov	ecx, [edi]
xor	eax, eax
cmp	ecx, esi
jz	short loc_70253F
mov	edx, [ecx+4]
add	ecx, 8
mov	edi, edi

loc_702530:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_70253D
inc	eax
add	ecx, 0Ch
cmp	eax, edx
jbe	short loc_702530

loc_70253D:
mov	esi, edi

loc_70253F:
mov	[esp+18h+var_4], eax
mov	[esp+18h+var_8], esi
push	ebp

loc_702548:
test	esi, esi
jz	short loc_7025A4
cmp	dword ptr [esi], 0
jz	short loc_7025A4
mov	ecx, [esi]
cmp	eax, [ecx+4]
jg	short loc_7025A4
lea	edx, [eax+eax*2]
mov	ecx, [ecx+edx*4+10h]
mov	eax, [ecx+4]
cmp	eax, 1
jnz	short loc_702570
lea	ecx, [esp+1Ch+var_8]
call	sub_700CB0

loc_702570:
mov	esi, [esp+1Ch+var_8]
mov	edx, [esi]
mov	ecx, [edx+4]
mov	eax, [esp+1Ch+var_4]
cmp	eax, ecx
jg	short loc_702548
inc	eax
mov	[esp+1Ch+var_4], eax
cmp	eax, ecx
ja	short loc_702548
lea	ebp, [eax+eax*2]
lea	edx, [edx+ebp*4+8]

loc_702591:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_702548
inc	eax
add	edx, 0Ch
mov	[esp+1Ch+var_4], eax
cmp	eax, ecx
jbe	short loc_702591
jmp	short loc_702548

loc_7025A4:
cmp	[esp+1Ch+arg_0], 0
pop	ebp
jnz	short loc_7025CF
mov	eax, [edi]
test	eax, eax
jz	short loc_7025B4
mov	eax, [eax]

loc_7025B4:
mov	ecx, [edi]
lea	eax, [eax+eax*4]
shr	eax, 2
test	ecx, ecx
jz	short loc_7025C2
mov	ecx, [ecx]

loc_7025C2:
cmp	eax, ecx
jbe	short loc_7025CF
push	eax
push	edi
mov	ecx, edi
call	sub_701CA0

loc_7025CF:
mov	eax, [edi]
test	eax, eax
jz	short loc_7025D7
mov	eax, [eax]

loc_7025D7:
cmp	eax, [ebx+10h]
mov	eax, [edi]
jb	short loc_7025F6
test	eax, eax
jnz	short loc_7025EC
mov	eax, 0Ah
mov	[ebx+10h], eax
jmp	short loc_702606

loc_7025EC:
mov	eax, [eax]
add	eax, 0Ah
mov	[ebx+10h], eax
jmp	short loc_702606

loc_7025F6:
test	eax, eax
jz	short loc_7025FF
cmp	dword ptr [eax], 64h
ja	short loc_702606

loc_7025FF:
mov	dword ptr [ebx+10h], 64h

loc_702606:
mov	eax, [edi]
pop	edi
pop	esi
pop	ebx
test	eax, eax
jnz	short loc_70261F
xor	ecx, ecx
cmp	[esp+0Ch+var_C], eax
setnz	cl
mov	al, cl
add	esp, 0Ch
retn	4

loc_70261F:
mov	eax, [eax]
xor	ecx, ecx
cmp	[esp+0Ch+var_C], eax
setnz	cl
mov	al, cl
add	esp, 0Ch
retn	4
sub_702500 endp

align 10h



sub_702640 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 4

sub	esp, 0Ch
push	ebx
push	esi
mov	ebx, ecx
mov	eax, [ebx+0Ch]
push	edi
lea	edi, [ebx+0Ch]
xor	esi, esi
cmp	eax, esi
jnz	short loc_70265A
mov	[esp+18h+var_C], esi
jmp	short loc_702660

loc_70265A:
mov	eax, [eax]
mov	[esp+18h+var_C], eax

loc_702660:
mov	ecx, [edi]
xor	eax, eax
cmp	ecx, esi
jz	short loc_70267F
mov	edx, [ecx+4]
add	ecx, 8
mov	edi, edi

loc_702670:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_70267D
inc	eax
add	ecx, 0Ch
cmp	eax, edx
jbe	short loc_702670

loc_70267D:
mov	esi, edi

loc_70267F:
mov	[esp+18h+var_4], eax
mov	[esp+18h+var_8], esi
push	ebp

loc_702688:
test	esi, esi
jz	short loc_7026E4
cmp	dword ptr [esi], 0
jz	short loc_7026E4
mov	ecx, [esi]
cmp	eax, [ecx+4]
jg	short loc_7026E4
lea	edx, [eax+eax*2]
mov	ecx, [ecx+edx*4+10h]
mov	eax, [ecx+4]
cmp	eax, 1
jnz	short loc_7026B0
lea	ecx, [esp+1Ch+var_8]
call	sub_700DA0

loc_7026B0:
mov	esi, [esp+1Ch+var_8]
mov	edx, [esi]
mov	ecx, [edx+4]
mov	eax, [esp+1Ch+var_4]
cmp	eax, ecx
jg	short loc_702688
inc	eax
mov	[esp+1Ch+var_4], eax
cmp	eax, ecx
ja	short loc_702688
lea	ebp, [eax+eax*2]
lea	edx, [edx+ebp*4+8]

loc_7026D1:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_702688
inc	eax
add	edx, 0Ch
mov	[esp+1Ch+var_4], eax
cmp	eax, ecx
jbe	short loc_7026D1
jmp	short loc_702688

loc_7026E4:
cmp	[esp+1Ch+arg_0], 0
pop	ebp
jnz	short loc_70270F
mov	eax, [edi]
test	eax, eax
jz	short loc_7026F4
mov	eax, [eax]

loc_7026F4:
mov	ecx, [edi]
lea	eax, [eax+eax*4]
shr	eax, 2
test	ecx, ecx
jz	short loc_702702
mov	ecx, [ecx]

loc_702702:
cmp	eax, ecx
jbe	short loc_70270F
push	eax
push	edi
mov	ecx, edi
call	sub_701E30

loc_70270F:
mov	eax, [edi]
test	eax, eax
jz	short loc_702717
mov	eax, [eax]

loc_702717:
cmp	eax, [ebx+14h]
mov	eax, [edi]
jb	short loc_702736
test	eax, eax
jnz	short loc_70272C
mov	eax, 0Ah
mov	[ebx+14h], eax
jmp	short loc_702746

loc_70272C:
mov	eax, [eax]
add	eax, 0Ah
mov	[ebx+14h], eax
jmp	short loc_702746

loc_702736:
test	eax, eax
jz	short loc_70273F
cmp	dword ptr [eax], 64h
ja	short loc_702746

loc_70273F:
mov	dword ptr [ebx+14h], 64h

loc_702746:
mov	eax, [edi]
pop	edi
pop	esi
pop	ebx
test	eax, eax
jnz	short loc_70275F
xor	ecx, ecx
cmp	[esp+0Ch+var_C], eax
setnz	cl
mov	al, cl
add	esp, 0Ch
retn	4

loc_70275F:
mov	eax, [eax]
xor	ecx, ecx
cmp	[esp+0Ch+var_C], eax
setnz	cl
mov	al, cl
add	esp, 0Ch
retn	4
sub_702640 endp

align 10h



sub_702780 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	ax, [ebx+2Ah]
push	ebp
shr	ax, 9
push	esi
push	edi
mov	ebp, ecx
test	al, 1
jnz	short loc_702806
cmp	dword ptr [ebp+8], 0
lea	esi, [ebp+8]
mov	[esp+10h+arg_0], ebx
jz	short loc_7027F0
mov	ecx, ebx
call	sub_64A420
push	ebx
lea	ecx, [esp+14h+arg_0]
call	sub_700130
mov	ecx, [esi]
mov	edi, [ecx+4]
mov	ecx, ebx
and	edi, eax
call	sub_64A430
push	edi
lea	edx, [esp+14h+arg_0]
push	edx
mov	ecx, esi
call	sub_700860
test	eax, eax
jl	short loc_7027F0
mov	ecx, [esi]
lea	eax, [eax+eax*2]
lea	edi, [ecx+eax*4+10h]
test	edi, edi
jz	short loc_7027F0
mov	ecx, [edi]
call	sub_64A420
mov	eax, [edi]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_7027F0:
mov	esi, [esi]
test	esi, esi
jz	short loc_7027F8
mov	esi, [esi]

loc_7027F8:
cmp	esi, [ebp+10h]
jb	short loc_702806
push	0
mov	ecx, ebp
call	sub_702500

loc_702806:
mov	ecx, [ebp+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	2Ch
call	eax
test	eax, eax
jz	short loc_702828
mov	ecx, [ebp+1Ch]
push	ecx
push	ebx
mov	ecx, eax
call	sub_700E90
mov	esi, eax
jmp	short loc_70282A

loc_702828:
xor	esi, esi

loc_70282A:
test	byte ptr [ebp+4Ch], 1
mov	[esp+10h+arg_0], esi
jz	short loc_702848
mov	dx, [esi+2Ah]
shr	dx, 0Bh
test	dl, 1
jz	short loc_702848
mov	ecx, esi
call	sub_700FA0

loc_702848:
mov	ax, [ebx+2Ah]
shr	ax, 9
test	al, 1
jnz	short loc_702862
lea	edx, [esp+10h+arg_0]
lea	ecx, [ebp+8]
push	edx
push	ecx
call	sub_7023C0

loc_702862:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_702780 endp

align 10h



sub_702870 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	esi
mov	esi, ecx
push	edi
lea	eax, [esp+10h+var_4]
lea	edi, [esi+0Ch]
push	eax
mov	ecx, edi
mov	[esp+14h+var_4], ebx
call	sub_701FC0
test	eax, eax
jz	short loc_70289F
mov	ecx, [eax]
inc	dword ptr [ecx+4]
mov	eax, [eax]
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4

loc_70289F:
mov	eax, [edi]
test	eax, eax
jz	short loc_7028A7
mov	eax, [eax]

loc_7028A7:
cmp	eax, [esi+14h]
jb	short loc_7028B5
push	0
mov	ecx, esi
call	sub_702640

loc_7028B5:
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	18h
call	eax
test	eax, eax
jz	short loc_7028D3
push	ebx
mov	ecx, eax
call	sub_7004B0
mov	esi, eax
jmp	short loc_7028D5

loc_7028D3:
xor	esi, esi

loc_7028D5:
lea	ecx, [esp+10h+arg_0]
push	ecx
push	edi
mov	ecx, edi
mov	[esp+18h+arg_0], esi
call	sub_702460
pop	edi
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_702870 endp

align 10h



sub_7028F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_70292E
cmp	byte ptr [eax],	0
jz	short loc_70292E
lea	eax, [esp+arg_0]
push	eax
call	sub_67B600
cmp	eax, 2Fh
jz	short loc_70292E
cmp	eax, 5Ch
jz	short loc_70292E
test	eax, eax
jz	short loc_702949

loc_702915:
cmp	eax, 3Ah
jnz	short loc_702931
lea	ecx, [esp+arg_0]
push	ecx
call	sub_67B600
cmp	eax, 2Fh
jz	short loc_70292E
cmp	eax, 5Ch
jnz	short loc_70293B

loc_70292E:
mov	al, 1
retn

loc_702931:
cmp	eax, 2Fh
jz	short loc_702949
cmp	eax, 5Ch
jz	short loc_702949

loc_70293B:
lea	edx, [esp+arg_0]
push	edx
call	sub_67B600
test	eax, eax
jnz	short loc_702915

loc_702949:
xor	al, al
retn
sub_7028F0 endp

align 10h



sub_702950 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+4]
mov	dword ptr [esi], offset	off_143F210
test	ecx, ecx
jz	short loc_702965
call	sub_64A430

loc_702965:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_702971
call	sub_64A430

loc_702971:
mov	dword ptr [esi], offset	off_1437474
pop	esi
retn
sub_702950 endp

align 10h



sub_702980 proc	near

arg_0= dword ptr  4

cmp	dword ptr [ecx+4], 0
jz	short loc_70299E
mov	ecx, [esp+arg_0]
lea	eax, [esp+arg_0]
push	eax
push	ecx
call	sub_67DAC0
add	esp, 8
movzx	eax, al
retn	4

loc_70299E:
xor	eax, eax
retn	4
sub_702980 endp

align 10h



sub_7029B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_0]
test	edx, edx
jz	short loc_7029F6
cmp	byte ptr [edx],	0
jz	short loc_7029F6
push	esi
mov	esi, [esp+4+arg_4]
test	esi, esi
jnz	short loc_7029CC
xor	al, al
pop	esi
retn	10h

loc_7029CC:
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_7029F0
mov	ecx, [ecx+0Ch]
or	ecx, [esp+4+arg_C]
push	ecx
mov	ecx, [esp+8+arg_8]
push	ecx
push	esi
push	edx
mov	ecx, eax
call	sub_7058E0
movzx	eax, al
pop	esi
retn	10h

loc_7029F0:
xor	eax, eax
pop	esi
retn	10h

loc_7029F6:
xor	al, al
retn	10h
sub_7029B0 endp

align 10h



sub_702A00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_0]
test	edx, edx
jz	short loc_702A2E
cmp	byte ptr [edx],	0
jz	short loc_702A2E
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_702A2E
mov	ecx, [ecx+0Ch]
or	ecx, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_8]
push	esi
push	ecx
push	edx
mov	ecx, eax
call	sub_704EB0
pop	esi
retn	0Ch

loc_702A2E:
xor	eax, eax
retn	0Ch
sub_702A00 endp

align 10h



sub_702A40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_702A5F
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
lea	ecx, [eax-0Ch]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	12h
call	eax
retn

loc_702A5F:
lea	edx, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
xor	ecx, ecx
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	12h
call	eax
retn
sub_702A40 endp

align 10h



sub_702A80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
mov	esi, [esp+8+arg_4]
mov	eax, [esi+4]
lea	ebp, [esi+4]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
call	sub_7028F0
add	esp, 4
test	al, al
jz	short loc_702AAC
mov	ecx, [esp+8+arg_0]
push	ebp
call	sub_67A3D0
pop	esi
pop	ebp
retn

loc_702AAC:
mov	eax, [esi+8]
add	esi, 8
and	eax, 0FFFFFFFCh
push	edi
mov	edi, [eax]
and	edi, 7FFFFFFFh
jbe	short loc_702AFC
push	ebx
mov	ebx, [esp+10h+arg_0]
push	esi
mov	ecx, ebx
call	sub_67A3D0
mov	ecx, [esi]
and	ecx, 0FFFFFFFCh
movsx	eax, byte ptr [ecx+edi+7]
cmp	eax, 5Ch
jz	short loc_702AEF
cmp	eax, 2Fh
jz	short loc_702AEF
push	0FFFFFFFFh
push	offset byte_1545BB0
mov	ecx, ebx
call	sub_67A0C0

loc_702AEF:
push	ebp
mov	ecx, ebx
call	sub_67A540
pop	ebx
pop	edi
pop	esi
pop	ebp
retn

loc_702AFC:
mov	ecx, [esp+0Ch+arg_0]
push	ebp
call	sub_67A3D0
pop	edi
pop	esi
pop	ebp
retn
sub_702A80 endp

align 10h



sub_702B10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ecx, edi
call	sub_679930
mov	esi, eax
sub	esi, 1
js	short loc_702B87

loc_702B25:
push	esi
mov	ecx, edi
call	sub_679970
cmp	eax, 2Fh
jz	short loc_702B47
cmp	eax, 5Ch
jz	short loc_702B47
sub	esi, 1
jns	short loc_702B25
xor	eax, eax
test	esi, esi
pop	edi
setnl	al
pop	esi
pop	ecx
retn

loc_702B47:
lea	eax, [esi+1]
push	eax
push	0
lea	ecx, [esp+14h+var_4]
push	ecx
mov	ecx, edi
call	sub_67B0C0
push	eax
mov	ecx, edi
call	sub_67A3D0
mov	edi, [esp+0Ch+var_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_702B87
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_702B87:
xor	eax, eax
test	esi, esi
pop	edi
setnl	al
pop	esi
pop	ecx
retn
sub_702B10 endp

align 10h



sub_702BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+4]
push	edi
mov	ecx, esi
xor	edi, edi
call	edx
mov	ecx, [esp+8+arg_4]
add	ecx, 0FFFFFFF6h	; switch 5 cases
cmp	ecx, 4
ja	loc_702C69	; default
			; jumptable 00702BC1 case 12
jmp	ds:off_702C88[ecx*4] ; switch jump

loc_702BC8:		; jumptable 00702BC1 case 13
mov	eax, [esp+8+arg_18]
xor	ecx, ecx
cmp	[esp+8+arg_8], 3
push	eax
setnz	cl
dec	ecx
and	ecx, 9
push	ecx
push	esi
call	sub_73D730
mov	edi, eax
pop	edi
pop	esi
retn

loc_702BE7:		; jumptable 00702BC1 case 14
mov	edx, [esp+8+arg_18]
push	edx
push	esi
call	sub_73DE20
mov	edi, eax
pop	edi
pop	esi
retn

loc_702BF7:		; jumptable 00702BC1 case 10
mov	ecx, [esp+8+arg_10]
test	ecx, ecx
jnz	short loc_702C1E
mov	ecx, [esp+8+arg_C]
test	ecx, ecx
jz	short loc_702C83
push	eax
add	ecx, 0Ch
push	offset aUnableToLoadJp ; "Unable to load JPEG at URL \"%s\" - libjp"...
push	ecx
call	sub_702A40
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	esi
retn

loc_702C1E:
mov	edx, [esp+8+arg_18]
mov	eax, [ecx]
mov	eax, [eax+8]
push	edx
push	esi
call	eax
mov	edi, eax
pop	edi
pop	esi
retn

loc_702C30:		; jumptable 00702BC1 case 11
mov	ecx, [esp+8+arg_14]
test	ecx, ecx
jnz	short loc_702C57
mov	ecx, [esp+8+arg_C]
test	ecx, ecx
jz	short loc_702C83
push	eax
add	ecx, 0Ch
push	offset aUnableToLoadPn ; "Unable to load PNG at	URL \"%s\" - GFxPNG"...
push	ecx
call	sub_702A40
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	esi
retn

loc_702C57:
mov	eax, [esp+8+arg_18]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	esi
call	edx
mov	edi, eax
pop	edi
pop	esi
retn

loc_702C69:		; default
mov	ecx, [esp+8+arg_C] ; jumptable 00702BC1	case 12
test	ecx, ecx
jz	short loc_702C83
push	eax
add	ecx, 0Ch
push	offset aDefaultImageLo ; "Default image	loader failed to load '%s"...
push	ecx
call	sub_702A40
add	esp, 0Ch

loc_702C83:
mov	eax, edi
pop	edi
pop	esi
retn
sub_702BA0 endp

off_702C88 dd offset loc_702BF7	; jump table for switch	statement
dd offset loc_702C30
dd offset loc_702C69
dd offset loc_702BC8
dd offset loc_702BE7
align 10h



; int __thiscall sub_702CA0(void *, char)
sub_702CA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+4]
mov	dword ptr [esi], offset	off_143F210
test	ecx, ecx
jz	short loc_702CB5
call	sub_64A430

loc_702CB5:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_702CC1
call	sub_64A430

loc_702CC1:
test	[esp+4+arg_0], 1
mov	dword ptr [esi], offset	off_1437474
jz	short loc_702CD7
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_702CD7:
mov	eax, esi
pop	esi
retn	4
sub_702CA0 endp

align 10h



sub_702CE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 0
jz	short loc_702D2A
push	edi
mov	edi, [esp+8+arg_0]
test	edi, edi
jz	short loc_702CF9
mov	ecx, edi
call	sub_64A420

loc_702CF9:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_702D05
call	sub_64A430

loc_702D05:
mov	[esi+8], edi
mov	esi, [esi+4]
mov	edi, [edi+8]
add	esi, 18h
test	edi, edi
jz	short loc_702D1C
mov	ecx, edi
call	sub_64A420

loc_702D1C:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_702D27
call	sub_64A430

loc_702D27:
mov	[esi], edi
pop	edi

loc_702D2A:
pop	esi
retn	4
sub_702CE0 endp

align 10h



sub_702D30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_702D53
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_702D53:
mov	eax, esi
pop	esi
retn	4
sub_702D30 endp

align 10h



sub_702D60 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	ebp
push	esi
mov	esi, ecx
mov	ecx, eax
shr	ecx, 1Ch
and	cl, 1
push	edi
mov	[esi+0Ch], eax
mov	byte ptr [esp+10h+arg_0], cl
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
xor	edi, edi
push	edi
push	14h
call	eax
mov	ebp, [esp+10h+arg_0]
cmp	eax, edi
jz	short loc_702D9F
push	ebp
mov	ecx, eax
call	sub_667400
jmp	short loc_702DA1

loc_702D9F:
xor	eax, eax

loc_702DA1:
mov	[esi+8], eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	40h
call	eax
cmp	eax, edi
jz	short loc_702DC6
mov	ecx, [esi+8]
push	ebp
push	ecx
mov	ecx, eax
call	sub_705650
jmp	short loc_702DC8

loc_702DC6:
xor	eax, eax

loc_702DC8:
mov	[esi+4], eax
cmp	eax, edi
jz	loc_702E84
mov	eax, [ebx+4]
mov	edx, [esi]
mov	edx, [edx+8]
push	eax
push	0Ah
mov	ecx, esi
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	10h
call	edx
cmp	eax, edi
jz	short loc_702E15
mov	dword ptr [eax], offset	off_155F500
mov	[eax+0Ch], edi
mov	dword ptr [eax+4], 1
mov	dword ptr [eax+8], 0Dh
mov	dword ptr [eax], offset	off_143F2C4
mov	edi, eax

loc_702E15:
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
push	0Dh
mov	ecx, esi
call	edx
test	edi, edi
jz	short loc_702E2C
mov	ecx, edi
call	sub_64A430

loc_702E2C:
mov	ecx, [ebx+8]
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	1Eh
mov	ecx, esi
call	edx
mov	ecx, [ebx+0Ch]
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	1Dh
mov	ecx, esi
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1Ch
call	edx
test	eax, eax
jz	short loc_702E6B
push	ebp
mov	ecx, eax
call	sub_7063D0
mov	edi, eax
jmp	short loc_702E6D

loc_702E6B:
xor	edi, edi

loc_702E6D:
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
push	10h
mov	ecx, esi
call	edx
test	edi, edi
jz	short loc_702E84
mov	ecx, edi
call	sub_64A430

loc_702E84:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_702D60 endp

align 10h



sub_702E90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
mov	[esp+14h+var_4], ecx
mov	ecx, [esi+28h]
push	edi
test	ecx, ecx
jz	short loc_702EAC
mov	[esp+18h+arg_0], ecx
jmp	short loc_702EB7

loc_702EAC:
mov	eax, dword_1855FC0
mov	[esp+18h+arg_0], eax
mov	ecx, eax

loc_702EB7:
mov	eax, [esi]
sub	eax, 1
jz	loc_702F88
sub	eax, 1
jz	short loc_702EEF
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	24h
call	eax
test	eax, eax
jz	loc_7030DB
push	0
push	0
mov	ecx, eax
call	sub_741050
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4

loc_702EEF:
mov	ecx, [esi+10h]
mov	eax, [ecx+10h]
mov	ecx, [esi+14h]
mov	edx, [ecx]
and	eax, 0FFFFFFFCh
push	1B6h
add	eax, 8
push	21h
push	eax
mov	eax, [edx+4]
call	eax
mov	ebx, eax
mov	[esp+18h+var_8], ebx
test	ebx, ebx
jz	loc_7030DB
mov	ecx, [esi+28h]
mov	edx, [esi+24h]
mov	eax, [esi+20h]
push	ecx
mov	ecx, [esi+1Ch]
push	edx
mov	edx, [esi+4]
push	eax
mov	eax, [esi+10h]
push	ecx
mov	ecx, [eax+8]
push	edx
push	ecx
push	ebx
call	sub_702BA0
mov	edi, eax
add	esp, 1Ch
test	edi, edi
jnz	short loc_702F58
mov	ecx, ebx
call	sub_64A430
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 8
retn	4

loc_702F58:
mov	ecx, [esi+10h]
movzx	eax, word ptr [ecx+14h]
movzx	ebp, ax
test	ax, ax
jnz	short loc_702F6A
mov	ebp, [edi+10h]

loc_702F6A:
movzx	eax, word ptr [ecx+16h]
movzx	ebx, ax
test	ax, ax
jnz	short loc_702F79
mov	ebx, [edi+14h]

loc_702F79:
mov	ecx, [esp+18h+var_8]
call	sub_64A430
mov	ecx, [esp+18h+arg_0]
jmp	short loc_702F9A

loc_702F88:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_702F92
inc	dword ptr [eax+4]

loc_702F92:
mov	ebp, [eax+10h]
mov	ebx, [eax+14h]
mov	edi, eax

loc_702F9A:
mov	edx, [esp+18h+var_4]
cmp	byte ptr [edx+0Ch], 0
jz	short loc_702FE9

loc_702FA4:
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	24h
call	edx
test	eax, eax
jz	short loc_702FD4
push	0
push	ebx
push	ebp
push	edi
mov	ecx, eax
call	sub_7410B0
mov	ecx, edi
mov	esi, eax
call	sub_64A400
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4

loc_702FD4:
mov	ecx, edi
xor	esi, esi
call	sub_64A400
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4

loc_702FE9:
mov	eax, [esi+18h]
test	eax, eax
jz	loc_7030D4
mov	edx, [eax+0Ch]
test	edx, edx
jz	loc_7030D4
mov	eax, [eax+1Ch]
test	eax, 10000h
jnz	short loc_702FA4
cmp	byte ptr [esi+2Ch], 0
jz	short loc_703046
test	eax, 100000h
jnz	short loc_703046
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	24h
call	edx
test	eax, eax
jz	short loc_702FD4
push	1
push	ebx
push	ebp
push	edi
mov	ecx, eax
call	sub_7410B0
mov	ecx, edi
mov	esi, eax
call	sub_64A400
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4

loc_703046:
mov	eax, [edx]
mov	ecx, edx
mov	edx, [eax+8]
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_7030D4
mov	edx, [esi]
lea	eax, [edi+0Ch]
push	1
push	eax
mov	eax, [edx+4]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_7030B9
mov	ecx, [esp+18h+arg_0]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	24h
call	eax
test	eax, eax
jz	short loc_703089
push	ebx
push	ebp
push	esi
mov	ecx, eax
call	sub_741110
mov	ebx, eax
jmp	short loc_70308B

loc_703089:
xor	ebx, ebx

loc_70308B:		; Value
push	0FFFFFFFFh
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7030A6
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_7030A6:
mov	ecx, edi
call	sub_64A400
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 8
retn	4

loc_7030B9:		; Value
push	0FFFFFFFFh
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7030D4
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_7030D4:
mov	ecx, edi
call	sub_64A400

loc_7030DB:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 8
retn	4
sub_702E90 endp

align 10h



sub_7030F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
mov	ebx, ecx
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	dword ptr [ebx], offset	off_143F210
mov	ecx, [esi]
mov	[esp+1Ch+var_10], 0
test	ecx, ecx
jz	short loc_703115
call	sub_64A420

loc_703115:
mov	ebp, [esi]
mov	esi, [esp+1Ch+arg_4]
mov	ecx, [esi]
mov	[esp+1Ch+var_C], ebp
test	ecx, ecx
jz	short loc_70312A
call	sub_64A420

loc_70312A:
mov	esi, [esi]
push	edi
mov	edi, [esp+20h+arg_8]
mov	ecx, [edi]
mov	[esp+20h+var_8], esi
test	ecx, ecx
jz	short loc_703140
call	sub_64A420

loc_703140:
mov	edi, [edi]
lea	eax, [esp+20h+var_10]
push	eax
mov	ecx, ebx
mov	[esp+24h+var_4], edi
call	sub_702D60
test	edi, edi
jz	short loc_70315D
mov	ecx, edi
call	sub_64A430

loc_70315D:
pop	edi
test	esi, esi
jz	short loc_703169
mov	ecx, esi
call	sub_64A430

loc_703169:
test	ebp, ebp
jz	short loc_703174
mov	ecx, ebp
call	sub_64A430

loc_703174:
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 10h
retn	0Ch
sub_7030F0 endp

align 10h



sub_703180 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	word ptr -38h
var_36=	word ptr -36h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 40h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+40h+var_4], eax
push	ebx
push	esi
mov	ebx, ecx
cmp	dword ptr [ebx+2830h], 0
push	edi
mov	edi, [esp+4Ch+arg_0]
jnz	short loc_7031F6
mov	edi, [ebx+2834h]
test	edi, edi
jz	short loc_7031E0
mov	eax, [ebx+8]
mov	edx, [eax+0Ch]
lea	ecx, [ebx+8]
push	4
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_7031D6
mov	ecx, esi
call	sub_64A430
push	edi
push	offset aErrorImm32_dll ; "Error: IMM32.DLL is not available, erro"...
add	esi, 0Ch
push	esi
call	sub_67E7F0
add	esp, 0Ch

loc_7031D6:
mov	dword ptr [ebx+2834h], 0

loc_7031E0:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
mov	ecx, [esp+40h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 40h
retn	4

loc_7031F6:
cmp	dword ptr [edi+4], 1
push	ebp
jz	loc_7034BE
mov	ebp, [edi+14h]
push	0		; idThread
mov	[esp+54h+var_30], ebp
call	ds:GetKeyboardLayout
and	eax, 0FFFFh
cmp	eax, 412h
jnz	loc_7034BE
mov	eax, [edi+8]
cmp	eax, 10Fh
ja	loc_7034B7
jz	loc_703332
sub	eax, 10Dh
jz	short loc_7032AC
sub	eax, 1
jnz	loc_7034BE
push	eax
lea	eax, [esp+54h+var_34]
push	eax
mov	ecx, ebx
call	sub_6B5F60
mov	esi, [esp+50h+var_34]
test	esi, esi
jz	loc_70349D
mov	edx, [esi]
mov	eax, [edx+0B0h]
mov	ecx, esi
call	eax
cmp	eax, 4
jnz	loc_703496
inc	dword ptr [esi+4]
mov	esi, [esp+50h+var_34]
mov	edx, [esi]
mov	eax, [edx+194h]
mov	ecx, esi
call	eax
test	al, al
jz	loc_70348F
mov	edx, [esi]
mov	eax, [edx+18Ch]
push	0
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+19Ch]
mov	ecx, esi
call	eax
jmp	loc_70348F

loc_7032AC:
push	0
lea	ecx, [esp+54h+var_3C]
push	ecx
mov	ecx, ebx
call	sub_6B5F60
mov	esi, [esp+50h+var_3C]
test	esi, esi
jz	loc_70349D
mov	edx, [esi]
mov	eax, [edx+0B0h]
mov	ecx, esi
call	eax
cmp	eax, 4
jnz	loc_703496
inc	dword ptr [esi+4]
mov	esi, [esp+50h+var_3C]
mov	edx, [esi]
mov	eax, [edx+194h]
mov	ecx, esi
call	eax
test	al, al
jz	loc_70348F
mov	edi, [esi]
mov	edx, [edi+184h]
push	0FFFFFFFFh
mov	ecx, esi
call	edx
push	eax
mov	eax, [esi]
mov	edx, [eax+180h]
mov	ecx, esi
call	edx
push	eax
mov	eax, [edi+190h]
push	offset szReferrer
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+198h]
mov	ecx, esi
call	eax
jmp	loc_70348F

loc_703332:
push	0
lea	ecx, [esp+54h+var_40]
push	ecx
mov	ecx, ebx
call	sub_6B5F60
mov	esi, [esp+50h+var_40]
test	esi, esi
jz	loc_70349D
mov	edx, [esi]
mov	eax, [edx+0B0h]
mov	ecx, esi
call	eax
cmp	eax, 4
jnz	loc_703496
inc	dword ptr [esi+4]
mov	esi, [esp+50h+var_40]
mov	edx, [esi]
mov	eax, [edx+194h]
mov	ecx, esi
call	eax
test	al, al
jz	loc_70348F
mov	ecx, [edi+0Ch]
mov	edi, [edi+10h]
mov	[esp+50h+var_3C], ecx
mov	[esp+50h+var_40], edi
test	edi, 800h
jz	loc_703426
mov	eax, [ebx+2814h]
test	eax, eax
jz	short loc_7033A7
push	ebp
call	eax
mov	ebp, eax
jmp	short loc_7033A9

loc_7033A7:
xor	ebp, ebp

loc_7033A9:
mov	eax, [ebx+2820h]
test	eax, eax
jz	short loc_7033C3
push	0
push	0
push	800h
push	ebp
call	eax
mov	edi, eax
jmp	short loc_7033C5

loc_7033C3:
xor	edi, edi

loc_7033C5:
mov	eax, [ebx+2820h]
test	eax, eax
jz	short loc_7033E7
push	edi
lea	edx, [esp+54h+var_2C]
push	edx
push	800h
push	ebp
call	eax
cmp	eax, 0FFFFFFFFh
jz	short loc_7033FD
cmp	eax, 0FFFFFFFEh
jz	short loc_7033FD

loc_7033E7:
mov	edx, [esi]
xor	eax, eax
shr	edi, 1
mov	word ptr [esp+edi*2+50h+var_2C], ax
push	eax
mov	eax, [edx+18Ch]
mov	ecx, esi
call	eax

loc_7033FD:
mov	ebx, [ebx+2818h]
test	ebx, ebx
jz	short loc_70340F
mov	ecx, [esp+50h+var_30]
push	ebp
push	ecx
call	ebx

loc_70340F:
mov	edx, [esi]
mov	edx, [edx+1A4h]
push	0FFFFFFFFh
lea	eax, [esp+54h+var_2C]
push	eax
mov	ecx, esi
call	edx
mov	edi, [esp+50h+var_40]

loc_703426:
test	edi, 2000h
jz	short loc_70348F
test	edi, 4000h
jz	short loc_70348F
mov	ax, word ptr [esp+50h+var_3C]
mov	edx, [esi]
xor	ecx, ecx
mov	[esp+50h+var_38], ax
mov	eax, [edx+18Ch]
mov	[esp+50h+var_36], cx
push	1
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+17Ch]
mov	ecx, esi
call	eax
mov	edx, [esi]
push	eax
mov	eax, [edx+1ACh]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	edx, [edx+1A8h]
push	1
lea	eax, [esp+54h+var_38]
push	eax
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+1B8h]
push	0
mov	ecx, esi
call	edx

loc_70348F:
mov	ecx, esi
call	sub_64A400

loc_703496:
mov	ecx, esi
call	sub_64A400

loc_70349D:
pop	ebp
pop	edi
pop	esi
mov	eax, 2
pop	ebx
mov	ecx, [esp+40h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 40h
retn	4

loc_7034B7:
cmp	eax, 286h
jz	short loc_70349D

loc_7034BE:
mov	ecx, [esp+50h+var_4]
pop	ebp
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 40h
retn	4
sub_703180 endp

align 10h



sub_7034E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	ecx, [esp+arg_0]
mov	eax, [ecx]
mov	eax, [eax+4]
lea	edx, [esp+arg_C]
push	edx
mov	edx, [esp+4+arg_8]
push	edx
mov	edx, [esp+8+arg_4]
push	edx
call	eax
retn
sub_7034E0 endp

align 10h



sub_703500 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
xor	ebx, ebx
cmp	esi, ebx
jnz	short loc_703511
pop	esi
xor	eax, eax
pop	ebx
retn

loc_703511:
mov	eax, [esi]
mov	edx, [eax+10h]
push	ebp
push	edi
mov	ecx, esi
call	edx
mov	ebp, eax
mov	eax, [esi]
mov	edx, [eax+28h]
push	4
lea	ecx, [esp+14h+arg_0]
push	ecx
mov	ecx, esi
mov	edi, 1
mov	byte ptr [esp+18h+arg_0], bl
mov	byte ptr [esp+18h+arg_0+1], bl
mov	byte ptr [esp+18h+arg_0+2], bl
mov	byte ptr [esp+18h+arg_0+3], bl
call	edx
test	eax, eax
jle	loc_70362E
movzx	eax, byte ptr [esp+10h+arg_0]
add	eax, 0FFFFFFBDh
cmp	eax, 0BCh	; switch 189 cases
ja	loc_7035EE	; default
			; jumptable 00703565 cases 2,5-69,71-187
movzx	eax, ds:byte_703650[eax]
jmp	ds:off_703638[eax*4] ; switch jump

loc_70356C:		; jumptable 00703565 cases 0,3
mov	al, byte ptr [esp+10h+arg_0+1]
cmp	al, 57h
jnz	short loc_703582
cmp	byte ptr [esp+10h+arg_0+2], 53h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
mov	edi, 2
jmp	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187

loc_703582:
cmp	al, 46h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
cmp	byte ptr [esp+10h+arg_0+2], 58h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
mov	edi, 3
jmp	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187

loc_703594:		; jumptable 00703565 case 188
cmp	byte ptr [esp+10h+arg_0+1], 0D8h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
mov	edi, 0Ah
jmp	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187

loc_7035A2:		; jumptable 00703565 case 70
cmp	byte ptr [esp+10h+arg_0+1], 50h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
cmp	byte ptr [esp+10h+arg_0+2], 4Eh
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
cmp	byte ptr [esp+10h+arg_0+3], 47h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
mov	edi, 0Bh
jmp	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187

loc_7035BE:		; jumptable 00703565 case 4
mov	al, byte ptr [esp+10h+arg_0+1]
cmp	al, 49h
jnz	short loc_703582
cmp	byte ptr [esp+10h+arg_0+2], 46h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
cmp	byte ptr [esp+10h+arg_0+3], 38h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
mov	edi, 0Ch
jmp	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187

loc_7035DB:		; jumptable 00703565 case 1
cmp	byte ptr [esp+10h+arg_0+1], 44h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
cmp	byte ptr [esp+10h+arg_0+2], 53h
jnz	short loc_7035EE ; default
			; jumptable 00703565 cases 2,5-69,71-187
mov	edi, 0Eh

loc_7035EE:		; default
mov	edx, [esi]	; jumptable 00703565 cases 2,5-69,71-187
mov	eax, [edx+38h]
push	ebx
push	ebp
mov	ecx, esi
call	eax
cmp	edi, 1
jnz	short loc_70362E
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
cmp	eax, ebx
jz	short loc_70362E
push	2Eh		; int
push	eax		; char *
call	_strrchr
add	esp, 8
cmp	eax, ebx
jz	short loc_70362E
push	offset a_tga	; ".tga"
push	eax		; char *
call	sub_679A10
test	eax, eax
jnz	short loc_70362E
mov	edi, 0Dh

loc_70362E:
mov	eax, edi
pop	edi
pop	ebp
pop	esi
pop	ebx
retn
sub_703500 endp

align 4
off_703638 dd offset loc_70356C, offset	loc_7035DB ; jump table	for switch statement
dd offset loc_7035BE, offset loc_7035A2
dd offset loc_703594, offset loc_7035EE
byte_703650 db	    0,	   1,	  5,	 0 ; indirect table for	switch statement
db	2,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     3,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	4
align 10h



sub_703710 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
test	eax, eax
jnz	short loc_70371C
xor	al, al
retn	4

loc_70371C:
push	esi
mov	esi, [esp+4+arg_0]
test	al, 7
jz	short loc_703756
mov	ecx, [esi+10h]
test	ecx, ecx
jbe	short loc_703756
mov	edx, [esi+4]
push	ecx
mov	ecx, [esi+0Ch]
push	ecx
mov	ecx, [esi]
push	edx
mov	edx, [esi+28h]
push	ecx
push	edx
push	eax
call	sub_741480
cmp	eax, 0FFFFFFFFh
jz	short loc_703750
mov	[esi+28h], eax
mov	al, 1
pop	esi
retn	4

loc_703750:
xor	al, al
pop	esi
retn	4

loc_703756:
push	ebx
push	ebp
push	edi
test	al, 8
jz	loc_7037F4
mov	ebp, [esi+28h]
test	ebp, ebp
jz	loc_7037F4
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	ebx, [esi+10h]
lea	eax, [ecx+eax*2]
movzx	edx, word ptr [eax+ebp*2-2]
push	edx
mov	[esp+14h+arg_0], eax
call	sub_6A2090
add	esp, 4
mov	edi, eax
neg	edi
sbb	edi, edi
and	edi, ebp
cmp	ebx, edi
jbe	short loc_7037F4
mov	eax, [esp+10h+arg_0]
lea	ebp, [eax+ebx*2-2]
lea	ecx, [ecx+0]

loc_7037A0:
movzx	eax, word ptr [ebp+0]
push	eax
call	sub_67B520
movzx	eax, ax
add	esp, 4
cmp	ax, 61h
jz	short loc_7037CE
cmp	ax, 65h
jz	short loc_7037CE
cmp	ax, 6Fh
jz	short loc_7037CE
cmp	ax, 75h
jz	short loc_7037CE
cmp	ax, 69h
jnz	short loc_7037EC

loc_7037CE:
mov	ecx, [esi+8]
fld	dword ptr [ecx+ebx*4-4]
fadd	dword ptr [esi+20h]
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
fld	dword ptr [esi+14h]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_7037FD

loc_7037EC:
dec	ebx
sub	ebp, 2
cmp	ebx, edi
ja	short loc_7037A0

loc_7037F4:
pop	edi
pop	ebp
pop	ebx
xor	al, al
pop	esi
retn	4

loc_7037FD:
pop	edi
pop	ebp
mov	[esi+28h], ebx
pop	ebx
mov	byte ptr [esi+2Ch], 1
mov	al, 1
pop	esi
retn	4
sub_703710 endp

align 10h



; int __stdcall	sub_703810(wchar_t *Src, rsize_t MaxCount)
sub_703810 proc	near

Src= dword ptr	4
MaxCount= dword	ptr  8

push	ebp
mov	ebp, [esp+4+Src]
push	esi
mov	esi, ecx
test	ebp, ebp
jz	short loc_703855
push	ebx
mov	ebx, [esp+0Ch+MaxCount]
push	edi
cmp	ebx, 0FFFFFFFFh
jnz	short loc_703832
push	ebp
call	sub_67B340
add	esp, 4
mov	ebx, eax

loc_703832:
mov	ecx, [esi+4]
lea	edi, [ebx+1]
push	edi
call	sub_730DA0
mov	eax, [esi+4]
mov	ecx, [eax]
push	ebx		; MaxCount
push	ebp		; Src
push	edi		; SizeInWords
push	ecx		; Dst
call	sub_67B310
add	esp, 10h
or	byte ptr [esi+0Ch], 1
pop	edi
pop	ebx

loc_703855:
pop	esi
pop	ebp
retn	8
sub_703810 endp

align 10h



sub_703860 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_0]
mov	[edi], eax
mov	ecx, [esi+20h]
mov	[edi+4], ecx
fld	dword ptr [esi+18h]
fstp	dword ptr [edi+10h]
mov	edx, [esi+1Ch]
mov	[edi+14h], edx
fld	dword ptr [esi+10h]
fsub	dword ptr [esi+8]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fld	ds:dbl_15FCC48
fadd	st(2), st
fxch	st(2)
call	__ftol2_sse
mov	[edi+8], eax
fld	dword ptr [esi+14h]
fsub	dword ptr [esi+0Ch]
fstp	[esp+8+arg_0]
fdivr	[esp+8+arg_0]
faddp	st(1), st
call	__ftol2_sse
mov	[edi+0Ch], eax
mov	eax, [esi+24h]
lea	ecx, [esi+24h]
neg	eax
sbb	eax, eax
and	eax, ecx
jz	short loc_7038E0
mov	cx, [eax+0Ch]
mov	[edi+1Ch], cx
mov	edx, [eax+10h]
mov	[edi+20h], edx
pop	edi
pop	esi
retn	4

loc_7038E0:
xor	eax, eax
mov	[edi+1Ch], ax
mov	[edi+20h], eax
pop	edi
pop	esi
retn	4
sub_703860 endp

align 10h



sub_7038F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_703903
mov	ecx, edi
call	sub_64A420

loc_703903:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_70390F
call	sub_64A430

loc_70390F:
mov	[esi+1Ch], edi
pop	edi
pop	esi
retn	4
sub_7038F0 endp

align 10h



; int __thiscall sub_703920(void *, char)
sub_703920 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143F300
jz	short loc_703939
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_703939:
mov	eax, esi
pop	esi
retn	4
sub_703920 endp

align 10h



sub_703940 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+24h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+20h]
lea	ecx, [esi+1Ch]
cmp	eax, ecx
jz	short loc_703995
mov	edx, [esp+8+arg_0]
lea	esp, [esp+0]

loc_703960:
cmp	[eax+8], edx
jz	short loc_703978
mov	eax, [eax+4]
cmp	eax, ecx
jnz	short loc_703960
push	edi		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4

loc_703978:
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
mov	[ecx], edx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_703995:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_703940 endp

align 10h



sub_7039B0 proc	near

lpCriticalSection= dword ptr -4

push	ecx
push	ebx
push	edi
mov	edi, ecx
mov	ecx, [edi+14h]
mov	eax, [ecx+8]
mov	edx, [eax+0Ch]
add	ecx, 8
push	17h
call	edx
mov	ebx, eax
test	ebx, ebx
jz	short loc_703A2F
push	ebp
lea	eax, [edi+24h]
push	esi
push	eax		; lpCriticalSection
mov	[esp+18h+lpCriticalSection], eax
call	ds:EnterCriticalSection
mov	esi, [edi+20h]
lea	ebp, [edi+1Ch]
cmp	esi, ebp
jz	short loc_703A16

loc_7039E5:
mov	eax, [esi]
mov	ecx, [esi+4]
mov	[eax+4], ecx
mov	edx, [esi+4]
mov	eax, [esi]
mov	[edx], eax
mov	edx, [ebx]
mov	eax, [esi+8]
mov	edx, [edx+8]
push	eax
mov	ecx, ebx
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	esi, [edi+20h]
cmp	esi, ebp
jnz	short loc_7039E5

loc_703A16:
mov	eax, [esp+14h+lpCriticalSection]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	esi
pop	ebp
pop	edi
mov	ecx, ebx
pop	ebx
add	esp, 4
jmp	sub_64A430

loc_703A2F:
pop	edi
pop	ebx
pop	ecx
retn
sub_7039B0 endp

align 10h



sub_703A40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_8]
push	esi
push	edi
mov	edi, eax
push	ebx
push	edi
call	sub_6FC3E0
mov	esi, eax
test	esi, esi
jnz	short loc_703AA8
push	offset asc_143F380 ; "\"\n"
push	edi
push	offset aGfxloaderFaile ; "GFxLoader failed to open \""
lea	ecx, [esp+20h+var_8]
call	sub_67AE50
push	eax
mov	ecx, ebp
call	sub_67A3D0
mov	esi, [esp+14h+var_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	loc_703B8C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
xor	eax, eax
pop	ebp
add	esp, 8
retn

loc_703AA8:
push	esi
call	sub_703500
mov	ecx, [esp+18h+arg_0]
mov	[ecx], eax
add	eax, 0FFFFFFFEh
add	esp, 4
cmp	eax, 0Ch	; switch 13 cases
ja	loc_703B43	; default
			; jumptable 00703ACA cases 2-7,10
movzx	edx, ds:byte_703BA8[eax]
jmp	ds:off_703B98[edx*4] ; switch jump

loc_703AD1:		; jumptable 00703ACA case 0
test	ebx, 80000h
jz	short loc_703B0E ; jumptable 00703ACA case 1
push	offset aGfxFileFormatE ; "\" - GFX file	format expected\n"
push	edi
push	offset aErrorLoadingSw ; "Error	loading	SWF file \""
lea	ecx, [esp+20h+var_8]
call	sub_67AE50
push	eax
mov	ecx, ebp
call	sub_67A3D0
lea	ecx, [esp+14h+var_8]
call	sub_4E40F0
mov	ecx, esi
call	sub_64A430
pop	edi
pop	esi
xor	eax, eax
pop	ebp
add	esp, 8
retn

loc_703B0E:		; jumptable 00703ACA case 1
mov	eax, [esp+14h+arg_4]
mov	dword ptr [eax], 1
jmp	short loc_703B2C

loc_703B1A:		; jumptable 00703ACA cases 8,9,11,12
test	ebx, 10000h
jz	short loc_703B43 ; default
			; jumptable 00703ACA cases 2-7,10
mov	ecx, [esp+14h+arg_4]
mov	dword ptr [ecx], 2

loc_703B2C:
mov	ecx, esi
call	sub_64A420
mov	ecx, esi
call	sub_64A430
pop	edi
mov	eax, esi
pop	esi
pop	ebp
add	esp, 8
retn

loc_703B43:		; default
push	offset asc_143F380 ; jumptable 00703ACA	cases 2-7,10
push	edi
push	offset aUnknownFileFor ; "Unknown file format at URL \""
lea	ecx, [esp+20h+var_4]
call	sub_67AE50
push	eax
mov	ecx, ebp
call	sub_67A3D0
mov	edi, [esp+14h+var_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_703B85
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_703B85:
mov	ecx, esi
call	sub_64A430

loc_703B8C:
pop	edi
pop	esi
xor	eax, eax
pop	ebp
add	esp, 8
retn
sub_703A40 endp

align 4
off_703B98 dd offset loc_703AD1	; jump table for switch	statement
dd offset loc_703B0E
dd offset loc_703B1A
dd offset loc_703B43
byte_703BA8 db	    0,	   1,	  3,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	2,     2,     3,     2
db	2
align 10h



sub_703BC0 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h

sub	esp, 18h
push	ebx
mov	bl, [esp+1Ch+arg_C]
push	ebp
mov	ebp, [esp+20h+arg_8]
push	esi
mov	esi, [esp+24h+arg_4]
push	edi
test	esi, esi
jz	short loc_703BF1
test	bl, 1
jnz	short loc_703BE8
push	esi
mov	ecx, ebp
call	sub_6FC4B0
test	al, al
jnz	short loc_703BF1

loc_703BE8:
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_703BF1:
mov	esi, [esp+28h+arg_10]
mov	edi, [esp+28h+arg_0]
mov	eax, esi
test	esi, esi
jz	short loc_703C0B
nop

loc_703C00:
cmp	[eax], edi
jz	short loc_703C1E
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_703C00

loc_703C0B:
test	bl, 1
jz	loc_703CC4
push	200h
jmp	loc_703CCE

loc_703C1E:
cmp	dword ptr [eax+4], 0
jz	loc_703CEB
cmp	dword ptr [ebp+0Ch], 0
jz	loc_703CDA
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+2Ch+var_18]
call	sub_679B40

loc_703C41:
mov	ecx, [esi]
mov	edx, [ecx]
mov	eax, [edx+30h]
call	eax
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+30h+var_18]
call	sub_679D10
push	0Ah
lea	ecx, [esp+2Ch+var_18]
call	sub_679C60
mov	esi, [esi+4]
test	esi, esi
jnz	short loc_703C41
mov	edx, [edi]
mov	eax, [edx+30h]
mov	ecx, edi
call	eax
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+30h+var_18]
call	sub_679D10
push	0Ah
lea	ecx, [esp+2Ch+var_18]
call	sub_679C60
mov	eax, [esp+28h+var_18]
test	eax, eax
jnz	short loc_703C95
mov	eax, offset byte_146D660

loc_703C95:
mov	ecx, [ebp+0Ch]
push	eax
add	ecx, 0Ch
push	offset aErrorRecursive ; "Error: Recursive import detected. Impor"...
push	ecx
call	sub_67E7F0
add	esp, 0Ch
lea	ecx, [esp+28h+var_18]
call	sub_679B60
mov	ecx, edi
call	sub_666B00
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 18h
retn

loc_703CC4:
test	bl, 2
jz	short loc_703CEB
push	100h

loc_703CCE:
mov	ecx, [edi+1Ch]
call	sub_6AB8D0
test	al, al
jnz	short loc_703CEB

loc_703CDA:
mov	ecx, edi
call	sub_666B00
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 18h
retn

loc_703CEB:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_703BC0 endp

align 10h



sub_703D00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_4]
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [esi+8]
push	edi
lea	eax, [esp+24h+var_8]
xor	ebp, ebp
push	ebx
push	eax
mov	[esp+2Ch+var_10], ebp
mov	[esp+2Ch+var_C], ebp
call	sub_6ACEA0
mov	ecx, [esi+38h]
add	esp, 0Ch
lea	edx, [esp+20h+var_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
call	sub_667230
cmp	eax, 3
jnz	loc_703E91
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	20h
call	eax
cmp	eax, ebp
jz	short loc_703D82
mov	ecx, [esp+20h+arg_18]
mov	edx, [esi+3Ch]
mov	ebp, [edx+14h]
push	ecx
mov	ecx, dword_1855FC0
push	0
push	ecx
mov	ecx, [esp+2Ch+arg_8]
push	ebp
push	ecx
push	edx
push	edi
push	ebx
mov	ecx, eax
call	sub_6AF570
mov	edi, eax
jmp	short loc_703D84

loc_703D82:
xor	edi, edi

loc_703D84:
mov	eax, [esp+20h+arg_1C]
test	eax, eax
jz	short loc_703D8F
mov	byte ptr [eax],	1

loc_703D8F:
mov	ebp, [esp+20h+arg_C]
test	ebp, ebp
jz	loc_703E62
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_703DC0
mov	ecx, [esp+20h+arg_14]
push	ecx
push	edi
push	esi
mov	ecx, eax
call	sub_6AE750
jmp	short loc_703DC2

loc_703DC0:
xor	eax, eax

loc_703DC2:
mov	[ebp+0], eax
test	eax, eax
jnz	loc_703E62
test	edi, edi
jz	short loc_703DD8
mov	ecx, edi
call	sub_666B00

loc_703DD8:
mov	edx, [ebx+20h]
mov	eax, [edx+24h]
and	eax, 0FFFFFFFCh
push	offset asc_143F380 ; "\"\n"
add	eax, 8
push	eax
push	offset aFailedToBindSw ; "Failed to bind SWF file \""
lea	ecx, [esp+2Ch+arg_0]
call	sub_67AE50
mov	ecx, [esp+20h+arg_0]
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
mov	ecx, [esp+24h+var_C]
call	sub_666D50
mov	esi, [esp+20h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_703E32
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_703E32:
mov	ecx, [esp+20h+var_8]
test	ecx, ecx
jz	short loc_703E46
mov	eax, [ecx]
mov	edx, [esp+20h+var_4]
mov	eax, [eax+8]
push	edx
call	eax

loc_703E46:
mov	eax, [esp+20h+var_10]
cmp	eax, 1
jnz	short loc_703E79
mov	ecx, [esp+20h+var_C]
call	sub_666B00
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 10h
retn

loc_703E62:
test	edi, edi
jz	loc_703DD8
mov	ecx, [esp+20h+var_C]
push	edi
call	sub_666CB0
jmp	loc_703EF9

loc_703E79:
cmp	eax, 2
jl	short loc_703E87
mov	ecx, [esp+20h+var_C]
call	sub_64A430

loc_703E87:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 10h
retn

loc_703E91:
lea	ecx, [esp+20h+var_10]
call	sub_6666C0
mov	edi, eax
cmp	edi, ebp
jnz	short loc_703EEE
cmp	[esi+0Ch], ebp
jz	short loc_703ED1
cmp	[esp+20h+var_10], 2
jl	short loc_703EB7
mov	ecx, [esp+20h+var_C]
call	sub_665FE0
jmp	short loc_703EBC

loc_703EB7:
mov	eax, offset byte_146D660

loc_703EBC:
mov	ecx, [esi+0Ch]
push	eax
add	ecx, 0Ch
push	offset aErrorS	; "Error: %s"
push	ecx
call	sub_67E7F0
add	esp, 0Ch

loc_703ED1:
mov	ecx, [esp+20h+var_8]
cmp	ecx, ebp
jz	loc_703E46
mov	edx, [ecx]
mov	eax, [esp+20h+var_4]
mov	edx, [edx+8]
push	eax
call	edx
jmp	loc_703E46

loc_703EEE:
mov	eax, [esp+20h+arg_1C]
cmp	eax, ebp
jz	short loc_703EF9
mov	byte ptr [eax],	0

loc_703EF9:
mov	ecx, [esp+20h+var_8]
test	ecx, ecx
jz	short loc_703F0D
mov	eax, [ecx]
mov	edx, [esp+20h+var_4]
mov	eax, [eax+8]
push	edx
call	eax

loc_703F0D:
mov	eax, [esp+20h+var_10]
cmp	eax, 1
jnz	short loc_703F29
mov	ecx, [esp+20h+var_C]
call	sub_666B00
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn

loc_703F29:
cmp	eax, 2
jl	short loc_703F37
mov	ecx, [esp+20h+var_C]
call	sub_64A430

loc_703F37:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_703D00 endp

align 10h



sub_703F50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
test	ebx, ebx
jz	short loc_703F67
push	ebx
mov	ecx, esi
call	sub_6FC3A0

loc_703F67:
mov	eax, [esp+0Ch+arg_C]
mov	edi, [esp+0Ch+arg_8]
push	0
push	eax
push	0
push	0
lea	ecx, [esp+1Ch+arg_4]
push	ecx
push	edi
push	ebx
push	esi
mov	[esp+2Ch+arg_4], 0
call	sub_703D00
add	esp, 20h
test	eax, eax
jnz	short loc_703FA5
mov	ecx, [esp+0Ch+arg_4]
test	ecx, ecx
jz	short loc_703F9F
call	sub_64A430

loc_703F9F:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn

loc_703FA5:
push	0
push	edi
push	esi
mov	esi, [esp+18h+arg_4]
push	esi
push	eax
call	sub_703BC0
add	esp, 14h
mov	edi, eax
test	esi, esi
jz	short loc_703FC4
mov	ecx, esi
call	sub_64A430

loc_703FC4:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn
sub_703F50 endp

align 10h



sub_703FD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
sub	esp, 10h
push	esi
push	edi
xor	edi, edi
push	edi
push	34h
call	edx
cmp	eax, edi
jz	short loc_70403F
push	24h
push	39h
push	1
mov	ecx, eax
call	sub_73D620
mov	esi, eax
mov	[esp+18h+var_C], esi
cmp	esi, edi
jz	loc_7040E0
push	ebx
mov	[esp+1Ch+var_4], edi
mov	eax, offset aAaaaaaaaaaaaaa ; "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar"...
push	ebp

loc_704011:
xor	ebp, ebp
mov	[esp+20h+var_10], eax
jmp	short loc_704020
align 10h

loc_704020:
mov	eax, [esp+20h+var_10]
movsx	eax, byte ptr [eax]
add	eax, 0FFFFFFDDh
xor	edi, edi
cmp	eax, 56h	; switch 87 cases
ja	short loc_704075 ; default
			; jumptable 00704038 cases 1-61,65-67,69-78,80-85
movzx	ecx, ds:byte_704138[eax]
jmp	ds:off_704118[ecx*4] ; switch jump

loc_70403F:
mov	esi, edi
jmp	loc_7040E0

loc_704046:		; jumptable 00704038 case 0
mov	edi, 0FF000000h
jmp	short loc_704075 ; default
			; jumptable 00704038 cases 1-61,65-67,69-78,80-85

loc_70404D:		; jumptable 00704038 case 79
mov	edi, 80FF2020h
jmp	short loc_704075 ; default
			; jumptable 00704038 cases 1-61,65-67,69-78,80-85

loc_704054:		; jumptable 00704038 case 68
mov	edi, 8020FF20h
jmp	short loc_704075 ; default
			; jumptable 00704038 cases 1-61,65-67,69-78,80-85

loc_70405B:		; jumptable 00704038 case 63
mov	edi, 802020FFh
jmp	short loc_704075 ; default
			; jumptable 00704038 cases 1-61,65-67,69-78,80-85

loc_704062:		; jumptable 00704038 case 86
mov	edi, 80FFFF00h
jmp	short loc_704075 ; default
			; jumptable 00704038 cases 1-61,65-67,69-78,80-85

loc_704069:		; jumptable 00704038 case 62
mov	edi, 80FF00FFh
jmp	short loc_704075 ; default
			; jumptable 00704038 cases 1-61,65-67,69-78,80-85

loc_704070:		; jumptable 00704038 case 64
mov	edi, 8000FFFFh

loc_704075:		; default
mov	[esp+20h+var_8], 0 ; jumptable 00704038	cases 1-61,65-67,69-78,80-85
lea	ecx, [ecx+0]

loc_704080:
mov	edx, [esp+20h+var_4]
mov	eax, [esp+20h+var_8]
xor	esi, esi
lea	ebx, [edx+eax]
lea	ecx, [ecx+0]

loc_704090:
push	edi
push	ebx
lea	ecx, [esi+ebp]
push	ecx
mov	ecx, [esp+2Ch+var_C]
add	ecx, 0Ch
call	sub_73CA00
inc	esi
cmp	esi, 3
jl	short loc_704090
mov	eax, [esp+20h+var_8]
inc	eax
cmp	eax, 3
mov	[esp+20h+var_8], eax
jl	short loc_704080
inc	[esp+20h+var_10]
add	ebp, 3
cmp	ebp, 39h
jl	loc_704020
mov	eax, [esp+20h+var_10]
add	[esp+20h+var_4], 3
cmp	eax, (offset aAaaaaaaaaaaaaa+0E4h)
jl	loc_704011
mov	esi, [esp+20h+var_C]
pop	ebp
pop	ebx

loc_7040E0:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	24h
call	eax
test	eax, eax
jz	short loc_704103
push	0
push	esi
mov	ecx, eax
call	sub_741050
mov	edi, eax
jmp	short loc_704105

loc_704103:
xor	edi, edi

loc_704105:
test	esi, esi
jz	short loc_704110
mov	ecx, esi
call	sub_64A400

loc_704110:
mov	eax, edi
pop	edi
pop	esi
add	esp, 10h
retn
sub_703FD0 endp

off_704118 dd offset loc_704046, offset	loc_704069 ; jump table	for switch statement
dd offset loc_70405B, offset loc_704070
dd offset loc_704054, offset loc_70404D
dd offset loc_704062, offset loc_704075
byte_704138 db	    0,	   7,	  7,	 7 ; indirect table for	switch statement
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     1,     2
db	3,     7,     7,     7
db	4,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     5
db	7,     7,     7,     7
db	7,     7,     6
align 10h
; START	OF FUNCTION CHUNK FOR sub_6AF740

loc_704190:
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_143F3E0
mov	ecx, [eax+3Ch]
push	esi
call	sub_703940
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_7041B1
call	sub_64A430

loc_7041B1:
mov	dword ptr [esi], offset	off_1437568
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
; END OF FUNCTION CHUNK	FOR sub_6AF740
align 10h



sub_7041C0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143F408
mov	dword ptr [esi+8], offset off_143F3F4
mov	dword ptr [esi+10h], offset off_143F3EC
call	sub_7039B0
lea	ecx, [esi+24h]	; lpCriticalSection
call	sub_64D730
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_7041F0
call	sub_64A430

loc_7041F0:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_7041FC
call	sub_64A430

loc_7041FC:
mov	dword ptr [esi+10h], offset off_143F300
mov	dword ptr [esi+8], offset off_1437474
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_7041C0 endp

align 10h



sub_704220 proc	near
sub	ecx, 8
jmp	sub_7043B0
sub_704220 endp

align 10h



sub_704230 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	sub_7043B0
sub_704230 endp

align 10h



sub_704240 proc	near
mov	eax, [ecx+0Ch]
test	eax, eax
jz	short loc_70424B
add	eax, 8
retn

loc_70424B:
xor	eax, eax
retn
sub_704240 endp

align 10h



sub_704250 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
test	ecx, ecx
jz	short loc_70426C
mov	eax, [ecx]
mov	edx, [eax+4]
push	edi
call	edx
mov	esi, eax
test	esi, esi
jnz	short loc_704291

loc_70426C:
mov	eax, [esp+8+arg_8]
test	eax, eax
jz	short loc_704286
push	edi
add	eax, 0Ch
push	offset aCouldNotLoadUs ; "Could	not load user image \"%s\" - GFxIma"...
push	eax
call	sub_68FAE0
add	esp, 0Ch

loc_704286:
call	sub_703FD0
mov	esi, eax
test	esi, esi
jz	short loc_7042B2

loc_704291:
mov	ecx, [esp+8+arg_C]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1Ch
call	edx
test	eax, eax
jz	short loc_7042B2
push	1
push	esi
mov	ecx, eax
call	sub_6FC510
mov	edi, eax
jmp	short loc_7042B4

loc_7042B2:
xor	edi, edi

loc_7042B4:
test	esi, esi
jz	short loc_7042BF
mov	ecx, esi
call	sub_64A400

loc_7042BF:
mov	eax, edi
pop	edi
pop	esi
retn
sub_704250 endp

align 10h



sub_7042D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	dword ptr [esi], offset	off_1437568
mov	dword ptr [esi+4], 1
mov	[esi+8], eax
mov	dword ptr [esi+0Ch], 0
mov	dword ptr [esi], offset	off_143F3E0
test	edi, edi
jz	short loc_70430B
mov	ecx, edi
call	sub_64A420

loc_70430B:
mov	ecx, edi
mov	[esi+10h], edi
mov	edi, [ecx+3Ch]
lea	ebx, [edi+24h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	0Ch
call	eax
test	eax, eax
jz	short loc_704339
mov	[eax+8], esi
mov	ecx, eax
jmp	short loc_70433B

loc_704339:
xor	ecx, ecx

loc_70433B:
mov	edx, [edi+1Ch]
lea	eax, [edi+1Ch]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [eax]
mov	[edx+4], ecx
push	ebx		; lpCriticalSection
mov	[eax], ecx
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_7042D0 endp

align 10h



sub_704360 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_143F3E0
mov	ecx, [eax+3Ch]
push	esi
call	sub_703940
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_704381
call	sub_64A430

loc_704381:
mov	ecx, esi
mov	dword ptr [esi], offset	off_1437568
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7043A3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7043A3:
mov	eax, esi
pop	esi
retn	4
sub_704360 endp

align 10h



sub_7043B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7041C0
test	[esp+4+arg_0], 1
jz	short loc_7043CD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7043CD:
mov	eax, esi
pop	esi
retn	4
sub_7043B0 endp

align 10h



sub_7043E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_10]
push	esi
push	edi
push	20002h
push	eax
mov	esi, ecx
call	sub_7042D0
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_143F464
test	edi, edi
jz	short loc_704408
mov	ecx, edi
call	sub_64A420

loc_704408:
mov	[esi+14h], edi
mov	edi, [esp+8+arg_4]
test	edi, edi
jz	short loc_70441A
mov	ecx, edi
call	sub_64A420

loc_70441A:
mov	[esi+18h], edi
mov	edi, [esp+8+arg_8]
test	edi, edi
jz	short loc_70442C
mov	ecx, edi
call	sub_64A420

loc_70442C:
mov	ecx, [esp+8+arg_C]
mov	[esi+1Ch], edi
mov	[esi+20h], ecx
pop	edi
mov	dword ptr [esi+24h], 0
mov	eax, esi
pop	esi
retn	14h
sub_7043E0 endp

align 10h



sub_704450 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4

sub	esp, 34h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	ecx, [eax+38h]
mov	edx, [eax+24h]
mov	ebp, [esi+1Ch]
push	edi
mov	edi, [ecx+28h]
mov	ecx, [eax+2Ch]
mov	eax, [eax+0Ch]
push	edi
push	ecx
push	edx
mov	edx, [esi+20h]
push	eax
push	1
push	edx
push	ebp
xor	ebx, ebx
call	sub_702BA0
mov	ecx, eax
xor	edx, edx
add	esp, 1Ch
mov	[esp+44h+var_34], ecx
cmp	ecx, edx
jz	loc_70452E
mov	eax, [esi+10h]
mov	ebx, [eax+20h]
mov	ebp, 1
mov	[esp+44h+var_30], ebp
mov	[esp+44h+var_20], ecx
mov	[esp+44h+var_28], edx
mov	[esp+44h+var_2C], edx
mov	[esp+44h+var_24], ebp
mov	[esp+44h+var_1C], edx
mov	[esp+44h+var_14], edx
mov	[esp+44h+var_10], edx
mov	[esp+44h+var_C], edx
mov	[esp+44h+var_18], ebx
mov	[esp+44h+var_8], edx
mov	[esp+44h+var_4], dl
cmp	[eax+44h], dl
jnz	short loc_7044DC
cmp	[eax+18h], edx
mov	[esp+44h+var_4], dl
jz	short loc_7044E1

loc_7044DC:
mov	[esp+44h+var_4], 1

loc_7044E1:
mov	[esp+44h+var_8], edi
mov	ecx, [eax+8]
mov	ecx, [ecx+10h]
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+44h+var_30]
push	eax
call	edx
mov	ebx, eax
test	ebx, ebx
jz	short loc_70452C
mov	eax, [edi]
mov	edx, [eax+28h]
push	0
push	1Ch
mov	ecx, edi
call	edx
test	eax, eax
jz	short loc_70451B
push	ebp
push	ebx
mov	ecx, eax
call	sub_6FC510
mov	edi, eax
jmp	short loc_70451D

loc_70451B:
xor	edi, edi

loc_70451D:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_704529
call	sub_666B00

loc_704529:
mov	[esi+24h], edi

loc_70452C:
xor	edx, edx

loc_70452E:
mov	ebp, [esi+24h]
cmp	ebp, edx
jz	short loc_70457A
mov	ecx, [esi+1Ch]
mov	eax, [ecx]
mov	edx, [eax+18h]
mov	edi, [esi+14h]
call	edx
mov	ecx, [edi+20h]
push	1
push	ebp
push	eax
call	sub_6B18E0
mov	ecx, [esi+14h]
mov	eax, [ecx+20h]
mov	eax, [eax+28h]
mov	edx, [esi+18h]
mov	edi, [edx+1Ch]
push	eax
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
push	eax
mov	ecx, edi
call	sub_6ACE40
mov	eax, [esi+18h]
mov	ecx, [eax+1Ch]
push	302h
jmp	short loc_704582

loc_70457A:
mov	ecx, [esi+18h]
mov	ecx, [ecx+1Ch]
push	4

loc_704582:
call	sub_6AB8A0
test	ebx, ebx
jz	short loc_704592
mov	ecx, ebx
call	sub_64A400

loc_704592:
mov	ecx, [esp+44h+var_34]
pop	edi
pop	esi
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_7045A6
add	esp, 34h
jmp	sub_64A400

loc_7045A6:
add	esp, 34h
retn
sub_704450 endp

align 10h



sub_7045B0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_7045BF
call	sub_666B00

loc_7045BF:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_7045CB
call	sub_64A430

loc_7045CB:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_7045D7
call	sub_666B00

loc_7045D7:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_7045E3
call	sub_666B00

loc_7045E3:
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_143F3E0
mov	ecx, [eax+3Ch]
push	esi
call	sub_703940
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_704601
call	sub_64A430

loc_704601:
mov	dword ptr [esi], offset	off_1437568
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_7045B0 endp

align 10h



sub_704610 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7045B0
test	[esp+4+arg_0], 1
jz	short loc_70462D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_70462D:
mov	eax, esi
pop	esi
retn	4
sub_704610 endp

align 10h



sub_704640 proc	near

var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 3Ch
push	ebx
push	ebp
push	esi
push	edi
lea	ecx, [esp+4Ch+var_34]
call	sub_679E30
mov	eax, [esp+4Ch+arg_4]
mov	esi, [esp+4Ch+arg_0]
push	eax
lea	ecx, [esp+50h+var_34]
push	ecx
mov	ecx, esi
call	sub_6FC480
mov	eax, [esi+8]
mov	edx, [esi+0Ch]
xor	ebp, ebp
mov	[esp+4Ch+var_10], ebp
mov	[esp+4Ch+var_C], ebp
cmp	[eax+28h], ebp
mov	eax, [esp+4Ch+arg_8]
mov	[esp+4Ch+var_20], ebp
mov	[esp+4Ch+var_18], edx
mov	[esp+4Ch+var_39], 0
mov	[esp+4Ch+var_1C], ebp
mov	[esp+4Ch+var_38], ebp
mov	[esp+4Ch+var_28], ebp
mov	[esp+4Ch+var_2C], ebp
mov	[esp+4Ch+var_14], ebp
jz	short loc_7046A6
or	eax, 11h
mov	[esp+4Ch+arg_8], eax

loc_7046A6:
test	al, 20h
jnz	short loc_7046B3
mov	byte ptr [esp+4Ch+arg_0], 0
test	al, 10h
jnz	short loc_7046B8

loc_7046B3:
mov	byte ptr [esp+4Ch+arg_0], 1

loc_7046B8:
push	eax
mov	ecx, esi
call	sub_6FC380
mov	ecx, [esi+8]
mov	edi, [ecx+8]
mov	ebx, eax
cmp	edi, ebp
jz	short loc_7046E2
mov	eax, [esp+4Ch+var_34]
mov	edx, [edi]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
mov	eax, [edx+8]
mov	ecx, edi
call	eax
jmp	short loc_7046E6

loc_7046E2:
xor	eax, eax
xor	edx, edx

loc_7046E6:
mov	ecx, [esi+8]
mov	ecx, [ecx+20h]
push	ecx
push	ebx
push	edi
push	edx
mov	edx, [esp+5Ch+var_34]
push	eax
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
lea	eax, [esp+64h+var_8]
push	eax
call	sub_6ACC40
mov	ecx, [esi+38h]
add	esp, 1Ch
lea	edx, [esp+4Ch+var_8]
push	edx
lea	eax, [esp+50h+var_10]
push	eax
call	sub_667230
cmp	eax, 3
jnz	loc_704B1C
lea	ecx, [esp+4Ch+var_24]
call	sub_679E30
mov	eax, [esp+4Ch+var_34]
mov	ebx, [esp+4Ch+arg_8]
lea	ecx, [esp+4Ch+var_24]
push	ecx
lea	edx, [esp+50h+var_1C]
push	edx
lea	ecx, [esp+54h+var_14]
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
mov	ecx, esi
call	sub_703A40
add	esp, 0Ch
mov	[esp+4Ch+var_2C], eax
test	eax, eax
jnz	loc_704822
mov	eax, [esp+4Ch+var_18]
test	eax, eax
jz	short loc_704784
mov	edx, [esp+4Ch+var_24]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
add	eax, 0Ch
push	offset aS_11	; "%s"
push	eax
call	sub_67E7F0
add	esp, 0Ch

loc_704784:
mov	eax, [esp+4Ch+var_24]
mov	ecx, [esp+4Ch+var_C]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
call	sub_666D50
mov	esi, [esp+4Ch+var_24]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7047C0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7047C0:
mov	ecx, [esp+4Ch+var_8]
test	ecx, ecx
jz	short loc_7047D4
mov	edx, [ecx]
mov	eax, [esp+4Ch+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_7047D4:
mov	eax, [esp+4Ch+var_10]
cmp	eax, 1
jnz	short loc_7047E8
mov	ecx, [esp+4Ch+var_C]
call	sub_666B00
jmp	short loc_7047F6

loc_7047E8:
cmp	eax, 2
jl	short loc_7047F6
mov	ecx, [esp+4Ch+var_C]
call	sub_64A430

loc_7047F6:
mov	esi, [esp+4Ch+var_34]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd

loc_704805:
sub	eax, 1
jnz	short loc_704818
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_704818:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 3Ch
retn

loc_704822:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [esp+4Ch+var_34]
mov	eax, [edx+28h]
push	0
push	24h
and	edi, 0FFFFFFFCh
call	eax
mov	ebp, [esp+4Ch+var_1C]
test	eax, eax
jz	short loc_70486C
mov	edx, [esp+4Ch+arg_8]
mov	ecx, [esp+4Ch+arg_10]
push	ecx
shr	edx, 1Ch
and	dl, 1
movzx	ecx, dl
push	ecx
push	0
add	edi, 8
push	edi
push	ebp
lea	edx, [esp+60h+var_8]
push	edx
mov	ecx, eax
call	sub_6B1E10
mov	edi, eax
jmp	short loc_70486E

loc_70486C:
xor	edi, edi

loc_70486E:
mov	ebx, edi
mov	[esp+4Ch+var_30], ebx
test	edi, edi
jz	short loc_7048EB
push	edi
mov	ecx, esi
call	sub_6FC3A0
cmp	ebp, 1
jnz	loc_7049B7
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	328h
call	edx
test	eax, eax
jz	short loc_7048B3
mov	ecx, [esp+4Ch+arg_8]
push	ecx
push	esi
push	edi
mov	ecx, eax
call	sub_6FD440
mov	ebx, eax
jmp	short loc_7048B5

loc_7048B3:
xor	ebx, ebx

loc_7048B5:
mov	[esp+4Ch+var_28], ebx
test	ebx, ebx
jz	short loc_7048D8
mov	edx, [esp+4Ch+var_2C]
push	edx
mov	ecx, ebx
call	sub_6FC4D0
test	al, al
jnz	loc_7049AA
mov	ecx, ebx
call	sub_64A430

loc_7048D8:
mov	ecx, edi
call	sub_666B00
mov	[esp+4Ch+var_30], 0
mov	ebx, [esp+4Ch+var_30]

loc_7048EB:
mov	ecx, [esp+4Ch+var_34]
and	ecx, 0FFFFFFFCh
push	offset asc_143F380 ; "\"\n"
add	ecx, 8
push	ecx
push	offset aFailedToLoadSw ; "Failed to load SWF file \""
lea	ecx, [esp+58h+arg_8]
call	sub_67AE50
mov	edx, [esp+4Ch+arg_8]
mov	ecx, [esp+4Ch+var_C]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
call	sub_666D50
mov	esi, [esp+4Ch+arg_8]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_704945
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_704945:
mov	esi, [esp+4Ch+var_24]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_704967
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_704967:
mov	ecx, [esp+4Ch+var_8]
test	ecx, ecx
jz	short loc_70497B
mov	edx, [ecx]
mov	eax, [esp+4Ch+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_70497B:
mov	ecx, [esp+4Ch+var_2C]
call	sub_64A430
test	ebx, ebx
jz	short loc_70498F
mov	ecx, ebx
call	sub_666B00

loc_70498F:
mov	eax, [esp+4Ch+var_10]
cmp	eax, 1
jnz	loc_704ADE
mov	ecx, [esp+4Ch+var_C]
call	sub_666B00
jmp	loc_704AEC

loc_7049AA:
cmp	byte ptr [esp+4Ch+arg_0], 0
jz	short loc_7049DF
lea	eax, [esp+4Ch+var_38]
jmp	short loc_7049B9

loc_7049B7:
xor	eax, eax

loc_7049B9:
mov	ecx, [esp+4Ch+arg_10]
mov	edx, [esp+4Ch+arg_C]
push	0
push	ecx
push	edx
push	1
push	eax
mov	eax, [esp+60h+arg_8]
push	eax
push	edi
push	esi
call	sub_703D00
mov	ebx, eax
add	esp, 20h
mov	[esp+4Ch+var_20], ebx
jmp	short loc_7049E3

loc_7049DF:
mov	ebx, [esp+4Ch+var_20]

loc_7049E3:
mov	ecx, [esp+4Ch+var_C]
push	edi
call	sub_666CB0
mov	edi, [esp+4Ch+var_24]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
mov	[esp+54h+var_39], 1
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_704A18
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_704A18:
cmp	byte ptr [esp+4Ch+arg_0], 0
jnz	short loc_704A77
test	ebx, ebx
jnz	loc_704BF1

loc_704A27:
mov	eax, ebp
dec	eax
neg	eax
sbb	eax, eax
not	eax
lea	ecx, [esp+4Ch+var_38]
and	eax, ecx
mov	ecx, [esp+4Ch+arg_10]
lea	edx, [esp+4Ch+arg_0]
push	edx
mov	edx, [esp+50h+arg_C]
push	ecx
mov	ecx, [esp+54h+var_30]
push	edx
push	0
push	eax
mov	eax, [esp+60h+arg_8]
push	eax
push	ecx
push	esi
mov	byte ptr [esp+6Ch+arg_0], 0
call	sub_703D00
add	esp, 20h
mov	ebx, eax
mov	[esp+4Ch+var_20], ebx
cmp	ebp, 2
jnz	short loc_704A77
cmp	byte ptr [esp+4Ch+arg_0], 0
jz	short loc_704A77
mov	[esp+4Ch+var_39], 1

loc_704A77:
test	ebx, ebx
jnz	loc_704BE6
mov	ecx, [esp+4Ch+var_8]
test	ecx, ecx
jz	short loc_704A93
mov	edx, [ecx]
mov	eax, [esp+4Ch+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_704A93:
mov	ecx, [esp+4Ch+var_2C]
test	ecx, ecx
jz	short loc_704AA0
call	sub_64A430

loc_704AA0:
mov	ecx, [esp+4Ch+var_28]
test	ecx, ecx
jz	short loc_704AAD
call	sub_64A430

loc_704AAD:
mov	ecx, [esp+4Ch+var_38]
test	ecx, ecx
jz	short loc_704ABA
call	sub_64A430

loc_704ABA:
mov	ecx, [esp+4Ch+var_30]
call	sub_666B00
mov	eax, [esp+4Ch+var_10]
cmp	eax, 1
jnz	loc_704BC0
mov	ecx, [esp+4Ch+var_C]
call	sub_666B00
jmp	loc_704BCE

loc_704ADE:
cmp	eax, 2
jl	short loc_704AEC
mov	ecx, [esp+4Ch+var_C]
call	sub_64A430

loc_704AEC:
mov	esi, [esp+4Ch+var_34]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	loc_704818
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 3Ch
retn

loc_704B1C:
lea	ecx, [esp+4Ch+var_10]
call	sub_6666C0
mov	[esp+4Ch+var_30], eax
cmp	eax, ebp
jnz	short loc_704BAC
mov	esi, [esp+4Ch+var_18]
cmp	esi, ebp
jz	short loc_704B5E
cmp	[esp+4Ch+var_10], 2
jl	short loc_704B47
mov	ecx, [esp+4Ch+var_C]
call	sub_665FE0
jmp	short loc_704B4C

loc_704B47:
mov	eax, offset byte_146D660

loc_704B4C:
push	eax
push	offset aErrorS	; "Error: %s"
add	esi, 0Ch
push	esi
call	sub_67E7F0
add	esp, 0Ch

loc_704B5E:
mov	ecx, [esp+4Ch+var_8]
cmp	ecx, ebp
jz	short loc_704B72
mov	edx, [ecx]
mov	eax, [esp+4Ch+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_704B72:
mov	eax, [esp+4Ch+var_10]
cmp	eax, 1
jnz	short loc_704B86
mov	ecx, [esp+4Ch+var_C]
call	sub_666B00
jmp	short loc_704B94

loc_704B86:
cmp	eax, 2
jl	short loc_704B94
mov	ecx, [esp+4Ch+var_C]
call	sub_64A430

loc_704B94:
mov	esi, [esp+4Ch+var_34]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
jmp	loc_704805

loc_704BAC:
mov	eax, [esp+4Ch+var_30]
mov	ebp, [eax+1Ch]
push	eax
mov	ecx, esi
call	sub_6FC3A0
jmp	loc_704A27

loc_704BC0:
cmp	eax, 2
jl	short loc_704BCE
mov	ecx, [esp+4Ch+var_C]
call	sub_64A430

loc_704BCE:
mov	esi, [esp+4Ch+var_34]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
jmp	loc_704805

loc_704BE6:
cmp	[esp+4Ch+var_39], 0
jz	loc_704DEE

loc_704BF1:
cmp	ebp, 1
jnz	loc_704C8E
test	byte ptr [esp+4Ch+arg_8], 30h
mov	edi, [esp+4Ch+var_28]
jz	short loc_704C09
xor	ebp, ebp
jmp	short loc_704C1B

loc_704C09:
mov	ebp, [esp+4Ch+var_38]
test	ebp, ebp
jz	short loc_704C2F
mov	ecx, ebp
push	ecx
mov	ecx, edi
call	sub_7038F0

loc_704C1B:
cmp	[esp+4Ch+var_38], 0
jz	short loc_704C2F
mov	edx, [esp+4Ch+var_38]
mov	eax, [edx+30h]
mov	[edi+2D0h], eax

loc_704C2F:
test	byte ptr [esp+4Ch+arg_8], 1
jnz	short loc_704C42
push	edi
mov	ecx, esi
call	sub_6FC4B0
test	al, al
jnz	short loc_704C4B

loc_704C42:
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_704C4B:
test	ebp, ebp
jz	short loc_704C67
cmp	[esp+4Ch+var_38], 0
jz	short loc_704C5F
mov	ecx, [esp+4Ch+var_38]
call	sub_64A430

loc_704C5F:
mov	[esp+4Ch+var_38], 0

loc_704C67:
test	edi, edi
jz	short loc_704C72
mov	ecx, edi
call	sub_64A430

loc_704C72:
mov	ecx, [esp+4Ch+var_2C]
mov	[esp+4Ch+var_28], 0
test	ecx, ecx
jz	short loc_704C87
call	sub_64A430

loc_704C87:
xor	ebp, ebp
jmp	loc_704DF2

loc_704C8E:
mov	ebp, [esp+4Ch+var_2C]
test	ebp, ebp
jnz	loc_704D61
lea	ecx, [esp+4Ch+arg_0]
call	sub_679E30
mov	eax, [esp+4Ch+var_34]
mov	ebx, [esp+4Ch+arg_8]
lea	ecx, [esp+4Ch+arg_0]
push	ecx
lea	edx, [esp+50h+var_1C]
push	edx
lea	ecx, [esp+54h+var_14]
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
mov	ecx, esi
call	sub_703A40
add	esp, 0Ch
mov	[esp+4Ch+var_2C], eax
test	eax, eax
jnz	short loc_704D50
mov	eax, [esp+4Ch+var_18]
test	eax, eax
jz	short loc_704CF6
mov	edx, [esp+4Ch+arg_0]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
add	eax, 0Ch
push	offset aS_11	; "%s"
push	eax
call	sub_67E7F0
add	esp, 0Ch

loc_704CF6:
mov	ecx, [esp+4Ch+var_20]
call	sub_666B00
lea	ecx, [esp+4Ch+arg_0]
call	sub_4E40F0
lea	ecx, [esp+4Ch+var_8]
call	sub_665F30

loc_704D11:
mov	ecx, [esp+4Ch+var_28]
test	ecx, ecx
jz	short loc_704D1E
call	sub_64A430

loc_704D1E:
mov	ecx, [esp+4Ch+var_38]
test	ecx, ecx
jz	short loc_704D2B
call	sub_64A430

loc_704D2B:
mov	ecx, [esp+4Ch+var_30]
call	sub_666B00
lea	ecx, [esp+4Ch+var_10]
call	sub_6F9720
lea	ecx, [esp+4Ch+var_34]
call	sub_4E40F0
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 3Ch
retn

loc_704D50:
lea	ecx, [esp+4Ch+arg_0]
call	sub_4E40F0
mov	ebp, [esp+4Ch+var_2C]
mov	ebx, [esp+4Ch+var_20]

loc_704D61:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	28h
call	edx
test	eax, eax
jz	short loc_704D8E
mov	ecx, [esp+4Ch+var_14]
mov	edx, [esp+4Ch+var_30]
push	esi
push	ecx
push	ebp
push	ebx
push	edx
mov	ecx, eax
call	sub_7043E0
mov	edi, eax
jmp	short loc_704D90

loc_704D8E:
xor	edi, edi

loc_704D90:
test	byte ptr [esp+4Ch+arg_8], 11h
jnz	short loc_704DA3
push	edi
mov	ecx, esi
call	sub_6FC4B0
test	al, al
jnz	short loc_704DE1

loc_704DA3:
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx
cmp	dword ptr [edi+24h], 0
jnz	short loc_704DE1
test	ebx, ebx
jz	short loc_704DBD
mov	ecx, ebx
call	sub_666B00

loc_704DBD:
mov	ecx, edi
call	sub_64A430
lea	ecx, [esp+4Ch+var_8]
call	sub_665F30
test	ebp, ebp
jz	loc_704D11
mov	ecx, ebp
call	sub_64A430
jmp	loc_704D11

loc_704DE1:
test	edi, edi
jz	short loc_704DF2
mov	ecx, edi
call	sub_64A430
jmp	short loc_704DF2

loc_704DEE:
mov	ebp, [esp+4Ch+var_2C]

loc_704DF2:
mov	eax, [esp+4Ch+arg_C]
mov	ecx, [esp+4Ch+arg_8]
mov	edx, [esp+4Ch+var_38]
push	eax
push	ecx
push	esi
push	edx
push	ebx
call	sub_703BC0
mov	ecx, [esp+60h+var_8]
add	esp, 14h
mov	edi, eax
test	ecx, ecx
jz	short loc_704E21
mov	eax, [ecx]
mov	edx, [esp+4Ch+var_4]
mov	eax, [eax+8]
push	edx
call	eax

loc_704E21:
test	ebp, ebp
jz	short loc_704E2C
mov	ecx, ebp
call	sub_64A430

loc_704E2C:
mov	ecx, [esp+4Ch+var_28]
test	ecx, ecx
jz	short loc_704E39
call	sub_64A430

loc_704E39:
mov	ecx, [esp+4Ch+var_38]
test	ecx, ecx
jz	short loc_704E46
call	sub_64A430

loc_704E46:
mov	ecx, [esp+4Ch+var_30]
call	sub_666B00
mov	eax, [esp+4Ch+var_10]
cmp	eax, 1
jnz	short loc_704E63
mov	ecx, [esp+4Ch+var_C]
call	sub_666B00
jmp	short loc_704E71

loc_704E63:
cmp	eax, 2
jl	short loc_704E71
mov	ecx, [esp+4Ch+var_C]
call	sub_64A430

loc_704E71:
mov	esi, [esp+4Ch+var_34]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_704E97
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_704E97:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn
sub_704640 endp

align 10h



sub_704EB0 proc	near

var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	54h
call	edx
test	eax, eax
jz	short loc_704EDC
push	0
push	0
push	esi
mov	ecx, eax
call	sub_6FDCA0
mov	esi, eax
jmp	short loc_704EDE

loc_704EDC:
xor	esi, esi

loc_704EDE:
mov	ebx, [esp+14h+arg_4]
test	bl, 40h
jz	short loc_704EEB
mov	byte ptr [esi+44h], 1

loc_704EEB:
cmp	dword ptr [esi+38h], 0
jnz	short loc_704F02
mov	ecx, esi
call	sub_64A430
pop	esi
xor	eax, eax
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_704F02:
mov	eax, [esp+14h+arg_0]
push	edi
push	eax
lea	ecx, [esp+1Ch+var_8]
mov	dword ptr [esp+1Ch+var_C], 0
call	sub_67AE10
lea	ecx, [esp+18h+var_4]
call	sub_679E30
mov	ecx, [esp+18h+arg_8]
push	ecx
push	0
push	ebx
lea	edx, [esp+24h+var_C]
push	edx
push	esi
call	sub_704640
add	esp, 14h
lea	ecx, [esp+18h+var_C]
mov	edi, eax
call	sub_68E410
mov	ecx, esi
call	sub_64A430
mov	eax, edi
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_704EB0 endp

align 10h



sub_704F60 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
xor	edi, edi
cmp	eax, edi
jbe	short loc_704F95
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_704FA1
mov	eax, [esi]
cmp	eax, edi
jz	short loc_704F8C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_704F8C:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn

loc_704F95:
cmp	[esi+8], edi
ja	short loc_704FA1
push	edi
push	esi
call	sub_714BE0

loc_704FA1:
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_704F60 endp

align 10h



sub_704FB0 proc	near

arg_0= word ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	ax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
mov	[esi+0Ch], ax
mov	eax, [esp+4+arg_C]
mov	[esi], ecx
test	eax, eax
jnz	short loc_704FCF
mov	eax, offset byte_146D660

loc_704FCF:
push	ebx
push	edi
lea	ebx, [esi+14h]
push	eax
mov	ecx, ebx
call	sub_67A2C0
mov	eax, [esp+0Ch+arg_8]
test	eax, eax
jnz	short loc_704FE9
mov	eax, offset byte_146D660

loc_704FE9:
lea	edi, [esi+18h]
push	eax
mov	ecx, edi
call	sub_67A2C0
mov	eax, [ebx]
mov	edx, [edi]
mov	ecx, [esp+0Ch+arg_10]
and	eax, 0FFFFFFFCh
add	eax, 8
and	edx, 0FFFFFFFCh
mov	[esi+4], eax
mov	eax, [esp+0Ch+arg_14]
add	edx, 8
pop	edi
mov	[esi+10h], ecx
mov	[esi+8], edx
pop	ebx
lea	ecx, [esi+1Ch]
test	eax, eax
jz	short loc_705028
push	eax
call	sub_73D560
pop	esi
retn	18h

loc_705028:
call	sub_704F60
pop	esi
retn	18h
sub_704FB0 endp

align 10h



sub_705040 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebx
push	ebp
push	esi
mov	esi, [esp+30h+arg_0]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
xor	ebx, ebx
cmp	eax, 2
push	edi
mov	[esp+34h+var_10], ecx
mov	[esp+34h+var_1C], ebx
mov	[esi+15h], bl
jge	short loc_70506C
push	2
mov	ecx, esi
call	sub_6A9B70

loc_70506C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ebp, dx
add	eax, 2
mov	edx, 10Ah
mov	[esp+34h+var_18], ebp
mov	[esi+2Ch], eax
cmp	bp, dx
jb	short loc_7050E4
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 4
mov	[esi+15h], bl
jge	short loc_7050B2
push	4
mov	ecx, esi
call	sub_6A9B70

loc_7050B2:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
add	edx, 4
mov	[esi+2Ch], edx
mov	[esp+34h+var_1C], eax

loc_7050E4:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	[esi+15h], bl
cmp	edx, 2
jge	short loc_7050FB
push	2
mov	ecx, esi
call	sub_6A9B70

loc_7050FB:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	edx, dx
add	eax, 2
lea	ecx, [esp+34h+var_24]
mov	[esp+34h+var_14], edx
mov	[esi+2Ch], eax
call	sub_679E30
lea	ecx, [esp+34h+arg_0]
call	sub_679E30
lea	eax, [esp+34h+var_24]
push	eax
mov	ecx, esi
call	sub_6AA580
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	ecx, esi
call	sub_6AA580
mov	edx, 36Fh
mov	[esp+34h+var_C], ebx
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], ebx
cmp	bp, dx
jb	loc_70524E
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	[esi+15h], bl
cmp	eax, 2
jge	short loc_70517C
push	2
mov	ecx, esi
call	sub_6A9B70

loc_70517C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
xor	edx, edx
mov	[esi+2Ch], eax
cmp	dx, cx
jnb	loc_70524E
movzx	eax, cx
mov	[esp+34h+var_20], eax

loc_7051B0:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 4
jge	short loc_7051C8
push	4
mov	ecx, esi
call	sub_6A9B70

loc_7051C8:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+3]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+2]
shl	edi, 8
or	edi, edx
movzx	edx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edi, 8
or	edi, edx
shl	edi, 8
add	ecx, 4
lea	ebp, [ebx+1]
or	edi, eax
mov	[esi+2Ch], ecx
cmp	ebp, ebx
jnb	short loc_70520F
mov	ecx, [esp+34h+var_4]
shr	ecx, 1
cmp	ebp, ecx
jnb	short loc_70522B
push	ebp
lea	edx, [esp+38h+var_C]
push	edx
jmp	short loc_705222

loc_70520F:
cmp	ebp, [esp+34h+var_4]
jb	short loc_70522B
mov	eax, ebp
shr	eax, 2
add	eax, ebp
push	eax
lea	ecx, [esp+38h+var_C]
push	ecx

loc_705222:
lea	ecx, [esp+3Ch+var_C]
call	sub_714BE0

loc_70522B:
mov	edx, [esp+34h+var_C]
lea	eax, [edx+ebp*4-4]
mov	ebx, ebp
mov	[esp+34h+var_8], ebx
test	eax, eax
jz	short loc_70523F
mov	[eax], edi

loc_70523F:
sub	[esp+34h+var_20], 1
jnz	loc_7051B0
mov	ebp, [esp+34h+var_18]

loc_70524E:
mov	ecx, [esp+34h+arg_0]
mov	edx, [esp+34h+var_24]
mov	ebx, [esp+34h+var_1C]
movzx	edi, word ptr [esp+34h+var_14]
push	ebx
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
and	edx, 0FFFFFFFCh
movzx	eax, bp
add	edx, 8
push	edx
mov	edx, [esp+40h+arg_4]
push	edi
mov	ecx, eax
and	ecx, 0FFh
push	ecx
shr	eax, 8
push	eax
push	edx
push	offset aExportinfoTagt ; "  ExportInfo:	tagType	= %d, tool ver = "...
push	esi
call	nullsub_2
mov	ecx, [esp+58h+var_24]
mov	edx, [esp+58h+arg_0]
add	esp, 24h
lea	eax, [esp+34h+var_C]
push	eax
push	ebx
and	ecx, 0FFFFFFFCh
add	ecx, 8
push	ecx
mov	ecx, [esp+40h+var_10]
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
push	edi
push	ebp
call	sub_704FB0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+34h+var_C]
mov	eax, [eax+30h]
push	edx
call	eax
mov	esi, [esp+34h+arg_0]
mov	edi, ds:InterlockedExchangeAdd
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7052F3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7052F3:
mov	esi, [esp+34h+var_24]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_705315
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_705315:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	8
sub_705040 endp

align 10h



sub_705320 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_0]
mov	eax, [edi]
mov	edx, [eax+10h]
mov	esi, ecx
mov	ecx, edi
call	edx
mov	[esi+244h], eax
mov	eax, [edi]
mov	edx, [eax+28h]
push	4
lea	ecx, [esp+18h+var_4]
push	ecx
xor	ebx, ebx
mov	ecx, edi
mov	[esp+1Ch+var_4], ebx
call	edx
mov	eax, [edi]
mov	edx, [eax+28h]
push	4
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, edi
mov	[esp+1Ch+arg_0], ebx
call	edx
mov	ebp, [esp+14h+arg_0]
mov	eax, [esi+244h]
add	eax, ebp
mov	[esi+248h], eax
mov	eax, [esp+14h+var_4]
mov	edx, eax
shr	edx, 18h
cmp	al, 43h
mov	[esi+24Ch], ebx
mov	[esi+270h], ebx
setz	bl
mov	ecx, eax
and	ecx, offset sub_FFFFFF
mov	[esi+250h], ebp
mov	[esi+254h], edx
cmp	ecx, 535746h
jz	short loc_7053E7
cmp	ecx, offset loc_535743
jz	short loc_7053E7
cmp	ecx, 584647h
jz	short loc_7053E7
cmp	ecx, 584643h
jz	short loc_7053E7
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_7053DD
add	eax, 0Ch
push	offset aErrorGfxload_0 ; "Error: GFxLoader read	failed - file doe"...
push	eax
call	sub_67E7F0
add	esp, 8

loc_7053DD:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	14h

loc_7053E7:
and	eax, (offset loc_FEFFFD+3)
cmp	eax, offset loc_580000
jnz	short loc_7053FD
mov	dword ptr [esi+270h], 10h

loc_7053FD:
test	bl, bl
jz	short loc_705408
or	dword ptr [esi+270h], 1

loc_705408:
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_70541E
mov	ecx, [esp+14h+arg_C]
test	ecx, ecx
jz	short loc_70541E
test	byte ptr [ecx+0Ch], 1
jnz	short loc_705425

loc_70541E:
mov	byte ptr [esp+14h+arg_10], 0
jmp	short loc_70543E

loc_705425:
cmp	byte ptr [esp+14h+arg_10], 0
jz	short loc_70543E
push	ebp
push	edx
push	offset aSwfFileVersion ; "SWF File version = %d, File length = %d"...
push	30h
push	eax
call	sub_7034E0
add	esp, 14h

loc_70543E:
mov	ecx, edi
call	sub_64A420
mov	ebp, edi
test	bl, bl
jz	short loc_7054BD
mov	ebp, [esp+14h+arg_8]
test	ebp, ebp
jnz	short loc_70547D
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_70546C
add	eax, 0Ch
push	offset aErrorGfxload_1 ; "Error: GFxLoader - unable to read compr"...
push	eax
call	sub_67E7F0
add	esp, 8

loc_70546C:
mov	ecx, edi
call	sub_64A430
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	14h

loc_70547D:
cmp	byte ptr [esp+14h+arg_10], 0
mov	ebx, [esp+14h+arg_4]
jz	short loc_705498
push	offset aSwfFileIsCompr ; "SWF file is compressed.\n"
push	30h
push	ebx
call	sub_7034E0
add	esp, 0Ch

loc_705498:
mov	edx, [ebp+0]
mov	eax, [edx+4]
push	edi
mov	ecx, ebp
call	eax
mov	ecx, edi
mov	ebp, eax
call	sub_64A430
mov	ecx, [esi+250h]
sub	ecx, 8
mov	[esi+248h], ecx
jmp	short loc_7054C1

loc_7054BD:
mov	ebx, [esp+14h+arg_4]

loc_7054C1:
mov	edx, [esp+14h+arg_C]
push	edx
push	ebx
push	ebp
mov	ecx, esi
call	sub_6A9AA0
lea	eax, [esi+258h]
push	eax
mov	ecx, esi
call	sub_6AABD0
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_7054F5
push	2
mov	ecx, esi
call	sub_6A9B70

loc_7054F5:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	ecx, [esi+30h]
mov	[esp+14h+arg_10], edx
add	eax, 2
sub	ecx, eax
cmp	ecx, 2
fild	[esp+14h+arg_10]
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
fmul	ds:dbl_15FD8A0
fstp	dword ptr [esi+268h]
jge	short loc_705545
push	2
mov	ecx, esi
call	sub_6A9B70

loc_705545:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
add	eax, 2
test	byte ptr [esi+270h], 10h
mov	[esi+2Ch], eax
mov	[esi+26Ch], edx
jz	short loc_7055E3
mov	ecx, [esi+34h]
sub	ecx, [esi+30h]
add	ecx, eax
cmp	ecx, [esi+248h]
jnb	short loc_7055E3
mov	ecx, esi
call	sub_6AA7D0
cmp	eax, 3E8h
jnz	loc_705622
push	eax
lea	edi, [esi+274h]
push	esi
mov	ecx, edi
call	sub_705040
mov	edx, [edi]
neg	edx
sbb	edx, edx
and	edx, edi
movzx	eax, word ptr [edx+0Ch]
and	eax, 0FFFFFF00h
cmp	eax, 300h
jl	short loc_7055F8
mov	ecx, [edi]
neg	ecx
sbb	ecx, ecx
and	ecx, edi
movzx	edx, word ptr [ecx+0Ch]
and	edx, 0FFFFFF00h
cmp	edx, 400h
jg	short loc_7055F8
mov	ecx, esi
call	sub_6A9DB0

loc_7055E3:
test	ebp, ebp
jz	short loc_7055EE
mov	ecx, ebp
call	sub_64A430

loc_7055EE:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn	14h

loc_7055F8:
test	ebx, ebx
jz	short loc_70560D
push	offset aErrorGfxload_2 ; "Error: GFxLoader read	failed - incompat"...
add	ebx, 0Ch
push	ebx
call	sub_67E7F0
add	esp, 8

loc_70560D:
test	ebp, ebp
jz	short loc_705618
mov	ecx, ebp
call	sub_64A430

loc_705618:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	14h

loc_705622:
test	ebx, ebx
jz	short loc_705637
push	offset aErrorGfxload_3 ; "Error: GFxLoader read	failed - no Expor"...
add	ebx, 0Ch
push	ebx
call	sub_67E7F0
add	esp, 8

loc_705637:
test	ebp, ebp
jz	short loc_705618
mov	ecx, ebp
call	sub_64A430
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn	14h
sub_705320 endp

align 10h



sub_705650 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], offset off_1437474
mov	dword ptr [esi+10h], offset off_143F300
mov	dword ptr [esi], offset	off_143F408
mov	dword ptr [esi+8], offset off_143F3F4
mov	dword ptr [esi+10h], offset off_143F3EC
xor	ebx, ebx
mov	[esi+14h], ebx
push	edi
lea	eax, [esi+1Ch]
mov	[esi+18h], ebx
push	ebx		; int
lea	ecx, [esi+24h]	; lpCriticalSection
mov	[eax], eax
mov	[eax+4], eax
call	sub_64D6D0
mov	al, [esp+0Ch+arg_4]
mov	[esi+3Ch], al
mov	eax, [esp+0Ch+arg_0]
cmp	eax, ebx
jz	short loc_7056C9
mov	edi, [eax+8]
cmp	edi, ebx
jz	short loc_7056BA
mov	ecx, edi
call	sub_64A420

loc_7056BA:
mov	ecx, [esi+18h]
cmp	ecx, ebx
jz	short loc_7056C6
call	sub_64A430

loc_7056C6:
mov	[esi+18h], edi

loc_7056C9:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	34h
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_70572E
mov	dword ptr [edi], offset	off_155F500
mov	dword ptr [edi+4], 1
mov	dword ptr [edi+8], offset off_1437474
mov	dword ptr [edi+10h], offset off_143F300
mov	dword ptr [edi], offset	off_14376F0
mov	dword ptr [edi+8], offset off_14376DC
mov	dword ptr [edi+10h], offset off_14376D4
mov	[edi+14h], ebx
push	ebx		; int
lea	ecx, [edi+1Ch]	; lpCriticalSection
mov	[edi+18h], ebx
call	sub_64D6D0
mov	ecx, [edi+14h]
cmp	ecx, ebx
jz	short loc_705729
call	sub_64A430

loc_705729:
mov	[edi+14h], ebx
jmp	short loc_705730

loc_70572E:
xor	edi, edi

loc_705730:
mov	ecx, [esi+14h]
cmp	ecx, ebx
jz	short loc_70573C
call	sub_64A430

loc_70573C:
mov	[esi+14h], edi
cmp	edi, ebx
jz	loc_7058CE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	10h
call	eax
cmp	eax, ebx
jz	short loc_705787
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax+8], 4
mov	dword ptr [eax+0Ch], offset off_15BC268
mov	dword ptr [eax], offset	off_15BC1B4
mov	dword ptr [eax+0Ch], offset off_15BC0FC
mov	edi, eax
jmp	short loc_705789

loc_705787:
xor	edi, edi

loc_705789:
mov	ecx, [esi+14h]
mov	edx, [ecx+8]
mov	eax, [edx+8]
add	ecx, 8
push	edi
push	4
call	eax
cmp	edi, ebx
jz	short loc_7057A5
mov	ecx, edi
call	sub_64A430

loc_7057A5:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	10h
call	eax
cmp	eax, ebx
jz	short loc_7057DA
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax+8], 0Ch
mov	dword ptr [eax], offset	off_143F45C
mov	[eax+0Ch], bl
mov	edi, eax
jmp	short loc_7057DC

loc_7057DA:
xor	edi, edi

loc_7057DC:
mov	ecx, [esi+14h]
mov	edx, [ecx+8]
mov	eax, [edx+8]
add	ecx, 8
push	edi
push	0Ch
call	eax
cmp	edi, ebx
jz	short loc_7057F8
mov	ecx, edi
call	sub_64A430

loc_7057F8:
mov	ecx, [esi+14h]
mov	edx, [ecx+8]
mov	eax, [edx+8]
add	ecx, 8
push	ebx
push	11h
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	4Ch
call	eax
cmp	eax, ebx
jz	short loc_70582F
movzx	ecx, byte ptr [esi+3Ch]
push	ecx
push	1
mov	ecx, eax
call	sub_7444A0
mov	edi, eax
jmp	short loc_705831

loc_70582F:
xor	edi, edi

loc_705831:
mov	ecx, [esi+14h]
mov	edx, [ecx+8]
mov	eax, [edx+8]
add	ecx, 8
push	edi
push	12h
call	eax
cmp	edi, ebx
jz	short loc_70584D
mov	ecx, edi
call	sub_64A430

loc_70584D:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	20h
call	eax
cmp	eax, ebx
jz	short loc_70586C
mov	ecx, eax
call	sub_6C7660
mov	edi, eax
jmp	short loc_70586E

loc_70586C:
xor	edi, edi

loc_70586E:
mov	ecx, [esi+14h]
mov	edx, [ecx+8]
mov	eax, [edx+8]
add	ecx, 8
push	edi
push	18h
call	eax
cmp	edi, ebx
jz	short loc_70588A
mov	ecx, edi
call	sub_64A430

loc_70588A:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	18h
call	eax
cmp	eax, ebx
jz	short loc_7058A7
mov	ecx, eax
call	sub_6C9F70
jmp	short loc_7058A9

loc_7058A7:
xor	eax, eax

loc_7058A9:
mov	ecx, eax
call	sub_6C9FE0
mov	ecx, [esi+14h]
mov	edx, [ecx+8]
mov	edi, eax
mov	eax, [edx+8]
add	ecx, 8
push	edi
push	19h
call	eax
cmp	edi, ebx
jz	short loc_7058CE
mov	ecx, edi
call	sub_64A430

loc_7058CE:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_705650 endp

align 10h



sub_7058E0 proc	near

var_2B8= dword ptr -2B8h
var_2B4= byte ptr -2B4h
var_2B0= byte ptr -2B0h
var_2AC= byte ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= byte ptr -2A0h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_58=	dword ptr -58h
var_50=	byte ptr -50h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h

sub	esp, 2B8h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2B8h+var_4], eax
push	ebx
push	ebp
mov	ebp, [esp+2C0h+arg_0]
push	esi
push	edi
mov	edi, [esp+2C8h+arg_4]
xor	ebx, ebx
mov	esi, ecx
cmp	edi, ebx
jz	loc_705AFD
fldz
xor	eax, eax
mov	[edi+1Ch], ax
fstp	dword ptr [edi+10h]
mov	[edi], ebx
mov	[edi+4], ebx
mov	[edi+0Ch], ebx
mov	[edi+8], ebx
mov	[edi+18h], ebx
mov	[edi+14h], ebx
mov	[edi+20h], ebx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	54h
call	eax
cmp	eax, ebx
jz	short loc_705953
push	ebx
push	ebx
push	esi
mov	ecx, eax
call	sub_6FDCA0
mov	esi, eax
jmp	short loc_705955

loc_705953:
xor	esi, esi

loc_705955:
cmp	[esi+38h], ebx
jz	loc_705AF6
push	ebp
lea	ecx, [esp+2CCh+var_2B0]
mov	dword ptr [esp+2CCh+var_2B4], ebx
call	sub_67AE10
lea	ecx, [esp+2C8h+var_2AC]
call	sub_679E30
lea	ecx, [esp+2C8h+var_2B8]
call	sub_679E30
lea	ecx, [esp+2C8h+var_2B4]
push	ecx
lea	edx, [esp+2CCh+var_2B8]
push	edx
mov	ecx, esi
call	sub_6FC480
mov	eax, [esp+2C8h+arg_C]
push	eax
mov	ecx, esi
call	sub_6FC380
mov	ecx, [esi+8]
mov	ebp, [ecx+8]
mov	ebx, eax
test	ebp, ebp
jz	short loc_7059C1
mov	eax, [esp+2C8h+var_2B8]
mov	edx, [ebp+0]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
mov	eax, [edx+8]
mov	ecx, ebp
call	eax
jmp	short loc_7059C5

loc_7059C1:
xor	eax, eax
xor	edx, edx

loc_7059C5:
mov	ecx, [esi+8]
mov	ecx, [ecx+20h]
push	ecx
push	ebx
push	ebp
push	edx
mov	edx, [esp+2D8h+var_2B8]
push	eax
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
lea	eax, [esp+2E0h+var_2A8]
push	eax
call	sub_6ACC40
mov	ecx, [esi+38h]
add	esp, 1Ch
lea	edx, [esp+2C8h+var_2A8]
push	edx
call	sub_666DA0
mov	ecx, [esp+2C8h+var_2A8]
mov	ebp, eax
test	ecx, ecx
jz	short loc_705A0B
mov	eax, [ecx]
mov	edx, [esp+2C8h+var_2A4]
mov	eax, [eax+8]
push	edx
call	eax

loc_705A0B:
mov	ebx, 1
test	ebp, ebp
jz	short loc_705A8F
mov	ecx, [ebp+20h]
push	edi
add	ecx, 28h
call	sub_703860
cmp	[esp+2C8h+arg_8], 0
jz	short loc_705A36
mov	ecx, [ebp+20h]
mov	edx, [ecx+8Ch]
mov	[edi+18h], edx

loc_705A36:
mov	ecx, ebp
call	sub_666B00

loc_705A3D:
mov	edi, [esp+2C8h+var_2B8]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, ebx
jnz	short loc_705A62
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_705A62:
lea	ecx, [esp+2C8h+var_2B4]
call	sub_68E410
mov	ecx, esi
call	sub_64A430
mov	al, bl

loc_705A74:
mov	ecx, [esp+2C8h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 2B8h
retn	10h

loc_705A8F:
mov	eax, [esp+2C8h+var_2B8]
and	eax, 0FFFFFFFCh
push	0
add	eax, 8
push	eax
mov	ecx, esi
call	sub_6FC3E0
mov	ebp, eax
test	ebp, ebp
jz	short loc_705AE4
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+2CCh+var_2A0]
call	sub_6FD410
mov	eax, [esi+10h]
mov	ecx, [esi+28h]
mov	edx, [esi+0Ch]
push	0
push	eax
push	ecx
push	edx
push	ebp
lea	ecx, [esp+2DCh+var_2A0]
call	sub_705320
test	al, al
jnz	short loc_705B04
lea	ecx, [esp+2C8h+var_2A0]
call	sub_6FD1D0
mov	ecx, ebp
call	sub_64A430

loc_705AE4:
lea	ecx, [esp+2C8h+var_2B8]
call	sub_4E40F0
lea	ecx, [esp+2C8h+var_2B4]
call	sub_68E410

loc_705AF6:
mov	ecx, esi
call	sub_64A430

loc_705AFD:
xor	al, al
jmp	loc_705A74

loc_705B04:
push	edi
lea	ecx, [esp+2CCh+var_50]
call	sub_703860
cmp	[esp+2C8h+arg_8], 0
jz	short loc_705B5A
mov	ecx, [esp+2C8h+var_26C]
sub	ecx, [esp+2C8h+var_270]
add	ecx, [esp+2C8h+var_274]
cmp	ecx, [esp+2C8h+var_58]
jnb	short loc_705B5A

loc_705B30:
lea	ecx, [esp+2C8h+var_2A0]
call	sub_6AA7D0
lea	ecx, [esp+2C8h+var_2A0]
call	sub_6A9DB0
mov	edx, [esp+2C8h+var_26C]
sub	edx, [esp+2C8h+var_270]
add	[edi+18h], ebx
add	edx, [esp+2C8h+var_274]
cmp	edx, [esp+2C8h+var_58]
jb	short loc_705B30

loc_705B5A:
lea	ecx, [esp+2C8h+var_2A0]
call	sub_6FD1D0
mov	ecx, ebp
call	sub_64A430
jmp	loc_705A3D
sub_7058E0 endp

align 10h



sub_705B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+30h]
cmp	eax, edx
jbe	short loc_705B94
mov	ecx, [ecx+4]
sub	eax, edx
cmp	eax, [ecx+0Ch]
jb	short loc_705B94
mov	edx, [esi]
push	eax
mov	eax, [edx+18h]
mov	ecx, esi
call	eax

loc_705B94:
pop	esi
retn	8
sub_705B70 endp

align 10h



; int __thiscall sub_705BA0(void *, char)
sub_705BA0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437D84
jz	short loc_705BB9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_705BB9:
mov	eax, esi
pop	esi
retn	4
sub_705BA0 endp

align 10h



sub_705BC0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+60h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx+1Ch]
xor	edx, edx
cmp	eax, edx
jz	short loc_705BF5
mov	[ecx+1Ch], edx
mov	[ecx+18h], edx
lea	ecx, [esi+58h]
mov	[eax+8], edx
mov	edx, [ecx]
mov	[eax], edx
mov	[eax+4], ecx
mov	edx, [ecx]
mov	[edx+4], eax
mov	[ecx], eax

loc_705BF5:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn	4
sub_705BC0 endp

align 10h



sub_705C10 proc	near
push	ebx
push	esi
mov	esi, ecx
add	dword ptr [esi+7Ch], 0FFFFFFFFh
push	edi
jnz	short loc_705C51
lea	edx, [esi+34h]
cmp	[edx+4], edx
jz	short loc_705C4B
lea	ecx, [esi+3Ch]

loc_705C26:
mov	eax, [esi+38h]
mov	edi, [eax]
mov	ebx, [eax+4]
mov	[edi+4], ebx
mov	edi, [eax+4]
mov	ebx, [eax]
mov	[edi], ebx
mov	edi, [ecx]
mov	[eax], edi
mov	[eax+4], ecx
mov	edi, [ecx]
mov	[edi+4], eax
mov	[ecx], eax
cmp	[edx+4], edx
jnz	short loc_705C26

loc_705C4B:
mov	eax, [esi+78h]
mov	[esi+7Ch], eax

loc_705C51:
mov	edi, [esi+40h]
xor	eax, eax
lea	ebx, [esi+3Ch]
mov	[esi+18h], eax
mov	[esi+1Ch], eax
cmp	edi, ebx
jz	short loc_705C78

loc_705C63:
inc	dword ptr [esi+18h]
mov	ecx, [edi+10h]
call	sub_746E80
add	[esi+1Ch], eax
mov	edi, [edi+4]
cmp	edi, ebx
jnz	short loc_705C63

loc_705C78:
pop	edi
pop	esi
pop	ebx
retn
sub_705C10 endp

align 10h



sub_705C80 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+8]
mov	ebx, [esi+14h]
push	edi
mov	edi, ecx
mov	ecx, [esi+0Ch]
mov	[eax+0Ch], ecx
mov	edx, [esi+0Ch]
mov	eax, [esi+8]
mov	[edx+8], eax
add	dword ptr [ebx+0Ch], 0FFFFFFFFh
jnz	short loc_705CE7
cmp	ebx, [edi+88h]
jz	short loc_705CE7
push	ebp
lea	ebp, [edi+60h]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [ebx+8]
xor	ecx, ecx
cmp	eax, ecx
jz	short loc_705CC8
mov	[eax+1Ch], ecx
mov	[eax+18h], ecx
jmp	short loc_705CD7

loc_705CC8:
mov	ecx, [ebx]
mov	edx, [ebx+4]
mov	[ecx+4], edx
mov	eax, [ebx+4]
mov	ecx, [ebx]
mov	[eax], ecx

loc_705CD7:
mov	edx, [edi+50h]
mov	[ebx], edx
push	ebp		; lpCriticalSection
mov	[edi+50h], ebx
call	ds:LeaveCriticalSection
pop	ebp

loc_705CE7:
dec	dword ptr [edi+18h]
mov	ecx, [esi+10h]
call	sub_746E80
sub	[edi+1Ch], eax
mov	eax, [esi]
mov	ecx, [esi+4]
mov	[eax+4], ecx
mov	edx, [esi+4]
mov	eax, [esi]
mov	[edx], eax
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_705D13
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_705D13:
mov	ecx, [edi+2Ch]
mov	[esi], ecx
mov	[edi+2Ch], esi
pop	edi
pop	esi
pop	ebx
retn	4
sub_705C80 endp

align 10h



sub_705D30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [eax+1Ch]
test	edx, edx
jnz	short loc_705D40
xor	al, al
retn	8

loc_705D40:
mov	eax, [edx+1Ch]
add	edx, 10h
push	esi
cmp	eax, edx
jz	short loc_705D5C
mov	esi, [esp+4+arg_4]
nop

loc_705D50:
cmp	[eax+10h], esi
jz	short loc_705D62
mov	eax, [eax+0Ch]
cmp	eax, edx
jnz	short loc_705D50

loc_705D5C:
xor	al, al
pop	esi
retn	8

loc_705D62:
push	eax
call	sub_705C80
mov	al, 1
pop	esi
retn	8
sub_705D30 endp

align 10h



sub_705D70 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+60h]
push	esi		; lpCriticalSection
mov	[esp+14h+var_4], esi
call	ds:EnterCriticalSection
lea	ebp, [edi+58h]
cmp	[ebp+4], ebp
jz	short loc_705DBA
push	ebx
lea	ecx, [ecx+0]

loc_705D90:
mov	ebx, [edi+5Ch]
lea	esi, [ebx+10h]
cmp	[esi+0Ch], esi
jz	short loc_705DB0
jmp	short loc_705DA0
align 10h

loc_705DA0:
mov	eax, [ebx+1Ch]
push	eax
mov	ecx, edi
call	sub_705C80
cmp	[esi+0Ch], esi
jnz	short loc_705DA0

loc_705DB0:
cmp	[ebp+4], ebp
jnz	short loc_705D90
mov	esi, [esp+14h+var_4]
pop	ebx

loc_705DBA:		; lpCriticalSection
push	esi
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ecx
retn
sub_705D70 endp

align 10h



sub_705DD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	eax, [edi]
mov	edx, [eax+58h]
mov	ebx, ecx
mov	ecx, edi
call	edx
mov	[esp+10h+arg_0], eax

loc_705DE7:
mov	eax, [edi]
mov	edx, [eax+58h]
mov	ecx, edi
call	edx
mov	esi, [ebx+4]
mov	ebp, eax
lea	eax, [esi+3Ch]
cmp	[eax+4], eax
jz	short loc_705E17
mov	eax, [esi+40h]
mov	ecx, [eax+10h]
cmp	byte ptr [ecx+19h], 0
jnz	short loc_705E17
push	eax
mov	ecx, esi
call	sub_705C80
inc	dword ptr [esi+84h]

loc_705E17:
mov	edx, [edi]
mov	eax, [edx+58h]
mov	ecx, edi
call	eax
cmp	eax, ebp
jnb	short loc_705E31
mov	ecx, [esp+10h+arg_4]
lea	edx, [eax+ecx]
cmp	edx, [esp+10h+arg_0]
ja	short loc_705DE7

loc_705E31:
mov	ecx, [esp+10h+arg_4]
add	eax, ecx
cmp	eax, [esp+10h+arg_0]
jbe	short loc_705E4C
mov	edx, [edi+30h]
mov	eax, [edi]
mov	eax, [eax+18h]
add	edx, ecx
push	edx
mov	ecx, edi
call	eax

loc_705E4C:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8
sub_705DD0 endp

align 10h



sub_705E60 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_705E8B
push	esi
lea	ebx, [ebx+0]

loc_705E70:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax+0BE8h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_705E70
pop	esi

loc_705E8B:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	dword ptr [edi+8], 7Fh
mov	dword ptr [edi+0Ch], 0
pop	edi
retn
sub_705E60 endp

align 10h



sub_705EB0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_705EC3
mov	ecx, [eax]
mov	[esi+0Ch], ecx
pop	esi
pop	ecx
retn

loc_705EC3:
mov	ecx, [esi+8]
cmp	ecx, 7Fh
jnb	short loc_705EDB
mov	eax, [esi+4]
lea	edx, [ecx+ecx*2]
inc	ecx
mov	[esi+8], ecx
lea	eax, [eax+edx*8]
pop	esi
pop	ecx
retn

loc_705EDB:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
push	edi
lea	edi, [esp+0Ch+var_4]
push	edi
mov	[esp+10h+var_4], 8Ah
mov	edx, [ecx]
push	0BECh
push	eax
mov	eax, [edx+38h]
call	eax
mov	dword ptr [eax+0BE8h], 0
mov	ecx, [esi+4]
pop	edi
test	ecx, ecx
jz	short loc_705F24
mov	[ecx+0BE8h], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn

loc_705F24:
mov	[esi], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn
sub_705EB0 endp

align 10h



sub_705F40 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_705F6B
push	esi
lea	ebx, [ebx+0]

loc_705F50:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax+13D8h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_705F50
pop	esi

loc_705F6B:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	dword ptr [edi+8], 7Fh
mov	dword ptr [edi+0Ch], 0
pop	edi
retn
sub_705F40 endp

align 10h



sub_705F90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_143F698
test	ecx, ecx
jz	short loc_705FB4
call	sub_68D080
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_705FB4
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_705FB4:
mov	ecx, [esi+14h]
call	sub_64A400
mov	ecx, [esi+10h]
call	sub_64A400
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_705FF0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_705FF0:
mov	eax, esi
pop	esi
retn	4
sub_705F90 endp

align 10h



sub_706000 proc	near

; FUNCTION CHUNK AT 00749F70 SIZE 0000007F BYTES

push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
call	sub_705D70
mov	ecx, [esi+14h]
call	sub_705C10
mov	esi, [esi+10h]
test	esi, esi
jz	short loc_70603A
push	edi
mov	edi, [esi+3B0h]
test	edi, edi
jz	short loc_706039
mov	ecx, esi
call	sub_749EC0
cmp	eax, edi
jbe	short loc_706039
pop	edi
mov	ecx, esi
pop	esi
jmp	loc_749F70

loc_706039:
pop	edi

loc_70603A:
pop	esi
retn
sub_706000 endp

align 10h



sub_706040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
mov	eax, [esp+4+arg_0]
mov	eax, [eax+1Ch]
push	ebx
mov	ebx, ecx
test	eax, eax
jnz	short loc_706054
pop	ebx
pop	ecx
retn	14h

loc_706054:
push	ebp
push	esi
mov	esi, [eax+1Ch]
add	eax, 10h
push	edi
mov	[esp+14h+var_4], eax
cmp	esi, eax
jz	loc_7060FC
mov	ebp, [esp+14h+arg_10]
mov	edi, [esp+14h+arg_8]

loc_706071:
mov	ecx, [esp+14h+arg_C]
push	ebp
push	ecx
mov	ecx, [esi+10h]
push	edi
call	sub_746DA0
test	al, al
jnz	short loc_7060C2
test	edi, edi
jz	short loc_7060AF
cmp	[ebx+80h], al
jnz	short loc_706095
cmp	edi, 2
jz	short loc_7060A3

loc_706095:
cmp	byte ptr [ebx+81h], 0
jnz	short loc_7060AF
cmp	edi, 1
jnz	short loc_7060AF

loc_7060A3:
mov	edx, [esi+10h]
mov	eax, [esp+14h+arg_4]
cmp	eax, [edx+64h]
jz	short loc_7060ED

loc_7060AF:
mov	esi, [esi+0Ch]
cmp	esi, [esp+14h+var_4]
jnz	short loc_706071
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	14h

loc_7060C2:
mov	ecx, [esi]
mov	edx, [esi+4]
mov	[ecx+4], edx
mov	ecx, [esi+4]
mov	edx, [esi]
lea	eax, [ebx+3Ch]
mov	[ecx], edx
mov	ecx, [eax]
mov	[esi+4], eax
mov	[esi], ecx
mov	edx, [eax]
mov	[edx+4], esi
pop	edi
mov	[eax], esi
mov	eax, [esi+10h]
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	14h

loc_7060ED:
mov	ecx, [esp+14h+arg_0]
mov	eax, edx
push	eax
push	ecx
mov	ecx, ebx
call	sub_705D30

loc_7060FC:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	14h
sub_706040 endp

align 10h



sub_706110 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_706122
mov	ecx, [eax]
mov	[esi+0Ch], ecx
jmp	short loc_706183

loc_706122:
mov	ecx, [esi+8]
cmp	ecx, 7Fh
jnb	short loc_706139
mov	eax, [esi+4]
lea	edx, [ecx+ecx*4]
inc	ecx
lea	eax, [eax+edx*8]
mov	[esi+8], ecx
jmp	short loc_706183

loc_706139:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
push	ebx
lea	ebx, [esp+0Ch+var_4]
push	ebx
mov	[esp+10h+var_4], 8Ah
mov	edx, [ecx]
push	13DCh
push	eax
mov	eax, [edx+38h]
call	eax
mov	dword ptr [eax+13D8h], 0
mov	ecx, [esi+4]
pop	ebx
test	ecx, ecx
jz	short loc_706177
mov	[ecx+13D8h], eax
jmp	short loc_706179

loc_706177:
mov	[esi], eax

loc_706179:
mov	[esi+4], eax
mov	dword ptr [esi+8], 1

loc_706183:
pop	esi
test	eax, eax
jz	short loc_70619F
lea	ecx, [eax+10h]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	[ecx+8], ecx
mov	[ecx+0Ch], ecx

loc_70619F:
pop	ecx
retn
sub_706110 endp

align 10h



sub_7061B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	[esi+8], eax
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143F69C
mov	dword ptr [esi+0Ch], (offset loc_7FFFFF+1)
mov	dword ptr [esi+10h], offset off_143F68C
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+2Ch], ebx
push	edi
lea	eax, [esi+20h]
mov	[eax+10h], eax
lea	edi, [esi+10h]
mov	ecx, 7Fh
mov	[eax+8], ecx
lea	eax, [esi+34h]
mov	[eax], eax
mov	[eax+4], eax
lea	eax, [esi+3Ch]
mov	[eax], eax
mov	[eax+4], eax
lea	eax, [esi+44h]
mov	[eax+8], ecx
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], eax
lea	eax, [esi+58h]
push	ebx		; int
lea	ecx, [esi+60h]	; lpCriticalSection
mov	[eax], eax
mov	[eax+4], eax
call	sub_64D6D0
mov	ecx, [esi+8]
mov	dword ptr [esi+78h], 1
mov	dword ptr [esi+7Ch], 1
mov	byte ptr [esi+80h], 1
mov	[esi+81h], bl
mov	[esi+84h], ebx
mov	[esi+88h], ebx
mov	[esi+14h], esi
mov	edx, [ecx]
mov	eax, [edx+14h]
push	edi
call	eax
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [esi+0Ch]
mov	edx, [edx+18h]
push	eax
call	edx
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_7061B0 endp

align 10h



sub_706280 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	dword ptr [esi], offset	off_143F69C
mov	eax, [ecx]
mov	edx, [eax+18h]
push	edi
push	0
call	edx
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+14h]
push	0
call	edx
mov	ecx, esi
call	sub_705D70
lea	edi, [esi+3Ch]
cmp	[edi+4], edi
jz	short loc_7062C1

loc_7062B1:
mov	eax, [esi+40h]
push	eax
mov	ecx, esi
call	sub_705C80
cmp	[edi+4], edi
jnz	short loc_7062B1

loc_7062C1:
push	ebx
lea	ebx, [esi+20h]
mov	ecx, ebx
call	sub_705E60
lea	edi, [esi+44h]
mov	ecx, edi
call	sub_705F40
lea	ecx, [esi+60h]	; lpCriticalSection
call	sub_64D730
mov	eax, [edi]
test	eax, eax
jz	short loc_70630A
jmp	short loc_7062F0
align 10h

loc_7062F0:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [eax+13D8h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, edi
test	edi, edi
jnz	short loc_7062F0

loc_70630A:
mov	eax, [ebx]
pop	ebx
test	eax, eax
jz	short loc_70632B

loc_706311:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [eax+0BE8h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, edi
test	edi, edi
jnz	short loc_706311

loc_70632B:
pop	edi
mov	dword ptr [esi+10h], offset off_1437D84
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_706280 endp

align 10h



sub_706340 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx+1Ch]
mov	esi, ecx
test	edi, edi
jnz	short loc_706363
lea	ecx, [esi+44h]
call	sub_706110
mov	edi, eax
mov	[edi+8], ebx
mov	[ebx+1Ch], edi
mov	[ebx+18h], esi

loc_706363:
lea	ecx, [esi+20h]
mov	[esi+88h], edi
call	sub_705EB0
mov	ecx, [esp+0Ch+arg_4]
mov	[eax+10h], ecx
mov	[eax+14h], edi
mov	edx, [esi+34h]
mov	[eax], edx
lea	ecx, [esi+34h]
mov	[eax+4], ecx
mov	edx, [ecx]
mov	[edx+4], eax
mov	[ecx], eax
mov	edx, [edi+18h]
lea	ecx, [edi+10h]
mov	[eax+0Ch], ecx
mov	[eax+8], edx
mov	edx, [ecx+8]
mov	[edx+0Ch], eax
mov	[ecx+8], eax
mov	ecx, 1
add	[edi+0Ch], ecx
add	[esi+18h], ecx
mov	ecx, [eax+10h]
call	sub_746E80
add	[esi+1Ch], eax
pop	edi
mov	dword ptr [esi+88h], 0
pop	esi
pop	ebx
retn	8
sub_706340 endp

align 10h



sub_7063D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 4

sub	esp, 20h
movzx	eax, [esp+20h+arg_0]
push	esi
mov	esi, ecx
push	edi
xor	edi, edi
neg	eax
sbb	eax, eax
mov	dword ptr [esi], offset	off_155F500
and	eax, 1000h
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 10h
mov	dword ptr [esi], offset	off_143F698
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	ecx, dword_1855FC0
mov	[esp+28h+var_20], eax
lea	eax, [esp+28h+var_20]
mov	[esp+28h+var_1C], 20h
mov	[esp+28h+var_18], 10000h
mov	[esp+28h+var_14], edi
mov	[esp+28h+var_10], 0FFFFFFFFh
mov	[esp+28h+var_C], edi
mov	[esp+28h+var_4], edi
mov	[esp+28h+var_8], 5
mov	edx, [ecx]
mov	edx, [edx+10h]
push	eax
push	offset a_mesh_cache ; "_Mesh_Cache"
call	edx
mov	[esi+0Ch], eax
mov	edx, [eax]
push	edi
mov	ecx, eax
mov	eax, [edx+28h]
push	3B4h
call	eax
cmp	eax, edi
jz	short loc_706477
mov	ecx, [esi+0Ch]
push	ecx
mov	ecx, eax
call	sub_74A470
jmp	short loc_706479

loc_706477:
xor	eax, eax

loc_706479:
mov	ecx, [esi+0Ch]
mov	[esi+10h], eax
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	8Ch
call	eax
cmp	eax, edi
jz	short loc_7064A8
mov	ecx, [esi+0Ch]
push	ecx
mov	ecx, eax
call	sub_7061B0
mov	[esi+14h], eax
pop	edi
mov	eax, esi
pop	esi
add	esp, 20h
retn	4

loc_7064A8:
mov	[esi+14h], edi
pop	edi
mov	eax, esi
pop	esi
add	esp, 20h
retn	4
sub_7063D0 endp

align 10h



sub_7064C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_706280
test	[esp+4+arg_0], 1
jz	short loc_7064DD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7064DD:
mov	eax, esi
pop	esi
retn	4
sub_7064C0 endp

align 10h



sub_7064F0 proc	near

var_14=	dword ptr -14h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
mov	cl, [edi]
mov	al, cl
and	al, 0Fh
cmp	al, 1
jnz	loc_7065C5
fld	dword ptr [edi+0Ch]
fld	ds:dbl_15FD398
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
fmul	st(1), st
fld	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+10h+var_8], eax
fadd	st(2), st
fldcw	word ptr [esp+10h+var_8]
fxch	st(2)
fistp	[esp+10h+var_8]
mov	eax, dword ptr [esp+10h+var_8]
fldcw	word ptr [esp+10h+arg_0]
cmp	eax, 0FFh
jb	short loc_70654C
mov	eax, 0FFh

loc_70654C:
mov	[esi+8], al
fld	dword ptr [edi+10h]
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
fmul	st, st(1)
or	eax, 0C00h
mov	dword ptr [esp+10h+var_8], eax
fadd	st, st(2)
fldcw	word ptr [esp+10h+var_8]
fistp	[esp+10h+var_8]
mov	eax, dword ptr [esp+10h+var_8]
fldcw	word ptr [esp+10h+arg_0]
cmp	eax, 0FFh
jb	short loc_706584
mov	eax, 0FFh

loc_706584:
mov	[esi+9], al
fmul	dword ptr [edi+28h]
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
faddp	st(1), st
or	eax, 0C00h
mov	dword ptr [esp+10h+var_8], eax
fldcw	word ptr [esp+10h+var_8]
fistp	[esp+10h+var_8]
mov	eax, dword ptr [esp+10h+var_8]
fldcw	word ptr [esp+10h+arg_0]
cmp	eax, 0FFh
jb	short loc_7065BA
mov	eax, 0FFh

loc_7065BA:
pop	edi
mov	[esi+0Ah], al
pop	esi
add	esp, 8
retn	4

loc_7065C5:
test	al, al
jz	short loc_7065D1
cmp	al, 2
jnz	loc_706666

loc_7065D1:
cmp	dword ptr [esi+1Ch], 0
jz	short loc_706603
cmp	word ptr [esi+14h], 0
jz	short loc_706603
cmp	al, 2
jnz	loc_706666
mov	eax, [edi+20h]
mov	[esi+20h], eax
mov	al, [esi+0Dh]
mov	cl, [esi+0Ch]
cmp	al, cl
jnb	short loc_7065F8
mov	al, cl

loc_7065F8:
pop	edi
mov	[esi+10h], al
pop	esi
add	esp, 8
retn	4

loc_706603:
and	cl, 0F0h
mov	[esi+0Bh], cl
fld	dword ptr [edi+0Ch]
push	ecx		; float
fstp	[esp+14h+var_14]
call	sub_6CE540
mov	[esi+0Ch], al
fld	dword ptr [edi+10h]
fstp	[esp+14h+var_14]
call	sub_6CE540
mov	[esi+0Dh], al
fld	dword ptr [edi+28h]
fstp	[esp+14h+var_14]
call	sub_6CE540
mov	[esi+0Eh], al
mov	cl, [edi+23h]
mov	[esi+0Fh], cl
mov	dx, [edi+2]
mov	[esi+12h], dx
mov	ax, [edi+4]
xor	ecx, ecx
mov	[esi+16h], cx
xor	edx, edx
mov	[esi+14h], ax
mov	[esi+18h], dx
mov	eax, [edi+20h]
add	esp, 4
mov	ecx, esi
mov	[esi+1Ch], eax
call	sub_6CD080

loc_706666:
pop	edi
pop	esi
add	esp, 8
retn	4
sub_7064F0 endp

align 10h



sub_706670 proc	near

var_10C= dword ptr -10Ch
var_106= byte ptr -106h
var_105= byte ptr -105h
var_104= dword ptr -104h
var_FD=	byte ptr -0FDh
var_FC=	byte ptr -0FCh
var_FA=	dword ptr -0FAh
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_B0=	dword ptr -0B0h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+118h+arg_0]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	ebp, 1
cmp	eax, ebp
mov	byte ptr [esi+15h], 0
jge	short loc_70669A
mov	ecx, esi
call	sub_6A9C60

loc_70669A:
mov	eax, [esi+2Ch]
fld	ds:dword_1577A70
mov	ecx, [esi+3Ch]
mov	bl, [eax+ecx]
fst	[esp+118h+var_F0]
fstp	[esp+118h+var_EC]
inc	eax
fldz
lea	ecx, [esp+118h+var_D0]
fst	[esp+118h+var_E4]
mov	[esp+118h+var_FD], bl
fstp	[esp+118h+var_E0]
mov	[esi+2Ch], eax
fld1
mov	[esp+118h+var_F4], 0
fstp	[esp+118h+var_D4]
mov	[esp+118h+var_E8], ebp
call	sub_68CFB0
xor	eax, eax
mov	[esp+118h+var_104], eax
mov	[esp+118h+var_106], al
test	bl, bl
jz	loc_707369
push	edi

loc_7066F1:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
dec	[esp+11Ch+var_FD]
cmp	edx, ebp
mov	byte ptr [esi+15h], 0
jge	short loc_70670A
mov	ecx, esi
call	sub_6A9C60

loc_70670A:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
push	50h		; size_t
lea	edx, [esp+120h+var_B0]
lea	edi, [eax+1]
push	0		; int
push	edx		; void *
mov	[esi+2Ch], edi
movzx	ebx, cl
call	_memset
add	esp, 0Ch
fld1
lea	eax, [esp+11Ch+var_B0]
mov	ecx, 4

loc_706738:
fst	dword ptr [eax]
add	eax, 14h
sub	ecx, ebp
jnz	short loc_706738
fldz
xor	eax, eax
fst	[esp+11Ch+var_EC]
xor	edx, edx
fst	[esp+11Ch+var_F0]
mov	[esp+11Ch+var_F4], eax
fxch	st(1)
mov	[esp+11Ch+var_E8], eax
fstp	[esp+11Ch+var_D4]
mov	word ptr [esp+11Ch+var_FA], cx
mov	word ptr [esp+11Ch+var_FA+2], dx
mov	[esp+11Ch+var_DC], eax
fst	[esp+11Ch+var_E0]
mov	[esp+11Ch+var_FC], bl
fstp	[esp+11Ch+var_E4]
cmp	ebx, 7		; switch 8 cases
ja	loc_707340	; default
jmp	ds:off_707374[ebx*4] ; switch jump

loc_706787:		; jumptable 00706780 case 0
lea	eax, [esp+11Ch+var_DC]
push	eax
mov	ecx, esi
call	sub_6AAD20
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 4
jge	short loc_7067AB
push	4
mov	ecx, esi
call	sub_6A9B70

loc_7067AB:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_7067EB
fadd	ds:flt_15FCC08

loc_7067EB:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, 4
fstp	[esp+11Ch+var_F0]
mov	byte ptr [esi+15h], 0
jge	short loc_70680C
push	4
mov	ecx, esi
call	sub_6A9B70

loc_70680C:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_70684C
fadd	ds:flt_15FCC08

loc_70684C:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, 4
fstp	[esp+11Ch+var_EC]
mov	byte ptr [esi+15h], 0
jge	short loc_70686D
push	4
mov	ecx, esi
call	sub_6A9B70

loc_70686D:
mov	ecx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edx, byte ptr [eax+ecx+3]
movzx	edi, byte ptr [eax+ecx+2]
add	eax, ecx
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
mov	[esp+11Ch+var_10C], edx
lea	edi, [ecx+4]
mov	[esi+2Ch], edi
fild	[esp+11Ch+var_10C]
fmul	ds:dbl_1437D10
fstp	[esp+11Ch+var_10C]
fld	[esp+11Ch+var_10C]
fmul	ds:dbl_1437CD0
fdiv	ds:dbl_15FCC90
fstp	[esp+11Ch+var_10C]
fld	[esp+11Ch+var_10C]
fld	ds:dbl_15FD3B8
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
call	__ftol2_sse
mov	ecx, [esi+30h]
sub	ecx, edi
cmp	ecx, 4
mov	word ptr [esp+11Ch+var_FA], ax
mov	byte ptr [esi+15h], 0
jge	short loc_7068F1
push	4
mov	ecx, esi
call	sub_6A9B70

loc_7068F1:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
mov	[esp+11Ch+var_10C], edx
lea	edi, [ecx+4]
mov	[esi+2Ch], edi
fild	[esp+11Ch+var_10C]
fmul	ds:dbl_1437D10
fstp	[esp+11Ch+var_10C]
fld	[esp+11Ch+var_10C]
fmul	ds:dbl_15FCE20
call	__ftol2_sse
mov	ecx, [esi+30h]
sub	ecx, edi
cmp	ecx, 2
mov	word ptr [esp+11Ch+var_FA+2], ax
mov	byte ptr [esi+15h], 0
jge	short loc_70695C
push	2
mov	ecx, esi
call	sub_6A9B70

loc_70695C:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	ecx, [esi+30h]
mov	[esp+11Ch+var_10C], edx
add	eax, 2
sub	ecx, eax
cmp	ecx, ebp
fild	[esp+11Ch+var_10C]
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
fmul	ds:dbl_15FD8A0
fstp	[esp+11Ch+var_D4]
jge	short loc_7069A7
mov	ecx, esi
call	sub_6A9C60

loc_7069A7:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[esi+2Ch], eax
movzx	eax, cl
mov	dl, al
xor	cl, cl
and	dl, 40h
jz	short loc_7069C2
mov	cl, 20h

loc_7069C2:
mov	bl, al
and	bl, 20h
mov	[esp+11Ch+var_105], bl
jnz	short loc_7069D0
or	cl, 40h

loc_7069D0:
mov	bl, al
and	bl, 0Fh
cmp	bl, 1
jbe	short loc_7069DD
or	cl, 80h

loc_7069DD:
or	[esp+11Ch+var_FC], cl
mov	ecx, eax
and	ecx, 1Fh
mov	[esp+11Ch+var_E8], ecx
xor	ecx, ecx
test	al, al
jns	short loc_7069F5
mov	ecx, 200h

loc_7069F5:
test	dl, dl
jz	short loc_7069FF
or	ecx, 100h

loc_7069FF:
cmp	[esp+11Ch+var_105], 0
jnz	short loc_706A0C
or	ecx, 400h

loc_706A0C:
or	ecx, 2
lea	edx, [esp+11Ch+var_10]
mov	[esp+11Ch+var_F4], ecx
push	edx
lea	ecx, [esp+120h+var_FC]
call	sub_6A8130
fld	dword ptr [eax+4]
cmp	[esp+11Ch+var_106], 0
fstp	[esp+11Ch+var_10C]
fld	dword ptr [eax]
fstp	[esp+11Ch+var_E4]
fld	[esp+11Ch+var_10C]
fstp	[esp+11Ch+var_E0]
jnz	loc_707359
mov	edx, [esp+11Ch+arg_4]
test	edx, edx
jz	loc_707347
mov	eax, [esp+11Ch+var_104]
cmp	eax, 4
jnb	loc_707347
mov	ecx, eax
imul	ecx, 9Ch
add	eax, ebp
mov	[esp+11Ch+var_104], eax
lea	eax, [esp+11Ch+var_FC]
add	ecx, edx
push	eax
call	sub_656980
jmp	loc_707347

loc_706A7F:		; jumptable 00706780 case 1
mov	ecx, [esi+30h]
sub	ecx, edi
cmp	ecx, 4
mov	[esp+11Ch+var_F4], ebp
mov	[esi+15h], dl
jge	short loc_706A99
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706A99:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_706AD9
fadd	ds:flt_15FCC08

loc_706AD9:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, 4
fstp	[esp+11Ch+var_F0]
mov	byte ptr [esi+15h], 0
jge	short loc_706AFA
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706AFA:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_706B3A
fadd	ds:flt_15FCC08

loc_706B3A:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, ebp
fstp	[esp+11Ch+var_EC]
mov	byte ptr [esi+15h], 0
jge	short loc_706B58
mov	ecx, esi
call	sub_6A9C60

loc_706B58:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
mov	[esi+2Ch], eax
movzx	eax, cl
shr	eax, 3
mov	edx, ebp
cmp	edx, eax
mov	[esp+11Ch+var_E8], eax
sbb	al, al
and	al, 80h
or	[esp+11Ch+var_FC], al
cmp	[esp+11Ch+var_106], 0
jnz	loc_707359
cmp	[esp+11Ch+arg_4], 0
jz	loc_707347
cmp	[esp+11Ch+var_104], 4
jnb	loc_707347
mov	eax, [esp+11Ch+var_104]
mov	ecx, eax
imul	ecx, 9Ch
add	ecx, [esp+11Ch+arg_4]
lea	edx, [esp+11Ch+var_FC]
add	eax, ebp
push	edx
mov	[esp+120h+var_104], eax
call	sub_656980
jmp	loc_707347

loc_706BC7:		; jumptable 00706780 case 2
lea	eax, [esp+11Ch+var_DC]
push	eax
mov	ecx, esi
call	sub_6AAD20
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 4
jge	short loc_706BEB
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706BEB:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_706C2B
fadd	ds:flt_15FCC08

loc_706C2B:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, 4
fstp	[esp+11Ch+var_F0]
mov	byte ptr [esi+15h], 0
jge	short loc_706C4C
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706C4C:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_706C8C
fadd	ds:flt_15FCC08

loc_706C8C:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, 2
fstp	[esp+11Ch+var_EC]
mov	byte ptr [esi+15h], 0
jge	short loc_706CAD
push	2
mov	ecx, esi
call	sub_6A9B70

loc_706CAD:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	ecx, [esi+30h]
mov	[esp+11Ch+var_10C], edx
add	eax, 2
sub	ecx, eax
cmp	ecx, ebp
fild	[esp+11Ch+var_10C]
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
fmul	ds:dbl_15FD8A0
fstp	[esp+11Ch+var_D4]
jge	short loc_706CF8
mov	ecx, esi
call	sub_6A9C60

loc_706CF8:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[esi+2Ch], eax
movzx	eax, cl
mov	dl, al
xor	cl, cl
and	dl, 40h
jz	short loc_706D13
mov	cl, 20h

loc_706D13:
mov	bl, al
and	bl, 20h
mov	[esp+11Ch+var_105], bl
jnz	short loc_706D21
or	cl, 40h

loc_706D21:
mov	bl, al
and	bl, 0Fh
cmp	bl, 1
jbe	short loc_706D2E
or	cl, 80h

loc_706D2E:
or	[esp+11Ch+var_FC], cl
xor	ecx, ecx
test	al, al
jns	short loc_706D3D
mov	ecx, 200h

loc_706D3D:
test	dl, dl
jz	short loc_706D47
or	ecx, 100h

loc_706D47:
cmp	[esp+11Ch+var_105], 0
jnz	short loc_706D54
or	ecx, 400h

loc_706D54:
or	ecx, 2
and	eax, 1Fh
cmp	[esp+11Ch+var_106], 0
mov	[esp+11Ch+var_F4], ecx
mov	[esp+11Ch+var_E8], eax
jnz	loc_707359
cmp	[esp+11Ch+arg_4], 0
jz	loc_707347
cmp	[esp+11Ch+var_104], 4
jnb	loc_707347
mov	eax, [esp+11Ch+var_104]
mov	ecx, eax
imul	ecx, 9Ch
add	ecx, [esp+11Ch+arg_4]
add	eax, ebp
mov	[esp+11Ch+var_104], eax
lea	eax, [esp+11Ch+var_FC]
push	eax
call	sub_656980
jmp	loc_707347

loc_706DAE:		; jumptable 00706780 case 3
lea	ecx, [esp+11Ch+var_DC]
push	ecx
mov	ecx, esi
call	sub_6AAD20
lea	edx, [esp+11Ch+var_D8]
push	edx
mov	ecx, esi
call	sub_6AAD20
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_706DDE
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706DDE:
mov	edx, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	eax, byte ptr [ecx+edx+3]
movzx	edi, byte ptr [ecx+edx+2]
add	ecx, edx
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_706E1E
fadd	ds:flt_15FCC08

loc_706E1E:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, 4
fstp	[esp+11Ch+var_F0]
mov	byte ptr [esi+15h], 0
jge	short loc_706E3F
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706E3F:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
lea	ecx, [edx+4]
mov	[esp+11Ch+var_10C], eax
mov	[esi+2Ch], ecx
fild	[esp+11Ch+var_10C]
test	eax, eax
jge	short loc_706E7F
fadd	ds:flt_15FCC08

loc_706E7F:
mov	edx, [esi+30h]
fmul	ds:dbl_1437D10
sub	edx, ecx
cmp	edx, 4
fstp	[esp+11Ch+var_EC]
mov	byte ptr [esi+15h], 0
jge	short loc_706EA0
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706EA0:
mov	ecx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edx, byte ptr [eax+ecx+3]
movzx	edi, byte ptr [eax+ecx+2]
add	eax, ecx
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
mov	[esp+11Ch+var_10C], edx
lea	edi, [ecx+4]
mov	[esi+2Ch], edi
fild	[esp+11Ch+var_10C]
fmul	ds:dbl_1437D10
fstp	[esp+11Ch+var_10C]
fld	[esp+11Ch+var_10C]
fmul	ds:dbl_1437CD0
fdiv	ds:dbl_15FCC90
fstp	[esp+11Ch+var_10C]
fld	[esp+11Ch+var_10C]
fld	ds:dbl_15FD3B8
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
call	__ftol2_sse
mov	ecx, [esi+30h]
sub	ecx, edi
cmp	ecx, 4
mov	word ptr [esp+11Ch+var_FA], ax
mov	byte ptr [esi+15h], 0
jge	short loc_706F24
push	4
mov	ecx, esi
call	sub_6A9B70

loc_706F24:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, edi
shl	edx, 8
or	edx, eax
mov	[esp+11Ch+var_10C], edx
lea	edi, [ecx+4]
mov	[esi+2Ch], edi
fild	[esp+11Ch+var_10C]
fmul	ds:dbl_1437D10
fstp	[esp+11Ch+var_10C]
fld	[esp+11Ch+var_10C]
fmul	ds:dbl_15FCE20
call	__ftol2_sse
mov	ecx, [esi+30h]
sub	ecx, edi
cmp	ecx, 2
mov	word ptr [esp+11Ch+var_FA+2], ax
mov	byte ptr [esi+15h], 0
jge	short loc_706F8F
push	2
mov	ecx, esi
call	sub_6A9B70

loc_706F8F:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	ecx, [esi+30h]
mov	[esp+11Ch+var_10C], edx
add	eax, 2
sub	ecx, eax
cmp	ecx, ebp
fild	[esp+11Ch+var_10C]
mov	[esi+2Ch], eax
mov	byte ptr [esi+15h], 0
fmul	ds:dbl_15FD8A0
fstp	[esp+11Ch+var_D4]
jge	short loc_706FDA
mov	ecx, esi
call	sub_6A9C60

loc_706FDA:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[esi+2Ch], eax
movzx	eax, cl
mov	dl, al
xor	cl, cl
and	dl, 40h
jz	short loc_706FF5
mov	cl, 20h

loc_706FF5:
mov	bl, al
and	bl, 20h
mov	[esp+11Ch+var_105], bl
jnz	short loc_707003
or	cl, 40h

loc_707003:
mov	bl, al
and	bl, 0Fh
cmp	bl, 1
jbe	short loc_707010
or	cl, 80h

loc_707010:
or	[esp+11Ch+var_FC], cl
mov	ecx, eax
and	ecx, 0Fh
mov	[esp+11Ch+var_E8], ecx
xor	ecx, ecx
test	al, al
jns	short loc_707028
mov	ecx, 200h

loc_707028:
test	dl, dl
jz	short loc_707032
or	ecx, 100h

loc_707032:
cmp	[esp+11Ch+var_105], 0
jnz	short loc_70703F
or	ecx, 400h

loc_70703F:
or	ecx, 6
lea	edx, [esp+11Ch+var_8]
mov	[esp+11Ch+var_F4], ecx
push	edx
lea	ecx, [esp+120h+var_FC]
call	sub_6A8130
fld	dword ptr [eax+4]
cmp	[esp+11Ch+var_106], 0
fstp	[esp+11Ch+var_10C]
fld	dword ptr [eax]
fstp	[esp+11Ch+var_E4]
fld	[esp+11Ch+var_10C]
fstp	[esp+11Ch+var_E0]
jnz	loc_707359
cmp	[esp+11Ch+arg_4], 0
jz	loc_707347
cmp	[esp+11Ch+var_104], 4
jnb	loc_707347
mov	eax, [esp+11Ch+var_104]
mov	ecx, eax
imul	ecx, 9Ch
add	ecx, [esp+11Ch+arg_4]
add	eax, ebp
mov	[esp+11Ch+var_104], eax
lea	eax, [esp+11Ch+var_FC]
push	eax
call	sub_656980
jmp	loc_707347

loc_7070B8:		; jumptable 00706780 case 4
mov	ecx, [esi+30h]
sub	ecx, edi
cmp	ecx, ebp
mov	[esi+15h], dl
jge	short loc_7070CB
mov	ecx, esi
call	sub_6A9C60

loc_7070CB:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
jmp	loc_70730D

loc_7070D9:		; jumptable 00706780 case 5
mov	eax, [esi+30h]
sub	eax, edi
cmp	eax, ebp
mov	[esi+15h], dl
jge	short loc_7070EC
mov	ecx, esi
call	sub_6A9C60

loc_7070EC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
mov	edx, [esi+30h]
inc	eax
sub	edx, eax
cmp	edx, ebp
mov	[esi+2Ch], eax
movzx	edi, cl
mov	byte ptr [esi+15h], 0
jge	short loc_707110
mov	ecx, esi
call	sub_6A9C60

loc_707110:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	edx, cl
inc	eax
imul	edx, edi
lea	edi, ds:0Dh[edx*4]
jmp	loc_707315

loc_70712C:		; jumptable 00706780 case 6
mov	[esp+11Ch+var_60], eax
mov	[esp+11Ch+var_5C], ebp
mov	[esp+11Ch+var_58], 2
mov	[esp+11Ch+var_54], 3
mov	[esp+11Ch+var_50], 10h
mov	[esp+11Ch+var_4C], 4
mov	[esp+11Ch+var_48], 5
mov	[esp+11Ch+var_44], 6
mov	[esp+11Ch+var_40], 7
mov	[esp+11Ch+var_3C], 11h
mov	[esp+11Ch+var_38], 8
mov	[esp+11Ch+var_34], 9
mov	[esp+11Ch+var_30], 0Ah
mov	[esp+11Ch+var_2C], 0Bh
mov	[esp+11Ch+var_28], 12h
mov	[esp+11Ch+var_24], 0Ch
mov	[esp+11Ch+var_20], 0Dh
mov	[esp+11Ch+var_1C], 0Eh
mov	[esp+11Ch+var_18], 0Fh
mov	[esp+11Ch+var_14], 13h
xor	edi, edi

loc_707202:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_70721A
push	4
mov	ecx, esi
call	sub_6A9B70

loc_70721A:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	ebx, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+3]
shl	edx, 8
or	edx, ebx
movzx	ebx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, ebx
shl	edx, 8
add	ecx, 4
or	edx, eax
mov	[esi+2Ch], ecx
mov	ecx, [esp+edi*4+11Ch+var_60]
mov	[esp+11Ch+var_10C], edx
add	edi, ebp
fld	[esp+11Ch+var_10C]
fstp	[esp+ecx*4+11Ch+var_B0]
cmp	edi, 14h
jb	short loc_707202
cmp	[esp+11Ch+var_106], 0
fld	[esp+11Ch+var_70]
fld	ds:dbl_15FCDC0
fmul	st(1), st
fxch	st(1)
fstp	[esp+11Ch+var_70]
fld	[esp+11Ch+var_6C]
fmul	st, st(1)
fstp	[esp+11Ch+var_6C]
fld	[esp+11Ch+var_68]
fmul	st, st(1)
fstp	[esp+11Ch+var_68]
fmul	[esp+11Ch+var_64]
fstp	[esp+11Ch+var_64]
jnz	loc_707359
cmp	[esp+11Ch+arg_4], 0
jz	loc_707347
cmp	[esp+11Ch+var_104], 4
jnb	loc_707347
mov	eax, [esp+11Ch+var_104]
mov	ecx, eax
imul	ecx, 9Ch
add	ecx, [esp+11Ch+arg_4]
lea	edx, [esp+11Ch+var_FC]
add	eax, ebp
push	edx
mov	[esp+120h+var_104], eax
call	sub_656980
jmp	short loc_707347

loc_7072F1:		; jumptable 00706780 case 7
mov	eax, [esi+30h]
sub	eax, edi
cmp	eax, ebp
mov	[esi+15h], dl
jge	short loc_707304
mov	ecx, esi
call	sub_6A9C60

loc_707304:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]

loc_70730D:
movzx	ecx, cl
inc	eax
lea	edi, [ecx+ecx*4+13h]

loc_707315:
mov	[esi+2Ch], eax
test	edi, edi
jz	short loc_707340 ; default
lea	esp, [esp+0]

loc_707320:
mov	edx, [esi+30h]
sub	edx, eax
sub	edi, ebp
cmp	edx, ebp
mov	byte ptr [esi+15h], 0
jge	short loc_707336
mov	ecx, esi
call	sub_6A9C60

loc_707336:
add	[esi+2Ch], ebp
mov	eax, [esi+2Ch]
test	edi, edi
jnz	short loc_707320

loc_707340:		; default
cmp	[esp+11Ch+var_106], 0
jnz	short loc_707359

loc_707347:
mov	eax, [esp+11Ch+arg_8]
cmp	[esp+11Ch+var_104], eax
jnz	short loc_707359
mov	[esp+11Ch+var_106], 1

loc_707359:
cmp	[esp+11Ch+var_FD], 0
jnz	loc_7066F1
mov	eax, [esp+11Ch+var_104]
pop	edi

loc_707369:
pop	esi
pop	ebp
pop	ebx
add	esp, 10Ch
retn
sub_706670 endp

align 4
off_707374 dd offset loc_706787	; jump table for switch	statement
dd offset loc_706A7F
dd offset loc_706BC7
dd offset loc_706DAE
dd offset loc_7070B8
dd offset loc_7070D9
dd offset loc_70712C
dd offset loc_7072F1
align 10h



sub_7073A0 proc	near

var_10D= byte ptr -10Dh
var_10C= dword ptr -10Ch
var_107= byte ptr -107h
var_106= byte ptr -106h
var_105= byte ptr -105h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	byte ptr -0FCh
var_FA=	word ptr -0FAh
var_F8=	word ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_D7=	byte ptr -0D7h
var_D6=	byte ptr -0D6h
var_D5=	byte ptr -0D5h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_B0=	dword ptr -0B0h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 110h
push	ebx
push	esi
mov	esi, [esp+118h+arg_0]
xor	ebx, ebx
cmp	[esi+0Ch], ebx
jz	short loc_7073B9
inc	dword ptr [esi+8]

loc_7073B9:
mov	eax, [esi+8]
fld	ds:dword_1577A70
mov	ecx, [esi]
mov	[esi+0Ch], ebx
mov	dl, [eax+ecx]
fst	[esp+118h+var_F0]
fstp	[esp+118h+var_EC]
inc	eax
fldz
lea	ecx, [esp+118h+var_D0]
fst	[esp+118h+var_E4]
mov	[esp+118h+var_105], dl
fstp	[esp+118h+var_E0]
mov	[esi+8], eax
fld1
mov	[esp+118h+var_F4], ebx
fstp	[esp+118h+var_D4]
mov	[esp+118h+var_E8], 1
call	sub_68CFB0
xor	eax, eax
mov	[esp+118h+var_104], eax
mov	[esp+118h+var_107], bl
cmp	[esp+118h+var_105], bl
jz	loc_7080FA
mov	eax, [esp+118h+arg_4]
push	ebp
mov	[esp+11Ch+var_100], eax
push	edi

loc_707420:
dec	[esp+120h+var_105]
cmp	[esi+0Ch], ebx
jz	short loc_70742C
inc	dword ptr [esi+8]

loc_70742C:
mov	ebp, [esi+8]
mov	edi, [esi]
mov	[esi+0Ch], ebx
mov	al, [edi+ebp]
push	50h		; size_t
movzx	ecx, al
lea	edx, [esp+124h+var_B0]
push	ebx		; int
inc	ebp
push	edx		; void *
mov	[esi+8], ebp
mov	[esp+12Ch+var_10C], ecx
call	_memset
mov	edx, 4
fld1
add	esp, 0Ch
lea	eax, [esp+120h+var_B0]
mov	ecx, edx

loc_70745F:
fst	dword ptr [eax]
add	eax, 14h
sub	ecx, 1
jnz	short loc_70745F
fldz
xor	eax, eax
fst	[esp+120h+var_EC]
mov	[esp+120h+var_FA], ax
mov	eax, [esp+120h+var_10C]
fst	[esp+120h+var_F0]
fxch	st(1)
mov	[esp+120h+var_F4], ebx
fstp	[esp+120h+var_D4]
mov	[esp+120h+var_E8], ebx
mov	[esp+120h+var_F8], cx
mov	[esp+120h+var_DC], ebx
fst	[esp+120h+var_E0]
mov	[esp+120h+var_FC], al
fstp	[esp+120h+var_E4]
cmp	eax, 7		; switch 8 cases
ja	loc_7080D2	; default
jmp	ds:off_708104[eax*4] ; switch jump

loc_7074B1:		; jumptable 007074AA case 0
mov	[esi+0Ch], ebx
mov	al, [edi+ebp]
mov	byte ptr [esp+120h+var_DC+2], al
mov	[esi+0Ch], ebx
inc	ebp
mov	[esi+8], ebp
mov	cl, [edi+ebp]
mov	byte ptr [esp+120h+var_DC+1], cl
mov	[esi+0Ch], ebx
lea	eax, [ebp+1]
mov	[esi+8], eax
mov	cl, [eax+edi]
inc	eax
mov	[esi+8], eax
mov	byte ptr [esp+120h+var_DC], cl
lea	ecx, [eax+1]
mov	byte ptr [esp+120h+var_DC+3], 0FFh
mov	[esi+0Ch], ebx
mov	dl, [eax+edi]
mov	[esi+8], ecx
mov	byte ptr [esp+120h+var_DC+3], dl
mov	[esi+0Ch], ebx
movzx	eax, byte ptr [ecx+edi+3]
movzx	edx, byte ptr [ecx+edi+2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi+1]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi]
shl	eax, 8
or	eax, edx
add	ecx, 4
mov	[esp+120h+var_10C], eax
mov	[esi+8], ecx
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_70752F
fadd	ds:flt_15FCC08

loc_70752F:
fld	ds:dbl_1437D10
mov	[esi+0Ch], ebx
fmul	st(1), st
add	ecx, 4
fxch	st(1)
fstp	[esp+120h+var_F0]
movzx	eax, byte ptr [ecx+edi-1]
movzx	edx, byte ptr [ecx+edi-2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi-3]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi-4]
shl	eax, 8
or	eax, edx
mov	[esp+120h+var_10C], eax
mov	[esi+8], ecx
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_70757B
fadd	ds:flt_15FCC08

loc_70757B:
fmul	st, st(1)
mov	[esi+0Ch], ebx
lea	ebp, [ecx+4]
fstp	[esp+120h+var_EC]
movzx	eax, byte ptr [ecx+edi+3]
movzx	edx, byte ptr [ecx+edi+2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi+1]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi]
shl	eax, 8
or	eax, edx
mov	[esp+120h+var_10C], eax
mov	[esi+8], ebp
fimul	[esp+120h+var_10C]
fstp	[esp+120h+var_10C]
fld	[esp+120h+var_10C]
fmul	ds:dbl_1437CD0
fdiv	ds:dbl_15FCC90
fstp	[esp+120h+var_10C]
fld	[esp+120h+var_10C]
fld	ds:dbl_15FD3B8
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
call	__ftol2_sse
mov	[esp+120h+var_FA], ax
mov	[esi+0Ch], ebx
movzx	eax, byte ptr [edi+ebp+3]
movzx	ecx, byte ptr [edi+ebp+2]
movzx	edx, byte ptr [edi+ebp+1]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [edi+ebp]
shl	eax, 8
or	eax, edx
shl	eax, 8
or	eax, ecx
mov	[esp+120h+var_10C], eax
add	ebp, 4
mov	[esi+8], ebp
fild	[esp+120h+var_10C]
fmul	ds:dbl_1437D10
fstp	[esp+120h+var_10C]
fld	[esp+120h+var_10C]
fmul	ds:dbl_15FCE20
call	__ftol2_sse
mov	[esp+120h+var_F8], ax
mov	[esi+0Ch], ebx
movzx	dx, byte ptr [edi+ebp+1]
movzx	ax, byte ptr [edi+ebp]
shl	dx, 8
or	dx, ax
movzx	ecx, dx
movzx	ecx, cx
mov	[esp+120h+var_10C], ecx
lea	eax, [ebp+2]
mov	[esi+8], eax
fild	[esp+120h+var_10C]
mov	[esi+0Ch], ebx
inc	eax
mov	[esp+120h+var_10D], bl
fmul	ds:dbl_15FD8A0
fstp	[esp+120h+var_D4]
mov	cl, [edi+eax-1]
mov	[esi+8], eax
movzx	eax, cl
mov	cl, al
and	cl, 40h
jz	short loc_707687
mov	[esp+120h+var_10D], 20h

loc_707687:
mov	dl, al
and	dl, 20h
mov	[esp+120h+var_106], dl
jnz	short loc_707697
or	[esp+120h+var_10D], 40h

loc_707697:
mov	dl, al
and	dl, 0Fh
cmp	dl, 1
jbe	short loc_7076A6
or	[esp+120h+var_10D], 80h

loc_7076A6:
mov	dl, [esp+120h+var_10D]
mov	[esp+120h+var_FC], dl
mov	edx, eax
and	edx, 1Fh
mov	[esp+120h+var_E8], edx
xor	edx, edx
test	al, al
jns	short loc_7076C2
mov	edx, 200h

loc_7076C2:
cmp	cl, bl
jz	short loc_7076CC
or	edx, 100h

loc_7076CC:
cmp	[esp+120h+var_106], bl
jnz	short loc_7076D8
or	edx, 400h

loc_7076D8:
lea	eax, [esp+120h+var_8]
or	edx, 2
push	eax
lea	ecx, [esp+124h+var_FC]
mov	[esp+124h+var_F4], edx
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+120h+var_10C]
fld	dword ptr [eax]
fstp	[esp+120h+var_E4]
fld	[esp+120h+var_10C]
fstp	[esp+120h+var_E0]
cmp	[esp+120h+var_107], bl
jnz	loc_7080EA
cmp	[esp+120h+arg_4], ebx
jz	loc_7080D8
cmp	[esp+120h+var_104], 4

loc_707721:
jnb	loc_7080D8
mov	eax, [esp+120h+var_100]
inc	[esp+120h+var_104]
mov	ecx, eax
lea	edx, [esp+120h+var_FC]
add	eax, 9Ch
push	edx
mov	[esp+124h+var_100], eax
call	sub_656980
jmp	loc_7080D8

loc_707749:		; jumptable 007074AA case 1
mov	[esp+120h+var_F4], 1
mov	[esi+0Ch], ebx
movzx	eax, byte ptr [edi+ebp+3]
movzx	ecx, byte ptr [edi+ebp+2]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [edi+ebp+1]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [edi+ebp]
shl	eax, 8
or	eax, ecx
add	ebp, 4
mov	[esp+120h+var_10C], eax
mov	[esi+8], ebp
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_70778E
fadd	ds:flt_15FCC08

loc_70778E:
fld	ds:dbl_1437D10
mov	[esi+0Ch], ebx
fmul	st(1), st
fxch	st(1)
fstp	[esp+120h+var_F0]
movzx	eax, byte ptr [edi+ebp+3]
movzx	ecx, byte ptr [edi+ebp+2]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [edi+ebp+1]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [edi+ebp]
shl	eax, 8
or	eax, ecx
lea	ecx, [ebp+4]
mov	[esp+120h+var_10C], eax
mov	[esi+8], ecx
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_7077D9
fadd	ds:flt_15FCC08

loc_7077D9:
fmulp	st(1), st
mov	[esi+0Ch], ebx
inc	ecx
fstp	[esp+120h+var_EC]
mov	al, [edi+ecx-1]
movzx	eax, al
shr	eax, 3
mov	[esi+8], ecx
mov	ecx, 1
cmp	ecx, eax
mov	[esp+120h+var_E8], eax
sbb	al, al
and	al, 80h
or	al, cl
mov	[esp+120h+var_FC], al
cmp	[esp+120h+var_107], bl
jnz	loc_7080EA
cmp	[esp+120h+arg_4], ebx
jz	loc_7080D8
cmp	[esp+120h+var_104], edx
jmp	loc_707721

loc_707825:		; jumptable 007074AA case 2
mov	[esi+0Ch], ebx
mov	al, [edi+ebp]
mov	byte ptr [esp+120h+var_DC+2], al
mov	[esi+0Ch], ebx
inc	ebp
mov	[esi+8], ebp
mov	al, [edi+ebp]
mov	byte ptr [esp+120h+var_DC+1], al
mov	[esi+0Ch], ebx
inc	ebp
mov	[esi+8], ebp
mov	cl, [edi+ebp]
mov	byte ptr [esp+120h+var_DC], cl
lea	eax, [ebp+1]
mov	[esi+8], eax
lea	ecx, [eax+1]
mov	byte ptr [esp+120h+var_DC+3], 0FFh
mov	[esi+0Ch], ebx
mov	dl, [eax+edi]
mov	[esi+8], ecx
mov	byte ptr [esp+120h+var_DC+3], dl
mov	[esi+0Ch], ebx
movzx	eax, byte ptr [ecx+edi+3]
movzx	edx, byte ptr [ecx+edi+2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi+1]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi]
shl	eax, 8
or	eax, edx
add	ecx, 4
mov	[esp+120h+var_10C], eax
mov	[esi+8], ecx
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_7078A3
fadd	ds:flt_15FCC08

loc_7078A3:
fld	ds:dbl_1437D10
mov	[esi+0Ch], ebx
fmul	st(1), st
add	ecx, 4
fxch	st(1)
fstp	[esp+120h+var_F0]
movzx	eax, byte ptr [ecx+edi-1]
movzx	edx, byte ptr [ecx+edi-2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi-3]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi-4]
shl	eax, 8
or	eax, edx
mov	[esp+120h+var_10C], eax
mov	[esi+8], ecx
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_7078EF
fadd	ds:flt_15FCC08

loc_7078EF:
fmulp	st(1), st
mov	[esi+0Ch], ebx
fstp	[esp+120h+var_EC]
movzx	ax, byte ptr [ecx+edi+1]
movzx	dx, byte ptr [ecx+edi]
shl	ax, 8
or	ax, dx
movzx	edx, ax
lea	eax, [ecx+2]
movzx	ecx, dx
mov	[esp+120h+var_10C], ecx
mov	[esi+8], eax
mov	[esi+0Ch], ebx
fild	[esp+120h+var_10C]
inc	eax
fmul	ds:dbl_15FD8A0
fstp	[esp+120h+var_D4]
mov	cl, [edi+eax-1]
mov	[esi+8], eax
movzx	eax, cl
mov	dl, al
xor	cl, cl
and	dl, 40h
mov	[esp+120h+var_10D], dl
jz	short loc_707945
mov	cl, 20h

loc_707945:
mov	dl, al
and	dl, 20h
mov	[esp+120h+var_106], dl
jnz	short loc_707953
or	cl, 40h

loc_707953:
mov	dl, al
and	dl, 0Fh
cmp	dl, 1
jbe	short loc_707960
or	cl, 80h

loc_707960:
or	cl, 2
mov	[esp+120h+var_FC], cl
xor	ecx, ecx
test	al, al
jns	short loc_707972
mov	ecx, 200h

loc_707972:
cmp	[esp+120h+var_10D], bl
jz	short loc_70797E
or	ecx, 100h

loc_70797E:
cmp	[esp+120h+var_106], bl
jnz	short loc_70798A
or	ecx, 400h

loc_70798A:
or	ecx, 2
and	eax, 1Fh
mov	[esp+120h+var_F4], ecx
mov	[esp+120h+var_E8], eax
cmp	[esp+120h+var_107], bl
jnz	loc_7080EA
cmp	[esp+120h+arg_4], ebx
jz	loc_7080D8
cmp	[esp+120h+var_104], 4
jnb	loc_7080D8
mov	eax, [esp+120h+var_100]
inc	[esp+120h+var_104]
mov	ecx, eax
add	eax, 9Ch
mov	[esp+120h+var_100], eax
lea	eax, [esp+120h+var_FC]
push	eax
call	sub_656980
jmp	loc_7080D8

loc_7079DC:		; jumptable 007074AA case 3
mov	[esi+0Ch], ebx
mov	al, [edi+ebp]
mov	byte ptr [esp+120h+var_DC+2], al
mov	[esi+0Ch], ebx
inc	ebp
mov	[esi+8], ebp
mov	cl, [edi+ebp]
mov	[esi+0Ch], ebx
mov	byte ptr [esp+120h+var_DC+1], cl
lea	eax, [ebp+1]
mov	[esi+8], eax
mov	cl, [eax+edi]
inc	eax
mov	[esi+8], eax
mov	[esi+0Ch], ebx
mov	byte ptr [esp+120h+var_DC], cl
inc	eax
mov	byte ptr [esp+120h+var_DC+3], 0FFh
mov	cl, [eax+edi-1]
mov	[esi+8], eax
mov	[esi+0Ch], ebx
mov	byte ptr [esp+120h+var_DC+3], cl
mov	cl, [eax+edi]
inc	eax
mov	[esi+8], eax
mov	[esi+0Ch], ebx
mov	[esp+120h+var_D6], cl
mov	cl, [edi+eax]
inc	eax
mov	[esi+8], eax
inc	eax
mov	[esp+120h+var_D7], cl
mov	[esi+0Ch], ebx
mov	cl, [edi+eax-1]
mov	[esi+8], eax
mov	[esp+120h+var_D8], cl
lea	ecx, [eax+1]
mov	[esp+120h+var_D5], 0FFh
mov	[esi+0Ch], ebx
mov	dl, [edi+eax]
mov	[esi+8], ecx
mov	[esp+120h+var_D5], dl
mov	[esi+0Ch], ebx
movzx	eax, byte ptr [edi+ecx+3]
movzx	edx, byte ptr [edi+ecx+2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [edi+ecx+1]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [edi+ecx]
shl	eax, 8
or	eax, edx
add	ecx, 4
mov	[esp+120h+var_10C], eax
mov	[esi+8], ecx
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_707A99
fadd	ds:flt_15FCC08

loc_707A99:
fld	ds:dbl_1437D10
mov	[esi+0Ch], ebx
fmul	st(1), st
add	ecx, 4
fxch	st(1)
fstp	[esp+120h+var_F0]
movzx	eax, byte ptr [ecx+edi-1]
movzx	edx, byte ptr [ecx+edi-2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi-3]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi-4]
shl	eax, 8
or	eax, edx
mov	[esp+120h+var_10C], eax
mov	[esi+8], ecx
fild	[esp+120h+var_10C]
test	eax, eax
jge	short loc_707AE5
fadd	ds:flt_15FCC08

loc_707AE5:
fmul	st, st(1)
mov	[esi+0Ch], ebx
lea	ebp, [ecx+4]
fstp	[esp+120h+var_EC]
movzx	eax, byte ptr [ecx+edi+3]
movzx	edx, byte ptr [ecx+edi+2]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi+1]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+edi]
shl	eax, 8
or	eax, edx
mov	[esp+120h+var_10C], eax
mov	[esi+8], ebp
fimul	[esp+120h+var_10C]
fstp	[esp+120h+var_10C]
fld	[esp+120h+var_10C]
fmul	ds:dbl_1437CD0
fdiv	ds:dbl_15FCC90
fstp	[esp+120h+var_10C]
fld	[esp+120h+var_10C]
fld	ds:dbl_15FD3B8
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
call	__ftol2_sse
mov	[esp+120h+var_FA], ax
mov	[esi+0Ch], ebx
movzx	eax, byte ptr [edi+ebp+3]
movzx	ecx, byte ptr [edi+ebp+2]
movzx	edx, byte ptr [edi+ebp+1]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [edi+ebp]
shl	eax, 8
or	eax, edx
shl	eax, 8
or	eax, ecx
mov	[esp+120h+var_10C], eax
add	ebp, 4
mov	[esi+8], ebp
fild	[esp+120h+var_10C]
fmul	ds:dbl_1437D10
fstp	[esp+120h+var_10C]
fld	[esp+120h+var_10C]
fmul	ds:dbl_15FCE20
call	__ftol2_sse
mov	[esp+120h+var_F8], ax
mov	[esi+0Ch], ebx
movzx	dx, byte ptr [edi+ebp+1]
movzx	ax, byte ptr [edi+ebp]
shl	dx, 8
or	dx, ax
movzx	ecx, dx
movzx	ecx, cx
mov	[esp+120h+var_10C], ecx
lea	eax, [ebp+2]
mov	[esi+8], eax
fild	[esp+120h+var_10C]
mov	[esi+0Ch], ebx
inc	eax
mov	[esp+120h+var_10D], bl
fmul	ds:dbl_15FD8A0
fstp	[esp+120h+var_D4]
mov	cl, [eax+edi-1]
mov	[esi+8], eax
movzx	eax, cl
mov	cl, al
and	cl, 40h
jz	short loc_707BF1
mov	[esp+120h+var_10D], 20h

loc_707BF1:
mov	dl, al
and	dl, 20h
mov	[esp+120h+var_106], dl
jnz	short loc_707C01
or	[esp+120h+var_10D], 40h

loc_707C01:
mov	dl, al
and	dl, 0Fh
cmp	dl, 1
mov	dl, [esp+120h+var_10D]
jbe	short loc_707C12
or	dl, 80h

loc_707C12:
or	dl, 3
mov	[esp+120h+var_FC], dl
mov	edx, eax
and	edx, 0Fh
mov	[esp+120h+var_E8], edx
xor	edx, edx
test	al, al
jns	short loc_707C2D
mov	edx, 200h

loc_707C2D:
cmp	cl, bl
jz	short loc_707C37
or	edx, 100h

loc_707C37:
cmp	[esp+120h+var_106], bl
jnz	short loc_707C43
or	edx, 400h

loc_707C43:
lea	eax, [esp+120h+var_10]
or	edx, 6
push	eax
lea	ecx, [esp+124h+var_FC]
mov	[esp+124h+var_F4], edx
call	sub_6A8130
fld	dword ptr [eax+4]
fstp	[esp+120h+var_10C]
fld	dword ptr [eax]
fstp	[esp+120h+var_E4]
fld	[esp+120h+var_10C]
fstp	[esp+120h+var_E0]
cmp	[esp+120h+var_107], bl
jnz	loc_7080EA
cmp	[esp+120h+arg_4], ebx
jz	loc_7080D8
cmp	[esp+120h+var_104], 4
jnb	loc_7080D8
mov	eax, [esp+120h+var_100]
inc	[esp+120h+var_104]
mov	ecx, eax
lea	edx, [esp+120h+var_FC]
add	eax, 9Ch
push	edx
mov	[esp+124h+var_100], eax
call	sub_656980
jmp	loc_7080D8

loc_707CB4:		; jumptable 007074AA case 5
mov	[esi+0Ch], ebx
mov	al, [edi+ebp]
inc	ebp
mov	[esi+8], ebp
mov	[esi+0Ch], ebx
mov	cl, [edi+ebp]
movzx	eax, al
movzx	ecx, cl
inc	ebp
imul	ecx, eax
lea	eax, ds:0Dh[ecx*4]
jmp	loc_7080BF

loc_707CDA:		; jumptable 007074AA case 6
mov	eax, [esi]
mov	[esp+120h+var_60], ebx
mov	[esp+120h+var_5C], 1
mov	[esp+120h+var_58], 2
mov	[esp+120h+var_54], 3
mov	[esp+120h+var_50], 10h
mov	[esp+120h+var_4C], edx
mov	[esp+120h+var_48], 5
mov	[esp+120h+var_44], 6
mov	[esp+120h+var_40], 7
mov	[esp+120h+var_3C], 11h
mov	[esp+120h+var_38], 8
mov	[esp+120h+var_34], 9
mov	[esp+120h+var_30], 0Ah
mov	[esp+120h+var_2C], 0Bh
mov	[esp+120h+var_28], 12h
mov	[esp+120h+var_24], 0Ch
mov	[esp+120h+var_20], 0Dh
mov	[esp+120h+var_1C], 0Eh
mov	[esp+120h+var_18], 0Fh
mov	[esp+120h+var_14], 13h
xor	ecx, ecx

loc_707DB2:
cmp	[esi+0Ch], ebx
jz	short loc_707DBA
inc	dword ptr [esi+8]

loc_707DBA:
mov	edx, [esi+8]
mov	[esi+0Ch], ebx
movzx	edi, byte ptr [eax+edx+3]
movzx	ebp, byte ptr [eax+edx+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [eax+edx+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [eax+edx]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
lea	edi, [edx+4]
mov	[esi+8], edi
fld	[esp+120h+var_10C]
mov	edx, [esp+ecx*4+120h+var_60]
mov	[esi+0Ch], ebx
fstp	[esp+edx*4+120h+var_B0]
movzx	edx, byte ptr [edi+eax+3]
movzx	ebp, byte ptr [edi+eax+2]
shl	edx, 8
or	edx, ebp
movzx	ebp, byte ptr [edi+eax+1]
shl	edx, 8
or	edx, ebp
movzx	ebp, byte ptr [edi+eax]
mov	[esi+0Ch], ebx
shl	edx, 8
or	edx, ebp
mov	[esp+120h+var_10C], edx
lea	edx, [edi+4]
mov	edi, [esp+ecx*4+120h+var_5C]
fld	[esp+120h+var_10C]
mov	[esi+8], edx
add	edx, 4
fstp	[esp+edi*4+120h+var_B0]
movzx	edi, byte ptr [edx+eax-1]
movzx	ebp, byte ptr [edx+eax-2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax-3]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax-4]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
mov	edi, [esp+ecx*4+120h+var_58]
mov	[esi+8], edx
fld	[esp+120h+var_10C]
mov	[esi+0Ch], ebx
fstp	[esp+edi*4+120h+var_B0]
movzx	edi, byte ptr [edx+eax+3]
movzx	ebp, byte ptr [edx+eax+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
mov	edi, [esp+ecx*4+120h+var_54]
add	edx, 4
fld	[esp+120h+var_10C]
mov	[esi+8], edx
fstp	[esp+edi*4+120h+var_B0]
mov	[esi+0Ch], ebx
movzx	edi, byte ptr [edx+eax+3]
movzx	ebp, byte ptr [edx+eax+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
fld	[esp+120h+var_10C]
mov	edi, [esp+ecx*4+120h+var_50]
fstp	[esp+edi*4+120h+var_B0]
mov	[esi+0Ch], ebx
add	edx, 4
mov	[esi+8], edx
movzx	edi, byte ptr [edx+eax+3]
movzx	ebp, byte ptr [edx+eax+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
mov	edi, [esp+ecx*4+120h+var_4C]
mov	[esi+0Ch], ebx
fld	[esp+120h+var_10C]
add	edx, 4
fstp	[esp+edi*4+120h+var_B0]
mov	[esi+8], edx
movzx	edi, byte ptr [edx+eax+3]
movzx	ebp, byte ptr [edx+eax+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
mov	edi, [esp+ecx*4+120h+var_48]
mov	[esi+0Ch], ebx
fld	[esp+120h+var_10C]
add	edx, 4
fstp	[esp+edi*4+120h+var_B0]
mov	[esi+8], edx
movzx	edi, byte ptr [edx+eax+3]
movzx	ebp, byte ptr [edx+eax+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
mov	edi, [esp+ecx*4+120h+var_44]
add	edx, 4
fld	[esp+120h+var_10C]
mov	[esi+8], edx
fstp	[esp+edi*4+120h+var_B0]
mov	[esi+0Ch], ebx
movzx	edi, byte ptr [edx+eax+3]
movzx	ebp, byte ptr [edx+eax+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax]
shl	edi, 8
or	edi, ebp
mov	[esp+120h+var_10C], edi
mov	edi, [esp+ecx*4+120h+var_40]
add	edx, 4
fld	[esp+120h+var_10C]
mov	[esi+8], edx
fstp	[esp+edi*4+120h+var_B0]
mov	[esi+0Ch], ebx
movzx	edi, byte ptr [edx+eax+3]
movzx	ebp, byte ptr [edx+eax+2]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax+1]
shl	edi, 8
or	edi, ebp
movzx	ebp, byte ptr [edx+eax]
shl	edi, 8
add	edx, 4
or	edi, ebp
mov	[esi+8], edx
mov	edx, [esp+ecx*4+120h+var_3C]
mov	[esp+120h+var_10C], edi
add	ecx, 0Ah
fld	[esp+120h+var_10C]
fstp	[esp+edx*4+120h+var_B0]
cmp	ecx, 14h
jb	loc_707DB2
fld	[esp+120h+var_70]
fld	ds:dbl_15FCDC0
fmul	st(1), st
fxch	st(1)
fstp	[esp+120h+var_70]
fld	[esp+120h+var_6C]
fmul	st, st(1)
fstp	[esp+120h+var_6C]
fld	[esp+120h+var_68]
fmul	st, st(1)
fstp	[esp+120h+var_68]
fmul	[esp+120h+var_64]
fstp	[esp+120h+var_64]
cmp	[esp+120h+var_107], bl
jnz	short loc_7080EA
cmp	[esp+120h+arg_4], ebx
jz	short loc_7080D8
cmp	[esp+120h+var_104], 4
jnb	short loc_7080D8
mov	eax, [esp+120h+var_100]
inc	[esp+120h+var_104]
mov	ecx, eax
add	eax, 9Ch
mov	[esp+120h+var_100], eax
lea	eax, [esp+120h+var_FC]
push	eax
call	sub_656980
jmp	short loc_7080D8

loc_7080B1:		; jumptable 007074AA cases 4,7
mov	[esi+0Ch], ebx
mov	al, [edi+ebp]
movzx	eax, al
inc	ebp
lea	eax, [eax+eax*4+13h]

loc_7080BF:
mov	[esi+8], ebp
cmp	eax, ebx
jz	short loc_7080D2 ; default

loc_7080C6:
dec	eax
inc	ebp
cmp	eax, ebx
jnz	short loc_7080C6
mov	[esi+0Ch], ebx
mov	[esi+8], ebp

loc_7080D2:		; default
cmp	[esp+120h+var_107], bl
jnz	short loc_7080EA

loc_7080D8:
mov	ecx, [esp+120h+var_104]
cmp	ecx, [esp+120h+arg_8]
jnz	short loc_7080EA
mov	[esp+120h+var_107], 1

loc_7080EA:
cmp	[esp+120h+var_105], bl
jnz	loc_707420
mov	eax, [esp+120h+var_104]
pop	edi
pop	ebp

loc_7080FA:
pop	esi
pop	ebx
add	esp, 110h
retn
sub_7073A0 endp

align 4
off_708104 dd offset loc_7074B1	; jump table for switch	statement
dd offset loc_707749
dd offset loc_707825
dd offset loc_7079DC
dd offset loc_7080B1
dd offset loc_707CB4
dd offset loc_707CDA
dd offset loc_7080B1
align 10h



sub_708130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [eax]
mov	ecx, edx
shr	ecx, 4
xor	esi, ecx
and	esi, 0Fh
xor	[eax], esi
mov	esi, [eax]
shr	edx, 2
mov	[eax+edx*4-8], esi
mov	esi, [eax+4]
lea	edx, [eax+edx*4-8]
shr	ecx, 4
and	esi, 0FFFFFFF0h
or	ecx, esi
mov	[eax+4], ecx
mov	[edx+4], ecx
mov	ecx, [eax+4]
mov	edx, [eax]
and	ecx, 0Fh
shl	ecx, 4
and	edx, 0Fh
or	ecx, edx
pop	esi
cmp	ecx, 1
jbe	short locret_708182
mov	ecx, [esp+arg_8]
mov	[eax+8], ecx

locret_708182:
retn
sub_708130 endp

align 10h



sub_708190 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_8]
push	edi
cmp	esi, 5		; switch 6 cases
ja	loc_708255	; default
jmp	ds:off_7083A8[esi*4] ; switch jump

loc_7081A8:		; jumptable 007081A1 cases 0,1
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_0]
mov	eax, ecx
add	ecx, ecx
and	ecx, 1Eh
mov	esi, 3
shl	esi, cl
shr	eax, 4
mov	edi, 1
shl	edi, cl
not	esi
and	esi, [edx+eax*4]
or	esi, edi
pop	edi
mov	[edx+eax*4], esi
pop	esi
pop	ebp
pop	ebx
retn

loc_7081D7:		; jumptable 007081A1 case 2
mov	edx, [esp+10h+arg_4]
mov	eax, [esp+10h+arg_0]
lea	ecx, [edx+edx]
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
mov	edi, edx
shr	edi, 4
mov	ebp, 2
not	ebx
and	ebx, [eax+edi*4]
shl	ebp, cl
or	ebx, ebp
mov	[eax+edi*4], ebx
jmp	loc_70837C

loc_708207:		; jumptable 007081A1 cases 3-5
mov	edx, [esp+10h+arg_4]
mov	eax, [esp+10h+arg_0]
lea	ecx, [edx+edx]
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
mov	edi, edx
shr	edi, 4
lea	ebp, [esi-3]
mov	ecx, ebx
not	ecx
and	ecx, [eax+edi*4]
or	ecx, ebx
mov	[eax+edi*4], ecx
lea	ecx, [edx+1]
mov	edi, ecx
add	ecx, ecx
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
shr	edi, 4
shl	ebp, cl
not	ebx
and	ebx, [eax+edi*4]
or	ebx, ebp
mov	[eax+edi*4], ebx
jmp	loc_70837C

loc_708255:		; default
mov	edx, [esp+10h+arg_4]
mov	eax, [esp+10h+arg_0]
mov	edi, edx
shr	edi, 4
mov	ebx, 3
cmp	esi, 26h
jnb	loc_70831D
lea	ecx, [edx+edx]
and	ecx, 1Eh
shl	ebx, cl
add	esi, 0FFFFFFFAh
mov	ebp, esi
shr	ebp, 4
mov	ecx, ebx
not	ecx
and	ecx, [eax+edi*4]
or	ecx, ebx
mov	[eax+edi*4], ecx
lea	ecx, [edx+1]
mov	edi, ecx
add	ecx, ecx
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
shr	edi, 4
mov	ecx, ebx
not	ecx
and	ecx, [eax+edi*4]
or	ecx, ebx
mov	[eax+edi*4], ecx
lea	ecx, [edx+2]
mov	edi, ecx
add	ecx, ecx
and	ecx, 1Eh
shl	ebp, cl
mov	ebx, 3
shl	ebx, cl
shr	edi, 4
lea	ecx, [edx+3]
not	ebx
and	ebx, [eax+edi*4]
or	ebx, ebp
mov	[eax+edi*4], ebx
mov	edi, ecx
add	ecx, ecx
and	ecx, 1Eh
mov	ebx, esi
shr	ebx, 2
and	ebx, 3
shl	ebx, cl
mov	ebp, 3
shl	ebp, cl
shr	edi, 4
lea	ecx, [edx+4]
and	esi, 3
not	ebp
and	ebp, [eax+edi*4]
or	ebx, ebp
mov	[eax+edi*4], ebx
mov	edi, ecx
add	ecx, ecx
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
shr	edi, 4
shl	esi, cl
not	ebx
and	ebx, [eax+edi*4]
or	ebx, esi
mov	esi, [esp+10h+arg_8]
mov	[eax+edi*4], ebx
jmp	short loc_70837C

loc_70831D:
lea	ebp, [edx+edx]
mov	ecx, ebp
and	ecx, 1Eh
shl	ebx, cl
add	ebp, 25h
mov	ecx, ebx
not	ecx
and	ecx, [eax+edi*4]
or	ecx, ebx
mov	[eax+edi*4], ecx
lea	ecx, [edx+1]
mov	edi, ecx
add	ecx, ecx
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
shr	edi, 4
mov	ecx, ebx
not	ecx
and	ecx, [eax+edi*4]
or	ecx, ebx
mov	[eax+edi*4], ecx
lea	ecx, [edx+2]
mov	edi, ecx
add	ecx, ecx
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
shr	edi, 4
mov	ecx, ebx
not	ecx
and	ecx, [eax+edi*4]
or	ecx, ebx
shr	ebp, 5
mov	[eax+edi*4], ecx
mov	[eax+ebp*4], esi

loc_70837C:
lea	edx, [edx+esi-1]
lea	ecx, [edx+edx]
mov	edi, edx
and	ecx, 1Eh
mov	edx, 3
shl	edx, cl
shr	edi, 4
mov	esi, 1
shl	esi, cl
not	edx
and	edx, [eax+edi*4]
or	edx, esi
mov	[eax+edi*4], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_708190 endp

off_7083A8 dd offset loc_7081A8	; jump table for switch	statement
dd offset loc_7081A8
dd offset loc_7081D7
dd offset loc_708207
dd offset loc_708207
dd offset loc_708207



sub_7083C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	ebx
lea	ebx, [edx+edx]
mov	eax, edx
shr	eax, 4
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+eax*4]
mov	ecx, ebx
and	ecx, 1Eh
shr	eax, cl
and	eax, 3
cmp	eax, 3
jb	loc_708472
lea	eax, [edx+1]
push	esi
mov	esi, eax
lea	ecx, [eax+eax]
shr	esi, 4
mov	eax, [edi+esi*4]
and	ecx, 1Eh
shr	eax, cl
and	eax, 3
cmp	eax, 3
jnb	short loc_70840B
pop	esi
pop	edi
add	eax, 3
pop	ebx
retn

loc_70840B:
lea	eax, [edx+2]
mov	esi, eax
shr	esi, 4
mov	esi, [edi+esi*4]
lea	ecx, [eax+eax]
and	ecx, 1Eh
shr	esi, cl
and	esi, 3
cmp	esi, 3
jnb	short loc_708468
lea	eax, [edx+3]
mov	ebx, eax
lea	ecx, [eax+eax]
shr	ebx, 4
mov	eax, [edi+ebx*4]
and	ecx, 1Eh
shr	eax, cl
add	edx, 4
lea	ecx, ds:0[esi*4]
mov	esi, edx
and	eax, 3
or	eax, ecx
lea	ecx, [edx+edx]
shr	esi, 4
mov	edx, [edi+esi*4]
and	ecx, 1Eh
shr	edx, cl
add	eax, eax
add	eax, eax
pop	esi
and	edx, 3
or	eax, edx
pop	edi
add	eax, 6
pop	ebx
retn

loc_708468:
add	ebx, 25h
shr	ebx, 5
mov	eax, [edi+ebx*4]
pop	esi

loc_708472:
pop	edi
pop	ebx
retn
sub_7083C0 endp

align 10h



sub_708480 proc	near
push	esi
mov	esi, ecx
call	sub_74A6E0
mov	eax, esi
pop	esi
retn
sub_708480 endp

align 10h



sub_708490 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [ecx+0Ch]
push	edi
lea	eax, [esp+30h+var_1C]
push	eax
push	edx
mov	[esp+38h+var_20], ebp
call	sub_6A07E0
mov	eax, [esp+38h+var_14]
push	40h		; size_t
push	55h		; int
push	eax		; void *
call	_memset
mov	eax, [esp+44h+var_1C]
mov	ecx, [esp+44h+arg_4]
xor	esi, esi
add	esp, 14h
cmp	eax, esi
jz	short loc_7084F2
mov	edx, 5FC0h
mov	[eax], dx
mov	edx, [esp+30h+var_1C]
xor	eax, eax
mov	[edx+2], ax
mov	eax, [esp+30h+var_1C]
mov	[eax+4], ecx
mov	edx, [esp+30h+var_1C]
mov	[edx+8], esi
mov	eax, [esp+30h+var_1C]

loc_7084F2:
mov	edx, [esp+30h+var_18]
cmp	edx, esi
jz	short loc_708522
mov	eax, 5FC0h
mov	[edx], ax
mov	eax, [esp+30h+var_18]
xor	edx, edx
mov	[eax+2], dx
mov	edx, [esp+30h+var_18]
mov	[edx+4], ecx
mov	eax, [esp+30h+var_18]
mov	[eax+8], esi
mov	edx, [esp+30h+var_18]
mov	eax, [esp+30h+var_1C]

loc_708522:
xor	ebx, ebx
xor	edi, edi
mov	[esp+30h+arg_4], ebx
test	eax, eax
jz	short loc_708534
mov	esi, [esp+30h+var_10]
mov	ebx, eax

loc_708534:
test	edx, edx
jz	short loc_708543
mov	ecx, [esp+30h+var_C]
lea	edi, [edx+10h]
mov	[esp+30h+arg_4], ecx

loc_708543:
mov	edx, [esp+30h+var_14]
cmp	edx, [esp+30h+var_8]
jnb	short loc_708552
sub	ebx, 40h
jmp	short loc_708555

loc_708552:
add	edi, 40h

loc_708555:
test	esi, esi
jz	short loc_7085BC
mov	eax, [esp+30h+arg_0]
push	eax
sub	ebx, esi
push	ebx
push	esi
call	sub_708130
add	esp, 0Ch
push	esi
mov	ecx, ebp
call	sub_74A920
sub	esi, [esp+30h+var_10]
mov	eax, [esp+30h+var_14]
sar	esi, 4
mov	edx, eax
mov	ecx, esi
shr	ecx, 4
lea	eax, [eax+ecx*4]
lea	ecx, [esi+esi]
and	ecx, 1Eh
mov	ebp, 3
shl	ebp, cl
sar	ebx, 4
not	ebp
and	[eax], ebp
mov	ebp, [esp+30h+var_20]
lea	eax, [ebx+esi-1]
mov	ecx, eax
shr	ecx, 4
lea	edx, [edx+ecx*4]
lea	ecx, [eax+eax]
and	ecx, 1Eh
mov	eax, 3
shl	eax, cl
not	eax
and	[edx], eax

loc_7085BC:
test	edi, edi
jz	short loc_708623
mov	ecx, [esp+30h+arg_0]
mov	esi, [esp+30h+arg_4]
push	ecx
sub	esi, edi
push	esi
push	edi
call	sub_708130
add	esp, 0Ch
push	edi
mov	ecx, ebp
call	sub_74A920
sub	edi, [esp+30h+var_10]
mov	eax, [esp+30h+var_14]
sar	edi, 4
mov	edx, eax
mov	ecx, edi
shr	ecx, 4
lea	eax, [eax+ecx*4]
lea	ecx, [edi+edi]
and	ecx, 1Eh
mov	ebx, 3
shl	ebx, cl
sar	esi, 4
not	ebx
and	[eax], ebx
lea	eax, [esi+edi-1]
mov	ecx, eax
shr	ecx, 4
lea	edx, [edx+ecx*4]
lea	ecx, [eax+eax]
and	ecx, 1Eh
mov	eax, 3
shl	eax, cl
not	eax
and	[edx], eax

loc_708623:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	8
sub_708490 endp

align 10h



sub_708630 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 1Ch
push	esi
lea	eax, [esp+20h+var_1C]
mov	esi, ecx
mov	ecx, [esp+20h+arg_0]
push	eax
push	ecx
call	sub_6A07E0
add	esp, 8
cmp	[esp+20h+var_1C], 0
jz	short loc_70865B
mov	edx, [esp+20h+var_10]
push	edx
mov	ecx, esi
call	sub_74A9B0

loc_70865B:
mov	eax, [esp+20h+var_18]
test	eax, eax
jz	short loc_70867B
mov	ecx, [esp+20h+var_14]
add	eax, 10h
cmp	ecx, [esp+20h+var_8]
jbe	short loc_708673
add	eax, 40h

loc_708673:
push	eax
mov	ecx, esi
call	sub_74A9B0

loc_70867B:
pop	esi
add	esp, 1Ch
retn	4
sub_708630 endp

align 10h



sub_708690 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	eax, ebp
shr	eax, 4
push	edi
push	eax
mov	[esp+18h+var_8], ecx
mov	[esp+18h+var_4], eax
call	sub_74A700
mov	edi, eax
xor	eax, eax
test	edi, edi
jz	loc_7087A0
mov	eax, [edi+4]
mov	ecx, [edi]
and	eax, 0Fh
shl	eax, 4
and	ecx, 0Fh
or	eax, ecx
push	ebx
push	esi
cmp	eax, 1
jbe	short loc_7086DA
mov	esi, [edi+8]
mov	[esp+1Ch+var_C], esi
test	esi, esi
jnz	short loc_7086EC

loc_7086DA:
mov	ecx, dword_1856470
push	edi
call	sub_6A08E0
mov	[esp+1Ch+var_C], eax
mov	esi, eax

loc_7086EC:
mov	ebx, [esp+1Ch+arg_4]
mov	edx, [esi+0Ch]
push	ebx
push	edx
call	sub_6A07E0
mov	[ebx+18h], esi
mov	esi, [edi+4]
mov	eax, [edi]
and	esi, 0Fh
shl	esi, 4
and	eax, 0Fh
or	esi, eax
shl	esi, 4
add	esp, 8
sub	esi, ebp
jz	short loc_708782
mov	ecx, [esp+1Ch+var_C]
push	ecx
add	ebp, edi
push	esi
push	ebp
call	sub_708130
mov	ecx, [esp+28h+var_8]
add	esp, 0Ch
push	ebp
call	sub_74A920
mov	edx, [ebx+8]
mov	eax, edi
sub	eax, [ebx+0Ch]
mov	ebp, 3
add	eax, [esp+1Ch+arg_0]
shr	esi, 4
sar	eax, 4
mov	ecx, eax
shr	ecx, 4
lea	ecx, [edx+ecx*4]
mov	[esp+1Ch+arg_0], ecx
lea	ecx, [eax+eax]
and	ecx, 1Eh
shl	ebp, cl
mov	ecx, [esp+1Ch+arg_0]
lea	eax, [esi+eax-1]
not	ebp
and	[ecx], ebp
mov	ecx, eax
shr	ecx, 4
lea	edx, [edx+ecx*4]
lea	ecx, [eax+eax]
and	ecx, 1Eh
mov	eax, 3
shl	eax, cl
not	eax
and	[edx], eax

loc_708782:
mov	ecx, [esp+1Ch+var_4]
mov	eax, [ebx+8]
mov	edx, edi
sub	edx, [ebx+0Ch]
push	ecx
sar	edx, 4
push	edx
push	eax
call	sub_708190
add	esp, 0Ch
pop	esi
mov	eax, edi
pop	ebx

loc_7087A0:
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_708690 endp

align 10h



sub_7087B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
mov	eax, [esi+0Ch]
push	edi
mov	edi, [esp+14h+arg_8]
push	edi
push	eax
mov	[esp+1Ch+var_4], ecx
call	sub_6A07E0
mov	ecx, [edi+8]
mov	[edi+18h], esi
mov	esi, [esp+1Ch+arg_4]
sub	esi, [edi+0Ch]
sar	esi, 4
push	esi
push	ecx
call	sub_7083C0
mov	ecx, [esp+24h+arg_C]
mov	edx, eax
shl	edx, 4
mov	[ecx], edx
mov	ebx, [edi+8]
mov	ecx, esi
shr	ecx, 4
lea	ecx, [ebx+ecx*4]
mov	[esp+24h+arg_8], ecx
lea	ecx, [esi+esi]
and	ecx, 1Eh
mov	ebp, 3
shl	ebp, cl
mov	ecx, [esp+24h+arg_8]
add	esp, 10h
not	ebp
and	[ecx], ebp
lea	ebp, [eax+esi]
lea	ecx, [ebp-1]
mov	eax, ecx
shr	eax, 4
lea	ebx, [ebx+eax*4]
add	ecx, ecx
and	ecx, 1Eh
mov	eax, 3
shl	eax, cl
not	eax
and	[ebx], eax
mov	ebx, [esp+14h+arg_4]
lea	ecx, [edx+ebx]
cmp	ecx, [edi+10h]
setb	al
test	esi, esi
jz	short loc_708865
dec	esi
mov	ebx, esi
shr	ebx, 4
lea	ecx, [esi+esi]
mov	esi, [edi+8]
mov	ebx, [esi+ebx*4]
and	ecx, 1Eh
shr	ebx, cl
mov	byte ptr [esp+14h+arg_8], 1
test	bl, 3
mov	ebx, [esp+14h+arg_4]
jz	short loc_70886A

loc_708865:
mov	byte ptr [esp+14h+arg_8], 0

loc_70886A:
test	al, al
jz	short loc_70888A
mov	esi, [edi+8]
mov	eax, ebp
shr	eax, 4
mov	eax, [esi+eax*4]
lea	ecx, [ebp+ebp+0]
and	ecx, 1Eh
shr	eax, cl
test	al, 3
jnz	short loc_70888A
mov	al, 1
jmp	short loc_70888C

loc_70888A:
xor	al, al

loc_70888C:
mov	byte ptr [esp+14h+arg_4], al
or	al, byte ptr [esp+14h+arg_8]
jz	short loc_7088B8
mov	ecx, [esp+14h+arg_0]
mov	eax, [esp+14h+arg_4]
push	ecx
mov	ecx, [esp+18h+arg_8]
push	eax
push	ecx
mov	ecx, [esp+20h+var_4]
push	edx
push	ebx
call	sub_74AA60
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h

loc_7088B8:
mov	eax, [esp+14h+arg_0]
push	eax
push	edx
push	ebx
call	sub_708130
mov	ecx, [esp+20h+var_4]
add	esp, 0Ch
push	ebx
call	sub_74A920
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_7087B0 endp

align 10h



sub_7088E0 proc	near

var_1C=	byte ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	edx, [ecx+0Ch]
sub	esp, 1Ch
lea	eax, [esp+1Ch+var_1C]
push	eax
push	edx
call	sub_6A07E0
mov	eax, [esp+24h+arg_4]
sub	eax, [esp+24h+var_10]
mov	ecx, [esp+24h+var_14]
sar	eax, 4
push	eax
push	ecx
call	sub_7083C0
shl	eax, 4
add	esp, 2Ch
retn	8
sub_7088E0 endp

align 10h



sub_708920 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
push	ebx
mov	ebx, [esp+10h+arg_4]
push	esi
dec	ebx
shr	eax, 4
push	ebx
push	eax
mov	[esp+1Ch+var_8], ecx
mov	[esp+1Ch+var_4], eax
call	sub_74A810
mov	esi, eax
test	esi, esi
jz	loc_708AC1
mov	eax, [esi+4]
mov	ecx, [esi]
and	eax, 0Fh
shl	eax, 4
and	ecx, 0Fh
or	eax, ecx
push	ebp
push	edi
cmp	eax, 1
jbe	short loc_70896C
mov	edi, [esi+8]
mov	[esp+1Ch+var_C], edi
test	edi, edi
jnz	short loc_70897E

loc_70896C:
mov	ecx, dword_1856470
push	esi
call	sub_6A08E0
mov	[esp+1Ch+var_C], eax
mov	edi, eax

loc_70897E:
push	ebx
push	esi
call	sub_74A670
mov	ebp, [esp+24h+arg_8]
mov	edx, [edi+0Ch]
mov	ebx, eax
push	ebp
push	edx
mov	[esp+2Ch+arg_4], ebx
call	sub_6A07E0
mov	[ebp+18h], edi
mov	edi, [esi+4]
mov	eax, [esi]
and	edi, 0Fh
shl	edi, 4
and	eax, 0Fh
or	edi, eax
shl	edi, 4
sub	edi, [esp+2Ch+arg_4]
sub	ebx, esi
sub	edi, [esp+2Ch+arg_0]
add	esp, 10h
add	edi, esi
test	ebx, ebx
jz	short loc_708A25
mov	ecx, [esp+1Ch+var_C]
push	ecx
push	ebx
push	esi
call	sub_708130
mov	ecx, [esp+28h+var_8]
add	esp, 0Ch
push	esi
call	sub_74A920
sub	esi, [ebp+0Ch]
mov	eax, [ebp+8]
sar	esi, 4
mov	edx, esi
shr	edx, 4
lea	ecx, [eax+edx*4]
mov	[esp+1Ch+arg_8], ecx
lea	ecx, [esi+esi]
and	ecx, 1Eh
mov	edx, 3
shl	edx, cl
mov	ecx, [esp+1Ch+arg_8]
shr	ebx, 4
lea	ebx, [ebx+esi-1]
not	edx
and	[ecx], edx
mov	ecx, ebx
shr	ecx, 4
lea	eax, [eax+ecx*4]
lea	ecx, [ebx+ebx]
and	ecx, 1Eh
mov	edx, 3
shl	edx, cl
not	edx
and	[eax], edx

loc_708A25:
test	edi, edi
jz	short loc_708A97
mov	edx, [esp+1Ch+var_C]
mov	eax, [esp+1Ch+arg_4]
mov	ecx, [esp+1Ch+arg_0]
push	edx
lea	esi, [eax+ecx]
push	edi
push	esi
call	sub_708130
mov	ecx, [esp+28h+var_8]
add	esp, 0Ch
push	esi
call	sub_74A920
mov	eax, [esp+1Ch+arg_4]
sub	eax, [ebp+0Ch]
mov	edx, [ebp+8]
add	eax, [esp+1Ch+arg_0]
shr	edi, 4
sar	eax, 4
mov	ecx, eax
shr	ecx, 4
lea	esi, [edx+ecx*4]
lea	ecx, [eax+eax]
and	ecx, 1Eh
lea	eax, [edi+eax-1]
mov	ebx, 3
shl	ebx, cl
mov	ecx, eax
shr	ecx, 4
lea	edx, [edx+ecx*4]
lea	ecx, [eax+eax]
and	ecx, 1Eh
mov	eax, 3
shl	eax, cl
not	ebx
and	[esi], ebx
not	eax
and	[edx], eax

loc_708A97:
mov	edx, [esp+1Ch+arg_4]
sub	edx, [ebp+0Ch]
mov	ecx, [esp+1Ch+var_4]
mov	eax, [ebp+8]
push	ecx
sar	edx, 4
push	edx
push	eax
call	sub_708190
mov	eax, [esp+28h+arg_4]
add	esp, 0Ch
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_708AC1:
pop	esi
xor	eax, eax
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_708920 endp

align 10h



sub_708AD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_10]
push	edi
mov	edi, [esp+20h+arg_0]
mov	eax, [edi+0Ch]
push	esi
push	eax
mov	[esp+28h+var_10], ecx
call	sub_6A07E0
mov	eax, [esi+14h]
mov	ebp, [esp+28h+arg_4]
mov	ecx, [esi+0Ch]
mov	edx, [esi+10h]
add	esp, 8
mov	[esi+18h], edi
mov	[esp+20h+var_8], ecx
mov	[esp+20h+arg_10], edx
cmp	ebp, eax
jnb	short loc_708B1D
lea	edx, [eax-10h]
mov	[esp+20h+arg_10], edx
cmp	[esi+8], eax
jnb	short loc_708B1D
sub	[esp+20h+arg_10], 40h

loc_708B1D:
mov	ebx, [esi+8]
sub	ebp, ecx
sar	ebp, 4
push	ebp
push	ebx
mov	[esp+28h+var_C], ebp
call	sub_7083C0
mov	edi, [esp+28h+arg_8]
mov	ecx, [esp+28h+arg_C]
mov	esi, eax
shl	esi, 4
add	esp, 8
mov	[esp+20h+var_4], eax
mov	[ecx], esi
cmp	edi, esi
jbe	loc_708C34
mov	edx, [esp+20h+arg_4]
add	edx, esi
cmp	edx, [esp+20h+arg_10]
jnb	loc_708C28
add	ebp, eax
mov	eax, ebp
shr	eax, 4
mov	eax, [ebx+eax*4]
lea	ecx, [ebp+ebp+0]
and	ecx, 1Eh
shr	eax, cl
test	al, 3
jnz	loc_708C28
mov	ebp, [edx+4]
mov	ecx, [edx]
and	ebp, 0Fh
shl	ebp, 4
and	ecx, 0Fh
or	ebp, ecx
shl	ebp, 4
lea	eax, [esi+ebp]
cmp	edi, eax
ja	loc_708C28
mov	ecx, [esp+20h+var_10]
push	edx
call	sub_74A9B0
sub	ebp, edi
add	ebp, esi
jz	short loc_708C08
mov	edx, [esp+20h+arg_0]
mov	ecx, [esp+20h+arg_4]
push	edx
lea	esi, [ecx+edi]
push	ebp
push	esi
call	sub_708130
mov	ecx, [esp+2Ch+var_10]
add	esp, 0Ch
push	esi
call	sub_74A920
sub	esi, [esp+20h+var_8]
mov	edx, 3
sar	esi, 4
lea	ecx, [esi+esi]
and	ecx, 1Eh
shl	edx, cl
mov	eax, esi
shr	eax, 4
shr	ebp, 4
lea	eax, [ebx+eax*4]
not	edx
and	[eax], edx
lea	ebp, [esi+ebp-1]
lea	ecx, [ebp+ebp+0]
and	ecx, 1Eh
mov	edx, 3
shl	edx, cl
mov	eax, ebp
shr	eax, 4
lea	eax, [ebx+eax*4]
not	edx
and	[eax], edx

loc_708C08:
mov	eax, [esp+20h+var_C]
shr	edi, 4
push	edi
push	eax
push	ebx
call	sub_708190
mov	eax, [esp+2Ch+arg_4]
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	14h

loc_708C28:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 10h
retn	14h

loc_708C34:
jnb	loc_708D0E
mov	eax, [esp+20h+arg_4]
mov	ecx, esi
sub	ecx, edi
add	esi, eax
xor	edx, edx
mov	[esp+20h+arg_C], ecx
cmp	esi, [esp+20h+arg_10]
jnb	short loc_708C82
mov	ecx, [esp+20h+var_4]
lea	eax, [ecx+ebp]
mov	ebp, eax
lea	ecx, [eax+eax]
shr	ebp, 4
mov	eax, [ebx+ebp*4]
and	ecx, 1Eh
shr	eax, cl
test	al, 3
jnz	short loc_708C7E
mov	edx, [esi+4]
mov	ecx, [esi]
and	edx, 0Fh
shl	edx, 4
and	ecx, 0Fh
or	edx, ecx
shl	edx, 4

loc_708C7E:
mov	ecx, [esp+20h+arg_C]

loc_708C82:
lea	ebp, [edx+ecx]
test	ebp, ebp
jz	loc_708D0E
test	edx, edx
jz	short loc_708C9B
mov	ecx, [esp+20h+var_10]
push	esi
call	sub_74A9B0

loc_708C9B:
mov	eax, [esp+20h+arg_0]
mov	edx, [esp+20h+arg_4]
push	eax
lea	esi, [edx+edi]
push	ebp
push	esi
call	sub_708130
mov	ecx, [esp+2Ch+var_10]
add	esp, 0Ch
push	esi
call	sub_74A920
mov	ecx, [esp+20h+var_C]
shr	edi, 4
push	edi
push	ecx
push	ebx
call	sub_708190
sub	esi, [esp+2Ch+var_8]
shr	ebp, 4
sar	esi, 4
mov	edx, esi
shr	edx, 4
lea	eax, [ebx+edx*4]
lea	ecx, [esi+esi]
and	ecx, 1Eh
mov	edx, 3
shl	edx, cl
lea	ebp, [esi+ebp-1]
lea	ecx, [ebp+ebp+0]
and	ecx, 1Eh
not	edx
and	[eax], edx
mov	edx, 3
shl	edx, cl
mov	eax, ebp
shr	eax, 4
lea	ebx, [ebx+eax*4]
not	edx
add	esp, 0Ch
and	[ebx], edx

loc_708D0E:
mov	eax, [esp+20h+arg_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	14h
sub_708AD0 endp

align 10h



; int __stdcall	sub_708D20(float)
sub_708D20 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fst	dword ptr [ecx]
fmul	ds:dbl_15FD2F8
fstp	[esp+arg_0]
fld	[esp+arg_0]
fmul	st, st
fstp	dword ptr [ecx+4]
retn	4
sub_708D20 endp

align 10h



sub_708D40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld1
mov	eax, [esp+arg_8]
mov	edx, [esp+arg_C]
push	ebx
mov	ebx, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_0]
fst	dword ptr [edi]
fstp	dword ptr [ebx]
fldz
fst	dword ptr [eax]
fstp	dword ptr [edx]
cmp	dword ptr [ecx+8], 0
jz	loc_708E13
push	esi
mov	esi, [ecx+14h]
mov	esi, [esi]
fld	dword ptr [esi]
mov	esi, 1
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
fst	dword ptr [eax]
fstp	dword ptr [edi]
mov	eax, [ecx+14h]
mov	eax, [eax]
fld	dword ptr [eax+4]
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
fst	dword ptr [edx]
fstp	dword ptr [ebx]
cmp	[ecx+8], esi
jbe	short loc_708E12
push	ebp
jmp	short loc_708DA0
align 10h

loc_708DA0:
mov	eax, [ecx+14h]
mov	edx, esi
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ebp, esi
and	ebp, 0FFh
fld	dword ptr [edx+ebp*8]
lea	edx, [edx+ebp*8]
fld	dword ptr [edi]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_708DC8
fld	dword ptr [edx]
fstp	dword ptr [edi]

loc_708DC8:
fld	dword ptr [edx+4]
fld	dword ptr [ebx]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_708DDB
fld	dword ptr [edx+4]
fstp	dword ptr [ebx]

loc_708DDB:
fld	dword ptr [edx]
mov	ebp, [esp+10h+arg_8]
fld	dword ptr [ebp+0]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_708DF2
fld	dword ptr [edx]
fstp	dword ptr [ebp+0]

loc_708DF2:
fld	dword ptr [edx+4]
mov	ebp, [esp+10h+arg_C]
fld	dword ptr [ebp+0]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_708E0B
fld	dword ptr [edx+4]
fstp	dword ptr [ebp+0]

loc_708E0B:
inc	esi
cmp	esi, [ecx+8]
jb	short loc_708DA0
pop	ebp

loc_708E12:
pop	esi

loc_708E13:
pop	edi
pop	ebx
retn	10h
sub_708D40 endp

align 10h



; int __stdcall	sub_708E20(float, float, float,	float)
sub_708E20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

xor	edx, edx
cmp	[ecx+8], edx
jbe	short locret_708E82
fld	[esp+arg_C]
push	esi
fld	[esp+4+arg_8]
push	edi
fld	[esp+8+arg_4]
fld	[esp+8+arg_0]

loc_708E39:
mov	esi, [ecx+14h]
mov	eax, edx
shr	eax, 8
mov	eax, [esi+eax*4]
mov	edi, edx
and	edi, 0FFh
fld	dword ptr [eax+edi*8]
lea	eax, [eax+edi*8]
fmul	st, st(1)
inc	edx
fstp	[esp+8+arg_C]
fld	[esp+8+arg_C]
fadd	st, st(3)
fstp	dword ptr [eax]
fld	dword ptr [eax+4]
fmul	st, st(2)
fstp	[esp+8+arg_C]
fld	[esp+8+arg_C]
fadd	st, st(4)
fstp	dword ptr [eax+4]
cmp	edx, [ecx+8]
jb	short loc_708E39
fstp	st(3)
pop	edi
fstp	st(1)
pop	esi
fstp	st
fstp	st

locret_708E82:
retn	10h
sub_708E20 endp

align 10h



; int __stdcall	sub_708E90(float)
sub_708E90 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
xor	edx, edx
mov	[esp+1Ch+var_1C], edx
cmp	[ecx+18h], edx
jbe	loc_7091F8
fld	[esp+1Ch+arg_0]
push	ebx
push	ebp
push	esi
push	edi

loc_708EA9:
mov	edi, [ecx+24h]
mov	esi, edx
mov	eax, edx
and	eax, 3Fh
shr	esi, 6
mov	esi, [edi+esi*4]
lea	eax, [eax+eax*2]
mov	ebp, [esi+eax*8+4]
lea	eax, [esi+eax*8]
cmp	ebp, 2
jbe	loc_7091E4
mov	esi, [eax+8]
mov	edi, [ecx+14h]
mov	edx, esi
shr	edx, 8
mov	edx, [edi+edx*4]
mov	eax, esi
and	eax, 0FFh
mov	edi, [edx+eax*8]
mov	ebx, [edx+eax*8+4]
dec	ebp
mov	edx, 1
mov	[esp+2Ch+var_C], esi
mov	[esp+2Ch+var_14], ebp
mov	[esp+2Ch+var_8], edi
mov	[esp+2Ch+var_4], ebx
cmp	ebp, edx
jbe	loc_709169
lea	eax, [ebp-1]
cmp	eax, 4
jl	loc_7090DD
add	ebp, 0FFFFFFFBh
shr	ebp, 2
add	esi, 2
inc	ebp
lea	edx, ds:1[ebp*4]
mov	[esp+2Ch+arg_0], ebp
mov	[esp+2Ch+var_10], edx

loc_708F2B:
mov	edx, [ecx+14h]
lea	eax, [esi-1]
shr	eax, 8
mov	eax, [edx+eax*4]
lea	ebp, [esi-1]
and	ebp, 0FFh
fld	dword ptr [eax+ebp*8]
lea	edx, [eax+ebp*8]
fsub	[esp+2Ch+var_8]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fld	dword ptr [edx+4]
fsub	[esp+2Ch+var_4]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fadd	[esp+2Ch+var_18]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_708F8D
mov	edi, [edx]
mov	ebx, [edx+4]
mov	[esp+2Ch+var_8], edi
mov	[esp+2Ch+var_4], ebx
jmp	short loc_708F92

loc_708F8D:
mov	[edx], edi
mov	[edx+4], ebx

loc_708F92:
mov	eax, [ecx+14h]
mov	edx, esi
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ebp, esi
and	ebp, 0FFh
fld	dword ptr [edx+ebp*8]
lea	edx, [edx+ebp*8]
fsub	[esp+2Ch+var_8]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fld	dword ptr [edx+4]
fsub	[esp+2Ch+var_4]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fadd	[esp+2Ch+var_18]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_708FF2
mov	edi, [edx]
mov	ebx, [edx+4]
mov	[esp+2Ch+var_8], edi
mov	[esp+2Ch+var_4], ebx
jmp	short loc_708FF7

loc_708FF2:
mov	[edx], edi
mov	[edx+4], ebx

loc_708FF7:
mov	ebp, [ecx+14h]
lea	eax, [esi+1]
mov	edx, eax
shr	edx, 8
mov	edx, [ebp+edx*4+0]
and	eax, 0FFh
fld	dword ptr [edx+eax*8]
lea	edx, [edx+eax*8]
fsub	[esp+2Ch+var_8]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fld	dword ptr [edx+4]
fsub	[esp+2Ch+var_4]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fadd	[esp+2Ch+var_18]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_709058
mov	edi, [edx]
mov	ebx, [edx+4]
mov	[esp+2Ch+var_8], edi
mov	[esp+2Ch+var_4], ebx
jmp	short loc_70905D

loc_709058:
mov	[edx], edi
mov	[edx+4], ebx

loc_70905D:
mov	ebp, [ecx+14h]
lea	eax, [esi+2]
mov	edx, eax
shr	edx, 8
mov	edx, [ebp+edx*4+0]
and	eax, 0FFh
fld	dword ptr [edx+eax*8]
lea	edx, [edx+eax*8]
fsub	[esp+2Ch+var_8]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fld	dword ptr [edx+4]
fsub	[esp+2Ch+var_4]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fabs
fstp	[esp+2Ch+var_18]
fadd	[esp+2Ch+var_18]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_7090BE
mov	edi, [edx]
mov	ebx, [edx+4]
mov	[esp+2Ch+var_8], edi
mov	[esp+2Ch+var_4], ebx
jmp	short loc_7090C3

loc_7090BE:
mov	[edx], edi
mov	[edx+4], ebx

loc_7090C3:
add	esi, 4
sub	[esp+2Ch+arg_0], 1
jnz	loc_708F2B
mov	edx, [esp+2Ch+var_10]
mov	ebp, [esp+2Ch+var_14]
mov	esi, [esp+2Ch+var_C]

loc_7090DD:
cmp	edx, ebp
jnb	loc_709169
lea	eax, [edx+esi]
sub	ebp, edx
mov	[esp+2Ch+arg_0], eax
mov	[esp+2Ch+var_18], ebp

loc_7090F2:
mov	ebp, [ecx+14h]
mov	edx, eax
shr	edx, 8
mov	edx, [ebp+edx*4+0]
and	eax, 0FFh
fld	dword ptr [edx+eax*8]
lea	edx, [edx+eax*8]
fsub	[esp+2Ch+var_8]
fstp	[esp+2Ch+var_C]
fld	[esp+2Ch+var_C]
fabs
fstp	[esp+2Ch+var_C]
fld	[esp+2Ch+var_C]
fld	dword ptr [edx+4]
fsub	[esp+2Ch+var_4]
fstp	[esp+2Ch+var_C]
fld	[esp+2Ch+var_C]
fabs
fstp	[esp+2Ch+var_C]
fadd	[esp+2Ch+var_C]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_709150
mov	edi, [edx]
mov	ebx, [edx+4]
mov	[esp+2Ch+var_8], edi
mov	[esp+2Ch+var_4], ebx
jmp	short loc_709155

loc_709150:
mov	[edx], edi
mov	[edx+4], ebx

loc_709155:
mov	eax, [esp+2Ch+arg_0]
inc	eax
sub	[esp+2Ch+var_18], 1
mov	[esp+2Ch+arg_0], eax
jnz	short loc_7090F2
mov	ebp, [esp+2Ch+var_14]

loc_709169:
lea	edx, [esi+ebp]
mov	esi, [ecx+14h]
mov	edi, edx
mov	eax, edx
and	eax, 0FFh
shr	edi, 8
mov	edi, [esi+edi*4]
mov	ebx, [edi+eax*8]
mov	edi, [edi+eax*8+4]
lea	eax, [edx-1]
mov	edx, eax
shr	edx, 8
mov	edx, [esi+edx*4]
and	eax, 0FFh
fld	dword ptr [edx+eax*8]
lea	edx, [edx+eax*8]
mov	[esp+2Ch+var_8], ebx
fsub	[esp+2Ch+var_8]
mov	[esp+2Ch+var_4], edi
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
fabs
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
fld	dword ptr [edx+4]
fsub	[esp+2Ch+var_4]
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
fabs
fstp	[esp+2Ch+arg_0]
fadd	[esp+2Ch+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_7091E0
mov	[edx], ebx
mov	[edx+4], edi

loc_7091E0:
mov	edx, [esp+2Ch+var_1C]

loc_7091E4:
inc	edx
mov	[esp+2Ch+var_1C], edx
cmp	edx, [ecx+18h]
jb	loc_708EA9
pop	edi
fstp	st
pop	esi
pop	ebp
pop	ebx

loc_7091F8:
add	esp, 1Ch
retn	4
sub_708E90 endp

align 10h



sub_709200 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_709251
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_709230
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_70924A

loc_709230:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 8Ah
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_70924A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_709251:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 8Ah
mov	eax, [ecx]
mov	eax, [eax+38h]
push	800h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_709200 endp

align 10h



sub_709280 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_7092CE
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_7092B0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_7092C7

loc_7092B0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 8Ah
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_7092C7:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_7092CE:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 8Ah
mov	eax, [ecx]
mov	eax, [eax+38h]
push	600h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_709280 endp

align 10h



sub_709300 proc	near
fld1
xor	eax, eax
fst	dword ptr [ecx+34h]
mov	[ecx+8], eax
fstp	dword ptr [ecx+38h]
mov	[ecx+18h], eax
fldz
mov	[ecx+28h], eax
fst	dword ptr [ecx+3Ch]
mov	dword ptr [ecx+2Ch], 7FFFFFFFh
fstp	dword ptr [ecx+40h]
mov	dword ptr [ecx+30h], 80000001h
retn
sub_709300 endp

align 10h



sub_709330 proc	near
fld1
mov	eax, ecx
fst	dword ptr [eax+34h]
push	esi
fstp	dword ptr [eax+38h]
lea	ecx, [eax+8]
fldz
lea	esi, [eax+18h]
fst	dword ptr [eax+3Ch]
mov	dword ptr [ecx], 0
fstp	dword ptr [eax+40h]
mov	dword ptr [esi], 0
mov	dword ptr [eax+28h], 0
mov	dword ptr [eax+2Ch], 7FFFFFFFh
mov	dword ptr [eax+30h], 80000001h
call	sub_74CD90
mov	ecx, esi
pop	esi
jmp	sub_74CD90
sub_709330 endp

align 10h



sub_709380 proc	near
mov	edx, [ecx+1Ch]
mov	eax, [ecx+0Ch]
shl	eax, 9
lea	edx, [edx+edx*2]
shl	edx, 7
add	eax, edx
add	eax, [ecx+20h]
add	eax, [ecx+10h]
add	eax, eax
add	eax, eax
retn
sub_709380 endp

align 10h



sub_7093A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	edx, [esp+arg_0]
push	esi
xor	esi, esi
cmp	[edx+4], esi
jbe	loc_709439
push	ebx
mov	ebx, [esp+8+arg_10]
push	ebp
push	edi
mov	edi, [esp+10h+arg_4]
jmp	short loc_7093C0
align 10h

loc_7093C0:
mov	eax, [edx+8]
mov	ebp, [edx]
mov	ebp, [ebp+14h]
add	eax, esi
mov	ecx, eax
shr	ecx, 8
mov	ecx, [ebp+ecx*4+0]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8]
lea	ecx, [ecx+eax*8]
fld	dword ptr [edi]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_7093ED
fld	dword ptr [ecx]
fstp	dword ptr [edi]

loc_7093ED:
fld	dword ptr [ecx+4]
mov	ebp, [esp+10h+arg_8]
fld	dword ptr [ebp+0]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_709406
fld	dword ptr [ecx+4]
fstp	dword ptr [ebp+0]

loc_709406:
fld	dword ptr [ecx]
mov	ebp, [esp+10h+arg_C]
fld	dword ptr [ebp+0]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_70941D
fld	dword ptr [ecx]
fstp	dword ptr [ebp+0]

loc_70941D:
fld	dword ptr [ecx+4]
fld	dword ptr [ebx]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_709430
fld	dword ptr [ecx+4]
fstp	dword ptr [ebx]

loc_709430:
inc	esi
cmp	esi, [edx+4]
jb	short loc_7093C0
pop	edi
pop	ebp
pop	ebx

loc_709439:
pop	esi
retn
sub_7093A0 endp

align 10h



; int __stdcall	sub_709440(float, float, char)
sub_709440 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 24h
xor	edx, edx
push	esi
mov	esi, [ecx+18h]
mov	[esp+28h+var_24], edx
mov	[esp+28h+var_20], edx
mov	[esp+28h+var_14], esi
cmp	esi, edx
jbe	loc_70960A
mov	eax, [ecx+24h]
fld	[esp+28h+arg_4]
fld	[esp+28h+arg_0]
push	ebx
fldz
push	ebp
mov	[esp+30h+var_1C], eax
push	edi

loc_709471:
mov	edi, [esp+34h+var_1C]
mov	ecx, edx
shr	ecx, 6
mov	ecx, [edi+ecx*4]
mov	eax, edx
and	eax, 3Fh
lea	eax, [eax+eax*2]
mov	ebx, [ecx+eax*8+0Ch]
lea	eax, [ecx+eax*8]
mov	ecx, [eax+10h]
mov	[esp+34h+arg_4], ecx
cmp	ebx, ecx
jz	loc_7095F4
mov	ecx, [eax+4]
cmp	ecx, 1
jbe	loc_7095F4
mov	esi, [eax+8]
mov	edx, [eax]
mov	ebp, [edx+14h]
inc	esi
dec	ecx
mov	[esp+34h+arg_0], ecx

loc_7094B5:
lea	eax, [esi-1]
shr	eax, 8
mov	edx, [ebp+eax*4+0]
lea	ecx, [esi-1]
and	ecx, 0FFh
mov	eax, [edx+ecx*8]
lea	ecx, [edx+ecx*8]
mov	edx, [ecx+4]
mov	[esp+34h+var_8], eax
mov	[esp+34h+var_4], edx
fld	[esp+34h+var_4]
mov	eax, esi
fld	st
shr	eax, 8
mov	eax, [ebp+eax*4+0]
mov	edx, esi
and	edx, 0FFh
lea	edx, [eax+edx*8]
mov	eax, [edx]
mov	[esp+34h+var_10], eax
mov	eax, [edx+4]
mov	[esp+34h+var_C], eax
fld	[esp+34h+var_C]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	loc_7095D8
fcom	st(1)
mov	edi, 1
fnstsw	ax
test	ah, 5
jp	short loc_70954C
mov	eax, [edx]
fstp	st
mov	edx, [edx+4]
fstp	st
mov	[esp+34h+var_8], eax
mov	eax, [ecx]
mov	ecx, [ecx+4]
mov	[esp+34h+var_4], edx
fld	[esp+34h+var_4]
mov	[esp+34h+var_C], ecx
fld	[esp+34h+var_C]
mov	[esp+34h+var_10], eax
or	edi, 0FFFFFFFFh

loc_70954C:
fxch	st(4)
fcom	st(1)
fnstsw	ax
test	ah, 1
jnz	loc_7095DC
fcom	st(4)
fnstsw	ax
test	ah, 5
jp	short loc_7095DC
fld	st(3)
fld	[esp+34h+var_10]
fld	st
fsubp	st(2), st
fld	st(6)
fsubrp	st(4), st
fxch	st(1)
fmulp	st(3), st
fsub	[esp+34h+var_8]
fld	st(1)
fsubrp	st(6), st
fmulp	st(5), st
fxch	st(1)
fsubrp	st(4), st
fxch	st(3)
fstp	[esp+34h+var_18]
fld	[esp+34h+var_18]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7095E0
cmp	[esp+34h+arg_8], 0
jz	short loc_7095C1
test	ebx, ebx
jl	short loc_7095AC
lea	edx, [ebx+1]
imul	edx, edi
add	[esp+34h+var_24], edx

loc_7095AC:
cmp	[esp+34h+arg_4], 0
jl	short loc_7095E0
mov	eax, [esp+34h+arg_4]
inc	eax
imul	eax, edi
sub	[esp+34h+var_24], eax
jmp	short loc_7095E0

loc_7095C1:
test	ebx, ebx
jl	short loc_7095CA
xor	[esp+34h+var_24], 1

loc_7095CA:
cmp	[esp+34h+arg_4], 0
jl	short loc_7095E0
xor	[esp+34h+var_24], 1
jmp	short loc_7095E0

loc_7095D8:
fstp	st
jmp	short loc_7095DE

loc_7095DC:
fstp	st(4)

loc_7095DE:
fstp	st

loc_7095E0:
inc	esi
sub	[esp+34h+arg_0], 1
jnz	loc_7094B5
mov	esi, [esp+34h+var_14]
mov	edx, [esp+34h+var_20]

loc_7095F4:
inc	edx
mov	[esp+34h+var_20], edx
cmp	edx, esi
jb	loc_709471
fstp	st(2)
pop	edi
fstp	st
pop	ebp
fstp	st
pop	ebx

loc_70960A:
xor	eax, eax
cmp	[esp+28h+var_24], eax
pop	esi
setnz	al
add	esp, 24h
retn	0Ch
sub_709440 endp

align 10h



sub_709620 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_709634
push	edi
call	sub_709280

loc_709634:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 3Fh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+8+arg_0]
lea	eax, [eax+edx*8]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_709620 endp

align 10h



sub_709680 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	ebp
mov	ebp, [esp+20h+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+24h+arg_8]
mov	eax, [esi+8]
push	edi
lea	edx, [esp+28h+var_18]
mov	[esp+28h+var_4], ecx
lea	edi, [esi+18h]
push	edx
mov	ecx, edi
mov	[esp+2Ch+var_18], esi
mov	[esp+2Ch+var_14], 0
mov	[esp+2Ch+var_10], eax
mov	[esp+2Ch+var_C], ebx
mov	[esp+2Ch+var_8], ebp
call	sub_709620
mov	eax, [edi]
mov	edx, [edi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*8]
mov	[esi+28h], edx
test	ebx, ebx
jl	short loc_7096F1
cmp	ebx, [esi+2Ch]
jge	short loc_7096E9
mov	[esi+2Ch], ebx

loc_7096E9:
cmp	ebx, [esi+30h]
jle	short loc_7096F1
mov	[esi+30h], ebx

loc_7096F1:
test	ebp, ebp
jl	short loc_709705
cmp	ebp, [esi+2Ch]
jge	short loc_7096FD
mov	[esi+2Ch], ebp

loc_7096FD:
cmp	ebp, [esi+30h]
jle	short loc_709705
mov	[esi+30h], ebp

loc_709705:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	0Ch
sub_709680 endp

align 10h



; int __stdcall	sub_709710(int,	int, int, float, float)
sub_709710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
mov	eax, [esp+8+arg_8]
mov	edx, [esp+8+arg_0]
push	ebx
push	esi
push	edi
mov	ebx, ecx
mov	ecx, [esp+14h+arg_4]
push	eax
push	ecx
push	edx
mov	ecx, ebx
call	sub_709680
fld	[esp+14h+arg_C]
mov	edi, [ebx+8]
fstp	[esp+14h+var_8]
fld	[esp+14h+arg_10]
lea	esi, [ebx+8]
shr	edi, 8
fstp	[esp+14h+var_4]
cmp	edi, [esi+4]
jb	short loc_709754
push	edi
mov	ecx, esi
call	sub_709200

loc_709754:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+14h+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+14h+var_4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebx+28h]
inc	dword ptr [eax+4]
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	14h
sub_709710 endp

align 10h



sub_709790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+28h]
test	ecx, ecx
jz	short loc_709806
cmp	dword ptr [ecx+4], 1
jbe	short loc_709806
mov	eax, [ecx+8]
mov	ecx, [ecx]
mov	ecx, [ecx+14h]
mov	edx, eax
shr	edx, 8
mov	edx, [ecx+edx*4]
and	eax, 0FFh
fld	dword ptr [edx+eax*8]
push	esi
lea	eax, [edx+eax*8]
fstp	[esp+10h+var_8]
fld	dword ptr [eax+4]
lea	esi, [ebx+8]
push	edi
fstp	[esp+14h+var_4]
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_7097E0
push	edi
mov	ecx, esi
call	sub_709200

loc_7097E0:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	edi, [ecx+edi*4]
mov	edx, [esp+14h+var_8]
mov	ecx, [esp+14h+var_4]
and	eax, 0FFh
mov	[edi+eax*8], edx
mov	[edi+eax*8+4], ecx
inc	dword ptr [esi]
mov	eax, [ebx+28h]
inc	dword ptr [eax+4]
pop	edi
pop	esi

loc_709806:
pop	ebx
add	esp, 8
retn
sub_709790 endp

align 10h



; int __stdcall	sub_709810(float, float, float,	float, float, float)
sub_709810 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 1Ch
fld	[esp+1Ch+arg_0]
push	ebx
fld	[esp+20h+arg_8]
push	esi
fld	st
push	edi
faddp	st(2), st
mov	edi, ecx
fld	ds:dbl_15FCC48
fmul	st(2), st
fxch	st(2)
fstp	[esp+28h+var_C]
fld	[esp+28h+arg_4]
fld	st
fld	[esp+28h+arg_C]
fld	st
faddp	st(2), st
fxch	st(1)
fmul	st, st(4)
fstp	[esp+28h+var_8]
fld	st(2)
fld	[esp+28h+arg_10]
fld	st
faddp	st(2), st
fxch	st(1)
fmul	st, st(5)
fstp	[esp+28h+var_1C]
fld	st(1)
fld	[esp+28h+arg_14]
fld	st
faddp	st(2), st
fxch	st(1)
fmul	st, st(6)
fstp	[esp+28h+var_18]
fld	st(1)
fsub	[esp+28h+arg_0]
fstp	[esp+28h+var_10]
fld	st
fsubrp	st(4), st
fxch	st(3)
fstp	[esp+28h+var_14]
fld	st
fsubp	st(4), st
fld	[esp+28h+var_14]
fld	st
fmulp	st(5), st
fld	st(3)
fsubp	st(3), st
fld	[esp+28h+var_10]
fld	st
fmulp	st(4), st
fxch	st(5)
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fabs
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fcom	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 41h
jz	short loc_7098E4
fstp	st
fstp	st(4)
fstp	st
fstp	st(1)
jmp	loc_709A2C

loc_7098D2:
fxch	st(3)
fxch	st(5)
fxch	st(2)
fxch	st(4)
fxch	st(2)
fxch	st(3)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_7098E4:
fmul	st, st
fld	st(4)
fmulp	st(5), st
fld	st(2)
fmulp	st(3), st
fxch	st(4)
faddp	st(2), st
fld	dword ptr [edi+4]
fmulp	st(2), st
fxch	st(3)
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_709A79
fstp	st(1)
sub	esp, 18h
fstp	st
mov	ecx, edi
fld	[esp+40h+var_1C]
fld	[esp+40h+var_C]
fld	st
faddp	st(2), st
fxch	st(1)
fmul	st, st(2)
fstp	[esp+40h+var_14]
fld	[esp+40h+var_18]
fld	[esp+40h+var_8]
fld	st
faddp	st(2), st
fxch	st(1)
fmulp	st(3), st
fxch	st(2)
fstp	[esp+40h+var_10]
fld	[esp+40h+var_10]
fstp	[esp+40h+var_2C]
fld	[esp+40h+var_14]
fstp	[esp+40h+var_30]
fxch	st(1)
fstp	[esp+40h+var_34]
fstp	[esp+40h+var_38]
fld	[esp+40h+arg_4]
fstp	[esp+40h+var_3C]
fld	[esp+40h+arg_0]
fstp	[esp+40h+var_40]
call	sub_709810
fld	[esp+28h+var_18]
fst	[esp+28h+arg_C]
fld	[esp+28h+var_1C]
fst	[esp+28h+arg_8]
fld	[esp+28h+var_10]
fst	[esp+28h+arg_4]
fld	[esp+28h+var_14]
fst	[esp+28h+arg_0]
fld	st
fadd	st, st(3)
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+28h+var_C]
fld	st(2)
fadd	st, st(5)
fmul	st, st(1)
fstp	[esp+28h+var_8]
fld	[esp+28h+arg_10]
fld	st
faddp	st(5), st
fxch	st(4)
fmul	st, st(1)
fstp	[esp+28h+var_1C]
fld	[esp+28h+arg_14]
fld	st
faddp	st(6), st
fxch	st(5)
fmul	st, st(1)
fstp	[esp+28h+var_18]
fld	st(3)
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+28h+var_10]
fld	st(3)
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+28h+var_14]
fld	[esp+28h+arg_8]
fsub	st, st(2)
fld	[esp+28h+var_14]
fld	st
fmulp	st(2), st
fld	[esp+28h+arg_C]
fsub	st, st(5)
fld	[esp+28h+var_10]
fld	st
fmulp	st(2), st
fxch	st(3)
fsubrp	st(1), st
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fabs
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fcom	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 41h
jz	loc_7098D2
fstp	st
fstp	st(2)
fstp	st(1)
fstp	st
fxch	st(1)

loc_709A2C:
fxch	st(1)

loc_709A2E:
mov	ebx, [edi+8]
fstp	[esp+28h+var_8]
lea	esi, [edi+8]
shr	ebx, 8
fstp	[esp+28h+var_4]
cmp	ebx, [esi+4]
jb	short loc_709A4C
push	ebx
mov	ecx, esi
call	sub_709200

loc_709A4C:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+ebx*4]
mov	edx, [esp+28h+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+28h+var_4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	edi, [edi+28h]
inc	dword ptr [edi+4]
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	18h

loc_709A79:
fstp	st(2)
jmp	short loc_709A2E
sub_709810 endp

align 10h



; int __stdcall	sub_709A80(float, float, float,	float)
sub_709A80 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
fld	[esp+8+arg_8]
push	esi
fld	st
push	edi
fld	[esp+10h+arg_0]
mov	edi, ecx
mov	eax, [edi+8]
fld	st
mov	edx, [edi+14h]
fsubp	st(2), st
fld	[esp+10h+arg_4]
lea	esi, [edi+8]
fld	st
dec	eax
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fsub	dword ptr [ecx+eax*8+4]
lea	ecx, [ecx+eax*8]
fmulp	st(3), st
fld	st(1)
fsub	dword ptr [ecx]
fld	[esp+10h+arg_C]
fld	st
fsub	st, st(3)
fmulp	st(2), st
fxch	st(4)
fsubrp	st(1), st
fstp	[esp+10h+arg_8]
fldz
fld	[esp+10h+arg_8]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_709AE4
fchs

loc_709AE4:
fstp	[esp+10h+arg_8]
fld	[esp+10h+arg_8]
fcomp	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 5
jp	short loc_709B47
fstp	st(1)
push	ebx
mov	ebx, [esi]
fstp	st
fxch	st(1)
shr	ebx, 8
fstp	[esp+14h+var_8]
fstp	[esp+14h+var_4]
cmp	ebx, [esi+4]
jb	short loc_709B1A
push	ebx
mov	ecx, esi
call	sub_709200

loc_709B1A:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+14h+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+14h+var_4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [edi+28h]
inc	dword ptr [eax+4]
pop	ebx
pop	edi
pop	esi
add	esp, 8
retn	10h

loc_709B47:
sub	esp, 18h
fxch	st(2)
fstp	[esp+28h+var_14]
fxch	st(2)
fstp	[esp+28h+var_18]
fstp	[esp+28h+var_1C]
fstp	[esp+28h+var_20]
fld	dword ptr [ecx+4]
fstp	[esp+28h+var_24]
fld	dword ptr [ecx]
mov	ecx, edi
fstp	[esp+28h+var_28]
call	sub_709810
pop	edi
pop	esi
add	esp, 8
retn	10h
sub_709A80 endp

align 10h



sub_709B80 proc	near
mov	al, [ecx]
cmp	al, 41h
jz	short loc_709B8D
cmp	al, 43h
jz	short loc_709B8D
xor	eax, eax
retn

loc_709B8D:
mov	eax, 1
retn
sub_709B80 endp

align 10h



; int __stdcall	sub_709BA0(int,	float, char)
sub_709BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
fld	[esp+arg_4]
mov	dword ptr [eax], 0
mov	dl, [esp+arg_8]
mov	[eax], dl
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+8]
add	eax, 4
fstp	dword ptr [eax+4]
add	eax, 4
fld	dword ptr [ecx+0Ch]
add	eax, 4
fstp	dword ptr [eax]
add	eax, 4
fld	dword ptr [ecx+10h]
add	eax, 4
fstp	dword ptr [eax-4]
add	eax, 4
fld	dword ptr [ecx+14h]
add	eax, 4
fstp	dword ptr [eax-8]
add	eax, 4
fld	dword ptr [ecx+18h]
add	eax, 4
fstp	dword ptr [eax-0Ch]
add	eax, 4
fld	dword ptr [ecx+1Ch]
add	eax, 4
fstp	dword ptr [eax-10h]
add	eax, 4
fld	dword ptr [ecx+24h]
add	eax, 4
fstp	dword ptr [eax-14h]
add	eax, 4
fld	dword ptr [ecx+28h]
add	eax, 4
fstp	dword ptr [eax-18h]
add	eax, 4
fld	dword ptr [ecx+30h]
add	eax, 4
fstp	dword ptr [eax-1Ch]
add	eax, 4
fld	dword ptr [ecx+34h]
add	eax, 4
fstp	dword ptr [eax-20h]
fld	dword ptr [ecx+38h]
fstp	dword ptr [eax-1Ch]
fld	dword ptr [ecx+3Ch]
fstp	dword ptr [eax-18h]
fld	dword ptr [ecx+40h]
fstp	dword ptr [eax-14h]
fld	dword ptr [ecx+44h]
fstp	dword ptr [eax-10h]
fld	dword ptr [ecx+48h]
fstp	dword ptr [eax-0Ch]
fld	dword ptr [ecx+4Ch]
fstp	dword ptr [eax-8]
fld	dword ptr [ecx+50h]
fstp	dword ptr [eax-4]
fld	dword ptr [ecx+54h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+58h]
fstp	dword ptr [eax+4]
retn	0Ch
sub_709BA0 endp

align 10h



; int __cdecl sub_709C70(float,	float, float, float, float, float, float, int, int)
sub_709C70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

fld	[esp+arg_8]
mov	eax, [esp+arg_1C]
fld	st
mov	ecx, [esp+arg_20]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+arg_18]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+arg_0]
fld	[esp+arg_C]
fld	st
fld	[esp+arg_4]
fld	st
fsubp	st(2), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+arg_18]
fld	[esp+arg_10]
fsub	st, st(3)
fmul	st, st(2)
faddp	st(3), st
fxch	st(2)
fstp	[esp+arg_8]
fld	[esp+arg_8]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [eax]
fld	[esp+arg_14]
fsub	st, st(2)
fmul	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+arg_8]
fld	[esp+arg_8]
fld	[esp+arg_18]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [ecx]
retn
sub_709C70 endp

align 10h



; int __stdcall	sub_709D00(float)
sub_709D00 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fmul	ds:dbl_15FCC48
fstp	[esp+arg_0]
fld	[esp+arg_0]
fst	dword ptr [ecx]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_709D21
fchs

loc_709D21:
fstp	[esp+arg_0]
fld	[esp+arg_0]
fstp	dword ptr [ecx+4]
retn	4
sub_709D00 endp

align 10h



sub_709D30 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_709D40
push	esi
call	sub_705BC0

loc_709D40:
mov	ecx, [esi+20h]
mov	dword ptr [esi+18h], 0
test	ecx, ecx
jz	short loc_709D56
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_709D56:
mov	dword ptr [esi+20h], 0
pop	esi
retn
sub_709D30 endp

align 10h



sub_709D60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	dword ptr [eax], 0
xor	eax, eax
retn	4
sub_709D60 endp

align 10h



sub_709D70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_8]
mov	dword ptr [eax], 0
mov	eax, [esp+arg_C]
mov	dword ptr [ecx], 0
mov	dword ptr [edx], 0
mov	dword ptr [eax], 0
retn	10h
sub_709D70 endp

align 10h



sub_709DA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	ecx, ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
retn	4
sub_709DA0 endp

align 10h



; int __cdecl sub_709DC0(float,	float, float, float)
sub_709DC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	[esp+arg_4]
fld	st
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+arg_C]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+arg_0]
fld	[esp+arg_8]
fsub	st, st(2)
fmul	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+arg_4]
fld	[esp+arg_4]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn
sub_709DC0 endp

align 10h



; int __cdecl sub_709E10(float,	float, float, float, float, float, float, float)
sub_709E10 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

fld	[esp+arg_1C]
sub	esp, 18h
fld	[esp+18h+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_709F27
fld	[esp+18h+arg_14]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	loc_709F25
fld	[esp+18h+arg_C]
fld	st
fsub	st, st(3)
fld	[esp+18h+arg_18]
fld	[esp+18h+arg_8]
fld	st
fsubp	st(2), st
fxch	st(2)
fmulp	st(1), st
fld	[esp+18h+arg_0]
fsubp	st(2), st
fld	st(5)
fsub	st, st(3)
fmulp	st(2), st
fsubrp	st(1), st
fstp	[esp+18h+arg_1C]
fld	[esp+18h+arg_1C]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_709E7B
mov	edx, 1
jmp	short loc_709E7D

loc_709E7B:
xor	edx, edx

loc_709E7D:
fld	[esp+18h+arg_18]
fld	[esp+18h+arg_10]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+18h+var_18]
fld	st(5)
fsub	st, st(4)
fstp	[esp+18h+var_10]
fld	st(3)
fsub	st, st(3)
fmul	[esp+18h+var_18]
fld	[esp+18h+arg_8]
fsubp	st(2), st
fxch	st(1)
fmul	[esp+18h+var_10]
fsubp	st(1), st
fstp	[esp+18h+arg_1C]
fld	[esp+18h+arg_1C]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_709EC3
mov	ecx, 1
jmp	short loc_709EC5

loc_709EC3:
xor	ecx, ecx

loc_709EC5:
fld	st(2)
fsub	st, st(4)
fst	[esp+18h+var_8]
fmul	[esp+18h+var_18]
fld	[esp+18h+arg_10]
fsub	[esp+18h+arg_0]
fmul	[esp+18h+var_10]
fsubp	st(1), st
fstp	[esp+18h+arg_1C]
fld	[esp+18h+arg_1C]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_709EF6
mov	eax, 1
jmp	short loc_709EF8

loc_709EF6:
xor	eax, eax

loc_709EF8:
push	esi
mov	esi, eax
and	esi, ecx
test	edx, esi
pop	esi
jz	short loc_709F12
fstp	st(2)
mov	al, 1
fstp	st
fstp	st
fstp	st(1)
fstp	st
add	esp, 18h
retn

loc_709F12:
xor	eax, 1
xor	ecx, 1
and	eax, ecx
xor	edx, 1
test	edx, eax
jz	short loc_709F31
fstp	st(2)
fstp	st

loc_709F25:
fstp	st

loc_709F27:
fstp	st(1)
xor	al, al
fstp	st
add	esp, 18h
retn

loc_709F31:
fld	st(3)
fld	st(2)
fadd	st, st
fsubp	st(1), st
fadd	st, st(3)
fstp	dword ptr [esp+18h+var_18]
fld	ds:flt_1431A30
fstp	[esp+18h+arg_1C]
fcom	dword ptr [esp+18h+var_18]
fnstsw	ax
test	ah, 44h
jp	short loc_709F77
fstp	st(2)
fstp	st
fld	[esp+18h+var_8]
fstp	dword ptr [esp+18h+var_18]
fld	dword ptr [esp+18h+var_18]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_709FE9
fxch	st(2)
fsubrp	st(1), st
fdivrp	st(1), st
fstp	[esp+18h+arg_1C]
jmp	short loc_709FEF

loc_709F77:
fld	st(1)
fmul	st, st
fld	st(3)
fsub	st, st(6)
fmul	st, st(5)
fsubp	st(1), st
fld	st(5)
fadd	st, st
fmul	st, st(3)
fsubp	st(1), st
fxch	st(3)
fmulp	st(5), st
fxch	st(2)
faddp	st(4), st
fxch	st(3)
fstp	[esp+18h+arg_1C]
fld	[esp+18h+arg_1C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_709FD4
fstp	st(3)
fstp	st
fstp	st
call	__CIsqrt
fstp	[esp+18h+arg_1C]
fld	[esp+18h+arg_1C]
fstp	[esp+18h+arg_1C]
fld	[esp+18h+arg_C]
fld	[esp+18h+arg_4]
fadd	[esp+18h+arg_1C]
fsubrp	st(1), st
fdiv	dword ptr [esp+18h+var_18]
fstp	[esp+18h+arg_1C]
jmp	short loc_709FEF

loc_709FD4:
fstp	st
fstp	[esp+18h+arg_1C]
fadd	[esp+18h+arg_1C]
fsubrp	st(1), st
fdiv	dword ptr [esp+18h+var_18]
fstp	[esp+18h+arg_1C]
jmp	short loc_709FEF

loc_709FE9:
fstp	st
fstp	st(1)
fstp	st

loc_709FEF:
fld	[esp+18h+arg_1C]
sub	esp, 10h
fstp	[esp+28h+var_1C]
fld	[esp+28h+arg_10]
fstp	[esp+28h+var_20]
fld	[esp+28h+arg_8]
fstp	[esp+28h+var_24]
fld	[esp+28h+arg_0]
fstp	[esp+28h+var_28]
call	sub_709DC0
fld	[esp+28h+arg_18]
add	esp, 10h
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_70A02F
mov	eax, 1
add	esp, 18h
retn

loc_70A02F:
xor	eax, eax
add	esp, 18h
retn
sub_709E10 endp

align 10h



sub_70A040 proc	near

arg_0= word ptr	 4

mov	dx, [esp+arg_0]
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	[eax+8], cx
mov	[eax+0Ah], dx
retn	4
sub_70A040 endp

align 10h



sub_70A070 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_70A097
push	esi
lea	ebx, [ebx+0]

loc_70A080:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_70A080
pop	esi

loc_70A097:
xor	ecx, ecx
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	[edi+8], cx
pop	edi
retn
sub_70A070 endp

align 10h



sub_70A0B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 0
push	edi
movzx	edi, word ptr [esi+8]
mov	ebx, eax
jz	short loc_70A0D1
mov	ecx, [esp+0Ch+arg_0]
cmp	edi, ecx
jb	short loc_70A0D1
mov	ebx, ecx
jmp	short loc_70A115

loc_70A0D1:
movzx	edi, word ptr [esi+0Ah]
cmp	eax, edi
jbe	short loc_70A0DB
mov	edi, eax

loc_70A0DB:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0
lea	edx, [edi+8]
push	edx
push	esi
call	eax
mov	dword ptr [eax], 0
mov	[eax+4], edi
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_70A10B
mov	[ecx], eax
movzx	edx, word ptr [esi+8]
mov	ecx, [esi+4]
sub	[ecx+4], edx

loc_70A10B:
cmp	dword ptr [esi], 0
mov	[esi+4], eax
jnz	short loc_70A115
mov	[esi], eax

loc_70A115:
mov	eax, [esi+4]
mov	ecx, [eax+4]
sub	ecx, edi
sub	edi, ebx
mov	[esi+8], di
pop	edi
pop	esi
lea	eax, [ecx+eax+8]
pop	ebx
retn	8
sub_70A0B0 endp

align 10h



sub_70A130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
cmp	edi, esi
jnb	short loc_70A182
mov	edx, [ecx+4]
test	edx, edx
jz	short loc_70A182
mov	eax, [esp+8+arg_0]
push	ebx
mov	ebx, eax
sub	ebx, edx
sub	ebx, 8
cmp	ebx, [edx+4]
pop	ebx
jge	short loc_70A182
sub	eax, edx
mov	edx, [edx+4]
sub	eax, 8
sub	edx, eax
mov	eax, edx
sub	eax, esi
movzx	esi, word ptr [ecx+8]
cmp	eax, esi
jnz	short loc_70A182
sub	edx, edi
xor	al, al
cmp	edx, 10000h
jnb	short loc_70A184
pop	edi
mov	[ecx+8], dx
pop	esi
retn	0Ch

loc_70A182:
xor	al, al

loc_70A184:
pop	edi
pop	esi
retn	0Ch
sub_70A130 endp

align 10h



sub_70A190 proc	near
xor	eax, eax
mov	[ecx+8], eax
mov	[ecx+4], eax
mov	[ecx], eax
mov	[ecx+18h], eax
mov	[ecx+14h], eax
mov	[ecx+10h], eax
mov	[ecx+0Ch], eax
mov	[ecx+28h], eax
mov	[ecx+2Ch], eax
mov	[ecx+30h], eax
mov	[ecx+34h], al
mov	[ecx+35h], al
retn
sub_70A190 endp

align 10h



sub_70A1C0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	dl, [ecx+20h]
mov	[eax+20h], dl
mov	edx, [ecx+24h]
mov	[eax+24h], edx
mov	edx, [ecx+28h]
mov	[eax+28h], edx
mov	edx, [ecx+2Ch]
mov	[eax+2Ch], edx
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	edx, [ecx+34h]
mov	[eax+34h], edx
mov	edx, [ecx+38h]
mov	[eax+38h], edx
mov	edx, [ecx+3Ch]
mov	[eax+3Ch], edx
mov	edx, [ecx+40h]
mov	[eax+40h], edx
mov	edx, [ecx+44h]
mov	[eax+44h], edx
mov	edx, [ecx+48h]
mov	[eax+48h], edx
mov	edx, [ecx+4Ch]
mov	[eax+4Ch], edx
mov	edx, [ecx+50h]
mov	[eax+50h], edx
mov	edx, [ecx+54h]
mov	[eax+54h], edx
mov	edx, [ecx+58h]
mov	[eax+58h], edx
mov	edx, [ecx+5Ch]
mov	[eax+5Ch], edx
mov	edx, [ecx+60h]
mov	[eax+60h], edx
mov	edx, [ecx+64h]
mov	[eax+64h], edx
mov	edx, [ecx+68h]
mov	[eax+68h], edx
fld	dword ptr [ecx+6Ch]
fstp	dword ptr [eax+6Ch]
mov	cl, [ecx+70h]
mov	[eax+70h], cl
retn	4
sub_70A1C0 endp

align 10h



sub_70A280 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
mov	ebp, ecx
mov	ebx, [ebp+0Ch]
push	esi
lea	esi, [ebp+4]
push	edi
mov	edi, [esi+0Ch]
mov	ecx, 7
sub	ecx, edi
mov	eax, 1
shl	eax, cl
mov	ecx, [esi]
movzx	edx, byte ptr [ebx+ecx]
and	eax, edx
lea	ecx, [edi+1]
xor	edx, edx
mov	[esi+0Ch], ecx
cmp	ecx, 8
jb	short loc_70A2BA
inc	ebx
mov	[esi+0Ch], edx
mov	[esi+8], ebx

loc_70A2BA:
cmp	eax, edx
jnz	loc_70A965
mov	eax, [esi+0Ch]
cmp	eax, 7		; switch 8 cases
ja	loc_70A416	; default
jmp	ds:off_70AD20[eax*4] ; switch jump

loc_70A2D5:		; jumptable 0070A2CE case 0
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [eax+ecx]
shr	ebx, 3
mov	dword ptr [esi+0Ch], 5
mov	edi, 1
jmp	loc_70A3E4

loc_70A2F2:		; jumptable 0070A2CE case 1
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [eax+ecx]
shr	ebx, 2
and	ebx, 1Fh
mov	dword ptr [esi+0Ch], 6
mov	edi, 1
jmp	loc_70A3E4

loc_70A312:		; jumptable 0070A2CE case 2
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [eax+ecx]
shr	ebx, 1
and	ebx, 1Fh
mov	dword ptr [esi+0Ch], 7
mov	edi, 1
jmp	loc_70A3E4

loc_70A331:		; jumptable 0070A2CE case 3
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [eax+ecx]
and	ebx, 1Fh
mov	[esi+0Ch], edx
mov	edi, 1
jmp	loc_70A3E0

loc_70A34A:		; jumptable 0070A2CE case 4
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	ecx, byte ptr [ecx]
and	ecx, 0Fh
mov	edi, 1
shr	ebx, 7
add	ecx, ecx
mov	[esi+0Ch], edi
jmp	short loc_70A3DE

loc_70A36B:		; jumptable 0070A2CE case 5
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	ecx, byte ptr [ecx]
and	ecx, 7
add	ecx, ecx
shr	ebx, 6
add	ecx, ecx
mov	dword ptr [esi+0Ch], 2
mov	edi, 1
jmp	short loc_70A3DE

loc_70A392:		; jumptable 0070A2CE case 6
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	ecx, byte ptr [ecx]
and	ecx, 3
add	ecx, ecx
add	ecx, ecx
shr	ebx, 5
add	ecx, ecx
mov	dword ptr [esi+0Ch], 3
mov	edi, 1
jmp	short loc_70A3DE

loc_70A3BB:		; jumptable 0070A2CE case 7
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	ebx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	ecx, byte ptr [ecx]
mov	edi, 1
and	ecx, edi
shr	ebx, 4
shl	ecx, 4
mov	dword ptr [esi+0Ch], 4

loc_70A3DE:
or	ebx, ecx

loc_70A3E0:
inc	eax
mov	[esi+8], eax

loc_70A3E4:
cmp	ebx, edx
jz	short loc_70A41B
test	bl, 1
jz	loc_70A586
mov	byte ptr [ebp+20h], 3
cmp	[ebp+4Ch], edx
jbe	short loc_70A403
add	[ebp+24h], edi
add	[ebp+50h], edi
mov	[ebp+4Ch], edx

loc_70A403:
mov	eax, [esi+0Ch]
cmp	eax, 7		; switch 8 cases
ja	loc_70A53F	; default
jmp	ds:off_70AD40[eax*4] ; switch jump

loc_70A416:		; default
mov	edi, 1

loc_70A41B:
mov	byte ptr [ebp+20h], 1
cmp	[ebp+4Ch], edx
jbe	loc_70AD18
add	[ebp+24h], edi
add	[ebp+50h], edi
pop	edi
pop	esi
mov	[ebp+4Ch], edx
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A437:		; jumptable 0070A40F case 0
mov	edx, [esi+8]
mov	eax, [esi]
movzx	edi, byte ptr [edx+eax]
shr	edi, 3
mov	dword ptr [esi+0Ch], 5
jmp	loc_70A541

loc_70A44F:		; jumptable 0070A40F case 1
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	edi, byte ptr [ecx+edx]
shr	edi, 2
and	edi, 1Fh
mov	dword ptr [esi+0Ch], 6
jmp	loc_70A541

loc_70A46A:		; jumptable 0070A40F case 2
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	edi, byte ptr [eax+ecx]
shr	edi, 1
and	edi, 1Fh
mov	dword ptr [esi+0Ch], 7
jmp	loc_70A541

loc_70A484:		; jumptable 0070A40F case 3
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	edi, byte ptr [ecx+eax]
and	edi, 1Fh
inc	eax
mov	[esi+0Ch], edx
mov	[esi+8], eax
jmp	loc_70A541

loc_70A49C:		; jumptable 0070A40F case 4
mov	eax, [esi+8]
mov	edx, [esi]
movzx	edi, byte ptr [edx+eax]
lea	ecx, [edx+eax]
movzx	ecx, byte ptr [ecx+1]
and	edi, 0Fh
add	edi, edi
shr	ecx, 7
or	edi, ecx
inc	eax
mov	dword ptr [esi+0Ch], 1
mov	[esi+8], eax
jmp	short loc_70A541

loc_70A4C3:		; jumptable 0070A40F case 5
mov	eax, [esi+8]
mov	edx, [esi]
movzx	edi, byte ptr [edx+eax]
lea	ecx, [edx+eax]
movzx	ecx, byte ptr [ecx+1]
and	edi, 7
add	edi, edi
add	edi, edi
shr	ecx, 6
or	edi, ecx
inc	eax
mov	dword ptr [esi+0Ch], 2
mov	[esi+8], eax
jmp	short loc_70A541

loc_70A4EC:		; jumptable 0070A40F case 6
mov	eax, [esi+8]
mov	edx, [esi]
movzx	edi, byte ptr [edx+eax]
lea	ecx, [edx+eax]
movzx	ecx, byte ptr [ecx+1]
and	edi, 3
add	edi, edi
add	edi, edi
add	edi, edi
shr	ecx, 5
or	edi, ecx
inc	eax
mov	dword ptr [esi+0Ch], 3
mov	[esi+8], eax
jmp	short loc_70A541

loc_70A517:		; jumptable 0070A40F case 7
mov	eax, [esi+8]
mov	edx, [esi]
movzx	edi, byte ptr [edx+eax]
lea	ecx, [edx+eax]
movzx	ecx, byte ptr [ecx+1]
and	edi, 1
shl	edi, 4
shr	ecx, 4
or	edi, ecx
inc	eax
mov	dword ptr [esi+0Ch], 4
mov	[esi+8], eax
jmp	short loc_70A541

loc_70A53F:		; default
xor	edi, edi

loc_70A541:
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	edx, 1
shl	edx, cl
mov	[esp+14h+var_4], edx
test	eax, edx
jz	short loc_70A564
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70A564:
push	edi
mov	ecx, esi
mov	[ebp+2Ch], eax
call	sub_6A98B0
test	[esp+14h+var_4], eax
jz	short loc_70A57E
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70A57E:
xor	edx, edx
mov	[ebp+30h], eax
lea	edi, [edx+1]

loc_70A586:
test	bl, 2
jz	short loc_70A5BB
mov	eax, [ebp+44h]
cmp	eax, edx
jbe	short loc_70A5BB
mov	byte ptr [ebp+20h], 3
cmp	[ebp+4Ch], edx
jbe	short loc_70A5A4
add	[ebp+24h], edi
add	[ebp+50h], edi
mov	[ebp+4Ch], edx

loc_70A5A4:
push	eax
mov	ecx, esi
call	sub_6A98B0
test	eax, eax
jbe	short loc_70A5B3
add	eax, [ebp+34h]

loc_70A5B3:
xor	edx, edx
mov	[ebp+14h], eax
lea	edi, [edx+1]

loc_70A5BB:
test	bl, 4
jz	short loc_70A5F0
mov	eax, [ebp+44h]
cmp	eax, edx
jbe	short loc_70A5F0
mov	byte ptr [ebp+20h], 3
cmp	[ebp+4Ch], edx
jbe	short loc_70A5D9
add	[ebp+24h], edi
add	[ebp+50h], edi
mov	[ebp+4Ch], edx

loc_70A5D9:
push	eax
mov	ecx, esi
call	sub_6A98B0
test	eax, eax
jle	short loc_70A5E8
add	eax, [ebp+34h]

loc_70A5E8:
xor	edx, edx
mov	[ebp+18h], eax
lea	edi, [edx+1]

loc_70A5F0:
test	bl, 8
jz	short loc_70A625
mov	eax, [ebp+48h]
cmp	eax, edx
jbe	short loc_70A625
mov	byte ptr [ebp+20h], 3
cmp	[ebp+4Ch], edx
jbe	short loc_70A60E
add	[ebp+24h], edi
add	[ebp+50h], edi
mov	[ebp+4Ch], edx

loc_70A60E:
push	eax
mov	ecx, esi
call	sub_6A98B0
test	eax, eax
jle	short loc_70A61D
add	eax, [ebp+38h]

loc_70A61D:
xor	edx, edx
mov	[ebp+1Ch], eax
lea	edi, [edx+1]

loc_70A625:
test	bl, 10h
jz	loc_70AD18
mov	byte ptr [ebp+20h], 2
cmp	[ebp+50h], edx
jbe	short loc_70A63D
add	[ebp+28h], edi
mov	[ebp+50h], edx

loc_70A63D:
cmp	[ebp+4Ch], edx
jbe	short loc_70A64B
add	[ebp+24h], edi
add	[ebp+50h], edi
mov	[ebp+4Ch], edx

loc_70A64B:
mov	[ebp+1Ch], edx
mov	[ebp+18h], edx
mov	[ebp+14h], edx
cmp	[esi+0Ch], edx
jz	short loc_70A65C
add	[esi+8], edi

loc_70A65C:
mov	[esi+0Ch], edx
cmp	edx, edx
jz	short loc_70A666
add	[esi+8], edi

loc_70A666:
mov	eax, [esi+8]
mov	ecx, [esi]
mov	[esi+0Ch], edx
mov	cl, [eax+ecx]
movzx	ebx, cl
inc	eax
mov	[esi+8], eax
cmp	ebx, 0FFh
jnz	short loc_70A6B3
test	byte ptr [ebp+70h], 4
jz	short loc_70A6B3
cmp	edx, edx
jz	short loc_70A68D
add	[esi+8], edi

loc_70A68D:
mov	eax, [esi+8]
mov	ecx, [esi]
add	ecx, eax
mov	[esi+0Ch], edx
movzx	bx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	bx, 8
or	bx, cx
movzx	ecx, bx
add	eax, 2
mov	[esi+8], eax
movzx	ebx, cx

loc_70A6B3:
cmp	[esi+0Ch], edx
jz	short loc_70A6BB
add	[esi+8], edi

loc_70A6BB:
mov	eax, [esi+8]
mov	ecx, [esi]
mov	[esi+0Ch], edx
mov	cl, [eax+ecx]
inc	eax
mov	[esi+8], eax
movzx	eax, cl
cmp	eax, 0FFh
jnz	short loc_70A701
cmp	edx, edx
jz	short loc_70A6DB
add	[esi+8], edi

loc_70A6DB:
mov	eax, [esi+8]
mov	ecx, [esi]
add	ecx, eax
mov	[esi+0Ch], edx
movzx	di, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	di, 8
or	di, cx
movzx	ecx, di
add	eax, 2
mov	[esi+8], eax
movzx	eax, cx

loc_70A701:
mov	ecx, [ebp+3Ch]
mov	edi, [ebp+40h]
mov	[ebp+34h], ecx
mov	[ebp+38h], edi
add	edi, eax
add	ecx, ebx
mov	[ebp+3Ch], ecx
mov	[ebp+40h], edi
mov	eax, [esi+0Ch]
cmp	eax, 7		; switch 8 cases
ja	loc_70A81F	; default
jmp	ds:off_70AD60[eax*4] ; switch jump

loc_70A72A:		; jumptable 0070A723 case 0
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
shr	eax, 4
mov	dword ptr [esi+0Ch], 4
jmp	loc_70A821

loc_70A742:		; jumptable 0070A723 case 1
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
shr	eax, 3
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 5
jmp	loc_70A821

loc_70A75D:		; jumptable 0070A723 case 2
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
shr	eax, 2
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 6
jmp	loc_70A821

loc_70A778:		; jumptable 0070A723 case 3
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
shr	eax, 1
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 7
jmp	loc_70A821

loc_70A792:		; jumptable 0070A723 case 4
mov	ecx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [eax+ecx]
and	eax, 0Fh
inc	ecx
mov	[esi+0Ch], edx
mov	[esi+8], ecx
jmp	short loc_70A821

loc_70A7A7:		; jumptable 0070A723 case 5
mov	ecx, [esi+8]
mov	eax, [esi]
lea	edi, [eax+ecx]
movzx	eax, byte ptr [edi]
movzx	edi, byte ptr [edi+1]
and	eax, 7
add	eax, eax
shr	edi, 7
or	eax, edi
inc	ecx
mov	dword ptr [esi+0Ch], 1
mov	[esi+8], ecx
jmp	short loc_70A821

loc_70A7CD:		; jumptable 0070A723 case 6
mov	ecx, [esi+8]
mov	eax, [esi]
lea	edi, [eax+ecx]
movzx	eax, byte ptr [edi]
movzx	edi, byte ptr [edi+1]
and	eax, 3
add	eax, eax
add	eax, eax
shr	edi, 6
or	eax, edi
inc	ecx
mov	dword ptr [esi+0Ch], 2
mov	[esi+8], ecx
jmp	short loc_70A821

loc_70A7F5:		; jumptable 0070A723 case 7
mov	ecx, [esi+8]
mov	eax, [esi]
lea	edi, [eax+ecx]
movzx	eax, byte ptr [edi]
movzx	edi, byte ptr [edi+1]
and	eax, 1
add	eax, eax
add	eax, eax
add	eax, eax
shr	edi, 5
or	eax, edi
inc	ecx
mov	dword ptr [esi+0Ch], 3
mov	[esi+8], ecx
jmp	short loc_70A821

loc_70A81F:		; default
xor	eax, eax

loc_70A821:
mov	[ebp+44h], eax
mov	eax, [esi+0Ch]
cmp	eax, 7		; switch 8 cases
ja	loc_70A95A	; default
jmp	ds:off_70AD80[eax*4] ; switch jump

loc_70A837:		; jumptable 0070A830 case 0
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	eax, byte ptr [ecx+edx]
pop	edi
mov	dword ptr [esi+0Ch], 4
shr	eax, 4
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A853:		; jumptable 0070A830 case 1
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
pop	edi
shr	eax, 3
mov	dword ptr [esi+0Ch], 5
and	eax, 0Fh
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A872:		; jumptable 0070A830 case 2
mov	edx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [edx+eax]
pop	edi
shr	eax, 2
mov	dword ptr [esi+0Ch], 6
and	eax, 0Fh
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A891:		; jumptable 0070A830 case 3
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	eax, byte ptr [ecx+edx]
pop	edi
shr	eax, 1
mov	dword ptr [esi+0Ch], 7
and	eax, 0Fh
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A8AF:		; jumptable 0070A830 case 4
mov	ecx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [ecx+eax]
and	eax, 0Fh
pop	edi
inc	ecx
mov	[esi+0Ch], edx
mov	[esi+8], ecx
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A8CB:		; jumptable 0070A830 case 5
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	eax, byte ptr [ecx+edx]
lea	edi, [ecx+edx]
movzx	edx, byte ptr [edi+1]
and	eax, 7
add	eax, eax
shr	edx, 7
or	eax, edx
pop	edi
inc	ecx
mov	dword ptr [esi+0Ch], 1
mov	[esi+8], ecx
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A8F9:		; jumptable 0070A830 case 6
mov	ecx, [esi+8]
mov	eax, [esi]
lea	edx, [ecx+eax]
movzx	eax, byte ptr [edx]
movzx	edx, byte ptr [edx+1]
and	eax, 3
add	eax, eax
add	eax, eax
shr	edx, 6
or	eax, edx
pop	edi
inc	ecx
mov	dword ptr [esi+0Ch], 2
mov	[esi+8], ecx
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A928:		; jumptable 0070A830 case 7
mov	ecx, [esi+8]
mov	eax, [esi]
movzx	edx, byte ptr [ecx+eax+1]
lea	edi, [ecx+eax]
movzx	eax, byte ptr [edi]
and	eax, 1
add	eax, eax
add	eax, eax
add	eax, eax
shr	edx, 5
or	eax, edx
pop	edi
inc	ecx
mov	dword ptr [esi+0Ch], 3
mov	[esi+8], ecx
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A95A:		; default
pop	edi
xor	eax, eax
pop	esi
mov	[ebp+48h], eax
pop	ebp
pop	ebx
pop	ecx
retn

loc_70A965:
mov	edi, [esi+0Ch]
mov	ebx, [esi+8]
mov	ecx, 7
sub	ecx, edi
mov	eax, 1
shl	eax, cl
mov	ecx, [esi]
movzx	ecx, byte ptr [ebx+ecx]
and	eax, ecx
lea	ecx, [edi+1]
mov	[esi+0Ch], ecx
cmp	ecx, 8
jb	short loc_70A993
inc	ebx
mov	[esi+0Ch], edx
mov	[esi+8], ebx

loc_70A993:
inc	dword ptr [ebp+4Ch]
cmp	eax, edx
mov	eax, [esi+0Ch]
jnz	loc_70AB21
cmp	eax, 7		; switch 8 cases
ja	loc_70AAA8	; default
jmp	ds:off_70ADA0[eax*4] ; switch jump

loc_70A9B1:		; jumptable 0070A9AA case 0
mov	edx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [edx+eax]
shr	eax, 4
mov	dword ptr [esi+0Ch], 4
jmp	loc_70AAAA

loc_70A9C9:		; jumptable 0070A9AA case 1
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	eax, byte ptr [ecx+edx]
shr	eax, 3
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 5
jmp	loc_70AAAA

loc_70A9E4:		; jumptable 0070A9AA case 2
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
shr	eax, 2
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 6
jmp	loc_70AAAA

loc_70A9FF:		; jumptable 0070A9AA case 3
mov	edx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [edx+eax]
shr	eax, 1
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 7
jmp	loc_70AAAA

loc_70AA19:		; jumptable 0070A9AA case 4
mov	ecx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [eax+ecx]
and	eax, 0Fh
inc	ecx
mov	[esi+0Ch], edx
mov	[esi+8], ecx
jmp	short loc_70AAAA

loc_70AA2E:		; jumptable 0070A9AA case 5
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	eax, byte ptr [edx+ecx+1]
lea	edi, [edx+ecx]
movzx	edx, byte ptr [edi]
and	edx, 7
shr	eax, 7
add	edx, edx
or	eax, edx
inc	ecx
mov	dword ptr [esi+0Ch], 1
mov	[esi+8], ecx
jmp	short loc_70AAAA

loc_70AA55:		; jumptable 0070A9AA case 6
mov	ecx, [esi+8]
mov	eax, [esi]
lea	edx, [eax+ecx]
movzx	eax, byte ptr [edx+1]
movzx	edx, byte ptr [edx]
and	edx, 3
add	edx, edx
shr	eax, 6
add	edx, edx
or	eax, edx
inc	ecx
mov	dword ptr [esi+0Ch], 2
mov	[esi+8], ecx
jmp	short loc_70AAAA

loc_70AA7D:		; jumptable 0070A9AA case 7
mov	ecx, [esi+8]
mov	eax, [esi]
movzx	edx, byte ptr [eax+ecx]
lea	edi, [eax+ecx]
movzx	eax, byte ptr [edi+1]
and	edx, 1
add	edx, edx
add	edx, edx
shr	eax, 5
add	edx, edx
or	eax, edx
inc	ecx
mov	dword ptr [esi+0Ch], 3
mov	[esi+8], ecx
jmp	short loc_70AAAA

loc_70AAA8:		; default
xor	eax, eax

loc_70AAAA:
lea	edi, [eax+2]
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
test	ebx, eax
jz	short loc_70AACC
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70AACC:
push	edi
mov	ecx, esi
mov	[ebp+5Ch], eax
call	sub_6A98B0
test	ebx, eax
jz	short loc_70AAE4
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70AAE4:
push	edi
mov	ecx, esi
mov	[ebp+60h], eax
call	sub_6A98B0
test	ebx, eax
jz	short loc_70AAFC
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70AAFC:
push	edi
mov	ecx, esi
mov	[ebp+54h], eax
call	sub_6A98B0
test	ebx, eax
jz	short loc_70AB14
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70AB14:
pop	edi
pop	esi
mov	[ebp+58h], eax
mov	byte ptr [ebp+20h], 85h
pop	ebp
pop	ebx
pop	ecx
retn

loc_70AB21:		; switch 8 cases
cmp	eax, 7
ja	loc_70AC28	; default
jmp	ds:off_70ADC0[eax*4] ; switch jump

loc_70AB31:		; jumptable 0070AB2A case 0
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
shr	eax, 4
mov	dword ptr [esi+0Ch], 4
jmp	loc_70AC2A

loc_70AB49:		; jumptable 0070AB2A case 1
mov	edx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [edx+eax]
shr	eax, 3
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 5
jmp	loc_70AC2A

loc_70AB64:		; jumptable 0070AB2A case 2
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	eax, byte ptr [ecx+edx]
shr	eax, 2
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 6
jmp	loc_70AC2A

loc_70AB7F:		; jumptable 0070AB2A case 3
mov	eax, [esi+8]
mov	ecx, [esi]
movzx	eax, byte ptr [eax+ecx]
shr	eax, 1
and	eax, 0Fh
mov	dword ptr [esi+0Ch], 7
jmp	loc_70AC2A

loc_70AB99:		; jumptable 0070AB2A case 4
mov	ecx, [esi+8]
mov	eax, [esi]
movzx	eax, byte ptr [eax+ecx]
and	eax, 0Fh
inc	ecx
mov	[esi+0Ch], edx
mov	[esi+8], ecx
jmp	short loc_70AC2A

loc_70ABAE:		; jumptable 0070AB2A case 5
mov	ecx, [esi+8]
mov	edx, [esi]
movzx	eax, byte ptr [edx+ecx+1]
lea	edi, [edx+ecx]
movzx	edx, byte ptr [edi]
and	edx, 7
shr	eax, 7
add	edx, edx
or	eax, edx
inc	ecx
mov	dword ptr [esi+0Ch], 1
mov	[esi+8], ecx
jmp	short loc_70AC2A

loc_70ABD5:		; jumptable 0070AB2A case 6
mov	ecx, [esi+8]
mov	eax, [esi]
lea	edx, [eax+ecx]
movzx	eax, byte ptr [edx+1]
movzx	edx, byte ptr [edx]
and	edx, 3
add	edx, edx
shr	eax, 6
add	edx, edx
or	eax, edx
inc	ecx
mov	dword ptr [esi+0Ch], 2
mov	[esi+8], ecx
jmp	short loc_70AC2A

loc_70ABFD:		; jumptable 0070AB2A case 7
mov	ecx, [esi+8]
mov	eax, [esi]
movzx	edx, byte ptr [eax+ecx]
lea	edi, [eax+ecx]
movzx	eax, byte ptr [edi+1]
and	edx, 1
add	edx, edx
add	edx, edx
shr	eax, 5
add	edx, edx
or	eax, edx
inc	ecx
mov	dword ptr [esi+0Ch], 3
mov	[esi+8], ecx
jmp	short loc_70AC2A

loc_70AC28:		; default
xor	eax, eax

loc_70AC2A:
mov	ebx, [esi+0Ch]
mov	edx, [esi+8]
lea	edi, [eax+2]
mov	ecx, 7
sub	ecx, ebx
mov	eax, 1
shl	eax, cl
mov	ecx, [esi]
movzx	ecx, byte ptr [ecx+edx]
and	eax, ecx
inc	ebx
xor	ecx, ecx
mov	[esi+0Ch], ebx
cmp	ebx, 8
jb	short loc_70AC5B
inc	edx
mov	[esi+0Ch], ecx
mov	[esi+8], edx

loc_70AC5B:
mov	[ebp+64h], ecx
mov	[ebp+68h], ecx
cmp	eax, ecx
jz	short loc_70AC93
push	edi
mov	ecx, esi
call	sub_6A98B0
lea	ecx, [edi-1]
mov	ebx, 1
shl	ebx, cl
test	eax, ebx
jz	short loc_70AC84
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70AC84:
push	edi
mov	ecx, esi
mov	[ebp+64h], eax
call	sub_6A98B0
test	eax, ebx
jmp	short loc_70AD06

loc_70AC93:
mov	edx, [esi+0Ch]
mov	ebx, [esi+8]
mov	ecx, 7
sub	ecx, edx
mov	eax, 1
shl	eax, cl
mov	ecx, [esi]
movzx	ecx, byte ptr [ecx+ebx]
and	eax, ecx
lea	ecx, [edx+1]
mov	[esi+0Ch], ecx
cmp	ecx, 8
jb	short loc_70ACC5
inc	ebx
mov	dword ptr [esi+0Ch], 0
mov	[esi+8], ebx

loc_70ACC5:
push	edi
mov	ecx, esi
test	eax, eax
jnz	short loc_70ACF5
call	sub_6A98B0
lea	ecx, [edi-1]
mov	edx, 1
shl	edx, cl
test	eax, edx
jz	short loc_70ACE8
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70ACE8:
pop	edi
pop	esi
mov	[ebp+64h], eax
mov	byte ptr [ebp+20h], 84h
pop	ebp
pop	ebx
pop	ecx
retn

loc_70ACF5:
call	sub_6A98B0
lea	ecx, [edi-1]
mov	edx, 1
shl	edx, cl
test	eax, edx

loc_70AD06:
jz	short loc_70AD11
or	edx, 0FFFFFFFFh
mov	ecx, edi
shl	edx, cl
or	eax, edx

loc_70AD11:
mov	[ebp+68h], eax
mov	byte ptr [ebp+20h], 84h

loc_70AD18:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_70A280 endp

align 10h
off_70AD20 dd offset loc_70A2D5	; jump table for switch	statement
dd offset loc_70A2F2
dd offset loc_70A312
dd offset loc_70A331
dd offset loc_70A34A
dd offset loc_70A36B
dd offset loc_70A392
dd offset loc_70A3BB
off_70AD40 dd offset loc_70A437	; jump table for switch	statement
dd offset loc_70A44F
dd offset loc_70A46A
dd offset loc_70A484
dd offset loc_70A49C
dd offset loc_70A4C3
dd offset loc_70A4EC
dd offset loc_70A517
off_70AD60 dd offset loc_70A72A	; jump table for switch	statement
dd offset loc_70A742
dd offset loc_70A75D
dd offset loc_70A778
dd offset loc_70A792
dd offset loc_70A7A7
dd offset loc_70A7CD
dd offset loc_70A7F5
off_70AD80 dd offset loc_70A837	; jump table for switch	statement
dd offset loc_70A853
dd offset loc_70A872
dd offset loc_70A891
dd offset loc_70A8AF
dd offset loc_70A8CB
dd offset loc_70A8F9
dd offset loc_70A928
off_70ADA0 dd offset loc_70A9B1	; jump table for switch	statement
dd offset loc_70A9C9
dd offset loc_70A9E4
dd offset loc_70A9FF
dd offset loc_70AA19
dd offset loc_70AA2E
dd offset loc_70AA55
dd offset loc_70AA7D
off_70ADC0 dd offset loc_70AB31	; jump table for switch	statement
dd offset loc_70AB49
dd offset loc_70AB64
dd offset loc_70AB7F
dd offset loc_70AB99
dd offset loc_70ABAE
dd offset loc_70ABD5
dd offset loc_70ABFD



sub_70ADE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
fild	dword ptr [eax+2Ch]
mov	ecx, [esp+arg_0]
mov	edx, [esp+arg_4]
fstp	dword ptr [ecx]
fild	dword ptr [eax+30h]
fstp	dword ptr [edx]
test	byte ptr [eax+70h], 80h
jz	short locret_70AE08
fld	dword ptr [ecx]
fmul	dword ptr [eax+6Ch]
fstp	dword ptr [ecx]
fld	dword ptr [eax+6Ch]
fmul	dword ptr [edx]
fstp	dword ptr [edx]

locret_70AE08:
retn	8
sub_70ADE0 endp

align 10h



sub_70AE10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx]
movzx	eax, byte ptr [edx+20h]
sub	eax, 84h
push	esi
jz	loc_70AEBA
sub	eax, 1
jnz	loc_70AF6E
mov	eax, [edx+5Ch]
add	eax, [edx+2Ch]
mov	[esp+4+arg_4], eax
fild	[esp+4+arg_4]
mov	eax, [esp+4+arg_0]
fstp	dword ptr [eax]
mov	edx, [ecx]
mov	esi, [edx+60h]
add	esi, [edx+30h]
mov	[esp+4+arg_4], esi
fild	[esp+4+arg_4]
fstp	dword ptr [eax+4]
mov	edx, [ecx]
mov	esi, [edx+5Ch]
add	esi, [edx+54h]
add	[edx+2Ch], esi
mov	edx, [ecx]
mov	esi, [edx+60h]
add	esi, [edx+58h]
add	[edx+30h], esi
mov	edx, [ecx]
fild	dword ptr [edx+2Ch]
fstp	dword ptr [eax+8]
mov	edx, [ecx]
fild	dword ptr [edx+30h]
fstp	dword ptr [eax+0Ch]
mov	edx, [ecx]
test	byte ptr [edx+70h], 80h
jz	short loc_70AEA8
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax]
fstp	dword ptr [eax]
mov	edx, [ecx]
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+4]
fstp	dword ptr [eax+4]
mov	edx, [ecx]
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
mov	edx, [ecx]
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]

loc_70AEA8:
mov	byte ptr [eax+10h], 1
inc	dword ptr [ecx+4]
mov	ecx, [ecx]
call	sub_70A280
pop	esi
retn	8

loc_70AEBA:
mov	esi, [edx+64h]
add	esi, [edx+2Ch]
mov	eax, [esp+4+arg_0]
mov	[esp+4+arg_0], esi
fild	[esp+4+arg_0]
fstp	dword ptr [eax+8]
mov	edx, [ecx]
mov	esi, [edx+68h]
add	esi, [edx+30h]
cmp	byte ptr [esp+4+arg_4],	0
mov	[esp+4+arg_0], esi
fild	[esp+4+arg_0]
fstp	dword ptr [eax+0Ch]
mov	edx, [ecx]
jz	short loc_70AF40
fild	dword ptr [edx+64h]
fld	ds:dbl_15FCC48
fmul	st(1), st
fild	dword ptr [edx+2Ch]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
mov	edx, [ecx]
fimul	dword ptr [edx+68h]
fiadd	dword ptr [edx+30h]
fstp	dword ptr [eax+4]
mov	edx, [ecx]
test	byte ptr [edx+70h], 80h
jz	short loc_70AF3A
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax]
fstp	dword ptr [eax]
mov	edx, [ecx]
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+4]
fstp	dword ptr [eax+4]
mov	edx, [ecx]
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
mov	edx, [ecx]
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]

loc_70AF3A:
mov	byte ptr [eax+10h], 1
jmp	short loc_70AF5E

loc_70AF40:
test	byte ptr [edx+70h], 80h
jz	short loc_70AF5A
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+8]
fstp	dword ptr [eax+8]
mov	edx, [ecx]
fld	dword ptr [edx+6Ch]
fmul	dword ptr [eax+0Ch]
fstp	dword ptr [eax+0Ch]

loc_70AF5A:
mov	byte ptr [eax+10h], 0

loc_70AF5E:
mov	eax, [ecx]
mov	edx, [eax+64h]
add	[eax+2Ch], edx
mov	eax, [ecx]
mov	edx, [eax+68h]
add	[eax+30h], edx

loc_70AF6E:
inc	dword ptr [ecx+4]
mov	ecx, [ecx]
call	sub_70A280
pop	esi
retn	8
sub_70AE10 endp

align 10h



sub_70AF80 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, [ecx]
push	edi
movzx	edi, byte ptr [esi+20h]
sub	edi, 84h
mov	eax, edx
jz	short loc_70AFD6
sub	edi, 1
jnz	short loc_70AFF9
mov	eax, [esi+5Ch]
mov	[edx], eax
mov	esi, [ecx]
mov	esi, [esi+60h]
mov	[edx+4], esi
mov	esi, [ecx]
mov	esi, [esi+54h]
lea	eax, [edx+4]
mov	[eax+4], esi
mov	esi, [ecx]
mov	esi, [esi+58h]
add	eax, 4
mov	[eax+4], esi
mov	esi, [ecx]
mov	edi, [esi+5Ch]
add	edi, [esi+54h]
add	eax, 4
add	[esi+2Ch], edi
mov	esi, [ecx]
mov	edi, [esi+60h]
add	edi, [esi+58h]
jmp	short loc_70AFF3

loc_70AFD6:
mov	eax, [esi+64h]
mov	[edx], eax
mov	esi, [ecx]
mov	esi, [esi+68h]
mov	[edx+4], esi
mov	esi, [ecx]
mov	edi, [esi+64h]
add	[esi+2Ch], edi
mov	esi, [ecx]
mov	edi, [esi+68h]
lea	eax, [edx+4]

loc_70AFF3:
add	eax, 4
add	[esi+30h], edi

loc_70AFF9:
sub	eax, edx
sar	eax, 2
mov	[edx+10h], eax
inc	dword ptr [ecx+4]
mov	ecx, [ecx]
call	sub_70A280
pop	edi
pop	esi
retn	4
sub_70AF80 endp




sub_70B010 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
movzx	esi, byte ptr [edi]
shr	esi, 3
and	esi, 3
add	esi, 1
mov	eax, 0
mov	edx, eax
mov	ecx, eax
jz	short loc_70B042
push	ebx
mov	edi, edi

loc_70B030:
movzx	ebx, byte ptr [edx+edi+1]
shl	ebx, cl
inc	edx
add	ecx, 8
or	eax, ebx
cmp	edx, esi
jb	short loc_70B030
pop	ebx

loc_70B042:
pop	edi
pop	esi
retn
sub_70B010 endp

align 10h



sub_70B050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
movzx	ecx, byte ptr [eax]
mov	eax, ecx
shr	ecx, 5
push	ebx
shr	eax, 3
and	ecx, 3
push	ebp
inc	ecx
push	esi
and	eax, 3
push	edi
inc	eax
mov	esi, ecx
xor	edi, edi
xor	edx, edx
xor	ecx, ecx
test	eax, eax
jbe	short loc_70B095
jmp	short loc_70B080
align 10h

loc_70B080:
mov	ebx, [esp+10h+arg_0]
movzx	ebx, byte ptr [edx+ebx+1]
shl	ebx, cl
inc	edx
add	ecx, 8
or	edi, ebx
cmp	edx, eax
jb	short loc_70B080

loc_70B095:
mov	ebx, [esp+10h+arg_4]
lea	ecx, [esi+esi]
sub	edi, ecx
add	edi, [esp+10h+arg_0]
test	ebx, ebx
jz	short loc_70B0C2
xor	edx, edx
xor	eax, eax
xor	ecx, ecx
test	esi, esi
jbe	short loc_70B0C0

loc_70B0B0:
movzx	ebp, byte ptr [eax+edi]
shl	ebp, cl
inc	eax
add	ecx, 8
or	edx, ebp
cmp	eax, esi
jb	short loc_70B0B0

loc_70B0C0:
mov	[ebx], edx

loc_70B0C2:
mov	ebx, [esp+10h+arg_8]
add	edi, esi
test	ebx, ebx
jz	short loc_70B0E8
xor	edx, edx
xor	eax, eax
xor	ecx, ecx
test	esi, esi
jbe	short loc_70B0E6

loc_70B0D6:
movzx	ebp, byte ptr [eax+edi]
shl	ebp, cl
inc	eax
add	ecx, 8
or	edx, ebp
cmp	eax, esi
jb	short loc_70B0D6

loc_70B0E6:
mov	[ebx], edx

loc_70B0E8:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_70B050 endp

align 10h



sub_70B0F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
test	eax, eax
jz	short loc_70B0FD
mov	edx, [ecx+3Ch]
mov	[eax], edx

loc_70B0FD:
mov	eax, [esp+arg_4]
test	eax, eax
jz	short locret_70B10A
mov	ecx, [ecx+38h]
mov	[eax], ecx

locret_70B10A:
retn	8
sub_70B0F0 endp

align 10h



sub_70B110 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+4]
sub	esp, 0Ch
cmp	eax, [ecx+8]
jnb	loc_70B2EB
mov	eax, [ecx+1Ch]
push	ebx
push	ebp
push	esi
push	edi
mov	ebx, 1
test	eax, eax
jz	loc_70B270
cmp	dword ptr [ecx+18h], 8000h
jbe	short loc_70B14B
movsx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+14h], edx
mov	[ecx+1Ch], eax
mov	[ecx+18h], ebx

loc_70B14B:
mov	eax, [ecx+14h]
test	[ecx+18h], eax
jz	loc_70B1F2
mov	edx, [ecx+1Ch]
movsx	eax, word ptr [edx]
lea	esi, [edx+2]
mov	[ecx+1Ch], esi
movsx	edx, word ptr [esi]
add	esi, 2
mov	[ecx+1Ch], esi
movsx	edi, word ptr [esi]
add	esi, 2
mov	[ecx+1Ch], esi
movsx	ebp, word ptr [esi]
add	esi, 2
mov	[ecx+1Ch], esi

loc_70B17E:
mov	esi, [ecx+0Ch]
add	esi, eax
mov	[esp+1Ch+arg_4], esi
fild	[esp+1Ch+arg_4]
mov	esi, [esp+1Ch+arg_0]
fmul	dword ptr [ecx+24h]
fstp	dword ptr [esi]
mov	ebx, [ecx+10h]
add	ebx, edx
mov	[esp+1Ch+arg_4], ebx
fild	[esp+1Ch+arg_4]
lea	ebx, [edi+eax]
add	edi, eax
fmul	dword ptr [ecx+24h]
fstp	dword ptr [esi+4]
add	ebx, [ecx+0Ch]
mov	[esp+1Ch+arg_4], ebx
fild	[esp+1Ch+arg_4]
fmul	dword ptr [ecx+24h]
fstp	dword ptr [esi+8]
mov	ebx, [ecx+10h]
add	ebx, ebp
add	ebx, edx
mov	[esp+1Ch+arg_4], ebx
fild	[esp+1Ch+arg_4]
mov	ebx, 1
add	ebp, edx
fmul	dword ptr [ecx+24h]
mov	[esi+10h], bl
fstp	dword ptr [esi+0Ch]
add	[ecx+0Ch], edi
add	[ecx+10h], ebp
add	[ecx+4], ebx
shl	dword ptr [ecx+18h], 1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_70B1F2:
mov	eax, [ecx+1Ch]
movsx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+1Ch], eax
movsx	esi, word ptr [eax]
add	eax, 2
mov	[esp+1Ch+var_C], edx
mov	[esp+1Ch+var_8], esi
mov	[ecx+1Ch], eax

loc_70B20F:
mov	eax, [ecx+0Ch]
add	eax, edx
mov	[esp+1Ch+var_4], eax
fild	[esp+1Ch+var_4]
mov	eax, [esp+1Ch+arg_0]
fmul	dword ptr [ecx+24h]
fstp	dword ptr [eax+8]
mov	edi, [ecx+10h]
add	edi, esi
cmp	byte ptr [esp+1Ch+arg_4], 0
mov	[esp+1Ch+arg_0], edi
fild	[esp+1Ch+arg_0]
fmul	dword ptr [ecx+24h]
fstp	dword ptr [eax+0Ch]
jz	loc_70B2D7
fild	[esp+1Ch+var_C]
fld	ds:dbl_15FCC48
fmul	st(1), st
fild	dword ptr [ecx+0Ch]
faddp	st(2), st
fld	dword ptr [ecx+24h]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fimul	[esp+1Ch+var_8]
fiadd	dword ptr [ecx+10h]
fmul	dword ptr [ecx+24h]
mov	[eax+10h], bl
fstp	dword ptr [eax+4]
jmp	short loc_70B2DB

loc_70B270:
cmp	dword ptr [ecx+18h], 0
jnz	short loc_70B287
mov	eax, [ecx+20h]
mov	edx, [eax]
add	eax, 4
mov	[ecx+14h], edx
mov	[ecx+20h], eax
mov	[ecx+18h], ebx

loc_70B287:
mov	eax, [ecx+14h]
test	[ecx+18h], eax
jz	short loc_70B2B7
mov	edx, [ecx+20h]
mov	eax, [edx]
lea	esi, [edx+4]
mov	[ecx+20h], esi
mov	edx, [esi]
add	esi, 4
mov	[ecx+20h], esi
mov	edi, [esi]
add	esi, 4
mov	[ecx+20h], esi
mov	ebp, [esi]
add	esi, 4
mov	[ecx+20h], esi
jmp	loc_70B17E

loc_70B2B7:
mov	eax, [ecx+20h]
mov	edx, [eax]
add	eax, 4
mov	[ecx+20h], eax
mov	esi, [eax]
add	eax, 4
mov	[esp+1Ch+var_C], edx
mov	[esp+1Ch+var_8], esi
mov	[ecx+20h], eax
jmp	loc_70B20F

loc_70B2D7:
mov	byte ptr [eax+10h], 0

loc_70B2DB:
add	[ecx+10h], esi
add	[ecx+4], ebx
add	[ecx+0Ch], edx
shl	dword ptr [ecx+18h], 1
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_70B2EB:
add	esp, 0Ch
retn	8
sub_70B110 endp

align 10h



sub_70B300 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+4]
cmp	eax, [ecx+8]
jnb	locret_70B428
mov	eax, [ecx+1Ch]
push	esi
push	edi
test	eax, eax
jz	loc_70B3BB
cmp	dword ptr [ecx+18h], 8000h
jbe	short loc_70B335
movsx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+14h], edx
mov	[ecx+1Ch], eax
mov	dword ptr [ecx+18h], 1

loc_70B335:
mov	eax, [ecx+14h]
mov	edx, [ecx+1Ch]
test	[ecx+18h], eax
movsx	eax, word ptr [edx]
mov	edx, [esp+8+arg_0]
mov	[edx], eax
mov	esi, 2
lea	eax, [edx+4]
jz	short loc_70B397
add	[ecx+1Ch], esi
mov	edi, [ecx+1Ch]
movsx	edi, word ptr [edi]
mov	[eax], edi
add	[ecx+1Ch], esi
push	ebx
mov	ebx, [ecx+1Ch]
movsx	ebx, word ptr [ebx]
mov	edi, 4
mov	[eax+edi], ebx
add	[ecx+1Ch], esi
mov	ebx, [ecx+1Ch]
movsx	ebx, word ptr [ebx]
add	eax, edi
mov	[eax+edi], ebx
add	[ecx+1Ch], esi
inc	dword ptr [ecx+4]
shl	dword ptr [ecx+18h], 1
add	eax, edi
add	eax, edi
pop	ebx
sub	eax, edx
sar	eax, 2
pop	edi
mov	[edx+10h], eax
pop	esi
retn	4

loc_70B397:
add	[ecx+1Ch], esi
mov	edi, [ecx+1Ch]
movsx	edi, word ptr [edi]
mov	[eax], edi
add	[ecx+1Ch], esi
inc	dword ptr [ecx+4]
shl	dword ptr [ecx+18h], 1
add	eax, 4
sub	eax, edx
sar	eax, 2
pop	edi
mov	[edx+10h], eax
pop	esi
retn	4

loc_70B3BB:
cmp	dword ptr [ecx+18h], 0
jnz	short loc_70B3D6
mov	eax, [ecx+20h]
mov	edx, [eax]
add	eax, 4
mov	[ecx+14h], edx
mov	[ecx+20h], eax
mov	dword ptr [ecx+18h], 1

loc_70B3D6:
mov	eax, [ecx+14h]
mov	edx, [ecx+20h]
test	[ecx+18h], eax
mov	eax, [edx]
mov	edx, [esp+8+arg_0]
mov	[edx], eax
mov	edi, 4
lea	eax, [edx+4]
jz	short loc_70B409
add	[ecx+20h], edi
mov	esi, [ecx+20h]
mov	esi, [esi]
mov	[eax], esi
add	[ecx+20h], edi
mov	esi, [ecx+20h]
mov	esi, [esi]
add	eax, edi
mov	[eax], esi
add	eax, edi

loc_70B409:
add	[ecx+20h], edi
mov	esi, [ecx+20h]
mov	esi, [esi]
mov	[eax], esi
add	[ecx+20h], edi
inc	dword ptr [ecx+4]
shl	dword ptr [ecx+18h], 1
add	eax, edi
sub	eax, edx
sar	eax, 2
pop	edi
mov	[edx+10h], eax
pop	esi

locret_70B428:
retn	4
sub_70B300 endp

align 10h



sub_70B430 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	edx, [ecx+34h]
mov	[eax+4], edx
mov	edx, [ecx+34h]
mov	[eax+8], edx
mov	edx, [ecx+38h]
mov	[eax+0Ch], edx
mov	edx, [ecx+3Ch]
mov	[eax+10h], edx
mov	edx, [ecx+40h]
mov	[eax+14h], edx
mov	dword ptr [eax+18h], 0
mov	edx, [ecx+38h]
mov	[eax+1Ch], edx
test	byte ptr [ecx+24h], 2
jz	short loc_70B47D
fld	ds:dword_156F414
fstp	[esp+arg_0]
fld	[esp+arg_0]
fstp	dword ptr [eax+20h]
retn	4

loc_70B47D:
fld1
fstp	[esp+arg_0]
fld	[esp+arg_0]
fstp	dword ptr [eax+20h]
retn	4
sub_70B430 endp

align 10h



sub_70B490 proc	near
mov	eax, [ecx+10h]
mov	edx, [eax+48h]
add	ecx, 10h
jmp	edx
sub_70B490 endp

align 10h



; int __cdecl sub_70B4A0(float,	float, float, float, float, float, float, int, int)
sub_70B4A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

fld	[esp+arg_8]
mov	eax, [esp+arg_1C]
fld	st
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+arg_18]
fld	st
fmulp	st(3), st
fld	st(1)
faddp	st(3), st
fxch	st(2)
fstp	[esp+arg_18]
fld	[esp+arg_C]
fld	st
fld	[esp+arg_4]
fld	st
fsubp	st(2), st
fld	st(4)
fmulp	st(2), st
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+arg_C]
fld	[esp+arg_10]
fld	st
fsub	st, st(6)
fmul	st, st(5)
faddp	st(6), st
fxch	st(5)
fstp	[esp+arg_8]
fld	[esp+arg_14]
fsub	st, st(2)
fmul	st, st(4)
faddp	st(2), st
fxch	st(1)
fstp	[esp+arg_0]
fld	[esp+arg_8]
fld	[esp+arg_18]
fld	st
fsubp	st(2), st
fld	st(4)
fmulp	st(2), st
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+arg_18]
fld	[esp+arg_0]
fld	[esp+arg_C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(5), st
fld	st
faddp	st(5), st
fxch	st(4)
fstp	[esp+arg_C]
fxch	st(2)
fstp	dword ptr [eax]
fstp	dword ptr [eax+4]
fstp	dword ptr [eax+8]
fstp	dword ptr [eax+0Ch]
fld	[esp+arg_18]
fst	dword ptr [eax+10h]
fld	[esp+arg_C]
fst	dword ptr [eax+14h]
mov	eax, [esp+arg_20]
fxch	st(1)
fstp	dword ptr [eax]
fstp	dword ptr [eax+4]
fld	[esp+arg_8]
fstp	dword ptr [eax+8]
fld	[esp+arg_0]
fstp	dword ptr [eax+0Ch]
fstp	dword ptr [eax+10h]
fld	[esp+arg_14]
fstp	dword ptr [eax+14h]
retn
sub_70B4A0 endp

align 10h



sub_70B580 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_143F6C8
test	ecx, ecx
jz	short loc_70B596
push	esi
call	sub_705BC0

loc_70B596:
mov	ecx, [esi+20h]
mov	dword ptr [esi+18h], 0
test	ecx, ecx
jz	short loc_70B5AC
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_70B5AC:
mov	dword ptr [esi+20h], 0
pop	esi
retn
sub_70B580 endp

align 10h



sub_70B5C0 proc	near
fld	ds:flt_15A0D44
retn
sub_70B5C0 endp

align 10h



sub_70B5D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+8], esi
jbe	short loc_70B60B
push	ebx
mov	ebx, [esp+0Ch+arg_4]

loc_70B5E2:
mov	ecx, [edi+14h]
mov	eax, esi
shr	eax, 8
mov	eax, [ecx+eax*4]
mov	edx, esi
and	edx, 0FFh
lea	eax, [eax+edx*8]
lea	ecx, [eax+4]
push	ecx
push	eax
mov	ecx, ebx
call	sub_6A5790
inc	esi
cmp	esi, [edi+8]
jb	short loc_70B5E2
pop	ebx

loc_70B60B:
pop	edi
pop	esi
retn
sub_70B5D0 endp

align 10h



; int __stdcall	sub_70B610(int,	char, float)
sub_70B610 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_78=	dword ptr -78h
var_72=	byte ptr -72h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	byte ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

sub	esp, 78h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+78h+var_4], eax
push	ebx
mov	ebx, [esp+7Ch+arg_0]
mov	eax, [ebx]
mov	edx, [eax+68h]
mov	edx, [edx+14h]
push	ebp
mov	ebp, [eax+48h]
test	byte ptr [ebp+14h], 10h
push	esi
mov	esi, ecx
mov	ecx, [esp+84h+arg_8]
push	edi
mov	[esp+88h+var_5C], esi
mov	[esp+88h+var_64], ebx
mov	[esp+88h+var_60], ecx
mov	dword ptr [esp+88h+var_68], ebp
mov	[esp+88h+var_6C], edx
jz	short loc_70B68A
mov	edi, [ebp+1Ch]
test	edi, 100h
jz	short loc_70B68A
mov	edx, edi
shr	edx, 9
test	dl, 1
jnz	short loc_70B672
test	byte ptr [esi+24h], 1
jnz	short loc_70B68A

loc_70B672:
cmp	[esp+88h+arg_4], 0
jnz	short loc_70B68A
cmp	dword ptr [eax+94h], 0
mov	[esp+88h+var_72], 1
jz	short loc_70B68F

loc_70B68A:
mov	[esp+88h+var_72], 0

loc_70B68F:
xor	edi, edi
test	byte ptr [esi+24h], 80h
jz	short loc_70B6CA
test	ecx, ecx
jz	short loc_70B6CA
test	byte ptr [ecx+76h], 1
jz	short loc_70B6CA
fld	dword ptr [eax+74h]
push	ecx		; float
fstp	[esp+8Ch+var_70]
fld	dword ptr [ebp+10h]
fstp	[esp+8Ch+var_78]
fld	[esp+8Ch+var_78]
fmul	[esp+8Ch+var_70]
fstp	[esp+8Ch+var_78]
fld	[esp+8Ch+var_78]
fstp	[esp+8Ch+var_8C]
call	sub_655850
mov	edi, eax

loc_70B6CA:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_70B6FA
test	edi, edi
jnz	short loc_70B6FA
mov	al, [esp+88h+var_72]
cmp	al, [ecx+15h]
jnz	short loc_70B6FA
push	edi
push	ebx
call	sub_748E80
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+78h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 78h
retn	0Ch

loc_70B6FA:
lea	ecx, [ebx+0Ch]
call	sub_64ED20
fstp	[esp+88h+var_78]
fld	[esp+88h+var_78]
fld	st
fabs
fstp	[esp+88h+var_78]
fld	[esp+88h+var_78]
fcomp	ds:flt_1432398
fnstsw	ax
test	ah, 5
jp	short loc_70B72A
fstp	st
jmp	loc_70B951

loc_70B72A:
fld	dword ptr [ebx+40h]
fabs
fstp	[esp+88h+var_78]
fld	[esp+88h+var_78]
fcomp	ds:flt_15AA9FC
fnstsw	ax
test	ah, 1
jnz	short loc_70B74C
mov	cl, 1
mov	[esp+88h+var_71], cl
jmp	short loc_70B755

loc_70B74C:
mov	[esp+88h+var_71], 0
mov	cl, [esp+88h+var_71]

loc_70B755:
fld	dword ptr [ebx+3Ch]
fabs
fstp	[esp+88h+var_78]
fld	[esp+88h+var_78]
fcomp	ds:flt_1432128
fnstsw	ax
test	ah, 5
jp	short loc_70B785
test	cl, cl
jnz	short loc_70B785
mov	edx, [ebx]
cmp	dword ptr [edx+94h], 0
jnz	short loc_70B785
fstp	st
jmp	loc_70B951

loc_70B785:
mov	eax, [ebx]
fmul	dword ptr [eax+74h]
mov	eax, [ebp+14h]
shr	eax, 5
and	eax, 1
xor	edx, edx
fstp	[esp+88h+var_70]
fld	[esp+88h+var_70]
add	eax, eax
test	cl, cl
mov	cl, [esp+88h+var_72]
setnz	dl
or	eax, edx
xor	edx, edx
add	eax, eax
test	cl, cl
setnz	dl
or	eax, edx
test	edi, edi
jnz	short loc_70B824
mov	[esp+88h+var_58], al
test	cl, cl
jz	short loc_70B7E6
fmul	ds:dbl_143F6C0
fstp	[esp+88h+var_78]
fld	[esp+88h+var_78]
fmul	st, st
fstp	[esp+88h+var_78]
mov	eax, [esp+88h+var_78]
shr	eax, 17h
and	eax, 0FFh
sub	eax, 40h
jmp	short loc_70B7FB

loc_70B7E6:
fstp	[esp+88h+var_78]
mov	eax, [esp+88h+var_78]
shr	eax, 17h
and	eax, 0FFh
sub	eax, 40h
shr	eax, 1

loc_70B7FB:
mov	[esp+88h+var_58+1], al
fld	dword ptr [ebp+10h]
fstp	[esp+88h+var_78]
mov	ebp, 3
mov	eax, [esp+88h+var_78]
shr	eax, 17h
and	eax, 0FFh
sub	eax, 40h
shr	eax, 1
mov	[esp+88h+var_58+2], al
xor	ebx, ebx
jmp	short loc_70B843

loc_70B824:		; char
push	eax
fstp	st
fldz
push	ecx		; float
lea	ecx, [esp+90h+var_58]
fstp	[esp+90h+var_90]
push	ecx		; int
mov	ecx, edi
call	sub_709BA0
mov	ebp, 54h
mov	ebx, 1

loc_70B843:
mov	eax, [esp+88h+var_60]
mov	ecx, [esp+88h+var_6C]
push	ebp
lea	edx, [esp+8Ch+var_58]
push	edx
push	ebx
push	eax
push	esi
call	sub_706040
mov	esi, eax
test	esi, esi
jz	short loc_70B881
mov	eax, [esp+88h+var_64]
test	edi, edi
setnz	cl
movzx	edx, cl
push	edx
push	eax
mov	ecx, esi
mov	byte ptr [esi+19h], 1
call	sub_748E80
mov	byte ptr [esi+19h], 0
jmp	loc_70B951

loc_70B881:
fld	[esp+88h+var_70]
mov	ecx, [esp+88h+var_6C]
fdivr	ds:dbl_15FCE20
mov	esi, dword ptr [esp+88h+var_68]
mov	ecx, [ecx+8]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	74h
fstp	[esp+90h+var_70]
fld	[esp+90h+var_70]
fmul	ds:dbl_15FD530
fmul	dword ptr [esi+10h]
fstp	[esp+90h+var_78]
call	eax
test	eax, eax
jz	short loc_70B8F5
mov	ecx, [esi+14h]
fld	[esp+88h+var_78]
shr	ecx, 5
and	cl, 1
cmp	[esp+88h+var_72], 0
mov	[esp+88h+var_68], cl
mov	edx, dword ptr [esp+88h+var_68]
setz	cl
push	edx		; char
movzx	edx, cl
push	edx		; char
sub	esp, 8
mov	ecx, eax
fstp	[esp+98h+var_94]
fld	[esp+98h+var_70]
fstp	[esp+98h+var_98]
call	sub_7496D0
mov	esi, eax
jmp	short loc_70B8F7

loc_70B8F5:
xor	esi, esi

loc_70B8F7:
mov	al, [esp+88h+var_71]
fld	[esp+88h+var_78]
mov	ecx, [esp+88h+var_5C]
mov	[esi+17h], al
mov	eax, [esp+88h+var_64]
mov	eax, [eax]
mov	edx, [ecx]
mov	edx, [edx+10h]
push	edi
push	eax
push	ecx
fstp	[esp+94h+var_94]
push	esi
call	edx
mov	eax, [esp+88h+var_60]
push	eax
push	ebp
lea	ecx, [esp+90h+var_58]
push	ecx
push	ebx
mov	ecx, esi
call	sub_747170
mov	ecx, [esp+88h+var_64]
test	edi, edi
setnz	dl
movzx	eax, dl
push	eax
push	ecx
mov	ecx, esi
call	sub_748E80
mov	edx, [esp+88h+var_5C]
mov	ecx, [esp+88h+var_6C]
push	esi
push	edx
call	sub_706340

loc_70B951:
test	edi, edi
jz	short loc_70B95C
mov	ecx, edi
call	sub_64A400

loc_70B95C:
mov	ecx, [esp+88h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 78h
retn	0Ch
sub_70B610 endp

align 10h



; int __cdecl sub_70B980(float,	float, float, float, float, float, float, float)
sub_70B980 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

fld	[esp+arg_C]
sub	esp, 30h
fld	[esp+30h+arg_4]
fcom	st(1)
fnstsw	ax
fld	[esp+30h+arg_14]
test	ah, 41h
jp	short loc_70B9E5
fcom	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_70B9E5
fld	[esp+30h+arg_1C]
sub	esp, 20h
fstp	[esp+50h+var_34]
fld	[esp+50h+arg_18]
fstp	[esp+50h+var_38]
fstp	[esp+50h+var_3C]
fld	[esp+50h+arg_10]
fstp	[esp+50h+var_40]
fxch	st(1)
fstp	[esp+50h+var_44]
fld	[esp+50h+arg_8]
fstp	[esp+50h+var_48]
fstp	[esp+50h+var_4C]
fld	[esp+50h+arg_0]
fstp	[esp+50h+var_50]
call	sub_709E10
add	esp, 20h
add	esp, 30h
retn

loc_70B9E5:
fld	st(2)
fadd	st, st
fsub	st, st(2)
fsub	st, st(1)
fstp	[esp+30h+arg_C]
fldz
fld	[esp+30h+arg_C]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_70BA0C
fstp	st
fld	ds:dbl_15FCD60
jmp	short loc_70BA12

loc_70BA0C:
fld	st(3)
fsub	st, st(3)
fdivrp	st(1), st

loc_70BA12:
fstp	[esp+30h+arg_C]
lea	eax, [esp+30h+var_30]
fld	[esp+30h+arg_C]
push	eax		; int
lea	ecx, [esp+34h+var_18]
push	ecx		; int
sub	esp, 1Ch
fstp	[esp+54h+var_3C]
fstp	[esp+54h+var_40]
fld	[esp+54h+arg_10]
fstp	[esp+54h+var_44]
fxch	st(1)
fstp	[esp+54h+var_48]
fld	[esp+54h+arg_8]
fstp	[esp+54h+var_4C]
fstp	[esp+54h+var_50]
fld	[esp+54h+arg_0]
fstp	[esp+54h+var_54]
call	sub_70B4A0
fld	[esp+54h+var_14]
add	esp, 24h
fld	[esp+30h+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_70BA94
fld	[esp+30h+var_18]
fstp	[esp+30h+arg_C]
fld	[esp+30h+var_8]
fstp	[esp+30h+var_18]
fld	[esp+30h+arg_C]
fstp	[esp+30h+var_8]
fxch	st(1)
fstp	[esp+30h+arg_C]
fstp	[esp+30h+var_14]
fld	[esp+30h+arg_C]
fstp	[esp+30h+var_4]
jmp	short loc_70BA98

loc_70BA94:
fstp	st
fstp	st

loc_70BA98:
fld	[esp+30h+var_2C]
fld	[esp+30h+var_1C]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_70BAD9
fld	[esp+30h+var_30]
fstp	[esp+30h+arg_C]
fld	[esp+30h+var_20]
fstp	[esp+30h+var_30]
fld	[esp+30h+arg_C]
fstp	[esp+30h+var_20]
fxch	st(1)
fstp	[esp+30h+arg_C]
fstp	[esp+30h+var_2C]
fld	[esp+30h+arg_C]
fstp	[esp+30h+var_1C]
fld	[esp+30h+var_2C]
fld	[esp+30h+var_1C]

loc_70BAD9:
fld	[esp+30h+arg_1C]
push	ebx
sub	esp, 20h
fstp	[esp+54h+var_38]
fld	[esp+54h+arg_18]
fstp	[esp+54h+var_3C]
fstp	[esp+54h+var_40]
fld	[esp+54h+var_20]
fstp	[esp+54h+var_44]
fld	[esp+54h+var_24]
fstp	[esp+54h+var_48]
fld	[esp+54h+var_28]
fstp	[esp+54h+var_4C]
fstp	[esp+54h+var_50]
fld	[esp+54h+var_30]
fstp	[esp+54h+var_54]
call	sub_709E10
fld	[esp+54h+arg_1C]
mov	bl, al
fstp	[esp+54h+var_38]
fld	[esp+54h+arg_18]
fstp	[esp+54h+var_3C]
fld	[esp+54h+var_4]
fstp	[esp+54h+var_40]
fld	[esp+54h+var_8]
fstp	[esp+54h+var_44]
fld	[esp+54h+var_C]
fstp	[esp+54h+var_48]
fld	[esp+54h+var_10]
fstp	[esp+54h+var_4C]
fld	[esp+54h+var_14]
fstp	[esp+54h+var_50]
fld	[esp+54h+var_18]
fstp	[esp+54h+var_54]
call	sub_709E10
add	esp, 20h
xor	edx, edx
cmp	al, bl
setnz	dl
mov	al, dl
pop	ebx
add	esp, 30h
retn
sub_70B980 endp




sub_70BB70 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, ecx
or	eax, 0FFFFFFFFh
test	byte ptr [ebp+24h], 40h
jz	short loc_70BBED
mov	ecx, [esp+4+arg_0]
cmp	dword ptr [ecx+18h], 1
jnz	short loc_70BBED
mov	ecx, [ecx+24h]
mov	edx, [ecx]
push	ebx
push	esi
mov	esi, [edx+0Ch]
xor	ecx, ecx
test	esi, esi
setl	cl
push	edi
mov	edi, [edx+10h]
xor	ebx, ebx
test	edi, edi
setl	bl
cmp	ecx, ebx
jz	short loc_70BBEA
cmp	dword ptr [edx+14h], 0
jge	short loc_70BBEA
test	esi, esi
jge	short loc_70BBB2
mov	esi, edi

loc_70BBB2:
mov	edx, [ebp+0]
mov	edx, [edx+24h]
lea	eax, [esp+10h+arg_0]
push	eax
mov	ecx, ebp
mov	[esp+14h+arg_0], 0
call	edx
cmp	esi, [esp+10h+arg_0]
jge	short loc_70BBE8
lea	ecx, [esi+esi*4]
lea	ecx, [eax+ecx*8]
call	sub_709B80
test	al, al
jnz	short loc_70BBE8
pop	edi
pop	esi
pop	ebx
or	eax, 0FFFFFFFFh
pop	ebp
retn	4

loc_70BBE8:
mov	eax, esi

loc_70BBEA:
pop	edi
pop	esi
pop	ebx

loc_70BBED:
pop	ebp
retn	4
sub_70BB70 endp

align 10h


; Attributes: thunk

sub_70BC00 proc	near
jmp	sub_70A070
sub_70BC00 endp

align 10h



sub_70BC10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_4]
lea	edx, [edi+edi*2]
mov	[esp+14h+arg_4], edx
lea	edx, [edx+eax+1]
mov	esi, ecx
mov	[esp+14h+var_8], esi
mov	[esp+14h+var_4], edx
mov	ebp, edx
test	eax, eax
jbe	short loc_70BCB2
mov	ecx, [esp+14h+arg_8]
push	ebx
mov	ebx, [esi+4]
xor	eax, eax
test	ebx, ebx
jz	short loc_70BC86
movzx	eax, word ptr [esi+8]
mov	edx, [ebx+4]
sub	edx, eax
lea	ebp, [edx+ebx+9]
lea	edx, [edi-1]
mov	esi, edx
and	esi, ebp
not	edx
lea	eax, [esi+edi-1]
and	eax, edx
mov	edx, [esp+18h+arg_4]
add	edx, ebp
sub	eax, esi
add	edx, eax
lea	esi, [ecx-1]
and	edx, esi
lea	ebp, [edx+ecx-1]
not	esi
and	ebp, esi
mov	esi, [esp+18h+var_8]
sub	ebp, edx
mov	edx, [esp+18h+var_4]
add	eax, ebp

loc_70BC86:
lea	ebp, [eax+edx]
test	ebx, ebx
jz	short loc_70BC95
movzx	ebx, word ptr [esi+8]
cmp	ebx, ebp
jnb	short loc_70BCAF

loc_70BC95:
lea	eax, [edi-1]
not	eax
and	eax, edi
add	eax, [esp+18h+arg_4]
lea	eax, [eax+ecx-1]
dec	ecx
not	ecx
and	eax, ecx
sub	eax, edx
add	eax, [esp+18h+arg_0]

loc_70BCAF:
add	edx, eax
pop	ebx

loc_70BCB2:
push	edx
push	ebp
mov	ecx, esi
call	sub_70A0B0
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	0Ch
sub_70BC10 endp

align 10h



sub_70BCD0 proc	near

var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
or	eax, [esi]
push	edi
or	eax, [esi+8]
mov	ebp, 4
cmp	eax, 8000h
jnb	loc_70BD89
cmp	eax, 80h
jnb	short loc_70BD38
cmp	eax, 8
jnb	short loc_70BD19
cmp	eax, 2
jnb	short loc_70BD0D
cmp	eax, 1
sbb	eax, eax
inc	eax
jmp	loc_70BE26

loc_70BD0D:
cmp	eax, ebp
sbb	eax, eax
add	eax, 3
jmp	loc_70BE26

loc_70BD19:
cmp	eax, 20h
jnb	short loc_70BD2B
cmp	eax, 10h
sbb	eax, eax
add	eax, 5
jmp	loc_70BE26

loc_70BD2B:
cmp	eax, 40h
sbb	eax, eax
add	eax, 7
jmp	loc_70BE26

loc_70BD38:
cmp	eax, 800h
jnb	short loc_70BD64
cmp	eax, 200h
jnb	short loc_70BD55
cmp	eax, 100h
sbb	eax, eax
add	eax, 9
jmp	loc_70BE26

loc_70BD55:
cmp	eax, 400h
sbb	eax, eax
add	eax, 0Bh
jmp	loc_70BE26

loc_70BD64:
cmp	eax, 2000h
jnb	short loc_70BD7A
cmp	eax, 1000h
sbb	eax, eax
add	eax, 0Dh
jmp	loc_70BE26

loc_70BD7A:
cmp	eax, 4000h
sbb	eax, eax
add	eax, 0Fh
jmp	loc_70BE26

loc_70BD89:
cmp	eax, (offset loc_7FFFFF+1)
jnb	short loc_70BDD5
cmp	eax, 80000h
jnb	short loc_70BDB6
cmp	eax, 20000h
jnb	short loc_70BDAA
cmp	eax, 10000h
sbb	eax, eax
add	eax, 11h
jmp	short loc_70BE26

loc_70BDAA:
cmp	eax, 40000h
sbb	eax, eax
add	eax, 13h
jmp	short loc_70BE26

loc_70BDB6:
cmp	eax, 200000h
jnb	short loc_70BDC9
cmp	eax, 100000h
sbb	eax, eax
add	eax, 15h
jmp	short loc_70BE26

loc_70BDC9:
cmp	eax, 400000h
sbb	eax, eax
add	eax, 17h
jmp	short loc_70BE26

loc_70BDD5:
cmp	eax, 8000000h
jnb	short loc_70BDFB
cmp	eax, 2000000h
jnb	short loc_70BDEF
cmp	eax, (offset sub_FFFFFF+1)
sbb	eax, eax
add	eax, 19h
jmp	short loc_70BE26

loc_70BDEF:
cmp	eax, 4000000h
sbb	eax, eax
add	eax, 1Bh
jmp	short loc_70BE26

loc_70BDFB:
cmp	eax, 20000000h
jnb	short loc_70BE0E
cmp	eax, 10000000h
sbb	eax, eax
add	eax, 1Dh
jmp	short loc_70BE26

loc_70BE0E:
cmp	eax, 40000000h
jnb	short loc_70BE1C
mov	eax, 1Eh
jmp	short loc_70BE26

loc_70BE1C:
cmp	eax, 80000000h
sbb	eax, eax
add	eax, 20h

loc_70BE26:
cmp	byte ptr [esi+35h], 0
movzx	eax, al
jz	short loc_70BE48
mov	ecx, [esp+18h+arg_0]
push	1
push	1
call	sub_70A0B0
mov	[esp+18h+var_4], eax
mov	byte ptr [eax],	0
jmp	loc_70C16A

loc_70BE48:
cmp	eax, 8
ja	loc_70BF52
cmp	byte ptr [esi+34h], 10h
ja	loc_70BF52
cmp	[esi+28h], ebp
ja	loc_70BF52
mov	bl, [esi+28h]
mov	eax, [esi+2Ch]
mov	ecx, [esi+30h]
dec	bl
push	2
lea	edx, [ecx+eax*2]
mov	ecx, [esp+1Ch+arg_0]
and	bl, 3
push	1
lea	eax, ds:4[edx*4]
add	bl, bl
push	eax
or	bl, 1
mov	[esp+24h+var_6], 0
call	sub_70BC10
mov	cl, [esi]
mov	ebp, eax
mov	[ebp+1], cl
mov	dl, [esi+4]
mov	[ebp+2], dl
mov	al, [esi+8]
mov	[ebp+3], al
mov	dx, [esi+0Ch]
lea	ecx, [ebp+5]
and	ecx, 0FFFFFFFEh
mov	[ecx], dx
mov	ax, [esi+10h]
add	ecx, 2
mov	[ecx], ax
add	ecx, 2
cmp	dword ptr [esi+28h], 0
mov	[esp+18h+var_4], ebp
mov	[esp+18h+var_7], 1
mov	[esp+18h+var_5], 0
jbe	short loc_70BF3C
xor	edi, edi

loc_70BED7:
mov	edx, [esi+1Ch]
lea	edi, [edi+edi*4]
add	edi, edi
add	edi, edi
cmp	byte ptr [edx+edi+10h],	0
lea	eax, [edx+edi]
jnz	short loc_70BF0A
movzx	eax, word ptr [eax]
mov	[ecx], ax
mov	edx, [esi+1Ch]
movzx	eax, word ptr [edx+edi+4]
mov	dl, [esp+18h+var_7]
add	ecx, 2
mov	[ecx], ax
add	ecx, 2
or	[esp+18h+var_6], dl

loc_70BF0A:
mov	eax, [esi+1Ch]
movzx	edx, word ptr [eax+edi+8]
shl	[esp+18h+var_7], 1
mov	[ecx], dx
mov	eax, [esi+1Ch]
movzx	edx, word ptr [eax+edi+0Ch]
mov	al, [esp+18h+var_5]
inc	al
add	ecx, 2
movzx	edi, al
mov	[ecx], dx
add	ecx, 2
mov	[esp+18h+var_5], al
cmp	edi, [esi+28h]
jb	short loc_70BED7

loc_70BF3C:
mov	al, [esp+18h+var_6]
and	al, 0Fh
add	al, al
add	al, al
add	al, al
or	al, bl
mov	[ebp+0], al
jmp	loc_70C16A

loc_70BF52:
mov	edi, 1
cmp	eax, 8
ja	short loc_70BF60
mov	bl, 2
jmp	short loc_70BF72

loc_70BF60:
cmp	eax, 10h
ja	short loc_70BF6E
mov	bl, 4
mov	edi, 2
jmp	short loc_70BF72

loc_70BF6E:
mov	bl, 6
mov	edi, ebp

loc_70BF72:
xor	ecx, ecx
cmp	byte ptr [esi+34h], 10h
ja	short loc_70BF88
cmp	dword ptr [esi+28h], 0FFFFh
ja	short loc_70BF88
lea	ebp, [ecx+2]
jmp	short loc_70BF8B

loc_70BF88:
or	bl, 8

loc_70BF8B:
mov	eax, [esi+28h]
cmp	eax, 10h
jnb	short loc_70BF9C
mov	dl, al
shl	dl, 4
or	bl, dl
jmp	short loc_70BF9E

loc_70BF9C:
mov	ecx, ebp

loc_70BF9E:
cmp	byte ptr [esi+34h], 10h
ja	short loc_70BFAF
add	eax, 0Fh
shr	eax, 4
lea	eax, [ecx+eax*2]
jmp	short loc_70BFB8

loc_70BFAF:
add	eax, 1Fh
shr	eax, 5
lea	eax, [ecx+eax*4]

loc_70BFB8:
mov	edx, [esi+30h]
mov	ecx, [esi+2Ch]
lea	ecx, [edx+ecx*2+1]
imul	ecx, ebp
push	ebp
lea	edx, [eax+ecx*2]
mov	ecx, [esp+1Ch+arg_0]
push	edi
push	edx
call	sub_70BC10
lea	ecx, [edi+eax]
mov	[esp+18h+var_4], eax
mov	[eax], bl
lea	eax, [edi-1]
not	eax
and	ecx, eax
mov	eax, edi
sub	eax, 1
jz	short loc_70C01F
sub	eax, 1
jz	short loc_70C007
sub	eax, 2
jnz	short loc_70C031
mov	edx, [esi]
mov	[ecx], edx
mov	eax, [esi+4]
mov	[ecx+4], eax
mov	edx, [esi+8]
mov	[ecx+8], edx
jmp	short loc_70C031

loc_70C007:
movzx	eax, word ptr [esi]
mov	[ecx], ax
mov	dx, [esi+4]
mov	[ecx+2], dx
movzx	eax, word ptr [esi+8]
mov	[ecx+4], ax
jmp	short loc_70C031

loc_70C01F:
movzx	edx, byte ptr [esi]
mov	[ecx], dl
mov	al, [esi+4]
mov	[ecx+1], al
movzx	edx, byte ptr [esi+8]
mov	[ecx+2], dl

loc_70C031:
lea	edi, [edi+edi*2]
cmp	ebp, 2
jnz	loc_70C0DD
lea	ecx, [edi+ecx+1]
and	ecx, 0FFFFFFFEh
cmp	dword ptr [esi+28h], 10h
jb	short loc_70C053
mov	ax, [esi+28h]
mov	[ecx], ax
add	ecx, ebp

loc_70C053:
mov	dx, [esi+0Ch]
mov	[ecx], dx
mov	ax, [esi+10h]
add	ecx, 2
mov	[ecx], ax
xor	ebx, ebx
add	ecx, 2
xor	ebp, ebp
xor	edi, edi
cmp	[esi+28h], ebx
jbe	loc_70C16A
xor	edx, edx

loc_70C078:
test	bl, 0Fh
jnz	short loc_70C08B
mov	ebp, ecx
add	ecx, 2
xor	eax, eax
mov	[ebp+0], ax
lea	edi, [eax+1]

loc_70C08B:
mov	eax, [esi+1Ch]
add	eax, edx
cmp	byte ptr [eax+10h], 0
jnz	short loc_70C0B1
movzx	eax, word ptr [eax]
mov	[ecx], ax
mov	eax, [esi+1Ch]
movzx	eax, word ptr [eax+edx+4]
add	ecx, 2
mov	[ecx], ax
add	ecx, 2
or	[ebp+0], di

loc_70C0B1:
mov	eax, [esi+1Ch]
movzx	eax, word ptr [eax+edx+8]
mov	[ecx], ax
mov	eax, [esi+1Ch]
movzx	eax, word ptr [eax+edx+0Ch]
add	ecx, 2
mov	[ecx], ax
inc	ebx
add	ecx, 2
add	edx, 14h
add	edi, edi
cmp	ebx, [esi+28h]
jb	short loc_70C078
jmp	loc_70C16A

loc_70C0DD:
mov	eax, [esi+28h]
add	edi, ecx
lea	ecx, [edi+ebp-1]
dec	ebp
not	ebp
and	ecx, ebp
cmp	eax, 10h
jb	short loc_70C0F5
mov	[ecx], eax
add	ecx, 4

loc_70C0F5:
mov	edx, [esi+0Ch]
mov	[ecx], edx
mov	eax, [esi+10h]
add	ecx, 4
mov	[ecx], eax
xor	ebx, ebx
add	ecx, 4
xor	edi, edi
xor	ebp, ebp
cmp	[esi+28h], ebx
jbe	short loc_70C16A
xor	edx, edx

loc_70C112:
test	bl, 1Fh
jnz	short loc_70C127
mov	edi, ecx
add	ecx, 4
mov	dword ptr [edi], 0
mov	ebp, 1

loc_70C127:
mov	eax, [esi+1Ch]
add	eax, edx
cmp	byte ptr [eax+10h], 0
jnz	short loc_70C147
mov	eax, [eax]
mov	[ecx], eax
mov	eax, [esi+1Ch]
mov	eax, [eax+edx+4]
add	ecx, 4
mov	[ecx], eax
add	ecx, 4
or	[edi], ebp

loc_70C147:
mov	eax, [esi+1Ch]
mov	eax, [eax+edx+8]
mov	[ecx], eax
mov	eax, [esi+1Ch]
mov	eax, [eax+edx+0Ch]
add	ecx, 4
mov	[ecx], eax
inc	ebx
add	ecx, 4
add	edx, 14h
add	ebp, ebp
cmp	ebx, [esi+28h]
jb	short loc_70C112

loc_70C16A:
mov	eax, [esp+18h+arg_4]
xor	edx, edx
cmp	eax, edx
jz	short loc_70C199
cmp	[eax], edx
jnz	short loc_70C18D
mov	ecx, [esp+18h+var_4]
mov	ebx, [esp+18h+arg_0]
mov	di, cx
sub	di, [ebx+4]
mov	[eax], ecx
mov	[eax+0Ch], di

loc_70C18D:
cmp	byte ptr [esi+35h], 0
jz	short loc_70C196
inc	dword ptr [eax+8]

loc_70C196:
inc	dword ptr [eax+4]

loc_70C199:
pop	edi
mov	[esi+2Ch], edx
mov	[esi+30h], edx
mov	[esi+28h], edx
mov	byte ptr [esi+35h], 0
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_70BCD0 endp




sub_70C1B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_8]
push	esi
push	edi
mov	edi, ecx
mov	cl, [edi+34h]
movzx	esi, cl
mov	[edi+14h], eax
mov	[edi+0Ch], eax
mov	[edi+18h], edx
mov	[edi+10h], edx
cmp	ebx, esi
jbe	short loc_70C1E0
mov	[edi+34h], bl
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_70C1E0:
test	ebx, ebx
jnz	loc_70C352
test	eax, eax
jnz	short loc_70C1F0
xor	esi, esi
jmp	short loc_70C1F7

loc_70C1F0:
jge	short loc_70C1F4
neg	eax

loc_70C1F4:
lea	esi, [eax+eax]

loc_70C1F7:
test	edx, edx
jnz	short loc_70C1FF
xor	eax, eax
jmp	short loc_70C206

loc_70C1FF:
jge	short loc_70C203
neg	edx

loc_70C203:
lea	eax, [edx+edx]

loc_70C206:
or	eax, esi
cmp	eax, 8000h
jnb	loc_70C2AC
cmp	eax, 80h
jnb	short loc_70C25B
cmp	eax, 8
jnb	short loc_70C23C
cmp	eax, 2
jnb	short loc_70C22F
cmp	eax, 1
sbb	eax, eax
inc	eax
jmp	loc_70C349

loc_70C22F:
cmp	eax, 4
sbb	eax, eax
add	eax, 3
jmp	loc_70C349

loc_70C23C:
cmp	eax, 20h
jnb	short loc_70C24E
cmp	eax, 10h
sbb	eax, eax
add	eax, 5
jmp	loc_70C349

loc_70C24E:
cmp	eax, 40h
sbb	eax, eax
add	eax, 7
jmp	loc_70C349

loc_70C25B:
cmp	eax, 800h
jnb	short loc_70C287
cmp	eax, 200h
jnb	short loc_70C278
cmp	eax, 100h
sbb	eax, eax
add	eax, 9
jmp	loc_70C349

loc_70C278:
cmp	eax, 400h
sbb	eax, eax
add	eax, 0Bh
jmp	loc_70C349

loc_70C287:
cmp	eax, 2000h
jnb	short loc_70C29D
cmp	eax, 1000h
sbb	eax, eax
add	eax, 0Dh
jmp	loc_70C349

loc_70C29D:
cmp	eax, 4000h
sbb	eax, eax
add	eax, 0Fh
jmp	loc_70C349

loc_70C2AC:
cmp	eax, (offset loc_7FFFFF+1)
jnb	short loc_70C2F8
cmp	eax, 80000h
jnb	short loc_70C2D9
cmp	eax, 20000h
jnb	short loc_70C2CD
cmp	eax, 10000h
sbb	eax, eax
add	eax, 11h
jmp	short loc_70C349

loc_70C2CD:
cmp	eax, 40000h
sbb	eax, eax
add	eax, 13h
jmp	short loc_70C349

loc_70C2D9:
cmp	eax, 200000h
jnb	short loc_70C2EC
cmp	eax, 100000h
sbb	eax, eax
add	eax, 15h
jmp	short loc_70C349

loc_70C2EC:
cmp	eax, 400000h
sbb	eax, eax
add	eax, 17h
jmp	short loc_70C349

loc_70C2F8:
cmp	eax, 8000000h
jnb	short loc_70C31E
cmp	eax, 2000000h
jnb	short loc_70C312
cmp	eax, (offset sub_FFFFFF+1)
sbb	eax, eax
add	eax, 19h
jmp	short loc_70C349

loc_70C312:
cmp	eax, 4000000h
sbb	eax, eax
add	eax, 1Bh
jmp	short loc_70C349

loc_70C31E:
cmp	eax, 20000000h
jnb	short loc_70C331
cmp	eax, 10000000h
sbb	eax, eax
add	eax, 1Dh
jmp	short loc_70C349

loc_70C331:
cmp	eax, 40000000h
jnb	short loc_70C33F
mov	eax, 1Eh
jmp	short loc_70C349

loc_70C33F:
cmp	eax, 80000000h
sbb	eax, eax
add	eax, 20h

loc_70C349:
cmp	cl, al
jb	short loc_70C34F
mov	al, cl

loc_70C34F:
mov	[edi+34h], al

loc_70C352:
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_70C1B0 endp

align 10h



sub_70C360 proc	near
push	esi
mov	esi, [ecx+28h]
movzx	eax, byte ptr [esi]
shr	eax, 3
push	edi
mov	edi, 0
and	eax, 3
add	eax, 1
mov	edx, edi
mov	ecx, edx
jz	short loc_70C392
push	ebx
lea	ecx, [ecx+0]

loc_70C380:
movzx	ebx, byte ptr [edx+esi+1]
shl	ebx, cl
inc	edx
add	ecx, 8
or	edi, ebx
cmp	edx, eax
jb	short loc_70C380
pop	ebx

loc_70C392:
xor	eax, eax
mov	ecx, edi
test	edi, edi
jz	short loc_70C3B5
lea	ebx, [ebx+0]

loc_70C3A0:
movzx	edx, byte ptr [esi+ecx-1]
dec	ecx
mov	edi, eax
shl	edi, 5
add	edi, eax
xor	edx, edi
mov	eax, edx
test	ecx, ecx
jnz	short loc_70C3A0

loc_70C3B5:
pop	edi
pop	esi
retn
sub_70C360 endp

align 10h



sub_70C3C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
push	eax
mov	eax, [ecx+28h]
push	edx
push	eax
call	sub_70B050
add	esp, 0Ch
retn	8
sub_70C3C0 endp

align 10h



sub_70C3E0 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+20h], 1
jz	short loc_70C3FD
lea	esp, [esp+0]

loc_70C3F0:
mov	ecx, esi
call	sub_70A280
cmp	byte ptr [esi+20h], 3
jz	short loc_70C3F0

loc_70C3FD:
pop	esi
retn
sub_70C3E0 endp

align 10h



sub_70C400 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	[edi], esi
mov	dword ptr [edi+4], 0
mov	al, [esi+20h]
test	al, al
js	short loc_70C42D
cmp	al, 1
jz	short loc_70C42D
lea	esp, [esp+0]

loc_70C420:
mov	ecx, esi
call	sub_70A280
cmp	byte ptr [esi+20h], 3
jz	short loc_70C420

loc_70C42D:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_70C400 endp

align 10h



sub_70C440 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx+4]
push	ebp
xor	ebp, ebp
push	edi
mov	[eax], edx
mov	[eax+4], ebp
fld	dword ptr [ecx+20h]
mov	edi, edx
fstp	dword ptr [eax+24h]
mov	dword ptr [eax+18h], 1
cmp	edi, ebp
jnz	short loc_70C476
pop	edi
mov	[eax+8], ebp
mov	[eax+14h], ebp
mov	[eax+1Ch], ebp
mov	[eax+20h], ebp
pop	ebp
retn	4

loc_70C476:
mov	dl, [edi]
test	dl, 1
jz	short loc_70C4BA
movzx	ecx, dl
mov	edx, ecx
shr	ecx, 3
and	ecx, 0Fh
shr	edx, 1
mov	[eax+14h], ecx
and	edx, 3
inc	edx
lea	ecx, [edi+5]
and	ecx, 0FFFFFFFEh
mov	[eax+1Ch], ecx
mov	[eax+8], edx
movsx	edx, word ptr [ecx]
add	ecx, 2
mov	[eax+1Ch], ecx
mov	[eax+0Ch], edx
movsx	edx, word ptr [ecx]
add	ecx, 2
pop	edi
mov	[eax+10h], edx
mov	[eax+1Ch], ecx
pop	ebp
retn	4

loc_70C4BA:
test	dl, 8
mov	ecx, ebp
setnz	cl
push	esi
lea	ecx, [ecx+ecx+2]
mov	esi, ecx
mov	cl, dl
shr	cl, 1
and	cl, 3
jnz	short loc_70C4DB
pop	esi
pop	edi
mov	[eax+8], ebp
pop	ebp
retn	4

loc_70C4DB:
movzx	ecx, cl
add	edi, ecx
push	ebx
lea	ebx, [ecx-1]
mov	ecx, ds:dword_143F714[ecx*4]
not	ebx
and	edi, ebx
add	edi, esi
lea	ecx, [ecx+ecx*2]
lea	ecx, [ecx+edi-1]
lea	edi, [esi-1]
movzx	edx, dl
not	edi
shr	edx, 4
and	ecx, edi
mov	[eax+8], edx
pop	ebx
cmp	esi, 2
jnz	short loc_70C551
mov	[eax+1Ch], ecx
cmp	edx, ebp
jnz	short loc_70C521
movzx	edx, word ptr [ecx]
add	ecx, 2
mov	[eax+8], edx
mov	[eax+1Ch], ecx

loc_70C521:
mov	ecx, [eax+1Ch]
movsx	edx, word ptr [ecx]
add	ecx, 2
mov	[eax+1Ch], ecx
mov	[eax+0Ch], edx
movsx	edx, word ptr [ecx]
add	ecx, 2
mov	[eax+1Ch], ecx
mov	[eax+10h], edx
movzx	edx, word ptr [ecx]
pop	esi
add	ecx, 2
pop	edi
mov	[eax+20h], ebp
mov	[eax+1Ch], ecx
mov	[eax+14h], edx
pop	ebp
retn	4

loc_70C551:
mov	[eax+20h], ecx
cmp	edx, ebp
jnz	short loc_70C563
mov	edx, [ecx]
add	ecx, 4
mov	[eax+8], edx
mov	[eax+20h], ecx

loc_70C563:
mov	ecx, [eax+20h]
mov	edx, [ecx]
add	ecx, 4
mov	[eax+20h], ecx
mov	[eax+0Ch], edx
mov	edx, [ecx]
add	ecx, 4
mov	[eax+20h], ecx
pop	esi
mov	[eax+10h], edx
mov	edx, [ecx]
add	ecx, 4
pop	edi
mov	[eax+1Ch], ebp
mov	[eax+20h], ecx
mov	[eax+14h], edx
pop	ebp
retn	4
sub_70C440 endp




sub_70C590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx+4]
mov	cl, [eax]
test	cl, 1
jnz	short loc_70C5FD
mov	dl, cl
and	dl, 6
cmp	dl, 2
jz	short loc_70C5FD
test	cl, 7
jz	short locret_70C61D
cmp	dl, 4
jnz	short loc_70C5D7
mov	edx, [esp+arg_0]
add	eax, 2
and	eax, 0FFFFFFFEh
movzx	ecx, word ptr [eax]
mov	[edx], ecx
movzx	ecx, word ptr [eax+2]
mov	edx, [esp+arg_4]
add	eax, 2
mov	[edx], ecx
movzx	eax, word ptr [eax+2]
mov	ecx, [esp+arg_8]
mov	[ecx], eax
retn	0Ch

loc_70C5D7:
mov	ecx, [esp+arg_0]
add	eax, 4
and	eax, 0FFFFFFFCh
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	ecx, [esp+arg_4]
add	eax, 4
mov	[ecx], edx
mov	edx, [eax+4]
mov	eax, [esp+arg_8]
mov	[eax], edx
retn	0Ch

loc_70C5FD:
movzx	ecx, byte ptr [eax+1]
mov	edx, [esp+arg_0]
inc	eax
mov	[edx], ecx
movzx	ecx, byte ptr [eax+1]
mov	edx, [esp+arg_4]
inc	eax
mov	[edx], ecx
movzx	eax, byte ptr [eax+1]
mov	ecx, [esp+arg_8]
mov	[ecx], eax

locret_70C61D:
retn	0Ch
sub_70C590 endp




sub_70C620 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, [edx+4]
cmp	eax, [edx+8]
jb	short locret_70C667
mov	eax, [edx+1Ch]
test	eax, eax
jnz	short loc_70C636
mov	eax, [edx+20h]

loc_70C636:
mov	edx, [ecx+8]
inc	dword ptr [ecx+18h]
push	esi
movzx	esi, word ptr [ecx+14h]
sub	edx, esi
mov	[ecx+4], eax
sub	eax, edx
sub	eax, 8
cmp	eax, [edx+4]
pop	esi
jl	short locret_70C667
mov	edx, [edx]
test	edx, edx
jz	short loc_70C66A
lea	eax, [edx+8]
mov	[ecx+4], eax
mov	[ecx+8], eax
sub	ax, dx
mov	[ecx+14h], ax

locret_70C667:
retn	4

loc_70C66A:
mov	dword ptr [ecx+4], 0
retn	4
sub_70C620 endp

align 10h



sub_70C680 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [ecx+4]
mov	al, [esi]
push	edi
xor	edi, edi
mov	[esp+14h+var_4], ecx
mov	ebp, 1
test	al, 1
jz	short loc_70C6E8
movzx	edx, al
mov	eax, edx
shr	edx, 3
and	edx, 0Fh
shr	eax, 1
mov	ebx, edx
and	eax, 3
lea	edx, [esi+5]
and	edx, 0FFFFFFFEh
inc	eax
add	edx, 4

loc_70C6B5:
test	edx, edx
jz	loc_70C768
test	eax, eax
jbe	loc_70C795

loc_70C6C5:
cmp	ebp, 8000h
jbe	short loc_70C6D8
movsx	ebx, word ptr [edx]
add	edx, 2
mov	ebp, 1

loc_70C6D8:
test	ebx, ebp
jz	loc_70C787
add	edx, 8
jmp	loc_70C78A

loc_70C6E8:
test	al, 8
mov	ebx, edi
setnz	bl
mov	dl, al
shr	dl, 1
and	dl, 3
lea	ebx, [ebx+ebx+2]
jnz	short loc_70C706
inc	esi
pop	edi
mov	[ecx+4], esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn

loc_70C706:
movzx	edx, dl
add	esi, edx
lea	ecx, [edx-1]
mov	edx, ds:dword_143F714[edx*4]
not	ecx
and	esi, ecx
lea	edx, [edx+edx*2]
add	esi, ebx
lea	ecx, [ebx-1]
movzx	eax, al
lea	edx, [edx+esi-1]
not	ecx
and	edx, ecx
shr	eax, 4
cmp	ebx, 2
jnz	short loc_70C750
test	eax, eax
jnz	short loc_70C73D
movzx	eax, word ptr [edx]
add	edx, ebx

loc_70C73D:
movzx	ebx, word ptr [edx+4]
mov	ecx, [esp+14h+var_4]
add	edx, 4
add	edx, 2
jmp	loc_70C6B5

loc_70C750:
mov	edi, edx
test	eax, eax
jnz	short loc_70C75B
mov	eax, [edx]
lea	edi, [edx+4]

loc_70C75B:
mov	ebx, [edi+8]
mov	ecx, [esp+14h+var_4]
add	edi, 8
add	edi, 4

loc_70C768:
test	eax, eax
jbe	short loc_70C7A4
lea	esp, [esp+0]

loc_70C770:
test	ebp, ebp
jnz	short loc_70C77E
mov	ebx, [edi]
add	edi, 4
mov	ebp, 1

loc_70C77E:
test	ebx, ebp
jz	short loc_70C79A
add	edi, 10h
jmp	short loc_70C79D

loc_70C787:
add	edx, 4

loc_70C78A:
add	ebp, ebp
sub	eax, 1
jnz	loc_70C6C5

loc_70C795:
mov	[ecx+4], edx
jmp	short loc_70C7A7

loc_70C79A:
add	edi, 8

loc_70C79D:
add	ebp, ebp
sub	eax, 1
jnz	short loc_70C770

loc_70C7A4:
mov	[ecx+4], edi

loc_70C7A7:
movzx	edx, word ptr [ecx+14h]
mov	eax, [ecx+8]
inc	dword ptr [ecx+18h]
sub	eax, edx
mov	edx, [ecx+4]
sub	edx, eax
sub	edx, 8
cmp	edx, [eax+4]
jl	short loc_70C7D6
mov	eax, [eax]
test	eax, eax
jz	short loc_70C7DC
lea	edx, [eax+8]
mov	[ecx+4], edx
mov	[ecx+8], edx
sub	dx, ax
mov	[ecx+14h], dx

loc_70C7D6:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn

loc_70C7DC:
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ecx+4], 0
pop	ebx
pop	ecx
retn
sub_70C680 endp

align 10h



sub_70C7F0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	edx, [ebx]
lea	ecx, [eax+eax*2]
push	esi
lea	esi, [edx+ecx*8-18h]
test	eax, eax
jbe	short loc_70C81A
push	edi
mov	edi, eax

loc_70C807:
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
sub	esi, 18h
sub	edi, 1
jnz	short loc_70C807
pop	edi

loc_70C81A:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
retn
sub_70C7F0 endp

align 10h



sub_70C830 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_70C860
mov	eax, [edi]
test	eax, eax
jz	short loc_70C855
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_70C855:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_70C860:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_70C895
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*2]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_70C895:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*2]
add	eax, eax
add	eax, eax
mov	[esp+0Ch+arg_4], 103h
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_70C830 endp

align 10h



sub_70C8C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+18h]
cmp	eax, [esi+1Ch]
jnb	short loc_70C90F
mov	eax, [esi+4]
test	byte ptr [eax],	7
jnz	short loc_70C8D9
inc	eax
mov	[esi+4], eax
jmp	short loc_70C8DE

loc_70C8D9:
call	sub_70C680

loc_70C8DE:
movzx	ecx, word ptr [esi+14h]
mov	eax, [esi+8]
mov	edx, [esi+4]
inc	dword ptr [esi+18h]
sub	eax, ecx
sub	edx, eax
sub	edx, 8
cmp	edx, [eax+4]
jl	short loc_70C90F
mov	eax, [eax]
test	eax, eax
jz	short loc_70C911
lea	ecx, [eax+8]
mov	[esi+4], ecx
mov	edx, ecx
sub	cx, ax
mov	[esi+8], edx
mov	[esi+14h], cx

loc_70C90F:
pop	esi
retn

loc_70C911:
mov	dword ptr [esi+4], 0
pop	esi
retn
sub_70C8C0 endp

align 10h



sub_70C920 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [ecx+4]
fstp	dword ptr [eax]
fld	dword ptr [ecx+8]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+0Ch]
retn	4
sub_70C920 endp

align 10h



sub_70C940 proc	near
push	1		; Value
add	ecx, 14h
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
retn
sub_70C940 endp

align 10h



; int __stdcall	sub_70C950(int,	float)
sub_70C950 proc	near

var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 9Ch
push	ebx
mov	ebx, [esp+0A0h+arg_4]
push	ebp
mov	ebp, [esp+0A4h+arg_0]
mov	eax, [ebp+4]
fld	dword ptr [eax]
push	esi
fstp	[esp+0A8h+var_88]
push	edi
fld	dword ptr [eax+4]
mov	[esp+0ACh+var_9C], ecx
fstp	[esp+0ACh+var_84]
lea	ecx, [esp+0ACh+var_88]
fld	dword ptr [eax+8]
fstp	[esp+0ACh+var_80]
fld	dword ptr [eax+0Ch]
fstp	[esp+0ACh+var_7C]
fld	dword ptr [eax+10h]
fstp	[esp+0ACh+var_78]
fld	dword ptr [eax+14h]
lea	eax, [ebx+44h]
push	eax
fstp	[esp+0B0h+var_74]
call	sub_64EAF0
mov	esi, [ebp+0]
mov	ecx, 8
lea	edi, [esp+0ACh+var_20]
rep movsd
lea	ecx, [ebx+24h]
push	ecx
lea	ecx, [esp+0B0h+var_20]
call	sub_68CE70
mov	ecx, ebx
call	sub_654DA0
fld	[esp+0ACh+var_88]
xor	edx, edx
fstp	[esp+0ACh+var_64]
mov	ecx, 8
fld	[esp+0ACh+var_84]
lea	esi, [esp+0ACh+var_20]
fstp	[esp+0ACh+var_60]
lea	edi, [esp+0ACh+var_4C]
fld	[esp+0ACh+var_80]
mov	[esp+0ACh+var_70], ebp
fstp	[esp+0ACh+var_5C]
mov	[esp+0ACh+var_6C], edx
fld	[esp+0ACh+var_7C]
mov	[esp+0ACh+var_68], edx
fstp	[esp+0ACh+var_58]
fld	[esp+0ACh+var_78]
fstp	[esp+0ACh+var_54]
fld	[esp+0ACh+var_74]
fstp	[esp+0ACh+var_50]
rep movsd
mov	esi, [esp+0ACh+var_9C]
mov	[esp+0ACh+var_2C], eax
mov	[esp+0ACh+var_28], edx
mov	[esp+0ACh+var_24], edx
cmp	[ebp+8], edx
jnz	loc_70CACE
test	byte ptr [esi+24h], 10h
jz	loc_70CACE
fldz
lea	edx, [esi+4]
fst	[esp+0ACh+var_98]
push	edx
fst	[esp+0B0h+var_94]
lea	eax, [esp+0B0h+var_98]
fst	[esp+0B0h+var_90]
push	eax
lea	ecx, [esp+0B4h+var_64]
fstp	[esp+0B4h+var_8C]
call	sub_64EF10
mov	edx, [ebx]
mov	eax, [edx+54h]
mov	ecx, ebx
call	eax
mov	ecx, eax
fld	dword ptr [ecx+9Ch]
add	ecx, 90h
fld	[esp+0ACh+var_94]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_70CAC0
fld	[esp+0ACh+var_8C]
fld	dword ptr [ecx+4]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_70CAC0
fld	[esp+0ACh+var_90]
fld	dword ptr [ecx]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_70CAC0
fld	dword ptr [ecx+8]
fld	[esp+0ACh+var_98]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_70CACC

loc_70CAC0:
mov	ecx, [ebp+48h]
test	dword ptr [ecx+14h], 100h
jz	short loc_70CB11

loc_70CACC:
xor	edx, edx

loc_70CACE:
test	byte ptr [esi+24h], 40h
jz	short loc_70CAF9
mov	edx, [esi]
mov	edx, [edx+30h]
lea	eax, [esp+0ACh+var_24]
push	eax
lea	ecx, [esp+0B0h+var_68]
push	ecx
lea	eax, [esp+0B4h+var_28]
push	eax
lea	ecx, [esp+0B8h+var_6C]
push	ecx
mov	ecx, esi
call	edx
xor	edx, edx

loc_70CAF9:
cmp	[ebx+74h], dx
push	ebx		; float
setnbe	al
movzx	ecx, al
push	ecx		; char
lea	edx, [esp+0B4h+var_70]
push	edx		; int
mov	ecx, esi
call	sub_70B610

loc_70CB11:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 9Ch
retn	8
sub_70C950 endp

align 10h



sub_70CB20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	[esi], edi
mov	eax, [edi+28h]
xor	ecx, ecx
mov	[esi+4], eax
mov	dword ptr [esi+8], 0FFFFFFFFh
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	[esi+20h], cl
cmp	[esi+4], ecx
jz	loc_70CE7F
push	ebx
lea	ebx, [ecx+1]
cmp	[esi+10h], ecx
jz	short loc_70CB57
add	[esi+0Ch], ebx

loc_70CB57:
mov	eax, [esi+0Ch]
mov	edx, [esi+4]
mov	[esi+10h], ecx
mov	dl, [eax+edx]
inc	eax
mov	[esi+0Ch], eax
mov	[esi+70h], dl
test	byte ptr [edi+24h], 2
jz	short loc_70CB7E
fld	ds:dword_156F414
or	dl, 80h
mov	[esi+70h], dl
jmp	short loc_70CB80

loc_70CB7E:
fld1

loc_70CB80:
movzx	eax, byte ptr [esi+70h]
fstp	dword ptr [esi+6Ch]
shr	eax, 3
and	eax, 3
add	eax, ebx
cmp	[esi+10h], ecx
jz	short loc_70CB97
add	[esi+0Ch], ebx

loc_70CB97:
add	[esi+0Ch], eax
mov	[esi+10h], ecx
test	byte ptr [esi+70h], 1
jz	short loc_70CBD6
cmp	ecx, ecx
jz	short loc_70CBAA
add	[esi+0Ch], ebx

loc_70CBAA:
mov	eax, [esi+0Ch]
mov	edx, [esi+4]
add	edx, eax
mov	[esi+10h], ecx
movzx	di, byte ptr [edx+1]
movzx	dx, byte ptr [edx]
shl	di, 8
or	di, dx
movzx	edx, di
add	eax, 2
mov	[esi+0Ch], eax
movzx	eax, dx
mov	[esi+3Ch], eax
jmp	short loc_70CBD9

loc_70CBD6:
mov	[esi+3Ch], ecx

loc_70CBD9:
test	byte ptr [esi+70h], 2
jz	short loc_70CC13
cmp	[esi+10h], ecx
jz	short loc_70CBE7
add	[esi+0Ch], ebx

loc_70CBE7:
mov	eax, [esi+0Ch]
mov	edx, [esi+4]
add	edx, eax
mov	[esi+10h], ecx
movzx	di, byte ptr [edx+1]
movzx	dx, byte ptr [edx]
shl	di, 8
or	di, dx
movzx	edx, di
add	eax, 2
mov	[esi+0Ch], eax
movzx	eax, dx
mov	[esi+40h], eax
jmp	short loc_70CC16

loc_70CC13:
mov	[esi+40h], ecx

loc_70CC16:
mov	[esi+38h], ecx
mov	[esi+34h], ecx
mov	eax, [esi+10h]
mov	ebx, 6
cmp	eax, 7		; switch 8 cases
ja	loc_70CD2D	; default
jmp	ds:off_70CEC0[eax*4] ; switch jump

loc_70CC34:		; jumptable 0070CC2D case 0
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 4
mov	dword ptr [esi+10h], 4
jmp	loc_70CD2F

loc_70CC4D:		; jumptable 0070CC2D case 1
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 3
and	eax, 0Fh
mov	dword ptr [esi+10h], 5
jmp	loc_70CD2F

loc_70CC69:		; jumptable 0070CC2D case 2
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 2
and	eax, 0Fh
mov	[esi+10h], ebx
jmp	loc_70CD2F

loc_70CC81:		; jumptable 0070CC2D case 3
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 1
and	eax, 0Fh
mov	dword ptr [esi+10h], 7
jmp	loc_70CD2F

loc_70CC9C:		; jumptable 0070CC2D case 4
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
and	eax, 0Fh
inc	edx
mov	[esi+10h], ecx
mov	[esi+0Ch], edx
jmp	short loc_70CD2F

loc_70CCB2:		; jumptable 0070CC2D case 5
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
lea	edi, [edx+eax]
movzx	eax, byte ptr [edi+1]
movzx	edi, byte ptr [edi]
and	edi, 7
shr	eax, 7
add	edi, edi
or	eax, edi
inc	edx
mov	dword ptr [esi+10h], 1
mov	[esi+0Ch], edx
jmp	short loc_70CD2F

loc_70CCD9:		; jumptable 0070CC2D case 6
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
lea	edi, [edx+eax]
movzx	eax, byte ptr [edi+1]
movzx	edi, byte ptr [edi]
and	edi, 3
add	edi, edi
shr	eax, 6
add	edi, edi
or	eax, edi
inc	edx
mov	dword ptr [esi+10h], 2
mov	[esi+0Ch], edx
jmp	short loc_70CD2F

loc_70CD02:		; jumptable 0070CC2D case 7
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
lea	edi, [edx+eax]
movzx	eax, byte ptr [edi+1]
movzx	edi, byte ptr [edi]
and	edi, 1
add	edi, edi
add	edi, edi
shr	eax, 5
add	edi, edi
or	eax, edi
inc	edx
mov	dword ptr [esi+10h], 3
mov	[esi+0Ch], edx
jmp	short loc_70CD2F

loc_70CD2D:		; default
xor	eax, eax

loc_70CD2F:
mov	[esi+44h], eax
mov	eax, [esi+10h]
cmp	eax, 7		; switch 8 cases
ja	loc_70CE3E	; default
jmp	ds:off_70CEE0[eax*4] ; switch jump

loc_70CD45:		; jumptable 0070CD3E case 0
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 4
mov	dword ptr [esi+10h], 4
jmp	loc_70CE40

loc_70CD5E:		; jumptable 0070CD3E case 1
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 3
and	eax, 0Fh
mov	dword ptr [esi+10h], 5
jmp	loc_70CE40

loc_70CD7A:		; jumptable 0070CD3E case 2
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 2
and	eax, 0Fh
mov	[esi+10h], ebx
jmp	loc_70CE40

loc_70CD92:		; jumptable 0070CD3E case 3
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
shr	eax, 1
and	eax, 0Fh
mov	dword ptr [esi+10h], 7
jmp	loc_70CE40

loc_70CDAD:		; jumptable 0070CD3E case 4
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
movzx	eax, byte ptr [edx+eax]
and	eax, 0Fh
inc	edx
mov	[esi+10h], ecx
mov	[esi+0Ch], edx
jmp	short loc_70CE40

loc_70CDC3:		; jumptable 0070CD3E case 5
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
lea	edi, [edx+eax]
movzx	eax, byte ptr [edi+1]
movzx	edi, byte ptr [edi]
and	edi, 7
shr	eax, 7
add	edi, edi
or	eax, edi
inc	edx
mov	dword ptr [esi+10h], 1
mov	[esi+0Ch], edx
jmp	short loc_70CE40

loc_70CDEA:		; jumptable 0070CD3E case 6
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
lea	edi, [edx+eax]
movzx	eax, byte ptr [edi+1]
movzx	edi, byte ptr [edi]
and	edi, 3
add	edi, edi
shr	eax, 6
add	edi, edi
or	eax, edi
inc	edx
mov	dword ptr [esi+10h], 2
mov	[esi+0Ch], edx
jmp	short loc_70CE40

loc_70CE13:		; jumptable 0070CD3E case 7
mov	edx, [esi+0Ch]
mov	eax, [esi+4]
lea	edi, [edx+eax]
movzx	eax, byte ptr [edi+1]
movzx	edi, byte ptr [edi]
and	edi, 1
add	edi, edi
add	edi, edi
shr	eax, 5
add	edi, edi
or	eax, edi
inc	edx
mov	dword ptr [esi+10h], 3
mov	[esi+0Ch], edx
jmp	short loc_70CE40

loc_70CE3E:		; default
xor	eax, eax

loc_70CE40:
cmp	byte ptr [esi+20h], 1
mov	[esi+48h], eax
mov	[esi+30h], ecx
mov	[esi+2Ch], ecx
mov	[esi+4Ch], ecx
mov	[esi+50h], ecx
mov	[esi+1Ch], ecx
mov	[esi+18h], ecx
mov	[esi+14h], ecx
mov	[esi+28h], ecx
mov	[esi+24h], ecx
pop	ebx
jz	short loc_70CEB8

loc_70CE65:
mov	ecx, esi
call	sub_70A280
cmp	byte ptr [esi+20h], 3
jnz	short loc_70CEB8
cmp	byte ptr [esi+20h], 1
jnz	short loc_70CE65
pop	edi
mov	eax, esi
pop	esi
retn	4

loc_70CE7F:
fld1
mov	byte ptr [esi+20h], 1
fstp	dword ptr [esi+6Ch]
mov	[esi+70h], cl
mov	[esi+40h], ecx
mov	[esi+3Ch], ecx
mov	[esi+38h], ecx
mov	[esi+34h], ecx
mov	[esi+48h], ecx
mov	[esi+44h], ecx
mov	[esi+30h], ecx
mov	[esi+2Ch], ecx
mov	[esi+4Ch], ecx
mov	[esi+50h], ecx
mov	[esi+1Ch], ecx
mov	[esi+18h], ecx
mov	[esi+14h], ecx
mov	[esi+28h], ecx
mov	[esi+24h], ecx

loc_70CEB8:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_70CB20 endp

align 10h
off_70CEC0 dd offset loc_70CC34	; jump table for switch	statement
dd offset loc_70CC4D
dd offset loc_70CC69
dd offset loc_70CC81
dd offset loc_70CC9C
dd offset loc_70CCB2
dd offset loc_70CCD9
dd offset loc_70CD02
off_70CEE0 dd offset loc_70CD45	; jump table for switch	statement
dd offset loc_70CD5E
dd offset loc_70CD7A
dd offset loc_70CD92
dd offset loc_70CDAD
dd offset loc_70CDC3
dd offset loc_70CDEA
dd offset loc_70CE13



sub_70CF00 proc	near
push	esi
mov	esi, ecx
mov	al, [esi+20h]
test	al, al
js	short loc_70CF20
cmp	al, 1
jz	short loc_70CF20
mov	edi, edi

loc_70CF10:
mov	ecx, esi
call	sub_70A280
cmp	byte ptr [esi+20h], 3
jz	short loc_70CF10
lea	ecx, [ecx+0]

loc_70CF20:
mov	al, [esi+20h]
cmp	al, 1
jz	short loc_70CF6A
test	al, al
jns	short loc_70CF6A
movzx	eax, al
sub	eax, 84h
jz	short loc_70CF55
sub	eax, 1
jnz	short loc_70CF61
mov	ecx, [esi+60h]
add	ecx, [esi+58h]
mov	eax, [esi+5Ch]
add	eax, [esi+54h]
add	[esi+30h], ecx
add	[esi+2Ch], eax
mov	ecx, esi
call	sub_70A280
jmp	short loc_70CF20

loc_70CF55:
mov	edx, [esi+64h]
mov	eax, [esi+68h]
add	[esi+2Ch], edx
add	[esi+30h], eax

loc_70CF61:
mov	ecx, esi
call	sub_70A280
jmp	short loc_70CF20

loc_70CF6A:
pop	esi
retn
sub_70CF00 endp

align 10h



sub_70CF70 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_74=	byte ptr -74h
var_54=	byte ptr -54h

sub	esp, 90h
push	ecx
lea	ecx, [esp+94h+var_74]
call	sub_70A1C0
lea	eax, [esp+90h+var_74]
mov	[esp+90h+var_90], eax
mov	al, [esp+90h+var_54]
mov	[esp+90h+var_8C], 0
test	al, al
js	short loc_70CFB0
cmp	al, 1
jz	short loc_70CFB0
jmp	short loc_70CFA0
align 10h

loc_70CFA0:
lea	ecx, [esp+90h+var_74]
call	sub_70A280
cmp	[esp+90h+var_54], 3
jz	short loc_70CFA0

loc_70CFB0:
mov	ecx, [esp+90h+var_90]
mov	al, [ecx+20h]
cmp	al, 1
jz	short loc_70CFCE
test	al, al
jns	short loc_70CFCE
lea	edx, [esp+90h+var_88]
push	edx
lea	ecx, [esp+94h+var_90]
call	sub_70AF80
jmp	short loc_70CFB0

loc_70CFCE:
mov	eax, [esp+90h+var_8C]
add	esp, 90h
retn
sub_70CF70 endp

align 10h



sub_70CFE0 proc	near

var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_74=	byte ptr -74h
var_54=	byte ptr -54h

sub	esp, 90h
mov	eax, [ecx]
push	eax
lea	ecx, [esp+94h+var_74]
call	sub_70A1C0
mov	al, [esp+90h+var_54]
lea	ecx, [esp+90h+var_74]
mov	[esp+90h+var_90], ecx
mov	[esp+90h+var_8C], 0
test	al, al
js	short loc_70D020
cmp	al, 1
jz	short loc_70D020
lea	ecx, [ecx+0]

loc_70D010:
lea	ecx, [esp+90h+var_74]
call	sub_70A280
cmp	[esp+90h+var_54], 3
jz	short loc_70D010

loc_70D020:
mov	edx, [esp+90h+var_90]
mov	al, [edx+20h]
cmp	al, 1
jz	short loc_70D03E
test	al, al
jns	short loc_70D03E
lea	eax, [esp+90h+var_88]
push	eax
lea	ecx, [esp+94h+var_90]
call	sub_70AF80
jmp	short loc_70D020

loc_70D03E:
mov	eax, [esp+90h+var_8C]
add	esp, 90h
retn
sub_70CFE0 endp

align 10h



sub_70D050 proc	near
push	ebx
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
mov	dword ptr [esi], offset	off_143F728
cmp	[esi+34h], edi
jbe	short loc_70D077
xor	ebx, ebx

loc_70D064:
mov	ecx, [esi+2Ch]
add	ecx, ebx
call	sub_6FA020
inc	edi
add	ebx, 28h
cmp	edi, [esi+34h]
jb	short loc_70D064

loc_70D077:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+2Ch]
mov	eax, [eax+30h]
push	edx
call	eax
xor	edi, edi
cmp	[esi+38h], edi
jbe	short loc_70D0A8
xor	ebx, ebx

loc_70D091:
mov	ecx, [esi+30h]
mov	edx, [ecx+ebx]
mov	eax, [edx]
add	ecx, ebx
push	0
call	eax
inc	edi
add	ebx, 18h
cmp	edi, [esi+38h]
jb	short loc_70D091

loc_70D0A8:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+30h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_143F6C8
test	ecx, ecx
jz	short loc_70D0CC
push	esi
call	sub_705BC0

loc_70D0CC:
mov	ecx, [esi+20h]
mov	dword ptr [esi+18h], 0
test	ecx, ecx
jz	short loc_70D0E2
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_70D0E2:
pop	edi
mov	dword ptr [esi+20h], 0
pop	esi
pop	ebx
retn
sub_70D050 endp

align 10h



sub_70D0F0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+34h]
mov	edx, [esp+arg_0]
mov	[edx], eax
mov	eax, [ecx+2Ch]
retn	4
sub_70D0F0 endp

align 10h



sub_70D100 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+38h]
mov	edx, [esp+arg_0]
mov	[edx], eax
mov	eax, [ecx+30h]
retn	4
sub_70D100 endp

align 10h



sub_70D110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [ecx+2Ch]
mov	edx, [esp+arg_0]
mov	[edx], eax
mov	eax, [ecx+34h]
mov	edx, [esp+arg_4]
mov	[edx], eax
mov	eax, [ecx+30h]
mov	edx, [esp+arg_8]
mov	[edx], eax
mov	eax, [ecx+38h]
mov	ecx, [esp+arg_C]
mov	[ecx], eax
retn	10h
sub_70D110 endp

align 10h



sub_70D140 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+2Ch]
mov	eax, [esp+arg_0]
mov	[eax+4], edx
mov	edx, [ecx+30h]
mov	[eax+8], edx
mov	edx, [ecx+34h]
mov	[eax+48h], edx
mov	ecx, [ecx+38h]
mov	[eax+4Ch], ecx
retn	4
sub_70D140 endp

align 10h



; int __stdcall	sub_70D160(float)
sub_70D160 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fstp	dword ptr [ecx+3Ch]
retn	4
sub_70D160 endp

align 10h



sub_70D170 proc	near
fld	dword ptr [ecx+3Ch]
retn
sub_70D170 endp

align 10h



sub_70D180 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [ecx+40h]
fstp	dword ptr [eax]
fld	dword ptr [ecx+44h]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+48h]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+4Ch]
fstp	dword ptr [eax+0Ch]
retn	4
sub_70D180 endp

align 10h



sub_70D1A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
fld	dword ptr [eax+4]
fstp	[esp+8+arg_0]
fld	dword ptr [eax+8]
fstp	[esp+8+var_8]
fld	dword ptr [eax+0Ch]
fstp	[esp+8+var_4]
fld	dword ptr [eax]
fstp	dword ptr [ecx+40h]
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+44h]
fld	[esp+8+var_8]
fstp	dword ptr [ecx+48h]
fld	[esp+8+var_4]
fstp	dword ptr [ecx+4Ch]
add	esp, 8
retn	4
sub_70D1A0 endp

align 10h



sub_70D1E0 proc	near
add	ecx, 10h
jmp	sub_70C950
sub_70D1E0 endp

align 10h



sub_70D1F0 proc	near

var_28=	byte ptr -28h
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 28h
push	ebx
mov	ebx, ecx
push	ebp
push	esi
mov	dword ptr [ebx], offset	off_155F500
lea	esi, [ebx+8]
push	eax
mov	ecx, esi
mov	dword ptr [ebx+4], 1
mov	dword ptr [ebx], offset	off_143F774
call	sub_70B430
xor	eax, eax
lea	ebp, [ebx+2Ch]
mov	[ebp+0], eax
mov	[ebp+8], eax
mov	ecx, [esi+18h]
cmp	ecx, [esi+1Ch]
jb	short loc_70D23F
pop	esi
pop	ebp
mov	dword ptr [ebx+54h], 4
mov	eax, ebx
pop	ebx
add	esp, 28h
retn	4

loc_70D23F:
push	edi
lea	edx, [ebx+68h]
mov	[ebx+54h], eax
push	edx
lea	eax, [ebx+64h]
push	eax
lea	ecx, [ebx+60h]
push	ecx
mov	ecx, esi
call	sub_70C590
push	esi
lea	ecx, [esp+3Ch+var_28]
call	sub_70C440
mov	edi, ebp
mov	ecx, 0Ah
lea	esi, [esp+38h+var_28]
rep movsd
fild	dword ptr [ebp+0Ch]
fmul	dword ptr [ebp+24h]
fstp	dword ptr [ebx+58h]
fild	dword ptr [ebp+10h]
fmul	dword ptr [ebp+24h]
pop	edi
pop	esi
pop	ebp
fstp	dword ptr [ebx+5Ch]
mov	eax, ebx
pop	ebx
add	esp, 28h
retn	4
sub_70D1F0 endp

align 10h



sub_70D290 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	byte ptr -28h
arg_0= dword ptr  4

sub	esp, 3Ch
push	ebx
mov	ebx, ecx
mov	eax, [ebx+54h]
push	ebp
mov	ebp, [esp+44h+arg_0]
mov	[ebp+0], eax
mov	ecx, [ebx+58h]
mov	[ebp+4], ecx
mov	edx, [ebx+5Ch]
mov	[ebp+8], edx
mov	eax, [ebx+60h]
mov	[ebp+0Ch], eax
mov	ecx, [ebx+64h]
mov	[ebp+10h], ecx
mov	edx, [ebx+68h]
mov	[ebp+14h], edx
mov	eax, [ebx+54h]
sub	eax, 0
push	esi
jz	short loc_70D2D6
sub	eax, 2
jz	short loc_70D307
sub	eax, 1
jnz	loc_70D3C8

loc_70D2D6:
mov	edx, [ebx+30h]
cmp	edx, [ebx+34h]
lea	ecx, [ebx+2Ch]
jb	loc_70D392
push	ecx
lea	ecx, [ebx+8]
mov	dword ptr [ebx+54h], 2
call	sub_70C620
xor	eax, eax
cmp	dword ptr [ebp+0], 4
pop	esi
pop	ebp
setnz	al
pop	ebx
add	esp, 3Ch
retn	4

loc_70D307:
mov	eax, [ebx+20h]
cmp	eax, [ebx+24h]
lea	esi, [ebx+8]
jb	short loc_70D32B
mov	dword ptr [ebx+54h], 4
xor	eax, eax
cmp	dword ptr [ebp+0], 4
pop	esi
pop	ebp
setnz	al
pop	ebx
add	esp, 3Ch
retn	4

loc_70D32B:
mov	ecx, [ebx+0Ch]
test	byte ptr [ecx],	7
jnz	short loc_70D33A
mov	ecx, esi
call	sub_70C8C0

loc_70D33A:
push	edi
lea	edx, [ebx+68h]
push	edx
lea	eax, [ebx+64h]
push	eax
lea	ecx, [ebx+60h]
push	ecx
mov	ecx, esi
mov	dword ptr [ebx+54h], 0
call	sub_70C590
push	esi
lea	ecx, [esp+50h+var_28]
call	sub_70C440
lea	edx, [ebx+2Ch]
mov	esi, eax
mov	ecx, 0Ah
mov	edi, edx
rep movsd
fild	dword ptr [edx+0Ch]
fmul	dword ptr [edx+24h]
fstp	dword ptr [ebx+58h]
fild	dword ptr [edx+10h]
fmul	dword ptr [edx+24h]
pop	edi
xor	eax, eax
fstp	dword ptr [ebx+5Ch]
cmp	dword ptr [ebp+0], 4
pop	esi
pop	ebp
setnz	al
pop	ebx
add	esp, 3Ch
retn	4

loc_70D392:
push	0
lea	eax, [esp+4Ch+var_3C]
push	eax
call	sub_70B110
fld	[esp+48h+var_3C]
mov	cl, [esp+48h+var_2C]
fstp	dword ptr [ebx+58h]
fld	[esp+48h+var_38]
mov	dword ptr [ebx+54h], 3
fstp	dword ptr [ebx+5Ch]
mov	[ebx+68h], cl
fld	[esp+48h+var_34]
fstp	dword ptr [ebx+60h]
fld	[esp+48h+var_30]
fstp	dword ptr [ebx+64h]

loc_70D3C8:
xor	eax, eax
cmp	dword ptr [ebp+0], 4
pop	esi
pop	ebp
setnz	al
pop	ebx
add	esp, 3Ch
retn	4
sub_70D290 endp

align 10h



sub_70D3E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_70D435
mov	edx, [ebx]
sub	eax, edi
lea	ecx, [eax+edi]
lea	ecx, [ecx+ecx*2]
push	esi
lea	esi, [edx+ecx*8-18h]
jz	short loc_70D416
push	ebp
mov	ebp, eax

loc_70D403:
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
sub	esi, 18h
sub	ebp, 1
jnz	short loc_70D403
pop	ebp

loc_70D416:
mov	eax, [ebx+8]
shr	eax, 1
pop	esi
cmp	edi, eax
jnb	short loc_70D44C
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, ebx
call	sub_70C830
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8

loc_70D435:
cmp	edi, [ebx+8]
jb	short loc_70D44C
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_70C830

loc_70D44C:
mov	[ebx+4], edi
pop	edi
pop	ebx
retn	8
sub_70D3E0 endp

align 10h



sub_70D460 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_70D490
mov	eax, [edi]
test	eax, eax
jz	short loc_70D485
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_70D485:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_70D490:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_70D4C5
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_70D4C5:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*4]
add	eax, eax
add	eax, eax
mov	[esp+0Ch+arg_4], 103h
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_70D460 endp

align 10h



sub_70D4F0 proc	near

var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= byte ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= byte ptr -110h
var_100= dword ptr -100h
var_FC=	byte ptr -0FCh
var_EC=	dword ptr -0ECh
var_E8=	byte ptr -0E8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_74=	byte ptr -74h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 158h
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	eax, [eax+44h]
push	edi
lea	ecx, [esp+164h+var_13C]
push	ecx
lea	edx, [esp+168h+var_144]
xor	ebp, ebp
push	edx
mov	ecx, esi
mov	[esp+16Ch+var_144], ebp
mov	[esp+16Ch+var_13C], ebp
call	eax
mov	edi, [esp+164h+arg_0]
mov	edx, [edi]
mov	edx, [edx+44h]
lea	eax, [esp+164h+var_148]
push	eax
lea	ecx, [esp+168h+var_140]
push	ecx
mov	ecx, edi
mov	[esp+16Ch+var_140], ebp
mov	[esp+16Ch+var_148], ebp
call	edx
mov	eax, [esp+164h+var_144]
cmp	eax, [esp+164h+var_140]
jnz	loc_70D803
mov	ecx, [esp+164h+var_13C]
cmp	ecx, [esp+164h+var_148]
jnz	loc_70D803
push	ebx
push	esi
lea	ecx, [esp+16Ch+var_74]
call	sub_70CB20
push	edi
lea	ecx, [esp+16Ch+var_E8]
call	sub_70CB20
mov	bl, byte ptr [esp+168h+var_54]
cmp	bl, 1
jz	loc_70D7F4
jmp	short loc_70D590
align 10h

loc_70D590:
mov	dl, byte ptr [esp+168h+var_C8]
cmp	dl, 1
jz	loc_70D7D5
mov	eax, [esp+168h+var_60]
mov	ecx, [esp+168h+var_5C]
mov	[esp+168h+var_128], eax
mov	eax, [esp+168h+var_58]
mov	[esp+168h+var_124], ecx
mov	ecx, [esp+168h+var_D4]
mov	dword ptr [esp+168h+var_120], eax
mov	eax, [esp+168h+var_D0]
mov	[esp+168h+var_11C], ecx
mov	ecx, [esp+168h+var_CC]
mov	[esp+168h+var_118], eax
mov	[esp+168h+var_114], ecx
mov	eax, 0Ch
xor	ecx, ecx
lea	esp, [esp+0]

loc_70D5F0:
mov	esi, [esp+ecx+168h+var_128]
cmp	esi, [esp+ecx+168h+var_11C]
jnz	loc_70D7D5
sub	eax, 4
add	ecx, 4
cmp	eax, 4
jnb	short loc_70D5F0
lea	eax, [esp+168h+var_74]
mov	[esp+168h+var_138], eax
mov	[esp+168h+var_134], ebp
test	bl, bl
js	short loc_70D63D
lea	esp, [esp+0]

loc_70D620:
lea	ecx, [esp+168h+var_74]
call	sub_70A280
cmp	byte ptr [esp+168h+var_54], 3
jz	short loc_70D620
mov	dl, byte ptr [esp+168h+var_C8]

loc_70D63D:
lea	ecx, [esp+168h+var_E8]
mov	[esp+168h+var_130], ecx
mov	[esp+168h+var_12C], ebp
test	dl, dl
js	short loc_70D676
cmp	dl, 1
jz	short loc_70D676
jmp	short loc_70D660
align 10h

loc_70D660:
lea	ecx, [esp+168h+var_E8]
call	sub_70A280
cmp	byte ptr [esp+168h+var_C8], 3
jz	short loc_70D660

loc_70D676:
test	byte ptr [esp+168h+var_4], 80h
fild	[esp+168h+var_48]
fstp	[esp+168h+var_150]
fild	[esp+168h+var_44]
fstp	[esp+168h+var_154]
jz	short loc_70D6AF
fld	[esp+168h+var_8]
fld	st
fmul	[esp+168h+var_150]
fstp	[esp+168h+var_150]
fmul	[esp+168h+var_154]
fstp	[esp+168h+var_154]

loc_70D6AF:
test	[esp+168h+var_78], 80h
fild	[esp+168h+var_BC]
fstp	[esp+168h+var_158]
fild	[esp+168h+var_B8]
fstp	[esp+168h+var_14C]
jz	short loc_70D6E8
fld	[esp+168h+var_7C]
fld	st
fmul	[esp+168h+var_158]
fstp	[esp+168h+var_158]
fmul	[esp+168h+var_14C]
fstp	[esp+168h+var_14C]

loc_70D6E8:
fld	[esp+168h+var_150]
fld	[esp+168h+var_158]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_70D7D5
fld	[esp+168h+var_154]
fld	[esp+168h+var_14C]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_70D7D5
lea	ecx, [esp+168h+var_130]
call	sub_70CFE0
lea	ecx, [esp+168h+var_138]
mov	esi, eax
call	sub_70CFE0
cmp	eax, esi
jnz	loc_70D7D5
mov	edi, edi

loc_70D730:
mov	edx, [esp+168h+var_138]
mov	al, [edx+20h]
cmp	al, 1
jz	loc_70D7E4
test	al, al
jns	loc_70D7E4
mov	eax, [esp+168h+var_130]
mov	al, [eax+20h]
cmp	al, 1
jz	loc_70D7D5
test	al, al
jns	short loc_70D7D5
lea	ecx, [esp+168h+var_110]
push	ecx
lea	ecx, [esp+16Ch+var_138]
call	sub_70AF80
lea	edx, [esp+168h+var_FC]
push	edx
lea	ecx, [esp+16Ch+var_130]
call	sub_70AF80
mov	eax, [esp+168h+var_100]
cmp	eax, [esp+168h+var_EC]
jnz	short loc_70D7D5
add	eax, eax
add	eax, eax
lea	ecx, [esp+168h+var_FC]
lea	esi, [esp+168h+var_110]
cmp	eax, 4
jb	short loc_70D7A5

loc_70D791:
mov	edx, [esi]
cmp	edx, [ecx]
jnz	short loc_70D7D5
sub	eax, 4
add	ecx, 4
add	esi, 4
cmp	eax, 4
jnb	short loc_70D791

loc_70D7A5:
cmp	eax, ebp
jz	short loc_70D730
mov	dl, [ecx]
cmp	dl, [esi]
jnz	short loc_70D7D5
cmp	eax, 1
jbe	loc_70D730
mov	dl, [ecx+1]
cmp	dl, [esi+1]
jnz	short loc_70D7D5
cmp	eax, 2
jbe	loc_70D730
mov	al, [ecx+2]
cmp	al, [esi+2]
jz	loc_70D730

loc_70D7D5:
pop	ebx
pop	edi
pop	esi
xor	al, al
pop	ebp
add	esp, 158h
retn	4

loc_70D7E4:
mov	bl, byte ptr [esp+168h+var_54]
cmp	bl, 1
jnz	loc_70D590

loc_70D7F4:
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 158h
retn	4

loc_70D803:
pop	edi
pop	esi
xor	al, al
pop	ebp
add	esp, 158h
retn	4
sub_70D4F0 endp

align 10h



sub_70D820 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	byte ptr -6Ch
var_68=	byte ptr -68h
var_64=	byte ptr -64h
var_61=	byte ptr -61h
var_60=	byte ptr -60h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 7Ch
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	eax, [eax+44h]
lea	ecx, [esp+88h+var_78]
push	ecx
xor	ebx, ebx
lea	edx, [esp+8Ch+var_7C]
push	edx
mov	ecx, edi
mov	[esp+90h+var_7C], ebx
mov	[esp+90h+var_78], ebx
call	eax
mov	eax, 1505h
mov	ecx, 4
nop

loc_70D850:
movzx	edx, [esp+ecx+88h+var_7D]
dec	ecx
mov	esi, eax
shl	esi, 5
add	esi, eax
xor	edx, esi
mov	eax, edx
cmp	ecx, ebx
jnz	short loc_70D850
mov	ecx, 4
lea	ebx, [ebx+0]

loc_70D870:
movzx	edx, byte ptr [esp+ecx+88h+var_7C+3]
dec	ecx
mov	esi, eax
shl	esi, 5
add	esi, eax
xor	edx, esi
mov	eax, edx
cmp	ecx, ebx
jnz	short loc_70D870
push	edi
lea	ecx, [esp+8Ch+var_4C]
mov	esi, eax
call	sub_70B430
mov	eax, [esp+88h+var_30]
cmp	[esp+88h+var_34], eax
jnb	loc_70D9C8
mov	edi, [esp+88h+var_44]
push	ebp
mov	bp, word ptr [esp+8Ch+var_38]
lea	esp, [esp+0]

loc_70D8B0:
lea	ecx, [esp+8Ch+var_64]
push	ecx
lea	edx, [esp+90h+var_68]
push	edx
lea	eax, [esp+94h+var_6C]
push	eax
lea	ecx, [esp+98h+var_4C]
call	sub_70C590
mov	eax, 0Ch
lea	ecx, [ecx+0]

loc_70D8D0:
movzx	ecx, [esp+eax+8Ch+var_6D]
dec	eax
mov	edx, esi
shl	edx, 5
add	edx, esi
xor	ecx, edx
mov	esi, ecx
cmp	eax, ebx
jnz	short loc_70D8D0
lea	eax, [esp+8Ch+var_4C]
push	eax
lea	ecx, [esp+90h+var_28]
call	sub_70C440
fild	[esp+8Ch+var_1C]
fld	[esp+8Ch+var_4]
mov	eax, 8
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+8Ch+var_74]
fimul	[esp+8Ch+var_18]
fstp	dword ptr [esp+1Ch]

loc_70D915:
movzx	ecx, byte ptr [esp+eax+8Ch+var_78+3]
dec	eax
mov	edx, esi
shl	edx, 5
add	edx, esi
xor	ecx, edx
mov	esi, ecx
cmp	eax, ebx
jnz	short loc_70D915
mov	eax, [esp+8Ch+var_24]
cmp	eax, [esp+8Ch+var_20]
jnb	short loc_70D971

loc_70D934:
lea	ecx, [esp+8Ch+var_60]
push	ecx
lea	ecx, [esp+90h+var_28]
call	sub_70B300
mov	eax, [esp+8Ch+var_50]
add	eax, eax
add	eax, eax
mov	ecx, esi
cmp	eax, ebx
jz	short loc_70D965

loc_70D950:
movzx	edx, [esp+eax+8Ch+var_61]
dec	eax
mov	esi, ecx
shl	esi, 5
add	esi, ecx
xor	edx, esi
mov	ecx, edx
cmp	eax, ebx
jnz	short loc_70D950

loc_70D965:
mov	eax, [esp+8Ch+var_24]
mov	esi, ecx
cmp	eax, [esp+8Ch+var_20]
jb	short loc_70D934

loc_70D971:
mov	ecx, [esp+8Ch+var_C]
cmp	ecx, ebx
jnz	short loc_70D983
mov	ecx, [esp+8Ch+var_8]

loc_70D983:
inc	[esp+8Ch+var_34]
movzx	edx, bp
mov	eax, edi
sub	eax, edx
mov	[esp+8Ch+var_48], ecx
sub	ecx, eax
sub	ecx, 8
cmp	ecx, [eax+4]
jl	short loc_70D9B9
mov	eax, [eax]
cmp	eax, ebx
jz	short loc_70D9D1
lea	ecx, [eax+8]
mov	edi, ecx
mov	[esp+8Ch+var_48], ecx
sub	ecx, eax
mov	bp, cx
mov	[esp+8Ch+var_44], edi
mov	word ptr [esp+8Ch+var_38], bp

loc_70D9B9:
mov	eax, [esp+8Ch+var_30]
cmp	[esp+8Ch+var_34], eax
jb	loc_70D8B0
pop	ebp

loc_70D9C8:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 7Ch
retn

loc_70D9D1:
mov	[esp+8Ch+var_48], ebx
jmp	short loc_70D9B9
sub_70D820 endp

align 10h



sub_70D9E0 proc	near

var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	byte ptr -0D8h
var_D4=	word ptr -0D4h
var_D0=	dword ptr -0D0h
var_C4=	word ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B4=	byte ptr -0B4h
var_B0=	word ptr -0B0h
var_AC=	dword ptr -0ACh
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_88=	byte ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7C=	byte ptr -7Ch
var_78=	byte ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0ECh
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	eax, [eax+44h]
push	edi
lea	ecx, [esp+0F4h+var_E0]
push	ecx
lea	edx, [esp+0F8h+var_DC]
xor	edi, edi
push	edx
mov	ecx, esi
mov	[esp+0FCh+var_DC], edi
mov	[esp+0FCh+var_E0], edi
call	eax
mov	[esp+0F4h+var_E4], edi
mov	[esp+0F4h+var_E8], edi
mov	edi, [esp+0F4h+arg_0]
mov	edx, [edi]
mov	edx, [edx+44h]
lea	eax, [esp+0F4h+var_E8]
push	eax
lea	ecx, [esp+0F8h+var_E4]
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+0F4h+var_DC]
cmp	eax, [esp+0F4h+var_E4]
jnz	loc_70DD68
mov	ecx, [esp+0F4h+var_E0]
cmp	ecx, [esp+0F4h+var_E8]
jnz	loc_70DD68
push	ebx
push	ebp
push	esi
lea	ecx, [esp+100h+var_D8]
call	sub_70B430
push	edi
lea	ecx, [esp+100h+var_B4]
call	sub_70B430
mov	edx, [esp+0FCh+var_C0]
cmp	edx, [esp+0FCh+var_BC]
jnb	loc_70DD32
mov	ebx, [esp+0FCh+var_D0]
mov	bp, word ptr [esp+0FCh+var_A0]
mov	edi, [esp+0FCh+var_AC]
jmp	short loc_70DA80
align 10h

loc_70DA80:
mov	eax, [esp+0FCh+var_9C]
cmp	eax, [esp+0FCh+var_98]
jnb	loc_70DD59
lea	ecx, [esp+0FCh+var_7C]
push	ecx
lea	edx, [esp+100h+var_80]
push	edx
lea	eax, [esp+104h+var_84]
push	eax
lea	ecx, [esp+108h+var_D8]
call	sub_70C590
lea	ecx, [esp+0FCh+var_88]
push	ecx
lea	edx, [esp+100h+var_8C]
push	edx
lea	eax, [esp+104h+var_90]
push	eax
lea	ecx, [esp+108h+var_B4]
call	sub_70C590
mov	eax, 0Ch
xor	ecx, ecx
mov	edi, edi

loc_70DAD0:
mov	edx, [esp+ecx+0FCh+var_84]
cmp	edx, [esp+ecx+0FCh+var_90]
jnz	loc_70DD59
sub	eax, 4
add	ecx, 4
cmp	eax, 4
jnb	short loc_70DAD0
lea	eax, [esp+0FCh+var_D8]
push	eax
lea	ecx, [esp+100h+var_50]
call	sub_70C440
lea	ecx, [esp+0FCh+var_B4]
push	ecx
lea	ecx, [esp+100h+var_78]
call	sub_70C440
fild	[esp+0FCh+var_44]
fld	[esp+0FCh+var_2C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0FCh+var_EC]
fld	[esp+0FCh+var_EC]
fild	[esp+0FCh+var_6C]
fld	[esp+0FCh+var_54]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0FCh+var_EC]
fld	[esp+0FCh+var_EC]
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	loc_70DD55
fild	[esp+0FCh+var_40]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0FCh+var_EC]
fld	[esp+0FCh+var_EC]
fild	[esp+0FCh+var_68]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0FCh+var_EC]
fld	[esp+0FCh+var_EC]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_70DD59
mov	eax, [esp+0FCh+var_48]
cmp	eax, [esp+0FCh+var_70]
jnz	loc_70DD59
cmp	[esp+0FCh+var_4C], eax
jnb	loc_70DC7C
jmp	short loc_70DBB0
align 10h

loc_70DBB0:
mov	edx, [esp+0FCh+var_70]
cmp	[esp+0FCh+var_74], edx
jnb	loc_70DD59
lea	eax, [esp+0FCh+var_14]
push	eax
lea	ecx, [esp+100h+var_50]
call	sub_70B300
lea	ecx, [esp+0FCh+var_28]
push	ecx
lea	ecx, [esp+100h+var_78]
call	sub_70B300
mov	eax, [esp+0FCh+var_4]
cmp	eax, [esp+0FCh+var_18]
jnz	loc_70DD59
add	eax, eax
add	eax, eax
lea	ecx, [esp+0FCh+var_28]
lea	esi, [esp+0FCh+var_14]
cmp	eax, 4
jb	short loc_70DC38
jmp	short loc_70DC20
align 10h

loc_70DC20:
mov	edx, [esi]
cmp	edx, [ecx]
jnz	loc_70DD59
sub	eax, 4
add	ecx, 4
add	esi, 4
cmp	eax, 4
jnb	short loc_70DC20

loc_70DC38:
test	eax, eax
jz	short loc_70DC68
mov	dl, [ecx]
cmp	dl, [esi]
jnz	loc_70DD59
cmp	eax, 1
jbe	short loc_70DC68
mov	dl, [ecx+1]
cmp	dl, [esi+1]
jnz	loc_70DD59
cmp	eax, 2
jbe	short loc_70DC68
mov	al, [ecx+2]
cmp	al, [esi+2]
jnz	loc_70DD59

loc_70DC68:
mov	ecx, [esp+0FCh+var_4C]
cmp	ecx, [esp+0FCh+var_48]
jb	loc_70DBB0

loc_70DC7C:
mov	ecx, [esp+0FCh+var_34]
test	ecx, ecx
jnz	short loc_70DC8E
mov	ecx, [esp+0FCh+var_30]

loc_70DC8E:
movzx	esi, [esp+0FCh+var_C4]
mov	eax, ebx
sub	eax, esi
mov	dword ptr [esp+0FCh+var_D4], ecx
sub	ecx, eax
mov	edx, 1
add	[esp+0FCh+var_C0], edx
sub	ecx, 8
cmp	ecx, [eax+4]
jl	short loc_70DCCC
mov	eax, [eax]
test	eax, eax
jz	loc_70DD41
lea	ecx, [eax+8]
mov	ebx, ecx
mov	dword ptr [esp+0FCh+var_D4], ecx
sub	ecx, eax
mov	[esp+0FCh+var_D0], ebx
mov	[esp+0FCh+var_C4], cx

loc_70DCCC:
mov	eax, [esp+0FCh+var_70]
cmp	[esp+0FCh+var_74], eax
jb	short loc_70DD24
mov	ecx, [esp+0FCh+var_5C]
test	ecx, ecx
jnz	short loc_70DCEE
mov	ecx, [esp+0FCh+var_58]

loc_70DCEE:
add	[esp+0FCh+var_9C], edx
movzx	edx, bp
mov	eax, edi
sub	eax, edx
mov	dword ptr [esp+0FCh+var_B0], ecx
sub	ecx, eax
sub	ecx, 8
cmp	ecx, [eax+4]
jl	short loc_70DD24
mov	eax, [eax]
test	eax, eax
jz	short loc_70DD4B
lea	ecx, [eax+8]
mov	edi, ecx
mov	dword ptr [esp+0FCh+var_B0], ecx
sub	ecx, eax
mov	bp, cx
mov	[esp+0FCh+var_AC], edi
mov	word ptr [esp+0FCh+var_A0], bp

loc_70DD24:
mov	eax, [esp+0FCh+var_C0]
cmp	eax, [esp+0FCh+var_BC]
jb	loc_70DA80

loc_70DD32:
pop	ebp
pop	ebx
pop	edi
mov	al, 1
pop	esi
add	esp, 0ECh
retn	4

loc_70DD41:
mov	dword ptr [esp+0FCh+var_D4], 0
jmp	short loc_70DCCC

loc_70DD4B:
mov	dword ptr [esp+0FCh+var_B0], 0
jmp	short loc_70DD24

loc_70DD55:
fstp	st(1)
fstp	st

loc_70DD59:
pop	ebp
pop	ebx
pop	edi
xor	al, al
pop	esi
add	esp, 0ECh
retn	4

loc_70DD68:
pop	edi
xor	al, al
pop	esi
add	esp, 0ECh
retn	4
sub_70D9E0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_70E810

loc_70DD80:
fld	ds:flt_15FD598
sub	esp, 68h
push	ebp
push	esi
mov	esi, [esp+70h+arg_0]
fst	dword ptr [esi]
push	ecx
fstp	dword ptr [esi+4]
lea	ecx, [esp+74h+var_4C]
fld	ds:flt_143F77C
fst	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
call	sub_70B430
mov	ebp, [esp+70h+var_34]
cmp	ebp, [esp+70h+var_30]
jnb	short loc_70DE13
mov	eax, [esp+70h+var_48]
push	ebx
mov	ebx, [esp+74h+var_44]
push	edi
mov	di, [esp+78h+var_38]

loc_70DDC3:
test	byte ptr [eax],	7
jnz	short loc_70DE1B
cmp	ebp, [esp+78h+var_30]
jnb	short loc_70DE11
inc	eax

loc_70DDCF:
movzx	edx, di
mov	ecx, ebx
sub	ecx, edx
mov	edx, eax
sub	edx, ecx
inc	ebp
sub	edx, 8
cmp	edx, [ecx+4]
mov	[esp+78h+var_48], eax
mov	[esp+78h+var_34], ebp
jl	short loc_70DE0B
mov	ecx, [ecx]
test	ecx, ecx
jz	loc_70E31F
lea	eax, [ecx+8]
mov	edi, eax
sub	edi, ecx
mov	ebx, eax
mov	[esp+78h+var_38], di
mov	[esp+78h+var_44], ebx

loc_70DE07:
mov	[esp+78h+var_48], eax

loc_70DE0B:
cmp	ebp, [esp+78h+var_30]
jb	short loc_70DDC3

loc_70DE11:
pop	edi
pop	ebx

loc_70DE13:
pop	esi
pop	ebp
add	esp, 68h
retn	4

loc_70DE1B:
lea	eax, [esp+78h+var_4C]
push	eax
lea	ecx, [esp+7Ch+var_28]
call	sub_70C440
fild	[esp+78h+var_1C]
fld	[esp+78h+var_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+78h+var_68]
fimul	[esp+78h+var_18]
fstp	[esp+78h+arg_0]
fld	dword ptr [esi]
fstp	[esp+78h+var_64]
fld	[esp+78h+var_64]
fld	[esp+78h+var_68]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70DE62
fxch	st(1)
fstp	[esp+78h+var_64]
jmp	short loc_70DE68

loc_70DE62:
fstp	st(1)
fst	[esp+78h+var_64]

loc_70DE68:
fld	[esp+78h+var_64]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+78h+var_64]
fld	[esp+78h+var_64]
fld	[esp+78h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70DE8E
fxch	st(1)
fstp	[esp+78h+var_64]
jmp	short loc_70DE94

loc_70DE8E:
fstp	st(1)
fst	[esp+78h+var_64]

loc_70DE94:
fld	[esp+78h+var_64]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+78h+var_64]
fld	[esp+78h+var_64]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70DEB3
fstp	st(2)
jmp	short loc_70DEB5

loc_70DEB3:
fstp	st

loc_70DEB5:
fxch	st(1)
fstp	[esp+78h+var_64]
fld	[esp+78h+var_64]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+78h+var_64]
fld	[esp+78h+var_64]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70DEDA
fstp	st(1)
jmp	short loc_70DEDC

loc_70DEDA:
fstp	st

loc_70DEDC:
mov	ecx, [esp+78h+var_24]
fstp	[esp+78h+var_64]
fld	[esp+78h+var_64]
fstp	dword ptr [esi+0Ch]
cmp	ecx, [esp+78h+var_20]
jnb	loc_70E30A

loc_70DEF5:
push	0
lea	edx, [esp+7Ch+var_60]
push	edx
lea	ecx, [esp+80h+var_28]
call	sub_70B110
fld	[esp+78h+var_54]
cmp	[esp+78h+var_50], 0
fld	[esp+78h+var_58]
jz	loc_70E252
fstp	st(1)
fld	[esp+78h+var_60]
fld	st
fadd	st, st(1)
fld	[esp+78h+var_68]
fld	st
fsubp	st(2), st
fld	st(3)
fsubp	st(2), st
fxch	st(1)
fstp	[esp+78h+var_64]
fldz
fld	st
fld	[esp+78h+var_64]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_70DF51
fstp	st
fld	ds:dbl_15FCD60
jmp	short loc_70DF57

loc_70DF51:
fld	st(3)
fsub	st, st(3)
fdivrp	st(1), st

loc_70DF57:
fstp	[esp+78h+var_68]
fld	[esp+78h+var_68]
fcom	st(1)
fnstsw	ax
fld	[esp+78h+var_5C]
test	ah, 41h
jnz	loc_70E0B2
fld1
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	loc_70E0B2
fstp	st(2)
fld	st(3)
fsub	st, st(3)
fmul	st, st(1)
fadd	st, st(3)
fstp	[esp+78h+var_64]
fld	st(1)
fld	[esp+78h+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+78h+var_68]
fld	st(4)
fsubp	st(6), st
fld	st(1)
fmulp	st(6), st
fld	st(4)
faddp	st(6), st
fxch	st(5)
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_64]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+78h+var_64]
fld	[esp+78h+var_54]
fsub	st, st(2)
fmul	st, st(1)
fadd	st, st(2)
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_68]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+78h+var_68]
fld	dword ptr [esi]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_64]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E010
fxch	st(1)
fstp	[esp+78h+arg_0]
jmp	short loc_70E016

loc_70E010:
fstp	st(1)
fst	[esp+78h+arg_0]

loc_70E016:
fld	[esp+78h+arg_0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_68]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_70E040
fld	[esp+78h+arg_0]
fstp	[esp+78h+arg_0]
jmp	short loc_70E044

loc_70E040:
fst	[esp+78h+arg_0]

loc_70E044:
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E067
fstp	st(1)
fld	[esp+78h+arg_0]
jmp	short loc_70E069

loc_70E067:
fxch	st(1)

loc_70E069:
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E09D
fstp	st(1)
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+0Ch]
fldz
fld	[esp+78h+var_58]
jmp	short loc_70E0C0

loc_70E09D:
fstp	st
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+0Ch]
fldz
fld	[esp+78h+var_58]
jmp	short loc_70E0C0

loc_70E0B2:
fstp	st(1)
fld	[esp+78h+arg_0]
fxch	st(5)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_70E0C0:
fld	st(2)
fadd	st, st
fsub	st, st(6)
fsub	[esp+78h+var_54]
fstp	[esp+78h+arg_0]
fld	st(1)
fld	[esp+78h+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_70E0ED
fstp	st
fld	ds:dbl_15FCD60
fld	[esp+78h+var_54]
jmp	short loc_70E101

loc_70E0ED:
fstp	st(1)
fld	st(2)
fsub	st, st(6)
fdivrp	st(1), st
fld	[esp+78h+var_54]
fld	[esp+78h+var_58]
fxch	st(2)
fxch	st(1)

loc_70E101:
fxch	st(1)
fstp	[esp+78h+var_68]
fld	[esp+78h+var_68]
fcom	st(3)
fnstsw	ax
fstp	st(3)
test	ah, 41h
jnz	loc_70E246
fld1
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	loc_70E246
fstp	st
fld	st(4)
fsub	st, st(4)
fmul	st, st(2)
faddp	st(4), st
fxch	st(3)
fstp	[esp+78h+var_64]
fld	st(1)
fsub	st, st(5)
fmul	st, st(1)
faddp	st(5), st
fxch	st(4)
fstp	[esp+78h+var_68]
fld	st(1)
fsub	st, st(3)
fmul	st, st(4)
faddp	st(3), st
fxch	st(2)
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_64]
fld	st
fsubp	st(2), st
fld	st(4)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+78h+var_64]
fld	[esp+78h+var_54]
fld	st
fsub	st, st(3)
fmul	st, st(4)
faddp	st(3), st
fxch	st(2)
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_68]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(4), st
faddp	st(3), st
fxch	st(2)
fstp	[esp+78h+var_68]
fld	dword ptr [esi]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_64]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E1B4
fxch	st(1)
fstp	[esp+78h+arg_0]
jmp	short loc_70E1BA

loc_70E1B4:
fstp	st(1)
fst	[esp+78h+arg_0]

loc_70E1BA:
fld	[esp+78h+arg_0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fld	[esp+78h+var_68]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E1E0
fxch	st(1)
fstp	[esp+78h+arg_0]
jmp	short loc_70E1E6

loc_70E1E0:
fstp	st(1)
fst	[esp+78h+arg_0]

loc_70E1E6:
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E205
fstp	st(2)
jmp	short loc_70E207

loc_70E205:
fstp	st

loc_70E207:
fxch	st(1)
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E237
fstp	st(1)
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+0Ch]
jmp	short loc_70E250

loc_70E237:
fstp	st
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+0Ch]
jmp	short loc_70E250

loc_70E246:
fstp	st(2)
fstp	st(2)
fstp	st(3)
fstp	st(3)
fstp	st

loc_70E250:
fxch	st(1)

loc_70E252:
fld	dword ptr [esi]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_70E26B
fstp	[esp+78h+arg_0]
jmp	short loc_70E271

loc_70E26B:
fstp	st
fst	[esp+78h+arg_0]

loc_70E271:
fld	[esp+78h+arg_0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_70E291
fstp	[esp+78h+arg_0]
jmp	short loc_70E29B

loc_70E291:
fstp	st
fxch	st(1)
fst	[esp+78h+arg_0]
fxch	st(1)

loc_70E29B:
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E2BC
fstp	[esp+78h+arg_0]
jmp	short loc_70E2C2

loc_70E2BC:
fstp	st
fst	[esp+78h+arg_0]

loc_70E2C2:
fld	[esp+78h+arg_0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+78h+arg_0]
fld	[esp+78h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70E2E3
fstp	[esp+78h+arg_0]
jmp	short loc_70E2ED

loc_70E2E3:
fstp	st
fxch	st(1)
fst	[esp+78h+arg_0]
fxch	st(1)

loc_70E2ED:
fld	[esp+78h+arg_0]
mov	eax, [esp+78h+var_24]
fstp	dword ptr [esi+0Ch]
fstp	[esp+78h+var_68]
fstp	[esp+78h+arg_0]
cmp	eax, [esp+78h+var_20]
jb	loc_70DEF5

loc_70E30A:
mov	eax, [esp+78h+var_C]
test	eax, eax
jnz	loc_70DDCF
mov	eax, [esp+78h+var_8]
jmp	loc_70DDCF

loc_70E31F:
xor	eax, eax
jmp	loc_70DE07
; END OF FUNCTION CHUNK	FOR sub_70E810
align 10h



sub_70E330 proc	near

var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_C= dword ptr -0Ch
var_8= byte ptr	-8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0B4h
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	eax, [eax+44h]
lea	ecx, [esp+0C0h+var_A8]
push	ecx
xor	ebp, ebp
lea	edx, [esp+0C4h+var_A4]
push	edx
mov	ecx, edi
mov	[esp+0C8h+var_A4], ebp
mov	[esp+0C8h+var_A8], ebp
call	eax
mov	esi, 1505h
mov	eax, 4

loc_70E368:
movzx	ecx, byte ptr [esp+eax+0C0h+var_A8+3]
dec	eax
mov	edx, esi
shl	edx, 5
add	edx, esi
xor	ecx, edx
mov	esi, ecx
cmp	eax, ebp
jnz	short loc_70E368
mov	eax, 4

loc_70E382:
movzx	ecx, [esp+eax+0C0h+var_A9]
dec	eax
mov	edx, esi
shl	edx, 5
add	edx, esi
xor	ecx, edx
mov	esi, ecx
cmp	eax, ebp
jnz	short loc_70E382
push	edi
lea	ecx, [esp+0C4h+var_78]
call	sub_70CB20
mov	cl, [esp+0C0h+var_58]
cmp	cl, 1
jz	loc_70E4B8
mov	edi, edi

loc_70E3B0:
mov	eax, [esp+0C0h+var_64]
mov	edx, [esp+0C0h+var_60]
mov	[esp+0C0h+var_98], eax
mov	eax, [esp+0C0h+var_5C]
mov	[esp+0C0h+var_90], eax
mov	dword ptr [esp+0C0h+var_94], edx
mov	eax, 0Ch
lea	ecx, [ecx+0]

loc_70E3D0:
movzx	edx, byte ptr [esp+eax+0C0h+var_9C+3]
dec	eax
mov	edi, esi
shl	edi, 5
add	edi, esi
xor	edx, edi
mov	esi, edx
cmp	eax, ebp
jnz	short loc_70E3D0
lea	eax, [esp+0C0h+var_78]
mov	[esp+0C0h+var_A0], eax
mov	[esp+0C0h+var_9C], ebp
test	cl, cl
js	short loc_70E410
cmp	cl, 1
jz	short loc_70E410
lea	ebx, [ebx+0]

loc_70E400:
lea	ecx, [esp+0C0h+var_78]
call	sub_70A280
cmp	[esp+0C0h+var_58], 3
jz	short loc_70E400

loc_70E410:
test	[esp+0C0h+var_8], 80h
fild	[esp+0C0h+var_4C]
fstp	[esp+0C0h+var_B0]
fild	[esp+0C0h+var_48]
fstp	dword ptr [esp+14h]
jz	short loc_70E443
fld	[esp+0C0h+var_C]
fld	st
fmul	[esp+0C0h+var_B0]
fstp	[esp+0C0h+var_B0]
fmul	dword ptr [esp+14h]
fstp	dword ptr [esp+14h]

loc_70E443:
mov	ecx, 8
mov	eax, esi
lea	ebx, [ebx+0]

loc_70E450:
movzx	edx, [esp+ecx+0C0h+var_B1]
dec	ecx
mov	esi, eax
shl	esi, 5
add	esi, eax
xor	edx, esi
mov	eax, edx
cmp	ecx, ebp
jnz	short loc_70E450
mov	esi, eax

loc_70E467:
mov	eax, [esp+0C0h+var_A0]
mov	al, [eax+20h]
cmp	al, 1
jz	short loc_70E4AB
test	al, al
jns	short loc_70E4AB
lea	ecx, [esp+0C0h+var_8C]
push	ecx
lea	ecx, [esp+0C4h+var_A0]
call	sub_70AF80
mov	eax, [esp+0C0h+var_7C]
add	eax, eax
add	eax, eax
mov	ecx, esi
cmp	eax, ebp
jz	short loc_70E4A7

loc_70E492:
movzx	edx, byte ptr [esp+eax+0C0h+var_90+3]
dec	eax
mov	esi, ecx
shl	esi, 5
add	esi, ecx
xor	edx, esi
mov	ecx, edx
cmp	eax, ebp
jnz	short loc_70E492

loc_70E4A7:
mov	esi, ecx
jmp	short loc_70E467

loc_70E4AB:
mov	cl, [esp+0C0h+var_58]
cmp	cl, 1
jnz	loc_70E3B0

loc_70E4B8:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
mov	esp, ebp
pop	ebp
retn
sub_70E330 endp

align 10h



sub_70E4D0 proc	near
push	esi
mov	esi, ecx
mov	al, [esi+20h]
cmp	al, 1
jz	short loc_70E4ED
cmp	al, 2
jnz	short loc_70E4EF
mov	edi, edi

loc_70E4E0:
mov	ecx, esi
call	sub_70A280
cmp	byte ptr [esi+20h], 3
jz	short loc_70E4E0

loc_70E4ED:
pop	esi
retn

loc_70E4EF:
pop	esi
jmp	sub_70CF00
sub_70E4D0 endp

align 10h



sub_70E500 proc	near
push	esi
mov	esi, ecx
push	0FFFFFFFFh	; Value
lea	eax, [esi+14h]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_70E522
test	esi, esi
jz	short loc_70E522
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_70E522:
pop	esi
retn
sub_70E500 endp

align 10h



sub_70E530 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]
fst	dword ptr [eax+10h]
fst	dword ptr [eax+14h]
fst	dword ptr [eax+18h]
fst	dword ptr [eax+1Ch]
fst	dword ptr [eax+20h]
fst	dword ptr [eax+28h]
fst	dword ptr [eax+2Ch]
fst	dword ptr [eax+30h]
fst	dword ptr [eax+34h]
fst	dword ptr [eax+38h]
fst	dword ptr [eax+3Ch]
fst	dword ptr [eax+40h]
fst	dword ptr [eax+44h]
fst	dword ptr [eax+4Ch]
fst	dword ptr [eax+50h]
fst	dword ptr [eax+54h]
fst	dword ptr [eax+58h]
fst	dword ptr [eax+5Ch]
fst	dword ptr [eax+60h]
fst	dword ptr [eax+64h]
fst	dword ptr [eax+68h]
fst	dword ptr [eax+70h]
fst	dword ptr [eax+74h]
fst	dword ptr [eax+78h]
fst	dword ptr [eax+7Ch]
fst	dword ptr [eax+80h]
fst	dword ptr [eax+84h]
fst	dword ptr [eax+88h]
fst	dword ptr [eax+8Ch]
fst	dword ptr [eax+94h]
fst	dword ptr [eax+98h]
fst	dword ptr [eax+9Ch]
fst	dword ptr [eax+0A0h]
fst	dword ptr [eax+0A4h]
fst	dword ptr [eax+0A8h]
fst	dword ptr [eax+0ACh]
fst	dword ptr [eax+0B0h]
fst	dword ptr [eax+0B8h]
fst	dword ptr [eax+0BCh]
fst	dword ptr [eax+0C0h]
fst	dword ptr [eax+0C4h]
fst	dword ptr [eax+0C8h]
fst	dword ptr [eax+0CCh]
fst	dword ptr [eax+0D0h]
fst	dword ptr [eax+0D4h]
fst	dword ptr [eax+0DCh]
fst	dword ptr [eax+0E0h]
fst	dword ptr [eax+0E4h]
fst	dword ptr [eax+0E8h]
fst	dword ptr [eax+0ECh]
fst	dword ptr [eax+0F0h]
fst	dword ptr [eax+0F4h]
fst	dword ptr [eax+0F8h]
fst	dword ptr [eax+100h]
fst	dword ptr [eax+104h]
fst	dword ptr [eax+108h]
fst	dword ptr [eax+10Ch]
fst	dword ptr [eax+110h]
fst	dword ptr [eax+114h]
fst	dword ptr [eax+118h]
fst	dword ptr [eax+11Ch]
fst	dword ptr [eax+124h]
fst	dword ptr [eax+128h]
fst	dword ptr [eax+12Ch]
fst	dword ptr [eax+130h]
fst	dword ptr [eax+134h]
fst	dword ptr [eax+138h]
fst	dword ptr [eax+13Ch]
fstp	dword ptr [eax+140h]
retn
sub_70E530 endp

align 10h



sub_70E6A0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
mov	edx, [eax+40h]
push	esi
mov	esi, ecx
mov	ecx, ebx
call	edx
test	eax, eax
jnz	loc_70E757
push	edi
mov	edi, [esi+28h]
push	edi
call	sub_70B010
mov	ebx, [ebx+28h]
push	ebx
mov	esi, eax
call	sub_70B010
add	esp, 8
cmp	esi, eax
jz	short loc_70E6DD
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4

loc_70E6DD:
mov	ecx, ebx
mov	edx, edi
cmp	esi, 4
jb	short loc_70E6FA

loc_70E6E6:
mov	eax, [edx]
cmp	eax, [ecx]
jnz	short loc_70E6FE
sub	esi, 4
add	ecx, 4
add	edx, 4
cmp	esi, 4
jnb	short loc_70E6E6

loc_70E6FA:
test	esi, esi
jz	short loc_70E74A

loc_70E6FE:
movzx	eax, byte ptr [edx]
movzx	edi, byte ptr [ecx]
sub	eax, edi
jnz	short loc_70E739
cmp	esi, 1
jbe	short loc_70E74A
movzx	eax, byte ptr [edx+1]
movzx	edi, byte ptr [ecx+1]
sub	eax, edi
jnz	short loc_70E739
cmp	esi, 2
jbe	short loc_70E74A
movzx	eax, byte ptr [edx+2]
movzx	edi, byte ptr [ecx+2]
sub	eax, edi
jnz	short loc_70E739
cmp	esi, 3
jbe	short loc_70E74A
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_70E739:
sar	eax, 1Fh
or	eax, 1
pop	edi
test	eax, eax
pop	esi
setz	al
pop	ebx
retn	4

loc_70E74A:
xor	eax, eax
pop	edi
test	eax, eax
pop	esi
setz	al
pop	ebx
retn	4

loc_70E757:
push	ebx
mov	ecx, esi
call	sub_70D4F0
pop	esi
pop	ebx
retn	4
sub_70E6A0 endp

align 10h


; Attributes: thunk

sub_70E770 proc	near
jmp	sub_70D820
sub_70E770 endp

align 10h


; Attributes: thunk

sub_70E780 proc	near
jmp	sub_70D9E0
sub_70E780 endp

align 10h


; Attributes: thunk

sub_70E790 proc	near
jmp	loc_70DD80
sub_70E790 endp

align 10h



sub_70E7A0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+8+var_4]
push	edx
mov	[esp+0Ch+var_4], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	6Ch
push	esi
call	eax
test	eax, eax
jz	short loc_70E7D0
push	esi
mov	ecx, eax
call	sub_70D1F0
pop	esi
pop	ecx
retn

loc_70E7D0:
xor	eax, eax
pop	esi
pop	ecx
retn
sub_70E7A0 endp

align 10h



sub_70E7E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_70D050
test	[esp+4+arg_0], 1
jz	short loc_70E7FD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_70E7FD:
mov	eax, esi
pop	esi
retn	4
sub_70E7E0 endp

align 10h



sub_70E810 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	word ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

; FUNCTION CHUNK AT 0070DD80 SIZE 000005A6 BYTES

add	ecx, 10h
jmp	loc_70DD80
sub_70E810 endp

align 10h



sub_70E820 proc	near
add	ecx, 10h
jmp	sub_70D820
sub_70E820 endp

align 10h



sub_70E830 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
push	eax
lea	ecx, [esi+10h]
call	sub_70D9E0
pop	esi
retn	4
sub_70E830 endp

align 10h



sub_70E850 proc	near
add	ecx, 10h
jmp	sub_70E330
sub_70E850 endp

align 10h



sub_70E860 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
push	eax
lea	ecx, [esi+10h]
call	sub_70D4F0
pop	esi
retn	4
sub_70E860 endp

align 10h



sub_70E880 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_155F500
lea	edi, [esi+8]
push	eax
mov	ecx, edi
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143F780
call	sub_70CB20
xor	ebp, ebp
mov	[esi+7Ch], ebp
mov	[esi+80h], ebp
cmp	byte ptr [esi+28h], 1
jnz	short loc_70E8CA
pop	edi
mov	dword ptr [esi+84h], 4
mov	eax, esi
pop	esi
pop	ebp
retn	4

loc_70E8CA:
mov	[esi+84h], ebp
mov	ecx, [edi+14h]
mov	[esi+90h], ecx
mov	edx, [edi+18h]
mov	[esi+94h], edx
mov	eax, [edi+1Ch]
mov	[esi+98h], eax
mov	al, [edi+20h]
test	al, al
js	short loc_70E903
cmp	al, 1
jz	short loc_70E903

loc_70E8F6:
mov	ecx, edi
call	sub_70A280
cmp	byte ptr [edi+20h], 3
jz	short loc_70E8F6

loc_70E903:
mov	[esi+7Ch], edi
mov	[esi+80h], ebp
mov	eax, edi
fild	dword ptr [eax+2Ch]
fstp	dword ptr [esi+88h]
fild	dword ptr [eax+30h]
fstp	dword ptr [esi+8Ch]
test	byte ptr [eax+70h], 80h
jz	short loc_70E944
fld	dword ptr [eax+6Ch]
fmul	dword ptr [esi+88h]
fstp	dword ptr [esi+88h]
fld	dword ptr [esi+8Ch]
fmul	dword ptr [eax+6Ch]
fstp	dword ptr [esi+8Ch]

loc_70E944:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_70E880 endp

align 10h



sub_70E950 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_70E96D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_70E96D:
mov	eax, esi
pop	esi
retn	4
sub_70E950 endp

align 10h



sub_70E980 proc	near

var_1C=	byte ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 1Ch
push	esi
mov	esi, ecx
mov	eax, [esi+84h]
push	edi
mov	edi, [esp+24h+arg_0]
mov	[edi], eax
mov	ecx, [esi+88h]
mov	[edi+4], ecx
mov	edx, [esi+8Ch]
mov	[edi+8], edx
mov	eax, [esi+90h]
mov	[edi+0Ch], eax
mov	ecx, [esi+94h]
mov	[edi+10h], ecx
mov	edx, [esi+98h]
mov	[edi+14h], edx
mov	eax, [esi+84h]
sub	eax, 0
jz	short loc_70E9D9
sub	eax, 2
jz	short loc_70EA08
sub	eax, 1
jnz	loc_70EB05

loc_70E9D9:
mov	edx, [esi+7Ch]
mov	al, [edx+20h]
lea	ecx, [esi+7Ch]
cmp	al, 1
jz	short loc_70E9EE
test	al, al
js	loc_70EABD

loc_70E9EE:
mov	dword ptr [esi+84h], 2
xor	eax, eax
cmp	dword ptr [edi], 4
pop	edi
setnz	al
pop	esi
add	esp, 1Ch
retn	4

loc_70EA08:
mov	al, [esi+28h]
cmp	al, 1
jnz	short loc_70EA29
mov	dword ptr [esi+84h], 4
xor	eax, eax
cmp	dword ptr [edi], 4
pop	edi
setnz	al
pop	esi
add	esp, 1Ch
retn	4

loc_70EA29:
cmp	al, 2
jnz	short loc_70EA35
lea	ecx, [esi+8]
call	sub_70E4D0

loc_70EA35:
lea	eax, [esi+8]
mov	dword ptr [esi+84h], 0
mov	ecx, [eax+14h]
mov	[esi+90h], ecx
mov	edx, [eax+18h]
mov	[esi+94h], edx
mov	ecx, [eax+1Ch]
mov	[esi+98h], ecx
push	eax
lea	ecx, [esp+28h+var_1C]
call	sub_70C400
mov	edx, [eax]
mov	[esi+7Ch], edx
mov	eax, [eax+4]
mov	[esi+80h], eax
mov	eax, edx
fild	dword ptr [eax+2Ch]
fstp	dword ptr [esi+88h]
fild	dword ptr [eax+30h]
fstp	dword ptr [esi+8Ch]
test	byte ptr [eax+70h], 80h
jz	short loc_70EB05
fld	dword ptr [eax+6Ch]
fmul	dword ptr [esi+88h]
fstp	dword ptr [esi+88h]
fld	dword ptr [eax+6Ch]
xor	eax, eax
fmul	dword ptr [esi+8Ch]
fstp	dword ptr [esi+8Ch]
cmp	dword ptr [edi], 4
pop	edi
setnz	al
pop	esi
add	esp, 1Ch
retn	4

loc_70EABD:
push	0
lea	eax, [esp+28h+var_14]
push	eax
call	sub_70AE10
fld	[esp+24h+var_14]
mov	cl, [esp+24h+var_4]
fstp	dword ptr [esi+88h]
fld	[esp+24h+var_10]
mov	dword ptr [esi+84h], 3
fstp	dword ptr [esi+8Ch]
mov	[esi+98h], cl
fld	[esp+24h+var_C]
fstp	dword ptr [esi+90h]
fld	[esp+24h+var_8]
fstp	dword ptr [esi+94h]

loc_70EB05:
xor	eax, eax
cmp	dword ptr [edi], 4
pop	edi
setnz	al
pop	esi
add	esp, 1Ch
retn	4
sub_70E980 endp

align 10h



sub_70EB20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_70EB39
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_70EB4E
push	esi
jmp	short loc_70EB48

loc_70EB39:
cmp	esi, [edi+8]
jb	short loc_70EB4E
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_70EB48:
push	edi
call	sub_6D16F0

loc_70EB4E:
mov	eax, [edi]
lea	edx, [esi+esi*4]
mov	[edi+4], esi
lea	eax, [eax+edx*4-14h]
pop	edi
pop	esi
test	eax, eax
jz	short locret_70EB80
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	ecx, [ecx+10h]
mov	[eax+10h], ecx

locret_70EB80:
retn	4
sub_70EB20 endp

align 10h



sub_70EB90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_70EBE2
mov	edx, [edi]
sub	eax, esi
lea	ecx, [eax+esi]
lea	ecx, [ecx+ecx*4]
push	ebx
lea	ebx, [edx+ecx*8-28h]
jz	short loc_70EBC3
push	ebp
mov	ebp, eax

loc_70EBB3:
mov	ecx, ebx
call	sub_6FA020
sub	ebx, 28h
sub	ebp, 1
jnz	short loc_70EBB3
pop	ebp

loc_70EBC3:
mov	eax, [edi+8]
shr	eax, 1
pop	ebx
cmp	esi, eax
jnb	short loc_70EBF9
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_70D460
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_70EBE2:
cmp	esi, [edi+8]
jb	short loc_70EBF9
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_70D460

loc_70EBF9:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_70EB90 endp

align 10h


; Attributes: bp-based frame

sub_70EC10 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	byte ptr -78h
var_58=	byte ptr -58h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
fld	ds:flt_15FD598
sub	esp, 0A4h
push	esi
mov	esi, [ebp+arg_0]
fst	dword ptr [esi]
push	ecx
fstp	dword ptr [esi+4]
lea	ecx, [esp+0ACh+var_78]
fld	ds:flt_143F77C
fst	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
call	sub_70CB20
mov	al, [esp+0A8h+var_58]
cmp	al, 1
jz	loc_70F1B1
lea	ecx, [ecx+0]

loc_70EC50:
cmp	al, 2
jnz	short loc_70EC6A

loc_70EC54:
lea	ecx, [esp+0A8h+var_78]
call	sub_70A280
mov	al, [esp+0A8h+var_58]
cmp	al, 3
jz	short loc_70EC54
jmp	loc_70F1A9

loc_70EC6A:
lea	ecx, [esp+0A8h+var_78]
mov	[esp+0A8h+var_80], ecx
mov	[esp+0A8h+var_7C], 0
test	al, al
js	short loc_70EC92
cmp	al, 1
jz	short loc_70EC92

loc_70EC82:
lea	ecx, [esp+0A8h+var_78]
call	sub_70A280
cmp	[esp+0A8h+var_58], 3
jz	short loc_70EC82

loc_70EC92:
test	[esp+0A8h+var_8], 80h
fild	[esp+0A8h+var_4C]
fstp	[esp+0A8h+var_9C]
fild	[esp+0A8h+var_48]
fstp	[esp+0A8h+var_98]
jz	short loc_70ECC5
fld	[esp+0A8h+var_C]
fld	st
fmul	[esp+0A8h+var_9C]
fstp	[esp+0A8h+var_9C]
fmul	[esp+0A8h+var_98]
fstp	[esp+0A8h+var_98]

loc_70ECC5:
fld	dword ptr [esi]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_9C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70ECE4
fxch	st(1)
fstp	[esp+0A8h+var_A0]
jmp	short loc_70ECEA

loc_70ECE4:
fstp	st(1)
fst	[esp+0A8h+var_A0]

loc_70ECEA:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_98]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70ED10
fxch	st(1)
fstp	[esp+0A8h+var_A0]
jmp	short loc_70ED16

loc_70ED10:
fstp	st(1)
fst	[esp+0A8h+var_A0]

loc_70ED16:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70ED35
fstp	st(2)
jmp	short loc_70ED37

loc_70ED35:
fstp	st

loc_70ED37:
fxch	st(1)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70ED5C
fstp	st(1)
jmp	short loc_70ED5E

loc_70ED5C:
fstp	st

loc_70ED5E:
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+0Ch]
lea	esp, [esp+0]

loc_70ED70:
mov	edx, [esp+0A8h+var_80]
mov	al, [edx+20h]
cmp	al, 1
jz	loc_70F1A5
test	al, al
jns	loc_70F1A5
push	0
lea	eax, [esp+0ACh+var_94]
push	eax
lea	ecx, [esp+0B0h+var_80]
call	sub_70AE10
fld	[esp+0A8h+var_88]
cmp	[esp+0A8h+var_84], 0
fld	[esp+0A8h+var_8C]
jz	loc_70F0E4
fstp	st(1)
fld	[esp+0A8h+var_94]
fld	st
fadd	st, st(1)
fld	[esp+0A8h+var_9C]
fld	st
fsubp	st(2), st
fld	st(3)
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0A8h+var_A0]
fldz
fld	st
fld	[esp+0A8h+var_A0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_70EDE3
fstp	st
fld	ds:dbl_15FCD60
jmp	short loc_70EDE9

loc_70EDE3:
fld	st(3)
fsub	st, st(3)
fdivrp	st(1), st

loc_70EDE9:
fstp	[esp+0A8h+var_9C]
fld	[esp+0A8h+var_9C]
fcom	st(1)
fnstsw	ax
fld	[esp+0A8h+var_90]
test	ah, 41h
jnz	loc_70EF44
fld1
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	loc_70EF44
fstp	st(2)
fld	st(3)
fsub	st, st(3)
fmul	st, st(1)
fadd	st, st(3)
fstp	[esp+0A8h+var_9C]
fld	st(1)
fld	[esp+0A8h+var_98]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+0A8h+var_98]
fld	st(4)
fsubp	st(6), st
fld	st(1)
fmulp	st(6), st
fld	st(4)
faddp	st(6), st
fxch	st(5)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_9C]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0A8h+var_9C]
fld	[esp+0A8h+var_88]
fsub	st, st(2)
fmul	st, st(1)
fadd	st, st(2)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_98]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0A8h+var_98]
fld	dword ptr [esi]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_9C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70EEA2
fxch	st(1)
fstp	[esp+0A8h+var_A0]
jmp	short loc_70EEA8

loc_70EEA2:
fstp	st(1)
fst	[esp+0A8h+var_A0]

loc_70EEA8:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_98]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_70EED2
fld	[esp+0A8h+var_A0]
fstp	[esp+0A8h+var_A0]
jmp	short loc_70EED6

loc_70EED2:
fst	[esp+0A8h+var_A0]

loc_70EED6:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70EEF9
fstp	st(1)
fld	[esp+0A8h+var_A0]
jmp	short loc_70EEFB

loc_70EEF9:
fxch	st(1)

loc_70EEFB:
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70EF2F
fstp	st(1)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+0Ch]
fldz
fld	[esp+0A8h+var_8C]
jmp	short loc_70EF52

loc_70EF2F:
fstp	st
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+0Ch]
fldz
fld	[esp+0A8h+var_8C]
jmp	short loc_70EF52

loc_70EF44:
fstp	st(1)
fld	[esp+0A8h+var_98]
fxch	st(5)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_70EF52:
fld	st(2)
fadd	st, st
fsub	st, st(6)
fsub	[esp+0A8h+var_88]
fstp	[esp+0A8h+var_A0]
fld	st(1)
fld	[esp+0A8h+var_A0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_70EF7F
fstp	st
fld	ds:dbl_15FCD60
fld	[esp+0A8h+var_88]
jmp	short loc_70EF93

loc_70EF7F:
fstp	st(1)
fld	st(2)
fsub	st, st(6)
fdivrp	st(1), st
fld	[esp+0A8h+var_88]
fld	[esp+0A8h+var_8C]
fxch	st(2)
fxch	st(1)

loc_70EF93:
fxch	st(1)
fstp	[esp+0A8h+var_9C]
fld	[esp+0A8h+var_9C]
fcom	st(3)
fnstsw	ax
fstp	st(3)
test	ah, 41h
jnz	loc_70F0D8
fld1
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	loc_70F0D8
fstp	st
fld	st(4)
fsub	st, st(4)
fmul	st, st(2)
faddp	st(4), st
fxch	st(3)
fstp	[esp+0A8h+var_9C]
fld	st(1)
fsub	st, st(5)
fmul	st, st(1)
faddp	st(5), st
fxch	st(4)
fstp	[esp+0A8h+var_98]
fld	st(1)
fsub	st, st(3)
fmul	st, st(4)
faddp	st(3), st
fxch	st(2)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_9C]
fld	st
fsubp	st(2), st
fld	st(4)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0A8h+var_9C]
fld	[esp+0A8h+var_88]
fld	st
fsub	st, st(3)
fmul	st, st(4)
faddp	st(3), st
fxch	st(2)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_98]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(4), st
faddp	st(3), st
fxch	st(2)
fstp	[esp+0A8h+var_98]
fld	dword ptr [esi]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_9C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70F046
fxch	st(1)
fstp	[esp+0A8h+var_A0]
jmp	short loc_70F04C

loc_70F046:
fstp	st(1)
fst	[esp+0A8h+var_A0]

loc_70F04C:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_98]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70F072
fxch	st(1)
fstp	[esp+0A8h+var_A0]
jmp	short loc_70F078

loc_70F072:
fstp	st(1)
fst	[esp+0A8h+var_A0]

loc_70F078:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70F097
fstp	st(2)
jmp	short loc_70F099

loc_70F097:
fstp	st

loc_70F099:
fxch	st(1)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70F0C9
fstp	st(1)
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+0Ch]
jmp	short loc_70F0E2

loc_70F0C9:
fstp	st
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+0Ch]
jmp	short loc_70F0E2

loc_70F0D8:
fstp	st(2)
fstp	st(2)
fstp	st(3)
fstp	st(3)
fstp	st

loc_70F0E2:
fxch	st(1)

loc_70F0E4:
fld	dword ptr [esi]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_70F0FD
fstp	[esp+0A8h+var_A0]
jmp	short loc_70F103

loc_70F0FD:
fstp	st
fst	[esp+0A8h+var_A0]

loc_70F103:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_70F123
fstp	[esp+0A8h+var_A0]
jmp	short loc_70F12D

loc_70F123:
fstp	st
fxch	st(1)
fst	[esp+0A8h+var_A0]
fxch	st(1)

loc_70F12D:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_70F14E
fstp	[esp+0A8h+var_A0]
jmp	short loc_70F154

loc_70F14E:
fstp	st
fst	[esp+0A8h+var_A0]

loc_70F154:
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_70F187
fstp	[esp+0A8h+var_A0]
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+0Ch]
fstp	[esp+0A8h+var_9C]
fstp	[esp+0A8h+var_98]
jmp	loc_70ED70

loc_70F187:
fstp	st
fxch	st(1)
fst	[esp+0A8h+var_A0]
fxch	st(1)
fld	[esp+0A8h+var_A0]
fstp	dword ptr [esi+0Ch]
fstp	[esp+0A8h+var_9C]
fstp	[esp+0A8h+var_98]
jmp	loc_70ED70

loc_70F1A5:
mov	al, [esp+0A8h+var_58]

loc_70F1A9:
cmp	al, 1
jnz	loc_70EC50

loc_70F1B1:
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_70EC10 endp

align 10h



; int __stdcall	sub_70F1C0(int,	int, float, int)
sub_70F1C0 proc	near

var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_168= dword ptr -168h
var_164= dword ptr -164h
var_154= byte ptr -154h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 1B4h
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esp+1C4h+var_174]
call	sub_64E8E0
lea	ecx, [esp+1C4h+var_154]
call	sub_70E530
fldz
fst	[esp+1C4h+var_1A8]
xor	ebp, ebp
test	byte ptr [esi+24h], 40h
fst	[esp+1C4h+var_1A4]
fst	[esp+1C4h+var_1A0]
mov	[esp+1C4h+var_1AC], ebp
fstp	[esp+1C4h+var_19C]
jz	short loc_70F20C
mov	eax, [esi]
mov	edx, [eax+24h]
lea	ecx, [esp+1C4h+var_1AC]
push	ecx
mov	ecx, esi
call	edx
mov	ebp, eax

loc_70F20C:
test	byte ptr [esi+24h], 0C0h
mov	edi, [esp+1C4h+arg_4]
mov	ebx, [esp+1C4h+arg_C]
jz	loc_70F2E4
test	ebx, ebx
jz	loc_70F300
cmp	byte ptr [ebx+5Ch], 0
jz	loc_70F2E4
push	edi
mov	ecx, esi
call	sub_70BB70
mov	esi, eax
test	esi, esi
jl	loc_70F2E4
fld1
mov	eax, [esp+1C4h+arg_8]
push	0		; int
push	ecx		; float
fstp	[esp+1CCh+var_1CC]
push	eax		; int
lea	ecx, [esp+1D0h+var_178]
lea	edx, [esi+esi*4]
push	ecx		; int
lea	ecx, [ebp+edx*8+0]
call	sub_6FC220
fld	[esp+1C4h+var_174]
fstp	[esp+1C4h+var_190]
lea	eax, [esp+1C4h+var_1B4]
fld	[esp+1C4h+var_170]
push	eax
fstp	[esp+1C8h+var_18C]
lea	ecx, [esp+1C8h+var_198]
fld	[esp+1C8h+var_168]
push	ecx
fstp	[esp+1CCh+var_184]
lea	ecx, [esp+1CCh+var_190]
fld	[esp+1CCh+var_164]
fstp	[esp+1CCh+var_180]
fldz
fst	[esp+1CCh+var_188]
fst	[esp+1CCh+var_17C]
fld1
fstp	[esp+1CCh+var_1B4]
fstp	[esp+1CCh+var_1B0]
call	sub_64E9B0
fld	[esp+1C4h+var_198]
fabs
fstp	[esp+1C4h+var_1B4]
fld	[esp+1C4h+var_1B4]
fld	ds:flt_1432398
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_70F34A
fld	[esp+1C4h+var_194]
fabs
fstp	[esp+1C4h+var_1B4]
fcomp	[esp+1C4h+var_1B4]
fnstsw	ax
test	ah, 5
jp	short loc_70F34C

loc_70F2E4:
test	ebx, ebx
jz	short loc_70F300
mov	edx, [esp+1C4h+var_1AC]
push	edx
push	ebp
push	edi
mov	ecx, ebx
call	sub_6A6DE0
push	ebx
push	edi
call	sub_70B5D0
add	esp, 8

loc_70F300:
mov	esi, [esp+1C4h+arg_0]
fld	dword ptr [esi+8]
push	ecx		; float
fmul	ds:dbl_15FD2F8
mov	ecx, edi
fstp	[esp+1C8h+var_1B4]
fld	[esp+1C8h+var_1B4]
fstp	[esp+1C8h+var_1C8]
call	sub_708E90
mov	eax, [esp+1C4h+arg_8]
mov	ecx, [eax+48h]
mov	edx, [esp+1C4h+var_1AC]
push	ecx		; int
push	eax		; float
push	edx		; int
push	ebp		; int
push	edi		; int
mov	ecx, esi
call	sub_749790
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1B4h
retn	10h

loc_70F34A:
fstp	st

loc_70F34C:
lea	edx, [esp+1C4h+var_19C]
push	edx
lea	eax, [esp+1C8h+var_1A0]
push	eax
lea	ecx, [esp+1CCh+var_1A4]
push	ecx
lea	edx, [esp+1D0h+var_1A8]
push	edx
mov	ecx, edi
call	sub_708D40
push	esi		; int
mov	esi, [esp+1C8h+arg_0]
fld	dword ptr [esi+0Ch]
push	ecx		; float
fstp	[esp+1CCh+var_1CC]
lea	eax, [esp+1CCh+var_1A8]
push	eax		; int
push	ebx		; int
lea	ecx, [esp+1D4h+var_154]
call	sub_6A6900
lea	ecx, [esp+1C4h+var_154]
push	ecx
mov	ecx, esi
call	sub_7492D0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1B4h
retn	10h
sub_70F1C0 endp

align 10h



sub_70F3B0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+8], ecx
mov	[eax+4], ecx
mov	[eax], ecx
mov	[eax+18h], ecx
mov	[eax+14h], ecx
mov	[eax+10h], ecx
mov	[eax+0Ch], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], cl
mov	[eax+35h], cl
retn
sub_70F3B0 endp

align 10h


; Attributes: bp-based frame thunk

sub_70F3F0 proc	near
jmp	sub_70EC10
sub_70F3F0 endp

align 10h



sub_70F400 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+8+var_4]
push	edx
mov	[esp+0Ch+var_4], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	9Ch
push	esi
call	eax
test	eax, eax
jz	short loc_70F433
push	esi
mov	ecx, eax
call	sub_70E880
pop	esi
pop	ecx
retn

loc_70F433:
xor	eax, eax
pop	esi
pop	ecx
retn
sub_70F400 endp

align 10h



sub_70F440 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 28h
push	ebp
push	esi
mov	esi, ecx
mov	al, [esi+20h]
push	edi
mov	[esp+34h+var_1C], esi
mov	[esp+34h+var_18], 0
test	al, al
js	short loc_70F46D
cmp	al, 1
jz	short loc_70F46D
nop

loc_70F460:
mov	ecx, esi
call	sub_70A280
cmp	byte ptr [esi+20h], 3
jz	short loc_70F460

loc_70F46D:
test	byte ptr [esi+70h], 80h
fild	dword ptr [esi+2Ch]
fstp	[esp+34h+var_24]
fild	dword ptr [esi+30h]
fstp	[esp+34h+var_28]
jz	short loc_70F497
fld	[esp+34h+var_24]
fmul	dword ptr [esi+6Ch]
fstp	[esp+34h+var_24]
fld	[esp+34h+var_28]
fmul	dword ptr [esi+6Ch]
fstp	[esp+34h+var_28]

loc_70F497:
fld	[esp+34h+var_28]
mov	eax, [esi+1Ch]
mov	ecx, [esi+18h]
mov	edx, [esi+14h]
mov	ebp, [esp+34h+arg_0]
sub	esp, 8
fstp	[esp+3Ch+var_38]
dec	eax
fld	[esp+3Ch+var_24]
dec	ecx
fstp	[esp+3Ch+var_3C]
push	eax		; int
push	ecx		; int
dec	edx
push	edx		; int
mov	ecx, ebp
call	sub_709710

loc_70F4C3:
mov	eax, [esp+34h+var_1C]
mov	al, [eax+20h]
cmp	al, 1
jz	loc_70F56B
test	al, al
jns	loc_70F56B
push	0
lea	ecx, [esp+38h+var_14]
push	ecx
lea	ecx, [esp+3Ch+var_1C]
call	sub_70AE10
cmp	[esp+34h+var_4], 0
jz	short loc_70F51C
fld	[esp+34h+var_8]
sub	esp, 10h
fstp	[esp+44h+var_38]
mov	ecx, ebp
fld	[esp+44h+var_C]
fstp	[esp+44h+var_3C]
fld	[esp+44h+var_10]
fstp	[esp+44h+var_40]
fld	[esp+44h+var_14]
fstp	[esp+44h+var_44]
call	sub_709A80
jmp	short loc_70F4C3

loc_70F51C:
fld	[esp+34h+var_C]
mov	edi, [ebp+8]
lea	esi, [ebp+8]
fstp	[esp+34h+var_24]
fld	[esp+34h+var_8]
shr	edi, 8
fstp	[esp+34h+var_20]
cmp	edi, [esi+4]
jb	short loc_70F542
push	edi
mov	ecx, esi
call	sub_709200

loc_70F542:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
mov	edx, [esp+34h+var_24]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+34h+var_20]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
jmp	loc_70F4C3

loc_70F56B:
pop	edi
pop	esi
pop	ebp
add	esp, 28h
retn	4
sub_70F440 endp

align 10h



sub_70F580 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 54h
push	ebx
push	esi
mov	esi, ecx
push	esi
lea	ecx, [esp+60h+var_28]
mov	[esp+60h+var_40], esi
call	sub_70C440
lea	eax, [esp+5Ch+var_50]
push	eax
lea	ecx, [esp+60h+var_4C]
push	ecx
lea	edx, [esp+64h+var_48]
push	edx
mov	ecx, esi
call	sub_70C590
fild	[esp+5Ch+var_18]
fld	[esp+5Ch+var_4]
mov	eax, [esp+5Ch+var_50]
fld	st
mov	ecx, [esp+5Ch+var_4C]
mov	edx, [esp+5Ch+var_48]
fmulp	st(2), st
mov	ebx, [esp+5Ch+arg_0]
fxch	st(1)
sub	esp, 8
fstp	[esp+64h+var_54]
dec	eax
fld	[esp+64h+var_54]
dec	ecx
fstp	[esp+64h+var_60]
dec	edx
fimul	[esp+64h+var_1C]
fstp	[esp+64h+var_54]
fld	[esp+64h+var_54]
fstp	[esp+64h+var_64]
push	eax		; int
push	ecx		; int
push	edx		; int
mov	ecx, ebx
call	sub_709710
mov	eax, [esp+5Ch+var_24]
cmp	eax, [esp+5Ch+var_20]
jnb	loc_70F6A2
push	edi

loc_70F603:
push	0
lea	ecx, [esp+64h+var_3C]
push	ecx
lea	ecx, [esp+68h+var_28]
call	sub_70B110
cmp	[esp+60h+var_2C], 0
jz	short loc_70F645
fld	[esp+60h+var_30]
sub	esp, 10h
fstp	[esp+70h+var_64]
mov	ecx, ebx
fld	[esp+70h+var_34]
fstp	[esp+70h+var_68]
fld	[esp+70h+var_38]
fstp	[esp+70h+var_6C]
fld	[esp+70h+var_3C]
fstp	[esp+70h+var_70]
call	sub_709A80
jmp	short loc_70F693

loc_70F645:
fld	[esp+60h+var_34]
mov	edi, [ebx+8]
lea	esi, [ebx+8]
fstp	[esp+60h+var_48]
fld	[esp+60h+var_30]
shr	edi, 8
fstp	[esp+60h+var_44]
cmp	edi, [esi+4]
jb	short loc_70F66B
push	edi
mov	ecx, esi
call	sub_709200

loc_70F66B:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
mov	edx, [esp+60h+var_48]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+60h+var_44]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebx+28h]
inc	dword ptr [eax+4]
mov	esi, [esp+60h+var_40]

loc_70F693:
mov	eax, [esp+60h+var_24]
cmp	eax, [esp+60h+var_20]
jb	loc_70F603
pop	edi

loc_70F6A2:
lea	ecx, [esp+5Ch+var_28]
push	ecx
mov	ecx, esi
call	sub_70C620
pop	esi
pop	ebx
add	esp, 54h
retn	4
sub_70F580 endp

align 10h



sub_70F6C0 proc	near
add	ecx, 10h
jmp	sub_70EC10
sub_70F6C0 endp

align 10h



sub_70F6D0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
mov	esi, [ebx+4]
push	edi
push	ebx
call	sub_70D3E0
cmp	edi, esi
jbe	short loc_70F706
sub	edi, esi
mov	ecx, [ebx]
lea	eax, [esi+esi*2]
lea	ebx, [ecx+eax*8]
jz	short loc_70F706

loc_70F6F3:
test	ebx, ebx
jz	short loc_70F6FE
mov	ecx, ebx
call	sub_6FA090

loc_70F6FE:
add	ebx, 18h
sub	edi, 1
jnz	short loc_70F6F3

loc_70F706:
pop	edi
pop	esi
pop	ebx
retn	4
sub_70F6D0 endp

align 10h



; int __stdcall	sub_70F710(int,	float, int, int, float)
sub_70F710 proc	near

var_174= dword ptr -174h
var_170= dword ptr -170h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= byte ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_E8=	byte ptr -0E8h
var_C8=	byte ptr -0C8h
var_74=	byte ptr -74h
var_54=	byte ptr -54h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_8]
sub	esp, 15Ch
push	ebx
mov	ebx, ecx
mov	ecx, [eax+68h]
push	ebp
mov	ebp, [ecx+10h]
push	esi
lea	esi, [ebp+8]
push	edi
mov	ecx, esi
call	sub_709300
fld	[esp+16Ch+arg_4]
push	ecx		; float
mov	ecx, esi
fstp	[esp+170h+var_170]
call	sub_708D20
mov	dl, [ebx+24h]
shr	dl, 3
and	dl, 1
mov	[ebp+4Ch], dl
test	byte ptr [ebx+24h], 10h
jz	short loc_70F76F
fld	[esp+16Ch+arg_10]
push	ecx		; float
mov	ecx, [esp+170h+arg_0]
fstp	[esp+170h+var_170]
lea	eax, [ebx+4]
push	eax		; int
call	sub_747020

loc_70F76F:
mov	edi, [esp+16Ch+arg_C]
test	edi, edi
jz	loc_70FBB7
mov	ecx, edi
call	sub_6A58E0
test	byte ptr [ebx+24h], 10h
jz	short loc_70F7B3
fld	[esp+16Ch+arg_10]
push	ecx		; float
fstp	[esp+170h+var_170]
lea	ecx, [ebx+4]
push	ecx
lea	edx, [esp+174h+var_140]
push	edx
mov	ecx, edi
call	sub_6A65C0
mov	ecx, [esp+170h+arg_0]
push	eax		; int
call	sub_747020

loc_70F7B3:
xor	edi, edi
test	byte ptr [ebx+24h], 40h
jz	loc_70FBB0
mov	eax, [ebx]
mov	edx, [eax+24h]
lea	ecx, [esp+16Ch+var_15C]
push	ecx
mov	ecx, ebx
mov	[esp+170h+var_15C], edi
call	edx
cmp	[esp+16Ch+var_15C], 9
jnz	loc_70FBB0
test	byte ptr [eax],	40h
jz	short loc_70F7E6
mov	edi, 1

loc_70F7E6:
test	byte ptr [eax+28h], 40h
jz	short loc_70F7ED
inc	edi

loc_70F7ED:
test	byte ptr [eax+50h], 40h
jz	short loc_70F7F4
inc	edi

loc_70F7F4:
test	byte ptr [eax+78h], 40h
jz	short loc_70F7FB
inc	edi

loc_70F7FB:
test	byte ptr [eax+0A0h], 40h
jz	short loc_70F805
inc	edi

loc_70F805:
test	byte ptr [eax+0C8h], 40h
jz	short loc_70F80F
inc	edi

loc_70F80F:
test	byte ptr [eax+0F0h], 40h
jz	short loc_70F819
inc	edi

loc_70F819:
test	byte ptr [eax+118h], 40h
jz	short loc_70F823
inc	edi

loc_70F823:
test	byte ptr [eax+140h], 40h
jz	short loc_70F82D
inc	edi

loc_70F82D:
cmp	edi, 9
jnz	loc_70FBB0
push	ebx
lea	ecx, [esp+170h+var_74]
call	sub_70CB20
cmp	[esp+16Ch+var_54], 1
jz	short loc_70F88B
lea	ecx, [ecx+0]

loc_70F850:
push	esi
lea	ecx, [esp+170h+var_74]
call	sub_70F440
mov	al, [esp+16Ch+var_54]
cmp	al, 2
jnz	short loc_70F887
jmp	short loc_70F870
align 10h

loc_70F870:
lea	ecx, [esp+16Ch+var_74]
call	sub_70A280
mov	al, [esp+16Ch+var_54]
cmp	al, 3
jz	short loc_70F870

loc_70F887:
cmp	al, 1
jnz	short loc_70F850

loc_70F88B:
cmp	dword ptr [ebp+20h], 9
jnz	loc_70FBB0
fldz
xor	edi, edi
fstp	[esp+16Ch+var_15C]
lea	ecx, [ecx+0]

loc_70F8A0:
fld	ds:flt_1437BA8
lea	eax, [esp+16Ch+var_150]
fld	ds:flt_1437BA4
push	eax
lea	ecx, [esp+170h+var_148]
fxch	st(1)
push	ecx
fst	[esp+174h+var_144]
lea	edx, [esp+174h+var_14C]
fstp	[esp+174h+var_14C]
push	edx
mov	edx, [ebp+2Ch]
fst	[esp+178h+var_148]
lea	eax, [esp+178h+var_144]
fstp	[esp+178h+var_150]
push	eax
mov	ecx, edi
mov	eax, edi
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*8]
push	edx
call	sub_7093A0
fld	[esp+180h+var_150]
fsub	[esp+180h+var_14C]
inc	edi
fld	[esp+180h+var_148]
add	esp, 14h
fsub	[esp+16Ch+var_144]
fmulp	st(1), st
fadd	[esp+16Ch+var_15C]
fstp	[esp+16Ch+var_15C]
cmp	edi, [ebp+20h]
jb	short loc_70F8A0
lea	eax, [esp+16Ch+var_150]
push	eax
lea	ecx, [esp+170h+var_148]
push	ecx
lea	edx, [esp+174h+var_14C]
push	edx
lea	eax, [esp+178h+var_144]
push	eax
mov	ecx, esi
call	sub_708D40
fld	[esp+16Ch+var_15C]
fld	[esp+16Ch+var_150]
fsub	[esp+16Ch+var_14C]
fld	[esp+16Ch+var_148]
fsub	[esp+16Ch+var_144]
fmulp	st(1), st
fstp	[esp+16Ch+var_15C]
fsub	[esp+16Ch+var_15C]
fstp	[esp+16Ch+var_15C]
fld	[esp+16Ch+var_15C]
fabs
fstp	[esp+16Ch+var_15C]
fld	[esp+16Ch+var_15C]
fcomp	ds:dbl_143F790
fnstsw	ax
test	ah, 41h
jp	loc_70FBB0
mov	ecx, [ebp+2Ch]
mov	edi, [ecx]
mov	ebp, [edi+0Ch]
mov	eax, [edi+10h]
xor	edx, edx
test	ebp, ebp
setl	dl
xor	ecx, ecx
test	eax, eax
setl	cl
cmp	edx, ecx
jz	loc_70FBB0
cmp	dword ptr [edi+14h], 0
jge	loc_70FBB0
mov	[esp+16Ch+var_15C], ebp
test	ebp, ebp
jge	short loc_70F9A4
mov	[esp+16Ch+var_15C], eax

loc_70F9A4:
mov	ecx, esi
call	sub_709300
mov	edx, [esp+16Ch+var_15C]
push	0FFFFFFFFh
push	0FFFFFFFFh
push	edx
mov	ecx, esi
call	sub_709680
fld	[esp+16Ch+var_144]
mov	ebp, [esi+8]
fstp	[esp+16Ch+var_158]
fld	[esp+16Ch+var_14C]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+16Ch+var_154]
cmp	ebp, [edi+4]
jb	short loc_70F9E1
push	ebp
mov	ecx, edi
call	sub_709200

loc_70F9E1:
mov	ecx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [ecx+ebp*4]
mov	edx, [esp+16Ch+var_158]
mov	ecx, [esp+16Ch+var_154]
and	eax, 0FFh
mov	[ebp+eax*8+0], edx
mov	[ebp+eax*8+4], ecx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
fld	[esp+16Ch+var_148]
mov	ebp, [esi+8]
fstp	[esp+16Ch+var_158]
fld	[esp+16Ch+var_14C]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+16Ch+var_154]
cmp	ebp, [edi+4]
jb	short loc_70FA2C
push	ebp
mov	ecx, edi
call	sub_709200

loc_70FA2C:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [edx+ebp*4]
mov	ecx, [esp+16Ch+var_158]
mov	edx, [esp+16Ch+var_154]
and	eax, 0FFh
mov	[ebp+eax*8+0], ecx
mov	[ebp+eax*8+4], edx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
fld	[esp+16Ch+var_148]
mov	ebp, [esi+8]
fstp	[esp+16Ch+var_158]
fld	[esp+16Ch+var_150]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+16Ch+var_154]
cmp	ebp, [edi+4]
jb	short loc_70FA77
push	ebp
mov	ecx, edi
call	sub_709200

loc_70FA77:
mov	ecx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [ecx+ebp*4]
mov	edx, [esp+16Ch+var_158]
mov	ecx, [esp+16Ch+var_154]
and	eax, 0FFh
mov	[ebp+eax*8+0], edx
mov	[ebp+eax*8+4], ecx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
fld	[esp+16Ch+var_144]
mov	ebp, [esi+8]
fstp	[esp+16Ch+var_158]
fld	[esp+16Ch+var_150]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+16Ch+var_154]
cmp	ebp, [edi+4]
jb	short loc_70FAC2
push	ebp
mov	ecx, edi
call	sub_709200

loc_70FAC2:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [edx+ebp*4]
mov	ecx, [esp+16Ch+var_158]
mov	edx, [esp+16Ch+var_154]
and	eax, 0FFh
mov	[ebp+eax*8+0], ecx
mov	[ebp+eax*8+4], edx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
mov	ecx, esi
call	sub_709790
mov	eax, [ebx]
mov	edx, [eax+24h]
lea	ecx, [esp+16Ch+var_110]
push	ecx
mov	ecx, ebx
call	edx
lea	ecx, [esp+16Ch+var_108]
mov	edi, eax
call	sub_64E8E0
fld1
mov	eax, [esp+16Ch+var_15C]
push	0		; int
push	ecx		; float
mov	ecx, [esp+174h+arg_8]
fstp	[esp+174h+var_174]
lea	eax, [eax+eax*4]
push	ecx		; int
lea	edi, [edi+eax*8]
lea	edx, [esp+178h+var_10C]
push	edx		; int
mov	ecx, edi
call	sub_6FC220
fld	[esp+16Ch+var_108]
fstp	[esp+16Ch+var_128]
lea	eax, [esp+16Ch+var_158]
fld	[esp+16Ch+var_104]
push	eax
fstp	[esp+170h+var_124]
lea	ecx, [esp+170h+var_140]
fld	[esp+170h+var_FC]
push	ecx
fstp	[esp+174h+var_11C]
lea	ecx, [esp+174h+var_128]
fld	[esp+174h+var_F8]
fstp	[esp+174h+var_118]
fldz
fst	[esp+174h+var_120]
fst	[esp+174h+var_114]
fld1
fstp	[esp+174h+var_158]
fstp	[esp+174h+var_154]
call	sub_64E9B0
fld	[esp+16Ch+var_140]
fabs
fstp	[esp+16Ch+var_15C]
fld	[esp+16Ch+var_15C]
fld	ds:flt_1432398
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	loc_70FC3B
fld	[esp+16Ch+var_13C]
fabs
fstp	[esp+16Ch+var_15C]
fcomp	[esp+16Ch+var_15C]
fnstsw	ax
test	ah, 5
jp	loc_70FC3D

loc_70FBB0:
mov	edi, [esp+16Ch+arg_C]

loc_70FBB7:
mov	ecx, esi
call	sub_709300
push	ebx
lea	ecx, [esp+170h+var_E8]
call	sub_70CB20
mov	al, [esp+16Ch+var_C8]
cmp	al, 1
jz	loc_70FD31
lea	ebx, [ebx+0]

loc_70FBE0:
cmp	al, 2
jnz	loc_70FD15
mov	edx, [esp+16Ch+arg_8]
mov	ebp, [esp+16Ch+arg_0]
push	edi		; int
push	edx		; float
push	esi		; int
push	ebp		; int
mov	ecx, ebx
call	sub_70F1C0
mov	ecx, esi
call	sub_709300
mov	al, [esp+16Ch+var_C8]
cmp	al, 1
jz	loc_70FD38
cmp	al, 2
jnz	loc_70FD07
nop

loc_70FC20:
lea	ecx, [esp+16Ch+var_E8]
call	sub_70A280
cmp	[esp+16Ch+var_C8], 3
jz	short loc_70FC20
jmp	loc_70FD22

loc_70FC3B:
fstp	st

loc_70FC3D:
lea	ecx, [esp+16Ch+var_140]
call	sub_64E8E0
fld	[esp+16Ch+var_140]
fld	ds:dbl_15FCCB0
fmul	st(1), st
fxch	st(1)
fstp	[esp+16Ch+var_140]
fld	[esp+16Ch+var_13C]
fmul	st, st(1)
fstp	[esp+16Ch+var_13C]
fld	[esp+16Ch+var_138]
fmul	st, st(1)
fstp	[esp+16Ch+var_138]
fld	[esp+16Ch+var_134]
fmul	st, st(1)
fstp	[esp+16Ch+var_134]
fld	[esp+16Ch+var_130]
fmul	st, st(1)
fstp	[esp+16Ch+var_130]
fmul	[esp+16Ch+var_12C]
fstp	[esp+16Ch+var_12C]
fld	[esp+16Ch+var_140]
fstp	dword ptr [edi+10h]
fld	[esp+16Ch+var_13C]
fstp	dword ptr [edi+14h]
fld	[esp+16Ch+var_138]
fstp	dword ptr [edi+18h]
fld	[esp+16Ch+var_134]
fstp	dword ptr [edi+1Ch]
fld	[esp+16Ch+var_130]
fstp	dword ptr [edi+20h]
fld	[esp+16Ch+var_12C]
fstp	dword ptr [edi+24h]
movzx	eax, byte ptr [edi]
cmp	eax, 42h
jnz	short loc_70FCC1
mov	eax, 43h
jmp	short loc_70FCCB

loc_70FCC1:
cmp	eax, 40h
jnz	short loc_70FCCB
mov	eax, 41h

loc_70FCCB:
push	eax
mov	ecx, edi
call	sub_6FA050
mov	edx, [esp+16Ch+arg_C]
mov	eax, [esp+16Ch+arg_8]
mov	ecx, [esp+16Ch+arg_0]
push	edx		; int
push	eax		; float
push	esi		; int
push	ecx		; int
mov	ecx, ebx
call	sub_70F1C0
mov	ecx, esi
call	sub_709300
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 15Ch
retn	14h

loc_70FD07:
lea	ecx, [esp+16Ch+var_E8]
call	sub_70CF00
jmp	short loc_70FD22

loc_70FD15:
push	esi
lea	ecx, [esp+170h+var_E8]
call	sub_70F440

loc_70FD22:
mov	al, [esp+16Ch+var_C8]
cmp	al, 1
jnz	loc_70FBE0

loc_70FD31:
mov	ebp, [esp+16Ch+arg_0]

loc_70FD38:
mov	eax, [esp+16Ch+arg_8]
push	edi		; int
push	eax		; float
push	esi		; int
push	ebp		; int
mov	ecx, ebx
call	sub_70F1C0
mov	ecx, esi
call	sub_709300
test	edi, edi
jz	short loc_70FD73
cmp	dword ptr [edi+164h], 0
jz	short loc_70FD73
mov	ecx, edi
call	sub_6A62B0
add	edi, 160h
push	edi
mov	ecx, ebp
call	sub_7491A0

loc_70FD73:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 15Ch
retn	14h
sub_70F710 endp




; int __stdcall	sub_70FD80(int,	float)
sub_70FD80 proc	near

var_80=	dword ptr -80h
var_74=	byte ptr -74h
var_54=	byte ptr -54h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 74h
push	esi
mov	esi, [esp+78h+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_709300
fld	[esp+7Ch+arg_4]
push	ecx		; float
mov	ecx, esi
fstp	[esp+80h+var_80]
call	sub_708D20
mov	al, [edi+24h]
shr	al, 3
and	al, 1
push	edi
lea	ecx, [esp+80h+var_74]
mov	[esi+44h], al
call	sub_70CB20
cmp	[esp+7Ch+var_54], 1
jz	short loc_70FDD1

loc_70FDC0:
push	esi
lea	ecx, [esp+80h+var_74]
call	sub_70F440
cmp	[esp+7Ch+var_54], 1
jnz	short loc_70FDC0

loc_70FDD1:
pop	edi
pop	esi
add	esp, 74h
retn	8
sub_70FD80 endp

align 10h



; int __stdcall	sub_70FDE0(int,	float, int, int, float)
sub_70FDE0 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_8]
sub	esp, 80h
push	ebx
mov	ebx, ecx
mov	ecx, [eax+68h]
push	ebp
mov	ebp, [ecx+10h]
push	esi
lea	esi, [ebp+8]
push	edi
mov	ecx, esi
call	sub_709300
fld	[esp+90h+arg_4]
push	ecx		; float
mov	ecx, esi
fstp	[esp+94h+var_94]
call	sub_708D20
mov	dl, [ebx+24h]
shr	dl, 3
and	dl, 1
mov	[ebp+4Ch], dl
test	byte ptr [ebx+24h], 10h
jz	short loc_70FE3F
fld	[esp+90h+arg_10]
push	ecx		; float
mov	ecx, [esp+94h+arg_0]
fstp	[esp+94h+var_94]
lea	eax, [ebx+4]
push	eax		; int
call	sub_747020

loc_70FE3F:
mov	edi, [esp+90h+arg_C]
test	edi, edi
jz	loc_71029E
mov	ecx, edi
call	sub_6A58E0
test	byte ptr [ebx+24h], 10h
jz	short loc_70FE83
fld	[esp+90h+arg_10]
push	ecx		; float
fstp	[esp+94h+var_94]
lea	ecx, [ebx+4]
push	ecx
lea	edx, [esp+98h+var_60]
push	edx
mov	ecx, edi
call	sub_6A65C0
mov	ecx, [esp+94h+arg_0]
push	eax		; int
call	sub_747020

loc_70FE83:
xor	edi, edi
test	byte ptr [ebx+24h], 40h
jz	loc_71029E
mov	eax, [ebx]
mov	edx, [eax+24h]
lea	ecx, [esp+90h+var_70]
push	ecx
mov	ecx, ebx
mov	[esp+94h+var_70], edi
call	edx
cmp	[esp+90h+var_70], 9
jnz	loc_71029E
test	byte ptr [eax],	40h
jz	short loc_70FEB6
mov	edi, 1

loc_70FEB6:
test	byte ptr [eax+28h], 40h
jz	short loc_70FEBD
inc	edi

loc_70FEBD:
test	byte ptr [eax+50h], 40h
jz	short loc_70FEC4
inc	edi

loc_70FEC4:
test	byte ptr [eax+78h], 40h
jz	short loc_70FECB
inc	edi

loc_70FECB:
test	byte ptr [eax+0A0h], 40h
jz	short loc_70FED5
inc	edi

loc_70FED5:
test	byte ptr [eax+0C8h], 40h
jz	short loc_70FEDF
inc	edi

loc_70FEDF:
test	byte ptr [eax+0F0h], 40h
jz	short loc_70FEE9
inc	edi

loc_70FEE9:
test	byte ptr [eax+118h], 40h
jz	short loc_70FEF3
inc	edi

loc_70FEF3:
test	byte ptr [eax+140h], 40h
jz	short loc_70FEFD
inc	edi

loc_70FEFD:
cmp	edi, 9
jnz	loc_71029E
push	ebx
lea	ecx, [esp+94h+var_48]
call	sub_70B430
mov	eax, [esp+90h+var_30]
cmp	eax, [esp+90h+var_2C]
jnb	short loc_70FF7D
lea	ebx, [ebx+0]

loc_70FF20:
push	esi
lea	ecx, [esp+94h+var_48]
call	sub_70F580
mov	eax, [esp+90h+var_44]
test	byte ptr [eax],	7
mov	edx, [esp+90h+var_2C]
jnz	short loc_70FF77
cmp	[esp+90h+var_30], edx
jnb	short loc_70FF7D
movzx	edi, word ptr [esp+90h+var_34]
mov	ecx, [esp+90h+var_40]
inc	[esp+90h+var_30]
inc	eax
sub	ecx, edi
mov	[esp+90h+var_44], eax
sub	eax, ecx
sub	eax, 8
cmp	eax, [ecx+4]
jl	short loc_70FF77
mov	ecx, [ecx]
test	ecx, ecx
jz	loc_7102EC
lea	eax, [ecx+8]
mov	[esp+90h+var_44], eax
mov	[esp+90h+var_40], eax
sub	eax, ecx
mov	word ptr [esp+90h+var_34], ax

loc_70FF77:
cmp	[esp+90h+var_30], edx
jb	short loc_70FF20

loc_70FF7D:
cmp	dword ptr [ebp+20h], 9
jnz	loc_71029E
fldz
xor	edi, edi
fstp	[esp+90h+var_70]
nop

loc_70FF90:
fld	ds:flt_1437BA8
lea	ecx, [esp+90h+var_74]
fld	ds:flt_1437BA4
push	ecx
lea	edx, [esp+94h+var_7C]
fxch	st(1)
push	edx
fst	[esp+98h+var_78]
fstp	[esp+98h+var_80]
lea	eax, [esp+98h+var_80]
push	eax
lea	ecx, [esp+9Ch+var_78]
fst	[esp+9Ch+var_7C]
push	ecx
fstp	[esp+0A0h+var_74]
mov	ecx, [ebp+2Ch]
mov	edx, edi
shr	edx, 6
mov	ecx, [ecx+edx*4]
mov	eax, edi
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*8]
push	edx
call	sub_7093A0
fld	[esp+0A4h+var_74]
fsub	[esp+0A4h+var_80]
inc	edi
fld	[esp+0A4h+var_7C]
add	esp, 14h
fsub	[esp+90h+var_78]
fmulp	st(1), st
fadd	[esp+90h+var_70]
fstp	[esp+90h+var_70]
cmp	edi, [ebp+20h]
jb	short loc_70FF90
lea	eax, [esp+90h+var_74]
push	eax
lea	ecx, [esp+94h+var_7C]
push	ecx
lea	edx, [esp+98h+var_80]
push	edx
lea	eax, [esp+9Ch+var_78]
push	eax
mov	ecx, esi
call	sub_708D40
fld	[esp+90h+var_70]
fld	[esp+90h+var_74]
fsub	[esp+90h+var_80]
fld	[esp+90h+var_7C]
fsub	[esp+90h+var_78]
fmulp	st(1), st
fstp	[esp+90h+var_70]
fsub	[esp+90h+var_70]
fstp	[esp+90h+var_70]
fld	[esp+90h+var_70]
fabs
fstp	[esp+90h+var_70]
fld	[esp+90h+var_70]
fcomp	ds:dbl_143F790
fnstsw	ax
test	ah, 41h
jp	loc_71029E
mov	ecx, [ebp+2Ch]
mov	edi, [ecx]
mov	ebp, [edi+0Ch]
mov	eax, [edi+10h]
xor	edx, edx
test	ebp, ebp
setl	dl
xor	ecx, ecx
test	eax, eax
setl	cl
cmp	edx, ecx
jz	loc_71029E
cmp	dword ptr [edi+14h], 0
jge	loc_71029E
mov	[esp+90h+var_70], ebp
test	ebp, ebp
jge	short loc_710094
mov	[esp+90h+var_70], eax

loc_710094:
mov	ecx, esi
call	sub_709300
mov	edx, [esp+90h+var_70]
push	0FFFFFFFFh
push	0FFFFFFFFh
push	edx
mov	ecx, esi
call	sub_709680
fld	[esp+90h+var_78]
mov	ebp, [esi+8]
fstp	[esp+90h+var_68]
fld	[esp+90h+var_80]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+90h+var_64]
cmp	ebp, [edi+4]
jb	short loc_7100D1
push	ebp
mov	ecx, edi
call	sub_709200

loc_7100D1:
mov	ecx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [ecx+ebp*4]
mov	edx, [esp+90h+var_68]
mov	ecx, [esp+90h+var_64]
and	eax, 0FFh
mov	[ebp+eax*8+0], edx
mov	[ebp+eax*8+4], ecx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
fld	[esp+90h+var_7C]
mov	ebp, [esi+8]
fstp	[esp+90h+var_68]
fld	[esp+90h+var_80]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+90h+var_64]
cmp	ebp, [edi+4]
jb	short loc_71011C
push	ebp
mov	ecx, edi
call	sub_709200

loc_71011C:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [edx+ebp*4]
mov	ecx, [esp+90h+var_68]
mov	edx, [esp+90h+var_64]
and	eax, 0FFh
mov	[ebp+eax*8+0], ecx
mov	[ebp+eax*8+4], edx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
fld	[esp+90h+var_7C]
mov	ebp, [esi+8]
fstp	[esp+90h+var_68]
fld	[esp+90h+var_74]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+90h+var_64]
cmp	ebp, [edi+4]
jb	short loc_710167
push	ebp
mov	ecx, edi
call	sub_709200

loc_710167:
mov	ecx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [ecx+ebp*4]
mov	edx, [esp+90h+var_68]
mov	ecx, [esp+90h+var_64]
and	eax, 0FFh
mov	[ebp+eax*8+0], edx
mov	[ebp+eax*8+4], ecx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
fld	[esp+90h+var_78]
mov	ebp, [esi+8]
fstp	[esp+90h+var_68]
fld	[esp+90h+var_74]
lea	edi, [esi+8]
shr	ebp, 8
fstp	[esp+90h+var_64]
cmp	ebp, [edi+4]
jb	short loc_7101B2
push	ebp
mov	ecx, edi
call	sub_709200

loc_7101B2:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ebp, [edx+ebp*4]
mov	ecx, [esp+90h+var_68]
mov	edx, [esp+90h+var_64]
and	eax, 0FFh
mov	[ebp+eax*8+0], ecx
mov	[ebp+eax*8+4], edx
inc	dword ptr [edi]
mov	eax, [esi+28h]
inc	dword ptr [eax+4]
mov	ecx, esi
call	sub_709790
mov	eax, [ebx]
mov	edx, [eax+24h]
lea	ecx, [esp+90h+var_6C]
push	ecx
mov	ecx, ebx
call	edx
lea	ecx, [esp+90h+var_20]
mov	edi, eax
call	sub_64E8E0
fld1
mov	eax, [esp+90h+var_70]
push	0		; int
push	ecx		; float
mov	ecx, [esp+98h+arg_8]
fstp	[esp+98h+var_98]
lea	eax, [eax+eax*4]
push	ecx		; int
lea	edi, [edi+eax*8]
lea	edx, [esp+9Ch+var_24]
push	edx		; int
mov	ecx, edi
call	sub_6FC220
fld	[esp+90h+var_20]
fstp	[esp+90h+var_48]
lea	eax, [esp+90h+var_68]
fld	[esp+90h+var_1C]
push	eax
fstp	[esp+94h+var_44]
lea	ecx, [esp+94h+var_60]
fld	[esp+94h+var_14]
push	ecx
fstp	[esp+98h+var_3C]
lea	ecx, [esp+98h+var_48]
fld	[esp+98h+var_10]
fstp	[esp+98h+var_38]
fldz
fst	[esp+98h+var_40]
fst	[esp+98h+var_34]
fld1
fstp	[esp+98h+var_68]
fstp	[esp+98h+var_64]
call	sub_64E9B0
fld	[esp+90h+var_60]
fabs
fstp	[esp+90h+var_70]
fld	[esp+90h+var_70]
fld	ds:flt_1432398
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_7102F9
fld	[esp+90h+var_5C]
fabs
fstp	[esp+90h+var_70]
fcomp	[esp+90h+var_70]
fnstsw	ax
test	ah, 5
jp	short loc_7102FB

loc_71029E:
mov	ecx, esi
call	sub_709300
test	byte ptr [ebx+24h], 2
mov	edi, [ebx+34h]
mov	eax, [ebx+38h]
mov	ecx, [ebx+3Ch]
mov	edx, edi
mov	[esp+90h+var_40], edx
mov	edx, [ebx+40h]
mov	[esp+90h+var_48], ebx
mov	[esp+90h+var_44], edi
mov	[esp+90h+var_3C], eax
mov	[esp+90h+var_38], ecx
mov	[esp+90h+var_34], edx
mov	[esp+90h+var_30], 0
mov	[esp+90h+var_2C], eax
jz	loc_7103C5
fld	ds:dword_156F414
jmp	loc_7103C7

loc_7102EC:
mov	[esp+90h+var_44], 0
jmp	loc_70FF77

loc_7102F9:
fstp	st

loc_7102FB:
lea	ecx, [esp+90h+var_60]
call	sub_64E8E0
fld	[esp+90h+var_60]
fld	ds:dbl_15FCCB0
fmul	st(1), st
fxch	st(1)
fstp	[esp+90h+var_60]
fld	[esp+90h+var_5C]
fmul	st, st(1)
fstp	[esp+90h+var_5C]
fld	[esp+90h+var_58]
fmul	st, st(1)
fstp	[esp+90h+var_58]
fld	[esp+90h+var_54]
fmul	st, st(1)
fstp	[esp+90h+var_54]
fld	[esp+90h+var_50]
fmul	st, st(1)
fstp	[esp+90h+var_50]
fmul	[esp+90h+var_4C]
fstp	[esp+90h+var_4C]
fld	[esp+90h+var_60]
fstp	dword ptr [edi+10h]
fld	[esp+90h+var_5C]
fstp	dword ptr [edi+14h]
fld	[esp+90h+var_58]
fstp	dword ptr [edi+18h]
fld	[esp+90h+var_54]
fstp	dword ptr [edi+1Ch]
fld	[esp+90h+var_50]
fstp	dword ptr [edi+20h]
fld	[esp+90h+var_4C]
fstp	dword ptr [edi+24h]
movzx	eax, byte ptr [edi]
cmp	eax, 42h
jnz	short loc_71037F
mov	eax, 43h
jmp	short loc_710389

loc_71037F:
cmp	eax, 40h
jnz	short loc_710389
mov	eax, 41h

loc_710389:
push	eax
mov	ecx, edi
call	sub_6FA050
mov	edx, [esp+90h+arg_C]
mov	eax, [esp+90h+arg_8]
mov	ecx, [esp+90h+arg_0]
push	edx		; int
push	eax		; float
push	esi		; int
push	ecx		; int
mov	ecx, ebx
call	sub_70F1C0
mov	ecx, esi
call	sub_709300
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 80h
retn	14h

loc_7103C5:
fld1

loc_7103C7:
fstp	[esp+90h+var_28]
test	eax, eax
jbe	loc_71049A
mov	bp, word ptr [esp+90h+var_34]
jmp	short loc_7103E0
align 10h

loc_7103E0:
test	byte ptr [edi],	7
jnz	loc_710479
mov	eax, [esp+90h+arg_C]
mov	ecx, [esp+90h+arg_8]
mov	edx, [esp+90h+arg_0]
push	eax		; int
push	ecx		; float
push	esi		; int
push	edx		; int
mov	ecx, ebx
call	sub_70F1C0
mov	ecx, esi
call	sub_709300
mov	eax, [esp+90h+var_30]
cmp	eax, [esp+90h+var_2C]
jnb	loc_71049A
test	byte ptr [edi],	7
jnz	short loc_71042A
inc	edi
mov	[esp+90h+var_44], edi
jmp	short loc_71043C

loc_71042A:
lea	ecx, [esp+90h+var_48]
call	sub_70C680
mov	bp, word ptr [esp+90h+var_34]
mov	edi, [esp+90h+var_44]

loc_71043C:
mov	eax, [esp+90h+var_40]
inc	[esp+90h+var_30]
movzx	ecx, bp
sub	eax, ecx
mov	edx, edi
sub	edx, eax
sub	edx, 8
cmp	edx, [eax+4]
jl	short loc_71048C
mov	eax, [eax]
test	eax, eax
jz	short loc_710471
lea	edi, [eax+8]
mov	ebp, edi
sub	ebp, eax
mov	[esp+90h+var_44], edi
mov	[esp+90h+var_40], edi
mov	word ptr [esp+90h+var_34], bp
jmp	short loc_71048C

loc_710471:
xor	edi, edi
mov	[esp+90h+var_44], edi
jmp	short loc_71048C

loc_710479:
push	esi
lea	ecx, [esp+94h+var_48]
call	sub_70F580
mov	bp, word ptr [esp+90h+var_34]
mov	edi, [esp+90h+var_44]

loc_71048C:
mov	eax, [esp+90h+var_2C]
cmp	[esp+90h+var_30], eax
jb	loc_7103E0

loc_71049A:
mov	edi, [esp+90h+arg_C]
mov	ecx, [esp+90h+arg_8]
mov	ebp, [esp+90h+arg_0]
push	edi		; int
push	ecx		; float
push	esi		; int
push	ebp		; int
mov	ecx, ebx
call	sub_70F1C0
mov	ecx, esi
call	sub_709300
test	edi, edi
jz	short loc_7104E3
cmp	dword ptr [edi+164h], 0
jz	short loc_7104E3
mov	ecx, edi
call	sub_6A62B0
add	edi, 160h
push	edi
mov	ecx, ebp
call	sub_7491A0

loc_7104E3:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 80h
retn	14h
sub_70FDE0 endp




; int __stdcall	sub_7104F0(int,	float)
sub_7104F0 proc	near

var_30=	dword ptr -30h
var_24=	byte ptr -24h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	esi
mov	esi, [esp+28h+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_709300
fld	[esp+2Ch+arg_4]
push	ecx		; float
mov	ecx, esi
fstp	[esp+30h+var_30]
call	sub_708D20
mov	al, [edi+24h]
shr	al, 3
and	al, 1
push	edi
lea	ecx, [esp+30h+var_24]
mov	[esi+44h], al
call	sub_70B430
mov	ecx, [esp+2Ch+var_C]
cmp	ecx, [esp+2Ch+var_8]
jnb	short loc_710544

loc_710530:
push	esi
lea	ecx, [esp+30h+var_24]
call	sub_70F580
mov	edx, [esp+2Ch+var_C]
cmp	edx, [esp+2Ch+var_8]
jb	short loc_710530

loc_710544:
pop	edi
pop	esi
add	esp, 24h
retn	8
sub_7104F0 endp

align 10h



; int __stdcall	sub_710550(float, int, int)
sub_710550 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 34h
push	ebp
mov	ebp, ecx
cmp	dword ptr [ebp+20h], 0
jnz	loc_7107C2
push	ebx
push	esi
mov	esi, [esp+40h+arg_4]
test	byte ptr [esi+14h], 10h
push	edi
jz	short loc_710588
mov	eax, [esi+1Ch]
test	eax, 100h
jz	short loc_710588
shr	eax, 9
test	al, 1
jnz	short loc_710584
test	byte ptr [ebp+24h], 1
jnz	short loc_710588

loc_710584:
mov	bl, 1
jmp	short loc_71058A

loc_710588:
xor	bl, bl

loc_71058A:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	3B4h
call	edx
test	eax, eax
jz	short loc_7105B8
mov	ecx, dword_1855FC0
push	ecx
mov	ecx, eax
call	sub_74A470
mov	edi, eax
mov	[esp+38h+var_28], edi
jmp	short loc_7105C4

loc_7105B8:
mov	[esp+38h+var_28], 0
mov	edi, [esp+38h+var_28]

loc_7105C4:
fld	[esp+38h+arg_C]
mov	ecx, dword_1855FC0
fdivr	ds:dbl_15FCE20
lea	eax, [esp+38h+var_1C]
push	eax
mov	[esp+3Ch+var_1C], 83h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	74h
push	ebp
fstp	[esp+44h+var_20]
fld	[esp+44h+var_20]
fmul	ds:dbl_15FD530
fmul	dword ptr [esi+10h]
fstp	[esp+44h+arg_C]
call	edx
test	eax, eax
jz	short loc_71062A
fld	[esp+40h+arg_4]
test	bl, bl
setz	cl
movzx	edx, cl
push	0		; char
push	edx		; char
sub	esp, 8
mov	ecx, eax
fstp	[esp+50h+var_4C]
fld	[esp+50h+var_28]
fstp	[esp+50h+var_50]
call	sub_7496D0
jmp	short loc_71062C

loc_71062A:
xor	eax, eax

loc_71062C:
lea	esi, [edi+8]
mov	ecx, esi
mov	[ebp+20h], eax
call	sub_709300
fld	[esp+40h+arg_4]
push	ecx		; float
mov	ecx, esi
fstp	[esp+44h+var_44]
call	sub_708D20
mov	al, [ebp+24h]
shr	al, 3
and	al, 1
mov	[edi+4Ch], al
test	byte ptr [ebp+24h], 10h
jz	short loc_71066D
fld	[esp+40h+arg_C]
push	ecx		; float
lea	ecx, [ebp+4]
fstp	[esp+44h+var_44]
push	ecx		; int
mov	ecx, [ebp+20h]
call	sub_747020

loc_71066D:
push	ebp
lea	ecx, [esp+44h+var_20]
call	sub_70B430
mov	edx, [ebp+0]
mov	edx, [edx+24h]
lea	eax, [esp+40h+var_2C]
push	eax
mov	ecx, ebp
mov	[esp+44h+var_2C], 0
call	edx
mov	[esp+44h+arg_8], eax
mov	eax, [esp+44h+var_8]
cmp	[esp+44h+var_C], eax
jnb	loc_710781
mov	bx, word ptr [esp+44h+var_10]
mov	edi, [esp+44h+var_20]
lea	esp, [esp+0]

loc_7106B0:
test	byte ptr [edi],	7
jnz	loc_71075C
fld	[esp+44h+arg_0]
push	ecx		; float
fmul	ds:dbl_15FD2F8
mov	ecx, esi
fstp	[esp+48h+var_28]
fld	[esp+48h+var_28]
fstp	[esp+48h+var_48]
call	sub_708E90
mov	ecx, [esp+44h+arg_4]
mov	edx, [esp+44h+var_30]
mov	eax, [esp+44h+arg_8]
push	ecx		; int
mov	ecx, [ebp+20h]
push	0		; float
push	edx		; int
push	eax		; int
push	esi		; int
call	sub_749790
mov	ecx, esi
call	sub_709300
mov	ecx, [esp+44h+var_C]
cmp	ecx, [esp+44h+var_8]
jnb	short loc_71077D
test	byte ptr [edi],	7
jnz	short loc_71070D
inc	edi
mov	[esp+44h+var_20], edi
jmp	short loc_71071F

loc_71070D:
lea	ecx, [esp+44h+var_24]
call	sub_70C680
mov	bx, word ptr [esp+44h+var_10]
mov	edi, [esp+44h+var_20]

loc_71071F:
mov	eax, [esp+44h+var_1C]
inc	[esp+44h+var_C]
movzx	edx, bx
sub	eax, edx
mov	ecx, edi
sub	ecx, eax
sub	ecx, 8
cmp	ecx, [eax+4]
jl	short loc_71076F
mov	eax, [eax]
test	eax, eax
jz	short loc_710754
lea	edi, [eax+8]
mov	ebx, edi
sub	ebx, eax
mov	[esp+44h+var_20], edi
mov	[esp+44h+var_1C], edi
mov	word ptr [esp+44h+var_10], bx
jmp	short loc_71076F

loc_710754:
xor	edi, edi
mov	[esp+44h+var_20], edi
jmp	short loc_71076F

loc_71075C:
push	esi
lea	ecx, [esp+48h+var_24]
call	sub_70F580
mov	bx, word ptr [esp+44h+var_10]
mov	edi, [esp+44h+var_20]

loc_71076F:
mov	edx, [esp+44h+var_8]
cmp	[esp+44h+var_C], edx
jb	loc_7106B0

loc_71077D:
mov	edi, [esp+44h+var_34]

loc_710781:
fld	[esp+44h+arg_0]
push	ecx		; float
fmul	ds:dbl_15FD2F8
mov	ecx, esi
fstp	[esp+48h+arg_0]
fld	[esp+48h+arg_0]
fstp	[esp+48h+var_48]
call	sub_708E90
mov	eax, [esp+44h+arg_4]
mov	ecx, [esp+44h+var_30]
mov	edx, [esp+44h+arg_8]
push	eax		; int
push	0		; float
push	ecx		; int
mov	ecx, [ebp+20h]
push	edx		; int
push	esi		; int
call	sub_749790
mov	ecx, edi
call	sub_64A400
pop	edi
pop	esi
pop	ebx

loc_7107C2:
pop	ebp
add	esp, 34h
retn	0Ch
sub_710550 endp

align 10h



sub_7107D0 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_6C=	dword ptr -6Ch
var_54=	byte ptr -54h
arg_4= dword ptr  8
arg_C= dword ptr  10h

sub	esp, 88h
push	edi
mov	edi, ecx
cmp	dword ptr [edi+20h], 0
jnz	loc_7109DA
push	ebx
push	ebp
mov	ebp, [esp+94h+arg_4]
test	byte ptr [ebp+14h], 10h
push	esi
jz	short loc_71080E
mov	eax, [ebp+1Ch]
test	eax, 100h
jz	short loc_71080E
shr	eax, 9
test	al, 1
jnz	short loc_71080A
test	byte ptr [edi+24h], 1
jnz	short loc_71080E

loc_71080A:
mov	bl, 1
jmp	short loc_710810

loc_71080E:
xor	bl, bl

loc_710810:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	3B4h
call	edx
test	eax, eax
jz	short loc_71083C
mov	ecx, dword_1855FC0
push	ecx
mov	ecx, eax
call	sub_74A470
mov	[esp+8Ch+var_78], eax
jmp	short loc_710844

loc_71083C:
mov	[esp+8Ch+var_78], 0

loc_710844:
fld	[esp+8Ch+arg_C]
mov	ecx, dword_1855FC0
fdivr	ds:dbl_15FCE20
lea	eax, [esp+8Ch+var_7C]
push	eax
mov	[esp+90h+var_7C], 83h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	74h
push	edi
fstp	[esp+98h+var_6C]
fld	[esp+98h+var_6C]
fmul	ds:dbl_15FD530
fmul	dword ptr [ebp+10h]
fstp	[esp+98h+var_74]
call	edx
test	eax, eax
jz	short loc_7108AD
fld	[esp+94h+var_7C]
test	bl, bl
setz	cl
movzx	edx, cl
push	0		; char
push	edx		; char
sub	esp, 8
mov	ecx, eax
fstp	[esp+0A4h+var_A0]
fld	[esp+0A4h+var_74]
fstp	[esp+0A4h+var_A4]
call	sub_7496D0
jmp	short loc_7108AF

loc_7108AD:
xor	eax, eax

loc_7108AF:
mov	esi, [esp+94h+var_80]
add	esi, 8
mov	ecx, esi
mov	[edi+20h], eax
call	sub_709300
fld	[esp+94h+var_7C]
push	ecx		; float
mov	ecx, esi
fstp	[esp+98h+var_98]
call	sub_708D20
mov	al, [edi+24h]
mov	ecx, [esp+94h+var_80]
shr	al, 3
and	al, 1
mov	[ecx+4Ch], al
test	byte ptr [edi+24h], 10h
jz	short loc_7108FB
fld	[esp+94h+arg_C]
push	ecx		; float
mov	ecx, [edi+20h]
fstp	[esp+98h+var_98]
lea	edx, [edi+4]
push	edx		; int
call	sub_747020

loc_7108FB:
push	edi
lea	ecx, [esp+98h+var_70]
call	sub_70CB20
mov	eax, [edi]
mov	edx, [eax+24h]
lea	ecx, [esp+94h+var_78]
push	ecx
mov	ecx, edi
mov	[esp+98h+var_78], 0
call	edx
mov	ebx, eax
mov	al, [esp+98h+var_54]
cmp	al, 1
jz	short loc_71099F

loc_710925:
cmp	al, 2
jnz	short loc_71098D
fld	[esp+98h+var_80]
push	ecx		; float
fmul	ds:dbl_15FD2F8
mov	ecx, esi
fstp	[esp+9Ch+var_88]
fld	[esp+9Ch+var_88]
fstp	[esp+9Ch+var_9C]
call	sub_708E90
mov	eax, [esp+98h+var_7C]
mov	ecx, [edi+20h]
push	ebp		; int
push	0		; float
push	eax		; int
push	ebx		; int
push	esi		; int
call	sub_749790
mov	ecx, esi
call	sub_709300
mov	al, [esp+98h+var_54]
cmp	al, 1
jz	short loc_71099F
cmp	al, 2
jnz	short loc_710982
jmp	short loc_710970
align 10h

loc_710970:
lea	ecx, [esp+98h+var_74]
call	sub_70A280
cmp	[esp+98h+var_54], 3
jz	short loc_710970
jmp	short loc_710997

loc_710982:
lea	ecx, [esp+98h+var_74]
call	sub_70CF00
jmp	short loc_710997

loc_71098D:
push	esi
lea	ecx, [esp+9Ch+var_74]
call	sub_70F440

loc_710997:
mov	al, [esp+98h+var_54]
cmp	al, 1
jnz	short loc_710925

loc_71099F:
fld	[esp+98h+var_80]
push	ecx		; float
fmul	ds:dbl_15FD2F8
mov	ecx, esi
fstp	[esp+9Ch+var_88]
fld	[esp+9Ch+var_88]
fstp	[esp+9Ch+var_9C]
call	sub_708E90
mov	ecx, [esp+98h+var_7C]
push	ebp		; int
push	0		; float
push	ecx		; int
mov	ecx, [edi+20h]
push	ebx		; int
push	esi		; int
call	sub_749790
mov	ecx, [esp+98h+var_84]
call	sub_64A400
pop	esi
pop	ebp
pop	ebx

loc_7109DA:
pop	edi
add	esp, 88h
retn	0Ch
sub_7107D0 endp

align 10h



sub_7109F0 proc	near
mov	eax, ecx
fld1
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_143F798
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]
mov	dword ptr [eax+10h], 3
fld	ds:flt_15AACC4
mov	ecx, 2
fstp	dword ptr [eax+1Ch]
mov	[eax+14h], ecx
mov	[eax+18h], ecx
xor	ecx, ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], cl
fst	dword ptr [eax+34h]
fld	ds:flt_143F788
mov	edx, 80000001h
fst	dword ptr [eax+38h]
mov	[eax+3Ch], ecx
mov	[eax+40h], ecx
fxch	st(1)
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
mov	[eax+54h], ecx
mov	[eax+58h], ecx
fst	dword ptr [eax+68h]
fst	dword ptr [eax+6Ch]
mov	[eax+5Ch], ecx
fldz
mov	dword ptr [eax+60h], 7FFFFFFFh
fst	dword ptr [eax+70h]
mov	[eax+64h], edx
fst	dword ptr [eax+74h]
mov	[eax+78h], cl
fxch	st(1)
fst	dword ptr [eax+7Ch]
fxch	st(2)
fstp	dword ptr [eax+80h]
mov	[eax+84h], ecx
fxch	st(1)
mov	[eax+88h], ecx
mov	[eax+8Ch], ecx
mov	[eax+90h], ecx
mov	[eax+94h], ecx
mov	[eax+98h], ecx
mov	[eax+9Ch], ecx
mov	[eax+0A0h], ecx
fst	dword ptr [eax+0B0h]
fstp	dword ptr [eax+0B4h]
mov	[eax+0A4h], ecx
mov	dword ptr [eax+0A8h], 7FFFFFFFh
fst	dword ptr [eax+0B8h]
mov	[eax+0ACh], edx
fstp	dword ptr [eax+0BCh]
mov	[eax+0C0h], cl
retn
sub_7109F0 endp

align 10h



sub_710B00 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+94h]
call	sub_74CD90
lea	ecx, [esi+84h]
call	sub_74CD90
lea	ecx, [esi+4Ch]
call	sub_74CD90
lea	ecx, [esi+3Ch]
call	sub_74CD90
lea	ecx, [esi+20h]
call	sub_74CD90
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_710B4D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_710B4D:
mov	eax, esi
pop	esi
retn	4
sub_710B00 endp

align 10h



sub_710B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebp
push	esi
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_710B70
lea	esi, [edi+28h]

loc_710B70:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_710B86
mov	ecx, esi
call	sub_6A9C60

loc_710B86:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	ebp, cl
inc	eax
push	ebp
mov	[esi+2Ch], eax
lea	esi, [edi+14h]
push	offset aGfx_readlinest ; "  GFx_ReadLineStyles:	count =	%d\n"
push	esi
call	nullsub_2
add	esp, 0Ch
cmp	ebp, 0FFh
jnz	short loc_710BC9
mov	ecx, edi
call	sub_667800
movzx	ebp, ax
push	ebp
push	offset aGfx_readline_0 ; "  GFx_ReadLineStyles:	count2 = %d\n"
push	esi
call	nullsub_2
add	esp, 0Ch

loc_710BC9:
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_710BD6
lea	eax, [edi+28h]

loc_710BD6:
mov	ecx, [eax+34h]
sub	ecx, [eax+30h]
add	ecx, [eax+2Ch]
mov	[esp+0Ch+var_4], ecx
test	ebx, ebx
jz	short loc_710C32
mov	esi, [ebx+4]
lea	edx, [esi+ebp]
push	edx
mov	ecx, ebx
call	sub_70F6D0
test	ebp, ebp
jbe	short loc_710C2A
lea	esi, [esi+esi*2]
add	esi, esi
add	esi, esi
add	esi, esi

loc_710C02:
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_710C0F
lea	eax, [edi+28h]

loc_710C0F:
mov	byte ptr [eax+15h], 0
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [ebx]
push	eax
push	edi
add	ecx, esi
call	sub_6FC0A0
add	esi, 18h
sub	ebp, 1
jnz	short loc_710C02

loc_710C2A:
mov	eax, [esp+0Ch+var_4]
pop	esi
pop	ebp
pop	ecx
retn

loc_710C32:
test	ebp, ebp
jbe	short loc_710C4D
push	ebp
push	offset aErrorGfx_readl ; "Error: GFx_ReadLineStyles, trying to re"...
push	esi
call	sub_6EFF90
mov	eax, [esp+18h+var_4]
add	esp, 0Ch
pop	esi
pop	ebp
pop	ecx
retn

loc_710C4D:
pop	esi
mov	eax, ecx
pop	ebp
pop	ecx
retn
sub_710B60 endp

align 10h



sub_710C60 proc	near
fldz
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143F6C8
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
push	1		; Value
lea	eax, [esi+14h]
fst	dword ptr [esi+0Ch]
push	eax		; Target
fstp	dword ptr [esi+10h]
call	ds:InterlockedExchange
fldz
xor	eax, eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+20h], eax
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
fst	dword ptr [esi+0Ch]
fstp	dword ptr [esi+10h]
mov	[esi+24h], al
mov	[esi+25h], al
mov	eax, esi
pop	esi
retn
sub_710C60 endp

align 10h



sub_710CB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
mov	edx, [esp+14h+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+20h+arg_0]
mov	eax, [esi+28h]
push	edi
mov	edi, ecx
mov	ebp, edx
mov	ebx, 1
mov	[esp+24h+var_14], ecx
mov	[esp+24h+var_10], edx
mov	[esp+24h+var_C], edi
mov	[esp+24h+var_8], ebp
mov	byte ptr [esp+24h+var_4], bl
cmp	eax, [esi+20h]
jnb	short loc_710D08
mov	ebx, [esi+1Ch]
lea	eax, [eax+eax*4]
lea	eax, [ebx+eax*4]
mov	[eax], ecx
mov	ecx, [esp+24h+var_4]
mov	[eax+4], edx
mov	[eax+8], edi
mov	[eax+0Ch], ebp
mov	[eax+10h], ecx
mov	ebx, 1
jmp	short loc_710D15

loc_710D08:
lea	edx, [esp+24h+var_14]
push	edx
lea	ecx, [esi+1Ch]
call	sub_70EB20

loc_710D15:
mov	dl, [esi+34h]
mov	eax, [esp+24h+arg_8]
add	[esi+28h], ebx
add	[esi+30h], ebx
movzx	ecx, dl
cmp	eax, ecx
ja	loc_710E9E
test	eax, eax
jnz	loc_710EA1
test	edi, edi
jnz	short loc_710D3D
xor	ecx, ecx
jmp	short loc_710D46

loc_710D3D:
mov	eax, edi
jge	short loc_710D43
neg	eax

loc_710D43:
lea	ecx, [eax+eax]

loc_710D46:
test	ebp, ebp
jnz	short loc_710D4E
xor	eax, eax
jmp	short loc_710D56

loc_710D4E:
mov	eax, ebp
jge	short loc_710D54
neg	eax

loc_710D54:
add	eax, eax

loc_710D56:
or	eax, ecx
cmp	eax, 8000h
jnb	loc_710DFB
cmp	eax, 80h
jnb	short loc_710DAA
cmp	eax, 8
jnb	short loc_710D8B
cmp	eax, 2
jnb	short loc_710D7E
cmp	eax, ebx
sbb	eax, eax
inc	eax
jmp	loc_710E98

loc_710D7E:
cmp	eax, 4
sbb	eax, eax
add	eax, 3
jmp	loc_710E98

loc_710D8B:
cmp	eax, 20h
jnb	short loc_710D9D
cmp	eax, 10h
sbb	eax, eax
add	eax, 5
jmp	loc_710E98

loc_710D9D:
cmp	eax, 40h
sbb	eax, eax
add	eax, 7
jmp	loc_710E98

loc_710DAA:
cmp	eax, 800h
jnb	short loc_710DD6
cmp	eax, 200h
jnb	short loc_710DC7
cmp	eax, 100h
sbb	eax, eax
add	eax, 9
jmp	loc_710E98

loc_710DC7:
cmp	eax, 400h
sbb	eax, eax
add	eax, 0Bh
jmp	loc_710E98

loc_710DD6:
cmp	eax, 2000h
jnb	short loc_710DEC
cmp	eax, 1000h
sbb	eax, eax
add	eax, 0Dh
jmp	loc_710E98

loc_710DEC:
cmp	eax, 4000h
sbb	eax, eax
add	eax, 0Fh
jmp	loc_710E98

loc_710DFB:
cmp	eax, (offset loc_7FFFFF+1)
jnb	short loc_710E47
cmp	eax, 80000h
jnb	short loc_710E28
cmp	eax, 20000h
jnb	short loc_710E1C
cmp	eax, 10000h
sbb	eax, eax
add	eax, 11h
jmp	short loc_710E98

loc_710E1C:
cmp	eax, 40000h
sbb	eax, eax
add	eax, 13h
jmp	short loc_710E98

loc_710E28:
cmp	eax, 200000h
jnb	short loc_710E3B
cmp	eax, 100000h
sbb	eax, eax
add	eax, 15h
jmp	short loc_710E98

loc_710E3B:
cmp	eax, 400000h
sbb	eax, eax
add	eax, 17h
jmp	short loc_710E98

loc_710E47:
cmp	eax, 8000000h
jnb	short loc_710E6D
cmp	eax, 2000000h
jnb	short loc_710E61
cmp	eax, (offset sub_FFFFFF+1)
sbb	eax, eax
add	eax, 19h
jmp	short loc_710E98

loc_710E61:
cmp	eax, 4000000h
sbb	eax, eax
add	eax, 1Bh
jmp	short loc_710E98

loc_710E6D:
cmp	eax, 20000000h
jnb	short loc_710E80
cmp	eax, 10000000h
sbb	eax, eax
add	eax, 1Dh
jmp	short loc_710E98

loc_710E80:
cmp	eax, 40000000h
jnb	short loc_710E8E
mov	eax, 1Eh
jmp	short loc_710E98

loc_710E8E:
cmp	eax, 80000000h
sbb	eax, eax
add	eax, 20h

loc_710E98:
cmp	dl, al
jb	short loc_710E9E
mov	al, dl

loc_710E9E:
mov	[esi+34h], al

loc_710EA1:
add	[esi+14h], edi
add	[esi+18h], ebp
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	0Ch
sub_710CB0 endp

align 10h



sub_710EC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 14h
mov	edx, [esp+14h+arg_4]
push	ebx
mov	ebx, [esp+18h+arg_C]
push	ebp
mov	ebp, [esp+1Ch+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+28h]
push	edi
mov	edi, [esp+24h+arg_8]
mov	ecx, ebp
mov	[esp+24h+var_14], ecx
mov	[esp+24h+var_10], edx
mov	[esp+24h+var_C], edi
mov	[esp+24h+var_8], ebx
mov	byte ptr [esp+24h+var_4], 0
cmp	eax, [esi+20h]
jnb	short loc_710F1A
mov	ebp, [esi+1Ch]
lea	eax, [eax+eax*4]
lea	eax, [ebp+eax*4+0]
mov	ebp, [esp+24h+arg_0]
mov	[eax], ecx
mov	ecx, [esp+24h+var_4]
mov	[eax+4], edx
mov	[eax+8], edi
mov	[eax+0Ch], ebx
mov	[eax+10h], ecx
jmp	short loc_710F27

loc_710F1A:
lea	edx, [esp+24h+var_14]
push	edx
lea	ecx, [esi+1Ch]
call	sub_70EB20

loc_710F27:
movzx	ecx, byte ptr [esi+34h]
mov	eax, [esp+24h+arg_10]
mov	ebx, 1
add	[esi+28h], ebx
add	[esi+2Ch], ebx
cmp	eax, ecx
ja	loc_7110DE
test	eax, eax
jnz	loc_7110E1
test	ebp, ebp
jnz	short loc_710F52
xor	edi, edi
jmp	short loc_710F5B

loc_710F52:
mov	eax, ebp
jge	short loc_710F58
neg	eax

loc_710F58:
lea	edi, [eax+eax]

loc_710F5B:
mov	eax, [esp+24h+arg_4]
test	eax, eax
jnz	short loc_710F67
xor	edx, edx
jmp	short loc_710F6E

loc_710F67:
jge	short loc_710F6B
neg	eax

loc_710F6B:
lea	edx, [eax+eax]

loc_710F6E:
mov	eax, [esp+24h+arg_8]
test	eax, eax
jnz	short loc_710F7A
xor	ecx, ecx
jmp	short loc_710F81

loc_710F7A:
jge	short loc_710F7E
neg	eax

loc_710F7E:
lea	ecx, [eax+eax]

loc_710F81:
mov	eax, [esp+24h+arg_C]
test	eax, eax
jz	short loc_710F8F
jge	short loc_710F8D
neg	eax

loc_710F8D:
add	eax, eax

loc_710F8F:
or	eax, ecx
or	eax, edx
or	eax, edi
cmp	eax, 8000h
jnb	loc_711038
cmp	eax, 80h
jnb	short loc_710FE7
cmp	eax, 8
jnb	short loc_710FC8
cmp	eax, 2
jnb	short loc_710FBB
cmp	eax, ebx
sbb	eax, eax
inc	eax
jmp	loc_7110D5

loc_710FBB:
cmp	eax, 4
sbb	eax, eax
add	eax, 3
jmp	loc_7110D5

loc_710FC8:
cmp	eax, 20h
jnb	short loc_710FDA
cmp	eax, 10h
sbb	eax, eax
add	eax, 5
jmp	loc_7110D5

loc_710FDA:
cmp	eax, 40h
sbb	eax, eax
add	eax, 7
jmp	loc_7110D5

loc_710FE7:
cmp	eax, 800h
jnb	short loc_711013
cmp	eax, 200h
jnb	short loc_711004
cmp	eax, 100h
sbb	eax, eax
add	eax, 9
jmp	loc_7110D5

loc_711004:
cmp	eax, 400h
sbb	eax, eax
add	eax, 0Bh
jmp	loc_7110D5

loc_711013:
cmp	eax, 2000h
jnb	short loc_711029
cmp	eax, 1000h
sbb	eax, eax
add	eax, 0Dh
jmp	loc_7110D5

loc_711029:
cmp	eax, 4000h
sbb	eax, eax
add	eax, 0Fh
jmp	loc_7110D5

loc_711038:
cmp	eax, (offset loc_7FFFFF+1)
jnb	short loc_711084
cmp	eax, 80000h
jnb	short loc_711065
cmp	eax, 20000h
jnb	short loc_711059
cmp	eax, 10000h
sbb	eax, eax
add	eax, 11h
jmp	short loc_7110D5

loc_711059:
cmp	eax, 40000h
sbb	eax, eax
add	eax, 13h
jmp	short loc_7110D5

loc_711065:
cmp	eax, 200000h
jnb	short loc_711078
cmp	eax, 100000h
sbb	eax, eax
add	eax, 15h
jmp	short loc_7110D5

loc_711078:
cmp	eax, 400000h
sbb	eax, eax
add	eax, 17h
jmp	short loc_7110D5

loc_711084:
cmp	eax, 8000000h
jnb	short loc_7110AA
cmp	eax, 2000000h
jnb	short loc_71109E
cmp	eax, (offset sub_FFFFFF+1)
sbb	eax, eax
add	eax, 19h
jmp	short loc_7110D5

loc_71109E:
cmp	eax, 4000000h
sbb	eax, eax
add	eax, 1Bh
jmp	short loc_7110D5

loc_7110AA:
cmp	eax, 20000000h
jnb	short loc_7110BD
cmp	eax, 10000000h
sbb	eax, eax
add	eax, 1Dh
jmp	short loc_7110D5

loc_7110BD:
cmp	eax, 40000000h
jnb	short loc_7110CB
mov	eax, 1Eh
jmp	short loc_7110D5

loc_7110CB:
cmp	eax, 80000000h
sbb	eax, eax
add	eax, 20h

loc_7110D5:
mov	cl, [esi+34h]
cmp	cl, al
jb	short loc_7110DE
mov	al, cl

loc_7110DE:
mov	[esi+34h], al

loc_7110E1:
mov	edx, [esp+24h+arg_8]
mov	eax, [esp+24h+arg_4]
mov	ecx, [esp+24h+arg_C]
add	ebp, edx
add	[esi+14h], ebp
pop	edi
add	eax, ecx
add	[esi+18h], eax
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	14h
sub_710EC0 endp

align 10h



sub_711110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
sub	eax, [ecx+18h]
mov	edx, [esp+arg_0]
sub	edx, [ecx+14h]
push	0
push	eax
push	edx
call	sub_710CB0
retn	8
sub_711110 endp

align 10h



sub_711130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_C]
push	esi
mov	esi, [esp+4+arg_8]
push	0
sub	edx, eax
sub	eax, [ecx+18h]
push	edx
mov	edx, [esp+0Ch+arg_0]
sub	esi, edx
sub	edx, [ecx+14h]
push	esi
push	eax
push	edx
call	sub_710EC0
pop	esi
retn	10h
sub_711130 endp

align 10h



sub_711160 proc	near
mov	edx, [ecx+14h]
mov	eax, [ecx+0Ch]
push	esi
cmp	edx, eax
jnz	short loc_711173
mov	esi, [ecx+18h]
cmp	esi, [ecx+10h]
jz	short loc_711184

loc_711173:
mov	esi, [ecx+10h]
sub	esi, [ecx+18h]
push	0
push	esi
sub	eax, edx
push	eax
call	sub_710CB0

loc_711184:
pop	esi
retn
sub_711160 endp

align 10h



; int __stdcall	sub_711190(int,	float, int, int)
sub_711190 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	ds:flt_15A0D44
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
fld	[esp+8+arg_4]
mov	eax, [esp+8+arg_0]
push	edx		; int
push	ecx		; float
fstp	[esp+10h+var_10]
push	eax		; int
call	sub_70F710
retn	10h
sub_711190 endp

align 10h



; int __stdcall	sub_7111C0(int,	float)
sub_7111C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
mov	eax, [esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
call	sub_70FD80
retn	8
sub_7111C0 endp

align 10h



sub_7111E0 proc	near

arg_0= word ptr	 4

fldz
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143F6C8
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
push	1		; Value
lea	eax, [esi+14h]
fst	dword ptr [esi+0Ch]
push	eax		; Target
fstp	dword ptr [esi+10h]
call	ds:InterlockedExchange
fldz
mov	dx, [esp+4+arg_0]
xor	eax, eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+20h], eax
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
xor	ecx, ecx
fst	dword ptr [esi+0Ch]
fstp	dword ptr [esi+10h]
mov	[esi+24h], al
mov	[esi+25h], al
mov	dword ptr [esi], offset	off_143F838
mov	[esi+28h], eax
mov	[esi+2Ch], eax
mov	[esi+30h], cx
mov	[esi+32h], dx
mov	[esi+34h], eax
mov	[esi+38h], eax
mov	[esi+3Ch], eax
mov	[esi+40h], ax
mov	eax, esi
pop	esi
retn	4
sub_7111E0 endp




sub_711250 proc	near
lea	eax, [ecx+34h]
retn
sub_711250 endp

align 10h



sub_711260 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+28h]
call	sub_70A070
mov	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_143F6C8
test	ecx, ecx
jz	short loc_71127E
push	esi
call	sub_705BC0

loc_71127E:
mov	ecx, [esi+20h]
mov	dword ptr [esi+18h], 0
test	ecx, ecx
jz	short loc_711294
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_711294:
test	[esp+4+arg_0], 1
mov	dword ptr [esi+20h], 0
jz	short loc_7112B0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7112B0:
mov	eax, esi
pop	esi
retn	4
sub_711260 endp

align 10h



; int __stdcall	sub_7112C0(int,	float, int, int)
sub_7112C0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	ds:flt_15A0D44
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
fld	[esp+8+arg_4]
mov	eax, [esp+8+arg_0]
push	edx		; int
push	ecx		; float
fstp	[esp+10h+var_10]
push	eax		; int
call	sub_70FDE0
retn	10h
sub_7112C0 endp

align 10h



; int __stdcall	sub_7112F0(int,	float)
sub_7112F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
mov	eax, [esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
call	sub_7104F0
retn	8
sub_7112F0 endp

align 10h



; int __stdcall	sub_711310(int,	float, int, int)
sub_711310 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	dword ptr [ecx+3Ch]
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
fld	[esp+8+arg_4]
mov	eax, [esp+8+arg_0]
push	edx		; int
push	ecx		; float
fstp	[esp+10h+var_10]
push	eax		; int
call	sub_70F710
retn	10h
sub_711310 endp

align 10h



sub_711340 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	edx, [ebx]
lea	ecx, [eax+eax*4]
push	esi
lea	esi, [edx+ecx*8-28h]
test	eax, eax
jbe	short loc_711367
push	edi
mov	edi, eax

loc_711357:
mov	ecx, esi
call	sub_6FA020
sub	esi, 28h
sub	edi, 1
jnz	short loc_711357
pop	edi

loc_711367:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
retn
sub_711340 endp

align 10h



sub_711380 proc	near
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esi+5Ch]
mov	dword ptr [esi], offset	off_143F888
call	sub_70C7F0
mov	eax, [esi+54h]
mov	edx, [esi+50h]
lea	ecx, [eax+eax*4]
lea	edi, [edx+ecx*8-28h]
test	eax, eax
jbe	short loc_7113B6
push	ebx
mov	ebx, eax

loc_7113A6:
mov	ecx, edi
call	sub_6FA020
sub	edi, 28h
sub	ebx, 1
jnz	short loc_7113A6
pop	ebx

loc_7113B6:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+50h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+44h]
call	sub_70A070
lea	ecx, [esi+28h]
call	sub_70A070
mov	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_143F6C8
test	ecx, ecx
jz	short loc_7113EA
push	esi
call	sub_705BC0

loc_7113EA:
mov	ecx, [esi+20h]
mov	dword ptr [esi+18h], 0
test	ecx, ecx
jz	short loc_711400
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_711400:
pop	edi
mov	dword ptr [esi+20h], 0
pop	esi
retn
sub_711380 endp

align 10h



; int __stdcall	sub_711410(float)
sub_711410 proc	near

arg_0= dword ptr  4

fld	[esp+arg_0]
fstp	dword ptr [ecx+68h]
retn	4
sub_711410 endp

align 10h



sub_711420 proc	near
fld	dword ptr [ecx+68h]
retn
sub_711420 endp

align 10h



sub_711430 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+54h]
mov	edx, [esp+arg_0]
mov	[edx], eax
cmp	dword ptr [ecx+54h], 0
jbe	short loc_711445
mov	eax, [ecx+50h]
retn	4

loc_711445:
xor	eax, eax
retn	4
sub_711430 endp

align 10h



sub_711450 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+60h]
mov	edx, [esp+arg_0]
mov	[edx], eax
cmp	dword ptr [ecx+60h], 0
jbe	short loc_711465
mov	eax, [ecx+5Ch]
retn	4

loc_711465:
xor	eax, eax
retn	4
sub_711450 endp

align 10h



sub_711470 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [ecx+54h]
mov	edx, [esp+arg_4]
mov	[edx], eax
mov	eax, [ecx+60h]
mov	edx, [esp+arg_C]
mov	[edx], eax
cmp	dword ptr [ecx+54h], 0
jbe	short loc_71148D
mov	eax, [ecx+50h]
jmp	short loc_71148F

loc_71148D:
xor	eax, eax

loc_71148F:
mov	edx, [esp+arg_0]
mov	[edx], eax
cmp	dword ptr [ecx+60h], 0
jbe	short loc_7114A7
mov	ecx, [ecx+5Ch]
mov	eax, [esp+arg_8]
mov	[eax], ecx
retn	10h

loc_7114A7:
mov	ecx, [esp+arg_8]
xor	eax, eax
mov	[ecx], eax
retn	10h
sub_711470 endp

align 10h



sub_7114C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [ecx+54h]
mov	[eax+48h], edx
cmp	dword ptr [eax+48h], 0
mov	edx, [ecx+60h]
mov	[eax+4Ch], edx
jbe	short loc_7114DB
mov	edx, [ecx+50h]
jmp	short loc_7114DD

loc_7114DB:
xor	edx, edx

loc_7114DD:
cmp	dword ptr [eax+4Ch], 0
mov	[eax+4], edx
jbe	short loc_7114EF
mov	ecx, [ecx+5Ch]
mov	[eax+8], ecx
retn	4

loc_7114EF:
xor	ecx, ecx
mov	[eax+8], ecx
retn	4
sub_7114C0 endp

align 10h



sub_711500 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [ecx+6Ch]
fstp	dword ptr [eax]
fld	dword ptr [ecx+70h]
fstp	dword ptr [eax+4]
fld	dword ptr [ecx+74h]
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+78h]
fstp	dword ptr [eax+0Ch]
retn	4
sub_711500 endp

align 10h



sub_711520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
fld	dword ptr [eax+4]
fstp	[esp+8+arg_0]
fld	dword ptr [eax+8]
fstp	[esp+8+var_8]
fld	dword ptr [eax+0Ch]
fstp	[esp+8+var_4]
fld	dword ptr [eax]
fstp	dword ptr [ecx+6Ch]
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+70h]
fld	[esp+8+var_8]
fstp	dword ptr [ecx+74h]
fld	[esp+8+var_4]
fstp	dword ptr [ecx+78h]
add	esp, 8
retn	4
sub_711520 endp

align 10h



; int __stdcall	sub_711560(int,	float, int, int)
sub_711560 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	dword ptr [ecx+68h]
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
fld	[esp+8+arg_4]
mov	eax, [esp+8+arg_0]
push	edx		; int
push	ecx		; float
fstp	[esp+10h+var_10]
push	eax		; int
call	sub_70FDE0
retn	10h
sub_711560 endp

align 10h



; int __stdcall	sub_711590(int,	float)
sub_711590 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
mov	eax, [esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
add	ecx, 10h
call	sub_7104F0
retn	8
sub_711590 endp

align 10h



; int __thiscall sub_7115B0(int, float,	int)
sub_7115B0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	ds:flt_15A0D44
mov	eax, [esp+arg_4]
push	ecx		; int
fstp	[esp+4+var_4]
push	eax		; int
fld	[esp+8+arg_0]
push	ecx		; float
add	ecx, 10h
fstp	[esp+0Ch+var_C]
call	sub_710550
retn	8
sub_7115B0 endp

align 10h



; int __stdcall	sub_7115E0(int,	float)
sub_7115E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
mov	eax, [esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
add	ecx, 10h
call	sub_70FD80
retn	8
sub_7115E0 endp

align 10h



; int __stdcall	sub_711600(float, int)
sub_711600 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	ds:flt_15A0D44
mov	eax, [esp+arg_4]
push	ecx
fstp	[esp+4+var_4]
push	eax
fld	[esp+8+arg_0]
push	ecx
add	ecx, 10h
fstp	[esp+0Ch+var_C]
call	sub_7107D0
retn	8
sub_711600 endp

align 10h



sub_711630 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
mov	esi, [ebx+4]
push	edi
push	ebx
call	sub_70EB90
cmp	edi, esi
jbe	short loc_711666
sub	edi, esi
mov	ecx, [ebx]
lea	eax, [esi+esi*4]
lea	ebx, [ecx+eax*8]
jz	short loc_711666

loc_711653:
test	ebx, ebx
jz	short loc_71165E
mov	ecx, ebx
call	sub_6FA2A0

loc_71165E:
add	ebx, 28h
sub	edi, 1
jnz	short loc_711653

loc_711666:
pop	edi
pop	esi
pop	ebx
retn	4
sub_711630 endp

align 10h



; int __stdcall	sub_711670(int,	float, float, float)
sub_711670 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 54h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
lea	ecx, [esp+64h+var_34]
push	ecx
xor	ebp, ebp
mov	ecx, esi
mov	[esp+68h+var_34], ebp
call	edx
mov	[esp+64h+var_28], eax
cmp	[esp+64h+var_34], ebp
jz	short loc_7116A2
test	byte ptr [esi+24h], 40h
mov	byte ptr [esp+64h+var_54+3], 1
jnz	short loc_7116A7

loc_7116A2:
mov	byte ptr [esp+64h+var_54+3], 0

loc_7116A7:
mov	ebx, [esp+64h+arg_0]
mov	al, [ebx+20h]
mov	[esp+64h+var_50], ebp
cmp	al, 1
jz	loc_711BF8
lea	ebx, [ebx+0]

loc_7116C0:
cmp	al, 2
jnz	loc_71175B
cmp	[esp+64h+var_50], 0
jnz	loc_711AE4

loc_7116D3:
mov	ecx, ebx
call	sub_70A280
cmp	byte ptr [ebx+20h], 3
jz	short loc_7116D3
mov	[esp+64h+var_50], 0

loc_7116E8:
mov	al, [ebx+20h]
cmp	al, 1
jnz	short loc_7116C0
cmp	[esp+64h+var_50], 0
jnz	loc_711AE4
test	ebp, ebp
jz	loc_711BF8
xor	edi, edi
cmp	[ebp+4Ch], edi
jbe	loc_711BF1
lea	ebx, [ebp+8]

loc_711710:
mov	edx, [ebp+58h]
mov	ecx, edi
shr	ecx, 6
mov	ecx, [edx+ecx*4]
mov	eax, edi
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	esi, [ecx+eax*8]
mov	eax, [esi+14h]
lea	edx, [eax+eax*2]
mov	eax, [esp+64h+var_28]
lea	ecx, [eax+edx*8]
movzx	edx, word ptr [ecx+4]
mov	[esp+64h+arg_4], edx
fild	[esp+64h+arg_4]
fcomp	ds:dbl_15FCE20
fnstsw	ax
test	ah, 5
jp	loc_711AFB
fld	ds:flt_15FCCD8
jmp	loc_711AFF

loc_71175B:
mov	eax, [ebx+1Ch]
mov	esi, [ebx+14h]
mov	edi, [ebx+18h]
mov	[esp+64h+var_30], esi
mov	[esp+64h+var_2C], edi
mov	[esp+64h+var_38], eax
test	eax, eax
ja	short loc_711792
xor	eax, eax
test	esi, esi
setz	al
xor	ecx, ecx
test	edi, edi
setz	cl
cmp	eax, ecx
jnz	short loc_711792
mov	ecx, ebx
call	sub_70CF00
jmp	loc_7116E8

loc_711792:
mov	al, [ebx+20h]
mov	[esp+64h+var_24], ebx
mov	[esp+64h+var_20], 0
test	al, al
js	short loc_7117BD
cmp	al, 1
jz	short loc_7117BD
lea	esp, [esp+0]

loc_7117B0:
mov	ecx, ebx
call	sub_70A280
cmp	byte ptr [ebx+20h], 3
jz	short loc_7117B0

loc_7117BD:
fild	dword ptr [ebx+2Ch]
fstp	[esp+64h+arg_0]
fild	dword ptr [ebx+30h]
fstp	[esp+64h+var_4C]
test	byte ptr [ebx+70h], 80h
jz	short loc_7117E7
fld	[esp+64h+arg_0]
fmul	dword ptr [ebx+6Ch]
fstp	[esp+64h+arg_0]
fld	[esp+64h+var_4C]
fmul	dword ptr [ebx+6Ch]
fstp	[esp+64h+var_4C]

loc_7117E7:
cmp	[esp+64h+arg_4], 0
jz	short loc_711801
mov	ecx, [esp+64h+arg_4]
lea	edx, [esp+64h+var_4C]
push	edx
lea	eax, [esp+68h+arg_0]
push	eax
call	sub_6A5790

loc_711801:
cmp	byte ptr [esp+64h+var_54+3], 0
jz	loc_711890
cmp	[esp+64h+var_38], 0
jbe	short loc_711890
test	ebp, ebp
jnz	short loc_711867
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	0C4h
call	eax
test	eax, eax
jz	short loc_711839
mov	ecx, eax
call	sub_7109F0
mov	esi, eax
jmp	short loc_71183B

loc_711839:
xor	esi, esi

loc_71183B:
fld	ds:flt_15FCCD8
push	ecx		; float
lea	edi, [esi+34h]
fstp	[esp+68h+var_68]
mov	ecx, edi
mov	ebp, esi
call	sub_708D20
fld	dword ptr [edi]
push	ecx		; float
lea	ecx, [esi+7Ch]
fstp	[esp+68h+var_68]
call	sub_708D20
mov	esi, [esp+64h+var_30]
mov	edi, [esp+64h+var_2C]

loc_711867:
fld	[esp+64h+var_4C]
mov	ecx, [esp+64h+var_38]
sub	esp, 8
fstp	[esp+6Ch+var_68]
dec	ecx
fld	[esp+6Ch+arg_0]
fstp	[esp+6Ch+var_6C]
push	ecx		; int
push	0FFFFFFFFh	; int
push	0FFFFFFFFh	; int
lea	ecx, [ebp+34h]
call	sub_709710
jmp	short loc_711890
align 10h

loc_711890:
mov	edx, [esp+64h+var_24]
mov	al, [edx+20h]
cmp	al, 1
jz	loc_7116E8
test	al, al
jns	loc_7116E8
push	0
lea	eax, [esp+68h+var_14]
push	eax
lea	ecx, [esp+6Ch+var_24]
call	sub_70AE10
cmp	[esp+64h+arg_4], 0
jz	short loc_7118D1
lea	ecx, [esp+64h+var_8]
push	ecx
mov	ecx, [esp+68h+arg_4]
lea	edx, [esp+68h+var_C]
push	edx
call	sub_6A5790

loc_7118D1:
fld	[esp+64h+arg_0]
fst	[esp+64h+var_3C]
fld	[esp+64h+var_4C]
fst	[esp+64h+var_48]
fld	[esp+64h+var_C]
fst	[esp+64h+var_40]
fld	[esp+64h+var_8]
fst	[esp+64h+var_44]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_711912
fxch	st(1)
fstp	[esp+64h+var_3C]
fxch	st(2)
fstp	[esp+64h+var_40]
fxch	st(1)
fstp	[esp+64h+var_48]
fstp	[esp+64h+var_44]
jmp	short loc_71191A

loc_711912:
fstp	st(2)
fstp	st(2)
fstp	st
fstp	st

loc_71191A:
cmp	[esp+64h+var_4], 0
jz	loc_7119AD
cmp	[esp+64h+arg_4], 0
jz	short loc_71193F
lea	eax, [esp+64h+var_10]
push	eax
lea	ecx, [esp+68h+var_14]
push	ecx
mov	ecx, [esp+6Ch+arg_4]
call	sub_6A5790

loc_71193F:
xor	edx, edx
test	esi, esi
setz	dl
xor	eax, eax
test	edi, edi
setz	al
cmp	edx, eax
jz	loc_711A21
fld	[esp+64h+arg_C]
sub	esp, 20h
fstp	[esp+84h+var_68]
fld	[esp+84h+arg_8]
fstp	[esp+84h+var_6C]
fld	[esp+84h+var_44]
fstp	[esp+84h+var_70]
fld	[esp+84h+var_40]
fstp	[esp+84h+var_74]
fld	[esp+84h+var_10]
fstp	[esp+84h+var_78]
fld	[esp+84h+var_14]
fstp	[esp+84h+var_7C]
fld	[esp+84h+var_48]
fstp	[esp+84h+var_80]
fld	[esp+84h+var_3C]
fstp	[esp+84h+var_84]
call	sub_70B980
add	esp, 20h
test	al, al
jz	short loc_711A21
xor	[esp+64h+var_50], 1
jmp	short loc_711A21

loc_7119AD:
xor	ecx, ecx
test	esi, esi
setz	cl
xor	edx, edx
test	edi, edi
setz	dl
cmp	ecx, edx
jz	short loc_711A21
fld	[esp+64h+arg_C]
fld	[esp+64h+var_48]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_711A1D
fld	[esp+64h+var_44]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_711A1B
fld	st
fsubrp	st(2), st
fld	[esp+64h+arg_8]
fld	[esp+64h+var_40]
fld	st
fsubp	st(2), st
fxch	st(3)
fmulp	st(1), st
fld	[esp+64h+var_3C]
fsubp	st(3), st
fxch	st(3)
fsubrp	st(1), st
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+64h+var_3C]
fld	[esp+64h+var_3C]
fcomp	ds:SrcStr
fnstsw	ax
test	ah, 41h
jnz	short loc_711A21
xor	[esp+64h+var_50], 1
jmp	short loc_711A21

loc_711A1B:
fstp	st

loc_711A1D:
fstp	st
fstp	st

loc_711A21:
cmp	byte ptr [esp+64h+var_54+3], 0
jz	loc_711ACF
cmp	[esp+64h+var_38], 0
jbe	loc_711ACF
cmp	[esp+64h+var_4], 0
jz	short loc_711A7D
fld	[esp+64h+var_8]
sub	esp, 10h
fstp	[esp+74h+var_68]
lea	ecx, [ebp+34h]
fld	[esp+74h+var_C]
fstp	[esp+74h+var_6C]
fld	[esp+74h+var_10]
fstp	[esp+74h+var_70]
fld	[esp+74h+var_14]
fstp	[esp+74h+var_74]
call	sub_709A80
fld	[esp+64h+var_C]
fstp	[esp+64h+arg_0]
fld	[esp+64h+var_8]
fstp	[esp+64h+var_4C]
jmp	loc_711890

loc_711A7D:
fld	[esp+64h+var_C]
mov	edi, [ebp+3Ch]
lea	esi, [ebp+3Ch]
fstp	[esp+64h+var_1C]
fld	[esp+64h+var_8]
shr	edi, 8
fstp	[esp+64h+var_18]
cmp	edi, [esi+4]
jb	short loc_711AA3
push	edi
mov	ecx, esi
call	sub_709200

loc_711AA3:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+64h+var_1C]
mov	edi, [esp+64h+var_2C]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+64h+var_18]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+5Ch]
inc	dword ptr [eax+4]
mov	esi, [esp+64h+var_30]

loc_711ACF:
fld	[esp+64h+var_C]
fstp	[esp+64h+arg_0]
fld	[esp+64h+var_8]
fstp	[esp+64h+var_4C]
jmp	loc_711890

loc_711AE4:
test	ebp, ebp
jz	short loc_711AEF

loc_711AE8:
mov	ecx, ebp
call	sub_64A400

loc_711AEF:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 54h
retn	10h

loc_711AFB:
fild	[esp+64h+arg_4]

loc_711AFF:
fstp	[esp+64h+arg_4]
fld	[esp+64h+arg_4]
fmul	ds:dbl_15FCC48
fstp	[esp+64h+arg_4]
fld	[esp+64h+arg_4]
fst	dword ptr [ebx]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_711B24
fchs

loc_711B24:
fstp	[esp+64h+arg_4]
fld	[esp+64h+arg_4]
fstp	dword ptr [ebx+4]
movzx	eax, word ptr [ecx+10h]
and	eax, 30h
cmp	eax, 10h
jz	short loc_711B47
sub	eax, 20h
neg	eax
sbb	eax, eax
and	eax, 3
jmp	short loc_711B4C

loc_711B47:
mov	eax, 4

loc_711B4C:
mov	[ebp+10h], eax
movzx	eax, word ptr [ecx+10h]
and	eax, 0C0h
sub	eax, 40h
jz	short loc_711B70
sub	eax, 40h
jz	short loc_711B69
mov	eax, 2
jmp	short loc_711B72

loc_711B69:
mov	eax, 1
jmp	short loc_711B72

loc_711B70:
xor	eax, eax

loc_711B72:
mov	[ebp+14h], eax
movzx	eax, word ptr [ecx+10h]
shr	eax, 2
and	eax, 0C0h
sub	eax, 40h
jz	short loc_711B99
sub	eax, 40h
jz	short loc_711B92
mov	eax, 2
jmp	short loc_711B9B

loc_711B92:
mov	eax, 1
jmp	short loc_711B9B

loc_711B99:
xor	eax, eax

loc_711B9B:
mov	[ebp+18h], eax
mov	al, [ecx+10h]
and	al, 30h
cmp	al, 20h
jnz	short loc_711BAD
fld	dword ptr [ecx+14h]
fstp	dword ptr [ebp+1Ch]

loc_711BAD:
lea	ecx, [ebp+7Ch]
call	sub_709300
push	1
lea	eax, [ebp+7Ch]
push	eax
push	esi
mov	ecx, ebx
call	sub_74C220
fld	[esp+64h+arg_C]
push	1		; char
sub	esp, 8
fstp	[esp+70h+var_6C]
lea	ecx, [ebp+7Ch]
fld	[esp+70h+arg_8]
fstp	[esp+70h+var_70]
call	sub_709440
test	al, al
jnz	loc_711AE8
inc	edi
cmp	edi, [ebp+4Ch]
jb	loc_711710

loc_711BF1:
mov	ecx, ebp
call	sub_64A400

loc_711BF8:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 54h
retn	10h
sub_711670 endp

align 10h



; int __stdcall	sub_711C10(int,	int, float, float)
sub_711C10 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 80h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
lea	ecx, [esp+90h+var_5C]
push	ecx
xor	ebx, ebx
mov	ecx, esi
mov	[esp+94h+var_5C], ebx
call	edx
mov	[esp+90h+var_48], eax
cmp	[esp+90h+var_5C], ebx
jz	short loc_711C45
test	byte ptr [esi+24h], 40h
mov	byte ptr [esp+90h+var_80+3], 1
jnz	short loc_711C49

loc_711C45:
mov	byte ptr [esp+90h+var_80+3], bl

loc_711C49:
mov	ebp, [esp+90h+arg_0]
mov	eax, [ebp+18h]
mov	[esp+90h+var_7C], ebx
cmp	eax, [ebp+1Ch]
jnb	loc_71220D

loc_711C60:
mov	eax, [ebp+4]
test	byte ptr [eax],	7
mov	edi, [esp+90h+arg_4]
jnz	short loc_711CC9
xor	edx, edx
cmp	[esp+90h+var_7C], edx
jnz	loc_712095
mov	ecx, [ebp+18h]
cmp	ecx, [ebp+1Ch]
jnb	short loc_711CB4
movzx	esi, word ptr [ebp+14h]
inc	ecx
mov	[ebp+18h], ecx
mov	ecx, [ebp+8]
inc	eax
mov	[ebp+4], eax
sub	ecx, esi
sub	eax, ecx
sub	eax, 8
cmp	eax, [ecx+4]
jl	short loc_711CB4
mov	ecx, [ecx]
cmp	ecx, edx
jz	short loc_711CBD
lea	eax, [ecx+8]
mov	[ebp+4], eax
mov	[ebp+8], eax
sub	ax, cx
mov	[ebp+14h], ax

loc_711CB4:
mov	[esp+90h+var_7C], edx
jmp	loc_71205F

loc_711CBD:
mov	[ebp+4], edx
mov	[esp+90h+var_7C], edx
jmp	loc_71205F

loc_711CC9:
lea	ecx, [esp+90h+var_60]
push	ecx
lea	edx, [esp+94h+var_54]
push	edx
lea	eax, [esp+98h+var_58]
push	eax
mov	ecx, ebp
call	sub_70C590
mov	esi, [esp+90h+var_60]
test	esi, esi
ja	short loc_711D09
xor	ecx, ecx
cmp	[esp+90h+var_58], ecx
setz	cl
xor	edx, edx
cmp	[esp+90h+var_54], edx
setz	dl
cmp	ecx, edx
jnz	short loc_711D09
mov	ecx, ebp
call	sub_70C680
jmp	loc_71205F

loc_711D09:
push	ebp
lea	ecx, [esp+94h+var_28]
call	sub_70C440
fild	[esp+90h+var_1C]
fld	[esp+90h+var_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+90h+var_78]
fimul	[esp+90h+var_18]
fstp	[esp+90h+var_74]
test	edi, edi
jz	short loc_711D45
lea	eax, [esp+90h+var_74]
push	eax
lea	ecx, [esp+94h+var_78]
push	ecx
mov	ecx, edi
call	sub_6A5790

loc_711D45:
cmp	byte ptr [esp+90h+var_80+3], 0
jz	short loc_711DC0
test	esi, esi
jbe	short loc_711DC0
test	ebx, ebx
jnz	short loc_711DA0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	0C4h
call	eax
test	eax, eax
jz	short loc_711D76
mov	ecx, eax
call	sub_7109F0
mov	esi, eax
jmp	short loc_711D78

loc_711D76:
xor	esi, esi

loc_711D78:
fld	ds:flt_15FCCD8
push	ecx		; float
lea	edi, [esi+34h]
fstp	[esp+94h+var_94]
mov	ecx, edi
mov	ebx, esi
call	sub_708D20
fld	dword ptr [edi]
push	ecx		; float
lea	ecx, [esi+7Ch]
fstp	[esp+94h+var_94]
call	sub_708D20
mov	esi, [esp+90h+var_60]

loc_711DA0:
fld	[esp+90h+var_74]
sub	esp, 8
fstp	[esp+98h+var_94]
dec	esi
fld	[esp+98h+var_78]
lea	ecx, [ebx+34h]
fstp	[esp+98h+var_98]
push	esi		; int
push	0FFFFFFFFh	; int
push	0FFFFFFFFh	; int
call	sub_709710

loc_711DC0:
mov	ecx, [esp+90h+var_24]
cmp	ecx, [esp+90h+var_20]
jnb	loc_71201C
xor	edx, edx
cmp	[esp+90h+var_58], edx
setz	dl
xor	eax, eax
cmp	[esp+90h+var_54], eax
setz	al
mov	esi, edx
mov	[esp+90h+var_4C], esi
mov	edi, eax
mov	[esp+90h+var_50], edi
lea	esp, [esp+0]

loc_711DF0:
push	0
lea	ecx, [esp+94h+var_3C]
push	ecx
lea	ecx, [esp+98h+var_28]
call	sub_70B110
cmp	[esp+90h+arg_4], 0
jz	short loc_711E20
mov	ecx, [esp+90h+arg_4]
lea	edx, [esp+90h+var_30]
push	edx
lea	eax, [esp+94h+var_34]
push	eax
call	sub_6A5790

loc_711E20:
fld	[esp+90h+var_78]
fst	[esp+90h+var_64]
fld	[esp+90h+var_74]
fst	[esp+90h+var_70]
fld	[esp+90h+var_34]
fst	[esp+90h+var_68]
fld	[esp+90h+var_30]
fst	[esp+90h+var_6C]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_711E61
fxch	st(1)
fstp	[esp+90h+var_64]
fxch	st(2)
fstp	[esp+90h+var_68]
fxch	st(1)
fstp	[esp+90h+var_70]
fstp	[esp+90h+var_6C]
jmp	short loc_711E69

loc_711E61:
fstp	st(2)
fstp	st(2)
fstp	st
fstp	st

loc_711E69:
cmp	byte ptr [esp+90h+var_2C], 0
jz	loc_711EF7
cmp	[esp+90h+arg_4], 0
jz	short loc_711E94
lea	ecx, [esp+90h+var_38]
push	ecx
mov	ecx, [esp+94h+arg_4]
lea	edx, [esp+94h+var_3C]
push	edx
call	sub_6A5790

loc_711E94:
cmp	esi, edi
jz	loc_711F63
fld	[esp+90h+arg_C]
sub	esp, 20h
fstp	[esp+0B0h+var_94]
fld	[esp+0B0h+arg_8]
fstp	[esp+0B0h+var_98]
fld	[esp+0B0h+var_6C]
fstp	[esp+0B0h+var_9C]
fld	[esp+0B0h+var_68]
fstp	[esp+0B0h+var_A0]
fld	[esp+0B0h+var_38]
fstp	[esp+0B0h+var_A4]
fld	[esp+0B0h+var_3C]
fstp	[esp+0B0h+var_A8]
fld	[esp+0B0h+var_70]
fstp	[esp+0B0h+var_AC]
fld	[esp+0B0h+var_64]
fstp	[esp+0B0h+var_B0]
call	sub_70B980
add	esp, 20h
test	al, al
jz	short loc_711F63
xor	[esp+90h+var_7C], 1
jmp	short loc_711F63

loc_711EF7:
cmp	esi, edi
jz	short loc_711F63
fld	[esp+90h+arg_C]
fld	[esp+90h+var_70]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_711F5F
fld	[esp+90h+var_6C]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_711F5D
fld	st
fsubrp	st(2), st
fld	[esp+90h+arg_8]
fld	[esp+90h+var_68]
fld	st
fsubp	st(2), st
fxch	st(3)
fmulp	st(1), st
fld	[esp+90h+var_64]
fsubp	st(3), st
fxch	st(3)
fsubrp	st(1), st
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+90h+var_64]
fld	[esp+90h+var_64]
fcomp	ds:SrcStr
fnstsw	ax
test	ah, 41h
jnz	short loc_711F63
xor	[esp+90h+var_7C], 1
jmp	short loc_711F63

loc_711F5D:
fstp	st

loc_711F5F:
fstp	st
fstp	st

loc_711F63:
cmp	byte ptr [esp+90h+var_80+3], 0
jz	loc_711FFE
cmp	[esp+90h+var_60], 0
jbe	loc_711FFE
cmp	byte ptr [esp+90h+var_2C], 0
jz	short loc_711FAC
fld	[esp+90h+var_30]
sub	esp, 10h
fstp	[esp+0A0h+var_94]
lea	ecx, [ebx+34h]
fld	[esp+0A0h+var_34]
fstp	[esp+0A0h+var_98]
fld	[esp+0A0h+var_38]
fstp	[esp+0A0h+var_9C]
fld	[esp+0A0h+var_3C]
fstp	[esp+0A0h+var_A0]
call	sub_709A80
jmp	short loc_711FFE

loc_711FAC:
fld	[esp+90h+var_34]
mov	edi, [ebx+3Ch]
lea	esi, [ebx+3Ch]
fstp	[esp+90h+var_44]
fld	[esp+90h+var_30]
shr	edi, 8
fstp	[esp+90h+var_40]
cmp	edi, [esi+4]
jb	short loc_711FD2
push	edi
mov	ecx, esi
call	sub_709200

loc_711FD2:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+90h+var_44]
mov	edi, [esp+90h+var_50]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+90h+var_40]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebx+5Ch]
inc	dword ptr [eax+4]
mov	esi, [esp+90h+var_4C]

loc_711FFE:
fld	[esp+90h+var_34]
mov	eax, [esp+90h+var_24]
fstp	[esp+90h+var_78]
fld	[esp+90h+var_30]
fstp	[esp+90h+var_74]
cmp	eax, [esp+90h+var_20]
jb	loc_711DF0

loc_71201C:
mov	ecx, [esp+90h+var_C]
test	ecx, ecx
jnz	short loc_71202E
mov	ecx, [esp+90h+var_8]

loc_71202E:
movzx	edx, word ptr [ebp+14h]
mov	eax, [ebp+8]
inc	dword ptr [ebp+18h]
mov	[ebp+4], ecx
sub	eax, edx
sub	ecx, eax
sub	ecx, 8
cmp	ecx, [eax+4]
jl	short loc_71205F
mov	eax, [eax]
test	eax, eax
jz	short loc_71208C
lea	ecx, [eax+8]
mov	[ebp+4], ecx
mov	edx, ecx
sub	cx, ax
mov	[ebp+8], edx
mov	[ebp+14h], cx

loc_71205F:
mov	edx, [ebp+18h]
cmp	edx, [ebp+1Ch]
jb	loc_711C60
cmp	[esp+90h+var_7C], 0
jz	short loc_7120AF
test	ebx, ebx
jz	short loc_7120A0
mov	ecx, ebx
call	sub_64A400
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 80h
retn	10h

loc_71208C:
mov	dword ptr [ebp+4], 0
jmp	short loc_71205F

loc_712095:
cmp	ebx, edx
jz	short loc_7120A0

loc_712099:
mov	ecx, ebx
call	sub_64A400

loc_7120A0:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 80h
retn	10h

loc_7120AF:
test	ebx, ebx
jz	loc_71220D
xor	edi, edi
cmp	[ebx+4Ch], edi
jbe	loc_712206
lea	ebp, [ebx+8]

loc_7120C5:
mov	edx, [ebx+58h]
mov	ecx, edi
shr	ecx, 6
mov	ecx, [edx+ecx*4]
mov	eax, edi
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	esi, [ecx+eax*8]
mov	eax, [esi+14h]
lea	edx, [eax+eax*2]
mov	eax, [esp+90h+var_48]
lea	ecx, [eax+edx*8]
movzx	edx, word ptr [ecx+4]
mov	[esp+90h+var_54], edx
fild	[esp+90h+var_54]
fcomp	ds:dbl_15FCE20
fnstsw	ax
test	ah, 5
jp	short loc_712109
fld	ds:flt_15FCCD8
jmp	short loc_71210D

loc_712109:
fild	[esp+90h+var_54]

loc_71210D:
fstp	[esp+90h+var_54]
fld	[esp+90h+var_54]
fmul	ds:dbl_15FCC48
fstp	[esp+90h+var_4C]
fld	[esp+90h+var_4C]
fst	dword ptr [ebp+0]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_712133
fchs

loc_712133:
fstp	[esp+90h+var_54]
fld	[esp+90h+var_54]
fstp	dword ptr [ebp+4]
movzx	eax, word ptr [ecx+10h]
and	eax, 30h
cmp	eax, 10h
jz	short loc_712156
sub	eax, 20h
neg	eax
sbb	eax, eax
and	eax, 3
jmp	short loc_71215B

loc_712156:
mov	eax, 4

loc_71215B:
mov	[ebx+10h], eax
movzx	eax, word ptr [ecx+10h]
and	eax, 0C0h
sub	eax, 40h
jz	short loc_71217F
sub	eax, 40h
jz	short loc_712178
mov	eax, 2
jmp	short loc_712181

loc_712178:
mov	eax, 1
jmp	short loc_712181

loc_71217F:
xor	eax, eax

loc_712181:
mov	[ebx+14h], eax
movzx	eax, word ptr [ecx+10h]
shr	eax, 2
and	eax, 0C0h
sub	eax, 40h
jz	short loc_7121A8
sub	eax, 40h
jz	short loc_7121A1
mov	eax, 2
jmp	short loc_7121AA

loc_7121A1:
mov	eax, 1
jmp	short loc_7121AA

loc_7121A8:
xor	eax, eax

loc_7121AA:
mov	[ebx+18h], eax
mov	al, [ecx+10h]
and	al, 30h
cmp	al, 20h
jnz	short loc_7121BC
fld	dword ptr [ecx+14h]
fstp	dword ptr [ebx+1Ch]

loc_7121BC:
lea	ecx, [ebx+7Ch]
call	sub_709300
push	1
lea	eax, [ebx+7Ch]
push	eax
push	esi
mov	ecx, ebp
call	sub_74C220
fld	[esp+90h+arg_C]
push	1		; char
sub	esp, 8
fstp	[esp+9Ch+var_98]
lea	ecx, [ebx+7Ch]
fld	[esp+9Ch+arg_8]
fstp	[esp+9Ch+var_9C]
call	sub_709440
test	al, al
jnz	loc_712099
inc	edi
cmp	edi, [ebx+4Ch]
jb	loc_7120C5

loc_712206:
mov	ecx, ebx
call	sub_64A400

loc_71220D:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 80h
retn	10h
sub_711C10 endp

align 10h



sub_712220 proc	near
fldz
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143F6C8
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
push	1		; Value
lea	eax, [esi+14h]
fst	dword ptr [esi+0Ch]
push	eax		; Target
fstp	dword ptr [esi+10h]
call	ds:InterlockedExchange
fldz
xor	eax, eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+20h], eax
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
fst	dword ptr [esi+0Ch]
fstp	dword ptr [esi+10h]
mov	[esi+24h], al
mov	[esi+25h], al
mov	[esi+28h], eax
mov	dword ptr [esi], offset	off_143F8D8
mov	eax, esi
pop	esi
retn
sub_712220 endp

align 10h



sub_712270 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_143F6C8
test	ecx, ecx
jz	short loc_712286
push	esi
call	sub_705BC0

loc_712286:
mov	ecx, [esi+20h]
mov	dword ptr [esi+18h], 0
test	ecx, ecx
jz	short loc_71229C
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_71229C:
test	[esp+4+arg_0], 1
mov	dword ptr [esi+20h], 0
jz	short loc_7122B8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7122B8:
mov	eax, esi
pop	esi
retn	4
sub_712270 endp

align 10h



sub_7122C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebp
push	esi
push	edi
mov	edi, eax
mov	esi, [edi+324h]
test	esi, esi
jnz	short loc_7122D3
lea	esi, [edi+28h]

loc_7122D3:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_7122E9
mov	ecx, esi
call	sub_6A9C60

loc_7122E9:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
cmp	[esp+10h+arg_0], 2
mov	[esi+2Ch], eax
movzx	ebp, cl
jle	short loc_712312
cmp	ebp, 0FFh
jnz	short loc_712312
mov	ecx, edi
call	sub_667800
movzx	ebp, ax

loc_712312:
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_71231F
lea	eax, [edi+28h]

loc_71231F:
mov	esi, [eax+34h]
sub	esi, [eax+30h]
add	esi, [eax+2Ch]
mov	[esp+10h+var_4], esi
test	ebx, ebx
jz	short loc_712392
push	ebp
lea	edx, [edi+14h]
push	offset aGfx_readfillst ; "  GFx_ReadFillStyles:	count =	%d\n"
push	edx
call	nullsub_2
mov	esi, [ebx+4]
add	esp, 0Ch
test	ebp, ebp
jz	short loc_712389
lea	eax, [esi+ebp]
push	eax
mov	ecx, ebx
call	sub_711630
test	ebp, ebp
jbe	short loc_712389
lea	esi, [esi+esi*4]
add	esi, esi
add	esi, esi
add	esi, esi

loc_712361:
mov	eax, [edi+324h]
test	eax, eax
jnz	short loc_71236E
lea	eax, [edi+28h]

loc_71236E:
mov	ecx, [esp+10h+arg_0]
push	ecx
mov	byte ptr [eax+15h], 0
mov	ecx, [ebx]
push	edi
add	ecx, esi
call	sub_6FBB60
add	esi, 28h
sub	ebp, 1
jnz	short loc_712361

loc_712389:
mov	eax, [esp+10h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ecx
retn

loc_712392:
test	ebp, ebp
jbe	short loc_7123A8
push	ebp
push	offset aErrorGfx_readf ; "Error: GFx_ReadFillStyles, trying to re"...
add	edi, 14h
push	edi
call	sub_6EFF90
add	esp, 0Ch

loc_7123A8:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ecx
retn
sub_7122C0 endp

align 10h


; Attributes: bp-based frame

sub_7123B0 proc	near

var_330= qword ptr -330h
var_328= qword ptr -328h
var_320= qword ptr -320h
var_318= qword ptr -318h
var_310= qword ptr -310h
var_308= qword ptr -308h
var_2C8= dword ptr -2C8h
var_2C4= dword ptr -2C4h
var_2C0= dword ptr -2C0h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_288= dword ptr -288h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= byte ptr -250h
var_23B= byte ptr -23Bh
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 2F4h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2F4h+var_4], eax
mov	eax, [ebp+arg_10]
mov	edx, [ebp+arg_14]
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [ebp+arg_0]
mov	[esp+300h+var_29C], eax
mov	eax, [ebp+arg_18]
mov	[esp+300h+var_264], edi
mov	[esp+300h+var_2A0], ecx
mov	[esp+300h+var_290], edx
test	eax, eax
jz	short loc_7123FB
mov	[esp+300h+var_278], eax
jmp	short loc_712408

loc_7123FB:
mov	eax, [ecx+20h]
mov	edx, [eax+18h]
mov	[esp+300h+var_278], edx

loc_712408:
mov	esi, [ecx+324h]
test	esi, esi
jnz	short loc_712415
lea	esi, [ecx+28h]

loc_712415:
cmp	[ebp+arg_C], 0
mov	[esp+300h+var_268], esi
jz	loc_7124E4
mov	eax, [esi+34h]
sub	eax, [esi+30h]
lea	ebx, [edi+4]
add	eax, [esi+2Ch]
or	byte ptr [edi+24h], 10h
push	ebx
mov	ecx, esi
mov	[esp+304h+var_2B0], eax
call	sub_6AABD0
mov	eax, [ebp+arg_4]
cmp	eax, 53h
jz	short loc_71245B
cmp	eax, 4Bh
jz	short loc_71245B
mov	eax, [edi]
mov	edx, [eax+8]
push	ebx
mov	ecx, edi
call	edx
jmp	short loc_7124B2

loc_71245B:
fldz
lea	eax, [esp+300h+var_260]
fst	[esp+300h+var_260]
push	eax
fst	[esp+304h+var_25C]
mov	ecx, esi
fst	[esp+304h+var_258]
fstp	[esp+304h+var_254]
call	sub_6AABD0
mov	edx, [edi]
mov	edx, [edx+8]
lea	eax, [esp+300h+var_260]
push	eax
mov	ecx, edi
call	edx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_7124AF
mov	ecx, esi
call	sub_6A9C60

loc_7124AF:
inc	dword ptr [esi+2Ch]

loc_7124B2:
mov	ecx, [ebp+arg_4]
mov	edi, [esp+300h+var_2A0]
mov	ebx, [esp+300h+var_29C]
push	ecx
mov	eax, edi
call	sub_7122C0
mov	edx, [ebp+arg_4]
mov	ebx, [esp+304h+var_290]
push	edx
call	sub_710B60
mov	eax, [esi+34h]
sub	eax, [esi+30h]
add	esp, 8
sub	eax, [esp+300h+var_2B0]
add	eax, [esi+2Ch]
jmp	short loc_7124E6

loc_7124E4:
xor	eax, eax

loc_7124E6:
mov	edi, [ebp+arg_8]
sub	edi, eax
mov	edx, 2
cmp	[ebp+arg_4], edx
mov	[esp+300h+var_28C], edi
setle	bl
dec	bl
and	bl, 4
cmp	[ebp+arg_C], 0
mov	[esp+300h+var_2AC], edi
lea	eax, [edi+1]
jz	short loc_712531
mov	ecx, [esp+300h+var_29C]
test	ecx, ecx
jz	short loc_71251F
cmp	dword ptr [ecx+4], 0
jbe	short loc_71251F
or	bl, 1
add	eax, edx

loc_71251F:
mov	ecx, [esp+300h+var_290]
test	ecx, ecx
jz	short loc_712531
cmp	dword ptr [ecx+4], 0
jbe	short loc_712531
or	bl, dl
add	eax, edx

loc_712531:
add	eax, 8
cmp	eax, 100h
jnb	short loc_712545
mov	[esp+300h+var_288], 1
jmp	short loc_712560

loc_712545:
cmp	eax, 10000h
jnb	short loc_712552
mov	[esp+300h+var_288], edx
jmp	short loc_712560

loc_712552:
cmp	eax, (offset sub_FFFFFF+1)
sbb	ecx, ecx
add	ecx, 4
mov	[esp+300h+var_288], ecx

loc_712560:
mov	ecx, [esp+300h+var_288]
add	eax, ecx
dec	cl
and	cl, 3
add	cl, cl
add	cl, cl
add	cl, cl
or	bl, cl
mov	ecx, [esp+300h+var_278]
push	eax
push	eax
mov	[esp+308h+var_2B0], eax
mov	byte ptr [esp+308h+var_2A4+3], bl
call	sub_70A0B0
mov	ecx, [esp+300h+var_288]
mov	[eax], bl
lea	ebx, [eax+ecx+1]
mov	cl, byte ptr [esp+300h+var_2A4+3]
mov	[esp+300h+var_294], eax
mov	[esp+300h+var_274], ebx
test	cl, 1
jz	short loc_7125C0
mov	edx, [esp+300h+var_29C]
mov	eax, [edx+4]
mov	[ebx], al
shr	eax, 8
inc	ebx
and	al, 7Fh
mov	[ebx], al
inc	ebx
mov	[esp+300h+var_274], ebx

loc_7125C0:
test	cl, 2
jz	short loc_7125DE
mov	eax, [esp+300h+var_290]
mov	eax, [eax+4]
mov	[ebx], al
shr	eax, 8
inc	ebx
and	al, 7Fh
mov	[ebx], al
inc	ebx
mov	[esp+300h+var_274], ebx

loc_7125DE:
push	edi
push	ebx
mov	ecx, esi
mov	byte ptr [esi+15h], 0
call	sub_6A9CB0
fld1
cmp	[ebp+arg_4], 4Bh
fstp	[esp+300h+var_27C]
jnz	short loc_712612
fld	ds:dword_156F414
mov	eax, [esp+300h+var_264]
or	byte ptr [eax+24h], 2
fstp	[esp+300h+var_27C]

loc_712612:
mov	ecx, [esp+300h+var_2A0]
mov	edx, [ecx+20h]
mov	ecx, [edx+1Ch]
mov	eax, [esi+8]
mov	[esp+300h+var_284], ecx
push	eax
mov	ecx, esi
call	sub_9B3060
mov	edx, [esp+304h+var_284]
push	eax
push	edx
push	edi
push	ebx
lea	ecx, [esp+314h+var_250]
call	sub_6AA3C0
mov	ecx, [esp+300h+var_2A0]
lea	eax, [esp+300h+var_250]
mov	[ecx+324h], eax
push	4
mov	ecx, eax
mov	[esp+304h+var_23B], 0
call	sub_6AA450
push	4
lea	ecx, [esp+304h+var_250]
mov	[esp+304h+var_270], eax
call	sub_6AA450
cmp	[ebp+arg_C], 0
mov	[esp+300h+var_284], eax
jz	short loc_7126A3
mov	edx, eax
mov	eax, [esp+300h+var_270]
push	edx
push	eax
lea	ecx, [esp+308h+var_250]
push	offset aShapecharacter ; "  ShapeCharacter read: nfillbits = %d, "...
push	ecx
call	nullsub_2
add	esp, 10h

loc_7126A3:
xor	esi, esi
mov	[esp+300h+var_280], esi
mov	[esp+300h+var_26C], esi
mov	[esp+300h+var_2B4], esi
mov	[esp+300h+var_2B8], esi
mov	[esp+300h+var_2C0], esi
mov	[esp+300h+var_298], esi
mov	[esp+300h+var_2A8], esi
mov	[esp+300h+var_2C8], esi
xor	bl, bl
jmp	short loc_7126D4
align 10h

loc_7126D0:
mov	esi, [esp+300h+var_2A8]

loc_7126D4:
lea	ecx, [esp+300h+var_250]
call	sub_6AA4F0
lea	ecx, [esp+300h+var_250]
test	eax, eax
jnz	loc_712A46
push	5
call	sub_6AA450
mov	[esp+300h+var_2BC], eax
test	eax, eax
jz	loc_712D07
test	al, 1
jz	loc_712797
test	esi, esi
jle	short loc_712721
mov	eax, 1
add	[esp+300h+var_2C0], eax
xor	esi, esi
add	[esp+300h+var_2C8], eax
mov	[esp+300h+var_2A8], esi

loc_712721:
push	5
lea	ecx, [esp+304h+var_250]
call	sub_6AA450
mov	edi, eax
push	edi
lea	ecx, [esp+304h+var_250]
call	sub_6AA550
push	edi
lea	ecx, [esp+304h+var_250]
mov	[esp+304h+var_2B4], eax
call	sub_6AA550
lea	ecx, [esp+300h+var_250]
mov	[esp+300h+var_2B8], eax
call	sub_6A9890
test	al, al
jz	short loc_712797
fild	[esp+300h+var_2B8]
sub	esp, 10h
fld	[esp+310h+var_27C]
lea	edx, [esp+310h+var_250]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+310h+var_308]
fimul	[esp+310h+var_2B4]
fstp	[esp+310h+var_310]
push	offset aShapecharact_0 ; "  ShapeCharacter read: moveto	%4g %4g\n"
push	edx
call	nullsub_2
add	esp, 18h

loc_712797:
test	byte ptr [esp+300h+var_2BC], 2
mov	ebx, [esp+300h+var_270]
jz	short loc_712800
test	ebx, ebx
jle	short loc_712800
test	esi, esi
jle	short loc_7127C0
mov	eax, 1
add	[esp+300h+var_2C0], eax
xor	esi, esi
add	[esp+300h+var_2C8], eax
mov	[esp+300h+var_2A8], esi

loc_7127C0:
push	ebx
lea	ecx, [esp+304h+var_250]
call	sub_6AA450
lea	ecx, [esp+300h+var_250]
mov	edi, eax
call	sub_6A9890
test	al, al
jz	short loc_712800
test	edi, edi
jle	short loc_7127EA
add	edi, [esp+300h+var_280]

loc_7127EA:
push	edi
lea	eax, [esp+304h+var_250]
push	offset aShapecharact_1 ; "  ShapeCharacter read: fill0 = %d\n"
push	eax
call	nullsub_2
add	esp, 0Ch

loc_712800:
test	byte ptr [esp+300h+var_2BC], 4
jz	short loc_712862
test	ebx, ebx
jle	short loc_712862
test	esi, esi
jle	short loc_712822
mov	eax, 1
add	[esp+300h+var_2C0], eax
xor	esi, esi
add	[esp+300h+var_2C8], eax
mov	[esp+300h+var_2A8], esi

loc_712822:
push	ebx
lea	ecx, [esp+304h+var_250]
call	sub_6AA450
lea	ecx, [esp+300h+var_250]
mov	edi, eax
call	sub_6A9890
test	al, al
jz	short loc_712862
test	edi, edi
jle	short loc_71284C
add	edi, [esp+300h+var_280]

loc_71284C:
push	edi
lea	ecx, [esp+304h+var_250]
push	offset aShapecharact_2 ; "  ShapeCharacter read: fill1 = %d\n"
push	ecx
call	nullsub_2
add	esp, 0Ch

loc_712862:
test	byte ptr [esp+300h+var_2BC], 8
jz	short loc_7128CA
mov	eax, [esp+300h+var_284]
test	eax, eax
jle	short loc_7128CA
test	esi, esi
jle	short loc_71288A
mov	ecx, 1
add	[esp+300h+var_2C0], ecx
add	[esp+300h+var_2C8], ecx
mov	[esp+300h+var_2A8], 0

loc_71288A:
push	eax
lea	ecx, [esp+304h+var_250]
call	sub_6AA450
mov	esi, eax
test	esi, esi
jle	short loc_7128A4
add	esi, [esp+300h+var_26C]

loc_7128A4:
lea	ecx, [esp+300h+var_250]
call	sub_6A9890
test	al, al
jz	short loc_7128CA
push	esi
lea	edx, [esp+304h+var_250]
push	offset aShapecharact_3 ; "  ShapeCharacter read: line =	%d\n"
push	edx
call	nullsub_2
add	esp, 0Ch

loc_7128CA:
test	byte ptr [esp+300h+var_2BC], 10h
jz	loc_712C0F
lea	eax, [esp+300h+var_250]
push	offset aShapecharact_4 ; "  ShapeCharacter read: more fill styles"...
push	eax
call	nullsub_2
xor	ecx, ecx
add	esp, 8
cmp	[esp+300h+var_2C8], ecx
lea	eax, [ecx+1]
jle	short loc_7128FD
add	[esp+300h+var_298], eax
mov	[esp+300h+var_2C8], ecx

loc_7128FD:
cmp	[esp+300h+var_2A8], ecx
jle	short loc_71290F
add	[esp+300h+var_2C0], eax
add	[esp+300h+var_2C8], eax
mov	[esp+300h+var_2A8], ecx

loc_71290F:
mov	eax, [esp+300h+var_29C]
cmp	eax, ecx
jz	short loc_712923
mov	edx, [eax+4]
mov	[esp+300h+var_280], edx
jmp	short loc_71292A

loc_712923:
mov	[esp+300h+var_280], ecx

loc_71292A:
mov	eax, [esp+300h+var_290]
cmp	eax, ecx
jz	short loc_71293E
mov	eax, [eax+4]
mov	[esp+300h+var_26C], eax
jmp	short loc_712945

loc_71293E:
mov	[esp+300h+var_26C], ecx

loc_712945:
mov	edi, [ebp+arg_4]
mov	eax, [esp+300h+var_2A0]
mov	ebx, [esp+300h+var_29C]
push	edi
call	sub_7122C0
mov	esi, [esp+304h+var_224]
sub	esi, [esp+304h+var_220]
mov	ebx, [esp+304h+var_290]
add	esi, [esp+304h+var_21C]
push	edi
mov	edi, [esp+308h+var_2A0]
mov	[esp+308h+var_2BC], eax
call	sub_710B60
mov	ebx, [esp+308h+var_224]
sub	ebx, [esp+308h+var_220]
add	esp, 8
add	ebx, [esp+300h+var_21C]
mov	edi, eax
cmp	[esp+300h+var_2BC], esi
jz	short loc_7129CF
jg	loc_712C33
cmp	esi, [esp+300h+var_2AC]
ja	loc_712C33
mov	eax, [esp+300h+var_274]
mov	ecx, [esp+300h+var_2BC]
sub	edi, esi
push	edi
add	esi, eax
add	ecx, eax
push	esi
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+30Ch+var_2BC]
add	esp, 0Ch
add	edi, edx

loc_7129CF:
cmp	edi, ebx
jz	short loc_712A0D
jg	loc_712C33
cmp	ebx, [esp+300h+var_2AC]
ja	loc_712C33
mov	esi, [esp+300h+var_28C]
mov	eax, esi
sub	eax, ebx
push	eax
mov	eax, [esp+304h+var_274]
lea	ecx, [ebx+eax]
push	ecx
lea	edx, [edi+eax]
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	eax, edi
sub	eax, ebx
add	esp, 0Ch
add	esi, eax
mov	[esp+300h+var_28C], esi

loc_712A0D:
push	edi
lea	ecx, [esp+304h+var_250]
call	sub_6A9D50
push	4
lea	ecx, [esp+304h+var_250]
call	sub_6AA450
push	4
lea	ecx, [esp+304h+var_250]
mov	[esp+304h+var_270], eax
call	sub_6AA450
mov	[esp+300h+var_284], eax
jmp	loc_712C0F

loc_712A46:
inc	esi
mov	[esp+300h+var_2A8], esi
call	sub_6AA4F0
push	4
lea	ecx, [esp+304h+var_250]
test	eax, eax
jnz	loc_712B59
call	sub_6AA450
mov	ebx, eax
add	ebx, 2
push	ebx
lea	ecx, [esp+304h+var_250]
call	sub_6AA550
push	ebx
lea	ecx, [esp+304h+var_250]
mov	esi, eax
call	sub_6AA550
push	ebx
lea	ecx, [esp+304h+var_250]
mov	edi, eax
call	sub_6AA550
push	ebx
lea	ecx, [esp+304h+var_250]
mov	[esp+304h+var_2BC], eax
call	sub_6AA550
lea	ecx, [esp+300h+var_250]
mov	ebx, eax
call	sub_6A9890
test	al, al
jz	loc_712B44
mov	ecx, [esp+300h+var_2B8]
mov	eax, [esp+300h+var_2BC]
lea	edx, [ebx+edi]
add	edx, ecx
mov	[esp+300h+var_2C4], edx
fild	[esp+300h+var_2C4]
sub	esp, 30h
fld	[esp+330h+var_27C]
lea	edx, [eax+esi]
mov	eax, [esp+330h+var_2B4]
fld	st
fmulp	st(2), st
add	edx, eax
mov	[esp+330h+var_2C4], edx
fxch	st(1)
add	ecx, edi
fstp	[esp+330h+var_308]
lea	edx, [esi+eax]
fild	[esp+330h+var_2C4]
mov	[esp+330h+var_2C4], ecx
lea	eax, [esp+330h+var_250]
fmul	st, st(1)
fstp	[esp+330h+var_310]
fild	[esp+330h+var_2C4]
mov	[esp+330h+var_2C4], edx
fmul	st, st(1)
fstp	[esp+330h+var_318]
fild	[esp+330h+var_2C4]
fmul	st, st(1)
fstp	[esp+330h+var_320]
fild	[esp+330h+var_2B8]
fmul	st, st(1)
fstp	[esp+330h+var_328]
fimul	[esp+330h+var_2B4]
fstp	[esp+330h+var_330]
push	offset aShapecharact_5 ; "  ShapeCharacter read: curved	edge   = "...
push	eax
call	nullsub_2
add	esp, 38h

loc_712B44:
mov	ecx, [esp+300h+var_2BC]
add	ecx, esi
add	[esp+300h+var_2B4], ecx
add	ebx, edi
add	[esp+300h+var_2B8], ebx
jmp	loc_712C0F

loc_712B59:
call	sub_6AA450
mov	esi, eax
lea	ecx, [esp+300h+var_250]
add	esi, 2
xor	ebx, ebx
xor	edi, edi
call	sub_6AA4F0
lea	ecx, [esp+300h+var_250]
test	eax, eax
jz	loc_712CE6
push	esi
call	sub_6AA550
mov	ebx, eax

loc_712B8A:
push	esi
lea	ecx, [esp+304h+var_250]
call	sub_6AA550
mov	edi, eax

loc_712B99:
lea	ecx, [esp+300h+var_250]
call	sub_6A9890
test	al, al
jz	short loc_712C07
mov	edx, [esp+300h+var_2B8]
mov	ecx, [esp+300h+var_2B4]
lea	eax, [edi+edx]
mov	[esp+300h+var_2C4], eax
fild	[esp+300h+var_2C4]
sub	esp, 20h
fld	[esp+320h+var_27C]
lea	edx, [ebx+ecx]
fld	st
mov	[esp+320h+var_2C4], edx
fmulp	st(2), st
lea	eax, [esp+320h+var_250]
fxch	st(1)
fstp	[esp+320h+var_308]
fild	[esp+320h+var_2C4]
fmul	st, st(1)
fstp	[esp+320h+var_310]
fild	[esp+320h+var_2B8]
fmul	st, st(1)
fstp	[esp+320h+var_318]
fimul	[esp+320h+var_2B4]
fstp	[esp+320h+var_320]
push	offset aShapecharact_6 ; "  ShapeCharacter read: straight edge = "...
push	eax
call	nullsub_2
add	esp, 28h

loc_712C07:
add	[esp+300h+var_2B4], ebx
add	[esp+300h+var_2B8], edi

loc_712C0F:
mov	ecx, [esp+300h+var_224]
sub	ecx, [esp+300h+var_220]
add	ecx, [esp+300h+var_21C]
cmp	ecx, [esp+300h+var_2AC]
setnbe	bl
test	bl, bl
jz	loc_7126D0

loc_712C33:
mov	edx, [esp+300h+var_268]
mov	eax, [edx+18h]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
lea	ecx, [esp+304h+var_250]
push	offset aErrorCorrupted ; "Error: Corrupted shape detected in file"...
push	ecx
call	sub_6ABC20
mov	eax, [esp+30Ch+var_294]
mov	ecx, [esp+30Ch+var_2B0]
mov	byte ptr [eax],	0
mov	byte ptr [eax+1], 0
mov	byte ptr [eax+2], 0
mov	byte ptr [eax+3], 0
add	esp, 0Ch
mov	byte ptr [eax+4], 0
mov	byte ptr [eax+5], 0
cmp	ecx, 6
jbe	short loc_712C8D
push	6
push	ecx
mov	ecx, [esp+308h+var_278]
push	eax
call	sub_70A130

loc_712C8D:
mov	ecx, [esp+300h+var_264]
mov	edx, [esp+300h+var_294]
mov	eax, [esp+300h+var_2A0]
mov	[ecx+28h], edx
mov	edx, [esp+300h+var_29C]
mov	dword ptr [eax+324h], 0
and	byte ptr [ecx+24h], 0FEh
mov	bl, [ecx+24h]
test	edx, edx
jz	loc_712E25
mov	esi, [edx+4]
xor	eax, eax
test	esi, esi
jbe	loc_712E25
mov	edx, [edx]
jmp	short loc_712CD0
align 10h

loc_712CD0:
cmp	byte ptr [edx],	0
jnz	loc_712E1F
inc	eax
add	edx, 28h
cmp	eax, esi
jb	short loc_712CD0
jmp	loc_712E25

loc_712CE6:
call	sub_6AA4F0
test	eax, eax
jnz	loc_712B8A
push	esi
lea	ecx, [esp+304h+var_250]
call	sub_6AA550
mov	ebx, eax
jmp	loc_712B99

loc_712D07:
test	esi, esi
jle	short loc_712D18
mov	eax, 1
add	[esp+300h+var_2C0], eax
add	[esp+300h+var_2C8], eax

loc_712D18:
test	bl, bl
jnz	loc_712C33
cmp	[esp+300h+var_2C8], 0
jle	short loc_712D2B
inc	[esp+300h+var_298]

loc_712D2B:
mov	ecx, [esp+300h+var_2B0]
sub	ecx, [esp+300h+var_2AC]
mov	eax, [esp+300h+var_2C0]
mov	edx, [esp+300h+var_298]
add	ecx, [esp+300h+var_28C]
cmp	eax, edx
jnb	short loc_712D45
mov	eax, edx

loc_712D45:
cmp	eax, 100h
jnb	short loc_712D53
mov	ebx, 1
jmp	short loc_712D6B

loc_712D53:
cmp	eax, 10000h
jnb	short loc_712D61
mov	ebx, 2
jmp	short loc_712D6B

loc_712D61:
cmp	eax, (offset sub_FFFFFF+1)
sbb	ebx, ebx
add	ebx, 4

loc_712D6B:
lea	eax, [ebx+ebx]
lea	edx, [ecx+eax-8]
mov	esi, edx
sub	esi, eax
mov	eax, [esp+300h+var_294]
add	esi, eax
xor	edi, edi
mov	[esp+300h+var_2AC], edx
test	ebx, ebx
jbe	short loc_712DA4
mov	[esp+300h+var_28C], ebx

loc_712D8A:
mov	edx, [esp+300h+var_298]
mov	ecx, edi
shr	edx, cl
inc	esi
add	edi, 8
sub	[esp+300h+var_28C], 1
mov	[esi-1], dl
jnz	short loc_712D8A
mov	edx, [esp+300h+var_2AC]

loc_712DA4:
xor	edi, edi
test	ebx, ebx
jbe	short loc_712DC8
mov	eax, ebx

loc_712DAC:
mov	edx, [esp+300h+var_2C0]
mov	ecx, edi
shr	edx, cl
inc	esi
add	edi, 8
sub	eax, 1
mov	[esi-1], dl
jnz	short loc_712DAC
mov	edx, [esp+300h+var_2AC]
mov	eax, [esp+300h+var_294]

loc_712DC8:
mov	ecx, [esp+300h+var_2B0]
cmp	ecx, edx
jbe	short loc_712DEF
mov	eax, [esp+300h+var_2AC]
push	eax
push	ecx
mov	ecx, [esp+308h+var_294]
push	ecx
mov	ecx, [esp+30Ch+var_278]
call	sub_70A130
mov	edx, [esp+300h+var_2AC]
mov	eax, [esp+300h+var_294]

loc_712DEF:
mov	edi, [esp+300h+var_288]
dec	bl
and	bl, 3
shl	bl, 5
or	[eax], bl
inc	eax
xor	esi, esi
test	edi, edi
jbe	loc_712C8D

loc_712E08:
mov	ecx, esi
mov	ebx, edx
shr	ebx, cl
inc	eax
add	esi, 8
sub	edi, 1
mov	[eax-1], bl
jnz	short loc_712E08
jmp	loc_712C8D

loc_712E1F:
or	bl, 1
mov	[ecx+24h], bl

loc_712E25:
test	byte ptr [ecx+24h], 40h
jz	short loc_712E93
fld1
mov	eax, [esp+300h+var_290]
fstp	[esp+300h+var_2B0]
test	eax, eax
jz	short loc_712E84
mov	esi, [eax+4]
test	esi, esi
jbe	short loc_712E84
mov	edx, [eax]
fld	ds:dbl_15FCCA8
add	edx, 4

loc_712E4B:
movzx	eax, word ptr [edx]
fld	dword ptr [edx+10h]
fmul	st, st(1)
mov	[esp+300h+var_2C4], eax
fild	[esp+300h+var_2C4]
fmulp	st(1), st
fstp	[esp+300h+var_2C4]
fld	[esp+300h+var_2C4]
fld	[esp+300h+var_2B0]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_712E78
fstp	[esp+300h+var_2B0]
jmp	short loc_712E7A

loc_712E78:
fstp	st

loc_712E7A:
add	edx, 18h
sub	esi, 1
jnz	short loc_712E4B
fstp	st

loc_712E84:
mov	edx, [ecx]
fld	[esp+300h+var_2B0]
mov	eax, [edx+34h]
push	ecx
fstp	dword ptr [esp+304h+var_308+4]
call	eax

loc_712E93:
lea	ecx, [esp+300h+var_250]
call	sub_6A9A50
mov	ecx, [esp+300h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	1Ch
sub_7123B0 endp

align 10h



sub_712EC0 proc	near
push	esi
mov	esi, ecx
call	sub_712220
fldz
mov	dword ptr [esi], offset	off_143F728
fst	dword ptr [esi+40h]
fst	dword ptr [esi+44h]
xor	eax, eax
fst	dword ptr [esi+48h]
fst	dword ptr [esi+4Ch]
fld	ds:flt_15A0D44
or	byte ptr [esi+24h], 0C0h
fstp	dword ptr [esi+3Ch]
mov	[esi+2Ch], eax
mov	[esi+30h], eax
mov	[esi+38h], eax
mov	[esi+34h], eax
fst	dword ptr [esi+40h]
fst	dword ptr [esi+44h]
mov	eax, esi
fst	dword ptr [esi+48h]
fstp	dword ptr [esi+4Ch]
pop	esi
retn
sub_712EC0 endp

align 10h



sub_712F10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
mov	edx, [esp+18h+arg_C]
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	ebp
push	esi
push	edi
xor	edi, edi
push	edi
mov	esi, ecx
lea	eax, [esp+2Ch+var_C]
push	eax
mov	eax, [esp+30h+arg_8]
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, [esp+34h+arg_4]
push	edx
push	eax
push	ecx
push	ebx
mov	ecx, esi
mov	[esp+44h+var_18], edi
mov	[esp+44h+var_14], edi
mov	[esp+44h+var_10], edi
mov	[esp+44h+var_C], edi
mov	[esp+44h+var_8], edi
mov	[esp+44h+var_4], edi
call	sub_7123B0
mov	ebp, [esp+28h+var_14]
mov	edx, [ebx+20h]
mov	ebx, [edx+1Ch]
cmp	ebp, edi
jz	short loc_712FBA
lea	eax, [ebp+ebp*4+0]
add	eax, eax
add	eax, eax
add	eax, eax
mov	[esi+34h], ebp
mov	edx, [ebx]
push	edi
push	eax
mov	eax, [edx+28h]
mov	ecx, ebx
call	eax
mov	[esi+2Ch], eax
mov	[esp+28h+arg_C], edi
cmp	[esi+34h], edi
jbe	short loc_712FBA
mov	ecx, [esp+28h+var_18]
sub	ecx, eax
mov	edi, eax
mov	[esp+28h+arg_8], ecx

loc_712F97:
test	edi, edi
jz	short loc_712FA9
add	ecx, edi
push	ecx
mov	ecx, edi
call	sub_6FAB80
mov	ecx, [esp+28h+arg_8]

loc_712FA9:
mov	eax, [esp+28h+arg_C]
inc	eax
add	edi, 28h
mov	[esp+28h+arg_C], eax
cmp	eax, [esi+34h]
jb	short loc_712F97

loc_712FBA:
mov	edi, [esp+28h+var_8]
test	edi, edi
jz	short loc_71300F
lea	eax, [edi+edi*2]
add	eax, eax
add	eax, eax
add	eax, eax
mov	[esi+38h], edi
mov	edx, [ebx]
push	0
push	eax
mov	eax, [edx+28h]
mov	ecx, ebx
call	eax
xor	ebp, ebp
mov	[esi+30h], eax
cmp	[esi+38h], ebp
jbe	short loc_71300B
mov	ecx, [esp+28h+var_C]
sub	ecx, eax
mov	ebx, eax
mov	[esp+28h+arg_C], ecx

loc_712FF0:
test	ebx, ebx
jz	short loc_713002
add	ecx, ebx
push	ecx
mov	ecx, ebx
call	sub_6FB940
mov	ecx, [esp+28h+arg_C]

loc_713002:
inc	ebp
add	ebx, 18h
cmp	ebp, [esi+38h]
jb	short loc_712FF0

loc_71300B:
mov	ebp, [esp+28h+var_14]

loc_71300F:
mov	edx, [esp+28h+var_C]
lea	ecx, [edi+edi*2]
lea	esi, [edx+ecx*8-18h]
test	edi, edi
jbe	short loc_713032
mov	edi, edi

loc_713020:
mov	eax, [esi]
mov	edx, [eax]
push	0
mov	ecx, esi
call	edx
sub	esi, 18h
sub	edi, 1
jnz	short loc_713020

loc_713032:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+28h+var_C]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+28h+var_18]
lea	ecx, [ebp+ebp*4+0]
lea	esi, [edi+ecx*8-28h]
test	ebp, ebp
jbe	short loc_713063

loc_713054:
mov	ecx, esi
call	sub_6FA020
sub	esi, 28h
sub	ebp, 1
jnz	short loc_713054

loc_713063:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	10h
sub_712F10 endp

align 10h



sub_713080 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_7111E0
fldz
mov	dword ptr [esi], offset	off_143F888
xor	eax, eax
mov	[esi+44h], eax
mov	[esi+48h], eax
xor	ecx, ecx
mov	[esi+4Ch], cx
mov	edx, 1FF8h
mov	[esi+4Eh], dx
mov	[esi+50h], eax
mov	[esi+54h], eax
mov	[esi+58h], eax
mov	[esi+5Ch], eax
mov	[esi+60h], eax
mov	[esi+64h], eax
fst	dword ptr [esi+6Ch]
fst	dword ptr [esi+70h]
mov	eax, esi
fst	dword ptr [esi+74h]
fst	dword ptr [esi+78h]
or	byte ptr [esi+24h], 0C0h
fld	ds:flt_15A0D44
fstp	dword ptr [esi+68h]
fst	dword ptr [esi+6Ch]
fst	dword ptr [esi+70h]
fst	dword ptr [esi+74h]
fstp	dword ptr [esi+78h]
pop	esi
retn	4
sub_713080 endp

align 10h



sub_7130F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_711380
test	[esp+4+arg_0], 1
jz	short loc_71310D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_71310D:
mov	eax, esi
pop	esi
retn	4
sub_7130F0 endp

align 10h



sub_713120 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
var_3= byte ptr	-3
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 78h
mov	eax, [esp+78h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	edx, [edx+14h]
push	edi
lea	eax, [esp+88h+var_60]
push	eax
call	edx
mov	edi, [esp+88h+var_58]
sub	edi, [esp+88h+var_60]
mov	ebp, [esp+88h+var_54]
sub	ebp, [esp+88h+var_5C]
lea	eax, [edi+edi*4]
add	eax, eax
add	eax, eax
mov	[esp+88h+var_70], eax
fild	[esp+88h+var_70]
lea	eax, [ebp+ebp*4+0]
add	eax, eax
add	eax, eax
mov	[esp+88h+var_6C], eax
fstp	[esp+88h+var_68]
fild	[esp+88h+var_6C]
mov	eax, [esi+54h]
lea	ecx, [esi+50h]
push	1
push	ecx
fstp	[esp+90h+var_64]
mov	[esp+90h+var_74], eax
call	sub_6F90A0
mov	eax, [esp+88h+var_74]
xor	ebx, ebx
cmp	eax, 1
jnb	short loc_7131CB
mov	edx, [esi+50h]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*8]
mov	edx, 1
sub	edx, eax
mov	[esp+88h+var_78], ecx
jz	short loc_7131CB
mov	[esp+88h+var_74], edx
lea	ebx, [ebx+0]

loc_7131B0:
cmp	ecx, ebx
jz	short loc_7131BD
call	sub_6FA2A0
mov	ecx, [esp+88h+var_78]

loc_7131BD:
add	ecx, 28h
sub	[esp+88h+var_74], 1
mov	[esp+88h+var_78], ecx
jnz	short loc_7131B0

loc_7131CB:
lea	ecx, [esp+88h+var_50]
call	sub_64E8E0
mov	ecx, [esp+88h+arg_0]
xor	edx, edx
cmp	[esp+88h+arg_4], bl
lea	eax, [esp+88h+var_50]
setz	dl
push	eax
push	ecx
mov	ecx, [esi+50h]
lea	edx, [edx+edx+41h]
push	edx
call	sub_6FA370
fldz
or	byte ptr [esi+24h], 1
fst	dword ptr [esi+4]
lea	eax, [esi+4]
fstp	dword ptr [eax+4]
fld	[esp+88h+var_68]
push	eax
fstp	dword ptr [eax+8]
mov	ecx, esi
fld	[esp+8Ch+var_64]
fstp	dword ptr [eax+0Ch]
mov	edx, [esi]
mov	eax, [edx+8]
call	eax
fldz
or	byte ptr [esi+24h], 10h
fstp	dword ptr [esi+68h]
lea	eax, [esi+44h]
mov	[esp+88h+var_64], eax
cmp	[eax], ebx
jnz	short loc_71323E
mov	ecx, 20h
mov	[eax+0Ah], cx

loc_71323E:
or	byte ptr [esi+24h], 4
push	ebx
push	ebx
push	ebx
lea	ecx, [esp+94h+var_38]
mov	[esp+94h+var_1C], ebx
mov	[esp+94h+var_18], ebx
mov	[esp+94h+var_14], ebx
mov	[esp+94h+var_20], ebx
mov	[esp+94h+var_24], ebx
mov	[esp+94h+var_28], ebx
mov	[esp+94h+var_2C], ebx
mov	[esp+94h+var_10], ebx
mov	dword ptr [esp+94h+var_C], ebx
mov	[esp+94h+var_8], ebx
mov	[esp+94h+var_4], bl
mov	[esp+94h+var_3], bl
mov	[esp+94h+var_38], ebx
mov	[esp+94h+var_34], 1
mov	[esp+94h+var_30], ebx
call	sub_70C1B0
mov	edx, [esp+88h+var_70]
push	ebx
push	ebx
push	edx
lea	ecx, [esp+94h+var_38]
call	sub_710CB0
mov	eax, [esp+88h+var_6C]
push	ebx
push	eax
push	ebx
lea	ecx, [esp+94h+var_38]
call	sub_710CB0
mov	ecx, edi
neg	ecx
add	ecx, ecx
add	ecx, ecx
sub	ecx, edi
push	ebx
add	ecx, ecx
add	ecx, ecx
push	ebx
push	ecx
lea	ecx, [esp+94h+var_38]
call	sub_710CB0
mov	edx, ebp
neg	edx
add	edx, edx
add	edx, edx
sub	edx, ebp
add	edx, edx
push	ebx
add	edx, edx
push	edx
push	ebx
lea	ecx, [esp+94h+var_38]
call	sub_710CB0
mov	eax, [esp+88h+var_64]
add	esi, 34h
push	esi
push	eax
lea	ecx, [esp+90h+var_38]
call	sub_70BCD0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+88h+var_1C]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 78h
retn	8
sub_713120 endp

align 10h



sub_713330 proc	near
add	ecx, 10h
jmp	sub_713120
sub_713330 endp

align 10h



sub_713340 proc	near

var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_A0=	byte ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_74=	dword ptr -74h
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

sub	esp, 0A0h
push	ebx
push	ebp
mov	ebp, [esp+0A8h+arg_8]
push	esi
xor	esi, esi
push	edi
mov	ebx, ecx
test	ebp, ebp
jz	short loc_713379
test	byte ptr [ebp+76h], 1
jz	short loc_713379
fld1
push	ecx		; float
mov	ecx, ebp
fstp	[esp+0B4h+var_B4]
call	sub_655850
mov	esi, eax
test	esi, esi
jz	short loc_713379
mov	ecx, esi
call	sub_6A58E0

loc_713379:
test	byte ptr [ebx+24h], 10h
fld	dword ptr [ebx+4]
fstp	[esp+0B0h+var_9C]
fld	dword ptr [ebx+8]
fstp	[esp+0B0h+var_98]
fld	dword ptr [ebx+0Ch]
fstp	[esp+0B0h+var_94]
fld	dword ptr [ebx+10h]
fstp	[esp+0B0h+var_90]
jnz	short loc_7133A9
mov	eax, [ebx]
mov	edx, [eax+14h]
lea	ecx, [esp+0B0h+var_9C]
push	ecx
mov	ecx, ebx
call	edx

loc_7133A9:
test	esi, esi
jz	short loc_7133F1
lea	eax, [esp+0B0h+var_9C]
push	eax
lea	ecx, [esp+0B4h+var_84]
push	ecx
mov	ecx, esi
call	sub_6A65C0
fld	dword ptr [eax+4]
fstp	[esp+0B0h+var_88]
fld	dword ptr [eax+8]
fstp	[esp+0B0h+var_8C]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [esp+0B0h+var_A0]
fld	dword ptr [eax]
fstp	[esp+0B0h+var_9C]
fld	[esp+0B0h+var_88]
fstp	[esp+0B0h+var_98]
fld	[esp+0B0h+var_8C]
fstp	[esp+0B0h+var_94]
fld	dword ptr [esp+0B0h+var_A0]
fstp	[esp+0B0h+var_90]

loc_7133F1:
mov	edi, [esp+0B0h+arg_0]
fld	dword ptr [edi]
fld	[esp+0B0h+var_94]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_713436
fld	dword ptr [edi]
fld	[esp+0B0h+var_9C]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_713436
fld	dword ptr [edi+4]
fld	[esp+0B0h+var_90]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_713436
fld	dword ptr [edi+4]
fld	[esp+0B0h+var_98]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_713450

loc_713436:
test	esi, esi
jz	short loc_713441
mov	ecx, esi
call	sub_64A400

loc_713441:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 0A0h
retn	0Ch

loc_713450:
cmp	[esp+0B0h+arg_4], 0
jnz	short loc_713474
test	esi, esi
jz	short loc_713465
mov	ecx, esi
call	sub_64A400

loc_713465:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 0A0h
retn	0Ch

loc_713474:
test	ebp, ebp
jz	short loc_7134AB
test	esi, esi
jnz	short loc_7134AB
fld	dword ptr [edi+4]
sub	esp, 8
fstp	[esp+0B8h+var_B4]
mov	ecx, ebp
fld	dword ptr [edi]
fstp	[esp+0B8h+var_B8]
call	sub_654E40
test	al, al
jz	short loc_7134AB
mov	al, [ebp+76h]
pop	edi
pop	esi
shr	al, 3
pop	ebp
and	al, 1
pop	ebx
add	esp, 0A0h
retn	0Ch

loc_7134AB:
push	ebx
lea	ecx, [esp+0B4h+var_74]
call	sub_70CB20
fld	dword ptr [edi+4]
sub	esp, 8
fstp	[esp+0B8h+var_B4]
lea	edx, [esp+0B8h+var_74]
fld	dword ptr [edi]
mov	ecx, ebx
fstp	[esp+0B8h+var_B8]
push	esi		; float
push	edx		; int
call	sub_711670
mov	bl, al
mov	[esp+0B0h+var_A0], bl
test	ebp, ebp
jz	short loc_7134F6
mov	eax, dword ptr [esp+0B0h+var_A0]
fld	dword ptr [edi+4]
push	eax		; char
sub	esp, 8
fstp	[esp+0BCh+var_B8]
mov	ecx, ebp
fld	dword ptr [edi]
fstp	[esp+0BCh+var_BC]
call	sub_654E80

loc_7134F6:
test	esi, esi
jz	short loc_713501
mov	ecx, esi
call	sub_64A400

loc_713501:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 0A0h
retn	0Ch
sub_713340 endp




sub_713510 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_24=	dword ptr -24h
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

sub	esp, 4Ch
push	ebx
push	ebp
mov	ebp, [esp+54h+arg_8]
push	esi
xor	esi, esi
push	edi
mov	ebx, ecx
test	ebp, ebp
jz	short loc_713543
test	byte ptr [ebp+76h], 1
jz	short loc_713543
fld1
push	ecx		; float
mov	ecx, ebp
fstp	[esp+60h+var_60]
call	sub_655850
mov	esi, eax
test	esi, esi
jz	short loc_713543
mov	ecx, esi
call	sub_6A58E0

loc_713543:
test	byte ptr [ebx+24h], 10h
fld	dword ptr [ebx+4]
fstp	[esp+5Ch+var_44]
fld	dword ptr [ebx+8]
fstp	[esp+5Ch+var_40]
fld	dword ptr [ebx+0Ch]
fstp	[esp+5Ch+var_3C]
fld	dword ptr [ebx+10h]
fstp	[esp+5Ch+var_38]
jnz	short loc_713573
mov	eax, [ebx]
mov	edx, [eax+14h]
lea	ecx, [esp+5Ch+var_44]
push	ecx
mov	ecx, ebx
call	edx

loc_713573:
test	esi, esi
jz	short loc_7135BB
lea	eax, [esp+5Ch+var_44]
push	eax
lea	ecx, [esp+60h+var_34]
push	ecx
mov	ecx, esi
call	sub_6A65C0
fld	dword ptr [eax+4]
fstp	[esp+5Ch+arg_8]
fld	dword ptr [eax+8]
fstp	[esp+5Ch+var_4C]
fld	dword ptr [eax+0Ch]
fstp	[esp+5Ch+var_48]
fld	dword ptr [eax]
fstp	[esp+5Ch+var_44]
fld	[esp+5Ch+arg_8]
fstp	[esp+5Ch+var_40]
fld	[esp+5Ch+var_4C]
fstp	[esp+5Ch+var_3C]
fld	[esp+5Ch+var_48]
fstp	[esp+5Ch+var_38]

loc_7135BB:
mov	edi, [esp+5Ch+arg_0]
fld	dword ptr [edi]
fld	[esp+5Ch+var_3C]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_7135FD
fld	dword ptr [edi]
fld	[esp+5Ch+var_44]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_7135FD
fld	dword ptr [edi+4]
fld	[esp+5Ch+var_38]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_7135FD
fld	dword ptr [edi+4]
fld	[esp+5Ch+var_40]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_713614

loc_7135FD:
test	esi, esi
jz	short loc_713608
mov	ecx, esi
call	sub_64A400

loc_713608:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 4Ch
retn	0Ch

loc_713614:
cmp	[esp+5Ch+arg_4], 0
jnz	short loc_713632
test	esi, esi
jz	short loc_713626
mov	ecx, esi
call	sub_64A400

loc_713626:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 4Ch
retn	0Ch

loc_713632:
test	ebp, ebp
jz	short loc_713666
test	esi, esi
jnz	short loc_713666
fld	dword ptr [edi+4]
sub	esp, 8
fstp	[esp+64h+var_60]
mov	ecx, ebp
fld	dword ptr [edi]
fstp	[esp+64h+var_64]
call	sub_654E40
test	al, al
jz	short loc_713666
mov	al, [ebp+76h]
pop	edi
pop	esi
shr	al, 3
pop	ebp
and	al, 1
pop	ebx
add	esp, 4Ch
retn	0Ch

loc_713666:
push	ebx
lea	ecx, [esp+60h+var_24]
call	sub_70B430
fld	dword ptr [edi+4]
sub	esp, 8
fstp	[esp+64h+var_60]
lea	edx, [esp+64h+var_24]
fld	dword ptr [edi]
mov	ecx, ebx
fstp	[esp+64h+var_64]
push	esi		; int
push	edx		; int
call	sub_711C10
mov	bl, al
mov	[esp+5Ch+arg_4], bl
test	ebp, ebp
jz	short loc_7136B1
mov	eax, dword ptr [esp+5Ch+arg_4]
fld	dword ptr [edi+4]
push	eax		; char
sub	esp, 8
fstp	[esp+68h+var_64]
mov	ecx, ebp
fld	dword ptr [edi]
fstp	[esp+68h+var_68]
call	sub_654E80

loc_7136B1:
test	esi, esi
jz	short loc_7136BC
mov	ecx, esi
call	sub_64A400

loc_7136BC:
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
add	esp, 4Ch
retn	0Ch
sub_713510 endp

align 10h


; Attributes: thunk

sub_7136D0 proc	near
jmp	sub_713340
sub_7136D0 endp

align 10h



sub_7136E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_10]
mov	edx, [esp+arg_C]
push	eax
mov	eax, [esp+4+arg_8]
push	0
push	0
push	edx
mov	edx, [esp+10h+arg_4]
push	eax
mov	eax, [esp+14h+arg_0]
push	edx
push	eax
call	sub_7123B0
retn	14h
sub_7136E0 endp

align 10h


; Attributes: thunk

sub_713710 proc	near
jmp	sub_713510
sub_713710 endp

align 10h



sub_713720 proc	near
add	ecx, 10h
jmp	sub_713510
sub_713720 endp

align 10h



sub_713730 proc	near
add	ecx, 10h
jmp	sub_713340
sub_713730 endp

align 10h



sub_713740 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, eax
push	esi
lea	esi, [ecx+1]
lea	ebx, [ebx+0]

loc_713750:
mov	dl, [ecx]
inc	ecx
test	dl, dl
jnz	short loc_713750
sub	ecx, esi
pop	esi
jz	short locret_713777
lea	esp, [esp+0]

loc_713760:
mov	dl, [ecx+eax]
cmp	dl, 5Ch
jz	short loc_713773
cmp	dl, 2Fh
jz	short loc_713773
sub	ecx, 1
jnz	short loc_713760
retn

loc_713773:
lea	eax, [ecx+eax+1]

locret_713777:
retn
sub_713740 endp

align 10h



sub_713780 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
sub	eax, 1
jz	short loc_7137B2
sub	eax, 1
jnz	short loc_7137DF
mov	edx, [esi+14h]
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	eax, [eax+24h]
push	edx
mov	edx, [esi+0Ch]
push	edx
call	eax
cdq
add	[esi+20h], eax
mov	dword ptr [esi+14h], 0
adc	[esi+24h], edx
pop	esi
retn

loc_7137B2:
mov	edx, [esi+18h]
mov	eax, [esi+14h]
mov	ecx, edx
sub	ecx, eax
jz	short loc_7137D7
mov	ecx, [esi+8]
push	edi
mov	edi, [ecx]
sub	eax, edx
cdq
push	1
push	edx
mov	edx, [edi+3Ch]
push	eax
call	edx
mov	[esi+20h], eax
mov	[esi+24h], edx
pop	edi

loc_7137D7:
xor	eax, eax
mov	[esi+18h], eax
mov	[esi+14h], eax

loc_7137DF:
pop	esi
retn
sub_713780 endp

align 10h



sub_7137F0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 1
jnz	short loc_713824
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [esi+0Ch]
mov	eax, [eax+28h]
push	1FF8h
push	edx
call	eax
xor	ecx, ecx
xor	edx, edx
cmp	eax, ecx
setl	dl
mov	[esi+14h], ecx
dec	edx
and	eax, edx
add	[esi+20h], eax
mov	[esi+18h], eax
adc	[esi+24h], ecx

loc_713824:
pop	esi
retn
sub_7137F0 endp

align 10h



sub_713830 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 1
jnz	short loc_713844
mov	eax, [esi+20h]
sub	eax, [esi+18h]
add	eax, [esi+14h]
pop	esi
retn

loc_713844:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
cmp	eax, 0FFFFFFFFh
jz	short loc_71385C
cmp	dword ptr [esi+10h], 2
jnz	short loc_71385C
add	eax, [esi+14h]

loc_71385C:
pop	esi
retn
sub_713830 endp

align 10h



sub_713860 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 1
jnz	short loc_713881
mov	ecx, [esi+18h]
mov	eax, [esi+14h]
push	edi
xor	edi, edi
xor	edx, edx
sub	eax, ecx
sbb	edx, edi
add	eax, [esi+20h]
pop	edi
adc	edx, [esi+24h]
pop	esi
retn

loc_713881:
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [edx+14h]
call	eax
mov	ecx, eax
and	ecx, edx
cmp	ecx, 0FFFFFFFFh
jz	short loc_7138A2
cmp	dword ptr [esi+10h], 2
jnz	short loc_7138A2
mov	ecx, [esi+14h]
add	eax, ecx
adc	edx, 0

loc_7138A2:
pop	esi
retn
sub_713860 endp

align 10h



sub_7138B0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+18h]
push	edi
call	edx
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_7138DE
cmp	dword ptr [esi+10h], 2
jnz	short loc_7138DE
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
add	eax, [esi+14h]
cmp	eax, edi
jg	short loc_7138DE
mov	eax, edi

loc_7138DE:
pop	edi
pop	esi
retn
sub_7138B0 endp

align 10h



sub_7138F0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+1Ch]
push	edi
call	edx
mov	edi, edx
mov	ebx, eax
and	eax, edi
cmp	eax, 0FFFFFFFFh
jz	short loc_713931
cmp	dword ptr [esi+10h], 2
jnz	short loc_713931
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [edx+14h]
call	eax
mov	ecx, [esi+14h]
xor	esi, esi
add	eax, ecx
adc	edx, esi
cmp	edx, edi
jl	short loc_713931
jg	short loc_71392D
cmp	eax, ebx
jbe	short loc_713931

loc_71392D:
mov	ebx, eax
mov	edi, edx

loc_713931:
mov	edx, edi
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn
sub_7138F0 endp

align 10h



sub_713940 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
cmp	dword ptr [esi+10h], 1
jnz	short loc_713965
mov	ecx, [esi+14h]
mov	edi, [esi+18h]
sub	edi, ecx
cmp	edi, eax
jl	short loc_71395E
mov	edi, eax

loc_71395E:
add	ecx, edi
mov	[esi+14h], ecx
sub	eax, edi

loc_713965:
test	eax, eax
jz	short loc_713990
mov	ecx, [esi+8]
mov	edx, [ecx]
push	eax
mov	eax, [edx+2Ch]
call	eax
cmp	eax, 0FFFFFFFFh
jz	short loc_713997
add	edi, eax
cdq
add	[esi+20h], eax
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+14h], 0
adc	[esi+24h], edx

loc_713990:
mov	eax, edi
pop	edi
pop	esi
retn	4

loc_713997:
test	edi, edi
jg	short loc_713990
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	4
sub_713940 endp

align 10h



sub_7139B0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+30h]
call	edx
mov	ecx, [esi+10h]
sub	ecx, 1
jz	short loc_7139D3
sub	ecx, 1
jnz	short loc_7139DB
sub	eax, [esi+14h]
jns	short loc_7139DB
xor	eax, eax
pop	esi
retn

loc_7139D3:
mov	ecx, [esi+18h]
sub	ecx, [esi+14h]
add	eax, ecx

loc_7139DB:
pop	esi
retn
sub_7139B0 endp

align 10h



sub_7139E0 proc	near
push	esi
mov	esi, ecx
call	sub_713780
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+34h]
pop	esi
jmp	edx
sub_7139E0 endp

align 10h



sub_713A00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 1
push	edi
jnz	loc_713A92
mov	ebp, [esp+0Ch+arg_4]
cmp	ebp, 1
jnz	short loc_713A4C
mov	edx, [esi+14h]
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [esi+18h]
lea	edi, [edx+eax]
cmp	edi, ecx
ja	short loc_713A39
mov	eax, [esi+20h]
sub	eax, ecx
mov	[esi+14h], edi
add	eax, edi
pop	edi
pop	esi
pop	ebp
retn	8

loc_713A39:
mov	edi, [esi+20h]
sub	edi, ecx
xor	ebp, ebp
add	edi, edx
add	eax, edi
mov	[esi+18h], ebp
mov	[esi+14h], ebp
jmp	short loc_713A9F

loc_713A4C:
test	ebp, ebp
jnz	short loc_713A8B
mov	eax, [esp+0Ch+arg_0]
mov	edi, [esi+18h]
xor	ecx, ecx
push	ebx
xor	ebx, ebx
mov	edx, eax
sub	edx, [esi+20h]
sbb	ecx, [esi+24h]
add	edx, edi
adc	ecx, ebx
cmp	ecx, ebx
pop	ebx
ja	short loc_713A81
jb	short loc_713A73
cmp	edx, edi
ja	short loc_713A81

loc_713A73:
sub	edi, [esi+20h]
add	edi, eax
mov	[esi+14h], edi
pop	edi
pop	esi
pop	ebp
retn	8

loc_713A81:
xor	ecx, ecx
mov	[esi+18h], ecx
mov	[esi+14h], ecx
jmp	short loc_713A9F

loc_713A8B:
call	sub_713780
jmp	short loc_713A9B

loc_713A92:
call	sub_713780
mov	ebp, [esp+0Ch+arg_4]

loc_713A9B:
mov	eax, [esp+0Ch+arg_0]

loc_713A9F:
mov	ecx, [esi+8]
mov	edx, [ecx]
push	ebp
push	eax
mov	eax, [edx+38h]
call	eax
cdq
pop	edi
mov	[esi+20h], eax
mov	[esi+24h], edx
pop	esi
pop	ebp
retn	8
sub_713A00 endp

align 10h



sub_713AC0 proc	near

arg_0= qword ptr  4
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 1
push	edi
jnz	loc_713B69
mov	ebp, [esp+10h+arg_8]
cmp	ebp, 1
jnz	short loc_713B28
mov	edx, [esi+14h]
mov	eax, dword ptr [esp+10h+arg_0]
mov	ecx, [esi+18h]
lea	edi, [edx+eax]
cmp	edi, ecx
ja	short loc_713B06
mov	eax, [esi+20h]
mov	edx, [esi+24h]
xor	ebx, ebx
sub	eax, ecx
sbb	edx, ebx
xor	ecx, ecx
mov	[esi+14h], edi
add	eax, edi
pop	edi
pop	esi
pop	ebp
adc	edx, ecx
pop	ebx
retn	0Ch

loc_713B06:
mov	ebx, [esi+20h]
xor	edi, edi
xor	ebp, ebp
sub	ebx, ecx
mov	ecx, [esi+24h]
sbb	ecx, edi
add	ebx, edx
adc	ecx, edi
add	eax, ebx
adc	dword ptr [esp+10h+arg_0+4], ecx

loc_713B1E:
xor	ecx, ecx
mov	[esi+18h], ecx
mov	[esi+14h], ecx
jmp	short loc_713B76

loc_713B28:
test	ebp, ebp
jnz	short loc_713B62
mov	edi, [esi+18h]
mov	eax, dword ptr [esp+10h+arg_0]
xor	ebx, ebx
mov	edx, edi
sub	edx, [esi+20h]
mov	ecx, ebx
sbb	ecx, [esi+24h]
add	edx, eax
adc	ecx, dword ptr [esp+10h+arg_0+4]
cmp	ecx, ebx
ja	short loc_713B1E
jb	short loc_713B4F
cmp	edx, edi
ja	short loc_713B1E

loc_713B4F:
sub	edi, [esi+20h]
mov	edx, dword ptr [esp+10h+arg_0+4]
add	edi, eax
mov	[esi+14h], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_713B62:
call	sub_713780
jmp	short loc_713B72

loc_713B69:
call	sub_713780
mov	ebp, [esp+10h+arg_8]

loc_713B72:
mov	eax, dword ptr [esp+10h+arg_0]

loc_713B76:
mov	ecx, [esi+8]
mov	edi, dword ptr [esp+10h+arg_0+4]
mov	edx, [ecx]
push	ebp
push	edi
push	eax
mov	eax, [edx+3Ch]
call	eax
pop	edi
mov	[esi+20h], eax
mov	[esi+24h], edx
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_713AC0 endp

align 10h



sub_713BA0 proc	near
push	esi
mov	esi, ecx
call	sub_713780
mov	ecx, [esi+8]
mov	eax, [ecx]
pop	esi
mov	eax, [eax+40h]
jmp	eax
sub_713BA0 endp

align 10h



sub_713BC0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
sub	eax, 1
jz	short loc_713BD7
sub	eax, 1
jnz	short loc_713BDE
call	sub_713780
jmp	short loc_713BDE

loc_713BD7:
mov	dword ptr [esi+10h], 0

loc_713BDE:
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+48h]
pop	esi
jmp	edx
sub_713BC0 endp

align 10h



sub_713BF0 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+4]
jmp	edx
sub_713BF0 endp

align 10h



sub_713C00 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
jmp	edx
sub_713C00 endp

align 10h



sub_713C10 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+20h]
jmp	edx
sub_713C10 endp

align 10h



sub_713C20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	esi, ecx
mov	edi, 2
cmp	[esi+10h], edi
jz	short loc_713C5C
cmp	dword ptr [esi+0Ch], 0
jz	short loc_713C9F
call	sub_713780
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_713C9F
mov	eax, [ecx]
mov	edx, [eax+0Ch]
call	edx
test	al, al
jz	short loc_713C9F
mov	[esi+10h], edi
mov	dword ptr [esi+14h], 0
mov	dword ptr [esi+18h], 0

loc_713C5C:
mov	edi, [esp+8+arg_4]
mov	ecx, 1FF8h
sub	ecx, [esi+14h]
cmp	ecx, edi
jge	short loc_713CB5
mov	ecx, esi
call	sub_713780
cmp	edi, 1000h
jle	short loc_713CB5
mov	ecx, [esi+8]
mov	edx, [ecx]
mov	eax, [esp+8+arg_0]
mov	edx, [edx+24h]
push	edi
push	eax
call	edx

loc_713C8B:
mov	ecx, eax
test	ecx, ecx
jle	short loc_713C98
cdq
add	[esi+20h], eax
adc	[esi+24h], edx

loc_713C98:
pop	edi
mov	eax, ecx
pop	esi
retn	8

loc_713C9F:
mov	edx, [esp+8+arg_4]
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	eax, [eax+24h]
push	edx
mov	edx, [esp+0Ch+arg_0]
push	edx
call	eax
jmp	short loc_713C8B

loc_713CB5:
mov	ecx, [esi+0Ch]
mov	eax, [esp+8+arg_0]
add	ecx, [esi+14h]
push	edi
push	eax
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	[esi+14h], edi
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	esi
retn	8
sub_713C20 endp

align 10h



sub_713CE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	ebx, 1
push	edi
cmp	[esi+10h], ebx
jz	short loc_713D04
xor	edi, edi
cmp	[esi+0Ch], edi
jz	short loc_713D33
call	sub_713780
mov	[esi+10h], ebx
mov	[esi+14h], edi
mov	[esi+18h], edi

loc_713D04:
mov	eax, [esi+14h]
mov	ebx, [esi+18h]
mov	ecx, [esi+0Ch]
mov	edi, [esp+0Ch+arg_4]
sub	ebx, eax
add	ecx, eax
cmp	ebx, edi
jl	short loc_713D5C
mov	edx, [esp+0Ch+arg_0]
push	edi
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	[esi+14h], edi
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8

loc_713D33:
mov	edx, [esp+0Ch+arg_4]
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	eax, [eax+28h]
push	edx
mov	edx, [esp+10h+arg_0]
push	edx
call	eax
mov	ecx, eax
cmp	ecx, edi
jle	short loc_713D54
cdq
add	[esi+20h], eax
adc	[esi+24h], edx

loc_713D54:
pop	edi
pop	esi
mov	eax, ecx
pop	ebx
retn	8

loc_713D5C:
push	ebp
mov	ebp, [esp+10h+arg_0]
push	ebx
push	ecx
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi+18h]
sub	edi, ebx
add	esp, 0Ch
add	ebp, ebx
cmp	edi, 1000h
mov	[esi+14h], edx
jle	short loc_713DB1
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	ebp
call	edx
mov	ecx, eax
xor	edi, edi
cmp	ecx, edi
jle	short loc_713D9F
cdq
add	[esi+20h], eax
mov	[esi+18h], edi
mov	[esi+14h], edi
adc	[esi+24h], edx

loc_713D9F:
mov	eax, ecx
inc	eax
neg	eax
pop	ebp
sbb	eax, eax
pop	edi
and	eax, ecx
pop	esi
add	eax, ebx
pop	ebx
retn	8

loc_713DB1:
mov	ecx, esi
call	sub_7137F0
mov	ecx, [esi+14h]
mov	eax, [esi+18h]
sub	eax, ecx
cmp	eax, edi
jge	short loc_713DC6
mov	edi, eax

loc_713DC6:
mov	eax, [esi+0Ch]
push	edi
add	eax, ecx
push	eax
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	[esi+14h], edi
add	esp, 0Ch
pop	ebp
lea	eax, [ebx+edi]
pop	edi
pop	esi
pop	ebx
retn	8
sub_713CE0 endp

align 10h



sub_713DF0 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+10h]
jmp	edx
sub_713DF0 endp

align 10h



sub_713E00 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+14h]
jmp	edx
sub_713E00 endp

align 10h



sub_713E10 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+18h]
jmp	edx
sub_713E10 endp

align 10h



sub_713E20 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+1Ch]
jmp	edx
sub_713E20 endp

align 10h



sub_713E30 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+24h]
jmp	eax
sub_713E30 endp

align 10h



sub_713E40 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+28h]
jmp	eax
sub_713E40 endp

align 10h



sub_713E50 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+2Ch]
jmp	eax
sub_713E50 endp

align 10h



sub_713E60 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+30h]
jmp	edx
sub_713E60 endp

align 10h



sub_713E70 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+34h]
jmp	edx
sub_713E70 endp

align 10h



sub_713E80 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+38h]
jmp	eax
sub_713E80 endp

align 10h



sub_713E90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_8]
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+3Ch]
push	edx
mov	edx, [esp+4+arg_4]
push	edx
mov	edx, [esp+8+arg_0]
push	edx
call	eax
retn	0Ch
sub_713E90 endp

align 10h



sub_713EB0 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+40h]
jmp	eax
sub_713EB0 endp

align 10h



sub_713EC0 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	eax, [eax+44h]
jmp	eax
sub_713EC0 endp

align 10h



sub_713ED0 proc	near
mov	ecx, [ecx+8]
mov	eax, [ecx]
mov	edx, [eax+48h]
jmp	edx
sub_713ED0 endp

align 10h



sub_713EE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_713EEF
call	sub_64A430

loc_713EEF:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_713F0B
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_713F0B:
mov	eax, esi
pop	esi
retn	4
sub_713EE0 endp

align 10h



sub_713F20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+8], 0
mov	dword ptr [esi], offset	off_143FB48
jz	short loc_713F34
call	sub_713780

loc_713F34:
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_713F49
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_713F49:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_713F55
call	sub_64A430

loc_713F55:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_713F71
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_713F71:
mov	eax, esi
pop	esi
retn	4
sub_713F20 endp

align 10h



sub_713F80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143FB98
test	edi, edi
jz	short loc_713FA6
mov	ecx, edi
call	sub_64A420

loc_713FA6:
mov	[esi+8], edi
mov	dword ptr [esi], offset	off_143FB48
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+24h]
push	0
push	20h
push	1FF8h
call	edx
mov	[esi+0Ch], eax
mov	dword ptr [esi+10h], 0
mov	eax, [edi]
mov	edx, [eax+14h]
mov	ecx, edi
call	edx
mov	[esi+20h], eax
pop	edi
mov	[esi+24h], edx
mov	dword ptr [esi+14h], 0
mov	dword ptr [esi+18h], 0
mov	eax, esi
pop	esi
retn	4
sub_713F80 endp

align 10h



sub_714000 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
push	ebx		; int
lea	ecx, [esi+0Ch]	; lpCriticalSection
mov	[esi], eax
call	sub_64D6D0
mov	[esi+8], ebx
mov	[esi+4], ebx
mov	[esi+24h], bl
mov	[esi+28h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_714000 endp

align 10h



sub_714030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+0Ch]
xor	ebx, ebx
push	ebp		; lpCriticalSection
xor	edi, edi
mov	[esp+1Ch+var_8], ebx
call	ds:EnterCriticalSection
mov	ecx, [esi+4]
mov	eax, [esp+18h+arg_4]
cmp	eax, ecx
jnb	short loc_7140A4
mov	edx, [esi+8]
mov	ecx, [edx+eax*8]
lea	esi, [edx+eax*8]
cmp	ecx, edi
jz	short loc_714068
call	sub_64A420

loc_714068:
mov	edi, [esp+18h+arg_0]
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_714077
call	sub_666B00

loc_714077:
mov	eax, [esi]
mov	[edi], eax
mov	ecx, [esi+4]
mov	[edi+4], ecx
test	bl, 1
jz	short loc_714093
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_714093
call	sub_666B00

loc_714093:		; lpCriticalSection
push	ebp
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_7140A4:
mov	ebx, 1
mov	[esp+18h+var_8], edi
mov	[esp+18h+var_4], edi
lea	esi, [esp+18h+var_8]
jmp	short loc_714068
sub_714030 endp

align 10h



sub_7140C0 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi+8]
test	eax, eax
jz	short loc_714105
mov	eax, [edi+4]
push	esi
mov	esi, [edi+8]
test	eax, eax
jbe	short loc_7140EC
push	ebx
mov	ebx, eax

loc_7140D8:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7140E3
call	sub_666B00

loc_7140E3:
add	esi, 8
sub	ebx, 1
jnz	short loc_7140D8
pop	ebx

loc_7140EC:
mov	eax, [edi+8]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi+8], 0
pop	esi

loc_714105:
pop	edi
retn
sub_7140C0 endp

align 10h



sub_714110 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, ecx
lea	ebx, [edi+0Ch]
push	ebx		; lpCriticalSection
mov	[esp+1Ch+var_4], ebx
call	ds:EnterCriticalSection
mov	esi, [esp+18h+arg_0]
mov	eax, [edi+4]
add	esi, 10h
and	esi, 0FFFFFFF0h
mov	[esp+18h+var_8], esi
cmp	esi, eax
jbe	loc_714244
mov	ecx, [edi+8]
push	ebp
xor	ebp, ebp
test	ecx, ecx
mov	ecx, [edi]
push	ebp
jnz	short loc_714186
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, ds:0[esi*8]
push	eax
call	edx
mov	[edi+8], eax
mov	eax, [edi+8]
cmp	esi, ebp
jbe	loc_714240
mov	ecx, esi
jmp	short loc_714170
align 10h

loc_714170:
cmp	eax, ebp
jz	short loc_714179
mov	[eax], ebp
mov	[eax+4], ebp

loc_714179:
add	eax, 8
sub	ecx, 1
jnz	short loc_714170
jmp	loc_714240

loc_714186:
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, ds:0[esi*8]
push	edx
call	eax
mov	[esp+18h+var_8], eax
mov	ecx, eax
cmp	esi, ebp
jbe	short loc_7141B2
mov	edx, esi

loc_7141A1:
cmp	ecx, ebp
jz	short loc_7141AA
mov	[ecx], ebp
mov	[ecx+4], ebp

loc_7141AA:
add	ecx, 8
sub	edx, 1
jnz	short loc_7141A1

loc_7141B2:
mov	ecx, [edi+4]
test	ecx, ecx
jbe	short loc_714204
lea	esp, [esp+0]

loc_7141C0:
mov	esi, [edi+8]
lea	ebx, ds:0[ebp*8]
mov	ecx, [esi+ebx]
add	esi, ebx
test	ecx, ecx
jz	short loc_7141DC
call	sub_64A420
mov	eax, [esp+18h+var_8]

loc_7141DC:
mov	ecx, [ebx+eax]
test	ecx, ecx
jz	short loc_7141EC
call	sub_666B00
mov	eax, [esp+18h+var_8]

loc_7141EC:
mov	edx, [esi]
mov	[ebx+eax], edx
mov	ecx, [esi+4]
mov	[ebx+eax+4], ecx
mov	edx, [edi+4]
inc	ebp
cmp	ebp, edx
jb	short loc_7141C0
mov	esi, [esp+18h+var_4]

loc_714204:
mov	eax, [edi+4]
mov	ebp, [edi+8]
test	eax, eax
jbe	short loc_714224
mov	ebx, eax

loc_714210:
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_71421C
call	sub_666B00

loc_71421C:
add	ebp, 8
sub	ebx, 1
jnz	short loc_714210

loc_714224:
mov	eax, [edi+8]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	ecx, [esp+1Ch+var_C]
mov	ebx, [esp+1Ch+var_4]
mov	[edi+8], ecx

loc_714240:
mov	[edi+4], esi
pop	ebp

loc_714244:
mov	edx, [edi+8]
mov	edi, [esp+18h+arg_4]
mov	ecx, [edi]
mov	eax, [esp+18h+arg_0]
lea	esi, [edx+eax*8]
test	ecx, ecx
jz	short loc_71425D
call	sub_64A420

loc_71425D:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_714268
call	sub_666B00

loc_714268:
mov	ecx, [edi]
mov	[esi], ecx
mov	edx, [edi+4]
push	ebx		; lpCriticalSection
mov	[esi+4], edx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	8
sub_714110 endp

align 10h



sub_714290 proc	near
push	esi
mov	esi, ecx
call	sub_7140C0
lea	ecx, [esi+0Ch]
pop	esi
jmp	sub_64D730
sub_714290 endp

align 10h



sub_7142B0 proc	near

var_4= dword ptr -4

push	ecx
fld	ds:flt_1440108
fidiv	dword ptr [ecx+8]
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_7142B0 endp

align 10h



sub_7142D0 proc	near
xor	eax, eax
cmp	[ecx+68h], eax
setnz	al
retn
sub_7142D0 endp

align 10h



sub_7142E0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	ecx, [ecx]
mov	ecx, [ecx+0Ch]
push	ebx
push	esi
lea	eax, [edx+3]
mov	ebx, eax
push	edi
shr	ebx, 0Ch
mov	ebx, [ecx+ebx*4]
and	eax, 0FFFh
movzx	eax, byte ptr [ebx+eax]
lea	edi, [edx+2]
mov	ebx, edi
and	edi, 0FFFh
shr	ebx, 0Ch
mov	ebx, [ecx+ebx*4]
movzx	edi, byte ptr [ebx+edi]
shl	eax, 8
or	eax, edi
lea	esi, [edx+1]
mov	edi, esi
shr	edi, 0Ch
mov	edi, [ecx+edi*4]
and	esi, 0FFFh
movzx	esi, byte ptr [edi+esi]
shl	eax, 8
or	eax, esi
mov	esi, edx
shr	esi, 0Ch
mov	ecx, [ecx+esi*4]
and	edx, 0FFFh
movzx	edx, byte ptr [ecx+edx]
pop	edi
shl	eax, 8
pop	esi
or	eax, edx
pop	ebx
retn	4
sub_7142E0 endp

align 10h



sub_714360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
mov	edx, [eax+0Ch]
mov	ecx, [esp+arg_0]
push	esi
mov	eax, ecx
shr	eax, 0Ch
mov	eax, [edx+eax*4]
mov	esi, ecx
and	esi, 0FFFh
movsx	eax, byte ptr [eax+esi]
test	al, 1
jnz	short loc_714393
mov	ecx, [esp+4+arg_4]
sar	eax, 1
mov	[ecx], eax
mov	eax, 1
pop	esi
retn	8

loc_714393:
inc	ecx
mov	esi, ecx
shr	esi, 0Ch
mov	edx, [edx+esi*4]
and	ecx, 0FFFh
movsx	ecx, byte ptr [edx+ecx]
mov	edx, [esp+4+arg_4]
sar	eax, 1
and	eax, 7Fh
shl	ecx, 7
or	ecx, eax
mov	[edx], ecx
mov	eax, 2
pop	esi
retn	8
sub_714360 endp

align 10h



sub_7143C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [ecx]
mov	ecx, [esp+8+arg_0]
mov	esi, [edi+0Ch]
mov	eax, ecx
shr	eax, 0Ch
mov	eax, [esi+eax*4]
mov	edx, ecx
and	edx, 0FFFh
movzx	eax, byte ptr [eax+edx]
mov	edx, eax
and	edx, 3
shr	eax, 2
sub	edx, 0
jz	loc_7144CC
sub	edx, 1
jz	loc_7144A4
sub	edx, 1
lea	edx, [ecx+1]
jz	short loc_714461
mov	edi, [edi+0Ch]
lea	esi, [ecx+2]
add	ecx, 3
push	ebx
mov	ebx, ecx
shr	ebx, 0Ch
mov	ebx, [edi+ebx*4]
and	ecx, 0FFFh
movzx	ecx, byte ptr [ebx+ecx]
mov	ebx, esi
and	esi, 0FFFh
shr	ebx, 0Ch
mov	ebx, [edi+ebx*4]
movzx	esi, byte ptr [ebx+esi]
shl	ecx, 8
or	ecx, esi
mov	esi, edx
shr	esi, 0Ch
mov	esi, [edi+esi*4]
and	edx, 0FFFh
movzx	edx, byte ptr [esi+edx]
shl	ecx, 8
or	ecx, edx
shl	ecx, 6
or	ecx, eax
mov	eax, [esp+0Ch+arg_4]
pop	ebx
pop	edi
mov	[eax], ecx
mov	eax, 4
pop	esi
retn	8

loc_714461:
add	ecx, 2
mov	edi, esi
mov	esi, ecx
shr	esi, 0Ch
mov	esi, [edi+esi*4]
and	ecx, 0FFFh
movzx	ecx, byte ptr [esi+ecx]
mov	esi, edx
shr	esi, 0Ch
mov	esi, [edi+esi*4]
and	edx, 0FFFh
movzx	edx, byte ptr [esi+edx]
shl	ecx, 8
or	ecx, edx
shl	ecx, 6
or	ecx, eax
mov	eax, [esp+8+arg_4]
pop	edi
mov	[eax], ecx
mov	eax, 3
pop	esi
retn	8

loc_7144A4:
inc	ecx
mov	edx, ecx
shr	edx, 0Ch
mov	edx, [esi+edx*4]
and	ecx, 0FFFh
movzx	ecx, byte ptr [edx+ecx]
mov	edx, [esp+8+arg_4]
shl	ecx, 6
or	ecx, eax
pop	edi
mov	[edx], ecx
mov	eax, 2
pop	esi
retn	8

loc_7144CC:
mov	ecx, [esp+8+arg_4]
pop	edi
mov	[ecx], eax
mov	eax, 1
pop	esi
retn	8
sub_7143C0 endp

align 10h



sub_7144E0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+18h], 0
jz	short loc_714548
mov	ecx, [esi+4]
push	edi
lea	eax, [esi+10h]
push	eax
push	ecx
mov	ecx, esi
call	sub_714360
add	[esi+4], eax
mov	eax, [esi+4]
lea	edx, [esi+14h]
push	edx
push	eax
mov	ecx, esi
call	sub_714360
add	[esi+4], eax
mov	eax, [esi+4]
lea	edi, [esi+1Ch]
push	edi
push	eax
mov	ecx, esi
call	sub_7143C0
add	[esi+4], eax
mov	eax, [esi+4]
mov	[esi+20h], eax
mov	eax, [edi]
mov	byte ptr [esi+24h], 1
test	al, 1
jz	short loc_714545
shr	eax, 1
push	edi
push	eax
mov	ecx, esi
mov	[esi+20h], eax
call	sub_7143C0
add	[esi+20h], eax
mov	byte ptr [esi+24h], 0

loc_714545:
shr	dword ptr [edi], 1
pop	edi

loc_714548:
pop	esi
retn
sub_7144E0 endp

align 10h



sub_714550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
mov	ecx, [eax]
mov	edx, [esp+arg_0]
movzx	eax, byte ptr [edx+ecx]
add	edx, ecx
mov	ecx, eax
and	ecx, 3
shr	eax, 2
sub	ecx, 0
jz	short loc_7145D7
sub	ecx, 1
jz	short loc_7145C0
sub	ecx, 1
jz	short loc_7145A0
movzx	ecx, byte ptr [edx+3]
push	esi
movzx	esi, byte ptr [edx+2]
movzx	edx, byte ptr [edx+1]
shl	ecx, 8
or	ecx, esi
shl	ecx, 8
or	ecx, edx
shl	ecx, 6
or	ecx, eax
mov	eax, [esp+4+arg_4]
mov	[eax], ecx
mov	eax, 4
pop	esi
retn	8

loc_7145A0:
movzx	ecx, byte ptr [edx+2]
movzx	edx, byte ptr [edx+1]
shl	ecx, 8
or	ecx, edx
shl	ecx, 6
or	ecx, eax
mov	eax, [esp+arg_4]
mov	[eax], ecx
mov	eax, 3
retn	8

loc_7145C0:
movzx	ecx, byte ptr [edx+1]
mov	edx, [esp+arg_4]
shl	ecx, 6
or	ecx, eax
mov	[edx], ecx
mov	eax, 2
retn	8

loc_7145D7:
mov	ecx, [esp+arg_4]
mov	[ecx], eax
mov	eax, 1
retn	8
sub_714550 endp

align 10h



sub_7145F0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+18h], 0
jz	loc_7146A3
mov	ecx, [esi]
mov	eax, [esi+4]
mov	edx, [ecx]
lea	ecx, [edx+eax]
movsx	eax, byte ptr [ecx]
test	al, 1
jnz	short loc_71461A
sar	eax, 1
mov	[esi+10h], eax
mov	eax, 1
jmp	short loc_714630

loc_71461A:
movsx	ecx, byte ptr [ecx+1]
sar	eax, 1
and	eax, 7Fh
shl	ecx, 7
or	ecx, eax
mov	[esi+10h], ecx
mov	eax, 2

loc_714630:
add	[esi+4], eax
mov	edx, [esi]
mov	eax, [esi+4]
mov	ecx, [edx]
add	ecx, eax
movsx	eax, byte ptr [ecx]
test	al, 1
jnz	short loc_71464F
sar	eax, 1
mov	[esi+14h], eax
mov	eax, 1
jmp	short loc_714665

loc_71464F:
movsx	edx, byte ptr [ecx+1]
sar	eax, 1
and	eax, 7Fh
shl	edx, 7
or	edx, eax
mov	[esi+14h], edx
mov	eax, 2

loc_714665:
add	[esi+4], eax
mov	eax, [esi+4]
push	edi
lea	edi, [esi+1Ch]
push	edi
push	eax
mov	ecx, esi
call	sub_714550
add	[esi+4], eax
mov	eax, [esi+4]
mov	[esi+20h], eax
mov	eax, [edi]
mov	byte ptr [esi+24h], 1
test	al, 1
jz	short loc_7146A0
shr	eax, 1
push	edi
push	eax
mov	ecx, esi
mov	[esi+20h], eax
call	sub_714550
add	[esi+20h], eax
mov	byte ptr [esi+24h], 0

loc_7146A0:
shr	dword ptr [edi], 1
pop	edi

loc_7146A3:
pop	esi
retn
sub_7145F0 endp

align 10h



sub_7146B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	edx, [ecx]
mov	[esi], edx
push	edi
mov	edi, [eax+4]
cmp	dword ptr [edi], 0
jnz	short loc_7146D2
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7146D2
call	sub_64A420

loc_7146D2:
cmp	dword ptr [esi+4], 0
jnz	short loc_7146E4
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_7146E4
call	sub_666B00

loc_7146E4:
mov	eax, [edi]
mov	[esi+4], eax
mov	ecx, [edi+4]
pop	edi
mov	[esi+8], ecx
pop	esi
retn	4
sub_7146B0 endp

align 10h



sub_714700 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
mov	edx, [eax+0Ch]
mov	ecx, [esp+arg_0]
push	esi
mov	eax, ecx
shr	eax, 0Ch
mov	eax, [edx+eax*4]
mov	esi, ecx
and	esi, 0FFFh
movzx	eax, byte ptr [eax+esi]
test	al, 1
jnz	short loc_714733
mov	ecx, [esp+4+arg_4]
shr	eax, 1
mov	[ecx], eax
mov	eax, 1
pop	esi
retn	8

loc_714733:
inc	ecx
mov	esi, ecx
shr	esi, 0Ch
mov	edx, [edx+esi*4]
and	ecx, 0FFFh
movzx	ecx, byte ptr [edx+ecx]
mov	edx, [esp+4+arg_4]
shr	eax, 1
shl	ecx, 7
or	ecx, eax
mov	[edx], ecx
mov	eax, 2
pop	esi
retn	8
sub_714700 endp

align 10h



sub_714760 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	edx, [esi]
mov	edx, [edx+0Ch]
push	edi
mov	ecx, eax
shr	ecx, 0Ch
mov	ecx, [edx+ecx*4]
mov	edx, [esp+8+arg_4]
mov	edi, eax
and	edi, 0FFFh
mov	cl, [edi+ecx]
mov	[edx], cl
movzx	ecx, cl
and	ecx, 0Fh
movzx	edi, ds:byte_143FBE8[ecx]
inc	eax
inc	edx
mov	[esp+8+arg_0], edi
test	edi, edi
jbe	short loc_7147CD
push	ebx
push	ebp
nop

loc_7147A0:
mov	ebx, [esi]
mov	ebx, [ebx+0Ch]
mov	ecx, eax
shr	ecx, 0Ch
mov	ecx, [ebx+ecx*4]
mov	ebp, eax
and	ebp, 0FFFh
mov	cl, [ecx+ebp]
mov	[edx], cl
inc	edx
inc	eax
sub	edi, 1
jnz	short loc_7147A0
mov	eax, [esp+10h+arg_0]
pop	ebp
pop	ebx
pop	edi
inc	eax
pop	esi
retn	8

loc_7147CD:
lea	eax, [edi+1]
pop	edi
pop	esi
retn	8
sub_714760 endp

align 10h



sub_7147E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [eax]
mov	cl, [edx+ecx]
mov	eax, [esp+8+arg_4]
mov	[eax], cl
movzx	ecx, cl
and	ecx, 0Fh
movzx	ebp, ds:byte_143FBE8[ecx]
inc	edx
inc	eax
test	ebp, ebp
jbe	short loc_714821
push	edi
mov	edi, ebp
jmp	short loc_714810
align 10h

loc_714810:
mov	ecx, [esi]
mov	ecx, [ecx]
mov	cl, [edx+ecx]
mov	[eax], cl
inc	eax
inc	edx
sub	edi, 1
jnz	short loc_714810
pop	edi

loc_714821:
pop	esi
lea	eax, [ebp+1]
pop	ebp
retn	8
sub_7147E0 endp

align 10h



sub_714830 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, [ecx+24h]
jnb	short loc_714851
mov	ecx, [ecx+20h]
push	esi
mov	esi, [ecx+eax*4]
test	esi, esi
jz	short loc_71484B
mov	ecx, esi
call	sub_70C940

loc_71484B:
mov	eax, esi
pop	esi
retn	8

loc_714851:
xor	eax, eax
retn	8
sub_714830 endp

align 10h



sub_714860 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
cmp	edx, 0FFFFFFFFh
jz	short loc_71487F
mov	eax, [ecx+34h]
test	eax, eax
jnz	short loc_714888
cmp	byte_1856522, al
jnz	short loc_71487F
mov	byte_1856522, 1

loc_71487F:
fld	ds:flt_143FBE4
retn	4

loc_714888:
cmp	edx, eax
jnb	short loc_714898
mov	ecx, [ecx+30h]
lea	eax, [edx+edx*2]
fld	dword ptr [ecx+eax*4]
retn	4

loc_714898:
fldz
retn	4
sub_714860 endp

align 10h



sub_7148A0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
cmp	edx, 0FFFFFFFFh
jnz	short loc_7148B2
fld	ds:flt_143FBE4

locret_7148AF:
retn	4

loc_7148B2:
cmp	edx, [ecx+34h]
jnb	short loc_7148E9
push	esi
mov	esi, [ecx+30h]
lea	eax, [edx+edx*2]
movzx	eax, word ptr [esi+eax*4+8]
mov	[esp+4+arg_0], eax
pop	esi
fild	[esp+arg_0]
fdiv	ds:dbl_15FCE20
fstp	[esp+arg_0]
fldz
fld	[esp+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short locret_7148AF
fstp	st

loc_7148E9:
mov	eax, [ecx]
mov	[esp+arg_0], edx
mov	edx, [eax+20h]
jmp	edx
sub_7148A0 endp

align 10h



sub_714900 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jz	short loc_71493D
mov	edx, [ecx+34h]
test	edx, edx
jz	short loc_71493D
cmp	eax, edx
jnb	short loc_714938
mov	ecx, [ecx+30h]
lea	eax, [eax+eax*2]
movzx	edx, word ptr [ecx+eax*4+0Ah]
mov	[esp+arg_0], edx
fild	[esp+arg_0]
fdiv	ds:dbl_15FCE20
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4

loc_714938:
fldz
retn	4

loc_71493D:
fld	ds:flt_15FD8F8
retn	4
sub_714900 endp

align 10h



sub_714950 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+20h], 0
push	edi
mov	dword ptr [esi], offset	off_143FBF8
jz	short loc_71498B
mov	eax, [esi+24h]
xor	edi, edi
cmp	[eax+4], edi
jbe	short loc_71499A
lea	ebx, [ebx+0]

loc_714970:
mov	ecx, [esi+24h]
mov	edx, [ecx]
mov	ecx, [edx+edi*4]
mov	eax, [ecx]
mov	edx, [eax+4]
push	esi
call	edx
mov	eax, [esi+24h]
inc	edi
cmp	edi, [eax+4]
jb	short loc_714970
jmp	short loc_71499A

loc_71498B:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_71499A
mov	edx, [ecx]
mov	eax, [edx+4]
push	esi
call	eax

loc_71499A:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_7149AC
mov	edx, [ecx]
mov	eax, [esi+1Ch]
mov	edx, [edx+8]
push	eax
call	edx

loc_7149AC:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_7149B8
call	sub_64A400

loc_7149B8:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_7149C4
call	sub_64A430

loc_7149C4:
pop	edi
mov	dword ptr [esi], offset	off_1436C18
pop	esi
retn
sub_714950 endp

align 10h



sub_7149D0 proc	near
mov	eax, 200h
retn
sub_7149D0 endp

align 10h



sub_7149E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
add	ecx, 18h
push	ecx
mov	ecx, esi
call	sub_666050
mov	eax, esi
pop	esi
retn	4
sub_7149E0 endp

align 10h



sub_714A00 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+0Ch]
push	esi
mov	esi, [esp+4+arg_0]
mov	edx, [esi+0Ch]
and	edx, 0FFFFFFFCh
and	eax, 0FFFFFFFCh
add	edx, 8
add	eax, 8
push	ebx

loc_714A18:
mov	bl, [eax]
cmp	bl, [edx]
jnz	short loc_714A38
test	bl, bl
jz	short loc_714A34
mov	bl, [eax+1]
cmp	bl, [edx+1]
jnz	short loc_714A38
add	eax, 2
add	edx, 2
test	bl, bl
jnz	short loc_714A18

loc_714A34:
xor	eax, eax
jmp	short loc_714A3D

loc_714A38:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_714A3D:
pop	ebx
test	eax, eax
jnz	short loc_714A5B
mov	eax, [ecx+8]
cmp	eax, [esi+8]
jnz	short loc_714A5B
mov	ecx, [ecx+10h]
cmp	ecx, [esi+10h]
jnz	short loc_714A5B
mov	eax, 1
pop	esi
retn	4

loc_714A5B:
xor	eax, eax
pop	esi
retn	4
sub_714A00 endp

align 10h



sub_714A70 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
call	sub_64A420
retn	4
sub_714A70 endp

align 10h



; int __thiscall sub_714A80(void *, char)
sub_714A80 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1437D90
jz	short loc_714A99
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_714A99:
mov	eax, esi
pop	esi
retn	4
sub_714A80 endp

align 10h



sub_714AA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+0Ch]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	ecx, [esi+8]
mov	edx, eax
mov	eax, ecx
shr	eax, 7
xor	eax, [esi+10h]
pop	esi
xor	eax, ecx
xor	eax, edx
retn	4
sub_714AA0 endp

align 10h



sub_714AE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, [eax]
jz	short loc_714AED
xor	al, al
retn	8

loc_714AED:
mov	eax, [eax+4]
mov	ecx, [esp+arg_0]
push	eax
call	sub_714A00
retn	8
sub_714AE0 endp

align 10h



sub_714B00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_714B59
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_714B55
mov	ecx, dword_1855FC0
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 105h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_714B55:
xor	eax, eax
mov	[esi], eax

loc_714B59:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_714B00 endp

align 10h



sub_714B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_714BC8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_714BC4
mov	ecx, dword_1855FC0
lea	edi, [esp+8+arg_0]
mov	[esp+8+arg_0], 2
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+28h]
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_714BC4:
xor	eax, eax
mov	[esi], eax

loc_714BC8:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_714B70 endp

align 10h



sub_714BE0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_714C10
mov	eax, [edi]
test	eax, eax
jz	short loc_714C05
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_714C05:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_714C10:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_714C43
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_714C43:
lea	eax, [esp+8+arg_4]
push	eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, ds:0[esi*4]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_714BE0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_716240

loc_714C70:
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [ecx+0Ch]
sub	edi, 1
mov	ebx, 0
js	short loc_714CE2
mov	eax, [ecx+10h]
mov	ecx, [ecx+8]
mov	esi, [ecx+0Ch]
mov	[esp+14h+var_4], eax
nop

loc_714C90:
lea	eax, [ebx+edi]
cdq
sub	eax, edx
mov	edx, [esp+14h+var_4]
sar	eax, 1
lea	ecx, [edx+eax*8]
lea	edx, [ecx+1]
mov	ebp, edx
shr	ebp, 0Ch
mov	ebp, [esi+ebp*4]
and	edx, 0FFFh
movzx	edx, byte ptr [edx+ebp]
mov	ebp, ecx
shr	ebp, 0Ch
mov	ebp, [esi+ebp*4]
and	ecx, 0FFFh
movzx	ecx, byte ptr [ecx+ebp]
shl	edx, 8
or	edx, ecx
movzx	ecx, [esp+14h+arg_0]
cmp	ecx, edx
jz	short loc_714CE5
jnb	short loc_714CDB
lea	edi, [eax-1]
jmp	short loc_714CDE

loc_714CDB:
lea	ebx, [eax+1]

loc_714CDE:
cmp	ebx, edi
jle	short loc_714C90

loc_714CE2:
or	eax, 0FFFFFFFFh

loc_714CE5:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
; END OF FUNCTION CHUNK	FOR sub_716240
align 10h



sub_714CF0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+10h]
mov	edx, [esp+arg_0]
mov	ecx, [ecx+8]
mov	ecx, [ecx+0Ch]
lea	eax, [eax+edx*8+2]
push	esi
lea	edx, [eax+1]
mov	esi, edx
shr	esi, 0Ch
mov	esi, [ecx+esi*4]
and	edx, 0FFFh
movzx	dx, byte ptr [esi+edx]
mov	esi, eax
shr	esi, 0Ch
mov	ecx, [ecx+esi*4]
shl	dx, 8
and	eax, 0FFFh
movzx	eax, byte ptr [ecx+eax]
movsx	edx, dx
or	edx, eax
mov	[esp+4+arg_0], edx
fild	[esp+4+arg_0]
test	edx, edx
jge	short loc_714D44
fadd	ds:flt_15FCC08

loc_714D44:
pop	esi
retn	4
sub_714CF0 endp

align 10h



sub_714D50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [ecx+14h]
push	ebx
push	ebp
push	esi
sub	eax, 1
mov	edx, 0
push	edi
mov	[esp+20h+var_8], ecx
mov	[esp+20h+var_C], eax
mov	[esp+20h+var_10], edx
js	loc_714E32
mov	esi, [ecx+18h]
mov	[esp+20h+var_4], esi
mov	esi, [ecx+8]
mov	ebp, [esi+0Ch]
jmp	short loc_714D87

loc_714D83:
mov	ecx, [esp+20h+var_8]

loc_714D87:
mov	esi, [esp+20h+var_4]
mov	ecx, [ecx+8]
mov	ecx, [ecx+0Ch]
add	eax, edx
cdq
sub	eax, edx
sar	eax, 1
lea	edx, [eax+eax*2]
lea	edi, [esi+edx*2]
lea	edx, [edi+1]
mov	esi, edx
and	edx, 0FFFh
shr	esi, 0Ch
mov	esi, [ecx+esi*4]
movzx	esi, byte ptr [esi+edx]
mov	edx, edi
shr	edx, 0Ch
mov	ecx, [ecx+edx*4]
mov	ebx, edi
and	ebx, 0FFFh
movzx	edx, byte ptr [ecx+ebx]
shl	esi, 8
or	esi, edx
lea	edx, [edi+2]
lea	ebx, [edx+1]
mov	ecx, ebx
shr	ecx, 0Ch
mov	ecx, [ebp+ecx*4+0]
and	ebx, 0FFFh
movzx	ecx, byte ptr [ecx+ebx]
mov	ebx, edx
shr	ebx, 0Ch
mov	ebx, [ebp+ebx*4+0]
and	edx, 0FFFh
movzx	edx, byte ptr [ebx+edx]
shl	ecx, 8
or	ecx, edx
mov	edx, [esp+20h+arg_0]
cmp	edx, esi
jnz	short loc_714E0D
mov	edx, [esp+20h+arg_4]
cmp	edx, ecx
jz	short loc_714E3E

loc_714E0D:
setb	cl
test	cl, cl
jz	short loc_714E1F
mov	edx, [esp+20h+var_10]
dec	eax
mov	[esp+20h+var_C], eax
jmp	short loc_714E2A

loc_714E1F:
lea	edx, [eax+1]
mov	eax, [esp+20h+var_C]
mov	[esp+20h+var_10], edx

loc_714E2A:
cmp	edx, eax
jle	loc_714D83

loc_714E32:
fldz
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_714E3E:
mov	ecx, [esp+20h+var_8]
mov	edx, [ecx+8]
mov	ecx, [edx+0Ch]
add	edi, 4
lea	eax, [edi+1]
mov	edx, eax
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
and	eax, 0FFFh
movzx	ax, byte ptr [edx+eax]
mov	edx, edi
shr	edx, 0Ch
mov	ecx, [ecx+edx*4]
and	edi, 0FFFh
movzx	dx, byte ptr [ecx+edi]
shl	ax, 8
or	ax, dx
pop	edi
cwde
pop	esi
mov	[esp+18h+arg_0], eax
pop	ebp
pop	ebx
fild	[esp+10h+arg_0]
add	esp, 10h
retn	8
sub_714D50 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_716390

loc_714E90:
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [ecx+0Ch]
sub	edi, 1
mov	ebx, 0
js	short loc_714EE2
mov	eax, [ecx+10h]
mov	ecx, [ecx+8]
mov	esi, [ecx]
movzx	ebp, [esp+14h+arg_0]
mov	[esp+14h+var_4], eax

loc_714EB3:
lea	eax, [ebx+edi]
cdq
sub	eax, edx
mov	edx, [esp+14h+var_4]
sar	eax, 1
lea	edx, [edx+eax*8]
movzx	ecx, byte ptr [esi+edx+1]
movzx	edx, byte ptr [esi+edx]
shl	ecx, 8
or	ecx, edx
cmp	ebp, ecx
jz	short loc_714EE5
jnb	short loc_714EDB
lea	edi, [eax-1]
jmp	short loc_714EDE

loc_714EDB:
lea	ebx, [eax+1]

loc_714EDE:
cmp	ebx, edi
jle	short loc_714EB3

loc_714EE2:
or	eax, 0FFFFFFFFh

loc_714EE5:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
; END OF FUNCTION CHUNK	FOR sub_716390
align 10h



sub_714EF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
push	ebp
mov	ebp, [ecx+14h]
sub	ebp, 1
push	esi
mov	eax, 0
push	edi
mov	[esp+1Ch+var_8], ecx
mov	[esp+1Ch+var_C], eax
js	short loc_714F82
mov	edx, [ecx+18h]
mov	[esp+1Ch+var_4], edx
mov	edx, [ecx+8]
mov	ebx, [edx]
jmp	short loc_714F24
align 10h

loc_714F20:
mov	ecx, [esp+1Ch+var_8]

loc_714F24:
mov	ecx, [ecx+8]
mov	esi, [esp+1Ch+var_4]
add	eax, ebp
cdq
sub	eax, edx
sar	eax, 1
lea	edx, [eax+eax*2]
lea	edi, [esi+edx*2]
mov	edx, [ecx]
movzx	ecx, byte ptr [edx+edi]
lea	esi, [edx+edi]
movzx	edx, byte ptr [esi+1]
movzx	esi, byte ptr [ebx+edi+3]
shl	edx, 8
or	edx, ecx
movzx	ecx, byte ptr [ebx+edi+2]
shl	esi, 8
or	esi, ecx
mov	ecx, [esp+1Ch+arg_0]
cmp	ecx, edx
jnz	short loc_714F69
mov	ecx, [esp+1Ch+arg_4]
cmp	ecx, esi
jz	short loc_714F8E

loc_714F69:
setb	cl
test	cl, cl
jz	short loc_714F79
lea	ebp, [eax-1]
mov	eax, [esp+1Ch+var_C]
jmp	short loc_714F7E

loc_714F79:
inc	eax
mov	[esp+1Ch+var_C], eax

loc_714F7E:
cmp	eax, ebp
jle	short loc_714F20

loc_714F82:
fldz
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_714F8E:
mov	edx, [esp+1Ch+var_8]
mov	eax, [edx+8]
mov	ecx, [eax]
movzx	dx, byte ptr [ecx+edi+5]
lea	eax, [ecx+edi+4]
movzx	ax, byte ptr [eax]
shl	dx, 8
or	dx, ax
pop	edi
movsx	ecx, dx
pop	esi
mov	[esp+14h+arg_0], ecx
pop	ebp
pop	ebx
fild	[esp+0Ch+arg_0]
add	esp, 0Ch
retn	8
sub_714EF0 endp

align 10h



sub_714FD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
lea	eax, [esp+8+arg_0]
push	eax
mov	esi, ecx
push	edi
mov	[esi+4], edi
call	sub_714360
movzx	ecx, word ptr [esp+8+arg_0]
lea	edx, [esp+8+arg_0]
add	edi, eax
push	edx
mov	[esi+8], cx
push	edi
mov	ecx, esi
mov	[esi+4], edi
call	sub_714360
add	edi, eax
mov	ax, word ptr [esp+8+arg_0]
lea	ecx, [esp+8+arg_0]
push	ecx
push	edi
mov	ecx, esi
mov	[esi+4], edi
mov	[esi+0Ah], ax
call	sub_714360
mov	dx, word ptr [esp+8+arg_0]
add	edi, eax
lea	eax, [esp+8+arg_0]
push	eax
push	edi
mov	ecx, esi
mov	[esi+4], edi
mov	[esi+0Ch], dx
call	sub_714360
movzx	ecx, word ptr [esp+8+arg_0]
add	eax, edi
pop	edi
mov	[esi+4], eax
mov	[esi+0Eh], cx
pop	esi
retn	4
sub_714FD0 endp

align 10h



sub_715050 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [ecx]
mov	[ecx+4], esi
mov	eax, [edi]
lea	edx, [esi+eax]
movsx	eax, byte ptr [edx]
test	al, 1
jnz	short loc_715072
sar	eax, 1
mov	edx, eax
mov	eax, 1
jmp	short loc_715085

loc_715072:
movsx	edx, byte ptr [edx+1]
sar	eax, 1
and	eax, 7Fh
shl	edx, 7
or	edx, eax
mov	eax, 2

loc_715085:
add	esi, eax
mov	[ecx+8], dx
mov	[ecx+4], esi
mov	edx, [edi]
movsx	eax, byte ptr [edx+esi]
add	edx, esi
test	al, 1
jnz	short loc_7150A5
sar	eax, 1
mov	edx, eax
mov	eax, 1
jmp	short loc_7150B8

loc_7150A5:
movsx	edx, byte ptr [edx+1]
sar	eax, 1
and	eax, 7Fh
shl	edx, 7
or	edx, eax
mov	eax, 2

loc_7150B8:
add	esi, eax
mov	[ecx+0Ah], dx
mov	[ecx+4], esi
mov	eax, [edi]
lea	edx, [esi+eax]
movsx	eax, byte ptr [edx]
test	al, 1
jnz	short loc_7150D8
sar	eax, 1
mov	edx, eax
mov	eax, 1
jmp	short loc_7150EB

loc_7150D8:
movsx	edx, byte ptr [edx+1]
sar	eax, 1
and	eax, 7Fh
shl	edx, 7
or	edx, eax
mov	eax, 2

loc_7150EB:
add	esi, eax
mov	[ecx+0Ch], dx
mov	[ecx+4], esi
mov	edx, [edi]
movsx	eax, byte ptr [edx+esi]
add	edx, esi
test	al, 1
jnz	short loc_715117
sar	eax, 1
mov	edx, eax
mov	eax, 1
add	esi, eax
pop	edi
mov	[ecx+4], esi
mov	[ecx+0Eh], dx
pop	esi
retn	4

loc_715117:
movsx	edx, byte ptr [edx+1]
sar	eax, 1
and	eax, 7Fh
shl	edx, 7
or	edx, eax
mov	eax, 2
add	esi, eax
pop	edi
mov	[ecx+4], esi
mov	[ecx+0Eh], dx
pop	esi
retn	4
sub_715050 endp

align 10h



sub_715140 proc	near

var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 148h
push	ebx
mov	ebx, [esp+14Ch+arg_4]
push	edi
mov	edi, [esp+150h+arg_8]
mov	eax, edi
sub	eax, ebx
cmp	eax, 2
jb	loc_7152E2
push	ebp
mov	ebp, [esp+154h+arg_0]
lea	ecx, [esp+154h+var_140]
mov	[esp+154h+var_144], ecx
mov	[esp+154h+var_148], edi
push	esi

loc_715178:
mov	eax, edi
sub	eax, ebx
cmp	eax, 9
jle	loc_715276
mov	ecx, [ebp+0]
cdq
sub	eax, edx
mov	edx, [ecx+ebx*4]
sar	eax, 1
add	eax, ebx
mov	esi, [ecx+eax*4]
lea	eax, [ecx+eax*4]
mov	[ecx+ebx*4], esi
mov	[eax], edx
mov	eax, [ebp+0]
mov	dx, [eax+edi*4-4]
lea	ecx, [edi-1]
cmp	dx, [eax+ebx*4+4]
lea	esi, [ebx+1]
jnb	short loc_7151BE
mov	edi, [eax+esi*4]
mov	edx, [eax+ecx*4]
mov	[eax+ecx*4], edi
mov	[eax+esi*4], edx

loc_7151BE:
mov	eax, [ebp+0]
mov	dx, [eax+ebx*4]
cmp	dx, [eax+esi*4]
jnb	short loc_7151D7
mov	edi, [eax+esi*4]
mov	edx, [eax+ebx*4]
mov	[eax+ebx*4], edi
mov	[eax+esi*4], edx

loc_7151D7:
mov	eax, [ebp+0]
mov	dx, [eax+ecx*4]
cmp	dx, [eax+ebx*4]
jnb	short loc_7151F0
mov	edi, [eax+ebx*4]
mov	edx, [eax+ecx*4]
mov	[eax+ecx*4], edi
mov	[eax+ebx*4], edx

loc_7151F0:
mov	eax, [ebp+0]
movzx	edi, word ptr [eax+ebx*4]
lea	edx, [eax+esi*4]
lea	ebx, [ebx+0]

loc_715200:
add	edx, 4
inc	esi
cmp	[edx], di
jb	short loc_715200
lea	edx, [eax+ecx*4]
lea	esp, [esp+0]

loc_715210:
sub	edx, 4
dec	ecx
cmp	di, [edx]
jb	short loc_715210
cmp	esi, ecx
mov	edi, [eax+ecx*4]
jg	short loc_71522B
mov	edx, [eax+esi*4]
mov	[eax+esi*4], edi
mov	[eax+ecx*4], edx
jmp	short loc_7151F0

loc_71522B:
mov	edx, [eax+ebx*4]
mov	[eax+ebx*4], edi
mov	[eax+ecx*4], edx
mov	eax, [esp+158h+var_148]
mov	edx, eax
mov	edi, ecx
sub	edx, esi
sub	edi, ebx
cmp	edi, edx
jle	short loc_71525D
mov	eax, [esp+158h+var_144]
add	[esp+158h+var_144], 8
mov	edi, [esp+158h+var_148]
mov	[eax], ebx
mov	[eax+4], ecx
mov	ebx, esi
jmp	loc_715178

loc_71525D:
mov	edx, [esp+158h+var_144]
add	[esp+158h+var_144], 8
mov	[edx], esi
mov	[edx+4], eax
mov	[esp+158h+var_148], ecx
mov	edi, ecx
jmp	loc_715178

loc_715276:
lea	esi, [ebx+1]
cmp	esi, edi
mov	ecx, ebx
jge	short loc_7152BC
nop

loc_715280:
mov	eax, [ebp+0]
mov	dx, [eax+ecx*4+4]
cmp	dx, [eax+ecx*4]
lea	eax, [eax+ecx*4]
jnb	short loc_7152B5

loc_715291:
mov	edi, [eax]
mov	edx, [eax+4]
mov	[eax+4], edi
mov	[eax], edx
cmp	ecx, ebx
jz	short loc_7152B1
mov	eax, [ebp+0]
dec	ecx
mov	dx, [eax+ecx*4+4]
cmp	dx, [eax+ecx*4]
lea	eax, [eax+ecx*4]
jb	short loc_715291

loc_7152B1:
mov	edi, [esp+158h+var_148]

loc_7152B5:
mov	ecx, esi
inc	esi
cmp	esi, edi
jl	short loc_715280

loc_7152BC:
mov	eax, [esp+158h+var_144]
lea	ecx, [esp+158h+var_140]
cmp	eax, ecx
jbe	short loc_7152E0
mov	edx, [eax-4]
mov	ebx, [eax-8]
sub	eax, 8
mov	[esp+158h+var_144], eax
mov	[esp+158h+var_148], edx
mov	edi, edx
jmp	loc_715178

loc_7152E0:
pop	esi
pop	ebp

loc_7152E2:
pop	edi
pop	ebx
add	esp, 148h
retn
sub_715140 endp

align 10h



sub_7152F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
movsx	eax, word ptr [ecx+8]
movsx	edx, word ptr [ecx+0Ah]
mov	[esp+14h+var_14], eax
movsx	eax, word ptr [ecx+0Ch]
fild	[esp+14h+var_14]
movsx	ecx, word ptr [ecx+0Eh]
fstp	[esp+14h+var_10]
mov	[esp+14h+var_14], edx
fild	[esp+14h+var_14]
mov	[esp+14h+var_14], eax
mov	eax, [esp+14h+arg_0]
fstp	[esp+14h+var_C]
fild	[esp+14h+var_14]
mov	[esp+14h+var_14], ecx
fstp	[esp+14h+var_8]
fild	[esp+14h+var_14]
fstp	[esp+14h+var_4]
fld	[esp+14h+var_10]
fstp	dword ptr [eax]
fld	[esp+14h+var_C]
fstp	dword ptr [eax+4]
fld	[esp+14h+var_8]
fstp	dword ptr [eax+8]
fld	[esp+14h+var_4]
fstp	dword ptr [eax+0Ch]
add	esp, 14h
retn	4
sub_7152F0 endp




sub_715350 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_715050
mov	ecx, [esi]
mov	eax, [esi+4]
mov	edx, [ecx]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx]
test	al, 1
jnz	short loc_715386
shr	eax, 1
mov	[esi+18h], eax
mov	eax, 1
add	[esi+4], eax
mov	ecx, esi
call	sub_7145F0
pop	esi
retn	4

loc_715386:
movzx	ecx, byte ptr [ecx+1]
shl	ecx, 7
shr	eax, 1
or	ecx, eax
mov	[esi+18h], ecx
mov	eax, 2
add	[esi+4], eax
mov	ecx, esi
call	sub_7145F0
pop	esi
retn	4
sub_715350 endp

align 10h



sub_7153B0 proc	near

var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= byte ptr	-8
var_7= byte ptr	-7
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
mov	edx, [esp+10h+arg_0]
push	esi
mov	esi, [esp+14h+arg_4]
push	edi
lea	eax, [esp+18h+var_10]
push	eax
push	edx
call	sub_714760
movzx	ecx, [esp+18h+var_10]
mov	edx, ecx
and	edx, 0Fh
mov	edi, eax
cmp	edx, 0Fh	; switch 16 cases
ja	loc_715926	; default
push	ebx
jmp	ds:off_71593C[edx*4] ; switch jump

loc_7153F0:		; jumptable 007153E9 case 0
movsx	eax, [esp+1Ch+var_F]
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	dword ptr [esi], 0
mov	[esi+4], eax
jmp	loc_715925

loc_71540B:		; jumptable 007153E9 case 1
movsx	edx, [esp+1Ch+var_E]
movzx	eax, [esp+1Ch+var_F]
shl	edx, 8
or	edx, eax
shl	edx, 4
shr	ecx, 4
or	edx, ecx
mov	dword ptr [esi], 0
mov	[esi+4], edx
jmp	loc_715925

loc_715430:		; jumptable 007153E9 case 2
movsx	edx, [esp+1Ch+var_F]
shl	edx, 4
shr	ecx, 4
or	edx, ecx
mov	dword ptr [esi], 1
mov	[esi+4], edx
jmp	loc_715925

loc_71544B:		; jumptable 007153E9 case 3
movsx	eax, [esp+1Ch+var_E]
movzx	edx, [esp+1Ch+var_F]
shl	eax, 8
or	eax, edx
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	dword ptr [esi], 1
mov	[esi+4], eax
jmp	loc_715925

loc_715470:		; jumptable 007153E9 case 4
mov	dl, [esp+1Ch+var_F]
mov	al, dl
shl	al, 6
movsx	eax, al
shr	ecx, 2
or	eax, ecx
movsx	ecx, dl
sar	eax, 2
sar	ecx, 2
mov	dword ptr [esi], 2
mov	[esi+4], eax
mov	[esi+8], ecx
jmp	loc_715925

loc_71549B:		; jumptable 007153E9 case 5
mov	dl, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
shr	ecx, 4
add	eax, eax
or	eax, ecx
movzx	ecx, dl
movsx	edx, [esp+1Ch+var_E]
add	edx, edx
shr	ecx, 6
add	edx, edx
or	ecx, edx
mov	dword ptr [esi], 2
mov	[esi+4], eax
mov	[esi+8], ecx
jmp	loc_715925

loc_7154D3:		; jumptable 007153E9 case 6
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
shr	ecx, 4
shl	eax, 4
or	eax, ecx
movzx	ecx, dl
movsx	edx, [esp+1Ch+var_D]
shr	ecx, 2
shl	edx, 6
or	ecx, edx
mov	dword ptr [esi], 2
mov	[esi+4], eax
mov	[esi+8], ecx
jmp	loc_715925

loc_715513:		; jumptable 007153E9 case 7
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
movsx	eax, al
shl	eax, 6
shr	ecx, 4
or	eax, ebx
shl	eax, 4
or	eax, ecx
movsx	ecx, [esp+1Ch+var_C]
mov	[esi+4], eax
movzx	eax, [esp+1Ch+var_D]
shl	ecx, 8
or	ecx, eax
movzx	edx, dl
add	ecx, ecx
add	ecx, ecx
shr	edx, 6
or	ecx, edx
mov	dword ptr [esi], 2
mov	[esi+8], ecx
jmp	loc_715925

loc_71555E:		; jumptable 007153E9 case 8
mov	dl, [esp+1Ch+var_F]
mov	al, dl
shl	al, 7
movsx	eax, al
shr	ecx, 1
or	eax, ecx
mov	cl, dl
sar	eax, 3
add	cl, cl
mov	[esi+4], eax
add	cl, cl
movsx	eax, cl
mov	cl, [esp+1Ch+var_E]
sar	eax, 3
mov	[esi+8], eax
mov	al, cl
movzx	edx, dl
shl	al, 5
shr	edx, 3
movsx	eax, al
or	edx, eax
movsx	ecx, cl
sar	edx, 3
sar	ecx, 3
mov	dword ptr [esi], 3
mov	[esi+0Ch], edx
mov	[esi+10h], ecx
jmp	loc_715925

loc_7155B1:		; jumptable 007153E9 case 9
mov	dl, [esp+1Ch+var_F]
mov	al, dl
shl	al, 5
movsx	eax, al
shr	ecx, 3
or	eax, ecx
mov	cl, [esp+1Ch+var_E]
sar	eax, 1
mov	[esi+4], eax
movzx	edx, dl
mov	al, cl
shl	al, 6
shr	edx, 2
movsx	eax, al
or	edx, eax
sar	edx, 1
mov	[esi+8], edx
movzx	edx, cl
mov	cl, [esp+1Ch+var_D]
mov	al, cl
shl	al, 7
shr	edx, 1
movsx	eax, al
or	edx, eax
movsx	ecx, cl
sar	edx, 1
sar	ecx, 1
mov	dword ptr [esi], 3
mov	[esi+0Ch], edx
mov	[esi+10h], ecx
jmp	loc_715925

loc_71560B:		; jumptable 007153E9 case 10
mov	dl, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_E]
mov	[esi+4], eax
mov	al, cl
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
movzx	edx, dl
shr	edx, 5
or	eax, edx
mov	dl, [esp+1Ch+var_D]
mov	[esi+8], eax
mov	al, dl
add	al, al
movsx	eax, al
movzx	ecx, cl
add	eax, eax
shr	ecx, 6
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_C]
movzx	edx, dl
shr	edx, 7
add	eax, eax
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715925

loc_715673:		; jumptable 007153E9 case 11
mov	dl, [esp+1Ch+var_F]
mov	al, dl
add	al, al
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
movzx	ebx, [esp+1Ch+var_E]
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_D]
mov	[esi+4], eax
mov	al, cl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
add	eax, eax
movzx	edx, dl
shr	edx, 7
or	eax, edx
mov	dl, [esp+1Ch+var_C]
mov	[esi+8], eax
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
movzx	ecx, cl
shr	ecx, 2
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_B]
add	eax, eax
movzx	edx, dl
add	eax, eax
shr	edx, 5
add	eax, eax
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715925

loc_7156F1:		; jumptable 007153E9 case 12
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
shl	al, 7
movsx	eax, al
add	eax, eax
or	eax, ebx
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_D]
mov	[esi+4], eax
movzx	ebx, [esp+1Ch+var_C]
mov	al, cl
add	al, al
add	al, al
movsx	eax, al
shl	eax, 5
movzx	edx, dl
shr	edx, 1
or	eax, edx
mov	dl, [esp+1Ch+var_B]
mov	[esi+8], eax
mov	al, dl
shl	al, 5
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
or	eax, ebx
add	eax, eax
movzx	ecx, cl
add	eax, eax
shr	ecx, 6
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_A]
movzx	edx, dl
shr	edx, 3
shl	eax, 5
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715925

loc_715771:		; jumptable 007153E9 case 13
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
shl	al, 5
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
or	eax, ebx
movzx	ebx, [esp+1Ch+var_D]
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_C]
mov	[esi+4], eax
mov	al, cl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
movzx	ebx, [esp+1Ch+var_B]
shl	eax, 5
movzx	edx, dl
shr	edx, 3
or	eax, edx
mov	dl, [esp+1Ch+var_A]
mov	[esi+8], eax
mov	al, dl
shl	al, 7
movsx	eax, al
add	eax, eax
or	eax, ebx
movzx	ecx, cl
shl	eax, 6
shr	ecx, 2
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_9]
movzx	edx, dl
shr	edx, 1
shl	eax, 7
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715925

loc_7157FA:		; jumptable 007153E9 case 14
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
shl	eax, 5
or	eax, ebx
shl	eax, 4
movzx	ebx, [esp+1Ch+var_D]
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_C]
mov	[esi+4], eax
mov	al, cl
add	al, al
add	al, al
movsx	eax, al
shl	eax, 6
or	eax, ebx
movzx	ebx, [esp+1Ch+var_B]
add	eax, eax
add	eax, eax
add	eax, eax
movzx	edx, dl
shr	edx, 5
or	eax, edx
mov	dl, [esp+1Ch+var_A]
mov	[esi+8], eax
mov	al, dl
add	al, al
movsx	eax, al
shl	eax, 7
or	eax, ebx
add	eax, eax
movzx	ecx, cl
add	eax, eax
shr	ecx, 6
or	eax, ecx
movzx	ecx, [esp+1Ch+var_9]
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_8]
shl	eax, 8
movzx	edx, dl
or	eax, ecx
mov	dword ptr [esi], 3
shr	edx, 7
jmp	loc_71591E

loc_71588A:		; jumptable 007153E9 case 15
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
add	al, al
movsx	eax, al
shl	eax, 7
or	eax, ebx
shl	eax, 4
movzx	ebx, [esp+1Ch+var_C]
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_B]
mov	[esi+4], eax
mov	al, cl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
movzx	ebx, [esp+1Ch+var_D]
shl	eax, 8
or	eax, ebx
movzx	ebx, [esp+1Ch+var_A]
add	eax, eax
movzx	edx, dl
shr	edx, 7
or	eax, edx
mov	dl, [esp+1Ch+var_9]
mov	[esi+8], eax
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
shl	eax, 5
or	eax, ebx
shl	eax, 6
movzx	ecx, cl
shr	ecx, 2
or	eax, ecx
movzx	ecx, [esp+1Ch+var_8]
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_7]
shl	eax, 8
or	eax, ecx
add	eax, eax
movzx	edx, dl
add	eax, eax
mov	dword ptr [esi], 3
shr	edx, 5

loc_71591E:
add	eax, eax
or	eax, edx
mov	[esi+10h], eax

loc_715925:
pop	ebx

loc_715926:		; default
mov	ecx, [esp+18h+var_4]
mov	eax, edi
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn	8
sub_7153B0 endp

align 4
off_71593C dd offset loc_7153F0	; jump table for switch	statement
dd offset loc_71540B
dd offset loc_715430
dd offset loc_71544B
dd offset loc_715470
dd offset loc_71549B
dd offset loc_7154D3
dd offset loc_715513
dd offset loc_71555E
dd offset loc_7155B1
dd offset loc_71560B
dd offset loc_715673
dd offset loc_7156F1
dd offset loc_715771
dd offset loc_7157FA
dd offset loc_71588A
align 10h



sub_715980 proc	near

var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= byte ptr	-8
var_7= byte ptr	-7
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
mov	edx, [esp+10h+arg_0]
push	esi
mov	esi, [esp+14h+arg_4]
push	edi
lea	eax, [esp+18h+var_10]
push	eax
push	edx
call	sub_7147E0
movzx	ecx, [esp+18h+var_10]
mov	edx, ecx
and	edx, 0Fh
mov	edi, eax
cmp	edx, 0Fh	; switch 16 cases
ja	loc_715EF6	; default
push	ebx
jmp	ds:off_715F0C[edx*4] ; switch jump

loc_7159C0:		; jumptable 007159B9 case 0
movsx	eax, [esp+1Ch+var_F]
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	dword ptr [esi], 0
mov	[esi+4], eax
jmp	loc_715EF5

loc_7159DB:		; jumptable 007159B9 case 1
movsx	edx, [esp+1Ch+var_E]
movzx	eax, [esp+1Ch+var_F]
shl	edx, 8
or	edx, eax
shl	edx, 4
shr	ecx, 4
or	edx, ecx
mov	dword ptr [esi], 0
mov	[esi+4], edx
jmp	loc_715EF5

loc_715A00:		; jumptable 007159B9 case 2
movsx	edx, [esp+1Ch+var_F]
shl	edx, 4
shr	ecx, 4
or	edx, ecx
mov	dword ptr [esi], 1
mov	[esi+4], edx
jmp	loc_715EF5

loc_715A1B:		; jumptable 007159B9 case 3
movsx	eax, [esp+1Ch+var_E]
movzx	edx, [esp+1Ch+var_F]
shl	eax, 8
or	eax, edx
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	dword ptr [esi], 1
mov	[esi+4], eax
jmp	loc_715EF5

loc_715A40:		; jumptable 007159B9 case 4
mov	dl, [esp+1Ch+var_F]
mov	al, dl
shl	al, 6
movsx	eax, al
shr	ecx, 2
or	eax, ecx
movsx	ecx, dl
sar	eax, 2
sar	ecx, 2
mov	dword ptr [esi], 2
mov	[esi+4], eax
mov	[esi+8], ecx
jmp	loc_715EF5

loc_715A6B:		; jumptable 007159B9 case 5
mov	dl, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
shr	ecx, 4
add	eax, eax
or	eax, ecx
movzx	ecx, dl
movsx	edx, [esp+1Ch+var_E]
add	edx, edx
shr	ecx, 6
add	edx, edx
or	ecx, edx
mov	dword ptr [esi], 2
mov	[esi+4], eax
mov	[esi+8], ecx
jmp	loc_715EF5

loc_715AA3:		; jumptable 007159B9 case 6
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
shr	ecx, 4
shl	eax, 4
or	eax, ecx
movzx	ecx, dl
movsx	edx, [esp+1Ch+var_D]
shr	ecx, 2
shl	edx, 6
or	ecx, edx
mov	dword ptr [esi], 2
mov	[esi+4], eax
mov	[esi+8], ecx
jmp	loc_715EF5

loc_715AE3:		; jumptable 007159B9 case 7
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
movsx	eax, al
shl	eax, 6
shr	ecx, 4
or	eax, ebx
shl	eax, 4
or	eax, ecx
movsx	ecx, [esp+1Ch+var_C]
mov	[esi+4], eax
movzx	eax, [esp+1Ch+var_D]
shl	ecx, 8
or	ecx, eax
movzx	edx, dl
add	ecx, ecx
add	ecx, ecx
shr	edx, 6
or	ecx, edx
mov	dword ptr [esi], 2
mov	[esi+8], ecx
jmp	loc_715EF5

loc_715B2E:		; jumptable 007159B9 case 8
mov	dl, [esp+1Ch+var_F]
mov	al, dl
shl	al, 7
movsx	eax, al
shr	ecx, 1
or	eax, ecx
mov	cl, dl
sar	eax, 3
add	cl, cl
mov	[esi+4], eax
add	cl, cl
movsx	eax, cl
mov	cl, [esp+1Ch+var_E]
sar	eax, 3
mov	[esi+8], eax
mov	al, cl
movzx	edx, dl
shl	al, 5
shr	edx, 3
movsx	eax, al
or	edx, eax
movsx	ecx, cl
sar	edx, 3
sar	ecx, 3
mov	dword ptr [esi], 3
mov	[esi+0Ch], edx
mov	[esi+10h], ecx
jmp	loc_715EF5

loc_715B81:		; jumptable 007159B9 case 9
mov	dl, [esp+1Ch+var_F]
mov	al, dl
shl	al, 5
movsx	eax, al
shr	ecx, 3
or	eax, ecx
mov	cl, [esp+1Ch+var_E]
sar	eax, 1
mov	[esi+4], eax
movzx	edx, dl
mov	al, cl
shl	al, 6
shr	edx, 2
movsx	eax, al
or	edx, eax
sar	edx, 1
mov	[esi+8], edx
movzx	edx, cl
mov	cl, [esp+1Ch+var_D]
mov	al, cl
shl	al, 7
shr	edx, 1
movsx	eax, al
or	edx, eax
movsx	ecx, cl
sar	edx, 1
sar	ecx, 1
mov	dword ptr [esi], 3
mov	[esi+0Ch], edx
mov	[esi+10h], ecx
jmp	loc_715EF5

loc_715BDB:		; jumptable 007159B9 case 10
mov	dl, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_E]
mov	[esi+4], eax
mov	al, cl
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
movzx	edx, dl
shr	edx, 5
or	eax, edx
mov	dl, [esp+1Ch+var_D]
mov	[esi+8], eax
mov	al, dl
add	al, al
movsx	eax, al
movzx	ecx, cl
add	eax, eax
shr	ecx, 6
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_C]
movzx	edx, dl
shr	edx, 7
add	eax, eax
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715EF5

loc_715C43:		; jumptable 007159B9 case 11
mov	dl, [esp+1Ch+var_F]
mov	al, dl
add	al, al
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
movzx	ebx, [esp+1Ch+var_E]
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_D]
mov	[esi+4], eax
mov	al, cl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
add	eax, eax
movzx	edx, dl
shr	edx, 7
or	eax, edx
mov	dl, [esp+1Ch+var_C]
mov	[esi+8], eax
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
movzx	ecx, cl
shr	ecx, 2
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_B]
add	eax, eax
movzx	edx, dl
add	eax, eax
shr	edx, 5
add	eax, eax
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715EF5

loc_715CC1:		; jumptable 007159B9 case 12
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
shl	al, 7
movsx	eax, al
add	eax, eax
or	eax, ebx
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_D]
mov	[esi+4], eax
movzx	ebx, [esp+1Ch+var_C]
mov	al, cl
add	al, al
add	al, al
movsx	eax, al
shl	eax, 5
movzx	edx, dl
shr	edx, 1
or	eax, edx
mov	dl, [esp+1Ch+var_B]
mov	[esi+8], eax
mov	al, dl
shl	al, 5
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
or	eax, ebx
add	eax, eax
movzx	ecx, cl
add	eax, eax
shr	ecx, 6
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_A]
movzx	edx, dl
shr	edx, 3
shl	eax, 5
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715EF5

loc_715D41:		; jumptable 007159B9 case 13
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
shl	al, 5
movsx	eax, al
add	eax, eax
add	eax, eax
add	eax, eax
or	eax, ebx
movzx	ebx, [esp+1Ch+var_D]
shl	eax, 4
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_C]
mov	[esi+4], eax
mov	al, cl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
movzx	ebx, [esp+1Ch+var_B]
shl	eax, 5
movzx	edx, dl
shr	edx, 3
or	eax, edx
mov	dl, [esp+1Ch+var_A]
mov	[esi+8], eax
mov	al, dl
shl	al, 7
movsx	eax, al
add	eax, eax
or	eax, ebx
movzx	ecx, cl
shl	eax, 6
shr	ecx, 2
or	eax, ecx
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_9]
movzx	edx, dl
shr	edx, 1
shl	eax, 7
or	edx, eax
mov	dword ptr [esi], 3
mov	[esi+10h], edx
jmp	loc_715EF5

loc_715DCA:		; jumptable 007159B9 case 14
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
shl	eax, 5
or	eax, ebx
shl	eax, 4
movzx	ebx, [esp+1Ch+var_D]
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_C]
mov	[esi+4], eax
mov	al, cl
add	al, al
add	al, al
movsx	eax, al
shl	eax, 6
or	eax, ebx
movzx	ebx, [esp+1Ch+var_B]
add	eax, eax
add	eax, eax
add	eax, eax
movzx	edx, dl
shr	edx, 5
or	eax, edx
mov	dl, [esp+1Ch+var_A]
mov	[esi+8], eax
mov	al, dl
add	al, al
movsx	eax, al
shl	eax, 7
or	eax, ebx
add	eax, eax
movzx	ecx, cl
add	eax, eax
shr	ecx, 6
or	eax, ecx
movzx	ecx, [esp+1Ch+var_9]
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_8]
shl	eax, 8
movzx	edx, dl
or	eax, ecx
mov	dword ptr [esi], 3
shr	edx, 7
jmp	loc_715EEE

loc_715E5A:		; jumptable 007159B9 case 15
mov	dl, [esp+1Ch+var_E]
movzx	ebx, [esp+1Ch+var_F]
mov	al, dl
add	al, al
movsx	eax, al
shl	eax, 7
or	eax, ebx
shl	eax, 4
movzx	ebx, [esp+1Ch+var_C]
shr	ecx, 4
or	eax, ecx
mov	cl, [esp+1Ch+var_B]
mov	[esi+4], eax
mov	al, cl
shl	al, 6
movsx	eax, al
add	eax, eax
add	eax, eax
or	eax, ebx
movzx	ebx, [esp+1Ch+var_D]
shl	eax, 8
or	eax, ebx
movzx	ebx, [esp+1Ch+var_A]
add	eax, eax
movzx	edx, dl
shr	edx, 7
or	eax, edx
mov	dl, [esp+1Ch+var_9]
mov	[esi+8], eax
mov	al, dl
add	al, al
add	al, al
add	al, al
movsx	eax, al
shl	eax, 5
or	eax, ebx
shl	eax, 6
movzx	ecx, cl
shr	ecx, 2
or	eax, ecx
movzx	ecx, [esp+1Ch+var_8]
mov	[esi+0Ch], eax
movsx	eax, [esp+1Ch+var_7]
shl	eax, 8
or	eax, ecx
add	eax, eax
movzx	edx, dl
add	eax, eax
mov	dword ptr [esi], 3
shr	edx, 5

loc_715EEE:
add	eax, eax
or	eax, edx
mov	[esi+10h], eax

loc_715EF5:
pop	ebx

loc_715EF6:		; default
mov	ecx, [esp+18h+var_4]
mov	eax, edi
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn	8
sub_715980 endp

align 4
off_715F0C dd offset loc_7159C0	; jump table for switch	statement
dd offset loc_7159DB
dd offset loc_715A00
dd offset loc_715A1B
dd offset loc_715A40
dd offset loc_715A6B
dd offset loc_715AA3
dd offset loc_715AE3
dd offset loc_715B2E
dd offset loc_715B81
dd offset loc_715BDB
dd offset loc_715C43
dd offset loc_715CC1
dd offset loc_715D41
dd offset loc_715DCA
dd offset loc_715E5A
align 10h



sub_715F50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
mov	ecx, edx
shl	ecx, 4
cmp	dword ptr [ecx+esi+8], 0FFFFFFFEh
lea	ecx, [ecx+esi+8]
mov	eax, edx
jz	short loc_715FA7
cmp	[ecx+4], edx
jnz	short loc_715FA7
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_715F74:
cmp	[ecx+4], edx
jnz	short loc_715F8C
mov	bx, [ecx+8]
cmp	bx, [edi]
jnz	short loc_715F8C
mov	bx, [ecx+0Ah]
cmp	bx, [edi+2]
jz	short loc_715FA1

loc_715F8C:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_715F9E
mov	ecx, eax
shl	ecx, 4
lea	ecx, [ecx+esi+8]
jmp	short loc_715F74

loc_715F9E:
or	eax, 0FFFFFFFFh

loc_715FA1:
pop	ebx
pop	edi
pop	esi
retn	8

loc_715FA7:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_715F50 endp

align 10h



sub_715FB0 proc	near
or	eax, 0FFFFFFFFh
retn	4
sub_715FB0 endp

align 10h



sub_715FC0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	offset byte_146D660
mov	ecx, esi
call	sub_67AE10
mov	eax, esi
pop	esi
retn	4
sub_715FC0 endp

align 10h



sub_715FE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143FC28
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_716003
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_716003:
mov	eax, esi
pop	esi
retn	4
sub_715FE0 endp

align 10h



sub_716010 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
cmp	dword ptr [edi+8], 0
mov	esi, ecx
jnz	short loc_71602D
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_71602D
call	sub_64A420

loc_71602D:
cmp	dword ptr [esi+8], 0
jnz	short loc_71603F
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_71603F
call	sub_666B00

loc_71603F:
mov	eax, [edi+8]
mov	[esi+8], eax
mov	ecx, [edi+0Ch]
mov	[esi+0Ch], ecx
fld	dword ptr [edi+14h]
fstp	[esp+10h+arg_0]
mov	eax, esi
fld	dword ptr [edi+18h]
fstp	[esp+10h+var_8]
fld	dword ptr [edi+1Ch]
fstp	[esp+10h+var_4]
fld	dword ptr [edi+10h]
fstp	dword ptr [esi+10h]
fld	[esp+10h+arg_0]
fstp	dword ptr [esi+14h]
fld	[esp+10h+var_8]
fstp	dword ptr [esi+18h]
fld	[esp+10h+var_4]
fstp	dword ptr [esi+1Ch]
fld	dword ptr [edi+24h]
fstp	[esp+10h+arg_0]
fld	dword ptr [edi+20h]
pop	edi
fstp	dword ptr [esi+20h]
fld	[esp+0Ch+arg_0]
fstp	dword ptr [esi+24h]
pop	esi
add	esp, 8
retn	4
sub_716010 endp

align 10h



sub_7160A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 18h
push	esi
push	edi
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_7160F4
fldz
mov	edi, [esp+20h+arg_4]
fst	dword ptr [edi+4]
push	0FFFFFFFFh
fstp	dword ptr [edi]
mov	eax, [esi]
mov	edx, [eax+28h]
call	edx
fstp	[esp+20h+arg_4]
fld	dword ptr [edi]
push	0FFFFFFFFh
fadd	[esp+24h+arg_4]
mov	ecx, esi
fstp	dword ptr [edi+8]
mov	eax, [esi]
mov	edx, [eax+2Ch]
call	edx
fstp	[esp+20h+arg_4]
fld	dword ptr [edi+4]
mov	eax, edi
fadd	[esp+20h+arg_4]
fstp	dword ptr [edi+0Ch]
pop	edi
pop	esi
add	esp, 18h
retn	8

loc_7160F4:
cmp	eax, [esi+34h]
jnb	loc_716185
mov	ecx, [esi+30h]
lea	eax, [eax+eax*2]
movzx	edx, word ptr [ecx+eax*4+8]
lea	ecx, [ecx+eax*4]
mov	[esp+20h+arg_0], edx
fild	[esp+20h+arg_0]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+20h+arg_0]
fldz
fcomp	[esp+20h+arg_0]
fnstsw	ax
test	ah, 44h
jp	short loc_716134
fld	dword ptr [ecx]
fstp	[esp+20h+arg_0]

loc_716134:
movzx	eax, word ptr [ecx+0Ah]
mov	[esp+20h+var_18], eax
movsx	edx, word ptr [ecx+4]
fild	[esp+20h+var_18]
mov	[esp+20h+var_18], edx
mov	eax, [esp+20h+arg_4]
fdiv	st, st(1)
pop	edi
pop	esi
fstp	[esp+18h+var_14]
fild	[esp+18h+var_18]
fdiv	st, st(1)
fstp	dword ptr [eax]
movsx	ecx, word ptr [ecx+6]
mov	[esp+18h+arg_4], ecx
fild	[esp+18h+arg_4]
fdivrp	st(1), st
fstp	dword ptr [eax+4]
fld	dword ptr [eax]
fadd	[esp+18h+arg_0]
fstp	dword ptr [eax+8]
fld	dword ptr [eax+4]
fadd	[esp+18h+var_14]
fstp	dword ptr [eax+0Ch]
add	esp, 18h
retn	8

loc_716185:
mov	edi, [esp+20h+arg_4]
fldz
fst	dword ptr [edi+4]
fst	dword ptr [edi]
fldz
fadd	st, st
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fst	dword ptr [edi+8]
fstp	dword ptr [edi+0Ch]
cmp	eax, [esi+24h]
jnb	loc_716230
mov	edx, [esi+20h]
mov	eax, [edx+eax*4]
test	eax, eax
jz	short loc_716230
mov	edx, [eax]
fst	[esp+20h+var_10]
mov	edx, [edx+14h]
fst	[esp+20h+var_C]
lea	ecx, [esp+20h+var_10]
fst	[esp+20h+var_8]
push	ecx
fstp	[esp+24h+var_4]
mov	ecx, eax
call	edx
fld	[esp+20h+var_8]
fld	[esp+20h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_71622E
fld	[esp+20h+var_4]
fld	[esp+20h+var_C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_71622A
fxch	st(2)
mov	eax, edi
fst	dword ptr [edi]
fxch	st(2)
fst	dword ptr [edi+4]
fld	st(2)
fsubp	st(4), st
fxch	st(3)
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [edi+8]
fsub	st, st(1)
fstp	[esp+20h+arg_4]
fadd	[esp+20h+arg_4]
fstp	dword ptr [edi+0Ch]
pop	edi
pop	esi
add	esp, 18h
retn	8

loc_71622A:
fstp	st
fstp	st(1)

loc_71622E:
fstp	st

loc_716230:
mov	eax, edi
fstp	st
pop	edi
pop	esi
add	esp, 18h
retn	8
sub_7160A0 endp

align 10h



sub_716240 proc	near

var_4= dword ptr -4
arg_0= word ptr	 4

; FUNCTION CHUNK AT 00714C70 SIZE 0000007D BYTES

add	ecx, 2Ch
jmp	loc_714C70
sub_716240 endp

align 10h



sub_716250 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, [ecx+38h]
jnb	short loc_716295
mov	edx, [ecx+3Ch]
mov	ecx, [ecx+34h]
mov	ecx, [ecx+0Ch]
lea	edx, [edx+eax*8]
push	esi
lea	eax, [edx+1]
mov	esi, eax
shr	esi, 0Ch
mov	esi, [ecx+esi*4]
and	eax, 0FFFh
movzx	eax, byte ptr [esi+eax]
mov	esi, edx
shr	esi, 0Ch
mov	ecx, [ecx+esi*4]
and	edx, 0FFFh
movzx	edx, byte ptr [ecx+edx]
shl	eax, 8
or	eax, edx
pop	esi
retn	4

loc_716295:
or	eax, 0FFFFFFFFh
retn	4
sub_716250 endp

align 10h



sub_7162A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_7162DE
cmp	eax, [esi+38h]
jnb	short loc_7162DE
push	eax
lea	ecx, [esi+2Ch]
call	sub_714CF0
fmul	ds:dbl_15FD320
mov	eax, [esi+58h]
fild	dword ptr [esi+58h]
test	eax, eax
jge	short loc_7162D0
fadd	ds:flt_15FCC08

loc_7162D0:
fdivp	st(1), st
pop	esi
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4

loc_7162DE:
fld	ds:flt_143FBE4
pop	esi
retn	4
sub_7162A0 endp

align 10h



sub_7162F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
push	eax
push	ecx
lea	ecx, [esi+2Ch]
call	sub_714D50
fmul	ds:dbl_15FD320
mov	edx, [esi+58h]
fild	dword ptr [esi+58h]
test	edx, edx
jge	short loc_71631B
fadd	ds:flt_15FCC08

loc_71631B:
fdivp	st(1), st
pop	esi
fstp	[esp+arg_4]
fld	[esp+arg_4]
retn	8
sub_7162F0 endp

align 10h



sub_716330 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143FC70
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+44h]
mov	eax, [eax+30h]
push	edi
lea	edi, [esi+28h]
push	edx
call	eax
mov	ecx, edi
call	sub_64A3F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+1Ch]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_716372
call	sub_64A400

loc_716372:
pop	edi
mov	dword ptr [esi], offset	off_143FC28
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_716330 endp

align 10h



sub_716390 proc	near

var_4= dword ptr -4
arg_0= word ptr	 4

; FUNCTION CHUNK AT 00714E90 SIZE 0000005D BYTES

add	ecx, 28h
jmp	loc_714E90
sub_716390 endp

align 10h



sub_7163A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, [ecx+34h]
jnb	short loc_7163C6
mov	edx, [ecx+38h]
mov	ecx, [ecx+30h]
lea	eax, [edx+eax*8]
mov	edx, [ecx]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, ecx
retn	4

loc_7163C6:
or	eax, 0FFFFFFFFh
retn	4
sub_7163A0 endp

align 10h



sub_7163D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_7163E2
fld	ds:flt_143FBE4
retn	4

loc_7163E2:
mov	edx, [ecx+38h]
lea	eax, [edx+eax*8+2]
mov	edx, [ecx+30h]
mov	edx, [edx]
add	eax, edx
movzx	dx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	dx, 8
movsx	edx, dx
or	edx, eax
mov	[esp+arg_0], edx
fild	[esp+arg_0]
test	edx, edx
jge	short loc_716413
fadd	ds:flt_15FCC08

loc_716413:
mov	ecx, [ecx+54h]
fmul	ds:dbl_15FD320
mov	[esp+arg_0], ecx
fild	[esp+arg_0]
test	ecx, ecx
jge	short loc_71642E
fadd	ds:flt_15FCC08

loc_71642E:
fdivp	st(1), st
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4
sub_7163D0 endp

align 10h



sub_716440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
push	eax
push	ecx
lea	ecx, [esi+28h]
call	sub_714EF0
fmul	ds:dbl_15FD320
mov	edx, [esi+54h]
fild	dword ptr [esi+54h]
test	edx, edx
jge	short loc_71646B
fadd	ds:flt_15FCC08

loc_71646B:
fdivp	st(1), st
pop	esi
fstp	[esp+arg_4]
fld	[esp+arg_4]
retn	8
sub_716440 endp

align 10h



sub_716480 proc	near
mov	eax, [ecx+44h]
retn
sub_716480 endp

align 10h



sub_716490 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1436C18
xor	ebx, ebx
mov	dword ptr [esi+4], 1
mov	[esi+8], ebx
mov	dword ptr [esi], offset	off_143FBF8
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
push	edi
lea	ecx, [esi+18h]
mov	[esi+14h], eax
call	??0DNameNode@@IAE@XZ_2 ; DNameNode::DNameNode(void)
mov	edi, [esp+0Ch+arg_0]
cmp	edi, ebx
jz	short loc_7164D1
mov	ecx, edi
call	sub_64A420

loc_7164D1:
mov	ecx, [esi+0Ch]
cmp	ecx, ebx
jz	short loc_7164DD
call	sub_64A430

loc_7164DD:
mov	[esi+0Ch], edi
cmp	edi, ebx
jz	short loc_7164F1
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax
mov	edi, eax
jmp	short loc_7164F3

loc_7164F1:
xor	edi, edi

loc_7164F3:
cmp	edi, ebx
jz	short loc_7164FA
inc	dword ptr [edi+4]

loc_7164FA:
mov	ecx, [esi+10h]
cmp	ecx, ebx
jz	short loc_716506
call	sub_64A400

loc_716506:
mov	[esi+10h], edi
xor	ecx, ecx
xor	edx, edx
pop	edi
mov	[esi+20h], bl
mov	[esi+24h], ebx
mov	[esi+28h], cx
mov	[esi+2Ah], dx
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_716490 endp

align 10h



sub_716530 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_714950
test	[esp+4+arg_0], 1
jz	short loc_71654D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_71654D:
mov	eax, esi
pop	esi
retn	4
sub_716530 endp

align 10h



sub_716560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1436C18
xor	ebx, ebx
mov	dword ptr [esi+4], 1
mov	[esi+8], ebx
mov	dword ptr [esi], offset	off_143FBF8
mov	[esi+0Ch], ebx
lea	ebp, [esi+18h]
mov	[esi+10h], ebx
push	edi
mov	ecx, ebp
mov	[esi+14h], ebx
call	??0DNameNode@@IAE@XZ_2 ; DNameNode::DNameNode(void)
mov	edi, [esp+10h+arg_0]
cmp	edi, ebx
jz	short loc_7165A0
mov	ecx, edi
call	sub_64A420

loc_7165A0:
mov	ecx, [esi+0Ch]
cmp	ecx, ebx
jz	short loc_7165AC
call	sub_64A430

loc_7165AC:
mov	[esi+0Ch], edi
cmp	edi, ebx
jz	short loc_7165C0
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx
mov	edi, eax
jmp	short loc_7165C2

loc_7165C0:
xor	edi, edi

loc_7165C2:
cmp	edi, ebx
jz	short loc_7165C9
inc	dword ptr [edi+4]

loc_7165C9:
mov	ecx, [esi+10h]
cmp	ecx, ebx
jz	short loc_7165D5
call	sub_64A400

loc_7165D5:
mov	eax, [esp+10h+arg_4]
mov	[esi+10h], edi
push	eax
mov	ecx, ebp
mov	[esi+20h], bl
mov	[esi+24h], ebx
call	sub_666080
pop	edi
xor	ecx, ecx
xor	edx, edx
mov	[esi+28h], cx
mov	[esi+2Ah], dx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_716560 endp

align 10h



sub_716600 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
fldz
mov	edx, [esp+14h+arg_0]
fst	[esp+14h+var_10]
push	esi
fst	[esp+18h+var_C]
mov	esi, ecx
mov	ecx, [esi+0Ch]
fst	[esp+18h+var_8]
fstp	[esp+18h+var_4]
push	edx
mov	eax, [ecx]
mov	eax, [eax+0Ch]
call	eax
cmp	eax, 0FFFFFFFFh
jz	short loc_716668
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
lea	esi, [esp+18h+var_10]
push	esi
push	eax
mov	eax, [edx+30h]
call	eax
fld	[esp+18h+var_C]
fnstcw	word ptr [esp+18h+arg_0]
pop	esi
movzx	eax, word ptr [esp+14h+arg_0]
fchs
or	eax, 0C00h
mov	[esp+14h+var_14], eax
fldcw	word ptr [esp+14h+var_14]
fistp	[esp+14h+var_14]
mov	ax, word ptr [esp+14h+var_14]
fldcw	word ptr [esp+14h+arg_0]
add	esp, 14h
retn	4

loc_716668:
xor	eax, eax
pop	esi
add	esp, 14h
retn	4
sub_716600 endp

align 10h



sub_716680 proc	near

var_18=	dword ptr -18h
var_14=	word ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0Ch], 0
push	edi
jz	short loc_71670F
cmp	word ptr [esi+28h], 0
jnz	short loc_71670F
cmp	word ptr [esi+2Ah], 0
jnz	short loc_71670F
mov	eax, ds:dword_143FD38
mov	ecx, ds:dword_143FD3C
mov	dx, ds:word_143FD40
mov	[esp+28h+var_10], eax
mov	eax, ds:dword_143FD30
mov	[esp+28h+var_18], eax
mov	al, byte ptr [esp+28h+var_10]
mov	[esp+28h+var_C], ecx
mov	cx, ds:word_143FD34
mov	[esp+28h+var_8], dx
mov	[esp+28h+var_14], cx
lea	edi, [esp+28h+var_10]
test	al, al
jz	short loc_71670F
lea	esp, [esp+0]

loc_7166F0:
movzx	dx, al
movzx	eax, dx
push	eax
mov	ecx, esi
call	sub_716600
movzx	ebx, ax
test	bx, bx
jnz	short loc_716776
mov	al, [edi+1]
inc	edi
test	al, al
jnz	short loc_7166F0

loc_71670F:
test	ebp, ebp
jz	short loc_716754
mov	ecx, [esi+0Ch]
test	byte ptr [ecx+14h], 1
mov	edx, offset aItalic ; "	Italic"
jnz	short loc_716726
mov	edx, offset byte_146D660

loc_716726:
mov	eax, [ecx+14h]
shr	eax, 1
test	al, 1
mov	eax, offset aBold ; " Bold"
jnz	short loc_716739
mov	eax, offset byte_146D660

loc_716739:
push	edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+3Ch]
call	eax
push	eax
push	offset aWarningFontSSS ; "Warning: Font	'%s%s%s': No hinting char"...
add	ebp, 0Ch
push	ebp
call	sub_6AAFC0
add	esp, 14h

loc_716754:
or	ecx, 0FFFFFFFFh
pop	edi
or	edx, ecx
mov	[esi+28h], cx
mov	[esi+2Ah], dx
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+18h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn	4

loc_716776:
mov	al, byte ptr [esp+28h+var_18]
lea	edi, [esp+28h+var_18]
test	al, al
jz	short loc_71670F

loc_716782:
movzx	cx, al
movzx	edx, cx
push	edx
mov	ecx, esi
call	sub_716600
movzx	eax, ax
test	ax, ax
jnz	short loc_7167A6
mov	al, [edi+1]
inc	edi
test	al, al
jnz	short loc_716782
jmp	loc_71670F

loc_7167A6:
mov	ecx, [esp+28h+var_4]
pop	edi
mov	[esi+2Ah], bx
mov	[esi+28h], ax
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn	4
sub_716680 endp

align 10h



sub_7167D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_7167F8
push	edi
mov	edi, eax

loc_7167E4:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7167EF
call	sub_70E500

loc_7167EF:
sub	esi, 4
sub	edi, 1
jnz	short loc_7167E4
pop	edi

loc_7167F8:
pop	esi
retn
sub_7167D0 endp

align 10h



sub_716800 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_71683E
mov	edx, [ecx+4]
xor	eax, eax
mov	edi, edi

loc_716810:
mov	ecx, [esi]
cmp	dword ptr [ecx+eax*8+8], 0FFFFFFFEh
lea	ecx, [ecx+eax*8+8]
jz	short loc_716823
mov	dword ptr [ecx], 0FFFFFFFEh

loc_716823:
inc	eax
cmp	eax, edx
jbe	short loc_716810
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_71683E:
pop	esi
retn
sub_716800 endp




sub_716840 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	edi
mov	edi, ecx
mov	eax, [edi+8]
lea	ebx, [edi+8]
lea	ecx, [ebp+0Fh]
cmp	[eax], ecx
jnb	short loc_716860
pop	edi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	4

loc_716860:
mov	eax, [eax+0Ch]
mov	edx, ebp
shr	edx, 0Ch
mov	edx, [eax+edx*4]
mov	ecx, ebp
and	ecx, 0FFFh
cmp	byte ptr [ecx+edx], 0
push	esi
mov	[esp+14h+var_4], 0
jz	short loc_7168AB
mov	eax, [ebx]
mov	ecx, [eax+0Ch]
mov	eax, ebp
lea	esp, [esp+0]

loc_716890:
inc	[esp+14h+var_4]
inc	eax
mov	edx, eax
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
mov	esi, eax
and	esi, 0FFFh
cmp	byte ptr [esi+edx], 0
jnz	short loc_716890

loc_7168AB:
mov	esi, [esp+14h+var_4]
push	0
inc	esi
lea	ecx, [edi+1Ch]
push	esi
call	sub_714B70
xor	ecx, ecx
mov	[edi+20h], esi
cmp	esi, ecx
jbe	short loc_7168E8

loc_7168C4:
mov	esi, [ebx]
mov	esi, [esi+0Ch]
lea	eax, [ecx+ebp]
mov	edx, eax
shr	edx, 0Ch
mov	edx, [esi+edx*4]
mov	esi, [edi+1Ch]
and	eax, 0FFFh
mov	al, [eax+edx]
mov	[ecx+esi], al
inc	ecx
cmp	ecx, [edi+20h]
jb	short loc_7168C4

loc_7168E8:
mov	esi, [edi+20h]
mov	ecx, [ebx]
mov	ecx, [ecx+0Ch]
add	esi, ebp
lea	eax, [esi+1]
mov	edx, eax
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
and	eax, 0FFFh
movzx	eax, byte ptr [edx+eax]
shl	eax, 8
mov	edx, esi
shr	edx, 0Ch
mov	ecx, [ecx+edx*4]
mov	ebp, esi
and	ebp, 0FFFh
movzx	edx, byte ptr [ecx+ebp]
or	eax, edx
mov	[edi+28h], eax
mov	ecx, [ebx]
mov	ecx, [ecx+0Ch]
add	esi, 2
lea	eax, [esi+1]
mov	edx, eax
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
and	eax, 0FFFh
movzx	eax, byte ptr [edx+eax]
shl	eax, 8
mov	edx, esi
shr	edx, 0Ch
mov	ecx, [ecx+edx*4]
mov	ebp, esi
and	ebp, 0FFFh
movzx	edx, byte ptr [ecx+ebp]
or	eax, edx
mov	[edi+2Ch], eax
mov	ecx, [ebx]
mov	ecx, [ecx+0Ch]
add	esi, 2
lea	eax, [esi+1]
mov	edx, eax
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
and	eax, 0FFFh
movzx	eax, byte ptr [edx+eax]
mov	edx, esi
shr	edx, 0Ch
mov	ecx, [ecx+edx*4]
shl	ax, 8
mov	ebp, esi
and	ebp, 0FFFh
movzx	edx, byte ptr [ecx+ebp]
or	ax, dx
cwde
mov	[esp+14h+var_4], eax
add	esi, 2
lea	eax, [esi+1]
fild	[esp+14h+var_4]
mov	edx, eax
shr	edx, 0Ch
and	eax, 0FFFh
fstp	dword ptr [edi+30h]
mov	ecx, [ebx]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx+edx*4]
movzx	eax, byte ptr [edx+eax]
mov	edx, esi
shr	edx, 0Ch
mov	ecx, [ecx+edx*4]
mov	ebp, esi
and	ebp, 0FFFh
movzx	edx, byte ptr [ecx+ebp]
shl	ax, 8
or	ax, dx
cwde
mov	[esp+14h+var_4], eax
add	esi, 2
lea	eax, [esi+1]
fild	[esp+14h+var_4]
fstp	dword ptr [edi+34h]
mov	ecx, [ebx]
mov	ecx, [ecx+0Ch]
mov	edx, eax
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
and	eax, 0FFFh
movzx	eax, byte ptr [edx+eax]
mov	edx, esi
shr	edx, 0Ch
mov	ecx, [ecx+edx*4]
mov	ebp, esi
and	ebp, 0FFFh
movzx	edx, byte ptr [ecx+ebp]
shl	ax, 8
or	ax, dx
cwde
mov	[esp+14h+var_4], eax
add	esi, 2
push	esi
fild	[esp+18h+var_4]
mov	ecx, ebx
fstp	dword ptr [edi+38h]
call	sub_7142E0
mov	ebp, eax
add	esi, 4
push	esi
mov	ecx, ebx
mov	[edi+0Ch], ebp
call	sub_7142E0
lea	esi, [esi+eax+4]
mov	[edi+10h], esi
lea	esi, [esi+ebp*8]
lea	ebp, [edi+14h]
push	ebp
push	esi
mov	ecx, ebx
call	sub_7143C0
mov	ebp, [ebp+0]
add	esi, eax
lea	eax, [ebp+ebp*2+0]
add	eax, eax
sub	eax, [esp+14h+arg_0]
mov	[edi+18h], esi
add	eax, esi
pop	esi
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_716840 endp




sub_716A70 proc	near

var_28=	dword ptr -28h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
arg_0= dword ptr  4

sub	esp, 28h
mov	edx, [esp+28h+arg_0]
mov	eax, [ecx+8]
push	ebx
push	esi
lea	esi, [ecx+8]
mov	ecx, [ecx+10h]
push	edi
lea	edi, [ecx+edx*8]
mov	[esp+34h+var_28], eax
lea	eax, [edi+4]
push	eax
mov	ecx, esi
call	sub_7142E0
push	eax
lea	ecx, [esp+38h+var_28]
call	sub_714FD0
mov	bx, [esp+34h+var_20]
mov	cx, [esp+34h+var_1C]
cmp	bx, cx
jge	short loc_716ABA
mov	dx, [esp+34h+var_1E]
cmp	dx, [esp+34h+var_1A]
jl	short loc_716AF3

loc_716ABA:
mov	edx, [esi]
mov	edx, [edx+0Ch]
lea	eax, [edi+2]
lea	ecx, [eax+1]
mov	esi, ecx
shr	esi, 0Ch
mov	esi, [edx+esi*4]
and	ecx, 0FFFh
movzx	cx, byte ptr [esi+ecx]
mov	esi, eax
shr	esi, 0Ch
mov	edx, [edx+esi*4]
and	eax, 0FFFh
movzx	ax, byte ptr [edx+eax]
shl	cx, 8
xor	ebx, ebx
or	cx, ax

loc_716AF3:
movsx	edx, bx
movsx	eax, cx
pop	edi
sub	eax, edx
mov	[esp+30h+arg_0], eax
pop	esi
pop	ebx
fild	[esp+28h+arg_0]
add	esp, 28h
retn	4
sub_716A70 endp

align 10h



sub_716B10 proc	near

var_28=	dword ptr -28h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
arg_0= dword ptr  4

sub	esp, 28h
mov	eax, ecx
mov	edx, [eax+8]
lea	ecx, [eax+8]
mov	eax, [eax+10h]
mov	[esp+28h+var_28], edx
mov	edx, [esp+28h+arg_0]
lea	eax, [eax+edx*8+4]
push	eax
call	sub_7142E0
push	eax
lea	ecx, [esp+2Ch+var_28]
call	sub_714FD0
mov	cx, [esp+28h+var_20]
cmp	cx, [esp+28h+var_1C]
jge	short loc_716B54
mov	cx, [esp+28h+var_1E]
mov	ax, [esp+28h+var_1A]
cmp	cx, ax
jl	short loc_716B58

loc_716B54:
xor	eax, eax
xor	ecx, ecx

loc_716B58:
movsx	edx, ax
movsx	eax, cx
sub	edx, eax
mov	[esp+28h+arg_0], edx
fild	[esp+28h+arg_0]
add	esp, 28h
retn	4
sub_716B10 endp

align 10h



sub_716B70 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
lea	edi, [esi+8]
lea	ecx, [ebp+0Fh]
cmp	[eax+4], ecx
jnb	short loc_716B8F
pop	edi
pop	esi
xor	eax, eax
pop	ebp
retn	4

loc_716B8F:
mov	edx, [eax]
xor	ecx, ecx
cmp	[edx+ebp], cl
jz	short loc_716BA7
mov	eax, [eax]
add	eax, ebp
lea	esp, [esp+0]

loc_716BA0:
inc	eax
inc	ecx
cmp	byte ptr [eax],	0
jnz	short loc_716BA0

loc_716BA7:
push	ebx
lea	eax, [ecx+1]
push	0
lea	ebx, [esi+1Ch]
push	eax
mov	ecx, ebx
mov	[esp+18h+arg_0], eax
call	sub_714B70
mov	ecx, [esp+10h+arg_0]
xor	eax, eax
mov	[ebx+4], ecx
cmp	[esi+20h], eax
jbe	short loc_716BE4
lea	ebx, [ebx+0]

loc_716BD0:
mov	edx, [edi]
mov	ecx, [edx]
mov	edx, [ebx]
add	ecx, eax
mov	cl, [ecx+ebp]
mov	[eax+edx], cl
inc	eax
cmp	eax, [esi+20h]
jb	short loc_716BD0

loc_716BE4:
mov	edx, [edi]
mov	ecx, [edx]
mov	eax, [esi+20h]
add	eax, ebp
movzx	edx, byte ptr [ecx+eax+1]
shl	edx, 8
add	ecx, eax
movzx	ecx, byte ptr [ecx]
or	edx, ecx
mov	[esi+28h], edx
mov	edx, [edi]
mov	ecx, [edx]
add	eax, 2
movzx	edx, byte ptr [ecx+eax+1]
shl	edx, 8
add	ecx, eax
movzx	ecx, byte ptr [ecx]
or	edx, ecx
mov	[esi+2Ch], edx
mov	edx, [edi]
mov	ecx, [edx]
add	eax, 2
movzx	edx, byte ptr [ecx+eax+1]
shl	dx, 8
add	ecx, eax
movzx	ecx, byte ptr [ecx]
or	dx, cx
movsx	edx, dx
mov	[esp+10h+arg_0], edx
add	eax, 2
fild	[esp+10h+arg_0]
fstp	dword ptr [esi+30h]
mov	ecx, [edi]
mov	edx, [ecx]
lea	ecx, [edx+eax]
movzx	edx, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movsx	edx, dx
mov	[esp+10h+arg_0], edx
add	eax, 2
fild	[esp+10h+arg_0]
fstp	dword ptr [esi+34h]
mov	ecx, [edi]
mov	edx, [ecx]
lea	ecx, [edx+eax]
movzx	edx, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movsx	edx, dx
mov	[esp+10h+arg_0], edx
add	eax, 2
fild	[esp+10h+arg_0]
fstp	dword ptr [esi+38h]
mov	ecx, [edi]
mov	edx, [ecx]
movzx	ebx, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	edx, byte ptr [ecx+3]
shl	edx, 8
or	edx, ebx
movzx	ebx, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	edx, 8
or	edx, ebx
shl	edx, 8
or	edx, ecx
mov	[esi+0Ch], edx
mov	edx, [edi]
mov	ecx, [edx]
add	eax, 4
movzx	edx, byte ptr [ecx+eax+3]
movzx	ebx, byte ptr [ecx+eax+2]
add	ecx, eax
shl	edx, 8
or	edx, ebx
movzx	ebx, byte ptr [ecx+1]
shl	edx, 8
or	edx, ebx
movzx	ecx, byte ptr [ecx]
shl	edx, 8
or	edx, ecx
lea	eax, [eax+edx+4]
mov	edx, [esi+0Ch]
lea	ebx, [eax+edx*8]
mov	[esi+10h], eax
lea	eax, [esi+14h]
push	eax
push	ebx
mov	ecx, edi
mov	[esp+18h+arg_0], eax
call	sub_714550
add	ebx, eax
mov	eax, [esp+10h+arg_0]
mov	eax, [eax]
lea	eax, [eax+eax*2]
add	eax, eax
sub	eax, ebp
mov	[esi+18h], ebx
add	eax, ebx
pop	ebx
pop	edi
pop	esi
pop	ebp
retn	4
sub_716B70 endp

align 10h



sub_716D20 proc	near

var_28=	dword ptr -28h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
arg_0= dword ptr  4

sub	esp, 28h
mov	edx, [esp+28h+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	ecx, [esi+10h]
push	edi
lea	edi, [ecx+edx*8]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+edi+7]
mov	[esp+30h+var_28], eax
lea	eax, [ecx+edi+4]
movzx	ecx, byte ptr [eax+2]
shl	edx, 8
or	edx, ecx
movzx	ecx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, ecx
shl	edx, 8
or	edx, eax
push	edx
lea	ecx, [esp+34h+var_28]
call	sub_715050
mov	dx, [esp+30h+var_20]
mov	ax, [esp+30h+var_1C]
cmp	dx, ax
jge	short loc_716D82
mov	cx, [esp+30h+var_1E]
cmp	cx, [esp+30h+var_1A]
jl	short loc_716D9E

loc_716D82:
mov	eax, [esi+8]
mov	ecx, [eax]
movzx	ax, byte ptr [ecx+edi+3]
lea	ecx, [ecx+edi+2]
movzx	cx, byte ptr [ecx]
shl	ax, 8
xor	edx, edx
or	ax, cx

loc_716D9E:
movsx	edx, dx
cwde
sub	eax, edx
mov	[esp+30h+arg_0], eax
pop	edi
pop	esi
fild	[esp+28h+arg_0]
add	esp, 28h
retn	4
sub_716D20 endp

align 10h



sub_716DC0 proc	near

var_28=	dword ptr -28h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
arg_0= dword ptr  4

sub	esp, 28h
mov	eax, [ecx+8]
mov	edx, [ecx+10h]
mov	ecx, [ecx+8]
mov	[esp+28h+var_28], eax
mov	eax, [esp+28h+arg_0]
lea	eax, [edx+eax*8+4]
mov	edx, [ecx]
movzx	ecx, byte ptr [eax+edx+3]
add	eax, edx
movzx	edx, byte ptr [eax+2]
shl	ecx, 8
or	ecx, edx
movzx	edx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	ecx, 8
or	ecx, edx
shl	ecx, 8
or	ecx, eax
push	ecx
lea	ecx, [esp+2Ch+var_28]
call	sub_715050
mov	cx, [esp+28h+var_20]
cmp	cx, [esp+28h+var_1C]
jge	short loc_716E1F
mov	cx, [esp+28h+var_1E]
mov	ax, [esp+28h+var_1A]
cmp	cx, ax
jl	short loc_716E23

loc_716E1F:
xor	eax, eax
xor	ecx, ecx

loc_716E23:
movsx	edx, ax
movsx	eax, cx
sub	edx, eax
mov	[esp+28h+arg_0], edx
fild	[esp+28h+arg_0]
add	esp, 28h
retn	4
sub_716DC0 endp

align 10h



sub_716E40 proc	near

var_28=	dword ptr -28h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
mov	edx, [esp+28h+arg_0]
mov	eax, [ecx+8]
push	esi
lea	esi, [ecx+8]
mov	ecx, [ecx+10h]
push	edi
lea	edi, [ecx+edx*8]
mov	[esp+30h+var_28], eax
lea	eax, [edi+4]
push	eax
mov	ecx, esi
call	sub_7142E0
push	eax
lea	ecx, [esp+34h+var_28]
call	sub_714FD0
mov	cx, [esp+30h+var_20]
cmp	cx, [esp+30h+var_1C]
jge	short loc_716E86
mov	dx, [esp+30h+var_1E]
cmp	dx, [esp+30h+var_1A]
jl	short loc_716ED3

loc_716E86:
xor	edx, edx
lea	eax, [edi+2]
lea	ecx, [eax+1]
mov	[esp+30h+var_1A], dx
mov	[esp+30h+var_1E], dx
mov	[esp+30h+var_20], dx
mov	edx, [esi]
mov	edx, [edx+0Ch]
mov	esi, ecx
shr	esi, 0Ch
mov	esi, [edx+esi*4]
and	ecx, 0FFFh
movzx	cx, byte ptr [esi+ecx]
mov	esi, eax
shr	esi, 0Ch
mov	edx, [edx+esi*4]
and	eax, 0FFFh
movzx	ax, byte ptr [edx+eax]
shl	cx, 8
or	cx, ax
mov	[esp+30h+var_1C], cx

loc_716ED3:
mov	ecx, [esp+30h+arg_4]
push	ecx
lea	ecx, [esp+34h+var_28]
call	sub_7152F0
pop	edi
pop	esi
add	esp, 28h
retn	8
sub_716E40 endp

align 10h



sub_716EF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi+20h]
push	edi
push	eax
call	sub_7153B0
add	[esi+20h], eax
mov	eax, [edi]
cmp	eax, 3		; switch 4 cases
ja	short loc_716F7F ; default
jmp	ds:off_716FA4[eax*4] ; switch jump

loc_716F13:		; jumptable 00716F0C case 0
mov	ecx, [edi+4]
add	[esi+10h], ecx

loc_716F19:
mov	dword ptr [edi], 2
mov	edx, [esi+10h]
mov	[edi+4], edx
mov	eax, [esi+14h]
mov	[edi+8], eax
jmp	short loc_716F7F ; default

loc_716F2D:		; jumptable 00716F0C case 1
mov	ecx, [edi+4]
add	[esi+14h], ecx
jmp	short loc_716F19

loc_716F35:		; jumptable 00716F0C case 2
mov	ecx, [edi+4]
add	[esi+10h], ecx
mov	edx, [edi+8]
add	[esi+14h], edx
mov	eax, [esi+10h]
mov	[edi+4], eax
mov	ecx, [esi+14h]
mov	[edi+8], ecx
jmp	short loc_716F7F ; default

loc_716F4F:		; jumptable 00716F0C case 3
mov	edx, [edi+4]
add	[esi+10h], edx
mov	eax, [edi+8]
add	[esi+14h], eax
mov	ecx, [esi+10h]
mov	eax, [edi+0Ch]
mov	[edi+4], ecx
mov	edx, [esi+14h]
mov	[edi+8], edx
add	[esi+10h], eax
mov	ecx, [edi+10h]
add	[esi+14h], ecx
mov	edx, [esi+10h]
mov	[edi+0Ch], edx
mov	eax, [esi+14h]
mov	[edi+10h], eax

loc_716F7F:		; default
mov	eax, [esi+1Ch]
test	eax, eax
jz	short loc_716F8A
dec	eax
mov	[esi+1Ch], eax

loc_716F8A:
cmp	dword ptr [esi+1Ch], 0
jnz	short loc_716F9C
cmp	byte ptr [esi+24h], 0
jz	short loc_716F9C
mov	ecx, [esi+20h]
mov	[esi+4], ecx

loc_716F9C:
pop	edi
pop	esi
retn	4
sub_716EF0 endp

align 4
off_716FA4 dd offset loc_716F13	; jump table for switch	statement
dd offset loc_716F2D
dd offset loc_716F35
dd offset loc_716F4F
align 10h



sub_716FC0 proc	near

var_28=	dword ptr -28h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	word ptr -1Ch
var_1A=	word ptr -1Ah
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
mov	edx, [esp+28h+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	ecx, [esi+10h]
push	edi
lea	edi, [ecx+edx*8]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+edi+7]
mov	[esp+30h+var_28], eax
lea	eax, [ecx+edi+4]
movzx	ecx, byte ptr [eax+2]
shl	edx, 8
or	edx, ecx
movzx	ecx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edx, 8
or	edx, ecx
shl	edx, 8
or	edx, eax
push	edx
lea	ecx, [esp+34h+var_28]
call	sub_715050
mov	cx, [esp+30h+var_20]
cmp	cx, [esp+30h+var_1C]
jge	short loc_71701F
mov	dx, [esp+30h+var_1E]
cmp	dx, [esp+30h+var_1A]
jl	short loc_717052

loc_71701F:
xor	eax, eax
mov	[esp+30h+var_1A], ax
mov	eax, [esi+8]
xor	ecx, ecx
xor	edx, edx
mov	[esp+30h+var_1E], cx
mov	ecx, [eax]
lea	eax, [ecx+edi+2]
mov	[esp+30h+var_20], dx
movzx	dx, byte ptr [eax+1]
movzx	ax, byte ptr [eax]
shl	dx, 8
or	dx, ax
mov	[esp+30h+var_1C], dx

loc_717052:
mov	ecx, [esp+30h+arg_4]
push	ecx
lea	ecx, [esp+34h+var_28]
call	sub_7152F0
pop	edi
pop	esi
add	esp, 28h
retn	8
sub_716FC0 endp

align 10h



sub_717070 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	eax, [esi+20h]
push	edi
push	eax
call	sub_715980
add	[esi+20h], eax
mov	eax, [edi]
cmp	eax, 3		; switch 4 cases
ja	short loc_7170FF ; default
jmp	ds:off_717124[eax*4] ; switch jump

loc_717093:		; jumptable 0071708C case 0
mov	ecx, [edi+4]
add	[esi+10h], ecx

loc_717099:
mov	dword ptr [edi], 2
mov	edx, [esi+10h]
mov	[edi+4], edx
mov	eax, [esi+14h]
mov	[edi+8], eax
jmp	short loc_7170FF ; default

loc_7170AD:		; jumptable 0071708C case 1
mov	ecx, [edi+4]
add	[esi+14h], ecx
jmp	short loc_717099

loc_7170B5:		; jumptable 0071708C case 2
mov	ecx, [edi+4]
add	[esi+10h], ecx
mov	edx, [edi+8]
add	[esi+14h], edx
mov	eax, [esi+10h]
mov	[edi+4], eax
mov	ecx, [esi+14h]
mov	[edi+8], ecx
jmp	short loc_7170FF ; default

loc_7170CF:		; jumptable 0071708C case 3
mov	edx, [edi+4]
add	[esi+10h], edx
mov	eax, [edi+8]
add	[esi+14h], eax
mov	ecx, [esi+10h]
mov	eax, [edi+0Ch]
mov	[edi+4], ecx
mov	edx, [esi+14h]
mov	[edi+8], edx
add	[esi+10h], eax
mov	ecx, [edi+10h]
add	[esi+14h], ecx
mov	edx, [esi+10h]
mov	[edi+0Ch], edx
mov	eax, [esi+14h]
mov	[edi+10h], eax

loc_7170FF:		; default
mov	eax, [esi+1Ch]
test	eax, eax
jz	short loc_71710A
dec	eax
mov	[esi+1Ch], eax

loc_71710A:
cmp	dword ptr [esi+1Ch], 0
jnz	short loc_71711C
cmp	byte ptr [esi+24h], 0
jz	short loc_71711C
mov	ecx, [esi+20h]
mov	[esi+4], ecx

loc_71711C:
pop	edi
pop	esi
retn	4
sub_717070 endp

align 4
off_717124 dd offset loc_717093	; jump table for switch	statement
dd offset loc_7170AD
dd offset loc_7170B5
dd offset loc_7170CF
align 10h



sub_717140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*4]
cmp	dword ptr [esi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*4+8]
mov	eax, edx
jz	short loc_71718B
cmp	[ecx+4], edx
jnz	short loc_71718B
push	edi
mov	edi, [esp+8+arg_0]
push	ebx
push	ebp

loc_717163:
cmp	[ecx+4], edx
jnz	short loc_717171
mov	ebx, [edi]
mov	ebp, [ecx+8]
cmp	ebp, [ebx]
jz	short loc_717184

loc_717171:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_717181
lea	ecx, [eax+eax*4]
lea	ecx, [esi+ecx*4+8]
jmp	short loc_717163

loc_717181:
or	eax, 0FFFFFFFFh

loc_717184:
pop	ebp
pop	ebx
pop	edi
pop	esi
retn	8

loc_71718B:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_717140 endp

align 10h



sub_7171A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	[esi+4], edx
mov	ecx, [eax+8]
mov	[esi+8], ecx
mov	edx, [eax+0Ch]
mov	[esi+0Ch], edx
mov	eax, [eax+10h]
mov	[esi+10h], eax
test	edx, edx
jnz	short loc_7171D2
test	eax, eax
jz	short loc_7171D2
mov	ecx, eax
call	sub_64A420

loc_7171D2:
mov	eax, esi
pop	esi
retn	4
sub_7171A0 endp

align 10h



sub_7171E0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_7171FE
call	sub_716800
pop	edi
add	esp, 0Ch
retn	8

loc_7171FE:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_71720C
mov	esi, 8
jmp	short loc_717271

loc_71720C:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_71721F
fadd	ds:flt_15FCC08

loc_71721F:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_717271:
mov	ecx, dword_1855FC0
mov	ebp, [esp+18h+arg_0]
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, ds:8[esi*8]
mov	[esp+1Ch+arg_4], 0
mov	dword ptr [esp+1Ch+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+18h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
xor	eax, eax
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_7172D1
lea	ebx, [ebx+0]

loc_7172C0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [ecx+eax*8+8], 0FFFFFFFEh
inc	eax
cmp	eax, esi
jb	short loc_7172C0

loc_7172D1:
mov	eax, [edi]
test	eax, eax
jz	short loc_717328
push	ebx
mov	ebx, [eax+4]
xor	edi, edi
lea	ecx, [ecx+0]

loc_7172E0:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [eax+edi*8+8], 0FFFFFFFEh
lea	esi, [eax+edi*8+8]
jz	short loc_71730A
movzx	ecx, word ptr [esi+4]
lea	eax, [esi+4]
push	ecx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_717D60
mov	dword ptr [esi], 0FFFFFFFEh

loc_71730A:
inc	edi
cmp	edi, ebx
jbe	short loc_7172E0
mov	ecx, dword_1855FC0
mov	eax, [esp+1Ch+var_C]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_717328:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	ebp
mov	[edi], eax
pop	edi
add	esp, 0Ch
retn	8
sub_7171E0 endp

align 10h



sub_717340 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
cmp	dword ptr [ecx+8], 0
jnz	short loc_71734E
mov	ecx, [ecx+0Ch]
jmp	short loc_717383

loc_71734E:
mov	eax, [ecx+0Ch]
push	esi
push	eax
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, [esp+14h+arg_0]
mov	[esp+14h+var_8], 0
mov	[esp+14h+var_4], 0
call	sub_6ABEE0
mov	ecx, [esp+0Ch+var_8]
mov	esi, ecx
test	ecx, ecx
jz	short loc_717380
call	sub_666B00

loc_717380:
mov	ecx, esi
pop	esi

loc_717383:
test	ecx, ecx
jz	short loc_717390
mov	eax, [ecx+0Ch]
add	esp, 8
retn	4

loc_717390:
xor	eax, eax
add	esp, 8
retn	4
sub_717340 endp

align 10h



sub_7173A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, [ecx+24h]
jb	short loc_717410
mov	eax, 1
test	byte ptr dword_185654C,	al
jnz	short loc_717408
fldz
or	dword_185654C, eax
mov	dword_1856524, offset off_155F500
fst	flt_1856534
fst	flt_1856538
mov	dword_1856528, eax
xor	eax, eax
fst	flt_185653C
push	offset sub_1419590 ; void (__cdecl *)()
fstp	flt_1856540
mov	dword_1856524, offset off_143DF54
mov	dword_185652C, eax
mov	dword_1856530, eax
call	_atexit
add	esp, 4

loc_717408:
mov	eax, offset dword_1856524
retn	4

loc_717410:
mov	ecx, [ecx+20h]
lea	eax, [eax+eax*4]
lea	eax, [ecx+eax*8]
retn	4
sub_7173A0 endp

align 10h



sub_717420 proc	near
mov	eax, [ecx+18h]
retn
sub_717420 endp

align 10h



sub_717430 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jz	short loc_717471
cmp	eax, [ecx+38h]
jnb	short loc_717471
push	esi
mov	esi, [ecx+58h]
push	eax
add	ecx, 2Ch
call	sub_716A70
fmul	ds:dbl_15FD320
mov	[esp+4+arg_0], esi
fild	[esp+4+arg_0]
test	esi, esi
jge	short loc_717463
fadd	ds:flt_15FCC08

loc_717463:
fdivp	st(1), st
pop	esi
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4

loc_717471:
fld	ds:flt_143FBE4
retn	4
sub_717430 endp

align 10h



sub_717480 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jz	short loc_7174C1
cmp	eax, [ecx+38h]
jnb	short loc_7174C1
push	esi
mov	esi, [ecx+58h]
push	eax
add	ecx, 2Ch
call	sub_716B10
fmul	ds:dbl_15FD320
mov	[esp+4+arg_0], esi
fild	[esp+4+arg_0]
test	esi, esi
jge	short loc_7174B3
fadd	ds:flt_15FCC08

loc_7174B3:
fdivp	st(1), st
pop	esi
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4

loc_7174C1:
fld	ds:flt_15FD8F8
retn	4
sub_717480 endp

align 10h



sub_7174D0 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+8]
mov	dword ptr [eax], offset	off_155F500
fst	dword ptr [eax+0Ch]
mov	dword ptr [eax+4], 1
fstp	dword ptr [eax+10h]
mov	dword ptr [eax], offset	off_143FC70
xor	edx, edx
mov	[eax+14h], edx
mov	[eax+18h], edx
mov	[eax+1Ch], edx
mov	[eax+20h], edx
mov	[eax+24h], edx
lea	ecx, [eax+1Ch]
mov	dword ptr [eax+28h], offset off_155F500
mov	dword ptr [eax+2Ch], 1
mov	dword ptr [eax+28h], offset off_143FD44
mov	[eax+30h], ecx
mov	[eax+44h], edx
mov	[eax+48h], edx
mov	[eax+4Ch], edx
retn
sub_7174D0 endp

align 10h



sub_717530 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_716330
test	[esp+4+arg_0], 1
jz	short loc_71754D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_71754D:
mov	eax, esi
pop	esi
retn	4
sub_717530 endp

align 10h



sub_717560 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+20h+arg_0]
mov	eax, [ecx+324h]
xor	ebx, ebx
push	edi
mov	[esp+24h+var_10], esi
cmp	eax, ebx
jnz	short loc_717585
add	ecx, 28h
mov	[esp+24h+arg_0], ecx
jmp	short loc_717589

loc_717585:
mov	[esp+24h+arg_0], eax

loc_717589:
mov	eax, [esp+24h+arg_0]
push	ebp
push	offset aReadingDefinec ; "reading DefineCompactedFont:\n"
push	eax
call	nullsub_2
mov	ecx, [esp+30h+arg_4]
mov	ebp, [ecx+8]
add	esp, 8
push	ebx
sub	ebp, 2
push	1000h
lea	ecx, [esp+30h+var_C]
mov	[esp+30h+var_14], ebp
mov	[esp+30h+var_C], ebx
mov	[esp+30h+var_8], ebx
mov	[esp+30h+var_4], ebx
call	sub_714B70
push	ebx
lea	edi, [esi+1Ch]
push	ebp
mov	ecx, edi
call	sub_714B00
mov	[esp+28h+arg_4], ebx
mov	ebx, [esp+28h+var_C]
lea	esp, [esp+0]

loc_7175E0:
mov	eax, ebp
sub	eax, [esp+28h+arg_4]
mov	[esp+28h+var_18], 1000h
cmp	eax, 1000h
jg	short loc_7175F9
mov	[esp+28h+var_18], eax

loc_7175F9:
mov	edx, [esp+28h+var_18]
mov	ecx, [esp+28h+arg_0]
push	edx
push	ebx
call	sub_6A9CB0
mov	ebp, eax
add	[esp+28h+arg_4], ebp
test	ebp, ebp
jle	short loc_717631
xor	edx, edx
test	ebp, ebp
jle	short loc_717631

loc_717618:
mov	esi, [edi+4]
mov	ecx, [edi]
add	ecx, esi
inc	esi
mov	[edi+4], esi
mov	al, [ebx+edx]
inc	edx
cmp	edx, ebp
mov	[ecx], al
jl	short loc_717618
mov	esi, [esp+28h+var_10]

loc_717631:
cmp	ebp, [esp+28h+var_18]
jnz	short loc_717647
mov	ecx, [esp+28h+arg_4]
cmp	ecx, [esp+28h+var_14]
jge	short loc_71765B
mov	ebp, [esp+28h+var_14]
jmp	short loc_7175E0

loc_717647:
mov	edi, [esp+28h+arg_0]
push	offset aCouldNotReadTa ; "Could	not read tag DefineCompactedFont."...
push	edi
call	sub_680970
add	esp, 8
jmp	short loc_71765F

loc_71765B:
mov	edi, [esp+28h+arg_0]

loc_71765F:
push	0
lea	ecx, [esi+28h]
call	sub_716B70
mov	eax, [esi+54h]
pop	ebp
test	eax, eax
ja	short loc_71769F
mov	edx, [esi]
mov	eax, [edx+3Ch]
mov	ecx, esi
call	eax
push	eax
push	offset aInvalidNominal ; "Invalid nominal size for DefineCompacte"...
push	edi
call	sub_680970
fldz
fstp	dword ptr [esi+10h]
fld	ds:flt_143FDA0
fstp	dword ptr [esi+8]
fld	ds:flt_15FDC78
fstp	dword ptr [esi+0Ch]
jmp	short loc_7176F4

loc_71769F:
mov	[esp+24h+arg_0], eax
fild	[esp+24h+arg_0]
test	eax, eax
jge	short loc_7176B1
fadd	ds:flt_15FCC08

loc_7176B1:
fdivr	ds:dbl_15FD320
mov	edx, [esi]
mov	eax, [edx+3Ch]
mov	ecx, esi
fstp	[esp+24h+arg_0]
fld	dword ptr [esi+60h]
fld	[esp+24h+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+10h]
fld	dword ptr [esi+58h]
fmul	st, st(1)
fstp	dword ptr [esi+8]
fmul	dword ptr [esi+5Ch]
fstp	dword ptr [esi+0Ch]
call	eax
push	eax
push	offset aReadFontS ; "read font \"%s\"\n"
push	edi
call	nullsub_2
mov	ecx, [esi+50h]
mov	[esi+14h], ecx

loc_7176F4:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
add	esp, 0Ch
push	ebx
call	eax
pop	edi
pop	esi
pop	ebx
add	esp, 18h
retn	8
sub_717560 endp

align 10h



sub_717710 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_717722
fld	ds:flt_143FBE4
retn	4

loc_717722:
push	esi
mov	esi, [ecx+54h]
push	eax
add	ecx, 28h
call	sub_716D20
fmul	ds:dbl_15FD320
mov	[esp+4+arg_0], esi
fild	[esp+4+arg_0]
test	esi, esi
jge	short loc_717747
fadd	ds:flt_15FCC08

loc_717747:
fdivp	st(1), st
pop	esi
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4
sub_717710 endp

align 10h



sub_717760 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_717772
fld	ds:flt_15FD8F8
retn	4

loc_717772:
push	esi
mov	esi, [ecx+54h]
push	eax
add	ecx, 28h
call	sub_716DC0
fmul	ds:dbl_15FD320
mov	[esp+4+arg_0], esi
fild	[esp+4+arg_0]
test	esi, esi
jge	short loc_717797
fadd	ds:flt_15FCC08

loc_717797:
fdivp	st(1), st
pop	esi
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	4
sub_717760 endp

align 10h



sub_7177B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_155F500
lea	edi, [esi+0Ch]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143FE50
mov	ecx, edi
mov	dword ptr [esi+8], 0
call	sub_679E30
mov	ecx, [esp+14h+arg_0]
lea	eax, [esp+14h+var_8]
push	eax
push	ecx
lea	ecx, [esp+1Ch+var_4]
call	sub_67AE10
mov	ecx, eax
call	sub_67B250
push	eax
mov	ecx, edi
call	sub_67A3D0
mov	edi, [esp+14h+var_8]
mov	ebx, ds:InterlockedExchangeAdd
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_717826
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_717826:
mov	edi, [esp+14h+var_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_717848
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_717848:
mov	ecx, [esp+14h+arg_4]
mov	edi, [esp+14h+arg_8]
and	ecx, 3
mov	[esi+10h], ecx
test	edi, edi
jz	short loc_717861
mov	ecx, edi
call	sub_64A420

loc_717861:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_71786D
call	sub_64A430

loc_71786D:
mov	[esi+8], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch
sub_7177B0 endp

align 10h



sub_717880 proc	near

arg_0= byte ptr	 4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7178A9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7178A9:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_7178B5
call	sub_64A430

loc_7178B5:
mov	ecx, edi
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_7178D1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_7178D1:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_717880 endp

align 10h



sub_7178E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
xor	ebx, ebx
push	ebx
push	14h
call	edx
mov	edi, [esp+20h+arg_8]
mov	ebp, [esp+20h+arg_4]
cmp	eax, ebx
jz	short loc_717917
mov	ecx, [esp+20h+arg_0]
push	edi
push	ebp
push	ecx
mov	ecx, eax
call	sub_7177B0
mov	esi, eax
jmp	short loc_717919

loc_717917:
xor	esi, esi

loc_717919:
push	esi
push	offset off_167E010
lea	ecx, [esp+28h+var_8]
call	sub_666020
cmp	esi, ebx
jz	short loc_717933
mov	ecx, esi
call	sub_64A430

loc_717933:
mov	ecx, [esp+20h+arg_C]
lea	edx, [esp+20h+var_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
mov	[esp+28h+var_10], ebx
mov	[esp+28h+var_C], ebx
call	sub_667230
cmp	eax, 3
jnz	short loc_7179B9
mov	edx, [edi]
mov	eax, [esp+20h+arg_0]
mov	edx, [edx+4]
push	ebp
push	eax
mov	ecx, edi
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_71799E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	2Ch
call	edx
test	eax, eax
jz	short loc_71799C
lea	ecx, [esp+20h+var_8]
push	ecx
push	esi
mov	ecx, eax
call	sub_716560
mov	ebx, eax
test	ebx, ebx
jz	short loc_71799E
mov	ecx, [esp+20h+var_C]
push	ebx
call	sub_666CB0
jmp	short loc_7179AC

loc_71799C:
xor	ebx, ebx

loc_71799E:
mov	ecx, [esp+20h+var_C]
push	offset byte_146D660
call	sub_666D50

loc_7179AC:
test	esi, esi
jz	short loc_7179C4
mov	ecx, esi
call	sub_64A430
jmp	short loc_7179C4

loc_7179B9:
lea	ecx, [esp+20h+var_10]
call	sub_6666C0
mov	ebx, eax

loc_7179C4:
mov	eax, [esp+20h+var_10]
cmp	eax, 1
jnz	short loc_7179D8
mov	ecx, [esp+20h+var_C]
call	sub_666B00
jmp	short loc_7179E6

loc_7179D8:
cmp	eax, 2
jl	short loc_7179E6
mov	ecx, [esp+20h+var_C]
call	sub_64A430

loc_7179E6:
mov	ecx, [esp+20h+var_8]
test	ecx, ecx
jz	short loc_7179FA
mov	edx, [ecx]
mov	eax, [esp+20h+var_4]
mov	edx, [edx+8]
push	eax
call	edx

loc_7179FA:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 10h
retn
sub_7178E0 endp

align 10h



sub_717A10 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_717A38
push	edi
mov	edi, eax

loc_717A24:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_717A2F
call	sub_70E500

loc_717A2F:
sub	esi, 4
sub	edi, 1
jnz	short loc_717A24
pop	edi

loc_717A38:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
retn
sub_717A10 endp

align 10h



sub_717A50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+1Ch]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_717A80
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_717A80:
mov	eax, esi
pop	esi
retn	4
sub_717A50 endp

align 10h



sub_717A90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_717ACE
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7167D0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_717AE7
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_668FE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_717ACE:
cmp	esi, [edi+8]
jb	short loc_717AE7
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_668FE0

loc_717AE7:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_717A90 endp

align 10h



sub_717AF0 proc	near

var_4= dword ptr -4

push	ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_717B07
cmp	eax, [edi+38h]
jnb	short loc_717B07
push	esi
push	eax
lea	ecx, [edi+2Ch]
call	sub_716E40
jmp	short loc_717B20

loc_717B07:
fldz
fst	dword ptr [esi]
fstp	dword ptr [esi+4]
fld	ds:flt_143FBE4
fstp	dword ptr [esi+8]
fld	ds:flt_15FD8F8
fstp	dword ptr [esi+0Ch]

loc_717B20:
mov	eax, [edi+58h]
fild	dword ptr [edi+58h]
test	eax, eax
jge	short loc_717B30
fadd	ds:flt_15FCC08

loc_717B30:
fstp	[esp+4+var_4]
mov	eax, esi
fld	dword ptr [esi]
fld	ds:dbl_15FD320
fmul	st(1), st
fld	[esp+4+var_4]
fld	st
fdivp	st(3), st
fxch	st(2)
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fmul	st, st(1)
fdiv	st, st(2)
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fmul	st, st(1)
fdiv	st, st(2)
fstp	dword ptr [esi+8]
fmul	dword ptr [esi+0Ch]
fdivrp	st(1), st
fstp	dword ptr [esi+0Ch]
pop	ecx
retn
sub_717AF0 endp

align 10h



sub_717B70 proc	near

var_4= dword ptr -4

push	ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_717B87
cmp	eax, [edi+34h]
jnb	short loc_717B87
push	esi
push	eax
lea	ecx, [edi+28h]
call	sub_716FC0
jmp	short loc_717BA0

loc_717B87:
fldz
fst	dword ptr [esi]
fstp	dword ptr [esi+4]
fld	ds:flt_143FBE4
fstp	dword ptr [esi+8]
fld	ds:flt_15FD8F8
fstp	dword ptr [esi+0Ch]

loc_717BA0:
mov	eax, [edi+54h]
fild	dword ptr [edi+54h]
test	eax, eax
jge	short loc_717BB0
fadd	ds:flt_15FCC08

loc_717BB0:
fstp	[esp+4+var_4]
mov	eax, esi
fld	dword ptr [esi]
fld	ds:dbl_15FD320
fmul	st(1), st
fld	[esp+4+var_4]
fld	st
fdivp	st(3), st
fxch	st(2)
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fmul	st, st(1)
fdiv	st, st(2)
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fmul	st, st(1)
fdiv	st, st(2)
fstp	dword ptr [esi+8]
fmul	dword ptr [esi+0Ch]
fdivrp	st(1), st
fstp	dword ptr [esi+0Ch]
pop	ecx
retn
sub_717B70 endp

align 10h



sub_717BF0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_717C9D
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [edi+0F4h]
lea	esp, [esp+0]

loc_717C10:
cmp	dword ptr [esi+208h], 50h
jb	short loc_717C54
mov	eax, [esi+204h]
lea	edx, [eax+4Fh]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_717C4A
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_717C6D

loc_717C4A:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_717C6D

loc_717C54:
mov	ecx, [esi]
push	0
push	4
push	50h
test	ecx, ecx
jnz	short loc_717C66
mov	ecx, dword_1855FC0

loc_717C66:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_717C6D:
test	eax, eax
jz	short loc_717C80
movzx	ecx, word ptr [ebp+0]
push	ecx
push	edi
mov	ecx, eax
call	sub_6A2B30
jmp	short loc_717C82

loc_717C80:
xor	eax, eax

loc_717C82:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_717C10
pop	esi
pop	ebp

loc_717C9D:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_717BF0 endp

align 10h



sub_717CB0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_717CBE
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_717CBE:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 4
mov	edx, 1505h
mov	edi, edi

loc_717CD0:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_717CD0
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_715F50
pop	esi
pop	ebx
pop	edi
retn	4
sub_717CB0 endp

align 10h



sub_717D00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
cmp	dword ptr [edi+esi*8+8], 0FFFFFFFEh
lea	ecx, [edi+esi*8+8]
mov	eax, esi
jz	short loc_717D52
movzx	edx, word ptr [ecx+4]
mov	ebx, [edi+4]
and	edx, ebx
cmp	edx, esi
jnz	short loc_717D52
push	ebp

loc_717D24:
movzx	edx, word ptr [ecx+4]
movzx	ebp, dx
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_717D3B
mov	ebp, [esp+10h+arg_0]
cmp	dx, [ebp+0]
jz	short loc_717D4B

loc_717D3B:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_717D48
lea	ecx, [edi+eax*8+8]
jmp	short loc_717D24

loc_717D48:
or	eax, 0FFFFFFFFh

loc_717D4B:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_717D52:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_717D00 endp

align 10h



sub_717D60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_717D73
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_717D95

loc_717D73:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_717D9A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_717D95:
call	sub_7171E0

loc_717D9A:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ebp, [eax+ecx*8+8]
mov	esi, 0FFFFFFFEh
cmp	ebp, esi
jnz	short loc_717DD7
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
lea	eax, [eax+ecx*8+0Ch]
mov	ecx, [esp+8+arg_4]
mov	dx, [ecx]
mov	[eax], dx
mov	cx, [ecx+2]
pop	esi
mov	[eax+2], cx
pop	ebp
retn	0Ch

loc_717DD7:
push	ebx
mov	ebx, [eax+4]
mov	edx, ecx
lea	ecx, [ecx+0]

loc_717DE0:
inc	edx
and	edx, ebx
cmp	[eax+edx*8+8], esi
jnz	short loc_717DE0
movzx	esi, word ptr [eax+ecx*8+0Ch]
and	esi, ebx
push	edi
lea	edi, [eax+edx*8+8]
cmp	esi, ecx
jnz	short loc_717E26
test	edi, edi
jz	short loc_717E11
mov	[edi], ebp
movzx	esi, word ptr [eax+ecx*8+0Ch]
mov	[edi+4], si
movzx	esi, word ptr [eax+ecx*8+0Eh]
mov	[edi+6], si

loc_717E11:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	edi
pop	ebx
mov	[eax+ecx*8+0Ch], esi
pop	esi
mov	[eax+ecx*8+8], edx
pop	ebp
retn	0Ch

loc_717E26:
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jz	short loc_717E3C

loc_717E30:
mov	esi, [esi]
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jnz	short loc_717E30

loc_717E3C:
test	edi, edi
jz	short loc_717E54
mov	[edi], ebp
movzx	ebx, word ptr [eax+ecx*8+0Ch]
mov	[edi+4], bx
movzx	ebx, word ptr [eax+ecx*8+0Eh]
mov	[edi+6], bx

loc_717E54:
mov	[esi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	edi
pop	ebx
pop	esi
mov	[eax+ecx*8+0Ch], edx
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_717D60 endp

align 10h



sub_717E70 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+8]
mov	dword ptr [eax], offset	off_155F500
fst	dword ptr [eax+0Ch]
mov	dword ptr [eax+4], 1
fstp	dword ptr [eax+10h]
xor	edx, edx
mov	[eax+14h], edx
mov	dword ptr [eax], offset	off_143FD48
mov	[eax+18h], edx
mov	[eax+1Ch], edx
mov	[eax+20h], edx
mov	[eax+24h], edx
mov	[eax+28h], edx
lea	ecx, [eax+1Ch]
mov	dword ptr [eax+2Ch], offset off_155F500
mov	dword ptr [eax+30h], 1
mov	dword ptr [eax+2Ch], offset off_143FD44
mov	[eax+34h], ecx
mov	[eax+48h], edx
mov	[eax+4Ch], edx
mov	[eax+50h], edx
mov	[eax+68h], edx
retn
sub_717E70 endp

align 10h



sub_717ED0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143FD48
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+48h]
mov	eax, [eax+30h]
push	edi
lea	edi, [esi+2Ch]
push	edx
call	eax
mov	ecx, edi
call	sub_64A3F0
lea	ecx, [esi+1Ch]
call	sub_74CD90
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_717F09
call	sub_64A400

loc_717F09:
mov	ecx, esi
mov	dword ptr [esi], offset	off_143FC28
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_717F2B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_717F2B:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_717ED0 endp

align 10h



sub_717F40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
call	sub_717AF0
pop	edi
pop	esi
retn	8
sub_717F40 endp

align 10h



sub_717F60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
call	sub_717B70
pop	edi
pop	esi
retn	8
sub_717F60 endp

align 10h



; int __cdecl sub_717F80(int, char *, int)
sub_717F80 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	esi
mov	esi, [esp+308h+arg_4]
push	edi
mov	edi, [esp+30Ch+arg_8]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+310h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+310h+var_304]
call	sub_717BF0
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4090
mov	esi, [esp+30Ch+var_2F8]
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+30Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_717F80 endp

align 10h



; int __cdecl sub_718000(int, char *, int, int)
sub_718000 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	ebx
mov	ebx, [esp+308h+arg_C]
push	esi
mov	esi, [esp+30Ch+arg_4]
push	edi
mov	edi, [esp+310h+arg_8]
push	eax
lea	ecx, [esp+314h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+314h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+314h+var_304]
call	sub_717BF0
push	ebx
lea	ecx, [esp+314h+var_304]
call	sub_717BF0
lea	ecx, [esp+310h+var_304]
call	sub_6A4090
mov	esi, [esp+310h+var_2F8]
lea	ecx, [esp+310h+var_304]
call	sub_6A4940
mov	ecx, [esp+310h+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_718000 endp

align 10h



sub_718090 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_7180A3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_7180C5

loc_7180A3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_7180CA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_7180C5:
call	sub_7171E0

loc_7180CA:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ebp, [eax+ecx*8+8]
mov	esi, 0FFFFFFFEh
cmp	ebp, esi
jnz	short loc_71810B
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
lea	eax, [eax+ecx*8+0Ch]
mov	ecx, [esp+8+arg_4]
mov	edx, [ecx]
movzx	edx, word ptr [edx]
mov	[eax], dx
mov	ecx, [ecx+4]
movzx	edx, word ptr [ecx]
pop	esi
mov	[eax+2], dx
pop	ebp
retn	0Ch

loc_71810B:
push	ebx
mov	ebx, [eax+4]
mov	edx, ecx

loc_718111:
inc	edx
and	edx, ebx
cmp	[eax+edx*8+8], esi
jnz	short loc_718111
movzx	esi, word ptr [eax+ecx*8+0Ch]
and	esi, ebx
push	edi
lea	edi, [eax+edx*8+8]
cmp	esi, ecx
jnz	short loc_718166
test	edi, edi
jz	short loc_718142
mov	[edi], ebp
movzx	esi, word ptr [eax+ecx*8+0Ch]
mov	[edi+4], si
movzx	esi, word ptr [eax+ecx*8+0Eh]
mov	[edi+6], si

loc_718142:
mov	esi, [esp+10h+arg_4]
mov	edi, [esi]
mov	di, [edi]
mov	[eax+ecx*8+0Ch], di
mov	esi, [esi+4]
mov	si, [esi]
pop	edi
pop	ebx
mov	[eax+ecx*8+0Eh], si
pop	esi
mov	[eax+ecx*8+8], edx
pop	ebp
retn	0Ch

loc_718166:
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jz	short loc_71817C

loc_718170:
mov	esi, [esi]
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jnz	short loc_718170

loc_71817C:
test	edi, edi
jz	short loc_718194
mov	[edi], ebp
movzx	ebx, word ptr [eax+ecx*8+0Ch]
mov	[edi+4], bx
movzx	ebx, word ptr [eax+ecx*8+0Eh]
mov	[edi+6], bx

loc_718194:
mov	[esi], edx
mov	edx, [esp+10h+arg_4]
mov	esi, [edx]
mov	si, [esi]
mov	[eax+ecx*8+0Ch], si
mov	edx, [edx+4]
mov	dx, [edx]
pop	edi
pop	ebx
pop	esi
mov	[eax+ecx*8+0Eh], dx
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_718090 endp

align 10h



sub_7181C0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_7181E2
call	sub_6F1D90
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_7181E2:
push	esi
cmp	eax, 8
jnb	short loc_7181EF
mov	esi, 8
jmp	short loc_718254

loc_7181EF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_718202
fadd	ds:flt_15FCC08

loc_718202:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_718254:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_7182B4
xor	eax, eax
jmp	short loc_7182A0
align 10h

loc_7182A0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 14h
sub	esi, 1
jnz	short loc_7182A0

loc_7182B4:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_718338
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_7182C2:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_71831E
lea	edx, [esi+8]
mov	eax, 4
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_7182E0:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_7182E0
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_719F10
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_718314
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_718314
call	sub_666B00

loc_718314:
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_71831E:
add	edi, 14h
sub	ebx, 1
jnz	short loc_7182C2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_718338:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[ebp+0], eax
mov	[esp+18h+arg_4], 0
call	sub_6F1D90
pop	esi
pop	edi
pop	ebp
add	esp, 0Ch
retn	8
sub_7181C0 endp

align 10h



sub_718360 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_718382
call	sub_6661A0
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_718382:
push	esi
cmp	eax, 8
jnb	short loc_71838F
mov	esi, 8
jmp	short loc_7183F4

loc_71838F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_7183A2
fadd	ds:flt_15FCC08

loc_7183A2:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_7183F4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
mov	edx, esi
shl	edx, 4
add	edx, 8
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_718454
xor	eax, eax
jmp	short loc_718440
align 10h

loc_718440:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 10h
sub	esi, 1
jnz	short loc_718440

loc_718454:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_7184C6
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_718462:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_7184AC
lea	edx, [esi+8]
mov	eax, 4
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_718480:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_718480
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_71A030
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_7184AC:
add	edi, 10h
sub	ebx, 1
jnz	short loc_718462
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_7184C6:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_718360 endp

align 10h



sub_7184E0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
lea	esi, [ecx+2Ch]
mov	ecx, [esi]
push	edi
test	ecx, ecx
jnz	short loc_7184F0
xor	eax, eax
jmp	short loc_718507

loc_7184F0:
mov	edx, [ecx+4]
xor	eax, eax
add	ecx, 8

loc_7184F8:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_718505
inc	eax
add	ecx, 8
cmp	eax, edx
jbe	short loc_7184F8

loc_718505:
mov	ecx, esi

loc_718507:
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
lea	ecx, [ecx+0]

loc_718510:
test	esi, esi
jz	short loc_71854D
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_71854D
mov	edx, [ecx+4]
cmp	eax, edx
jg	short loc_71854D
movzx	ebx, word ptr [ecx+eax*8+0Eh]
cmp	ebx, edi
jz	short loc_718542
inc	eax
cmp	eax, edx
ja	short loc_718510
lea	ecx, [ecx+eax*8+8]

loc_718533:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_718510
inc	eax
add	ecx, 8
cmp	eax, edx
jbe	short loc_718533
jmp	short loc_718510

loc_718542:
movzx	eax, word ptr [ecx+eax*8+0Ch]
pop	edi
pop	esi
pop	ebx
retn	4

loc_71854D:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	4
sub_7184E0 endp

align 10h



sub_718560 proc	near

var_229= byte ptr -229h
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= byte ptr -204h
var_4= dword ptr -4

sub	esp, 22Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+22Ch+var_4], eax
push	ebx
push	ebp
mov	ebx, ecx
push	edi
mov	[esp+238h+var_220], ebx
call	sub_679E30
mov	eax, [esi+4]
xor	edi, edi
xor	ebp, ebp
mov	[esp+238h+var_224], edi
mov	[esp+238h+var_229], 1
mov	[esp+238h+var_228], ebp
cmp	eax, edi
jbe	loc_7186F0
mov	edi, edi

loc_7185A0:
test	edi, edi
jnz	short loc_7185B7
mov	eax, [esi]
movzx	ebp, word ptr [eax]
mov	[esp+238h+var_228], ebp
mov	[esp+238h+var_229], 0
jmp	loc_718683

loc_7185B7:
mov	ecx, [esi]
lea	eax, [ecx+edi*4]
movzx	edx, word ptr [eax-2]
lea	ecx, [eax-2]
movzx	eax, word ptr [eax]
movzx	ebx, dx
inc	ebx
cmp	eax, ebx
jle	loc_71867F
cmp	bp, dx
jnz	short loc_718608
lea	edx, [esp+238h+var_228]
push	edx		; int
lea	eax, [esp+23Ch+var_210]
lea	ecx, [esp+23Ch+var_204]
push	offset a0x0X	; "0x{0:x}"
push	eax		; int
mov	[esp+244h+var_210], 2
mov	[esp+244h+var_20C], ecx
mov	[esp+244h+var_208], 200h
call	sub_717F80
add	esp, 0Ch
jmp	short loc_718638

loc_718608:		; int
push	ecx
lea	eax, [esp+23Ch+var_228]
push	eax		; int
lea	ecx, [esp+240h+var_21C]
lea	edx, [esp+240h+var_204]
push	offset a0x0X0x1X ; "0x{0:x}-0x{1:x}"
push	ecx		; int
mov	[esp+248h+var_21C], 2
mov	[esp+248h+var_218], edx
mov	[esp+248h+var_214], 200h
call	sub_718000
add	esp, 10h

loc_718638:
mov	ebp, [esp+238h+var_224]
mov	ebx, [esp+238h+var_220]
test	ebp, ebp
jz	short loc_718652
push	0FFFFFFFFh
push	offset asc_1545F0C ; ",	"
mov	ecx, ebx
call	sub_67A0C0

loc_718652:
push	0FFFFFFFFh
lea	edx, [esp+23Ch+var_204]
push	edx
mov	ecx, ebx
call	sub_67A0C0
inc	ebp
cmp	ebp, 4
mov	[esp+238h+var_224], ebp
jg	loc_7186F0
mov	eax, [esi]
movzx	ebp, word ptr [eax+edi*4]
mov	[esp+238h+var_228], ebp
mov	[esp+238h+var_229], 0
jmp	short loc_718683

loc_71867F:
mov	ebx, [esp+238h+var_220]

loc_718683:
inc	edi
cmp	edi, [esi+4]
jb	loc_7185A0
cmp	[esp+238h+var_229], 0
jnz	short loc_7186F0
mov	edx, [esi]
mov	eax, [esi+4]
lea	ecx, [esp+238h+var_204]
lea	eax, [edx+eax*4-2]
push	eax		; int
mov	[esp+23Ch+var_218], ecx
lea	ecx, [esp+23Ch+var_228]
push	ecx		; int
lea	edx, [esp+240h+var_21C]
push	offset a0x0X0x1X ; "0x{0:x}-0x{1:x}"
push	edx		; int
mov	[esp+248h+var_21C], 2
mov	[esp+248h+var_214], 200h
call	sub_718000
add	esp, 10h
cmp	[esp+238h+var_224], 0
jz	short loc_7186E2
push	0FFFFFFFFh
push	offset asc_1545F0C ; ",	"
mov	ecx, ebx
call	sub_67A0C0

loc_7186E2:
push	0FFFFFFFFh
lea	eax, [esp+23Ch+var_204]
push	eax
mov	ecx, ebx
call	sub_67A0C0

loc_7186F0:
cmp	edi, [esi+4]
jnb	short loc_718703
push	0FFFFFFFFh
push	offset aTruncated ; " (truncated)"
mov	ecx, ebx
call	sub_67A0C0

loc_718703:
mov	ecx, [esp+238h+var_4]
pop	edi
pop	ebp
mov	eax, ebx
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 22Ch
retn
sub_718560 endp

align 10h



sub_718720 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
mov	eax, [ecx+2Ch]
push	ebx
push	ebp
xor	ebx, ebx
lea	edx, [ecx+2Ch]
xor	ebp, ebp
push	esi
push	edi
mov	[esp+30h+var_C], ebx
mov	[esp+30h+var_8], ebp
mov	[esp+30h+var_4], ebx
cmp	eax, ebx
jnz	short loc_718747
xor	eax, eax
xor	ecx, ecx
jmp	short loc_71875F

loc_718747:
mov	esi, [eax+4]
xor	ecx, ecx
add	eax, 8
nop

loc_718750:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_71875D
inc	ecx
add	eax, 8
cmp	ecx, esi
jbe	short loc_718750

loc_71875D:
mov	eax, edx

loc_71875F:
mov	[esp+30h+var_14], eax
mov	esi, ecx
mov	[esp+30h+var_20], ebx
mov	[esp+30h+var_18], ebx

loc_71876D:
xor	dl, dl
nop

loc_718770:
mov	eax, [esp+30h+var_14]
test	eax, eax
jz	loc_71884B
mov	ecx, [eax]
test	ecx, ecx
jz	loc_71884B
mov	edi, [ecx+4]
cmp	esi, edi
jg	loc_71884B
movzx	eax, word ptr [ecx+esi*8+0Ch]
test	dl, dl
jnz	short loc_7187A5
movzx	edx, ax
mov	[esp+30h+var_20], edx
mov	dl, 1
jmp	short loc_718821

loc_7187A5:
movzx	ebp, ax
movzx	ebx, bx
dec	ebp
cmp	ebx, ebp
jz	short loc_71881D
mov	ax, word ptr [esp+30h+var_20]
mov	ebx, [esp+30h+var_18]
mov	word ptr [esp+30h+var_1C], ax
mov	eax, [esp+30h+var_8]
lea	edi, [eax+1]
mov	word ptr [esp+30h+var_1C+2], bx
cmp	edi, eax
jnb	short loc_7187E0
mov	ecx, [esp+30h+var_4]
shr	ecx, 1
cmp	edi, ecx
jnb	short loc_7187FC
push	edi
lea	edx, [esp+34h+var_C]
push	edx
jmp	short loc_7187F3

loc_7187E0:
cmp	edi, [esp+30h+var_4]
jb	short loc_7187FC
mov	eax, edi
shr	eax, 2
add	eax, edi
push	eax
lea	ecx, [esp+34h+var_C]
push	ecx

loc_7187F3:
lea	ecx, [esp+38h+var_C]
call	sub_714BE0

loc_7187FC:
mov	edx, [esp+30h+var_C]
lea	eax, [edx+edi*4-4]
mov	ebp, edi
mov	[esp+30h+var_8], ebp
test	eax, eax
jz	loc_71876D
mov	ecx, [esp+30h+var_1C]
mov	[eax], ecx
jmp	loc_71876D

loc_71881D:
mov	ebp, [esp+30h+var_8]

loc_718821:
movzx	ebx, ax
inc	esi
mov	[esp+30h+var_18], ebx
cmp	esi, edi
ja	loc_718770
lea	eax, [ecx+esi*8+8]

loc_718835:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	loc_718770
inc	esi
add	eax, 8
cmp	esi, edi
jbe	short loc_718835
jmp	loc_718770

loc_71884B:
test	dl, dl
jz	short loc_7188AB
mov	dx, word ptr [esp+30h+var_20]
lea	esi, [ebp+1]
mov	word ptr [esp+30h+var_18], dx
mov	word ptr [esp+30h+var_18+2], bx
cmp	esi, ebp
jnb	short loc_718877
mov	eax, [esp+30h+var_4]
shr	eax, 1
cmp	esi, eax
jnb	short loc_718893
push	esi
lea	eax, [esp+34h+var_C]
push	eax
jmp	short loc_71888A

loc_718877:
cmp	esi, [esp+30h+var_4]
jb	short loc_718893
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
lea	edx, [esp+34h+var_C]
push	edx

loc_71888A:
lea	ecx, [esp+38h+var_C]
call	sub_714BE0

loc_718893:
mov	eax, [esp+30h+var_C]
lea	eax, [eax+esi*4-4]
mov	ebp, esi
mov	[esp+30h+var_8], ebp
test	eax, eax
jz	short loc_7188AB
mov	ecx, [esp+30h+var_18]
mov	[eax], ecx

loc_7188AB:
mov	byte ptr [esp+30h+var_18], 0
mov	edx, [esp+30h+var_18]
push	edx
push	ebp
lea	eax, [esp+38h+var_C]
push	0
push	eax
call	sub_715140
mov	edi, [esp+40h+arg_0]
add	esp, 10h
lea	esi, [esp+30h+var_C]
mov	ecx, edi
call	sub_718560
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+30h+var_C]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	4
sub_718720 endp

align 10h


; Attributes: bp-based frame

sub_718900 proc	near

var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_177= byte ptr -177h
var_176= byte ptr -176h
var_175= byte ptr -175h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= byte ptr -128h
var_124= dword ptr -124h
var_FC=	dword ptr -0FCh
var_F8=	byte ptr -0F8h
var_78=	byte ptr -78h
var_58=	byte ptr -58h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 18Ch
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [ebp+arg_0]
mov	esi, [ecx+324h]
mov	[esp+198h+var_174], edi
test	esi, esi
jnz	short loc_718925
lea	esi, [ecx+28h]

loc_718925:
mov	ebx, [ebp+arg_4]
mov	eax, [ebx]
mov	[esp+198h+var_175], 1
cmp	eax, 30h
jz	short loc_71893D
cmp	eax, 4Bh
jnz	loc_7196FC

loc_71893D:
mov	eax, [ecx+10h]
mov	ecx, [eax+8]
mov	eax, [ecx+24h]
mov	edx, [eax+0Ch]
mov	al, [eax+10h]
lea	ecx, [edi+1Ch]
push	ecx
lea	ecx, [esp+19Ch+var_F8]
mov	[esp+19Ch+var_154], edx
mov	byte ptr [esp+19Ch+var_15C], al
call	sub_74EF20
cmp	dword ptr [ebx], 30h
jnz	short loc_718970
push	offset aReadingDefinef ; "reading DefineFont2: "
jmp	short loc_718975

loc_718970:		; "reading DefineFont3:	"
push	offset aReadingDefin_0

loc_718975:
push	esi
call	nullsub_2
add	esp, 8
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
setnz	al
mov	[esp+198h+var_177], al
test	al, al
jz	short loc_71899D
or	dword ptr [edi+14h], 2000h
jmp	short loc_7189A4

loc_71899D:
and	dword ptr [edi+14h], 0FFFFDFFFh

loc_7189A4:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	bl
call	sub_6AA450
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
setnz	al
test	bl, bl
jz	short loc_7189E1
mov	edx, [edi+14h]
and	edx, 0FFFFFEFFh
or	edx, 200h
mov	[edi+14h], edx
jmp	short loc_7189FE

loc_7189E1:
test	al, al
jz	short loc_7189F7
mov	eax, [edi+14h]
and	eax, 0FFFFFDFFh
or	eax, 100h
mov	[edi+14h], eax
jmp	short loc_7189FE

loc_7189F7:
and	dword ptr [edi+14h], 0FFFFFCFFh

loc_7189FE:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	[esp+19Ch+var_176]
call	sub_6AA450
test	eax, eax
jz	short loc_718A24
or	dword ptr [edi+14h], 4000h
jmp	short loc_718A2B

loc_718A24:
and	dword ptr [edi+14h], 0FFFFBFFFh

loc_718A2B:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_718A3E
or	dword ptr [edi+14h], 1
jmp	short loc_718A42

loc_718A3E:
and	dword ptr [edi+14h], 0FFFFFFFEh

loc_718A42:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_718A55
or	dword ptr [edi+14h], 2
jmp	short loc_718A59

loc_718A55:
and	dword ptr [edi+14h], 0FFFFFFFDh

loc_718A59:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 1
jge	short loc_718A6F
mov	ecx, esi
call	sub_6A9C60

loc_718A6F:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	bl, [eax+edx]
inc	eax
lea	ecx, [esp+198h+var_160]
mov	[esi+2Ch], eax
call	sub_679E30
lea	eax, [esp+198h+var_160]
push	eax
mov	ecx, esi
call	sub_6AA580
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_718AA9
push	2
mov	ecx, esi
call	sub_6A9B70

loc_718AA9:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
add	eax, 2
mov	[esi+2Ch], eax
mov	ecx, esi
mov	[edi+68h], edx
call	sub_6A9880
test	al, al
jz	loc_718B6C
mov	eax, [esp+198h+var_160]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
add	ecx, 8
jz	short loc_718AF6
and	eax, 0FFFFFFFCh
add	eax, 8
jmp	short loc_718AFB

loc_718AF6:		; "(none)"
mov	eax, offset aNone

loc_718AFB:
mov	edx, [edi+68h]
push	edx
push	eax
push	offset aNameSDGlyphs ; "  Name = %s, %d	glyphs\n"
push	esi
call	nullsub_2
mov	eax, [edi+14h]
mov	ecx, eax
and	ecx, 300h
add	esp, 10h
mov	edx, offset aUnicode ; "Unicode"
cmp	ecx, 200h
jnz	short loc_718B2D
mov	edx, offset aShiftjis ;	"ShiftJIS"
jmp	short loc_718B3A

loc_718B2D:
cmp	ecx, 100h
jnz	short loc_718B3A
mov	edx, offset aAnsi ; "ANSI"

loc_718B3A:
movzx	ecx, [esp+198h+var_177]
shr	eax, 1
and	eax, 1
push	eax
movzx	eax, byte ptr [edi+14h]
and	eax, 1
push	eax
push	edx
push	ecx
push	offset aHaslayoutDCode ; "  HasLayout =	%d, CodePage = %s, Italic"...
push	esi
call	nullsub_2
movzx	edx, bl
push	edx
push	offset aLangcodeD ; "  LangCode	= %d\n"
push	esi
call	nullsub_2
add	esp, 24h

loc_718B6C:
mov	edx, [esi+2Ch]
mov	eax, [esi+30h]
mov	edi, [edi+68h]
mov	ecx, edx
sub	ecx, eax
add	ecx, [esi+34h]
xor	ebx, ebx
mov	[esp+198h+var_164], ecx
mov	[esp+198h+var_170], ebx
mov	[esp+198h+var_16C], ebx
mov	[esp+198h+var_168], ebx
test	edi, edi
jbe	loc_718C36
sub	eax, edx
mov	[esi+15h], bl
cmp	[esp+198h+var_176], bl
jz	short loc_718BE1
cmp	eax, 4
jge	short loc_718BAF
push	4
mov	ecx, esi
call	sub_6A9B70

loc_718BAF:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	edx, byte ptr [ecx+eax+2]
add	ecx, eax
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edx
movzx	edx, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edx
shl	eax, 8
or	eax, ecx
mov	ecx, [esi+2Ch]
add	ecx, 4
mov	[esi+2Ch], ecx
jmp	short loc_718C14

loc_718BE1:
cmp	eax, 2
jge	short loc_718BEF
push	2
mov	ecx, esi
call	sub_6A9B70

loc_718BEF:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, cx

loc_718C14:
test	eax, eax
jnz	short loc_718C20
mov	[esp+198h+var_175], al
xor	edi, edi
jmp	short loc_718C36

loc_718C20:
lea	edx, [esp+198h+var_17C]
push	edx
lea	ecx, [esp+19Ch+var_170]
mov	[esp+19Ch+var_17C], eax
call	sub_65EDD0
mov	ebx, [esp+198h+var_16C]

loc_718C36:
cmp	[esp+198h+var_176], 0
jz	loc_718D3B
cmp	edi, 1
jle	loc_718CEC
dec	edi
mov	[esp+198h+var_180], edi
nop

loc_718C50:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_718C68
push	4
mov	ecx, esi
call	sub_6A9B70

loc_718C68:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [edx+ecx+3]
lea	eax, [edx+ecx]
movzx	edx, byte ptr [eax+2]
shl	edi, 8
or	edi, edx
movzx	edx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edi, 8
or	edi, edx
shl	edi, 8
or	edi, eax
mov	eax, [esp+198h+var_16C]
add	ecx, 4
lea	ebx, [eax+1]
mov	[esi+2Ch], ecx
cmp	ebx, eax
jnb	short loc_718CB3
mov	ecx, [esp+198h+var_168]
shr	ecx, 1
cmp	ebx, ecx
jnb	short loc_718CCF
push	ebx
lea	edx, [esp+19Ch+var_170]
push	edx
jmp	short loc_718CC6

loc_718CB3:
cmp	ebx, [esp+198h+var_168]
jb	short loc_718CCF
mov	eax, ebx
shr	eax, 2
add	eax, ebx
push	eax
lea	ecx, [esp+19Ch+var_170]
push	ecx

loc_718CC6:
lea	ecx, [esp+1A0h+var_170]
call	sub_714BE0

loc_718CCF:
mov	edx, [esp+198h+var_170]
mov	[esp+198h+var_16C], ebx
lea	ebx, [edx+ebx*4-4]
test	ebx, ebx
jz	short loc_718CE1
mov	[ebx], edi

loc_718CE1:
sub	[esp+198h+var_180], 1
jnz	loc_718C50

loc_718CEC:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_718D04
push	4
mov	ecx, esi
call	sub_6A9B70

loc_718D04:
mov	edx, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	eax, byte ptr [ecx+edx+3]
movzx	edi, byte ptr [ecx+edx+2]
add	ecx, edx
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
add	edx, 4
mov	[esi+2Ch], edx
mov	[esp+198h+var_158], eax
jmp	loc_718E2A

loc_718D3B:
cmp	edi, 1
jle	loc_718DE9
dec	edi
mov	[esp+198h+var_180], edi
lea	esp, [esp+0]

loc_718D50:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_718D68
push	2
mov	ecx, esi
call	sub_6A9B70

loc_718D68:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
add	eax, 2
lea	edi, [ebx+1]
mov	[esi+2Ch], eax
mov	[esp+198h+var_17C], edx
cmp	edi, ebx
jnb	short loc_718DAA
mov	eax, [esp+198h+var_168]
shr	eax, 1
cmp	edi, eax
jnb	short loc_718DC6
push	edi
lea	ecx, [esp+19Ch+var_170]
push	ecx
jmp	short loc_718DBD

loc_718DAA:
cmp	edi, [esp+198h+var_168]
jb	short loc_718DC6
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
lea	eax, [esp+19Ch+var_170]
push	eax

loc_718DBD:
lea	ecx, [esp+1A0h+var_170]
call	sub_714BE0

loc_718DC6:
mov	ecx, [esp+198h+var_170]
mov	ebx, edi
lea	edi, [ecx+edi*4-4]
mov	[esp+198h+var_16C], ebx
test	edi, edi
jz	short loc_718DDE
mov	edx, [esp+198h+var_17C]
mov	[edi], edx

loc_718DDE:
sub	[esp+198h+var_180], 1
jnz	loc_718D50

loc_718DE9:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_718E01
push	2
mov	ecx, esi
call	sub_6A9B70

loc_718E01:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
add	eax, 2
mov	[esi+2Ch], eax
mov	[esp+198h+var_158], edx

loc_718E2A:
mov	eax, [esp+198h+var_154]
mov	edx, [esp+198h+var_160]
mov	ebx, [esp+198h+var_174]
mov	ecx, [ebx+14h]
xor	edi, edi
push	edi
push	edi
push	edi
push	eax
and	edx, 0FFFFFFFCh
push	ecx
add	edx, 8
push	edx
lea	ecx, [esp+1B0h+var_F8]
call	sub_74F970
cmp	[esp+198h+var_175], 0
jz	loc_719135
mov	eax, [ebp+arg_4]
mov	eax, [eax]
mov	[esp+198h+var_17C], 16h
cmp	eax, 30h
jz	short loc_718E74
mov	[esp+198h+var_17C], eax

loc_718E74:
mov	ecx, dword_1855FC0
lea	eax, [esp+198h+var_180]
push	eax
mov	[esp+19Ch+var_180], 102h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	0Ch
push	ebx
call	edx
cmp	eax, edi
jz	short loc_718EA7
push	1FF8h
mov	ecx, eax
call	sub_70A040
mov	[esp+198h+var_184], eax
jmp	short loc_718EAB

loc_718EA7:
mov	[esp+198h+var_184], edi

loc_718EAB:
cmp	[ebx+68h], edi
jbe	loc_718FB3
mov	ebx, [esp+198h+var_174]

loc_718EB8:
mov	eax, [esp+198h+var_170]
mov	ecx, [eax+edi*4]
add	ecx, [esp+198h+var_164]
push	ecx
mov	ecx, esi
call	sub_6A9D50
lea	eax, [edi+1]
mov	[esp+198h+var_188], eax
cmp	eax, [ebx+68h]
jnb	short loc_718EE4
mov	eax, [esp+198h+var_170]
mov	ebx, [eax+edi*4+4]
sub	ebx, [eax+edi*4]
jmp	short loc_718EEF

loc_718EE4:
mov	ebx, [esp+198h+var_158]
mov	edx, [esp+198h+var_170]
sub	ebx, [edx+edi*4]

loc_718EEF:
lea	ecx, [esp+198h+var_F8]
call	sub_74D730
lea	ecx, [esp+198h+var_124]
call	sub_710C60
mov	eax, [esp+198h+var_184]
mov	ecx, [esp+198h+var_17C]
mov	edx, [ebp+arg_0]
push	eax
push	0
push	ebx
push	ecx
push	edx
lea	ecx, [esp+1ACh+var_124]
mov	[esp+1ACh+var_124], offset off_143F8D8
mov	[esp+1ACh+var_FC], 0
call	sub_7136E0
lea	eax, [esp+198h+var_124]
push	eax
lea	ecx, [esp+19Ch+var_78]
call	sub_70CB20
mov	al, [esp+198h+var_58]
cmp	al, 1
jz	short loc_718F7F
mov	edi, [esp+198h+var_154]
jmp	short loc_718F60
align 10h

loc_718F60:
lea	ecx, [esp+198h+var_78]
cmp	al, 2
jnz	loc_719011
call	sub_70C3E0

loc_718F74:
mov	al, [esp+198h+var_58]
cmp	al, 1
jnz	short loc_718F60

loc_718F7F:
mov	eax, [esp+198h+var_15C]
push	eax
lea	ecx, [esp+19Ch+var_F8]
call	sub_74FA60
mov	ecx, [esp+198h+var_184]
call	sub_70A070
lea	ecx, [esp+198h+var_124]
call	sub_70B580
mov	edi, [esp+198h+var_188]
mov	ebx, [esp+198h+var_174]
cmp	edi, [ebx+68h]
jb	loc_718EB8

loc_718FB3:
mov	ecx, [esp+198h+var_184]
test	ecx, ecx
jz	short loc_718FD2
call	sub_70BC00
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+198h+var_184]
mov	edx, [edx+30h]
push	eax
call	edx

loc_718FD2:
mov	eax, [esi+2Ch]
sub	eax, [esi+30h]
mov	ecx, [esp+198h+var_164]
mov	edx, [esp+198h+var_158]
add	eax, [esi+34h]
add	edx, ecx
cmp	edx, eax
jz	loc_71917E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+198h+var_170]
mov	eax, [eax+30h]
push	edx
call	eax
mov	esi, [esp+198h+var_160]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh
lea	ecx, [esi+4]
push	ecx
jmp	loc_7196D7

loc_719011:
push	ecx
lea	ecx, [esp+19Ch+var_150]
call	sub_70C400
lea	edx, [esp+198h+var_13C]
push	edx
lea	eax, [esp+19Ch+var_140]
push	eax
lea	ecx, [esp+1A0h+var_150]
call	sub_70ADE0
mov	ecx, edi
mov	[esp+198h+var_180], ecx
fild	[esp+198h+var_180]
test	ecx, ecx
jge	short loc_719042
fadd	ds:flt_15FCC08

loc_719042:
fstp	[esp+198h+var_180]
fld	[esp+198h+var_180]
fld	st
fmul	[esp+198h+var_13C]
fld	ds:dbl_143B738
fmul	st(1), st
fxch	st(1)
call	__ftol2_sse
fld	[esp+198h+var_140]
fmulp	st(2), st
movzx	edx, ax
push	edx
fmulp	st(1), st
call	__ftol2_sse
movzx	eax, ax
push	eax
lea	ecx, [esp+1A0h+var_F8]
call	sub_74F320

loc_719080:
mov	ecx, [esp+198h+var_150]
mov	al, [ecx+20h]
cmp	al, 1
jz	loc_718F74
test	al, al
jns	loc_718F74
push	0
lea	edx, [esp+19Ch+var_138]
push	edx
lea	ecx, [esp+1A0h+var_150]
call	sub_70AE10
fld	[esp+198h+var_180]
fld	st
fmul	[esp+198h+var_12C]
fld	ds:dbl_143B738
fmul	st(1), st
fxch	st(1)
call	__ftol2_sse
cmp	[esp+198h+var_128], 0
jz	short loc_71910F
fld	st(1)
movzx	eax, ax
fmul	[esp+198h+var_130]
push	eax
fmul	st, st(1)
call	__ftol2_sse
fld	st(1)
fmul	[esp+19Ch+var_134]
movzx	ecx, ax
push	ecx
fmul	st, st(1)
call	__ftol2_sse
fld	[esp+1A0h+var_138]
fmulp	st(2), st
movzx	edx, ax
push	edx
fmulp	st(1), st
call	__ftol2_sse
movzx	eax, ax
push	eax
lea	ecx, [esp+1A8h+var_F8]
call	sub_74F460
jmp	loc_719080

loc_71910F:
fld	[esp+198h+var_130]
movzx	ecx, ax
fmulp	st(2), st
push	ecx
fmulp	st(1), st
call	__ftol2_sse
movzx	edx, ax
push	edx
lea	ecx, [esp+1A0h+var_F8]
call	sub_74F3B0
jmp	loc_719080

loc_719135:
mov	ecx, [esp+198h+var_164]
mov	edx, [esp+198h+var_158]
lea	edi, [edx+ecx]
mov	ecx, esi
call	sub_6A9860
cmp	edi, eax
jl	short loc_71916F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+198h+var_170]
mov	eax, [eax+30h]
push	edx
call	eax
mov	esi, [esp+198h+var_160]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh
lea	ecx, [esi+4]
push	ecx
jmp	loc_7196D7

loc_71916F:
push	edi
mov	ecx, esi
call	sub_6A9D50
or	dword ptr [ebx+14h], 1000h

loc_71917E:
mov	ecx, [esi+2Ch]
sub	ecx, [esi+30h]
add	ecx, [esi+34h]
push	ecx
push	offset aReadingCodeTab ; "reading code table at	offset %d\n"
push	esi
call	nullsub_2
mov	eax, [esp+1A4h+var_174]
mov	edx, [eax+14h]
mov	ebx, [eax+68h]
shr	edx, 0Eh
add	esp, 0Ch
xor	edi, edi
test	dl, 1
jz	short loc_719204
test	ebx, ebx
jbe	loc_719249

loc_7191B2:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_7191CA
push	2
mov	ecx, esi
call	sub_6A9B70

loc_7191CA:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
push	edx
add	eax, 2
push	edi
lea	ecx, [esp+1A0h+var_F8]
mov	[esi+2Ch], eax
call	sub_74F5A0
inc	edi
cmp	edi, ebx
jb	short loc_7191B2
jmp	short loc_719249

loc_719204:
test	ebx, ebx
jbe	short loc_719249
jmp	short loc_719210
align 10h

loc_719210:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_719226
mov	ecx, esi
call	sub_6A9C60

loc_719226:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	edx, cl
push	edx
inc	eax
push	edi
lea	ecx, [esp+1A0h+var_F8]
mov	[esi+2Ch], eax
call	sub_74F5A0
inc	edi
cmp	edi, ebx
jb	short loc_719210

loc_719249:
cmp	[esp+198h+var_177], 0
jz	loc_71969E
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax], 4Bh
jnz	short loc_719264
fld	ds:dword_156F414
jmp	short loc_719266

loc_719264:
fld1

loc_719266:
mov	ecx, [esi+30h]
fstp	[esp+198h+var_184]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_719282
push	2
mov	ecx, esi
call	sub_6A9B70

loc_719282:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
mov	ebx, [esp+198h+var_174]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+198h+var_188], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+198h+var_188]
lea	eax, [ebx+8]
mov	[esp+198h+var_17C], eax
fmul	[esp+198h+var_184]
fstp	dword ptr [eax]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_7192D8
push	2
mov	ecx, esi
call	sub_6A9B70

loc_7192D8:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+198h+var_188], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+198h+var_188]
lea	edi, [ebx+0Ch]
fmul	[esp+198h+var_184]
fstp	dword ptr [edi]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_719326
push	2
mov	ecx, esi
call	sub_6A9B70

loc_719326:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+198h+var_188], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+198h+var_188]
lea	eax, [ebx+10h]
mov	[esp+198h+var_15C], eax
fmul	[esp+198h+var_184]
fstp	[esp+198h+var_188]
fld	[esp+198h+var_188]
fst	dword ptr [eax]
call	__ftol2_sse
mov	ebx, [esp+198h+var_154]
fld	dword ptr [edi]
imul	eax, ebx
cdq
and	edx, 3FFh
add	eax, edx
sar	eax, 0Ah
push	eax
call	__ftol2_sse
imul	eax, ebx
cdq
and	edx, 3FFh
add	eax, edx
sar	eax, 0Ah
push	eax
mov	eax, [esp+1A0h+var_17C]
fld	dword ptr [eax]
call	__ftol2_sse
imul	eax, ebx
cdq
and	edx, 3FFh
add	eax, edx
sar	eax, 0Ah
push	eax
lea	ecx, [esp+1A4h+var_F8]
call	sub_74D820
mov	ecx, esi
call	sub_6A9880
test	al, al
jz	short loc_7193F8
mov	ecx, [esp+198h+var_15C]
fld	dword ptr [ecx]
call	__ftol2_sse
fld	dword ptr [edi]
push	eax
call	__ftol2_sse
mov	edx, [esp+19Ch+var_17C]
fld	dword ptr [edx]
push	eax
call	__ftol2_sse
push	eax
push	offset aAscentDDescent ; "  Ascent = %d, Descent = %d, Leading = "...
push	esi
call	nullsub_2
add	esp, 14h

loc_7193F8:
mov	eax, [esp+198h+var_174]
mov	eax, [eax+68h]
xor	edi, edi
mov	[esp+198h+var_15C], eax
test	eax, eax
jbe	short loc_719482
lea	esp, [esp+0]

loc_719410:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_719428
push	2
mov	ecx, esi
call	sub_6A9B70

loc_719428:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	[esp+198h+var_188], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+198h+var_188]
fmul	[esp+198h+var_184]
call	__ftol2_sse
imul	eax, ebx
cdq
and	edx, 3FFh
add	eax, edx
sar	eax, 0Ah
push	eax
push	edi
lea	ecx, [esp+1A0h+var_F8]
call	sub_74CD60
inc	edi
cmp	edi, [esp+198h+var_15C]
jb	short loc_719410

loc_719482:
fldz
mov	eax, [esp+198h+var_174]
mov	edi, [eax+68h]
fst	[esp+198h+var_150]
fst	[esp+198h+var_14C]
fst	[esp+198h+var_148]
fstp	[esp+198h+var_144]
test	edi, edi
jbe	short loc_7194B1
nop

loc_7194A0:
lea	ecx, [esp+198h+var_150]
push	ecx
mov	ecx, esi
call	sub_6AABD0
sub	edi, 1
jnz	short loc_7194A0

loc_7194B1:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_7194C9
push	2
mov	ecx, esi
call	sub_6A9B70

loc_7194C9:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
movzx	edi, cx
mov	ecx, esi
mov	[esi+2Ch], eax
call	sub_6A9880
test	al, al
jz	short loc_719508
push	edi
push	offset aKerningcountD ;	"  KerningCount	= %d\n"
push	esi
call	nullsub_2
add	esp, 0Ch

loc_719508:
test	edi, edi
jle	loc_71969E
mov	[esp+198h+var_164], edi

loc_719514:
mov	edx, [esp+198h+var_174]
mov	eax, [edx+14h]
shr	eax, 0Eh
mov	byte ptr [esi+15h], 0
test	al, 1
jz	short loc_71959D
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
cmp	ecx, 2
jge	short loc_71953A
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71953A:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
mov	edx, [esi+30h]
add	eax, 2
sub	edx, eax
cmp	edx, 2
mov	[esi+2Ch], eax
movzx	ebx, cx
mov	byte ptr [esi+15h], 0
jge	short loc_719576
push	2
mov	ecx, esi
call	sub_6A9B70

loc_719576:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	edi, cx
jmp	short loc_7195EC

loc_71959D:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
cmp	edx, 1
jge	short loc_7195AF
mov	ecx, esi
call	sub_6A9C60

loc_7195AF:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	dx, cl
mov	ecx, [esi+30h]
inc	eax
sub	ecx, eax
cmp	ecx, 1
mov	[esi+2Ch], eax
movzx	ebx, dx
mov	byte ptr [esi+15h], 0
jge	short loc_7195D8
mov	ecx, esi
call	sub_6A9C60

loc_7195D8:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	[esi+2Ch], eax
movzx	ax, cl
movzx	edi, ax

loc_7195EC:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_719604
push	2
mov	ecx, esi
call	sub_6A9B70

loc_719604:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+198h+var_188], edx
add	eax, 2
mov	ecx, esi
fild	[esp+198h+var_188]
mov	[esi+2Ch], eax
fmul	[esp+198h+var_184]
fstp	[esp+198h+var_17C]
call	sub_6A9880
test	al, al
jz	short loc_719664
fld	[esp+198h+var_17C]
call	__ftol2_sse
push	eax
movzx	eax, di
push	eax
movzx	ecx, bx
push	ecx
push	offset aPairDDAdjD ; "	   Pair: %d - %d,\tadj = %d\n"
push	esi
call	nullsub_2
add	esp, 14h

loc_719664:
fld	[esp+198h+var_17C]
call	__ftol2_sse
imul	eax, [esp+198h+var_154]
cdq
and	edx, 3FFh
add	eax, edx
sar	eax, 0Ah
push	eax
movzx	edx, di
movzx	eax, bx
push	edx
push	eax
lea	ecx, [esp+1A4h+var_F8]
call	sub_74F600
sub	[esp+198h+var_164], 1
jnz	loc_719514

loc_71969E:
lea	ecx, [esp+198h+var_F8]
call	sub_74F6B0
mov	ecx, [esp+198h+var_174]
push	0
add	ecx, 2Ch
call	sub_716840
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+198h+var_170]
mov	edx, [edx+30h]
push	eax
call	edx
mov	esi, [esp+198h+var_160]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend

loc_7196D7:
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7196F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7196F0:
lea	ecx, [esp+198h+var_F8]
call	sub_74EF90

loc_7196FC:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_718900 endp

align 10h



sub_719710 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_71977B
cmp	byte ptr [esi+20h], 0
jnz	short loc_719769
mov	ecx, dword_1855FC0
mov	[esp+8+var_4], eax
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0Ch
call	edx
test	eax, eax
jz	short loc_719750
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 0
jmp	short loc_719752

loc_719750:
xor	eax, eax

loc_719752:
mov	[esi+24h], eax
test	eax, eax
jz	short loc_719782
lea	ecx, [esp+8+var_4]
push	ecx
mov	ecx, eax
call	sub_65EDD0
mov	byte ptr [esi+20h], 1

loc_719769:
mov	ecx, [esi+24h]
lea	edx, [esp+8+arg_0]
push	edx
call	sub_65EDD0
pop	esi
pop	ecx
retn	4

loc_71977B:
mov	eax, [esp+8+arg_0]
mov	[esi+24h], eax

loc_719782:
pop	esi
pop	ecx
retn	4
sub_719710 endp

align 10h



sub_719790 proc	near

var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch

sub	esp, 78h
push	esi
mov	esi, ecx
cmp	eax, [esi+38h]
jb	short loc_7197A2
xor	eax, eax
pop	esi
add	esp, 78h
retn

loc_7197A2:
mov	edx, [esi+3Ch]
push	ebx
lea	ecx, [esi+1Ch]
push	edi
lea	eax, [edx+eax*8+4]
mov	[esp+84h+var_60], ecx
push	eax
lea	ecx, [esi+34h]
call	sub_7142E0
push	eax
lea	ecx, [esp+88h+var_60]
call	sub_714FD0
mov	edx, [esp+84h+var_5C]
lea	ecx, [esp+84h+var_48]
push	ecx
push	edx
lea	ecx, [esp+8Ch+var_60]
call	sub_714700
add	[esp+84h+var_5C], eax
lea	ecx, [esp+84h+var_60]
call	sub_7144E0
mov	ecx, dword_1855FC0
mov	edi, [esi+58h]
lea	edx, [esp+84h+var_78]
push	edx
mov	[esp+88h+var_78], 102h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	44h
push	esi
call	eax
test	eax, eax
jz	short loc_719819
push	0F2h
mov	ecx, eax
call	sub_7111E0
mov	esi, eax
jmp	short loc_71981B

loc_719819:
xor	esi, esi

loc_71981B:
lea	ecx, [esp+80h+var_34]
call	sub_70F3B0
xor	bl, bl
cmp	[esp+80h+var_44], 0
jz	loc_719926

loc_719831:
lea	ecx, [esp+80h+var_34]
call	sub_70A190
mov	eax, [esp+80h+var_48]
shl	eax, 0Ah
cdq
idiv	edi
push	0
lea	ecx, [esp+84h+var_34]
mov	[esp+84h+var_34], 1
mov	[esp+84h+var_30], 0
push	eax
mov	eax, [esp+88h+var_4C]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
call	sub_70C1B0
cmp	[esp+80h+var_40], 0
jz	short loc_7198E0

loc_719872:
lea	ecx, [esp+80h+var_70]
push	ecx
lea	ecx, [esp+84h+var_5C]
call	sub_716EF0
cmp	[esp+80h+var_70], 2
lea	ecx, [esp+80h+var_34]
jnz	short loc_7198A8
mov	eax, [esp+80h+var_68]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+84h+var_6C]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
call	sub_711110
jmp	short loc_7198D9

loc_7198A8:
mov	eax, [esp+80h+var_60]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+84h+var_64]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+88h+var_68]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+8Ch+var_6C]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
call	sub_711130

loc_7198D9:
cmp	[esp+80h+var_40], 0
jnz	short loc_719872

loc_7198E0:
cmp	[esp+80h+var_C], 0
jz	short loc_71990A
lea	ecx, [esp+80h+var_34]
call	sub_711160
cmp	[esp+80h+var_C], 0
jz	short loc_719908
lea	edx, [esi+34h]
push	edx
lea	eax, [esi+28h]
push	eax
lea	ecx, [esp+88h+var_34]
call	sub_70BCD0

loc_719908:
mov	bl, 1

loc_71990A:
dec	[esp+80h+var_44]
lea	ecx, [esp+80h+var_5C]
call	sub_7144E0
cmp	[esp+80h+var_44], 0
jnz	loc_719831
test	bl, bl
jnz	short loc_719936

loc_719926:
test	esi, esi
jz	short loc_719934
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_719934:
xor	esi, esi

loc_719936:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+80h+var_18]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	ebx
mov	eax, esi
pop	esi
add	esp, 78h
retn
sub_719790 endp

align 10h



sub_719960 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebp
push	esi
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+38h]
xor	ebp, ebp
push	edi
mov	ecx, esi
mov	[esp+28h+var_C], ebp
mov	[esp+28h+var_8], ebp
mov	[esp+28h+var_4], ebp
mov	[esp+28h+var_18], ebp
mov	[esp+28h+var_10], ebp
mov	[esp+28h+var_19], 0
call	edx
test	eax, eax
jbe	loc_719B38
push	ebx

loc_719995:
mov	eax, [esi+3Ch]
mov	edi, [esi+34h]
mov	edi, [edi+0Ch]
lea	edx, ds:0[ebp*8]
add	eax, edx
lea	ecx, [eax+1]
mov	ebx, ecx
shr	ebx, 0Ch
mov	ebx, [edi+ebx*4]
and	ecx, 0FFFh
movzx	cx, byte ptr [ebx+ecx]
mov	ebx, eax
shr	ebx, 0Ch
mov	edi, [edi+ebx*4]
shl	cx, 8
and	eax, 0FFFh
cmp	[esp+2Ch+var_19], 0
jnz	loc_719A82
movzx	ax, byte ptr [edi+eax]
or	cx, ax
movzx	ecx, cx
mov	[esp+2Ch+var_18], ecx
mov	[esp+2Ch+var_19], 1

loc_7199ED:
mov	eax, [esi+3Ch]
add	eax, edx
mov	edx, [esi+34h]
mov	edx, [edx+0Ch]
lea	ecx, [eax+1]
mov	edi, ecx
shr	edi, 0Ch
mov	edi, [edx+edi*4]
and	ecx, 0FFFh
movzx	cx, byte ptr [edi+ecx]
mov	edi, eax
shr	edi, 0Ch
mov	edx, [edx+edi*4]
and	eax, 0FFFh
movzx	ax, byte ptr [edx+eax]
shl	cx, 8
or	cx, ax
movzx	ebx, cx
mov	[esp+2Ch+var_10], ebx
inc	ebp

loc_719A2F:
mov	edx, [esi]
mov	eax, [edx+38h]
mov	ecx, esi
call	eax
cmp	ebp, eax
jb	loc_719995
cmp	[esp+2Ch+var_19], 0
jz	loc_719B35
mov	eax, [esp+2Ch+var_8]
mov	cx, word ptr [esp+2Ch+var_18]
lea	esi, [eax+1]
mov	word ptr [esp+2Ch+var_10], cx
mov	word ptr [esp+2Ch+var_10+2], bx
cmp	esi, eax
jnb	loc_719B03
mov	eax, [esp+2Ch+var_4]
shr	eax, 1
cmp	esi, eax
jnb	loc_719B1F
push	esi
lea	edx, [esp+30h+var_C]
push	edx
jmp	loc_719B16

loc_719A82:
movzx	eax, byte ptr [edi+eax]
mov	ebx, [esp+2Ch+var_10]
movzx	ecx, cx
or	ecx, eax
movzx	eax, bx
dec	ecx
cmp	eax, ecx
jz	loc_7199ED
mov	eax, [esp+2Ch+var_8]
mov	cx, word ptr [esp+2Ch+var_18]
lea	edi, [eax+1]
mov	word ptr [esp+2Ch+var_14], cx
mov	word ptr [esp+2Ch+var_14+2], bx
cmp	edi, eax
jnb	short loc_719AC7
mov	edx, [esp+2Ch+var_4]
shr	edx, 1
cmp	edi, edx
jnb	short loc_719AE3
push	edi
lea	eax, [esp+30h+var_C]
push	eax
jmp	short loc_719ADA

loc_719AC7:
cmp	edi, [esp+2Ch+var_4]
jb	short loc_719AE3
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
lea	edx, [esp+30h+var_C]
push	edx

loc_719ADA:
lea	ecx, [esp+34h+var_C]
call	sub_714BE0

loc_719AE3:
mov	eax, [esp+2Ch+var_C]
mov	[esp+2Ch+var_8], edi
lea	edi, [eax+edi*4-4]
test	edi, edi
jz	short loc_719AF9
mov	ecx, [esp+2Ch+var_14]
mov	[edi], ecx

loc_719AF9:
mov	[esp+2Ch+var_19], 0
jmp	loc_719A2F

loc_719B03:
cmp	esi, [esp+2Ch+var_4]
jb	short loc_719B1F
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax
lea	ecx, [esp+30h+var_C]
push	ecx

loc_719B16:
lea	ecx, [esp+34h+var_C]
call	sub_714BE0

loc_719B1F:
mov	edx, [esp+2Ch+var_C]
lea	eax, [edx+esi*4-4]
mov	[esp+2Ch+var_8], esi
test	eax, eax
jz	short loc_719B35
mov	ecx, [esp+2Ch+var_10]
mov	[eax], ecx

loc_719B35:
xor	ebp, ebp
pop	ebx

loc_719B38:
mov	eax, [esp+28h+var_8]
mov	byte ptr [esp+28h+var_10], 0
mov	edx, [esp+28h+var_10]
push	edx
push	eax
lea	ecx, [esp+30h+var_C]
push	ebp
push	ecx
call	sub_715140
mov	edi, [esp+38h+arg_0]
add	esp, 10h
lea	esi, [esp+28h+var_C]
mov	ecx, edi
call	sub_718560
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+28h+var_C]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn
sub_719960 endp

align 10h



sub_719B80 proc	near

var_78=	dword ptr -78h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch

sub	esp, 78h
push	esi
mov	esi, ecx
cmp	eax, [esi+34h]
jb	short loc_719B92
xor	eax, eax
pop	esi
add	esp, 78h
retn

loc_719B92:
mov	edx, [esi+38h]
lea	ecx, [esi+1Ch]
mov	[esp+7Ch+var_60], ecx
mov	ecx, [esi+30h]
lea	eax, [edx+eax*8+4]
mov	edx, [ecx]
movzx	ecx, byte ptr [eax+edx+3]
add	eax, edx
movzx	edx, byte ptr [eax+2]
shl	ecx, 8
or	ecx, edx
movzx	edx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	ecx, 8
or	ecx, edx
push	ebx
shl	ecx, 8
or	ecx, eax
push	edi
push	ecx
lea	ecx, [esp+88h+var_60]
call	sub_715350
mov	ecx, dword_1855FC0
mov	edi, [esi+54h]
lea	eax, [esp+84h+var_78]
push	eax
mov	[esp+88h+var_78], 102h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	44h
push	esi
call	edx
test	eax, eax
jz	short loc_719C06
push	0F2h
mov	ecx, eax
call	sub_7111E0
mov	esi, eax
jmp	short loc_719C08

loc_719C06:
xor	esi, esi

loc_719C08:
lea	ecx, [esp+80h+var_34]
call	sub_70F3B0
xor	bl, bl
cmp	[esp+80h+var_44], 0
jz	loc_719D15
mov	edi, edi

loc_719C20:
lea	ecx, [esp+80h+var_34]
call	sub_70A190
mov	eax, [esp+80h+var_48]
shl	eax, 0Ah
cdq
idiv	edi
push	0
lea	ecx, [esp+84h+var_34]
mov	[esp+84h+var_34], 1
mov	[esp+84h+var_30], 0
push	eax
mov	eax, [esp+88h+var_4C]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
call	sub_70C1B0
cmp	[esp+80h+var_40], 0
jz	short loc_719CCF

loc_719C61:
lea	eax, [esp+80h+var_70]
push	eax
lea	ecx, [esp+84h+var_5C]
call	sub_717070
cmp	[esp+80h+var_70], 2
lea	ecx, [esp+80h+var_34]
jnz	short loc_719C97
mov	eax, [esp+80h+var_68]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+84h+var_6C]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
call	sub_711110
jmp	short loc_719CC8

loc_719C97:
mov	eax, [esp+80h+var_60]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+84h+var_64]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+88h+var_68]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
mov	eax, [esp+8Ch+var_6C]
shl	eax, 0Ah
cdq
idiv	edi
push	eax
call	sub_711130

loc_719CC8:
cmp	[esp+80h+var_40], 0
jnz	short loc_719C61

loc_719CCF:
cmp	[esp+80h+var_C], 0
jz	short loc_719CF9
lea	ecx, [esp+80h+var_34]
call	sub_711160
cmp	[esp+80h+var_C], 0
jz	short loc_719CF7
lea	ecx, [esi+34h]
push	ecx
lea	edx, [esi+28h]
push	edx
lea	ecx, [esp+88h+var_34]
call	sub_70BCD0

loc_719CF7:
mov	bl, 1

loc_719CF9:
dec	[esp+80h+var_44]
lea	ecx, [esp+80h+var_5C]
call	sub_7145F0
cmp	[esp+80h+var_44], 0
jnz	loc_719C20
test	bl, bl
jnz	short loc_719D25

loc_719D15:
test	esi, esi
jz	short loc_719D23
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx

loc_719D23:
xor	esi, esi

loc_719D25:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+80h+var_18]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi
pop	ebx
mov	eax, esi
pop	esi
add	esp, 78h
retn
sub_719B80 endp




sub_719D40 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+38h]
push	edi
xor	edi, edi
xor	ebx, ebx
mov	ecx, esi
mov	[esp+28h+var_C], edi
mov	[esp+28h+var_8], edi
mov	[esp+28h+var_4], edi
mov	[esp+28h+var_14], edi
mov	[esp+28h+var_15], bl
xor	ebp, ebp
call	edx
test	eax, eax
jbe	loc_719EC4

loc_719D74:
mov	ecx, [esi+38h]
mov	edx, [esi+30h]
mov	edx, [edx]
lea	eax, ds:0[ebp*8]
add	ecx, eax
add	ecx, edx
movzx	dx, byte ptr [ecx+1]
shl	dx, 8
cmp	[esp+28h+var_15], 0
jnz	short loc_719E16
movzx	cx, byte ptr [ecx]
or	dx, cx
movzx	edx, dx
mov	[esp+28h+var_14], edx
mov	[esp+28h+var_15], 1

loc_719DAA:
mov	ecx, [esi+38h]
add	ecx, eax
mov	eax, [esi+30h]
mov	edx, [eax]
lea	eax, [edx+ecx]
movzx	cx, byte ptr [eax+1]
movzx	dx, byte ptr [eax]
shl	cx, 8
or	cx, dx
movzx	ebx, cx
inc	ebp

loc_719DCB:
mov	eax, [esi]
mov	edx, [eax+38h]
mov	ecx, esi
call	edx
cmp	ebp, eax
jb	short loc_719D74
cmp	[esp+28h+var_15], 0
jz	loc_719EC4
mov	ax, word ptr [esp+28h+var_14]
lea	esi, [edi+1]
mov	word ptr [esp+28h+var_10], ax
mov	word ptr [esp+28h+var_10+2], bx
cmp	esi, edi
jnb	loc_719E8E
mov	eax, [esp+28h+var_4]
shr	eax, 1
cmp	esi, eax
jnb	loc_719EAA
push	esi
lea	ecx, [esp+2Ch+var_C]
push	ecx
jmp	loc_719EA1

loc_719E16:
movzx	ecx, byte ptr [ecx]
movzx	edx, dx
or	edx, ecx
movzx	ecx, bx
dec	edx
cmp	ecx, edx
jz	short loc_719DAA
mov	dx, word ptr [esp+28h+var_14]
inc	edi
mov	word ptr [esp+28h+var_10], dx
mov	word ptr [esp+28h+var_10+2], bx
cmp	edi, [esp+28h+var_8]
jnb	short loc_719E4E
mov	eax, [esp+28h+var_4]
shr	eax, 1
cmp	edi, eax
jnb	short loc_719E6A
push	edi
lea	ecx, [esp+2Ch+var_C]
push	ecx
jmp	short loc_719E61

loc_719E4E:
cmp	edi, [esp+28h+var_4]
jb	short loc_719E6A
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
lea	eax, [esp+2Ch+var_C]
push	eax

loc_719E61:
lea	ecx, [esp+30h+var_C]
call	sub_714BE0

loc_719E6A:
mov	ecx, [esp+28h+var_C]
mov	[esp+28h+var_8], edi
lea	edi, [ecx+edi*4-4]
test	edi, edi
jz	short loc_719E80
mov	edx, [esp+28h+var_10]
mov	[edi], edx

loc_719E80:
mov	edi, [esp+28h+var_8]
mov	[esp+28h+var_15], 0
jmp	loc_719DCB

loc_719E8E:
cmp	esi, [esp+28h+var_4]
jb	short loc_719EAA
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
lea	eax, [esp+2Ch+var_C]
push	eax

loc_719EA1:
lea	ecx, [esp+30h+var_C]
call	sub_714BE0

loc_719EAA:
mov	ecx, [esp+28h+var_C]
mov	[esp+28h+var_8], esi
mov	edi, [esp+28h+var_8]
lea	esi, [ecx+esi*4-4]
test	esi, esi
jz	short loc_719EC4
mov	edx, [esp+28h+var_10]
mov	[esi], edx

loc_719EC4:
mov	byte ptr [esp+28h+var_10], 0
mov	eax, [esp+28h+var_10]
push	eax
push	edi
lea	ecx, [esp+30h+var_C]
push	0
push	ecx
call	sub_715140
mov	edi, [esp+38h+arg_0]
add	esp, 10h
lea	esi, [esp+28h+var_C]
mov	ecx, edi
call	sub_718560
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+28h+var_C]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_719D40 endp

align 10h



sub_719F10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_719F23
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_719F45

loc_719F23:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_719F4A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_719F45:
call	sub_7181C0

loc_719F4A:
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [edi+edi*4]
lea	esi, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_719F9F
mov	eax, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	ecx, [eax]
mov	[esi+8], ecx
mov	edx, [eax+4]
mov	[esi+0Ch], edx
mov	ecx, [eax+8]
mov	[esi+10h], ecx
test	edx, edx
jnz	loc_71A023
test	ecx, ecx
jz	loc_71A023
call	sub_64A420
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_719F9F:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp

loc_719FA6:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*4]
cmp	[eax+ebp*4+8], edx
jnz	short loc_719FA6
mov	edx, [esi+4]
lea	ecx, [ebx+ebx*4]
lea	ecx, [eax+ecx*4+8]
cmp	edx, edi
jnz	short loc_719FE3
test	ecx, ecx
jz	short loc_719FCA
push	esi
call	sub_7171A0

loc_719FCA:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [esi+8]
call	sub_6AB050
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_719FE3:
lea	edx, [edx+edx*4]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jz	short loc_71A001

loc_719FF0:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*4+0]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jnz	short loc_719FF0

loc_71A001:
test	ecx, ecx
jz	short loc_71A00B
push	esi
call	sub_7171A0

loc_71A00B:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+8]
mov	[ebp+0], ebx
call	sub_6AB050
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	ebx

loc_71A023:
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch
sub_719F10 endp

align 10h



sub_71A030 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_71A043
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_71A065

loc_71A043:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_71A06A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_71A065:
call	sub_718360

loc_71A06A:
mov	eax, [esi]
inc	dword ptr [eax]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
mov	edx, [esi]
mov	eax, ecx
shl	eax, 4
mov	ebp, [eax+edx+8]
lea	eax, [eax+edx+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_71A0A6
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	[eax+8], esi
fld	dword ptr [edx+4]
pop	esi
fstp	dword ptr [eax+0Ch]
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71A0A6:
push	edi
mov	edi, [edx+4]
mov	esi, ecx
push	ebx
lea	ecx, [ecx+0]

loc_71A0B0:
inc	esi
and	esi, edi
mov	ebx, esi
shl	ebx, 4
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
jnz	short loc_71A0B0
mov	ebx, [eax+4]
mov	edi, esi
shl	edi, 4
lea	edi, [edi+edx+8]
cmp	ebx, ecx
jnz	short loc_71A102
test	edi, edi
jz	short loc_71A0E7
mov	[edi], ebp
mov	edx, [eax+4]
mov	[edi+4], edx
mov	edx, [eax+8]
mov	[edi+8], edx
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edi+0Ch]

loc_71A0E7:
mov	edx, [esp+10h+arg_4]
mov	edi, [edx]
pop	ebx
mov	[eax+8], edi
mov	edx, [edx+4]
pop	edi
mov	[eax], esi
pop	esi
mov	[eax+0Ch], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71A102:
shl	ebx, 4
cmp	[ebx+edx+8], ecx
lea	ebx, [ebx+edx+8]
jz	short loc_71A11F
nop

loc_71A110:
mov	ebx, [ebx]
shl	ebx, 4
cmp	[ebx+edx+8], ecx
lea	ebx, [ebx+edx+8]
jnz	short loc_71A110

loc_71A11F:
test	edi, edi
jz	short loc_71A137
mov	[edi], ebp
mov	edx, [eax+4]
mov	[edi+4], edx
mov	edx, [eax+8]
mov	[edi+8], edx
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edi+0Ch]

loc_71A137:
mov	edx, [esp+10h+arg_4]
mov	[ebx], esi
mov	esi, [edx]
pop	ebx
pop	edi
mov	[eax+8], esi
mov	edx, [edx+4]
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+0Ch], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_71A030 endp

align 10h



; int __stdcall	sub_71A160(float, __int16)
sub_71A160 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

mov	ax, word ptr [esp+arg_0]
mov	dx, [esp+arg_4]
push	esi
mov	word ptr [esp+4+arg_0],	ax
lea	esi, [ecx+3Ch]
lea	eax, [esp+4+arg_0]
push	eax
mov	ecx, esi
mov	word ptr [esp+8+arg_0+2], dx
call	sub_717CB0
test	eax, eax
jl	short loc_71A19F
inc	eax
shl	eax, 4
add	eax, [esi]
jz	short loc_71A19F
fld	dword ptr [eax+4]
pop	esi
fstp	[esp+arg_0]
fld	[esp+arg_0]
retn	8

loc_71A19F:
fldz
pop	esi
retn	8
sub_71A160 endp

align 10h



sub_71A1B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
call	sub_719790
retn	8
sub_71A1B0 endp

align 10h



sub_71A1C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, ecx
push	esi
call	sub_719960
add	esp, 4
mov	eax, esi
pop	esi
retn	4
sub_71A1C0 endp

align 10h



sub_71A1E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
call	sub_719B80
retn	8
sub_71A1E0 endp

align 10h



sub_71A1F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, ecx
push	esi
call	sub_719D40
add	esp, 4
mov	eax, esi
pop	esi
retn	4
sub_71A1F0 endp

align 10h



sub_71A210 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, ecx
xor	ebx, ebx
cmp	[ebp+20h], bl
jz	loc_71A2D3
push	esi
mov	esi, [ebp+24h]
push	edi
xor	edi, edi
cmp	[esi+4], ebx
jbe	short loc_71A29B
jmp	short loc_71A230
align 10h

loc_71A230:
mov	eax, [esi]
mov	ecx, [esp+10h+arg_0]
cmp	[eax+edi*4], ecx
jnz	short loc_71A292
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_71A26A
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_71A265
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_71A262
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_71A262:
mov	[esi+8], ebx

loc_71A265:
mov	[esi+4], ebx
jmp	short loc_71A289

loc_71A26A:
mov	ecx, [esi]
sub	eax, edi
lea	ecx, [ecx+edi*4]
lea	edx, ds:0FFFFFFFCh[eax*4]
push	edx
lea	eax, [ecx+4]
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]

loc_71A289:
mov	esi, [ebp+24h]
cmp	dword ptr [esi+4], 1
jz	short loc_71A2A2

loc_71A292:
mov	ecx, [ebp+24h]
inc	edi
cmp	edi, [ecx+4]
jb	short loc_71A230

loc_71A29B:
pop	edi
pop	esi

loc_71A29D:
pop	ebp
pop	ebx
retn	4

loc_71A2A2:
mov	edx, [esi]
mov	edi, [edx]
cmp	esi, ebx
jz	short loc_71A2C6
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_71A2C6:
mov	[ebp+24h], edi
pop	edi
pop	esi
mov	[ebp+20h], bl
pop	ebp
pop	ebx
retn	4

loc_71A2D3:
mov	ecx, [ebp+24h]
cmp	ecx, [esp+8+arg_0]
jnz	short loc_71A29D
mov	[ebp+24h], ebx
pop	ebp
pop	ebx
retn	4
sub_71A210 endp

align 10h



sub_71A2F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_71A303
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_71A325

loc_71A303:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_71A32A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_71A325:
call	sub_7181C0

loc_71A32A:
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [edi+edi*4]
lea	esi, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_71A385
mov	eax, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	ecx, [eax]
mov	edx, [ecx]
mov	[esi+8], edx
mov	eax, [eax+4]
mov	ecx, [eax]
mov	[esi+0Ch], ecx
mov	eax, [eax+4]
mov	[esi+10h], eax
test	ecx, ecx
jnz	loc_71A413
test	eax, eax
jz	loc_71A413
mov	ecx, eax
call	sub_64A420
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_71A385:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp
lea	esp, [esp+0]

loc_71A390:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*4]
cmp	[eax+ebp*4+8], edx
jnz	short loc_71A390
lea	edx, [ebx+ebx*4]
lea	ecx, [eax+edx*4+8]
mov	edx, [esi+4]
cmp	edx, edi
jnz	short loc_71A3CD
test	ecx, ecx
jz	short loc_71A3B4
push	esi
call	sub_7171A0

loc_71A3B4:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+8]
call	sub_7146B0
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_71A3CD:
lea	edx, [edx+edx*4]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jz	short loc_71A3F1
lea	ebx, [ebx+0]

loc_71A3E0:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*4+0]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jnz	short loc_71A3E0

loc_71A3F1:
test	ecx, ecx
jz	short loc_71A3FB
push	esi
call	sub_7171A0

loc_71A3FB:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [esi+8]
mov	[ebp+0], ebx
call	sub_7146B0
pop	ebp
mov	dword ptr [esi], 0FFFFFFFFh
pop	ebx

loc_71A413:
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch
sub_71A2F0 endp

align 10h



sub_71A420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_71A433
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_71A455

loc_71A433:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_71A45A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_71A455:
call	sub_718360

loc_71A45A:
mov	eax, [esi]
inc	dword ptr [eax]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
mov	edx, [esi]
mov	eax, ecx
shl	eax, 4
mov	ebp, [eax+edx+8]
lea	eax, [eax+edx+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_71A49A
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	esi, [esi]
mov	[eax+8], esi
mov	edx, [edx+4]
fld	dword ptr [edx]
pop	esi
fstp	dword ptr [eax+0Ch]
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71A49A:
push	edi
mov	edi, [edx+4]
mov	esi, ecx
push	ebx

loc_71A4A1:
inc	esi
and	esi, edi
mov	ebx, esi
shl	ebx, 4
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
jnz	short loc_71A4A1
mov	ebx, [eax+4]
mov	edi, esi
shl	edi, 4
lea	edi, [edi+edx+8]
cmp	ebx, ecx
jnz	short loc_71A4F7
test	edi, edi
jz	short loc_71A4D8
mov	[edi], ebp
mov	edx, [eax+4]
mov	[edi+4], edx
mov	edx, [eax+8]
mov	[edi+8], edx
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edi+0Ch]

loc_71A4D8:
mov	edx, [esp+10h+arg_4]
mov	edi, [edx]
mov	edi, [edi]
mov	[eax+8], edi
mov	edx, [edx+4]
fld	dword ptr [edx]
pop	ebx
fstp	dword ptr [eax+0Ch]
pop	edi
mov	[eax], esi
pop	esi
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71A4F7:
shl	ebx, 4
cmp	[ebx+edx+8], ecx
lea	ebx, [ebx+edx+8]
jz	short loc_71A513

loc_71A504:
mov	ebx, [ebx]
shl	ebx, 4
cmp	[ebx+edx+8], ecx
lea	ebx, [ebx+edx+8]
jnz	short loc_71A504

loc_71A513:
test	edi, edi
jz	short loc_71A52B
mov	[edi], ebp
mov	edx, [eax+4]
mov	[edi+4], edx
mov	edx, [eax+8]
mov	[edi+8], edx
fld	dword ptr [eax+0Ch]
fstp	dword ptr [edi+0Ch]

loc_71A52B:
mov	edx, [esp+10h+arg_4]
mov	[ebx], esi
mov	esi, [edx]
mov	esi, [esi]
mov	[eax+8], esi
mov	edx, [edx+4]
fld	dword ptr [edx]
pop	ebx
pop	edi
fstp	dword ptr [eax+0Ch]
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_71A420 endp




sub_71A550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
mov	esi, [esp+8+arg_0]
mov	ebp, ecx
cmp	[ebp+24h], esi
ja	short loc_71A594
push	ebx
mov	ebx, [ebp+24h]
push	edi
inc	esi
lea	edi, [ebp+20h]
push	esi
push	edi
mov	ecx, edi
call	sub_6F1D10
cmp	esi, ebx
jbe	short loc_71A587
mov	ecx, [edi]
lea	eax, [ebx+ebx*4]
sub	esi, ebx
lea	edx, [ecx+eax*8]
push	esi
push	edx
call	sub_6F1C20
add	esp, 8

loc_71A587:
mov	eax, [esp+10h+arg_0]
pop	edi
pop	ebx
cmp	[ebp+24h], eax
jbe	short loc_71A5A7
mov	esi, eax

loc_71A594:
mov	ecx, [esp+8+arg_4]
mov	eax, [ebp+20h]
lea	edx, [esi+esi*4]
push	ecx
lea	ecx, [eax+edx*8]
call	sub_716010

loc_71A5A7:
pop	esi
pop	ebp
retn	8
sub_71A550 endp

align 10h



sub_71A5B0 proc	near

arg_0= word ptr	 4

add	ecx, 2Ch
push	esi
mov	esi, [ecx]
test	esi, esi
jz	short loc_71A5E3
movzx	eax, [esp+4+arg_0]
mov	edx, [esi+4]
and	edx, eax
push	edx
lea	eax, [esp+8+arg_0]
push	eax
call	sub_717D00
test	eax, eax
jl	short loc_71A5E3
lea	eax, [esi+eax*8+0Ch]
test	eax, eax
jz	short loc_71A5E3
movzx	eax, word ptr [eax+2]
pop	esi
retn	4

loc_71A5E3:
or	eax, 0FFFFFFFFh
pop	esi
retn	4
sub_71A5B0 endp

align 10h



sub_71A5F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
mov	ebx, [ebp+0]
push	esi
push	edi
mov	[esp+14h+var_4], ecx
mov	eax, 4
mov	esi, 1505h
lea	ebx, [ebx+0]

loc_71A610:
movzx	edx, byte ptr [ebx+eax-1]
imul	esi, 1003Fh
dec	eax
add	esi, edx
test	eax, eax
ja	short loc_71A610
mov	edi, [ecx]
test	edi, edi
jz	short loc_71A680
mov	eax, [edi+4]
and	eax, esi
push	eax
push	ebp
call	sub_717140
test	eax, eax
jl	short loc_71A67C
mov	edx, [ebx]
lea	ecx, [eax+eax*4]
lea	esi, [edi+ecx*4+10h]
mov	[esi], edx
mov	edi, [ebp+4]
cmp	dword ptr [edi], 0
jnz	short loc_71A657
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_71A657
call	sub_64A420

loc_71A657:
cmp	dword ptr [esi+4], 0
jnz	short loc_71A669
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_71A669
call	sub_666B00

loc_71A669:
mov	eax, [edi]
mov	[esi+4], eax
mov	ecx, [edi+4]
pop	edi
mov	[esi+8], ecx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_71A67C:
mov	ecx, [esp+14h+var_4]

loc_71A680:
mov	edx, [esp+14h+arg_0]
push	esi
push	ebp
push	edx
call	sub_71A2F0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_71A5F0 endp

align 10h



sub_71A6A0 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax+8]
xor	ecx, ecx
mov	dword ptr [eax], offset	off_155F500
fst	dword ptr [eax+0Ch]
fstp	dword ptr [eax+10h]
mov	dword ptr [eax+4], 1
mov	[eax+14h], ecx
mov	dword ptr [eax], offset	off_143FFB8
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
retn
sub_71A6A0 endp

align 10h



sub_71A6F0 proc	near
xor	eax, eax
retn	8
sub_71A6F0 endp

align 10h



sub_71A700 proc	near
mov	eax, [ecx+24h]
retn
sub_71A700 endp

align 10h



sub_71A710 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_71A71F
inc	dword ptr [edi+4]

loc_71A71F:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_71A72B
call	sub_64A400

loc_71A72B:
mov	[esi+1Ch], edi
pop	edi
pop	esi
retn	4
sub_71A710 endp

align 10h



sub_71A740 proc	near
mov	eax, [ecx+2Ch]
test	eax, eax
jnz	short loc_71A751
xor	ecx, ecx
test	eax, eax
setnz	cl
mov	al, cl
retn

loc_71A751:
mov	eax, [eax]
xor	ecx, ecx
test	eax, eax
setnz	cl
mov	al, cl
retn
sub_71A740 endp

align 10h



; int __stdcall	sub_71A760(char	*Src, int)
sub_71A760 proc	near

Src= dword ptr	4
arg_4= dword ptr  8

fldz
mov	eax, [esp+arg_4]
push	ebx
xor	ebx, ebx
push	ebp
mov	ebp, [esp+8+Src]
push	esi
mov	esi, ecx
fst	dword ptr [esi+8]
mov	dword ptr [esi], offset	off_155F500
fst	dword ptr [esi+0Ch]
mov	[esi+14h], eax
fstp	dword ptr [esi+10h]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143FFB8
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	eax, ebp
mov	[esi+38h], ebx
push	edi
mov	[esi+3Ch], ebx
lea	edx, [eax+1]

loc_71A7B4:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_71A7B4
mov	ecx, dword_1855FC0
sub	eax, edx
mov	edx, [ecx]
inc	eax
push	ebx
push	eax
mov	eax, [edx+28h]
call	eax
mov	edi, eax
mov	[esi+18h], edi
cmp	edi, ebx
jz	short loc_71A7F5
mov	ecx, ebp
lea	edx, [ecx+1]
jmp	short loc_71A7E0
align 10h

loc_71A7E0:
mov	al, [ecx]
inc	ecx
cmp	al, bl
jnz	short loc_71A7E0
sub	ecx, edx
push	ebp		; Src
inc	ecx
push	ecx		; SizeInBytes
push	edi		; Dst
call	_strcpy_s
add	esp, 0Ch

loc_71A7F5:
or	dword ptr [esi+14h], 2000h
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_71A760 endp

align 10h



sub_71A810 proc	near
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+20h]
push	0
push	edi
mov	ecx, edi
mov	dword ptr [esi], offset	off_143FFB8
call	sub_717A90
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_71A843
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+18h], 0

loc_71A843:
lea	ecx, [esi+3Ch]
call	sub_6661A0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+30h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+2Ch]
call	sub_716800
mov	ecx, edi
call	sub_717A10
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_71A877
call	sub_64A400

loc_71A877:
pop	edi
mov	dword ptr [esi], offset	off_143FC28
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_71A810 endp

align 10h


; Attributes: bp-based frame

sub_71A890 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
push	ebx
push	esi
mov	esi, [ebp+arg_0]
mov	eax, [esi+34h]
sub	eax, [esi+30h]
push	edi
add	eax, [esi+2Ch]
mov	ebx, ecx
push	eax
push	offset aReadingCodeTab ; "reading code table at	offset %d\n"
push	esi
call	nullsub_2
mov	ecx, [ebx+14h]
mov	eax, [ebx+24h]
shr	ecx, 0Eh
add	esp, 0Ch
xor	edi, edi
test	cl, 1
jz	loc_71A959
mov	[esp+20h+var_C], eax
test	eax, eax
jbe	loc_71A9C1
lea	edx, [esp+20h+var_10]
lea	eax, [esp+20h+var_14]
add	ebx, 2Ch
mov	[esp+20h+var_8], edx
mov	[esp+20h+var_4], eax
lea	esp, [esp+0]

loc_71A8F0:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
movzx	ecx, di
cmp	edx, 2
mov	[esp+20h+var_14], ecx
mov	byte ptr [esi+15h], 0
jge	short loc_71A90F
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71A90F:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, cx
movzx	edx, cx
push	eax
lea	ecx, [esp+24h+var_8]
push	ecx
push	ebx
mov	ecx, ebx
mov	[esp+2Ch+var_10], edx
call	sub_718090
inc	edi
cmp	edi, [esp+20h+var_C]
jb	short loc_71A8F0
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4

loc_71A959:
mov	[esp+20h+var_14], eax
test	eax, eax
jbe	short loc_71A9C1
lea	edx, [esp+20h+var_10]
lea	eax, [esp+20h+var_C]
add	ebx, 2Ch
mov	[esp+20h+var_8], edx
mov	[esp+20h+var_4], eax

loc_71A974:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
movzx	ecx, di
cmp	edx, 1
mov	[esp+20h+var_C], ecx
mov	byte ptr [esi+15h], 0
jge	short loc_71A991
mov	ecx, esi
call	sub_6A9C60

loc_71A991:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	dx, cl
inc	eax
mov	[esi+2Ch], eax
movzx	eax, dx
mov	[esp+20h+var_10], eax
movzx	eax, ax
push	eax
lea	ecx, [esp+24h+var_8]
push	ecx
push	ebx
mov	ecx, ebx
call	sub_718090
inc	edi
cmp	edi, [esp+20h+var_14]
jb	short loc_71A974

loc_71A9C1:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_71A890 endp

align 10h



sub_71A9D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_71A810
test	[esp+4+arg_0], 1
jz	short loc_71A9ED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_71A9ED:
mov	eax, esi
pop	esi
retn	4
sub_71A9D0 endp

align 10h



sub_71AA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+18h]
test	eax, eax
jz	short loc_71AA22
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi+18h], 0

loc_71AA22:
mov	esi, [esp+10h+arg_0]
mov	eax, [esi+1Ch]
push	eax
mov	ecx, esi
call	sub_6AA650
mov	[edi+18h], eax
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 1
jge	short loc_71AA4A
mov	ecx, esi
call	sub_6A9C60

loc_71AA4A:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	bl, [eax+edx]
mov	ebp, [esp+10h+arg_4]
inc	eax
mov	[esi+2Ch], eax
mov	byte ptr [esp+10h+arg_0], 0
cmp	ebp, 3Eh
jnz	short loc_71AA8B
mov	ecx, [esi+30h]
sub	ecx, eax
cmp	ecx, 1
mov	byte ptr [esi+15h], 0
jge	short loc_71AA7A
mov	ecx, esi
call	sub_6A9C60

loc_71AA7A:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
inc	eax
mov	byte ptr [esp+10h+arg_0], cl
mov	[esi+2Ch], eax

loc_71AA8B:
test	bl, 10h
jz	short loc_71AAA4
mov	edx, [edi+14h]
and	edx, 0FFFFFEFFh
or	edx, 200h
mov	[edi+14h], edx
jmp	short loc_71AAC2

loc_71AAA4:
test	bl, 8
jz	short loc_71AABB
mov	eax, [edi+14h]
and	eax, 0FFFFFDFFh
or	eax, 100h
mov	[edi+14h], eax
jmp	short loc_71AAC2

loc_71AABB:
and	dword ptr [edi+14h], 0FFFFFCFFh

loc_71AAC2:
test	bl, 4
jz	short loc_71AACD
or	dword ptr [edi+14h], 1
jmp	short loc_71AAD1

loc_71AACD:
and	dword ptr [edi+14h], 0FFFFFFFEh

loc_71AAD1:
test	bl, 2
jz	short loc_71AADC
or	dword ptr [edi+14h], 2
jmp	short loc_71AAE0

loc_71AADC:
and	dword ptr [edi+14h], 0FFFFFFFDh

loc_71AAE0:
test	bl, 1
jz	short loc_71AAEE
or	dword ptr [edi+14h], 4000h
jmp	short loc_71AAF5

loc_71AAEE:
and	dword ptr [edi+14h], 0FFFFBFFFh

loc_71AAF5:
mov	ecx, esi
call	sub_6A9880
test	al, al
jz	loc_71AB9B
cmp	ebp, 0Dh
jnz	short loc_71AB10
push	offset aReadingDefin_2 ; "reading DefineFontInfo\n"
jmp	short loc_71AB15

loc_71AB10:		; "reading DefineFontInfo2\n"
push	offset aReadingDefin_3

loc_71AB15:
push	esi
call	nullsub_2
mov	eax, [edi+18h]
add	esp, 8
test	eax, eax
jnz	short loc_71AB2A
mov	eax, offset aNone ; "(none)"

loc_71AB2A:
push	eax
push	offset aNameS_0	; "  Name = %s\n"
push	esi
call	nullsub_2
mov	eax, [edi+14h]
mov	ecx, eax
and	ecx, 300h
add	esp, 0Ch
mov	edx, offset aUnicode ; "Unicode"
cmp	ecx, 200h
jnz	short loc_71AB58
mov	edx, offset aShiftjis ;	"ShiftJIS"
jmp	short loc_71AB65

loc_71AB58:
cmp	ecx, 100h
jnz	short loc_71AB65
mov	edx, offset aAnsi ; "ANSI"

loc_71AB65:
movzx	ecx, byte ptr [edi+14h]
shr	eax, 1
and	eax, 1
push	eax
and	ecx, 1
push	ecx
push	edx
push	offset aCodepageSItali ; "  CodePage = %s, Italic = %d,	Bold = %d"...
push	esi
call	nullsub_2
add	esp, 14h
cmp	ebp, 3Eh
jnz	short loc_71AB9B
movzx	edx, byte ptr [esp+10h+arg_0]
push	edx
push	offset aLangcodeD ; "  LangCode	= %d\n"
push	esi
call	nullsub_2
add	esp, 0Ch

loc_71AB9B:
push	esi
mov	ecx, edi
call	sub_71A890
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_71AA00 endp

align 10h



sub_71ABB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_4= dword ptr  8

sub	esp, 10h
push	esi
mov	esi, ecx
mov	ecx, [esp+14h+arg_4]
mov	[esp+14h+var_10], 0
mov	[esp+14h+var_C], ecx
test	ecx, ecx
jz	short loc_71ABCF
call	sub_64A420

loc_71ABCF:
lea	eax, [esp+14h+arg_0]
mov	[esp+14h+var_8], eax
lea	eax, [esp+14h+var_8]
lea	ecx, [esi+2Ch]
push	eax
lea	edx, [esp+18h+var_10]
push	ecx
mov	[esp+1Ch+var_4], edx
call	sub_71A5F0
cmp	[esp+14h+var_10], 0
pop	esi
jnz	short loc_71AC02
mov	ecx, [esp+10h+var_C]
test	ecx, ecx
jz	short loc_71AC02
call	sub_666B00

loc_71AC02:
add	esp, 10h
retn	8
sub_71ABB0 endp

align 10h



sub_71AC10 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_4= dword ptr  8

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_4]
cmp	dword ptr [esi], 0
push	edi
mov	edi, ecx
mov	[esp+18h+var_10], 0
mov	[esp+18h+var_C], 0
jnz	short loc_71AC50
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_71AC50
call	sub_64A420
cmp	[esp+18h+var_10], 0
jnz	short loc_71AC50
mov	ecx, [esp+18h+var_C]
test	ecx, ecx
jz	short loc_71AC50
call	sub_666B00

loc_71AC50:
mov	ecx, [esi+4]
mov	eax, [esi]
lea	edx, [esp+18h+arg_0]
mov	[esp+18h+var_8], edx
lea	edx, [esp+18h+var_8]
mov	[esp+18h+var_C], ecx
mov	[esp+18h+var_10], eax
lea	ecx, [edi+2Ch]
push	edx
lea	eax, [esp+1Ch+var_10]
push	ecx
mov	[esp+20h+var_4], eax
call	sub_71A5F0
cmp	[esp+18h+var_10], 0
pop	edi
pop	esi
jnz	short loc_71AC91
mov	ecx, [esp+10h+var_C]
test	ecx, ecx
jz	short loc_71AC91
call	sub_666B00

loc_71AC91:
add	esp, 10h
retn	8
sub_71AC10 endp

align 10h



sub_71ACA0 proc	near

var_4E=	byte ptr -4Eh
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 50h
mov	eax, [esp+50h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [eax+324h]
push	edi
xor	ebp, ebp
mov	edi, ecx
mov	[esp+60h+var_48], edi
cmp	esi, ebp
jnz	short loc_71ACC0
lea	esi, [eax+28h]

loc_71ACC0:
mov	eax, [eax+20h]
mov	ecx, [eax+1Ch]
mov	edx, [esp+60h+arg_4]
mov	eax, [edx]
mov	[esp+60h+var_4E], 1
mov	[esp+60h+var_34], ecx
cmp	eax, 0Ah
jnz	loc_71AFD9
push	offset aReadingDefin_1 ; "reading DefineFont\n"
push	esi
call	nullsub_2
mov	eax, [esi+30h]
mov	edx, [esi+2Ch]
mov	ecx, [esi+34h]
sub	ecx, eax
add	ecx, edx
sub	eax, edx
add	esp, 8
cmp	eax, 2
mov	[esp+60h+var_3C], ecx
mov	[esp+60h+var_1C], ebp
mov	[esp+60h+var_18], ebp
mov	[esp+60h+var_14], ebp
mov	byte ptr [esi+15h], 0
jge	short loc_71AD1D
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71AD1D:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
lea	edx, [esp+60h+var_1C]
push	1
add	eax, 2
movzx	edi, cx
push	edx
mov	ecx, edx
mov	[esi+2Ch], eax
call	sub_714BE0
mov	ebx, [esp+60h+var_1C]
mov	[esp+60h+var_18], 1
cmp	ebx, ebp
jz	short loc_71AD62
mov	[ebx], edi

loc_71AD62:
mov	eax, [ebx]
push	eax
push	offset aOffset0D ; "offset[0] =	%d\n"
push	esi
call	nullsub_2
mov	eax, [ebx]
sar	eax, 1
mov	ebp, 1
add	esp, 0Ch
cmp	eax, ebp
mov	[esp+60h+var_44], eax
jle	loc_71AE4A
jmp	short loc_71AD90
align 10h

loc_71AD90:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_71ADA8
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71ADA8:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
test	cx, cx
jz	short loc_71AE45
mov	eax, [esp+60h+var_18]
movzx	edx, cx
lea	edi, [eax+1]
mov	[esp+60h+var_30], edx
cmp	edi, eax
jnb	short loc_71ADF3
mov	eax, [esp+60h+var_14]
shr	eax, 1
cmp	edi, eax
jnb	short loc_71AE13
push	edi
lea	ecx, [esp+64h+var_1C]
push	ecx
jmp	short loc_71AE06

loc_71ADF3:
cmp	edi, [esp+60h+var_14]
jb	short loc_71AE13
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
lea	eax, [esp+64h+var_1C]
push	eax

loc_71AE06:
lea	ecx, [esp+68h+var_1C]
call	sub_714BE0
mov	ebx, [esp+60h+var_1C]

loc_71AE13:
mov	[esp+60h+var_18], edi
lea	edi, [ebx+edi*4-4]
test	edi, edi
jz	short loc_71AE25
mov	ecx, [esp+60h+var_30]
mov	[edi], ecx

loc_71AE25:
mov	edx, [ebx+ebp*4]
push	edx
push	ebp
push	offset aOffsetDD ; "offset[%d] = %d\n"
push	esi
call	nullsub_2
inc	ebp
add	esp, 10h
cmp	ebp, [esp+60h+var_44]
jl	loc_71AD90
jmp	short loc_71AE4A

loc_71AE45:
mov	[esp+60h+var_4E], 0

loc_71AE4A:
mov	edi, [esp+60h+var_48]
mov	edx, [edi+24h]
mov	ebp, [esp+60h+var_44]
add	edi, 20h
mov	[esp+60h+var_30], edi
mov	[esp+60h+var_40], edx
cmp	ebp, edx
jnb	short loc_71AE9C
mov	ebx, [edi]
mov	eax, edx
sub	eax, ebp
lea	ecx, [eax+ebp]
lea	ebx, [ebx+ecx*4-4]
jz	short loc_71AE90
mov	[esp+60h+var_38], eax

loc_71AE77:
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_71AE86
call	sub_70E500
mov	edx, [esp+60h+var_40]

loc_71AE86:
sub	ebx, 4
sub	[esp+60h+var_38], 1
jnz	short loc_71AE77

loc_71AE90:
mov	eax, [edi+8]
shr	eax, 1
cmp	ebp, eax
jnb	short loc_71AEB5
push	ebp
jmp	short loc_71AEA9

loc_71AE9C:
cmp	ebp, [edi+8]
jb	short loc_71AEB5
mov	ecx, ebp
shr	ecx, 2
add	ecx, ebp
push	ecx

loc_71AEA9:
push	edi
mov	ecx, edi
call	sub_668FE0
mov	edx, [esp+60h+var_40]

loc_71AEB5:
mov	[edi+4], ebp
cmp	ebp, edx
jbe	short loc_71AED9
mov	eax, [edi]
mov	ecx, ebp
sub	ecx, edx
lea	eax, [eax+edx*4]
jz	short loc_71AED9

loc_71AEC7:
test	eax, eax
jz	short loc_71AED1
mov	dword ptr [eax], 0

loc_71AED1:
add	eax, 4
sub	ecx, 1
jnz	short loc_71AEC7

loc_71AED9:
cmp	[esp+60h+var_4E], 0
jz	loc_71AFB2
xor	ebx, ebx
test	ebp, ebp
jle	loc_71AFBD
mov	edi, edi

loc_71AEF0:
mov	ecx, [esp+60h+var_1C]
mov	edi, [ecx+ebx*4]
add	edi, [esp+60h+var_3C]
lea	ebp, ds:0[ebx*4]
push	edi
mov	ecx, esi
mov	[esp+64h+var_38], ebp
call	sub_6A9D50
lea	eax, [ebx+1]
cmp	eax, [esp+60h+var_44]
mov	[esp+60h+var_40], eax
jge	short loc_71AF28
mov	eax, [esp+60h+var_1C]
mov	ebx, [eax+ebp+4]
sub	ebx, [eax+ebp]
jmp	short loc_71AF34

loc_71AF28:
mov	eax, [esp+60h+arg_4]
mov	ebx, [eax+0Ch]
add	ebx, [eax+8]
sub	ebx, edi

loc_71AF34:
mov	ecx, [esp+60h+var_34]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	2Ch
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_71AF60
mov	ecx, ebp
call	sub_710C60
mov	dword ptr [ebp+0], offset off_143F8D8
mov	dword ptr [ebp+28h], 0
jmp	short loc_71AF62

loc_71AF60:
xor	ebp, ebp

loc_71AF62:
mov	ecx, [esp+60h+arg_0]
push	0
push	0
push	ebx
push	2
push	ecx
mov	ecx, ebp
call	sub_7136E0
mov	edx, [esp+60h+var_30]
mov	edi, [edx]
add	edi, [esp+60h+var_38]
test	ebp, ebp
jz	short loc_71AF8A
mov	ecx, ebp
call	sub_70C940

loc_71AF8A:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_71AF95
call	sub_70E500

loc_71AF95:
mov	[edi], ebp
test	ebp, ebp
jz	short loc_71AFA2
mov	ecx, ebp
call	sub_70E500

loc_71AFA2:
mov	ebx, [esp+60h+var_40]
cmp	ebx, [esp+60h+var_44]
jl	loc_71AEF0
jmp	short loc_71AFBD

loc_71AFB2:
mov	eax, [esp+60h+var_48]
or	dword ptr [eax+14h], 1000h

loc_71AFBD:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+60h+var_1C]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 50h
retn	8

loc_71AFD9:
cmp	eax, 30h
jz	short loc_71B014
cmp	eax, 4Bh
jnz	loc_71BBEA
push	offset aReadingDefin_0 ; "reading DefineFont3: "

loc_71AFEC:
push	esi
call	nullsub_2
add	esp, 8
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
setnz	al
mov	[esp+60h+var_4D], al
test	al, al
jz	short loc_71B01B
or	dword ptr [edi+14h], 2000h
jmp	short loc_71B022

loc_71B014:		; "reading DefineFont2:	"
push	offset aReadingDefinef
jmp	short loc_71AFEC

loc_71B01B:
and	dword ptr [edi+14h], 0FFFFDFFFh

loc_71B022:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	bl
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	byte ptr [esp+64h+var_4C]
call	sub_6AA450
test	eax, eax
setnz	al
test	bl, bl
jz	short loc_71B066
mov	ecx, [edi+14h]
and	ecx, 0FFFFFEFFh
or	ecx, 200h
mov	[edi+14h], ecx
jmp	short loc_71B085

loc_71B066:
test	al, al
jz	short loc_71B07E
mov	edx, [edi+14h]
and	edx, 0FFFFFDFFh
or	edx, 100h
mov	[edi+14h], edx
jmp	short loc_71B085

loc_71B07E:
and	dword ptr [edi+14h], 0FFFFFCFFh

loc_71B085:
cmp	byte ptr [esp+60h+var_4C], 0
jz	short loc_71B095
or	dword ptr [edi+14h], 8000h
jmp	short loc_71B09C

loc_71B095:
and	dword ptr [edi+14h], 0FFFF7FFFh

loc_71B09C:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
push	1
mov	ecx, esi
setnz	byte ptr [esp+64h+var_4C]
call	sub_6AA450
test	eax, eax
jz	short loc_71B0C2
or	dword ptr [edi+14h], 4000h
jmp	short loc_71B0C9

loc_71B0C2:
and	dword ptr [edi+14h], 0FFFFBFFFh

loc_71B0C9:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_71B0DC
or	dword ptr [edi+14h], 1
jmp	short loc_71B0E0

loc_71B0DC:
and	dword ptr [edi+14h], 0FFFFFFFEh

loc_71B0E0:
push	1
mov	ecx, esi
call	sub_6AA450
test	eax, eax
jz	short loc_71B0F3
or	dword ptr [edi+14h], 2
jmp	short loc_71B0F7

loc_71B0F3:
and	dword ptr [edi+14h], 0FFFFFFFDh

loc_71B0F7:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_71B10D
mov	ecx, esi
call	sub_6A9C60

loc_71B10D:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	bl, [eax+ecx]
mov	edx, [esp+60h+arg_0]
inc	eax
mov	[esi+2Ch], eax
mov	eax, [edx+20h]
mov	eax, [eax+1Ch]
push	eax
mov	ecx, esi
call	sub_6AA650
mov	[edi+18h], eax
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_71B147
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B147:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	ebp, cx
add	eax, 2
mov	ecx, esi
mov	[esi+2Ch], eax
mov	[esp+60h+var_44], ebp
call	sub_6A9880
test	al, al
jz	short loc_71B1F5
mov	eax, [edi+18h]
test	eax, eax
jnz	short loc_71B187
mov	eax, offset aNone ; "(none)"

loc_71B187:
push	ebp
push	eax
push	offset aNameSDGlyphs ; "  Name = %s, %d	glyphs\n"
push	esi
call	nullsub_2
mov	eax, [edi+14h]
mov	ecx, eax
and	ecx, 300h
add	esp, 10h
mov	edx, offset aUnicode ; "Unicode"
cmp	ecx, 200h
jnz	short loc_71B1B6
mov	edx, offset aShiftjis ;	"ShiftJIS"
jmp	short loc_71B1C3

loc_71B1B6:
cmp	ecx, 100h
jnz	short loc_71B1C3
mov	edx, offset aAnsi ; "ANSI"

loc_71B1C3:
movzx	ecx, [esp+60h+var_4D]
shr	eax, 1
and	eax, 1
push	eax
movzx	eax, byte ptr [edi+14h]
and	eax, 1
push	eax
push	edx
push	ecx
push	offset aHaslayoutDCode ; "  HasLayout =	%d, CodePage = %s, Italic"...
push	esi
call	nullsub_2
movzx	edx, bl
push	edx
push	offset aLangcodeD ; "  LangCode	= %d\n"
push	esi
call	nullsub_2
add	esp, 24h

loc_71B1F5:
mov	edi, [esi+2Ch]
mov	eax, [esi+30h]
mov	ebp, [esp+60h+var_44]
mov	ecx, edi
sub	ecx, eax
add	ecx, [esi+34h]
xor	ebx, ebx
cmp	ebp, ebx
mov	[esp+60h+var_38], ecx
mov	[esp+60h+var_1C], ebx
mov	[esp+60h+var_18], ebx
mov	[esp+60h+var_14], ebx
jle	loc_71B2BE
sub	eax, edi
mov	[esi+15h], bl
cmp	byte ptr [esp+60h+var_4C], bl
jz	short loc_71B269
cmp	eax, 4
jge	short loc_71B239
push	4
mov	ecx, esi
call	sub_6A9B70

loc_71B239:
mov	edx, [esi+2Ch]
mov	eax, [esi+3Ch]
movzx	edi, byte ptr [edx+eax+2]
lea	ecx, [edx+eax]
movzx	eax, byte ptr [ecx+3]
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
add	edx, 4
mov	[esi+2Ch], edx
jmp	short loc_71B29C

loc_71B269:
cmp	eax, 2
jge	short loc_71B277
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B277:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, cx

loc_71B29C:
test	eax, eax
jnz	short loc_71B2A8
mov	[esp+60h+var_4E], al
xor	ebp, ebp
jmp	short loc_71B2BE

loc_71B2A8:
lea	edx, [esp+60h+var_30]
push	edx
lea	ecx, [esp+64h+var_1C]
mov	[esp+64h+var_30], eax
call	sub_65EDD0
mov	ebx, [esp+60h+var_18]

loc_71B2BE:
cmp	byte ptr [esp+60h+var_4C], 0
jz	loc_71B3CA
cmp	ebp, 1
jle	loc_71B37B
dec	ebp
mov	[esp+60h+var_3C], ebp
jmp	short loc_71B2E0
align 10h

loc_71B2E0:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_71B2F8
push	4
mov	ecx, esi
call	sub_6A9B70

loc_71B2F8:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+3]
lea	eax, [ecx+edx]
movzx	edx, byte ptr [eax+2]
shl	edi, 8
or	edi, edx
movzx	edx, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	edi, 8
or	edi, edx
shl	edi, 8
add	ecx, 4
lea	ebp, [ebx+1]
or	edi, eax
mov	[esi+2Ch], ecx
cmp	ebp, ebx
jnb	short loc_71B33F
mov	ecx, [esp+60h+var_14]
shr	ecx, 1
cmp	ebp, ecx
jnb	short loc_71B35B
push	ebp
lea	edx, [esp+64h+var_1C]
push	edx
jmp	short loc_71B352

loc_71B33F:
cmp	ebp, [esp+60h+var_14]
jb	short loc_71B35B
mov	eax, ebp
shr	eax, 2
add	eax, ebp
push	eax
lea	ecx, [esp+64h+var_1C]
push	ecx

loc_71B352:
lea	ecx, [esp+68h+var_1C]
call	sub_714BE0

loc_71B35B:
mov	edx, [esp+60h+var_1C]
mov	ebx, ebp
lea	ebp, [edx+ebp*4-4]
mov	[esp+60h+var_18], ebx
test	ebp, ebp
jz	short loc_71B370
mov	[ebp+0], edi

loc_71B370:
sub	[esp+60h+var_3C], 1
jnz	loc_71B2E0

loc_71B37B:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_71B393
push	4
mov	ecx, esi
call	sub_6A9B70

loc_71B393:
mov	edx, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	eax, byte ptr [ecx+edx+3]
movzx	edi, byte ptr [ecx+edx+2]
add	ecx, edx
shl	eax, 8
or	eax, edi
movzx	edi, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
shl	eax, 8
or	eax, edi
shl	eax, 8
or	eax, ecx
add	edx, 4
mov	[esi+2Ch], edx
mov	[esp+60h+var_40], eax
jmp	loc_71B4B2

loc_71B3CA:
cmp	ebp, 1
jle	loc_71B471
dec	ebp
mov	[esp+60h+var_3C], ebp
jmp	short loc_71B3E0
align 10h

loc_71B3E0:
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_71B3F8
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B3F8:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
lea	edi, [ebx+1]
mov	[esi+2Ch], eax
movzx	ebp, cx
cmp	edi, ebx
jnb	short loc_71B436
mov	edx, [esp+60h+var_14]
shr	edx, 1
cmp	edi, edx
jnb	short loc_71B452
push	edi
lea	eax, [esp+64h+var_1C]
push	eax
jmp	short loc_71B449

loc_71B436:
cmp	edi, [esp+60h+var_14]
jb	short loc_71B452
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
lea	edx, [esp+64h+var_1C]
push	edx

loc_71B449:
lea	ecx, [esp+68h+var_1C]
call	sub_714BE0

loc_71B452:
mov	eax, [esp+60h+var_1C]
mov	ebx, edi
lea	edi, [eax+edi*4-4]
mov	[esp+60h+var_18], ebx
test	edi, edi
jz	short loc_71B466
mov	[edi], ebp

loc_71B466:
sub	[esp+60h+var_3C], 1
jnz	loc_71B3E0

loc_71B471:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_71B489
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B489:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
add	eax, 2
mov	[esi+2Ch], eax
mov	[esp+60h+var_40], edx

loc_71B4B2:
mov	ebp, [esp+60h+var_44]
mov	edi, [esp+60h+var_48]
mov	ebx, [edi+24h]
add	edi, 20h
push	ebp
push	edi
mov	ecx, edi
call	sub_717A90
cmp	ebp, ebx
jbe	short loc_71B4EA
mov	eax, [edi]
mov	ecx, ebp
sub	ecx, ebx
lea	eax, [eax+ebx*4]
jz	short loc_71B4EA

loc_71B4D8:
test	eax, eax
jz	short loc_71B4E2
mov	dword ptr [eax], 0

loc_71B4E2:
add	eax, 4
sub	ecx, 1
jnz	short loc_71B4D8

loc_71B4EA:
cmp	[esp+60h+var_4E], 0
jz	loc_71B73D
mov	ecx, [esp+60h+arg_4]
mov	eax, [ecx]
mov	[esp+60h+var_30], 16h
cmp	eax, 30h
jz	short loc_71B50C
mov	[esp+60h+var_30], eax

loc_71B50C:
cmp	[esp+60h+var_4D], 0
jz	short loc_71B543
mov	edi, [esp+60h+var_48]
add	edi, 30h
cmp	ebp, [edi+4]
jnb	short loc_71B52B
mov	edx, [edi+8]
shr	edx, 1
cmp	ebp, edx
jnb	short loc_71B540
push	ebp
jmp	short loc_71B538

loc_71B52B:
cmp	ebp, [edi+8]
jb	short loc_71B540
mov	eax, ebp
shr	eax, 2
add	eax, ebp
push	eax

loc_71B538:
push	edi
mov	ecx, edi
call	sub_6CE350

loc_71B540:
mov	[edi+4], ebp

loc_71B543:
xor	edi, edi
test	ebp, ebp
jle	loc_71B721
mov	[esp+60h+var_3C], edi

loc_71B551:
mov	ebp, [esp+60h+var_1C]
lea	ebx, ds:0[edi*4]
mov	ecx, [ebx+ebp]
add	ecx, [esp+60h+var_38]
push	ecx
mov	ecx, esi
call	sub_6A9D50
inc	edi
cmp	edi, [esp+60h+var_44]
mov	[esp+60h+var_20], edi
jge	short loc_71B583
mov	ebp, [ebx+ebp+4]
mov	edx, [esp+60h+var_1C]
sub	ebp, [edx+ebx]
jmp	short loc_71B58E

loc_71B583:
mov	ebp, [esp+60h+var_40]
mov	eax, [esp+60h+var_1C]
sub	ebp, [eax+ebx]

loc_71B58E:
mov	ecx, [esp+60h+var_34]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	2Ch
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_71B5B9
mov	ecx, edi
call	sub_710C60
mov	dword ptr [edi], offset	off_143F8D8
mov	dword ptr [edi+28h], 0
jmp	short loc_71B5BB

loc_71B5B9:
xor	edi, edi

loc_71B5BB:
mov	ecx, [esp+60h+var_30]
mov	edx, [esp+60h+arg_0]
push	0
push	0
push	ebp
push	ecx
push	edx
mov	ecx, edi
call	sub_7136E0
mov	eax, [esp+60h+var_48]
mov	ebp, [eax+20h]
add	eax, 20h
add	ebp, ebx
test	edi, edi
jz	short loc_71B5E8
mov	ecx, edi
call	sub_70C940

loc_71B5E8:
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_71B5F4
call	sub_70E500

loc_71B5F4:
cmp	[esp+60h+var_4D], 0
mov	[ebp+0], edi
jz	loc_71B703
fldz
mov	eax, [edi]
mov	edx, [eax+14h]
fst	[esp+60h+var_10]
lea	ecx, [esp+60h+var_10]
fst	[esp+60h+var_C]
push	ecx
fst	[esp+64h+var_8]
mov	ecx, edi
fstp	[esp+64h+var_4]
call	edx
fld	[esp+60h+var_8]
fld	[esp+60h+var_10]
mov	eax, [esp+60h+var_48]
mov	ebx, [eax+30h]
fcom	st(1)
add	ebx, [esp+60h+var_3C]
fnstsw	ax
test	ah, 41h
jp	loc_71B6E9
fld	[esp+60h+var_4]
fld	[esp+60h+var_C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_71B6E5
fst	[esp+60h+var_4C]
fld	st(2)
fsubp	st(4), st
fxch	st(3)
fstp	[esp+60h+var_2C]
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+60h+var_24]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
call	__ftol2_sse
fld	[esp+60h+var_4C]
fmul	st, st(1)
mov	[ebx+4], ax
call	__ftol2_sse
fld	[esp+60h+var_2C]
fnstcw	word ptr [esp+60h+var_4C]
mov	[ebx+6], ax
movzx	eax, word ptr [esp+60h+var_4C]
fmul	st, st(1)
or	eax, 0C00h
mov	[esp+60h+var_2C], eax
fldcw	word ptr [esp+60h+var_2C]
fistp	[esp+60h+var_2C]
mov	cx, word ptr [esp+60h+var_2C]
mov	[ebx+8], cx
fldcw	word ptr [esp+60h+var_4C]
fmul	[esp+60h+var_24]
fnstcw	word ptr [esp+60h+var_4C]
movzx	eax, word ptr [esp+60h+var_4C]
or	eax, 0C00h
mov	[esp+60h+var_24], eax
fldcw	word ptr [esp+60h+var_24]
fistp	[esp+60h+var_24]
mov	dx, word ptr [esp+60h+var_24]
fldcw	word ptr [esp+60h+var_4C]
jmp	short loc_71B6FF

loc_71B6E5:
fstp	st
fstp	st(1)

loc_71B6E9:
xor	eax, eax
fstp	st
xor	ecx, ecx
fstp	st
mov	[ebx+6], ax
mov	[ebx+4], cx
xor	edx, edx
mov	[ebx+8], ax

loc_71B6FF:
mov	[ebx+0Ah], dx

loc_71B703:
test	edi, edi
jz	short loc_71B70E
mov	ecx, edi
call	sub_70E500

loc_71B70E:
mov	edi, [esp+60h+var_20]
add	[esp+60h+var_3C], 0Ch
cmp	edi, [esp+60h+var_44]
jl	loc_71B551

loc_71B721:
mov	ecx, [esi+34h]
sub	ecx, [esi+30h]
mov	edx, [esp+60h+var_40]
mov	eax, [esp+60h+var_38]
add	ecx, [esi+2Ch]
add	edx, eax
cmp	edx, ecx
jz	short loc_71B76A
jmp	loc_71BBD8

loc_71B73D:
mov	eax, [esp+60h+var_38]
mov	ecx, [esp+60h+var_40]
lea	edi, [ecx+eax]
mov	ecx, esi
call	sub_6A9860
cmp	edi, eax
jge	loc_71BBD8
push	edi
mov	ecx, esi
call	sub_6A9D50
mov	eax, [esp+60h+var_48]
or	dword ptr [eax+14h], 1000h

loc_71B76A:
mov	ebp, [esp+60h+var_48]
push	esi
mov	ecx, ebp
call	sub_71A890
cmp	[esp+60h+var_4D], 0
jz	loc_71BBD8
mov	eax, [esp+60h+arg_4]
cmp	dword ptr [eax], 4Bh
jnz	short loc_71B792
fld	ds:dword_156F414
jmp	short loc_71B794

loc_71B792:
fld1

loc_71B794:
mov	ecx, [esi+30h]
fstp	[esp+60h+arg_0]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_71B7B0
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B7B0:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+60h+var_20], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+60h+var_20]
fmul	[esp+60h+arg_0]
fstp	dword ptr [ebp+8]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_71B7FC
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B7FC:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+60h+var_20], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+60h+var_20]
fmul	[esp+60h+arg_0]
fstp	dword ptr [ebp+0Ch]
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_71B848
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B848:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+60h+var_20], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+60h+var_20]
mov	ecx, esi
fmul	[esp+60h+arg_0]
fstp	dword ptr [ebp+10h]
call	sub_6A9880
test	al, al
jz	short loc_71B8B0
fld	dword ptr [ebp+10h]
call	__ftol2_sse
fld	dword ptr [ebp+0Ch]
push	eax
call	__ftol2_sse
fld	dword ptr [ebp+8]
push	eax
call	__ftol2_sse
push	eax
push	offset aAscentDDescent ; "  Ascent = %d, Descent = %d, Leading = "...
push	esi
call	nullsub_2
add	esp, 14h

loc_71B8B0:
mov	ebx, [ebp+24h]
cmp	[ebp+34h], ebx
jz	short loc_71B8E4
cmp	ebx, [ebp+34h]
lea	edi, [ebp+30h]
jnb	short loc_71B8CC
mov	eax, [edi+8]
shr	eax, 1
cmp	ebx, eax
jnb	short loc_71B8E1
push	ebx
jmp	short loc_71B8D9

loc_71B8CC:
cmp	ebx, [edi+8]
jb	short loc_71B8E1
mov	ecx, ebx
shr	ecx, 2
add	ecx, ebx
push	ecx

loc_71B8D9:
push	edi
mov	ecx, edi
call	sub_6CE350

loc_71B8E1:
mov	[edi+4], ebx

loc_71B8E4:
mov	eax, [ebp+34h]
test	eax, eax
jbe	short loc_71B950
xor	ebx, ebx
mov	ebp, eax
nop

loc_71B8F0:
mov	edx, [esp+60h+var_48]
mov	eax, [esi+30h]
mov	edi, [edx+30h]
sub	eax, [esi+2Ch]
add	edi, ebx
cmp	eax, 2
mov	byte ptr [esi+15h], 0
jge	short loc_71B911
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B911:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	[esp+60h+var_20], edx
add	eax, 2
add	ebx, 0Ch
sub	ebp, 1
fild	[esp+60h+var_20]
mov	[esi+2Ch], eax
fmul	[esp+60h+arg_0]
fstp	dword ptr [edi]
jnz	short loc_71B8F0
mov	ebp, [esp+60h+var_48]

loc_71B950:
fldz
mov	edi, [ebp+24h]
fst	[esp+60h+var_10]
fst	[esp+60h+var_C]
fst	[esp+60h+var_8]
fstp	[esp+60h+var_4]
test	edi, edi
jbe	short loc_71B981
lea	esp, [esp+0]

loc_71B970:
lea	eax, [esp+60h+var_10]
push	eax
mov	ecx, esi
call	sub_6AABD0
sub	edi, 1
jnz	short loc_71B970

loc_71B981:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_71B999
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71B999:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [eax+edx]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edi, cx
add	eax, 2
mov	ecx, esi
mov	[esi+2Ch], eax
mov	[esp+60h+var_24], edi
call	sub_6A9880
test	al, al
jz	short loc_71B9DC
push	edi
push	offset aKerningcountD ;	"  KerningCount	= %d\n"
push	esi
call	nullsub_2
add	esp, 0Ch

loc_71B9DC:
mov	[esp+60h+var_34], 0
test	edi, edi
jle	loc_71BBD8
lea	esp, [esp+0]

loc_71B9F0:
mov	ecx, [esi+2Ch]
mov	edx, [esp+60h+arg_4]
mov	eax, [esi+30h]
mov	ebx, [edx+8]
add	ebx, [edx+0Ch]
mov	edi, ecx
sub	edi, eax
add	edi, [esi+34h]
cmp	edi, ebx
jge	loc_71BBB3
mov	edx, [ebp+14h]
shr	edx, 0Eh
sub	eax, ecx
mov	byte ptr [esi+15h], 0
test	dl, 1
jz	short loc_71BA8E
cmp	eax, 2
jge	short loc_71BA2E
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71BA2E:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
mov	edx, [esi+30h]
add	eax, 2
sub	edx, eax
cmp	edx, 2
mov	[esi+2Ch], eax
movzx	ebx, cx
mov	byte ptr [esi+15h], 0
jge	short loc_71BA6A
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71BA6A:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
movzx	edi, cx
jmp	short loc_71BAD4

loc_71BA8E:
cmp	eax, 1
jge	short loc_71BA9A
mov	ecx, esi
call	sub_6A9C60

loc_71BA9A:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	cl, [eax+edx]
mov	edx, [esi+30h]
inc	eax
movzx	cx, cl
sub	edx, eax
cmp	edx, 1
mov	[esi+2Ch], eax
movzx	ebx, cx
mov	byte ptr [esi+15h], 0
jge	short loc_71BAC3
mov	ecx, esi
call	sub_6A9C60

loc_71BAC3:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
movzx	dx, cl
inc	eax
movzx	edi, dx

loc_71BAD4:
mov	[esi+2Ch], eax
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_71BAEF
push	2
mov	ecx, esi
call	sub_6A9B70

loc_71BAEF:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+60h+var_20], edx
add	eax, 2
mov	ecx, esi
fild	[esp+60h+var_20]
mov	[esi+2Ch], eax
mov	word ptr [esp+60h+var_38], bx
mov	word ptr [esp+60h+var_38+2], di
fmul	[esp+60h+arg_0]
fstp	[esp+60h+var_30]
call	sub_6A9880
test	al, al
jz	short loc_71BB59
fld	[esp+60h+var_30]
call	__ftol2_sse
push	eax
movzx	eax, di
push	eax
movzx	ecx, bx
push	ecx
push	offset aPairDDAdjD ; "	   Pair: %d - %d,\tadj = %d\n"
push	esi
call	nullsub_2
add	esp, 14h

loc_71BB59:
lea	edx, [esp+60h+var_38]
lea	eax, [esp+60h+var_30]
mov	[esp+60h+var_2C], edx
mov	[esp+60h+var_28], eax
lea	ecx, [ebp+3Ch]
mov	eax, 4
mov	edx, 1505h
jmp	short loc_71BB80
align 10h

loc_71BB80:
movzx	edi, byte ptr [esp+eax+60h+var_3C+3]
imul	edx, 1003Fh
dec	eax
add	edx, edi
test	eax, eax
ja	short loc_71BB80
push	edx
lea	edx, [esp+64h+var_2C]
push	edx
push	ecx
call	sub_71A420
mov	eax, [esp+60h+var_34]
inc	eax
cmp	eax, [esp+60h+var_24]
mov	[esp+60h+var_34], eax
jl	loc_71B9F0
jmp	short loc_71BBD8

loc_71BBB3:
mov	eax, [ebp+18h]
test	eax, eax
jnz	short loc_71BBBF
mov	eax, offset aNoname_0 ;	"<noname>"

loc_71BBBF:
push	eax
mov	eax, [esi+18h]
and	eax, 0FFFFFFFCh
add	eax, 8
push	eax
push	offset aErrorCorrupt_0 ; "Error: Corrupted file	%s, kerning table"...
push	esi
call	sub_680970
add	esp, 10h

loc_71BBD8:
mov	ecx, dword_1855FC0
mov	eax, [esp+60h+var_1C]
mov	edx, [ecx]
mov	edx, [edx+30h]
push	eax
call	edx

loc_71BBEA:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 50h
retn	8
sub_71ACA0 endp

align 10h



sub_71BC00 proc	near

var_20=	qword ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_4]
mov	eax, [ebp+4]
push	esi
push	edi
mov	edi, ecx
mov	ecx, [ebp+0]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+18h]
call	eax
mov	esi, eax
mov	[esp+14h+arg_4], esi
test	esi, esi
jz	loc_71BD20
fild	dword ptr [edi+0Ch]
mov	edx, [esi]
push	ebx
push	ecx
fdivr	ds:dbl_1440110
lea	eax, [edi+100h]
mov	ecx, esi
fmul	ds:dbl_15FCC48
fstp	[esp+1Ch+var_8]
fld	[esp+1Ch+var_8]
fstp	dword ptr [esp+1Ch+var_20+4]
push	eax
mov	eax, [edx+18h]
call	eax
lea	ebx, [edi+94h]
mov	ecx, ebx
mov	[esp+18h+var_4], ebx
call	sub_750140
fild	dword ptr [edi+0Ch]
push	0FFFFFFFFh	; int
push	ecx		; float
fdiv	ds:dbl_1440110
lea	eax, [edi+100h]
mov	ecx, ebx
fstp	[esp+20h+var_8]
fld	[esp+20h+var_8]
fstp	dword ptr [esp+20h+var_20]
push	eax		; int
call	sub_750D50
mov	ecx, ebx
call	sub_7508A0
test	al, al
jz	loc_71BD18
mov	esi, [edi+0ECh]
fld	dword ptr [ebp+10h]
sub	esi, [edi+0E4h]
mov	edi, [edi+10h]
sub	esp, 8
fstp	[esp+20h+var_20]
inc	esi
call	_floor
fstp	[esp+20h+var_8]
fld	[esp+20h+var_8]
call	__ftol2_sse
fld	dword ptr [ebp+14h]
mov	ebx, eax
fstp	[esp+20h+var_20]
add	ebx, edi
call	_floor
fstp	[esp+20h+var_8]
fld	[esp+20h+var_8]
add	esp, 8
call	__ftol2_sse
mov	ebp, eax
add	ebp, edi
xor	edi, edi
test	esi, esi
jbe	short loc_71BD14

loc_71BCF2:
mov	eax, [esp+18h+arg_0]
lea	ecx, [edi+ebp]
imul	ecx, [eax+18h]
add	ecx, [eax+1Ch]
push	1		; size_t
add	ecx, ebx
push	ecx		; int
mov	ecx, [esp+20h+var_4]
push	edi		; int
call	sub_74FE60
inc	edi
cmp	edi, esi
jb	short loc_71BCF2

loc_71BD14:
mov	esi, [esp+18h+arg_4]

loc_71BD18:
mov	ecx, esi
call	sub_70E500
pop	ebx

loc_71BD20:
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	8
sub_71BC00 endp

align 10h



sub_71BD30 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
mov	eax, [eax+10h]
mov	[esp+10h+var_10], 30h
test	eax, eax
jz	short loc_71BD60
mov	ecx, [eax+8]
mov	edx, [eax+0Ch]
mov	[esp+10h+var_10], ecx
mov	ecx, [eax+10h]
mov	[esp+10h+var_C], edx
mov	edx, [eax+14h]
mov	[esp+10h+var_8], ecx
mov	[esp+10h+var_4], edx

loc_71BD60:
fild	[esp+10h+var_10]
fmul	ds:dbl_1440118
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
add	esp, 10h
retn	4
sub_71BD30 endp

align 10h



sub_71BD80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_71BDD1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_71BDB0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_71BDCA

loc_71BDB0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_71BDCA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_71BDD1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0C00h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_71BD80 endp

align 10h



sub_71BE00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_71BE51
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_71BE30
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_71BE4A

loc_71BE30:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_71BE4A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_71BE51:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	100h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_71BE00 endp

align 10h



sub_71BE80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [ecx]
push	ebx
mov	ebx, [esp+8+arg_4]
push	esi
lea	eax, [ebx+ebx*2]
cmp	dword ptr [edx+eax*8+8], 0FFFFFFFEh
lea	esi, [edx+eax*8+8]
push	edi
mov	[esp+10h+var_4], ecx
mov	edi, ebx
jz	short loc_71BEF2
cmp	[esi+4], ebx
jnz	short loc_71BEF2
push	ebp
mov	ebp, [esp+14h+arg_0]

loc_71BEA8:
cmp	[esi+4], ebx
jnz	short loc_71BECB
mov	eax, [esi+8]
cmp	eax, [ebp+0]
jnz	short loc_71BECB
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	eax, [ebp+4]
mov	edx, [edx+20h]
push	eax
call	edx
test	al, al
jnz	short loc_71BEDD
mov	ecx, [esp+14h+var_4]

loc_71BECB:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_71BEE7
mov	edx, [ecx]
lea	eax, [edi+edi*2]
lea	esi, [edx+eax*8+8]
jmp	short loc_71BEA8

loc_71BEDD:
pop	ebp
mov	eax, edi
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_71BEE7:
pop	ebp
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
pop	ecx
retn	8

loc_71BEF2:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
pop	ecx
retn	8
sub_71BE80 endp

align 10h



sub_71BF00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, ecx
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
fld	dword ptr [ecx+14h]
fstp	[esp+8+arg_0]
fld	dword ptr [ecx+18h]
fstp	[esp+8+var_8]
fld	dword ptr [ecx+1Ch]
fstp	[esp+8+var_4]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+10h]
fld	[esp+8+arg_0]
fstp	dword ptr [eax+14h]
fld	[esp+8+var_8]
fstp	dword ptr [eax+18h]
fld	[esp+8+var_4]
fstp	dword ptr [eax+1Ch]
fld	dword ptr [ecx+24h]
fstp	[esp+8+arg_0]
fld	dword ptr [ecx+20h]
fstp	dword ptr [eax+20h]
fld	[esp+8+arg_0]
fstp	dword ptr [eax+24h]
add	esp, 8
retn	4
sub_71BF00 endp

align 10h


; Attributes: bp-based frame

sub_71BF70 proc	near

var_C8=	qword ptr -0C8h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	qword ptr -70h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 0B4h
cmp	[ebp+arg_4], 0
push	ebx
push	esi
mov	ebx, ecx
push	edi
mov	[esp+0C0h+var_34], ebx
mov	[esp+0C0h+var_7C], 0
jbe	loc_71C550

loc_71BF9A:
mov	eax, [ebp+arg_0]
xor	edi, edi
xor	ecx, ecx
xor	edx, edx
mov	[esp+0C0h+var_90], ecx
mov	[esp+0C0h+var_8C], edx
cmp	[eax+4], edi
jbe	loc_71C0D3
mov	[esp+0C0h+var_88], edi
jmp	short loc_71BFC0
align 10h

loc_71BFC0:
mov	esi, [eax]
add	esi, [esp+0C0h+var_88]
mov	eax, [esp+0C0h+var_7C]
cmp	[esi+0Ch], eax
jnz	loc_71C0B9
fld	dword ptr [esi+18h]
sub	esp, 8
fstp	[esp+0C8h+var_94]
fld	[esp+0C8h+var_94]
fstp	[esp+0C8h+var_C8]
call	_ceil
fstp	[esp+0C8h+var_94]
add	esp, 8
fld	[esp+0C0h+var_94]
call	__ftol2_sse
cmp	eax, [esp+0C0h+var_90]
jle	short loc_71C046
fld	dword ptr [esi+18h]
sub	esp, 8
fstp	[esp+0C8h+var_90]
fld	[esp+0C8h+var_90]
fstp	[esp+0C8h+var_C8]
call	_ceil
fnstcw	word ptr [esp+0C8h+var_94]
add	esp, 8
movzx	eax, word ptr [esp+0C0h+var_94]
fstp	[esp+0C0h+var_90]
fld	[esp+0C0h+var_90]
or	eax, 0C00h
mov	[esp+0C0h+var_90], eax
fldcw	word ptr [esp+0C0h+var_90]
fistp	[esp+0C0h+var_70]
mov	ecx, dword ptr [esp+0C0h+var_70]
mov	[esp+0C0h+var_90], ecx
fldcw	word ptr [esp+0C0h+var_94]

loc_71C046:
fld	dword ptr [esi+1Ch]
sub	esp, 8
fstp	[esp+0C8h+var_94]
fld	[esp+0C8h+var_94]
fstp	[esp+0C8h+var_C8]
call	_ceil
fstp	[esp+0C8h+var_94]
add	esp, 8
fld	[esp+0C0h+var_94]
call	__ftol2_sse
cmp	eax, [esp+0C0h+var_8C]
jle	short loc_71C0B9
fld	dword ptr [esi+1Ch]
sub	esp, 8
fstp	[esp+0C8h+var_8C]
fld	[esp+0C8h+var_8C]
fstp	[esp+0C8h+var_C8]
call	_ceil
fnstcw	word ptr [esp+0C8h+var_94]
add	esp, 8
movzx	eax, word ptr [esp+0C0h+var_94]
fstp	[esp+0C0h+var_8C]
fld	[esp+0C0h+var_8C]
or	eax, 0C00h
mov	[esp+0C0h+var_8C], eax
fldcw	word ptr [esp+0C0h+var_8C]
fistp	[esp+0C0h+var_70]
mov	edx, dword ptr [esp+0C0h+var_70]
mov	[esp+0C0h+var_8C], edx
fldcw	word ptr [esp+0C0h+var_94]

loc_71C0B9:
mov	eax, [ebp+arg_0]
add	[esp+0C0h+var_88], 28h
inc	edi
cmp	edi, [eax+4]
jb	loc_71BFC0
mov	edx, [esp+0C0h+var_8C]
mov	ecx, [esp+0C0h+var_90]

loc_71C0D3:
mov	eax, [ebx+14h]
mov	esi, [ebx+18h]
mov	[esp+0C0h+var_94], eax
shr	eax, 1
cmp	ecx, eax
ja	short loc_71C0FE
mov	[esp+0C0h+var_94], 1
cmp	ecx, 1
jbe	short loc_71C0FE

loc_71C0F0:
mov	eax, [esp+0C0h+var_94]
add	eax, eax
mov	[esp+0C0h+var_94], eax
cmp	eax, ecx
jb	short loc_71C0F0

loc_71C0FE:
mov	eax, esi
shr	eax, 1
cmp	edx, eax
ja	short loc_71C116
mov	esi, 1
cmp	edx, esi
jbe	short loc_71C116
nop

loc_71C110:
add	esi, esi
cmp	esi, edx
jb	short loc_71C110

loc_71C116:
mov	ecx, [ebx+2Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_71C13F
mov	ecx, [esp+0C0h+var_94]
push	esi
push	ecx
push	9
mov	ecx, eax
call	sub_73D620
mov	edi, eax
mov	[esp+0C0h+var_8C], edi
jmp	short loc_71C14B

loc_71C13F:
mov	[esp+0C0h+var_8C], 0
mov	edi, [esp+0C0h+var_8C]

loc_71C14B:
imul	esi, [esp+0C0h+var_94]
mov	edx, [edi+1Ch]
push	esi		; size_t
push	0		; int
push	edx		; void *
call	_memset
mov	eax, [ebp+arg_0]
xor	edx, edx
add	esp, 0Ch
xor	esi, esi
cmp	[eax+4], edx
jbe	short loc_71C198
mov	[esp+0C0h+var_90], edx
nop

loc_71C170:
mov	eax, [eax]
add	eax, [esp+0C0h+var_90]
mov	ecx, [esp+0C0h+var_7C]
cmp	[eax+0Ch], ecx
jnz	short loc_71C18A
push	eax
push	edi
mov	ecx, ebx
call	sub_71BC00
xor	edx, edx

loc_71C18A:
mov	eax, [ebp+arg_0]
add	[esp+0C0h+var_90], 28h
inc	esi
cmp	esi, [eax+4]
jb	short loc_71C170

loc_71C198:
mov	eax, [edi+10h]
fild	dword ptr [edi+10h]
test	eax, eax
jge	short loc_71C1A8
fadd	ds:flt_15FCC08

loc_71C1A8:
fld1
mov	ecx, [edi+14h]
fld	st
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+0C0h+var_3C]
fild	dword ptr [edi+14h]
test	ecx, ecx
jge	short loc_71C1C7
fadd	ds:flt_15FCC08

loc_71C1C7:
mov	eax, [ebx+1Ch]
fdivp	st(1), st
mov	ecx, [eax]
mov	dword ptr [esp+0C0h+var_70], ecx
inc	ecx
mov	[eax], ecx
mov	ecx, [ebx+24h]
mov	eax, 1
mov	[esp+0C0h+var_30], eax
mov	[esp+0C0h+var_24], eax
mov	eax, [ebx+28h]
mov	[esp+0C0h+var_28], edx
mov	[esp+0C0h+var_1C], edx
mov	[esp+0C0h+var_14], eax
mov	eax, [ebx+2Ch]
mov	[esp+0C0h+var_10], edx
mov	dword ptr [esp+0C0h+var_C], edx
mov	dl, [ebx+14Ch]
mov	[esp+0C0h+var_18], ecx
mov	ecx, [ebx+20h]
mov	[esp+0C0h+var_4], dl
mov	[esp+0C0h+var_8], eax
mov	[esp+0C0h+var_20], edi
mov	[esp+0C0h+var_2C], 3
mov	edx, [ecx]
mov	edx, [edx+4]
lea	eax, [esp+0C0h+var_30]
push	eax
fstp	[esp+0C4h+var_38]
call	edx
mov	ecx, [ebx+2Ch]
mov	[esp+0C0h+var_88], eax
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	1Ch
call	edx
mov	esi, eax
xor	eax, eax
cmp	esi, eax
jz	short loc_71C2C0
mov	dword ptr [esi], offset	off_1436C18
mov	dword ptr [esi+4], 1
mov	[esi+8], eax
mov	dword ptr [esi], offset	off_143EF08
lea	ecx, [esi+10h]
mov	[esi+0Ch], eax
call	??0DNameNode@@IAE@XZ_2 ; DNameNode::DNameNode(void)
mov	eax, [esp+0C0h+var_88]
test	eax, eax
jz	short loc_71C2A0
inc	dword ptr [eax+4]

loc_71C2A0:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_71C2B0
call	sub_64A400
mov	eax, [esp+0C0h+var_88]

loc_71C2B0:
mov	[esi+0Ch], eax
mov	dword ptr [esi+18h], 3
mov	[esp+0C0h+var_94], esi
jmp	short loc_71C2C8

loc_71C2C0:
mov	[esp+0C0h+var_94], eax
mov	eax, [esp+0C0h+var_88]

loc_71C2C8:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+4], 0
mov	[esp+0C0h+var_90], 0
jbe	loc_71C51B
xor	edi, edi
nop

loc_71C2E0:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
fld	dword ptr [eax+edi+10h]
mov	ecx, [eax+edi]
fstp	[esp+0C0h+var_74]
mov	edx, [eax+edi+4]
fld	dword ptr [eax+edi+14h]
mov	[esp+0C0h+var_64], ecx
fstp	[esp+0C0h+var_78]
mov	ecx, [eax+edi+8]
fld	dword ptr [eax+edi+18h]
mov	[esp+0C0h+var_60], edx
fstp	[esp+0C0h+var_84]
mov	edx, [eax+edi+0Ch]
fld	dword ptr [eax+edi+1Ch]
mov	[esp+0C0h+var_5C], ecx
fstp	[esp+0C0h+var_80]
mov	[esp+0C0h+var_58], edx
fld	[esp+0C0h+var_74]
fstp	[esp+0C0h+var_54]
fld	[esp+0C0h+var_78]
fstp	[esp+0C0h+var_50]
fld	[esp+0C0h+var_84]
fstp	[esp+0C0h+var_4C]
fld	[esp+0C0h+var_80]
fstp	[esp+0C0h+var_48]
fld	dword ptr [eax+edi+20h]
fstp	[esp+0C0h+var_80]
fld	dword ptr [eax+edi+24h]
fstp	[esp+0C0h+var_84]
fld	[esp+0C0h+var_80]
fstp	[esp+0C0h+var_44]
fld	[esp+0C0h+var_84]
fstp	[esp+0C0h+var_40]
cmp	ecx, 0FFFFFFFFh
jz	short loc_71C3D7
lea	ecx, [ecx+ecx*4]
fld	dword ptr [eax+ecx*8+10h]
lea	eax, [eax+ecx*8]
fstp	[esp+0C0h+var_80]
mov	edx, [eax+0Ch]
fld	dword ptr [eax+14h]
mov	[esp+0C0h+var_58], edx
fstp	[esp+0C0h+var_84]
fld	dword ptr [eax+18h]
fstp	[esp+0C0h+var_78]
fld	dword ptr [eax+1Ch]
fstp	[esp+0C0h+var_74]
fld	[esp+0C0h+var_80]
fstp	[esp+0C0h+var_54]
fld	[esp+0C0h+var_84]
fstp	[esp+0C0h+var_50]
fld	[esp+0C0h+var_78]
fstp	[esp+0C0h+var_4C]
fld	[esp+0C0h+var_74]
fstp	[esp+0C0h+var_48]
fld	dword ptr [eax+20h]
fstp	[esp+0C0h+var_80]
fld	dword ptr [eax+24h]
fstp	[esp+0C0h+var_84]
fld	[esp+0C0h+var_80]
fstp	[esp+0C0h+var_44]
fld	[esp+0C0h+var_84]
fstp	[esp+0C0h+var_40]

loc_71C3D7:
cmp	edx, [esp+0C0h+var_7C]
jnz	loc_71C4FB
mov	ecx, [ebx+2Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
xor	esi, esi
push	esi
push	28h
call	eax
cmp	eax, esi
jz	short loc_71C41D
fldz
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_143DF54
mov	[eax+8], esi
mov	[eax+0Ch], esi
fst	dword ptr [eax+10h]
fst	dword ptr [eax+14h]
mov	esi, eax
fst	dword ptr [eax+18h]
fstp	dword ptr [eax+1Ch]

loc_71C41D:
mov	ebx, [esp+0C0h+var_94]
test	ebx, ebx
jz	short loc_71C42C
mov	ecx, ebx
call	sub_64A420

loc_71C42C:
cmp	dword ptr [esi+8], 0
jnz	short loc_71C43E
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_71C43E
call	sub_666B00

loc_71C43E:
fld	[esp+0C0h+var_54]
mov	dword ptr [esi+8], 0
fld	[esp+0C0h+var_3C]
mov	[esi+0Ch], ebx
fld	st
mov	ecx, [esp+0C0h+var_64]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+10h]
fld	[esp+0C0h+var_50]
fld	[esp+0C0h+var_38]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+14h]
fld	[esp+0C0h+var_4C]
fmul	st, st(2)
fstp	dword ptr [esi+18h]
fld	[esp+0C0h+var_48]
fmul	st, st(1)
fstp	dword ptr [esi+1Ch]
fld	[esp+0C0h+var_44]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+20h]
fmul	[esp+0C0h+var_40]
fstp	dword ptr [esi+24h]
mov	ebx, [ecx+10h]
mov	ecx, [esp+0C0h+var_94]
test	ecx, ecx
jz	short loc_71C4AB
call	sub_64A420

loc_71C4AB:
cmp	dword ptr [esi+8], 0
jnz	short loc_71C4BD
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_71C4BD
call	sub_666B00

loc_71C4BD:
mov	eax, [esp+0C0h+var_60]
mov	edx, [esp+0C0h+var_94]
push	esi
push	eax
mov	ecx, ebx
mov	dword ptr [esi+8], 0
mov	[esi+0Ch], edx
call	sub_71A550
mov	ecx, [esp+0C0h+var_94]
mov	edx, dword ptr [esp+0C0h+var_70]
push	ecx
push	ecx
mov	eax, esp
mov	ecx, ebx
mov	[eax], edx
call	sub_71ABB0
mov	ecx, esi
call	sub_64A400
mov	ebx, [esp+0C0h+var_34]

loc_71C4FB:
mov	eax, [esp+0C0h+var_90]
mov	ecx, [ebp+arg_0]
inc	eax
add	edi, 28h
mov	[esp+0C0h+var_90], eax
cmp	eax, [ecx+4]
jb	loc_71C2E0
mov	edi, [esp+0C0h+var_8C]
mov	eax, [esp+0C0h+var_88]

loc_71C51B:
mov	ecx, [esp+0C0h+var_94]
test	ecx, ecx
jz	short loc_71C52C
call	sub_666B00
mov	eax, [esp+0C0h+var_88]

loc_71C52C:
test	eax, eax
jz	short loc_71C537
mov	ecx, eax
call	sub_64A400

loc_71C537:
mov	ecx, edi
call	sub_64A400
mov	eax, [esp+0C0h+var_7C]
inc	eax
mov	[esp+0C0h+var_7C], eax
cmp	eax, [ebp+arg_4]
jb	loc_71BF9A

loc_71C550:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_71BF70 endp

align 10h



sub_71C560 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_71C574
push	edi
call	sub_71BD80

loc_71C574:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+8+arg_0]
lea	eax, [eax+edx*4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
mov	[eax+8], ecx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_71C560 endp

align 10h



sub_71C5B0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_71C5CE
call	sub_7419C0
pop	edi
add	esp, 0Ch
retn	8

loc_71C5CE:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_71C5DC
mov	esi, 8
jmp	short loc_71C641

loc_71C5DC:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_71C5EF
fadd	ds:flt_15FCC08

loc_71C5EF:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_71C641:
mov	ecx, dword_1855FC0
mov	ebp, [esp+18h+arg_0]
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*8]
mov	[esp+1Ch+arg_4], 0
mov	dword ptr [esp+1Ch+var_8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+18h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_71C6A4
xor	eax, eax
lea	ecx, [ecx+0]

loc_71C690:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 18h
sub	esi, 1
jnz	short loc_71C690

loc_71C6A4:
mov	eax, [edi]
test	eax, eax
jz	short loc_71C707
mov	eax, [eax+4]
push	ebx
xor	edi, edi
lea	ebx, [eax+1]

loc_71C6B3:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_71C6E6
mov	ecx, [esi+8]
lea	eax, [esi+8]
mov	edx, ecx
shr	edx, 6
xor	edx, [eax+8]
xor	edx, ecx
push	edx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_71CBF0
mov	dword ptr [esi], 0FFFFFFFEh

loc_71C6E6:
add	edi, 18h
sub	ebx, 1
jnz	short loc_71C6B3
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_71C707:
mov	ecx, [esp+18h+arg_4]
pop	esi
pop	ebp
mov	[edi], ecx
pop	edi
add	esp, 0Ch
retn	8
sub_71C5B0 endp

align 10h



sub_71C720 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= qword ptr  4
arg_8= dword ptr  0Ch

mov	edx, dword ptr [esp+arg_0]
sub	esp, 0Ch
test	edx, edx
jz	short loc_71C75D
mov	eax, dword ptr [esp+0Ch+arg_0+4]
test	eax, eax
jz	short loc_71C75D
cmp	edx, [ecx]
ja	short loc_71C75D
cmp	eax, [ecx+4]
ja	short loc_71C75D
mov	dword ptr [esp+0Ch+var_C], edx
mov	dword ptr [esp+0Ch+var_C+4], eax
mov	eax, [esp+0Ch+arg_8]
lea	edx, [esp+0Ch+var_C]
push	edx
add	ecx, 14h
mov	[esp+10h+var_4], eax
call	sub_71C560
add	esp, 0Ch
retn	0Ch

loc_71C75D:
push	esi
lea	esi, [ecx+54h]
push	edi
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_71C774
push	edi
mov	ecx, esi
call	sub_71BE00

loc_71C774:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	eax, [esp+14h+arg_8]
and	ecx, 3Fh
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
pop	edi
pop	esi
add	esp, 0Ch
retn	0Ch
sub_71C720 endp



; Attributes: bp-based frame

sub_71C790 proc	near

var_90=	qword ptr -90h
var_88=	qword ptr -88h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_20=	qword ptr -20h
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 74h
mov	eax, [ebp+arg_4]
push	ebx
push	esi
xor	esi, esi
push	edi
mov	edi, ecx
lea	ebx, [edi+30h]
mov	[esp+80h+var_2C], edi
mov	[ebx+14h], esi
mov	[ebx+24h], esi
mov	[ebx+34h], esi
mov	[ebx+44h], esi
mov	[ebx+54h], esi
mov	[esp+80h+var_38], eax
cmp	eax, [ebp+arg_8]
jnb	loc_71C8FA
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
add	eax, eax
mov	[esp+80h+var_34], eax

loc_71C7D3:
mov	ecx, [ebp+arg_0]
mov	esi, [ecx]
add	esi, eax
cmp	dword ptr [esi+8], 0FFFFFFFFh
jnz	loc_71C8DF
fld	dword ptr [esi+18h]
sub	esp, 8
fstp	[esp+88h+var_30]
fld	[esp+88h+var_30]
fstp	[esp+88h+var_88]
call	_ceil
fstp	[esp+88h+var_30]
fld	[esp+88h+var_30]
fstp	dword ptr [esp+88h+var_28]
fld	dword ptr [esi+10h]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esi+1Ch]
fstp	[esp+88h+var_30]
fld	[esp+88h+var_30]
fstp	[esp+88h+var_88]
call	_ceil
mov	edx, [esp+88h+var_38]
fstp	[esp+88h+var_30]
fld	[esp+88h+var_30]
add	esp, 8
fstp	[esp+80h+var_30]
push	edx
fld	[esp+84h+var_30]
sub	esp, 8
fld	dword ptr [esi+14h]
fstp	[esp+8Ch+var_90+4]
fstp	[esp+8Ch+var_8]
call	_floor
fstp	[esp+8Ch+var_30]
add	esp, 8
fld	[esp+84h+var_30]
fsubr	[esp+84h+var_8]
fnstcw	word ptr [esp+84h+var_3C]
movzx	eax, word ptr [esp+84h+var_3C]
or	eax, 0C00h
mov	[esp+84h+var_30], eax
fldcw	word ptr [esp+84h+var_30]
fistp	[esp+84h+var_8]
mov	eax, dword ptr [esp+84h+var_8]
push	eax
sub	esp, 8
fldcw	word ptr [esp+90h+var_3C]
fld	dword ptr [esp+90h+var_28]
fld	dword ptr [esp+90h+var_20]
fstp	[esp+90h+var_90]
fstp	[esp+90h+var_8]
call	_floor
fnstcw	word ptr [esp+90h+var_3C]
add	esp, 8
movzx	eax, word ptr [esp+88h+var_3C]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
or	eax, 0C00h
fsubr	[esp+88h+var_8]
mov	dword ptr [esp+88h+var_20], eax
fldcw	word ptr [esp+88h+var_20]
fistp	[esp+88h+var_8]
mov	ecx, dword ptr [esp+88h+var_8]
push	ecx
mov	ecx, ebx
fldcw	word ptr [esp+8Ch+var_3C]
call	sub_71C720
mov	eax, [esp+80h+var_34]

loc_71C8DF:
mov	ecx, [esp+80h+var_38]
inc	ecx
add	eax, 28h
mov	[esp+80h+var_38], ecx
mov	[esp+80h+var_34], eax
cmp	ecx, [ebp+arg_8]
jb	loc_71C7D3
xor	esi, esi

loc_71C8FA:
mov	ecx, ebx
call	sub_7516D0
xor	ecx, ecx
mov	[esp+80h+var_38], ecx
cmp	[edi+64h], esi
jbe	loc_71CAF5

loc_71C910:
mov	eax, [edi+70h]
mov	edx, ecx
shr	edx, 4
mov	edx, [eax+edx*4]
mov	ebx, ecx
and	ebx, 0Fh
lea	eax, [edx+ebx*8]
mov	[esp+80h+var_30], eax
mov	[esp+80h+var_34], esi
cmp	[eax+4], esi
jbe	loc_71CAE7
mov	edx, [ebp+arg_C]
add	ecx, edx
mov	dword ptr [esp+80h+var_8], ecx
jmp	short loc_71C944
align 10h

loc_71C940:
mov	eax, [esp+80h+var_30]

loc_71C944:
mov	eax, [eax]
add	eax, [esp+80h+var_34]
mov	edx, [edi+60h]
mov	ecx, eax
and	eax, 0FFh
shr	ecx, 8
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
lea	edi, [ecx+eax*4]
mov	eax, [edi+8]
lea	edx, [eax+eax*4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
fld	dword ptr [ecx+edx*8+18h]
lea	esi, [ecx+edx*8]
fstp	dword ptr [esp+80h+var_20]
sub	esp, 8
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	dword ptr [esp+88h+var_28]
fld	dword ptr [esi+10h]
fstp	[esp+88h+var_3C]
fld	dword ptr [esi+1Ch]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	[esp+88h+var_88]
call	_ceil
mov	edx, [edi]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
fstp	dword ptr [esp+88h+var_18]
fld	dword ptr [esi+14h]
fstp	dword ptr [esp+88h+var_10]
fild	dword ptr [edi]
test	edx, edx
jge	short loc_71C9CC
fadd	ds:flt_15FCC08

loc_71C9CC:
fsub	dword ptr [esi+10h]
lea	ebx, [edi+4]
fstp	dword ptr [esi+20h]
mov	eax, [ebx]
fild	dword ptr [ebx]
test	eax, eax
jge	short loc_71C9E3
fadd	ds:flt_15FCC08

loc_71C9E3:
fsub	dword ptr [esi+14h]
fstp	dword ptr [esi+24h]
mov	ecx, [edi]
fild	dword ptr [edi]
test	ecx, ecx
jge	short loc_71C9F7
fadd	ds:flt_15FCC08

loc_71C9F7:
fstp	dword ptr [esi+10h]
mov	edx, [ebx]
fild	dword ptr [ebx]
test	edx, edx
jge	short loc_71CA08
fadd	ds:flt_15FCC08

loc_71CA08:
fstp	dword ptr [esi+14h]
fld	dword ptr [esp+88h+var_28]
fld	[esp+88h+var_3C]
fstp	[esp+88h+var_88]
fstp	[esp+88h+var_28]
call	_floor
fnstcw	word ptr [esp+88h+var_3C]
movzx	eax, word ptr [esp+88h+var_3C]
fstp	dword ptr [esp+88h+var_20]
fld	dword ptr [esp+88h+var_20]
or	eax, 0C00h
fsubr	[esp+88h+var_28]
mov	dword ptr [esp+88h+var_20], eax
fldcw	word ptr [esp+88h+var_20]
fistp	[esp+88h+var_20]
mov	eax, dword ptr [esp+88h+var_20]
add	eax, [edi]
fldcw	word ptr [esp+88h+var_3C]
mov	dword ptr [esp+88h+var_20], eax
fild	dword ptr [esp+88h+var_20]
test	eax, eax
jge	short loc_71CA61
fadd	ds:flt_15FCC08

loc_71CA61:
fstp	dword ptr [esi+18h]
fld	dword ptr [esp+88h+var_18]
fld	dword ptr [esp+88h+var_10]
fstp	[esp+88h+var_88]
fstp	[esp+88h+var_18]
call	_floor
fnstcw	word ptr [esp+88h+var_3C]
add	esp, 8
movzx	eax, word ptr [esp+80h+var_3C]
fstp	dword ptr [esp+80h+var_10]
fld	dword ptr [esp+80h+var_10]
or	eax, 0C00h
fsubr	[esp+80h+var_18]
mov	dword ptr [esp+80h+var_10], eax
fldcw	word ptr [esp+80h+var_10]
fistp	[esp+80h+var_10]
mov	ecx, dword ptr [esp+80h+var_10]
add	ecx, [ebx]
fldcw	word ptr [esp+80h+var_3C]
mov	dword ptr [esp+80h+var_10], ecx
fild	dword ptr [esp+80h+var_10]
test	ecx, ecx
jge	short loc_71CABD
fadd	ds:flt_15FCC08

loc_71CABD:
mov	eax, [esp+80h+var_34]
fstp	dword ptr [esi+1Ch]
mov	edx, dword ptr [esp+80h+var_8]
mov	ecx, [esp+80h+var_30]
mov	edi, [esp+80h+var_2C]
inc	eax
mov	[esi+0Ch], edx
mov	[esp+80h+var_34], eax
cmp	eax, [ecx+4]
jb	loc_71C940
mov	ecx, [esp+80h+var_38]
xor	esi, esi

loc_71CAE7:
inc	ecx
mov	[esp+80h+var_38], ecx
cmp	ecx, [edi+64h]
jb	loc_71C910

loc_71CAF5:
mov	eax, [edi+64h]
add	eax, [ebp+arg_C]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_71C790 endp

align 10h



sub_71CB10 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
mov	ecx, [ebx+8]
xor	eax, eax
cmp	[ecx+1Ch], al
jz	short loc_71CB7E
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, 1
xor	ecx, ecx
cmp	[esi+4], edi
jbe	short loc_71CB6A
mov	edx, 28h
mov	[esp+0Ch+arg_0], edx
push	ebp
lea	esp, [esp+0]

loc_71CB40:
mov	ebp, [esi]
add	edx, ebp
mov	ebp, [edx-28h]
cmp	ebp, [edx]
jz	short loc_71CB58
push	eax
push	edi
push	ecx
push	esi
mov	ecx, ebx
call	sub_71C790
mov	ecx, edi

loc_71CB58:
mov	edx, [esp+10h+arg_0]
inc	edi
add	edx, 28h
mov	[esp+10h+arg_0], edx
cmp	edi, [esi+4]
jb	short loc_71CB40
pop	ebp

loc_71CB6A:
mov	edx, [esi+4]
push	eax
push	edx
push	ecx
push	esi
mov	ecx, ebx
call	sub_71C790
pop	edi
pop	esi
pop	ebx
retn	4

loc_71CB7E:
mov	eax, [esp+4+arg_0]
mov	ecx, [eax+4]
push	0
push	ecx
push	0
push	eax
mov	ecx, ebx
call	sub_71C790
pop	ebx
retn	4
sub_71CB10 endp

align 10h



sub_71CBA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
test	edi, edi
jz	short loc_71CBDF
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	eax, edx
shr	eax, 6
xor	eax, [ecx+8]
xor	eax, edx
and	eax, [edi+4]
push	eax
push	ecx
mov	ecx, esi
call	sub_71BE80
test	eax, eax
jl	short loc_71CBDF
mov	ecx, [esi]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8+10h]
test	eax, eax
jz	short loc_71CBDF
pop	edi
add	eax, 0Ch
pop	esi
retn	4

loc_71CBDF:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_71CBA0 endp

align 10h



sub_71CBF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_71CC03
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_71CC25

loc_71CC03:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_71CC2A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_71CC25:
call	sub_71C5B0

loc_71CC2A:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*2]
mov	ebp, [esi+edx*8+8]
lea	eax, [esi+edx*8+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_71CC70
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	esi, [edx+8]
mov	[eax+10h], esi
mov	edx, [edx+0Ch]
pop	esi
mov	[eax+14h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71CC70:
push	edi
mov	edi, [esi+4]
mov	edx, ecx
push	ebx

loc_71CC77:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*8+8], 0FFFFFFFEh
jnz	short loc_71CC77
mov	ebx, [eax+4]
lea	edi, [edx+edx*2]
lea	edi, [esi+edi*8+8]
cmp	ebx, ecx
jnz	short loc_71CCDD
test	edi, edi
jz	short loc_71CCB6
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_71CCB6:
mov	esi, [esp+10h+arg_4]
mov	edi, [esi]
mov	[eax+8], edi
mov	edi, [esi+4]
mov	[eax+0Ch], edi
mov	edi, [esi+8]
mov	[eax+10h], edi
mov	esi, [esi+0Ch]
pop	ebx
pop	edi
mov	[eax+14h], esi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71CCDD:
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jz	short loc_71CCFF
lea	ebx, [ebx+0]

loc_71CCF0:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jnz	short loc_71CCF0

loc_71CCFF:
test	edi, edi
jz	short loc_71CD23
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_71CD23:
mov	[ebx], edx
mov	edx, [esp+10h+arg_4]
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	esi, [edx+8]
pop	ebx
mov	[eax+10h], esi
mov	edx, [edx+0Ch]
pop	edi
pop	esi
mov	[eax+14h], edx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_71CBF0 endp




sub_71CD50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	byte ptr  1Ch

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_10]
mov	dword ptr [esi], offset	off_155F500
mov	[esi+8], eax
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1440120
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	eax, 400h
xor	ebx, ebx
mov	dword ptr [esi+0Ch], 30h
mov	dword ptr [esi+10h], 3
mov	[esi+14h], eax
mov	[esi+18h], eax
mov	[esi+1Ch], ecx
cmp	edi, ebx
jz	short loc_71CDA0
mov	ecx, edi
call	sub_64A420

loc_71CDA0:
mov	[esi+20h], edi
mov	edi, [esp+0Ch+arg_8]
cmp	edi, ebx
jz	short loc_71CDB2
mov	ecx, edi
call	sub_64A420

loc_71CDB2:
mov	[esi+24h], edi
mov	edi, [esp+0Ch+arg_C]
cmp	edi, ebx
jz	short loc_71CDC4
mov	ecx, edi
call	sub_64A420

loc_71CDC4:
mov	edx, [esp+0Ch+arg_14]
mov	[esi+28h], edi
lea	edi, [esi+30h]
mov	ecx, edi
mov	[esi+2Ch], edx
call	sub_7513F0
lea	ecx, [esi+94h]
call	sub_7502A0
fld1
mov	al, [esp+0Ch+arg_18]
fst	dword ptr [esi+100h]
fld	ds:flt_143F788
fstp	dword ptr [esi+104h]
mov	[esi+108h], ebx
mov	[esi+10Ch], ebx
mov	[esi+110h], ebx
mov	[esi+114h], ebx
mov	[esi+118h], ebx
mov	[esi+11Ch], ebx
mov	[esi+120h], ebx
mov	[esi+124h], ebx
fst	dword ptr [esi+134h]
fstp	dword ptr [esi+138h]
mov	[esi+128h], ebx
fldz
mov	dword ptr [esi+12Ch], 7FFFFFFFh
fst	dword ptr [esi+13Ch]
mov	dword ptr [esi+130h], 80000001h
fstp	dword ptr [esi+140h]
mov	[esi+144h], bl
mov	[esi+148h], ebx
mov	[esi+14Ch], al
mov	eax, [esi+8]
cmp	eax, ebx
jz	short loc_71CE90
mov	ecx, [eax+0Ch]
mov	[esi+0Ch], ecx
mov	edx, [eax+10h]
mov	[esi+10h], edx
mov	ecx, [eax+14h]
mov	[esi+14h], ecx
mov	edx, [eax+18h]
mov	[esi+18h], edx

loc_71CE90:
mov	eax, [esi+14h]
mov	ecx, [esi+18h]
mov	[edi], eax
pop	edi
mov	[esi+34h], ecx
mov	eax, esi
pop	esi
pop	ebx
retn	1Ch
sub_71CD50 endp

align 10h



sub_71CEB0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+148h]
mov	dword ptr [esi], offset	off_1440120
call	sub_7419C0
lea	ecx, [esi+118h]
call	sub_74CD90
lea	ecx, [esi+108h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0C4h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0B8h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+0A8h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+9Ch]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+84h]
call	sub_74CD90
lea	ecx, [esi+74h]
call	sub_74CD90
lea	ecx, [esi+64h]
call	sub_74CD90
lea	ecx, [esi+54h]
call	sub_74CD90
lea	ecx, [esi+44h]
call	sub_74CD90
mov	ecx, [esi+28h]
test	ecx, ecx
jz	short loc_71CF58
call	sub_64A430

loc_71CF58:
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_71CF64
call	sub_64A430

loc_71CF64:
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_71CF70
call	sub_64A430

loc_71CF70:
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_71CEB0 endp

align 10h



sub_71CF80 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_71CF99
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_71CFAE
push	esi
jmp	short loc_71CFA8

loc_71CF99:
cmp	esi, [edi+8]
jb	short loc_71CFAE
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_71CFA8:
push	edi
call	sub_73F2F0

loc_71CFAE:
mov	eax, [edi]
lea	edx, [esi+esi*4]
mov	[edi+4], esi
lea	ecx, [eax+edx*8-28h]
pop	edi
pop	esi
test	ecx, ecx
jz	short locret_71CFC5
jmp	sub_71BF00

locret_71CFC5:
retn	4
sub_71CF80 endp

align 10h



sub_71CFD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_71CFE4
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_71D006

loc_71CFE4:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_71D00B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_71D006:
call	sub_71C5B0

loc_71D00B:
mov	eax, [esi]
mov	ecx, [esp+0Ch+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*2]
mov	ebp, [esi+edx*8+8]
lea	eax, [esi+edx*8+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_71D056
mov	esi, [esp+0Ch+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	edx, [esi]
mov	edi, [edx]
mov	[eax+8], edi
mov	edi, [edx+4]
mov	[eax+0Ch], edi
mov	edx, [edx+8]
mov	[eax+10h], edx
mov	edx, [esi+4]
mov	edx, [edx]
pop	edi
pop	esi
mov	[eax+14h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71D056:
mov	edi, [esi+4]
mov	edx, ecx
push	ebx
lea	esp, [esp+0]

loc_71D060:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*8+8], 0FFFFFFFEh
jnz	short loc_71D060
mov	ebx, [eax+4]
lea	edi, [edx+edx*2]
lea	edi, [esi+edi*8+8]
cmp	ebx, ecx
jnz	short loc_71D0CA
test	edi, edi
jz	short loc_71D09F
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_71D09F:
mov	edi, [esp+10h+arg_4]
mov	esi, [edi]
mov	ebx, [esi]
mov	[eax+8], ebx
mov	ebx, [esi+4]
mov	[eax+0Ch], ebx
mov	esi, [esi+8]
mov	[eax+10h], esi
mov	esi, [edi+4]
mov	esi, [esi]
pop	ebx
mov	[eax+14h], esi
pop	edi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_71D0CA:
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jz	short loc_71D0E6

loc_71D0D7:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jnz	short loc_71D0D7

loc_71D0E6:
test	edi, edi
jz	short loc_71D10A
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_71D10A:
mov	esi, [esp+10h+arg_4]
mov	[ebx], edx
mov	edx, [esi]
mov	edi, [edx]
mov	[eax+8], edi
mov	edi, [edx+4]
mov	[eax+0Ch], edi
mov	edx, [edx+8]
mov	[eax+10h], edx
mov	edx, [esi+4]
mov	edx, [edx]
pop	ebx
pop	edi
mov	[eax+14h], edx
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_71CFD0 endp

align 10h



sub_71D140 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_71CEB0
test	[esp+4+arg_0], 1
jz	short loc_71D15D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_71D15D:
mov	eax, esi
pop	esi
retn	4
sub_71D140 endp

align 10h



sub_71D170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
push	esi
mov	[esp+0Ch+var_4], edx
mov	edx, [eax]
mov	esi, edx
shr	esi, 6
xor	esi, [eax+8]
mov	[esp+0Ch+var_8], eax
xor	esi, edx
push	esi
lea	eax, [esp+10h+var_8]
push	eax
push	ecx
call	sub_71CFD0
pop	esi
add	esp, 8
retn	8
sub_71D170 endp

align 10h



sub_71D1B0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 54h
push	ebx
push	edi
mov	edi, [esp+5Ch+arg_4]
mov	ebx, ecx
mov	ecx, [edi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+38h]
mov	[esp+5Ch+var_54], ebx
call	edx
test	eax, eax
jz	loc_71D441
mov	ecx, [ebx+2Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
push	esi
push	0
push	34h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_71D203
mov	ecx, [edi+0Ch]
mov	eax, [ecx]
mov	edx, [eax+38h]
call	edx
push	0
push	eax
mov	ecx, esi
call	sub_6F2E30
mov	ebp, eax
mov	[esp+64h+arg_4], ebp
jmp	short loc_71D20F

loc_71D203:
mov	[esp+64h+arg_4], 0
mov	ebp, [esp+64h+arg_4]

loc_71D20F:
mov	eax, [ebx+0Ch]
add	ebx, 0Ch
mov	[ebp+8], eax
mov	ecx, [ebx+4]
mov	[ebp+0Ch], ecx
mov	edx, [ebx+8]
mov	[ebp+10h], edx
mov	eax, [ebx+0Ch]
mov	[ebp+14h], eax
inc	dword ptr [ebp+4]
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_71D239
call	sub_64A400

loc_71D239:
mov	[edi+10h], ebp
fild	dword ptr [ebx]
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
fdiv	ds:dbl_1440110
mov	eax, [edx+38h]
fstp	[esp+64h+var_4C]
call	eax
xor	ebx, ebx
mov	[esp+64h+var_48], eax
test	eax, eax
jbe	loc_71D438

loc_71D260:
push	ebx
mov	ecx, ebp
call	sub_7173A0
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_71D42D
cmp	dword ptr [eax+4], 0
jnz	loc_71D42D
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+18h]
push	0
push	ebx
call	eax
mov	esi, eax
test	esi, esi
jz	loc_71D42D
fldz
mov	edx, [esi]
mov	edx, [edx+14h]
fst	[esp+64h+var_38]
fst	[esp+64h+var_34]
lea	eax, [esp+64h+var_38]
fst	[esp+64h+var_30]
push	eax
mov	ecx, esi
fstp	[esp+68h+var_2C]
call	edx
fld	[esp+64h+var_30]
fld	st
fld	[esp+64h+var_38]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+64h+var_50]
fld	[esp+64h+var_50]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	loc_71D418
fld	[esp+64h+var_2C]
fld	st
fld	[esp+64h+var_34]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+64h+var_50]
fld	[esp+64h+var_50]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	loc_71D41C
mov	eax, [esp+64h+var_54]
fild	dword ptr [eax+10h]
fstp	[esp+64h+var_50]
fld	[esp+64h+var_4C]
fld	st
fmulp	st(5), st
fld	[esp+64h+var_50]
fld	st
fsubp	st(6), st
fxch	st(5)
fstp	[esp+64h+var_18]
fld	st
fmulp	st(2), st
fld	st(4)
fsubp	st(2), st
fxch	st(1)
fstp	[esp+64h+var_14]
fld	st
fmulp	st(5), st
fld	st(3)
faddp	st(5), st
fxch	st(4)
fstp	[esp+64h+var_10]
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+64h+var_C]
fst	[esp+64h+var_8]
fst	[esp+64h+var_4]
fld	[esp+64h+var_10]
fsub	[esp+64h+var_18]
fstp	[esp+64h+var_50]
fld	[esp+64h+var_50]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_71D424
fld	[esp+64h+var_C]
fsub	[esp+64h+var_14]
fstp	[esp+64h+var_50]
fcomp	[esp+64h+var_50]
fnstsw	ax
test	ah, 5
jp	loc_71D426
mov	edx, [esi]
mov	eax, 0FFFFFFFFh
mov	[esp+64h+var_20], eax
mov	[esp+64h+var_1C], eax
mov	eax, [edx+1Ch]
mov	ecx, esi
mov	[esp+64h+var_28], edi
mov	[esp+64h+var_24], ebx
call	eax
mov	ebp, [esp+64h+var_54]
lea	ecx, [esp+64h+var_44]
add	ebp, 148h
push	ecx
mov	ecx, ebp
mov	[esp+68h+var_44], edi
mov	[esp+68h+var_40], esi
mov	[esp+68h+var_3C], eax
call	sub_71CBA0
test	eax, eax
jz	short loc_71D3E8
mov	edx, [eax]
lea	ecx, [esp+64h+var_28]
push	ecx
mov	ecx, [esp+68h+arg_0]
mov	[esp+68h+var_20], edx
call	sub_71CF80
mov	ebp, [esp+64h+arg_4]
jmp	short loc_71D426

loc_71D3E8:
mov	eax, [esp+64h+arg_0]
mov	ecx, [eax+4]
lea	edx, [esp+64h+var_50]
push	edx
lea	eax, [esp+68h+var_44]
mov	[esp+68h+var_50], ecx
push	eax
mov	ecx, ebp
call	sub_71D170
lea	ecx, [esp+64h+var_28]
push	ecx
mov	ecx, [esp+68h+arg_0]
call	sub_71CF80
mov	ebp, [esp+64h+arg_4]
jmp	short loc_71D426

loc_71D418:
fstp	st
jmp	short loc_71D422

loc_71D41C:
fstp	st(2)
fstp	st(2)
fstp	st(1)

loc_71D422:
fstp	st

loc_71D424:
fstp	st

loc_71D426:
mov	ecx, esi
call	sub_70E500

loc_71D42D:
inc	ebx
cmp	ebx, [esp+64h+var_48]
jb	loc_71D260

loc_71D438:
mov	ecx, ebp
call	sub_64A400
pop	esi
pop	ebp

loc_71D441:
pop	edi
pop	ebx
add	esp, 54h
retn	8
sub_71D1B0 endp

align 10h



sub_71D450 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
push	ebp
push	esi
push	edi
xor	edi, edi
xor	ebp, ebp
mov	esi, ecx
cmp	[ebx+4], edi
jbe	short loc_71D4A3

loc_71D466:
mov	eax, [ebx]
mov	eax, [eax+edi*4]
cmp	dword ptr [eax+10h], 0
jnz	short loc_71D49D
mov	ecx, [esi+8]
cmp	dword ptr [ecx+20h], 0
jz	short loc_71D48C
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+38h]
call	eax
mov	ecx, [esi+8]
cmp	eax, [ecx+20h]
jg	short loc_71D49D

loc_71D48C:
mov	edx, [ebx]
mov	eax, [edx+edi*4]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+38h]
call	eax
add	ebp, eax

loc_71D49D:
inc	edi
cmp	edi, [ebx+4]
jb	short loc_71D466

loc_71D4A3:
xor	eax, eax
mov	[esp+1Ch+var_C], eax
mov	[esp+1Ch+var_8], eax
mov	[esp+1Ch+var_4], eax
cmp	ebp, eax
jbe	short loc_71D4C0
push	ebp
lea	ecx, [esp+20h+var_C]
push	ecx
call	sub_73F2F0

loc_71D4C0:
mov	eax, [esi+148h]
test	eax, eax
jz	short loc_71D51D
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]
jmp	short loc_71D4E0
db 8Dh,	0A4h, 24h, 4 dup(0)
jmp	short loc_71D4E0
align 10h

loc_71D4E0:
mov	eax, [esi+148h]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_71D4F7
mov	dword ptr [eax], 0FFFFFFFEh

loc_71D4F7:
add	ecx, 18h
sub	edx, 1
jnz	short loc_71D4E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+148h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi+148h], 0

loc_71D51D:
xor	edi, edi
cmp	[ebx+4], edi
jbe	short loc_71D562

loc_71D524:
mov	eax, [ebx]
mov	eax, [eax+edi*4]
cmp	dword ptr [eax+10h], 0
jnz	short loc_71D55C
mov	ecx, [esi+8]
cmp	dword ptr [ecx+20h], 0
jz	short loc_71D54A
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+38h]
call	eax
mov	ecx, [esi+8]
cmp	eax, [ecx+20h]
jg	short loc_71D55C

loc_71D54A:
mov	edx, [ebx]
mov	eax, [edx+edi*4]
push	eax
lea	ecx, [esp+20h+var_C]
push	ecx
mov	ecx, esi
call	sub_71D1B0

loc_71D55C:
inc	edi
cmp	edi, [ebx+4]
jb	short loc_71D524

loc_71D562:
lea	edx, [esp+1Ch+var_C]
push	edx
mov	ecx, esi
call	sub_71CB10
push	eax
lea	eax, [esp+20h+var_C]
push	eax
mov	ecx, esi
call	sub_71BF70
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
mov	[esp+arg_0], eax
mov	edx, [edx+30h]
jmp	edx
sub_71D450 endp

align 10h



sub_71D5A0 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	edi
mov	edi, [esp+4+arg_0]
test	edi, edi
jz	short loc_71D60C
push	esi
mov	esi, [esp+8+arg_8]
test	esi, esi
jz	short loc_71D60B
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	150h
call	edx
test	eax, eax
jz	short loc_71D5F0
mov	ecx, [esp+4+arg_20]
mov	edx, [esp+4+arg_1C]
push	ecx
mov	ecx, [esp+8+arg_18]
push	edx
mov	edx, [esp+0Ch+arg_14]
push	ecx
mov	ecx, [esp+10h+arg_10]
push	edx
push	ecx
push	esi
push	edi
mov	ecx, eax
call	sub_71CD50
mov	esi, eax
jmp	short loc_71D5F2

loc_71D5F0:
xor	esi, esi

loc_71D5F2:
mov	edx, [esp+4+arg_8]
push	edx
mov	ecx, esi
call	sub_71D450
test	esi, esi
jz	short loc_71D60B
mov	ecx, esi
pop	esi
pop	edi
jmp	sub_64A400

loc_71D60B:
pop	esi

loc_71D60C:
pop	edi
retn
sub_71D5A0 endp

align 10h



sub_71D610 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, edx
shl	eax, 0Dh
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	eax, edx
mov	edx, eax
shl	edx, 0Dh
mov	[ecx], eax
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	eax, edx
mov	edx, eax
shl	edx, 0Dh
mov	[ecx+4], eax
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	eax, edx
mov	edx, eax
shl	edx, 0Dh
mov	[ecx+8], eax
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	eax, edx
mov	edx, eax
shl	edx, 0Dh
mov	[ecx+0Ch], eax
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	eax, edx
mov	edx, eax
shl	edx, 0Dh
mov	[ecx+10h], eax
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	eax, edx
mov	edx, eax
shl	edx, 0Dh
mov	[ecx+14h], eax
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	eax, edx
mov	edx, eax
shl	edx, 0Dh
mov	[ecx+18h], eax
xor	eax, edx
mov	edx, eax
shr	edx, 11h
xor	eax, edx
mov	edx, eax
shl	edx, 5
xor	edx, eax
mov	[ecx+1Ch], edx
mov	dword ptr [ecx+20h], 587C4h
mov	dword ptr [ecx+24h], 7
retn	4
sub_71D610 endp

align 10h



sub_71D6F0 proc	near
mov	ecx, dword_167E038
inc	ecx
and	ecx, 7
mov	dword_167E038, ecx
mov	eax, dword_167E014[ecx*4]
mov	edx, 2AB5245Eh
mul	edx
push	esi
mov	esi, dword_167E034
push	edi
xor	edi, edi
add	eax, esi
adc	edx, edi
lea	esi, [edx+eax]
mov	dword_167E034, edx
cmp	esi, edx
jnb	short loc_71D731
inc	esi
inc	edx
mov	dword_167E034, edx

loc_71D731:
mov	eax, 0FFFFFFFEh
sub	eax, esi
pop	edi
mov	dword_167E014[ecx*4], eax
pop	esi
retn
sub_71D6F0 endp

align 10h



sub_71D750 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi+20h], 587C4h
mov	dword ptr [esi+24h], 7
call	sub_6B2200
push	eax
mov	ecx, esi
call	sub_71D610
mov	eax, esi
pop	esi
retn
sub_71D750 endp

align 10h



sub_71D780 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_71D7A8
push	edi
mov	edi, eax

loc_71D794:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_71D79F
call	sub_64A430

loc_71D79F:
sub	esi, 4
sub	edi, 1
jnz	short loc_71D794
pop	edi

loc_71D7A8:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
retn
sub_71D780 endp

align 10h



sub_71D7C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+1Ch]
call	sub_71D780
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_71D7D7
call	sub_64A430

loc_71D7D7:
push	edi
mov	edi, [esi+8]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_71D7FD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_71D7FD:
mov	ecx, esi
call	sub_64A3F0
test	[esp+8+arg_0], 1
pop	edi
jz	short loc_71D81A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_71D81A:
mov	eax, esi
pop	esi
retn	4
sub_71D7C0 endp




sub_71D820 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	sub_6B2AE0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+8]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_71D858
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_71D858:
mov	eax, esi
pop	esi
retn	4
sub_71D820 endp

align 10h



sub_71D860 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 18h
push	ebx
xor	ebx, ebx
push	ebp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_144012C
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
mov	[esi+58h], ebx
mov	[esi+5Ch], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ebx
mov	[esi+68h], ebx
mov	[esi+6Ch], ebx
mov	[esi+70h], ebx
mov	[esi+74h], ebx
mov	[esi+78h], ebx
mov	[esi+7Ch], ebx
mov	[esi+80h], ebx
mov	[esi+84h], ebx
mov	[esi+88h], ebx
mov	[esi+8Ch], ebx
mov	[esi+90h], ebx
mov	[esi+94h], ebx
mov	[esi+98h], ebx
mov	[esi+9Ch], ebx
mov	[esi+0A0h], ebx
mov	[esi+0A4h], ebx
mov	[esi+0A8h], ebx
mov	[esi+0ACh], ebx
mov	[esi+0B0h], ebx
mov	[esi+0B4h], ebx
mov	[esi+0B8h], ebx
mov	[esi+0BCh], ebx
mov	[esi+0C0h], ebx
mov	[esi+0C4h], ebx
mov	[esi+0C8h], ebx
mov	[esi+0CCh], ebx
mov	[esi+0D0h], ebx
mov	[esi+0D4h], ebx
mov	[esi+0D8h], ebx
mov	[esi+0DCh], ebx
mov	[esi+0E0h], ebx
mov	[esi+0E4h], ebx
push	edi
mov	[esi+0E8h], ebx
mov	[esi+0ECh], ebx
mov	ecx, dword_1855FC0
lea	edx, [esp+28h+var_18]
push	edx
mov	ebp, 2
mov	[esp+2Ch+var_18], ebp
mov	eax, [ecx]
mov	eax, [eax+38h]
push	28h
push	esi
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_71D9D9
mov	dword ptr [edi], offset	off_155F500
lea	ecx, [edi+8]
mov	dword ptr [edi+4], 1
mov	dword ptr [edi], offset	off_1440124
call	sub_67AB70
mov	[edi+0Ch], ebx
mov	[edi+10h], bl
mov	[edi+11h], bl
mov	[edi+14h], ebx
mov	[edi+18h], ebx
mov	[edi+1Ch], ebx
mov	[edi+20h], ebx
mov	[edi+24h], ebx
jmp	short loc_71D9DB

loc_71D9D9:
xor	edi, edi

loc_71D9DB:
mov	ecx, [esi+0D0h]
cmp	ecx, ebx
jz	short loc_71D9EA
call	sub_64A430

loc_71D9EA:
mov	[esi+0D0h], edi
mov	ecx, dword_1855FC0
lea	eax, [esp+28h+var_14]
push	eax
mov	[esp+2Ch+var_14], ebp
mov	edx, [ecx]
mov	edx, [edx+38h]
push	28h
push	esi
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_71DA44
mov	dword ptr [edi], offset	off_155F500
lea	ecx, [edi+8]
mov	dword ptr [edi+4], 1
mov	dword ptr [edi], offset	off_1440124
call	sub_67AB70
mov	[edi+0Ch], ebx
mov	[edi+10h], bl
mov	[edi+11h], bl
mov	[edi+14h], ebx
mov	[edi+18h], ebx
mov	[edi+1Ch], ebx
mov	[edi+20h], ebx
mov	[edi+24h], ebx
jmp	short loc_71DA46

loc_71DA44:
xor	edi, edi

loc_71DA46:
mov	ecx, [esi+0D4h]
cmp	ecx, ebx
jz	short loc_71DA55
call	sub_64A430

loc_71DA55:
mov	[esi+0D4h], edi
mov	ecx, dword_1855FC0
lea	edx, [esp+28h+var_10]
push	edx
mov	[esp+2Ch+var_10], ebp
mov	eax, [ecx]
mov	eax, [eax+38h]
push	28h
push	esi
call	eax
mov	edi, eax
cmp	edi, ebx
jz	short loc_71DAAF
mov	dword ptr [edi], offset	off_155F500
lea	ecx, [edi+8]
mov	dword ptr [edi+4], 1
mov	dword ptr [edi], offset	off_1440124
call	sub_67AB70
mov	[edi+0Ch], ebx
mov	[edi+10h], bl
mov	[edi+11h], bl
mov	[edi+14h], ebx
mov	[edi+18h], ebx
mov	[edi+1Ch], ebx
mov	[edi+20h], ebx
mov	[edi+24h], ebx
jmp	short loc_71DAB1

loc_71DAAF:
xor	edi, edi

loc_71DAB1:
mov	ecx, [esi+0D8h]
cmp	ecx, ebx
jz	short loc_71DAC0
call	sub_64A430

loc_71DAC0:
mov	[esi+0D8h], edi
mov	ecx, dword_1855FC0
lea	eax, [esp+28h+var_C]
push	eax
mov	[esp+2Ch+var_C], ebp
mov	edx, [ecx]
mov	edx, [edx+38h]
push	28h
push	esi
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_71DB1A
mov	dword ptr [edi], offset	off_155F500
lea	ecx, [edi+8]
mov	dword ptr [edi+4], 1
mov	dword ptr [edi], offset	off_1440124
call	sub_67AB70
mov	[edi+0Ch], ebx
mov	[edi+10h], bl
mov	[edi+11h], bl
mov	[edi+14h], ebx
mov	[edi+18h], ebx
mov	[edi+1Ch], ebx
mov	[edi+20h], ebx
mov	[edi+24h], ebx
jmp	short loc_71DB1C

loc_71DB1A:
xor	edi, edi

loc_71DB1C:
mov	ecx, [esi+0DCh]
cmp	ecx, ebx
jz	short loc_71DB2B
call	sub_64A430

loc_71DB2B:
mov	[esi+0DCh], edi
mov	ecx, dword_1855FC0
lea	edx, [esp+28h+var_8]
push	edx
mov	[esp+2Ch+var_8], ebp
mov	eax, [ecx]
mov	eax, [eax+38h]
push	18h
push	esi
call	eax
cmp	eax, ebx
jz	short loc_71DB71
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1440128
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	edi, eax
jmp	short loc_71DB73

loc_71DB71:
xor	edi, edi

loc_71DB73:
mov	ecx, [esi+0ECh]
cmp	ecx, ebx
jz	short loc_71DB82
call	sub_64A430

loc_71DB82:
mov	[esi+0ECh], edi
mov	ecx, dword_1855FC0
lea	eax, [esp+28h+var_4]
push	eax
mov	[esp+2Ch+var_4], ebp
mov	edx, [ecx]
mov	edx, [edx+38h]
push	18h
push	esi
call	edx
cmp	eax, ebx
jz	short loc_71DBC8
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1440128
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	edi, eax
jmp	short loc_71DBCA

loc_71DBC8:
xor	edi, edi

loc_71DBCA:
mov	ecx, [esi+0B4h]
cmp	ecx, ebx
jz	short loc_71DBD9
call	sub_64A430

loc_71DBD9:
mov	[esi+0B4h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_71D860 endp

align 10h



sub_71DBF0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0ECh]
test	ecx, ecx
jz	short loc_71DC02
call	sub_64A430

loc_71DC02:
lea	ecx, [esi+0E0h]
call	sub_71D780
mov	ecx, [esi+0DCh]
test	ecx, ecx
jz	short loc_71DC1C
call	sub_64A430

loc_71DC1C:
mov	ecx, [esi+0D8h]
test	ecx, ecx
jz	short loc_71DC2B
call	sub_64A430

loc_71DC2B:
mov	ecx, [esi+0D4h]
test	ecx, ecx
jz	short loc_71DC3A
call	sub_64A430

loc_71DC3A:
mov	ecx, [esi+0D0h]
test	ecx, ecx
jz	short loc_71DC49
call	sub_64A430

loc_71DC49:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0C4h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0B8h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [esi+0B4h]
test	ecx, ecx
jz	short loc_71DC80
call	sub_64A430

loc_71DC80:
lea	ecx, [esi+0A8h]
call	sub_71D780
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_71DBF0 endp

align 10h



sub_71DCA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_71DBF0
test	[esp+4+arg_0], 1
jz	short loc_71DCBD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_71DCBD:
mov	eax, esi
pop	esi
retn	4
sub_71DCA0 endp

align 10h



sub_71DCD0 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8

test	[esp+arg_0], 4
mov	eax, [esp+arg_4]
jz	short loc_71DD18
mov	ecx, 1100h
cmp	ax, cx
jb	short loc_71DCEF
mov	edx, 11FFh
cmp	ax, dx
jbe	short loc_71DD13

loc_71DCEF:
mov	ecx, 3130h
cmp	ax, cx
jb	short loc_71DD03
mov	edx, 318Fh
cmp	ax, dx
jbe	short loc_71DD13

loc_71DD03:
lea	ecx, [eax+5400h]
mov	edx, 2BA3h
cmp	cx, dx
ja	short loc_71DD18

loc_71DD13:
xor	al, al
retn	8

loc_71DD18:
mov	ecx, 1100h
cmp	ax, cx
jb	short loc_71DD2C
mov	edx, 11FFh
cmp	ax, dx
jbe	short loc_71DD63

loc_71DD2C:
mov	ecx, 3000h
cmp	ax, cx
jb	short loc_71DD40
mov	edx, 0D7AFh
cmp	ax, dx
jbe	short loc_71DD63

loc_71DD40:
mov	ecx, 0F900h
cmp	ax, cx
jb	short loc_71DD54
mov	edx, 0FAFFh
cmp	ax, dx
jbe	short loc_71DD63

loc_71DD54:
add	eax, 100h
mov	ecx, 0DCh
cmp	ax, cx
ja	short loc_71DD6B

loc_71DD63:
mov	eax, 1
retn	8

loc_71DD6B:
xor	eax, eax
retn	8
sub_71DCD0 endp




sub_71DD70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_4]
test	si, si
jnz	short loc_71DD80
xor	al, al
pop	esi
retn	0Ch

loc_71DD80:
push	ebx
mov	ebx, [esp+8+arg_8]
push	edi
mov	edi, [esp+0Ch+arg_0]
cmp	si, 9
jz	short loc_71DDC2
cmp	si, 0Dh
jz	short loc_71DDC2
cmp	si, 20h
jz	short loc_71DDC2
mov	eax, 3000h
cmp	si, ax
jz	short loc_71DDC2
push	ebx
push	edi
call	sub_71DCD0
test	al, al
jnz	short loc_71DDC2
push	esi
push	edi
call	sub_71DCD0
test	al, al
jnz	short loc_71DDC2
cmp	si, 2Dh
jnz	short loc_71DDE7

loc_71DDC2:
push	1
push	ebx
push	edi
call	sub_741410
test	al, al
jnz	short loc_71DDE7
push	2
push	esi
push	edi
call	sub_741410
test	al, al
jnz	short loc_71DDE7
pop	edi
pop	ebx
mov	eax, 1
pop	esi
retn	0Ch

loc_71DDE7:
pop	edi
pop	ebx
xor	eax, eax
pop	esi
retn	0Ch
sub_71DD70 endp

align 10h



sub_71DDF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	[esi], eax
mov	ecx, dword_1855FC0
push	ecx
lea	ecx, [esi+4]
call	sub_679B40
mov	eax, esi
pop	esi
retn	4
sub_71DDF0 endp

align 10h



sub_71DE10 proc	near

var_4= dword ptr -4

push	ecx
mov	eax, [ecx]
shr	eax, 1Fh
test	al, 1
jz	short loc_71DE2C
movzx	ecx, word ptr [ecx+1Ah]
mov	[esp+4+var_4], ecx
fild	[esp+4+var_4]
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn

loc_71DE2C:
movzx	edx, word ptr [ecx+26h]
mov	[esp+4+var_4], edx
fild	[esp+4+var_4]
fstp	[esp+4+var_4]
fld	[esp+4+var_4]
pop	ecx
retn
sub_71DE10 endp

align 10h



sub_71DE40 proc	near
mov	eax, [ecx]
shr	eax, 1Fh
test	al, 1
jz	short loc_71DE54
mov	al, [ecx+1Dh]
test	al, al
jle	short loc_71DE5F
movsx	eax, al
retn

loc_71DE54:
movzx	eax, word ptr [ecx+28h]
test	ax, ax
jle	short loc_71DE5F
cwde
retn

loc_71DE5F:
xor	eax, eax
retn
sub_71DE40 endp

align 10h



sub_71DE70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

push	edi
mov	edi, [esp+4+arg_4]
test	edi, edi
jz	short loc_71DED3
mov	edx, [esp+4+arg_8]
mov	ecx, [esp+4+arg_0]
push	ebx
mov	ebx, [esp+8+arg_C]
push	ebp
mov	ebp, ebx
mov	[esp+0Ch+arg_4], edi
push	esi
mov	edi, edi

loc_71DE90:
movzx	eax, word ptr [ecx]
movzx	esi, word ptr [edx]
add	ecx, 2
add	edx, 2
sub	edi, 1
jz	short loc_71DEAE
test	eax, eax
jz	short loc_71DEAE
cmp	eax, esi
jnz	short loc_71DECC
sub	ebx, 1
jnz	short loc_71DE90

loc_71DEAE:
cmp	eax, esi
jnz	short loc_71DECC
test	ebx, ebx
jz	short loc_71DECC
cmp	[esp+10h+arg_10], 0
jz	short loc_71DEC1
test	edi, edi
jz	short loc_71DECC

loc_71DEC1:
mov	eax, [esp+10h+arg_4]
pop	esi
sub	eax, ebp
pop	ebp
pop	ebx
pop	edi
retn

loc_71DECC:
sub	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	edi
retn

loc_71DED3:
mov	eax, [esp+4+arg_C]
neg	eax
pop	edi
retn
sub_71DE70 endp

align 10h



sub_71DEE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
movzx	ecx, byte ptr [eax+2Ch]
push	1
push	ecx
push	eax
mov	eax, [esp+0Ch+arg_4]
mov	edx, [eax+4]
mov	eax, [eax]
push	edx
push	eax
call	sub_71DE70
add	esp, 14h
neg	eax
mov	eax, 0
sets	al
retn
sub_71DEE0 endp

align 10h



sub_71DF10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
movzx	ecx, byte ptr [eax+2Ch]
push	0
push	ecx
push	eax
mov	eax, [esp+0Ch+arg_4]
mov	edx, [eax+4]
mov	eax, [eax]
push	edx
push	eax
call	sub_71DE70
add	esp, 14h
neg	eax
mov	eax, 0
sets	al
retn
sub_71DF10 endp

align 10h



sub_71DF40 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx]
mov	eax, [eax+8]
jmp	eax
sub_71DF40 endp

align 10h



sub_71DF50 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx]
mov	edx, [eax+4]
push	2
call	edx
retn	0Ch
sub_71DF50 endp

align 10h



sub_71DF60 proc	near
mov	ecx, [ecx+24h]
mov	eax, [ecx]
mov	edx, [eax+4]
push	2
call	edx
retn	8
sub_71DF60 endp

align 10h



sub_71DF70 proc	near

arg_0= dword ptr  4

test	[esp+arg_0], 100h
jz	short loc_71DF84
or	byte ptr [ecx+150h], 2
retn	4

loc_71DF84:
or	byte ptr [ecx+150h], 1
retn	4
sub_71DF70 endp

align 10h



sub_71DF90 proc	near
fldz
xor	eax, eax
fst	dword ptr [ecx+48h]
mov	[ecx], eax
fst	dword ptr [ecx+44h]
mov	[ecx+0A5h], al
fst	dword ptr [ecx+40h]
mov	[ecx+0A4h], al
fstp	dword ptr [ecx+10h]
mov	[ecx+38h], eax
mov	[ecx+3Ch], eax
mov	[ecx+9Ch], eax
mov	[ecx+98h], eax
mov	[ecx+0A8h], eax
mov	[ecx+8], eax
retn
sub_71DF90 endp

align 10h



sub_71DFD0 proc	near
mov	eax, [ecx+14h]
test	eax, eax
jz	short locret_71DFDB
mov	byte ptr [eax+18h], 1

locret_71DFDB:
retn	10h
sub_71DFD0 endp

align 10h



sub_71DFE0 proc	near
mov	al, [ecx+14Eh]
test	al, 1
jnz	short locret_71DFF9
or	al, 1
or	byte ptr [ecx+150h], 2
mov	[ecx+14Eh], al

locret_71DFF9:
retn
sub_71DFE0 endp

align 10h



sub_71E000 proc	near
mov	al, [ecx+14Eh]
test	al, 2
jnz	short locret_71E019
or	al, 2
or	byte ptr [ecx+150h], 2
mov	[ecx+14Eh], al

locret_71E019:
retn
sub_71E000 endp

align 10h



sub_71E020 proc	near
mov	al, [ecx+14Eh]
test	al, 8
jnz	short locret_71E039
or	al, 8
or	byte ptr [ecx+150h], 2
mov	[ecx+14Eh], al

locret_71E039:
retn
sub_71E020 endp

align 10h



sub_71E040 proc	near
mov	al, [ecx+14Eh]
test	al, 8
jz	short locret_71E059
and	al, 0F7h
or	byte ptr [ecx+150h], 2
mov	[ecx+14Eh], al

locret_71E059:
retn
sub_71E040 endp

align 10h



sub_71E060 proc	near
mov	eax, [ecx+14h]
xor	ecx, ecx
cmp	eax, ecx
jz	short locret_71E06F
mov	[eax+18h], cl
mov	[eax+19h], cl

locret_71E06F:
retn	4
sub_71E060 endp

align 10h



sub_71E080 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+4+var_4]
push	edx
mov	edx, [esp+8+arg_0]
push	edx
mov	edx, [esp+0Ch+arg_4]
mov	[esp+0Ch+var_4], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
pop	ecx
retn
sub_71E080 endp

align 10h



sub_71E0B0 proc	near
mov	eax, [ecx]
test	eax, eax
jz	short loc_71E0C5
mov	ecx, [ecx+4]
test	ecx, ecx
jl	short loc_71E0C5
cmp	ecx, [eax+4]
jge	short loc_71E0C5
xor	eax, eax
retn

loc_71E0C5:
mov	eax, 1
retn
sub_71E0B0 endp

align 10h



sub_71E0D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	eax, [ecx]
shr	eax, 1Fh
sub	esp, 8
and	al, 1
jz	short loc_71E0E2
movzx	edx, word ptr [ecx+16h]
jmp	short loc_71E0E5

loc_71E0E2:
mov	edx, [ecx+18h]

loc_71E0E5:
mov	[esp+8+var_8], edx
test	al, al
jz	short loc_71E10F
movzx	eax, word ptr [ecx+1Ah]
mov	[esp+8+var_4], eax
fild	[esp+8+var_4]
fstp	[esp+8+var_4]
fild	[esp+8+var_8]
fsub	[esp+8+var_4]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
add	esp, 8
retn

loc_71E10F:
movzx	ecx, word ptr [ecx+26h]
mov	[esp+8+var_4], ecx
fild	[esp+8+var_4]
fstp	[esp+8+var_4]
fild	[esp+8+var_8]
fsub	[esp+8+var_4]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
add	esp, 8
retn
sub_71E0D0 endp

align 10h



sub_71E140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi+8]
test	eax, eax
jl	short loc_71E14F
cmp	eax, 0FFFFFFFFh
jnz	short loc_71E154

loc_71E14F:
mov	eax, [esi]
mov	eax, [eax+4]

loc_71E154:
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	ecx
mov	ecx, [esp+8+arg_0]
push	edx
push	ecx
mov	ecx, [esi]
push	eax
call	sub_735650
inc	dword ptr [esi+8]
pop	esi
retn	0Ch
sub_71E140 endp

align 10h



sub_71E180 proc	near
mov	eax, 1
test	[ecx+16h], al
jz	short loc_71E1A0
mov	cx, [ecx+16h]
mov	edx, 600h
and	cx, dx
mov	edx, 200h
cmp	cx, dx
jz	short locret_71E1A2

loc_71E1A0:
xor	eax, eax

locret_71E1A2:
retn
sub_71E180 endp

align 10h



sub_71E1B0 proc	near
mov	eax, 1
test	[ecx+16h], al
jz	short loc_71E1CB
mov	cx, [ecx+16h]
mov	edx, 600h
and	cx, dx
cmp	cx, dx
jz	short locret_71E1CD

loc_71E1CB:
xor	eax, eax

locret_71E1CD:
retn
sub_71E1B0 endp

align 10h



sub_71E1D0 proc	near
mov	dl, 40h
mov	[ecx+12Ch], dl
mov	[ecx+12Dh], dl
mov	edx, 1C2h
mov	[ecx+132h], dx
xor	eax, eax
mov	edx, 50h
mov	[ecx+134h], dx
mov	edx, 39h
mov	[ecx+128h], al
mov	[ecx+129h], al
mov	byte ptr [ecx+12Ah], 10h
mov	byte ptr [ecx+12Bh], 80h
mov	byte ptr [ecx+12Eh], 10h
mov	byte ptr [ecx+12Fh], 0FFh
mov	[ecx+136h], dx
mov	[ecx+138h], dx
mov	[ecx+13Ch], eax
mov	[ecx+140h], eax
mov	[ecx+130h], al
retn
sub_71E1D0 endp

align 10h



sub_71E250 proc	near
mov	eax, [ecx+14h]
test	eax, eax
jz	short loc_71E269
lea	ecx, [eax+14h]
call	sub_725AB0
test	eax, eax
jbe	short loc_71E269
mov	eax, 1
retn

loc_71E269:
xor	eax, eax
retn
sub_71E250 endp

align 10h



sub_71E270 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
push	eax
push	ecx
mov	ecx, [esi+8]
call	sub_72C320
mov	edx, [esi]
mov	eax, [edx+4]
push	106h
mov	ecx, esi
call	eax
pop	esi
retn	8
sub_71E270 endp

align 10h



sub_71E2A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
push	eax
push	ecx
mov	ecx, [esi+8]
call	sub_72C350
mov	edx, [esi]
mov	eax, [edx+4]
push	106h
mov	ecx, esi
call	eax
pop	esi
retn	8
sub_71E2A0 endp

align 10h



sub_71E2D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
and	byte ptr [esi+150h], 0EFh
push	eax
push	ecx
mov	ecx, [esi+8]
push	edx
call	sub_72AA70
mov	eax, [esi]
mov	edx, [eax+4]
push	1
mov	ecx, esi
call	edx
pop	esi
retn	0Ch
sub_71E2D0 endp




sub_71E300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
push	eax
push	ecx
mov	ecx, [esi+8]
push	edx
call	sub_7268A0
mov	eax, [esi]
mov	edx, [eax+4]
push	1
mov	ecx, esi
call	edx
pop	esi
retn	0Ch
sub_71E300 endp

align 10h



sub_71E330 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+8]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	sub_7269A0
mov	eax, esi
pop	esi
retn	4
sub_71E330 endp

align 10h



sub_71E350 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+8]
push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	sub_728BA0
mov	eax, esi
pop	esi
retn	4
sub_71E350 endp

align 10h



sub_71E370 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	edi
call	sub_72C0D0
mov	eax, [esp+8+arg_4]
mov	edi, [esp+8+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_71E399
mov	eax, edi
lea	edx, [eax+1]
mov	edi, edi

loc_71E390:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_71E390
sub	eax, edx

loc_71E399:
mov	ecx, [esp+8+arg_18]
mov	edx, [esp+8+arg_14]
push	ecx
mov	ecx, [esp+0Ch+arg_10]
push	edx
mov	edx, [esp+10h+arg_8]
push	ecx
mov	cl, [esi+14Eh]
shr	cl, 2
push	edx
and	cl, 1
movzx	edx, cl
mov	ecx, [esp+18h+arg_C]
push	edx
push	ecx
mov	ecx, [esi+8]
push	eax
push	edi
call	sub_72E320
mov	edx, [esi]
mov	eax, [edx+4]
push	106h
mov	ecx, esi
call	eax
pop	edi
pop	esi
retn	1Ch
sub_71E370 endp

align 10h



sub_71E3E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	edi
call	sub_72C0D0
mov	eax, [esp+8+arg_4]
mov	edi, [esp+8+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_71E402
push	edi
call	sub_67B340
add	esp, 4

loc_71E402:
mov	ecx, [esp+8+arg_18]
mov	edx, [esp+8+arg_14]
push	ecx
mov	ecx, [esp+0Ch+arg_10]
push	edx
mov	edx, [esp+10h+arg_8]
push	ecx
mov	cl, [esi+14Eh]
shr	cl, 2
push	edx
and	cl, 1
movzx	edx, cl
mov	ecx, [esp+18h+arg_C]
push	edx
push	ecx
mov	ecx, [esi+8]
push	eax
push	edi
call	sub_72E390
mov	edx, [esi]
mov	eax, [edx+4]
push	106h
mov	ecx, esi
call	eax
pop	edi
pop	esi
retn	1Ch
sub_71E3E0 endp

align 10h



sub_71E450 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
call	sub_726950
test	eax, eax
jbe	short loc_71E4B8
mov	ecx, [esi+8]
dec	eax
push	eax
lea	eax, [esp+10h+var_8]
push	eax
lea	edx, [esp+14h+var_4]
push	edx
call	sub_728B20
test	al, al
jz	short loc_71E4B8
movzx	edx, byte ptr [esi+150h]
mov	eax, [esp+0Ch+var_8]
mov	ecx, [esp+0Ch+var_4]
push	eax
mov	eax, [esp+10h+arg_4]
shr	edx, 3
push	ecx
mov	ecx, [esp+14h+arg_0]
not	edx
and	edx, 1
push	edx
push	eax
push	ecx
mov	ecx, [esi+8]
call	sub_72B240
mov	edx, [esi]
mov	eax, [edx+4]
push	6
mov	ecx, esi
call	eax
pop	esi
add	esp, 8
retn	8

loc_71E4B8:
movzx	edx, byte ptr [esi+150h]
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [esp+0Ch+arg_0]
shr	edx, 3
not	edx
and	edx, 1
push	edx
push	eax
push	ecx
mov	ecx, [esi+8]
call	sub_72C300
mov	edx, [esi]
mov	eax, [edx+4]
push	6
mov	ecx, esi
call	eax
pop	esi
add	esp, 8
retn	8
sub_71E450 endp

align 10h



sub_71E4F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_71E50F
mov	eax, edi
lea	edx, [eax+1]

loc_71E506:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_71E506
sub	eax, edx

loc_71E50F:
mov	dl, [esi+14Eh]
mov	ecx, [esp+8+arg_8]
push	0
push	0
push	0
push	ecx
shr	dl, 2
and	dl, 1
movzx	ecx, dl
mov	edx, [esp+18h+arg_C]
push	ecx
mov	ecx, [esi+8]
push	edx
push	eax
push	edi
call	sub_72E320
mov	eax, [esi]
mov	edx, [eax+4]
push	6
mov	ecx, esi
call	edx
pop	edi
pop	esi
retn	10h
sub_71E4F0 endp

align 10h



sub_71E550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
cmp	eax, esi
jb	short loc_71E564
sub	eax, esi
jmp	short loc_71E566

loc_71E564:
xor	eax, eax

loc_71E566:
mov	ecx, [edi+8]
push	eax
push	esi
call	sub_72C640
mov	eax, [esp+8+arg_C]
mov	edx, [esp+8+arg_0]
mov	ecx, [edi+8]
push	1
push	eax
push	esi
push	edx
call	sub_72C5C0
pop	edi
pop	esi
retn	10h
sub_71E550 endp

align 10h



sub_71E590 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+8], 0
jz	short loc_71E5EA
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_71E5A5
call	sub_64A400

loc_71E5A5:
mov	dword ptr [esi+8], 0
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_71E5B8
call	sub_64A400

loc_71E5B8:
mov	dword ptr [esi+10h], 0
mov	ecx, [esi+11Ch]
test	ecx, ecx
jz	short loc_71E5CE
call	sub_64A400

loc_71E5CE:
lea	ecx, [esi+24h]
mov	dword ptr [esi+11Ch], 0
or	byte ptr [ecx+74h], 1
mov	eax, [ecx+4]
push	eax
push	0
call	sub_737C50

loc_71E5EA:
pop	esi
retn
sub_71E590 endp

align 10h



sub_71E5F0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
push	edi
lea	ebp, [ecx+24h]
xor	esi, esi
mov	[esp+14h+var_1], 0
nop

loc_71E600:
test	ebp, ebp
jz	short loc_71E659
cmp	esi, [ebp+4]
jnb	short loc_71E659
test	esi, esi
jl	short loc_71E659
mov	eax, [ebp+0]
mov	edx, [eax+esi*4]
mov	eax, [esp+14h+arg_0]
mov	edi, [eax+20h]
mov	eax, [edx]
shr	eax, 1Fh
and	al, 1
jz	short loc_71E628
mov	ebx, [edx+4]
jmp	short loc_71E62B

loc_71E628:
mov	ebx, [edx+1Ch]

loc_71E62B:
cmp	edi, ebx
jnz	short loc_71E64A
mov	[esp+14h+var_1], 1
test	al, al
jz	short loc_71E641
or	dword ptr [edx+8], offset sub_FFFFFF
jmp	short loc_71E651

loc_71E641:
mov	dword ptr [edx+8], 0FFFFFFFFh
jmp	short loc_71E651

loc_71E64A:
cmp	[esp+14h+var_1], 0
jnz	short loc_71E659

loc_71E651:
cmp	esi, [ebp+4]
jnb	short loc_71E600
inc	esi
jmp	short loc_71E600

loc_71E659:
or	byte ptr [ecx+150h], 1
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_71E5F0 endp

align 10h



sub_71E670 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
push	edi
test	eax, eax
jz	loc_71E700
lea	ecx, [eax+14h]
call	sub_725AB0
test	eax, eax
jbe	short loc_71E700
mov	eax, [esi+30h]
mov	eax, [eax+1Ch]
mov	edx, [esi+1Ch]
add	eax, [esi+68h]
mov	ecx, [edx+30h]
cmp	eax, ecx
ja	short loc_71E700
mov	ebx, [esp+0Ch+arg_0]
lea	edi, [eax+ebx]
cmp	edi, ecx
jb	short loc_71E704
sub	ecx, eax
mov	edi, ecx
cmp	ecx, ebx
jb	short loc_71E6B4
mov	edi, ebx

loc_71E6B4:
lea	ecx, [edx+14h]
call	sub_725AB0
mov	ecx, [esi+28h]
sub	ecx, edi
add	ecx, ebx
cmp	ecx, eax
jbe	short loc_71E6F1
mov	eax, [esi+1Ch]
lea	ecx, [eax+14h]
call	sub_725AB0
mov	edi, [esi+28h]
sub	edi, eax
mov	eax, [esi+1Ch]
lea	ecx, [eax+14h]
add	edi, ebx
call	sub_725AB0
add	[esi+0A8h], eax
mov	[esi+28h], eax
mov	ebx, edi
jmp	short loc_71E704

loc_71E6F1:
sub	ebx, edi
add	[esi+0A8h], ebx
mov	[esi+28h], ecx
mov	ebx, edi
jmp	short loc_71E704

loc_71E700:
mov	ebx, [esp+0Ch+arg_0]

loc_71E704:
test	ebx, ebx
jbe	short loc_71E717
push	ebx
lea	ecx, [esi+4Ch]
call	sub_7274F0
add	[esi+0A8h], ebx

loc_71E717:
pop	edi
pop	esi
pop	ebx
retn	4
sub_71E670 endp

align 10h



; int __stdcall	sub_71E720(int,	float)
sub_71E720 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	edx, [esp+8+arg_0]
mov	eax, [edx+0Ch]
fld	dword ptr [eax+8]
fstp	[esp+8+arg_0]
fld	dword ptr [eax+0Ch]
fstp	[esp+8+var_8]
fldz
fcom	[esp+8+arg_0]
fnstsw	ax
test	ah, 44h
jp	short loc_71E74E
fld	ds:flt_143FDA0
fstp	[esp+8+arg_0]

loc_71E74E:
fcomp	[esp+8+var_8]
fnstsw	ax
test	ah, 44h
jp	short loc_71E761
fld	ds:flt_15FDC78
fstp	[esp+8+var_8]

loc_71E761:
fld	dword ptr [ecx+40h]
fstp	[esp+8+var_4]
fld	[esp+8+arg_0]
fld	[esp+8+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fld	[esp+8+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_71E78F
fstp	st(1)
jmp	short loc_71E791

loc_71E78F:
fstp	st

loc_71E791:
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+40h]
fld	dword ptr [ecx+44h]
fstp	[esp+8+arg_4]
fld	[esp+8+var_8]
fmul	st, st(1)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fld	[esp+8+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_71E7C1
fstp	st(1)
jmp	short loc_71E7C3

loc_71E7C1:
fstp	st

loc_71E7C3:
mov	eax, [edx+0Ch]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+44h]
fld	dword ptr [ecx+48h]
fstp	[esp+8+arg_4]
fmul	dword ptr [eax+10h]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fld	[esp+8+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_71E803
fstp	st(1)
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+48h]
add	esp, 8
retn	8

loc_71E803:
fstp	st
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+48h]
add	esp, 8
retn	8
sub_71E720 endp

align 10h



sub_71E820 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, [ecx+0C8h]
movzx	edx, word ptr [eax+26h]
mov	[esp+8+var_8], edx
mov	edx, [ecx+0D0h]
fild	[esp+8+var_8]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+8+var_8]
fld1
fcomp	dword ptr [edx+10h]
fnstsw	ax
test	ah, 44h
jnp	short loc_71E85B
fld	dword ptr [edx+10h]
fmul	[esp+8+var_8]
fstp	[esp+8+var_8]

loc_71E85B:
mov	ecx, [ecx]
test	byte ptr [ecx+150h], 4
jz	short loc_71E88C
movzx	eax, word ptr [ecx+14Ah]
mov	[esp+8+var_4], eax
fild	[esp+8+var_4]
fdivrp	st(1), st
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fmul	[esp+8+var_8]
fstp	[esp+8+var_8]
fld	[esp+8+var_8]
add	esp, 8
retn

loc_71E88C:
fstp	st
fld	[esp+8+var_8]
add	esp, 8
retn
sub_71E820 endp

align 10h



sub_71E8A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	ecx, [ecx+11Ch]
test	ecx, ecx
jz	short locret_71E8C5
cmp	[esp+arg_C], 0
jz	short locret_71E8C5
mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_72EA40

locret_71E8C5:
retn	10h
sub_71E8A0 endp

align 10h



; int __stdcall	sub_71E8D0(float)
sub_71E8D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld1
fld	[esp+4+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_71E8FB
and	byte ptr [ecx+150h], 0FBh
fstp	st
mov	eax, 14h
mov	[ecx+14Ah], ax
pop	ecx
retn	4

loc_71E8FB:
or	byte ptr [ecx+150h], 4
fmul	ds:dbl_15FCE20
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
or	eax, 0C00h
mov	[esp+4+var_4], eax
fldcw	word ptr [esp+4+var_4]
fistp	[esp+4+var_4]
mov	dx, word ptr [esp+4+var_4]
mov	[ecx+14Ah], dx
fldcw	word ptr [esp+4+arg_0]
pop	ecx
retn	4
sub_71E8D0 endp

align 10h



sub_71E940 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
mov	ecx, [ecx+8]
push	esi
mov	esi, [esp+10h+arg_0]
lea	eax, [esp+10h+var_C]
push	eax
push	esi
lea	edx, [esp+18h+var_8]
push	edx
mov	[esp+1Ch+var_C], 0FFFFFFFFh
call	sub_7267B0
mov	eax, [esp+10h+var_8]
test	eax, eax
jz	short loc_71E985
mov	ecx, [esp+10h+var_4]
test	ecx, ecx
jl	short loc_71E985
cmp	ecx, [eax+4]
jge	short loc_71E985
mov	eax, esi
sub	eax, [esp+10h+var_C]
pop	esi
add	esp, 0Ch
retn	4

loc_71E985:
or	eax, 0FFFFFFFFh
pop	esi
add	esp, 0Ch
retn	4
sub_71E940 endp

align 10h



sub_71E990 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+11Ch], 0
jnz	short loc_71E9E8
mov	ecx, dword_1855FC0
push	edi
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	70h
push	esi
call	eax
test	eax, eax
jz	short loc_71E9CB
push	esi
mov	ecx, eax
call	sub_72EBD0
mov	edi, eax
jmp	short loc_71E9CD

loc_71E9CB:
xor	edi, edi

loc_71E9CD:
mov	ecx, [esi+11Ch]
test	ecx, ecx
jz	short loc_71E9DC
call	sub_64A400

loc_71E9DC:
mov	[esi+11Ch], edi
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn

loc_71E9E8:
mov	eax, [esi+11Ch]
pop	esi
pop	ecx
retn
sub_71E990 endp

align 10h



sub_71EA00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
mov	[esp+14h+var_8], 0
mov	[esp+14h+var_4], 0
call	sub_71E940
cmp	eax, 0FFFFFFFFh
jz	short loc_71EA5C
mov	ecx, [esi+8]
cmp	eax, edi
lea	edx, [esp+10h+var_4]
lea	eax, [esp+10h+var_8]
jz	short loc_71EA36
dec	edi

loc_71EA36:
push	edi
push	eax
push	edx
call	sub_728B20
test	al, al
jz	short loc_71EA5C
mov	eax, [esp+10h+var_8]
mov	ecx, [esi+8]
push	eax
call	sub_726060
mov	ecx, [esp+10h+var_4]
push	ecx
mov	ecx, [esi+8]
call	sub_729C00

loc_71EA5C:
pop	edi
pop	esi
add	esp, 8
retn	4
sub_71EA00 endp

align 10h



sub_71EA70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
sub	ebx, ebp
test	ebx, ebx
jle	short loc_71EABA
push	esi
push	edi

loc_71EA82:
mov	ecx, [esp+10h+arg_0]
mov	edx, [esp+10h+arg_C]
mov	esi, ebx
sar	esi, 1
lea	edi, [esi+ebp]
lea	eax, [edi+edi*2]
shl	eax, 4
add	eax, [ecx]
push	edx
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_71EAB2
or	eax, 0FFFFFFFFh
sub	eax, esi
lea	ebp, [edi+1]
add	ebx, eax
jmp	short loc_71EAB4

loc_71EAB2:
mov	ebx, esi

loc_71EAB4:
test	ebx, ebx
jg	short loc_71EA82
pop	edi
pop	esi

loc_71EABA:
mov	eax, ebp
pop	ebp
pop	ebx
retn
sub_71EA70 endp

align 10h



sub_71EAC0 proc	near
mov	edx, [ecx+8]
push	ebx
push	esi
mov	esi, [edx+10h]
xor	eax, eax
push	edi
test	esi, esi
jbe	short loc_71EAF2
mov	edi, esi

loc_71EAD1:
cmp	eax, edi
jnb	short loc_71EADD
mov	ecx, [edx+0Ch]
mov	ecx, [ecx+eax*4]
jmp	short loc_71EADF

loc_71EADD:
xor	ecx, ecx

loc_71EADF:
mov	ecx, [ecx+0Ch]
mov	ebx, 600h
test	[ecx+16h], bx
jnz	short loc_71EAF8
inc	eax
cmp	eax, esi
jb	short loc_71EAD1

loc_71EAF2:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn

loc_71EAF8:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn
sub_71EAC0 endp

align 10h



sub_71EB00 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8

sub	esp, 0Ch
test	byte ptr [ecx+14Eh], 8
jz	short loc_71EB12
xor	eax, eax
add	esp, 0Ch
retn

loc_71EB12:
mov	eax, [ecx+11Ch]
test	eax, eax
jz	short loc_71EB2A
test	byte ptr [eax+68h], 1
mov	dword ptr [esp+0Ch+var_8], 4B0h
jz	short loc_71EB32

loc_71EB2A:
mov	dword ptr [esp+0Ch+var_8], 0

loc_71EB32:
mov	eax, [ecx+108h]
fldz
test	eax, eax
jbe	short loc_71EB51
mov	[esp+0Ch+var_C], eax
fild	[esp+0Ch+var_C]
jge	short loc_71EB4C
fadd	ds:flt_15FCC08

loc_71EB4C:
fstp	[esp+0Ch+var_C]
jmp	short loc_71EB54

loc_71EB51:
fst	[esp+0Ch+var_C]

loc_71EB54:
fld	[esp+0Ch+var_C]
fld	dword ptr [ecx+44h]
fsub	dword ptr [ecx+3Ch]
fstp	[esp+0Ch+var_C]
fsub	[esp+0Ch+var_C]
fiadd	dword ptr [esp+0Ch+var_8]
fstp	dword ptr [esp+0Ch+var_8]
fld	dword ptr [esp+0Ch+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_71EB7C
fstp	st
jmp	short loc_71EB7E

loc_71EB7C:
fstp	st(1)

loc_71EB7E:
fnstcw	word ptr [esp+0Ch+var_C]
movzx	eax, word ptr [esp+0Ch+var_C]
fstp	dword ptr [esp+0Ch+var_8]
fld	dword ptr [esp+0Ch+var_8]
or	eax, 0C00h
mov	dword ptr [esp+0Ch+var_8], eax
fldcw	word ptr [esp+0Ch+var_8]
fistp	[esp+0Ch+var_8]
mov	eax, dword ptr [esp+0Ch+var_8]
fldcw	word ptr [esp+0Ch+var_C]
add	esp, 0Ch
retn
sub_71EB00 endp

align 10h



sub_71EBB0 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_71EBC8
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_71EBC8:
mov	ecx, esi
pop	esi
jmp	sub_71EB00
sub_71EBB0 endp




sub_71EBD0 proc	near

var_8= dword ptr -8

sub	esp, 8
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_71EBEB
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_71EBEB:
movzx	eax, word ptr [esi+148h]
cmp	[esi+118h], ax
jz	loc_71ED28
mov	ecx, [esi+28h]
push	ebp
xor	ebp, ebp
cmp	ecx, ebp
jnz	short loc_71EC21
movzx	eax, ax
mov	[esi+118h], ax
mov	[esi+114h], ebp
mov	eax, ebp
pop	ebp
pop	esi
add	esp, 8
retn

loc_71EC21:
mov	eax, [esi+11Ch]
mov	edx, [esi+24h]
push	ebx
mov	ebx, ecx
lea	ecx, [ebx-1]
push	edi
mov	edi, [edx+ecx*4]
test	eax, eax
jz	short loc_71EC3E
test	byte ptr [eax+68h], 1
jz	short loc_71EC5E

loc_71EC3E:
mov	eax, [edi]
shr	eax, 1Fh
test	al, 1
jz	short loc_71EC4D
movzx	edi, byte ptr [edi+0Bh]
jmp	short loc_71EC50

loc_71EC4D:
mov	edi, [edi+20h]

loc_71EC50:
test	edi, edi
jnz	short loc_71EC5E
test	ecx, ecx
jl	short loc_71EC59
dec	ecx

loc_71EC59:
mov	ebp, 1

loc_71EC5E:
cmp	ecx, ebx
jnb	loc_71ED02
test	ecx, ecx
jl	loc_71ED02
lea	edi, [edx+ecx*4]
mov	edx, [edi]
mov	eax, [edx]
shr	eax, 1Fh
and	al, 1
jz	short loc_71EC82
movzx	ebx, word ptr [edx+16h]
jmp	short loc_71EC85

loc_71EC82:
mov	ebx, [edx+18h]

loc_71EC85:
mov	edx, [edx+10h]
add	edx, ebx
mov	[esp+18h+var_8], edx
fild	[esp+18h+var_8]
fsub	dword ptr [esi+48h]
fadd	dword ptr [esi+40h]
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]

loc_71ECA0:
cmp	ecx, [esi+28h]
jnb	short loc_71ECDD
test	ecx, ecx
jl	short loc_71ECDD
mov	eax, [edi]
test	ebp, ebp
jbe	short loc_71ECD6
mov	edx, [eax]
shr	edx, 1Fh
test	dl, 1
jz	short loc_71ECC2
mov	eax, [eax+10h]
mov	[esp+18h+var_8], eax
jmp	short loc_71ECC9

loc_71ECC2:
mov	edx, [eax+10h]
mov	[esp+18h+var_8], edx

loc_71ECC9:
fild	[esp+18h+var_8]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jnp	short loc_71ECDD

loc_71ECD6:
dec	ecx
sub	edi, 4
inc	ebp
jmp	short loc_71ECA0

loc_71ECDD:
movzx	eax, word ptr [esi+148h]
fstp	st
mov	ecx, [esi+28h]
pop	edi
sub	ecx, ebp
pop	ebx
mov	[esi+118h], ax
pop	ebp
mov	[esi+114h], ecx
mov	eax, ecx
pop	esi
add	esp, 8
retn

loc_71ED02:
movzx	eax, word ptr [esi+148h]
pop	edi
pop	ebx
mov	dword ptr [esi+114h], 0
mov	[esi+118h], ax
mov	eax, [esi+114h]
pop	ebp
pop	esi
add	esp, 8
retn

loc_71ED28:
mov	eax, [esi+114h]
pop	esi
add	esp, 8
retn
sub_71EBD0 endp

align 10h



sub_71ED40 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4

sub	esp, 28h
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+14h]
xor	esi, esi
cmp	ecx, esi
jnz	short loc_71ED58
pop	edi
xor	eax, eax
pop	esi
add	esp, 28h
retn

loc_71ED58:
push	7FFFFFFFh
call	sub_73EF30
cmp	eax, esi
jnz	short loc_71EDA7
mov	ecx, [edi+14h]
or	eax, 0FFFFFFFFh
mov	[esp+30h+var_20], eax
mov	[esp+30h+var_C], eax
lea	eax, [esp+30h+var_28]
push	eax
mov	[esp+34h+var_1C], esi
mov	[esp+34h+var_18], esi
mov	[esp+34h+var_8], esi
mov	[esp+34h+var_28], esi
mov	[esp+34h+var_24], esi
mov	[esp+34h+var_14], 7FFFFFFFh
mov	[esp+34h+var_10], 0FF000000h
mov	[esp+34h+var_4], 18h
call	sub_7404E0

loc_71EDA7:
pop	edi
pop	esi
add	esp, 28h
retn
sub_71ED40 endp

align 10h



sub_71EDB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
lea	ecx, [eax+eax*2]
lea	ecx, [edx+ecx*4-0Ch]
test	eax, eax
jbe	short locret_71EDE5
push	esi
push	edi
lea	esi, [ecx+8]
mov	edi, eax
lea	ebx, [ebx+0]

loc_71EDD0:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_71EDDB
call	sub_64A430

loc_71EDDB:
sub	esi, 0Ch
sub	edi, 1
jnz	short loc_71EDD0
pop	edi
pop	esi

locret_71EDE5:
retn
sub_71EDB0 endp

align 10h



sub_71EDF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_71EE20
mov	eax, [edi]
test	eax, eax
jz	short loc_71EE15
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_71EE15:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_71EE20:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_71EE52
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*2]
shl	ebx, 4
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_71EE52:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*2]
shl	eax, 4
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_71EDF0 endp

align 10h



sub_71EE80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	ebx
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+14h+arg_4]
push	offset sub_71DF10
lea	edx, [esp+18h+var_8]
push	edx
mov	[esp+1Ch+var_8], eax
mov	eax, [esi+4]
push	eax
push	0
push	esi
mov	[esp+28h+var_4], ecx
call	sub_71EA70
add	esp, 14h
cmp	eax, [esi+4]
jnb	short loc_71EEFD
mov	edx, [esp+14h+var_4]
lea	edi, [eax+eax*2]
mov	eax, [esi]
shl	edi, 4
movzx	ecx, byte ptr [edi+eax+2Ch]
lea	ebx, [edi+eax]
mov	eax, [esp+14h+var_8]
push	0
push	ecx
push	ebx
push	edx
push	eax
call	sub_71DE70
add	esp, 14h
test	eax, eax
jnz	short loc_71EEFD
mov	eax, [esp+14h+arg_8]
test	eax, eax
jz	short loc_71EEEE
movzx	ecx, byte ptr [ebx+2Ch]
mov	[eax], ecx

loc_71EEEE:
mov	edx, [esi]
mov	eax, [edi+edx+28h]
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch

loc_71EEFD:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
add	esp, 8
retn	0Ch
sub_71EE80 endp

align 10h



sub_71EF10 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_71EF23
call	sub_64A420

loc_71EF23:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_71EF2E
call	sub_64A430

loc_71EF2E:
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	dx, [edi+8]
mov	[esi+8], dx
mov	eax, [edi+0Ch]
mov	[esi+0Ch], eax
mov	ecx, [edi+10h]
mov	[esi+10h], ecx
mov	edx, [edi+14h]
mov	[esi+14h], edx
mov	eax, [edi+18h]
mov	[esi+18h], eax
mov	ecx, [edi+1Ch]
pop	edi
mov	[esi+1Ch], ecx
mov	eax, esi
pop	esi
retn	4
sub_71EF10 endp

align 10h



sub_71EF70 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
xor	bl, bl
test	byte ptr [esi+150h], 3
push	edi
jz	short loc_71EF8C
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_71EF8C:
mov	ecx, esi
call	sub_71EB00
mov	edi, [esp+0Ch+arg_0]
cmp	edi, eax
jbe	short loc_71EF9D
mov	edi, eax

loc_71EF9D:
cmp	[esi+4Ch], edi
jz	short loc_71EFC3
push	edi
lea	ecx, [esi+24h]
call	sub_7D9B40
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_71EFBB
mov	eax, [ecx]
mov	edx, [eax+8]
push	edi
push	esi
call	edx

loc_71EFBB:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4

loc_71EFC3:
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	4
sub_71EF70 endp

align 10h



sub_71EFD0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	esi, ecx
xor	bl, bl
call	sub_71EBD0
mov	edi, [esp+0Ch+arg_0]
cmp	edi, eax
jbe	short loc_71EFE6
mov	edi, eax

loc_71EFE6:
cmp	[esi+38h], edi
jz	short loc_71F00C
push	edi
lea	ecx, [esi+24h]
call	sub_733D20
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_71F004
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	edi
push	esi
call	edx

loc_71F004:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4

loc_71F00C:
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	4
sub_71EFD0 endp

align 10h



sub_71F020 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, [ecx+28h]
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
mov	[esp+24h+var_1C], ecx
cmp	esi, eax
jb	short loc_71F037
lea	esi, [eax-1]

loc_71F037:
lea	eax, [ecx+24h]
mov	edi, esi
mov	[esp+24h+var_C], esi
test	eax, eax
jz	loc_71F12D
mov	ecx, [eax+4]
mov	[esp+24h+var_18], ecx
cmp	esi, ecx
jnb	loc_71F12D
test	esi, esi
jl	loc_71F12D
mov	eax, [eax]
mov	edx, [eax+esi*4]
lea	ecx, [eax+esi*4]
mov	eax, [edx]
shr	eax, 1Fh
and	al, 1
push	ebx
push	ebp
jz	short loc_71F078
movzx	ebp, word ptr [edx+16h]
jmp	short loc_71F07B

loc_71F078:
mov	ebp, [edx+18h]

loc_71F07B:
test	al, al
jz	short loc_71F08B
mov	bl, [edx+1Dh]
test	bl, bl
jle	short loc_71F099
movsx	ebx, bl
jmp	short loc_71F09B

loc_71F08B:
movzx	ebx, word ptr [edx+28h]
test	bx, bx
jle	short loc_71F099
movsx	ebx, bx
jmp	short loc_71F09B

loc_71F099:
xor	ebx, ebx

loc_71F09B:
mov	edx, [edx+10h]
add	ebx, ebp
mov	ebp, [esp+2Ch+var_1C]
add	edx, ebx
mov	[esp+2Ch+arg_0], edx
fild	[esp+2Ch+arg_0]
mov	edx, [esp+2Ch+var_C]
fsub	dword ptr [ebp+48h]
fadd	dword ptr [ebp+40h]
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]

loc_71F0C0:
cmp	edx, [esp+2Ch+var_18]
jnb	short loc_71F0F0
test	edx, edx
jl	short loc_71F0F0
mov	eax, [ecx]
mov	ebx, [eax]
mov	eax, [eax+10h]
mov	[esp+2Ch+arg_0], eax
fild	[esp+2Ch+arg_0]
shr	ebx, 1Fh
fcomp	st(1)
fnstsw	ax
test	ah, 5
jnp	short loc_71F0F0
mov	esi, edi
dec	edi
dec	edx
sub	ecx, 4
test	edi, edi
jge	short loc_71F0C0

loc_71F0F0:
mov	ecx, ebp
fstp	st
xor	bl, bl
call	sub_71EBD0
cmp	esi, eax
jbe	short loc_71F101
mov	esi, eax

loc_71F101:
cmp	[ebp+38h], esi
jz	short loc_71F121
push	esi
lea	ecx, [ebp+24h]
call	sub_733D20
mov	ecx, [ebp+10h]
test	ecx, ecx
jz	short loc_71F11F
mov	edx, [ecx]
mov	eax, [edx+0Ch]
push	esi
push	ebp
call	eax

loc_71F11F:
mov	bl, 1

loc_71F121:
pop	ebp
mov	al, bl
pop	ebx
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_71F12D:
pop	edi
xor	al, al
pop	esi
add	esp, 1Ch
retn	4
sub_71F020 endp

align 10h



sub_71F140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_71F181
sub	eax, esi
push	eax
lea	eax, [esi+esi*2]
shl	eax, 4
add	eax, [edi]
push	eax
call	sub_6C7310
mov	ecx, [edi+8]
shr	ecx, 1
add	esp, 8
cmp	esi, ecx
jnb	short loc_71F19A
mov	edx, [esp+8+arg_0]
push	esi
push	edx
mov	ecx, edi
call	sub_71EDF0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_71F181:
cmp	esi, [edi+8]
jb	short loc_71F19A
mov	ecx, [esp+8+arg_0]
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax
push	ecx
mov	ecx, edi
call	sub_71EDF0

loc_71F19A:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_71F140 endp

align 10h



sub_71F1B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [eax]
mov	edx, [ecx]
mov	[esi], edx
mov	ebx, [eax+4]
mov	eax, [ebx]
push	edi
test	eax, eax
jz	short loc_71F1CA
inc	dword ptr [eax]

loc_71F1CA:
mov	edi, [esi+4]
test	edi, edi
jz	short loc_71F201
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_71F1F6
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx
mov	eax, [ebx]
pop	edi
mov	[esi+4], eax
pop	esi
pop	ebx
retn	4

loc_71F1F6:
mov	ecx, [ebx]
pop	edi
mov	[esi+4], ecx
pop	esi
pop	ebx
retn	4

loc_71F201:
mov	edx, [ebx]
pop	edi
mov	[esi+4], edx
pop	esi
pop	ebx
retn	4
sub_71F1B0 endp

align 10h



sub_71F210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ecx]
lea	ecx, [esi+esi*2]
cmp	dword ptr [edi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [edi+ecx*4+8]
mov	eax, esi
jz	short loc_71F267
mov	ebx, [edi+4]
mov	edx, [ecx+4]
and	edx, ebx
cmp	edx, esi
jnz	short loc_71F267
push	ebp

loc_71F236:
mov	edx, [ecx+4]
mov	ebp, edx
and	ebp, ebx
cmp	ebp, esi
jnz	short loc_71F24D
mov	ebp, [esp+10h+arg_0]
mov	ebp, [ebp+0]
cmp	edx, [ebp+0]
jz	short loc_71F260

loc_71F24D:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_71F25D
lea	ecx, [eax+eax*2]
lea	ecx, [edi+ecx*4+8]
jmp	short loc_71F236

loc_71F25D:
or	eax, 0FFFFFFFFh

loc_71F260:
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	8

loc_71F267:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_71F210 endp




sub_71F270 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	esi
mov	esi, ecx
mov	[esi], eax
mov	eax, [ebx+4]
push	edi
test	eax, eax
jz	short loc_71F286
inc	dword ptr [eax]

loc_71F286:
mov	edi, [esi+4]
test	edi, edi
jz	short loc_71F2A7
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_71F2A7
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_71F2A7:
mov	ecx, [ebx+4]
pop	edi
mov	[esi+4], ecx
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_71F270 endp

align 10h



sub_71F2C0 proc	near

var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	esi
mov	esi, ecx
mov	ecx, [esp+18h+arg_0]
fld	dword ptr [ecx]
fld	dword ptr [esi+0F8h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_71F315
fld	dword ptr [ecx+8]
fld	dword ptr [esi+100h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_71F315
fld	dword ptr [ecx+4]
fld	dword ptr [esi+0FCh]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_71F315
fld	dword ptr [ecx+0Ch]
fld	dword ptr [esi+104h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_71F549

loc_71F315:
fld	dword ptr [esi+100h]
push	ebp
fsub	dword ptr [esi+0F8h]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fnstcw	word ptr [esp+1Ch+arg_0]
movzx	eax, word ptr [esp+1Ch+arg_0]
or	eax, 0C00h
mov	[esp+1Ch+var_14], eax
fldcw	word ptr [esp+1Ch+var_14]
fistp	[esp+1Ch+var_10]
mov	edx, dword ptr [esp+1Ch+var_10]
fldcw	word ptr [esp+1Ch+arg_0]
fld	dword ptr [esi+104h]
fsub	dword ptr [esi+0FCh]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fnstcw	word ptr [esp+1Ch+arg_0]
movzx	eax, word ptr [esp+1Ch+arg_0]
or	eax, 0C00h
cmp	[esp+1Ch+arg_4], 1
mov	[esp+1Ch+var_14], eax
fldcw	word ptr [esp+1Ch+var_14]
fistp	[esp+1Ch+var_10]
mov	ebp, dword ptr [esp+1Ch+var_10]
fldcw	word ptr [esp+1Ch+arg_0]
fld	dword ptr [ecx+4]
fstp	[esp+1Ch+arg_0]
fld	dword ptr [ecx+8]
fstp	[esp+1Ch+var_14]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [esp+1Ch+var_10]
fld	dword ptr [ecx]
fstp	dword ptr [esi+0F8h]
fld	[esp+1Ch+arg_0]
fstp	dword ptr [esi+0FCh]
fld	[esp+1Ch+var_14]
fstp	dword ptr [esi+100h]
fld	dword ptr [esp+1Ch+var_10]
fstp	dword ptr [esi+104h]
fld	dword ptr [esi+0F8h]
fstp	dword ptr [esp+1Ch+var_10]
fld	dword ptr [esi+0FCh]
fstp	dword ptr [esp+1Ch+var_10+4]
fld	dword ptr [esi+100h]
fstp	[esp+1Ch+var_8]
fld	dword ptr [esi+104h]
fstp	[esp+1Ch+var_4]
fld	dword ptr [esp+1Ch+var_10]
fld	ds:dbl_1440130
fadd	st(1), st
fxch	st(1)
fstp	dword ptr [esp+1Ch+var_10]
fld	[esp+1Ch+var_8]
fsub	st, st(1)
fstp	[esp+1Ch+var_8]
fld	dword ptr [esp+1Ch+var_10+4]
fadd	st, st(1)
fstp	dword ptr [esp+1Ch+var_10+4]
fsubr	[esp+1Ch+var_4]
fstp	[esp+1Ch+var_4]
fld	dword ptr [esp+1Ch+var_10]
fstp	dword ptr [esi+3Ch]
fld	dword ptr [esp+1Ch+var_10+4]
fstp	dword ptr [esi+40h]
fld	[esp+1Ch+var_8]
fstp	dword ptr [esi+44h]
fld	[esp+1Ch+var_4]
fstp	dword ptr [esi+48h]
jnz	loc_71F548
fld	dword ptr [esi+100h]
push	ebx
fsub	dword ptr [esi+0F8h]
mov	bl, [esi+14Ch]
push	edi
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_0]
fnstcw	word ptr [esp+24h+arg_0]
movzx	eax, word ptr [esp+24h+arg_0]
or	eax, 0C00h
mov	[esp+24h+arg_4], eax
fldcw	word ptr [esp+24h+arg_4]
fistp	[esp+24h+var_10]
mov	ecx, dword ptr [esp+24h+var_10]
fldcw	word ptr [esp+24h+arg_0]
fld	dword ptr [esi+104h]
fsub	dword ptr [esi+0FCh]
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_0]
fnstcw	word ptr [esp+24h+arg_0]
movzx	eax, word ptr [esp+24h+arg_0]
or	eax, 0C00h
mov	[esp+24h+arg_4], eax
fldcw	word ptr [esp+24h+arg_4]
fistp	[esp+24h+var_10]
mov	edi, dword ptr [esp+24h+var_10]
fldcw	word ptr [esp+24h+arg_0]
test	bl, 30h
jnz	loc_71F53F
cmp	edx, ecx
jz	short loc_71F4E1
test	byte ptr [esi+14Eh], 8
jnz	short loc_71F53F
cmp	ecx, edx
jnb	short loc_71F4D1
test	byte ptr [esi+98h], 20h
jnz	short loc_71F53F

loc_71F4D1:
test	bl, 3
jnz	short loc_71F53F
mov	ecx, esi
call	sub_71EAC0
test	al, al
jnz	short loc_71F53F

loc_71F4E1:
cmp	ebp, edi
jz	short loc_71F4FF
shr	bl, 2
and	bl, 3
jz	short loc_71F4F2
cmp	bl, 1
jnz	short loc_71F53F

loc_71F4F2:
cmp	edi, ebp
jnb	short loc_71F4FF
test	byte ptr [esi+98h], 20h
jnz	short loc_71F53F

loc_71F4FF:
inc	word ptr [esi+148h]
mov	ecx, esi
call	sub_71EBB0
cmp	[esi+4Ch], eax
jbe	short loc_71F51A
push	eax
mov	ecx, esi
call	sub_71EF70

loc_71F51A:
mov	ecx, esi
call	sub_71EBD0
cmp	[esi+38h], eax
jbe	short loc_71F52E
push	eax
mov	ecx, esi
call	sub_71EFD0

loc_71F52E:
or	byte ptr [esi+98h], 1
pop	edi
pop	ebx
pop	ebp
pop	esi
add	esp, 14h
retn	8

loc_71F53F:
or	byte ptr [esi+150h], 2
pop	edi
pop	ebx

loc_71F548:
pop	ebp

loc_71F549:
pop	esi
add	esp, 14h
retn	8
sub_71F2C0 endp




sub_71F550 proc	near
mov	eax, ecx
fldz
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
fst	dword ptr [eax+10h]
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
fst	dword ptr [eax+40h]
fst	dword ptr [eax+44h]
mov	[eax+24h], ecx
fstp	dword ptr [eax+48h]
mov	[eax+28h], ecx
fld1
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
or	edx, 0FFFFFFFFh
mov	[eax+20h], edx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
mov	[eax+58h], ecx
push	esi
xor	esi, esi
mov	[eax+54h], si
mov	[eax+60h], edx
mov	[eax+5Ch], ecx
mov	[eax+64h], ecx
mov	[eax+68h], ecx
mov	[eax+6Ch], ecx
mov	[eax+70h], ecx
xor	edx, edx
mov	[eax+74h], dx
mov	[eax+78h], ecx
mov	[eax+7Ch], ecx
mov	[eax+80h], ecx
mov	[eax+84h], ecx
mov	[eax+88h], ecx
mov	[eax+8Ch], ecx
mov	[eax+90h], ecx
mov	[eax+94h], ecx
fstp	dword ptr [eax+0A0h]
mov	[eax+98h], ecx
mov	[eax+9Ch], ecx
mov	[eax+0A4h], cl
mov	[eax+0A5h], cl
mov	[eax+0A8h], ecx
pop	esi
retn
sub_71F550 endp

align 10h



sub_71F610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fldz
mov	eax, [esp+arg_0]
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	[esi], ebx
mov	[esi+4], ebx
fst	dword ptr [esi+10h]
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
fst	dword ptr [esi+40h]
mov	[esi+2Ch], eax
fst	dword ptr [esi+44h]
mov	eax, [esp+8+arg_4]
fstp	dword ptr [esi+48h]
push	ebx
push	eax
lea	ecx, [esi+4Ch]
mov	dword ptr [esi+20h], 0FFFFFFFFh
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+30h], eax
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
call	sub_7273A0
fld1
mov	[esi+6Ch], ebx
mov	[esi+70h], ebx
xor	ecx, ecx
mov	[esi+74h], cx
mov	[esi+78h], ebx
mov	[esi+7Ch], ebx
mov	[esi+80h], ebx
mov	[esi+84h], ebx
mov	[esi+88h], ebx
mov	[esi+8Ch], ebx
mov	[esi+90h], ebx
mov	[esi+94h], ebx
fstp	dword ptr [esi+0A0h]
mov	[esi+98h], ebx
mov	[esi+9Ch], ebx
mov	[esi+0A4h], bl
mov	[esi+0A5h], bl
mov	[esi+0A8h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_71F610 endp

align 10h



sub_71F6D0 proc	near

var_2C=	byte ptr -2Ch

sub	esp, 2Ch
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+4Ch]
mov	ecx, edi
call	sub_727450
mov	eax, [eax+4]
mov	[esi+70h], eax
mov	eax, [esi+1Ch]
test	eax, eax
jz	loc_71F7BD
lea	ecx, [eax+14h]
call	sub_725AB0
test	eax, eax
jbe	loc_71F7BD
mov	ecx, [esi+30h]
mov	eax, [ecx+1Ch]
mov	ecx, [esi+1Ch]
add	eax, [esi+70h]
mov	edx, [ecx+30h]
cmp	eax, edx
jb	loc_71F7BD
jnz	loc_71F7A1
add	ecx, 14h
call	sub_725AB0
cmp	[esi+28h], eax
jnb	short loc_71F7A1
mov	ecx, edi
call	sub_727450
mov	ecx, [esi+28h]
mov	edx, [eax+4]
mov	eax, [esi+1Ch]
add	edx, ecx
mov	[esi+70h], edx
mov	edx, [eax+14h]
mov	dx, [edx+ecx*2]
push	ecx
lea	ecx, [eax+14h]
mov	[esi+74h], dx
call	sub_728880
mov	ecx, edi
mov	ebx, eax
call	sub_727450
mov	ecx, [esi+1Ch]
mov	eax, [eax]
mov	edi, [ecx+10h]
push	ebx
lea	edx, [esp+3Ch+var_2C]
push	edx
mov	ecx, eax
call	sub_7013B0
push	eax
mov	ecx, edi
call	sub_702780
mov	ecx, [esi+6Ch]
add	esi, 6Ch
mov	edi, eax
test	ecx, ecx
jz	short loc_71F78D
call	sub_64A430

loc_71F78D:
lea	ecx, [esp+38h+var_2C]
mov	[esi], edi
call	sub_694380
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 2Ch
retn

loc_71F7A1:
mov	ecx, edi
call	sub_727450
mov	ebx, eax
mov	eax, [esi+1Ch]
lea	ecx, [eax+14h]
call	sub_725AB0
mov	ecx, [ebx+4]
add	ecx, eax
mov	[esi+70h], ecx

loc_71F7BD:
push	ebp
mov	ecx, edi
call	sub_727450
mov	ebx, eax
mov	ecx, [ebx]
lea	ebp, [esi+6Ch]
test	ecx, ecx
jz	short loc_71F7D5
call	sub_64A420

loc_71F7D5:
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_71F7E1
call	sub_64A430

loc_71F7E1:
mov	edx, [ebx]
mov	[ebp+0], edx
mov	eax, [esi+2Ch]
test	byte ptr [eax+14Eh], 10h
jz	short loc_71F813
mov	ecx, edi
call	sub_727450
cmp	word ptr [eax+8], 0
jz	short loc_71F813
mov	eax, ebp
pop	ebp
mov	ecx, 2Ah
pop	edi
mov	[esi+74h], cx
pop	esi
pop	ebx
add	esp, 2Ch
retn

loc_71F813:
mov	ecx, edi
call	sub_727450
mov	dx, [eax+8]
mov	eax, ebp
pop	ebp
pop	edi
mov	[esi+74h], dx
pop	esi
pop	ebx
add	esp, 2Ch
retn
sub_71F6D0 endp

align 10h



sub_71F830 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+6Ch]
test	ecx, ecx
jz	short loc_71F83F
call	sub_64A430

loc_71F83F:
mov	ecx, [esi+4Ch]
test	ecx, ecx
jz	short loc_71F84B
call	sub_64A430

loc_71F84B:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_71F857
call	sub_64A400

loc_71F857:
mov	esi, [esi+4]
test	esi, esi
jz	short loc_71F878
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_71F878
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_71F878:
pop	esi
retn
sub_71F830 endp

align 10h



sub_71F880 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esi], eax
mov	eax, [edi+4]
test	eax, eax
jz	short loc_71F895
inc	dword ptr [eax]

loc_71F895:
push	ebx
mov	ebx, [esi+4]
test	ebx, ebx
jz	short loc_71F8B7
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_71F8B7
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_71F8B7:
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	edx, [edi+8]
mov	[esi+8], edx
mov	eax, [edi+0Ch]
mov	[esi+0Ch], eax
fld	dword ptr [edi+10h]
fstp	dword ptr [esi+10h]
mov	ecx, [edi+14h]
mov	[esi+14h], ecx
mov	edx, [edi+18h]
mov	[esi+18h], edx
mov	eax, [edi+1Ch]
pop	ebx
test	eax, eax
jz	short loc_71F8E6
inc	dword ptr [eax+4]

loc_71F8E6:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_71F8F2
call	sub_64A400

loc_71F8F2:
mov	eax, [edi+1Ch]
mov	[esi+1Ch], eax
mov	ecx, [edi+20h]
mov	[esi+20h], ecx
mov	edx, [edi+24h]
mov	[esi+24h], edx
mov	eax, [edi+28h]
mov	[esi+28h], eax
mov	ecx, [edi+2Ch]
mov	[esi+2Ch], ecx
mov	edx, [edi+30h]
mov	[esi+30h], edx
mov	eax, [edi+34h]
mov	[esi+34h], eax
mov	ecx, [edi+38h]
mov	[esi+38h], ecx
mov	edx, [edi+3Ch]
mov	[esi+3Ch], edx
fld	dword ptr [edi+40h]
fstp	dword ptr [esi+40h]
lea	eax, [edi+4Ch]
fld	dword ptr [edi+44h]
push	eax
fstp	dword ptr [esi+44h]
lea	ecx, [esi+4Ch]
fld	dword ptr [edi+48h]
fstp	dword ptr [esi+48h]
call	sub_71EF10
mov	ecx, [edi+6Ch]
test	ecx, ecx
jz	short loc_71F952
call	sub_64A420

loc_71F952:
mov	ecx, [esi+6Ch]
test	ecx, ecx
jz	short loc_71F95E
call	sub_64A430

loc_71F95E:
mov	ecx, [edi+6Ch]
mov	[esi+6Ch], ecx
mov	edx, [edi+70h]
mov	[esi+70h], edx
mov	ax, [edi+74h]
mov	[esi+74h], ax
mov	ecx, [edi+78h]
mov	[esi+78h], ecx
mov	edx, [edi+7Ch]
mov	[esi+7Ch], edx
mov	eax, [edi+80h]
mov	[esi+80h], eax
mov	ecx, [edi+84h]
mov	[esi+84h], ecx
mov	edx, [edi+88h]
mov	[esi+88h], edx
mov	eax, [edi+8Ch]
mov	[esi+8Ch], eax
mov	ecx, [edi+90h]
mov	[esi+90h], ecx
mov	edx, [edi+94h]
mov	[esi+94h], edx
mov	eax, [edi+98h]
mov	[esi+98h], eax
mov	ecx, [edi+9Ch]
mov	[esi+9Ch], ecx
fld	dword ptr [edi+0A0h]
fstp	dword ptr [esi+0A0h]
mov	dl, [edi+0A4h]
mov	[esi+0A4h], dl
mov	al, [edi+0A5h]
mov	[esi+0A5h], al
mov	ecx, [edi+0A8h]
pop	edi
mov	[esi+0A8h], ecx
mov	eax, esi
pop	esi
retn	4
sub_71F880 endp

align 10h



sub_71FA20 proc	near

var_7C=	dword ptr -7Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h

sub	esp, 68h
push	ebx
push	ebp
push	esi
mov	esi, ecx
fld	dword ptr [esi+20h]
push	edi
fstp	[esp+78h+var_60]
fldz
fld	[esp+78h+var_60]
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FCC48
test	ah, 41h
jnz	short loc_71FA49
fadd	st(1), st
jmp	short loc_71FA4B

loc_71FA49:
fsub	st(1), st

loc_71FA4B:
fxch	st(1)
call	__ftol2_sse
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_71FA79
test	eax, eax
jl	short loc_71FA6C
mov	edx, 0FFBFh
and	[ecx+6], dx
mov	[ecx+2], ax
jmp	short loc_71FA79

loc_71FA6C:
mov	edx, eax
neg	edx
or	word ptr [ecx+6], 40h
mov	[ecx+2], dx

loc_71FA79:
cmp	dword ptr [esi+14h], 0
jz	short loc_71FA82
mov	eax, [esi+24h]

loc_71FA82:
add	[esi+44h], eax
mov	eax, [esi+8]
test	byte ptr [eax+16h], 1
jz	short loc_71FAC7
mov	cx, [eax+16h]
mov	edx, 600h
and	cx, dx
mov	edx, 200h
cmp	cx, dx
jz	short loc_71FABB
test	byte ptr [eax+16h], 1
jz	short loc_71FAC7
mov	cx, [eax+16h]
mov	edx, 600h
and	cx, dx
cmp	cx, dx
jnz	short loc_71FAC7

loc_71FABB:
mov	ecx, [esi+90h]
add	[esi+44h], ecx
add	[esi+48h], ecx

loc_71FAC7:
mov	cl, [eax+16h]
shr	cl, 3
test	cl, 1
jz	short loc_71FAE7
movsx	eax, word ptr [eax+10h]
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
mov	[esp+78h+var_60], edx
fild	[esp+78h+var_60]
jmp	short loc_71FAEA

loc_71FAE7:
fld	dword ptr [esi+58h]

loc_71FAEA:
fstp	[esp+78h+var_60]
fld	dword ptr [esi+54h]
fadd	dword ptr [esi+50h]
fstp	[esp+78h+var_64]
fld	[esp+78h+var_64]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_71FB09
fadd	st, st(1)
jmp	short loc_71FB0B

loc_71FB09:
fsub	st, st(1)

loc_71FB0B:
call	__ftol2_sse
fld	[esp+78h+var_60]
fcom	st(2)
mov	edi, eax
mov	[esp+78h+var_68], edi
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnz	short loc_71FB29
faddp	st(1), st
jmp	short loc_71FB2B

loc_71FB29:
fsubp	st(1), st

loc_71FB2B:
call	__ftol2_sse
xor	ecx, ecx
mov	[esp+78h+var_64], eax
mov	eax, [esi+44h]
test	eax, eax
setl	cl
mov	ebx, [esi+9Ch]
xor	edx, edx
dec	ecx
and	ecx, eax
mov	eax, [esi+48h]
test	eax, eax
setl	dl
mov	[esi+44h], ecx
dec	edx
and	eax, edx
mov	edx, [esi]
mov	[esi+48h], eax
test	byte ptr [edx+14Ch], 30h
mov	eax, [esi+0A4h]
mov	[esp+78h+var_60], eax
jnz	short loc_71FBB4
cmp	dword ptr [esi+4Ch], 0FFh
ja	short loc_71FBB4
cmp	ebx, 0FFh
ja	short loc_71FBB4
mov	edx, [esp+78h+var_64]
sub	edx, 0FFFFFF80h
cmp	edx, 0FFh
ja	short loc_71FBB4
cmp	edi, 0FFFFh
ja	short loc_71FBB4
test	ecx, ecx
jl	short loc_71FBB4
cmp	ecx, 10000h
jge	short loc_71FBB4
mov	ecx, [esi+52Ch]
push	0
push	eax
push	ebx
call	sub_71E140
jmp	short loc_71FBE0

loc_71FBB4:
mov	ebp, [esi+52Ch]
mov	eax, [ebp+8]
test	eax, eax
jl	short loc_71FBC6
cmp	eax, 0FFFFFFFFh
jnz	short loc_71FBCC

loc_71FBC6:
mov	eax, [ebp+0]
mov	eax, [eax+4]

loc_71FBCC:
mov	ecx, [esp+78h+var_60]
push	1
push	ecx
mov	ecx, [ebp+0]
push	ebx
push	eax
call	sub_735650
inc	dword ptr [ebp+8]

loc_71FBE0:
mov	edx, [esi+40h]
mov	ecx, [edx+20h]
mov	edi, eax
mov	eax, [edi]
shr	eax, 1Fh
and	al, 1
jz	short loc_71FBF6
mov	[edi+4], ecx
jmp	short loc_71FBF9

loc_71FBF6:
mov	[edi+1Ch], ecx

loc_71FBF9:
mov	ecx, [esi+40h]
movzx	ecx, word ptr [ecx+24h]
test	al, al
jz	short loc_71FC0A
mov	[edi+18h], cx
jmp	short loc_71FC0E

loc_71FC0A:
mov	[edi+24h], cx

loc_71FC0E:
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
shr	edx, 1Fh
test	dl, 1
jz	short loc_71FC20
add	ecx, 1Eh
jmp	short loc_71FC23

loc_71FC20:
add	ecx, 2Ah

loc_71FC23:
test	al, al
lea	eax, [edi+1Eh]
jnz	short loc_71FC2D
lea	eax, [edi+2Ah]

loc_71FC2D:
lea	edx, ds:0[ebx*8]
push	edx
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+84h+var_60]
lea	ecx, ds:0[eax*4]
add	esp, 0Ch
push	ecx
mov	ecx, [esi+0Ch]
call	sub_733C80
push	eax
mov	ecx, edi
call	sub_733C80
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi+0Ch]
mov	edx, [eax]
mov	eax, [eax+8]
shr	edx, 1Fh
add	esp, 0Ch
test	dl, 1
jz	short loc_71FC83
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_71FC83
or	eax, 0FFFFFFFFh

loc_71FC83:
mov	ecx, [edi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_71FC9D
mov	edx, [edi+8]
xor	edx, eax
and	edx, offset sub_FFFFFF
xor	[edi+8], edx
jmp	short loc_71FCA0

loc_71FC9D:
mov	[edi+8], eax

loc_71FCA0:
mov	ecx, [edi]
mov	eax, [esi+4Ch]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_71FCB2
mov	[edi+0Bh], al
jmp	short loc_71FCB5

loc_71FCB2:
mov	[edi+20h], eax

loc_71FCB5:
fld	dword ptr [esi+50h]
push	ecx		; float
mov	ecx, edi
fstp	[esp+7Ch+var_7C]
call	sub_6F5FF0
cmp	byte ptr [esi+0B5h], 0
jnz	loc_71FD9F
mov	edx, [esi]
test	byte ptr [edx+14Eh], 8
jz	loc_71FD9F
mov	ebx, [esi+0A8h]
sub	ebx, [esi+0ACh]
jz	loc_71FD9F
mov	eax, [esi+8]
test	byte ptr [eax+16h], 1
jz	loc_71FD9F
mov	ax, [eax+16h]
mov	ecx, 600h
and	ax, cx
mov	edx, 400h
cmp	ax, dx
jnz	loc_71FD9F
fld	dword ptr [esi+2D8h]
fsub	ds:dbl_15FDC20
call	__ftol2_sse
mov	ebp, eax
sub	ebp, [esi+90h]
sub	ebp, [esi+8Ch]
sub	ebp, [esi+88h]
sub	ebp, [esi+48h]
test	ebp, ebp
jle	short loc_71FD9F
xor	edx, edx
mov	eax, ebp
div	ebx
mov	ecx, edi
mov	ebx, eax
lea	eax, [esp+78h+var_5C]
push	eax
call	sub_6F7660

loc_71FD58:
mov	ecx, [esp+78h+var_5C]
test	ecx, ecx
jz	short loc_71FD93
cmp	ecx, [esp+78h+var_58]
jnb	short loc_71FD93
movzx	eax, word ptr [ecx+6]
mov	dl, al
shr	dl, 1
test	dl, 1
jz	short loc_71FD88
shr	al, 6
test	al, 1
movzx	eax, word ptr [ecx+2]
jz	short loc_71FD80
neg	eax

loc_71FD80:
add	eax, ebx
push	eax
call	sub_6F6220

loc_71FD88:
lea	ecx, [esp+78h+var_5C]
call	sub_6F5F90
jmp	short loc_71FD58

loc_71FD93:
add	[esi+44h], ebp
lea	ecx, [esp+78h+var_5C]
call	sub_6F6BF0

loc_71FD9F:
mov	edx, [esi+8Ch]
add	edx, [esi+88h]
mov	eax, [esi+934h]
mov	ecx, [edi]
shr	ecx, 1Fh
mov	[edi+0Ch], edx
mov	[edi+10h], eax
mov	eax, [edi]
mov	ecx, eax
shr	ecx, 1Fh
mov	[esp+78h+var_60], edx
test	cl, 1
jz	short loc_71FDD5
mov	cl, byte ptr [esp+78h+var_64]
mov	[edi+1Dh], cl
jmp	short loc_71FDDE

loc_71FDD5:
mov	cx, word ptr [esp+78h+var_64]
mov	[edi+28h], cx

loc_71FDDE:
mov	ecx, [esi+8]
movzx	ecx, word ptr [ecx+16h]
mov	ebx, [esp+78h+var_68]
shr	ecx, 9
and	ecx, 3
sub	ecx, 1
jz	loc_71FEE1
sub	ecx, 2
jz	short loc_71FE2E
fld	ds:dbl_15FCC48
and	eax, 0CFFFFFFFh
mov	[edi], eax
mov	ecx, [esi+44h]
shr	eax, 1Fh
xor	ebp, ebp
test	al, 1
jz	short loc_71FE23
mov	[edi+14h], cx
mov	[edi+16h], bx
jmp	loc_71FF67

loc_71FE23:
mov	[edi+14h], ecx
mov	[edi+18h], ebx
jmp	loc_71FF67

loc_71FE2E:
and	eax, 0EFFFFFFFh
or	eax, 20000000h
mov	[edi], eax
mov	ecx, [esi+48h]
shr	eax, 1Fh
test	al, 1
jz	short loc_71FE4E
mov	[edi+14h], cx
mov	[edi+16h], bx
jmp	short loc_71FE54

loc_71FE4E:
mov	[edi+14h], ecx
mov	[edi+18h], ebx

loc_71FE54:
mov	ebp, [esi+8Ch]
fld	dword ptr [esi+2D8h]
mov	eax, [esi+48h]
mov	[esp+78h+var_68], ebp
fisub	[esp+78h+var_68]
cdq
sub	eax, edx
sar	eax, 1
fstp	[esp+78h+var_68]
fld	[esp+78h+var_68]
mov	[esp+78h+var_68], eax
fld	ds:dbl_15FCC48
fmul	st(1), st
fild	[esp+78h+var_68]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+78h+var_68]
fldz
fld	[esp+78h+var_68]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_71FEA5
fadd	st, st(1)
jmp	short loc_71FEA7

loc_71FEA5:
fsub	st, st(1)

loc_71FEA7:
call	__ftol2_sse
add	eax, ebp
xor	edx, edx
xor	ebp, ebp
cmp	eax, ebp
setl	dl
dec	edx
and	eax, edx
mov	[edi+0Ch], eax
mov	eax, [esi]
test	byte ptr [eax+14Eh], 1
jnz	short loc_71FED5
test	byte ptr [eax+14Ch], 30h
jz	loc_71FF63

loc_71FED5:
mov	byte ptr [esi+94Ch], 1
jmp	loc_71FF63

loc_71FEE1:
and	eax, 0DFFFFFFFh
or	eax, 10000000h
mov	[edi], eax
mov	ecx, [esi+48h]
shr	eax, 1Fh
test	al, 1
jz	short loc_71FF01
mov	[edi+14h], cx
mov	[edi+16h], bx
jmp	short loc_71FF07

loc_71FF01:
mov	[edi+14h], ecx
mov	[edi+18h], ebx

loc_71FF07:
fld	dword ptr [esi+2D8h]
fstp	[esp+78h+var_68]
fldz
fld	[esp+78h+var_68]
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld	ds:dbl_15FCC48
test	ah, 41h
jnz	short loc_71FF2C
fadd	st(1), st
jmp	short loc_71FF2E

loc_71FF2C:
fsub	st(1), st

loc_71FF2E:
fxch	st(1)
call	__ftol2_sse
sub	eax, [esi+48h]
mov	ecx, 0
sets	cl
dec	ecx
and	eax, ecx
mov	[edi+0Ch], eax
mov	eax, [esi]
test	byte ptr [eax+14Eh], 1
jnz	short loc_71FF5A
test	byte ptr [eax+14Ch], 30h
jz	short loc_71FF61

loc_71FF5A:
mov	byte ptr [esi+94Ch], 1

loc_71FF61:
xor	ebp, ebp

loc_71FF63:
mov	edx, [esp+78h+var_60]

loc_71FF67:
mov	eax, [esi+44h]
mov	ecx, [esi+940h]
add	eax, edx
cmp	eax, ecx
jge	short loc_71FF78
mov	eax, ecx

loc_71FF78:
mov	edi, [esi+934h]
mov	[esi+940h], eax
mov	eax, [esp+78h+var_64]
add	eax, ebx
mov	[esp+78h+var_60], eax
fild	[esp+78h+var_60]
mov	edx, edi
fldz
sub	edx, [esi+938h]
fcomp	st(1)
add	edx, ebx
mov	[esi+944h], edx
fnstsw	ax
test	ah, 5
jp	short loc_71FFB1
faddp	st(1), st
jmp	short loc_71FFB3

loc_71FFB1:
fsubrp	st(1), st

loc_71FFB3:
call	__ftol2_sse
add	eax, edi
mov	[esi+934h], eax
mov	[esi+88h], ebp
mov	[esi+0A4h], ebp
mov	[esi+9Ch], ebp
mov	[esi+28h], ebp
mov	edi, [esi+14h]
cmp	edi, ebp
jz	short loc_71FFF6
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_71FFF6
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_71FFF6:
pop	edi
mov	[esi+14h], ebp
pop	esi
pop	ebp
pop	ebx
add	esp, 68h
retn
sub_71FA20 endp

align 10h



; int __stdcall	sub_720010(int,	float)
sub_720010 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 60h
cmp	eax, [ecx+28h]
jb	short loc_720025
or	eax, 0FFFFFFFFh
add	esp, 60h
retn	8

loc_720025:
mov	edx, [ecx+24h]
fld	[esp+60h+arg_4]
mov	ecx, [ecx+4Ch]
push	ebx
mov	ebx, [edx+eax*4]
mov	edx, [ebx+0Ch]
mov	eax, [ebx]
mov	[esp+64h+arg_0], edx
fisub	[esp+64h+arg_0]
push	ebp
shr	eax, 1Fh
push	esi
and	al, 1
mov	[esp+6Ch+arg_0], ecx
fild	[esp+6Ch+arg_0]
push	edi
test	ecx, ecx
jge	short loc_72005A
fadd	ds:flt_15FCC08

loc_72005A:
faddp	st(1), st
xor	esi, esi
mov	[esp+70h+arg_0], esi
fstp	[esp+70h+arg_4]
test	al, al
jz	short loc_720070
movzx	ebp, byte ptr [ebx+1Ch]
jmp	short loc_720073

loc_720070:
mov	ebp, [ebx+4]

loc_720073:
lea	edi, [ebx+1Eh]
test	al, al
jnz	short loc_72007D
lea	edi, [ebx+2Ah]

loc_72007D:
mov	ecx, ebx
call	sub_733C80
push	eax
push	ebp
push	edi
lea	ecx, [esp+7Ch+var_5C]
call	sub_6F6B80
xor	ebp, ebp

loc_720092:
mov	edi, [esp+70h+var_5C]
test	edi, edi
jz	loc_72012D
cmp	edi, [esp+70h+var_58]
jnb	loc_72012D
movzx	ecx, word ptr [edi+6]
mov	dl, cl
shr	dl, 6
test	dl, 1
movzx	edx, word ptr [edi+2]
jz	short loc_7200BC
neg	edx

loc_7200BC:
add	esi, edx
mov	eax, esi
mov	[esp+70h+var_60], eax
fild	[esp+70h+var_60]
test	eax, eax
jge	short loc_7200D2
fadd	ds:flt_15FCC08

loc_7200D2:
fld	[esp+70h+arg_4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_720103
shr	ecx, 8
fstp	st
mov	[esp+70h+arg_0], esi
test	cl, 1
jnz	short loc_7200F8
movzx	ecx, word ptr [edi+4]
shr	ecx, 0Ch
add	ebp, ecx

loc_7200F8:
lea	ecx, [esp+70h+var_5C]
call	sub_6F5F90
jmp	short loc_720092

loc_720103:
fisub	[esp+70h+arg_0]
shr	edx, 1
mov	[esp+70h+arg_0], edx
fild	[esp+70h+arg_0]
test	edx, edx
jge	short loc_72011B
fadd	ds:flt_15FCC08

loc_72011B:
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_72012D
movzx	edx, word ptr [edi+4]
shr	edx, 0Ch
add	ebp, edx

loc_72012D:
mov	eax, [ebx]
shr	eax, 1Fh
test	al, 1
mov	eax, [ebx+8]
jz	short loc_720148
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_720148
or	eax, 0FFFFFFFFh

loc_720148:
mov	ecx, [esp+70h+var_C]
lea	edi, [eax+ebp]
test	ecx, ecx
jz	short loc_720158
call	sub_64A400

loc_720158:
mov	eax, [esp+70h+var_10]
test	eax, eax
jz	short loc_72017E
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_72017E
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_72017E:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn	8
sub_720010 endp

align 10h



sub_720190 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	ebx, ecx
mov	esi, [ebx+4]
push	edi
lea	edi, [esi+1]
push	edi
push	ebx
call	sub_71F140
cmp	edi, esi
jbe	short loc_7201C5
lea	eax, [esi+esi*2]
shl	eax, 4
add	eax, [ebx]
sub	edi, esi
jz	short loc_7201C5

loc_7201B2:
test	eax, eax
jz	short loc_7201BD
mov	dword ptr [eax+28h], 0

loc_7201BD:
add	eax, 30h
sub	edi, 1
jnz	short loc_7201B2

loc_7201C5:
mov	eax, [ebx+4]
mov	esi, [esp+0Ch+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_7201F4
mov	ecx, [ebx]
lea	edx, [esi+esi*2]
shl	edx, 4
add	ecx, edx
sub	eax, esi
dec	eax
lea	edx, [eax+eax*2]
shl	edx, 4
push	edx
push	ecx
add	ecx, 30h
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7201F4:
lea	eax, [esi+esi*2]
shl	eax, 4
add	eax, [ebx]
jz	short loc_720223
mov	edx, [esp+0Ch+arg_4]
mov	ecx, 0Ah
mov	esi, edx
mov	edi, eax
rep movsd
mov	ecx, [edx+28h]
test	ecx, ecx
jz	short loc_720217
inc	dword ptr [ecx+4]

loc_720217:
mov	ecx, [edx+28h]
mov	[eax+28h], ecx
mov	dl, [edx+2Ch]
mov	[eax+2Ch], dl

loc_720223:
pop	edi
pop	esi
pop	ebx
retn	8
sub_720190 endp

align 10h



sub_720230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
movzx	eax, byte ptr [edi+2Ch]
push	0
push	eax
push	edi
mov	esi, ecx
call	sub_71EE80
test	eax, eax
jnz	short loc_72027A
mov	eax, [esi+4]
movzx	ecx, byte ptr [edi+2Ch]
push	offset sub_71DEE0
lea	edx, [esp+14h+var_8]
push	edx
push	eax
push	0
push	esi
mov	[esp+24h+var_8], edi
mov	[esp+24h+var_4], ecx
call	sub_71EA70
add	esp, 14h
push	edi
push	eax
mov	ecx, esi
call	sub_720190

loc_72027A:
pop	edi
pop	esi
add	esp, 8
retn	4
sub_720230 endp

align 10h



sub_720290 proc	near

var_4= dword ptr -4

push	ecx
push	edi
mov	edi, ecx
cmp	dword ptr [edi+14h], 0
jnz	short loc_7202FF
mov	ecx, dword_1855FC0
push	esi
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0B0h
push	edi
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_7202F4
mov	ecx, esi
call	sub_73F3D0
lea	ecx, [esi+1Ch]
call	sub_6F91A0
fld	ds:flt_1431A30
fst	dword ptr [esi+0A4h]
xor	ecx, ecx
fstp	dword ptr [esi+0A8h]
mov	[esi+0ACh], cx
mov	[edi+14h], esi
mov	eax, esi
pop	esi
pop	edi
pop	ecx
retn

loc_7202F4:
xor	esi, esi
mov	[edi+14h], esi
mov	eax, esi
pop	esi
pop	edi
pop	ecx
retn

loc_7202FF:
mov	eax, [edi+14h]
pop	edi
pop	ecx
retn
sub_720290 endp

align 10h



sub_720310 proc	near

var_4= dword ptr -4

push	ecx
push	edi
mov	edi, ecx
cmp	dword ptr [edi+14h], 0
jnz	short loc_720380
mov	ecx, dword_1855FC0
push	esi
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0B0h
push	edi
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_72037A
mov	ecx, esi
call	sub_73F3D0
lea	ecx, [esi+1Ch]
call	sub_6F91A0
fld	ds:flt_1431A30
fst	dword ptr [esi+0A4h]
xor	ecx, ecx
mov	[esi+0ACh], cx
fstp	dword ptr [esi+0A8h]
mov	[edi+14h], esi
pop	esi
mov	ecx, edi
pop	edi
add	esp, 4
jmp	sub_71ED40

loc_72037A:
xor	esi, esi
mov	[edi+14h], esi
pop	esi

loc_720380:
mov	ecx, edi
pop	edi
add	esp, 4
jmp	sub_71ED40
sub_720310 endp

align 10h



sub_720390 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, ecx
cmp	dword ptr [esi+14h], 0
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	[esi+1Ch], ebp
mov	[esi+20h], edi
jnz	short loc_720402
mov	ecx, dword_1855FC0
push	ebx
lea	edx, [esp+10h+arg_0]
push	edx
mov	[esp+14h+arg_0], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0B0h
push	esi
call	eax
mov	ebx, eax
test	ebx, ebx
jz	short loc_7203FC
mov	ecx, ebx
call	sub_73F3D0
lea	ecx, [ebx+1Ch]
call	sub_6F91A0
fld	ds:flt_1431A30
xor	ecx, ecx
fst	dword ptr [ebx+0A4h]
fstp	dword ptr [ebx+0A8h]
mov	[ebx+0ACh], cx
jmp	short loc_7203FE

loc_7203FC:
xor	ebx, ebx

loc_7203FE:
mov	[esi+14h], ebx
pop	ebx

loc_720402:
cmp	edi, ebp
jnb	short loc_72040C
mov	eax, edi
mov	edi, ebp
mov	ebp, eax

loc_72040C:
mov	ecx, esi
call	sub_720310
sub	edi, ebp
cmp	[eax], ebp
jnz	short loc_72041E
cmp	[eax+4], edi
jz	short loc_72042E

loc_72041E:
mov	[eax], ebp
mov	[eax+4], edi
mov	esi, [esi+14h]
mov	byte ptr [esi+18h], 0
mov	byte ptr [esi+19h], 0

loc_72042E:
pop	edi
pop	esi
pop	ebp
retn	8
sub_720390 endp

align 10h



sub_720440 proc	near

var_4= byte ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	esi, ecx
call	sub_720310
add	eax, 18h
xor	dl, dl
test	byte ptr [eax+0Ch], 8
jz	short loc_720459
mov	edi, eax
jmp	short loc_72046D

loc_720459:
mov	[esp+0Ch+var_2], dl
mov	[esp+9], dl
mov	[esp+0Ch+var_4], dl
mov	[esp+0Ch+var_1], dl
lea	edi, [esp+0Ch+var_4]

loc_72046D:
mov	ecx, [esp+0Ch+arg_0]
cmp	[edi], ecx
jz	short loc_720484
or	byte ptr [eax+0Ch], 8
mov	[eax], ecx
mov	eax, [esi+14h]
mov	[eax+18h], dl
mov	[eax+19h], dl

loc_720484:
pop	edi
pop	esi
pop	ecx
retn	4
sub_720440 endp

align 10h



sub_720490 proc	near

var_4= byte ptr	-4
var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4

push	ecx
push	esi
push	edi
mov	esi, ecx
call	sub_720310
xor	dl, dl
test	byte ptr [eax+24h], 10h
jz	short loc_7204A7
lea	edi, [eax+1Ch]
jmp	short loc_7204BB

loc_7204A7:
mov	[esp+0Ch+var_2], dl
mov	[esp+9], dl
mov	[esp+0Ch+var_4], dl
mov	[esp+0Ch+var_1], dl
lea	edi, [esp+0Ch+var_4]

loc_7204BB:
mov	ecx, [esp+0Ch+arg_0]
cmp	[edi], ecx
jz	short loc_7204D3
or	byte ptr [eax+24h], 10h
mov	[eax+1Ch], ecx
mov	eax, [esi+14h]
mov	[eax+18h], dl
mov	[eax+19h], dl

loc_7204D3:
pop	edi
pop	esi
pop	ecx
retn	4
sub_720490 endp

align 10h



sub_7204E0 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+8], 0
jnz	short loc_72052F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
push	edi
call	edx
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+28h]
push	0
push	50h
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_720519
push	0
push	esi
mov	ecx, eax
call	sub_69B360
mov	esi, eax
jmp	short loc_72051B

loc_720519:
xor	esi, esi

loc_72051B:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_720527
call	sub_64A400

loc_720527:
mov	[edi+8], esi
mov	eax, esi
pop	esi
pop	edi
retn

loc_72052F:
mov	eax, [edi+8]
pop	edi
retn
sub_7204E0 endp

align 10h



sub_720540 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
xor	ebp, ebp
mov	[esp+10h+var_8], ebp
mov	[esp+10h+var_4], eax
cmp	eax, ebp
jbe	loc_72060D
push	ebx
push	edi
mov	edi, edi

loc_720560:
mov	eax, [esi]
mov	ecx, [esp+18h+arg_0]
cmp	[eax+ebp+28h], ecx
jnz	loc_7205F6
mov	ebx, 1
cmp	[esi+4], ebx
jnz	short loc_7205C2
lea	edi, [eax+28h]
lea	ecx, [ecx+0]

loc_720580:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_72058B
call	sub_64A400

loc_72058B:
sub	edi, 30h
sub	ebx, 1
jnz	short loc_720580
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_7205B9
mov	eax, [esi]
test	eax, eax
jz	short loc_7205B2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_7205B2:
mov	dword ptr [esi+8], 0

loc_7205B9:
mov	dword ptr [esi+4], 0
jmp	short loc_7205FD

loc_7205C2:
mov	eax, [eax+ebp+28h]
test	eax, eax
jz	short loc_7205D1
mov	ecx, eax
call	sub_64A400

loc_7205D1:
mov	eax, [esi+4]
sub	eax, [esp+18h+var_8]
mov	ecx, [esi]
dec	eax
lea	edx, [eax+eax*2]
add	ecx, ebp
shl	edx, 4
push	edx
lea	eax, [ecx+30h]
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]
jmp	short loc_7205FD

loc_7205F6:
inc	[esp+18h+var_8]
add	ebp, 30h

loc_7205FD:
mov	ecx, [esp+18h+var_8]
cmp	ecx, [esp+18h+var_4]
jb	loc_720560
pop	edi
pop	ebx

loc_72060D:
pop	esi
pop	ebp
add	esp, 8
retn	4
sub_720540 endp

align 10h



sub_720620 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_6= dword ptr -6
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 24h
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
cmp	eax, 8		; switch 9 cases
ja	loc_7209D7	; default
push	ebx
push	ebp
jmp	ds:off_7209E4[eax*4] ; switch jump

loc_72063F:		; jumptable 00720638 case 0
cmp	[esi+110h], edi
jz	short loc_72065C
mov	ecx, [esi+8]
call	sub_726950
inc	eax
cmp	eax, [esi+110h]
ja	loc_7209D5

loc_72065C:
mov	eax, [esp+34h+arg_4]
mov	edx, [eax]
mov	ecx, [esi+8]
push	1
push	1
push	edx
add	eax, 4
push	eax
call	sub_72C5C0
pop	ebp
pop	ebx
mov	edi, eax
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_72067F:		; jumptable 00720638 case 1
mov	ebx, [esp+34h+arg_4]
mov	ecx, [esi+8]
mov	edi, [ebx+8]
call	sub_726950
mov	ecx, [esi+110h]
test	ecx, ecx
jz	short loc_7206A3
lea	edx, [eax+edi]
cmp	edx, ecx
jbe	short loc_7206A3
sub	ecx, eax
mov	edi, ecx

loc_7206A3:
mov	eax, [ebx]
mov	ecx, [ebx+4]
mov	esi, [esi+8]
push	0
push	edi
push	eax
push	ecx
mov	ecx, esi
call	sub_72C5C0
pop	ebp
pop	ebx
mov	edi, eax
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_7206C3:		; jumptable 00720638 case 2
mov	ebx, [esp+34h+arg_4]
or	ebp, 0FFFFFFFFh
cmp	[esi+110h], edi
jz	short loc_7206F4
mov	ecx, [esi+8]
call	sub_726950
mov	ecx, [ebx+4]
mov	edi, eax
call	sub_726950
mov	ecx, [esi+110h]
add	eax, edi
cmp	eax, ecx
jbe	short loc_7206F4
sub	ecx, edi
mov	ebp, ecx

loc_7206F4:
mov	edx, [ebx]
mov	eax, [ebx+4]
mov	ecx, [esi+8]
push	ebp
push	edx
push	eax
call	sub_72BC90
pop	ebp
pop	ebx
mov	edi, eax
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_720710:		; jumptable 00720638 case 5
mov	edx, [esp+34h+arg_4]
mov	eax, [edx]
mov	ebp, [edx+4]
cmp	eax, ebp
jbe	short loc_720723
mov	ebx, ebp
mov	ebp, eax
jmp	short loc_720725

loc_720723:
mov	ebx, eax

loc_720725:
cmp	[esi+110h], edi
jz	short loc_72074C
mov	ecx, [esi+8]
call	sub_726950
mov	ecx, ebx
sub	ecx, ebp
add	eax, ecx
inc	eax
cmp	eax, [esi+110h]
ja	loc_7209D5
mov	edx, [esp+34h+arg_4]

loc_72074C:
mov	ecx, [esi+8]
push	0
push	1
push	ebx
add	edx, 8
push	edx
call	sub_72C5C0
inc	ebp
push	ebp
inc	ebx
push	ebx
mov	ecx, esi
mov	edi, eax
call	sub_6C4870
pop	ebp
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_720776:		; jumptable 00720638 case 6
mov	edi, [esp+34h+arg_4]
mov	eax, [edi]
mov	ebp, [edi+4]
cmp	eax, ebp
jbe	short loc_720789
mov	ebx, ebp
mov	ebp, eax
jmp	short loc_72078B

loc_720789:
mov	ebx, eax

loc_72078B:
cmp	dword ptr [esi+110h], 0
mov	edx, [edi+0Ch]
mov	[esp+34h+arg_4], edx
jz	short loc_7207BE
mov	ecx, [esi+8]
call	sub_726950
mov	edx, [edi+0Ch]
mov	ecx, ebx
sub	ecx, ebp
add	eax, ecx
mov	ecx, [esi+110h]
add	edx, eax
cmp	edx, ecx
jbe	short loc_7207BE
sub	ecx, eax
mov	[esp+34h+arg_4], ecx

loc_7207BE:
mov	eax, [esp+34h+arg_4]
mov	edx, [edi+8]
mov	ecx, [esi+8]
push	0
push	eax
push	ebx
push	edx
call	sub_72C5C0
mov	edi, eax
add	ebp, edi
push	ebp
add	ebx, edi
push	ebx
mov	ecx, esi
call	sub_6C4870
pop	ebp
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_7207ED:		; jumptable 00720638 case 7
mov	ecx, [esp+34h+arg_4]
mov	eax, [ecx]
mov	ebp, [ecx+4]
cmp	eax, ebp
jbe	short loc_720800
mov	ebx, ebp
mov	ebp, eax
jmp	short loc_720802

loc_720800:
mov	ebx, eax

loc_720802:
mov	[esp+34h+arg_0], 0FFFFFFFFh
cmp	[esi+110h], edi
jz	short loc_72084C
mov	ecx, [esi+8]
call	sub_726950
mov	ecx, [esi+110h]
mov	edx, [esp+34h+arg_4]
mov	edi, eax
mov	eax, ebx
sub	eax, ebp
mov	[esp+34h+var_24], ecx
mov	ecx, [edx+8]
add	edi, eax
call	sub_726950
add	eax, edi
cmp	eax, [esp+34h+var_24]
jbe	short loc_72084C
mov	eax, [esi+110h]
sub	eax, edi
mov	[esp+34h+arg_0], eax

loc_72084C:
mov	eax, [esp+34h+arg_0]
mov	edx, [esp+34h+arg_4]
mov	ecx, [esi+8]
push	eax
mov	eax, [edx+8]
push	ebx
push	eax
call	sub_72BC90
mov	edi, eax
add	ebp, edi
push	ebp
add	ebx, edi
push	ebx
mov	ecx, esi
call	sub_6C4870
pop	ebp
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_72087D:		; jumptable 00720638 case 8
mov	edx, [esp+34h+arg_4]
mov	eax, [edx]
lea	ecx, [esp+34h+arg_0]
push	ecx
push	eax
lea	ecx, [esp+3Ch+var_24]
push	ecx
mov	ecx, [esi+8]
mov	edi, 1
mov	[esp+40h+arg_0], 0
call	sub_7267B0
lea	ecx, [esp+34h+var_24]
call	sub_71E0B0
test	al, al
jnz	loc_720972
cmp	[esp+34h+arg_0], 0
jnz	loc_720972
mov	edx, [esp+34h+var_24]
mov	eax, [edx]
mov	ecx, [esp+34h+var_20]
mov	ebp, [eax+ecx*4]
mov	ebx, [ebp+0Ch]
test	ebx, ebx
jz	loc_720972
mov	ecx, ebx
call	sub_6D56E0
test	al, al
jz	short loc_720938
push	ebx
lea	ecx, [esp+38h+var_1C]
call	sub_7004B0
mov	edx, [esp+34h+var_6]
and	edx, 7F7Fh
or	edx, 80h
mov	word ptr [esp+34h+var_6], dx

loc_720901:
mov	ecx, [esi+8]
lea	eax, [esp+34h+var_1C]
push	eax
call	sub_7204E0
push	eax
mov	ecx, ebp
call	sub_726710
mov	edx, [esi]
mov	eax, [edx+4]
push	2
mov	ecx, esi
call	eax
lea	ecx, [esp+34h+var_1C]
call	sub_6C4820

loc_72092A:
pop	ebp
xor	edi, edi
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_720938:
cmp	word ptr [ebx+0Eh], 0
jnz	short loc_720946
cmp	word ptr [ebx+0Ch], 0
jz	short loc_720972

loc_720946:
push	ebx
lea	ecx, [esp+38h+var_1C]
call	sub_7004B0
mov	ax, word ptr [esp+34h+var_6]
xor	ecx, ecx
or	ax, 4
xor	edx, edx
or	ax, 2
mov	word ptr [esp+34h+var_10+2], cx
mov	word ptr [esp+34h+var_10], dx
mov	word ptr [esp+34h+var_6], ax
jmp	short loc_720901

loc_720972:
mov	ecx, [esp+34h+arg_4]
mov	eax, [ecx]
test	eax, eax
jbe	short loc_72092A
push	eax
dec	eax
push	eax
mov	ecx, esi
call	sub_6C4870
pop	ebp
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_720992:		; jumptable 00720638 case 3
mov	edx, [esp+34h+arg_4]
mov	eax, [edx]
lea	ecx, [eax+1]
push	ecx
push	eax
mov	ecx, esi
call	sub_6C4870
pop	ebp
mov	edi, 1
pop	ebx
mov	eax, edi
pop	edi
pop	esi
add	esp, 24h
retn	8

loc_7209B5:		; jumptable 00720638 case 4
mov	ecx, [esp+34h+arg_4]
mov	eax, [ecx]
mov	edi, [ecx+4]
cmp	eax, edi
jbe	short loc_7209C8
mov	ebx, edi
mov	edi, eax
jmp	short loc_7209CA

loc_7209C8:
mov	ebx, eax

loc_7209CA:
push	edi
push	ebx
mov	ecx, esi
call	sub_6C4870
sub	edi, ebx

loc_7209D5:
pop	ebp
pop	ebx

loc_7209D7:		; default
mov	eax, edi
pop	edi
pop	esi
add	esp, 24h
retn	8
sub_720620 endp

align 4
off_7209E4 dd offset loc_72063F	; jump table for switch	statement
dd offset loc_72067F
dd offset loc_7206C3
dd offset loc_720992
dd offset loc_7209B5
dd offset loc_720710
dd offset loc_720776
dd offset loc_7207ED
dd offset loc_72087D
align 10h



sub_720A10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	eax, [eax+10h]
test	eax, eax
jz	short loc_720A2C
test	byte ptr [eax+8], 1
jz	short loc_720A2C
mov	eax, 1
jmp	short loc_720A2E

loc_720A2C:
xor	eax, eax

loc_720A2E:
mov	[esi+2F4h], al
mov	dword ptr [esi+4F8h], 0
test	al, al
jz	loc_720B3E
mov	ecx, [esi+4]
push	ebx
push	ebp
push	edi
call	sub_725AB0
mov	ecx, [esi+4]
mov	ebx, [ecx+1Ch]
mov	edi, eax
mov	[esp+18h+var_8], edi
cmp	[esi+30h], ebx
jb	short loc_720A91
call	sub_725AB0
add	eax, ebx
cmp	[esi+30h], eax
ja	short loc_720A91
mov	ecx, [esi+4]
mov	bl, 1
call	sub_725AB0
add	eax, [esi+34h]
mov	[esp+18h+var_8], eax
mov	edi, eax

loc_720A81:
cmp	edi, 100h
jnb	short loc_720A95
lea	ebp, [esi+2F6h]
jmp	short loc_720AB2

loc_720A91:
xor	bl, bl
jmp	short loc_720A81

loc_720A95:
mov	ecx, [esi]
mov	ecx, [ecx+8]
call	sub_7204E0
mov	ecx, [eax+1Ch]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
lea	eax, [edi+edi+2]
push	eax
call	edx
mov	ebp, eax

loc_720AB2:
mov	eax, [esi+4]
mov	ecx, [eax]
mov	[esp+18h+var_4], ecx
test	bl, bl
jz	short loc_720B1A
cmp	dword ptr [esi+34h], 0
jbe	short loc_720B1A
mov	edi, [esi+30h]
sub	edi, [eax+1Ch]
mov	eax, ecx
lea	ebx, [edi+edi]
push	ebx
push	eax
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esi+34h]
mov	edx, [esi+2Ch]
mov	eax, [edx+14h]
add	ecx, ecx
push	ecx
push	eax
lea	ecx, [ebx+ebp]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ecx, [esi+4]
add	esp, 18h
call	sub_725AB0
mov	edx, [esp+18h+var_4]
sub	eax, edi
add	eax, eax
push	eax
mov	eax, [esi+34h]
add	ebx, edx
add	eax, edi
lea	ecx, [ebp+eax*2+0]
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, [esp+24h+var_8]
jmp	short loc_720B25

loc_720B1A:
lea	edx, [edi+edi]
push	edx
push	ecx
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime

loc_720B25:
add	esp, 0Ch
xor	eax, eax
mov	[ebp+edi*2+0], ax
mov	[esi+4FCh], edi
pop	edi
mov	[esi+4F8h], ebp
pop	ebp
pop	ebx

loc_720B3E:
pop	esi
add	esp, 8
retn
sub_720A10 endp

align 10h



sub_720B50 proc	near

var_5C8= dword ptr -5C8h
var_5B8= dword ptr -5B8h
var_5B4= dword ptr -5B4h
var_5B0= dword ptr -5B0h
var_5AC= dword ptr -5ACh
var_5A4= dword ptr -5A4h
var_5A0= dword ptr -5A0h
var_59C= dword ptr -59Ch
var_598= dword ptr -598h
var_594= dword ptr -594h
var_590= byte ptr -590h
var_58C= dword ptr -58Ch
var_588= dword ptr -588h
var_584= dword ptr -584h
var_580= dword ptr -580h
var_57C= dword ptr -57Ch
var_578= dword ptr -578h
var_574= dword ptr -574h
var_570= dword ptr -570h
var_56C= byte ptr -56Ch
var_568= dword ptr -568h
var_564= dword ptr -564h
var_560= dword ptr -560h
var_55C= dword ptr -55Ch
var_558= dword ptr -558h
var_554= dword ptr -554h
var_53C= dword ptr -53Ch
var_50C= dword ptr -50Ch
var_4EC= dword ptr -4ECh
var_4AC= byte ptr -4ACh
var_400= byte ptr -400h
var_3F8= byte ptr -3F8h

sub	esp, 5B8h
push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
test	ecx, ecx
jnz	short loc_720B6A
xor	al, al
pop	esi
add	esp, 5B8h
retn

loc_720B6A:
mov	eax, [esi+2E8h]
push	ebx
push	ebp
push	edi
cmp	eax, 1
jnz	loc_720FF3
cmp	byte ptr [esi+2F4h], 0
jz	loc_720FF3
mov	eax, [esi+290h]
test	eax, eax
jz	short loc_720B9E
mov	edx, [esi+294h]
cmp	edx, [eax+4]
jb	short loc_720BAC

loc_720B9E:
fild	dword ptr [esi+44h]
mov	edi, [ecx+1Ch]
mov	ebx, [esi+0B8h]
jmp	short loc_720BC1

loc_720BAC:
mov	eax, [esi+230h]
fild	dword ptr [esi+260h]
mov	edi, [eax+1Ch]
mov	ebx, [esi+2D4h]

loc_720BC1:
mov	ecx, [esi+4F8h]
fstp	[esp+5C8h+var_5B4]
mov	edx, [esi+4FCh]
mov	eax, [esi+0Ch]
mov	[esp+5C8h+var_598], ecx
mov	[esp+5C8h+var_594], edx
mov	ecx, [eax]
mov	eax, [eax+8]
shr	ecx, 1Fh
mov	[esp+5C8h+var_5B8], ebx
test	cl, 1
jz	short loc_720BFC
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_720BFC
or	eax, 0FFFFFFFFh

loc_720BFC:
mov	edx, [esi+4]
sub	eax, [edx+1Ch]
mov	ecx, [esi+8]
mov	[esp+5C8h+var_58C], eax
mov	eax, [esi+0B8h]
mov	[esp+5C8h+var_588], eax
movzx	eax, word ptr [ecx+16h]
shr	eax, 9
and	eax, 3
cmp	eax, 3		; switch 4 cases
ja	short loc_720C43 ; default
jmp	ds:off_7211F0[eax*4] ; switch jump

loc_720C29:		; jumptable 00720C22 case 0
mov	byte ptr [esp+5C8h+var_574], 0
jmp	short loc_720C43 ; default

loc_720C30:		; jumptable 00720C22 case 1
mov	byte ptr [esp+5C8h+var_574], 1
jmp	short loc_720C43 ; default

loc_720C37:		; jumptable 00720C22 case 3
mov	byte ptr [esp+5C8h+var_574], 2
jmp	short loc_720C43 ; default

loc_720C3E:		; jumptable 00720C22 case 2
mov	byte ptr [esp+5C8h+var_574], 3

loc_720C43:		; default
fld	dword ptr [esi+2D8h]
push	2Dh
fstp	[esp+5CCh+var_584]
fild	dword ptr [esi+44h]
fstp	[esp+5CCh+var_580]
fld	[esp+5CCh+var_5B4]
fstp	[esp+5CCh+var_57C]
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+0Ch]
call	eax
test	eax, eax
jle	short loc_720C7B
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+28h]
call	eax
fstp	[esp+5C0h+var_570]

loc_720C7B:
mov	ecx, [esp+5C0h+var_580]
inc	ecx
lea	edx, [esp+5C0h+var_3F8]
mov	[esp+5C0h+var_568], ebx
mov	[esp+5C0h+var_59C], edx
cmp	ecx, 100h
jbe	short loc_720CBF
mov	edx, [esi]
mov	ecx, [edx+8]
call	sub_7204E0
mov	edx, [esp+5C0h+var_580]
mov	ecx, [eax+1Ch]
mov	eax, [ecx]
lea	edx, ds:4[edx*4]
push	0
push	edx
mov	edx, [eax+28h]
call	edx
mov	edx, eax
mov	[esp+5C0h+var_59C], eax

loc_720CBF:
mov	eax, [esi+9Ch]
fldz
mov	ebp, [esi+94h]
fst	[esp+5C0h+var_5AC]
xor	ecx, ecx
test	eax, eax
jbe	short loc_720D0D
lea	edi, [ebp+2]

loc_720CDA:
mov	ebx, 0F000h
test	[edi+2], bx
jnz	short loc_720D0D
mov	bl, [edi+4]
shr	bl, 6
test	bl, 1
movzx	ebx, word ptr [edi]
jz	short loc_720CF5
neg	ebx

loc_720CF5:
mov	[esp+5C0h+var_5A4], ebx
fild	[esp+5C0h+var_5A4]
inc	ecx
add	edi, 8
fadd	[esp+5C0h+var_5AC]
fstp	[esp+5C0h+var_5AC]
cmp	ecx, eax
jb	short loc_720CDA

loc_720D0D:
fld	[esp+5C0h+var_57C]
mov	[esp+5C0h+var_588], edx
fld	[esp+5C0h+var_5AC]
xor	edx, edx
fld	st
mov	[esp+5C0h+var_598], edx
fsubp	st(2), st
fxch	st(1)
fstp	[esp+5C0h+var_57C]
fld	[esp+5C0h+var_578]
fsub	st, st(1)
fstp	[esp+5C0h+var_578]
fsubr	[esp+5C0h+var_574]
fstp	[esp+5C0h+var_574]
fst	[esp+5C0h+var_5AC]
cmp	ecx, eax
jnb	loc_720DCB
lea	ebp, [ebp+ecx*8+2]
sub	eax, ecx
mov	[esp+5C0h+var_594], ebp
mov	[esp+5C0h+var_5A0], eax

loc_720D55:
mov	eax, [esp+5C0h+var_59C]
fld	[esp+5C0h+var_5AC]
lea	ecx, [eax+edx*4]
fst	dword ptr [ecx]
mov	al, [ebp+4]
shr	al, 6
test	al, 1
movzx	eax, word ptr [ebp+0]
jz	short loc_720D72
neg	eax

loc_720D72:
movzx	edi, word ptr [ebp+2]
mov	[esp+5C0h+var_5A4], eax
shr	edi, 0Ch
fiadd	[esp+5C0h+var_5A4]
fstp	[esp+5C0h+var_5AC]
cmp	edi, 1
jbe	short loc_720DB7
test	edi, edi
jbe	short loc_720DB7
lea	eax, [edx+edx]
mov	edx, edi

loc_720D93:
mov	ebx, [esi+4F8h]
mov	ebp, 0A0h
mov	[eax+ebx], bp
fst	dword ptr [ecx]
add	eax, 2
add	ecx, 4
sub	edx, 1
jnz	short loc_720D93
mov	ebp, [esp+5C0h+var_594]
mov	edx, [esp+5C0h+var_598]

loc_720DB7:
add	edx, edi
add	ebp, 8
sub	[esp+5C0h+var_5A0], 1
mov	[esp+5C0h+var_598], edx
mov	[esp+5C0h+var_594], ebp
jnz	short loc_720D55

loc_720DCB:
mov	edi, [esp+5C0h+var_59C]
fstp	st
fld	[esp+5C0h+var_5AC]
lea	ebx, [esp+5C0h+var_590]
fstp	dword ptr [edi+edx*4]
mov	eax, [esi]
mov	byte ptr [esp+5C0h+var_564], 0
mov	ecx, [eax+10h]
mov	edx, [ecx]
push	ebx
push	eax
mov	eax, [edx+4]
call	eax
mov	byte ptr [esp+5C8h+var_5B0+3], al
test	al, al
jz	loc_720EC2
mov	cl, [esp+5C8h+var_56C]
mov	[esi+2ECh], cl
mov	ecx, [esp+5C8h+var_570]
cmp	ecx, [esp+5C8h+var_5B8]
jz	loc_720EC2
mov	eax, [esi+290h]
test	eax, eax
jz	short loc_720E4B
mov	edx, [esi+294h]
cmp	edx, [eax+4]
jnb	short loc_720E4B
cmp	ecx, [esi+2D4h]
jbe	short loc_720E4B
lea	eax, [esi+2B0h]
push	eax
lea	ecx, [esi+94h]
call	sub_735110
lea	ecx, [esi+22Ch]
push	ecx
jmp	short loc_720E9C

loc_720E4B:
mov	eax, [esi+1E4h]
test	eax, eax
jz	short loc_720E83
mov	edx, [esi+1E8h]
cmp	edx, [eax+4]
jnb	short loc_720E83
cmp	ecx, [esi+228h]
jbe	short loc_720E83
lea	eax, [esi+204h]
push	eax
lea	ecx, [esi+94h]
call	sub_735110
lea	ecx, [esi+180h]
push	ecx
jmp	short loc_720E9C

loc_720E83:
lea	edx, [esi+158h]
push	edx
lea	ecx, [esi+94h]
call	sub_735110
lea	eax, [esi+0D4h]
push	eax

loc_720E9C:
lea	ecx, [esi+10h]
call	sub_71F880
mov	ecx, [esp+5C8h+var_570]
mov	dword ptr [esi+2E8h], 2
mov	[esi+2F0h], ecx
mov	dword ptr [esi+2E4h], 0

loc_720EC2:
lea	edx, [esp+5C8h+var_400]
cmp	edi, edx
jz	loc_720F5F
mov	eax, [esi]
mov	ebx, [eax+8]
cmp	dword ptr [ebx+8], 0
jnz	short loc_720F4D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	ebx
call	eax
mov	ebp, eax
mov	edx, [ebp+0]
mov	eax, [edx+28h]
push	0
push	50h
mov	ecx, ebp
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_720F3C
mov	dword ptr [edi], offset	off_155F500
xor	ecx, ecx
mov	eax, 1
mov	[edi+4], eax
mov	dword ptr [edi], offset	off_1437724
mov	[edi+8], ecx
mov	[edi+0Ch], ecx
mov	ecx, 64h
mov	[edi+10h], ecx
mov	[edi+14h], ecx
push	ebp
lea	ecx, [edi+20h]
mov	[edi+18h], eax
mov	[edi+1Ch], ebp
call	sub_694320
mov	byte ptr [edi+4Ch], 0
jmp	short loc_720F3E

loc_720F3C:
xor	edi, edi

loc_720F3E:
mov	ecx, [ebx+8]
test	ecx, ecx
jz	short loc_720F4A
call	sub_64A400

loc_720F4A:
mov	[ebx+8], edi

loc_720F4D:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+5C8h+var_5A4]
mov	edx, [edx+30h]
push	eax
call	edx

loc_720F5F:
lea	ecx, [esp+5C8h+var_558]
call	sub_71F550
push	eax
lea	ecx, [esi+180h]
call	sub_71F880
push	eax
lea	ecx, [esi+0D4h]
call	sub_71F880
mov	ecx, [esp+5C8h+var_4EC]
test	ecx, ecx
jz	short loc_720F90
call	sub_64A430

loc_720F90:
mov	ecx, [esp+5C8h+var_50C]
test	ecx, ecx
jz	short loc_720FA0
call	sub_64A430

loc_720FA0:
mov	ecx, [esp+5C8h+var_53C]
test	ecx, ecx
jz	short loc_720FB0
call	sub_64A400

loc_720FB0:
mov	eax, [esp+5C8h+var_554]
test	eax, eax
jz	short loc_720FD6
dec	dword ptr [eax]
mov	edi, eax
cmp	dword ptr [edi], 0
jnz	short loc_720FD6
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_720FD6:
cmp	byte ptr [esp+5C8h+var_5B0+3], 0
jz	short loc_721026
cmp	dword ptr [esi+2E8h], 2
jnz	short loc_721026
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
add	esp, 5B8h
retn

loc_720FF3:
cmp	eax, 2
jnz	short loc_721026
lea	ecx, [esp+5C8h+var_4AC]
call	sub_71F550
push	eax
lea	ecx, [esi+22Ch]
call	sub_71F880
lea	ecx, [esp+5C8h+var_4AC]
call	sub_71F830
mov	dword ptr [esi+2E8h], 1

loc_721026:
cmp	byte ptr [esi+2ECh], 0
jz	loc_7211E0
mov	eax, [esi+9Ch]
mov	ecx, [esi+94h]
lea	ebp, [ecx+eax*8]
xor	eax, eax
xor	edx, edx
mov	[ebp+6], ax
mov	[ebp+4], dx
fld	dword ptr [esi+20h]
fstp	[esp+5C8h+var_5B8]
fldz
fld	[esp+5C8h+var_5B8]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_72106E
fadd	ds:dbl_15FCC48
jmp	short loc_721074

loc_72106E:
fsub	ds:dbl_15FCC48

loc_721074:
call	__ftol2_sse
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_72109A
test	eax, eax
jl	short loc_72108F
mov	edx, 0FFBFh
and	[ecx+6], dx
jmp	short loc_721096

loc_72108F:
neg	eax
or	word ptr [ecx+6], 40h

loc_721096:
mov	[ecx+2], ax

loc_72109A:
mov	eax, [esi+14h]
mov	ecx, [eax+1Ch]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+0Ch]
push	2Dh
call	eax
mov	ecx, 0FFFh
and	[ebp+4], cx
mov	edi, eax
mov	[ebp+0], di
fld	dword ptr [esi+524h]
push	ecx		; float
mov	ecx, ebp
fstp	[esp+5C8h+var_5C8]
call	sub_6F5EB0
mov	edx, [esi+520h]
mov	eax, [esi+14h]
mov	[esi+44h], edx
mov	ecx, [eax+1Ch]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+20h]
push	edi
call	eax
fstp	[esp+5C4h+var_5B4]
fld	[esp+5C4h+var_5B4]
mov	ecx, [esi+500h]
fmul	dword ptr [esi+508h]
lea	eax, [esp+5C4h+var_564]
push	eax
push	edi
fstp	[esp+5CCh+var_5B4]
fldz
fst	[esp+5CCh+var_564]
fst	[esp+5CCh+var_560]
fst	[esp+5CCh+var_55C]
fstp	[esp+5CCh+var_558]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	edx, [edx+30h]
call	edx
fld	dword ptr [eax+8]
fmul	dword ptr [esi+508h]
fadd	ds:dbl_15FCE20
fstp	[esp+5C4h+var_5A4]
fld	[esp+5C4h+var_5B4]
fld	[esp+5C4h+var_5A4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_721148
fstp	st(1)
jmp	short loc_72114A

loc_721148:
fstp	st

loc_72114A:
fstp	[esp+5C4h+var_5B4]
fldz
fld	[esp+5C4h+var_5B4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_721172
fadd	ds:dbl_15FCC48
call	__ftol2_sse
mov	ebx, eax
mov	[esp+5C4h+var_5B4], ebx
jmp	short loc_721183

loc_721172:
fsub	ds:dbl_15FCC48
call	__ftol2_sse
mov	ebx, eax
mov	[esp+5C4h+var_5B4], eax

loc_721183:
mov	eax, [esi+14h]
mov	ecx, [eax+1Ch]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
call	eax
fstp	st
fild	[esp+5C8h+var_5B8]
mov	ecx, [esi+520h]
add	ecx, ebx
mov	[esi+24h], ebx
fstp	dword ptr [esi+20h]
mov	[esi+1Ch], edi
mov	dword ptr [esi+0ACh], 0
mov	[esi+48h], ecx
mov	byte ptr [esi+2ECh], 0
mov	[esi+10h], ebp
cmp	dword ptr [esi+94h], 0
jz	short loc_7211E0
mov	eax, [esi+9Ch]
cmp	eax, [esi+0A0h]
jnb	short loc_7211E0
inc	eax
mov	[esi+9Ch], eax

loc_7211E0:
pop	edi
pop	ebp
pop	ebx
xor	al, al
pop	esi
add	esp, 5B8h
retn
sub_720B50 endp

align 10h
off_7211F0 dd offset loc_720C29	; jump table for switch	statement
dd offset loc_720C30
dd offset loc_720C3E
dd offset loc_720C37



sub_721200 proc	near

var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	byte ptr -0ACh

sub	esp, 0C8h
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+2E8h]
cmp	ecx, 1
jnz	short loc_72125E
mov	eax, [esi]
test	byte ptr [eax+14Eh], 8
jz	short loc_72125E
cmp	byte ptr [esi+528h], 0
jnz	short loc_72125E
mov	edx, [esi+520h]
add	edx, [esi+51Ch]
add	edx, [esi+8Ch]
add	edx, [esi+88h]
mov	[esp+0D0h+var_C4], edx
fild	[esp+0D0h+var_C4]
fld	dword ptr [esi+2D8h]
fisub	dword ptr [esi+90h]
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_721279

loc_72125E:
cmp	ecx, 2
jnz	loc_721399
mov	eax, [esi+0B8h]
cmp	eax, [esi+2F0h]
jnz	loc_721399

loc_721279:
mov	ecx, esi
call	sub_720B50
test	al, al
jnz	loc_72138E
push	ebp
push	edi
xor	edi, edi
mov	[esi+520h], edi
mov	eax, [esi+290h]
mov	[esp+0D8h+var_C5], 0
cmp	eax, edi
jz	short loc_72130F
mov	ecx, [esi+294h]
cmp	ecx, [eax+4]
jnb	short loc_72130F
mov	ecx, [esi+2B8h]
mov	edx, [esi+2B0h]
mov	eax, [esi+2B4h]
mov	[esp+0D8h+var_B8], ecx
lea	ecx, [esp+0D8h+var_C0]
mov	[esp+0D8h+var_C0], edx
mov	edx, [esi+2BCh]
mov	[esp+0D8h+var_BC], eax
mov	eax, [esi+2C0h]
push	ecx
lea	ecx, [esi+94h]
mov	[esp+0DCh+var_B4], edx
mov	[esp+0DCh+var_B0], eax
call	sub_735110
lea	edx, [esi+22Ch]
push	edx
lea	ecx, [esi+10h]
call	sub_71F880
mov	byte ptr [esi+528h], 0
mov	[esp+0D8h+var_C5], 1
mov	[esi+2E4h], edi

loc_72130F:
lea	ecx, [esp+0D8h+var_AC]
call	sub_71F550
push	eax
lea	ecx, [esi+22Ch]
call	sub_71F880
lea	ecx, [esp+0D8h+var_AC]
call	sub_71F830
mov	eax, [esi+4]
mov	ebx, [eax+1Ch]
lea	edi, [esi+10h]
mov	ecx, edi
call	sub_71F6D0
mov	ebp, [eax+4]
mov	eax, [edi]
add	ebp, ebx
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_72134F
or	word ptr [eax+6], 8

loc_72134F:
mov	ecx, esi
call	sub_71FA20
mov	ecx, edi
call	sub_71DF90
mov	eax, [esi+0Ch]
mov	[esi+2E0h], ebx
mov	ecx, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_721380
mov	edx, [eax+8]
xor	edx, ebp
and	edx, offset sub_FFFFFF
xor	[eax+8], edx
jmp	short loc_721383

loc_721380:
mov	[eax+8], ebp

loc_721383:
pop	edi
pop	ebp
cmp	[esp+0D0h+var_C5], bl
jz	short loc_721399
mov	[esi+44h], ebx

loc_72138E:
pop	esi
mov	al, 1
pop	ebx
add	esp, 0C8h
retn

loc_721399:
pop	esi
xor	al, al
pop	ebx
add	esp, 0C8h
retn
sub_721200 endp

align 10h



sub_7213B0 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_72142A
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
jmp	short loc_7213D0
align 10h

loc_7213D0:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_721405
mov	esi, [edi+8]
test	esi, esi
jz	short loc_7213FF
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_7213FF
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7213FF:
mov	dword ptr [edi], 0FFFFFFFEh

loc_721405:
add	ebx, 0Ch
sub	[esp+14h+var_4], 1
jnz	short loc_7213D0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_72142A:
pop	ebp
pop	ecx
retn
sub_7213B0 endp

align 10h



sub_721430 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_721452
call	sub_7213B0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_721452:
push	esi
cmp	eax, 8
jnb	short loc_72145F
mov	esi, 8
jmp	short loc_7214C4

loc_72145F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_721472
fadd	ds:flt_15FCC08

loc_721472:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_7214C4:
mov	ecx, [esp+18h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 144h
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_721515
xor	eax, eax

loc_721501:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_721501

loc_721515:
mov	eax, [edi]
cmp	eax, ebx
jz	short loc_721593
mov	eax, [eax+4]
push	ebp
lea	ebp, [eax+1]
jmp	short loc_721528

loc_721524:
mov	edi, [esp+1Ch+var_C]

loc_721528:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_721572
mov	ecx, [edi+4]
mov	edx, [esp+1Ch+arg_0]
lea	eax, [edi+4]
push	ecx
push	eax
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_721A20
mov	esi, [edi+8]
test	esi, esi
jz	short loc_72156C
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_72156C
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_72156C:
mov	dword ptr [edi], 0FFFFFFFEh

loc_721572:
add	ebx, 0Ch
sub	ebp, 1
jnz	short loc_721524
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_721593:
mov	ecx, [esp+18h+arg_4]
mov	[edi], ecx
lea	ecx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], 0
call	sub_7213B0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_721430 endp

align 10h



sub_7215C0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1440138
call	sub_71E590
mov	edi, [esi+18h]
test	edi, edi
jz	short loc_721603
mov	eax, [edi+4]
mov	ecx, [edi]
push	eax
push	ecx
call	sub_6C7310
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_721603:
mov	edi, [esi+14h]
mov	dword ptr [esi+18h], 0
test	edi, edi
jz	short loc_721626
mov	ecx, edi
call	sub_6F7C90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_721626:
mov	ecx, [esi+144h]
test	ecx, ecx
jz	short loc_721635
call	sub_64A430

loc_721635:
lea	ecx, [esi+120h]
call	sub_64A3F0
mov	ecx, [esi+11Ch]
test	ecx, ecx
jz	short loc_72164F
call	sub_64A400

loc_72164F:
lea	ecx, [esi+24h]
call	sub_737D30
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_721663
call	sub_64A400

loc_721663:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_72166F
call	sub_64A400

loc_72166F:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_72167B
call	sub_64A400

loc_72167B:
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_7215C0 endp

align 10h



sub_721690 proc	near

var_15C= dword ptr -15Ch
var_158= byte ptr -158h
var_154= dword ptr -154h
var_13C= dword ptr -13Ch
var_10C= dword ptr -10Ch
var_EC=	dword ptr -0ECh
var_AC=	byte ptr -0ACh
var_A8=	dword ptr -0A8h
var_90=	dword ptr -90h
var_60=	dword ptr -60h
var_40=	dword ptr -40h
arg_0= dword ptr  4

sub	esp, 15Ch
push	ebx
push	ebp
mov	ebp, [esp+164h+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi]
push	edi
push	ebp
mov	[esi+4], ebp
mov	eax, [ebp+0Ch]
push	ecx
lea	ecx, [esp+174h+var_158]
mov	[esi+8], eax
call	sub_71F610
push	eax
lea	ecx, [esi+10h]
call	sub_71F880
mov	ecx, [esp+16Ch+var_EC]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_7216D4
call	sub_64A430

loc_7216D4:
mov	ecx, [esp+16Ch+var_10C]
cmp	ecx, ebx
jz	short loc_7216E1
call	sub_64A430

loc_7216E1:
mov	ecx, [esp+16Ch+var_13C]
cmp	ecx, ebx
jz	short loc_7216EE
call	sub_64A400

loc_7216EE:
mov	eax, [esp+16Ch+var_154]
cmp	eax, ebx
jz	short loc_721713
dec	dword ptr [eax]
mov	edi, eax
cmp	[edi], ebx
jnz	short loc_721713
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_721713:
lea	ecx, [esp+16Ch+var_AC]
call	sub_71F550
push	eax
lea	ecx, [esi+22Ch]
call	sub_71F880
push	eax
lea	ecx, [esi+180h]
call	sub_71F880
push	eax
lea	ecx, [esi+0D4h]
call	sub_71F880
mov	ecx, [esp+16Ch+var_40]
cmp	ecx, ebx
jz	short loc_721753
call	sub_64A430

loc_721753:
mov	ecx, [esp+16Ch+var_60]
cmp	ecx, ebx
jz	short loc_721763
call	sub_64A430

loc_721763:
mov	ecx, [esp+16Ch+var_90]
cmp	ecx, ebx
jz	short loc_721773
call	sub_64A400

loc_721773:
mov	eax, [esp+16Ch+var_A8]
cmp	eax, ebx
jz	short loc_72179B
dec	dword ptr [eax]
mov	edi, eax
cmp	[edi], ebx
jnz	short loc_72179B
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_72179B:
mov	eax, [esi]
movzx	ecx, word ptr [eax+14Ah]
mov	[esp+16Ch+var_15C], ecx
fild	[esp+16Ch+var_15C]
fdiv	ds:dbl_15FCE20
fstp	dword ptr [esi+0B0h]
mov	eax, [eax+11Ch]
cmp	eax, ebx
jz	short loc_721809
mov	eax, [eax+14h]
cmp	eax, ebx
jz	short loc_721809
lea	ecx, [eax+14h]
call	sub_725AB0
test	eax, eax
jbe	short loc_721809
mov	edx, [esi]
mov	eax, [edx+11Ch]
mov	edi, [eax+14h]
cmp	edi, ebx
jz	short loc_7217E7
inc	dword ptr [edi+4]

loc_7217E7:
mov	ecx, [esi+2Ch]
cmp	ecx, ebx
jz	short loc_7217F3
call	sub_64A400

loc_7217F3:
mov	eax, edi
mov	[esi+2Ch], edi
mov	ecx, [eax+30h]
mov	[esi+30h], ecx
lea	ecx, [eax+14h]
call	sub_725AB0
mov	[esi+34h], eax

loc_721809:
mov	ecx, esi
call	sub_720A10
mov	ecx, [esi+8]
movzx	ecx, word ptr [ecx+16h]
mov	eax, [esi+34h]
add	eax, [ebp+4]
mov	dl, cl
shr	dl, 7
mov	[esp+16Ch+var_15C], eax
test	dl, 1
jz	short loc_721838
test	ecx, 8000h
jz	short loc_721838
inc	eax
mov	[esp+16Ch+var_15C], eax

loc_721838:
push	1
lea	ecx, [eax+eax]
push	ecx
push	eax
call	sub_733CF0
mov	edi, eax
add	esp, 0Ch
cmp	edi, 400h
jnb	short loc_721881
lea	eax, [esi+530h]
cmp	eax, ebx
jz	short loc_72186E
mov	[eax], ebx
mov	[esi+0Ch], eax
mov	edx, [eax]
xor	edx, edi
and	edx, 0FFFFFFFh
xor	[eax], edx
jmp	short loc_7218E5

loc_72186E:
xor	eax, eax
mov	[esi+0Ch], eax
mov	edx, [eax]
xor	edx, edi
and	edx, 0FFFFFFFh
xor	[eax], edx
jmp	short loc_7218E5

loc_721881:
mov	eax, [esi+930h]
cmp	eax, ebx
jz	short loc_7218C9
mov	ecx, [eax]
and	ecx, 0FFFFFFFh
cmp	edi, ecx
jb	short loc_7218BE
mov	ecx, [esi]
push	eax
add	ecx, 0ECh
call	sub_7351E0
mov	ecx, [esi]
push	1
add	edi, 64h
push	edi
add	ecx, 0ECh
call	sub_733BF0
mov	[esi+930h], eax

loc_7218BE:
mov	edx, [esi+930h]
mov	[esi+0Ch], edx
jmp	short loc_7218E5

loc_7218C9:
mov	ecx, [esi]
push	1
add	edi, 64h
push	edi
add	ecx, 0ECh
call	sub_733BF0
mov	[esi+930h], eax
mov	[esi+0Ch], eax

loc_7218E5:
mov	eax, [esi+0Ch]
mov	ecx, [eax]
and	ecx, 0FFFFFFFh
or	ecx, 40000000h
mov	[eax], ecx
xor	edx, edx
mov	[eax+26h], dx
mov	[eax+4], ebx
mov	[eax+8], ebx
xor	ecx, ecx
mov	[eax+28h], cx
mov	[eax+10h], ebx
mov	[eax+0Ch], ebx
mov	[eax+18h], ebx
mov	[eax+14h], ebx
mov	[eax+20h], ebx
mov	eax, [esi+0Ch]
and	dword ptr [eax], 0BFFFFFFFh
mov	eax, [esi+0Ch]
mov	edx, [eax]
shr	edx, 1Fh
test	dl, 1
jz	short loc_721938
mov	cl, byte ptr [esp+16Ch+var_15C]
mov	[eax+1Ch], cl
jmp	short loc_72193F

loc_721938:
mov	edx, [esp+16Ch+var_15C]
mov	[eax+4], edx

loc_72193F:
mov	eax, [esi]
mov	ecx, [eax+11Ch]
mov	edx, [ebp+1Ch]
cmp	ecx, ebx
jz	short loc_721958
push	edx
call	sub_72E8E0
mov	edi, eax
jmp	short loc_72195A

loc_721958:
mov	edi, edx

loc_72195A:
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
shr	eax, 1Fh
test	al, 1
jz	short loc_721976
mov	edx, [ecx+8]
xor	edx, edi
and	edx, offset sub_FFFFFF
xor	[ecx+8], edx
jmp	short loc_721979

loc_721976:
mov	[ecx+8], edi

loc_721979:
mov	ecx, [esi+0Ch]
mov	eax, [ecx]
shr	eax, 1Fh
test	al, 1
jz	short loc_72198B
movzx	ebp, byte ptr [ecx+1Ch]
jmp	short loc_72198E

loc_72198B:
mov	ebp, [ecx+4]

loc_72198E:
mov	edx, [ecx]
shr	edx, 1Fh
lea	edi, [ecx+1Eh]
test	dl, 1
jnz	short loc_72199E
lea	edi, [ecx+2Ah]

loc_72199E:
call	sub_733C80
mov	[esi+98h], eax
mov	[esi+94h], edi
mov	[esi+9Ch], ebx
mov	[esi+0A0h], ebp
mov	[esi+0A4h], ebx
mov	eax, 1
mov	[esi+2E4h], eax
mov	[esi+2E8h], eax
mov	eax, [esi]
mov	[esi+940h], ebx
mov	[esi+944h], ebx
mov	[esi+948h], ebx
mov	[esi+2ECh], bl
mov	[esi+2F0h], ebx
mov	[esi+528h], bl
fld	dword ptr [eax+44h]
fsub	dword ptr [eax+3Ch]
add	eax, 3Ch
pop	edi
mov	[esi+2DCh], ebx
mov	[esi+2E0h], ebx
fstp	dword ptr [esi+2D8h]
pop	esi
pop	ebp
pop	ebx
add	esp, 15Ch
retn	4
sub_721690 endp




sub_721A20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_721A33
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_721A55

loc_721A33:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_721A5A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_721A55:
call	sub_721430

loc_721A5A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	edx, [esi]
lea	ecx, [eax+eax*2]
mov	esi, [edx+ecx*4+8]
lea	ecx, [edx+ecx*4+8]
mov	edi, 0FFFFFFFEh
mov	[esp+8+arg_0], ecx
cmp	esi, edi
jnz	short loc_721AA2
mov	edx, [esp+8+arg_4]
mov	dword ptr [ecx], 0FFFFFFFFh
mov	eax, [edx]
mov	[ecx+4], eax
mov	eax, [edx+4]
test	eax, eax
jz	short loc_721A97
inc	dword ptr [eax]

loc_721A97:
mov	edx, [edx+4]
pop	edi
mov	[ecx+8], edx
pop	esi
retn	0Ch

loc_721AA2:
push	ebx
push	ebp
mov	ebp, [edx+4]
mov	esi, eax
lea	esp, [esp+0]

loc_721AB0:
inc	esi
and	esi, ebp
lea	ebx, [esi+esi*2]
cmp	[edx+ebx*4+8], edi
jnz	short loc_721AB0
lea	edi, [esi+esi*2]
add	ecx, 4
lea	ebx, [edx+edi*4+8]
mov	edi, [ecx]
and	edi, ebp
cmp	edi, eax
jnz	short loc_721B05
test	ebx, ebx
jz	short loc_721AEE
mov	eax, [esp+10h+arg_0]
mov	eax, [eax]
mov	[ebx], eax
mov	edx, [ecx]
mov	[ebx+4], edx
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_721AE8
inc	dword ptr [eax]

loc_721AE8:
mov	eax, [ecx+4]
mov	[ebx+8], eax

loc_721AEE:
mov	edx, [esp+10h+arg_4]
push	edx
call	sub_71F270
mov	eax, [esp+10h+arg_0]
pop	ebp
pop	ebx
pop	edi
mov	[eax], esi
pop	esi
retn	0Ch

loc_721B05:
lea	edi, [edi+edi*2]
cmp	[edx+edi*4+8], eax
lea	edi, [edx+edi*4+8]
jz	short loc_721B21

loc_721B12:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[edx+edi*4+8], eax
lea	edi, [edx+edi*4+8]
jnz	short loc_721B12

loc_721B21:
test	ebx, ebx
jz	short loc_721B41
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
mov	[ebx], eax
mov	eax, [ecx]
mov	[ebx+4], eax
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_721B3B
inc	dword ptr [eax]

loc_721B3B:
mov	edx, [ecx+4]
mov	[ebx+8], edx

loc_721B41:
mov	eax, [esp+10h+arg_4]
push	eax
mov	[edi], esi
call	sub_71F270
mov	ecx, [esp+10h+arg_0]
pop	ebp
pop	ebx
pop	edi
mov	dword ptr [ecx], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_721A20 endp

align 10h



sub_721B60 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7215C0
test	[esp+4+arg_0], 1
jz	short loc_721B7D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_721B7D:
mov	eax, esi
pop	esi
retn	4
sub_721B60 endp

align 10h



sub_721B90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_721BA3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_721BC5

loc_721BA3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_721BCA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_721BC5:
call	sub_721430

loc_721BCA:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	edx, [esi]
lea	ecx, [eax+eax*2]
mov	esi, [edx+ecx*4+8]
lea	ecx, [edx+ecx*4+8]
mov	edi, 0FFFFFFFEh
mov	[esp+8+arg_0], ecx
cmp	esi, edi
jnz	short loc_721C15
mov	eax, [esp+8+arg_4]
mov	dword ptr [ecx], 0FFFFFFFFh
mov	edx, [eax]
mov	edx, [edx]
mov	[ecx+4], edx
mov	edx, [eax+4]
mov	eax, [edx]
test	eax, eax
jz	short loc_721C0B
inc	dword ptr [eax]

loc_721C0B:
mov	eax, [edx]
pop	edi
mov	[ecx+8], eax
pop	esi
retn	0Ch

loc_721C15:
push	ebx
push	ebp
mov	ebp, [edx+4]
mov	esi, eax
lea	esp, [esp+0]

loc_721C20:
inc	esi
and	esi, ebp
lea	ebx, [esi+esi*2]
cmp	[edx+ebx*4+8], edi
jnz	short loc_721C20
lea	edi, [esi+esi*2]
add	ecx, 4
lea	ebx, [edx+edi*4+8]
mov	edi, [ecx]
and	edi, ebp
cmp	edi, eax
jnz	short loc_721C75
test	ebx, ebx
jz	short loc_721C5E
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
mov	[ebx], eax
mov	eax, [ecx]
mov	[ebx+4], eax
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_721C58
inc	dword ptr [eax]

loc_721C58:
mov	edx, [ecx+4]
mov	[ebx+8], edx

loc_721C5E:
mov	eax, [esp+10h+arg_4]
push	eax
call	sub_71F1B0
mov	ecx, [esp+10h+arg_0]
pop	ebp
pop	ebx
pop	edi
mov	[ecx], esi
pop	esi
retn	0Ch

loc_721C75:
lea	edi, [edi+edi*2]
cmp	[edx+edi*4+8], eax
lea	edi, [edx+edi*4+8]
jz	short loc_721C91

loc_721C82:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[edx+edi*4+8], eax
lea	edi, [edx+edi*4+8]
jnz	short loc_721C82

loc_721C91:
test	ebx, ebx
jz	short loc_721CB1
mov	edx, [esp+10h+arg_0]
mov	eax, [edx]
mov	[ebx], eax
mov	eax, [ecx]
mov	[ebx+4], eax
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_721CAB
inc	dword ptr [eax]

loc_721CAB:
mov	edx, [ecx+4]
mov	[ebx+8], edx

loc_721CB1:
mov	eax, [esp+10h+arg_4]
push	eax
mov	[edi], esi
call	sub_71F1B0
mov	ecx, [esp+10h+arg_0]
pop	ebp
pop	ebx
pop	edi
mov	dword ptr [ecx], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_721B90 endp

align 10h


; Attributes: bp-based frame fpd=4

sub_721CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

mov	eax, [esp-4+arg_4]
mov	ecx, [esp-4+arg_0]
push	ebp
lea	ebp, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_721D57
push	ebx
push	esi
mov	[esp+8+arg_4], eax
push	edi

loc_721CE8:
mov	edi, [ebp+4+var_4]
test	edi, edi
jz	short loc_721D4A
mov	eax, [edi+14h]
mov	ecx, [edi+10h]
lea	edx, [eax+eax*2]
lea	ecx, [ecx+edx*4-0Ch]
test	eax, eax
jbe	short loc_721D18
lea	esi, [ecx+8]
mov	ebx, eax

loc_721D05:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_721D10
call	sub_64A430

loc_721D10:
sub	esi, 0Ch
sub	ebx, 1
jnz	short loc_721D05

loc_721D18:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+10h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_721D35
call	sub_64A400

loc_721D35:
mov	ecx, edi
call	nullsub_2
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_721D4A:
sub	ebp, 4
sub	[esp+0Ch+arg_4], 1
jnz	short loc_721CE8
pop	edi
pop	esi
pop	ebx

loc_721D57:
pop	ebp
retn
sub_721CD0 endp

align 10h



sub_721D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	ebx
mov	ebx, [eax]
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+14h+arg_4]
mov	ebp, [esi+4]
push	edi
mov	edi, [esi]
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], ecx
test	edi, edi
jz	short loc_721DB5
mov	edx, [edi+4]
and	edx, ebx
push	edx
lea	eax, [esp+1Ch+var_8]
push	eax
mov	ecx, esi
call	sub_71F210
test	eax, eax
jl	short loc_721DB5
lea	ecx, [esp+18h+var_8]
lea	edx, [eax+eax*2+3]
push	ecx
lea	ecx, [edi+edx*4]
call	sub_71F1B0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_721DB5:
push	ebx
lea	eax, [esp+1Ch+var_8]
push	eax
push	ebp
mov	ecx, esi
call	sub_721B90
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_721D60 endp

align 10h



sub_721DD0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
push	ebx
mov	ebx, [esp+2Ch+arg_0]
cmp	dword ptr [ebx+0Ch], 0
lea	eax, [ebx+0Ch]
push	edi
mov	[esp+30h+var_28], 0
mov	edi, ecx
mov	[esp+30h+var_28], eax
jz	short loc_721E08
mov	eax, [ebx+8]
test	eax, eax
jz	short loc_721E08
mov	ecx, [ebx+4]
push	eax
call	sub_6FFF80
test	al, al
jnz	loc_72213F

loc_721E08:
mov	ecx, [ebx]
push	ebp
push	esi
test	ecx, ecx
jz	short loc_721E72
mov	esi, [ecx]
lea	eax, [ebx+4]
test	esi, esi
jz	short loc_721E72
mov	edx, [esi+4]
and	edx, [eax]
push	edx
push	eax
call	sub_6DCF60
test	eax, eax
jl	short loc_721E72
lea	eax, [eax+eax*2+3]
lea	esi, [esi+eax*4]
test	esi, esi
jz	short loc_721E72
lea	ebp, [esi+4]
test	ebp, ebp
jz	short loc_721E72
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_721E44
inc	dword ptr [eax]

loc_721E44:
mov	edi, [esp+38h+var_28]
mov	esi, [edi]
test	esi, esi
jz	short loc_721E68
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_721E68
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_721E68:
mov	ecx, [ebp+0]
mov	[edi], ecx
jmp	loc_72213D

loc_721E72:
mov	ecx, [ebx+4]
movzx	eax, word ptr [ecx+2Ah]
mov	edx, eax
shr	edx, 0Bh
test	dl, 1
jz	short loc_721EBD
call	sub_700F40
mov	edi, eax
test	edi, edi
jz	short loc_721E90
inc	dword ptr [edi]

loc_721E90:
mov	ebp, [esp+38h+var_28]
mov	esi, [ebp+0]
test	esi, esi
jz	short loc_721EB5
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_721EB5
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_721EB5:
mov	[ebp+0], edi
jmp	loc_722129

loc_721EBD:
mov	ebp, [edi+0Ch]
mov	dl, al
shr	dl, 2
test	dl, 1
jz	loc_721F5F
shr	eax, 0Ch
and	al, 1
mov	bl, al
movzx	eax, byte ptr [edi+14Eh]
shr	al, 5
and	al, 1
mov	byte ptr [esp+38h+var_24], al
mov	al, [ecx+28h]
mov	dl, al
shr	dl, 1
and	dl, 1
and	al, 1
mov	byte ptr [esp+38h+var_28], dl
mov	byte ptr [esp+38h+var_20], al
call	sub_700520
mov	eax, [eax]
and	eax, 0FFFFFFFCh
test	bl, bl
setz	cl
movzx	edx, cl
mov	ecx, [esp+38h+var_24]
push	0
push	edx
mov	edx, [esp+40h+var_28]
push	ecx
mov	ecx, [esp+44h+var_20]
push	edx
push	ecx
add	eax, 8
push	eax
mov	ecx, ebp
call	sub_6D5620
mov	ebx, eax
mov	eax, [esp+38h+arg_0]
mov	esi, [eax+0Ch]
add	eax, 0Ch
test	esi, esi
jz	short loc_721F52
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_721F52
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_721F52:
mov	eax, [esp+38h+arg_0]
add	eax, 0Ch
mov	[eax], ebx
mov	ebx, [esp+38h+arg_0]

loc_721F5F:
cmp	dword ptr [ebx+0Ch], 0
lea	eax, [ebx+0Ch]
mov	[esp+38h+var_28], eax
jnz	loc_722129
cmp	byte ptr [esp+38h+arg_4], 0
jnz	loc_7220F6
test	byte ptr [edi+150h], 10h
jnz	loc_7220F6
cmp	dword ptr [edi+144h], 0
jz	loc_7220F6
push	1
lea	ecx, [esp+3Ch+var_1C]
call	sub_71DDF0
mov	esi, [ebx+4]
mov	cl, [edi+14Eh]
lea	eax, [ebx+4]
mov	al, [esi+28h]
mov	bx, [esi+2Ah]
shr	cl, 5
mov	dl, al
and	cl, 1
shr	dl, 1
mov	byte ptr [esp+38h+arg_4], cl
and	dl, 1
and	al, 1
shr	bx, 0Ch
mov	ecx, esi
and	bl, 1
mov	byte ptr [esp+38h+var_20], dl
mov	byte ptr [esp+38h+var_28], al
call	sub_700520
mov	eax, [eax]
and	eax, 0FFFFFFFCh
lea	ecx, [esp+38h+var_1C]
push	ecx
test	bl, bl
setz	dl
movzx	ecx, dl
mov	edx, [esp+3Ch+arg_4]
push	ecx
mov	ecx, [esp+40h+var_20]
push	edx
mov	edx, [esp+44h+var_28]
push	ecx
push	edx
add	eax, 8
push	eax
mov	ecx, ebp
call	sub_6D5620
mov	ecx, [edi+10h]
mov	ebx, eax
test	ecx, ecx
jz	short loc_722028
mov	eax, [ecx]
mov	eax, [eax+24h]
lea	edx, [esp+38h+var_20]
push	edx
mov	[esp+3Ch+var_28], 1
call	eax
jmp	short loc_722039

loc_722028:
lea	ecx, [esp+38h+arg_4]
mov	[esp+38h+var_28], 2
call	sub_679E30

loc_722039:
push	eax
lea	ecx, [esp+3Ch+var_24]
call	sub_67AF90
test	byte ptr [esp+38h+var_28], 2
jz	short loc_722058
and	[esp+38h+var_28], 0FFFFFFFDh
lea	ecx, [esp+38h+arg_4]
call	sub_4E40F0

loc_722058:
test	byte ptr [esp+38h+var_28], 1
jz	short loc_722068
lea	ecx, [esp+38h+var_20]
call	sub_4E40F0

loc_722068:
mov	eax, [esp+38h+var_18]
mov	[esp+38h+arg_4], eax
test	eax, eax
jnz	short loc_72207C
mov	[esp+38h+arg_4], offset	byte_146D660

loc_72207C:
mov	eax, [esp+38h+arg_0]
mov	esi, [esp+38h+var_24]
mov	ecx, [eax+4]
add	eax, 4
and	esi, 0FFFFFFFCh
call	sub_700520
mov	edx, [eax]
mov	ecx, [esp+38h+arg_4]
mov	eax, [edi+144h]
push	ecx
and	edx, 0FFFFFFFCh
add	esi, 8
push	esi
add	edx, 8
push	edx
add	eax, 0Ch
push	offset aMissingFontSIn ; "Missing font \"%s\" in \"%s\". Search	log:\n"...
push	eax
call	sub_67E7F0
or	byte ptr [edi+150h], 10h
add	esp, 14h
lea	ecx, [esp+38h+var_24]
call	sub_4E40F0
test	ebx, ebx
jz	short loc_7220E9
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_7220E9
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_7220E9:
lea	ecx, [esp+38h+var_18]
call	sub_679B60
mov	ebx, [esp+38h+arg_0]

loc_7220F6:
mov	ecx, ebp
call	sub_6F4090
mov	esi, [ebx+0Ch]
lea	edi, [ebx+0Ch]
mov	ebp, eax
mov	[esp+38h+var_28], edi
test	esi, esi
jz	short loc_722127
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_722127
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_722127:
mov	[edi], ebp

loc_722129:
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_72213D
mov	edx, [esp+38h+var_28]
push	edx
lea	eax, [ebx+4]
push	eax
call	sub_721D60

loc_72213D:
pop	esi
pop	ebp

loc_72213F:
mov	eax, [ebx+4]
mov	ecx, [esp+30h+var_28]
mov	[ebx+8], eax
mov	eax, [ecx]
pop	edi
pop	ebx
add	esp, 28h
retn	8
sub_721DD0 endp

align 10h



sub_722160 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
lea	ecx, [esi+10h]
mov	[esi], edi
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
call	sub_71F550
mov	eax, [edi+8]
mov	ecx, [eax+8]
cmp	ecx, ebx
jnz	short loc_722198
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+3Ch]
call	eax
jmp	short loc_72219B

loc_722198:
mov	eax, [ecx+1Ch]

loc_72219B:
lea	ecx, [esi+0BCh]
mov	[ecx], ebx
mov	[ecx+4], eax
mov	[esi+0C4h], ecx
mov	[esi+0D0h], ebx
mov	[esi+0CCh], ebx
mov	[esi+0C8h], ebx
mov	edi, [esi+0D0h]
cmp	edi, ebx
jz	short loc_7221E2
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_7221E2
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_7221E2:
lea	ecx, [esi+0D4h]
mov	[esi+0D0h], ebx
call	sub_71F550
lea	ecx, [esi+180h]
call	sub_71F550
lea	ecx, [esi+22Ch]
call	sub_71F550
mov	ecx, [esp+0Ch+arg_4]
mov	[esi+504h], ebx
pop	edi
mov	[esi+930h], ebx
mov	[esi+938h], ebx
mov	[esi+934h], ebx
mov	[esi+94Ch], bl
mov	[esi+94Dh], bl
mov	[esi+93Ch], ecx
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_722160 endp

align 10h



sub_722240 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+930h]
test	eax, eax
jz	short loc_72225B
mov	ecx, [esi]
push	eax
add	ecx, 0ECh
call	sub_7351E0

loc_72225B:
push	edi
mov	edi, [esi+504h]
test	edi, edi
jz	short loc_722280
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_722280
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_722280:
mov	ecx, [esi+298h]
test	ecx, ecx
jz	short loc_72228F
call	sub_64A430

loc_72228F:
mov	ecx, [esi+278h]
test	ecx, ecx
jz	short loc_72229E
call	sub_64A430

loc_72229E:
mov	ecx, [esi+248h]
test	ecx, ecx
jz	short loc_7222AD
call	sub_64A400

loc_7222AD:
mov	edi, [esi+230h]
test	edi, edi
jz	short loc_7222D1
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_7222D1
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_7222D1:
mov	ecx, [esi+1ECh]
test	ecx, ecx
jz	short loc_7222E0
call	sub_64A430

loc_7222E0:
mov	ecx, [esi+1CCh]
test	ecx, ecx
jz	short loc_7222EF
call	sub_64A430

loc_7222EF:
mov	ecx, [esi+19Ch]
test	ecx, ecx
jz	short loc_7222FE
call	sub_64A400

loc_7222FE:
mov	edi, [esi+184h]
test	edi, edi
jz	short loc_722322
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_722322
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_722322:
mov	ecx, [esi+140h]
test	ecx, ecx
jz	short loc_722331
call	sub_64A430

loc_722331:
mov	ecx, [esi+120h]
test	ecx, ecx
jz	short loc_722340
call	sub_64A430

loc_722340:
mov	ecx, [esi+0F0h]
test	ecx, ecx
jz	short loc_72234F
call	sub_64A400

loc_72234F:
mov	edi, [esi+0D8h]
test	edi, edi
jz	short loc_722373
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_722373
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_722373:
mov	edi, [esi+0D0h]
test	edi, edi
jz	short loc_722397
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_722397
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_722397:
lea	ecx, [esi+0BCh]
call	sub_7213B0
mov	ecx, [esi+7Ch]
pop	edi
test	ecx, ecx
jz	short loc_7223AF
call	sub_64A430

loc_7223AF:
mov	ecx, [esi+5Ch]
test	ecx, ecx
jz	short loc_7223BB
call	sub_64A430

loc_7223BB:
mov	ecx, [esi+2Ch]
test	ecx, ecx
jz	short loc_7223C7
call	sub_64A400

loc_7223C7:
mov	esi, [esi+14h]
test	esi, esi
jz	short loc_7223E8
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_7223E8
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7223E8:
pop	esi
retn
sub_722240 endp

align 10h



sub_7223F0 proc	near

var_98=	dword ptr -98h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
arg_0= dword ptr  4

sub	esp, 84h
mov	eax, [esp+84h+arg_0]
push	ebx
push	ebp
push	esi
push	edi
xor	ebp, ebp
push	eax
mov	esi, ecx
mov	[esp+98h+var_78], ebp
call	sub_721690
mov	eax, [esi+8]
mov	[esi+8Ch], ebp
movzx	ecx, word ptr [eax+16h]
mov	dl, cl
shr	dl, 7
test	dl, 1
jz	loc_7225EB
test	ecx, 8000h
jz	loc_7225EB
mov	eax, [esi+9Ch]
mov	ecx, [esi+94h]
lea	edi, [ecx+eax*8]
xor	edx, edx
xor	eax, eax
lea	ecx, [esi+10h]
mov	[edi+4], dx
mov	[edi+6], ax
call	sub_71F6D0
mov	eax, [eax]
mov	[esi+0C8h], eax
cmp	eax, ebp
jz	loc_7225D1
push	ebp
lea	ecx, [esi+0C4h]
push	ecx
mov	ecx, [esi]
call	sub_721DD0
mov	ebx, eax
test	ebx, ebx
jz	short loc_722480
inc	dword ptr [ebx]

loc_722480:
mov	edx, [ebx+1Ch]
mov	ecx, [edx+0Ch]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	2022h
call	edx
mov	ecx, 0FFBFh
and	[edi+6], cx
mov	[edi], ax
mov	eax, 12Ch
mov	ecx, esi
mov	[edi+2], ax
call	sub_71E820
fadd	st, st
push	ecx		; float
mov	ecx, edi
fdiv	ds:dbl_15FCD78
fstp	[esp+98h+var_70]
fld	[esp+98h+var_70]
fstp	[esp+98h+var_98]
call	sub_6F5EB0
mov	edx, 0FFFh
and	[edi+4], dx
mov	eax, [esi+0C8h]
mov	edi, [eax+20h]
mov	ecx, [esi+9Ch]
mov	edx, [esi+94h]
lea	eax, [edx+ecx*8]
mov	ecx, 4000h
or	[eax+6], cx
mov	edx, [esi+9Ch]
mov	eax, [esi+94h]
lea	eax, [eax+edx*8]
mov	ecx, 2000h
or	[eax+6], cx
mov	edx, [esi+0A4h]
mov	eax, [esi+98h]
mov	[eax+edx*4], ebx
mov	ecx, 1
add	[esi+0A4h], ecx
add	[ebx], ecx
mov	edx, [esi+9Ch]
mov	eax, [esi+94h]
lea	eax, [eax+edx*8]
mov	edx, 4000h
or	[eax+6], dx
mov	edx, [esi+94h]
mov	eax, [esi+9Ch]
lea	eax, [edx+eax*8]
mov	edx, 1000h
or	[eax+6], dx
mov	eax, [esi+0A4h]
mov	edx, [esi+98h]
mov	[edx+eax*4], edi
add	[esi+0A4h], ecx
mov	[esp+94h+var_24], edi
cmp	[esi+94h], ebp
jz	short loc_72258D
mov	eax, [esi+9Ch]
cmp	eax, [esi+0A0h]
jnb	short loc_72258D
inc	eax
mov	[esi+9Ch], eax

loc_72258D:
inc	dword ptr [ebx]
mov	ebp, [esi+14h]
test	ebp, ebp
jz	short loc_7225B1
add	dword ptr [ebp+0], 0FFFFFFFFh
jnz	short loc_7225B1
mov	ecx, ebp
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebp
call	edx

loc_7225B1:
mov	[esi+14h], ebx
mov	[esi+28h], edi
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_7225D1
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_7225D1:
mov	eax, 2BCh
mov	[esi+8Ch], eax
mov	[esi+44h], eax
mov	dword ptr [esi+88h], 0FFFFFED4h
jmp	short loc_7225FC

loc_7225EB:
movsx	eax, word ptr [eax+0Eh]
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
mov	[esi+88h], eax

loc_7225FC:
mov	ecx, [esi+8]
movzx	edx, word ptr [ecx+0Ch]
movzx	eax, word ptr [ecx+12h]
add	eax, edx
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
add	[esi+8Ch], eax
movzx	eax, word ptr [ecx+14h]
lea	edx, [eax+eax*4]
add	edx, edx
lea	eax, [esi+2DCh]
add	edx, edx
push	eax
mov	[esi+90h], edx
call	sub_6FFB40
mov	[esp+94h+var_4C], eax
xor	ebx, ebx
lea	esp, [esp+0]

loc_722640:
mov	eax, [esi+74h]
lea	edi, [esi+5Ch]
test	eax, eax
jz	loc_72341B
mov	ecx, [edi+1Ch]
cmp	ecx, [eax+4]
jnb	loc_72341B
lea	ebp, [esi+10h]
mov	ecx, ebp
call	sub_71F6D0
cmp	dword ptr [esi+2E8h], 1
mov	[esp+94h+var_7C], eax
jnz	loc_72270B
mov	edx, [esi]
test	byte ptr [edx+14Eh], 8
jz	short loc_7226A9
test	ebx, ebx
jnz	short loc_7226A9
mov	ecx, [esp+94h+var_7C]
movzx	edx, word ptr [ecx+8]
movzx	eax, word ptr [esi+18h]
push	edx
push	eax
push	7
call	sub_71DD70
test	al, al
jz	short loc_7226A9
push	ebp
lea	ecx, [esi+22Ch]
call	sub_71F880

loc_7226A9:
cmp	dword ptr [esi+2E8h], 1
jnz	short loc_72270B
cmp	byte ptr [esi+2F4h], 0
jz	short loc_72270B
cmp	dword ptr [esi+44h], 0
fld	dword ptr [esi+2D8h]
fstp	[esp+94h+var_80]
jnz	short loc_7226E0
cmp	dword ptr [esi+100h], 0
jnz	short loc_7226E0
push	ebp
lea	ecx, [esi+0D4h]
call	sub_71F880

loc_7226E0:
fild	dword ptr [esi+44h]
fld	[esp+94h+var_80]
fmul	ds:dbl_15FCC48
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_72270B
cmp	dword ptr [esi+1ACh], 0
jnz	short loc_72270B
push	ebp
lea	ecx, [esi+180h]
call	sub_71F880

loc_72270B:
mov	dword ptr [esi+2E4h], 1
test	ebx, ebx
jz	short loc_722720
mov	ecx, ebx
call	sub_64A400

loc_722720:
mov	eax, [esi]
xor	ebx, ebx
mov	[esp+94h+var_74], ebx
cmp	[eax+18h], ebx
jz	short loc_72276B
lea	ecx, [esp+94h+var_44]
push	ecx
mov	ecx, edi
call	sub_725AE0
mov	ecx, [esp+94h+var_44]
lea	edx, [esp+94h+var_48]
push	edx
mov	edx, [esi]
push	ecx
mov	ecx, [edx+18h]
push	eax
call	sub_71EE80
test	eax, eax
jz	short loc_722755
inc	dword ptr [eax+4]

loc_722755:
mov	ebx, eax
mov	[esp+94h+var_74], ebx
test	eax, eax
jz	short loc_72276B
mov	eax, [esp+94h+var_48]
mov	[esi+2E4h], eax
jmp	short loc_7227A8

loc_72276B:
mov	edi, [esp+94h+var_7C]
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7227AC
mov	dx, [ecx+2Ah]
shr	dx, 9
test	dl, 1
jz	short loc_7227AC
cmp	word ptr [edi+8], 0
jz	short loc_7227AC
call	sub_6FFD20
mov	edi, eax
test	edi, edi
jz	short loc_722797
inc	dword ptr [edi+4]

loc_722797:
test	ebx, ebx
jz	short loc_7227A2
mov	ecx, ebx
call	sub_64A400

loc_7227A2:
mov	ebx, edi
mov	[esp+94h+var_74], ebx

loc_7227A8:
mov	edi, [esp+94h+var_7C]

loc_7227AC:
fld1
mov	dword ptr [esi+500h], 0
fstp	dword ptr [esi+508h]
fld	ds:flt_1431A30
fstp	dword ptr [esi+524h]
test	ebx, ebx
jnz	loc_722CE0
mov	eax, 0A0h
cmp	[edi+8], ax
setz	al
mov	[esi+529h], al
movzx	ecx, word ptr [edi+8]
test	cx, cx
jz	short loc_722814
test	al, al
jnz	short loc_722810
movzx	eax, cx
cmp	ax, 9
jz	short loc_722814
cmp	ax, 0Dh
jz	short loc_722814
cmp	ax, 20h
jz	short loc_722814
mov	ecx, 3000h
cmp	ax, cx
jz	short loc_722814

loc_722810:
xor	eax, eax
jmp	short loc_722819

loc_722814:
mov	eax, 1

loc_722819:
cmp	dword ptr [esi+0D0h], 0
mov	[esi+528h], al
jz	short loc_722870
mov	edx, [esi+0C8h]
cmp	edx, [edi]
jnz	short loc_722870
mov	eax, [esi+0D0h]
test	eax, eax
jz	short loc_72283E
inc	dword ptr [eax]

loc_72283E:
mov	edi, [esi+504h]
test	edi, edi
jz	short loc_722862
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_722862
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_722862:
mov	eax, [esi+0D0h]
mov	[esi+504h], eax
jmp	short loc_7228D9

loc_722870:
mov	eax, [esp+94h+var_7C]
mov	ecx, [eax]
mov	[esi+0C8h], ecx
cmp	word ptr [eax+8], 0
lea	ecx, [esi+0C4h]
setz	dl
mov	byte ptr [esp+94h+var_34], dl
mov	eax, [esp+94h+var_34]
push	eax
push	ecx
mov	ecx, [esi]
call	sub_721DD0
mov	ebx, eax
test	ebx, ebx
jz	short loc_7228A3
inc	dword ptr [ebx]

loc_7228A3:
mov	edi, [esi+504h]
test	edi, edi
jz	short loc_7228C7
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_7228C7
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_7228C7:
mov	[esi+504h], ebx
test	ebx, ebx
mov	ebx, [esp+94h+var_74]
jz	loc_723408

loc_7228D9:
mov	ecx, [esi+504h]
mov	edx, [ecx+1Ch]
mov	ecx, esi
mov	[esi+500h], edx
call	sub_71E820
fstp	[esp+94h+var_80]
fld	[esp+94h+var_80]
mov	ecx, [esi]
fst	dword ptr [esi+524h]
mov	eax, [esp+94h+var_7C]
fmul	ds:dbl_15FCE20
fstp	[esp+94h+var_80]
fld	[esp+94h+var_80]
fmul	ds:dbl_143B738
fstp	dword ptr [esi+508h]
mov	edx, [ecx+8]
mov	cl, [edx+20h]
movzx	eax, word ptr [eax+8]
and	cl, 2
neg	cl
sbb	cl, cl
and	cl, 3
add	cl, 0Ah
movzx	dx, cl
cmp	ax, dx
jz	loc_722B97
test	ax, ax
jz	loc_722B97
cmp	ax, 9
jz	loc_722B7D
mov	ecx, [esi+500h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
movzx	eax, ax
push	eax
mov	eax, [edx+0Ch]
call	eax
mov	[esi+50Ch], eax
cmp	eax, 0FFFFFFFFh
jnz	loc_722B48
cmp	dword ptr [esi+93Ch], 0
jz	loc_722B48
mov	ecx, [esi]
test	byte ptr [ecx+150h], 10h
jnz	loc_722B48
push	1
lea	ecx, [esp+98h+var_1C]
call	sub_71DDF0
mov	edx, [esi]
movzx	eax, byte ptr [edx+14Eh]
mov	edi, [esi+0C8h]
mov	bx, [edi+2Ah]
shr	al, 5
and	al, 1
mov	byte ptr [esp+94h+var_38], al
mov	al, [edi+28h]
mov	cl, al
shr	cl, 1
and	cl, 1
mov	byte ptr [esp+94h+var_50], cl
and	al, 1
shr	bx, 0Ch
mov	ecx, edi
and	bl, 1
mov	byte ptr [esp+94h+var_3C], al
call	sub_700520
mov	edx, [esi]
mov	ecx, [edx+0Ch]
mov	eax, [eax]
and	eax, 0FFFFFFFCh
lea	edx, [esp+94h+var_1C]
push	edx
test	bl, bl
setz	dl
movzx	edx, dl
push	edx
mov	edx, [esp+9Ch+var_38]
push	edx
mov	edx, [esp+0A0h+var_50]
push	edx
mov	edx, [esp+0A4h+var_3C]
push	edx
add	eax, 8
push	eax
call	sub_6D5620
mov	ebx, eax
mov	eax, [esi]
mov	ecx, [eax+10h]
test	ecx, ecx
jz	short loc_722A2A
mov	edx, [ecx]
mov	edx, [edx+24h]
or	[esp+94h+var_78], 1
lea	eax, [esp+94h+var_30]
push	eax
call	edx
jmp	short loc_722A38

loc_722A2A:
or	[esp+94h+var_78], 2
lea	ecx, [esp+94h+var_40]
call	sub_679E30

loc_722A38:
push	eax
lea	ecx, [esp+98h+var_70]
call	sub_67AF90
test	byte ptr [esp+94h+var_78], 2
jz	short loc_722A57
and	[esp+94h+var_78], 0FFFFFFFDh
lea	ecx, [esp+94h+var_40]
call	sub_4E40F0

loc_722A57:
test	byte ptr [esp+94h+var_78], 1
jz	short loc_722A6C
and	[esp+94h+var_78], 0FFFFFFFEh
lea	ecx, [esp+94h+var_30]
call	sub_4E40F0

loc_722A6C:
mov	eax, [esi+500h]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	edx, [edx+44h]
lea	eax, [esp+94h+var_6C]
push	eax
call	edx
mov	eax, [esi+500h]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	eax, [edx+38h]
call	eax
mov	[esp+94h+var_84], eax
mov	eax, [esp+94h+var_18]
mov	[esp+94h+var_80], eax
test	eax, eax
jnz	short loc_722AA9
mov	[esp+94h+var_80], offset byte_146D660

loc_722AA9:
mov	edi, [esp+94h+var_6C]
mov	ebp, [esp+94h+var_70]
mov	ecx, [esi+0C8h]
and	edi, 0FFFFFFFCh
and	ebp, 0FFFFFFFCh
call	sub_700520
mov	ecx, [esp+94h+var_80]
mov	edx, [esp+94h+var_84]
push	ecx
mov	ecx, [esp+98h+var_7C]
add	edi, 8
push	edi
push	edx
movzx	edx, word ptr [ecx+8]
movsx	ecx, byte ptr [ecx+8]
add	ebp, 8
push	ebp
push	edx
mov	edx, [eax]
mov	eax, [esi+93Ch]
push	ecx
and	edx, 0FFFFFFFCh
add	edx, 8
push	edx
add	eax, 0Ch
push	offset aMissingSGlyphC ; "Missing \"%s\" glyph '%c' (0x%x) in \"%s\"."...
push	eax
call	sub_67E7F0
mov	eax, [esi]
or	byte ptr [eax+150h], 10h
add	esp, 24h
lea	ecx, [esp+94h+var_6C]
call	sub_4E40F0
lea	ecx, [esp+94h+var_70]
call	sub_4E40F0
test	ebx, ebx
jz	short loc_722B3B
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_722B3B
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_722B3B:
lea	ecx, [esp+94h+var_18]
call	sub_679B60
mov	ebx, [esp+94h+var_74]

loc_722B48:
mov	ecx, [esi+500h]
mov	eax, [esi+50Ch]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+20h]
call	eax
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fmul	dword ptr [esi+508h]
fstp	dword ptr [esi+510h]
fldz
fld	ds:dbl_15FCC48
jmp	short loc_722BE4

loc_722B7D:
fldz
mov	dword ptr [esi+50Ch], 0FFFFFFFFh
fst	dword ptr [esi+510h]
fld	ds:dbl_15FCC48
jmp	short loc_722BE4

loc_722B97:
mov	ecx, [esi+500h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+0Ch]
push	20h
call	eax
mov	ecx, [esi+500h]
mov	[esi+50Ch], eax
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
push	eax
mov	eax, [edx+20h]
call	eax
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fld	ds:dbl_15FCC48
fmul	st(1), st
fld	dword ptr [esi+508h]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+510h]
fldz
fxch	st(1)

loc_722BE4:
cmp	dword ptr [esi+10h], 0
lea	ebp, [esi+10h]
jz	loc_722C76
cmp	byte ptr [esi+0B4h], 0
fxch	st(1)
fst	[esp+94h+var_80]
jz	short loc_722C46
cmp	dword ptr [ebp+0], 0
mov	ecx, [esp+94h+var_7C]
movzx	edx, word ptr [ecx+8]
jz	short loc_722C67
mov	ecx, [ebp+4]
fstp	st(1)
mov	ecx, [ecx+1Ch]
fstp	st
mov	eax, [ebp+8]
mov	ecx, [ecx+0Ch]
mov	edi, [ecx]
movzx	edx, dx
push	edx
push	eax
mov	eax, [edi+24h]
call	eax
fstp	[esp+94h+var_80]
fldz
fld	ds:dbl_15FCC48
fxch	st(1)

loc_722C38:
fld	[esp+94h+var_80]
fmul	dword ptr [esi+508h]
fstp	[esp+94h+var_80]

loc_722C46:
fld	dword ptr [esi+20h]
fadd	[esp+94h+var_80]
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_722C6D
fadd	st, st(2)
call	__ftol2_sse
jmp	short loc_722C97

loc_722C67:
fst	[esp+94h+var_80]
jmp	short loc_722C38

loc_722C6D:
fsub	st, st(2)
call	__ftol2_sse
jmp	short loc_722C97

loc_722C76:
fld	dword ptr [esi+20h]
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_722C8E
fadd	st, st(1)
jmp	short loc_722C90

loc_722C8E:
fsub	st, st(1)

loc_722C90:
call	__ftol2_sse
fxch	st(1)

loc_722C97:
fld	dword ptr [esi+510h]
mov	[esi+514h], eax
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_722CBA
faddp	st(1), st
jmp	short loc_722CBC

loc_722CBA:
fsubrp	st(1), st

loc_722CBC:
call	__ftol2_sse
xor	ecx, ecx
cmp	[esi+528h], cl
mov	[esi+518h], eax
setnz	cl
dec	ecx
and	eax, ecx
mov	[esi+51Ch], eax
jmp	loc_722D8C

loc_722CE0:
mov	edx, [edi]
mov	[esi+0C8h], edx
fild	dword ptr [ebx+18h]
mov	eax, [ebx+18h]
test	eax, eax
jge	short loc_722CF8
fadd	ds:flt_15FCC08

loc_722CF8:
fstp	[esp+94h+var_84]
fldz
fld	[esp+94h+var_84]
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FCC48
test	ah, 41h
jnz	short loc_722D22
fadd	st(1), st
fxch	st(1)
call	__ftol2_sse
mov	edi, eax
mov	[esp+94h+var_80], edi
jmp	short loc_722D31

loc_722D22:
fsub	st(1), st
fxch	st(1)
call	__ftol2_sse
mov	edi, eax
mov	[esp+94h+var_80], eax

loc_722D31:
fild	[esp+94h+var_80]
mov	[esi+518h], edi
fadd	ds:dbl_1440130
fstp	dword ptr [esi+510h]
fld	dword ptr [esi+20h]
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnz	short loc_722D61
faddp	st(1), st
jmp	short loc_722D63

loc_722D61:
fsubp	st(1), st

loc_722D63:
call	__ftol2_sse
mov	[esi+514h], eax
mov	[esi+51Ch], edi
mov	dword ptr [esi+50Ch], 0FFFFFFFFh
mov	byte ptr [esi+528h], 0
mov	byte ptr [esi+529h], 0

loc_722D8C:
mov	ecx, [esi+514h]
add	ecx, [esi+44h]
mov	[esi+520h], ecx
mov	ecx, esi
call	sub_721200
test	al, al
jnz	loc_723408
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_722DD1
mov	ecx, [esi+514h]
test	ecx, ecx
jl	short loc_722DC6
mov	edx, 0FFBFh
and	[eax+6], dx
jmp	short loc_722DCD

loc_722DC6:
neg	ecx
or	word ptr [eax+6], 40h

loc_722DCD:
mov	[eax+2], cx

loc_722DD1:
mov	eax, [esi+9Ch]
mov	ecx, [esi+94h]
lea	edi, [ecx+eax*8]
xor	eax, eax
xor	edx, edx
mov	[edi+4], dx
mov	[edi+6], ax
mov	cx, [esi+50Ch]
mov	[edi], cx
mov	eax, [ebp+1Ch]
test	eax, eax
jz	short loc_722E34
lea	ecx, [eax+14h]
call	sub_725AB0
test	eax, eax
jbe	short loc_722E34
lea	ecx, [ebp+4Ch]
call	sub_727450
mov	edx, [ebp+30h]
mov	edx, [edx+1Ch]
add	edx, [eax+4]
mov	ecx, [ebp+1Ch]
cmp	edx, [ecx+30h]
jb	short loc_722E34
add	ecx, 14h
call	sub_725AB0
cmp	[ebp+28h], eax
jnb	short loc_722E34
or	word ptr [edi+6], 4

loc_722E34:
test	ebx, ebx
jz	loc_722FA2
mov	ecx, [esi+94h]
fldz
mov	eax, [esi+9Ch]
lea	eax, [ecx+eax*8]
mov	edx, 4000h
or	[eax+6], dx
mov	ecx, [esi+94h]
mov	eax, [esi+9Ch]
lea	eax, [ecx+eax*8]
mov	edx, 800h
or	[eax+6], dx
mov	eax, [esi+0A4h]
mov	ecx, [esi+98h]
mov	[ecx+eax*4], ebx
mov	eax, 1
add	[esi+0A4h], eax
add	[ebx+4], eax
fst	[esp+94h+var_68]
mov	ax, [edi+4]
fstp	[esp+94h+var_64]
mov	dx, [esi+2E4h]
mov	ecx, 0FFFh
and	ax, cx
shl	dx, 0Ch
or	dx, ax
mov	[edi+4], dx
lea	edx, [esp+94h+var_68]
push	edx
lea	eax, [esp+98h+var_2C]
push	eax
lea	ecx, [ebx+20h]
mov	byte ptr [esi+0B4h], 0
call	sub_64E9B0
fld	[esp+94h+var_2C]
fstp	[esp+94h+var_68]
fld	[esp+94h+var_28]
fst	[esp+94h+var_64]
fld	dword ptr [esi+50h]
fstp	[esp+94h+var_80]
fchs
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fst	[esp+94h+var_84]
fld	[esp+94h+var_84]
fld	[esp+94h+var_80]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_722F04
fstp	st(1)
jmp	short loc_722F06

loc_722F04:
fstp	st

loc_722F06:
fstp	[esp+94h+var_80]
fld	[esp+94h+var_80]
fstp	dword ptr [esi+50h]
mov	ecx, [ebx+1Ch]
fld	dword ptr [esi+54h]
fstp	[esp+94h+var_80]
fild	dword ptr [ebx+1Ch]
test	ecx, ecx
jge	short loc_722F28
fadd	ds:flt_15FCC08

loc_722F28:
fsubrp	st(1), st
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fld	[esp+94h+var_80]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_722F43
fstp	st(1)
jmp	short loc_722F45

loc_722F43:
fstp	st

loc_722F45:
mov	edx, [esi+520h]
fstp	[esp+94h+var_80]
add	edx, [esi+51Ch]
fld	[esp+94h+var_80]
mov	eax, [esi+0C8h]
fstp	dword ptr [esi+54h]
mov	ecx, 100h
mov	dword ptr [esi+0ACh], 0
mov	[esi+48h], edx
test	[eax+2Ah], cx
jz	short loc_722F94
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	short loc_722F94
mov	edx, 80h
or	[edi+6], dx
jmp	loc_723289

loc_722F94:
mov	eax, 0FF7Fh
and	[edi+6], ax
jmp	loc_723289

loc_722FA2:
mov	ecx, [esi+0C8h]
fld	dword ptr [esi+524h]
mov	ebp, [ecx+20h]
push	ecx		; float
mov	ecx, edi
fstp	[esp+98h+var_98]
call	sub_6F5EB0
mov	eax, [esi+504h]
cmp	eax, [esi+14h]
jz	short loc_72300E
mov	edx, [esi+9Ch]
mov	ecx, [esi+94h]
lea	ecx, [ecx+edx*8]
mov	edx, 4000h
or	[ecx+6], dx
mov	edx, [esi+94h]
mov	ecx, [esi+9Ch]
lea	ecx, [edx+ecx*8]
mov	edx, 2000h
or	[ecx+6], dx
mov	ecx, [esi+0A4h]
mov	edx, [esi+98h]
mov	[edx+ecx*4], eax
inc	dword ptr [esi+0A4h]
inc	dword ptr [eax]

loc_72300E:
cmp	ebp, [esi+28h]
jz	short loc_72305C
mov	ecx, [esi+94h]
mov	eax, [esi+9Ch]
lea	eax, [ecx+eax*8]
mov	edx, 4000h
or	[eax+6], dx
mov	ecx, [esi+94h]
mov	eax, [esi+9Ch]
lea	eax, [ecx+eax*8]
mov	edx, 1000h
or	[eax+6], dx
mov	eax, [esi+0A4h]
mov	ecx, [esi+98h]
mov	[ecx+eax*4], ebp
inc	dword ptr [esi+0A4h]
mov	[esp+94h+var_20], ebp

loc_72305C:
mov	edx, [esi]
mov	edx, [edx+8]
mov	dl, [edx+20h]
mov	ecx, [esp+94h+var_7C]
movzx	eax, word ptr [ecx+8]
and	dl, 2
neg	dl
sbb	dl, dl
and	dl, 3
add	dl, 0Ah
movzx	dx, dl
cmp	ax, dx
jz	loc_723186
test	ax, ax
jz	loc_72318B
cmp	byte ptr [esi+528h], 0
jnz	short loc_7230B5
cmp	byte ptr [esi+529h], 0
jnz	short loc_7230B5
mov	eax, [esi+520h]
add	eax, [esi+51Ch]
mov	[esi+48h], eax
jmp	loc_723151

loc_7230B5:
or	word ptr [edi+6], 2
mov	edx, [esi+50Ch]
movzx	eax, word ptr [edi+6]
test	edx, edx
jge	short loc_7230D3
or	eax, 200h
mov	[edi+6], ax
jmp	short loc_723126

loc_7230D3:
fldz
mov	ecx, [esi+500h]
fst	[esp+94h+var_60]
lea	ebx, [esp+94h+var_60]
fst	[esp+94h+var_5C]
push	ebx
fst	[esp+98h+var_58]
push	edx
fstp	[esp+9Ch+var_54]
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	edx, [eax+30h]
call	edx
fld	[esp+94h+var_60]
fld	[esp+94h+var_58]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_72311D
fld	[esp+94h+var_5C]
fld	[esp+94h+var_54]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_723126

loc_72311D:
mov	eax, 200h
or	[edi+6], ax

loc_723126:
mov	eax, 1
add	[esi+0A8h], eax
cmp	byte ptr [esi+528h], 0
jz	short loc_723142
add	[esi+0ACh], eax
jmp	short loc_72315B

loc_723142:
mov	ecx, [esi+520h]
add	ecx, [esi+51Ch]
mov	[esi+48h], ecx

loc_723151:
mov	dword ptr [esi+0ACh], 0

loc_72315B:
mov	dx, [edi+4]
mov	eax, 0FFFh
and	dx, ax
mov	ecx, 1000h
or	dx, cx
mov	[edi+4], dx
fld	dword ptr [esi+508h]
mov	edx, [esi+500h]
push	ecx
fstp	[esp+98h+var_98]
push	edx
jmp	short loc_7231DF

loc_723186:
test	ax, ax
jnz	short loc_723196

loc_72318B:
mov	eax, 0FFFh
and	[edi+4], ax
jmp	short loc_7231AE

loc_723196:
mov	dx, [edi+4]
mov	eax, 0FFFh
and	dx, ax
mov	eax, 1000h
or	dx, ax
mov	[edi+4], dx

loc_7231AE:
mov	edx, 300h
or	[edi+6], dx
mov	dword ptr [esi+518h], 0
mov	byte ptr [esi+0B5h], 1
cmp	dword ptr [ecx+4], 0
jnz	short loc_7231E7
fld	dword ptr [esi+508h]
mov	eax, [esi+500h]
push	ecx		; float
fstp	[esp+98h+var_98]
push	eax		; int

loc_7231DF:
lea	ecx, [esi+10h]
call	sub_71E720

loc_7231E7:
mov	ecx, [esi+0C8h]
test	byte ptr [ecx+28h], 4
jz	short loc_7231FE
mov	edx, 400h
or	[edi+6], dx
jmp	short loc_723207

loc_7231FE:
mov	eax, 0FBFFh
and	[edi+6], ax

loc_723207:
mov	eax, [esi+0C8h]
mov	ecx, 100h
test	[eax+2Ah], cx
jz	short loc_72322F
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	short loc_72322F
mov	edx, 80h
or	[edi+6], dx
jmp	short loc_723238

loc_72322F:
mov	eax, 0FF7Fh
and	[edi+6], ax

loc_723238:
mov	eax, [esi+504h]
test	eax, eax
jz	short loc_723244
inc	dword ptr [eax]

loc_723244:
mov	ebx, [esi+14h]
test	ebx, ebx
jz	short loc_723265
add	dword ptr [ebx], 0FFFFFFFFh
jnz	short loc_723265
mov	ecx, ebx
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_723265:
mov	ecx, [esi+504h]
mov	ebx, [esp+94h+var_74]
mov	[esi+14h], ecx
mov	edx, [esi+0C8h]
mov	[esi+28h], ebp
mov	al, [edx+28h]
shr	al, 3
and	al, 1
mov	[esi+0B4h], al

loc_723289:
mov	ecx, [esp+94h+var_7C]
cmp	word ptr [ecx+8], 9
jnz	loc_723366
mov	ecx, [esi+2E0h]
cmp	ecx, [esi+2DCh]
jnb	short loc_7232D8
mov	edx, [esp+94h+var_4C]
mov	eax, [edx+ecx*4]
lea	eax, [eax+eax*4]
inc	ecx
add	eax, eax
mov	[esi+2E0h], ecx
mov	ecx, [esi+520h]
add	eax, eax
cmp	eax, ecx
jle	loc_723366
sub	eax, ecx
mov	[esp+94h+var_84], eax
fild	[esp+94h+var_84]
jmp	loc_723360

loc_7232D8:
fld	dword ptr [esi+524h]
sub	esp, 8
fadd	st, st
fadd	ds:dbl_15FD408
fmul	ds:dbl_15FD5A0
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_84]
fstp	qword ptr [esp]
call	_floor
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_84]
fmul	ds:dbl_15FD408
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_84]
fmul	ds:dbl_15FCE20
fstp	[esp+9Ch+var_80]
fild	dword ptr [esi+520h]
fstp	[esp+9Ch+var_74]
fld	[esp+9Ch+var_80]
fld	st
fadd	[esp+9Ch+var_74]
fdivrp	st(1), st
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_84]
fstp	qword ptr [esp]
call	_floor
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_84]
add	esp, 8
fmul	[esp+94h+var_80]
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
fsub	[esp+94h+var_74]

loc_723360:
fstp	dword ptr [esi+510h]

loc_723366:
movzx	eax, word ptr [edi+4]
fld	dword ptr [esi+510h]
mov	ecx, [esp+94h+var_7C]
fstp	[esp+94h+var_84]
fld	[esp+94h+var_84]
shr	eax, 0Ch
add	[esi+4Ch], eax
mov	eax, [esi+520h]
lea	ebp, [esi+10h]
mov	[ebp+0], edi
movzx	edx, word ptr [ecx+8]
fst	dword ptr [esi+20h]
mov	ecx, [esi+50Ch]
mov	[esi+44h], eax
mov	eax, [esi+0C8h]
mov	[esi+18h], edx
mov	[esi+1Ch], ecx
mov	dl, [eax+2Ah]
shr	dl, 1
test	dl, 1
jz	short loc_7233DF
movsx	eax, word ptr [eax+24h]
mov	[esp+94h+var_84], eax
fild	[esp+94h+var_84]
fld	ds:dbl_15FCE20
fdiv	st(1), st
fxch	st(1)
fstp	[esp+94h+var_84]
fmul	[esp+94h+var_84]
fstp	[esp+94h+var_84]
fadd	[esp+94h+var_84]
fstp	dword ptr [esi+20h]
jmp	short loc_7233E1

loc_7233DF:
fstp	st

loc_7233E1:
mov	ecx, [esi+518h]
mov	[esi+24h], ecx
cmp	dword ptr [esi+94h], 0
jz	short loc_723408
mov	eax, [esi+9Ch]
cmp	eax, [esi+0A0h]
jnb	short loc_723408
inc	eax
mov	[esi+9Ch], eax

loc_723408:
mov	edx, [esi+2E4h]
push	edx
mov	ecx, ebp
call	sub_71E670
jmp	loc_722640

loc_72341B:
cmp	dword ptr [esi+0Ch], 0
jz	short loc_723428
mov	ecx, esi
call	sub_71FA20

loc_723428:
mov	eax, [esi+4F8h]
test	eax, eax
jz	short loc_72345A
lea	ecx, [esi+2F6h]
cmp	eax, ecx
jz	short loc_72345A
mov	edx, [esi]
mov	ecx, [edx+8]
call	sub_7204E0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+4F8h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_72345A:
test	ebx, ebx
jz	short loc_723465
mov	ecx, ebx
call	sub_64A400

loc_723465:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 84h
retn	4
sub_7223F0 endp

align 10h



sub_723480 proc	near

var_9C0= dword ptr -9C0h
var_9AC= dword ptr -9ACh
var_9A8= dword ptr -9A8h
var_9A4= dword ptr -9A4h
var_99C= dword ptr -99Ch
var_998= dword ptr -998h
var_991= byte ptr -991h
var_990= dword ptr -990h
var_98C= dword ptr -98Ch
var_988= dword ptr -988h
var_984= dword ptr -984h
var_980= dword ptr -980h
var_97C= dword ptr -97Ch
var_978= dword ptr -978h
var_974= dword ptr -974h
var_970= dword ptr -970h
var_96C= byte ptr -96Ch
var_968= dword ptr -968h
var_964= dword ptr -964h
var_960= dword ptr -960h
var_95C= dword ptr -95Ch
var_958= dword ptr -958h
var_954= byte ptr -954h
var_428= dword ptr -428h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= byte ptr	-8
var_7= byte ptr	-7
var_4= dword ptr -4

sub	esp, 9ACh
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+9ACh+var_4], eax
mov	edx, [ecx+8]
mov	[esp+9ACh+var_9A8], ecx
call	sub_71EB00
test	byte ptr [ecx+14Ch], 30h
mov	[esp+9ACh+var_958], eax
mov	eax, [ecx+114h]
mov	[esp+9ACh+var_980], eax
jz	short loc_7234BE
or	byte ptr [ecx+150h], 2

loc_7234BE:
fldz
push	ebx
push	ebp
fstp	[esp+9B4h+var_970]
add	edx, 0Ch
lea	eax, [ecx+24h]
push	esi
mov	[esp+9B8h+var_9A4], edx
mov	dl, [eax+74h]
push	edi
mov	[esp+9BCh+var_97C], eax
mov	eax, [ecx+144h]
xor	esi, esi
shr	dl, 2
push	eax
and	dl, 1
push	ecx
lea	ecx, [esp+9C4h+var_954]
mov	[esp+9C4h+var_9A4+4], esi
mov	[esp+9C4h+var_978], esi
mov	[esp+9C4h+var_974], esi
mov	[esp+9C4h+var_96C], dl
call	sub_722160
mov	[esp+9BCh+var_988], esi
mov	[esp+9BCh+var_984], esi
lea	ebx, [ebx+0]

loc_723510:
mov	ecx, [esp+9BCh+var_974]
fld	ds:dbl_15FCC48
mov	ebp, [esp+9BCh+var_97C]

loc_72351E:
mov	edi, [esp+9BCh+var_9A4]
test	edi, edi
jz	loc_7239CC
mov	esi, [esp+9BCh+var_9A4+4]
test	esi, esi
jl	loc_7239CC
cmp	esi, [edi+4]
jge	loc_7239CC
mov	edx, [edi]
mov	ebx, [edx+esi*4]
mov	[esp+9BCh+var_98C], ebx
test	ebp, ebp
jz	loc_7239C5
cmp	ecx, [ebp+4]
jnb	loc_7239C5
test	ecx, ecx
jl	loc_7239C5
mov	edx, [esp+9BCh+var_9A8]
test	byte ptr [edx+150h], 2
mov	eax, [ebp+0]
mov	eax, [eax+ecx*4]
jnz	loc_723837
mov	edx, [eax]
mov	edi, [ebx+20h]
shr	edx, 1Fh
and	dl, 1
jz	short loc_72358A
mov	esi, [eax+4]
jmp	short loc_72358D

loc_72358A:
mov	esi, [eax+1Ch]

loc_72358D:
cmp	edi, esi
jnz	loc_723837
movzx	esi, word ptr [ebx+24h]
test	dl, dl
jz	short loc_7235A3
movzx	edx, word ptr [eax+18h]
jmp	short loc_7235A7

loc_7235A3:
movzx	edx, word ptr [eax+24h]

loc_7235A7:
cmp	si, dx
jnz	loc_723837
mov	eax, [esp+9BCh+var_9A8]
mov	eax, [eax+11Ch]
mov	edx, [ebx+1Ch]
test	eax, eax
jz	short loc_7235DF
push	edx
fstp	st
mov	ecx, eax
call	sub_72E8E0
fld	ds:dbl_15FCC48
mov	ecx, [esp+9BCh+var_974]
mov	ebp, [esp+9BCh+var_97C]
mov	[esp+9BCh+var_990], eax
jmp	short loc_7235E3

loc_7235DF:
mov	[esp+9BCh+var_990], edx

loc_7235E3:
test	ebp, ebp
jz	loc_72381D
cmp	ecx, [ebp+4]
jnb	loc_72381D
test	ecx, ecx
jl	loc_72381D
mov	edx, [ebp+0]
mov	eax, [esp+9BCh+var_98C]
mov	esi, [edx+ecx*4]
mov	edx, [eax+20h]
mov	eax, [esi]
shr	eax, 1Fh
and	al, 1
jz	short loc_723617
mov	edi, [esi+4]
jmp	short loc_72361A

loc_723617:
mov	edi, [esi+1Ch]

loc_72361A:
cmp	edx, edi
jnz	loc_72381D
fstp	st
test	al, al
jz	short loc_72363A
mov	ecx, [esi+8]
xor	ecx, [esp+9BCh+var_990]
and	ecx, offset sub_FFFFFF
xor	[esi+8], ecx
jmp	short loc_723641

loc_72363A:
mov	edx, [esp+9BCh+var_990]
mov	[esi+8], edx

loc_723641:
mov	eax, [esi]
mov	ebp, [esi+0Ch]
mov	ebx, [esi+10h]
shr	eax, 1Fh
and	al, 1
test	al, al
jz	short loc_723658
movzx	ecx, byte ptr [esi+0Bh]
jmp	short loc_72365B

loc_723658:
mov	ecx, [esi+20h]

loc_72365B:
add	[esp+9BCh+var_990], ecx
mov	ecx, [esp+9BCh+var_20]
mov	[esi+10h], ecx
test	al, al
jz	short loc_723673
movzx	eax, word ptr [esi+14h]
jmp	short loc_723676

loc_723673:
mov	eax, [esi+14h]

loc_723676:
cmp	eax, [esp+9BCh+var_988]
jl	short loc_723680
mov	[esp+9BCh+var_988], eax

loc_723680:
mov	ecx, [esp+9BCh+var_98C]
call	sub_725AB0
test	eax, eax
jnz	short loc_7236A1
mov	edx, [esp+9BCh+var_9A8]
mov	eax, [edx+11Ch]
test	eax, eax
jz	short loc_7236C0
test	byte ptr [eax+68h], 1
jnz	short loc_7236C0

loc_7236A1:
mov	eax, [esi]
shr	eax, 1Fh
test	al, 1
jz	short loc_7236B0
movzx	eax, word ptr [esi+16h]
jmp	short loc_7236B3

loc_7236B0:
mov	eax, [esi+18h]

loc_7236B3:
mov	ecx, [esp+9BCh+var_20]
add	eax, ecx
mov	[esp+9BCh+var_984], eax

loc_7236C0:
mov	eax, [esi]
shr	eax, 1Fh
and	al, 1
jz	short loc_7236CF
movzx	ecx, word ptr [esi+16h]
jmp	short loc_7236D2

loc_7236CF:
mov	ecx, [esi+18h]

loc_7236D2:
test	al, al
jz	short loc_7236DC
movsx	eax, byte ptr [esi+1Dh]
jmp	short loc_7236E0

loc_7236DC:
movsx	eax, word ptr [esi+28h]

loc_7236E0:
mov	edx, [esp+9BCh+var_9A8]
add	eax, ecx
add	[esp+9BCh+var_20], eax
test	byte ptr [edx+14Eh], 1
jz	loc_7237DC
mov	edi, [esi]
mov	eax, edi
shr	eax, 1Ch
and	eax, 3
sub	eax, 1
jz	short loc_72377F
sub	eax, 1
jnz	loc_7237DC
mov	eax, edx
fld	dword ptr [eax+44h]
fsub	dword ptr [eax+3Ch]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+9BCh+var_9AC]
fldz
fld	[esp+9BCh+var_9AC]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_723745
fadd	st, st(1)
jmp	short loc_723747

loc_723745:
fsub	st, st(1)

loc_723747:
call	__ftol2_sse
mov	ecx, eax
mov	eax, edi
shr	eax, 1Fh
and	al, 1
jz	short loc_72375D
movzx	eax, word ptr [esi+14h]
jmp	short loc_723760

loc_72375D:
mov	eax, [esi+14h]

loc_723760:
cdq
sub	eax, edx
sar	eax, 1
sub	ecx, eax
mov	eax, 0
sets	al
dec	eax
and	eax, ecx
mov	[esi+0Ch], eax
mov	[esp+9BCh+var_8], 1
jmp	short loc_7237E2

loc_72377F:
mov	eax, edx
fld	dword ptr [eax+44h]
fsub	dword ptr [eax+3Ch]
fstp	[esp+9BCh+var_9AC]
fldz
fld	[esp+9BCh+var_9AC]
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld	ds:dbl_15FCC48
test	ah, 41h
jnz	short loc_7237A6
fadd	st(1), st
jmp	short loc_7237A8

loc_7237A6:
fsub	st(1), st

loc_7237A8:
fxch	st(1)
call	__ftol2_sse
mov	ecx, edi
shr	ecx, 1Fh
and	cl, 1
jz	short loc_7237BF
movzx	ecx, word ptr [esi+14h]
jmp	short loc_7237C2

loc_7237BF:
mov	ecx, [esi+14h]

loc_7237C2:
sub	eax, ecx
mov	ecx, 0
sets	cl
dec	ecx
and	eax, ecx
mov	[esi+0Ch], eax
mov	[esp+9BCh+var_8], 1
jmp	short loc_7237E2

loc_7237DC:
fld	ds:dbl_15FCC48

loc_7237E2:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
shr	eax, 1Fh
and	al, 1
cmp	ebp, ecx
jnz	short loc_7237F7
mov	esi, [esi+10h]
cmp	ebx, esi
jz	short loc_723802

loc_7237F7:
mov	eax, [esp+9BCh+var_9A8]
or	byte ptr [eax+98h], 1

loc_723802:
mov	ecx, [esp+9BCh+var_974]
mov	ebp, [esp+9BCh+var_97C]
cmp	ecx, [ebp+4]
jnb	loc_7235E3
inc	ecx
mov	[esp+9BCh+var_974], ecx
jmp	loc_7235E3

loc_72381D:
mov	edx, [esp+9BCh+var_9A4]
mov	eax, [esp+9BCh+var_9A4+4]
cmp	eax, [edx+4]
jge	loc_72351E
inc	[esp+9BCh+var_9A4+4]
jmp	loc_72351E

loc_723837:
mov	edx, [eax]
mov	esi, [eax+8]
shr	edx, 1Fh
and	dl, 1
jz	short loc_723852
and	esi, offset sub_FFFFFF
cmp	esi, offset sub_FFFFFF
jz	short loc_723857

loc_723852:
cmp	esi, 0FFFFFFFFh
jnz	short loc_7238C6

loc_723857:
xor	edi, edi
test	dl, dl
jz	short loc_723862
mov	eax, [eax+4]
jmp	short loc_723865

loc_723862:
mov	eax, [eax+1Ch]

loc_723865:
mov	esi, ecx

loc_723867:
cmp	esi, [ebp+4]
jnb	short loc_723890
test	esi, esi
jl	short loc_723890
mov	edx, [ebp+0]
mov	edx, [edx+esi*4]
mov	ebx, [edx]
shr	ebx, 1Fh
test	bl, 1
jz	short loc_723885
mov	edx, [edx+4]
jmp	short loc_723888

loc_723885:
mov	edx, [edx+1Ch]

loc_723888:
cmp	edx, eax
jnz	short loc_723890
inc	edi
inc	esi
jmp	short loc_723867

loc_723890:
test	edi, edi
jbe	loc_72351E
cmp	ecx, [ebp+4]
jnb	short loc_7238B6
push	edi
fstp	st
push	ecx
mov	ecx, ebp
call	sub_737C50
fld	ds:dbl_15FCC48
mov	ecx, [esp+9BCh+var_974]
mov	ebp, [esp+9BCh+var_97C]

loc_7238B6:
mov	eax, [esp+9BCh+var_9A8]
or	byte ptr [eax+98h], 1
jmp	loc_72351E

loc_7238C6:
mov	edi, [ebx+20h]
fstp	st
test	dl, dl
jz	short loc_7238D4
mov	esi, [eax+4]
jmp	short loc_7238D7

loc_7238D4:
mov	esi, [eax+1Ch]

loc_7238D7:
cmp	edi, esi
jnz	short loc_72393C
movzx	esi, word ptr [ebx+24h]
test	dl, dl
jz	short loc_7238E9
movzx	eax, word ptr [eax+18h]
jmp	short loc_7238ED

loc_7238E9:
movzx	eax, word ptr [eax+24h]

loc_7238ED:
cmp	si, ax
jz	short loc_72393C
xor	esi, esi
mov	edx, ecx

loc_7238F6:
cmp	edx, [ebp+4]
jnb	short loc_72391F
test	edx, edx
jl	short loc_72391F
mov	eax, [ebp+0]
mov	eax, [eax+edx*4]
mov	ebx, [eax]
shr	ebx, 1Fh
test	bl, 1
jz	short loc_723914
mov	eax, [eax+4]
jmp	short loc_723917

loc_723914:
mov	eax, [eax+1Ch]

loc_723917:
cmp	eax, edi
jnz	short loc_72391F
inc	esi
inc	edx
jmp	short loc_7238F6

loc_72391F:
cmp	ecx, [ebp+4]
jnb	short loc_72392D
push	esi
push	ecx
mov	ecx, ebp
call	sub_737C50

loc_72392D:
mov	eax, [esp+9BCh+var_9A8]
or	byte ptr [eax+98h], 1
mov	ebx, [esp+9BCh+var_98C]

loc_72393C:
mov	edi, [esp+9BCh+var_9A4]
mov	esi, [esp+9BCh+var_9A4+4]

loc_723944:
mov	edx, [esp+9BCh+var_20]
lea	ecx, [esp+9BCh+var_97C]
mov	[esp+9BCh+var_428], ecx
push	ebx
lea	ecx, [esp+9C0h+var_954]
mov	[esp+9C0h+var_1C], edx
call	sub_7223F0
mov	ebp, [esp+9BCh+var_9A8]
mov	eax, [esp+9BCh+var_14]
or	byte ptr [ebp+98h], 1
cmp	eax, [esp+9BCh+var_988]
jl	short loc_723983
mov	[esp+9BCh+var_988], eax

loc_723983:
mov	ecx, ebx
call	sub_725AB0
test	eax, eax
jnz	short loc_72399E
mov	eax, [ebp+11Ch]
test	eax, eax
jz	short loc_7239B2
test	byte ptr [eax+68h], 1
jnz	short loc_7239B2

loc_72399E:
mov	eax, [esp+9BCh+var_1C]
mov	ecx, [esp+9BCh+var_10]
add	ecx, eax
mov	[esp+9BCh+var_984], ecx

loc_7239B2:
cmp	esi, [edi+4]
jge	loc_723510
inc	esi
mov	[esp+9BCh+var_9A4+4], esi
jmp	loc_723510

loc_7239C5:
fstp	st
jmp	loc_723944

loc_7239CC:
test	ebp, ebp
jz	short loc_7239FA
cmp	ecx, [ebp+4]
jnb	short loc_7239FA
test	ecx, ecx
jl	short loc_7239FA
mov	esi, [esp+9BCh+var_9A8]
fstp	st
mov	eax, [esi+28h]
sub	eax, ecx
push	eax
push	ecx
mov	ecx, ebp
call	sub_737C50
fld	ds:dbl_15FCC48
or	byte ptr [esi+98h], 1

loc_7239FA:
mov	ebp, [esp+9BCh+var_9A8]
movzx	eax, byte ptr [ebp+14Ch]
mov	edx, [esp+9BCh+var_984]
mov	edi, [esp+9BCh+var_988]
inc	word ptr [ebp+148h]
and	byte ptr [ebp+150h], 0FCh
mov	bl, [esp+9BCh+var_7]
mov	[ebp+10Ch], edx
mov	dl, [ebp+14Eh]
mov	esi, eax
shr	esi, 2
mov	cl, dl
and	esi, 3
and	cl, 1
mov	[ebp+108h], edi
mov	[esp+9BCh+var_991], 0
jnz	short loc_723A55
test	dl, 2
jnz	short loc_723A55
test	bl, bl
jz	loc_723BCB

loc_723A55:
fld	dword ptr [ebp+0F8h]
fstp	[esp+9BCh+var_9A4]
fld	dword ptr [ebp+0FCh]
fstp	[esp+9BCh+var_9A4+4]
fld	dword ptr [ebp+100h]
fstp	[esp+9BCh+var_99C]
fld	dword ptr [ebp+104h]
fstp	[esp+9BCh+var_998]
fld	ds:dbl_143B768
test	cl, cl
jz	short loc_723AE6
mov	ecx, edi
mov	[esp+9BCh+var_9AC], ecx
fild	[esp+9BCh+var_9AC]
test	ecx, ecx
jge	short loc_723A9B
fadd	ds:flt_15FCC08

loc_723A9B:
fadd	st, st(1)
and	eax, 3
sub	eax, 1
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
jz	short loc_723AD4
sub	eax, 1
jnz	short loc_723ADE
fld	[esp+9BCh+var_99C]
fld	[esp+9BCh+var_9A4]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fmul	st, st(4)
fld	st(2)
fmul	st, st(5)
fsubp	st(1), st
faddp	st(1), st
jmp	short loc_723ADA

loc_723AD4:
fld	[esp+9BCh+var_99C]
fsub	st, st(1)

loc_723ADA:
fstp	[esp+9BCh+var_9A4]

loc_723ADE:
fadd	[esp+9BCh+var_9A4]
fstp	[esp+9BCh+var_99C]

loc_723AE6:
test	dl, 2
jnz	short loc_723AEF
test	bl, bl
jz	short loc_723B67

loc_723AEF:
mov	edx, [esp+9BCh+var_984]
fild	[esp+9BCh+var_984]
test	edx, edx
jge	short loc_723B01
fadd	ds:flt_15FCC08

loc_723B01:
faddp	st(1), st
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
test	esi, esi
jnz	short loc_723B22
test	bl, bl
jnz	short loc_723B27
fadd	[esp+9BCh+var_9A4+4]
mov	[esp+9BCh+var_991], 1
fstp	[esp+9BCh+var_998]
jmp	short loc_723B69

loc_723B22:
cmp	esi, 3
jnz	short loc_723B49

loc_723B27:
fld	[esp+9BCh+var_998]
fld	[esp+9BCh+var_9A4+4]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fmul	st, st(3)
fld	st(2)
fmul	st, st(4)
fsubp	st(1), st
faddp	st(1), st
jmp	short loc_723B54

loc_723B49:
cmp	esi, 2
jnz	short loc_723B58
fld	[esp+9BCh+var_998]
fsub	st, st(1)

loc_723B54:
fstp	[esp+9BCh+var_9A4+4]

loc_723B58:
fadd	[esp+9BCh+var_9A4+4]
mov	[esp+9BCh+var_991], 1
fstp	[esp+9BCh+var_998]
jmp	short loc_723B69

loc_723B67:
fstp	st

loc_723B69:
fld	[esp+9BCh+var_9A4]
fld	dword ptr [ebp+0F8h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_723BB5
fld	[esp+9BCh+var_99C]
fld	dword ptr [ebp+100h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_723BB5
fld	[esp+9BCh+var_9A4+4]
fld	dword ptr [ebp+0FCh]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_723BB5
fld	[esp+9BCh+var_998]
fld	dword ptr [ebp+104h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_723BCB

loc_723BB5:
push	0
fstp	st
lea	eax, [esp+9C0h+var_9A4]
push	eax
mov	ecx, ebp
call	sub_71F2C0
fld	ds:dbl_15FCC48

loc_723BCB:
movzx	eax, byte ptr [ebp+14Ch]
fld	ds:dbl_1440130
shr	eax, 4
and	eax, 3
jz	loc_723E38
test	byte ptr [ebp+14Eh], 4
fld	dword ptr [ebp+0F8h]
fstp	[esp+9BCh+var_9A4]
fld	dword ptr [ebp+0FCh]
fstp	[esp+9BCh+var_9A4+4]
fld	dword ptr [ebp+100h]
fstp	[esp+9BCh+var_99C]
fld	dword ptr [ebp+104h]
fstp	[esp+9BCh+var_998]
fld	[esp+9BCh+var_9A4]
fadd	st, st(1)
fstp	[esp+9BCh+var_9A4]
fld	[esp+9BCh+var_99C]
fsub	st, st(1)
fstp	[esp+9BCh+var_99C]
fld	[esp+9BCh+var_9A4+4]
fadd	st, st(1)
fstp	[esp+9BCh+var_9A4+4]
fld	[esp+9BCh+var_998]
fsub	st, st(1)
fstp	[esp+9BCh+var_998]
jnz	short loc_723C46
test	esi, esi
jnz	short loc_723C46
mov	esi, 3

loc_723C46:
fld1
fst	[esp+9BCh+var_9A8]
fst	[esp+9BCh+var_990]
cmp	eax, 1
jnz	loc_723CE2
fild	[esp+9BCh+var_988]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_99C]
fsub	[esp+9BCh+var_9A4]
fstp	[esp+9BCh+var_98C]
fld	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_98C]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_723C86
fdivrp	st(1), st
fstp	[esp+9BCh+var_9A8]
jmp	short loc_723C8A

loc_723C86:
fstp	st(1)
fstp	st

loc_723C8A:
fild	[esp+9BCh+var_984]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_998]
fsub	[esp+9BCh+var_9A4+4]
fstp	[esp+9BCh+var_98C]
fld	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_98C]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_723CB7
fdivrp	st(1), st
fstp	[esp+9BCh+var_990]
jmp	short loc_723CBB

loc_723CB7:
fstp	st(1)
fstp	st

loc_723CBB:
fld	[esp+9BCh+var_990]
fld	[esp+9BCh+var_9A8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_723CD7
fstp	st
fstp	[esp+9BCh+var_9A8]
jmp	loc_723D65

loc_723CD7:
fstp	st(1)
fstp	[esp+9BCh+var_9A8]
jmp	loc_723D65

loc_723CE2:
cmp	eax, 2
jnz	loc_723F24
cmp	edi, 14h
fld	ds:flt_1437488
fst	[esp+9BCh+var_990]
fstp	[esp+9BCh+var_9A8]
jl	short loc_723D16
fld	[esp+9BCh+var_99C]
fsub	[esp+9BCh+var_9A4]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fidiv	[esp+9BCh+var_988]
fstp	[esp+9BCh+var_9A8]

loc_723D16:
cmp	[esp+9BCh+var_984], 14h
jl	short loc_723D35
fld	[esp+9BCh+var_998]
fsub	[esp+9BCh+var_9A4+4]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fidiv	[esp+9BCh+var_984]
fstp	[esp+9BCh+var_990]

loc_723D35:
fld	[esp+9BCh+var_990]
fld	[esp+9BCh+var_9A8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_723D4A
fstp	st
jmp	short loc_723D4C

loc_723D4A:
fstp	st(1)

loc_723D4C:
fstp	[esp+9BCh+var_9A8]
fld	[esp+9BCh+var_9A8]
fcomp	ds:dbl_15FCDD8
fnstsw	ax
test	ah, 44h
jnp	loc_723F24

loc_723D65:
fcomp	[esp+9BCh+var_9A8]
fnstsw	ax
test	ah, 44h
jnp	loc_723E38
lea	edi, [ebp+24h]
fstp	st
mov	ecx, edi
fstp	st
call	sub_734070
mov	[esp+9BCh+var_9AC], eax
test	eax, eax
jle	short loc_723DB9
fild	[esp+9BCh+var_9AC]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fld	st
fld	[esp+9BCh+var_9A8]
fld	st
fmulp	st(2), st
fld	ds:dbl_15FD310
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnz	short loc_723DBF
fstp	st
fdivrp	st(1), st
fstp	[esp+9BCh+var_9A8]

loc_723DB9:
fld	[esp+9BCh+var_9A8]
jmp	short loc_723DC3

loc_723DBF:
fstp	st(2)
fstp	st

loc_723DC3:
fild	[esp+9BCh+var_988]
fnstcw	word ptr [esp+9BCh+var_9A8]
movzx	eax, word ptr [esp+9BCh+var_9A8]
fmul	st, st(1)
or	eax, 0C00h
mov	[esp+9BCh+var_9AC], eax
fldcw	word ptr [esp+9BCh+var_9AC]
fistp	qword ptr [esp+9BCh+var_9A4]
mov	ecx, [esp+9BCh+var_9A4]
push	ecx		; float
mov	[ebp+108h], ecx
mov	ecx, edi
fldcw	word ptr [esp+9C0h+var_9A8]
fild	[esp+9C0h+var_984]
fnstcw	word ptr [esp+9C0h+var_9A8]
fmul	st, st(1)
movzx	eax, word ptr [esp+9C0h+var_9A8]
or	eax, 0C00h
mov	[esp+9C0h+var_9AC], eax
fldcw	word ptr [esp+9C0h+var_9AC]
fistp	qword ptr [esp+9C0h+var_9A4]
mov	edx, [esp+9C0h+var_9A4]
mov	[ebp+10Ch], edx
fldcw	word ptr [esp+9C0h+var_9A8]
fstp	[esp+9C0h+var_9C0]
call	sub_737810
fld	ds:dbl_1440130
fld	ds:dbl_15FCC48
fxch	st(1)

loc_723E38:
cmp	[esp+9BCh+var_991], 0
jnz	loc_723F93
test	esi, esi
jz	loc_723F93
test	byte ptr [ebp+14Eh], 2
jnz	loc_723F93
fld	dword ptr [ebp+0F8h]
mov	eax, [ebp+10Ch]
fstp	[esp+9BCh+var_9A4]
fld	dword ptr [ebp+0FCh]
fstp	[esp+9BCh+var_9A4+4]
fld	dword ptr [ebp+100h]
fstp	[esp+9BCh+var_99C]
fld	dword ptr [ebp+104h]
fstp	[esp+9BCh+var_998]
fld	[esp+9BCh+var_9A4]
fadd	st, st(1)
fstp	[esp+9BCh+var_9A4]
fld	[esp+9BCh+var_99C]
fsub	st, st(1)
fstp	[esp+9BCh+var_99C]
fld	[esp+9BCh+var_9A4+4]
fadd	st, st(1)
fstp	[esp+9BCh+var_9A4+4]
fsubr	[esp+9BCh+var_998]
fstp	[esp+9BCh+var_998]
fld	dword ptr [ebp+3Ch]
fstp	[esp+9BCh+var_968]
fld	dword ptr [ebp+40h]
fstp	[esp+9BCh+var_964]
fld	dword ptr [ebp+44h]
fstp	[esp+9BCh+var_960]
fld	dword ptr [ebp+48h]
fstp	[esp+9BCh+var_95C]
fild	dword ptr [ebp+10Ch]
test	eax, eax
jge	short loc_723ED8
fadd	ds:flt_15FCC08

loc_723ED8:
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_998]
fld	st
fld	[esp+9BCh+var_9A4+4]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+9BCh+var_98C]
fld	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_98C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_723F79
sub	esi, 1
jz	short loc_723F37
sub	esi, 1
jz	short loc_723F2B
sub	esi, 1
fstp	st(3)
jnz	short loc_723F55
fxch	st(2)
fmul	st, st(3)
fxch	st(2)
fmul	st, st(3)
fsubp	st(2), st
faddp	st(1), st
fstp	[esp+9BCh+var_964]
jmp	short loc_723F5B

loc_723F24:
fstp	st
jmp	loc_723E38

loc_723F2B:
fstp	st(2)
fstp	st(1)
fsubp	st(1), st
fstp	[esp+9BCh+var_964]
jmp	short loc_723F5B

loc_723F37:
fstp	st(1)
fstp	st
fld	[esp+9BCh+var_9A4]
fstp	[esp+9BCh+var_968]
fstp	[esp+9BCh+var_964]
fld	[esp+9BCh+var_99C]
fstp	[esp+9BCh+var_960]
fstp	[esp+9BCh+var_95C]
jmp	short loc_723F5B

loc_723F55:
fstp	st(1)
fstp	st
fstp	st

loc_723F5B:
fld	[esp+9BCh+var_968]
fstp	dword ptr [ebp+3Ch]
fld	[esp+9BCh+var_964]
fstp	dword ptr [ebp+40h]
fld	[esp+9BCh+var_960]
fstp	dword ptr [ebp+44h]
fld	[esp+9BCh+var_95C]
fstp	dword ptr [ebp+48h]
jmp	short loc_723F95

loc_723F79:
fstp	st(1)
fstp	st
fld	[esp+9BCh+var_9A4]
fstp	dword ptr [ebp+3Ch]
fstp	dword ptr [ebp+40h]
fld	[esp+9BCh+var_99C]
fstp	dword ptr [ebp+44h]
fstp	dword ptr [ebp+48h]
jmp	short loc_723F95

loc_723F93:
fstp	st

loc_723F95:
cmp	[esp+9BCh+var_8], 0
jz	loc_72408B
fldz
xor	ebx, ebx

loc_723FA7:
lea	eax, [ebp+24h]
test	eax, eax
jz	loc_724089
cmp	ebx, [eax+4]
jnb	loc_724089
test	ebx, ebx
jl	loc_724089
mov	ecx, [ebp+24h]
mov	esi, [ecx+ebx*4]
mov	edi, [esi]
mov	eax, edi
shr	eax, 1Ch
and	eax, 3
sub	eax, 1
jz	short loc_724035
sub	eax, 1
jnz	loc_72407A
fld	dword ptr [ebp+44h]
fsub	dword ptr [ebp+3Ch]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fmul	st, st(2)
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_724006
fadd	st, st(2)
jmp	short loc_724008

loc_724006:
fsub	st, st(2)

loc_724008:
call	__ftol2_sse
mov	ecx, eax
mov	eax, edi
shr	eax, 1Fh
and	al, 1
jz	short loc_72401E
movzx	eax, word ptr [esi+14h]
jmp	short loc_724021

loc_72401E:
mov	eax, [esi+14h]

loc_724021:
cdq
sub	eax, edx
sar	eax, 1
sub	ecx, eax
mov	eax, 0
sets	al
dec	eax
and	eax, ecx
jmp	short loc_724077

loc_724035:
fld	dword ptr [ebp+44h]
fsub	dword ptr [ebp+3Ch]
fstp	[esp+9BCh+var_9AC]
fld	[esp+9BCh+var_9AC]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_724050
fadd	st, st(2)
jmp	short loc_724052

loc_724050:
fsub	st, st(2)

loc_724052:
call	__ftol2_sse
mov	ecx, edi
shr	ecx, 1Fh
and	cl, 1
jz	short loc_724067
movzx	ecx, word ptr [esi+14h]
jmp	short loc_72406A

loc_724067:
mov	ecx, [esi+14h]

loc_72406A:
sub	eax, ecx
mov	edx, 0
sets	dl
dec	edx
and	eax, edx

loc_724077:
mov	[esi+0Ch], eax

loc_72407A:
cmp	ebx, [ebp+28h]
jnb	loc_723FA7
inc	ebx
jmp	loc_723FA7

loc_724089:
fstp	st(1)

loc_72408B:
test	byte ptr [ebp+150h], 3
fstp	st
jz	short loc_7240A4
mov	ecx, ebp
call	sub_723480
and	byte ptr [ebp+150h], 0FCh

loc_7240A4:
mov	ecx, ebp
call	sub_71EB00
mov	esi, eax
xor	bl, bl
cmp	[ebp+4Ch], esi
jbe	short loc_7240F6
test	byte ptr [ebp+150h], 3
jz	short loc_7240C9
call	sub_723480
and	byte ptr [ebp+150h], 0FCh

loc_7240C9:
mov	ecx, ebp
call	sub_71EB00
cmp	esi, eax
jbe	short loc_7240D6
mov	esi, eax

loc_7240D6:
cmp	[ebp+4Ch], esi
jz	short loc_7240FE
push	esi
lea	ecx, [ebp+24h]
call	sub_7D9B40
mov	ecx, [ebp+10h]
test	ecx, ecx
jz	short loc_7240FE
mov	eax, [ecx]
mov	edx, [eax+8]
push	esi
push	ebp
call	edx
jmp	short loc_7240FE

loc_7240F6:
cmp	esi, [esp+9BCh+var_958]
jz	short loc_7240FE
mov	bl, 1

loc_7240FE:
mov	ecx, ebp
call	sub_71EBD0
mov	esi, eax
cmp	[ebp+38h], esi
jbe	short loc_724139
mov	ecx, ebp
call	sub_71EBD0
cmp	esi, eax
jbe	short loc_724119
mov	esi, eax

loc_724119:
cmp	[ebp+38h], esi
jz	short loc_724141
push	esi
lea	ecx, [ebp+24h]
call	sub_733D20
mov	ecx, [ebp+10h]
test	ecx, ecx
jz	short loc_724141
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	esi
push	ebp
call	edx
jmp	short loc_724141

loc_724139:
cmp	esi, [esp+9BCh+var_980]
jz	short loc_724141
mov	bl, 1

loc_724141:
mov	ecx, [ebp+10h]
test	ecx, ecx
jz	short loc_72416B
test	bl, bl
jz	short loc_72415A
test	byte ptr [ecx+8], 4
jz	short loc_72415A
mov	eax, [ecx]
mov	edx, [eax+10h]
push	ebp
call	edx

loc_72415A:
mov	ecx, [ebp+10h]
test	byte ptr [ecx+8], 8
jz	short loc_72416B
mov	eax, [ecx]
mov	edx, [eax+14h]
push	ebp
call	edx

loc_72416B:
mov	eax, [ebp+11Ch]
mov	bl, 0DFh
test	eax, eax
jz	short loc_72417D
test	byte ptr [eax+68h], 1
jz	short loc_7241F2

loc_72417D:
mov	eax, [ebp+108h]
fild	dword ptr [ebp+108h]
test	eax, eax
jge	short loc_724193
fadd	ds:flt_15FCC08

loc_724193:
fld	dword ptr [ebp+100h]
fsub	dword ptr [ebp+0F8h]
fstp	[esp+9BCh+var_980]
fld	[esp+9BCh+var_980]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_7241F2
mov	ecx, [ebp+10Ch]
fild	dword ptr [ebp+10Ch]
test	ecx, ecx
jge	short loc_7241C6
fadd	ds:flt_15FCC08

loc_7241C6:
fld	dword ptr [ebp+104h]
fsub	dword ptr [ebp+0FCh]
fstp	[esp+9BCh+var_980]
fld	[esp+9BCh+var_980]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_7241F2
cmp	dword ptr [ebp+4Ch], 0
jnz	short loc_7241F2
or	byte ptr [ebp+98h], 20h
jmp	short loc_7241F8

loc_7241F2:
and	[ebp+98h], bl

loc_7241F8:
mov	ecx, [ebp+14h]
test	ecx, ecx
jz	short loc_724216
mov	eax, [ebp+11Ch]
test	eax, eax
jz	short loc_72420E
mov	eax, [eax+14h]
jmp	short loc_724210

loc_72420E:
xor	eax, eax

loc_724210:
push	eax
call	sub_73EDA0

loc_724216:
and	[ebp+150h], bl
cmp	dword ptr [ebp+28h], 0
jbe	short loc_72427D
mov	edx, [ebp+24h]
mov	eax, [edx]
mov	ecx, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_724237
movzx	ecx, byte ptr [eax+1Ch]
jmp	short loc_72423A

loc_724237:
mov	ecx, [eax+4]

loc_72423A:
test	ecx, ecx
jbe	short loc_72427D
mov	ecx, [eax]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_72424D
add	eax, 1Eh
jmp	short loc_724250

loc_72424D:
add	eax, 2Ah

loc_724250:
mov	ax, [eax+6]
shr	ax, 0Dh
test	al, 1
jz	short loc_72427D
mov	ecx, [edx]
call	sub_733C80
mov	ecx, [eax]
mov	edx, [ecx+1Ch]
mov	eax, [edx+0Ch]
mov	ecx, [eax+14h]
shr	ecx, 0Fh
test	cl, 1
jz	short loc_72427D
or	byte ptr [ebp+150h], 20h

loc_72427D:
lea	ecx, [esp+9BCh+var_954]
call	sub_722240
mov	ecx, [esp+9BCh+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 9ACh
retn
sub_723480 endp

align 10h



sub_7242A0 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_7242B8
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_7242B8:
mov	eax, [esi+4Ch]
pop	esi
retn
sub_7242A0 endp

align 10h



sub_7242C0 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_7242D8
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_7242D8:
mov	eax, [esi+38h]
pop	esi
retn
sub_7242C0 endp

align 10h



sub_7242E0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_7242F9
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_7242F9:
mov	esi, [esi+108h]
test	esi, esi
jbe	short loc_724316
mov	[esp+8+var_4], esi
fild	[esp+8+var_4]
jge	short loc_724318
fadd	ds:flt_15FCC08
pop	esi
pop	ecx
retn

loc_724316:
fldz

loc_724318:
pop	esi
pop	ecx
retn
sub_7242E0 endp

align 10h



sub_724320 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_724339
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_724339:
mov	esi, [esi+10Ch]
test	esi, esi
jbe	short loc_724356
mov	[esp+8+var_4], esi
fild	[esp+8+var_4]
jge	short loc_724358
fadd	ds:flt_15FCC08
pop	esi
pop	ecx
retn

loc_724356:
fldz

loc_724358:
pop	esi
pop	ecx
retn
sub_724320 endp

align 10h



sub_724360 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_724378
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_724378:
mov	eax, [esi+28h]
pop	esi
retn
sub_724360 endp

align 10h



sub_724380 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_72439C
call	sub_723480
and	byte ptr [esi+150h], 0FCh
mov	al, 1
pop	esi
retn

loc_72439C:
xor	al, al
pop	esi
retn
sub_724380 endp




sub_7243A0 proc	near
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_7243B8
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_7243B8:
lea	eax, [esi+0F8h]
pop	esi
retn
sub_7243A0 endp




; int __stdcall	sub_7243C0(float, float)
sub_7243C0 proc	near

var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 78h
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_7243DB
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_7243DB:
fld	[esp+7Ch+arg_0]
add	esi, 24h
fld	dword ptr [esi+18h]
mov	ecx, esi
fsub	dword ptr [esi+0D4h]
fsubp	st(1), st
fstp	[esp+7Ch+arg_0]
fld	[esp+7Ch+arg_4]
fld	dword ptr [esi+1Ch]
fsub	dword ptr [esi+0D8h]
fsubp	st(1), st
fstp	[esp+7Ch+arg_4]
call	sub_733EC0
mov	[esp+7Ch+var_74], eax
fild	[esp+7Ch+var_74]
test	eax, eax
jge	short loc_724429
fadd	ds:flt_15FCC08

loc_724429:
fadd	[esp+7Ch+arg_4]
push	ecx		; float
lea	eax, [esp+80h+var_70]
mov	ecx, esi
fstp	[esp+80h+var_78]
fld	[esp+80h+var_78]
fstp	[esp+80h+var_80]
push	eax		; int
call	sub_734D10
mov	eax, [esp+7Ch+var_70]
test	eax, eax
jz	loc_724592
mov	ecx, [esp+7Ch+var_68]
cmp	ecx, [eax+4]
jnb	loc_724592
test	ecx, ecx
jl	loc_724592
mov	edx, [eax]
mov	esi, [edx+ecx*4]
mov	ecx, [esi]
shr	ecx, 1Fh
and	cl, 1
jz	short loc_724481
mov	eax, [esi+0Ch]
mov	[esp+7Ch+var_78], eax
jmp	short loc_724488

loc_724481:
mov	edx, [esi+0Ch]
mov	[esp+7Ch+var_78], edx

loc_724488:
fild	[esp+7Ch+var_78]
fstp	[esp+7Ch+var_78]
fld	[esp+7Ch+arg_0]
fld	[esp+7Ch+var_78]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_72458E
test	cl, cl
jz	short loc_7244B6
movzx	eax, word ptr [esi+14h]
mov	[esp+7Ch+var_78], eax
jmp	short loc_7244BD

loc_7244B6:
mov	ecx, [esi+14h]
mov	[esp+7Ch+var_78], ecx

loc_7244BD:
fild	[esp+7Ch+var_78]
fadd	st, st(1)
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_72458E
push	ebx
fsubp	st(1), st
push	edi
lea	edx, [esp+84h+var_5C]
push	edx
fstp	[esp+88h+var_74]
mov	ecx, esi
xor	edi, edi
call	sub_6F7660
xor	ebx, ebx

loc_7244E8:
mov	ecx, [esp+84h+var_5C]
test	ecx, ecx
jz	short loc_724531
cmp	ecx, [esp+84h+var_58]
jnb	short loc_724531
mov	al, [ecx+6]
shr	al, 6
test	al, 1
movzx	eax, word ptr [ecx+2]
jz	short loc_724506
neg	eax

loc_724506:
add	edi, eax
mov	[esp+84h+var_78], edi
fild	[esp+84h+var_78]
fld	[esp+84h+var_74]
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_724531
movzx	ecx, word ptr [ecx+4]
shr	ecx, 0Ch
add	ebx, ecx
lea	ecx, [esp+84h+var_5C]
call	sub_6F5F90
jmp	short loc_7244E8

loc_724531:
mov	edx, [esi]
mov	eax, [esi+8]
shr	edx, 1Fh
test	dl, 1
jz	short loc_72454D
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_72454D
or	eax, 0FFFFFFFFh

loc_72454D:
mov	ecx, [esp+84h+var_C]
lea	edi, [eax+ebx]
test	ecx, ecx
jz	short loc_72455D
call	sub_64A400

loc_72455D:
mov	eax, [esp+84h+var_10]
test	eax, eax
jz	short loc_724583
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_724583
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_724583:
mov	eax, edi
pop	edi
pop	ebx
pop	esi
add	esp, 78h
retn	8

loc_72458E:
fstp	st(1)
fstp	st

loc_724592:
or	eax, 0FFFFFFFFh
pop	esi
add	esp, 78h
retn	8
sub_7243C0 endp

align 10h



; int __stdcall	sub_7245A0(int,	float)
sub_7245A0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+28h]
jb	short loc_7245B5
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8

loc_7245B5:
test	byte ptr [esi+150h], 3
jz	short loc_7245CA
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_7245CA:
fld	[esp+8+arg_4]
push	ecx		; float
fstp	[esp+0Ch+var_C]
push	edi		; int
mov	ecx, esi
call	sub_720010
pop	edi
pop	esi
retn	8
sub_7245A0 endp

align 10h



; int __stdcall	sub_7245E0(float, float)
sub_7245E0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 2Ch
push	edi
mov	edi, ecx
test	byte ptr [edi+150h], 3
jz	short loc_7245FB
call	sub_723480
and	byte ptr [edi+150h], 0FCh

loc_7245FB:
fld	[esp+30h+arg_0]
push	esi
fld	dword ptr [edi+3Ch]
lea	esi, [edi+24h]
fsub	dword ptr [edi+0F8h]
mov	ecx, esi
fsubp	st(1), st
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_4]
fld	dword ptr [edi+40h]
fsub	dword ptr [edi+0FCh]
fsubp	st(1), st
fstp	[esp+34h+arg_4]
call	sub_733EC0
mov	[esp+34h+var_2C], eax
fild	[esp+34h+var_2C]
test	eax, eax
jge	short loc_72463E
fadd	ds:flt_15FCC08

loc_72463E:
fadd	[esp+34h+arg_4]
push	ecx		; float
lea	eax, [esp+38h+var_28]
mov	ecx, esi
fstp	[esp+38h+var_2C]
fld	[esp+38h+var_2C]
fstp	[esp+38h+var_38]
push	eax		; int
call	sub_734D10
mov	eax, [esp+34h+var_28]
test	eax, eax
jz	short loc_72466F
mov	ecx, [esp+34h+var_20]
cmp	ecx, [eax+4]
jnb	short loc_72466F
test	ecx, ecx
jge	short loc_7246B6

loc_72466F:
fldz
xor	edx, edx
fcom	[esp+34h+arg_4]
mov	[esp+34h+var_24], edx
fnstsw	ax
fstp	[esp+34h+var_8]
mov	edx, [esp+34h+var_8]
mov	[esp+34h+var_1C], edx
test	ah, 1
jnz	short loc_724692
xor	ecx, ecx
jmp	short loc_724698

loc_724692:
mov	eax, [edi+28h]
lea	ecx, [eax-1]

loc_724698:
mov	al, [esi+74h]
shr	al, 2
and	al, 1
mov	byte ptr [esp+34h+var_4], al
mov	edx, [esp+34h+var_4]
mov	eax, esi
mov	[esp+34h+var_18], edx
mov	[esp+34h+var_20], ecx
mov	[esp+34h+var_28], eax

loc_7246B6:
pop	esi
test	eax, eax
jz	short loc_7246DB
cmp	ecx, [eax+4]
jnb	short loc_7246DB
test	ecx, ecx
jl	short loc_7246DB
fld	[esp+30h+arg_0]
push	ecx		; float
fstp	[esp+34h+var_34]
push	ecx		; int
mov	ecx, edi
call	sub_720010
pop	edi
add	esp, 2Ch
retn	8

loc_7246DB:
mov	eax, [edi+28h]
neg	eax
sbb	eax, eax
pop	edi
add	esp, 2Ch
retn	8
sub_7245E0 endp

align 10h



; int __stdcall	sub_7246F0(float, float, int)
sub_7246F0 proc	near

var_10C= dword ptr -10Ch
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	byte ptr -0ECh
var_E0=	dword ptr -0E0h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_B4=	byte ptr -0B4h
var_A4=	byte ptr -0A4h
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 100h
push	ebx
mov	ebx, ecx
test	byte ptr [ebx+150h], 3
push	esi
jz	short loc_72470F
call	sub_723480
and	byte ptr [ebx+150h], 0FCh

loc_72470F:
fld	[esp+108h+arg_0]
lea	esi, [ebx+24h]
fld	dword ptr [ebx+3Ch]
mov	ecx, esi
fsub	dword ptr [ebx+0F8h]
fsubp	st(1), st
fstp	[esp+108h+arg_0]
fld	[esp+108h+arg_4]
fld	dword ptr [ebx+40h]
fsub	dword ptr [ebx+0FCh]
fsubp	st(1), st
fstp	[esp+108h+arg_4]
call	sub_733EC0
mov	[esp+108h+var_F8], eax
fild	[esp+108h+var_F8]
test	eax, eax
jge	short loc_72475D
fadd	ds:flt_15FCC08

loc_72475D:
fadd	[esp+108h+arg_4]
push	ecx		; float
lea	eax, [esp+10Ch+var_C8]
mov	ecx, esi
fstp	[esp+10Ch+var_F8]
fld	[esp+10Ch+var_F8]
fstp	[esp+10Ch+var_10C]
push	eax		; int
call	sub_734D10
mov	eax, [esp+108h+var_C8]
xor	dl, dl
mov	[esp+108h+var_FD], dl
test	eax, eax
jz	loc_724A96
mov	ecx, [esp+108h+var_C0]
cmp	ecx, [eax+4]
jnb	loc_724A96
test	ecx, ecx
jl	loc_724A96
mov	eax, [eax]
push	ebp
mov	ebp, [eax+ecx*4]
mov	eax, [ebp+0Ch]
mov	ecx, [ebp+0]
mov	[esp+10Ch+var_FC], eax
fild	[esp+10Ch+var_FC]
shr	ecx, 1Fh
and	cl, 1
fstp	[esp+10Ch+var_F8]
fld	[esp+10Ch+arg_0]
fld	[esp+10Ch+var_F8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	loc_724A84
test	cl, cl
jz	short loc_7247E7
movzx	ecx, word ptr [ebp+14h]
mov	[esp+10Ch+var_FC], ecx
jmp	short loc_7247EE

loc_7247E7:
mov	eax, [ebp+14h]
mov	[esp+10Ch+var_FC], eax

loc_7247EE:
fild	[esp+10Ch+var_FC]
fadd	st, st(1)
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_724A84
mov	ecx, [ebx+4Ch]
fsubp	st(1), st
fild	dword ptr [ebx+4Ch]
push	edi
test	ecx, ecx
jge	short loc_724814
fadd	ds:flt_15FCC08

loc_724814:
faddp	st(1), st
lea	edx, [esp+110h+var_88]
push	edx
mov	ecx, ebp
fstp	[esp+114h+var_F8]
xor	esi, esi
call	sub_6F7660
xor	edi, edi
lea	ecx, [ecx+0]

loc_724830:
mov	ecx, [esp+110h+var_88]
test	ecx, ecx
jz	loc_724A34
cmp	ecx, [esp+110h+var_84]
jnb	loc_724A34
mov	al, [ecx+6]
shr	al, 6
test	al, 1
movzx	eax, word ptr [ecx+2]
jz	short loc_72485C
neg	eax

loc_72485C:
lea	edx, [eax+esi]
mov	eax, edx
mov	[esp+110h+var_FC], eax
fild	[esp+110h+var_FC]
test	eax, eax
jge	short loc_724873
fadd	ds:flt_15FCC08

loc_724873:
fld	[esp+110h+var_F8]
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_724899
movzx	ecx, word ptr [ecx+4]
shr	ecx, 0Ch
add	edi, ecx
lea	ecx, [esp+110h+var_88]
mov	esi, edx
call	sub_6F5F90
jmp	short loc_724830

loc_724899:
mov	al, [ecx+6]
shr	al, 7
and	al, 1
mov	[esp+110h+var_FC], edi
mov	[esp+110h+var_FD], al
jz	loc_724A38
mov	edi, [esp+110h+arg_8]
test	edi, edi
jz	loc_724A38
xor	esi, esi
mov	[edi], esi
mov	[edi+4], esi
mov	edx, [ebp+0]
mov	eax, [ebp+8]
shr	edx, 1Fh
test	dl, 1
jz	short loc_7248E2
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_7248E2
or	eax, 0FFFFFFFFh

loc_7248E2:
mov	ecx, [esp+110h+var_FC]
add	eax, ecx
mov	ecx, [ebx+8]
lea	edx, [esp+110h+var_FC]
push	edx
push	eax
mov	[esp+118h+var_F8], eax
lea	eax, [esp+118h+var_F4]
push	eax
mov	[esp+11Ch+var_FC], esi
call	sub_7267B0
mov	eax, [esp+110h+var_F4]
cmp	eax, esi
jz	loc_724A34
mov	ecx, [esp+110h+var_F0]
test	ecx, ecx
jl	loc_724A34
cmp	ecx, [eax+4]
jge	loc_724A34
mov	edx, [eax]
mov	ebp, [edx+ecx*4]
mov	eax, [esp+110h+var_FC]
xor	ebx, ebx
push	ebx
lea	ecx, [eax+1]
push	ecx
push	eax
lea	edx, [esp+11Ch+var_2C]
push	edx
mov	ecx, ebp
call	sub_7286A0
push	eax
lea	ecx, [esp+118h+var_B4]
call	sub_700E90
lea	ecx, [esp+110h+var_2C]
call	sub_694380
lea	eax, [esp+110h+var_EC]
push	eax
mov	ecx, ebp
call	sub_727120
mov	ecx, [esp+110h+var_CC]
mov	edx, [esp+110h+var_D0]
cmp	ecx, [edx+4]
jnb	loc_724A1E

loc_724977:
lea	ecx, [esp+110h+var_EC]
call	sub_727230
mov	esi, [eax+4]
add	esi, [ebp+1Ch]
lea	ecx, [esp+110h+var_EC]
call	sub_727230
mov	eax, [eax+0Ch]
mov	ecx, 100h
test	[eax+2Ah], cx
jz	short loc_7249F9
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	short loc_7249F9
lea	ecx, [esp+110h+var_EC]
call	sub_727230
mov	ecx, [eax+0Ch]
lea	edx, [esp+110h+var_A4]
push	edx
add	ecx, 10h
call	sub_4E4120
test	al, al
jz	short loc_7249F9
mov	eax, [edi+4]
add	eax, [edi]
cmp	eax, esi
jnb	short loc_7249E8
cmp	esi, [esp+110h+var_F8]
ja	short loc_724A1E
lea	ecx, [esp+110h+var_EC]
mov	[edi], esi
call	sub_727230
mov	ecx, [eax+8]
mov	[edi+4], ecx
jmp	short loc_724A04

loc_7249E8:
lea	ecx, [esp+110h+var_EC]
call	sub_727230
mov	edx, [eax+8]
add	[edi+4], edx
jmp	short loc_724A04

loc_7249F9:
cmp	esi, [esp+110h+var_F8]
ja	short loc_724A1E
mov	[edi], ebx
mov	[edi+4], ebx

loc_724A04:
lea	ecx, [esp+110h+var_EC]
call	sub_7272D0
mov	eax, [esp+110h+var_CC]
mov	ecx, [esp+110h+var_D0]
cmp	eax, [ecx+4]
jb	loc_724977

loc_724A1E:
mov	ecx, [esp+110h+var_E0]
cmp	ecx, ebx
jz	short loc_724A2B
call	sub_64A430

loc_724A2B:
lea	ecx, [esp+110h+var_B4]
call	sub_694380

loc_724A34:
mov	al, [esp+110h+var_FD]

loc_724A38:
mov	ecx, [esp+110h+var_38]
pop	edi
test	ecx, ecx
jz	short loc_724A4D
call	sub_64A400
mov	al, [esp+10Ch+var_FD]

loc_724A4D:
mov	esi, [esp+10Ch+var_3C]
test	esi, esi
jz	short loc_724A78
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jnz	short loc_724A78
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
mov	al, [esp+10Ch+var_FD]

loc_724A78:
pop	ebp
pop	esi
pop	ebx
add	esp, 100h
retn	0Ch

loc_724A84:
pop	ebp
fstp	st(1)
pop	esi
fstp	st
mov	al, dl
pop	ebx
add	esp, 100h
retn	0Ch

loc_724A96:
pop	esi
mov	al, dl
pop	ebx
add	esp, 100h
retn	0Ch
sub_7246F0 endp

align 10h



; int __stdcall	sub_724AB0(int,	float)
sub_724AB0 proc	near

var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_4= dword ptr  8

sub	esp, 18h
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_724ACB
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_724ACB:
add	esi, 24h
mov	ecx, esi
call	sub_733EC0
mov	[esp+1Ch+var_18], eax
fild	[esp+1Ch+var_18]
test	eax, eax
jge	short loc_724AE7
fadd	ds:flt_15FCC08

loc_724AE7:
fadd	[esp+1Ch+arg_4]
push	ecx		; float
lea	eax, [esp+20h+var_14]
mov	ecx, esi
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fstp	[esp+20h+var_20]
push	eax		; int
call	sub_734D10
mov	ecx, [esp+1Ch+var_14]
pop	esi
test	ecx, ecx
jz	short loc_724B19
mov	eax, [esp+18h+var_C]
cmp	eax, [ecx+4]
jnb	short loc_724B19
test	eax, eax
jge	short loc_724B1C

loc_724B19:
or	eax, 0FFFFFFFFh

loc_724B1C:
add	esp, 18h
retn	8
sub_724AB0 endp

align 10h



sub_724B30 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_724B4B
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_724B4B:
mov	eax, [esp+18h+arg_0]
push	eax
lea	ecx, [esp+1Ch+var_14]
push	ecx
lea	ecx, [esi+24h]
call	sub_734C60
mov	ecx, [esp+18h+var_14]
pop	esi
test	ecx, ecx
jz	short loc_724B73
mov	eax, [esp+14h+var_C]
cmp	eax, [ecx+4]
jnb	short loc_724B73
test	eax, eax
jge	short loc_724B76

loc_724B73:
or	eax, 0FFFFFFFFh

loc_724B76:
add	esp, 14h
retn	4
sub_724B30 endp

align 10h



sub_724B80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_724B98
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_724B98:
lea	eax, [esi+24h]
pop	esi
test	eax, eax
jz	short loc_724BCB
mov	ecx, [esp+arg_0]
cmp	ecx, [eax+4]
jnb	short loc_724BCB
test	ecx, ecx
jl	short loc_724BCB
mov	eax, [eax]
mov	eax, [eax+ecx*4]
mov	ecx, [eax]
mov	eax, [eax+8]
shr	ecx, 1Fh
test	cl, 1
jz	short locret_724BCE
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short locret_724BCE

loc_724BCB:
or	eax, 0FFFFFFFFh

locret_724BCE:
retn	4
sub_724B80 endp

align 10h



sub_724BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
push	edi
jz	short loc_724BF9
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_724BF9:
add	esi, 24h
jz	short loc_724C41
mov	edi, [esp+8+arg_0]
cmp	edi, [esi+4]
jnb	short loc_724C41
test	edi, edi
jl	short loc_724C41
push	ebx
mov	ebx, [esp+0Ch+arg_4]
test	ebx, ebx
jz	short loc_724C20
mov	eax, [esi]
mov	ecx, [eax+edi*4]
call	sub_733CB0
mov	[ebx], al

loc_724C20:
mov	ecx, [esi]
mov	eax, [ecx+edi*4]
mov	edx, [eax]
shr	edx, 1Fh
pop	ebx
test	dl, 1
jz	short loc_724C39
movzx	eax, byte ptr [eax+0Bh]
pop	edi
pop	esi
retn	8

loc_724C39:
mov	eax, [eax+20h]
pop	edi
pop	esi
retn	8

loc_724C41:
mov	eax, [esp+8+arg_4]
test	eax, eax
jz	short loc_724C4C
mov	byte ptr [eax],	0

loc_724C4C:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_724BE0 endp

align 10h



sub_724C60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
test	ebp, ebp
jnz	short loc_724C79
pop	edi
xor	eax, eax
pop	ebp
add	esp, 8
retn	8

loc_724C79:
test	byte ptr [edi+150h], 3
jz	short loc_724C8E
call	sub_723480
and	byte ptr [edi+150h], 0FCh

loc_724C8E:
push	ebx
push	esi
lea	esi, [edi+24h]
test	esi, esi
jz	loc_724D34
mov	ebx, [esp+18h+arg_0]
cmp	ebx, [esi+4]
jnb	loc_724D34
test	ebx, ebx
jl	loc_724D34
mov	eax, [esi]
mov	eax, [eax+ebx*4]
mov	ecx, [eax]
mov	eax, [eax+8]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_724CD1
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_724CD1
or	eax, 0FFFFFFFFh

loc_724CD1:
mov	ecx, [edi+8]
lea	edx, [esp+18h+arg_4]
push	edx
push	eax
lea	eax, [esp+20h+var_8]
push	eax
mov	[esp+24h+arg_4], 0
call	sub_7267B0
mov	ecx, [esp+18h+var_8]
test	ecx, ecx
jz	short loc_724D34
mov	edi, [esp+18h+var_4]
test	edi, edi
jl	short loc_724D34
cmp	edi, [ecx+4]
jge	short loc_724D34
mov	edx, [esi]
mov	eax, [edx+ebx*4]
mov	edx, [eax]
shr	edx, 1Fh
test	dl, 1
jz	short loc_724D16
movzx	eax, byte ptr [eax+0Bh]
jmp	short loc_724D19

loc_724D16:
mov	eax, [eax+20h]

loc_724D19:
mov	[ebp+0], eax
mov	eax, [ecx]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
mov	eax, [esp+18h+arg_4]
pop	esi
pop	ebx
pop	edi
lea	eax, [edx+eax*2]
pop	ebp
add	esp, 8
retn	8

loc_724D34:
pop	esi
pop	ebx
pop	edi
xor	eax, eax
pop	ebp
add	esp, 8
retn	8
sub_724C60 endp




sub_724D40 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	esi, ecx
test	edi, edi
jz	loc_724E60
test	byte ptr [esi+150h], 3
jz	short loc_724D68
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_724D68:
lea	eax, [esi+24h]
test	eax, eax
jz	loc_724E60
mov	ecx, [esp+10h+arg_0]
cmp	ecx, [eax+4]
jnb	loc_724E60
test	ecx, ecx
jl	loc_724E60
mov	eax, [eax]
mov	esi, [eax+ecx*4]
mov	ecx, [esi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_724DA5
movzx	edx, word ptr [esi+1Ah]
mov	[esp+10h+arg_4], edx
fild	[esp+10h+arg_4]
jmp	short loc_724DB1

loc_724DA5:
movzx	eax, word ptr [esi+26h]
mov	[esp+10h+arg_4], eax
fild	[esp+10h+arg_4]

loc_724DB1:
fstp	[esp+10h+arg_4]
fld	[esp+10h+arg_4]
fnstcw	word ptr [esp+10h+arg_4]
movzx	eax, word ptr [esp+10h+arg_4]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+var_8]
mov	ecx, dword ptr [esp+10h+var_8]
mov	[edi+8], ecx
mov	ecx, esi
fldcw	word ptr [esp+10h+arg_4]
call	sub_71E0D0
fnstcw	word ptr [esp+10h+arg_4]
movzx	eax, word ptr [esp+10h+arg_4]
or	eax, 0C00h
mov	[esp+10h+arg_0], eax
fldcw	word ptr [esp+10h+arg_0]
fistp	[esp+10h+var_8]
mov	edx, dword ptr [esp+10h+var_8]
mov	[edi+0Ch], edx
mov	eax, [esi]
fldcw	word ptr [esp+10h+arg_4]
shr	eax, 1Fh
test	al, 1
jz	short loc_724E19
movzx	eax, word ptr [esi+14h]
jmp	short loc_724E1C

loc_724E19:
mov	eax, [esi+14h]

loc_724E1C:
mov	[edi], eax
mov	ecx, [esi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_724E2E
movzx	eax, word ptr [esi+16h]
jmp	short loc_724E31

loc_724E2E:
mov	eax, [esi+18h]

loc_724E31:
mov	[edi+4], eax
mov	edx, [esi]
shr	edx, 1Fh
test	dl, 1
jz	short loc_724E44
movsx	eax, byte ptr [esi+1Dh]
jmp	short loc_724E48

loc_724E44:
movsx	eax, word ptr [esi+28h]

loc_724E48:
mov	[edi+14h], eax
mov	eax, [esi]
mov	esi, [esi+0Ch]
mov	[edi+10h], esi
pop	edi
shr	eax, 1Fh
mov	al, 1
pop	esi
add	esp, 8
retn	8

loc_724E60:
pop	edi
xor	al, al
pop	esi
add	esp, 8
retn	8
sub_724D40 endp

align 10h



sub_724E70 proc	near

var_7D=	byte ptr -7Dh
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 80h
push	ebx
mov	ebx, [esp+84h+arg_0]
push	esi
push	edi
mov	edi, ecx
test	ebx, ebx
jz	loc_725092
mov	ecx, [edi+8]
call	sub_726950
mov	esi, [esp+8Ch+arg_4]
cmp	esi, eax
jnb	loc_725092
test	byte ptr [edi+150h], 3
jz	short loc_724EB8
mov	ecx, edi
call	sub_723480
and	byte ptr [edi+150h], 0FCh

loc_724EB8:
push	esi
lea	eax, [esp+90h+var_70]
push	eax
lea	ecx, [edi+24h]
call	sub_734C60
mov	eax, [esp+8Ch+var_70]
mov	[esp+8Ch+var_7D], 0
test	eax, eax
jz	loc_725082
mov	ecx, [esp+8Ch+var_68]
cmp	ecx, [eax+4]
jnb	loc_725082
test	ecx, ecx
jl	loc_725082
mov	edx, [eax]
mov	edi, [edx+ecx*4]
mov	eax, [edi]
shr	eax, 1Fh
test	al, 1
mov	eax, [edi+8]
jz	short loc_724F0C
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_724F0C
or	eax, 0FFFFFFFFh

loc_724F0C:
push	ebp
lea	ecx, [esp+90h+var_5C]
sub	esi, eax
push	ecx
mov	ecx, edi
mov	[esp+94h+var_74], esi
call	sub_6F7660
xor	esi, esi
xor	ebp, ebp

loc_724F23:
mov	eax, [esp+90h+var_5C]
test	eax, eax
jz	loc_72504B
cmp	eax, [esp+90h+var_58]
jnb	loc_72504B
cmp	ebp, [esp+90h+var_74]
jz	short loc_724F5E
mov	dl, [eax+6]
movzx	eax, word ptr [eax+2]
shr	dl, 6
test	dl, 1
jz	short loc_724F50
neg	eax

loc_724F50:
lea	ecx, [esp+90h+var_5C]
add	esi, eax
call	sub_6F5F90
inc	ebp
jmp	short loc_724F23

loc_724F5E:
test	byte ptr [eax+7], 1
mov	[esp+90h+var_7C], esi
jnz	loc_72504B
fldz
mov	[esp+90h+var_7D], 1
fst	dword ptr [ebx]
fstp	dword ptr [ebx+4]
fldz
fld	st
fadd	st, st(1)
fstp	[esp+90h+var_74]
fld	[esp+90h+var_74]
fst	dword ptr [ebx+8]
fstp	dword ptr [ebx+0Ch]
mov	cl, [eax+6]
shr	cl, 6
test	cl, 1
jnz	short loc_724FA1
movzx	edx, word ptr [eax+2]
mov	[esp+90h+var_74], edx
jmp	short loc_724FAB

loc_724FA1:
movzx	eax, word ptr [eax+2]
neg	eax
mov	[esp+90h+var_74], eax

loc_724FAB:
fild	[esp+90h+var_74]
fadd	dword ptr [ebx+8]
fstp	[esp+90h+var_74]
fld	[esp+90h+var_74]
fst	dword ptr [ebx+8]
fld	ds:dword_15FDABC
fstp	dword ptr [ebx+4]
mov	ecx, [edi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_724FDA
movzx	edx, word ptr [edi+16h]
mov	[esp+90h+var_74], edx
jmp	short loc_724FE1

loc_724FDA:
mov	eax, [edi+18h]
mov	[esp+90h+var_74], eax

loc_724FE1:
fild	[esp+90h+var_74]
fstp	[esp+90h+var_74]
fld	[esp+90h+var_74]
fst	dword ptr [ebx+0Ch]
mov	ecx, [edi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_725003
mov	edx, [edi+10h]
mov	[esp+90h+var_74], edx
jmp	short loc_72500A

loc_725003:
mov	eax, [edi+10h]
mov	[esp+90h+var_74], eax

loc_72500A:
fild	[esp+90h+var_7C]
fld	ds:dbl_1440130
fadd	st(1), st
fxch	st(1)
fstp	[esp+90h+var_7C]
fild	[esp+90h+var_74]
fstp	[esp+90h+var_78]
fld	[esp+90h+var_7C]
fld	st
faddp	st(5), st
fxch	st(4)
fstp	dword ptr [ebx]
fxch	st(2)
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [ebx+8]
fld	[esp+90h+var_78]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [ebx+4]
faddp	st(1), st
fstp	dword ptr [ebx+0Ch]

loc_72504B:
mov	ecx, [esp+90h+var_C]
pop	ebp
test	ecx, ecx
jz	short loc_72505C
call	sub_64A400

loc_72505C:
mov	eax, [esp+8Ch+var_10]
test	eax, eax
jz	short loc_725082
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_725082
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_725082:
mov	al, [esp+8Ch+var_7D]
pop	edi
pop	esi
pop	ebx
add	esp, 80h
retn	8

loc_725092:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 80h
retn	8
sub_724E70 endp




sub_7250A0 proc	near

var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 90h
push	ebx
push	ebp
push	esi
mov	ebx, ecx
mov	ecx, [ebx+8]
push	edi
call	sub_726950
mov	esi, [esp+0A0h+arg_0]
xor	ebp, ebp
cmp	esi, ebp
jz	loc_7253F5
mov	edi, [esp+0A0h+arg_4]
cmp	edi, eax
ja	loc_7253F5
test	byte ptr [ebx+150h], 3
jz	short loc_7250EB
mov	ecx, ebx
call	sub_723480
and	byte ptr [ebx+150h], 0FCh

loc_7250EB:
push	edi
lea	eax, [esp+0A4h+var_70]
push	eax
lea	ecx, [ebx+24h]
call	sub_734C60
mov	eax, [esp+0A0h+var_70]
mov	[esp+0A0h+var_8D], 0
cmp	eax, ebp
jz	loc_725341
mov	ecx, [esp+0A0h+var_68]
cmp	ecx, [eax+4]
jnb	loc_725341
cmp	ecx, ebp
jl	loc_725341
mov	edx, [eax]
mov	ebx, [edx+ecx*4]
mov	eax, [ebx]
shr	eax, 1Fh
test	al, 1
mov	eax, [ebx+8]
jz	short loc_72513F
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_72513F
or	eax, 0FFFFFFFFh

loc_72513F:
lea	ecx, [esp+0A0h+var_5C]
sub	edi, eax
push	ecx
mov	ecx, ebx
mov	[esp+0A4h+var_8C], edi
call	sub_6F7660
mov	[esp+0A0h+var_78], ebp
jmp	short loc_725160
align 10h

loc_725160:
mov	edi, [esp+0A0h+var_5C]
test	edi, edi
jz	loc_725308
cmp	edi, [esp+0A0h+var_58]
jnb	loc_725308
cmp	ebp, [esp+0A0h+var_8C]
jz	short loc_72519D
mov	dl, [edi+6]
movzx	eax, word ptr [edi+2]
shr	dl, 6
test	dl, 1
jz	short loc_72518D
neg	eax

loc_72518D:
add	[esp+0A0h+var_78], eax
lea	ecx, [esp+0A0h+var_5C]
call	sub_6F5F90
inc	ebp
jmp	short loc_725160

loc_72519D:
lea	eax, [edi+6]
mov	[esp+0A0h+var_7C], eax
mov	ax, [eax]
shr	ax, 0Bh
mov	[esp+0A0h+var_8D], 1
test	al, 1
jnz	loc_725352
mov	eax, [esp+0A0h+var_10]
test	eax, eax
jz	short loc_7251C8
mov	ebp, [eax+1Ch]
jmp	short loc_7251CA

loc_7251C8:
xor	ebp, ebp

loc_7251CA:
mov	ecx, edi
call	sub_6F5F50
fmul	ds:dbl_15FCE20
movzx	eax, word ptr [edi]
mov	ecx, 0FFFFh
fstp	[esp+0A0h+var_8C]
fld	[esp+0A0h+var_8C]
fmul	ds:dbl_143B738
fstp	[esp+0A0h+var_88]
cmp	ax, cx
jnb	short loc_7251FB
movzx	eax, ax
jmp	short loc_7251FE

loc_7251FB:
or	eax, 0FFFFFFFFh

loc_7251FE:
mov	ecx, [ebp+0Ch]
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+30h]
call	eax
mov	ecx, [esp+0A0h+var_7C]
test	byte ptr [ecx+1], 1
jz	short loc_725234
fld	dword ptr [esi+8]
fsub	dword ptr [esi]
fstp	[esp+0A0h+var_8C]
fld	[esp+0A0h+var_8C]
fdiv	ds:dbl_15FCD78
fstp	[esp+0A0h+var_8C]
fld	[esp+0A0h+var_8C]
fadd	dword ptr [esi]
fstp	dword ptr [esi+8]

loc_725234:
mov	eax, [ebp+0Ch]
fld	dword ptr [eax+8]
mov	ecx, ebx
fstp	[esp+0A0h+var_84]
fld	dword ptr [eax+0Ch]
fstp	[esp+0A0h+var_74]
fld	dword ptr [esi]
fld	[esp+0A0h+var_88]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0A0h+var_7C]
fld	[esp+0A0h+var_7C]
fstp	dword ptr [esi]
fmul	dword ptr [esi+8]
fstp	[esp+0A0h+var_8C]
fld	[esp+0A0h+var_8C]
fstp	dword ptr [esi+8]
call	sub_71DE10
mov	edx, [ebp+0Ch]
fld	dword ptr [edx+8]
fld	[esp+0A0h+var_88]
fld	st
fmulp	st(2), st
fxch	st(2)
fsubrp	st(1), st
fld	ds:dbl_1440130
fadd	st(1), st
fxch	st(1)
fstp	[esp+0A0h+var_88]
fld	[esp+0A0h+var_88]
fst	dword ptr [esi+4]
fld	[esp+0A0h+var_74]
fadd	[esp+0A0h+var_84]
fmulp	st(3), st
fxch	st(2)
fstp	[esp+0A0h+var_84]
fld	[esp+0A0h+var_84]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0Ch]
mov	eax, [ebx]
shr	eax, 1Fh
test	al, 1
jz	short loc_7252C4
mov	ecx, [ebx+10h]
mov	[esp+0A0h+var_88], ecx
jmp	short loc_7252CB

loc_7252C4:
mov	edx, [ebx+10h]
mov	[esp+0A0h+var_88], edx

loc_7252CB:
fiadd	[esp+0A0h+var_78]
fstp	[esp+0A0h+var_84]
fild	[esp+0A0h+var_88]
fstp	[esp+0A0h+var_80]
fld	[esp+0A0h+var_7C]
fld	[esp+0A0h+var_84]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fadd	[esp+0A0h+var_8C]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+4]
fld	[esp+0A0h+var_80]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fadd	dword ptr [esi+0Ch]
fstp	dword ptr [esi+0Ch]

loc_725308:
mov	ecx, [esp+0A0h+var_C]

loc_72530F:
test	ecx, ecx
jz	short loc_725318
call	sub_64A400

loc_725318:
mov	eax, [esp+0A0h+var_10]
test	eax, eax
jz	short loc_725341
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_725341
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_725341:
mov	al, [esp+0A0h+var_8D]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 90h
retn	8

loc_725352:
mov	ecx, [esp+0A0h+var_C]
fild	dword ptr [ecx+10h]
fchs
fstp	dword ptr [esi]
fild	dword ptr [ecx+14h]
fchs
fstp	dword ptr [esi+4]
mov	eax, [ecx+18h]
fild	dword ptr [ecx+18h]
test	eax, eax
jge	short loc_725378
fadd	ds:flt_15FCC08

loc_725378:
fadd	dword ptr [esi]
fstp	dword ptr [esi+8]
mov	edx, [ecx+1Ch]
fild	dword ptr [ecx+1Ch]
test	edx, edx
jge	short loc_72538D
fadd	ds:flt_15FCC08

loc_72538D:
fadd	dword ptr [esi+4]
fstp	dword ptr [esi+0Ch]
mov	eax, [ebx]
shr	eax, 1Fh
test	al, 1
jz	short loc_7253A5
mov	edx, [ebx+10h]
mov	[esp+0A0h+var_8C], edx
jmp	short loc_7253AC

loc_7253A5:
mov	eax, [ebx+10h]
mov	[esp+0A0h+var_8C], eax

loc_7253AC:
fild	[esp+0A0h+var_78]
fld	ds:dbl_1440130
fadd	st(1), st
fxch	st(1)
fstp	[esp+0A0h+var_84]
fiadd	[esp+0A0h+var_8C]
fstp	[esp+0A0h+var_80]
fld	dword ptr [esi]
fld	[esp+0A0h+var_84]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fadd	dword ptr [esi+8]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+4]
fld	[esp+0A0h+var_80]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fadd	dword ptr [esi+0Ch]
fstp	dword ptr [esi+0Ch]
jmp	loc_72530F

loc_7253F5:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 90h
retn	8
sub_7250A0 endp

align 10h



sub_725410 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
push	edi
jz	short loc_72542C
call	sub_723480
and	byte ptr [esi+150h], 0FCh

loc_72542C:
add	esi, 24h
mov	ecx, esi
call	sub_733EC0
mov	[esp+14h+var_4], eax
fild	[esp+14h+var_4]
test	eax, eax
jge	short loc_725448
fadd	ds:flt_15FCC08

loc_725448:
mov	bl, [esi+74h]
fchs
mov	edi, [esi+14h]
fstp	[esp+14h+var_4]
shr	bl, 2
and	bl, 1
xor	ebp, ebp
lea	esp, [esp+0]

loc_725460:
cmp	edi, [esi+4]
jnb	short loc_72548B
test	edi, edi
jl	short loc_72548B
test	bl, bl
jnz	short loc_725481
fld	[esp+14h+var_4]
push	ecx		; float
fstp	[esp+18h+var_18]
push	edi		; int
mov	ecx, esi
call	sub_733F00
test	al, al
jz	short loc_72548B

loc_725481:
mov	ebp, edi
cmp	edi, [esi+4]
jnb	short loc_72548B
inc	edi
jmp	short loc_725460

loc_72548B:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn
sub_725410 endp

align 10h



sub_7254A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	eax, [edi+4Ch]
fild	dword ptr [edi+4Ch]
mov	esi, ecx
test	eax, eax
jge	short loc_7254BA
fadd	ds:flt_15FCC08

loc_7254BA:
lea	ebx, [edi+24h]
fstp	[esp+10h+arg_0]
mov	ecx, ebx
call	sub_733EC0
mov	[esp+10h+var_4], eax
fild	[esp+10h+var_4]
test	eax, eax
jge	short loc_7254DA
fadd	ds:flt_15FCC08

loc_7254DA:
cmp	byte ptr [esi+18h], 0
fstp	[esp+10h+var_4]
jnz	short loc_7254FD
mov	eax, [edi+11Ch]
test	eax, eax
jz	short loc_7254F3
mov	eax, [eax+14h]
jmp	short loc_7254F5

loc_7254F3:
xor	eax, eax

loc_7254F5:
push	eax
mov	ecx, esi
call	sub_73EDA0

loc_7254FD:
cmp	dword ptr [esi+4], 0
jz	loc_72559B
cmp	byte ptr [esi+18h], 0
fld	[esp+10h+arg_0]
fld	[esp+10h+var_4]
jz	short loc_725547
fld	dword ptr [esi+0A4h]
fld	st(2)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_725547
fld	dword ptr [esi+0A8h]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_725547
mov	cx, [esi+0ACh]
cmp	cx, [edi+148h]
jz	short loc_725597

loc_725547:
fxch	st(1)
mov	ecx, edi
fstp	dword ptr [esi+0A4h]
fstp	dword ptr [esi+0A8h]
mov	dx, [edi+148h]
mov	[esi+0ACh], dx
mov	eax, [edi+38h]
push	eax
call	sub_724B80
fld	dword ptr [esi+0A8h]
sub	esp, 8
fstp	[esp+18h+var_14]
add	edi, 3Ch
fld	dword ptr [esi+0A4h]
mov	ecx, esi
fstp	[esp+18h+var_18]
push	eax		; int
push	edi		; int
push	ebx		; int
lea	eax, [esi+1Ch]
push	eax		; int
call	sub_73F580
jmp	short loc_72559B

loc_725597:
fstp	st(1)
fstp	st

loc_72559B:
mov	eax, [esi+24h]
lea	ecx, [esi+1Ch]
pop	edi
pop	esi
pop	ebx
test	eax, eax
jz	short loc_7255CC
cmp	dword ptr [eax+54h], 0
jnz	short loc_7255B4
cmp	dword ptr [eax+60h], 0
jz	short loc_7255CC

loc_7255B4:
mov	edx, [esp+4+arg_C]
mov	eax, [esp+4+arg_8]
push	0
push	0
push	edx
mov	edx, [esp+10h+arg_4]
push	eax
push	edx
call	sub_6F9540

loc_7255CC:
pop	ecx
retn	10h
sub_7254A0 endp




sub_7255D0 proc	near

var_28=	dword ptr -28h
var_24=	word ptr -24h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	word ptr -18h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_13=	byte ptr -13h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= word ptr	-0Ch
var_A= word ptr	-0Ah
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 28h
push	ebx
push	esi
mov	esi, ecx
test	byte ptr [esi+150h], 3
jz	short loc_7255E5
call	sub_723480

loc_7255E5:
xor	ebx, ebx
xor	ecx, ecx
mov	[esp+30h+var_18], cx
lea	ecx, [esi+120h]
xor	eax, eax
xor	edx, edx
push	ecx
lea	ecx, [esp+34h+var_28]
mov	[esp+34h+var_28], ebx
mov	[esp+34h+var_24], ax
mov	[esp+34h+var_22], bl
mov	[esp+34h+var_21], bl
mov	[esp+34h+var_20], bl
mov	[esp+34h+var_1F], bl
mov	[esp+34h+var_1E], 10h
mov	[esp+34h+var_1D], bl
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_16], bl
mov	[esp+34h+var_15], bl
mov	[esp+34h+var_14], bl
mov	[esp+34h+var_13], bl
mov	[esp+34h+var_12], 10h
mov	[esp+34h+var_11], bl
mov	[esp+34h+var_10], ebx
mov	[esp+34h+var_C], dx
mov	[esp+34h+var_A], ax
mov	[esp+34h+var_8], ebx
mov	[esp+34h+var_4], bl
call	sub_6F5E40
mov	cl, [esi+14Eh]
mov	al, [esp+30h+var_21]
test	cl, 40h
jz	short loc_72566D
or	al, 1
or	[esp+30h+var_15], 1

loc_72566D:
test	cl, cl
jns	short loc_725678
or	al, 2
or	[esp+30h+var_15], 2

loc_725678:
test	byte ptr [esi+150h], 20h
mov	cl, [esp+30h+var_1D]
jz	short loc_72568E
and	al, 0F9h
or	cl, 1
or	al, 1
jmp	short loc_725691

loc_72568E:
and	cl, 0FEh

loc_725691:
mov	dl, [esi+14Fh]
test	dl, 1
jz	short loc_7256A0
or	al, 8
jmp	short loc_7256A2

loc_7256A0:
and	al, 0F7h

loc_7256A2:
test	dl, 2
jz	short loc_7256AB
or	al, 10h
jmp	short loc_7256AD

loc_7256AB:
and	al, 0EFh

loc_7256AD:
mov	dl, [esi+14Dh]
and	cl, 0E1h
add	dl, dl
or	dl, cl
mov	ecx, [esi+14h]
mov	[esp+30h+var_21], al
mov	[esp+30h+var_1D], dl
cmp	ecx, ebx
jz	short loc_725703
mov	ebx, [esp+30h+arg_4]
push	ebp
mov	ebp, [esp+34h+arg_0]
push	edi
mov	edi, [esp+38h+arg_8]
push	edi
push	ebx
push	ebp
push	esi
call	sub_7254A0
mov	eax, [esi+14h]
mov	edx, [esp+38h+arg_C]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
push	edx
push	edi
push	ebx
push	ebp
lea	ecx, [esi+24h]
call	sub_7356C0
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 28h
retn	10h

loc_725703:
mov	ecx, [esp+30h+arg_C]
mov	edx, [esp+30h+arg_8]
push	ebx
lea	eax, [esp+34h+var_28]
push	eax
mov	eax, [esp+38h+arg_4]
push	ecx
mov	ecx, [esp+3Ch+arg_0]
push	edx
push	eax
push	ecx
lea	ecx, [esi+24h]
call	sub_7356C0
pop	esi
pop	ebx
add	esp, 28h
retn	10h
sub_7255D0 endp

align 10h



sub_725730 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14401C8
call	sub_72C0D0
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_72574A
call	sub_64A430

loc_72574A:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_725756
call	sub_64A400

loc_725756:
mov	eax, [esi+10h]
mov	ecx, [esi+0Ch]
push	eax
push	ecx
call	sub_721CD0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0Ch]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_725783
call	sub_64A400

loc_725783:
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_725730 endp

align 10h



sub_725790 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_725730
test	[esp+4+arg_0], 1
jz	short loc_7257AD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7257AD:
mov	eax, esi
pop	esi
retn	4
sub_725790 endp

align 10h



sub_7257C0 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
xor	ebx, ebx
mov	ebp, 1
mov	[esi+4], ebp
mov	dword ptr [esi], offset	off_1440138
push	edi
mov	[esi+8], ebx
cmp	eax, ebx
jz	short loc_7257EB
add	[eax+4], ebp

loc_7257EB:
mov	[esi+0Ch], eax
mov	[esi+10h], ebx
lea	ecx, [esi+24h]
mov	[esi+14h], ebx
call	sub_735570
fldz
fst	dword ptr [esi+0F8h]
xor	eax, eax
fst	dword ptr [esi+0FCh]
lea	ecx, [esi+120h]
fst	dword ptr [esi+100h]
fstp	dword ptr [esi+104h]
mov	[esi+118h], ax
mov	[esi+11Ch], ebx
call	sub_6CE4E0
mov	edi, [esp+14h+arg_8]
cmp	edi, ebx
jz	short loc_72583F
mov	ecx, edi
call	sub_64A420

loc_72583F:
mov	[esi+144h], edi
mov	ecx, dword_1855FC0
lea	eax, [esp+14h+var_4]
push	eax
mov	[esp+18h+var_4], 144h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	28h
push	esi
call	edx
mov	edi, eax
cmp	edi, ebx
jz	short loc_72587F
mov	eax, [esp+14h+arg_0]
push	eax
mov	ecx, edi
call	sub_72C220
mov	dword ptr [edi], offset	off_14401E4
mov	[edi+24h], esi
jmp	short loc_725881

loc_72587F:
xor	edi, edi

loc_725881:
mov	ecx, [esi+8]
cmp	ecx, ebx
jz	short loc_72588D
call	sub_64A400

loc_72588D:
fldz
mov	[esi+8], edi
and	byte ptr [esi+14Ch], 0C0h
mov	[esi+148h], bp
or	eax, 0FFFFFFFFh
mov	[esi+20h], eax
mov	[esi+1Ch], eax
mov	[esi+150h], bl
mov	[esi+14Fh], bl
mov	[esi+14Eh], bl
fst	dword ptr [esi+0F8h]
fstp	dword ptr [esi+0FCh]
push	ecx		; float
fldz
mov	ecx, esi
fadd	st, st
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fst	dword ptr [esi+100h]
fstp	dword ptr [esi+104h]
mov	[esi+18h], ebx
fld1
fstp	[esp+18h+var_18]
call	sub_71E8D0
or	byte ptr [esi+14Eh], 80h
mov	ecx, esi
mov	[esi+110h], ebx
call	sub_71E1D0
pop	edi
mov	[esi+10Ch], ebx
mov	[esi+108h], ebx
mov	[esi+14Dh], bl
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	0Ch
sub_7257C0 endp

align 10h



sub_725920 proc	near

arg_0= word ptr	 4

movzx	edx, [esp+arg_0]
mov	eax, edx
shr	eax, 8
push	esi
movzx	esi, ds:word_1433548[eax*2]
test	esi, esi
jnz	short loc_72593B
xor	eax, eax
pop	esi
retn

loc_72593B:
mov	eax, 1
cmp	esi, eax
jz	short loc_725963
mov	ecx, edx
shr	edx, 4
and	ecx, 0Fh
and	edx, 0Fh
shl	eax, cl
add	edx, esi
movzx	ecx, ds:word_1433548[edx*2]
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax

loc_725963:
pop	esi
retn
sub_725920 endp

align 10h



sub_725970 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
mov	eax, [edx+1Ch]
mov	ecx, [esp+arg_4]
cmp	ecx, eax
jb	short loc_725994
mov	edx, [edx+4]
add	edx, eax
cmp	ecx, edx
jnb	short loc_725994
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setl	cl
mov	eax, ecx
retn

loc_725994:
sub	eax, ecx
xor	ecx, ecx
test	eax, eax
setl	cl
mov	eax, ecx
retn
sub_725970 endp




sub_7259A0 proc	near
test	byte ptr [ecx+20h], 2
mov	eax, offset asc_1440200	; "\r"
jnz	short locret_7259B0
mov	eax, offset asc_154D83C	; "\n"

locret_7259B0:
retn
sub_7259A0 endp

align 10h



sub_7259C0 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
xor	eax, eax
mov	[esi], eax
mov	[esi+8], eax
mov	[esi+4], eax
pop	esi
retn	4
sub_7259C0 endp

align 10h



sub_7259F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	esi
mov	esi, ecx
mov	eax, [esi+4]
lea	edx, [eax+ebx]
push	edi
cmp	[esi+8], edx
jnb	short loc_725A37
mov	eax, [esi]
add	edx, edx
test	eax, eax
jnz	short loc_725A1D
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax+1Ch]
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
push	edx
jmp	short loc_725A2A

loc_725A1D:
mov	ecx, dword_1855FC0
mov	edi, [ecx]
push	edx
push	eax
mov	eax, [edi+2Ch]

loc_725A2A:
call	eax
mov	[esi], eax
mov	eax, [esi+4]
lea	ecx, [eax+ebx]
mov	[esi+8], ecx

loc_725A37:
mov	edi, [esp+0Ch+arg_4]
sub	eax, edi
jz	short loc_725A58
mov	ecx, [esi]
lea	edx, [eax+eax]
push	edx
lea	eax, [ecx+edi*2]
push	eax
lea	edx, [edi+ebx]
lea	eax, [ecx+edx*2]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_725A58:
mov	ecx, [esi]
add	[esi+4], ebx
lea	eax, [ecx+edi*2]
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_7259F0 endp

align 10h



sub_725A70 proc	near
mov	eax, [ecx+4]
test	eax, eax
jbe	short loc_725AA3
mov	ecx, [ecx]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_725A89
cmp	edx, eax
jnb	short loc_725A89
lea	eax, [ecx+edx*2]
jmp	short loc_725A8B

loc_725A89:
xor	eax, eax

loc_725A8B:
movzx	eax, word ptr [eax]
cmp	ax, 0Dh
jz	short loc_725A9D
cmp	ax, 0Ah
jz	short loc_725A9D
xor	eax, eax
retn

loc_725A9D:
mov	eax, 1
retn

loc_725AA3:
xor	al, al
retn
sub_725A70 endp

align 10h



sub_725AB0 proc	near
mov	eax, [ecx+4]
test	eax, eax
jbe	short locret_725AD2
mov	ecx, [ecx]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_725AC9
cmp	edx, eax
jnb	short loc_725AC9
lea	ecx, [ecx+edx*2]
jmp	short loc_725ACB

loc_725AC9:
xor	ecx, ecx

loc_725ACB:
cmp	word ptr [ecx],	0
jnz	short locret_725AD2
dec	eax

locret_725AD2:
retn
sub_725AB0 endp

align 10h



sub_725AE0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+18h]
test	eax, eax
jz	short loc_725B0D
mov	eax, [eax+4]
mov	edx, [ecx+1Ch]
cmp	edx, eax
jnb	short loc_725B0D
push	esi
mov	esi, [esp+4+arg_0]
test	esi, esi
jz	short loc_725AFE
sub	eax, edx
mov	[esi], eax

loc_725AFE:
mov	eax, [ecx+1Ch]
mov	ecx, [ecx+18h]
mov	edx, [ecx]
lea	eax, [edx+eax*2]
pop	esi
retn	4

loc_725B0D:
mov	eax, [esp+arg_0]
mov	dword ptr [eax], 0
xor	eax, eax
retn	4
sub_725AE0 endp

align 10h



sub_725B20 proc	near

arg_0= word ptr	 4

movzx	edx, [esp+arg_0]
mov	eax, edx
shr	eax, 8
push	esi
movzx	esi, ds:word_1434648[eax*2]
test	esi, esi
jnz	short loc_725B44
xor	eax, eax
xor	edx, edx
test	eax, eax
setnz	dl
mov	al, dl
pop	esi
retn

loc_725B44:
mov	eax, 1
cmp	esi, eax
jz	short loc_725B6C
mov	ecx, edx
shr	edx, 4
and	ecx, 0Fh
and	edx, 0Fh
shl	eax, cl
add	edx, esi
movzx	ecx, ds:word_1434648[edx*2]
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax

loc_725B6C:
xor	edx, edx
test	eax, eax
setnz	dl
mov	al, dl
pop	esi
retn
sub_725B20 endp

align 10h



sub_725B80 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax		; int
call	_isdigit
add	esp, 4
neg	eax
sbb	eax, eax
neg	eax
retn
sub_725B80 endp

align 10h



sub_725BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_725BE9
push	ebx
push	esi

loc_725BB2:
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
mov	edx, [esp+10h+arg_C]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
mov	eax, [ecx+ebx*4]
mov	ecx, [edx]
push	ecx
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_725BE1
or	edx, 0FFFFFFFFh
sub	edx, esi
lea	ebp, [ebx+1]
add	edi, edx
jmp	short loc_725BE3

loc_725BE1:
mov	edi, esi

loc_725BE3:
test	edi, edi
jg	short loc_725BB2
pop	esi
pop	ebx

loc_725BE9:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_725BA0 endp

align 10h



sub_725BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
mov	ebp, [esp+4+arg_8]
test	ebp, ebp
jnz	short loc_725BFD
xor	al, al
pop	ebp
retn

loc_725BFD:
push	esi
mov	esi, [esp+8+arg_4]
movzx	eax, word ptr [esi]
push	edi
xor	edi, edi
mov	ecx, 1
mov	[esp+0Ch+arg_8], ecx
cmp	ax, 2Dh
jnz	short loc_725C25
mov	[esp+0Ch+arg_8], 0FFFFFFFFh
mov	ecx, [esp+0Ch+arg_8]
jmp	short loc_725C2B

loc_725C25:
cmp	ax, 2Bh
jnz	short loc_725C2F

loc_725C2B:
add	esi, 2
dec	ebp

loc_725C2F:
push	ebx
xor	ebx, ebx
test	ebp, ebp
jbe	short loc_725C5C

loc_725C36:
movzx	eax, word ptr [esi]
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_725C6C
movzx	ecx, word ptr [esi]
inc	ebx
lea	eax, [edi+edi*4]
add	esi, 2
lea	edi, [ecx+eax*2-30h]
cmp	ebx, ebp
jb	short loc_725C36
mov	ecx, [esp+10h+arg_8]

loc_725C5C:
mov	edx, [esp+10h+arg_0]
imul	ecx, edi
pop	ebx
pop	edi
pop	esi
mov	[edx], ecx
mov	al, 1
pop	ebp
retn

loc_725C6C:
pop	ebx
pop	edi
pop	esi
xor	al, al
pop	ebp
retn
sub_725BF0 endp

align 10h


; Attributes: bp-based frame

sub_725C80 proc	near

var_1C=	dword ptr -1Ch
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_8]
sub	esp, 20h
push	esi
push	edi
test	eax, eax
jnz	short loc_725C9A

loc_725C92:
xor	al, al
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn

loc_725C9A:
mov	esi, [ebp+arg_4]
fldz
lea	edi, [esi+eax*2]
fst	[esp+28h+var_18]
movzx	eax, word ptr [esi]
fld1
fstp	[esp+28h+var_8]
cmp	ax, 2Dh
jnz	short loc_725CC1
fld	ds:dbl_15FCD60
fstp	[esp+28h+var_8]
jmp	short loc_725CC7

loc_725CC1:
cmp	ax, 2Bh
jnz	short loc_725CCA

loc_725CC7:
add	esi, 2

loc_725CCA:
cmp	esi, edi
jnb	loc_725D8C

loc_725CD2:
movzx	eax, word ptr [esi]
cmp	ax, 2Eh
jz	short loc_725D29
cmp	ax, 2Ch
jz	short loc_725D29
movzx	eax, ax
fstp	st
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_725C92
movzx	eax, word ptr [esi]
sub	eax, 30h
mov	[esp+28h+var_1C], eax
add	esi, 2
fild	[esp+28h+var_1C]
fld	[esp+28h+var_18]
fmul	ds:dbl_15FCE18
faddp	st(1), st
fst	[esp+28h+var_18]
cmp	esi, edi
jb	short loc_725CD2
fmul	[esp+28h+var_8]
mov	edx, [ebp+arg_0]
mov	al, 1
fstp	dword ptr [edx]
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn

loc_725D29:
cmp	esi, edi
jnb	short loc_725D8C
movzx	eax, word ptr [esi]
cmp	ax, 2Eh
jz	short loc_725D3C
cmp	ax, 2Ch
jnz	short loc_725D8C

loc_725D3C:
fldz
add	esi, 2
fst	[esp+28h+var_10]
cmp	esi, edi
jnb	short loc_725D8A
fstp	st(1)

loc_725D4B:
movzx	eax, word ptr [esi]
fstp	st
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	loc_725C92
movzx	ecx, word ptr [esi]
sub	ecx, 30h
mov	[esp+28h+var_1C], ecx
add	esi, 2
fild	[esp+28h+var_1C]
fadd	[esp+28h+var_10]
fmul	ds:dbl_15FCD18
fst	[esp+28h+var_10]
cmp	esi, edi
jb	short loc_725D4B
fld	[esp+28h+var_18]
fxch	st(1)

loc_725D8A:
faddp	st(1), st

loc_725D8C:
fmul	[esp+28h+var_8]
mov	edx, [ebp+arg_0]
pop	edi
mov	al, 1
fstp	dword ptr [edx]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_725C80 endp

align 10h



sub_725DA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+24h]
mov	eax, [esi+20h]
push	edi
mov	edi, [esp+8+arg_4]
add	ecx, edi
cmp	ecx, eax
jbe	short loc_725DE4
mov	edx, [esi+1Ch]
add	eax, edi
mov	[esi+20h], eax
add	eax, eax
test	edx, edx
jnz	short loc_725DD0
mov	ecx, [esi]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
jmp	short loc_725DE1

loc_725DD0:
mov	ecx, dword_1855FC0
push	ebx
mov	ebx, [ecx]
push	eax
push	edx
mov	edx, [ebx+2Ch]
call	edx
pop	ebx

loc_725DE1:
mov	[esi+1Ch], eax

loc_725DE4:
mov	ecx, [esp+8+arg_0]
mov	edx, [esi+24h]
lea	eax, [edi+edi]
push	eax
mov	eax, [esi+1Ch]
push	ecx
lea	ecx, [eax+edx*2]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	[esi+24h], edi
add	esp, 0Ch
pop	edi
pop	esi
retn	8
sub_725DA0 endp

align 10h



sub_725E10 proc	near

arg_0= word ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+24h]
mov	eax, [esi+20h]
add	ecx, 6
cmp	ecx, eax
jbe	short loc_725E51
mov	edx, [esi+1Ch]
add	eax, 6
mov	[esi+20h], eax
add	eax, eax
test	edx, edx
jnz	short loc_725E3D
mov	ecx, [esi]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
jmp	short loc_725E4E

loc_725E3D:
mov	ecx, dword_1855FC0
push	edi
mov	edi, [ecx]
push	eax
push	edx
mov	edx, [edi+2Ch]
call	edx
pop	edi

loc_725E4E:
mov	[esi+1Ch], eax

loc_725E51:
mov	eax, [esi+24h]
mov	ecx, [esi+1Ch]
mov	dx, [esp+4+arg_0]
mov	[ecx+eax*2], dx
inc	dword ptr [esi+24h]
pop	esi
retn	4
sub_725E10 endp

align 10h



sub_725E70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebp
mov	ebp, [esp+8+arg_8]
test	ebp, ebp
jz	short loc_725EF4
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
mov	edi, [esp+10h+arg_0]
mov	[esp+10h+var_4], ebp
mov	[esp+10h+arg_8], esi
push	ebx
lea	ecx, [ecx+0]

loc_725E90:
movzx	eax, word ptr [edi]
push	eax
call	sub_67B520
mov	ebx, eax
movsx	eax, byte ptr [esi]
push	eax
add	edi, 2
call	sub_67B520
add	esp, 8
inc	esi
sub	ebp, 1
mov	ecx, eax
jz	short loc_725EBF
test	ebx, ebx
jz	short loc_725EBF
cmp	ebx, ecx
jnz	short loc_725EEA
cmp	byte ptr [esi],	0
jnz	short loc_725E90

loc_725EBF:
cmp	ebx, ecx
jnz	short loc_725EEA
test	ebp, ebp
jnz	short loc_725ECC
cmp	byte ptr [esi],	0
jz	short loc_725EEA

loc_725ECC:
mov	eax, [esp+14h+arg_8]
lea	edx, [eax+1]

loc_725ED3:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_725ED3
pop	ebx
sub	eax, edx
pop	edi
mov	ecx, eax
mov	eax, [esp+0Ch+var_4]
pop	esi
sub	eax, ecx
pop	ebp
pop	ecx
retn

loc_725EEA:
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
sub	eax, ecx
pop	ebp
pop	ecx
retn

loc_725EF4:
mov	eax, [esp+8+arg_4]
lea	edx, [eax+1]
jmp	short loc_725F00
align 10h

loc_725F00:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_725F00
sub	eax, edx
neg	eax
pop	ebp
pop	ecx
retn
sub_725E70 endp

align 10h



sub_725F10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
sub	ebx, ebp
test	ebx, ebx
jle	short loc_725F5A
push	esi
push	edi

loc_725F22:
mov	eax, [esp+10h+arg_C]
mov	edx, [esp+10h+arg_0]
mov	esi, ebx
sar	esi, 1
push	eax
mov	eax, [edx]
lea	edi, [esi+ebp]
lea	ecx, [edi+edi*2]
lea	ecx, [eax+ecx*4]
push	ecx
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_725F52
or	edx, 0FFFFFFFFh
sub	edx, esi
lea	ebp, [edi+1]
add	ebx, edx
jmp	short loc_725F54

loc_725F52:
mov	ebx, esi

loc_725F54:
test	ebx, ebx
jg	short loc_725F22
pop	edi
pop	esi

loc_725F5A:
mov	eax, ebp
pop	ebp
pop	ebx
retn
sub_725F10 endp

align 10h



sub_725F60 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
xor	ebx, ebx
push	edi
lea	ecx, [esi+4]
mov	[esi], ebx
call	sub_67AC80
push	edi
lea	ecx, [esi+0Ch]
call	sub_67AC80
pop	edi
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+28h], bl
mov	dword ptr [esi+24h], 0FFFFFFFFh
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_725F60 endp

align 10h



sub_725FA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_8]
push	edi
mov	edi, ecx
cmp	esi, 0FFFFFFFFh
jnz	short loc_725FC8
xor	esi, esi
cmp	[ebx], si
jz	short loc_725FC8
lea	esp, [esp+0]

loc_725FC0:
inc	esi
cmp	word ptr [ebx+esi*2], 0
jnz	short loc_725FC0

loc_725FC8:
cmp	[edi+8], esi
jnb	short loc_726002
mov	eax, [edi]
test	eax, eax
jnz	short loc_725FE9
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax+1Ch]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
lea	eax, [esi+esi]
push	eax
call	edx
jmp	short loc_725FFD

loc_725FE9:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	ebp
lea	ebp, [esi+esi]
push	ebp
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebp

loc_725FFD:
mov	[edi], eax
mov	[edi+8], esi

loc_726002:
test	esi, esi
jbe	short loc_726016
mov	edx, [edi]
lea	ecx, [esi+esi]
push	ecx
push	ebx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_726016:
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_725FA0 endp

align 10h



sub_726020 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_8]
cmp	ecx, 0FFFFFFFFh
jz	short loc_726047
lea	eax, [ecx-1]
test	eax, eax
jl	short loc_726047

loc_726037:
cmp	word ptr [edx+eax*2], 0
jz	short loc_726045
sub	eax, 1
jns	short loc_726037
jmp	short loc_726047

loc_726045:
mov	ecx, eax

loc_726047:
mov	eax, [esp+4+arg_0]
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_725FA0
inc	word ptr [esi+24h]
pop	esi
retn	0Ch
sub_726020 endp

align 10h



sub_726060 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_72606F
inc	dword ptr [edi+4]

loc_72606F:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_72607B
call	sub_64A400

loc_72607B:
mov	[esi+18h], edi
pop	edi
pop	esi
retn	4
sub_726060 endp

align 10h



sub_726090 proc	near
mov	eax, [ecx+4]
test	eax, eax
jl	short loc_7260A1
mov	ecx, [ecx]
cmp	eax, [ecx+4]
jnb	short loc_7260A1
xor	eax, eax
retn

loc_7260A1:
mov	eax, 1
retn
sub_726090 endp

align 10h



sub_7260B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi]
mov	eax, [edi+4]
mov	[esi], ecx
mov	[esi+4], eax
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_7260CE
call	sub_64A420

loc_7260CE:
mov	edx, [edi+8]
pop	edi
mov	[esi+8], edx
mov	eax, esi
pop	esi
retn	4
sub_7260B0 endp

align 10h



sub_7260E0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_7260FE
call	sub_64A420

loc_7260FE:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_72610A
call	sub_64A430

loc_72610A:
mov	edx, [edi+8]
pop	edi
mov	[esi+8], edx
mov	eax, esi
pop	esi
retn	4
sub_7260E0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_729810

loc_726120:
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
test	eax, eax
jz	short loc_726131
inc	dword ptr [eax+4]

loc_726131:
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+8]
lea	eax, [edi+4]
push	ecx
push	eax
lea	ecx, [esi+4]
call	sub_67ACB0
mov	edx, [edi+10h]
lea	eax, [edi+0Ch]
push	edx
push	eax
lea	ecx, [esi+0Ch]
call	sub_67ACB0
mov	eax, [edi+14h]
mov	[esi+14h], eax
mov	ecx, [edi+18h]
mov	[esi+18h], ecx
mov	edx, [edi+1Ch]
mov	[esi+1Ch], edx
mov	eax, [edi+20h]
mov	[esi+20h], eax
mov	ecx, [edi+24h]
mov	[esi+24h], ecx
mov	dl, [edi+28h]
pop	edi
mov	[esi+28h], dl
mov	eax, esi
pop	esi
retn	4
; END OF FUNCTION CHUNK	FOR sub_729810



sub_726180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, ecx
mov	eax, [ebp+4]
mov	[esp+0Ch+var_4], ebp
test	eax, eax
jnz	short loc_726198
pop	ebp
add	esp, 8
retn	4

loc_726198:
push	ebx
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
lea	ebx, [eax-1]
xor	edx, edx
xor	edi, edi
mov	[esp+18h+var_8], edx
test	ebx, ebx
jbe	short loc_726207
mov	edi, edi

loc_7261B0:
cmp	ebx, 0FFFFFFFFh
jz	short loc_726207
mov	edx, [ebp+0]
lea	eax, [ebx+edi]
shr	eax, 1
lea	ecx, [eax+eax*2]
lea	edx, [edx+ecx*4]
mov	ecx, [edx]
cmp	esi, ecx
jl	short loc_7261E0
mov	ebp, [edx+4]
lea	ebp, [ecx+ebp-1]
cmp	esi, ebp
jle	loc_726270
cmp	esi, ecx
mov	ebp, [esp+18h+var_4]
jge	short loc_7261E4

loc_7261E0:
sub	ecx, esi
jmp	short loc_7261ED

loc_7261E4:
mov	edx, [edx+4]
sub	edx, esi
lea	ecx, [edx+ecx-1]

loc_7261ED:
test	ecx, ecx
jz	short loc_726270
jge	short loc_7261FC
mov	[esp+18h+var_8], edi
lea	edi, [eax+1]
jmp	short loc_7261FF

loc_7261FC:
lea	ebx, [eax-1]

loc_7261FF:
mov	edx, [esp+18h+var_8]
cmp	edi, ebx
jb	short loc_7261B0

loc_726207:
cmp	edi, ebx
jnz	short loc_72622E
mov	ecx, [ebp+0]
lea	eax, [edi+edi*2]
push	esi
lea	ecx, [ecx+eax*4]
call	sub_6C4400
test	eax, eax
jnz	short loc_72622A
mov	eax, edi
pop	edi
pop	esi
pop	ebx
pop	ebp
add	esp, 8
retn	4

loc_72622A:
mov	edx, [esp+18h+var_8]

loc_72622E:
cmp	edx, ebx
jnb	short loc_72626E
mov	ecx, [ebp+0]
lea	eax, [edx+edx*2+3]
lea	ecx, [ecx+eax*4]
lea	esp, [esp+0]

loc_726240:
mov	eax, [ecx]
cmp	esi, eax
jl	short loc_726255
mov	edi, [ecx+4]
lea	edi, [edi+eax-1]
cmp	esi, edi
jle	short loc_72626E
cmp	esi, eax
jge	short loc_726259

loc_726255:
sub	eax, esi
jmp	short loc_726262

loc_726259:
mov	edi, [ecx+4]
sub	edi, esi
lea	eax, [edi+eax-1]

loc_726262:
test	eax, eax
jge	short loc_72626E
inc	edx
add	ecx, 0Ch
cmp	edx, ebx
jb	short loc_726240

loc_72626E:
mov	eax, edx

loc_726270:
pop	edi
pop	esi
pop	ebx
pop	ebp
add	esp, 8
retn	4
sub_726180 endp

align 10h



sub_726280 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
mov	ebp, [esp+4+arg_8]
test	ebp, ebp
jnz	short loc_72628D
xor	al, al
pop	ebp
retn

loc_72628D:
push	ebx
push	esi
xor	esi, esi
xor	ebx, ebx
push	edi
mov	edi, [esp+10h+arg_4]
test	ebp, ebp
jbe	short loc_7262EA
lea	esp, [esp+0]

loc_7262A0:
movzx	eax, word ptr [edi]
push	eax		; int
call	_isxdigit
add	esp, 4
test	eax, eax
jz	short loc_7262F7
movzx	eax, word ptr [edi]
push	eax
shl	esi, 4
call	sub_67B520
movzx	eax, ax
lea	ecx, [eax-30h]
add	esp, 4
cmp	cx, 9
ja	short loc_7262D0
and	eax, 0Fh
jmp	short loc_7262E0

loc_7262D0:
lea	edx, [eax-61h]
cmp	dx, 5
ja	short loc_7262E2
dec	eax
and	eax, 0Fh
add	eax, 0Ah

loc_7262E0:
or	esi, eax

loc_7262E2:
inc	ebx
add	edi, 2
cmp	ebx, ebp
jb	short loc_7262A0

loc_7262EA:
mov	eax, [esp+10h+arg_0]
pop	edi
mov	[eax], esi
pop	esi
pop	ebx
mov	al, 1
pop	ebp
retn

loc_7262F7:
pop	edi
pop	esi
pop	ebx
xor	al, al
pop	ebp
retn
sub_726280 endp

align 10h



sub_726300 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [esi+8]
cmp	eax, ecx
jnb	loc_726551
push	edi
mov	edi, 26h
mov	[esi+4], eax
cmp	[eax], di
jnz	loc_7264DB
add	eax, 2
lea	edx, [eax+0Ah]
mov	[esi+0Ch], edi
mov	[esi+4], eax
cmp	edx, ecx
ja	short loc_7263A7
push	5
push	offset aQuot_2	; "quot;"
push	eax
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_726357
add	dword ptr [esi+4], 0Ah
mov	dword ptr [esi+0Ch], 22h
mov	eax, [esi+0Ch]
pop	edi
pop	esi
retn

loc_726357:
mov	eax, [esi+4]
push	5
push	offset aApos_2	; "apos;"
push	eax
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_72637F
add	dword ptr [esi+4], 0Ah
mov	dword ptr [esi+0Ch], 27h
mov	eax, [esi+0Ch]
pop	edi
pop	esi
retn

loc_72637F:
mov	ecx, [esi+4]
push	5
push	offset aNbsp_0	; "nbsp;"
push	ecx
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_7263A7
add	dword ptr [esi+4], 0Ah
mov	dword ptr [esi+0Ch], 0A0h
mov	eax, [esi+0Ch]
pop	edi
pop	esi
retn

loc_7263A7:
mov	eax, [esi+4]
lea	edx, [eax+8]
cmp	edx, [esi+8]
ja	short loc_7263D2
push	4
push	offset aAmp_2	; "amp;"
push	eax
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_7263D2
add	dword ptr [esi+4], 8
mov	[esi+0Ch], edi
mov	eax, edi
pop	edi
pop	esi
retn

loc_7263D2:
mov	eax, [esi+4]
lea	ecx, [eax+6]
cmp	ecx, [esi+8]
ja	short loc_72642A
push	3
push	offset aLt_2	; "lt;"
push	eax
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_726402
add	dword ptr [esi+4], 6
mov	dword ptr [esi+0Ch], 3Ch
mov	eax, [esi+0Ch]
pop	edi
pop	esi
retn

loc_726402:
mov	edx, [esi+4]
push	3
push	offset aGt_1	; "gt;"
push	edx
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_72642A
add	dword ptr [esi+4], 6
mov	dword ptr [esi+0Ch], 3Eh
mov	eax, [esi+0Ch]
pop	edi
pop	esi
retn

loc_72642A:
mov	eax, [esi+4]
lea	ecx, [eax+4]
push	ebp
cmp	ecx, [esi+8]
ja	loc_7264DA
cmp	word ptr [eax],	23h
jnz	loc_7264DA
mov	ebp, eax
add	eax, 2
xor	edx, edx
mov	[esi+4], eax
xor	edi, edi
cmp	word ptr [eax],	78h
setz	dl
mov	eax, edx
push	eax
call	sub_67B520
add	esp, 4
test	eax, eax
jz	short loc_7264E1
add	dword ptr [esi+4], 2
mov	eax, [esi+4]
cmp	eax, [esi+8]
jnb	loc_72653C

loc_726476:
movzx	ecx, word ptr [eax]
cmp	cx, 3Bh
jz	short loc_7264D2
movzx	eax, cx
push	eax		; int
call	_isxdigit
add	esp, 4
test	eax, eax
jz	short loc_7264D7
mov	eax, [esi+4]
movzx	eax, word ptr [eax]
push	eax
shl	edi, 4
call	sub_67B520
movzx	eax, ax
lea	ecx, [eax-30h]
add	esp, 4
cmp	cx, 9
ja	short loc_7264B2
and	eax, 0Fh
jmp	short loc_7264C2

loc_7264B2:
lea	edx, [eax-61h]
cmp	dx, 5
ja	short loc_7264C4
dec	eax
and	eax, 0Fh
add	eax, 0Ah

loc_7264C2:
or	edi, eax

loc_7264C4:
add	dword ptr [esi+4], 2
mov	eax, [esi+4]
mov	ecx, eax
cmp	ecx, [esi+8]
jb	short loc_726476

loc_7264D2:
cmp	edi, 0FFFFFFFFh
jnz	short loc_72653C

loc_7264D7:
mov	[esi+4], ebp

loc_7264DA:
pop	ebp

loc_7264DB:
mov	eax, [esi+0Ch]
pop	edi
pop	esi
retn

loc_7264E1:
mov	edx, [esi+4]
movzx	eax, word ptr [edx]
push	eax
call	sub_725B80
add	esp, 4
test	al, al
jz	short loc_7264D7
mov	ecx, [esi+4]
cmp	ecx, [esi+8]
jnb	short loc_726539
lea	esp, [esp+0]

loc_726500:
mov	edx, [esi+4]
movzx	eax, word ptr [edx]
cmp	ax, 3Bh
jz	short loc_726534
movzx	eax, ax
push	eax
call	sub_725B80
add	esp, 4
test	al, al
jz	short loc_7264D7
mov	eax, [esi+4]
movzx	edx, word ptr [eax]
add	eax, 2
lea	ecx, [edi+edi*4]
mov	[esi+4], eax
lea	edi, [edx+ecx*2-30h]
cmp	eax, [esi+8]
jb	short loc_726500

loc_726534:
cmp	edi, 0FFFFFFFFh
jz	short loc_7264D7

loc_726539:
mov	eax, [esi+4]

loc_72653C:
cmp	word ptr [eax],	3Bh
jnz	short loc_726548
add	eax, 2
mov	[esi+4], eax

loc_726548:
pop	ebp
mov	[esi+0Ch], edi
mov	eax, edi
pop	edi
pop	esi
retn

loc_726551:
xor	eax, eax
pop	esi
retn
sub_726300 endp

align 10h



sub_726560 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	eax, [esp+4+arg_C]
push	ebp
mov	ebp, [esp+8+arg_4]
test	ebp, ebp
jz	short loc_7265DA
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_8]
mov	[esp+10h+var_4], eax
mov	[esp+10h+arg_4], ebp
push	ebx

loc_726581:
movzx	eax, word ptr [esi]
push	eax
call	sub_67B520
mov	ebx, eax
movzx	eax, word ptr [edi]
push	eax
add	esi, 2
call	sub_67B520
add	esp, 8
add	edi, 2
sub	ebp, 1
mov	ecx, eax
jz	short loc_7265B4
test	ebx, ebx
jz	short loc_7265B4
cmp	ebx, ecx
jnz	short loc_7265D0
sub	[esp+14h+arg_C], 1
jnz	short loc_726581

loc_7265B4:
cmp	ebx, ecx
jnz	short loc_7265D0
test	ebp, ebp
jnz	short loc_7265C2
cmp	[esp+14h+arg_C], ebp
jz	short loc_7265D0

loc_7265C2:
mov	eax, [esp+14h+arg_4]
sub	eax, [esp+14h+var_4]
pop	ebx
pop	edi
pop	esi
pop	ebp
pop	ecx
retn

loc_7265D0:
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
sub	eax, ecx
pop	ebp
pop	ecx
retn

loc_7265DA:
neg	eax
pop	ebp
pop	ecx
retn
sub_726560 endp

align 10h



sub_7265E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [eax+4]
mov	edx, [esp+arg_0]
push	ecx
mov	ecx, [edx]
mov	edx, [eax]
push	ecx
push	edx
call	sub_725E70
add	esp, 0Ch
neg	eax
mov	eax, 0
sets	al
retn
sub_7265E0 endp

align 10h



sub_726610 proc	near
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_143ABD4
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
lea	ecx, [esi+20h]
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
call	sub_64E8E0
lea	ecx, [esi+38h]
mov	dword ptr [esi], offset	off_144020C
call	sub_67AB70
lea	ecx, [esi+3Ch]
call	sub_67AB70
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esi+4Ch], bl
mov	dword ptr [esi+48h], 0FFFFFFFFh
mov	eax, esi
pop	esi
pop	ebx
retn
sub_726610 endp

align 10h



sub_726670 proc	near
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+3Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_72669C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_72669C:
mov	esi, [edi+38h]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7266BD
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7266BD:
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_7266C9
call	sub_64A400

loc_7266C9:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_7266D5
call	sub_70E500

loc_7266D5:
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_64A3F0
sub_726670 endp

align 10h



sub_7266E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_726670
test	[esp+4+arg_0], 1
jz	short loc_7266FD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7266FD:
mov	eax, esi
pop	esi
retn	4
sub_7266E0 endp

align 10h



sub_726710 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
sub	esp, 18h
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+0Ch]
push	eax
test	ecx, ecx
jz	short loc_726755
lea	edx, [esp+24h+var_18]
push	edx
call	sub_700920
mov	ecx, [esp+20h+arg_0]
push	eax
call	sub_702870
lea	ecx, [esp+20h+var_18]
mov	esi, eax
mov	[esp+20h+var_18], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+20h+var_18]
call	sub_64A3F0
jmp	short loc_726760

loc_726755:
mov	ecx, [esp+24h+arg_0]
call	sub_702870
mov	esi, eax

loc_726760:
test	esi, esi
jz	short loc_726767
inc	dword ptr [esi+4]

loc_726767:
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_726773
call	sub_64A400

loc_726773:
mov	[edi+0Ch], esi
inc	word ptr [edi+24h]
test	esi, esi
jz	short loc_726785
mov	ecx, esi
call	sub_64A400

loc_726785:
pop	edi
pop	esi
add	esp, 18h
retn	8
sub_726710 endp

align 10h



sub_726790 proc	near
mov	edx, [ecx+10h]
lea	eax, [edx-1]
test	eax, eax
jl	short loc_7267A5
cmp	eax, edx
jge	short loc_7267A5
mov	ecx, [ecx+0Ch]
mov	eax, [ecx+eax*4]
retn

loc_7267A5:
xor	eax, eax
retn
sub_726790 endp

align 10h



sub_7267B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+10h]
push	offset sub_725970
lea	esi, [edi+0Ch]
lea	ecx, [esp+0Ch+arg_4]
push	ecx
push	eax
push	0
push	esi
call	sub_725BA0
add	esp, 14h
cmp	eax, [edi+10h]
jnb	short loc_726814
mov	edx, [esi]
mov	edi, [edx+eax*4]
mov	edx, [edi+1Ch]
mov	ecx, [esp+8+arg_4]
cmp	ecx, edx
jb	short loc_7267EE
mov	edi, [edi+4]
add	edi, edx
cmp	ecx, edi
jb	short loc_7267F2

loc_7267EE:
sub	edx, ecx
jnz	short loc_726814

loc_7267F2:
mov	edx, [esp+8+arg_8]
test	edx, edx
jz	short loc_726804
mov	edi, [esi]
mov	edi, [edi+eax*4]
sub	ecx, [edi+1Ch]
mov	[edx], ecx

loc_726804:
mov	ecx, [esp+8+arg_0]
pop	edi
mov	[ecx], esi
mov	[ecx+4], eax
mov	eax, ecx
pop	esi
retn	0Ch

loc_726814:
mov	eax, [esp+8+arg_0]
pop	edi
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_7267B0 endp

align 10h



sub_726830 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	edi
mov	edi, ecx
cmp	dword ptr [edi+10h], 0
jbe	short loc_726882
mov	eax, [edi+10h]
push	esi
push	offset sub_725970
lea	esi, [edi+0Ch]
lea	ecx, [esp+0Ch+arg_4]
push	ecx
push	eax
push	0
push	esi
call	sub_725BA0
add	esp, 14h
cmp	eax, [edi+10h]
jnz	short loc_72685C
dec	eax

loc_72685C:
mov	ecx, [esp+8+arg_8]
test	ecx, ecx
jz	short loc_726872
mov	edx, [esi]
mov	edx, [edx+eax*4]
mov	edi, [esp+8+arg_4]
sub	edi, [edx+1Ch]
mov	[ecx], edi

loc_726872:
mov	ecx, [esp+8+arg_0]
mov	[ecx], esi
pop	esi
mov	[ecx+4], eax
mov	eax, ecx
pop	edi
retn	0Ch

loc_726882:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0FFFFFFFFh
pop	edi
retn	0Ch
sub_726830 endp

align 10h



sub_7268A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+18h+arg_4]
push	edi
lea	eax, [esp+1Ch+arg_4]
push	eax
push	esi
lea	edx, [esp+24h+var_8]
push	edx
mov	[esp+28h+var_C], ecx
call	sub_7267B0
mov	ebp, [esp+1Ch+arg_8]
mov	edi, [esp+1Ch+arg_4]
mov	ebx, [esp+1Ch+var_4]
sub	ebp, esi
lea	ecx, [ecx+0]

loc_7268D0:
mov	edx, [esp+1Ch+var_8]
test	edx, edx
jz	short loc_72693D
test	ebx, ebx
jl	short loc_72693D
cmp	ebx, [edx+4]
jge	short loc_72693D
mov	eax, [edx]
mov	esi, [eax+ebx*4]
test	edi, edi
jnz	short loc_726902
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx+8]
push	ecx
push	eax
mov	ecx, esi
call	sub_726710
mov	edx, [esp+1Ch+var_8]

loc_726902:
test	ebp, ebp
jz	short loc_72693D
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_726928
mov	esi, [esi]
lea	ecx, [eax-1]
test	esi, esi
jz	short loc_72691F
cmp	ecx, eax
jnb	short loc_72691F
lea	ecx, [esi+ecx*2]
jmp	short loc_726921

loc_72691F:
xor	ecx, ecx

loc_726921:
cmp	word ptr [ecx],	0
jnz	short loc_726928
dec	eax

loc_726928:
cmp	ebp, eax
ja	short loc_72692F
lea	eax, [edi+ebp]

loc_72692F:
sub	edi, eax
add	ebp, edi
xor	edi, edi
cmp	ebx, [edx+4]
jge	short loc_7268D0
inc	ebx
jmp	short loc_7268D0

loc_72693D:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_7268A0 endp

align 10h



sub_726950 proc	near
push	ebx
push	esi
push	edi
xor	eax, eax
lea	ebx, [ecx+0Ch]
xor	edi, edi
lea	ebx, [ebx+0]

loc_726960:
test	ebx, ebx
jz	short loc_726999
test	edi, edi
jl	short loc_726999
cmp	edi, [ebx+4]
jge	short loc_726999
mov	ecx, [ebx]
mov	edx, [ecx+edi*4]
mov	ecx, [edx+4]
test	ecx, ecx
jbe	short loc_726994
mov	edx, [edx]
lea	esi, [ecx-1]
test	edx, edx
jz	short loc_72698B
cmp	esi, ecx
jnb	short loc_72698B
lea	edx, [edx+esi*2]
jmp	short loc_72698D

loc_72698B:
xor	edx, edx

loc_72698D:
cmp	word ptr [edx],	0
jnz	short loc_726994
dec	ecx

loc_726994:
add	eax, ecx
inc	edi
jmp	short loc_726960

loc_726999:
pop	edi
pop	esi
pop	ebx
retn
sub_726950 endp

align 10h



sub_7269A0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
push	edi
mov	ecx, ebx
call	sub_679E30
lea	edi, [esi+0Ch]
xor	esi, esi

loc_7269B5:
test	edi, edi
jz	short loc_7269FA
test	esi, esi
jl	short loc_7269FA
cmp	esi, [edi+4]
jge	short loc_7269FA
mov	eax, [edi]
mov	eax, [eax+esi*4]
mov	ecx, [eax]
mov	eax, [eax+4]
test	eax, eax
jbe	short loc_7269E9
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_7269E0
cmp	edx, eax
jnb	short loc_7269E0
lea	edx, [ecx+edx*2]
jmp	short loc_7269E2

loc_7269E0:
xor	edx, edx

loc_7269E2:
cmp	word ptr [edx],	0
jnz	short loc_7269E9
dec	eax

loc_7269E9:
push	eax
push	ecx
mov	ecx, ebx
call	sub_67A000
cmp	esi, [edi+4]
jge	short loc_7269B5
inc	esi
jmp	short loc_7269B5

loc_7269FA:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	4
sub_7269A0 endp

align 10h



sub_726A10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_726950
mov	ecx, [esp+10h+arg_0]
inc	eax
push	eax
call	sub_730DA0
xor	edi, edi
lea	ebx, [esi+0Ch]
xor	ebp, ebp
lea	ecx, [ecx+0]

loc_726A30:
test	ebx, ebx
jz	short loc_726A85
test	edi, edi
jl	short loc_726A85
cmp	edi, [ebx+4]
jge	short loc_726A85
mov	eax, [ebx]
mov	eax, [eax+edi*4]
mov	esi, [eax+4]
mov	ecx, [eax]
test	esi, esi
jbe	short loc_726A64
lea	eax, [esi-1]
test	ecx, ecx
jz	short loc_726A5B
cmp	eax, esi
jnb	short loc_726A5B
lea	eax, [ecx+eax*2]
jmp	short loc_726A5D

loc_726A5B:
xor	eax, eax

loc_726A5D:
cmp	word ptr [eax],	0
jnz	short loc_726A64
dec	esi

loc_726A64:
mov	eax, [esp+10h+arg_0]
lea	edx, [esi+esi]
push	edx
push	ecx
mov	ecx, [eax]
lea	edx, [ecx+ebp*2]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	ebp, esi
cmp	edi, [ebx+4]
jge	short loc_726A30
inc	edi
jmp	short loc_726A30

loc_726A85:
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
pop	edi
xor	edx, edx
pop	esi
mov	[ecx+ebp*2], dx
pop	ebp
pop	ebx
retn	4
sub_726A10 endp

align 10h



sub_726AA0 proc	near
cmp	byte ptr [ecx+10h], 0
mov	eax, [ecx+4]
mov	[ecx], eax
jz	short loc_726AB6
cmp	word ptr [eax],	26h
jnz	short loc_726AB6
jmp	sub_726300

loc_726AB6:
cmp	eax, [ecx+8]
jnb	short locret_726AC7
movzx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+0Ch], edx
mov	[ecx+4], eax

locret_726AC7:
retn
sub_726AA0 endp

align 10h



sub_726AD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_726B00
mov	eax, [edi]
test	eax, eax
jz	short loc_726AF5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_726AF5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_726B00:
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_726B31
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	ebx
mov	ebx, esi
imul	ebx, 2Ch
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_726B31:
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
imul	eax, 2Ch
push	eax
mov	[esp+10h+arg_4], 2
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_726AD0 endp

align 10h



sub_726B60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	ecx, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_C]
push	offset sub_7265E0
lea	edx, [esp+10h+var_8]
push	edx
push	esi
mov	[esp+18h+var_8], eax
lea	eax, [esp+18h+arg_8]
push	0
push	eax
mov	[esp+20h+var_4], ecx
call	sub_725F10
add	esp, 14h
cmp	eax, esi
jnb	short loc_726BC0
mov	edx, [esp+0Ch+arg_8]
lea	ecx, [eax+eax*2]
mov	eax, [esp+0Ch+var_4]
lea	esi, [edx+ecx*4]
mov	ecx, [esi]
mov	edx, [esp+0Ch+var_8]
push	eax
push	ecx
push	edx
call	sub_725E70
add	esp, 0Ch
neg	eax
jnz	short loc_726BC0
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_726BC0:
xor	eax, eax
pop	esi
add	esp, 8
retn
sub_726B60 endp

align 10h



sub_726BD0 proc	near
push	ecx
push	edi
mov	edi, ecx
cmp	dword ptr [edi+4], 2
jnz	loc_726C82
mov	eax, [edi+8]
cmp	eax, [edi+10h]
push	esi
lea	esi, [edi+8]
jnb	loc_726C81
push	ebx
nop

loc_726BF0:
mov	eax, [edi+14h]
cmp	eax, 3Dh
jz	loc_726C80
cmp	eax, 3Eh
jz	short loc_726C80
cmp	eax, 3Ch
jz	short loc_726C80
cmp	eax, 2Fh
jz	short loc_726C80
movzx	eax, ax
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434648[ecx*2]
test	edx, edx
jz	short loc_726C4A
cmp	edx, 1
jz	short loc_726C80
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1434648[eax*2]
mov	ebx, 1
shl	ebx, cl
and	ebx, edx
neg	ebx
sbb	ebx, ebx
neg	ebx
jnz	short loc_726C80

loc_726C4A:
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_726C64
cmp	word ptr [eax],	26h
jnz	short loc_726C64
mov	ecx, esi
call	sub_726300
jmp	short loc_726C75

loc_726C64:
cmp	eax, [esi+8]
jnb	short loc_726C75
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_726C75:
mov	edx, [esi]
cmp	edx, [esi+8]
jb	loc_726BF0

loc_726C80:
pop	ebx

loc_726C81:
pop	esi

loc_726C82:
pop	edi
pop	ecx
retn
sub_726BD0 endp

align 10h



sub_726C90 proc	near
push	ecx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	esi, [edi+8]
jnb	short loc_726D14
push	ebx

loc_726CA1:
movzx	eax, word ptr [edi+14h]
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434648[ecx*2]
test	edx, edx
jz	short loc_726D13
cmp	edx, 1
jz	short loc_726CE1
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1434648[eax*2]
mov	ebx, 1
shl	ebx, cl
and	ebx, edx
neg	ebx
sbb	ebx, ebx
neg	ebx
jz	short loc_726D13

loc_726CE1:
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_726CFB
cmp	word ptr [eax],	26h
jnz	short loc_726CFB
mov	ecx, esi
call	sub_726300
jmp	short loc_726D0C

loc_726CFB:
cmp	eax, [esi+8]
jnb	short loc_726D0C
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_726D0C:
mov	edx, [esi]
cmp	edx, [esi+8]
jb	short loc_726CA1

loc_726D13:
pop	ebx

loc_726D14:
pop	edi
pop	esi
pop	ecx
retn
sub_726C90 endp

align 10h



sub_726D20 proc	near
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
cmp	[edi+14h], esi
jz	short loc_726D86
jmp	short loc_726D30
align 10h

loc_726D30:
cmp	esi, 3
jz	short loc_726D86
cmp	byte ptr [edi+18h], 0
mov	eax, [edi+0Ch]
lea	ecx, [edi+8]
mov	[ecx], eax
jz	short loc_726D50
cmp	word ptr [eax],	26h
jnz	short loc_726D50
call	sub_726300
jmp	short loc_726D61

loc_726D50:
cmp	eax, [ecx+8]
jnb	short loc_726D61
movzx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+0Ch], edx
mov	[ecx+4], eax

loc_726D61:
mov	eax, [edi+14h]
cmp	eax, 2Dh
jnz	short loc_726D71
cmp	esi, 2
jge	short loc_726D82
inc	esi
jmp	short loc_726D82

loc_726D71:
cmp	eax, 3Eh
jnz	short loc_726D80
cmp	esi, 2
jnz	short loc_726D82
lea	esi, [eax-3Bh]
jmp	short loc_726D82

loc_726D80:
xor	esi, esi

loc_726D82:
test	eax, eax
jnz	short loc_726D30

loc_726D86:
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	ecx, [edi+8]
jnb	short loc_726DBF
cmp	esi, 3
jnz	short loc_726DBF
cmp	byte ptr [ecx+10h], 0
mov	eax, [ecx+4]
mov	[ecx], eax
jz	short loc_726DAE
cmp	word ptr [eax],	26h
jnz	short loc_726DAE
pop	edi
pop	esi
jmp	sub_726300

loc_726DAE:
cmp	eax, [ecx+8]
jnb	short loc_726DBF
movzx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+0Ch], edx
mov	[ecx+4], eax

loc_726DBF:
pop	edi
pop	esi
retn
sub_726D20 endp

align 10h



sub_726DD0 proc	near
push	ecx
push	ebx
push	esi
push	edi
mov	edi, ecx
cmp	dword ptr [edi+4], 7
jnz	loc_726EB7
call	sub_726C90
mov	eax, [edi+8]
cmp	eax, [edi+10h]
lea	esi, [edi+8]
jnb	short loc_726E6B
push	ebp

loc_726DF1:
mov	ebx, [edi+14h]
movzx	eax, bx
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1433548[ecx*2]
test	edx, edx
jz	short loc_726E6A
cmp	edx, 1
jz	short loc_726E33
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1433548[eax*2]
mov	ebp, 1
shl	ebp, cl
and	ebp, edx
neg	ebp
sbb	ebp, ebp
neg	ebp
jz	short loc_726E6A

loc_726E33:
cmp	ebx, 3Dh
jz	short loc_726E6A
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_726E52
cmp	word ptr [eax],	26h
jnz	short loc_726E52
mov	ecx, esi
call	sub_726300
jmp	short loc_726E63

loc_726E52:
cmp	eax, [esi+8]
jnb	short loc_726E63
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_726E63:
mov	edx, [esi]
cmp	edx, [esi+8]
jb	short loc_726DF1

loc_726E6A:
pop	ebp

loc_726E6B:
mov	eax, [esi]
cmp	eax, [esi+8]
jb	short loc_726E7E

loc_726E72:
mov	dword ptr [edi+4], 1
pop	edi
pop	esi
pop	ebx
pop	ecx
retn

loc_726E7E:
mov	eax, [edi+14h]
cmp	eax, 3Dh
jnz	short loc_726E9D
mov	ecx, esi
call	sub_726AA0
mov	ecx, edi
call	sub_726C90
mov	dword ptr [edi+4], 8
jmp	short loc_726EB7

loc_726E9D:
cmp	eax, 2Fh
jz	short loc_726EB0
cmp	eax, 3Eh
jz	short loc_726EB0
mov	dword ptr [edi+4], 1
jmp	short loc_726EB7

loc_726EB0:
mov	dword ptr [edi+4], 9

loc_726EB7:
cmp	dword ptr [edi+4], 8
jnz	loc_726F65
mov	ebx, [edi+14h]
cmp	ebx, 22h
jz	short loc_726ECE
cmp	ebx, 27h
jnz	short loc_726E72

loc_726ECE:
lea	esi, [edi+8]

loc_726ED1:
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_726EEB
cmp	word ptr [eax],	26h
jnz	short loc_726EEB
mov	ecx, esi
call	sub_726300
jmp	short loc_726EFC

loc_726EEB:
cmp	eax, [esi+8]
jnb	short loc_726EFC
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_726EFC:
mov	edx, [esi]
cmp	edx, [esi+8]
jnb	short loc_726F08
cmp	[edi+14h], ebx
jnz	short loc_726ED1

loc_726F08:
mov	eax, edx
cmp	eax, [esi+8]
jnb	loc_726E72
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_726F2D
cmp	word ptr [eax],	26h
jnz	short loc_726F2D
mov	ecx, esi
call	sub_726300
jmp	short loc_726F3E

loc_726F2D:
cmp	eax, [esi+8]
jnb	short loc_726F3E
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_726F3E:
mov	ecx, edi
call	sub_726C90
mov	eax, [edi+14h]
cmp	eax, 3Eh
jz	short loc_726F5E
cmp	eax, 2Fh
jz	short loc_726F5E
mov	dword ptr [edi+4], 7
pop	edi
pop	esi
pop	ebx
pop	ecx
retn

loc_726F5E:
mov	dword ptr [edi+4], 9

loc_726F65:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_726DD0 endp

align 10h



sub_726F70 proc	near

var_5= byte ptr	-5
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_4]
push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	ecx, [esp+14h+arg_0]
push	edi
lea	edi, [esi+8]
mov	[ecx], eax
mov	dword ptr [ebp+0], 0
mov	edx, [edi]
xor	bl, bl
mov	[esp+18h+var_5], bl
cmp	edx, [edi+8]
jnb	loc_727109

loc_726FA1:
mov	eax, [esi+14h]
cmp	eax, 3Dh
jz	loc_7270F6
cmp	eax, 3Eh
jz	loc_7270F6
cmp	eax, 3Ch
jz	loc_7270F6
cmp	eax, 2Fh
jz	loc_7270F6
movzx	eax, ax
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434648[ecx*2]
test	edx, edx
jz	short loc_727013
cmp	edx, 1
jz	loc_7270F6
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1434648[eax*2]
mov	ebp, 1
shl	ebp, cl
and	ebp, edx
neg	ebp
sbb	ebp, ebp
neg	ebp
mov	ebp, [esp+18h+arg_4]
jnz	loc_7270F6

loc_727013:
cmp	byte ptr [edi+10h], 0
jz	loc_72709E
mov	eax, [edi]
cmp	word ptr [eax],	26h
jnz	short loc_72709E
test	bl, bl
jnz	short loc_727048
mov	edx, [esp+18h+arg_0]
mov	dword ptr [esi+24h], 0
mov	ecx, [ebp+0]
mov	eax, [edx]
push	ecx
push	eax
mov	ecx, esi
call	sub_725DA0
mov	bl, 1
mov	[esp+18h+var_5], bl

loc_727048:
mov	ecx, [esi+24h]
mov	eax, [esi+20h]
mov	ebp, [esi+14h]
add	ecx, 6
cmp	ecx, eax
jbe	short loc_72708B
mov	edx, [esi+1Ch]
add	eax, 6
mov	[esi+20h], eax
add	eax, eax
test	edx, edx
jnz	short loc_727075
mov	ecx, [esi]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
jmp	short loc_727088

loc_727075:
mov	ecx, dword_1855FC0
mov	ebx, [ecx]
push	eax
push	edx
mov	edx, [ebx+2Ch]
call	edx
mov	bl, [esp+18h+var_5]

loc_727088:
mov	[esi+1Ch], eax

loc_72708B:
mov	eax, [esi+24h]
mov	ecx, [esi+1Ch]
mov	[ecx+eax*2], bp
inc	dword ptr [esi+24h]
mov	ebp, [esp+18h+arg_4]
jmp	short loc_7270C0

loc_72709E:
test	bl, bl
jz	short loc_7270B6
mov	edx, [edi+4]
sub	edx, [edi]
mov	eax, [edi]
sar	edx, 1
push	edx
push	eax
mov	ecx, esi
call	sub_725DA0
jmp	short loc_7270C0

loc_7270B6:
mov	ecx, [edi+4]
sub	ecx, [edi]
sar	ecx, 1
add	[ebp+0], ecx

loc_7270C0:
cmp	byte ptr [edi+10h], 0
mov	eax, [edi+4]
mov	[edi], eax
jz	short loc_7270DA
cmp	word ptr [eax],	26h
jnz	short loc_7270DA
mov	ecx, edi
call	sub_726300
jmp	short loc_7270EB

loc_7270DA:
cmp	eax, [edi+8]
jnb	short loc_7270EB
movzx	edx, word ptr [eax]
add	eax, 2
mov	[edi+0Ch], edx
mov	[edi+4], eax

loc_7270EB:
mov	eax, [edi]
cmp	eax, [edi+8]
jb	loc_726FA1

loc_7270F6:
test	bl, bl
jz	short loc_727109
mov	ecx, [esi+1Ch]
mov	edx, [esp+18h+arg_0]
mov	[edx], ecx
mov	eax, [esi+24h]
mov	[ebp+0], eax

loc_727109:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_726F70 endp

align 10h



sub_727120 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
xor	esi, esi
mov	[eax], esi
mov	[eax+4], esi
mov	[eax+8], esi
mov	[eax+0Ch], esi
lea	edx, [ecx+10h]
mov	[eax+10h], edx
mov	[eax+18h], esi
mov	[eax+14h], edx
mov	[eax+20h], esi
mov	[eax+1Ch], ecx
pop	esi
retn	4
sub_727120 endp

align 10h



sub_727150 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
push	esi
mov	esi, ecx
xor	ebp, ebp
push	edi
mov	edi, [esp+10h+arg_0]
mov	[esi], ebp
mov	[esi+4], ebp
mov	[esi+8], ebp
mov	[esi+0Ch], ebp
push	ebx
mov	ecx, edi
mov	[esi+10h], edi
call	sub_726180
cmp	eax, ebp
mov	[esi+14h], edi
mov	[esi+18h], ebp
jge	short loc_727185
mov	[esi+18h], ebp
jmp	short loc_727195

loc_727185:
mov	edi, [edi+4]
cmp	eax, edi
jb	short loc_727192
dec	edi
mov	[esi+18h], edi
jmp	short loc_727195

loc_727192:
mov	[esi+18h], eax

loc_727195:
mov	eax, [esp+10h+arg_4]
mov	[esi+1Ch], eax
mov	[esi+20h], ebp
mov	eax, [esi+18h]
cmp	eax, ebp
jl	short loc_727224
mov	ecx, [esi+14h]
cmp	eax, [ecx+4]
jnb	short loc_727224
lea	edx, [eax+eax*2]
mov	eax, ecx
mov	ecx, [eax]
lea	eax, [ecx+edx*4]
mov	ecx, [eax]
cmp	ebx, ecx
jl	short loc_7271C9
mov	edx, [eax+4]
lea	eax, [edx+ecx-1]
cmp	ebx, eax
jle	short loc_727213

loc_7271C9:
mov	eax, [esi+18h]
mov	edx, [esi+14h]
lea	ecx, [eax+eax*2]
mov	eax, [edx]
cmp	ebx, [eax+ecx*4]
jle	short loc_727224
mov	eax, [esi+18h]
lea	ecx, [eax+eax*2]
mov	eax, [edx]
mov	eax, [eax+ecx*4]
mov	[esi+20h], eax
mov	ecx, [esi+18h]
mov	edx, [esi+14h]
mov	edx, [edx]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edx+ecx*4+4]
add	ecx, eax
mov	[esi+20h], ecx
mov	eax, [esi+18h]
mov	edx, [esi+14h]
cmp	eax, [edx+4]
jge	short loc_727224
inc	eax
pop	edi
mov	[esi+18h], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_727213:
mov	eax, [esi+18h]
mov	ecx, [esi+14h]
mov	edx, [ecx]
lea	eax, [eax+eax*2]
mov	eax, [edx+eax*4]
mov	[esi+20h], eax

loc_727224:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_727150 endp

align 10h



sub_727230 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+18h]
test	eax, eax
jl	short loc_72729E
mov	ecx, [esi+14h]
cmp	eax, [ecx+4]
jnb	short loc_72729E
lea	edx, [eax+eax*2]
mov	eax, ecx
mov	ecx, [eax]
mov	eax, [ecx+edx*4]
lea	edx, [ecx+edx*4]
mov	ecx, [esi+20h]
cmp	ecx, eax
jnb	short loc_727268
mov	edx, [esi+1Ch]
mov	edx, [edx]
sub	eax, ecx
lea	edx, [edx+ecx*2]
mov	[esi+4], ecx
mov	[esi+8], eax
jmp	short loc_7272B4

loc_727268:
mov	ecx, [esi+1Ch]
mov	ecx, [ecx]
push	edi
mov	edi, [edx+8]
mov	edx, [edx+4]
lea	ecx, [ecx+eax*2]
mov	[esi], ecx
mov	[esi+4], eax
mov	[esi+8], edx
test	edi, edi
jz	short loc_72728A
mov	ecx, edi
call	sub_64A420

loc_72728A:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_727296
call	sub_64A430

loc_727296:
mov	[esi+0Ch], edi
pop	edi
mov	eax, esi
pop	esi
retn

loc_72729E:
mov	edx, [esi+1Ch]
mov	ecx, [edx+4]
mov	eax, [esi+20h]
mov	edx, [edx]
sub	ecx, eax
lea	edx, [edx+eax*2]
mov	[esi+4], eax
mov	[esi+8], ecx

loc_7272B4:
mov	[esi], edx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_7272C2
call	sub_64A430

loc_7272C2:
mov	dword ptr [esi+0Ch], 0
mov	eax, esi
pop	esi
retn
sub_727230 endp

align 10h



sub_7272D0 proc	near
mov	eax, [ecx+18h]
test	eax, eax
jl	short loc_72730F
mov	edx, [ecx+14h]
cmp	eax, [edx+4]
jnb	short loc_72730F
mov	edx, [edx]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	edx, [ecx+20h]
push	esi
mov	esi, [eax]
cmp	edx, esi
jnb	short loc_7272F6
mov	[ecx+20h], esi

loc_7272F4:
pop	esi
retn

loc_7272F6:
mov	eax, [eax+4]
add	eax, edx
mov	[ecx+20h], eax
mov	eax, [ecx+18h]
mov	edx, [ecx+14h]
cmp	eax, [edx+4]
jge	short loc_7272F4
inc	eax
mov	[ecx+18h], eax
pop	esi
retn

loc_72730F:
mov	eax, [ecx+1Ch]
mov	edx, [eax+4]
mov	[ecx+20h], edx
retn
sub_7272D0 endp

align 10h



sub_727320 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	ecx, [eax+4]
jnb	short loc_727394
push	edi
mov	edi, [esp+8+arg_0]

loc_727333:
mov	ecx, esi
call	sub_727230
cmp	[eax+4], edi
jge	short loc_727393
mov	eax, [esi+18h]
test	eax, eax
jl	short loc_72737F
mov	edx, [esi+14h]
cmp	eax, [edx+4]
jnb	short loc_72737F
mov	ecx, edx
mov	edx, [ecx]
mov	ecx, [esi+20h]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	edx, [eax]
cmp	ecx, edx
jnb	short loc_727366
mov	[esi+20h], edx
jmp	short loc_727388

loc_727366:
mov	eax, [eax+4]
add	eax, ecx
mov	[esi+20h], eax
mov	eax, [esi+18h]
mov	ecx, [esi+14h]
cmp	eax, [ecx+4]
jge	short loc_727388
inc	eax
mov	[esi+18h], eax
jmp	short loc_727388

loc_72737F:
mov	edx, [esi+1Ch]
mov	eax, [edx+4]
mov	[esi+20h], eax

loc_727388:
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
cmp	edx, [ecx+4]
jb	short loc_727333

loc_727393:
pop	edi

loc_727394:
pop	esi
retn	4
sub_727320 endp

align 10h



sub_7273A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
push	edi
lea	edi, [ebp+10h]
xor	eax, eax
push	ebx
mov	ecx, edi
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	[esi+8], ax
mov	[esi+0Ch], edi
call	sub_726180
xor	ecx, ecx
cmp	eax, ecx
mov	[esi+10h], edi
mov	[esi+14h], ecx
jge	short loc_7273E0
mov	[esi+14h], ecx
jmp	short loc_7273F0

loc_7273E0:
mov	edi, [edi+4]
cmp	eax, edi
jb	short loc_7273ED
dec	edi
mov	[esi+14h], edi
jmp	short loc_7273F0

loc_7273ED:
mov	[esi+14h], eax

loc_7273F0:
mov	[esi+18h], ebp
mov	[esi+1Ch], ebx
mov	eax, [esi+14h]
cmp	eax, ecx
jl	short loc_72743E
mov	ecx, [esi+10h]
cmp	eax, [ecx+4]
jnb	short loc_72743E
lea	edx, [eax+eax*2]
mov	eax, ecx
mov	ecx, [eax]
lea	eax, [ecx+edx*4]
mov	ecx, [eax]
cmp	ebx, ecx
jl	short loc_727420
mov	edx, [eax+4]
lea	eax, [edx+ecx-1]
cmp	ebx, eax
jle	short loc_72743E

loc_727420:
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, [eax+eax*2]
mov	eax, [edx]
cmp	ebx, [eax+ecx*4]
jle	short loc_72743E
mov	eax, [esi+14h]
mov	ecx, edx
cmp	eax, [ecx+4]
jge	short loc_72743E
inc	eax
mov	[esi+14h], eax

loc_72743E:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_7273A0 endp

align 10h



sub_727450 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_7274C3
mov	eax, [esi+1Ch]
cmp	eax, [ecx+4]
jnb	short loc_7274C3
mov	ecx, [ecx]
mov	dx, [ecx+eax*2]
mov	[esi+8], dx
mov	[esi+4], eax
mov	ecx, [esi+14h]
test	ecx, ecx
jl	short loc_7274CF
mov	edx, [esi+10h]
cmp	ecx, [edx+4]
jnb	short loc_7274CF
mov	edx, [edx]
lea	ecx, [ecx+ecx*2]
cmp	eax, [edx+ecx*4]
push	edi
lea	edi, [edx+ecx*4]
jnb	short loc_7274A2
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_727497
call	sub_64A430

loc_727497:
pop	edi
mov	dword ptr [esi], 0
mov	eax, esi
pop	esi
retn

loc_7274A2:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_7274AE
call	sub_64A420

loc_7274AE:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7274B9
call	sub_64A430

loc_7274B9:
mov	eax, [edi+8]
mov	[esi], eax
pop	edi
mov	eax, esi
pop	esi
retn

loc_7274C3:
mov	edx, [esi+1Ch]
xor	ecx, ecx
mov	[esi+8], cx
mov	[esi+4], edx

loc_7274CF:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7274DA
call	sub_64A430

loc_7274DA:
mov	dword ptr [esi], 0
mov	eax, esi
pop	esi
retn
sub_727450 endp

align 10h



sub_7274F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jbe	short locret_727551
push	esi
push	edi
mov	esi, eax
lea	esp, [esp+0]

loc_727500:
mov	edx, [ecx+18h]
test	edx, edx
jz	short loc_727544
mov	eax, [ecx+1Ch]
cmp	eax, [edx+4]
jnb	short loc_727544
inc	eax
mov	[ecx+1Ch], eax
mov	edx, [ecx+14h]
test	edx, edx
jl	short loc_72754A
mov	edi, [ecx+10h]
cmp	edx, [edi+4]
jnb	short loc_72754A
mov	edi, [edi]
lea	edx, [edx+edx*2]
lea	edx, [edi+edx*4]
mov	edi, [edx+4]
add	edi, [edx]
cmp	eax, edi
jb	short loc_72754A
mov	eax, [ecx+14h]
mov	edx, [ecx+10h]
cmp	eax, [edx+4]
jge	short loc_72754A
inc	eax
mov	[ecx+14h], eax
jmp	short loc_72754A

loc_727544:
mov	eax, [edx+4]
mov	[ecx+1Ch], eax

loc_72754A:
sub	esi, 1
jnz	short loc_727500
pop	edi
pop	esi

locret_727551:
retn	4
sub_7274F0 endp

align 10h



sub_727560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	ebx, ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_727577
call	sub_726950

loc_727577:
mov	edi, [esp+18h+arg_4]
mov	ecx, [esp+18h+arg_0]
sub	eax, edi
mov	esi, eax
lea	eax, [esi+1]
push	eax
call	sub_730DA0
lea	ecx, [esp+18h+arg_4]
push	ecx
push	edi
lea	edx, [esp+20h+var_8]
push	edx
mov	ecx, ebx
mov	[esp+24h+arg_4], 0
mov	ebp, esi
call	sub_7267B0
mov	ebx, [esp+18h+arg_4]
mov	edi, [esp+18h+var_4]
mov	[esp+18h+arg_8], 0

loc_7275B8:
mov	eax, [esp+18h+var_8]
test	eax, eax
jz	short loc_727630
test	edi, edi
jl	short loc_727630
cmp	edi, [eax+4]
jge	short loc_727630
test	ebp, ebp
jbe	short loc_727630
mov	eax, [eax]
mov	eax, [eax+edi*4]
mov	esi, [eax+4]
test	esi, esi
jbe	short loc_7275F4
mov	ecx, [eax]
lea	edx, [esi-1]
test	ecx, ecx
jz	short loc_7275EB
cmp	edx, esi
jnb	short loc_7275EB
lea	ecx, [ecx+edx*2]
jmp	short loc_7275ED

loc_7275EB:
xor	ecx, ecx

loc_7275ED:
cmp	word ptr [ecx],	0
jnz	short loc_7275F4
dec	esi

loc_7275F4:
sub	esi, ebx
cmp	esi, ebp
jbe	short loc_7275FC
mov	esi, ebp

loc_7275FC:
mov	edx, [eax]
lea	ecx, [esi+esi]
push	ecx
mov	ecx, [esp+1Ch+arg_0]
lea	eax, [edx+ebx*2]
mov	edx, [ecx]
push	eax
mov	eax, [esp+20h+arg_8]
lea	ecx, [edx+eax*2]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+24h+var_8]
add	[esp+24h+arg_8], esi
add	esp, 0Ch
xor	ebx, ebx
sub	ebp, esi
cmp	edi, [edx+4]
jge	short loc_7275B8
inc	edi
jmp	short loc_7275B8

loc_727630:
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax]
mov	eax, [esp+18h+arg_8]
pop	edi
pop	esi
xor	edx, edx
pop	ebp
mov	[ecx+eax*2], dx
pop	ebx
add	esp, 8
retn	0Ch
sub_727560 endp

align 10h



sub_727650 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	edi
mov	edi, [esp+4+arg_0]
test	eax, eax
jbe	short loc_727692
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_8]
mov	ebx, eax

loc_727665:
test	edi, edi
jz	short loc_727685
mov	ecx, [esi]
mov	eax, [esi+4]
mov	[edi], ecx
mov	[edi+4], eax
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_72767F
call	sub_64A420

loc_72767F:
mov	edx, [esi+8]
mov	[edi+8], edx

loc_727685:
add	esi, 0Ch
add	edi, 0Ch
sub	ebx, 1
jnz	short loc_727665
pop	esi
pop	ebx

loc_727692:
pop	edi
retn
sub_727650 endp

align 10h



sub_7276A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+4]
test	edi, edi
jbe	loc_727732
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	ebx
call	sub_726180
test	eax, eax
jge	short loc_7276C3
xor	ecx, ecx
jmp	short loc_7276CC

loc_7276C3:
lea	ecx, [edi-1]
cmp	eax, edi
jnb	short loc_7276CC
mov	ecx, eax

loc_7276CC:
cmp	ecx, edi
mov	ebp, [esp+10h+arg_4]
jge	short loc_727705
mov	edx, [esi]
lea	eax, [ecx+ecx*2]
lea	eax, [edx+eax*4]
test	eax, eax
jz	short loc_727705
mov	edi, [eax]
cmp	ebx, edi
jl	short loc_7276F7
mov	edx, [eax+4]
lea	ebx, [edx+edi-1]
cmp	[esp+10h+arg_0], ebx
jle	short loc_727700
mov	ebx, [esp+10h+arg_0]

loc_7276F7:
mov	edx, [eax+4]
add	edi, edx
cmp	edi, ebx
jnz	short loc_727705

loc_727700:
add	edx, ebp
mov	[eax+4], edx

loc_727705:
mov	eax, [esi+4]
cmp	ecx, eax
jge	short loc_72770D
inc	ecx

loc_72770D:
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx

loc_727714:
test	edx, edx
jl	short loc_727730
cmp	ecx, eax
jnb	short loc_727730
mov	eax, [esi]
add	[eax+edx], ebp
add	eax, edx
mov	eax, [esi+4]
cmp	ecx, eax
jge	short loc_727714
inc	ecx
add	edx, 0Ch
jmp	short loc_727714

loc_727730:
pop	ebp
pop	ebx

loc_727732:
pop	edi
pop	esi
retn	8
sub_7276A0 endp

align 10h



sub_727740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_727780
sub	eax, esi
push	eax
mov	eax, esi
imul	eax, 2Ch
add	eax, [edi]
push	eax
call	sub_6C7780
mov	ecx, [edi+8]
shr	ecx, 1
add	esp, 8
cmp	esi, ecx
jnb	short loc_727799
mov	edx, [esp+8+arg_0]
push	esi
push	edx
mov	ecx, edi
call	sub_726AD0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_727780:
cmp	esi, [edi+8]
jb	short loc_727799
mov	ecx, [esp+8+arg_0]
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax
push	ecx
mov	ecx, edi
call	sub_726AD0

loc_727799:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_727740 endp

align 10h



sub_7277B0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_72785C
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [edi+0F4h]
lea	esp, [esp+0]

loc_7277D0:
cmp	dword ptr [esi+208h], 50h
jb	short loc_727814
mov	eax, [esi+204h]
lea	edx, [eax+4Fh]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_72780A
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_72782D

loc_72780A:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_72782D

loc_727814:
mov	ecx, [esi]
push	0
push	4
push	50h
test	ecx, ecx
jnz	short loc_727826
mov	ecx, dword_1855FC0

loc_727826:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_72782D:
test	eax, eax
jz	short loc_72783F
mov	ecx, [ebp+0]
push	ecx
push	edi
mov	ecx, eax
call	sub_6A2BC0
jmp	short loc_727841

loc_72783F:
xor	eax, eax

loc_727841:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_7277D0
pop	esi
pop	ebp

loc_72785C:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_7277B0 endp

align 10h



sub_727870 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
call	sub_6A32A0
test	al, al
jz	loc_72791D
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
lea	esi, [edi+0F4h]
lea	esp, [esp+0]

loc_727890:
cmp	dword ptr [esi+208h], 18h
jb	short loc_7278D4
mov	eax, [esi+204h]
lea	edx, [eax+17h]
and	edx, 0FFFFFFFCh
add	edx, 4
mov	[esi+204h], edx
sub	edx, esi
sub	edx, 4
cmp	edx, 200h
jnb	short loc_7278CA
mov	ecx, 200h
sub	ecx, edx
mov	[esi+208h], ecx
jmp	short loc_7278ED

loc_7278CA:
xor	ecx, ecx
mov	[esi+208h], ecx
jmp	short loc_7278ED

loc_7278D4:
mov	ecx, [esi]
push	0
push	4
push	18h
test	ecx, ecx
jnz	short loc_7278E6
mov	ecx, dword_1855FC0

loc_7278E6:
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx

loc_7278ED:
test	eax, eax
jz	short loc_727900
movzx	ecx, byte ptr [ebp+0]
push	ecx
push	edi
mov	ecx, eax
call	sub_6A28A0
jmp	short loc_727902

loc_727900:
xor	eax, eax

loc_727902:
push	1
push	eax
mov	ecx, edi
call	sub_6A3330
mov	ecx, edi
call	sub_6A32A0
test	al, al
jnz	loc_727890
pop	esi
pop	ebp

loc_72791D:
inc	byte ptr [edi+5]
pop	edi
retn	4
sub_727870 endp

align 10h



sub_727930 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
cmp	eax, 1
jnz	short loc_72793D
pop	ebx
retn

loc_72793D:
push	ebp
push	esi
mov	ebp, 3Eh
test	eax, 8000h
jnz	loc_727A44	; default
			; jumptable 0072795B cases 5,6
add	eax, 0FFFFFFFEh	; switch 8 cases
cmp	eax, 7
ja	loc_727A44	; default
			; jumptable 0072795B cases 5,6
jmp	ds:off_727B94[eax*4] ; switch jump

loc_727962:		; jumptable 0072795B case 2
call	sub_726BD0

loc_727967:		; jumptable 0072795B cases 7,8
mov	eax, [ebx+4]
cmp	eax, 7
jz	short loc_727974
cmp	eax, 8
jnz	short loc_72797D ; jumptable 0072795B case 9

loc_727974:
mov	ecx, ebx
call	sub_726DD0
jmp	short loc_727967 ; jumptable 0072795B cases 7,8

loc_72797D:		; jumptable 0072795B case 9
cmp	[ebx+14h], ebp
jnz	loc_727A44	; default
			; jumptable 0072795B cases 5,6
lea	ecx, [ebx+8]
call	sub_726AA0
mov	dword ptr [ebx+4], 8002h
jmp	loc_727A44	; default
			; jumptable 0072795B cases 5,6

loc_72799A:		; jumptable 0072795B case 3
mov	eax, [ebx+8]
cmp	eax, [ebx+10h]
lea	esi, [ebx+8]
jnb	short loc_7279DD

loc_7279A5:
cmp	dword ptr [ebx+14h], 3Ch
jz	short loc_7279DD
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_7279C5
cmp	word ptr [eax],	26h
jnz	short loc_7279C5
mov	ecx, esi
call	sub_726300
jmp	short loc_7279D6

loc_7279C5:
cmp	eax, [esi+8]
jnb	short loc_7279D6
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_7279D6:
mov	edx, [esi]
cmp	edx, [esi+8]
jb	short loc_7279A5

loc_7279DD:
mov	dword ptr [ebx+4], 8003h
jmp	short loc_727A44 ; default
			; jumptable 0072795B cases 5,6

loc_7279E6:		; jumptable 0072795B case 4
mov	eax, [ebx+8]
cmp	eax, [ebx+10h]
lea	esi, [ebx+8]
jnb	short loc_727A28

loc_7279F1:
cmp	[ebx+14h], ebp
jz	short loc_727A2D
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_727A10
cmp	word ptr [eax],	26h
jnz	short loc_727A10
mov	ecx, esi
call	sub_726300
jmp	short loc_727A21

loc_727A10:
cmp	eax, [esi+8]
jnb	short loc_727A21
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_727A21:
mov	edx, [esi]
cmp	edx, [esi+8]
jb	short loc_7279F1

loc_727A28:
cmp	[ebx+14h], ebp
jnz	short loc_727A3D

loc_727A2D:
mov	ecx, esi
call	sub_726AA0
mov	dword ptr [ebx+4], 8004h
jmp	short loc_727A44 ; default
			; jumptable 0072795B cases 5,6

loc_727A3D:
mov	dword ptr [ebx+4], 1

loc_727A44:		; default
mov	eax, 1		; jumptable 0072795B cases 5,6
cmp	[ebx+4], eax
jz	loc_727B8E
mov	eax, [ebx+8]
lea	esi, [ebx+8]
push	edi
xor	edi, edi
cmp	eax, [esi+8]
jnb	loc_727B79

loc_727A64:
test	edi, edi
jnz	loc_727B88
mov	eax, [ebx+14h]
test	eax, eax
jz	loc_727B65
cmp	eax, 2Fh
jz	short loc_727AEA
cmp	eax, 3Ch
jz	short loc_727A8B
mov	edi, 3
jmp	loc_727B6A

loc_727A8B:
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_727AA5
cmp	word ptr [eax],	26h
jnz	short loc_727AA5
mov	ecx, esi
call	sub_726300
jmp	short loc_727AB6

loc_727AA5:
cmp	eax, [esi+8]
jnb	short loc_727AB6
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_727AB6:
mov	eax, [ebx+14h]
cmp	eax, 21h
jnz	short loc_727ACA
mov	ecx, ebx
call	sub_726D20
jmp	loc_727B6A

loc_727ACA:
cmp	eax, 2Fh
jnz	short loc_727AE0
mov	ecx, esi
call	sub_726AA0
mov	edi, 4
jmp	loc_727B6A

loc_727AE0:
mov	edi, 2
jmp	loc_727B6A

loc_727AEA:
mov	eax, [ebx+4]
cmp	eax, 9
jz	short loc_727AFE
cmp	eax, 6
jz	short loc_727AFE
mov	edi, 3
jmp	short loc_727B6A

loc_727AFE:
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_727B18
cmp	word ptr [eax],	26h
jnz	short loc_727B18
mov	ecx, esi
call	sub_726300
jmp	short loc_727B29

loc_727B18:
cmp	eax, [esi+8]
jnb	short loc_727B29
movzx	edx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], edx
mov	[esi+4], eax

loc_727B29:
cmp	[ebx+14h], ebp
jnz	short loc_727B65
cmp	byte ptr [esi+10h], 0
mov	eax, [esi+4]
mov	[esi], eax
jz	short loc_727B4D
cmp	word ptr [eax],	26h
jnz	short loc_727B4D
mov	ecx, esi
call	sub_726300
mov	edi, 8005h
jmp	short loc_727B6A

loc_727B4D:
cmp	eax, [esi+8]
jnb	short loc_727B5E
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esi+0Ch], ecx
mov	[esi+4], eax

loc_727B5E:
mov	edi, 8005h
jmp	short loc_727B6A

loc_727B65:
mov	edi, 1

loc_727B6A:
mov	edx, [esi]
cmp	edx, [esi+8]
jb	loc_727A64
test	edi, edi
jnz	short loc_727B88

loc_727B79:
pop	edi
pop	esi
mov	dword ptr [ebx+4], 8000h
mov	eax, [ebx+4]
pop	ebp
pop	ebx
retn

loc_727B88:
mov	[ebx+4], edi
mov	eax, edi
pop	edi

loc_727B8E:
pop	esi
pop	ebp
pop	ebx
retn
sub_727930 endp

align 4
off_727B94 dd offset loc_727962	; jump table for switch	statement
dd offset loc_72799A
dd offset loc_7279E6
dd offset loc_727A44
dd offset loc_727A44
dd offset loc_727967
dd offset loc_727967
dd offset loc_72797D
align 10h



sub_727BC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_727BD1
xor	al, al
pop	esi
retn	8

loc_727BD1:
cmp	eax, 8
jnz	short loc_727BDB
call	sub_726DD0

loc_727BDB:
push	ebx
xor	bl, bl
cmp	dword ptr [esi+4], 7
jnz	loc_727C65
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	edi
lea	edi, [esi+8]

loc_727BF1:
mov	eax, [edi]
cmp	eax, [edi+8]
jnb	short loc_727C63
mov	ecx, [esp+10h+arg_0]
push	ebp
push	ecx
mov	ecx, esi
call	sub_726F70
mov	ecx, esi
call	sub_726C90
mov	edx, [edi]
cmp	edx, [edi+8]
jnb	short loc_727C5D
cmp	dword ptr [esi+14h], 3Dh
jnz	short loc_727C56
cmp	byte ptr [edi+10h], 0
mov	eax, [edi+4]
mov	[edi], eax
jz	short loc_727C33
cmp	word ptr [eax],	26h
jnz	short loc_727C33
mov	ecx, edi
call	sub_726300
jmp	short loc_727C44

loc_727C33:
cmp	eax, [edi+8]
jnb	short loc_727C44
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[edi+0Ch], ecx
mov	[edi+4], eax

loc_727C44:
mov	ecx, esi
call	sub_726C90
mov	dword ptr [esi+4], 8
mov	bl, 1
jmp	short loc_727C5D

loc_727C56:
mov	ecx, esi
call	sub_726DD0

loc_727C5D:
cmp	dword ptr [esi+4], 7
jz	short loc_727BF1

loc_727C63:
pop	edi
pop	ebp

loc_727C65:
mov	edx, [esi+8]
cmp	edx, [esi+10h]
jb	short loc_727C74
mov	dword ptr [esi+4], 1

loc_727C74:
mov	al, bl
pop	ebx
pop	esi
retn	8
sub_727BC0 endp

align 10h



sub_727C80 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 8
mov	[esp+0Ch+var_6], 0
jnz	loc_727E8F
mov	eax, [esi+14h]
mov	[esp+0Ch+var_4], eax
cmp	eax, 22h
jz	short loc_727CB2
cmp	eax, 27h
jz	short loc_727CB2
mov	dword ptr [esi+4], 1
jmp	loc_727E8F

loc_727CB2:
cmp	byte ptr [esi+18h], 0
mov	eax, [esi+0Ch]
push	edi
lea	edi, [esi+8]
mov	[edi], eax
jz	short loc_727CD0
cmp	word ptr [eax],	26h
jnz	short loc_727CD0
mov	ecx, edi
call	sub_726300
jmp	short loc_727CE1

loc_727CD0:
cmp	eax, [edi+8]
jnb	short loc_727CE1
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[edi+0Ch], ecx
mov	[edi+4], eax

loc_727CE1:
mov	edx, [edi]
mov	eax, [esp+10h+arg_0]
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_4]
mov	[eax], edx
mov	dword ptr [ebp+0], 0
mov	al, [edi+10h]
xor	bl, bl
mov	[esp+18h+var_5], bl
mov	byte ptr [edi+10h], 1
test	al, al
jnz	short loc_727D16
mov	ecx, [edi]
cmp	word ptr [ecx],	26h
jnz	short loc_727D16
mov	ecx, edi
call	sub_726300

loc_727D16:
mov	edx, [edi]
cmp	edx, [edi+8]
jnb	loc_727E11

loc_727D21:
mov	eax, [esp+18h+var_4]
cmp	[esi+14h], eax
jz	loc_727E11
cmp	byte ptr [edi+10h], 0
jz	loc_727DB9
mov	ecx, [edi]
cmp	word ptr [ecx],	26h
jnz	short loc_727DB9
test	bl, bl
jnz	short loc_727D63
mov	eax, [esp+18h+arg_0]
mov	dword ptr [esi+24h], 0
mov	edx, [ebp+0]
mov	ecx, [eax]
push	edx
push	ecx
mov	ecx, esi
call	sub_725DA0
mov	bl, 1
mov	[esp+18h+var_5], bl

loc_727D63:
mov	edx, [esi+24h]
mov	eax, [esi+20h]
mov	ebp, [esi+14h]
add	edx, 6
cmp	edx, eax
jbe	short loc_727DA6
mov	edx, [esi+1Ch]
add	eax, 6
mov	[esi+20h], eax
add	eax, eax
test	edx, edx
jnz	short loc_727D90
mov	ecx, [esi]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
jmp	short loc_727DA3

loc_727D90:
mov	ecx, dword_1855FC0
mov	ebx, [ecx]
push	eax
push	edx
mov	edx, [ebx+2Ch]
call	edx
mov	bl, [esp+18h+var_5]

loc_727DA3:
mov	[esi+1Ch], eax

loc_727DA6:
mov	eax, [esi+24h]
mov	ecx, [esi+1Ch]
mov	[ecx+eax*2], bp
inc	dword ptr [esi+24h]
mov	ebp, [esp+18h+arg_4]
jmp	short loc_727DDB

loc_727DB9:
test	bl, bl
jz	short loc_727DD1
mov	edx, [edi+4]
sub	edx, [edi]
mov	eax, [edi]
sar	edx, 1
push	edx
push	eax
mov	ecx, esi
call	sub_725DA0
jmp	short loc_727DDB

loc_727DD1:
mov	ecx, [edi+4]
sub	ecx, [edi]
sar	ecx, 1
add	[ebp+0], ecx

loc_727DDB:
cmp	byte ptr [edi+10h], 0
mov	eax, [edi+4]
mov	[edi], eax
jz	short loc_727DF5
cmp	word ptr [eax],	26h
jnz	short loc_727DF5
mov	ecx, edi
call	sub_726300
jmp	short loc_727E06

loc_727DF5:
cmp	eax, [edi+8]
jnb	short loc_727E06
movzx	edx, word ptr [eax]
add	eax, 2
mov	[edi+0Ch], edx
mov	[edi+4], eax

loc_727E06:
mov	eax, [edi]
cmp	eax, [edi+8]
jb	loc_727D21

loc_727E11:
mov	byte ptr [esi+18h], 0
test	bl, bl
jz	short loc_727E28
mov	ecx, [esi+1Ch]
mov	edx, [esp+18h+arg_0]
mov	[edx], ecx
mov	eax, [esi+24h]
mov	[ebp+0], eax

loc_727E28:
mov	ecx, [edi]
pop	ebp
pop	ebx
cmp	ecx, [edi+8]
jb	short loc_727E3A
mov	dword ptr [esi+4], 1
jmp	short loc_727E8E

loc_727E3A:
cmp	byte ptr [edi+10h], 0
mov	eax, [edi+4]
mov	[esp+10h+var_6], 1
mov	[edi], eax
jz	short loc_727E59
cmp	word ptr [eax],	26h
jnz	short loc_727E59
mov	ecx, edi
call	sub_726300
jmp	short loc_727E6A

loc_727E59:
cmp	eax, [edi+8]
jnb	short loc_727E6A
movzx	edx, word ptr [eax]
add	eax, 2
mov	[edi+0Ch], edx
mov	[edi+4], eax

loc_727E6A:
mov	ecx, esi
call	sub_726C90
mov	eax, [esi+14h]
cmp	eax, 3Eh
jz	short loc_727E87
cmp	eax, 2Fh
jz	short loc_727E87
mov	dword ptr [esi+4], 7
jmp	short loc_727E8E

loc_727E87:
mov	dword ptr [esi+4], 9

loc_727E8E:
pop	edi

loc_727E8F:
mov	eax, [esi+8]
cmp	eax, [esi+10h]
mov	al, [esp+0Ch+var_6]
jb	short loc_727EA2
mov	dword ptr [esi+4], 1

loc_727EA2:
pop	esi
add	esp, 8
retn	8
sub_727C80 endp

align 10h



sub_727EB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
xor	al, al
cmp	dword ptr [esi+4], 2
jnz	short loc_727F3A
mov	eax, [esp+4+arg_4]
mov	ecx, [esp+4+arg_0]
push	ebx
push	eax
push	ecx
mov	ecx, esi
call	sub_726F70
mov	eax, [esi+14h]
mov	bl, 1
cmp	eax, 3Eh
jnz	short loc_727F16
lea	ecx, [esi+8]
mov	dword ptr [esi+4], 8002h
cmp	byte ptr [ecx+10h], 0
mov	eax, [ecx+4]
mov	[ecx], eax
jz	short loc_727EFE
cmp	word ptr [eax],	26h
jnz	short loc_727EFE
call	sub_726300
mov	al, bl
pop	ebx
pop	esi
retn	8

loc_727EFE:
cmp	eax, [ecx+8]
jnb	short loc_727F37
movzx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+4], eax
mov	al, bl
pop	ebx
mov	[ecx+0Ch], edx
pop	esi
retn	8

loc_727F16:
cmp	eax, 2Fh
jnz	short loc_727F29
mov	al, bl
pop	ebx
mov	dword ptr [esi+4], 6
pop	esi
retn	8

loc_727F29:
mov	ecx, esi
mov	dword ptr [esi+4], 7
call	sub_726C90

loc_727F37:
mov	al, bl
pop	ebx

loc_727F3A:
pop	esi
retn	8
sub_727EB0 endp

align 10h



sub_727F40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
xor	bl, bl
cmp	dword ptr [esi+4], 4
jnz	short loc_727FA8
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_0]
push	eax
push	ecx
mov	ecx, esi
call	sub_726F70
cmp	dword ptr [esi+14h], 3Eh
jnz	short loc_727FA1
lea	ecx, [esi+8]
mov	dword ptr [esi+4], 8004h
mov	eax, [ecx+4]
mov	[ecx], eax
cmp	[ecx+10h], bl
jz	short loc_727F89
cmp	word ptr [eax],	26h
jnz	short loc_727F89
call	sub_726300
pop	esi
mov	al, 1
pop	ebx
retn	8

loc_727F89:
cmp	eax, [ecx+8]
jnb	short loc_727F9A
movzx	edx, word ptr [eax]
add	eax, 2
mov	[ecx+0Ch], edx
mov	[ecx+4], eax

loc_727F9A:
pop	esi
mov	al, 1
pop	ebx
retn	8

loc_727FA1:
mov	dword ptr [esi+4], 1

loc_727FA8:
pop	esi
mov	al, bl
pop	ebx
retn	8
sub_727F40 endp

align 10h



sub_727FB0 proc	near

var_5= byte ptr	-5
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 3
jnz	loc_7281CC
mov	eax, [esi+8]
mov	ecx, [esp+0Ch+arg_0]
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_4]
push	edi
lea	edi, [esi+8]
mov	[ecx], eax
mov	dword ptr [ebp+0], 0
mov	al, [edi+10h]
xor	bl, bl
mov	[esp+18h+var_5], bl
mov	byte ptr [edi+10h], 1
test	al, al
jnz	short loc_727FFA
mov	edx, [edi]
cmp	word ptr [edx],	26h
jnz	short loc_727FFA
mov	ecx, edi
call	sub_726300

loc_727FFA:
mov	eax, [edi]
cmp	eax, [edi+8]
jnb	loc_72819A

loc_728005:
mov	eax, [esi+14h]
cmp	eax, 3Ch
jnz	short loc_728023
cmp	byte ptr [edi+10h], 0
jz	loc_728187
mov	ecx, [edi]
cmp	word ptr [ecx],	26h
jnz	loc_728187

loc_728023:
movzx	eax, ax
mov	edx, eax
shr	edx, 8
movzx	edx, ds:word_1434648[edx*2]
test	edx, edx
jz	short loc_7280A4
cmp	edx, 1
jz	short loc_728066
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	eax, ds:word_1434648[eax*2]
mov	ebp, 1
shl	ebp, cl
and	ebp, eax
neg	ebp
sbb	ebp, ebp
neg	ebp
mov	ebp, [esp+18h+arg_4]
jz	short loc_7280A4

loc_728066:
cmp	byte ptr [esi+28h], 0
jz	short loc_7280A4
test	bl, bl
jnz	short loc_72808F
mov	edx, [esp+18h+arg_0]
mov	dword ptr [esi+24h], 0
mov	ecx, [ebp+0]
mov	eax, [edx]
push	ecx
push	eax
mov	ecx, esi
call	sub_725DA0
mov	bl, 1
mov	[esp+18h+var_5], bl

loc_72808F:
push	20h
mov	ecx, esi
call	sub_725E10
mov	ecx, esi
call	sub_726C90
jmp	loc_72817C

loc_7280A4:
cmp	byte ptr [edi+10h], 0
jz	loc_72812F
mov	ecx, [edi]
cmp	word ptr [ecx],	26h
jnz	short loc_72812F
test	bl, bl
jnz	short loc_7280D9
mov	eax, [esp+18h+arg_0]
mov	dword ptr [esi+24h], 0
mov	edx, [ebp+0]
mov	ecx, [eax]
push	edx
push	ecx
mov	ecx, esi
call	sub_725DA0
mov	bl, 1
mov	[esp+18h+var_5], bl

loc_7280D9:
mov	edx, [esi+24h]
mov	eax, [esi+20h]
mov	ebp, [esi+14h]
add	edx, 6
cmp	edx, eax
jbe	short loc_72811C
mov	edx, [esi+1Ch]
add	eax, 6
mov	[esi+20h], eax
add	eax, eax
test	edx, edx
jnz	short loc_728106
mov	ecx, [esi]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
jmp	short loc_728119

loc_728106:
mov	ecx, dword_1855FC0
mov	ebx, [ecx]
push	eax
push	edx
mov	edx, [ebx+2Ch]
call	edx
mov	bl, [esp+18h+var_5]

loc_728119:
mov	[esi+1Ch], eax

loc_72811C:
mov	eax, [esi+24h]
mov	ecx, [esi+1Ch]
mov	[ecx+eax*2], bp
inc	dword ptr [esi+24h]
mov	ebp, [esp+18h+arg_4]
jmp	short loc_728151

loc_72812F:
test	bl, bl
jz	short loc_728147
mov	edx, [edi+4]
sub	edx, [edi]
mov	eax, [edi]
sar	edx, 1
push	edx
push	eax
mov	ecx, esi
call	sub_725DA0
jmp	short loc_728151

loc_728147:
mov	ecx, [edi+4]
sub	ecx, [edi]
sar	ecx, 1
add	[ebp+0], ecx

loc_728151:
cmp	byte ptr [edi+10h], 0
mov	eax, [edi+4]
mov	[edi], eax
jz	short loc_72816B
cmp	word ptr [eax],	26h
jnz	short loc_72816B
mov	ecx, edi
call	sub_726300
jmp	short loc_72817C

loc_72816B:
cmp	eax, [edi+8]
jnb	short loc_72817C
movzx	edx, word ptr [eax]
add	eax, 2
mov	[edi+0Ch], edx
mov	[edi+4], eax

loc_72817C:
mov	eax, [edi]
cmp	eax, [edi+8]
jb	loc_728005

loc_728187:
test	bl, bl
jz	short loc_72819A
mov	ecx, [esi+1Ch]
mov	edx, [esp+18h+arg_0]
mov	[edx], ecx
mov	eax, [esi+24h]
mov	[ebp+0], eax

loc_72819A:
mov	ecx, [edi]
cmp	ecx, [edi+8]
jnb	short loc_7281BE
cmp	dword ptr [esi+14h], 3Ch
jnz	short loc_7281B5
cmp	byte ptr [edi+10h], 0
jz	short loc_7281BE
mov	edx, ecx
cmp	word ptr [edx],	26h
jnz	short loc_7281BE

loc_7281B5:
mov	dword ptr [esi+4], 1
jmp	short loc_7281C5

loc_7281BE:
or	dword ptr [esi+4], 8000h

loc_7281C5:
pop	edi
pop	ebp
mov	byte ptr [esi+18h], 0
pop	ebx

loc_7281CC:
xor	eax, eax
cmp	dword ptr [esi+4], 1
pop	esi
setnz	al
add	esp, 8
retn	8
sub_727FB0 endp

align 10h



sub_7281E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_728221
mov	ecx, [edi]
sub	eax, esi
push	eax
lea	eax, [esi+esi*2]
lea	edx, [ecx+eax*4]
push	edx
call	sub_71EDB0
mov	eax, [edi+8]
shr	eax, 1
add	esp, 8
cmp	esi, eax
jnb	short loc_728238
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_6CE350
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_728221:
cmp	esi, [edi+8]
jb	short loc_728238
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_6CE350

loc_728238:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_7281E0 endp




; int __cdecl sub_728240(int, char *, int)
sub_728240 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	esi
mov	esi, [esp+308h+arg_4]
push	edi
mov	edi, [esp+30Ch+arg_8]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+310h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+310h+var_304]
call	sub_7277B0
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4090
mov	esi, [esp+30Ch+var_2F8]
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+30Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_728240 endp

align 10h



; int __cdecl sub_7282C0(int, char *, int, int)
sub_7282C0 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	ebx
mov	ebx, [esp+308h+arg_C]
push	esi
mov	esi, [esp+30Ch+arg_4]
push	edi
mov	edi, [esp+310h+arg_8]
push	eax
lea	ecx, [esp+314h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+314h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+314h+var_304]
call	sub_727870
push	ebx
lea	ecx, [esp+314h+var_304]
call	sub_7277B0
lea	ecx, [esp+310h+var_304]
call	sub_6A4090
mov	esi, [esp+310h+var_2F8]
lea	ecx, [esp+310h+var_304]
call	sub_6A4940
mov	ecx, [esp+310h+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_7282C0 endp

align 10h



; int __cdecl sub_728350(int, char *, int)
sub_728350 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	esi
mov	esi, [esp+308h+arg_4]
push	edi
mov	edi, [esp+30Ch+arg_8]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+310h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+310h+var_304]
call	sub_6F4660
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4090
mov	esi, [esp+30Ch+var_2F8]
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+30Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_728350 endp

align 10h



; int __cdecl sub_7283D0(int, char *, int)
sub_7283D0 proc	near

var_304= dword ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	esi
mov	esi, [esp+308h+arg_4]
push	edi
mov	edi, [esp+30Ch+arg_8]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+310h+var_304]
call	sub_6A4D30
push	edi		; int
lea	ecx, [esp+310h+var_304]	; int
call	sub_64F200
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4090
mov	esi, [esp+30Ch+var_2F8]
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+30Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_7283D0 endp

align 10h



; int __cdecl sub_728450(int, char *, int)
sub_728450 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	esi
mov	esi, [esp+308h+arg_4]
push	edi
mov	edi, [esp+30Ch+arg_8]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+310h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+310h+var_304]
call	sub_727870
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4090
mov	esi, [esp+30Ch+var_2F8]
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+30Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_728450 endp

align 10h



sub_7284D0 proc	near
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+3Ch]
mov	ecx, esi
mov	dword ptr [esi], offset	off_143AB58
call	sub_6FFB90
mov	ecx, esi
call	sub_64A3F0
lea	ecx, [edi+10h]
pop	edi
pop	esi
jmp	sub_694380
sub_7284D0 endp

align 10h



sub_728500 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_C]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_8]
mov	[esi+4], ecx
mov	ecx, [esp+4+arg_0]
mov	[esi], eax
mov	eax, [esp+4+arg_10]
push	ecx
lea	ecx, [esi+10h]
mov	[esi+8], edx
mov	[esi+0Ch], eax
call	sub_694320
xor	eax, eax
mov	dword ptr [esi+3Ch], offset off_155F500
xor	edx, edx
xor	ecx, ecx
mov	[esi+4Ah], ax
mov	[esi+50h], ax
mov	dword ptr [esi+40h], 1
mov	dword ptr [esi+3Ch], offset off_143AB58
mov	dword ptr [esi+44h], 0
mov	[esi+48h], dx
mov	[esi+4Ch], cx
mov	[esi+4Eh], dx
mov	[esi+52h], cx
mov	eax, esi
pop	esi
retn	14h
sub_728500 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_72A3D0

loc_728570:
push	ecx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	edx, [edi+8]
mov	[esi+8], edx
mov	eax, [edi+0Ch]
mov	[esi+0Ch], eax
mov	dword ptr [esi+10h], offset off_155F500
mov	dword ptr [esi+14h], 1
mov	dword ptr [esi+10h], offset off_1437650
mov	ecx, [edi+1Ch]
push	ecx
lea	edx, [edi+18h]
push	edx
lea	ecx, [esi+18h]
mov	byte ptr [esp+14h+arg_0], 0
call	sub_67ACB0
mov	eax, [edi+1Ch]
push	eax
lea	ecx, [edi+20h]
push	ecx
lea	ecx, [esi+20h]
mov	[esp+14h+var_1], 0
call	sub_67ACB0
mov	eax, [edi+28h]
test	eax, eax
jz	short loc_7285D8
inc	dword ptr [eax+4]

loc_7285D8:
mov	edx, [edi+28h]
mov	[esi+28h], edx
mov	eax, [edi+2Ch]
test	eax, eax
jz	short loc_7285E7
inc	dword ptr [eax]

loc_7285E7:
mov	eax, [edi+2Ch]
mov	[esi+2Ch], eax
mov	ecx, [edi+30h]
mov	[esi+30h], ecx
movzx	edx, word ptr [edi+34h]
mov	[esi+34h], dx
mov	ax, [edi+36h]
mov	[esi+36h], ax
mov	cl, [edi+38h]
mov	[esi+38h], cl
movzx	edx, word ptr [edi+3Ah]
add	edi, 3Ch
push	edi
lea	ecx, [esi+3Ch]
mov	[esi+3Ah], dx
call	sub_7004B0
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	4
; END OF FUNCTION CHUNK	FOR sub_72A3D0
align 10h



sub_728630 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
push	eax
lea	ecx, [esi+10h]
call	sub_694320
xor	eax, eax
mov	dword ptr [esi+3Ch], offset off_155F500
xor	ecx, ecx
xor	edx, edx
mov	[esi+48h], ax
mov	[esi+4Eh], ax
mov	dword ptr [esi+40h], 1
mov	dword ptr [esi+3Ch], offset off_143AB58
mov	dword ptr [esi+44h], 0
mov	[esi+4Ah], cx
mov	[esi+4Ch], dx
mov	[esi+50h], cx
mov	[esi+52h], dx
mov	eax, esi
pop	esi
retn
sub_728630 endp

align 10h



sub_7286A0 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_74=	byte ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	word ptr -58h
var_56=	word ptr -56h
var_54=	byte ptr -54h
var_52=	word ptr -52h
var_50=	byte ptr -50h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 84h
push	esi
push	edi
mov	edi, [esp+8Ch+arg_4]
mov	esi, ecx
push	edi
push	esi
lea	eax, [esi+10h]
push	eax
lea	ecx, [esp+98h+var_50]
call	sub_727150
mov	eax, [esp+8Ch+arg_8]
cmp	eax, edi
jnb	short loc_7286CD
mov	eax, edi

loc_7286CD:
push	ebp
cmp	eax, 0FFFFFFFFh
jnz	short loc_7286DA
mov	ebp, 7FFFFFFFh
jmp	short loc_7286DE

loc_7286DA:
sub	eax, edi
mov	ebp, eax

loc_7286DE:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	esi
call	eax
push	eax
lea	ecx, [esp+94h+var_7C]
call	sub_694320
mov	[esp+90h+var_80], 0
test	ebp, ebp
jle	loc_7287BA
mov	ecx, [esp+90h+var_30]
push	ebx
mov	ebx, [esp+94h+var_34]
nop

loc_728710:
cmp	ecx, [ebx+4]
jnb	loc_7287B9
lea	ecx, [esp+94h+var_50]
call	sub_727230
mov	esi, eax
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_728768
mov	eax, [esp+94h+var_80]
mov	edx, eax
inc	eax
mov	[esp+94h+var_80], eax
test	edx, edx
jnz	short loc_728746
push	ecx
lea	ecx, [esp+98h+var_7C]
call	sub_6C7EC0
jmp	short loc_728768

loc_728746:
lea	eax, [esp+94h+var_7C]
push	eax
lea	edx, [esp+98h+var_2C]
push	edx
call	sub_701800
push	eax
lea	ecx, [esp+98h+var_7C]
call	sub_6C7EC0
lea	ecx, [esp+94h+var_2C]
call	sub_694380

loc_728768:
mov	eax, [esp+94h+var_38]
sub	ebp, [esi+8]
mov	ebx, [esp+94h+var_34]
test	eax, eax
jl	short loc_7287AA
mov	edi, [esp+94h+var_3C]
cmp	eax, [edi+4]
jnb	short loc_7287AA
mov	edx, [edi]
lea	ecx, [eax+eax*2]
mov	esi, [edx+ecx*4]
lea	edx, [edx+ecx*4]
mov	ecx, [esp+94h+var_30]
cmp	ecx, esi
jnb	short loc_728797
mov	ecx, esi
jmp	short loc_7287AD

loc_728797:
add	ecx, [edx+4]
mov	[esp+94h+var_30], ecx
cmp	eax, [edi+4]
jge	short loc_7287B1
inc	eax
mov	[esp+94h+var_38], eax
jmp	short loc_7287B1

loc_7287AA:
mov	ecx, [ebx+4]

loc_7287AD:
mov	[esp+94h+var_30], ecx

loc_7287B1:
test	ebp, ebp
jg	loc_728710

loc_7287B9:
pop	ebx

loc_7287BA:
mov	eax, [esp+90h+var_70]
mov	esi, [esp+90h+arg_0]
push	eax
lea	ecx, [esp+94h+var_74]
mov	dword ptr [esi], offset	off_155F500
push	ecx
mov	edi, 1
lea	ecx, [esi+8]
mov	[esi+4], edi
mov	dword ptr [esi], offset	off_1437650
mov	byte ptr [esp+98h+var_84+2], 0
call	sub_67ACB0
mov	edx, [esp+90h+var_70]
push	edx
lea	eax, [esp+94h+var_6C]
push	eax
lea	ecx, [esi+10h]
mov	byte ptr [esp+98h+var_84+3], 0
call	sub_67ACB0
mov	eax, [esp+90h+var_64]
pop	ebp
test	eax, eax
jz	short loc_728813
add	[eax+4], edi
mov	eax, [esp+8Ch+var_64]

loc_728813:
mov	[esi+18h], eax
mov	eax, [esp+8Ch+var_60]
test	eax, eax
jz	short loc_728824
add	[eax], edi
mov	eax, [esp+8Ch+var_60]

loc_728824:
movzx	edx, [esp+8Ch+var_58]
mov	ecx, [esp+8Ch+var_5C]
mov	[esi+1Ch], eax
mov	ax, [esp+8Ch+var_56]
mov	[esi+20h], ecx
mov	cl, [esp+8Ch+var_54]
mov	[esi+24h], dx
movzx	edx, [esp+8Ch+var_52]
mov	[esi+28h], cl
lea	ecx, [esp+8Ch+var_7C]
mov	[esi+26h], ax
mov	[esi+2Ah], dx
call	sub_694380
mov	ecx, [esp+8Ch+var_44]
test	ecx, ecx
jz	short loc_728866
call	sub_64A430

loc_728866:
pop	edi
mov	eax, esi
pop	esi
add	esp, 84h
retn	0Ch
sub_7286A0 endp

align 10h



sub_728880 proc	near

var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 24h
push	esi
push	eax
push	ecx
add	ecx, 10h
push	ecx
lea	ecx, [esp+34h+var_24]
call	sub_727150
mov	ecx, [esp+28h+var_4]
mov	edx, [esp+28h+var_8]
xor	esi, esi
cmp	ecx, [edx+4]
jnb	short loc_7288B8
lea	ecx, [esp+28h+var_24]
call	sub_727230
mov	eax, [eax+0Ch]
test	eax, eax
jz	short loc_7288B8
mov	esi, eax

loc_7288B8:
mov	ecx, [esp+28h+var_18]
test	ecx, ecx
jz	short loc_7288C5
call	sub_64A430

loc_7288C5:
mov	eax, esi
pop	esi
add	esp, 24h
retn	4
sub_728880 endp

align 10h



sub_7288D0 proc	near

var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	word ptr -0E0h
var_DC=	word ptr -0DCh
var_DA=	dword ptr -0DAh
var_D6=	word ptr -0D6h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_B0=	byte ptr -0B0h
var_84=	byte ptr -84h
var_58=	byte ptr -58h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0F4h
mov	eax, [esp+0F4h+arg_8]
push	ebx
mov	ebx, [esp+0F8h+arg_C]
push	esi
mov	esi, ecx
lea	ecx, [esp+0FCh+var_F4]
push	ecx
push	eax
lea	edx, [esp+104h+var_D0]
push	edx
mov	ecx, esi
sub	ebx, eax
call	sub_7267B0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
push	eax
lea	ecx, [esp+100h+var_B0]
call	sub_694320
xor	eax, eax
xor	ecx, ecx
xor	edx, edx
mov	[esp+0FCh+var_E8], offset off_155F500
mov	[esp+0FCh+var_E4], 1
mov	[esp+0FCh+var_E8], offset off_143AB58
mov	dword ptr [esp+0FCh+var_E0], eax
mov	[esp+0FCh+var_DC], cx
mov	word ptr [esp+0FCh+var_DA], dx
mov	word ptr [esp+0FCh+var_DA+2], cx
mov	[esp+0FCh+var_D6], dx
mov	word ptr [esp+0FCh+var_D4], cx
mov	word ptr [esp+0FCh+var_D4+2], dx
mov	[esp+0FCh+var_F0], eax
mov	[esp+0FCh+var_EC], eax
cmp	ebx, eax
jbe	loc_728ABA
push	ebp
mov	ebp, [esp+100h+var_CC]
push	edi
lea	ebx, [ebx+0]

loc_728970:
mov	eax, [esp+104h+var_D0]
test	eax, eax
jz	loc_728AB8
test	ebp, ebp
jl	loc_728AB8
cmp	ebp, [eax+4]
jge	loc_728AB8
mov	eax, [eax]
mov	esi, [eax+ebp*4]
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_7289B4
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_7289AB
cmp	edx, eax
jnb	short loc_7289AB
lea	ecx, [ecx+edx*2]
jmp	short loc_7289AD

loc_7289AB:
xor	ecx, ecx

loc_7289AD:
cmp	word ptr [ecx],	0
jnz	short loc_7289B4
dec	eax

loc_7289B4:
mov	edi, ebx
cmp	ebx, eax
jb	short loc_7289BC
mov	edi, eax

loc_7289BC:
test	edi, edi
jz	loc_728AB8
mov	eax, [esp+104h+var_F0]
mov	ecx, eax
inc	eax
mov	[esp+104h+var_F0], eax
mov	eax, [esp+104h+var_F4]
test	ecx, ecx
jnz	short loc_7289FE
lea	edx, [edi+eax]
push	edx
push	eax
lea	eax, [esp+10Ch+var_58]
push	eax
mov	ecx, esi
call	sub_7286A0
push	eax
lea	ecx, [esp+108h+var_B0]
call	sub_6C7EC0
lea	ecx, [esp+104h+var_58]
jmp	short loc_728A43

loc_7289FE:
lea	ecx, [esp+104h+var_B0]
push	ecx
lea	edx, [esp+108h+var_84]
push	edx
lea	ecx, [edi+eax]
push	ecx
push	eax
lea	edx, [esp+114h+var_2C]
push	edx
mov	ecx, esi
call	sub_7286A0
mov	ecx, eax
call	sub_701800
push	eax
lea	ecx, [esp+108h+var_B0]
call	sub_6C7EC0
lea	ecx, [esp+104h+var_84]
call	sub_694380
lea	ecx, [esp+104h+var_2C]

loc_728A43:
call	sub_694380
cmp	[esp+104h+var_F4], 0
jnz	short loc_728AA4
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_728AA4
mov	eax, [esp+104h+var_EC]
mov	edx, eax
inc	eax
mov	[esp+104h+var_EC], eax
test	edx, edx
jnz	short loc_728A71
push	ecx
lea	ecx, [esp+108h+var_E8]
call	sub_700370
jmp	short loc_728AA4

loc_728A71:
lea	eax, [esp+104h+var_E8]
push	eax
lea	edx, [esp+108h+var_C8]
push	edx
call	sub_700A90
push	eax
lea	ecx, [esp+108h+var_E8]
call	sub_700370
lea	ecx, [esp+104h+var_C8]
mov	[esp+104h+var_C8], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+104h+var_C8]
call	sub_64A3F0

loc_728AA4:
mov	eax, [esp+104h+var_D0]
sub	ebx, edi
cmp	ebp, [eax+4]
jge	short loc_728AB0
inc	ebp

loc_728AB0:
test	ebx, ebx
ja	loc_728970

loc_728AB8:
pop	edi
pop	ebp

loc_728ABA:
mov	ecx, [esp+0FCh+arg_0]
pop	esi
pop	ebx
test	ecx, ecx
jz	short loc_728AD1
lea	edx, [esp+0F4h+var_B0]
push	edx
call	sub_6C7EC0

loc_728AD1:
mov	ecx, [esp+0F4h+arg_4]
test	ecx, ecx
jz	short loc_728AE6
lea	eax, [esp+0F4h+var_E8]
push	eax
call	sub_700370

loc_728AE6:
lea	ecx, [esp+0F4h+var_E8]
mov	[esp+0F4h+var_E8], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+0F4h+var_E8]
call	sub_64A3F0
lea	ecx, [esp+0F4h+var_B0]
call	sub_694380
add	esp, 0F4h
retn	10h
sub_7288D0 endp

align 10h



sub_728B20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+10h+arg_8]
lea	eax, [esp+10h+arg_8]
push	eax
push	ecx
lea	edx, [esp+18h+var_8]
push	edx
mov	ecx, edi
call	sub_7267B0
mov	ecx, [esp+10h+var_8]
xor	esi, esi
xor	al, al
test	ecx, ecx
jz	short loc_728B72
mov	edx, [esp+10h+var_4]
test	edx, edx
jl	short loc_728B72
cmp	edx, [ecx+4]
jge	short loc_728B72
mov	eax, [ecx]
mov	ecx, [esp+10h+arg_8]
mov	esi, [eax+edx*4]
push	ecx
mov	ecx, esi
call	sub_728880
mov	esi, [esi+0Ch]
mov	ecx, eax
mov	al, 1
test	ecx, ecx
jnz	short loc_728B75

loc_728B72:
mov	ecx, [edi+1Ch]

loc_728B75:
test	esi, esi
jnz	short loc_728B7C
mov	esi, [edi+18h]

loc_728B7C:
mov	edx, [esp+10h+arg_0]
test	edx, edx
jz	short loc_728B86
mov	[edx], ecx

loc_728B86:
mov	ecx, [esp+10h+arg_4]
test	ecx, ecx
jz	short loc_728B90
mov	[ecx], esi

loc_728B90:
pop	edi
pop	esi
add	esp, 8
retn	0Ch
sub_728B20 endp

align 10h



sub_728BA0 proc	near

var_185= byte ptr -185h
var_184= dword ptr -184h
var_180= byte ptr -180h
var_168= byte ptr -168h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 188h
mov	eax, dword_1855FC0
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
xor	esi, esi
push	eax
lea	ecx, [esp+19Ch+var_180]
mov	[esp+19Ch+var_15C], edi
mov	dword ptr [esp+19Ch+var_168+4],	esi
call	sub_679B40
lea	edx, [edi+0Ch]
mov	edi, [edi+10h]
xor	ecx, ecx
mov	[esp+198h+var_E8], ecx
xor	eax, eax
mov	[esp+198h+var_10C], edi
lea	ebx, [esi+1]

loc_728BE0:
cmp	edx, esi
jz	loc_7296EA
cmp	ecx, esi
jl	loc_7296EA
cmp	ecx, [edx+4]
jge	loc_7296EA
mov	edx, [edx]
mov	ebp, [edx+ecx*4]
inc	eax
mov	[esp+198h+var_104], eax
cmp	eax, [esp+198h+var_10C]
jnz	short loc_728C3A
mov	eax, [ebp+4]
cmp	eax, esi
jbe	short loc_728C34
mov	ecx, [ebp+0]
lea	edx, [eax-1]
cmp	ecx, esi
jz	short loc_728C29
cmp	edx, eax
jnb	short loc_728C29
lea	ecx, [ecx+edx*2]
jmp	short loc_728C2B

loc_728C29:
xor	ecx, ecx

loc_728C2B:
cmp	[ecx], si
jnz	short loc_728C32
sub	eax, ebx

loc_728C32:
cmp	eax, esi

loc_728C34:
jz	loc_7296C0

loc_728C3A:
push	0FFFFFFFFh
push	offset aTextformat ; "<TEXTFORMAT"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	edi, [ebp+0Ch]
mov	al, [edi+16h]
shr	al, 2
mov	[esp+198h+var_154], edi
test	bl, al
jz	short loc_728C95
movsx	ecx, word ptr [edi+0Eh]
lea	eax, [esp+198h+var_F4]
push	eax		; int
mov	[esp+19Ch+var_F4], ecx
lea	ecx, [esp+19Ch+var_18]
lea	edx, [esp+19Ch+var_180]
push	offset aIndent0	; " INDENT=\"{0}\""
push	ecx		; int
mov	[esp+1A4h+var_18], ebx
mov	[esp+1A4h+var_14], edx
call	sub_6574B0
add	esp, 0Ch

loc_728C95:
mov	dl, [edi+16h]
shr	dl, 1
test	bl, dl
jz	short loc_728CD2
movzx	eax, word ptr [edi+0Ch]
lea	edx, [esp+198h+var_120]
push	edx		; int
mov	[esp+19Ch+var_120], eax
lea	eax, [esp+19Ch+var_24]
lea	ecx, [esp+19Ch+var_180]
push	offset aBlockindent0 ; " BLOCKINDENT=\"{0}\""
push	eax		; int
mov	[esp+1A4h+var_24], ebx
mov	[esp+1A4h+var_20], ecx
call	sub_728240
add	esp, 0Ch

loc_728CD2:
mov	cl, [edi+16h]
shr	cl, 4
test	bl, cl
jz	short loc_728D16
movzx	edx, word ptr [edi+12h]
lea	ecx, [esp+198h+var_F0]
push	ecx		; int
mov	[esp+19Ch+var_F0], edx
lea	edx, [esp+19Ch+var_C]
lea	eax, [esp+19Ch+var_180]
push	offset aLeftmargin0 ; "	LEFTMARGIN=\"{0}\""
push	edx		; int
mov	[esp+1A4h+var_C], ebx
mov	[esp+1A4h+var_8], eax
call	sub_728240
add	esp, 0Ch

loc_728D16:
mov	al, [edi+16h]
shr	al, 5
test	bl, al
jz	short loc_728D5A
movzx	ecx, word ptr [edi+14h]
lea	eax, [esp+198h+var_F8]
push	eax		; int
mov	[esp+19Ch+var_F8], ecx
lea	ecx, [esp+19Ch+var_E4]
lea	edx, [esp+19Ch+var_180]
push	offset aRightmargin0 ; " RIGHTMARGIN=\"{0}\""
push	ecx		; int
mov	[esp+1A4h+var_E4], ebx
mov	[esp+1A4h+var_E0], edx
call	sub_728240
add	esp, 0Ch

loc_728D5A:
mov	dl, [edi+16h]
shr	dl, 3
test	bl, dl
jz	short loc_728D9E
movsx	eax, word ptr [edi+10h]
lea	edx, [esp+198h+var_118]
push	edx		; int
mov	[esp+19Ch+var_118], eax
lea	eax, [esp+19Ch+var_C0]
lea	ecx, [esp+19Ch+var_180]
push	offset aLeading0 ; " LEADING=\"{0}\""
push	eax		; int
mov	[esp+1A4h+var_C0], ebx
mov	[esp+1A4h+var_BC], ecx
call	sub_6574B0
add	esp, 0Ch

loc_728D9E:
mov	cl, [edi+16h]
shr	cl, 6
test	bl, cl
jz	short loc_728E27
push	0FFFFFFFFh
push	offset aTabstops ; " TABSTOPS=\""
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
lea	edx, [esp+198h+var_160]
push	edx
mov	ecx, edi
call	sub_6FFB40
cmp	[esp+198h+var_160], esi
jbe	short loc_728E11
mov	edi, eax
lea	esp, [esp+0]

loc_728DD0:		; int
push	edi
test	esi, esi
setnbe	al
lea	edx, [esp+19Ch+var_168+3]
push	edx		; int
mov	[esp+1A0h+var_168+3], al
lea	eax, [esp+1A0h+var_60]
lea	ecx, [esp+1A0h+var_180]
push	offset a0Sw1	; "{0:sw:,:}{1}"
push	eax		; int
mov	[esp+1A8h+var_60], ebx
mov	[esp+1A8h+var_5C], ecx
call	sub_7282C0
add	esi, ebx
add	esp, 10h
add	edi, 4
cmp	esi, [esp+198h+var_160]
jb	short loc_728DD0

loc_728E11:
push	0FFFFFFFFh
push	offset asc_154D890 ; "\""
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	edi, [esp+198h+var_154]
xor	esi, esi

loc_728E27:
push	0FFFFFFFFh
push	offset asc_1440364 ; "><"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
movzx	eax, word ptr [edi+16h]
mov	cl, al
shr	cl, 7
test	bl, cl
jz	short loc_728E4B
test	eax, 8000h
jnz	short loc_728E54

loc_728E4B:
push	0FFFFFFFFh
push	offset aP_0	; "P"
jmp	short loc_728E5B

loc_728E54:
push	0FFFFFFFFh
push	offset aLi	; "LI"

loc_728E5B:
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
push	0FFFFFFFFh
push	offset aAlign	; " ALIGN=\""
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
movzx	eax, word ptr [edi+16h]
shr	eax, 9
and	eax, 3
cmp	eax, 3		; switch 4 cases
ja	short loc_728EB5 ; default
jmp	ds:off_729718[eax*4] ; switch jump

loc_728E8A:		; jumptable 00728E83 case 0
push	0FFFFFFFFh
push	offset aLeft_1	; "LEFT"
jmp	short loc_728EAC

loc_728E93:		; jumptable 00728E83 case 1
push	0FFFFFFFFh
push	offset aRight_0	; "RIGHT"
jmp	short loc_728EAC

loc_728E9C:		; jumptable 00728E83 case 3
push	0FFFFFFFFh
push	offset aCenter_0 ; "CENTER"
jmp	short loc_728EAC

loc_728EA5:		; jumptable 00728E83 case 2
push	0FFFFFFFFh
push	offset aJustify	; "JUSTIFY"

loc_728EAC:
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_728EB5:		; default
push	0FFFFFFFFh
push	offset asc_155C8F4 ; "\">"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
lea	eax, [ebp+10h]
mov	[esp+198h+var_150], esi
mov	[esp+198h+var_14C], esi
mov	[esp+198h+var_148], esi
mov	[esp+198h+var_144], esi
mov	[esp+198h+var_140], eax
mov	[esp+198h+var_13C], eax
mov	[esp+198h+var_138], esi
mov	[esp+198h+var_134], ebp
mov	[esp+198h+var_130], esi
mov	[esp+198h+var_184], esi
mov	[esp+198h+var_185], 0
cmp	[ebp+4], esi
jbe	loc_729655
mov	edi, edi

loc_728F00:
lea	ecx, [esp+198h+var_150]
call	sub_727230
mov	edi, eax
mov	eax, [edi+0Ch]
test	eax, eax
jz	loc_72949D
mov	dx, [eax+2Ah]
shr	dx, 9
test	bl, dl
jz	short loc_728F2B
mov	ecx, [esp+198h+var_158]
add	eax, 18h
jmp	short loc_728F39

loc_728F2B:
or	dword ptr [esp+198h+var_168+4],	ebx
xor	ecx, ecx
mov	[esp+198h+var_158], ecx
lea	eax, [esp+198h+var_158]

loc_728F39:
mov	esi, [eax]
test	[esp+198h+var_168+4], bl
jz	short loc_728F4F
and	dword ptr [esp+198h+var_168+4],	0FFFFFFFEh
test	ecx, ecx
jz	short loc_728F4F
call	sub_64A400

loc_728F4F:
test	esi, esi
jz	loc_7291CA
add	[esi+4], ebx
mov	eax, [edi+0Ch]
mov	ecx, 100h
test	[eax+2Ah], cx
jz	short loc_728FA2
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	short loc_728FA2
mov	eax, [edi+0Ch]
add	eax, 10h
push	eax		; int
lea	ecx, [esp+19Ch+var_A8]
lea	edx, [esp+19Ch+var_180]
push	offset aAHref0	; "<A HREF=\"{0}\">"
push	ecx		; int
mov	[esp+1A4h+var_A8], ebx
mov	[esp+1A4h+var_A4], edx
call	sub_728350
add	esp, 0Ch

loc_728FA2:
push	0FFFFFFFFh
push	offset aImgSrc	; "<IMG	SRC=\""
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	eax, [esi+38h]
and	eax, 0FFFFFFFCh
mov	edx, [eax]
and	edx, 7FFFFFFFh
push	edx
add	eax, 8
push	eax
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D890 ; "\""
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	ecx, [esi+18h]
test	ecx, ecx
jbe	short loc_729025
mov	eax, 0CCCCCCCDh
mul	ecx
shr	edx, 4
lea	ecx, [esp+198h+var_100]
push	ecx		; int
mov	[esp+19Ch+var_100], edx
lea	edx, [esp+19Ch+var_30]
lea	eax, [esp+19Ch+var_180]
push	offset aWidth0	; " WIDTH=\"{0}\""
push	edx		; int
mov	[esp+1A4h+var_30], ebx
mov	[esp+1A4h+var_2C], eax
call	sub_728240
add	esp, 0Ch

loc_729025:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jbe	short loc_72906C
mov	eax, 0CCCCCCCDh
mul	ecx
shr	edx, 4
lea	ecx, [esp+198h+var_110]
push	ecx		; int
mov	[esp+19Ch+var_110], edx
lea	edx, [esp+19Ch+var_90]
lea	eax, [esp+19Ch+var_180]
push	offset aHeight0	; " HEIGHT=\"{0}\""
push	edx		; int
mov	[esp+1A4h+var_90], ebx
mov	[esp+1A4h+var_8C], eax
call	sub_728240
add	esp, 0Ch

loc_72906C:
mov	ecx, [esi+40h]
test	ecx, ecx
jz	short loc_7290BA
mov	eax, 66666667h
imul	ecx
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
lea	edx, [esp+198h+var_FC]
push	edx		; int
mov	[esp+19Ch+var_FC], eax
lea	eax, [esp+19Ch+var_48]
lea	ecx, [esp+19Ch+var_180]
push	offset aVspace0	; " VSPACE=\"{0}\""
push	eax		; int
mov	[esp+1A4h+var_48], ebx
mov	[esp+1A4h+var_44], ecx
call	sub_6574B0
add	esp, 0Ch

loc_7290BA:
mov	ecx, [esi+44h]
test	ecx, ecx
jz	short loc_729108
mov	eax, 66666667h
imul	ecx
sar	edx, 3
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
lea	eax, [esp+198h+var_108]
push	eax		; int
mov	[esp+19Ch+var_108], ecx
lea	ecx, [esp+19Ch+var_78]
lea	edx, [esp+19Ch+var_180]
push	offset aHspace0	; " HSPACE=\"{0}\""
push	ecx		; int
mov	[esp+1A4h+var_78], ebx
mov	[esp+1A4h+var_74], edx
call	sub_6574B0
add	esp, 0Ch

loc_729108:
mov	edx, [esi+3Ch]
lea	eax, [esi+3Ch]
and	edx, 0FFFFFFFCh
test	dword ptr [edx], 7FFFFFFFh
jz	short loc_729141
push	eax		; int
lea	edx, [esp+19Ch+var_D8]
lea	ecx, [esp+19Ch+var_180]
push	offset aId0	; " ID=\"{0}\""
push	edx		; int
mov	[esp+1A4h+var_D8], ebx
mov	[esp+1A4h+var_D4], ecx
call	sub_728350
add	esp, 0Ch

loc_729141:
push	0FFFFFFFFh
push	offset aAlign	; " ALIGN=\""
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
movzx	eax, byte ptr [esi+4Ch]
sub	eax, 0
jz	short loc_729174
sub	eax, ebx
jz	short loc_72916B
sub	eax, ebx
jnz	short loc_729184
push	0FFFFFFFFh
push	offset aLeft_0	; "left"
jmp	short loc_72917B

loc_72916B:
push	0FFFFFFFFh
push	offset aRight	; "right"
jmp	short loc_72917B

loc_729174:
push	0FFFFFFFFh
push	offset aBaseline ; "baseline"

loc_72917B:
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_729184:
push	0FFFFFFFFh
push	offset asc_155C8F4 ; "\">"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	edi, [edi+0Ch]
mov	eax, 100h
test	[edi+2Ah], ax
jz	short loc_7291BE
lea	ecx, [edi+10h]
call	sub_679930
test	eax, eax
jz	short loc_7291BE
push	0FFFFFFFFh
push	offset aA	; "</A>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_7291BE:
mov	ecx, esi
call	sub_64A400
jmp	loc_7295EE

loc_7291CA:
cmp	[esp+198h+var_185], 0
mov	esi, [esp+198h+var_184]
jz	short loc_729200
test	esi, esi
jz	loc_7293ED
mov	eax, [edi+0Ch]
push	eax
mov	ecx, esi
call	sub_700010
test	al, al
jnz	loc_7293ED
push	0FFFFFFFFh
push	offset aFont_1	; "</FONT>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_729200:
push	0FFFFFFFFh
push	offset aFont_2	; "<FONT"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	ecx, [edi+0Ch]
mov	dl, [ecx+2Ah]
shr	dl, 2
test	bl, dl
jz	short loc_72924A
lea	eax, [esp+198h+var_180]
mov	[esp+198h+var_CC], ebx
mov	[esp+198h+var_C8], eax
call	sub_700520
push	eax		; int
lea	ecx, [esp+19Ch+var_CC]
push	offset aFace0	; " FACE=\"{0}\""
push	ecx		; int
call	sub_728350
add	esp, 0Ch

loc_72924A:
mov	eax, [edi+0Ch]
mov	dl, [eax+2Ah]
shr	dl, 3
test	bl, dl
jz	short loc_7292C3
movzx	eax, word ptr [eax+26h]
fnstcw	word ptr [esp+198h+var_168]
mov	[esp+198h+var_184], eax
movzx	eax, word ptr [esp+198h+var_168]
fild	[esp+198h+var_184]
or	eax, 0C00h
lea	edx, [esp+198h+var_180]
fdiv	ds:dbl_15FCE20
mov	[esp+198h+var_B4], ebx
mov	[esp+198h+var_B0], edx
fstp	[esp+198h+var_184]
fld	[esp+198h+var_184]
mov	[esp+198h+var_184], eax
fldcw	word ptr [esp+198h+var_184]
lea	eax, [esp+198h+var_128]
push	eax		; int
push	offset aSize0	; " SIZE=\"{0}\""
fistp	qword ptr [esp+1A0h+var_128]
mov	ecx, [esp+1A0h+var_128]
mov	[esp+1A0h+var_128], ecx
lea	ecx, [esp+1A0h+var_B4]
push	ecx		; int
fldcw	word ptr [esp+1A4h+var_168]
call	sub_728240
add	esp, 0Ch

loc_7292C3:
mov	eax, [edi+0Ch]
test	[eax+2Ah], bl
jz	short loc_729307
mov	edx, [eax+20h]
and	edx, offset sub_FFFFFF
lea	ecx, [esp+198h+var_11C]
push	ecx		; int
mov	[esp+19Ch+var_11C], edx
lea	edx, [esp+19Ch+var_9C]
lea	eax, [esp+19Ch+var_180]
push	offset aColor0X_6 ; " COLOR=\"#{0:X:.6}\""
push	edx		; int
mov	[esp+1A4h+var_9C], ebx
mov	[esp+1A4h+var_98], eax
call	sub_728240
add	esp, 0Ch

loc_729307:
mov	eax, [edi+0Ch]
mov	cl, [eax+2Ah]
shr	cl, 1
test	bl, cl
jz	short loc_72935B
movsx	edx, word ptr [eax+24h]
mov	[esp+198h+var_184], edx
lea	ecx, [esp+198h+var_114]
push	ecx		; int
fild	[esp+19Ch+var_184]
lea	edx, [esp+19Ch+var_84]
lea	eax, [esp+19Ch+var_180]
push	offset aLetterspacing0 ; " LETTERSPACING=\"{0}\""
fdiv	ds:dbl_15FCE20
push	edx		; int
mov	[esp+1A4h+var_84], ebx
mov	[esp+1A4h+var_80], eax
fstp	[esp+1A4h+var_114]
call	sub_7283D0
add	esp, 0Ch

loc_72935B:
mov	eax, [edi+0Ch]
mov	cx, [eax+2Ah]
shr	cx, 0Ah
test	bl, cl
jz	short loc_72939E
movzx	edx, byte ptr [eax+23h]
lea	ecx, [esp+198h+var_12C]
push	ecx		; int
mov	[esp+19Ch+var_12C], edx
lea	edx, [esp+19Ch+var_6C]
lea	eax, [esp+19Ch+var_180]
push	offset aAlpha0X_2 ; " ALPHA=\"#{0:X:.2}\""
push	edx		; int
mov	[esp+1A4h+var_6C], ebx
mov	[esp+1A4h+var_68], eax
call	sub_728240
add	esp, 0Ch

loc_72939E:
mov	eax, [edi+0Ch]
mov	cl, [eax+28h]
shr	cl, 3
and	cl, bl
lea	eax, [esp+198h+var_168]
push	eax		; int
mov	[esp+19Ch+var_168], cl
lea	ecx, [esp+19Ch+var_54]
lea	edx, [esp+19Ch+var_180]
push	offset aKerning0Sw10 ; " KERNING=\"{0:sw:1:0}\""
push	ecx		; int
mov	[esp+1A4h+var_54], ebx
mov	[esp+1A4h+var_50], edx
call	sub_728450
add	esp, 0Ch
push	0FFFFFFFFh
push	offset asc_154D870 ; ">"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	[esp+198h+var_185], bl

loc_7293ED:
mov	eax, [edi+0Ch]
mov	edx, 100h
test	[eax+2Ah], dx
jz	short loc_729435
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	short loc_729435
mov	ecx, [edi+0Ch]
add	ecx, 10h
push	ecx		; int
lea	edx, [esp+19Ch+var_3C]
lea	eax, [esp+19Ch+var_180]
push	offset aAHref0	; "<A HREF=\"{0}\">"
push	edx		; int
mov	[esp+1A4h+var_3C], ebx
mov	[esp+1A4h+var_38], eax
call	sub_728350
add	esp, 0Ch

loc_729435:
mov	eax, [edi+0Ch]
test	[eax+28h], bl
jz	short loc_72944D
push	0FFFFFFFFh
push	offset aB_3	; "<B>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_72944D:
mov	ecx, [edi+0Ch]
test	byte ptr [ecx+28h], 2
jz	short loc_729466
push	0FFFFFFFFh
push	offset aI_6	; "<I>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_729466:
mov	edx, [edi+0Ch]
test	byte ptr [edx+28h], 4
jz	short loc_72947F
push	0FFFFFFFFh
push	offset aU_6	; "<U>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_72947F:
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_72948B
call	sub_64A420

loc_72948B:
test	esi, esi
jz	short loc_729496
mov	ecx, esi
call	sub_64A430

loc_729496:
mov	eax, [edi+0Ch]
mov	[esp+198h+var_184], eax

loc_72949D:
xor	esi, esi
cmp	[edi+8], esi
jbe	loc_729576
mov	ebp, [esp+198h+var_15C]
lea	esp, [esp+0]

loc_7294B0:
mov	dl, [ebp+20h]
mov	ecx, [edi]
movzx	eax, word ptr [ecx+esi*2]
and	dl, 2
neg	dl
sbb	dl, dl
and	dl, 3
add	dl, 0Ah
movzx	cx, dl
cmp	ax, cx
jz	loc_72956B
test	ax, ax
jz	loc_72956B
movzx	ecx, ax
lea	eax, [ecx-22h]
cmp	eax, 7Eh	; switch 127 cases
ja	short loc_729561 ; default
			; jumptable 007294EE cases 1-3,6-25,27,29-125
movzx	edx, ds:byte_729744[eax]
jmp	ds:off_729728[edx*4] ; switch jump

loc_7294F5:		; jumptable 007294EE case 26
push	0FFFFFFFFh
push	offset aLt	; "&lt;"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
jmp	short loc_72956B

loc_729507:		; jumptable 007294EE case 28
push	0FFFFFFFFh
push	offset aGt	; "&gt;"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
jmp	short loc_72956B

loc_729519:		; jumptable 007294EE case 4
push	0FFFFFFFFh
push	offset aAmp	; "&amp;"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
jmp	short loc_72956B

loc_72952B:		; jumptable 007294EE case 0
push	0FFFFFFFFh
push	offset aQuot	; "&quot;"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
jmp	short loc_72956B

loc_72953D:		; jumptable 007294EE case 5
push	0FFFFFFFFh
push	offset aApos	; "&apos;"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
jmp	short loc_72956B

loc_72954F:		; jumptable 007294EE case 126
push	0FFFFFFFFh
push	offset aNbsp	; "&nbsp;"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
jmp	short loc_72956B

loc_729561:		; default
push	ecx		; jumptable 007294EE cases 1-3,6-25,27,29-125
lea	ecx, [esp+19Ch+var_180]
call	sub_679C60

loc_72956B:
add	esi, ebx
cmp	esi, [edi+8]
jb	loc_7294B0

loc_729576:
mov	eax, [edi+0Ch]
test	eax, eax
jz	short loc_7295EE
test	byte ptr [eax+28h], 4
jz	short loc_729593
push	0FFFFFFFFh
push	offset aU	; "</U>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_729593:
mov	eax, [edi+0Ch]
test	byte ptr [eax+28h], 2
jz	short loc_7295AC
push	0FFFFFFFFh
push	offset aI	; "</I>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_7295AC:
mov	ecx, [edi+0Ch]
test	[ecx+28h], bl
jz	short loc_7295C4
push	0FFFFFFFFh
push	offset aB	; "</B>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_7295C4:
mov	edi, [edi+0Ch]
mov	edx, 100h
test	[edi+2Ah], dx
jz	short loc_7295EE
lea	ecx, [edi+10h]
call	sub_679930
test	eax, eax
jz	short loc_7295EE
push	0FFFFFFFFh
push	offset aA	; "</A>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_7295EE:
mov	eax, [esp+198h+var_138]
mov	ebp, [esp+198h+var_134]
test	eax, eax
jl	short loc_72962E
mov	edi, [esp+198h+var_13C]
cmp	eax, [edi+4]
jnb	short loc_72962E
mov	edx, [edi]
lea	ecx, [eax+eax*2]
mov	esi, [edx+ecx*4]
lea	edx, [edx+ecx*4]
mov	ecx, [esp+198h+var_130]
cmp	ecx, esi
jnb	short loc_72961A
mov	ecx, esi
jmp	short loc_729631

loc_72961A:
add	ecx, [edx+4]
mov	[esp+198h+var_130], ecx
cmp	eax, [edi+4]
jge	short loc_729635
add	eax, ebx
mov	[esp+198h+var_138], eax
jmp	short loc_729635

loc_72962E:
mov	ecx, [ebp+4]

loc_729631:
mov	[esp+198h+var_130], ecx

loc_729635:
cmp	ecx, [ebp+4]
jb	loc_728F00
cmp	[esp+198h+var_185], 0
jz	short loc_729655
push	0FFFFFFFFh
push	offset aFont_1	; "</FONT>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10

loc_729655:
push	0FFFFFFFFh
push	offset asc_154D940 ; "</"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	eax, [esp+198h+var_154]
movzx	eax, word ptr [eax+16h]
mov	cl, al
shr	cl, 7
test	bl, cl
jz	short loc_72967D
test	eax, 8000h
jnz	short loc_729686

loc_72967D:
push	0FFFFFFFFh
push	offset aP_0	; "P"
jmp	short loc_72968D

loc_729686:
push	0FFFFFFFFh
push	offset aLi	; "LI"

loc_72968D:
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
push	0FFFFFFFFh
push	offset aTextformat_0 ; "></TEXTFORMAT>"
lea	ecx, [esp+1A0h+var_180]
call	sub_679D10
mov	ecx, [esp+198h+var_184]
test	ecx, ecx
jz	short loc_7296B3
call	sub_64A430

loc_7296B3:
mov	ecx, [esp+198h+var_144]
test	ecx, ecx
jz	short loc_7296C0
call	sub_64A430

loc_7296C0:
mov	edx, [esp+198h+var_15C]
mov	ecx, [esp+198h+var_E8]
add	edx, 0Ch
cmp	ecx, [edx+4]
jge	short loc_7296DC
add	ecx, ebx
mov	[esp+198h+var_E8], ecx

loc_7296DC:
mov	eax, [esp+198h+var_104]
xor	esi, esi
jmp	loc_728BE0

loc_7296EA:
mov	esi, [esp+198h+arg_0]
lea	edx, [esp+198h+var_180]
push	edx
mov	ecx, esi
call	sub_67B010
lea	ecx, [esp+198h+var_180]
call	sub_679B60
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 188h
retn	4
sub_728BA0 endp

align 4
off_729718 dd offset loc_728E8A	; jump table for switch	statement
dd offset loc_728E93
dd offset loc_728EA5
dd offset loc_728E9C
off_729728 dd offset loc_72952B, offset	loc_729519 ; jump table	for switch statement
dd offset loc_72953D, offset loc_7294F5
dd offset loc_729507, offset loc_72954F
dd offset loc_729561
byte_729744 db	    0,	   6,	  6,	 6 ; indirect table for	switch statement
db	1,     2,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     3,     6
db	4,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     5
align 10h



sub_7297D0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
mov	esi, [ebx+4]
push	edi
push	ebx
call	sub_7281E0
cmp	edi, esi
jbe	short loc_729809
sub	edi, esi
mov	ecx, [ebx]
lea	eax, [esi+esi*2]
lea	eax, [ecx+eax*4]
jz	short loc_729809
xor	ecx, ecx

loc_7297F5:
cmp	eax, ecx
jz	short loc_729801
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx

loc_729801:
add	eax, 0Ch
sub	edi, 1
jnz	short loc_7297F5

loc_729809:
pop	edi
pop	esi
pop	ebx
retn	4
sub_7297D0 endp

align 10h



sub_729810 proc	near

arg_0= dword ptr  4

; FUNCTION CHUNK AT 00726120 SIZE 00000060 BYTES

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
inc	eax
push	eax
push	ecx
mov	ecx, esi
call	sub_727740
mov	edx, [esi+4]
mov	eax, [esi]
imul	edx, 2Ch
lea	ecx, [edx+eax-2Ch]
pop	esi
test	ecx, ecx
jz	short locret_729839
jmp	loc_726120

locret_729839:
retn	4
sub_729810 endp

align 10h



sub_729840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	edi
mov	edi, [esp+4+arg_4]
mov	eax, edi
imul	eax, 54h
lea	eax, [ecx+eax-54h]
test	edi, edi
jbe	short loc_729885
push	esi
lea	esi, [eax+3Ch]
lea	ebx, [ebx+0]

loc_729860:
mov	ecx, esi
mov	dword ptr [esi], offset	off_143AB58
call	sub_6FFB90
mov	ecx, esi
call	sub_64A3F0
lea	ecx, [esi-2Ch]
call	sub_694380
sub	esi, 54h
sub	edi, 1
jnz	short loc_729860
pop	esi

loc_729885:
pop	edi
retn
sub_729840 endp

align 10h



sub_729890 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_7298C0
mov	eax, [edi]
test	eax, eax
jz	short loc_7298B5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7298B5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_7298C0:
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_7298F1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	ebx
mov	ebx, esi
imul	ebx, 54h
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_7298F1:
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
imul	eax, 54h
push	eax
mov	[esp+10h+arg_4], 2
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_729890 endp

align 10h



sub_729920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+4]
inc	eax
push	eax
call	sub_7297D0
mov	eax, [edi+4]
mov	esi, [esp+8+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_72995C
mov	ecx, [edi]
sub	eax, esi
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*4]
dec	eax
lea	edx, [eax+eax*2]
add	edx, edx
add	edx, edx
push	edx
push	ecx
add	ecx, 0Ch
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_72995C:
mov	ecx, [edi]
lea	eax, [esi+esi*2]
lea	esi, [ecx+eax*4]
test	esi, esi
jz	short loc_729988
mov	edi, [esp+8+arg_4]
mov	eax, [edi+4]
mov	edx, [edi]
mov	[esi], edx
mov	[esi+4], eax
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_729982
call	sub_64A420

loc_729982:
mov	eax, [edi+8]
mov	[esi+8], eax

loc_729988:
pop	edi
pop	esi
retn	8
sub_729920 endp

align 10h



sub_729990 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+24h], cx
mov	ecx, [edx+18h]
push	esi
lea	esi, [ecx+1]
mov	[edx+18h], esi
mov	[eax+20h], ecx
pop	esi
retn	4
sub_729990 endp

align 10h



sub_7299D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_729A10
sub	eax, esi
push	eax
mov	eax, esi
imul	eax, 54h
add	eax, [edi]
push	eax
call	sub_729840
mov	ecx, [edi+8]
shr	ecx, 1
add	esp, 8
cmp	esi, ecx
jnb	short loc_729A29
mov	edx, [esp+8+arg_0]
push	esi
push	edx
mov	ecx, edi
call	sub_729890
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_729A10:
cmp	esi, [edi+8]
jb	short loc_729A29
mov	ecx, [esp+8+arg_0]
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax
push	ecx
mov	ecx, edi
call	sub_729890

loc_729A29:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_7299D0 endp

align 10h



sub_729A40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 1
jnz	short loc_729A54
push	0
call	sub_7297D0
pop	esi
retn	4

loc_729A54:
mov	eax, [esi]
push	ebx
mov	ebx, [esp+8+arg_0]
push	edi
lea	edi, [ebx+ebx*2]
add	edi, edi
add	edi, edi
mov	ecx, [edi+eax+8]
lea	eax, [edi+eax+8]
test	ecx, ecx
jz	short loc_729A74
call	sub_64A430

loc_729A74:
mov	eax, [esi+4]
mov	ecx, [esi]
sub	eax, ebx
dec	eax
lea	edx, [eax+eax*2]
add	edx, edx
add	ecx, edi
add	edx, edx
push	edx
lea	eax, [ecx+0Ch]
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 0Ch
pop	edi
pop	ebx
pop	esi
retn	4
sub_729A40 endp

align 10h



sub_729AA0 proc	near
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esi+1Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	edi, edi
push	edi
push	28h
call	edx
cmp	eax, edi
jz	short loc_729AE3
mov	[eax], edi
mov	[eax+4], edi
mov	[eax+8], edi
mov	[eax+0Ch], edi
mov	[eax+10h], edi
mov	[eax+14h], edi
mov	[eax+18h], edi
xor	ecx, ecx
mov	[eax+1Ch], edi
mov	[eax+24h], cx
mov	ecx, [esi+18h]
lea	edx, [ecx+1]
mov	[esi+18h], edx
pop	edi
mov	[eax+20h], ecx
pop	esi
retn

loc_729AE3:
pop	edi
xor	eax, eax
pop	esi
retn
sub_729AA0 endp

align 10h



sub_729AF0 proc	near

var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_2= word ptr	-2
arg_0= dword ptr  4

sub	esp, 30h
push	esi
push	edi
mov	edi, [esp+38h+arg_0]
mov	esi, ecx
mov	cx, [edi+2Ah]
xor	eax, eax
shr	cx, 9
mov	[esp+38h+var_30], eax
test	cl, 1
jz	short loc_729B17
mov	ecx, [esp+38h+arg_0]
lea	edx, [edi+18h]
jmp	short loc_729B26

loc_729B17:
xor	ecx, ecx
mov	eax, 1
mov	[esp+38h+arg_0], ecx
lea	edx, [esp+38h+arg_0]

loc_729B26:
push	ebx
mov	ebx, [edx]
test	al, 1
jz	short loc_729B36
test	ecx, ecx
jz	short loc_729B36
call	sub_64A400

loc_729B36:
test	ebx, ebx
pop	ebx
jz	short loc_729B9B
push	0
push	edi
lea	ecx, [esp+40h+var_2C]
call	sub_700E90
mov	ecx, [esp+38h+var_14]
test	ecx, ecx
jz	short loc_729B54
call	sub_64A400

loc_729B54:
lea	eax, [esp+38h+var_2C]
mov	edx, 200h
or	[esp+38h+var_2], dx
push	eax
mov	ecx, esi
mov	[esp+3Ch+var_14], 0
call	sub_7204E0
mov	ecx, eax
call	sub_702780
mov	ecx, [esi+1Ch]
mov	edi, eax
test	ecx, ecx
jz	short loc_729B87
call	sub_64A430

loc_729B87:
lea	ecx, [esp+38h+var_2C]
mov	[esi+1Ch], edi
call	sub_694380
pop	edi
pop	esi
add	esp, 30h
retn	4

loc_729B9B:
push	edi
mov	ecx, esi
call	sub_7204E0
mov	ecx, eax
call	sub_702780
mov	ecx, [esi+1Ch]
mov	edi, eax
test	ecx, ecx
jz	short loc_729BB8
call	sub_64A430

loc_729BB8:
mov	[esi+1Ch], edi
pop	edi
pop	esi
add	esp, 30h
retn	4
sub_729AF0 endp

align 10h



sub_729BD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
push	eax
mov	esi, ecx
call	sub_7204E0
mov	ecx, eax
call	sub_702870
mov	ecx, [esi+18h]
mov	edi, eax
test	ecx, ecx
jz	short loc_729BF3
call	sub_64A400

loc_729BF3:
mov	[esi+18h], edi
pop	edi
pop	esi
retn	4
sub_729BD0 endp

align 10h



sub_729C00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebx, ecx
mov	cx, [esi+2Ah]
xor	eax, eax
shr	cx, 9
mov	[esp+0Ch+var_4], eax
test	cl, 1
jz	short loc_729C25
mov	ecx, [esp+0Ch+arg_0]
lea	edx, [esi+18h]
jmp	short loc_729C34

loc_729C25:
xor	ecx, ecx
mov	eax, 1
mov	[esp+0Ch+arg_0], ecx
lea	edx, [esp+0Ch+arg_0]

loc_729C34:
push	edi
mov	edi, [edx]
test	al, 1
jz	short loc_729C44
test	ecx, ecx
jz	short loc_729C44
call	sub_64A400

loc_729C44:
test	edi, edi
pop	edi
jz	short loc_729C57
push	esi
mov	ecx, ebx
call	sub_729AF0
pop	esi
pop	ebx
pop	ecx
retn	4

loc_729C57:
mov	ecx, esi
call	sub_64A420
mov	ecx, [ebx+1Ch]
test	ecx, ecx
jz	short loc_729C6A
call	sub_64A430

loc_729C6A:
mov	[ebx+1Ch], esi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_729C00 endp

align 10h



sub_729C80 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	ebx, ecx
mov	eax, [ebx+0Ch]
mov	ebp, [ebx+4]
push	edi
push	eax
call	sub_7299D0
cmp	edi, ebp
jbe	short loc_729CBA
push	esi
mov	esi, ebp
imul	esi, 54h
add	esi, [ebx]
sub	edi, ebp
jz	short loc_729CB9

loc_729CA6:
test	esi, esi
jz	short loc_729CB1
mov	ecx, esi
call	sub_728630

loc_729CB1:
add	esi, 54h
sub	edi, 1
jnz	short loc_729CA6

loc_729CB9:
pop	esi

loc_729CBA:
pop	edi
pop	ebp
pop	ebx
retn	4
sub_729C80 endp




sub_729CC0 proc	near
mov	eax, [ecx+4]
test	eax, eax
jl	short locret_729CD4
mov	ecx, [ecx]
cmp	eax, [ecx+4]
jnb	short locret_729CD4
push	eax
call	sub_729A40

locret_729CD4:
retn
sub_729CC0 endp

align 10h



sub_729CE0 proc	near
push	esi
mov	esi, ecx
push	0
lea	ecx, [esi+10h]
mov	dword ptr [esi+4], 0
call	sub_7297D0
inc	word ptr [esi+24h]
pop	esi
retn
sub_729CE0 endp

align 10h



sub_729D00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax]
test	esi, esi
jz	short loc_729D46
mov	ecx, [esi+14h]
mov	edx, [esi+10h]
push	ecx
push	edx
call	sub_71EDB0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
add	esp, 8
push	edx
call	eax
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_729D38
call	sub_64A400

loc_729D38:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_729D46:
pop	esi
retn
sub_729D00 endp

align 10h



sub_729D50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 1Ch
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
test	esi, esi
jbe	loc_72A10A
push	ebx
push	ebp
mov	ebp, [eax]
push	ebp
call	sub_726180
mov	[esp+2Ch+var_14], edi
test	eax, eax
jge	short loc_729D7C
xor	esi, esi
jmp	short loc_729D85

loc_729D7C:
cmp	eax, esi
jb	short loc_729D83
dec	esi
jmp	short loc_729D85

loc_729D83:
mov	esi, eax

loc_729D85:
mov	ecx, [edi]
lea	ebx, [esi+esi*2]
add	ebx, ebx
add	ebx, ebx
mov	eax, [ecx+ebx]
add	ecx, ebx
cmp	ebp, eax
mov	[esp+2Ch+var_10], esi
jl	loc_729EF7
mov	edx, [esp+2Ch+arg_0]
mov	edx, [edx+4]
add	edx, ebp
mov	[esp+2Ch+var_1C], edx
mov	edx, [ecx+4]
lea	eax, [edx+eax-1]
mov	edx, [esp+2Ch+var_1C]
dec	edx
cmp	edx, eax
jg	loc_729EF7
cmp	[ecx], ebp
jnz	short loc_729E16
mov	ebp, [esp+2Ch+arg_0]
mov	edx, [ebp+4]
mov	eax, [ecx+4]
cmp	edx, eax
jle	short loc_729DD4
mov	edx, eax

loc_729DD4:
add	[ecx], edx
sub	eax, edx
mov	[ecx+4], eax
mov	eax, [edi]
cmp	dword ptr [ebx+eax+4], 0
lea	ecx, [ebx+eax]
push	ebp
jnz	short loc_729DEF
call	sub_7260E0
jmp	short loc_729DF7

loc_729DEF:
push	esi
mov	ecx, edi
call	sub_729920

loc_729DF7:
cmp	esi, [edi+4]
mov	ebx, [esp+2Ch+var_14]
mov	[esp+2Ch+var_1C], ebx
mov	[esp+2Ch+var_18], esi
jge	loc_729F91
inc	esi
mov	[esp+2Ch+var_10], esi
jmp	loc_729F91

loc_729E16:
mov	edx, [ecx+4]
add	edx, [ecx]
cmp	edx, [esp+2Ch+var_1C]
jle	loc_729EB8
push	ecx
lea	ecx, [esp+30h+var_C]
call	sub_7260B0
mov	eax, [edi]
mov	edx, [ebx+eax+4]
mov	ebp, [esp+2Ch+arg_0]
sub	edx, [ebp+0]
lea	ecx, [ebx+eax]
add	edx, [ecx]
push	edx
call	sub_6CD100
mov	eax, [edi]
mov	eax, [ebx+eax+4]
add	eax, [ebp+4]
mov	ecx, [esp+2Ch+var_8]
cmp	eax, ecx
jle	short loc_729E5A
mov	eax, ecx

loc_729E5A:
add	[esp+2Ch+var_C], eax
sub	ecx, eax
push	ebp
mov	[esp+30h+var_8], ecx
lea	ebx, [esi+1]
push	ebx
mov	ecx, edi
call	sub_729920
cmp	esi, [edi+4]
jge	short loc_729E7B
mov	esi, ebx
mov	[esp+2Ch+var_10], esi

loc_729E7B:
mov	ebx, [esp+2Ch+var_14]
lea	ecx, [esp+2Ch+var_C]
push	ecx
lea	ebp, [esi+1]
push	ebp
mov	ecx, edi
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_18], esi
call	sub_729920
cmp	esi, [edi+4]
jge	short loc_729EA2
mov	esi, ebp
mov	[esp+2Ch+var_10], esi

loc_729EA2:
mov	ecx, [esp+2Ch+var_4]
test	ecx, ecx
jz	loc_729F8D
call	sub_64A430
jmp	loc_729F8D

loc_729EB8:
mov	ebp, [esp+2Ch+arg_0]
mov	eax, [ebp+4]
push	eax
call	sub_6CD100
cmp	esi, [edi+4]
jge	short loc_729ECF
inc	esi
mov	[esp+2Ch+var_10], esi

loc_729ECF:
mov	ebx, [esp+2Ch+var_14]
push	ebp
push	esi
mov	ecx, edi
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_18], esi
call	sub_729920
cmp	esi, [edi+4]
jge	loc_729F8D
inc	esi
mov	[esp+2Ch+var_10], esi
jmp	loc_729F91

loc_729EF7:
mov	eax, [ecx]
cmp	ebp, eax
jl	short loc_729F45
mov	edx, [ecx+4]
lea	eax, [edx+eax-1]
cmp	ebp, eax
jg	short loc_729F45
mov	eax, edx
sub	eax, ebp
add	eax, [ecx]
cmp	eax, edx
jbe	short loc_729F1B
mov	dword ptr [ecx+4], 0
jmp	short loc_729F20

loc_729F1B:
sub	edx, eax
mov	[ecx+4], edx

loc_729F20:
cmp	esi, [edi+4]
jge	short loc_729F2A
inc	esi
mov	[esp+2Ch+var_10], esi

loc_729F2A:
mov	ecx, [esp+2Ch+arg_0]
mov	ebx, [esp+2Ch+var_14]
push	ecx
push	esi
mov	ecx, edi
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_18], esi
call	sub_729920
jmp	short loc_729F83

loc_729F45:
push	ebp
call	sub_6C4400
mov	ecx, edi
test	eax, eax
jle	short loc_729F5E
mov	edx, [esp+2Ch+arg_0]
push	edx
push	esi
call	sub_729920
jmp	short loc_729F77

loc_729F5E:
mov	eax, [esp+2Ch+arg_0]
push	eax
lea	ebx, [esi+1]
push	ebx
call	sub_729920
cmp	esi, [edi+4]
jge	short loc_729F77
mov	esi, ebx
mov	[esp+2Ch+var_10], esi

loc_729F77:
mov	ebx, [esp+2Ch+var_14]
mov	[esp+2Ch+var_18], esi
mov	[esp+2Ch+var_1C], ebx

loc_729F83:
cmp	esi, [edi+4]
jge	short loc_729F8D
inc	esi
mov	[esp+2Ch+var_10], esi

loc_729F8D:
mov	ebp, [esp+2Ch+arg_0]

loc_729F91:
lea	ecx, [esp+2Ch+var_14]
call	sub_726090
test	al, al
jnz	short loc_729FF1
lea	ecx, [esi+esi*2]
add	ecx, ecx
add	ecx, ecx
mov	[esp+2Ch+arg_0], ecx
jmp	short loc_729FB4
jmp	short loc_729FB0
align 10h

loc_729FB0:
mov	ecx, [esp+2Ch+arg_0]

loc_729FB4:
mov	eax, [edi]
mov	edx, [ebp+0]
add	eax, ecx
mov	ecx, [eax]
cmp	ecx, edx
jl	short loc_729FF1
mov	eax, [eax+4]
lea	ecx, [eax+ecx-1]
mov	eax, [ebp+4]
lea	edx, [eax+edx-1]
cmp	ecx, edx
jg	short loc_729FF1
test	esi, esi
jl	short loc_729FE4
cmp	esi, [edi+4]
jnb	short loc_729FE4
push	esi
mov	ecx, edi
call	sub_729A40

loc_729FE4:
lea	ecx, [esp+2Ch+var_14]
call	sub_726090
test	al, al
jz	short loc_729FB0

loc_729FF1:
test	esi, esi
jl	short loc_72A035
cmp	esi, [edi+4]
jnb	short loc_72A035
mov	ecx, [ebp+4]
mov	edx, [ebp+0]
lea	eax, [esi+esi*2]
mov	esi, [edi]
lea	eax, [esi+eax*4]
mov	esi, [eax]
lea	edi, [ecx+edx-1]
cmp	edi, esi
jl	short loc_72A035
mov	edi, [eax+4]
lea	edi, [edi+esi-1]
lea	esi, [ecx+edx-1]
cmp	esi, edi
jg	short loc_72A035
sub	ecx, [eax]
add	ecx, edx
mov	edx, [eax+4]
cmp	ecx, edx
jle	short loc_72A02E
mov	ecx, edx

loc_72A02E:
add	[eax], ecx
sub	edx, ecx
mov	[eax+4], edx

loc_72A035:
mov	esi, [esp+2Ch+var_18]
mov	[esp+2Ch+var_10], esi
test	esi, esi
jl	short loc_72A09B
lea	ecx, [esi-1]
mov	[esp+2Ch+var_10], ecx
test	ecx, ecx
jl	short loc_72A09B
cmp	ecx, [ebx+4]
jnb	short loc_72A09B
mov	eax, [ebx]
lea	edx, [ecx+ecx*2]
cmp	dword ptr [eax+edx*4+4], 0
lea	eax, [eax+edx*4]
jnz	short loc_72A06A
push	ecx
mov	ecx, ebx
call	sub_729A40
jmp	short loc_72A09B

loc_72A06A:
mov	ecx, [eax+4]
add	ecx, [eax]
cmp	ecx, [ebp+0]
jnz	short loc_72A09B
mov	ecx, [ebx]
mov	edi, [eax+8]
lea	edx, [esi+esi*2]
cmp	edi, [ecx+edx*4+8]
jnz	short loc_72A09B
mov	edx, [ebp+4]
add	[eax+4], edx
lea	ecx, [esp+2Ch+var_1C]
call	sub_729CC0
mov	eax, [esp+2Ch+var_10]
mov	[esp+2Ch+var_18], eax
mov	esi, eax

loc_72A09B:
mov	ecx, [ebx+4]
cmp	esi, ecx
mov	eax, esi
mov	[esp+2Ch+var_14], ebx
mov	[esp+2Ch+var_10], eax
jge	short loc_72A0B3
lea	eax, [esi+1]
mov	[esp+2Ch+var_10], eax

loc_72A0B3:
test	eax, eax
jl	short loc_72A0D3
cmp	eax, ecx
jnb	short loc_72A0D3
mov	edx, [ebx]
lea	ecx, [eax+eax*2]
mov	edi, [edx+ecx*4+4]
lea	ecx, [edx+ecx*4]
test	edi, edi
jnz	short loc_72A0DD
push	eax
mov	ecx, ebx
call	sub_729A40

loc_72A0D3:
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_72A0DD:
lea	eax, [esi+esi*2]
lea	eax, [edx+eax*4]
mov	edx, [eax+4]
add	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_72A0D3
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnz	short loc_72A0D3
add	[eax+4], edi
lea	ecx, [esp+2Ch+var_14]
call	sub_729CC0
pop	ebp
pop	ebx
pop	edi
pop	esi
add	esp, 1Ch
retn	4

loc_72A10A:
push	eax
push	0
call	sub_729920
pop	edi
pop	esi
add	esp, 1Ch
retn	4
sub_729D50 endp

align 10h



sub_72A120 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebp
mov	ebp, ecx
push	esi
mov	esi, [ebp+4]
mov	[esp+1Ch+var_14], ebp
mov	[esp+1Ch+var_10], esi
test	esi, esi
jbe	loc_72A3C2
push	ebx
mov	ebx, [esp+20h+arg_0]
push	edi
push	ebx
call	sub_726180
mov	[esp+24h+var_8], ebp
test	eax, eax
jge	short loc_72A152
xor	esi, esi
jmp	short loc_72A15B

loc_72A152:
cmp	eax, esi
jb	short loc_72A159
dec	esi
jmp	short loc_72A15B

loc_72A159:
mov	esi, eax

loc_72A15B:
mov	ecx, [esp+24h+arg_4]
mov	[esp+24h+var_4], esi
cmp	ecx, 0FFFFFFFFh
jnz	short loc_72A175
mov	eax, 7FFFFFFFh
sub	eax, ebx
mov	[esp+24h+arg_4], eax
mov	ecx, eax

loc_72A175:
mov	edx, [ebp+0]
lea	eax, [esi+esi*2]
lea	edi, [edx+eax*4]
mov	eax, [edi]
cmp	ebx, eax
jl	loc_72A280
mov	edx, [edi+4]
add	edx, eax
mov	[esp+24h+arg_0], edx
lea	ebp, [ebx+ecx-1]
dec	edx
cmp	ebp, edx
jg	loc_72A237
cmp	eax, ebx
jnz	short loc_72A1D8
mov	edx, [edi+4]
cmp	ecx, edx
jle	short loc_72A1AB
mov	ecx, edx

loc_72A1AB:
add	eax, ecx
sub	[edi+4], ecx
mov	[edi], eax
jnz	loc_72A297
test	esi, esi
jl	loc_72A297
mov	ecx, [esp+24h+var_14]
cmp	esi, [ecx+4]
jnb	loc_72A297
push	esi
call	sub_729A40
jmp	loc_72A297

loc_72A1D8:
lea	eax, [ebx+ecx]
cmp	[esp+24h+arg_0], eax
push	ecx
mov	ecx, edi
jle	short loc_72A209
call	sub_6CD100
cmp	dword ptr [edi+4], 0
jnz	short loc_72A1FD
lea	ecx, [esp+24h+var_8]
call	sub_729CC0
jmp	loc_72A297

loc_72A1FD:
mov	eax, [esp+24h+var_14]
cmp	esi, [eax+4]
jmp	loc_72A290

loc_72A209:
call	sub_6CD100
mov	ecx, [esp+24h+var_14]
mov	eax, [ecx+4]
cmp	esi, eax
jge	short loc_72A21E
inc	esi
mov	[esp+24h+var_4], esi

loc_72A21E:
cmp	esi, eax
mov	ebp, [esp+24h+var_8]
mov	edi, esi
mov	[esp+24h+var_10], ebp
mov	[esp+24h+var_C], edi
jge	short loc_72A2A5
inc	esi
mov	[esp+24h+var_4], esi
jmp	short loc_72A2A5

loc_72A237:
cmp	ebx, eax
mov	ebp, [esp+24h+var_14]
jl	short loc_72A280
mov	ecx, [edi+4]
lea	edx, [ecx+eax-1]
cmp	ebx, edx
jg	short loc_72A280
mov	edx, ecx
sub	edx, ebx
add	edx, eax
cmp	edx, ecx
jbe	short loc_72A25D
mov	dword ptr [edi+4], 0
jmp	short loc_72A262

loc_72A25D:
sub	ecx, edx
mov	[edi+4], ecx

loc_72A262:
cmp	dword ptr [edi+4], 0
jnz	short loc_72A27B
test	esi, esi
jl	short loc_72A297
cmp	esi, [ebp+4]
jnb	short loc_72A297
push	esi
mov	ecx, ebp
call	sub_729A40
jmp	short loc_72A297

loc_72A27B:
cmp	esi, [ebp+4]
jmp	short loc_72A290

loc_72A280:
push	ebx
mov	ecx, edi
call	sub_6C4400
test	eax, eax
jg	short loc_72A297
cmp	esi, [esp+24h+var_10]

loc_72A290:
jge	short loc_72A297
inc	esi
mov	[esp+24h+var_4], esi

loc_72A297:
mov	ebp, [esp+24h+var_8]
mov	edi, esi
mov	[esp+24h+var_10], ebp
mov	[esp+24h+var_C], edi

loc_72A2A5:
lea	ecx, [esp+24h+var_8]
call	sub_726090
test	al, al
jnz	short loc_72A303
lea	ecx, [esi+esi*2]
add	ecx, ecx
add	ecx, ecx
mov	[esp+24h+arg_0], ecx
jmp	short loc_72A2C4
align 10h

loc_72A2C0:
mov	ecx, [esp+24h+arg_0]

loc_72A2C4:
mov	edx, [esp+24h+var_14]
mov	eax, [edx]
add	eax, ecx
mov	ecx, [eax]
cmp	ecx, ebx
jl	short loc_72A307
mov	eax, [eax+4]
lea	ecx, [eax+ecx-1]
mov	eax, [esp+24h+arg_4]
lea	eax, [ebx+eax-1]
cmp	ecx, eax
jg	short loc_72A307
test	esi, esi
jl	short loc_72A2F6
cmp	esi, [edx+4]
jnb	short loc_72A2F6
push	esi
mov	ecx, edx
call	sub_729A40

loc_72A2F6:
lea	ecx, [esp+24h+var_8]
call	sub_726090
test	al, al
jz	short loc_72A2C0

loc_72A303:
mov	edx, [esp+24h+var_14]

loc_72A307:
test	esi, esi
jl	short loc_72A346
cmp	esi, [edx+4]
jnb	short loc_72A346
mov	edx, [edx]
mov	ecx, [esp+24h+arg_4]
lea	eax, [esi+esi*2]
lea	eax, [edx+eax*4]
mov	edx, [eax]
lea	ecx, [ebx+ecx-1]
cmp	ecx, edx
jl	short loc_72A346
mov	esi, [eax+4]
lea	edx, [esi+edx-1]
cmp	ecx, edx
jg	short loc_72A346
sub	ebx, [eax]
mov	ecx, esi
add	ebx, [esp+24h+arg_4]
cmp	ebx, ecx
jle	short loc_72A33F
mov	ebx, ecx

loc_72A33F:
add	[eax], ebx
sub	ecx, ebx
mov	[eax+4], ecx

loc_72A346:
test	edi, edi
jl	short loc_72A392
lea	eax, [edi-1]
test	eax, eax
jl	short loc_72A392
mov	ecx, [ebp+4]
cmp	eax, ecx
jnb	short loc_72A392
cmp	edi, ecx
jnb	short loc_72A392
mov	ecx, [ebp+0]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
lea	edx, [edi+edi*2]
mov	esi, [ecx+edx*4]
sub	esi, [esp+24h+arg_4]
lea	ecx, [ecx+edx*4]
mov	edx, [eax+4]
add	edx, [eax]
cmp	edx, esi
jnz	short loc_72A392
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnz	short loc_72A392
mov	ecx, [ecx+4]
add	[eax+4], ecx
lea	ecx, [esp+24h+var_10]
call	sub_729CC0

loc_72A392:
lea	ecx, [edi+edi*2]
add	ecx, ecx
add	ecx, ecx
lea	esp, [esp+0]

loc_72A3A0:
test	ecx, ecx
jl	short loc_72A3C0
cmp	edi, [ebp+4]
jnb	short loc_72A3C0
mov	eax, [ebp+0]
mov	edx, [esp+24h+arg_4]
sub	[eax+ecx], edx
add	eax, ecx
cmp	edi, [ebp+4]
jge	short loc_72A3A0
inc	edi
add	ecx, 0Ch
jmp	short loc_72A3A0

loc_72A3C0:
pop	edi
pop	ebx

loc_72A3C2:
pop	esi
pop	ebp
add	esp, 14h
retn	8
sub_72A120 endp

align 10h



sub_72A3D0 proc	near

var_1= byte ptr	-1
arg_0= dword ptr  4

; FUNCTION CHUNK AT 00728570 SIZE 000000B5 BYTES

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [esi+0Ch]
inc	eax
push	eax
push	ecx
mov	ecx, esi
call	sub_7299D0
mov	edx, [esi+4]
mov	eax, [esi]
imul	edx, 54h
lea	ecx, [edx+eax-54h]
pop	esi
test	ecx, ecx
jz	short locret_72A3F9
jmp	loc_728570

locret_72A3F9:
retn	4
sub_72A3D0 endp

align 10h



sub_72A400 proc	near
mov	eax, [ecx+4]
test	eax, eax
jbe	short locret_72A460
mov	edx, [ecx]
push	esi
lea	esi, [eax-1]
test	edx, edx
jz	short loc_72A41A
cmp	esi, eax
jnb	short loc_72A41A
lea	esi, [edx+esi*2]
jmp	short loc_72A41C

loc_72A41A:
xor	esi, esi

loc_72A41C:
cmp	word ptr [esi],	0
jnz	short loc_72A45F
push	edi
mov	edi, eax
test	edi, edi
jbe	short loc_72A446
test	eax, eax
jbe	short loc_72A446
lea	esi, [eax-1]
test	edx, edx
jz	short loc_72A43D
cmp	esi, eax
jnb	short loc_72A43D
lea	eax, [edx+esi*2]
jmp	short loc_72A43F

loc_72A43D:
xor	eax, eax

loc_72A43F:
cmp	word ptr [eax],	0
jnz	short loc_72A446
dec	edi

loc_72A446:
lea	esi, [ecx+10h]
push	1
push	edi
mov	ecx, esi
call	sub_7276A0
push	1
inc	edi
push	edi
mov	ecx, esi
call	sub_72A120
pop	edi

loc_72A45F:
pop	esi

locret_72A460:
retn
sub_72A400 endp

align 10h



sub_72A470 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_72A4D1
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72A48C
cmp	edx, eax
jnb	short loc_72A48C
lea	edx, [ecx+edx*2]
jmp	short loc_72A48E

loc_72A48C:
xor	edx, edx

loc_72A48E:
cmp	word ptr [edx],	0
jnz	short loc_72A4D1
test	eax, eax
jbe	short loc_72A4B1
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72A4A8
cmp	edx, eax
jnb	short loc_72A4A8
lea	ecx, [ecx+edx*2]
jmp	short loc_72A4AA

loc_72A4A8:
xor	ecx, ecx

loc_72A4AA:
cmp	word ptr [ecx],	0
jnz	short loc_72A4B1
dec	eax

loc_72A4B1:
push	1
push	eax
lea	ecx, [esi+10h]
call	sub_72A120
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_72A4D1
mov	ecx, [esi]
cmp	word ptr [ecx+eax*2-2],	0
jnz	short loc_72A4D1
dec	eax
mov	[esi+4], eax

loc_72A4D1:
pop	esi
retn
sub_72A470 endp

align 10h



sub_72A4E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
cmp	ebx, 0FFFFFFFFh
jnz	short loc_72A4F7
or	ebx, 0FFFFFFFFh
jmp	short loc_72A4FB

loc_72A4F7:
sub	ebx, edi
jz	short loc_72A53F

loc_72A4FB:
mov	eax, [esi+4]
cmp	edi, eax
jnb	short loc_72A52A
lea	edx, [ebx+edi]
cmp	edx, eax
jb	short loc_72A50E
mov	[esi+4], edi
jmp	short loc_72A52A

loc_72A50E:
mov	ecx, [esi]
sub	eax, ebx
sub	eax, edi
add	eax, eax
push	eax
lea	eax, [ecx+edx*2]
push	eax
lea	ecx, [ecx+edi*2]
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
sub	[esi+4], ebx

loc_72A52A:
push	ebx
push	edi
lea	ecx, [esi+10h]
call	sub_72A120
mov	ecx, esi
call	sub_72A400
inc	word ptr [esi+24h]

loc_72A53F:
pop	edi
pop	esi
pop	ebx
retn	8
sub_72A4E0 endp

align 10h



sub_72A550 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+10h+arg_4]
push	edi
mov	edi, [esp+14h+arg_8]
mov	[esp+14h+var_8], ecx
mov	ecx, [edi]
mov	[esp+14h+var_C], eax
test	ecx, ecx
jz	short loc_72A576
call	sub_64A420

loc_72A576:
mov	edx, [edi]
lea	eax, [esp+14h+var_C]
push	eax
mov	ecx, esi
mov	[esp+18h+var_4], edx
call	sub_729D50
mov	ecx, [esp+14h+var_4]
pop	edi
pop	esi
test	ecx, ecx
jz	short loc_72A597
call	sub_64A430

loc_72A597:
add	esp, 0Ch
retn	0Ch
sub_72A550 endp

align 10h



sub_72A5A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_72A5DE
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_721CD0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_72A5F7
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_668FE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_72A5DE:
cmp	esi, [edi+8]
jb	short loc_72A5F7
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_668FE0

loc_72A5F7:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_72A5A0 endp

align 10h



sub_72A600 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_4]
push	esi
mov	esi, [esp+18h+arg_0]
mov	eax, [esi+4]
push	edi
mov	edi, ecx
mov	ecx, [ebp+1Ch]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
add	eax, eax
push	eax
call	edx
mov	[edi], eax
mov	ecx, [esi+4]
mov	[edi+4], ecx
mov	[edi+8], ecx
mov	ecx, [esi+4]
mov	edx, [esi]
add	ecx, ecx
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	dword ptr [edi+0Ch], 0
xor	ecx, ecx
lea	ebx, [edi+10h]
mov	[ebx], ecx
mov	[ebx+4], ecx
mov	[ebx+8], ecx
mov	eax, [esi+14h]
mov	edx, [esi+10h]
add	esp, 0Ch
mov	[esp+1Ch+var_C], eax
mov	[esp+1Ch+arg_0], edx
cmp	eax, ecx
jz	short loc_72A697
mov	ecx, [ebx+4]
mov	[esp+1Ch+var_8], ecx
add	ecx, eax
push	ecx
push	ebx
mov	ecx, ebx
call	sub_7281E0
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [esp+1Ch+var_C]
push	eax
mov	eax, [esp+20h+var_8]
lea	edx, [eax+eax*2]
mov	eax, [ebx]
push	ecx
lea	ecx, [eax+edx*4]
push	ecx
call	sub_727650
add	esp, 0Ch

loc_72A697:
mov	edx, [esi+1Ch]
xor	eax, eax
mov	[edi+1Ch], edx
mov	[edi+24h], ax
mov	eax, [ebp+18h]
lea	ecx, [eax+1]
mov	[ebp+18h], ecx
mov	[edi+20h], eax
mov	esi, [esi+0Ch]
push	esi
mov	ecx, ebp
call	sub_702870
mov	ecx, [edi+0Ch]
mov	esi, eax
test	ecx, ecx
jz	short loc_72A6C8
call	sub_64A400

loc_72A6C8:
xor	eax, eax
mov	[edi+0Ch], esi
mov	[esp+1Ch+var_4], eax
mov	[esp+1Ch+arg_0], eax

loc_72A6D5:
mov	eax, [esp+1Ch+arg_0]
test	eax, eax
jl	short loc_72A734
mov	edx, [esp+1Ch+var_4]
cmp	edx, [ebx+4]
jnb	short loc_72A734
mov	esi, [ebx]
add	esi, eax
mov	eax, [esi+8]
push	eax
mov	ecx, ebp
call	sub_702780
mov	ebp, eax
test	ebp, ebp
jz	short loc_72A702
mov	ecx, ebp
call	sub_64A420

loc_72A702:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_72A70E
call	sub_64A430

loc_72A70E:
mov	[esi+8], ebp
test	ebp, ebp
jz	short loc_72A71C
mov	ecx, ebp
call	sub_64A430

loc_72A71C:
mov	eax, [esp+1Ch+var_4]
cmp	eax, [ebx+4]
mov	ebp, [esp+1Ch+arg_4]
jge	short loc_72A6D5
inc	[esp+1Ch+var_4]
add	[esp+1Ch+arg_0], 0Ch
jmp	short loc_72A6D5

loc_72A734:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_72A600 endp




sub_72A740 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	byte ptr -74h
var_6C=	byte ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	word ptr -58h
var_56=	word ptr -56h
var_54=	byte ptr -54h
var_52=	word ptr -52h
var_50=	byte ptr -50h
var_44=	dword ptr -44h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 94h
push	ebx
mov	ebx, [esp+98h+arg_8]
push	esi
mov	esi, ecx
push	ebx
lea	eax, [esi+10h]
push	esi
push	eax
lea	ecx, [esp+0A8h+var_50]
mov	[esp+0A8h+var_90], esi
call	sub_727150
mov	eax, [esp+9Ch+arg_C]
cmp	eax, ebx
jnb	short loc_72A771
mov	eax, ebx

loc_72A771:
cmp	eax, 0FFFFFFFFh
jnz	short loc_72A782
push	ebp
mov	[esp+0A0h+var_94], 7FFFFFFFh
push	edi
jmp	short loc_72A7A7

loc_72A782:
sub	eax, ebx
mov	[esp+9Ch+var_94], eax
test	eax, eax
jle	loc_72A8F1
push	ebp
push	edi
jmp	short loc_72A7A7
jmp	short loc_72A7A0
align 10h

loc_72A7A0:
mov	ebx, [esp+0A4h+arg_8]

loc_72A7A7:
mov	eax, [esp+0A4h+var_30]
mov	ecx, [esp+0A4h+var_34]
cmp	eax, [ecx+4]
jnb	loc_72A8EF
lea	ecx, [esp+0A4h+var_50]
call	sub_727230
mov	edi, eax
mov	ebp, [edi+4]
mov	edx, [edi+8]
mov	[esp+0A4h+var_8C], edx
cmp	ebx, ebp
ja	short loc_72A7D3
mov	ebx, ebp

loc_72A7D3:
mov	eax, [esp+0A4h+arg_0]
mov	esi, [eax+1Ch]
mov	[esp+0A4h+var_7C], offset off_155F500
push	esi
lea	ecx, [esp+0A8h+var_74]
mov	[esp+0A8h+var_78], 1
mov	[esp+0A8h+var_7C], offset off_1437650
call	sub_67AC80
push	esi
lea	ecx, [esp+0A8h+var_6C]
call	sub_67AC80
xor	eax, eax
xor	ecx, ecx
xor	edx, edx
mov	[esp+0A4h+var_56], dx
mov	edx, [esp+0A4h+arg_4]
mov	[esp+0A4h+var_64], eax
mov	[esp+0A4h+var_60], eax
mov	[esp+0A4h+var_5C], 0FF000000h
mov	[esp+0A4h+var_58], cx
mov	[esp+0A4h+var_54], al
mov	[esp+0A4h+var_52], cx
mov	ecx, [edi+0Ch]
push	edx
cmp	ecx, eax
jz	short loc_72A863
lea	eax, [esp+0A8h+var_2C]
push	eax
call	sub_7013B0
push	eax
lea	ecx, [esp+0A8h+var_7C]
call	sub_6C7EC0
lea	ecx, [esp+0A4h+var_2C]
call	sub_694380
lea	ecx, [esp+0A4h+var_7C]
push	ecx

loc_72A863:
mov	ecx, [esp+0A8h+arg_0]
call	sub_702780
mov	edi, [esp+0A4h+var_94]
mov	esi, eax
mov	eax, [esp+0A4h+var_8C]
sub	eax, ebx
add	eax, ebp
cmp	eax, edi
jnb	short loc_72A883
mov	edi, eax

loc_72A883:
mov	[esp+0A4h+var_88], ebx
mov	[esp+0A4h+var_84], edi
test	esi, esi
jz	short loc_72A896
mov	ecx, esi
call	sub_64A420

loc_72A896:
mov	ecx, [esp+0A4h+var_90]
lea	eax, [esp+0A4h+var_88]
push	eax
add	ecx, 10h
mov	[esp+0A8h+var_80], esi
call	sub_729D50
mov	ecx, [esp+0A4h+var_80]
test	ecx, ecx
jz	short loc_72A8B8
call	sub_64A430

loc_72A8B8:
mov	ecx, [esp+0A4h+var_8C]
sub	[esp+0A4h+var_94], edi
add	ecx, ebp
push	ecx
lea	ecx, [esp+0A8h+var_50]
call	sub_727320
test	esi, esi
jz	short loc_72A8D7
mov	ecx, esi
call	sub_64A430

loc_72A8D7:
lea	ecx, [esp+0A4h+var_7C]
call	sub_694380
cmp	[esp+0A4h+var_94], 0
mov	esi, [esp+0A4h+var_90]
jg	loc_72A7A0

loc_72A8EF:
pop	edi
pop	ebp

loc_72A8F1:
inc	word ptr [esi+24h]
mov	ecx, [esp+9Ch+var_44]
pop	esi
pop	ebx
test	ecx, ecx
jz	short loc_72A904
call	sub_64A430

loc_72A904:
add	esp, 94h
retn	10h
sub_72A740 endp

align 10h



sub_72A910 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	esi
mov	esi, [esp+4+arg_C]
push	edi
mov	edi, ecx
test	esi, esi
jbe	loc_72A9AA
cmp	esi, 0FFFFFFFFh
jnz	short loc_72A938
mov	eax, [esp+8+arg_4]
xor	esi, esi
cmp	[eax], si
jz	short loc_72A938

loc_72A930:
inc	esi
cmp	word ptr [eax+esi*2], 0
jnz	short loc_72A930

loc_72A938:
test	esi, esi
jz	short loc_72A9AA
mov	eax, [esp+8+arg_0]
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_8]
push	esi
push	ebp
push	eax
call	sub_7259F0
push	esi
lea	ecx, [edi+10h]
push	ebp
mov	ebx, eax
call	sub_7276A0
inc	word ptr [edi+24h]
test	ebx, ebx
jz	short loc_72A9A8
mov	edx, [esp+10h+arg_4]
lea	ecx, [esi+esi]
push	ecx
push	edx
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ebx, [esp+1Ch+arg_10]
add	esp, 0Ch
test	ebx, ebx
jz	short loc_72A99D
mov	ecx, ebx
call	sub_64A420
lea	eax, [esp+10h+arg_4]
push	eax
push	esi
push	ebp
lea	ecx, [edi+10h]
mov	[esp+1Ch+arg_4], ebx
call	sub_72A550
mov	ecx, ebx
call	sub_64A430

loc_72A99D:
mov	ecx, edi
call	sub_72A400
inc	word ptr [edi+24h]

loc_72A9A8:
pop	ebp
pop	ebx

loc_72A9AA:
pop	edi
pop	esi
retn	14h
sub_72A910 endp

align 10h



sub_72A9B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_72A9D8
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72A9CC
cmp	edx, eax
jnb	short loc_72A9CC
lea	ecx, [ecx+edx*2]
jmp	short loc_72A9CE

loc_72A9CC:
xor	ecx, ecx

loc_72A9CE:
cmp	word ptr [ecx],	0
jz	loc_72AA66

loc_72A9D8:
push	edi
mov	edi, eax
test	edi, edi
jbe	short loc_72A9FE
test	eax, eax
jbe	short loc_72A9FE
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72A9F5
cmp	edx, eax
jnb	short loc_72A9F5
lea	eax, [ecx+edx*2]
jmp	short loc_72A9F7

loc_72A9F5:
xor	eax, eax

loc_72A9F7:
cmp	word ptr [eax],	0
jnz	short loc_72A9FE
dec	edi

loc_72A9FE:
mov	eax, [esp+8+arg_0]
push	ebx
push	ebp
push	1
push	edi
push	eax
mov	ecx, esi
call	sub_7259F0
push	1
lea	ebx, [esi+10h]
push	edi
mov	ecx, ebx
mov	ebp, eax
call	sub_7276A0
inc	word ptr [esi+24h]
test	ebp, ebp
jz	short loc_72AA63
xor	ecx, ecx
mov	[ebp+0], cx
cmp	[esi+14h], ecx
jnz	short loc_72AA63
mov	eax, [esp+10h+arg_4]
test	eax, eax
jz	short loc_72AA63
mov	ecx, [esp+10h+arg_0]
push	eax
call	sub_702780
lea	edx, [esp+10h+arg_0]
push	edx
push	1
mov	esi, eax
push	edi
mov	ecx, ebx
mov	[esp+1Ch+arg_0], esi
call	sub_72A550
test	esi, esi
jz	short loc_72AA63
mov	ecx, esi
call	sub_64A430

loc_72AA63:
pop	ebp
pop	ebx
pop	edi

loc_72AA66:
pop	esi
retn	8
sub_72A9B0 endp

align 10h



sub_72AA70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_4]
push	edi
lea	eax, [esp+20h+var_10]
mov	edi, ecx
push	eax
push	esi
lea	ecx, [esp+28h+var_8]
push	ecx
mov	ecx, edi
mov	[esp+2Ch+var_C], edi
call	sub_7267B0
mov	eax, [esp+20h+arg_8]
mov	ebx, [esp+20h+var_10]
mov	ebp, [esp+20h+var_4]
sub	eax, esi
mov	[esp+20h+arg_4], eax
jmp	short loc_72AAB0
align 10h

loc_72AAB0:
mov	eax, [esp+20h+var_8]
test	eax, eax
jz	loc_72AB63
test	ebp, ebp
jl	loc_72AB63
cmp	ebp, [eax+4]
jge	loc_72AB63
mov	edx, [eax]
mov	ecx, [edx+ebp*4]
mov	eax, [ecx+4]
mov	edx, eax
test	edx, edx
jbe	short loc_72AAFA
test	eax, eax
jbe	short loc_72AAFA
mov	esi, [ecx]
lea	edi, [eax-1]
test	esi, esi
jz	short loc_72AAF1
cmp	edi, eax
jnb	short loc_72AAF1
lea	esi, [esi+edi*2]
jmp	short loc_72AAF3

loc_72AAF1:
xor	esi, esi

loc_72AAF3:
cmp	word ptr [esi],	0
jnz	short loc_72AAFA
dec	edx

loc_72AAFA:
mov	esi, [esp+20h+arg_4]
add	esi, ebx
cmp	esi, edx
jbe	short loc_72AB08
mov	esi, edx
jmp	short loc_72AB0A

loc_72AB08:
jnz	short loc_72AB34

loc_72AB0A:
test	eax, eax
jbe	short loc_72AB34
mov	edx, [ecx]
lea	edi, [eax-1]
test	edx, edx
jz	short loc_72AB20
cmp	edi, eax
jnb	short loc_72AB20
lea	eax, [edx+edi*2]
jmp	short loc_72AB22

loc_72AB20:
xor	eax, eax

loc_72AB22:
cmp	word ptr [eax],	0
jnz	short loc_72AB34
inc	esi
cmp	[esp+20h+arg_4], 0FFFFFFFFh
jz	short loc_72AB34
inc	[esp+20h+arg_4]

loc_72AB34:
mov	eax, [esp+20h+arg_0]
mov	edi, [esp+20h+var_C]
mov	edx, [edi+8]
push	esi
push	ebx
push	eax
push	edx
call	sub_72A740
mov	eax, [esp+20h+var_8]
sub	ebx, esi
add	[esp+20h+arg_4], ebx
xor	ebx, ebx
cmp	ebp, [eax+4]
jge	loc_72AAB0
inc	ebp
jmp	loc_72AAB0

loc_72AB63:
mov	eax, [esp+20h+arg_0]
mov	ecx, 100h
test	[eax+2Ah], cx
jz	short loc_72AB82
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	short loc_72AB82
or	byte ptr [edi+20h], 1

loc_72AB82:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_72AA70 endp

align 10h



sub_72AB90 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 34h
push	ebx
push	edi
mov	edi, [esp+3Ch+arg_10]
mov	ebx, ecx
mov	[esp+3Ch+var_34], ebx
test	edi, edi
jbe	loc_72AD41
mov	eax, [esp+3Ch+arg_C]
push	ebp
mov	ebp, [esp+40h+arg_8]
push	esi
mov	esi, [esp+44h+arg_4]
mov	ecx, [esi]
push	0
push	edi
push	eax
mov	eax, [esp+50h+arg_0]
lea	edx, [ecx+ebp*2]
push	edx
push	eax
mov	ecx, ebx
call	sub_72A910
push	ebp
push	esi
add	esi, 10h
push	esi
lea	ecx, [esp+50h+var_24]
call	sub_727150
mov	ecx, [esp+44h+var_4]
mov	edx, [esp+44h+var_8]
mov	[esp+44h+arg_10], edi
cmp	ecx, [edx+4]
jnb	loc_72ACD2
jmp	short loc_72ABF5

loc_72ABF1:
mov	edi, [esp+44h+arg_10]

loc_72ABF5:
test	edi, edi
jbe	loc_72ACD2
lea	ecx, [esp+44h+var_24]
call	sub_727230
mov	ecx, [eax+4]
cmp	ecx, ebp
mov	esi, [eax+8]
jge	short loc_72AC18
sub	esi, ebp
xor	ebx, ebx
add	esi, ecx
jmp	short loc_72AC1C

loc_72AC18:
sub	ecx, ebp
mov	ebx, ecx

loc_72AC1C:
cmp	esi, edi
jb	short loc_72AC22
mov	esi, edi

loc_72AC22:
mov	eax, [eax+0Ch]
test	eax, eax
jz	short loc_72AC7B
mov	ecx, [esp+44h+arg_0]
push	eax
call	sub_702780
mov	edi, eax
mov	eax, [esp+44h+arg_C]
add	ebx, eax
mov	[esp+44h+var_30], ebx
mov	[esp+44h+var_2C], esi
test	edi, edi
jz	short loc_72AC4E
mov	ecx, edi
call	sub_64A420

loc_72AC4E:
lea	ecx, [esp+44h+var_30]
push	ecx
mov	ecx, [esp+48h+var_34]
add	ecx, 10h
mov	[esp+48h+var_28], edi
call	sub_729D50
mov	ecx, [esp+44h+var_28]
test	ecx, ecx
jz	short loc_72AC70
call	sub_64A430

loc_72AC70:
test	edi, edi
jz	short loc_72AC7B
mov	ecx, edi
call	sub_64A430

loc_72AC7B:
mov	eax, [esp+44h+var_C]
sub	[esp+44h+arg_10], esi
mov	ebx, [esp+44h+var_8]
test	eax, eax
jl	short loc_72ACBE
mov	edi, [esp+44h+var_10]
cmp	eax, [edi+4]
jnb	short loc_72ACBE
mov	ecx, [edi]
lea	edx, [eax+eax*2]
mov	esi, [ecx+edx*4]
lea	edx, [ecx+edx*4]
mov	ecx, [esp+44h+var_4]
cmp	ecx, esi
jnb	short loc_72ACAB
mov	ecx, esi
jmp	short loc_72ACC1

loc_72ACAB:
add	ecx, [edx+4]
mov	[esp+44h+var_4], ecx
cmp	eax, [edi+4]
jge	short loc_72ACC5
inc	eax
mov	[esp+44h+var_C], eax
jmp	short loc_72ACC5

loc_72ACBE:
mov	ecx, [ebx+4]

loc_72ACC1:
mov	[esp+44h+var_4], ecx

loc_72ACC5:
cmp	ecx, [ebx+4]
mov	ebx, [esp+44h+var_34]
jb	loc_72ABF1

loc_72ACD2:
mov	eax, [ebx+4]
test	eax, eax
jbe	short loc_72AD2E
mov	ecx, [ebx]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72ACEB
cmp	edx, eax
jnb	short loc_72ACEB
lea	edx, [ecx+edx*2]
jmp	short loc_72ACED

loc_72ACEB:
xor	edx, edx

loc_72ACED:
cmp	word ptr [edx],	0
jnz	short loc_72AD2E
mov	edi, eax
test	edi, edi
jbe	short loc_72AD16
test	eax, eax
jbe	short loc_72AD16
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72AD0D
cmp	edx, eax
jnb	short loc_72AD0D
lea	eax, [ecx+edx*2]
jmp	short loc_72AD0F

loc_72AD0D:
xor	eax, eax

loc_72AD0F:
cmp	word ptr [eax],	0
jnz	short loc_72AD16
dec	edi

loc_72AD16:
push	1
lea	esi, [ebx+10h]
push	edi
mov	ecx, esi
call	sub_7276A0
push	1
inc	edi
push	edi
mov	ecx, esi
call	sub_72A120

loc_72AD2E:
mov	ecx, [esp+44h+var_18]
inc	word ptr [ebx+24h]
pop	esi
pop	ebp
test	ecx, ecx
jz	short loc_72AD41
call	sub_64A430

loc_72AD41:
pop	edi
pop	ebx
add	esp, 34h
retn	14h
sub_72AB90 endp

align 10h



sub_72AD50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
lea	esi, [ebx+1]
push	esi
push	edi
call	sub_72A5A0
cmp	esi, ebx
jbe	short loc_72AD82
sub	esi, ebx
mov	eax, [edi]
lea	eax, [eax+ebx*4]
jz	short loc_72AD82
nop

loc_72AD70:
test	eax, eax
jz	short loc_72AD7A
mov	dword ptr [eax], 0

loc_72AD7A:
add	eax, 4
sub	esi, 1
jnz	short loc_72AD70

loc_72AD82:
mov	eax, [edi+4]
mov	esi, [esp+0Ch+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_72ADAC
mov	edx, [edi]
sub	eax, esi
lea	eax, ds:0FFFFFFFCh[eax*4]
lea	ecx, [edx+esi*4]
push	eax
push	ecx
add	ecx, 4
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_72ADAC:
mov	ecx, [edi]
pop	edi
lea	eax, [ecx+esi*4]
pop	esi
pop	ebx
test	eax, eax
jz	short locret_72ADC6
mov	ecx, [esp+arg_4]
mov	edx, [ecx]
mov	[eax], edx
mov	dword ptr [ecx], 0

locret_72ADC6:
retn	8
sub_72AD50 endp

align 10h



sub_72ADD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 1
jnz	short loc_72ADE5
push	0
push	esi
call	sub_72A5A0
pop	esi
retn	4

loc_72ADE5:
mov	eax, [esi]
push	ebx
mov	ebx, [esp+8+arg_0]
push	edi
lea	edi, ds:0[ebx*4]
add	eax, edi
push	eax
call	sub_729D00
mov	ecx, [esi]
mov	edx, [esi+4]
lea	eax, [edi+ecx]
sub	edx, ebx
lea	ecx, ds:0FFFFFFFCh[edx*4]
push	ecx
lea	edx, [eax+4]
push	edx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 10h
pop	edi
pop	ebx
pop	esi
retn	4
sub_72ADD0 endp

align 10h



sub_72AE30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebx, ecx
mov	eax, [ebx+10h]
xor	ebp, ebp
push	esi
mov	[esp+10h+var_4], ebp
cmp	eax, ebp
jbe	short loc_72AE74
mov	ecx, [ebx+0Ch]
mov	ecx, [ecx+eax*4-4]
mov	eax, [ecx+4]
mov	esi, [ecx+1Ch]
cmp	eax, ebp
jbe	short loc_72AE6E
mov	ecx, [ecx]
lea	edx, [eax-1]
cmp	ecx, ebp
jz	short loc_72AE66
cmp	edx, eax
jnb	short loc_72AE66
lea	ecx, [ecx+edx*2]
jmp	short loc_72AE68

loc_72AE66:
xor	ecx, ecx

loc_72AE68:
cmp	[ecx], bp
jnz	short loc_72AE6E
dec	eax

loc_72AE6E:
add	eax, esi
mov	[esp+10h+var_4], eax

loc_72AE74:
push	edi
mov	ecx, ebx
call	sub_7204E0
mov	esi, eax
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	28h
call	eax
cmp	eax, ebp
jz	short loc_72AEBC
mov	[eax], ebp
mov	[eax+4], ebp
mov	[eax+8], ebp
mov	[eax+0Ch], ebp
mov	[eax+10h], ebp
mov	[eax+14h], ebp
mov	[eax+18h], ebp
xor	ecx, ecx
mov	[eax+1Ch], ebp
mov	[eax+24h], cx
mov	ecx, [esi+18h]
lea	edx, [ecx+1]
mov	[esi+18h], edx
mov	[eax+20h], ecx
mov	edi, eax
jmp	short loc_72AEBE

loc_72AEBC:
xor	edi, edi

loc_72AEBE:
mov	eax, [ebx+10h]
lea	esi, [ebx+0Ch]
inc	eax
push	eax
push	esi
mov	ecx, esi
call	sub_72A5A0
mov	ecx, [esi+4]
mov	edx, [esi]
lea	eax, [edx+ecx*4-4]
cmp	eax, ebp
jz	short loc_72AEDF
mov	[eax], edi
jmp	short loc_72AF1E

loc_72AEDF:
cmp	edi, ebp
jz	short loc_72AF1E
mov	eax, [edi+14h]
mov	ecx, [edi+10h]
push	eax
push	ecx
call	sub_71EDB0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+10h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, [edi+0Ch]
cmp	ecx, ebp
jz	short loc_72AF10
call	sub_64A400

loc_72AF10:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_72AF1E:
mov	eax, [ebx+10h]
mov	ecx, [esi]
mov	esi, [ecx+eax*4-4]
mov	eax, [esp+14h+arg_0]
pop	edi
cmp	eax, ebp
jnz	short loc_72AF33
mov	eax, [ebx+18h]

loc_72AF33:
mov	edx, [ebx+8]
push	eax
push	edx
mov	ecx, esi
call	sub_726710
mov	eax, [esp+10h+var_4]
mov	[esi+1Ch], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_72AE30 endp

align 10h



sub_72AF50 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebx, ecx
mov	eax, [ebx+10h]
push	esi
xor	ebp, ebp
push	edi
test	eax, eax
jbe	short loc_72AF8D
mov	ecx, [ebx+0Ch]
mov	ecx, [ecx+eax*4-4]
mov	eax, [ecx+4]
mov	esi, [ecx+1Ch]
test	eax, eax
jbe	short loc_72AF8A
mov	ecx, [ecx]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72AF82
cmp	edx, eax
jnb	short loc_72AF82
lea	ecx, [ecx+edx*2]
jmp	short loc_72AF84

loc_72AF82:
xor	ecx, ecx

loc_72AF84:
cmp	[ecx], bp
jnz	short loc_72AF8A
dec	eax

loc_72AF8A:
lea	ebp, [eax+esi]

loc_72AF8D:
mov	ecx, ebx
call	sub_7204E0
mov	esi, eax
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	28h
call	eax
test	eax, eax
jz	short loc_72AFB9
mov	ecx, [esp+10h+arg_0]
push	esi
push	ecx
mov	ecx, eax
call	sub_72A600
mov	edi, eax
jmp	short loc_72AFBB

loc_72AFB9:
xor	edi, edi

loc_72AFBB:
mov	edx, [ebx+10h]
lea	esi, [ebx+0Ch]
inc	edx
push	edx
push	esi
mov	ecx, esi
call	sub_72A5A0
mov	eax, [esi+4]
mov	ecx, [esi]
lea	eax, [ecx+eax*4-4]
test	eax, eax
jz	short loc_72AFED
mov	[eax], edi
mov	eax, [ebx+10h]
mov	ecx, [esi]
mov	eax, [ecx+eax*4-4]
pop	edi
pop	esi
mov	[eax+1Ch], ebp
pop	ebp
pop	ebx
retn	4

loc_72AFED:
test	edi, edi
jz	short loc_72B02C
mov	edx, [edi+14h]
mov	eax, [edi+10h]
push	edx
push	eax
call	sub_71EDB0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+10h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_72B01E
call	sub_64A400

loc_72B01E:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_72B02C:
mov	eax, [ebx+10h]
mov	ecx, [esi]
mov	eax, [ecx+eax*4-4]
pop	edi
pop	esi
mov	[eax+1Ch], ebp
pop	ebp
pop	ebx
retn	4
sub_72AF50 endp

align 10h



sub_72B040 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, ecx
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx]
push	edi
test	eax, eax
jz	short loc_72B05B
mov	edi, [ecx+4]
test	edi, edi
jl	short loc_72B05B
cmp	edi, [eax+4]
jl	short loc_72B06D

loc_72B05B:
mov	eax, [esp+0Ch+arg_4]
push	eax
mov	ecx, ebp
call	sub_72AE30
pop	edi
pop	ebp
pop	ecx
retn	8

loc_72B06D:
push	esi
mov	[esp+10h+var_4], 0
test	edi, edi
jbe	short loc_72B0AC
mov	ecx, [ebp+0Ch]
mov	eax, [ecx+edi*4-4]
mov	ecx, [eax+4]
mov	esi, [eax+1Ch]
test	ecx, ecx
jbe	short loc_72B0A6
mov	eax, [eax]
lea	edx, [ecx-1]
test	eax, eax
jz	short loc_72B09D
cmp	edx, ecx
jnb	short loc_72B09D
lea	eax, [eax+edx*2]
jmp	short loc_72B09F

loc_72B09D:
xor	eax, eax

loc_72B09F:
cmp	word ptr [eax],	0
jnz	short loc_72B0A6
dec	ecx

loc_72B0A6:
add	ecx, esi
mov	[esp+10h+var_4], ecx

loc_72B0AC:
push	ebx
mov	ecx, ebp
call	sub_7204E0
mov	ecx, eax
call	sub_729AA0
lea	edx, [esp+14h+arg_0]
push	edx
lea	ebx, [ebp+0Ch]
push	edi
mov	ecx, ebx
mov	[esp+1Ch+arg_0], eax
call	sub_72AD50
mov	esi, [esp+14h+arg_0]
test	esi, esi
jz	short loc_72B112
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
push	eax
push	ecx
call	sub_71EDB0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+10h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_72B104
call	sub_64A400

loc_72B104:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_72B112:
mov	eax, [ebx]
mov	esi, [eax+edi*4]
mov	eax, [esp+14h+arg_4]
pop	ebx
test	eax, eax
jnz	short loc_72B123
mov	eax, [ebp+18h]

loc_72B123:
mov	ecx, [ebp+8]
push	eax
push	ecx
mov	ecx, esi
call	sub_726710
mov	edx, [esp+10h+var_4]
mov	[esi+1Ch], edx
mov	eax, esi
pop	esi
pop	edi
pop	ebp
pop	ecx
retn	8
sub_72B040 endp

align 10h



sub_72B140 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	edi
mov	edi, ecx
mov	ecx, [esp+8+arg_0]
mov	eax, [ecx]
test	eax, eax
jz	short loc_72B15A
mov	ebx, [ecx+4]
test	ebx, ebx
jl	short loc_72B15A
cmp	ebx, [eax+4]
jl	short loc_72B16B

loc_72B15A:
mov	eax, [esp+8+arg_4]
push	eax
mov	ecx, edi
call	sub_72AF50
pop	edi
pop	ebx
retn	8

loc_72B16B:
push	ebp
xor	ebp, ebp
push	esi
test	ebx, ebx
jbe	short loc_72B1A1
mov	ecx, [edi+0Ch]
mov	eax, [ecx+ebx*4-4]
mov	ecx, [eax+4]
mov	esi, [eax+1Ch]
test	ecx, ecx
jbe	short loc_72B19E
mov	eax, [eax]
lea	edx, [ecx-1]
test	eax, eax
jz	short loc_72B196
cmp	edx, ecx
jnb	short loc_72B196
lea	eax, [eax+edx*2]
jmp	short loc_72B198

loc_72B196:
xor	eax, eax

loc_72B198:
cmp	[eax], bp
jnz	short loc_72B19E
dec	ecx

loc_72B19E:
lea	ebp, [ecx+esi]

loc_72B1A1:
mov	ecx, edi
call	sub_7204E0
mov	esi, eax
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	28h
call	eax
test	eax, eax
jz	short loc_72B1CB
mov	ecx, [esp+10h+arg_4]
push	esi
push	ecx
mov	ecx, eax
call	sub_72A600
jmp	short loc_72B1CD

loc_72B1CB:
xor	eax, eax

loc_72B1CD:
lea	edx, [esp+10h+arg_4]
push	edx
add	edi, 0Ch
push	ebx
mov	ecx, edi
mov	[esp+18h+arg_4], eax
call	sub_72AD50
mov	esi, [esp+10h+arg_4]
test	esi, esi
jz	short loc_72B224
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
push	eax
push	ecx
call	sub_71EDB0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+10h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_72B216
call	sub_64A400

loc_72B216:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_72B224:
mov	eax, [edi]
mov	eax, [eax+ebx*4]
pop	esi
mov	[eax+1Ch], ebp
pop	ebp
pop	edi
pop	ebx
retn	8
sub_72B140 endp

align 10h



sub_72B240 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
mov	eax, [esp+18h+arg_4]
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	ebp
mov	ebp, ecx
push	esi
mov	[esp+24h+var_18], ebp
mov	[esp+24h+arg_0], ebx
cmp	eax, 0FFFFFFFFh
jnz	short loc_72B26B
mov	eax, ebx
lea	edx, [eax+1]

loc_72B262:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_72B262
sub	eax, edx

loc_72B26B:
mov	edx, [ebp+10h]
lea	ecx, [ebx+eax]
push	edi
mov	[esp+28h+var_10], ecx
xor	edi, edi
lea	ecx, [edx-1]
xor	esi, esi
cmp	ecx, edi
mov	[esp+28h+var_C], edi
jl	short loc_72B293
cmp	ecx, edx
jge	short loc_72B293
mov	edx, [ebp+0Ch]
mov	edi, [edx+ecx*4]
test	edi, edi
jnz	short loc_72B299

loc_72B293:
mov	[esp+28h+var_14], esi
jmp	short loc_72B2A0

loc_72B299:
mov	ecx, [edi+1Ch]
mov	[esp+28h+var_14], ecx

loc_72B2A0:
mov	edx, [ebp+0]
mov	edx, [edx+4]
push	ebx
push	eax
mov	eax, [esp+30h+var_14]
push	eax
mov	ecx, ebp
call	edx
xor	eax, eax
jmp	short loc_72B2BD

loc_72B2B5:
mov	eax, [esp+28h+var_4]
mov	ebp, [esp+28h+var_18]

loc_72B2BD:
mov	ecx, eax
inc	eax
mov	[esp+28h+var_4], eax
test	ecx, ecx
ja	short loc_72B2FB
test	edi, edi
jz	short loc_72B2FB
mov	ecx, edi
call	sub_72A470
mov	eax, [edi+4]
test	eax, eax
jbe	short loc_72B2F5
mov	ecx, [edi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72B2EC
cmp	edx, eax
jnb	short loc_72B2EC
lea	ecx, [ecx+edx*2]
jmp	short loc_72B2EE

loc_72B2EC:
xor	ecx, ecx

loc_72B2EE:
cmp	word ptr [ecx],	0
jnz	short loc_72B2F5
dec	eax

loc_72B2F5:
mov	[esp+28h+var_8], eax
jmp	short loc_72B318

loc_72B2FB:
mov	edx, [esp+28h+arg_10]
push	edx
mov	ecx, ebp
call	sub_72AE30
mov	edi, eax
mov	eax, [esp+28h+var_14]
mov	[esp+28h+var_8], 0
mov	[edi+1Ch], eax

loc_72B318:
mov	ecx, [esp+28h+arg_0]
mov	ebp, esi
mov	edx, ecx
xor	ebx, ebx
or	esi, 0FFFFFFFFh
mov	[esp+28h+arg_4], ecx
cmp	edx, [esp+28h+var_10]
jnb	loc_72B460

loc_72B333:
test	esi, esi
jz	short loc_72B376
lea	eax, [esp+28h+arg_4]
push	eax
call	sub_67B600
cmp	[esp+28h+arg_8], 0
jnz	short loc_72B35F
cmp	ebp, 0Dh
jnz	short loc_72B35F
test	ebx, ebx
jnz	short loc_72B35F
or	ebp, 0FFFFFFFFh
cmp	eax, 0Ah
jnz	short loc_72B35F
inc	[esp+28h+arg_0]
jmp	short loc_72B36C

loc_72B35F:
mov	esi, eax
cmp	eax, 0Ah
jz	short loc_72B380
cmp	eax, 0Dh
jz	short loc_72B376
inc	ebx

loc_72B36C:
mov	ecx, [esp+28h+var_10]
cmp	[esp+28h+arg_4], ecx
jb	short loc_72B333

loc_72B376:
cmp	esi, 0Ah
jz	short loc_72B380
cmp	esi, 0Dh
jnz	short loc_72B381

loc_72B380:
inc	ebx

loc_72B381:
test	ebx, ebx
jbe	loc_72B44E
mov	edx, [esp+28h+var_18]
mov	ecx, [esp+28h+var_8]
mov	eax, [edx+8]
push	ebx
push	ecx
push	eax
mov	ecx, edi
call	sub_7259F0
mov	edx, [esp+28h+var_8]
push	ebx
push	edx
lea	ecx, [edi+10h]
mov	ebp, eax
call	sub_7276A0
mov	eax, [esp+28h+arg_0]
inc	word ptr [edi+24h]
or	esi, 0FFFFFFFFh
mov	[esp+28h+arg_4], eax
cmp	eax, [esp+28h+var_10]
jnb	short loc_72B420

loc_72B3C3:
test	esi, esi
jz	short loc_72B420
lea	eax, [esp+28h+arg_4]
push	eax
call	sub_67B600
mov	esi, eax
cmp	esi, 0Dh
jz	short loc_72B3DD
cmp	esi, 0Ah
jnz	short loc_72B3F4

loc_72B3DD:
mov	ecx, [esp+28h+var_18]
mov	dl, [ecx+20h]
and	dl, 2
movzx	esi, dl
neg	esi
sbb	esi, esi
and	esi, 3
add	esi, 0Ah

loc_72B3F4:
mov	eax, [esp+28h+var_18]
mov	[ebp+0], si
mov	cl, [eax+20h]
and	cl, 2
movzx	edx, cl
add	ebp, 2
neg	edx
sbb	edx, edx
and	edx, 3
add	edx, 0Ah
cmp	esi, edx
jz	short loc_72B420
mov	eax, [esp+28h+var_10]
cmp	[esp+28h+arg_4], eax
jb	short loc_72B3C3

loc_72B420:
mov	ebp, [esp+28h+var_8]
mov	ecx, [esp+28h+arg_C]
mov	edx, [esp+28h+var_18]
mov	eax, [edx+8]
push	0FFFFFFFFh
push	ebp
push	ecx
push	eax
mov	ecx, edi
call	sub_72A740
mov	ecx, [esp+28h+arg_4]
lea	edx, [ebx+ebp]
add	[esp+28h+var_14], edx
add	[esp+28h+var_C], ebx
mov	[esp+28h+arg_0], ecx

loc_72B44E:
mov	eax, [esp+28h+var_10]
cmp	[esp+28h+arg_0], eax
jnb	short loc_72B460
test	esi, esi
jnz	loc_72B2B5

loc_72B460:
mov	ebx, [esp+28h+var_18]
mov	cl, [ebx+20h]
and	cl, 2
movzx	edx, cl
neg	edx
sbb	edx, edx
and	edx, 3
add	edx, 0Ah
cmp	esi, edx
jnz	short loc_72B489
mov	eax, [esp+28h+arg_10]
push	eax
mov	ecx, ebx
call	sub_72AE30
mov	edi, eax

loc_72B489:
mov	esi, [esp+28h+arg_C]
mov	ecx, [ebx+8]
push	esi
push	ecx
mov	ecx, edi
call	sub_72A9B0
mov	edx, 100h
pop	edi
test	[esi+2Ah], dx
jz	short loc_72B4C2
lea	ecx, [esi+10h]
call	sub_679930
test	eax, eax
mov	eax, [esp+24h+var_C]
jz	short loc_72B4C6
or	byte ptr [ebx+20h], 1
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h

loc_72B4C2:
mov	eax, [esp+24h+var_C]

loc_72B4C6:
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h
sub_72B240 endp

align 10h



sub_72B4D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
mov	edx, [esp+18h+arg_4]
push	ebx
push	ebp
mov	ebx, ecx
xor	ebp, ebp
push	edi
mov	edi, [esp+24h+arg_0]
mov	[esp+24h+var_C], ebx
cmp	edx, 0FFFFFFFFh
jnz	short loc_72B4FA
push	edi
call	sub_67B340
add	esp, 4
mov	[esp+24h+arg_4], eax
mov	edx, eax

loc_72B4FA:
mov	ecx, [ebx+10h]
lea	eax, [edi+edx*2]
mov	[esp+24h+var_4], eax
lea	eax, [ecx-1]
push	esi
test	eax, eax
jl	short loc_72B520
cmp	eax, ecx
jge	short loc_72B520
mov	ecx, [ebx+0Ch]
mov	esi, [ecx+eax*4]
test	esi, esi
jnz	short loc_72B528
mov	[esp+28h+var_18], ebp
jmp	short loc_72B52F

loc_72B520:
xor	esi, esi
mov	[esp+28h+var_18], ebp
jmp	short loc_72B52F

loc_72B528:
mov	eax, [esi+1Ch]
mov	[esp+28h+var_18], eax

loc_72B52F:
mov	ecx, [esp+28h+var_18]
mov	eax, [ebx]
push	edi
push	edx
mov	edx, [eax+8]
push	ecx
mov	ecx, ebx
call	edx
xor	eax, eax
mov	[esp+28h+var_14], eax
jmp	short loc_72B558
jmp	short loc_72B550
align 10h

loc_72B550:
mov	ebx, [esp+28h+var_C]
mov	eax, [esp+28h+var_8]

loc_72B558:
mov	ecx, eax
inc	eax
mov	[esp+28h+var_8], eax
test	ecx, ecx
ja	short loc_72B5AE
test	esi, esi
jz	short loc_72B5AE
mov	ecx, esi
call	sub_72A470
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_72B590
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72B587
cmp	edx, eax
jnb	short loc_72B587
lea	ecx, [ecx+edx*2]
jmp	short loc_72B589

loc_72B587:
xor	ecx, ecx

loc_72B589:
cmp	word ptr [ecx],	0
jnz	short loc_72B590
dec	eax

loc_72B590:
mov	[esp+28h+var_10], eax
test	eax, eax
jnz	short loc_72B5CB
mov	eax, [esp+28h+arg_10]
test	eax, eax
jz	short loc_72B5CB
mov	edx, [ebx+8]
push	eax
push	edx
mov	ecx, esi
call	sub_726710
jmp	short loc_72B5CB

loc_72B5AE:
mov	eax, [esp+28h+arg_10]
push	eax
mov	ecx, ebx
call	sub_72AE30
mov	ecx, [esp+28h+var_18]
mov	esi, eax
mov	[esp+28h+var_10], 0
mov	[esi+1Ch], ecx

loc_72B5CB:
xor	edi, edi
cmp	[esp+28h+arg_8], edi
jnz	short loc_72B5F2
cmp	ebp, 0Dh
jnz	short loc_72B5F2
mov	edx, [esp+28h+arg_0]
cmp	word ptr [edx],	0Ah
jnz	short loc_72B5F2
add	[esp+28h+arg_0], 2
sub	[esp+28h+arg_4], 1
jz	loc_72B76E

loc_72B5F2:
mov	ecx, [esp+28h+arg_4]
test	ecx, ecx
jbe	short loc_72B617
mov	eax, [esp+28h+arg_0]
mov	edi, edi

loc_72B600:
movzx	ebp, word ptr [eax+edi*2]
cmp	ebp, 0Ah
jz	short loc_72B621
cmp	ebp, 0Dh
jz	short loc_72B617
test	ebp, ebp
jz	short loc_72B617
inc	edi
cmp	edi, ecx
jb	short loc_72B600

loc_72B617:
cmp	ebp, 0Ah
jz	short loc_72B621
cmp	ebp, 0Dh
jnz	short loc_72B622

loc_72B621:
inc	edi

loc_72B622:
test	edi, edi
jnz	short loc_72B62A
xor	eax, eax
jmp	short loc_72B6A4

loc_72B62A:
mov	eax, [esi+4]
lea	edx, [eax+edi]
cmp	[esi+8], edx
jnb	short loc_72B667
mov	eax, [esi]
add	edx, edx
test	eax, eax
jnz	short loc_72B64D
mov	eax, [ebx+8]
mov	ecx, [eax+1Ch]
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
push	edx
jmp	short loc_72B65A

loc_72B64D:
mov	ecx, dword_1855FC0
mov	ebx, [ecx]
push	edx
push	eax
mov	eax, [ebx+2Ch]

loc_72B65A:
call	eax
mov	[esi], eax
mov	eax, [esi+4]
lea	ecx, [eax+edi]
mov	[esi+8], ecx

loc_72B667:
mov	ebx, [esp+28h+var_10]
sub	eax, ebx
jz	short loc_72B688
mov	ecx, [esi]
lea	edx, [eax+eax]
push	edx
lea	eax, [ecx+ebx*2]
push	eax
lea	edx, [edi+ebx]
lea	eax, [ecx+edx*2]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_72B688:
mov	ecx, [esi]
mov	edx, [esp+28h+var_10]
add	[esi+4], edi
push	edi
lea	ebx, [ecx+ebx*2]
push	edx
lea	ecx, [esi+10h]
call	sub_7276A0
inc	word ptr [esi+24h]
mov	eax, ebx

loc_72B6A4:
mov	ecx, [esp+28h+arg_0]
lea	ebx, [edi+edi]
push	ebx
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	[esp+34h+arg_0], ebx
sub	[esp+34h+arg_4], edi
add	esp, 0Ch
cmp	ebp, 0Ah
jz	short loc_72B6C8
cmp	ebp, 0Dh
jnz	short loc_72B732

loc_72B6C8:
mov	edx, [esp+28h+var_C]
mov	al, [edx+20h]
shr	al, 1
and	al, 1
movzx	ecx, al
neg	ecx
sbb	ecx, ecx
and	ecx, 3
add	ecx, 0Ah
cmp	ebp, ecx
jz	short loc_72B736
mov	ecx, [esi+4]
test	ecx, ecx
jbe	short loc_72B71D
mov	ebx, [esi]
lea	ebp, [ecx-1]
test	ebx, ebx
jz	short loc_72B6FD
cmp	ebp, ecx
jnb	short loc_72B6FD
lea	ebx, [ebx+ebp*2]
jmp	short loc_72B6FF

loc_72B6FD:
xor	ebx, ebx

loc_72B6FF:
cmp	word ptr [ebx],	0
jnz	short loc_72B706
dec	ecx

loc_72B706:
test	ecx, ecx
jbe	short loc_72B71D
mov	ebx, [esi]
neg	al
sbb	al, al
and	al, 3
add	al, 0Ah
movzx	ax, al
mov	[ebx+ecx*2-2], ax

loc_72B71D:
mov	cl, [edx+20h]
and	cl, 2
movzx	ebp, cl
neg	ebp
sbb	ebp, ebp
and	ebp, 3
add	ebp, 0Ah
jmp	short loc_72B736

loc_72B732:
mov	edx, [esp+28h+var_C]

loc_72B736:
mov	ebx, [esp+28h+var_10]
mov	eax, [esp+28h+arg_C]
mov	ecx, [edx+8]
push	0FFFFFFFFh
push	ebx
push	eax
push	ecx
mov	ecx, esi
call	sub_72A740
mov	eax, [esp+28h+var_4]
add	[esp+28h+var_14], edi
lea	edx, [edi+ebx]
add	[esp+28h+var_18], edx
cmp	[esp+28h+arg_0], eax
jnb	short loc_72B76A
test	ebp, ebp
jnz	loc_72B550

loc_72B76A:
mov	ebx, [esp+28h+var_C]

loc_72B76E:
mov	cl, [ebx+20h]
and	cl, 2
movzx	edx, cl
neg	edx
sbb	edx, edx
and	edx, 3
add	edx, 0Ah
cmp	ebp, edx
jnz	short loc_72B793
mov	eax, [esp+28h+arg_10]
push	eax
mov	ecx, ebx
call	sub_72AE30
mov	esi, eax

loc_72B793:
mov	edi, [esp+28h+arg_C]
mov	ecx, [ebx+8]
push	edi
push	ecx
mov	ecx, esi
call	sub_72A9B0
mov	edx, 100h
pop	esi
test	[edi+2Ah], dx
jz	short loc_72B7CC
lea	ecx, [edi+10h]
call	sub_679930
test	eax, eax
mov	eax, [esp+24h+var_14]
jz	short loc_72B7D0
or	byte ptr [ebx+20h], 1
pop	edi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h

loc_72B7CC:
mov	eax, [esp+24h+var_14]

loc_72B7D0:
pop	edi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h
sub_72B4D0 endp

align 10h



sub_72B7E0 proc	near
push	edi
mov	edi, ecx
mov	ecx, [edi+10h]
lea	eax, [ecx-1]
test	eax, eax
jl	short loc_72B7FB
cmp	eax, ecx
jge	short loc_72B7FB
mov	ecx, [edi+0Ch]
mov	eax, [ecx+eax*4]
test	eax, eax
jnz	short loc_72B808

loc_72B7FB:
push	0
mov	ecx, edi
call	sub_72AE30
test	eax, eax
jz	short loc_72B843

loc_72B808:
mov	ecx, [eax+4]
test	ecx, ecx
jbe	short loc_72B834
mov	edx, [eax]
push	esi
lea	esi, [ecx-1]
test	edx, edx
jz	short loc_72B822
cmp	esi, ecx
jnb	short loc_72B822
lea	ecx, [edx+esi*2]
jmp	short loc_72B824

loc_72B822:
xor	ecx, ecx

loc_72B824:
movzx	ecx, word ptr [ecx]
pop	esi
cmp	cx, 0Dh
jz	short loc_72B843
cmp	cx, 0Ah
jz	short loc_72B843

loc_72B834:
mov	edx, [edi+1Ch]
mov	ecx, [edi+8]
push	edx
push	ecx
mov	ecx, eax
call	sub_72A9B0

loc_72B843:
pop	edi
retn
sub_72B7E0 endp

align 10h



sub_72B850 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 20h
push	ebp
push	esi
mov	esi, [esp+28h+arg_8]
push	edi
xor	ebp, ebp
mov	edi, ecx
mov	[esp+2Ch+var_20], edi
cmp	esi, ebp
jnz	short loc_72B871
pop	edi
pop	esi
xor	eax, eax
pop	ebp
add	esp, 20h
retn	18h

loc_72B871:
push	ebx
call	sub_726950
mov	ebx, [esp+30h+arg_4]
cmp	ebx, eax
jbe	short loc_72B888
mov	ecx, edi
call	sub_726950
mov	ebx, eax

loc_72B888:
mov	eax, [esp+30h+arg_0]
cmp	esi, 0FFFFFFFFh
jnz	short loc_72B89F
xor	esi, esi
cmp	[eax], bp
jz	short loc_72B89F

loc_72B898:
inc	esi
cmp	[eax+esi*2], bp
jnz	short loc_72B898

loc_72B89F:
mov	edx, [edi]
push	eax
mov	eax, [edx+8]
push	esi
push	ebx
mov	ecx, edi
call	eax
lea	ecx, [esp+30h+arg_8]
push	ecx
push	ebx
lea	edx, [esp+38h+var_10]
push	edx
mov	ecx, edi
mov	[esp+3Ch+arg_8], ebp
mov	[esp+3Ch+arg_4], esi
call	sub_726830
mov	eax, [esp+30h+var_10]
mov	ecx, [esp+30h+var_C]
cmp	eax, ebp
jz	short loc_72B8E4
cmp	ecx, ebp
jl	short loc_72B8E4
cmp	ecx, [eax+4]
jge	short loc_72B8E4
mov	eax, [eax]
mov	ecx, [eax+ecx*4]
mov	eax, [ecx+1Ch]
jmp	short loc_72B8E6

loc_72B8E4:
xor	eax, eax

loc_72B8E6:
mov	[esp+30h+var_18], eax
mov	[esp+30h+var_1C], ebp
mov	[esp+30h+var_14], ebp

loc_72B8F2:
mov	eax, [esp+30h+var_10]
test	eax, eax
jz	short loc_72B907
mov	ebp, [esp+30h+var_C]
test	ebp, ebp
jl	short loc_72B907
cmp	ebp, [eax+4]
jl	short loc_72B92C

loc_72B907:
mov	edx, [esp+30h+arg_14]
mov	edi, [esp+30h+var_20]
push	edx
mov	ecx, edi
call	sub_72AE30
xor	ecx, ecx
lea	eax, [edi+0Ch]
mov	ebp, ecx
mov	[esp+30h+var_10], eax
mov	[esp+30h+var_C], ebp
mov	[esp+30h+arg_8], ecx
jmp	short loc_72B930

loc_72B92C:
mov	edi, [esp+30h+var_20]

loc_72B930:
mov	eax, [eax]
mov	esi, [eax+ebp*4]
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_72B959
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72B94E
cmp	edx, eax
jnb	short loc_72B94E
lea	ecx, [ecx+edx*2]
jmp	short loc_72B950

loc_72B94E:
xor	ecx, ecx

loc_72B950:
cmp	word ptr [ecx],	0
jnz	short loc_72B957
dec	eax

loc_72B957:
test	eax, eax

loc_72B959:
jnz	short loc_72B96B
mov	ecx, [esp+30h+arg_14]
mov	edx, [edi+8]
push	ecx
push	edx
mov	ecx, esi
call	sub_726710

loc_72B96B:
mov	eax, [esp+30h+var_1C]
xor	ebx, ebx
or	edx, 0FFFFFFFFh
cmp	[esp+30h+arg_C], ebx
jnz	short loc_72B9A2
cmp	ax, 0Dh
jnz	short loc_72B9A2
mov	ecx, [esp+30h+arg_0]
cmp	word ptr [ecx],	0Ah
jnz	short loc_72B9A2
add	[esp+30h+arg_0], 2
sub	[esp+30h+arg_4], 1
jz	loc_72BBD3
mov	edi, [esp+30h+var_20]
mov	ebp, [esp+30h+var_C]

loc_72B9A2:
mov	ecx, [esp+30h+arg_4]
test	ecx, ecx
jbe	short loc_72B9D6
lea	ebx, [ebx+0]

loc_72B9B0:
mov	eax, [esp+30h+arg_0]
movzx	eax, word ptr [eax+ebx*2]
mov	[esp+30h+var_1C], eax
cmp	ax, 0Ah
jz	short loc_72B9D4
cmp	ax, 0Dh
jz	short loc_72B9D4
test	ax, ax
jz	short loc_72B9D6
inc	ebx
cmp	ebx, ecx
jb	short loc_72B9B0
jmp	short loc_72B9D6

loc_72B9D4:
mov	edx, ebx

loc_72B9D6:
cmp	ax, 0Ah
jz	short loc_72B9E2
cmp	ax, 0Dh
jnz	short loc_72B9E3

loc_72B9E2:
inc	ebx

loc_72B9E3:
cmp	edx, 0FFFFFFFFh
jz	loc_72BB37
mov	eax, [esp+30h+var_10]
cmp	ebp, [eax+4]
mov	[esp+30h+var_8], eax
mov	[esp+30h+var_4], ebp
jge	short loc_72BA02
inc	ebp
mov	[esp+30h+var_4], ebp

loc_72BA02:
mov	ecx, [esp+30h+arg_14]
push	ecx
mov	ecx, [esp+34h+var_20]
lea	edx, [esp+34h+var_8]
push	edx
call	sub_72B040
mov	ebp, [esi+0Ch]
mov	edi, eax
test	ebp, ebp
jz	short loc_72BA21
inc	dword ptr [ebp+4]

loc_72BA21:
mov	ecx, [edi+0Ch]
test	ecx, ecx
jz	short loc_72BA2D
call	sub_64A400

loc_72BA2D:
mov	eax, [esp+30h+arg_8]
mov	edx, [esp+30h+var_20]
mov	[edi+0Ch], ebp
inc	word ptr [edi+24h]
mov	ecx, [esi+4]
sub	ecx, eax
push	ecx
push	0
push	eax
mov	eax, [edx+8]
push	esi
push	eax
mov	ecx, edi
call	sub_72AB90
mov	ecx, [esp+30h+arg_10]
mov	eax, [esp+30h+arg_8]
mov	edi, [esi+4]
mov	edx, [esp+30h+arg_0]
push	ecx
push	ebx
push	eax
sub	edi, eax
mov	eax, [esp+3Ch+var_20]
mov	ecx, [eax+8]
push	edx
push	ecx
mov	ecx, esi
call	sub_72A910
test	edi, edi
jbe	loc_72BB52
mov	eax, [esi+4]
mov	ecx, edi
cmp	edi, eax
jb	short loc_72BA88
mov	ecx, eax

loc_72BA88:
mov	edi, eax
sub	edi, ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_72BA95
or	ebp, eax
jmp	short loc_72BA9F

loc_72BA95:
mov	ebp, eax
sub	ebp, edi
jz	loc_72BB52

loc_72BA9F:
cmp	edi, eax
jnb	short loc_72BACB
lea	edx, [edi+ebp]
cmp	edx, eax
jb	short loc_72BAAF
mov	[esi+4], edi
jmp	short loc_72BACB

loc_72BAAF:
mov	ecx, [esi]
sub	eax, ebp
sub	eax, edi
add	eax, eax
push	eax
lea	edx, [ecx+edx*2]
push	edx
lea	eax, [ecx+edi*2]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
sub	[esi+4], ebp

loc_72BACB:
push	ebp
lea	ecx, [esi+10h]
push	edi
call	sub_72A120
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_72BB31
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72BAEE
cmp	edx, eax
jnb	short loc_72BAEE
lea	edx, [ecx+edx*2]
jmp	short loc_72BAF0

loc_72BAEE:
xor	edx, edx

loc_72BAF0:
cmp	word ptr [edx],	0
jnz	short loc_72BB31
mov	ebp, eax
test	ebp, ebp
jbe	short loc_72BB19
test	eax, eax
jbe	short loc_72BB19
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72BB10
cmp	edx, eax
jnb	short loc_72BB10
lea	eax, [ecx+edx*2]
jmp	short loc_72BB12

loc_72BB10:
xor	eax, eax

loc_72BB12:
cmp	word ptr [eax],	0
jnz	short loc_72BB19
dec	ebp

loc_72BB19:
push	1
lea	edi, [esi+10h]
push	ebp
mov	ecx, edi
call	sub_7276A0
push	1
inc	ebp
push	ebp
mov	ecx, edi
call	sub_72A120

loc_72BB31:
inc	word ptr [esi+24h]
jmp	short loc_72BB52

loc_72BB37:
mov	ecx, [esp+30h+arg_10]
mov	edx, [esp+30h+arg_8]
mov	eax, [esp+30h+arg_0]
push	ecx
mov	ecx, [edi+8]
push	ebx
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_72A910

loc_72BB52:
mov	ecx, [esp+30h+var_1C]
cmp	cx, 0Dh
jz	short loc_72BB62
cmp	cx, 0Ah
jnz	short loc_72BB89

loc_72BB62:
mov	edx, [esp+30h+var_20]
mov	al, [edx+20h]
and	al, 2
neg	al
sbb	al, al
and	al, 3
add	al, 0Ah
movzx	ax, al
cmp	cx, ax
jz	short loc_72BB89
mov	edx, [esp+30h+arg_8]
mov	edi, [esi]
add	edx, ebx
mov	[edi+edx*2-2], ax

loc_72BB89:
mov	eax, [esp+30h+arg_0]
sub	[esp+30h+arg_4], ebx
add	[esp+30h+var_14], ebx
lea	edx, [eax+ebx*2]
mov	eax, [esp+30h+var_18]
mov	[esi+1Ch], eax
add	eax, [esi+4]
mov	[esp+30h+arg_0], edx
mov	edx, [esp+30h+var_C]
mov	[esp+30h+var_18], eax
mov	eax, [esp+30h+var_10]
cmp	edx, [eax+4]
mov	[esp+30h+arg_8], 0
jge	short loc_72BBC3
inc	[esp+30h+var_C]

loc_72BBC3:
cmp	[esp+30h+arg_4], 0
jbe	short loc_72BBD3
test	cx, cx
jnz	loc_72B8F2

loc_72BBD3:
mov	edx, [esp+30h+var_18]
mov	esi, [esp+30h+var_10]
mov	eax, [esp+30h+var_C]
pop	ebx

loc_72BBE0:
test	eax, eax
jl	short loc_72BBFC
cmp	eax, [esi+4]
jge	short loc_72BBFC
mov	ecx, [esi]
mov	ecx, [ecx+eax*4]
mov	[ecx+1Ch], edx
add	edx, [ecx+4]
cmp	eax, [esi+4]
jge	short loc_72BBE0
inc	eax
jmp	short loc_72BBE0

loc_72BBFC:
mov	edi, [esp+2Ch+var_20]
mov	ecx, [edi+10h]
lea	eax, [ecx-1]
test	eax, eax
jl	short loc_72BC18
cmp	eax, ecx
jge	short loc_72BC18
mov	edx, [edi+0Ch]
mov	eax, [edx+eax*4]
test	eax, eax
jnz	short loc_72BC25

loc_72BC18:
push	0
mov	ecx, edi
call	sub_72AE30
test	eax, eax
jz	short loc_72BC5E

loc_72BC25:
mov	ecx, [eax+4]
test	ecx, ecx
jbe	short loc_72BC4F
mov	edx, [eax]
lea	esi, [ecx-1]
test	edx, edx
jz	short loc_72BC3E
cmp	esi, ecx
jnb	short loc_72BC3E
lea	ecx, [edx+esi*2]
jmp	short loc_72BC40

loc_72BC3E:
xor	ecx, ecx

loc_72BC40:
movzx	ecx, word ptr [ecx]
cmp	cx, 0Dh
jz	short loc_72BC5E
cmp	cx, 0Ah
jz	short loc_72BC5E

loc_72BC4F:
mov	ecx, [edi+1Ch]
mov	edx, [edi+8]
push	ecx
push	edx
mov	ecx, eax
call	sub_72A9B0

loc_72BC5E:
mov	eax, [esp+2Ch+arg_10]
mov	ecx, 100h
test	[eax+2Ah], cx
jz	short loc_72BC7D
lea	ecx, [eax+10h]
call	sub_679930
test	eax, eax
jz	short loc_72BC7D
or	byte ptr [edi+20h], 1

loc_72BC7D:
mov	eax, [esp+2Ch+var_14]
pop	edi
pop	esi
pop	ebp
add	esp, 20h
retn	18h
sub_72B850 endp

align 10h



sub_72BC90 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20h
push	ebp
push	esi
mov	esi, [esp+28h+arg_0]
mov	ebp, ecx
mov	ecx, esi
mov	[esp+28h+var_20], ebp
call	sub_726950
mov	ecx, [esp+28h+arg_8]
cmp	ecx, 0FFFFFFFFh
jz	short loc_72BCB3
cmp	ecx, eax
jbe	short loc_72BCB9

loc_72BCB3:
mov	ecx, eax
mov	[esp+28h+arg_8], ecx

loc_72BCB9:
test	ecx, ecx
jz	loc_72C0C6
cmp	dword ptr [esi+10h], 0
jz	loc_72C0C6
mov	eax, [ebp+0]
mov	edx, [eax+4]
push	ebx
push	edi
mov	edi, [esp+30h+arg_4]
push	offset byte_146D660
push	ecx
push	edi
mov	ecx, ebp
call	edx
lea	eax, [esp+30h+arg_4]
push	eax
push	edi
lea	ecx, [esp+38h+var_10]
push	ecx
mov	ecx, ebp
mov	[esp+3Ch+arg_4], 0
call	sub_726830
mov	edi, [esp+30h+var_10]
test	edi, edi
jz	short loc_72BD11
mov	ebx, [esp+30h+var_C]
test	ebx, ebx
jl	short loc_72BD11
cmp	ebx, [edi+4]
jl	short loc_72BD2B

loc_72BD11:
push	0
mov	ecx, ebp
call	sub_72AE30
lea	edi, [ebp+0Ch]
xor	ebx, ebx
mov	[esp+30h+var_10], edi
mov	[esp+30h+var_C], ebx
xor	ebp, ebp
jmp	short loc_72BD2F

loc_72BD2B:
mov	ebp, [esp+30h+arg_4]

loc_72BD2F:
test	edi, edi
jz	short loc_72BD46
test	ebx, ebx
jl	short loc_72BD46
cmp	ebx, [edi+4]
jge	short loc_72BD46
mov	edx, [edi]
mov	eax, [edx+ebx*4]
mov	eax, [eax+1Ch]
jmp	short loc_72BD48

loc_72BD46:
xor	eax, eax

loc_72BD48:
cmp	dword ptr [esi+10h], 1
mov	[esp+30h+arg_4], eax
jnz	short loc_72BDC6
mov	eax, [esi+0Ch]
mov	esi, [eax]
mov	ecx, [edi]
mov	eax, [esi+4]
mov	edx, [ecx+ebx*4]
mov	[esp+30h+var_1C], edx
test	eax, eax
jbe	short loc_72BD82
mov	ecx, [esi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72BD79
cmp	edx, eax
jnb	short loc_72BD79
lea	ecx, [ecx+edx*2]
jmp	short loc_72BD7B

loc_72BD79:
xor	ecx, ecx

loc_72BD7B:
cmp	word ptr [ecx],	0
jnz	short loc_72BD82
dec	eax

loc_72BD82:
mov	ecx, [esp+30h+var_20]
mov	edx, [ecx+8]
mov	ecx, [esp+30h+var_1C]
push	eax
push	ebp
push	0
push	esi
push	edx
call	sub_72AB90
test	ebp, ebp
jnz	short loc_72BDB1
mov	eax, [esi+0Ch]
mov	ecx, [esp+30h+var_20]
mov	edx, [ecx+8]
mov	ecx, [esp+30h+var_1C]
push	eax
push	edx
call	sub_726710

loc_72BDB1:
mov	eax, [esp+30h+var_1C]
mov	ecx, [eax+4]
mov	eax, [edi+4]
add	[esp+30h+arg_4], ecx
cmp	ebx, eax
jmp	loc_72C007

loc_72BDC6:
cmp	ebx, [edi+4]
mov	edx, [edi]
mov	esi, [edx+ebx*4]
mov	[esp+30h+var_4], 0
mov	[esp+30h+var_18], edi
mov	[esp+30h+var_14], ebx
jge	short loc_72BDE5
inc	ebx
mov	[esp+30h+var_14], ebx

loc_72BDE5:
mov	eax, [esi+0Ch]
mov	edi, [esp+30h+var_20]
push	eax
lea	eax, [esp+34h+var_18]
push	eax
mov	ecx, edi
call	sub_72B040
mov	ecx, [esi+4]
mov	edx, [edi+8]
sub	ecx, ebp
push	ecx
push	0
push	ebp
push	esi
push	edx
mov	ecx, eax
mov	[esp+44h+var_18], eax
call	sub_72AB90
mov	eax, [esp+30h+arg_0]
mov	ecx, [eax+0Ch]
mov	edi, [ecx]
mov	ebx, [esi+4]
mov	eax, [edi+4]
sub	ebx, ebp
test	eax, eax
jbe	short loc_72BE42
mov	ecx, [edi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72BE39
cmp	edx, eax
jnb	short loc_72BE39
lea	ecx, [ecx+edx*2]
jmp	short loc_72BE3B

loc_72BE39:
xor	ecx, ecx

loc_72BE3B:
cmp	word ptr [ecx],	0
jnz	short loc_72BE42
dec	eax

loc_72BE42:
mov	edx, [esp+30h+var_20]
push	eax
mov	eax, [edx+8]
push	ebp
push	0
push	edi
push	eax
mov	ecx, esi
call	sub_72AB90
mov	eax, [edi+4]
test	eax, eax
jbe	short loc_72BE78
mov	ecx, [edi]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72BE6F
cmp	edx, eax
jnb	short loc_72BE6F
lea	ecx, [ecx+edx*2]
jmp	short loc_72BE71

loc_72BE6F:
xor	ecx, ecx

loc_72BE71:
cmp	word ptr [ecx],	0
jnz	short loc_72BE78
dec	eax

loc_72BE78:
mov	ecx, [esp+30h+arg_8]
sub	ecx, eax
mov	[esp+30h+var_1C], ecx
test	ebp, ebp
jnz	short loc_72BE99
mov	ecx, [edi+0Ch]
mov	edx, [esp+30h+var_20]
mov	eax, [edx+8]
push	ecx
push	eax
mov	ecx, esi
call	sub_726710

loc_72BE99:
test	ebx, ebx
jbe	short loc_72BEB3
mov	eax, [esi+4]
mov	ecx, ebx
cmp	ebx, eax
jb	short loc_72BEA8
mov	ecx, eax

loc_72BEA8:
push	eax
sub	eax, ecx
push	eax
mov	ecx, esi
call	sub_72A4E0

loc_72BEB3:
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_72BED5
mov	esi, [esi]
lea	ecx, [eax-1]
test	esi, esi
jz	short loc_72BECC
cmp	ecx, eax
jnb	short loc_72BECC
lea	esi, [esi+ecx*2]
jmp	short loc_72BECE

loc_72BECC:
xor	esi, esi

loc_72BECE:
cmp	word ptr [esi],	0
jnz	short loc_72BED5
dec	eax

loc_72BED5:
mov	ecx, [esp+30h+var_10]
mov	edx, [esp+30h+var_C]
add	[esp+30h+arg_4], eax
cmp	edx, [ecx+4]
jge	short loc_72BEEA
inc	[esp+30h+var_C]

loc_72BEEA:
mov	eax, [esp+30h+arg_0]
mov	eax, [eax+10h]
test	eax, eax
jle	short loc_72BF00
mov	[esp+30h+var_4], 1
lea	ecx, [ecx+0]

loc_72BF00:
mov	ecx, [esp+30h+var_4]
test	ecx, ecx
jl	loc_72BFCB
cmp	ecx, eax
jge	loc_72BFCB
mov	edx, [esp+30h+var_1C]
test	edx, edx
jbe	loc_72BFCB
mov	eax, [esp+30h+arg_0]
mov	eax, [eax+0Ch]
mov	edi, [eax+ecx*4]
mov	esi, [edi+4]
test	esi, esi
jbe	short loc_72BF4C
mov	eax, [edi]
lea	ecx, [esi-1]
test	eax, eax
jz	short loc_72BF43
cmp	ecx, esi
jnb	short loc_72BF43
lea	eax, [eax+ecx*2]
jmp	short loc_72BF45

loc_72BF43:
xor	eax, eax

loc_72BF45:
cmp	word ptr [eax],	0
jnz	short loc_72BF4C
dec	esi

loc_72BF4C:
cmp	esi, edx
ja	short loc_72BFA3
cmp	esi, [esp+30h+var_1C]
jnz	short loc_72BF61
mov	ecx, edi
call	sub_725A70
test	al, al
jz	short loc_72BFA3

loc_72BF61:
push	edi
lea	ecx, [esp+34h+var_10]
push	ecx
mov	ecx, [esp+38h+var_20]
call	sub_72B140
mov	edx, [esp+30h+arg_0]
mov	eax, [edx+10h]
sub	[esp+30h+var_1C], esi
add	[esp+30h+arg_4], esi
cmp	[esp+30h+var_4], eax
jge	short loc_72BF89
inc	[esp+30h+var_4]

loc_72BF89:
mov	ecx, [esp+30h+var_C]
mov	edx, [esp+30h+var_10]
cmp	ecx, [edx+4]
jge	loc_72BF00
inc	[esp+30h+var_C]
jmp	loc_72BF00

loc_72BFA3:
mov	ebx, [esp+30h+var_20]
mov	eax, [ebx+8]
push	esi
mov	esi, [esp+34h+var_18]
push	0
push	0
push	edi
push	eax
mov	ecx, esi
call	sub_72AB90
mov	ecx, [edi+0Ch]
mov	edx, [ebx+8]
push	ecx
push	edx
mov	ecx, esi
call	sub_726710

loc_72BFCB:
mov	ecx, [esp+30h+var_18]
mov	eax, [esp+30h+arg_4]
mov	[ecx+1Ch], eax
mov	eax, [ecx+4]
test	eax, eax
jbe	short loc_72BFF8
mov	ecx, [ecx]
lea	edx, [eax-1]
test	ecx, ecx
jz	short loc_72BFEF
cmp	edx, eax
jnb	short loc_72BFEF
lea	ecx, [ecx+edx*2]
jmp	short loc_72BFF1

loc_72BFEF:
xor	ecx, ecx

loc_72BFF1:
cmp	word ptr [ecx],	0
jnz	short loc_72BFF8
dec	eax

loc_72BFF8:
add	[esp+30h+arg_4], eax
mov	ecx, [esp+30h+var_10]
mov	eax, [ecx+4]
cmp	[esp+30h+var_C], eax

loc_72C007:
jge	short loc_72C00D
inc	[esp+30h+var_C]

loc_72C00D:
mov	esi, [esp+30h+var_10]
mov	edx, [esp+30h+var_C]
mov	ecx, [esp+30h+arg_4]
pop	edi
pop	ebx
jmp	short loc_72C020
align 10h

loc_72C020:
test	edx, edx
jl	short loc_72C042
cmp	edx, eax
jge	short loc_72C042
mov	eax, [esi]
mov	eax, [eax+edx*4]
cmp	[eax+1Ch], ecx
jz	short loc_72C042
mov	[eax+1Ch], ecx
add	ecx, [eax+4]
mov	eax, [esi+4]
cmp	edx, eax
jge	short loc_72C020
inc	edx
jmp	short loc_72C020

loc_72C042:
mov	edx, [esp+28h+var_20]
mov	ecx, [edx+10h]
lea	eax, [ecx-1]
test	eax, eax
jl	short loc_72C05E
cmp	eax, ecx
jge	short loc_72C05E
mov	ecx, [edx+0Ch]
mov	eax, [ecx+eax*4]
test	eax, eax
jnz	short loc_72C06B

loc_72C05E:
push	0
mov	ecx, edx
call	sub_72AE30
test	eax, eax
jz	short loc_72C0A8

loc_72C06B:
mov	ecx, [eax+4]
test	ecx, ecx
jbe	short loc_72C095
mov	edx, [eax]
lea	esi, [ecx-1]
test	edx, edx
jz	short loc_72C084
cmp	esi, ecx
jnb	short loc_72C084
lea	ecx, [edx+esi*2]
jmp	short loc_72C086

loc_72C084:
xor	ecx, ecx

loc_72C086:
movzx	ecx, word ptr [ecx]
cmp	cx, 0Dh
jz	short loc_72C0A8
cmp	cx, 0Ah
jz	short loc_72C0A8

loc_72C095:
mov	ecx, [esp+28h+var_20]
mov	edx, [ecx+1Ch]
mov	ecx, [ecx+8]
push	edx
push	ecx
mov	ecx, eax
call	sub_72A9B0

loc_72C0A8:
mov	edx, [esp+28h+arg_0]
test	byte ptr [edx+20h], 1
jz	short loc_72C0BA
mov	eax, [esp+28h+var_20]
or	byte ptr [eax+20h], 1

loc_72C0BA:
mov	eax, [esp+28h+arg_8]
pop	esi
pop	ebp
add	esp, 20h
retn	0Ch

loc_72C0C6:
pop	esi
xor	eax, eax
pop	ebp
add	esp, 20h
retn	0Ch
sub_72BC90 endp




sub_72C0D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	eax, [ebp+10h]
push	edi
xor	ebx, ebx
xor	edi, edi
mov	[esp+18h+var_8], edi
mov	[esp+18h+var_4], eax
cmp	eax, ebx
jbe	loc_72C192

loc_72C0F0:
cmp	[ebp+8], ebx
jnz	short loc_72C165
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebp
call	edx
mov	edi, eax
mov	eax, [edi]
mov	edx, [eax+28h]
push	ebx
push	50h
mov	ecx, edi
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_72C150
mov	dword ptr [esi], offset	off_155F500
mov	ecx, 1
mov	[esi+4], ecx
mov	dword ptr [esi], offset	off_1437724
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	eax, 64h
mov	[esi+18h], ecx
push	edi
lea	ecx, [esi+20h]
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+1Ch], edi
call	sub_694320
mov	[esi+4Ch], bl
jmp	short loc_72C152

loc_72C150:
xor	esi, esi

loc_72C152:
mov	ecx, [ebp+8]
cmp	ecx, ebx
jz	short loc_72C15E
call	sub_64A400

loc_72C15E:
mov	edi, [esp+18h+var_8]
mov	[ebp+8], esi

loc_72C165:
mov	eax, [ebp+0Ch]
mov	esi, [eax+edi*4]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
inc	edi
mov	[esi], ebx
mov	[esi+8], ebx
mov	[esi+4], ebx
mov	[esp+18h+var_8], edi
cmp	edi, [esp+18h+var_4]
jb	loc_72C0F0

loc_72C192:
mov	eax, [ebp+10h]
lea	esi, [ebp+0Ch]
cmp	eax, ebx
jbe	short loc_72C1D9
push	eax
mov	eax, [esi]
push	eax
call	sub_721CD0
add	esp, 8
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_72C1E7
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_72C1C7
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_72C1C7:
pop	edi
mov	[esi+8], ebx
mov	[esi+4], ebx
and	byte ptr [ebp+20h], 0FEh
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn

loc_72C1D9:
cmp	[esi+8], ebx
ja	short loc_72C1E7
push	ebx
push	esi
mov	ecx, esi
call	sub_668FE0

loc_72C1E7:
pop	edi
mov	[esi+4], ebx
and	byte ptr [ebp+20h], 0FEh
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_72C0D0 endp

align 10h



sub_72C200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	edx
mov	edx, [esp+8+arg_0]
push	1
push	eax
push	edx
call	sub_72B4D0
retn	10h
sub_72C200 endp

align 10h



sub_72C220 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= word ptr	-0Ch
var_A= word ptr	-0Ah
var_8= dword ptr -8
var_4= word ptr	-4
var_2= word ptr	-2
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+28h+arg_0]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_155F500
mov	eax, 1
mov	[esi+4], eax
mov	dword ptr [esi], offset	off_14401C8
cmp	edi, ebx
jz	short loc_72C24A
add	[edi+4], eax

loc_72C24A:
mov	[esi+8], edi
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esp+28h+var_18], offset off_155F500
mov	[esi+20h], bl
mov	[esp+28h+var_14], eax
xor	eax, eax
xor	ecx, ecx
mov	[esp+28h+var_C], ax
mov	word ptr [esp+28h+var_8+2], ax
xor	edx, edx
lea	eax, [esp+28h+var_18]
mov	[esp+28h+var_A], cx
mov	[esp+28h+var_4], cx
push	eax
mov	ecx, edi
mov	[esp+2Ch+var_18], offset off_143AB58
mov	[esp+2Ch+var_10], ebx
mov	word ptr [esp+2Ch+var_8], dx
mov	[esp+2Ch+var_2], dx
call	sub_702870
mov	ecx, [esi+18h]
mov	ebp, eax
cmp	ecx, ebx
jz	short loc_72C2B5
call	sub_64A400

loc_72C2B5:
lea	ecx, [esp+28h+var_18]
mov	[esi+18h], ebp
mov	[esp+28h+var_18], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+28h+var_18]
call	sub_64A3F0
lea	ecx, [edi+20h]
push	ecx
mov	ecx, edi
call	sub_702780
mov	ecx, [esi+1Ch]
mov	edi, eax
cmp	ecx, ebx
jz	short loc_72C2EB
call	sub_64A430

loc_72C2EB:
mov	[esi+1Ch], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	4
sub_72C220 endp

align 10h



sub_72C300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx+18h]
mov	edx, [ecx+1Ch]
push	eax
mov	eax, [esp+4+arg_8]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
push	edx
push	eax
call	sub_72B240
retn	0Ch
sub_72C300 endp

align 10h



sub_72C320 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
call	sub_72C0D0
mov	eax, [esi+18h]
mov	ecx, [esi+1Ch]
mov	edx, [esp+4+arg_4]
push	eax
mov	eax, [esp+8+arg_0]
push	ecx
push	1
push	edx
push	eax
mov	ecx, esi
call	sub_72B240
pop	esi
retn	8
sub_72C320 endp

align 10h



sub_72C350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
call	sub_72C0D0
mov	eax, [esi+18h]
mov	ecx, [esi+1Ch]
mov	edx, [esp+4+arg_4]
push	eax
mov	eax, [esp+8+arg_0]
push	ecx
push	1
push	edx
push	eax
mov	ecx, esi
call	sub_72B4D0
pop	esi
retn	8
sub_72C350 endp

align 10h



sub_72C380 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_8]
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
mov	[esp+1Ch+var_C], ebx
cmp	eax, 0FFFFFFFFh
jnz	short loc_72C39B
call	sub_726950

loc_72C39B:
mov	edi, [esp+1Ch+arg_4]
mov	ebp, [esp+1Ch+arg_0]
sub	eax, edi
mov	esi, eax
mov	ecx, ebp
mov	[esp+1Ch+arg_4], 0
mov	[esp+1Ch+arg_8], esi
call	sub_72C0D0
mov	eax, [ebp+0]
mov	edx, [eax+4]
push	offset byte_146D660
push	esi
push	edi
mov	ecx, ebp
call	edx
lea	eax, [esp+1Ch+arg_4]
push	eax
push	edi
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, ebx
call	sub_7267B0
mov	ebx, [esp+1Ch+var_8]
test	ebx, ebx
jz	loc_72C4F8
mov	edi, [esp+1Ch+var_4]
test	edi, edi
jl	loc_72C4F8
mov	eax, [ebx+4]
cmp	edi, eax
jge	loc_72C4F8
cmp	[esp+1Ch+arg_4], 0
jz	short loc_72C480
mov	edx, [ebx]
mov	ebx, [edx+edi*4]
mov	eax, [ebx+0Ch]
push	eax
mov	ecx, ebp
mov	[esp+20h+arg_8], ebx
call	sub_72AE30
mov	[esp+1Ch+arg_0], eax
mov	eax, [ebx+4]
test	eax, eax
jbe	short loc_72C441
mov	ebx, [ebx]
lea	ecx, [eax-1]
test	ebx, ebx
jz	short loc_72C438
cmp	ecx, eax
jnb	short loc_72C438
lea	ecx, [ebx+ecx*2]
jmp	short loc_72C43A

loc_72C438:
xor	ecx, ecx

loc_72C43A:
cmp	word ptr [ecx],	0
jnz	short loc_72C441
dec	eax

loc_72C441:
sub	eax, [esp+1Ch+arg_4]
mov	ebx, eax
cmp	ebx, esi
jb	short loc_72C44D
mov	ebx, esi

loc_72C44D:
mov	eax, [esp+1Ch+arg_4]
mov	ecx, [esp+1Ch+arg_8]
push	ebx
push	0
push	eax
push	ecx
mov	ecx, ebp
call	sub_7204E0
mov	ecx, [esp+2Ch+arg_0]
push	eax
call	sub_72AB90
mov	edx, [esp+1Ch+var_8]
mov	eax, [edx+4]
sub	esi, ebx
mov	[esp+1Ch+arg_8], esi
mov	ebx, edx

loc_72C47A:
cmp	edi, eax
jge	short loc_72C480
inc	edi
nop

loc_72C480:
test	edi, edi
jl	short loc_72C4F8
cmp	edi, eax
jge	short loc_72C4F8
cmp	[esp+1Ch+arg_8], 0
jbe	short loc_72C4F8
mov	eax, [ebx]
mov	eax, [eax+edi*4]
mov	esi, [eax+4]
test	esi, esi
jbe	short loc_72C4B6
mov	ecx, [eax]
lea	edx, [esi-1]
test	ecx, ecx
jz	short loc_72C4AD
cmp	edx, esi
jnb	short loc_72C4AD
lea	ecx, [ecx+edx*2]
jmp	short loc_72C4AF

loc_72C4AD:
xor	ecx, ecx

loc_72C4AF:
cmp	word ptr [ecx],	0
jnz	short loc_72C4B6
dec	esi

loc_72C4B6:
cmp	esi, [esp+1Ch+arg_8]
ja	short loc_72C4CD
push	eax
mov	ecx, ebp
call	sub_72AF50
sub	[esp+1Ch+arg_8], esi
mov	eax, [ebx+4]
jmp	short loc_72C47A

loc_72C4CD:
mov	ecx, [ebx]
mov	edi, [ecx+edi*4]
mov	eax, [edi+0Ch]
push	eax
mov	ecx, ebp
call	sub_72AE30
mov	edx, [esp+1Ch+arg_8]
push	edx
push	0
push	0
push	edi
mov	ecx, ebp
mov	esi, eax
call	sub_7204E0
push	eax
mov	ecx, esi
call	sub_72AB90

loc_72C4F8:
mov	ecx, [ebp+10h]
lea	eax, [ecx-1]
test	eax, eax
jl	short loc_72C545
cmp	eax, ecx
jge	short loc_72C545
mov	ecx, [ebp+0Ch]
mov	eax, [ecx+eax*4]
test	eax, eax
jz	short loc_72C545
mov	ecx, [eax+4]
test	ecx, ecx
jbe	short loc_72C545
mov	edx, [eax]
lea	esi, [ecx-1]
test	edx, edx
jz	short loc_72C529
cmp	esi, ecx
jnb	short loc_72C529
lea	ecx, [edx+esi*2]
jmp	short loc_72C52B

loc_72C529:
xor	ecx, ecx

loc_72C52B:
movzx	ecx, word ptr [ecx]
cmp	cx, 0Dh
jz	short loc_72C53A
cmp	cx, 0Ah
jnz	short loc_72C545

loc_72C53A:
mov	edx, [eax+0Ch]
push	edx
mov	ecx, ebp
call	sub_72AE30

loc_72C545:
mov	ecx, [ebp+10h]
lea	eax, [ecx-1]
test	eax, eax
jl	short loc_72C55D
cmp	eax, ecx
jge	short loc_72C55D
mov	ecx, [ebp+0Ch]
mov	eax, [ecx+eax*4]
test	eax, eax
jnz	short loc_72C56A

loc_72C55D:
push	0
mov	ecx, ebp
call	sub_72AE30
test	eax, eax
jz	short loc_72C5A3

loc_72C56A:
mov	ecx, [eax+4]
test	ecx, ecx
jbe	short loc_72C594
mov	edx, [eax]
lea	esi, [ecx-1]
test	edx, edx
jz	short loc_72C583
cmp	esi, ecx
jnb	short loc_72C583
lea	ecx, [edx+esi*2]
jmp	short loc_72C585

loc_72C583:
xor	ecx, ecx

loc_72C585:
movzx	ecx, word ptr [ecx]
cmp	cx, 0Dh
jz	short loc_72C5A3
cmp	cx, 0Ah
jz	short loc_72C5A3

loc_72C594:
mov	edx, [ebp+1Ch]
mov	ecx, [ebp+8]
push	edx
push	ecx
mov	ecx, eax
call	sub_72A9B0

loc_72C5A3:
mov	edx, [esp+1Ch+var_C]
test	byte ptr [edx+20h], 1
jz	short loc_72C5B1
or	byte ptr [ebp+20h], 1

loc_72C5B1:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_72C380 endp

align 10h



sub_72C5C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [ecx+18h]
mov	edx, [ecx+1Ch]
push	eax
mov	eax, [esp+4+arg_C]
push	edx
mov	edx, [esp+8+arg_8]
push	eax
mov	eax, [esp+0Ch+arg_4]
push	edx
mov	edx, [esp+10h+arg_0]
push	eax
push	edx
call	sub_72B850
retn	10h
sub_72C5C0 endp

align 10h



sub_72C5F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx]
mov	edx, [eax+14h]
push	esi
mov	esi, [esp+4+arg_4]
push	esi
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [esp+4+arg_0]
xor	edx, edx
mov	[esi], edx
mov	[esi+8], edx
mov	[esi+4], edx
mov	ecx, [eax]
pop	esi
cmp	ecx, edx
jz	short locret_72C634
mov	eax, [eax+4]
cmp	eax, edx
jl	short locret_72C634
cmp	eax, [ecx+4]
jge	short locret_72C634
push	eax
call	sub_72ADD0

locret_72C634:
retn	8
sub_72C5F0 endp

align 10h



sub_72C640 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
cmp	[esp+1Ch+arg_4], 0FFFFFFFFh
push	ebx
mov	ebx, ecx
push	esi
mov	[esp+24h+var_1C], ebx
jnz	short loc_72C65B
call	sub_726950
mov	[esp+24h+arg_4], eax

loc_72C65B:
mov	eax, [ebx]
mov	esi, [esp+24h+arg_0]
mov	edx, [eax+0Ch]
push	ebp
push	edi
mov	edi, [esp+2Ch+arg_4]
push	edi
push	esi
mov	ecx, ebx
call	edx
lea	eax, [esp+2Ch+var_10]
push	eax
push	esi
lea	ecx, [esp+34h+var_8]
push	ecx
mov	ecx, ebx
call	sub_7267B0
mov	esi, [esp+2Ch+var_8]
mov	ebp, [esp+2Ch+var_4]
mov	[esp+2Ch+var_14], 0
mov	[esp+2Ch+var_18], edi
mov	byte ptr [esp+2Ch+arg_0], 0
test	esi, esi
jz	loc_72C8FD
test	ebp, ebp
jl	short loc_72C700
cmp	ebp, [esi+4]
jge	short loc_72C700
mov	edx, [esi]
mov	ecx, [edx+ebp*4]
mov	ebx, [ecx+4]
mov	edx, [esp+2Ch+var_10]
mov	eax, ebx
sub	eax, edx
cmp	edi, eax
jb	short loc_72C6C2
mov	edi, eax

loc_72C6C2:
cmp	edi, ebx
ja	short loc_72C6F5
lea	eax, [edi+edx]
push	eax
cmp	eax, ebx
push	edx
setnb	byte ptr [esp+34h+arg_0]
mov	[esp+34h+var_14], ecx
call	sub_72A4E0
mov	eax, [esp+2Ch+arg_4]
mov	ebx, [esp+2Ch+var_1C]
sub	eax, edi
cmp	ebp, [esi+4]
mov	[esp+2Ch+var_18], eax
jge	short loc_72C700
inc	ebp
mov	[esp+2Ch+var_4], ebp
jmp	short loc_72C700

loc_72C6F5:
mov	ebx, [esp+2Ch+var_1C]
lea	esp, [esp+0]

loc_72C700:
test	esi, esi
jz	loc_72C8FD
test	ebp, ebp
jl	loc_72C844
cmp	ebp, [esi+4]
jge	loc_72C844
mov	eax, [esi]
mov	edi, [eax+ebp*4]
mov	ebx, [edi+4]
mov	eax, [esp+2Ch+var_18]
mov	[esp+2Ch+var_C], ebx
cmp	eax, ebx
jb	loc_72C86D
mov	ecx, [esp+2Ch+var_1C]
mov	edx, [ecx]
mov	eax, [edx+14h]
push	edi
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
xor	eax, eax
mov	[edi], eax
mov	[edi+8], eax
mov	[edi+4], eax
cmp	ebp, [esi+4]
jge	loc_72C836
cmp	dword ptr [esi+4], 1
jnz	short loc_72C7A9
mov	eax, [esi]
push	1
push	eax
call	sub_721CD0
add	esp, 8
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_72C79D
mov	eax, [esi]
test	eax, eax
jz	short loc_72C796
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_72C796:
mov	dword ptr [esi+8], 0

loc_72C79D:
mov	dword ptr [esi+4], 0
jmp	loc_72C836

loc_72C7A9:
mov	ecx, [esi]
mov	ebx, [ecx+ebp*4]
test	ebx, ebx
jz	short loc_72C810
mov	eax, [ebx+14h]
mov	ecx, [ebx+10h]
lea	edx, [eax+eax*2]
lea	edi, [ecx+edx*4-0Ch]
test	eax, eax
jbe	short loc_72C7E5
add	edi, 8
mov	[esp+2Ch+var_10], eax
lea	ebx, [ebx+0]

loc_72C7D0:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_72C7DB
call	sub_64A430

loc_72C7DB:
sub	edi, 0Ch
sub	[esp+2Ch+var_10], 1
jnz	short loc_72C7D0

loc_72C7E5:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx+10h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, [ebx+0Ch]
test	ecx, ecx
jz	short loc_72C802
call	sub_64A400

loc_72C802:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx

loc_72C810:
mov	ecx, [esi+4]
mov	eax, [esi]
sub	ecx, ebp
lea	eax, [eax+ebp*4]
lea	edx, ds:0FFFFFFFCh[ecx*4]
push	edx
lea	ecx, [eax+4]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ebx, [esp+38h+var_C]
add	esp, 0Ch
dec	dword ptr [esi+4]

loc_72C836:
sub	[esp+2Ch+var_18], ebx
jnz	loc_72C6F5

loc_72C840:
mov	ebx, [esp+2Ch+var_1C]

loc_72C844:
test	esi, esi
jz	loc_72C8D6
test	ebp, ebp
jl	loc_72C8D6
cmp	ebp, [esi+4]
jge	short loc_72C8D6
mov	edx, [esi]
mov	edi, [edx+ebp*4]
mov	eax, [edi+4]
test	eax, eax
jnz	short loc_72C8A9
push	edi
lea	eax, [esp+30h+var_8]
push	eax
jmp	short loc_72C8CF

loc_72C86D:
cmp	[esp+2Ch+var_14], 0
jz	short loc_72C840
cmp	byte ptr [esp+2Ch+arg_0], 0
jz	short loc_72C840
mov	ecx, [esp+2Ch+var_14]
mov	edx, [ecx+4]
sub	ebx, eax
push	ebx
mov	ebx, [esp+30h+var_1C]
push	edx
push	eax
mov	eax, [ebx+8]
push	edi
push	eax
call	sub_72AB90
push	edi
lea	ecx, [esp+30h+var_8]
push	ecx
mov	ecx, ebx
call	sub_72C5F0
mov	byte ptr [esp+2Ch+arg_0], 0
jmp	short loc_72C844

loc_72C8A9:
mov	ecx, [esp+2Ch+var_14]
test	ecx, ecx
jz	short loc_72C8D6
cmp	byte ptr [esp+2Ch+arg_0], 0
jz	short loc_72C8D6
mov	edx, [ecx+4]
push	eax
mov	eax, [ebx+8]
push	edx
push	0
push	edi
push	eax
call	sub_72AB90
push	edi
lea	ecx, [esp+30h+var_8]
push	ecx

loc_72C8CF:
mov	ecx, ebx
call	sub_72C5F0

loc_72C8D6:
mov	ecx, [esp+2Ch+arg_4]
lea	ebx, [ebx+0]

loc_72C8E0:
test	esi, esi
jz	short loc_72C8FD
test	ebp, ebp
jl	short loc_72C8FD
cmp	ebp, [esi+4]
jge	short loc_72C8FD
mov	edx, [esi]
mov	eax, [edx+ebp*4]
sub	[eax+1Ch], ecx
cmp	ebp, [esi+4]
jge	short loc_72C8E0
inc	ebp
jmp	short loc_72C8E0

loc_72C8FD:
mov	ecx, [ebx+10h]
lea	eax, [ecx-1]
pop	edi
pop	ebp
test	eax, eax
jl	short loc_72C917
cmp	eax, ecx
jge	short loc_72C917
mov	ecx, [ebx+0Ch]
mov	eax, [ecx+eax*4]
test	eax, eax
jnz	short loc_72C924

loc_72C917:
push	0
mov	ecx, ebx
call	sub_72AE30
test	eax, eax
jz	short loc_72C95D

loc_72C924:
mov	ecx, [eax+4]
test	ecx, ecx
jbe	short loc_72C94E
mov	edx, [eax]
lea	esi, [ecx-1]
test	edx, edx
jz	short loc_72C93D
cmp	esi, ecx
jnb	short loc_72C93D
lea	ecx, [edx+esi*2]
jmp	short loc_72C93F

loc_72C93D:
xor	ecx, ecx

loc_72C93F:
movzx	ecx, word ptr [ecx]
cmp	cx, 0Dh
jz	short loc_72C95D
cmp	cx, 0Ah
jz	short loc_72C95D

loc_72C94E:
mov	edx, [ebx+1Ch]
mov	ecx, [ebx+8]
push	edx
push	ecx
mov	ecx, eax
call	sub_72A9B0

loc_72C95D:
pop	esi
pop	ebx
add	esp, 1Ch
retn	8
sub_72C640 endp

align 10h



sub_72C970 proc	near

var_3D0= dword ptr -3D0h
var_3BC= dword ptr -3BCh
var_3B8= dword ptr -3B8h
var_3B4= dword ptr -3B4h
var_3B0= dword ptr -3B0h
var_3AC= dword ptr -3ACh
var_3A8= dword ptr -3A8h
var_3A4= dword ptr -3A4h
var_3A0= dword ptr -3A0h
var_39C= dword ptr -39Ch
var_398= dword ptr -398h
var_394= dword ptr -394h
var_390= dword ptr -390h
var_38C= dword ptr -38Ch
var_388= dword ptr -388h
var_384= dword ptr -384h
var_380= dword ptr -380h
var_37C= dword ptr -37Ch
var_378= dword ptr -378h
var_374= dword ptr -374h
var_370= dword ptr -370h
var_36C= dword ptr -36Ch
var_368= dword ptr -368h
var_364= dword ptr -364h
var_360= dword ptr -360h
var_35C= dword ptr -35Ch
var_358= dword ptr -358h
var_354= dword ptr -354h
var_350= dword ptr -350h
var_34C= dword ptr -34Ch
var_348= byte ptr -348h
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= dword ptr -314h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2FC= dword ptr -2FCh
var_2E4= dword ptr -2E4h
var_2E0= dword ptr -2E0h
var_2DC= word ptr -2DCh
var_2D8= dword ptr -2D8h
var_2D4= dword ptr -2D4h
var_2D0= dword ptr -2D0h
var_2CC= dword ptr -2CCh
var_2C8= dword ptr -2C8h
var_2C4= dword ptr -2C4h
var_2C0= dword ptr -2C0h
var_2BC= word ptr -2BCh
var_2B8= dword ptr -2B8h
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_29C= dword ptr -29Ch
var_298= byte ptr -298h
var_26C= byte ptr -26Ch
var_240= byte ptr -240h
var_214= byte ptr -214h
var_1FC= byte ptr -1FCh
var_1E4= byte ptr -1E4h
var_1CC= byte ptr -1CCh
var_1B4= byte ptr -1B4h
var_188= byte ptr -188h
var_15C= byte ptr -15Ch
var_130= byte ptr -130h
var_104= byte ptr -104h
var_D8=	byte ptr -0D8h
var_AC=	byte ptr -0ACh
var_80=	byte ptr -80h
var_54=	byte ptr -54h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 3BCh
push	ebx
push	esi
mov	esi, [esp+3C4h+arg_4]
push	edi
xor	edi, edi
mov	ebx, ecx
mov	[esp+3C8h+var_3BC], ebx
cmp	esi, edi
jnz	short loc_72C99F
call	sub_72B7E0
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 3BCh
retn	20h

loc_72C99F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebx
call	edx
mov	[esp+3C8h+var_340], eax
mov	[esp+3C8h+var_39C], eax
mov	[esp+3C8h+var_36C], eax
mov	eax, [esp+3C8h+arg_0]
lea	ecx, [eax+esi*2]
mov	[esp+3C8h+var_3A8], edi
mov	[esp+3C8h+var_3A4], edi
mov	[esp+3C8h+var_3A0], edi
mov	[esp+3C8h+var_368], edi
mov	[esp+3C8h+var_360], eax
mov	[esp+3C8h+var_35C], ecx
mov	[esp+3C8h+var_358], edi
mov	byte ptr [esp+3C8h+var_354], 0
mov	[esp+3C8h+var_364], eax
cmp	eax, ecx
jnb	short loc_72C9FD
movzx	ecx, word ptr [eax]
add	eax, 2
mov	[esp+3C8h+var_358], ecx
mov	[esp+3C8h+var_360], eax

loc_72C9FD:
cmp	byte ptr [esp+3C8h+arg_10], 0
mov	[esp+3C8h+var_350], edi
mov	[esp+3C8h+var_34C], edi
mov	dword ptr [esp+3C8h+var_348], edi
mov	byte ptr [esp+3C8h+var_344], 0
jz	short loc_72CA26
mov	byte ptr [esp+3C8h+var_344], 1

loc_72CA26:
mov	eax, [esp+3C8h+arg_18]
mov	[esp+3C8h+var_378], edi
mov	[esp+3C8h+var_398], edi
cmp	eax, edi
jnz	short loc_72CA3C
mov	eax, [ebx+1Ch]

loc_72CA3C:
push	edi
push	eax
lea	ecx, [esp+3D0h+var_26C]
call	sub_700E90
mov	eax, [esp+3C8h+arg_1C]
cmp	eax, edi
jz	short loc_72CA59
mov	ebx, eax
jmp	short loc_72CA5C

loc_72CA59:
mov	ebx, [ebx+18h]

loc_72CA5C:
push	ebp
push	ebx
lea	ecx, [esp+3D0h+var_2FC]
call	sub_7004B0
push	edi
lea	edx, [esp+3D0h+var_26C]
push	edx
lea	ecx, [esp+3D4h+var_298]
call	sub_700E90
push	0FFFFFFFFh
push	offset byte_146D660
lea	ecx, [esp+3D4h+var_26C]
call	sub_6FFA30
lea	ecx, [esp+3CCh+var_36C]
call	sub_727930
mov	[esp+3CCh+var_3B4], eax
cmp	eax, 8000h
jz	loc_72DF78
jmp	short loc_72CAB4
align 10h

loc_72CAB0:
mov	edi, [esp+3CCh+var_378]

loc_72CAB4:
mov	esi, [esp+3CCh+arg_8]
cmp	eax, 1
jz	loc_72DED6
cmp	eax, 4
jg	loc_72DC70
jz	loc_72DC7B
sub	eax, 2
jz	loc_72CBBD
sub	eax, 1
jnz	loc_72DEBE
lea	eax, [esp+3CCh+var_2E0]
push	eax
lea	ecx, [esp+3D0h+var_2B8]
push	ecx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727FB0
test	al, al
jz	loc_72DEBE
mov	ebx, [esp+3CCh+var_2E0]
test	ebx, ebx
jbe	loc_72DEBE
mov	edi, [esp+3CCh+var_3BC]
mov	ecx, edi
call	sub_726790
test	eax, eax
jz	short loc_72CB2D
mov	ecx, eax
call	sub_725AB0
jmp	short loc_72CB2F

loc_72CB2D:
xor	eax, eax

loc_72CB2F:
cmp	byte ptr [esp+3CCh+arg_10], 0
mov	ecx, [esp+3CCh+var_2B8]
jz	short loc_72CB53
cmp	ebx, 1
ja	short loc_72CB53
cmp	word ptr [ecx],	20h
jnz	short loc_72CB53
test	eax, eax
jbe	loc_72DEBE

loc_72CB53:
mov	eax, [esp+3CCh+var_3A4]
test	eax, eax
jbe	short loc_72CB89
mov	edx, [esp+3CCh+var_3A8]
imul	eax, 54h
lea	eax, [eax+edx-54h]
lea	esi, [eax+10h]
add	eax, 3Ch
push	eax
push	esi
push	ebx
push	ecx
mov	ecx, edi
call	sub_72C200
push	esi
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72CB89:
lea	eax, [esp+3CCh+var_2FC]
push	eax
lea	edx, [esp+3D0h+var_26C]
push	edx
push	1
push	ebx
push	ecx
mov	ecx, edi
call	sub_72B4D0
lea	eax, [esp+3CCh+var_26C]
push	eax
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72CBBD:
lea	ecx, [esp+3CCh+var_370]
push	ecx
lea	edx, [esp+3D0h+var_380]
push	edx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727EB0
mov	ebp, [esp+3CCh+var_370]
mov	eax, [esp+3CCh+var_380]
push	0Dh
push	offset off_1440538
push	ebp
push	eax
call	sub_726B60
mov	ebx, [esp+3DCh+var_3A4]
mov	edi, eax
dec	ebx
add	esp, 10h
mov	[esp+3CCh+var_378], edi
mov	[esp+3CCh+var_3B4], ebx
test	edi, edi
jz	loc_72CFB9
cmp	byte ptr [edi+9], 0
jz	loc_72CFB9
mov	edi, [edi+4]
sub	edi, 2
jz	loc_72DE8D
sub	edi, 3
jz	short loc_72CC3E
sub	edi, 4
jnz	loc_72DEBE
mov	ecx, [esp+3CCh+var_3BC]
mov	edx, [ecx+18h]
mov	eax, [ecx+1Ch]
push	edx
push	eax
push	1
push	1
push	offset asc_155F104 ; "\t"
jmp	loc_72DEB9

loc_72CC3E:
test	esi, esi
jz	loc_72DEBE
mov	ecx, [esp+3CCh+var_340]
push	ecx
lea	ecx, [esp+3D0h+var_130]
call	sub_725F60
push	eax
mov	ecx, esi
call	sub_729810
lea	ecx, [esp+3CCh+var_130]
call	sub_6C5FC0
mov	edx, [esi+4]
mov	eax, [esi]
imul	edx, 2Ch
mov	ebp, [esp+3CCh+var_3BC]
mov	ecx, ebp
lea	esi, [edx+eax-2Ch]
call	sub_726790
mov	edi, eax
test	edi, edi
jnz	short loc_72CC9C
lea	ecx, [esp+3CCh+var_2FC]
push	ecx
mov	ecx, ebp
call	sub_72AE30
mov	edi, eax

loc_72CC9C:
push	0
lea	edx, [esp+3D0h+var_26C]
push	edx
lea	ecx, [esp+3D4h+var_240]
call	sub_700E90
mov	eax, [edi+20h]
lea	ecx, [esp+3CCh+var_30C]
push	ecx
lea	edx, [esp+3D0h+var_324]
push	edx
lea	ecx, [esp+3D4h+var_36C]
mov	[esi+24h], eax
call	sub_727BC0
test	al, al
jz	loc_72CEB7
lea	esp, [esp+0]

loc_72CCE0:
mov	eax, [esp+3CCh+var_30C]
mov	ecx, [esp+3CCh+var_324]
push	1Bh
push	offset off_14403F0
push	eax
push	ecx
call	sub_726B60
mov	edi, eax
add	esp, 10h
test	edi, edi
jz	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
lea	edx, [esp+3CCh+var_3B0]
push	edx
lea	eax, [esp+3D0h+var_3AC]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727C80
test	al, al
jz	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
mov	edi, [edi+4]
lea	eax, [edi-0Ch]
cmp	eax, 16h	; switch 23 cases
ja	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
movzx	ecx, ds:byte_72E20C[eax]
jmp	ds:off_72E1EC[ecx*4] ; switch jump

loc_72CD41:		; jumptable 0072CD3A case 17
mov	edx, [esp+3CCh+var_3B0]
mov	eax, [esp+3CCh+var_3AC]
push	edx
push	eax
lea	ecx, [esi+4]
call	sub_67A000
jmp	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CD58:		; jumptable 0072CD3A case 10
mov	ecx, [esp+3CCh+var_3B0]
mov	edx, [esp+3CCh+var_3AC]
push	ecx
push	edx
lea	ecx, [esi+0Ch]
call	sub_67A000
jmp	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CD6F:		; jumptable 0072CD3A case 0
mov	eax, [esp+3CCh+var_3B0]
mov	ecx, [esp+3CCh+var_3AC]
push	1Bh
push	offset off_14403F0
push	eax
push	ecx
call	sub_726B60
add	esp, 10h
test	eax, eax
jz	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
mov	eax, [eax+4]
sub	eax, 0Eh
jz	short loc_72CDB8
sub	eax, 15h
jz	short loc_72CDAF
sub	eax, 1
jnz	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
mov	byte ptr [esi+28h], 1
jmp	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CDAF:
mov	byte ptr [esi+28h], 2
jmp	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CDB8:
mov	byte ptr [esi+28h], 0
jmp	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CDC1:		; jumptable 0072CD3A case 22
mov	edx, [esp+3CCh+var_3B0]
mov	eax, [esp+3CCh+var_3AC]
push	edx
push	eax
lea	ecx, [esp+3D4h+var_2E4]
push	ecx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
mov	eax, [esp+3CCh+var_2E4]
test	eax, eax
jl	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
mov	[esi+14h], edx
jmp	loc_72CE96	; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CE01:		; jumptable 0072CD3A case 7
mov	eax, [esp+3CCh+var_3B0]
mov	ecx, [esp+3CCh+var_3AC]
push	eax
push	ecx
lea	edx, [esp+3D4h+var_2A8]
push	edx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	short loc_72CE96 ; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
mov	eax, [esp+3CCh+var_2A8]
test	eax, eax
jl	short loc_72CE96 ; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
lea	eax, [eax+eax*4]
add	eax, eax
add	eax, eax
mov	[esi+18h], eax
jmp	short loc_72CE96 ; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CE36:		; jumptable 0072CD3A case 21
mov	ecx, [esp+3CCh+var_3B0]
mov	edx, [esp+3CCh+var_3AC]
push	ecx
push	edx
lea	eax, [esp+3D4h+var_2A4]
push	eax
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	short loc_72CE96 ; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
mov	eax, [esp+3CCh+var_2A4]
lea	ecx, [eax+eax*4]
add	ecx, ecx
add	ecx, ecx
mov	[esi+1Ch], ecx
jmp	short loc_72CE96 ; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20

loc_72CE67:		; jumptable 0072CD3A case 9
mov	edx, [esp+3CCh+var_3B0]
mov	eax, [esp+3CCh+var_3AC]
push	edx
push	eax
lea	ecx, [esp+3D4h+var_29C]
push	ecx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	short loc_72CE96 ; default
			; jumptable 0072CD3A cases 1-6,8,11-16,18-20
mov	eax, [esp+3CCh+var_29C]
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
mov	[esi+20h], edx

loc_72CE96:		; default
lea	eax, [esp+3CCh+var_30C]	; jumptable 0072CD3A cases 1-6,8,11-16,18-20
push	eax
lea	ecx, [esp+3D0h+var_324]
push	ecx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jnz	loc_72CCE0

loc_72CEB7:
push	ebp
push	50h
call	sub_71E080
add	esp, 8
test	eax, eax
jz	short loc_72CED1
mov	ecx, eax
call	sub_726610
mov	edi, eax
jmp	short loc_72CED3

loc_72CED1:
xor	edi, edi

loc_72CED3:
push	edi
lea	ecx, [esp+3D0h+var_240]
call	sub_6FFCF0
mov	edx, [esi+14h]
mov	[edi+18h], edx
mov	eax, [esi+18h]
mov	[edi+1Ch], eax
mov	ecx, [esi+1Ch]
mov	[edi+40h], ecx
mov	edx, [esi+20h]
lea	eax, [esi+4]
push	eax
lea	ecx, [edi+38h]
mov	[edi+44h], edx
call	sub_67A3D0
lea	ecx, [esi+0Ch]
push	ecx
lea	ecx, [edi+3Ch]
call	sub_67A3D0
mov	dl, [esi+28h]
mov	[edi+4Ch], dl
inc	dword ptr [edi+4]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_72CF24
call	sub_64A400

loc_72CF24:
mov	[esi], edi
test	ebx, ebx
jl	short loc_72CF3B
mov	eax, [esp+3CCh+var_3A8]
imul	ebx, 54h
add	eax, ebx
lea	esi, [eax+10h]
lea	ebx, [eax+3Ch]
jmp	short loc_72CF49

loc_72CF3B:
lea	esi, [esp+3CCh+var_26C]
lea	ebx, [esp+3CCh+var_2FC]

loc_72CF49:
mov	ecx, esi
call	sub_6CD120
test	al, al
jz	short loc_72CF64
lea	ecx, [esi+10h]
push	ecx
lea	ecx, [esp+3D0h+var_240]
call	sub_6FFAD0

loc_72CF64:
push	ebx
lea	edx, [esp+3D0h+var_240]
push	edx
push	1
push	1
push	offset asc_154D868 ; " "
mov	ecx, ebp
call	sub_72B240
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_72CF89
call	sub_64A400

loc_72CF89:
mov	eax, 200h
mov	dword ptr [esi+18h], 0
or	[esi+2Ah], ax
push	esi
mov	ecx, ebp
call	sub_729AF0
mov	ecx, edi
call	sub_64A400
lea	ecx, [esp+3CCh+var_240]
call	sub_694380
jmp	loc_72DEBE

loc_72CFB9:
mov	ecx, [esp+3CCh+var_3BC]
call	sub_726950
mov	ecx, [esp+3CCh+var_340]
push	0
push	edi
mov	ebx, eax
mov	eax, [esp+3D4h+var_380]
push	ebp
push	eax
push	ecx
lea	ecx, [esp+3E0h+var_54]
call	sub_728500
push	eax
lea	ecx, [esp+3D0h+var_3A8]
call	sub_72A3D0
lea	ecx, [esp+3CCh+var_54]
call	sub_7284D0
mov	edx, [esp+3CCh+var_3A4]
mov	eax, [esp+3CCh+var_3A8]
imul	edx, 54h
cmp	[esp+3CCh+var_3B4], 0
lea	esi, [edx+eax-54h]
mov	[esi+0Ch], ebx
lea	ebx, [esi+10h]
mov	[esp+3CCh+var_390], ebx
jl	short loc_72D043
mov	ebp, [esp+3CCh+var_3B4]
imul	ebp, 54h
add	ebp, eax
lea	eax, [ebp+10h]
push	eax
mov	ecx, ebx
call	sub_6C7EC0
add	esi, 3Ch
add	ebp, 3Ch
push	ebp
mov	ecx, esi
mov	[esp+3D0h+var_3B8], esi
call	sub_700370
mov	ebp, [esp+3CCh+var_370]
jmp	short loc_72D068

loc_72D043:
lea	ecx, [esp+3CCh+var_26C]
push	ecx
mov	ecx, ebx
call	sub_6C7EC0
add	esi, 3Ch
lea	edx, [esp+3CCh+var_2FC]
push	edx
mov	ecx, esi
mov	[esp+3D0h+var_3B8], esi
call	sub_700370

loc_72D068:
test	edi, edi
jnz	loc_72D0F2
mov	ecx, [esp+3CCh+arg_14]
test	ecx, ecx
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
mov	eax, [esp+3CCh+var_380]
push	ebp
push	eax
push	edi
call	sub_733000
mov	edi, eax
test	edi, edi
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
lea	ecx, [edi+2Ch]
push	ecx
lea	edx, [esp+3D0h+var_214]
push	edx
mov	ecx, esi
call	sub_700920
push	eax
mov	ecx, esi
call	sub_700370
lea	ecx, [esp+3CCh+var_214]
call	sub_6C4820
push	edi
lea	eax, [esp+3D0h+var_D8]
push	eax
mov	ecx, ebx
call	sub_7013B0
push	eax
mov	ecx, ebx
call	sub_6C7EC0
lea	ecx, [esp+3CCh+var_D8]
call	sub_694380
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D0F2:
mov	edi, [edi+4]
cmp	edi, 0Bh	; switch 12 cases
ja	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
jmp	ds:off_72E224[edi*4] ; switch jump

loc_72D105:		; jumptable 0072D0FE case 0
lea	ecx, [esp+3CCh+var_304]
push	ecx
lea	edx, [esp+3D0h+var_318]
push	edx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jz	loc_72D1AF
mov	edi, [esp+3CCh+var_3BC]
mov	ebp, 14h
nop

loc_72D130:
mov	eax, [esp+3CCh+var_304]
mov	ecx, [esp+3CCh+var_318]
push	1Bh
push	offset off_14403F0
push	eax
push	ecx
call	sub_726B60
mov	esi, eax
add	esp, 10h
test	esi, esi
jz	short loc_72D192
lea	edx, [esp+3CCh+var_2D4]
push	edx
lea	eax, [esp+3D0h+var_2B4]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727C80
test	al, al
jz	short loc_72D192
cmp	[esi+4], ebp
jnz	short loc_72D192
mov	ecx, [esp+3CCh+var_2D4]
mov	edx, [esp+3CCh+var_2B4]
push	ecx
push	edx
mov	ecx, ebx
call	sub_6FFA80
or	byte ptr [edi+20h], 1

loc_72D192:
lea	eax, [esp+3CCh+var_304]
push	eax
lea	ecx, [esp+3D0h+var_318]
push	ecx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jnz	short loc_72D130

loc_72D1AF:
mov	esi, [esp+3CCh+arg_14]
test	esi, esi
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
push	0FFFFFFFFh
push	offset aA_2	; "a"
push	0
mov	ecx, esi
call	sub_732F90
test	eax, eax
jz	short loc_72D1F6
push	eax
lea	edx, [esp+3D0h+var_1B4]
push	edx
mov	ecx, ebx
call	sub_7013B0
push	eax
mov	ecx, ebx
call	sub_6C7EC0
lea	ecx, [esp+3CCh+var_1B4]
call	sub_694380

loc_72D1F6:
mov	ecx, ebx
call	sub_6CD120
test	al, al
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
push	0FFFFFFFFh
push	offset aALink	; "a:link"
push	0
mov	ecx, esi
call	sub_732F90
test	eax, eax
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
push	eax
lea	eax, [esp+3D0h+var_80]
push	eax
mov	ecx, ebx
call	sub_7013B0
push	eax
mov	ecx, ebx
call	sub_6C7EC0
lea	ecx, [esp+3CCh+var_80]
call	sub_694380
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D253:		; jumptable 0072D0FE case 6
mov	ebp, [esp+3CCh+var_3BC]
mov	ecx, 8080h
or	[esi+16h], cx
mov	ecx, ebp
call	sub_726790
mov	edi, eax
test	edi, edi
jnz	short loc_72D279
push	esi
mov	ecx, ebp
call	sub_72AE30
mov	edi, eax
jmp	short loc_72D2CA

loc_72D279:
mov	ecx, edi
call	sub_725AB0
test	eax, eax
jz	short loc_72D2BA
cmp	[esp+3CCh+arg_C], 0
jz	short loc_72D2B1
lea	edx, [esp+3CCh+var_2FC]
push	edx
lea	eax, [esp+3D0h+var_298]
push	eax
push	1
push	1
mov	ecx, ebp
call	sub_7259A0
push	eax
mov	ecx, ebp
call	sub_72B240

loc_72D2B1:
mov	ecx, ebp
call	sub_726790
mov	edi, eax

loc_72D2BA:
push	esi
mov	ecx, ebp
call	sub_7204E0
push	eax
mov	ecx, edi
call	sub_726710

loc_72D2CA:
cmp	[esp+3CCh+arg_14], 0
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
mov	ecx, [esp+3CCh+var_370]
mov	edx, [esp+3CCh+var_380]
push	ecx
mov	ecx, [esp+3D0h+arg_14]
push	edx
push	0
call	sub_733000
mov	ebp, eax
test	ebp, ebp
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
lea	eax, [ebp+2Ch]
push	eax
lea	ecx, [esp+3D0h+var_1CC]
push	ecx
mov	ecx, esi
call	sub_700920
push	eax
mov	ecx, esi
call	sub_700370
lea	ecx, [esp+3CCh+var_1CC]
call	sub_6C4820
push	ebp
lea	edx, [esp+3D0h+var_188]
push	edx
mov	ecx, ebx
call	sub_7013B0
push	eax
mov	ecx, ebx
call	sub_6C7EC0
lea	ecx, [esp+3CCh+var_188]
call	sub_694380
mov	ecx, [esp+3CCh+var_3BC]
push	esi
call	sub_7204E0
push	eax
mov	ecx, edi
call	sub_726710
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D369:		; jumptable 0072D0FE case 7
mov	edi, [esp+3CCh+var_3BC]
mov	ecx, edi
call	sub_726790
mov	[esp+3CCh+var_3B8], eax
test	eax, eax
jnz	short loc_72D38D
lea	eax, [esp+3CCh+var_2FC]
push	eax
mov	ecx, edi
call	sub_72AE30
jmp	short loc_72D3C8

loc_72D38D:
cmp	[esp+3CCh+var_398], 0
jz	short loc_72D3CC
cmp	[esp+3CCh+arg_C], 0
jz	short loc_72D3C1
lea	ecx, [esp+3CCh+var_2FC]
push	ecx
lea	edx, [esp+3D0h+var_298]
push	edx
push	1
push	1
mov	ecx, edi
call	sub_7259A0
push	eax
mov	ecx, edi
call	sub_72B240

loc_72D3C1:
mov	ecx, edi
call	sub_726790

loc_72D3C8:
mov	[esp+3CCh+var_3B8], eax

loc_72D3CC:
cmp	[esp+3CCh+arg_14], 0
jz	short loc_72D43B
mov	eax, [esp+3CCh+var_380]
mov	ecx, [esp+3CCh+arg_14]
push	ebp
push	eax
push	0
call	sub_733000
mov	edi, eax
test	edi, edi
jz	short loc_72D43B
lea	ecx, [edi+2Ch]
push	ecx
lea	edx, [esp+3D0h+var_1E4]
push	edx
mov	ecx, esi
call	sub_700920
push	eax
mov	ecx, esi
call	sub_700370
lea	ecx, [esp+3CCh+var_1E4]
call	sub_6C4820
push	edi
lea	eax, [esp+3D0h+var_15C]
push	eax
mov	ecx, ebx
call	sub_7013B0
push	eax
mov	ecx, ebx
call	sub_6C7EC0
lea	ecx, [esp+3CCh+var_15C]
call	sub_694380

loc_72D43B:
lea	ecx, [esp+3CCh+var_328]
push	ecx
lea	edx, [esp+3D0h+var_310]
push	edx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jz	loc_72D5B2
mov	ebp, [esp+3CCh+arg_14]
jmp	short loc_72D470
align 10h

loc_72D470:
mov	eax, [esp+3CCh+var_328]
mov	ecx, [esp+3CCh+var_310]
push	1Bh
push	offset off_14403F0
push	eax
push	ecx
call	sub_726B60
mov	edi, eax
add	esp, 10h
test	edi, edi
jz	loc_72D591	; default
lea	edx, [esp+3CCh+var_330]
push	edx
lea	eax, [esp+3D0h+var_308]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727C80
test	al, al
jz	loc_72D591	; default
mov	edi, [edi+4]
cmp	edi, 0Ch
jz	loc_72D547
cmp	edi, 10h
jnz	loc_72D591	; default
test	ebp, ebp
jz	loc_72D591	; default
mov	ecx, [esp+3CCh+var_330]
mov	edx, [esp+3CCh+var_308]
push	ecx
push	edx
push	1
mov	ecx, ebp
call	sub_733000
mov	edi, eax
test	edi, edi
jz	loc_72D591	; default
lea	eax, [edi+2Ch]
push	eax
lea	ecx, [esp+3D0h+var_1FC]
push	ecx
mov	ecx, esi
call	sub_700920
push	eax
mov	ecx, esi
call	sub_700370
lea	ecx, [esp+3CCh+var_1FC]
call	sub_6C4820
push	edi
lea	edx, [esp+3D0h+var_104]
push	edx
mov	ecx, ebx
call	sub_7013B0
push	eax
mov	ecx, ebx
call	sub_6C7EC0
lea	ecx, [esp+3CCh+var_104]
call	sub_694380
jmp	short loc_72D591 ; default

loc_72D547:
mov	eax, [esp+3CCh+var_330]
mov	ecx, [esp+3CCh+var_308]
push	1Bh
push	offset off_14403F0
push	eax
push	ecx
call	sub_726B60
add	esp, 10h
test	eax, eax
jz	short loc_72D591 ; default
mov	eax, [eax+4]
add	eax, 0FFFFFFDDh	; switch 4 cases
cmp	eax, 3
ja	short loc_72D591 ; default
jmp	ds:off_72E254[eax*4] ; switch jump

loc_72D57C:		; jumptable 0072D575 case 35
push	0
jmp	short loc_72D58A

loc_72D580:		; jumptable 0072D575 case 36
push	1
jmp	short loc_72D58A

loc_72D584:		; jumptable 0072D575 case 37
push	3
jmp	short loc_72D58A

loc_72D588:		; jumptable 0072D575 case 38
push	2

loc_72D58A:
mov	ecx, esi
call	sub_6C4440

loc_72D591:		; default
lea	edx, [esp+3CCh+var_328]
push	edx
lea	eax, [esp+3D0h+var_310]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jnz	loc_72D470

loc_72D5B2:
mov	edi, [esp+3CCh+var_3B8]
mov	ecx, edi
call	sub_725AB0
test	eax, eax
jnz	short loc_72D5D3
mov	ecx, [esp+3CCh+var_3BC]
push	esi
call	sub_7204E0
push	eax
mov	ecx, edi
call	sub_726710

loc_72D5D3:
inc	[esp+3CCh+var_398]
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D5E9:		; jumptable 0072D0FE case 1
push	1
mov	ecx, ebx
call	sub_701310
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D604:		; jumptable 0072D0FE case 4
push	1
mov	ecx, ebx
call	sub_701360
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D61F:		; jumptable 0072D0FE case 11
push	1
mov	ecx, ebx
call	sub_6FFAF0
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D63A:		; jumptable 0072D0FE case 3
lea	ecx, [esp+3CCh+var_300]
push	ecx
lea	edx, [esp+3D0h+var_338]
push	edx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jz	loc_72D846
mov	edi, 1

loc_72D660:
mov	eax, [esp+3CCh+var_300]
mov	ecx, [esp+3CCh+var_338]
push	1Bh
push	offset off_14403F0
push	eax
push	ecx
call	sub_726B60
mov	esi, eax
add	esp, 10h
test	esi, esi
jz	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
lea	edx, [esp+3CCh+var_38C]
push	edx
lea	eax, [esp+3D0h+var_388]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727C80
test	al, al
jz	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
mov	esi, [esi+4]
lea	eax, [esi-0Dh]
cmp	eax, 11h	; switch 18 cases
ja	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
movzx	ecx, ds:byte_72E280[eax]
jmp	ds:off_72E264[ecx*4] ; switch jump

loc_72D6C1:		; jumptable 0072D6BA case 4
mov	eax, [esp+3CCh+var_388]
cmp	word ptr [eax],	23h
jnz	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
mov	edx, [esp+3CCh+var_38C]
dec	edx
push	edx
add	eax, 2
push	eax
lea	eax, [esp+3D4h+var_2CC]
push	eax
call	sub_726280
add	esp, 0Ch
test	al, al
jz	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
mov	ecx, [ebx+20h]
xor	ecx, [esp+3CCh+var_2CC]
and	ecx, offset sub_FFFFFF
xor	[ebx+20h], ecx
or	[ebx+2Ah], di
jmp	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16

loc_72D70D:		; jumptable 0072D6BA case 5
mov	edx, [esp+3CCh+var_38C]
mov	eax, [esp+3CCh+var_388]
push	edx
push	eax
mov	ecx, ebx
call	sub_701180
jmp	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16

loc_72D723:		; jumptable 0072D6BA case 17
mov	ecx, [esp+3CCh+var_38C]
mov	edx, [esp+3CCh+var_388]
push	ecx
push	edx
lea	eax, [esp+3D4h+var_320]
push	eax
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
cmp	[esp+3CCh+var_320], 0
jl	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
fild	[esp+3CCh+var_320]
push	ecx		; float
mov	ecx, ebx
fstp	[esp+3D0h+var_3D0]
call	sub_6D5760
jmp	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16

loc_72D76A:		; jumptable 0072D6BA case 11
mov	ecx, [esp+3CCh+var_38C]
mov	edx, [esp+3CCh+var_388]
push	ecx
push	edx
lea	eax, [esp+3D4h+var_2B0]
push	eax
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
mov	eax, [esp+3CCh+var_2B0]
test	eax, eax
jl	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
jz	short loc_72D7AA
push	edi
mov	ecx, ebx
call	sub_6FFB10
jmp	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16

loc_72D7AA:
and	byte ptr [ebx+28h], 0F7h
mov	ecx, 0FF7Fh
and	[ebx+2Ah], cx
jmp	loc_72D825	; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16

loc_72D7BC:		; jumptable 0072D6BA case 14
mov	edx, [esp+3CCh+var_38C]
mov	eax, [esp+3CCh+var_388]
push	edx
push	eax
lea	ecx, [esp+3D4h+var_2C4]
push	ecx
call	sub_725C80
add	esp, 0Ch
test	al, al
jz	short loc_72D825 ; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
fld	[esp+3CCh+var_2C4]
push	ecx		; float
mov	ecx, ebx
fstp	[esp+3D0h+var_3D0]
call	sub_6D5740
jmp	short loc_72D825 ; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16

loc_72D7EE:		; jumptable 0072D6BA case 0
mov	eax, [esp+3CCh+var_388]
cmp	word ptr [eax],	23h
jnz	short loc_72D825 ; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
mov	edx, [esp+3CCh+var_38C]
dec	edx
push	edx
add	eax, 2
push	eax
lea	eax, [esp+3D4h+var_2AC]
push	eax
call	sub_726280
add	esp, 0Ch
test	al, al
jz	short loc_72D825 ; default
			; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
mov	ecx, [esp+3CCh+var_2AC]
push	ecx
mov	ecx, ebx
call	sub_6D5660

loc_72D825:		; default
lea	edx, [esp+3CCh+var_300]	; jumptable 0072D6BA cases 1-3,6-10,12,13,15,16
push	edx
lea	eax, [esp+3D0h+var_338]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jnz	loc_72D660

loc_72D846:
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72D865:		; jumptable 0072D0FE case 10
lea	ecx, [esp+3CCh+var_334]
push	ecx
lea	edx, [esp+3D0h+var_32C]
push	edx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
jmp	short loc_72D890
align 10h

loc_72D890:
mov	eax, [esp+3CCh+var_334]
mov	ecx, [esp+3CCh+var_32C]
push	1Bh
push	offset off_14403F0
push	eax
push	ecx
call	sub_726B60
mov	esi, eax
add	esp, 10h
test	esi, esi
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
lea	edx, [esp+3CCh+var_394]
push	edx
lea	eax, [esp+3D0h+var_384]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727C80
test	al, al
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	esi, [esi+4]
lea	eax, [esi-0Fh]
cmp	eax, 11h	; switch 18 cases
ja	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
movzx	ecx, ds:byte_72E2B0[eax]
jmp	ds:off_72E294[ecx*4] ; switch jump

loc_72D8F1:		; jumptable 0072D8EA case 8
mov	edx, [esp+3CCh+var_394]
mov	eax, [esp+3CCh+var_384]
push	edx
push	eax
lea	ecx, [esp+3D4h+var_2BC]
push	ecx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	eax, [esp+3CCh+var_3B8]
mov	dx, [esp+3CCh+var_2BC]
or	word ptr [eax+16h], 4
mov	[eax+0Eh], dx
jmp	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72D92D:		; jumptable 0072D8EA case 0
mov	eax, [esp+3CCh+var_394]
mov	ecx, [esp+3CCh+var_384]
push	eax
push	ecx
lea	edx, [esp+3D4h+var_2A0]
push	edx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	ecx, [esp+3CCh+var_2A0]
test	ecx, ecx
jl	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	eax, [esp+3CCh+var_3B8]
or	word ptr [eax+16h], 2
mov	[eax+0Ch], cx
jmp	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72D970:		; jumptable 0072D8EA case 10
mov	eax, [esp+3CCh+var_394]
mov	ecx, [esp+3CCh+var_384]
push	eax
push	ecx
lea	edx, [esp+3D4h+var_2DC]
push	edx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	eax, [esp+3CCh+var_3B8]
mov	cx, [esp+3CCh+var_2DC]
or	word ptr [eax+16h], 8
mov	[eax+10h], cx
jmp	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72D9AC:		; jumptable 0072D8EA case 11
mov	edx, [esp+3CCh+var_394]
mov	eax, [esp+3CCh+var_384]
push	edx
push	eax
lea	ecx, [esp+3D4h+var_2D8]
push	ecx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	ecx, [esp+3CCh+var_2D8]
test	ecx, ecx
jl	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	eax, [esp+3CCh+var_3B8]
or	word ptr [eax+16h], 10h
mov	[eax+12h], cx
jmp	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72D9EF:		; jumptable 0072D8EA case 13
mov	edx, [esp+3CCh+var_394]
mov	eax, [esp+3CCh+var_384]
push	edx
push	eax
lea	ecx, [esp+3D4h+var_2D0]
push	ecx
call	sub_725BF0
add	esp, 0Ch
test	al, al
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	ecx, [esp+3CCh+var_2D0]
test	ecx, ecx
jl	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
mov	eax, [esp+3CCh+var_3B8]
or	word ptr [eax+16h], 20h
mov	[eax+14h], cx
jmp	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72DA32:		; jumptable 0072D8EA case 17
mov	ebp, [esp+3CCh+var_394]
mov	ebx, [esp+3CCh+var_384]
xor	esi, esi
test	ebp, ebp
jbe	short loc_72DA56

loc_72DA40:
movzx	edx, word ptr [ebx+esi*2]
push	edx
call	sub_725B20
add	esp, 4
test	al, al
jz	short loc_72DA56
inc	esi
cmp	esi, ebp
jb	short loc_72DA40

loc_72DA56:
cmp	word ptr [ebx+esi*2], 5Bh
jnz	short loc_72DA5E
inc	esi

loc_72DA5E:
mov	edx, 1
mov	eax, esi
cmp	esi, ebp
jnb	short loc_72DA86
lea	esp, [esp+0]

loc_72DA70:
movzx	ecx, word ptr [ebx+eax*2]
cmp	cx, 5Dh
jz	short loc_72DA86
cmp	cx, 2Ch
jnz	short loc_72DA81
inc	edx

loc_72DA81:
inc	eax
cmp	eax, ebp
jb	short loc_72DA70

loc_72DA86:
mov	ecx, [esp+3CCh+var_3B8]
push	edx
call	sub_6D5700
mov	[esp+3CCh+var_3B4], 0
cmp	esi, ebp
jnb	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72DAA0:
cmp	word ptr [ebx+esi*2], 5Dh
jz	loc_72DB35	; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16
xor	edi, edi
cmp	esi, ebp
jnb	short loc_72DAF6

loc_72DAB1:
movzx	eax, word ptr [ebx+esi*2]
push	eax
call	sub_725B80
add	esp, 4
test	al, al
jz	short loc_72DAD4
movzx	edx, word ptr [ebx+esi*2]
inc	esi
lea	ecx, [edi+edi*4]
lea	edi, [edx+ecx*2-30h]
cmp	esi, ebp
jb	short loc_72DAB1
jmp	short loc_72DAF6

loc_72DAD4:
cmp	esi, ebp
jnb	short loc_72DAF6
jmp	short loc_72DAE0
align 10h

loc_72DAE0:
movzx	eax, word ptr [ebx+esi*2]
push	eax
call	sub_725B20
add	esp, 4
test	al, al
jz	short loc_72DAF6
inc	esi
cmp	esi, ebp
jb	short loc_72DAE0

loc_72DAF6:
mov	ecx, [esp+3CCh+var_3B4]
push	edi
push	ecx
mov	ecx, [esp+3D4h+var_3B8]
call	sub_6FFB70
inc	[esp+3CCh+var_3B4]
cmp	word ptr [ebx+esi*2], 2Ch
jnz	short loc_72DB2D
inc	esi
cmp	esi, ebp
jnb	short loc_72DB35 ; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72DB15:
movzx	edx, word ptr [ebx+esi*2]
push	edx
call	sub_725B20
add	esp, 4
test	al, al
jz	short loc_72DB2D
inc	esi
cmp	esi, ebp
jb	short loc_72DB15
jmp	short loc_72DB35 ; default
			; jumptable 0072D8EA cases 1-7,9,12,14-16

loc_72DB2D:
cmp	esi, ebp
jb	loc_72DAA0

loc_72DB35:		; default
lea	eax, [esp+3CCh+var_334]	; jumptable 0072D8EA cases 1-7,9,12,14-16
push	eax
lea	ecx, [esp+3D0h+var_32C]
push	ecx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jnz	loc_72D890
mov	ebx, [esp+3CCh+var_390]
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72DB6C:		; jumptable 0072D0FE case 8
lea	edx, [esp+3CCh+var_31C]
push	edx
lea	eax, [esp+3D0h+var_314]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jz	loc_72DC5E	; default
			; jumptable 0072D0FE cases 2,5,9
mov	edi, [esp+3CCh+arg_14]
mov	ebp, 10h
lea	esp, [esp+0]

loc_72DBA0:
mov	ecx, [esp+3CCh+var_31C]
mov	edx, [esp+3CCh+var_314]
push	1Bh
push	offset off_14403F0
push	ecx
push	edx
call	sub_726B60
mov	esi, eax
add	esp, 10h
test	esi, esi
jz	loc_72DC3D
lea	eax, [esp+3CCh+var_2C8]
push	eax
lea	ecx, [esp+3D0h+var_2C0]
push	ecx
lea	ecx, [esp+3D4h+var_36C]
call	sub_727C80
test	al, al
jz	short loc_72DC3D
cmp	[esi+4], ebp
jnz	short loc_72DC3D
test	edi, edi
jz	short loc_72DC3D
mov	edx, [esp+3CCh+var_2C8]
mov	eax, [esp+3CCh+var_2C0]
push	edx
push	eax
push	1
mov	ecx, edi
call	sub_733000
test	eax, eax
jz	short loc_72DC3D
push	eax
lea	ecx, [esp+3D0h+var_AC]
push	ecx
mov	ecx, ebx
call	sub_7013B0
push	eax
mov	ecx, ebx
call	sub_6C7EC0
lea	ecx, [esp+3CCh+var_AC]
call	sub_694380
push	ebx
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0

loc_72DC3D:
lea	edx, [esp+3CCh+var_31C]
push	edx
lea	eax, [esp+3D0h+var_314]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727BC0
test	al, al
jnz	loc_72DBA0

loc_72DC5E:		; default
push	ebx		; jumptable 0072D0FE cases 2,5,9
lea	ecx, [esp+3D0h+var_298]
call	sub_6C7EC0
jmp	loc_72DEBE

loc_72DC70:
cmp	eax, 8005h
jnz	loc_72DEBE

loc_72DC7B:
xor	ebp, ebp
xor	esi, esi
mov	[esp+3CCh+var_37C], ebp
mov	[esp+3CCh+var_374], ebp
cmp	eax, 4
jnz	short loc_72DCBC
mov	eax, [esp+3CCh+var_3A4]
cmp	eax, ebp
jbe	short loc_72DC9F
mov	ecx, [esp+3CCh+var_3A8]
imul	eax, 54h
lea	esi, [eax+ecx-54h]

loc_72DC9F:
lea	edx, [esp+3CCh+var_374]
push	edx
lea	eax, [esp+3D0h+var_37C]
push	eax
lea	ecx, [esp+3D4h+var_36C]
call	sub_727F40
mov	edi, [esp+3CCh+var_37C]
mov	ebx, [esp+3CCh+var_374]
jmp	short loc_72DCF3

loc_72DCBC:
cmp	edi, ebp
jz	short loc_72DCCA
cmp	byte ptr [edi+9], 0
jnz	loc_72DEBE

loc_72DCCA:
cmp	[esp+3CCh+var_3A4], ebp
jbe	loc_72DEBE
mov	ecx, [esp+3CCh+var_3A4]
mov	edx, [esp+3CCh+var_3A8]
imul	ecx, 54h
mov	edi, [ecx+edx-54h]
mov	ebx, [ecx+edx-50h]
lea	esi, [ecx+edx-54h]
mov	[esp+3CCh+var_37C], edi
mov	[esp+3CCh+var_374], ebx

loc_72DCF3:
cmp	esi, ebp
jz	loc_72DEBE
mov	eax, [esi+4]
mov	ecx, [esi]
push	eax
push	ecx
push	ebx
push	edi
call	sub_726560
add	esp, 10h
test	eax, eax
jz	loc_72DDAB
push	0Dh
push	offset off_1440538
push	ebx
push	edi
call	sub_726B60
mov	esi, eax
add	esp, 10h
cmp	esi, ebp
jz	loc_72DEBE
cmp	[esp+3CCh+var_398], ebp
jz	loc_72DEBE
mov	eax, [esi+4]
cmp	eax, 7
jz	short loc_72DD4A
cmp	eax, 6
jnz	loc_72DEBE

loc_72DD4A:
cmp	[esp+3CCh+var_3A4], ebp
jbe	loc_72DEBE
mov	ecx, [esp+3CCh+var_3A4]
jmp	short loc_72DD60
align 10h

loc_72DD60:
mov	edx, [esp+3CCh+var_3A8]
mov	eax, ecx
imul	eax, 54h
lea	eax, [eax+edx-54h]
mov	eax, [eax+8]
test	eax, eax
jz	short loc_72DD7C
mov	edx, [esi+4]
cmp	edx, [eax+4]
jz	short loc_72DD94

loc_72DD7C:
dec	ecx
push	ecx
lea	ecx, [esp+3D0h+var_3A8]
call	sub_729C80
mov	ecx, [esp+3CCh+var_3A4]
test	ecx, ecx
ja	short loc_72DD60
jmp	loc_72DEBE

loc_72DD94:
test	ecx, ecx
jbe	loc_72DEBE
mov	eax, [esp+3CCh+var_3A4]
mov	ecx, [esp+3CCh+var_3A8]
imul	eax, 54h
lea	esi, [eax+ecx-54h]

loc_72DDAB:
movzx	eax, word ptr [esi+52h]
mov	edx, [esp+3CCh+var_3A4]
mov	edi, [esi+8]
mov	esi, [esi+0Ch]
mov	ebx, eax
shr	eax, 0Bh
dec	edx
and	eax, 3
shr	ebx, 8
push	edx
lea	ecx, [esp+3D0h+var_3A8]
and	bl, 1
mov	ebp, eax
mov	[esp+3D0h+var_378], edi
call	sub_729C80
test	edi, edi
jz	short loc_72DE22
mov	edi, [edi+4]
sub	edi, 6
jz	short loc_72DDFF
sub	edi, 1
jnz	loc_72DEBE
dec	[esp+3CCh+var_398]
cmp	[esp+3CCh+var_3B4], 8005h
jz	loc_72DEBE

loc_72DDFF:
cmp	[esp+3CCh+arg_C], 0
jz	loc_72DEBE
lea	eax, [esp+3CCh+var_2FC]
push	eax
lea	ecx, [esp+3D0h+var_298]
push	ecx
jmp	loc_72DEA7

loc_72DE22:
cmp	[esp+3CCh+arg_14], 0
jz	loc_72DEBE
test	bl, bl
jz	loc_72DEBE
sub	ebp, 1
jz	short loc_72DE8D
sub	ebp, 1
jnz	loc_72DEBE
mov	ebx, [esp+3CCh+var_3BC]
mov	ecx, ebx
call	sub_726950
cmp	[esp+3CCh+arg_C], 0
mov	edi, eax
jz	short loc_72DE80
lea	edx, [esp+3CCh+var_2FC]
push	edx
lea	eax, [esp+3D0h+var_298]
push	eax
push	1
push	1
mov	ecx, ebx
call	sub_7259A0
push	eax
mov	ecx, ebx
call	sub_72B240

loc_72DE80:
sub	edi, esi
push	edi
push	esi
mov	ecx, ebx
call	sub_72C640
jmp	short loc_72DEBE

loc_72DE8D:
cmp	[esp+3CCh+arg_C], 0
jz	short loc_72DEBE
lea	ecx, [esp+3CCh+var_2FC]
push	ecx
lea	edx, [esp+3D0h+var_298]
push	edx

loc_72DEA7:
mov	esi, [esp+3D4h+var_3BC]
push	1
push	1
mov	ecx, esi
call	sub_7259A0
push	eax
mov	ecx, esi

loc_72DEB9:
call	sub_72B240

loc_72DEBE:
lea	ecx, [esp+3CCh+var_36C]
call	sub_727930
mov	[esp+3CCh+var_3B4], eax
cmp	eax, 8000h
jnz	loc_72CAB0

loc_72DED6:
mov	eax, [esp+3CCh+var_3A4]
xor	ebp, ebp
cmp	eax, ebp
jbe	loc_72DF78
mov	ecx, [esp+3CCh+var_3A8]
imul	eax, 54h
mov	ebx, [esp+3CCh+var_3BC]
lea	edi, [eax+ecx-54h]
lea	eax, [edi+10h]
push	eax
mov	ecx, ebx
mov	[esp+3D0h+var_390], eax
call	sub_729AF0
cmp	[ebx+8], ebp
jnz	short loc_72DF45
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	ebx
call	eax
mov	esi, eax
mov	edx, [esi]
mov	eax, [edx+28h]
push	ebp
push	50h
mov	ecx, esi
call	eax
cmp	eax, ebp
jz	short loc_72DF34
push	ebp
push	esi
mov	ecx, eax
call	sub_69B360
mov	esi, eax
jmp	short loc_72DF36

loc_72DF34:
xor	esi, esi

loc_72DF36:
mov	ecx, [ebx+8]
cmp	ecx, ebp
jz	short loc_72DF42
call	sub_64A400

loc_72DF42:
mov	[ebx+8], esi

loc_72DF45:
mov	ecx, [ebx+8]
add	edi, 3Ch
push	edi
call	sub_702870
mov	ecx, [ebx+18h]
mov	esi, eax
cmp	ecx, ebp
jz	short loc_72DF5F
call	sub_64A400

loc_72DF5F:
mov	ecx, [esp+3CCh+var_390]
push	ecx
lea	ecx, [esp+3D0h+var_298]
mov	[ebx+18h], esi
call	sub_6C7EC0
jmp	loc_72DFF1

loc_72DF78:
mov	ebx, [esp+3CCh+var_3BC]
lea	edx, [esp+3CCh+var_26C]
push	edx
mov	ecx, ebx
call	sub_729AF0
xor	ebp, ebp
cmp	[ebx+8], ebp
jnz	short loc_72DFD0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebx
call	edx
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+28h]
push	ebp
push	50h
mov	ecx, esi
call	edx
cmp	eax, ebp
jz	short loc_72DFBF
push	ebp
push	esi
mov	ecx, eax
call	sub_69B360
mov	esi, eax
jmp	short loc_72DFC1

loc_72DFBF:
xor	esi, esi

loc_72DFC1:
mov	ecx, [ebx+8]
cmp	ecx, ebp
jz	short loc_72DFCD
call	sub_64A400

loc_72DFCD:
mov	[ebx+8], esi

loc_72DFD0:
mov	ecx, [ebx+8]
lea	eax, [esp+3CCh+var_2FC]
push	eax
call	sub_702870
mov	ecx, [ebx+18h]
mov	esi, eax
cmp	ecx, ebp
jz	short loc_72DFEE
call	sub_64A400

loc_72DFEE:
mov	[ebx+18h], esi

loc_72DFF1:
mov	ecx, ebx
call	sub_72B7E0
mov	ecx, [ebx+10h]
lea	eax, [ecx-1]
cmp	eax, ebp
jl	loc_72E170
cmp	eax, ecx
jge	loc_72E170
mov	ecx, [ebx+0Ch]
mov	ecx, [ecx+eax*4]
cmp	ecx, ebp
jz	loc_72E170
mov	eax, [ecx+4]
cmp	eax, ebp
jbe	short loc_72E03F
mov	ecx, [ecx]
lea	edx, [eax-1]
cmp	ecx, ebp
jz	short loc_72E035
cmp	edx, eax
jnb	short loc_72E035
lea	ecx, [ecx+edx*2]
jmp	short loc_72E037

loc_72E035:
xor	ecx, ecx

loc_72E037:
cmp	[ecx], bp
jnz	short loc_72E03D
dec	eax

loc_72E03D:
cmp	eax, ebp

loc_72E03F:
jnz	loc_72E170
mov	edi, [ebx+10h]

loc_72E048:
dec	edi
cmp	edi, ebp
mov	[esp+3CCh+var_33C], edi
jl	loc_72E170
cmp	edi, [ebx+10h]
jge	loc_72E170
mov	edx, [ebx+0Ch]
mov	esi, [edx+edi*4]
mov	eax, [esi+4]
mov	[esp+3CCh+var_390], esi
cmp	eax, ebp
jbe	short loc_72E08C
mov	ecx, [esi]
lea	edx, [eax-1]
cmp	ecx, ebp
jz	short loc_72E084
cmp	edx, eax
jnb	short loc_72E084
lea	ecx, [ecx+edx*2]
jmp	short loc_72E086

loc_72E084:
xor	ecx, ecx

loc_72E086:
cmp	[ecx], bp
jnz	short loc_72E08C
dec	eax

loc_72E08C:
cmp	eax, 1
ja	loc_72E170
cmp	[ebx+8], ebp
jnz	loc_72E155
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	ebx
call	edx
mov	edi, eax
mov	eax, [edi]
mov	edx, [eax+28h]
push	ebp
push	50h
mov	ecx, edi
call	edx
mov	esi, eax
cmp	esi, ebp
jz	loc_72E139
mov	dword ptr [esi], offset	off_155F500
mov	eax, 1
mov	[esi+4], eax
mov	dword ptr [esi], offset	off_1437724
mov	[esi+8], ebp
mov	[esi+0Ch], ebp
mov	ecx, 64h
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	[esi+18h], eax
mov	[esi+1Ch], edi
mov	dword ptr [esi+20h], offset off_155F500
push	edi
lea	ecx, [esi+28h]
mov	[esi+24h], eax
mov	dword ptr [esi+20h], offset off_1437650
call	sub_67AC80
push	edi
lea	ecx, [esi+30h]
call	sub_67AC80
mov	[esi+38h], ebp
mov	[esi+3Ch], ebp
xor	eax, eax
xor	ecx, ecx
xor	edx, edx
mov	dword ptr [esi+40h], 0FF000000h
mov	[esi+44h], ax
mov	[esi+46h], cx
mov	[esi+48h], al
mov	[esi+4Ah], dx
mov	[esi+4Ch], al
jmp	short loc_72E13B

loc_72E139:
xor	esi, esi

loc_72E13B:
mov	ecx, [ebx+8]
cmp	ecx, ebp
jz	short loc_72E147
call	sub_64A400

loc_72E147:
mov	edi, [esp+3CCh+var_33C]
mov	[ebx+8], esi
mov	esi, [esp+3CCh+var_390]

loc_72E155:
mov	ecx, [ebx+8]
push	0FFFFFFFFh
push	ebp
lea	eax, [esp+3D4h+var_298]
push	eax
push	ecx
mov	ecx, esi
call	sub_72A740
jmp	loc_72E048

loc_72E170:
lea	ecx, [esp+3CCh+var_298]
call	sub_694380
lea	ecx, [esp+3CCh+var_2FC]
mov	[esp+3CCh+var_2FC], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+3CCh+var_2FC]
call	sub_64A3F0
lea	ecx, [esp+3CCh+var_26C]
call	sub_694380
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+3CCh+var_350]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, [esp+3CCh+var_3A4]
mov	esi, [esp+3CCh+var_3A8]
push	eax
push	esi
call	sub_729840
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
add	esp, 8
push	esi
call	eax
pop	ebp
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 3BCh
retn	20h
sub_72C970 endp

off_72E1EC dd offset loc_72CD6F	; jump table for switch	statement
dd offset loc_72CE01
dd offset loc_72CE67
dd offset loc_72CD58
dd offset loc_72CD41
dd offset loc_72CE36
dd offset loc_72CDC1
dd offset loc_72CE96
byte_72E20C db	    0,	   7,	  7,	 7 ; indirect table for	switch statement
db	7,     7,     7,     1
db	7,     2,     3,     7
db	7,     7,     7,     7
db	7,     4,     7,     7
db	7,     5,     6
align 4
off_72E224 dd offset loc_72D105	; jump table for switch	statement
dd offset loc_72D5E9
dd offset loc_72DC5E
dd offset loc_72D63A
dd offset loc_72D604
dd offset loc_72DC5E
dd offset loc_72D253
dd offset loc_72D369
dd offset loc_72DB6C
dd offset loc_72DC5E
dd offset loc_72D865
dd offset loc_72D61F
off_72E254 dd offset loc_72D57C	; jump table for switch	statement
dd offset loc_72D580
dd offset loc_72D584
dd offset loc_72D588
off_72E264 dd offset loc_72D7EE	; jump table for switch	statement
dd offset loc_72D6C1
dd offset loc_72D70D
dd offset loc_72D76A
dd offset loc_72D7BC
dd offset loc_72D723
dd offset loc_72D825
byte_72E280 db	    0,	   6,	  6,	 6 ; indirect table for	switch statement
db	1,     2,     6,     6
db	6,     6,     6,     3
db	6,     6,     4,     6
db	6,     5
align 4
off_72E294 dd offset loc_72D92D	; jump table for switch	statement
dd offset loc_72D8F1
dd offset loc_72D970
dd offset loc_72D9AC
dd offset loc_72D9EF
dd offset loc_72DA32
dd offset loc_72DB35
byte_72E2B0 db	    0,	   6,	  6,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	1,     6,     2,     3
db	6,     4,     6,     6
db	6,     5
align 10h



sub_72E2D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
call	sub_7204E0
mov	esi, eax
mov	ecx, [esi+1Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	24h
call	edx
test	eax, eax
jz	short loc_72E2F9
push	esi
mov	ecx, eax
call	sub_72C220
mov	esi, eax
jmp	short loc_72E2FB

loc_72E2F9:
xor	esi, esi

loc_72E2FB:
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_0]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	sub_72C380
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_72E2D0 endp

align 10h



sub_72E320 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
lea	edx, [ebx+ebx+2]
push	edx
call	eax
mov	ecx, [esp+0Ch+arg_0]
push	ebx
mov	esi, eax
push	ecx
push	esi
call	sub_67BBC0
mov	edx, [esp+0Ch+arg_1C]
mov	ecx, [esp+0Ch+arg_18]
push	edx
mov	edx, [esp+10h+arg_14]
push	ecx
mov	ecx, [esp+14h+arg_10]
push	edx
mov	edx, [esp+18h+arg_C]
push	ecx
mov	ecx, [esp+1Ch+arg_8]
push	edx
push	ecx
push	eax
push	esi
mov	ecx, edi
call	sub_72C970
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	bl, al
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	20h
sub_72E320 endp

align 10h


; Attributes: thunk

sub_72E390 proc	near
jmp	sub_72C970
sub_72E390 endp

align 10h



sub_72E3A0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
call	sub_733EC0
mov	[esp+8+var_4], eax
fild	[esp+8+var_4]
test	eax, eax
jge	short loc_72E3BB
fadd	ds:flt_15FCC08

loc_72E3BB:
mov	eax, [esp+8+arg_0]
fchs
fstp	[esp+8+var_4]
push	ecx		; float
fld	[esp+0Ch+var_4]
mov	ecx, esi
fstp	[esp+0Ch+var_C]
push	eax		; int
call	sub_733F00
pop	esi
pop	ecx
retn	4
sub_72E3A0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_72E500

loc_72E3E0:
mov	eax, [esp+arg_0]
mov	dl, 1
test	[eax+50h], dl
jz	short loc_72E404
or	[ecx+50h], dl
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	dl, [eax+0Ch]
mov	[ecx+0Ch], dl

loc_72E404:
mov	dl, 2
test	[eax+50h], dl
jz	short loc_72E426
or	[ecx+50h], dl
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	edx, [eax+14h]
mov	[ecx+14h], edx
mov	edx, [eax+18h]
mov	[ecx+18h], edx
mov	dl, [eax+1Ch]
mov	[ecx+1Ch], dl

loc_72E426:
mov	dl, 4
test	[eax+50h], dl
jz	short loc_72E448
or	[ecx+50h], dl
mov	edx, [eax+20h]
mov	[ecx+20h], edx
mov	edx, [eax+24h]
mov	[ecx+24h], edx
mov	edx, [eax+28h]
mov	[ecx+28h], edx
mov	dl, [eax+2Ch]
mov	[ecx+2Ch], dl

loc_72E448:
mov	dl, 8
test	[eax+50h], dl
jz	short loc_72E46A
or	[ecx+50h], dl
mov	edx, [eax+30h]
mov	[ecx+30h], edx
mov	edx, [eax+34h]
mov	[ecx+34h], edx
mov	edx, [eax+38h]
mov	[ecx+38h], edx
mov	dl, [eax+3Ch]
mov	[ecx+3Ch], dl

loc_72E46A:
mov	dl, 10h
test	[eax+50h], dl
jz	short locret_72E48C
or	[ecx+50h], dl
mov	edx, [eax+40h]
mov	[ecx+40h], edx
mov	edx, [eax+44h]
mov	[ecx+44h], edx
mov	edx, [eax+48h]
mov	[ecx+48h], edx
mov	al, [eax+4Ch]
mov	[ecx+4Ch], al

locret_72E48C:
retn	4
; END OF FUNCTION CHUNK	FOR sub_72E500
align 10h



sub_72E490 proc	near

arg_0= byte ptr	 4
arg_4= byte ptr	 8

test	byte ptr [ecx+68h], 1
jnz	short loc_72E4AF
cmp	[esp+arg_0], 0
jz	short loc_72E4A4
or	word ptr [ecx+68h], 8
jmp	short loc_72E4B8

loc_72E4A4:
mov	eax, 0FFF7h
and	[ecx+68h], ax
jmp	short loc_72E4B8

loc_72E4AF:
mov	edx, 0FFF7h
and	[ecx+68h], dx

loc_72E4B8:
cmp	[esp+arg_4], 0
fldz
fstp	qword ptr [ecx+38h]
jz	short locret_72E4C9
or	word ptr [ecx+68h], 10h

locret_72E4C9:
retn	8
sub_72E490 endp

align 10h



sub_72E4D0 proc	near

arg_8= byte ptr	 0Ch

test	[esp+arg_8], 1
jnz	short locret_72E4F7
movzx	eax, word ptr [ecx+68h]
mov	dl, al
shr	dl, 1
test	dl, 1
jz	short locret_72E4F7
mov	dl, al
shr	dl, 5
test	dl, 1
jz	short locret_72E4F7
and	eax, 0FFDFh
mov	[ecx+68h], ax

locret_72E4F7:
retn	0Ch
sub_72E4D0 endp

align 10h



sub_72E500 proc	near

arg_0= dword ptr  4

; FUNCTION CHUNK AT 0072E3E0 SIZE 000000AF BYTES

add	ecx, 44h
jmp	loc_72E3E0
sub_72E500 endp

align 10h



sub_72E510 proc	near
push	esi
mov	esi, ecx
mov	eax, 0FEFFh
and	[esi+68h], ax
mov	eax, [esi+8]
mov	ecx, [eax+14h]
test	ecx, ecx
jz	short loc_72E54A
push	7FFFFFFEh
call	sub_73EF30
test	eax, eax
jz	short loc_72E54A
cmp	dword ptr [eax+4], 0
jz	short loc_72E54A
mov	dword ptr [eax+4], 0
mov	ecx, [esi+8]
push	eax
call	sub_71E060

loc_72E54A:
pop	esi
retn
sub_72E510 endp

align 10h



sub_72E550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_72E594
mov	eax, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
push	1
push	eax
push	edx
call	sub_6C7140
test	eax, eax
jz	short loc_72E594
cmp	dword ptr [eax], 3
jnz	short loc_72E594
movzx	eax, word ptr [esi+68h]
mov	cl, al
shr	cl, 1
test	cl, 1
jz	short loc_72E594
mov	dl, al
shr	dl, 6
test	dl, 1
jz	short loc_72E594
and	eax, 0FFBFh
mov	[esi+68h], ax

loc_72E594:
mov	al, 1
pop	esi
retn	8
sub_72E550 endp

align 10h



sub_72E5A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+5Ch]
mov	ecx, [esi+8]
push	eax
call	sub_720490
mov	ecx, [esi+58h]
push	ecx
mov	ecx, [esi+8]
call	sub_720440
mov	edx, 400h
or	[esi+68h], dx
pop	esi
retn
sub_72E5A0 endp

align 10h



sub_72E5D0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+64h]
mov	ecx, [esi+8]
push	eax
call	sub_720490
mov	ecx, [esi+60h]
push	ecx
mov	ecx, [esi+8]
call	sub_720440
mov	edx, 0FB9Fh
and	[esi+68h], dx
pop	esi
retn
sub_72E5D0 endp

align 10h



sub_72E600 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, ecx
xor	ebx, ebx
cmp	[ebp+0Ch], ebx
jz	loc_72E6CA
mov	ecx, [ebp+8]
test	byte ptr [ecx+14Eh], 10h
jnz	loc_72E6CA
push	esi
mov	esi, [esp+1Ch+arg_4]
push	edi
mov	edi, [esp+20h+arg_0]
cmp	esi, edi
jnb	short loc_72E636
mov	eax, esi
mov	esi, edi
mov	edi, eax

loc_72E636:
push	esi
push	edi
lea	eax, [esp+28h+var_10]
mov	[esp+28h+var_10], ebx
mov	[esp+28h+var_C], ebx
mov	[esp+28h+var_8], ebx
mov	[esp+28h+var_4], ebx
mov	ecx, [ecx+8]
push	eax
call	sub_727560
cmp	[esp+20h+arg_8], bl
jz	short loc_72E6A4
mov	ecx, [ebp+8]
mov	ecx, [ecx+8]
push	esi
push	edi
call	sub_72E2D0
mov	esi, eax
mov	eax, [esp+20h+var_10]
cmp	eax, ebx
jnz	short loc_72E677
mov	eax, offset szReferrer

loc_72E677:
mov	edx, [esp+20h+var_C]
mov	ecx, [ebp+0Ch]
push	esi
push	edx
push	eax
call	sub_6CBAE0
cmp	esi, ebx
jz	short loc_72E6BF
mov	ecx, esi
call	sub_64A400
lea	ecx, [esp+20h+var_10]
call	sub_730D80
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch

loc_72E6A4:
mov	eax, [esp+20h+var_10]
cmp	eax, ebx
jnz	short loc_72E6B1
mov	eax, offset szReferrer

loc_72E6B1:
mov	ecx, [esp+20h+var_C]
push	ecx
mov	ecx, [ebp+0Ch]
push	eax
call	sub_6C46B0

loc_72E6BF:
lea	ecx, [esp+20h+var_10]
call	sub_730D80
pop	edi
pop	esi

loc_72E6CA:
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_72E600 endp

align 10h



sub_72E6E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+0Ch], 0
jz	short loc_72E736
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
cmp	esi, edi
jnb	short loc_72E6FD
mov	eax, esi
mov	esi, edi
mov	edi, eax

loc_72E6FD:
mov	eax, [esp+0Ch+arg_8]
push	eax
push	esi
push	edi
call	sub_72E600
test	byte ptr [ebx+68h], 1
jnz	short loc_72E734
mov	ebx, [ebx+8]
cmp	esi, edi
jb	short loc_72E728
mov	ecx, [ebx+8]
sub	esi, edi
push	esi
push	edi
call	sub_72C640
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_72E728:
mov	ecx, [ebx+8]
xor	esi, esi
push	esi
push	edi
call	sub_72C640

loc_72E734:
pop	edi
pop	esi

loc_72E736:
pop	ebx
retn	0Ch
sub_72E6E0 endp

align 10h



sub_72E740 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

sub	esp, 30h
push	ebp
push	edi
mov	ebp, ecx
or	edi, 0FFFFFFFFh
test	byte ptr [ebp+68h], 1
jnz	loc_72E879
mov	ecx, [ebp+0Ch]
test	ecx, ecx
jz	loc_72E879
push	ebx
mov	ebx, [esp+3Ch+arg_4]
push	esi
mov	esi, [esp+40h+arg_0]
cmp	ebx, esi
jnb	short loc_72E777
mov	[esp+40h+arg_4], esi
mov	esi, ebx
mov	ebx, [esp+40h+arg_4]

loc_72E777:
cmp	[esp+40h+arg_8], 0
jz	short loc_72E7F6
cmp	dword ptr [ecx+1Ch], 0
jz	short loc_72E7F6
call	sub_9DF7D0
mov	ebx, eax
test	ebx, ebx
jz	short loc_72E7EA
inc	dword ptr [ebx+4]
mov	ecx, ebx
call	sub_726950
test	eax, eax
jbe	short loc_72E7E3
mov	eax, 0FFBFh
and	[ebp+68h], ax
mov	eax, [esp+40h+arg_4]
cmp	esi, eax
jnz	short loc_72E7C2
mov	ecx, [ebp+8]
lea	edx, [esp+40h+var_30]
push	edx
mov	[esp+44h+var_30], esi
mov	[esp+44h+var_2C], ebx
push	2
jmp	short loc_72E7DA

loc_72E7C2:
mov	ebp, [ebp+8]
mov	[esp+40h+var_24], eax
lea	eax, [esp+40h+var_28]
push	eax
mov	[esp+44h+var_28], esi
mov	[esp+44h+var_20], ebx
push	7
mov	ecx, ebp

loc_72E7DA:
call	sub_720620
mov	edi, eax
add	edi, esi

loc_72E7E3:
mov	ecx, ebx
call	sub_64A400

loc_72E7EA:
pop	esi
pop	ebx
mov	eax, edi
pop	edi
pop	ebp
add	esp, 30h
retn	0Ch

loc_72E7F6:
call	sub_6C4700
cmp	dword ptr [eax+4], 0
jbe	short loc_72E7EA
mov	ecx, 0FFBFh
and	[ebp+68h], cx
mov	ecx, [eax+4]
mov	eax, [eax]
cmp	esi, ebx
jnz	short loc_72E843
test	eax, eax
jnz	short loc_72E81C
mov	eax, offset szReferrer

loc_72E81C:
lea	edx, [esp+40h+var_1C]
push	edx
mov	[esp+44h+var_14], ecx
mov	ecx, [ebp+8]
push	1
mov	[esp+48h+var_1C], esi
mov	[esp+48h+var_18], eax
call	sub_720620
add	eax, esi
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 30h
retn	0Ch

loc_72E843:
test	eax, eax
jnz	short loc_72E84C
mov	eax, offset szReferrer

loc_72E84C:
mov	ebp, [ebp+8]
mov	[esp+40h+var_8], eax
lea	eax, [esp+40h+var_10]
push	eax
mov	[esp+44h+var_4], ecx
push	6
mov	ecx, ebp
mov	[esp+48h+var_10], esi
mov	[esp+48h+var_C], ebx
call	sub_720620
add	eax, esi
pop	esi
pop	ebx
pop	edi
pop	ebp
add	esp, 30h
retn	0Ch

loc_72E879:
mov	eax, edi
pop	edi
pop	ebp
add	esp, 30h
retn	0Ch
sub_72E740 endp

align 10h



sub_72E890 proc	near
push	esi
mov	esi, ecx
mov	eax, 400h
test	[esi+68h], ax
jz	short loc_72E8B8
mov	ecx, [esi+5Ch]
push	ecx
mov	ecx, [esi+8]
call	sub_720490
mov	edx, [esi+58h]
mov	ecx, [esi+8]
push	edx
call	sub_720440
pop	esi
retn

loc_72E8B8:
mov	eax, [esi+64h]
mov	ecx, [esi+8]
push	eax
call	sub_720490
mov	ecx, [esi+60h]
push	ecx
mov	ecx, [esi+8]
call	sub_720440
pop	esi
retn
sub_72E890 endp

align 10h



sub_72E8E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+14h]
push	edi
mov	edi, [esp+8+arg_0]
test	eax, eax
jz	short loc_72E912
lea	ecx, [eax+14h]
call	sub_725AB0
test	eax, eax
jbe	short loc_72E912
mov	esi, [esi+14h]
cmp	edi, [esi+30h]
jbe	short loc_72E912
lea	ecx, [esi+14h]
call	sub_725AB0
add	eax, edi
pop	edi
pop	esi
retn	4

loc_72E912:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_72E8E0 endp

align 10h



sub_72E920 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	byte ptr [esi+40h], 0
mov	ecx, [eax+8]
push	edi
call	sub_720290
xor	edi, edi
cmp	byte ptr [esi+0C0h], 0
mov	ebx, eax
jbe	short loc_72E97C
push	ebp
lea	ebp, [esi+98h]

loc_72E948:
mov	ecx, [ebp+0]
push	ecx
mov	ecx, ebx
call	sub_73EF30
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	edx, [esi+0Ch]
mov	ecx, [edx+8]
push	eax
call	sub_71E060
movzx	eax, byte ptr [esi+0C0h]
inc	edi
add	ebp, 4
cmp	edi, eax
jb	short loc_72E948
pop	ebp

loc_72E97C:
pop	edi
mov	byte ptr [esi+0C0h], 0
pop	esi
pop	ebx
retn
sub_72E920 endp

align 10h



sub_72E990 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= word ptr	 8

sub	esp, 8
mov	eax, [esp+8+arg_0]
fld	dword ptr [eax+4]
fstp	[esp+8+arg_0]
fld	dword ptr [eax+8]
fstp	[esp+8+var_8]
fld	dword ptr [eax+0Ch]
fstp	[esp+8+var_4]
fld	dword ptr [eax]
mov	ax, [esp+8+arg_4]
fstp	dword ptr [ecx]
mov	[ecx+10h], ax
fld	[esp+8+arg_0]
fstp	dword ptr [ecx+4]
fld	[esp+8+var_8]
fstp	dword ptr [ecx+8]
fld	[esp+8+var_4]
fstp	dword ptr [ecx+0Ch]
add	esp, 8
retn	8
sub_72E990 endp

align 10h



sub_72E9E0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14406CC
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_72E9F5
call	sub_64A400

loc_72E9F5:
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_72EA01
call	sub_64A430

loc_72EA01:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_72EA0D
call	sub_64A430

loc_72EA0D:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_72EA19
call	sub_64A400

loc_72EA19:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_72EA35
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_72EA35:
mov	eax, esi
pop	esi
retn	4
sub_72E9E0 endp

align 10h



sub_72EA40 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4

sub	esp, 28h
push	esi
mov	esi, ecx
mov	al, [esi+68h]
not	al
test	al, 1
jz	loc_72EAF3
test	byte ptr [esi+69h], 1
jz	loc_72EAF3
mov	ecx, [esi+8]
push	ebx
push	edi
call	sub_720290
mov	edi, eax
push	7FFFFFFEh
mov	ecx, edi
call	sub_73EF30
xor	ebx, ebx
cmp	eax, ebx
jnz	short loc_72EABE
lea	ecx, [esp+34h+var_28]
push	ecx
mov	ecx, edi
mov	[esp+38h+var_1C], ebx
mov	[esp+38h+var_18], ebx
mov	[esp+38h+var_8], ebx
mov	[esp+38h+var_28], ebx
mov	[esp+38h+var_24], ebx
mov	[esp+38h+var_20], ebx
mov	[esp+38h+var_14], 7FFFFFFEh
mov	[esp+38h+var_10], 0FF000000h
mov	[esp+38h+var_4], 18h
mov	[esp+38h+var_C], 0FFFFFFFFh
call	sub_7404E0
jmp	short loc_72EAC4

loc_72EABE:
cmp	[eax+4], ebx
setnz	bl

loc_72EAC4:
mov	edi, [esi+18h]
cmp	[eax], edi
jnz	short loc_72EAD8
mov	dl, [esi+68h]
shr	dl, 3
and	dl, 1
cmp	bl, dl
jz	short loc_72EAF1

loc_72EAD8:
mov	[eax], edi
movzx	ecx, word ptr [esi+68h]
shr	cx, 3
push	eax
and	ecx, 1
mov	[eax+4], ecx
mov	ecx, [esi+8]
call	sub_71E060

loc_72EAF1:
pop	edi
pop	ebx

loc_72EAF3:
pop	esi
add	esp, 28h
retn	0Ch
sub_72EA40 endp

align 10h



sub_72EB00 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+30h]
mov	edx, [esi+0Ch]
push	0
push	eax
mov	eax, [edx+8]
lea	ecx, [esp+14h+var_8]
push	ecx
mov	ecx, [eax+8]
call	sub_7267B0
mov	ecx, [esp+0Ch+var_8]
test	ecx, ecx
jz	short loc_72EB52
mov	eax, [esp+0Ch+var_4]
test	eax, eax
jl	short loc_72EB52
cmp	eax, [ecx+4]
jge	short loc_72EB52
mov	ecx, [ecx]
mov	eax, [ecx+eax*4]
test	eax, eax
jz	short loc_72EB52
mov	ecx, 1
add	[eax+24h], cx
mov	edx, [esi+0Ch]
mov	eax, [edx+8]
or	[eax+150h], cl

loc_72EB52:
pop	esi
add	esp, 8
retn
sub_72EB00 endp

align 10h



sub_72EB60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	esi, ecx
call	sub_72E920
lea	edi, [esi+14h]
mov	ecx, edi
call	sub_729CE0
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_0]
mov	edx, [esi+10h]
push	eax
push	ecx
push	edx
mov	ecx, edi
call	sub_726020
mov	eax, [esi+18h]
mov	ecx, [esi+8]
mov	edx, [esi+10h]
push	eax
push	0
push	ecx
push	edx
mov	ecx, edi
call	sub_72A740
mov	eax, [esi+8]
mov	ecx, [esi+10h]
push	eax
push	ecx
mov	ecx, edi
call	sub_72A9B0
mov	ecx, esi
call	sub_72EB00
pop	edi
pop	esi
retn	8
sub_72EB60 endp

align 10h



sub_72EBC0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+30h], eax
call	sub_72EB00
retn	4
sub_72EBC0 endp

align 10h



sub_72EBD0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_14406CC
cmp	ecx, edx
jz	short loc_72EBF2
inc	dword ptr [ecx+4]

loc_72EBF2:
fldz
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	[eax+14h], edx
fst	dword ptr [eax+24h]
fst	dword ptr [eax+28h]
xor	ecx, ecx
fst	dword ptr [eax+2Ch]
mov	[eax+34h], cx
fst	dword ptr [eax+30h]
mov	[eax+68h], cx
fldz
mov	[eax+18h], edx
fst	qword ptr [eax+38h]
mov	ecx, 0FF000000h
mov	[eax+1Ch], ecx
fst	qword ptr [eax+40h]
fld	ds:flt_1431A30
mov	[eax+54h], edx
fstp	dword ptr [eax+48h]
fxch	st(1)
fst	dword ptr [eax+24h]
fstp	dword ptr [eax+28h]
fadd	st, st
fstp	[esp+arg_0]
fld	[esp+arg_0]
fst	dword ptr [eax+2Ch]
fstp	dword ptr [eax+30h]
mov	[eax+58h], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+5Ch], ecx
mov	dword ptr [eax+60h], 0FF808080h
mov	[eax+64h], ecx
retn	4
sub_72EBD0 endp

align 10h



sub_72EC70 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+14h], 0
jz	short loc_72ECAE
mov	eax, [esi+14h]
test	eax, eax
jz	short loc_72EC83
inc	dword ptr [eax+4]

loc_72EC83:
push	edi
mov	edi, [esi+14h]
mov	ecx, edi
test	ecx, ecx
jz	short loc_72EC92
call	sub_64A400

loc_72EC92:
mov	ecx, edi
mov	dword ptr [esi+14h], 0
call	sub_72EB00
test	edi, edi
jz	short loc_72ECAD
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A400

loc_72ECAD:
pop	edi

loc_72ECAE:
pop	esi
retn
sub_72EC70 endp




sub_72ECB0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	ecx, ecx
mov	[eax+18h], ecx
mov	[eax+14h], ecx
mov	[eax+10h], ecx
mov	[eax+1Ch], cl
mov	[eax+28h], ecx
mov	[eax+24h], ecx
mov	[eax+20h], ecx
mov	[eax+2Ch], cl
mov	[eax+38h], ecx
mov	[eax+34h], ecx
mov	[eax+30h], ecx
mov	[eax+3Ch], cl
mov	[eax+48h], ecx
mov	[eax+44h], ecx
mov	[eax+40h], ecx
mov	[eax+4Ch], cl
mov	byte ptr [eax+50h], 1
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	byte ptr [eax+0Ch], 3
mov	dl, 2
or	[eax+50h], dl
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], dl
or	byte ptr [eax+50h], 4
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	byte ptr [eax+2Ch], 1
or	byte ptr [eax+50h], 8
mov	dword ptr [eax+30h], 0FF000000h
mov	dword ptr [eax+34h], 0FFFFFFFFh
mov	[eax+38h], ecx
mov	byte ptr [eax+3Ch], 18h
or	byte ptr [eax+50h], 10h
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	byte ptr [esp+arg_0+2],	cl
mov	byte ptr [esp+arg_0+1],	0FFh
mov	byte ptr [esp+arg_0], cl
mov	byte ptr [esp+arg_0+3],	cl
mov	ecx, [esp+arg_0]
mov	[eax+48h], ecx
mov	byte ptr [eax+4Ch], 21h
retn
sub_72ECB0 endp

align 10h



sub_72ED60 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	byte ptr -50h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 68h
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	edi
call	sub_724380
mov	edi, [esp+70h+arg_0]
mov	ecx, [esi+8]
push	edi
call	sub_724B30
mov	[esp+70h+var_60], eax
cmp	eax, 0FFFFFFFFh
jz	loc_72F0B7
mov	ecx, [esi+8]
mov	edx, [ecx+24h]
push	ebx
mov	ebx, [edx+eax*4]
mov	eax, [esp+74h+arg_14]
mov	[esp+74h+var_68], ebx
test	eax, eax
jz	short loc_72EDAC
mov	ecx, [ebx]
shr	ecx, 1Ch
and	ecx, 3
mov	[eax], ecx

loc_72EDAC:
mov	ecx, [ebx]
mov	eax, [ebx+8]
shr	ecx, 1Fh
and	cl, 1
jz	short loc_72EDC8
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_72EDC8
or	eax, 0FFFFFFFFh

loc_72EDC8:
sub	edi, eax
mov	[esp+74h+var_64], edi
xor	edi, edi
push	ebp
test	cl, cl
jz	short loc_72EDDB
movzx	ebp, byte ptr [ebx+1Ch]
jmp	short loc_72EDDE

loc_72EDDB:
mov	ebp, [ebx+4]

loc_72EDDE:
lea	esi, [ebx+1Eh]
test	cl, cl
jnz	short loc_72EDE8
lea	esi, [ebx+2Ah]

loc_72EDE8:
mov	ecx, ebx
call	sub_733C80
push	eax
push	ebp
push	esi
lea	ecx, [esp+84h+var_5C]
call	sub_6F6B80
mov	[esp+78h+arg_14], 0

loc_72EE06:
mov	eax, [esp+78h+var_5C]
test	eax, eax
jz	short loc_72EE4F
cmp	eax, [esp+78h+var_58]
jnb	short loc_72EE4F
mov	edx, 0F000h
test	[eax+4], dx
jnz	short loc_72EE4F
movzx	ecx, word ptr [eax+6]
mov	edx, ecx
shr	edx, 8
test	dl, 1
jnz	short loc_72EE4F
movzx	eax, word ptr [eax+2]
shr	cl, 6
test	cl, 1
jz	short loc_72EE3B
neg	eax

loc_72EE3B:
inc	[esp+78h+arg_14]
lea	ecx, [esp+78h+var_5C]
add	edi, eax
call	sub_6F5F90
jmp	short loc_72EE06

loc_72EE4F:
mov	ebp, [esp+78h+var_64]
xor	esi, esi
mov	[esp+78h+arg_0], edi
test	ebp, ebp
jbe	loc_72EF15
mov	bl, byte ptr [esp+78h+arg_10]

loc_72EE68:
test	eax, eax
jz	loc_72EF11
cmp	eax, [esp+78h+var_58]
jnb	loc_72EF11
movzx	edx, word ptr [eax+6]
mov	cl, dl
shr	cl, 6
test	cl, 1
movzx	ecx, word ptr [eax+2]
jz	short loc_72EE8E
neg	ecx

loc_72EE8E:
add	edi, ecx
mov	[esp+78h+arg_0], edi
test	bl, bl
jz	short loc_72EEA0
shr	dl, 2
test	dl, 1
jnz	short loc_72EEA9

loc_72EEA0:
movzx	edx, word ptr [eax+4]
shr	edx, 0Ch
add	esi, edx

loc_72EEA9:
mov	ecx, [esp+78h+var_4]
inc	[esp+78h+arg_14]
test	ecx, ecx
jnz	short loc_72EEC3
movzx	ecx, word ptr [eax+4]
shr	ecx, 0Ch
mov	[esp+78h+var_4], ecx

loc_72EEC3:
add	eax, 8
mov	edx, 0F000h
mov	[esp+78h+var_5C], eax
test	[eax+4], dx
jbe	short loc_72EEFC
test	ecx, ecx
jbe	short loc_72EEFC
lea	ecx, [esp+78h+var_50]
call	sub_73ED30
test	al, al
jnz	short loc_72EEFC
mov	eax, [esp+78h+var_4]
push	eax
lea	ecx, [esp+7Ch+var_50]
call	sub_73F2D0
mov	[esp+78h+var_4], 0

loc_72EEFC:
lea	ecx, [esp+78h+var_5C]
call	sub_735210
mov	eax, [esp+78h+var_5C]
cmp	esi, ebp
jb	loc_72EE68

loc_72EF11:
mov	ebx, [esp+78h+var_68]

loc_72EF15:
fldz
pop	ebp
fstp	[esp+74h+var_68]
test	eax, eax
jz	short loc_72EF56
cmp	eax, [esp+74h+var_58]
jnb	short loc_72EF56
mov	cl, [eax+6]
shr	cl, 6
test	cl, 1
jnz	short loc_72EF3E
movzx	edx, word ptr [eax+2]
mov	[esp+74h+arg_10], edx
jmp	short loc_72EF4B

loc_72EF3E:
movzx	eax, word ptr [eax+2]
neg	eax
mov	[esp+74h+arg_10], eax

loc_72EF4B:
fild	[esp+74h+arg_10]
fstp	[esp+74h+var_68]

loc_72EF56:
mov	ecx, [ebx]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_72EF6C
mov	edx, [ebx+0Ch]
mov	[esp+74h+arg_10], edx
jmp	short loc_72EF76

loc_72EF6C:
mov	eax, [ebx+0Ch]
mov	[esp+74h+arg_10], eax

loc_72EF76:
fild	[esp+74h+arg_10]
mov	eax, [esp+74h+arg_4]
fiadd	[esp+74h+arg_0]
fstp	[esp+74h+arg_10]
fld	[esp+74h+arg_10]
fst	dword ptr [eax]
mov	ecx, [ebx]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_72EFAB
mov	edx, [ebx+10h]
mov	[esp+74h+arg_10], edx
jmp	short loc_72EFB5

loc_72EFAB:
mov	ecx, [ebx+10h]
mov	[esp+74h+arg_10], ecx

loc_72EFB5:
fild	[esp+74h+arg_10]
fstp	[esp+74h+arg_10]
fld	[esp+74h+arg_10]
fst	dword ptr [eax+4]
fld	[esp+74h+var_68]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+8]
mov	edx, [ebx]
shr	edx, 1Fh
test	dl, 1
jz	short loc_72EFEF
movzx	ecx, word ptr [ebx+16h]
mov	[esp+74h+arg_10], ecx
jmp	short loc_72EFF9

loc_72EFEF:
mov	edx, [ebx+18h]
mov	[esp+74h+arg_10], edx

loc_72EFF9:
fiadd	[esp+74h+arg_10]
pop	ebx
fstp	dword ptr [eax+0Ch]
mov	eax, [esp+70h+arg_8]
test	eax, eax
jz	short loc_72F012
mov	ecx, [esp+70h+var_60]
mov	[eax], ecx

loc_72F012:
mov	eax, [esp+70h+arg_C]
test	eax, eax
jz	short loc_72F026
mov	edx, [esp+70h+arg_14]
mov	[eax], edx

loc_72F026:
mov	ecx, [esp+70h+var_C]
test	ecx, ecx
jz	short loc_72F033
call	sub_64A400

loc_72F033:
mov	esi, [esp+70h+var_10]
test	esi, esi
jz	short loc_72F0AD
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jnz	short loc_72F0AD
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_72F04F
push	esi
call	sub_6F4540

loc_72F04F:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_72F05B
call	sub_666B00

loc_72F05B:
mov	dword ptr [esi+1Ch], 0
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_72F06E
call	sub_666B00

loc_72F06E:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_72F07A
call	sub_666B00

loc_72F07A:
mov	edi, [esi+0Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_72F09F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_72F09F:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_72F0AD:
pop	edi
mov	al, 1
pop	esi
add	esp, 68h
retn	18h

loc_72F0B7:
pop	edi
xor	al, al
pop	esi
add	esp, 68h
retn	18h
sub_72ED60 endp

align 10h



sub_72F0D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_14]
mov	edx, [esp+arg_C]
sub	esp, 10h
push	ebx
push	esi
mov	esi, [esp+18h+arg_4]
push	edi
push	eax
mov	eax, [esp+20h+arg_8]
mov	edi, ecx
mov	ecx, [esp+20h+arg_10]
push	ecx
mov	ecx, [esp+24h+arg_0]
push	edx
push	eax
push	esi
push	ecx
mov	ecx, edi
call	sub_72ED60
mov	bl, al
test	bl, bl
jz	loc_72F218
mov	eax, [edi+8]
mov	edx, [eax+4Ch]
fild	dword ptr [eax+4Ch]
test	edx, edx
jge	short loc_72F11A
fadd	ds:flt_15FCC08

loc_72F11A:
fchs
lea	ecx, [eax+24h]
fstp	[esp+1Ch+var_10]
call	sub_733EC0
mov	[esp+1Ch+arg_14], eax
fild	[esp+1Ch+arg_14]
test	eax, eax
jge	short loc_72F13A
fadd	ds:flt_15FCC08

loc_72F13A:
fchs
fstp	[esp+1Ch+var_C]
fld	dword ptr [esi]
fld	[esp+1Ch+var_10]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fadd	dword ptr [esi+8]
fstp	dword ptr [esi+8]
fld	[esp+1Ch+var_C]
fld	st
fadd	dword ptr [esi+4]
fstp	dword ptr [esi+4]
fadd	dword ptr [esi+0Ch]
fstp	dword ptr [esi+0Ch]
mov	ecx, [edi+8]
call	sub_7243A0
fld	dword ptr [esi]
fstp	[esp+1Ch+var_10]
mov	ecx, [edi+8]
fld	dword ptr [esi+4]
add	ecx, 24h
fstp	[esp+1Ch+var_C]
fld	dword ptr [ecx+18h]
fsub	dword ptr [eax]
fadd	[esp+1Ch+var_10]
fstp	[esp+1Ch+var_8]
fld	dword ptr [ecx+1Ch]
fsub	dword ptr [eax+4]
fadd	[esp+1Ch+var_C]
fstp	[esp+1Ch+var_4]
fld	[esp+1Ch+var_8]
fst	dword ptr [esi]
fld	[esp+1Ch+var_4]
fst	dword ptr [esi+4]
mov	ecx, [edi+8]
fld	dword ptr [esi+8]
add	ecx, 24h
fstp	[esp+1Ch+var_8]
fld	dword ptr [esi+0Ch]
fstp	[esp+1Ch+var_4]
fld	dword ptr [ecx+18h]
fsub	dword ptr [eax]
fadd	[esp+1Ch+var_8]
fstp	[esp+1Ch+var_10]
fld	dword ptr [ecx+1Ch]
fsub	dword ptr [eax+4]
fadd	[esp+1Ch+var_4]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+var_10]
fst	dword ptr [esi+8]
fld	[esp+1Ch+var_C]
fst	dword ptr [esi+0Ch]
fld	dword ptr [eax]
fstp	[esp+1Ch+var_8]
fld	dword ptr [eax+4]
fstp	[esp+1Ch+var_4]
fld	[esp+1Ch+var_8]
fld	st
faddp	st(5), st
fxch	st(4)
fstp	dword ptr [esi]
fxch	st(3)
faddp	st(1), st
fstp	dword ptr [esi+8]
fld	[esp+1Ch+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
faddp	st(1), st
fstp	dword ptr [esi+0Ch]

loc_72F218:
pop	edi
pop	esi
mov	al, bl
pop	ebx
add	esp, 10h
retn	18h
sub_72F0D0 endp

align 10h



sub_72F230 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	byte ptr -50h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 5Ch
push	esi
push	edi
mov	edi, [esp+64h+arg_0]
mov	esi, ecx
mov	ecx, [esi+8]
push	edi
call	sub_724B30
cmp	eax, 0FFFFFFFFh
jz	loc_72F3A1
mov	esi, [esi+8]
push	eax
lea	ecx, [esi+24h]
call	sub_733EA0
test	eax, eax
jz	loc_72F3A1
mov	edx, [eax]
mov	ecx, [eax+8]
shr	edx, 1Fh
and	dl, 1
jz	short loc_72F27F
and	ecx, offset sub_FFFFFF
cmp	ecx, offset sub_FFFFFF
jnz	short loc_72F27F
or	ecx, 0FFFFFFFFh

loc_72F27F:
push	ebx
mov	ebx, ecx
sub	edi, ebx
push	ebp
mov	[esp+6Ch+arg_0], edi
test	dl, dl
jz	short loc_72F293
movzx	ebp, byte ptr [eax+1Ch]
jmp	short loc_72F296

loc_72F293:
mov	ebp, [eax+4]

loc_72F296:
lea	esi, [eax+1Eh]
test	dl, dl
jnz	short loc_72F2A0
lea	esi, [eax+2Ah]

loc_72F2A0:
mov	ecx, eax
call	sub_733C80
push	eax
push	ebp
push	esi
lea	ecx, [esp+78h+var_5C]
call	sub_6F6B80
xor	edi, edi

loc_72F2B5:
mov	eax, [esp+6Ch+var_5C]
test	eax, eax
jz	short loc_72F2DF
cmp	eax, [esp+6Ch+var_58]
jnb	short loc_72F2DF
mov	ecx, 0F000h
test	[eax+4], cx
jnz	short loc_72F2DF
test	byte ptr [eax+7], 1
jnz	short loc_72F2DF
lea	ecx, [esp+6Ch+var_5C]
call	sub_6F5F90
jmp	short loc_72F2B5

loc_72F2DF:
xor	esi, esi
xor	ebp, ebp
jmp	short loc_72F2E9

loc_72F2E5:
mov	eax, [esp+6Ch+var_5C]

loc_72F2E9:
add	ebx, esi
test	eax, eax
jz	short loc_72F358
cmp	eax, [esp+6Ch+var_58]
jnb	short loc_72F358
movzx	ecx, word ptr [eax+4]
mov	edx, [esp+6Ch+var_4]
shr	ecx, 0Ch
mov	esi, ecx
add	ebp, esi
mov	edi, eax
test	edx, edx
jnz	short loc_72F310
mov	edx, ecx
mov	[esp+6Ch+var_4], edx

loc_72F310:
add	eax, 8
mov	ecx, 0F000h
mov	[esp+6Ch+var_5C], eax
test	[eax+4], cx
jbe	short loc_72F349
test	edx, edx
jbe	short loc_72F349
lea	ecx, [esp+6Ch+var_50]
call	sub_73ED30
test	al, al
jnz	short loc_72F349
mov	edx, [esp+6Ch+var_4]
push	edx
lea	ecx, [esp+70h+var_50]
call	sub_73F2D0
mov	[esp+6Ch+var_4], 0

loc_72F349:
lea	ecx, [esp+6Ch+var_5C]
call	sub_735210
cmp	ebp, [esp+6Ch+arg_0]
jbe	short loc_72F2E5

loc_72F358:
mov	eax, [esp+6Ch+arg_4]
test	eax, eax
jz	short loc_72F362
mov	[eax], ebx

loc_72F362:
mov	ecx, [esp+6Ch+var_C]
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_72F371
call	sub_64A400

loc_72F371:
mov	eax, [esp+64h+var_10]
test	eax, eax
jz	short loc_72F397
dec	dword ptr [eax]
mov	esi, eax
cmp	dword ptr [esi], 0
jnz	short loc_72F397
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_72F397:
mov	eax, edi
pop	edi
pop	esi
add	esp, 5Ch
retn	8

loc_72F3A1:
pop	edi
xor	eax, eax
pop	esi
add	esp, 5Ch
retn	8
sub_72F230 endp

align 10h



sub_72F3B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 1Ch
fldz
push	ebx
push	esi
fst	[esp+24h+var_10]
mov	esi, ecx
fst	[esp+24h+var_C]
mov	ecx, [esp+24h+arg_4]
fst	[esp+24h+var_8]
lea	eax, [esp+24h+arg_4]
fstp	[esp+24h+var_4]
push	eax
push	ecx
mov	ecx, [esp+2Ch+arg_0]
push	0
lea	edx, [esp+30h+var_14]
push	edx
lea	eax, [esp+34h+var_10]
push	eax
push	ecx
mov	ecx, esi
mov	[esp+3Ch+var_1C], esi
xor	bl, bl
call	sub_72F0D0
test	al, al
jz	loc_72F565
fld	[esp+24h+var_10]
push	edi
mov	edi, [esi+8]
cmp	byte ptr [esp+28h+arg_8], bl
jnz	short loc_72F413
fld	ds:dbl_15FCE20
fadd	st, st(1)
fstp	[esp+28h+var_8]

loc_72F413:
fld	dword ptr [edi+44h]
fld	[esp+28h+var_8]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_72F455
fld	dword ptr [edi+48h]
fld	[esp+28h+var_4]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_72F455
fld	dword ptr [edi+3Ch]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jp	short loc_72F455
fld	dword ptr [edi+40h]
fld	[esp+28h+var_C]
fcompp
fnstsw	ax
test	ah, 1
jz	loc_72F560

loc_72F455:
test	byte ptr [edi+14Ch], 30h
jnz	loc_72F560
cmp	[esp+28h+arg_4], 0
mov	esi, [edi+4Ch]
push	ebp
mov	ebp, 4B0h
mov	[esp+2Ch+var_18], esi
mov	[esp+2Ch+arg_8], ebp
jz	short loc_72F480
xor	ebp, ebp
mov	[esp+2Ch+arg_8], ebp

loc_72F480:
fld	dword ptr [edi+44h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_72F4E3
fsub	dword ptr [edi+44h]
fiadd	[esp+2Ch+arg_8]
call	__ftol2_sse
fldz
add	esi, eax
fst	[esp+2Ch+var_10]
mov	eax, [esp+2Ch+arg_0]
fst	[esp+2Ch+var_C]
fst	[esp+2Ch+var_8]
fstp	[esp+2Ch+var_4]
test	eax, eax
jbe	short loc_72F4DB
dec	eax
push	eax
lea	edx, [esp+30h+var_10]
push	edx
mov	ecx, edi
call	sub_7250A0
test	al, al
jz	short loc_72F4DB
fld	[esp+2Ch+var_10]
fsub	ds:dbl_1440130
call	__ftol2_sse
cmp	eax, esi
jge	short loc_72F4DB
mov	esi, eax

loc_72F4DB:
test	esi, esi
jge	short loc_72F503
xor	esi, esi
jmp	short loc_72F503

loc_72F4E3:
fld	dword ptr [edi+3Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_72F501
fsubr	dword ptr [edi+3Ch]
call	__ftol2_sse
add	eax, ebp
sub	esi, eax
jns	short loc_72F503
xor	esi, esi
jmp	short loc_72F503

loc_72F501:
fstp	st

loc_72F503:
mov	edi, [esp+2Ch+var_1C]
mov	ecx, [edi+8]
test	byte ptr [ecx+14Eh], 8
pop	ebp
jz	short loc_72F51A
cmp	esi, [esp+28h+var_18]
jge	short loc_72F522

loc_72F51A:
push	esi
call	sub_71EF70
mov	bl, al

loc_72F522:
mov	ecx, [edi+8]
mov	esi, [esp+28h+var_14]
cmp	esi, [ecx+38h]
jnb	short loc_72F541
push	esi
call	sub_71EFD0
pop	edi
or	bl, al
pop	esi
mov	al, bl
pop	ebx
add	esp, 1Ch
retn	0Ch

loc_72F541:
call	sub_725410
cmp	esi, eax
jbe	short loc_72F564
mov	ecx, [edi+8]
push	esi
call	sub_71F020
pop	edi
or	bl, al
pop	esi
mov	al, bl
pop	ebx
add	esp, 1Ch
retn	0Ch

loc_72F560:
fstp	st(1)
fstp	st

loc_72F564:
pop	edi

loc_72F565:
pop	esi
mov	al, bl
pop	ebx
add	esp, 1Ch
retn	0Ch
sub_72F3B0 endp

align 10h



sub_72F570 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax+3Ch], ecx
mov	ecx, [eax+0Ch]
add	ecx, 24h
mov	edx, 0FFFFh
add	[ecx+10h], dx
mov	ecx, [eax+0Ch]
test	byte ptr [ecx+68h], 1
jnz	short loc_72F598
or	word ptr [ecx+68h], 8
jmp	short loc_72F5A1

loc_72F598:
mov	edx, 0FFF7h
and	[ecx+68h], dx

loc_72F5A1:
fldz
fstp	qword ptr [ecx+38h]
mov	ecx, [eax+0Ch]
mov	dl, [ecx+69h]
and	dl, 1
movzx	edx, dl
push	edx
mov	edx, [eax+30h]
add	edx, [eax+3Ch]
push	0
push	edx
call	sub_72F3B0
retn	4
sub_72F570 endp

align 10h



sub_72F5D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
cmp	byte ptr [esi+0C0h], 0Ah
mov	byte ptr [esi+40h], 1
jnb	loc_72F68F
mov	eax, [esi+0Ch]
mov	ecx, [eax+8]
push	ebx
push	edi
call	sub_720290
mov	dl, [esi+0C0h]
movzx	ecx, dl
mov	ecx, [esi+ecx*4+98h]
inc	dl
push	ecx
mov	ecx, eax
mov	[esi+0C0h], dl
call	sub_73EF30
mov	edx, [esi+30h]
mov	ecx, [esp+0Ch+arg_8]
mov	ebx, [esp+0Ch+arg_0]
mov	edi, [esp+0Ch+arg_4]
mov	[eax], edx
mov	[eax+8], ebx
mov	[eax+4], edi
shl	ecx, 4
mov	edx, [ecx+esi+44h]
lea	ecx, [ecx+esi+44h]
mov	[eax+18h], edx
mov	edx, [ecx+4]
mov	[eax+1Ch], edx
mov	edx, [ecx+8]
mov	[eax+20h], edx
mov	cl, [ecx+0Ch]
mov	[eax+24h], cl
mov	edx, [esi+0Ch]
mov	ecx, [edx+8]
push	eax
call	sub_71E060
test	edi, edi
jbe	short loc_72F68D
mov	ecx, [esi+0Ch]
mov	al, [ecx+69h]
and	al, 1
movzx	edx, al
mov	eax, [esi+30h]
push	edx
add	eax, ebx
push	0
add	eax, edi
push	eax
call	sub_72F3B0
mov	ecx, [esi+0Ch]
mov	dl, [ecx+69h]
and	dl, 1
movzx	eax, dl
mov	edx, [esi+30h]
push	eax
push	0
add	edx, ebx
push	edx
call	sub_72F3B0

loc_72F68D:
pop	edi
pop	ebx

loc_72F68F:
pop	esi
retn	0Ch
sub_72F5D0 endp

align 10h



sub_72F6A0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, 0FFFFFFFFh
jz	short loc_72F720
mov	eax, [esi+8]
mov	ecx, [eax+8]
call	sub_726950
cmp	edi, eax
jbe	short loc_72F6BE
mov	edi, eax

loc_72F6BE:
test	byte ptr [esi+68h], 1
jnz	short loc_72F6CB
or	word ptr [esi+68h], 8
jmp	short loc_72F6D4

loc_72F6CB:
mov	ecx, 0FFF7h
and	[esi+68h], cx

loc_72F6D4:
fldz
mov	edx, [esi+8]
fstp	qword ptr [esi+38h]
cmp	dword ptr [edx+18h], 0
jz	short loc_72F720
lea	eax, [esp+8+arg_0]
push	eax
push	edi
mov	ecx, esi
call	sub_72F230
test	eax, eax
jz	short loc_72F720
movzx	ecx, word ptr [eax+4]
mov	edx, ecx
and	edx, 0F000h
cmp	edx, 1000h
jz	short loc_72F720
mov	eax, [esp+8+arg_0]
cmp	eax, edi
jz	short loc_72F720
cmp	edi, [esi+18h]
jb	short loc_72F71E
movzx	edi, cx
shr	edi, 0Ch
add	edi, eax
jmp	short loc_72F720

loc_72F71E:
mov	edi, eax

loc_72F720:
fld	ds:flt_1431A30
mov	eax, 0FFFFh
mov	[esi+18h], edi
add	[esi+34h], ax
fstp	dword ptr [esi+48h]
mov	eax, [esi+18h]
cmp	eax, 0FFFFFFFFh
jz	short loc_72F75D
mov	cl, [esi+69h]
and	cl, 1
movzx	edx, cl
push	edx
push	1
push	eax
mov	ecx, esi
call	sub_72F3B0
mov	eax, [esi+18h]
mov	ecx, [esi+8]
push	eax
call	sub_71EA00

loc_72F75D:
movzx	eax, word ptr [esi+68h]
mov	cl, al
shr	cl, 1
test	cl, 1
jz	short loc_72F7C5
cmp	[esp+8+arg_4], 0
jz	short loc_72F7B8
mov	dl, al
shr	dl, 6
test	dl, 1
jnz	short loc_72F79E
shr	al, 5
test	al, 1
jnz	short loc_72F79E
mov	ecx, [esi+8]
mov	esi, [esi+18h]
cmp	[ecx+1Ch], esi
jnz	short loc_72F792
cmp	[ecx+20h], esi
jz	short loc_72F7C5

loc_72F792:
push	esi
push	esi
call	sub_720390
pop	edi
pop	esi
retn	8

loc_72F79E:
mov	ecx, [esi+8]
mov	esi, [esi+18h]
cmp	[ecx+20h], esi
jz	short loc_72F7C5
mov	eax, [ecx+1Ch]
push	esi
push	eax
call	sub_720390
pop	edi
pop	esi
retn	8

loc_72F7B8:
mov	eax, [esi+18h]
mov	ecx, [esi+8]
push	eax
push	eax
call	sub_720390

loc_72F7C5:
pop	edi
pop	esi
retn	8
sub_72F6A0 endp

align 10h


; Attributes: bp-based frame

sub_72F7D0 proc	near

var_108= qword ptr -108h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	word ptr -74h
var_72=	word ptr -72h
var_70=	word ptr -70h
var_6E=	word ptr -6Eh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_10=	byte ptr -10h
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
mov	eax, [ebp+arg_0]
sub	esp, 0F4h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [eax+48h]
movzx	eax, word ptr [edi+68h]
mov	esi, [ecx+0Ch]
mov	dl, al
shr	dl, 3
test	dl, 1
jz	loc_72FD9F
test	byte ptr [edi+68h], 1
jnz	loc_72FD9F
shr	eax, 8
test	al, 1
jnz	loc_72FD9F
mov	eax, [edi+8]
fldz
mov	cx, [edi+34h]
mov	[esp+100h+var_D0], 0FFFFFFFFh
cmp	cx, [eax+148h]
jz	loc_72F90A
mov	ebx, [edi+18h]
fst	[esp+100h+var_BC]
fst	[esp+100h+var_B8]
mov	ecx, edi
fst	[esp+100h+var_B4]
fstp	[esp+100h+var_B0]
call	sub_71E250
test	al, al
jz	short loc_72F853
mov	edx, [edi+14h]
add	ebx, [edx+3Ch]

loc_72F853:
push	0
push	0
lea	eax, [esp+108h+var_AC]
push	eax
lea	ecx, [esp+10Ch+var_D0]
push	ecx
lea	edx, [esp+110h+var_BC]
push	edx
push	ebx
mov	ecx, edi
call	sub_72ED60
test	al, al
jz	short loc_72F8D2
mov	eax, [edi+8]
fld	[esp+100h+var_BC]
mov	ecx, [eax+8]
fstp	[esp+100h+var_B4]
mov	eax, [ecx+1Ch]
test	eax, eax
jz	short loc_72F893
test	byte ptr [eax+2Ah], 1
jz	short loc_72F893
mov	edx, [eax+20h]
mov	[edi+1Ch], edx

loc_72F893:
mov	eax, [edi+8]
mov	ecx, [eax+14h]
test	ecx, ecx
jz	short loc_72F8F0
mov	eax, [edi+18h]
push	0FFFFFFFFh
push	eax
lea	edx, [esp+108h+var_34]
push	edx
call	sub_73F3F0
test	[esp+100h+var_4], 10h
jz	short loc_72F8F0
lea	eax, [esp+100h+var_AC]
push	eax
lea	ecx, [esp+104h+var_10]
call	sub_6C6210
mov	ecx, [eax]
mov	[edi+1Ch], ecx
jmp	short loc_72F8F0

loc_72F8D2:
fldz
fst	[esp+100h+var_BC]
fstp	[esp+100h+var_B8]
fldz
fadd	st, st
fstp	[esp+100h+var_E0]
fld	[esp+100h+var_E0]
fst	[esp+100h+var_B4]
fstp	[esp+100h+var_B0]

loc_72F8F0:
mov	edx, [edi+8]
movzx	eax, word ptr [edx+148h]
push	eax
lea	ecx, [esp+104h+var_BC]
push	ecx
lea	ecx, [edi+24h]
call	sub_72E990
jmp	short loc_72F90C

loc_72F90A:
fstp	st

loc_72F90C:
fld	dword ptr [edi+24h]
mov	ebx, [edi+8]
fstp	[esp+100h+var_CC]
fld	dword ptr [edi+28h]
fstp	[esp+100h+var_C8]
fld	dword ptr [edi+2Ch]
fstp	[esp+100h+var_C4]
fld	dword ptr [edi+30h]
fstp	[esp+100h+var_C0]
mov	edx, [ebx+4Ch]
fild	dword ptr [ebx+4Ch]
test	edx, edx
jge	short loc_72F93B
fadd	ds:flt_15FCC08

loc_72F93B:
lea	ecx, [ebx+24h]
fstp	[esp+100h+var_D8]
call	sub_733EC0
mov	[esp+100h+var_AC], eax
fild	[esp+100h+var_AC]
test	eax, eax
jge	short loc_72F959
fadd	ds:flt_15FCC08

loc_72F959:
fstp	[esp+100h+var_D4]
fld	[esp+100h+var_D8]
fchs
fstp	[esp+100h+var_AC]
fld	[esp+100h+var_D4]
fchs
fstp	[esp+100h+var_A8]
fld	[esp+100h+var_AC]
fld	st
fadd	[esp+100h+var_CC]
fstp	[esp+100h+var_CC]
fadd	[esp+100h+var_C4]
fstp	[esp+100h+var_C4]
fld	[esp+100h+var_A8]
fld	st
fadd	[esp+100h+var_C8]
fstp	[esp+100h+var_C8]
fadd	[esp+100h+var_C0]
fstp	[esp+100h+var_C0]
fld	dword ptr [ebx+3Ch]
fstp	[esp+100h+var_D8]
fld	dword ptr [ebx+40h]
fstp	[esp+100h+var_D4]
fld	[esp+100h+var_D8]
fld	st
fadd	[esp+100h+var_CC]
fstp	[esp+100h+var_CC]
fadd	[esp+100h+var_C4]
fstp	[esp+100h+var_C4]
fld	[esp+100h+var_D4]
fld	st
fadd	[esp+100h+var_C8]
fstp	[esp+100h+var_C8]
fadd	[esp+100h+var_C0]
fstp	[esp+100h+var_C0]
fld	[esp+100h+var_C0]
fld	dword ptr [ebx+48h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_72FA19
cmp	[esp+100h+var_D0], 0FFFFFFFFh
jnz	short loc_72F9FE
mov	eax, [edi+18h]
mov	ecx, [edi+8]
push	eax
call	sub_724B30
mov	[esp+100h+var_D0], eax

loc_72F9FE:
mov	ecx, [esp+100h+var_D0]
mov	eax, [edi+8]
push	ecx
lea	ecx, [eax+24h]
call	sub_72E3A0
test	al, al
jz	short loc_72FA19
fld	dword ptr [ebx+48h]
fstp	[esp+100h+var_C0]

loc_72FA19:
fld	dword ptr [ebx+44h]
fld	[esp+100h+var_C4]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_72FD9F
fld	dword ptr [ebx+48h]
fld	[esp+100h+var_C0]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_72FD9F
fld	dword ptr [ebx+3Ch]
fld	[esp+100h+var_CC]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	loc_72FD9D
fld	dword ptr [ebx+40h]
fld	[esp+100h+var_C8]
fcompp
fnstsw	ax
test	ah, 1
jnz	loc_72FD9D
fadd	ds:dbl_15FCE20
mov	eax, [ebp+arg_4]
lea	edx, [esp+100h+var_BC]
push	edx
fstp	[esp+104h+var_C4]
lea	ecx, [esp+104h+var_8C]
fld	dword ptr [eax]
fstp	[esp+104h+var_8C]
fld	dword ptr [eax+4]
fstp	[esp+104h+var_88]
fld	dword ptr [eax+8]
fstp	[esp+104h+var_84]
fld	dword ptr [eax+0Ch]
fstp	[esp+104h+var_80]
fld	dword ptr [eax+10h]
fstp	[esp+104h+var_7C]
fld	dword ptr [eax+14h]
lea	eax, [esp+104h+var_CC]
fstp	[esp+104h+var_78]
push	eax
fldz
push	ecx
fst	[esp+10Ch+var_BC]
fst	[esp+10Ch+var_B8]
fst	[esp+10Ch+var_B4]
fstp	[esp+10Ch+var_B0]
call	sub_7340C0
mov	edx, [esi]
mov	edx, [edx+38h]
add	esp, 0Ch
lea	eax, [esp+100h+var_8C]
push	eax
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	ebx, [ebp+arg_8]
mov	edx, [eax+40h]
push	ebx
mov	ecx, esi
call	edx
fld	[esp+100h+var_8C]
mov	eax, [ebp+arg_0]
fstp	[esp+100h+var_A4]
fld	[esp+100h+var_88]
add	eax, 78h
fstp	[esp+100h+var_A0]
push	eax
fld	[esp+104h+var_84]
lea	ecx, [esp+104h+var_A4]
fstp	[esp+104h+var_9C]
fld	[esp+104h+var_80]
fstp	[esp+104h+var_98]
fld	[esp+104h+var_7C]
fstp	[esp+104h+var_94]
fld	[esp+104h+var_78]
fstp	[esp+104h+var_90]
call	sub_64EBB0
fld	[esp+100h+var_A4]
lea	ecx, [esp+100h+var_4C]
fst	[esp+100h+var_64]
push	ecx
fld	[esp+104h+var_A0]
lea	ecx, [esp+104h+var_64]
fst	[esp+104h+var_60]
fld	[esp+104h+var_9C]
fst	[esp+104h+var_5C]
fld	[esp+104h+var_98]
fst	[esp+104h+var_58]
fld	[esp+104h+var_94]
fst	[esp+104h+var_54]
fld	[esp+104h+var_90]
fst	[esp+104h+var_50]
fstp	[esp+104h+var_38]
fxch	st(4)
fstp	[esp+104h+var_4C]
fxch	st(2)
fstp	[esp+104h+var_48]
fstp	[esp+104h+var_44]
fstp	[esp+104h+var_40]
fstp	[esp+104h+var_3C]
call	sub_64E9E0
fld	[esp+100h+var_BC]
lea	edx, [esp+100h+var_E0]
fstp	[esp+100h+var_E0]
push	edx
fld	[esp+104h+var_B8]
lea	eax, [esp+104h+var_D8]
push	eax
fstp	[esp+108h+var_DC]
lea	ecx, [esp+108h+var_A4]
call	sub_64E9B0
fld	[esp+100h+var_D8]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+108h+var_E0]
fld	[esp+108h+var_E0]
fstp	[esp+108h+var_108]
call	_floor
add	esp, 8
fstp	[esp+100h+var_E0]
fld	[esp+100h+var_E0]
lea	ecx, [esp+100h+var_D8]
push	ecx
fstp	[esp+104h+var_D8]
lea	edx, [esp+104h+var_E0]
push	edx
lea	ecx, [esp+108h+var_64]
call	sub_64E9B0
fld	[esp+100h+var_E0]
fstp	[esp+100h+var_BC]
lea	eax, [esp+100h+var_D8]
fld	[esp+100h+var_D8]
push	eax
fadd	ds:dbl_15FCC40
lea	ecx, [esp+104h+var_E0]
push	ecx
lea	ecx, [esp+108h+var_64]
fstp	[esp+108h+var_D8]
call	sub_64E9B0
fld	[esp+100h+var_E0]
mov	edx, [edi+1Ch]
fst	[esp+100h+var_D8]
push	ecx
fld	[esp+104h+var_DC]
mov	eax, esp
fstp	[esp+104h+var_D4]
mov	ecx, ebx
fstp	[esp+104h+var_B4]
mov	[eax], edx
lea	eax, [esp+104h+var_AC]
push	eax
call	sub_68D0C0
fld	[esp+100h+var_BC]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+108h+var_E0]
fld	[esp+108h+var_E0]
fstp	[esp+108h+var_108]
call	_floor
call	__ftol2_sse
fld	[esp+108h+var_B8]
mov	di, ax
mov	[esp+108h+var_74], di
call	__ftol2_sse
fld	[esp+108h+var_B4]
fadd	ds:dbl_15FCC48
mov	bx, ax
mov	[esp+108h+var_72], bx
fstp	[esp+108h+var_E0]
fld	[esp+108h+var_E0]
fstp	[esp+108h+var_108]
call	_floor
call	__ftol2_sse
fld	[esp+108h+var_B0]
mov	word ptr [esp+108h+var_D0], ax
mov	[esp+108h+var_70], ax
mov	[esp+108h+var_6E], bx
mov	word ptr [esp+108h+var_6C], di
call	__ftol2_sse
mov	cx, word ptr [esp+108h+var_D0]
mov	word ptr [esp+108h+var_6C+2], ax
mov	word ptr [esp+108h+var_68], cx
mov	edx, [esp+108h+var_AC]
mov	word ptr [esp+108h+var_68+2], ax
add	esp, 4
mov	eax, esp
mov	[eax], edx
mov	eax, [esi]
mov	edx, [eax+8Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+6Ch]
push	0
push	1
push	4
lea	ecx, [esp+10Ch+var_74]
push	ecx
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+70h]
push	0
push	1
push	6
push	offset unk_1440798
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+78h]
push	2
push	0
push	4
push	0
push	0
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+6Ch]
push	0
push	0
push	0
push	0
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+70h]
push	0
push	0
push	0
push	0
mov	ecx, esi
call	edx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch

loc_72FD9D:
fstp	st

loc_72FD9F:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_72F7D0 endp

align 10h



sub_72FDB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= word ptr	-4
arg_0= dword ptr  4

mov	edx, [esp+arg_0]
sub	esp, 10h
push	esi
mov	esi, ecx
test	edx, edx
jz	loc_72FE8E
movzx	ecx, word ptr [esi+68h]
mov	al, cl
shr	al, 5
test	al, 1
jnz	loc_72FE8E
test	byte ptr [esi+68h], 1
mov	eax, [esi+8]
push	ebx
mov	ebx, [eax+1Ch]
push	ebp
mov	ebp, [eax+20h]
push	edi
mov	edi, [esi+18h]
mov	[esp+20h+var_10], eax
mov	byte ptr [esp+20h+arg_0], 0
jnz	loc_72FE80
cmp	dx, 20h
jb	loc_72FE80
cmp	ebx, ebp
jnz	short loc_72FE2B
shr	cl, 7
test	cl, 1
jz	short loc_72FE0C
inc	ebp

loc_72FE0C:
cmp	ebx, ebp
jnz	short loc_72FE2B
mov	word ptr [esp+20h+var_8], dx
lea	edx, [esp+20h+var_C]
push	edx
mov	ecx, eax
push	0
mov	[esp+28h+var_C], edi
call	sub_720620
add	edi, eax
jmp	short loc_72FE51

loc_72FE2B:
mov	ecx, eax
lea	eax, [esp+20h+var_C]
push	eax
push	5
mov	[esp+28h+var_C], ebx
mov	[esp+28h+var_8], ebp
mov	[esp+28h+var_4], dx
call	sub_720620
mov	ecx, ebx
cmp	ebx, ebp
jb	short loc_72FE4E
mov	ecx, ebp

loc_72FE4E:
lea	edi, [ecx+eax]

loc_72FE51:
cmp	[esi+18h], edi
jnz	short loc_72FE5E
cmp	ebx, edi
jnz	short loc_72FE5E
cmp	ebp, edi
jz	short loc_72FE6D

loc_72FE5E:
push	0
push	edi
mov	ecx, esi
call	sub_72F6A0
mov	byte ptr [esp+20h+arg_0], 1

loc_72FE6D:
mov	ecx, [esp+20h+var_10]
mov	ecx, [ecx+10h]
test	ecx, ecx
jz	short loc_72FE80
mov	edx, [ecx]
mov	eax, [edx+20h]
push	esi
call	eax

loc_72FE80:
mov	al, byte ptr [esp+20h+arg_0]
pop	edi
pop	ebp
pop	ebx
pop	esi
add	esp, 10h
retn	4

loc_72FE8E:
xor	al, al
pop	esi
add	esp, 10h
retn	4
sub_72FDB0 endp

align 10h



sub_72FEA0 proc	near

arg_0= dword ptr  4

mov	al, [ecx+68h]
shr	al, 1
and	al, 1
movzx	edx, al
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_72F6A0
retn	4
sub_72FEA0 endp

align 10h



; int __stdcall	sub_72FEC0(double)
sub_72FEC0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= qword ptr  4

fld	[esp+arg_0]
push	esi
mov	esi, ecx
fld	st
mov	al, [esi+68h]
fsub	qword ptr [esi+40h]
not	al
fxch	st(1)
fstp	qword ptr [esi+40h]
test	al, 1
jz	short loc_72FF29
fadd	qword ptr [esi+38h]
fld	ds:dbl_15FCC48
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_72FF24
movzx	eax, word ptr [esi+68h]
fstp	st
mov	cl, al
shr	cl, 4
test	cl, 1
jnz	short loc_72FF14
mov	dl, al
shr	dl, 3
test	dl, 1
jz	short loc_72FF0D
and	eax, 0FFF7h
jmp	short loc_72FF10

loc_72FF0D:
or	eax, 8

loc_72FF10:
mov	[esi+68h], ax

loc_72FF14:
fldz
mov	eax, 0FFEFh
and	[esi+68h], ax
fstp	qword ptr [esi+38h]
jmp	short loc_72FF2B

loc_72FF24:
fstp	qword ptr [esi+38h]
jmp	short loc_72FF2B

loc_72FF29:
fstp	st

loc_72FF2B:
mov	cl, [esi+68h]
shr	cl, 5
test	cl, 1
jz	loc_72FFDC
fld	dword ptr [esi+50h]
mov	ecx, [esi+8]
fstp	[esp+4+arg_0]
call	sub_7243A0
fld	dword ptr [eax+4]
mov	ecx, [esi+8]
fcomp	[esp+4+arg_0]
fnstsw	ax
test	ah, 1
jnz	short loc_72FF8C
mov	eax, [ecx+38h]
test	eax, eax
jbe	short loc_72FFDC
fld	dword ptr [esi+50h]
push	ecx		; float
dec	eax
fstp	[esp+8+var_8]
push	eax		; int
call	sub_7245A0
cmp	eax, [esi+18h]
jz	short loc_72FFDC
mov	dl, [esi+68h]
shr	dl, 1
and	dl, 1
movzx	ecx, dl
push	ecx
push	eax
mov	ecx, esi
call	sub_72F6A0
pop	esi
retn	8

loc_72FF8C:
fld	dword ptr [esi+50h]
fstp	[esp+4+arg_0]
call	sub_7243A0
fld	dword ptr [eax+0Ch]
fcomp	[esp+4+arg_0]
fnstsw	ax
test	ah, 41h
jp	short loc_72FFDC
mov	ecx, [esi+8]
push	edi
call	sub_725410
mov	ecx, [esi+8]
mov	edi, eax
inc	edi
call	sub_724360
cmp	edi, eax
jnb	short loc_72FFDB
mov	ecx, [esi+8]
fld	dword ptr [esi+50h]
push	ecx		; float
fstp	[esp+0Ch+var_C]
push	edi		; int
call	sub_7245A0
cmp	eax, [esi+18h]
jz	short loc_72FFDB
push	eax
mov	ecx, esi
call	sub_72FEA0

loc_72FFDB:
pop	edi

loc_72FFDC:
pop	esi
retn	8
sub_72FEC0 endp




; int __stdcall	sub_72FFE0(float, float, float)
sub_72FFE0 proc	near

var_20=	qword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
test	byte ptr [esp+0Ch+arg_8], 1
push	esi
mov	esi, ecx
jz	loc_73024B
mov	ecx, [esi+8]
push	ebx
push	edi
call	sub_7243A0
fld	[esp+18h+arg_0]
mov	edi, eax
fsub	dword ptr [edi]
sub	esp, 8
fstp	[esp+20h+arg_8]
fld	[esp+20h+arg_8]
fstp	[esp+20h+var_20]
call	_floor
fstp	[esp+20h+arg_8]
fld	[esp+20h+arg_8]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_4]
fsub	dword ptr [edi+4]
fstp	[esp+20h+arg_8]
fld	[esp+20h+arg_8]
fstp	[esp+20h+var_20]
call	_floor
fstp	[esp+20h+arg_8]
add	esp, 8
fld	[esp+18h+arg_8]
fstp	[esp+18h+arg_4]
call	sub_6B2200
push	0
push	3E8h
push	edx
push	eax
call	__aulldiv
fld	dword ptr [esi+4Ch]
fld	[esp+18h+arg_0]
mov	edi, eax
fld	st
xor	bl, bl
fucomp	st(2)
mov	byte ptr [esp+18h+arg_8], bl
fnstsw	ax
fstp	st(1)
fld	[esp+18h+arg_4]
test	ah, 44h
jp	short loc_7300C0
fld	dword ptr [esi+50h]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7300C0
mov	eax, [esi+54h]
add	eax, 12Ch
cmp	edi, eax
ja	short loc_7300C0
movzx	eax, word ptr [esi+68h]
mov	ecx, eax
shr	ecx, 9
test	cl, 1
jz	short loc_7300B3
or	eax, 200h
mov	byte ptr [esp+18h+arg_8], 1
mov	[esi+68h], ax
jmp	short loc_7300C9

loc_7300B3:
or	eax, 200h
mov	bl, 1
mov	[esi+68h], ax
jmp	short loc_7300C9

loc_7300C0:
mov	edx, 0FDFFh
and	[esi+68h], dx

loc_7300C9:
mov	ecx, [esi+8]
fxch	st(1)
fst	dword ptr [esi+4Ch]
sub	esp, 8
fxch	st(1)
mov	[esi+54h], edi
fst	dword ptr [esi+50h]
fstp	dword ptr [esp+20h+var_20+4]
fstp	dword ptr [esp+20h+var_20]
call	sub_7245E0
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	loc_730249
mov	al, [esi+68h]
shr	al, 1
and	al, 1
movzx	ecx, al
push	ecx
push	edi
mov	ecx, esi
call	sub_72F6A0
movzx	eax, word ptr [esi+68h]
mov	dl, al
shr	dl, 1
test	dl, 1
jz	loc_730249
mov	cl, al
shr	cl, 5
test	cl, 1
jnz	loc_730249
or	eax, 20h
mov	[esi+68h], ax
test	bl, bl
jnz	short loc_730154
cmp	byte ptr [esp+18h+arg_8], bl
jnz	short loc_730154
shr	al, 6
test	al, 1
jnz	loc_730249
mov	ecx, [esi+8]
push	edi
push	edi
call	sub_720390
pop	edi
pop	ebx
pop	esi
add	esp, 0Ch
retn	0Ch

loc_730154:
mov	ecx, [esi+8]
mov	ecx, [ecx+8]
lea	edx, [esp+18h+arg_8]
push	edx
push	edi
lea	eax, [esp+20h+var_8]
push	eax
call	sub_7267B0
lea	ecx, [esp+18h+var_8]
call	sub_71E0B0
test	al, al
jnz	loc_730249
mov	edx, [esp+18h+var_8]
mov	eax, [edx]
mov	ecx, [esp+18h+var_4]
mov	ecx, [eax+ecx*4]
push	ebp
mov	[esp+1Ch+arg_4], ecx
call	sub_725AB0
mov	ecx, [esp+1Ch+arg_8]
mov	[esp+1Ch+arg_0], eax
mov	ebp, ecx
mov	edi, ecx
test	bl, bl
jz	short loc_73021B
mov	edx, [esp+1Ch+arg_4]
mov	ebx, [edx]
mov	[esp+1Ch+var_C], ebx
test	ecx, ecx
jbe	short loc_7301E4
lea	ebx, [ebx+ecx*2-2]

loc_7301B4:
movzx	eax, word ptr [ebx]
push	eax
call	sub_6A2090
add	esp, 4
test	eax, eax
jnz	short loc_7301DC
movzx	eax, word ptr [ebx]
push	eax
call	sub_725920
add	esp, 4
test	eax, eax
jz	short loc_7301DC
dec	ebp
sub	ebx, 2
test	ebp, ebp
ja	short loc_7301B4

loc_7301DC:
mov	ecx, [esp+1Ch+arg_8]
mov	eax, [esp+1Ch+arg_0]

loc_7301E4:
cmp	ecx, eax
jnb	short loc_73021F
jmp	short loc_7301F0
align 10h

loc_7301F0:
mov	eax, [esp+1Ch+var_C]
movzx	ebx, word ptr [eax+edi*2]
push	ebx
call	sub_6A2090
add	esp, 4
test	eax, eax
jnz	short loc_73021F
push	ebx
call	sub_725920
add	esp, 4
test	eax, eax
jz	short loc_73021F
inc	edi
cmp	edi, [esp+1Ch+arg_0]
jb	short loc_7301F0
jmp	short loc_73021F

loc_73021B:
xor	ebp, ebp
mov	edi, eax

loc_73021F:
mov	dl, [esi+68h]
mov	ecx, [esp+1Ch+arg_4]
mov	ebx, [ecx+1Ch]
shr	dl, 1
and	dl, 1
movzx	eax, dl
push	eax
add	edi, ebx
push	edi
mov	ecx, esi
call	sub_72F6A0
mov	ecx, [esi+8]
push	edi
add	ebx, ebp
push	ebx
call	sub_720390
pop	ebp

loc_730249:
pop	edi
pop	ebx

loc_73024B:
pop	esi
add	esp, 0Ch
retn	0Ch
sub_72FFE0 endp

align 10h



; int __stdcall	sub_730260(float, float)
sub_730260 proc	near

var_14=	qword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, ecx
mov	al, [esi+68h]
shr	al, 5
test	al, 1
jz	loc_730314
mov	ecx, [esi+8]
push	edi
call	sub_7243A0
fld	[esp+0Ch+arg_0]
mov	edi, eax
fsub	dword ptr [edi]
sub	esp, 8
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fstp	[esp+14h+var_14]
call	_floor
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fstp	[esp+14h+var_4]
fld	[esp+14h+arg_4]
fsub	dword ptr [edi+4]
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fstp	[esp+14h+var_14]
call	_floor
mov	ecx, [esi+8]
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fstp	[esp+14h+arg_0]
fld	[esp+14h+var_4]
fst	dword ptr [esi+4Ch]
fld	[esp+14h+arg_0]
fst	dword ptr [esi+50h]
fstp	dword ptr [esp+14h+var_14+4]
fstp	dword ptr [esp+14h+var_14]
call	sub_7245E0
mov	edi, eax
cmp	edi, 0FFFFFFFFh
jz	short loc_730313
mov	cl, [esi+68h]
shr	cl, 1
and	cl, 1
movzx	edx, cl
push	edx
push	edi
mov	ecx, esi
call	sub_72F6A0
mov	al, [esi+68h]
shr	al, 1
test	al, 1
jz	short loc_730313
mov	ecx, [esi+8]
mov	edx, [ecx+1Ch]
push	edi
push	edx
call	sub_720390

loc_730313:
pop	edi

loc_730314:
pop	esi
pop	ecx
retn	8
sub_730260 endp

align 10h



sub_730320 proc	near

var_38=	dword ptr -38h
var_22=	byte ptr -22h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebx, [esi+8]
mov	ecx, [ebx+8]
push	edi
mov	[esp+34h+var_4], ebx
call	sub_726950
mov	ecx, [ebx+10h]
mov	edi, [esi+18h]
mov	[esp+34h+var_1C], eax
mov	[esp+34h+var_22], 0
test	ecx, ecx
jz	short loc_73035A
mov	edx, [esp+34h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+18h]
push	edx
push	esi
call	eax
jmp	short loc_73035E

loc_73035A:
mov	eax, [esp+34h+arg_0]

loc_73035E:
mov	cl, [esi+68h]
fld	ds:flt_1431A30
shr	cl, 6
fstp	[esp+34h+var_20]
and	cl, 1
mov	[esp+34h+var_21], cl
mov	ecx, [esi+8]
mov	ebx, [ecx+1Ch]
mov	ebp, [ecx+20h]
mov	ecx, [esi+10h]
mov	byte ptr [esp+34h+arg_0], 0
mov	[esp+34h+var_14], ebx
mov	[esp+34h+var_18], ebp
test	ecx, ecx
jz	loc_730984	; default
			; jumptable 007303B9 case 3
mov	edx, [esp+34h+arg_4]
push	0
push	edx
push	eax
call	sub_6C7140
test	eax, eax
jz	loc_730984	; default
			; jumptable 007303B9 case 3
mov	eax, [eax]
lea	ecx, [eax-2]	; switch 21 cases
cmp	ecx, 14h
ja	loc_730984	; default
			; jumptable 007303B9 case 3
jmp	ds:off_7309A0[ecx*4] ; switch jump

loc_7303C0:		; jumptable 007303B9 case 2
mov	al, [esi+68h]
shr	al, 1
test	al, 1
jnz	loc_73098B
jmp	loc_730984	; default
			; jumptable 007303B9 case 3

loc_7303D2:		; jumptable 007303B9 case 4
cmp	edi, 0FFFFFFFFh
jnz	short loc_7303DB
mov	edi, [esp+34h+var_1C]

loc_7303DB:
test	edi, edi
jbe	short loc_7303E0
dec	edi

loc_7303E0:
mov	cl, [esi+68h]
shr	cl, 6
test	cl, 1
jnz	loc_730491
cmp	ebx, ebp
jz	loc_730491
jnb	short loc_730400
mov	edi, ebx
jmp	loc_730491

loc_730400:
mov	edi, ebp
jmp	loc_730491

loc_730407:		; jumptable 007303B9 case 5
cmp	edi, 0FFFFFFFFh
jnz	short loc_730412
mov	edi, [esp+34h+var_1C]
jmp	short loc_730419

loc_730412:
cmp	edi, [esp+34h+var_1C]
jnb	short loc_730419
inc	edi

loc_730419:
mov	dl, [esi+68h]
shr	dl, 6
test	dl, 1
jnz	short loc_730491
cmp	ebp, ebx
jz	short loc_730491
jnb	short loc_730400
mov	edi, ebx
jmp	short loc_730491

loc_73042E:		; jumptable 007303B9 case 10
mov	eax, [esi+18h]
mov	ecx, [esi+8]
push	eax
call	sub_724B30
cmp	eax, 0FFFFFFFFh
jz	short loc_730491
mov	ecx, [esi+8]
push	eax
call	sub_724B80
mov	edi, eax
jmp	short loc_730491

loc_73044C:		; jumptable 007303B9 case 11
mov	edx, [esi+18h]
mov	ecx, [esi+8]
push	edx
call	sub_724B30
mov	ebp, eax
cmp	ebp, 0FFFFFFFFh
jz	short loc_73048D
mov	ecx, [esi+8]
lea	eax, [esp+34h+arg_4]
push	eax
push	ebp
mov	byte ptr [esp+3Ch+arg_4], 0
call	sub_724BE0
cmp	byte ptr [esp+34h+arg_4], 0
mov	ebx, eax
jz	short loc_73047C
dec	ebx

loc_73047C:
mov	ecx, [esi+8]
push	ebp
call	sub_724B80
mov	edi, eax
add	edi, ebx
mov	ebx, [esp+34h+var_14]

loc_73048D:
mov	ebp, [esp+34h+var_18]

loc_730491:
cmp	[esi+18h], edi
jz	loc_730930
mov	cl, [esi+68h]
shr	cl, 1
and	cl, 1
movzx	edx, cl
push	edx
push	edi
mov	ecx, esi
call	sub_72F6A0
fld	[esp+34h+var_20]
fstp	dword ptr [esi+48h]
jmp	loc_730952

loc_7304BA:		; jumptable 007303B9 case 12
mov	ecx, [esi+8]
mov	eax, [ecx+38h]
push	eax
call	sub_724B80
mov	edi, eax
jmp	short loc_730491

loc_7304CA:		; jumptable 007303B9 case 13
mov	ecx, [esi+8]
call	sub_725410
mov	ecx, [esi+8]
lea	edx, [esp+34h+arg_4]
mov	edi, eax
push	edx
push	edi
mov	byte ptr [esp+3Ch+arg_4], 0
call	sub_724BE0
cmp	byte ptr [esp+34h+arg_4], 0
mov	ebp, eax
jz	short loc_7304F1
dec	ebp

loc_7304F1:
mov	ecx, [esi+8]
push	edi
call	sub_724B80
mov	edi, eax
add	edi, ebp
jmp	short loc_73048D

loc_730500:		; jumptable 007303B9 case 8
fldz
mov	edx, [esi+18h]
push	0
fst	[esp+38h+var_14]
push	1
fst	[esp+3Ch+var_10]
push	0
fst	[esp+40h+var_C]
lea	eax, [esp+40h+arg_4]
fstp	[esp+40h+var_8]
push	eax
lea	ecx, [esp+44h+var_14]
push	ecx
push	edx
mov	ecx, esi
call	sub_72F0D0
test	al, al
jz	loc_730491
fldz
fcomp	dword ptr [esi+48h]
fnstsw	ax
test	ah, 41h
jnz	short loc_730547
fld	[esp+34h+var_14]
jmp	short loc_73054A

loc_730547:
fld	dword ptr [esi+48h]

loc_73054A:
mov	ecx, [esi+8]
fstp	[esp+34h+var_20]
call	sub_725410
mov	ecx, [esi+8]
sub	eax, [ecx+38h]
mov	edx, [esp+34h+arg_4]
inc	eax
cmp	edx, eax
jnb	short loc_73056C

loc_730565:		; jumptable 007303B9 case 14
xor	edi, edi
jmp	loc_730491

loc_73056C:
fld	[esp+34h+var_20]
push	ecx		; float
sub	edx, eax
fstp	[esp+38h+var_38]
push	edx		; int
call	sub_7245A0
mov	edi, eax
jmp	loc_730491

loc_730583:		; jumptable 007303B9 case 9
fldz
mov	edx, [esi+18h]
push	0
fst	[esp+38h+var_14]
push	1
fst	[esp+3Ch+var_10]
push	0
fst	[esp+40h+var_C]
lea	eax, [esp+40h+arg_4]
fstp	[esp+40h+var_8]
push	eax
lea	ecx, [esp+44h+var_14]
push	ecx
push	edx
mov	ecx, esi
call	sub_72F0D0
test	al, al
jz	loc_730491
fldz
fcomp	dword ptr [esi+48h]
fnstsw	ax
test	ah, 41h
jnz	short loc_7305CA
fld	[esp+34h+var_14]
jmp	short loc_7305CD

loc_7305CA:
fld	dword ptr [esi+48h]

loc_7305CD:
mov	ecx, [esi+8]
fstp	[esp+34h+var_20]
call	sub_725410
mov	ecx, [esi+8]
sub	eax, [ecx+38h]
mov	edx, [esp+34h+arg_4]
lea	edi, [edx+eax+1]
call	sub_724360
cmp	edi, eax
jb	loc_73070A

loc_7305F4:		; jumptable 007303B9 case 15
mov	edi, [esp+34h+var_1C]
jmp	loc_730491

loc_7305FD:		; jumptable 007303B9 case 6
fldz
mov	al, [esi+68h]
fst	[esp+34h+var_14]
shr	al, 6
fst	[esp+34h+var_10]
fst	[esp+34h+var_C]
fstp	[esp+34h+var_8]
test	al, 1
jnz	short loc_73062A
cmp	ebx, ebp
jz	short loc_73062A
jnb	loc_730400
mov	edi, ebx
jmp	loc_730491

loc_73062A:
mov	eax, [esi+18h]
push	0
push	1
push	0
lea	ecx, [esp+40h+arg_4]
push	ecx
lea	edx, [esp+44h+var_14]
push	edx
push	eax
mov	ecx, esi
call	sub_72F0D0
test	al, al
jz	loc_730491
mov	edx, [esp+34h+arg_4]
test	edx, edx
jbe	loc_730565	; jumptable 007303B9 case 14
fldz
fcomp	dword ptr [esi+48h]
fnstsw	ax
test	ah, 41h
jnz	short loc_73066B
fld	[esp+34h+var_14]
jmp	short loc_73066E

loc_73066B:
fld	dword ptr [esi+48h]

loc_73066E:
mov	ecx, [esi+8]
fstp	[esp+34h+var_20]
fld	[esp+34h+var_20]
push	ecx		; float
dec	edx
fstp	[esp+38h+var_38]
push	edx		; int
call	sub_7245A0
mov	edi, eax
jmp	loc_730491

loc_73068B:		; jumptable 007303B9 case 7
fldz
mov	cl, [esi+68h]
fst	[esp+34h+var_14]
shr	cl, 6
fst	[esp+34h+var_10]
fst	[esp+34h+var_C]
fstp	[esp+34h+var_8]
test	cl, 1
jnz	short loc_7306B9
cmp	ebp, ebx
jz	short loc_7306B9
jnb	loc_730400
mov	edi, ebx
jmp	loc_730491

loc_7306B9:
mov	ecx, [esi+18h]
push	0
push	1
push	0
lea	edx, [esp+40h+arg_4]
push	edx
lea	eax, [esp+44h+var_14]
push	eax
push	ecx
mov	ecx, esi
call	sub_72F0D0
test	al, al
jz	loc_730491
mov	edi, [esp+34h+arg_4]
mov	ecx, [esi+8]
inc	edi
call	sub_724360
cmp	edi, eax
jnb	loc_7305F4	; jumptable 007303B9 case 15
fldz
fcomp	dword ptr [esi+48h]
fnstsw	ax
test	ah, 41h
jnz	short loc_730703
fld	[esp+34h+var_14]
jmp	short loc_730706

loc_730703:
fld	dword ptr [esi+48h]

loc_730706:
fstp	[esp+34h+var_20]

loc_73070A:
mov	ecx, [esi+8]
fld	[esp+34h+var_20]
push	ecx		; float
fstp	[esp+38h+var_38]
push	edi		; int
call	sub_7245A0
mov	edi, eax
jmp	loc_730491

loc_730722:		; jumptable 007303B9 case 16
test	byte ptr [esi+68h], 1
jnz	loc_730491
mov	edx, 0FFBFh
and	[esi+68h], dx
cmp	ebx, ebp
jnz	short loc_730758
mov	ecx, [esi+8]
lea	eax, [esp+34h+arg_0]
push	eax
push	8
mov	[esp+3Ch+arg_0], edi
call	sub_720620
sub	edi, eax
mov	byte ptr [esp+34h+arg_0], 1
jmp	loc_730491

loc_730758:
lea	ecx, [esp+34h+var_14]
push	ecx
mov	ecx, [esi+8]
push	4
mov	[esp+3Ch+var_14], ebx
mov	[esp+3Ch+var_10], ebp
call	sub_720620

loc_73076F:
mov	edi, ebx
cmp	ebx, ebp
jb	short loc_730777
mov	edi, ebp

loc_730777:
mov	byte ptr [esp+34h+arg_0], 1
jmp	loc_730491

loc_730781:		; jumptable 007303B9 case 17
test	byte ptr [esi+68h], 1
jnz	loc_730491
mov	edx, 0FFBFh
and	[esi+68h], dx
cmp	ebx, ebp
jnz	short loc_7307C2
mov	eax, [esp+34h+var_1C]
cmp	[esi+18h], eax
jnb	loc_730491
lea	ecx, [esp+34h+arg_0]
push	ecx
mov	ecx, [esi+8]
push	3
mov	[esp+3Ch+arg_0], edi
call	sub_720620
mov	byte ptr [esp+34h+arg_0], 1
jmp	loc_730491

loc_7307C2:
mov	ecx, [esi+8]
lea	edx, [esp+34h+var_14]
push	edx
push	4
mov	[esp+3Ch+var_14], ebx
mov	[esp+3Ch+var_10], ebp
call	sub_720620
mov	edi, ebx
cmp	ebx, ebp
jb	short loc_730777
mov	edi, ebp
mov	byte ptr [esp+34h+arg_0], 1
jmp	loc_730491

loc_7307EB:		; jumptable 007303B9 case 18
test	byte ptr [esi+68h], 1
jnz	loc_730491
mov	ecx, [esi+8]
test	byte ptr [ecx+14Eh], 4
jz	loc_730491
mov	eax, 0FFBFh
and	[esi+68h], ax
mov	edx, [ecx+8]
mov	al, [edx+20h]
and	al, 2
cmp	ebx, ebp
jnz	short loc_73084C
neg	al
sbb	al, al
and	al, 3
add	al, 0Ah
movzx	dx, al
movzx	eax, dx
mov	edx, [esi+18h]
mov	word ptr [esp+34h+var_10], ax
lea	eax, [esp+34h+var_14]
push	eax
push	0
mov	[esp+3Ch+var_14], edx
call	sub_720620
inc	edi
mov	byte ptr [esp+34h+arg_0], 1
jmp	loc_730491

loc_73084C:
neg	al
sbb	al, al
and	al, 3
add	al, 0Ah
movzx	dx, al
movzx	eax, dx
mov	word ptr [esp+34h+var_C], ax
lea	eax, [esp+34h+var_14]
push	eax
push	5
mov	[esp+3Ch+var_14], ebx
mov	[esp+3Ch+var_10], ebp
call	sub_720620
mov	edi, ebx
cmp	ebx, ebp
jb	short loc_73087C
mov	edi, ebp

loc_73087C:
inc	edi
mov	byte ptr [esp+34h+arg_0], 1
jmp	loc_730491

loc_730887:		; jumptable 007303B9 case 22
mov	edi, [esp+34h+var_1C]
push	edi
mov	ecx, esi
call	sub_72FEA0
mov	ecx, [esi+8]
push	edi
push	0
call	sub_720390
jmp	loc_730984	; default
			; jumptable 007303B9 case 3

loc_7308A3:		; jumptable 007303B9 cases 19,21
cmp	dword ptr [esi+0Ch], 0
jz	loc_730491
test	byte ptr [esi+68h], 1
jnz	short loc_7308DC
cmp	eax, 13h
jz	short loc_7308DC
mov	ecx, 0FFBFh
and	[esi+68h], cx
movzx	eax, word ptr [esi+68h]
shr	al, 2
and	al, 1
movzx	edx, al
push	edx
push	ebp
push	ebx
mov	ecx, esi
call	sub_72E6E0
jmp	loc_73076F

loc_7308DC:
mov	eax, 0FFBFh
and	[esi+68h], ax
movzx	eax, word ptr [esi+68h]
shr	al, 2
and	al, 1
movzx	ecx, al
push	ecx
push	ebp
push	ebx
mov	ecx, esi
call	sub_72E600
jmp	loc_730984	; default
			; jumptable 007303B9 case 3

loc_730900:		; jumptable 007303B9 case 20
mov	dl, [esi+68h]
shr	dl, 2
and	dl, 1
mov	byte ptr [esp+34h+arg_4], dl
mov	eax, [esp+34h+arg_4]
push	eax
push	ebp
push	ebx
mov	ecx, esi
call	sub_72E740
cmp	eax, 0FFFFFFFFh
jz	loc_730491
mov	edi, eax
mov	byte ptr [esp+34h+arg_0], 1
jmp	loc_730491

loc_730930:
movzx	eax, word ptr [esi+68h]
mov	cl, al
shr	cl, 6
test	cl, 1
jnz	short loc_730957
cmp	ebx, ebp
jz	short loc_730957
shr	al, 1
and	al, 1
movzx	edx, al
push	edx
push	edi
mov	ecx, esi
call	sub_72F6A0

loc_730952:
mov	[esp+34h+var_22], 1

loc_730957:
cmp	byte ptr [esp+34h+arg_0], 0
jz	short loc_730984 ; default
			; jumptable 007303B9 case 3
cmp	[esp+34h+var_22], 0
jnz	short loc_730971
mov	eax, [esi+18h]
mov	ecx, [esi+8]
push	eax
call	sub_71EA00

loc_730971:
mov	ecx, [esp+34h+var_4]
mov	ecx, [ecx+10h]
test	ecx, ecx
jz	short loc_730984 ; default
			; jumptable 007303B9 case 3
mov	edx, [ecx]
mov	eax, [edx+20h]
push	esi
call	eax

loc_730984:		; default
cmp	[esp+34h+var_21], 0 ; jumptable	007303B9 case 3
jz	short loc_730990

loc_73098B:
or	word ptr [esi+68h], 40h

loc_730990:
mov	al, [esp+34h+var_22]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	8
sub_730320 endp

align 10h
off_7309A0 dd offset loc_7303C0	; jump table for switch	statement
dd offset loc_730984
dd offset loc_7303D2
dd offset loc_730407
dd offset loc_7305FD
dd offset loc_73068B
dd offset loc_730500
dd offset loc_730583
dd offset loc_73042E
dd offset loc_73044C
dd offset loc_7304BA
dd offset loc_7304CA
dd offset loc_730565
dd offset loc_7305F4
dd offset loc_730722
dd offset loc_730781
dd offset loc_7307EB
dd offset loc_7308A3
dd offset loc_730900
dd offset loc_7308A3
dd offset loc_730887
align 10h



sub_730A00 proc	near

arg_0= dword ptr  4

test	[esp+arg_0], 102h
push	esi
mov	esi, ecx
jz	short loc_730A35
test	byte ptr [esi+68h], 1
jz	short loc_730A1C
mov	al, [esi+68h]
shr	al, 1
test	al, 1
jz	short loc_730A64

loc_730A1C:
mov	cl, [esi+68h]
shr	cl, 1
and	cl, 1
movzx	edx, cl
push	edx
push	0
mov	ecx, esi
call	sub_72F6A0
pop	esi
retn	4

loc_730A35:
mov	eax, [esi+8]
mov	ecx, [eax+8]
call	sub_726950
cmp	[esi+18h], eax
jbe	short loc_730A64
mov	ecx, [esi+8]
mov	ecx, [ecx+8]
call	sub_726950
mov	dl, [esi+68h]
shr	dl, 1
and	dl, 1
movzx	ecx, dl
push	ecx
push	eax
mov	ecx, esi
call	sub_72F6A0

loc_730A64:
pop	esi
retn	4
sub_730A00 endp

align 10h



sub_730A70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
test	byte ptr [esi+68h], 1
push	edi
mov	edi, [esp+8+arg_4]
jz	short loc_730A87
mov	al, [esi+68h]
shr	al, 1
test	al, 1
jz	short loc_730A9B

loc_730A87:
mov	cl, [esi+68h]
shr	cl, 1
and	cl, 1
movzx	edx, cl
push	edx
push	edi
mov	ecx, esi
call	sub_72F6A0

loc_730A9B:
mov	eax, [esp+8+arg_0]
mov	ecx, [esi+8]
push	edi
push	eax
call	sub_720390
pop	edi
pop	esi
retn	8
sub_730A70 endp

align 10h



sub_730AB0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	byte ptr -84h
var_80=	byte ptr -80h
var_54=	byte ptr -54h
arg_0= dword ptr  4

sub	esp, 0B0h
push	ebx
push	ebp
mov	ebp, [esp+0B8h+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_155F500
mov	dword ptr [edi], offset	off_14406D4
mov	esi, 1
mov	[edi+4], esi
xor	ebx, ebx
mov	[edi+8], ebx
mov	[edi+0Ch], ebp
mov	eax, [ebp+8]
mov	ecx, [eax+8]
call	sub_7204E0
cmp	eax, ebx
jz	short loc_730AF1
add	[eax+4], esi

loc_730AF1:
mov	[edi+10h], eax
mov	ecx, [ebp+8]
mov	ecx, [ecx+8]
lea	esi, [edi+14h]
call	sub_7204E0
push	eax
mov	ecx, esi
call	sub_729990
mov	[edi+3Ch], ebx
mov	[edi+40h], bl
mov	[edi+4Ch], ebx
lea	esi, [edi+44h]
mov	[esi+4], ebx
mov	[esi], ebx
mov	[esi+0Ch], bl
mov	[esi+18h], ebx
mov	[esi+14h], ebx
mov	[esi+10h], ebx
mov	[esi+1Ch], bl
mov	[esi+28h], ebx
mov	[esi+24h], ebx
mov	[esi+20h], ebx
mov	[esi+2Ch], bl
mov	[esi+38h], ebx
mov	[esi+34h], ebx
mov	[esi+30h], ebx
mov	[esi+3Ch], bl
mov	[esi+48h], ebx
mov	[esi+44h], ebx
mov	[esi+40h], ebx
mov	[esi+4Ch], bl
mov	[esi+50h], bl
mov	edx, [edi+10h]
mov	[edi+0C0h], bl
mov	eax, [edx+1Ch]
push	eax
lea	ecx, [esp+0C4h+var_80]
call	sub_694320
mov	ecx, [ebp+8]
mov	edx, [ecx+8]
mov	eax, [edx+1Ch]
cmp	eax, ebx
jnz	short loc_730B78
lea	eax, [esp+0C0h+var_80]

loc_730B78:
mov	ecx, [edi+10h]
push	eax
call	sub_702780
mov	ecx, [edi+8]
mov	ebp, eax
cmp	ecx, ebx
jz	short loc_730B8F
call	sub_64A430

loc_730B8F:
mov	eax, ebp
mov	[edi+8], ebp
mov	ecx, [edi+10h]
push	eax
push	ecx
lea	ecx, [edi+14h]
call	sub_72A9B0
mov	edx, [edi+0Ch]
mov	ecx, [edx+8]
call	sub_720290
mov	[esp+0C0h+var_AC], eax
lea	ebp, [edi+98h]
mov	[esp+0C0h+var_B0], 0Ah
mov	edi, edi

loc_730BC0:
mov	ecx, [esp+0C0h+var_AC]
lea	eax, [esp+0C0h+var_A8]
push	eax
mov	[esp+0C4h+var_9C], ebx
mov	[esp+0C4h+var_98], ebx
mov	[esp+0C4h+var_94], ebx
mov	[esp+0C4h+var_88], ebx
mov	[esp+0C4h+var_8C], ebx
mov	[esp+0C4h+var_90], ebx
mov	[esp+0C4h+var_84], bl
mov	[esp+0C4h+var_A8], ebx
mov	[esp+0C4h+var_A0], ebx
mov	[esp+0C4h+var_A4], ebx
call	sub_740440
mov	ecx, [eax+14h]
mov	[ebp+0], ecx
add	ebp, 4
sub	[esp+0C0h+var_B0], 1
jnz	short loc_730BC0
lea	edx, [esp+0C0h+var_54]
push	edx
call	sub_72ECB0
add	esp, 4
push	eax
mov	ecx, esi
call	sub_6C4530
lea	ecx, [esp+0C0h+var_80]
call	sub_694380
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0B0h
retn	4
sub_730AB0 endp

align 10h



sub_730C40 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+0Ch]
mov	dword ptr [edi], offset	off_14406D4
mov	ecx, [eax+8]
call	sub_720290
mov	ebp, eax
lea	esi, [edi+98h]
mov	ebx, 0Ah

loc_730C64:
mov	ecx, [esi]
push	ecx
mov	ecx, ebp
call	sub_740690
add	esi, 4
sub	ebx, 1
jnz	short loc_730C64
mov	edx, [edi+10h]
lea	esi, [edi+14h]
push	edx
mov	ecx, esi
call	sub_7259C0
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, [eax+eax*2]
lea	ecx, [edx+ecx*4-0Ch]
test	eax, eax
jbe	short loc_730CB3
lea	ebx, [ecx+8]
mov	ebp, eax
lea	ebx, [ebx+0]

loc_730CA0:
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_730CAB
call	sub_64A430

loc_730CAB:
sub	ebx, 0Ch
sub	ebp, 1
jnz	short loc_730CA0

loc_730CB3:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_730CD0
call	sub_64A400

loc_730CD0:
mov	ecx, esi
call	nullsub_2
mov	ecx, [edi+10h]
test	ecx, ecx
jz	short loc_730CE3
call	sub_64A400

loc_730CE3:
mov	ecx, [edi+8]
test	ecx, ecx
jz	short loc_730CEF
call	sub_64A430

loc_730CEF:
mov	ecx, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
jmp	sub_64A3F0
sub_730C40 endp

align 10h



sub_730D00 proc	near

var_4= dword ptr -4

push	ecx
push	esi
push	edi
mov	esi, ecx
mov	ecx, dword_1855FC0
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0C4h
push	esi
call	eax
test	eax, eax
jz	short loc_730D35
push	esi
mov	ecx, eax
call	sub_730AB0
mov	edi, eax
jmp	short loc_730D37

loc_730D35:
xor	edi, edi

loc_730D37:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_730D43
call	sub_64A400

loc_730D43:
mov	[esi+14h], edi
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn
sub_730D00 endp

align 10h



sub_730D50 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_730C40
test	[esp+4+arg_0], 1
jz	short loc_730D6D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_730D6D:
mov	eax, esi
pop	esi
retn	4
sub_730D50 endp

align 10h



sub_730D80 proc	near
mov	eax, [ecx]
cmp	eax, [ecx+8]
jz	short locret_730D99
test	eax, eax
jz	short locret_730D99
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

locret_730D99:
retn
sub_730D80 endp

align 10h



sub_730DA0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
cmp	ebx, [esi+4]
jbe	short loc_730E19
cmp	ebx, [esi+0Ch]
jb	short loc_730E19
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+28h]
push	edi
push	0
lea	edx, [ebx+ebx+2]
push	edx
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_730E11
mov	eax, [esi]
test	eax, eax
jz	short loc_730DE5
mov	ecx, [esi+4]
lea	edx, [ecx+ecx+2]
push	edx
push	eax
push	edi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_730DE5:
xor	eax, eax
mov	[edi+ebx*2], ax
mov	eax, [esi]
cmp	eax, [esi+8]
jz	short loc_730E04
test	eax, eax
jz	short loc_730E04
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_730E04:
mov	[esi], edi
pop	edi
mov	[esi+4], ebx
pop	esi
mov	al, 1
pop	ebx
retn	4

loc_730E11:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4

loc_730E19:
mov	eax, [esi]
test	eax, eax
jz	short loc_730E25
xor	ecx, ecx
mov	[eax+ebx*2], cx

loc_730E25:
mov	[esi+4], ebx
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_730DA0 endp

align 10h



sub_730E30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, ecx
cmp	esi, 0FFFFFFFFh
jnz	short loc_730E4D
push	ebx
call	sub_67B340
add	esp, 4
mov	esi, eax

loc_730E4D:
push	esi
mov	ecx, edi
call	sub_730DA0
test	al, al
jz	short loc_730E6E
test	esi, esi
jz	short loc_730E6E
mov	ecx, [edi]
lea	eax, [esi+esi+2]
push	eax
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_730E6E:
pop	edi
pop	esi
pop	ebx
retn	8
sub_730E30 endp

align 10h



sub_730E80 proc	near
mov	eax, [ecx+4]
test	eax, eax
jle	short loc_730E92
mov	edx, [ecx]
cmp	word ptr [edx+eax*2-2],	0
jnz	short loc_730E92
dec	eax

loc_730E92:
push	esi
lea	esi, [eax-1]
test	esi, esi
jl	short loc_730EC2
lea	ebx, [ebx+0]

loc_730EA0:
mov	eax, [ecx]
movzx	edx, word ptr [eax+esi*2]
lea	eax, [eax+esi*2]
cmp	dx, 0Ah
jz	short loc_730EB5
cmp	dx, 0Dh
jnz	short loc_730EC2

loc_730EB5:
dec	dword ptr [ecx+4]
xor	edx, edx
sub	esi, 1
mov	[eax], dx
jns	short loc_730EA0

loc_730EC2:
pop	esi
retn
sub_730E80 endp

align 10h



sub_730ED0 proc	near

arg_0= word ptr	 4

movzx	edx, [esp+arg_0]
mov	eax, edx
shr	eax, 8
push	esi
movzx	esi, ds:word_1434648[eax*2]
test	esi, esi
jnz	short loc_730EED
xor	eax, eax
pop	esi
retn	4

loc_730EED:
mov	eax, 1
cmp	esi, eax
jz	short loc_730F15
mov	ecx, edx
shr	edx, 4
and	ecx, 0Fh
and	edx, 0Fh
shl	eax, cl
add	edx, esi
movzx	ecx, ds:word_1434648[edx*2]
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax

loc_730F15:
pop	esi
retn	4
sub_730ED0 endp

align 10h



sub_730F20 proc	near

arg_0= word ptr	 4

movzx	edx, [esp+arg_0]
mov	eax, edx
shr	eax, 8
push	esi
movzx	esi, ds:word_1434288[eax*2]
test	esi, esi
jnz	short loc_730F3D
xor	eax, eax
pop	esi
retn	4

loc_730F3D:
mov	eax, 1
cmp	esi, eax
jz	short loc_730F65
mov	ecx, edx
shr	edx, 4
and	ecx, 0Fh
and	edx, 0Fh
shl	eax, cl
add	edx, esi
movzx	ecx, ds:word_1434288[edx*2]
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax

loc_730F65:
pop	esi
retn	4
sub_730F20 endp

align 10h



sub_730F70 proc	near

arg_0= word ptr	 4

movzx	edx, [esp+arg_0]
mov	eax, edx
shr	eax, 8
push	esi
movzx	esi, ds:word_14348C8[eax*2]
test	esi, esi
jnz	short loc_730F8D
xor	eax, eax
pop	esi
retn	4

loc_730F8D:
mov	eax, 1
cmp	esi, eax
jz	short loc_730FB5
mov	ecx, edx
shr	edx, 4
and	ecx, 0Fh
and	edx, 0Fh
shl	eax, cl
add	edx, esi
movzx	ecx, ds:word_14348C8[edx*2]
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax

loc_730FB5:
pop	esi
retn	4
sub_730F70 endp

align 10h



sub_730FC0 proc	near

arg_0= word ptr	 4

movzx	edx, [esp+arg_0]
mov	eax, edx
shr	eax, 8
push	esi
movzx	esi, ds:word_1433BE8[eax*2]
test	esi, esi
jnz	short loc_730FDD
xor	eax, eax
pop	esi
retn	4

loc_730FDD:
mov	eax, 1
cmp	esi, eax
jz	short loc_731005
mov	ecx, edx
shr	edx, 4
and	ecx, 0Fh
and	edx, 0Fh
shl	eax, cl
add	edx, esi
movzx	ecx, ds:word_1433BE8[edx*2]
and	eax, ecx
neg	eax
sbb	eax, eax
neg	eax

loc_731005:
pop	esi
retn	4
sub_730FC0 endp

align 10h



sub_731010 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [eax]
mov	ecx, [esp+arg_4]
cmp	edx, [ecx]
jnz	short loc_73105F
mov	ecx, [ecx+4]
mov	eax, [eax+4]
and	ecx, 0FFFFFFFCh
and	eax, 0FFFFFFFCh
add	ecx, 8
add	eax, 8

loc_731030:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_731050
test	dl, dl
jz	short loc_73104C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_731050
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_731030

loc_73104C:
xor	eax, eax
jmp	short loc_731055

loc_731050:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_731055:
test	eax, eax
jnz	short loc_73105F
mov	eax, 1
retn

loc_73105F:
xor	eax, eax
retn
sub_731010 endp

align 10h



; int __thiscall sub_731070(void *, char)
sub_731070 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14406D8
jz	short loc_731089
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_731089:
mov	eax, esi
pop	esi
retn	4
sub_731070 endp

align 10h



sub_731090 proc	near

arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+8], 0Ah
jnz	short loc_7310B1
mov	eax, [esp+8+arg_0]
xor	ecx, ecx
mov	dword ptr [eax], 0Ah
mov	[eax+4], ecx
mov	[eax+8], ecx
pop	esi
pop	ecx
retn	4

loc_7310B1:
mov	eax, [esi+10h]
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
add	[esi+14h], ecx
add	[esi+18h], edx
push	ebx
mov	ebx, [esi+4]
add	eax, eax
add	[esi], eax
mov	eax, [esi]
push	ebp
push	edi
xor	ecx, ecx
mov	edi, eax
mov	ebp, 1
mov	[esi+0Ch], eax
mov	[esi+10h], ebp
mov	[esi+1Ch], ecx
mov	[esi+20h], ecx
cmp	edi, ebx
jnz	short loc_7310FA
mov	eax, 0Ah
mov	[esi+8], eax
xor	edx, edx
mov	[esi+0Ch], ecx
mov	[esi+10h], edx
jmp	loc_73137A

loc_7310FA:
movzx	eax, word ptr [edi]
push	eax
mov	ecx, esi
call	sub_730ED0
test	eax, eax
jz	short loc_731177
lea	esp, [esp+0]

loc_731110:
cmp	word ptr [edi],	0Ah
jnz	short loc_731120
add	[esi+1Ch], ebp
mov	dword ptr [esi+20h], 0

loc_731120:
add	[esi+20h], ebp
add	edi, 2
cmp	edi, [esi+4]
jz	short loc_73116B
movzx	eax, word ptr [edi]
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434648[ecx*2]
test	edx, edx
jz	short loc_73116B
cmp	edx, ebp
jz	short loc_731166
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1434648[eax*2]
mov	ebx, ebp
shl	ebx, cl
and	ebx, edx
neg	ebx
sbb	ebx, ebx
neg	ebx
jz	short loc_73116B

loc_731166:
add	[esi+10h], ebp
jmp	short loc_731110

loc_73116B:
mov	dword ptr [esi+8], 2
jmp	loc_73137A

loc_731177:
movzx	eax, word ptr [edi]
push	eax
mov	ecx, esi
call	sub_730FC0
test	eax, eax
jnz	loc_731309
movzx	eax, word ptr [edi]
cmp	ax, 5Fh
jz	loc_731309
cmp	ax, 2Eh
jz	loc_731309
cmp	ax, 22h
jnz	short loc_7311D3
add	edi, 2
mov	[esi+20h], ebp
cmp	edi, ebx
jz	short loc_7311C5

loc_7311B1:
cmp	word ptr [edi],	22h
jz	short loc_7311C5
add	[esi+10h], ebp
add	[esi+20h], ebp
add	edi, 2
cmp	edi, [esi+4]
jnz	short loc_7311B1

loc_7311C5:
add	[esi+20h], ebp
add	[esi+10h], ebp
mov	[esi+8], ebp
jmp	loc_73137A

loc_7311D3:
push	eax
mov	ecx, esi
call	sub_730F20
test	eax, eax
jz	short loc_73125D
add	edi, 2
mov	[esi+20h], ebp
cmp	edi, ebx
jz	short loc_731213
lea	esp, [esp+0]

loc_7311F0:
movzx	ebx, word ptr [edi]
push	ebx
mov	ecx, esi
call	sub_730F20
test	eax, eax
jnz	short loc_731205
cmp	bx, 2Eh
jnz	short loc_731213

loc_731205:
add	[esi+10h], ebp
add	[esi+20h], ebp
add	edi, 2
cmp	edi, [esi+4]
jnz	short loc_7311F0

loc_731213:
mov	dword ptr [esi+8], 3
cmp	word ptr [edi],	2Eh
jnz	loc_73137A
add	[esi+10h], ebp
add	dword ptr [esi+20h], 2
add	edi, 4
cmp	edi, [esi+4]
jz	loc_73137A

loc_731237:
movzx	eax, word ptr [edi]
push	eax
mov	ecx, esi
call	sub_730F20
test	eax, eax
jz	loc_73137A
add	[esi+10h], ebp
add	[esi+20h], ebp
add	edi, 2
cmp	edi, [esi+4]
jnz	short loc_731237
jmp	loc_73137A

loc_73125D:
movzx	eax, word ptr [edi]
cmp	ax, 23h
jnz	short loc_731299
add	edi, 2
mov	[esi+20h], ebp
cmp	edi, ebx
jz	short loc_73128D

loc_731270:
movzx	ecx, word ptr [edi]
push	ecx
mov	ecx, esi
call	sub_730F70
test	eax, eax
jz	short loc_73128D
add	[esi+10h], ebp
add	[esi+20h], ebp
add	edi, 2
cmp	edi, [esi+4]
jnz	short loc_731270

loc_73128D:
mov	dword ptr [esi+8], 4
jmp	loc_73137A

loc_731299:
movzx	eax, ax
add	eax, 0FFFFFFD4h
cmp	eax, 51h	; switch 82 cases
ja	short loc_7312FD ; default
			; jumptable 007312AB cases 1-13,16-78,80
movzx	edx, ds:byte_7313B0[eax]
jmp	ds:off_731398[edx*4] ; switch jump

loc_7312B2:		; jumptable 007312AB case 0
mov	dword ptr [esi+8], 5
mov	[esi+20h], ebp
jmp	loc_73137A

loc_7312C1:		; jumptable 007312AB case 15
mov	dword ptr [esi+8], 8
mov	[esi+20h], ebp
jmp	loc_73137A

loc_7312D0:		; jumptable 007312AB case 14
mov	dword ptr [esi+8], 9
mov	[esi+20h], ebp
jmp	loc_73137A

loc_7312DF:		; jumptable 007312AB case 79
mov	dword ptr [esi+8], 6
mov	[esi+20h], ebp
jmp	loc_73137A

loc_7312EE:		; jumptable 007312AB case 81
mov	dword ptr [esi+8], 7
mov	[esi+20h], ebp
jmp	loc_73137A

loc_7312FD:		; default
mov	dword ptr [esi+8], 0Bh ; jumptable 007312AB cases 1-13,16-78,80
mov	[esi+20h], ebp
jmp	short loc_73137A

loc_731309:
add	edi, 2
mov	[esi+20h], ebp
cmp	edi, ebx
jz	short loc_731373

loc_731313:
movzx	ebx, word ptr [edi]
movzx	eax, bx
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1433548[ecx*2]
test	edx, edx
jz	short loc_731359
cmp	edx, ebp
jz	short loc_731365
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1433548[eax*2]
mov	ebp, 1
shl	ebp, cl
and	ebp, edx
neg	ebp
sbb	ebp, ebp
neg	ebp
mov	ebp, 1
jnz	short loc_731365

loc_731359:
cmp	bx, 2Dh
jz	short loc_731365
cmp	bx, 5Fh
jnz	short loc_731373

loc_731365:
add	[esi+10h], ebp
add	[esi+20h], ebp
add	edi, 2
cmp	edi, [esi+4]
jnz	short loc_731313

loc_731373:
mov	dword ptr [esi+8], 0

loc_73137A:
mov	ecx, [esi+8]
mov	eax, [esp+14h+arg_0]
mov	edx, [esi+0Ch]
pop	edi
mov	[eax], ecx
mov	ecx, [esi+10h]
pop	ebp
pop	ebx
mov	[eax+4], edx
mov	[eax+8], ecx
pop	esi
pop	ecx
retn	4
sub_731090 endp

align 4
off_731398 dd offset loc_7312B2, offset	loc_7312D0 ; jump table	for switch statement
dd offset loc_7312C1, offset loc_7312DF
dd offset loc_7312EE, offset loc_7312FD
byte_7313B0 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     1,     2
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     3
db	5,     4
align 10h



sub_731410 proc	near
mov	edx, [ecx]
mov	eax, [ecx+4]
push	esi
mov	esi, [edx]
cmp	eax, [esi+4]
jg	short loc_73144C
inc	eax
mov	[ecx+4], eax
mov	esi, [edx]
cmp	eax, [esi+4]
ja	short loc_73144C
push	ebx
mov	esi, 0FFFFFFFEh
push	edi
nop

loc_731430:
mov	ebx, [edx]
lea	edi, [eax+eax*4]
cmp	[ebx+edi*4+8], esi
jnz	short loc_73144A
inc	eax
mov	[ecx+4], eax
mov	edi, edx
mov	edi, [edi]
mov	ebx, eax
cmp	ebx, [edi+4]
jbe	short loc_731430

loc_73144A:
pop	edi
pop	ebx

loc_73144C:
pop	esi
retn
sub_731410 endp

align 10h



sub_731450 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_0]
xor	edx, edx
cmp	ecx, edx
jbe	short locret_731478
mov	edi, edi

loc_731460:
cmp	eax, edx
jz	short loc_731470
mov	dword ptr [eax], 0Bh
mov	[eax+4], edx
mov	[eax+8], edx

loc_731470:
add	eax, 0Ch
sub	ecx, 1
jnz	short loc_731460

locret_731478:
retn
sub_731450 endp

align 10h



sub_731480 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, dword_1855FC0
sub	esp, 18h
push	ebx
mov	ebx, [esp+1Ch+arg_4]
push	ebp
mov	ebp, [ebx+4]
push	esi
push	edi
push	eax
lea	ecx, [esp+2Ch+var_18]
xor	edi, edi
call	sub_679B40
test	ebp, ebp
jbe	short loc_731516

loc_7314A3:
cmp	[esp+28h+var_14], 0
jbe	short loc_7314B5
push	2Ch
lea	ecx, [esp+2Ch+var_18]
call	sub_679C60

loc_7314B5:
mov	eax, [ebx]
lea	ecx, [edi+edi*2]
cmp	dword ptr [eax+ecx*4], 2
jnz	short loc_7314C8
inc	edi
lea	edx, [edi+1]
cmp	ebp, edx
jb	short loc_731541

loc_7314C8:
lea	esi, [edi+edi*2]
add	esi, esi
add	esi, esi
mov	ecx, [eax+esi]
test	ecx, ecx
jz	short loc_7314E2
cmp	ecx, 1
jnz	short loc_731541
cmp	dword ptr [eax+esi+8], 2
jbe	short loc_731541

loc_7314E2:
mov	edx, [eax+esi+4]
mov	eax, [eax+esi+8]
cmp	ecx, 1
jnz	short loc_7314F5
add	edx, 2
sub	eax, 2

loc_7314F5:
push	eax
push	edx
lea	ecx, [esp+30h+var_18]
call	sub_679CD0

loc_731500:
cmp	edi, ebp
jnb	short loc_731516
mov	eax, [ebx]
mov	ecx, [esi+eax]
inc	edi
add	esi, 0Ch
cmp	ecx, 5
jnz	short loc_731500
cmp	edi, ebp
jb	short loc_7314A3

loc_731516:
mov	edi, [esp+28h+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731541

loc_731521:
mov	eax, [esp+28h+var_18]
test	eax, eax
jnz	short loc_73152E
mov	eax, offset byte_146D660

loc_73152E:
mov	edx, [edi]
mov	ecx, [edx+esi*4]
push	0FFFFFFFFh
push	eax
call	sub_7010A0
inc	esi
cmp	esi, [edi+4]
jb	short loc_731521

loc_731541:
lea	ecx, [esp+28h+var_18]
call	sub_679B60
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_731480 endp

align 10h



sub_731560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_731578
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	short locret_7315E0

loc_731578:
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*4], 4
lea	eax, [ecx+eax*4]
jnz	short locret_7315E0
cmp	dword ptr [eax+8], 7
jnz	short locret_7315E0
mov	ecx, [eax+4]
push	6
add	ecx, 2
push	ecx
lea	edx, [esp+8+arg_4]
push	edx
mov	[esp+0Ch+arg_4], 0
call	sub_726280
mov	edx, [esp+0Ch+arg_0]
xor	ecx, ecx
add	esp, 0Ch
cmp	[edx+4], ecx
jbe	short locret_7315E0
push	ebx
push	esi
mov	esi, [esp+8+arg_4]
and	esi, offset sub_FFFFFF
nop

loc_7315C0:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
mov	ebx, [eax+20h]
or	word ptr [eax+2Ah], 1
and	ebx, 0FF000000h
or	ebx, esi
inc	ecx
mov	[eax+20h], ebx
cmp	ecx, [edx+4]
jb	short loc_7315C0
pop	esi
pop	ebx

locret_7315E0:
retn	8
sub_731560 endp

align 10h



sub_7315F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_73160C
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	locret_7316EC

loc_73160C:
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_73162B
cmp	ecx, 1
jnz	locret_7316EC
cmp	dword ptr [eax+8], 2
jbe	locret_7316EC

loc_73162B:
push	ebx
mov	ebx, [eax+4]
push	edi
mov	edi, [eax+8]
cmp	ecx, 1
jnz	short loc_73163E
add	ebx, 2
sub	edi, 2

loc_73163E:
push	esi
xor	esi, esi
mov	eax, edi
cmp	edi, 6
jb	short loc_73164D
mov	eax, 6

loc_73164D:
push	eax
push	offset aInline	; "inline"
push	ebx
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731664
xor	esi, esi
jmp	short loc_7316A8

loc_731664:
mov	eax, edi
cmp	edi, 5
jb	short loc_731670
mov	eax, 5

loc_731670:
push	eax
push	offset aBlock_0	; "block"
push	ebx
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731688
lea	esi, [eax+1]
jmp	short loc_7316A8

loc_731688:
cmp	edi, 4
jb	short loc_731692
mov	edi, 4

loc_731692:
push	edi
push	offset aNone_0	; "none"
push	ebx
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_7316A8
lea	esi, [eax+2]

loc_7316A8:
mov	edx, [esp+0Ch+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	short loc_7316E9
and	esi, 3
shl	esi, 0Bh
lea	esp, [esp+0]

loc_7316C0:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
mov	di, [eax+42h]
add	eax, 2Ch
mov	ebx, 0E7FFh
and	di, bx
or	di, si
mov	ebx, 100h
or	di, bx
inc	ecx
mov	[eax+16h], di
cmp	ecx, [edx+4]
jb	short loc_7316C0

loc_7316E9:
pop	esi
pop	edi
pop	ebx

locret_7316EC:
retn	8
sub_7315F0 endp

align 10h



sub_7316F0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_731708
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	short locret_73176A

loc_731708:
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*4], 3
lea	eax, [ecx+eax*4]
jnz	short locret_73176A
mov	ecx, [eax+8]
fldz
mov	edx, [eax+4]
fstp	[esp+arg_4]
push	ecx
push	edx
lea	eax, [esp+8+arg_4]
push	eax
call	sub_725C80
fldz
fcomp	[esp+0Ch+arg_4]
add	esp, 0Ch
fnstsw	ax
test	ah, 44h
jnp	short locret_73176A
push	esi
push	edi
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731768
lea	esp, [esp+0]

loc_731750:
fld	[esp+8+arg_4]
push	ecx		; float
mov	ecx, [edi]
fstp	[esp+0Ch+var_C]
mov	ecx, [ecx+esi*4]
call	sub_6D5760
inc	esi
cmp	esi, [edi+4]
jb	short loc_731750

loc_731768:
pop	edi
pop	esi

locret_73176A:
retn	8
sub_7316F0 endp

align 10h



sub_731770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_73178C
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	locret_73183B

loc_73178C:
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7317AB
cmp	ecx, 1
jnz	locret_73183B
cmp	dword ptr [eax+8], 2
jbe	locret_73183B

loc_7317AB:
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+4]
cmp	ecx, 1
jnz	short loc_7317BE
add	edi, 2
sub	esi, 2

loc_7317BE:
mov	eax, esi
cmp	esi, 6
jb	short loc_7317CA
mov	eax, 6

loc_7317CA:
push	eax
push	offset aNormal	; "normal"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_7317FF
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731839

loc_7317E8:
mov	ecx, [edi]
mov	ecx, [ecx+esi*4]
push	0
call	sub_701360
inc	esi
cmp	esi, [edi+4]
jb	short loc_7317E8
pop	edi
pop	esi
retn	8

loc_7317FF:
cmp	esi, 6
jb	short loc_731809
mov	esi, 6

loc_731809:
push	esi
push	offset aItalic_1 ; "italic"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731839
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731839

loc_731827:
mov	edx, [edi]
mov	ecx, [edx+esi*4]
push	1
call	sub_701360
inc	esi
cmp	esi, [edi+4]
jb	short loc_731827

loc_731839:
pop	edi
pop	esi

locret_73183B:
retn	8
sub_731770 endp

align 10h



sub_731840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_73185C
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	locret_73190B

loc_73185C:
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_73187B
cmp	ecx, 1
jnz	locret_73190B
cmp	dword ptr [eax+8], 2
jbe	locret_73190B

loc_73187B:
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+4]
cmp	ecx, 1
jnz	short loc_73188E
add	edi, 2
sub	esi, 2

loc_73188E:
mov	eax, esi
cmp	esi, 6
jb	short loc_73189A
mov	eax, 6

loc_73189A:
push	eax
push	offset aNormal	; "normal"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_7318CF
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731909

loc_7318B8:
mov	ecx, [edi]
mov	ecx, [ecx+esi*4]
push	0
call	sub_701310
inc	esi
cmp	esi, [edi+4]
jb	short loc_7318B8
pop	edi
pop	esi
retn	8

loc_7318CF:
cmp	esi, 4
jb	short loc_7318D9
mov	esi, 4

loc_7318D9:
push	esi
push	offset aBold_1	; "bold"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731909
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731909

loc_7318F7:
mov	edx, [edi]
mov	ecx, [edx+esi*4]
push	1
call	sub_701310
inc	esi
cmp	esi, [edi+4]
jb	short loc_7318F7

loc_731909:
pop	edi
pop	esi

locret_73190B:
retn	8
sub_731840 endp

align 10h



sub_731910 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_73192C
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	locret_7319DB

loc_73192C:
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_73194B
cmp	ecx, 1
jnz	locret_7319DB
cmp	dword ptr [eax+8], 2
jbe	locret_7319DB

loc_73194B:
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+4]
cmp	ecx, 1
jnz	short loc_73195E
add	edi, 2
sub	esi, 2

loc_73195E:
mov	eax, esi
cmp	esi, 4
jb	short loc_73196A
mov	eax, 4

loc_73196A:
push	eax
push	offset aTrue	; "true"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_73199F
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_7319D9

loc_731988:
mov	ecx, [edi]
mov	ecx, [ecx+esi*4]
push	1
call	sub_6FFB10
inc	esi
cmp	esi, [edi+4]
jb	short loc_731988
pop	edi
pop	esi
retn	8

loc_73199F:
cmp	esi, 5
jb	short loc_7319A9
mov	esi, 5

loc_7319A9:
push	esi
push	offset aFalse	; "false"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_7319D9
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_7319D9

loc_7319C7:
mov	edx, [edi]
mov	ecx, [edx+esi*4]
push	0
call	sub_6FFB10
inc	esi
cmp	esi, [edi+4]
jb	short loc_7319C7

loc_7319D9:
pop	edi
pop	esi

locret_7319DB:
retn	8
sub_731910 endp

align 10h



sub_7319E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_7319F8
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	short locret_731A72

loc_7319F8:
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*4], 3
lea	eax, [ecx+eax*4]
jnz	short locret_731A72
mov	ecx, [eax+8]
fldz
mov	edx, [eax+4]
fstp	[esp+arg_4]
push	ecx
push	edx
lea	eax, [esp+8+arg_4]
push	eax
call	sub_725C80
fldz
fld	[esp+0Ch+arg_4]
add	esp, 0Ch
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_731A70
push	esi
push	edi
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731A69
fmul	ds:dbl_15FCE20
call	__ftol2_sse
jmp	short loc_731A50
align 10h

loc_731A50:
mov	ecx, [edi]
mov	ecx, [ecx+esi*4]
or	word ptr [ecx+2Ah], 2
inc	esi
mov	[ecx+24h], ax
cmp	esi, [edi+4]
jb	short loc_731A50
pop	edi
pop	esi
retn	8

loc_731A69:
pop	edi
fstp	st
pop	esi
retn	8

loc_731A70:
fstp	st

locret_731A72:
retn	8
sub_7319E0 endp

align 10h



sub_731A80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [esp+4+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_731A9D
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	loc_731B21

loc_731A9D:
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*4], 3
lea	eax, [ecx+eax*4]
jnz	short loc_731B21
mov	ecx, [eax+8]
fldz
mov	edx, [eax+4]
fstp	[esp+4+var_4]
push	ecx
push	edx
lea	eax, [esp+0Ch+var_4]
push	eax
call	sub_725C80
fldz
fld	[esp+10h+var_4]
add	esp, 0Ch
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_731B1F
mov	edx, [esp+4+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	short loc_731B1F
fnstcw	word ptr [esp+4+arg_4]
push	esi
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+arg_0], eax
fldcw	word ptr [esp+8+arg_0]
fistp	[esp+8+arg_0]
mov	si, word ptr [esp+8+arg_0]
fldcw	word ptr [esp+8+arg_4]

loc_731B03:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
or	word ptr [eax+42h], 10h
add	eax, 2Ch
inc	ecx
mov	[eax+12h], si
cmp	ecx, [edx+4]
jb	short loc_731B03
pop	esi
pop	ecx
retn	8

loc_731B1F:
fstp	st

loc_731B21:
pop	ecx
retn	8
sub_731A80 endp

align 10h



sub_731B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [esp+4+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_731B4D
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	loc_731BD1

loc_731B4D:
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*4], 3
lea	eax, [ecx+eax*4]
jnz	short loc_731BD1
mov	ecx, [eax+8]
fldz
mov	edx, [eax+4]
fstp	[esp+4+var_4]
push	ecx
push	edx
lea	eax, [esp+0Ch+var_4]
push	eax
call	sub_725C80
fldz
fld	[esp+10h+var_4]
add	esp, 0Ch
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_731BCF
mov	edx, [esp+4+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	short loc_731BCF
fnstcw	word ptr [esp+4+arg_4]
push	esi
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+arg_0], eax
fldcw	word ptr [esp+8+arg_0]
fistp	[esp+8+arg_0]
mov	si, word ptr [esp+8+arg_0]
fldcw	word ptr [esp+8+arg_4]

loc_731BB3:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
or	word ptr [eax+42h], 20h
add	eax, 2Ch
inc	ecx
mov	[eax+14h], si
cmp	ecx, [edx+4]
jb	short loc_731BB3
pop	esi
pop	ecx
retn	8

loc_731BCF:
fstp	st

loc_731BD1:
pop	ecx
retn	8
sub_731B30 endp

align 10h



sub_731BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_731BFC
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	locret_731D7B

loc_731BFC:
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_731C1B
cmp	ecx, 1
jnz	locret_731D7B
cmp	dword ptr [eax+8], 2
jbe	locret_731D7B

loc_731C1B:
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+4]
cmp	ecx, 1
jnz	short loc_731C2E
add	edi, 2
sub	esi, 2

loc_731C2E:
mov	eax, esi
cmp	esi, 4
jb	short loc_731C3A
mov	eax, 4

loc_731C3A:
push	eax
push	offset aLeft_0	; "left"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731C87
mov	edx, [esp+8+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	loc_731D79
lea	esp, [esp+0]

loc_731C60:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
mov	si, [eax+42h]
add	eax, 2Ch
mov	edi, 0F9FFh
and	si, di
or	si, 1
inc	ecx
mov	[eax+16h], si
cmp	ecx, [edx+4]
jb	short loc_731C60
pop	edi
pop	esi
retn	8

loc_731C87:
mov	eax, esi
cmp	esi, 6
jb	short loc_731C93
mov	eax, 6

loc_731C93:
push	eax
push	offset aCenter	; "center"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731CD1
mov	edx, [esp+8+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	loc_731D79

loc_731CB5:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
add	eax, 2Ch
mov	esi, 601h
or	[eax+16h], si
inc	ecx
cmp	ecx, [edx+4]
jb	short loc_731CB5
pop	edi
pop	esi
retn	8

loc_731CD1:
mov	eax, esi
cmp	esi, 5
jb	short loc_731CDD
mov	eax, 5

loc_731CDD:
push	eax
push	offset aRight	; "right"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731D2B
mov	edx, [esp+8+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	short loc_731D79
jmp	short loc_731D00
align 10h

loc_731D00:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
mov	si, [eax+42h]
add	eax, 2Ch
mov	edi, 0FBFFh
and	si, di
mov	edi, 201h
or	si, di
inc	ecx
mov	[eax+16h], si
cmp	ecx, [edx+4]
jb	short loc_731D00
pop	edi
pop	esi
retn	8

loc_731D2B:
cmp	esi, 7
jb	short loc_731D35
mov	esi, 7

loc_731D35:
push	esi
push	offset aJustify_0 ; "justify"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731D79
mov	edx, [esp+8+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	short loc_731D79

loc_731D53:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
mov	si, [eax+42h]
add	eax, 2Ch
mov	edi, 0FDFFh
and	si, di
mov	edi, 401h
or	si, di
inc	ecx
mov	[eax+16h], si
cmp	ecx, [edx+4]
jb	short loc_731D53

loc_731D79:
pop	edi
pop	esi

locret_731D7B:
retn	8
sub_731BE0 endp

align 10h



sub_731D80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_731D9C
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	locret_731E4B

loc_731D9C:
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_731DBB
cmp	ecx, 1
jnz	locret_731E4B
cmp	dword ptr [eax+8], 2
jbe	locret_731E4B

loc_731DBB:
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+4]
cmp	ecx, 1
jnz	short loc_731DCE
add	edi, 2
sub	esi, 2

loc_731DCE:
mov	eax, esi
cmp	esi, 4
jb	short loc_731DDA
mov	eax, 4

loc_731DDA:
push	eax
push	offset aNone_0	; "none"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731E0F
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731E49

loc_731DF8:
mov	ecx, [edi]
mov	ecx, [ecx+esi*4]
push	0
call	sub_6FFAF0
inc	esi
cmp	esi, [edi+4]
jb	short loc_731DF8
pop	edi
pop	esi
retn	8

loc_731E0F:
cmp	esi, 9
jb	short loc_731E19
mov	esi, 9

loc_731E19:
push	esi
push	offset aUnderline ; "underline"
push	edi
call	sub_725E70
add	esp, 0Ch
test	eax, eax
jnz	short loc_731E49
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731E49

loc_731E37:
mov	edx, [edi]
mov	ecx, [edx+esi*4]
push	1
call	sub_6FFAF0
inc	esi
cmp	esi, [edi+4]
jb	short loc_731E37

loc_731E49:
pop	edi
pop	esi

locret_731E4B:
retn	8
sub_731D80 endp

align 10h



sub_731E50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [ecx], 2
jnz	short loc_731E68
cmp	dword ptr [edx+4], 2
mov	eax, 1
jb	short locret_731ED9

loc_731E68:
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*4], 3
lea	eax, [ecx+eax*4]
jnz	short locret_731ED9
mov	ecx, [eax+8]
fldz
mov	edx, [eax+4]
fstp	[esp+arg_4]
push	ecx
push	edx
lea	eax, [esp+8+arg_4]
push	eax
call	sub_725C80
fldz
fld	[esp+0Ch+arg_4]
add	esp, 0Ch
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_731ED7
push	esi
push	edi
mov	edi, [esp+8+arg_0]
xor	esi, esi
cmp	[edi+4], esi
jbe	short loc_731ED0
call	__ftol2_sse
lea	edx, [esi+4]

loc_731EB5:
mov	ecx, [edi]
mov	ecx, [ecx+esi*4]
or	[ecx+42h], dx
add	ecx, 2Ch
inc	esi
mov	[ecx+0Eh], ax
cmp	esi, [edi+4]
jb	short loc_731EB5
pop	edi
pop	esi
retn	8

loc_731ED0:
pop	edi
fstp	st
pop	esi
retn	8

loc_731ED7:
fstp	st

locret_731ED9:
retn	8
sub_731E50 endp

align 10h



sub_731EE0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_731F09
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_731F09:
mov	dword ptr [edi], 0FFFFFFFEh
pop	edi
pop	esi
retn
sub_731EE0 endp

align 10h



sub_731F20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
mov	[esi], eax
mov	ecx, [edi+4]
lea	edx, [edi+8]
mov	[esi+4], ecx
push	edx
lea	ecx, [esi+8]
call	sub_67ABE0
mov	eax, [edi+0Ch]
mov	[esi+0Ch], eax
mov	ecx, [edi+10h]
pop	edi
mov	[esi+10h], ecx
mov	eax, esi
pop	esi
retn	4
sub_731F20 endp

align 10h



sub_731F60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esp+0Ch+var_4]
call	sub_679E30
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax+8]
mov	edx, [eax+4]
push	ecx
push	edx
lea	ecx, [esp+14h+var_4]
call	sub_67A000
mov	edi, [esp+0Ch+arg_4]
cmp	dword ptr [edi+4], 1
jnb	short loc_731FBD
mov	esi, [esp+0Ch+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	loc_7321D3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
pop	ecx
retn	0Ch

loc_731FBD:
mov	eax, [esp+0Ch+var_4]
and	eax, 0FFFFFFFCh
mov	ecx, offset aColor ; "color"
add	eax, 8
lea	esp, [esp+0]

loc_731FD0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_731FF0
test	dl, dl
jz	short loc_731FEC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_731FF0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_731FD0

loc_731FEC:
xor	eax, eax
jmp	short loc_731FF5

loc_731FF0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_731FF5:
test	eax, eax
jnz	short loc_73200B
mov	ecx, [esp+0Ch+arg_8]
push	edi
push	ecx
mov	ecx, esi
call	sub_731560
jmp	loc_7321AD

loc_73200B:		; "display"
push	offset aDisplay
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_73202F
mov	edx, [esp+0Ch+arg_8]
push	edi
push	edx
mov	ecx, esi
call	sub_7315F0
jmp	loc_7321AD

loc_73202F:		; "font-family"
push	offset aFontFamily
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_732053
mov	eax, [esp+0Ch+arg_8]
push	edi
push	eax
mov	ecx, esi
call	sub_731480
jmp	loc_7321AD

loc_732053:		; "font-size"
push	offset aFontSize
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_732077
mov	ecx, [esp+0Ch+arg_8]
push	edi
push	ecx
mov	ecx, esi
call	sub_7316F0
jmp	loc_7321AD

loc_732077:		; "font-style"
push	offset aFontStyle
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_73209B
mov	edx, [esp+0Ch+arg_8]
push	edi
push	edx
mov	ecx, esi
call	sub_731770
jmp	loc_7321AD

loc_73209B:		; "font-weight"
push	offset aFontWeight
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_7320BF
mov	eax, [esp+0Ch+arg_8]
push	edi
push	eax
mov	ecx, esi
call	sub_731840
jmp	loc_7321AD

loc_7320BF:		; "kerning"
push	offset aKerning
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_7320E3
mov	ecx, [esp+0Ch+arg_8]
push	edi
push	ecx
mov	ecx, esi
call	sub_731910
jmp	loc_7321AD

loc_7320E3:		; "letter-spacing"
push	offset aLetterSpacing
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_732107
mov	edx, [esp+0Ch+arg_8]
push	edi
push	edx
mov	ecx, esi
call	sub_7319E0
jmp	loc_7321AD

loc_732107:		; "margin-left"
push	offset aMarginLeft
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_73212B
mov	eax, [esp+0Ch+arg_8]
push	edi
push	eax
mov	ecx, esi
call	sub_731A80
jmp	loc_7321AD

loc_73212B:		; "margin-right"
push	offset aMarginRight
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_73214C
mov	ecx, [esp+0Ch+arg_8]
push	edi
push	ecx
mov	ecx, esi
call	sub_731B30
jmp	short loc_7321AD

loc_73214C:		; "text-align"
push	offset aTextAlign
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_73216D
mov	edx, [esp+0Ch+arg_8]
push	edi
push	edx
mov	ecx, esi
call	sub_731BE0
jmp	short loc_7321AD

loc_73216D:		; "text-decoration"
push	offset aTextDecoration
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_73218E
mov	eax, [esp+0Ch+arg_8]
push	edi
push	eax
mov	ecx, esi
call	sub_731D80
jmp	short loc_7321AD

loc_73218E:		; "text-indent"
push	offset aTextIndent
lea	ecx, [esp+10h+var_4]
call	sub_654870
test	al, al
jz	short loc_7321AD
mov	ecx, [esp+0Ch+arg_8]
push	edi
push	ecx
mov	ecx, esi
call	sub_731E50

loc_7321AD:
mov	esi, [esp+0Ch+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7321D3
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7321D3:
pop	edi
pop	esi
pop	ecx
retn	0Ch
sub_731F60 endp

align 10h



sub_7321E0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_7321FC
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_732211
push	esi
jmp	short loc_73220B

loc_7321FC:
cmp	esi, [edi+8]
jb	short loc_732211
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_73220B:
push	edi
call	sub_6A30B0

loc_732211:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_73222C
mov	eax, [edi]
lea	edx, [ebx+ebx*2]
sub	esi, ebx
lea	ecx, [eax+edx*4]
push	esi
push	ecx
call	sub_731450
add	esp, 8

loc_73222C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_7321E0 endp

align 10h



sub_732240 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_732259
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_73226E
push	esi
jmp	short loc_732268

loc_732259:
cmp	esi, [edi+8]
jb	short loc_73226E
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_732268:
push	edi
call	sub_6A30B0

loc_73226E:
mov	eax, [edi]
lea	edx, [esi+esi*2]
mov	[edi+4], esi
lea	eax, [eax+edx*4-0Ch]
pop	edi
pop	esi
test	eax, eax
jz	short locret_732294
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
mov	[eax+8], ecx

locret_732294:
retn	4
sub_732240 endp

align 10h



sub_7322A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [ecx]
push	ebx
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
lea	edx, [edi+edi*4]
cmp	dword ptr [ecx+edx*4+8], 0FFFFFFFEh
lea	esi, [ecx+edx*4+8]
mov	eax, edi
mov	[esp+10h+var_4], ecx
jz	loc_73234C
mov	edx, [ecx+4]
mov	ebx, [esi+0Ch]
and	ebx, edx
mov	[esp+10h+arg_4], edx
cmp	ebx, edi
jnz	short loc_73234C
push	ebp
mov	ebp, [esp+14h+arg_0]

loc_7322D7:
mov	ebx, [esi+0Ch]
and	ebx, edx
cmp	ebx, edi
jnz	short loc_732331
mov	ebx, [esi+4]
cmp	ebx, [ebp+0]
jnz	short loc_732331
mov	edx, [ebp+4]
mov	ecx, [esi+8]
and	edx, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	edx, 8
add	ecx, 8
lea	ebx, [ebx+0]

loc_732300:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_732320
test	bl, bl
jz	short loc_73231C
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_732320
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_732300

loc_73231C:
xor	ecx, ecx
jmp	short loc_732325

loc_732320:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_732325:
test	ecx, ecx
jz	short loc_732344
mov	edx, [esp+14h+arg_4]
mov	ecx, [esp+14h+var_4]

loc_732331:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_732341
lea	esi, [eax+eax*4]
lea	esi, [ecx+esi*4+8]
jmp	short loc_7322D7

loc_732341:
or	eax, 0FFFFFFFFh

loc_732344:
pop	ebp
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	8

loc_73234C:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
pop	ecx
retn	8
sub_7322A0 endp

align 10h



sub_732360 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_694320
xor	eax, eax
mov	dword ptr [esi+2Ch], offset off_155F500
xor	ecx, ecx
xor	edx, edx
mov	[esi+3Ch], ax
mov	[esi+42h], ax
mov	dword ptr [esi+30h], 1
mov	dword ptr [esi+2Ch], offset off_143AB58
mov	dword ptr [esi+34h], 0
mov	[esi+38h], cx
mov	[esi+3Ah], dx
mov	[esi+3Eh], cx
mov	[esi+40h], dx
mov	eax, esi
pop	esi
retn	4
sub_732360 endp

align 10h



sub_7323B0 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_73242E
mov	eax, [eax+4]
push	ebx
xor	ebx, ebx
push	esi
inc	eax
push	edi
mov	[esp+14h+var_4], eax
jmp	short loc_7323D0
align 10h

loc_7323D0:
mov	eax, [ebp+0]
cmp	dword ptr [ebx+eax+8], 0FFFFFFFEh
lea	edi, [ebx+eax+8]
jz	short loc_732409
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_732403
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_732403:
mov	dword ptr [edi], 0FFFFFFFEh

loc_732409:
add	ebx, 14h
sub	[esp+14h+var_4], 1
jnz	short loc_7323D0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebx

loc_73242E:
pop	ebp
pop	ecx
retn
sub_7323B0 endp

align 10h



sub_732440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [ecx]
mov	[esp+0Ch+var_4], ecx
test	ebx, ebx
jz	loc_732506
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [ebx+4]
push	esi
mov	esi, [ecx+8]
and	esi, eax
lea	edx, [esi+esi*4]
cmp	dword ptr [ebx+edx*4+8], 0FFFFFFFEh
push	edi
lea	edi, [ebx+edx*4+8]
jz	loc_732504
mov	ecx, [edi+0Ch]
and	ecx, eax
cmp	ecx, esi
jnz	loc_732504
push	ebp
mov	[esp+18h+var_8], esi
or	ebp, 0FFFFFFFFh
jmp	short loc_732490
align 10h

loc_732490:
mov	edx, [edi+0Ch]
and	edx, [ebx+4]
cmp	edx, [esp+18h+var_8]
jnz	short loc_7324B1
mov	eax, [esp+18h+arg_0]
push	eax
lea	ecx, [edi+4]
push	ecx
call	sub_731010
add	esp, 8
test	al, al
jnz	short loc_7324C3

loc_7324B1:
mov	ebp, esi
mov	esi, [edi]
cmp	esi, 0FFFFFFFFh
jz	short loc_732503
lea	edx, [esi+esi*4]
lea	edi, [ebx+edx*4+8]
jmp	short loc_732490

loc_7324C3:
cmp	[esp+18h+var_8], esi
jnz	short loc_7324EA
mov	eax, [edi]
cmp	eax, 0FFFFFFFFh
jz	short loc_7324F4
lea	eax, [eax+eax*4]
mov	ecx, edi
lea	esi, [ebx+eax*4+8]
call	sub_731EE0
push	esi
mov	ecx, edi
call	sub_731F20
mov	edi, esi
jmp	short loc_7324F4

loc_7324EA:
mov	edx, [edi]
lea	ecx, [ebp+ebp*4+0]
mov	[ebx+ecx*4+8], edx

loc_7324F4:
mov	ecx, edi
call	sub_731EE0
mov	eax, [esp+18h+var_4]
mov	eax, [eax]
dec	dword ptr [eax]

loc_732503:
pop	ebp

loc_732504:
pop	edi
pop	esi

loc_732506:
pop	ebx
add	esp, 8
retn	4
sub_732440 endp

align 10h



sub_732510 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+14h+var_C], edi
cmp	eax, ebx
jnz	short loc_732532
call	sub_7323B0
pop	edi
pop	ebx
add	esp, 0Ch
retn	8

loc_732532:
push	esi
cmp	eax, 8
jnb	short loc_73253F
mov	esi, 8
jmp	short loc_7325A4

loc_73253F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_732552
fadd	ds:flt_15FCC08

loc_732552:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_7325A4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*4]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], ebx
mov	dword ptr [esp+20h+var_8], 144h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_732604
xor	eax, eax
jmp	short loc_7325F0
align 10h

loc_7325F0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 14h
sub	esi, 1
jnz	short loc_7325F0

loc_732604:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_732691
mov	eax, [eax+4]
inc	eax
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
mov	dword ptr [esp+1Ch+var_8], eax
jmp	short loc_732624
align 10h

loc_732620:
mov	edi, [esp+1Ch+var_C]

loc_732624:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	edi, [ebx+edx+8]
jz	short loc_73266E
mov	ecx, [edi+0Ch]
mov	edx, [esp+1Ch+arg_0]
lea	eax, [edi+4]
push	ecx
push	eax
push	edx
lea	ecx, [esp+28h+arg_4]
call	sub_732AD0
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_732668
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_732668:
mov	dword ptr [edi], 0FFFFFFFEh

loc_73266E:
add	ebx, 14h
sub	dword ptr [esp+1Ch+var_8], 1
jnz	short loc_732620
mov	ecx, dword_1855FC0
mov	eax, [esp+1Ch+var_C]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esp+1Ch+var_C]
pop	ebp

loc_732691:
mov	eax, [esp+18h+arg_4]
lea	ecx, [esp+18h+arg_4]
mov	[edi], eax
mov	[esp+18h+arg_4], 0
call	sub_7323B0
pop	esi
pop	edi
pop	ebx
add	esp, 0Ch
retn	8
sub_732510 endp

align 10h



sub_7326C0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	word ptr -38h
var_36=	word ptr -36h
var_34=	dword ptr -34h
var_30=	word ptr -30h
var_2E=	word ptr -2Eh
var_2C=	byte ptr -2Ch

sub	esp, 44h
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
push	eax
lea	ecx, [esp+4Ch+var_2C]
call	sub_694320
push	eax
mov	ecx, esi
call	sub_6C7EC0
lea	ecx, [esp+48h+var_2C]
call	sub_694380
xor	eax, eax
xor	ecx, ecx
mov	[esp+48h+var_38], ax
mov	word ptr [esp+48h+var_34+2], ax
xor	edx, edx
lea	eax, [esp+48h+var_44]
mov	[esp+48h+var_44], offset off_155F500
mov	[esp+48h+var_36], cx
mov	[esp+48h+var_30], cx
push	eax
lea	ecx, [esi+2Ch]
mov	[esp+4Ch+var_40], 1
mov	[esp+4Ch+var_44], offset off_143AB58
mov	[esp+4Ch+var_3C], 0
mov	word ptr [esp+4Ch+var_34], dx
mov	[esp+4Ch+var_2E], dx
call	sub_700370
lea	ecx, [esp+48h+var_44]
mov	[esp+48h+var_44], offset off_143AB58
call	sub_6FFB90
lea	ecx, [esp+48h+var_44]
call	sub_64A3F0
pop	esi
add	esp, 44h
retn
sub_7326C0 endp

align 10h



sub_732760 proc	near

var_85=	byte ptr -85h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_48=	byte ptr -48h
var_3C=	byte ptr -3Ch
var_30=	byte ptr -30h
var_24=	byte ptr -24h
var_18=	byte ptr -18h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 88h
mov	eax, [esp+88h+arg_0]
push	ebx
mov	ebx, [esp+8Ch+arg_8]
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+94h+arg_4]
xor	ebp, ebp
lea	edx, [eax+ecx*2]
mov	[esp+94h+var_78], eax
mov	eax, 1
push	edi
mov	[esp+98h+var_74], edx
mov	[esp+98h+var_70], 0Bh
mov	[esp+98h+var_6C], ebp
mov	[esp+98h+var_68], ebp
mov	[esp+98h+var_64], eax
mov	[esp+98h+var_60], eax
mov	[esp+98h+var_5C], ebp
mov	[esp+98h+var_58], ebp
mov	[esp+98h+var_85], 0
jmp	short loc_7327C0
align 10h

loc_7327C0:
cmp	ebp, 4
jz	loc_732A65
lea	eax, [esp+98h+var_18]
push	eax
lea	ecx, [esp+9Ch+var_78]
call	sub_731090
mov	edi, [eax]
mov	edx, [eax+4]
mov	eax, [eax+8]
mov	[esp+98h+var_84], edi
mov	[esp+98h+var_80], edx
mov	[esp+98h+var_7C], eax
cmp	edi, 0Ah
jnz	short loc_7327F8
mov	ebp, 3

loc_7327F8:
mov	ecx, ebp
sub	ecx, 0
jz	loc_73296A
sub	ecx, 1
jz	loc_7328D6
sub	ecx, 1
jnz	loc_732A65
mov	eax, edi
sub	eax, 7
jz	loc_7328A8
sub	eax, 1
jz	short loc_732881
cmp	[esi+25h], cl
jnz	short loc_73286F
push	ecx
lea	ecx, [esi+18h]
call	sub_7321E0
mov	byte ptr [esi+25h], 1
cmp	edi, 2
jnz	short loc_732861
lea	ecx, [esp+98h+var_C]
push	ecx
lea	ecx, [esp+9Ch+var_78]
call	sub_731090
mov	edx, [eax]
mov	ecx, [eax+4]
mov	[esp+98h+var_84], edx
mov	edx, [eax+8]
mov	[esp+98h+var_80], ecx
mov	[esp+98h+var_7C], edx

loc_732861:
mov	eax, [esp+98h+var_64]
mov	ecx, [esp+98h+var_60]
mov	[esi+28h], eax
mov	[esi+2Ch], ecx

loc_73286F:
lea	edx, [esp+98h+var_84]
push	edx
lea	ecx, [esi+18h]
call	sub_732240
jmp	loc_7327C0

loc_732881:
mov	ecx, [esp+98h+arg_C]
mov	eax, [ebx]
push	ecx
lea	edx, [esi+18h]
push	edx
mov	edx, [eax+0Ch]
lea	ecx, [esi+0Ch]
push	ecx
mov	ecx, ebx
call	edx
mov	byte ptr [esi+25h], 0
mov	ebp, 1
jmp	loc_7327C0

loc_7328A8:
mov	edi, [esp+98h+arg_C]
mov	eax, [ebx]
mov	eax, [eax+0Ch]
push	edi
lea	ecx, [esi+18h]
push	ecx
lea	edx, [esi+0Ch]
push	edx
mov	ecx, ebx
call	eax
mov	edx, [ebx]
mov	eax, [edx+8]
push	edi
mov	ecx, ebx
call	eax
mov	byte ptr [esi+25h], 0
xor	ebp, ebp
jmp	loc_7327C0

loc_7328D6:
mov	ecx, edi
sub	ecx, 0
jz	short loc_73290D
sub	ecx, 2
jz	loc_7327C0
sub	ecx, 5
jz	short loc_7328F5
mov	ebp, 4
jmp	loc_7327C0

loc_7328F5:
mov	edx, [ebx]
mov	eax, [esp+98h+arg_C]
mov	edx, [edx+8]
push	eax
mov	ecx, ebx
call	edx
xor	ebp, ebp
jmp	loc_7327C0

loc_73290D:
mov	[esi+0Ch], edi
mov	[esi+10h], edx
mov	[esi+14h], eax
lea	eax, [esp+98h+var_54]
push	eax
lea	ecx, [esp+9Ch+var_78]
call	sub_731090
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [eax+8]
mov	[esp+98h+var_80], edx
mov	[esp+98h+var_7C], eax
cmp	ecx, 2
jnz	short loc_732957
lea	ecx, [esp+98h+var_30]
push	ecx
lea	ecx, [esp+9Ch+var_78]
call	sub_731090
mov	edx, [eax+4]
mov	ecx, [eax]
mov	eax, [eax+8]
mov	[esp+98h+var_80], edx
mov	[esp+98h+var_7C], eax

loc_732957:
xor	edx, edx
cmp	ecx, 9
setnz	dl
lea	edx, [edx+edx+2]
mov	ebp, edx
jmp	loc_7327C0

loc_73296A:
mov	ecx, edi
sub	ecx, 0
jz	short loc_732994
sub	ecx, 2
jz	short loc_732980
mov	ebp, 4
jmp	loc_7327C0

loc_732980:
cmp	byte ptr [esi+24h], 0
jz	loc_7327C0
mov	ebp, 4
jmp	loc_7327C0

loc_732994:
cmp	byte ptr [esi+24h], 0
jnz	short loc_7329D4
mov	[esi], edi
mov	[esi+4], edx
mov	[esi+8], eax
lea	eax, [esp+98h+var_48]
push	eax
lea	ecx, [esp+9Ch+var_78]
call	sub_731090
mov	edi, [eax]
mov	ecx, [eax+4]
mov	eax, [eax+8]
mov	[esp+98h+var_80], ecx
cmp	edi, 9
jnz	short loc_7329CD
add	[esi+8], eax
mov	byte ptr [esi+24h], 1
jmp	loc_7327C0

loc_7329CD:
mov	[esp+98h+var_85], 1
jmp	short loc_7329D7

loc_7329D4:
add	[esi+8], eax

loc_7329D7:
mov	eax, [esp+98h+arg_C]
mov	edx, [ebx]
mov	edx, [edx+4]
push	eax
push	esi
mov	ecx, ebx
call	edx
cmp	[esp+98h+var_85], 0
jnz	short loc_732A10
lea	eax, [esp+98h+var_3C]
push	eax
lea	ecx, [esp+9Ch+var_78]
call	sub_731090
mov	ecx, [eax+4]
mov	edx, [eax+8]
mov	edi, [eax]
mov	[esp+98h+var_80], ecx
mov	[esp+98h+var_7C], edx
jmp	short loc_732A15

loc_732A10:
mov	[esp+98h+var_85], 0

loc_732A15:
cmp	edi, 2
jnz	short loc_732A38
lea	eax, [esp+98h+var_24]
push	eax
lea	ecx, [esp+9Ch+var_78]
call	sub_731090
mov	ecx, [eax+4]
mov	edx, [eax+8]
mov	edi, [eax]
mov	[esp+98h+var_80], ecx
mov	[esp+98h+var_7C], edx

loc_732A38:
sub	edi, 5
jz	short loc_732A5A
sub	edi, 1
jz	short loc_732A4C
mov	ebp, 4
jmp	loc_7327C0

loc_732A4C:
mov	ebp, 1
mov	byte ptr [esi+24h], 0
jmp	loc_7327C0

loc_732A5A:
xor	ebp, ebp
mov	byte ptr [esi+24h], 0
jmp	loc_7327C0

loc_732A65:
pop	edi
pop	esi
cmp	ebp, 3
pop	ebp
setz	al
pop	ebx
add	esp, 88h
retn	10h
sub_732760 endp

align 10h



sub_732A80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
push	edi
xor	edi, edi
cmp	eax, edi
jbe	short loc_732AB9
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_732AC7
mov	eax, [esi]
cmp	eax, edi
jz	short loc_732AAE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_732AAE:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn	4

loc_732AB9:
cmp	[esi+8], edi
ja	short loc_732AC7
push	edi
push	esi
mov	ecx, esi
call	sub_714BE0

loc_732AC7:
mov	[esi+4], edi
pop	edi
pop	esi
retn	4
sub_732A80 endp

align 10h



sub_732AD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_732AE3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_732B05

loc_732AE3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_732B0A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_732B05:
call	sub_732510

loc_732B0A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	edx, [esi]
lea	ecx, [eax+eax*4]
lea	esi, [edx+ecx*4+8]
mov	ecx, 0FFFFFFFEh
cmp	[esi], ecx
jnz	short loc_732B53
mov	edi, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	edx, [edi]
lea	eax, [edi+4]
push	eax
lea	ecx, [esi+8]
mov	[esi+4], edx
call	sub_67ABE0
mov	ecx, [edi+8]
mov	[esi+0Ch], ecx
mov	edx, [edi+0Ch]
pop	edi
mov	[esi+10h], edx
pop	esi
retn	0Ch

loc_732B53:
push	ebx
push	ebp
mov	ebp, [edx+4]
mov	edi, eax
lea	ebx, [ebx+0]

loc_732B60:
inc	edi
and	edi, ebp
lea	ebx, [edi+edi*4]
cmp	[edx+ebx*4+8], ecx
jnz	short loc_732B60
mov	ebx, [esi+0Ch]
and	ebx, ebp
lea	ecx, [edi+edi*4]
lea	ecx, [edx+ecx*4+8]
cmp	ebx, eax
jnz	short loc_732BB0
test	ecx, ecx
jz	short loc_732B86
push	esi
call	sub_731F20

loc_732B86:
mov	ebx, [esp+10h+arg_4]
mov	edx, [ebx]
lea	eax, [ebx+4]
push	eax
lea	ecx, [esi+8]
mov	[esi+4], edx
call	sub_67A3D0
mov	ecx, [ebx+8]
mov	[esi+0Ch], ecx
mov	edx, [ebx+0Ch]
pop	ebp
mov	[esi+10h], edx
pop	ebx
mov	[esi], edi
pop	edi
pop	esi
retn	0Ch

loc_732BB0:
lea	ebx, [ebx+ebx*4]
cmp	[edx+ebx*4+8], eax
lea	ebx, [edx+ebx*4+8]
jz	short loc_732BCF
lea	ecx, [ecx+0]

loc_732BC0:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*4]
cmp	[edx+ebx*4+8], eax
lea	ebx, [edx+ebx*4+8]
jnz	short loc_732BC0

loc_732BCF:
test	ecx, ecx
jz	short loc_732BD9
push	esi
call	sub_731F20

loc_732BD9:
mov	[ebx], edi
mov	edi, [esp+10h+arg_4]
mov	eax, [edi]
lea	ecx, [edi+4]
push	ecx
lea	ecx, [esi+8]
mov	[esi+4], eax
call	sub_67A3D0
mov	edx, [edi+8]
pop	ebp
mov	[esi+0Ch], edx
mov	eax, [edi+0Ch]
pop	ebx
mov	[esi+10h], eax
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_732AD0 endp

align 10h



sub_732C10 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
mov	edx, ecx
mov	eax, [edx]
push	ebp
push	esi
push	edi
mov	[esp+14h+var_4], edx
test	eax, eax
jnz	short loc_732C27
xor	ebp, ebp
xor	esi, esi
jmp	short loc_732C40

loc_732C27:
xor	esi, esi
lea	ecx, [eax+8]
lea	esp, [esp+0]

loc_732C30:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_732C3E
inc	esi
add	ecx, 14h
cmp	esi, [eax+4]
jbe	short loc_732C30

loc_732C3E:
mov	ebp, edx

loc_732C40:
test	ebp, ebp
jz	short loc_732CB0
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_732CB0
cmp	esi, [eax+4]
jg	short loc_732CB0
lea	ecx, [esi+esi*4]
mov	edi, [eax+ecx*4+18h]
test	edi, edi
jz	short loc_732C8B
lea	ebx, [edi+2Ch]
mov	ecx, ebx
mov	dword ptr [ebx], offset	off_143AB58
call	sub_6FFB90
mov	ecx, ebx
call	sub_64A3F0
mov	ecx, edi
call	sub_694380
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
mov	edx, [esp+14h+var_4]

loc_732C8B:
mov	ecx, [ebp+0]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_732C40
inc	esi
cmp	esi, eax
ja	short loc_732C40
lea	edi, [esi+esi*4]
lea	ecx, [ecx+edi*4+8]

loc_732CA1:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_732C40
inc	esi
add	ecx, 14h
cmp	esi, eax
jbe	short loc_732CA1
jmp	short loc_732C40

loc_732CB0:
pop	edi
pop	esi
pop	ebp
mov	ecx, edx
pop	ebx
add	esp, 4
jmp	sub_7323B0
sub_732C10 endp

align 10h



sub_732CC0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 44h
xor	eax, eax
push	ebx
mov	[esp+48h+var_2C], eax
mov	[esp+48h+var_28], eax
mov	[esp+48h+var_20], eax
mov	[esp+48h+var_1C], eax
mov	[esp+48h+var_18], eax
mov	[esp+48h+var_14], eax
mov	[esp+48h+var_10], eax
mov	[esp+48h+var_C], al
mov	[esp+48h+var_B], al
mov	[esp+48h+var_3C], eax
mov	[esp+48h+var_38], eax
mov	[esp+48h+var_34], eax
mov	edx, 0Bh
mov	[esp+48h+var_40], ecx
lea	eax, [esp+48h+var_3C]
push	eax
mov	eax, [esp+4Ch+arg_0]
lea	ecx, [esp+4Ch+var_44]
push	ecx
mov	[esp+50h+var_30], edx
mov	[esp+50h+var_24], edx
mov	edx, [esp+50h+arg_4]
push	edx
push	eax
lea	ecx, [esp+58h+var_30]
mov	[esp+58h+var_44], offset off_14406E8
call	sub_732760
mov	ecx, dword_1855FC0
mov	bl, al
mov	eax, [esp+48h+var_3C]
mov	[esp+48h+var_44], offset off_14406D8
mov	edx, [ecx]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+48h+var_18]
mov	eax, [eax+30h]
push	edx
call	eax
mov	al, bl
pop	ebx
add	esp, 44h
retn	8
sub_732CC0 endp

align 10h



sub_732D70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_732D84
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_732DA6

loc_732D84:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_732DAB
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_732DA6:
call	sub_732510

loc_732DAB:
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	edx, [esi]
lea	ecx, [eax+eax*4]
lea	esi, [edx+ecx*4+8]
mov	ecx, 0FFFFFFFEh
cmp	[esi], ecx
jnz	short loc_732DF9
mov	ebx, [esp+0Ch+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	edi, [ebx]
mov	edx, [edi]
lea	eax, [edi+4]
push	eax
lea	ecx, [esi+8]
mov	[esi+4], edx
call	sub_67ABE0
mov	ecx, [edi+8]
mov	[esi+0Ch], ecx
mov	edx, [ebx+4]
mov	eax, [edx]
pop	edi
mov	[esi+10h], eax
pop	esi
pop	ebx
retn	0Ch

loc_732DF9:
push	ebp
mov	ebp, [edx+4]
mov	edi, eax
nop

loc_732E00:
inc	edi
and	edi, ebp
lea	ebx, [edi+edi*4]
cmp	[edx+ebx*4+8], ecx
jnz	short loc_732E00
mov	ebx, [esi+0Ch]
and	ebx, ebp
lea	ecx, [edi+edi*4]
lea	ecx, [edx+ecx*4+8]
cmp	ebx, eax
jnz	short loc_732E55
test	ecx, ecx
jz	short loc_732E26
push	esi
call	sub_731F20

loc_732E26:
mov	ebp, [esp+10h+arg_4]
mov	ebx, [ebp+0]
mov	edx, [ebx]
lea	eax, [ebx+4]
push	eax
lea	ecx, [esi+8]
mov	[esi+4], edx
call	sub_67A3D0
mov	ecx, [ebx+8]
mov	[esi+0Ch], ecx
mov	edx, [ebp+4]
mov	eax, [edx]
pop	ebp
mov	[esi+10h], eax
mov	[esi], edi
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_732E55:
lea	ebx, [ebx+ebx*4]
cmp	[edx+ebx*4+8], eax
lea	ebx, [edx+ebx*4+8]
jz	short loc_732E71

loc_732E62:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*4]
cmp	[edx+ebx*4+8], eax
lea	ebx, [edx+ebx*4+8]
jnz	short loc_732E62

loc_732E71:
test	ecx, ecx
jz	short loc_732E7B
push	esi
call	sub_731F20

loc_732E7B:
mov	[ebx], edi
mov	ebx, [esp+10h+arg_4]
mov	edi, [ebx]
mov	ecx, [edi]
lea	edx, [edi+4]
mov	[esi+4], ecx
push	edx
lea	ecx, [esi+8]
call	sub_67A3D0
mov	eax, [edi+8]
mov	[esi+0Ch], eax
mov	ecx, [ebx+4]
mov	edx, [ecx]
pop	ebp
mov	[esi+10h], edx
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
pop	ebx
retn	0Ch
sub_732D70 endp

align 10h



sub_732EB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+28h]
push	0
lea	edx, [ebx+ebx+2]
push	edx
call	eax
mov	ecx, [esp+0Ch+arg_0]
push	ebx
mov	esi, eax
push	ecx
push	esi
call	sub_67BBC0
push	eax
push	esi
mov	ecx, edi
call	sub_732CC0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	bl, al
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi
pop	esi
mov	al, bl
pop	ebx
retn	8
sub_732EB0 endp

align 10h


; Attributes: thunk

sub_732F00 proc	near
jmp	sub_732CC0
sub_732F00 endp

align 10h



sub_732F10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+4]
push	ebx
lea	ecx, [esi+4]
mov	[esi], eax
call	sub_67A3D0
mov	eax, [ebx]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679AD0
mov	edx, [esi]
add	edx, eax
mov	[esi+8], edx
mov	ebx, [edi]
test	ebx, ebx
jz	short loc_732F83
mov	eax, [ebx+4]
and	eax, edx
push	eax
push	esi
mov	ecx, edi
call	sub_7322A0
test	eax, eax
jl	short loc_732F83
lea	ecx, [eax+eax*4]
lea	eax, [ebx+ecx*4+0Ch]
test	eax, eax
jz	short loc_732F83
add	eax, 0Ch
jz	short loc_732F83
mov	eax, [eax]
pop	edi
pop	esi
pop	ebx
retn	8

loc_732F83:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	8
sub_732F10 endp

align 10h



sub_732F90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	esi
push	edi
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_732FAF
mov	eax, edx
lea	edi, [eax+1]

loc_732FA6:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_732FA6
sub	eax, edi

loc_732FAF:
push	eax
push	edx
lea	ecx, [esp+10h+arg_8]
call	sub_67AF00
mov	ecx, [esp+8+arg_0]
lea	eax, [esp+8+arg_8]
push	eax
push	ecx
mov	ecx, esi
call	sub_732F10
mov	esi, [esp+8+arg_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
mov	edi, eax
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_732FF3
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_732FF3:
mov	eax, edi
pop	edi
pop	esi
retn	0Ch
sub_732F90 endp

align 10h



sub_733000 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_8]
push	edi
mov	edi, ecx
cmp	esi, 0FFFFFFFFh
jnz	short loc_73301D
push	ebx
call	sub_67B340
add	esp, 4
mov	esi, eax

loc_73301D:
lea	ecx, [esp+0Ch+arg_8]
call	sub_679E30
push	esi
push	ebx
lea	ecx, [esp+14h+arg_8]
call	sub_67A000
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+arg_8]
push	eax
push	ecx
mov	ecx, edi
call	sub_732F10
mov	esi, [esp+0Ch+arg_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
mov	edi, eax
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73306A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_73306A:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_733000 endp

align 10h



sub_733080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+4]
push	ebx
lea	ecx, [esi+4]
mov	[esi], eax
call	sub_67A3D0
mov	eax, [ebx]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679AD0
mov	edx, [esi]
add	edx, eax
mov	[esi+8], edx
mov	ebx, [edi]
test	ebx, ebx
jz	short loc_733128
mov	eax, [ebx+4]
and	eax, edx
push	eax
push	esi
mov	ecx, edi
call	sub_7322A0
test	eax, eax
jl	short loc_733128
lea	ecx, [eax+eax*4]
lea	eax, [ebx+ecx*4+0Ch]
test	eax, eax
jz	short loc_733128
add	eax, 0Ch
jz	short loc_733128
mov	ebx, [eax]
test	ebx, ebx
jz	short loc_733120
push	ebp
lea	ebp, [ebx+2Ch]
mov	ecx, ebp
mov	dword ptr [ebp+0], offset off_143AB58
call	sub_6FFB90
mov	ecx, ebp
call	sub_64A3F0
mov	ecx, ebx
call	sub_694380
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
pop	ebp

loc_733120:
push	esi
mov	ecx, edi
call	sub_732440

loc_733128:
pop	edi
pop	esi
pop	ebx
retn	8
sub_733080 endp

align 10h



sub_733130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	esi
push	edi
mov	edi, ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_73314F
mov	eax, edx
lea	esi, [eax+1]

loc_733146:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_733146
sub	eax, esi

loc_73314F:
push	eax
push	edx
lea	ecx, [esp+10h+arg_8]
call	sub_67AF00
mov	ecx, [esp+8+arg_0]
lea	eax, [esp+8+arg_8]
push	eax
push	ecx
mov	ecx, edi
call	sub_733080
mov	esi, [esp+8+arg_8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_733191
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_733191:
pop	edi
pop	esi
retn	0Ch
sub_733130 endp

align 10h



sub_7331A0 proc	near
push	esi
push	edi
mov	edi, ecx
call	sub_732C10
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7331CE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7331CE:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_7323B0
sub_7331A0 endp

align 10h



sub_7331E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	ebp, ecx
push	edi
lea	ecx, [esp+20h+var_10]
call	sub_679E30
mov	ecx, [esp+20h+arg_0]
mov	eax, [ecx+8]
xor	edi, edi
test	eax, eax
jbe	short loc_733215
mov	edx, [ecx+4]
cmp	word ptr [edx],	2Eh
jnz	short loc_733215
dec	eax
push	eax
add	edx, 2
mov	edi, 1
push	edx
jmp	short loc_73321A

loc_733215:
push	eax
mov	eax, [ecx+4]
push	eax

loc_73321A:
lea	ecx, [esp+28h+var_10]
call	sub_67A000
mov	eax, [ebp+4]
lea	esi, [eax+4]
lea	ecx, [esp+20h+var_10]
push	ecx
lea	ecx, [esi+4]
mov	[esi], edi
call	sub_67A3D0
mov	eax, [esp+20h+var_10]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	ecx, [edx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679AD0
mov	ecx, [esi]
add	ecx, eax
mov	[esi+8], ecx
mov	ebx, [ebp+4]
mov	edi, [ebx]
test	edi, edi
jz	short loc_733297
mov	edx, [edi+4]
and	edx, ecx
push	edx
push	esi
mov	ecx, ebx
call	sub_7322A0
test	eax, eax
jl	short loc_733297
lea	eax, [eax+eax*4]
lea	eax, [edi+eax*4+0Ch]
test	eax, eax
jz	short loc_733297
add	eax, 0Ch
jz	short loc_733297
mov	eax, [eax]
mov	[esp+20h+arg_0], eax
test	eax, eax
jnz	short loc_7332F8

loc_733297:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	ebx
call	eax
mov	edi, eax
mov	edx, [edi]
mov	eax, [edx+28h]
push	0
push	44h
mov	ecx, edi
call	eax
test	eax, eax
jz	short loc_7332C6
push	edi
mov	ecx, eax
call	sub_732360
mov	[esp+20h+arg_0], eax
jmp	short loc_7332CE

loc_7332C6:
mov	[esp+20h+arg_0], 0

loc_7332CE:
mov	ecx, [esp+20h+arg_0]
mov	ebp, [ebp+4]
mov	[esp+20h+var_C], ecx
mov	eax, [esi+8]
push	eax
lea	ecx, [esp+24h+var_8]
push	ecx
lea	edx, [esp+28h+var_C]
push	ebp
mov	ecx, ebp
mov	[esp+2Ch+var_8], esi
mov	[esp+2Ch+var_4], edx
call	sub_732D70
jmp	short loc_7332FF

loc_7332F8:
mov	ecx, eax
call	sub_7326C0

loc_7332FF:
mov	edi, [esp+20h+arg_4]
mov	eax, [edi+4]
lea	esi, [eax+1]
cmp	esi, eax
jnb	short loc_733319
mov	edx, [edi+8]
shr	edx, 1
cmp	esi, edx
jnb	short loc_73332E
push	esi
jmp	short loc_733326

loc_733319:
cmp	esi, [edi+8]
jb	short loc_73332E
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax

loc_733326:
push	edi
mov	ecx, edi
call	sub_714BE0

loc_73332E:
mov	ecx, [edi]
mov	[edi+4], esi
lea	esi, [ecx+esi*4-4]
test	esi, esi
jz	short loc_733341
mov	edx, [esp+20h+arg_0]
mov	[esi], edx

loc_733341:
mov	esi, [esp+20h+var_10]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_733367
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_733367:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_7331E0 endp

align 10h



sub_733380 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_73338E
call	sub_666B00

loc_73338E:
mov	ecx, [esi+4]
pop	esi
test	ecx, ecx
jz	short locret_73339B
jmp	sub_666B00

locret_73339B:
retn
sub_733380 endp

align 10h



sub_7333A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_7333DE
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_6ABAD0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_7333F7
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_714BE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_7333DE:
cmp	esi, [edi+8]
jb	short loc_7333F7
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_714BE0

loc_7333F7:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_7333A0 endp

align 10h



; int __stdcall	sub_733400(int,	char *,	int, int, int, int)
sub_733400 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 34h
mov	eax, [ecx+0Ch]
push	ebx
mov	ebx, [esp+38h+arg_8]
mov	[esp+38h+var_1C], ecx
xor	ecx, ecx
and	ebx, 313h
cmp	eax, ecx
jnz	short loc_733424
xor	al, al
pop	ebx
add	esp, 34h
retn	18h

loc_733424:
push	ebp
push	esi
push	edi
mov	[esp+44h+var_30], ecx
mov	[esp+44h+var_34], ecx
mov	byte ptr [esp+44h+arg_8], cl
mov	[esp+44h+var_2C], ecx
cmp	[eax+4], ecx
jbe	loc_733718

loc_733440:
cmp	byte ptr [esp+44h+arg_8], 0
jnz	loc_7334ED
mov	eax, [eax]
mov	esi, [eax+ecx*4]
mov	ecx, [esi+20h]
mov	[esp+44h+var_34], esi
call	sub_6AB3B0
mov	eax, [esi+20h]
mov	edi, [eax+0A4h]
add	eax, 0A4h
test	edi, edi
jz	short loc_7334C9
mov	esi, ebx
and	esi, 300h
neg	esi
sbb	esi, esi
and	esi, 300h
mov	ecx, ebx
and	ecx, 10h
or	esi, ecx
mov	ebp, ebx
or	esi, 3
and	ebp, 313h

loc_733492:
mov	ecx, [edi+4]
mov	edx, [ecx+14h]
and	edx, esi
cmp	edx, ebp
jnz	short loc_7334B4
mov	eax, [esp+44h+arg_4]
mov	edx, [ecx]
push	eax		; char *
mov	eax, [edx+3Ch]
call	eax
push	eax		; char *
call	sub_679A10
test	eax, eax
jz	short loc_7334BD

loc_7334B4:
mov	edi, [edi+0Ch]
test	edi, edi
jnz	short loc_733492
jmp	short loc_7334C9

loc_7334BD:
mov	ecx, [edi+8]
mov	[esp+44h+var_30], ecx
mov	byte ptr [esp+44h+arg_8], 1

loc_7334C9:
mov	ecx, [esp+44h+var_2C]
mov	edx, [esp+44h+var_1C]
mov	eax, [edx+0Ch]
inc	ecx
mov	[esp+44h+var_2C], ecx
cmp	ecx, [eax+4]
jb	loc_733440
cmp	byte ptr [esp+44h+arg_8], 0
jz	loc_733718

loc_7334ED:
mov	edi, [esp+44h+arg_C]
xor	ebp, ebp
cmp	edi, ebp
jz	short loc_733554
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
push	54h
call	edx
cmp	eax, ebp
jz	short loc_733523
mov	ecx, [edi+18h]
mov	edx, [edi+14h]
push	ecx
mov	ecx, [esp+48h+arg_10]
push	ecx
push	edx
mov	ecx, eax
call	sub_6FDCA0
mov	esi, eax
jmp	short loc_733525

loc_733523:
xor	esi, esi

loc_733525:
mov	edx, [edi+1Ch]
mov	eax, [edx+14h]
push	ebp
or	eax, 1
push	eax
mov	eax, [esp+4Ch+var_34]
push	eax
push	esi
call	sub_703F50
add	esp, 10h
mov	edi, eax
cmp	esi, ebp
jz	loc_733659
mov	ecx, esi
call	sub_64A430
jmp	loc_733659

loc_733554:
mov	edi, [esp+44h+arg_14]
cmp	edi, ebp
jz	loc_733718
mov	esi, [esp+44h+arg_10]
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	1Dh
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	[esp+38h+var_14], eax
mov	eax, [edx+0Ch]
push	1Eh
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	[esp+38h+var_18], eax
mov	eax, [edx+0Ch]
push	0Ah
mov	ecx, esi
call	eax
lea	ecx, [esp+38h+var_14]
push	ecx
lea	edx, [esp+3Ch+var_18]
mov	[esp+3Ch+var_1C], eax
push	edx
lea	eax, [esp+40h+var_1C]
push	eax
lea	ecx, [esp+44h+var_4]
call	sub_7030F0
mov	ecx, [esp+38h+var_1C]
cmp	ecx, ebp
jz	short loc_7335B6
call	sub_64A430

loc_7335B6:
mov	ecx, [esp+38h+var_18]
cmp	ecx, ebp
jz	short loc_7335C3
call	sub_64A430

loc_7335C3:
mov	ecx, [esp+38h+var_14]
cmp	ecx, ebp
jz	short loc_7335D0
call	sub_64A430

loc_7335D0:
mov	ecx, [edi+8]
push	ecx
lea	ecx, [esp+3Ch+var_4]
call	sub_702CE0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	2Ch
call	eax
cmp	eax, ebp
jz	short loc_7335FD
push	esi
mov	ecx, eax
call	sub_6FCD00
mov	ebx, eax
jmp	short loc_7335FF

loc_7335FD:
xor	ebx, ebx

loc_7335FF:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	54h
call	eax
cmp	eax, ebp
jz	short loc_733625
mov	ecx, [esp+44h+var_C]
push	ebx
push	esi
push	ecx
mov	ecx, eax
call	sub_6FDCA0
mov	esi, eax
jmp	short loc_733627

loc_733625:
xor	esi, esi

loc_733627:
mov	edx, [esp+44h+var_34]
push	ebp
push	1
push	edx
push	esi
call	sub_703F50
add	esp, 10h
mov	edi, eax
cmp	esi, ebp
jz	short loc_733645
mov	ecx, esi
call	sub_64A430

loc_733645:
cmp	ebx, ebp
jz	short loc_733650
mov	ecx, ebx
call	sub_64A430

loc_733650:
lea	ecx, [esp+44h+var_10]
call	sub_702950

loc_733659:
cmp	edi, ebp
jz	loc_733718
mov	[esp+44h+var_18], ebp
mov	[esp+44h+var_14], ebp
mov	ecx, [edi+1Ch]
mov	al, [ecx+3Ch]
add	ecx, 18h
test	al, al
mov	eax, [esp+44h+var_30]
jz	short loc_7336AE
mov	edx, [ecx+4]
cmp	eax, edx
jnb	short loc_7336AE
mov	ecx, [ecx+8]
lea	esi, [ecx+eax*8]
mov	ecx, [esi]
cmp	ecx, ebp
jz	short loc_73369F
call	sub_64A420
mov	ecx, [esp+44h+var_18]
cmp	ecx, ebp
jz	short loc_73369F
call	sub_666B00

loc_73369F:
mov	ebp, [esi]
mov	[esp+44h+var_18], ebp
mov	edx, [esi+4]
mov	[esp+44h+var_14], edx
jmp	short loc_7336BD

loc_7336AE:
push	eax
lea	eax, [esp+48h+var_18]
push	eax
call	sub_714030
mov	ebp, [esp+44h+var_18]

loc_7336BD:
mov	ecx, edi
test	ebp, ebp
jz	short loc_733713
call	sub_64A420
test	ebp, ebp
jz	short loc_7336D3
mov	ecx, ebp
call	sub_64A420

loc_7336D3:
mov	esi, [esp+44h+arg_0]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7336E2
call	sub_666B00

loc_7336E2:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_7336EE
call	sub_666B00

loc_7336EE:
mov	ecx, [esp+44h+var_18]
mov	[esi], edi
mov	[esi+4], ebp
test	ecx, ecx
jz	short loc_733700
call	sub_666B00

loc_733700:
mov	ecx, edi
call	sub_666B00
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 34h
retn	18h

loc_733713:
call	sub_666B00

loc_733718:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 34h
retn	18h
sub_733400 endp

align 10h



sub_733730 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, ecx
cmp	dword ptr [esi+0Ch], 0
jz	short loc_7337A3
push	ebx
mov	ebx, [esp+8+arg_0]
test	ebx, ebx
jz	short loc_7337A2
mov	eax, [ebx+1Ch]
push	edi
mov	edi, [eax+0Ch]
test	edi, edi
jz	short loc_733754
mov	ecx, edi
call	sub_64A420

loc_733754:
mov	esi, [esi+0Ch]
mov	ecx, [esi+4]
inc	ecx
push	ecx
push	esi
mov	ecx, esi
call	sub_7333A0
mov	edx, [esi+4]
mov	eax, [esi]
lea	esi, [eax+edx*4-4]
test	esi, esi
jz	short loc_73377E
test	edi, edi
jz	short loc_73377C
mov	ecx, edi
call	sub_64A420

loc_73377C:
mov	[esi], edi

loc_73377E:
test	edi, edi
jz	short loc_733789
mov	ecx, edi
call	sub_666B00

loc_733789:
cmp	[esp+0Ch+arg_4], 0
pop	edi
jz	short loc_7337A2
cmp	dword ptr [ebx+8], 0
jz	short loc_7337A2
mov	ecx, [ebx+8]
mov	edx, [ecx]
mov	eax, [edx+8]
push	ebx
call	eax

loc_7337A2:
pop	ebx

loc_7337A3:
pop	esi
retn	8
sub_733730 endp

align 10h



sub_7337B0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 13h
mov	dword ptr [esi], offset	off_144078C
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0Ch
call	edx
test	eax, eax
jz	short loc_7337FD
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 0
mov	[esi+0Ch], eax
mov	eax, esi
pop	esi
retn

loc_7337FD:
xor	eax, eax
mov	[esi+0Ch], eax
mov	eax, esi
pop	esi
retn
sub_7337B0 endp

align 10h



sub_733810 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+0Ch]
mov	dword ptr [esi], offset	off_144078C
test	edi, edi
jz	short loc_733836
mov	ecx, edi
call	sub_6AC570
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_733836:
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_733858
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_733858:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_733810 endp

align 10h


; Attributes: bp-based frame

sub_733860 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 14h
mov	eax, [ecx+0Ch]
push	ebx
push	esi
push	edi
mov	[esp+20h+var_C], ecx
test	eax, eax
jz	loc_733927
xor	esi, esi
mov	[esp+20h+var_10], esi
cmp	[eax+4], esi
jbe	loc_733927
mov	ebx, [ebp+arg_0]
lea	ecx, [ecx+0]

loc_733890:
mov	eax, [eax]
mov	edi, [eax+esi*4]
mov	ecx, [edi+20h]
call	sub_6AB3B0
mov	eax, [edi+20h]
mov	edi, [eax+0A4h]
add	eax, 0A4h
test	edi, edi
jz	short loc_733912
lea	ecx, [esp+20h+var_14]
mov	edx, ecx
mov	[esp+20h+var_8], ecx
mov	[esp+20h+var_4], edx
lea	ecx, [ecx+0]

loc_7338C0:
mov	ecx, [edi+4]
mov	eax, [ecx]
mov	edx, [eax+3Ch]
call	edx
push	eax
lea	ecx, [esp+24h+var_14]
call	sub_67AE10
lea	eax, [esp+20h+var_8]
push	eax
push	ebx
mov	ecx, ebx
call	sub_6CC0C0
mov	esi, [esp+20h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_733907
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_733907:
mov	edi, [edi+0Ch]
test	edi, edi
jnz	short loc_7338C0
mov	esi, [esp+20h+var_10]

loc_733912:
mov	ecx, [esp+20h+var_C]
mov	eax, [ecx+0Ch]
inc	esi
mov	[esp+20h+var_10], esi
cmp	esi, [eax+4]
jb	loc_733890

loc_733927:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_733860 endp




sub_733930 proc	near

arg_0= dword ptr  4

mov	edx, [ecx]
mov	eax, [esp+arg_0]
cmp	edx, [eax]
jnz	short loc_73397C
mov	dx, [ecx+4]
cmp	dx, [eax+4]
jnz	short loc_73397C
mov	dl, [ecx+6]
cmp	dl, [eax+6]
jnz	short loc_73397C
mov	dl, [ecx+7]
cmp	dl, [eax+7]
jnz	short loc_73397C
mov	dl, [ecx+8]
cmp	dl, [eax+8]
jnz	short loc_73397C
mov	dl, [ecx+9]
cmp	dl, [eax+9]
jnz	short loc_73397C
mov	dl, [ecx+0Ah]
cmp	dl, [eax+0Ah]
jnz	short loc_73397C
mov	cl, [ecx+0Bh]
cmp	cl, [eax+0Bh]
jnz	short loc_73397C
mov	eax, 1
retn	4

loc_73397C:
xor	eax, eax
retn	4
sub_733930 endp

align 10h



sub_733990 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+8]
shr	edx, 1Fh
and	dl, 1
jz	short loc_7339B0
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_7339B0
or	eax, 0FFFFFFFFh

loc_7339B0:
push	esi
mov	esi, [esp+4+arg_4]
cmp	esi, eax
jl	short loc_7339D9
test	dl, dl
jz	short loc_7339C3
movzx	ecx, byte ptr [ecx+0Bh]
jmp	short loc_7339C6

loc_7339C3:
mov	ecx, [ecx+20h]

loc_7339C6:
add	ecx, eax
cmp	esi, ecx
jge	short loc_7339D9
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setl	cl
pop	esi
mov	eax, ecx
retn

loc_7339D9:
sub	eax, esi
xor	ecx, ecx
test	eax, eax
setl	cl
pop	esi
mov	eax, ecx
retn
sub_733990 endp

align 10h



; int __cdecl sub_7339F0(int, float)
sub_7339F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
mov	eax, [edx+10h]
mov	ecx, [edx]
mov	[esp+arg_0], eax
fild	[esp+arg_0]
shr	ecx, 1Fh
and	cl, 1
fstp	[esp+arg_0]
fld	[esp+arg_4]
fld	[esp+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_733A5D
test	cl, cl
jz	short loc_733A26
movzx	eax, word ptr [edx+16h]
jmp	short loc_733A29

loc_733A26:
mov	eax, [edx+18h]

loc_733A29:
mov	[esp+arg_0], eax
test	cl, cl
jz	short loc_733A3B
movsx	ecx, byte ptr [edx+1Dh]
mov	[esp+arg_4], ecx
jmp	short loc_733A43

loc_733A3B:
movsx	edx, word ptr [edx+28h]
mov	[esp+arg_4], edx

loc_733A43:
fild	[esp+arg_0]
fadd	st, st(1)
fiadd	[esp+arg_4]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_733A5D
fstp	st(1)
xor	eax, eax
fstp	st
retn

loc_733A5D:
fsubrp	st(1), st
jmp	__ftol2_sse
sub_7339F0 endp

align 10h



; int __cdecl sub_733A70(int, float)
sub_733A70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_4]
mov	eax, [esp+arg_0]
push	ecx		; float
fstp	[esp+4+var_4]
push	eax		; int
call	sub_7339F0
xor	ecx, ecx
add	esp, 8
test	eax, eax
setl	cl
mov	eax, ecx
retn
sub_733A70 endp

align 10h



; int __stdcall	sub_733A90(float)
sub_733A90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld	[esp+4+arg_0]
push	esi
push	edi
mov	edi, 1Fh
xor	esi, esi

loc_733A9E:
lea	edx, [edi+esi]
sar	edx, 1
fld	dword ptr [ecx+edx*4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_733AB3
mov	edi, edx
jmp	short loc_733AB5

loc_733AB3:
mov	esi, edx

loc_733AB5:
mov	eax, edi
sub	eax, esi
cmp	eax, 1
jg	short loc_733A9E
fld	dword ptr [ecx+esi*4]
fstp	[esp+0Ch+arg_0]
fld	dword ptr [ecx+edi*4]
pop	edi
fstp	[esp+8+var_4]
pop	esi
fld	st
fld	[esp+4+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+4+var_4]
fld	st
fsubrp	st(4), st
fxch	st(2)
fcomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 5
jp	short loc_733AFA
fstp	st
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
pop	ecx
retn	4

loc_733AFA:
fstp	st(1)
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
pop	ecx
retn	4
sub_733A90 endp

align 10h



sub_733B10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fldz
mov	ecx, [esp+arg_0]
push	ebx
fld	st
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
xor	esi, esi
cmp	edi, 4
jl	loc_733BAE
push	ebp
lea	ebp, [edi-4]
shr	ebp, 2
inc	ebp
lea	eax, ds:0[ebp*4]
lea	ebx, [esi+2]
lea	esi, [ecx+8]
mov	[esp+10h+arg_4], eax

loc_733B43:
lea	eax, [ebx-1]
fld	dword ptr [esi-8]
cdq
idiv	edi
mov	eax, ebx
add	esi, 20h
fmul	dword ptr [ecx+edx*8+4]
faddp	st(1), st
fld	dword ptr [esi-24h]
fmul	dword ptr [ecx+edx*8]
cdq
idiv	edi
fsubp	st(1), st
lea	eax, [ebx+1]
fld	dword ptr [ecx+edx*8+4]
fmul	dword ptr [esi-20h]
faddp	st(1), st
fld	dword ptr [esi-1Ch]
fmul	dword ptr [ecx+edx*8]
cdq
idiv	edi
fsubp	st(1), st
fld	dword ptr [esi-18h]
lea	eax, [ebx+2]
add	ebx, 4
fmul	dword ptr [ecx+edx*8+4]
faddp	st(1), st
fld	dword ptr [esi-14h]
fmul	dword ptr [ecx+edx*8]
cdq
idiv	edi
fsubp	st(1), st
fld	dword ptr [esi-10h]
sub	ebp, 1
fmul	dword ptr [ecx+edx*8+4]
faddp	st(1), st
fld	dword ptr [esi-0Ch]
fmul	dword ptr [ecx+edx*8]
fsubp	st(1), st
jnz	short loc_733B43
mov	esi, [esp+10h+arg_4]
pop	ebp

loc_733BAE:
cmp	esi, edi
jge	short loc_733BD2
lea	ebx, [esi+1]

loc_733BB5:
mov	eax, ebx
fld	dword ptr [ecx+esi*8]
cdq
idiv	edi
inc	esi
inc	ebx
cmp	esi, edi
fmul	dword ptr [ecx+edx*8+4]
faddp	st(1), st
fld	dword ptr [ecx+esi*8-4]
fmul	dword ptr [ecx+edx*8]
fsubp	st(1), st
jl	short loc_733BB5

loc_733BD2:
fmul	ds:dbl_15FCC48
pop	edi
pop	esi
pop	ebx
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short locret_733BE8
fchs

locret_733BE8:
retn	8
sub_733B10 endp

align 10h



sub_733BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, ecx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
xor	ebx, ebx
push	ebx
push	esi
push	eax
mov	eax, [edx+38h]
call	eax
mov	ecx, [eax]
xor	ecx, esi
and	ecx, 0FFFFFFFh
xor	[eax], ecx
mov	ecx, [eax]
and	ecx, 0FFFFFFFh
cmp	[esp+8+arg_4], ebx
jnz	short loc_733C50
or	ecx, 0C0000000h
mov	[eax], ecx
xor	edx, edx
mov	[eax+1Ch], bl
mov	[eax+1Dh], bl
mov	[eax+1Ah], dx
xor	ecx, ecx
mov	[eax+16h], cx
mov	[eax+14h], dx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
pop	esi
mov	[eax+8], ebx
pop	ebx
retn	8

loc_733C50:
or	ecx, 40000000h
mov	[eax], ecx
mov	[eax+4], ebx
mov	[eax+18h], ebx
mov	[eax+14h], ebx
mov	[eax+20h], ebx
xor	ecx, ecx
mov	[eax+26h], cx
xor	edx, edx
mov	[eax+28h], dx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
pop	esi
mov	[eax+8], ebx
pop	ebx
retn	8
sub_733BF0 endp

align 10h



sub_733C80 proc	near
mov	eax, [ecx]
shr	eax, 1Fh
and	al, 1
lea	edx, [ecx+1Eh]
jnz	short loc_733C8F
lea	edx, [ecx+2Ah]

loc_733C8F:
test	al, al
jz	short loc_733C9F
movzx	ecx, byte ptr [ecx+1Ch]
lea	eax, [edx+ecx*8+3]
and	eax, 0FFFFFFFCh
retn

loc_733C9F:
mov	ecx, [ecx+4]
lea	eax, [edx+ecx*8+3]
and	eax, 0FFFFFFFCh
retn
sub_733C80 endp

align 10h



sub_733CB0 proc	near
mov	eax, [ecx]
shr	eax, 1Fh
and	al, 1
jz	short loc_733CBF
movzx	edx, byte ptr [ecx+1Ch]
jmp	short loc_733CC2

loc_733CBF:
mov	edx, [ecx+4]

loc_733CC2:
test	edx, edx
jbe	short loc_733CEC
test	al, al
lea	eax, [ecx+1Eh]
jnz	short loc_733CD0
lea	eax, [ecx+2Ah]

loc_733CD0:
test	byte ptr [eax+edx*8-1],	1
jz	short loc_733CE9
mov	ecx, 0F000h
test	[eax+edx*8-4], cx
jz	short loc_733CE9
mov	eax, 1
retn

loc_733CE9:
xor	eax, eax
retn

loc_733CEC:
xor	al, al
retn
sub_733CB0 endp

align 10h



sub_733CF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_0]
neg	eax
sbb	eax, eax
and	eax, 0Ch
add	eax, 1Ah
lea	edx, [eax+ecx*8+7]
mov	eax, [esp+arg_4]
and	edx, 0FFFFFFFCh
lea	eax, [edx+eax*4]
retn
sub_733CF0 endp

align 10h



sub_733D20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+14h], eax
or	byte ptr [ecx+74h], 1
retn	4
sub_733D20 endp

align 10h



sub_733D30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_733D7B
push	ebx
push	esi

loc_733D42:
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
mov	edx, [esp+10h+arg_C]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
lea	eax, [ecx+ebx*4]
mov	ecx, [edx]
mov	edx, [eax]
push	ecx
push	edx
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_733D73
or	eax, 0FFFFFFFFh
sub	eax, esi
lea	ebp, [ebx+1]
add	edi, eax
jmp	short loc_733D75

loc_733D73:
mov	edi, esi

loc_733D75:
test	edi, edi
jg	short loc_733D42
pop	esi
pop	ebx

loc_733D7B:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_733D30 endp




sub_733D80 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebp
mov	ebp, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebp
test	edi, edi
jle	short loc_733DCE
push	ebx
push	esi

loc_733D92:
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
mov	edx, [esp+10h+arg_C]
fld	dword ptr [edx]
mov	esi, edi
sar	esi, 1
lea	ebx, [esi+ebp]
lea	eax, [ecx+ebx*4]
mov	eax, [eax]
push	ecx
fstp	[esp+14h+var_14]
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_733DC6
or	ecx, 0FFFFFFFFh
sub	ecx, esi
lea	ebp, [ebx+1]
add	edi, ecx
jmp	short loc_733DC8

loc_733DC6:
mov	edi, esi

loc_733DC8:
test	edi, edi
jg	short loc_733D92
pop	esi
pop	ebx

loc_733DCE:
pop	edi
mov	eax, ebp
pop	ebp
retn
sub_733D80 endp

align 10h



sub_733DE0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_733930
test	al, al
jz	short loc_733E38
lea	eax, [edi+0Ch]
push	eax
lea	ecx, [esi+0Ch]
call	sub_733930
test	al, al
jz	short loc_733E38
mov	eax, [edi+18h]
cmp	[esi+18h], eax
jnz	short loc_733E38
mov	cx, [esi+1Ch]
cmp	cx, [edi+1Ch]
jnz	short loc_733E38
mov	dx, [esi+1Eh]
cmp	dx, [edi+1Eh]
jnz	short loc_733E38
mov	eax, [edi+20h]
cmp	[esi+20h], eax
jnz	short loc_733E38
mov	al, [esi+24h]
cmp	al, [edi+24h]
jnz	short loc_733E38
pop	edi
mov	eax, 1
pop	esi
retn	4

loc_733E38:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_733DE0 endp

align 10h



sub_733E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
cmp	byte ptr [esi+80h], 0
jnz	short loc_733E8F
fld	ds:dbl_15FCD70
call	__CIsqrt
fstp	[esp+0Ch+var_8]
fld	[esp+0Ch+var_8]
xor	eax, eax
fstp	[esp+0Ch+var_4]
fld1
fstp	[esp+0Ch+var_8]
fld	[esp+0Ch+var_4]

loc_733E72:
fld	[esp+0Ch+var_8]
inc	eax
fst	dword ptr [esi+eax*4-4]
fmul	st, st(1)
fstp	[esp+0Ch+var_8]
cmp	eax, 20h
jb	short loc_733E72
fstp	st
mov	byte ptr [esi+80h], 1

loc_733E8F:
mov	byte ptr [esi+0C4h], 0
pop	esi
add	esp, 8
retn
sub_733E40 endp

align 10h



sub_733EA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, [ecx+4]
jb	short loc_733EAE
xor	eax, eax
retn	4

loc_733EAE:
mov	edx, [ecx]
mov	eax, [edx+eax*4]
or	byte ptr [ecx+74h], 1
retn	4
sub_733EA0 endp

align 10h



sub_733EC0 proc	near
mov	edx, [ecx+14h]
xor	eax, eax
test	edx, edx
jz	short locret_733EF5
push	esi
mov	esi, [ecx+4]
cmp	edx, esi
jnb	short loc_733EF4
test	edx, edx
jl	short loc_733EF4
test	esi, esi
jbe	short loc_733EF4
mov	ecx, [ecx]
mov	edx, [ecx+edx*4]
mov	eax, [edx]
mov	ecx, [ecx]
mov	edx, [edx+10h]
shr	eax, 1Fh
mov	eax, [ecx]
mov	ecx, [ecx+10h]
shr	eax, 1Fh
sub	edx, ecx
mov	eax, edx

loc_733EF4:
pop	esi

locret_733EF5:
retn
sub_733EC0 endp

align 10h



; int __stdcall	sub_733F00(int,	float)
sub_733F00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
mov	eax, [ecx]
mov	eax, [eax+edx*4]
push	esi
mov	esi, [ecx+14h]
cmp	edx, esi
jnz	short loc_733F43
mov	edx, [eax]
shr	edx, 1Fh
test	dl, 1
jz	short loc_733F24
mov	eax, [eax+10h]
mov	[esp+4+arg_0], eax
jmp	short loc_733F2B

loc_733F24:
mov	edx, [eax+10h]
mov	[esp+4+arg_0], edx

loc_733F2B:
fild	[esp+4+arg_0]
fadd	[esp+4+arg_4]
fld	dword ptr [ecx+24h]
fsub	dword ptr [ecx+1Ch]
fstp	[esp+4+arg_4]
fld	[esp+4+arg_4]
jmp	short loc_733F79

loc_733F43:
jbe	short loc_733F91
mov	edx, [eax]
mov	esi, [eax+10h]
shr	edx, 1Fh
and	dl, 1
test	dl, dl
jz	short loc_733F5A
movzx	eax, word ptr [eax+16h]
jmp	short loc_733F5D

loc_733F5A:
mov	eax, [eax+18h]

loc_733F5D:
add	eax, esi
mov	[esp+4+arg_0], eax
fild	[esp+4+arg_0]
fadd	[esp+4+arg_4]
fld	dword ptr [ecx+24h]
fsub	dword ptr [ecx+1Ch]
fstp	[esp+4+arg_4]
fld	[esp+4+arg_4]

loc_733F79:
fadd	ds:dbl_15FCE20
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_733F91
mov	eax, 1
pop	esi
retn	8

loc_733F91:
xor	eax, eax
pop	esi
retn	8
sub_733F00 endp

align 10h



; int __stdcall	sub_733FA0(float)
sub_733FA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [ecx+14h]
sub	esp, 0Ch
push	esi
cmp	eax, [ecx+4]
jnb	loc_73405E
mov	edx, [ecx]
mov	edx, [edx+eax*4]
mov	eax, [edx]
shr	eax, 1Fh
and	al, 1
jz	short loc_733FC4
movzx	esi, word ptr [edx+14h]
jmp	short loc_733FC7

loc_733FC4:
mov	esi, [edx+14h]

loc_733FC7:
test	esi, esi
jz	loc_73405E
test	al, al
jz	short loc_733FD9
movzx	esi, word ptr [edx+16h]
jmp	short loc_733FDC

loc_733FD9:
mov	esi, [edx+18h]

loc_733FDC:
test	esi, esi
jz	short loc_73405E
test	al, al
jz	short loc_733FEA
movzx	esi, word ptr [edx+16h]
jmp	short loc_733FED

loc_733FEA:
mov	esi, [edx+18h]

loc_733FED:
mov	[esp+10h+var_C], esi
fild	[esp+10h+var_C]
fstp	[esp+10h+var_4]
fld	dword ptr [ecx+24h]
fsub	dword ptr [ecx+1Ch]
fstp	[esp+10h+var_C]
fld	[esp+10h+var_C]
fadd	ds:dbl_15FCE20
fstp	[esp+10h+var_8]
test	al, al
jz	short loc_73401E
mov	eax, [edx+10h]
mov	[esp+10h+var_C], eax
jmp	short loc_734025

loc_73401E:
mov	ecx, [edx+10h]
mov	[esp+10h+var_C], ecx

loc_734025:
fild	[esp+10h+var_C]
fadd	[esp+10h+arg_0]
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
fld	[esp+10h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_73405A
fld	[esp+10h+var_4]
faddp	st(2), st
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_73405E
mov	al, 1
pop	esi
add	esp, 0Ch
retn	4

loc_73405A:
fstp	st(1)
fstp	st

loc_73405E:
xor	al, al
pop	esi
add	esp, 0Ch
retn	4
sub_733FA0 endp

align 10h



sub_734070 proc	near
push	ebp
mov	ebp, [ecx+4]
test	ebp, ebp
jnz	short loc_73407C
xor	eax, eax
pop	ebp
retn

loc_73407C:
push	esi
push	edi
xor	esi, esi
mov	edi, 7FFFFFFFh

loc_734085:
cmp	esi, ebp
jnb	short loc_7340AD
test	esi, esi
jl	short loc_7340AD
mov	eax, [ecx]
mov	edx, [eax+esi*4]
mov	eax, [edx]
shr	eax, 1Fh
test	al, 1
jz	short loc_7340A1
movzx	edx, word ptr [edx+16h]
jmp	short loc_7340A4

loc_7340A1:
mov	edx, [edx+18h]

loc_7340A4:
cmp	edx, edi
jge	short loc_7340AA
mov	edi, edx

loc_7340AA:
inc	esi
jmp	short loc_734085

loc_7340AD:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn
sub_734070 endp

align 10h



sub_7340C0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20h
mov	edx, [esp+20h+arg_4]
mov	ecx, [esp+20h+arg_0]
fld	dword ptr [edx]
fstp	[esp+20h+var_1C]
fld	dword ptr [edx+4]
fstp	[esp+20h+arg_4]
fld	dword ptr [ecx+4]
fld	[esp+20h+arg_4]
fld	st
fmulp	st(2), st
fld	dword ptr [ecx]
fld	[esp+20h+var_1C]
fld	st
fmulp	st(2), st
fxch	st(3)
faddp	st(1), st
fadd	dword ptr [ecx+8]
fstp	dword ptr [ecx+8]
fld	dword ptr [ecx+0Ch]
fmulp	st(2), st
fmul	dword ptr [ecx+10h]
faddp	st(1), st
fadd	dword ptr [ecx+14h]
fstp	dword ptr [ecx+14h]
fld1
fst	[esp+20h+var_20]
fld	dword ptr [edx+8]
fsub	dword ptr [edx]
fstp	[esp+20h+arg_4]
fld	[esp+20h+arg_4]
fld	ds:dbl_15FCC18
fcom	st(1)
fnstsw	ax
fld	ds:flt_143764C
test	ah, 5
jp	short loc_734168
fxch	st(2)
fdiv	st, st(1)
fstp	[esp+20h+var_20]
fxch	st(1)
fst	[esp+20h+arg_4]
fxch	st(1)

loc_73413D:
fxch	st(2)
fstp	[esp+20h+var_1C]
fld	dword ptr [edx+0Ch]
fsub	dword ptr [edx+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_73416C
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+20h+var_1C]
fstp	[esp+20h+arg_0]
jmp	short loc_734172

loc_734168:
fstp	st(2)
jmp	short loc_73413D

loc_73416C:
fstp	st(2)
fstp	st(1)
fstp	st

loc_734172:
fld	[esp+20h+var_20]
lea	eax, [esp+20h+var_18]
fstp	[esp+20h+var_18]
push	eax
fldz
fst	[esp+24h+var_14]
fst	[esp+24h+var_10]
fst	[esp+24h+var_C]
fld	[esp+24h+var_1C]
fstp	[esp+24h+var_8]
fstp	[esp+24h+var_4]
call	sub_64EAF0
mov	eax, [esp+20h+arg_8]
fldz
fst	dword ptr [eax]
fstp	dword ptr [eax+4]
fld	[esp+20h+arg_4]
fldz
fadd	st(1), st
fxch	st(1)
fstp	dword ptr [eax+8]
fadd	[esp+20h+arg_0]
fstp	dword ptr [eax+0Ch]
add	esp, 20h
retn
sub_7340C0 endp




sub_7341C0 proc	near
fldz
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]
fst	dword ptr [eax+10h]
mov	[eax+14h], ecx
fst	dword ptr [eax+18h]
fst	dword ptr [eax+1Ch]
fst	dword ptr [eax+20h]
fst	dword ptr [eax+24h]
fst	dword ptr [eax+28h]
fst	dword ptr [eax+2Ch]
fst	dword ptr [eax+30h]
fst	dword ptr [eax+34h]
fst	dword ptr [eax+38h]
fst	dword ptr [eax+3Ch]
fst	dword ptr [eax+40h]
fst	dword ptr [eax+44h]
fld	ds:flt_1431A30
fstp	dword ptr [eax+48h]
fst	dword ptr [eax+4Ch]
fst	dword ptr [eax+50h]
mov	[eax+5Ch], ecx
fst	dword ptr [eax+54h]
mov	[eax+60h], cl
fstp	dword ptr [eax+58h]
retn
sub_7341C0 endp

align 10h



sub_734220 proc	near

var_124= dword ptr -124h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_A0=	byte ptr -0A0h
var_60=	byte ptr -60h
var_40=	byte ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 110h
mov	eax, [esp+110h+arg_0]
cmp	byte ptr [eax+14h], 0
mov	[esp+110h+var_10C], ecx
jz	loc_73442D
push	ebp
mov	ebp, [eax+50h]
test	ebp, ebp
jz	loc_73442C
push	ebx
mov	ebx, [esp+118h+arg_4]
push	esi
mov	esi, [eax+8]
push	edi
mov	ecx, 10h
lea	edi, [esp+120h+var_A0]
rep movsd
push	ebx
lea	ecx, [esp+124h+var_40]
call	sub_64F570
mov	ecx, 10h
lea	esi, [esp+120h+var_A0]
lea	edi, [esp+120h+var_E0]
rep movsd
lea	eax, [esp+120h+var_E0]
push	eax
lea	ecx, [esp+124h+var_40]
push	ecx
lea	ecx, [esp+128h+var_A0]
call	sub_64F7E0
lea	edx, [esp+120h+var_A0]
push	edx
lea	eax, [esp+124h+var_60]
push	eax
mov	ecx, ebp
call	sub_6555E0
mov	esi, [esp+120h+var_10C]
push	4
lea	ecx, [esp+124h+var_60]
push	ecx
mov	ecx, esi
call	sub_733B10
fstp	[esp+120h+var_110]
lea	ecx, [esp+120h+var_108]
call	sub_64E8E0
lea	edx, [esp+120h+var_108]
push	edx
mov	ecx, ebp
call	sub_654AF0
mov	eax, [ebp+0]
mov	eax, [eax+34h]
lea	ecx, [esp+120h+var_108]
push	ecx
lea	edx, [esp+124h+var_F0]
push	edx
mov	ecx, ebp
call	eax
fld	[esp+120h+var_F0]
fld	ds:dbl_15FCE20
push	ecx		; float
fdiv	st(1), st
mov	ecx, esi
fxch	st(1)
fstp	[esp+124h+var_108]
fld	[esp+124h+var_EC]
fdiv	st, st(1)
fstp	[esp+124h+var_104]
fld	[esp+124h+var_E8]
fdiv	st, st(1)
fstp	[esp+124h+var_100]
fdivr	[esp+124h+var_E4]
fstp	[esp+124h+var_FC]
fld	[esp+124h+var_110]
fld	[esp+124h+var_100]
fsub	[esp+124h+var_108]
fstp	[esp+124h+var_110]
fld	[esp+124h+var_110]
fld	[esp+124h+var_FC]
fsub	[esp+124h+var_104]
fstp	[esp+124h+var_110]
fmul	[esp+124h+var_110]
fstp	[esp+124h+var_110]
fdiv	[esp+124h+var_110]
fstp	[esp+124h+var_110]
fld	[esp+124h+var_110]
fstp	[esp+124h+var_124]
call	sub_733A90
fstp	[esp+120h+var_110]
fld1
fld	[esp+120h+var_110]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	loc_734427
fld	st
lea	ecx, [esp+120h+var_E0] ; void *
fld1
fdivrp	st(1), st
fstp	[esp+120h+var_110]
fld	dword ptr [ebx]
fmul	st, st(1)
fstp	dword ptr [ebx]
fld	dword ptr [ebx+4]
fmul	st, st(1)
fstp	dword ptr [ebx+4]
fld	dword ptr [ebx+8]
fmul	st, st(1)
fstp	dword ptr [ebx+8]
fld	dword ptr [ebx+0Ch]
fmul	st, st(1)
fstp	dword ptr [ebx+0Ch]
fld	dword ptr [ebx+10h]
fmul	st, st(1)
fstp	dword ptr [ebx+10h]
fmul	dword ptr [ebx+14h]
fstp	dword ptr [ebx+14h]
call	sub_64F7C0
lea	ecx, [esp+120h+var_E0] ; void *
call	sub_64F7C0
fld	[esp+120h+var_110]
mov	eax, [esp+120h+arg_0]
fst	[esp+120h+var_E0]
lea	edi, [esi+84h]
fst	[esp+120h+var_CC]
mov	esi, [eax+8]
fstp	[esp+120h+var_B8]
mov	ecx, 10h
rep movsd
mov	eax, [eax+8]
mov	esi, eax
mov	ecx, 10h
lea	edi, [esp+120h+var_40]
rep movsd
lea	ecx, [esp+120h+var_40]
push	ecx
lea	edx, [esp+124h+var_E0]
push	edx
mov	ecx, eax
call	sub_64F7E0
mov	eax, [esp+120h+var_10C]
pop	edi
pop	esi
pop	ebx
mov	byte ptr [eax+0C4h], 1
pop	ebp
add	esp, 110h
retn	8

loc_734427:
pop	edi
fstp	st
pop	esi
pop	ebx

loc_73442C:
pop	ebp

loc_73442D:
add	esp, 110h
retn	8
sub_734220 endp

align 10h



sub_734440 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	word ptr -28h
var_26=	word ptr -26h
var_24=	word ptr -24h
var_22=	word ptr -22h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 38h
mov	eax, [esp+38h+arg_0]
mov	ecx, [eax+48h]
mov	eax, [esp+38h+arg_C]
push	ebx
push	ebp
push	esi
mov	esi, [ecx+0Ch]
mov	edx, [esi]
mov	edx, [edx+0A0h]
push	edi
push	eax
mov	ecx, esi
call	edx
mov	eax, [esp+48h+arg_4]
fld	dword ptr [eax]
mov	ecx, [esp+48h+arg_8]
fstp	[esp+48h+var_18]
lea	edx, [esp+48h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+48h+var_14]
fld	dword ptr [eax+8]
fstp	[esp+48h+var_10]
fld	dword ptr [eax+0Ch]
fstp	[esp+48h+var_C]
fld	dword ptr [eax+10h]
fstp	[esp+48h+var_8]
fld	dword ptr [eax+14h]
lea	eax, [esp+48h+var_38]
fstp	[esp+48h+var_4]
push	eax
fldz
push	ecx
fst	[esp+50h+var_38]
push	edx
fst	[esp+54h+var_34]
fst	[esp+54h+var_30]
fstp	[esp+54h+var_2C]
call	sub_7340C0
mov	eax, [esi]
mov	edx, [eax+38h]
add	esp, 0Ch
lea	ecx, [esp+48h+var_18]
push	ecx
mov	ecx, esi
call	edx
fld	[esp+48h+var_38]
call	__ftol2_sse
fld	[esp+48h+var_34]
mov	di, ax
mov	[esp+48h+var_28], di
call	__ftol2_sse
fld	[esp+48h+var_30]
mov	bx, ax
mov	[esp+48h+var_26], bx
call	__ftol2_sse
fld	[esp+48h+var_2C]
mov	bp, ax
mov	[esp+48h+var_24], bp
mov	[esp+48h+var_22], bx
mov	[esp+48h+var_20], di
call	__ftol2_sse
mov	[esp+48h+var_1E], ax
mov	word ptr [esp+48h+var_1C+2], ax
push	ecx
mov	eax, esp
mov	word ptr [esp+4Ch+var_1C], bp
mov	cl, 0FFh
mov	[eax+2], cl
mov	[eax+1], cl
mov	[eax], cl
mov	[eax+3], cl
mov	eax, [esi]
mov	edx, [eax+8Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
push	0
push	1
push	4
lea	ecx, [esp+54h+var_28]
push	ecx
mov	edx, [eax+6Ch]
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+70h]
push	0
push	1
push	6
push	offset unk_1440798
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+78h]
push	2
push	0
push	4
push	0
push	0
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+6Ch]
push	0
push	0
push	0
push	0
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+70h]
push	0
push	0
push	0
push	0
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+0A4h]
mov	ecx, esi
call	edx
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 38h
retn
sub_734440 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_7345B0(float, float, float,	float, int, int, int, int, int,	int)
sub_7345B0 proc	near

var_88=	qword ptr -88h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 74h
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [ebp+arg_10]
fld	dword ptr [ecx]
push	edi
fld	[ebp+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_7345D9
fld	dword ptr [ecx]
fstp	[esp+80h+var_48]
jmp	short loc_7345F2

loc_7345D9:
fld	dword ptr [ecx+8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_7345EE
fld	dword ptr [ecx+8]
fstp	[esp+80h+var_48]
jmp	short loc_7345F2

loc_7345EE:
fst	[esp+80h+var_48]

loc_7345F2:
fld	dword ptr [ecx+4]
fld	[ebp+arg_4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_73460C
fld	dword ptr [ecx+4]
fstp	[esp+80h+var_44]
jmp	short loc_734625

loc_73460C:
fld	dword ptr [ecx+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_734621
fld	dword ptr [ecx+0Ch]
fstp	[esp+80h+var_44]
jmp	short loc_734625

loc_734621:
fst	[esp+80h+var_44]

loc_734625:
fild	[ebp+arg_14]
mov	ebx, [ebp+arg_18]
faddp	st(2), st
fxch	st(1)
fstp	[esp+80h+var_40]
cmp	ebx, 2
jz	short loc_73463D
fadd	[ebp+arg_8]
jmp	short loc_734644

loc_73463D:
fld	[ebp+arg_8]
fadd	st, st
faddp	st(1), st

loc_734644:
fstp	[esp+80h+var_3C]
fld	dword ptr [ecx]
fld	[esp+80h+var_40]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_73465F
fstp	st
fld	dword ptr [ecx]
jmp	short loc_734670

loc_73465F:
fld	dword ptr [ecx+8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_734670
fstp	st
fld	dword ptr [ecx+8]

loc_734670:
fstp	[esp+80h+var_50]
fld	dword ptr [ecx+4]
fld	[esp+80h+var_3C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_73468D
fstp	st
fld	dword ptr [ecx+4]
jmp	short loc_73469E

loc_73468D:
fld	dword ptr [ecx+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_73469E
fstp	st
fld	dword ptr [ecx+0Ch]

loc_73469E:
fstp	[esp+80h+var_4C]
sub	esp, 8
fld	[esp+88h+var_50]
fstp	[esp+88h+var_40]
fld	[esp+88h+var_4C]
fstp	[esp+88h+var_3C]
fld	[esp+88h+var_40]
fadd	ds:dbl_15FCC48
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_88]
call	_floor
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_40]
fld	[esp+88h+var_3C]
fadd	ds:dbl_15FCC48
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_88]
call	_floor
fstp	[esp+88h+var_54]
add	esp, 8
cmp	dword ptr [esi+0CCh], 0
fld	[esp+80h+var_54]
fstp	[esp+80h+var_3C]
jnz	short loc_734753
mov	ecx, dword_1855FC0
lea	edx, [esp+80h+var_54]
push	edx
mov	[esp+84h+var_54], 142h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	88h
push	esi
call	eax
test	eax, eax
jz	short loc_73473C
mov	ecx, eax
call	sub_6F91A0
mov	edi, eax
jmp	short loc_73473E

loc_73473C:
xor	edi, edi

loc_73473E:
mov	ecx, [esi+0CCh]
test	ecx, ecx
jz	short loc_73474D
call	sub_64A400

loc_73474D:
mov	[esi+0CCh], edi

loc_734753:
mov	ecx, [ebp+arg_1C]
push	ecx
mov	ecx, [esi+0CCh]
call	sub_6F93D0
cmp	ebx, 3
jnz	short loc_73476F
fld	ds:flt_1437CD8
jmp	short loc_734771

loc_73476F:
fld1

loc_734771:
lea	eax, [ebx-1]
fstp	[esp+80h+var_54]
cmp	eax, 4		; switch 5 cases
ja	loc_734C3A	; default
jmp	ds:off_734C44[eax*4] ; switch jump

loc_734788:		; jumptable 00734781 cases 0,1
fld	[esp+80h+var_44]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_48]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D50
fld	[esp+80h+var_44]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_40]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_3C]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_40]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_3C]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_48]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_44]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_48]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
mov	ecx, [esi+0CCh]
call	sub_6F8F40
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	28h

loc_73482D:		; jumptable 00734781 cases 2,3
fld	[esp+80h+var_48]
fst	[esp+80h+var_58]
fld	[esp+80h+var_40]
fst	[esp+80h+var_8]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_734C3A	; default
fld	[esp+80h+var_54]
mov	edi, [ebp+arg_24]
fmul	[ebp+arg_C]
mov	ebx, [ebp+arg_20]
fst	[esp+80h+var_28]
fadd	st, st
fstp	[esp+80h+var_10]
fld	[esp+80h+var_58]

loc_734865:
lea	edx, [esp+80h+var_50]
fstp	[esp+80h+var_50]
fld	[esp+80h+var_3C]
push	edx
lea	eax, [esp+84h+var_38]
fstp	[esp+84h+var_4C]
push	eax
mov	ecx, ebx
call	sub_64E9B0
fld	[esp+80h+var_38]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_88]
call	_floor
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_50]
fld	[esp+88h+var_34]
fadd	ds:dbl_15FCC48
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_88]
call	_floor
add	esp, 8
fstp	[esp+80h+var_54]
fld	[esp+80h+var_54]
lea	ecx, [esp+80h+var_50]
push	ecx
fstp	[esp+84h+var_4C]
lea	edx, [esp+84h+var_30]
push	edx
mov	ecx, edi
call	sub_64E9B0
fld	[esp+80h+var_30]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_88]
call	_floor
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_50]
fld	[esp+88h+var_2C]
fadd	ds:dbl_15FCC48
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_88]
call	_floor
mov	ecx, [esi+0CCh]
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	[esp+88h+var_4C]
fld	[esp+88h+var_50]
fst	[esp+88h+var_58]
fld	[esp+88h+var_44]
fstp	dword ptr [esp+88h+var_88+4]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D50
fld	[esp+80h+var_44]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_50]
fadd	[esp+88h+var_28]
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_3C]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_50]
fadd	[esp+88h+var_28]
fstp	[esp+88h+var_54]
fld	[esp+88h+var_54]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_3C]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_50]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_44]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_50]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
mov	ecx, [esi+0CCh]
call	sub_6F8F40
fld	[esp+80h+var_58]
fadd	[esp+80h+var_10]
fstp	[esp+80h+var_58]
fld	[esp+80h+var_58]
fcom	[esp+80h+var_8]
fnstsw	ax
test	ah, 5
jnp	loc_734865
fstp	st
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	28h

loc_734A13:		; jumptable 00734781 case 4
fld	[esp+80h+var_40]
mov	edi, [ebp+arg_24]
mov	ebx, [ebp+arg_20]
fst	[esp+80h+var_10]
fld	[ebp+arg_C]
mov	[esp+80h+var_54], 0

loc_734A2C:
fild	[esp+80h+var_54]
fmul	st, st(1)
fadd	[esp+80h+var_48]
fstp	[esp+80h+var_58]
fld	[esp+80h+var_58]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	loc_734C17
fstp	st(2)
fadd	st, st
fstp	[esp+80h+var_8]
jmp	short loc_734A57

loc_734A55:
fstp	st

loc_734A57:
lea	eax, [esp+80h+var_40]
fstp	[esp+80h+var_40]
fld	[esp+80h+var_44]
push	eax
lea	ecx, [esp+84h+var_20]
fstp	[esp+84h+var_3C]
push	ecx
mov	ecx, ebx
call	sub_64E9B0
fld	[esp+80h+var_20]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+88h+var_58]
fld	[esp+88h+var_58]
fstp	[esp+88h+var_88]
call	_floor
fstp	[esp+88h+var_58]
fld	[esp+88h+var_58]
fstp	[esp+88h+var_40]
fld	[esp+88h+var_1C]
fadd	ds:dbl_15FCC48
fstp	[esp+88h+var_58]
fld	[esp+88h+var_58]
fstp	[esp+88h+var_88]
call	_floor
add	esp, 8
fstp	[esp+80h+var_58]
fld	[esp+80h+var_58]
lea	edx, [esp+80h+var_40]
push	edx
fstp	[esp+84h+var_3C]
lea	eax, [esp+84h+var_18]
push	eax
mov	ecx, edi
call	sub_64E9B0
fld	[esp+80h+var_18]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+88h+var_58]
fld	[esp+88h+var_58]
fstp	[esp+88h+var_88]
call	_floor
fstp	[esp+88h+var_58]
fld	[esp+88h+var_58]
fstp	[esp+88h+var_40]
fld	[esp+88h+var_14]
fadd	ds:dbl_15FCC48
fstp	[esp+88h+var_58]
fld	[esp+88h+var_58]
fstp	[esp+88h+var_88]
call	_floor
mov	ecx, [esi+0CCh]
fstp	[esp+88h+var_58]
fld	[esp+88h+var_58]
fstp	[esp+88h+var_3C]
fld	[esp+88h+var_40]
fst	[esp+88h+var_58]
fld	[esp+88h+var_3C]
fstp	dword ptr [esp+88h+var_88+4]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D50
fld	[esp+80h+var_3C]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_40]
fadd	[ebp+arg_C]
fstp	[esp+88h+var_50]
fld	[esp+88h+var_50]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_3C]
sub	esp, 8
fadd	[ebp+arg_8]
fstp	[esp+88h+var_50]
fld	[esp+88h+var_50]
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_40]
fadd	[ebp+arg_C]
fstp	[esp+88h+var_50]
fld	[esp+88h+var_50]
mov	ecx, [esi+0CCh]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_3C]
fadd	[ebp+arg_8]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	[esp+88h+var_50]
fld	[esp+88h+var_50]
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_40]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
fld	[esp+80h+var_3C]
mov	ecx, [esi+0CCh]
sub	esp, 8
fstp	dword ptr [esp+88h+var_88+4]
fld	[esp+88h+var_40]
fstp	dword ptr [esp+88h+var_88]
call	sub_6F8D80
mov	ecx, [esi+0CCh]
call	sub_6F8F40
fld	[esp+80h+var_58]
fadd	[esp+80h+var_8]
fstp	[esp+80h+var_58]
fld	[esp+80h+var_58]
fld	[esp+80h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	loc_734A55
fstp	st(1)
fld	[ebp+arg_C]
jmp	short loc_734C19

loc_734C17:
fstp	st

loc_734C19:
fld	[esp+80h+var_44]
mov	eax, [esp+80h+var_54]
fadd	[ebp+arg_8]
inc	eax
cmp	eax, 2
mov	[esp+80h+var_54], eax
fstp	[esp+80h+var_44]
jl	loc_734A2C
fstp	st(1)
fstp	st

loc_734C3A:		; default
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	28h
sub_7345B0 endp

align 4
off_734C44 dd offset loc_734788	; jump table for switch	statement
dd offset loc_734788
dd offset loc_73482D
dd offset loc_73482D
dd offset loc_734A13
align 10h



sub_734C60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
xor	ebx, ebx
push	edi
cmp	eax, ebx
jbe	short loc_734CED
push	offset sub_733990
lea	ecx, [esp+14h+arg_4]
push	ecx
push	eax
push	ebx
push	esi
call	sub_733D30
mov	edi, eax
add	esp, 14h
cmp	edi, [esi+4]
jnz	short loc_734C8C
dec	edi

loc_734C8C:
mov	edx, [esi]
mov	ecx, [edx+edi*4]
mov	eax, [ecx]
mov	edx, [ecx+8]
shr	eax, 1Fh
and	al, 1
jz	short loc_734CAE
and	edx, offset sub_FFFFFF
cmp	edx, offset sub_FFFFFF
jnz	short loc_734CAE
or	edx, 0FFFFFFFFh

loc_734CAE:
mov	ebp, [esp+10h+arg_4]
cmp	ebp, edx
jb	short loc_734CED
cmp	al, bl
jz	short loc_734CC0
movzx	ecx, byte ptr [ecx+0Bh]
jmp	short loc_734CC3

loc_734CC0:
mov	ecx, [ecx+20h]

loc_734CC3:
add	ecx, edx
cmp	ebp, ecx
ja	short loc_734CED
mov	eax, [esp+10h+arg_0]
fldz
mov	cl, [esi+74h]
fstp	dword ptr [eax+0Ch]
mov	[eax+8], edi
pop	edi
mov	[eax], esi
pop	esi
shr	cl, 2
and	cl, 1
pop	ebp
mov	[eax+4], ebx
mov	[eax+10h], cl
pop	ebx
retn	8

loc_734CED:
mov	eax, [esp+10h+arg_0]
fldz
pop	edi
fstp	dword ptr [eax+0Ch]
pop	esi
pop	ebp
mov	[eax], ebx
mov	[eax+8], ebx
mov	[eax+10h], bl
mov	[eax+4], ebx
pop	ebx
retn	8
sub_734C60 endp

align 10h



; int __stdcall	sub_734D10(int,	float)
sub_734D10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
test	eax, eax
jbe	loc_734DC0
push	offset sub_733A70
lea	ecx, [esp+14h+arg_4]
push	ecx
push	eax
push	0
push	esi
call	sub_733D80
mov	edi, eax
add	esp, 14h
cmp	edi, [esi+4]
jnz	short loc_734D3F
dec	edi

loc_734D3F:
mov	edx, [esi]
fld	[esp+10h+arg_4]
mov	ecx, [edx+edi*4]
mov	ebp, [ecx+10h]
mov	edx, [ecx]
mov	[esp+10h+var_4], ebp
fild	[esp+10h+var_4]
shr	edx, 1Fh
and	dl, 1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_734DBE
push	ebx
test	dl, dl
jz	short loc_734D6F
movzx	ebx, word ptr [ecx+16h]
jmp	short loc_734D72

loc_734D6F:
mov	ebx, [ecx+18h]

loc_734D72:
test	dl, dl
jz	short loc_734D7C
movsx	eax, byte ptr [ecx+1Dh]
jmp	short loc_734D80

loc_734D7C:
movsx	eax, word ptr [ecx+28h]

loc_734D80:
add	eax, ebx
add	eax, ebp
mov	[esp+14h+arg_4], eax
fild	[esp+14h+arg_4]
pop	ebx
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_734DC0
mov	eax, [esp+10h+arg_0]
fldz
mov	cl, [esi+74h]
fstp	dword ptr [eax+0Ch]
mov	[eax+8], edi
pop	edi
shr	cl, 2
mov	[eax], esi
and	cl, 1
pop	esi
mov	dword ptr [eax+4], 0
mov	[eax+10h], cl
pop	ebp
pop	ecx
retn	8

loc_734DBE:
fstp	st

loc_734DC0:
mov	eax, [esp+10h+arg_0]
fldz
xor	ecx, ecx
fstp	dword ptr [eax+0Ch]
pop	edi
pop	esi
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+10h], cl
pop	ebp
pop	ecx
retn	8
sub_734D10 endp

align 10h



sub_734DE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	[esp+24h+var_4], esi
test	eax, eax
jbe	loc_734EEE
mov	ebx, [esp+24h+arg_4]
push	offset sub_733A70
add	ebx, 4
push	ebx
push	eax
push	0
push	esi
call	sub_733D80
mov	ebp, eax
mov	eax, [esi+4]
add	esp, 14h
mov	[esp+24h+var_8], eax
cmp	ebp, eax
jnz	short loc_734E1F
dec	ebp

loc_734E1F:
mov	eax, [esi]
mov	ecx, [eax+ebp*4]
mov	edx, [ecx]
mov	esi, [ecx+10h]
lea	eax, [eax+ebp*4]
shr	edx, 1Fh
mov	[esp+24h+var_C], esi
and	dl, 1
mov	[esp+24h+var_14], eax
lea	ebx, [ebx+0]

loc_734E40:
fld	dword ptr [ebx]
mov	[esp+24h+var_10], esi
fild	[esp+24h+var_10]
fcompp
fnstsw	ax
test	ah, 41h
jp	loc_734EEE
test	dl, dl
jz	short loc_734E61
movzx	edi, word ptr [ecx+16h]
jmp	short loc_734E64

loc_734E61:
mov	edi, [ecx+18h]

loc_734E64:
test	dl, dl
jz	short loc_734E6E
movsx	eax, byte ptr [ecx+1Dh]
jmp	short loc_734E72

loc_734E6E:
movsx	eax, word ptr [ecx+28h]

loc_734E72:
fld	dword ptr [ebx]
add	eax, edi
add	eax, esi
mov	[esp+24h+var_10], eax
fild	[esp+24h+var_10]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_734EEE
mov	esi, [ecx+0Ch]
mov	edi, [esp+24h+arg_4]
fld	dword ptr [edi]
mov	[esp+24h+var_10], esi
fild	[esp+24h+var_10]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_734EC5
test	dl, dl
jz	short loc_734EAD
movzx	ecx, word ptr [ecx+14h]
jmp	short loc_734EB0

loc_734EAD:
mov	ecx, [ecx+14h]

loc_734EB0:
fld	dword ptr [edi]
add	ecx, esi
mov	[esp+24h+var_10], ecx
fild	[esp+24h+var_10]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_734F0E

loc_734EC5:
add	[esp+24h+var_14], 4
inc	ebp
cmp	ebp, [esp+24h+var_8]
jz	short loc_734EEE
mov	ecx, [esp+24h+var_14]
mov	ecx, [ecx]
mov	edx, [ecx]
mov	esi, [ecx+10h]
shr	edx, 1Fh
mov	eax, esi
and	dl, 1
cmp	eax, [esp+24h+var_C]
jz	loc_734E40

loc_734EEE:
mov	eax, [esp+24h+arg_0]
fldz
pop	edi
fstp	dword ptr [eax+0Ch]
xor	ecx, ecx
pop	esi
pop	ebp
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+10h], cl
mov	[eax], ecx
pop	ebx
add	esp, 14h
retn	8

loc_734F0E:
mov	eax, [esp+24h+arg_0]
fldz
mov	ecx, [esp+24h+var_4]
fstp	dword ptr [eax+0Ch]
mov	dl, [ecx+74h]
pop	edi
pop	esi
shr	dl, 2
mov	[eax+8], ebp
and	dl, 1
pop	ebp
mov	dword ptr [eax+4], 0
mov	[eax+10h], dl
mov	[eax], ecx
pop	ebx
add	esp, 14h
retn	8
sub_734DE0 endp

align 10h



sub_734F40 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 38h
fld	dword ptr [eax]
lea	ecx, [esp+38h+var_28]
fstp	[esp+38h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+38h+var_14]
fld	dword ptr [eax+0Ch]
fstp	[esp+38h+var_C]
fld	dword ptr [eax+10h]
lea	eax, [esp+38h+var_30]
fstp	[esp+38h+var_8]
push	eax
fldz
push	ecx
fst	[esp+40h+var_10]
lea	ecx, [esp+40h+var_18]
fst	[esp+40h+var_4]
fstp	[esp+40h+var_30]
fld1
fstp	[esp+40h+var_2C]
call	sub_64E9B0
fld1
fstp	[esp+38h+var_30]
lea	edx, [esp+38h+var_30]
fldz
push	edx
lea	eax, [esp+3Ch+var_20]
push	eax
fstp	[esp+40h+var_2C]
lea	ecx, [esp+40h+var_18]
call	sub_64E9B0
fld	[esp+38h+var_20]
fldz
fsub	st(1), st
fxch	st(1)
fstp	[esp+38h+var_34]
fsubr	[esp+38h+var_1C]
fstp	[esp+38h+var_38]
fld	[esp+38h+var_38]
fld	[esp+38h+var_34]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+38h+var_30]
fld	[esp+38h+var_30]
call	__CIsqrt
fstp	[esp+38h+var_30]
fld	[esp+38h+var_30]
fstp	[esp+38h+var_30]
fldz
fld	[esp+38h+var_30]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_735045
fstp	st
fld	[esp+38h+var_28]
fldz
fsub	st(1), st
fxch	st(1)
fstp	[esp+38h+var_34]
fsubr	[esp+38h+var_24]
fstp	[esp+38h+var_30]
fld	[esp+38h+var_30]
fld	[esp+38h+var_34]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+38h+var_30]
fld	[esp+38h+var_30]
call	__CIsqrt
fstp	[esp+38h+var_30]
fld	[esp+38h+var_30]
fstp	[esp+38h+var_34]
fld	[esp+38h+var_34]
fabs
fstp	[esp+38h+var_30]
fld	[esp+38h+var_30]
add	esp, 38h
retn

loc_735045:
fld	[esp+38h+var_28]
fsub	[esp+38h+var_20]
fmul	[esp+38h+var_38]
fld	[esp+38h+var_24]
fsub	[esp+38h+var_1C]
fmul	[esp+38h+var_34]
fsubp	st(1), st
fdivrp	st(1), st
fstp	[esp+38h+var_34]
fld	[esp+38h+var_34]
fabs
fstp	[esp+38h+var_30]
fld	[esp+38h+var_30]
add	esp, 38h
retn
sub_734F40 endp

align 10h



sub_735080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
test	eax, eax
jbe	short locret_735100
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
add	edi, 6
mov	ebp, eax
lea	esp, [esp+0]

loc_7350A0:
movzx	eax, word ptr [edi]
mov	ecx, eax
shr	ecx, 0Eh
test	cl, 1
jz	short loc_7350F4
shr	eax, 0Dh
test	al, 1
jz	short loc_7350D3
mov	esi, [ebx]
add	dword ptr [esi], 0FFFFFFFFh
jnz	short loc_7350D0
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7350D0:
add	ebx, 4

loc_7350D3:
movzx	eax, word ptr [edi]
mov	ecx, eax
shr	ecx, 0Ch
test	cl, 1
jz	short loc_7350E3
add	ebx, 4

loc_7350E3:
shr	eax, 0Bh
test	al, 1
jz	short loc_7350F4
mov	ecx, [ebx]
call	sub_64A400
add	ebx, 4

loc_7350F4:
add	edi, 8
sub	ebp, 1
jnz	short loc_7350A0
pop	edi
pop	esi
pop	ebp
pop	ebx

locret_735100:
retn
sub_735080 endp

align 10h



sub_735110 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
mov	eax, [edi+8]
cmp	[esi+8], eax
jnb	short loc_735146
cmp	dword ptr [edi+0Ch], 0
jbe	short loc_735146
mov	edx, [esi+10h]
mov	ecx, [esi+8]
push	ebx
mov	ebx, [esi+4]
lea	edx, [ebx+edx*4]
sub	eax, ecx
push	edx
push	eax
mov	eax, [esi]
lea	ecx, [eax+ecx*8]
push	ecx
call	sub_735080
add	esp, 0Ch
pop	ebx

loc_735146:
mov	edx, [esi]
mov	[edi], edx
mov	eax, [esi+4]
mov	[edi+4], eax
mov	ecx, [esi+8]
mov	[edi+8], ecx
mov	edx, [esi+0Ch]
mov	[edi+0Ch], edx
mov	eax, [esi+10h]
mov	[edi+10h], eax
pop	edi
pop	esi
retn	4
sub_735110 endp

align 10h



sub_735170 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, eax
shr	ecx, 1Eh
test	cl, 1
jz	short loc_7351D7
shr	eax, 1Fh
and	al, 1
push	edi
lea	edi, [esi+1Eh]
jnz	short loc_73518D
lea	edi, [esi+2Ah]

loc_73518D:
test	al, al
jz	short loc_735197
movzx	edx, byte ptr [esi+1Ch]
jmp	short loc_73519A

loc_735197:
mov	edx, [esi+4]

loc_73519A:
lea	ecx, [esi+1Eh]
test	al, al
jnz	short loc_7351CA
mov	eax, [esi+4]
lea	ecx, [esi+2Ah]

loc_7351A7:
lea	eax, [ecx+eax*8+3]
and	eax, 0FFFFFFFCh
push	eax
push	edx
push	edi
call	sub_735080
mov	ecx, [esi]
add	esp, 0Ch
shr	ecx, 1Fh
pop	edi
test	cl, 1
jz	short loc_7351D0
mov	byte ptr [esi+1Ch], 0
pop	esi
retn

loc_7351CA:
movzx	eax, byte ptr [esi+1Ch]
jmp	short loc_7351A7

loc_7351D0:
mov	dword ptr [esi+4], 0

loc_7351D7:
pop	esi
retn
sub_735170 endp

align 10h



sub_7351E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
test	esi, esi
jz	short loc_7351FE
mov	ecx, esi
call	sub_735170
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7351FE:
pop	esi
retn	4
sub_7351E0 endp

align 10h



sub_735210 proc	near

var_8= byte ptr	-8
var_4= byte ptr	-4

sub	esp, 8
push	esi
mov	esi, ecx
mov	ecx, [esi+50h]
test	ecx, ecx
jz	short loc_735222
call	sub_64A400

loc_735222:
mov	dword ptr [esi+50h], 0
mov	eax, [esi]
test	eax, eax
jz	loc_735388
cmp	eax, [esi+4]
jnb	loc_735388
movzx	eax, word ptr [eax+6]
mov	ecx, eax
shr	ecx, 0Eh
test	cl, 1
jz	loc_7352D8
shr	eax, 0Dh
push	edi
test	al, 1
jz	short loc_73528C
mov	edx, [esi+8]
push	ebp
mov	ebp, [edx]
test	ebp, ebp
jz	short loc_735263
inc	dword ptr [ebp+0]

loc_735263:
mov	edi, [esi+4Ch]
test	edi, edi
jz	short loc_735284
add	dword ptr [edi], 0FFFFFFFFh
jnz	short loc_735284
mov	ecx, edi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_735284:
mov	[esi+4Ch], ebp
add	dword ptr [esi+8], 4
pop	ebp

loc_73528C:
mov	edx, [esi]
mov	ax, [edx+6]
shr	ax, 0Ch
test	al, 1
jz	short loc_7352AB
mov	eax, [esi+8]
mov	ecx, [eax]
add	eax, 4
mov	[esi+40h], ecx
mov	[esi+44h], ecx
mov	[esi+8], eax

loc_7352AB:
mov	cx, [edx+6]
shr	cx, 0Bh
test	cl, 1
jz	short loc_7352D7
mov	edx, [esi+8]
mov	edi, [edx]
test	edi, edi
jz	short loc_7352C4
inc	dword ptr [edi+4]

loc_7352C4:
mov	ecx, [esi+50h]
test	ecx, ecx
jz	short loc_7352D0
call	sub_64A400

loc_7352D0:
mov	[esi+50h], edi
add	dword ptr [esi+8], 4

loc_7352D7:
pop	edi

loc_7352D8:
mov	eax, [esi]
mov	cx, [eax+6]
shr	cx, 0Ah
test	cl, 1
jz	short loc_7352F6
mov	edx, [esi+40h]
mov	dword ptr [esi+54h], 1
mov	[esi+48h], edx
jmp	short loc_7352FD

loc_7352F6:
mov	dword ptr [esi+54h], 0

loc_7352FD:
lea	ecx, [esi+0Ch]
call	sub_73ED30
test	al, al
jnz	short loc_73536C
mov	eax, [esi+44h]
mov	[esi+40h], eax
mov	eax, [esi]
mov	ecx, 0F000h
test	[eax+4], cx
ja	short loc_735327
mov	dl, [eax+6]
shr	dl, 3
test	dl, 1
jz	short loc_735388

loc_735327:
test	byte ptr [esi+3Ch], 10h
jz	short loc_73533F
lea	eax, [esp+0Ch+var_8]
push	eax
lea	ecx, [esi+30h]
call	sub_6C6210
mov	ecx, [eax]
mov	[esi+40h], ecx

loc_73533F:
mov	al, [esi+3Ch]
test	al, 7
jz	short loc_73534F
movzx	edx, al
and	edx, 7
mov	[esi+54h], edx

loc_73534F:
test	byte ptr [esi+3Ch], 20h
jz	short loc_735382
lea	eax, [esp+0Ch+var_4]
push	eax
lea	ecx, [esi+30h]
call	sub_6C6250
mov	ecx, [eax]
mov	[esi+48h], ecx
pop	esi
add	esp, 8
retn

loc_73536C:
mov	eax, [esi]
mov	cx, [eax+6]
shr	cx, 0Ah
test	cl, 1
jz	short loc_735388
mov	dword ptr [esi+54h], 1

loc_735382:
mov	edx, [esi+40h]
mov	[esi+48h], edx

loc_735388:
pop	esi
add	esp, 8
retn
sub_735210 endp

align 10h



sub_735390 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_7353AA
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_7353BF
push	esi
jmp	short loc_7353B9

loc_7353AA:
cmp	esi, [edi+8]
jb	short loc_7353BF
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_7353B9:
push	edi
call	sub_668FE0

loc_7353BF:
mov	ebx, [esp+0Ch+arg_0]
lea	edx, [esi-1]
mov	[edi+4], esi
cmp	ebx, edx
jnb	short loc_7353E9
mov	eax, [edi]
sub	esi, ebx
lea	ecx, ds:0FFFFFFFCh[esi*4]
lea	eax, [eax+ebx*4]
push	ecx
push	eax
add	eax, 4
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7353E9:
mov	edx, [edi]
pop	edi
lea	eax, [edx+ebx*4]
pop	esi
pop	ebx
test	eax, eax
jz	short locret_7353FD
mov	ecx, [esp+arg_4]
mov	edx, [ecx]
mov	[eax], edx

locret_7353FD:
retn	8
sub_735390 endp




sub_735400 proc	near

var_34=	byte ptr -34h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

xor	eax, eax
sub	esp, 34h
push	esi
mov	esi, ecx
mov	[esi+1Ch], eax
mov	[esi+24h], eax
mov	[esi+28h], eax
mov	[esi+2Ch], eax
or	ecx, 0FFFFFFFFh
mov	[esi+18h], ecx
mov	[esi+20h], ecx
mov	[esi+38h], eax
mov	[esi+34h], eax
mov	[esi+30h], eax
mov	[esi+3Ch], al
mov	[esi+14h], eax
mov	[esi+10h], eax
mov	[esi+40h], eax
mov	[esi+44h], eax
mov	[esi+48h], eax
mov	[esi+4Ch], eax
mov	[esi+50h], eax
push	ecx
mov	[esi+54h], eax
mov	[esi+58h], eax
mov	eax, [esp+3Ch+arg_10]
push	eax
lea	ecx, [esp+40h+var_34]
push	ecx
mov	ecx, [esp+44h+arg_C]
call	sub_73F3F0
mov	edx, [eax]
mov	[esi+0Ch], edx
mov	ecx, [eax+4]
mov	[esi+10h], ecx
mov	edx, [eax+8]
mov	[esi+14h], edx
mov	ecx, [eax+0Ch]
mov	[esi+18h], ecx
mov	edx, [eax+10h]
mov	[esi+1Ch], edx
mov	ecx, [eax+14h]
mov	[esi+20h], ecx
mov	edx, [eax+18h]
mov	[esi+24h], edx
mov	ecx, [eax+1Ch]
mov	[esi+28h], ecx
mov	edx, [eax+20h]
mov	[esi+2Ch], edx
mov	ecx, [eax+24h]
mov	[esi+30h], ecx
mov	edx, [eax+28h]
mov	[esi+34h], edx
mov	ecx, [eax+2Ch]
mov	[esi+38h], ecx
mov	dl, [eax+30h]
mov	eax, [esp+38h+arg_0]
mov	ecx, [esp+38h+arg_4]
mov	[esi+3Ch], dl
lea	edx, [eax+ecx*8]
mov	[esi], eax
mov	eax, [esp+38h+arg_8]
mov	ecx, esi
mov	[esi+4], edx
mov	[esi+8], eax
call	sub_735210
mov	eax, esi
pop	esi
add	esp, 34h
retn	14h
sub_735400 endp

align 10h



sub_7354D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
test	ebp, ebp
jz	short loc_735553
mov	edx, [ecx]
shr	edx, 1Fh
and	dl, 1
push	ebx
push	edi
jz	short loc_7354FE
mov	eax, [ecx+8]
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_7354FA
or	ebx, 0FFFFFFFFh
jmp	short loc_735501

loc_7354FA:
mov	ebx, eax
jmp	short loc_735501

loc_7354FE:
mov	ebx, [ecx+8]

loc_735501:
lea	esi, [ecx+1Eh]
test	dl, dl
jnz	short loc_735523
mov	eax, [ecx+4]
lea	esi, [ecx+2Ah]

loc_73550E:
lea	esi, [esi+eax*8]
lea	eax, [esi+3]
and	eax, 0FFFFFFFCh
sub	eax, esi
test	dl, dl
jz	short loc_735529
movzx	edi, byte ptr [ecx+1Ch]
jmp	short loc_73552C

loc_735523:
movzx	eax, byte ptr [ecx+1Ch]
jmp	short loc_73550E

loc_735529:
mov	edi, [ecx+4]

loc_73552C:
test	dl, dl
jz	short loc_735535
add	ecx, 1Eh
jmp	short loc_735538

loc_735535:
add	ecx, 2Ah

loc_735538:
push	ebx
push	ebp
add	eax, esi
mov	esi, [esp+18h+arg_0]
push	eax
push	edi
push	ecx
mov	ecx, esi
call	sub_735400
pop	edi
pop	ebx
mov	eax, esi
pop	esi
pop	ebp
retn	8

loc_735553:
mov	esi, [esp+8+arg_0]
push	esi
call	sub_6F7660
mov	eax, esi
pop	esi
pop	ebp
retn	8
sub_7354D0 endp

align 10h



sub_735570 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
mov	[esi], ebx
mov	[esi+4], ebx
lea	ecx, [esi+14h]
mov	[esi+8], ebx
call	sub_7341C0
mov	[esi+78h], ebx
mov	[esi+7Eh], bl
mov	[esi+7Fh], bl
mov	[esi+80h], bl
mov	[esi+81h], bl
mov	[esi+83h], bl
xor	eax, eax
mov	[esi+7Ch], ax
mov	al, 10h
mov	[esi+82h], al
mov	[esi+8Eh], al
mov	[esi+84h], ebx
mov	[esi+8Ah], bl
mov	[esi+8Bh], bl
mov	[esi+8Ch], bl
mov	[esi+8Dh], bl
mov	[esi+8Fh], bl
xor	ecx, ecx
mov	[esi+88h], cx
mov	[esi+90h], ebx
xor	edx, edx
xor	eax, eax
mov	[esi+94h], dx
mov	[esi+96h], ax
mov	[esi+98h], ebx
lea	ecx, [esi+0A0h]
mov	[esi+9Ch], bl
call	sub_6FA2A0
fldz
mov	[esi+0CCh], ebx
or	eax, 0FFFFFFFFh
mov	[esi+0A4h], eax
fst	dword ptr [esi+18h]
fstp	dword ptr [esi+1Ch]
fldz
fadd	st, st
fstp	[esp+0Ch+var_4]
fld	[esp+0Ch+var_4]
fst	dword ptr [esi+20h]
fstp	dword ptr [esi+24h]
mov	[esi+0D0h], eax
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn
sub_735570 endp

align 10h



sub_735650 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+0Ch+arg_C]
mov	eax, ecx
neg	eax
sbb	eax, eax
and	eax, 0Ch
add	eax, 1Ah
push	ecx
mov	ecx, [esp+10h+arg_8]
lea	eax, [eax+ebx*8+7]
and	eax, 0FFFFFFFCh
lea	edx, [eax+ecx*4]
push	edx
lea	ecx, [edi+0C8h]
call	sub_733BF0
mov	esi, eax
mov	[esp+0Ch+arg_C], esi
test	esi, esi
jnz	short loc_735694
pop	edi
pop	esi
pop	ebx
retn	10h

loc_735694:
mov	eax, [esi]
shr	eax, 1Fh
test	al, 1
jz	short loc_7356A2
mov	[esi+1Ch], bl
jmp	short loc_7356A5

loc_7356A2:
mov	[esi+4], ebx

loc_7356A5:
mov	edx, [esp+0Ch+arg_0]
lea	ecx, [esp+0Ch+arg_C]
push	ecx
push	edx
mov	ecx, edi
call	sub_735390
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	10h
sub_735650 endp

align 10h


; Attributes: bp-based frame

sub_7356C0 proc	near

var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= qword ptr -248h
var_230= dword ptr -230h
var_22A= word ptr -22Ah
var_228= qword ptr -228h
var_21D= byte ptr -21Dh
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FA= byte ptr -1FAh
var_1F9= byte ptr -1F9h
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= word ptr -154h
var_152= word ptr -152h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_10C= byte ptr -10Ch
var_D8=	dword ptr -0D8h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B8=	dword ptr -0B8h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= byte ptr	 14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 234h
push	ebx
push	esi
push	edi
mov	ebx, ecx
mov	[esp+240h+var_20C], ebx
mov	eax, [ebp+arg_10]
fld	ds:flt_14407B8
mov	edx, [eax+4]
fstp	[esp+240h+var_1F4]
mov	ecx, [eax]
mov	[esp+240h+var_170], ecx
mov	ecx, [eax+8]
mov	[esp+240h+var_16C], edx
mov	edx, [eax+0Ch]
mov	[esp+240h+var_168], ecx
mov	ecx, [eax+10h]
mov	[esp+240h+var_164], edx
mov	edx, [eax+14h]
mov	[esp+240h+var_160], ecx
mov	ecx, [eax+18h]
mov	[esp+240h+var_15C], edx
mov	dx, [eax+1Ch]
mov	[esp+240h+var_158], ecx
mov	cx, [eax+1Eh]
mov	[esp+240h+var_154], dx
mov	edx, [eax+20h]
mov	al, [eax+24h]
mov	edi, [ebp+arg_0]
mov	[esp+240h+var_152], cx
mov	ecx, [edi+48h]
mov	byte ptr [esp+240h+var_14C], al
mov	eax, [edi+60h]
xor	esi, esi
mov	[esp+240h+var_150], edx
mov	edx, [ecx+0Ch]
mov	[esp+240h+var_174], edx
mov	[esp+240h+var_21D], 0
mov	[esp+240h+var_1F9], 0
mov	[esp+240h+var_1FA], 0
mov	[esp+240h+var_21C], esi
cmp	eax, esi
jz	short loc_7357A3
mov	ecx, [eax+48h]
mov	[ebx+10h], ecx
fld	dword ptr [eax+2Ch]
mov	dl, [eax+28h]
fstp	[esp+240h+var_1F4]
mov	cl, [eax+29h]
mov	esi, [eax+30h]
mov	[esp+240h+var_21D], dl
mov	[esp+240h+var_1F9], cl
mov	[esp+240h+var_21C], esi
jmp	short loc_7357A6

loc_7357A3:
mov	[ebx+10h], esi

loc_7357A6:
test	byte ptr dword_1856618,	1
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
fstp	[esp+240h+var_1D4]
fld	dword ptr [eax+4]
fstp	[esp+240h+var_1D0]
fld	dword ptr [eax+8]
fstp	[esp+240h+var_1CC]
fld	dword ptr [eax+0Ch]
fstp	[esp+240h+var_1C8]
fld	dword ptr [eax+10h]
fstp	[esp+240h+var_1C4]
fld	dword ptr [eax+14h]
fstp	[esp+240h+var_1C0]
jnz	short loc_7357FD
or	dword_1856618, 1
mov	ecx, offset unk_18565D4	; void *
mov	byte_18565D0, 0
call	sub_64F7C0
mov	byte_1856614, 0

loc_7357FD:
cmp	[esp+240h+var_1F9], 0
jz	short loc_73581E
mov	ecx, offset unk_1856550
call	sub_733E40
lea	edx, [esp+240h+var_1D4]
push	edx
push	edi
mov	ecx, offset unk_1856550
call	sub_734220

loc_73581E:
fld	[esp+240h+var_1D4]
mov	eax, [ebx+28h]
fst	[esp+240h+var_148]
fld	[esp+240h+var_1D0]
fst	[esp+240h+var_144]
fld	[esp+240h+var_1C8]
fst	[esp+240h+var_13C]
fld	[esp+240h+var_1C4]
fst	[esp+240h+var_138]
fild	dword ptr [ebx+28h]
test	eax, eax
jge	short loc_73585A
fadd	ds:flt_15FCC08

loc_73585A:
fchs
mov	eax, [ebx+14h]
fstp	[esp+240h+var_230]
xor	ecx, ecx
fld	[esp+240h+var_230]
fld	st
fmulp	st(5), st
fldz
fmul	st(4), st
fxch	st(5)
faddp	st(4), st
fld	[esp+240h+var_1CC]
faddp	st(4), st
fxch	st(3)
fstp	[esp+240h+var_140]
fxch	st(1)
fmulp	st(2), st
fmulp	st(2), st
faddp	st(1), st
fadd	[esp+240h+var_1C0]
fstp	[esp+240h+var_134]
test	eax, eax
jz	short loc_7358CC
mov	edx, [ebx+4]
cmp	eax, edx
jnb	short loc_7358CC
test	eax, eax
jl	short loc_7358CC
test	edx, edx
jbe	short loc_7358CC
mov	esi, [ebx]
mov	eax, [esi+eax*4]
mov	esi, [esi]
mov	ecx, [eax]
mov	edx, [esi]
mov	esi, [esi+10h]
mov	eax, [eax+10h]
shr	ecx, 1Fh
shr	edx, 1Fh
sub	eax, esi
mov	esi, [esp+240h+var_21C]
mov	ecx, eax

loc_7358CC:
mov	dword ptr [esp+240h+var_228], ecx
fild	dword ptr [esp+240h+var_228]
test	ecx, ecx
jge	short loc_7358DE
fadd	ds:flt_15FCC08

loc_7358DE:
fchs
lea	eax, [esp+240h+var_1D4]
fstp	[esp+240h+var_1D8]
fld	dword ptr [edi+88h]
fmul	ds:dbl_15FCE20
fstp	[esp+240h+var_230]
call	sub_734F40
fmul	[esp+240h+var_230]
fstp	[esp+240h+var_208]
fld	ds:flt_1432128
fcom	[esp+240h+var_208]
fnstsw	ax
test	ah, 41h
jnz	short loc_73591C
fstp	[esp+240h+var_208]
jmp	short loc_73591E

loc_73591C:
fstp	st

loc_73591E:
fld	[esp+240h+var_1C0]
fld	[esp+240h+var_1C4]
fld	[esp+240h+var_1C8]
fld	[esp+240h+var_1CC]
fld	[esp+240h+var_1D0]
fld	[esp+240h+var_1D4]
test	esi, esi
jz	loc_7359EA
test	byte ptr [esp+240h+var_16C+3], 1
jnz	loc_7359EA
fld	st
fld	dword ptr [ebx+2Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7359A3
fld	st(1)
fld	dword ptr [ebx+30h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7359A3
fld	st(2)
fld	dword ptr [ebx+34h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7359A3
fld	st(3)
fld	dword ptr [ebx+38h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7359A3
fld	st(4)
fld	dword ptr [ebx+3Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7359A3
fld	st(5)
fld	dword ptr [ebx+40h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_7359BA

loc_7359A3:
test	byte ptr [ebx+74h], 8
mov	dword ptr [ebx+70h], 0
jz	short loc_7359CB
or	byte ptr [ebx+74h], 1
and	byte ptr [ebx+74h], 0F7h
jmp	short loc_7359CB

loc_7359BA:
cmp	[ebp+arg_C], 0
jz	short loc_7359CB
inc	dword ptr [ebx+70h]
cmp	[ebx+70h], esi
jbe	short loc_7359CE
mov	[ebx+70h], esi

loc_7359CB:
cmp	[ebx+70h], esi

loc_7359CE:
jb	short loc_7359EA
or	byte ptr [esp+240h+var_16C+3], 1
or	byte ptr [esp+240h+var_160+3], 1
test	byte ptr [ebx+74h], 8
jnz	short loc_7359EA
or	byte ptr [ebx+74h], 9

loc_7359EA:
test	byte ptr [esp+240h+var_16C+3], 1
fst	[esp+240h+var_B0]
fxch	st(1)
fst	[esp+240h+var_AC]
fxch	st(2)
fst	[esp+240h+var_A8]
fxch	st(3)
fst	[esp+240h+var_A4]
fxch	st(4)
fst	[esp+240h+var_A0]
fxch	st(5)
fst	[esp+240h+var_9C]
jz	loc_735F44
fld	dword ptr [ebx+2Ch]
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	loc_735B01
fld	dword ptr [ebx+30h]
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	loc_735B09
fld	st(1)
fld	dword ptr [ebx+34h]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_735B09
fld	dword ptr [ebx+38h]
fucomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 44h
jp	loc_735B0F
fld	dword ptr [ebx+3Ch]
fucomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 44h
jp	loc_735B11
fld	st
fld	dword ptr [ebx+40h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735B11
mov	esi, [ebp+arg_0]
fld	dword ptr [esi+78h]
add	esi, 78h
fld	dword ptr [ebx+44h]
lea	edi, [ebx+44h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735B11
fld	dword ptr [esi+4]
fld	dword ptr [edi+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735B11
fld	dword ptr [esi+8]
fld	dword ptr [edi+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735B11
fld	dword ptr [esi+0Ch]
fld	dword ptr [edi+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735B11
fld	dword ptr [esi+10h]
fld	dword ptr [edi+10h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735B11
fld	dword ptr [esi+14h]
fld	dword ptr [edi+14h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735B11
mov	byte ptr [esp+240h+var_22A], 0
jmp	loc_735E84

loc_735B01:
fstp	st
fstp	st(1)
fstp	st
jmp	short loc_735B11

loc_735B09:
fstp	st
fstp	st
jmp	short loc_735B11

loc_735B0F:
fstp	st(1)

loc_735B11:
fstp	st
lea	eax, [esp+240h+var_21C]
fstp	st
push	eax
fld	dword ptr [ebx+18h]
lea	ecx, [esp+244h+var_1F0]
fstp	[esp+244h+var_21C]
lea	edi, [ebx+44h]
fld	dword ptr [ebx+1Ch]
push	ecx
fstp	[esp+248h+var_218]
mov	ecx, edi
fld	dword ptr [ebx+20h]
fstp	[esp+248h+var_214]
fld	dword ptr [ebx+1Ch]
fstp	[esp+248h+var_210]
fld	dword ptr [ebx+20h]
fstp	[esp+248h+var_204]
fld	dword ptr [ebx+24h]
fstp	[esp+248h+var_200]
fld	[esp+248h+var_21C]
fst	[esp+248h+var_1E8]
fld	[esp+248h+var_218]
fst	[esp+248h+var_1E4]
fld	[esp+248h+var_214]
fstp	dword ptr [esp+248h+var_228]
fld	[esp+248h+var_210]
fstp	dword ptr [esp+248h+var_228+4]
fld	[esp+248h+var_204]
fstp	[esp+248h+var_1A8]
fld	[esp+248h+var_200]
fstp	[esp+248h+var_1A4]
fxch	st(1)
fst	[esp+248h+var_230]
fld	dword ptr [ebx+30h]
fmul	st, st(2)
fld	dword ptr [ebx+2Ch]
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+248h+var_21C]
fmul	dword ptr [ebx+3Ch]
fld	dword ptr [ebx+38h]
fmul	[esp+248h+var_230]
faddp	st(1), st
fstp	[esp+248h+var_218]
call	sub_64E9B0
fld	[esp+240h+var_1F0]
lea	edx, [esp+240h+var_214]
fstp	[esp+240h+var_21C]
push	edx
fld	[esp+244h+var_1EC]
lea	eax, [esp+244h+var_1F0]
fstp	[esp+244h+var_218]
push	eax
fld	[esp+248h+var_214]
mov	ecx, edi
fst	[esp+248h+var_230]
fld	dword ptr [ebx+30h]
fld	[esp+248h+var_210]
fld	st
fmulp	st(2), st
fld	dword ptr [ebx+2Ch]
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+248h+var_214]
fmul	dword ptr [ebx+3Ch]
fld	dword ptr [ebx+38h]
fmul	[esp+248h+var_230]
faddp	st(1), st
fstp	[esp+248h+var_210]
call	sub_64E9B0
fld	[esp+240h+var_1F0]
fstp	[esp+240h+var_214]
fld	[esp+240h+var_1EC]
fstp	[esp+240h+var_210]
fld	[esp+240h+var_204]
fst	[esp+240h+var_230]
fld	dword ptr [ebx+30h]
fld	[esp+240h+var_200]
fld	st
lea	ecx, [esp+240h+var_204]
fmulp	st(2), st
push	ecx
fld	dword ptr [ebx+2Ch]
lea	edx, [esp+244h+var_1F0]
fmulp	st(3), st
push	edx
fxch	st(1)
mov	ecx, edi
faddp	st(2), st
fxch	st(1)
fstp	[esp+248h+var_204]
fmul	dword ptr [ebx+3Ch]
fld	dword ptr [ebx+38h]
fmul	[esp+248h+var_230]
faddp	st(1), st
fstp	[esp+248h+var_200]
call	sub_64E9B0
fld	[esp+240h+var_1F0]
mov	esi, [ebp+arg_0]
fstp	[esp+240h+var_204]
lea	eax, [esp+240h+var_1E8]
fld	[esp+240h+var_1EC]
push	eax
fstp	[esp+244h+var_200]
lea	ecx, [esp+244h+var_1F0]
fld	[esp+244h+var_1E8]
add	esi, 78h
fst	[esp+244h+var_230]
push	ecx
fld	[esp+248h+var_1E4]
mov	ecx, esi
fld	st
fmul	[esp+248h+var_1D0]
fld	[esp+248h+var_1D4]
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	[esp+248h+var_1E8]
fmul	[esp+248h+var_1C4]
fld	[esp+248h+var_230]
fmul	[esp+248h+var_1C8]
faddp	st(1), st
fstp	[esp+248h+var_1E4]
call	sub_64E9B0
fld	[esp+240h+var_1F0]
lea	edx, [esp+240h+var_228]
fstp	[esp+240h+var_1E8]
push	edx
fld	[esp+244h+var_1EC]
lea	eax, [esp+244h+var_1F0]
fstp	[esp+244h+var_1E4]
push	eax
fld	dword ptr [esp+248h+var_228]
mov	ecx, esi
fst	[esp+248h+var_230]
fld	dword ptr [esp+248h+var_228+4]
fld	st
fmul	[esp+248h+var_1D0]
fld	[esp+248h+var_1D4]
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esp+248h+var_228]
fmul	[esp+248h+var_1C4]
fld	[esp+248h+var_230]
fmul	[esp+248h+var_1C8]
faddp	st(1), st
fstp	dword ptr [esp+248h+var_228+4]
call	sub_64E9B0
fld	[esp+240h+var_1F0]
fstp	dword ptr [esp+240h+var_228]
fld	[esp+240h+var_1EC]
fstp	dword ptr [esp+240h+var_228+4]
fld	[esp+240h+var_1A8]
fst	[esp+240h+var_230]
fld	[esp+240h+var_1A4]
fld	st
fmul	[esp+240h+var_1D0]
fld	[esp+240h+var_1D4]
fmulp	st(3), st
lea	ecx, [esp+240h+var_1A8]
push	ecx
lea	edx, [esp+244h+var_1F0]
faddp	st(2), st
push	edx
fxch	st(1)
mov	ecx, esi
fstp	[esp+248h+var_1A8]
fmul	[esp+248h+var_1C4]
fld	[esp+248h+var_230]
fmul	[esp+248h+var_1C8]
faddp	st(1), st
fstp	[esp+248h+var_1A4]
call	sub_64E9B0
fld	[esp+240h+var_214]
fsub	dword ptr [esp+240h+var_228]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fabs
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fld	[esp+240h+var_210]
fsub	dword ptr [esp+240h+var_228+4]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fabs
fstp	[esp+240h+var_230]
fadd	[esp+240h+var_230]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fld	[esp+240h+var_21C]
fsub	[esp+240h+var_1E8]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fabs
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fld	[esp+240h+var_218]
fsub	[esp+240h+var_1E4]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fabs
fstp	[esp+240h+var_230]
fadd	[esp+240h+var_230]
fstp	[esp+240h+var_230]
fadd	[esp+240h+var_230]
fld	[esp+240h+var_204]
fsub	[esp+240h+var_1F0]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fabs
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fld	[esp+240h+var_200]
fsub	[esp+240h+var_1EC]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fabs
fstp	[esp+240h+var_230]
fadd	[esp+240h+var_230]
fstp	[esp+240h+var_230]
fadd	[esp+240h+var_230]
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fcomp	ds:flt_15FCC80
fnstsw	ax
test	ah, 41h
jnz	short loc_735E72
fld	[esp+240h+var_1D4]
mov	byte ptr [esp+240h+var_22A], 1
fstp	dword ptr [ebx+2Ch]
fld	[esp+240h+var_1D0]
fstp	dword ptr [ebx+30h]
fld	[esp+240h+var_1CC]
fstp	dword ptr [ebx+34h]
fld	[esp+240h+var_1C8]
fstp	dword ptr [ebx+38h]
fld	[esp+240h+var_1C4]
fstp	dword ptr [ebx+3Ch]
fld	[esp+240h+var_1C0]
jmp	loc_735FE4

loc_735E72:
fld	[esp+240h+var_1C0]
mov	byte ptr [esp+240h+var_22A], 0
fld	[esp+240h+var_1CC]
fxch	st(1)

loc_735E84:
fld	dword ptr [ebx+2Ch]
mov	eax, [ebp+arg_0]
fstp	[esp+240h+var_B0]
sub	esp, 8
fld	dword ptr [ebx+30h]
fstp	[esp+248h+var_AC]
fld	dword ptr [ebx+38h]
fstp	[esp+248h+var_A4]
fld	dword ptr [ebx+3Ch]
fstp	[esp+248h+var_A0]
fld	dword ptr [ebx+60h]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+248h+var_214]
fsub	dword ptr [ebx+64h]
fstp	[esp+248h+var_210]
fld	dword ptr [esi]
fstp	[esp+248h+var_21C]
fld	dword ptr [eax+88h]
fstp	[esp+248h+var_1E8]
fld	[esp+248h+var_214]
fmul	[esp+248h+var_21C]
fadd	ds:dbl_15FCC48
fstp	[esp+248h+var_230]
fld	[esp+248h+var_230]
fstp	[esp+248h+var_248]
call	_floor
fstp	[esp+248h+var_230]
fld	[esp+248h+var_230]
fdiv	[esp+248h+var_21C]
fadd	dword ptr [ebx+60h]
fstp	[esp+248h+var_A8]
fld	[esp+248h+var_210]
fmul	[esp+248h+var_1E8]
fadd	ds:dbl_15FCC48
fstp	[esp+248h+var_230]
fld	[esp+248h+var_230]
fstp	[esp+248h+var_248]
call	_floor
fstp	[esp+248h+var_230]
add	esp, 8
fld	[esp+240h+var_230]
fdiv	[esp+240h+var_1E8]
fadd	dword ptr [ebx+64h]
fstp	[esp+240h+var_9C]
jmp	loc_735FE7

loc_735F44:
fld	dword ptr [ebx+44h]
mov	esi, edi
fld	dword ptr [esi+78h]
add	esi, 78h
lea	edi, [ebx+44h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735FAB
fld	dword ptr [edi+4]
fld	dword ptr [esi+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735FAB
fld	dword ptr [edi+8]
fld	dword ptr [esi+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735FAB
fld	dword ptr [edi+0Ch]
fld	dword ptr [esi+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735FAB
fld	dword ptr [edi+10h]
fld	dword ptr [esi+10h]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_735FAB
fld	dword ptr [edi+14h]
mov	byte ptr [esp+240h+var_22A], 0
fld	dword ptr [esi+14h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_735FB0

loc_735FAB:
mov	byte ptr [esp+240h+var_22A], 1

loc_735FB0:
test	byte ptr [ebx+74h], 10h
jz	short loc_735FCB
fld	[esp+240h+var_208]
fld	dword ptr [ebx+5Ch]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_735FCB
mov	byte ptr [esp+240h+var_22A], 1

loc_735FCB:
fxch	st(1)
fstp	dword ptr [ebx+2Ch]
fxch	st(1)
fstp	dword ptr [ebx+30h]
fxch	st(1)
fstp	dword ptr [ebx+34h]
fxch	st(1)
fstp	dword ptr [ebx+38h]
fxch	st(1)
fstp	dword ptr [ebx+3Ch]

loc_735FE4:
fstp	dword ptr [ebx+40h]

loc_735FE7:
fld	[esp+240h+var_208]
fstp	dword ptr [ebx+5Ch]
fld	dword ptr [esi]
fstp	dword ptr [edi]
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
fld	dword ptr [esi+10h]
fstp	dword ptr [edi+10h]
fld	dword ptr [esi+14h]
mov	esi, [ebp+arg_14]
fstp	dword ptr [edi+14h]
test	esi, esi
jz	short loc_73602C
mov	ecx, esi
call	sub_73EE40
cmp	byte ptr [esi+18h], 0
mov	[esp+240h+var_1FA], al
jnz	short loc_73602C
or	byte ptr [ebx+74h], 1

loc_73602C:
test	byte ptr [ebx+74h], 1
jnz	short loc_736044
cmp	byte ptr [esp+240h+var_22A], 0
jnz	short loc_736044
mov	ecx, [ebx+0D0h]
cmp	ecx, [ebx+28h]
jz	short loc_73605D

loc_736044:
mov	ecx, [ebx+0CCh]
xor	esi, esi
cmp	ecx, esi
jz	short loc_736055
call	sub_64A400

loc_736055:
mov	[ebx+0CCh], esi
jmp	short loc_73605F

loc_73605D:
xor	esi, esi

loc_73605F:
test	byte ptr [ebx+74h], 1
jnz	short loc_7360CF
lea	edx, [ebx+78h]
push	edx
lea	ecx, [esp+244h+var_170]
call	sub_733DE0
test	al, al
jz	short loc_7360CF
cmp	byte ptr [esp+240h+var_22A], 0
jnz	short loc_7360CF
mov	eax, [ebx+0Ch]
cmp	eax, esi
jz	short loc_7360CF
mov	ecx, [ebx+10h]
cmp	ecx, esi
jz	short loc_7360CF
mov	edi, [ebp+arg_0]
cmp	[edi+94h], esi
ja	short loc_7360D2
mov	edx, [ebx+0D0h]
cmp	edx, [ebx+28h]
jnz	short loc_7360D2
test	byte ptr [esp+240h+var_16C+3], 1
jz	short loc_7360B2
fldz
jmp	short loc_7360B6

loc_7360B2:
fld	[esp+240h+var_208]

loc_7360B6:		; float
push	ecx
fstp	[esp+244h+var_21C]
fld	[esp+244h+var_21C]
fstp	dword ptr [esp+244h+var_248+4]
push	edi		; int
push	eax		; int
call	sub_7442D0
test	al, al
jnz	short loc_7360E9
jmp	short loc_7360D2

loc_7360CF:
mov	edi, [ebp+arg_0]

loc_7360D2:
mov	ecx, [ebx+10h]
cmp	ecx, esi
jz	short loc_7360E2
mov	eax, [ebx+0Ch]
push	eax
call	sub_743350

loc_7360E2:
mov	[ebx+0Ch], esi
and	byte ptr [ebx+74h], 0FEh

loc_7360E9:
mov	ecx, [ebx+28h]
mov	[ebx+0D0h], ecx
mov	[esp+240h+var_1F8], esi
cmp	[ebx+0Ch], esi
jnz	loc_7365D2
cmp	[edi+94h], esi
jnz	loc_7365D2
and	byte ptr [ebx+74h], 0FDh
fld	[esp+240h+var_1D8]
lea	eax, [ebx+14h]
fstp	[esp+240h+var_1B0]
mov	ecx, ebx
mov	bl, [ebx+74h]
shr	bl, 2
and	bl, 1
mov	[esp+240h+var_1B8], esi
mov	esi, [eax]
and	byte ptr [eax+60h], 0EFh
mov	[esp+240h+var_1BC], ecx
mov	byte ptr [esp+240h+var_1AC], bl

loc_736143:
mov	[esp+240h+var_1B4], esi
lea	ebx, [ebx+0]

loc_736150:
test	ecx, ecx
jz	loc_736478
cmp	esi, [ecx+4]
jnb	loc_736478
test	esi, esi
jl	loc_736478
test	bl, bl
jnz	short loc_736186
fld	[esp+240h+var_1B0]
push	ecx		; float
fstp	dword ptr [esp+244h+var_248+4]
push	esi		; int
call	sub_733F00
test	al, al
jz	loc_736478

loc_736186:
mov	eax, [ecx]
mov	ecx, [eax+esi*4]
lea	edx, [esp+240h+var_118]
push	edx
call	sub_6F7660

loc_736198:
mov	eax, [esp+240h+var_118]

loc_73619F:
test	eax, eax
jz	loc_736417
cmp	eax, [esp+240h+var_114]
jnb	loc_736417
lea	edi, [eax+6]
mov	ecx, 7FFFh
and	[edi], cx
cmp	[esp+240h+var_C4], 0
mov	edx, eax
jz	short loc_7361D6
mov	eax, [esp+240h+var_20C]
add	eax, 14h
or	byte ptr [eax+60h], 2

loc_7361D6:
movzx	eax, word ptr [edx]
mov	ecx, 0FFFFh
cmp	ax, cx
jnb	loc_73638D
movzx	eax, ax
mov	[esp+240h+var_1E8], eax
cmp	eax, 0FFFFFFFFh
jz	loc_73638D
movzx	ecx, word ptr [edi]
mov	eax, ecx
shr	eax, 9
test	al, 1
jnz	loc_73638D
cmp	[esp+240h+var_C8], 0
jnz	loc_73638D
mov	eax, [esp+240h+var_CC]
test	eax, eax
jz	short loc_736225
mov	ebx, [eax+1Ch]
jmp	short loc_736227

loc_736225:
xor	ebx, ebx

loc_736227:
movzx	eax, word ptr [edx+4]
and	eax, 0FFFh
test	cl, 10h
jnz	short loc_736249
mov	dword ptr [esp+240h+var_228], eax
fild	dword ptr [esp+240h+var_228]
test	eax, eax
jge	short loc_736261
fadd	ds:flt_15FCC08
jmp	short loc_736261

loc_736249:
mov	dword ptr [esp+240h+var_228], eax
fild	dword ptr [esp+240h+var_228]
test	eax, eax
jge	short loc_73625B
fadd	ds:flt_15FCC08

loc_73625B:
fmul	ds:dbl_15FD690

loc_736261:
fnstcw	[esp+240h+var_22A]
movzx	eax, [esp+240h+var_22A]
fstp	[esp+240h+var_21C]
fld	[esp+240h+var_21C]
or	eax, 0C00h
mov	[esp+240h+var_230], eax
fldcw	word ptr [esp+240h+var_230]
fistp	qword ptr [esp+240h+var_B8]
mov	esi, [esp+240h+var_B8]
fldcw	[esp+240h+var_22A]
test	esi, esi
jz	loc_73638D
cmp	dword ptr [ebx+10h], 0
jz	short loc_736304
mov	dword ptr [esp+240h+var_228], esi
fild	dword ptr [esp+240h+var_228]
test	esi, esi
jge	short loc_7362B1
fadd	ds:flt_15FCC08

loc_7362B1:
fmul	[esp+240h+var_208]
push	ebx
fstp	[esp+244h+var_230]
fld	[esp+244h+var_230]
fstp	[esp+244h+var_230]
call	sub_71BD30
fmul	[esp+240h+var_1F4]
fld	[esp+240h+var_230]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_7362F5
mov	ecx, [ebx+0Ch]
mov	edx, [ecx+14h]
shr	edx, 0Ch
test	dl, 1
jnz	short loc_7362F5
mov	ecx, [esp+240h+var_20C]
add	ecx, 14h
xor	al, al
or	byte ptr [ecx+60h], 10h
jmp	short loc_736370

loc_7362F5:
mov	ecx, [esp+240h+var_20C]
add	ecx, 14h
or	byte ptr [ecx+60h], 10h
mov	al, 1
jmp	short loc_736370

loc_736304:
cmp	[esp+240h+var_21D], 0
jz	short loc_736382
mov	eax, [esp+240h+var_20C]
cmp	dword ptr [eax+10h], 0
jz	short loc_736382
fldz
mov	ecx, [ebx+0Ch]
fst	[esp+240h+var_188]
lea	eax, [esp+240h+var_188]
fst	[esp+240h+var_184]
push	eax
mov	eax, [esp+244h+var_1E8]
fst	[esp+244h+var_180]
fstp	[esp+244h+var_17C]
push	eax
mov	edx, [ecx]
mov	edx, [edx+30h]
call	edx
fld	[esp+240h+var_1F4]
mov	edx, [esp+240h+var_20C]
push	ecx		; float
fstp	dword ptr [esp+244h+var_248+4]
lea	ecx, [esp+244h+var_170]
fld	[esp+244h+var_208]
push	ecx		; int
push	ecx		; float
mov	ecx, [edx+10h]
fstp	[esp+24Ch+var_24C]
push	esi		; int
push	eax		; int
call	sub_7415E0

loc_736370:
test	al, al
jz	short loc_736382
mov	eax, 8000h
or	[edi], ax
inc	[esp+240h+var_1F8]
jmp	short loc_73638D

loc_736382:
mov	eax, [esp+240h+var_20C]
add	eax, 14h
or	byte ptr [eax+60h], 10h

loc_73638D:
mov	eax, [esp+240h+var_118]
test	eax, eax
jz	short loc_736417
cmp	eax, [esp+240h+var_114]
jnb	loc_73619F
mov	ecx, [esp+240h+var_C0]
test	ecx, ecx
jnz	short loc_7363BE
movzx	ecx, word ptr [eax+4]
shr	ecx, 0Ch
mov	[esp+240h+var_C0], ecx

loc_7363BE:
add	eax, 8
mov	edx, 0F000h
mov	[esp+240h+var_118], eax
test	[eax+4], dx
jbe	short loc_736406
test	ecx, ecx
jbe	short loc_736406
lea	ecx, [esp+240h+var_10C]
call	sub_73ED30
test	al, al
jnz	short loc_736406
mov	eax, [esp+240h+var_C0]
push	eax
lea	ecx, [esp+244h+var_10C]
call	sub_73F2D0
mov	[esp+240h+var_C0], 0

loc_736406:
lea	ecx, [esp+240h+var_118]
call	sub_735210
jmp	loc_736198

loc_736417:
mov	ecx, [esp+240h+var_C8]
test	ecx, ecx
jz	short loc_736427
call	sub_64A400

loc_736427:
cmp	[esp+240h+var_CC], 0
jz	short loc_736454
mov	esi, [esp+240h+var_CC]
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jnz	short loc_736454
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_736454:
mov	esi, [esp+240h+var_1B4]
mov	ecx, [esp+240h+var_1BC]
mov	bl, byte ptr [esp+240h+var_1AC]
cmp	esi, [ecx+4]
jnb	loc_736150
inc	esi
jmp	loc_736143

loc_736478:
mov	esi, [esp+240h+var_20C]
fld	[esp+240h+var_1D8]
mov	ecx, [esp+240h+var_170]
fst	[esp+240h+var_17C]
mov	edx, [esp+240h+var_16C]
mov	eax, [esp+240h+var_168]
mov	[esi+78h], ecx
mov	ecx, [esp+240h+var_164]
mov	[esi+7Ch], edx
mov	edx, [esp+240h+var_160]
mov	[esi+84h], ecx
mov	ecx, [esp+240h+var_158]
mov	[esi+88h], edx
mov	dx, [esp+240h+var_154]
mov	[esi+80h], eax
mov	eax, [esp+240h+var_15C]
mov	[esi+8Ch], eax
mov	ax, [esp+240h+var_152]
mov	[esi+90h], ecx
mov	ecx, [esp+240h+var_150]
mov	[esi+94h], dx
movzx	edx, byte ptr [esp+240h+var_14C]
mov	[esi+96h], ax
mov	[esi+98h], ecx
mov	[esi+9Ch], dl
movzx	edx, byte ptr [esi+74h]
fld	dword ptr [esi+18h]
fstp	[esp+240h+var_1F0]
mov	edi, [esi+14h]
fadd	dword ptr [esi+1Ch]
shr	dl, 2
xor	ecx, ecx
and	dl, 1
cmp	dword ptr [esi+10h], 0
fstp	[esp+240h+var_1EC]
lea	eax, [esi+14h]
mov	byte ptr [esp+240h+var_178], dl
mov	edx, [esp+240h+var_178]
mov	[esp+240h+var_1B8], ecx
mov	ecx, [esp+240h+var_17C]
mov	[esp+240h+var_1BC], esi
mov	[esp+240h+var_1B4], edi
mov	[esp+240h+var_1B0], ecx
mov	[esp+240h+var_1AC], edx
jz	short loc_7365BA
mov	ecx, [ebp+arg_14]
mov	edx, [esp+240h+var_1F8]
push	edx		; int
mov	[esp+244h+var_1B8], ecx
lea	ecx, [esp+244h+var_170]
push	ecx		; int
push	eax		; float
mov	eax, [ebp+arg_0]
lea	edx, [esp+24Ch+var_1F0]
push	edx		; int
mov	edx, [esi+0Ch]
push	eax		; int
lea	ecx, [esp+254h+var_1BC]
push	ecx		; int
mov	ecx, dword_1855FC0
mov	eax, [ecx]
push	edx		; int
mov	edx, [eax+3Ch]
push	esi
call	edx
mov	ecx, [esi+10h]
push	eax		; int
call	sub_746B80
mov	[esi+0Ch], eax

loc_7365BA:
fld	[esp+240h+var_1CC]
mov	edi, [ebp+arg_0]
fstp	dword ptr [esi+60h]
mov	ebx, esi
fld	[esp+240h+var_1C0]
fstp	dword ptr [esi+64h]
xor	esi, esi

loc_7365D2:
mov	ecx, [ebx+10h]
cmp	ecx, esi
mov	esi, [ebp+arg_8]
mov	byte ptr [esp+240h+var_22A], 0
jz	short loc_7365F4
mov	edx, [ebx+0Ch]
push	esi
lea	eax, [esp+244h+var_B0]
push	eax
push	edi
push	edx
call	sub_742A50

loc_7365F4:
cmp	dword ptr [ebx+10h], 0
jz	short loc_736619
mov	eax, [ebx+0Ch]
test	eax, eax
jz	short loc_736619
mov	eax, [eax+8]
test	eax, eax
jz	loc_736FEE
cmp	byte ptr [eax+4Ch], 0
jz	loc_736FEE
mov	edi, [ebp+arg_0]

loc_736619:
fld	[esp+240h+var_1D8]
push	ecx		; float
mov	ecx, ebx
fstp	dword ptr [esp+244h+var_248+4]
call	sub_733FA0
test	al, al
jz	short loc_73664E
xor	eax, eax
cmp	[edi+9Ch], eax
lea	ecx, [ebx+18h]
setnz	al
lea	edx, [esp+240h+var_1D4]
push	eax
push	ecx
push	edx
push	edi
call	sub_734440
add	esp, 10h
mov	byte ptr [esp+240h+var_22A], al

loc_73664E:
mov	eax, [ebx+14h]
fldz
mov	bl, [ebx+74h]
fst	[esp+240h+var_188]
shr	bl, 2
fst	[esp+240h+var_184]
mov	ecx, 8
fst	[esp+240h+var_180]
lea	edi, [esp+240h+var_20]
fstp	[esp+240h+var_17C]
and	bl, 1
rep movsd
mov	[esp+240h+var_1B4], eax
mov	byte ptr [esp+240h+var_1AC], bl
jmp	short loc_7366A0
align 10h

loc_7366A0:
mov	esi, [esp+240h+var_1B4]
mov	ebx, [esp+240h+var_20C]
cmp	esi, [ebx+4]
jnb	loc_736FEE
test	esi, esi
jl	loc_736FEE
cmp	byte ptr [esp+240h+var_1AC], 0
jnz	short loc_7366DE
fld	[esp+240h+var_1D8]
push	ecx		; float
fstp	dword ptr [esp+244h+var_248+4]
push	esi		; int
mov	ecx, ebx
call	sub_733F00
test	al, al
jz	loc_736FEE

loc_7366DE:
mov	ecx, [ebx]
mov	ecx, [ecx+esi*4]
mov	edx, [ecx+0Ch]
mov	eax, [ecx]
mov	[esp+240h+var_21C], edx
fild	[esp+240h+var_21C]
mov	edx, [ecx+10h]
mov	[esp+240h+var_21C], edx
fstp	[esp+240h+var_214]
lea	edx, [ebx+18h]
fild	[esp+240h+var_21C]
shr	eax, 1Fh
and	al, 1
fstp	[esp+240h+var_210]
fld	dword ptr [edx]
fstp	[esp+240h+var_204]
fld	dword ptr [edx+4]
fstp	[esp+240h+var_200]
fld	[esp+240h+var_214]
fadd	[esp+240h+var_204]
fstp	[esp+240h+var_214]
fld	[esp+240h+var_200]
fadd	[esp+240h+var_210]
fstp	[esp+240h+var_210]
test	al, al
jz	short loc_736742
movzx	eax, word ptr [ecx+1Ah]
mov	[esp+240h+var_230], eax
fild	[esp+240h+var_230]
jmp	short loc_73674E

loc_736742:
movzx	edx, word ptr [ecx+26h]
mov	[esp+240h+var_230], edx
fild	[esp+240h+var_230]

loc_73674E:
mov	eax, [ebp+arg_14]
fstp	[esp+240h+var_21C]
fld	[esp+240h+var_21C]
push	eax
fadd	[esp+244h+var_1D8]
lea	edx, [esp+244h+var_118]
push	edx
fadd	[esp+248h+var_210]
fstp	[esp+248h+var_210]
call	sub_7354D0
jmp	short loc_736780
align 10h

loc_736780:
cmp	[esp+240h+var_118], 0
jz	loc_736F3B
mov	eax, [esp+240h+var_114]
cmp	[esp+240h+var_118], eax
jnb	loc_736F3B
mov	edx, [esp+240h+var_118]
movzx	ecx, word ptr [edx+6]
lea	eax, [edx+6]
mov	[esp+240h+var_1A8], eax
mov	al, cl
shr	al, 6
test	al, 1
jnz	short loc_7367CA
movzx	edx, word ptr [edx+2]
mov	[esp+240h+var_1E8], edx
jmp	short loc_7367D4

loc_7367CA:
movzx	eax, word ptr [edx+2]
neg	eax
mov	[esp+240h+var_1E8], eax

loc_7367D4:
mov	edx, ecx
shr	edx, 0Fh
test	dl, 1
jnz	loc_736E9A
mov	eax, ecx
shr	eax, 9
test	al, 1
jz	short loc_736803
cmp	[esp+240h+var_C4], 0
jnz	short loc_736803
cmp	[esp+240h+var_C8], 0
jz	loc_736E9A

loc_736803:
fld1
mov	edx, [esp+240h+var_118]
movzx	eax, word ptr [edx]
fstp	[esp+240h+var_1F8]
fldz
mov	esi, 0FFFFh
fstp	[esp+240h+var_1E0]
cmp	ax, si
jnb	short loc_73682C
movzx	eax, ax
mov	[esp+240h+var_208], eax
jmp	short loc_736834

loc_73682C:
mov	[esp+240h+var_208], 0FFFFFFFFh

loc_736834:
mov	eax, [esp+240h+var_C8]
xor	ebx, ebx
mov	[esp+240h+var_1DC], ebx
cmp	eax, ebx
jz	short loc_7368BC
mov	ecx, [eax+18h]
fild	dword ptr [eax+18h]
mov	[esp+240h+var_1DC], eax
test	ecx, ecx
jge	short loc_736859
fadd	ds:flt_15FCC08

loc_736859:
fstp	[esp+240h+var_1E0]

loc_73685D:
mov	edi, [esp+240h+var_20C]

loc_736861:
mov	ecx, [edi+28h]
fld	[esp+240h+var_214]
fild	dword ptr [edi+28h]
test	ecx, ecx
jge	short loc_736875
fadd	ds:flt_15FCC08

loc_736875:
mov	dl, [edi+74h]
fsubp	st(1), st
mov	cl, dl
shr	cl, 2
and	cl, 1
fstp	[esp+240h+var_230]
fld	[esp+240h+var_1E0]
fld	[esp+240h+var_230]
jnz	loc_736A4E
cmp	[esp+240h+var_208], 0FFFFFFFFh
jz	loc_736A3E
fld	st
fadd	st, st(2)
fld	dword ptr [edi+18h]
fcompp
fnstsw	ax
test	ah, 1
jnz	loc_736A3E
fstp	st
fstp	st
jmp	loc_736E8F

loc_7368BC:
movzx	eax, word ptr [edx+4]
and	eax, 0FFFh
test	cl, 10h
jnz	short loc_7368DE
mov	[esp+240h+var_230], eax
fild	[esp+240h+var_230]
test	eax, eax
jge	short loc_7368F6
fadd	ds:flt_15FCC08
jmp	short loc_7368F6

loc_7368DE:
mov	[esp+240h+var_230], eax
fild	[esp+240h+var_230]
test	eax, eax
jge	short loc_7368F0
fadd	ds:flt_15FCC08

loc_7368F0:
fmul	ds:dbl_15FD690

loc_7368F6:
mov	ecx, [esp+240h+var_CC]
fstp	[esp+240h+var_21C]
fld	[esp+240h+var_21C]
fmul	ds:dbl_15FCE20
fstp	[esp+240h+var_230]
fld	[esp+240h+var_230]
fmul	ds:dbl_143B738
fstp	[esp+240h+var_1F8]
cmp	ecx, ebx
jz	short loc_736926
mov	esi, [ecx+1Ch]
jmp	short loc_736928

loc_736926:
xor	esi, esi

loc_736928:
mov	edi, [esp+240h+var_20C]
cmp	[edi+10h], ebx
jz	loc_7369EA
cmp	[esp+240h+var_208], 0FFFFFFFFh
mov	eax, [esi+0Ch]
fld	dword ptr [eax+0Ch]
fadd	dword ptr [eax+8]
fstp	[esp+240h+var_230]
fld	dword ptr [ecx+14h]
fld	[esp+240h+var_230]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+240h+var_21C]
fmul	dword ptr [ecx+18h]
fstp	[esp+240h+var_230]
jz	loc_736861
movzx	eax, byte ptr [esp+240h+var_168+3]
fld	[esp+240h+var_230]
mov	edx, [ebp+arg_0]
mov	edi, [edx+64h]
mov	dl, byte ptr [esp+240h+var_16C+3]
shr	eax, 1
and	eax, 0Fh
push	edi		; int
mov	edi, [esp+244h+var_CC]
push	eax		; int
mov	al, [edi+8]
mov	cl, dl
shr	cl, 4
and	al, 1
and	cl, 1
or	al, cl
movzx	ecx, al
mov	eax, [edi+8]
sub	esp, 8
shr	eax, 1
shr	dl, 3
fstp	[esp+250h+var_24C]
and	dl, 1
fld	[esp+250h+var_21C]
and	al, 1
fstp	[esp+250h+var_250]
push	ecx		; char
or	al, dl
mov	edx, [esp+254h+var_208]
movzx	ecx, al
mov	eax, [esp+254h+var_20C]
push	ecx		; char
mov	ecx, [eax+10h]
push	0		; int
push	edx		; int
push	esi		; int
call	sub_746AD0
mov	ebx, eax
test	ebx, ebx
jz	loc_73685D
fld	dword ptr [ebx+0Ch]
fmul	[esp+240h+var_1F8]
jmp	loc_736859

loc_7369EA:
cmp	[esp+240h+var_208], 0FFFFFFFFh
jz	short loc_736A04
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	eax, [esp+240h+var_208]
mov	edx, [edx+18h]
push	0
push	eax
call	edx
mov	ebx, eax

loc_736A04:
test	byte ptr [edi+74h], 4
jnz	short loc_736A33
mov	esi, [esi+0Ch]
mov	eax, [esi]
mov	edx, [esp+240h+var_208]
mov	eax, [eax+30h]
lea	ecx, [esp+240h+var_188]
push	ecx
push	edx
mov	ecx, esi
call	eax
fld	dword ptr [eax+8]
fmul	[esp+240h+var_1F8]
fstp	[esp+240h+var_1E0]
jmp	loc_736861

loc_736A33:
fldz
fstp	[esp+240h+var_1E0]
jmp	loc_736861

loc_736A3E:
fld	dword ptr [edi+20h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_736F2C

loc_736A4E:
cmp	[esp+240h+var_C4], 0
jz	short loc_736A82
mov	eax, [esp+240h+var_1A8]
movzx	esi, word ptr [eax]
mov	eax, esi
shr	eax, 8
test	al, 1
jnz	short loc_736A70
mov	[esp+240h+var_1FA], 1

loc_736A70:
mov	eax, esi
shr	eax, 9
test	al, 1
jz	short loc_736A82
fstp	st
fstp	st
jmp	loc_736E8F

loc_736A82:
cmp	byte ptr [esp+240h+var_22A], 0
jnz	short loc_736AF4
test	cl, cl
jnz	short loc_736AF4
test	dl, 20h
jnz	short loc_736AF4
fld	dword ptr [edi+18h]
lea	ecx, [edi+18h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_736AB0
fld	st
fadd	st, st(2)
fld	dword ptr [ecx]
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_736ACC

loc_736AB0:
fld	dword ptr [edi+20h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_736AF4
faddp	st(1), st
fld	dword ptr [edi+20h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_736AF8
jmp	short loc_736AD0

loc_736ACC:
fstp	st
fstp	st

loc_736AD0:
mov	esi, [ebp+arg_0]
xor	edx, edx
cmp	[esi+9Ch], edx
lea	eax, [esp+240h+var_1D4]
setnz	dl
push	edx
push	ecx
push	eax
push	esi
call	sub_734440
add	esp, 10h
mov	byte ptr [esp+240h+var_22A], al
jmp	short loc_736AF8

loc_736AF4:
fstp	st
fstp	st

loc_736AF8:
fld	[esp+240h+var_148]
mov	eax, [esp+240h+var_1DC]
fst	[esp+240h+var_1A0]
fld	[esp+240h+var_144]
fst	[esp+240h+var_19C]
fld	[esp+240h+var_13C]
fst	[esp+240h+var_194]
fld	[esp+240h+var_138]
fst	[esp+240h+var_190]
fld	[esp+240h+var_210]
fld	st
fmulp	st(4), st
fld	[esp+240h+var_214]
fld	st
fmulp	st(6), st
fxch	st(4)
faddp	st(5), st
fld	[esp+240h+var_140]
faddp	st(5), st
fxch	st(4)
fstp	[esp+240h+var_198]
fmulp	st(3), st
fmulp	st(1), st
faddp	st(1), st
fadd	[esp+240h+var_134]
fstp	[esp+240h+var_18C]
test	eax, eax
jz	loc_736C50
cmp	dword ptr [eax+8], 0
jz	loc_736E8F
mov	ecx, eax
add	ecx, 20h
push	ecx
lea	ecx, [esp+244h+var_1A0]
call	sub_64EAF0
fld	[esp+240h+var_1A0]
mov	edx, [ebp+arg_0]
fstp	[esp+240h+var_64]
fld	[esp+240h+var_19C]
mov	esi, [ebp+arg_8]
fstp	[esp+240h+var_60]
xor	eax, eax
fld	[esp+240h+var_198]
mov	[esp+240h+var_70], edx
fstp	[esp+240h+var_5C]
mov	[esp+240h+var_6C], eax
fld	[esp+240h+var_194]
mov	[esp+240h+var_68], eax
fstp	[esp+240h+var_58]
mov	ecx, 8
fld	[esp+240h+var_190]
lea	edi, [esp+240h+var_4C]
fstp	[esp+240h+var_54]
lea	edx, [esp+240h+var_70]
fld	[esp+240h+var_18C]
push	edx
fstp	[esp+244h+var_50]
rep movsd
mov	esi, [esp+244h+var_1DC]
mov	ecx, [esi+8]
xor	edi, edi
mov	[esp+244h+var_2C], edi
mov	[esp+244h+var_28], edi
mov	dword ptr [esp+244h+var_24], edi
mov	eax, [ecx]
mov	eax, [eax+2Ch]
call	eax
push	edi
lea	ecx, [esp+244h+var_70]
push	edi
push	ecx
mov	ecx, [esi+8]
jmp	loc_736E8A

loc_736C50:
mov	eax, [esp+240h+var_D8]
mov	[esp+240h+var_1F4], eax
test	eax, eax
jz	loc_736CF4
lea	ecx, [esp+240h+var_98]
call	sub_68CFB0
movzx	edx, byte ptr [esp+240h+var_1F4+2]
mov	eax, [esp+240h+var_1F4]
mov	[esp+240h+var_230], edx
mov	esi, [ebp+arg_8]
movzx	ecx, ah
fild	[esp+240h+var_230]
fld	ds:dbl_15FCDC0
mov	[esp+240h+var_230], ecx
fmul	st(1), st
movzx	edx, al
fxch	st(1)
movzx	eax, byte ptr [esp+240h+var_1F4+3]
fstp	[esp+240h+var_98]
fild	[esp+240h+var_230]
mov	[esp+240h+var_230], edx
fmul	st, st(1)
mov	ecx, 8
lea	edi, [esp+240h+var_20]
rep movsd
fstp	[esp+240h+var_90]
fild	[esp+240h+var_230]
fmul	st, st(1)
fstp	[esp+240h+var_88]
mov	[esp+240h+var_230], eax
lea	ecx, [esp+240h+var_98]
push	ecx
fild	[esp+244h+var_230]
lea	ecx, [esp+244h+var_20]
fmulp	st(1), st
fstp	[esp+244h+var_80]
call	sub_68CE70

loc_736CF4:
fld	[esp+240h+var_1F8]
lea	edx, [esp+240h+var_130]
fst	[esp+240h+var_130]
push	edx
fldz
lea	ecx, [esp+244h+var_1A0]
fst	[esp+244h+var_12C]
fst	[esp+244h+var_128]
fst	[esp+244h+var_124]
fstp	[esp+244h+var_11C]
fstp	[esp+244h+var_120]
call	sub_64EAF0
cmp	[esp+240h+var_208], 0FFFFFFFFh
jnz	loc_736DCC
mov	esi, [esp+240h+var_174]
mov	eax, [esi]
mov	edi, [ebp+arg_8]
mov	edx, [eax+40h]
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+38h]
lea	ecx, [esp+240h+var_1A0]
push	ecx
mov	ecx, esi
call	edx
push	ecx
mov	ecx, [esp+244h+var_D8]
mov	eax, esp
lea	edx, [esp+244h+var_228]
mov	[eax], ecx
push	edx
mov	ecx, edi
call	sub_68D0C0
push	ecx
mov	ecx, dword ptr [esp+244h+var_228]
mov	eax, esp
mov	[eax], ecx
mov	edx, [esi]
mov	eax, [edx+84h]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+6Ch]
push	0
push	1
push	5
push	offset asc_14407A4 ; "	"
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+7Ch]
push	4
push	0
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	eax, [edx+6Ch]
push	0
push	0
push	0
push	0
mov	ecx, esi
call	eax
jmp	loc_736E8F

loc_736DCC:
test	ebx, ebx
jz	loc_736E9A
or	byte ptr [ebx+24h], 8
fld	[esp+240h+var_1A0]
mov	ecx, [ebp+arg_0]
fstp	[esp+240h+var_64]
fld	[esp+240h+var_19C]
mov	edx, [esp+240h+var_20C]
fstp	[esp+240h+var_60]
xor	eax, eax
fld	[esp+240h+var_198]
mov	[esp+240h+var_70], ecx
fstp	[esp+240h+var_5C]
push	eax		; float
fld	[esp+244h+var_194]
mov	[esp+244h+var_68], eax
fstp	[esp+244h+var_58]
mov	ecx, 8
fld	[esp+244h+var_190]
lea	esi, [esp+244h+var_20]
fstp	[esp+244h+var_54]
lea	edi, [esp+244h+var_4C]
fld	[esp+244h+var_18C]
push	eax		; char
fstp	[esp+248h+var_50]
rep movsd
mov	[esp+248h+var_2C], eax
mov	dword ptr [esp+248h+var_24], eax
add	edx, 0A0h
lea	eax, [esp+248h+var_70]
mov	[esp+248h+var_28], 1
mov	[esp+248h+var_6C], edx
push	eax		; int
mov	ecx, ebx

loc_736E8A:
call	sub_70B610

loc_736E8F:
test	ebx, ebx
jz	short loc_736E9A
mov	ecx, ebx
call	sub_70E500

loc_736E9A:
mov	ecx, [esp+240h+var_118]
test	ecx, ecx
jz	short loc_736F1B
cmp	ecx, [esp+240h+var_114]
jnb	short loc_736F1B
mov	eax, [esp+240h+var_C0]
test	eax, eax
jnz	short loc_736EC7
movzx	eax, word ptr [ecx+4]
shr	eax, 0Ch
mov	[esp+240h+var_C0], eax

loc_736EC7:
add	ecx, 8
mov	edx, 0F000h
mov	[esp+240h+var_118], ecx
test	[ecx+4], dx
jbe	short loc_736F0F
test	eax, eax
jbe	short loc_736F0F
lea	ecx, [esp+240h+var_10C]
call	sub_73ED30
test	al, al
jnz	short loc_736F0F
mov	eax, [esp+240h+var_C0]
push	eax
lea	ecx, [esp+244h+var_10C]
call	sub_73F2D0
mov	[esp+240h+var_C0], 0

loc_736F0F:
lea	ecx, [esp+240h+var_118]
call	sub_735210

loc_736F1B:
fild	[esp+240h+var_1E8]
fadd	[esp+240h+var_214]
fstp	[esp+240h+var_214]
jmp	loc_736780

loc_736F2C:
fstp	st
fstp	st
test	ebx, ebx
jz	short loc_736F3B
mov	ecx, ebx
call	sub_70E500

loc_736F3B:
mov	ecx, [esp+240h+var_C8]
test	ecx, ecx
jz	short loc_736F4B
call	sub_64A400

loc_736F4B:
cmp	[esp+240h+var_CC], 0
jz	short loc_736FCE
mov	esi, [esp+240h+var_CC]
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jnz	short loc_736FCE
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_736F70
push	esi
call	sub_6F4540

loc_736F70:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_736F7C
call	sub_666B00

loc_736F7C:
mov	dword ptr [esi+1Ch], 0
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_736F8F
call	sub_666B00

loc_736F8F:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_736F9B
call	sub_666B00

loc_736F9B:
mov	edi, [esi+0Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_736FC0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_736FC0:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_736FCE:
mov	ecx, [esp+240h+var_1B4]
mov	edx, [esp+240h+var_20C]
cmp	ecx, [edx+4]
jnb	loc_7366A0
inc	[esp+240h+var_1B4]
jmp	loc_7366A0

loc_736FEE:
cmp	[esp+240h+var_1FA], 0
jnz	short loc_737003
test	byte ptr [ebx+74h], 2
jz	loc_737785
mov	ebx, [esp+240h+var_20C]

loc_737003:
cmp	dword ptr [ebx+0CCh], 0
jnz	loc_737785
mov	eax, [esp+240h+var_20C]
fld	dword ptr [eax+18h]
mov	ecx, [eax+14h]
mov	edx, [eax+28h]
fstp	[esp+240h+var_188]
fld	dword ptr [eax+1Ch]
mov	[esp+240h+var_1B4], ecx
mov	cl, [eax+74h]
fstp	[esp+240h+var_184]
fld	dword ptr [eax+20h]
shr	cl, 2
fstp	[esp+240h+var_180]
and	cl, 1
fld	dword ptr [eax+24h]
mov	byte ptr [esp+240h+var_1AC], cl
fstp	[esp+240h+var_17C]
fild	dword ptr [eax+28h]
test	edx, edx
jge	short loc_737066
fadd	ds:flt_15FCC08

loc_737066:
fstp	dword ptr [esp+240h+var_228]
mov	ebx, eax
fld	[esp+240h+var_188]
fld	dword ptr [esp+240h+var_228]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+240h+var_188]
fadd	[esp+240h+var_180]
fstp	[esp+240h+var_180]
jmp	short loc_7370A0
db 8Dh,	0A4h, 24h, 4 dup(0)
jmp	short loc_7370A0
align 10h

loc_7370A0:
mov	esi, [esp+240h+var_1B4]
cmp	esi, [ebx+4]
jnb	loc_737785
test	esi, esi
jl	loc_737785
test	cl, cl
jnz	short loc_7370D4
fld	[esp+240h+var_1D8]
push	ecx		; float
fstp	dword ptr [esp+244h+var_248+4]
push	esi		; int
mov	ecx, ebx
call	sub_733F00
test	al, al
jz	loc_737785

loc_7370D4:
mov	eax, [ebx]
mov	edi, [eax+esi*4]
mov	ecx, [edi]
shr	ecx, 1Fh
mov	[esp+240h+var_174], edi
test	cl, 1
jz	short loc_7370F3
mov	edx, [edi+0Ch]
mov	[esp+240h+var_21C], edx
jmp	short loc_7370FA

loc_7370F3:
mov	eax, [edi+0Ch]
mov	[esp+240h+var_21C], eax

loc_7370FA:
fild	[esp+240h+var_21C]
fstp	[esp+240h+var_204]
mov	ecx, [edi]
shr	ecx, 1Fh
test	cl, 1
jz	short loc_737115
mov	edx, [edi+10h]
mov	[esp+240h+var_21C], edx
jmp	short loc_73711C

loc_737115:
mov	eax, [edi+10h]
mov	[esp+240h+var_21C], eax

loc_73711C:
fild	[esp+240h+var_21C]
xor	esi, esi
lea	ecx, [esp+240h+var_1A0]
mov	[esp+240h+var_21D], 1
fstp	[esp+240h+var_200]
mov	[esp+240h+var_1E0], esi
fld	dword ptr [ebx+18h]
mov	[esp+240h+var_230], 0FFFFFFFFh
fstp	[esp+240h+var_1F0]
mov	[esp+240h+var_208], esi
fld	dword ptr [ebx+1Ch]
fstp	[esp+240h+var_1EC]
fld	[esp+240h+var_1F0]
fadd	[esp+240h+var_204]
fstp	[esp+240h+var_204]
fld	[esp+240h+var_1EC]
fadd	[esp+240h+var_200]
fstp	[esp+240h+var_200]
fldz
fst	[esp+240h+var_1F4]
fst	[esp+240h+var_21C]
fst	[esp+240h+var_1E8]
fstp	[esp+240h+var_1A8]
call	sub_64E8E0
lea	ecx, [esp+240h+var_130]
call	sub_64E8E0
mov	ecx, [ebp+arg_14]
push	ecx
lea	edx, [esp+244h+var_118]
push	edx
mov	ecx, edi
call	sub_7354D0
mov	edx, [esp+240h+var_118]
mov	[esp+240h+var_1DC], esi
lea	esp, [esp+0]

loc_7371B0:
test	edx, edx
jz	loc_737679
cmp	edx, [esp+240h+var_114]
jnb	loc_737679
movzx	eax, word ptr [edx+6]
mov	cl, al
shr	cl, 6
test	cl, 1
movzx	ecx, word ptr [edx+2]
jz	short loc_7371D9
neg	ecx

loc_7371D9:
cmp	[esp+240h+var_C4], 0
mov	[esp+240h+var_1F8], ecx
jz	loc_7375E1
cmp	[esp+240h+var_C8], 0
jnz	loc_7375E1
shr	eax, 8
test	al, 1
jnz	loc_7375E1
mov	eax, [ebx+28h]
fld	[esp+240h+var_204]
fild	dword ptr [ebx+28h]
test	eax, eax
jge	short loc_737218
fadd	ds:flt_15FCC08

loc_737218:
fsubp	st(1), st
fstp	dword ptr [esp+240h+var_228]
fld	dword ptr [esp+240h+var_228]
fld	dword ptr [ebx+20h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_737677
fiadd	[esp+240h+var_1F8]
fld	dword ptr [ebx+18h]
fcompp
fnstsw	ax
test	ah, 41h
jz	loc_7375E1
cmp	[esp+240h+var_21D], 0
jz	loc_737532
mov	ecx, edi
call	sub_6F6050
mov	dword ptr [esp+240h+var_228], eax
fild	dword ptr [esp+240h+var_228]
mov	ecx, edi
fstp	dword ptr [esp+240h+var_228]
call	sub_71DE10
fsubr	dword ptr [esp+240h+var_228]
mov	ecx, edi
fstp	dword ptr [esp+240h+var_228]
fld	dword ptr [esp+240h+var_228]
fmul	ds:dbl_15FCC48
fstp	[esp+240h+var_228]
call	sub_71DE10
fadd	[esp+240h+var_1D8]
mov	eax, [ebp+arg_0]
add	eax, 78h
push	eax
fadd	[esp+244h+var_228]
lea	ecx, [esp+244h+var_1A0]
fadd	[esp+244h+var_200]
fstp	[esp+244h+var_200]
fld	[esp+244h+var_148]
fstp	[esp+244h+var_1A0]
fld	[esp+244h+var_144]
fstp	[esp+244h+var_19C]
fld	[esp+244h+var_140]
fstp	[esp+244h+var_198]
fld	[esp+244h+var_13C]
fstp	[esp+244h+var_194]
fld	[esp+244h+var_138]
fstp	[esp+244h+var_190]
fld	[esp+244h+var_134]
fstp	[esp+244h+var_18C]
call	sub_64EBB0
fld	[esp+240h+var_1A0]
lea	ecx, [esp+240h+var_98]
fst	[esp+240h+var_130]
push	ecx
fld	[esp+244h+var_19C]
lea	ecx, [esp+244h+var_130]
fst	[esp+244h+var_12C]
fld	[esp+244h+var_198]
fst	[esp+244h+var_128]
fld	[esp+244h+var_194]
fst	[esp+244h+var_124]
fld	[esp+244h+var_190]
fst	[esp+244h+var_120]
fld	[esp+244h+var_18C]
fst	[esp+244h+var_11C]
fxch	st(5)
fstp	[esp+244h+var_98]
fxch	st(3)
fstp	[esp+244h+var_94]
fxch	st(1)
fstp	[esp+244h+var_90]
fstp	[esp+244h+var_8C]
fstp	[esp+244h+var_88]
fstp	[esp+244h+var_84]
call	sub_64E9E0
lea	edx, [esp+240h+var_204]
push	edx
lea	eax, [esp+244h+var_214]
push	eax
lea	ecx, [esp+248h+var_1A0]
call	sub_64E9B0
fld	[esp+240h+var_214]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_248]
call	_floor
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_214]
fld	[esp+248h+var_210]
fadd	ds:dbl_15FCC48
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_248]
call	_floor
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
add	esp, 8
lea	ecx, [esp+240h+var_214]
fstp	[esp+240h+var_210]
push	ecx
lea	edx, [esp+244h+var_78]
push	edx
lea	ecx, [esp+248h+var_130]
call	sub_64E9B0
fld	[esp+240h+var_78]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_248]
call	_floor
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_204]
fld	[esp+248h+var_74]
fadd	ds:dbl_15FCC48
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_248]
call	_floor
fstp	dword ptr [esp+248h+var_228]
add	esp, 8
fld	dword ptr [esp+240h+var_228]
lea	eax, [esp+240h+var_214]
fstp	[esp+240h+var_200]
push	eax
fld	[esp+244h+var_214]
lea	ecx, [esp+244h+var_B8]
fld1
push	ecx
fadd	st(1), st
lea	ecx, [esp+248h+var_130]
fxch	st(1)
fstp	[esp+248h+var_214]
fadd	[esp+248h+var_210]
fstp	[esp+248h+var_210]
call	sub_64E9B0
fld	[esp+240h+var_B8]
sub	esp, 8
fadd	ds:dbl_15FCC48
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_248]
call	_floor
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_214]
fld	[esp+248h+var_B8+4]
fadd	ds:dbl_15FCC48
fstp	dword ptr [esp+248h+var_228]
fld	dword ptr [esp+248h+var_228]
fstp	[esp+248h+var_248]
call	_floor
fstp	dword ptr [esp+248h+var_228]
mov	edx, [esp+248h+var_118]
fld	dword ptr [esp+248h+var_228]
add	esp, 8
fstp	[esp+240h+var_210]
mov	[esp+240h+var_21D], 0
fld	[esp+240h+var_210]
fld	[esp+240h+var_200]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+240h+var_1E8]
fld	[esp+240h+var_214]
fld	[esp+240h+var_204]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+240h+var_1A8]
fstp	[esp+240h+var_1F4]
fstp	[esp+240h+var_21C]

loc_737532:
mov	edi, [esp+240h+var_D0]
mov	ebx, [esp+240h+var_C4]
test	esi, esi
jz	short loc_7375C2
cmp	[esp+240h+var_1E0], edi
jnz	short loc_73755D
mov	eax, [esp+240h+var_230]
inc	eax
cmp	eax, [esp+240h+var_1DC]
jnz	short loc_73755D
mov	ecx, ebx
cmp	ecx, [esp+240h+var_208]
jz	short loc_7375C2

loc_73755D:
mov	ecx, [esp+240h+var_1E0]
fld	[esp+240h+var_1A8]
lea	edx, [esp+240h+var_130]
push	edx		; int
mov	edx, [esp+244h+var_208]
lea	eax, [esp+244h+var_1A0]
push	eax		; int
push	ecx		; int
mov	ecx, [esp+24Ch+var_20C]
push	edx		; int
push	esi		; int
lea	eax, [esp+254h+var_188]
push	eax		; int
sub	esp, 10h
fstp	[esp+268h+var_25C]
fld	[esp+268h+var_1E8]
fstp	[esp+268h+var_260]
fld	[esp+268h+var_21C]
fstp	[esp+268h+var_264]
fld	[esp+268h+var_1F4]
fstp	[esp+268h+var_268]
call	sub_7345B0
fld	[esp+240h+var_204]
mov	edx, [esp+240h+var_118]
fstp	[esp+240h+var_1F4]
xor	esi, esi

loc_7375C2:
mov	ecx, [esp+240h+var_1DC]
add	esi, [esp+240h+var_1F8]
mov	[esp+240h+var_1E0], edi
mov	edi, [esp+240h+var_174]
mov	[esp+240h+var_208], ebx
mov	ebx, [esp+240h+var_20C]
mov	[esp+240h+var_230], ecx

loc_7375E1:
test	edx, edx
jz	short loc_737662
cmp	edx, [esp+240h+var_114]
jnb	short loc_737662
mov	eax, [esp+240h+var_C0]
test	eax, eax
jnz	short loc_737607
movzx	eax, word ptr [edx+4]
shr	eax, 0Ch
mov	[esp+240h+var_C0], eax

loc_737607:
add	edx, 8
mov	ecx, 0F000h
mov	[esp+240h+var_118], edx
test	[edx+4], cx
jbe	short loc_73764F
test	eax, eax
jbe	short loc_73764F
lea	ecx, [esp+240h+var_10C]
call	sub_73ED30
test	al, al
jnz	short loc_73764F
mov	edx, [esp+240h+var_C0]
push	edx
lea	ecx, [esp+244h+var_10C]
call	sub_73F2D0
mov	[esp+240h+var_C0], 0

loc_73764F:
lea	ecx, [esp+240h+var_118]
call	sub_735210
mov	edx, [esp+240h+var_118]

loc_737662:
fild	[esp+240h+var_1F8]
inc	[esp+240h+var_1DC]
fadd	[esp+240h+var_204]
fstp	[esp+240h+var_204]
jmp	loc_7371B0

loc_737677:
fstp	st

loc_737679:
test	esi, esi
jz	short loc_7376CF
mov	edx, [esp+240h+var_1E0]
fld	[esp+240h+var_1A8]
lea	eax, [esp+240h+var_130]
push	eax		; int
mov	eax, [esp+244h+var_208]
lea	ecx, [esp+244h+var_1A0]
push	ecx		; int
push	edx		; int
push	eax		; int
push	esi		; int
lea	ecx, [esp+254h+var_188]
push	ecx		; int
sub	esp, 10h
fstp	[esp+268h+var_25C]
mov	ecx, ebx
fld	[esp+268h+var_1E8]
fstp	[esp+268h+var_260]
fld	[esp+268h+var_21C]
fstp	[esp+268h+var_264]
fld	[esp+268h+var_1F4]
fstp	[esp+268h+var_268]
call	sub_7345B0

loc_7376CF:
cmp	[esp+240h+var_C8], 0
jz	short loc_7376E5
mov	ecx, [esp+240h+var_C8]
call	sub_64A400

loc_7376E5:
mov	esi, [esp+240h+var_CC]
test	esi, esi
jz	short loc_737762
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jnz	short loc_737762
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_737704
push	esi
call	sub_6F4540

loc_737704:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_737710
call	sub_666B00

loc_737710:
mov	dword ptr [esi+1Ch], 0
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_737723
call	sub_666B00

loc_737723:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_73772F
call	sub_666B00

loc_73772F:
mov	edi, [esi+0Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_737754
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_737754:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_737762:
mov	eax, [esp+240h+var_1B4]
mov	cl, byte ptr [esp+240h+var_1AC]
cmp	eax, [ebx+4]
jnb	loc_7370A0
inc	[esp+240h+var_1B4]
jmp	loc_7370A0

loc_737785:
mov	esi, [esp+240h+var_20C]
mov	ecx, [esi+0CCh]
mov	edi, [ebp+arg_0]
test	ecx, ecx
jz	short loc_7377AC
mov	edx, [ebp+arg_8]
push	0
push	0
push	edx
lea	eax, [esp+24Ch+var_148]
push	eax
push	edi
call	sub_6F9540

loc_7377AC:
cmp	byte ptr [esp+240h+var_22A], 0
jz	short loc_7377E2
cmp	dword ptr [edi+9Ch], 0
jnz	short loc_7377CE
mov	ecx, [edi+48h]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
jmp	short loc_7377E2

loc_7377CE:
push	2
add	esi, 18h
push	esi
lea	ecx, [esp+248h+var_1D4]
push	ecx
push	edi
call	sub_734440
add	esp, 10h

loc_7377E2:
cmp	[esp+240h+var_1F9], 0
jz	short loc_737801
cmp	byte_1856614, 0
jz	short loc_737801
mov	edi, [edi+8]
mov	ecx, 10h
mov	esi, offset unk_18565D4
rep movsd

loc_737801:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	18h
sub_7356C0 endp

align 10h



; int __stdcall	sub_737810(float)
sub_737810 proc	near

var_94=	dword ptr -94h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 80h
push	ebx
push	ebp
xor	ebp, ebp
push	esi
xor	eax, eax
push	edi
mov	[esp+90h+var_78], ecx
mov	[esp+90h+var_C], eax
jmp	short loc_737837
jmp	short loc_737830
align 10h

loc_737830:
mov	eax, [esp+90h+var_C]

loc_737837:
fld	[esp+90h+arg_0]
cmp	ecx, ebp
jz	loc_737C3C
cmp	eax, [ecx+4]
jnb	loc_737C3C
cmp	eax, ebp
jl	loc_737C3C
mov	ecx, [ecx]
mov	esi, [ecx+eax*4]
mov	ebx, [esi]
shr	ebx, 1Fh
and	bl, 1
jz	short loc_737870
movsx	edx, byte ptr [esi+1Dh]
mov	[esp+90h+var_80], edx
jmp	short loc_737878

loc_737870:
movsx	eax, word ptr [esi+28h]
mov	[esp+90h+var_80], eax

loc_737878:
fild	[esp+90h+var_80]
fmul	st, st(1)
fstp	[esp+90h+var_74]
test	bl, bl
jz	short loc_737890
movzx	ecx, word ptr [esi+14h]
mov	[esp+90h+var_80], ecx
jmp	short loc_737897

loc_737890:
mov	edx, [esi+14h]
mov	[esp+90h+var_80], edx

loc_737897:
fild	[esp+90h+var_80]
fmul	st, st(1)
fstp	[esp+90h+var_7C]
test	bl, bl
jz	short loc_7378AF
movzx	eax, word ptr [esi+16h]
mov	[esp+90h+var_80], eax
jmp	short loc_7378B6

loc_7378AF:
mov	ecx, [esi+18h]
mov	[esp+90h+var_80], ecx

loc_7378B6:
fild	[esp+90h+var_80]
fmul	st, st(1)
fstp	[esp+90h+var_80]
fld	[esp+90h+var_74]
call	__ftol2_sse
test	bl, bl
jz	short loc_7378D2
mov	[esi+1Dh], al
jmp	short loc_7378D6

loc_7378D2:
mov	[esi+28h], ax

loc_7378D6:
fld	[esp+90h+var_80]
call	__ftol2_sse
fld	[esp+90h+var_7C]
mov	edi, eax
call	__ftol2_sse
test	bl, bl
jz	short loc_7378F8
mov	[esi+14h], ax
mov	[esi+16h], di
jmp	short loc_7378FE

loc_7378F8:
mov	[esi+14h], eax
mov	[esi+18h], edi

loc_7378FE:
mov	ebx, [esi]
shr	ebx, 1Fh
and	bl, 1
jz	short loc_737916
movzx	edx, word ptr [esi+1Ah]
mov	[esp+90h+var_7C], edx
fild	[esp+90h+var_7C]
jmp	short loc_737922

loc_737916:
movzx	eax, word ptr [esi+26h]
mov	[esp+90h+var_7C], eax
fild	[esp+90h+var_7C]

loc_737922:
fstp	[esp+90h+var_80]
fld	[esp+90h+var_80]
fmul	st, st(1)
fstp	[esp+90h+var_80]
fld	[esp+90h+var_80]
test	bl, bl
jz	short loc_737961
fnstcw	word ptr [esp+90h+var_80]
movzx	eax, word ptr [esp+90h+var_80]
or	eax, 0C00h
mov	[esp+90h+var_7C], eax
fldcw	word ptr [esp+90h+var_7C]
fistp	[esp+90h+var_7C]
mov	cx, word ptr [esp+90h+var_7C]
mov	[esi+1Ah], cx
fldcw	word ptr [esp+90h+var_80]
jmp	short loc_737988

loc_737961:
fnstcw	word ptr [esp+90h+var_80]
movzx	eax, word ptr [esp+90h+var_80]
or	eax, 0C00h
mov	[esp+90h+var_7C], eax
fldcw	word ptr [esp+90h+var_7C]
fistp	[esp+90h+var_7C]
mov	dx, word ptr [esp+90h+var_7C]
mov	[esi+26h], dx
fldcw	word ptr [esp+90h+var_80]

loc_737988:
test	bl, bl
jz	short loc_737995
mov	eax, [esi+0Ch]
mov	[esp+90h+var_80], eax
jmp	short loc_73799C

loc_737995:
mov	ecx, [esi+0Ch]
mov	[esp+90h+var_80], ecx

loc_73799C:
fild	[esp+90h+var_80]
fmul	st, st(1)
call	__ftol2_sse
mov	[esi+0Ch], eax
test	bl, bl
jz	short loc_7379B7
mov	edx, [esi+10h]
mov	[esp+90h+var_80], edx
jmp	short loc_7379BE

loc_7379B7:
mov	eax, [esi+10h]
mov	[esp+90h+var_80], eax

loc_7379BE:
fimul	[esp+90h+var_80]
call	__ftol2_sse
mov	[esi+10h], eax
lea	ecx, [esi+1Eh]
test	bl, bl
jnz	short loc_7379EC
mov	eax, [esi+4]
lea	ecx, [esi+2Ah]

loc_7379D7:
lea	ecx, [ecx+eax*8]
lea	eax, [ecx+3]
and	eax, 0FFFFFFFCh
sub	eax, ecx
test	bl, bl
jz	short loc_7379F2
movzx	edx, byte ptr [esi+1Ch]
jmp	short loc_7379F5

loc_7379EC:
movzx	eax, byte ptr [esi+1Ch]
jmp	short loc_7379D7

loc_7379F2:
mov	edx, [esi+4]

loc_7379F5:
test	bl, bl
jz	short loc_7379FE
add	esi, 1Eh
jmp	short loc_737A01

loc_7379FE:
add	esi, 2Ah

loc_737A01:
or	ebx, 0FFFFFFFFh
lea	edx, [esi+edx*8]
add	eax, ecx
mov	[esp+90h+var_58], ebx
mov	[esp+90h+var_54], ebp
mov	[esp+90h+var_50], ebx
mov	[esp+90h+var_4C], ebp
mov	[esp+90h+var_48], ebp
mov	[esp+90h+var_44], ebp
mov	[esp+90h+var_38], ebp
mov	[esp+90h+var_3C], ebp
mov	[esp+90h+var_40], ebp
mov	[esp+90h+var_34], 0
mov	[esp+90h+var_5C], ebp
mov	[esp+90h+var_60], ebp
mov	[esp+90h+var_30], ebp
mov	[esp+90h+var_2C], ebp
mov	[esp+90h+var_28], ebp
mov	[esp+90h+var_24], ebp
mov	[esp+90h+var_20], ebp
mov	[esp+90h+var_1C], ebp
mov	[esp+90h+var_70], esi
mov	[esp+90h+var_6C], edx
mov	[esp+90h+var_68], eax

loc_737A5E:
mov	[esp+90h+var_18], ebp

loc_737A62:
lea	ecx, [esp+90h+var_70]
call	sub_735210
mov	esi, [esp+90h+var_70]
nop

loc_737A70:
cmp	esi, ebp
jz	loc_737B99
cmp	esi, [esp+90h+var_6C]
jnb	loc_737B99
mov	al, [esi+6]
lea	edi, [esi+6]
shr	al, 6
test	al, 1
jnz	short loc_737A99
movzx	ecx, word ptr [esi+2]
mov	[esp+90h+var_80], ecx
jmp	short loc_737AA3

loc_737A99:
movzx	edx, word ptr [esi+2]
neg	edx
mov	[esp+90h+var_80], edx

loc_737AA3:
fild	[esp+90h+var_80]
fld	[esp+90h+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+90h+var_7C]
fld	[esp+90h+var_7C]
call	__ftol2_sse
cmp	eax, ebp
jl	short loc_737AD3
mov	[esi+2], ax
mov	eax, 0FFBFh
and	[edi], ax
jmp	short loc_737ADD

loc_737AD3:
neg	eax
or	word ptr [edi],	40h
mov	[esi+2], ax

loc_737ADD:
movzx	eax, word ptr [esi+4]
and	eax, 0FFFh
test	byte ptr [edi],	10h
jnz	short loc_737AFF
mov	[esp+90h+var_7C], eax
fild	[esp+90h+var_7C]
test	eax, eax
jge	short loc_737B17
fadd	ds:flt_15FCC08
jmp	short loc_737B17

loc_737AFF:
mov	[esp+90h+var_7C], eax
fild	[esp+90h+var_7C]
test	eax, eax
jge	short loc_737B11
fadd	ds:flt_15FCC08

loc_737B11:
fmul	ds:dbl_15FD690

loc_737B17:
fstp	[esp+90h+var_80]
push	ecx		; float
fmul	[esp+94h+var_80]
mov	ecx, esi
fstp	[esp+94h+var_7C]
fld	[esp+94h+var_7C]
fstp	[esp+94h+var_94]
call	sub_6F5EB0
mov	esi, [esp+90h+var_70]
cmp	esi, ebp
jz	short loc_737B99
cmp	esi, [esp+90h+var_6C]
jnb	loc_737A70
mov	eax, [esp+90h+var_18]
cmp	eax, ebp
jnz	short loc_737B57
movzx	eax, word ptr [esi+4]
shr	eax, 0Ch
mov	[esp+90h+var_18], eax

loc_737B57:
add	esi, 8
mov	ecx, 0F000h
mov	[esp+90h+var_70], esi
test	[esi+4], cx
jbe	loc_737A62
cmp	eax, ebp
jbe	loc_737A62
lea	ecx, [esp+90h+var_64]
call	sub_73ED30
test	al, al
jnz	loc_737A62
mov	edx, [esp+90h+var_18]
push	edx
lea	ecx, [esp+94h+var_64]
call	sub_73F2D0
jmp	loc_737A5E

loc_737B99:
mov	ecx, [esp+90h+var_20]
cmp	ecx, ebp
jz	short loc_737BA6
call	sub_64A400

loc_737BA6:
mov	esi, [esp+90h+var_24]
cmp	esi, ebp
jz	short loc_737C1A
add	[esi], ebx
cmp	[esi], ebp
jnz	short loc_737C1A
mov	ecx, [esi+4]
cmp	ecx, ebp
jz	short loc_737BC1
push	esi
call	sub_6F4540

loc_737BC1:
mov	ecx, [esi+1Ch]
cmp	ecx, ebp
jz	short loc_737BCD
call	sub_666B00

loc_737BCD:
mov	[esi+1Ch], ebp
mov	ecx, [esi+20h]
cmp	ecx, ebp
jz	short loc_737BDC
call	sub_666B00

loc_737BDC:
mov	ecx, [esi+1Ch]
cmp	ecx, ebp
jz	short loc_737BE8
call	sub_666B00

loc_737BE8:
mov	edi, [esi+0Ch]
and	edi, 0FFFFFFFCh
push	ebx		; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_737C0C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_737C0C:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_737C1A:
mov	ecx, [esp+90h+var_C]
mov	edx, [esp+90h+var_78]
cmp	ecx, [edx+4]
mov	ecx, edx
jnb	loc_737830
inc	[esp+90h+var_C]
jmp	loc_737830

loc_737C3C:
or	byte ptr [ecx+74h], 1
fstp	st
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 80h
retn	4
sub_737810 endp

align 10h



sub_737C50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
push	edi
mov	esi, ecx
mov	[esp+14h+var_4], 0
test	ebp, ebp
jbe	short loc_737CAE
jmp	short loc_737C70
align 10h

loc_737C70:
test	esi, esi
jz	short loc_737CAE
cmp	ebx, [esi+4]
jnb	short loc_737CAE
test	ebx, ebx
jl	short loc_737CAE
mov	eax, [esi]
mov	edi, [eax+ebx*4]
test	edi, edi
jz	short loc_737C9B
mov	ecx, edi
call	sub_735170
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_737C9B:
cmp	ebx, [esi+4]
jnb	short loc_737CA1
inc	ebx

loc_737CA1:
mov	eax, [esp+14h+var_4]
inc	eax
mov	[esp+14h+var_4], eax
cmp	eax, ebp
jb	short loc_737C70

loc_737CAE:
mov	eax, [esi+4]
cmp	eax, ebp
jnz	short loc_737D01
xor	edi, edi
cmp	eax, edi
jbe	short loc_737CE8
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_737CF6
mov	eax, [esi]
cmp	eax, edi
jz	short loc_737CDA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_737CDA:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_737CE8:
cmp	[esi+8], edi
ja	short loc_737CF6
push	edi
push	esi
mov	ecx, esi
call	sub_668FE0

loc_737CF6:
mov	[esi+4], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_737D01:
mov	edx, [esp+14h+arg_0]
mov	ecx, [esi]
sub	eax, edx
sub	eax, ebp
add	eax, eax
add	eax, eax
push	eax
lea	eax, [edx+ebp]
lea	eax, [ecx+eax*4]
push	eax
lea	ecx, [ecx+edx*4]
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
sub	[esi+4], ebp
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_737C50 endp

align 10h



sub_737D30 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
test	ecx, ecx
jz	short loc_737D43
mov	eax, [esi+0Ch]
push	eax
call	sub_743350

loc_737D43:
or	byte ptr [esi+74h], 1
mov	ecx, [esi+4]
push	ecx
push	0
mov	ecx, esi
call	sub_737C50
mov	ecx, [esi+0CCh]
test	ecx, ecx
jz	short loc_737D63
call	sub_64A400

loc_737D63:
lea	ecx, [esi+0A0h]
call	sub_6FA020
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
retn
sub_737D30 endp




sub_737D80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_737DA4
push	0
push	0
push	offset aStylesheet_0 ; "StyleSheet"
mov	ecx, esi
call	sub_651C60

loc_737DA2:
pop	esi
retn

loc_737DA4:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_737DA2
add	eax, 0FFFFFFF0h
jz	short loc_737DA2
lea	ecx, [eax+34h]
pop	esi
jmp	sub_732C10
sub_737D80 endp

align 10h



sub_737DC0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, [esp+18h+arg_0]
push	1Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_737DEA
push	0
push	0
push	offset aStylesheet_0 ; "StyleSheet"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 14h
retn

loc_737DEA:
mov	eax, [esi+8]
test	eax, eax
jz	loc_737E8E
push	edi
lea	edi, [eax-10h]
test	edi, edi
jz	loc_737E8D
cmp	dword ptr [esi+1Ch], 1
jge	short loc_737E1E
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0
pop	esi
add	esp, 14h
retn

loc_737E1E:
push	ebx
push	0
mov	ecx, esi
call	sub_651EC0
push	eax
lea	ecx, [esp+24h+var_10]
call	sub_652330
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+2Ch+var_14]
push	ecx
lea	ecx, [esp+30h+var_10]
call	sub_652F60
mov	eax, [esp+20h+var_14]
mov	ecx, [eax+10h]
mov	eax, [eax]
push	ecx
push	eax
lea	ecx, [edi+34h]
call	sub_732EB0
mov	esi, [esi+4]
mov	ecx, esi
mov	bl, al
call	sub_652060
mov	[esi+4], bl
mov	byte ptr [esi],	2
mov	eax, [esp+20h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	ebx
jnz	short loc_737E84
call	sub_650DF0

loc_737E84:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830

loc_737E8D:
pop	edi

loc_737E8E:
pop	esi
add	esp, 14h
retn
sub_737DC0 endp

align 10h



sub_737EA0 proc	near
mov	eax, 1Fh
retn
sub_737EA0 endp

align 10h



sub_737EB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_737ED3
cmp	[esi], ecx
jmp	short loc_737EE8

loc_737ED3:
cmp	dword ptr [ecx+4], 0
jnz	short loc_737EDE
call	sub_651580

loc_737EDE:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_737EE8:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_737F37
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_737F06
cmp	[esi], ecx
jmp	short loc_737F1B

loc_737F06:
cmp	dword ptr [ecx+4], 0
jnz	short loc_737F11
call	sub_651580

loc_737F11:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_737F1B:
setz	al
test	al, al
jnz	short loc_737F37
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_737F37:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+34h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_737EB0 endp

align 10h



sub_737F60 proc	near
add	ecx, 34h
jmp	sub_665AD0
sub_737F60 endp

align 10h



sub_737F70 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_737F7D
mov	al, 1
retn	8

loc_737F7D:
mov	[esp+arg_4], eax
add	ecx, 44h
jmp	loc_663310
sub_737F70 endp

align 10h



sub_737F90 proc	near

arg_0= byte ptr	 4

sub	ecx, 44h
jmp	sub_739EB0
sub_737F90 endp

align 10h



sub_737FA0 proc	near
mov	eax, 1
test	[ecx+16h], al
jz	short loc_737FB5
mov	edx, 600h
test	[ecx+16h], dx
jz	short locret_737FB7

loc_737FB5:
xor	eax, eax

locret_737FB7:
retn
sub_737FA0 endp

align 10h



sub_737FC0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
call	sub_7331A0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_737FC0 endp

align 10h



sub_737FE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax]
push	esi
push	edi
and	eax, 0FFFFFFFCh
push	1B6h
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx]
add	eax, 8
push	21h
push	eax
mov	eax, [edx+4]
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_738066
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
call	eax
test	al, al
jz	short loc_73805F
mov	edx, [edi]
mov	eax, [edx+18h]
mov	ecx, edi
call	eax
mov	[esi+10h], eax
test	eax, eax
jz	short loc_73805F
mov	ecx, dword_1855FC0
mov	edx, [ecx]
add	eax, 2
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	ecx, [esi+10h]
mov	[esi+0Ch], eax
mov	edx, [edi]
mov	edx, [edx+28h]
push	ecx
push	eax
mov	ecx, edi
call	edx
mov	eax, [esi+0Ch]
mov	ecx, [esi+10h]
mov	byte ptr [eax+ecx+1], 0
mov	edx, [esi+0Ch]
mov	eax, [esi+10h]
mov	byte ptr [edx+eax], 0

loc_73805F:
mov	ecx, edi
call	sub_64A430

loc_738066:
pop	edi
pop	esi
retn	8
sub_737FE0 endp

align 10h



sub_738070 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
push	esi
push	edi
mov	edi, [eax]
mov	esi, ecx
mov	ecx, offset aFontfamily	; "fontFamily"
mov	eax, edi

loc_738084:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_7380A4
test	dl, dl
jz	short loc_7380A0
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_7380A4
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_738084

loc_7380A0:
xor	eax, eax
jmp	short loc_7380A9

loc_7380A4:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_7380A9:
test	eax, eax
jnz	short loc_7380B9
push	0FFFFFFFFh
push	offset aFontFamily ; "font-family"
jmp	loc_7381EB

loc_7380B9:		; "fontSize"
mov	ecx, offset aFontsize
mov	eax, edi

loc_7380C0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_7380E0
test	dl, dl
jz	short loc_7380DC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_7380E0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_7380C0

loc_7380DC:
xor	eax, eax
jmp	short loc_7380E5

loc_7380E0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_7380E5:
test	eax, eax
jnz	short loc_7380F5
push	0FFFFFFFFh
push	offset aFontSize ; "font-size"
jmp	loc_7381EB

loc_7380F5:		; "fontStyle"
mov	ecx, offset aFontstyle
mov	eax, edi
lea	esp, [esp+0]

loc_738100:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_738120
test	dl, dl
jz	short loc_73811C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_738120
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_738100

loc_73811C:
xor	eax, eax
jmp	short loc_738125

loc_738120:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_738125:
test	eax, eax
jnz	short loc_738135
push	0FFFFFFFFh
push	offset aFontStyle ; "font-style"
jmp	loc_7381EB

loc_738135:		; "fontWeight"
push	offset aFontweight
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_738151
push	0FFFFFFFFh
push	offset aFontWeight ; "font-weight"
jmp	loc_7381EB

loc_738151:		; "letterSpacing"
push	offset aLetterspacing
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_73816D
push	0FFFFFFFFh
push	offset aLetterSpacing ;	"letter-spacing"
jmp	loc_7381EB

loc_73816D:		; "marginLeft"
push	offset aMarginleft
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_738186
push	0FFFFFFFFh
push	offset aMarginLeft ; "margin-left"
jmp	short loc_7381EB

loc_738186:		; "marginRight"
push	offset aMarginright
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_73819F
push	0FFFFFFFFh
push	offset aMarginRight ; "margin-right"
jmp	short loc_7381EB

loc_73819F:		; "textAlign"
push	offset aTextalign
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_7381B8
push	0FFFFFFFFh
push	offset aTextAlign ; "text-align"
jmp	short loc_7381EB

loc_7381B8:		; "textDecoration"
push	offset aTextdecoration
mov	ecx, ebx
call	sub_67DA70
test	al, al
jz	short loc_7381D1
push	0FFFFFFFFh
push	offset aTextDecoration ; "text-decoration"
jmp	short loc_7381EB

loc_7381D1:		; "textIndent"
push	offset aTextindent
mov	ecx, ebx
call	sub_67DA70
push	0FFFFFFFFh
test	al, al
jz	short loc_7381EA
push	offset aTextIndent ; "text-indent"
jmp	short loc_7381EB

loc_7381EA:
push	edi

loc_7381EB:
mov	ecx, [esi+8]
call	sub_67A0C0
mov	ecx, [esi+8]
push	0FFFFFFFFh
push	offset word_1545F80
call	sub_67A0C0
mov	ecx, [esi+4]
push	0
push	0FFFFFFFFh
push	ecx
mov	ecx, [esp+18h+arg_4]
lea	edx, [esp+18h+arg_0]
push	edx
call	sub_652F60
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, [esi+8]
call	sub_67A0C0
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73823F
call	sub_650DF0

loc_73823F:
mov	ecx, [esi+8]
push	0FFFFFFFFh
push	offset asc_155C52C ; ";"
call	sub_67A0C0
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_738070 endp

align 10h



sub_738260 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, [esp+18h+arg_0]
push	1Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_73828A
push	0
push	0
push	offset aStylesheet_0 ; "StyleSheet"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 14h
retn

loc_73828A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_7383E9
push	ebx
lea	ebx, [eax-10h]
test	ebx, ebx
jz	loc_7383E8
mov	eax, [esi+1Ch]
cmp	eax, 1
jl	loc_7383E8
cmp	eax, 2
push	edi
jl	loc_738392
push	1
mov	ecx, esi
call	sub_651EC0
cmp	byte ptr [eax],	1
jz	loc_738392
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+2Ch+var_10]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+18h]
push	edx
push	1
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	edi, edi
jz	loc_7383D1
lea	ecx, [esp+20h+var_14]
call	sub_679E30
mov	eax, [esp+20h+var_10]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+28h+var_14]
call	sub_67A0C0
push	7Bh
lea	ecx, [esp+24h+var_14]
call	sub_679F30
mov	esi, [esi+18h]
push	0
lea	edx, [esp+24h+var_14]
mov	[esp+24h+var_4], edx
push	0
mov	[esp+28h+var_8], esi
lea	ecx, [edi+10h]
lea	edx, [esp+28h+var_C]
mov	[esp+28h+var_C], offset	off_1440860
mov	eax, [ecx]
mov	eax, [eax+20h]
push	edx
add	esi, 78h
push	esi
call	eax
push	7Dh
lea	ecx, [esp+24h+var_14]
call	sub_679F30
mov	eax, [esp+20h+var_14]
and	eax, 0FFFFFFFCh
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
push	ecx
add	eax, 8
push	eax
lea	ecx, [ebx+34h]
call	sub_732EB0
lea	ecx, [esp+20h+var_14]
mov	[esp+20h+var_C], offset	off_15818F8
call	sub_4E40F0
jmp	short loc_7383D1

loc_738392:
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	edx, [esp+2Ch+var_10]
push	edx
mov	ecx, eax
call	sub_652F60
mov	eax, [esp+20h+var_10]
cmp	dword ptr [eax+10h], 0
jbe	short loc_7383D5
mov	eax, [eax]
cmp	byte ptr [eax],	2Eh
push	0FFFFFFFFh
lea	ecx, [ebx+34h]
push	eax
jnz	short loc_7383CA
push	1
jmp	short loc_7383CC

loc_7383CA:
push	0

loc_7383CC:
call	sub_733130

loc_7383D1:
mov	eax, [esp+20h+var_10]

loc_7383D5:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7383E7
call	sub_650DF0

loc_7383E7:
pop	edi

loc_7383E8:
pop	ebx

loc_7383E9:
pop	esi
add	esp, 14h
retn
sub_738260 endp

align 10h



; int __stdcall	sub_7383F0(int,	char *,	int)
sub_7383F0 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
push	edi
mov	ebx, ecx
mov	eax, [ebx+4]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, [esp+28h+arg_4]
call	sub_652F60
mov	eax, [esp+18h+var_8]
mov	ebp, [eax]
mov	edx, [esp+18h+arg_0]
mov	[esp+18h+arg_4], 0
mov	edi, [eax+10h]
mov	eax, [edx]
mov	esi, [eax]
mov	ecx, offset aColor ; "color"
mov	eax, esi
nop

loc_738430:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_738450
test	dl, dl
jz	short loc_73844C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_738450
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_738430

loc_73844C:
xor	eax, eax
jmp	short loc_738455

loc_738450:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_738455:
test	eax, eax
jnz	short loc_738488
push	10h		; int
lea	ecx, [esp+1Ch+arg_4]
push	ecx		; char **
inc	ebp
push	ebp		; char *
call	_strtol
mov	ecx, [ebx+8]
mov	edx, [ecx+54h]
add	ecx, 34h
xor	edx, eax
and	edx, offset sub_FFFFFF
xor	[ecx+20h], edx
add	esp, 0Ch
or	word ptr [ecx+2Ah], 1
jmp	loc_73890E

loc_738488:		; "display"
mov	ecx, offset aDisplay
mov	eax, esi
nop

loc_738490:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_7384B0
test	dl, dl
jz	short loc_7384AC
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_7384B0
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_738490

loc_7384AC:
xor	eax, eax
jmp	short loc_7384B5

loc_7384B0:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_7384B5:
test	eax, eax
jz	loc_73890E
mov	ecx, offset aFontfamily	; "fontFamily"
mov	eax, esi

loc_7384C4:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_7384E4
test	dl, dl
jz	short loc_7384E0
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_7384E4
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_7384C4

loc_7384E0:
xor	eax, eax
jmp	short loc_7384E9

loc_7384E4:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_7384E9:
test	eax, eax
jnz	short loc_7384FF
mov	ecx, [ebx+8]
push	edi
push	ebp
add	ecx, 34h
call	sub_7010A0
jmp	loc_73890E

loc_7384FF:
mov	esi, [esp+18h+arg_0]
push	offset aFontsize ; "fontSize"
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_73853C
lea	eax, [esp+18h+arg_4]
push	eax		; float
push	ebp		; Src
call	sub_67B3C0
fstp	[esp+20h+arg_0]
mov	ecx, [ebx+8]
fld	[esp+20h+arg_0]
add	esp, 4
add	ecx, 34h
fstp	[esp+1Ch+var_1C]
call	sub_6D5760
jmp	loc_73890E

loc_73853C:		; "fontStyle"
push	offset aFontstyle
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_7385B1
mov	eax, edi
cmp	edi, 4
jb	short loc_738558
mov	eax, 4

loc_738558:		; size_t
push	eax
push	ebp		; char *
push	offset aNormal	; "normal"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_73857C
mov	ecx, [ebx+8]
push	eax
add	ecx, 34h
call	sub_701360
jmp	loc_73890E

loc_73857C:
mov	eax, edi
cmp	edi, 9
jb	short loc_738588
mov	eax, 9

loc_738588:		; size_t
push	eax
push	ebp		; char *
push	offset aItalic_1 ; "italic"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	loc_73890E
mov	ecx, [ebx+8]
push	1
add	ecx, 34h
call	sub_701360
jmp	loc_73890E

loc_7385B1:		; "fontWeight"
push	offset aFontweight
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_738626
mov	eax, edi
cmp	edi, 6
jb	short loc_7385CD
mov	eax, 6

loc_7385CD:		; size_t
push	eax
push	ebp		; char *
push	offset aNormal	; "normal"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7385F1
mov	ecx, [ebx+8]
push	eax
add	ecx, 34h
call	sub_701310
jmp	loc_73890E

loc_7385F1:
mov	eax, edi
cmp	edi, 4
jb	short loc_7385FD
mov	eax, 4

loc_7385FD:		; size_t
push	eax
push	ebp		; char *
push	offset aBold_1	; "bold"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	loc_73890E
mov	ecx, [ebx+8]
push	1
add	ecx, 34h
call	sub_701310
jmp	loc_73890E

loc_738626:		; "kerning"
push	offset aKerning
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_73869B
mov	eax, edi
cmp	edi, 4
jb	short loc_738642
mov	eax, 4

loc_738642:		; size_t
push	eax
push	ebp		; char *
push	offset aTrue	; "true"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_738666
mov	ecx, [ebx+8]
push	eax
add	ecx, 34h
call	sub_6FFB10
jmp	loc_73890E

loc_738666:
mov	eax, edi
cmp	edi, 5
jb	short loc_738672
mov	eax, 5

loc_738672:		; size_t
push	eax
push	ebp		; char *
push	offset aFalse	; "false"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	loc_73890E
mov	ecx, [ebx+8]
push	1
add	ecx, 34h
call	sub_6FFB10
jmp	loc_73890E

loc_73869B:		; "letterSpacing"
push	offset aLetterspacing
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_7386D4
lea	ecx, [esp+18h+arg_4]
push	ecx		; float
push	ebp		; Src
call	sub_67B3C0
fstp	[esp+20h+arg_0]
mov	ecx, [ebx+8]
fld	[esp+20h+arg_0]
add	esp, 4
add	ecx, 34h
fstp	[esp+1Ch+var_1C]
call	sub_6D5740
jmp	loc_73890E

loc_7386D4:		; "marginLeft"
push	offset aMarginleft
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_738731
lea	edx, [esp+18h+arg_4]
push	edx		; char **
push	ebp		; Src
call	sub_67B3C0
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
mov	ecx, [ebx+8]
fnstcw	word ptr [esp+20h+arg_0]
add	ecx, 60h
movzx	eax, word ptr [esp+20h+arg_0]
or	eax, 0C00h
mov	[esp+20h+var_4], eax
add	esp, 8
or	word ptr [ecx+16h], 10h
fldcw	word ptr [esp+18h+var_4]
fistp	[esp+18h+var_4]
mov	ax, word ptr [esp+18h+var_4]
mov	[ecx+12h], ax
fldcw	word ptr [esp+18h+arg_0]
jmp	loc_73890E

loc_738731:		; "marginRight"
push	offset aMarginright
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_73878E
lea	ecx, [esp+18h+arg_4]
push	ecx		; char **
push	ebp		; Src
call	sub_67B3C0
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
mov	ecx, [ebx+8]
fnstcw	word ptr [esp+20h+arg_0]
add	ecx, 60h
movzx	eax, word ptr [esp+20h+arg_0]
or	eax, 0C00h
mov	[esp+20h+var_4], eax
add	esp, 8
or	word ptr [ecx+16h], 20h
fldcw	word ptr [esp+18h+var_4]
fistp	[esp+18h+var_4]
mov	dx, word ptr [esp+18h+var_4]
mov	[ecx+14h], dx
fldcw	word ptr [esp+18h+arg_0]
jmp	loc_73890E

loc_73878E:		; "textAlign"
push	offset aTextalign
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	loc_738869
mov	eax, edi
cmp	edi, 4
jb	short loc_7387AE
mov	eax, 4

loc_7387AE:		; size_t
push	eax
push	ebp		; char *
push	offset aLeft_0	; "left"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7387D2
mov	ecx, [ebx+8]
push	eax
add	ecx, 60h
call	sub_6C4440
jmp	loc_73890E

loc_7387D2:
mov	eax, edi
cmp	edi, 6
jb	short loc_7387DE
mov	eax, 6

loc_7387DE:		; size_t
push	eax
push	ebp		; char *
push	offset aCenter	; "center"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_738803
mov	ecx, [ebx+8]
push	3
add	ecx, 60h
call	sub_6C4440
jmp	loc_73890E

loc_738803:
mov	eax, edi
cmp	edi, 5
jb	short loc_73880F
mov	eax, 5

loc_73880F:		; size_t
push	eax
push	ebp		; char *
push	offset aRight	; "right"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_738834
mov	ecx, [ebx+8]
push	1
add	ecx, 60h
call	sub_6C4440
jmp	loc_73890E

loc_738834:
mov	eax, edi
cmp	edi, 7
jb	short loc_738840
mov	eax, 7

loc_738840:		; size_t
push	eax
push	ebp		; char *
push	offset aJustify_0 ; "justify"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	loc_73890E
mov	ecx, [ebx+8]
push	2
add	ecx, 60h
call	sub_6C4440
jmp	loc_73890E

loc_738869:		; "textDecoration"
push	offset aTextdecoration
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_7388D4
mov	eax, edi
cmp	edi, 4
jb	short loc_738885
mov	eax, 4

loc_738885:		; size_t
push	eax
push	ebp		; char *
push	offset aNone_0	; "none"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7388A6
mov	ecx, [ebx+8]
push	eax
add	ecx, 34h
call	sub_6FFAF0
jmp	short loc_73890E

loc_7388A6:
mov	eax, edi
cmp	edi, 9
jb	short loc_7388B2
mov	eax, 9

loc_7388B2:		; size_t
push	eax
push	ebp		; char *
push	offset aUnderline ; "underline"
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_73890E
mov	ecx, [ebx+8]
push	1
add	ecx, 34h
call	sub_6FFAF0
jmp	short loc_73890E

loc_7388D4:		; "textIndent"
push	offset aTextindent
mov	ecx, esi
call	sub_67DA70
test	al, al
jz	short loc_73890E
lea	eax, [esp+18h+arg_4]
push	eax		; char **
push	ebp		; Src
call	sub_67B3C0
fstp	[esp+20h+arg_0]
mov	esi, [ebx+8]
fld	[esp+20h+arg_0]
add	esp, 8
add	esi, 60h
call	__ftol2_sse
or	word ptr [esi+16h], 4
mov	[esi+0Eh], ax

loc_73890E:
mov	eax, [esp+18h+var_8]
dec	dword ptr [eax+8]
pop	edi
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
pop	ebp
pop	ebx
jnz	short loc_738928
call	sub_650DF0

loc_738928:
add	esp, 8
retn	0Ch
sub_7383F0 endp

align 10h



sub_738930 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+60h]
test	eax, eax
jz	short loc_73895B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+60h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_73895B:
lea	ecx, [esi+34h]
call	sub_7331A0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_738930 endp

align 10h



sub_738970 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14408CC
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_738993
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_738993:
mov	eax, esi
pop	esi
retn	4
sub_738970 endp

align 10h



sub_7389A0 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+48h]
call	sub_67C000
lea	ecx, [edi+54h]
call	sub_67C000
mov	eax, [edi+60h]
test	eax, eax
jz	short loc_738A10
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_738A0E
lea	ebx, [ebx+0]

loc_7389D0:
mov	eax, [edi+60h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_738A09
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_738A09
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_738A09:
inc	esi
cmp	esi, ebx
jb	short loc_7389D0

loc_738A0E:
pop	esi
pop	ebx

loc_738A10:
pop	edi
retn
sub_7389A0 endp

align 10h



sub_738A20 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+48h]
call	sub_67BFB0
lea	ecx, [edi+54h]
call	sub_67BFB0
mov	eax, [edi+60h]
test	eax, eax
jz	short loc_738A82
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_738A80
lea	ebx, [ebx+0]

loc_738A50:
mov	eax, [edi+60h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_738A7B
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_738A7B
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_738A7B:
inc	esi
cmp	esi, ebx
jb	short loc_738A50

loc_738A80:
pop	esi
pop	ebx

loc_738A82:
pop	edi
retn
sub_738A20 endp

align 10h



sub_738A90 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+48h]
call	sub_67C070
lea	ecx, [edi+54h]
call	sub_67C070
mov	eax, [edi+60h]
test	eax, eax
jz	short loc_738B0D
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_738B0B
lea	ebx, [ebx+0]

loc_738AC0:
mov	eax, [edi+60h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_738B06
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_738B06
test	eax, 0FFFFFFFh
jbe	short loc_738AF1
and	eax, 8FFFFFFFh
push	2
jmp	short loc_738AFD

loc_738AF1:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_738AFD:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_738B06:
inc	esi
cmp	esi, ebx
jb	short loc_738AC0

loc_738B0B:
pop	esi
pop	ebx

loc_738B0D:
pop	edi
retn
sub_738A90 endp

align 10h



sub_738B10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_14408D8
test	eax, eax
jz	short loc_738B2E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_738B2E:
mov	ecx, esi
mov	dword ptr [esi], offset	off_14408CC
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_738B50
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_738B50:
mov	eax, esi
pop	esi
retn	4
sub_738B10 endp

align 10h



sub_738B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	1Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_738B86
push	0
push	0
push	offset aStylesheet_0 ; "StyleSheet"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_738B86:
mov	eax, [esi+8]
test	eax, eax
jz	loc_738C67
push	ebp
lea	ebp, [eax-10h]
test	ebp, ebp
jz	loc_738C66
cmp	dword ptr [esi+1Ch], 0
jnz	short loc_738BB8
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	ebp
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0
pop	esi
pop	ecx
retn

loc_738BB8:
push	edi
mov	edi, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	edi
lea	ecx, [esp+1Ch+var_4]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	14h
call	eax
test	eax, eax
jz	short loc_738C17
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_14408D8
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	dword ptr [eax+10h], 0
mov	edi, eax
jmp	short loc_738C19

loc_738C17:
xor	edi, edi

loc_738C19:
mov	ecx, [esp+10h+var_4]
mov	eax, [ecx]
mov	ecx, [esi+18h]
push	0
push	eax
push	edi
push	ebp
call	sub_668010
mov	ecx, eax
call	sub_696040
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 1
test	edi, edi
jz	short loc_738C4F
mov	ecx, edi
call	sub_64A430

loc_738C4F:
mov	eax, [esp+10h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_738C66
call	sub_650DF0

loc_738C66:
pop	ebp

loc_738C67:
pop	esi
pop	ecx
retn
sub_738B60 endp

align 10h



sub_738C70 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+48h]
call	sub_67C210
lea	ecx, [edi+54h]
call	sub_67C210
mov	eax, [edi+60h]
test	eax, eax
jz	short loc_738CBA
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_738CB8
lea	ebx, [ebx+0]

loc_738CA0:
mov	eax, [edi+60h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_738CB3
call	sub_64B020

loc_738CB3:
inc	esi
cmp	esi, ebx
jb	short loc_738CA0

loc_738CB8:
pop	esi
pop	ebx

loc_738CBA:
pop	edi
retn
sub_738C70 endp

align 10h



sub_738CC0 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+48h]
call	sub_67C1F0
lea	ecx, [edi+54h]
call	sub_67C1F0
mov	eax, [edi+60h]
test	eax, eax
jz	short loc_738D0A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_738D08
lea	ebx, [ebx+0]

loc_738CF0:
mov	eax, [edi+60h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_738D03
call	sub_64B3B0

loc_738D03:
inc	esi
cmp	esi, ebx
jb	short loc_738CF0

loc_738D08:
pop	esi
pop	ebx

loc_738D0A:
pop	edi
retn
sub_738CC0 endp

align 10h



sub_738D10 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	qword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= qword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 3Ch
push	ebx
push	ebp
mov	ebp, [esp+44h+arg_0]
xor	ebx, ebx
push	1Fh
mov	ecx, ebp
mov	[esp+48h+var_38], ebx
call	sub_651C40
test	al, al
jnz	short loc_738D40
push	ebx
push	ebx
push	offset aStylesheet_0 ; "StyleSheet"
mov	ecx, ebp
call	sub_651C60
pop	ebp
pop	ebx
add	esp, 3Ch
retn

loc_738D40:
mov	eax, [ebp+8]
cmp	eax, ebx
jz	loc_739844
push	edi
lea	edi, [eax-10h]
cmp	edi, ebx
jz	loc_739843
cmp	dword ptr [ebp+1Ch], 1
jge	short loc_738D72
mov	ebp, [ebp+4]
mov	ecx, ebp
call	sub_652060
pop	edi
mov	byte ptr [ebp+0], 1
pop	ebp
pop	ebx
add	esp, 3Ch
retn

loc_738D72:
push	esi
mov	esi, [ebp+18h]
push	ebx
mov	ecx, ebp
call	sub_651EC0
push	ebx
push	0FFFFFFFFh
push	esi
lea	ecx, [esp+58h+var_28]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	ecx, [esp+4Ch+var_28]
mov	eax, [ecx+10h]
cmp	eax, ebx
jbe	short loc_738DB6
mov	edx, [ecx]
cmp	byte ptr [edx],	2Eh
jnz	short loc_738DB6
dec	eax
push	eax
inc	edx
push	edx
push	1
lea	ecx, [edi+34h]
call	sub_732F90
mov	edi, eax
mov	dword ptr [esp+4Ch+var_34+4], edi
jmp	short loc_738DC9

loc_738DB6:
mov	ecx, [ecx]
push	eax
push	ecx
push	ebx
lea	ecx, [edi+34h]
call	sub_732F90
mov	edi, eax
mov	dword ptr [esp+4Ch+var_34+4], eax

loc_738DC9:
cmp	edi, ebx
jnz	short loc_738DEE
mov	ebp, [ebp+4]
mov	ecx, ebp
call	sub_652060
mov	byte ptr [ebp+0], 1
mov	eax, [esp+4Ch+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jmp	loc_73983B

loc_738DEE:
mov	edx, [ebp+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	34h
call	eax
cmp	eax, ebx
jz	short loc_738E19
mov	ecx, [ebp+18h]
push	ecx
mov	ecx, eax
call	sub_663BE0
mov	dword ptr [esp+4Ch+var_34], eax
jmp	short loc_738E1D

loc_738E19:
mov	dword ptr [esp+4Ch+var_34], ebx

loc_738E1D:
mov	esi, [ebp+18h]
add	esi, 78h
test	byte ptr [edi+2Ah], 1
jz	loc_738F87
lea	ecx, [esp+4Ch+var_2C]
call	sub_679E30
push	23h
lea	ecx, [esp+50h+var_2C]
call	sub_679F30
mov	edx, dword ptr [esp+4Ch+var_34+4]
mov	ebx, [edx+20h]
mov	eax, ebx
shr	eax, 10h
movzx	edi, al
mov	eax, edi
shr	eax, 4
movsx	ecx, byte ptr ds:a0123456789abcd[eax] ;	"0123456789ABCDEF"
push	ecx
lea	ecx, [esp+50h+var_2C]
call	sub_679F30
and	edi, 0Fh
movsx	edx, byte ptr ds:a0123456789abcd[edi] ;	"0123456789ABCDEF"
push	edx
lea	ecx, [esp+50h+var_2C]
call	sub_679F30
movzx	edi, bh
mov	eax, edi
shr	eax, 4
movsx	ecx, byte ptr ds:a0123456789abcd[eax] ;	"0123456789ABCDEF"
push	ecx
lea	ecx, [esp+50h+var_2C]
call	sub_679F30
and	edi, 0Fh
movsx	edx, byte ptr ds:a0123456789abcd[edi] ;	"0123456789ABCDEF"
push	edx
lea	ecx, [esp+50h+var_2C]
call	sub_679F30
movzx	edi, bl
mov	eax, edi
shr	eax, 4
movsx	ecx, byte ptr ds:a0123456789abcd[eax] ;	"0123456789ABCDEF"
push	ecx
lea	ecx, [esp+50h+var_2C]
call	sub_679F30
and	edi, 0Fh
movsx	edx, byte ptr ds:a0123456789abcd[edi] ;	"0123456789ABCDEF"
push	edx
lea	ecx, [esp+50h+var_2C]
call	sub_679F30
mov	eax, [esi]
mov	ecx, [eax+280h]
mov	eax, [esp+4Ch+var_2C]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	edi, eax
mov	eax, 1
add	[edi+8], eax
mov	[esp+4Ch+var_10], 5
mov	dword ptr [esp+4Ch+var_C], edi
add	[edi+8], eax
mov	eax, dword ptr [esp+4Ch+var_34]
mov	ebx, [eax+10h]
add	eax, 10h
mov	[esp+4Ch+var_24], eax
lea	eax, [esp+4Ch+var_3C+3]
push	eax
lea	ecx, [esp+50h+var_10]
push	ecx
push	offset aColor	; "color"
lea	edx, [esp+58h+var_20]
push	edx
mov	ecx, esi
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	ebx, 0Ch
call	sub_64ABA0
push	eax
mov	eax, [ebp+18h]
push	eax
mov	ecx, [esp+5Ch+var_24]
mov	edx, [ebx]
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_738F64
call	sub_650DF0

loc_738F64:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_738F7A
mov	ecx, edi
call	sub_650DF0

loc_738F7A:
lea	ecx, [esp+4Ch+var_2C]
call	sub_4E40F0
mov	edi, dword ptr [esp+4Ch+var_34+4]

loc_738F87:
mov	al, [edi+2Ah]
shr	al, 2
test	al, 1
jz	loc_739041
mov	ecx, dword ptr [esp+4Ch+var_34+4]
call	sub_700520
mov	eax, [eax]
mov	ecx, [esi]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	edi, eax
mov	eax, 1
add	[edi+8], eax
mov	[esp+4Ch+var_10], 5
mov	dword ptr [esp+4Ch+var_C], edi
add	[edi+8], eax
mov	eax, dword ptr [esp+4Ch+var_34]
mov	ebx, [eax+10h]
add	eax, 10h
lea	eax, [esp+4Ch+var_3C+3]
push	eax
lea	ecx, [esp+50h+var_10]
push	ecx
push	offset aFontfamily ; "fontFamily"
lea	edx, [esp+58h+var_20]
push	edx
mov	ecx, esi
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	ebx, 0Ch
call	sub_64ABA0
mov	ecx, dword ptr [esp+54h+var_34]
mov	edx, [ebx]
push	eax
mov	eax, [ebp+18h]
push	eax
add	ecx, 10h
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73902B
call	sub_650DF0

loc_73902B:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
add	dword ptr [edi+8], 0FFFFFFFFh
jnz	short loc_739041
mov	ecx, edi
call	sub_650DF0

loc_739041:
mov	eax, dword ptr [esp+4Ch+var_34+4]
mov	cl, [eax+2Ah]
shr	cl, 3
test	cl, 1
jz	short loc_7390CE
movzx	edx, word ptr [eax+26h]
mov	[esp+4Ch+var_20], edx
mov	ebx, dword ptr [esp+4Ch+var_34]
fild	[esp+4Ch+var_20]
mov	edi, [ebx+10h]
lea	eax, [esp+4Ch+var_3C+3]
push	eax
fdiv	ds:dbl_15FCE20
lea	ecx, [esp+50h+var_10]
push	ecx
add	ebx, 10h
push	offset aFontsize ; "fontSize"
lea	edx, [esp+58h+var_20]
push	edx
mov	ecx, esi
mov	[esp+5Ch+var_10], 3
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
fstp	[esp+5Ch+var_20]
fld	[esp+5Ch+var_20]
fstp	[esp+5Ch+var_C]
call	sub_64ABA0
mov	edx, [edi]
push	eax
mov	eax, [ebp+18h]
push	eax
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7390C1
call	sub_650DF0

loc_7390C1:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	eax, dword ptr [esp+4Ch+var_34+4]

loc_7390CE:
mov	cl, [eax+2Ah]
shr	cl, 5
test	cl, 1
jz	loc_7391C1
test	byte ptr [eax+28h], 2
mov	ecx, esi
jz	short loc_7390F9
push	offset aItalic_1 ; "italic"
lea	edx, [esp+50h+var_2C]
mov	[esp+50h+var_38], 1
push	edx
jmp	short loc_73910B

loc_7390F9:		; "normal"
push	offset aNormal
lea	eax, [esp+50h+var_24]
mov	[esp+50h+var_38], 2
push	eax

loc_73910B:
call	sub_64ABA0
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	[esp+4Ch+var_10], 5
mov	eax, [eax]
lea	ecx, [esp+4Ch+var_3C+3]
push	ecx
lea	edx, [esp+50h+var_10]
mov	dword ptr [esp+50h+var_C], eax
inc	dword ptr [eax+8]
mov	edi, [ebx+10h]
push	edx
add	ebx, 10h
push	offset aFontstyle ; "fontStyle"
lea	eax, [esp+58h+var_20]
push	eax
mov	ecx, esi
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	ecx, [ebp+18h]
mov	edx, [edi]
push	eax
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73916C
call	sub_650DF0

loc_73916C:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	ebx, [esp+4Ch+var_38]
test	bl, 2
jz	short loc_73919B
mov	eax, [esp+4Ch+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFDh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_73919B
call	sub_650DF0

loc_73919B:
test	bl, 1
jz	short loc_7391BD
mov	eax, [esp+4Ch+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFEh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_7391BD
call	sub_650DF0

loc_7391BD:
mov	eax, dword ptr [esp+4Ch+var_34+4]

loc_7391C1:
mov	al, [eax+2Ah]
shr	al, 4
test	al, 1
jz	loc_7392AD
mov	ecx, dword ptr [esp+4Ch+var_34+4]
test	byte ptr [ecx+28h], 1
mov	ecx, esi
jz	short loc_7391EC
or	[esp+4Ch+var_38], 4
push	offset aBold_1	; "bold"
lea	edx, [esp+50h+var_2C]
push	edx
jmp	short loc_7391FB

loc_7391EC:
or	[esp+4Ch+var_38], 8
push	offset aNormal	; "normal"
lea	eax, [esp+50h+var_24]
push	eax

loc_7391FB:
call	sub_64ABA0
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	[esp+4Ch+var_10], 5
mov	eax, [eax]
lea	ecx, [esp+4Ch+var_3C+3]
push	ecx
lea	edx, [esp+50h+var_10]
mov	dword ptr [esp+50h+var_C], eax
inc	dword ptr [eax+8]
mov	edi, [ebx+10h]
push	edx
add	ebx, 10h
push	offset aFontweight ; "fontWeight"
lea	eax, [esp+58h+var_20]
push	eax
mov	ecx, esi
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	ecx, [ebp+18h]
mov	edx, [edi]
push	eax
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73925C
call	sub_650DF0

loc_73925C:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	ebx, [esp+4Ch+var_38]
test	bl, 8
jz	short loc_73928B
mov	eax, [esp+4Ch+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFF7h
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_73928B
call	sub_650DF0

loc_73928B:
test	bl, 4
jz	short loc_7392AD
mov	eax, [esp+4Ch+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFFBh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_7392AD
call	sub_650DF0

loc_7392AD:
mov	eax, dword ptr [esp+4Ch+var_34+4]
mov	cl, [eax+2Ah]
shr	cl, 7
test	cl, 1
jz	loc_73939C
mov	edx, eax
test	byte ptr [edx+28h], 8
jz	short loc_7392D9
or	[esp+4Ch+var_38], 10h
push	offset aTrue	; "true"
lea	eax, [esp+50h+var_2C]
push	eax
jmp	short loc_7392E8

loc_7392D9:
or	[esp+4Ch+var_38], 20h
push	offset aFalse	; "false"
lea	ecx, [esp+50h+var_24]
push	ecx

loc_7392E8:
mov	ecx, esi
call	sub_64ABA0
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	[esp+4Ch+var_10], 5
mov	eax, [eax]
mov	dword ptr [esp+4Ch+var_C], eax
inc	dword ptr [eax+8]
mov	edi, [ebx+10h]
lea	edx, [esp+4Ch+var_3C+3]
push	edx
lea	eax, [esp+50h+var_10]
push	eax
push	offset aKerning	; "kerning"
lea	ecx, [esp+58h+var_20]
add	ebx, 10h
push	ecx
mov	ecx, esi
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	edx, [ebp+18h]
push	eax
mov	eax, [edi]
push	edx
mov	ecx, ebx
call	eax
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73934B
call	sub_650DF0

loc_73934B:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	ebx, [esp+4Ch+var_38]
test	bl, 20h
jz	short loc_73937A
mov	eax, [esp+4Ch+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFDFh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_73937A
call	sub_650DF0

loc_73937A:
test	bl, 10h
jz	short loc_73939C
mov	eax, [esp+4Ch+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFFEFh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_73939C
call	sub_650DF0

loc_73939C:
mov	eax, dword ptr [esp+4Ch+var_34+4]
mov	cl, [eax+2Ah]
shr	cl, 1
test	cl, 1
jz	short loc_739428
movsx	edx, word ptr [eax+24h]
mov	[esp+4Ch+var_20], edx
mov	ebx, dword ptr [esp+4Ch+var_34]
fild	[esp+4Ch+var_20]
mov	edi, [ebx+10h]
lea	eax, [esp+4Ch+var_3C+3]
push	eax
fdiv	ds:dbl_15FCE20
lea	ecx, [esp+50h+var_10]
push	ecx
add	ebx, 10h
push	offset aLetterspacing ;	"letterSpacing"
lea	edx, [esp+58h+var_20]
push	edx
mov	ecx, esi
mov	[esp+5Ch+var_10], 3
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
fstp	[esp+5Ch+var_20]
fld	[esp+5Ch+var_20]
fstp	[esp+5Ch+var_C]
call	sub_64ABA0
mov	edx, [edi]
push	eax
mov	eax, [ebp+18h]
push	eax
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73941B
call	sub_650DF0

loc_73941B:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	eax, dword ptr [esp+4Ch+var_34+4]

loc_739428:
mov	cl, [eax+42h]
add	eax, 2Ch
shr	cl, 4
mov	[esp+4Ch+var_2C], eax
test	cl, 1
jz	short loc_7394AC
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	edi, [ebx+10h]
mov	edx, eax
movzx	eax, word ptr [edx+12h]
lea	ecx, [esp+4Ch+var_3C+3]
push	ecx
lea	edx, [esp+50h+var_10]
mov	[esp+50h+var_20], eax
push	edx
fild	[esp+54h+var_20]
add	ebx, 10h
push	offset aMarginleft ; "marginLeft"
lea	eax, [esp+58h+var_20]
push	eax
fstp	[esp+5Ch+var_C]
mov	ecx, esi
mov	[esp+5Ch+var_10], 3
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	ecx, [ebp+18h]
mov	edx, [edi]
push	eax
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73949F
call	sub_650DF0

loc_73949F:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	eax, [esp+4Ch+var_2C]

loc_7394AC:
mov	cl, [eax+16h]
shr	cl, 5
test	cl, 1
jz	short loc_73952B
mov	edx, [esp+4Ch+var_2C]
movzx	eax, word ptr [edx+14h]
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	edi, [ebx+10h]
lea	ecx, [esp+4Ch+var_3C+3]
push	ecx
lea	edx, [esp+50h+var_10]
mov	[esp+50h+var_20], eax
push	edx
fild	[esp+54h+var_20]
add	ebx, 10h
push	offset aMarginright ; "marginRight"
lea	eax, [esp+58h+var_20]
push	eax
fstp	[esp+5Ch+var_C]
mov	ecx, esi
mov	[esp+5Ch+var_10], 3
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	ecx, [ebp+18h]
mov	edx, [edi]
push	eax
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73951E
call	sub_650DF0

loc_73951E:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	eax, [esp+4Ch+var_2C]

loc_73952B:
test	byte ptr [eax+16h], 1
jz	loc_7396A8
mov	edi, [esp+4Ch+var_2C]
mov	ecx, edi
call	sub_737FA0
test	al, al
jz	short loc_739554
or	[esp+4Ch+var_38], 40h
push	offset aLeft_0	; "left"
lea	eax, [esp+50h+var_14]
jmp	short loc_7395A3

loc_739554:
mov	ecx, edi
call	sub_71E1B0
test	al, al
jz	short loc_739573
or	[esp+4Ch+var_38], 80h
push	offset aCenter	; "center"
lea	ecx, [esp+50h+var_18]
push	ecx
jmp	short loc_7395A4

loc_739573:
mov	ecx, edi
call	sub_71E180
test	al, al
jz	short loc_739592
or	[esp+4Ch+var_38], 100h
push	offset aRight	; "right"
lea	edx, [esp+50h+var_1C]
push	edx
jmp	short loc_7395A4

loc_739592:
or	[esp+4Ch+var_38], 200h
push	offset aJustify_0 ; "justify"
lea	eax, [esp+50h+var_24]

loc_7395A3:
push	eax

loc_7395A4:
mov	ecx, esi
call	sub_64ABA0
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	[esp+4Ch+var_10], 5
mov	eax, [eax]
lea	ecx, [esp+4Ch+var_3C+3]
push	ecx
lea	edx, [esp+50h+var_10]
mov	dword ptr [esp+50h+var_C], eax
inc	dword ptr [eax+8]
mov	edi, [ebx+10h]
push	edx
add	ebx, 10h
push	offset aTextalign ; "textAlign"
lea	eax, [esp+58h+var_20]
push	eax
mov	ecx, esi
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	ecx, [ebp+18h]
mov	edx, [edi]
push	eax
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_739607
call	sub_650DF0

loc_739607:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	ebx, [esp+4Ch+var_38]
test	ebx, 200h
jz	short loc_73963C
mov	eax, [esp+4Ch+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFDFFh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_73963C
call	sub_650DF0

loc_73963C:
test	ebx, 100h
jz	short loc_739664
mov	eax, [esp+4Ch+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFEFFh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_739664
call	sub_650DF0

loc_739664:
test	bl, bl
jns	short loc_739688
mov	eax, [esp+4Ch+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	ebx, 0FFFFFF7Fh
cmp	dword ptr [eax], 0
mov	[esp+4Ch+var_38], ebx
jnz	short loc_739688
call	sub_650DF0

loc_739688:
test	bl, 40h
jz	short loc_7396A8
mov	eax, [esp+4Ch+var_14]
and	[esp+4Ch+var_38], 0FFFFFFBFh
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7396A8
call	sub_650DF0

loc_7396A8:
mov	eax, dword ptr [esp+4Ch+var_34+4]
mov	cl, [eax+2Ah]
shr	cl, 6
test	cl, 1
jz	loc_739799
test	byte ptr [eax+28h], 4
mov	ecx, esi
jz	short loc_7396D7
or	[esp+4Ch+var_38], 400h
push	offset aUnderline ; "underline"
lea	edx, [esp+50h+var_1C]
push	edx
jmp	short loc_7396E9

loc_7396D7:
or	[esp+4Ch+var_38], 800h
push	offset aNone_0	; "none"
lea	eax, [esp+50h+var_18]
push	eax

loc_7396E9:
call	sub_64ABA0
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	[esp+4Ch+var_10], 5
mov	eax, [eax]
lea	ecx, [esp+4Ch+var_3C+3]
push	ecx
lea	edx, [esp+50h+var_10]
mov	dword ptr [esp+50h+var_C], eax
inc	dword ptr [eax+8]
mov	edi, [ebx+10h]
push	edx
add	ebx, 10h
push	offset aTextdecoration ; "textDecoration"
lea	eax, [esp+58h+var_14]
push	eax
mov	ecx, esi
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	ecx, [ebp+18h]
mov	edx, [edi]
push	eax
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73974A
call	sub_650DF0

loc_73974A:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830
mov	edi, [esp+4Ch+var_38]
test	edi, 800h
jz	short loc_73977B
mov	eax, [esp+4Ch+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
and	edi, 0FFFFF7FFh
cmp	dword ptr [eax], 0
jnz	short loc_73977B
call	sub_650DF0

loc_73977B:
test	edi, 400h
jz	short loc_739799
mov	eax, [esp+4Ch+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_739799
call	sub_650DF0

loc_739799:
mov	eax, [esp+4Ch+var_2C]
mov	cl, [eax+16h]
shr	cl, 2
test	cl, 1
jz	short loc_739814
movsx	edx, word ptr [eax+0Eh]
mov	ebx, dword ptr [esp+4Ch+var_34]
mov	edi, [ebx+10h]
lea	eax, [esp+4Ch+var_3C+3]
push	eax
lea	ecx, [esp+50h+var_10]
push	ecx
mov	[esp+54h+var_14], edx
add	ebx, 10h
fild	[esp+54h+var_14]
push	offset aTextindent ; "textIndent"
lea	edx, [esp+58h+var_14]
push	edx
mov	ecx, esi
fstp	[esp+5Ch+var_C]
mov	[esp+5Ch+var_10], 3
mov	byte ptr [esp+5Ch+var_3C+3], 0
add	edi, 0Ch
call	sub_64ABA0
mov	edx, [edi]
push	eax
mov	eax, [ebp+18h]
push	eax
mov	ecx, ebx
call	edx
mov	eax, [esp+4Ch+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_73980B
call	sub_650DF0

loc_73980B:
lea	ecx, [esp+4Ch+var_10]
call	sub_652830

loc_739814:
mov	esi, dword ptr [esp+4Ch+var_34]
mov	ecx, [ebp+4]
push	esi
call	sub_652E40
test	esi, esi
jz	short loc_73982C
mov	ecx, esi
call	sub_64B3B0

loc_73982C:
mov	eax, [esp+4Ch+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0

loc_73983B:
jnz	short loc_739842
call	sub_650DF0

loc_739842:
pop	esi

loc_739843:
pop	edi

loc_739844:
pop	ebp
pop	ebx
add	esp, 3Ch
retn
sub_738D10 endp

align 10h



sub_739850 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 20h
push	edi
mov	edi, [esp+24h+arg_0]
push	1Fh
mov	ecx, edi
call	sub_651C40
test	al, al
jnz	short loc_73987A
push	0
push	0
push	offset aStylesheet_0 ; "StyleSheet"
mov	ecx, edi
call	sub_651C60
pop	edi
add	esp, 20h
retn

loc_73987A:
push	esi
mov	esi, [edi+8]
test	esi, esi
jz	loc_739A0E
add	esi, 0FFFFFFF0h
jz	loc_739A0E
mov	ecx, [edi+18h]
mov	eax, [ecx+78h]
push	ebx
push	ebp
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 10h
push	eax
push	edx
call	sub_671840
mov	ebp, [edi+18h]
lea	ecx, [esp+30h+var_20]
mov	ebx, eax
add	ebp, 78h
call	sub_679E30
add	esi, 34h
mov	ecx, esi
mov	[esp+30h+var_1C], esi
call	sub_40B320
mov	ecx, [eax]
test	ecx, ecx
jnz	short loc_7398D8
xor	eax, eax
xor	edx, edx
jmp	short loc_7398ED

loc_7398D8:
mov	esi, [ecx+4]
xor	edx, edx
add	ecx, 8

loc_7398E0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_7398ED
inc	edx
add	ecx, 14h
cmp	edx, esi
jbe	short loc_7398E0

loc_7398ED:
mov	edi, eax
mov	esi, edx
mov	[esp+30h+var_18], edi
mov	[esp+30h+var_14], esi
lea	esp, [esp+0]

loc_739900:
mov	ecx, [esp+30h+var_1C]
call	sub_40B320
test	edi, edi
jz	loc_7399CE
cmp	dword ptr [edi], 0
jz	loc_7399CE
mov	eax, [edi]
cmp	esi, [eax+4]
jg	loc_7399CE
lea	ecx, [esp+30h+var_20]
call	sub_67A720
mov	ecx, [edi]
lea	esi, [esi+esi*4]
add	esi, esi
add	esi, esi
cmp	dword ptr [ecx+esi+0Ch], 1
jnz	short loc_739949
push	2Eh
lea	ecx, [esp+34h+var_20]
call	sub_679F30

loc_739949:
mov	edx, [edi]
lea	eax, [edx+esi+10h]
push	eax
lea	ecx, [esp+34h+var_20]
call	sub_67A540
mov	eax, [esp+30h+var_20]
mov	ecx, [ebp+0]
mov	ecx, [ecx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	[esp+30h+var_10], 5
mov	[esp+30h+var_C], esi
add	[esi+8], eax
lea	eax, [esp+30h+var_10]
push	eax
mov	ecx, ebx
call	sub_65E720
lea	ecx, [esp+30h+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_7399B8
mov	ecx, esi
call	sub_650DF0

loc_7399B8:
lea	ecx, [esp+30h+var_18]
call	sub_731410
mov	esi, [esp+30h+var_14]
mov	edi, [esp+30h+var_18]
jmp	loc_739900

loc_7399CE:
mov	ecx, [esp+30h+arg_0]
mov	ecx, [ecx+4]
push	ebx
call	sub_652E40
mov	esi, [esp+30h+var_20]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_739A01
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_739A01:
test	ebx, ebx
jz	short loc_739A0C
mov	ecx, ebx
call	sub_64B3B0

loc_739A0C:
pop	ebp
pop	ebx

loc_739A0E:
pop	esi
pop	edi
add	esp, 20h
retn
sub_739850 endp

align 10h



sub_739A20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
mov	esi, [esp+10h+arg_0]
push	1Fh
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_739A4A
push	0
push	0
push	offset aStylesheet_0 ; "StyleSheet"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 0Ch
retn

loc_739A4A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_739AEC
add	eax, 0FFFFFFF0h
jz	loc_739AEC
cmp	dword ptr [esi+1Ch], 1
jl	loc_739AEC
mov	eax, [esi+18h]
push	ebx
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ebx, eax
test	ebx, ebx
jz	short loc_739AEB
mov	ecx, [esi+18h]
mov	eax, [ecx+78h]
push	edi
push	0FFFFFFFFh
mov	edx, eax
mov	edx, [edx+2ACh]
push	0
add	eax, 88h
push	eax
push	edx
call	sub_671840
mov	edi, eax
mov	eax, [esi+18h]
push	0
lea	ecx, [ebx+10h]
mov	[esp+1Ch+var_8], eax
push	0
lea	ebx, [esp+20h+var_C]
add	eax, 78h
mov	[esp+20h+var_C], offset	off_1440830
mov	[esp+20h+var_4], edi
mov	edx, [ecx]
push	ebx
push	eax
mov	eax, [edx+20h]
call	eax
mov	ecx, [esi+4]
push	edi
call	sub_652E40
mov	[esp+18h+var_C], offset	off_15818F8
test	edi, edi
jz	short loc_739AEA
mov	ecx, edi
call	sub_64B3B0

loc_739AEA:
pop	edi

loc_739AEB:
pop	ebx

loc_739AEC:
pop	esi
add	esp, 0Ch
retn
sub_739A20 endp

align 10h



sub_739B00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_739B35 ; default
jmp	ds:off_739B38[eax*4] ; switch jump

loc_739B10:		; jumptable 00739B09 case 0
call	sub_738CC0
retn	4

loc_739B18:		; jumptable 00739B09 case 1
call	sub_7389A0
retn	4

loc_739B20:		; jumptable 00739B09 case 2
call	sub_738A20
retn	4

loc_739B28:		; jumptable 00739B09 case 3
call	sub_738C70
retn	4

loc_739B30:		; jumptable 00739B09 case 4
call	sub_738A90

locret_739B35:		; default
retn	4
sub_739B00 endp

off_739B38 dd offset loc_739B10	; jump table for switch	statement
dd offset loc_739B18
dd offset loc_739B20
dd offset loc_739B28
dd offset loc_739B30
align 10h



sub_739B50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jnz	short loc_739B6D
mov	eax, [esp+4+arg_0]
push	ecx
mov	ecx, [esp+8+arg_4]
push	eax
call	sub_6BED00
pop	esi
retn	8

loc_739B6D:
movzx	edx, word ptr [ecx]
mov	eax, [esi+10h]
push	ebp
mov	ebp, 0FEFFh
push	edi
mov	edi, ecx
cmp	dx, bp
jnz	short loc_739BA7
cdq
sub	eax, edx
add	ecx, 2
sar	eax, 1
mov	edi, ecx
dec	eax
xor	ecx, ecx
mov	dword ptr [esi+8], 1
test	eax, eax
jle	short loc_739BFF
lea	esp, [esp+0]

loc_739BA0:
inc	ecx
cmp	ecx, eax
jl	short loc_739BA0
jmp	short loc_739BFF

loc_739BA7:
mov	ebp, 0FFFEh
cmp	dx, bp
jnz	short loc_739BE3
cdq
sub	eax, edx
sar	eax, 1
add	ecx, 2
dec	eax
xor	edx, edx
mov	edi, ecx
mov	dword ptr [esi+8], 1
test	eax, eax
jle	short loc_739BFF
lea	esp, [esp+0]

loc_739BD0:
mov	bp, [ecx+edx*2]
rol	bp, 8
mov	[ecx+edx*2], bp
inc	edx
cmp	edx, eax
jl	short loc_739BD0
jmp	short loc_739BFF

loc_739BE3:
cmp	eax, 2
jle	short loc_739BFF
cmp	byte ptr [ecx],	0EFh
jnz	short loc_739BFF
cmp	byte ptr [ecx+1], 0BBh
jnz	short loc_739BFF
cmp	byte ptr [ecx+2], 0BFh
jnz	short loc_739BFF
add	edi, 3
sub	eax, 3

loc_739BFF:
mov	ecx, [esi+8]
push	eax
push	edi
mov	edi, [esp+14h+arg_4]
sub	ecx, 1
lea	ecx, [edi+34h]
jz	short loc_739C17
call	sub_732EB0
jmp	short loc_739C1C

loc_739C17:
call	sub_732F00

loc_739C1C:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+30h]
mov	byte ptr [esp+0Ch+arg_4], al
mov	eax, [esi+0Ch]
push	eax
call	edx
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [esp+0Ch+arg_0]
push	eax
push	ecx
mov	ecx, edi
mov	dword ptr [esi+0Ch], 0
call	sub_6BED00
pop	edi
pop	ebp
pop	esi
retn	8
sub_739B50 endp

align 10h



sub_739C50 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_739C60
align 10h

loc_739C60:
push	esi
mov	esi, ecx
lea	ecx, [esi+34h]
call	sub_7331A0
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_739C87
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_739C87:
mov	eax, esi
pop	esi
retn	4
sub_739C50 endp

align 10h



sub_739C90 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663BE0
mov	dword ptr [esi], offset	off_144093C
lea	edi, [esi+10h]
mov	dword ptr [edi], offset	off_14408E8
mov	dword ptr [esi+34h], 0
lea	ecx, [esi+3Ch]
mov	dword ptr [esi+38h], 2
call	sub_67AB70
mov	ecx, [ebp+78h]
lea	ebx, [ebp+78h]
push	21h
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
push	edi
push	ebx
call	sub_6C2A50
push	edi
push	edi
push	ebp
call	sub_6C2350
add	esp, 14h
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_739C90 endp

align 10h



sub_739D00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+8], 0
push	edi
jz	short loc_739D49
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 1Fh
jnz	short loc_739D49
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
test	al, al
jnz	short loc_739D49
mov	eax, [esi+8]
test	eax, eax
jz	short loc_739D45
lea	edi, [eax-10h]
test	edi, edi
jz	short loc_739D75
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax
jmp	short loc_739D75

loc_739D45:
xor	edi, edi
jmp	short loc_739D75

loc_739D49:
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	44h
call	edx
test	eax, eax
jz	short loc_739D71
mov	ecx, [esi+18h]
push	ecx
mov	ecx, eax
call	sub_739C90
jmp	short loc_739D73

loc_739D71:
xor	eax, eax

loc_739D73:
mov	edi, eax

loc_739D75:
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_739D8B
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64B3B0

loc_739D8B:
pop	edi
pop	esi
retn
sub_739D00 endp

align 10h



sub_739D90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	44h
call	eax
test	eax, eax
jz	short loc_739DB9
push	esi
mov	ecx, eax
call	sub_739C90
pop	esi
retn	4

loc_739DB9:
xor	eax, eax
pop	esi
retn	4
sub_739D90 endp

align 10h



sub_739DC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	dword ptr [esi], offset	off_144093C
lea	edi, [esi+10h]
mov	dword ptr [edi], offset	off_14408E8
xor	ebx, ebx
mov	[esi+34h], ebx
lea	ecx, [esi+3Ch]
mov	dword ptr [esi+38h], 2
call	sub_67AB70
mov	eax, [esp+10h+arg_4]
push	eax
push	ebp
mov	ecx, edi
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+44h]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_144083C
mov	dword ptr [edi], offset	off_1440960
mov	dword ptr [ecx], offset	off_1440838
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_739DC0 endp

align 10h



sub_739E50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_739DC0
lea	edx, [esp+8+arg_8]
push	edx
push	offset off_14407F0
push	edi
lea	ecx, [esi+44h]
push	esi
mov	dword ptr [esi], offset	off_144083C
mov	dword ptr [esi+10h], offset off_1440960
mov	dword ptr [ecx], offset	off_1440838
mov	byte ptr [esp+18h+arg_8], 1
call	sub_663110
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_739E50 endp

align 10h



sub_739EA0 proc	near
sub	ecx, 10h
jmp	sub_739EB0
sub_739EA0 endp

align 10h



sub_739EB0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+44h]
mov	dword ptr [esi], offset	off_144083C
mov	dword ptr [esi+10h], offset off_1440960
mov	dword ptr [ecx], offset	off_1440838
call	sub_665A40
lea	ecx, [esi+34h]
call	sub_7331A0
mov	ecx, esi
call	sub_664A30
test	[esp+4+arg_0], 1
jz	short loc_739EF2
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_739EF2:
mov	eax, esi
pop	esi
retn	4
sub_739EB0 endp

align 10h



sub_739F00 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 28h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+38h+arg_4]
mov	ecx, [edi+294h]
mov	[esp+38h+var_24], edi
mov	[esp+38h+var_20], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebp, ebp
push	ebp
push	38h
call	edx
mov	esi, eax
cmp	esi, ebp
jz	short loc_739F4C
push	offset sub_739D00
lea	eax, [esp+3Ch+var_24]
push	eax
mov	ecx, esi
call	sub_67C3D0
mov	dword ptr [esi], offset	off_14409B8
mov	dword ptr [esi+10h], offset off_1439710
jmp	short loc_739F4E

loc_739F4C:
xor	esi, esi

loc_739F4E:
mov	ebx, [esp+38h+arg_0]
mov	byte ptr [ebx+8], 0
mov	[ebx], esi
mov	[ebx+4], ebp
mov	ecx, [edi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	64h
call	eax
mov	esi, eax
cmp	esi, ebp
jz	loc_73A09F
push	ebx
push	1
mov	ecx, edi
call	sub_66FB00
push	eax
lea	ecx, [esp+40h+var_24]
push	ecx
mov	ecx, esi
call	sub_739E50
mov	[esp+38h+arg_0], eax
cmp	eax, ebp
jz	short loc_739FA1
mov	edx, [eax+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[eax+8], edx

loc_739FA1:
mov	[esp+38h+arg_4], eax
lea	eax, [esp+38h+arg_4]
push	eax
lea	ecx, [esp+3Ch+var_28]
push	ecx
lea	ecx, [edi+284h]
mov	[esp+40h+var_28], 21h
call	sub_661470
mov	ecx, [esp+38h+arg_4]
cmp	ecx, ebp
jz	short loc_739FCF
call	sub_64B3B0

loc_739FCF:
push	0Ah
mov	ecx, edi
call	sub_66FB00
add	eax, 3Ch
mov	[esp+38h+var_14], 0
mov	ecx, [eax+4]
mov	[esp+38h+var_1C], ecx
cmp	ecx, ebp
jz	short loc_739FFB
inc	dword ptr [ecx+8]
add	ecx, 8
and	dword ptr [ecx], 8FFFFFFFh
mov	ecx, [esp+38h+var_1C]

loc_739FFB:
mov	[esp+38h+var_18], ebp
mov	edx, [eax+8]
cmp	edx, ebp
jz	short loc_73A01D
mov	al, [eax+0Ch]
and	al, 1
movzx	ecx, al
push	ecx
push	edx
lea	ecx, [esp+40h+var_1C]
call	sub_67C1A0
mov	ecx, [esp+38h+var_1C]

loc_73A01D:
lea	ebp, [ecx+10h]
lea	edx, [esp+38h+arg_4]
mov	byte ptr [esp+38h+arg_4], 0
mov	esi, [ebp+0]
push	edx
push	ebx
lea	ecx, [esp+40h+var_10]
add	esi, 28h
call	sub_651E70
mov	edx, [esi]
push	eax
add	edi, 8Ch
push	edi
lea	eax, [esp+44h+var_24]
push	eax
mov	ecx, ebp
call	edx
lea	ecx, [esp+38h+var_10]
call	sub_652830
test	[esp+38h+var_14], 2
jnz	short loc_73A06A
mov	ecx, [esp+38h+var_1C]
test	ecx, ecx
jz	short loc_73A06A
call	sub_64B3B0

loc_73A06A:
xor	esi, esi
test	[esp+38h+var_14], 1
mov	[esp+38h+var_1C], esi
jnz	short loc_73A084
mov	ecx, [esp+38h+var_18]
cmp	ecx, esi
jz	short loc_73A084
call	sub_64B3B0

loc_73A084:
mov	ecx, [esp+38h+arg_0]
mov	[esp+38h+var_18], esi
cmp	ecx, esi
jz	short loc_73A095
call	sub_64B3B0

loc_73A095:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 28h
retn

loc_73A09F:
mov	[esp+38h+arg_0], ebp
mov	eax, ebp
jmp	loc_739FA1
sub_739F00 endp

align 10h



sub_73A0B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	eax, [esp+arg_0]
test	edx, edx
jbe	short locret_73A0E7
mov	ecx, [esp+arg_8]
push	esi

loc_73A0C1:
test	eax, eax
jz	short loc_73A0DB
mov	esi, [ecx]
mov	[eax], esi
mov	esi, [ecx+4]
mov	[eax+4], esi
mov	esi, [ecx+8]
mov	[eax+8], esi
mov	esi, [ecx+0Ch]
mov	[eax+0Ch], esi

loc_73A0DB:
add	ecx, 10h
add	eax, 10h
sub	edx, 1
jnz	short loc_73A0C1
pop	esi

locret_73A0E7:
retn
sub_73A0B0 endp

align 10h



sub_73A0F0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
fld	dword ptr [esi+10h]
mov	eax, [esi+8]
mov	ecx, [esi+4]
mov	edx, [esi]
sub	esp, 8
fstp	[esp+14h+var_10]
dec	eax
fld	dword ptr [esi+0Ch]
dec	ecx
fstp	[esp+14h+var_14]
push	eax		; int
push	ecx		; int
dec	edx
push	edx		; int
mov	ecx, ebp
call	sub_709710
mov	ebx, [esi+18h]
test	ebx, ebx
jbe	short loc_73A163
push	edi
xor	edi, edi
jmp	short loc_73A130
align 10h

loc_73A130:
mov	eax, [esi+14h]
fld	dword ptr [eax+edi+0Ch]
add	eax, edi
sub	esp, 10h
fstp	[esp+20h+var_14]
mov	ecx, ebp
fld	dword ptr [eax+8]
fstp	[esp+20h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+20h+var_1C]
fld	dword ptr [eax]
fstp	[esp+20h+var_20]
call	sub_709A80
add	edi, 10h
sub	ebx, 1
jnz	short loc_73A130
pop	edi

loc_73A163:
pop	esi
pop	ebp
pop	ebx
retn	4
sub_73A0F0 endp

align 10h



; int __stdcall	sub_73A170(int,	float, float, int)
sub_73A170 proc	near

var_24=	dword ptr -24h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [eax+68h]
mov	ebp, [ecx+10h]
push	edi
lea	edi, [ebp+8]
mov	ecx, edi
call	sub_709300
fld	[esp+20h+arg_4]
push	ecx		; float
mov	ecx, edi
fstp	[esp+24h+var_24]
call	sub_708D20
mov	dl, [esi+34h]
shr	dl, 3
and	dl, 1
mov	[ebp+4Ch], dl
test	byte ptr [esi+34h], 10h
jz	short loc_73A1CE
mov	eax, [esi+10h]
mov	edx, [eax+38h]
lea	ecx, [esi+10h]
call	edx
mov	ebx, [esp+20h+arg_0]
push	ecx		; float
lea	eax, [esi+14h]
fstp	[esp+24h+var_24]
push	eax		; int
mov	ecx, ebx
call	sub_747020
jmp	short loc_73A1D2

loc_73A1CE:
mov	ebx, [esp+20h+arg_0]

loc_73A1D2:
mov	ebp, [esp+20h+arg_C]
test	ebp, ebp
jz	short loc_73A20E
mov	ecx, ebp
call	sub_6A58E0
test	byte ptr [esi+34h], 10h
jz	short loc_73A20E
mov	edx, [esi+10h]
mov	eax, [edx+38h]
lea	ecx, [esi+10h]
call	eax
push	ecx		; float
fstp	[esp+24h+var_24]
lea	ecx, [esi+14h]
push	ecx
lea	edx, [esp+28h+var_10]
push	edx
mov	ecx, ebp
call	sub_6A65C0
push	eax		; int
mov	ecx, ebx
call	sub_747020

loc_73A20E:
mov	eax, [esi+0C8h]
test	eax, eax
jbe	short loc_73A261
xor	ebx, ebx
mov	[esp+20h+arg_4], eax
mov	edi, edi

loc_73A220:
mov	eax, [esi+0C4h]
cmp	byte ptr [ebx+eax+20h],	0
lea	ecx, [ebx+eax]
jz	short loc_73A24D
mov	ecx, [esp+20h+arg_8]
mov	edx, [esp+20h+arg_0]
push	ebp		; int
push	ecx		; float
push	edi		; int
push	edx		; int
lea	ecx, [esi+10h]
call	sub_70F1C0
mov	ecx, edi
call	sub_709300
jmp	short loc_73A253

loc_73A24D:
push	edi
call	sub_73A0F0

loc_73A253:
add	ebx, 24h
sub	[esp+20h+arg_4], 1
jnz	short loc_73A220
mov	ebx, [esp+20h+arg_0]

loc_73A261:
mov	eax, [esp+20h+arg_8]
push	ebp		; int
push	eax		; float
push	edi		; int
push	ebx		; int
lea	ecx, [esi+10h]
call	sub_70F1C0
mov	ecx, edi
call	sub_709300
test	ebp, ebp
jz	short loc_73A29A
cmp	dword ptr [ebp+164h], 0
jz	short loc_73A29A
mov	ecx, ebp
call	sub_6A62B0
add	ebp, 160h
push	ebp
mov	ecx, ebx
call	sub_7491A0

loc_73A29A:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h
sub_73A170 endp

align 10h



; int __stdcall	sub_73A2B0(int,	float)
sub_73A2B0 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	edi
mov	edi, ecx
mov	ecx, ebx
call	sub_709300
fld	[esp+0Ch+arg_4]
push	ecx		; float
mov	ecx, ebx
fstp	[esp+10h+var_10]
call	sub_708D20
mov	ebp, [edi+0C8h]
test	ebp, ebp
jbe	short loc_73A2F7
push	esi
xor	esi, esi
lea	esp, [esp+0]

loc_73A2E0:
mov	ecx, [edi+0C4h]
push	ebx
add	ecx, esi
call	sub_73A0F0
add	esi, 24h
sub	ebp, 1
jnz	short loc_73A2E0
pop	esi

loc_73A2F7:
pop	edi
pop	ebp
pop	ebx
retn	8
sub_73A2B0 endp

align 10h



sub_73A300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_73A330
mov	eax, [edi]
test	eax, eax
jz	short loc_73A325
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_73A325:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_73A330:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_73A361
mov	edx, [ecx]
push	ebx
mov	ebx, esi
shl	ebx, 4
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_73A361:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
shl	eax, 4
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_73A300 endp

align 10h


; Attributes: bp-based frame

sub_73A390 proc	near

var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_26E= word ptr -26Eh
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= byte ptr -19Ch
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= byte ptr -170h
var_154= dword ptr -154h
var_150= byte ptr -150h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= byte ptr -130h
var_D8=	byte ptr -0D8h
var_B8=	byte ptr -0B8h
var_60=	word ptr -60h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 27Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+27Ch+var_4], eax
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+1Ch]
push	ebx
fstp	[esp+280h+var_278]
mov	ebx, ecx
mov	[esp+280h+var_250], eax
push	esi
push	edi
mov	edi, [ebp+arg_0]
mov	ecx, [edi+48h]
mov	eax, [edi+68h]
mov	eax, [eax+14h]
mov	[esp+288h+var_218], eax
mov	eax, [ebx+8Ch]
add	eax, 4
mov	[esp+288h+var_25C], ecx
mov	ecx, [ebx+90h]
fld	dword ptr [ecx+4]
add	ecx, 4
fsub	dword ptr [eax]
mov	[esp+288h+var_258], edi
fld	[esp+288h+var_278]
fld	st
fmulp	st(2), st
fld	dword ptr [eax]
faddp	st(2), st
fxch	st(1)
fstp	[esp+288h+var_1F0]
fld	dword ptr [ecx+4]
fsub	dword ptr [eax+4]
fmul	st, st(1)
fadd	dword ptr [eax+4]
fstp	[esp+288h+var_1EC]
fld	dword ptr [ecx+8]
fsub	dword ptr [eax+8]
fmul	st, st(1)
fadd	dword ptr [eax+8]
fstp	[esp+288h+var_1E8]
fld	dword ptr [ecx+0Ch]
fsub	dword ptr [eax+0Ch]
fmul	st, st(1)
fadd	dword ptr [eax+0Ch]
lea	eax, [ebx+10h]
mov	[esp+288h+var_204], eax
fstp	[esp+288h+var_1E4]
fld	[esp+288h+var_1F0]
fstp	dword ptr [ebx+14h]
fld	[esp+288h+var_1EC]
fstp	dword ptr [ebx+18h]
fld	[esp+288h+var_1E8]
fstp	dword ptr [ebx+1Ch]
fld	[esp+288h+var_1E4]
fstp	dword ptr [ebx+20h]
or	byte ptr [eax+24h], 10h
mov	eax, [ebx+64h]
test	eax, eax
jbe	short loc_73A4AE
xor	esi, esi
mov	[esp+288h+var_274], eax
lea	ebx, [ebx+0]

loc_73A480:
mov	ecx, [ebx+60h]
mov	edx, [ebx+0A0h]
mov	eax, [ebx+94h]
add	ecx, esi
push	ecx
fstp	[esp+28Ch+var_28C]
add	edx, esi
add	eax, esi
push	edx
push	eax
call	sub_6FB6D0
fld	[esp+288h+var_278]
add	esi, 28h
sub	[esp+288h+var_274], 1
jnz	short loc_73A480

loc_73A4AE:
mov	ecx, [ebx+70h]
test	ecx, ecx
jbe	loc_73A615
xor	eax, eax
mov	[esp+288h+var_26C], eax
mov	[esp+288h+var_274], ecx
jmp	short loc_73A4D8
jmp	short loc_73A4D0
align 10h

loc_73A4D0:
fld	[esp+288h+var_278]
mov	eax, [esp+288h+var_26C]

loc_73A4D8:
mov	esi, [ebx+0ACh]
fnstcw	[esp+288h+var_26E]
mov	edi, [ebx+6Ch]
movzx	edx, word ptr [esi+eax+10h]
mov	ecx, [ebx+0B8h]
add	esi, eax
add	edi, eax
add	ecx, eax
mov	[edi+10h], dx
movzx	edx, word ptr [esi+4]
movzx	eax, word ptr [ecx+4]
movzx	eax, ax
mov	[esp+288h+var_27C], edx
sub	esp, 8
fild	[esp+290h+var_27C]
mov	[esp+290h+var_27C], eax
movzx	eax, [esp+290h+var_26E]
fstp	[esp+290h+var_260]
fild	[esp+290h+var_27C]
or	eax, 0C00h
fld	[esp+290h+var_260]
mov	[esp+290h+var_254], ecx
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+290h+var_27C]
fld	[esp+290h+var_27C]
mov	[esp+290h+var_27C], eax
fadd	ds:dbl_15FCC48
mov	eax, esp
fldcw	word ptr [esp+290h+var_27C]
fistp	[esp+290h+var_27C]
movzx	edx, word ptr [esp+290h+var_27C]
mov	[edi+4], dx
mov	ecx, [ecx+8]
mov	[eax], ecx
fldcw	[esp+290h+var_26E]
mov	edx, [esi+8]
fstp	[esp+290h+var_28C]
push	ecx		; int
mov	eax, esp
mov	[eax], edx
lea	eax, [esp+294h+var_230]
push	eax		; int
call	sub_740830
mov	ecx, [eax]
mov	[edi+8], ecx
mov	esi, [esi+0Ch]
test	esi, esi
jz	short loc_73A5FF
mov	edx, [esp+288h+var_254]
mov	ecx, [edi+0Ch]
mov	eax, [edx+0Ch]
mov	[esp+288h+var_260], eax
test	ecx, ecx
jz	short loc_73A5AB
fld	[esp+288h+var_278]
push	ecx
fstp	[esp+28Ch+var_28C]
push	eax
push	esi
call	sub_6FB6D0
jmp	short loc_73A5FF

loc_73A5AB:
mov	ecx, dword_1855FC0
lea	edx, [esp+288h+var_27C]
push	edx
mov	[esp+28Ch+var_27C], 102h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	28h
push	ebx
call	eax
test	eax, eax
jz	short loc_73A5D9
mov	ecx, eax
call	sub_6FA2A0
mov	[esp+288h+var_268], eax
jmp	short loc_73A5E1

loc_73A5D9:
mov	[esp+288h+var_268], 0

loc_73A5E1:
fld	[esp+288h+var_278]
push	ecx
mov	ecx, [esp+28Ch+var_260]
fstp	[esp+28Ch+var_28C]
push	ecx
mov	ecx, [esp+290h+var_268]
push	esi
call	sub_6FB6D0
mov	edx, [esp+288h+var_268]
mov	[edi+0Ch], edx

loc_73A5FF:
add	[esp+288h+var_26C], 18h
sub	[esp+288h+var_274], 1
jnz	loc_73A4D0
mov	edi, [esp+288h+var_258]
jmp	short loc_73A617

loc_73A615:
fstp	st

loc_73A617:
mov	eax, [edi+4]
fld	dword ptr [eax]
lea	ecx, [esp+288h+var_1E0]
fstp	[esp+288h+var_1E0]
fld	dword ptr [eax+4]
fstp	[esp+288h+var_1DC]
fld	dword ptr [eax+8]
fstp	[esp+288h+var_1D8]
fld	dword ptr [eax+0Ch]
fstp	[esp+288h+var_1D4]
fld	dword ptr [eax+10h]
fstp	[esp+288h+var_1D0]
fld	dword ptr [eax+14h]
mov	eax, [esp+288h+var_250]
add	eax, 44h
fstp	[esp+288h+var_1CC]
push	eax
call	sub_64EAF0
mov	esi, [edi]
mov	ecx, 8
lea	edi, [esp+288h+var_170]
rep movsd
mov	esi, [esp+288h+var_250]
lea	ecx, [esi+24h]
push	ecx
lea	ecx, [esp+28Ch+var_170]
call	sub_68CE70
mov	edx, [esp+288h+var_258]
lea	ecx, [esp+288h+var_1E0]
fld	dword ptr [edx+74h]
fstp	[esp+288h+var_27C]
call	sub_64ED20
fmul	[esp+288h+var_27C]
xor	edi, edi
test	byte ptr [esi+76h], 1
mov	[esp+288h+var_268], edi
fstp	[esp+288h+var_274]
fld	[esp+288h+var_274]
fld	st
fdivr	ds:dbl_15FCE20
fstp	[esp+288h+var_230]
jz	short loc_73A6EE
mov	eax, [esp+288h+var_258]
fstp	st
fld	dword ptr [eax+74h]
push	ecx		; float
fstp	[esp+28Ch+var_27C]
mov	ecx, esi
fld	[esp+28Ch+var_27C]
fstp	[esp+28Ch+var_28C]
call	sub_655850
fld	[esp+288h+var_274]
mov	[esp+288h+var_268], eax
mov	edi, eax

loc_73A6EE:
cmp	word ptr [esi+74h], 0
mov	eax, [esp+288h+var_25C]
setnbe	cl
test	byte ptr [eax+14h], 10h
jz	short loc_73A72C
mov	eax, [eax+1Ch]
test	eax, 100h
jz	short loc_73A72C
shr	eax, 9
test	al, 1
jnz	short loc_73A717
test	byte ptr [ebx+34h], 1
jnz	short loc_73A72C

loc_73A717:
test	cl, cl
jnz	short loc_73A72C
mov	ecx, [esp+288h+var_258]
cmp	dword ptr [ecx+94h], 0
jnz	short loc_73A72C
mov	cl, 1
jmp	short loc_73A72E

loc_73A72C:
xor	cl, cl

loc_73A72E:
fld	[esp+288h+var_154]
mov	byte ptr [esp+288h+var_26E], 1
fabs
fstp	[esp+288h+var_27C]
fld	[esp+288h+var_27C]
fcomp	ds:flt_15AA9FC
fnstsw	ax
test	ah, 1
jz	short loc_73A756
mov	byte ptr [esp+288h+var_26E], 0

loc_73A756:
xor	edx, edx
test	cl, cl
setnz	dl
test	edi, edi
jnz	loc_73A7EE
test	cl, cl
jz	short loc_73A78E
fmul	ds:dbl_143F6C0
fstp	[esp+288h+var_27C]
fld	[esp+288h+var_27C]
fmul	st, st
fstp	[esp+288h+var_27C]
mov	eax, [esp+288h+var_27C]
shr	eax, 17h
and	eax, 0FFh
sub	eax, 40h
jmp	short loc_73A7A3

loc_73A78E:
fstp	[esp+288h+var_27C]
mov	eax, [esp+288h+var_27C]
shr	eax, 17h
and	eax, 0FFh
sub	eax, 40h
shr	eax, 1

loc_73A7A3:
mov	ecx, [esp+288h+var_25C]
fld	dword ptr [ecx+10h]
mov	[esp+288h+var_25C], 6
fstp	[esp+288h+var_27C]
mov	ecx, [esp+288h+var_27C]
shr	ecx, 17h
and	ecx, 0FFh
sub	ecx, 40h
shr	ecx, 1
shl	ecx, 8
or	ecx, eax
add	ecx, ecx
or	ecx, edx
mov	edx, [esp+288h+var_278]
mov	[esp+288h+var_60], cx
mov	dword ptr [esp+288h+var_60+2], edx
mov	[esp+288h+var_274], 2
jmp	short loc_73A818

loc_73A7EE:		; char
push	edx
fstp	st
fld	[esp+28Ch+var_278]
push	ecx		; float
lea	eax, [esp+290h+var_60]
fstp	[esp+290h+var_290]
push	eax		; int
mov	ecx, edi
call	sub_709BA0
mov	[esp+288h+var_25C], 54h
mov	[esp+288h+var_274], 1

loc_73A818:
mov	ecx, [esp+288h+var_25C]
mov	eax, [esp+288h+var_274]
push	ecx
mov	ecx, [esp+28Ch+var_204]
lea	edx, [esp+28Ch+var_60]
push	edx
push	eax
push	esi
push	ecx
mov	ecx, [esp+29Ch+var_218]
call	sub_706040
mov	ecx, esi
mov	[esp+288h+var_27C], eax
call	sub_654DA0
mov	edx, [esp+288h+var_258]
mov	[esp+288h+var_1C0], edx
mov	edx, [ebx+64h]
xor	ecx, ecx
cmp	edx, ecx
jz	short loc_73A86A
mov	esi, [ebx+60h]
mov	[esp+288h+var_1BC], esi
jmp	short loc_73A871

loc_73A86A:
mov	[esp+288h+var_1BC], ecx

loc_73A871:
cmp	[ebx+70h], ecx
jz	short loc_73A879
mov	ecx, [ebx+6Ch]

loc_73A879:
fld	[esp+288h+var_1E0]
mov	[esp+288h+var_1B8], ecx
fstp	[esp+288h+var_1B4]
mov	ecx, 8
fld	[esp+288h+var_1DC]
lea	esi, [esp+288h+var_170]
fstp	[esp+288h+var_1B0]
lea	edi, [esp+288h+var_19C]
fld	[esp+288h+var_1D8]
fstp	[esp+288h+var_1AC]
fld	[esp+288h+var_1D4]
fstp	[esp+288h+var_1A8]
fld	[esp+288h+var_1D0]
fstp	[esp+288h+var_1A4]
fld	[esp+288h+var_1CC]
fstp	[esp+288h+var_1A0]
rep movsd
mov	ecx, [esp+288h+var_27C]
mov	[esp+288h+var_17C], eax
mov	eax, [ebx+70h]
xor	edi, edi
mov	[esp+288h+var_178], edx
mov	[esp+288h+var_174], eax
cmp	ecx, edi
jz	short loc_73A934
mov	esi, [esp+288h+var_268]
cmp	esi, edi
setnz	dl
movzx	eax, dl
push	eax
lea	edx, [esp+28Ch+var_1C0]
push	edx
call	sub_748E80
cmp	esi, edi
jz	loc_73AD4F
mov	ecx, esi
jmp	loc_73AD4A

loc_73A934:
fldz
mov	eax, [ebx+8Ch]
fst	[esp+288h+var_200]
push	eax
fst	[esp+28Ch+var_1FC]
lea	ecx, [esp+28Ch+var_150]
fst	[esp+28Ch+var_1F4]
mov	[esp+28Ch+var_264], edi
fstp	[esp+28Ch+var_208]
mov	[esp+28Ch+var_26C], edi
mov	[esp+28Ch+var_1F8], edi
mov	[esp+28Ch+var_254], edi
mov	[esp+28Ch+var_260], edi
call	sub_70CB20
mov	ecx, [ebx+90h]
push	ecx
lea	ecx, [esp+28Ch+var_D8]
call	sub_70CB20
fld	[esp+288h+var_278]
mov	[esp+288h+var_214], edi
mov	[esp+288h+var_210], edi
mov	[esp+288h+var_238], edi
mov	[esp+288h+var_234], edi
mov	[esp+288h+var_20C], edi

loc_73A9A7:
cmp	[esp+288h+var_130], 1
jnz	short loc_73A9BF
cmp	[esp+288h+var_B8], 1
jz	loc_73AC84

loc_73A9BF:
cmp	[esp+288h+var_264], edi
jnz	short loc_73AA3F
lea	edx, [esp+288h+var_150]
fstp	st
push	edx
lea	ecx, [esp+28Ch+var_1C8]
call	sub_70C400
mov	ecx, [esp+288h+var_1C4]
mov	eax, [esp+288h+var_1C8]
mov	[esp+288h+var_210], ecx
lea	ecx, [esp+288h+var_214]
mov	[esp+288h+var_214], eax
call	sub_70CFE0
lea	edx, [esp+288h+var_1FC]
mov	[esp+288h+var_264], eax
push	edx
lea	eax, [esp+28Ch+var_200]
push	eax
lea	ecx, [esp+290h+var_214]
call	sub_70ADE0
fld	[esp+288h+var_278]
mov	ecx, [esp+288h+var_13C]
mov	edx, [esp+288h+var_138]
mov	eax, [esp+288h+var_134]
mov	[esp+288h+var_1F8], ecx
mov	[esp+288h+var_254], edx
mov	[esp+288h+var_260], eax

loc_73AA3F:
cmp	[esp+288h+var_26C], edi
jnz	short loc_73AA9B
lea	ecx, [esp+288h+var_D8]
fstp	st
push	ecx
lea	ecx, [esp+28Ch+var_1F0]
call	sub_70C400
mov	edx, [esp+288h+var_1F0]
mov	eax, [esp+288h+var_1EC]
lea	ecx, [esp+288h+var_238]
mov	[esp+288h+var_238], edx
mov	[esp+288h+var_234], eax
call	sub_70CFE0
lea	ecx, [esp+288h+var_208]
push	ecx
lea	edx, [esp+28Ch+var_1F4]
push	edx
lea	ecx, [esp+290h+var_238]
mov	[esp+290h+var_26C], eax
call	sub_70ADE0
fld	[esp+288h+var_278]

loc_73AA9B:
mov	esi, [ebx+0C4h]
add	esi, [esp+288h+var_20C]
mov	eax, [esp+288h+var_1F8]
mov	ecx, [esp+288h+var_254]
mov	edx, [esp+288h+var_260]
mov	[esi], eax
mov	[esi+4], ecx
mov	[esi+8], edx
fld	[esp+288h+var_1F4]
fld	[esp+288h+var_200]
mov	eax, [esi+18h]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [esi+0Ch]
fld	[esp+288h+var_208]
fld	[esp+288h+var_1FC]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [esi+10h]
cmp	eax, edi
jbe	loc_73AC46
mov	[esp+288h+var_27C], eax

loc_73AB01:
mov	eax, [esp+288h+var_214]
mov	al, [eax+20h]
cmp	al, 1
jz	short loc_73AB50
test	al, al
jns	short loc_73AB50
push	1
fstp	st
lea	ecx, [esp+28Ch+var_24C]
push	ecx
lea	ecx, [esp+290h+var_214]
call	sub_70AE10
mov	edx, [esp+288h+var_238]
mov	al, [edx+20h]
cmp	al, 1
jz	short loc_73AB4A
test	al, al
jns	short loc_73AB4A
push	1
lea	eax, [esp+28Ch+var_22C]
push	eax
lea	ecx, [esp+290h+var_238]
call	sub_70AE10
fld	[esp+288h+var_278]
jmp	loc_73ABDE

loc_73AB4A:
fld	[esp+288h+var_278]
jmp	short loc_73ABB6

loc_73AB50:
mov	eax, [esp+288h+var_238]
mov	al, [eax+20h]
cmp	al, 1
jz	short loc_73AB9F
test	al, al
jns	short loc_73AB9F
push	1
fstp	st
lea	ecx, [esp+28Ch+var_22C]
push	ecx
lea	ecx, [esp+290h+var_238]
call	sub_70AE10
fld	[esp+288h+var_278]
mov	edx, [esp+288h+var_22C]
mov	eax, [esp+288h+var_228]
mov	ecx, [esp+288h+var_224]
mov	[esp+288h+var_24C], edx
mov	edx, [esp+288h+var_220]
mov	[esp+288h+var_248], eax
mov	eax, [esp+288h+var_21C]
mov	[esp+288h+var_244], ecx
mov	[esp+288h+var_240], edx
mov	[esp+288h+var_23C], eax
jmp	short loc_73ABDE

loc_73AB9F:
fldz
mov	byte ptr [esp+288h+var_23C], 0
fst	[esp+288h+var_240]
fst	[esp+288h+var_244]
fst	[esp+288h+var_248]
fstp	[esp+288h+var_24C]

loc_73ABB6:
mov	edx, [esp+288h+var_248]
mov	ecx, [esp+288h+var_24C]
mov	eax, [esp+288h+var_244]
mov	[esp+288h+var_228], edx
mov	edx, [esp+288h+var_23C]
mov	[esp+288h+var_22C], ecx
mov	ecx, [esp+288h+var_240]
mov	[esp+288h+var_21C], edx
mov	[esp+288h+var_220], ecx
mov	[esp+288h+var_224], eax

loc_73ABDE:
fld	[esp+288h+var_22C]
mov	eax, [esi+14h]
fld	[esp+288h+var_24C]
add	eax, edi
fld	st
add	edi, 10h
sub	[esp+288h+var_27C], 1
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [eax]
fld	[esp+288h+var_228]
fld	[esp+288h+var_248]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [eax+4]
fld	[esp+288h+var_224]
fld	[esp+288h+var_244]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [eax+8]
fld	[esp+288h+var_220]
fld	[esp+288h+var_240]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [eax+0Ch]
jnz	loc_73AB01
xor	edi, edi

loc_73AC46:
mov	eax, [esp+288h+var_264]
mov	ecx, [esp+288h+var_26C]
add	[esp+288h+var_20C], 24h
cmp	eax, ecx
jnz	short loc_73AC64
mov	[esp+288h+var_264], edi
mov	[esp+288h+var_26C], edi
jmp	loc_73A9A7

loc_73AC64:
jnb	short loc_73AC75
sub	ecx, eax
mov	[esp+288h+var_26C], ecx
mov	[esp+288h+var_264], edi
jmp	loc_73A9A7

loc_73AC75:
sub	eax, ecx
mov	[esp+288h+var_264], eax
mov	[esp+288h+var_26C], edi
jmp	loc_73A9A7

loc_73AC84:
mov	eax, [esp+288h+var_218]
fstp	st
mov	ecx, [eax+8]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	74h
call	eax
cmp	eax, edi
jz	short loc_73ACD8
mov	ecx, [esp+280h+var_248]
fld	[esp+280h+var_228]
movzx	ecx, word ptr [ecx+74h]
fld	ds:dbl_15FD530
cmp	cx, di
fmul	st, st(1)
setnbe	dl
movzx	ecx, dl
fstp	[esp+280h+var_228]
fld	[esp+280h+var_228]
push	1		; char
push	ecx		; char
sub	esp, 8
mov	ecx, eax
fstp	[esp+290h+var_28C]
fstp	[esp+290h+var_290]
call	sub_7496D0
mov	esi, eax
jmp	short loc_73ACDA

loc_73ACD8:
xor	esi, esi

loc_73ACDA:
mov	edi, [esp+280h+var_260]
fld	dword ptr [esi+8]
mov	ecx, [esp+280h+var_250]
mov	dl, byte ptr [esp+280h+var_268+2]
push	edi
push	ecx
push	ecx
mov	[esi+17h], dl
fstp	[esp+28Ch+var_28C]
mov	eax, [ebx]
mov	edx, [eax+58h]
push	esi
mov	ecx, ebx
call	edx
mov	eax, [esp+288h+var_250]
mov	ecx, [esp+288h+var_25C]
push	eax
mov	eax, [esp+28Ch+var_274]
push	ecx
lea	edx, [esp+290h+var_60]
push	edx
push	eax
mov	ecx, esi
call	sub_747170
test	edi, edi
setnz	cl
movzx	edx, cl
push	edx
lea	eax, [esp+28Ch+var_1C0]
push	eax
mov	ecx, esi
call	sub_748E80
mov	ecx, [esp+288h+var_204]
push	esi
push	ecx
mov	ecx, [esp+290h+var_218]
call	sub_706340
test	edi, edi
jz	short loc_73AD4F
mov	ecx, edi

loc_73AD4A:
call	sub_64A400

loc_73AD4F:
mov	ecx, [esp+288h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn	8
sub_73A390 endp

align 10h



sub_73AD70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
fld	ds:flt_15FD598
push	esi
mov	esi, [esp+14h+arg_0]
fst	dword ptr [esi]
mov	edx, ecx
fstp	dword ptr [esi+4]
mov	[esp+14h+var_4], edx
fld	ds:flt_143F77C
fst	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
mov	eax, [edx+0C8h]
test	eax, eax
jbe	loc_73B295
fld	ds:dbl_15FCD70
push	ebx
fldz
push	ebp
push	edi
xor	ecx, ecx
mov	[esp+20h+var_C], eax

loc_73ADB4:
mov	ebx, [edx+0C4h]
fld	dword ptr [ebx+ecx+0Ch]
add	ebx, ecx
fstp	[esp+20h+arg_0]
fld	dword ptr [ebx+10h]
fstp	[esp+20h+var_10]
fld	dword ptr [esi]
fstp	[esp+20h+var_8]
fld	[esp+20h+var_8]
fld	[esp+20h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73ADEA
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73ADF0

loc_73ADEA:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73ADF0:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73AE16
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73AE1C

loc_73AE16:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73AE1C:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_73AE3D
fstp	[esp+20h+arg_0]
jmp	short loc_73AE47

loc_73AE3D:
fstp	st
fxch	st(1)
fst	[esp+20h+arg_0]
fxch	st(1)

loc_73AE47:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73AE68
fstp	[esp+20h+arg_0]
jmp	short loc_73AE6E

loc_73AE68:
fstp	st
fst	[esp+20h+arg_0]

loc_73AE6E:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+0Ch]
mov	eax, [ebx+18h]
test	eax, eax
jbe	loc_73B27C
xor	edi, edi
mov	ebp, eax
jmp	short loc_73AE8E

loc_73AE86:
fld	[esp+20h+arg_0]
fld	[esp+20h+var_10]

loc_73AE8E:
mov	edx, [ebx+14h]
fld	dword ptr [edx+edi]
add	edx, edi
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	st
fmul	st, st(5)
fsub	st, st(3)
fsub	dword ptr [edx+8]
fstp	[esp+20h+arg_0]
fld	st(3)
fld	[esp+20h+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_73AEC8
fstp	st(1)
fstp	st
fld	ds:dbl_15FCD60
jmp	short loc_73AECE

loc_73AEC8:
fld	st(3)
fsubp	st(2), st
fdivp	st(1), st

loc_73AECE:
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	loc_73B04C
fld1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_73B04C
fstp	st(4)
fld	dword ptr [edx]
fstp	[esp+20h+arg_0]
fld	dword ptr [edx+4]
fstp	[esp+20h+var_8]
fld	[esp+20h+arg_0]
fld	st
fsub	st, st(3)
fmul	st, st(5)
fadd	st, st(3)
fstp	[esp+20h+var_10]
fld	[esp+20h+var_8]
fld	st
fsub	st, st(3)
fmul	st, st(6)
fadd	st, st(3)
fstp	[esp+20h+var_8]
fld	dword ptr [edx+8]
fsub	st, st(2)
fmul	st, st(6)
faddp	st(2), st
fxch	st(1)
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_10]
fld	st
fsubp	st(2), st
fld	st(6)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+20h+var_10]
fld	dword ptr [edx+0Ch]
fsub	st, st(1)
fmul	st, st(5)
faddp	st(1), st
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_8]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(5), st
faddp	st(4), st
fxch	st(3)
fstp	[esp+20h+var_8]
fld	dword ptr [esi]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73AF8A
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73AF90

loc_73AF8A:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73AF90:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73AFB6
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73AFBC

loc_73AFB6:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73AFBC:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_73AFDB
fstp	st(2)
jmp	short loc_73AFDD

loc_73AFDB:
fstp	st

loc_73AFDD:
fxch	st(1)
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B002
fstp	st(1)
jmp	short loc_73B004

loc_73B002:
fstp	st

loc_73B004:
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+0Ch]
fld	ds:dbl_15FCD70
fxch	st(3)

loc_73B017:
fld	dword ptr [edx+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	st
fmul	st, st(5)
fsub	st, st(2)
fsub	dword ptr [edx+0Ch]
fstp	[esp+20h+arg_0]
fld	st(3)
fld	[esp+20h+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_73B050
fstp	st(1)
fstp	st
fld	ds:dbl_15FCD60
jmp	short loc_73B056

loc_73B04C:
fstp	st
jmp	short loc_73B017

loc_73B050:
fld	st(2)
fsubp	st(2), st
fdivp	st(1), st

loc_73B056:
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(3)
fnstsw	ax
test	ah, 41h
jnz	loc_73B1A4
fld1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_73B1A4
fld	dword ptr [edx]
fstp	[esp+20h+arg_0]
fld	dword ptr [edx+4]
fstp	[esp+20h+var_8]
fld	[esp+20h+arg_0]
fld	st
fsub	st, st(4)
fmul	st, st(2)
faddp	st(4), st
fxch	st(3)
fstp	[esp+20h+var_10]
fld	[esp+20h+var_8]
fld	st
fsub	st, st(3)
fmul	st, st(2)
faddp	st(3), st
fxch	st(2)
fstp	[esp+20h+var_8]
fld	dword ptr [edx+8]
fsub	st, st(3)
fmul	st, st(1)
faddp	st(3), st
fxch	st(2)
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_10]
fld	st
fsubp	st(2), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+20h+var_10]
fld	dword ptr [edx+0Ch]
fsub	st, st(1)
fmul	st, st(2)
faddp	st(1), st
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_8]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+20h+var_8]
fld	dword ptr [esi]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B112
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73B118

loc_73B112:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73B118:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B13E
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73B144

loc_73B13E:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73B144:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B163
fstp	st(2)
jmp	short loc_73B165

loc_73B163:
fstp	st

loc_73B165:
fxch	st(1)
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B195
fstp	st(1)
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+0Ch]
jmp	short loc_73B1AA

loc_73B195:
fstp	st
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+0Ch]
jmp	short loc_73B1AA

loc_73B1A4:
fstp	st
fstp	st
fstp	st

loc_73B1AA:
fld	dword ptr [edx+8]
fstp	[esp+20h+var_8]
fld	dword ptr [edx+0Ch]
fstp	[esp+20h+var_10]
fld	dword ptr [esi]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B1D7
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73B1DD

loc_73B1D7:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73B1DD:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi]
fld	dword ptr [esi+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	[esp+20h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B203
fxch	st(1)
fstp	[esp+20h+arg_0]
jmp	short loc_73B209

loc_73B203:
fstp	st(1)
fst	[esp+20h+arg_0]

loc_73B209:
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+4]
fld	dword ptr [esi+8]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B228
fstp	st(2)
jmp	short loc_73B22A

loc_73B228:
fstp	st

loc_73B22A:
fxch	st(1)
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_73B24F
fstp	st(1)
jmp	short loc_73B251

loc_73B24F:
fstp	st

loc_73B251:
fstp	[esp+20h+arg_0]
add	edi, 10h
sub	ebp, 1
fld	[esp+20h+arg_0]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [edx+8]
fstp	[esp+20h+arg_0]
fld	dword ptr [edx+0Ch]
fstp	[esp+20h+var_10]
jnz	loc_73AE86
mov	edx, [esp+20h+var_4]
jmp	short loc_73B280

loc_73B27C:
fstp	st
fstp	st

loc_73B280:
add	ecx, 24h
sub	[esp+20h+var_C], 1
jnz	loc_73ADB4
pop	edi
fstp	st
pop	ebp
fstp	st
pop	ebx

loc_73B295:
pop	esi
add	esp, 10h
retn	4
sub_73AD70 endp

align 10h



sub_73B2A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
mov	eax, [esi+324h]
push	edi
test	eax, eax
jnz	short loc_73B2B8
add	esi, 28h
jmp	short loc_73B2BA

loc_73B2B8:
mov	esi, eax

loc_73B2BA:
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_73B2D0
mov	ecx, esi
call	sub_6A9C60

loc_73B2D0:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
mov	edi, [esp+14h+arg_8]
mov	ebx, [esp+14h+arg_C]
inc	eax
mov	[esi+2Ch], eax
mov	[edi], cl
mov	[ebx], cl
movzx	edx, byte ptr [edi]
push	edx
push	offset aMorphFillStyle ; "morph	fill style type	= 0x%X\n"
push	esi
call	nullsub_2
mov	al, [edi]
add	esp, 0Ch
test	al, al
jnz	short loc_73B348
lea	eax, [esp+14h+arg_0]
push	eax
mov	ecx, esi
call	sub_6AAD20
lea	ecx, [esp+14h+arg_4]
push	ecx
mov	ecx, esi
call	sub_6AAD20
mov	edx, [esp+14h+arg_0]
mov	eax, [esp+14h+arg_4]
push	offset aMorphFillSty_0 ; "morph	fill style begin color:	"
mov	[edi+4], edx
push	esi
mov	[ebx+4], eax
call	nullsub_2
push	offset aMorphFillSty_1 ; "morph	fill style end color: "
push	esi
call	nullsub_2
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h

loc_73B348:
test	al, 10h
jz	loc_73B568
lea	ecx, [edi+10h]
push	ecx
mov	ecx, esi
call	sub_6AA8A0
lea	edx, [ebx+10h]
push	edx
mov	ecx, esi
call	sub_6AA8A0
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 1
jge	short loc_73B37C
mov	ecx, esi
call	sub_6A9C60

loc_73B37C:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	cl, [eax+ecx]
inc	eax
cmp	[esp+14h+arg_4], 54h
mov	byte ptr [esp+14h+arg_8], cl
mov	[esi+2Ch], eax
mov	byte ptr [esp+14h+var_4], 0
jz	short loc_73B39E
cmp	byte ptr [edi],	13h
jnz	short loc_73B3AF

loc_73B39E:
test	cl, 10h
jz	short loc_73B3A8
mov	byte ptr [esp+14h+var_4], 1

loc_73B3A8:
and	cl, 0Fh
mov	byte ptr [esp+14h+arg_8], cl

loc_73B3AF:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	14h
call	eax
mov	ebp, [esp+14h+var_4]
test	eax, eax
jz	short loc_73B3E0
movzx	cx, byte ptr [esp+14h+arg_8]
movzx	edx, cx
movzx	ecx, byte ptr [edi]
push	ebp
push	edx
push	ecx
mov	ecx, eax
call	sub_6FAED0
jmp	short loc_73B3E2

loc_73B3E0:
xor	eax, eax

loc_73B3E2:
mov	[edi+4], eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	14h
call	eax
test	eax, eax
jz	short loc_73B412
movzx	cx, byte ptr [esp+14h+arg_8]
movzx	edx, cx
movzx	ecx, byte ptr [ebx]
push	ebp
push	edx
push	ecx
mov	ecx, eax
call	sub_6FAED0
jmp	short loc_73B414

loc_73B412:
xor	eax, eax

loc_73B414:
mov	[ebx+4], eax
cmp	dword ptr [edi+4], 0
jz	loc_73B55A
test	eax, eax
jz	loc_73B55A
movzx	eax, byte ptr [esp+14h+arg_8]
xor	ebp, ebp
mov	[esp+14h+arg_8], eax
test	eax, eax
jbe	short loc_73B488
jmp	short loc_73B440
align 10h

loc_73B440:
mov	edx, [esp+14h+arg_4]
mov	ecx, [edi+4]
mov	eax, [esp+14h+arg_0]
mov	ecx, [ecx+0Ch]
push	edx
lea	ebx, ds:0[ebp*8]
push	eax
add	ecx, ebx
call	sub_6F9740
mov	edx, [esp+14h+arg_4]
mov	ecx, [esp+14h+arg_C]
mov	eax, [esp+14h+arg_0]
push	edx
mov	edx, [ecx+4]
mov	ecx, [edx+0Ch]
push	eax
add	ecx, ebx
call	sub_6F9740
inc	ebp
cmp	ebp, [esp+14h+arg_8]
jb	short loc_73B440
mov	eax, [esp+14h+arg_8]
mov	ebx, [esp+14h+arg_C]

loc_73B488:
push	eax
push	offset aMorphFsrNumgra ; "morph	fsr: numGradients = %d\n"
push	esi
call	nullsub_2
add	esp, 0Ch
cmp	byte ptr [edi],	13h
jnz	loc_73B5EB
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_73B4B8
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73B4B8:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+14h+arg_0], edx
add	eax, 2
fild	[esp+14h+arg_0]
mov	[esi+2Ch], eax
mov	eax, [edi+4]
fmul	ds:dbl_15FD8A0
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fstp	dword ptr [eax+10h]
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_73B511
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73B511:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movsx	edx, cx
mov	[esp+14h+arg_0], edx
add	eax, 2
fild	[esp+14h+arg_0]
mov	[esi+2Ch], eax
mov	eax, [ebx+4]
fmul	ds:dbl_15FD8A0
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
fstp	dword ptr [eax+10h]
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h

loc_73B55A:
mov	byte ptr [edi],	0
mov	byte ptr [ebx],	0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h

loc_73B568:
test	al, 40h
jz	short loc_73B5EB
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_73B584
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73B584:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	ebp, cx
push	ebp
add	eax, 2
push	offset aMorphFsrBitmap ; "morph	fsr BitmapChar = %d\n"
push	esi
mov	[esi+2Ch], eax
call	nullsub_2
mov	edx, [esp+20h+arg_0]
add	esp, 8
mov	eax, esp
mov	[eax], ebp
mov	ecx, [edx+20h]
lea	ebp, [edi+8]
push	ebp
call	sub_6AF4A0
push	ebp
lea	ecx, [ebx+8]
call	sub_6EFC40
add	edi, 10h
push	edi
mov	ecx, esi
call	sub_6AA8A0
add	ebx, 10h
push	ebx
mov	ecx, esi
call	sub_6AA8A0

loc_73B5EB:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_73B2A0 endp

align 10h



sub_73B600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_73B62D
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_73B644
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, esi
call	sub_73A300
mov	[esi+4], edi
pop	edi
pop	esi
retn	8

loc_73B62D:
cmp	edi, [esi+8]
jb	short loc_73B644
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_73A300

loc_73B644:
mov	[esi+4], edi
pop	edi
pop	esi
retn	8
sub_73B600 endp

align 10h



sub_73B650 proc	near
fld1
mov	eax, ecx
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1440AA4
fst	dword ptr [eax+8]
fld	ds:flt_143F788
xor	ecx, ecx
fstp	dword ptr [eax+0Ch]
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
fst	dword ptr [eax+3Ch]
fstp	dword ptr [eax+40h]
mov	[eax+30h], ecx
fldz
mov	dword ptr [eax+34h], 7FFFFFFFh
fst	dword ptr [eax+44h]
mov	dword ptr [eax+38h], 80000001h
fstp	dword ptr [eax+48h]
mov	[eax+4Ch], cl
retn
sub_73B650 endp




sub_73B6B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+20h]
call	sub_74CD90
lea	ecx, [esi+10h]
call	sub_74CD90
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_73B6DF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_73B6DF:
mov	eax, esi
pop	esi
retn	4
sub_73B6B0 endp

align 10h



; int __stdcall	sub_73B6F0(int,	float, float)
sub_73B6F0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+38h+arg_8]
xor	ebx, ebx
xor	esi, esi
mov	[esp+38h+var_2C], esi
cmp	ecx, ebx
jz	short loc_73B730
test	byte ptr [ecx+76h], 1
jz	short loc_73B730
fld1
push	ecx		; float
fstp	[esp+3Ch+var_3C]
call	sub_655850
mov	[esp+38h+var_2C], eax
cmp	eax, ebx
jz	short loc_73B72E
mov	ecx, eax
call	sub_6A58E0
mov	esi, [esp+38h+var_2C]
jmp	short loc_73B730

loc_73B72E:
mov	esi, eax

loc_73B730:
test	byte ptr [edi+34h], 10h
fld	dword ptr [edi+14h]
fstp	[esp+38h+var_20]
fld	dword ptr [edi+18h]
fstp	[esp+38h+var_1C]
fld	dword ptr [edi+1Ch]
fstp	[esp+38h+var_18]
fld	dword ptr [edi+20h]
fstp	[esp+38h+var_14]
jnz	short loc_73B762
mov	eax, [edi+10h]
mov	eax, [eax+14h]
lea	ecx, [edi+10h]
lea	edx, [esp+38h+var_20]
push	edx
call	eax

loc_73B762:
cmp	esi, ebx
jz	short loc_73B7AA
lea	ecx, [esp+38h+var_20]
push	ecx
lea	edx, [esp+3Ch+var_10]
push	edx
mov	ecx, esi
call	sub_6A65C0
fld	dword ptr [eax+4]
fstp	[esp+38h+arg_8]
fld	dword ptr [eax+8]
fstp	[esp+38h+var_28]
fld	dword ptr [eax+0Ch]
fstp	[esp+38h+var_24]
fld	dword ptr [eax]
fstp	[esp+38h+var_20]
fld	[esp+38h+arg_8]
fstp	[esp+38h+var_1C]
fld	[esp+38h+var_28]
fstp	[esp+38h+var_18]
fld	[esp+38h+var_24]
fstp	[esp+38h+var_14]

loc_73B7AA:
mov	ecx, [esp+38h+arg_0]
fld	dword ptr [ecx]
fld	[esp+38h+var_18]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_73B7EC
fld	dword ptr [ecx]
fld	[esp+38h+var_20]
fcompp
fnstsw	ax
test	ah, 41h
jp	short loc_73B7EC
fld	dword ptr [ecx+4]
fld	[esp+38h+var_14]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_73B7EC
fld	dword ptr [ecx+4]
fld	[esp+38h+var_1C]
fcompp
fnstsw	ax
test	ah, 41h
jnp	short loc_73B802

loc_73B7EC:
cmp	esi, ebx
jz	short loc_73B7F7
mov	ecx, esi
call	sub_64A400

loc_73B7F7:
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 2Ch
retn	0Ch

loc_73B802:
cmp	byte ptr [esp+38h+arg_4], bl
jnz	short loc_73B81E
cmp	esi, ebx
jz	short loc_73B813
mov	ecx, esi
call	sub_64A400

loc_73B813:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 2Ch
retn	0Ch

loc_73B81E:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
push	ebx
push	50h
call	edx
cmp	eax, ebx
jz	short loc_73B842
mov	ecx, eax
call	sub_73B650
mov	ebp, eax
mov	[esp+3Ch+arg_4], ebp
jmp	short loc_73B848

loc_73B842:
mov	[esp+3Ch+arg_4], ebx
mov	ebp, ebx

loc_73B848:
fld	ds:dword_1577A6C
push	ecx		; float
lea	esi, [ebp+8]
fstp	[esp+40h+var_40]
mov	ecx, esi
call	sub_708D20
cmp	[edi+0C8h], ebx
jbe	short loc_73B8D1
xor	ebp, ebp
jmp	short loc_73B870
align 10h

loc_73B870:
mov	eax, [edi+0C4h]
cmp	byte ptr [eax+ebp+20h],	0
lea	ecx, [eax+ebp]
jz	short loc_73B8BB
mov	eax, [esp+3Ch+var_2C]
test	eax, eax
jz	short loc_73B892
push	eax
push	esi
call	sub_70B5D0
add	esp, 8

loc_73B892:
mov	eax, [esp+3Ch+arg_0]
fld	dword ptr [eax+4]
push	0		; char
sub	esp, 8
fstp	[esp+48h+var_44]
mov	ecx, esi
fld	dword ptr [eax]
fstp	[esp+48h+var_48]
call	sub_709440
test	al, al
jnz	short loc_73B923
mov	ecx, esi
call	sub_709300
jmp	short loc_73B8C1

loc_73B8BB:
push	esi
call	sub_73A0F0

loc_73B8C1:
inc	ebx
add	ebp, 24h
cmp	ebx, [edi+0C8h]
jb	short loc_73B870
mov	ebp, [esp+3Ch+arg_4]

loc_73B8D1:
mov	edi, [esp+3Ch+var_2C]
test	edi, edi
jz	short loc_73B8E3
push	edi
push	esi
call	sub_70B5D0
add	esp, 8

loc_73B8E3:
mov	eax, [esp+3Ch+arg_0]
fld	dword ptr [eax+4]
push	0		; char
sub	esp, 8
fstp	[esp+48h+var_44]
mov	ecx, esi
fld	dword ptr [eax]
fstp	[esp+48h+var_48]
call	sub_709440
mov	bl, al
test	ebp, ebp
jz	short loc_73B90C
mov	ecx, ebp
call	sub_64A400

loc_73B90C:
test	edi, edi
jz	short loc_73B917
mov	ecx, edi
call	sub_64A400

loc_73B917:
pop	ebp
pop	edi
pop	esi
mov	al, bl
pop	ebx
add	esp, 2Ch
retn	0Ch

loc_73B923:
mov	ecx, [esp+3Ch+arg_4]
test	ecx, ecx
jz	short loc_73B930
call	sub_64A400

loc_73B930:
mov	ecx, [esp+3Ch+var_2C]
test	ecx, ecx
jz	short loc_73B93D
call	sub_64A400

loc_73B93D:
pop	ebp
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 2Ch
retn	0Ch
sub_73B6F0 endp

align 10h



sub_73B950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	edi
mov	edi, [esp+4+arg_4]
lea	eax, [edi+edi*8]
lea	eax, [ecx+eax*4-24h]
test	edi, edi
jbe	short loc_73B989
push	esi
lea	esi, [eax+14h]
jmp	short loc_73B970
align 10h

loc_73B970:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
sub	esi, 24h
sub	edi, 1
jnz	short loc_73B970
pop	esi

loc_73B989:
pop	edi
retn
sub_73B950 endp

align 10h



sub_73B990 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+10h+arg_0]
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx
mov	edx, [edi+8]
mov	[esi+8], edx
fld	dword ptr [edi+0Ch]
fstp	dword ptr [esi+0Ch]
xor	ecx, ecx
fld	dword ptr [edi+10h]
lea	ebx, [esi+14h]
fstp	dword ptr [esi+10h]
mov	[ebx], ecx
mov	[ebx+4], ecx
mov	[ebx+8], ecx
mov	eax, [edi+18h]
mov	edx, [edi+14h]
mov	[esp+10h+var_4], eax
mov	[esp+10h+arg_0], edx
cmp	eax, ecx
jz	short loc_73B9FD
push	ebp
mov	ebp, [ebx+4]
add	eax, ebp
push	eax
push	ebx
mov	ecx, ebx
call	sub_73B600
mov	ecx, [esp+14h+arg_0]
mov	edx, [esp+14h+var_4]
push	ecx
shl	ebp, 4
add	ebp, [ebx]
push	edx
push	ebp
call	sub_73A0B0
add	esp, 0Ch
pop	ebp

loc_73B9FD:
mov	al, [edi+20h]
mov	[esi+20h], al
pop	edi
mov	eax, esi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_73B990 endp

align 10h



sub_73BA10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_73BA40
mov	eax, [edi]
test	eax, eax
jz	short loc_73BA35
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_73BA35:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_73BA40:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_73BA73
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*8]
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_73BA73:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*8]
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_73BA10 endp

align 10h



sub_73BAA0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+90h]
push	edi
mov	dword ptr [esi], offset	off_1440AA8
call	sub_70E500
mov	ecx, [esi+8Ch]
call	sub_70E500
mov	eax, [esi+0C8h]
mov	ecx, [esi+0C4h]
push	eax
push	ecx
call	sub_73B950
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0C4h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
lea	ecx, [esi+0B8h]
call	sub_70C7F0
lea	ecx, [esi+0ACh]
call	sub_70C7F0
mov	eax, [esi+0A4h]
mov	edx, [esi+0A0h]
lea	ecx, [eax+eax*4]
lea	edi, [edx+ecx*8-28h]
test	eax, eax
jbe	short loc_73BB2F
mov	ebx, eax
lea	ebx, [ebx+0]

loc_73BB20:
mov	ecx, edi
call	sub_6FA020
sub	edi, 28h
sub	ebx, 1
jnz	short loc_73BB20

loc_73BB2F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0A0h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [esi+98h]
mov	edx, [esi+94h]
lea	ecx, [eax+eax*4]
lea	edi, [edx+ecx*8-28h]
test	eax, eax
jbe	short loc_73BB6F
mov	ebx, eax
lea	esp, [esp+0]

loc_73BB60:
mov	ecx, edi
call	sub_6FA020
sub	edi, 28h
sub	ebx, 1
jnz	short loc_73BB60

loc_73BB6F:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+94h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+10h]
call	sub_711380
pop	edi
mov	dword ptr [esi], offset	off_1436C18
pop	esi
pop	ebx
retn
sub_73BAA0 endp

align 10h



sub_73BBA0 proc	near

arg_0= dword ptr  4

fldz
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
mov	esi, [esp+4+arg_0]
fst	dword ptr [esi]
push	esi
fst	dword ptr [esi+4]
fst	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
call	edx
mov	eax, esi
pop	esi
retn	4
sub_73BBA0 endp




sub_73BBC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1436C18
xor	edi, edi
mov	dword ptr [esi+4], 1
mov	[esi+8], edi
mov	dword ptr [esi+0Ch], 40000h
push	1FF8h
lea	ecx, [esi+10h]
mov	dword ptr [esi], offset	off_1437E80
call	sub_713080
mov	dword ptr [esi], offset	off_1440AA8
mov	[esi+94h], edi
mov	[esi+98h], edi
mov	[esi+9Ch], edi
mov	[esi+0A0h], edi
mov	[esi+0A4h], edi
mov	[esi+0A8h], edi
mov	[esi+0ACh], edi
mov	[esi+0B0h], edi
mov	[esi+0B4h], edi
mov	[esi+0B8h], edi
mov	[esi+0BCh], edi
mov	[esi+0C0h], edi
mov	[esi+0C4h], edi
mov	[esi+0C8h], edi
mov	[esi+0CCh], edi
mov	ecx, dword_1855FC0
lea	edx, [esp+14h+var_8]
push	edx
mov	[esp+18h+var_8], 102h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	2Ch
push	esi
call	eax
mov	ebx, eax
cmp	ebx, edi
jz	short loc_73BC89
mov	ecx, ebx
call	sub_710C60
mov	dword ptr [ebx], offset	off_143F8D8
mov	[ebx+28h], edi
jmp	short loc_73BC8B

loc_73BC89:
xor	ebx, ebx

loc_73BC8B:
mov	[esi+8Ch], ebx
mov	ecx, dword_1855FC0
lea	eax, [esp+14h+var_4]
push	eax
mov	[esp+18h+var_4], 102h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	2Ch
push	esi
call	edx
mov	ebx, eax
cmp	ebx, edi
jz	short loc_73BCD3
mov	ecx, ebx
call	sub_710C60
mov	[ebx+28h], edi
mov	dword ptr [ebx], offset	off_143F8D8
pop	edi
mov	[esi+90h], ebx
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_73BCD3:
mov	[esi+90h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn
sub_73BBC0 endp

align 10h



sub_73BCF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_73BAA0
test	[esp+4+arg_0], 1
jz	short loc_73BD0D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_73BD0D:
mov	eax, esi
pop	esi
retn	4
sub_73BCF0 endp

align 10h



sub_73BD20 proc	near

var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= byte ptr -120h
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_110= byte ptr -110h
var_10C= dword ptr -10Ch
var_E8=	byte ptr -0E8h
var_C8=	byte ptr -0C8h
var_74=	byte ptr -74h
var_54=	byte ptr -54h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+198h+arg_0]
mov	eax, [esi+324h]
mov	ebx, ecx
push	edi
mov	[esp+19Ch+var_188], ebx
test	eax, eax
jnz	short loc_73BD46
add	esi, 28h
jmp	short loc_73BD48

loc_73BD46:
mov	esi, eax

loc_73BD48:
fldz
lea	eax, [esp+19Ch+var_168]
fst	[esp+19Ch+var_168]
push	eax
fst	[esp+1A0h+var_164]
mov	ecx, esi
fst	[esp+1A0h+var_160]
fst	[esp+1A0h+var_15C]
fst	[esp+1A0h+var_178]
fst	[esp+1A0h+var_174]
fst	[esp+1A0h+var_170]
fst	[esp+1A0h+var_16C]
fst	[esp+1A0h+var_158]
fst	[esp+1A0h+var_154]
fst	[esp+1A0h+var_150]
fst	[esp+1A0h+var_14C]
fst	[esp+1A0h+var_148]
fst	[esp+1A0h+var_144]
fst	[esp+1A0h+var_140]
fstp	[esp+1A0h+var_13C]
call	sub_6AABD0
lea	ecx, [esp+19Ch+var_178]
push	ecx
mov	ecx, esi
call	sub_6AABD0
mov	edx, [esp+19Ch+arg_4]
cmp	dword ptr [edx], 54h
jnz	short loc_73BDE1
lea	eax, [esp+19Ch+var_158]
push	eax
mov	ecx, esi
call	sub_6AABD0
lea	ecx, [esp+19Ch+var_148]
push	ecx
mov	ecx, esi
call	sub_6AABD0
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 1
jge	short loc_73BDDC
mov	ecx, esi
call	sub_6A9C60

loc_73BDDC:
inc	dword ptr [esi+2Ch]
jmp	short loc_73BE21

loc_73BDE1:
fld	[esp+19Ch+var_168]
fstp	[esp+19Ch+var_158]
fld	[esp+19Ch+var_164]
fstp	[esp+19Ch+var_154]
fld	[esp+19Ch+var_160]
fstp	[esp+19Ch+var_150]
fld	[esp+19Ch+var_15C]
fstp	[esp+19Ch+var_14C]
fld	[esp+19Ch+var_178]
fstp	[esp+19Ch+var_148]
fld	[esp+19Ch+var_174]
fstp	[esp+19Ch+var_144]
fld	[esp+19Ch+var_170]
fstp	[esp+19Ch+var_140]
fld	[esp+19Ch+var_16C]
fstp	[esp+19Ch+var_13C]

loc_73BE21:
fld	[esp+19Ch+var_164]
mov	eax, [ebx+8Ch]
fstp	[esp+19Ch+var_18C]
add	eax, 4
fld	[esp+19Ch+var_160]
lea	edx, [esp+19Ch+var_158]
fstp	[esp+19Ch+var_184]
push	edx
fld	[esp+1A0h+var_15C]
fstp	[esp+1A0h+var_180]
fld	[esp+1A0h+var_168]
fstp	dword ptr [eax]
fld	[esp+1A0h+var_18C]
fstp	dword ptr [eax+4]
fld	[esp+1A0h+var_184]
fstp	dword ptr [eax+8]
fld	[esp+1A0h+var_180]
fstp	dword ptr [eax+0Ch]
mov	eax, [ebx+90h]
fld	[esp+1A0h+var_174]
add	eax, 4
fstp	[esp+1A0h+var_180]
fld	[esp+1A0h+var_170]
fstp	[esp+1A0h+var_18C]
fld	[esp+1A0h+var_16C]
fstp	[esp+1A0h+var_184]
fld	[esp+1A0h+var_178]
fstp	dword ptr [eax]
fld	[esp+1A0h+var_180]
fstp	dword ptr [eax+4]
fld	[esp+1A0h+var_18C]
fstp	dword ptr [eax+8]
fld	[esp+1A0h+var_184]
fstp	dword ptr [eax+0Ch]
mov	ecx, [ebx+8Ch]
mov	eax, [ecx]
mov	eax, [eax+8]
call	eax
mov	ecx, [ebx+90h]
mov	edx, [ecx]
mov	edx, [edx+8]
lea	eax, [esp+19Ch+var_148]
push	eax
call	edx
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 4
jge	short loc_73BED5
push	4
mov	ecx, esi
call	sub_6A9B70

loc_73BED5:
mov	edx, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	edi, byte ptr [ecx+edx+2]
lea	eax, [ecx+edx]
movzx	ecx, byte ptr [eax+3]
shl	ecx, 8
or	ecx, edi
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax]
shl	ecx, 8
or	ecx, edi
shl	ecx, 8
or	ecx, eax
mov	eax, [esi+30h]
mov	[esp+19Ch+var_184], ecx
lea	ecx, [edx+4]
mov	edx, ecx
sub	edx, eax
add	edx, [esi+34h]
sub	eax, ecx
cmp	eax, 1
mov	[esi+2Ch], ecx
mov	[esp+19Ch+var_17C], edx
mov	byte ptr [esi+15h], 0
jge	short loc_73BF27
mov	ecx, esi
call	sub_6A9C60

loc_73BF27:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
mov	dl, [eax+ecx]
lea	ecx, [eax+1]
movzx	eax, dl
mov	[esi+2Ch], ecx
cmp	eax, 0FFh
jnz	short loc_73BF7C
mov	edx, [esi+30h]
sub	edx, ecx
cmp	edx, 2
mov	byte ptr [esi+15h], 0
jge	short loc_73BF57
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73BF57:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, cx

loc_73BF7C:
test	eax, eax
jbe	loc_73C041
lea	edi, [ebx+94h]
lea	ebp, [ebx+0A0h]
mov	[esp+19Ch+var_18C], eax

loc_73BF94:
lea	ecx, [esp+19Ch+var_138]
call	sub_6FA2A0
lea	ecx, [esp+19Ch+var_110]
call	sub_6FA2A0
mov	ecx, [esp+19Ch+arg_4]
lea	edx, [esp+19Ch+var_110]
push	edx
mov	edx, [ecx]
lea	eax, [esp+1A0h+var_138]
push	eax
mov	eax, [esp+1A4h+arg_0]
push	edx
push	eax
mov	ecx, ebx
call	sub_73B2A0
mov	ecx, [edi+4]
inc	ecx
push	ecx
push	edi
mov	ecx, edi
call	sub_6F90A0
mov	eax, [edi+4]
lea	edx, [eax+eax*4]
mov	eax, [edi]
lea	ecx, [eax+edx*8-28h]
test	ecx, ecx
jz	short loc_73BFF6
lea	edx, [esp+19Ch+var_138]
push	edx
call	sub_6FAB80

loc_73BFF6:
mov	eax, [ebp+4]
inc	eax
push	eax
push	ebp
mov	ecx, ebp
call	sub_6F90A0
mov	eax, [ebp+4]
mov	edx, [ebp+0]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*8-28h]
test	ecx, ecx
jz	short loc_73C021
lea	eax, [esp+19Ch+var_110]
push	eax
call	sub_6FAB80

loc_73C021:
lea	ecx, [esp+19Ch+var_110]
call	sub_6FA020
lea	ecx, [esp+19Ch+var_138]
call	sub_6FA020
sub	[esp+19Ch+var_18C], 1
jnz	loc_73BF94

loc_73C041:
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 1
jge	short loc_73C057
mov	ecx, esi
call	sub_6A9C60

loc_73C057:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
mov	dl, [eax+edx]
lea	ecx, [eax+1]
movzx	eax, dl
mov	[esi+2Ch], ecx
cmp	eax, 0FFh
jnz	short loc_73C0AC
mov	eax, [esi+30h]
sub	eax, ecx
cmp	eax, 2
mov	byte ptr [esi+15h], 0
jge	short loc_73C087
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73C087:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
movzx	eax, cx

loc_73C0AC:
test	eax, eax
jbe	loc_73C396
mov	[esp+19Ch+var_18C], eax
jmp	short loc_73C0C0
align 10h

loc_73C0C0:
mov	ebx, [esp+19Ch+var_188]
mov	edi, [ebx+0B0h]
mov	ebp, [ebx+0B0h]
inc	edi
add	ebx, 0ACh
push	edi
push	ebx
mov	ecx, ebx
call	sub_6F9120
cmp	edi, ebp
jbe	short loc_73C104
sub	edi, ebp
mov	eax, [ebx]
lea	edx, [ebp+ebp*2+0]
lea	ebx, [eax+edx*8]
jz	short loc_73C104

loc_73C0F1:
test	ebx, ebx
jz	short loc_73C0FC
mov	ecx, ebx
call	sub_6FA090

loc_73C0FC:
add	ebx, 18h
sub	edi, 1
jnz	short loc_73C0F1

loc_73C104:
mov	eax, [esp+19Ch+var_188]
mov	edi, [eax+0BCh]
mov	ebp, [eax+0BCh]
inc	edi
lea	ecx, [eax+0B8h]
push	edi
push	ecx
call	sub_6F9120
mov	ecx, [esp+19Ch+var_188]
cmp	edi, ebp
jbe	short loc_73C157
sub	edi, ebp
mov	eax, [ecx+0B8h]
lea	edx, [ebp+ebp*2+0]
lea	ebx, [eax+edx*8]
jz	short loc_73C157
jmp	short loc_73C140
align 10h

loc_73C140:
test	ebx, ebx
jz	short loc_73C14F
mov	ecx, ebx
call	sub_6FA090
mov	ecx, [esp+19Ch+var_188]

loc_73C14F:
add	ebx, 18h
sub	edi, 1
jnz	short loc_73C140

loc_73C157:
mov	eax, [ecx+0B0h]
lea	edx, [eax+eax*2]
mov	eax, [ecx+0ACh]
lea	edi, [eax+edx*8-18h]
mov	eax, [ecx+0BCh]
lea	edx, [eax+eax*2]
lea	eax, [ecx+0B8h]
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	eax, [eax]
cmp	ecx, 2
lea	ebp, [eax+edx*8-18h]
mov	byte ptr [esi+15h], 0
jge	short loc_73C197
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73C197:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
add	eax, 2
mov	[esi+2Ch], eax
mov	[edi+4], cx
mov	edx, [esi+30h]
sub	edx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	edx, 2
jge	short loc_73C1D5
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73C1D5:
mov	eax, [esi+2Ch]
mov	ecx, [esi+3Ch]
movzx	dx, byte ptr [ecx+eax+1]
add	ecx, eax
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
mov	edx, [esp+19Ch+arg_4]
add	eax, 2
mov	[esi+2Ch], eax
mov	[ebp+4], cx
cmp	dword ptr [edx], 54h
jnz	loc_73C2AA
mov	eax, [esi+30h]
sub	eax, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	eax, 2
jge	short loc_73C223
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73C223:
mov	ecx, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	eax, [edx+ecx]
movzx	dx, byte ptr [eax+1]
movzx	ax, byte ptr [eax]
shl	dx, 8
or	dx, ax
movzx	eax, dx
add	ecx, 2
mov	[esi+2Ch], ecx
mov	[ebp+10h], ax
mov	[edi+10h], ax
test	al, 20h
jz	short loc_73C2AA
mov	ecx, [esi+30h]
sub	ecx, [esi+2Ch]
mov	byte ptr [esi+15h], 0
cmp	ecx, 2
jge	short loc_73C269
push	2
mov	ecx, esi
call	sub_6A9B70

loc_73C269:
mov	eax, [esi+2Ch]
mov	edx, [esi+3Ch]
lea	ecx, [edx+eax]
movzx	dx, byte ptr [ecx+1]
movzx	cx, byte ptr [ecx]
shl	dx, 8
or	dx, cx
movzx	ecx, dx
movzx	edx, cx
mov	[esp+19Ch+var_180], edx
add	eax, 2
mov	[esi+2Ch], eax
fild	[esp+19Ch+var_180]
fmul	ds:dbl_15FD8A0
fstp	[esp+19Ch+var_180]
fld	[esp+19Ch+var_180]
fst	dword ptr [ebp+14h]
fstp	dword ptr [edi+14h]

loc_73C2AA:
test	byte ptr [edi+10h], 8
jz	loc_73C361
lea	ecx, [esp+19Ch+var_110]
call	sub_6FA2A0
lea	ecx, [esp+19Ch+var_138]
call	sub_6FA2A0
mov	edx, [esp+19Ch+arg_4]
lea	eax, [esp+19Ch+var_138]
push	eax
mov	eax, [edx]
lea	ecx, [esp+1A0h+var_110]
push	ecx
mov	ecx, [esp+1A4h+arg_0]
push	eax
push	ecx
mov	ecx, [esp+1ACh+var_188]
call	sub_73B2A0
lea	edx, [esp+19Ch+var_110]
push	edx
mov	ecx, edi
call	sub_6FACC0
test	[esp+19Ch+var_110], 10h
jz	short loc_73C319
mov	eax, [esp+19Ch+var_10C]
mov	eax, [eax+0Ch]
add	eax, 4
jmp	short loc_73C31D

loc_73C319:
lea	eax, [esp+19Ch+var_17C]

loc_73C31D:
mov	ecx, [eax]
lea	edx, [esp+19Ch+var_138]
mov	[edi+8], ecx
push	edx
mov	ecx, ebp
call	sub_6FACC0
test	byte ptr [esp+19Ch+var_138], 10h
jz	short loc_73C341
mov	eax, [esp+19Ch+var_134]
mov	eax, [eax+0Ch]
add	eax, 4
jmp	short loc_73C345

loc_73C341:
lea	eax, [esp+19Ch+var_17C]

loc_73C345:
mov	ecx, [eax]
mov	[ebp+8], ecx
lea	ecx, [esp+19Ch+var_138]
call	sub_6FA020
lea	ecx, [esp+19Ch+var_110]
call	sub_6FA020
jmp	short loc_73C38B

loc_73C361:
mov	ebx, [esp+19Ch+arg_4]
mov	edx, [ebx]
push	edx
add	edi, 8
push	edi
mov	edi, [esp+1A4h+arg_0]
mov	ecx, edi
call	sub_6FC320
mov	eax, [ebx]
push	eax
add	ebp, 8
push	ebp
mov	ecx, edi
call	sub_6FC320

loc_73C38B:
sub	[esp+19Ch+var_18C], 1
jnz	loc_73C0C0

loc_73C396:
mov	ebp, [esi+2Ch]
sub	ebp, [esi+30h]
mov	ecx, [esp+19Ch+var_184]
mov	edx, [esp+19Ch+var_17C]
add	ebp, [esi+34h]
lea	edi, [ecx+edx]
cmp	edi, ebp
jb	loc_73C8BE
push	offset aGfxmorphcharac ; "GFxMorphCharacterDef,	first shape:\n"
push	esi
call	nullsub_2
mov	edx, [esp+1A4h+var_188]
mov	ebx, [esp+1A4h+arg_0]
add	esp, 8
push	0
push	0
mov	eax, edi
sub	eax, ebp
mov	ebp, [esp+1A4h+arg_4]
mov	ecx, [ebp+0]
push	eax
push	ecx
mov	ecx, [edx+8Ch]
push	ebx
call	sub_7136E0
push	offset aGfxmorphchar_0 ; "GFxMorphCharacterDef,	second shape:\n"
push	esi
call	nullsub_2
add	esp, 8
push	edi
mov	ecx, esi
call	sub_6A9D50
mov	eax, [ebp+0Ch]
add	eax, [ebp+8]
mov	ecx, [ebp+0]
mov	esi, [esp+19Ch+var_188]
push	0
push	0
sub	eax, edi
push	eax
push	ecx
mov	ecx, [esi+90h]
push	ebx
call	sub_7136E0
mov	ebp, [esi+64h]
lea	edi, [esi+60h]
mov	esi, [esi+98h]
push	esi
push	edi
mov	ecx, edi
call	sub_6F90A0
cmp	esi, ebp
jbe	short loc_73C46D
sub	esi, ebp
mov	eax, [edi]
lea	edx, [ebp+ebp*4+0]
lea	ecx, [eax+edx*8]
mov	[esp+19Ch+var_184], ecx
jz	short loc_73C46D
lea	esp, [esp+0]

loc_73C450:
xor	ebx, ebx
cmp	[esp+19Ch+var_184], ebx
jz	short loc_73C461
mov	ecx, [esp+19Ch+var_184]
call	sub_6FA2A0

loc_73C461:
add	[esp+19Ch+var_184], 28h
sub	esi, 1
jnz	short loc_73C450
jmp	short loc_73C46F

loc_73C46D:
xor	ebx, ebx

loc_73C46F:
mov	[esp+19Ch+var_18C], ebx
cmp	[edi+4], ebx
jbe	short loc_73C4BE
xor	ebp, ebp
lea	ebx, [ebx+0]

loc_73C480:
mov	esi, [edi]
mov	edx, [esp+19Ch+var_188]
mov	eax, [edx+94h]
mov	cl, [eax+ebp]
add	esi, ebp
mov	[esi], cl
mov	[esi+4], ebx
cmp	[esi+8], ebx
jnz	short loc_73C4A7
mov	ecx, [esi+0Ch]
cmp	ecx, ebx
jz	short loc_73C4A7
call	sub_666B00

loc_73C4A7:
mov	eax, [esp+19Ch+var_18C]
inc	eax
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
add	ebp, 28h
mov	[esp+19Ch+var_18C], eax
cmp	eax, [edi+4]
jb	short loc_73C480

loc_73C4BE:
mov	eax, [esp+19Ch+var_188]
mov	edi, [eax+0B0h]
mov	esi, [eax+70h]
lea	ebp, [eax+6Ch]
push	edi
push	ebp
mov	ecx, ebp
call	sub_6F9120
cmp	edi, esi
jbe	short loc_73C4FB
sub	edi, esi
mov	eax, [ebp+0]
lea	edx, [esi+esi*2]
lea	ebp, [eax+edx*8]
jz	short loc_73C4FB

loc_73C4E8:
cmp	ebp, ebx
jz	short loc_73C4F3
mov	ecx, ebp
call	sub_6FA090

loc_73C4F3:
add	ebp, 18h
sub	edi, 1
jnz	short loc_73C4E8

loc_73C4FB:
mov	esi, [esp+19Ch+var_188]
mov	ecx, [esi+8Ch]
push	ecx
lea	ecx, [esp+1A0h+var_E8]
xor	ebp, ebp
mov	[esp+1A0h+var_184], ebx
call	sub_70CB20
mov	edx, [esi+90h]
push	edx
lea	ecx, [esp+1A0h+var_74]
call	sub_70CB20
mov	eax, [esi+0C8h]
add	esi, 0C4h
cmp	eax, ebx
jbe	short loc_73C596
mov	edx, [esi]
lea	ecx, [eax+eax*8]
lea	esi, [edx+ecx*4-24h]
add	esi, 14h
mov	edi, eax
lea	esp, [esp+0]

loc_73C550:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
sub	esi, 24h
sub	edi, 1
jnz	short loc_73C550
mov	esi, [esp+19Ch+var_188]
add	esi, 0C4h
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_73C5A4
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_73C591
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_73C591:
mov	[esi+8], ebx
jmp	short loc_73C5A4

loc_73C596:
cmp	[esi+8], ebx
ja	short loc_73C5A4
push	ebx
push	esi
mov	ecx, esi
call	sub_73BA10

loc_73C5A4:
fldz
mov	[esi+4], ebx

loc_73C5A9:
cmp	[esp+19Ch+var_C8], 1
jnz	short loc_73C5C1
cmp	[esp+19Ch+var_54], 1
jz	loc_73C8BC

loc_73C5C1:
push	ebx
fst	[esp+1A0h+var_12C]
lea	ecx, [esp+1A0h+var_124]
fstp	[esp+1A0h+var_128]
push	ecx
mov	[esp+1A4h+var_124], ebx
mov	dword ptr [esp+1A4h+var_120], ebx
mov	[esp+1A4h+var_11C], ebx
mov	[esp+1A4h+var_118], 0
mov	[esp+1A4h+var_138], ebx
mov	[esp+1A4h+var_134], ebx
mov	[esp+1A4h+var_130], ebx
call	sub_73A300
mov	edx, [esp+19Ch+var_188]
mov	esi, [edx+0C8h]
mov	eax, [edx+0C8h]
add	edx, 0C4h
inc	esi
mov	dword ptr [esp+19Ch+var_120], ebx
cmp	esi, eax
jnb	short loc_73C66C
mov	edx, [edx]
sub	eax, esi
lea	ecx, [eax+esi]
lea	ecx, [ecx+ecx*8]
lea	edi, [edx+ecx*4-24h]
jz	short loc_73C649
add	edi, 14h
mov	ebx, eax

loc_73C631:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi]
mov	eax, [eax+30h]
push	edx
call	eax
sub	edi, 24h
sub	ebx, 1
jnz	short loc_73C631

loc_73C649:
mov	eax, [esp+19Ch+var_188]
mov	ecx, [eax+0CCh]
add	eax, 0C4h
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_73C681
mov	ecx, [esp+19Ch+var_188]
push	esi
add	ecx, 0C4h
push	ecx
jmp	short loc_73C67C

loc_73C66C:
cmp	esi, [edx+8]
jb	short loc_73C681
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax
push	edx
mov	ecx, edx

loc_73C67C:
call	sub_73BA10

loc_73C681:
mov	edi, [esp+19Ch+var_188]
mov	edx, [edi+0C4h]
lea	eax, [edi+0C4h]
lea	ecx, [esi+esi*8]
lea	ecx, [edx+ecx*4-24h]
mov	[esp+19Ch+var_18C], eax
mov	[eax+4], esi
test	ecx, ecx
jz	short loc_73C6AD
lea	eax, [esp+19Ch+var_138]
push	eax
call	sub_73B990

loc_73C6AD:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+19Ch+var_124]
mov	edx, [edx+30h]
push	eax
call	edx
test	ebp, ebp
jnz	short loc_73C6F3
lea	ecx, [esp+19Ch+var_E8]
call	sub_70CF70
mov	ebp, eax
mov	al, [esp+19Ch+var_C8]
cmp	al, 1
jz	short loc_73C6F3
lea	ecx, [esp+19Ch+var_E8]
cmp	al, 2
jnz	short loc_73C6EE
call	sub_70C3E0
jmp	short loc_73C6F3

loc_73C6EE:
call	sub_70CF00

loc_73C6F3:
mov	ebx, [esp+19Ch+var_184]
test	ebx, ebx
jnz	short loc_73C72B
lea	ecx, [esp+19Ch+var_74]
call	sub_70CF70
mov	ebx, eax
mov	al, [esp+19Ch+var_54]
cmp	al, 1
jz	short loc_73C72B
lea	ecx, [esp+19Ch+var_74]
cmp	al, 2
jnz	short loc_73C726
call	sub_70C3E0
jmp	short loc_73C72B

loc_73C726:
call	sub_70CF00

loc_73C72B:
mov	eax, [edi+0C8h]
cmp	ebp, ebx
jnz	short loc_73C7B0
mov	ecx, [esp+19Ch+var_18C]
mov	edx, [ecx]
lea	eax, [eax+eax*8]
mov	edi, [edx+eax*4-0Ch]
lea	esi, [edx+eax*4-10h]
cmp	ebp, edi
jnb	short loc_73C756
mov	eax, [esi+8]
shr	eax, 1
cmp	ebp, eax
jnb	short loc_73C76B
push	ebp
jmp	short loc_73C763

loc_73C756:
cmp	ebp, [esi+8]
jb	short loc_73C76B
mov	ecx, ebp
shr	ecx, 2
add	ecx, ebp
push	ecx

loc_73C763:
push	esi
mov	ecx, esi
call	sub_73A300

loc_73C76B:
mov	[esi+4], ebp
cmp	ebp, edi
jbe	short loc_73C7A1
mov	eax, edi
shl	eax, 4
add	eax, [esi]
sub	ebp, edi
jz	short loc_73C7A1
fldz

loc_73C77F:
test	eax, eax
jz	short loc_73C78E
fst	dword ptr [eax]
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]

loc_73C78E:
add	eax, 10h
sub	ebp, 1
jnz	short loc_73C77F
mov	[esp+19Ch+var_184], ebp
xor	ebx, ebx
jmp	loc_73C5A9

loc_73C7A1:
fldz
xor	ebp, ebp
mov	[esp+19Ch+var_184], ebp
xor	ebx, ebx
jmp	loc_73C5A9

loc_73C7B0:
jnb	loc_73C839
lea	edx, [eax+eax*8]
mov	eax, [esp+19Ch+var_18C]
mov	ecx, [eax]
mov	edi, [ecx+edx*4-0Ch]
lea	esi, [ecx+edx*4-10h]
cmp	ebp, edi
jnb	short loc_73C7D7
mov	edx, [esi+8]
shr	edx, 1
cmp	ebp, edx
jnb	short loc_73C7EC
push	ebp
jmp	short loc_73C7E4

loc_73C7D7:
cmp	ebp, [esi+8]
jb	short loc_73C7EC
mov	eax, ebp
shr	eax, 2
add	eax, ebp
push	eax

loc_73C7E4:
push	esi
mov	ecx, esi
call	sub_73A300

loc_73C7EC:
mov	[esi+4], ebp
cmp	ebp, edi
jbe	short loc_73C828
mov	eax, edi
shl	eax, 4
add	eax, [esi]
mov	ecx, ebp
sub	ecx, edi
jz	short loc_73C828
fldz

loc_73C802:
test	eax, eax
jz	short loc_73C811
fst	dword ptr [eax]
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]

loc_73C811:
add	eax, 10h
sub	ecx, 1
jnz	short loc_73C802
sub	ebx, ebp
mov	[esp+19Ch+var_184], ebx
xor	ebp, ebp
xor	ebx, ebx
jmp	loc_73C5A9

loc_73C828:
fldz
sub	ebx, ebp
mov	[esp+19Ch+var_184], ebx
xor	ebp, ebp
xor	ebx, ebx
jmp	loc_73C5A9

loc_73C839:
mov	edx, [esp+19Ch+var_18C]
lea	ecx, [eax+eax*8]
mov	eax, [edx]
mov	edi, [eax+ecx*4-0Ch]
lea	esi, [eax+ecx*4-10h]
cmp	ebx, edi
jnb	short loc_73C85A
mov	ecx, [esi+8]
shr	ecx, 1
cmp	ebx, ecx
jnb	short loc_73C86F
push	ebx
jmp	short loc_73C867

loc_73C85A:
cmp	ebx, [esi+8]
jb	short loc_73C86F
mov	edx, ebx
shr	edx, 2
add	edx, ebx
push	edx

loc_73C867:
push	esi
mov	ecx, esi
call	sub_73A300

loc_73C86F:
mov	[esi+4], ebx
cmp	ebx, edi
jbe	short loc_73C8A9
mov	eax, edi
shl	eax, 4
add	eax, [esi]
mov	ecx, ebx
sub	ecx, edi
jz	short loc_73C8A9
fldz

loc_73C885:
test	eax, eax
jz	short loc_73C894
fst	dword ptr [eax]
fst	dword ptr [eax+4]
fst	dword ptr [eax+8]
fst	dword ptr [eax+0Ch]

loc_73C894:
add	eax, 10h
sub	ecx, 1
jnz	short loc_73C885
sub	ebp, ebx
mov	[esp+19Ch+var_184], ecx
xor	ebx, ebx
jmp	loc_73C5A9

loc_73C8A9:
fldz
sub	ebp, ebx
mov	[esp+19Ch+var_184], 0
xor	ebx, ebx
jmp	loc_73C5A9

loc_73C8BC:
fstp	st

loc_73C8BE:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18Ch
retn	0Ch
sub_73BD20 endp

align 10h



sub_73C8D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 10h
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_73C8E6
mov	ecx, edi
call	sub_64A420

loc_73C8E6:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_73C8F2
call	sub_64A430

loc_73C8F2:
mov	[esi+0Ch], edi
test	edi, edi
jz	short loc_73C91D
mov	eax, [edi]
mov	edx, [eax+4]
lea	ecx, [esp+18h+var_10]
push	ecx
mov	ecx, edi
call	edx
mov	eax, [esp+18h+var_10]
mov	ecx, [esp+18h+var_C]
pop	edi
mov	[esi+1Ch], eax
mov	[esi+20h], ecx
pop	esi
add	esp, 10h
retn	4

loc_73C91D:
pop	edi
mov	dword ptr [esi+1Ch], 0
mov	dword ptr [esi+20h], 0
pop	esi
add	esp, 10h
retn	4
sub_73C8D0 endp

align 10h



sub_73C940 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fld1
mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, 1
mov	dword ptr [eax], offset	off_155F500
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	ecx, [esp+arg_0]
mov	dword ptr [eax], offset	off_1440B50
mov	dword ptr [eax+0Ch], 0
fstp	dword ptr [eax+10h]
fld	ds:flt_15FD998
mov	[eax+14h], ecx
mov	ecx, [esp+arg_8]
fstp	dword ptr [eax+18h]
mov	[eax+1Ch], edx
mov	[eax+20h], ecx
retn	0Ch
sub_73C940 endp

align 10h



sub_73C990 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld1
mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
mov	dword ptr [esi], offset	off_155F500
mov	eax, 1
mov	[esi+4], eax
mov	[esi+8], eax
xor	eax, eax
mov	dword ptr [esi], offset	off_1440B50
mov	[esi+0Ch], eax
fstp	dword ptr [esi+10h]
fld	ds:flt_15FD998
mov	[esi+14h], ecx
push	edx
fstp	dword ptr [esi+18h]
mov	ecx, esi
mov	[esi+1Ch], eax
mov	[esi+20h], eax
call	sub_73C8D0
mov	eax, esi
pop	esi
retn	8
sub_73C990 endp

align 10h



sub_73C9E0 proc	near
mov	eax, [ecx]
cmp	eax, 0Ah
jl	short loc_73C9F2
cmp	eax, 0Ch
jg	short loc_73C9F2
mov	eax, 1
retn

loc_73C9F2:
xor	eax, eax
retn
sub_73C9E0 endp

align 10h



sub_73CA00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_0]
cmp	edx, [ecx+4]
jnb	short locret_73CA76
push	edi
mov	edi, [esp+4+arg_4]
cmp	edi, [ecx+8]
jnb	short loc_73CA75
push	esi
mov	esi, [ecx]
cmp	esi, 0Ah
jge	short loc_73CA74 ; default
			; jumptable 0073CA2C cases 3-7
mov	eax, [ecx+0Ch]
imul	eax, edi
add	eax, [ecx+10h]
lea	ecx, [esi-1]	; switch 9 cases
cmp	ecx, 8
ja	short loc_73CA74 ; default
			; jumptable 0073CA2C cases 3-7
jmp	ds:off_73CA7C[ecx*4] ; switch jump

loc_73CA33:		; jumptable 0073CA2C case 1
mov	ecx, [esp+8+arg_8]
pop	esi
mov	[eax+edx*4], ecx
pop	edi
retn	0Ch

loc_73CA3F:		; jumptable 0073CA2C case 2
lea	eax, [eax+edx*2]
lea	ecx, [edx+eax]
mov	eax, [esp+8+arg_8]
mov	edx, eax
shr	edx, 8
mov	[ecx], al
shr	eax, 10h
pop	esi
mov	[ecx+1], dl
mov	[ecx+2], al
pop	edi
retn	0Ch

loc_73CA5E:		; jumptable 0073CA2C case 9
mov	ecx, [esp+8+arg_8]
shr	ecx, 18h
pop	esi
mov	[eax+edx], cl
pop	edi
retn	0Ch

loc_73CA6D:		; jumptable 0073CA2C case 8
mov	cl, byte ptr [esp+8+arg_8]
mov	[eax+edx], cl

loc_73CA74:		; default
pop	esi		; jumptable 0073CA2C cases 3-7

loc_73CA75:
pop	edi

locret_73CA76:
retn	0Ch
sub_73CA00 endp

align 4
off_73CA7C dd offset loc_73CA33	; jump table for switch	statement
dd offset loc_73CA3F
dd offset loc_73CA74
dd offset loc_73CA74
dd offset loc_73CA74
dd offset loc_73CA74
dd offset loc_73CA74
dd offset loc_73CA6D
dd offset loc_73CA5E



sub_73CAA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
dec	eax
cmp	eax, 63h	; switch 100 cases
ja	short loc_73CAD8 ; default
			; jumptable 0073CAB1 cases 2-6,12-98
movzx	eax, ds:byte_73CAF4[eax]
jmp	ds:off_73CAE0[eax*4] ; switch jump

loc_73CAB8:		; jumptable 0073CAB1 cases 7,8,10,11,99
mov	eax, 1
retn	4

loc_73CAC0:		; jumptable 0073CAB1 case 0
mov	eax, 4
retn	4

loc_73CAC8:		; jumptable 0073CAB1 case 1
mov	eax, 3
retn	4

loc_73CAD0:		; jumptable 0073CAB1 case 9
mov	eax, 2
retn	4

loc_73CAD8:		; default
xor	eax, eax	; jumptable 0073CAB1 cases 2-6,12-98
retn	4
sub_73CAA0 endp

align 10h
off_73CAE0 dd offset loc_73CAC0, offset	loc_73CAC8 ; jump table	for switch statement
dd offset loc_73CAB8, offset loc_73CAD0
dd offset loc_73CAD8
byte_73CAF4 db	    0,	   1,	  4,	 4 ; indirect table for	switch statement
db	4,     4,     4,     2
db	2,     3,     2,     2
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     2
align 10h



sub_73CB60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
dec	eax
cmp	eax, 63h	; switch 100 cases
ja	short loc_73CB98 ; default
			; jumptable 0073CB71 cases 2-6,9-98
movzx	eax, ds:byte_73CBB0[eax]
jmp	ds:off_73CBA0[eax*4] ; switch jump

loc_73CB78:		; jumptable 0073CB71 cases 7,8,99
mov	eax, [esp+arg_4]
retn	8

loc_73CB7F:		; jumptable 0073CB71 case 0
mov	eax, [esp+arg_4]
add	eax, eax
add	eax, eax
retn	8

loc_73CB8A:		; jumptable 0073CB71 case 1
mov	eax, [esp+arg_4]
lea	eax, [eax+eax*2+3]
and	eax, 0FFFFFFFCh
retn	8

loc_73CB98:		; default
xor	eax, eax	; jumptable 0073CB71 cases 2-6,9-98
retn	8
sub_73CB60 endp

align 10h
off_73CBA0 dd offset loc_73CB7F, offset	loc_73CB8A ; jump table	for switch statement
dd offset loc_73CB78, offset loc_73CB98
byte_73CBB0 db	    0,	   1,	  3,	 3 ; indirect table for	switch statement
db	3,     3,     3,     2
db	2,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     2
align 10h
; START	OF FUNCTION CHUNK FOR sub_7D2550

loc_73CC20:
mov	edx, [esp+arg_4]
push	ebx
push	esi
push	edi
push	edx
mov	esi, ecx
mov	edx, [esi+14h]
mov	ecx, [esp+10h+arg_8]
mov	eax, [ecx]
mov	eax, [eax+14h]
push	edx
mov	edx, [esi+10h]
push	edx
mov	edx, [esp+18h+arg_0]
push	edx
call	eax
xor	edi, edi
mov	ebx, eax
cmp	[esi+14h], edi
jbe	short loc_73CC69
jmp	short loc_73CC50
; END OF FUNCTION CHUNK	FOR sub_7D2550
align 10h
; START	OF FUNCTION CHUNK FOR sub_7D2550

loc_73CC50:
mov	eax, [esi+18h]
mov	edx, [ebx]
imul	eax, edi
add	eax, [esi+1Ch]
mov	edx, [edx+4]
push	eax
mov	ecx, ebx
call	edx
inc	edi
cmp	edi, [esi+14h]
jb	short loc_73CC50

loc_73CC69:
test	ebx, ebx
jz	short loc_73CC77
mov	eax, [ebx]
mov	edx, [eax]
push	1
mov	ecx, ebx
call	edx

loc_73CC77:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch
; END OF FUNCTION CHUNK	FOR sub_7D2550
align 10h



sub_73CC80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	ebp
mov	ebp, [esp+10h+arg_8]
shr	eax, 3
shr	ebx, 3
push	esi
mov	esi, [esp+14h+arg_0]
mov	[esp+14h+arg_4], eax
cmp	edx, 1
jnz	short loc_73CD13
cmp	ebp, 9
jnz	short loc_73CCD0
xor	ebp, ebp
xor	eax, eax
test	edi, edi
jbe	short loc_73CCC7
mov	edi, edi

loc_73CCB0:
cmp	eax, [esp+14h+arg_C]
jnb	short loc_73CCC7
mov	dl, [esi+ebp+3]
mov	[eax+ecx], dl
add	eax, [esp+14h+arg_4]
add	ebp, ebx
cmp	ebp, edi
jb	short loc_73CCB0

loc_73CCC7:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CCD0:
cmp	ebp, 2
jnz	loc_73CF1E
xor	eax, eax
xor	ebp, ebp
test	edi, edi
jbe	short loc_73CD0A

loc_73CCE1:
cmp	ebp, [esp+14h+arg_C]
jnb	short loc_73CD0A
movzx	edx, byte ptr [eax+esi]
mov	[ecx+ebp], dl
movzx	edx, byte ptr [eax+esi+1]
mov	[ecx+ebp+1], dl
movzx	edx, byte ptr [eax+esi+2]
mov	[ecx+ebp+2], dl
add	ebp, [esp+14h+arg_4]
add	eax, ebx
cmp	eax, edi
jb	short loc_73CCE1

loc_73CD0A:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CD13:
cmp	edx, 2
jnz	loc_73CDBB
cmp	ebp, 9
jnz	short loc_73CD73
xor	ebp, ebp
mov	[esp+14h+var_8], ebp
cmp	edi, ebp
jbe	short loc_73CD6A
jmp	short loc_73CD30
align 10h

loc_73CD30:
mov	eax, [esp+14h+var_8]
cmp	eax, [esp+14h+arg_C]
jnb	short loc_73CD6A
movzx	eax, byte ptr [esi+ebp+1]
movzx	edx, byte ptr [esi+ebp+2]
add	edx, eax
movzx	eax, byte ptr [esi+ebp]
add	edx, eax
mov	eax, 0AAAAAAABh
mul	edx
mov	eax, [esp+14h+var_8]
shr	edx, 1
mov	[eax+ecx], dl
add	eax, [esp+14h+arg_4]
add	ebp, ebx
mov	[esp+14h+var_8], eax
cmp	ebp, edi
jb	short loc_73CD30

loc_73CD6A:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CD73:
cmp	ebp, 1
jnz	loc_73CF1E
xor	ebp, ebp
xor	eax, eax
test	edi, edi
jbe	short loc_73CDB2

loc_73CD84:
cmp	eax, [esp+14h+arg_C]
jnb	short loc_73CDB2
movzx	edx, byte ptr [esi+ebp]
mov	[eax+ecx], dl
movzx	edx, byte ptr [esi+ebp+1]
mov	[eax+ecx+1], dl
movzx	edx, byte ptr [esi+ebp+2]
mov	[eax+ecx+2], dl
mov	byte ptr [eax+ecx+3], 0FFh
add	eax, [esp+14h+arg_4]
add	ebp, ebx
cmp	ebp, edi
jb	short loc_73CD84

loc_73CDB2:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CDBB:
cmp	edx, 64h
jnz	loc_73CEA2
cmp	ebp, 9
jnz	short loc_73CE32
xor	ebp, ebp
mov	[esp+14h+var_8], ebp
cmp	edi, ebp
jbe	short loc_73CE29

loc_73CDD3:
mov	eax, [esp+14h+var_8]
cmp	eax, [esp+14h+arg_C]
jnb	short loc_73CE29
movzx	eax, byte ptr [esi+ebp]
mov	edx, [esp+14h+arg_10]
cmp	byte ptr [edx+8], 0
lea	eax, [edx+eax*4+0Ch]
mov	[esp+14h+var_4], eax
jz	short loc_73CDF8
mov	dl, [eax+3]
jmp	short loc_73CE14

loc_73CDF8:
movzx	edx, byte ptr [eax+2]
movzx	eax, byte ptr [eax+1]
add	edx, eax
mov	eax, [esp+14h+var_4]
movzx	eax, byte ptr [eax]
add	edx, eax
mov	eax, 0AAAAAAABh
mul	edx
shr	edx, 1

loc_73CE14:
mov	eax, [esp+14h+var_8]
mov	[eax+ecx], dl
add	eax, [esp+14h+arg_4]
add	ebp, ebx
mov	[esp+14h+var_8], eax
cmp	ebp, edi
jb	short loc_73CDD3

loc_73CE29:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CE32:
cmp	ebp, 2
jz	short loc_73CE40
cmp	ebp, 1
jnz	loc_73CF1E

loc_73CE40:
xor	edx, edx
xor	eax, eax
mov	[esp+14h+var_8], edx
test	edi, edi
jbe	short loc_73CE99
lea	esp, [esp+0]

loc_73CE50:
cmp	eax, [esp+14h+arg_C]
jnb	short loc_73CE99
cmp	[esp+14h+arg_8], 1
movzx	edx, byte ptr [edx+esi]
mov	ebp, [esp+14h+arg_10]
lea	ebp, [ebp+edx*4+0Ch]
movzx	edx, byte ptr [ebp+0]
mov	[eax+ecx], dl
movzx	edx, byte ptr [ebp+1]
mov	[eax+ecx+1], dl
movzx	edx, byte ptr [ebp+2]
mov	[eax+ecx+2], dl
jnz	short loc_73CE87
mov	dl, [ebp+3]
mov	[eax+ecx+3], dl

loc_73CE87:
mov	edx, [esp+14h+var_8]
add	eax, [esp+14h+arg_4]
add	edx, ebx
mov	[esp+14h+var_8], edx
cmp	edx, edi
jb	short loc_73CE50

loc_73CE99:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CEA2:
cmp	edx, 9
jnz	short loc_73CF1E
cmp	ebp, 2
jnz	short loc_73CEE4
xor	eax, eax
xor	ebp, ebp
test	edi, edi
jbe	short loc_73CEDB

loc_73CEB4:
cmp	ebp, [esp+14h+arg_C]
jnb	short loc_73CEDB
movzx	edx, byte ptr [eax+esi]
mov	[ecx+ebp], dl
movzx	edx, byte ptr [eax+esi]
mov	[ecx+ebp+1], dl
movzx	edx, byte ptr [eax+esi]
mov	[ecx+ebp+2], dl
add	ebp, [esp+14h+arg_4]
add	eax, ebx
cmp	eax, edi
jb	short loc_73CEB4

loc_73CEDB:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CEE4:
cmp	ebp, 1
jnz	short loc_73CF1E
xor	ebp, ebp
xor	eax, eax
test	edi, edi
jbe	short loc_73CF15

loc_73CEF1:
mov	dl, 0FFh
cmp	eax, [esp+14h+arg_C]
jnb	short loc_73CF15
mov	[eax+ecx], dl
mov	[eax+ecx+1], dl
mov	[eax+ecx+2], dl
mov	dl, [esi+ebp]
mov	[eax+ecx+3], dl
add	eax, [esp+14h+arg_4]
add	ebp, ebx
cmp	ebp, edi
jb	short loc_73CEF1

loc_73CF15:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn

loc_73CF1E:
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn
sub_73CC80 endp

align 10h



sub_73CF30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+4]
push	ebx
mov	ebx, [ecx]
add	ecx, 4
push	ebp
mov	ebp, [esp+8+arg_0]
add	ecx, 4
push	edi
test	bl, 2
jz	short loc_73CF4A
mov	[ebp+8], eax

loc_73CF4A:
mov	eax, [ecx]
add	ecx, 4
test	bl, 4
jz	short loc_73CF57
mov	[ebp+4], eax

loc_73CF57:
mov	eax, [ecx]
mov	edi, ebx
add	ecx, 4
and	edi, 8
jnz	short loc_73CF74
test	ebx, 80000h
jz	short loc_73CF77
xor	edx, edx
div	dword ptr [ebp+8]
add	eax, eax
add	eax, eax

loc_73CF74:
mov	[ebp+0Ch], eax

loc_73CF77:
mov	eax, [ecx+4]
add	ecx, 4
add	ecx, 4
test	ebx, 20000h
jz	short loc_73CF8B
mov	[ebp+18h], eax

loc_73CF8B:
add	ecx, 2Ch
test	ebx, 1000h
jz	loc_73D08A
mov	eax, [ecx]
add	ecx, 4
cmp	eax, 20h
jnz	loc_73D084
mov	edx, [ecx]
mov	eax, [ecx+4]
add	ecx, 4
add	ecx, 4
test	dl, 4
jz	short loc_73CFFA
cmp	eax, 35545844h
jnz	short loc_73CFCE
mov	dword ptr [ebp+0], 0Ch
add	ecx, 14h
jmp	loc_73D07E

loc_73CFCE:
cmp	eax, 33545844h
jnz	short loc_73CFE4
mov	dword ptr [ebp+0], 0Bh
add	ecx, 14h
jmp	loc_73D07E

loc_73CFE4:
cmp	eax, 31545844h
jnz	short loc_73CFF2
mov	dword ptr [ebp+0], 0Ah

loc_73CFF2:
add	ecx, 14h
jmp	loc_73D07E

loc_73CFFA:
test	dl, 42h
jz	short loc_73D07E
mov	eax, [ecx]
add	ecx, 4
test	esi, esi
jz	short loc_73D00A
mov	[esi], eax

loc_73D00A:
cmp	eax, 8
jz	short loc_73D02B
cmp	eax, 18h
jz	short loc_73D022
cmp	eax, 20h
jnz	short loc_73D037
mov	dword ptr [ebp+0], 1
jmp	short loc_73D037

loc_73D022:
mov	dword ptr [ebp+0], 2
jmp	short loc_73D037

loc_73D02B:
test	dl, 2
jz	short loc_73D037
mov	dword ptr [ebp+0], 9

loc_73D037:
test	edi, edi
jnz	short loc_73D045
shr	eax, 3
imul	eax, [ebp+4]
mov	[ebp+0Ch], eax

loc_73D045:
mov	eax, [ecx]
add	ecx, 4
test	esi, esi
jz	short loc_73D051
mov	[esi+4], eax

loc_73D051:
mov	eax, [ecx]
add	ecx, 4
test	esi, esi
jz	short loc_73D05D
mov	[esi+8], eax

loc_73D05D:
mov	eax, [ecx]
add	ecx, 4
test	esi, esi
jz	short loc_73D069
mov	[esi+0Ch], eax

loc_73D069:
mov	eax, [ecx]
add	ecx, 4
test	esi, esi
jz	short loc_73D07E
test	dl, 1
jz	short loc_73D07E
mov	[esi+10h], eax
mov	byte ptr [esi+14h], 1

loc_73D07E:
cmp	dword ptr [ebp+0], 0
jnz	short loc_73D08D

loc_73D084:
pop	edi
pop	ebp
xor	al, al
pop	ebx
retn

loc_73D08A:
add	ecx, 20h

loc_73D08D:
mov	eax, [esp+0Ch+arg_4]
test	eax, eax
jz	short loc_73D09A
add	ecx, 14h
mov	[eax], ecx

loc_73D09A:
pop	edi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_73CF30 endp




sub_73D0A0 proc	near
xor	eax, eax
test	ecx, ecx
jnz	short loc_73D0A9
xor	al, al
retn

loc_73D0A9:
test	ecx, offset sub_FFFFFF
jnz	short loc_73D0BB
shr	ecx, 18h
mov	eax, 18h
jmp	short loc_73D0D6

loc_73D0BB:
movzx	edx, cx
test	edx, edx
jnz	short loc_73D0CA
shr	ecx, 10h
lea	eax, [edx+10h]
jmp	short loc_73D0D6

loc_73D0CA:
test	cl, cl
jnz	short loc_73D0D6
shr	ecx, 8
mov	eax, 8

loc_73D0D6:
test	cl, 1
jnz	short locret_73D0E8
jmp	short loc_73D0E0
align 10h

loc_73D0E0:
shr	ecx, 1
inc	eax
test	cl, 1
jz	short loc_73D0E0

locret_73D0E8:
retn
sub_73D0A0 endp

align 10h



sub_73D0F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
cmp	eax, 0Ah
jnz	short loc_73D131
mov	eax, [esp+arg_4]
add	eax, 3
shr	eax, 2
mov	ecx, 1
cmp	eax, 1
jb	short loc_73D10F
mov	ecx, eax

loc_73D10F:
mov	eax, [esp+arg_8]
add	eax, 3
shr	eax, 2
cmp	eax, 1
jnb	short loc_73D123
mov	eax, 1

loc_73D123:
imul	ecx, eax
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
mov	eax, ecx
retn	0Ch

loc_73D131:
lea	ecx, [eax-0Bh]
cmp	ecx, 1
ja	short loc_73D16C
mov	eax, [esp+arg_4]
add	eax, 3
shr	eax, 2
mov	ecx, 1
cmp	eax, 1
jb	short loc_73D14F
mov	ecx, eax

loc_73D14F:
mov	eax, [esp+arg_8]
add	eax, 3
shr	eax, 2
cmp	eax, 1
jnb	short loc_73D163
mov	eax, 1

loc_73D163:
imul	eax, ecx
shl	eax, 4
retn	0Ch

loc_73D16C:
mov	edx, [esp+arg_4]
push	edx
push	eax
call	sub_73CB60
imul	eax, [esp+arg_8]
retn	0Ch
sub_73D0F0 endp

align 10h



sub_73D180 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
sub	esp, 8
push	ebx
mov	ebx, ecx
cmp	eax, [ebx+18h]
jbe	short loc_73D198
xor	eax, eax
pop	ebx
add	esp, 8
retn	10h

loc_73D198:
test	eax, eax
jnz	short loc_73D1CD
mov	eax, [esp+0Ch+arg_4]
test	eax, eax
jz	short loc_73D1A9
mov	ecx, [ebx+4]
mov	[eax], ecx

loc_73D1A9:
mov	eax, [esp+0Ch+arg_8]
test	eax, eax
jz	short loc_73D1B6
mov	edx, [ebx+8]
mov	[eax], edx

loc_73D1B6:
mov	eax, [esp+0Ch+arg_C]
test	eax, eax
jz	short loc_73D1C3
mov	ecx, [ebx+0Ch]
mov	[eax], ecx

loc_73D1C3:
mov	eax, [ebx+10h]
pop	ebx
add	esp, 8
retn	10h

loc_73D1CD:
mov	ecx, [ebx+10h]
mov	edx, [ebx+0Ch]
push	esi
mov	esi, [ebx+4]
push	edi
mov	edi, [ebx+8]
mov	[esp+14h+arg_0], ecx
mov	[esp+14h+var_8], edx
test	eax, eax
jbe	short loc_73D224
push	ebp
mov	ebp, [ebx]
mov	[esp+18h+var_4], eax
mov	edi, edi

loc_73D1F0:
push	edi
push	esi
push	ebp
call	sub_73D0F0
add	[esp+18h+arg_0], eax
shr	esi, 1
cmp	esi, 1
jnb	short loc_73D208
mov	esi, 1

loc_73D208:
shr	edi, 1
cmp	edi, 1
jnb	short loc_73D214
mov	edi, 1

loc_73D214:
shr	[esp+18h+var_8], 1
sub	[esp+18h+var_4], 1
jnz	short loc_73D1F0
mov	ecx, [esp+18h+arg_0]
pop	ebp

loc_73D224:
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_73D22E
mov	[eax], esi

loc_73D22E:
mov	eax, [esp+14h+arg_8]
test	eax, eax
jz	short loc_73D238
mov	[eax], edi

loc_73D238:
mov	eax, [esp+14h+arg_C]
pop	edi
pop	esi
test	eax, eax
jz	short loc_73D248
mov	edx, [esp+0Ch+var_8]
mov	[eax], edx

loc_73D248:
mov	eax, [ebx+14h]
add	eax, [ebx+10h]
pop	ebx
cmp	ecx, eax
sbb	eax, eax
and	eax, ecx
add	esp, 8
retn	10h
sub_73D180 endp

align 10h



sub_73D260 proc	near

var_20=	byte ptr -20h
var_1F=	byte ptr -1Fh
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
push	ebx
mov	ebx, [esp+24h+arg_0]
mov	eax, [ebx+0Ch]
cmp	eax, 0Ah
push	ebp
push	esi
push	edi
jl	short loc_73D27C
cmp	eax, 0Ch
jle	loc_73D438

loc_73D27C:
cmp	eax, 1
jz	short loc_73D28A
cmp	eax, 2
jnz	loc_73D438

loc_73D28A:
mov	esi, [esp+30h+arg_4]
mov	ecx, [esi+4]
call	sub_73D0A0
mov	ecx, [esi+8]
mov	[esp+30h+var_1E], al
call	sub_73D0A0
mov	ecx, [esi+0Ch]
mov	[esp+30h+var_1F], al
call	sub_73D0A0
mov	ecx, [esi+10h]
mov	[esp+30h+var_20], al
call	sub_73D0A0
xor	esi, esi
mov	[esp+30h+var_1D], al
mov	[esp+30h+var_C], esi
cmp	[ebx+24h], esi
jbe	loc_73D438
lea	ecx, [ecx+0]

loc_73D2D0:
lea	eax, [esp+30h+var_4]
push	eax
lea	ecx, [esp+34h+var_8]
push	ecx
lea	edx, [esp+38h+var_14]
push	edx
push	esi
lea	ecx, [ebx+0Ch]
call	sub_73D180
test	eax, eax
jz	loc_73D442
mov	ecx, [esp+30h+var_8]
test	ecx, ecx
jbe	loc_73D42A
lea	esi, [eax+1]
mov	[esp+30h+var_18], esi
mov	[esp+30h+var_10], ecx

loc_73D307:
mov	eax, [ebx+0Ch]
cmp	eax, 2
jnz	short loc_73D37D
mov	eax, [esp+30h+var_14]
lea	eax, [eax+eax*2]
test	eax, eax
jbe	loc_73D413
movzx	ecx, [esp+30h+var_1E]
movzx	ebp, [esp+30h+var_20]
movzx	ebx, [esp+30h+var_1F]
lea	edx, [eax-1]
mov	eax, 0AAAAAAABh
mul	edx
mov	edi, edx
shr	edi, 1
mov	[esp+30h+var_1C], ecx
inc	edi

loc_73D340:
movzx	eax, byte ptr [esi+1]
movzx	ecx, byte ptr [esi]
movzx	edx, byte ptr [esi-1]
shl	eax, 8
or	eax, ecx
shl	eax, 8
or	eax, edx
mov	edx, eax
mov	ecx, ebp
shr	edx, cl
mov	ecx, ebx
add	esi, 3
mov	[esi-2], dl
mov	edx, eax
shr	edx, cl
mov	ecx, [esp+30h+var_1C]
shr	eax, cl
sub	edi, 1
mov	[esi-3], dl
mov	[esi-4], al
jnz	short loc_73D340
jmp	loc_73D40B

loc_73D37D:
cmp	eax, 1
jnz	loc_73D413
mov	edi, [esp+30h+var_14]
add	edi, edi
add	edi, edi
jz	loc_73D413
movzx	eax, [esp+30h+var_1E]
movzx	ebp, [esp+30h+var_20]
movzx	edx, [esp+30h+var_1F]
dec	edi
shr	edi, 2
mov	[esp+30h+var_1C], eax
inc	edi
lea	esp, [esp+0]

loc_73D3B0:
movzx	eax, byte ptr [esi+2]
movzx	ecx, byte ptr [esi+1]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [esi]
shl	eax, 8
or	eax, ecx
movzx	ecx, byte ptr [esi-1]
shl	eax, 8
or	eax, ecx
mov	ecx, ebp
mov	ebx, eax
shr	ebx, cl
mov	ecx, edx
mov	[esi+1], bl
mov	ebx, eax
shr	ebx, cl
mov	ecx, [esp+30h+var_1C]
mov	[esi], bl
mov	ebx, eax
shr	ebx, cl
mov	ecx, [esp+30h+arg_4]
mov	[esi-1], bl
cmp	byte ptr [ecx+14h], 0
jz	short loc_73D3FF
mov	cl, [esp+30h+var_1D]
shr	eax, cl
mov	[esi+2], al
jmp	short loc_73D403

loc_73D3FF:
mov	byte ptr [esi+2], 0FFh

loc_73D403:
add	esi, 4
sub	edi, 1
jnz	short loc_73D3B0

loc_73D40B:
mov	ebx, [esp+30h+arg_0]
mov	esi, [esp+30h+var_18]

loc_73D413:
add	esi, [esp+30h+var_4]
sub	[esp+30h+var_10], 1
mov	[esp+30h+var_18], esi
jnz	loc_73D307
mov	esi, [esp+30h+var_C]

loc_73D42A:
inc	esi
mov	[esp+30h+var_C], esi
cmp	esi, [ebx+24h]
jb	loc_73D2D0

loc_73D438:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 20h
retn

loc_73D442:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 20h
retn
sub_73D260 endp

align 10h



sub_73D450 proc	near
mov	eax, ecx
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax+1Ch]
mov	edx, [edx+30h]
push	eax
call	edx
retn
sub_73D450 endp

align 10h



sub_73D470 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
mov	dword ptr [esi], offset	off_1440B54
test	eax, eax
jz	short loc_73D48E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_73D48E:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+28h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, esi
call	sub_64A460
test	[esp+4+arg_0], 1
jz	short loc_73D4BB
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_73D4BB:
mov	eax, esi
pop	esi
retn	4
sub_73D470 endp

align 10h



sub_73D4D0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], offset	off_155F500
mov	edx, 1
mov	[eax+4], edx
mov	[eax+8], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	dword ptr [eax], offset	off_1440B54
mov	[eax+0Ch], ecx
mov	[eax+18h], ecx
mov	[eax+14h], ecx
mov	[eax+10h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], edx
retn
sub_73D4D0 endp

align 10h



sub_73D510 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jnb	short loc_73D537
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_73D54C
push	edi
push	esi
call	sub_714BE0
mov	[esi+4], edi
pop	edi
pop	esi
retn	4

loc_73D537:
cmp	edi, [esi+8]
jb	short loc_73D54C
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
mov	ecx, esi
push	esi
call	sub_714BE0

loc_73D54C:
mov	[esi+4], edi
pop	edi
pop	esi
retn	4
sub_73D510 endp

align 10h



sub_73D560 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx+4]
mov	esi, ecx
cmp	edi, [esi+4]
jnb	short loc_73D57D
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_73D592
push	edi
jmp	short loc_73D58C

loc_73D57D:
cmp	edi, [esi+8]
jb	short loc_73D592
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
mov	ecx, esi

loc_73D58C:
push	esi
call	sub_714BE0

loc_73D592:
xor	eax, eax
mov	[esi+4], edi
test	edi, edi
jbe	short loc_73D5B0
jmp	short loc_73D5A0
align 10h

loc_73D5A0:
mov	edx, [ebx]
mov	edx, [edx+eax*4]
mov	ecx, [esi]
mov	[ecx+eax*4], edx
inc	eax
cmp	eax, [esi+4]
jb	short loc_73D5A0

loc_73D5B0:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_73D560 endp

align 10h



sub_73D5C0 proc	near
push	esi
push	edi
xor	edi, edi
lea	esi, [ecx+1Ch]
mov	[ecx], edi
mov	[ecx+0Ch], edi
mov	[ecx+8], edi
mov	[ecx+4], edi
mov	[ecx+10h], edi
mov	[ecx+14h], edi
mov	dword ptr [ecx+18h], 1
cmp	[esi+4], edi
jbe	short loc_73D60C
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_73D61A
mov	eax, [esi]
cmp	eax, edi
jz	short loc_73D603
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_73D603:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn

loc_73D60C:
cmp	[esi+8], edi
ja	short loc_73D61A
push	edi
push	esi
mov	ecx, esi
call	sub_714BE0

loc_73D61A:
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_73D5C0 endp




sub_73D620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+10h+arg_4]
mov	dword ptr [esi], offset	off_155F500
xor	ebp, ebp
mov	dword ptr [esi+4], 1
mov	[esi+8], ebp
push	edi
mov	[esi+28h], ebp
mov	[esi+2Ch], ebp
mov	[esi+30h], ebp
push	ebx
mov	dword ptr [esi], offset	off_1440B54
call	sub_73CB60
mov	[esi+18h], eax
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebx
call	sub_73D0F0
mov	[esi+20h], eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	ebp
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
mov	[esi+1Ch], eax
cmp	eax, ebp
jz	short loc_73D6AA
mov	edx, [esi+20h]
mov	ecx, [esp+10h+arg_8]
push	edx		; size_t
push	ebp		; int
push	eax		; void *
mov	[esi+0Ch], ebx
mov	[esi+10h], edi
mov	[esi+14h], ecx
call	_memset
add	esp, 0Ch
pop	edi
mov	eax, esi
mov	dword ptr [esi+24h], 1
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_73D6AA:
lea	ecx, [esi+0Ch]
call	sub_73D5C0
pop	edi
mov	eax, esi
mov	dword ptr [esi+24h], 1
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_73D620 endp

align 10h



sub_73D6D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_C]
test	ecx, ecx
jnz	short loc_73D6DE
mov	ecx, dword_1855FC0

loc_73D6DE:
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	edi
push	0
push	34h
call	edx
mov	edi, [esp+8+arg_8]
mov	esi, [esp+8+arg_4]
test	eax, eax
jz	short loc_73D707
mov	ecx, [esp+8+arg_0]
push	edi
push	esi
push	ecx
mov	ecx, eax
call	sub_73D620
jmp	short loc_73D709

loc_73D707:
xor	eax, eax

loc_73D709:
cmp	dword ptr [eax+1Ch], 0
jz	short loc_73D717
test	esi, esi
jz	short loc_73D717
test	edi, edi
jnz	short loc_73D720

loc_73D717:
mov	ecx, eax
call	sub_64A400
xor	eax, eax

loc_73D720:
pop	edi
pop	esi
retn	10h
sub_73D6D0 endp

align 10h



sub_73D730 proc	near

var_445B= byte ptr -445Bh
var_445A= byte ptr -445Ah
var_4459= byte ptr -4459h
var_4458= byte ptr -4458h
var_4457= byte ptr -4457h
var_4456= byte ptr -4456h
var_4455= byte ptr -4455h
var_4454= byte ptr -4454h
var_4453= byte ptr -4453h
var_4452= byte ptr -4452h
var_4451= byte ptr -4451h
var_4450= word ptr -4450h
var_444C= dword	ptr -444Ch
var_4448= dword	ptr -4448h
var_4444= dword	ptr -4444h
var_4440= dword	ptr -4440h
var_443C= dword	ptr -443Ch
var_4438= dword	ptr -4438h
var_4434= dword	ptr -4434h
var_4430= dword	ptr -4430h
var_442C= dword	ptr -442Ch
var_4428= dword	ptr -4428h
var_4424= dword	ptr -4424h
var_4420= dword	ptr -4420h
var_441C= dword	ptr -441Ch
var_4418= dword	ptr -4418h
var_4414= dword	ptr -4414h
var_4410= dword	ptr -4410h
var_440C= dword	ptr -440Ch
var_4408= byte ptr -4408h
var_4404= dword	ptr -4404h
var_4004= byte ptr -4004h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, 445Ch
call	__alloca_probe
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+445Ch+var_4], eax
mov	eax, [esp+445Ch+arg_8]
push	ebx
push	esi
mov	esi, [esp+4464h+arg_0]
xor	ebx, ebx
mov	[esp+4464h+var_4434], eax
cmp	esi, ebx
jz	loc_73DCEC
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
test	al, al
jz	loc_73DCEC
mov	edx, [esi]
mov	edx, [edx+28h]
push	ebp
push	edi
push	1
lea	eax, [esp+4470h+var_4455]
push	eax
mov	ecx, esi
mov	[esp+4474h+var_4455], bl
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
push	1
lea	ecx, [esp+4470h+var_4459]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4459], bl
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
push	1
lea	ecx, [esp+4470h+var_445A]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_445A], bl
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
mov	edi, 2
push	edi
lea	ecx, [esp+4470h+var_4424]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4424], ebx
call	edx
movzx	eax, word ptr [esp+446Ch+var_4424]
mov	edx, [esi]
mov	edx, [edx+28h]
mov	[esp+446Ch+var_4410], eax
push	edi
lea	eax, [esp+4470h+var_4428]
push	eax
mov	ecx, esi
mov	[esp+4474h+var_4428], ebx
call	edx
movzx	eax, word ptr [esp+446Ch+var_4428]
mov	edx, [esi]
mov	edx, [edx+28h]
mov	[esp+446Ch+var_440C], eax
push	1
lea	eax, [esp+4470h+var_4452]
push	eax
mov	ecx, esi
mov	[esp+4474h+var_4452], bl
call	edx
movzx	ebp, [esp+446Ch+var_4452]
cmp	ebp, ebx
jbe	short loc_73D81D
cmp	ebp, 18h
jz	short loc_73D81D
cmp	ebp, 20h
jnz	loc_73DCC3	; default
			; jumptable 0073D98C cases 2-7,9-98

loc_73D81D:
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
lea	ecx, [esp+4470h+var_4418]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4418], ebx
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
lea	ecx, [esp+4470h+var_4414]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4414], ebx
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
lea	ecx, [esp+4470h+var_4450]
push	ecx
mov	ecx, esi
mov	dword ptr [esp+4474h+var_4450],	ebx
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
push	edi
lea	ecx, [esp+4470h+var_4420]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4420], ebx
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
push	1
lea	ecx, [esp+4470h+var_4458]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4458], bl
call	edx
mov	eax, [esi]
mov	edx, [eax+28h]
push	1
lea	ecx, [esp+4470h+var_4454]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4454], bl
call	edx
mov	al, [esp+446Ch+var_4459]
test	al, al
jnz	short loc_73D8A5
cmp	[esp+446Ch+var_445A], 2
jz	short loc_73D8B7
jmp	loc_73DCC3	; default
			; jumptable 0073D98C cases 2-7,9-98

loc_73D8A5:
cmp	al, 1
jnz	loc_73DCC3	; default
			; jumptable 0073D98C cases 2-7,9-98
cmp	[esp+446Ch+var_445A], al
jnz	loc_73DCC3	; default
			; jumptable 0073D98C cases 2-7,9-98

loc_73D8B7:
mov	al, [esp+446Ch+var_4455]
test	al, al
jbe	short loc_73D8CC
mov	edx, [esi]
mov	edx, [edx+2Ch]
movzx	eax, al
push	eax
mov	ecx, esi
call	edx

loc_73D8CC:
mov	cl, [esp+446Ch+var_4458]
mov	dl, 8
cmp	cl, dl
jz	short loc_73D910
cmp	cl, 18h
jz	short loc_73D8FE
cmp	cl, 20h
jnz	loc_73DCC3	; default
			; jumptable 0073D98C cases 2-7,9-98
movzx	eax, [esp+446Ch+var_4450]
lea	ebx, ds:0[eax*4]
mov	[esp+446Ch+var_4444], 1
mov	[esp+446Ch+var_4448], ebx
jmp	short loc_73D923

loc_73D8FE:
movzx	eax, [esp+446Ch+var_4450]
lea	ebx, [eax+eax*2]
mov	[esp+446Ch+var_4444], edi
mov	[esp+446Ch+var_4448], ebx
jmp	short loc_73D923

loc_73D910:
movzx	eax, [esp+446Ch+var_4450]
mov	[esp+446Ch+var_4444], 64h
mov	[esp+446Ch+var_4448], eax
mov	ebx, eax

loc_73D923:
mov	[esp+446Ch+var_445B], cl
mov	ecx, [esp+446Ch+arg_4]
test	ecx, ecx
jnz	short loc_73D97B
mov	ecx, [esp+446Ch+var_4444]
cmp	ecx, 64h
jnz	short loc_73D96E
cmp	ebp, 20h
jnb	short loc_73D951
mov	[esp+446Ch+arg_4], edi
lea	eax, [eax+eax*2]
mov	[esp+446Ch+var_445B], 18h
jmp	short loc_73D9B0

loc_73D951:
lea	ecx, ds:0[eax*4]
mov	[esp+446Ch+arg_4], 1
mov	[esp+446Ch+var_444C], ecx
mov	[esp+446Ch+var_445B], 20h
jmp	short loc_73D9B4

loc_73D96E:
mov	[esp+446Ch+arg_4], ecx
mov	[esp+446Ch+var_444C], ebx
jmp	short loc_73D9B4

loc_73D97B:
dec	ecx
cmp	ecx, 63h	; switch 100 cases
ja	loc_73DCC3	; default
			; jumptable 0073D98C cases 2-7,9-98
movzx	ecx, ds:byte_73DD00[ecx]
jmp	ds:off_73DCF0[ecx*4] ; switch jump

loc_73D993:		; jumptable 0073D98C cases 8,99
mov	[esp+446Ch+var_445B], dl
jmp	short loc_73D9B0

loc_73D999:		; jumptable 0073D98C case 1
lea	edx, [eax+eax*2]
mov	[esp+446Ch+var_445B], 18h
mov	[esp+446Ch+var_444C], edx
jmp	short loc_73D9B4

loc_73D9A7:		; jumptable 0073D98C case 0
add	eax, eax
mov	[esp+446Ch+var_445B], 20h
add	eax, eax

loc_73D9B0:
mov	[esp+446Ch+var_444C], eax

loc_73D9B4:
cmp	[esp+446Ch+var_4459], 1
jnz	loc_73DA88
cmp	[esp+446Ch+var_445A], 1
jnz	loc_73DA88
mov	eax, [esp+446Ch+var_440C]
lea	ecx, [ebp+7]
shr	ecx, 3
imul	ecx, eax
cmp	ecx, 400h
ja	loc_73DCC3	; default
			; jumptable 0073D98C cases 2-7,9-98
cmp	ebp, 20h
setz	dl
xor	edi, edi
mov	[esp+446Ch+var_4408], dl
test	eax, eax
jbe	loc_73DA88

loc_73D9F7:
mov	eax, [esi]
mov	edx, [eax+28h]
push	1
lea	ecx, [esp+4470h+var_4457]
push	ecx
mov	ecx, esi
mov	[esp+4474h+var_4457], 0
call	edx
movzx	eax, [esp+446Ch+var_4457]
mov	edx, [esi]
mov	edx, [edx+28h]
mov	byte ptr [esp+edi*4+446Ch+var_4404+2], al
push	1
lea	eax, [esp+4470h+var_4453]
push	eax
mov	ecx, esi
mov	[esp+4474h+var_4453], 0
call	edx
movzx	eax, [esp+446Ch+var_4453]
mov	edx, [esi]
mov	edx, [edx+28h]
mov	byte ptr [esp+edi*4+446Ch+var_4404+1], al
push	1
lea	eax, [esp+4470h+var_4451]
push	eax
mov	ecx, esi
mov	[esp+4474h+var_4451], 0
call	edx
movzx	eax, [esp+446Ch+var_4451]
mov	byte ptr [esp+edi*4+446Ch+var_4404], al
cmp	ebp, 20h
jnz	short loc_73DA75
mov	edx, [esi]
mov	edx, [edx+28h]
push	1
lea	eax, [esp+4470h+var_4456]
push	eax
mov	ecx, esi
mov	[esp+4474h+var_4456], 0
call	edx
mov	al, [esp+446Ch+var_4456]
mov	byte ptr [esp+edi*4+446Ch+var_4404+3], al
jmp	short loc_73DA7D

loc_73DA75:
or	[esp+edi*4+446Ch+var_4404], 0FF000000h

loc_73DA7D:
inc	edi
cmp	edi, [esp+446Ch+var_440C]
jb	loc_73D9F7

loc_73DA88:
movzx	edi, word ptr [esp+446Ch+var_4420]
mov	ecx, [esp+446Ch+var_4434]
movzx	eax, [esp+446Ch+var_4450]
mov	edx, [esp+446Ch+arg_4]
push	ecx
push	edi
push	eax
push	edx
mov	[esp+447Ch+var_441C], edi
call	sub_73D6D0
mov	ebp, eax
mov	[esp+446Ch+var_4438], ebp
test	ebp, ebp
jz	loc_73DCE8
cmp	ebx, 4000h
jbe	short loc_73DACE
push	ebx
call	sub_4E4090
mov	edx, eax
mov	[esp+446Ch+var_443C], edx
jmp	short loc_73DADB

loc_73DACE:
lea	eax, [esp+446Ch+var_4004]
mov	[esp+446Ch+var_443C], eax
mov	edx, eax

loc_73DADB:
test	[esp+446Ch+var_4454], 20h
jz	short loc_73DAEA
xor	eax, eax
mov	[esp+446Ch+var_4440], eax
jmp	short loc_73DAF3

loc_73DAEA:
lea	ecx, [edi-1]
mov	[esp+446Ch+var_4440], ecx
mov	eax, ecx

loc_73DAF3:
mov	[esp+446Ch+var_4430], 0
test	edi, edi
jbe	loc_73DC99
mov	ecx, eax
neg	ecx
mov	[esp+446Ch+var_442C], ecx
jmp	short loc_73DB1C
align 10h

loc_73DB10:
mov	ecx, [esp+446Ch+var_442C]
mov	edx, [esp+446Ch+var_443C]
mov	eax, [esp+446Ch+var_4440]

loc_73DB1C:
test	eax, eax
jge	short loc_73DB22
mov	eax, ecx

loc_73DB22:
mov	ebx, [ebp+18h]
imul	ebx, eax
add	ebx, [ebp+1Ch]
mov	eax, [esp+446Ch+arg_4]
mov	[esp+446Ch+var_4434], ebx
mov	edi, ebx
cmp	[esp+446Ch+var_4444], eax
jz	short loc_73DB40
mov	edi, edx

loc_73DB40:
mov	eax, [esp+446Ch+var_4448]
mov	edx, [esi]
mov	edx, [edx+28h]
push	eax
push	edi
mov	ecx, esi
call	edx
cmp	eax, [esp+446Ch+var_4448]
jnz	loc_73DC91
mov	eax, [esp+446Ch+var_4444]
cmp	eax, 1
jnz	short loc_73DB9B
movzx	eax, [esp+446Ch+var_4450]
lea	ecx, ds:0[eax*4]
test	ecx, ecx
jbe	loc_73DC34
dec	ecx
shr	ecx, 2
lea	eax, [edi+2]
inc	ecx
mov	edi, edi

loc_73DB80:
mov	dl, [eax-2]
mov	bl, [eax]
mov	[eax-2], bl
mov	[eax], dl
add	eax, 4
sub	ecx, 1
jnz	short loc_73DB80
mov	ebx, [esp+446Ch+var_4434]
jmp	loc_73DC30

loc_73DB9B:
cmp	eax, 2
jnz	short loc_73DBD8
movzx	eax, [esp+446Ch+var_4450]
lea	eax, [eax+eax*2]
test	eax, eax
jbe	loc_73DC34
lea	edx, [eax-1]
mov	eax, 0AAAAAAABh
mul	edx
shr	edx, 1
lea	ecx, [edi+2]
inc	edx

loc_73DBC0:
mov	al, [ecx-2]
mov	bl, [ecx]
mov	[ecx-2], bl
mov	[ecx], al
add	ecx, 3
sub	edx, 1
jnz	short loc_73DBC0
mov	ebx, [esp+446Ch+var_4434]
jmp	short loc_73DC30

loc_73DBD8:
cmp	[esp+446Ch+arg_4], 64h
jnz	short loc_73DC34
mov	eax, [esp+446Ch+var_440C]
lea	edi, [ebp+28h]
push	eax
mov	ecx, edi
call	sub_73D510
xor	ebp, ebp
cmp	[esp+446Ch+var_440C], ebp
jbe	short loc_73DC30
lea	esp, [esp+0]

loc_73DC00:
mov	eax, [edi]
lea	ecx, ds:0[ebp*4]
movzx	edx, byte ptr [esp+ecx+446Ch+var_4404]
add	eax, ecx
lea	ecx, [esp+ecx+446Ch+var_4404+1]
mov	[eax+2], dl
movzx	edx, byte ptr [ecx]
mov	[eax+1], dl
movzx	edx, byte ptr [ecx+1]
mov	cl, [ecx+2]
inc	ebp
mov	[eax], dl
mov	[eax+3], cl
cmp	ebp, [esp+446Ch+var_440C]
jb	short loc_73DC00

loc_73DC30:
mov	ebp, [esp+446Ch+var_4438]

loc_73DC34:
mov	edx, [esp+446Ch+var_4444]
mov	eax, [esp+446Ch+arg_4]
cmp	edx, eax
jz	short loc_73DC70
mov	edi, [esp+446Ch+var_4448]
lea	ecx, [esp+446Ch+var_4410]
push	ecx
mov	ecx, [esp+4470h+var_444C]
push	ecx
movzx	ecx, [esp+4474h+var_4458]
push	eax
movzx	eax, [esp+4478h+var_445B]
push	ecx
mov	ecx, [esp+447Ch+var_443C]
push	ecx
mov	ecx, ebx
call	sub_73CC80
add	esp, 14h
test	al, al
jz	short loc_73DC91

loc_73DC70:
mov	eax, [esp+446Ch+var_4430]
mov	ecx, 1
sub	[esp+446Ch+var_4440], ecx
add	[esp+446Ch+var_442C], ecx
add	eax, ecx
mov	[esp+446Ch+var_4430], eax
cmp	eax, [esp+446Ch+var_441C]
jb	loc_73DB10

loc_73DC91:
mov	edi, [esp+446Ch+var_441C]
mov	edx, [esp+446Ch+var_443C]

loc_73DC99:
test	edx, edx
jz	short loc_73DCB6
lea	eax, [esp+446Ch+var_4004]
cmp	edx, eax
jz	short loc_73DCB6
mov	ecx, dword_1855FC0
mov	eax, [ecx]
push	edx
mov	edx, [eax+30h]
call	edx

loc_73DCB6:
mov	ecx, ebp
cmp	[esp+446Ch+var_4430], edi
jnb	short loc_73DCE0
call	sub_64A400

loc_73DCC3:		; default
xor	eax, eax	; jumptable 0073D98C cases 2-7,9-98

loc_73DCC5:
pop	edi
pop	ebp

loc_73DCC7:
mov	ecx, [esp+4464h+var_4]
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 445Ch
retn	0Ch

loc_73DCE0:
inc	dword ptr [ebp+4]
call	sub_64A400

loc_73DCE8:
mov	eax, ebp
jmp	short loc_73DCC5

loc_73DCEC:
xor	eax, eax
jmp	short loc_73DCC7
sub_73D730 endp

off_73DCF0 dd offset loc_73D9A7, offset	loc_73D999 ; jump table	for switch statement
dd offset loc_73D993, offset loc_73DCC3
byte_73DD00 db	    0,	   1,	  3,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	2,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     2
align 10h



sub_73DD70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+4]
push	edi
push	edx
call	eax
mov	edi, eax
test	edi, edi
jnz	short loc_73DD8B
pop	edi
retn	0Ch

loc_73DD8B:
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebx
push	esi
mov	ecx, edi
call	eax
test	al, al
jnz	short loc_73DDFD
mov	ecx, [esp+8+arg_C]
mov	edx, [edi]
mov	eax, [edx+14h]
push	ecx
mov	ecx, edi
call	eax
mov	edx, [edi]
push	eax
mov	eax, [edx+18h]
mov	ecx, edi
call	eax
push	eax
push	2
call	sub_73D6D0
mov	esi, eax
test	esi, esi
jz	short loc_73DDFF
xor	ebx, ebx
cmp	[esi+14h], ebx
jbe	short loc_73DDFF

loc_73DDC7:
mov	eax, [esi+18h]
mov	edx, [edi]
imul	eax, ebx
add	eax, [esi+1Ch]
mov	ecx, edi
push	eax
mov	eax, [edx+1Ch]
call	eax
test	eax, eax
jz	short loc_73DDF6
inc	ebx
cmp	ebx, [esi+14h]
jb	short loc_73DDC7
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax
mov	eax, esi
pop	esi
pop	ebx
pop	edi
retn	0Ch

loc_73DDF6:
mov	ecx, esi
call	sub_64A400

loc_73DDFD:
xor	esi, esi

loc_73DDFF:
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax
mov	eax, esi
pop	esi
pop	ebx
pop	edi
retn	0Ch
sub_73DD70 endp

align 10h



sub_73DE20 proc	near

var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= byte ptr -11Ch
var_118= dword ptr -118h
var_114= byte ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= byte ptr -108h
var_104= byte ptr -104h
var_100= byte ptr -100h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14Ch+var_4], eax
mov	eax, [esp+14Ch+arg_4]
push	ebx
push	edi
mov	edi, [esp+154h+arg_0]
xor	ebx, ebx
mov	[esp+154h+var_148], eax
cmp	edi, ebx
jz	loc_73E00B
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
call	eax
test	al, al
jz	loc_73E00B
mov	edx, [edi]
mov	eax, [edx+18h]
push	ebp
mov	ecx, edi
mov	[esp+158h+var_128], ebx
mov	[esp+158h+var_124], ebx
mov	[esp+158h+var_120], ebx
call	eax
mov	edx, [edi]
mov	edx, [edx+28h]
mov	ebp, eax
push	4
lea	eax, [esp+158h+var_148]
push	eax
mov	ecx, edi
mov	[esp+15Ch+var_148], ebx
call	edx
cmp	[esp+154h+var_148], 20534444h
jnz	short loc_73DEB4
mov	eax, [edi]
mov	edx, [eax+28h]
push	4
lea	ecx, [esp+158h+var_148]
push	ecx
mov	ecx, edi
mov	[esp+15Ch+var_148], ebx
call	edx
cmp	[esp+154h+var_148], 7Ch
jz	short loc_73DEC9

loc_73DEB4:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
xor	eax, eax
jmp	loc_73DFC3

loc_73DEC9:
mov	eax, [edi]
mov	edx, [eax+28h]
push	78h
lea	ecx, [esp+158h+var_100]
push	ecx
mov	ecx, edi
call	edx
lea	ecx, [esp+158h+var_144]
cmp	eax, 78h
jz	short loc_73DEEE
call	sub_73D450
xor	eax, eax
jmp	loc_73DFC3

loc_73DEEE:
push	esi
call	sub_73D5C0
lea	eax, [esp+15Ch+var_144]
push	ebx
push	eax
lea	esi, [esp+164h+var_11C]
lea	ecx, [esp+164h+var_104]
mov	[esp+164h+var_10C], ebx
mov	[esp+164h+var_110], ebx
mov	dword ptr [esp+164h+var_114], ebx
mov	[esp+164h+var_118], ebx
mov	dword ptr [esp+164h+var_11C], ebx
mov	[esp+164h+var_108], bl
call	sub_73CF30
add	esp, 8
test	al, al
jz	loc_73DFB7
push	34h
call	sub_7D2BC0
add	esp, 4
cmp	eax, ebx
jz	short loc_73DFB7
mov	ecx, eax
call	sub_73D4D0
mov	esi, eax
cmp	esi, ebx
jz	short loc_73DFB7
mov	ecx, [esp+15Ch+var_144]
mov	edx, [esp+15Ch+var_13C]
mov	eax, [esp+15Ch+var_140]
mov	[esi+0Ch], ecx
mov	ecx, [esp+15Ch+var_138]
mov	[esi+14h], edx
mov	edx, [esp+15Ch+var_12C]
mov	[esi+10h], eax
mov	[esi+18h], ecx
mov	[esi+24h], edx
cmp	[esp+15Ch+var_148], ebx
jnz	short loc_73DF77
mov	eax, dword_1855FC0
mov	[esp+15Ch+var_148], eax

loc_73DF77:
mov	edx, [edi]
mov	eax, [edx+10h]
mov	ecx, edi
call	eax
mov	ecx, [esp+15Ch+var_148]
sub	ebp, eax
push	ebp
push	ecx
call	sub_64A5B0
mov	ebx, eax
test	ebx, ebx
jz	short loc_73DFF5
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebp
push	ebx
mov	ecx, edi
call	eax
cmp	eax, ebp
jz	short loc_73DFDD
mov	ecx, esi
call	sub_64A400
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_73DFB7:
lea	ecx, [esp+15Ch+var_144]
call	sub_73D450
xor	eax, eax

loc_73DFC2:
pop	esi

loc_73DFC3:
pop	ebp

loc_73DFC4:
mov	ecx, [esp+154h+var_4]
pop	edi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14Ch
retn	8

loc_73DFDD:
lea	ecx, [esp+15Ch+var_11C]
push	ecx
push	esi
mov	[esi+1Ch], ebx
mov	[esi+20h], ebp
call	sub_73D260
add	esp, 8
test	al, al
jnz	short loc_73DFFE

loc_73DFF5:
mov	ecx, esi
call	sub_64A400
jmp	short loc_73DFB7

loc_73DFFE:
lea	ecx, [esp+15Ch+var_144]
call	sub_73D450
mov	eax, esi
jmp	short loc_73DFC2

loc_73E00B:
xor	eax, eax
jmp	short loc_73DFC4
sub_73DE20 endp

align 10h



sub_73E010 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
mov	esi, ecx
cmp	[edi+10h], ebx
jz	short loc_73E082
mov	eax, [edi+14h]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	ebx
push	eax
mov	eax, [edx+28h]
call	eax
mov	[esi+1Ch], eax
cmp	eax, ebx
jz	short loc_73E082
mov	ecx, [edi+14h]
mov	[esi+20h], ecx
mov	edx, [edi]
mov	[esi+0Ch], edx
mov	eax, [edi+4]
mov	[esi+10h], eax
mov	ecx, [edi+8]
mov	[esi+14h], ecx
mov	edx, [edi+0Ch]
lea	ecx, [edi+1Ch]
mov	[esi+18h], edx
mov	eax, [edi+18h]
push	ecx
lea	ecx, [esi+28h]
mov	[esi+24h], eax
call	sub_73D560
mov	edx, [edi+14h]
mov	eax, [edi+10h]
mov	ecx, [esi+1Ch]
push	edx
push	eax
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	4

loc_73E082:
mov	[esi+0Ch], ebx
mov	[esi+18h], ebx
mov	[esi+14h], ebx
mov	[esi+10h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	dword ptr [esi+24h], 1
add	esi, 28h
cmp	[esi+4], ebx
jbe	short loc_73E0CE
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_73E0DC
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_73E0C2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_73E0C2:
pop	edi
mov	[esi+8], ebx
mov	[esi+4], ebx
pop	esi
pop	ebx
retn	4

loc_73E0CE:
cmp	[esi+8], ebx
ja	short loc_73E0DC
push	ebx
push	esi
mov	ecx, esi
call	sub_714BE0

loc_73E0DC:
pop	edi
mov	[esi+4], ebx
pop	esi
pop	ebx
retn	4
sub_73E010 endp

align 10h



sub_73E0F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
push	edi
push	eax
mov	edi, ecx
call	sub_67A3D0
mov	esi, [esi+4]
add	edi, 4
push	esi
mov	ecx, edi
call	sub_67A3D0
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
mov	ecx, [esi+10h]
mov	[edi+10h], ecx
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
pop	edi
pop	esi
retn	4
sub_73E0F0 endp

align 10h



sub_73E130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebp
mov	ebp, ecx
mov	edx, [ebp+0]
mov	ecx, eax
shl	ecx, 5
cmp	dword ptr [ecx+edx+8], 0FFFFFFFEh
push	esi
lea	esi, [ecx+edx+8]
push	edi
mov	edi, eax
jz	short loc_73E1A7
cmp	[esi+4], eax
jnz	short loc_73E1A7
push	ebx
mov	ebx, [esp+10h+arg_0]

loc_73E158:
cmp	[esi+4], eax
jnz	short loc_73E17F
mov	eax, [ebx]
mov	eax, [eax]
mov	ecx, [esi+8]
and	eax, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	eax, 8
push	eax		; char *
add	ecx, 8
push	ecx		; char *
call	sub_679A10
test	eax, eax
jz	short loc_73E194
mov	eax, [esp+10h+arg_4]

loc_73E17F:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_73E19D
mov	edx, [ebp+0]
mov	ecx, edi
shl	ecx, 5
lea	esi, [ecx+edx+8]
jmp	short loc_73E158

loc_73E194:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
retn	8

loc_73E19D:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8

loc_73E1A7:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8
sub_73E130 endp




sub_73E1B0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	esi
mov	ebx, ecx
call	sub_67A3D0
add	esi, 4
lea	edi, [ebx+4]
push	esi
mov	ecx, edi
call	sub_67A3D0
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
mov	eax, [esi+10h]
mov	[edi+10h], eax
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
mov	eax, ebx
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebx
retn	4
sub_73E1B0 endp

align 10h



sub_73E1F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [ecx]
push	ebp
mov	ebp, [esp+4+arg_4]
mov	edx, ebp
shl	edx, 5
cmp	dword ptr [edx+ecx+8], 0FFFFFFFEh
push	esi
lea	esi, [edx+ecx+8]
mov	eax, ebp
mov	[esp+8+arg_4], ecx
jz	short loc_73E281
cmp	[esi+4], ebp
jnz	short loc_73E281
push	edi
mov	edi, [esp+0Ch+arg_0]
push	ebx
lea	esp, [esp+0]

loc_73E220:
cmp	[esi+4], ebp
jnz	short loc_73E265
mov	ecx, [edi]
mov	edx, [ecx]
mov	ecx, [esi+8]
and	edx, 0FFFFFFFCh
and	ecx, 0FFFFFFFCh
add	edx, 8
add	ecx, 8

loc_73E238:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_73E258
test	bl, bl
jz	short loc_73E254
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_73E258
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_73E238

loc_73E254:
xor	ecx, ecx
jmp	short loc_73E25D

loc_73E258:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_73E25D:
test	ecx, ecx
jz	short loc_73E27A
mov	ecx, [esp+10h+arg_4]

loc_73E265:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_73E277
mov	edx, eax
shl	edx, 5
lea	esi, [edx+ecx+8]
jmp	short loc_73E220

loc_73E277:
or	eax, 0FFFFFFFFh

loc_73E27A:
pop	ebx
pop	edi
pop	esi
pop	ebp
retn	8

loc_73E281:
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8
sub_73E1F0 endp

align 10h



sub_73E290 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, ecx
mov	ecx, [eax]
push	esi
push	edi
mov	[ebx], ecx
mov	edx, [eax+4]
lea	esi, [eax+8]
lea	edi, [ebx+8]
push	esi
mov	ecx, edi
mov	[ebx+4], edx
call	sub_67ABE0
add	esi, 4
add	edi, 4
push	esi
mov	ecx, edi
call	sub_67AF90
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
mov	eax, [esi+10h]
mov	[edi+10h], eax
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	4
sub_73E290 endp

align 10h



sub_73E2E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	[ebx], eax
mov	ecx, [esi]
lea	edi, [ebx+8]
push	ecx
mov	ecx, edi
call	sub_67ABE0
mov	esi, [esi+4]
add	edi, 4
push	esi
mov	ecx, edi
call	sub_67AF90
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
mov	eax, ebx
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
mov	edx, [esi+10h]
mov	[edi+10h], edx
pop	edi
pop	esi
pop	ebx
retn	8
sub_73E2E0 endp

align 10h



sub_73E330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, ecx
push	edi
lea	edi, [ebx+8]
push	esi
mov	ecx, edi
mov	[ebx], eax
call	sub_67ABE0
add	esi, 4
add	edi, 4
push	esi
mov	ecx, edi
call	sub_67AF90
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
mov	eax, ebx
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
mov	ecx, [esi+10h]
mov	[edi+10h], ecx
pop	edi
pop	esi
pop	ebx
retn	8
sub_73E330 endp

align 10h



sub_73E380 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
jz	short loc_73E3D2
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	eax, [eax]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esi]
mov	ecx, [edx+4]
and	ecx, eax
push	ecx
push	edi
mov	ecx, esi
call	sub_73E130
pop	edi
test	eax, eax
jl	short loc_73E3D2
mov	ecx, [esi]
shl	eax, 5
lea	eax, [eax+ecx+10h]
pop	esi
retn	4

loc_73E3D2:
xor	eax, eax
pop	esi
retn	4
sub_73E380 endp

align 10h



sub_73E3E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_73E3F1
xor	al, al
pop	esi
pop	ecx
retn	8

loc_73E3F1:
mov	eax, [esp+8+arg_4]
push	eax
lea	ecx, [esp+0Ch+arg_4]
call	sub_67AE10
mov	ecx, [esi+0Ch]
lea	eax, [esp+8+var_4]
lea	edx, [esp+8+arg_4]
push	eax
mov	[esp+0Ch+var_4], edx
call	sub_73E380
test	eax, eax
jz	short loc_73E41D
lea	esi, [eax+4]
jmp	short loc_73E41F

loc_73E41D:
xor	esi, esi

loc_73E41F:
push	edi
mov	edi, [esp+0Ch+arg_4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73E446
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_73E446:
test	esi, esi
jz	short loc_73E476
mov	edi, [esp+0Ch+arg_0]
push	esi
mov	ecx, edi
call	sub_67A3D0
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
mov	ecx, [esi+10h]
mov	[edi+10h], ecx
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
mov	al, 1
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ecx
retn	8

loc_73E476:
pop	edi
xor	al, al
pop	esi
pop	ecx
retn	8
sub_73E3E0 endp

align 10h



sub_73E480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	[esp+0Ch+var_4], esi
test	eax, eax
jz	loc_73E52C
mov	eax, [eax+4]
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	ebp
xor	ebp, ebp
inc	eax
push	edi
mov	[esp+18h+var_8], eax
jmp	short loc_73E4B0
align 10h

loc_73E4B0:
mov	eax, [esi]
cmp	dword ptr [eax+ebp+8], 0FFFFFFFEh
lea	edi, [eax+ebp+8]
jz	short loc_73E509
mov	esi, [edi+0Ch]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73E4DE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73E4DE:
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73E4FF
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73E4FF:
mov	esi, [esp+18h+var_4]
mov	dword ptr [edi], 0FFFFFFFEh

loc_73E509:
add	ebp, 20h
sub	[esp+18h+var_8], 1
jnz	short loc_73E4B0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	ebp
mov	dword ptr [esi], 0
pop	ebx

loc_73E52C:
pop	esi
add	esp, 8
retn
sub_73E480 endp

align 10h



sub_73E540 proc	near

var_10=	dword ptr -10h
var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
push	edi
xor	ebx, ebx
mov	edi, ecx
mov	[esp+18h+var_4], edi
cmp	eax, ebx
jnz	short loc_73E562
call	sub_73E480
pop	edi
pop	ebx
add	esp, 10h
retn	8

loc_73E562:
push	esi
cmp	eax, 8
jnb	short loc_73E56F
mov	esi, 8
jmp	short loc_73E5D4

loc_73E56F:
dec	eax
mov	[esp+1Ch+arg_4], eax
fild	[esp+1Ch+arg_4]
test	eax, eax
jge	short loc_73E582
fadd	ds:flt_15FCC08

loc_73E582:
call	__CIlog
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+1Ch+arg_4]
fld	[esp+1Ch+arg_4]
fnstcw	word ptr [esp+1Ch+arg_4]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_C], eax
fldcw	word ptr [esp+1Ch+var_C]
fistp	[esp+1Ch+var_C]
mov	cl, byte ptr [esp+1Ch+var_C]
shl	esi, cl
fldcw	word ptr [esp+1Ch+arg_4]

loc_73E5D4:
mov	ecx, dword_1855FC0
lea	edx, [esp+1Ch+var_C]
push	edx
mov	edx, esi
shl	edx, 5
add	edx, 8
push	edx
mov	edx, [esp+24h+arg_0]
mov	[esp+24h+arg_4], ebx
mov	dword ptr [esp+24h+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+1Ch+arg_4], eax
mov	[eax], ebx
mov	edx, [esp+1Ch+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, ebx
jbe	short loc_73E634
xor	eax, eax
jmp	short loc_73E620
align 10h

loc_73E620:
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 20h
sub	esi, 1
jnz	short loc_73E620

loc_73E634:
mov	eax, [edi]
cmp	eax, ebx
jz	loc_73E709
mov	eax, [eax+4]
inc	eax
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
mov	[esp+20h+var_10], ebx
mov	dword ptr [esp+20h+var_C], eax

loc_73E651:
mov	edx, [edi]
cmp	dword ptr [ebx+edx+8], 0FFFFFFFEh
lea	ebx, [ebx+edx+8]
jz	loc_73E6E2
mov	eax, [ebx+8]
lea	esi, [ebx+8]
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	edx, [esp+20h+arg_0]
push	eax
push	esi
push	edx
lea	ecx, [esp+2Ch+arg_4]
call	sub_73E730
mov	edi, [esi+4]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73E6B8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_73E6B8:
mov	esi, [esi]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73E6D8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73E6D8:
mov	edi, [esp+20h+var_4]
mov	dword ptr [ebx], 0FFFFFFFEh

loc_73E6E2:
mov	ebx, [esp+20h+var_10]
add	ebx, 20h
sub	dword ptr [esp+20h+var_C], 1
mov	[esp+20h+var_10], ebx
jnz	loc_73E651
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebp

loc_73E709:
mov	eax, [esp+1Ch+arg_4]
lea	ecx, [esp+1Ch+arg_4]
mov	[edi], eax
mov	[esp+1Ch+arg_4], 0
call	sub_73E480
pop	esi
pop	edi
pop	ebx
add	esp, 10h
retn	8
sub_73E540 endp

align 10h



sub_73E730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_73E743
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_73E765

loc_73E743:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_73E76A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_73E765:
call	sub_73E540

loc_73E76A:
mov	eax, [edi]
mov	esi, [esp+8+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
mov	edx, esi
shl	edx, 5
lea	edi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[edi], edx
jnz	short loc_73E79F
mov	eax, [esp+8+arg_4]
push	0FFFFFFFFh
push	eax
mov	ecx, edi
call	sub_73E330
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_73E79F:
mov	ecx, [eax+4]
push	ebx
mov	ebx, esi
push	ebp

loc_73E7A6:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 5
cmp	[eax+ebp+8], edx
jnz	short loc_73E7A6
mov	edx, [edi+4]
mov	ecx, ebx
shl	ecx, 5
lea	ecx, [ecx+eax+8]
cmp	edx, esi
jnz	short loc_73E7E7
test	ecx, ecx
jz	short loc_73E7CE
push	edi
call	sub_73E290

loc_73E7CE:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [edi+8]
call	sub_73E1B0
pop	ebp
mov	[edi], ebx
pop	ebx
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_73E7E7:
shl	edx, 5
cmp	[edx+eax+8], esi
lea	ebp, [edx+eax+8]
jz	short loc_73E804

loc_73E7F4:
mov	edx, [ebp+0]
shl	edx, 5
cmp	[edx+eax+8], esi
lea	ebp, [edx+eax+8]
jnz	short loc_73E7F4

loc_73E804:
test	ecx, ecx
jz	short loc_73E80E
push	edi
call	sub_73E290

loc_73E80E:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [edi+8]
mov	[ebp+0], ebx
call	sub_73E1B0
pop	ebp
pop	ebx
mov	[edi+4], esi
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
retn	0Ch
sub_73E730 endp

align 10h



sub_73E830 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_73E843
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_73E865

loc_73E843:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_73E86A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_73E865:
call	sub_73E540

loc_73E86A:
mov	eax, [edi]
mov	esi, [esp+8+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
mov	edx, esi
shl	edx, 5
lea	edi, [edx+eax+8]
mov	edx, 0FFFFFFFEh
cmp	[edi], edx
jnz	short loc_73E89F
mov	eax, [esp+8+arg_4]
push	0FFFFFFFFh
push	eax
mov	ecx, edi
call	sub_73E2E0
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_73E89F:
mov	ecx, [eax+4]
push	ebx
mov	ebx, esi
push	ebp

loc_73E8A6:
inc	ebx
and	ebx, ecx
mov	ebp, ebx
shl	ebp, 5
cmp	[eax+ebp+8], edx
jnz	short loc_73E8A6
mov	edx, [edi+4]
mov	ecx, ebx
shl	ecx, 5
lea	ecx, [ecx+eax+8]
cmp	edx, esi
jnz	short loc_73E8E7
test	ecx, ecx
jz	short loc_73E8CE
push	edi
call	sub_73E290

loc_73E8CE:
mov	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [edi+8]
call	sub_73E0F0
pop	ebp
mov	[edi], ebx
pop	ebx
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_73E8E7:
shl	edx, 5
cmp	[edx+eax+8], esi
lea	ebp, [edx+eax+8]
jz	short loc_73E904

loc_73E8F4:
mov	edx, [ebp+0]
shl	edx, 5
cmp	[edx+eax+8], esi
lea	ebp, [edx+eax+8]
jnz	short loc_73E8F4

loc_73E904:
test	ecx, ecx
jz	short loc_73E90E
push	edi
call	sub_73E290

loc_73E90E:
mov	eax, [esp+10h+arg_4]
push	eax
lea	ecx, [edi+8]
mov	[ebp+0], ebx
call	sub_73E0F0
pop	ebp
pop	ebx
mov	[edi+4], esi
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
retn	0Ch
sub_73E830 endp

align 10h



sub_73E930 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	eax, [edi]
mov	eax, [eax]
mov	ebx, ecx
mov	ecx, eax
and	ecx, 0FFFFFFFCh
mov	ecx, [ecx]
push	1505h
and	ecx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	ecx
add	eax, 8
push	eax
call	sub_679B00
mov	esi, [ebx]
mov	ebp, eax
test	esi, esi
jz	short loc_73E9B5
mov	edx, [esi+4]
and	edx, ebp
push	edx
push	edi
mov	ecx, ebx
call	sub_73E1F0
test	eax, eax
jl	short loc_73E9B5
shl	eax, 5
lea	ebx, [eax+esi+10h]
mov	eax, [edi]
push	eax
mov	ecx, ebx
call	sub_67A3D0
mov	esi, [edi+4]
lea	edi, [ebx+4]
push	esi
mov	ecx, edi
call	sub_67A3D0
fld	dword ptr [esi+4]
fstp	dword ptr [edi+4]
mov	ecx, [esi+10h]
mov	[edi+10h], ecx
fld	dword ptr [esi+8]
fstp	dword ptr [edi+8]
fld	dword ptr [esi+0Ch]
fstp	dword ptr [edi+0Ch]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_73E9B5:
mov	edx, [esp+10h+arg_0]
push	ebp
push	edi
push	edx
mov	ecx, ebx
call	sub_73E830
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_73E930 endp

align 10h



sub_73E9D0 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 15h
mov	dword ptr [esi], offset	off_1440B58
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	4
call	edx
test	eax, eax
jz	short loc_73EA0F
mov	dword ptr [eax], 0
mov	[esi+0Ch], eax
mov	eax, esi
pop	esi
retn

loc_73EA0F:
xor	eax, eax
mov	[esi+0Ch], eax
mov	eax, esi
pop	esi
retn
sub_73E9D0 endp

align 10h



; int __stdcall	sub_73EA20(int,	int, int, float, float,	float)
sub_73EA20 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 1Ch
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+0Ch], 0
jz	loc_73EB67
mov	eax, [esp+20h+arg_0]
test	eax, eax
jz	loc_73EB67
push	esi
push	eax
lea	ecx, [esp+28h+arg_0]
call	sub_67AE10
mov	ecx, [ebx+0Ch]
lea	edx, [esp+24h+var_1C]
lea	eax, [esp+24h+arg_0]
push	edx
mov	[esp+28h+var_1C], eax
call	sub_73E380
test	eax, eax
jz	short loc_73EA95
add	eax, 4
jz	short loc_73EA95
mov	esi, [esp+24h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73EA8B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73EA8B:
pop	esi
xor	al, al
pop	ebx
add	esp, 1Ch
retn	18h

loc_73EA95:
mov	ecx, [esp+24h+arg_4]
push	edi
push	ecx
lea	ecx, [esp+2Ch+arg_4]
call	sub_67AE10
lea	edx, [esp+28h+arg_4]
push	edx
lea	ecx, [esp+2Ch+var_14]
call	sub_67AF90
fld	[esp+28h+arg_C]
mov	esi, [esp+28h+arg_4]
fstp	[esp+28h+var_10]
fld	[esp+28h+arg_10]
mov	eax, [esp+28h+arg_8]
mov	edi, ds:InterlockedExchangeAdd
fstp	[esp+28h+var_C]
fld	[esp+28h+arg_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
fstp	[esp+2Ch+var_8]
lea	ecx, [esi+4]
push	ecx		; Addend
mov	[esp+30h+var_4], eax
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73EAFA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73EAFA:
mov	ecx, [ebx+0Ch]
lea	edx, [esp+28h+arg_0]
mov	[esp+28h+var_1C], edx
lea	edx, [esp+28h+var_1C]
push	edx
lea	eax, [esp+2Ch+var_14]
push	ecx
mov	[esp+30h+var_18], eax
call	sub_73E930
mov	esi, [esp+28h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73EB3A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73EB3A:
mov	esi, [esp+28h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
pop	edi
jnz	short loc_73EB5D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73EB5D:
pop	esi
mov	al, 1
pop	ebx
add	esp, 1Ch
retn	18h

loc_73EB67:
xor	al, al
pop	ebx
add	esp, 1Ch
retn	18h
sub_73EA20 endp




; int __stdcall	sub_73EB70(int,	int, int, float, float,	float)
sub_73EB70 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 1Ch
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+0Ch], 0
jz	loc_73ECB3
mov	eax, [esp+20h+arg_0]
test	eax, eax
jz	loc_73ECB3
push	esi
push	eax
lea	ecx, [esp+28h+arg_0]
call	sub_67B040
mov	ecx, [ebx+0Ch]
lea	edx, [esp+24h+var_1C]
lea	eax, [esp+24h+arg_0]
push	edx
mov	[esp+28h+var_1C], eax
call	sub_73E380
test	eax, eax
jz	short loc_73EBE5
add	eax, 4
jz	short loc_73EBE5
mov	esi, [esp+24h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73EBDB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73EBDB:
pop	esi
xor	al, al
pop	ebx
add	esp, 1Ch
retn	18h

loc_73EBE5:
mov	ecx, [esp+24h+arg_4]
push	edi
push	ecx
lea	ecx, [esp+2Ch+arg_4]
call	sub_67B040
push	eax
lea	ecx, [esp+2Ch+var_14]
call	sub_67AF90
fld	[esp+28h+arg_C]
mov	esi, [esp+28h+arg_4]
fstp	[esp+28h+var_10]
fld	[esp+28h+arg_10]
mov	edx, [esp+28h+arg_8]
mov	edi, ds:InterlockedExchangeAdd
fstp	[esp+28h+var_C]
fld	[esp+28h+arg_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
fstp	[esp+2Ch+var_8]
lea	eax, [esi+4]
push	eax		; Addend
mov	[esp+30h+var_4], edx
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73EC46
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73EC46:
mov	ecx, [ebx+0Ch]
lea	edx, [esp+28h+arg_0]
mov	[esp+28h+var_1C], edx
lea	edx, [esp+28h+var_1C]
push	edx
lea	eax, [esp+2Ch+var_14]
push	ecx
mov	[esp+30h+var_18], eax
call	sub_73E930
mov	esi, [esp+28h+var_14]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_73EC86
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73EC86:
mov	esi, [esp+28h+arg_0]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	edi ; InterlockedExchangeAdd
sub	eax, 1
pop	edi
jnz	short loc_73ECA9
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_73ECA9:
pop	esi
mov	al, 1
pop	ebx
add	esp, 1Ch
retn	18h

loc_73ECB3:
xor	al, al
pop	ebx
add	esp, 1Ch
retn	18h
sub_73EB70 endp

align 10h



sub_73ECC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+0Ch]
mov	dword ptr [esi], offset	off_1440B58
test	edi, edi
jz	short loc_73ECE6
mov	ecx, edi
call	sub_73E480
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_73ECE6:
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_73ED08
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_73ED08:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_73ECC0 endp

align 10h



sub_73ED10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax+14h]
sub	ecx, [esp+arg_4]
mov	eax, 0
sets	al
retn
sub_73ED10 endp

align 10h



sub_73ED30 proc	near
mov	eax, [ecx+4]
cmp	eax, [ecx+8]
sbb	eax, eax
inc	eax
retn
sub_73ED30 endp

align 10h



sub_73ED40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
sub	ebx, ebp
test	ebx, ebx
jle	short loc_73ED8C
push	esi
push	edi

loc_73ED52:
mov	ecx, [esp+10h+arg_0]
mov	edx, [ecx]
mov	ecx, [esp+10h+arg_C]
mov	esi, ebx
sar	esi, 1
lea	edi, [esi+ebp]
lea	eax, [edi+edi*4]
lea	eax, [edx+eax*8]
mov	edx, [ecx]
push	edx
push	eax
call	[esp+18h+arg_10]
add	esp, 8
test	eax, eax
jz	short loc_73ED84
or	eax, 0FFFFFFFFh
sub	eax, esi
lea	ebp, [edi+1]
add	ebx, eax
jmp	short loc_73ED86

loc_73ED84:
mov	ebx, esi

loc_73ED86:
test	ebx, ebx
jg	short loc_73ED52
pop	edi
pop	esi

loc_73ED8C:
mov	eax, ebp
pop	ebp
pop	ebx
retn
sub_73ED40 endp

align 10h



sub_73EDA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
mov	[esi+14h], edi
mov	[esi+10h], edi
cmp	eax, edi
jz	short loc_73EDC6
mov	ecx, [eax+30h]
mov	[esi+10h], ecx
lea	ecx, [eax+14h]
call	sub_725AB0
mov	[esi+14h], eax

loc_73EDC6:
mov	eax, [esi+4]
mov	byte ptr [esi+18h], 0
mov	byte ptr [esi+19h], 0
cmp	eax, edi
jbe	short loc_73EE36
push	ebx
mov	[esp+10h+arg_0], edi
mov	[esp+10h+var_4], eax
push	ebp
nop

loc_73EDE0:
mov	eax, [esi]
add	eax, [esp+14h+arg_0]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	[eax+0Ch], ecx
mov	[eax+10h], edx
mov	edi, [esi+14h]
test	edi, edi
jbe	short loc_73EE28
mov	ebx, [esi+10h]
test	edx, edx
jbe	short loc_73EE1F
cmp	ecx, ebx
ja	short loc_73EE23
lea	ebp, [edx+ecx]
cmp	ebx, ebp
jnb	short loc_73EE1F
mov	ebx, [eax+8]
test	ebx, ebx
jl	short loc_73EE18
add	ebx, ecx
mov	[eax+0Ch], ebx
jmp	short loc_73EE28

loc_73EE18:
add	edi, edx
mov	[eax+10h], edi
jmp	short loc_73EE28

loc_73EE1F:
cmp	ecx, ebx
jbe	short loc_73EE28

loc_73EE23:
add	edi, ecx
mov	[eax+0Ch], edi

loc_73EE28:
add	[esp+14h+arg_0], 28h
sub	[esp+14h+var_4], 1
jnz	short loc_73EDE0
pop	ebp
pop	ebx

loc_73EE36:
pop	edi
pop	esi
pop	ecx
retn	4
sub_73EDA0 endp

align 10h



sub_73EE40 proc	near
cmp	byte ptr [ecx+19h], 0
jnz	short loc_73EE7D
push	esi
mov	esi, [ecx+4]
xor	eax, eax
mov	byte ptr [ecx+19h], 0FFh
test	esi, esi
jbe	short loc_73EE7C
mov	edx, [ecx]
add	edx, 24h
lea	esp, [esp+0]

loc_73EE60:
test	byte ptr [edx],	7
jnz	short loc_73EE78
inc	eax
add	edx, 28h
cmp	eax, esi
jb	short loc_73EE60
xor	eax, eax
cmp	byte ptr [ecx+19h], 1
pop	esi
setz	al
retn

loc_73EE78:
mov	byte ptr [ecx+19h], 1

loc_73EE7C:
pop	esi

loc_73EE7D:
xor	eax, eax
cmp	byte ptr [ecx+19h], 1
setz	al
retn
sub_73EE40 endp

align 10h



sub_73EE90 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+4]
push	ebx
xor	ebx, ebx
cmp	edx, ebx
jbe	short loc_73EEB6
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
xor	eax, eax

loc_73EEA3:
mov	edi, [ecx]
mov	ebp, [esi]
mov	[eax+edi+18h], ebp
add	eax, 28h
sub	edx, 1
jnz	short loc_73EEA3
pop	edi
pop	esi
pop	ebp

loc_73EEB6:
mov	[ecx+19h], bl
mov	[ecx+18h], bl
pop	ebx
retn	4
sub_73EE90 endp




sub_73EEC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [ecx+4]
xor	edx, edx
test	edi, edi
jbe	short loc_73EEF6
mov	ecx, [ecx]
mov	ebx, [esp+10h+arg_4]
mov	esi, [esp+10h+arg_0]

loc_73EED7:
mov	eax, [ecx]
cmp	eax, esi
ja	short loc_73EEEA
mov	ebp, [ecx+4]
add	ebp, eax
cmp	esi, ebp
jb	short loc_73EEFF
cmp	eax, esi
jb	short loc_73EEEE

loc_73EEEA:
cmp	eax, ebx
jb	short loc_73EEFF

loc_73EEEE:
inc	edx
add	ecx, 28h
cmp	edx, edi
jb	short loc_73EED7

loc_73EEF6:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	8

loc_73EEFF:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	8
sub_73EEC0 endp

align 10h



sub_73EF10 proc	near
mov	eax, [ecx]
mov	edx, [ecx+8]
cmp	edx, [eax+4]
jnb	short loc_73EF23
cmp	dword ptr [ecx+1Ch], 0
jz	short loc_73EF23
xor	eax, eax
retn

loc_73EF23:
mov	eax, 1
retn
sub_73EF10 endp

align 10h



sub_73EF30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	offset sub_73ED10
lea	ecx, [esp+8+arg_0]
push	ecx
push	eax
push	0
push	esi
call	sub_73ED40
add	esp, 14h
cmp	eax, [esi+4]
jnb	short loc_73EF63
lea	edx, [eax+eax*4]
mov	eax, [esi]
mov	ecx, [eax+edx*8+14h]
lea	eax, [eax+edx*8]
cmp	ecx, [esp+4+arg_0]
jz	short loc_73EF65

loc_73EF63:
xor	eax, eax

loc_73EF65:
pop	esi
retn	4
sub_73EF30 endp

align 10h



sub_73EF70 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4

sub	esp, 3Ch
push	ebx
push	ebp
push	esi
xor	esi, esi
or	eax, 0FFFFFFFFh
xor	ebx, ebx
push	edi
mov	edi, ecx
mov	[esp+4Ch+var_28], eax
mov	[esp+4Ch+var_24], ebx
mov	[esp+4Ch+var_20], eax
xor	ebp, ebp
mov	[esp+4Ch+var_14], esi
mov	[esp+4Ch+var_8], esi
mov	[esp+4Ch+var_C], esi
mov	[esp+4Ch+var_10], esi
mov	[esp+4Ch+var_4], bl

loc_73EFA2:
mov	eax, [edi]
mov	edx, [eax+4]
or	ecx, 0FFFFFFFFh
mov	[esp+4Ch+var_3C], ecx
test	edx, edx
jbe	loc_73F105
mov	eax, [eax]
mov	[esp+4Ch+var_38], eax
add	eax, 24h
mov	[esp+4Ch+var_34], edx

loc_73EFC3:
movzx	edx, byte ptr [eax]
and	edx, [edi+34h]
mov	[esp+4Ch+var_30], edx
jz	loc_73F0EE
cmp	dword ptr [eax-14h], 0
mov	ebx, [edi+4]
jbe	loc_73F0CB
mov	edx, [eax-18h]
cmp	ebx, edx
jb	loc_73F0CB
mov	ecx, [eax-14h]
add	ecx, edx
mov	[esp+4Ch+var_2C], ecx
cmp	ebx, ecx
jnb	loc_73F0C7
cmp	[esp+4Ch+var_24], 0
jnz	short loc_73F05E
mov	ecx, [esp+4Ch+var_38]
mov	ecx, [ecx]
mov	esi, [eax-14h]
mov	[esp+4Ch+var_28], ecx
mov	ecx, [eax-20h]
mov	[esp+4Ch+var_24], ecx
mov	ecx, [eax-1Ch]
mov	[esp+4Ch+var_20], ecx
mov	ecx, [eax-10h]
mov	[esp+4Ch+var_14], ecx
mov	ecx, [eax-0Ch]
mov	[esp+4Ch+var_10], ecx
mov	ecx, [eax-8]
mov	[esp+4Ch+var_C], ecx
mov	ecx, [eax-4]
sub	edx, ebx
mov	[esp+4Ch+var_8], ecx
mov	cl, [eax]
add	esi, edx
mov	ebp, ebx
mov	[esp+4Ch+var_4], cl
mov	ecx, [esp+4Ch+var_3C]
lea	edx, [esi+ebp]
cmp	edx, ecx
jbe	short loc_73F0CB
mov	esi, ecx
sub	esi, ebp
lea	ecx, [esi+ebp]
mov	[esp+4Ch+var_3C], ecx
jmp	short loc_73F0CB

loc_73F05E:
mov	ecx, [edi+34h]
cmp	[esp+4Ch+var_30], ecx
jz	short loc_73F0C7
mov	dl, [eax]
and	dl, 7
jz	short loc_73F07B
mov	cl, [esp+4Ch+var_4]
and	cl, 0F8h
or	cl, dl
mov	[esp+4Ch+var_4], cl

loc_73F07B:
mov	dl, [eax]
test	dl, 8
jz	short loc_73F08E
mov	ecx, [eax-0Ch]
or	[esp+4Ch+var_4], 8
mov	[esp+4Ch+var_10], ecx

loc_73F08E:
test	dl, 10h
jz	short loc_73F09F
mov	ecx, [eax-8]
or	[esp+4Ch+var_4], 10h
mov	[esp+4Ch+var_C], ecx

loc_73F09F:
test	dl, 20h
jz	short loc_73F0B0
mov	edx, [eax-4]
or	[esp+4Ch+var_4], 20h
mov	[esp+4Ch+var_8], edx

loc_73F0B0:
mov	ecx, [esp+4Ch+var_2C]
add	esi, ebp
cmp	ecx, esi
jnb	short loc_73F0BC
mov	esi, ecx

loc_73F0BC:
sub	esi, ebp
lea	ecx, [esi+ebp]
mov	[esp+4Ch+var_3C], ecx
jmp	short loc_73F0CB

loc_73F0C7:
mov	ecx, [esp+4Ch+var_3C]

loc_73F0CB:
mov	edx, [eax-18h]
cmp	edx, ebx
jbe	short loc_73F0EE
cmp	ecx, edx
jb	short loc_73F0DC
mov	ecx, edx
mov	[esp+4Ch+var_3C], ecx

loc_73F0DC:
cmp	[esp+4Ch+var_24], 0
jz	short loc_73F0EE
lea	edx, [esi+ebp]
cmp	edx, ecx
jbe	short loc_73F0EE
mov	esi, ecx
sub	esi, ebp

loc_73F0EE:
add	[esp+4Ch+var_38], 28h
add	eax, 28h
sub	[esp+4Ch+var_34], 1
jnz	loc_73EFC3
mov	ebx, [esp+4Ch+var_24]

loc_73F105:
mov	eax, [esp+4Ch+var_28]
mov	edx, [esp+4Ch+var_20]
mov	[edi+0Ch], eax
mov	eax, [esp+4Ch+var_14]
mov	[edi+14h], edx
mov	edx, [esp+4Ch+var_10]
mov	[edi+20h], eax
mov	eax, [esp+4Ch+var_C]
mov	[edi+10h], ebx
mov	[edi+18h], ebp
mov	[edi+1Ch], esi
mov	[edi+24h], edx
mov	edx, [esp+4Ch+var_8]
mov	[edi+28h], eax
mov	al, [esp+4Ch+var_4]
mov	[edi+2Ch], edx
mov	[edi+30h], al
mov	[edi+4], ecx
test	ebx, ebx
jnz	short loc_73F14F
cmp	ecx, 0FFFFFFFFh
jnz	loc_73EFA2

loc_73F14F:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn
sub_73EF70 endp

align 10h



sub_73F160 proc	near

arg_0= dword ptr  4

mov	edx, [ecx+0Ch]
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	edx, [ecx+10h]
mov	[eax+4], edx
mov	edx, [ecx+14h]
mov	[eax+8], edx
mov	edx, [ecx+18h]
mov	[eax+0Ch], edx
mov	edx, [ecx+1Ch]
mov	[eax+10h], edx
mov	edx, [ecx+20h]
mov	[eax+14h], edx
mov	edx, [ecx+24h]
mov	[eax+18h], edx
mov	edx, [ecx+28h]
mov	[eax+1Ch], edx
mov	edx, [ecx+2Ch]
mov	[eax+20h], edx
mov	cl, [ecx+30h]
mov	[eax+24h], cl
retn	4
sub_73F160 endp

align 10h



sub_73F1B0 proc	near
mov	eax, [ecx]
mov	edx, [ecx+8]
cmp	edx, [eax+4]
jnb	short locret_73F1C5
cmp	dword ptr [ecx+1Ch], 0
jz	short locret_73F1C5
call	sub_73EF70

locret_73F1C5:
retn	4
sub_73F1B0 endp

align 10h



sub_73F1D0 proc	near

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

mov	eax, [ecx+4]
sub	esp, 2Ch
push	ebp
cmp	eax, [ecx+8]
jnb	loc_73F2A1
mov	edx, [ecx]
xor	ebp, ebp
push	edi
mov	edi, [edx+4]
xor	al, al
mov	[esp+34h+var_8], ebp
mov	[esp+34h+var_C], ebp
mov	[esp+34h+var_10], ebp
cmp	edi, ebp
jbe	short loc_73F261
push	ebx
push	esi
mov	esi, [edx]
add	esi, 24h
mov	[esp+3Ch+var_2C], edi

loc_73F205:
mov	ebx, [esi-14h]
cmp	ebx, ebp
jbe	short loc_73F255
mov	edx, [esi-18h]
mov	edi, [ecx+4]
cmp	edi, edx
jb	short loc_73F255
add	edx, ebx
cmp	edi, edx
jnb	short loc_73F255
mov	bl, [esi]
mov	dl, bl
and	dl, 7
jz	short loc_73F22B
and	al, 0F8h
or	al, dl
xor	ebp, ebp

loc_73F22B:
test	bl, 8
jz	short loc_73F239
mov	edx, [esi-0Ch]
or	al, 8
mov	[esp+3Ch+var_10], edx

loc_73F239:
test	bl, 10h
jz	short loc_73F247
mov	edx, [esi-8]
or	al, 10h
mov	[esp+3Ch+var_C], edx

loc_73F247:
test	bl, 20h
jz	short loc_73F255
mov	edx, [esi-4]
or	al, 20h
mov	[esp+3Ch+var_8], edx

loc_73F255:
add	esi, 28h
sub	[esp+3Ch+var_2C], 1
jnz	short loc_73F205
pop	esi
pop	ebx

loc_73F261:
or	edx, 0FFFFFFFFh
mov	[ecx+0Ch], edx
mov	[ecx+14h], edx
mov	edx, [esp+34h+var_10]
mov	[ecx+10h], ebp
mov	[ecx+18h], ebp
mov	[ecx+20h], ebp
mov	[ecx+24h], edx
mov	edx, [esp+34h+var_C]
mov	[ecx+28h], edx
mov	edx, [esp+34h+var_8]
mov	[ecx+2Ch], edx
mov	[ecx+30h], al
mov	eax, [ecx+4]
pop	edi
mov	[ecx+20h], ebp
mov	dword ptr [ecx+1Ch], 1
mov	[ecx+18h], eax
pop	ebp
add	esp, 2Ch
retn

loc_73F2A1:
xor	eax, eax
mov	[ecx+2Ch], eax
mov	[ecx+28h], eax
mov	[ecx+24h], eax
mov	[ecx+30h], al
xor	ebp, ebp
mov	[ecx+1Ch], eax
mov	eax, [ecx+4]
mov	[ecx+20h], ebp
mov	[ecx+18h], eax
pop	ebp
add	esp, 2Ch
retn
sub_73F1D0 endp

align 10h



sub_73F2D0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+4]
cmp	eax, [ecx+8]
jnb	short locret_73F2EA
mov	edx, [esp+arg_0]
test	edx, edx
jbe	short locret_73F2EA
add	eax, edx
mov	[ecx+4], eax
call	sub_73F1D0

locret_73F2EA:
retn	4
sub_73F2D0 endp

align 10h



sub_73F2F0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_73F320
mov	eax, [edi]
test	eax, eax
jz	short loc_73F315
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_73F315:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_73F320:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_73F355
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_73F355:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*4]
add	eax, eax
add	eax, eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
add	eax, eax
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_73F2F0 endp

align 10h



sub_73F380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
xor	ecx, ecx
cmp	edx, ecx
jbe	short locret_73F3C4
mov	eax, [esp+arg_0]
push	esi
add	eax, 1Ch
push	edi
or	esi, 0FFFFFFFFh

loc_73F396:
lea	edi, [eax-1Ch]
test	edi, edi
jz	short loc_73F3BA
mov	[eax-1Ch], esi
mov	[eax-18h], ecx
mov	[eax-14h], esi
mov	[eax-10h], ecx
mov	[eax-0Ch], ecx
mov	[eax-8], ecx
mov	[eax+4], ecx
mov	[eax], ecx
mov	[eax-4], ecx
mov	[eax+8], cl

loc_73F3BA:
add	eax, 28h
sub	edx, 1
jnz	short loc_73F396
pop	edi
pop	esi

locret_73F3C4:
retn
sub_73F380 endp

align 10h



sub_73F3D0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], cl
mov	[eax+19h], cl
retn
sub_73F3D0 endp

align 10h



sub_73F3F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_8]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[ecx], eax
mov	eax, [esp+arg_4]
mov	[ecx+4], eax
mov	[ecx+8], edx
xor	eax, eax
or	edx, 0FFFFFFFFh
mov	[ecx+0Ch], edx
mov	[ecx+10h], eax
mov	[ecx+14h], edx
mov	[ecx+18h], eax
mov	[ecx+1Ch], eax
mov	[ecx+20h], eax
mov	[ecx+2Ch], eax
mov	[ecx+28h], eax
mov	[ecx+24h], eax
mov	[ecx+30h], al
call	sub_73F1D0
mov	eax, ecx
retn	0Ch
sub_73F3F0 endp

align 10h



sub_73F440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
mov	[esi], ecx
mov	[esi+4], eax
xor	eax, eax
mov	[esi+8], eax
or	ecx, 0FFFFFFFFh
mov	[esi+0Ch], ecx
mov	[esi+14h], ecx
mov	ecx, [esp+4+arg_8]
mov	[esi+10h], eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+20h], eax
mov	[esi+2Ch], eax
mov	[esi+28h], eax
mov	[esi+24h], eax
mov	[esi+30h], al
mov	[esi+34h], ecx
mov	ecx, esi
call	sub_73EF70
mov	eax, esi
pop	esi
retn	0Ch
sub_73F440 endp

align 10h



sub_73F490 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_73F4AC
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_73F4C1
push	esi
jmp	short loc_73F4BB

loc_73F4AC:
cmp	esi, [edi+8]
jb	short loc_73F4C1
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_73F4BB:
push	edi
call	sub_6F1C70

loc_73F4C1:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_73F4DC
mov	eax, [edi]
lea	edx, [ebx+ebx*4]
sub	esi, ebx
lea	ecx, [eax+edx*8]
push	esi
push	ecx
call	sub_73F380
add	esp, 8

loc_73F4DC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_73F490 endp

align 10h



sub_73F4F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_73F509
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_73F51E
push	esi
jmp	short loc_73F518

loc_73F509:
cmp	esi, [edi+8]
jb	short loc_73F51E
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_73F518:
push	edi
call	sub_73F2F0

loc_73F51E:
mov	eax, [edi]
lea	edx, [esi+esi*4]
mov	[edi+4], esi
lea	eax, [eax+edx*8-28h]
pop	edi
pop	esi
test	eax, eax
jz	short locret_73F56E
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	edx, [ecx+20h]
mov	[eax+20h], edx
mov	cl, [ecx+24h]
mov	[eax+24h], cl

locret_73F56E:
retn	4
sub_73F4F0 endp

align 10h



; int __stdcall	sub_73F580(int,	int, int, int, float, float)
sub_73F580 proc	near

var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= byte ptr -18Ch
var_18B= word ptr -18Bh
var_189= byte ptr -189h
var_188= byte ptr -188h
var_187= word ptr -187h
var_185= byte ptr -185h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= byte ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	byte ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	byte ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 1C0h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1CCh+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_6F8DF0
xor	ebx, ebx
mov	ecx, esi
mov	[esp+1D0h+var_184], ebx
call	sub_6F8DF0
push	1
mov	ecx, esi
call	sub_6F8F20
mov	eax, [esp+1D0h+arg_C]
mov	[esp+1D0h+var_158], eax
or	eax, 0FFFFFFFFh
mov	[esp+1D0h+var_15C], edi
mov	[esp+1D0h+var_154], ebx
mov	[esp+1D0h+var_150], eax
mov	[esp+1D0h+var_14C], ebx
mov	[esp+1D0h+var_148], eax
mov	[esp+1D0h+var_144], ebx
mov	[esp+1D0h+var_140], ebx
mov	[esp+1D0h+var_13C], ebx
mov	[esp+1D0h+var_130], ebx
mov	[esp+1D0h+var_134], ebx
mov	[esp+1D0h+var_138], ebx
mov	[esp+1D0h+var_12C], bl
mov	[esp+1D0h+var_128], eax

loc_73F613:
lea	ecx, [esp+1D0h+var_15C]
call	sub_73EF70
lea	esp, [esp+0]

loc_73F620:
mov	ecx, [esp+1D0h+var_154]
mov	edx, [esp+1D0h+var_15C]
cmp	ecx, [edx+4]
jnb	loc_740395
mov	esi, [esp+1D0h+var_140]
cmp	esi, ebx
jz	loc_740395
mov	ecx, [esp+1D0h+var_14C]
mov	edx, [esp+1D0h+var_148]
mov	eax, [esp+1D0h+var_150]
mov	[esp+1D0h+var_40], ecx
mov	ecx, [esp+1D0h+var_13C]
mov	[esp+1D0h+var_3C], edx
mov	edx, [esp+1D0h+var_138]
mov	[esp+1D0h+var_30], ecx
mov	ecx, [esp+1D0h+var_134]
mov	[esp+1D0h+var_2C], edx
mov	edx, [esp+1D0h+var_130]
mov	[esp+1D0h+var_44], eax
mov	eax, [esp+1D0h+var_144]
mov	[esp+1D0h+var_28], ecx
mov	cl, [esp+1D0h+var_12C]
mov	[esp+1D0h+var_24], edx
push	eax
lea	edx, [esp+1D4h+var_1C]
mov	[esp+1D4h+var_20], cl
mov	ecx, [esp+1D4h+arg_4]
push	edx
mov	[esp+1D8h+var_38], eax
mov	[esp+1D8h+var_34], esi
call	sub_734C60
fldz
mov	eax, [esp+1D0h+var_14]
fst	[esp+1D0h+var_1C0]
mov	ecx, [esp+1D0h+var_1C]
fst	[esp+1D0h+var_1BC]
fldz
mov	[esp+1D0h+var_190], esi
fadd	st, st
fstp	[esp+1D0h+var_194]
fld	[esp+1D0h+var_194]
fst	[esp+1D0h+var_1B8]
fst	[esp+1D0h+var_1B4]
fst	[esp+1D0h+var_1A0]
fst	[esp+1D0h+var_19C]
fxch	st(1)
fst	[esp+1D0h+var_1A8]
fst	[esp+1D0h+var_1A4]
jmp	short loc_73F72A
align 10h

loc_73F720:
fld	[esp+1D0h+var_194]
fldz
jmp	short loc_73F72A

loc_73F728:
fxch	st(1)

loc_73F72A:
cmp	ecx, ebx
jz	loc_740155
cmp	eax, [ecx+4]
jnb	loc_740155
cmp	eax, ebx
jl	loc_740155
cmp	[esp+1D0h+var_190], ebx
jbe	loc_740155
mov	ecx, [ecx]
fstp	st(1)
mov	ebp, [ecx+eax*4]
fstp	st
mov	edi, [esp+1D0h+arg_4]
mov	ecx, edi
mov	esi, eax
call	sub_733EC0
mov	[esp+1D0h+var_1B0], eax
fild	[esp+1D0h+var_1B0]
test	eax, eax
jge	short loc_73F778
fadd	ds:flt_15FCC08

loc_73F778:
fchs
push	ecx		; float
fstp	[esp+1D4h+var_1B0]
mov	ecx, edi
fld	[esp+1D4h+var_1B0]
fstp	[esp+1D4h+var_1D4]
push	esi		; int
call	sub_733F00
test	al, al
jz	loc_740115
mov	edx, [ebp+0]
mov	eax, [ebp+8]
shr	edx, 1Fh
and	dl, 1
mov	ecx, eax
jz	short loc_73F7B7
and	ecx, offset sub_FFFFFF
cmp	ecx, offset sub_FFFFFF
jnz	short loc_73F7B7
or	ecx, 0FFFFFFFFh

loc_73F7B7:
mov	esi, [esp+1D0h+var_144]
cmp	ecx, esi
jnb	loc_73F9AE
cmp	dl, bl
jz	short loc_73F7D0
movzx	edi, byte ptr [ebp+1Ch]
jmp	short loc_73F7D3

loc_73F7D0:
mov	edi, [ebp+4]

loc_73F7D3:
lea	esi, [ebp+1Eh]
cmp	dl, bl
jnz	short loc_73F7DD
lea	esi, [ebp+2Ah]

loc_73F7DD:
mov	ecx, ebp
call	sub_733C80
or	ecx, 0FFFFFFFFh
mov	[esp+1D0h+var_E4], ecx
mov	[esp+1D0h+var_DC], ecx
lea	edx, [esi+edi*8]
lea	ecx, [esp+1D0h+var_FC]
mov	[esp+1D0h+var_E0], ebx
mov	[esp+1D0h+var_D8], ebx
mov	[esp+1D0h+var_D4], ebx
mov	[esp+1D0h+var_D0], ebx
mov	[esp+1D0h+var_C4], ebx
mov	[esp+1D0h+var_C8], ebx
mov	[esp+1D0h+var_CC], ebx
mov	[esp+1D0h+var_C0], bl
mov	[esp+1D0h+var_E8], ebx
mov	[esp+1D0h+var_EC], ebx
mov	[esp+1D0h+var_BC], ebx
mov	[esp+1D0h+var_B8], ebx
mov	[esp+1D0h+var_B4], ebx
mov	[esp+1D0h+var_B0], ebx
mov	[esp+1D0h+var_AC], ebx
mov	[esp+1D0h+var_A8], ebx
mov	[esp+1D0h+var_A4], ebx
mov	[esp+1D0h+var_FC], esi
mov	[esp+1D0h+var_F8], edx
mov	[esp+1D0h+var_F4], eax
call	sub_735210
mov	eax, [ebp+0]
shr	eax, 1Fh
test	al, 1
mov	eax, [ebp+8]
mov	[esp+1D0h+var_198], ebx
jz	short loc_73F8B0
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_73F8B0
or	eax, 0FFFFFFFFh

loc_73F8B0:
mov	esi, [esp+1D0h+var_144]
sub	esi, eax
cmp	esi, ebx
jle	loc_73F974
mov	edi, ebx
jmp	short loc_73F8D0
align 10h

loc_73F8D0:
mov	edx, [esp+1D0h+var_FC]
cmp	edx, ebx
jz	loc_73F970
cmp	edx, [esp+1D0h+var_F8]
jnb	loc_73F970
movzx	ecx, word ptr [edx+4]
test	ecx, 0F000h
jz	short loc_73F901
movzx	eax, cx
shr	eax, 0Ch
sub	esi, eax
inc	edi

loc_73F901:
mov	eax, [esp+1D0h+var_A4]
cmp	eax, ebx
jnz	short loc_73F919
movzx	eax, cx
shr	eax, 0Ch
mov	[esp+1D0h+var_A4], eax

loc_73F919:
add	edx, 8
mov	ecx, 0F000h
mov	[esp+1D0h+var_FC], edx
test	[edx+4], cx
jbe	short loc_73F95C
cmp	eax, ebx
jbe	short loc_73F95C
mov	edx, [esp+1D0h+var_EC]
cmp	edx, [esp+1D0h+var_E8]
jnb	short loc_73F95C
add	[esp+1D0h+var_EC], eax
lea	ecx, [esp+1D0h+var_F0]
call	sub_73F1D0
mov	[esp+1D0h+var_A4], ebx

loc_73F95C:
lea	ecx, [esp+1D0h+var_FC]
call	sub_735210
cmp	esi, ebx
jg	loc_73F8D0

loc_73F970:
mov	[esp+1D0h+var_198], edi

loc_73F974:
mov	ecx, [esp+1D0h+var_AC]
cmp	ecx, ebx
jz	short loc_73F984
call	sub_64A400

loc_73F984:
mov	eax, [esp+1D0h+var_B0]
cmp	eax, ebx
jz	short loc_73F9D4
dec	dword ptr [eax]
mov	esi, eax
cmp	[esi], ebx
jnz	short loc_73F9D4
mov	ecx, esi
call	sub_67E910
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
jmp	short loc_73F9D4

loc_73F9AE:
mov	[esp+1D0h+var_198], ebx
cmp	dl, bl
jz	short loc_73F9C5
and	eax, offset sub_FFFFFF
cmp	eax, offset sub_FFFFFF
jnz	short loc_73F9C5
or	eax, 0FFFFFFFFh

loc_73F9C5:
mov	ecx, esi
sub	ecx, eax
add	ecx, [esp+1D0h+var_140]
mov	[esp+1D0h+var_190], ecx

loc_73F9D4:
mov	eax, [ebp+0]
shr	eax, 1Fh
and	al, 1
jz	short loc_73F9E4
movzx	edi, byte ptr [ebp+1Ch]
jmp	short loc_73F9E7

loc_73F9E4:
mov	edi, [ebp+4]

loc_73F9E7:
lea	esi, [ebp+1Eh]
cmp	al, bl
jnz	short loc_73F9F1
lea	esi, [ebp+2Ah]

loc_73F9F1:
mov	ecx, ebp
call	sub_733C80
or	ecx, 0FFFFFFFFh
mov	[esp+1D0h+var_88], ecx
mov	[esp+1D0h+var_80], ecx
lea	ecx, [esi+edi*8]
mov	[esp+1D0h+var_9C], ecx
lea	ecx, [esp+1D0h+var_A0]
mov	[esp+1D0h+var_84], ebx
mov	[esp+1D0h+var_7C], ebx
mov	[esp+1D0h+var_78], ebx
mov	[esp+1D0h+var_74], ebx
mov	[esp+1D0h+var_68], ebx
mov	[esp+1D0h+var_6C], ebx
mov	[esp+1D0h+var_70], ebx
mov	[esp+1D0h+var_64], bl
mov	[esp+1D0h+var_8C], ebx
mov	[esp+1D0h+var_90], ebx
mov	[esp+1D0h+var_60], ebx
mov	[esp+1D0h+var_5C], ebx
mov	[esp+1D0h+var_58], ebx
mov	[esp+1D0h+var_54], ebx
mov	[esp+1D0h+var_50], ebx
mov	[esp+1D0h+var_4C], ebx
mov	[esp+1D0h+var_48], ebx
mov	[esp+1D0h+var_A0], esi
mov	[esp+1D0h+var_98], eax
call	sub_735210
fldz
fst	[esp+1D0h+var_1C0]
xor	edi, edi
fstp	[esp+1D0h+var_1BC]
mov	[esp+1D0h+var_180], ebx
fld	[esp+1D0h+var_194]
mov	[esp+1D0h+var_1B0], edi
fst	[esp+1D0h+var_1B8]
fstp	[esp+1D0h+var_1B4]
jmp	short loc_73FAD0
align 10h

loc_73FAD0:
mov	esi, [esp+1D0h+var_A0]
cmp	esi, ebx
jz	loc_73FCD2
cmp	esi, [esp+1D0h+var_9C]
jnb	loc_73FCD2
cmp	[esp+1D0h+var_190], ebx
jbe	loc_73FCD2
cmp	edi, [esp+1D0h+var_198]
jb	loc_73FC41
mov	dl, [esi+6]
shr	dl, 6
test	dl, 1
jnz	short loc_73FB15
movzx	eax, word ptr [esi+2]
mov	[esp+1D0h+var_1AC], eax
jmp	short loc_73FB1F

loc_73FB15:
movzx	ecx, word ptr [esi+2]
neg	ecx
mov	[esp+1D0h+var_1AC], ecx

loc_73FB1F:
fild	[esp+1D0h+var_1AC]
mov	ecx, ebp
fstp	[esp+1D0h+var_174]
call	sub_6F6050
mov	ecx, ebp
mov	edi, eax
call	sub_71DE40
add	edi, eax
mov	[esp+1D0h+var_1AC], edi
fild	[esp+1D0h+var_1AC]
movzx	edx, word ptr [esi+4]
mov	edi, [esp+1D0h+var_1B0]
shr	edx, 0Ch
fstp	[esp+1D0h+var_170]
sub	[esp+1D0h+var_190], edx
fild	[esp+1D0h+var_180]
fstp	[esp+1D0h+var_8]
fld	[esp+1D0h+var_8]
fld	st
fldz
fadd	st(1), st
fxch	st(1)
fstp	[esp+1D0h+var_17C]
fld	[esp+1D0h+var_174]
faddp	st(2), st
fxch	st(1)
fstp	[esp+1D0h+var_174]
fld	[esp+1D0h+var_194]
fstp	[esp+1D0h+var_178]
fadd	[esp+1D0h+var_170]
fstp	[esp+1D0h+var_170]
cmp	edi, [esp+1D0h+var_198]
jnz	short loc_73FBB5
fld	[esp+1D0h+var_17C]
fstp	[esp+1D0h+var_1C0]
fld	[esp+1D0h+var_178]
fstp	[esp+1D0h+var_1BC]
fld	[esp+1D0h+var_174]
fstp	[esp+1D0h+var_1B8]
fld	[esp+1D0h+var_170]
jmp	loc_73FC3D

loc_73FBB5:
fld	[esp+1D0h+var_1C0]
fld	[esp+1D0h+var_17C]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_73FBCA
fstp	st(1)
jmp	short loc_73FBCC

loc_73FBCA:
fstp	st

loc_73FBCC:
fstp	[esp+1D0h+var_16C]
fld	[esp+1D0h+var_1B8]
fld	[esp+1D0h+var_174]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_73FBE5
fstp	st
jmp	short loc_73FBE7

loc_73FBE5:
fstp	st(1)

loc_73FBE7:
fstp	[esp+1D0h+var_164]
fld	[esp+1D0h+var_1BC]
fld	[esp+1D0h+var_178]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_73FC00
fstp	st(1)
jmp	short loc_73FC02

loc_73FC00:
fstp	st

loc_73FC02:
fstp	[esp+1D0h+var_168]
fld	[esp+1D0h+var_1B4]
fld	[esp+1D0h+var_170]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_73FC1B
fstp	st
jmp	short loc_73FC1D

loc_73FC1B:
fstp	st(1)

loc_73FC1D:
fstp	[esp+1D0h+var_160]
fld	[esp+1D0h+var_16C]
fstp	[esp+1D0h+var_1C0]
fld	[esp+1D0h+var_168]
fstp	[esp+1D0h+var_1BC]
fld	[esp+1D0h+var_164]
fstp	[esp+1D0h+var_1B8]
fld	[esp+1D0h+var_160]

loc_73FC3D:
fstp	[esp+1D0h+var_1B4]

loc_73FC41:
mov	al, [esi+6]
shr	al, 6
test	al, 1
movzx	eax, word ptr [esi+2]
jz	short loc_73FC51
neg	eax

loc_73FC51:
movzx	ecx, word ptr [esi+4]
add	[esp+1D0h+var_180], eax
test	ecx, 0F000h
jbe	short loc_73FC66
inc	edi
mov	[esp+1D0h+var_1B0], edi

loc_73FC66:
mov	eax, [esp+1D0h+var_48]
cmp	eax, ebx
jnz	short loc_73FC7E
movzx	eax, cx
shr	eax, 0Ch
mov	[esp+1D0h+var_48], eax

loc_73FC7E:
add	esi, 8
mov	ecx, 0F000h
mov	[esp+1D0h+var_A0], esi
test	[esi+4], cx
jbe	short loc_73FCC1
cmp	eax, ebx
jbe	short loc_73FCC1
mov	edx, [esp+1D0h+var_90]
cmp	edx, [esp+1D0h+var_8C]
jnb	short loc_73FCC1
add	[esp+1D0h+var_90], eax
lea	ecx, [esp+1D0h+var_94]
call	sub_73F1D0
mov	[esp+1D0h+var_48], ebx

loc_73FCC1:
lea	ecx, [esp+1D0h+var_A0]
call	sub_735210
jmp	loc_73FAD0

loc_73FCD2:
fld	[esp+1D0h+arg_10]
mov	eax, [ebp+0]
fchs
shr	eax, 1Fh
and	al, 1
fstp	[esp+1D0h+var_1B0]
fld	[esp+1D0h+arg_14]
fchs
fstp	[esp+1D0h+var_1AC]
fld	[esp+1D0h+var_1B0]
fld	st
fadd	[esp+1D0h+var_1C0]
fstp	[esp+1D0h+var_1C0]
fadd	[esp+1D0h+var_1B8]
fstp	[esp+1D0h+var_1B8]
fld	[esp+1D0h+var_1AC]
fld	st
fadd	[esp+1D0h+var_1BC]
fstp	[esp+1D0h+var_1BC]
fadd	[esp+1D0h+var_1B4]
fstp	[esp+1D0h+var_1B4]
jz	short loc_73FD2B
mov	ecx, [ebp+10h]
mov	[esp+1D0h+var_1AC], ecx
jmp	short loc_73FD32

loc_73FD2B:
mov	edx, [ebp+10h]
mov	[esp+1D0h+var_1AC], edx

loc_73FD32:
cmp	al, bl
jz	short loc_73FD3F
mov	eax, [ebp+0Ch]
mov	[esp+1D0h+var_1B0], eax
jmp	short loc_73FD46

loc_73FD3F:
mov	ecx, [ebp+0Ch]
mov	[esp+1D0h+var_1B0], ecx

loc_73FD46:
fild	[esp+1D0h+var_1B0]
mov	ecx, [esp+1D0h+arg_8]
fstp	[esp+1D0h+var_1B0]
fild	[esp+1D0h+var_1AC]
fstp	[esp+1D0h+var_1AC]
fld	[esp+1D0h+var_1B0]
fld	st
fadd	[esp+1D0h+var_1C0]
fstp	[esp+1D0h+var_1C0]
fadd	[esp+1D0h+var_1B8]
fstp	[esp+1D0h+var_1B8]
fld	[esp+1D0h+var_1AC]
fld	st
fadd	[esp+1D0h+var_1BC]
fstp	[esp+1D0h+var_1BC]
fadd	[esp+1D0h+var_1B4]
fstp	[esp+1D0h+var_1B4]
fld	dword ptr [ecx]
fstp	[esp+1D0h+var_104]
fld	dword ptr [ecx+4]
fstp	[esp+1D0h+var_100]
fld	[esp+1D0h+var_104]
fld	st
fadd	[esp+1D0h+var_1C0]
fstp	[esp+1D0h+var_1C0]
fadd	[esp+1D0h+var_1B8]
fstp	[esp+1D0h+var_1B8]
fld	[esp+1D0h+var_100]
fld	st
fadd	[esp+1D0h+var_1BC]
fstp	[esp+1D0h+var_1BC]
fadd	[esp+1D0h+var_1B4]
fstp	[esp+1D0h+var_1B4]
fld	[esp+1D0h+var_1A8]
fld	[esp+1D0h+var_1A0]
fcom	st(1)
fnstsw	ax
fld	[esp+1D0h+var_1BC]
test	ah, 41h
jnp	loc_740067
fld	[esp+1D0h+var_1A4]
fld	[esp+1D0h+var_19C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_74013F
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	loc_73FF25
fld	ds:dbl_15FCE20
fadd	st, st(1)
fcomp	st(3)
fnstsw	ax
test	ah, 1
jnz	loc_73FF25
fld	[esp+1D0h+var_1B8]
fcomp	st(5)
fnstsw	ax
test	ah, 1
jnz	loc_73FF25
fld	[esp+1D0h+var_1C0]
fcomp	st(4)
fnstsw	ax
test	ah, 41h
jp	loc_73FF25
fstp	st
fxch	st(1)
fstp	[esp+1D0h+var_19C]
fld	[esp+1D0h+var_19C]
fxch	st(1)

loc_73FE4E:
fld	dword ptr [ecx]
fstp	[esp+1D0h+var_124]
fld	dword ptr [ecx+4]
fstp	[esp+1D0h+var_120]
fld	dword ptr [ecx+8]
fstp	[esp+1D0h+var_11C]
fld	dword ptr [ecx+0Ch]
fstp	[esp+1D0h+var_118]
fld	[esp+1D0h+var_120]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jp	short loc_73FEBD
fld	[esp+1D0h+var_118]
fcomp	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_73FEBD
fld	[esp+1D0h+var_11C]
fcom	st(4)
fnstsw	ax
test	ah, 1
jnz	loc_73FF2C
fld	[esp+1D0h+var_124]
fcom	st(4)
fnstsw	ax
test	ah, 41h
jnp	short loc_73FF32
fstp	st(5)
fstp	st(1)

loc_73FEBD:
fstp	st(3)

loc_73FEBF:
fstp	st(2)
fstp	st
fstp	st
fldz
fst	[esp+1D0h+var_1A8]
fstp	[esp+1D0h+var_1A4]
fld	[esp+1D0h+var_194]
fst	[esp+1D0h+var_1A0]
fstp	[esp+1D0h+var_19C]
fld	[esp+1D0h+var_19C]
fld	[esp+1D0h+var_1A0]
fld	[esp+1D0h+var_1A4]
fld	[esp+1D0h+var_1A8]
fxch	st(3)

loc_73FEED:
fxch	st(1)

loc_73FEEF:
fxch	st(2)
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnp	loc_74014C
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_740069
test	[esp+1D0h+var_12C], 8
jz	loc_73FFAE
lea	eax, [esp+1D0h+var_2C]
jmp	loc_73FFC2

loc_73FF25:
fstp	st(2)
jmp	loc_73FE4E

loc_73FF2C:
fstp	st(4)
fstp	st
jmp	short loc_73FEBF

loc_73FF32:
fcom	st(5)
fnstsw	ax
test	ah, 5
jnp	short loc_73FF7C
fstp	st(5)
fxch	st(4)
fstp	[esp+1D0h+var_1A8]
fld	[esp+1D0h+var_1A8]
fxch	st(4)

loc_73FF49:
fcom	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_73FF80
fstp	st(3)
fxch	st(2)
fstp	[esp+1D0h+var_1A0]
fld	[esp+1D0h+var_1A0]
fxch	st(2)

loc_73FF60:
fld	[esp+1D0h+var_120]
fcom	st(1)
fnstsw	ax
test	ah, 5
jnp	short loc_73FF84
fstp	st(1)
fstp	[esp+1D0h+var_1A4]
fld	[esp+1D0h+var_1A4]
jmp	short loc_73FF86

loc_73FF7C:
fstp	st
jmp	short loc_73FF49

loc_73FF80:
fstp	st
jmp	short loc_73FF60

loc_73FF84:
fstp	st

loc_73FF86:
fld	[esp+1D0h+var_118]
fcom	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_73FFA7
fstp	st(2)
fxch	st(1)
fstp	[esp+1D0h+var_19C]
fld	[esp+1D0h+var_19C]
jmp	loc_73FEED

loc_73FFA7:
fstp	st
jmp	loc_73FEEF

loc_73FFAE:
mov	byte ptr [esp+1D0h+var_187+1], bl
mov	byte ptr [esp+1D0h+var_187], bl
mov	[esp+1D0h+var_188], bl
mov	[esp+1D0h+var_185], bl
lea	eax, [esp+1D0h+var_188]

loc_73FFC2:
mov	eax, [eax]
mov	esi, [esp+1D0h+arg_0]
cmp	eax, [esp+1D0h+var_184]
jz	short loc_73FFE9
fstp	st(1)
push	eax
mov	ecx, esi
fstp	st
mov	[esp+1D4h+var_184], eax
call	sub_6F93D0
fld	[esp+1D0h+var_1A8]
fld	[esp+1D0h+var_1A4]

loc_73FFE9:
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D50
fld	[esp+1D0h+var_1A4]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1A0]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
fld	[esp+1D0h+var_19C]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1A0]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
fld	[esp+1D0h+var_19C]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1A8]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
fld	[esp+1D0h+var_1A4]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1A8]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
mov	ecx, esi
call	sub_6F8F40
jmp	short loc_74006D

loc_740067:
fstp	st(2)

loc_740069:
fstp	st(1)

loc_74006B:
fstp	st

loc_74006D:
fld	[esp+1D0h+var_1C0]
mov	ecx, [esp+1D0h+var_50]
fstp	[esp+1D0h+var_1A8]
fld	[esp+1D0h+var_1BC]
fstp	[esp+1D0h+var_1A4]
fld	[esp+1D0h+var_1B8]
fstp	[esp+1D0h+var_1A0]
fld	[esp+1D0h+var_1B4]
fstp	[esp+1D0h+var_19C]
cmp	ecx, ebx
jz	short loc_74009D
call	sub_64A400

loc_74009D:
mov	esi, [esp+1D0h+var_54]
cmp	esi, ebx
jz	short loc_740115
dec	dword ptr [esi]
cmp	[esi], ebx
jnz	short loc_740115
mov	ecx, [esi+4]
cmp	ecx, ebx
jz	short loc_7400BB
push	esi
call	sub_6F4540

loc_7400BB:
mov	ecx, [esi+1Ch]
cmp	ecx, ebx
jz	short loc_7400C7
call	sub_666B00

loc_7400C7:
mov	[esi+1Ch], ebx
mov	ecx, [esi+20h]
cmp	ecx, ebx
jz	short loc_7400D6
call	sub_666B00

loc_7400D6:
mov	ecx, [esi+1Ch]
cmp	ecx, ebx
jz	short loc_7400E2
call	sub_666B00

loc_7400E2:
mov	edi, [esi+0Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_740107
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_740107:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_740115:
mov	eax, [esp+1D0h+var_14]
mov	ecx, [esp+1D0h+var_1C]
cmp	eax, [ecx+4]
jnb	loc_73F720
fldz
inc	eax
fld	[esp+1D0h+var_194]
mov	[esp+1D0h+var_14], eax
jmp	loc_73F728

loc_74013F:
fstp	st(4)
fstp	st
fstp	st
fstp	st
jmp	loc_74006B

loc_74014C:
fstp	st(2)
fstp	st
jmp	loc_74006B

loc_740155:
fld	[esp+1D0h+var_1C0]
fld	[esp+1D0h+var_1B8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_740377
fld	[esp+1D0h+var_1BC]
fld	[esp+1D0h+var_1B4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_740373
mov	eax, [esp+1D0h+arg_8]
fld	dword ptr [eax]
fstp	[esp+1D0h+var_114]
fld	dword ptr [eax+4]
fstp	[esp+1D0h+var_110]
fld	dword ptr [eax+8]
fstp	[esp+1D0h+var_10C]
fld	dword ptr [eax+0Ch]
fstp	[esp+1D0h+var_108]
fld	[esp+1D0h+var_110]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_74020F
fld	[esp+1D0h+var_108]
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 1
jnz	short loc_740217
fld	[esp+1D0h+var_10C]
fcom	st(4)
fnstsw	ax
fstp	st(4)
test	ah, 1
jnz	short loc_74021F
fld	[esp+1D0h+var_114]
fcom	st(3)
fnstsw	ax
fstp	st(3)
test	ah, 41h
jnp	short loc_740227
fstp	st(2)
fstp	st(2)
fstp	st

loc_7401FB:
fstp	st
fst	[esp+1D0h+var_1C0]
fstp	[esp+1D0h+var_1BC]
fst	[esp+1D0h+var_1B8]
fstp	[esp+1D0h+var_1B4]
jmp	short loc_740281

loc_74020F:
fstp	st(1)
fstp	st
fstp	st(1)
jmp	short loc_7401FB

loc_740217:
fstp	st
fstp	st
fstp	st(1)
jmp	short loc_7401FB

loc_74021F:
fstp	st(3)
fstp	st(2)
fstp	st(1)
jmp	short loc_7401FB

loc_740227:
fstp	st(5)
fstp	st(3)
fld	[esp+1D0h+var_1C0]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_74023E
fstp	[esp+1D0h+var_1C0]
jmp	short loc_740240

loc_74023E:
fstp	st

loc_740240:
fld	[esp+1D0h+var_1B8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_740253
fstp	[esp+1D0h+var_1B8]
jmp	short loc_740255

loc_740253:
fstp	st

loc_740255:
fld	[esp+1D0h+var_1BC]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jz	short loc_74026A
fxch	st(1)
fstp	[esp+1D0h+var_1BC]
jmp	short loc_74026C

loc_74026A:
fstp	st(1)

loc_74026C:
fld	[esp+1D0h+var_1B4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_74027F
fstp	[esp+1D0h+var_1B4]
jmp	short loc_740281

loc_74027F:
fstp	st

loc_740281:
fld	[esp+1D0h+var_1C0]
fld	[esp+1D0h+var_1B8]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_74037F
fld	[esp+1D0h+var_1BC]
fld	[esp+1D0h+var_1B4]
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_74037F
test	[esp+1D0h+var_12C], 8
jz	short loc_7402BE
lea	eax, [esp+1D0h+var_2C]
jmp	short loc_7402D2

loc_7402BE:
mov	byte ptr [esp+1D0h+var_18B+1], bl
mov	byte ptr [esp+1D0h+var_18B], bl
mov	[esp+1D0h+var_18C], bl
mov	[esp+1D0h+var_189], bl
lea	eax, [esp+1D0h+var_18C]

loc_7402D2:
mov	eax, [eax]
mov	esi, [esp+1D0h+arg_0]
cmp	eax, [esp+1D0h+var_184]
jz	short loc_7402ED
push	eax
mov	ecx, esi
mov	[esp+1D4h+var_184], eax
call	sub_6F93D0

loc_7402ED:
fld	[esp+1D0h+var_1BC]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1C0]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D50
fld	[esp+1D0h+var_1BC]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1B8]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
fld	[esp+1D0h+var_1B4]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1B8]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
fld	[esp+1D0h+var_1B4]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1C0]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
fld	[esp+1D0h+var_1BC]
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
mov	ecx, esi
fld	[esp+1D8h+var_1C0]
fstp	[esp+1D8h+var_1D8]
call	sub_6F8D80
mov	ecx, esi
call	sub_6F8F40
jmp	short loc_74037F

loc_740373:
fstp	st
fstp	st

loc_740377:
fstp	st(3)
fstp	st(1)
fstp	st
fstp	st

loc_74037F:
mov	eax, [esp+1D0h+var_154]
mov	ecx, [esp+1D0h+var_15C]
cmp	eax, [ecx+4]
jnb	loc_73F620
jmp	loc_73F613

loc_740395:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1C0h
retn	18h
sub_73F580 endp

align 10h



sub_7403B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+4]
inc	eax
push	eax
call	sub_73F490
mov	eax, [edi+4]
mov	esi, [esp+8+arg_0]
lea	ecx, [eax-1]
cmp	esi, ecx
jnb	short loc_7403EE
mov	ecx, [edi]
sub	eax, esi
lea	edx, [esi+esi*4]
lea	ecx, [ecx+edx*8]
dec	eax
lea	edx, [eax+eax*4]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ecx
add	ecx, 28h
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7403EE:
mov	ecx, [edi]
lea	eax, [esi+esi*4]
lea	eax, [ecx+eax*8]
pop	edi
pop	esi
test	eax, eax
jz	short locret_74043A
mov	ecx, [esp+arg_4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	edx, [ecx+20h]
mov	[eax+20h], edx
mov	cl, [ecx+24h]
mov	[eax+24h], cl

locret_74043A:
retn	8
sub_7403B0 endp

align 10h



sub_740440 proc	near

arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	edx, [edi+4]
mov	byte ptr [edi+18h], 0
mov	byte ptr [edi+19h], 0

loc_740452:
inc	dword ptr [edi+0Ch]
mov	ebx, [edi+0Ch]
xor	esi, esi
test	edx, edx
jle	short loc_740489
mov	edi, edi

loc_740460:
mov	ebx, [edi]
mov	eax, edx
sar	eax, 1
lea	ecx, [eax+esi]
lea	ebp, [ecx+ecx*4]
mov	ebp, [ebx+ebp*8+14h]
mov	ebx, [edi+0Ch]
sub	ebp, ebx
jns	short loc_740483
lea	esi, [ecx+1]
or	ecx, 0FFFFFFFFh
sub	ecx, eax
add	edx, ecx
jmp	short loc_740485

loc_740483:
mov	edx, eax

loc_740485:
test	edx, edx
jg	short loc_740460

loc_740489:
mov	edx, [edi+4]
cmp	esi, edx
jnb	short loc_7404A2
mov	ecx, [edi]
lea	eax, [esi+esi*4]
cmp	[ecx+eax*8+14h], ebx
lea	eax, [ecx+eax*8]
jnz	short loc_7404A2
test	eax, eax
jnz	short loc_740452

loc_7404A2:
mov	ebp, [esp+14h+arg_0]
lea	eax, [ebp+14h]
push	offset sub_73ED10
push	eax
mov	[eax], ebx
mov	ecx, [edi+4]
push	ecx
push	0
push	edi
call	sub_73ED40
add	esp, 14h
mov	esi, eax
push	ebp
push	esi
mov	ecx, edi
call	sub_7403B0
mov	eax, [edi]
pop	edi
lea	edx, [esi+esi*4]
pop	esi
pop	ebp
lea	eax, [eax+edx*8]
pop	ebx
pop	ecx
retn	4
sub_740440 endp

align 10h



sub_7404E0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi+4]
push	offset sub_73ED10
lea	ecx, [esp+14h+arg_0]
push	ecx
push	eax
mov	byte ptr [esi+18h], 0
mov	byte ptr [esi+19h], 0
mov	ebx, [ebp+14h]
lea	edi, [ebp+14h]
push	0
push	esi
mov	[esp+24h+arg_0], ebx
call	sub_73ED40
mov	ecx, [esi+4]
add	esp, 14h
cmp	eax, ecx
jnb	short loc_74052E
lea	edx, [eax+eax*4]
mov	eax, [esi]
cmp	[eax+edx*8+14h], ebx
lea	eax, [eax+edx*8]
jnz	short loc_74052E
test	eax, eax
jnz	short loc_74055A

loc_74052E:
push	offset sub_73ED10
push	edi
push	ecx
push	0
push	esi
call	sub_73ED40
add	esp, 14h
mov	edi, eax
push	ebp
push	edi
mov	ecx, esi
call	sub_7403B0
mov	edx, [esi]
lea	ecx, [edi+edi*4]
pop	edi
pop	esi
pop	ebp
lea	eax, [edx+ecx*8]
pop	ebx
retn	4

loc_74055A:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	4
sub_7404E0 endp

align 10h



sub_740570 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [ecx+4]
sub	esp, 8
push	ebx
push	ebp
push	edi
mov	edi, [esp+14h+arg_0]
mov	ebp, [edi+4]
add	ebp, [edi]
xor	bl, bl
test	eax, eax
jbe	loc_740622
push	esi
mov	[esp+18h+var_8], 0
mov	[esp+18h+var_4], eax
jmp	short loc_7405A4
jmp	short loc_7405A0
align 10h

loc_7405A0:
mov	edi, [esp+18h+arg_0]

loc_7405A4:
mov	eax, [ecx]
add	eax, [esp+18h+var_8]
mov	edi, [edi]
mov	edx, [eax]
mov	esi, [eax+4]
add	esi, edx
cmp	edx, edi
ja	short loc_7405DC
cmp	edi, esi
ja	short loc_7405D8
cmp	ebp, esi
jbe	short loc_74060D
mov	edx, ebp
sub	edx, esi
add	[eax+4], edx
mov	edx, [eax+4]
mov	[eax+10h], edx
mov	bl, 1
mov	byte ptr [ecx+18h], 0
mov	byte ptr [ecx+19h], 0
jmp	short loc_74060D

loc_7405D8:
cmp	edx, edi
jbe	short loc_74060D

loc_7405DC:
cmp	edx, ebp
jnb	short loc_74060D
sub	edx, edi
sub	[eax], edx
add	[eax+4], edx
mov	edi, [eax]
mov	edx, [eax+4]
mov	[eax+0Ch], edi
mov	[eax+10h], edx
mov	bl, 1
mov	byte ptr [ecx+18h], 0
mov	byte ptr [ecx+19h], 0
cmp	esi, ebp
ja	short loc_74060D
mov	edx, ebp
sub	edx, esi
add	[eax+4], edx
mov	edx, [eax+4]
mov	[eax+10h], edx

loc_74060D:
add	[esp+18h+var_8], 28h
sub	[esp+18h+var_4], 1
jnz	short loc_7405A0
pop	esi
test	bl, bl
jnz	short loc_740628
mov	edi, [esp+14h+arg_0]

loc_740622:
push	edi
call	sub_740440

loc_740628:
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_740570 endp

align 10h



sub_740640 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_740656
push	0
call	sub_73F490
pop	esi
retn	4

loc_740656:
mov	ecx, [esp+4+arg_0]
sub	eax, ecx
dec	eax
lea	eax, [eax+eax*4]
push	edi
mov	edi, [esi]
add	eax, eax
lea	edx, [ecx+ecx*4]
add	eax, eax
lea	edx, [edi+edx*8]
add	eax, eax
push	eax
lea	ecx, [edx+28h]
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 0Ch
pop	edi
pop	esi
retn	4
sub_740640 endp

align 10h



sub_740690 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	offset sub_73ED10
lea	ecx, [esp+8+arg_0]
push	ecx
push	eax
push	0
push	esi
call	sub_73ED40
add	esp, 14h
cmp	eax, [esi+4]
jnb	short loc_7406D6
mov	ecx, [esi]
lea	edx, [eax+eax*4]
mov	edx, [ecx+edx*8+14h]
cmp	edx, [esp+4+arg_0]
jnz	short loc_7406D6
push	eax
mov	ecx, esi
call	sub_740640
mov	byte ptr [esi+18h], 0
mov	byte ptr [esi+19h], 0
mov	al, 1
pop	esi
retn	4

loc_7406D6:
xor	al, al
pop	esi
retn	4
sub_740690 endp

align 10h



sub_7406E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 3Ch
mov	edx, [esp+3Ch+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [edx+4]
add	edi, [edx]
xor	ebx, ebx
mov	esi, ecx
xor	ebp, ebp
xor	eax, eax
mov	[esp+4Ch+var_34], ebp
mov	[esp+4Ch+var_30], eax
mov	[esp+4Ch+var_2C], ebx
mov	[esp+4Ch+var_38], ebx
cmp	[esi+4], ebx
jbe	loc_7407F7
mov	[esp+4Ch+var_3C], ebx
jmp	short loc_740724
jmp	short loc_740720
align 10h

loc_740720:
mov	edx, [esp+4Ch+arg_0]

loc_740724:
mov	eax, [esi]
add	eax, [esp+4Ch+var_3C]
mov	edx, [edx]
mov	ebp, [eax]
mov	ecx, [eax+4]
add	ecx, ebp
cmp	ebp, edx
jnb	short loc_74079E
cmp	edx, ecx
jnb	short loc_74079A
cmp	edi, ecx
jnb	short loc_740793
sub	edx, ebp
mov	[eax+4], edx
mov	[eax+10h], edx
mov	edx, [eax+8]
mov	[esp+4Ch+var_20], edx
mov	edx, [eax+14h]
mov	[esp+4Ch+var_14], edx
mov	edx, [eax+18h]
sub	ecx, edi
mov	[esp+4Ch+var_10], edx
mov	edx, [eax+1Ch]
mov	[esp+4Ch+var_24], ecx
mov	[esp+4Ch+var_18], ecx
mov	[esp+4Ch+var_C], edx
mov	edx, [eax+20h]
mov	al, [eax+24h]
lea	ecx, [esp+4Ch+var_28]
push	ecx
lea	ecx, [esp+50h+var_34]
mov	[esp+50h+var_8], edx
mov	[esp+50h+var_4], al
mov	[esp+50h+var_28], edi
mov	[esp+50h+var_1C], edi
call	sub_73F4F0
jmp	short loc_7407D2

loc_740793:
sub	edx, ecx
add	[eax+4], edx
jmp	short loc_7407CC

loc_74079A:
cmp	ebp, edx
jb	short loc_7407D8

loc_74079E:
cmp	ebp, edi
jnb	short loc_7407D8
cmp	ecx, edi
ja	short loc_7407BE
mov	ebp, [esp+4Ch+var_38]
push	ebp
mov	ecx, esi
call	sub_740640
dec	ebp
sub	[esp+4Ch+var_3C], 28h
mov	[esp+4Ch+var_38], ebp
jmp	short loc_7407D2

loc_7407BE:
mov	ecx, edi
sub	ecx, ebp
add	[eax], ecx
mov	edx, [eax]
sub	[eax+4], ecx
mov	[eax+0Ch], edx

loc_7407CC:
mov	ecx, [eax+4]
mov	[eax+10h], ecx

loc_7407D2:
mov	[esi+19h], bl
mov	[esi+18h], bl

loc_7407D8:
mov	eax, [esp+4Ch+var_38]
add	[esp+4Ch+var_3C], 28h
inc	eax
mov	[esp+4Ch+var_38], eax
cmp	eax, [esi+4]
jb	loc_740720
mov	eax, [esp+4Ch+var_30]
mov	ebp, [esp+4Ch+var_34]

loc_7407F7:
cmp	eax, ebx
jbe	short loc_740810
mov	edi, ebp
mov	ebx, eax
nop

loc_740800:
push	edi
mov	ecx, esi
call	sub_740440
add	edi, 28h
sub	ebx, 1
jnz	short loc_740800

loc_740810:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebp
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn	4
sub_7406E0 endp

align 10h



; int __stdcall	sub_740830(int,	int, int, float)
sub_740830 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	ecx, [esp+4+arg_4]
mov	eax, ecx
shr	eax, 10h
movzx	edx, al
mov	[esp+4+arg_4], edx
mov	edx, [esp+4+arg_8]
fild	[esp+4+arg_4]
mov	eax, edx
shr	eax, 10h
movzx	eax, al
fstp	[esp+4+var_4]
mov	[esp+4+arg_4], eax
push	esi
fild	[esp+8+arg_4]
mov	esi, [esp+8+arg_0]
fld	[esp+8+var_4]
fld	st
fsubp	st(2), st
fld	[esp+8+arg_C]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+8+arg_4]
fld	[esp+8+arg_4]
fld	ds:dbl_15FCC48
fadd	st(1), st
fnstcw	word ptr [esp+8+arg_4]
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
fxch	st(1)
mov	[esp+8+arg_8], eax
fldcw	word ptr [esp+8+arg_8]
fistp	[esp+8+arg_8]
movzx	eax, byte ptr [esp+8+arg_8]
mov	[esi+2], al
mov	eax, ecx
shr	eax, 8
fldcw	word ptr [esp+8+arg_4]
movzx	eax, al
mov	[esp+8+arg_4], eax
mov	eax, edx
shr	eax, 8
movzx	eax, al
fild	[esp+8+arg_4]
mov	[esp+8+arg_4], eax
fstp	[esp+8+arg_8]
fild	[esp+8+arg_4]
fld	[esp+8+arg_8]
fld	st
fsubp	st(2), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+8+arg_4]
fld	[esp+8+arg_4]
fadd	st, st(1)
fnstcw	word ptr [esp+8+arg_4]
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+arg_8], eax
fldcw	word ptr [esp+8+arg_8]
fistp	[esp+8+arg_8]
movzx	eax, byte ptr [esp+8+arg_8]
mov	[esi+1], al
movzx	eax, cl
fldcw	word ptr [esp+8+arg_4]
mov	[esp+8+arg_4], eax
movzx	eax, dl
fild	[esp+8+arg_4]
mov	[esp+8+arg_4], eax
fstp	[esp+8+arg_8]
fild	[esp+8+arg_4]
fld	[esp+8+arg_8]
fld	st
fsubp	st(2), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+8+arg_4]
fld	[esp+8+arg_4]
fadd	st, st(1)
shr	ecx, 18h
fnstcw	word ptr [esp+8+arg_4]
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+arg_8], eax
shr	edx, 18h
fldcw	word ptr [esp+8+arg_8]
fistp	[esp+8+arg_8]
movzx	eax, byte ptr [esp+8+arg_8]
mov	[esi], al
fldcw	word ptr [esp+8+arg_4]
mov	[esp+8+arg_4], ecx
fild	[esp+8+arg_4]
mov	[esp+8+arg_4], edx
fstp	[esp+8+arg_8]
fild	[esp+8+arg_4]
fld	[esp+8+arg_8]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(3), st
faddp	st(2), st
fxch	st(1)
fstp	[esp+8+arg_4]
fadd	[esp+8+arg_4]
fnstcw	word ptr [esp+8+arg_4]
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+arg_8], eax
mov	eax, esi
fldcw	word ptr [esp+8+arg_8]
fistp	[esp+8+arg_8]
mov	cl, byte ptr [esp+8+arg_8]
mov	[esi+3], cl
pop	esi
fldcw	word ptr [esp+4+arg_4]
pop	ecx
retn	10h
sub_740830 endp

align 10h



sub_7409D0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
call	sub_64A430
retn	4
sub_7409D0 endp

align 10h



sub_7409E0 proc	near
mov	eax, 2
retn	4
sub_7409E0 endp

align 10h



sub_7409F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+14h]
push	ebx
mov	ebx, [eax+10h]
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+0Ch]
call	sub_665FF0
mov	ecx, ebx
xor	ecx, edi
xor	ecx, esi
shr	ecx, 7
xor	eax, ecx
xor	eax, ebx
xor	eax, edi
pop	edi
xor	eax, esi
pop	esi
pop	ebx
retn	4
sub_7409F0 endp

align 10h



sub_740A20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, [eax]
jz	short loc_740A2D
xor	al, al
retn	8

loc_740A2D:
mov	ecx, [esp+arg_0]
mov	eax, [eax+4]
mov	edx, [ecx+8]
cmp	edx, [eax+8]
jnz	short loc_740A6A
mov	edx, [ecx+0Ch]
cmp	edx, [eax+0Ch]
jnz	short loc_740A6A
mov	edx, [ecx+10h]
cmp	edx, [eax+10h]
jnz	short loc_740A6A
mov	eax, [eax+14h]
mov	ecx, [ecx+14h]
add	eax, 10h
push	eax
add	ecx, 10h
call	sub_4E4120
test	al, al
jz	short loc_740A6A
mov	eax, 1
retn	8

loc_740A6A:
xor	eax, eax
retn	8
sub_740A20 endp

align 10h



sub_740A70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+14h]
mov	eax, [ecx+10h]
and	eax, 0FFFFFFFCh
add	eax, 8
retn	4
sub_740A70 endp

align 10h



sub_740A90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	eax, 1
mov	[esi+4], eax
mov	dword ptr [esi], offset	off_1440B78
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0
mov	dword ptr [esi+14h], 0
test	edi, edi
jz	short loc_740AC8
add	[edi+4], eax

loc_740AC8:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_740AD4
call	sub_64A400

loc_740AD4:
mov	[esi+14h], edi
mov	edi, [esp+8+arg_4]
test	edi, edi
jz	short loc_740AE6
mov	ecx, edi
call	sub_64A420

loc_740AE6:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_740AF2
call	sub_64A430

loc_740AF2:
mov	[esi+8], edi
mov	edi, [esp+8+arg_8]
test	edi, edi
jz	short loc_740B04
mov	ecx, edi
call	sub_64A420

loc_740B04:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_740B10
call	sub_64A430

loc_740B10:
mov	eax, [esp+8+arg_C]
mov	[esi+0Ch], edi
mov	[esi+10h], eax
pop	edi
mov	eax, esi
pop	esi
retn	10h
sub_740A90 endp

align 10h



sub_740B30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_740B3F
call	sub_64A400

loc_740B3F:
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_740B4B
call	sub_64A430

loc_740B4B:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_740B57
call	sub_64A430

loc_740B57:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_740B73
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_740B73:
mov	eax, esi
pop	esi
retn	4
sub_740B30 endp

align 10h



sub_740B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	esi
mov	esi, [esp+4+arg_10]
push	edi
mov	ecx, esi
test	esi, esi
jnz	short loc_740B92
mov	ecx, dword_1855FC0

loc_740B92:
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	18h
call	edx
test	eax, eax
jz	short loc_740BBC
mov	ecx, [esp+8+arg_C]
mov	edx, [esp+8+arg_8]
push	esi
push	ecx
mov	ecx, [esp+10h+arg_4]
push	edx
push	ecx
mov	ecx, eax
call	sub_740A90
mov	esi, eax
jmp	short loc_740BBE

loc_740BBC:
xor	esi, esi

loc_740BBE:
mov	edi, [esp+8+arg_0]
push	esi
push	offset off_167E03C
mov	ecx, edi
call	sub_666020
test	esi, esi
jz	short loc_740BDA
mov	ecx, esi
call	sub_64A430

loc_740BDA:
mov	eax, edi
pop	edi
pop	esi
retn
sub_740B80 endp

align 10h



; int __thiscall sub_740BE0(void *, char)
sub_740BE0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1440B7C
jz	short loc_740BF9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_740BF9:
mov	eax, esi
pop	esi
retn	4
sub_740BE0 endp

align 10h



sub_740C00 proc	near
mov	eax, [ecx+18h]
test	eax, eax
jnz	short locret_740C14
mov	ecx, [ecx+14h]
test	ecx, ecx
jz	short loc_740C12
mov	eax, [ecx+10h]
retn

loc_740C12:
xor	eax, eax

locret_740C14:
retn
sub_740C00 endp

align 10h



sub_740C20 proc	near
mov	eax, [ecx+1Ch]
test	eax, eax
jnz	short locret_740C34
mov	ecx, [ecx+14h]
test	ecx, ecx
jz	short loc_740C32
mov	eax, [ecx+14h]
retn

loc_740C32:
xor	eax, eax

locret_740C34:
retn
sub_740C20 endp

align 10h



sub_740C40 proc	near
mov	eax, ecx
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_740C6A
mov	edx, [eax+0Ch]
test	edx, edx
jz	short loc_740C6A
mov	eax, [eax+8]
push	esi
mov	esi, [ecx]
add	edx, 0Ch
push	eax
push	edx
mov	edx, [esi+4]
call	edx
pop	esi
test	al, al
jz	short loc_740C6A
mov	al, 1
retn	4

loc_740C6A:
xor	al, al
retn	4
sub_740C40 endp

align 10h



sub_740C70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
call	edx
mov	edi, eax
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
mov	ecx, eax
mov	eax, [esp+8+arg_0]
mov	[eax+0Ch], edi
pop	edi
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	[eax+8], ecx
pop	esi
retn	4
sub_740C70 endp

align 10h



sub_740CB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	dword ptr [eax], offset	off_155F500
mov	edx, 1
mov	[eax+4], edx
mov	dword ptr [eax+8], offset off_1440B7C
mov	dword ptr [eax], offset	off_1440B94
mov	dword ptr [eax+8], offset off_1440B88
test	ecx, ecx
jz	short loc_740CDF
add	[ecx+4], edx

loc_740CDF:
mov	edx, [esp+arg_8]
mov	[eax+0Ch], ecx
mov	ecx, [esp+arg_4]
mov	[eax+10h], ecx
mov	ecx, [esp+arg_C]
mov	[eax+14h], edx
mov	edx, [esp+arg_10]
mov	[eax+18h], ecx
mov	[eax+1Ch], edx
retn	14h
sub_740CB0 endp

align 10h



sub_740D10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	ecx, 8
jmp	loc_740E30
align 10h

loc_740D20:
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	edx, [eax+4]
jmp	edx
align 10h

loc_740D30:
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	edx, [eax+8]
jmp	edx
align 10h

loc_740D40:
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
jmp	eax
align 10h

loc_740D50:
mov	eax, [esp+arg_0]
mov	edx, [ecx+10h]
mov	[eax], edx
mov	edx, [ecx+14h]
mov	[eax+4], edx
mov	edx, [ecx+18h]
mov	ecx, [ecx+1Ch]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
retn	4
align 10h

loc_740D70:
push	ebx
push	ebp
push	esi
push	edi
mov	ebp, ecx
mov	ecx, [esp+10h+arg_4]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	20h
call	edx
mov	ecx, eax
test	ecx, ecx
jz	short loc_740DB7
mov	esi, [esp+10h+arg_0]
mov	edi, [esi+0Ch]
mov	ebx, [esi+8]
mov	eax, [esi+4]
mov	esi, [esi]
sub	esp, 10h
mov	edx, esp
push	ebp
mov	[edx], esi
mov	[edx+4], eax
mov	[edx+8], ebx
mov	[edx+0Ch], edi
call	sub_740CB0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_740DB7:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	8

loc_740DC0:
sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	ebx
mov	ebx, [eax+4]
push	ebp
mov	ebp, [eax+8]
push	esi
push	edi
mov	edi, [eax]
mov	eax, [eax+0Ch]
mov	esi, ecx
mov	ecx, [esp+20h+arg_4]
mov	edx, [ecx]
add	edi, [esi+10h]
add	ebx, [esi+14h]
push	0
mov	[esp+24h+var_4], eax
mov	eax, [edx+28h]
push	20h
call	eax
test	eax, eax
jz	short loc_740E1B
mov	ecx, [esp+20h+var_4]
sub	esp, 10h
mov	edx, esp
mov	[edx+0Ch], ecx
push	esi
mov	ecx, eax
mov	[edx], edi
mov	[edx+4], ebx
mov	[edx+8], ebp
call	sub_740CB0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_740E1B:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 10h
retn	8
align 10h

loc_740E30:
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_740E3F
call	sub_64A400

loc_740E3F:
mov	ecx, esi
mov	dword ptr [esi+8], offset off_1440B7C
call	sub_64A3F0
test	byte ptr [esp+4+arg_0],	1
jz	short loc_740E62
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_740E62:
mov	eax, esi
pop	esi
retn	4
sub_740D10 endp

align 10h



sub_740E70 proc	near

arg_0= byte ptr	 4

sub	ecx, 8
jmp	sub_7412F0
sub_740E70 endp

align 10h



sub_740E80 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	ebx, [esi+8]
mov	dword ptr [esi+4], 1
mov	dword ptr [ebx], offset	off_1440B7C
mov	dword ptr [esi], offset	off_1440BC0
mov	dword ptr [ebx], offset	off_1440BB4
test	edi, edi
jz	short loc_740EBB
push	1		; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd

loc_740EBB:
mov	[esi+0Ch], edi
test	edi, edi
jz	short loc_740ECC
mov	edx, [edi]
mov	eax, [edx+28h]
push	ebx
mov	ecx, edi
call	eax

loc_740ECC:
pop	edi
mov	eax, esi
mov	dword ptr [esi+10h], 1
pop	esi
pop	ebx
retn	4
sub_740E80 endp

align 10h



sub_740EE0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
lea	ebx, [esi+8]
push	edi
mov	dword ptr [esi], offset	off_1440BC0
mov	dword ptr [ebx], offset	off_1440BB4
test	ecx, ecx
jz	short loc_740F03
mov	eax, [ecx]
mov	edx, [eax+2Ch]
push	ebx
call	edx

loc_740F03:
mov	edi, [esi+0Ch]
test	edi, edi
jz	short loc_740F29
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_740F29
test	edi, edi
jz	short loc_740F29
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_740F29:
pop	edi
mov	ecx, esi
pop	esi
mov	dword ptr [ebx], offset	off_1440B7C
pop	ebx
jmp	sub_64A3F0
sub_740EE0 endp

align 10h



sub_740F40 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
mov	eax, [edi+0Ch]
test	eax, eax
jnz	loc_740FE7
push	ebx
mov	ebx, [esp+8+arg_0]
mov	eax, [ebx]
mov	edx, [eax+8]
push	ebp
push	esi
mov	ecx, ebx
call	edx
mov	esi, [edi+0Ch]
mov	ebp, eax
test	esi, esi
jz	short loc_740F86
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_740F86
test	esi, esi
jz	short loc_740F86
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_740F86:
mov	[edi+0Ch], ebp
test	ebp, ebp
jz	short loc_740FE1
mov	edx, [edi+8]
mov	eax, [edx+8]
lea	esi, [edi+8]
push	ebx
mov	ecx, esi
call	eax
test	al, al
jz	short loc_740FB4
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
call	eax
mov	eax, [edi+0Ch]
pop	esi
pop	ebp
pop	ebx
pop	edi
retn	4

loc_740FB4:
mov	esi, [edi+0Ch]
test	esi, esi
jz	short loc_740FDA
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_740FDA
test	esi, esi
jz	short loc_740FDA
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_740FDA:
mov	dword ptr [edi+0Ch], 0

loc_740FE1:
mov	eax, [edi+0Ch]
pop	esi
pop	ebp
pop	ebx

loc_740FE7:
pop	edi
retn	4
sub_740F40 endp

align 10h



sub_740FF0 proc	near

arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_741041
cmp	[esp+4+arg_4], 2
jnz	short loc_741041
mov	edx, [ecx]
lea	eax, [esi-8]
neg	eax
sbb	eax, eax
and	eax, esi
push	edi
push	eax
mov	eax, [edx+2Ch]
call	eax
mov	edi, [esi+4]
test	edi, edi
jz	short loc_741039
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_741039
test	edi, edi
jz	short loc_741039
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_741039:
mov	dword ptr [esi+4], 0
pop	edi

loc_741041:
pop	esi
retn	8
sub_740FF0 endp

align 10h



sub_741050 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax+8], offset off_1440B7C
xor	edx, edx
mov	[eax+0Ch], edx
mov	dword ptr [eax], offset	off_1440BE8
mov	dword ptr [eax+8], offset off_1440BDC
cmp	ecx, edx
jz	short loc_741083
inc	dword ptr [ecx+4]

loc_741083:
mov	[eax+14h], ecx
mov	cl, [esp+arg_4]
mov	[eax+18h], edx
mov	[eax+1Ch], edx
mov	[eax+20h], cl
mov	dword ptr [eax+10h], 1
retn	8
sub_741050 endp

align 10h



sub_7410A0 proc	near

arg_0= byte ptr	 4

sub	ecx, 8
jmp	sub_741320
sub_7410A0 endp

align 10h



sub_7410B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	dword ptr [eax], offset	off_155F500
mov	edx, 1
mov	[eax+4], edx
mov	dword ptr [eax+8], offset off_1440B7C
mov	dword ptr [eax+0Ch], 0
mov	dword ptr [eax], offset	off_1440BE8
mov	dword ptr [eax+8], offset off_1440BDC
test	ecx, ecx
jz	short loc_7410E6
add	[ecx+4], edx

loc_7410E6:
mov	[eax+14h], ecx
mov	ecx, [esp+arg_4]
mov	[eax+18h], ecx
mov	ecx, [esp+arg_8]
mov	[eax+1Ch], ecx
mov	cl, [esp+arg_C]
mov	[eax+20h], cl
mov	[eax+10h], edx
retn	10h
sub_7410B0 endp

align 10h



sub_741110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_740E80
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
xor	eax, eax
mov	dword ptr [esi], offset	off_1440BE8
mov	dword ptr [esi+8], offset off_1440BDC
mov	[esi+14h], eax
mov	[esi+20h], al
mov	[esi+18h], ecx
mov	[esi+1Ch], edx
mov	eax, esi
pop	esi
retn	0Ch
sub_741110 endp

align 10h



sub_741150 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+14h], 0
jz	short loc_7411AC
push	ebx
mov	ebx, [esp+8+arg_0]
test	ebx, ebx
jz	short loc_7411A8
cmp	ebx, [esi+10h]
jz	short loc_7411A8
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_7411A8
mov	edx, [ecx]
push	edi
lea	eax, [esi+8]
push	eax
mov	eax, [edx+2Ch]
call	eax
mov	edi, [esi+0Ch]
test	edi, edi
jz	short loc_7411A0
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7411A0
test	edi, edi
jz	short loc_7411A0
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_7411A0:
mov	dword ptr [esi+0Ch], 0
pop	edi

loc_7411A8:
mov	[esi+10h], ebx
pop	ebx

loc_7411AC:
pop	esi
retn	4
sub_741150 endp




sub_7411B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jnz	loc_741278
cmp	[esi+14h], eax
jnz	short loc_7411C7
pop	esi
retn	4

loc_7411C7:
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
mov	eax, [ebp+0]
mov	edx, [eax+8]
push	edi
mov	ecx, ebp
call	edx
mov	edi, [esi+0Ch]
mov	ebx, eax
test	edi, edi
jz	short loc_741200
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_741200
test	edi, edi
jz	short loc_741200
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_741200:
mov	[esi+0Ch], ebx
test	ebx, ebx
jz	short loc_741253
mov	edx, [esi+8]
mov	eax, [edx+8]
lea	edi, [esi+8]
push	ebp
mov	ecx, edi
call	eax
test	al, al
jz	short loc_741226
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
call	eax
jmp	short loc_741253

loc_741226:
mov	edi, [esi+0Ch]
test	edi, edi
jz	short loc_74124C
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_74124C
test	edi, edi
jz	short loc_74124C
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_74124C:
mov	dword ptr [esi+0Ch], 0

loc_741253:
cmp	dword ptr [esi+0Ch], 0
pop	edi
pop	ebp
pop	ebx
jz	short loc_741275
cmp	byte ptr [esi+20h], 0
jz	short loc_741275
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_74126E
call	sub_64A400

loc_74126E:
mov	dword ptr [esi+14h], 0

loc_741275:
mov	eax, [esi+0Ch]

loc_741278:
pop	esi
retn	4
sub_7411B0 endp

align 10h



sub_741280 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
push	edi
push	eax
mov	esi, ecx
call	sub_740FF0
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_7412E3
cmp	edi, 1
jnz	short loc_7412E3
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_7412E3
mov	edx, [ecx]
lea	eax, [esi-8]
neg	eax
sbb	eax, eax
and	eax, esi
push	eax
mov	eax, [edx+2Ch]
call	eax
mov	edi, [esi+4]
test	edi, edi
jz	short loc_7412DC
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7412DC
test	edi, edi
jz	short loc_7412DC
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_7412DC:
mov	dword ptr [esi+4], 0

loc_7412E3:
pop	edi
pop	esi
retn	8
sub_741280 endp

align 10h



sub_7412F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_740EE0
test	[esp+4+arg_0], 1
jz	short loc_74130D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_74130D:
mov	eax, esi
pop	esi
retn	4
sub_7412F0 endp

align 10h



sub_741320 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1440BE8
mov	dword ptr [esi+8], offset off_1440BDC
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_74133C
call	sub_64A400

loc_74133C:
mov	ecx, esi
call	sub_740EE0
test	[esp+4+arg_0], 1
jz	short loc_741358
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_741358:
mov	eax, esi
pop	esi
retn	4
sub_741320 endp

align 10h



sub_741360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_0]
mov	eax, [esp+arg_4]
push	esi
lea	esp, [esp+0]

loc_741370:
movzx	ecx, word ptr [edx+eax*2]
cmp	cx, 9
jz	short loc_741390
cmp	cx, 0Dh
jz	short loc_741390
cmp	cx, 20h
jz	short loc_741390
mov	esi, 3000h
cmp	cx, si
jnz	short loc_741393

loc_741390:
inc	eax
jmp	short loc_741370

loc_741393:
pop	esi
test	edx, edx
jz	short loc_7413A0
cmp	word ptr [edx+eax*2], 0Ah
jnz	short loc_7413A0
inc	eax

loc_7413A0:
cmp	eax, [esp+arg_8]
jbe	short locret_7413A9
or	eax, 0FFFFFFFFh

locret_7413A9:
retn	0Ch
sub_741360 endp

align 10h



sub_7413B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	edi
test	eax, eax
jl	short loc_7413FA
mov	esi, [esp+8+arg_0]
mov	edi, edi

loc_7413C0:
movzx	edx, word ptr [esi+eax*2]
movzx	ecx, dx
cmp	cx, 9
jz	short loc_7413E9
cmp	cx, 0Dh
jz	short loc_7413E9
cmp	cx, 20h
jz	short loc_7413E9
mov	edi, 3000h
cmp	cx, di
jz	short loc_7413E9
cmp	dx, 0Ah
jnz	short loc_7413F6

loc_7413E9:
sub	eax, 1
jns	short loc_7413C0
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn	8

loc_7413F6:
test	eax, eax
jge	short loc_7413FD

loc_7413FA:
or	eax, 0FFFFFFFFh

loc_7413FD:
pop	edi
pop	esi
retn	8
sub_7413B0 endp

align 10h



sub_741410 proc	near

arg_0= byte ptr	 4
arg_4= word ptr	 8
arg_8= byte ptr	 0Ch

test	[esp+arg_0], 2
jnz	short loc_74141C
xor	al, al
retn	0Ch

loc_74141C:
push	esi
push	edi
mov	di, [esp+8+arg_4]
xor	ecx, ecx
mov	esi, 6Fh
lea	ebx, [ebx+0]

loc_741430:
mov	eax, esi
sub	eax, ecx
cdq
sub	eax, edx
sar	eax, 1
add	eax, ecx
movzx	edx, word_167E040[eax*4]
cmp	di, dx
jz	short loc_74145D
jnb	short loc_74144F
lea	esi, [eax-1]
jmp	short loc_741452

loc_74144F:
lea	ecx, [eax+1]

loc_741452:
cmp	ecx, esi
jle	short loc_741430
pop	edi
xor	al, al
pop	esi
retn	0Ch

loc_74145D:
mov	cl, [esp+8+arg_8]
test	byte_167E042[eax*4], cl
mov	eax, 0
pop	edi
setnz	al
pop	esi
retn	0Ch
sub_741410 endp

align 10h



sub_741480 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

test	byte ptr [esp+arg_0], 7
jz	loc_741531
mov	ecx, [esp+arg_14]
test	ecx, ecx
jbe	loc_741531
mov	eax, [esp+arg_10]
mov	edx, [esp+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_C]
push	esi
lea	ebx, [ecx-1]
mov	esi, ebx
sub	ebp, eax
push	edi
lea	edi, [edx+eax*2]
test	esi, esi
jbe	short loc_741518

loc_7414B5:
movzx	eax, word ptr [edi+esi*2]
cmp	ax, 9
jz	short loc_7414D5
cmp	ax, 0Dh
jz	short loc_7414D5
cmp	ax, 20h
jz	short loc_7414D5
mov	ecx, 3000h
cmp	ax, cx
jnz	short loc_7414E4

loc_7414D5:
push	esi
push	edi
call	sub_7413B0
cmp	eax, 0FFFFFFFFh
jz	short loc_741508
lea	esi, [eax+1]

loc_7414E4:
test	esi, esi
jz	short loc_741501
movzx	edx, word ptr [edi+esi*2]
movzx	eax, word ptr [edi+esi*2-2]
mov	ecx, [esp+10h+arg_0]
push	edx
push	eax
push	ecx
call	sub_71DD70
test	al, al
jnz	short loc_741516

loc_741501:
sub	esi, 1
jnz	short loc_7414B5
jmp	short loc_741516

loc_741508:
lea	edx, [ebp-1]
push	edx
inc	esi
push	esi
push	edi
call	sub_741360
mov	esi, eax

loc_741516:
test	esi, esi

loc_741518:
jz	short loc_741528
dec	ebp
push	ebp
push	esi
push	edi
call	sub_741360
cmp	eax, 0FFFFFFFFh
jnz	short loc_74152A

loc_741528:
mov	eax, ebx

loc_74152A:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	18h

loc_741531:
or	eax, 0FFFFFFFFh
retn	18h
sub_741480 endp

align 10h



; int __stdcall	sub_741540(int,	char *Format, va_list ArgList)
sub_741540 proc	near

DstBuf=	byte ptr -804h
var_5= byte ptr	-5
var_4= dword ptr -4
Format=	dword ptr  8
ArgList= dword ptr  0Ch

sub	esp, 804h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+804h+var_4], eax
mov	ecx, [esp+804h+ArgList]
mov	eax, [esp+804h+Format]
push	ecx		; ArgList
push	eax		; Format
push	0FFFFFFFFh	; MaxCount
lea	eax, [esp+810h+DstBuf]
push	800h		; SizeInBytes
push	eax		; DstBuf
mov	[esp+818h+DstBuf], 0
call	__vsnprintf_s
add	esp, 14h
cmp	eax, 0FFFFFFFFh
jnz	short loc_74158A
mov	[esp+804h+var_5], 0

loc_74158A:
lea	ecx, [esp+804h+DstBuf]
push	ecx		; lpOutputString
call	ds:OutputDebugStringA
mov	ecx, [esp+804h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 804h
retn	0Ch
sub_741540 endp

align 10h



sub_7415B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
lea	edx, [eax+3]
shr	edx, 2
add	eax, edx
cmp	eax, 0FFh
ja	short loc_7415D5
movzx	eax, byte ptr [eax+ecx+7F0h]
mov	eax, dword_167E204[eax*4]
retn	4

loc_7415D5:
mov	eax, 0FFh
retn	4
sub_7415B0 endp

align 10h



; int __stdcall	sub_7415E0(int,	int, float, int, float)
sub_7415E0 proc	near

var_18=	qword ptr -18h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_C]
cmp	byte ptr [ecx+8], 0
jnz	loc_741739
cmp	byte ptr [ecx+9], 0
jnz	loc_741739
mov	eax, [esp+0Ch+arg_4]
fild	[esp+0Ch+arg_4]
test	eax, eax
jge	short loc_741610
fadd	ds:flt_15FCC08

loc_741610:
fmul	[esp+0Ch+arg_8]
fnstcw	word ptr [esp+0Ch+arg_C]
movzx	eax, word ptr [esp+0Ch+arg_C]
fadd	ds:dbl_15FCC48
or	eax, 0C00h
test	byte ptr [ecx+7], 1
mov	[esp+0Ch+arg_4], eax
fldcw	word ptr [esp+0Ch+arg_4]
fistp	[esp+0Ch+var_8]
mov	eax, dword ptr [esp+0Ch+var_8]
fldcw	word ptr [esp+0Ch+arg_C]
jnz	short loc_74164A
push	eax
mov	ecx, esi
call	sub_7415B0

loc_74164A:
mov	[esp+0Ch+arg_C], eax
fild	[esp+0Ch+arg_C]
push	edi
test	eax, eax
jge	short loc_74165D
fadd	ds:flt_15FCC08

loc_74165D:
mov	edi, [esp+10h+arg_0]
fstp	[esp+10h+arg_C]
fld	dword ptr [edi+0Ch]
sub	esp, 8
fmul	[esp+18h+arg_C]
fmul	ds:dbl_143B738
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fstp	[esp+18h+var_18]
call	_ceil
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fstp	[esp+18h+var_8]
fld	dword ptr [edi+4]
fmul	[esp+18h+arg_C]
fmul	ds:dbl_143B738
fstp	[esp+18h+arg_C]
fld	[esp+18h+arg_C]
fstp	[esp+18h+var_18]
call	_floor
fstp	[esp+18h+arg_C]
add	esp, 8
fld	[esp+10h+arg_C]
fsubr	[esp+10h+var_8]
fnstcw	word ptr [esp+10h+arg_C]
movzx	eax, word ptr [esp+10h+arg_C]
or	eax, 0C00h
mov	[esp+10h+arg_4], eax
fldcw	word ptr [esp+10h+arg_4]
fistp	[esp+10h+var_8]
mov	ecx, dword ptr [esp+10h+var_8]
inc	ecx
fldcw	word ptr [esp+10h+arg_C]
mov	[esp+10h+arg_C], ecx
fild	[esp+10h+arg_C]
test	ecx, ecx
jge	short loc_7416FA
fadd	ds:flt_15FCC08

loc_7416FA:
mov	edx, [esi+5Ch]
mov	eax, [esi+58h]
add	edx, edx
sub	eax, edx
mov	[esp+10h+arg_C], eax
fild	[esp+10h+arg_C]
test	eax, eax
jge	short loc_741716
fadd	ds:flt_15FCC08

loc_741716:
fmul	[esp+10h+arg_10]
pop	edi
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_741730
mov	eax, 1
pop	esi
add	esp, 8
retn	14h

loc_741730:
xor	eax, eax
pop	esi
add	esp, 8
retn	14h

loc_741739:
mov	al, 1
pop	esi
add	esp, 8
retn	14h
sub_7415E0 endp

align 10h



sub_741750 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_143F684
jz	short loc_74176E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_74176E:
mov	eax, esi
pop	esi
retn	4
sub_741750 endp

align 10h



; int __stdcall	sub_741780(float)
sub_741780 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 18h
fld	[esp+18h+arg_0]
push	esi
mov	esi, ecx
fst	dword ptr [esi+9D4h]
fchs
call	__CItan
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fstp	[esp+1Ch+var_14]
fldz
call	__CItan
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fstp	[esp+1Ch+var_C]
fld1
fst	dword ptr [esi+9E0h]
fld	[esp+1Ch+var_14]
fstp	dword ptr [esi+9E4h]
fldz
fst	dword ptr [esi+9E8h]
fld	[esp+1Ch+var_C]
fstp	dword ptr [esi+9ECh]
fxch	st(1)
fstp	dword ptr [esi+9F0h]
fstp	dword ptr [esi+9F4h]
pop	esi
add	esp, 18h
retn	4
sub_741780 endp

align 10h



sub_7417F0 proc	near
push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+9F8h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
cmp	byte ptr [esi+24h], 0
jz	short loc_74183A
add	dword ptr [esi+2Ch], 0FFFFFFFFh
jnz	short loc_74183A
mov	eax, [esi+28h]
mov	[esi+2Ch], eax
mov	eax, [esi+90Ch]
lea	ecx, [esi+908h]
cmp	eax, ecx
jz	short loc_74182F
mov	dl, 7Fh

loc_741825:
and	[eax+0Fh], dl
mov	eax, [eax+4]
cmp	eax, ecx
jnz	short loc_741825

loc_74182F:
lea	ecx, [esi+75Ch]
call	sub_7522C0

loc_74183A:
mov	al, 1
push	edi		; lpCriticalSection
mov	[esi+25h], al
mov	[esi+26h], al
call	ds:LeaveCriticalSection
pop	edi
pop	esi
retn
sub_7417F0 endp

align 10h



sub_741850 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
call	sub_7417F0
cmp	[esp+4+arg_4], 1
jnz	short loc_741890
mov	eax, [esi+10h]
mov	eax, [eax+4]
test	eax, eax
jz	short loc_741890
cmp	eax, [esp+4+arg_0]
jnz	short loc_741890
mov	eax, [esi+10h]
mov	ecx, [eax+4]
mov	edx, [ecx]
add	eax, 10h
push	eax
mov	eax, [edx+0C8h]
call	eax
mov	ecx, [esi+10h]
mov	dword ptr [ecx+4], 0

loc_741890:
pop	esi
retn	8
sub_741850 endp

align 10h



sub_7418A0 proc	near
mov	edx, [ecx]
mov	eax, [ecx+4]
push	esi
mov	esi, [edx]
cmp	eax, [esi+4]
jg	short loc_7418DC
inc	eax
mov	[ecx+4], eax
mov	esi, [edx]
cmp	eax, [esi+4]
ja	short loc_7418DC
push	ebx
mov	esi, 0FFFFFFFEh
push	edi
nop

loc_7418C0:
mov	ebx, [edx]
lea	edi, [eax+eax*8]
cmp	[ebx+edi*4+8], esi
jnz	short loc_7418DA
inc	eax
mov	[ecx+4], eax
mov	edi, edx
mov	edi, [edi]
mov	ebx, eax
cmp	ebx, [edi+4]
jbe	short loc_7418C0

loc_7418DA:
pop	edi
pop	ebx

loc_7418DC:
pop	esi
retn
sub_7418A0 endp

align 10h



sub_7418E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_741910
mov	eax, [edi]
test	eax, eax
jz	short loc_741905
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_741905:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_741910:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_741941
mov	edx, [ecx]
push	ebx
mov	ebx, esi
shl	ebx, 5
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_741941:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
shl	eax, 5
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 0C2h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_7418E0 endp

align 10h



sub_741970 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_7419B2
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_741981:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_741994
mov	dword ptr [eax], 0FFFFFFFEh

loc_741994:
add	ecx, 24h
sub	edx, 1
jnz	short loc_741981
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_7419B2:
pop	esi
retn
sub_741970 endp

align 10h



sub_7419C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_741A02
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_7419D1:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_7419E4
mov	dword ptr [eax], 0FFFFFFFEh

loc_7419E4:
add	ecx, 18h
sub	edx, 1
jnz	short loc_7419D1
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_741A02:
pop	esi
retn
sub_7419C0 endp

align 10h



sub_741A10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_741A23
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_741A45

loc_741A23:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_741A4A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_741A45:
call	sub_7424F0

loc_741A4A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ebp, [esi+edx*4+8]
lea	ecx, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_741A7E
mov	edx, [esp+8+arg_4]
mov	dword ptr [ecx], 0FFFFFFFFh
mov	edx, [edx]
pop	esi
mov	[ecx+8], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_741A7E:
push	edi
mov	edi, [esi+4]
mov	edx, eax
push	ebx

loc_741A85:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_741A85
lea	edi, [edx+edx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [ecx+4]
cmp	edi, eax
jnz	short loc_741AC7
test	ebx, ebx
jz	short loc_741AB2
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_741AB2:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebx
pop	edi
mov	[ecx+8], esi
pop	esi
mov	[ecx], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_741AC7:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_741AE3

loc_741AD4:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_741AD4

loc_741AE3:
test	ebx, ebx
jz	short loc_741AF5
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	esi, [ecx+8]
mov	[ebx+8], esi

loc_741AF5:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[ecx+8], edx
mov	dword ptr [ecx], 0FFFFFFFFh
mov	[ecx+4], eax
pop	ebp
retn	0Ch
sub_741A10 endp




sub_741B10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*8]
cmp	dword ptr [esi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*4+8]
mov	eax, edx
jz	short loc_741B5F
cmp	[ecx+4], edx
jnz	short loc_741B5F
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_741B32:
cmp	[ecx+4], edx
jnz	short loc_741B46
mov	ebx, [ecx+8]
cmp	ebx, [edi]
jnz	short loc_741B46
mov	ebx, [ecx+0Ch]
cmp	ebx, [edi+4]
jz	short loc_741B59

loc_741B46:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_741B56
lea	ecx, [eax+eax*8]
lea	ecx, [esi+ecx*4+8]
jmp	short loc_741B32

loc_741B56:
or	eax, 0FFFFFFFFh

loc_741B59:
pop	ebx
pop	edi
pop	esi
retn	8

loc_741B5F:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_741B10 endp

align 10h



sub_741B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [ecx]
push	edi
mov	edi, [esp+8+arg_4]
lea	ecx, [edi+edi*2]
cmp	dword ptr [ebp+ecx*8+8], 0FFFFFFFEh
lea	ecx, [ebp+ecx*8+8]
mov	eax, edi
jz	short loc_741BD9
cmp	[ecx+4], edi
jnz	short loc_741BD9
push	esi
mov	esi, [esp+0Ch+arg_0]

loc_741B92:
cmp	[ecx+4], edi
jnz	short loc_741BC0
mov	edx, [ecx+8]
cmp	edx, [esi]
jnz	short loc_741BC0
mov	dx, [ecx+0Ch]
cmp	dx, [esi+4]
jnz	short loc_741BC0
mov	dl, [ecx+0Eh]
cmp	dl, [esi+6]
jnz	short loc_741BC0
mov	dl, [ecx+0Fh]
cmp	dl, [esi+7]
jnz	short loc_741BC0
mov	dl, [ecx+10h]
cmp	dl, [esi+8]
jz	short loc_741BD3

loc_741BC0:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_741BD0
lea	ecx, [eax+eax*2]
lea	ecx, [ebp+ecx*8+8]
jmp	short loc_741B92

loc_741BD0:
or	eax, 0FFFFFFFFh

loc_741BD3:
pop	esi
pop	edi
pop	ebp
retn	8

loc_741BD9:
pop	edi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8
sub_741B70 endp

align 10h



sub_741BF0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
add	ecx, 10h
mov	[eax+0Ch], edx
mov	edx, [ecx]
mov	[eax+10h], edx
mov	edx, [ecx+4]
mov	[eax+14h], edx
mov	edx, [ecx+8]
mov	[eax+18h], edx
mov	edx, [ecx+0Ch]
mov	[eax+1Ch], edx
mov	ecx, [ecx+10h]
mov	[eax+20h], ecx
retn	4
sub_741BF0 endp

align 10h



sub_741C30 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+0Ch]
mov	edx, [eax]
push	esi
mov	esi, [eax+4]
mov	[edx+4], esi
mov	edx, [eax+4]
mov	esi, [eax]
mov	[edx], esi
mov	edx, [ecx+30h]
add	ecx, 30h
mov	[eax], edx
mov	[eax+4], ecx
mov	edx, [ecx]
mov	[edx+4], eax
mov	[ecx], eax
pop	esi
retn	4
sub_741C30 endp

align 10h



sub_741C60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
push	edi
call	sub_733930
test	al, al
jz	short loc_741CA3
mov	eax, [edi+0Ch]
mov	edx, [eax]
lea	ecx, [esi+740h]
mov	esi, [eax+4]
mov	[edx+4], esi
mov	edx, [eax+4]
mov	esi, [eax]
mov	[edx], esi
mov	edx, [ecx]
mov	[eax], edx
mov	[eax+4], ecx
mov	edx, [ecx]
mov	[edx+4], eax
pop	edi
mov	[ecx], eax
mov	al, 1
pop	esi
retn	8

loc_741CA3:
pop	edi
xor	al, al
pop	esi
retn	8
sub_741C60 endp

align 10h



sub_741CB0 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	edi
mov	ebx, ecx
mov	esi, eax
lea	edi, [ebx+0Ch]
mov	ecx, 7
rep movsd
mov	ecx, [eax+18h]
mov	edx, [eax+14h]
push	ecx
mov	ecx, [eax+10h]
push	edx
mov	edx, [eax+0Ch]
push	ecx
mov	ecx, [eax+8]
push	edx
mov	edx, [eax+4]
mov	eax, [eax]
push	ecx
mov	ecx, [ebx+48h]
push	edx
push	eax
add	ecx, 4Ch
call	sub_7545E0
mov	ecx, [ebx+48h]
mov	edx, [ebx+34h]
mov	[ecx+9D0h], edx
fld	dword ptr [ebx+38h]
push	ecx		; float
mov	ecx, [ebx+48h]
fstp	[esp+10h+var_10]
call	sub_741780
mov	eax, [ebx+48h]
fld	dword ptr [ebx+3Ch]
fstp	dword ptr [eax+9D8h]
mov	eax, [ebx+44h]
mov	ebx, [ebx+48h]
pop	edi
pop	esi
mov	[ebx+2Ch], eax
mov	[ebx+28h], eax
pop	ebx
retn	4
sub_741CB0 endp

align 10h



sub_741D30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, ecx
mov	ecx, [esp+8+arg_0]
fld	dword ptr [ecx+4]
fstp	[esp+8+arg_0]
fld	dword ptr [ecx+8]
fstp	[esp+8+var_8]
fld	dword ptr [ecx+0Ch]
fstp	[esp+8+var_4]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
fld	[esp+8+arg_0]
fstp	dword ptr [eax+4]
fld	[esp+8+var_8]
fstp	dword ptr [eax+8]
fld	[esp+8+var_4]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+14h]
fstp	[esp+8+arg_0]
fld	dword ptr [ecx+18h]
fstp	[esp+8+var_4]
fld	dword ptr [ecx+1Ch]
fstp	[esp+8+var_8]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+10h]
fld	[esp+8+arg_0]
fstp	dword ptr [eax+14h]
fld	[esp+8+var_4]
fstp	dword ptr [eax+18h]
fld	[esp+8+var_8]
fstp	dword ptr [eax+1Ch]
mov	ecx, [ecx+20h]
mov	[eax+20h], ecx
add	esp, 8
retn	4
sub_741D30 endp

align 10h



sub_741DA0 proc	near

var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 3Ch
fld	ds:flt_15FD598
mov	eax, [esp+3Ch+arg_0]
mov	ecx, [eax+18h]
fst	[esp+3Ch+var_38]
fst	[esp+3Ch+var_34]
push	ebp
fld	ds:flt_143F77C
xor	ebp, ebp
fst	[esp+40h+var_30]
mov	dl, 1
fst	[esp+40h+var_2C]
mov	[esp+40h+var_39], dl
fst	[esp+40h+var_20]
mov	[esp+40h+var_18], ebp
fstp	[esp+40h+var_1C]
mov	[esp+40h+var_C], ecx
fst	[esp+40h+var_28]
fstp	[esp+40h+var_24]
test	ecx, ecx
jbe	loc_742265
fldz
mov	eax, [eax+24h]
fld	[esp+40h+var_38]
push	ebx
fld	[esp+44h+var_34]
push	esi
fld	[esp+48h+var_30]
mov	[esp+48h+var_14], eax
fld	[esp+48h+var_2C]
push	edi

loc_741E0B:
mov	eax, ebp
and	eax, 3Fh
mov	ecx, ebp
shr	ecx, 6
lea	edx, [eax+eax*2]
mov	eax, [esp+4Ch+var_14]
mov	ecx, [eax+ecx*4]
mov	edi, [ecx+edx*8+4]
lea	ecx, [ecx+edx*8]
cmp	edi, 2
jbe	loc_742233
mov	ebx, [ecx+8]
fxch	st(4)
mov	edx, [ecx]
fst	[esp+4Ch+arg_0]
mov	esi, [edx+14h]
lea	eax, [ebx+edi-1]
mov	ecx, eax
shr	ecx, 8
mov	ecx, [esi+ecx*4]
and	eax, 0FFh
mov	edx, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	[esp+4Ch+var_4], eax
xor	eax, eax
cmp	edi, 4
mov	[esp+4Ch+var_8], edx
jl	loc_742112
lea	ebp, [edi-4]
shr	ebp, 2
inc	ebp
lea	ecx, ds:0[ebp*4]
lea	edx, [ebx+2]
mov	[esp+4Ch+var_10], ecx

loc_741E7D:
lea	eax, [edx-2]
shr	eax, 8
mov	eax, [esi+eax*4]
lea	ecx, [edx-2]
and	ecx, 0FFh
fld	dword ptr [eax+ecx*8]
lea	ecx, [eax+ecx*8]
fcomp	st(4)
fnstsw	ax
test	ah, 5
jp	short loc_741EAC
fstp	st(3)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_38]
fld	[esp+4Ch+var_38]
fxch	st(3)

loc_741EAC:
fld	dword ptr [ecx+4]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_741EC7
fstp	st(2)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_34]
fld	[esp+4Ch+var_34]
fxch	st(2)

loc_741EC7:
fld	dword ptr [ecx]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_741EE0
fstp	st(1)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_30]
fld	[esp+4Ch+var_30]
fxch	st(1)

loc_741EE0:
fld	dword ptr [ecx+4]
fcomp	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_741EFB
fstp	st(4)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_2C]
fxch	st(4)

loc_741EFB:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fmul	[esp+4Ch+var_8]
mov	[esp+4Ch+var_8], eax
fld	dword ptr [ecx]
mov	ecx, [ecx+4]
fmul	[esp+4Ch+var_4]
mov	[esp+4Ch+var_4], ecx
lea	eax, [edx-1]
shr	eax, 8
mov	eax, [esi+eax*4]
fsubp	st(1), st
lea	ecx, [edx-1]
and	ecx, 0FFh
fadd	[esp+4Ch+arg_0]
lea	ecx, [eax+ecx*8]
fstp	[esp+4Ch+arg_0]
fld	dword ptr [ecx]
fcomp	st(4)
fnstsw	ax
test	ah, 5
jp	short loc_741F4D
fstp	st(3)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_38]
fld	[esp+4Ch+var_38]
fxch	st(3)

loc_741F4D:
fld	dword ptr [ecx+4]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_741F68
fstp	st(2)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_34]
fld	[esp+4Ch+var_34]
fxch	st(2)

loc_741F68:
fld	dword ptr [ecx]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_741F81
fstp	st(1)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_30]
fld	[esp+4Ch+var_30]
fxch	st(1)

loc_741F81:
fld	dword ptr [ecx+4]
fcomp	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_741F9C
fstp	st(4)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_2C]
fxch	st(4)

loc_741F9C:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fmul	[esp+4Ch+var_8]
mov	[esp+4Ch+var_8], eax
fld	dword ptr [ecx]
mov	ecx, [ecx+4]
fmul	[esp+4Ch+var_4]
mov	[esp+4Ch+var_4], ecx
mov	eax, edx
shr	eax, 8
mov	eax, [esi+eax*4]
fsubp	st(1), st
mov	ecx, edx
and	ecx, 0FFh
fadd	[esp+4Ch+arg_0]
lea	ecx, [eax+ecx*8]
fstp	[esp+4Ch+arg_0]
fld	dword ptr [ecx]
fcomp	st(4)
fnstsw	ax
test	ah, 5
jp	short loc_741FEC
fstp	st(3)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_38]
fld	[esp+4Ch+var_38]
fxch	st(3)

loc_741FEC:
fld	dword ptr [ecx+4]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_742007
fstp	st(2)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_34]
fld	[esp+4Ch+var_34]
fxch	st(2)

loc_742007:
fld	dword ptr [ecx]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_742020
fstp	st(1)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_30]
fld	[esp+4Ch+var_30]
fxch	st(1)

loc_742020:
fld	dword ptr [ecx+4]
fcomp	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_74203B
fstp	st(4)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_2C]
fxch	st(4)

loc_74203B:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fmul	[esp+4Ch+var_8]
mov	[esp+4Ch+var_8], eax
fld	dword ptr [ecx]
mov	ecx, [ecx+4]
fmul	[esp+4Ch+var_4]
mov	[esp+4Ch+var_4], ecx
lea	eax, [edx+1]
mov	ecx, eax
fsubp	st(1), st
shr	ecx, 8
mov	ecx, [esi+ecx*4]
and	eax, 0FFh
fadd	[esp+4Ch+arg_0]
lea	ecx, [ecx+eax*8]
fstp	[esp+4Ch+arg_0]
fld	dword ptr [ecx]
fcomp	st(4)
fnstsw	ax
test	ah, 5
jp	short loc_74208B
fstp	st(3)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_38]
fld	[esp+4Ch+var_38]
fxch	st(3)

loc_74208B:
fld	dword ptr [ecx+4]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_7420A6
fstp	st(2)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_34]
fld	[esp+4Ch+var_34]
fxch	st(2)

loc_7420A6:
fld	dword ptr [ecx]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_7420BF
fstp	st(1)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_30]
fld	[esp+4Ch+var_30]
fxch	st(1)

loc_7420BF:
fld	dword ptr [ecx+4]
fcomp	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_7420DA
fstp	st(4)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_2C]
fxch	st(4)

loc_7420DA:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fmul	[esp+4Ch+var_8]
add	edx, 4
sub	ebp, 1
fld	dword ptr [ecx]
fmul	[esp+4Ch+var_4]
mov	ecx, [ecx+4]
mov	[esp+4Ch+var_8], eax
mov	[esp+4Ch+var_4], ecx
fsubp	st(1), st
fadd	[esp+4Ch+arg_0]
fstp	[esp+4Ch+arg_0]
jnz	loc_741E7D
mov	eax, [esp+4Ch+var_10]
mov	ebp, [esp+4Ch+var_18]

loc_742112:
cmp	eax, edi
jnb	loc_7421C9
lea	edx, [ebx+eax]
sub	edi, eax

loc_74211F:
mov	eax, edx
shr	eax, 8
mov	eax, [esi+eax*4]
mov	ecx, edx
and	ecx, 0FFh
fld	dword ptr [eax+ecx*8]
lea	ecx, [eax+ecx*8]
fcomp	st(4)
fnstsw	ax
test	ah, 5
jp	short loc_74214C
fstp	st(3)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_38]
fld	[esp+4Ch+var_38]
fxch	st(3)

loc_74214C:
fld	dword ptr [ecx+4]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_742167
fstp	st(2)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_34]
fld	[esp+4Ch+var_34]
fxch	st(2)

loc_742167:
fld	dword ptr [ecx]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_742180
fstp	st(1)
fld	dword ptr [ecx]
fstp	[esp+4Ch+var_30]
fld	[esp+4Ch+var_30]
fxch	st(1)

loc_742180:
fld	dword ptr [ecx+4]
fcomp	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_74219B
fstp	st(4)
fld	dword ptr [ecx+4]
fstp	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_2C]
fxch	st(4)

loc_74219B:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fmul	[esp+4Ch+var_8]
inc	edx
sub	edi, 1
fld	dword ptr [ecx]
fmul	[esp+4Ch+var_4]
mov	ecx, [ecx+4]
mov	[esp+4Ch+var_8], eax
mov	[esp+4Ch+var_4], ecx
fsubp	st(1), st
fadd	[esp+4Ch+arg_0]
fstp	[esp+4Ch+arg_0]
jnz	loc_74211F

loc_7421C9:
fld	[esp+4Ch+var_28]
fcomp	st(4)
fnstsw	ax
test	ah, 41h
jz	short loc_7421FD
fld	[esp+4Ch+var_24]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jz	short loc_7421FD
fld	[esp+4Ch+var_20]
fcomp	st(2)
fnstsw	ax
test	ah, 5
jnp	short loc_7421FD
fld	[esp+4Ch+var_1C]
fcomp	st(5)
fnstsw	ax
test	ah, 5
jp	short loc_742261

loc_7421FD:
fxch	st(3)
fst	[esp+4Ch+var_28]
fxch	st(2)
fst	[esp+4Ch+var_24]
fxch	st(1)
fst	[esp+4Ch+var_20]
fxch	st(4)
fst	[esp+4Ch+var_1C]
fxch	st(3)
fcom	[esp+4Ch+arg_0]
fnstsw	ax
test	ah, 5
jp	short loc_74225A
mov	[esp+4Ch+var_39], 1

loc_742227:
fxch	st(4)
fxch	st(2)
fxch	st(3)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_742233:
inc	ebp
mov	[esp+4Ch+var_18], ebp
cmp	ebp, [esp+4Ch+var_C]
jb	loc_741E0B
mov	al, [esp+4Ch+var_39]
fstp	st
fstp	st
pop	edi
fstp	st
pop	esi
fstp	st
pop	ebx
fstp	st
pop	ebp
add	esp, 3Ch
retn	4

loc_74225A:
mov	[esp+4Ch+var_39], 0
jmp	short loc_742227

loc_742261:
fxch	st(4)
jmp	short loc_742233

loc_742265:
mov	al, dl
pop	ebp
add	esp, 3Ch
retn	4
sub_741DA0 endp

align 10h



sub_742270 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_74229B
push	esi
lea	ebx, [ebx+0]

loc_742280:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax+7F0h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_742280
pop	esi

loc_74229B:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	dword ptr [edi+8], 7Fh
mov	dword ptr [edi+0Ch], 0
pop	edi
retn
sub_742270 endp

align 10h



sub_7422C0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_7422D3
mov	ecx, [eax]
mov	[esi+0Ch], ecx
pop	esi
pop	ecx
retn

loc_7422D3:
mov	ecx, [esi+8]
cmp	ecx, 7Fh
jnb	short loc_7422EA
mov	eax, ecx
shl	eax, 4
add	eax, [esi+4]
inc	ecx
mov	[esi+8], ecx
pop	esi
pop	ecx
retn

loc_7422EA:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
push	edi
lea	edi, [esp+0Ch+var_4]
push	edi
mov	[esp+10h+var_4], 0C2h
mov	edx, [ecx]
push	7F4h
push	eax
mov	eax, [edx+38h]
call	eax
mov	dword ptr [eax+7F0h], 0
mov	ecx, [esi+4]
pop	edi
test	ecx, ecx
jz	short loc_742333
mov	[ecx+7F0h], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn

loc_742333:
mov	[esi], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn
sub_7422C0 endp

align 10h



sub_742350 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_742362
mov	ecx, [eax]
mov	[esi+0Ch], ecx
jmp	short loc_7423C3

loc_742362:
mov	ecx, [esi+8]
cmp	ecx, 7Fh
jnb	short loc_742379
mov	eax, [esi+4]
lea	edx, [ecx+ecx*2]
inc	ecx
lea	eax, [eax+edx*8]
mov	[esi+8], ecx
jmp	short loc_7423C3

loc_742379:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
push	ebx
lea	ebx, [esp+0Ch+var_4]
push	ebx
mov	[esp+10h+var_4], 0C4h
mov	edx, [ecx]
push	0BECh
push	eax
mov	eax, [edx+38h]
call	eax
mov	dword ptr [eax+0BE8h], 0
mov	ecx, [esi+4]
pop	ebx
test	ecx, ecx
jz	short loc_7423B7
mov	[ecx+0BE8h], eax
jmp	short loc_7423B9

loc_7423B7:
mov	[esi], eax

loc_7423B9:
mov	[esi+4], eax
mov	dword ptr [esi+8], 1

loc_7423C3:
pop	esi
test	eax, eax
jz	short loc_7423CF
mov	dword ptr [eax+14h], 0

loc_7423CF:
pop	ecx
retn
sub_742350 endp

align 10h



sub_7423E0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, [ecx]
mov	[esp+18h+var_4], ecx
test	esi, esi
jz	loc_7424E6
mov	eax, [esp+18h+arg_0]
mov	cl, [eax+7]
mov	dl, [eax+8]
push	ebx
mov	bl, [eax+6]
push	ebp
movzx	ebp, word ptr [eax+4]
push	edi
mov	edi, [eax]
mov	[esp+24h+var_8], ebp
movzx	ebp, bp
mov	eax, edi
shr	eax, 6
xor	eax, ebp
mov	byte ptr [esp+24h+arg_0], cl
movzx	ecx, cl
movzx	ebp, bl
xor	eax, ebp
xor	eax, ecx
movzx	ecx, dl
xor	eax, ecx
xor	eax, edi
and	eax, [esi+4]
mov	[esp+24h+var_11], bl
lea	ecx, [eax+eax*2]
cmp	dword ptr [esi+ecx*8+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*8+8]
jz	loc_7424E3
cmp	[ecx+4], eax
jnz	loc_7424E3
mov	[esp+24h+var_10], eax
mov	[esp+24h+var_C], 0FFFFFFFFh
lea	esp, [esp+0]

loc_742460:
mov	ebp, [ecx+4]
cmp	ebp, [esp+24h+var_10]
jnz	short loc_742490
cmp	[ecx+8], edi
jnz	short loc_742490
mov	bp, word ptr [esp+24h+var_8]
cmp	[ecx+0Ch], bp
jnz	short loc_742490
cmp	[ecx+0Eh], bl
jnz	short loc_742490
mov	bl, byte ptr [esp+24h+arg_0]
cmp	[ecx+0Fh], bl
jnz	short loc_74248C
cmp	[ecx+10h], dl
jz	short loc_7424A4

loc_74248C:
mov	bl, [esp+24h+var_11]

loc_742490:
mov	[esp+24h+var_C], eax
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_7424E3
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*8+8]
jmp	short loc_742460

loc_7424A4:
cmp	[esp+24h+var_10], eax
jnz	short loc_7424C8
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_7424D5
lea	edx, [eax+eax*2]
lea	esi, [esi+edx*8+8]
push	esi
mov	dword ptr [ecx], 0FFFFFFFEh
call	sub_752620
mov	ecx, esi
jmp	short loc_7424D5

loc_7424C8:
mov	eax, [esp+24h+var_C]
mov	edx, [ecx]
lea	eax, [eax+eax*2]
mov	[esi+eax*8+8], edx

loc_7424D5:
mov	eax, [esp+24h+var_4]
mov	dword ptr [ecx], 0FFFFFFFEh
mov	eax, [eax]
dec	dword ptr [eax]

loc_7424E3:
pop	edi
pop	ebp
pop	ebx

loc_7424E6:
pop	esi
add	esp, 14h
retn	4
sub_7423E0 endp

align 10h



sub_7424F0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_74250E
call	sub_6F4100
pop	edi
add	esp, 0Ch
retn	8

loc_74250E:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_74251C
mov	esi, 8
jmp	short loc_742581

loc_74251C:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_74252F
fadd	ds:flt_15FCC08

loc_74252F:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_742581:
mov	ecx, dword_1855FC0
mov	ebp, [esp+18h+arg_0]
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
mov	[esp+1Ch+arg_4], 0
mov	dword ptr [esp+1Ch+var_8], 0C4h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+18h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_7425E4
xor	eax, eax
lea	ecx, [ecx+0]

loc_7425D0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_7425D0

loc_7425E4:
mov	eax, [edi]
test	eax, eax
jz	short loc_742644
mov	eax, [eax+4]
push	ebx
xor	edi, edi
lea	ebx, [eax+1]

loc_7425F3:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_742623
mov	ecx, [esi+8]
lea	eax, [esi+8]
mov	edx, ecx
shr	edx, 6
xor	edx, ecx
push	edx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_741A10
mov	dword ptr [esi], 0FFFFFFFEh

loc_742623:
add	edi, 0Ch
sub	ebx, 1
jnz	short loc_7425F3
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_742644:
mov	ecx, [esp+18h+arg_4]
pop	esi
pop	ebp
mov	[edi], ecx
pop	edi
add	esp, 0Ch
retn	8
sub_7424F0 endp

align 10h



sub_742660 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [edi+14h]
test	ecx, ecx
jz	short loc_742674
call	sub_70E500

loc_742674:
mov	eax, [esi+0Ch]
mov	[edi], eax
mov	[esi+0Ch], edi
pop	edi
pop	esi
retn	4
sub_742660 endp

align 10h



sub_742690 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
test	ecx, ecx
jbe	short locret_7426C9
mov	eax, [esp+arg_0]
fldz
add	eax, 18h

loc_7426A1:
lea	edx, [eax-18h]
test	edx, edx
jz	short loc_7426BF
fst	dword ptr [eax-18h]
fst	dword ptr [eax-14h]
fst	dword ptr [eax-10h]
fst	dword ptr [eax-0Ch]
fst	dword ptr [eax-8]
fst	dword ptr [eax-4]
fst	dword ptr [eax]
fst	dword ptr [eax+4]

loc_7426BF:
add	eax, 24h
sub	ecx, 1
jnz	short loc_7426A1
fstp	st

locret_7426C9:
retn
sub_742690 endp

align 10h



sub_7426D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_742700
mov	eax, [edi]
test	eax, eax
jz	short loc_7426F5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7426F5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_742700:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_742733
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*8]
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_742733:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*8]
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 0C2h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_7426D0 endp

align 10h



sub_742760 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_74277E
call	sub_741970
pop	edi
add	esp, 0Ch
retn	8

loc_74277E:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_74278C
mov	esi, 8
jmp	short loc_7427F1

loc_74278C:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_74279F
fadd	ds:flt_15FCC08

loc_74279F:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_7427F1:
mov	ecx, dword_1855FC0
mov	ebp, [esp+18h+arg_0]
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, [esi+esi*8]
lea	edx, ds:8[edx*4]
mov	[esp+1Ch+arg_4], 0
mov	dword ptr [esp+1Ch+var_8], 0C2h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+18h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_742854
xor	eax, eax
lea	ecx, [ecx+0]

loc_742840:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 24h
sub	esi, 1
jnz	short loc_742840

loc_742854:
mov	eax, [edi]
test	eax, eax
jz	short loc_7428B7
mov	eax, [eax+4]
push	ebx
xor	edi, edi
lea	ebx, [eax+1]

loc_742863:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_742896
mov	ecx, [esi+8]
lea	eax, [esi+8]
mov	edx, ecx
shr	edx, 6
xor	edx, [eax+4]
xor	edx, ecx
push	edx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_742B80
mov	dword ptr [esi], 0FFFFFFFEh

loc_742896:
add	edi, 24h
sub	ebx, 1
jnz	short loc_742863
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_7428B7:
mov	ecx, [esp+18h+arg_4]
pop	esi
pop	ebp
mov	[edi], ecx
pop	edi
add	esp, 0Ch
retn	8
sub_742760 endp

align 10h



sub_7428D0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_7428F2
call	sub_7419C0
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_7428F2:
push	esi
cmp	eax, 8
jnb	short loc_7428FF
mov	esi, 8
jmp	short loc_742964

loc_7428FF:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_742912
fadd	ds:flt_15FCC08

loc_742912:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_742964:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*8]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 0C4h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_7429C4
xor	eax, eax
jmp	short loc_7429B0
align 10h

loc_7429B0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 18h
sub	esi, 1
jnz	short loc_7429B0

loc_7429C4:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_742A39
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_7429D2:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_742A1F
movzx	ebp, byte ptr [esi+0Fh]
movzx	edx, byte ptr [esi+10h]
mov	ecx, [esi+8]
lea	eax, [esi+8]
xor	edx, ebp
movzx	ebp, byte ptr [eax+6]
xor	edx, ebp
movzx	ebp, word ptr [eax+4]
xor	edx, ebp
mov	ebp, ecx
shr	ebp, 6
xor	edx, ebp
xor	edx, ecx
push	edx
push	eax
mov	eax, [esp+24h+arg_0]
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_742CC0
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_742A1F:
add	edi, 18h
sub	ebx, 1
jnz	short loc_7429D2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_742A39:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_7428D0 endp

align 10h


; Attributes: bp-based frame

sub_742A50 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_0]
sub	esp, 14h
push	ebx
push	esi
push	edi
test	eax, eax
jz	loc_742B69
cmp	[eax+0Ch], ecx
jnz	loc_742B69
mov	esi, [eax+8]
test	esi, esi
jz	loc_742B69
cmp	dword ptr [esi+8], 0
jbe	loc_742B69
mov	eax, [ebp+arg_4]
mov	ecx, [eax+48h]
mov	edi, [ecx+0Ch]
mov	edx, [edi]
mov	eax, [ebp+arg_C]
mov	edx, [edx+40h]
push	eax
mov	ecx, edi
call	edx
mov	ebx, [ebp+arg_8]
lea	eax, [esi+1Ch]
mov	dword ptr [esp+20h+var_10], eax
mov	byte ptr [esp+20h+var_C], 0
mov	[esp+20h+var_14], 0

loc_742AB2:
lea	ecx, [esp+20h+var_8]
push	ecx
mov	ecx, esi
call	sub_662290
mov	edi, edi

loc_742AC0:
mov	eax, [esp+20h+var_8]
test	eax, eax
jz	loc_742B57
cmp	dword ptr [eax], 0
jz	loc_742B57
mov	ecx, [eax]
mov	eax, [esp+20h+var_4]
cmp	eax, [ecx+4]
jg	short loc_742B57
lea	edx, [eax+eax*8]
lea	eax, [ecx+edx*4]
mov	ecx, [esp+20h+var_14]
cmp	[eax+14h], ecx
jnz	short loc_742B49
cmp	dword ptr [eax+28h], 0
mov	edx, [edi]
lea	ecx, [esp+20h+var_10]
push	ecx
jz	short loc_742B2A
mov	edx, [edx+9Ch]
lea	ecx, [esi+24h]
push	ecx
mov	ecx, [eax+24h]
push	ebx
push	ecx
mov	ecx, [eax+20h]
mov	eax, [eax+18h]
push	ecx
mov	ecx, [esi+8]
push	eax
mov	eax, [esi+4]
push	ecx
push	eax
mov	ecx, edi
call	edx
lea	ecx, [esp+20h+var_8]
call	sub_7418A0
jmp	short loc_742AC0

loc_742B2A:
mov	ecx, [eax+24h]
mov	edx, [edx+98h]
push	ebx
push	ecx
mov	ecx, [eax+20h]
mov	eax, [eax+18h]
push	ecx
mov	ecx, [esi+8]
push	eax
mov	eax, [esi+4]
push	ecx
push	eax
mov	ecx, edi
call	edx

loc_742B49:
lea	ecx, [esp+20h+var_8]
call	sub_7418A0
jmp	loc_742AC0

loc_742B57:
mov	eax, [esp+20h+var_14]
inc	eax
mov	[esp+20h+var_14], eax
cmp	eax, 2
jb	loc_742AB2

loc_742B69:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_742A50 endp

align 10h



sub_742B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_742B94
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_742BB6

loc_742B94:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_742BBB
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_742BB6:
call	sub_742760

loc_742BBB:
mov	eax, [esi]
mov	ebp, [esp+0Ch+arg_8]
and	ebp, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [ebp+ebp*8+0]
lea	ebx, [eax+edx*4+8]
mov	esi, 0FFFFFFFEh
cmp	[ebx], esi
jnz	short loc_742C18
mov	eax, [esp+0Ch+arg_4]
mov	dword ptr [ebx], 0FFFFFFFFh
mov	ecx, [eax]
mov	[ebx+8], ecx
mov	edx, [eax+4]
mov	[ebx+0Ch], edx
mov	ecx, [eax+8]
mov	[ebx+10h], ecx
mov	edx, [eax+0Ch]
add	eax, 8
mov	[ebx+14h], edx
mov	ecx, [eax+8]
mov	[ebx+18h], ecx
mov	edx, [eax+0Ch]
mov	[ebx+1Ch], edx
mov	eax, [eax+10h]
mov	[ebx+20h], eax
pop	esi
mov	[ebx+4], ebp
pop	ebp
pop	ebx
retn	0Ch

loc_742C18:
mov	edx, [eax+4]
mov	ecx, ebp
jmp	short loc_742C24
align 10h

loc_742C20:
mov	ecx, [esp+0Ch+arg_0]

loc_742C24:
inc	ecx
and	ecx, edx
mov	[esp+0Ch+arg_0], ecx
lea	ecx, [ecx+ecx*8]
cmp	[eax+ecx*4+8], esi
jnz	short loc_742C20
push	edi
mov	edi, [esp+10h+arg_0]
lea	edx, [edi+edi*8]
lea	ecx, [eax+edx*4+8]
mov	edx, [ebx+4]
cmp	edx, ebp
jnz	short loc_742C6F
test	ecx, ecx
jz	short loc_742C51
push	ebx
call	sub_741BF0

loc_742C51:
mov	esi, [esp+10h+arg_4]
mov	eax, [esp+10h+arg_0]
lea	edi, [ebx+8]
mov	ecx, 7
rep movsd
pop	edi
pop	esi
mov	[ebx+4], ebp
pop	ebp
mov	[ebx], eax
pop	ebx
retn	0Ch

loc_742C6F:
lea	edx, [edx+edx*8]
cmp	[eax+edx*4+8], ebp
lea	esi, [eax+edx*4+8]
jz	short loc_742C8F
lea	esp, [esp+0]

loc_742C80:
mov	esi, [esi]
lea	edx, [esi+esi*8]
cmp	[eax+edx*4+8], ebp
lea	esi, [eax+edx*4+8]
jnz	short loc_742C80

loc_742C8F:
test	ecx, ecx
jz	short loc_742C99
push	ebx
call	sub_741BF0

loc_742C99:
mov	[esi], edi
mov	esi, [esp+10h+arg_4]
lea	edi, [ebx+8]
mov	ecx, 7
rep movsd
pop	edi
pop	esi
mov	[ebx+4], ebp
pop	ebp
mov	dword ptr [ebx], 0FFFFFFFFh
pop	ebx
retn	0Ch
sub_742B80 endp

align 10h



sub_742CC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_742CD3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_742CF5

loc_742CD3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_742CFA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_742CF5:
call	sub_7428D0

loc_742CFA:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*2]
mov	ebp, [esi+edx*8+8]
lea	eax, [esi+edx*8+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_742D40
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	esi, [edx+8]
mov	[eax+10h], esi
mov	edx, [edx+0Ch]
pop	esi
mov	[eax+14h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_742D40:
push	edi
mov	edi, [esi+4]
mov	edx, ecx
push	ebx

loc_742D47:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*8+8], 0FFFFFFFEh
jnz	short loc_742D47
mov	ebx, [eax+4]
lea	edi, [edx+edx*2]
lea	edi, [esi+edi*8+8]
cmp	ebx, ecx
jnz	short loc_742DAD
test	edi, edi
jz	short loc_742D86
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_742D86:
mov	esi, [esp+10h+arg_4]
mov	edi, [esi]
mov	[eax+8], edi
mov	edi, [esi+4]
mov	[eax+0Ch], edi
mov	edi, [esi+8]
mov	[eax+10h], edi
mov	esi, [esi+0Ch]
pop	ebx
pop	edi
mov	[eax+14h], esi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_742DAD:
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jz	short loc_742DCF
lea	ebx, [ebx+0]

loc_742DC0:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jnz	short loc_742DC0

loc_742DCF:
test	edi, edi
jz	short loc_742DF3
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_742DF3:
mov	[ebx], edx
mov	edx, [esp+10h+arg_4]
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	esi, [edx+8]
pop	ebx
mov	[eax+10h], esi
mov	edx, [edx+0Ch]
pop	edi
pop	esi
mov	[eax+14h], edx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_742CC0 endp




sub_742E20 proc	near
fld	ds:flt_1573A78
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
fstp	dword ptr [eax+24h]
fld	ds:flt_15FCF38
mov	[eax+1Ch], ecx
fstp	dword ptr [eax+28h]
mov	[eax+20h], ecx
fld1
mov	[eax+2Ch], ecx
fst	dword ptr [eax+30h]
fstp	dword ptr [eax+34h]
mov	[eax+38h], ecx
mov	[eax+4Ch], cl
mov	[eax+4Dh], cl
retn
sub_742E20 endp

align 10h



sub_742E70 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  4

sub	esp, 18h
mov	eax, [esp+18h+arg_0]
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	[esi], eax
mov	[esi+4], ebx
mov	dword ptr [esi+8], offset off_1440C10
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	dword ptr [esi+10h], offset off_1440C08
mov	[esi+24h], bl
mov	byte ptr [esi+25h], 1
mov	byte ptr [esi+26h], 1
mov	dword ptr [esi+28h], 1
mov	dword ptr [esi+2Ch], 1
lea	eax, [esi+30h]
push	edi
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], eax
mov	edi, 7Fh
mov	[eax+8], edi
lea	eax, [esi+44h]
lea	ecx, [esi+4Ch]
mov	[eax], eax
mov	[eax+4], eax
call	sub_7553E0
fld1
mov	[esi+8F0h], ebx
mov	[esi+8F4h], ebx
mov	[esi+8F8h], ebx
mov	[esi+8FCh], edi
mov	[esi+900h], ebx
lea	eax, [esi+8F4h]
mov	[eax+10h], eax
lea	eax, [esi+908h]
mov	[eax], eax
mov	[eax+4], eax
mov	[esi+910h], ebx
fst	dword ptr [esi+914h]
fst	dword ptr [esi+918h]
mov	dword ptr [esi+91Ch], 3
fld	ds:flt_15AACC4
mov	eax, 2
fstp	dword ptr [esi+928h]
mov	[esi+920h], eax
mov	[esi+924h], eax
mov	[esi+92Ch], ebx
mov	[esi+930h], ebx
mov	[esi+934h], ebx
mov	[esi+938h], ebx
mov	[esi+93Ch], bl
fst	dword ptr [esi+940h]
fld	ds:flt_143F788
mov	ecx, 7FFFFFFFh
fst	dword ptr [esi+944h]
mov	[esi+948h], ebx
mov	[esi+94Ch], ebx
fxch	st(1)
mov	[esi+950h], ebx
mov	[esi+954h], ebx
mov	[esi+958h], ebx
mov	[esi+95Ch], ebx
mov	[esi+960h], ebx
mov	[esi+964h], ebx
fst	dword ptr [esi+974h]
fst	dword ptr [esi+978h]
mov	eax, 80000001h
fldz
mov	[esi+968h], ebx
fst	dword ptr [esi+97Ch]
mov	[esi+96Ch], ecx
fst	dword ptr [esi+980h]
mov	[esi+970h], eax
fxch	st(1)
mov	[esi+984h], bl
fst	dword ptr [esi+988h]
fxch	st(2)
fstp	dword ptr [esi+98Ch]
mov	[esi+990h], ebx
mov	[esi+994h], ebx
fxch	st(1)
mov	[esi+998h], ebx
mov	[esi+99Ch], ebx
mov	[esi+9A0h], ebx
mov	[esi+9A4h], ebx
mov	[esi+9A8h], ebx
mov	[esi+9ACh], ebx
fst	dword ptr [esi+9BCh]
fstp	dword ptr [esi+9C0h]
mov	[esi+9B4h], ecx
mov	[esi+9B0h], ebx
fst	dword ptr [esi+9C4h]
mov	[esi+9B8h], eax
fstp	dword ptr [esi+9C8h]
mov	[esi+9CCh], bl
fld	ds:flt_15FCC80
lea	edi, [esi+9E0h]
fstp	dword ptr [esi+9D4h]
mov	ecx, edi
fld	ds:flt_15FDC64
mov	dword ptr [esi+9D0h], 200h
fstp	dword ptr [esi+9D8h]
fld	ds:flt_15FCC84
fstp	dword ptr [esi+9DCh]
call	sub_64E8E0
push	ebx		; int
lea	ecx, [esi+9F8h]	; lpCriticalSection
call	sub_64D6D0
fld	dword ptr [esi+9D4h]
fchs
call	__CItan
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_0]
fstp	[esp+24h+var_14]
fldz
call	__CItan
fstp	[esp+24h+arg_0]
fld	[esp+24h+arg_0]
xor	eax, eax
fstp	[esp+24h+var_C]
fld1
fst	dword ptr [edi]
fld	[esp+24h+var_14]
fstp	dword ptr [edi+4]
fldz
fst	dword ptr [edi+8]
fld	[esp+24h+var_C]
fstp	dword ptr [edi+0Ch]
fxch	st(1)
fstp	dword ptr [edi+10h]
fstp	dword ptr [edi+14h]
mov	[esi+0Ch], esi
mov	[esi+20h], esi

loc_7430F0:
cmp	ebx, dword_167E204[eax*4]
jbe	short loc_7430FA
inc	eax

loc_7430FA:
mov	[esi+ebx+7F0h],	al
inc	ebx
cmp	ebx, 100h
jb	short loc_7430F0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 18h
retn	4
sub_742E70 endp

align 10h



sub_743120 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
push	edi
lea	edi, [esi+1Ch]
test	ecx, ecx
jz	short loc_743138
mov	eax, [ecx]
mov	edx, [eax+74h]
push	3
push	edi
call	edx

loc_743138:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, esi
call	sub_741970
test	[esp+8+arg_0], 1
jz	short loc_743183
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_743183:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_743120 endp

align 10h



sub_743190 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	ebp, ecx
lea	eax, [ebp+9F8h]
push	edi
push	eax		; lpCriticalSection
mov	[esp+24h+var_10], eax
call	ds:EnterCriticalSection
mov	esi, [ebp+8F0h]
mov	ebx, [esp+20h+arg_0]
lea	edi, [ebp+8F0h]
test	esi, esi
jz	loc_7432B7
mov	eax, ebx
shr	eax, 6
xor	eax, ebx
and	eax, [esi+4]
lea	ecx, [esp+20h+arg_0]
push	eax
push	ecx
mov	ecx, edi
call	sub_6ABC50
test	eax, eax
jl	loc_7432B7
lea	edx, [eax+eax*2]
lea	esi, [esi+edx*4+10h]
test	esi, esi
jz	loc_7432B7
push	ebx
lea	ecx, [ebp+4Ch]
call	sub_754780
lea	eax, [ebp+8]
push	eax
mov	ecx, ebx
call	sub_71A210
lea	ecx, [esp+20h+arg_0]
push	ecx
mov	ecx, edi
call	loc_64DD20
mov	ebx, [ebp+48h]
lea	eax, [ebp+44h]
cmp	ebx, eax
jz	loc_7432B3
mov	edi, edi

loc_743220:
mov	esi, [ebx+8]
test	esi, esi
jz	short loc_7432A5
xor	eax, eax
cmp	[esi+14h], eax
jbe	short loc_7432A5
mov	ecx, [esi+10h]

loc_743231:
mov	edx, [esp+20h+arg_0]
cmp	[ecx], edx
jz	short loc_743246
inc	eax
mov	edx, esi
add	ecx, 20h
cmp	eax, [edx+14h]
jb	short loc_743231
jmp	short loc_7432A5

loc_743246:
mov	ecx, [esi+1Ch]
lea	edi, [esi+1Ch]
test	ecx, ecx
jz	short loc_74325A
mov	eax, [ecx]
mov	edx, [eax+74h]
push	3
push	edi
call	edx

loc_74325A:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, esi
call	sub_741970
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	dword ptr [ebx+8], 0

loc_7432A5:
mov	ebx, [ebx+4]
lea	eax, [ebp+44h]
cmp	ebx, eax
jnz	loc_743220

loc_7432B3:
mov	ebx, [esp+20h+arg_0]

loc_7432B7:
mov	esi, [ebp+90Ch]
lea	eax, [ebp+908h]
cmp	esi, eax
jz	short loc_74333B

loc_7432C7:
mov	eax, [esi+8]
mov	edi, [esi+4]
cmp	eax, ebx
jnz	short loc_74332F
mov	cl, [esi+0Eh]
mov	dl, [esi+0Fh]
mov	[esp+20h+var_C], eax
mov	ax, [esi+0Ch]
mov	[esp+20h+var_6], cl
lea	ecx, [esp+20h+var_C]
mov	[esp+20h+var_8], ax
mov	al, [esi+10h]
and	dl, 3
push	ecx
lea	ecx, [ebp+910h]
mov	[esp+24h+var_5], dl
mov	[esp+24h+var_4], al
call	sub_7423E0
mov	edx, [esi]
mov	eax, [esi+4]
mov	[edx+4], eax
mov	ecx, [esi+4]
mov	edx, [esi]
mov	[ecx], edx
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_743321
call	sub_70E500

loc_743321:
mov	eax, [ebp+900h]
mov	[esi], eax
mov	[ebp+900h], esi

loc_74332F:
lea	eax, [ebp+908h]
mov	esi, edi
cmp	edi, eax
jnz	short loc_7432C7

loc_74333B:
mov	ecx, [esp+20h+var_10]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
mov	[esp+arg_0], ecx
jmp	ds:LeaveCriticalSection
sub_743190 endp




sub_743350 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ecx
lea	ebx, [edi+9F8h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	esi, [esp+0Ch+arg_0]
test	esi, esi
jz	short loc_7433B3
mov	ecx, [esi+8]
cmp	[esi+0Ch], edi
jz	short loc_743391
test	ecx, ecx
jz	short loc_74337D
push	1
call	sub_743120

loc_74337D:		; lpCriticalSection
push	ebx
mov	dword ptr [esi+8], 0
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn	4

loc_743391:
test	ecx, ecx
jz	short loc_74339C
push	1
call	sub_743120

loc_74339C:
mov	eax, [esi]
mov	ecx, [esi+4]
mov	[eax+4], ecx
mov	eax, [esi]
mov	edx, [esi+4]
mov	[edx], eax
mov	ecx, [edi+3Ch]
mov	[esi], ecx
mov	[edi+3Ch], esi

loc_7433B3:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn	4
sub_743350 endp




sub_7433C0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 24h
fld	dword ptr [ecx]
fstp	[esp+24h+var_20]
fld	dword ptr [ecx+4]
fstp	[esp+24h+var_1C]
fld	dword ptr [ecx+8]
fstp	[esp+24h+var_18]
fld	dword ptr [ecx+0Ch]
fstp	[esp+24h+var_14]
fld	dword ptr [edx]
fstp	[esp+24h+var_10]
fld	dword ptr [edx+4]
fstp	[esp+24h+var_C]
fld	dword ptr [edx+8]
fstp	[esp+24h+var_8]
fld	dword ptr [edx+0Ch]
fstp	[esp+24h+var_4]
fld	[esp+24h+var_14]
fld	[esp+24h+var_C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_74344F
fld	[esp+24h+var_4]
fld	[esp+24h+var_1C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_74344D
fld	[esp+24h+var_8]
fld	[esp+24h+var_20]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_743449
fld	[esp+24h+var_18]
fld	[esp+24h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnp	loc_7434D7
fstp	st
fstp	st(2)

loc_743449:
fstp	st(1)
fstp	st

loc_74344D:
fstp	st

loc_74344F:
fstp	st
fldz
fst	[esp+24h+var_20]
fstp	[esp+24h+var_1C]
fldz
fadd	st, st
fstp	[esp+24h+var_24]
fld	[esp+24h+var_24]
fst	[esp+24h+var_18]
fstp	[esp+24h+var_14]
fld	[esp+24h+var_14]
fld	[esp+24h+var_18]
fld	[esp+24h+var_1C]
fld	[esp+24h+var_20]
fxch	st(1)
fxch	st(3)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_743487:
fxch	st(2)
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	loc_743551
fxch	st(3)
fcom	st(2)
fnstsw	ax
test	ah, 1
jnz	loc_74355C
fstp	st(2)
fstp	st
fstp	st(1)

loc_7434AB:
fstp	st
xor	al, al
fld	dword ptr [edx+4]
fstp	[esp+24h+var_24]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
fld	[esp+24h+var_24]
fst	dword ptr [ecx+4]
fld	dword ptr [ecx]
fstp	dword ptr [ecx+8]
fstp	dword ptr [ecx+0Ch]
fld	dword ptr [ecx+10h]
fstp	dword ptr [ecx+18h]
fld	dword ptr [ecx+14h]
fstp	dword ptr [ecx+1Ch]
add	esp, 24h
retn

loc_7434D7:
fcom	st(2)
fnstsw	ax
test	ah, 5
jnp	short loc_74353E
fstp	st(2)
fxch	st(1)
fstp	[esp+24h+var_20]
fld	[esp+24h+var_20]
fxch	st(1)

loc_7434EE:
fcom	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_743542
fstp	st
fxch	st(1)
fstp	[esp+24h+var_18]
fld	[esp+24h+var_18]
fxch	st(1)

loc_743505:
fxch	st(2)
fcom	st(3)
fnstsw	ax
test	ah, 41h
jz	short loc_743546
fstp	st
fxch	st(2)
fstp	[esp+24h+var_1C]
fld	[esp+24h+var_1C]
fxch	st(2)

loc_74351E:
fld	[esp+24h+var_14]
fld	[esp+24h+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_74354A
fstp	st(1)
fstp	[esp+24h+var_14]
fld	[esp+24h+var_14]
jmp	loc_743487

loc_74353E:
fstp	st
jmp	short loc_7434EE

loc_743542:
fstp	st(2)
jmp	short loc_743505

loc_743546:
fstp	st(3)
jmp	short loc_74351E

loc_74354A:
fstp	st
jmp	loc_743487

loc_743551:
fstp	st(2)
fstp	st
fstp	st
jmp	loc_7434AB

loc_74355C:
fld	st(3)
fld	dword ptr [ecx]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_743597
fld	st(1)
fld	dword ptr [ecx+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_743597
fld	st
fld	dword ptr [ecx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_743597
fld	st(2)
fld	dword ptr [ecx+0Ch]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_7436B6

loc_743597:
fld	dword ptr [ecx+10h]
fstp	[esp+24h+var_20]
fld	dword ptr [ecx+14h]
fstp	[esp+24h+var_1C]
fld	dword ptr [ecx+18h]
fstp	[esp+24h+var_18]
fld	dword ptr [ecx+1Ch]
fstp	[esp+24h+var_14]
fld	dword ptr [ecx]
fld	st(4)
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_7435E4
fld	dword ptr [ecx+18h]
fsub	dword ptr [ecx+10h]
fstp	[esp+24h+var_24]
fld	[esp+24h+var_24]
fld	st(4)
fsub	dword ptr [ecx]
fmulp	st(1), st
fld	dword ptr [ecx+8]
fsub	dword ptr [ecx]
fstp	[esp+24h+var_24]
fdiv	[esp+24h+var_24]
fadd	dword ptr [ecx+10h]
fstp	[esp+24h+var_20]

loc_7435E4:
fld	dword ptr [ecx+4]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_743618
fld	dword ptr [ecx+1Ch]
fsub	dword ptr [ecx+14h]
fstp	[esp+24h+var_24]
fld	[esp+24h+var_24]
fld	st(1)
fsub	dword ptr [ecx+4]
fmulp	st(1), st
fld	dword ptr [ecx+0Ch]
fsub	dword ptr [ecx+4]
fstp	[esp+24h+var_24]
fdiv	[esp+24h+var_24]
fadd	dword ptr [ecx+14h]
fstp	[esp+24h+var_1C]

loc_743618:
fld	dword ptr [ecx+8]
fld	st(2)
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_74364D
fld	dword ptr [ecx+18h]
fld	dword ptr [ecx+18h]
fsub	dword ptr [ecx+10h]
fstp	[esp+24h+var_24]
fld	[esp+24h+var_24]
fld	dword ptr [ecx+8]
fsub	st, st(4)
fmulp	st(1), st
fld	dword ptr [ecx+8]
fsub	dword ptr [ecx]
fstp	[esp+24h+var_24]
fdiv	[esp+24h+var_24]
fsubp	st(1), st
fstp	[esp+24h+var_18]

loc_74364D:
fld	dword ptr [ecx+0Ch]
fld	st(3)
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_743683
fld	dword ptr [ecx+1Ch]
fld	dword ptr [ecx+1Ch]
fsub	dword ptr [ecx+14h]
fstp	[esp+24h+var_24]
fld	[esp+24h+var_24]
fld	dword ptr [ecx+0Ch]
fsub	st, st(5)
fmulp	st(1), st
fld	dword ptr [ecx+0Ch]
fsub	dword ptr [ecx+4]
fstp	[esp+24h+var_24]
fdiv	[esp+24h+var_24]
fsubp	st(1), st
fstp	[esp+24h+var_14]

loc_743683:
fxch	st(3)
mov	al, 1
fstp	dword ptr [ecx]
fxch	st(2)
fstp	dword ptr [ecx+4]
fxch	st(1)
fstp	dword ptr [ecx+8]
fstp	dword ptr [ecx+0Ch]
fld	[esp+24h+var_20]
fstp	dword ptr [ecx+10h]
fld	[esp+24h+var_1C]
fstp	dword ptr [ecx+14h]
fld	[esp+24h+var_18]
fstp	dword ptr [ecx+18h]
fld	[esp+24h+var_14]
fstp	dword ptr [ecx+1Ch]
add	esp, 24h
retn

loc_7436B6:
fstp	st(2)
mov	al, 1
fstp	st
fstp	st(1)
fstp	st
add	esp, 24h
retn
sub_7433C0 endp

align 10h



; int __stdcall	sub_7436D0(int,	int, int, char,	char, float, float, int)
sub_7436D0 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_3C=	dword ptr -3Ch
var_30=	dword ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 8Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+98h+arg_4]
xor	ebp, ebp
mov	ebx, ecx
cmp	esi, ebp
jz	loc_743D64
push	edi
lea	ecx, [esp+9Ch+var_58]
call	sub_70F3B0
fld	dword ptr [ebx+9D8h]
cmp	[esp+9Ch+arg_C], 0
fmul	ds:dbl_15FD320
mov	[esp+9Ch+var_7C], ebp
fstp	[esp+9Ch+var_8C]
jz	loc_7438FF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebp
push	44h
call	edx
cmp	eax, ebp
jz	short loc_74373E
push	3C8h
mov	ecx, eax
call	sub_7111E0
mov	[esp+98h+var_84], eax
jmp	short loc_743742

loc_74373E:
mov	[esp+98h+var_84], ebp

loc_743742:
mov	eax, [esp+98h+var_84]
fld	ds:dword_1577A6C
mov	edx, [esi]
push	ecx
fstp	[esp+9Ch+var_9C]
mov	[esp+9Ch+var_78], eax
mov	eax, [edx+18h]
lea	edi, [ebx+940h]
push	edi
mov	ecx, esi
call	eax
fldz
sub	esp, 10h
fst	[esp+0ACh+var_A0]
fstp	[esp+0ACh+var_A4]
mov	ecx, edi
fld	ds:flt_15BF168
fstp	[esp+0ACh+var_A8]
fld1
fstp	[esp+0ACh+var_AC]
call	sub_708E20
push	edi
mov	ecx, ebx
call	sub_741DA0
fld	[esp+9Ch+var_8C]
test	al, al
jnz	short loc_743799
fchs

loc_743799:
fstp	[esp+9Ch+var_8C]
lea	ebp, [ebx+914h]
fld	[esp+9Ch+var_8C]
fmul	ds:dbl_15FCC48
fstp	[esp+9Ch+var_8C]
fld	[esp+9Ch+var_8C]
fst	dword ptr [ebp+0]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7437C5
fchs

loc_7437C5:
fstp	[esp+9Ch+var_8C]
lea	esi, [ebx+988h]
fld	[esp+9Ch+var_8C]
mov	ecx, esi
fstp	dword ptr [ebp+4]
mov	dword ptr [ebx+91Ch], 0
call	sub_709300
push	0
push	esi
push	0FFFFFFFFh
push	edi
mov	ecx, ebp
call	sub_74C330
xor	ebp, ebp
mov	[esp+9Ch+var_8C], ebp
cmp	[ebx+9A0h], ebp
jbe	loc_743ABD

loc_743806:
mov	edx, [ebx+9ACh]
mov	ecx, ebp
mov	eax, ebp
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*8+4], 2
lea	esi, [ecx+eax*8]
jbe	loc_7438E9
mov	eax, [esi+8]
mov	ecx, [esi]
mov	ecx, [ecx+14h]
mov	edx, eax
shr	edx, 8
mov	edx, [ecx+edx*4]
and	eax, 0FFh
lea	ecx, [esp+9Ch+var_58]
lea	edi, [edx+eax*8]
call	sub_70A190
mov	[esp+9Ch+var_58], 1
mov	[esp+9Ch+var_54], 0
fld	dword ptr [edi+4]
fmul	ds:dbl_15FD388
push	0
call	__ftol2_sse
fld	dword ptr [edi]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esp+0A8h+var_58]
call	sub_70C1B0
mov	edi, 1
cmp	[esi+4], edi
jbe	short loc_7438CD

loc_743887:
mov	eax, [esi+8]
mov	edx, [esi]
mov	edx, [edx+14h]
add	eax, edi
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8+4]
lea	ebp, [ecx+eax*8]
fmul	ds:dbl_15FD388
call	__ftol2_sse
fld	dword ptr [ebp+0]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esp+0A4h+var_58]
call	sub_711110
inc	edi
cmp	edi, [esi+4]
jb	short loc_743887
mov	ebp, [esp+9Ch+var_8C]

loc_7438CD:
cmp	[esp+9Ch+var_30], 0
jz	short loc_7438E9
mov	eax, [esp+9Ch+var_88]
lea	edx, [eax+34h]
push	edx
add	eax, 28h
push	eax
lea	ecx, [esp+0A4h+var_58]
call	sub_70BCD0

loc_7438E9:
inc	ebp
mov	[esp+9Ch+var_8C], ebp
cmp	ebp, [ebx+9A0h]
jb	loc_743806
jmp	loc_743ABD

loc_7438FF:
mov	eax, [esp+9Ch+arg_1C]
fild	[esp+9Ch+arg_1C]
test	eax, eax
jge	short loc_743917
fadd	ds:flt_15FCC08

loc_743917:
fstp	[esp+9Ch+var_8C]
fldz
fcomp	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 5
jp	loc_743AC3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebp
push	44h
call	eax
cmp	eax, ebp
jz	short loc_743952
push	3C8h
mov	ecx, eax
call	sub_7111E0
mov	[esp+98h+var_84], eax
jmp	short loc_743956

loc_743952:
mov	[esp+98h+var_84], ebp

loc_743956:
mov	ecx, [esp+98h+var_84]
fld	ds:dword_1577A6C
mov	edx, [esi]
mov	eax, [edx+18h]
push	ecx
fstp	[esp+9Ch+var_9C]
mov	[esp+9Ch+var_78], ecx
lea	edi, [ebx+940h]
push	edi
mov	ecx, esi
call	eax
fld	dword ptr [ebx+9DCh]
fmul	[esp+9Ch+var_8C]
push	ecx		; float
lea	esi, [ebx+914h]
mov	ecx, esi
fmul	ds:dbl_15FD320
fstp	[esp+0A0h+var_8C]
fld	[esp+0A0h+var_8C]
fstp	[esp+0A0h+var_A0]
call	sub_709D00
mov	[ebx+91Ch], ebp
lea	ebp, [ebx+988h]
mov	ecx, ebp
call	sub_709300
push	1
push	ebp
push	0FFFFFFFFh
push	edi
mov	ecx, esi
call	sub_74C330
xor	ebp, ebp
mov	[esp+9Ch+var_8C], ebp
cmp	[ebx+9A0h], ebp
jbe	loc_743ABD

loc_7439D3:
mov	edx, [ebx+9ACh]
mov	ecx, ebp
mov	eax, ebp
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*8+4], 2
lea	esi, [ecx+eax*8]
jbe	loc_743AAC
mov	eax, [esi+8]
mov	ecx, [esi]
mov	ecx, [ecx+14h]
mov	edx, eax
shr	edx, 8
mov	edx, [ecx+edx*4]
and	eax, 0FFh
lea	ecx, [esp+9Ch+var_58]
lea	edi, [edx+eax*8]
call	sub_70A190
mov	[esp+9Ch+var_58], 1
mov	[esp+9Ch+var_54], 0
fld	dword ptr [edi+4]
push	0
call	__ftol2_sse
fld	dword ptr [edi]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esp+0A8h+var_58]
call	sub_70C1B0
mov	edi, 1
cmp	[esi+4], edi
jbe	short loc_743A90
mov	edi, edi

loc_743A50:
mov	eax, [esi+8]
mov	edx, [esi]
mov	edx, [edx+14h]
add	eax, edi
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8+4]
lea	ebp, [ecx+eax*8]
call	__ftol2_sse
fld	dword ptr [ebp+0]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esp+0A4h+var_58]
call	sub_711110
inc	edi
cmp	edi, [esi+4]
jb	short loc_743A50
mov	ebp, [esp+9Ch+var_8C]

loc_743A90:
cmp	[esp+9Ch+var_30], 0
jz	short loc_743AAC
mov	eax, [esp+9Ch+var_88]
lea	edx, [eax+34h]
push	edx
add	eax, 28h
push	eax
lea	ecx, [esp+0A4h+var_58]
call	sub_70BCD0

loc_743AAC:
inc	ebp
mov	[esp+9Ch+var_8C], ebp
cmp	ebp, [ebx+9A0h]
jb	loc_7439D3

loc_743ABD:
mov	esi, [esp+9Ch+var_88]
xor	ebp, ebp

loc_743AC3:
mov	eax, [esi]
mov	edx, [eax+48h]
mov	ecx, esi
call	edx
mov	edi, eax
mov	eax, [edi]
mov	edx, [eax+4]
lea	ecx, [esp+9Ch+var_70]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jz	loc_743D13

loc_743AE4:
mov	eax, [esp+9Ch+var_70]
fld	[esp+9Ch+arg_18]
fld	[esp+9Ch+arg_14]
cmp	eax, 3		; switch 4 cases
ja	loc_743CF9	; default
jmp	ds:off_743D70[eax*4] ; switch jump

loc_743B06:		; jumptable 00743AFF case 0
fstp	st(1)
lea	ecx, [esp+9Ch+var_58]
fstp	st
fld	[esp+9Ch+var_6C]
fstp	[esp+9Ch+var_8C]
fld	[esp+9Ch+var_68]
fstp	[esp+9Ch+var_88]
call	sub_70A190
cmp	[esp+9Ch+arg_10], 0
fld	[esp+9Ch+var_8C]
fadd	[esp+9Ch+arg_14]
mov	[esp+9Ch+var_58], 1
mov	[esp+9Ch+var_54], ebp
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_88]
fadd	[esp+9Ch+arg_18]
fstp	[esp+9Ch+var_80]
jz	short loc_743B82
lea	eax, [esp+9Ch+var_84]
push	eax
lea	ecx, [esp+0A0h+var_20]
push	ecx
lea	ecx, [ebx+9E0h]
call	sub_64E9B0
fld	[esp+9Ch+var_20]
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_1C]
fstp	[esp+9Ch+var_80]

loc_743B82:
fld	[esp+9Ch+var_80]
push	ebp
call	__ftol2_sse
fld	[esp+0A0h+var_84]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esp+0A8h+var_58]
call	sub_70C1B0
jmp	loc_743CFD

loc_743BA5:		; jumptable 00743AFF case 3
cmp	[esp+9Ch+var_5C], 0
jz	loc_743C6E
cmp	[esp+9Ch+arg_10], 0
fld	[esp+9Ch+var_6C]
fadd	st, st(1)
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_68]
fadd	st, st(2)
fstp	[esp+9Ch+var_80]
fadd	[esp+9Ch+var_64]
fstp	[esp+9Ch+var_78]
fadd	[esp+9Ch+var_60]
fstp	[esp+9Ch+var_74]
jz	short loc_743C38
lea	edx, [esp+9Ch+var_84]
push	edx
lea	eax, [esp+0A0h+var_18]
lea	esi, [ebx+9E0h]
push	eax
mov	ecx, esi
call	sub_64E9B0
fld	[esp+9Ch+var_18]
lea	ecx, [esp+9Ch+var_78]
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_14]
push	ecx
lea	edx, [esp+0A0h+var_8]
fstp	[esp+0A0h+var_80]
push	edx
mov	ecx, esi
call	sub_64E9B0
fld	[esp+9Ch+var_8]
fstp	[esp+9Ch+var_78]
fld	[esp+9Ch+var_4]
fstp	[esp+9Ch+var_74]

loc_743C38:
fld	[esp+9Ch+var_74]
call	__ftol2_sse
fld	[esp+9Ch+var_78]
push	eax
call	__ftol2_sse
fld	[esp+0A0h+var_80]
push	eax
call	__ftol2_sse
fld	[esp+0A4h+var_84]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esp+0ACh+var_58]
call	sub_711130
jmp	loc_743CFD

loc_743C6E:
cmp	[esp+9Ch+arg_10], 0
fadd	[esp+9Ch+var_64]
fstp	[esp+9Ch+var_84]
fadd	[esp+9Ch+var_60]
fstp	[esp+9Ch+var_80]
jz	short loc_743CB6
lea	eax, [esp+9Ch+var_84]
push	eax
lea	ecx, [esp+0A0h+var_10]
push	ecx
lea	ecx, [ebx+9E0h]
call	sub_64E9B0
fld	[esp+9Ch+var_10]
fstp	[esp+9Ch+var_84]
fld	[esp+9Ch+var_C]
fstp	[esp+9Ch+var_80]

loc_743CB6:
fld	[esp+9Ch+var_80]
call	__ftol2_sse
fld	[esp+9Ch+var_84]
push	eax
call	__ftol2_sse
push	eax
lea	ecx, [esp+0A4h+var_58]
call	sub_711110
jmp	short loc_743CFD

loc_743CD5:		; jumptable 00743AFF cases 1,2
fstp	st(1)
fstp	st
cmp	[esp+9Ch+var_30], ebp
jz	short loc_743CFD
mov	eax, [esp+9Ch+arg_0]
lea	edx, [eax+34h]
push	edx
add	eax, 28h
push	eax
lea	ecx, [esp+0A4h+var_58]
call	sub_70BCD0
jmp	short loc_743CFD

loc_743CF9:		; default
fstp	st(1)
fstp	st

loc_743CFD:
mov	eax, [edi]
mov	edx, [eax+4]
lea	ecx, [esp+9Ch+var_70]
push	ecx
mov	ecx, edi
call	edx
test	al, al
jnz	loc_743AE4

loc_743D13:
cmp	[esp+9Ch+arg_C], 0
jnz	short loc_743D27
cmp	[esp+9Ch+arg_10], 0
jz	short loc_743D3D

loc_743D27:
mov	ecx, [esp+9Ch+arg_0]
mov	eax, [ecx]
mov	edx, [esp+9Ch+arg_8]
mov	eax, [eax+14h]
push	edx
call	eax

loc_743D3D:
mov	ecx, edi
call	sub_64A400
mov	ecx, [esp+9Ch+var_7C]
pop	edi
cmp	ecx, ebp
jz	short loc_743D52
call	sub_70E500

loc_743D52:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+98h+var_3C]
mov	edx, [edx+30h]
push	eax
call	edx

loc_743D64:
pop	esi
pop	ebp
pop	ebx
add	esp, 8Ch
retn	20h
sub_7436D0 endp

off_743D70 dd offset loc_743B06	; jump table for switch	statement
dd offset loc_743CD5
dd offset loc_743CD5
dd offset loc_743BA5



sub_743D80 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_743D9C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_743DB1
push	esi
jmp	short loc_743DAB

loc_743D9C:
cmp	esi, [edi+8]
jb	short loc_743DB1
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_743DAB:
push	edi
call	sub_7426D0

loc_743DB1:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_743DCC
mov	eax, [edi]
lea	edx, [ebx+ebx*8]
sub	esi, ebx
lea	ecx, [eax+edx*4]
push	esi
push	ecx
call	sub_742690
add	esp, 8

loc_743DCC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_743D80 endp

align 10h



sub_743DE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_743DF3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_743E15

loc_743DF3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_743E1A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_743E15:
call	sub_742760

loc_743E1A:
mov	eax, [esi]
mov	edi, [esp+8+arg_8]
and	edi, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
lea	edx, [edi+edi*8]
lea	esi, [eax+edx*4+8]
mov	edx, 0FFFFFFFEh
cmp	[esi], edx
jnz	short loc_743E76
mov	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 0FFFFFFFFh
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	eax, [eax+4]
mov	[esi+0Ch], eax
mov	eax, [ecx+4]
mov	ecx, [eax]
mov	[esi+10h], ecx
mov	edx, [eax+4]
mov	[esi+14h], edx
mov	ecx, [eax+8]
mov	[esi+18h], ecx
mov	edx, [eax+0Ch]
mov	[esi+1Ch], edx
mov	eax, [eax+10h]
mov	[esi+20h], eax
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_743E76:
mov	ecx, [eax+4]
push	ebx
mov	ebx, edi
push	ebp
lea	ecx, [ecx+0]

loc_743E80:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*8]
cmp	[eax+ebp*4+8], edx
jnz	short loc_743E80
mov	edx, [esi+4]
lea	ecx, [ebx+ebx*8]
lea	ecx, [eax+ecx*4+8]
cmp	edx, edi
jnz	short loc_743EE1
test	ecx, ecx
jz	short loc_743EA4
push	esi
call	sub_741BF0

loc_743EA4:
mov	ecx, [esp+10h+arg_4]
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	eax, [eax+4]
mov	[esi+0Ch], eax
mov	eax, [ecx+4]
mov	ecx, [eax]
mov	[esi+10h], ecx
mov	edx, [eax+4]
mov	[esi+14h], edx
mov	ecx, [eax+8]
mov	[esi+18h], ecx
mov	edx, [eax+0Ch]
mov	[esi+1Ch], edx
mov	eax, [eax+10h]
mov	[esi+20h], eax
pop	ebp
mov	[esi], ebx
pop	ebx
mov	[esi+4], edi
pop	edi
pop	esi
retn	0Ch

loc_743EE1:
lea	edx, [edx+edx*8]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jz	short loc_743F01
mov	edi, edi

loc_743EF0:
mov	ebp, [ebp+0]
lea	edx, [ebp+ebp*8+0]
cmp	[eax+edx*4+8], edi
lea	ebp, [eax+edx*4+8]
jnz	short loc_743EF0

loc_743F01:
test	ecx, ecx
jz	short loc_743F0B
push	esi
call	sub_741BF0

loc_743F0B:
mov	ecx, [esp+10h+arg_4]
mov	[ebp+0], ebx
mov	eax, [ecx]
mov	edx, [eax]
mov	[esi+8], edx
mov	eax, [eax+4]
mov	[esi+0Ch], eax
mov	eax, [ecx+4]
mov	ecx, [eax]
mov	[esi+10h], ecx
mov	edx, [eax+4]
mov	[esi+14h], edx
mov	ecx, [eax+8]
mov	[esi+18h], ecx
mov	edx, [eax+0Ch]
mov	[esi+1Ch], edx
mov	eax, [eax+10h]
pop	ebp
mov	[esi+20h], eax
pop	ebx
mov	[esi+4], edi
pop	edi
mov	dword ptr [esi], 0FFFFFFFFh
pop	esi
retn	0Ch
sub_743DE0 endp

align 10h



sub_743F50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_743F64
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_743F86

loc_743F64:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_743F8B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_743F86:
call	sub_7428D0

loc_743F8B:
mov	eax, [esi]
mov	ecx, [esp+0Ch+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*2]
mov	ebp, [esi+edx*8+8]
lea	eax, [esi+edx*8+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_743FD6
mov	esi, [esp+0Ch+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	edx, [esi]
mov	edi, [edx]
mov	[eax+8], edi
mov	edi, [edx+4]
mov	[eax+0Ch], edi
mov	edx, [edx+8]
mov	[eax+10h], edx
mov	edx, [esi+4]
mov	edx, [edx]
pop	edi
pop	esi
mov	[eax+14h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_743FD6:
mov	edi, [esi+4]
mov	edx, ecx
push	ebx
lea	esp, [esp+0]

loc_743FE0:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*8+8], 0FFFFFFFEh
jnz	short loc_743FE0
mov	ebx, [eax+4]
lea	edi, [edx+edx*2]
lea	edi, [esi+edi*8+8]
cmp	ebx, ecx
jnz	short loc_74404A
test	edi, edi
jz	short loc_74401F
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_74401F:
mov	edi, [esp+10h+arg_4]
mov	esi, [edi]
mov	ebx, [esi]
mov	[eax+8], ebx
mov	ebx, [esi+4]
mov	[eax+0Ch], ebx
mov	esi, [esi+8]
mov	[eax+10h], esi
mov	esi, [edi+4]
mov	esi, [esi]
pop	ebx
mov	[eax+14h], esi
pop	edi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_74404A:
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jz	short loc_744066

loc_744057:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jnz	short loc_744057

loc_744066:
test	edi, edi
jz	short loc_74408A
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_74408A:
mov	esi, [esp+10h+arg_4]
mov	[ebx], edx
mov	edx, [esi]
mov	edi, [edx]
mov	[eax+8], edi
mov	edi, [edx+4]
mov	[eax+0Ch], edi
mov	edx, [edx+8]
mov	[eax+10h], edx
mov	edx, [esi+4]
mov	edx, [edx]
pop	ebx
pop	edi
mov	[eax+14h], edx
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_743F50 endp

align 10h



sub_7440C0 proc	near
mov	ecx, [ecx+4]
jmp	sub_743190
sub_7440C0 endp

align 10h



sub_7440D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 20h
movzx	eax, [esp+20h+arg_4]
neg	eax
sbb	eax, eax
and	eax, 1000h
push	esi
mov	[esp+24h+var_20], eax
push	edi
mov	eax, 2000h
mov	[esp+28h+var_18], eax
mov	[esp+28h+var_14], eax
mov	edi, ecx
mov	ecx, dword_1855FC0
lea	eax, [esp+28h+var_20]
mov	[esp+28h+var_1C], 10h
mov	[esp+28h+var_10], 0FFFFFFFFh
mov	[esp+28h+var_C], 0
mov	[esp+28h+var_4], 0
mov	[esp+28h+var_8], 6
mov	edx, [ecx]
mov	edx, [edx+10h]
push	eax
push	offset a_font_cache ; "_Font_Cache"
call	edx
mov	esi, eax
mov	eax, [esi]
mov	edx, [eax+28h]
push	0
push	0A10h
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_744155
push	esi
mov	ecx, eax
call	sub_742E70
jmp	short loc_744157

loc_744155:
xor	eax, eax

loc_744157:
push	eax
mov	ecx, esi
mov	[edi+48h], eax
call	sub_64A350
mov	eax, [esp+28h+arg_0]
push	eax
mov	ecx, edi
call	sub_741CB0
pop	edi
pop	esi
add	esp, 20h
retn	8
sub_7440D0 endp

align 10h



sub_744180 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	edi
mov	edi, ecx
mov	ebp, [edi+48h]
lea	eax, [edi+44h]
xor	ebx, ebx
mov	[esp+10h+var_4], edi
cmp	ebp, eax
jz	loc_744245
push	esi
jmp	short loc_7441A0
align 10h

loc_7441A0:
mov	esi, [ebp+8]
cmp	esi, ebx
jz	loc_744233
mov	ecx, [esi+1Ch]
lea	edi, [esi+1Ch]
cmp	ecx, ebx
jz	short loc_7441BF
mov	eax, [ecx]
mov	edx, [eax+74h]
push	3
push	edi
call	edx

loc_7441BF:
mov	[edi], ebx
mov	[edi+4], ebx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_744221
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_7441F4:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_744207
mov	dword ptr [eax], 0FFFFFFFEh

loc_744207:
add	ecx, 24h
sub	edx, 1
jnz	short loc_7441F4
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	[esi], ebx

loc_744221:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	edi, [esp+14h+var_4]

loc_744233:
mov	[ebp+8], ebx
mov	ebp, [ebp+4]
lea	eax, [edi+44h]
cmp	ebp, eax
jnz	loc_7441A0
pop	esi

loc_744245:
lea	ecx, [edi+4Ch]
call	sub_7545B0
mov	ecx, [edi+4]
cmp	ecx, ebx
jz	short loc_74426A
cmp	[edi+24h], bl
jz	short loc_74426A
mov	eax, [ecx]
mov	eax, [eax+0C8h]
lea	edx, [edi+10h]
push	edx
call	eax
mov	[edi+4], ebx

loc_74426A:
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn
sub_744180 endp

align 10h



sub_744270 proc	near

var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+18h+arg_0]
cmp	eax, edi
jz	short loc_7442BF
test	eax, eax
jz	short loc_74428B
call	sub_744180

loc_74428B:
mov	[esi+4], edi
mov	byte ptr [esi+24h], 0
mov	eax, [edi]
mov	edx, [eax+4]
lea	ecx, [esp+18h+var_10]
push	ecx
mov	ecx, edi
call	edx
test	dword ptr [esp+18h+var_10], 60000h
jz	short loc_7442BF
mov	ecx, [esi+4]
mov	byte ptr [esi+24h], 1
mov	eax, [ecx]
mov	edx, [eax+0C4h]
add	esi, 10h
push	esi
call	edx

loc_7442BF:
pop	edi
pop	esi
add	esp, 10h
retn	4
sub_744270 endp

align 10h



; int __stdcall	sub_7442D0(int,	int, float)
sub_7442D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
push	ebp
push	edi
mov	edi, ecx
mov	ecx, [eax+48h]
mov	edx, [ecx+0Ch]
push	edx
mov	ecx, edi
mov	[esp+20h+var_10], edi
call	sub_744270
mov	eax, [esp+1Ch+arg_0]
xor	ebx, ebx
cmp	eax, ebx
jz	loc_7443FB
cmp	[eax+0Ch], edi
jnz	loc_7443FB
mov	ebp, [eax+8]
cmp	ebp, ebx
jz	loc_7443FB
cmp	[ebp+4Dh], bl
jnz	loc_7443FB
fldz
mov	byte ptr [esp+1Ch+arg_4], 1
fcomp	[esp+1Ch+arg_8]
fnstsw	ax
test	ah, 44h
jp	short loc_74432F
mov	byte ptr [esp+1Ch+arg_4], bl

loc_74432F:
push	esi
mov	[esp+20h+var_C], ebx
cmp	[ebp+14h], ebx
jbe	loc_7443E3
lea	ecx, [ecx+0]

loc_744340:
mov	esi, [ebp+10h]
add	esi, ebx
cmp	byte ptr [esp+20h+arg_4], 0
jz	short loc_7443A4
cmp	dword ptr [esi+0Ch], 0
jz	short loc_7443A4
movzx	edi, byte ptr [esi+6]
test	edi, edi
jz	short loc_7443A0
movzx	eax, word ptr [esi+10h]
mov	[esp+20h+arg_0], eax
fild	[esp+20h+arg_0]
fnstcw	word ptr [esp+20h+arg_0]
movzx	eax, word ptr [esp+20h+arg_0]
fmul	[esp+20h+arg_8]
or	eax, 0C00h
mov	dword ptr [esp+20h+var_8], eax
fadd	ds:dbl_15FCC48
fldcw	word ptr [esp+20h+var_8]
fistp	[esp+20h+var_8]
mov	ecx, dword ptr [esp+20h+var_8]
push	ecx
mov	ecx, [esp+24h+var_10]
fldcw	word ptr [esp+24h+arg_0]
call	sub_7415B0
cmp	eax, edi
jnz	short loc_7443EF

loc_7443A0:
mov	edi, [esp+20h+var_10]

loc_7443A4:
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_7443CE
push	eax
push	esi
lea	ecx, [edi+4Ch]
call	sub_741C60
test	al, al
jz	short loc_7443EF
cmp	byte ptr [edi+24h], 0
jz	short loc_7443CE
mov	edx, [esi+0Ch]
mov	eax, [edx+0Ch]
mov	ecx, 8000h
or	[eax+20h], cx

loc_7443CE:
mov	eax, [esp+20h+var_C]
inc	eax
add	ebx, 20h
mov	[esp+20h+var_C], eax
cmp	eax, [ebp+14h]
jb	loc_744340

loc_7443E3:
pop	esi
pop	edi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	0Ch

loc_7443EF:
pop	esi
pop	edi
pop	ebp
xor	al, al
pop	ebx
add	esp, 10h
retn	0Ch

loc_7443FB:
pop	edi
pop	ebp
xor	al, al
pop	ebx
add	esp, 10h
retn	0Ch
sub_7442D0 endp

align 10h



sub_744410 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+1Ch]
lea	esi, [edi+1Ch]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_74442B
mov	eax, [ecx]
mov	edx, [eax+74h]
push	3
push	esi
call	edx

loc_74442B:
mov	ecx, edi
mov	[esi], ebx
mov	[esi+4], ebx
call	sub_741970
push	ebx
lea	ecx, [edi+4]
call	sub_743D80
cmp	[edi+14h], ebx
lea	esi, [edi+10h]
jbe	short loc_744477
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_744485
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_744467
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_744467:
mov	[esi+8], ebx
mov	[esi+4], ebx
mov	[edi+4Ch], bl
mov	[edi+4Dh], bl
pop	edi
pop	esi
pop	ebx
retn

loc_744477:
cmp	[esi+8], ebx
ja	short loc_744485
push	ebx
push	esi
mov	ecx, esi
call	sub_7418E0

loc_744485:
mov	[esi+4], ebx
mov	[edi+4Ch], bl
mov	[edi+4Dh], bl
pop	edi
pop	esi
pop	ebx
retn
sub_744410 endp

align 10h



sub_7444A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_4= dword ptr  8

sub	esp, 1Ch
fld1
mov	dl, [esp+1Ch+arg_0]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+8], 12h
mov	dword ptr [esi], offset	off_1440C64
mov	ecx, 1
mov	[esi+4], ecx
mov	[esi+14h], ecx
mov	dword ptr [esi+18h], 30h
mov	dword ptr [esi+1Ch], 2
mov	dword ptr [esi+20h], 100h
mov	dword ptr [esi+24h], 200h
mov	eax, 400h
mov	[esi+0Ch], eax
mov	[esi+10h], eax
fstp	dword ptr [esi+2Ch]
fld	ds:flt_15FDC34
mov	[esp+20h+var_1C], eax
fstp	dword ptr [esi+38h]
mov	[esp+20h+var_18], eax
mov	eax, [esp+20h+arg_4]
fld	ds:flt_15FDC64
mov	[esi+44h], ecx
fstp	dword ptr [esi+3Ch]
fld	ds:flt_15FCC84
mov	[esp+20h+var_14], ecx
push	eax
fstp	dword ptr [esi+40h]
lea	ecx, [esp+24h+var_1C]
mov	[esi+28h], dl
xor	edx, edx
push	ecx
mov	ecx, esi
mov	[esi+29h], dl
mov	dword ptr [esi+34h], 200h
mov	[esi+48h], edx
mov	[esp+28h+var_10], 30h
mov	[esp+28h+var_C], 2
mov	[esp+28h+var_8], 100h
mov	[esp+28h+var_4], 200h
call	sub_7440D0
mov	eax, esi
pop	esi
add	esp, 1Ch
retn	8
sub_7444A0 endp

align 10h



sub_744570 proc	near

var_8= dword ptr -8
lpCriticalSection= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	ebx, ecx
lea	eax, [ebx+9F8h]
push	edi
push	eax		; lpCriticalSection
mov	[esp+1Ch+var_8], ebx
mov	[esp+1Ch+lpCriticalSection], eax
call	ds:EnterCriticalSection
mov	ecx, ebx
call	sub_744180
lea	eax, [ebx+44h]
lea	ecx, [ebx+30h]
mov	[eax], eax
mov	[eax+4], eax
call	sub_742270
mov	eax, [ebx+8F0h]
lea	ebp, [ebx+8F0h]
test	eax, eax
jnz	short loc_7445BB
xor	edi, edi
xor	esi, esi
jmp	short loc_7445D0

loc_7445BB:
xor	esi, esi
lea	ecx, [eax+8]

loc_7445C0:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_7445CE
inc	esi
add	ecx, 0Ch
cmp	esi, [eax+4]
jbe	short loc_7445C0

loc_7445CE:
mov	edi, ebp

loc_7445D0:
test	edi, edi
jz	short loc_744613
mov	eax, [edi]
test	eax, eax
jz	short loc_744613
cmp	esi, [eax+4]
jg	short loc_744613
lea	ecx, [ebx+8]
lea	edx, [esi+esi*2]
push	ecx
mov	ecx, [eax+edx*4+10h]
call	sub_71A210
mov	ecx, [edi]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_7445D0
inc	esi
cmp	esi, eax
ja	short loc_7445D0
lea	edx, [esi+esi*2]
lea	ecx, [ecx+edx*4+8]

loc_744604:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_7445D0
inc	esi
add	ecx, 0Ch
cmp	esi, eax
jbe	short loc_744604
jmp	short loc_7445D0

loc_744613:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_744656
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_744622:
mov	eax, [ebp+0]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_744636
mov	dword ptr [eax], 0FFFFFFFEh

loc_744636:
add	ecx, 0Ch
sub	edx, 1
jnz	short loc_744622
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [ebp+0], 0

loc_744656:
mov	esi, [ebx+90Ch]
lea	edi, [ebx+908h]
lea	ebp, [ebx+8F4h]
cmp	esi, edi
jz	short loc_744691
lea	esp, [esp+0]

loc_744670:
mov	ecx, [esi+14h]
mov	ebx, [esi+4]
test	ecx, ecx
jz	short loc_74467F
call	sub_70E500

loc_74467F:
mov	eax, [ebp+0Ch]
mov	[esi], eax
mov	[ebp+0Ch], esi
mov	esi, ebx
cmp	ebx, edi
jnz	short loc_744670
mov	ebx, [esp+18h+var_8]

loc_744691:
mov	ecx, ebp
mov	[edi], edi
mov	[edi+4], edi
call	sub_705E60
mov	eax, [ebx+910h]
test	eax, eax
jz	short loc_7446ED
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]
nop

loc_7446B0:
mov	eax, [ebx+910h]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_7446C7
mov	dword ptr [eax], 0FFFFFFFEh

loc_7446C7:
add	ecx, 18h
sub	edx, 1
jnz	short loc_7446B0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx+910h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [ebx+910h], 0

loc_7446ED:
mov	eax, [esp+18h+lpCriticalSection]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_744570 endp




sub_744700 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_744570
lea	ecx, [esi+9F8h]	; lpCriticalSection
call	sub_64D730
lea	ecx, [esi+9A0h]
call	sub_74CD90
lea	ecx, [esi+990h]
call	sub_74CD90
lea	ecx, [esi+958h]
call	sub_74CD90
lea	ecx, [esi+948h]
call	sub_74CD90
lea	ecx, [esi+92Ch]
call	sub_74CD90
lea	ecx, [esi+910h]
call	sub_7419C0
mov	eax, [esi+8F4h]
test	eax, eax
jz	short loc_74477A

loc_744760:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [eax+0BE8h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, edi
test	edi, edi
jnz	short loc_744760

loc_74477A:
lea	ecx, [esi+8F0h]
call	sub_6F4100
lea	ecx, [esi+4Ch]
call	sub_7549E0
mov	eax, [esi+30h]
test	eax, eax
jz	short loc_7447BA
jmp	short loc_7447A0
align 10h

loc_7447A0:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edi, [eax+7F0h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, edi
test	edi, edi
jnz	short loc_7447A0

loc_7447BA:
pop	edi
mov	dword ptr [esi+8], offset off_143A4DC
mov	dword ptr [esi+10h], offset off_143F684
pop	esi
retn
sub_744700 endp

align 10h



sub_7447D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
push	esi
movzx	esi, byte ptr [eax+8]
push	edi
movzx	edi, byte ptr [eax+7]
xor	esi, edi
movzx	edi, byte ptr [eax+6]
mov	[esp+10h+var_8], eax
mov	[esp+10h+var_4], edx
mov	edx, [eax]
movzx	eax, word ptr [eax+4]
xor	esi, edi
xor	esi, eax
mov	eax, edx
shr	eax, 6
xor	esi, eax
xor	esi, edx
push	esi
lea	edx, [esp+14h+var_8]
push	edx
push	ecx
call	sub_743F50
pop	edi
pop	esi
add	esp, 8
retn	8
sub_7447D0 endp

align 10h



; int __stdcall	sub_744820(int,	int, int, char,	char, float, float, int, int)
sub_744820 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	word ptr -18h
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

sub	esp, 24h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebp, [esi+8F0h]
lea	ebx, [esi+8F0h]
push	edi
mov	edi, [esp+34h+arg_0]
test	ebp, ebp
jz	short loc_744867
mov	eax, edi
shr	eax, 6
mov	[esp+34h+var_20], eax
xor	eax, edi
and	eax, [ebp+4]
mov	ecx, ebx
push	eax
lea	eax, [esp+38h+arg_0]
push	eax
call	sub_6ABC50
test	eax, eax
jl	short loc_744867
lea	ecx, [eax+eax*2]
lea	eax, [ebp+ecx*4+10h]
test	eax, eax
jnz	short loc_74488B

loc_744867:
mov	eax, edi
shr	eax, 6
mov	[esp+34h+var_20], eax
xor	eax, edi
push	eax
lea	edx, [esp+38h+arg_0]
push	edx
push	ebx
mov	ecx, ebx
call	sub_741A10
lea	eax, [esi+8]
push	eax
mov	ecx, edi
call	sub_719710

loc_74488B:
mov	ecx, [edi+0Ch]
mov	edx, [ecx+14h]
shr	edx, 5
test	dl, 1
jz	short loc_7448AE
mov	edx, [esp+34h+arg_8]
mov	eax, [ecx]
mov	eax, [eax+10h]
push	edx
mov	edx, [esp+38h+arg_4]
push	edx
call	eax
test	al, al
jnz	short loc_7448B6

loc_7448AE:
mov	[esp+34h+arg_8], 0

loc_7448B6:
movzx	ebx, byte ptr [esp+34h+arg_C]
mov	dx, word ptr [esp+34h+arg_4]
mov	ebp, [esi+910h]
neg	ebx
sbb	ebx, ebx
xor	ecx, ecx
and	ebx, 2
cmp	byte ptr [esp+34h+arg_10], cl
mov	[esp+34h+var_18], dx
mov	edx, [esp+34h+arg_8]
setnz	cl
mov	[esp+34h+var_1C], edi
mov	[esp+34h+var_16], dl
or	ebx, ecx
mov	cl, byte ptr [esp+34h+arg_1C]
mov	[esp+34h+var_14], cl
lea	ecx, [esi+910h]
mov	al, bl
and	al, 3
mov	byte ptr [esp+34h+arg_0], al
mov	[esp+34h+var_15], al
test	ebp, ebp
jz	loc_74499F
movzx	eax, al
movzx	edx, dl
xor	eax, edx
movzx	edx, word ptr [esp+34h+arg_4]
xor	eax, edx
movzx	edx, byte ptr [esp+34h+arg_1C]
xor	eax, edx
xor	eax, [esp+34h+var_20]
xor	eax, edi
and	eax, [ebp+4]
push	eax
lea	eax, [esp+38h+var_1C]
push	eax
call	sub_741B70
test	eax, eax
jl	short loc_74499B
lea	ecx, [eax+eax*2]
lea	ebp, [ebp+ecx*8+10h]
test	ebp, ebp
jz	short loc_74499B
add	ebp, 0Ch
jz	short loc_74499B
mov	eax, [ebp+0]
mov	edx, [eax]
mov	edi, [eax+4]
mov	[edx+4], edi
mov	edx, [eax+4]
mov	edi, [eax]
mov	[edx], edi
mov	edx, [esi+908h]
lea	ecx, [esi+908h]
mov	[eax], edx
mov	[eax+4], ecx
mov	edx, [ecx]
mov	[edx+4], eax
mov	[ecx], eax
cmp	byte ptr [esi+24h], 0
jz	short loc_744980
mov	eax, [ebp+0]
or	byte ptr [eax+0Fh], 80h

loc_744980:
mov	eax, [ebp+0]
mov	ecx, [eax+14h]
call	sub_70C940
mov	ecx, [ebp+0]
mov	eax, [ecx+14h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	24h

loc_74499B:
mov	edx, [esp+34h+arg_8]

loc_74499F:
mov	ecx, [edi+0Ch]
mov	eax, [ecx]
mov	eax, [eax+18h]
push	edx
mov	edx, [esp+38h+arg_4]
push	edx
call	eax
mov	ebp, eax
test	ebp, ebp
jz	short loc_744A08
mov	eax, [esi+910h]
test	eax, eax
jz	short loc_7449C1
mov	eax, [eax]

loc_7449C1:
cmp	eax, [esi+9D0h]
jb	loc_744A75
mov	eax, [esi+90Ch]
mov	[esp+34h+var_24], eax
mov	cl, [eax+0Fh]
test	cl, cl
jns	short loc_744A14
mov	eax, [esp+34h+arg_20]
test	eax, eax
jz	short loc_7449FD
cmp	byte ptr [esi+26h], 0
jz	short loc_7449FD
add	eax, 0Ch
push	offset aWarningIncreas ; "Warning: Increase vector glyph cache ca"...
push	eax
call	sub_6AAFC0
add	esp, 8

loc_7449FD:
mov	ecx, ebp
mov	byte ptr [esi+26h], 0
call	sub_70E500

loc_744A08:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 24h
retn	24h

loc_744A14:
mov	edx, [eax+8]
and	cl, 3
mov	[esp+34h+var_1C], edx
mov	dx, [eax+0Ch]
mov	[esp+34h+var_15], cl
mov	[esp+34h+var_18], dx
mov	dl, [eax+0Eh]
mov	al, [eax+10h]
lea	ecx, [esp+34h+var_1C]
push	ecx
lea	ecx, [esi+910h]
mov	[esp+38h+var_16], dl
mov	[esp+38h+var_14], al
call	sub_7423E0
mov	eax, [esp+34h+var_24]
mov	edx, [eax]
lea	ecx, [eax+4]
mov	[esp+34h+arg_20], eax
mov	eax, [ecx]
mov	[edx+4], eax
mov	ecx, [ecx]
mov	edx, [esp+34h+arg_20]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [esp+34h+var_24]
push	ecx
lea	ecx, [esi+8F4h]
call	sub_742660

loc_744A75:
lea	ecx, [esi+8F4h]
call	sub_742350
mov	[esp+34h+var_24], eax
mov	[eax+8], edi
mov	edx, [esp+34h+var_24]
mov	ax, word ptr [esp+34h+arg_4]
mov	[edx+0Ch], ax
mov	ecx, [esp+34h+var_24]
mov	dl, byte ptr [esp+34h+arg_8]
mov	[ecx+0Eh], dl
mov	eax, [esp+34h+var_24]
mov	[eax+0Fh], bl
mov	ecx, [esp+34h+var_24]
mov	ebx, [esp+34h+arg_1C]
mov	[ecx+10h], bl
mov	ecx, [esi]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	44h
call	eax
test	eax, eax
jz	short loc_744AD4
push	0F2h
mov	ecx, eax
call	sub_7111E0
mov	[esp+34h+arg_1C], eax
jmp	short loc_744ADC

loc_744AD4:
mov	[esp+34h+arg_1C], 0

loc_744ADC:
mov	eax, [esp+34h+var_24]
mov	ecx, [eax+14h]
add	eax, 14h
mov	[esp+34h+arg_20], eax
test	ecx, ecx
jz	short loc_744AF7
call	sub_70E500
mov	eax, [esp+34h+arg_20]

loc_744AF7:
fldz
mov	ecx, [esp+34h+arg_1C]
mov	[eax], ecx
fst	[esp+34h+var_10]
fst	[esp+34h+var_C]
fst	[esp+34h+var_8]
fstp	[esp+34h+var_4]
cmp	byte ptr [ebp+25h], 0
jz	short loc_744B26
mov	edx, [ebp+0]
mov	edx, [edx+14h]
lea	eax, [esp+34h+var_10]
push	eax
mov	ecx, ebp
call	edx
jmp	short loc_744B3A

loc_744B26:
mov	ecx, [edi+0Ch]
mov	eax, [ecx]
mov	eax, [eax+30h]
lea	edx, [esp+34h+var_10]
push	edx
mov	edx, [esp+38h+arg_4]
push	edx
call	eax

loc_744B3A:
fld	[esp+34h+arg_18]
mov	ecx, [esp+34h+arg_10]
mov	edx, [esp+34h+arg_C]
push	ebx		; int
sub	esp, 8
fstp	[esp+40h+var_3C]
lea	eax, [esp+40h+var_10]
fld	[esp+40h+arg_14]
fstp	[esp+40h+var_40]
push	ecx		; char
mov	ecx, [esp+44h+var_24]
push	edx		; char
mov	edx, [ecx+14h]
push	eax		; int
push	ebp		; int
push	edx		; int
mov	ecx, esi
call	sub_7436D0
fld	[esp+34h+var_C]
mov	eax, [esp+34h+var_24]
fstp	[esp+34h+arg_1C]
fld	[esp+34h+var_8]
mov	eax, [eax+14h]
fstp	[esp+34h+arg_10]
add	eax, 4
fld	[esp+34h+var_4]
mov	[esp+34h+var_1C], edi
fstp	[esp+34h+arg_C]
mov	[esp+34h+var_14], bl
fld	[esp+34h+var_10]
fstp	dword ptr [eax]
fld	[esp+34h+arg_1C]
fstp	dword ptr [eax+4]
fld	[esp+34h+arg_10]
fstp	dword ptr [eax+8]
fld	[esp+34h+arg_C]
fstp	dword ptr [eax+0Ch]
mov	ecx, [esp+34h+var_24]
mov	eax, [ecx+14h]
or	byte ptr [eax+24h], 10h
mov	edx, [esp+34h+var_24]
mov	eax, [edx+14h]
or	byte ptr [eax+24h], 8
mov	eax, [esp+34h+var_24]
mov	ecx, [eax+14h]
movzx	edx, byte ptr [ebp+25h]
mov	[ecx+25h], dl
mov	edx, [esi+908h]
mov	ecx, [esp+34h+var_24]
lea	eax, [esi+908h]
mov	[ecx+4], eax
mov	[ecx], edx
mov	edx, [eax]
mov	[edx+4], ecx
movzx	edx, byte ptr [esp+34h+arg_0]
mov	[eax], ecx
mov	ax, word ptr [esp+34h+arg_4]
mov	cl, byte ptr [esp+34h+arg_8]
mov	[esp+34h+var_18], ax
mov	[esp+34h+var_16], cl
lea	eax, [esp+34h+var_24]
push	eax
lea	ecx, [esp+38h+var_1C]
push	ecx
lea	ecx, [esi+910h]
mov	[esp+3Ch+var_15], dl
call	sub_7447D0
cmp	byte ptr [esi+24h], 0
jz	short loc_744C2F
mov	eax, [esp+34h+var_24]
or	byte ptr [eax+0Fh], 80h

loc_744C2F:
mov	edx, [esp+34h+var_24]
mov	ecx, [edx+14h]
call	sub_70C940
mov	eax, [esp+34h+var_24]
mov	esi, [eax+14h]
mov	ecx, ebp
call	sub_70E500
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	24h
sub_744820 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_744C60(int,	int, int, int, float, int, int)
sub_744C60 proc	near

var_1E0= dword ptr -1E0h
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C4= dword ptr -1C4h
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_145= byte ptr -145h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	byte ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	byte ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	qword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 1B4h
mov	eax, [ebp+arg_14]
cmp	dword ptr [eax+18h], 0
push	ebx
mov	ebx, [ebp+arg_18]
push	esi
push	edi
mov	[esp+1C0h+var_13C], ecx
mov	[esp+1C0h+var_180], 0
jz	short loc_744C8C
add	ebx, ebx

loc_744C8C:
mov	edi, [ebp+arg_0]
mov	eax, [edi+14h]
lea	esi, [edi+10h]
test	eax, eax
jbe	short loc_744CC5
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_744CD5
mov	eax, [esi]
test	eax, eax
jz	short loc_744CBC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_744CBC:
mov	dword ptr [esi+8], 0
jmp	short loc_744CD5

loc_744CC5:
cmp	dword ptr [esi+8], 0
ja	short loc_744CD5
push	0
push	esi
mov	ecx, esi
call	sub_7418E0

loc_744CD5:
mov	dword ptr [esi+4], 0
cmp	ebx, [esi+8]
jbe	short loc_744CEA
push	ebx
push	esi
mov	ecx, esi
call	sub_7418E0

loc_744CEA:
lea	ecx, [esp+1C0h+var_58]
mov	byte ptr [edi+4Ch], 0
mov	byte ptr [edi+4Dh], 0
call	sub_64E8E0
lea	ecx, [esp+1C0h+var_30]
call	sub_64E8E0
mov	edi, [ebp+arg_14]
test	byte ptr [edi+7], 1
mov	esi, [ebp+arg_10]
jz	loc_744DFF
fld	dword ptr [esi+18h]
mov	ecx, [ebp+arg_8]
fstp	[esp+1C0h+var_58]
add	ecx, 78h
fld	dword ptr [esi+1Ch]
push	ecx
fstp	[esp+1C4h+var_54]
lea	ecx, [esp+1C4h+var_58]
fld	dword ptr [esi+20h]
fstp	[esp+1C4h+var_50]
fld	dword ptr [esi+24h]
fstp	[esp+1C4h+var_4C]
fld	dword ptr [esi+28h]
fstp	[esp+1C4h+var_48]
fld	dword ptr [esi+2Ch]
fstp	[esp+1C4h+var_44]
call	sub_64EBB0
fld	[esp+1C0h+var_58]
lea	edx, [esp+1C0h+var_D4]
fst	[esp+1C0h+var_30]
push	edx
fld	[esp+1C4h+var_54]
lea	ecx, [esp+1C4h+var_30]
fst	[esp+1C4h+var_2C]
fld	[esp+1C4h+var_50]
fst	[esp+1C4h+var_28]
fld	[esp+1C4h+var_4C]
fst	[esp+1C4h+var_24]
fld	[esp+1C4h+var_48]
fst	[esp+1C4h+var_20]
fld	[esp+1C4h+var_44]
fst	[esp+1C4h+var_1C]
fstp	[esp+1C4h+var_C0]
fxch	st(4)
fstp	[esp+1C4h+var_D4]
fxch	st(2)
fstp	[esp+1C4h+var_D0]
fstp	[esp+1C4h+var_CC]
fstp	[esp+1C4h+var_C8]
fstp	[esp+1C4h+var_C4]
call	sub_64E9E0

loc_744DFF:
fld	dword ptr [esi+18h]
lea	eax, [esp+1C0h+var_108]
fstp	[esp+1C0h+var_D4]
push	eax
fld	dword ptr [esi+1Ch]
lea	ecx, [esp+1C4h+var_150]
fstp	[esp+1C4h+var_D0]
push	ecx
fld	dword ptr [esi+24h]
lea	ecx, [esp+1C8h+var_D4]
fstp	[esp+1C8h+var_C8]
fld	dword ptr [esi+28h]
fstp	[esp+1C8h+var_C4]
fldz
fst	[esp+1C8h+var_CC]
fst	[esp+1C8h+var_C0]
fld1
fstp	[esp+1C8h+var_108]
fstp	[esp+1C8h+var_104]
call	sub_64E9B0
fld	[esp+1C0h+var_150]
fabs
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
fld	ds:flt_1432398
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_744E9B
fld	[esp+1C0h+var_14C]
fabs
fstp	[esp+1C0h+var_184]
fcomp	[esp+1C0h+var_184]
fnstsw	ax
test	ah, 5
jp	short loc_744E9D
mov	[esp+1C0h+var_145], 1
jmp	short loc_744EA2

loc_744E9B:
fstp	st

loc_744E9D:
mov	[esp+1C0h+var_145], 0

loc_744EA2:
cmp	dword ptr [edi+18h], 0
mov	eax, 1
mov	ecx, eax
mov	[esp+1C0h+var_100], eax
mov	[esp+1C0h+var_FC], ecx
jz	short loc_744ED5
xor	eax, eax
test	byte ptr [edi+13h], 60h
mov	[esp+1C0h+var_100], eax
jz	short loc_744ED5
xor	ecx, ecx
mov	[esp+1C0h+var_FC], ecx

loc_744ED5:
fldz
mov	[esp+1C0h+var_170], eax
fst	dword ptr [esi+54h]
fst	dword ptr [esi+58h]
cmp	eax, ecx
ja	loc_745ABD

loc_744EE9:
mov	eax, [esp+1C0h+var_170]
mov	edx, [esp+1C0h+var_100]
mov	[esp+1C0h+var_124], edx
cmp	eax, 1
jnz	short loc_744F09
mov	ecx, [ebp+arg_14]
mov	[esp+1C0h+var_17C], ecx
jmp	short loc_744F13

loc_744F09:
mov	edx, [ebp+arg_14]
add	edx, 0Ch
mov	[esp+1C0h+var_17C], edx

loc_744F13:
mov	ecx, [esp+1C0h+var_13C]
cmp	dword ptr [ecx+54h], 1
jbe	short loc_744F27
mov	[esp+1C0h+var_124], eax

loc_744F27:
mov	eax, [ebp+arg_4]
mov	edx, [eax]
mov	ecx, [eax+4]
mov	[esp+1C0h+var_11C], edx
mov	edx, [eax+8]
mov	ebx, [esp+1C0h+var_11C]
mov	[esp+1C0h+var_114], edx
mov	edx, [eax+10h]
mov	esi, [esp+1C0h+var_114]
mov	[esp+1C0h+var_118], ecx
mov	ecx, [eax+0Ch]
mov	[esp+1C0h+var_110], ecx
mov	[esp+1C0h+var_10C], edx
xor	edi, edi
jmp	short loc_744F70
align 10h

loc_744F70:
cmp	ebx, edi
jz	loc_745AA7
cmp	esi, [ebx+4]
jnb	loc_745AA7
cmp	esi, edi
jl	loc_745AA7
cmp	byte ptr [esp+1C0h+var_10C], 0
fstp	st
jnz	short loc_744FB0
fld	[esp+1C0h+var_110]
push	ecx		; float
fstp	[esp+1C4h+var_1C4]
push	esi		; int
mov	ecx, ebx
call	sub_733F00
test	al, al
jz	loc_745AA5

loc_744FB0:
mov	eax, [ebx]
mov	ecx, [eax+esi*4]
mov	eax, [ecx]
shr	eax, 1Fh
and	al, 1
jz	short loc_744FC4
movzx	ebx, byte ptr [ecx+1Ch]
jmp	short loc_744FC7

loc_744FC4:
mov	ebx, [ecx+4]

loc_744FC7:
lea	esi, [ecx+1Eh]
test	al, al
jnz	short loc_744FD1
lea	esi, [ecx+2Ah]

loc_744FD1:
call	sub_733C80
or	ecx, 0FFFFFFFFh
mov	[esp+1C0h+var_A0], ecx
mov	[esp+1C0h+var_98], ecx
lea	ecx, [esi+ebx*8]
mov	[esp+1C0h+var_9C], edi
mov	[esp+1C0h+var_94], edi
mov	[esp+1C0h+var_90], edi
mov	[esp+1C0h+var_8C], edi
mov	[esp+1C0h+var_80], edi
mov	[esp+1C0h+var_84], edi
mov	[esp+1C0h+var_88], edi
mov	[esp+1C0h+var_7C], 0
mov	[esp+1C0h+var_A4], edi
mov	[esp+1C0h+var_A8], edi
mov	[esp+1C0h+var_78], edi
mov	[esp+1C0h+var_74], edi
mov	[esp+1C0h+var_70], edi
mov	[esp+1C0h+var_6C], edi
mov	[esp+1C0h+var_68], edi
mov	[esp+1C0h+var_64], edi
mov	[esp+1C0h+var_60], edi
mov	[esp+1C0h+var_B8], esi
mov	[esp+1C0h+var_B4], ecx
mov	[esp+1C0h+var_B0], eax

loc_745077:
lea	ecx, [esp+1C0h+var_B8]
call	sub_735210
mov	eax, [esp+1C0h+var_B8]
lea	ebx, [ebx+0]

loc_745090:
xor	edi, edi
cmp	eax, edi
jz	loc_7459F7
cmp	eax, [esp+1C0h+var_B4]
jnb	loc_7459F7
mov	edx, eax
mov	[esp+1C0h+var_178], edx
cmp	[esp+1C0h+var_170], edi
jnz	short loc_7450C3
mov	ecx, 0FFDFh
and	[eax+6], cx
mov	eax, [esp+1C0h+var_B8]

loc_7450C3:
movzx	ecx, word ptr [edx]
mov	esi, 0FFFFh
cmp	cx, si
jnb	short loc_7450D8
movzx	ecx, cx
cmp	ecx, 0FFFFFFFFh
jnz	short loc_7450E4

loc_7450D8:
mov	edx, [ebp+arg_0]
mov	byte ptr [edx+4Ch], 1
jmp	loc_745970

loc_7450E4:
movzx	ecx, word ptr [edx+6]
mov	edx, ecx
shr	edx, 9
test	dl, 1
jnz	loc_745970
shr	ecx, 0Fh
test	cl, 1
jnz	short loc_745111
cmp	[esp+1C0h+var_170], 1
jnz	short loc_745111
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx+4Ch], 1
jmp	loc_745970

loc_745111:
mov	ebx, [esp+1C0h+var_6C]
test	ebx, ebx
jz	short loc_745121
mov	edi, [ebx+1Ch]
jmp	short loc_745123

loc_745121:
xor	edi, edi

loc_745123:
mov	[esp+1C0h+var_16C], edi
cmp	edi, [esp+1C0h+var_180]
jz	short loc_74519B
mov	esi, [esp+1C0h+var_13C]
add	esi, 8F0h
cmp	dword ptr [esi], 0
mov	[esp+1C0h+var_180], edi
jz	short loc_74516D
mov	eax, [esi]
mov	edx, edi
shr	edx, 6
xor	edx, edi
and	edx, [eax+4]
lea	eax, [esp+1C0h+var_16C]
push	edx
push	eax
mov	ecx, esi
call	sub_6ABC50
test	eax, eax
jl	short loc_74516D
lea	ecx, [eax+eax*2]
mov	eax, [esi]
lea	eax, [eax+ecx*4+10h]
test	eax, eax
jnz	short loc_74519B

loc_74516D:
mov	edx, edi
shr	edx, 6
xor	edx, edi
push	edx
lea	eax, [esp+1C4h+var_16C]
push	eax
push	esi
mov	ecx, esi
call	sub_741A10
mov	ecx, [esp+1C0h+var_13C]
add	ecx, 8
push	ecx
mov	ecx, edi
call	sub_719710
mov	ebx, [esp+1C0h+var_6C]

loc_74519B:
mov	ecx, [esp+1C0h+var_178]
xor	edx, edx
mov	word ptr [esp+1C0h+var_158], dx
mov	byte ptr [esp+1C0h+var_158+2], dl
mov	byte ptr [esp+1C0h+var_158+3], dl
mov	byte ptr [esp+1C0h+var_154], dl
mov	byte ptr [esp+1C0h+var_154+1], dl
mov	byte ptr [esp+1C0h+var_154+3], dl
mov	byte ptr [esp+1C0h+var_154+2], 10h
mov	[esp+1C0h+var_15C], edi
movzx	eax, word ptr [ecx]
mov	edx, 0FFFFh
cmp	ax, dx
jb	short loc_7451D2
mov	eax, edx

loc_7451D2:
mov	word ptr [esp+1C0h+var_158], ax
movzx	eax, word ptr [ecx+4]
and	eax, 0FFFh
test	byte ptr [ecx+6], 10h
mov	[esp+1C0h+var_16C], 0
mov	byte ptr [esp+1C0h+var_164], 0
jnz	short loc_745217
mov	[esp+1C0h+var_120], eax
fild	[esp+1C0h+var_120]
test	eax, eax
jge	short loc_74520B
fadd	ds:flt_15FCC08

loc_74520B:
fstp	[esp+1C0h+var_168]
fld	ds:dbl_15FD690
jmp	short loc_74523D

loc_745217:
mov	[esp+1C0h+var_120], eax
fild	[esp+1C0h+var_120]
test	eax, eax
jge	short loc_74522F
fadd	ds:flt_15FCC08

loc_74522F:
fld	ds:dbl_15FD690
fmul	st(1), st
fxch	st(1)
fstp	[esp+1C0h+var_168]

loc_74523D:
fld	[esp+1C0h+var_168]
mov	ecx, [ebp+arg_10]
fmul	dword ptr [ecx+48h]
fstp	[esp+1C0h+var_168]
fld1
fcom	[esp+1C0h+var_168]
fnstsw	ax
test	ah, 41h
jnz	short loc_74525E
fstp	[esp+1C0h+var_168]
jmp	short loc_745260

loc_74525E:
fstp	st

loc_745260:
fld	[esp+1C0h+var_168]
fadd	ds:dbl_15FCC48
fnstcw	word ptr [esp+1C0h+var_160]
movzx	eax, word ptr [esp+1C0h+var_160]
or	eax, 0C00h
cmp	dword ptr [edi+10h], 0
mov	[esp+1C0h+var_184], eax
fldcw	word ptr [esp+1C0h+var_184]
fistp	[esp+1C0h+var_40]
mov	edx, dword ptr [esp+1C0h+var_40]
fldcw	word ptr [esp+1C0h+var_160]
mov	[esp+1C0h+var_160], edx
jnz	loc_745609
mov	esi, [esp+1C0h+var_17C]
test	byte ptr [esi+7], 1
jz	short loc_74531B
movzx	eax, byte ptr [esi+8]
mov	[esp+1C0h+var_184], eax
fild	[esp+1C0h+var_184]
fmul	st, st(1)
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
fldz
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_745319
movzx	ecx, byte ptr [esi+9]
mov	[esp+1C0h+var_184], ecx
fild	[esp+1C0h+var_184]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_74531D
cmp	[esp+1C0h+var_170], 1
jnz	short loc_74531D
movzx	eax, word ptr [esp+1C0h+var_158]
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+14h]
call	eax
mov	ebx, [esp+1C0h+var_6C]
test	al, al
jz	short loc_74531D
mov	byte ptr [esp+1C0h+var_164], 1
jmp	short loc_745322

loc_745319:
fstp	st

loc_74531B:
fstp	st

loc_74531D:
mov	byte ptr [esp+1C0h+var_164], 0

loc_745322:
mov	eax, [edi+0Ch]
fld	dword ptr [eax+0Ch]
fadd	dword ptr [eax+8]
mov	al, [esi+7]
fstp	[esp+1C0h+var_184]
fld	dword ptr [ebx+14h]
fld	[esp+1C0h+var_184]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_128]
fmul	dword ptr [ebx+18h]
fstp	[esp+1C0h+var_184]
test	al, 1
jz	short loc_745362
cmp	[esp+1C0h+var_170], 1
jnz	short loc_745362
mov	ecx, [esp+1C0h+var_160]
mov	[esp+1C0h+var_16C], ecx
jmp	short loc_74536A

loc_745362:
mov	[esp+1C0h+var_16C], 0

loc_74536A:
mov	ecx, [esp+1C0h+var_17C]
fld	[esp+1C0h+var_184]
movzx	ecx, byte ptr [ecx+0Bh]
mov	edx, [ebp+arg_8]
mov	esi, [edx+64h]
shr	ecx, 1
and	ecx, 0Fh
push	esi		; int
push	ecx		; int
mov	cl, [ebx+8]
mov	dl, al
and	cl, 1
shr	dl, 4
and	dl, 1
or	cl, dl
movzx	edx, cl
mov	ecx, [ebx+8]
sub	esp, 8
shr	ecx, 1
shr	al, 3
fstp	[esp+1D0h+var_1CC]
and	cl, 1
fld	[esp+1D0h+var_128]
and	al, 1
fstp	[esp+1D0h+var_1D0]
push	edx		; char
or	cl, al
mov	eax, [esp+1D4h+var_16C]
movzx	edx, cl
movzx	ecx, word ptr [esp+1D4h+var_158]
push	edx		; char
mov	edx, [esp+1D8h+var_15C]
push	eax		; int
push	ecx		; int
mov	ecx, [esp+1E0h+var_13C]
push	edx		; int
call	sub_744820
mov	[esp+1C0h+var_16C], eax
test	eax, eax
jz	loc_745600
fldz
mov	ebx, eax
test	byte ptr [ebx+24h], 10h
fst	[esp+1C0h+var_138]
fst	[esp+1C0h+var_134]
fst	[esp+1C0h+var_130]
fstp	[esp+1C0h+var_12C]
jz	short loc_745433
fld	dword ptr [ebx+4]
fstp	[esp+1C0h+var_138]
fld	dword ptr [ebx+8]
fstp	[esp+1C0h+var_134]
fld	dword ptr [ebx+0Ch]
fstp	[esp+1C0h+var_130]
fld	dword ptr [ebx+10h]
fstp	[esp+1C0h+var_12C]
jmp	short loc_745461

loc_745433:
mov	eax, [esp+1C0h+var_178]
movzx	eax, word ptr [eax]
mov	ecx, 0FFFFh
cmp	ax, cx
jnb	short loc_745449
movzx	eax, ax
jmp	short loc_74544C

loc_745449:
or	eax, 0FFFFFFFFh

loc_74544C:
mov	edi, [edi+0Ch]
mov	edx, [edi]
mov	edx, [edx+30h]
lea	ecx, [esp+1C0h+var_138]
push	ecx
push	eax
mov	ecx, edi
call	edx

loc_745461:
mov	esi, [esp+1C0h+var_17C]
test	byte ptr [esi+7], 1
jnz	short loc_7454A1
mov	ecx, [esp+1C0h+var_160]
lea	eax, [ecx+3]
shr	eax, 2
add	eax, ecx
cmp	eax, 0FFh
ja	short loc_745498
mov	ecx, [esp+1C0h+var_13C]
movzx	edx, byte ptr [eax+ecx+7F0h]
mov	eax, dword_167E204[edx*4]
mov	edx, eax
jmp	short loc_7454A5

loc_745498:
mov	eax, 0FFh
mov	edx, eax
jmp	short loc_7454A5

loc_7454A1:
mov	edx, [esp+1C0h+var_160]

loc_7454A5:
movzx	eax, byte ptr [esi+8]
movzx	ecx, byte ptr [esi+9]
mov	[esp+1C0h+var_184], eax
fild	[esp+1C0h+var_184]
mov	[esp+1C0h+var_184], ecx
fld	ds:dbl_15FD690
mov	ecx, [ebp+arg_10]
fmul	st(1), st
fxch	st(1)
fstp	[esp+1C0h+var_128]
fild	[esp+1C0h+var_184]
fmulp	st(1), st
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_128]
fld	dword ptr [ecx+54h]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_7454EF
fstp	dword ptr [ecx+54h]
jmp	short loc_7454F1

loc_7454EF:
fstp	st

loc_7454F1:
fld	[esp+1C0h+var_184]
fld	dword ptr [ecx+58h]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_745506
fstp	dword ptr [ecx+58h]
jmp	short loc_745508

loc_745506:
fstp	st

loc_745508:
fld	[esp+1C0h+var_12C]
mov	edi, [esp+1C0h+var_13C]
fsub	[esp+1C0h+var_134]
lea	eax, [esp+1C0h+var_E8+2]
push	eax		; int
lea	eax, [esp+1C4h+var_E8]
push	eax		; int
fstp	[esp+1C8h+var_184]
fld	[esp+1C8h+var_184]
lea	eax, [esp+1C8h+var_15C]
push	eax		; int
push	esi		; int
sub	esp, 8
fstp	[esp+1D8h+var_1D4]
add	edi, 4Ch
fld	dword ptr [ecx+48h]
fstp	[esp+1D8h+var_1D8]
push	edx		; int
fld	[esp+1DCh+var_168]
push	ecx		; float
mov	ecx, edi
fstp	[esp+1E0h+var_1E0]
call	sub_751E10
mov	cl, [esi+7]
test	cl, 1
jz	short loc_7455DD
test	byte ptr [esi+0Bh], 1
jnz	short loc_7455DD
cmp	byte ptr [ebx+25h], 0
jnz	short loc_7455DD
cmp	byte ptr [esp+1C0h+var_164], 0
jnz	short loc_7455DD
cmp	byte ptr [esi+8], 0
jnz	short loc_7455DD
movzx	edx, byte ptr [esp+1C0h+var_158+2]
fld	[esp+1C0h+var_130]
fsub	[esp+1C0h+var_138]
mov	eax, [edi+10h]
mov	[esp+1C0h+var_184], edx
mov	edx, [edi+0Ch]
add	eax, eax
fild	[esp+1C0h+var_184]
sub	edx, eax
mov	[esp+1C0h+var_120], edx
fmulp	st(1), st
fmul	ds:dbl_143B738
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
fmul	ds:dbl_15FCD78
fild	[esp+1C0h+var_120]
test	edx, edx
jge	short loc_7455CF
fadd	ds:flt_15FCC08

loc_7455CF:
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_7455DD
or	byte ptr [esp+1C0h+var_158+3], 4

loc_7455DD:
mov	ebx, [esp+1C0h+var_6C]

loc_7455E4:
test	ebx, ebx
jz	short loc_74563C
mov	eax, [ebx+8]
shr	eax, 5
and	al, 1
jz	short loc_7455F7
and	byte ptr [esp+1C0h+var_158+3], 0FDh

loc_7455F7:
mov	eax, [ebx+8]
shr	eax, 1
and	al, 1
jmp	short loc_74563E

loc_745600:
mov	ebx, [esp+1C0h+var_6C]
jmp	short loc_74560B

loc_745609:
fstp	st

loc_74560B:
mov	eax, [esp+1C0h+var_160]
mov	ecx, [esp+1C0h+var_17C]
mov	cl, [ecx+7]
mov	esi, [esp+1C0h+var_17C]
mov	byte ptr [esp+1C0h+var_158+2], al
shl	eax, 4
mov	edx, 100h
mov	byte ptr [esp+1C0h+var_158+3], cl
mov	word ptr [esp+1C0h+var_E8], ax
mov	word ptr [esp+1C0h+var_E8+2], dx
jmp	short loc_7455E4

loc_74563C:
xor	al, al

loc_74563E:
mov	dl, cl
shr	dl, 3
and	dl, 1
or	dl, al
jz	short loc_745651
or	byte ptr [esp+1C0h+var_158+3], 8
jmp	short loc_745656

loc_745651:
and	byte ptr [esp+1C0h+var_158+3], 0F7h

loc_745656:
test	ebx, ebx
jz	short loc_745662
mov	bl, [ebx+8]
and	bl, 1
jmp	short loc_745664

loc_745662:
xor	bl, bl

loc_745664:
shr	cl, 4
and	cl, 1
or	cl, bl
jz	short loc_745675
or	byte ptr [esp+1C0h+var_158+3], 10h
jmp	short loc_74567A

loc_745675:
and	byte ptr [esp+1C0h+var_158+3], 0EFh

loc_74567A:
mov	al, [esi+0Bh]
mov	edx, [esp+1C0h+var_158]
mov	ecx, [esp+1C0h+var_15C]
mov	byte ptr [esp+1C0h+var_154+3], al
mov	eax, [esp+1C0h+var_154]
mov	[esp+1C0h+var_F4], edx
mov	[esp+1C0h+var_F0], eax
xor	eax, eax
xor	edx, edx
mov	[esp+1C0h+var_F8], ecx
mov	[esp+1C0h+var_EC], eax
mov	[esp+1C0h+var_E4], eax
mov	[esp+1C0h+var_E0], eax
mov	word ptr [esp+1C0h+var_DC], dx
mov	word ptr [esp+1C0h+var_DC+2], dx
mov	edi, [ecx+10h]
cmp	edi, eax
jz	loc_74575C
movzx	edx, word ptr [esp+1C0h+var_158]
mov	ecx, 100h
mov	word ptr [esp+1C0h+var_E8+2], cx
push	edx
mov	ecx, edi
mov	word ptr [esp+1C4h+var_E8], ax
call	sub_7173A0
mov	ecx, [esp+1C0h+var_15C]
mov	ecx, [ecx+14h]
push	ecx
mov	ecx, eax
call	sub_717340
mov	esi, eax
test	esi, esi
jz	loc_7457F5
mov	edx, [ebp+arg_8]
mov	eax, [edx+48h]
mov	eax, [eax+0Ch]
mov	edx, [esi]
push	eax
mov	eax, [edx+0Ch]
mov	ecx, esi
call	eax
mov	[esp+1C0h+var_E4], eax
mov	ecx, [edi+18h]
mov	[esp+1C0h+var_E0], ecx
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax
mov	word ptr [esp+1C0h+var_DC], ax
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
mov	word ptr [esp+1C0h+var_DC+2], ax
jmp	loc_7457F5

loc_74575C:
mov	edi, [ebp+arg_8]
mov	eax, [edi+64h]
movzx	edx, word ptr [esp+1C0h+var_E8]
mov	ebx, [esp+1C0h+var_16C]
mov	ecx, [edi+48h]
mov	ecx, [ecx+0Ch]
mov	esi, [esp+1C0h+var_13C]
push	eax		; int
mov	eax, [esp+1C4h+var_164]
push	edx		; size_t
push	ebx		; int
push	eax		; int
lea	edx, [esp+1D0h+var_15C]
push	edx		; int
push	ecx		; int
lea	ecx, [esi+4Ch]
call	sub_7563D0
mov	[esp+1C0h+var_EC], eax
test	eax, eax
jz	short loc_7457C8
mov	ecx, [eax+0Ch]
movzx	ecx, word ptr [ecx+20h]
and	ecx, 0FFFF3FFFh
lea	edx, [ecx+ecx*4]
mov	ecx, [esi+edx*4+84h]
mov	[esp+1C0h+var_E4], ecx
mov	eax, [eax+0Ch]
mov	edx, 8000h
or	[eax+20h], dx
jmp	short loc_7457F5

loc_7457C8:
test	ebx, ebx
jz	short loc_7457EA
mov	edi, [edi+64h]
test	edi, edi
jz	short loc_7457EA
cmp	byte ptr [esi+25h], 0
jz	short loc_7457EA
push	offset aWarningIncre_0 ; "Warning: Increase raster glyph cache ca"...
add	edi, 0Ch
push	edi
call	sub_6AAFC0
add	esp, 8

loc_7457EA:
mov	eax, [ebp+arg_0]
mov	byte ptr [esi+25h], 0
mov	byte ptr [eax+4Dh], 1

loc_7457F5:
mov	ebx, [esp+1C0h+var_E4]
test	ebx, ebx
jz	loc_74593A
test	byte ptr [esp+1C0h+var_E0], 1
jz	short loc_745819
cmp	[esp+1C0h+var_170], 1
jnz	loc_74595C

loc_745819:
cmp	[esp+1C0h+var_170], 0
jnz	short loc_745830
mov	eax, [esp+1C0h+var_178]
or	word ptr [eax+6], 20h
mov	ebx, [esp+1C0h+var_E4]

loc_745830:
mov	edi, [ebp+arg_0]
mov	esi, [edi+14h]
add	edi, 10h
inc	esi
cmp	esi, [edi+4]
jnb	short loc_74584B
mov	ecx, [edi+8]
shr	ecx, 1
cmp	esi, ecx
jnb	short loc_745867
push	esi
jmp	short loc_745858

loc_74584B:
cmp	esi, [edi+8]
jb	short loc_745867
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx

loc_745858:
push	edi
mov	ecx, edi
call	sub_7418E0
mov	ebx, [esp+1C0h+var_E4]

loc_745867:
mov	eax, [edi]
mov	[edi+4], esi
shl	esi, 5
lea	edi, [esi+eax-20h]
test	edi, edi
jz	short loc_74588C
mov	ecx, 8
lea	esi, [esp+1C0h+var_F8]
rep movsd
mov	ebx, [esp+1C0h+var_E4]

loc_74588C:
mov	ecx, [ebp+arg_0]
mov	esi, [ecx]
mov	edi, [esp+1C0h+var_124]
mov	[esp+1C0h+var_150], ebx
mov	[esp+1C0h+var_14C], edi
test	esi, esi
jz	short loc_7458CF
mov	edx, ebx
shr	edx, 6
xor	edx, ebx
xor	edx, edi
and	edx, [esi+4]
lea	eax, [esp+1C0h+var_150]
push	edx
push	eax
call	sub_741B10
test	eax, eax
jl	short loc_7458CF
lea	ecx, [eax+eax*8]
lea	eax, [esi+ecx*4+10h]
test	eax, eax
jz	short loc_7458CF
add	eax, 8
jnz	short loc_745935

loc_7458CF:
mov	edx, [esp+1C0h+var_E0]
mov	[esp+1C0h+var_C4], edx
xor	eax, eax
mov	edx, ebx
shr	edx, 6
mov	[esp+1C0h+var_D4], eax
mov	[esp+1C0h+var_CC], eax
xor	edx, ebx
lea	eax, [esp+1C0h+var_150]
xor	edx, edi
mov	[esp+1C0h+var_108], eax
lea	ecx, [esp+1C0h+var_D4]
push	edx
lea	eax, [esp+1C4h+var_108]
mov	[esp+1C4h+var_104], ecx
mov	ecx, [ebp+arg_0]
push	eax
push	ecx
mov	[esp+1CCh+var_C8], ebx
mov	[esp+1CCh+var_D0], 1
call	sub_743DE0
jmp	short loc_74595C

loc_745935:
inc	dword ptr [eax+4]
jmp	short loc_74595C

loc_74593A:
cmp	[esp+1C0h+var_170], 1
jnz	short loc_74594E
mov	eax, [esp+1C0h+var_178]
mov	ecx, 7FFFh
and	[eax+6], cx

loc_74594E:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_10]
mov	byte ptr [edx+4Ch], 1
or	byte ptr [eax+60h], 10h

loc_74595C:
mov	ecx, [esp+1C0h+var_16C]
test	ecx, ecx
jz	short loc_745969
call	sub_70E500

loc_745969:
mov	eax, [esp+1C0h+var_B8]

loc_745970:
test	eax, eax
jz	loc_745090
cmp	eax, [esp+1C0h+var_B4]
jnb	loc_745090
mov	ecx, [esp+1C0h+var_60]
test	ecx, ecx
jnz	short loc_74599E
movzx	ecx, word ptr [eax+4]
shr	ecx, 0Ch
mov	[esp+1C0h+var_60], ecx

loc_74599E:
add	eax, 8
mov	edx, 0F000h
mov	[esp+1C0h+var_B8], eax
test	[eax+4], dx
jbe	loc_745077
test	ecx, ecx
jbe	loc_745077
lea	ecx, [esp+1C0h+var_AC]
call	sub_73ED30
test	al, al
jnz	loc_745077
mov	eax, [esp+1C0h+var_60]
push	eax
lea	ecx, [esp+1C4h+var_AC]
call	sub_73F2D0
mov	[esp+1C0h+var_60], 0
jmp	loc_745077

loc_7459F7:
mov	ecx, [esp+1C0h+var_68]
cmp	ecx, edi
jz	short loc_745A07
call	sub_64A400

loc_745A07:
mov	esi, [esp+1C0h+var_6C]
cmp	esi, edi
jz	short loc_745A7F
dec	dword ptr [esi]
cmp	[esi], edi
jnz	short loc_745A7F
mov	ecx, [esi+4]
cmp	ecx, edi
jz	short loc_745A25
push	esi
call	sub_6F4540

loc_745A25:
mov	ecx, [esi+1Ch]
cmp	ecx, edi
jz	short loc_745A31
call	sub_666B00

loc_745A31:
mov	[esi+1Ch], edi
mov	ecx, [esi+20h]
cmp	ecx, edi
jz	short loc_745A40
call	sub_666B00

loc_745A40:
mov	ecx, [esi+1Ch]
cmp	ecx, edi
jz	short loc_745A4C
call	sub_666B00

loc_745A4C:
mov	ebx, [esi+0Ch]
and	ebx, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [ebx+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_745A71
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax

loc_745A71:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_745A7F:
mov	esi, [esp+1C0h+var_114]
fldz
mov	ebx, [esp+1C0h+var_11C]
cmp	esi, [ebx+4]
jnb	loc_744F70
inc	esi
mov	[esp+1C0h+var_114], esi
jmp	loc_744F70

loc_745AA5:
fldz

loc_745AA7:
mov	eax, [esp+1C0h+var_170]
inc	eax
mov	[esp+1C0h+var_170], eax
cmp	eax, [esp+1C0h+var_FC]
jbe	loc_744EE9

loc_745ABD:
mov	esi, [ebp+arg_14]
mov	ecx, [esi+18h]
mov	edi, [ebp+arg_0]
mov	byte ptr [esp+1C0h+var_174+3], 0
mov	[edi+2Ch], ecx
test	ecx, ecx
jz	loc_745BAD
movzx	edx, byte ptr [esi+14h]
mov	[esp+1C0h+var_184], edx
mov	byte ptr [esp+1C0h+var_174+3], 1
fild	[esp+1C0h+var_184]
fmul	ds:dbl_15FD690
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
fcom	ds:dbl_15FCD78
fnstsw	ax
test	ah, 41h
jnz	short loc_745B0A
fstp	st
fld	ds:flt_15AB038

loc_745B0A:
fstp	[esp+1C0h+var_180]
fld	[esp+1C0h+var_180]
fmul	ds:dbl_15FCE60
fstp	dword ptr [edi+28h]
movsx	eax, word ptr [esi+1Ch]
movsx	ecx, word ptr [esi+1Eh]
mov	[esp+1C0h+var_184], eax
fild	[esp+1C0h+var_184]
mov	[esp+1C0h+var_184], ecx
fld	ds:dbl_15FD250
fmul	st(1), st
fxch	st(1)
fstp	[esp+1C0h+var_150]
fild	[esp+1C0h+var_184]
fmulp	st(1), st
fstp	[esp+1C0h+var_14C]
fld	[esp+1C0h+var_150]
fstp	dword ptr [edi+30h]
fld	[esp+1C0h+var_14C]
fstp	dword ptr [edi+34h]
fld	dword ptr [edi+34h]
fld	dword ptr [edi+30h]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+1C0h+var_184]
fld	ds:flt_15AACC4
fld	[esp+1C0h+var_184]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_745BAB
fstp	st(1)
call	__CIsqrt
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
fdivr	ds:dbl_15FCD70
fld	dword ptr [edi+30h]
fmul	st, st(1)
fstp	dword ptr [edi+30h]
fmul	dword ptr [edi+34h]
fstp	dword ptr [edi+34h]
fldz
jmp	short loc_745BAD

loc_745BAB:
fstp	st

loc_745BAD:
mov	edx, [esi+20h]
mov	[edi+38h], edx
test	edx, edx
jz	short loc_745BD4
fst	dword ptr [edi+3Ch]
movzx	eax, byte ptr [esi+24h]
mov	[esp+1C0h+var_184], eax
mov	byte ptr [esp+1C0h+var_174+3], 1
fild	[esp+1C0h+var_184]
fmul	ds:dbl_15FD690
fstp	dword ptr [edi+40h]

loc_745BD4:
mov	ecx, [edi]
test	ecx, ecx
jnz	short loc_745BE6
xor	ebx, ebx
xor	eax, eax
mov	[esp+1C0h+var_150], ebx
xor	esi, esi
jmp	short loc_745C09

loc_745BE6:
xor	eax, eax
add	ecx, 8

loc_745BEB:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_745BFB
mov	edx, [edi]
inc	eax
add	ecx, 24h
cmp	eax, [edx+4]
jbe	short loc_745BEB

loc_745BFB:
mov	ebx, edi
mov	[esp+1C0h+var_150], ebx
xor	esi, esi
jmp	short loc_745C09

loc_745C05:
mov	ebx, [esp+1C0h+var_150]

loc_745C09:
test	ebx, ebx
jz	short loc_745C4B
mov	edx, [ebx]
test	edx, edx
jz	short loc_745C4B
cmp	eax, [edx+4]
jg	short loc_745C4B
lea	ecx, [eax+eax*8]
add	ecx, ecx
add	ecx, ecx
mov	[ecx+edx+18h], esi
mov	edx, [ebx]
add	esi, [ecx+edx+1Ch]
mov	ecx, [edx+4]
cmp	eax, ecx
jg	short loc_745C09
inc	eax
cmp	eax, ecx
ja	short loc_745C09
lea	ebx, [eax+eax*8]
lea	edx, [edx+ebx*4+8]

loc_745C3C:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_745C05
inc	eax
add	edx, 24h
cmp	eax, ecx
jbe	short loc_745C3C
jmp	short loc_745C05

loc_745C4B:
cmp	dword ptr [edi+8], 0
lea	esi, [edi+4]
jbe	short loc_745C84
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_745C98
mov	eax, [esi]
test	eax, eax
jz	short loc_745C7B
mov	ecx, dword_1855FC0
fstp	st
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
fldz
mov	dword ptr [esi], 0

loc_745C7B:
mov	dword ptr [esi+8], 0
jmp	short loc_745C98

loc_745C84:
cmp	dword ptr [esi+8], 0
ja	short loc_745C98
push	0
fstp	st
push	esi
mov	ecx, esi
call	sub_7426D0
fldz

loc_745C98:
mov	dword ptr [esi+4], 0
mov	edi, [edi+14h]
mov	ebx, [esi+4]
cmp	edi, ebx
jnb	short loc_745CB5
mov	ecx, [esi+8]
shr	ecx, 1
cmp	edi, ecx
jnb	short loc_745CCE
push	edi
jmp	short loc_745CC2

loc_745CB5:
cmp	edi, [esi+8]
jb	short loc_745CCE
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx

loc_745CC2:
push	esi
fstp	st
mov	ecx, esi
call	sub_7426D0
fldz

loc_745CCE:
mov	[esi+4], edi
cmp	edi, ebx
jbe	short loc_745D09
sub	edi, ebx
mov	ecx, [esi]
lea	eax, [ebx+ebx*8]
lea	ecx, [ecx+eax*4]
jz	short loc_745D09
lea	eax, [ecx+18h]

loc_745CE4:
test	ecx, ecx
jz	short loc_745CFE
fst	dword ptr [ecx]
fst	dword ptr [eax-14h]
fst	dword ptr [eax-10h]
fst	dword ptr [eax-0Ch]
fst	dword ptr [eax-8]
fst	dword ptr [eax-4]
fst	dword ptr [eax]
fst	dword ptr [eax+4]

loc_745CFE:
add	ecx, 24h
add	eax, 24h
sub	edi, 1
jnz	short loc_745CE4

loc_745D09:
mov	eax, [esp+1C0h+var_100]
fstp	st
mov	[esp+1C0h+var_16C], 0
mov	[esp+1C0h+var_170], eax
cmp	eax, [esp+1C0h+var_FC]
ja	loc_746AC6
jmp	short loc_745D30
align 10h

loc_745D30:
mov	edx, [esp+1C0h+var_100]
fld	ds:dbl_15FCE20
mov	eax, [ebp+arg_14]
cmp	byte ptr [eax+1Bh], 0
mov	ecx, [esp+1C0h+var_170]
mov	[esp+1C0h+var_124], edx
mov	edx, [ebp+arg_10]
fld	dword ptr [edx+4]
fstp	[esp+1C0h+var_138]
fld	dword ptr [edx+8]
fstp	[esp+1C0h+var_134]
fld	dword ptr [edx+0Ch]
fstp	[esp+1C0h+var_130]
fld	dword ptr [edx+10h]
fstp	[esp+1C0h+var_12C]
jz	loc_745E33
test	ecx, ecx
jz	short loc_745D8B
cmp	byte ptr [esp+1C0h+var_174+3], 0
jz	short loc_745DD3

loc_745D8B:
fld	dword ptr [edx+54h]
fmul	st, st(1)
fld	[esp+1C0h+var_138]
fsub	st, st(1)
fstp	[esp+1C0h+var_138]
fld	dword ptr [edx+58h]
fmulp	st(2), st
fld	[esp+1C0h+var_134]
fsub	st, st(2)
fstp	[esp+1C0h+var_134]
fadd	[esp+1C0h+var_130]
fstp	[esp+1C0h+var_130]
fadd	[esp+1C0h+var_12C]
fstp	[esp+1C0h+var_12C]
jmp	short loc_745DD5

loc_745DD3:
fstp	st

loc_745DD5:
test	ecx, ecx
jnz	short loc_745E35
movsx	edx, word ptr [eax+1Ch]
mov	[esp+1C0h+var_184], edx
movsx	edx, word ptr [eax+1Eh]
fild	[esp+1C0h+var_184]
fld	[esp+1C0h+var_138]
mov	[esp+1C0h+var_184], edx
fadd	st, st(1)
fstp	[esp+1C0h+var_138]
fild	[esp+1C0h+var_184]
fld	[esp+1C0h+var_134]
fadd	st, st(1)
fstp	[esp+1C0h+var_134]
fld	[esp+1C0h+var_130]
faddp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_130]
fadd	[esp+1C0h+var_12C]
fstp	[esp+1C0h+var_12C]
jmp	short loc_745E3A

loc_745E33:
fstp	st

loc_745E35:
cmp	ecx, 1
jz	short loc_745E3D

loc_745E3A:
add	eax, 0Ch

loc_745E3D:
mov	[esp+1C0h+var_BC], eax
mov	eax, [esp+1C0h+var_13C]
cmp	dword ptr [eax+54h], 1
jbe	short loc_745E58
mov	[esp+1C0h+var_124], ecx

loc_745E58:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	ebx, [ebp+arg_0]
mov	[esp+1C0h+var_11C], ecx
mov	ecx, [eax+8]
mov	[esp+1C0h+var_118], edx
mov	edx, [eax+0Ch]
mov	eax, [eax+10h]
mov	[esp+1C0h+var_114], ecx
mov	[esp+1C0h+var_110], edx
mov	[esp+1C0h+var_10C], eax
mov	edi, ecx

loc_745E91:
mov	ecx, [esp+1C0h+var_11C]
test	ecx, ecx
jz	loc_746AB0
cmp	edi, [ecx+4]
jnb	loc_746AB0
test	edi, edi
jl	loc_746AB0
cmp	byte ptr [esp+1C0h+var_10C], 0
jnz	short loc_745ED4
fld	[esp+1C0h+var_110]
push	ecx		; float
fstp	[esp+1C4h+var_1C4]
push	edi		; int
call	sub_733F00
test	al, al
jz	loc_746AB0

loc_745ED4:
mov	ecx, [esp+1C0h+var_11C]
mov	edx, [ecx]
mov	esi, [edx+edi*4]
mov	eax, [esi]
shr	eax, 1Fh
test	al, 1
jz	short loc_745EF2
mov	ecx, [esi+0Ch]
mov	[esp+1C0h+var_180], ecx
jmp	short loc_745EF9

loc_745EF2:
mov	edx, [esi+0Ch]
mov	[esp+1C0h+var_180], edx

loc_745EF9:
fild	[esp+1C0h+var_180]
fstp	[esp+1C0h+var_144]
mov	eax, [esi]
shr	eax, 1Fh
test	al, 1
jz	short loc_745F13
mov	ecx, [esi+10h]
mov	[esp+1C0h+var_180], ecx
jmp	short loc_745F1A

loc_745F13:
mov	edx, [esi+10h]
mov	[esp+1C0h+var_180], edx

loc_745F1A:
fild	[esp+1C0h+var_180]
mov	eax, [ebp+arg_C]
fstp	[esp+1C0h+var_140]
fld	dword ptr [eax]
fadd	[esp+1C0h+var_144]
fstp	[esp+1C0h+var_144]
fld	dword ptr [eax+4]
mov	eax, [ebp+arg_10]
fadd	[esp+1C0h+var_140]
mov	ecx, [eax+14h]
fstp	[esp+1C0h+var_140]
fld	[esp+1C0h+var_144]
fild	dword ptr [eax+14h]
test	ecx, ecx
jge	short loc_745F5A
fadd	ds:flt_15FCC08

loc_745F5A:
fsubp	st(1), st
fstp	[esp+1C0h+var_144]
mov	edx, [esi]
shr	edx, 1Fh
test	dl, 1
jz	short loc_745F78
movzx	eax, word ptr [esi+1Ah]
mov	[esp+1C0h+var_184], eax
fild	[esp+1C0h+var_184]
jmp	short loc_745F84

loc_745F78:
movzx	ecx, word ptr [esi+26h]
mov	[esp+1C0h+var_184], ecx
fild	[esp+1C0h+var_184]

loc_745F84:
mov	edx, [esp+1C0h+var_BC]
fstp	[esp+1C0h+var_180]
test	byte ptr [edx+7], 1
fld	[esp+1C0h+var_140]
fadd	[esp+1C0h+var_180]
fstp	[esp+1C0h+var_140]
jz	loc_746054
lea	eax, [esp+1C0h+var_144]
push	eax
lea	ecx, [esp+1C4h+var_18]
push	ecx
lea	ecx, [esp+1C8h+var_58]
call	sub_64E9B0
fld	[esp+1C0h+var_18]
fadd	ds:dbl_15FCC48
sub	esp, 8
fstp	[esp+1C8h+var_184]
fld	[esp+1C8h+var_184]
fstp	qword ptr [esp]
call	_floor
fstp	[esp+1C8h+var_184]
fld	[esp+1C8h+var_184]
fstp	[esp+1C8h+var_144]
fld	[esp+1C8h+var_14]
fadd	ds:dbl_15FCC48
fstp	[esp+1C8h+var_184]
fld	[esp+1C8h+var_184]
fstp	qword ptr [esp]
call	_floor
add	esp, 8
fstp	[esp+1C0h+var_184]
fld	[esp+1C0h+var_184]
lea	edx, [esp+1C0h+var_144]
push	edx
fstp	[esp+1C4h+var_140]
lea	eax, [esp+1C4h+var_8]
push	eax
lea	ecx, [esp+1C8h+var_30]
call	sub_64E9B0
fld	[esp+1C0h+var_8]
fstp	[esp+1C0h+var_144]
fld	[esp+1C0h+var_4]
fstp	[esp+1C0h+var_140]

loc_746054:
mov	ecx, [esp+1C0h+var_118]
push	ecx
lea	edx, [esp+1C4h+var_B8]
push	edx
mov	ecx, esi
call	sub_7354D0
mov	esi, [esp+1C0h+var_16C]
mov	eax, [esp+1C0h+var_B8]
shl	esi, 5
lea	esp, [esp+0]

loc_746080:
test	eax, eax
jz	loc_7469FF
cmp	eax, [esp+1C0h+var_B4]
jnb	loc_7469FF
lea	ecx, [eax+6]
mov	[esp+1C0h+var_164], ecx
movzx	ecx, word ptr [ecx]
mov	dl, cl
shr	dl, 6
test	dl, 1
movzx	edx, word ptr [eax+2]
mov	[esp+1C0h+var_178], eax
jz	short loc_7460B3
neg	edx

loc_7460B3:
mov	[esp+1C0h+var_184], edx
movzx	edx, word ptr [eax]
mov	edi, 0FFFFh
cmp	dx, di
jnb	short loc_7460D0
movzx	edx, dx
mov	[esp+1C0h+var_188], edx
cmp	edx, 0FFFFFFFFh
jnz	short loc_7460D9

loc_7460D0:
mov	byte ptr [ebx+4Ch], 1
jmp	loc_746962

loc_7460D9:
mov	edx, ecx
shr	edx, 9
test	dl, 1
jnz	loc_746962
cmp	[esp+1C0h+var_170], 0
jnz	short loc_74615C
shr	cl, 5
test	cl, 1
jz	loc_746962

loc_7460FA:
mov	edi, [ebx+10h]
inc	[esp+1C0h+var_16C]
mov	eax, [edi+esi+14h]
mov	ecx, [esp+1C0h+var_124]
add	edi, esi
add	esi, 20h
mov	[esp+1C0h+var_120], esi
mov	esi, [ebx]
mov	[esp+1C0h+var_10], eax
mov	[esp+1C0h+var_C], ecx
test	esi, esi
jz	short loc_74616D
mov	edx, eax
shr	edx, 6
xor	edx, eax
xor	edx, ecx
and	edx, [esi+4]
lea	eax, [esp+1C0h+var_10]
push	edx
push	eax
mov	ecx, ebx
call	sub_741B10
test	eax, eax
jl	short loc_74616D
lea	ecx, [eax+eax*8]
lea	eax, [esi+ecx*4+10h]
test	eax, eax
jz	short loc_74616D
lea	ecx, [eax+8]
jmp	short loc_74616F

loc_74615C:
shr	ecx, 0Fh
test	cl, 1
jnz	short loc_7460FA
mov	byte ptr [ebx+4Ch], 1
jmp	loc_746962

loc_74616D:
xor	ecx, ecx

loc_74616F:
mov	eax, [ecx+8]
add	eax, [ecx]
mov	[esp+1C0h+var_128], ecx
lea	edx, [eax+eax*8]
lea	eax, [ebx+4]
mov	eax, [eax]
lea	esi, [eax+edx*4]
mov	eax, [edi+0Ch]
mov	byte ptr [esp+1C0h+var_160], 0
test	eax, eax
jz	loc_746463
mov	ecx, [esp+1C0h+var_13C]
cmp	byte ptr [ecx+24h], 0
jnz	short loc_7461AF
mov	eax, [eax+0Ch]
mov	edx, 7FFFh
and	[eax+20h], dx

loc_7461AF:
mov	eax, [edi+0Ch]
movzx	edx, word ptr [eax+18h]
inc	edx
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fmul	dword ptr [ecx+60h]
fstp	dword ptr [esi+10h]
movzx	edx, word ptr [eax+1Ah]
inc	edx
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fmul	dword ptr [ecx+64h]
fstp	dword ptr [esi+14h]
movzx	edx, word ptr [eax+1Ch]
sub	edx, 2
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fmul	dword ptr [ecx+60h]
fadd	dword ptr [esi+10h]
fstp	dword ptr [esi+18h]
movzx	edx, word ptr [eax+1Eh]
sub	edx, 2
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fmul	dword ptr [ecx+64h]
fadd	dword ptr [esi+14h]
fstp	dword ptr [esi+1Ch]
movzx	ecx, byte ptr [edi+7]
and	ecx, 4
or	ecx, 2
shr	ecx, 1
mov	edx, ecx
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
test	edx, edx
jge	short loc_746228
fadd	ds:flt_15FCC08

loc_746228:
movsx	ebx, word ptr [eax+20h]
fstp	[esp+1C0h+var_180]
movzx	edx, word ptr [eax+18h]
sub	edx, ebx
inc	edx
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fld	ds:dbl_15FCE20
fmul	st(1), st
fld	[esp+1C0h+var_180]
fld	st
fdivp	st(3), st
fxch	st(2)
fstp	dword ptr [esi]
movsx	edx, word ptr [eax+22h]
movzx	ebx, word ptr [eax+1Ah]
sub	ebx, edx
inc	ebx
mov	[esp+1C0h+var_188], ebx
fild	[esp+1C0h+var_188]
fmul	st, st(1)
fstp	dword ptr [esi+4]
movzx	edx, word ptr [eax+1Ch]
sub	edx, 2
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fmul	st, st(1)
fdivrp	st(2), st
fld	dword ptr [esi]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+8]
movzx	eax, word ptr [eax+1Eh]
sub	eax, 2
mov	[esp+1C0h+var_188], eax
fimul	[esp+1C0h+var_188]
fadd	dword ptr [esi+4]
fstp	dword ptr [esi+0Ch]
cmp	ecx, 1
jnz	short loc_7462B2
cmp	[esp+1C0h+var_145], 0
jnz	short loc_7462B2
cmp	byte ptr [edi+8], 0
mov	byte ptr [esp+1C0h+var_160], cl
jz	short loc_7462B7

loc_7462B2:
mov	byte ptr [esp+1C0h+var_160], 0

loc_7462B7:
test	byte ptr [edi+7], 1
jz	short loc_7462DB
movzx	ecx, word ptr [edi+12h]
mov	edx, [ebp+arg_10]
mov	[esp+1C0h+var_188], ecx
fild	[esp+1C0h+var_188]
fmul	dword ptr [edx+48h]
fmul	ds:dbl_15FD8A0
fld1
fdivrp	st(1), st
jmp	short loc_746346

loc_7462DB:
mov	eax, [esp+1C0h+var_178]
movzx	eax, word ptr [eax+4]
mov	ecx, [esp+1C0h+var_164]
and	eax, 0FFFh
test	byte ptr [ecx],	10h
jnz	short loc_746305
mov	[esp+1C0h+var_188], eax
fild	[esp+1C0h+var_188]
test	eax, eax
jge	short loc_74631D
fadd	ds:flt_15FCC08
jmp	short loc_74631D

loc_746305:
mov	[esp+1C0h+var_188], eax
fild	[esp+1C0h+var_188]
test	eax, eax
jge	short loc_746317
fadd	ds:flt_15FCC08

loc_746317:
fmul	ds:dbl_15FD690

loc_74631D:
movzx	edx, word ptr [edi+10h]
fstp	[esp+1C0h+var_180]
fld	[esp+1C0h+var_180]
mov	byte ptr [esp+1C0h+var_160], 0
fmul	ds:dbl_15FD398
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fdivp	st(1), st

loc_746346:
cmp	[esp+1C0h+var_170], 0
fstp	[esp+1C0h+var_17C]
fld	dword ptr [esi]
fld	[esp+1C0h+var_17C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fst	dword ptr [esi]
fld	dword ptr [esi+4]
fmul	st, st(2)
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fst	dword ptr [esi+4]
fld	dword ptr [esi+8]
fmul	st, st(3)
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fst	dword ptr [esi+8]
fld	dword ptr [esi+0Ch]
fmulp	st(4), st
fxch	st(3)
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fst	dword ptr [esi+0Ch]
jnz	short loc_7463E5
mov	eax, [ebp+arg_14]
movsx	ecx, word ptr [eax+1Ch]
mov	[esp+1C0h+var_188], ecx
fild	[esp+1C0h+var_188]
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [esi]
movsx	edx, word ptr [eax+1Eh]
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
faddp	st(1), st
fstp	dword ptr [esi+4]
movsx	ecx, word ptr [eax+1Ch]
mov	[esp+1C0h+var_188], ecx
fild	[esp+1C0h+var_188]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+8]
movsx	edx, word ptr [eax+1Eh]
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
faddp	st(1), st
fstp	dword ptr [esi+0Ch]
jmp	short loc_7463ED

loc_7463E5:
fstp	st
fstp	st(1)
fstp	st
fstp	st

loc_7463ED:
mov	eax, [esp+1C0h+var_178]
movzx	eax, word ptr [eax+4]
mov	ecx, [esp+1C0h+var_164]
and	eax, 0FFFh
test	byte ptr [ecx],	10h
jnz	short loc_746417
mov	[esp+1C0h+var_188], eax
fild	[esp+1C0h+var_188]
test	eax, eax
jge	short loc_74642F
fadd	ds:flt_15FCC08
jmp	short loc_74642F

loc_746417:
mov	[esp+1C0h+var_188], eax
fild	[esp+1C0h+var_188]
test	eax, eax
jge	short loc_746429
fadd	ds:flt_15FCC08

loc_746429:
fmul	ds:dbl_15FD690

loc_74642F:
fnstcw	word ptr [esp+1C0h+var_17C]
movzx	eax, word ptr [esp+1C0h+var_17C]
fstp	[esp+1C0h+var_180]
fld	[esp+1C0h+var_180]
or	eax, 0C00h
mov	[esp+1C0h+var_188], eax
fldcw	word ptr [esp+1C0h+var_188]
fistp	[esp+1C0h+var_188]
mov	dx, word ptr [esp+1C0h+var_188]
mov	[edi+10h], dx
fldcw	word ptr [esp+1C0h+var_17C]
jmp	loc_746762

loc_746463:
mov	eax, [edi]
mov	edx, [esp+1C0h+var_188]
mov	ecx, [eax+10h]
push	edx
mov	[esp+1C4h+var_168], ecx
call	sub_7173A0
mov	ecx, [esp+1C0h+var_164]
mov	ebx, eax
mov	eax, [esp+1C0h+var_178]
movzx	eax, word ptr [eax+4]
and	eax, 0FFFh
test	byte ptr [ecx],	10h
jnz	short loc_7464A2
mov	[esp+1C0h+var_188], eax
fild	[esp+1C0h+var_188]
test	eax, eax
jge	short loc_7464BA
fadd	ds:flt_15FCC08
jmp	short loc_7464BA

loc_7464A2:
mov	[esp+1C0h+var_188], eax
fild	[esp+1C0h+var_188]
test	eax, eax
jge	short loc_7464B4
fadd	ds:flt_15FCC08

loc_7464B4:
fmul	ds:dbl_15FD690

loc_7464BA:
mov	ecx, [esp+1C0h+var_168]
fstp	[esp+1C0h+var_180]
fld	[esp+1C0h+var_180]
fmul	ds:dbl_15FCE20
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fmul	ds:dbl_143B738
fstp	[esp+1C0h+var_17C]
call	sub_7142B0
movzx	edx, word ptr [edi+1Ch]
fmul	[esp+1C0h+var_17C]
mov	ecx, [esp+1C0h+var_168]
mov	[esp+1C0h+var_188], edx
fild	[esp+1C0h+var_188]
fmulp	st(1), st
fstp	[esp+1C0h+var_164]
call	sub_7142B0
fmul	[esp+1C0h+var_17C]
movzx	eax, word ptr [edi+1Eh]
mov	[esp+1C0h+var_188], eax
fild	[esp+1C0h+var_188]
fmulp	st(1), st
fstp	[esp+1C0h+var_17C]
fld	dword ptr [ebx+14h]
fstp	[esp+1C0h+var_188]
fld	dword ptr [ebx+18h]
fstp	[esp+1C0h+var_180]
fld	dword ptr [ebx+1Ch]
fstp	[esp+1C0h+var_178]
fld	dword ptr [ebx+10h]
fstp	dword ptr [esi]
fld	[esp+1C0h+var_188]
fstp	dword ptr [esi+4]
fld	[esp+1C0h+var_180]
fstp	dword ptr [esi+8]
fld	[esp+1C0h+var_178]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [ebx+14h]
fstp	[esp+1C0h+var_188]
fld	dword ptr [ebx+18h]
fstp	[esp+1C0h+var_180]
fld	dword ptr [ebx+1Ch]
fstp	[esp+1C0h+var_178]
fld	dword ptr [ebx+10h]
fstp	dword ptr [esi+10h]
fld	[esp+1C0h+var_188]
fstp	dword ptr [esi+14h]
fld	[esp+1C0h+var_180]
fstp	dword ptr [esi+18h]
fld	[esp+1C0h+var_178]
fstp	dword ptr [esi+1Ch]
fld	dword ptr [ebx+20h]
fchs
fstp	[esp+1C0h+var_108]
fld	dword ptr [ebx+24h]
fchs
fstp	[esp+1C0h+var_104]
fld	[esp+1C0h+var_108]
fld	st
fadd	dword ptr [esi]
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fld	[esp+1C0h+var_164]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fst	dword ptr [esi]
fld	[esp+1C0h+var_104]
fld	st
fadd	dword ptr [esi+4]
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fld	[esp+1C0h+var_17C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_164]
fld	[esp+1C0h+var_164]
fstp	dword ptr [esi+4]
cmp	byte ptr [esp+1C0h+var_174+3], 0
fld	dword ptr [esi+8]
faddp	st(5), st
fxch	st(4)
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fmul	st, st(3)
fstp	[esp+1C0h+var_17C]
fld	[esp+1C0h+var_17C]
fstp	dword ptr [esi+8]
fadd	dword ptr [esi+0Ch]
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fmul	st, st(3)
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fstp	dword ptr [esi+0Ch]
jz	loc_74675C
cmp	dword ptr [edi+18h], 0
jz	loc_74675C
mov	ecx, [esp+1C0h+var_168]
mov	edx, [ecx+1Ch]
sub	edx, 2
mov	[esp+1C0h+var_180], edx
fild	[esp+1C0h+var_180]
test	edx, edx
jge	short loc_746644
fadd	ds:flt_15FCC08

loc_746644:
fmul	ds:dbl_15FCED0
mov	ecx, [ebp+arg_0]
fstp	[esp+1C0h+var_180]
fld	dword ptr [ecx+28h]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fdiv	ds:dbl_15FCE60
fstp	[esp+1C0h+var_178]
fld	[esp+1C0h+var_180]
fld	[esp+1C0h+var_178]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_746681
fstp	st
fst	[esp+1C0h+var_180]
jmp	short loc_746685

loc_746681:
fstp	[esp+1C0h+var_180]

loc_746685:
fld	[esp+1C0h+var_180]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_180]
fld	[esp+1C0h+var_180]
fst	[esp+1C0h+var_180]
fld	dword ptr [ecx+30h]
fmul	st, st(3)
fstp	[esp+1C0h+var_178]
fld	[esp+1C0h+var_180]
fld	[esp+1C0h+var_178]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_7466BB
fld	[esp+1C0h+var_180]
jmp	short loc_7466BF

loc_7466BB:
fld	[esp+1C0h+var_178]

loc_7466BF:
fstp	[esp+1C0h+var_180]
fld	st(1)
fadd	[esp+1C0h+var_180]
fstp	[esp+1C0h+var_168]
fstp	[esp+1C0h+var_180]
fld	dword ptr [ecx+34h]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+1C0h+var_178]
fld	[esp+1C0h+var_180]
fld	[esp+1C0h+var_178]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7466F1
fstp	st
jmp	short loc_7466F3

loc_7466F1:
fstp	st(1)

loc_7466F3:
fstp	[esp+1C0h+var_180]
fld	st
fadd	[esp+1C0h+var_180]
fstp	[esp+1C0h+var_180]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	dword ptr [esi]
fld	[esp+1C0h+var_164]
fsub	st, st(1)
fstp	dword ptr [esi+4]
fld	[esp+1C0h+var_168]
fld	st
fadd	[esp+1C0h+var_17C]
fstp	dword ptr [esi+8]
fld	[esp+1C0h+var_180]
fld	st
fadd	[esp+1C0h+var_188]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi+10h]
fld	st(3)
fdiv	st, st(5)
fsubp	st(1), st
fstp	dword ptr [esi+10h]
fld	dword ptr [esi+14h]
fld	st(5)
fdivp	st(4), st
fsubrp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+14h]
fdivrp	st(2), st
fld	dword ptr [esi+18h]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+18h]
fdivrp	st(1), st
fadd	dword ptr [esi+1Ch]
fstp	dword ptr [esi+1Ch]
jmp	short loc_746762

loc_74675C:
fstp	st(1)
fstp	st(1)
fstp	st

loc_746762:
cmp	byte ptr [esp+1C0h+var_160], 0
fld	[esp+1C0h+var_144]
fstp	[esp+1C0h+var_150]
fld	[esp+1C0h+var_140]
fstp	[esp+1C0h+var_14C]
jz	short loc_7467F5
lea	eax, [esp+1C0h+var_150]
push	eax
lea	ecx, [esp+1C4h+var_15C]
push	ecx
lea	ecx, [esp+1C8h+var_58]
call	sub_64E9B0
fld	[esp+1C0h+var_158]
fstp	[esp+1C0h+var_14C]
sub	esp, 8
fld	[esp+1C8h+var_15C]
fadd	ds:dbl_15FCC48
fstp	[esp+1C8h+var_188]
fld	[esp+1C8h+var_188]
fstp	qword ptr [esp]
call	_floor
add	esp, 8
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
lea	edx, [esp+1C0h+var_150]
push	edx
fstp	[esp+1C4h+var_150]
lea	eax, [esp+1C4h+var_40]
push	eax
lea	ecx, [esp+1C8h+var_30]
call	sub_64E9B0
fld	dword ptr [esp+1C0h+var_40]
fstp	[esp+1C0h+var_150]
fld	dword ptr [esp+1C0h+var_40+4]
fstp	[esp+1C0h+var_14C]

loc_7467F5:
fld	[esp+1C0h+var_150]
mov	ecx, [esp+1C0h+var_170]
fst	[esp+1C0h+var_188]
fld	[esp+1C0h+var_14C]
fstp	[esp+1C0h+var_180]
fadd	dword ptr [esi]
fstp	dword ptr [esi]
fld	dword ptr [esi+8]
fadd	[esp+1C0h+var_188]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+4]
fld	[esp+1C0h+var_180]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+4]
fadd	dword ptr [esi+0Ch]
fstp	dword ptr [esi+0Ch]
cmp	ecx, 1
jnz	short loc_746849
mov	edx, [esp+1C0h+var_78]
mov	[esp+1C0h+var_34], edx
lea	eax, [esp+1C0h+var_34]
jmp	short loc_74684F

loc_746849:
mov	eax, [ebp+arg_14]
add	eax, 18h

loc_74684F:
mov	eax, [eax]
mov	[esi+20h], eax
cmp	ecx, 1
jnz	short loc_746879
mov	ecx, [ebp+arg_10]
test	byte ptr [ecx+60h], 20h
jnz	loc_746947
lea	edx, [esp+1C0h+var_138]
mov	ecx, esi
call	sub_7433C0
jmp	loc_746947

loc_746879:
fld	dword ptr [esi]
mov	edx, eax
fstp	[esp+1C0h+var_F8]
mov	[esp+1C0h+var_D8], edx
fld	dword ptr [esi+4]
mov	edx, [ebp+arg_10]
fstp	[esp+1C0h+var_F4]
add	edx, 4
fld	dword ptr [esi+8]
lea	ecx, [esp+1C0h+var_F8]
fstp	[esp+1C0h+var_F0]
fld	dword ptr [esi+0Ch]
fstp	[esp+1C0h+var_EC]
fld	dword ptr [esi+10h]
fstp	[esp+1C0h+var_E8]
fld	dword ptr [esi+14h]
fstp	[esp+1C0h+var_E4]
fld	dword ptr [esi+18h]
fstp	[esp+1C0h+var_E0]
fld	dword ptr [esi+1Ch]
fstp	[esp+1C0h+var_DC]
call	sub_7433C0
fld	[esp+1C0h+var_F0]
fsub	[esp+1C0h+var_F8]
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fadd	st, st
fld	dword ptr [esi+8]
fsub	dword ptr [esi]
fstp	[esp+1C0h+var_188]
fld	[esp+1C0h+var_188]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_746921
lea	edx, [esp+1C0h+var_138]
mov	ecx, esi
call	sub_7433C0
jmp	short loc_746947

loc_746921:
fld	dword ptr [edx+4]
fstp	[esp+1C0h+var_188]
fld	dword ptr [edx]
fstp	dword ptr [esi]
fld	[esp+1C0h+var_188]
fst	dword ptr [esi+4]
fld	dword ptr [esi]
fstp	dword ptr [esi+8]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi+10h]
fstp	dword ptr [esi+18h]
fld	dword ptr [esi+14h]
fstp	dword ptr [esi+1Ch]

loc_746947:
mov	eax, [esp+1C0h+var_128]
inc	dword ptr [eax+8]
mov	eax, [esp+1C0h+var_B8]
mov	esi, [esp+1C0h+var_120]
mov	ebx, [ebp+arg_0]

loc_746962:
test	eax, eax
jz	loc_7469E7
cmp	eax, [esp+1C0h+var_B4]
jnb	short loc_7469E7
mov	ecx, [esp+1C0h+var_60]
test	ecx, ecx
jnz	short loc_74698C
movzx	ecx, word ptr [eax+4]
shr	ecx, 0Ch
mov	[esp+1C0h+var_60], ecx

loc_74698C:
add	eax, 8
mov	edx, 0F000h
mov	[esp+1C0h+var_B8], eax
test	[eax+4], dx
jbe	short loc_7469D4
test	ecx, ecx
jbe	short loc_7469D4
lea	ecx, [esp+1C0h+var_AC]
call	sub_73ED30
test	al, al
jnz	short loc_7469D4
mov	eax, [esp+1C0h+var_60]
push	eax
lea	ecx, [esp+1C4h+var_AC]
call	sub_73F2D0
mov	[esp+1C0h+var_60], 0

loc_7469D4:
lea	ecx, [esp+1C0h+var_B8]
call	sub_735210
mov	eax, [esp+1C0h+var_B8]

loc_7469E7:
fild	[esp+1C0h+var_184]
mov	edi, [esp+1C0h+var_114]
fadd	[esp+1C0h+var_144]
fstp	[esp+1C0h+var_144]
jmp	loc_746080

loc_7469FF:
mov	ecx, [esp+1C0h+var_68]
test	ecx, ecx
jz	short loc_746A0F
call	sub_64A400

loc_746A0F:
mov	esi, [esp+1C0h+var_6C]
test	esi, esi
jz	short loc_746A93
dec	dword ptr [esi]
cmp	dword ptr [esi], 0
jnz	short loc_746A93
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_746A2E
push	esi
call	sub_6F4540

loc_746A2E:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_746A3A
call	sub_666B00

loc_746A3A:
mov	dword ptr [esi+1Ch], 0
mov	ecx, [esi+20h]
test	ecx, ecx
jz	short loc_746A4D
call	sub_666B00

loc_746A4D:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_746A59
call	sub_666B00

loc_746A59:
mov	edi, [esi+0Ch]
and	edi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_746A7E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_746A7E:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
mov	edi, [esp+1C0h+var_114]

loc_746A93:
mov	ecx, [esp+1C0h+var_11C]
cmp	edi, [ecx+4]
jnb	loc_745E91
inc	edi
mov	[esp+1C0h+var_114], edi
jmp	loc_745E91

loc_746AB0:
mov	eax, [esp+1C0h+var_170]
inc	eax
mov	[esp+1C0h+var_170], eax
cmp	eax, [esp+1C0h+var_FC]
jbe	loc_745D30

loc_746AC6:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	1Ch
sub_744C60 endp

align 10h



; int __stdcall	sub_746AD0(int,	int, int, char,	char, float, float, int, int)
sub_746AD0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	esi
push	edi
mov	esi, ecx
lea	edi, [esi+9F8h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
fld	[esp+8+arg_18]
mov	eax, [esp+8+arg_20]
mov	ecx, [esp+8+arg_1C]
mov	edx, dword ptr [esp+8+arg_10]
push	eax		; int
mov	eax, dword ptr [esp+0Ch+arg_C]
push	ecx		; int
mov	ecx, [esp+10h+arg_8]
sub	esp, 8
fstp	[esp+18h+var_14]
fld	[esp+18h+arg_14]
fstp	[esp+18h+var_18]
push	edx		; char
mov	edx, [esp+1Ch+arg_4]
push	eax		; char
mov	eax, [esp+20h+arg_0]
push	ecx		; int
push	edx		; int
push	eax		; int
mov	ecx, esi
call	sub_744820
push	edi		; lpCriticalSection
mov	esi, eax
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn	24h
sub_746AD0 endp

align 10h



sub_746B30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+48h]
mov	dword ptr [esi], offset	off_1440C64
test	edi, edi
jz	short loc_746B56
mov	ecx, edi
call	sub_744700
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_746B56:
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+8+arg_0], 1
jz	short loc_746B78
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_746B78:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_746B30 endp

align 10h



; int __stdcall	sub_746B80(int,	int, int, int, int, float, int,	int)
sub_746B80 proc	near

lpCriticalSection= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	eax, [edi+9F8h]
push	eax		; lpCriticalSection
mov	[esp+18h+lpCriticalSection], eax
call	ds:EnterCriticalSection
mov	ebp, [esp+14h+arg_0]
xor	ebx, ebx
cmp	ebp, ebx
jnz	short loc_746BA4
mov	ebp, [edi]

loc_746BA4:
mov	eax, [esp+14h+arg_C]
mov	ecx, [eax+48h]
mov	edx, [ecx+0Ch]
push	edx
mov	ecx, edi
call	sub_744270
mov	esi, [esp+14h+arg_4]
cmp	esi, ebx
jz	short loc_746C13
mov	ecx, [esi+8]
cmp	[esi+0Ch], edi
jnz	short loc_746C08
cmp	ecx, ebx
jz	short loc_746BDE
cmp	[esp+14h+arg_1C], ebx
jz	loc_746C8A
call	sub_744410
jmp	loc_746C8A

loc_746BDE:
mov	eax, [ebp+0]
mov	edx, [eax+28h]
push	ebx
push	50h
mov	ecx, ebp
call	edx
cmp	eax, ebx
jz	short loc_746BFE
mov	ecx, eax
call	sub_742E20
mov	[esi+8], eax
jmp	loc_746C8A

loc_746BFE:
xor	eax, eax
mov	[esi+8], eax
jmp	loc_746C8A

loc_746C08:
cmp	ecx, ebx
jz	short loc_746C13
push	1
call	sub_743120

loc_746C13:
lea	ecx, [edi+30h]
call	sub_7422C0
mov	esi, eax
mov	[esi+0Ch], edi
mov	eax, [ebp+0]
mov	edx, [eax+28h]
push	ebx
push	50h
mov	ecx, ebp
call	edx
cmp	eax, ebx
jz	short loc_746C73
fld	ds:flt_1573A78
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	[eax+18h], ebx
fstp	dword ptr [eax+24h]
fld	ds:flt_15FCF38
mov	[eax+1Ch], ebx
fstp	dword ptr [eax+28h]
mov	[eax+20h], ebx
fld1
mov	[eax+2Ch], ebx
fst	dword ptr [eax+30h]
fstp	dword ptr [eax+34h]
mov	[eax+38h], ebx
mov	[eax+4Ch], bl
mov	[eax+4Dh], bl
jmp	short loc_746C75

loc_746C73:
xor	eax, eax

loc_746C75:
mov	[esi+8], eax
mov	ecx, [edi+44h]
lea	eax, [edi+44h]
mov	[esi], ecx
mov	[esi+4], eax
mov	edx, [eax]
mov	[edx+4], esi
mov	[eax], esi

loc_746C8A:
mov	eax, [esp+14h+arg_1C]
mov	ecx, [esp+14h+arg_18]
mov	edx, [esp+14h+arg_14]
mov	ebx, [esp+14h+arg_C]
push	eax		; int
mov	eax, [esp+18h+arg_10]
push	ecx		; int
mov	ecx, [esp+1Ch+arg_8]
push	edx		; float
mov	edx, [esi+8]
push	eax		; int
push	ebx		; int
push	ecx		; int
push	edx		; int
mov	ecx, edi
call	sub_744C60
mov	eax, [ebx+48h]
mov	ecx, [eax+0Ch]
push	ecx
lea	ecx, [edi+4Ch]
call	sub_753C70
mov	edx, [esp+14h+lpCriticalSection]
push	edx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	20h
sub_746B80 endp

align 10h



sub_746CE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx], eax
mov	eax, [esp+arg_8]
mov	[ecx+4], edx
mov	edx, [esp+arg_C]
mov	[ecx+8], eax
mov	[ecx+0Ch], edx
retn	10h
sub_746CE0 endp

align 10h



sub_746D00 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
fld	dword ptr [ecx]
fabs
fstp	[esp+arg_0]
fld	[esp+arg_0]
fld	ds:dbl_15FCC18
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld	ds:flt_143764C
fld	ds:flt_1437648
test	ah, 5
jp	short loc_746D4E
fld	dword ptr [ecx]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_746D40
fxch	st(1)
fst	[esp+arg_0]
jmp	short loc_746D46

loc_746D40:
fst	[esp+arg_0]
fxch	st(1)

loc_746D46:
fld	[esp+arg_0]
fstp	dword ptr [ecx]
fxch	st(1)

loc_746D4E:
fld	dword ptr [ecx+4]
fabs
fstp	[esp+arg_0]
fld	[esp+arg_0]
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	short loc_746D92
fld	dword ptr [ecx+4]
fcomp	st(3)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnz	short loc_746D82
fstp	st(1)
fstp	[esp+arg_0]
fld	[esp+arg_0]
fstp	dword ptr [ecx+4]
retn	0Ch

loc_746D82:
fstp	st
fstp	[esp+arg_0]
fld	[esp+arg_0]
fstp	dword ptr [ecx+4]
retn	0Ch

loc_746D92:
fstp	st(2)
fstp	st
fstp	st
retn	0Ch
sub_746D00 endp

align 10h



sub_746DA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

movzx	eax, byte ptr [ecx+5Ch]
cmp	[esp+arg_0], eax
jnz	loc_746E6C
movzx	edx, byte ptr [ecx+5Dh]
mov	eax, [esp+arg_8]
cmp	eax, edx
jnz	loc_746E6C
push	esi
push	edi
mov	esi, eax
cmp	eax, 6
ja	short loc_746DE9
mov	edx, [esp+8+arg_4]
add	ecx, 5Eh
cmp	eax, 4
jb	short loc_746E09

loc_746DD3:
mov	eax, [edx]
cmp	eax, [ecx]
jnz	short loc_746E0D
sub	esi, 4
add	ecx, 4
add	edx, 4
cmp	esi, 4
jnb	short loc_746DD3
jmp	short loc_746E09

loc_746DE9:
mov	edx, [ecx+60h]
mov	ecx, [esp+8+arg_4]
cmp	eax, 4
jb	short loc_746E09

loc_746DF5:
mov	eax, [edx]
cmp	eax, [ecx]
jnz	short loc_746E0D
sub	esi, 4
add	ecx, 4
add	edx, 4
cmp	esi, 4
jnb	short loc_746DF5

loc_746E09:
test	esi, esi
jz	short loc_746E5C

loc_746E0D:
movzx	edi, byte ptr [ecx]
movzx	eax, byte ptr [edx]
sub	eax, edi
jnz	short loc_746E48
cmp	esi, 1
jbe	short loc_746E5C
movzx	eax, byte ptr [edx+1]
movzx	edi, byte ptr [ecx+1]
sub	eax, edi
jnz	short loc_746E48
cmp	esi, 2
jbe	short loc_746E5C
movzx	eax, byte ptr [edx+2]
movzx	edi, byte ptr [ecx+2]
sub	eax, edi
jnz	short loc_746E48
cmp	esi, 3
jbe	short loc_746E5C
movzx	eax, byte ptr [edx+3]
movzx	ecx, byte ptr [ecx+3]
sub	eax, ecx

loc_746E48:
sar	eax, 1Fh
or	eax, 1
xor	edx, edx
test	eax, eax
setz	dl
pop	edi
mov	al, dl
pop	esi
retn	0Ch

loc_746E5C:
xor	eax, eax
xor	edx, edx
test	eax, eax
setz	dl
pop	edi
mov	al, dl
pop	esi
retn	0Ch

loc_746E6C:
xor	al, al
retn	0Ch
sub_746DA0 endp

align 10h



sub_746E80 proc	near
mov	eax, [ecx+70h]
retn
sub_746E80 endp

align 10h



; int __stdcall	sub_746E90(int,	int, int, int, int, float, float, char)
sub_746E90 proc	near

var_9C=	dword ptr -9Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_6C=	dword ptr -6Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h

sub	esp, 84h
mov	edx, [esp+84h+arg_0]
mov	eax, [edx+48h]
push	ebp
push	esi
push	edi
mov	edi, [eax+0Ch]
mov	esi, ecx
xor	ebp, ebp
mov	[esp+90h+var_78], edi
cmp	[esi+18h], ebp
jbe	loc_74700D
cmp	[esp+90h+arg_1C], 0
push	ebx
jz	loc_746F7F
push	offset sub_6F9710
push	3
push	24h
lea	ecx, [esp+0A0h+var_6C]
push	ecx
call	sub_4078B0
mov	[esp+94h+var_84], ebp
mov	[esp+94h+var_80], ebp
mov	[esp+94h+var_7C], ebp
cmp	[esp+94h+arg_8], ebp
jz	short loc_746F5E
cmp	[esi], ebp
jbe	short loc_746F5E
lea	edi, [esp+94h+var_6C]
lea	ebx, [esi+4]
lea	esp, [esp+0]

loc_746F00:
mov	ecx, [esp+94h+arg_18]
test	ecx, ecx
jz	short loc_746F15
mov	eax, [ebx]
lea	edx, [eax+eax*2]
lea	ecx, [ecx+edx*8]
jmp	short loc_746F17

loc_746F15:
xor	ecx, ecx

loc_746F17:
mov	eax, [ebx]
cmp	eax, 0FFFFFFFFh
jz	short loc_746F4D
fld	[esp+94h+arg_14]
push	ecx		; int
push	ecx		; float
mov	ecx, [esp+9Ch+arg_0]
fstp	[esp+9Ch+var_9C]
lea	edx, [eax+eax*4]
mov	eax, [esp+9Ch+arg_4]
push	ecx		; int
push	edi		; int
lea	ecx, [eax+edx*8]
call	sub_6FC220
test	al, al
jz	short loc_746F4D
mov	[esp+ebp*4+94h+var_84],	edi

loc_746F4D:
inc	ebp
add	edi, 24h
add	ebx, 4
cmp	ebp, [esi]
jb	short loc_746F00
mov	edi, [esp+94h+var_78]
xor	ebp, ebp

loc_746F5E:
mov	eax, [esp+94h+var_7C]
mov	ecx, [esp+94h+var_80]
mov	edx, [edi]
mov	edx, [edx+94h]
push	eax
mov	eax, [esp+98h+var_84]
push	ecx
mov	ecx, [esi+10h]
push	eax
push	ecx
mov	ecx, edi
call	edx
jmp	short loc_746FC2

loc_746F7F:
cmp	[esp+94h+arg_8], ebp
jz	short loc_746FC2
mov	ecx, [esp+94h+arg_18]
cmp	ecx, ebp
jz	short loc_746F9E
mov	eax, [esi+4]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
jmp	short loc_746FA0

loc_746F9E:
xor	eax, eax

loc_746FA0:
fld	[esp+94h+arg_14]
push	eax		; int
mov	eax, [esi+4]
push	ecx		; float
fstp	[esp+9Ch+var_9C]
push	edx		; int
mov	edx, [esp+0A0h+arg_4]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*8]
call	sub_6FC270

loc_746FC2:
mov	ecx, [esi+18h]
mov	edx, [edi]
mov	edx, [edx+70h]
lea	eax, [esi+20h]
mov	[esp+94h+var_74], eax
lea	eax, [esp+94h+var_74]
push	eax
mov	eax, [esi+14h]
push	1
push	ecx
push	eax
mov	ecx, edi
mov	[esp+0A4h+var_70], 0
call	edx
mov	ecx, [esp+94h+arg_C]
mov	ebx, [edi]
mov	eax, 0AAAAAAABh
mul	dword ptr [esi+18h]
mov	eax, [esp+94h+arg_10]
shr	edx, 1
push	edx
mov	edx, [ebx+78h]
push	ebp
push	eax
push	ebp
push	ecx
mov	ecx, edi
call	edx
pop	ebx

loc_74700D:
pop	edi
pop	esi
pop	ebp
add	esp, 84h
retn	20h
sub_746E90 endp

align 10h



; int __stdcall	sub_747020(int,	float)
sub_747020 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	edx, [esp+8+arg_0]
fld	dword ptr [edx+0Ch]
fstp	[esp+8+arg_0]
fldz
fld	[esp+8+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	short loc_74703F
fchs

loc_74703F:
fstp	[esp+8+arg_0]
fld	dword ptr [edx+4]
fstp	[esp+8+var_4]
fld	[esp+8+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	short loc_747059
fchs

loc_747059:
fstp	[esp+8+var_8]
fld	[esp+8+arg_0]
fld	[esp+8+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_747070
fstp	st(1)
jmp	short loc_747072

loc_747070:
fstp	st

loc_747072:
fstp	[esp+8+var_4]
fld	dword ptr [edx+8]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 1
jz	short loc_74708C
fchs

loc_74708C:
fstp	[esp+8+arg_0]
fld	dword ptr [edx]
fstp	[esp+8+var_8]
fld	[esp+8+var_8]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_7470A5
fchs

loc_7470A5:
fstp	[esp+8+var_8]
fld	[esp+8+arg_0]
fld	[esp+8+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7470BC
fstp	st(1)
jmp	short loc_7470BE

loc_7470BC:
fstp	st

loc_7470BE:
fstp	[esp+8+arg_0]
fld	[esp+8+var_4]
fld	[esp+8+arg_0]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7470D7
fstp	st(1)
jmp	short loc_7470D9

loc_7470D7:
fstp	st

loc_7470D9:
fstp	[esp+8+arg_0]
fld	ds:flt_15FCC84
fld	[esp+8+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_747109
fstp	st
fld1
fstp	dword ptr [ecx+0Ch]
fld	dword ptr [ecx+0Ch]
fld1
fdivrp	st(1), st
fstp	dword ptr [ecx+10h]
add	esp, 8
retn	8

loc_747109:
fld	[esp+8+arg_4]
fadd	st, st
fadd	ds:dbl_15FD6F0
fadd	ds:dbl_15FCE20
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fcom	ds:dbl_15FD8D0
fnstsw	ax
test	ah, 5
jp	short loc_747138
fstp	st
fld	ds:dword_15FD3C8

loc_747138:
fstp	[esp+8+arg_0]
fadd	[esp+8+arg_0]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fdivr	ds:dbl_1440CC0
fstp	dword ptr [ecx+0Ch]
fld	dword ptr [ecx+0Ch]
fld1
fdivrp	st(1), st
fstp	dword ptr [ecx+10h]
add	esp, 8
retn	8
sub_747020 endp

align 10h



sub_747170 proc	near

arg_0= byte ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	al, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_8]
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_C]
mov	[esi+5Ch], al
mov	al, [esi+5Dh]
movzx	edx, al
mov	[esi+64h], ecx
cmp	ebx, edx
jz	short loc_7471C1
cmp	al, 6
jbe	short loc_7471A5
mov	eax, [esi+60h]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_7471A5:
cmp	ebx, 6
jbe	short loc_7471BE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+38h]
push	0
push	ebx
push	esi
call	eax
mov	[esi+60h], eax

loc_7471BE:
mov	[esi+5Dh], bl

loc_7471C1:
push	ebx
cmp	ebx, 6
ja	short loc_7471DD
mov	ecx, [esp+0Ch+arg_4]
push	ecx
add	esi, 5Eh
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	esi
pop	ebx
retn	10h

loc_7471DD:
mov	edx, [esp+0Ch+arg_4]
mov	esi, [esi+60h]
push	edx
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	esi
pop	ebx
retn	10h
sub_747170 endp

align 10h



sub_747200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_747230
mov	eax, [edi]
test	eax, eax
jz	short loc_747225
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_747225:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_747230:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_74725F
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_74725F:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_747200 endp

align 10h



sub_747290 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_7472C0
mov	eax, [edi]
test	eax, eax
jz	short loc_7472B5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7472B5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_7472C0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_7472F3
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_7472F3:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*4]
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_747290 endp

align 10h



sub_747320 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_747350
mov	eax, [edi]
test	eax, eax
jz	short loc_747345
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_747345:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_747350:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_74737A
mov	edx, [ecx]
push	esi
push	eax
mov	eax, [edx+2Ch]
call	eax
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_74737A:
lea	eax, [esp+8+arg_4]
mov	[esp+8+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
push	esi
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_747320 endp

align 10h



sub_7473A0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
fld	dword ptr [edi]
push	offset sub_741D30
push	9
mov	esi, ecx
push	24h
fstp	dword ptr [esi]
lea	eax, [edi+4]
push	eax
lea	ecx, [esi+4]
push	ecx
call	sub_490A20
mov	edx, [edi+148h]
mov	[esi+148h], edx
mov	eax, [edi+14Ch]
mov	[esi+14Ch], eax
mov	ecx, [edi+150h]
pop	edi
mov	[esi+150h], ecx
mov	eax, esi
pop	esi
retn	4
sub_7473A0 endp

align 10h



sub_7473F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_747420
mov	eax, [edi]
test	eax, eax
jz	short loc_747415
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_747415:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_747420:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_747455
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*2]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_747455:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_7473F0 endp

align 10h



sub_747490 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_7474A9
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_7474BE
push	esi
jmp	short loc_7474B8

loc_7474A9:
cmp	esi, [edi+8]
jb	short loc_7474BE
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_7474B8:
push	edi
call	sub_747290

loc_7474BE:
mov	eax, [edi]
lea	edx, [esi+esi*4]
mov	[edi+4], esi
lea	eax, [eax+edx*4-14h]
pop	edi
pop	esi
test	eax, eax
jz	short locret_7474F0
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	ecx, [ecx+10h]
mov	[eax+10h], ecx

locret_7474F0:
retn	4
sub_747490 endp

align 10h



sub_747500 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_747530
mov	eax, [edi]
test	eax, eax
jz	short loc_747525
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_747525:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_747530:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_747564
mov	edx, [ecx]
push	ebx
mov	ebx, esi
imul	ebx, 154h
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_747564:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
imul	eax, 154h
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_747500 endp




sub_747590 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
or	edx, 0FFFFFFFFh
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax+0Ch], edx
mov	[eax+10h], ecx
retn
sub_747590 endp

align 10h



sub_7475C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
inc	eax
push	eax
push	esi
call	sub_70EB90
mov	eax, [esi+4]
mov	edx, [esi]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*8-28h]
pop	esi
test	ecx, ecx
jz	short locret_7475E4
jmp	sub_6FAB80

locret_7475E4:
retn	4
sub_7475C0 endp

align 10h



sub_7475F0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+4]
cmp	esi, ebx
jnb	short loc_74760C
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_747621
push	esi
jmp	short loc_74761B

loc_74760C:
cmp	esi, [edi+8]
jb	short loc_747621
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
mov	ecx, edi

loc_74761B:
push	edi
call	sub_7473F0

loc_747621:
mov	[edi+4], esi
cmp	esi, ebx
jbe	short loc_747647
sub	esi, ebx
mov	eax, [edi]
lea	edx, [ebx+ebx*2]
lea	edi, [eax+edx*8]
jz	short loc_747647

loc_747634:
test	edi, edi
jz	short loc_74763F
mov	ecx, edi
call	sub_64E8E0

loc_74763F:
add	edi, 18h
sub	esi, 1
jnz	short loc_747634

loc_747647:
pop	edi
pop	esi
pop	ebx
retn	4
sub_7475F0 endp

align 10h



sub_747650 proc	near

arg_0= word ptr	 4
arg_4= word ptr	 8
arg_8= word ptr	 0Ch

push	esi
lea	esi, [ecx+14h]
push	edi
mov	edi, [esi+4]
inc	edi
cmp	edi, [esi+4]
jnb	short loc_74766A
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_74767F
push	edi
jmp	short loc_747677

loc_74766A:
cmp	edi, [esi+8]
jb	short loc_74767F
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_747677:
push	esi
mov	ecx, esi
call	sub_747200

loc_74767F:
mov	edx, [esi]
lea	eax, [edx+edi*2-2]
mov	[esi+4], edi
test	eax, eax
jz	short loc_747694
mov	cx, [esp+8+arg_0]
mov	[eax], cx

loc_747694:
mov	edi, [esi+4]
inc	edi
cmp	edi, [esi+4]
jnb	short loc_7476A9
mov	edx, [esi+8]
shr	edx, 1
cmp	edi, edx
jnb	short loc_7476BE
push	edi
jmp	short loc_7476B6

loc_7476A9:
cmp	edi, [esi+8]
jb	short loc_7476BE
mov	eax, edi
shr	eax, 2
add	eax, edi
push	eax

loc_7476B6:
push	esi
mov	ecx, esi
call	sub_747200

loc_7476BE:
mov	ecx, [esi]
lea	eax, [ecx+edi*2-2]
mov	[esi+4], edi
test	eax, eax
jz	short loc_7476D3
mov	dx, [esp+8+arg_4]
mov	[eax], dx

loc_7476D3:
mov	edi, [esi+4]
inc	edi
cmp	edi, [esi+4]
jnb	short loc_7476E8
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_7476FD
push	edi
jmp	short loc_7476F5

loc_7476E8:
cmp	edi, [esi+8]
jb	short loc_7476FD
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_7476F5:
push	esi
mov	ecx, esi
call	sub_747200

loc_7476FD:
mov	edx, [esi]
mov	[esi+4], edi
lea	eax, [edx+edi*2-2]
pop	edi
pop	esi
test	eax, eax
jz	short locret_747714
mov	cx, [esp+arg_8]
mov	[eax], cx

locret_747714:
retn	0Ch
sub_747650 endp

align 10h



sub_747720 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [ecx+18h]
push	esi
push	edi
test	ebp, ebp
jnz	short loc_747738
mov	eax, [esp+10h+arg_0]
mov	[ecx+4], eax
mov	dword ptr [ecx], 1

loc_747738:
mov	edx, [esp+10h+arg_4]
mov	ebx, [edx+184h]
lea	edi, [ebp+ebx*2+0]
add	edi, ebx
cmp	edi, [ecx+18h]
lea	esi, [ecx+14h]
jnb	short loc_74775C
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_747771
push	edi
jmp	short loc_747769

loc_74775C:
cmp	edi, [esi+8]
jb	short loc_747771
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_747769:
push	esi
mov	ecx, esi
call	sub_747200

loc_747771:
xor	edx, edx
mov	[esi+4], edi
test	ebx, ebx
jbe	short loc_7477CD
lea	eax, [ebp+ebp+0]
mov	edi, edi

loc_747780:
mov	ecx, [esp+10h+arg_4]
mov	ebp, [ecx+190h]
mov	edi, edx
shr	edi, 0Ah
mov	edi, [ebp+edi*4+0]
mov	ecx, edx
and	ecx, 3FFh
lea	ecx, [ecx+ecx*2]
mov	bp, [edi+ecx*4]
lea	ecx, [edi+ecx*4]
mov	edi, [esi]
mov	[eax+edi], bp
mov	edi, [esi]
mov	bp, [ecx+4]
add	eax, 2
mov	[eax+edi], bp
mov	edi, [esi]
mov	cx, [ecx+8]
add	eax, 2
mov	[eax+edi], cx
inc	edx
add	eax, 2
cmp	edx, ebx
jb	short loc_747780

loc_7477CD:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_747720 endp

align 10h



sub_7477E0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+20h]
lea	esi, [edi+20h]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_7477FB
mov	eax, [ecx]
mov	edx, [eax+74h]
push	2
push	esi
call	edx

loc_7477FB:
mov	[esi], ebx
mov	[esi+4], ebx
cmp	[edi+18h], ebx
lea	esi, [edi+14h]
jbe	short loc_74782C
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_74783A
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_747827
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_747827:
mov	[esi+8], ebx
jmp	short loc_74783A

loc_74782C:
cmp	[esi+8], ebx
ja	short loc_74783A
push	ebx
push	esi
mov	ecx, esi
call	sub_747200

loc_74783A:
mov	[esi+4], ebx
or	eax, 0FFFFFFFFh
mov	[edi], ebx
mov	[edi+10h], ebx
mov	[edi+4], eax
mov	[edi+8], eax
mov	[edi+0Ch], eax
pop	edi
pop	esi
pop	ebx
retn
sub_7477E0 endp

align 10h



; int __stdcall	sub_747860(int,	int, float)
sub_747860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_4]
mov	edx, [esp+8+arg_0]
mov	edx, [edx+24h]
push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, eax
and	eax, 3Fh
shr	ecx, 6
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
push	esi
lea	esi, [ecx+eax*8]
mov	eax, [ebp+8]
push	edi
mov	[esp+18h+var_8], ebp
mov	[esp+18h+arg_4], eax
test	eax, eax
jnz	short loc_74789A
mov	edx, [esi+14h]
mov	[ebp+0], edx

loc_74789A:
mov	ecx, [esi+4]
lea	edi, [ecx+ecx]
mov	[esp+18h+var_4], edi
add	edi, eax
lea	ebx, [ebp+4]
mov	[esp+18h+arg_0], ecx
cmp	edi, [ebx+4]
jnb	short loc_7478BE
mov	ecx, [ebx+8]
shr	ecx, 1
cmp	edi, ecx
jnb	short loc_7478D7
push	edi
jmp	short loc_7478CB

loc_7478BE:
cmp	edi, [ebx+8]
jb	short loc_7478D7
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx

loc_7478CB:
push	ebx
mov	ecx, ebx
call	sub_747200
mov	eax, [esp+18h+arg_4]

loc_7478D7:
mov	[ebx+4], edi
xor	edi, edi
cmp	[esp+18h+arg_0], edi
jbe	short loc_747949
fld	[esp+18h+arg_8]
lea	ebp, [eax+eax]

loc_7478E9:
mov	eax, [esi+8]
mov	edx, [esi]
mov	edx, [edx+14h]
add	eax, edi
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8]
fmul	st, st(1)
call	__ftol2_sse
mov	edx, [ebx]
mov	[edx+ebp], ax
mov	eax, [esi+8]
mov	edx, [esi]
mov	edx, [edx+14h]
add	eax, edi
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8+4]
fmul	st, st(1)
call	__ftol2_sse
mov	edx, [ebx]
mov	[edx+ebp+2], ax
inc	edi
add	ebp, 4
cmp	edi, [esp+18h+arg_0]
jb	short loc_7478E9
mov	ebp, [esp+18h+var_8]
fstp	st

loc_747949:
mov	esi, [ebp+1Ch]
lea	edi, [ebp+18h]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_747961
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_747976
push	esi
jmp	short loc_74796E

loc_747961:
cmp	esi, [edi+8]
jb	short loc_747976
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_74796E:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_747976:
mov	edx, [edi]
mov	[edi+4], esi
lea	esi, [edx+esi*4-4]
test	esi, esi
jz	short loc_747989
mov	eax, [esp+18h+var_4]
mov	[esi], eax

loc_747989:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_747860 endp

align 10h



sub_7479A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*8-28h]
test	eax, eax
jbe	short locret_7479F8
push	esi
push	edi
lea	esi, [ecx+20h]
mov	edi, eax
lea	ebx, [ebx+0]

loc_7479C0:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7479D0
mov	eax, [ecx]
mov	edx, [eax+74h]
push	2
push	esi
call	edx

loc_7479D0:
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi-0Ch]
mov	eax, [eax+30h]
push	edx
call	eax
sub	esi, 28h
sub	edi, 1
jnz	short loc_7479C0
pop	edi
pop	esi

locret_7479F8:
retn
sub_7479A0 endp

align 10h



sub_747A00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
xor	ecx, ecx
cmp	edx, ecx
jbe	short locret_747A44
mov	eax, [esp+arg_0]
push	esi
add	eax, 1Ch
push	edi
or	esi, 0FFFFFFFFh

loc_747A16:
lea	edi, [eax-1Ch]
test	edi, edi
jz	short loc_747A3A
mov	[eax-8], ecx
mov	[eax-4], ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax-1Ch], ecx
mov	[eax-18h], esi
mov	[eax-14h], esi
mov	[eax-10h], esi
mov	[eax-0Ch], ecx

loc_747A3A:
add	eax, 28h
sub	edx, 1
jnz	short loc_747A16
pop	edi
pop	esi

locret_747A44:
retn
sub_747A00 endp

align 10h



sub_747A50 proc	near
push	ebx
mov	ebx, ecx
mov	ecx, [ebx+50h]
push	esi
lea	esi, [ebx+50h]
test	ecx, ecx
jz	short loc_747A68
mov	eax, [ecx]
mov	edx, [eax+74h]
push	1
push	esi
call	edx

loc_747A68:
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	ecx, [ebx+10h]
lea	esi, [ebx+10h]
test	ecx, ecx
jz	short loc_747A89
mov	eax, [ecx]
mov	edx, [eax+74h]
push	1
push	esi
call	edx

loc_747A89:
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	esi, [ebx+24h]
test	esi, esi
jz	short loc_747ADF
mov	ecx, [esi+20h]
push	edi
lea	edi, [esi+20h]
test	ecx, ecx
jz	short loc_747AB2
mov	eax, [ecx]
mov	edx, [eax+74h]
push	2
push	edi
call	edx

loc_747AB2:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+14h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax
pop	edi

loc_747ADF:
lea	ecx, [ebx+3Ch]
call	sub_756630
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx+18h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx+4]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
retn
sub_747A50 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_747B10(int,	float, int, float, float, char,	char, char)
sub_747B10 proc	near

var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_B8=	dword ptr -0B8h
var_B2=	byte ptr -0B2h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_A9=	byte ptr -0A9h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	byte ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_40=	byte ptr -40h
var_28=	byte ptr -28h
var_24=	dword ptr -24h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	byte ptr  20h
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0BCh
mov	eax, [ebp+arg_0]
fld1
mov	edx, [eax+68h]
fst	[esp+0BCh+var_B0]
cmp	[ebp+arg_18], 0
fst	[esp+0BCh+var_A8]
push	ebx
push	esi
mov	esi, [edx+10h]
mov	edx, [ebp+arg_4]
mov	ebx, ecx
mov	ecx, [eax+48h]
movzx	eax, word ptr [edx+4]
mov	[esp+0C4h+var_B8], eax
mov	eax, [edx+0Ch]
fild	[esp+0C4h+var_B8]
setz	[esp+0C4h+var_A9]
push	edi
mov	[esp+0C8h+var_94], ecx
fstp	[esp+0C8h+var_88]
mov	[esp+0C8h+var_B1], 1
test	eax, eax
jnz	short loc_747B6D
cmp	byte ptr [edx+0Bh], 0FFh
sbb	ecx, ecx
neg	ecx
jmp	short loc_747B78

loc_747B6D:
movzx	edi, byte ptr [eax+1]
shr	edi, 1
and	edi, 1
mov	ecx, edi

loc_747B78:
test	cl, cl
jz	short loc_747B81
mov	[esp+0C8h+var_A9], 0

loc_747B81:
mov	ecx, [esp+0C8h+var_94]
mov	ecx, [ecx+14h]
mov	[esp+0C8h+var_B8], ecx
test	cl, 10h
jz	short loc_747BA3
mov	ecx, [esp+0C8h+var_94]
test	dword ptr [ecx+1Ch], 100h
mov	[esp+0C8h+var_B2], 1
jnz	short loc_747BA8

loc_747BA3:
mov	[esp+0C8h+var_B2], 0

loc_747BA8:
test	eax, eax
jz	short loc_747BC0
mov	eax, [esp+0C8h+var_94]
mov	ecx, [eax+1Ch]
shr	ecx, 9
test	cl, 1
jnz	short loc_747BC0
mov	[esp+0C8h+var_B2], 0

loc_747BC0:
mov	al, byte ptr [esp+0C8h+var_B8]
and	al, 3
cmp	al, 2
jz	loc_748DE2
movzx	eax, word ptr [edx+4]
test	ax, ax
jz	loc_748DE2
cmp	[ebp+arg_1C], 0
mov	edi, [ebp+arg_8]
jz	short loc_747BEE
fst	[esp+0C8h+var_90]
fst	[esp+0C8h+var_8C]
jmp	short loc_747C0B

loc_747BEE:
mov	ecx, edi
fstp	st
call	sub_64EAA0
fstp	[esp+0C8h+var_90]
mov	ecx, edi
call	sub_64EAC0
fstp	[esp+0C8h+var_8C]
fld1
mov	edx, [ebp+arg_4]

loc_747C0B:
movzx	eax, word ptr [edx+10h]
fld	[esp+0C8h+var_90]
fld	[esp+0C8h+var_8C]
and	eax, 6
cmp	eax, 6		; switch 7 cases
ja	loc_747E3D	; default
			; jumptable 00747C23 cases 1,3,5
jmp	ds:off_748E64[eax*4] ; switch jump

loc_747C2A:		; jumptable 00747C23 case 6
fxch	st(2)
fstp	[esp+0C8h+var_B0]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
call	__CIsqrt
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fmul	ds:dbl_15FD440
fstp	[esp+0C8h+var_A8]
jmp	loc_747E43

loc_747C5C:		; jumptable 00747C23 case 0
fstp	st(2)
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
call	__CIsqrt
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
mov	edx, [esp+0C8h+var_94]
test	byte ptr [edx+14h], 3
fmul	ds:dbl_15FD440
fstp	[esp+0C8h+var_A8]
jz	short loc_747CA5
cmp	[ebp+arg_1C], 0
jnz	short loc_747CA5
fld1
mov	[esp+0C8h+var_B1], 0
fstp	[esp+0C8h+var_B0]
jmp	loc_747E43

loc_747CA5:
fld	[esp+0C8h+var_A8]
fstp	[esp+0C8h+var_B0]
jmp	loc_747E43

loc_747CB2:		; jumptable 00747C23 case 4
fstp	st(2)
mov	ecx, edi
fstp	st
fstp	st
call	sub_64EAE0
fstp	[esp+0C8h+var_A8]
fld	[esp+0C8h+var_A8]
fsub	ds:dbl_15FD668
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
call	__CIcos
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fcom	ds:dbl_15FCC10
fnstsw	ax
test	ah, 41h
jz	short loc_747CFB
fstp	st
fldz

loc_747CFB:
fstp	[esp+0C8h+var_A4]
fld	[esp+0C8h+var_A8]
call	__CIsin
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fmul	[esp+0C8h+var_90]
fstp	[esp+0C8h+var_98]
fld	[esp+0C8h+var_A8]
call	__CIcos
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fmul	[esp+0C8h+var_8C]
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_98]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
call	__CIsqrt
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_A4]
fmul	ds:dbl_1440CD8
fstp	[esp+0C8h+var_B8]
fmul	[esp+0C8h+var_B8]
fstp	[esp+0C8h+var_B0]
fld	[esp+0C8h+var_B0]
fstp	[esp+0C8h+var_A8]
jmp	loc_747E43

loc_747D79:		; jumptable 00747C23 case 2
fstp	st(2)
mov	ecx, edi
fstp	st
fstp	st
call	sub_64EAE0
fstp	[esp+0C8h+var_A8]
fld	[esp+0C8h+var_A8]
fadd	ds:dbl_15FD668
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
call	__CIcos
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fcom	ds:dbl_15FCC10
fnstsw	ax
test	ah, 41h
jz	short loc_747DC2
fstp	st
fldz

loc_747DC2:
fstp	[esp+0C8h+var_A4]
fld	[esp+0C8h+var_A8]
call	__CIcos
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fmul	[esp+0C8h+var_90]
fstp	[esp+0C8h+var_98]
fld	[esp+0C8h+var_A8]
call	__CIsin
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fmul	[esp+0C8h+var_8C]
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_98]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
call	__CIsqrt
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_A4]
fmul	ds:dbl_1440CD8
fstp	[esp+0C8h+var_B8]
fmul	[esp+0C8h+var_B8]
fstp	[esp+0C8h+var_B0]
fld	[esp+0C8h+var_B0]
fstp	[esp+0C8h+var_A8]
jmp	short loc_747E43

loc_747E3D:		; default
fstp	st(2)		; jumptable 00747C23 cases 1,3,5
fstp	st
fstp	st

loc_747E43:
fld	[esp+0C8h+var_88]
mov	edx, [ebp+arg_0]
fld	[esp+0C8h+var_A8]
mov	eax, [esp+0C8h+var_94]
fld	st
fmulp	st(2), st
fld	dword ptr [edx+74h]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fld	dword ptr [eax+18h]
fld	ds:dbl_15FCE20
fmul	st(1), st
fxch	st(1)
fcomp	st(2)
fnstsw	ax
test	ah, 1
jnz	short loc_747E80
mov	[esp+0C8h+var_A9], 1

loc_747E80:
mov	cl, [esp+0C8h+var_B1]
test	cl, cl
jnz	short loc_747EA6
fld	ds:flt_15FCCD8
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_747EA8
fld	dword ptr [edx+74h]
fmulp	st(2), st
fdivrp	st(1), st
fstp	[esp+0C8h+var_88]
jmp	short loc_747EAC

loc_747EA6:
fstp	st

loc_747EA8:
fstp	st
fstp	st

loc_747EAC:
cmp	dword ptr [ebx+24h], 0
fld	[esp+0C8h+var_88]
fmul	[esp+0C8h+var_B0]
fstp	[esp+0C8h+var_88]
fld	[esp+0C8h+var_88]
fld	ds:dbl_15FCD70
jz	loc_747FEA
cmp	cl, [ebx+30h]
jnz	loc_747FB0
mov	al, [ebx+2Fh]
test	al, al
jz	short loc_747EE6
cmp	[esp+0C8h+var_A9], al
jnz	loc_747FB0

loc_747EE6:
mov	dl, [esp+0C8h+var_B2]
cmp	dl, [ebx+2Dh]
jnz	loc_747FB0
cmp	[ebp+arg_14], 0
jz	short loc_747F03
cmp	byte ptr [ebx+2Eh], 0
jz	loc_747FB0

loc_747F03:
fld	dword ptr [ebx+28h]
fsub	st, st(1)
fcomp	st(2)
fnstsw	ax
test	ah, 5
jp	loc_747FB0
fadd	dword ptr [ebx+28h]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_747FB4
test	cl, cl
jz	loc_748D32
fld	[ebp+arg_C]
fmul	ds:dbl_1440CD0
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_8C]
fld	dword ptr [ebx+38h]
fld	[esp+0C8h+var_B8]
fld	st
fsubp	st(2), st
fxch	st(1)
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jp	short loc_747FAC
fld	st
fadd	dword ptr [ebx+38h]
fcomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	short loc_747FB2
fld	[esp+0C8h+var_90]
fld	dword ptr [ebx+34h]
fsub	st, st(2)
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_747F88
fld	dword ptr [ebx+34h]
fadd	st, st(2)
fcomp	st(1)
fnstsw	ax
test	ah, 1
jz	loc_748D2E

loc_747F88:
fld	dword ptr [ebx+34h]
fchs
fsub	st, st(2)
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_747FB0
fld	dword ptr [ebx+34h]
fsubp	st(2), st
fcompp
fnstsw	ax
test	ah, 41h
jnp	loc_748D32
jmp	short loc_747FB4

loc_747FAC:
fstp	st
jmp	short loc_747FB2

loc_747FB0:
fstp	st(1)

loc_747FB2:
fstp	st

loc_747FB4:
mov	ecx, [ebx+50h]
lea	edi, [ebx+50h]
test	ecx, ecx
jz	short loc_747FC8
mov	eax, [ecx]
mov	edx, [eax+74h]
push	1
push	edi
call	edx

loc_747FC8:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	ecx, [ebx+24h]
call	sub_7477E0
lea	ecx, [ebx+3Ch]
call	sub_756760
mov	edi, [ebp+arg_8]
jmp	short loc_748025

loc_747FEA:
mov	ecx, dword_1855FC0
fstp	st(1)
lea	edx, [esp+0C8h+var_B8]
fstp	st
push	edx
mov	[esp+0CCh+var_B8], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	28h
push	ebx
call	eax
test	eax, eax
jz	short loc_748018
mov	ecx, eax
call	sub_747590
jmp	short loc_74801A

loc_748018:
xor	eax, eax

loc_74801A:
mov	[ebx+24h], eax
test	eax, eax
jz	loc_748E56

loc_748025:
lea	ecx, [esp+0C8h+var_58]
call	sub_64E8E0
lea	ecx, [esp+0C8h+var_40]
call	sub_64E8E0
mov	eax, [esp+0C8h+var_94]
test	byte ptr [eax+14h], 10h
jz	short loc_748058
test	dword ptr [eax+1Ch], 100h
jz	short loc_748058
cmp	byte ptr [ebx+2Ch], 0
mov	[esp+0C8h+var_B2], 1
jz	short loc_74805D

loc_748058:
mov	[esp+0C8h+var_B2], 0

loc_74805D:
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_748076
mov	edx, [eax+1Ch]
shr	edx, 9
test	dl, 1
jnz	short loc_748076
mov	[esp+0C8h+var_B2], 0

loc_748076:
cmp	[ebp+arg_14], 0
jz	short loc_74809D
mov	ecx, [eax+20h]
shr	ecx, 4
test	cl, 1
jnz	short loc_74809D
mov	edx, [eax+1Ch]
shr	edx, 0Ch
test	dl, 1
jz	short loc_748099
mov	[esp+0C8h+var_B2], 0
jmp	short loc_74809D

loc_748099:
mov	[ebp+arg_14], 0

loc_74809D:
cmp	[esp+0C8h+var_B1], 0
jz	short loc_7480D6
fld	dword ptr [edi]
lea	eax, [esp+0C8h+var_58]
fstp	[esp+0C8h+var_58]
push	eax
fld	dword ptr [edi+0Ch]
lea	ecx, [esp+0CCh+var_40]
fstp	[esp+0CCh+var_4C]
fld	dword ptr [edi+4]
fstp	[esp+0CCh+var_54]
fld	dword ptr [edi+10h]
fstp	[esp+0CCh+var_48]
call	sub_64E9E0

loc_7480D6:
lea	ecx, [esi+8]
call	sub_709300
xor	eax, eax
mov	[esp+0C8h+var_B0], eax
mov	[esp+0C8h+var_9C], eax
cmp	[ebx+1Ch], eax
jbe	loc_74827E

loc_7480F1:
mov	eax, [ebx]
mov	ecx, [ebx+18h]
mov	edx, [esp+0C8h+var_B0]
mov	edi, [ecx+edx*4]
push	eax
push	0FFFFFFFFh
push	0FFFFFFFFh
lea	ecx, [esi+8]
mov	[esp+0D4h+var_A4], edi
call	sub_709680
cmp	[esp+0C8h+var_B1], 0
jz	loc_7481DD
test	edi, edi
jbe	loc_74826C
mov	eax, [esp+0C8h+var_A4]
dec	eax
shr	eax, 1
inc	eax
lea	edi, [esi+10h]
mov	[esp+0C8h+var_A0], eax

loc_748130:
mov	ecx, [ebx+4]
mov	edx, [esp+0C8h+var_9C]
lea	eax, [ecx+edx*2]
movsx	ecx, word ptr [eax+2]
movsx	edx, word ptr [eax]
mov	[esp+0C8h+var_B8], ecx
lea	eax, [esp+0C8h+var_84]
fild	[esp+0C8h+var_B8]
mov	[esp+0C8h+var_B8], edx
push	eax
lea	ecx, [esp+0CCh+var_70]
fstp	[esp+0CCh+var_98]
push	ecx
fild	[esp+0D0h+var_B8]
lea	ecx, [esp+0D0h+var_58]
fstp	[esp+0D0h+var_84]
fld	[esp+0D0h+var_98]
fstp	[esp+0D0h+var_80]
call	sub_64E9B0
fld	[esp+0C8h+var_70]
mov	eax, [edi]
fstp	[esp+0C8h+var_78]
shr	eax, 8
fld	[esp+0C8h+var_6C]
mov	[esp+0C8h+var_A4], eax
fstp	[esp+0C8h+var_74]
cmp	eax, [edi+4]
jb	short loc_74819C
mov	edx, eax
push	edx
mov	ecx, edi
call	sub_709200

loc_74819C:
mov	ecx, [edi+0Ch]
mov	eax, [edi]
mov	edx, [esp+0C8h+var_A4]
mov	ecx, [ecx+edx*4]
mov	edx, [esp+0C8h+var_78]
add	[esp+0C8h+var_9C], 2
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+0C8h+var_74]
mov	[ecx+eax*8+4], edx
mov	ecx, 1
add	[edi], ecx
mov	eax, [esi+30h]
add	[eax+4], ecx
sub	[esp+0C8h+var_A0], ecx
jnz	loc_748130
jmp	loc_74826C

loc_7481DD:
test	edi, edi
jbe	loc_74826C
mov	eax, [esp+0C8h+var_A4]
dec	eax
shr	eax, 1
inc	eax
lea	edi, [esi+10h]
mov	[esp+0C8h+var_A0], eax

loc_7481F4:
mov	ecx, [esp+0C8h+var_9C]
mov	eax, [ebx+4]
movsx	edx, word ptr [eax+ecx*2]
lea	eax, [eax+ecx*2]
movsx	eax, word ptr [eax+2]
mov	ecx, [edi]
mov	[esp+0C8h+var_B8], edx
shr	ecx, 8
fild	[esp+0C8h+var_B8]
mov	[esp+0C8h+var_B8], eax
mov	[esp+0C8h+var_A4], ecx
fstp	[esp+0C8h+var_68]
fild	[esp+0C8h+var_B8]
fstp	[esp+0C8h+var_64]
cmp	ecx, [edi+4]
jb	short loc_748238
push	ecx
mov	ecx, edi
call	sub_709200
mov	ecx, [esp+0C8h+var_A4]

loc_748238:
mov	edx, [edi+0Ch]
mov	ecx, [edx+ecx*4]
mov	eax, [edi]
mov	edx, [esp+0C8h+var_68]
add	[esp+0C8h+var_9C], 2
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+0C8h+var_64]
mov	[ecx+eax*8+4], edx
mov	ecx, 1
add	[edi], ecx
mov	eax, [esi+30h]
add	[eax+4], ecx
sub	[esp+0C8h+var_A0], ecx
jnz	short loc_7481F4

loc_74826C:
mov	eax, [esp+0C8h+var_B0]
inc	eax
mov	[esp+0C8h+var_B0], eax
cmp	eax, [ebx+1Ch]
jb	loc_7480F1

loc_74827E:
cmp	[esp+0C8h+var_A9], 0
jz	loc_74884A
mov	edi, [ebp+arg_4]
xor	edx, edx
lea	ecx, [esi+298h]
mov	[ecx+2Ch], edx
mov	[ecx+3Ch], dl
mov	[ecx+40h], edx
mov	[ecx+50h], edx
movzx	eax, word ptr [edi+10h]
and	eax, 0C0h
sub	eax, 40h
jz	short loc_7482BF
sub	eax, 40h
jz	short loc_7482B8
lea	eax, [edx+2]
jmp	short loc_7482C1

loc_7482B8:
mov	eax, 1
jmp	short loc_7482C1

loc_7482BF:
xor	eax, eax

loc_7482C1:
mov	[esi+29Ch], eax
movzx	eax, word ptr [edi+10h]
shr	eax, 2
and	eax, 0C0h
sub	eax, 40h
jz	short loc_7482EB
sub	eax, 40h
jz	short loc_7482E4
mov	eax, 2
jmp	short loc_7482ED

loc_7482E4:
mov	eax, 1
jmp	short loc_7482ED

loc_7482EB:
xor	eax, eax

loc_7482ED:
mov	[esi+2A0h], eax
movzx	eax, word ptr [edi+10h]
and	eax, 30h
cmp	eax, 10h
jz	short loc_74830B
sub	eax, 20h
neg	eax
sbb	eax, eax
and	eax, 3
jmp	short loc_748310

loc_74830B:
mov	eax, 4

loc_748310:
mov	[ecx], eax
mov	al, [edi+10h]
and	al, 30h
cmp	al, 20h
jnz	short loc_748324
fld	dword ptr [edi+14h]
fstp	dword ptr [esi+2A4h]

loc_748324:
cmp	[esp+0C8h+var_B2], 0
fld	[ebp+arg_C]
fld	st
fmul	[ebp+arg_10]
fstp	dword ptr [esi+2C0h]
jz	short loc_7483A1
cmp	[esp+0C8h+var_B1], 0
fld	ds:dbl_15FCE20
mov	edx, [ebp+arg_0]
fmul	st, st(1)
fdiv	dword ptr [edx+74h]
fstp	[esp+0C8h+var_A0]
jnz	short loc_74835E
fld	[esp+0C8h+var_A0]
fdiv	[esp+0C8h+var_A8]
fstp	[esp+0C8h+var_A0]

loc_74835E:
fld	[esp+0C8h+var_A0]
fst	dword ptr [ecx+24h]
fst	dword ptr [ecx+20h]
fld	[esp+0C8h+var_88]
fmulp	st(2), st
fsubp	st(1), st
fstp	[esp+0C8h+var_B8]
fldz
fld	[esp+0C8h+var_B8]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_748387
fstp	st
jmp	short loc_748389

loc_748387:
fstp	st(1)

loc_748389:
fstp	[esp+0C8h+var_A4]
fld	[esp+0C8h+var_A4]
fmul	ds:dbl_15FCC48
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
jmp	short loc_7483C3

loc_7483A1:
fldz
fst	dword ptr [ecx+24h]
fstp	dword ptr [ecx+20h]
fmul	[esp+0C8h+var_88]
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fmul	ds:dbl_15FCC48
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]

loc_7483C3:
fst	dword ptr [ecx+1Ch]
fstp	dword ptr [ecx+18h]
mov	eax, [ebx]
push	eax
lea	eax, [esi+8]
push	eax
call	sub_7639F0
inc	dword ptr [esi+3ACh]
cmp	[esp+0C8h+var_B2], 0
jz	loc_748697
mov	cl, [ebp+arg_14]
xor	eax, eax
mov	[esp+0C8h+var_A0], eax
mov	[esp+0C8h+var_A8], eax
mov	[ebx+2Eh], cl
mov	eax, [edi+8]
mov	edx, eax
shr	edx, 10h
mov	[esp+0C8h+var_9C], eax
mov	byte ptr [esp+0C8h+var_9C], dl
mov	byte ptr [esp+0C8h+var_9C+2], al
test	cl, cl
jnz	short loc_74842F
cmp	dword ptr [edi+0Ch], 0
jnz	short loc_74842F
lea	edi, [ebx+3Ch]
push	3
mov	ecx, edi
call	sub_756A20
mov	eax, [esp+0C8h+var_9C]
and	eax, offset sub_FFFFFF
mov	[esp+0C8h+var_A4], eax
jmp	short loc_74846E

loc_74842F:
lea	edi, [ebx+3Ch]
push	4
mov	ecx, edi
call	sub_756A20
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_748456
mov	[esp+0C8h+var_A0], 0FFFFFFFFh
mov	[esp+0C8h+var_A8], offset sub_FFFFFF
jmp	short loc_748466

loc_748456:
mov	[esp+0C8h+var_A0], 0FF000000h
mov	[esp+0C8h+var_A8], 0

loc_748466:
mov	ecx, [esp+0C8h+var_9C]
mov	[esp+0C8h+var_A4], ecx

loc_74846E:
mov	eax, [ebx+24h]
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], 1
mov	dword ptr [eax+4], 0
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [ebx+24h]
xor	edx, edx
cmp	[eax+0Ch], edx
setnz	dl
mov	[ecx+10h], edx
mov	eax, [esi+2D8h]
cmp	eax, 0FFFEh
ja	loc_7487F5
push	eax
mov	ecx, edi
call	sub_756650
cmp	[esp+0C8h+var_B1], 0
mov	[esp+0C8h+var_B0], 0
jz	loc_7485C9
cmp	dword ptr [esi+2D8h], 0
jbe	loc_74868E

loc_7484D1:
mov	eax, [esp+0C8h+var_B0]
mov	ecx, [esi+2E4h]
mov	edx, eax
and	eax, 0FFh
shr	edx, 8
mov	ecx, [ecx+edx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ecx+eax*4]
lea	eax, [ecx+eax*4]
fstp	[esp+0C8h+var_84]
lea	edx, [esp+0C8h+var_84]
fld	dword ptr [eax+4]
mov	[esp+0C8h+var_B8], eax
push	edx
fstp	[esp+0CCh+var_80]
lea	eax, [esp+0CCh+var_70]
push	eax
lea	ecx, [esp+0D0h+var_40]
call	sub_64E9B0
fld	[esp+0C8h+var_8C]
sub	esp, 8
fstp	[esp+0D0h+var_CC]
lea	ecx, [esp+0D0h+var_70]
fld	[esp+0D0h+var_90]
fstp	[esp+0D0h+var_D0]
push	ecx
mov	ecx, ebx
call	sub_746D00
mov	ecx, [edi+0Ch]
mov	eax, [ecx+4]
imul	eax, [esp+0C8h+var_B0]
add	eax, [edi+8]
mov	edx, [ecx+8]
mov	[esp+0C8h+var_78], eax
mov	eax, [esp+0C8h+var_B8]
mov	eax, [eax+8]
mov	[esp+0C8h+var_74], edx
mov	edx, [esp+0C8h+var_A4]
cmp	eax, 0FFFFFFFFh
jz	short loc_7485BF
mov	eax, [esp+0C8h+var_A0]
mov	edx, [esp+0C8h+var_9C]
mov	[esp+0C8h+var_98], eax

loc_748569:
fld	[esp+0C8h+var_6C]
mov	ecx, [esp+0C8h+var_74]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
mov	edx, [esp+0CCh+var_78]
sub	esp, 8
fstp	[esp+0D4h+var_D0]
fld	[esp+0D4h+var_70]
fstp	[esp+0D4h+var_D4]
push	edx
call	eax
mov	eax, [esp+0C8h+var_98]
mov	ecx, [esp+0C8h+var_74]
mov	edx, [ecx]
mov	edx, [edx+14h]
push	eax
mov	eax, [esp+0CCh+var_78]
push	eax
call	edx
mov	eax, [esp+0C8h+var_B0]
inc	eax
mov	[esp+0C8h+var_B0], eax
cmp	eax, [esi+2D8h]
jb	loc_7484D1
mov	byte ptr [ebx+2Dh], 1
jmp	loc_7487F5

loc_7485BF:
mov	ecx, [esp+0C8h+var_A8]
mov	[esp+0C8h+var_98], ecx
jmp	short loc_748569

loc_7485C9:
cmp	dword ptr [esi+2D8h], 0
jbe	loc_74868E
jmp	short loc_7485E0
align 10h

loc_7485E0:
mov	eax, [esp+0C8h+var_B0]
mov	edx, [esi+2E4h]
mov	ecx, eax
and	eax, 0FFh
shr	ecx, 8
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
mov	ecx, [edi+0Ch]
mov	eax, [ecx+4]
imul	eax, [esp+0C8h+var_B0]
add	eax, [edi+8]
mov	[esp+0C8h+var_78], eax
mov	eax, [ecx+8]
mov	ecx, [esp+0C8h+var_A4]
mov	[esp+0C8h+var_74], eax
mov	eax, [edx+8]
cmp	eax, 0FFFFFFFFh
jz	short loc_748626
mov	ecx, [esp+0C8h+var_9C]

loc_748626:
mov	[esp+0C8h+var_98], ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_748639
mov	eax, [esp+0C8h+var_A8]
mov	[esp+0C8h+var_B8], eax
jmp	short loc_748641

loc_748639:
mov	ecx, [esp+0C8h+var_A0]
mov	[esp+0C8h+var_B8], ecx

loc_748641:
push	[esp+0C8h+var_98]
fld	dword ptr [edx+4]
mov	ecx, [esp+0CCh+var_74]
mov	eax, [ecx]
mov	eax, [eax+4]
sub	esp, 8
fstp	[esp+0D4h+var_D0]
fld	dword ptr [edx]
mov	edx, [esp+0D4h+var_78]
fstp	[esp+0D4h+var_D4]
push	edx
call	eax
mov	eax, [esp+0C8h+var_B8]
mov	ecx, [esp+0C8h+var_74]
mov	edx, [ecx]
mov	edx, [edx+14h]
push	eax
mov	eax, [esp+0CCh+var_78]
push	eax
call	edx
mov	eax, [esp+0C8h+var_B0]
inc	eax
mov	[esp+0C8h+var_B0], eax
cmp	eax, [esi+2D8h]
jb	loc_7485E0

loc_74868E:
mov	byte ptr [ebx+2Dh], 1
jmp	loc_7487F5

loc_748697:
lea	edi, [ebx+3Ch]
push	1
mov	ecx, edi
call	sub_756A20
mov	eax, [esi+2D8h]
push	eax
mov	ecx, edi
call	sub_756650
cmp	[esp+0C8h+var_B1], 0
mov	eax, [ebx+24h]
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], 1
mov	[esp+0C8h+var_B0], 0
jz	loc_748787
cmp	dword ptr [esi+2D8h], 0
jbe	loc_7487F5

loc_7486E1:
mov	eax, [esp+0C8h+var_B0]
mov	edx, [esi+2E4h]
mov	ecx, eax
and	eax, 0FFh
shr	ecx, 8
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ecx+eax*4]
lea	eax, [ecx+eax*4]
fstp	[esp+0C8h+var_84]
lea	edx, [esp+0C8h+var_84]
fld	dword ptr [eax+4]
push	edx
lea	eax, [esp+0CCh+var_70]
fstp	[esp+0CCh+var_80]
push	eax
lea	ecx, [esp+0D0h+var_40]
call	sub_64E9B0
fld	[esp+0C8h+var_8C]
sub	esp, 8
fstp	[esp+0D0h+var_CC]
lea	ecx, [esp+0D0h+var_70]
fld	[esp+0D0h+var_90]
fstp	[esp+0D0h+var_D0]
push	ecx
mov	ecx, ebx
call	sub_746D00
fld	[esp+0C8h+var_6C]
mov	ecx, [edi+0Ch]
mov	eax, [ecx+4]
imul	eax, [esp+0C8h+var_B0]
add	eax, [edi+8]
mov	ecx, [ecx+8]
mov	edx, [ecx]
push	0
sub	esp, 8
fstp	[esp+0D4h+var_D0]
fld	[esp+0D4h+var_70]
fstp	[esp+0D4h+var_D4]
push	eax
mov	eax, [edx+4]
call	eax
mov	eax, [esp+0C8h+var_B0]
inc	eax
mov	[esp+0C8h+var_B0], eax
cmp	eax, [esi+2D8h]
jb	loc_7486E1
jmp	loc_7487F5

loc_748787:
cmp	dword ptr [esi+2D8h], 0
jbe	loc_7487F5

loc_748794:
mov	eax, [esp+0C8h+var_B0]
mov	edx, [esi+2E4h]
mov	ecx, eax
and	eax, 0FFh
shr	ecx, 8
mov	ecx, [edx+ecx*4]
mov	edx, [edi+0Ch]
lea	eax, [eax+eax*2]
fld	dword ptr [ecx+eax*4+4]
lea	ecx, [ecx+eax*4]
mov	eax, [edx+4]
imul	eax, [esp+0C8h+var_B0]
mov	edx, [edx+8]
add	eax, [edi+8]
push	0
sub	esp, 8
mov	[esp+0D4h+var_80], edx
mov	edx, [edx]
fstp	[esp+0D4h+var_D0]
fld	dword ptr [ecx]
mov	ecx, [esp+0D4h+var_80]
fstp	[esp+0D4h+var_D4]
push	eax
mov	eax, [edx+4]
call	eax
mov	eax, [esp+0C8h+var_B0]
inc	eax
mov	[esp+0C8h+var_B0], eax
cmp	eax, [esi+2D8h]
jb	short loc_748794

loc_7487F5:
cmp	dword ptr [edi], 0
jz	short loc_74883F
xor	edi, edi
cmp	[esi+2E8h], edi
jbe	short loc_74883F

loc_748804:
mov	edx, [esi+2F4h]
mov	ecx, edi
shr	ecx, 8
mov	ecx, [edx+ecx*4]
mov	eax, edi
and	eax, 0FFh
lea	eax, [eax+eax*2]
movzx	edx, word ptr [ecx+eax*4+8]
lea	eax, [ecx+eax*4]
movzx	ecx, word ptr [eax+4]
push	edx
movzx	edx, word ptr [eax]
push	ecx
mov	ecx, [ebx+24h]
push	edx
call	sub_747650
inc	edi
cmp	edi, [esi+2E8h]
jb	short loc_748804

loc_74883F:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4Ch]
jmp	loc_748CEF

loc_74884A:
lea	ecx, [esi+0C4h]
call	sub_758EB0
lea	ecx, [esi+50h]
mov	dword ptr [esi+0B0h], 0
mov	byte ptr [esi+0C0h], 0
call	sub_709300
fld	[ebp+arg_C]
cmp	[esp+0C8h+var_B1], 0
fld	ds:dbl_15FD718
mov	eax, [ebp+arg_0]
fmul	st, st(1)
fdiv	dword ptr [eax+74h]
fstp	[esp+0C8h+var_A0]
jnz	short loc_748896
fld	[esp+0C8h+var_A0]
fdiv	[esp+0C8h+var_A8]
fstp	[esp+0C8h+var_A0]

loc_748896:
cmp	[esp+0C8h+var_B2], 0
fld	[esp+0C8h+var_88]
fmul	st, st(1)
fstp	[esp+0C8h+var_9C]
jz	short loc_7488CA
fld	[esp+0C8h+var_A0]
fadd	st, st
fadd	[esp+0C8h+var_9C]
fstp	[esp+0C8h+var_9C]
fld1
fcom	[esp+0C8h+var_9C]
fnstsw	ax
test	ah, 41h
jnz	short loc_7488C8
fstp	[esp+0C8h+var_9C]
jmp	short loc_7488CA

loc_7488C8:
fstp	st

loc_7488CA:
mov	ecx, [ebp+arg_4]
movzx	eax, word ptr [ecx+10h]
and	eax, 30h
cmp	eax, 10h
jz	short loc_7488E5
sub	eax, 20h
neg	eax
sbb	eax, eax
and	eax, 3
jmp	short loc_7488EA

loc_7488E5:
mov	eax, 4

loc_7488EA:
mov	[esi+0A0h], eax
movzx	eax, word ptr [ecx+10h]
and	eax, 0C0h
sub	eax, 40h
jz	short loc_748911
sub	eax, 40h
jz	short loc_74890A
mov	eax, 2
jmp	short loc_748913

loc_74890A:
mov	eax, 1
jmp	short loc_748913

loc_748911:
xor	eax, eax

loc_748913:
mov	[esi+0A4h], eax
movzx	eax, word ptr [ecx+10h]
shr	eax, 2
and	eax, 0C0h
sub	eax, 40h
jz	short loc_74893D
sub	eax, 40h
jz	short loc_748936
mov	eax, 2
jmp	short loc_74893F

loc_748936:
mov	eax, 1
jmp	short loc_74893F

loc_74893D:
xor	eax, eax

loc_74893F:
fld	[esp+0C8h+var_9C]
mov	[esi+0A8h], eax
fmul	ds:dbl_15FCC48
lea	edi, [esi+98h]
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fst	dword ptr [edi]
fldz
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_74896C
fchs

loc_74896C:
fstp	[esp+0C8h+var_B8]
fld	[esp+0C8h+var_B8]
fstp	dword ptr [edi+4]
mov	dl, [ecx+10h]
and	dl, 30h
cmp	dl, 20h
jnz	short loc_74898B
fld	dword ptr [ecx+14h]
fstp	dword ptr [esi+0ACh]

loc_74898B:
fmul	[ebp+arg_10]
push	ecx		; float
lea	ecx, [esi+50h]
fstp	[esp+0CCh+var_B8]
fld	[esp+0CCh+var_B8]
fstp	[esp+0CCh+var_CC]
call	sub_708D20
push	1
lea	eax, [esi+50h]
push	eax
mov	eax, [ebx]
push	eax
lea	eax, [esi+8]
push	eax
mov	ecx, edi
call	sub_74C330
mov	edx, [esp+0C8h+var_94]
lea	ecx, [esi+0C4h]
mov	dword ptr [ecx], 0
mov	eax, [edx+14h]
shr	eax, 5
and	al, 1
mov	[esi+0C9h], al
mov	[esi+0CAh], al
mov	[esi+0CBh], al
push	1
lea	eax, [esi+50h]
push	eax
mov	byte ptr [esi+0C8h], 1
call	sub_75E7E0
inc	dword ptr [esi+3ACh]
cmp	dword ptr [esi+1C8h], 0
jz	loc_748D03
mov	ecx, [ebx+50h]
lea	edi, [ebx+50h]
xor	edx, edx
cmp	ecx, edx
jz	short loc_748A1D
mov	eax, [ecx]
mov	edx, [eax+74h]
push	1
push	edi
call	edx
xor	edx, edx

loc_748A1D:
cmp	[esp+0C8h+var_B2], 0
mov	[edi], edx
mov	[edi+4], edx
mov	byte ptr [ebx+2Dh], 0
jz	loc_748B87
mov	eax, [ebp+arg_4]
mov	eax, [eax+0Ch]
mov	[esp+0C8h+var_84], edx
mov	[esp+0C8h+var_80], edx
mov	[esp+0C8h+var_7C], edx
cmp	eax, edx
jz	short loc_748A53
push	eax
lea	ecx, [esp+0CCh+var_84]
call	sub_7475C0
jmp	short loc_748A89

loc_748A53:
lea	ecx, [esp+0C8h+var_28]
call	sub_6FA2A0
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
lea	eax, [esp+0C8h+var_28]
push	eax
lea	ecx, [esp+0CCh+var_84]
mov	[esp+0CCh+var_24], edx
call	sub_7475C0
lea	ecx, [esp+0C8h+var_28]
call	sub_6FA020

loc_748A89:
mov	ecx, [ebp+arg_4]
fld	[esp+0C8h+var_A0]
mov	edx, [ecx+0Ch]
mov	eax, [esp+0C8h+var_80]
neg	edx
sbb	edx, edx
and	edx, offset sub_FFFFFF
push	edx		; int
push	0		; int
push	ecx		; float
mov	ecx, [esp+0D4h+var_84]
fstp	[esp+0D4h+var_D4]
push	eax		; int
push	ecx		; int
lea	eax, [esi+0C4h]
lea	edi, [esi+308h]
push	eax		; int
mov	ecx, edi
call	sub_75E810
mov	ecx, edi
call	sub_75E9A0
cmp	eax, 0FFFEh
ja	loc_748B7E
mov	al, [ebp+arg_14]
mov	[ebx+2Eh], al
test	al, al
jnz	short loc_748AEB
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_748AEB
push	3
jmp	short loc_748AED

loc_748AEB:
push	4

loc_748AED:
lea	edi, [ebx+3Ch]
mov	ecx, edi
call	sub_756A20
cmp	[esp+0C8h+var_B1], 0
jz	short loc_748B18
mov	ecx, [ebx+24h]
lea	eax, [esp+0C8h+var_40]
push	eax
push	ecx
push	edi
lea	ecx, [esi+308h]
call	sub_75EEB0
jmp	short loc_748B2E

loc_748B18:
fld1
mov	edx, [ebx+24h]
push	ecx		; float
fstp	[esp+0CCh+var_CC]
push	edx		; int
push	edi		; int
lea	ecx, [esi+308h]
call	sub_75EC60

loc_748B2E:
mov	cl, al
mov	eax, [ebp+arg_0]
mov	edi, [eax+4Ch]
test	edi, edi
jz	short loc_748B4A
mov	edx, [ebx+24h]
mov	eax, 0AAAAAAABh
mul	dword ptr [edx+18h]
shr	edx, 1
add	[edi+0Ch], edx

loc_748B4A:
test	cl, cl
jz	short loc_748B7E
mov	eax, [ebp+arg_4]
mov	byte ptr [ebx+2Dh], 1
cmp	dword ptr [eax+0Ch], 0
jz	short loc_748B7E
mov	eax, [ebx+24h]
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], 1
mov	dword ptr [eax+4], 0
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	ecx, [ebx+24h]
mov	dword ptr [ecx+10h], 1

loc_748B7E:
lea	ecx, [esp+0C8h+var_84]
call	sub_711340

loc_748B87:
cmp	byte ptr [ebx+2Dh], 0
jnz	loc_748D03
lea	edi, [ebx+3Ch]
push	1
mov	ecx, edi
call	sub_756A20
mov	edx, [esi+1C8h]
push	edx
mov	ecx, edi
call	sub_756650
xor	edi, edi
cmp	[esp+0C8h+var_B1], 0
jz	loc_748C5C
cmp	[esi+1C8h], edi
jbe	loc_748CB9

loc_748BC4:
mov	ecx, [esi+1D4h]
mov	eax, edi
shr	eax, 0Ah
mov	eax, [ecx+eax*4]
mov	edx, edi
and	edx, 3FFh
fld	dword ptr [eax+edx*8]
lea	eax, [eax+edx*8]
lea	ecx, [esp+0C8h+var_84]
fstp	[esp+0C8h+var_84]
fld	dword ptr [eax+4]
push	ecx
lea	edx, [esp+0CCh+var_70]
fstp	[esp+0CCh+var_80]
push	edx
lea	ecx, [esp+0D0h+var_40]
call	sub_64E9B0
fld	[esp+0C8h+var_8C]
sub	esp, 8
fstp	[esp+0D0h+var_CC]
lea	eax, [esp+0D0h+var_70]
fld	[esp+0D0h+var_90]
mov	ecx, ebx
fstp	[esp+0D0h+var_D0]
push	eax
call	sub_746D00
fld	[esp+0C8h+var_6C]
mov	ecx, [ebx+48h]
mov	eax, [ecx+4]
mov	ecx, [ecx+8]
imul	eax, edi
add	eax, [ebx+44h]
mov	edx, [ecx]
push	0
sub	esp, 8
fstp	[esp+0D4h+var_D0]
fld	[esp+0D4h+var_70]
fstp	[esp+0D4h+var_D4]
push	eax
mov	eax, [edx+4]
call	eax
inc	edi
cmp	edi, [esi+1C8h]
jb	loc_748BC4
jmp	loc_748CB9

loc_748C5C:
cmp	[esi+1C8h], edi
jbe	short loc_748CB9

loc_748C64:
mov	edx, [esi+1D4h]
mov	ecx, edi
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
mov	edx, [ebx+48h]
mov	edx, [edx+8]
mov	eax, edi
and	eax, 3FFh
fld	dword ptr [ecx+eax*8+4]
lea	ecx, [ecx+eax*8]
mov	eax, [ebx+48h]
mov	eax, [eax+4]
imul	eax, edi
add	eax, [ebx+44h]
push	0
sub	esp, 8
mov	[esp+0D4h+var_80], edx
mov	edx, [edx]
fstp	[esp+0D4h+var_D0]
fld	dword ptr [ecx]
mov	ecx, [esp+0D4h+var_80]
fstp	[esp+0D4h+var_D4]
push	eax
mov	eax, [edx+4]
call	eax
inc	edi
cmp	edi, [esi+1C8h]
jb	short loc_748C64

loc_748CB9:
xor	edi, edi
cmp	[esi+218h], edi
jbe	short loc_748CE9

loc_748CC3:
push	edi
lea	ecx, [esi+0C4h]
call	sub_75D6B0
mov	ecx, [ebx+24h]
lea	eax, [esi+0C4h]
push	eax
push	0
call	sub_747720
inc	edi
cmp	edi, [esi+218h]
jb	short loc_748CC3

loc_748CE9:
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx+4Ch]

loc_748CEF:
test	ecx, ecx
jz	short loc_748D03
mov	edx, [ebx+24h]
mov	eax, 0AAAAAAABh
mul	dword ptr [edx+18h]
shr	edx, 1
add	[ecx+0Ch], edx

loc_748D03:
fld	[esp+0C8h+var_88]
mov	al, [esp+0C8h+var_A9]
mov	cl, [esp+0C8h+var_B1]
fstp	dword ptr [ebx+28h]
fld	[esp+0C8h+var_90]
mov	dl, [ebp+arg_14]
fstp	dword ptr [ebx+34h]
mov	[ebx+2Fh], al
fld	[esp+0C8h+var_8C]
mov	[ebx+30h], cl
fstp	dword ptr [ebx+38h]
mov	[ebx+2Eh], dl
jmp	short loc_748D32

loc_748D2E:
fstp	st(1)
fstp	st

loc_748D32:
cmp	dword ptr [ebx+3Ch], 0
lea	esi, [ebx+3Ch]
jz	loc_748E56
mov	edx, [esp+0C8h+var_94]
lea	eax, [ebx+50h]
lea	ecx, [esp+0C8h+var_84]
mov	[esp+0C8h+var_84], eax
mov	eax, [edx+0Ch]
push	ecx
push	eax
mov	ecx, esi
mov	byte ptr [esp+0D0h+var_80], 0
call	sub_7567F0
lea	ecx, [esp+0C8h+var_28]
call	sub_6FA2A0
fld1
mov	edi, [ebp+arg_4]
fstp	[esp+0C8h+var_B8]
mov	edx, [edi+0Ch]
xor	eax, eax
xor	ecx, ecx
test	edx, edx
jz	short loc_748D8E
fld	[ebp+arg_C]
mov	eax, edx
fld1
fdivrp	st(1), st
fstp	[esp+0C8h+var_B8]
jmp	short loc_748DA4

loc_748D8E:
cmp	[ebx+2Dh], al
jnz	short loc_748DA9
mov	edx, [edi+8]
lea	eax, [esp+0C8h+var_28]
mov	[esp+0C8h+var_24], edx

loc_748DA4:
mov	ecx, 1

loc_748DA9:
movzx	edx, byte ptr [ebx+2Dh]
fld	[esp+0C8h+var_B8]
push	edx		; char
mov	edx, [esi]
push	0		; float
push	ecx		; float
fstp	[esp+0D4h+var_D4]
push	edx		; int
push	0		; int
push	ecx		; int
mov	ecx, [ebx+24h]
push	eax		; int
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_746E90
lea	ecx, [esp+0C8h+var_28]
call	sub_6FA020
mov	al, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	20h

loc_748DE2:
mov	esi, [esp+0C8h+var_94]
fstp	st
mov	eax, [esi+0Ch]
mov	ecx, edx
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
call	edx
lea	eax, [ebx+10h]
mov	[esp+0C8h+var_60], eax
lea	eax, [esp+0C8h+var_60]
push	eax
mov	eax, [ebx+8]
mov	[esp+0CCh+var_5C], 0
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
mov	edx, [edx+6Ch]
push	1
shr	eax, 1
push	eax
mov	eax, [ebx+4]
push	eax
call	edx
xor	esi, esi
xor	edi, edi
cmp	[ebx+1Ch], esi
jbe	short loc_748E56
mov	eax, [ebx+18h]
jmp	short loc_748E30
align 10h

loc_748E30:
mov	eax, [eax+esi*4]
mov	ecx, [esp+0C8h+var_94]
mov	ecx, [ecx+0Ch]
mov	edx, [ecx]
mov	edx, [edx+7Ch]
shr	eax, 1
dec	eax
push	eax
mov	eax, edi
shr	eax, 1
push	eax
call	edx
mov	eax, [ebx+18h]
add	edi, [eax+esi*4]
inc	esi
cmp	esi, [ebx+1Ch]
jb	short loc_748E30

loc_748E56:
pop	edi
pop	esi
xor	al, al
pop	ebx
mov	esp, ebp
pop	ebp
retn	20h
sub_747B10 endp

align 4
off_748E64 dd offset loc_747C5C	; jump table for switch	statement
dd offset loc_747E3D
dd offset loc_747D79
dd offset loc_747E3D
dd offset loc_747CB2
dd offset loc_747E3D
dd offset loc_747C2A



sub_748E80 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 5Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+6Ch+arg_0]
xor	ebx, ebx
mov	[esi+70h], ebx
fld	dword ptr [edi+0Ch]
mov	eax, [edi]
mov	ecx, [eax+48h]
mov	ebp, [ecx+0Ch]
fstp	[esp+6Ch+var_30]
fld	dword ptr [edi+10h]
lea	edx, [esp+6Ch+var_18]
fstp	[esp+6Ch+var_2C]
push	edx
fld	dword ptr [edi+14h]
lea	ecx, [esp+70h+var_30]
fstp	[esp+70h+var_28]
mov	[esp+70h+var_50], ebp
fld	dword ptr [edi+18h]
fstp	[esp+70h+var_24]
fld	dword ptr [edi+1Ch]
fstp	[esp+70h+var_20]
fld	dword ptr [edi+20h]
fstp	[esp+70h+var_1C]
fld	dword ptr [esi+10h]
fstp	[esp+70h+arg_0]
fld	[esp+70h+arg_0]
fst	[esp+70h+var_18]
fldz
fst	[esp+70h+var_14]
fst	[esp+70h+var_10]
fst	[esp+70h+var_C]
fstp	[esp+70h+var_4]
fstp	[esp+70h+var_8]
call	sub_64EAF0
mov	eax, [ebp+0]
mov	edx, [eax+40h]
lea	ecx, [edi+24h]
push	ecx
mov	ecx, ebp
call	edx
cmp	dword ptr [edi+44h], 2
mov	[esp+6Ch+var_4C], bl
jg	short loc_748F23
fld	dword ptr [edi+3Ch]
fcomp	ds:dbl_1440CE0
fnstsw	ax
test	ah, 5
jp	short loc_748F28

loc_748F23:
mov	[esp+6Ch+var_4C], 1

loc_748F28:
mov	eax, [edi]
fld	dword ptr [eax+74h]
mov	byte ptr [esp+6Ch+arg_0], 1
fdivr	ds:dbl_15FCED0
mov	[esp+6Ch+var_44], ebx
mov	[esp+6Ch+var_58], ebx
mov	[esp+6Ch+var_54], ebx
fstp	[esp+6Ch+var_40]
cmp	[esi+54h], ebx
jbe	loc_749175

loc_748F51:
mov	ecx, [esi+50h]
mov	eax, [ebx+ecx+10h]
cmp	eax, 0FFFFFFFFh
jz	short loc_748F8C
mov	edx, [esi+68h]
imul	eax, 154h
add	eax, [edx]
lea	ecx, [esp+6Ch+var_30]
push	ecx
mov	ecx, [eax+14Ch]
lea	edx, [ecx+ecx*4]
mov	ecx, [edi+4]
lea	edx, [ecx+edx*8]
mov	ecx, [edi]
push	edx
push	ecx
mov	ecx, eax
call	sub_6A63A0
jmp	loc_749159

loc_748F8C:
cmp	byte ptr [esp+6Ch+arg_0], 0
jz	short loc_748FE2
cmp	dword ptr [esi+34h], 0
lea	ecx, [esi+34h]
lea	eax, [esi+48h]
mov	[esp+6Ch+var_38], eax
mov	byte ptr [esp+6Ch+var_34], 0
jz	short loc_748FB5
lea	edx, [esp+6Ch+var_38]
push	edx
push	ebp
call	sub_7567F0
jmp	short loc_748FCE

loc_748FB5:
cmp	ebp, [eax]
jnz	short loc_748FCE
mov	eax, [ebp+0]
mov	edx, [eax+6Ch]
lea	ecx, [esp+6Ch+var_38]
push	ecx
push	0
push	0
push	0
mov	ecx, ebp
call	edx

loc_748FCE:
mov	eax, [ebp+0]
mov	edx, [eax+38h]
lea	ecx, [esp+6Ch+var_30]
push	ecx
mov	ecx, ebp
call	edx
mov	byte ptr [esp+6Ch+arg_0], 0

loc_748FE2:
mov	eax, [esi+6Ch]
xor	ecx, ecx
mov	[esp+6Ch+var_48], ecx
cmp	eax, ecx
jz	short loc_748FF5
mov	eax, [eax]
mov	[esp+6Ch+var_48], eax

loc_748FF5:
mov	edx, [esi+50h]
mov	[esp+6Ch+var_5C], ecx
cmp	[ebx+edx], ecx
jbe	short loc_749073
mov	ebp, [esp+6Ch+var_58]
lea	ebp, [ebp+ebp*4+0]
add	ebp, ebp
add	ebp, ebp
add	ebp, ebp
nop

loc_749010:
mov	eax, [esp+6Ch+var_58]
cmp	eax, [esi+20h]
jnb	short loc_74906F
mov	eax, [edi+48h]
test	eax, eax
jz	short loc_749025
mov	ecx, [edi+4]
jmp	short loc_749027

loc_749025:
xor	ecx, ecx

loc_749027:
mov	edx, [esi+50h]
fld	dword ptr [esi+10h]
lea	eax, [ebx+edx]
movzx	edx, byte ptr [esi+15h]
push	edx		; char
push	[esp+70h+var_48] ; float
mov	edx, [eax+0Ch]
mov	eax, [eax+8]
push	ecx		; float
fstp	[esp+78h+var_78]
push	edx		; int
push	eax		; int
mov	eax, [edi+48h]
push	eax		; int
push	ecx		; int
mov	ecx, [edi]
push	ecx		; int
mov	ecx, [esi+1Ch]
add	ecx, ebp
call	sub_746E90
mov	eax, [esp+6Ch+var_5C]
mov	edx, [esi+50h]
inc	[esp+6Ch+var_58]
inc	eax
add	ebp, 28h
mov	[esp+6Ch+var_5C], eax
cmp	eax, [ebx+edx]
jb	short loc_749010

loc_74906F:
mov	ebp, [esp+6Ch+var_50]

loc_749073:
mov	eax, [esi+50h]
cmp	dword ptr [ebx+eax+4], 0
jz	loc_74915E
fld	[esp+6Ch+var_30]
mov	edx, [ebp+0]
fstp	[esp+6Ch+var_18]
mov	edx, [edx+38h]
fld	[esp+6Ch+var_2C]
lea	eax, [esp+6Ch+var_18]
fstp	[esp+6Ch+var_14]
push	eax
fld	[esp+70h+var_24]
mov	ecx, ebp
fstp	[esp+70h+var_C]
fld	[esp+70h+var_20]
fstp	[esp+70h+var_8]
fld	[esp+70h+var_28]
fld	[esp+70h+var_40]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+70h+var_10]
fadd	[esp+70h+var_1C]
fstp	[esp+70h+var_4]
call	edx
mov	eax, [esi+50h]
cmp	dword ptr [ebx+eax+4], 0
mov	[esp+6Ch+var_5C], 0
jbe	loc_749159
mov	ebp, [esp+6Ch+var_54]
imul	ebp, 58h

loc_7490E7:
mov	ecx, [esp+6Ch+var_54]
cmp	ecx, [esi+2Ch]
jnb	short loc_749155
mov	edx, [esi+28h]
fld	dword ptr [esi+8]
mov	eax, [edx+ebp]
lea	ecx, [edx+ebp]
mov	dl, [esi+17h]
mov	[esp+6Ch+var_3C], dl
mov	edx, dword ptr [esp+6Ch+arg_4]
push	edx		; char
mov	edx, dword ptr [esp+70h+var_4C]
push	edx		; char
mov	edx, dword ptr [esp+74h+var_3C]
push	edx		; char
sub	esp, 8
fstp	[esp+80h+var_7C]
lea	edx, [edi+0Ch]
fld	dword ptr [esi+0Ch]
lea	eax, [eax+eax*2]
fstp	[esp+80h+var_80]
push	edx		; int
mov	edx, [edi+8]
lea	eax, [edx+eax*8]
mov	edx, [edi]
push	eax		; float
push	edx		; int
call	sub_747B10
test	al, al
jz	short loc_74913C
inc	dword ptr [esi+70h]

loc_74913C:
mov	eax, [esp+6Ch+var_5C]
mov	ecx, [esi+50h]
inc	[esp+6Ch+var_54]
inc	eax
add	ebp, 58h
mov	[esp+6Ch+var_5C], eax
cmp	eax, [ebx+ecx+4]
jb	short loc_7490E7

loc_749155:
mov	ebp, [esp+6Ch+var_50]

loc_749159:
mov	byte ptr [esp+6Ch+arg_0], 1

loc_74915E:
mov	eax, [esp+6Ch+var_44]
inc	eax
add	ebx, 14h
mov	[esp+6Ch+var_44], eax
cmp	eax, [esi+54h]
jb	loc_748F51
xor	ebx, ebx

loc_749175:
mov	edx, [ebp+0]
mov	eax, [edx+6Ch]
push	ebx
push	ebx
push	ebx
push	ebx
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	eax, [edx+70h]
push	ebx
push	ebx
push	ebx
push	ebx
mov	ecx, ebp
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 5Ch
retn	8
sub_748E80 endp

align 10h



sub_7491A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	ebp, ecx
xor	edi, edi
cmp	[ebp+6Ch], edi
jnz	short loc_7491DE
mov	ecx, dword_1855FC0
lea	edx, [esp+14h+var_4]
push	edx
mov	[esp+18h+var_4], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0Ch
push	ebp
call	eax
cmp	eax, edi
jz	short loc_7491D9
mov	[eax], edi
mov	[eax+4], edi
mov	[eax+8], edi
jmp	short loc_7491DB

loc_7491D9:
xor	eax, eax

loc_7491DB:
mov	[ebp+6Ch], eax

loc_7491DE:
mov	esi, [esp+14h+arg_0]
mov	ecx, [esi+4]
push	ecx
mov	ecx, [ebp+6Ch]
call	sub_7475F0
xor	ebx, ebx
cmp	[esi+4], edi
jbe	short loc_74923E
xor	edx, edx
jmp	short loc_749200
align 10h

loc_749200:
mov	eax, [esi]
fld	dword ptr [edx+eax+10h]
lea	ecx, [edx+eax+10h]
mov	eax, [ebp+6Ch]
mov	eax, [eax]
fstp	dword ptr [eax+edi]
add	eax, edi
fld	dword ptr [ecx+4]
inc	ebx
fstp	dword ptr [eax+4]
add	edx, 28h
fld	dword ptr [ecx+8]
add	edi, 18h
fstp	dword ptr [eax+8]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+10h]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+14h]
cmp	ebx, [esi+4]
jb	short loc_749200

loc_74923E:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_7491A0 endp

align 10h



sub_749250 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	edi
mov	edi, [esp+8+arg_4]
xor	ebx, ebx
cmp	edi, ebx
jbe	short loc_7492C6
push	esi
mov	esi, [esp+0Ch+arg_0]
add	esi, 0Ch

loc_749264:
lea	eax, [esi-0Ch]
test	eax, eax
jz	short loc_7492BD
mov	[esi-8], ebx
mov	[esi-4], ebx
mov	[esi], ebx
push	ebx
mov	[esi+4], ebx
mov	[esi+8], ebx
push	ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
push	ebx
lea	ecx, [esi+30h]
mov	[esi+14h], ebx
call	sub_7569C0
fld	ds:flt_1440CC8
mov	[esi+44h], ebx
mov	[esi+48h], ebx
fstp	dword ptr [esi+1Ch]
fldz
mov	dword ptr [esi-0Ch], 0FFFFFFFFh
fst	dword ptr [esi+28h]
mov	[esi+18h], ebx
fstp	dword ptr [esi+2Ch]
mov	[esi+24h], bl
mov	[esi+20h], bl
mov	[esi+23h], bl
mov	[esi+21h], bl
mov	[esi+22h], bl

loc_7492BD:
add	esi, 58h
sub	edi, 1
jnz	short loc_749264
pop	esi

loc_7492C6:
pop	edi
pop	ebx
retn
sub_749250 endp

align 10h



sub_7492D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, ecx
xor	ebx, ebx
cmp	[ebp+68h], ebx
jnz	short loc_74930E
mov	ecx, dword_1855FC0
lea	edx, [esp+20h+var_18]
push	edx
mov	[esp+24h+var_18], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0Ch
push	ebp
call	eax
cmp	eax, ebx
jz	short loc_749309
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
jmp	short loc_74930B

loc_749309:
xor	eax, eax

loc_74930B:
mov	[ebp+68h], eax

loc_74930E:
push	esi
push	edi
mov	edi, [ebp+68h]
mov	ecx, [edi+4]
mov	esi, ecx
inc	esi
mov	[esp+28h+var_14], ebx
mov	[esp+28h+var_10], ebx
mov	[esp+28h+var_C], ebx
mov	[esp+28h+var_8], ebx
mov	[esp+28h+var_4], ecx
cmp	esi, ecx
jnb	short loc_74933D
mov	edx, [edi+8]
shr	edx, 1
cmp	esi, edx
jnb	short loc_749352
push	esi
jmp	short loc_74934A

loc_74933D:
cmp	esi, [edi+8]
jb	short loc_749352
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax

loc_74934A:
push	edi
mov	ecx, edi
call	sub_747500

loc_749352:
mov	ecx, [edi]
mov	[edi+4], esi
imul	esi, 154h
lea	ecx, [esi+ecx-154h]
pop	edi
pop	esi
cmp	ecx, ebx
jz	short loc_749374
mov	edx, [esp+20h+arg_0]
push	edx
call	sub_7473A0

loc_749374:
lea	eax, [esp+20h+var_14]
push	eax
lea	ecx, [ebp+50h]
call	sub_747490
cmp	[ebp+14h], bl
setz	cl
mov	[ebp+15h], cl
pop	ebp
pop	ebx
add	esp, 18h
retn	4
sub_7492D0 endp

align 10h



sub_7493A0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	edx, [ebx]
mov	ecx, eax
imul	ecx, 58h
push	esi
lea	esi, [ecx+edx-58h]
test	eax, eax
jbe	short loc_7493D0
push	edi
mov	edi, eax
lea	esp, [esp+0]

loc_7493C0:
mov	ecx, esi
call	sub_747A50
sub	esi, 58h
sub	edi, 1
jnz	short loc_7493C0
pop	edi

loc_7493D0:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [ebx]
mov	eax, [eax+30h]
push	edx
call	eax
pop	esi
pop	ebx
retn
sub_7493A0 endp

align 10h



sub_7493F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_749420
mov	eax, [edi]
test	eax, eax
jz	short loc_749415
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_749415:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_749420:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_749455
mov	edx, [ecx]
push	ebx
lea	ebx, [esi+esi*4]
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_749455:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, [esi+esi*4]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 83h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_7493F0 endp

align 10h



sub_749490 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_7494C0
mov	eax, [edi]
test	eax, eax
jz	short loc_7494B5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7494B5:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_7494C0:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_7494F1
mov	edx, [ecx]
push	ebx
mov	ebx, esi
imul	ebx, 58h
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_7494F1:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
imul	eax, 58h
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 84h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_749490 endp

align 10h



sub_749520 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_749561
mov	ecx, [edi]
sub	eax, esi
push	eax
lea	eax, [esi+esi*4]
lea	edx, [ecx+eax*8]
push	edx
call	sub_7479A0
mov	eax, [edi+8]
shr	eax, 1
add	esp, 8
cmp	esi, eax
jnb	short loc_749578
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_7493F0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_749561:
cmp	esi, [edi+8]
jb	short loc_749578
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_7493F0

loc_749578:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_749520 endp




sub_749580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_7495D4
mov	edx, [edi]
sub	eax, esi
lea	ecx, [eax+esi]
imul	ecx, 58h
push	ebx
lea	ebx, [ecx+edx-58h]
test	eax, eax
jbe	short loc_7495B5
push	ebp
mov	ebp, eax

loc_7495A5:
mov	ecx, ebx
call	sub_747A50
sub	ebx, 58h
sub	ebp, 1
jnz	short loc_7495A5
pop	ebp

loc_7495B5:
mov	eax, [edi+8]
shr	eax, 1
pop	ebx
cmp	esi, eax
jnb	short loc_7495EB
mov	ecx, [esp+8+arg_0]
push	esi
push	ecx
mov	ecx, edi
call	sub_749490
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_7495D4:
cmp	esi, [edi+8]
jb	short loc_7495EB
mov	eax, [esp+8+arg_0]
mov	edx, esi
shr	edx, 2
add	edx, esi
push	edx
push	eax
call	sub_749490

loc_7495EB:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_749580 endp

align 10h



sub_749600 proc	near
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+48h]
mov	dword ptr [esi], offset	off_1440CE8
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_74961D
mov	eax, [ecx]
mov	edx, [eax+74h]
push	1
push	edi
call	edx

loc_74961D:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
cmp	byte ptr [esi+5Dh], 6
jbe	short loc_749641
mov	eax, [esi+60h]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_749641:
mov	edi, [esi+68h]
test	edi, edi
jz	short loc_749666
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_749666:
mov	edi, [esi+6Ch]
test	edi, edi
jz	short loc_74968B
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_74968B:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+50h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+34h]
call	sub_756630
lea	ecx, [esi+28h]
call	sub_7493A0
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
push	eax
push	ecx
call	sub_7479A0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+1Ch]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
pop	edi
pop	esi
retn
sub_749600 endp




; int __stdcall	sub_7496D0(float, float, char, char)
sub_7496D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h

push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1440CE8
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
push	ebx
mov	[esi+24h], ebx
push	ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
push	ebx
lea	ecx, [esi+34h]
mov	[esi+30h], ebx
call	sub_7569C0
fld	[esp+8+arg_0]
mov	al, [esp+8+arg_8]
mov	cl, [esp+8+arg_C]
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
mov	[esi+58h], ebx
fstp	dword ptr [esi+4]
fld	[esp+8+arg_4]
mov	[esi+14h], al
fstp	dword ptr [esi+8]
mov	[esi+15h], bl
fld1
mov	[esi+16h], bl
fst	dword ptr [esi+0Ch]
mov	[esi+17h], bl
mov	[esi+19h], bl
fstp	dword ptr [esi+10h]
xor	eax, eax
mov	[esi+18h], cl
mov	[esi+5Ch], eax
mov	[esi+60h], eax
mov	[esi+64h], ebx
mov	[esi+68h], ebx
mov	[esi+6Ch], ebx
mov	[esi+70h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn	10h
sub_7496D0 endp

align 10h



sub_749760 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_749600
test	[esp+4+arg_0], 1
jz	short loc_74977D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_74977D:
mov	eax, esi
pop	esi
retn	4
sub_749760 endp

align 10h



; int __stdcall	sub_749790(int,	int, int, float, int)
sub_749790 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 28h
mov	eax, [esp+28h+arg_C]
push	ebx
xor	ebx, ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	[esp+38h+var_8], ebx
mov	[esp+38h+var_C], ebx
mov	[esp+38h+var_10], ebx
mov	[esp+38h+var_14], ebx
cmp	eax, ebx
jz	short loc_7497C6
mov	eax, [eax+68h]
mov	ebp, [eax+10h]
cmp	ebp, ebx
jz	short loc_7497C0
inc	dword ptr [ebp+4]

loc_7497C0:
mov	[esp+38h+var_28], ebp
jmp	short loc_7497F5

loc_7497C6:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	3B4h
call	eax
cmp	eax, ebx
jz	short loc_7497ED
mov	ecx, dword_1855FC0
push	ecx
mov	ecx, eax
call	sub_74A470
jmp	short loc_7497EF

loc_7497ED:
xor	eax, eax

loc_7497EF:
mov	ebp, eax
mov	[esp+38h+var_28], eax

loc_7497F5:
lea	esi, [ebp+0C4h]
mov	ecx, esi
call	sub_758EB0
mov	eax, [esp+38h+arg_0]
xor	edx, edx
cmp	[eax+44h], bl
push	1
setz	dl
push	eax
mov	[esi], edx
mov	byte ptr [ebp+0C8h], 1
movzx	ecx, byte ptr [edi+18h]
mov	[ebp+0C9h], cl
mov	dl, [edi+18h]
mov	[ebp+0CAh], dl
movzx	ecx, byte ptr [edi+18h]
mov	[ebp+0CBh], cl
mov	ecx, esi
call	sub_75E7E0
inc	dword ptr [ebp+3ACh]
cmp	dword ptr [ebp+1C8h], 0FFFEh
jbe	short loc_749861
mov	ecx, ebp
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	14h

loc_749861:
mov	ecx, esi
call	sub_759690
mov	ecx, [esp+38h+arg_10]
mov	eax, [ecx+20h]
shr	eax, 4
and	al, 1
test	byte ptr [ecx+14h], 10h
mov	byte ptr [esp+38h+arg_10], al
jz	loc_749AE9
mov	ecx, [ecx+1Ch]
test	ecx, 100h
jz	loc_749AE9
cmp	[edi+14h], bl
jnz	loc_749AE9
cmp	[edi+17h], bl
jz	short loc_7498B1
mov	edx, ecx
shr	edx, 0Ch
test	dl, 1
jz	short loc_7498B1
test	al, al
jz	loc_749AE9

loc_7498B1:
mov	edx, [esp+38h+arg_8]
shr	ecx, 9
test	cl, 1
jnz	short loc_7498D7
xor	eax, eax
cmp	edx, ebx
jbe	short loc_7498D7
mov	ecx, [esp+38h+arg_4]

loc_7498C7:
cmp	[ecx], bl
jnz	loc_749AE9
inc	eax
add	ecx, 28h
cmp	eax, edx
jb	short loc_7498C7

loc_7498D7:
lea	ebx, [ebp+398h]
mov	ecx, ebx
call	sub_756760
fld	dword ptr [edi+4]
fmul	ds:dbl_15FCE80
mov	eax, [esp+38h+arg_8]
push	0		; int
push	1		; int
push	ecx		; float
fstp	[esp+44h+var_24]
fld	[esp+44h+var_24]
mov	ecx, [esp+44h+arg_4]
fstp	[esp+44h+var_44]
push	eax		; int
push	ecx		; int
lea	eax, [ebp+0C4h]
lea	esi, [ebp+308h]
push	eax		; int
mov	ecx, esi
call	sub_75E810
mov	edx, [edi+34h]
mov	ecx, esi
mov	[esp+38h+var_24], edx
call	sub_75E9A0
add	eax, [esp+38h+var_24]
cmp	eax, 0FFFEh
ja	loc_749C30
mov	eax, [edi+40h]
mov	eax, [eax]
test	eax, eax
jz	short loc_749944
push	eax
jmp	short loc_749983

loc_749944:
cmp	byte ptr [esp+38h+arg_10], 0
mov	esi, 3
jz	short loc_74997C
cmp	byte ptr [edi+17h], 0
jnz	short loc_749973
mov	edx, [esp+38h+arg_8]
xor	eax, eax
test	edx, edx
jbe	short loc_74997C
mov	ecx, [esp+38h+arg_4]

loc_749964:
cmp	byte ptr [ecx],	0
jnz	short loc_749973
inc	eax
add	ecx, 28h
cmp	eax, edx
jb	short loc_749964
jmp	short loc_74997C

loc_749973:
mov	esi, 4
mov	byte ptr [edi+17h], 1

loc_74997C:
push	esi
lea	ebx, [ebp+398h]

loc_749983:
mov	ecx, ebx
call	sub_756A20
cmp	byte ptr [ebp+390h], 0
jz	short loc_7499BB
mov	ecx, [ebp+3A4h]
cmp	dword ptr [ecx], 3
jz	short loc_7499BB
fld	dword ptr [edi+0Ch]
push	ecx		; float
fstp	[esp+3Ch+var_3C]
lea	esi, [edi+1Ch]
push	esi		; int
push	ebx		; int
lea	ecx, [ebp+308h]
call	sub_75F190
mov	[esp+38h+arg_8], eax
jmp	short loc_749A1E

loc_7499BB:
mov	ebx, [edi+20h]
mov	edx, [edi+20h]
lea	esi, [edi+1Ch]
inc	ebx
push	ebx
push	esi
mov	ecx, esi
mov	[esp+40h+arg_8], edx
call	sub_749520
cmp	ebx, [esp+38h+arg_8]
jbe	short loc_7499F0
mov	eax, [esp+38h+arg_8]
mov	ecx, [esi]
sub	ebx, eax
lea	eax, [eax+eax*4]
lea	edx, [ecx+eax*8]
push	ebx
push	edx
call	sub_747A00
add	esp, 8

loc_7499F0:
mov	eax, [esi+4]
fld	dword ptr [edi+0Ch]
push	ecx		; float
mov	ecx, [esi]
fstp	[esp+3Ch+var_3C]
lea	eax, [eax+eax*4]
lea	edx, [ecx+eax*8-28h]
push	edx		; int
lea	eax, [ebp+398h]
push	eax		; int
lea	ecx, [ebp+308h]
mov	[esp+44h+arg_8], 1
call	sub_75EC60

loc_749A1E:
cmp	[esp+38h+arg_C], 0
jz	short loc_749A63
xor	edx, edx
mov	[esp+38h+arg_4], edx
cmp	[esp+38h+arg_8], edx
jbe	short loc_749A63

loc_749A31:
mov	eax, [esp+38h+arg_C]
mov	ecx, [eax+4Ch]
test	ecx, ecx
jz	short loc_749A58
mov	eax, [edi+20h]
mov	ebx, [esi]
sub	eax, edx
lea	edx, [eax+eax*4]
mov	eax, 0AAAAAAABh
mul	dword ptr [ebx+edx*8-10h]
shr	edx, 1
add	[ecx+0Ch], edx
mov	edx, [esp+38h+arg_4]

loc_749A58:
inc	edx
mov	[esp+38h+arg_4], edx
cmp	edx, [esp+38h+arg_8]
jb	short loc_749A31

loc_749A63:
mov	ecx, [ebp+398h]
mov	edx, [edi+34h]
lea	eax, [ebp+398h]
lea	ebx, [edi+34h]
mov	[esp+38h+arg_4], eax
lea	eax, [ecx+edx]
cmp	eax, 0FFFEh
jbe	short loc_749AB1
mov	ebx, [edi+20h]
sub	ebx, [esp+38h+arg_8]
mov	ebp, [esi+4]
push	ebx
push	esi
mov	ecx, esi
call	sub_749520
cmp	ebx, ebp
jbe	short loc_749AE9
mov	edx, [esi]
lea	ecx, [ebp+ebp*4+0]
sub	ebx, ebp
lea	eax, [edx+ecx*8]
push	ebx
push	eax
call	sub_747A00
add	esp, 8
jmp	short loc_749AE9

loc_749AB1:
mov	[esp+38h+var_C], edx
mov	edx, [edi+40h]
cmp	dword ptr [edx], 0
mov	[esp+38h+var_8], ecx
mov	ecx, [esp+38h+arg_8]
mov	[esp+38h+var_14], ecx
jnz	short loc_749AD9
mov	eax, [ebp+3A4h]
mov	ecx, [eax]
push	ecx
mov	ecx, ebx
call	sub_756A20

loc_749AD9:
mov	edx, [esp+38h+arg_4]
push	edx
mov	ecx, ebx
call	sub_756780
mov	byte ptr [edi+15h], 1

loc_749AE9:
cmp	byte ptr [edi+15h], 0
jnz	loc_749CC7
mov	eax, [esp+38h+var_28]
mov	ecx, [edi+40h]
cmp	dword ptr [ecx], 0
mov	esi, [edi+34h]
mov	ebx, [eax+1C8h]
lea	ebp, [edi+34h]
mov	[esp+38h+var_C], esi
mov	[esp+38h+var_8], ebx
jnz	short loc_749B1C
push	1
mov	ecx, ebp
call	sub_756A20

loc_749B1C:
add	esi, ebx
push	esi
mov	ecx, ebp
call	sub_756650
cmp	[ebp+0], esi
jnz	loc_749EAD
xor	esi, esi
test	ebx, ebx
jbe	short loc_749BA6
jmp	short loc_749B40
align 10h

loc_749B40:
mov	eax, [esp+38h+var_28]
mov	ecx, [eax+1D4h]
mov	edx, esi
shr	edx, 0Ah
mov	ecx, [ecx+edx*4]
mov	eax, esi
and	eax, 3FFh
fld	dword ptr [ecx+eax*8+4]
lea	edx, [ecx+eax*8]
fmul	dword ptr [edi+0Ch]
mov	ecx, [ebp+0Ch]
mov	eax, [esp+38h+var_C]
add	eax, esi
imul	eax, [ecx+4]
fstp	[esp+38h+arg_8]
fld	[esp+38h+arg_8]
mov	ecx, [ecx+8]
add	eax, [ebp+8]
mov	ebx, [ecx]
push	0
sub	esp, 8
fstp	[esp+44h+var_40]
fld	dword ptr [edi+0Ch]
fmul	dword ptr [edx]
mov	edx, [ebx+4]
fstp	[esp+44h+arg_8]
fld	[esp+44h+arg_8]
fstp	[esp+44h+var_44]
push	eax
call	edx
inc	esi
cmp	esi, [esp+38h+var_8]
jb	short loc_749B40

loc_749BA6:
mov	eax, [esp+38h+var_28]
xor	ebx, ebx
mov	[esp+38h+arg_8], ebx
cmp	[eax+218h], ebx
jbe	loc_749CC7
lea	ebp, [edi+1Ch]
nop

loc_749BC0:
mov	ecx, [esp+38h+var_28]
mov	esi, [ecx+224h]
mov	edx, ebx
mov	eax, ebx
shr	edx, 6
mov	edx, [esi+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
mov	esi, [edx+eax*8+10h]
dec	esi
push	ebx
add	ecx, 0C4h
mov	[esp+3Ch+arg_4], esi
call	sub_75D6B0
test	ebx, ebx
jz	short loc_749C02
mov	eax, [ebp+4]
mov	ecx, [ebp+0]
lea	eax, [eax+eax*4]
cmp	[ecx+eax*8-24h], esi
jz	short loc_749C76

loc_749C02:
mov	esi, [edi+20h]
mov	ebx, [ebp+4]
inc	esi
cmp	esi, ebx
jnb	short loc_749C39
mov	ecx, [ebp+0]
mov	edx, ebx
sub	edx, esi
push	edx
lea	eax, [esi+esi*4]
lea	edx, [ecx+eax*8]
push	edx
call	sub_7479A0
mov	eax, [ebp+8]
shr	eax, 1
add	esp, 8
cmp	esi, eax
jnb	short loc_749C4E
push	esi
jmp	short loc_749C46

loc_749C30:
mov	byte ptr [edi+16h], 1
jmp	loc_749AE9

loc_749C39:
cmp	esi, [ebp+8]
jb	short loc_749C4E
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_749C46:
push	ebp
mov	ecx, ebp
call	sub_7493F0

loc_749C4E:
mov	[ebp+4], esi
cmp	esi, ebx
jbe	short loc_749C6A
mov	eax, [ebp+0]
lea	edx, [ebx+ebx*4]
sub	esi, ebx
lea	ecx, [eax+edx*8]
push	esi
push	ecx
call	sub_747A00
add	esp, 8

loc_749C6A:
inc	[esp+38h+var_14]
mov	ebx, [esp+38h+arg_8]
mov	esi, [esp+38h+arg_4]

loc_749C76:
mov	eax, [esp+38h+var_28]
add	eax, 0C4h
push	eax
mov	eax, [ebp+4]
lea	edx, [eax+eax*4]
mov	eax, [ebp+0]
push	esi
lea	ecx, [eax+edx*8-28h]
call	sub_747720
cmp	[esp+38h+arg_C], 0
jz	short loc_749CB2
mov	ecx, [esp+38h+arg_C]
mov	eax, [ecx+4Ch]
test	eax, eax
jz	short loc_749CB2
mov	edx, [esp+38h+var_28]
mov	ecx, [edx+248h]
add	[eax+0Ch], ecx

loc_749CB2:
mov	edx, [esp+38h+var_28]
inc	ebx
mov	[esp+38h+arg_8], ebx
cmp	ebx, [edx+218h]
jb	loc_749BC0

loc_749CC7:
mov	esi, [esp+38h+arg_0]
mov	eax, [esi+18h]
mov	ecx, eax
shr	ecx, 2
add	ecx, eax
push	ecx
lea	edx, [esp+3Ch+var_20]
xor	ebx, ebx
push	edx
mov	ecx, edx
mov	[esp+40h+var_20], ebx
mov	[esp+40h+var_1C], ebx
mov	[esp+40h+var_18], ebx
call	sub_747320
mov	ecx, [esp+38h+var_20]
xor	eax, eax
cmp	[esi+18h], ebx
jbe	short loc_749D0A
jmp	short loc_749D00
align 10h

loc_749D00:
mov	byte ptr [ecx+eax], 0
inc	eax
cmp	eax, [esi+18h]
jb	short loc_749D00

loc_749D0A:
mov	[esp+38h+arg_8], ebx
cmp	[esi+18h], ebx
jbe	loc_749E3D

loc_749D17:
mov	eax, [esp+38h+arg_8]
mov	ecx, [esp+38h+var_20]
inc	eax
cmp	byte ptr [eax+ecx-1], 0
mov	[esp+38h+arg_4], eax
jnz	loc_749E28
mov	eax, [esp+38h+arg_8]
mov	ecx, [esp+38h+arg_0]
mov	ecx, [ecx+24h]
mov	edx, eax
and	eax, 3Fh
shr	edx, 6
mov	ecx, [ecx+edx*4]
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*8+14h], 0
lea	eax, [ecx+eax*8]
mov	[esp+38h+arg_C], eax
jl	loc_749E28
mov	edx, eax
cmp	dword ptr [edx+4], 1
jbe	loc_749E28
mov	esi, [edi+2Ch]
mov	ebx, [edi+2Ch]
inc	esi
lea	ebp, [edi+28h]
push	esi
push	ebp
mov	ecx, ebp
call	sub_749580
cmp	esi, ebx
jbe	short loc_749D8F
sub	esi, ebx
imul	ebx, 58h
add	ebx, [ebp+0]
push	esi
push	ebx
call	sub_749250
add	esp, 8

loc_749D8F:
mov	eax, [ebp+4]
mov	ecx, [ebp+0]
imul	eax, 58h
mov	dl, [edi+14h]
mov	ebx, [esp+38h+arg_0]
inc	[esp+38h+var_10]
mov	[eax+ecx-2Ch], dl
mov	eax, [esp+38h+arg_8]
fld	dword ptr [edi+0Ch]
mov	edx, [ebp+0]
push	ecx		; float
mov	ecx, [ebp+4]
imul	ecx, 58h
fstp	[esp+3Ch+var_3C]
push	eax		; int
push	ebx		; int
lea	ecx, [ecx+edx-58h]
call	sub_747860
mov	esi, [esp+38h+arg_4]
cmp	esi, [ebx+18h]
jnb	short loc_749E28
nop

loc_749DD0:
mov	edx, [ebx+24h]
mov	ecx, esi
shr	ecx, 6
mov	ecx, [edx+ecx*4]
mov	eax, esi
and	eax, 3Fh
lea	eax, [eax+eax*2]
mov	edx, [ecx+eax*8+14h]
lea	eax, [ecx+eax*8]
mov	ecx, [esp+38h+arg_C]
cmp	edx, [ecx+14h]
jnz	short loc_749E22
mov	edx, [esp+38h+var_20]
mov	byte ptr [edx+esi], 1
cmp	dword ptr [eax+14h], 0
jl	short loc_749E22
cmp	dword ptr [eax+4], 1
jbe	short loc_749E22
mov	eax, [ebp+4]
fld	dword ptr [edi+0Ch]
imul	eax, 58h
push	ecx		; float
mov	ecx, [ebp+0]
lea	ecx, [eax+ecx-58h]
fstp	[esp+3Ch+var_3C]
push	esi		; int
push	ebx		; int
call	sub_747860

loc_749E22:
inc	esi
cmp	esi, [ebx+18h]
jb	short loc_749DD0

loc_749E28:
mov	eax, [esp+38h+arg_4]
mov	edx, [esp+38h+arg_0]
mov	[esp+38h+arg_8], eax
cmp	eax, [edx+18h]
jb	loc_749D17

loc_749E3D:
mov	esi, [edi+54h]
add	edi, 50h
inc	esi
cmp	esi, [edi+4]
jnb	short loc_749E55
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_749E6A
push	esi
jmp	short loc_749E62

loc_749E55:
cmp	esi, [edi+8]
jb	short loc_749E6A
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_749E62:
push	edi
mov	ecx, edi
call	sub_747290

loc_749E6A:
mov	eax, [edi]
lea	edx, [esi+esi*4]
lea	eax, [eax+edx*4-14h]
mov	[edi+4], esi
test	eax, eax
jz	short loc_749E9B
mov	ecx, [esp+38h+var_14]
mov	edx, [esp+38h+var_10]
mov	[eax], ecx
mov	ecx, [esp+38h+var_C]
mov	[eax+4], edx
mov	edx, [esp+38h+var_8]
mov	[eax+8], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+0Ch], edx
mov	[eax+10h], ecx

loc_749E9B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+38h+var_20]
mov	eax, [eax+30h]
push	edx
call	eax

loc_749EAD:
mov	ecx, [esp+38h+var_28]
call	sub_64A400
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn	14h
sub_749790 endp




sub_749EC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+2ECh]
add	eax, [esi+2DCh]
mov	ecx, [esi+2C8h]
mov	ebx, [esi+0B4h]
push	edi
lea	edi, [ecx+eax*4]
lea	edi, [edi+edi*2]
shl	edi, 6
add	edi, [esi+2F0h]
lea	ebx, [ebx+ebx*2]
add	edi, [esi+2E0h]
shl	ebx, 6
add	ebx, [esi+0B8h]
add	edi, [esi+2CCh]
add	ebx, ebx
add	edi, edi
lea	ecx, [esi+308h]
add	ebx, ebx
add	edi, edi
call	sub_765230
mov	edx, [esi+3A4h]
mov	[esp+18h+var_4], eax
mov	eax, [edx+4]
imul	eax, [esi+39Ch]
lea	ecx, [esi+0C4h]
mov	[esp+18h+var_8], eax
call	sub_758D90
lea	ecx, [esi+50h]
mov	ebp, eax
call	sub_709380
lea	ecx, [esi+8]
add	ebp, eax
call	sub_709380
add	eax, ebp
add	eax, [esp+18h+var_8]
add	eax, [esp+18h+var_4]
add	eax, edi
pop	edi
pop	esi
pop	ebp
add	eax, ebx
pop	ebx
add	esp, 8
retn
sub_749EC0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_706000

loc_749F70:
push	esi
mov	esi, ecx
push	edi
lea	ecx, [esi+8]
call	sub_709330
lea	ecx, [esi+50h]
call	sub_709330
lea	edi, [esi+0B0h]
mov	ecx, edi
call	sub_74CD90
mov	byte ptr [edi+10h], 0
lea	edi, [esi+2C4h]
mov	ecx, edi
call	sub_74CD90
lea	ecx, [esi+2D8h]
mov	byte ptr [edi+10h], 0
call	sub_74CD90
lea	ecx, [esi+2E8h]
call	sub_74CD90
lea	ecx, [esi+308h]
call	sub_765270
lea	ecx, [esi+0C4h]
call	sub_759440
add	esi, 398h
push	0
mov	ecx, esi
call	sub_756650
push	1
push	0
mov	ecx, esi
call	sub_7566D0
pop	edi
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_706000
align 10h



sub_749FF0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+1B4h]
call	sub_74CD90
lea	ecx, [esi+1A4h]
call	sub_74CD90
lea	ecx, [esi+194h]
call	sub_74CD90
lea	ecx, [esi+184h]
call	sub_74CD90
lea	ecx, [esi+174h]
call	sub_74CD90
lea	ecx, [esi+164h]
call	sub_74CD90
lea	ecx, [esi+154h]
call	sub_74CD90
lea	ecx, [esi+144h]
call	sub_74CD90
lea	ecx, [esi+134h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+128h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+11Ch]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+104h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0F8h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0CCh]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+0BCh]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0B0h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0A4h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+98h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+8Ch]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+7Ch]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+70h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+60h]
call	sub_74CD90
lea	ecx, [esi+50h]
call	sub_74CD90
lea	ecx, [esi+40h]
call	sub_74CD90
lea	ecx, [esi+30h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+24h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+18h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0Ch]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
retn
sub_749FF0 endp

align 10h



sub_74A180 proc	near
fld	ds:flt_15AACC4
mov	eax, ecx
fstp	dword ptr [eax+0Ch]
mov	dword ptr [eax], 3
fldz
mov	ecx, 2
fst	dword ptr [eax+18h]
mov	[eax+4], ecx
fstp	dword ptr [eax+1Ch]
mov	[eax+8], ecx
fld	ds:flt_15AAEF8
xor	ecx, ecx
fst	dword ptr [eax+20h]
mov	[eax+10h], ecx
fstp	dword ptr [eax+24h]
mov	[eax+14h], ecx
fld1
fstp	dword ptr [eax+28h]
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], cl
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
mov	[eax+54h], ecx
mov	[eax+58h], ecx
mov	[eax+5Ch], ecx
retn
sub_74A180 endp

align 10h



sub_74A1F0 proc	near
mov	eax, ecx
fld	ds:flt_1440CF4
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+8], cl
mov	dl, 1
mov	[eax+4], dl
mov	[eax+5], dl
mov	[eax+6], dl
mov	[eax+7], dl
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
mov	[eax+54h], ecx
mov	[eax+58h], ecx
mov	[eax+5Ch], ecx
mov	[eax+60h], ecx
mov	[eax+64h], ecx
mov	[eax+68h], ecx
mov	[eax+6Ch], ecx
mov	[eax+70h], ecx
mov	[eax+74h], ecx
mov	[eax+78h], ecx
mov	[eax+7Ch], ecx
mov	[eax+80h], ecx
mov	[eax+84h], ecx
mov	[eax+88h], ecx
mov	[eax+8Ch], ecx
mov	[eax+90h], ecx
mov	[eax+94h], ecx
mov	[eax+98h], ecx
mov	[eax+9Ch], ecx
mov	[eax+0A0h], ecx
mov	[eax+0A4h], ecx
mov	[eax+0A8h], ecx
mov	[eax+0ACh], ecx
mov	[eax+0B0h], ecx
mov	[eax+0B4h], ecx
mov	[eax+0B8h], ecx
mov	[eax+0BCh], ecx
mov	[eax+0C0h], ecx
mov	[eax+0C4h], ecx
mov	[eax+0C8h], ecx
mov	[eax+0CCh], ecx
mov	[eax+0D0h], ecx
mov	[eax+0D4h], ecx
fst	dword ptr [eax+0E0h]
fstp	dword ptr [eax+0E4h]
mov	dword ptr [eax+0D8h], 3FFFFFFFh
fld	ds:flt_1440CF0
mov	[eax+0DCh], ecx
fst	dword ptr [eax+0E8h]
fstp	dword ptr [eax+0ECh]
fldz
fst	dword ptr [eax+0F0h]
fstp	dword ptr [eax+0F4h]
mov	[eax+0F8h], ecx
mov	[eax+0FCh], ecx
mov	[eax+100h], ecx
mov	[eax+104h], ecx
mov	[eax+108h], ecx
mov	[eax+10Ch], ecx
mov	[eax+110h], ecx
mov	[eax+11Ch], ecx
mov	[eax+120h], ecx
mov	[eax+124h], ecx
mov	[eax+128h], ecx
mov	[eax+12Ch], ecx
mov	[eax+130h], ecx
mov	[eax+134h], ecx
mov	[eax+138h], ecx
mov	[eax+13Ch], ecx
mov	[eax+140h], ecx
mov	[eax+144h], ecx
mov	[eax+148h], ecx
mov	[eax+14Ch], ecx
mov	[eax+150h], ecx
mov	[eax+154h], ecx
mov	[eax+158h], ecx
mov	[eax+15Ch], ecx
mov	[eax+160h], ecx
mov	[eax+164h], ecx
mov	[eax+168h], ecx
mov	[eax+16Ch], ecx
mov	[eax+170h], ecx
mov	[eax+174h], ecx
mov	[eax+178h], ecx
mov	[eax+17Ch], ecx
mov	[eax+180h], ecx
mov	[eax+184h], ecx
mov	[eax+188h], ecx
mov	[eax+18Ch], ecx
mov	[eax+190h], ecx
mov	[eax+194h], ecx
mov	[eax+198h], ecx
mov	[eax+19Ch], ecx
mov	[eax+1A0h], ecx
mov	[eax+1A4h], ecx
mov	[eax+1A8h], ecx
mov	[eax+1ACh], ecx
mov	[eax+1B0h], ecx
mov	[eax+1B4h], ecx
mov	[eax+1B8h], ecx
mov	[eax+1BCh], ecx
mov	[eax+1C0h], ecx
mov	[eax+1C4h], ecx
mov	[eax+1C8h], ecx
mov	[eax+1CCh], ecx
mov	[eax+1D0h], ecx
retn
sub_74A1F0 endp

align 10h



sub_74A470 proc	near

arg_0= dword ptr  4

fld1
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1440CF8
fst	dword ptr [esi+8]
fld	ds:flt_143F788
mov	ecx, 7FFFFFFFh
fst	dword ptr [esi+0Ch]
mov	[esi+10h], ebx
mov	[esi+14h], ebx
fxch	st(1)
mov	[esi+18h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
fst	dword ptr [esi+3Ch]
fst	dword ptr [esi+40h]
mov	[esi+34h], ecx
fldz
mov	[esi+30h], ebx
fst	dword ptr [esi+44h]
mov	[esi+4Ch], bl
fst	dword ptr [esi+48h]
mov	eax, 80000001h
mov	[esi+38h], eax
fxch	st(1)
fst	dword ptr [esi+50h]
fxch	st(2)
fstp	dword ptr [esi+54h]
mov	[esi+58h], ebx
fxch	st(1)
mov	[esi+5Ch], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ebx
mov	[esi+68h], ebx
mov	[esi+6Ch], ebx
mov	[esi+70h], ebx
mov	[esi+74h], ebx
fst	dword ptr [esi+84h]
fst	dword ptr [esi+88h]
mov	[esi+7Ch], ecx
mov	[esi+80h], eax
fxch	st(1)
fst	dword ptr [esi+8Ch]
mov	[esi+78h], ebx
fstp	dword ptr [esi+90h]
mov	[esi+94h], bl
mov	dword ptr [esi+0A0h], 3
fst	dword ptr [esi+98h]
mov	eax, 2
fstp	dword ptr [esi+9Ch]
mov	[esi+0A4h], eax
fld	ds:flt_15AACC4
mov	[esi+0A8h], eax
fstp	dword ptr [esi+0ACh]
lea	ecx, [esi+0C4h]
mov	[esi+0B0h], ebx
mov	[esi+0B4h], ebx
mov	[esi+0B8h], ebx
mov	[esi+0BCh], ebx
mov	[esi+0C0h], bl
call	sub_74A1F0
lea	ecx, [esi+298h]
call	sub_74A180
lea	ecx, [esi+308h]
call	sub_75EA70
mov	eax, [esp+8+arg_0]
push	ebx
push	ebx
push	eax
lea	ecx, [esi+398h]
call	sub_7569C0
mov	[esi+3ACh], ebx
mov	dword ptr [esi+3B0h], 40000h
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_74A470 endp




sub_74A5C0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+398h]
call	sub_756630
lea	ecx, [esi+308h]
call	sub_75EAA0
lea	ecx, [esi+2E8h]
call	sub_74CD90
lea	ecx, [esi+2D8h]
call	sub_74CD90
lea	ecx, [esi+2C4h]
call	sub_74CD90
lea	ecx, [esi+0C4h]
call	sub_749FF0
lea	ecx, [esi+0B0h]
call	sub_74CD90
lea	ecx, [esi+68h]
call	sub_74CD90
lea	ecx, [esi+58h]
call	sub_74CD90
lea	ecx, [esi+20h]
call	sub_74CD90
lea	ecx, [esi+10h]
call	sub_74CD90
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_74A5C0 endp

align 10h



sub_74A640 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_74A5C0
test	[esp+4+arg_0], 1
jz	short loc_74A65D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_74A65D:
mov	eax, esi
pop	esi
retn	4
sub_74A640 endp

align 10h



sub_74A670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_0]
add	eax, ecx
not	ecx
and	eax, ecx
retn
sub_74A670 endp

align 10h



sub_74A680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
push	edi
test	eax, eax
jz	short loc_74A6CD
mov	edi, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_4]
mov	esi, edi
not	esi
shl	edx, 4
jmp	short loc_74A6A0
align 10h

loc_74A6A0:
mov	ecx, [eax+4]
mov	ebp, [eax]
mov	ebx, ecx
and	ebx, 0Fh
and	ebp, 0Fh
shl	ebx, 4
or	ebx, ebp
lea	ebp, [eax+edi]
shl	ebx, 4
and	ebp, esi
add	ebx, eax
add	ebp, edx
cmp	ebp, ebx
jbe	short loc_74A6CF
and	ecx, 0FFFFFFF0h
mov	eax, ecx
cmp	eax, [esp+10h+arg_0]
jnz	short loc_74A6A0

loc_74A6CD:
xor	eax, eax

loc_74A6CF:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_74A680 endp

align 10h



sub_74A6E0 proc	near
push	esi
mov	esi, ecx
push	80h		; size_t
lea	eax, [esi+4]
push	0		; int
push	eax		; void *
mov	dword ptr [esi], 0
call	_memset
add	esp, 0Ch
mov	eax, esi
pop	esi
retn
sub_74A6E0 endp




sub_74A700 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
dec	eax
push	edi
mov	esi, ecx
cmp	eax, 1Fh
jb	short loc_74A713
mov	eax, 1Fh

loc_74A713:
mov	edx, [esi]
mov	ecx, eax
shr	edx, cl
xor	edi, edi
cmp	edx, edi
jz	loc_74A7FF
movzx	ecx, dx
test	ecx, ecx
jz	short loc_74A750
mov	ecx, edx
and	ecx, 0FFh
jz	short loc_74A73C
mov	dl, ds:byte_1441340[ecx]
jmp	short loc_74A778

loc_74A73C:
shr	edx, 8
and	edx, 0FFh
mov	dl, ds:byte_1441340[edx]
add	dl, 8
jmp	short loc_74A778

loc_74A750:
test	edx, 0FF0000h
jz	short loc_74A76C
shr	edx, 10h
and	edx, 0FFh
mov	dl, ds:byte_1441340[edx]
add	dl, 10h
jmp	short loc_74A778

loc_74A76C:
shr	edx, 18h
mov	dl, ds:byte_1441340[edx]
add	dl, 18h

loc_74A778:
movzx	ecx, dl
add	ecx, eax
mov	eax, [esi+ecx*4+4]
mov	edx, [eax+4]
cmp	eax, eax
jz	short loc_74A7AF
mov	ecx, [eax]
and	ecx, 0FFFFFFF0h
xor	edx, [ecx+4]
pop	edi
and	edx, 0Fh
xor	edx, [eax+4]
pop	esi
mov	[ecx+4], edx
mov	ecx, [eax+4]
and	ecx, 0FFFFFFF0h
mov	edx, [ecx]
xor	edx, [eax]
and	edx, 0Fh
xor	edx, [eax]
mov	[ecx], edx
retn	4

loc_74A7AF:
push	ebx
mov	ebx, edx
and	ebx, 0FFFFFFF0h
cmp	eax, ebx
pop	ebx
jz	short loc_74A7EB
and	edx, 0FFFFFFF0h
mov	[esi+ecx*4+4], edx
mov	ecx, [eax]
mov	edx, [eax+4]
and	ecx, 0FFFFFFF0h
xor	edx, [ecx+4]
pop	edi
and	edx, 0Fh
xor	edx, [eax+4]
pop	esi
mov	[ecx+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
and	ecx, 0FFFFFFF0h
xor	edx, [ecx]
and	edx, 0Fh
xor	edx, [eax]
mov	[ecx], edx
retn	4

loc_74A7EB:
mov	edx, 1
shl	edx, cl
mov	[esi+ecx*4+4], edi
pop	edi
not	edx
and	[esi], edx
pop	esi
retn	4

loc_74A7FF:
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_74A700 endp

align 10h



sub_74A810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
dec	eax
push	edi
mov	edi, ecx
mov	ecx, eax
cmp	eax, 1Fh
jb	short loc_74A824
mov	ecx, 1Fh

loc_74A824:
mov	edx, [edi]
shr	edx, cl
xor	eax, eax
test	edx, edx
jz	loc_74A91A
movzx	eax, dx
push	esi
test	eax, eax
jz	short loc_74A860
mov	esi, edx
and	esi, 0FFh
jz	short loc_74A84C
mov	dl, ds:byte_1441340[esi]
jmp	short loc_74A888

loc_74A84C:
shr	edx, 8
and	edx, 0FFh
mov	dl, ds:byte_1441340[edx]
add	dl, 8
jmp	short loc_74A888

loc_74A860:
test	edx, 0FF0000h
jz	short loc_74A87C
shr	edx, 10h
and	edx, 0FFh
mov	dl, ds:byte_1441340[edx]
add	dl, 10h
jmp	short loc_74A888

loc_74A87C:
shr	edx, 18h
mov	dl, ds:byte_1441340[edx]
add	dl, 18h

loc_74A888:
movzx	esi, dl
push	ebx
add	esi, ecx
push	ebp
mov	ebp, [esp+10h+arg_4]
lea	ebx, [edi+esi*4+4]

loc_74A897:
mov	ecx, [esp+10h+arg_0]
mov	edx, [ebx]
push	ebp
push	ecx
push	edx
mov	ecx, edi
call	sub_74A680
test	eax, eax
jnz	short loc_74A8BB
inc	esi
add	ebx, 4
cmp	esi, 20h
jb	short loc_74A897
pop	ebp
pop	ebx
pop	esi
pop	edi
retn	8

loc_74A8BB:
mov	edx, [edi+esi*4+4]
cmp	eax, edx
jnz	short loc_74A8D6
mov	ecx, [edx+4]
mov	ebx, ecx
and	ebx, 0FFFFFFF0h
cmp	edx, ebx
jz	short loc_74A902
and	ecx, 0FFFFFFF0h
mov	[edi+esi*4+4], ecx

loc_74A8D6:
mov	ecx, [eax]
mov	edx, [eax+4]
and	ecx, 0FFFFFFF0h
xor	edx, [ecx+4]
pop	ebp
and	edx, 0Fh
xor	edx, [eax+4]
pop	ebx
mov	[ecx+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
and	ecx, 0FFFFFFF0h
xor	edx, [ecx]
pop	esi
and	edx, 0Fh
xor	edx, [eax]
pop	edi
mov	[ecx], edx
retn	8

loc_74A902:
mov	ecx, esi
mov	edx, 1
shl	edx, cl
pop	ebp
mov	dword ptr [edi+esi*4+4], 0
pop	ebx
not	edx
and	[edi], edx
pop	esi

loc_74A91A:
pop	edi
retn	8
sub_74A810 endp

align 10h



sub_74A920 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
push	ebx
push	esi
push	edi
mov	edi, [eax+4]
mov	ebx, ecx
and	edi, 0Fh
mov	ecx, edi
shl	ecx, 4
and	edx, 0Fh
or	ecx, edx
dec	ecx
cmp	ecx, 1Fh
jb	short loc_74A946
mov	ecx, 1Fh

loc_74A946:
mov	esi, [ebx+ecx*4+4]
test	esi, esi
jz	short loc_74A98A
or	edx, esi
mov	[eax], edx
mov	edx, [esi+4]
and	edx, 0FFFFFFF0h
or	edx, edi
mov	[eax+4], edx
mov	edx, [esi+4]
and	edx, 0FFFFFFF0h
mov	edi, [edx]
and	edi, 0Fh
or	edi, eax
mov	[edx], edi
mov	edx, [esi+4]
and	edx, 0Fh
or	edx, eax
mov	[esi+4], edx
mov	[ebx+ecx*4+4], eax
mov	eax, 1
shl	eax, cl
pop	edi
pop	esi
or	[ebx], eax
pop	ebx
retn	4

loc_74A98A:
or	edi, eax
or	edx, eax
mov	[eax+4], edi
mov	[eax], edx
mov	[ebx+ecx*4+4], eax
mov	eax, 1
shl	eax, cl
pop	edi
pop	esi
or	[ebx], eax
pop	ebx
retn	4
sub_74A920 endp

align 10h



sub_74A9B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
push	esi
mov	esi, ecx
mov	ecx, [eax+4]
and	ecx, 0Fh
push	edi
shl	ecx, 4
mov	edi, edx
and	edi, 0Fh
or	ecx, edi
dec	ecx
cmp	ecx, 1Fh
jb	short loc_74A9D5
mov	ecx, 1Fh

loc_74A9D5:
mov	edi, [esi+ecx*4+4]
cmp	eax, edi
jz	short loc_74AA05
mov	ecx, [eax+4]
and	edx, 0FFFFFFF0h
xor	ecx, [edx+4]
pop	edi
and	ecx, 0Fh
xor	ecx, [eax+4]
pop	esi
mov	[edx+4], ecx
mov	ecx, [eax+4]
and	ecx, 0FFFFFFF0h
mov	edx, [ecx]
xor	edx, [eax]
and	edx, 0Fh
xor	edx, [eax]
mov	[ecx], edx
retn	4

loc_74AA05:
mov	edx, [edi+4]
push	ebx
mov	ebx, edx
and	ebx, 0FFFFFFF0h
cmp	edi, ebx
pop	ebx
jz	short loc_74AA44
and	edx, 0FFFFFFF0h
mov	[esi+ecx*4+4], edx
mov	ecx, [eax]
mov	edx, [eax+4]
and	ecx, 0FFFFFFF0h
xor	edx, [ecx+4]
pop	edi
and	edx, 0Fh
xor	edx, [eax+4]
pop	esi
mov	[ecx+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
and	ecx, 0FFFFFFF0h
xor	edx, [ecx]
and	edx, 0Fh
xor	edx, [eax]
mov	[ecx], edx
retn	4

loc_74AA44:
mov	eax, 1
shl	eax, cl
mov	dword ptr [esi+ecx*4+4], 0
pop	edi
not	eax
and	[esi], eax
pop	esi
retn	4
sub_74A9B0 endp

align 10h



sub_74AA60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
mov	edx, [ebx]
push	ebp
push	esi
push	edi
mov	edi, [esp+14h+arg_4]
shr	edi, 4
mov	eax, edi
and	eax, 0FFFFFFFh
shl	eax, 4
xor	edx, edi
and	edx, 0Fh
xor	[ebx], edx
mov	[esp+14h+var_4], ecx
lea	ecx, [eax+ebx-8]
mov	eax, [ebx]
mov	[ecx], eax
mov	eax, [ebx+4]
mov	[esp+14h+arg_0], ecx
mov	edx, [esp+14h+arg_0]
lea	ebp, [ebx+4]
mov	ecx, edi
and	eax, 0FFFFFFF0h
shr	ecx, 4
or	eax, ecx
cmp	[esp+14h+arg_8], 0
mov	[ebp+0], eax
mov	esi, ebx
mov	[edx+4], eax
jz	short loc_74AAEB
mov	eax, [ebx-4]
mov	ecx, [ebx-8]
and	eax, 0Fh
shl	eax, 4
and	ecx, 0Fh
or	eax, ecx
mov	ecx, [esp+14h+var_4]
shl	eax, 4
sub	esi, eax
mov	edx, [esi+4]
mov	eax, [esi]
lea	ebp, [esi+4]
and	edx, 0Fh
shl	edx, 4
and	eax, 0Fh
or	edx, eax
push	esi
add	edi, edx
call	sub_74A9B0

loc_74AAEB:
cmp	[esp+14h+arg_C], 0
mov	edx, [esp+14h+var_4]
jz	short loc_74AB2A
mov	eax, [ebx+4]
mov	ecx, [ebx]
and	eax, 0Fh
and	ecx, 0Fh
shl	eax, 4
or	eax, ecx
shl	eax, 4
mov	ecx, [eax+ebx+4]
add	eax, ebx
mov	ebx, [eax]
and	ecx, 0Fh
shl	ecx, 4
and	ebx, 0Fh
or	ecx, ebx
add	edi, ecx
push	eax
mov	ecx, edx
call	sub_74A9B0
mov	edx, [esp+14h+var_4]

loc_74AB2A:
mov	eax, edi
and	eax, 0FFFFFFFh
shl	eax, 4
lea	ecx, [eax+esi-8]
mov	eax, [esi]
xor	eax, edi
and	eax, 0Fh
xor	[esi], eax
mov	eax, [esi]
mov	[ecx], eax
mov	ebx, [ebp+0]
and	ebx, 0FFFFFFF0h
mov	eax, edi
shr	eax, 4
or	eax, ebx
mov	[ebp+0], eax
mov	[ecx+4], eax
mov	ebx, [ebp+0]
mov	eax, [esi]
and	ebx, 0Fh
mov	ecx, ebx
and	eax, 0Fh
shl	ecx, 4
or	ecx, eax
cmp	ecx, 1
jbe	short loc_74AB76
mov	ecx, [esp+14h+arg_10]
mov	[esi+8], ecx

loc_74AB76:
dec	edi
mov	ecx, edi
cmp	edi, 1Fh
jb	short loc_74AB83
mov	ecx, 1Fh

loc_74AB83:
mov	edi, [edx+ecx*4+4]
test	edi, edi
jz	short loc_74ABB6
or	eax, edi
mov	[esi], eax
mov	eax, [edi+4]
and	eax, 0FFFFFFF0h
or	eax, ebx
mov	[ebp+0], eax
mov	eax, [edi+4]
and	eax, 0FFFFFFF0h
mov	ebx, [eax]
and	ebx, 0Fh
or	ebx, esi
mov	[eax], ebx
mov	eax, [edi+4]
and	eax, 0Fh
or	eax, esi
mov	[edi+4], eax
jmp	short loc_74ABBF

loc_74ABB6:
or	eax, esi
or	ebx, esi
mov	[esi], eax
mov	[ebp+0], ebx

loc_74ABBF:
pop	edi
mov	eax, 1
mov	[edx+ecx*4+4], esi
shl	eax, cl
pop	esi
pop	ebp
pop	ebx
or	[edx], eax
pop	ecx
retn	14h
sub_74AA60 endp

align 10h



sub_74ABE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
fld	dword ptr [eax]
push	esi
mov	esi, ecx
fsub	dword ptr [esi]
fstp	[esp+8+var_4]
fld	dword ptr [eax+4]
fsub	dword ptr [esi+4]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fmul	st, st
fld	[esp+8+var_4]
fmul	st, st
faddp	st(1), st
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
call	__CIsqrt
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
fst	dword ptr [esi+8]
pop	esi
fcomp	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 41h
jnz	short loc_74AC3F
mov	eax, 1
pop	ecx
retn	4

loc_74AC3F:
xor	eax, eax
pop	ecx
retn	4
sub_74ABE0 endp

align 10h



sub_74AC50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_74AC9E
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_74AC80
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_74AC97

loc_74AC80:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 87h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_74AC97:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_74AC9E:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 87h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	300h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_74AC50 endp

align 10h



; int __stdcall	sub_74ACD0(float)
sub_74ACD0 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
cmp	byte ptr [esp+10h+arg_0], 0
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	byte ptr [esi+10h], 0
jz	loc_74AD67
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_74AD67
mov	edx, [esi+0Ch]
mov	ebx, [edx]
cmp	ecx, 1
jbe	short loc_74AD32
lea	eax, [ecx-1]
mov	edi, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	edi, 6
mov	edi, [edx+edi*4]
lea	edi, [edi+eax*4]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
push	edi
call	sub_74ABE0
test	al, al
jnz	short loc_74AD32
mov	eax, [esi]
test	eax, eax
jz	short loc_74AD32
dec	eax
mov	[esi], eax

loc_74AD32:
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_74AD44
push	edi
mov	ecx, esi
call	sub_74AC50

loc_74AD44:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
mov	edx, [ebx]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	[eax], edx
mov	ecx, [ebx+4]
mov	[eax+4], ecx
mov	edx, [ebx+8]
mov	[eax+8], edx
inc	dword ptr [esi]

loc_74AD67:
mov	eax, [esi]
cmp	eax, 1
jbe	loc_74AE8E
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
dec	eax
mov	edi, eax
and	eax, 3Fh
shr	edi, 6
mov	ecx, [ecx+edi*4]
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
push	edx
call	sub_74ABE0
test	al, al
setz	dl
cmp	dword ptr [esi], 1
mov	[esi+10h], dl
jbe	loc_74AE8E
push	ebp

loc_74ADA1:
mov	ecx, [esi]
mov	edx, [esi+0Ch]
lea	eax, [ecx-1]
mov	edi, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	edi, 6
mov	edi, [edx+edi*4]
fld	dword ptr [edi+eax*4]
lea	ebp, [edi+eax*4]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
fsub	dword ptr [ecx+eax*4]
lea	edi, [ecx+eax*4]
fstp	[esp+20h+var_10]
fld	dword ptr [ebp+4]
fsub	dword ptr [edi+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fmul	st, st
fld	[esp+20h+var_10]
fmul	st, st
faddp	st(1), st
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
call	__CIsqrt
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fst	dword ptr [edi+8]
fcomp	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 41h
jz	short loc_74AE8D
mov	edx, [esi]
mov	ebx, [esi+0Ch]
lea	ecx, [edx-1]
mov	edi, ecx
mov	eax, ecx
and	eax, 3Fh
shr	edi, 6
mov	edi, [ebx+edi*4]
lea	eax, [eax+eax*2]
mov	ebp, [edi+eax*4]
mov	ebx, [edi+eax*4+4]
lea	eax, [edi+eax*4]
mov	eax, [eax+8]
mov	[esp+20h+var_4], eax
test	edx, edx
jz	short loc_74AE53
mov	[esi], ecx
test	ecx, ecx
jz	short loc_74AE53
dec	ecx
mov	[esi], ecx

loc_74AE53:
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_74AE65
push	edi
mov	ecx, esi
call	sub_74AC50

loc_74AE65:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 3Fh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+20h+var_4]
lea	eax, [eax+edx*4]
mov	[eax], ebp
mov	[eax+4], ebx
mov	[eax+8], ecx
inc	dword ptr [esi]
cmp	dword ptr [esi], 1
ja	loc_74ADA1

loc_74AE8D:
pop	ebp

loc_74AE8E:
cmp	byte ptr [esi+10h], 0
jz	loc_74AF1E
cmp	dword ptr [esi], 2
jbe	short loc_74AF15
lea	ecx, [ecx+0]

loc_74AEA0:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
fld	dword ptr [edx]
dec	eax
mov	edi, eax
shr	edi, 6
mov	ecx, [ecx+edi*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
fsub	dword ptr [ecx+eax*4]
lea	edi, [ecx+eax*4]
fstp	[esp+1Ch+var_10]
fld	dword ptr [edx+4]
fsub	dword ptr [edi+4]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fmul	st, st
fld	[esp+1Ch+var_10]
fmul	st, st
faddp	st(1), st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
call	__CIsqrt
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fst	dword ptr [edi+8]
fcomp	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 41h
jz	short loc_74AF15
mov	eax, [esi]
test	eax, eax
jz	short loc_74AF10
dec	eax
mov	[esi], eax

loc_74AF10:
cmp	dword ptr [esi], 2
ja	short loc_74AEA0

loc_74AF15:
cmp	dword ptr [esi], 3
jnb	short loc_74AF1E
mov	byte ptr [esi+10h], 0

loc_74AF1E:
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	4
sub_74ACD0 endp

align 10h



; int __stdcall	sub_74AF30(int,	float, float, float, float, float, float)
sub_74AF30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 14h
fld	[esp+14h+arg_10]
push	ebx
fld	[esp+18h+arg_C]
push	esi
mov	esi, ecx
push	edi
mov	[esp+20h+var_C], esi
call	sub_79A3DA
fstp	[esp+20h+var_10]
fld	[esp+20h+var_10]
fstp	[esp+20h+var_14]
fld	[esp+20h+arg_18]
fld	[esp+20h+arg_14]
call	sub_79A3DA
fstp	[esp+20h+var_10]
fld	[esp+20h+var_10]
mov	ebx, [esp+20h+arg_0]
fstp	[esp+20h+var_10]
fld	dword ptr [esi+4]
fld	dword ptr [ebx]
fmul	ds:dbl_15FD2F8
fadd	st, st(1)
fdivp	st(1), st
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
call	__CIacos
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
mov	edi, [ebx+8]
fadd	st, st
lea	esi, [ebx+8]
shr	edi, 8
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_4]
fadd	[esp+20h+arg_C]
fstp	[esp+20h+var_8]
fld	[esp+20h+arg_8]
fadd	[esp+20h+arg_10]
fstp	[esp+20h+var_4]
cmp	edi, [esi+4]
jb	short loc_74AFCA
push	edi
mov	ecx, esi
call	sub_709200

loc_74AFCA:
mov	ecx, [esi+0Ch]
fld	[esp+20h+var_14]
mov	eax, [esi]
fld	[esp+20h+var_10]
mov	edi, [ecx+edi*4]
fcom	st(1)
mov	edx, [esp+20h+var_8]
mov	ecx, [esp+20h+var_4]
and	eax, 0FFh
mov	[edi+eax*8], edx
mov	[edi+eax*8+4], ecx
inc	dword ptr [esi]
mov	eax, [ebx+28h]
inc	dword ptr [eax+4]
fnstsw	ax
test	ah, 5
jp	short loc_74B00D
fadd	ds:dbl_15FCC20
fstp	[esp+20h+var_10]
fld	[esp+20h+var_10]

loc_74B00D:
fsub	st, st(1)
fld	[esp+20h+arg_0]
fdivr	st, st(1)
call	__ftol2_sse
lea	edx, [eax+1]
mov	[esp+20h+arg_C], edx
fidiv	[esp+20h+arg_C]
fstp	[esp+20h+arg_0]
fadd	[esp+20h+arg_0]
fstp	[esp+20h+var_14]
test	eax, eax
jle	loc_74B0C8
push	ebp
mov	ebp, eax
lea	esp, [esp+0]

loc_74B040:
fld	[esp+24h+var_14]
call	__CIcos
fstp	[esp+24h+arg_C]
fld	[esp+24h+arg_C]
mov	edi, [esp+24h+var_C]
fmul	dword ptr [edi+4]
fadd	[esp+24h+arg_4]
fstp	[esp+24h+var_8]
fld	[esp+24h+var_14]
call	__CIsin
fstp	[esp+24h+arg_C]
fld	[esp+24h+arg_C]
fmul	dword ptr [edi+4]
mov	edi, [esi]
shr	edi, 8
fadd	[esp+24h+arg_8]
fstp	[esp+24h+var_4]
cmp	edi, [esi+4]
jb	short loc_74B08E
push	edi
mov	ecx, esi
call	sub_709200

loc_74B08E:
mov	eax, [esi]
fld	[esp+24h+arg_0]
mov	ecx, [esi+0Ch]
fadd	[esp+24h+var_14]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+24h+var_8]
and	eax, 0FFh
fstp	[esp+24h+var_14]
mov	[ecx+eax*8], edx
mov	edx, [esp+24h+var_4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebx+28h]
inc	dword ptr [eax+4]
sub	ebp, 1
jnz	loc_74B040
pop	ebp

loc_74B0C8:
fld	[esp+20h+arg_4]
mov	edi, [esi]
fadd	[esp+20h+arg_14]
shr	edi, 8
fstp	[esp+20h+var_8]
fld	[esp+20h+arg_8]
fadd	[esp+20h+arg_18]
fstp	[esp+20h+var_4]
cmp	edi, [esi+4]
jb	short loc_74B0F2
push	edi
mov	ecx, esi
call	sub_709200

loc_74B0F2:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+20h+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+20h+var_4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	ebx, [ebx+28h]
inc	dword ptr [ebx+4]
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn	1Ch
sub_74AF30 endp

align 10h



; int __stdcall	sub_74B120(int,	int, int, int, float, float, float, float, int,	float, float, float)
sub_74B120 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h
arg_28=	dword ptr  2Ch
arg_2C=	dword ptr  30h

sub	esp, 40h
fld1
mov	edx, ecx
fstp	[esp+40h+var_3C]
mov	ecx, [esp+40h+arg_4]
fld	dword ptr [edx+4]
push	ebx
fmul	[esp+44h+arg_24]
push	ebp
push	esi
push	edi
mov	edi, [esp+50h+arg_8]
fstp	[esp+50h+var_24]
mov	esi, [esp+50h+arg_C]
fld	dword ptr [ecx]
mov	bl, 1
fld	[esp+50h+arg_10]
mov	[esp+50h+var_18], edx
fld	st
mov	[esp+50h+var_3D], bl
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+var_28]
fld	dword ptr [ecx+4]
fld	[esp+50h+arg_14]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+var_20]
fld	dword ptr [edi]
fadd	st, st(2)
fstp	[esp+50h+var_38]
fld	[esp+50h+var_38]
fstp	[esp+50h+var_34]
fld	dword ptr [edi+4]
fadd	st, st(1)
fstp	[esp+50h+var_30]
fld	dword ptr [edi]
fld	[esp+50h+arg_18]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+arg_4]
fld	dword ptr [edi+4]
fld	[esp+50h+arg_1C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+arg_8]
fld	dword ptr [esi]
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+arg_C]
fadd	dword ptr [esi+4]
fstp	[esp+50h+var_2C]
fld	[esp+50h+var_34]
fld	[esp+50h+var_28]
fld	st
fsubp	st(2), st
fld	[esp+50h+var_2C]
fsub	[esp+50h+arg_8]
fstp	[esp+50h+var_10]
fld	[esp+50h+var_30]
fld	[esp+50h+var_20]
fld	st
fsubp	st(2), st
fld	[esp+50h+arg_C]
fsub	[esp+50h+arg_4]
fst	[esp+50h+var_8]
fld	[esp+50h+var_10]
fmul	st, st(5)
fxch	st(1)
fmul	st, st(3)
fsubp	st(1), st
fstp	[esp+50h+var_28]
fld	[esp+50h+var_28]
fabs
fstp	[esp+50h+var_20]
fld	[esp+50h+var_20]
fld	[esp+50h+arg_28]
fcompp
fnstsw	ax
mov	ebp, [esp+50h+arg_0]
test	ah, 41h
jnz	loc_74B2BA
fstp	st(3)
fstp	st
fld	ds:dbl_15FD2F8
fmul	st(1), st
fld	[esp+50h+var_34]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+50h+arg_4]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+50h+arg_C]
fmul	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+arg_4]
fmul	st(1), st
fld	[esp+50h+var_30]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+50h+arg_8]
fmul	st, st(1)
faddp	st(2), st
fmul	[esp+50h+var_2C]
faddp	st(1), st
fstp	[esp+50h+arg_8]
fld	[esp+50h+var_38]
fstp	[esp+50h+arg_14]
fld	dword ptr [edi+4]
fadd	st, st(1)
fstp	[esp+50h+arg_10]
fld	[esp+50h+arg_10]
fst	[esp+50h+arg_10]
fld	dword ptr [ecx]
fld	[esp+50h+arg_14]
fld	st
fsubp	st(2), st
fld	st(3)
fmulp	st(2), st
fld	dword ptr [ecx+4]
fld	[esp+50h+arg_10]
fld	st
fsubp	st(2), st
fld	st(6)
fmulp	st(2), st
fxch	st(3)
fsubrp	st(1), st
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	loc_74B466
mov	ecx, 1
jmp	loc_74B468

loc_74B2BA:
fstp	st(4)
fstp	st(4)
fld	st(2)
fsub	[esp+50h+arg_8]
fmul	[esp+50h+var_8]
fld	st(1)
fsub	[esp+50h+arg_4]
fmul	[esp+50h+var_10]
fsubp	st(1), st
fstp	[esp+50h+arg_0]
fld	[esp+50h+arg_0]
fdiv	[esp+50h+var_28]
fstp	[esp+50h+arg_0]
fld	[esp+50h+arg_0]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+50h+arg_4]
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+50h+arg_8]
fld	[esp+50h+arg_4]
fsub	dword ptr [edi]
fstp	[esp+50h+arg_C]
fld	[esp+50h+arg_8]
fsub	dword ptr [edi+4]
fstp	[esp+50h+arg_0]
fld	[esp+50h+arg_0]
fld	[esp+50h+arg_C]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+50h+arg_0]
fld	[esp+50h+arg_0]
call	__CIsqrt
fstp	[esp+50h+arg_0]
fld	[esp+50h+arg_0]
fstp	[esp+50h+var_3C]
fld	[esp+50h+var_3C]
fld	[esp+50h+var_24]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_74B397
fld	[esp+50h+arg_4]
mov	ebx, [ebp+8]
lea	esi, [ebp+8]
fstp	[esp+50h+var_20]
fld	[esp+50h+arg_8]
shr	ebx, 8
fstp	[esp+50h+var_1C]
cmp	ebx, [esi+4]
jb	short loc_74B371
push	ebx
mov	ecx, esi
call	sub_709200

loc_74B371:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+ebx*4]
mov	edx, [esp+50h+var_20]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+50h+var_1C]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
xor	bl, bl

loc_74B397:
xor	cl, cl
test	bl, bl
jz	loc_74B6AE
fld	[esp+50h+arg_10]
mov	edx, [esp+50h+var_18]
fld	[esp+50h+arg_14]
fld	[esp+50h+arg_18]
fld	[esp+50h+arg_1C]
fld	[esp+50h+arg_24]
fxch	st(2)

loc_74B3BB:
mov	eax, [esp+50h+arg_20]
sub	eax, 1
jz	loc_74B60E
sub	eax, 1
jz	loc_74B5DB
test	cl, cl
jz	loc_74B500
fld	dword ptr [edi]
mov	ebx, [ebp+8]
fadd	st, st(5)
lea	esi, [ebp+8]
fld	st(4)
shr	ebx, 8
fmul	st, st(4)
fsubp	st(1), st
fstp	[esp+50h+var_18]
fld	dword ptr [edi+4]
faddp	st(4), st
fld	st(2)
fmulp	st(5), st
fxch	st(3)
faddp	st(4), st
fxch	st(3)
fstp	[esp+50h+var_14]
cmp	ebx, [esi+4]
jb	short loc_74B426
fstp	st(1)
push	ebx
fstp	st(1)
mov	ecx, esi
fstp	st
call	sub_709200
fld	[esp+50h+arg_18]
fld	[esp+50h+arg_24]
fld	[esp+50h+arg_1C]
fxch	st(2)
fxch	st(1)

loc_74B426:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+ebx*4]
mov	edx, [esp+50h+var_18]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+50h+var_14]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
fld	dword ptr [edi]
fadd	st, st(2)
fld	st(3)
fmul	st, st(2)
faddp	st(1), st
fstp	[esp+50h+var_18]
fld	dword ptr [edi+4]
faddp	st(3), st
fmulp	st(1), st
fsubp	st(1), st
jmp	loc_74B674

loc_74B466:
xor	ecx, ecx

loc_74B468:
fld	dword ptr [esi]
fsubrp	st(2), st
fld	st(4)
fmulp	st(2), st
fld	dword ptr [esi+4]
fsubrp	st(3), st
fld	st(5)
fmulp	st(3), st
fxch	st(1)
fsubrp	st(2), st
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_74B48D
mov	eax, 1
jmp	short loc_74B48F

loc_74B48D:
xor	eax, eax

loc_74B48F:
cmp	ecx, eax
jz	short loc_74B4E9
fstp	st(1)
mov	ebx, ebp
mov	edi, [ebx+8]
fstp	st(1)
fld	[esp+50h+var_38]
lea	esi, [ebx+8]
fstp	[esp+50h+var_18]
shr	edi, 8
fstp	[esp+50h+var_14]
cmp	edi, [esi+4]
jb	short loc_74B4BB
push	edi
mov	ecx, esi
call	sub_709200

loc_74B4BB:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+50h+var_18]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+50h+var_14]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebx+28h]
inc	dword ptr [eax+4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn	30h

loc_74B4E9:
mov	cl, [esp+50h+var_3D]
fstp	st
fld	[esp+50h+arg_24]
fld	[esp+50h+arg_1C]
fld	[esp+50h+arg_18]
jmp	loc_74B3BB

loc_74B500:
fstp	st(2)
lea	esi, [ebp+8]
fld	dword ptr [edi]
faddp	st(4), st
fxch	st(3)
fstp	[esp+50h+arg_18]
fld	dword ptr [edi+4]
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+arg_1C]
fadd	dword ptr [edi]
fstp	[esp+50h+arg_24]
fadd	dword ptr [edi+4]
mov	edi, [esi]
shr	edi, 8
fstp	[esp+50h+arg_0]
fld	[esp+50h+var_24]
fld	[esp+50h+arg_2C]
fld	st
fsubp	st(2), st
fsubr	[esp+50h+var_3C]
fdivp	st(1), st
fstp	[esp+50h+var_3C]
fld	[esp+50h+arg_4]
fld	[esp+50h+arg_18]
fld	st
fsubp	st(2), st
fld	[esp+50h+var_3C]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+50h+var_18]
fld	[esp+50h+arg_8]
fld	[esp+50h+arg_1C]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+50h+var_14]
cmp	edi, [esi+4]
jb	short loc_74B58A
push	edi
fstp	st
mov	ecx, esi
call	sub_709200
fld	[esp+50h+var_3C]

loc_74B58A:
fld	[esp+50h+arg_4]
mov	edx, [esi+0Ch]
fld	[esp+50h+arg_24]
mov	ecx, [edx+edi*4]
mov	edx, [esp+50h+var_18]
fld	st
mov	eax, [esi]
fsubp	st(2), st
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+50h+var_14]
fld	st(2)
fmulp	st(2), st
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
faddp	st(1), st
fstp	[esp+50h+var_18]
fld	[esp+50h+arg_8]
fld	[esp+50h+arg_0]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
jmp	loc_74B674

loc_74B5DB:
fstp	st(2)
sub	esp, 18h
fstp	[esp+68h+var_54]
mov	ecx, edx
fstp	[esp+68h+var_58]
fstp	[esp+68h+var_5C]
fstp	[esp+68h+var_60]
fld	dword ptr [edi+4]
fstp	[esp+68h+var_64]
fld	dword ptr [edi]
fstp	[esp+68h+var_68]
push	ebp		; int
call	sub_74AF30
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn	30h

loc_74B60E:
mov	ebx, [ebp+8]
fstp	st(2)
fld	dword ptr [edi]
lea	esi, [ebp+8]
faddp	st(4), st
shr	ebx, 8
fxch	st(3)
fstp	[esp+50h+var_18]
fld	dword ptr [edi+4]
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+var_14]
cmp	ebx, [esi+4]
jb	short loc_74B647
fstp	st
push	ebx
mov	ecx, esi
fstp	st
call	sub_709200
fld	[esp+50h+arg_1C]
fld	[esp+50h+arg_18]

loc_74B647:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+50h+var_18]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+50h+var_14]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
fadd	dword ptr [edi]
fstp	[esp+50h+var_18]
fadd	dword ptr [edi+4]

loc_74B674:
mov	edi, [esi]
fstp	[esp+50h+var_14]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_74B68A
push	edi
mov	ecx, esi
call	sub_709200

loc_74B68A:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	edi, [ecx+edi*4]
mov	edx, [esp+50h+var_18]
mov	ecx, [esp+50h+var_14]
and	eax, 0FFh
mov	[edi+eax*8], edx
mov	[edi+eax*8+4], ecx
inc	dword ptr [esi]
mov	ebp, [ebp+28h]
inc	dword ptr [ebp+4]

loc_74B6AE:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn	30h
sub_74B120 endp

align 10h



; int __stdcall	sub_74B6C0(int,	int, int, float, int)
sub_74B6C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
fldz
mov	eax, [esp+18h+arg_8]
fst	[esp+18h+var_18]
push	ebx
mov	ebx, [esp+1Ch+arg_4]
fstp	dword ptr [esp+1Ch+var_10]
fld	dword ptr [eax+4]
push	ebp
fsub	dword ptr [ebx+4]
push	esi
fld	[esp+24h+arg_C]
mov	esi, ecx
fld	st
push	edi
fdivp	st(2), st
mov	[esp+28h+var_8], esi
fxch	st(1)
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fmul	dword ptr [esi+4]
fstp	[esp+28h+arg_8]
fld	dword ptr [ebx]
fsub	dword ptr [eax]
mov	eax, [esp+28h+arg_10]
fdivrp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fmul	dword ptr [esi+4]
fstp	[esp+28h+arg_C]
cmp	eax, 2
jz	loc_74B7F6
fld	[esp+28h+arg_8]
fld	[esp+28h+arg_C]
cmp	eax, 1
jnz	short loc_74B738
fst	[esp+28h+var_18]
fxch	st(1)
fst	dword ptr [esp+28h+var_10]
fxch	st(1)

loc_74B738:
fld	dword ptr [ebx]
mov	ebp, [esp+28h+arg_0]
mov	edi, [ebp+8]
fsub	st, st(2)
lea	esi, [ebp+8]
shr	edi, 8
fadd	[esp+28h+var_18]
fstp	[esp+28h+var_8]
fld	dword ptr [ebx+4]
fsub	st, st(1)
fsub	dword ptr [esp+28h+var_10]
fstp	[esp+28h+var_4]
cmp	edi, [esi+4]
jb	short loc_74B777
fstp	st(1)
push	edi
mov	ecx, esi
fstp	st
call	sub_709200
fld	[esp+28h+arg_8]
fld	[esp+28h+arg_C]

loc_74B777:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+28h+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+28h+var_4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
fld	dword ptr [ebx]
mov	edi, [esi]
faddp	st(2), st
fld	[esp+28h+var_18]
shr	edi, 8
faddp	st(2), st
fxch	st(1)
fstp	[esp+28h+var_8]
fadd	dword ptr [ebx+4]
fsub	dword ptr [esp+28h+var_10]
fstp	[esp+28h+var_4]
cmp	edi, [esi+4]
jb	short loc_74B7C8
push	edi
mov	ecx, esi
call	sub_709200

loc_74B7C8:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	edi, [ecx+edi*4]
mov	edx, [esp+28h+var_8]
mov	ecx, [esp+28h+var_4]
and	eax, 0FFh
mov	[edi+eax*8], edx
mov	[edi+eax*8+4], ecx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h

loc_74B7F6:
fld	[esp+28h+arg_C]
fchs
fld	[esp+28h+arg_8]
fchs
call	sub_79A3DA
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
mov	ebp, [esp+28h+arg_0]
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fld	ds:dbl_15FCC90
fadd	st, st(1)
fstp	[esp+28h+arg_10]
fsubr	[esp+28h+arg_10]
fstp	[esp+28h+var_10]
fld	dword ptr [esi+4]
fld	dword ptr [ebp+0]
fmul	ds:dbl_15FD2F8
fadd	st, st(1)
fdivp	st(1), st
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
call	__CIacos
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
fadd	st, st
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
fld	[esp+28h+var_10]
fld	st
fdivrp	st(2), st
fxch	st(1)
call	__ftol2_sse
mov	ecx, eax
lea	edx, [ecx+1]
mov	[esp+28h+arg_0], edx
fidiv	[esp+28h+arg_0]
mov	edi, [ebp+8]
lea	esi, [ebp+8]
shr	edi, 8
mov	[esp+28h+arg_10], ecx
fstp	[esp+28h+arg_0]
fld	[esp+28h+arg_0]
fadd	[esp+28h+arg_4]
fstp	[esp+28h+arg_4]
fld	dword ptr [ebx]
fsub	[esp+28h+arg_8]
fstp	dword ptr [esp+28h+var_10]
fld	dword ptr [ebx+4]
fsub	[esp+28h+arg_C]
fstp	dword ptr [esp+28h+var_10+4]
cmp	edi, [esi+4]
jb	short loc_74B8BD
push	edi
mov	ecx, esi
call	sub_709200
mov	ecx, [esp+28h+arg_10]

loc_74B8BD:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	edi, [edx+edi*4]
mov	edx, dword ptr [esp+28h+var_10]
and	eax, 0FFh
mov	[edi+eax*8], edx
mov	edx, dword ptr [esp+28h+var_10+4]
mov	[edi+eax*8+4], edx
inc	dword ptr [esi]
mov	eax, [ebp+28h]
inc	dword ptr [eax+4]
test	ecx, ecx
jle	loc_74B97A
mov	[esp+28h+arg_10], ecx
lea	ecx, [ecx+0]

loc_74B8F0:
fld	[esp+28h+arg_4]
call	__CIcos
fstp	dword ptr [esp+28h+var_10]
fld	dword ptr [esp+28h+var_10]
mov	edi, [esp+28h+var_8]
fmul	dword ptr [edi+4]
fadd	dword ptr [ebx]
fstp	[esp+28h+var_18]
fld	[esp+28h+arg_4]
call	__CIsin
fstp	dword ptr [esp+28h+var_10]
fld	dword ptr [esp+28h+var_10]
fmul	dword ptr [edi+4]
mov	edi, [esi]
shr	edi, 8
fadd	dword ptr [ebx+4]
fstp	[esp+28h+var_14]
cmp	edi, [esi+4]
jb	short loc_74B93B
push	edi
mov	ecx, esi
call	sub_709200

loc_74B93B:
mov	eax, [esi]
fld	[esp+28h+arg_0]
mov	ecx, [esi+0Ch]
fadd	[esp+28h+arg_4]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+28h+var_18]
and	eax, 0FFh
fstp	[esp+28h+arg_4]
mov	[ecx+eax*8], edx
mov	edx, [esp+28h+var_14]
mov	[ecx+eax*8+4], edx
mov	ecx, 1
add	[esi], ecx
mov	eax, [ebp+28h]
add	[eax+4], ecx
sub	[esp+28h+arg_10], ecx
jnz	loc_74B8F0

loc_74B97A:
fld	dword ptr [ebx]
mov	edi, [esi]
fadd	[esp+28h+arg_8]
shr	edi, 8
fstp	[esp+28h+var_8]
fld	[esp+28h+arg_C]
fadd	dword ptr [ebx+4]
fstp	[esp+28h+var_4]
cmp	edi, [esi+4]
jb	short loc_74B9A1
push	edi
mov	ecx, esi
call	sub_709200

loc_74B9A1:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+28h+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+28h+var_4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
mov	ebp, [ebp+28h]
inc	dword ptr [ebp+4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h
sub_74B6C0 endp

align 10h



; int __stdcall	sub_74B9D0(int,	int, int, int, float, float)
sub_74B9D0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 1Ch
fld	[esp+1Ch+arg_10]
push	ebp
fld	st
mov	ebp, [esp+20h+arg_4]
fld	[esp+20h+arg_14]
push	esi
fld	st
push	edi
faddp	st(2), st
mov	edi, [esp+28h+arg_8]
fxch	st(1)
mov	esi, ecx
mov	ecx, [esp+28h+arg_C]
fmul	ds:dbl_15FCCB0
fstp	[esp+28h+var_14]
fld	dword ptr [edi+4]
fsub	dword ptr [ebp+4]
fld	dword ptr [esi+4]
fmul	st, st(1)
fdiv	st, st(3)
fstp	[esp+28h+arg_14]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi]
fmul	dword ptr [esi+4]
fdiv	st, st(3)
fstp	[esp+28h+arg_10]
fld	dword ptr [ecx+4]
fsub	dword ptr [edi+4]
fld	dword ptr [esi+4]
fmul	st, st(1)
fdiv	st, st(3)
fstp	[esp+28h+arg_8]
fld	dword ptr [edi]
fsub	dword ptr [ecx]
fmul	dword ptr [esi+4]
fdiv	st, st(3)
fstp	[esp+28h+arg_4]
fld	dword ptr [ecx]
fsub	dword ptr [edi]
fmulp	st(2), st
fld	dword ptr [edi]
fsub	dword ptr [ebp+0]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+28h+var_18]
fld	[esp+28h+var_18]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_74BAD1
fxch	st(2)
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_74BA6E
fstp	st(1)
jmp	short loc_74BA70

loc_74BA6E:
fstp	st

loc_74BA70:
fstp	[esp+28h+arg_C]
sub	esp, 0Ch
mov	eax, [esp+34h+arg_0]
fstp	[esp+34h+var_2C]
fld	[esp+34h+var_14]
fstp	[esp+34h+var_30]
fld	[esp+34h+arg_C]
fdiv	dword ptr [esi+4]
fstp	[esp+34h+arg_C]
fld	[esp+34h+arg_C]
fstp	[esp+34h+var_34]
fld	[esp+34h+arg_4]
push	1		; int
sub	esp, 10h
fstp	[esp+48h+var_3C]
fld	[esp+48h+arg_8]
fstp	[esp+48h+var_40]
fld	[esp+48h+arg_10]
fstp	[esp+48h+var_44]
fld	[esp+48h+arg_14]
fstp	[esp+48h+var_48]
push	ecx		; int
push	edi		; int
push	ebp		; int
push	eax		; int
mov	ecx, esi
call	sub_74B120
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	18h

loc_74BAD1:
fstp	st(2)
push	ebx
fstp	st
fstp	st
fld	[esp+2Ch+arg_8]
fadd	[esp+2Ch+arg_14]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+2Ch+var_1C]
fld	[esp+2Ch+arg_4]
fadd	[esp+2Ch+arg_10]
fmulp	st(1), st
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fld	[esp+2Ch+var_1C]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
call	__CIsqrt
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
mov	ecx, [esi+8]
mov	ebx, [esp+2Ch+arg_0]
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
cmp	ecx, 3
jz	short loc_74BB3E
cmp	ecx, 4
jnz	loc_74BCF9

loc_74BB3E:
fld	dword ptr [esi+4]
fsub	st, st(1)
fld	dword ptr [ebx]
fmul	ds:dbl_15FD2F8
fmul	ds:dbl_15FCC48
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_74BCF9
fstp	st
mov	eax, [esp+2Ch+arg_C]
fld	dword ptr [ebp+0]
lea	esi, [ebx+8]
fld	[esp+2Ch+arg_14]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_10]
fld	dword ptr [ebp+4]
fld	[esp+2Ch+arg_10]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_8]
fld	dword ptr [edi]
faddp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_18]
fstp	[esp+2Ch+var_1C]
fadd	dword ptr [edi+4]
fstp	[esp+2Ch+var_C]
fld	dword ptr [edi]
fld	[esp+2Ch+arg_8]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+arg_14]
fld	dword ptr [edi+4]
fld	[esp+2Ch+arg_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+arg_0]
fld	dword ptr [eax]
faddp	st(2), st
fxch	st(1)
fstp	[esp+2Ch+arg_8]
fadd	dword ptr [eax+4]
fstp	[esp+2Ch+arg_C]
fld	[esp+2Ch+var_1C]
fld	[esp+2Ch+var_10]
fld	st
fsubp	st(2), st
fld	[esp+2Ch+arg_C]
fsub	[esp+2Ch+arg_0]
fld	[esp+2Ch+var_C]
fld	[esp+2Ch+var_8]
fld	st
fsubp	st(2), st
fld	[esp+2Ch+arg_8]
fsub	[esp+2Ch+arg_14]
fld	st(3)
fmul	st, st(6)
fld	st(1)
fmul	st, st(4)
fsubp	st(1), st
fstp	[esp+2Ch+arg_C]
fld	[esp+2Ch+arg_C]
fabs
fstp	[esp+2Ch+arg_8]
fld	[esp+2Ch+arg_8]
fld	[esp+2Ch+var_14]
fcompp
fnstsw	ax
test	ah, 41h
jz	loc_74BCBE
fld	st(1)
mov	edi, [esi]
fsub	[esp+2Ch+arg_0]
shr	edi, 8
fmulp	st(1), st
fld	st(4)
fsub	[esp+2Ch+arg_14]
fmulp	st(4), st
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+2Ch+arg_0]
fld	[esp+2Ch+arg_0]
fdiv	[esp+2Ch+arg_C]
fstp	[esp+2Ch+arg_C]
fld	[esp+2Ch+arg_C]
fld	st
fmulp	st(5), st
fxch	st(4)
faddp	st(3), st
fxch	st(2)
fstp	[esp+2Ch+var_1C]
fxch	st(2)
fmulp	st(1), st
faddp	st(1), st
fstp	[esp+2Ch+var_18]
fld	[esp+2Ch+var_1C]
fstp	[esp+2Ch+var_8]
fld	[esp+2Ch+var_18]
fstp	[esp+2Ch+var_4]
cmp	edi, [esi+4]
jb	short loc_74BC8B
push	edi
mov	ecx, esi
call	sub_709200

loc_74BC8B:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+2Ch+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+2Ch+var_4]
mov	ebp, 1
mov	[ecx+eax*8+4], edx
add	[esi], ebp
mov	ebx, [ebx+28h]
add	[ebx+4], ebp
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	18h

loc_74BCBE:
fstp	st(5)
fstp	st(2)
fstp	st
fstp	st(2)
fstp	st
fstp	st
fld	[esp+2Ch+var_18]
fstp	[esp+2Ch+var_8]
fld	dword ptr [edi+4]
mov	edi, [esi]
fadd	[esp+2Ch+arg_10]
shr	edi, 8
fstp	[esp+2Ch+var_4]
cmp	edi, [esi+4]
jb	short loc_74BCEF
push	edi
mov	ecx, esi
call	sub_709200

loc_74BCEF:
mov	ebp, 1
jmp	loc_74BE20

loc_74BCF9:
test	ecx, ecx
jl	loc_74BDA3
cmp	ecx, 2
jle	short loc_74BD52
fstp	st
cmp	ecx, 3
jnz	loc_74BDA5
fld	[esp+2Ch+arg_4]
sub	esp, 18h
fstp	[esp+44h+var_30]
mov	ecx, esi
fld	[esp+44h+arg_8]
fstp	[esp+44h+var_34]
fld	[esp+44h+arg_10]
fstp	[esp+44h+var_38]
fld	[esp+44h+arg_14]
fstp	[esp+44h+var_3C]
fld	dword ptr [edi+4]
fstp	[esp+44h+var_40]
fld	dword ptr [edi]
fstp	[esp+44h+var_44]
push	ebx		; int
call	sub_74AF30
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	18h

loc_74BD52:
mov	edx, [esp+2Ch+arg_C]
sub	esp, 0Ch
fstp	[esp+38h+var_30]
fld	[esp+38h+var_14]
fstp	[esp+38h+var_34]
fld	dword ptr [esi+14h]
fstp	[esp+38h+var_38]
push	ecx		; int
fld	[esp+3Ch+arg_4]
sub	esp, 10h
fstp	[esp+4Ch+var_40]
mov	ecx, esi
fld	[esp+4Ch+arg_8]
fstp	[esp+4Ch+var_44]
fld	[esp+4Ch+arg_10]
fstp	[esp+4Ch+var_48]
fld	[esp+4Ch+arg_14]
fstp	[esp+4Ch+var_4C]
push	edx		; int
push	edi		; int
push	ebp		; int
push	ebx		; int
call	sub_74B120
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	18h

loc_74BDA3:
fstp	st

loc_74BDA5:
fld	dword ptr [edi]
mov	ebp, [ebx+8]
fadd	[esp+2Ch+arg_14]
lea	esi, [ebx+8]
shr	ebp, 8
fstp	[esp+2Ch+var_8]
fld	dword ptr [edi+4]
fadd	[esp+2Ch+arg_10]
fstp	[esp+2Ch+var_4]
cmp	ebp, [esi+4]
jb	short loc_74BDD0
push	ebp
mov	ecx, esi
call	sub_709200

loc_74BDD0:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+ebp*4]
mov	edx, [esp+2Ch+var_8]
and	eax, 0FFh
mov	[ecx+eax*8], edx
mov	edx, [esp+2Ch+var_4]
mov	[ecx+eax*8+4], edx
mov	ebp, 1
add	[esi], ebp
mov	eax, [ebx+28h]
add	[eax+4], ebp
fld	dword ptr [edi]
fadd	[esp+2Ch+arg_8]
fstp	[esp+2Ch+var_8]
fld	dword ptr [edi+4]
mov	edi, [esi]
fadd	[esp+2Ch+arg_4]
shr	edi, 8
fstp	[esp+2Ch+var_4]
cmp	edi, [esi+4]
jb	short loc_74BE20
push	edi
mov	ecx, esi
call	sub_709200

loc_74BE20:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	edi, [ecx+edi*4]
mov	ecx, [esp+2Ch+var_4]
mov	edx, [esp+2Ch+var_8]
and	eax, 0FFh
mov	[edi+eax*8+4], ecx
mov	[edi+eax*8], edx
add	[esi], ebp
mov	ebx, [ebx+28h]
add	[ebx+4], ebp
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	18h
sub_74B9D0 endp

align 10h



sub_74BE50 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, ecx
cmp	dword ptr [esi+18h], 2
jb	loc_74C211
cmp	byte ptr [esi+28h], 0
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	edi
jz	loc_74C027
cmp	byte ptr [esp+14h+arg_4], 0
jnz	short loc_74BE85
fldz
fcomp	dword ptr [esi]
fnstsw	ax
test	ah, 5
jp	loc_74BF4A

loc_74BE85:
push	0FFFFFFFFh
push	0FFFFFFFFh
push	0
mov	ecx, ebx
call	sub_709680
xor	eax, eax
cmp	[esi+18h], eax
jbe	loc_74BF3C
lea	ecx, [ecx+0]

loc_74BEA0:
mov	edi, eax
test	eax, eax
jnz	short loc_74BEA9
mov	edi, [esi+18h]

loc_74BEA9:
mov	ecx, [esi+18h]
lea	edx, [eax+1]
dec	edi
mov	[esp+14h+var_4], edx
cmp	edx, ecx
jb	short loc_74BEBA
sub	edx, ecx

loc_74BEBA:
mov	ecx, eax
test	eax, eax
jnz	short loc_74BEC3
mov	ecx, [esi+18h]

loc_74BEC3:
mov	ebp, [esi+24h]
mov	ebx, eax
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
and	eax, 3Fh
lea	eax, [eax+eax*2]
fld	dword ptr [ebx+eax*4+8]
lea	eax, [ebx+eax*4]
mov	ebx, edi
sub	esp, 8
fstp	[esp+1Ch+var_18]
and	edi, 3Fh
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
lea	edi, [edi+edi*2]
fld	dword ptr [ebx+edi*4+8]
mov	edi, edx
and	edx, 3Fh
fstp	[esp+1Ch+var_1C]
mov	ebx, ebp
lea	edx, [edx+edx*2]
shr	edi, 6
mov	edi, [ebx+edi*4]
mov	ebx, [esp+1Ch+arg_0]
lea	edx, [edi+edx*4]
push	edx		; int
dec	ecx
push	eax		; int
mov	eax, ecx
shr	eax, 6
and	ecx, 3Fh
mov	edx, ebp
mov	edx, [edx+eax*4]
lea	ecx, [ecx+ecx*2]
lea	eax, [edx+ecx*4]
push	eax		; int
push	ebx		; int
mov	ecx, esi
call	sub_74B9D0
mov	eax, [esp+14h+var_4]
cmp	eax, [esi+18h]
jb	loc_74BEA0

loc_74BF3C:
mov	ecx, ebx
call	sub_709790
cmp	byte ptr [esp+14h+arg_4], 0
jnz	short loc_74BF59

loc_74BF4A:
fldz
fcomp	dword ptr [esi]
fnstsw	ax
test	ah, 41h
jnz	loc_74C20E

loc_74BF59:
push	0FFFFFFFFh
push	0FFFFFFFFh
push	0
mov	ecx, ebx
call	sub_709680
mov	edi, [esi+18h]
sub	edi, 1
js	loc_74C207

loc_74BF72:
mov	eax, edi
test	edi, edi
jnz	short loc_74BF7B
mov	eax, [esi+18h]

loc_74BF7B:
dec	eax
mov	[esp+14h+arg_4], eax
mov	eax, edi
test	edi, edi
jnz	short loc_74BF89
mov	eax, [esi+18h]

loc_74BF89:
mov	ecx, [esi+18h]
lea	edx, [eax-1]
lea	eax, [edi+1]
cmp	eax, ecx
jb	short loc_74BF98
sub	eax, ecx

loc_74BF98:
mov	ebp, [esi+24h]
mov	ebx, edi
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
mov	ecx, edi
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
lea	ecx, [ebx+ecx*4]
mov	[esp+14h+var_4], ecx
mov	ecx, [esp+14h+arg_4]
mov	ebx, ecx
and	ecx, 3Fh
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
lea	ecx, [ecx+ecx*2]
fld	dword ptr [ebx+ecx*4+8]
mov	ecx, [esp+14h+var_4]
mov	ebx, edx
sub	esp, 8
fstp	[esp+1Ch+var_18]
and	edx, 3Fh
fld	dword ptr [ecx+8]
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
fstp	[esp+1Ch+var_1C]
lea	edx, [edx+edx*2]
lea	edx, [ebx+edx*4]
mov	ebx, [esp+1Ch+arg_0]
push	edx		; int
push	ecx		; int
mov	ecx, eax
shr	ecx, 6
mov	edx, ebp
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
push	edx		; int
push	ebx		; int
mov	ecx, esi
call	sub_74B9D0
sub	edi, 1
jns	loc_74BF72
mov	ecx, ebx
call	sub_709790
pop	edi
pop	ebp
pop	ebx
pop	esi
pop	ecx
retn	8

loc_74C027:
push	0FFFFFFFFh
push	0FFFFFFFFh
push	0
mov	ecx, ebx
call	sub_709680
mov	eax, [esi+24h]
mov	ecx, [eax]
mov	edx, [esi+0Ch]
fld	dword ptr [ecx+8]
push	edx		; int
push	ecx		; float
mov	eax, ecx
fstp	[esp+1Ch+var_1C]
add	eax, 0Ch
push	eax		; int
push	ecx		; int
push	ebx		; int
mov	ecx, esi
call	sub_74B6C0
mov	ecx, [esi+18h]
mov	eax, 1
dec	ecx
cmp	ecx, eax
jbe	loc_74C103

loc_74C064:
mov	edi, eax
test	eax, eax
jnz	short loc_74C06D
mov	edi, [esi+18h]

loc_74C06D:
mov	ecx, [esi+18h]
lea	edx, [eax+1]
dec	edi
mov	[esp+14h+var_4], edx
cmp	edx, ecx
jb	short loc_74C07E
sub	edx, ecx

loc_74C07E:
mov	ecx, eax
test	eax, eax
jnz	short loc_74C087
mov	ecx, [esi+18h]

loc_74C087:
mov	ebp, [esi+24h]
mov	ebx, eax
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
and	eax, 3Fh
lea	eax, [eax+eax*2]
fld	dword ptr [ebx+eax*4+8]
lea	eax, [ebx+eax*4]
mov	ebx, edi
sub	esp, 8
fstp	[esp+1Ch+var_18]
and	edi, 3Fh
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
lea	edi, [edi+edi*2]
fld	dword ptr [ebx+edi*4+8]
mov	edi, edx
and	edx, 3Fh
fstp	[esp+1Ch+var_1C]
mov	ebx, ebp
lea	edx, [edx+edx*2]
shr	edi, 6
mov	edi, [ebx+edi*4]
mov	ebx, [esp+1Ch+arg_0]
lea	edx, [edi+edx*4]
push	edx		; int
dec	ecx
push	eax		; int
mov	eax, ecx
shr	eax, 6
and	ecx, 3Fh
mov	edx, ebp
mov	edx, [edx+eax*4]
lea	ecx, [ecx+ecx*2]
lea	eax, [edx+ecx*4]
push	eax		; int
push	ebx		; int
mov	ecx, esi
call	sub_74B9D0
mov	ecx, [esi+18h]
mov	eax, [esp+14h+var_4]
dec	ecx
cmp	eax, ecx
jb	loc_74C064

loc_74C103:
mov	ecx, [esi+18h]
mov	edx, [esi+10h]
mov	edi, [esi+24h]
push	edx		; int
lea	eax, [ecx-2]
mov	ebp, eax
mov	edx, eax
and	edx, 3Fh
lea	edx, [edx+edx*2]
shr	ebp, 6
mov	ebp, [edi+ebp*4]
fld	dword ptr [ebp+edx*4+8]
mov	edx, eax
shr	edx, 6
mov	edx, [edi+edx*4]
dec	ecx
push	ecx		; float
and	eax, 3Fh
fstp	[esp+1Ch+var_1C]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	edx, ecx
and	ecx, 3Fh
push	eax		; int
shr	edx, 6
lea	eax, [ecx+ecx*2]
mov	ecx, [edi+edx*4]
lea	edx, [ecx+eax*4]
push	edx		; int
push	ebx		; int
mov	ecx, esi
call	sub_74B6C0
mov	edi, [esi+18h]
sub	edi, 2
jz	loc_74C207

loc_74C161:
mov	eax, edi
test	edi, edi
jnz	short loc_74C16A
mov	eax, [esi+18h]

loc_74C16A:
dec	eax
mov	[esp+14h+arg_4], eax
mov	eax, edi
test	edi, edi
jnz	short loc_74C178
mov	eax, [esi+18h]

loc_74C178:
mov	ecx, [esi+18h]
lea	edx, [eax-1]
lea	eax, [edi+1]
cmp	eax, ecx
jb	short loc_74C187
sub	eax, ecx

loc_74C187:
mov	ebp, [esi+24h]
mov	ebx, edi
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
mov	ecx, edi
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
lea	ecx, [ebx+ecx*4]
mov	[esp+14h+var_4], ecx
mov	ecx, [esp+14h+arg_4]
mov	ebx, ecx
and	ecx, 3Fh
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
lea	ecx, [ecx+ecx*2]
fld	dword ptr [ebx+ecx*4+8]
mov	ecx, [esp+14h+var_4]
mov	ebx, edx
sub	esp, 8
fstp	[esp+1Ch+var_18]
and	edx, 3Fh
fld	dword ptr [ecx+8]
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
fstp	[esp+1Ch+var_1C]
lea	edx, [edx+edx*2]
lea	edx, [ebx+edx*4]
mov	ebx, [esp+1Ch+arg_0]
push	edx		; int
push	ecx		; int
mov	ecx, eax
shr	ecx, 6
mov	edx, ebp
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
push	edx		; int
push	ebx		; int
mov	ecx, esi
call	sub_74B9D0
sub	edi, 1
jnz	loc_74C161

loc_74C207:
mov	ecx, ebx
call	sub_709790

loc_74C20E:
pop	edi
pop	ebp
pop	ebx

loc_74C211:
pop	esi
pop	ecx
retn	8
sub_74BE50 endp

align 10h



sub_74C220 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+18h]
xor	ebx, ebx
mov	dword ptr [esi], 0
mov	byte ptr [esi+10h], 0
mov	[esp+20h+var_10], edi
cmp	[ebp+4], ebx
jbe	loc_74C305
fldz
fstp	[esp+20h+var_4]
nop

loc_74C250:
mov	eax, [ebp+8]
mov	edx, [ebp+0]
mov	edx, [edx+14h]
add	eax, ebx
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8]
lea	eax, [ecx+eax*8]
mov	ecx, [esi]
fstp	[esp+20h+var_C]
fld	dword ptr [eax+4]
fstp	[esp+20h+var_8]
cmp	ecx, 1
jbe	short loc_74C2BE
mov	edx, [esi+0Ch]
lea	eax, [ecx-1]
mov	edi, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	edi, 6
mov	edi, [edx+edi*4]
lea	edi, [edi+eax*4]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
push	edi
call	sub_74ABE0
test	al, al
jnz	short loc_74C2BE
mov	eax, [esi]
test	eax, eax
jz	short loc_74C2BE
dec	eax
mov	[esi], eax

loc_74C2BE:
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_74C2D0
push	edi
mov	ecx, esi
call	sub_74AC50

loc_74C2D0:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
mov	edx, [esp+20h+var_C]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+20h+var_8]
mov	[eax], edx
mov	edx, [esp+20h+var_4]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]
inc	ebx
cmp	ebx, [ebp+4]
jb	loc_74C250
mov	edi, [esp+20h+var_10]

loc_74C305:
mov	ebx, [esp+20h+arg_8]
test	bl, bl
setz	al
movzx	ecx, al
push	ecx		; float
mov	ecx, esi
call	sub_74ACD0
mov	edx, [esp+20h+arg_4]
push	ebx
push	edx
mov	ecx, edi
call	sub_74BE50
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_74C220 endp




sub_74C330 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 30h
push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, [esp+38h+arg_0]
push	esi
lea	esi, [ebp+18h]
xor	eax, eax
mov	dword ptr [esi], 0
mov	byte ptr [esi+10h], 0
mov	[esp+3Ch+var_30], ebp
mov	[esp+3Ch+var_2C], eax
cmp	[ecx+18h], eax
jbe	loc_74C5EF
push	edi
lea	ecx, [ecx+0]

loc_74C360:
mov	ecx, [ecx+24h]
mov	edx, eax
and	eax, 3Fh
shr	edx, 6
mov	ecx, [ecx+edx*4]
lea	eax, [eax+eax*2]
lea	edi, [ecx+eax*8]
mov	eax, [esp+40h+arg_4]
test	eax, eax
jl	short loc_74C385
cmp	[edi+14h], eax
jnz	loc_74C5D8

loc_74C385:
cmp	dword ptr [edi+4], 0
jz	loc_74C5D8
mov	eax, [esi]
test	eax, eax
jz	loc_74C512
mov	ecx, [ebp+24h]
mov	ebx, [edi]
mov	ebx, [ebx+14h]
dec	eax
mov	edx, eax
shr	edx, 6
mov	ecx, [ecx+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
mov	eax, [edi+8]
mov	edx, eax
shr	edx, 8
mov	edx, [ebx+edx*4]
and	eax, 0FFh
mov	ebx, [edx+eax*8]
mov	eax, [edx+eax*8+4]
mov	[esp+40h+var_20], ebx
fld	[esp+40h+var_20]
fsub	dword ptr [ecx]
mov	[esp+40h+var_1C], eax
fstp	[esp+40h+var_24]
fld	[esp+40h+var_1C]
fsub	dword ptr [ecx+4]
fstp	[esp+40h+var_28]
fld	[esp+40h+var_28]
fld	[esp+40h+var_24]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+40h+var_24]
fld	[esp+40h+var_24]
call	__CIsqrt
fstp	[esp+40h+var_24]
fld	[esp+40h+var_24]
fcomp	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 41h
jp	loc_74C4E7
mov	ebx, 1
cmp	[edi+4], ebx
jbe	loc_74C5D8
fldz
fstp	[esp+40h+var_10]

loc_74C431:
mov	eax, [edi+8]
mov	edx, [edi]
mov	edx, [edx+14h]
add	eax, ebx
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8]
lea	eax, [ecx+eax*8]
mov	ecx, [esi]
fstp	[esp+40h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+40h+var_14]
cmp	ecx, 1
jbe	short loc_74C49F
mov	edx, [esi+0Ch]
lea	eax, [ecx-1]
mov	ebp, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	ebp, [ebp+eax*4+0]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
push	ebp
call	sub_74ABE0
test	al, al
jnz	short loc_74C49F
mov	eax, [esi]
test	eax, eax
jz	short loc_74C49F
dec	eax
mov	[esi], eax

loc_74C49F:
mov	ebp, [esi]
shr	ebp, 6
cmp	ebp, [esi+4]
jb	short loc_74C4B1
push	ebp
mov	ecx, esi
call	sub_74AC50

loc_74C4B1:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+40h+var_18]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+40h+var_14]
mov	[eax], edx
mov	edx, [esp+40h+var_10]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]
inc	ebx
cmp	ebx, [edi+4]
jb	loc_74C431
jmp	loc_74C5D4

loc_74C4E7:
mov	ebx, [esp+40h+arg_C]
test	bl, bl
setz	al
movzx	ecx, al
push	ecx		; float
mov	ecx, esi
call	sub_74ACD0
mov	edx, [esp+40h+arg_8]
push	ebx
push	edx
mov	ecx, ebp
call	sub_74BE50
mov	dword ptr [esi], 0
mov	byte ptr [esi+10h], 0

loc_74C512:
xor	ebx, ebx
cmp	[edi+4], ebx
jbe	loc_74C5D8
fldz
fstp	[esp+40h+var_4]

loc_74C523:
mov	eax, [edi+8]
mov	edx, [edi]
mov	edx, [edx+14h]
add	eax, ebx
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8]
lea	eax, [ecx+eax*8]
mov	ecx, [esi]
fstp	[esp+40h+var_C]
fld	dword ptr [eax+4]
fstp	[esp+40h+var_8]
cmp	ecx, 1
jbe	short loc_74C591
mov	edx, [esi+0Ch]
lea	eax, [ecx-1]
mov	ebp, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	ebp, [ebp+eax*4+0]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
push	ebp
call	sub_74ABE0
test	al, al
jnz	short loc_74C591
mov	eax, [esi]
test	eax, eax
jz	short loc_74C591
dec	eax
mov	[esi], eax

loc_74C591:
mov	ebp, [esi]
shr	ebp, 6
cmp	ebp, [esi+4]
jb	short loc_74C5A3
push	ebp
mov	ecx, esi
call	sub_74AC50

loc_74C5A3:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+40h+var_C]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+40h+var_8]
mov	[eax], edx
mov	edx, [esp+40h+var_4]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]
inc	ebx
cmp	ebx, [edi+4]
jb	loc_74C523

loc_74C5D4:
mov	ebp, [esp+40h+var_30]

loc_74C5D8:
mov	eax, [esp+40h+var_2C]
mov	ecx, [esp+40h+arg_0]
inc	eax
mov	[esp+40h+var_2C], eax
cmp	eax, [ecx+18h]
jb	loc_74C360
pop	edi

loc_74C5EF:
cmp	dword ptr [esi], 1
jbe	short loc_74C615
mov	ebx, [esp+3Ch+arg_C]
test	bl, bl
setz	al
movzx	ecx, al
push	ecx		; float
mov	ecx, esi
call	sub_74ACD0
mov	edx, [esp+3Ch+arg_8]
push	ebx
push	edx
mov	ecx, ebp
call	sub_74BE50

loc_74C615:
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	10h
sub_74C330 endp

align 10h



sub_74C620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
movzx	eax, word ptr [edx]
push	esi
mov	esi, [esp+4+arg_4]
movzx	ecx, word ptr [esi]
cmp	ax, cx
jnz	short loc_74C63C
movzx	eax, word ptr [edx+2]
cmp	ax, [esi+2]

loc_74C63C:
sbb	eax, eax
neg	eax
pop	esi
retn
sub_74C620 endp

align 10h


; Attributes: bp-based frame

sub_74C650 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	qword ptr -48h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	qword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 34h
mov	eax, [ebp+arg_0]
mov	edx, ecx
mov	ecx, [ebp+arg_4]
mov	dword ptr [eax], 3FFFh
mov	eax, [ebp+arg_8]
mov	dword ptr [ecx], 3FFFh
mov	ecx, [ebp+arg_C]
mov	dword ptr [eax], 0FFFFC001h
push	ebx
mov	dword ptr [ecx], 0FFFFC001h
xor	ecx, ecx
push	esi
push	edi
mov	[esp+40h+var_10], edx
mov	[esp+40h+var_C], ecx
cmp	[edx+28h], ecx
jbe	loc_74CA80
fldz

loc_74C697:
mov	esi, [edx+34h]
mov	ebx, [edx+24h]
mov	eax, ecx
shr	eax, 6
mov	eax, [esi+eax*4]
mov	edi, ecx
and	edi, 3Fh
lea	edi, [eax+edi*8]
mov	eax, [edi]
mov	esi, eax
shr	esi, 6
mov	esi, [ebx+esi*4]
mov	ebx, [ebp+arg_0]
and	eax, 3Fh
mov	eax, [esi+eax*4]
mov	[esp+40h+var_2C], eax
movsx	esi, word ptr [esp+40h+var_2C+2]
sar	ax, 1
cwde
cmp	eax, [ebx]
mov	[esp+40h+var_4], edi
mov	dword ptr [esp+40h+var_24+4], esi
mov	[esp+40h+var_14], eax
jge	short loc_74C6DF
mov	[ebx], eax

loc_74C6DF:
mov	ebx, [ebp+arg_4]
cmp	esi, [ebx]
jge	short loc_74C6E8
mov	[ebx], esi

loc_74C6E8:
mov	ebx, [ebp+arg_8]
cmp	eax, [ebx]
jle	short loc_74C6F1
mov	[ebx], eax

loc_74C6F1:
mov	eax, [ebp+arg_C]
cmp	esi, [eax]
jle	short loc_74C6FA
mov	[eax], esi

loc_74C6FA:
mov	ebx, 1
cmp	[edi+4], ebx
jbe	loc_74CA70

loc_74C708:
mov	ecx, [edi]
mov	edx, [edx+24h]
lea	eax, [ecx+ebx]
mov	esi, eax
shr	esi, 6
mov	esi, [edx+esi*4]
and	eax, 3Fh
lea	esi, [esi+eax*4]
movzx	eax, word ptr [esi]
test	al, 1
jz	loc_74CA1E
fild	[esp+40h+var_14]
sar	ax, 1
cwde
mov	[esp+40h+var_1C], eax
fstp	[esp+40h+var_14]
inc	ebx
fld	[esp+40h+var_14]
add	ecx, ebx
fst	[esp+40h+var_8]
mov	edi, ecx
fild	[esp+40h+var_1C]
shr	edi, 6
mov	edx, [edx+edi*4]
and	ecx, 3Fh
movsx	eax, word ptr [edx+ecx*4]
fstp	[esp+40h+var_1C]
fld	[esp+40h+var_1C]
fst	[esp+40h+var_2C]
fld	[esp+40h+var_2C]
lea	edi, [edx+ecx*4]
fld	st
sar	eax, 1
fadd	st, st(1)
mov	[esp+40h+var_1C], eax
fld	[esp+40h+var_8]
mov	[esp+40h+var_18], ebx
fld	st
fsubp	st(2), st
fild	[esp+40h+var_1C]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+40h+var_8]
fld	st(4)
fld	[esp+40h+var_8]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_74C7AB
fstp	st(2)
fstp	st
fstp	st
fld	ds:dbl_15FCD60
jmp	short loc_74C7B1

loc_74C7AB:
fxch	st(2)
fsubrp	st(1), st
fdivrp	st(1), st

loc_74C7B1:
fstp	[esp+40h+var_2C]
fld	[esp+40h+var_2C]
fcom	st(3)
fnstsw	ax
fstp	st(3)
test	ah, 41h
jnz	loc_74C898
fld1
fcomp	st(3)
fnstsw	ax
test	ah, 41h
jnz	loc_74C898
movsx	eax, word ptr [edi+2]
fxch	st(2)
lea	ecx, [esp+40h+var_28]
push	ecx		; int
movsx	ecx, word ptr [esi+2]
lea	edx, [esp+44h+var_24]
push	edx		; int
sub	esp, 1Ch
mov	[esp+64h+var_8], eax
fstp	[esp+64h+var_4C]
fild	[esp+64h+var_8]
mov	[esp+64h+var_8], ecx
fstp	[esp+64h+var_50]
fild	[esp+64h+var_1C]
fstp	[esp+64h+var_54]
fild	[esp+64h+var_8]
fstp	[esp+64h+var_58]
fxch	st(1)
fstp	[esp+64h+var_5C]
fild	dword ptr [esp+64h+var_24+4]
fstp	[esp+64h+var_60]
fstp	[esp+64h+var_64]
call	sub_709C70
fld	[esp+64h+var_28]
add	esp, 1Ch
fstp	[esp+48h+var_48]
call	_floor
fstp	[esp+48h+var_8]
fld	[esp+48h+var_8]
fadd	ds:dbl_15FCC48
call	__ftol2_sse
fld	dword ptr [esp+48h+var_24]
fstp	[esp+48h+var_48]
mov	ebx, eax
call	_floor
fstp	[esp+48h+var_8]
fld	[esp+48h+var_8]
add	esp, 8
fadd	ds:dbl_15FCC48
call	__ftol2_sse
mov	ecx, [ebp+arg_0]
cmp	eax, [ecx]
jge	short loc_74C877
mov	[ecx], eax

loc_74C877:
mov	ecx, [ebp+arg_4]
cmp	ebx, [ecx]
jge	short loc_74C880
mov	[ecx], ebx

loc_74C880:
mov	ecx, [ebp+arg_8]
cmp	eax, [ecx]
jle	short loc_74C889
mov	[ecx], eax

loc_74C889:
mov	eax, [ebp+arg_C]
cmp	ebx, [eax]
jle	short loc_74C892
mov	[eax], ebx

loc_74C892:
mov	ebx, [esp+40h+var_18]
jmp	short loc_74C89E

loc_74C898:
fstp	st(2)
fstp	st(1)
fstp	st

loc_74C89E:
fild	dword ptr [esp+40h+var_24+4]
movsx	edx, word ptr [esi+2]
movsx	eax, word ptr [edi+2]
fstp	[esp+40h+var_8]
fld	[esp+40h+var_8]
mov	[esp+40h+var_8], edx
fst	[esp+40h+var_1C]
mov	[esp+40h+var_18], eax
fild	[esp+40h+var_8]
fstp	[esp+40h+var_8]
fld	[esp+40h+var_8]
fst	[esp+40h+var_8]
fld	[esp+40h+var_8]
fld	st
fadd	st, st(1)
fld	[esp+40h+var_1C]
fld	st
fsubp	st(2), st
fild	[esp+40h+var_18]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+40h+var_8]
fldz
fld	st
fld	[esp+40h+var_8]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_74C90B
fstp	st(3)
fstp	st(1)
fstp	st(1)
fld	ds:dbl_15FCD60
jmp	short loc_74C915

loc_74C90B:
fxch	st(3)
fsubrp	st(2), st
fxch	st(1)
fdivrp	st(2), st
fxch	st(1)

loc_74C915:
fstp	[esp+40h+var_2C]
fld	[esp+40h+var_2C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	loc_74CA0A
fld1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_74CA0A
mov	ax, [edi]
lea	ecx, [esp+40h+var_28]
push	ecx		; int
lea	edx, [esp+44h+var_24]
push	edx		; int
mov	dx, [esi]
sub	esp, 1Ch
fstp	[esp+64h+var_4C]
sar	ax, 1
fild	[esp+64h+var_18]
movsx	ecx, ax
mov	[esp+64h+var_8], ecx
sar	dx, 1
fstp	[esp+64h+var_50]
movsx	eax, dx
fild	[esp+64h+var_8]
mov	[esp+64h+var_8], eax
fstp	[esp+64h+var_54]
fstp	[esp+64h+var_58]
fild	[esp+64h+var_8]
fstp	[esp+64h+var_5C]
fstp	[esp+64h+var_60]
fld	[esp+64h+var_14]
fstp	[esp+64h+var_64]
call	sub_709C70
fld	[esp+64h+var_28]
add	esp, 1Ch
fstp	[esp+48h+var_48]
call	_floor
fstp	[esp+48h+var_8]
fld	[esp+48h+var_8]
fadd	ds:dbl_15FCC48
call	__ftol2_sse
fld	dword ptr [esp+48h+var_24]
fstp	[esp+48h+var_48]
mov	esi, eax
call	_floor
fstp	[esp+48h+var_8]
fld	[esp+48h+var_8]
add	esp, 8
fadd	ds:dbl_15FCC48
call	__ftol2_sse
mov	ecx, [ebp+arg_0]
cmp	eax, [ecx]
jge	short loc_74C9E1
mov	[ecx], eax

loc_74C9E1:
mov	ecx, [ebp+arg_4]
cmp	esi, [ecx]
jge	short loc_74C9EA
mov	[ecx], esi

loc_74C9EA:
mov	ecx, [ebp+arg_8]
cmp	eax, [ecx]
jle	short loc_74C9F3
mov	[ecx], eax

loc_74C9F3:
mov	eax, [ebp+arg_C]
cmp	esi, [eax]
jle	short loc_74CA10
fldz
mov	[eax], esi
mov	ecx, [edi]
mov	edi, [esp+40h+var_4]
mov	[esp+40h+var_2C], ecx
jmp	short loc_74CA24

loc_74CA0A:
fstp	st
fstp	st(1)
fstp	st

loc_74CA10:
mov	ecx, [edi]
fldz
mov	edi, [esp+40h+var_4]
mov	[esp+40h+var_2C], ecx
jmp	short loc_74CA24

loc_74CA1E:
mov	edx, [esi]
mov	[esp+40h+var_2C], edx

loc_74CA24:
mov	ax, word ptr [esp+40h+var_2C]
movsx	ecx, word ptr [esp+40h+var_2C+2]
mov	edx, [ebp+arg_0]
sar	ax, 1
cwde
cmp	eax, [edx]
mov	dword ptr [esp+40h+var_24+4], ecx
mov	[esp+40h+var_14], eax
jge	short loc_74CA43
mov	[edx], eax

loc_74CA43:
mov	edx, [ebp+arg_4]
cmp	ecx, [edx]
jge	short loc_74CA4C
mov	[edx], ecx

loc_74CA4C:
mov	edx, [ebp+arg_8]
cmp	eax, [edx]
jle	short loc_74CA55
mov	[edx], eax

loc_74CA55:
mov	eax, [ebp+arg_C]
cmp	ecx, [eax]
jle	short loc_74CA5E
mov	[eax], ecx

loc_74CA5E:
mov	edx, [esp+40h+var_10]
inc	ebx
cmp	ebx, [edi+4]
jb	loc_74C708
mov	ecx, [esp+40h+var_C]

loc_74CA70:
inc	ecx
mov	[esp+40h+var_C], ecx
cmp	ecx, [edx+28h]
jb	loc_74C697
fstp	st

loc_74CA80:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_74C650 endp

align 10h



sub_74CA90 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
lea	eax, [esp+20h+var_18]
lea	edi, [ecx+0Ch]
push	eax
push	esi
mov	ecx, edi
call	sub_714360
lea	ecx, [esp+20h+var_18]
push	ecx
add	esi, eax
push	esi
mov	ecx, edi
call	sub_714360
lea	edx, [esp+20h+var_18]
add	esi, eax
push	edx
push	esi
mov	ecx, edi
call	sub_714360
add	esi, eax
lea	eax, [esp+20h+var_18]
push	eax
push	esi
mov	ecx, edi
call	sub_714360
lea	ecx, [esp+20h+var_18]
push	ecx
add	esi, eax
push	esi
mov	ecx, edi
call	sub_714700
add	esi, eax
cmp	[esp+20h+var_18], 0
jz	loc_74CB86
mov	edx, [edi]
push	ebx
push	ebp
mov	ebp, [edx+0Ch]

loc_74CB04:
dec	[esp+28h+var_18]
mov	eax, esi
shr	eax, 0Ch
mov	ecx, [ebp+eax*4+0]
mov	edx, esi
and	edx, 0FFFh
test	byte ptr [edx+ecx], 1
mov	eax, 0
setnz	al
inc	eax
add	esi, eax
mov	eax, esi
shr	eax, 0Ch
mov	ecx, [ebp+eax*4+0]
mov	edx, esi
and	edx, 0FFFh
test	byte ptr [edx+ecx], 1
mov	eax, 0
setnz	al
mov	ecx, edi
inc	eax
add	esi, eax
lea	eax, [esp+28h+var_14]
push	eax
push	esi
call	sub_7143C0
mov	ebx, [esp+28h+var_14]
add	esi, eax
test	bl, 1
jnz	short loc_74CB7D
shr	ebx, 1
jz	short loc_74CB78

loc_74CB64:
lea	ecx, [esp+28h+var_10]
push	ecx
push	esi
mov	ecx, edi
dec	ebx
call	sub_714760
add	esi, eax
test	ebx, ebx
jnz	short loc_74CB64

loc_74CB78:
dec	ebx
mov	[esp+28h+var_14], ebx

loc_74CB7D:
cmp	[esp+28h+var_18], 0
jnz	short loc_74CB04
pop	ebp
pop	ebx

loc_74CB86:
mov	ecx, [esp+20h+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn	4
sub_74CA90 endp

align 10h



sub_74CBA0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_10=	byte ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 2Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_4], eax
push	ebx
mov	ebx, [esp+30h+arg_0]
push	ebp
push	esi
mov	esi, [esp+38h+arg_4]
push	edi
lea	eax, [esp+3Ch+var_2C]
lea	edi, [ecx+0Ch]
push	eax
push	ebx
mov	ecx, edi
mov	[esp+44h+var_24], edi
call	sub_7143C0
mov	edx, [esp+3Ch+arg_8]
lea	ecx, [esp+3Ch+var_28]
push	ecx
add	esi, 0Ch
mov	ebp, eax
push	edx
mov	ecx, esi
add	ebp, ebx
mov	[esp+44h+var_20], esi
call	sub_7143C0
mov	ebx, eax
mov	eax, [esp+3Ch+var_2C]
add	ebx, [esp+3Ch+arg_8]
cmp	eax, [esp+3Ch+var_28]
jz	short loc_74CC11

loc_74CBFA:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
mov	ecx, [esp+2Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn	0Ch

loc_74CC11:
shr	[esp+3Ch+var_2C], 1
jz	loc_74CCB5
jmp	short loc_74CC28
align 10h

loc_74CC20:
mov	edi, [esp+3Ch+var_24]
mov	esi, [esp+3Ch+var_20]

loc_74CC28:
dec	[esp+3Ch+var_2C]
lea	ecx, [esp+3Ch+var_10]
push	ecx
push	ebp
mov	ecx, edi
call	sub_714760
lea	edx, [esp+3Ch+var_1C]
push	edx
push	ebx
mov	ecx, esi
mov	edi, eax
call	sub_714760
mov	[esp+3Ch+var_28], eax
cmp	edi, eax
jnz	short loc_74CBFA
mov	ecx, edi
lea	edx, [esp+3Ch+var_1C]
lea	esi, [esp+3Ch+var_10]
cmp	edi, 4
jb	short loc_74CC74
nop

loc_74CC60:
mov	eax, [esi]
cmp	eax, [edx]
jnz	short loc_74CBFA
sub	ecx, 4
add	edx, 4
add	esi, 4
cmp	ecx, 4
jnb	short loc_74CC60

loc_74CC74:
test	ecx, ecx
jz	short loc_74CCA4
mov	al, [edx]
cmp	al, [esi]
jnz	loc_74CBFA
cmp	ecx, 1
jbe	short loc_74CCA4
mov	al, [edx+1]
cmp	al, [esi+1]
jnz	loc_74CBFA
cmp	ecx, 2
jbe	short loc_74CCA4
mov	cl, [edx+2]
cmp	cl, [esi+2]
jnz	loc_74CBFA

loc_74CCA4:
add	ebx, [esp+3Ch+var_28]
add	ebp, edi
cmp	[esp+3Ch+var_2C], 0
jnz	loc_74CC20

loc_74CCB5:
mov	ecx, [esp+3Ch+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
mov	al, 1
call	sub_7999A3
add	esp, 2Ch
retn	0Ch
sub_74CBA0 endp

align 10h



sub_74CCD0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14h+var_4], eax
push	ebx
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
lea	eax, [esp+20h+var_14]
lea	ebx, [ecx+0Ch]
push	eax
push	edi
mov	ecx, ebx
xor	esi, esi
call	sub_7143C0
add	edi, eax
shr	[esp+20h+var_14], 1
jz	short loc_74CD3D
push	ebp

loc_74CD00:
dec	[esp+24h+var_14]
lea	ecx, [esp+24h+var_10]
push	ecx
push	edi
mov	ecx, ebx
call	sub_714760
add	edi, eax
xor	ecx, ecx
test	eax, eax
jbe	short loc_74CD35
lea	esp, [esp+0]

loc_74CD20:
movzx	edx, [esp+ecx+24h+var_10]
mov	ebp, esi
shl	ebp, 5
add	ebp, esi
xor	edx, ebp
inc	ecx
mov	esi, edx
cmp	ecx, eax
jb	short loc_74CD20

loc_74CD35:
cmp	[esp+24h+var_14], 0
jnz	short loc_74CD00
pop	ebp

loc_74CD3D:
mov	ecx, [esp+20h+var_4]
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14h
retn	4
sub_74CCD0 endp

align 10h



sub_74CD60 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

mov	eax, [esp+arg_0]
cmp	eax, [ecx+4Ch]
jnb	short locret_74CD81
mov	ecx, [ecx+58h]
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
mov	cx, [esp+arg_4]
and	eax, 3Fh
mov	[edx+eax*8+2], cx

locret_74CD81:
retn	8
sub_74CD60 endp

align 10h



sub_74CD90 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
test	eax, eax
jz	short loc_74CDD3
mov	ecx, [esi+0Ch]
push	edi
lea	edi, [ecx+eax*4-4]

loc_74CDA2:
dec	dword ptr [esi+4]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
sub	edi, 4
cmp	dword ptr [esi+4], 0
jnz	short loc_74CDA2
dec	dword ptr [esi+4]
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0Ch]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi

loc_74CDD3:
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+4], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+0Ch], 0
pop	esi
retn
sub_74CD90 endp




sub_74CDF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_74CE40
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_74CE20
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_74CE39

loc_74CE20:
lea	eax, [esp+8+arg_0]
mov	[esp+8+arg_0], 105h
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
push	100h
call	edx

loc_74CE39:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_74CE40:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
mov	[esp+8+arg_0], 105h
mov	eax, [ecx]
mov	eax, [eax+28h]
push	edx
push	100h
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_74CDF0 endp

align 10h



sub_74CE70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_74CEC0
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_74CEA0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_74CEB9

loc_74CEA0:
lea	eax, [esp+8+arg_0]
mov	[esp+8+arg_0], 105h
mov	edx, [ecx]
mov	edx, [edx+28h]
push	eax
push	100h
call	edx

loc_74CEB9:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_74CEC0:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
mov	[esp+8+arg_0], 105h
mov	eax, [ecx]
mov	eax, [eax+28h]
push	edx
push	200h
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_74CE70 endp

align 10h



sub_74CEF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_74CF44
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_74CF20
push	ebp
mov	ebp, [ecx]
lea	eax, ds:400h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_74CF3A

loc_74CF20:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 105h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	400h
push	esi
call	edx

loc_74CF3A:
add	dword ptr [esi+8], 100h
mov	[esi+0Ch], eax

loc_74CF44:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 105h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_74CEF0 endp

align 10h



sub_74CF80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	eax, esi
shr	eax, 0Ch
mov	edx, [edx+eax*4]
mov	eax, [esp+10h+arg_4]
mov	edi, esi
and	edi, 0FFFh
mov	[edi+edx], al
mov	ebp, [ecx]
mov	ebp, [ebp+0Ch]
lea	edi, [esi+1]
mov	ebx, edi
shr	ebx, 0Ch
mov	ebx, [ebp+ebx*4+0]
mov	edx, eax
shr	edx, 8
and	edi, 0FFFh
mov	[edi+ebx], dl
mov	ebp, [ecx]
mov	ebp, [ebp+0Ch]
lea	edi, [esi+2]
mov	ebx, edi
mov	edx, eax
shr	edx, 10h
shr	ebx, 0Ch
mov	ebx, [ebp+ebx*4+0]
and	edi, 0FFFh
mov	[edi+ebx], dl
mov	ecx, [ecx]
mov	ecx, [ecx+0Ch]
add	esi, 3
mov	edx, esi
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
and	esi, 0FFFh
pop	edi
shr	eax, 18h
mov	[esi+edx], al
pop	esi
pop	ebp
pop	ebx
retn	8
sub_74CF80 endp

align 10h



sub_74D010 proc	near

var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
sub	esp, 194h
push	esi
mov	esi, [esp+198h+arg_4]
mov	ecx, eax
sub	ecx, esi
cmp	ecx, 2
jb	loc_74D46D
push	ebx
mov	ebx, [esp+19Ch+arg_0]
push	ebp
push	edi
lea	ecx, [esp+1A4h+var_140]
mov	[esp+1A4h+var_184], esi
mov	[esp+1A4h+var_180], eax

loc_74D045:
mov	[esp+1A4h+var_188], ecx
lea	esp, [esp+0]

loc_74D050:
mov	edx, [esp+1A4h+var_180]
mov	eax, edx
sub	eax, esi
cmp	eax, 9
mov	ebp, esi
jle	loc_74D34B
cdq
sub	eax, edx
mov	edx, [ebx+0Ch]
sar	eax, 1
add	eax, esi
mov	ecx, eax
and	eax, 3Fh
shr	ecx, 6
mov	ecx, [edx+ecx*4]
lea	ecx, [ecx+eax*8]
mov	edi, esi
and	edi, 3Fh
shr	ebp, 6
add	edi, edi
add	ebp, ebp
add	ebp, ebp
mov	eax, [edx+ebp]
add	edi, edi
add	edi, edi
mov	edx, [eax+edi]
add	eax, edi
mov	[esp+1A4h+var_170], edx
mov	edx, [eax+4]
mov	[esp+1A4h+var_16C], edx
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [esp+1A4h+var_170]
mov	edx, [esp+1A4h+var_16C]
mov	[ecx], eax
mov	[ecx+4], edx
mov	edx, [ebx+0Ch]
lea	ecx, [esi+1]
mov	esi, [esp+1A4h+var_180]
mov	eax, ecx
mov	[esp+1A4h+var_194], ecx
shr	eax, 6
and	ecx, 3Fh
add	eax, eax
add	eax, eax
add	ecx, ecx
mov	[esp+1A4h+var_178], eax
mov	eax, [edx+eax]
add	ecx, ecx
add	ecx, ecx
add	eax, ecx
mov	[esp+1A4h+var_17C], ecx
mov	[esp+1A4h+var_18C], eax
dec	esi
mov	ecx, esi
shr	ecx, 6
add	ecx, ecx
mov	eax, esi
and	eax, 3Fh
add	eax, eax
add	ecx, ecx
add	eax, eax
mov	[esp+1A4h+var_174], ecx
mov	ecx, [ecx+edx]
add	eax, eax
add	ecx, eax
mov	[esp+1A4h+var_190], eax
mov	eax, [esp+1A4h+var_18C]
push	eax
push	ecx
call	[esp+1ACh+arg_C]
add	esp, 8
test	al, al
jz	short loc_74D15B
mov	ecx, [ebx+0Ch]
mov	edx, [esp+1A4h+var_178]
mov	eax, [ecx+edx]
add	eax, [esp+1A4h+var_17C]
mov	edx, [esp+1A4h+var_174]
mov	ecx, [ecx+edx]
add	ecx, [esp+1A4h+var_190]
mov	edx, [ecx]
mov	[esp+1A4h+var_150], edx
mov	edx, [ecx+4]
mov	[esp+1A4h+var_14C], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	ecx, [esp+1A4h+var_150]
mov	edx, [esp+1A4h+var_14C]
mov	[eax], ecx
mov	[eax+4], edx

loc_74D15B:
mov	ecx, [ebx+0Ch]
mov	eax, [esp+1A4h+var_178]
mov	eax, [ecx+eax]
add	eax, [esp+1A4h+var_17C]
mov	ecx, [ecx+ebp]
add	ecx, edi
push	eax
push	ecx
call	[esp+1ACh+arg_C]
add	esp, 8
test	al, al
jz	short loc_74D1B6
mov	ecx, [ebx+0Ch]
mov	edx, [esp+1A4h+var_178]
mov	eax, [ecx+edx]
mov	ecx, [ecx+ebp]
add	eax, [esp+1A4h+var_17C]
mov	edx, [ecx+edi]
add	ecx, edi
mov	[esp+1A4h+var_158], edx
mov	edx, [ecx+4]
mov	[esp+1A4h+var_154], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	ecx, [esp+1A4h+var_158]
mov	edx, [esp+1A4h+var_154]
mov	[eax], ecx
mov	[eax+4], edx

loc_74D1B6:
mov	ecx, [ebx+0Ch]
mov	eax, [ecx+ebp]
mov	edx, [esp+1A4h+var_174]
mov	ecx, [ecx+edx]
add	ecx, [esp+1A4h+var_190]
add	eax, edi
push	eax
push	ecx
call	[esp+1ACh+arg_C]
add	esp, 8
test	al, al
jz	short loc_74D210
mov	ecx, [ebx+0Ch]
mov	eax, [ecx+ebp]
mov	edx, [esp+1A4h+var_174]
mov	ecx, [ecx+edx]
add	eax, edi
add	ecx, [esp+1A4h+var_190]
mov	edx, [ecx]
mov	[esp+1A4h+var_168], edx
mov	edx, [ecx+4]
mov	[esp+1A4h+var_164], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	ecx, [esp+1A4h+var_168]
mov	edx, [esp+1A4h+var_164]
mov	[eax], ecx
mov	[eax+4], edx

loc_74D210:
mov	eax, [ebx+0Ch]
mov	edx, [eax+ebp]
mov	ecx, [esp+1A4h+var_194]
inc	ecx
add	edx, edi
mov	[esp+1A4h+var_18C], edx
mov	edx, ecx
mov	[esp+1A4h+var_194], ecx
shr	edx, 6
mov	eax, [eax+edx*4]
and	ecx, 3Fh
lea	eax, [eax+ecx*8]
mov	ecx, [esp+1A4h+var_18C]
push	ecx
push	eax
call	[esp+1ACh+arg_C]
add	esp, 8
test	al, al
jnz	short loc_74D210

loc_74D247:
mov	eax, [ebx+0Ch]
dec	esi
mov	edx, esi
shr	edx, 6
mov	edx, [eax+edx*4]
mov	eax, [eax+ebp]
mov	ecx, esi
and	ecx, 3Fh
lea	ecx, [edx+ecx*8]
add	eax, edi
push	ecx
push	eax
call	[esp+1ACh+arg_C]
add	esp, 8
test	al, al
jnz	short loc_74D247
mov	edx, esi
and	edx, 3Fh
cmp	[esp+1A4h+var_194], esi
jg	short loc_74D2CD
mov	eax, [ebx+0Ch]
mov	ecx, esi
shr	ecx, 6
mov	ecx, [eax+ecx*4]
lea	edx, [ecx+edx*8]
mov	ecx, [esp+1A4h+var_194]
mov	[esp+1A4h+var_18C], edx
mov	edx, ecx
shr	edx, 6
mov	eax, [eax+edx*4]
and	ecx, 3Fh
mov	edx, [eax+ecx*8+4]
lea	eax, [eax+ecx*8]
mov	ecx, [eax]
mov	[esp+1A4h+var_160], ecx
mov	ecx, [esp+1A4h+var_18C]
mov	[esp+1A4h+var_15C], edx
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [esp+1A4h+var_160]
mov	edx, [esp+1A4h+var_15C]
mov	[ecx], eax
mov	[ecx+4], edx
jmp	loc_74D210

loc_74D2CD:
mov	ecx, [ebx+0Ch]
mov	ebp, [ecx+ebp]
add	ebp, edi
mov	eax, esi
shr	eax, 6
mov	eax, [ecx+eax*4]
mov	ecx, [ebp+0]
mov	edi, [eax+edx*8]
lea	eax, [eax+edx*8]
mov	edx, [ebp+4]
mov	[ebp+0], edi
mov	edi, [eax+4]
mov	[ebp+4], edi
mov	[eax], ecx
mov	ecx, [esp+1A4h+var_180]
mov	[eax+4], edx
mov	eax, [esp+1A4h+var_194]
mov	edx, [esp+1A4h+var_184]
mov	edi, ecx
mov	ebp, esi
sub	edi, eax
sub	ebp, edx
cmp	ebp, edi
jle	short loc_74D32C
mov	ecx, [esp+1A4h+var_188]
add	[esp+1A4h+var_188], 8
mov	[ecx+4], esi
mov	[ecx], edx
mov	ecx, [esp+1A4h+var_188]
mov	[esp+1A4h+var_184], eax
mov	esi, eax
jmp	loc_74D050

loc_74D32C:
mov	edx, [esp+1A4h+var_188]
add	[esp+1A4h+var_188], 8
mov	[edx+4], ecx
mov	ecx, [esp+1A4h+var_188]
mov	[esp+1A4h+var_180], esi
mov	esi, [esp+1A4h+var_184]
mov	[edx], eax
jmp	loc_74D050

loc_74D34B:
inc	esi
cmp	esi, edx
mov	[esp+1A4h+var_194], esi
jge	loc_74D44A

loc_74D358:
mov	eax, [ebx+0Ch]
mov	esi, ebp
mov	edi, ebp
and	edi, 3Fh
shr	esi, 6
add	edi, edi
add	esi, esi
add	esi, esi
mov	ecx, [eax+esi]
add	edi, edi
add	edi, edi
add	ecx, edi
mov	[esp+1A4h+var_190], ecx
lea	ecx, [ebp+1]
mov	edx, ecx
shr	edx, 6
mov	eax, [eax+edx*4]
and	ecx, 3Fh
lea	eax, [eax+ecx*8]
mov	ecx, [esp+1A4h+var_190]
push	ecx
push	eax
call	[esp+1ACh+arg_C]
add	esp, 8
test	al, al
jz	loc_74D431
lea	ecx, [ebp+1]
jmp	short loc_74D3AA

loc_74D3A6:
mov	ecx, [esp+1A4h+var_18C]

loc_74D3AA:
mov	eax, [ebx+0Ch]
mov	esi, [eax+esi]
add	esi, edi
mov	edx, ecx
shr	edx, 6
mov	eax, [eax+edx*4]
mov	edi, ecx
and	edi, 3Fh
mov	edx, [eax+edi*8]
lea	eax, [eax+edi*8]
mov	edi, [eax+4]
mov	[esp+1A4h+var_144], edi
mov	edi, [esi]
mov	[eax], edi
mov	edi, [esi+4]
mov	[eax+4], edi
mov	[esi], edx
mov	edx, [esp+1A4h+var_144]
mov	[esi+4], edx
cmp	ebp, [esp+1A4h+var_184]
jz	short loc_74D431
mov	eax, [ebx+0Ch]
dec	ebp
mov	esi, ebp
mov	edi, ebp
and	edi, 3Fh
shr	esi, 6
add	edi, edi
add	esi, esi
add	esi, esi
mov	edx, [esi+eax]
add	edi, edi
dec	ecx
add	edi, edi
add	edx, edi
mov	[esp+1A4h+var_190], edx
mov	edx, ecx
mov	[esp+1A4h+var_18C], ecx
shr	edx, 6
mov	eax, [eax+edx*4]
and	ecx, 3Fh
lea	eax, [eax+ecx*8]
mov	ecx, [esp+1A4h+var_190]
push	ecx
push	eax
call	[esp+1ACh+arg_C]
add	esp, 8
test	al, al
jnz	loc_74D3A6

loc_74D431:
mov	eax, [esp+1A4h+var_194]
mov	ebp, eax
inc	eax
cmp	eax, [esp+1A4h+var_180]
mov	[esp+1A4h+var_194], eax
jl	loc_74D358
mov	ecx, [esp+1A4h+var_188]

loc_74D44A:
lea	edx, [esp+1A4h+var_140]
cmp	ecx, edx
jbe	short loc_74D46A
mov	eax, [ecx-8]
mov	edx, [ecx-4]
sub	ecx, 8
mov	[esp+1A4h+var_184], eax
mov	[esp+1A4h+var_180], edx
mov	esi, eax
jmp	loc_74D045

loc_74D46A:
pop	edi
pop	ebp
pop	ebx

loc_74D46D:
pop	esi
add	esp, 194h
retn
sub_74D010 endp

align 10h



sub_74D480 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_74D493
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_74D4B5

loc_74D493:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_74D4BA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_74D4B5:
call	sub_74D9A0

loc_74D4BA:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*4]
mov	ebp, [esi+edx*4+8]
lea	eax, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_74D4FA
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	edx, [edx+8]
pop	esi
mov	[eax+10h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_74D4FA:
push	edi
mov	edi, [esi+4]
mov	edx, ecx
push	ebx

loc_74D501:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*4]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_74D501
mov	ebx, [eax+4]
lea	edi, [edx+edx*4]
lea	edi, [esi+edi*4+8]
cmp	ebx, ecx
jnz	short loc_74D55D
test	edi, edi
jz	short loc_74D53C
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
lea	esi, [edi+8]
mov	edi, [eax+8]
mov	[esi], edi
mov	edi, [eax+0Ch]
mov	[esi+4], edi
mov	edi, [eax+10h]
mov	[esi+8], edi

loc_74D53C:
mov	esi, [esp+10h+arg_4]
mov	edi, [esi]
mov	[eax+8], edi
mov	edi, [esi+4]
mov	[eax+0Ch], edi
mov	esi, [esi+8]
pop	ebx
pop	edi
mov	[eax+10h], esi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_74D55D:
lea	ebx, [ebx+ebx*4]
cmp	[esi+ebx*4+8], ecx
lea	ebx, [esi+ebx*4+8]
jz	short loc_74D57F
lea	ebx, [ebx+0]

loc_74D570:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*4]
cmp	[esi+ebx*4+8], ecx
lea	ebx, [esi+ebx*4+8]
jnz	short loc_74D570

loc_74D57F:
test	edi, edi
jz	short loc_74D59F
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
lea	esi, [edi+8]
mov	edi, [eax+8]
mov	[esi], edi
mov	edi, [eax+0Ch]
mov	[esi+4], edi
mov	edi, [eax+10h]
mov	[esi+8], edi

loc_74D59F:
mov	[ebx], edx
mov	edx, [esp+10h+arg_4]
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
pop	ebx
mov	[eax+0Ch], esi
mov	edx, [edx+8]
pop	edi
pop	esi
mov	[eax+10h], edx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_74D480 endp

align 10h



sub_74D5D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
lea	ecx, [edx+edx*2]
cmp	dword ptr [esi+ecx*4+8], 0FFFFFFFEh
lea	ecx, [esi+ecx*4+8]
mov	eax, edx
jz	short loc_74D619
cmp	[ecx+4], edx
jnz	short loc_74D619
push	edi
mov	edi, [esp+8+arg_0]
push	ebx

loc_74D5F2:
cmp	[ecx+4], edx
jnz	short loc_74D600
mov	bx, [ecx+8]
cmp	bx, [edi]
jz	short loc_74D613

loc_74D600:
mov	eax, [ecx]
cmp	eax, 0FFFFFFFFh
jz	short loc_74D610
lea	ecx, [eax+eax*2]
lea	ecx, [esi+ecx*4+8]
jmp	short loc_74D5F2

loc_74D610:
or	eax, 0FFFFFFFFh

loc_74D613:
pop	ebx
pop	edi
pop	esi
retn	8

loc_74D619:
or	eax, 0FFFFFFFFh
pop	esi
retn	8
sub_74D5D0 endp




sub_74D620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_74D633
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_74D655

loc_74D633:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_74D65A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_74D655:
call	sub_74DB10

loc_74D65A:
mov	ecx, [esi]
mov	eax, [esp+8+arg_8]
and	eax, [ecx+4]
inc	dword ptr [ecx]
mov	esi, [esi]
lea	edx, [eax+eax*2]
mov	ebp, [esi+edx*4+8]
lea	ecx, [esi+edx*4+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_74D690
mov	edx, [esp+8+arg_4]
mov	dword ptr [ecx], 0FFFFFFFFh
mov	dx, [edx]
pop	esi
mov	[ecx+8], dx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_74D690:
push	edi
mov	edi, [esi+4]
mov	edx, eax
push	ebx

loc_74D697:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*4+8], 0FFFFFFFEh
jnz	short loc_74D697
lea	edi, [edx+edx*2]
lea	ebx, [esi+edi*4+8]
mov	edi, [ecx+4]
cmp	edi, eax
jnz	short loc_74D6DD
test	ebx, ebx
jz	short loc_74D6C6
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	si, [ecx+8]
mov	[ebx+8], si

loc_74D6C6:
mov	esi, [esp+10h+arg_4]
mov	si, [esi]
pop	ebx
pop	edi
mov	[ecx+8], si
pop	esi
mov	[ecx], edx
mov	[ecx+4], eax
pop	ebp
retn	0Ch

loc_74D6DD:
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jz	short loc_74D6FF
lea	ebx, [ebx+0]

loc_74D6F0:
mov	edi, [edi]
lea	edi, [edi+edi*2]
cmp	[esi+edi*4+8], eax
lea	edi, [esi+edi*4+8]
jnz	short loc_74D6F0

loc_74D6FF:
test	ebx, ebx
jz	short loc_74D713
mov	[ebx], ebp
mov	esi, [ecx+4]
mov	[ebx+4], esi
mov	si, [ecx+8]
mov	[ebx+8], si

loc_74D713:
mov	[edi], edx
mov	edx, [esp+10h+arg_4]
mov	dx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[ecx+8], dx
mov	dword ptr [ecx], 0FFFFFFFFh
mov	[ecx+4], eax
pop	ebp
retn	0Ch
sub_74D620 endp




sub_74D730 proc	near
xor	eax, eax
mov	[ecx+18h], eax
mov	[ecx+28h], eax
retn
sub_74D730 endp

align 10h



sub_74D740 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	esi
mov	ebx, ecx
xor	edi, edi
call	sub_74CA90
cmp	esi, eax
jnb	short loc_74D784
mov	ecx, [ebx+0Ch]
mov	ecx, [ecx+0Ch]
jmp	short loc_74D760
align 10h

loc_74D760:
mov	edx, esi
shr	edx, 0Ch
mov	edx, [ecx+edx*4]
mov	ebx, esi
and	ebx, 0FFFh
movzx	edx, byte ptr [edx+ebx]
mov	ebx, edi
shl	ebx, 5
add	ebx, edi
xor	edx, ebx
inc	esi
mov	edi, edx
cmp	esi, eax
jb	short loc_74D760

loc_74D784:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_74D740 endp

align 10h



sub_74D790 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	esi
mov	ebp, ecx
call	sub_74CA90
mov	edi, [esp+10h+arg_8]
mov	ecx, [esp+10h+arg_4]
mov	ebx, eax
push	edi
mov	[esp+14h+arg_0], ebx
call	sub_74CA90
mov	ecx, ebx
sub	eax, edi
sub	ecx, esi
cmp	ecx, eax
jz	short loc_74D7C7

loc_74D7BE:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn	0Ch

loc_74D7C7:
cmp	esi, ebx
jnb	short loc_74D814
mov	edx, [ebp+0Ch]
mov	ecx, [esp+10h+arg_4]
mov	eax, [edx+0Ch]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+0Ch]
mov	[esp+10h+arg_4], ecx
nop

loc_74D7E0:
mov	ebx, [esp+10h+arg_4]
mov	edx, edi
shr	edx, 0Ch
mov	edx, [ebx+edx*4]
mov	ebx, esi
shr	ebx, 0Ch
mov	ebx, [eax+ebx*4]
mov	ebp, esi
and	ebp, 0FFFh
mov	bl, [ebx+ebp]
mov	ecx, edi
and	ecx, 0FFFh
cmp	bl, [ecx+edx]
jnz	short loc_74D7BE
inc	esi
inc	edi
cmp	esi, [esp+10h+arg_0]
jb	short loc_74D7E0

loc_74D814:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	0Ch
sub_74D790 endp

align 10h



sub_74D820 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [ecx+6Ch]
push	esi
mov	esi, [ecx+8]
mov	esi, [esi+0Ch]
add	eax, 4
mov	edx, eax
push	edi
shr	edx, 0Ch
mov	esi, [esi+edx*4]
mov	edx, [esp+8+arg_0]
mov	edi, eax
and	edi, 0FFFh
mov	[edi+esi], dl
mov	edi, [ecx+8]
mov	edi, [edi+0Ch]
inc	eax
mov	esi, eax
shr	esi, 0Ch
mov	esi, [edi+esi*4]
sar	edx, 8
and	eax, 0FFFh
mov	[eax+esi], dl
mov	eax, [ecx+6Ch]
mov	esi, [ecx+8]
mov	esi, [esi+0Ch]
add	eax, 6
mov	edx, eax
shr	edx, 0Ch
mov	esi, [esi+edx*4]
mov	edx, [esp+8+arg_4]
mov	edi, eax
and	edi, 0FFFh
mov	[edi+esi], dl
mov	edi, [ecx+8]
mov	edi, [edi+0Ch]
inc	eax
mov	esi, eax
shr	esi, 0Ch
mov	esi, [edi+esi*4]
sar	edx, 8
and	eax, 0FFFh
mov	[eax+esi], dl
mov	eax, [ecx+6Ch]
mov	esi, [ecx+8]
mov	esi, [esi+0Ch]
add	eax, 8
mov	edx, eax
shr	edx, 0Ch
mov	esi, [esi+edx*4]
mov	edx, [esp+8+arg_8]
mov	edi, eax
and	edi, 0FFFh
mov	[edi+esi], dl
mov	ecx, [ecx+8]
mov	ecx, [ecx+0Ch]
inc	eax
mov	esi, eax
shr	esi, 0Ch
mov	ecx, [ecx+esi*4]
sar	edx, 8
and	eax, 0FFFh
pop	edi
mov	[eax+ecx], dl
pop	esi
retn	0Ch
sub_74D820 endp

align 10h



sub_74D8E0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_74D8EE
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_74D8EE:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 2
mov	edx, 1505h
mov	edi, edi

loc_74D900:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_74D900
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_74D5D0
pop	esi
pop	ebx
pop	edi
retn	4
sub_74D8E0 endp

align 10h



sub_74D930 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+0]
push	esi
lea	eax, [ebx+ebx*4]
cmp	dword ptr [ecx+eax*4+8], 0FFFFFFFEh
lea	esi, [ecx+eax*4+8]
push	edi
mov	edi, ebx
jz	short loc_74D98E
cmp	[esi+4], ebx
jnz	short loc_74D98E

loc_74D952:
cmp	[esi+4], ebx
jnz	short loc_74D972
mov	eax, [esp+10h+arg_0]
mov	edx, [eax+8]
mov	eax, [eax]
mov	ecx, [esi+10h]
push	edx
push	eax
push	ecx
mov	ecx, [esi+8]
call	sub_74CBA0
test	al, al
jnz	short loc_74D985

loc_74D972:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_74D98E
mov	eax, [ebp+0]
lea	edx, [edi+edi*4]
lea	esi, [eax+edx*4+8]
jmp	short loc_74D952

loc_74D985:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_74D98E:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_74D930 endp

align 10h



sub_74D9A0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_74D9BE
call	sub_6A2740
pop	edi
add	esp, 0Ch
retn	8

loc_74D9BE:
push	esi
cmp	eax, 8
jnb	short loc_74D9CB
mov	esi, 8
jmp	short loc_74DA30

loc_74D9CB:
dec	eax
mov	[esp+14h+arg_4], eax
fild	[esp+14h+arg_4]
test	eax, eax
jge	short loc_74D9DE
fadd	ds:flt_15FCC08

loc_74D9DE:
call	__CIlog
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fnstcw	word ptr [esp+14h+arg_4]
movzx	eax, word ptr [esp+14h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+14h+var_8], eax
fldcw	word ptr [esp+14h+var_8]
fistp	[esp+14h+var_8]
mov	cl, byte ptr [esp+14h+var_8]
shl	esi, cl
fldcw	word ptr [esp+14h+arg_4]

loc_74DA30:
mov	ecx, dword_1855FC0
lea	edx, [esp+14h+var_8]
push	edx
mov	[esp+18h+arg_4], 0
mov	dword ptr [esp+18h+var_8], 105h
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esi+esi*4]
lea	edx, ds:8[edx*4]
push	edx
call	eax
mov	[esp+14h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+14h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_74DA94
xor	eax, eax
jmp	short loc_74DA80
align 10h

loc_74DA80:
mov	ecx, [esp+14h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 14h
sub	esi, 1
jnz	short loc_74DA80

loc_74DA94:
mov	eax, [edi]
test	eax, eax
jz	short loc_74DAFB
mov	eax, [eax+4]
push	ebx
push	ebp
mov	ebp, [esp+1Ch+arg_0]
xor	edi, edi
lea	ebx, [eax+1]
jmp	short loc_74DAB0
align 10h

loc_74DAB0:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [edi+eax+8], 0FFFFFFFEh
lea	esi, [edi+eax+8]
jz	short loc_74DAD9
mov	ecx, [esi+0Ch]
lea	eax, [esi+8]
push	ecx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_74D480
mov	dword ptr [esi], 0FFFFFFFEh

loc_74DAD9:
add	edi, 14h
sub	ebx, 1
jnz	short loc_74DAB0
mov	ecx, dword_1855FC0
mov	eax, [esp+1Ch+var_C]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	edi, [esp+1Ch+var_C]
pop	ebp
pop	ebx

loc_74DAFB:
mov	eax, [esp+14h+arg_4]
pop	esi
mov	[edi], eax
pop	edi
add	esp, 0Ch
retn	8
sub_74D9A0 endp

align 10h



sub_74DB10 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_74DB32
call	sub_6F4100
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_74DB32:
push	esi
cmp	eax, 8
jnb	short loc_74DB3F
mov	esi, 8
jmp	short loc_74DBA4

loc_74DB3F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_74DB52
fadd	ds:flt_15FCC08

loc_74DB52:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_74DBA4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
mov	[esp+1Ch+arg_4], edi
mov	dword ptr [esp+1Ch+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*4]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_74DC04
xor	eax, eax
jmp	short loc_74DBF0
align 10h

loc_74DBF0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 0Ch
sub	esi, 1
jnz	short loc_74DBF0

loc_74DC04:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_74DC76
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_74DC12:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_74DC5C
lea	edx, [esi+8]
mov	eax, 2
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_74DC30:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_74DC30
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_74D620
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_74DC5C:
add	edi, 0Ch
sub	ebx, 1
jnz	short loc_74DC12
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_74DC76:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_74DB10 endp

align 10h



sub_74DC90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 0Ch
cmp	edi, [esi+4]
jb	short loc_74DCA4
push	edi
call	sub_74CEF0

loc_74DCA4:
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
mov	ecx, [esi]
mov	eax, [esp+8+arg_0]
mov	al, [eax]
and	ecx, 0FFFh
mov	[ecx+edx], al
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_74DC90 endp

align 10h



sub_74DCD0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
shr	edi, 0Ch
cmp	edi, [esi+4]
jb	short loc_74DCEB
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DCEB:
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
mov	ecx, [esi]
mov	eax, [esp+10h+arg_0]
and	ecx, 0FFFh
mov	[ecx+edx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	eax, 8
shr	edi, 0Ch
mov	bl, al
cmp	edi, [esi+4]
jb	short loc_74DD1C
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DD1C:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
pop	edi
mov	[ecx+edx], bl
inc	dword ptr [esi]
pop	esi
pop	ebp
pop	ebx
retn	4
sub_74DCD0 endp

align 10h



sub_74DD40 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
shr	edi, 0Ch
cmp	edi, [esi+4]
jb	short loc_74DD5B
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DD5B:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	ebx, [esp+10h+arg_0]
and	ecx, 0FFFh
mov	[ecx+edx], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
mov	eax, ebx
shr	eax, 8
shr	edi, 0Ch
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74DD94
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74DD94:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
mov	eax, ebx
shr	eax, 10h
shr	edi, 0Ch
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74DDC9
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74DDC9:
mov	ecx, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+edi*4]
and	ecx, 0FFFh
mov	[ecx+edx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
shr	ebx, 18h
cmp	edi, [esi+4]
jb	short loc_74DDF4
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DDF4:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
pop	edi
mov	[ecx+edx], bl
inc	dword ptr [esi]
pop	esi
pop	ebp
pop	ebx
retn	4
sub_74DD40 endp

align 10h



sub_74DE10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
shr	edi, 0Ch
cmp	edi, [esi+4]
jb	short loc_74DE2B
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DE2B:
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
mov	ecx, [esi]
mov	eax, [esp+10h+arg_0]
and	ecx, 0FFFh
mov	[ecx+edx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
sar	eax, 8
shr	edi, 0Ch
mov	bl, al
cmp	edi, [esi+4]
jb	short loc_74DE5C
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DE5C:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
pop	edi
mov	[ecx+edx], bl
inc	dword ptr [esi]
pop	esi
pop	ebp
pop	ebx
retn	4
sub_74DE10 endp

align 10h



sub_74DE80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
shr	edi, 0Ch
cmp	ebx, 7Fh
ja	short loc_74DEC5
add	bl, bl
cmp	edi, [esi+4]
jb	short loc_74DEA6
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DEA6:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
pop	edi
mov	[ecx+edx], bl
inc	dword ptr [esi]
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn	4

loc_74DEC5:
mov	al, bl
add	al, al
or	al, 1
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74DEE0
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74DEE0:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
shr	ebx, 7
cmp	edi, [esi+4]
jb	short loc_74DF0B
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DF0B:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 2
pop	ebx
retn	4
sub_74DE80 endp

align 10h



sub_74DF30 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
cmp	ebx, 3Fh
ja	short loc_74DF78
mov	ebp, [ebp+0]
mov	esi, [ebp+0]
add	bl, bl
shr	esi, 0Ch
add	bl, bl
cmp	esi, [ebp+4]
jb	short loc_74DF58
push	esi
mov	ecx, ebp
call	sub_74CEF0

loc_74DF58:
mov	eax, [ebp+0Ch]
mov	ecx, [ebp+0]
mov	edx, [eax+esi*4]
and	ecx, 0FFFh
mov	[ecx+edx], bl
inc	dword ptr [ebp+0]
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn	4

loc_74DF78:
cmp	ebx, 3FFFh
ja	short loc_74DFEF
mov	esi, [ebp+0]
mov	al, bl
add	al, al
push	edi
mov	edi, [esi]
add	al, al
or	al, 1
shr	edi, 0Ch
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74DFA6
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74DFA6:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
shr	ebx, 6
cmp	edi, [esi+4]
jb	short loc_74DFD1
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74DFD1:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 2
pop	ebx
retn	4

loc_74DFEF:
cmp	ebx, 3FFFFFh
ja	short loc_74E046
mov	ecx, [ebp+0]
mov	dl, bl
add	dl, dl
add	dl, dl
lea	eax, [esp+0Ch+arg_0]
or	dl, 2
push	eax
mov	byte ptr [esp+10h+arg_0], dl
call	sub_74DC90
mov	ecx, ebx
shr	ecx, 6
lea	edx, [esp+0Ch+arg_0]
mov	byte ptr [esp+0Ch+arg_0], cl
mov	ecx, [ebp+0]
push	edx
call	sub_74DC90
mov	ecx, [ebp+0]
lea	eax, [esp+0Ch+arg_0]
shr	ebx, 0Eh
push	eax
mov	byte ptr [esp+10h+arg_0], bl
call	sub_74DC90
pop	esi
pop	ebp
mov	eax, 3
pop	ebx
retn	4

loc_74E046:
mov	cl, bl
add	cl, cl
add	cl, cl
or	cl, 3
lea	edx, [esp+0Ch+arg_0]
mov	byte ptr [esp+0Ch+arg_0], cl
mov	ecx, [ebp+0]
push	edx
call	sub_74DC90
lea	ecx, [esp+0Ch+arg_0]
mov	eax, ebx
shr	eax, 6
push	ecx
mov	ecx, [ebp+0]
mov	byte ptr [esp+10h+arg_0], al
call	sub_74DC90
mov	ecx, [ebp+0]
mov	edx, ebx
lea	eax, [esp+0Ch+arg_0]
shr	edx, 0Eh
push	eax
mov	byte ptr [esp+10h+arg_0], dl
call	sub_74DC90
lea	ecx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, [ebp+0]
shr	ebx, 16h
mov	byte ptr [esp+10h+arg_0], bl
call	sub_74DC90
pop	esi
pop	ebp
mov	eax, 4
pop	ebx
retn	4
sub_74DF30 endp

align 10h



sub_74E0B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
lea	eax, [ebx+40h]
shr	edi, 0Ch
cmp	eax, 7Fh
ja	short loc_74E0F8
add	bl, bl
cmp	edi, [esi+4]
jb	short loc_74E0D9
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E0D9:
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+eax], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn	4

loc_74E0F8:
mov	al, bl
add	al, al
or	al, 1
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74E113
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74E113:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
sar	ebx, 7
cmp	edi, [esi+4]
jb	short loc_74E13E
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E13E:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 2
pop	ebx
retn	4
sub_74E0B0 endp

align 10h



sub_74E160 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
lea	eax, [ebx+800h]
shr	edi, 0Ch
cmp	eax, 0FFFh
mov	al, bl
ja	short loc_74E1E2
shl	al, 4
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74E199
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74E199:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
sar	ebx, 4
cmp	edi, [esi+4]
jb	short loc_74E1C4
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E1C4:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 2
pop	ebx
retn	4

loc_74E1E2:
shl	al, 4
or	al, 1
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74E1FC
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74E1FC:
mov	ecx, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+edi*4]
and	ecx, 0FFFh
mov	[ecx+edx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
mov	eax, ebx
sar	eax, 4
shr	edi, 0Ch
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74E231
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74E231:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
sar	ebx, 0Ch
cmp	edi, [esi+4]
jb	short loc_74E25C
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E25C:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 3
pop	ebx
retn	4
sub_74E160 endp

align 10h



sub_74E280 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+0]
push	edi
mov	edi, [esi]
lea	eax, [ebx+800h]
shr	edi, 0Ch
cmp	eax, 0FFFh
mov	al, bl
ja	short loc_74E304
shl	al, 4
or	al, 2
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74E2BB
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74E2BB:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
sar	ebx, 4
cmp	edi, [esi+4]
jb	short loc_74E2E6
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E2E6:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 2
pop	ebx
retn	4

loc_74E304:
shl	al, 4
or	al, 3
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74E31E
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74E31E:
mov	ecx, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+edi*4]
and	ecx, 0FFFh
mov	[ecx+edx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
mov	eax, ebx
sar	eax, 4
shr	edi, 0Ch
mov	byte ptr [esp+10h+arg_0], al
cmp	edi, [esi+4]
jb	short loc_74E353
push	edi
mov	ecx, esi
call	sub_74CEF0
mov	al, byte ptr [esp+10h+arg_0]

loc_74E353:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
sar	ebx, 0Ch
cmp	edi, [esi+4]
jb	short loc_74E37E
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E37E:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebp
mov	eax, 3
pop	ebx
retn	4
sub_74E280 endp

align 10h



sub_74E3A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
lea	eax, [ebx+20h]
push	edi
cmp	eax, 3Fh
mov	eax, [esp+0Ch+arg_4]
mov	edi, ecx
ja	short loc_74E400
lea	ecx, [eax+20h]
cmp	ecx, 3Fh
ja	short loc_74E400
mov	ecx, [edi]
mov	dl, bl
shl	dl, 4
lea	eax, [esp+0Ch+arg_0]
or	dl, 4
push	eax
mov	byte ptr [esp+10h+arg_0], dl
call	sub_74DC90
mov	al, byte ptr [esp+0Ch+arg_4]
sar	ebx, 4
add	al, al
and	bl, 3
add	al, al
lea	ecx, [esp+0Ch+arg_4]
or	bl, al
push	ecx
mov	ecx, [edi]
mov	byte ptr [esp+10h+arg_4], bl
call	sub_74DC90
pop	edi
mov	eax, 2
pop	ebx
pop	ecx
retn	8

loc_74E400:
lea	edx, [ebx+200h]
cmp	edx, 3FFh
ja	short loc_74E475
lea	ecx, [eax+200h]
cmp	ecx, 3FFh
ja	short loc_74E475
mov	ecx, [edi]
mov	dl, bl
shl	dl, 4
lea	eax, [esp+0Ch+arg_0]
or	dl, 5
push	eax
mov	byte ptr [esp+10h+arg_0], dl
call	sub_74DC90
mov	cl, byte ptr [esp+0Ch+arg_4]
sar	ebx, 4
shl	cl, 6
and	bl, 3Fh
or	bl, cl
mov	ecx, [edi]
lea	edx, [esp+0Ch+arg_0]
push	edx
mov	byte ptr [esp+10h+arg_0], bl
call	sub_74DC90
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [edi]
sar	eax, 2
mov	byte ptr [esp+0Ch+arg_4], al
lea	eax, [esp+0Ch+arg_4]
push	eax
call	sub_74DC90
pop	edi
mov	eax, 3
pop	ebx
pop	ecx
retn	8

loc_74E475:
lea	ecx, [ebx+2000h]
cmp	ecx, 3FFFh
ja	short loc_74E4FF
lea	edx, [eax+2000h]
cmp	edx, 3FFFh
ja	short loc_74E4FF
mov	al, bl
shl	al, 4
lea	ecx, [esp+0Ch+arg_0]
or	al, 6
push	ecx
mov	ecx, [edi]
mov	byte ptr [esp+10h+arg_0], al
call	sub_74DC90
mov	ecx, [edi]
mov	edx, ebx
lea	eax, [esp+0Ch+arg_0]
sar	edx, 4
push	eax
mov	byte ptr [esp+10h+arg_0], dl
call	sub_74DC90
mov	cl, byte ptr [esp+0Ch+arg_4]
add	cl, cl
sar	ebx, 0Ch
add	cl, cl
and	bl, 3
or	bl, cl
mov	ecx, [edi]
lea	edx, [esp+0Ch+arg_0]
push	edx
mov	byte ptr [esp+10h+arg_0], bl
call	sub_74DC90
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [edi]
sar	eax, 6
mov	byte ptr [esp+0Ch+arg_4], al
lea	eax, [esp+0Ch+arg_4]
push	eax
call	sub_74DC90
pop	edi
mov	eax, 4
pop	ebx
pop	ecx
retn	8

loc_74E4FF:
push	ebp
push	esi
mov	esi, [edi]
mov	ebp, [esi]
mov	cl, bl
shl	cl, 4
or	cl, 7
shr	ebp, 0Ch
mov	byte ptr [esp+14h+arg_0], cl
cmp	ebp, [esi+4]
jb	short loc_74E525
push	ebp
mov	ecx, esi
call	sub_74CEF0
mov	eax, [esp+14h+arg_4]

loc_74E525:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+ebp*4]
mov	[esp+14h+var_4], eax
mov	al, byte ptr [esp+14h+arg_0]
and	edx, 0FFFh
mov	[edx+ecx], al
inc	dword ptr [esi]
mov	esi, [edi]
mov	ebp, [esi]
mov	eax, [esp+14h+var_4]
mov	ecx, ebx
sar	ecx, 4
shr	ebp, 0Ch
mov	byte ptr [esp+14h+arg_0], cl
cmp	ebp, [esi+4]
jb	short loc_74E565
push	ebp
mov	ecx, esi
call	sub_74CEF0
mov	eax, [esp+14h+arg_4]

loc_74E565:
mov	ecx, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+ebp*4]
and	ecx, 0FFFh
mov	[esp+14h+var_4], eax
mov	al, byte ptr [esp+14h+arg_0]
mov	[ecx+edx], al
inc	dword ptr [esi]
mov	eax, [esp+14h+var_4]
mov	esi, [edi]
mov	ebp, [esi]
sar	ebx, 0Ch
mov	cl, al
and	bl, 3Fh
shl	cl, 6
shr	ebp, 0Ch
or	bl, cl
cmp	ebp, [esi+4]
jb	short loc_74E5A9
push	ebp
mov	ecx, esi
call	sub_74CEF0
mov	eax, [esp+14h+arg_4]

loc_74E5A9:
mov	ecx, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+ebp*4]
and	ecx, 0FFFh
mov	[ecx+edx], bl
inc	dword ptr [esi]
mov	esi, [edi]
mov	ebp, [esi]
mov	ebx, eax
shr	ebp, 0Ch
sar	ebx, 2
cmp	ebp, [esi+4]
jb	short loc_74E5D9
push	ebp
mov	ecx, esi
call	sub_74CEF0
mov	eax, [esp+14h+arg_4]

loc_74E5D9:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+ebp*4]
and	edx, 0FFFh
mov	[edx+ecx], bl
inc	dword ptr [esi]
mov	edi, [edi]
mov	esi, [edi]
sar	eax, 0Ah
shr	esi, 0Ch
mov	bl, al
cmp	esi, [edi+4]
jb	short loc_74E605
push	esi
mov	ecx, edi
call	sub_74CEF0

loc_74E605:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+esi*4]
and	eax, 0FFFh
pop	esi
mov	[eax+ecx], bl
inc	dword ptr [edi]
pop	ebp
pop	edi
mov	eax, 5
pop	ebx
pop	ecx
retn	8
sub_74E3A0 endp

align 10h



sub_74E630 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+14h+arg_4]
cmp	ecx, ebx
push	edi
mov	edx, ebx
mov	edi, ebx
mov	[esp+18h+arg_0], edx
mov	[esp+18h+var_8], edi
jge	short loc_74E657
mov	edx, ecx
mov	[esp+18h+arg_0], ecx

loc_74E657:
jle	short loc_74E65F
mov	edi, ecx
mov	[esp+18h+var_8], ecx

loc_74E65F:
mov	eax, [esp+18h+arg_8]
cmp	eax, edx
jge	short loc_74E66B
mov	[esp+18h+arg_0], eax

loc_74E66B:
cmp	eax, edi
jle	short loc_74E673
mov	[esp+18h+var_8], eax

loc_74E673:
mov	edx, [esp+18h+arg_0]
cmp	[esp+18h+arg_C], edx
mov	edi, [esp+18h+arg_C]
jl	short loc_74E683
mov	edi, edx

loc_74E683:
mov	edx, [esp+18h+var_8]
cmp	[esp+18h+arg_C], edx
mov	edx, [esp+18h+arg_C]
jg	short loc_74E695
mov	edx, [esp+18h+var_8]

loc_74E695:
cmp	edi, 0FFFFFFF0h
jl	loc_74E795
cmp	edx, 0Fh
jg	loc_74E795
mov	edi, [esi]
mov	ebp, [edi]
mov	dl, bl
shl	dl, 4
or	dl, 8
shr	ebp, 0Ch
mov	byte ptr [esp+18h+arg_0], dl
mov	[esp+18h+var_8], edi
cmp	ebp, [edi+4]
jb	short loc_74E6D3
push	ebp
mov	ecx, edi
call	sub_74CEF0
mov	eax, [esp+18h+arg_8]
mov	ecx, [esp+18h+arg_4]

loc_74E6D3:
mov	edx, [edi+0Ch]
mov	edi, [edi]
mov	edx, [edx+ebp*4]
mov	[esp+18h+arg_4], eax
mov	al, byte ptr [esp+18h+arg_0]
and	edi, 0FFFh
mov	[edi+edx], al
mov	edx, [esp+18h+var_8]
inc	dword ptr [edx]
mov	eax, [esp+18h+arg_4]
mov	edi, [esi]
mov	ebp, [edi]
sar	ebx, 4
and	bl, 1
add	cl, cl
or	bl, cl
mov	cl, al
and	bl, 3Fh
shl	cl, 6
or	bl, cl
shr	ebp, 0Ch
mov	byte ptr [esp+18h+arg_4], bl
cmp	ebp, [edi+4]
jb	short loc_74E72C
push	ebp
mov	ecx, edi
call	sub_74CEF0
mov	cl, byte ptr [esp+18h+arg_C]
mov	eax, [esp+18h+arg_8]
jmp	short loc_74E731

loc_74E72C:
movzx	ecx, byte ptr [esp+18h+arg_C]

loc_74E731:
mov	ebx, [edi]
mov	edx, [edi+0Ch]
mov	edx, [edx+ebp*4]
mov	[esp+18h+arg_C], ecx
mov	cl, byte ptr [esp+18h+arg_4]
and	ebx, 0FFFh
mov	[ebx+edx], cl
inc	dword ptr [edi]
mov	ecx, [esp+18h+arg_C]
mov	esi, [esi]
mov	edi, [esi]
add	cl, cl
sar	eax, 2
add	cl, cl
and	al, 7
add	cl, cl
or	al, cl
shr	edi, 0Ch
mov	bl, al
cmp	edi, [esi+4]
jb	short loc_74E773
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E773:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
pop	edi
mov	[ecx+edx], bl
inc	dword ptr [esi]
pop	esi
pop	ebp
mov	eax, 3
pop	ebx
add	esp, 8
retn	10h

loc_74E795:
cmp	edi, 0FFFFFFC0h
jl	loc_74E8D2
cmp	edx, 3Fh
jg	loc_74E8D2
mov	edi, [esi]
mov	ebp, [edi]
mov	dl, bl
shl	dl, 4
or	dl, 9
shr	ebp, 0Ch
mov	byte ptr [esp+18h+arg_0], dl
mov	[esp+18h+var_8], edi
cmp	ebp, [edi+4]
jb	short loc_74E7D3
push	ebp
mov	ecx, edi
call	sub_74CEF0
mov	eax, [esp+18h+arg_8]
mov	ecx, [esp+18h+arg_4]

loc_74E7D3:
mov	edx, [edi+0Ch]
mov	edx, [edx+ebp*4]
mov	edi, [edi]
and	edi, 0FFFh
mov	[esp+18h+var_4], eax
mov	al, byte ptr [esp+18h+arg_0]
mov	[edi+edx], al
mov	edx, [esp+18h+var_8]
inc	dword ptr [edx]
mov	edi, [esi]
mov	eax, [esp+18h+var_4]
sar	ebx, 4
mov	dl, cl
add	dl, dl
and	bl, 7
add	dl, dl
add	dl, dl
or	bl, dl
mov	byte ptr [esp+18h+arg_0], bl
mov	ebx, [edi]
shr	ebx, 0Ch
cmp	ebx, [edi+4]
jb	short loc_74E826
push	ebx
mov	ecx, edi
call	sub_74CEF0
mov	eax, [esp+18h+arg_8]
mov	ecx, [esp+18h+arg_4]

loc_74E826:
mov	edx, [edi+0Ch]
mov	edx, [edx+ebx*4]
mov	ebp, [edi]
mov	bl, byte ptr [esp+18h+arg_0]
and	ebp, 0FFFh
mov	[edx+ebp], bl
inc	dword ptr [edi]
mov	edi, [esi]
mov	ebp, [edi]
sar	ecx, 5
mov	dl, al
add	dl, dl
and	cl, 3
add	dl, dl
or	cl, dl
shr	ebp, 0Ch
mov	byte ptr [esp+18h+arg_4], cl
cmp	ebp, [edi+4]
jb	short loc_74E86D
push	ebp
mov	ecx, edi
call	sub_74CEF0
mov	cl, byte ptr [esp+18h+arg_C]
mov	eax, [esp+18h+arg_8]
jmp	short loc_74E872

loc_74E86D:
movzx	ecx, byte ptr [esp+18h+arg_C]

loc_74E872:
mov	ebx, [edi]
mov	edx, [edi+0Ch]
mov	edx, [edx+ebp*4]
mov	[esp+18h+arg_C], ecx
mov	cl, byte ptr [esp+18h+arg_4]
and	ebx, 0FFFh
mov	[ebx+edx], cl
inc	dword ptr [edi]
mov	esi, [esi]
mov	ecx, [esp+18h+arg_C]
mov	edi, [esi]
sar	eax, 6
and	al, 1
add	cl, cl
or	al, cl
shr	edi, 0Ch
mov	bl, al
cmp	edi, [esi+4]
jb	short loc_74E8B0
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74E8B0:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
pop	edi
mov	[ecx+edx], bl
inc	dword ptr [esi]
pop	esi
pop	ebp
mov	eax, 4
pop	ebx
add	esp, 8
retn	10h

loc_74E8D2:
cmp	edi, 0FFFFFF00h
jl	loc_74E988
cmp	edx, 0FFh
jg	loc_74E988
mov	al, bl
shl	al, 4
lea	ecx, [esp+18h+arg_0]
or	al, 0Ah
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_0], al
call	sub_74DC90
mov	dl, byte ptr [esp+18h+arg_4]
mov	ecx, [esi]
sar	ebx, 4
shl	dl, 5
and	bl, 1Fh
lea	eax, [esp+18h+arg_0]
or	bl, dl
push	eax
mov	byte ptr [esp+1Ch+arg_0], bl
call	sub_74DC90
mov	eax, [esp+18h+arg_4]
mov	ebx, [esp+18h+arg_8]
sar	eax, 3
mov	cl, bl
shl	cl, 6
and	al, 3Fh
or	al, cl
mov	ecx, [esi]
lea	edx, [esp+18h+arg_4]
push	edx
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
mov	al, byte ptr [esp+18h+arg_C]
sar	ebx, 2
shl	al, 7
lea	ecx, [esp+18h+arg_4]
and	bl, 7Fh
or	bl, al
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_4], bl
call	sub_74DC90
mov	eax, [esp+18h+arg_C]
mov	ecx, [esi]
lea	edx, [esp+18h+arg_C]
sar	eax, 1
push	edx
mov	byte ptr [esp+1Ch+arg_C], al
call	sub_74DC90
pop	edi
pop	esi
pop	ebp
mov	eax, 5
pop	ebx
add	esp, 8
retn	10h

loc_74E988:
cmp	edi, 0FFFFFC00h
jl	loc_74EA60
cmp	edx, 3FFh
jg	loc_74EA60
mov	al, bl
shl	al, 4
lea	ecx, [esp+18h+arg_0]
or	al, 0Bh
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_0], al
call	sub_74DC90
mov	dl, byte ptr [esp+18h+arg_4]
mov	ecx, [esi]
sar	ebx, 4
shl	dl, 7
and	bl, 7Fh
lea	eax, [esp+18h+arg_0]
or	bl, dl
push	eax
mov	byte ptr [esp+1Ch+arg_0], bl
call	sub_74DC90
mov	ebx, [esp+18h+arg_4]
mov	ecx, ebx
sar	ecx, 1
lea	edx, [esp+18h+arg_4]
mov	byte ptr [esp+18h+arg_4], cl
mov	ecx, [esi]
push	edx
call	sub_74DC90
sar	ebx, 9
and	ebx, 0FFFFFF03h
mov	[esp+18h+arg_4], ebx
mov	ebx, [esp+18h+arg_8]
mov	al, byte ptr [esp+18h+arg_4]
mov	cl, bl
add	cl, cl
add	cl, cl
or	al, cl
mov	ecx, [esi]
lea	edx, [esp+18h+arg_4]
push	edx
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
mov	al, byte ptr [esp+18h+arg_C]
sar	ebx, 6
shl	al, 5
lea	ecx, [esp+18h+arg_4]
and	bl, 1Fh
or	bl, al
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_4], bl
call	sub_74DC90
mov	eax, [esp+18h+arg_C]
mov	ecx, [esi]
lea	edx, [esp+18h+arg_C]
sar	eax, 3
push	edx
mov	byte ptr [esp+1Ch+arg_C], al
call	sub_74DC90
pop	edi
pop	esi
pop	ebp
mov	eax, 6
pop	ebx
add	esp, 8
retn	10h

loc_74EA60:
cmp	edi, 0FFFFF000h
jl	loc_74EB43
cmp	edx, 0FFFh
jg	loc_74EB43
mov	al, bl
shl	al, 4
lea	ecx, [esp+18h+arg_0]
or	al, 0Ch
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_0], al
call	sub_74DC90
mov	ecx, [esi]
mov	edx, ebx
lea	eax, [esp+18h+arg_0]
sar	edx, 4
push	eax
mov	byte ptr [esp+1Ch+arg_0], dl
call	sub_74DC90
mov	cl, byte ptr [esp+18h+arg_4]
sar	ebx, 0Ch
add	cl, cl
and	bl, 1
or	bl, cl
mov	ecx, [esi]
lea	edx, [esp+18h+arg_0]
push	edx
mov	byte ptr [esp+1Ch+arg_0], bl
call	sub_74DC90
mov	eax, [esp+18h+arg_4]
mov	ebx, [esp+18h+arg_8]
sar	eax, 7
mov	cl, bl
shl	cl, 6
and	al, 3Fh
or	al, cl
mov	ecx, [esi]
lea	edx, [esp+18h+arg_4]
push	edx
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
lea	ecx, [esp+18h+arg_4]
mov	eax, ebx
sar	eax, 2
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
mov	dl, byte ptr [esp+18h+arg_C]
mov	ecx, [esi]
add	dl, dl
sar	ebx, 0Ah
add	dl, dl
add	dl, dl
and	bl, 7
lea	eax, [esp+18h+arg_4]
or	bl, dl
push	eax
mov	byte ptr [esp+1Ch+arg_4], bl
call	sub_74DC90
mov	eax, [esp+18h+arg_C]
lea	ecx, [esp+18h+arg_C]
sar	eax, 5
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_C], al
call	sub_74DC90
pop	edi
pop	esi
pop	ebp
mov	eax, 7
pop	ebx
add	esp, 8
retn	10h

loc_74EB43:
cmp	edi, 0FFFFC000h
jl	loc_74EC49
cmp	edx, 3FFFh
jg	loc_74EC49
mov	ecx, [esi]
mov	dl, bl
shl	dl, 4
lea	eax, [esp+18h+arg_0]
or	dl, 0Dh
push	eax
mov	byte ptr [esp+1Ch+arg_0], dl
call	sub_74DC90
mov	ecx, ebx
sar	ecx, 4
lea	edx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], cl
mov	ecx, [esi]
push	edx
call	sub_74DC90
mov	al, byte ptr [esp+18h+arg_4]
add	al, al
sar	ebx, 0Ch
add	al, al
add	al, al
lea	ecx, [esp+18h+arg_0]
and	bl, 7
or	bl, al
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_0], bl
call	sub_74DC90
mov	ebx, [esp+18h+arg_4]
mov	ecx, [esi]
mov	edx, ebx
lea	eax, [esp+18h+arg_4]
sar	edx, 5
push	eax
mov	byte ptr [esp+1Ch+arg_4], dl
call	sub_74DC90
sar	ebx, 0Dh
and	ebx, 0FFFFFF03h
mov	[esp+18h+arg_4], ebx
mov	ebx, [esp+18h+arg_8]
mov	al, byte ptr [esp+18h+arg_4]
mov	cl, bl
add	cl, cl
add	cl, cl
or	al, cl
mov	ecx, [esi]
lea	edx, [esp+18h+arg_4]
push	edx
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
lea	ecx, [esp+18h+arg_4]
mov	eax, ebx
sar	eax, 6
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
mov	dl, byte ptr [esp+18h+arg_C]
mov	ecx, [esi]
sar	ebx, 0Eh
add	dl, dl
and	bl, 1
lea	eax, [esp+18h+arg_4]
or	bl, dl
push	eax
mov	byte ptr [esp+1Ch+arg_4], bl
call	sub_74DC90
mov	eax, [esp+18h+arg_C]
lea	ecx, [esp+18h+arg_C]
sar	eax, 7
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_C], al
call	sub_74DC90
pop	edi
pop	esi
pop	ebp
mov	eax, 8
pop	ebx
add	esp, 8
retn	10h

loc_74EC49:
cmp	edi, 0FFFF0000h
jl	loc_74ED60
cmp	edx, 0FFFFh
jg	loc_74ED60
mov	ecx, [esi]
mov	dl, bl
shl	dl, 4
lea	eax, [esp+18h+arg_0]
or	dl, 0Eh
push	eax
mov	byte ptr [esp+1Ch+arg_0], dl
call	sub_74DC90
mov	ecx, ebx
sar	ecx, 4
lea	edx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], cl
mov	ecx, [esi]
push	edx
call	sub_74DC90
mov	al, byte ptr [esp+18h+arg_4]
sar	ebx, 0Ch
shl	al, 5
lea	ecx, [esp+18h+arg_0]
and	bl, 1Fh
or	bl, al
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_0], bl
call	sub_74DC90
mov	ebx, [esp+18h+arg_4]
mov	ecx, [esi]
mov	edx, ebx
lea	eax, [esp+18h+arg_4]
sar	edx, 3
push	eax
mov	byte ptr [esp+1Ch+arg_4], dl
call	sub_74DC90
sar	ebx, 0Bh
and	ebx, 0FFFFFF3Fh
mov	[esp+18h+arg_4], ebx
mov	ebx, [esp+18h+arg_8]
mov	al, byte ptr [esp+18h+arg_4]
mov	cl, bl
shl	cl, 6
or	al, cl
mov	ecx, [esi]
lea	edx, [esp+18h+arg_4]
push	edx
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
lea	ecx, [esp+18h+arg_4]
mov	eax, ebx
sar	eax, 2
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
mov	dl, byte ptr [esp+18h+arg_C]
mov	ecx, [esi]
sar	ebx, 0Ah
shl	dl, 7
and	bl, 7Fh
lea	eax, [esp+18h+arg_4]
or	bl, dl
push	eax
mov	byte ptr [esp+1Ch+arg_4], bl
call	sub_74DC90
mov	ebx, [esp+18h+arg_C]
mov	ecx, ebx
sar	ecx, 1
lea	edx, [esp+18h+arg_C]
mov	byte ptr [esp+18h+arg_C], cl
mov	ecx, [esi]
push	edx
call	sub_74DC90
mov	ecx, [esi]
lea	eax, [esp+18h+arg_C]
sar	ebx, 9
push	eax
mov	byte ptr [esp+1Ch+arg_C], bl
call	sub_74DC90
pop	edi
pop	esi
mov	eax, 9
pop	ebp
pop	ebx
add	esp, 8
retn	10h

loc_74ED60:
mov	cl, bl
shl	cl, 4
or	cl, 0Fh
lea	edx, [esp+18h+arg_0]
mov	byte ptr [esp+18h+arg_0], cl
mov	ecx, [esi]
push	edx
call	sub_74DC90
lea	ecx, [esp+18h+arg_0]
mov	eax, ebx
sar	eax, 4
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_0], al
call	sub_74DC90
mov	dl, byte ptr [esp+18h+arg_4]
mov	ecx, [esi]
sar	ebx, 0Ch
shl	dl, 7
and	bl, 7Fh
lea	eax, [esp+18h+arg_0]
or	bl, dl
push	eax
mov	byte ptr [esp+1Ch+arg_0], bl
call	sub_74DC90
mov	ebx, [esp+18h+arg_4]
mov	ecx, ebx
sar	ecx, 1
lea	edx, [esp+18h+arg_4]
mov	byte ptr [esp+18h+arg_4], cl
mov	ecx, [esi]
push	edx
call	sub_74DC90
lea	ecx, [esp+18h+arg_4]
mov	eax, ebx
sar	eax, 9
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_4], al
call	sub_74DC90
mov	ecx, [esi]
sar	ebx, 11h
and	ebx, 0FFFFFF03h
mov	[esp+18h+arg_4], ebx
mov	ebx, [esp+18h+arg_8]
mov	al, byte ptr [esp+18h+arg_4]
mov	dl, bl
add	dl, dl
add	dl, dl
or	al, dl
mov	byte ptr [esp+18h+arg_4], al
lea	eax, [esp+18h+arg_4]
push	eax
call	sub_74DC90
mov	ecx, ebx
sar	ecx, 6
lea	edx, [esp+18h+arg_4]
mov	byte ptr [esp+18h+arg_4], cl
mov	ecx, [esi]
push	edx
call	sub_74DC90
mov	al, byte ptr [esp+18h+arg_C]
sar	ebx, 0Eh
shl	al, 5
lea	ecx, [esp+18h+arg_4]
and	bl, 1Fh
or	bl, al
push	ecx
mov	ecx, [esi]
mov	byte ptr [esp+1Ch+arg_4], bl
call	sub_74DC90
mov	ebx, [esp+18h+arg_C]
mov	ecx, [esi]
mov	edx, ebx
lea	eax, [esp+18h+arg_C]
sar	edx, 3
push	eax
mov	byte ptr [esp+1Ch+arg_C], dl
call	sub_74DC90
sar	ebx, 0Bh
mov	byte ptr [esp+18h+arg_C], bl
lea	ecx, [esp+18h+arg_C]
push	ecx
mov	ecx, [esi]
call	sub_74DC90
pop	edi
pop	esi
pop	ebp
mov	eax, 0Ah
pop	ebx
add	esp, 8
retn	10h
sub_74E630 endp

align 10h



sub_74EE80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	eax, 2
mov	edx, 1505h

loc_74EE90:
movzx	edi, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, edi
test	eax, eax
ja	short loc_74EE90
push	edx
push	esi
push	ecx
call	sub_74D620
pop	edi
pop	esi
retn	4
sub_74EE80 endp

align 10h



sub_74EEB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+0]
push	esi
lea	eax, [ebx+ebx*4]
cmp	dword ptr [ecx+eax*4+8], 0FFFFFFFEh
lea	esi, [ecx+eax*4+8]
push	edi
mov	edi, ebx
jz	short loc_74EF0E
cmp	[esi+4], ebx
jnz	short loc_74EF0E

loc_74EED2:
cmp	[esi+4], ebx
jnz	short loc_74EEF2
mov	eax, [esp+10h+arg_0]
mov	edx, [eax+8]
mov	eax, [eax]
mov	ecx, [esi+10h]
push	edx
push	eax
push	ecx
mov	ecx, [esi+8]
call	sub_74D790
test	al, al
jnz	short loc_74EF05

loc_74EEF2:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_74EF0E
mov	eax, [ebp+0]
lea	edx, [edi+edi*4]
lea	esi, [eax+edx*4+8]
jmp	short loc_74EED2

loc_74EF05:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_74EF0E:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_74EEB0 endp

align 10h



sub_74EF20 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1440D0C
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
xor	ecx, ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
mov	[eax+54h], ecx
mov	[eax+58h], ecx
mov	[eax+5Ch], ecx
mov	[eax+60h], ecx
mov	[eax+64h], ecx
mov	[eax+68h], ecx
retn	4
sub_74EF20 endp

align 10h



sub_74EF90 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+5Ch]
mov	dword ptr [esi], offset	off_1440D0C
call	sub_74CD90
lea	ecx, [esi+4Ch]
call	sub_74CD90
lea	ecx, [esi+48h]
call	sub_6F4100
lea	ecx, [esi+38h]
call	sub_74CD90
lea	ecx, [esi+28h]
call	sub_74CD90
lea	ecx, [esi+18h]
call	sub_74CD90
lea	ecx, [esi+14h]
call	sub_6A2740
lea	ecx, [esi+10h]
call	sub_6A2740
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_74EF90 endp

align 10h



sub_74EFF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 18h
mov	eax, [ecx+28h]
dec	eax
mov	edx, eax
push	ebx
shr	edx, 6
push	esi
mov	esi, [ecx+34h]
mov	edx, [esi+edx*4]
mov	esi, [ecx+24h]
and	eax, 3Fh
lea	ebx, [edx+eax*8]
mov	eax, [ecx+18h]
dec	eax
mov	edx, eax
shr	edx, 6
mov	edx, [esi+edx*4]
and	eax, 3Fh
mov	eax, [edx+eax*4]
push	edi
mov	[esp+24h+var_10], ecx
mov	[esp+24h+var_4], ebx
test	al, 1
jnz	short loc_74F063
mov	edx, [ebx]
mov	edi, [ecx+24h]
mov	esi, edx
shr	esi, 6
mov	esi, [edi+esi*4]
and	edx, 3Fh
mov	edx, [esi+edx*4]
mov	[esp+24h+var_18], edx
cmp	word ptr [esp+24h+var_18], ax
jnz	short loc_74F063
shr	edx, 10h
shr	eax, 10h
cmp	dx, ax
jnz	short loc_74F063
dec	dword ptr [ebx+4]
mov	eax, [ecx+18h]
test	eax, eax
jz	short loc_74F063
dec	eax
mov	[ecx+18h], eax

loc_74F063:
cmp	dword ptr [ebx+4], 3
jnb	short loc_74F089
mov	ebx, [ebx]
cmp	ebx, [ecx+18h]
jnb	short loc_74F073
mov	[ecx+18h], ebx

loc_74F073:
mov	eax, [ecx+28h]
test	eax, eax
jz	loc_74F319
pop	edi
dec	eax
pop	esi
mov	[ecx+28h], eax
pop	ebx
add	esp, 18h
retn

loc_74F089:
mov	eax, [ebx]
mov	edi, [ecx+24h]
mov	edx, eax
shr	edx, 6
mov	edx, [edi+edx*4]
mov	esi, eax
and	esi, 3Fh
movsx	edx, word ptr [edx+esi*4]
sar	edx, 1
mov	[esp+24h+var_8], edx
mov	edx, eax
shr	edx, 6
mov	edx, [edi+edx*4]
mov	esi, eax
and	esi, 3Fh
movsx	edx, word ptr [edx+esi*4+2]
mov	[esp+24h+var_C], edx
push	ebp
mov	edx, 1
xor	ebp, ebp
cmp	[ebx+4], edx
jbe	loc_74F318
inc	eax
mov	[esp+28h+var_14], eax

loc_74F0D1:
mov	esi, eax
shr	esi, 6
mov	esi, [edi+esi*4]
and	eax, 3Fh
mov	eax, [esi+eax*4]
mov	[esp+28h+var_18], eax
test	byte ptr [esp+28h+var_18], 1
jz	short loc_74F0F1
inc	edx
inc	[esp+28h+var_14]
jmp	short loc_74F11A

loc_74F0F1:
mov	esi, [esp+28h+var_C]
shr	eax, 10h
cwde
cmp	eax, esi
jge	short loc_74F103
mov	[esp+28h+var_C], eax
jmp	short loc_74F118

loc_74F103:
jnz	short loc_74F11A
movsx	eax, word ptr [esp+28h+var_18]
mov	esi, eax
sar	esi, 1
cmp	esi, [esp+28h+var_8]
jge	short loc_74F11A
mov	[esp+28h+var_8], eax

loc_74F118:
mov	ebp, edx

loc_74F11A:
mov	eax, [esp+28h+var_14]
inc	edx
inc	eax
mov	[esp+28h+var_14], eax
cmp	edx, [ebx+4]
jb	short loc_74F0D1
test	ebp, ebp
jz	loc_74F318
lea	esi, [ecx+38h]
mov	dword ptr [esi], 0
mov	eax, [ebx]
add	eax, ebp
mov	edx, eax
shr	edx, 6
mov	edx, [edi+edx*4]
mov	edi, [esi]
and	eax, 3Fh
mov	eax, [edx+eax*4]
mov	[esp+28h+var_18], eax
and	word ptr [esp+28h+var_18], 0FFFEh
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_74F16C
push	edi
mov	ecx, esi
call	sub_74CDF0
mov	ecx, [esp+28h+var_10]

loc_74F16C:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	edx, [edx+edi*4]
mov	edi, [esp+28h+var_18]
and	eax, 3Fh
mov	[edx+eax*4], edi
mov	eax, 1
add	[esi], eax
mov	[esp+28h+var_14], eax
cmp	[ebx+4], eax
jbe	loc_74F29F

loc_74F192:
mov	ecx, [ebx+4]
xor	edx, edx
inc	ebp
mov	eax, ebp
div	ecx
mov	edi, [ebx]
mov	eax, [esp+28h+var_10]
mov	ebx, [eax+24h]
add	edx, edi
mov	eax, edx
shr	eax, 6
mov	eax, [ebx+eax*4]
and	edx, 3Fh
mov	edx, [eax+edx*4]
mov	[esp+28h+var_18], edx
test	dl, 1
jz	short loc_74F221
inc	ebp
xor	edx, edx
mov	eax, ebp
div	ecx
inc	[esp+28h+var_14]
add	edx, edi
mov	edi, [esi]
mov	eax, edx
shr	eax, 6
mov	ecx, [ebx+eax*4]
and	edx, 3Fh
mov	ebx, [ecx+edx*4]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_74F1EB
push	edi
mov	ecx, esi
call	sub_74CDF0

loc_74F1EB:
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
mov	eax, [esi]
mov	edx, [esp+28h+var_18]
and	eax, 3Fh
mov	[ecx+eax*4], edx
inc	dword ptr [esi]
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_74F211
push	edi
mov	ecx, esi
call	sub_74CDF0

loc_74F211:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
and	ecx, 3Fh
mov	[edx+ecx*4], ebx
jmp	short loc_74F283

loc_74F221:
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
mov	dx, [ecx+eax*4]
xor	dx, word ptr [esp+28h+var_18]
test	dx, 0FFFEh
jnz	short loc_74F25F
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
mov	dx, word ptr [esp+28h+var_18+2]
and	eax, 3Fh
cmp	dx, [ecx+eax*4+2]
jz	short loc_74F285

loc_74F25F:
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_74F271
push	edi
mov	ecx, esi
call	sub_74CDF0

loc_74F271:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	eax, [esp+28h+var_18]
and	ecx, 3Fh
mov	[edx+ecx*4], eax

loc_74F283:
inc	dword ptr [esi]

loc_74F285:
mov	eax, [esp+28h+var_14]
mov	ebx, [esp+28h+var_4]
inc	eax
mov	[esp+28h+var_14], eax
cmp	eax, [ebx+4]
jb	loc_74F192
mov	ecx, [esp+28h+var_10]

loc_74F29F:
mov	eax, [ebx]
cmp	eax, [ecx+18h]
lea	ebp, [ecx+18h]
jnb	short loc_74F2AC
mov	[ebp+0], eax

loc_74F2AC:
xor	eax, eax
mov	[esp+28h+var_14], eax
cmp	[esi], eax
jbe	short loc_74F313
jmp	short loc_74F2C4
jmp	short loc_74F2C0
align 10h

loc_74F2C0:
mov	ecx, [esp+28h+var_10]

loc_74F2C4:
mov	ecx, [ecx+44h]
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
mov	edi, eax
and	edi, 3Fh
lea	ecx, [edx+edi*4]
mov	edi, [ebp+0]
shr	edi, 6
mov	[esp+28h+var_4], ecx
cmp	edi, [ebp+4]
jb	short loc_74F2F2
push	edi
mov	ecx, ebp
call	sub_74CDF0
mov	eax, [esp+28h+var_14]

loc_74F2F2:
mov	edx, [ebp+0Ch]
mov	edx, [edx+edi*4]
mov	ecx, [ebp+0]
mov	edi, [esp+28h+var_4]
mov	edi, [edi]
and	ecx, 3Fh
mov	[edx+ecx*4], edi
inc	dword ptr [ebp+0]
inc	eax
mov	[esp+28h+var_14], eax
cmp	eax, [esi]
jb	short loc_74F2C0

loc_74F313:
mov	eax, [esi]
mov	[ebx+4], eax

loc_74F318:
pop	ebp

loc_74F319:
pop	edi
pop	esi
pop	ebx
add	esp, 18h
retn
sub_74EFF0 endp




sub_74F320 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

push	esi
push	edi
mov	edi, ecx
cmp	dword ptr [edi+28h], 0
lea	esi, [edi+28h]
jz	short loc_74F332
call	sub_74EFF0

loc_74F332:
push	ebx
mov	ebx, [esi]
add	edi, 18h
shr	ebx, 6
push	ebp
mov	ebp, [edi]
cmp	ebx, [esi+4]
jb	short loc_74F34B
push	ebx
mov	ecx, esi
call	sub_74CE70

loc_74F34B:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	ebx, [ecx+ebx*4]
mov	edx, [esp+10h+arg_0]
and	eax, 3Fh
mov	[ebx+eax*8], ebp
mov	ecx, 1
mov	[ebx+eax*8+4], ecx
inc	dword ptr [esi]
mov	esi, [edi]
mov	cx, [esp+10h+arg_4]
shr	esi, 6
lea	eax, [edx+edx]
pop	ebp
mov	word ptr [esp+0Ch+arg_0], ax
mov	word ptr [esp+0Ch+arg_0+2], cx
pop	ebx
cmp	esi, [edi+4]
jb	short loc_74F38E
push	esi
mov	ecx, edi
call	sub_74CDF0

loc_74F38E:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+esi*4]
mov	edx, [esp+8+arg_0]
and	eax, 3Fh
mov	[ecx+eax*4], edx
inc	dword ptr [edi]
pop	edi
pop	esi
retn	8
sub_74F320 endp

align 10h



sub_74F3B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+28h]
mov	edx, [esi+34h]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
mov	dx, word ptr [esp+8+arg_4]
and	eax, 3Fh
cmp	dword ptr [ecx+eax*8+4], 0
mov	ecx, [esp+8+arg_0]
push	edi
jz	short loc_74F405
mov	eax, [esi+18h]
mov	ebx, [esi+24h]
dec	eax
mov	edi, eax
shr	edi, 6
mov	edi, [ebx+edi*4]
and	eax, 3Fh
mov	eax, [edi+eax*4]
mov	[esp+0Ch+arg_4], eax
mov	di, word ptr [esp+0Ch+arg_4]
sar	di, 1
cmp	cx, di
jnz	short loc_74F405
shr	eax, 10h
cmp	dx, ax
jz	short loc_74F456

loc_74F405:
mov	ebx, [esi+18h]
lea	edi, [esi+18h]
shr	ebx, 6
lea	eax, [ecx+ecx]
mov	word ptr [esp+0Ch+arg_4], ax
mov	word ptr [esp+0Ch+arg_4+2], dx
cmp	ebx, [edi+4]
jb	short loc_74F428
push	ebx
mov	ecx, edi
call	sub_74CDF0

loc_74F428:
mov	ecx, [edi+0Ch]
mov	eax, [ecx+ebx*4]
mov	edx, [edi]
mov	ecx, [esp+0Ch+arg_4]
and	edx, 3Fh
mov	[eax+edx*4], ecx
inc	dword ptr [edi]
mov	eax, [esi+28h]
mov	ecx, [esi+34h]
dec	eax
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
and	eax, 3Fh
inc	dword ptr [edx+eax*8+4]
lea	eax, [edx+eax*8+4]

loc_74F456:
pop	edi
pop	esi
pop	ebx
retn	8
sub_74F3B0 endp

align 10h



sub_74F460 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= word ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+28h]
mov	edx, [edi+34h]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
cmp	dword ptr [ecx+eax*8+4], 0
jz	short loc_74F4EF
mov	eax, [edi+18h]
mov	ecx, [edi+24h]
dec	eax
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
movsx	ecx, word ptr [esp+10h+arg_8]
and	eax, 3Fh
mov	eax, [edx+eax*4]
movsx	edx, word ptr [esp+10h+arg_C]
mov	[esp+10h+var_4], eax
movsx	ebx, word ptr [esp+10h+var_4+2]
push	ebp
mov	ebp, edx
sub	ebp, ebx
movsx	ebx, [esp+14h+arg_4]
mov	si, ax
movsx	eax, word ptr [esp+14h+arg_0]
sar	si, 1
sub	ebx, edx
movsx	edx, si
sub	eax, ecx
sub	ecx, edx
imul	eax, ebp
imul	ebx, ecx
sub	eax, ebx
pop	ebp
jns	short loc_74F4D2
neg	eax

loc_74F4D2:
cmp	eax, 5
jg	short loc_74F4EF
mov	eax, [esp+10h+arg_C]
mov	ecx, [esp+10h+arg_8]
push	eax
push	ecx
mov	ecx, edi
call	sub_74F3B0
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	10h

loc_74F4EF:
mov	edx, [esp+10h+arg_0]
mov	ebx, [edi+18h]
mov	cx, [esp+10h+arg_4]
lea	esi, [edi+18h]
lea	eax, [edx+edx]
or	eax, 1
shr	ebx, 6
mov	word ptr [esp+10h+var_4], ax
mov	word ptr [esp+10h+var_4+2], cx
cmp	ebx, [esi+4]
jb	short loc_74F51E
push	ebx
mov	ecx, esi
call	sub_74CDF0

loc_74F51E:
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebx*4]
mov	eax, [esi]
mov	edx, [esp+10h+var_4]
and	eax, 3Fh
mov	[ecx+eax*4], edx
inc	dword ptr [esi]
mov	eax, [esp+10h+arg_8]
mov	ebx, [esi]
mov	dx, word ptr [esp+10h+arg_C]
lea	ecx, [eax+eax]
or	ecx, 1
shr	ebx, 6
mov	word ptr [esp+10h+var_4], cx
mov	word ptr [esp+10h+var_4+2], dx
cmp	ebx, [esi+4]
jb	short loc_74F55D
push	ebx
mov	ecx, esi
call	sub_74CDF0

loc_74F55D:
mov	eax, [esi+0Ch]
mov	edx, [eax+ebx*4]
mov	ecx, [esi]
mov	eax, [esp+10h+var_4]
and	ecx, 3Fh
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
mov	eax, [edi+28h]
mov	edx, [edi+34h]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
add	dword ptr [ecx+eax*8+4], 2
pop	edi
lea	eax, [ecx+eax*8+4]
pop	esi
pop	ebx
pop	ecx
retn	10h
sub_74F460 endp

align 10h



sub_74F5A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
cmp	eax, [ecx+4Ch]
jnb	short locret_74F5FD
push	esi
mov	esi, [ecx+58h]
mov	edx, eax
push	edi
mov	edi, [esp+8+arg_4]
shr	edx, 6
mov	edx, [esi+edx*4]
and	eax, 3Fh
lea	esi, [ecx+48h]
mov	[edx+eax*8], di
movzx	eax, di
lea	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, esi
mov	[esp+0Ch+arg_0], eax
call	sub_74D8E0
test	eax, eax
jl	short loc_74F5E8
lea	edx, [eax+eax*2]
mov	eax, [esi]
lea	eax, [eax+edx*4+10h]
test	eax, eax
jnz	short loc_74F5FB

loc_74F5E8:
movzx	ecx, di
lea	edx, [esp+8+arg_0]
mov	[esp+8+arg_0], ecx
push	edx
mov	ecx, esi
call	sub_74EE80

loc_74F5FB:
pop	edi
pop	esi

locret_74F5FD:
retn	8
sub_74F5A0 endp




sub_74F600 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
mov	edi, ecx
movzx	eax, bp
lea	ecx, [esp+14h+arg_0]
lea	esi, [edi+48h]
push	ecx
mov	ecx, esi
mov	[esp+18h+arg_0], eax
call	sub_74D8E0
test	eax, eax
jl	short loc_74F698
lea	edx, [eax+eax*2]
mov	eax, [esi]
lea	eax, [eax+edx*4+10h]
test	eax, eax
jz	short loc_74F698
push	ebx
mov	ebx, [esp+18h+arg_4]
movzx	ecx, bx
lea	edx, [esp+18h+arg_0]
mov	[esp+18h+arg_0], ecx
push	edx
mov	ecx, esi
call	sub_74D8E0
test	eax, eax
jl	short loc_74F697
mov	ecx, [esi]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4+10h]
test	eax, eax
jz	short loc_74F697
lea	esi, [edi+5Ch]
mov	edi, [esi]
shr	edi, 6
mov	word ptr [esp+18h+var_8+2], bx
mov	ebx, [esp+18h+arg_8]
mov	word ptr [esp+18h+var_8], bp
cmp	edi, [esi+4]
jb	short loc_74F67F
push	edi
mov	ecx, esi
call	sub_74CE70

loc_74F67F:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	edi, [edx+edi*4]
mov	ecx, [esp+18h+var_8]
and	eax, 3Fh
mov	[edi+eax*8], ecx
mov	[edi+eax*8+4], ebx
inc	dword ptr [esi]

loc_74F697:
pop	ebx

loc_74F698:
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn	0Ch
sub_74F600 endp

align 10h



sub_74F6B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
xor	eax, eax
push	edi
mov	[esp+1Ch+var_8], esi
mov	[esp+1Ch+var_C], eax
cmp	[esi+4Ch], eax
jbe	loc_74F7C1
lea	ebp, [esi+8]
jmp	short loc_74F6D5

loc_74F6D1:
mov	eax, [esp+1Ch+var_C]

loc_74F6D5:
mov	edx, [esi+58h]
mov	esi, [ebp+0]
mov	edi, [esi]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
movzx	ebx, word ptr [ecx+eax*8]
lea	eax, [ecx+eax*8]
shr	edi, 0Ch
mov	[esp+1Ch+var_4], eax
cmp	edi, [esi+4]
jb	short loc_74F703
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F703:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
shr	ebx, 8
cmp	edi, [esi+4]
jb	short loc_74F72D
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F72D:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
mov	edx, [esp+1Ch+var_4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
movsx	ebx, word ptr [edx+2]
shr	edi, 0Ch
cmp	edi, [esi+4]
jb	short loc_74F75C
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F75C:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
mov	[ecx+edx], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
sar	ebx, 8
cmp	edi, [esi+4]
jb	short loc_74F787
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F787:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	eax, [esp+1Ch+var_4]
and	ecx, 0FFFh
mov	[ecx+edx], bl
inc	dword ptr [esi]
mov	ecx, [eax+4]
push	ecx
mov	ecx, ebp
call	sub_74DD40
mov	eax, [esp+1Ch+var_C]
mov	edx, [esp+1Ch+var_8]
inc	eax
mov	[esp+1Ch+var_C], eax
mov	esi, edx
cmp	eax, [edx+4Ch]
jb	loc_74F6D1

loc_74F7C1:
mov	eax, [esi+5Ch]
lea	edi, [esi+5Ch]
push	offset sub_74C620
push	eax
push	0
push	edi
call	sub_74D010
mov	ecx, [edi]
add	esp, 10h
lea	ebp, [esi+8]
push	ecx
mov	ecx, ebp
call	sub_74DF30
xor	eax, eax
mov	[esp+1Ch+var_C], eax
cmp	[edi], eax
jbe	loc_74F934
jmp	short loc_74F7FD

loc_74F7F5:
mov	eax, [esp+1Ch+var_C]
mov	esi, [esp+1Ch+var_8]

loc_74F7FD:
mov	ecx, [esi+68h]
mov	esi, [ebp+0]
mov	edi, [esi]
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
and	eax, 3Fh
movzx	ebx, word ptr [edx+eax*8]
lea	eax, [edx+eax*8]
shr	edi, 0Ch
mov	[esp+1Ch+var_4], eax
cmp	edi, [esi+4]
jb	short loc_74F82B
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F82B:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
and	ecx, 0FFFh
mov	[ecx+edx], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
shr	ebx, 8
cmp	edi, [esi+4]
jb	short loc_74F856
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F856:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	eax, [esp+1Ch+var_4]
and	ecx, 0FFFh
mov	[ecx+edx], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
movzx	ebx, word ptr [eax+2]
shr	edi, 0Ch
cmp	edi, [esi+4]
jb	short loc_74F886
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F886:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	eax, [ecx+edi*4]
and	edx, 0FFFh
mov	[edx+eax], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
shr	ebx, 8
cmp	edi, [esi+4]
jb	short loc_74F8B1
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F8B1:
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+1Ch+var_4]
and	edx, 0FFFh
mov	[edx+eax], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
mov	ebx, [ecx+4]
shr	edi, 0Ch
cmp	edi, [esi+4]
jb	short loc_74F8E0
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F8E0:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
inc	dword ptr [esi]
mov	esi, [ebp+0]
mov	edi, [esi]
shr	edi, 0Ch
sar	ebx, 8
cmp	edi, [esi+4]
jb	short loc_74F90A
push	edi
mov	ecx, esi
call	sub_74CEF0

loc_74F90A:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
and	eax, 0FFFh
mov	[eax+ecx], bl
mov	eax, [esp+1Ch+var_C]
mov	ecx, [esp+1Ch+var_8]
inc	dword ptr [esi]
inc	eax
add	ecx, 5Ch
mov	[esp+1Ch+var_C], eax
cmp	eax, [ecx]
jb	loc_74F7F5

loc_74F934:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_74F6B0 endp

align 10h



sub_74F940 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_74EF90
test	[esp+4+arg_0], 1
jz	short loc_74F95D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_74F95D:
mov	eax, esi
pop	esi
retn	4
sub_74F940 endp

align 10h



sub_74F970 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_0]
push	ebx
mov	bl, [eax]
push	ebp
push	esi
push	edi
mov	edi, ecx
test	bl, bl
jz	short loc_74F9B8

loc_74F980:
mov	esi, [edi+8]
mov	ebp, [esi]
shr	ebp, 0Ch
cmp	ebp, [esi+4]
jb	short loc_74F995
push	ebp
mov	ecx, esi
call	sub_74CEF0

loc_74F995:
mov	edx, [esi]
mov	ecx, [esi+0Ch]
mov	eax, [ecx+ebp*4]
and	edx, 0FFFh
mov	[edx+eax], bl
mov	eax, [esp+10h+arg_0]
inc	dword ptr [esi]
mov	bl, [eax+1]
inc	eax
mov	[esp+10h+arg_0], eax
test	bl, bl
jnz	short loc_74F980

loc_74F9B8:
mov	ebx, [edi+8]
mov	ebp, [ebx]
lea	esi, [edi+8]
shr	ebp, 0Ch
cmp	ebp, [ebx+4]
jb	short loc_74F9D0
push	ebp
mov	ecx, ebx
call	sub_74CEF0

loc_74F9D0:
mov	ecx, [ebx+0Ch]
mov	edx, [ebx]
mov	eax, [ecx+ebp*4]
and	edx, 0FFFh
mov	byte ptr [edx+eax], 0
inc	dword ptr [ebx]
mov	ecx, [esi]
mov	edx, [ecx]
mov	eax, [esp+10h+arg_4]
push	eax
mov	ecx, esi
mov	[edi+6Ch], edx
call	sub_74DCD0
mov	ecx, [esp+10h+arg_8]
push	ecx
mov	ecx, esi
call	sub_74DCD0
mov	edx, [esp+10h+arg_C]
push	edx
mov	ecx, esi
call	sub_74DE10
mov	eax, [esp+10h+arg_10]
push	eax
mov	ecx, esi
call	sub_74DE10
mov	ecx, [esp+10h+arg_14]
push	ecx
mov	ecx, esi
call	sub_74DE10
mov	edx, [esi]
xor	ebx, ebx
mov	[edi+70h], ebx
mov	[edi+74h], ebx
mov	eax, [edx]
push	ebx
mov	ecx, esi
mov	[edi+78h], eax
call	sub_74DD40
push	ebx
mov	ecx, esi
call	sub_74DD40
lea	ecx, [edi+48h]
call	sub_6F4100
mov	[edi+4Ch], ebx
mov	[edi+5Ch], ebx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	18h
sub_74F970 endp

align 10h



sub_74FA60 proc	near

var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= byte ptr	 4

sub	esp, 30h
push	ebx
push	esi
mov	esi, ecx
mov	edx, [esi+8]
mov	ax, [esi+70h]
mov	ebx, [edx]
push	edi
lea	edi, [esi+8]
xor	ecx, ecx
mov	[esp+3Ch+var_20], esi
mov	word ptr [esp+3Ch+var_14], ax
mov	word ptr [esp+3Ch+var_14+2], cx
mov	[esp+3Ch+var_10], ebx
cmp	[esi+28h], ecx
jz	short loc_74FA94
mov	ecx, esi
call	sub_74EFF0

loc_74FA94:
push	ebp
lea	eax, [esp+40h+var_1C]
push	eax
lea	ecx, [esp+44h+var_2C]
push	ecx
lea	edx, [esp+48h+var_28]
push	edx
lea	eax, [esp+4Ch+var_24]
push	eax
mov	ecx, esi
call	sub_74C650
mov	ecx, [esp+40h+var_24]
push	ecx
mov	ecx, edi
call	sub_74E0B0
mov	edx, [esp+40h+var_28]
push	edx
mov	ecx, edi
call	sub_74E0B0
mov	eax, [esp+40h+var_2C]
push	eax
mov	ecx, edi
call	sub_74E0B0
mov	ecx, [esp+40h+var_1C]
push	ecx
mov	ecx, edi
call	sub_74E0B0
mov	edx, [esi+28h]
push	edx
mov	ecx, edi
call	sub_74DE80
mov	ecx, [esi+28h]
mov	[esp+40h+var_2D], 0
test	ecx, ecx
jz	loc_74FD21
xor	eax, eax
mov	[esp+40h+var_24], eax
test	ecx, ecx
jbe	loc_74FD21
jmp	short loc_74FB14
jmp	short loc_74FB10
align 10h

loc_74FB10:
mov	eax, [esp+40h+var_24]

loc_74FB14:
mov	edx, [esi+34h]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	ecx, [ecx+eax*8]
mov	edx, 1
mov	[esp+40h+var_28], ecx
mov	[esp+40h+var_2C], 0
cmp	[ecx+4], edx
jbe	short loc_74FB61
mov	eax, [ecx]
mov	edi, [esi+24h]
inc	eax

loc_74FB41:
inc	[esp+40h+var_2C]
mov	ebx, eax
shr	ebx, 6
mov	ebx, [edi+ebx*4]
mov	ebp, eax
and	ebp, 3Fh
test	byte ptr [ebx+ebp*4], 1
jz	short loc_74FB5A
inc	edx
inc	eax

loc_74FB5A:
inc	edx
inc	eax
cmp	edx, [ecx+4]
jb	short loc_74FB41

loc_74FB61:
mov	eax, [ecx]
mov	ecx, [esi+24h]
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
and	eax, 3Fh
movsx	edi, word ptr [edx+eax*4]
movsx	ebp, word ptr [edx+eax*4+2]
lea	eax, [edx+eax*4]
sar	edi, 1
lea	ebx, [esi+8]
push	edi
mov	ecx, ebx
call	sub_74E0B0
push	ebp
mov	ecx, ebx
call	sub_74E0B0
mov	eax, [ebx]
mov	ecx, [eax]
mov	edx, [esp+40h+var_2C]
lea	eax, [edx+edx]
mov	[esp+40h+var_18], ecx
push	eax
mov	ecx, ebx
call	sub_74DF30
mov	ecx, [esp+40h+var_28]
mov	ebx, 1
cmp	[ecx+4], ebx
jbe	loc_74FC8E
jmp	short loc_74FBC0
align 10h

loc_74FBC0:
mov	edx, [esp+40h+var_28]
mov	eax, [edx]
mov	edx, [esi+24h]
mov	[esp+40h+var_1C], eax
add	eax, ebx
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	ecx, [ecx+eax*4]
movzx	eax, word ptr [ecx]
test	al, 1
jz	short loc_74FC3B
mov	eax, [esp+40h+var_1C]
inc	ebx
add	eax, ebx
mov	esi, eax
shr	esi, 6
mov	edx, [edx+esi*4]
and	eax, 3Fh
movsx	esi, word ptr [edx+eax*4]
lea	edx, [edx+eax*4]
movzx	eax, word ptr [ecx]
movsx	ecx, word ptr [ecx+2]
mov	[esp+40h+var_2C], ebx
movsx	ebx, word ptr [edx+2]
cwde
mov	edx, ebx
sub	edx, ecx
push	edx
sar	esi, 1
sar	eax, 1
mov	edx, esi
sub	edx, eax
sub	ecx, ebp
push	edx
push	ecx
mov	ecx, [esp+4Ch+var_20]
sub	eax, edi
push	eax
add	ecx, 8
call	sub_74E630
mov	edi, esi
mov	esi, [esp+40h+var_20]
mov	ebp, ebx
mov	ebx, [esp+40h+var_2C]
jmp	short loc_74FC80

loc_74FC3B:
movsx	ecx, word ptr [ecx+2]
cwde
sar	eax, 1
mov	[esp+40h+var_1C], eax
mov	[esp+40h+var_2C], ecx
cmp	eax, edi
jnz	short loc_74FC5B
sub	ecx, ebp
push	ecx
lea	ecx, [esi+8]
call	sub_74E280
jmp	short loc_74FC78

loc_74FC5B:
sub	eax, edi
cmp	ecx, ebp
jnz	short loc_74FC6C
push	eax
lea	ecx, [esi+8]
call	sub_74E160
jmp	short loc_74FC78

loc_74FC6C:
sub	ecx, ebp
push	ecx
push	eax
lea	ecx, [esi+8]
call	sub_74E3A0

loc_74FC78:
mov	edi, [esp+40h+var_1C]
mov	ebp, [esp+40h+var_2C]

loc_74FC80:
mov	eax, [esp+40h+var_28]
inc	ebx
cmp	ebx, [eax+4]
jb	loc_74FBC0

loc_74FC8E:
cmp	[esp+40h+arg_0], 0
jz	short loc_74FD0B
mov	ebp, [esp+40h+var_18]
push	ebp
mov	ecx, esi
mov	[esp+44h+var_C], esi
call	sub_74CCD0
mov	ebx, eax
mov	eax, [esi+10h]
lea	edi, [esi+10h]
mov	[esp+40h+var_8], ebx
mov	[esp+40h+var_4], ebp
test	eax, eax
jz	short loc_74FCF8
mov	eax, [eax+4]
and	eax, ebx
push	eax
lea	ecx, [esp+44h+var_C]
push	ecx
mov	ecx, edi
call	sub_74D930
test	eax, eax
jl	short loc_74FCF8
lea	edx, [eax+eax*4]
mov	eax, [edi]
lea	eax, [eax+edx*4+10h]
test	eax, eax
jz	short loc_74FCF8
mov	edx, [esi+8]
lea	ecx, [esi+8]
cmp	ebp, [edx]
jnb	short loc_74FCE8
mov	[edx], ebp

loc_74FCE8:
mov	edx, [eax+8]
add	edx, edx
or	edx, 1
push	edx
call	sub_74DF30
jmp	short loc_74FD0B

loc_74FCF8:
push	ebx
lea	eax, [esp+44h+var_C]
push	eax
push	edi
mov	ecx, edi
call	sub_74D480
mov	[esp+40h+var_2D], 1

loc_74FD0B:
mov	eax, [esp+40h+var_24]
inc	eax
mov	[esp+40h+var_24], eax
cmp	eax, [esi+28h]
jb	loc_74FB10
mov	ebx, [esp+40h+var_10]

loc_74FD21:
inc	dword ptr [esi+70h]
cmp	[esp+40h+arg_0], 0
mov	[esp+40h+var_18], ebx
jz	short loc_74FD9B
cmp	[esp+40h+var_2D], 0
jnz	short loc_74FD9B
push	ebx
mov	ecx, esi
mov	[esp+44h+var_C], esi
call	sub_74D740
mov	ebp, eax
mov	eax, [esi+14h]
lea	edi, [esi+14h]
mov	[esp+40h+var_8], ebp
mov	[esp+40h+var_4], ebx
test	eax, eax
jz	short loc_74FD8D
mov	eax, [eax+4]
and	eax, ebp
push	eax
lea	ecx, [esp+44h+var_C]
push	ecx
mov	ecx, edi
call	sub_74EEB0
test	eax, eax
jl	short loc_74FD8D
lea	edx, [eax+eax*4]
mov	eax, [edi]
lea	ecx, [eax+edx*4+10h]
test	ecx, ecx
jz	short loc_74FD8D
mov	eax, [esi+8]
cmp	ebx, [eax]
jnb	short loc_74FD82
mov	[eax], ebx

loc_74FD82:
mov	ecx, [ecx+8]
mov	[esp+40h+var_10], ecx
mov	ebx, ecx
jmp	short loc_74FD9B

loc_74FD8D:
push	ebp
lea	edx, [esp+44h+var_C]
push	edx
push	edi
mov	ecx, edi
call	sub_74D480

loc_74FD9B:
mov	eax, [esi+8]
mov	ecx, [eax]
sub	ecx, [esp+40h+var_18]
mov	edx, [esi+70h]
mov	eax, [esi+78h]
add	[esi+74h], ecx
lea	edi, [esi+8]
push	edx
push	eax
mov	ecx, edi
call	sub_74CF80
mov	ecx, [esi+74h]
mov	edx, [esi+78h]
push	ecx
add	edx, 4
push	edx
mov	ecx, edi
call	sub_74CF80
mov	edi, [esi+4Ch]
add	esi, 4Ch
shr	edi, 6
pop	ebp
cmp	edi, [esi+4]
jb	short loc_74FDE2
push	edi
mov	ecx, esi
call	sub_74CE70

loc_74FDE2:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	edi, [ecx+edi*4]
mov	edx, [esp+3Ch+var_14]
and	eax, 3Fh
mov	[edi+eax*8+4], ebx
mov	[edi+eax*8], edx
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebx
add	esp, 30h
retn	4
sub_74FA60 endp

align 10h



sub_74FE10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	edx, [esp+arg_4]
xor	eax, eax
cmp	ecx, [edx]
setl	al
retn
sub_74FE10 endp

align 10h



; int __stdcall	sub_74FE30(float, float)
sub_74FE30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_0]
push	esi
fld	ds:dbl_143EF20
mov	esi, ecx
fmul	st(1), st
fxch	st(1)
call	__ftol2_sse
fmul	[esp+4+arg_4]
mov	[esi+64h], eax
mov	[esi+5Ch], eax
call	__ftol2_sse
mov	[esi+68h], eax
mov	[esi+60h], eax
pop	esi
retn	8
sub_74FE30 endp

align 10h



; int __stdcall	sub_74FE60(int,	int, size_t)
sub_74FE60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_0]
push	ebp
mov	ebp, ecx
cmp	eax, [ebp+34h]
jnb	loc_74FFC6
mov	ecx, [ebp+30h]
mov	edx, [ecx+eax*8+4]
lea	eax, [ecx+eax*8]
mov	eax, [eax]
mov	ecx, [ebp+24h]
push	ebx
lea	eax, [ecx+eax*4]
xor	ebx, ebx
mov	[esp+0Ch+arg_0], eax
test	edx, edx
jz	loc_74FFC5
push	esi
push	edi
jmp	short loc_74FEA0

loc_74FE96:
mov	eax, [esp+14h+arg_0]
lea	ebx, [ebx+0]

loc_74FEA0:
mov	esi, [eax]
add	ebx, [esi+8]
mov	edi, [esi]
mov	ecx, [esi+0Ch]
sub	edx, 1
mov	[esp+14h+var_4], edx
jz	short loc_74FED0

loc_74FEB3:
mov	esi, [eax+4]
add	eax, 4
cmp	[esi], edi
jnz	short loc_74FEC8
add	ecx, [esi+0Ch]
add	ebx, [esi+8]
sub	edx, 1
jnz	short loc_74FEB3

loc_74FEC8:
mov	[esp+14h+arg_0], eax
mov	[esp+14h+var_4], edx

loc_74FED0:
test	ecx, ecx
jz	short loc_74FF45
mov	eax, ebx
shl	eax, 9
sub	eax, ecx
sar	eax, 9
test	eax, eax
jge	short loc_74FEE4
neg	eax

loc_74FEE4:
cmp	dword ptr [ebp+0], 1
jnz	short loc_74FEFF
and	eax, 1FFh
cmp	eax, 100h
jle	short loc_74FEFF
mov	edx, 200h
sub	edx, eax
mov	eax, edx

loc_74FEFF:
cmp	eax, 0FFh
jle	short loc_74FF0B
mov	eax, 0FFh

loc_74FF0B:
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_74FF19
mov	ecx, [ebp+8]
mov	ecx, [ecx+eax*4]
jmp	short loc_74FF1B

loc_74FF19:
mov	ecx, eax

loc_74FF1B:
mov	edx, [esp+14h+arg_8]
mov	eax, edi
sub	eax, [ebp+4Ch]
imul	eax, [esp+14h+arg_8]
add	eax, [esp+14h+arg_4]
test	edx, edx
jbe	short loc_74FF3C
push	edx		; size_t
push	ecx		; int
push	eax		; void *
call	_memset
add	esp, 0Ch

loc_74FF3C:
mov	edx, [esp+14h+var_4]
mov	eax, [esp+14h+arg_0]
inc	edi

loc_74FF45:
test	edx, edx
jz	short loc_74FFC3
mov	esi, [esi]
cmp	esi, edi
jle	loc_74FEA0
mov	eax, ebx
shl	eax, 9
sar	eax, 9
test	eax, eax
jge	short loc_74FF61
neg	eax

loc_74FF61:
cmp	dword ptr [ebp+0], 1
jnz	short loc_74FF7C
and	eax, 1FFh
cmp	eax, 100h
jle	short loc_74FF7C
mov	ecx, 200h
sub	ecx, eax
mov	eax, ecx

loc_74FF7C:
cmp	eax, 0FFh
jle	short loc_74FF88
mov	eax, 0FFh

loc_74FF88:
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_74FF94
mov	ecx, [ebp+8]
mov	eax, [ecx+eax*4]

loc_74FF94:
test	eax, eax
jz	loc_74FE96
mov	ecx, [esp+14h+arg_8]
sub	esi, edi
sub	edi, [ebp+4Ch]
imul	esi, ecx
imul	edi, ecx
add	edi, [esp+14h+arg_4]
push	esi		; size_t
push	eax		; int
push	edi		; void *
call	_memset
mov	edx, [esp+20h+var_4]
add	esp, 0Ch
jmp	loc_74FE96

loc_74FFC3:
pop	edi
pop	esi

loc_74FFC5:
pop	ebx

loc_74FFC6:
pop	ebp
pop	ecx
retn	0Ch
sub_74FE60 endp

db 15h dup(0CCh)



sub_74FFE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_75003D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_750039
mov	ecx, dword_1855FC0
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 86h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_750039:
xor	eax, eax
mov	[esi], eax

loc_75003D:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_74FFE0 endp

align 10h



sub_750050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_7500AF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_7500AB
mov	ecx, dword_1855FC0
add	eax, eax
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 86h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_7500AB:
xor	eax, eax
mov	[esi], eax

loc_7500AF:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_750050 endp

align 10h



sub_7500C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_750111
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_7500F0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_75010A

loc_7500F0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 86h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_75010A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_750111:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 86h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_7500C0 endp

align 10h



sub_750140 proc	near
xor	eax, eax
mov	edx, 7FFFFFFFh
mov	[ecx+3Ch], edx
mov	[ecx+40h], edx
mov	[ecx+4Ch], edx
mov	[ecx+50h], edx
mov	edx, 80000001h
mov	[ecx+14h], eax
mov	[ecx+28h], eax
mov	[ecx+34h], eax
mov	[ecx+44h], eax
mov	[ecx+48h], eax
mov	[ecx+54h], edx
mov	[ecx+58h], edx
mov	[ecx+5Ch], eax
mov	[ecx+60h], eax
mov	[ecx+64h], eax
mov	[ecx+68h], eax
retn
sub_750140 endp

align 10h



; int __stdcall	sub_750180(float)
sub_750180 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4

fld1
sub	esp, 0Ch
fld	[esp+0Ch+arg_0]
push	ebx
fucom	st(1)
mov	ebx, ecx
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_7501A8
fstp	dword ptr [ebx+4]
mov	dword ptr [ebx+0Ch], 0
pop	ebx
add	esp, 0Ch
retn	4

loc_7501A8:
push	esi
fstp	st
push	edi
push	0
lea	edi, [ebx+8]
push	100h
mov	ecx, edi
call	sub_74FFE0
fld	ds:dbl_15FCCF8
xor	esi, esi
mov	dword ptr [edi+4], 100h
mov	[esp+18h+var_C], esi

loc_7501D0:
fidivr	[esp+18h+var_C]
fstp	[esp+18h+var_C]
fld	[esp+18h+var_C]
fld	[esp+18h+arg_0]
call	__CIpow
fstp	[esp+18h+var_C]
fld	[esp+18h+var_C]
mov	ecx, [edi]
fld	ds:dbl_15FCCF8
inc	esi
fnstcw	word ptr [esp+18h+var_C]
movzx	eax, word ptr [esp+18h+var_C]
fmul	st(1), st
or	eax, 0C00h
fxch	st(1)
cmp	esi, 100h
mov	dword ptr [esp+18h+var_8], eax
fadd	ds:dbl_15FCC48
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	eax, dword ptr [esp+18h+var_8]
mov	[ecx+esi*4-4], eax
fldcw	word ptr [esp+18h+var_C]
mov	[esp+18h+var_C], esi
jl	short loc_7501D0
fstp	st
pop	edi
fld	[esp+14h+arg_0]
pop	esi
fstp	dword ptr [ebx+4]
pop	ebx
add	esp, 0Ch
retn	4
sub_750180 endp

align 10h



sub_750250 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_750264
push	edi
call	sub_7500C0

loc_750264:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	eax, [eax+edi*4]
and	ecx, 0FFh
shl	ecx, 4
add	eax, ecx
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	ecx, [ecx+0Ch]
mov	[eax+0Ch], ecx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_750250 endp

align 10h



sub_7502A0 proc	near
fld1
mov	eax, ecx
xor	ecx, ecx
fstp	dword ptr [eax+4]
mov	[eax], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	edx, 7FFFFFFFh
mov	[eax+4Ch], edx
mov	[eax+50h], edx
mov	dword ptr [eax+54h], 80000001h
mov	dword ptr [eax+58h], 80000001h
mov	[eax+5Ch], ecx
mov	[eax+60h], ecx
mov	[eax+64h], ecx
mov	[eax+68h], ecx
mov	[eax+3Ch], edx
mov	[eax+40h], edx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
retn
sub_7502A0 endp

align 10h



sub_750310 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
mov	edx, [esp+18h+arg_C]
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_4]
push	esi
push	edi
mov	edi, ebp
mov	esi, ecx
mov	ecx, [esp+28h+arg_10]
mov	ebx, edx
mov	eax, edx
sar	ebx, 8
and	eax, 0FFh
sar	edi, 8
and	ebp, 0FFh
mov	[esp+28h+var_8], ebx
mov	[esp+28h+var_4], eax
cmp	[esp+28h+arg_8], ecx
jnz	short loc_75038B
mov	eax, [esi+3Ch]
mov	ecx, [esi+40h]
mov	ebp, [esp+28h+arg_0]
lea	edi, [esi+3Ch]
sub	eax, ebx
sub	ecx, ebp
or	eax, ecx
jz	loc_750513
mov	edx, [esi+48h]
or	edx, [esi+44h]
jz	short loc_750374
push	edi
lea	ecx, [esi+14h]
call	sub_750250

loc_750374:
mov	[edi], ebx
xor	eax, eax
pop	edi
mov	[esi+40h], ebp
mov	[esi+44h], eax
mov	[esi+48h], eax
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h

loc_75038B:
sub	ecx, [esp+28h+arg_8]
cmp	edi, ebx
jnz	short loc_7503A8
add	[esi+44h], ecx
add	eax, ebp
imul	eax, ecx
add	[esi+48h], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h

loc_7503A8:
mov	eax, 100h
sub	eax, ebp
imul	eax, ecx
sub	edx, [esp+28h+arg_4]
mov	[esp+28h+var_14], 100h
mov	ebx, edx
mov	[esp+28h+var_18], 1
mov	[esp+28h+arg_C], ebx
jns	short loc_7503E9
imul	ecx, ebp
neg	ebx
mov	eax, ecx
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_18], 0FFFFFFFFh
mov	[esp+28h+arg_C], ebx

loc_7503E9:
cdq
idiv	ebx
mov	ebx, eax
mov	eax, edx
mov	[esp+28h+arg_4], edx
test	eax, eax
jge	short loc_750401
dec	ebx
add	eax, [esp+28h+arg_C]
mov	[esp+28h+arg_4], eax

loc_750401:
mov	eax, [esp+28h+var_14]
add	edi, [esp+28h+var_18]
mov	edx, [esi+3Ch]
add	[esi+44h], ebx
add	eax, ebp
imul	eax, ebx
add	[esi+48h], eax
mov	eax, [esi+40h]
sub	eax, [esp+28h+arg_0]
lea	ebp, [esi+3Ch]
sub	edx, edi
or	edx, eax
jz	short loc_75044C
mov	ecx, [esi+44h]
mov	eax, [esi+48h]
or	eax, ecx
jz	short loc_75043A
push	ebp
lea	ecx, [esi+14h]
call	sub_750250

loc_75043A:
mov	ecx, [esp+28h+arg_0]
xor	eax, eax
mov	[ebp+0], edi
mov	[esi+40h], ecx
mov	[esi+44h], eax
mov	[esi+48h], eax

loc_75044C:
add	[esp+28h+arg_8], ebx
cmp	edi, [esp+28h+var_8]
jz	loc_7504F5
sub	ebx, [esp+28h+arg_8]
add	ebx, [esp+28h+arg_10]
shl	ebx, 8
mov	eax, ebx
mov	ebx, [esp+28h+arg_C]
cdq
idiv	ebx
mov	ecx, edx
mov	[esp+28h+var_C], eax
mov	[esp+28h+var_10], edx
test	ecx, ecx
jge	short loc_750487
dec	eax
add	ecx, ebx
mov	[esp+28h+var_C], eax
mov	[esp+28h+var_10], ecx

loc_750487:
sub	[esp+28h+arg_4], ebx
jmp	short loc_750498
align 10h

loc_750490:
mov	ecx, [esp+28h+var_10]
mov	eax, [esp+28h+var_C]

loc_750498:
add	[esp+28h+arg_4], ecx
js	short loc_7504A7
mov	edx, [esp+28h+arg_C]
sub	[esp+28h+arg_4], edx
inc	eax

loc_7504A7:
add	[esi+44h], eax
add	[esp+28h+arg_8], eax
add	edi, [esp+28h+var_18]
mov	ebx, [esi+40h]
sub	ebx, [esp+28h+arg_0]
mov	ecx, [esi+44h]
mov	edx, eax
mov	eax, [ebp+0]
shl	edx, 8
add	[esi+48h], edx
mov	edx, [esi+48h]
sub	eax, edi
or	eax, ebx
jz	short loc_7504EF
or	edx, ecx
jz	short loc_7504DD
push	ebp
lea	ecx, [esi+14h]
call	sub_750250

loc_7504DD:
mov	ecx, [esp+28h+arg_0]
xor	eax, eax
mov	[ebp+0], edi
mov	[esi+40h], ecx
mov	[esi+44h], eax
mov	[esi+48h], eax

loc_7504EF:
cmp	edi, [esp+28h+var_8]
jnz	short loc_750490

loc_7504F5:
mov	eax, [esp+28h+var_4]
sub	eax, [esp+28h+var_14]
mov	ecx, [esp+28h+arg_10]
sub	ecx, [esp+28h+arg_8]
add	eax, 100h
add	[esi+44h], ecx
imul	eax, ecx
add	[esi+48h], eax

loc_750513:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h
sub_750310 endp

align 10h



sub_750520 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
mov	edx, [esp+18h+arg_8]
push	ebx
mov	ebx, [esp+1Ch+arg_0]
mov	eax, edx
sub	eax, ebx
push	ebp
sar	edx, 8
push	esi
mov	esi, ecx
mov	ecx, [esp+24h+arg_4]
mov	[esp+24h+var_4], eax
mov	eax, [esp+24h+arg_C]
push	edi
mov	ebp, eax
mov	[esp+28h+arg_C], edx
sub	ebp, ecx
mov	edi, ecx
mov	edx, eax
sar	ebx, 8
sar	edx, 8
and	ecx, 0FFh
and	eax, 0FFh
sar	edi, 8
cmp	ebx, [esi+4Ch]
mov	[esp+28h+var_C], ebp
mov	[esp+28h+var_14], edx
mov	[esp+28h+var_10], ecx
mov	[esp+28h+var_8], eax
jge	short loc_75057C
mov	[esi+4Ch], ebx

loc_75057C:
cmp	ebx, [esi+54h]
jle	short loc_750584
mov	[esi+54h], ebx

loc_750584:
cmp	edi, [esi+50h]
jge	short loc_75058C
mov	[esi+50h], edi

loc_75058C:
cmp	edi, [esi+58h]
jle	short loc_750594
mov	[esi+58h], edi

loc_750594:
mov	eax, [esp+28h+arg_C]
cmp	eax, [esi+4Ch]
jge	short loc_7505A0
mov	[esi+4Ch], eax

loc_7505A0:
cmp	eax, [esi+54h]
jle	short loc_7505A8
mov	[esi+54h], eax

loc_7505A8:
cmp	edx, [esi+50h]
jge	short loc_7505B0
mov	[esi+50h], edx

loc_7505B0:
cmp	edx, [esi+58h]
jle	short loc_7505B8
mov	[esi+58h], edx

loc_7505B8:
mov	eax, [esi+40h]
mov	edx, [esi+3Ch]
lea	ecx, [esi+3Ch]
sub	eax, edi
sub	edx, ebx
or	eax, edx
jz	short loc_7505EA
mov	eax, [esi+44h]
or	eax, [esi+48h]
jz	short loc_7505DA
push	ecx
lea	ecx, [esi+14h]
call	sub_750250

loc_7505DA:
xor	eax, eax
lea	ecx, [esi+3Ch]
mov	[ecx], ebx
mov	[esi+40h], edi
mov	[esi+44h], eax
mov	[esi+48h], eax

loc_7505EA:
cmp	edi, [esp+28h+var_14]
jnz	short loc_750616
mov	ecx, [esp+28h+var_8]
mov	edx, [esp+28h+arg_8]
mov	eax, [esp+28h+var_10]
push	ecx
mov	ecx, [esp+2Ch+arg_0]
push	edx
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_750310
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	10h

loc_750616:
mov	edx, [esp+28h+var_4]
mov	[esp+28h+var_18], 1
mov	[esp+28h+arg_C], 100h
test	edx, edx
jnz	loc_750726
mov	eax, [esp+28h+arg_0]
mov	edx, ebx
shl	edx, 8
sub	eax, edx
add	eax, eax
mov	edx, eax
mov	[esp+28h+arg_8], edx
test	ebp, ebp
jge	short loc_750659
mov	[esp+28h+arg_C], 0
mov	[esp+28h+var_18], 0FFFFFFFFh

loc_750659:
mov	eax, [esp+28h+arg_C]
sub	eax, [esp+28h+var_10]
add	edi, [esp+28h+var_18]
add	[esi+44h], eax
imul	eax, edx
mov	edx, [ecx]
mov	ebp, [esi+40h]
add	[esi+48h], eax
mov	eax, [esi+48h]
sub	edx, ebx
sub	ebp, edi
or	edx, ebp
jz	short loc_75069C
or	eax, [esi+44h]
jz	short loc_75068C
push	ecx
lea	ecx, [esi+14h]
call	sub_750250

loc_75068C:
xor	eax, eax
lea	ecx, [esi+3Ch]
mov	[ecx], ebx
mov	[esi+40h], edi
mov	[esi+44h], eax
mov	[esi+48h], eax

loc_75069C:
mov	eax, [esp+28h+arg_C]
lea	eax, [eax+eax-100h]
mov	ebp, eax
imul	ebp, [esp+28h+arg_8]
mov	[esp+28h+arg_0], eax
cmp	edi, [esp+28h+var_14]
jz	short loc_750702
jmp	short loc_7506C4
align 10h

loc_7506C0:
mov	eax, [esp+28h+arg_0]

loc_7506C4:
add	edi, [esp+28h+var_18]
mov	edx, [esi+40h]
mov	[esi+44h], eax
mov	eax, [ecx]
sub	eax, ebx
sub	edx, edi
or	eax, edx
mov	[esi+48h], ebp
jz	short loc_7506FC
mov	eax, ebp
or	eax, [esp+28h+arg_0]
jz	short loc_7506EC
push	ecx
lea	ecx, [esi+14h]
call	sub_750250

loc_7506EC:
xor	eax, eax
lea	ecx, [esi+3Ch]
mov	[ecx], ebx
mov	[esi+40h], edi
mov	[esi+44h], eax
mov	[esi+48h], eax

loc_7506FC:
cmp	edi, [esp+28h+var_14]
jnz	short loc_7506C0

loc_750702:
mov	ecx, [esp+28h+var_8]
mov	edx, [esp+28h+arg_C]
lea	eax, [edx+ecx-100h]
add	[esi+44h], eax
imul	eax, [esp+28h+arg_8]
add	[esi+48h], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	10h

loc_750726:
mov	ecx, [esp+28h+var_10]
mov	eax, 100h
sub	eax, ecx
imul	eax, edx
test	ebp, ebp
jge	short loc_750753
mov	eax, ecx
imul	eax, edx
neg	ebp
mov	[esp+28h+arg_C], 0
mov	[esp+28h+var_18], 0FFFFFFFFh
mov	[esp+28h+var_C], ebp

loc_750753:
cdq
idiv	ebp
mov	ecx, edx
mov	[esp+28h+arg_4], edx
test	ecx, ecx
jge	short loc_750767
dec	eax
add	ecx, ebp
mov	[esp+28h+arg_4], ecx

loc_750767:
mov	ecx, [esp+28h+arg_0]
mov	edx, [esp+28h+arg_C]
push	edx
lea	ebp, [eax+ecx]
mov	eax, [esp+2Ch+var_10]
push	ebp
push	eax
push	ecx
push	edi
mov	ecx, esi
call	sub_750310
add	edi, [esp+28h+var_18]
mov	edx, [esi+3Ch]
mov	ecx, [esi+40h]
mov	ebx, ebp
lea	eax, [esi+3Ch]
sar	ebx, 8
sub	edx, ebx
sub	ecx, edi
or	edx, ecx
jz	short loc_7507BB
mov	edx, [esi+44h]
or	edx, [esi+48h]
jz	short loc_7507AD
push	eax
lea	ecx, [esi+14h]
call	sub_750250

loc_7507AD:
xor	eax, eax
mov	[esi+3Ch], ebx
mov	[esi+40h], edi
mov	[esi+44h], eax
mov	[esi+48h], eax

loc_7507BB:
cmp	edi, [esp+28h+var_14]
jz	loc_75086D
mov	eax, [esp+28h+var_4]
mov	ecx, [esp+28h+var_C]
shl	eax, 8
cdq
idiv	ecx
mov	[esp+28h+arg_0], eax
mov	[esp+28h+var_4], edx
test	edx, edx
jge	short loc_7507EA
dec	eax
add	edx, ecx
mov	[esp+28h+arg_0], eax
mov	[esp+28h+var_4], edx

loc_7507EA:
sub	[esp+28h+arg_4], ecx
mov	edx, 100h
sub	edx, [esp+28h+arg_C]
mov	[esp+28h+var_10], edx
jmp	short loc_75080C
align 10h

loc_750800:
mov	eax, [esp+28h+arg_0]
mov	ecx, [esp+28h+var_C]
mov	edx, [esp+28h+var_10]

loc_75080C:
mov	ebx, [esp+28h+var_4]
add	[esp+28h+arg_4], ebx
js	short loc_75081B
sub	[esp+28h+arg_4], ecx
inc	eax

loc_75081B:
lea	ebx, [eax+ebp]
mov	eax, [esp+28h+arg_C]
push	eax
push	ebx
push	edx
push	ebp
push	edi
mov	ecx, esi
call	sub_750310
add	edi, [esp+28h+var_18]
mov	ecx, [esi+3Ch]
mov	edx, [esi+40h]
lea	eax, [esi+3Ch]
mov	ebp, ebx
sar	ebx, 8
sub	ecx, ebx
sub	edx, edi
or	ecx, edx
jz	short loc_750867
mov	ecx, [esi+44h]
or	ecx, [esi+48h]
jz	short loc_750859
push	eax
lea	ecx, [esi+14h]
call	sub_750250

loc_750859:
xor	eax, eax
mov	[esi+3Ch], ebx
mov	[esi+40h], edi
mov	[esi+44h], eax
mov	[esi+48h], eax

loc_750867:
cmp	edi, [esp+28h+var_14]
jnz	short loc_750800

loc_75086D:
mov	edx, [esp+28h+var_8]
mov	eax, [esp+28h+arg_8]
push	edx
push	eax
mov	ecx, 100h
sub	ecx, [esp+30h+arg_C]
push	ecx
push	ebp
push	edi
mov	ecx, esi
call	sub_750310
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	10h
sub_750520 endp

align 10h



sub_7508A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+44h]
or	eax, [esi+48h]
jz	short loc_7508BC
lea	ecx, [esi+3Ch]
push	ecx
lea	ecx, [esi+14h]
call	sub_750250

loc_7508BC:
mov	ebx, [esi+14h]
xor	ebp, ebp
mov	eax, 7FFFFFFFh
mov	[esi+3Ch], eax
mov	[esi+40h], eax
mov	[esi+44h], ebp
mov	[esi+48h], ebp
cmp	ebx, ebp
jnz	short loc_7508DF
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn

loc_7508DF:
cmp	[esi+34h], ebp
jnz	loc_7509F9
push	edi
push	100h
lea	edi, [esi+24h]
push	ebx
mov	ecx, edi
call	sub_74FFE0
mov	[edi+4], ebx
mov	ebx, [esi+58h]
sub	ebx, [esi+50h]
push	10h
inc	ebx
lea	edi, [esi+30h]
push	ebx
mov	ecx, edi
call	sub_750050
mov	edx, ebx
add	edx, edx
add	edx, edx
add	edx, edx
push	edx		; size_t
mov	[edi+4], ebx
mov	eax, [edi]
push	ebp		; int
push	eax		; void *
call	_memset
add	esp, 0Ch
xor	eax, eax
cmp	[esi+14h], ebp
jbe	short loc_75095B
nop

loc_750930:
mov	edx, [esi+20h]
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
mov	ebx, eax
and	ebx, 0FFh
shl	ebx, 4
mov	edx, [ecx+ebx+4]
sub	edx, [esi+50h]
mov	ecx, [edi]
inc	dword ptr [ecx+edx*8]
lea	ecx, [ecx+edx*8]
inc	eax
cmp	eax, [esi+14h]
jb	short loc_750930

loc_75095B:
xor	edx, edx
xor	eax, eax
cmp	[esi+34h], ebp
jbe	short loc_750976

loc_750964:
mov	ecx, [edi]
mov	ebx, [ecx+eax*8]
lea	ecx, [ecx+eax*8]
mov	[ecx], edx
inc	eax
add	edx, ebx
cmp	eax, [esi+34h]
jb	short loc_750964

loc_750976:
xor	edx, edx
cmp	[esi+14h], ebp
jbe	short loc_7509B5
lea	ecx, [ecx+0]

loc_750980:
mov	ebx, [esi+20h]
mov	ebp, [esi+24h]
mov	eax, edx
and	eax, 0FFh
mov	ecx, edx
shr	ecx, 8
shl	eax, 4
add	eax, [ebx+ecx*4]
mov	ebx, [edi]
mov	ecx, [eax+4]
sub	ecx, [esi+50h]
inc	edx
lea	ecx, [ebx+ecx*8]
mov	ebx, [ecx]
add	ebx, [ecx+4]
mov	[ebp+ebx*4+0], eax
inc	dword ptr [ecx+4]
cmp	edx, [esi+14h]
jb	short loc_750980

loc_7509B5:
xor	ebx, ebx
cmp	[esi+34h], ebx
jbe	short loc_7509F8
lea	esp, [esp+0]

loc_7509C0:
mov	edx, [edi]
mov	ecx, [edx+ebx*8+4]
lea	eax, [edx+ebx*8]
test	ecx, ecx
jz	short loc_7509F2
mov	eax, [eax]
mov	edx, [esi+24h]
push	offset sub_74FE10
push	ecx
mov	[esp+20h+var_4], ecx
lea	ecx, [esp+20h+var_8]
lea	eax, [edx+eax*4]
push	0
push	ecx
mov	[esp+28h+var_8], eax
call	sub_756BA0
add	esp, 10h

loc_7509F2:
inc	ebx
cmp	ebx, [esi+34h]
jb	short loc_7509C0

loc_7509F8:
pop	edi

loc_7509F9:
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn
sub_7508A0 endp

align 10h



; int __stdcall	sub_750A10(float, float)
sub_750A10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

fld	[esp+arg_0]
push	ebx
fld	ds:dbl_143EF20
push	esi
fmul	st(1), st
push	edi
fxch	st(1)
mov	esi, ecx
call	__ftol2_sse
fmul	[esp+0Ch+arg_4]
mov	edi, eax
call	__ftol2_sse
mov	ecx, [esi+64h]
mov	ebx, eax
mov	eax, [esi+68h]
push	ebx
push	edi
push	eax
push	ecx
mov	ecx, esi
call	sub_750520
mov	[esi+64h], edi
pop	edi
mov	[esi+68h], ebx
pop	esi
pop	ebx
retn	8
sub_750A10 endp

align 10h



sub_750A60 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+60h]
mov	ecx, [esi+5Ch]
mov	edx, [esi+68h]
push	eax
mov	eax, [esi+64h]
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_750520
mov	ecx, [esi+5Ch]
mov	edx, [esi+60h]
mov	[esi+64h], ecx
mov	[esi+68h], edx
pop	esi
retn
sub_750A60 endp

align 10h



; int __stdcall	sub_750A90(int,	float, float, float, float, int)
sub_750A90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 10h
push	esi
mov	esi, ecx
mov	ecx, [esp+14h+arg_0]
xor	eax, eax
mov	[esp+14h+var_C], eax
cmp	[ecx+18h], eax
jbe	loc_750D46
fld	ds:dbl_143EF20
push	ebx
push	ebp
push	edi

loc_750AB2:
mov	ecx, [ecx+24h]
mov	edx, eax
and	eax, 3Fh
shr	edx, 6
mov	ecx, [ecx+edx*4]
lea	eax, [eax+eax*2]
lea	edi, [ecx+eax*8]
mov	eax, [edi+0Ch]
cmp	eax, [edi+10h]
jz	loc_750D2B
mov	ebx, [esp+20h+arg_14]
test	ebx, ebx
jl	short loc_750AE3
cmp	eax, ebx
jz	short loc_750AEB
jmp	loc_750C01

loc_750AE3:
test	eax, eax
jl	loc_750BFD

loc_750AEB:
mov	eax, [edi+8]
mov	edx, [edi]
mov	ecx, [edx+14h]
mov	edx, eax
shr	edx, 8
mov	edx, [ecx+edx*4]
mov	ebp, eax
and	ebp, 0FFh
fld	dword ptr [edx+ebp*8+4]
mov	edx, eax
fmul	[esp+20h+arg_8]
shr	edx, 8
mov	ecx, [ecx+edx*4]
and	eax, 0FFh
fadd	[esp+20h+arg_10]
fstp	[esp+20h+var_8]
fld	dword ptr [ecx+eax*8]
fmul	[esp+20h+arg_4]
fadd	[esp+20h+arg_C]
fstp	[esp+20h+var_10]
fld	[esp+20h+var_10]
fmul	st, st(1)
call	__ftol2_sse
fld	[esp+20h+var_8]
fmul	st, st(1)
mov	[esi+64h], eax
mov	[esi+5Ch], eax
call	__ftol2_sse
mov	ebp, 1
mov	[esi+68h], eax
mov	[esi+60h], eax
cmp	[edi+4], ebp
jbe	loc_750BFD
nop

loc_750B60:
mov	edx, [edi+8]
mov	eax, [edi]
mov	eax, [eax+14h]
lea	ebx, [edx+ebp]
mov	ecx, ebx
shr	ecx, 8
mov	[esp+20h+var_4], eax
mov	eax, [eax+ecx*4]
mov	edx, ebx
and	edx, 0FFh
fld	dword ptr [eax+edx*8]
fmul	[esp+20h+arg_4]
fadd	[esp+20h+arg_C]
fstp	[esp+20h+var_8]
fld	[esp+20h+var_8]
fmul	st, st(1)
call	__ftol2_sse
mov	edx, [esp+20h+var_4]
mov	ecx, ebx
shr	ecx, 8
mov	[esp+20h+var_10], eax
mov	eax, [edx+ecx*4]
and	ebx, 0FFh
fld	dword ptr [eax+ebx*8+4]
fmul	[esp+20h+arg_8]
fadd	[esp+20h+arg_10]
fstp	[esp+20h+var_4]
fmul	[esp+20h+var_4]
call	__ftol2_sse
mov	ecx, [esp+20h+var_10]
mov	edx, [esi+68h]
mov	ebx, eax
mov	eax, [esi+64h]
push	ebx
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_750520
fld	ds:dbl_143EF20
mov	ecx, [esp+20h+var_10]
inc	ebp
mov	[esi+64h], ecx
mov	[esi+68h], ebx
cmp	ebp, [edi+4]
jb	loc_750B60
mov	ebx, [esp+20h+arg_14]

loc_750BFD:
test	ebx, ebx
jl	short loc_750C0E

loc_750C01:
cmp	[edi+10h], ebx
jz	short loc_750C18
test	ebx, ebx
jge	loc_750D2B

loc_750C0E:
cmp	dword ptr [edi+10h], 0
jl	loc_750D2B

loc_750C18:
mov	edx, [edi+8]
mov	eax, [edi+4]
mov	ecx, [edi]
mov	ecx, [ecx+14h]
lea	eax, [edx+eax-1]
mov	edx, eax
shr	edx, 8
mov	edx, [ecx+edx*4]
mov	ebx, eax
and	ebx, 0FFh
fld	dword ptr [edx+ebx*8+4]
mov	edx, eax
fmul	[esp+20h+arg_8]
shr	edx, 8
mov	ecx, [ecx+edx*4]
and	eax, 0FFh
fadd	[esp+20h+arg_10]
fstp	[esp+20h+var_8]
fld	dword ptr [ecx+eax*8]
fmul	[esp+20h+arg_4]
fadd	[esp+20h+arg_C]
fstp	[esp+20h+var_4]
fld	[esp+20h+var_4]
fmul	st, st(1)
call	__ftol2_sse
fld	[esp+20h+var_8]
fmul	st, st(1)
mov	[esi+64h], eax
mov	[esi+5Ch], eax
call	__ftol2_sse
mov	[esi+68h], eax
mov	[esi+60h], eax
mov	ebp, [edi+4]
cmp	ebp, 1
jbe	loc_750D2B

loc_750C91:
mov	edx, [edi+8]
mov	eax, [edi]
mov	eax, [eax+14h]
lea	ebx, [edx+ebp-2]
mov	ecx, ebx
shr	ecx, 8
mov	[esp+20h+var_8], eax
mov	eax, [eax+ecx*4]
mov	edx, ebx
and	edx, 0FFh
fld	dword ptr [eax+edx*8]
fmul	[esp+20h+arg_4]
fadd	[esp+20h+arg_C]
fstp	[esp+20h+var_4]
fld	[esp+20h+var_4]
fmul	st, st(1)
call	__ftol2_sse
mov	edx, [esp+20h+var_8]
mov	ecx, ebx
shr	ecx, 8
mov	[esp+20h+var_10], eax
mov	eax, [edx+ecx*4]
and	ebx, 0FFh
fld	dword ptr [eax+ebx*8+4]
fmul	[esp+20h+arg_8]
fadd	[esp+20h+arg_10]
fstp	[esp+20h+var_4]
fmul	[esp+20h+var_4]
call	__ftol2_sse
mov	ecx, [esp+20h+var_10]
mov	edx, [esi+68h]
mov	ebx, eax
mov	eax, [esi+64h]
push	ebx
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_750520
fld	ds:dbl_143EF20
mov	ecx, [esp+20h+var_10]
dec	ebp
mov	[esi+64h], ecx
mov	[esi+68h], ebx
cmp	ebp, 1
ja	loc_750C91

loc_750D2B:
mov	eax, [esp+20h+var_C]
mov	ecx, [esp+20h+arg_0]
inc	eax
mov	[esp+20h+var_C], eax
cmp	eax, [ecx+18h]
jb	loc_750AB2
pop	edi
fstp	st
pop	ebp
pop	ebx

loc_750D46:
pop	esi
add	esp, 10h
retn	18h
sub_750A90 endp

align 10h



; int __stdcall	sub_750D50(int,	float, int)
sub_750D50 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
fldz
mov	edx, [esp+arg_0]
push	eax		; int
sub	esp, 10h
fst	[esp+14h+var_8]
fstp	[esp+14h+var_C]
fld	[esp+14h+arg_4]
fst	[esp+14h+var_10]
fstp	[esp+14h+var_14]
push	edx		; int
call	sub_750A90
retn	0Ch
sub_750D50 endp

align 10h



sub_750D80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, [edx+4]
push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+4]
cmp	eax, ecx
jnz	short loc_750D97
mov	eax, [edx]
cmp	eax, [esi]

loc_750D97:
sbb	eax, eax
neg	eax
pop	esi
retn
sub_750D80 endp

align 10h



sub_750DA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_750DEE
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_750DD0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_750DE7

loc_750DD0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_750DE7:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_750DEE:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	80h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_750DA0 endp

align 10h



sub_750E20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_750E71
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_750E50
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_750E6A

loc_750E50:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_750E6A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_750E71:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1C00h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_750E20 endp

align 10h



sub_750EA0 proc	near

var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_154= dword ptr -154h
var_150= dword ptr -150h
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
sub	esp, 1B4h
push	edi
mov	edi, [esp+1B8h+arg_4]
mov	ecx, eax
sub	ecx, edi
cmp	ecx, 2
jb	loc_7513DA
push	ebx
mov	ebx, [esp+1BCh+arg_0]
push	ebp
push	esi
lea	ecx, [esp+1C4h+var_140]
mov	[esp+1C4h+var_1A0], edi
mov	[esp+1C4h+var_1A4], eax

loc_750ED8:
mov	[esp+1C4h+var_1AC], ecx
lea	esp, [esp+0]

loc_750EE0:
mov	edx, [esp+1C4h+var_1A4]
mov	eax, edx
sub	eax, edi
cmp	eax, 9
mov	ebp, edi
jle	loc_75126C
mov	esi, [ebx+0Ch]
cdq
sub	eax, edx
sar	eax, 1
add	eax, edi
mov	edx, eax
and	eax, 0FFh
lea	eax, [eax+eax*2]
shr	edx, 8
mov	ecx, [esi+edx*4]
lea	ecx, [ecx+eax*4]
mov	eax, edi
and	eax, 0FFh
lea	edx, [eax+eax*2]
add	edx, edx
shr	ebp, 8
add	edx, edx
add	ebp, ebp
add	ebp, ebp
mov	eax, [esi+ebp]
mov	esi, [eax+edx+4]
add	eax, edx
mov	[esp+1C4h+var_160], esi
mov	esi, [eax+8]
mov	[esp+1C4h+var_15C], esi
mov	esi, [ecx]
mov	[esp+1C4h+var_1B0], edx
mov	edx, [eax]
mov	[eax], esi
mov	esi, [ecx+4]
mov	[eax+4], esi
mov	esi, [ecx+8]
mov	[eax+8], esi
mov	eax, [esp+1C4h+var_15C]
mov	esi, [esp+1C4h+var_1A4]
mov	[ecx], edx
mov	edx, [esp+1C4h+var_160]
mov	[ecx+4], edx
mov	[ecx+8], eax
mov	edx, [ebx+0Ch]
inc	edi
mov	ecx, edi
shr	ecx, 8
add	ecx, ecx
add	ecx, ecx
mov	edx, [edx+ecx]
mov	eax, edi
and	eax, 0FFh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	edx, eax
mov	[esp+1C4h+var_19C], eax
dec	esi
mov	[esp+1C4h+var_198], ecx
mov	eax, esi
and	eax, 0FFh
lea	eax, [eax+eax*2]
mov	ecx, esi
shr	ecx, 8
add	eax, eax
add	ecx, ecx
add	eax, eax
add	ecx, ecx
mov	[esp+1C4h+var_1A8], eax
mov	eax, [ebx+0Ch]
mov	[esp+1C4h+var_1B4], ecx
mov	ecx, [ecx+eax]
add	ecx, [esp+1C4h+var_1A8]
push	edx
push	ecx
call	[esp+1CCh+arg_C]
add	esp, 8
test	al, al
jz	short loc_751016
mov	ecx, [ebx+0Ch]
mov	edx, [esp+1C4h+var_198]
mov	eax, [ecx+edx]
add	eax, [esp+1C4h+var_19C]
mov	edx, [esp+1C4h+var_1B4]
mov	ecx, [ecx+edx]
add	ecx, [esp+1C4h+var_1A8]
mov	edx, [ecx]
mov	[esp+1C4h+var_194], edx
mov	edx, [ecx+4]
mov	[esp+1C4h+var_190], edx
mov	edx, [ecx+8]
mov	[esp+1C4h+var_18C], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	ecx, [esp+1C4h+var_194]
mov	edx, [esp+1C4h+var_190]
mov	[eax], ecx
mov	ecx, [esp+1C4h+var_18C]
mov	[eax+4], edx
mov	[eax+8], ecx

loc_751016:
mov	ecx, [ebx+0Ch]
mov	edx, [esp+1C4h+var_198]
mov	eax, [ecx+edx]
add	eax, [esp+1C4h+var_19C]
mov	ecx, [ecx+ebp]
add	ecx, [esp+1C4h+var_1B0]
push	eax
push	ecx
call	[esp+1CCh+arg_C]
add	esp, 8
test	al, al
jz	short loc_751088
mov	ecx, [ebx+0Ch]
mov	eax, [esp+1C4h+var_198]
mov	eax, [ecx+eax]
mov	ecx, [ecx+ebp]
add	eax, [esp+1C4h+var_19C]
add	ecx, [esp+1C4h+var_1B0]
mov	edx, [ecx]
mov	[esp+1C4h+var_17C], edx
mov	edx, [ecx+4]
mov	[esp+1C4h+var_178], edx
mov	edx, [ecx+8]
mov	[esp+1C4h+var_174], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	ecx, [esp+1C4h+var_17C]
mov	edx, [esp+1C4h+var_178]
mov	[eax], ecx
mov	ecx, [esp+1C4h+var_174]
mov	[eax+4], edx
mov	[eax+8], ecx

loc_751088:
mov	ecx, [ebx+0Ch]
mov	eax, [ecx+ebp]
mov	edx, [esp+1C4h+var_1B4]
add	eax, [esp+1C4h+var_1B0]
mov	ecx, [ecx+edx]
add	ecx, [esp+1C4h+var_1A8]
push	eax
push	ecx
call	[esp+1CCh+arg_C]
add	esp, 8
test	al, al
jz	short loc_751100
mov	ecx, [ebx+0Ch]
mov	eax, [ecx+ebp]
add	eax, [esp+1C4h+var_1B0]
mov	edx, [esp+1C4h+var_1B4]
mov	ecx, [ecx+edx]
add	ecx, [esp+1C4h+var_1A8]
mov	edx, [ecx]
mov	[esp+1C4h+var_188], edx
mov	edx, [ecx+4]
mov	[esp+1C4h+var_184], edx
mov	edx, [ecx+8]
mov	[esp+1C4h+var_180], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	ecx, [esp+1C4h+var_188]
mov	edx, [esp+1C4h+var_184]
mov	[eax], ecx
mov	ecx, [esp+1C4h+var_180]
mov	[eax+4], edx
mov	[eax+8], ecx
lea	ebx, [ebx+0]

loc_751100:
mov	ecx, [ebx+0Ch]
mov	eax, [ecx+ebp]
add	eax, [esp+1C4h+var_1B0]
inc	edi
mov	[esp+1C4h+var_1B4], eax
mov	edx, edi
shr	edx, 8
mov	ecx, [ecx+edx*4]
mov	edx, [esp+1C4h+var_1B4]
mov	eax, edi
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
push	edx
push	eax
call	[esp+1CCh+arg_C]
add	esp, 8
test	al, al
jnz	short loc_751100

loc_751138:
mov	ecx, [ebx+0Ch]
dec	esi
mov	edx, esi
shr	edx, 8
mov	edx, [ecx+edx*4]
mov	eax, esi
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	edx, [edx+eax*4]
mov	eax, [ecx+ebp]
add	eax, [esp+1C4h+var_1B0]
push	edx
push	eax
call	[esp+1CCh+arg_C]
add	esp, 8
test	al, al
jnz	short loc_751138
mov	ecx, [ebx+0Ch]
mov	edx, esi
mov	eax, esi
and	eax, 0FFh
shr	edx, 8
cmp	edi, esi
mov	edx, [ecx+edx*4]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
jg	short loc_7511DF
mov	[esp+1C4h+var_1B4], eax
mov	edx, edi
shr	edx, 8
mov	ecx, [ecx+edx*4]
mov	eax, edi
and	eax, 0FFh
lea	eax, [eax+eax*2]
mov	edx, [ecx+eax*4]
lea	eax, [ecx+eax*4]
mov	ecx, [eax+4]
mov	[esp+1C4h+var_170], edx
mov	edx, [eax+8]
mov	[esp+1C4h+var_168], edx
mov	[esp+1C4h+var_16C], ecx
mov	ecx, [esp+1C4h+var_1B4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	eax, [esp+1C4h+var_170]
mov	edx, [esp+1C4h+var_16C]
mov	[ecx], eax
mov	eax, [esp+1C4h+var_168]
mov	[ecx+4], edx
mov	[ecx+8], eax
jmp	loc_751100

loc_7511DF:
mov	ebp, [ecx+ebp]
add	ebp, [esp+1C4h+var_1B0]
mov	edx, [ebp+4]
mov	ecx, [ebp+0]
mov	[esp+1C4h+var_148], edx
mov	edx, [ebp+8]
mov	[esp+1C4h+var_144], edx
mov	edx, [eax]
mov	[ebp+0], edx
mov	edx, [eax+4]
mov	[ebp+4], edx
mov	edx, [eax+8]
mov	[ebp+8], edx
mov	edx, [esp+1C4h+var_144]
mov	[eax], ecx
mov	ecx, [esp+1C4h+var_148]
mov	[eax+4], ecx
mov	ecx, [esp+1C4h+var_1A0]
mov	[eax+8], edx
mov	eax, [esp+1C4h+var_1A4]
mov	edx, eax
mov	ebp, esi
sub	edx, edi
sub	ebp, ecx
cmp	ebp, edx
jle	short loc_75124D
mov	eax, [esp+1C4h+var_1AC]
add	[esp+1C4h+var_1AC], 8
mov	[eax], ecx
mov	ecx, [esp+1C4h+var_1AC]
mov	[eax+4], esi
mov	[esp+1C4h+var_1A0], edi
jmp	loc_750EE0

loc_75124D:
mov	ecx, [esp+1C4h+var_1AC]
add	[esp+1C4h+var_1AC], 8
mov	[ecx], edi
mov	edi, [esp+1C4h+var_1A0]
mov	[ecx+4], eax
mov	ecx, [esp+1C4h+var_1AC]
mov	[esp+1C4h+var_1A4], esi
jmp	loc_750EE0

loc_75126C:
inc	edi
cmp	edi, edx
mov	[esp+1C4h+var_19C], edi
jge	loc_7513B4
lea	esp, [esp+0]

loc_751280:
mov	ecx, [ebx+0Ch]
mov	esi, ebp
mov	edi, ebp
and	edi, 0FFh
shr	esi, 8
lea	edi, [edi+edi*2]
add	esi, esi
add	esi, esi
mov	eax, [ecx+esi]
add	edi, edi
add	edi, edi
add	eax, edi
mov	[esp+1C4h+var_1B4], eax
lea	eax, [ebp+1]
mov	edx, eax
shr	edx, 8
mov	ecx, [ecx+edx*4]
mov	edx, [esp+1C4h+var_1B4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
push	edx
push	eax
call	[esp+1CCh+arg_C]
add	esp, 8
test	al, al
jz	loc_75139B
lea	edx, [ebp+1]
jmp	short loc_7512E4
jmp	short loc_7512E0
align 10h

loc_7512E0:
mov	edx, [esp+1C4h+var_198]

loc_7512E4:
mov	eax, [ebx+0Ch]
mov	eax, [eax+esi]
add	eax, edi
mov	ecx, edx
and	ecx, 0FFh
lea	edi, [ecx+ecx*2]
mov	ecx, [ebx+0Ch]
mov	esi, edx
shr	esi, 8
mov	ecx, [ecx+esi*4]
mov	esi, [ecx+edi*4]
lea	ecx, [ecx+edi*4]
mov	edi, [ecx+4]
mov	[esp+1C4h+var_154], edi
mov	edi, [ecx+8]
mov	[esp+1C4h+var_150], edi
mov	edi, [eax]
mov	[ecx], edi
mov	edi, [eax+4]
mov	[ecx+4], edi
mov	edi, [eax+8]
mov	[ecx+8], edi
mov	ecx, [esp+1C4h+var_154]
mov	[eax], esi
mov	[eax+4], ecx
mov	ecx, [esp+1C4h+var_150]
mov	[eax+8], ecx
cmp	ebp, [esp+1C4h+var_1A0]
jz	short loc_75139B
mov	ecx, [ebx+0Ch]
dec	ebp
mov	esi, ebp
mov	edi, ebp
and	edi, 0FFh
shr	esi, 8
lea	edi, [edi+edi*2]
add	esi, esi
add	esi, esi
mov	eax, [esi+ecx]
add	edi, edi
dec	edx
add	edi, edi
add	eax, edi
mov	[esp+1C4h+var_1B4], eax
mov	eax, edx
shr	eax, 8
mov	[esp+1C4h+var_1A8], eax
mov	eax, edx
and	eax, 0FFh
mov	[esp+1C4h+var_198], edx
lea	edx, [eax+eax*2]
mov	eax, [esp+1C4h+var_1A8]
mov	eax, [ecx+eax*4]
mov	ecx, [esp+1C4h+var_1B4]
lea	eax, [eax+edx*4]
push	ecx
push	eax
call	[esp+1CCh+arg_C]
add	esp, 8
test	al, al
jnz	loc_7512E0

loc_75139B:
mov	eax, [esp+1C4h+var_19C]
mov	ebp, eax
inc	eax
cmp	eax, [esp+1C4h+var_1A4]
mov	[esp+1C4h+var_19C], eax
jl	loc_751280
mov	ecx, [esp+1C4h+var_1AC]

loc_7513B4:
lea	edx, [esp+1C4h+var_140]
cmp	ecx, edx
jbe	short loc_7513D7
mov	eax, [ecx-8]
mov	edx, [ecx-4]
sub	ecx, 8
mov	[esp+1C4h+var_1A0], eax
mov	[esp+1C4h+var_1A4], edx
mov	edi, eax
jmp	loc_750ED8

loc_7513D7:
pop	esi
pop	ebp
pop	ebx

loc_7513DA:
pop	edi
add	esp, 1B4h
retn
sub_750EA0 endp

align 10h



sub_7513F0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], 400h
mov	dword ptr [eax+4], 400h
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
mov	[eax+54h], ecx
mov	[eax+58h], ecx
mov	[eax+5Ch], ecx
mov	[eax+60h], ecx
retn
sub_7513F0 endp

align 10h



sub_751440 proc	near

var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 38h
mov	eax, [esp+38h+arg_0]
push	ebx
mov	ebx, ecx
mov	edx, [ebx+50h]
mov	ecx, eax
and	eax, 0FFh
push	ebp
push	esi
shr	ecx, 8
lea	esi, ds:0[eax*8]
sub	esi, eax
mov	eax, [edx+ecx*4]
lea	ebp, [eax+esi*4]
mov	eax, [esp+44h+arg_4]
push	edi
mov	ecx, 7
mov	esi, ebp
lea	edi, [esp+48h+var_38]
rep movsd
mov	ecx, 7
mov	esi, ebp
lea	edi, [esp+48h+var_1C]
rep movsd
mov	ecx, [eax]
mov	eax, [eax+4]
mov	esi, [ebx+44h]
add	[esp+48h+var_38], ecx
sub	[esp+48h+var_30], ecx
add	[esp+48h+var_18], eax
sub	[esp+48h+var_10], eax
add	ebx, 44h
shr	esi, 8
mov	[esp+48h+var_2C], eax
cmp	esi, [ebx+4]
jb	short loc_7514B6
push	esi
mov	ecx, ebx
call	sub_750E20

loc_7514B6:
mov	eax, [ebx]
mov	ecx, [ebx+0Ch]
and	eax, 0FFh
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [ecx+esi*4]
lea	edi, [eax+edx*4]
mov	ecx, 7
lea	esi, [esp+48h+var_38]
rep movsd
inc	dword ptr [ebx]
mov	esi, [ebx]
shr	esi, 8
cmp	esi, [ebx+4]
jb	short loc_7514EE
push	esi
mov	ecx, ebx
call	sub_750E20

loc_7514EE:
mov	eax, [ebx]
mov	ecx, [ebx+0Ch]
and	eax, 0FFh
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [ecx+esi*4]
lea	edi, [eax+edx*4]
mov	eax, [esp+48h+arg_4]
mov	ecx, 7
lea	esi, [esp+48h+var_1C]
rep movsd
inc	dword ptr [ebx]
mov	ecx, [eax]
mov	[ebp+8], ecx
mov	edx, [eax+4]
mov	[ebp+0Ch], edx
mov	eax, [eax+8]
mov	[ebp+10h], eax
mov	ecx, [ebx]
sub	ecx, 2
mov	[ebp+14h], ecx
mov	edx, [ebx]
pop	edi
dec	edx
pop	esi
mov	[ebp+18h], edx
pop	ebp
pop	ebx
add	esp, 38h
retn	8
sub_751440 endp

align 10h



sub_751550 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8

sub	esp, 14h
xor	edx, edx
mov	[esp+14h+var_10], ecx
mov	[esp+14h+var_14], edx
cmp	[ecx+44h], edx
jbe	loc_7515EC
push	ebx
push	ebp
push	esi
push	edi
lea	esp, [esp+0]

loc_751570:
mov	edi, [ecx+50h]
mov	eax, edx
and	eax, 0FFh
lea	ebx, ds:0[eax*8]
mov	esi, edx
sub	ebx, eax
shr	esi, 8
mov	eax, [edi+esi*4]
lea	eax, [eax+ebx*4]
mov	ebx, [eax+10h]
cmp	ebx, 0FFFFFFFFh
jz	short loc_7515DE
mov	edi, [ecx+24h]
mov	edx, [eax+4]
mov	ebp, [eax]
lea	esi, [ecx+24h]
shr	edi, 8
mov	[esp+24h+var_8], edx
cmp	edi, [esi+4]
jb	short loc_7515B9
push	edi
mov	ecx, esi
call	sub_71BD80
mov	ecx, [esp+24h+var_10]

loc_7515B9:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+edi*4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	edx, [esp+24h+var_8]
mov	[eax], ebp
mov	[eax+4], edx
mov	edx, [esp+24h+var_14]
mov	[eax+8], ebx
inc	dword ptr [esi]

loc_7515DE:
inc	edx
mov	[esp+24h+var_14], edx
cmp	edx, [ecx+44h]
jb	short loc_751570
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_7515EC:
add	esp, 14h
retn
sub_751550 endp




sub_7515F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_0]
mov	eax, ecx
and	eax, 0FFh
lea	ebx, ds:0[eax*8]
mov	edx, ecx
sub	ebx, eax
push	edi
mov	edi, [esi+50h]
shr	edx, 8
mov	eax, [edi+edx*4]
lea	ebp, [eax+ebx*4]
mov	eax, [ebp+8]
cmp	eax, [esi+0Ch]
jb	loc_7516C9
mov	ebx, [esp+10h+arg_4]
jmp	short loc_751630
align 10h

loc_751630:
mov	eax, [ebp+0Ch]
cmp	eax, [esi+10h]
jb	loc_7516C9
lea	esp, [esp+0]

loc_751640:
cmp	ebx, [esi+14h]
jnb	loc_7516C9
mov	edi, [esi+20h]
mov	edx, ebx
mov	eax, ebx
shr	edx, 8
mov	edx, [edi+edx*4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
test	dword ptr [edx+eax*4+8], 80000000h
lea	edi, [edx+eax*4]
jnz	short loc_75167A
mov	eax, [ebp+8]
cmp	[edi], eax
ja	short loc_75167A
mov	eax, [ebp+0Ch]
cmp	[edi+4], eax
jbe	short loc_75167D

loc_75167A:
inc	ebx
jmp	short loc_751640

loc_75167D:
push	edi
push	ecx
mov	ecx, esi
call	sub_751440
or	dword ptr [edi+8], 80000000h
inc	dword ptr [esi+8]
mov	eax, [ebp+14h]
push	ebx
push	eax
mov	ecx, esi
call	sub_7515F0
mov	ecx, [ebp+18h]
mov	edi, [esi+50h]
mov	eax, ecx
and	eax, 0FFh
lea	ebp, ds:0[eax*8]
mov	edx, ecx
sub	ebp, eax
shr	edx, 8
mov	eax, [edi+edx*4]
lea	ebp, [eax+ebp*4]
mov	eax, [ebp+8]
cmp	eax, [esi+0Ch]
jnb	loc_751630

loc_7516C9:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_7515F0 endp




sub_7516D0 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 28h
push	ebx
push	ebp
mov	ebx, ecx
push	esi
push	edi
xor	edi, edi
lea	esi, [ebx+14h]
lea	ebp, [ebx+44h]
mov	[ebx+24h], edi
mov	[ebx+34h], edi
mov	[ebp+0], edi
cmp	[esi], edi
jz	loc_751814
mov	eax, [esi]
push	offset sub_750D80
push	eax
push	edi
push	esi
call	sub_750EA0
mov	esi, [esi]
mov	edx, [ebx+20h]
lea	eax, [esi-1]
mov	esi, eax
mov	ecx, eax
and	ecx, 0FFh
shr	esi, 8
mov	esi, [edx+esi*4]
lea	ecx, [ecx+ecx*2]
mov	ecx, [esi+ecx*4]
mov	[ebx+0Ch], ecx
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
add	esp, 10h
and	eax, 0FFh
lea	eax, [eax+eax*2]
mov	edx, [ecx+eax*4+4]
mov	[ebx+10h], edx
mov	[ebx+8], edi
jmp	short loc_751743

loc_751741:
xor	edi, edi

loc_751743:
mov	eax, [ebx+8]
mov	ecx, [ebx]
mov	edx, [ebx+4]
mov	esi, edi
mov	[esp+38h+var_28], eax
or	eax, 0FFFFFFFFh
shr	esi, 8
mov	[ebp+0], edi
mov	[esp+38h+var_1C], edi
mov	[esp+38h+var_18], edi
mov	[esp+38h+var_14], ecx
mov	[esp+38h+var_10], edx
mov	[esp+38h+var_C], eax
mov	[esp+38h+var_8], eax
mov	[esp+38h+var_4], eax
cmp	esi, [ebp+4]
jb	short loc_751783
push	esi
mov	ecx, ebp
call	sub_750E20

loc_751783:
mov	eax, [ebp+0]
mov	ecx, [ebp+0Ch]
and	eax, 0FFh
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [ecx+esi*4]
lea	edi, [eax+edx*4]
mov	ecx, 7
lea	esi, [esp+38h+var_1C]
rep movsd
inc	dword ptr [ebp+0]
push	0
push	0
mov	ecx, ebx
call	sub_7515F0
mov	ecx, [esp+38h+var_28]
cmp	[ebx+8], ecx
jbe	short loc_751808
mov	esi, [ebx+24h]
mov	ecx, ebx
mov	[esp+38h+var_24], esi
call	sub_751550
mov	ecx, [ebx+24h]
mov	edi, [ebx+34h]
sub	ecx, esi
lea	esi, [ebx+34h]
shr	edi, 4
mov	[esp+38h+var_20], ecx
cmp	edi, [esi+4]
jb	short loc_7517F0
push	edi
mov	ecx, esi
call	sub_750DA0
mov	ecx, [esp+38h+var_20]

loc_7517F0:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	edi, [edx+edi*4]
mov	edx, [esp+38h+var_24]
and	eax, 0Fh
mov	[edi+eax*8], edx
mov	[edi+eax*8+4], ecx
inc	dword ptr [esi]

loc_751808:
mov	eax, [ebx+8]
cmp	eax, [ebx+14h]
jb	loc_751741

loc_751814:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_7516D0 endp

align 10h



sub_751820 proc	near
mov	ecx, [ecx+8]
test	ecx, ecx
jz	short loc_75182E
mov	eax, [ecx]
mov	edx, [eax+20h]
jmp	edx

loc_75182E:
mov	eax, 1001h
retn
sub_751820 endp

align 10h



sub_751840 proc	near
mov	ecx, [ecx+8]
test	ecx, ecx
jz	short loc_751858
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
test	al, al
jz	short loc_751858
mov	eax, 1
retn

loc_751858:
xor	eax, eax
retn
sub_751840 endp

align 10h



sub_751860 proc	near
mov	eax, 1001h
retn
sub_751860 endp

align 10h



sub_751870 proc	near
or	eax, 0FFFFFFFFh
retn	8
sub_751870 endp

align 10h



sub_751880 proc	near
or	eax, 0FFFFFFFFh
or	edx, eax
retn	0Ch
sub_751880 endp

align 10h



sub_751890 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1440D10
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7518B3
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7518B3:
mov	eax, esi
pop	esi
retn	4
sub_751890 endp

align 10h



sub_7518C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
push	eax
mov	esi, ecx
mov	ecx, [esp+10h+arg_0]
push	ebx
push	ecx
call	sub_766E10
mov	ecx, [esi+8]
add	esp, 0Ch
mov	edi, eax
test	ecx, ecx
jz	short loc_7518EA
call	sub_64A430

loc_7518EA:
mov	ecx, edi
mov	[esi+8], edi
test	ecx, ecx
jz	short loc_751940
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
test	al, al
jz	short loc_751940
test	bl, 20h
jz	short loc_751938
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	28h
call	eax
test	eax, eax
jz	short loc_751927
mov	ecx, [esi+8]
push	ecx
mov	ecx, eax
call	sub_713F80
mov	edi, eax
jmp	short loc_751929

loc_751927:
xor	edi, edi

loc_751929:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_751935
call	sub_64A430

loc_751935:
mov	[esi+8], edi

loc_751938:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	0Ch

loc_751940:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	8
call	eax
test	eax, eax
jz	short loc_75196C
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1440D10
mov	edi, eax
jmp	short loc_75196E

loc_75196C:
xor	edi, edi

loc_75196E:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_75197A
call	sub_64A430

loc_75197A:
mov	[esi+8], edi
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	0Ch
sub_7518C0 endp

align 10h



sub_751990 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
call	edx
test	al, al
jz	short loc_7519EB
mov	ecx, [esi+8]
mov	eax, [ecx]
mov	edx, [eax+48h]
push	edi
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	8
call	edx
test	eax, eax
jz	short loc_7519D5
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1440D10
mov	edi, eax
jmp	short loc_7519D7

loc_7519D5:
xor	edi, edi

loc_7519D7:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_7519E3
call	sub_64A430

loc_7519E3:
mov	[esi+8], edi
pop	edi
mov	al, 1
pop	esi
retn

loc_7519EB:
xor	al, al
pop	esi
retn
sub_751990 endp

align 10h



sub_7519F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
push	eax
mov	dword ptr [esi], offset	off_155F500
push	ecx
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 0
push	edx
mov	ecx, esi
mov	dword ptr [esi], offset	off_1440D60
call	sub_7518C0
mov	eax, esi
pop	esi
retn	0Ch
sub_7519F0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_751A30(float, float, float)
sub_751A30 proc	near

var_48=	qword ptr -48h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 38h
fld	[ebp+arg_4]
push	esi
fld	st
push	edi
fld	ds:dbl_15FCD70
mov	edi, ecx
fmul	st(1), st
xor	esi, esi
fld	[ebp+arg_0]
fld	st
faddp	st(3), st
fld	[ebp+arg_8]
fld	st
fmulp	st(3), st
fxch	st(3)
faddp	st(2), st
fld1
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+40h+var_8]
fld	[esp+40h+var_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[ebp+arg_0]
fld	st
fmulp	st(3), st
fxch	st(2)
fstp	[ebp+arg_4]
fmulp	st(1), st
fstp	[ebp+arg_8]

loc_751A83:
mov	eax, esi
mov	[esp+40h+var_4], eax
fild	[esp+40h+var_4]
test	eax, eax
jge	short loc_751A97
fadd	ds:flt_15FCC08

loc_751A97:
fstp	[esp+40h+var_8]
sub	esp, 8
fld	[esp+48h+var_8]
fmul	[ebp+arg_0]
fstp	[esp+48h+var_C]
fld	[esp+48h+var_C]
fstp	[esp+48h+var_48]
call	_floor
fnstcw	word ptr [esp+48h+var_C]
movzx	eax, word ptr [esp+48h+var_C]
or	eax, 0C00h
mov	[esp+48h+var_4], eax
fldcw	word ptr [esp+48h+var_4]
fistp	[esp+48h+var_4]
mov	cl, byte ptr [esp+48h+var_4]
mov	[edi+esi], cl
fldcw	word ptr [esp+48h+var_C]
fld	[esp+48h+var_8]
fmul	[ebp+arg_4]
fstp	[esp+48h+var_4]
fld	[esp+48h+var_4]
fstp	[esp+48h+var_48]
call	_floor
fnstcw	word ptr [esp+48h+var_C]
movzx	eax, word ptr [esp+48h+var_C]
or	eax, 0C00h
mov	[esp+48h+var_4], eax
fldcw	word ptr [esp+48h+var_4]
fistp	[esp+48h+var_4]
mov	dl, byte ptr [esp+48h+var_4]
mov	[edi+esi+100h],	dl
fldcw	word ptr [esp+48h+var_C]
fld	[esp+48h+var_8]
fmul	[ebp+arg_8]
fstp	[esp+48h+var_4]
fld	[esp+48h+var_4]
fstp	[esp+48h+var_48]
call	_floor
fnstcw	word ptr [esp+48h+var_C]
inc	esi
movzx	eax, word ptr [esp+48h+var_C]
or	eax, 0C00h
mov	[esp+48h+var_4], eax
add	esp, 8
fldcw	word ptr [esp+40h+var_4]
fistp	[esp+40h+var_4]
mov	al, byte ptr [esp+40h+var_4]
mov	[edi+esi+1FFh],	al
fldcw	word ptr [esp+40h+var_C]
cmp	esi, 100h
jb	loc_751A83
mov	eax, edi
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	0Ch
sub_751A30 endp

align 10h



sub_751B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [ecx+8]
push	esi
mov	esi, [esp+4+arg_0]
lea	eax, [edx+esi]
cmp	eax, [ecx]
mov	eax, [esp+4+arg_4]
push	edi
ja	short loc_751BBF
mov	edi, [ecx+0Ch]
add	edi, eax
cmp	edi, [ecx+4]
ja	short loc_751BBF
mov	edi, [esp+8+arg_8]
mov	[edi], edx
mov	edx, [ecx+0Ch]
mov	edi, [esp+8+arg_C]
mov	[edi], edx
add	[ecx+8], esi
cmp	eax, [ecx+10h]
jbe	short loc_751BB8
mov	[ecx+10h], eax

loc_751BB8:
pop	edi
mov	al, 1
pop	esi
retn	10h

loc_751BBF:
mov	edx, [ecx+10h]
add	[ecx+0Ch], edx
mov	edx, [ecx+0Ch]
add	edx, eax
cmp	edx, [ecx+4]
ja	short loc_751BEF
mov	edx, [esp+8+arg_8]
mov	edi, [esp+8+arg_C]
mov	dword ptr [edx], 0
mov	edx, [ecx+0Ch]
mov	[edi], edx
pop	edi
mov	[ecx+8], esi
mov	[ecx+10h], eax
mov	al, 1
pop	esi
retn	10h

loc_751BEF:
pop	edi
xor	al, al
pop	esi
retn	10h
sub_751B80 endp

align 10h



sub_751C00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	word ptr [esi+28h], 0
jnz	short loc_751C14
mov	eax, [esp+4+arg_0]
push	eax
call	sub_716680

loc_751C14:
movzx	eax, word ptr [esi+28h]
pop	esi
test	ax, ax
jg	short loc_751C23
xor	eax, eax
retn	4

loc_751C23:
cwde
retn	4
sub_751C00 endp

align 10h



sub_751C30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	word ptr [esi+2Ah], 0
jnz	short loc_751C44
mov	eax, [esp+4+arg_0]
push	eax
call	sub_716680

loc_751C44:
movzx	eax, word ptr [esi+2Ah]
pop	esi
test	ax, ax
jg	short loc_751C53
xor	eax, eax
retn	4

loc_751C53:
cwde
retn	4
sub_751C30 endp

align 10h



sub_751C60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
push	edi
test	esi, esi
jz	short loc_751C8C
mov	edi, [esp+8+arg_4]
mov	edi, edi

loc_751C70:
cmp	[esi], edi
jz	short loc_751C91
mov	eax, [esi+10h]
push	edi
push	eax
call	sub_751C60
add	esp, 8
test	eax, eax
jnz	short loc_751C8E
mov	esi, [esi+14h]
test	esi, esi
jnz	short loc_751C70

loc_751C8C:
xor	eax, eax

loc_751C8E:
pop	edi
pop	esi
retn

loc_751C91:
pop	edi
mov	eax, esi
pop	esi
retn
sub_751C60 endp

align 10h



sub_751CA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
lea	eax, [ebx+ebx*4]
cmp	dword ptr [edi+eax*4+38h], 0
lea	esi, [edi+eax*4+38h]
jnz	short loc_751D03
mov	ecx, [esp+0Ch+arg_0]
mov	edx, [ecx]
mov	eax, [edx+8]
call	eax
mov	[esi], eax
test	eax, eax
jnz	short loc_751CD0

loc_751CC8:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	8

loc_751CD0:
lea	eax, [esi+4]
mov	[eax+4], edi
and	ebx, 0FFFF7FFFh
mov	[eax+8], ebx
mov	ecx, [esi]
mov	edx, [ecx]
push	eax
mov	eax, [edx+28h]
call	eax
mov	eax, [edi+4]
mov	ecx, [esi]
mov	edx, [ecx]
mov	edx, [edx+8]
push	10h
push	0
push	9
push	eax
mov	eax, [edi]
push	eax
call	edx
test	al, al
jz	short loc_751CC8

loc_751D03:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	8
sub_751CA0 endp

align 10h



sub_751D10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
mov	ebp, ecx
mov	ecx, [esp+4+arg_8]
cmp	ecx, 4
jbe	short loc_751D78
mov	eax, [esp+4+arg_4]
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, 4
add	esi, 2
nop

loc_751D30:
movzx	edx, byte ptr [esi]
movzx	ebx, byte ptr [edx+ebp+5A0h]
add	[eax], bl
movzx	ebx, byte ptr [edx+ebp+4A0h]
add	[eax+1], bl
movzx	ebx, byte ptr [edx+ebp+3A0h]
add	[eax+2], bl
movzx	ebx, byte ptr [edx+ebp+4A0h]
add	[eax+3], bl
lea	edx, [edx+ebp+3A0h]
mov	dl, [edx+200h]
add	[eax+4], dl
inc	edi
inc	esi
inc	eax
cmp	edi, ecx
jb	short loc_751D30
pop	edi
pop	esi
pop	ebx

loc_751D78:
pop	ebp
retn	0Ch
sub_751D10 endp

align 10h



; int __stdcall	sub_751D80(int,	int, int, int, int, float, int)
sub_751D80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

fld1
fld	[esp+arg_14]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_751E04
push	ebx
xor	ebx, ebx
cmp	[esp+4+arg_10],	ebx
jbe	short loc_751E03
fld	ds:dbl_15FCC48
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi

loc_751DA7:
mov	eax, [esp+10h+arg_8]
mov	edi, [esp+10h+arg_C]
lea	esi, [ebx+eax]
imul	esi, [ebp+18h]
add	esi, [esp+10h+arg_4]
add	esi, [ebp+1Ch]
test	edi, edi
jbe	short loc_751DF7

loc_751DC1:
movzx	ecx, byte ptr [esi]
sub	ecx, [esp+10h+arg_18]
mov	[esp+10h+arg_14], ecx
fild	[esp+10h+arg_14]
fmul	st, st(2)
fadd	st, st(1)
call	__ftol2_sse
add	eax, [esp+10h+arg_18]
jns	short loc_751DE3
xor	eax, eax
jmp	short loc_751DEF

loc_751DE3:
cmp	eax, 0FFh
jle	short loc_751DEF
mov	eax, 0FFh

loc_751DEF:
mov	[esi], al
inc	esi
sub	edi, 1
jnz	short loc_751DC1

loc_751DF7:
inc	ebx
cmp	ebx, [esp+10h+arg_10]
jb	short loc_751DA7
pop	edi
fstp	st(1)
pop	esi
pop	ebp

loc_751E03:
pop	ebx

loc_751E04:
fstp	st
retn	1Ch
sub_751D80 endp

align 10h



; int __stdcall	sub_751E10(float, int, float, float, int, int, int, int)
sub_751E10 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 8
mov	eax, [esp+8+arg_4]
mov	edx, [esp+8+arg_14]
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_18]
push	esi
mov	esi, [esp+14h+arg_10]
mov	[edx+6], al
push	edi
mov	edi, ecx
movzx	ecx, byte ptr [esi+7]
mov	[edx+7], cl
movzx	ecx, byte ptr [esi+0Ah]
mov	[edx+0Ah], cl
mov	ecx, eax
shl	ecx, 4
mov	[esp+18h+arg_4], eax
mov	[ebp+0], cx
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_751E55
fadd	ds:flt_15FCC08

loc_751E55:
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fld	st
fdiv	[esp+18h+arg_0]
fstp	[esp+18h+arg_4]
fld1
fld	[esp+18h+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_751E82
fstp	st
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
jmp	short loc_751E84

loc_751E82:
fstp	st(1)

loc_751E84:
movzx	eax, byte ptr [esi+8]
movzx	ecx, byte ptr [esi+9]
mov	[esp+18h+arg_4], eax
mov	eax, [edi+10h]
add	eax, eax
fild	[esp+18h+arg_4]
fld	ds:dbl_15FD690
fmul	st(1), st
fxch	st(1)
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	[esp+18h+arg_4], ecx
fld	[esp+18h+arg_8]
mov	ecx, [edi+0Ch]
fld	st
sub	ecx, eax
fmulp	st(2), st
sub	ecx, 2
fld	st(3)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+18h+arg_14]
fild	[esp+18h+arg_4]
fmul	st, st(2)
fstp	[esp+18h+arg_4]
fmul	[esp+18h+arg_4]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+18h+arg_4]
fxch	st(1)
fmul	ds:dbl_143B738
fstp	[esp+18h+arg_10]
fld	[esp+18h+arg_10]
mov	[esp+18h+arg_10], ecx
fmul	[esp+18h+arg_C]
fld	[esp+18h+arg_4]
fld	st
fadd	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+18h+arg_4]
fild	[esp+18h+arg_10]
test	ecx, ecx
jge	short loc_751F15
fadd	ds:flt_15FCC08

loc_751F15:
mov	edi, [esp+18h+arg_1C]
fstp	[esp+18h+arg_10]
fld	[esp+18h+arg_4]
mov	eax, 100h
fld	[esp+18h+arg_10]
mov	[edi], ax
fcom	st(1)
fnstsw	ax
fld	ds:dbl_15FCC48
test	ah, 5
jp	loc_75216E
fxch	st(1)
movzx	ecx, word ptr [ebp+0]
fdivrp	st(2), st
mov	[esp+18h+arg_10], ecx
fxch	st(1)
fstp	[esp+18h+arg_4]
fild	[esp+18h+arg_10]
fld	[esp+18h+arg_4]
fld	st
fmulp	st(2), st
fnstcw	word ptr [esp+18h+arg_4]
fxch	st(1)
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	[esp+18h+arg_10], eax
fldcw	word ptr [esp+18h+arg_10]
fistp	[esp+18h+arg_10]
mov	ax, word ptr [esp+18h+arg_10]
mov	[ebp+0], ax
fldcw	word ptr [esp+18h+arg_4]
fld	ds:dbl_143EF20
fmul	st, st(1)
fnstcw	word ptr [esp+18h+arg_4]
fadd	st, st(2)
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	[esp+18h+arg_10], eax
fldcw	word ptr [esp+18h+arg_10]
fistp	[esp+18h+arg_10]
mov	cx, word ptr [esp+18h+arg_10]
mov	[edi], cx
and	byte ptr [edx+7], 0FDh
fldcw	word ptr [esp+18h+arg_4]
fld	[esp+18h+arg_14]
fmul	st, st(1)
fstp	[esp+18h+arg_14]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fxch	st(1)

loc_751FD3:
fld	[esp+18h+arg_14]
fld	ds:dbl_14410B8
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld	ds:flt_14410B0
test	ah, 5
jp	short loc_751FF2
fst	[esp+18h+arg_14]

loc_751FF2:
fxch	st(1)
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	loc_752177
fstp	st(2)
fxch	st(1)
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fxch	st(1)

loc_75200F:
fld	[esp+18h+arg_14]
fld	ds:dbl_15FD398
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
fmul	st(1), st
or	eax, 0C00h
fxch	st(1)
mov	[esp+18h+arg_14], eax
fadd	st, st(2)
fldcw	word ptr [esp+18h+arg_14]
fistp	[esp+18h+arg_14]
mov	al, byte ptr [esp+18h+arg_14]
mov	[edx+8], al
fldcw	word ptr [esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
fmul	st, st(2)
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	[esp+18h+arg_14], eax
fadd	st, st(1)
fldcw	word ptr [esp+18h+arg_14]
fistp	[esp+18h+arg_14]
mov	bl, byte ptr [esp+18h+arg_14]
mov	[edx+9], bl
test	byte ptr [esi+7], 81h
fldcw	word ptr [esp+18h+arg_4]
jnz	loc_75217E
movzx	ecx, bl
mov	[esp+18h+arg_4], ecx
fild	[esp+18h+arg_4]
fmulp	st(3), st
fxch	st(2)
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
faddp	st(2), st
or	eax, 0C00h
fxch	st(1)
mov	[esp+18h+arg_14], eax
fldcw	word ptr [esp+18h+arg_14]
fistp	[esp+18h+var_8]
mov	ecx, dword ptr [esp+18h+var_8]
fldcw	word ptr [esp+18h+arg_4]
test	ecx, ecx
jnz	short loc_7520C1
test	bl, bl
jz	short loc_7520C1
mov	ecx, 1

loc_7520C1:
mov	edx, ecx
mov	[esp+18h+arg_4], edx
fild	[esp+18h+arg_4]
test	edx, edx
jge	short loc_7520D5
fadd	ds:flt_15FCC08

loc_7520D5:
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	loc_752182
movzx	eax, word ptr [ebp+0]
imul	eax, ecx
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_7520FB
fadd	ds:flt_15FCC08

loc_7520FB:
fdiv	st, st(1)
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	[esp+18h+arg_14], eax
fldcw	word ptr [esp+18h+arg_14]
fistp	[esp+18h+arg_14]
mov	dx, word ptr [esp+18h+arg_14]
mov	[ebp+0], dx
movzx	eax, word ptr [edi]
fldcw	word ptr [esp+18h+arg_4]
imul	eax, ecx
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_75213C
fadd	ds:flt_15FCC08

loc_75213C:
fdivrp	st(1), st
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	[esp+18h+arg_14], eax
fldcw	word ptr [esp+18h+arg_14]
fistp	[esp+18h+arg_14]
mov	cx, word ptr [esp+18h+arg_14]
mov	[edi], cx
pop	edi
fldcw	word ptr [esp+14h+arg_4]
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	20h

loc_75216E:
fstp	st(2)
fstp	st
jmp	loc_751FD3

loc_752177:
fstp	st
jmp	loc_75200F

loc_75217E:
fstp	st(1)
fstp	st

loc_752182:
pop	edi
fstp	st
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	20h
sub_751E10 endp

align 10h



sub_752190 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_7521ED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_7521E9
mov	ecx, dword_1855FC0
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 0C3h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_7521E9:
xor	eax, eax
mov	[esi], eax

loc_7521ED:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_752190 endp

align 10h



sub_752200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [ecx]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
lea	eax, [edi+edi*2]
cmp	dword ptr [ebp+eax*8+8], 0FFFFFFFEh
lea	ecx, [ebp+eax*8+8]
mov	esi, edi
jz	short loc_752280
cmp	[ecx+4], edi
jnz	short loc_752280
mov	edx, [esp+0Ch+arg_0]

loc_752222:
cmp	[ecx+4], edi
jnz	short loc_752268
mov	eax, [ecx+8]
cmp	eax, [edx]
jnz	short loc_752268
mov	ax, [ecx+0Ch]
cmp	ax, [edx+4]
jnz	short loc_752268
mov	al, [ecx+0Eh]
cmp	al, [edx+6]
jnz	short loc_752268
mov	al, [ecx+0Fh]
cmp	al, [edx+7]
jnz	short loc_752268
mov	al, [ecx+10h]
cmp	al, [edx+8]
jnz	short loc_752268
mov	al, [ecx+11h]
cmp	al, [edx+9]
jnz	short loc_752268
mov	al, [ecx+12h]
cmp	al, [edx+0Ah]
jnz	short loc_752268
mov	al, [ecx+13h]
cmp	al, [edx+0Bh]
jz	short loc_752278

loc_752268:
mov	esi, [ecx]
cmp	esi, 0FFFFFFFFh
jz	short loc_752280
lea	ecx, [esi+esi*2]
lea	ecx, [ebp+ecx*8+8]
jmp	short loc_752222

loc_752278:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	8

loc_752280:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn	8
sub_752200 endp

align 10h



sub_752290 proc	near
mov	eax, [ecx+4]
mov	ecx, [ecx+8]
push	esi
mov	esi, [eax+4]
push	10h
lea	ecx, [ecx+ecx*4]
push	0
lea	ecx, [eax+ecx*4+38h]
mov	ecx, [ecx]
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+8]
push	9
push	esi
push	eax
call	edx
pop	esi
retn	4
sub_752290 endp

align 10h



sub_7522C0 proc	near
mov	eax, [ecx+34h]
add	ecx, 30h
cmp	eax, ecx
jz	short locret_7522E0
lea	ebx, [ebx+0]

loc_7522D0:
mov	edx, 7FFFh
and	[eax+20h], dx
mov	eax, [eax+4]
cmp	eax, ecx
jnz	short loc_7522D0

locret_7522E0:
retn
sub_7522C0 endp

align 10h



sub_7522F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
push	ebx
mov	ebx, ecx
mov	eax, [ebx+2D0h]
push	esi
test	eax, eax
jz	short loc_752311
mov	ecx, [eax+10h]
cmp	ecx, [esp+0Ch+arg_C]
jb	short loc_752311
mov	edx, [eax+14h]
cmp	edx, [esp+0Ch+arg_10]
jnb	short loc_752366

loc_752311:
mov	ecx, dword_1855FC0
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 3
mov	eax, [ecx]
mov	eax, [eax+38h]
push	34h
push	ebx
call	eax
test	eax, eax
jz	short loc_75234F
mov	ecx, [esp+0Ch+arg_10]
mov	edx, [esp+0Ch+arg_C]
add	ecx, 10h
push	ecx
add	edx, 10h
push	edx
push	9
mov	ecx, eax
call	sub_73D620
mov	esi, eax
jmp	short loc_752351

loc_75234F:
xor	esi, esi

loc_752351:
mov	ecx, [ebx+2D0h]
test	ecx, ecx
jz	short loc_752360
call	sub_64A400

loc_752360:
mov	[ebx+2D0h], esi

loc_752366:
xor	esi, esi
cmp	[esp+0Ch+arg_10], esi
jbe	short loc_7523B8
push	ebp
mov	ebp, [esp+10h+arg_8]
push	edi
mov	edi, [esp+14h+arg_0]
jmp	short loc_752380
align 10h

loc_752380:
mov	eax, [ebx+2D0h]
mov	ecx, [esp+14h+arg_C]
push	ecx
mov	ecx, [eax+18h]
lea	edx, [esi+ebp]
imul	ecx, esi
imul	edx, [edi+18h]
add	edx, [edi+1Ch]
add	ecx, [eax+1Ch]
add	edx, [esp+18h+arg_4]
add	eax, 0Ch
push	edx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
inc	esi
add	esp, 0Ch
cmp	esi, [esp+14h+arg_10]
jb	short loc_752380
pop	edi
pop	ebp

loc_7523B8:
pop	esi
pop	ebx
pop	ecx
retn	14h
sub_7522F0 endp

align 10h



sub_7523C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
cmp	dword ptr [ecx+2D0h], 0
mov	[esp+4+var_4], ecx
jz	short loc_752445
push	edi
xor	edi, edi
cmp	[esp+8+arg_10],	edi
jbe	short loc_752444
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
mov	ebp, [esp+10h+arg_C]
push	esi

loc_7523E1:
mov	eax, [ecx+2D0h]
mov	edx, [eax+18h]
add	eax, 0Ch
imul	edx, edi
add	edx, [eax+10h]
mov	eax, [esp+14h+arg_8]
add	eax, edi
imul	eax, [ebx+18h]
add	eax, [esp+14h+arg_4]
add	eax, [ebx+1Ch]
test	ebp, ebp
jbe	short loc_75243A
jmp	short loc_752410
align 10h

loc_752410:
movzx	ecx, byte ptr [edx]
mov	esi, 0FFh
sub	esi, ecx
movzx	ecx, byte ptr [eax]
imul	ecx, esi
add	ecx, 0FFh
shr	ecx, 8
mov	[eax], cl
inc	edx
inc	eax
sub	ebp, 1
jnz	short loc_752410
mov	ebp, [esp+14h+arg_C]
mov	ecx, [esp+14h+var_4]

loc_75243A:
inc	edi
cmp	edi, [esp+14h+arg_10]
jb	short loc_7523E1
pop	esi
pop	ebp
pop	ebx

loc_752444:
pop	edi

loc_752445:
pop	ecx
retn	14h
sub_7523C0 endp

align 10h



sub_752450 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_7524AF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_7524AB
mov	ecx, dword_1855FC0
lea	eax, [eax+eax*2]
shl	eax, 4
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 0C3h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_7524AB:
xor	eax, eax
mov	[esi], eax

loc_7524AF:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_752450 endp

align 10h



sub_7524C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_752522
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_75251E
mov	ecx, dword_1855FC0
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 0C3h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_75251E:
xor	eax, eax
mov	[esi], eax

loc_752522:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_7524C0 endp

align 10h



sub_752530 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_752589
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_752585
mov	ecx, dword_1855FC0
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 0C3h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_752585:
xor	eax, eax
mov	[esi], eax

loc_752589:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_752530 endp

align 10h



sub_7525A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_7525EE
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_7525D0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_7525E7

loc_7525D0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 0C3h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_7525E7:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_7525EE:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 0C3h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	700h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_7525A0 endp

align 10h



sub_752620 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
retn	4
sub_752620 endp

align 10h



sub_752650 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [ecx]
test	esi, esi
jnz	short loc_75265E
or	eax, 0FFFFFFFFh
pop	esi
retn	4

loc_75265E:
mov	eax, [esp+4+arg_0]
push	ebx
movzx	ebx, byte ptr [eax+0Bh]
push	edi
movzx	edi, byte ptr [eax+9]
mov	edx, [eax]
add	edi, edi
xor	edi, ebx
movzx	ebx, byte ptr [eax+0Ah]
xor	edi, ebx
movzx	ebx, byte ptr [eax+8]
xor	edi, ebx
movzx	ebx, byte ptr [eax+7]
xor	edi, ebx
movzx	ebx, byte ptr [eax+6]
xor	edi, ebx
movzx	ebx, word ptr [eax+4]
xor	edi, ebx
mov	ebx, edx
shr	ebx, 6
xor	edi, ebx
xor	edi, edx
and	edi, [esi+4]
push	edi
push	eax
call	sub_752200
pop	edi
pop	ebx
pop	esi
retn	4
sub_752650 endp

align 10h



sub_7526B0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_7526C3
mov	ecx, [eax]
mov	[esi+0Ch], ecx
pop	esi
pop	ecx
retn

loc_7526C3:
mov	ecx, [esi+8]
cmp	ecx, 7Fh
jnb	short loc_7526DB
mov	eax, [esi+4]
lea	edx, [ecx+ecx*4]
inc	ecx
mov	[esi+8], ecx
lea	eax, [eax+edx*8]
pop	esi
pop	ecx
retn

loc_7526DB:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
push	edi
lea	edi, [esp+0Ch+var_4]
push	edi
mov	[esp+10h+var_4], 0C3h
mov	edx, [ecx]
push	13DCh
push	eax
mov	eax, [edx+38h]
call	eax
mov	dword ptr [eax+13D8h], 0
mov	ecx, [esi+4]
pop	edi
test	ecx, ecx
jz	short loc_752724
mov	[ecx+13D8h], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn

loc_752724:
mov	[esi], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn
sub_7526B0 endp

align 10h



sub_752740 proc	near
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jz	short loc_75276B
push	esi
lea	ebx, [ebx+0]

loc_752750:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax+11DCh]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_752750
pop	esi

loc_75276B:
mov	dword ptr [edi], 0
mov	dword ptr [edi+4], 0
mov	dword ptr [edi+8], 7Fh
mov	dword ptr [edi+0Ch], 0
pop	edi
retn
sub_752740 endp

align 10h



sub_752790 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_7527A3
mov	ecx, [eax]
mov	[esi+0Ch], ecx
pop	esi
pop	ecx
retn

loc_7527A3:
mov	ecx, [esi+8]
cmp	ecx, 7Fh
jnb	short loc_7527BB
mov	eax, [esi+4]
lea	edx, [ecx+ecx*8]
inc	ecx
mov	[esi+8], ecx
lea	eax, [eax+edx*4]
pop	esi
pop	ecx
retn

loc_7527BB:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
push	edi
lea	edi, [esp+0Ch+var_4]
push	edi
mov	[esp+10h+var_4], 0C3h
mov	edx, [ecx]
push	11E0h
push	eax
mov	eax, [edx+38h]
call	eax
mov	dword ptr [eax+11DCh], 0
mov	ecx, [esi+4]
pop	edi
test	ecx, ecx
jz	short loc_752804
mov	[ecx+11DCh], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn

loc_752804:
mov	[esi], eax
mov	[esi+4], eax
mov	dword ptr [esi+8], 1
pop	esi
pop	ecx
retn
sub_752790 endp

align 10h



; int __cdecl sub_752820(int, float, int, int)
sub_752820 proc	near

var_34=	qword ptr -34h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	ds:flt_1441130
sub	esp, 20h
fcom	[esp+20h+arg_4]
fnstsw	ax
test	ah, 41h
jnz	short loc_75283A
fstp	[esp+20h+arg_4]
jmp	short loc_75283C

loc_75283A:
fstp	st

loc_75283C:
fld	[esp+20h+arg_4]
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
mov	ebx, [esi+0Ch]
mov	eax, [esi+10h]
push	edi
sub	esp, 8
fstp	[esp+34h+var_34]
mov	[esp+34h+arg_0], ebx
mov	[esp+34h+var_C], eax
call	_ceil
fstp	[esp+34h+var_10]
fld	[esp+34h+var_10]
add	esp, 8
call	__ftol2_sse
mov	edi, eax
add	edi, ebx
cmp	edi, 3
jl	loc_752E1F
fld	[esp+2Ch+arg_4]
fmul	ds:dbl_15FCC48
fstp	[esp+2Ch+arg_4]
fld	ds:flt_15FDA40
fld	[esp+2Ch+arg_4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld1
fxch	st(1)
test	ah, 5
jp	short loc_7528D1
fmul	ds:dbl_1441128
fsubp	st(1), st
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
call	__CIsqrt
fstp	[esp+2Ch+arg_4]
fld	[esp+2Ch+arg_4]
fmul	ds:dbl_1441120
fsubr	ds:dbl_1441118
fld1
jmp	short loc_7528DF

loc_7528D1:
fmul	ds:dbl_1441110
fsub	ds:dbl_1441108
fxch	st(1)

loc_7528DF:
fxch	st(1)
push	ebp
fstp	[esp+30h+arg_4]
mov	ebp, [esp+30h+arg_8]
fld	[esp+30h+arg_4]
push	0
fld	st
lea	ebx, [edi+edi]
fmul	st, st
push	ebx
mov	ecx, ebp
fstp	[esp+38h+arg_4]
fld	[esp+38h+arg_4]
fld	st
fmul	st, st(2)
fstp	[esp+38h+arg_4]
fxch	st(1)
fmul	ds:dbl_1441100
fld	[esp+38h+arg_4]
fld	ds:dbl_14410F8
fmul	st, st(1)
fld	st(3)
fmul	ds:dbl_14410F0
fld	st(3)
fadd	ds:dbl_14410E8
faddp	st(1), st
fadd	st, st(1)
fdivr	st, st(5)
fstp	[esp+38h+arg_4]
fxch	st(1)
fmul	ds:dbl_14410E0
fld	st(3)
fmul	ds:dbl_14410D8
faddp	st(3), st
fadd	st(2), st
fxch	st(2)
fstp	[esp+38h+var_18]
fxch	st(2)
fmul	ds:dbl_14410D0
fsubrp	st(1), st
fstp	[esp+38h+var_1C]
fstp	[esp+38h+var_20]
fld	[esp+38h+var_1C]
fld	st
fld	[esp+38h+var_18]
fld	st
faddp	st(2), st
fld	[esp+38h+var_20]
fld	st
faddp	st(3), st
fld	[esp+38h+arg_4]
fld	st
fmulp	st(4), st
fxch	st(5)
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+38h+var_10]
fmul	st, st(3)
fstp	[esp+38h+var_18]
fld	st(2)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+38h+var_1C]
fmulp	st(1), st
fstp	[esp+38h+var_20]
call	sub_752190
mov	[ebp+4], ebx
mov	ebx, [esp+30h+arg_C]
push	0
push	edi
mov	ecx, ebx
call	sub_752530
mov	[ebx+4], edi
mov	ebx, [ebp+0]
xor	ebp, ebp
cmp	[esp+30h+var_C], ebp
mov	[esp+30h+var_14], ebx
jle	loc_752E1E
fld	[esp+30h+var_18]
fld	[esp+30h+var_1C]
fld	[esp+30h+var_20]
fld	[esp+30h+var_10]
jmp	short loc_7529F8

loc_7529E0:
fld	[esp+30h+var_10]
fld	[esp+30h+var_20]
fld	[esp+30h+var_1C]
fld	[esp+30h+var_18]
fxch	st(3)
fxch	st(1)
fxch	st(2)
fxch	st(1)

loc_7529F8:
mov	eax, [esi]
mov	ecx, [esi+8]
mov	edx, [esi+4]
add	ecx, ebp
imul	ecx, [eax+18h]
add	ecx, [eax+1Ch]
add	eax, 0Ch
movzx	eax, byte ptr [ecx+edx]
mov	[esp+30h+arg_4], eax
fild	[esp+30h+arg_4]
fld	st(1)
fmul	st, st(1)
fld	st(5)
fmul	st, st(2)
faddp	st(1), st
fld	st(4)
fmul	st, st(2)
faddp	st(1), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+30h+arg_4]
fld	[esp+30h+arg_4]
fst	dword ptr [ebx]
mov	eax, [esi]
mov	ecx, [esi+8]
fld	st
mov	edx, [esi+4]
fmul	st, st(4)
add	eax, 0Ch
fld	st(1)
add	ecx, ebp
fmul	st, st(4)
imul	ecx, [eax+0Ch]
fstp	[esp+30h+var_8]
add	ecx, [eax+10h]
movzx	eax, byte ptr [ecx+edx+1]
mov	[esp+30h+arg_4], eax
fild	[esp+30h+arg_4]
fmul	st, st(3)
fld	st(6)
fmulp	st(3), st
faddp	st(2), st
fadd	st(1), st
fxch	st(1)
fadd	[esp+30h+var_8]
fstp	[esp+30h+arg_4]
fld	[esp+30h+arg_4]
fst	dword ptr [ebx+4]
mov	eax, [esi]
mov	ecx, [esi+8]
mov	edx, [esi+4]
add	eax, 0Ch
add	ecx, ebp
imul	ecx, [eax+0Ch]
add	ecx, [eax+10h]
movzx	eax, byte ptr [ecx+edx+2]
mov	[esp+30h+arg_4], eax
mov	ecx, 3
cmp	edi, ecx
fild	[esp+30h+arg_4]
lea	eax, [ebx+8]
fmul	st, st(3)
fld	st(6)
fmulp	st(2), st
faddp	st(1), st
faddp	st(1), st
fadd	[esp+30h+var_8]
fstp	dword ptr [eax]
jle	loc_752C64
lea	edx, [edi-3]
cmp	edx, 4
jl	loc_752C02

loc_752ACD:
cmp	ecx, [esp+30h+arg_0]
jge	short loc_752AEC
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
add	ebx, ebp
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ecx]
jmp	short loc_752AEE

loc_752AEC:
xor	dl, dl

loc_752AEE:
fld	dword ptr [eax]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+30h+arg_4], edx
lea	edx, [ecx+1]
cmp	edx, [esp+30h+arg_0]
fild	[esp+30h+arg_4]
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax-4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-8]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+4]
jge	short loc_752B35
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
add	ebx, ebp
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ecx+1]
jmp	short loc_752B37

loc_752B35:
xor	dl, dl

loc_752B37:
fld	dword ptr [eax+4]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+30h+arg_4], edx
lea	edx, [ecx+2]
cmp	edx, [esp+30h+arg_0]
fild	[esp+30h+arg_4]
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-4]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+8]
jge	short loc_752B7E
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
add	ebx, ebp
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ecx+2]
jmp	short loc_752B80

loc_752B7E:
xor	dl, dl

loc_752B80:
fld	dword ptr [eax+8]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+30h+arg_4], edx
lea	edx, [ecx+3]
cmp	edx, [esp+30h+arg_0]
fild	[esp+30h+arg_4]
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax+4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+0Ch]
jge	short loc_752BC7
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
add	ebx, ebp
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ecx+3]
jmp	short loc_752BC9

loc_752BC7:
xor	dl, dl

loc_752BC9:
fld	dword ptr [eax+0Ch]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+30h+arg_4], edx
add	ecx, 4
lea	edx, [edi-3]
fild	[esp+30h+arg_4]
add	eax, 10h
cmp	ecx, edx
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax-8]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-0Ch]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax]
jl	loc_752ACD
mov	ebx, [esp+30h+var_14]

loc_752C02:
cmp	ecx, edi
jge	short loc_752C64
lea	eax, [ebx+ecx*4-8]
mov	[esp+30h+arg_4], eax

loc_752C0E:
cmp	ecx, [esp+30h+arg_0]
jge	short loc_752C31
mov	eax, [esi]
mov	edx, [esi+8]
add	eax, 0Ch
add	edx, ebp
imul	edx, [eax+0Ch]
add	edx, [eax+10h]
mov	eax, [esp+30h+arg_4]
add	edx, [esi+4]
mov	dl, [edx+ecx]
jmp	short loc_752C33

loc_752C31:
xor	dl, dl

loc_752C33:
fld	dword ptr [eax+4]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+30h+arg_4], edx
inc	ecx
add	eax, 4
cmp	ecx, edi
fild	[esp+30h+arg_4]
mov	[esp+30h+arg_4], eax
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax-4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-8]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+4]
jl	short loc_752C0E

loc_752C64:
fld	dword ptr [ebx+edi*4-4]
lea	edx, [ebx+edi*4]
fmul	st, st(1)
lea	eax, [edi-3]
fld	dword ptr [edx-4]
mov	ecx, [esp+30h+arg_C]
fmul	st, st(5)
faddp	st(1), st
fld	dword ptr [edx-4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [edx-4]
fmul	st, st(3)
faddp	st(1), st
fstp	[esp+30h+arg_4]
fld	[esp+30h+arg_4]
fst	dword ptr [edx+edi*4-4]
fld	st
fmul	st, st(5)
fld	dword ptr [ebx+edi*4-8]
fmul	st, st(3)
faddp	st(1), st
fld	st(1)
fmul	st, st(5)
faddp	st(1), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+30h+arg_4]
fld	[esp+30h+arg_4]
fst	dword ptr [edx+edi*4-8]
fld	dword ptr [ebx+eax*4]
fmul	st, st(2)
fld	st(5)
fmulp	st(2), st
fnstcw	word ptr [esp+30h+arg_4]
faddp	st(1), st
fld	dword ptr [edx+edi*4-4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [edx+edi*4-4]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [edx+eax*4]
movzx	eax, word ptr [esp+30h+arg_4]
fld	dword ptr [edx+edi*4-4]
mov	ecx, [ecx]
fld	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+30h+var_8], eax
fadd	st(1), st
fxch	st(1)
fldcw	word ptr [esp+30h+var_8]
fistp	dword ptr [esp+30h+var_8]
movzx	eax, byte ptr [esp+30h+var_8]
mov	[ecx+edi-1], al
mov	ecx, [esp+30h+arg_C]
fldcw	word ptr [esp+30h+arg_4]
mov	ecx, [ecx]
fld	dword ptr [edx+edi*4-8]
fnstcw	word ptr [esp+30h+arg_4]
fadd	st, st(1)
movzx	eax, word ptr [esp+30h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+30h+var_8], eax
fldcw	word ptr [esp+30h+var_8]
fistp	dword ptr [esp+30h+var_8]
movzx	eax, byte ptr [esp+30h+var_8]
mov	[ecx+edi-2], al
lea	eax, [edi-3]
fldcw	word ptr [esp+30h+arg_4]
fld	dword ptr [edx+eax*4]
fnstcw	word ptr [esp+30h+arg_4]
fadd	st, st(1)
movzx	eax, word ptr [esp+30h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+30h+var_8], eax
fldcw	word ptr [esp+30h+var_8]
fistp	dword ptr [esp+30h+var_8]
movzx	eax, byte ptr [esp+30h+var_8]
fldcw	word ptr [esp+30h+arg_4]
mov	ecx, [esp+30h+arg_C]
mov	ecx, [ecx]
mov	[ecx+edi-3], al
lea	ecx, [edi-4]
test	ecx, ecx
jl	short loc_752DE0
lea	edx, [edx+ecx*4+8]

loc_752D81:
fld	dword ptr [ebx+ecx*4]
mov	ebx, [esp+30h+arg_C]
fmul	st, st(2)
dec	ecx
fld	dword ptr [edx-4]
sub	edx, 4
fmul	st, st(6)
faddp	st(1), st
fld	dword ptr [edx+4]
fmul	st, st(5)
faddp	st(1), st
fld	dword ptr [edx+8]
fmul	st, st(4)
faddp	st(1), st
fstp	[esp+30h+arg_4]
fld	[esp+30h+arg_4]
fnstcw	word ptr [esp+30h+arg_4]
movzx	eax, word ptr [esp+30h+arg_4]
fst	dword ptr [edx-4]
mov	ebx, [ebx]
fadd	st, st(1)
or	eax, 0C00h
mov	dword ptr [esp+30h+var_8], eax
fldcw	word ptr [esp+30h+var_8]
fistp	dword ptr [esp+30h+var_8]
mov	al, byte ptr [esp+30h+var_8]
mov	[ecx+ebx+1], al
mov	ebx, [esp+30h+var_14]
fldcw	word ptr [esp+30h+arg_4]
test	ecx, ecx
jge	short loc_752D81

loc_752DE0:
mov	ecx, [esp+30h+arg_0]
fstp	st(4)
mov	edx, [esp+30h+arg_C]
fstp	st
mov	eax, [esi]
fstp	st(1)
push	ecx
fstp	st
mov	ecx, [edx]
fstp	st
mov	edx, [esi+8]
add	edx, ebp
imul	edx, [eax+18h]
add	edx, [eax+1Ch]
add	eax, 0Ch
add	edx, [esi+4]
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
inc	ebp
add	esp, 0Ch
cmp	ebp, [esp+30h+var_C]
jl	loc_7529E0

loc_752E1E:
pop	ebp

loc_752E1F:
pop	edi
pop	esi
pop	ebx
add	esp, 20h
retn
sub_752820 endp

align 10h



; int __cdecl sub_752E30(int, float, int, int)
sub_752E30 proc	near

var_2C=	qword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	ds:flt_1441130
sub	esp, 18h
fcom	[esp+18h+arg_4]
fnstsw	ax
test	ah, 41h
jnz	short loc_752E4A
fstp	[esp+18h+arg_4]
jmp	short loc_752E4C

loc_752E4A:
fstp	st

loc_752E4C:
fld	[esp+18h+arg_4]
push	ebx
push	esi
mov	esi, [esp+20h+arg_0]
mov	ebx, [esi+10h]
mov	eax, [esi+0Ch]
push	edi
sub	esp, 8
fstp	[esp+2Ch+var_2C]
mov	[esp+2Ch+arg_0], ebx
mov	[esp+2Ch+var_C], eax
call	_ceil
fstp	[esp+2Ch+var_10]
fld	[esp+2Ch+var_10]
add	esp, 8
call	__ftol2_sse
mov	edi, eax
add	edi, ebx
cmp	edi, 3
jl	loc_75341C
fld	[esp+24h+arg_4]
fmul	ds:dbl_15FCC48
fstp	[esp+24h+arg_4]
fld	ds:flt_15FDA40
fld	[esp+24h+arg_4]
fcom	st(1)
fnstsw	ax
fstp	st(1)
fld1
fxch	st(1)
test	ah, 5
jp	short loc_752EE1
fmul	ds:dbl_1441128
fsubp	st(1), st
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_4]
call	__CIsqrt
fstp	[esp+24h+arg_4]
fld	[esp+24h+arg_4]
fmul	ds:dbl_1441120
fsubr	ds:dbl_1441118
fld1
jmp	short loc_752EEF

loc_752EE1:
fmul	ds:dbl_1441110
fsub	ds:dbl_1441108
fxch	st(1)

loc_752EEF:
fxch	st(1)
push	ebp
fstp	[esp+28h+arg_4]
mov	ebp, [esp+28h+arg_8]
fld	[esp+28h+arg_4]
push	0
fld	st
lea	ebx, [edi+edi]
fmul	st, st
push	ebx
mov	ecx, ebp
fstp	[esp+30h+arg_4]
fld	[esp+30h+arg_4]
fld	st
fmul	st, st(2)
fstp	[esp+30h+arg_4]
fxch	st(1)
fmul	ds:dbl_1441100
fld	[esp+30h+arg_4]
fld	ds:dbl_14410F8
fmul	st, st(1)
fld	st(3)
fmul	ds:dbl_14410F0
fld	st(3)
fadd	ds:dbl_14410E8
faddp	st(1), st
fadd	st, st(1)
fdivr	st, st(5)
fstp	[esp+30h+var_10]
fxch	st(1)
fmul	ds:dbl_14410E0
fld	st(3)
fmul	ds:dbl_14410D8
faddp	st(3), st
fadd	st(2), st
fxch	st(2)
fstp	[esp+30h+arg_4]
fxch	st(2)
fmul	ds:dbl_14410D0
fsubrp	st(1), st
fstp	[esp+30h+var_18]
fstp	[esp+30h+var_14]
fld	[esp+30h+var_18]
fld	st
fld	[esp+30h+arg_4]
fld	st
faddp	st(2), st
fld	[esp+30h+var_14]
fld	st
faddp	st(3), st
fld	[esp+30h+var_10]
fld	st
fmulp	st(4), st
fxch	st(5)
fsubrp	st(3), st
fxch	st(2)
fstp	dword ptr [esp+30h+var_8]
fmul	st, st(3)
fstp	[esp+30h+arg_4]
fld	st(2)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+30h+var_18]
fmulp	st(1), st
fstp	[esp+30h+var_14]
call	sub_752190
mov	[ebp+4], ebx
mov	ebx, [esp+28h+arg_C]
push	0
push	edi
mov	ecx, ebx
call	sub_752530
mov	[ebx+4], edi
mov	ebx, [ebp+0]
xor	ebp, ebp
cmp	[esp+28h+var_C], ebp
mov	[esp+28h+var_10], ebx
jle	loc_75341B
fld	[esp+28h+arg_4]
fld	[esp+28h+var_18]
fld	[esp+28h+var_14]
fld	dword ptr [esp+28h+var_8]

loc_752FEE:
mov	eax, [esi]
mov	ecx, [eax+18h]
imul	ecx, [esi+8]
add	ecx, [eax+1Ch]
add	eax, 0Ch
add	ecx, [esi+4]
movzx	edx, byte ptr [ecx+ebp]
mov	[esp+28h+arg_4], edx
fild	[esp+28h+arg_4]
fld	st(1)
fmul	st, st(1)
fld	st(5)
fmul	st, st(2)
faddp	st(1), st
fld	st(4)
fmul	st, st(2)
faddp	st(1), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [ebx]
mov	eax, [esi]
mov	ecx, [esi+8]
fld	st
inc	ecx
fmul	st, st(4)
imul	ecx, [eax+18h]
fld	st(1)
fmul	st, st(4)
fstp	[esp+28h+var_8]
add	ecx, [eax+1Ch]
add	eax, 0Ch
add	ecx, [esi+4]
movzx	edx, byte ptr [ecx+ebp]
mov	[esp+28h+arg_4], edx
fild	[esp+28h+arg_4]
fmul	st, st(3)
fld	st(6)
fmulp	st(3), st
faddp	st(2), st
fadd	st(1), st
fxch	st(1)
fadd	[esp+28h+var_8]
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [ebx+4]
mov	eax, [esi]
mov	ecx, [esi+8]
add	ecx, 2
imul	ecx, [eax+18h]
add	ecx, [eax+1Ch]
add	eax, 0Ch
add	ecx, [esi+4]
lea	eax, [ebx+8]
movzx	edx, byte ptr [ecx+ebp]
mov	[esp+28h+arg_4], edx
mov	ecx, 3
cmp	edi, ecx
fild	[esp+28h+arg_4]
fmul	st, st(3)
fld	st(6)
fmulp	st(2), st
faddp	st(1), st
faddp	st(1), st
fadd	[esp+28h+var_8]
fstp	dword ptr [eax]
jle	loc_753259
lea	edx, [edi-3]
cmp	edx, 4
jl	loc_7531F7

loc_7530BF:
cmp	ecx, [esp+28h+arg_0]
jge	short loc_7530DE
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
add	ebx, ecx
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ebp]
jmp	short loc_7530E0

loc_7530DE:
xor	dl, dl

loc_7530E0:
fld	dword ptr [eax]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+28h+arg_4], edx
lea	edx, [ecx+1]
cmp	edx, [esp+28h+arg_0]
fild	[esp+28h+arg_4]
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax-4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-8]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+4]
jge	short loc_753128
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
lea	ebx, [ebx+ecx+1]
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ebp]
jmp	short loc_75312A

loc_753128:
xor	dl, dl

loc_75312A:
fld	dword ptr [eax+4]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+28h+arg_4], edx
lea	edx, [ecx+2]
cmp	edx, [esp+28h+arg_0]
fild	[esp+28h+arg_4]
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-4]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+8]
jge	short loc_753172
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
lea	ebx, [ebx+ecx+2]
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ebp]
jmp	short loc_753174

loc_753172:
xor	dl, dl

loc_753174:
fld	dword ptr [eax+8]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+28h+arg_4], edx
lea	edx, [ecx+3]
cmp	edx, [esp+28h+arg_0]
fild	[esp+28h+arg_4]
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax+4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+0Ch]
jge	short loc_7531BC
mov	edx, [esi]
mov	ebx, [esi+8]
add	edx, 0Ch
lea	ebx, [ebx+ecx+3]
imul	ebx, [edx+0Ch]
add	ebx, [edx+10h]
add	ebx, [esi+4]
mov	dl, [ebx+ebp]
jmp	short loc_7531BE

loc_7531BC:
xor	dl, dl

loc_7531BE:
fld	dword ptr [eax+0Ch]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+28h+arg_4], edx
add	ecx, 4
lea	edx, [edi-3]
fild	[esp+28h+arg_4]
add	eax, 10h
cmp	ecx, edx
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax-8]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-0Ch]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax]
jl	loc_7530BF
mov	ebx, [esp+28h+var_10]

loc_7531F7:
cmp	ecx, edi
jge	short loc_753259
lea	eax, [ebx+ecx*4-8]
mov	[esp+28h+arg_4], eax

loc_753203:
cmp	ecx, [esp+28h+arg_0]
jge	short loc_753226
mov	eax, [esi]
mov	edx, [esi+8]
add	eax, 0Ch
add	edx, ecx
imul	edx, [eax+0Ch]
add	edx, [eax+10h]
mov	eax, [esp+28h+arg_4]
add	edx, [esi+4]
mov	dl, [edx+ebp]
jmp	short loc_753228

loc_753226:
xor	dl, dl

loc_753228:
fld	dword ptr [eax+4]
movzx	edx, dl
fmul	st, st(4)
mov	[esp+28h+arg_4], edx
inc	ecx
add	eax, 4
cmp	ecx, edi
fild	[esp+28h+arg_4]
mov	[esp+28h+arg_4], eax
fmul	st, st(2)
faddp	st(1), st
fld	dword ptr [eax-4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [eax-8]
fmul	st, st(3)
faddp	st(1), st
fstp	dword ptr [eax+4]
jl	short loc_753203

loc_753259:
fld	dword ptr [ebx+edi*4-4]
lea	edx, [ebx+edi*4]
fmul	st, st(1)
lea	eax, [edi-3]
fld	dword ptr [edx-4]
mov	ecx, [esp+28h+arg_C]
fmul	st, st(5)
faddp	st(1), st
fld	dword ptr [edx-4]
fmul	st, st(4)
faddp	st(1), st
fld	dword ptr [edx-4]
fmul	st, st(3)
faddp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [edx+edi*4-4]
fld	st
fmul	st, st(5)
fld	st(2)
fmul	dword ptr [ebx+edi*4-8]
faddp	st(1), st
fld	st(1)
fmul	st, st(5)
faddp	st(1), st
fld	st(3)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fst	dword ptr [edx+edi*4-8]
fmul	st, st(4)
fld	dword ptr [ebx+eax*4]
fmul	st, st(2)
fnstcw	word ptr [esp+28h+arg_4]
faddp	st(1), st
fld	st(3)
fmul	dword ptr [edx+edi*4-4]
faddp	st(1), st
fld	st(2)
fmul	dword ptr [edx+edi*4-4]
faddp	st(1), st
fstp	dword ptr [edx+eax*4]
movzx	eax, word ptr [esp+28h+arg_4]
fld	dword ptr [edx+edi*4-4]
mov	ecx, [ecx]
fld	ds:dbl_15FCC48
or	eax, 0C00h
mov	dword ptr [esp+28h+var_8], eax
fadd	st(1), st
fxch	st(1)
fldcw	word ptr [esp+28h+var_8]
fistp	dword ptr [esp+28h+var_8]
movzx	eax, byte ptr [esp+28h+var_8]
mov	[ecx+edi-1], al
mov	ecx, [esp+28h+arg_C]
fldcw	word ptr [esp+28h+arg_4]
mov	ecx, [ecx]
fld	dword ptr [edx+edi*4-8]
fnstcw	word ptr [esp+28h+arg_4]
fadd	st, st(1)
movzx	eax, word ptr [esp+28h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_8], eax
fldcw	word ptr [esp+28h+var_8]
fistp	dword ptr [esp+28h+var_8]
movzx	eax, byte ptr [esp+28h+var_8]
mov	[ecx+edi-2], al
mov	ecx, [esp+28h+arg_C]
fldcw	word ptr [esp+28h+arg_4]
lea	eax, [edi-3]
fld	dword ptr [edx+eax*4]
fnstcw	word ptr [esp+28h+arg_4]
fadd	st, st(1)
movzx	eax, word ptr [esp+28h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+28h+var_8], eax
fldcw	word ptr [esp+28h+var_8]
fistp	dword ptr [esp+28h+var_8]
movzx	eax, byte ptr [esp+28h+var_8]
fldcw	word ptr [esp+28h+arg_4]
mov	ecx, [ecx]
mov	[ecx+edi-3], al
lea	ecx, [edi-4]
test	ecx, ecx
jl	short loc_7533D3
lea	edx, [edx+ecx*4+8]

loc_753374:
fld	dword ptr [ebx+ecx*4]
mov	ebx, [esp+28h+arg_C]
fmul	st, st(2)
dec	ecx
fld	dword ptr [edx-4]
sub	edx, 4
fmul	st, st(6)
faddp	st(1), st
fld	dword ptr [edx+4]
fmul	st, st(5)
faddp	st(1), st
fld	dword ptr [edx+8]
fmul	st, st(4)
faddp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fnstcw	word ptr [esp+28h+arg_4]
movzx	eax, word ptr [esp+28h+arg_4]
fst	dword ptr [edx-4]
mov	ebx, [ebx]
fadd	st, st(1)
or	eax, 0C00h
mov	dword ptr [esp+28h+var_8], eax
fldcw	word ptr [esp+28h+var_8]
fistp	dword ptr [esp+28h+var_8]
mov	al, byte ptr [esp+28h+var_8]
mov	[ecx+ebx+1], al
mov	ebx, [esp+28h+var_10]
fldcw	word ptr [esp+28h+arg_4]
test	ecx, ecx
jge	short loc_753374

loc_7533D3:
mov	ecx, [esp+28h+arg_C]
fstp	st
mov	edx, [ecx]
mov	eax, [esp+28h+arg_0]
mov	ecx, [esi]
mov	[esp+28h+arg_4], eax
mov	eax, [ecx+18h]
imul	eax, [esi+8]
add	eax, [ecx+1Ch]
add	ecx, 0Ch
add	eax, [esi+4]
add	eax, ebp

loc_7533F7:
mov	cl, [edx]
mov	[eax], cl
mov	ecx, [esi]
add	eax, [ecx+18h]
inc	edx
sub	[esp+28h+arg_4], 1
jnz	short loc_7533F7
inc	ebp
cmp	ebp, [esp+28h+var_C]
jl	loc_752FEE
fstp	st(3)
fstp	st(2)
fstp	st
fstp	st

loc_75341B:
pop	ebp

loc_75341C:
pop	edi
pop	esi
pop	ebx
add	esp, 18h
retn
sub_752E30 endp

align 10h



sub_753430 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
mov	ebp, [ecx]
mov	[esp+0Ch+var_4], ecx
test	ebp, ebp
jz	loc_753512
push	ebx
mov	ebx, [esp+10h+arg_0]
movzx	ecx, byte ptr [ebx+0Ah]
movzx	edx, byte ptr [ebx+8]
mov	eax, [ebx]
push	esi
movzx	esi, byte ptr [ebx+0Bh]
xor	esi, ecx
movzx	ecx, byte ptr [ebx+7]
xor	esi, edx
movzx	edx, byte ptr [ebx+6]
xor	esi, ecx
movzx	ecx, word ptr [ebx+4]
xor	esi, edx
xor	esi, ecx
movzx	ecx, byte ptr [ebx+9]
mov	edx, eax
shr	edx, 6
xor	esi, edx
add	ecx, ecx
xor	esi, ecx
xor	esi, eax
and	esi, [ebp+4]
push	edi
lea	edx, [esi+esi*2]
cmp	dword ptr [ebp+edx*8+8], 0FFFFFFFEh
lea	edi, [ebp+edx*8+8]
jz	loc_75350F
cmp	[edi+4], esi
jnz	short loc_75350F
mov	[esp+18h+arg_0], esi
mov	[esp+18h+var_8], 0FFFFFFFFh

loc_7534A4:
mov	eax, [esp+18h+arg_0]
cmp	[edi+4], eax
jnz	short loc_7534BA
push	ebx
lea	ecx, [edi+8]
call	sub_733930
test	al, al
jnz	short loc_7534CE

loc_7534BA:
mov	[esp+18h+var_8], esi
mov	esi, [edi]
cmp	esi, 0FFFFFFFFh
jz	short loc_75350F
lea	ecx, [esi+esi*2]
lea	edi, [ebp+ecx*8+8]
jmp	short loc_7534A4

loc_7534CE:
cmp	[esp+18h+arg_0], esi
jnz	short loc_7534F4
mov	eax, [edi]
cmp	eax, 0FFFFFFFFh
jz	short loc_753501
lea	edx, [eax+eax*2]
lea	ebp, [ebp+edx*8+8]
push	ebp
mov	ecx, edi
mov	dword ptr [edi], 0FFFFFFFEh
call	sub_752620
mov	edi, ebp
jmp	short loc_753501

loc_7534F4:
mov	eax, [esp+18h+var_8]
mov	ecx, [edi]
lea	eax, [eax+eax*2]
mov	[ebp+eax*8+8], ecx

loc_753501:
mov	edx, [esp+18h+var_4]
mov	dword ptr [edi], 0FFFFFFFEh
mov	eax, [edx]
dec	dword ptr [eax]

loc_75350F:
pop	edi
pop	esi
pop	ebx

loc_753512:
pop	ebp
add	esp, 8
retn	4
sub_753430 endp

align 10h



sub_753520 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+84h]
call	sub_7419C0
lea	eax, [esi+30h]
mov	[eax], eax
mov	[eax+4], eax
lea	eax, [esi+3Ch]
xor	ecx, ecx
mov	[eax+14h], eax
mov	[eax+18h], eax
cmp	[esi+88h], ecx
jbe	short loc_753569
xor	edx, edx
jmp	short loc_753550
align 10h

loc_753550:
mov	eax, [esi+78h]
lea	eax, [eax+edx+8]
inc	ecx
mov	[eax+0Ch], eax
mov	[eax+10h], eax
add	edx, 30h
cmp	ecx, [esi+88h]
jb	short loc_753550

loc_753569:
lea	ecx, [esi+1Ch]
call	sub_705F40
lea	ecx, [esi+64h]
call	sub_752740
mov	dword ptr [esi+38h], 0
mov	dword ptr [esi+88h], 0
pop	esi
retn
sub_753520 endp

align 10h



sub_753590 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= word ptr	 8
arg_8= word ptr	 0Ch

sub	esp, 8
push	esi
push	edi
mov	edi, ecx
lea	ecx, [edi+1Ch]
call	sub_7526B0
lea	ecx, [edi+64h]
mov	esi, eax
call	sub_752790
mov	ecx, [esp+10h+arg_0]
mov	[esi+1Ch], ecx
mov	[esi+8], eax
movzx	edx, word ptr [ecx]
mov	[esi+20h], dx
mov	dx, [esp+10h+arg_4]
mov	[esi+22h], dx
mov	dx, [esp+10h+arg_8]
mov	[esi+24h], dx
xor	edx, edx
mov	[esi+26h], dx
mov	[eax], edx
mov	[eax+6], dl
mov	[eax+7], dl
mov	[eax+8], dl
mov	[eax+9], dl
mov	[eax+0Bh], dl
mov	[eax+10h], edx
mov	[eax+14h], edx
mov	[eax+0Ch], esi
xor	edi, edi
mov	[eax+4], di
mov	byte ptr [eax+0Ah], 10h
movzx	edx, word ptr [esi+22h]
mov	word ptr [esp+10h+var_8], dx
movzx	edx, word ptr [ecx+2]
mov	cx, [ecx+4]
mov	word ptr [esp+10h+var_8+2], dx
movzx	edx, word ptr [esi+24h]
mov	word ptr [esp+10h+var_4], dx
mov	edx, [esp+10h+var_8]
mov	word ptr [esp+10h+var_4+2], cx
mov	ecx, [esp+10h+var_4]
mov	[eax+18h], edx
mov	[eax+1Ch], ecx
xor	edx, edx
xor	ecx, ecx
mov	[eax+20h], dx
mov	[eax+22h], cx
pop	edi
mov	eax, esi
pop	esi
add	esp, 8
retn	0Ch
sub_753590 endp

align 10h



sub_753640 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+4Ch]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+40h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+30h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+24h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+14h]
call	sub_74CD90
lea	ecx, [esi+4]
pop	esi
jmp	sub_74CD90
sub_753640 endp

align 10h



sub_753690 proc	near
push	ebx
push	ebp
mov	ebp, ecx
xor	ebx, ebx
cmp	[ebp+8], ebx
jbe	short loc_7536EA
push	esi
push	edi
lea	esi, [ebp+38h]

loc_7536A0:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7536D8
mov	eax, [ecx]
mov	eax, [eax+2Ch]
lea	edx, [esi+4]
push	edx
call	eax
mov	edi, [esi]
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7536D2
test	edi, edi
jz	short loc_7536D2
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_7536D2:
mov	dword ptr [esi], 0

loc_7536D8:
mov	dword ptr [esi+10h], 0
inc	ebx
add	esi, 14h
cmp	ebx, [ebp+8]
jb	short loc_7536A0
pop	edi
pop	esi

loc_7536EA:
pop	ebp
pop	ebx
retn
sub_753690 endp

align 10h



sub_7536F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 30h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+40h+arg_14]
mov	ebx, ecx
mov	[esp+40h+var_2C], ebx
test	edi, edi
jbe	loc_753959
cmp	edi, 0FEh
jbe	short loc_753716
mov	edi, 0FEh

loc_753716:
movzx	ecx, ds:byte_1440FB0[edi]
movzx	eax, ds:word_1440DB0[edi*2]
push	0
lea	ebp, [edi+edi+1]
mov	[esp+44h+var_14], ecx
lea	esi, [ebx+2D4h]
push	ebp
mov	ecx, esi
mov	[esp+48h+var_18], eax
call	sub_752530
mov	eax, [esp+40h+arg_10]
mov	[esi+4], ebp
test	eax, eax
jbe	loc_753959
mov	edx, [esp+40h+arg_8]
mov	[esp+40h+var_24], edx
mov	[esp+40h+var_8], eax
lea	esp, [esp+0]

loc_753760:
mov	eax, [esp+40h+arg_0]
mov	ecx, [eax+18h]
imul	ecx, [esp+40h+var_24]
add	ecx, [eax+1Ch]
xor	edx, edx
add	ecx, [esp+40h+arg_4]
lea	esi, [edi+1]
cmp	esi, 2
movzx	eax, byte ptr [ecx]
mov	[esp+40h+var_20], edx
mov	[esp+40h+var_28], edx
mov	[esp+40h+arg_14], edx
mov	[esp+40h+var_30], edx
mov	[esp+40h+var_10], edx
jl	short loc_7537F7
lea	ebp, [edi+1]
lea	esi, [eax+eax]
shr	ebp, 1
imul	ebp, esi
mov	[esp+40h+var_C], esi
mov	[esp+40h+var_1C], eax
mov	[esp+40h+arg_14], ebp
jmp	short loc_7537B0
align 10h

loc_7537B0:
add	ebx, 2D4h
mov	ebx, [ebx]
mov	[edx+ebx], al
mov	ebx, [esp+40h+var_1C]
add	[esp+40h+var_20], ebx
mov	ebx, [esp+40h+var_2C]
add	[esp+40h+var_1C], esi
add	ebx, 2D4h
mov	ebx, [ebx]
mov	[ebx+edx+1], al
mov	ebx, [esp+40h+var_C]
add	[esp+40h+var_28], ebx
add	ebx, esi
mov	[esp+40h+var_C], ebx
lea	ebx, [edi-1]
add	edx, 2
cmp	edx, ebx
mov	ebx, [esp+40h+var_2C]
jbe	short loc_7537B0
cmp	edx, edi
ja	short loc_75380C

loc_7537F7:
mov	esi, [ebx+2D4h]
lea	ebp, [edx+1]
imul	ebp, eax
add	[esp+40h+arg_14], eax
mov	[edx+esi], al
jmp	short loc_753810

loc_75380C:
mov	ebp, [esp+40h+var_10]

loc_753810:
mov	edx, [esp+40h+var_20]
mov	esi, [esp+40h+var_28]
add	edx, esi
add	ebp, edx
mov	edx, 1
cmp	edi, edx
jb	short loc_753850

loc_753825:
mov	eax, [esp+40h+arg_C]
dec	eax
cmp	edx, eax
ja	short loc_75382F
inc	ecx

loc_75382F:
movzx	eax, byte ptr [ecx]
mov	esi, [ebx+2D4h]
add	[esp+40h+var_30], eax
add	esi, edx
mov	[esi+edi], al
mov	esi, edi
sub	esi, edx
inc	esi
imul	esi, eax
inc	edx
add	ebp, esi
cmp	edx, edi
jbe	short loc_753825

loc_753850:
mov	ecx, [esp+40h+arg_C]
dec	ecx
mov	ebx, edi
mov	esi, edi
mov	[esp+40h+var_28], ebx
mov	[esp+40h+var_1C], esi
cmp	edi, ecx
jbe	short loc_75386B
mov	esi, ecx
mov	[esp+40h+var_1C], ecx

loc_75386B:
mov	edx, [esp+40h+arg_0]
mov	ecx, [edx+18h]
imul	ecx, [esp+40h+var_24]
add	ecx, [edx+1Ch]
add	ecx, esi
mov	esi, [edx+18h]
imul	esi, [esp+40h+var_24]
add	ecx, [esp+40h+arg_4]
mov	[esp+40h+var_20], ecx
mov	ecx, edx
add	esi, [ecx+1Ch]
mov	ecx, [esp+40h+arg_C]
add	esi, [esp+40h+arg_4]
test	ecx, ecx
jbe	loc_753942
mov	[esp+40h+var_10], ecx

loc_7538A5:
mov	ecx, [esp+40h+var_14]
mov	edx, ebp
imul	edx, [esp+40h+var_18]
sub	ebp, [esp+40h+arg_14]
shr	edx, cl
mov	ecx, ebx
sub	ecx, edi
inc	esi
mov	[esi-1], dl
lea	edx, [edi+edi+1]
add	ecx, edx
cmp	ecx, edx
jb	short loc_7538CA
sub	ecx, edx

loc_7538CA:
mov	ebx, [esp+40h+var_2C]
mov	ebx, [ebx+2D4h]
add	ecx, ebx
mov	[esp+40h+var_C], ecx
movzx	ecx, byte ptr [ecx]
sub	[esp+40h+arg_14], ecx
mov	ecx, [esp+40h+arg_C]
dec	ecx
cmp	[esp+40h+var_1C], ecx
jnb	short loc_7538FC
mov	eax, [esp+40h+var_20]
inc	eax
inc	[esp+40h+var_1C]
mov	[esp+40h+var_20], eax
movzx	eax, byte ptr [eax]

loc_7538FC:
mov	ecx, [esp+40h+var_C]
mov	ebx, [esp+40h+var_28]
mov	[ecx], al
mov	ecx, [esp+40h+var_30]
add	ecx, eax
inc	ebx
add	ebp, ecx
mov	[esp+40h+var_30], ecx
mov	[esp+40h+var_28], ebx
cmp	ebx, edx
jb	short loc_753921
xor	ebx, ebx
mov	[esp+40h+var_28], ebx

loc_753921:
mov	edx, [esp+40h+var_2C]
mov	ecx, [edx+2D4h]
movzx	ecx, byte ptr [ecx+ebx]
add	[esp+40h+arg_14], ecx
sub	[esp+40h+var_30], ecx
sub	[esp+40h+var_10], 1
jnz	loc_7538A5

loc_753942:
mov	ebx, [esp+40h+var_2C]
mov	eax, 1
add	[esp+40h+var_24], eax
sub	[esp+40h+var_8], eax
jnz	loc_753760

loc_753959:
mov	ebp, [esp+40h+arg_18]
test	ebp, ebp
jbe	loc_753BBC
cmp	ebp, 0FEh
jbe	short loc_753976
mov	ebp, 0FEh
mov	[esp+40h+arg_18], ebp

loc_753976:
movzx	edx, ds:word_1440DB0[ebp*2]
movzx	eax, ss:byte_1440FB0[ebp]
add	ebx, 2D4h
push	0
lea	edi, [ebp+ebp+1]
push	edi
mov	ecx, ebx
mov	[esp+48h+var_18], edx
mov	[esp+48h+var_14], eax
mov	[esp+48h+var_2C], ebx
call	sub_752530
mov	esi, [esp+40h+arg_0]
xor	edx, edx
mov	[ebx+4], edi
mov	ecx, [esi+18h]
mov	[esp+40h+var_10], ecx
mov	[esp+40h+var_24], edx
cmp	[esp+40h+arg_C], edx
jbe	loc_753BBC
jmp	short loc_7539CB

loc_7539C5:
mov	esi, [esp+40h+arg_0]
xor	edx, edx

loc_7539CB:
mov	ecx, [esi+18h]
imul	ecx, [esp+40h+arg_8]
add	ecx, [esi+1Ch]
lea	ebx, [ebp+1]
add	ecx, [esp+40h+var_24]
xor	edi, edi
add	ecx, [esp+40h+arg_4]
cmp	ebx, 2
movzx	eax, byte ptr [ecx]
mov	[esp+40h+var_20], edx
mov	[esp+40h+var_28], edx
mov	[esp+40h+arg_14], edx
mov	[esp+40h+var_30], edx
jl	short loc_753A56
dec	ebp
lea	ebx, [ebp+2]
lea	esi, [eax+eax]
shr	ebx, 1
imul	ebx, esi
mov	[esp+40h+var_8], esi
mov	[esp+40h+var_1C], eax
mov	[esp+40h+arg_14], ebx

loc_753A13:
mov	ebx, [esp+40h+var_2C]
mov	ebx, [ebx]
mov	ebp, [esp+40h+arg_18]
mov	[edx+ebx], al
mov	ebx, [esp+40h+var_1C]
add	[esp+40h+var_20], ebx
mov	ebx, [esp+40h+var_2C]
mov	ebx, [ebx]
add	[esp+40h+var_1C], esi
mov	[ebx+edx+1], al
mov	ebx, [esp+40h+var_8]
add	[esp+40h+var_28], ebx
add	ebx, esi
mov	[esp+40h+var_8], ebx
add	edx, 2
lea	ebx, [ebp-1]
cmp	edx, ebx
jbe	short loc_753A13
mov	esi, [esp+40h+arg_0]
cmp	edx, ebp
ja	short loc_753A69

loc_753A56:
mov	edi, [esp+40h+var_2C]
mov	edi, [edi]
mov	[edx+edi], al
lea	edi, [edx+1]
imul	edi, eax
add	[esp+40h+arg_14], eax

loc_753A69:
mov	edx, [esp+40h+var_20]
mov	ebx, [esp+40h+var_28]
add	edx, ebx
add	edi, edx
mov	edx, 1
cmp	ebp, edx
jb	short loc_753AAE
mov	edi, edi

loc_753A80:
mov	eax, [esp+40h+arg_10]
dec	eax
cmp	edx, eax
ja	short loc_753A8D
add	ecx, [esp+40h+var_10]

loc_753A8D:
movzx	eax, byte ptr [ecx]
mov	ebx, [esp+40h+var_2C]
mov	ebx, [ebx]
add	[esp+40h+var_30], eax
add	ebx, edx
mov	[ebx+ebp], al
mov	ebx, ebp
sub	ebx, edx
inc	ebx
imul	ebx, eax
inc	edx
add	edi, ebx
cmp	edx, ebp
jbe	short loc_753A80

loc_753AAE:
mov	edx, [esp+40h+arg_10]
dec	edx
mov	ebx, ebp
mov	ecx, ebp
mov	[esp+40h+var_28], ebx
mov	[esp+40h+var_1C], ecx
mov	[esp+40h+var_4], edx
cmp	ebp, edx
jbe	short loc_753ACD
mov	ecx, edx
mov	[esp+40h+var_1C], edx

loc_753ACD:
mov	edx, [esp+40h+arg_8]
add	ecx, edx
imul	ecx, [esi+18h]
add	ecx, [esi+1Ch]
mov	esi, [esi+18h]
add	ecx, [esp+40h+var_24]
imul	esi, edx
add	ecx, [esp+40h+arg_4]
mov	[esp+40h+var_20], ecx
mov	ecx, [esp+40h+arg_0]
add	esi, [ecx+1Ch]
mov	ecx, [esp+40h+arg_10]
add	esi, [esp+40h+var_24]
add	esi, [esp+40h+arg_4]
test	ecx, ecx
jbe	loc_753BA9
mov	[esp+40h+var_8], ecx
jmp	short loc_753B10
align 10h

loc_753B10:
mov	ecx, [esp+40h+var_14]
mov	edx, edi
imul	edx, [esp+40h+var_18]
sub	edi, [esp+40h+arg_14]
shr	edx, cl
mov	ecx, ebx
sub	ecx, ebp
mov	[esi], dl
add	esi, [esp+40h+var_10]
lea	edx, [ebp+ebp+1]
add	ecx, edx
cmp	ecx, edx
jb	short loc_753B37
sub	ecx, edx

loc_753B37:
mov	ebx, [esp+40h+var_2C]
mov	ebx, [ebx]
add	ecx, ebx
mov	[esp+40h+var_C], ecx
movzx	ecx, byte ptr [ecx]
sub	[esp+40h+arg_14], ecx
mov	ecx, [esp+40h+var_1C]
cmp	ecx, [esp+40h+var_4]
jnb	short loc_753B67
mov	eax, [esp+40h+var_20]
add	eax, [esp+40h+var_10]
inc	[esp+40h+var_1C]
mov	[esp+40h+var_20], eax
movzx	eax, byte ptr [eax]

loc_753B67:
mov	ecx, [esp+40h+var_C]
mov	ebx, [esp+40h+var_28]
mov	[ecx], al
mov	ecx, [esp+40h+var_30]
add	ecx, eax
inc	ebx
add	edi, ecx
mov	[esp+40h+var_30], ecx
mov	[esp+40h+var_28], ebx
cmp	ebx, edx
jb	short loc_753B8C
xor	ebx, ebx
mov	[esp+40h+var_28], ebx

loc_753B8C:
mov	edx, [esp+40h+var_2C]
mov	ecx, [edx]
movzx	ecx, byte ptr [ecx+ebx]
add	[esp+40h+arg_14], ecx
sub	[esp+40h+var_30], ecx
sub	[esp+40h+var_8], 1
jnz	loc_753B10

loc_753BA9:
mov	eax, [esp+40h+var_24]
inc	eax
mov	[esp+40h+var_24], eax
cmp	eax, [esp+40h+arg_C]
jb	loc_7539C5

loc_753BBC:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	1Ch
sub_7536F0 endp

align 10h



; int __stdcall	sub_753BD0(int,	int, int, int, float, float, float)
sub_753BD0 proc	near

var_30=	dword ptr -30h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 14h
mov	eax, [esp+14h+arg_8]
fld	[esp+14h+arg_14]
mov	edx, [esp+14h+arg_C]
push	ebx
mov	ebx, [esp+18h+arg_0]
push	ebp
mov	ebp, [esp+1Ch+arg_4]
push	esi
push	edi
lea	esi, [ecx+2D4h]
lea	edi, [ecx+2E0h]
push	esi		; int
push	edi		; int
push	ecx		; float
mov	[esp+30h+var_C], eax
fstp	[esp+30h+var_30]
mov	eax, [esp+30h+arg_10]
lea	ecx, [esp+30h+var_14]
push	ecx		; int
mov	[esp+34h+var_14], ebx
mov	[esp+34h+var_10], ebp
mov	[esp+34h+var_8], edx
mov	[esp+34h+var_4], eax
call	sub_752820
fld	[esp+34h+arg_18]
mov	ecx, [esp+34h+arg_10]
mov	edx, [esp+34h+arg_8]
mov	eax, [esp+34h+arg_C]
add	esp, 10h
push	esi		; int
push	edi		; int
push	ecx		; float
mov	[esp+30h+var_C], edx
fstp	[esp+30h+var_30]
lea	edx, [esp+30h+var_14]
push	edx		; int
mov	[esp+34h+var_14], ebx
mov	[esp+34h+var_10], ebp
mov	[esp+34h+var_8], eax
mov	[esp+34h+var_4], ecx
call	sub_752E30
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	1Ch
sub_753BD0 endp

align 10h



sub_753C70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
push	esi
mov	esi, ecx
push	edi
xor	ebx, ebx
xor	edi, edi
mov	[esp+20h+var_4], esi
mov	[esp+20h+var_C], edi
cmp	[esi+8], ebx
jbe	loc_753D83
push	ebp
lea	ebp, [esi+38h]
mov	[esp+24h+var_8], ebp

loc_753C95:
cmp	[ebp+10h], ebx
jz	loc_753D6D
mov	eax, [esp+24h+arg_0]
push	edi
push	eax
mov	ecx, esi
call	sub_751CA0
test	al, al
jz	loc_753D6A
mov	edi, [ebp+10h]
push	20h
lea	ebx, [esi+2Ch]
push	edi
mov	ecx, ebx
call	sub_7524C0
xor	eax, eax
mov	[ebx+4], edi
mov	[esp+24h+var_10], eax
mov	[esp+24h+var_14], eax
cmp	[esi+1Ch], eax
jbe	short loc_753D3E
xor	ebp, ebp

loc_753CD7:
mov	edx, [esi+28h]
mov	ecx, eax
and	eax, 3Fh
shr	ecx, 6
lea	edi, ds:0[eax*8]
sub	edi, eax
mov	eax, [edx+ecx*4]
mov	edx, [esp+24h+var_C]
cmp	[eax+edi*4+18h], edx
lea	ecx, [eax+edi*4]
jnz	short loc_753D2C
mov	eax, [ebx]
mov	edx, [ecx+4]
mov	esi, [ecx]
inc	[esp+24h+var_10]
add	eax, ebp
mov	[eax], esi
mov	[eax+4], edx
mov	esi, [ecx+10h]
mov	edx, [ecx+14h]
mov	edi, [ecx+0Ch]
mov	ecx, [ecx+8]
mov	[eax+10h], esi
mov	esi, [esp+24h+var_4]
add	ebp, 18h
mov	[eax+8], ecx
mov	[eax+0Ch], edi
mov	[eax+14h], edx

loc_753D2C:
mov	eax, [esp+24h+var_14]
inc	eax
mov	[esp+24h+var_14], eax
cmp	eax, [esi+1Ch]
jb	short loc_753CD7
mov	ebp, [esp+24h+var_8]

loc_753D3E:
mov	eax, [esi+2B8h]
test	eax, eax
jz	short loc_753D4D
add	eax, 0Ch
jmp	short loc_753D4F

loc_753D4D:
xor	eax, eax

loc_753D4F:
mov	ecx, [ebp+0]
mov	edx, [ecx]
mov	edx, [edx+0Ch]
push	eax
mov	eax, [ebx]
push	eax
mov	eax, [esp+2Ch+var_10]
push	eax
push	0
call	edx
mov	edi, [esp+24h+var_C]
xor	ebx, ebx

loc_753D6A:
mov	[ebp+10h], ebx

loc_753D6D:
inc	edi
add	ebp, 14h
mov	[esp+24h+var_C], edi
mov	[esp+24h+var_8], ebp
cmp	edi, [esi+8]
jb	loc_753C95
pop	ebp

loc_753D83:
mov	[esi+1Ch], ebx
pop	edi
mov	[esi+2C4h], ebx
mov	[esi+2C8h], ebx
mov	[esi+2CCh], ebx
pop	esi
pop	ebx
add	esp, 14h
retn	4
sub_753C70 endp

align 10h



sub_753DB0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_752650
test	eax, eax
jl	short loc_753DD5
mov	edx, [esi]
lea	ecx, [eax+eax*2]
lea	eax, [edx+ecx*8+10h]
test	eax, eax
jz	short loc_753DD5
add	eax, 0Ch
pop	esi
retn	4

loc_753DD5:
xor	eax, eax
pop	esi
retn	4
sub_753DB0 endp

align 10h



sub_753DE0 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_753E02
call	sub_7419C0
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_753E02:
push	esi
cmp	eax, 8
jnb	short loc_753E0F
mov	esi, 8
jmp	short loc_753E74

loc_753E0F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_753E22
fadd	ds:flt_15FCC08

loc_753E22:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_753E74:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*2]
lea	edx, ds:8[edx*8]
push	edx
mov	edx, [esp+20h+arg_0]
mov	[esp+20h+arg_4], edi
mov	dword ptr [esp+20h+var_C], 0C3h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_753ED4
xor	eax, eax
jmp	short loc_753EC0
align 10h

loc_753EC0:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 18h
sub	esi, 1
jnz	short loc_753EC0

loc_753ED4:
mov	eax, [ebp+0]
cmp	eax, edi
jz	loc_753F6A
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]
jmp	short loc_753EF0
align 10h

loc_753EF0:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_753F50
movzx	edx, byte ptr [esi+11h]
movzx	ebp, byte ptr [esi+13h]
lea	eax, [esi+8]
mov	ecx, [eax]
add	edx, edx
xor	edx, ebp
movzx	ebp, byte ptr [eax+0Ah]
xor	edx, ebp
movzx	ebp, byte ptr [eax+8]
xor	edx, ebp
movzx	ebp, byte ptr [eax+7]
xor	edx, ebp
movzx	ebp, byte ptr [eax+6]
xor	edx, ebp
movzx	ebp, word ptr [eax+4]
xor	edx, ebp
mov	ebp, ecx
shr	ebp, 6
xor	edx, ebp
xor	edx, ecx
push	edx
push	eax
mov	eax, [esp+24h+arg_0]
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_754790
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_753F50:
add	edi, 18h
sub	ebx, 1
jnz	short loc_753EF0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_753F6A:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_753DE0 endp

align 10h



sub_753F80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
movzx	eax, word ptr [esi+24h]
mov	edx, [esi+1Ch]
push	edi
mov	edi, ecx
movzx	ecx, word ptr [esi+22h]
sub	eax, ebx
push	eax
add	ecx, ebx
push	ecx
push	edx
mov	ecx, edi
call	sub_753590
mov	ecx, [esi+8]
mov	[esi+24h], bx
mov	[ecx+1Ch], bx
mov	edx, [edi+34h]
mov	[eax+4], edx
lea	ecx, [edi+30h]
mov	[eax], ecx
mov	edx, [ecx+4]
mov	[edx], eax
mov	[ecx+4], eax
inc	dword ptr [edi+38h]
mov	ecx, [esi+10h]
mov	[eax+0Ch], esi
mov	[eax+10h], ecx
mov	[ecx+0Ch], eax
mov	[esi+10h], eax
mov	edx, [edi+54h]
lea	ecx, [edi+3Ch]
mov	[eax+18h], edx
mov	[eax+14h], ecx
mov	edx, [ecx+18h]
pop	edi
pop	esi
mov	[edx+14h], eax
mov	[ecx+18h], eax
pop	ebx
retn	8
sub_753F80 endp

align 10h



sub_754000 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebp, [esi+8]
movzx	ebx, word ptr [ebp+1Ch]
push	edi
sub	ebx, eax
cmp	[esp+10h+arg_4], 0
mov	edi, ecx
push	ebx
jz	short loc_75404C
movzx	eax, word ptr [ebp+18h]
mov	ecx, [esi+1Ch]
push	eax
push	ecx
mov	ecx, edi
call	sub_753590
mov	ecx, [esi+0Ch]
mov	[eax+10h], esi
mov	[eax+0Ch], ecx
mov	[ecx+10h], eax
add	[esi+22h], bx
movzx	ecx, word ptr [esi+22h]
mov	[esi+0Ch], eax
mov	[ebp+18h], cx
jmp	short loc_75406B

loc_75404C:
movzx	edx, word ptr [ebp+18h]
add	edx, eax
mov	eax, [esi+1Ch]
push	edx
push	eax
call	sub_753590
mov	ecx, [esi+10h]
mov	[eax+0Ch], esi
mov	[eax+10h], ecx
mov	[ecx+0Ch], eax
mov	[esi+10h], eax

loc_75406B:
mov	cx, word ptr [esp+10h+arg_8]
mov	[ebp+1Ch], cx
sub	[esi+24h], bx
mov	edx, [edi+34h]
lea	ecx, [edi+30h]
mov	[eax], ecx
mov	[eax+4], edx
mov	edx, [ecx+4]
mov	[edx], eax
mov	[ecx+4], eax
inc	dword ptr [edi+38h]
mov	edx, [edi+54h]
lea	ecx, [edi+3Ch]
pop	edi
mov	[eax+18h], edx
mov	[eax+14h], ecx
mov	edx, [ecx+18h]
pop	esi
pop	ebp
mov	[edx+14h], eax
mov	[ecx+18h], eax
pop	ebx
retn	0Ch
sub_754000 endp

align 10h



sub_7540B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, ecx
test	esi, esi
jz	loc_754163
mov	eax, [esi+10h]
push	eax
call	sub_7540B0
mov	ecx, [esi+14h]
push	ecx
mov	ecx, edi
call	sub_7540B0
cmp	dword ptr [esi], 0
jz	short loc_754155
cmp	dword ptr [edi+8Ch], 0
jz	short loc_754149
movzx	eax, word ptr [esi+18h]
movzx	ecx, word ptr [esi+1Ah]
movzx	edx, word ptr [esi+1Ch]
mov	[esp+18h+arg_0], eax
add	edx, eax
movzx	eax, word ptr [esi+1Eh]
fild	[esp+18h+arg_0]
mov	[esp+18h+arg_0], ecx
fstp	[esp+18h+var_10]
add	eax, ecx
mov	ecx, [edi+8Ch]
fild	[esp+18h+arg_0]
mov	[esp+18h+arg_0], edx
fstp	[esp+18h+var_C]
fild	[esp+18h+arg_0]
mov	[esp+18h+arg_0], eax
mov	eax, [esi+0Ch]
fstp	[esp+18h+var_8]
fild	[esp+18h+arg_0]
fstp	[esp+18h+var_4]
movzx	eax, word ptr [eax+20h]
mov	edx, [ecx]
mov	edx, [edx+4]
and	eax, 0FFFF3FFFh
push	eax
lea	eax, [esp+1Ch+var_10]
push	eax
push	esi
call	edx

loc_754149:
push	esi
lea	ecx, [edi+84h]
call	sub_753430

loc_754155:
mov	dword ptr [esi], 0
mov	eax, [edi+70h]
mov	[esi], eax
mov	[edi+70h], esi

loc_754163:
pop	edi
pop	esi
add	esp, 10h
retn	4
sub_7540B0 endp

align 10h



sub_754170 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+8]
push	edi
mov	edi, ecx
mov	ecx, [eax+10h]
push	ecx
mov	ecx, edi
call	sub_7540B0
mov	edx, [esi+8]
mov	eax, [edx+14h]
push	eax
mov	ecx, edi
call	sub_7540B0
mov	eax, [esi+8]
cmp	dword ptr [eax], 0
jz	short loc_7541AB
push	eax
lea	ecx, [edi+84h]
call	sub_753430

loc_7541AB:
mov	eax, [esi+1Ch]
movzx	ecx, word ptr [eax+6]
test	cx, cx
jz	short loc_7541C6
cmp	esi, [eax+14h]
jnz	short loc_7541C6
add	[esi+24h], cx
xor	ecx, ecx
mov	[eax+6], cx

loc_7541C6:
mov	edx, [esi+8]
mov	dword ptr [edx], 0
movzx	eax, word ptr [esi+22h]
mov	dx, [esi+24h]
mov	word ptr [esp+10h+var_8], ax
mov	eax, [esi+1Ch]
mov	cx, [eax+2]
movzx	eax, word ptr [eax+4]
mov	word ptr [esp+10h+var_4+2], ax
mov	eax, [esi+8]
mov	word ptr [esp+10h+var_8+2], cx
mov	ecx, [esp+10h+var_8]
mov	[eax+18h], ecx
mov	word ptr [esp+10h+var_4], dx
mov	edx, [esp+10h+var_4]
mov	[eax+1Ch], edx
mov	eax, [esi+8]
mov	dword ptr [eax+10h], 0
mov	ecx, [esi+8]
mov	dword ptr [ecx+14h], 0
movzx	eax, word ptr [esi+20h]
xor	edx, edx
mov	[esi+26h], dx
test	eax, 4000h
jz	short loc_75424A
and	eax, 0BFFFh
mov	[esi+20h], ax
mov	ecx, [edi+54h]
lea	eax, [edi+3Ch]
mov	[esi+18h], ecx
mov	[esi+14h], eax
mov	edx, [eax+18h]
mov	[edx+14h], esi
mov	[eax+18h], esi

loc_75424A:
pop	edi
pop	esi
add	esp, 8
retn	4
sub_754170 endp

align 10h



sub_754260 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	esi, ebx
lea	esp, [esp+0]

loc_754270:
mov	ebp, [esi+10h]
push	esi
mov	ecx, edi
call	sub_754170
cmp	esi, ebx
jz	short loc_7542D3
mov	eax, [esi+8]
mov	ecx, [edi+70h]
mov	[eax], ecx
mov	[edi+70h], eax
mov	edx, [esi]
mov	eax, [esi+4]
mov	[edx+4], eax
mov	ecx, [esi+4]
mov	edx, [esi]
mov	[ecx], edx
dec	dword ptr [edi+38h]
mov	eax, 4000h
test	[esi+20h], ax
jnz	short loc_7542B9
mov	ecx, [esi+14h]
mov	edx, [esi+18h]
mov	[ecx+18h], edx
mov	eax, [esi+18h]
mov	ecx, [esi+14h]
mov	[eax+14h], ecx

loc_7542B9:
mov	edx, [esi+0Ch]
mov	eax, [esi+10h]
mov	[edx+10h], eax
mov	ecx, [esi+10h]
mov	edx, [esi+0Ch]
mov	[ecx+0Ch], edx
mov	eax, [edi+28h]
mov	[esi], eax
mov	[edi+28h], esi

loc_7542D3:
cmp	esi, [esp+10h+arg_4]
jz	short loc_7542DD
mov	esi, ebp
jmp	short loc_754270

loc_7542DD:
mov	ecx, [ebx+8]
mov	eax, [esp+10h+arg_8]
mov	[ebx+24h], ax
mov	[ecx+1Ch], ax
mov	edx, [ebx]
mov	ecx, [ebx+4]
mov	[edx+4], ecx
mov	edx, [ebx+4]
mov	ecx, [ebx]
lea	eax, [edi+30h]
mov	[edx], ecx
mov	edx, [eax+4]
mov	[ebx+4], edx
mov	[ebx], eax
mov	ecx, [eax+4]
pop	edi
pop	esi
mov	[ecx], ebx
pop	ebp
mov	[eax+4], ebx
pop	ebx
retn	0Ch
sub_754260 endp

align 10h



sub_754320 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	esi
mov	esi, [esp+18h+arg_0]
mov	eax, [esi+1Ch]
push	edi
mov	edi, [esi+10h]
mov	[esp+1Ch+var_C], eax
add	eax, 8
mov	[esp+1Ch+var_8], ecx
mov	byte ptr [esp+1Ch+arg_0], 1
cmp	edi, eax
jnz	short loc_754353
mov	edi, [esi+0Ch]
mov	byte ptr [esp+1Ch+arg_0], 0
cmp	edi, eax
jz	loc_7544AD

loc_754353:
push	ebx
mov	ebx, [edi+8]
push	ebp
mov	ebp, [esi+8]
push	esi
call	sub_754170
movzx	eax, word ptr [esi+22h]
movzx	ecx, word ptr [esi+24h]
mov	edx, [esi]
mov	[esp+24h+var_14], eax
mov	eax, [esi+4]
mov	[edx+4], eax
mov	edx, [esi]
mov	[esp+24h+var_10], ecx
mov	ecx, [esi+4]
mov	[ecx], edx
mov	ecx, [esp+24h+var_8]
dec	dword ptr [ecx+38h]
mov	eax, 4000h
test	[esi+20h], ax
jnz	short loc_7543A4
mov	edx, [esi+14h]
mov	eax, [esi+18h]
mov	[edx+18h], eax
mov	edx, [esi+18h]
mov	eax, [esi+14h]
mov	[edx+14h], eax

loc_7543A4:
mov	edx, [esi+0Ch]
mov	eax, [esi+10h]
mov	[edx+10h], eax
mov	edx, [esi+10h]
mov	eax, [esi+0Ch]
mov	[edx+0Ch], eax
mov	edx, [ecx+28h]
mov	[esi], edx
mov	[ecx+28h], esi
cmp	dword ptr [ebx], 0
jnz	short loc_75441D
cmp	dword ptr [ebx+14h], 0
jnz	short loc_75441D
mov	ax, [ebx+1Eh]
mov	edx, [esp+24h+var_C]
mov	esi, [esp+24h+var_14]
cmp	ax, [edx+4]
jnz	short loc_754421
cmp	byte ptr [esp+24h+arg_0], 0
movzx	edx, word ptr [ebx+18h]
jz	short loc_7543F0
mov	eax, [esp+24h+var_10]
add	eax, esi
cmp	eax, edx
jmp	short loc_7543F8

loc_7543F0:
movzx	eax, word ptr [ebx+1Ch]
add	eax, edx
cmp	eax, esi

loc_7543F8:
setz	al
test	al, al
jz	short loc_754421
cmp	byte ptr [esp+24h+arg_0], 0
mov	eax, [ecx+70h]
mov	[ebp+0], eax
mov	[ecx+70h], ebp
jz	short loc_754413
mov	[ebx+18h], si

loc_754413:
mov	edx, [esp+24h+var_10]
add	[ebx+1Ch], dx
jmp	short loc_754463

loc_75441D:
mov	esi, [esp+24h+var_14]

loc_754421:
mov	eax, [esp+24h+var_C]
mov	[ebp+10h], ebx
mov	dword ptr [ebp+14h], 0
mov	[ebp+0Ch], edi
mov	dx, [eax+2]
mov	ax, [eax+4]
mov	word ptr [esp+24h+var_8+2], dx
mov	edx, [esp+24h+var_10]
mov	word ptr [esp+24h+var_4+2], ax
mov	word ptr [esp+24h+var_8], si
mov	eax, [esp+24h+var_8]
mov	[ebp+18h], eax
mov	word ptr [esp+24h+var_4], dx
mov	eax, [esp+24h+var_4]
mov	[ebp+1Ch], eax
mov	[edi+8], ebp

loc_754463:
cmp	byte ptr [esp+24h+arg_0], 0
pop	ebp
pop	ebx
jz	short loc_754470
mov	[edi+22h], si

loc_754470:
movzx	eax, word ptr [edi+20h]
add	[edi+24h], dx
test	eax, 4000h
jz	short loc_7544A3
xor	edx, edx
and	eax, 0BFFFh
mov	[edi+20h], ax
lea	eax, [ecx+3Ch]
mov	[edi+26h], dx
mov	ecx, [eax+18h]
mov	[edi+18h], ecx
mov	[edi+14h], eax
mov	edx, [eax+18h]
mov	[edx+14h], edi
mov	[eax+18h], edi

loc_7544A3:
mov	eax, edi
pop	edi
pop	esi
add	esp, 14h
retn	4

loc_7544AD:
pop	edi
xor	eax, eax
pop	esi
add	esp, 14h
retn	4
sub_754320 endp

align 10h



sub_7544C0 proc	near

arg_0= dword ptr  4

push	ebp
push	esi
mov	ebp, ecx
mov	esi, [ebp+34h]
push	edi
lea	edi, [ebp+30h]
cmp	esi, edi
jz	short loc_754510
push	ebx

loc_7544D0:
movzx	eax, word ptr [esi+20h]
mov	ebx, [esi+4]
and	eax, 0FFFF3FFFh
cmp	eax, [esp+10h+arg_0]
jnz	short loc_754509
push	esi
mov	ecx, ebp
call	sub_754170
mov	ecx, [esi]
mov	edx, [esi+4]
mov	[ecx+4], edx
mov	eax, [esi+4]
mov	ecx, [esi]
mov	[eax], ecx
mov	edx, [edi+4]
mov	[esi+4], edx
mov	[esi], edi
mov	eax, [edi+4]
mov	[eax], esi
mov	[edi+4], esi

loc_754509:
mov	esi, ebx
cmp	ebx, edi
jnz	short loc_7544D0
pop	ebx

loc_754510:
pop	edi
pop	esi
pop	ebp
retn	4
sub_7544C0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_754780

loc_754520:
push	ecx
push	esi
mov	edx, ecx
mov	esi, [edx+34h]
push	edi
lea	edi, [edx+30h]
mov	[esp+0Ch+var_4], edx
cmp	esi, edi
jz	short loc_7545A7
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_0]
lea	esp, [esp+0]

loc_754540:
mov	ecx, [esi+8]
mov	ebx, [esi+4]
test	ecx, ecx
jz	short loc_75459F
cmp	[ecx], ebp
jnz	short loc_754552
mov	eax, ecx
jmp	short loc_754570

loc_754552:
mov	eax, [ecx+10h]
push	ebp
push	eax
call	sub_751C60
add	esp, 8
test	eax, eax
jnz	short loc_754574
mov	ecx, [ecx+14h]
push	ebp
push	ecx
call	sub_751C60
add	esp, 8

loc_754570:
test	eax, eax
jz	short loc_75459F

loc_754574:
push	esi
mov	ecx, edx
call	sub_754170
mov	edx, [esi]
mov	eax, [esi+4]
mov	[edx+4], eax
mov	ecx, [esi+4]
mov	edx, [esi]
mov	[ecx], edx
mov	eax, [edi+4]
mov	edx, [esp+14h+var_4]
mov	[esi+4], eax
mov	[esi], edi
mov	ecx, [edi+4]
mov	[ecx], esi
mov	[edi+4], esi

loc_75459F:
mov	esi, ebx
cmp	ebx, edi
jnz	short loc_754540
pop	ebp
pop	ebx

loc_7545A7:
pop	edi
pop	esi
pop	ecx
retn	4
; END OF FUNCTION CHUNK	FOR sub_754780
align 10h



sub_7545B0 proc	near
push	esi
mov	esi, ecx
call	sub_753690
xor	eax, eax
mov	[esi+1Ch], eax
mov	[esi+30h], eax
mov	[esi+2C4h], eax
mov	[esi+2C8h], eax
mov	[esi+2CCh], eax
lea	ecx, [esi+710h]
pop	esi
jmp	sub_753520
sub_7545B0 endp

align 10h



sub_7545E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_753690
xor	ebp, ebp
mov	[esi+1Ch], ebp
mov	[esi+30h], ebp
lea	edi, [esi+710h]
mov	ecx, edi
mov	[esi+2C4h], ebp
mov	[esi+2C8h], ebp
mov	[esi+2CCh], ebp
call	sub_753520
mov	eax, [esp+10h+arg_0]
cmp	eax, 40h
jnb	short loc_754620
lea	eax, [ebp+3Fh]
jmp	short loc_754621

loc_754620:
dec	eax

loc_754621:
mov	ecx, [esp+10h+arg_4]
mov	edx, 3Fh
cmp	ecx, 40h
jb	short loc_754632
lea	edx, [ecx-1]

loc_754632:
xor	ecx, ecx
cmp	eax, ebp
jz	short loc_75463D

loc_754638:
inc	ecx
shr	eax, 1
jnz	short loc_754638

loc_75463D:
cmp	edx, ebp
jz	short loc_754646

loc_754641:
inc	ebp
shr	edx, 1
jnz	short loc_754641

loc_754646:
mov	ebx, [esp+10h+arg_8]
cmp	ebx, 20h
jbe	short loc_754654
mov	ebx, 20h

loc_754654:
mov	eax, 1
shl	eax, cl
mov	ecx, ebp
mov	ebp, [esp+10h+arg_C]
mov	edx, 1
shl	edx, cl
mov	ecx, [esp+10h+arg_10]
mov	[esp+10h+arg_8], eax
fild	[esp+10h+arg_8]
mov	[esi], eax
mov	[esi+4], edx
mov	[esi+8], ebx
mov	[esi+0Ch], ebp
mov	[esi+10h], ecx
test	eax, eax
jge	short loc_75468C
fadd	ds:flt_15FCC08

loc_75468C:
fld1
mov	[esp+10h+arg_8], edx
fld	st
fdivrp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+14h]
fild	[esp+10h+arg_8]
test	edx, edx
jge	short loc_7546A9
fadd	ds:flt_15FCC08

loc_7546A9:
fdivp	st(1), st
lea	eax, [esp+10h+arg_8]
push	eax
mov	[esp+14h+arg_8], 3
push	34h
push	esi
fstp	dword ptr [esi+18h]
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+38h]
call	edx
test	eax, eax
jz	short loc_7546EE
mov	edx, [esp+10h+arg_14]
mov	ecx, [esp+10h+arg_18]
push	ecx
add	edx, 3
and	edx, 0FFFFFFFCh
push	edx
push	9
mov	ecx, eax
call	sub_73D620
mov	[esp+10h+arg_8], eax
jmp	short loc_7546F6

loc_7546EE:
mov	[esp+10h+arg_8], 0

loc_7546F6:
mov	ecx, [esi+2B8h]
test	ecx, ecx
jz	short loc_754705
call	sub_64A400

loc_754705:
mov	eax, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_14]
mov	[esi+2B8h], eax
mov	[esi+2BCh], edx
mov	edx, [esp+10h+arg_18]
xor	eax, eax
mov	[esi+2C0h], edx
xor	ecx, ecx
mov	[esi+2C4h], eax
mov	[esi+2C8h], ecx
mov	ecx, edi
mov	[esi+2CCh], eax
call	sub_753520
mov	eax, [esp+10h+arg_0]
mov	[edi+0Ch], eax
mov	eax, [esp+10h+arg_4]
mov	[edi+10h], eax
xor	edx, edx
div	ebp
mov	dword ptr [edi+4], 0
mov	[edi+8], ebx
mov	[edi+14h], ebp
push	0
add	edi, 78h
mov	ecx, edi
mov	[edi-60h], eax
imul	eax, ebx
mov	esi, eax
push	esi
call	sub_752450
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	1Ch
sub_7545E0 endp

align 10h



sub_754780 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

; FUNCTION CHUNK AT 00754520 SIZE 0000008D BYTES

add	ecx, 710h
jmp	loc_754520
sub_754780 endp

align 10h



sub_754790 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_7547A3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_7547C5

loc_7547A3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_7547CA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_7547C5:
call	sub_753DE0

loc_7547CA:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*2]
mov	ebp, [esi+edx*8+8]
lea	eax, [esi+edx*8+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_754810
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	esi, [edx+8]
mov	[eax+10h], esi
mov	edx, [edx+0Ch]
pop	esi
mov	[eax+14h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_754810:
push	edi
mov	edi, [esi+4]
mov	edx, ecx
push	ebx

loc_754817:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*8+8], 0FFFFFFFEh
jnz	short loc_754817
mov	ebx, [eax+4]
lea	edi, [edx+edx*2]
lea	edi, [esi+edi*8+8]
cmp	ebx, ecx
jnz	short loc_75487D
test	edi, edi
jz	short loc_754856
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_754856:
mov	esi, [esp+10h+arg_4]
mov	edi, [esi]
mov	[eax+8], edi
mov	edi, [esi+4]
mov	[eax+0Ch], edi
mov	edi, [esi+8]
mov	[eax+10h], edi
mov	esi, [esi+0Ch]
pop	ebx
pop	edi
mov	[eax+14h], esi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_75487D:
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jz	short loc_75489F
lea	ebx, [ebx+0]

loc_754890:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jnz	short loc_754890

loc_75489F:
test	edi, edi
jz	short loc_7548C3
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_7548C3:
mov	[ebx], edx
mov	edx, [esp+10h+arg_4]
mov	esi, [edx]
mov	[eax+8], esi
mov	esi, [edx+4]
mov	[eax+0Ch], esi
mov	esi, [edx+8]
pop	ebx
mov	[eax+10h], esi
mov	edx, [edx+0Ch]
pop	edi
pop	esi
mov	[eax+14h], edx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_754790 endp




sub_7548F0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], 0Ah
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	dword ptr [eax+24h], 7Fh
mov	[eax+28h], ecx
lea	edx, [eax+1Ch]
mov	[edx+10h], edx
lea	edx, [eax+30h]
mov	[edx], edx
mov	[edx+4], edx
mov	[eax+38h], ecx
lea	edx, [eax+3Ch]
mov	[edx+14h], edx
mov	[edx+18h], edx
lea	edx, [eax+64h]
mov	[edx], ecx
mov	[edx+4], ecx
mov	dword ptr [edx+8], 7Fh
mov	[edx+0Ch], ecx
mov	[edx+10h], edx
mov	[eax+78h], ecx
mov	[eax+7Ch], ecx
mov	[eax+80h], ecx
mov	[eax+84h], ecx
mov	[eax+88h], ecx
mov	[eax+8Ch], ecx
retn
sub_7548F0 endp

align 10h



sub_754970 proc	near
push	esi
push	edi
mov	edi, ecx
lea	ecx, [edi+84h]
call	sub_7419C0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi+78h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [edi+64h]
test	eax, eax
jz	short loc_7549BA
jmp	short loc_7549A0
align 10h

loc_7549A0:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax+11DCh]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_7549A0

loc_7549BA:
mov	eax, [edi+1Ch]
test	eax, eax
jz	short loc_7549DB

loc_7549C1:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	esi, [eax+13D8h]
push	eax
mov	eax, [edx+30h]
call	eax
mov	eax, esi
test	esi, esi
jnz	short loc_7549C1

loc_7549DB:
pop	edi
pop	esi
retn
sub_754970 endp

align 10h



sub_7549E0 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_753690
xor	ebx, ebx
mov	[esi+1Ch], ebx
mov	[esi+30h], ebx
lea	ebp, [esi+1Ch]
lea	edi, [esi+710h]
mov	ecx, edi
mov	[esi+2C4h], ebx
mov	[esi+2C8h], ebx
mov	[esi+2CCh], ebx
call	sub_753520
mov	ecx, edi
call	sub_754970
lea	ecx, [esi+6A0h]
call	sub_753640
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+364h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+358h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+348h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+33Ch]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+304h]
call	sub_74CD90
lea	ecx, [esi+2F4h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+2E0h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+2D4h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esi+2D0h]
cmp	ecx, ebx
jz	short loc_754ABB
call	sub_64A400

loc_754ABB:
mov	ecx, [esi+2B8h]
cmp	ecx, ebx
jz	short loc_754ACA
call	sub_64A400

loc_754ACA:
mov	ecx, 1Fh
lea	eax, [esi+2BCh]
jmp	short loc_754AE0
align 10h

loc_754AE0:
sub	eax, 14h
sub	ecx, 1
mov	dword ptr [eax], offset	off_1440B7C
jns	short loc_754AE0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+2Ch]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
mov	ecx, ebp
pop	ebp
pop	ebx
jmp	sub_74CD90
sub_7549E0 endp

align 10h



sub_754B10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
push	ebx
lea	ecx, [edi+710h]
mov	[esp+1Ch+var_4], edi
call	sub_7544C0
xor	ecx, ecx
xor	ebp, ebp
mov	[esp+18h+var_8], ecx
cmp	[edi+1Ch], ecx
jbe	loc_754BCC
mov	edi, edi

loc_754B40:
mov	eax, ecx
and	eax, 3Fh
mov	edx, ecx
shr	edx, 6
lea	esi, ds:0[eax*8]
sub	esi, eax
mov	eax, [edi+28h]
add	edx, edx
add	edx, edx
mov	eax, [eax+edx]
add	esi, esi
add	esi, esi
cmp	[eax+esi+18h], ebx
jz	short loc_754BBE
mov	edi, [edi+28h]
mov	eax, ebp
and	eax, 3Fh
lea	ebx, ds:0[eax*8]
sub	ebx, eax
mov	ecx, ebp
shr	ecx, 6
mov	eax, [edi+ecx*4]
lea	ecx, [eax+ebx*4]
mov	eax, [edi+edx]
mov	edx, [eax+esi+4]
inc	ebp
add	eax, esi
mov	esi, [eax]
mov	[ecx], esi
mov	[ecx+4], edx
mov	edx, [eax+14h]
mov	edi, [eax+0Ch]
mov	ebx, [eax+8]
mov	esi, [eax+10h]
mov	[ecx+8], ebx
mov	ebx, [esp+18h+arg_0]
mov	[ecx+0Ch], edi
mov	edi, [esp+18h+var_4]
mov	[ecx+10h], esi
mov	[ecx+14h], edx
mov	edx, [eax+18h]
mov	[ecx+18h], edx
mov	ecx, [esp+18h+var_8]

loc_754BBE:
inc	ecx
mov	[esp+18h+var_8], ecx
cmp	ecx, [edi+1Ch]
jb	loc_754B40

loc_754BCC:
cmp	ebp, [edi+1Ch]
jnb	short loc_754BD4
mov	[edi+1Ch], ebp

loc_754BD4:
cmp	[esp+18h+arg_4], 0
lea	eax, [ebx+ebx*4]
lea	esi, [edi+eax*4]
mov	dword ptr [esi+48h], 0
jz	short loc_754C23
mov	ecx, [esi+38h]
mov	edx, [ecx]
mov	edx, [edx+2Ch]
lea	eax, [ebx+ebx*4+0Fh]
lea	eax, [edi+eax*4]
push	eax
call	edx
mov	edi, [esi+38h]
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_754C1C
test	edi, edi
jz	short loc_754C1C
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_754C1C:
mov	dword ptr [esi+38h], 0

loc_754C23:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_754B10 endp

align 10h



sub_754C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_754C42
mov	ecx, [eax]
mov	[esi+0Ch], ecx
jmp	short loc_754CA3

loc_754C42:
mov	ecx, [esi+8]
cmp	ecx, 7Fh
jnb	short loc_754C59
mov	eax, [esi+4]
lea	edx, [ecx+ecx*8]
inc	ecx
lea	eax, [eax+edx*4]
mov	[esi+8], ecx
jmp	short loc_754CA3

loc_754C59:
mov	eax, [esi+10h]
mov	ecx, dword_1855FC0
push	edi
lea	edi, [esp+0Ch+var_4]
push	edi
mov	[esp+10h+var_4], 0C3h
mov	edx, [ecx]
push	11E0h
push	eax
mov	eax, [edx+38h]
call	eax
mov	dword ptr [eax+11DCh], 0
mov	ecx, [esi+4]
pop	edi
test	ecx, ecx
jz	short loc_754C97
mov	[ecx+11DCh], eax
jmp	short loc_754C99

loc_754C97:
mov	[esi], eax

loc_754C99:
mov	[esi+4], eax
mov	dword ptr [esi+8], 1

loc_754CA3:
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
movzx	edx, word ptr [ecx+22h]
mov	cx, [ecx+20h]
mov	[eax+20h], cx
mov	[eax+22h], dx
pop	esi
pop	ecx
retn	4
sub_754C30 endp

align 10h



sub_754CF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
test	eax, eax
jnz	short loc_754D04
mov	eax, [esp+0Ch+arg_0]
push	8
push	eax
jmp	short loc_754D26

loc_754D04:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_754D2B
mov	edx, [eax+4]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_754D26:
call	sub_753DE0

loc_754D2B:
mov	eax, [esi]
mov	ecx, [esp+0Ch+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	esi, [esi]
lea	edx, [ecx+ecx*2]
mov	ebp, [esi+edx*8+8]
lea	eax, [esi+edx*8+8]
cmp	ebp, 0FFFFFFFEh
jnz	short loc_754D76
mov	esi, [esp+0Ch+arg_4]
mov	dword ptr [eax], 0FFFFFFFFh
mov	edx, [esi]
mov	edi, [edx]
mov	[eax+8], edi
mov	edi, [edx+4]
mov	[eax+0Ch], edi
mov	edx, [edx+8]
mov	[eax+10h], edx
mov	edx, [esi+4]
mov	edx, [edx]
pop	edi
pop	esi
mov	[eax+14h], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_754D76:
mov	edi, [esi+4]
mov	edx, ecx
push	ebx
lea	esp, [esp+0]

loc_754D80:
inc	edx
and	edx, edi
lea	ebx, [edx+edx*2]
cmp	dword ptr [esi+ebx*8+8], 0FFFFFFFEh
jnz	short loc_754D80
mov	ebx, [eax+4]
lea	edi, [edx+edx*2]
lea	edi, [esi+edi*8+8]
cmp	ebx, ecx
jnz	short loc_754DEA
test	edi, edi
jz	short loc_754DBF
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_754DBF:
mov	edi, [esp+10h+arg_4]
mov	esi, [edi]
mov	ebx, [esi]
mov	[eax+8], ebx
mov	ebx, [esi+4]
mov	[eax+0Ch], ebx
mov	esi, [esi+8]
mov	[eax+10h], esi
mov	esi, [edi+4]
mov	esi, [esi]
pop	ebx
mov	[eax+14h], esi
pop	edi
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebp
retn	0Ch

loc_754DEA:
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jz	short loc_754E06

loc_754DF7:
mov	ebx, [ebx]
lea	ebx, [ebx+ebx*2]
cmp	[esi+ebx*8+8], ecx
lea	ebx, [esi+ebx*8+8]
jnz	short loc_754DF7

loc_754E06:
test	edi, edi
jz	short loc_754E2A
mov	[edi], ebp
mov	esi, [eax+4]
mov	[edi+4], esi
mov	esi, [eax+8]
mov	[edi+8], esi
mov	esi, [eax+0Ch]
mov	[edi+0Ch], esi
mov	esi, [eax+10h]
mov	[edi+10h], esi
mov	esi, [eax+14h]
mov	[edi+14h], esi

loc_754E2A:
mov	esi, [esp+10h+arg_4]
mov	[ebx], edx
mov	edx, [esi]
mov	edi, [edx]
mov	[eax+8], edi
mov	edi, [edx+4]
mov	[eax+0Ch], edi
mov	edx, [edx+8]
mov	[eax+10h], edx
mov	edx, [esi+4]
mov	edx, [edx]
pop	ebx
pop	edi
mov	[eax+14h], edx
pop	esi
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
pop	ebp
retn	0Ch
sub_754CF0 endp

align 10h



sub_754E60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	eax, 1
jnz	short loc_754E80
mov	eax, [ecx+8]
mov	ecx, [ecx+4]
mov	[esp+arg_4], 0
mov	[esp+arg_0], eax
jmp	sub_754B10

loc_754E80:
cmp	eax, 2
jnz	short locret_754E9C
mov	edx, [ecx+8]
mov	ecx, [ecx+4]
mov	[esp+arg_4], 1
mov	[esp+arg_0], edx
jmp	sub_754B10

locret_754E9C:
retn	8
sub_754E60 endp

align 10h



sub_754EA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_8]
cmp	dword ptr [esi], 0
push	edi
mov	edi, ecx
jz	short loc_754EEE
mov	ecx, [esi+10h]
mov	ebx, [esp+10h+arg_4]
mov	ebp, [esp+10h+arg_0]
xor	eax, eax
test	ecx, ecx
jz	short loc_754ED2
push	ecx
push	ebx
push	ebp
mov	ecx, edi
call	sub_754EA0
test	eax, eax
jnz	loc_754FF5

loc_754ED2:
mov	esi, [esi+14h]
test	esi, esi
jz	loc_754FF5
push	esi
push	ebx
push	ebp
mov	ecx, edi
call	sub_754EA0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_754EEE:
movzx	ebx, word ptr [esi+1Ch]
mov	ecx, [esp+10h+arg_0]
cmp	ecx, ebx
ja	loc_754FF3
movzx	ebp, word ptr [esi+1Eh]
mov	eax, [esp+10h+arg_4]
cmp	eax, ebp
ja	loc_754FF3
sub	ebp, eax
mov	eax, [edi]
sub	ebx, ecx
cmp	ebx, eax
jnb	short loc_754F20
cmp	ebp, eax
jb	loc_754FD8

loc_754F20:
lea	ecx, [edi+64h]
push	esi
mov	[esp+14h+arg_8], ecx
call	sub_754C30
mov	[esi+10h], eax
cmp	ebx, ebp
jbe	short loc_754F89
mov	cx, [esi+18h]
add	cx, word ptr [esp+10h+arg_0]
mov	[eax+18h], cx
mov	edx, [esi+10h]
mov	[edx+1Ch], bx
cmp	ebp, [edi]
jb	loc_754FD8
mov	ecx, [esp+10h+arg_8]
push	esi
call	sub_754C30
mov	[esi+14h], eax
mov	dword ptr [eax+10h], 0
mov	ax, [esi+1Ah]
mov	ecx, [esi+14h]
add	ax, word ptr [esp+10h+arg_4]
mov	[ecx+1Ah], ax
mov	edx, [esi+14h]
mov	cx, word ptr [esp+10h+arg_0]
mov	[edx+1Eh], bp
mov	eax, [esi+14h]
mov	[eax+1Ch], cx
jmp	short loc_754FD8

loc_754F89:
mov	dx, [esi+1Ah]
add	dx, word ptr [esp+10h+arg_4]
mov	[eax+1Ah], dx
mov	eax, [esi+10h]
mov	[eax+1Eh], bp
cmp	ebx, [edi]
jb	short loc_754FD8
mov	ecx, [esp+10h+arg_8]
push	esi
call	sub_754C30
mov	[esi+14h], eax
mov	dword ptr [eax+10h], 0
mov	cx, [esi+18h]
mov	edx, [esi+14h]
add	cx, word ptr [esp+10h+arg_0]
mov	[edx+18h], cx
mov	eax, [esi+14h]
mov	dx, word ptr [esp+10h+arg_4]
mov	[eax+1Ch], bx
mov	ecx, [esi+14h]
mov	[ecx+1Eh], dx

loc_754FD8:
mov	ax, word ptr [esp+10h+arg_0]
mov	cx, word ptr [esp+10h+arg_4]
pop	edi
mov	[esi+1Ch], ax
mov	[esi+1Eh], cx
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_754FF3:
xor	eax, eax

loc_754FF5:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_754EA0 endp

align 10h



sub_755000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [esp+0Ch+arg_8]
mov	eax, [esi+8]
cmp	dword ptr [eax], 0
mov	edx, ecx
mov	[esp+0Ch+var_4], edx
jnz	short loc_755090
push	ebx
movzx	ebx, word ptr [esi+24h]
lea	ecx, [ebp+ebp+0]
cmp	ebx, ecx
jbe	short loc_75508F
cmp	dword ptr [eax+10h], 0
jnz	short loc_75503D
cmp	dword ptr [eax+14h], 0
jnz	short loc_75508F
push	ebp
push	esi
mov	ecx, edx
call	sub_753F80
jmp	short loc_75508F

loc_75503D:
cmp	dword ptr [eax+14h], 0
jnz	short loc_75508F
mov	edx, [esi+1Ch]
push	edi
mov	di, [eax+1Eh]
cmp	di, [edx+4]
jnz	short loc_75508E
movzx	edi, word ptr [eax+1Ch]
cmp	edi, ecx
jbe	short loc_75508E
movzx	eax, word ptr [eax+18h]
movzx	ecx, word ptr [esi+22h]
cmp	ax, cx
setz	dl
movzx	eax, ax
movzx	ecx, cx
add	eax, edi
add	ecx, ebx
cmp	eax, ecx
setz	al
mov	byte ptr [esp+14h+arg_8], dl
cmp	dl, al
jz	short loc_75508E
mov	ecx, [esp+14h+arg_8]
push	ebp
push	ecx
mov	ecx, [esp+1Ch+var_4]
push	esi
call	sub_754000

loc_75508E:
pop	edi

loc_75508F:
pop	ebx

loc_755090:
mov	edx, [esi+8]
mov	eax, [esp+0Ch+arg_4]
mov	ecx, [esp+0Ch+var_4]
push	edx
push	eax
push	ebp
call	sub_754EA0
test	eax, eax
jnz	short loc_7550AB
inc	word ptr [esi+26h]

loc_7550AB:
movzx	ecx, word ptr [esi+26h]
cmp	cx, 10h
jbe	short loc_7550D6
mov	ecx, [esi+14h]
mov	edx, [esi+18h]
mov	[ecx+18h], edx
mov	ecx, [esi+18h]
mov	edx, [esi+14h]
mov	[ecx+14h], edx
mov	ecx, 4000h
or	[esi+20h], cx
pop	esi
pop	ebp
pop	ecx
retn	0Ch

loc_7550D6:
test	cx, cx
jz	short loc_7550E4
test	eax, eax
jz	short loc_7550E4
dec	ecx
mov	[esi+26h], cx

loc_7550E4:
pop	esi
pop	ebp
pop	ecx
retn	0Ch
sub_755000 endp

align 10h



sub_7550F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+54h]
lea	ecx, [edi+3Ch]
cmp	eax, ecx
jz	short loc_755122
mov	ebx, [esp+10h+arg_4]
mov	ebp, [esp+10h+arg_0]

loc_755108:
mov	esi, [eax+18h]
push	eax
push	ebx
push	ebp
mov	ecx, edi
call	sub_755000
test	eax, eax
jnz	short loc_755124
lea	ecx, [edi+3Ch]
mov	eax, esi
cmp	esi, ecx
jnz	short loc_755108

loc_755122:
xor	eax, eax

loc_755124:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_7550F0 endp

align 10h



sub_755130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+88h]
push	edi
test	ecx, ecx
jz	short loc_755155
mov	edx, [esi+78h]
lea	eax, [ecx+ecx*2]
shl	eax, 4
movzx	eax, word ptr [eax+edx-2Ah]
cmp	eax, ebx
jnb	short loc_7551B0

loc_755155:
cmp	ecx, [esi+7Ch]
jnb	short loc_7551B0
mov	edi, [esi+18h]
mov	eax, ecx
xor	edx, edx
div	edi
mov	di, [esi+4]
lea	ecx, [ecx+ecx*2]
shl	ecx, 4
add	ecx, [esi+78h]
add	di, ax
mov	[ecx], di
mov	ax, [esi+14h]
imul	ax, dx
inc	edx
mov	[ecx+2], ax
cmp	edx, [esi+18h]
jnz	short loc_755192
movzx	edx, ax
mov	eax, [esi+10h]
sub	eax, edx
jmp	short loc_755195

loc_755192:
mov	eax, [esi+14h]

loc_755195:
mov	[ecx+4], ax
mov	ax, [esi+0Ch]
mov	[ecx+6], ax
lea	eax, [ecx+8]
mov	[eax+0Ch], eax
mov	[eax+10h], eax
inc	dword ptr [esi+88h]

loc_7551B0:
mov	eax, [esi+88h]
mov	edx, [esi+78h]
lea	ecx, [eax+eax*2]
shl	ecx, 4
movzx	eax, word ptr [edx+ecx-2Ah]
lea	edi, [edx+ecx-30h]
cmp	ebx, eax
ja	short loc_755242
mov	ecx, eax
sub	ecx, ebx
cmp	ecx, ebx
mov	ecx, eax
jb	short loc_7551D8
mov	ecx, ebx

loc_7551D8:
mov	edx, [esi+0Ch]
push	ecx
sub	edx, eax
push	edx
push	edi
mov	ecx, esi
call	sub_753590
mov	cx, [eax+24h]
sub	[edi+6], cx
mov	edx, [esi+30h]
mov	[eax], edx
lea	ecx, [esi+30h]
mov	[eax+4], ecx
mov	edx, [ecx]
mov	[edx+4], eax
mov	[ecx], eax
inc	dword ptr [esi+38h]
mov	edx, [edi+14h]
lea	ecx, [edi+8]
mov	[eax+10h], ecx
mov	[eax+0Ch], edx
mov	edx, [ecx+0Ch]
mov	[edx+10h], eax
mov	[ecx+0Ch], eax
mov	edx, [esi+54h]
lea	ecx, [esi+3Ch]
mov	[eax+14h], ecx
mov	[eax+18h], edx
mov	edx, [ecx+18h]
mov	[edx+14h], eax
push	eax
mov	[ecx+18h], eax
mov	eax, [esp+10h+arg_4]
push	eax
push	ebx
mov	ecx, esi
call	sub_755000
pop	edi
pop	esi
pop	ebx
retn	8

loc_755242:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	8
sub_755130 endp

align 10h



sub_755250 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [ecx+34h]
push	edi
mov	edi, [ecx+38h]
shr	edi, 1
mov	[esp+14h+var_4], ecx
xor	ebx, ebx
lea	ebp, [ecx+30h]

loc_755266:
cmp	esi, ebp
jz	short loc_7552E3
mov	eax, 8000h
test	[esi+20h], ax
jnz	short loc_75528D
movzx	edx, word ptr [esi+24h]
push	esi
cmp	edx, [esp+18h+arg_0]
jnb	short loc_755297
call	sub_754320
test	eax, eax
jnz	short loc_7552B8
mov	ecx, [esp+14h+var_4]

loc_75528D:
mov	esi, [esi+4]
inc	ebx
cmp	ebx, edi
jbe	short loc_755266
jmp	short loc_7552E3

loc_755297:
call	sub_754170
mov	eax, [esp+14h+arg_4]
mov	ecx, [esp+14h+arg_0]
push	esi
push	eax
push	ecx
mov	ecx, [esp+20h+var_4]
call	sub_755000
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_7552B8:
mov	edx, [eax+8]
movzx	edx, word ptr [edx+1Ch]
mov	ecx, [esp+14h+arg_0]
cmp	edx, ecx
jb	short loc_7552DF
push	eax
mov	eax, [esp+18h+arg_4]
push	eax
push	ecx
mov	ecx, [esp+20h+var_4]
call	sub_755000
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_7552DF:
mov	ecx, [esp+14h+var_4]

loc_7552E3:
mov	ebx, [ecx+34h]
cmp	ebx, ebp
jz	loc_75537A
mov	edi, edi

loc_7552F0:
mov	ecx, 8000h
test	[ebx+20h], cx
jnz	short loc_75536F
mov	edi, [ebx+1Ch]
lea	eax, [edi+8]
xor	edx, edx
mov	esi, ebx
cmp	ebx, eax
jz	short loc_75536F
lea	esp, [esp+0]

loc_755310:
mov	eax, 8000h
test	[esi+20h], ax
jnz	short loc_75536F
cmp	esi, ebx
jz	short loc_755334
mov	eax, esi
mov	ecx, esi
cmp	esi, ebp
jz	short loc_755334

loc_755327:
cmp	ecx, ebp
jz	short loc_75536F
mov	eax, [eax]
mov	ecx, [ecx+4]
cmp	eax, ebp
jnz	short loc_755327

loc_755334:
movzx	eax, word ptr [esi+24h]
mov	ecx, [esp+14h+arg_0]
cmp	eax, ecx
jnb	short loc_755384
add	edx, eax
movzx	eax, word ptr [edi+6]
test	ax, ax
jz	short loc_755361
cmp	esi, [edi+14h]
jnz	short loc_755361
movzx	eax, ax
add	eax, edx
cmp	eax, ecx
jb	short loc_755361
mov	edx, eax
xor	eax, eax
mov	[edi+6], ax

loc_755361:
cmp	edx, ecx
jnb	short loc_7553AA
mov	esi, [esi+10h]
lea	eax, [edi+8]
cmp	esi, eax
jnz	short loc_755310

loc_75536F:
mov	ebx, [ebx+4]
cmp	ebx, ebp
jnz	loc_7552F0

loc_75537A:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn	8

loc_755384:
mov	edi, [esp+14h+var_4]
push	esi
mov	ecx, edi
call	sub_754170
mov	ecx, [esp+14h+arg_4]
mov	edx, [esp+14h+arg_0]
push	esi
push	ecx
push	edx
mov	ecx, edi
call	sub_755000
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8

loc_7553AA:
push	edx
push	esi
mov	esi, [esp+1Ch+var_4]
push	ebx
mov	ecx, esi
call	sub_754260
mov	eax, [esp+14h+arg_4]
mov	ecx, [esp+14h+arg_0]
push	ebx
push	eax
push	ecx
mov	ecx, esi
call	sub_755000
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_755250 endp

align 10h



sub_7553E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

fldz
push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
fst	dword ptr [esi+14h]
mov	[esi], ebx
fst	dword ptr [esi+18h]
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
mov	[esi+24h], ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
lea	ecx, [ebx+1Fh]
lea	eax, [esi+44h]
mov	edx, offset off_14410C0

loc_75541C:
mov	[eax-8], edx
mov	[eax-4], ebx
mov	dword ptr [eax], 0FFFFFFFFh
add	eax, 14h
sub	ecx, 1
jns	short loc_75541C
fld1
mov	[esi+2B8h], ebx
mov	[esi+2BCh], ebx
mov	[esi+2C0h], ebx
mov	[esi+2C4h], ebx
mov	[esi+2C8h], ebx
mov	[esi+2CCh], ebx
mov	[esi+2D0h], ebx
mov	[esi+2D4h], ebx
mov	[esi+2D8h], ebx
mov	[esi+2DCh], ebx
mov	[esi+2E0h], ebx
mov	[esi+2E4h], ebx
mov	[esi+2E8h], ebx
fst	dword ptr [esi+2ECh]
fld	ds:flt_143F788
lea	ecx, [esi+334h]
fstp	dword ptr [esi+2F0h]
mov	[esi+2F4h], ebx
mov	[esi+2F8h], ebx
mov	[esi+2FCh], ebx
mov	[esi+300h], ebx
mov	[esi+304h], ebx
mov	[esi+308h], ebx
mov	[esi+30Ch], ebx
mov	[esi+310h], ebx
fst	dword ptr [esi+320h]
fstp	dword ptr [esi+324h]
mov	[esi+314h], ebx
mov	dword ptr [esi+318h], 7FFFFFFFh
fst	dword ptr [esi+328h]
mov	dword ptr [esi+31Ch], 80000001h
fstp	dword ptr [esi+32Ch]
mov	[esi+330h], bl
call	sub_7502A0
fld	ds:flt_1441138
sub	esp, 0Ch
fstp	[esp+14h+var_C]
lea	ecx, [esi+3A0h]
fld	ds:flt_1441134
fstp	[esp+14h+var_10]
fld	ds:flt_15AAEF8
fstp	[esp+14h+var_14]
call	sub_751A30
mov	dword ptr [esi+6A0h], 400h
mov	[esi+6A4h], ebx
mov	[esi+6A8h], ebx
mov	[esi+6ACh], ebx
mov	[esi+6B0h], ebx
mov	[esi+6B4h], ebx
mov	[esi+6B8h], ebx
mov	[esi+6BCh], ebx
mov	[esi+6C0h], ebx
mov	[esi+6C4h], ebx
mov	[esi+6C8h], ebx
mov	[esi+6CCh], ebx
mov	[esi+6D0h], ebx
mov	[esi+6D4h], ebx
mov	[esi+6D8h], ebx
mov	[esi+6DCh], ebx
mov	[esi+6E0h], ebx
mov	[esi+6E4h], ebx
mov	[esi+6E8h], ebx
lea	ecx, [esi+710h]
mov	[esi+6ECh], ebx
mov	[esi+6F0h], ebx
mov	[esi+6F4h], ebx
call	sub_7548F0
mov	[esi+7A0h], ebx
lea	eax, [esi+48h]
mov	ecx, 20h

loc_7555D1:
mov	[eax-10h], ebx
mov	[eax], ebx
add	eax, 14h
sub	ecx, 1
jnz	short loc_7555D1
mov	eax, esi
pop	esi
pop	ebx
retn
sub_7553E0 endp

align 10h



sub_7555F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	esi
movzx	esi, byte ptr [eax+9]
mov	edx, [esp+0Ch+arg_4]
push	edi
movzx	edi, byte ptr [eax+0Bh]
add	esi, esi
xor	esi, edi
movzx	edi, byte ptr [eax+0Ah]
xor	esi, edi
movzx	edi, byte ptr [eax+8]
xor	esi, edi
movzx	edi, byte ptr [eax+7]
xor	esi, edi
movzx	edi, byte ptr [eax+6]
mov	[esp+10h+var_8], eax
mov	[esp+10h+var_4], edx
mov	edx, [eax]
movzx	eax, word ptr [eax+4]
xor	esi, edi
xor	esi, eax
mov	eax, edx
shr	eax, 6
xor	esi, eax
xor	esi, edx
push	esi
lea	edx, [esp+14h+var_8]
push	edx
push	ecx
call	sub_754CF0
pop	edi
pop	esi
add	esp, 8
retn	8
sub_7555F0 endp

align 10h



sub_755650 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_8]
mov	esi, ecx
cmp	edi, [esi+14h]
ja	loc_755718
mov	ebx, [esp+0Ch+arg_4]
test	ebx, ebx
jz	loc_755718
test	edi, edi
jz	loc_755718
cmp	edi, [esi]
jnb	short loc_75567C
mov	[esi], edi

loc_75567C:
cmp	ebx, [esi]
jnb	short loc_755682
mov	[esi], ebx

loc_755682:
push	edi
push	ebx
call	sub_7550F0
mov	[esp+0Ch+arg_8], eax
test	eax, eax
jnz	short loc_7556B3
push	edi
push	ebx
mov	ecx, esi
call	sub_755130
mov	[esp+0Ch+arg_8], eax
test	eax, eax
jnz	short loc_7556B3
push	edi
push	ebx
mov	ecx, esi
call	sub_755250
mov	[esp+0Ch+arg_8], eax
test	eax, eax
jz	short loc_75571A

loc_7556B3:
mov	edi, [esp+0Ch+arg_0]
mov	ecx, [edi]
mov	[eax], ecx
mov	edx, [edi+4]
mov	eax, [esp+0Ch+arg_8]
mov	[eax+4], edx
mov	ecx, [edi+8]
mov	edx, [esp+0Ch+arg_8]
mov	[edx+8], ecx
mov	ecx, [esp+0Ch+arg_8]
xor	eax, eax
mov	[ecx+20h], ax
mov	eax, [esp+0Ch+arg_8]
xor	edx, edx
mov	[eax+22h], dx
mov	ecx, [esp+0Ch+arg_8]
push	ecx
mov	ecx, esi
call	sub_741C30
add	esi, 84h
push	edi
mov	ecx, esi
call	sub_753DB0
test	eax, eax
jnz	short loc_75570E
lea	edx, [esp+0Ch+arg_8]
push	edx
push	edi
mov	ecx, esi
call	sub_7555F0

loc_75570E:
mov	eax, [esp+0Ch+arg_8]
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_755718:
xor	eax, eax

loc_75571A:
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_755650 endp

db 10h dup(0CCh)



; int __stdcall	sub_755730(int,	int, int, int, size_t, int)
sub_755730 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 3Ch
push	ebx
push	esi
mov	esi, [esp+44h+arg_4]
xor	eax, eax
push	edi
mov	edi, ecx
mov	[esp+48h+var_3C], eax
cmp	byte ptr [esp+48h+arg_8], al
jz	short loc_755762
movzx	eax, byte ptr [esi+6]
movzx	edx, word ptr [esi+4]
mov	ecx, [esi]
mov	ecx, [ecx+0Ch]
mov	ebx, [ecx]
push	eax
push	edx
mov	edx, [ebx+1Ch]
call	edx
mov	[esp+48h+var_3C], eax

loc_755762:
cmp	[esp+48h+arg_C], 0
jnz	short loc_755776
test	eax, eax
jnz	short loc_755776
pop	edi
pop	esi
pop	ebx
add	esp, 3Ch
retn	18h

loc_755776:
mov	cl, [esi+8]
movzx	eax, cl
mov	[esp+48h+arg_8], eax
mov	bl, [esi+9]
push	ebp
fild	[esp+4Ch+arg_8]
movzx	ebp, byte ptr [esi+7]
fld	ds:dbl_15FD690
fmul	st(1), st
and	ebp, 4
fxch	st(1)
or	ebp, 2
shr	ebp, 1
fstp	[esp+4Ch+arg_8]
mov	[esp+4Ch+var_4], ebp
fld	[esp+4Ch+arg_8]
fld	ds:dbl_15FCC48
fnstcw	word ptr [esp+4Ch+arg_8]
movzx	eax, word ptr [esp+4Ch+arg_8]
fadd	st(1), st
or	eax, 0C00h
fxch	st(1)
mov	[esp+4Ch+var_20], eax
movzx	eax, bl
fldcw	word ptr [esp+4Ch+var_20]
fistp	qword ptr [esp+4Ch+var_20]
mov	edx, [esp+4Ch+var_20]
mov	[esp+4Ch+var_28], edx
fldcw	word ptr [esp+4Ch+arg_8]
mov	[esp+4Ch+arg_8], eax
fild	[esp+4Ch+arg_8]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+arg_8]
fadd	[esp+4Ch+arg_8]
fnstcw	word ptr [esp+4Ch+arg_8]
movzx	eax, word ptr [esp+4Ch+arg_8]
or	eax, 0C00h
mov	[esp+4Ch+var_20], eax
fldcw	word ptr [esp+4Ch+var_20]
fistp	qword ptr [esp+4Ch+var_20]
mov	eax, [esp+4Ch+var_20]
mov	[esp+4Ch+var_2C], eax
fldcw	word ptr [esp+4Ch+arg_8]
test	edx, edx
jnz	short loc_755827
test	cl, cl
jz	short loc_755827
mov	[esp+4Ch+var_28], 1

loc_755827:
test	eax, eax
jnz	short loc_755837
test	bl, bl
jz	short loc_755837
mov	[esp+4Ch+var_2C], 1

loc_755837:
lea	ecx, [edi+334h]
call	sub_750140
cmp	[esp+4Ch+var_3C], 0
jnz	loc_755D88
mov	ebx, [esp+4Ch+arg_C]
cmp	byte ptr [ebx+25h], 0
jnz	loc_755CF8
xor	eax, eax
test	byte ptr [esi+0Bh], 1Eh
mov	[esp+4Ch+var_30], eax
mov	[esp+4Ch+var_34], eax
mov	byte ptr [esp+4Ch+arg_8], al
jnz	short loc_7558CE
mov	al, [esi+7]
test	al, 1
jz	short loc_7558CE
test	al, 2
jz	short loc_7558CE
cmp	[esp+4Ch+arg_10], 60h
jbe	short loc_7558CE
mov	ecx, [esi]
mov	edx, [ecx+0Ch]
mov	eax, [edx+14h]
mov	edx, eax
shr	edx, 0Dh
test	dl, 1
jnz	short loc_75589A
shr	eax, 4
test	al, 1
jz	short loc_7558CE

loc_75589A:
mov	eax, [esp+4Ch+arg_14]
push	eax
call	sub_751C00
mov	edx, [esp+4Ch+arg_14]
movzx	ecx, ax
mov	[esp+4Ch+var_30], ecx
mov	ecx, [esi]
push	edx
call	sub_751C30
cmp	[esp+4Ch+var_30], 0
movzx	eax, ax
mov	[esp+4Ch+var_34], eax
jz	short loc_7558CE
test	eax, eax
jz	short loc_7558CE
mov	byte ptr [esp+4Ch+arg_8], 1

loc_7558CE:
mov	ecx, [edi+0Ch]
fld	ds:flt_1440108
mov	eax, [ebx]
fild	dword ptr [edi+0Ch]
lea	esi, [edi+2ECh]
test	ecx, ecx
jge	short loc_7558EC
fadd	ds:flt_15FCC08

loc_7558EC:
fdivp	st(1), st
mov	edx, [eax+18h]
push	ecx
mov	ecx, ebx
fmul	ds:dbl_15FCC48
fstp	[esp+50h+arg_C]
fld	[esp+50h+arg_C]
fstp	[esp+50h+var_50]
push	esi
call	edx
cmp	byte ptr [esp+4Ch+arg_8], 0
jz	loc_755C97
lea	ebp, [edi+6A0h]
mov	ecx, ebp
call	sub_767150
mov	eax, [esp+4Ch+arg_10]
add	eax, eax
add	eax, eax
cmp	eax, 800h
mov	[esp+4Ch+arg_8], eax
jle	short loc_75593C
mov	eax, 800h
mov	[esp+4Ch+arg_8], eax

loc_75593C:
cmp	dword ptr [edi+304h], 0
fild	[esp+4Ch+arg_8]
mov	[ebp+0], eax
mov	[esp+4Ch+arg_C], 0
fmul	ds:dbl_143B738
fstp	[esp+4Ch+arg_8]
fld	[esp+4Ch+arg_8]
jbe	loc_755A78

loc_755966:
mov	eax, [esp+4Ch+arg_C]
mov	edx, [edi+310h]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
cmp	dword ptr [ecx+eax*8+4], 2
lea	ebx, [ecx+eax*8]
jbe	loc_755A63
mov	esi, [ebx+8]
mov	edx, [ebx]
mov	eax, [edx+14h]
mov	ecx, esi
shr	ecx, 8
mov	[esp+4Ch+arg_14], eax
mov	eax, [eax+ecx*4]
mov	edx, esi
and	edx, 0FFh
fld	dword ptr [eax+edx*8+4]
fmul	st, st(1)
call	__ftol2_sse
movsx	ecx, ax
mov	eax, [esp+4Ch+arg_14]
neg	ecx
mov	edx, esi
shr	edx, 8
push	ecx
mov	ecx, [eax+edx*4]
and	esi, 0FFh
fmul	dword ptr [ecx+esi*8]
call	__ftol2_sse
movsx	edx, ax
push	edx
mov	ecx, ebp
call	sub_767390
mov	eax, 1
mov	[esp+4Ch+arg_14], eax
cmp	[ebx+4], eax
jbe	short loc_755A5F
lea	esp, [esp+0]

loc_7559F0:
mov	eax, [ebx+8]
mov	ecx, [esp+4Ch+arg_14]
mov	edx, [ebx]
lea	esi, [eax+ecx]
mov	eax, [edx+14h]
mov	ecx, esi
shr	ecx, 8
mov	[esp+4Ch+var_20], eax
mov	eax, [eax+ecx*4]
mov	edx, esi
and	edx, 0FFh
fld	dword ptr [eax+edx*8+4]
fld	[esp+4Ch+arg_8]
fld	st
fmulp	st(2), st
fxch	st(1)
call	__ftol2_sse
movsx	ecx, ax
mov	eax, [esp+4Ch+var_20]
neg	ecx
mov	edx, esi
shr	edx, 8
push	ecx
mov	ecx, [eax+edx*4]
and	esi, 0FFh
fmul	dword ptr [ecx+esi*8]
call	__ftol2_sse
movsx	edx, ax
push	edx
mov	ecx, ebp
call	sub_767420
mov	eax, [esp+4Ch+arg_14]
inc	eax
mov	[esp+4Ch+arg_14], eax
cmp	eax, [ebx+4]
jb	short loc_7559F0

loc_755A5F:
fld	[esp+4Ch+arg_8]

loc_755A63:
mov	eax, [esp+4Ch+arg_C]
inc	eax
mov	[esp+4Ch+arg_C], eax
cmp	eax, [edi+304h]
jb	loc_755966

loc_755A78:
fild	[esp+4Ch+var_34]
fmul	st, st(1)
call	__ftol2_sse
fimul	[esp+4Ch+var_30]
push	eax
call	__ftol2_sse
push	eax
mov	eax, [esp+54h+arg_10]
push	0
shr	eax, 4
push	eax
mov	ecx, ebp
call	sub_767870
fild	dword ptr [edi+708h]
fld1
xor	eax, eax
fdivrp	st(1), st
mov	[esp+4Ch+arg_C], eax
fstp	[esp+4Ch+arg_8]
cmp	[edi+6A4h], eax
jbe	loc_755D88
fld	[esp+4Ch+arg_8]

loc_755AC3:
mov	edx, [edi+6B0h]
mov	ecx, eax
shr	ecx, 4
mov	ecx, [edx+ecx*4]
mov	esi, eax
and	esi, 0Fh
cmp	dword ptr [ecx+esi*8+4], 2
lea	ebx, [ecx+esi*8]
jbe	loc_755C7F
mov	eax, [ebx]
mov	ecx, [edi+6C0h]
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
movzx	ecx, word ptr [ebp+5Ah]
and	eax, 3Fh
mov	eax, [edx+eax*4]
mov	[esp+4Ch+arg_10], eax
shr	eax, 10h
cwde
movsx	edx, cx
sub	eax, edx
js	short loc_755B1E
cmp	eax, [ebp+50h]
jge	short loc_755B1E
mov	edx, [ebp+4Ch]
mov	ax, [edx+eax*2]
add	ax, cx
jmp	short loc_755B23

loc_755B1E:
mov	ax, word ptr [esp+4Ch+arg_10+2]

loc_755B23:
movzx	ecx, word ptr [ebp+58h]
movsx	esi, cx
mov	cx, word ptr [esp+4Ch+arg_10]
movsx	edx, cx
sub	edx, esi
js	short loc_755B49
cmp	edx, [ebp+44h]
jge	short loc_755B49
mov	ecx, [ebp+40h]
mov	cx, [ecx+edx*2]
movzx	edx, word ptr [ebp+58h]
add	cx, dx

loc_755B49:
mov	edx, [esp+4Ch+var_4]
fild	[esp+4Ch+var_4]
test	edx, edx
jge	short loc_755B5B
fadd	ds:flt_15FCC08

loc_755B5B:
fstp	[esp+4Ch+arg_14]
cwde
neg	eax
mov	[esp+4Ch+arg_10], eax
movsx	ecx, cx
fild	[esp+4Ch+arg_10]
sub	esp, 8
fmul	st, st(1)
fstp	[esp+54h+arg_10]
fld	[esp+54h+arg_10]
mov	[esp+54h+arg_10], ecx
fstp	[esp+54h+var_50]
lea	ecx, [edi+334h]
fild	[esp+54h+arg_10]
fmulp	st(1), st
fmul	[esp+54h+arg_14]
fstp	[esp+54h+arg_10]
fld	[esp+54h+arg_10]
fstp	[esp+54h+var_54]
call	sub_74FE30
mov	esi, 1
cmp	[ebx+4], esi
jbe	loc_755C6C

loc_755BB0:
mov	eax, [ebx]
mov	ecx, [edi+6C0h]
add	eax, esi
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
movzx	ecx, word ptr [ebp+5Ah]
and	eax, 3Fh
mov	eax, [edx+eax*4]
mov	[esp+4Ch+arg_10], eax
shr	eax, 10h
cwde
movsx	edx, cx
sub	eax, edx
js	short loc_755BEF
cmp	eax, [ebp+50h]
jge	short loc_755BEF
mov	edx, [ebp+4Ch]
mov	ax, [edx+eax*2]
add	ax, cx
mov	word ptr [esp+4Ch+arg_10+2], ax

loc_755BEF:
movzx	eax, word ptr [ebp+58h]
mov	cx, word ptr [esp+4Ch+arg_10]
cwde
movsx	edx, cx
sub	edx, eax
js	short loc_755C13
cmp	edx, [ebp+44h]
jge	short loc_755C13
mov	ecx, [ebp+40h]
movzx	eax, word ptr [ebp+58h]
mov	cx, [ecx+edx*2]
add	cx, ax

loc_755C13:
movsx	edx, word ptr [esp+4Ch+arg_10+2]
neg	edx
mov	[esp+4Ch+arg_10], edx
movsx	eax, cx
fild	[esp+4Ch+arg_10]
fld	[esp+4Ch+arg_8]
fld	st
sub	esp, 8
fmulp	st(2), st
lea	ecx, [edi+334h]
fxch	st(1)
fstp	[esp+54h+arg_10]
fld	[esp+54h+arg_10]
mov	[esp+54h+arg_10], eax
fstp	[esp+54h+var_50]
fild	[esp+54h+arg_10]
fmulp	st(1), st
fmul	[esp+54h+arg_14]
fstp	[esp+54h+arg_10]
fld	[esp+54h+arg_10]
fstp	[esp+54h+var_54]
call	sub_750A10
inc	esi
cmp	esi, [ebx+4]
jb	loc_755BB0

loc_755C6C:
lea	ecx, [edi+334h]
call	sub_750A60
fld	[esp+4Ch+arg_8]
mov	eax, [esp+4Ch+arg_C]

loc_755C7F:
inc	eax
mov	[esp+4Ch+arg_C], eax
cmp	eax, [edi+6A4h]
jb	loc_755AC3
fstp	st
jmp	loc_755D88

loc_755C97:
fldz
mov	eax, [esp+4Ch+arg_10]
push	0FFFFFFFFh
sub	esp, 10h
mov	ecx, eax
fst	[esp+60h+var_54]
mov	[esp+60h+arg_8], ecx
fstp	[esp+60h+var_58]
fild	[esp+60h+arg_8]
test	ecx, ecx
jge	short loc_755CBE
fadd	ds:flt_15FCC08

loc_755CBE:
fld	ds:dbl_1441140
imul	ebp, eax
fmul	st(1), st
fxch	st(1)
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_5C]
mov	[esp+60h+arg_8], ebp
fild	[esp+60h+arg_8]
test	ebp, ebp
jge	short loc_755CE9
fadd	ds:flt_15FCC08

loc_755CE9:
fmulp	st(1), st
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
jmp	loc_755D79

loc_755CF8:
mov	edx, [ebx]
fld	ds:dword_1577A6C
mov	eax, [edx+18h]
push	ecx
fstp	[esp+50h+var_50]
lea	esi, [edi+2ECh]
push	esi
mov	ecx, ebx
call	eax
fild	[esp+4Ch+arg_10]
mov	ecx, [esp+4Ch+arg_10]
test	ecx, ecx
jge	short loc_755D24
fadd	ds:flt_15FCC08

loc_755D24:
movzx	eax, byte ptr [ebx+25h]
lea	edx, [eax+eax*4]
shl	edx, 6
mov	[esp+4Ch+arg_8], edx
fild	[esp+4Ch+arg_8]
test	edx, edx
jge	short loc_755D40
fadd	ds:flt_15FCC08

loc_755D40:
fdivp	st(1), st
push	0FFFFFFFFh	; int
sub	esp, 10h
fstp	[esp+60h+arg_8]
fldz
fst	[esp+60h+var_54]
fstp	[esp+60h+var_58]
fld	[esp+60h+arg_8]
fst	[esp+60h+var_5C]
mov	[esp+60h+arg_8], ebp
fild	[esp+60h+arg_8]
test	ebp, ebp
jge	short loc_755D6F
fadd	ds:flt_15FCC08

loc_755D6F:
fmulp	st(1), st
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]

loc_755D79:
fstp	[esp+60h+var_60]
push	esi		; int
lea	ecx, [edi+334h]
call	sub_750A90

loc_755D88:
mov	eax, [edi+10h]
mov	ecx, [esp+4Ch+var_28]
mov	edx, [esp+4Ch+var_2C]
lea	esi, [eax+ecx]
lea	ecx, [eax+edx]
mov	eax, [esp+4Ch+var_3C]
mov	ebx, esi
mov	ebp, ecx
neg	ebx
neg	ebp
mov	[esp+4Ch+var_34], esi
mov	[esp+4Ch+var_38], ecx
mov	[esp+4Ch+arg_10], ecx
mov	byte ptr [esp+4Ch+arg_8], 0
test	eax, eax
jz	short loc_755DE7
mov	ebp, [eax+20h]
mov	edx, [eax+1Ch]
mov	[esp+4Ch+arg_10], ebp
add	ebp, ecx
mov	ecx, [eax+14h]
lea	ebx, [edx+esi]
sub	ecx, edx
mov	edx, [eax+18h]
mov	eax, [esp+4Ch+var_38]
neg	ebx
neg	ebp
sub	edx, [esp+4Ch+arg_10]
lea	esi, [ecx+esi-1]
lea	eax, [edx+eax-1]
jmp	short loc_755E2B

loc_755DE7:
lea	ecx, [edi+334h]
call	sub_7508A0
test	al, al
jz	short loc_755E27
mov	eax, [esp+4Ch+var_34]
mov	ebx, [edi+380h]
mov	esi, [edi+388h]
mov	ecx, [esp+4Ch+var_38]
mov	ebp, [edi+384h]
sub	ebx, eax
add	esi, eax
mov	eax, [edi+38Ch]
sub	ebp, ecx
add	eax, ecx
mov	[esp+4Ch+arg_10], eax
mov	byte ptr [esp+4Ch+arg_8], 1

loc_755E27:
mov	eax, [esp+4Ch+arg_10]

loc_755E2B:
mov	ecx, [edi+0Ch]
sub	esi, ebx
inc	esi
sub	eax, ebp
inc	eax
mov	edx, esi
mov	esi, [edi+2B8h]
mov	[esp+4Ch+arg_10], edx
mov	[esp+4Ch+arg_14], eax
cmp	eax, ecx
jbe	short loc_755E4C
mov	[esp+4Ch+arg_14], ecx

loc_755E4C:
mov	eax, [esi+10h]
cmp	edx, eax
jbe	short loc_755E57
mov	[esp+4Ch+arg_10], eax

loc_755E57:
mov	ecx, [esp+4Ch+arg_14]
mov	edx, [esp+4Ch+arg_10]
mov	eax, [esp+4Ch+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [edi+710h]
call	sub_755650
mov	[esp+4Ch+var_30], eax
test	eax, eax
jnz	short loc_755EA7
mov	edi, [edi+7A0h]
test	edi, edi
jz	short loc_755E9B
mov	eax, [esp+4Ch+arg_14]
mov	ecx, [esp+4Ch+arg_10]
mov	edx, [edi]
mov	edx, [edx+0Ch]
push	eax
mov	eax, [esp+50h+arg_4]
push	ecx
push	eax
mov	ecx, edi
call	edx

loc_755E9B:
pop	ebp
pop	edi
pop	esi
xor	eax, eax
pop	ebx
add	esp, 3Ch
retn	18h

loc_755EA7:
mov	eax, [eax+0Ch]
movzx	eax, word ptr [eax+20h]
mov	ecx, [esp+4Ch+arg_0]
and	eax, 0FFFF3FFFh
push	eax
push	ecx
mov	ecx, edi
call	sub_751CA0
test	al, al
jz	short loc_755E9B
lea	edx, [esp+4Ch+var_28+4]
push	edx
mov	edx, [esp+50h+arg_14]
lea	eax, [esp+50h+var_20]
push	eax
mov	eax, [esp+54h+arg_10]
push	edx
lea	ecx, [edi+2BCh]
push	eax
call	sub_751B80
test	al, al
jnz	short loc_755F16
mov	ecx, [esp+4Ch+arg_0]
push	ecx
mov	ecx, edi
call	sub_753C70
mov	ecx, [esp+4Ch+arg_14]
lea	edx, [esp+4Ch+var_28+4]
push	edx
mov	edx, [esp+50h+arg_10]
lea	eax, [esp+50h+var_20]
push	eax
push	ecx
push	edx
lea	ecx, [edi+2BCh]
call	sub_751B80
test	al, al
jz	short loc_755E9B

loc_755F16:
mov	eax, [esp+4Ch+var_30]
mov	cx, [eax+18h]
mov	dx, [eax+1Ah]
sub	cx, bx
mov	ebx, [esp+4Ch+var_28+4]
sub	dx, bp
cmp	[esp+4Ch+arg_14], 0
mov	ebp, [esp+4Ch+var_20]
mov	[eax+20h], cx
mov	[eax+22h], dx
mov	[esp+4Ch+arg_C], 0
jbe	short loc_755F7F
jmp	short loc_755F50
align 10h

loc_755F50:
mov	ecx, [esp+4Ch+arg_C]
mov	eax, [esp+4Ch+arg_10]
lea	edx, [ebx+ecx]
imul	edx, [esi+18h]
add	edx, [esi+1Ch]
push	eax		; size_t
add	edx, ebp
push	0		; int
push	edx		; void *
call	_memset
mov	eax, [esp+58h+arg_C]
inc	eax
add	esp, 0Ch
mov	[esp+4Ch+arg_C], eax
cmp	eax, [esp+4Ch+arg_14]
jb	short loc_755F50

loc_755F7F:
mov	eax, [esp+4Ch+var_3C]
test	eax, eax
jz	short loc_755FEA
cmp	dword ptr [eax+18h], 0
mov	[esp+4Ch+arg_C], 0
jbe	loc_756292
mov	eax, [esp+4Ch+var_38]
lea	ecx, [ebx+eax]
mov	[esp+4Ch+arg_8], ecx

loc_755FA4:
mov	ecx, [esp+4Ch+var_3C]
mov	edx, [esi+18h]
imul	edx, [esp+4Ch+arg_8]
mov	eax, [ecx+14h]
add	edx, [esi+1Ch]
push	eax
imul	eax, [esp+50h+arg_C]
add	eax, [ecx+8]
add	edx, ebp
add	edx, [esp+50h+var_34]
push	eax
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+58h+arg_C]
mov	ecx, [esp+58h+var_3C]
inc	[esp+58h+arg_8]
inc	eax
add	esp, 0Ch
mov	[esp+4Ch+arg_C], eax
cmp	eax, [ecx+18h]
jb	short loc_755FA4
jmp	loc_756292

loc_755FEA:
cmp	byte ptr [esp+4Ch+arg_8], 0
jz	loc_756292
fld1
mov	eax, [esp+4Ch+arg_4]
cmp	byte ptr [eax+8], 0
fstp	[esp+4Ch+arg_8]
jnz	short loc_75600B
cmp	byte ptr [eax+9], 0
jz	short loc_756015

loc_75600B:
fld	ds:flt_15AEAE8
fstp	[esp+4Ch+arg_8]

loc_756015:
fld	[esp+4Ch+arg_8]
fld	st
fld	dword ptr [edi+338h]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_75603B
push	ecx		; float
lea	ecx, [edi+334h]
fstp	[esp+50h+var_50]
call	sub_750180
jmp	short loc_75603D

loc_75603B:
fstp	st

loc_75603D:
cmp	[esp+4Ch+arg_10], 5
jb	loc_756108
cmp	[esp+4Ch+var_4], 3
jb	loc_756108
cmp	dword ptr [edi+368h], 0
mov	[esp+4Ch+arg_C], 0
jbe	loc_7560EB
mov	edx, [esp+4Ch+var_38]
lea	eax, [ebx+edx]
mov	[esp+4Ch+arg_8], eax

loc_756073:
mov	edx, [esi+18h]
mov	ecx, [esp+4Ch+arg_10]
imul	edx, ebx
add	edx, [esi+1Ch]
push	ecx		; size_t
add	edx, ebp
push	0		; int
push	edx		; void *
call	_memset
mov	eax, [esi+18h]
mov	ecx, [esp+58h+arg_C]
imul	eax, ebx
add	eax, [esi+1Ch]
add	esp, 0Ch
add	eax, ebp
add	eax, [esp+4Ch+var_34]
push	1		; size_t
push	eax		; int
push	ecx		; int
lea	ecx, [edi+334h]
call	sub_74FE60
mov	eax, [esi+18h]
imul	eax, [esp+4Ch+arg_8]
mov	ecx, [esi+18h]
add	eax, [esi+1Ch]
imul	ecx, ebx
mov	edx, [esp+4Ch+arg_10]
add	ecx, ebp
add	ecx, [esi+1Ch]
push	edx
add	eax, ebp
push	eax
push	ecx
mov	ecx, edi
call	sub_751D10
mov	eax, [esp+4Ch+arg_C]
inc	[esp+4Ch+arg_8]
inc	eax
mov	[esp+4Ch+arg_C], eax
cmp	eax, [edi+368h]
jb	short loc_756073

loc_7560EB:
mov	eax, [esi+18h]
mov	edx, [esp+4Ch+arg_10]
imul	eax, ebx
add	eax, [esi+1Ch]
push	edx		; size_t
add	eax, ebp
push	0		; int
push	eax		; void *
call	_memset
add	esp, 0Ch
jmp	short loc_75615D

loc_756108:
cmp	dword ptr [edi+368h], 0
mov	[esp+4Ch+arg_C], 0
jbe	short loc_75615D
mov	ecx, [esp+4Ch+var_38]
lea	edx, [ebx+ecx]
mov	[esp+4Ch+arg_8], edx

loc_756124:
mov	eax, [esi+18h]
imul	eax, [esp+4Ch+arg_8]
add	eax, [esi+1Ch]
mov	ecx, [esp+4Ch+arg_C]
add	eax, ebp
add	eax, [esp+4Ch+var_34]
push	1		; size_t
push	eax		; int
push	ecx		; int
lea	ecx, [edi+334h]
call	sub_74FE60
mov	eax, [esp+4Ch+arg_C]
inc	[esp+4Ch+arg_8]
inc	eax
mov	[esp+4Ch+arg_C], eax
cmp	eax, [edi+368h]
jb	short loc_756124

loc_75615D:
mov	ecx, [esp+4Ch+arg_4]
test	byte ptr [ecx+7], 20h
mov	[esp+4Ch+arg_8], 0
jz	short loc_756187
mov	edx, [esp+4Ch+arg_14]
mov	eax, [esp+4Ch+arg_10]
push	edx
push	eax
push	ebx
push	ebp
push	esi
mov	ecx, edi
call	sub_7522F0
mov	ecx, [esp+4Ch+arg_4]

loc_756187:
mov	al, [ecx+8]
test	al, al
jnz	short loc_756197
cmp	[ecx+9], al
jz	loc_756226

loc_756197:
test	byte ptr [ecx+7], 80h
jz	short loc_7561FC
mov	ecx, [esp+4Ch+arg_4]
movzx	edx, byte ptr [ecx+9]
mov	ecx, [esp+4Ch+arg_14]
mov	[esp+4Ch+arg_8], edx
mov	edx, [esp+4Ch+arg_10]
sub	esp, 8
fild	[esp+54h+arg_8]
movzx	eax, al
fld	ds:dbl_15FD690
fmul	st(1), st
fxch	st(1)
fstp	[esp+54h+arg_8]
fld	[esp+54h+arg_8]
mov	[esp+54h+arg_8], eax
fstp	[esp+54h+var_50]
fild	[esp+54h+arg_8]
fmulp	st(1), st
fstp	[esp+54h+arg_8]
fld	[esp+54h+arg_8]
fstp	[esp+54h+var_54]
push	ecx		; float
push	edx		; int
push	ebx		; int
push	ebp		; int
push	esi		; int
mov	ecx, edi
call	sub_753BD0
mov	[esp+4Ch+arg_8], 8
jmp	short loc_756222

loc_7561FC:
mov	eax, [esp+4Ch+var_2C]
mov	ecx, [esp+4Ch+var_28]
mov	edx, [esp+4Ch+arg_14]
push	eax
mov	eax, [esp+50h+arg_10]
push	ecx
push	edx
push	eax
push	ebx
push	ebp
push	esi
mov	ecx, edi
call	sub_7536F0
mov	[esp+4Ch+arg_8], 2

loc_756222:
mov	ecx, [esp+4Ch+arg_4]

loc_756226:
mov	al, [ecx+0Ah]
cmp	al, 10h
jz	short loc_756278
movzx	ecx, al
mov	[esp+4Ch+arg_C], ecx
fild	[esp+4Ch+arg_C]
fmul	ds:dbl_15FD690
fstp	[esp+4Ch+arg_C]
fld1
fld	[esp+4Ch+arg_C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_756257
xor	eax, eax
jmp	short loc_75625B

loc_756257:
mov	eax, [esp+4Ch+arg_8]

loc_75625B:
mov	edx, [esp+4Ch+arg_14]
push	eax		; int
mov	eax, [esp+50h+arg_10]
push	ecx		; float
fstp	[esp+54h+var_54]
push	edx		; int
push	eax		; int
push	ebx		; int
push	ebp		; int
push	esi		; int
mov	ecx, edi
call	sub_751D80
mov	ecx, [esp+4Ch+arg_4]

loc_756278:
test	byte ptr [ecx+7], 20h
jz	short loc_756292
mov	ecx, [esp+4Ch+arg_14]
mov	edx, [esp+4Ch+arg_10]
push	ecx
push	edx
push	ebx
push	ebp
push	esi
mov	ecx, edi
call	sub_7523C0

loc_756292:
mov	ecx, [esp+4Ch+var_30]
mov	eax, [ecx+0Ch]
movzx	eax, word ptr [eax+20h]
movzx	edx, word ptr [ecx+18h]
and	eax, 0FFFF3FFFh
mov	[esp+4Ch+var_8], eax
movzx	eax, word ptr [ecx+1Ah]
mov	[esp+4Ch+var_20+4], eax
mov	eax, [edi+1Ch]
shr	eax, 6
mov	[esp+4Ch+var_20], edx
mov	[esp+4Ch+arg_8], eax
cmp	eax, [edi+20h]
jb	short loc_7562D0
mov	ecx, eax
push	ecx
lea	ecx, [edi+1Ch]
call	sub_7525A0

loc_7562D0:
mov	eax, [edi+1Ch]
mov	edx, [edi+28h]
and	eax, 3Fh
lea	ecx, ds:0[eax*8]
sub	ecx, eax
mov	eax, [esp+4Ch+arg_8]
mov	edx, [edx+eax*4]
lea	eax, [edx+ecx*4]
mov	ecx, [esp+4Ch+var_20]
mov	edx, [esp+4Ch+var_20+4]
mov	[eax], ecx
mov	ecx, [esp+4Ch+arg_10]
mov	[eax+4], edx
mov	edx, [esp+4Ch+arg_14]
add	ecx, ebp
mov	[eax+10h], ecx
mov	[eax+8], ebp
mov	[eax+0Ch], ebx
lea	ecx, [ebx+edx]
mov	[eax+14h], ecx
mov	ecx, [esp+4Ch+var_8]
mov	[eax+18h], ecx
inc	dword ptr [edi+1Ch]
lea	eax, [ecx+ecx*4]
inc	dword ptr [edi+eax*4+48h]
lea	eax, [edi+eax*4+48h]
mov	edi, [edi+7A0h]
test	edi, edi
jz	loc_7563B6
mov	eax, [esp+4Ch+var_30]
movzx	ecx, word ptr [eax+18h]
movzx	edx, word ptr [eax+1Ah]
mov	[esp+4Ch+arg_8], ecx
fild	[esp+4Ch+arg_8]
mov	[esp+4Ch+arg_8], edx
movzx	edx, word ptr [eax+1Ch]
add	edx, ecx
movzx	ecx, word ptr [eax+1Eh]
fstp	[esp+4Ch+var_20]
fild	[esp+4Ch+arg_8]
add	ecx, [esp+4Ch+arg_8]
fstp	[esp+4Ch+var_20+4]
mov	[esp+4Ch+arg_4], edx
mov	[esp+4Ch+arg_8], ecx
mov	ecx, [esi+18h]
push	ecx
fild	[esp+50h+arg_4]
mov	ecx, [esp+50h+arg_14]
push	ecx
mov	ecx, [esp+54h+arg_10]
fstp	[esp+54h+var_18]
fild	[esp+54h+arg_8]
push	ecx
mov	ecx, [esi+18h]
imul	ecx, ebx
fstp	[esp+58h+var_14]
add	ecx, [esi+1Ch]
mov	edx, [edi]
mov	edx, [edx+8]
add	ecx, ebp
push	ecx
mov	ecx, [eax+0Ch]
movzx	ecx, word ptr [ecx+20h]
and	ecx, 0FFFF3FFFh
push	ecx
lea	ecx, [esp+60h+var_20]
push	ecx
push	eax
mov	ecx, edi
call	edx

loc_7563B6:
mov	eax, [esp+4Ch+var_30]
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 3Ch
retn	18h
sub_755730 endp

align 10h



; int __stdcall	sub_7563D0(int,	int, int, int, size_t, int)
sub_7563D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+794h]
push	ebx
mov	ecx, esi
call	sub_752650
test	eax, eax
jl	short loc_75642F
mov	ecx, [esi]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8+10h]
test	eax, eax
jz	short loc_75642F
add	eax, 0Ch
jz	short loc_75642F
mov	eax, [eax]
test	eax, eax
jz	short loc_75642F
mov	ecx, [eax+0Ch]
mov	esi, [ecx]
lea	edx, [edi+740h]
mov	edi, [ecx+4]
mov	[esi+4], edi
mov	esi, [ecx+4]
mov	edi, [ecx]
mov	[esi], edi
mov	esi, [edx]
mov	[ecx], esi
mov	[ecx+4], edx
mov	esi, [edx]
pop	edi
mov	[esi+4], ecx
pop	esi
mov	[edx], ecx
pop	ebx
retn	18h

loc_75642F:
mov	edx, [esp+0Ch+arg_14]
mov	eax, [esp+0Ch+arg_10]
mov	ecx, [esp+0Ch+arg_C]
push	edx		; int
mov	edx, [esp+10h+arg_8]
push	eax		; size_t
mov	eax, [esp+14h+arg_0]
push	ecx		; int
push	edx		; int
push	ebx		; int
push	eax		; int
mov	ecx, edi
call	sub_755730
pop	edi
pop	esi
pop	ebx
retn	18h
sub_7563D0 endp

align 10h



; int __thiscall sub_756460(void *, char)
sub_756460 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1441148
jz	short loc_756479
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_756479:
mov	eax, esi
pop	esi
retn	4
sub_756460 endp

align 10h



sub_756480 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fldz
mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_8]
fst	dword ptr [eax]
fstp	dword ptr [ecx]
retn	0Ch
sub_756480 endp

align 10h



; int __stdcall	sub_7564A0(int,	float, float, int)
sub_7564A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fld	[esp+arg_4]
push	esi
call	__ftol2_sse
fld	[esp+4+arg_8]
mov	esi, [esp+4+arg_0]
mov	[esi], ax
call	__ftol2_sse
mov	[esi+2], ax
pop	esi
retn	10h
sub_7564A0 endp

align 10h



; int __stdcall	sub_7564D0(int,	float, float, int)
sub_7564D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
fld	[esp+arg_4]
fstp	dword ptr [eax]
fld	[esp+arg_8]
fstp	dword ptr [eax+4]
retn	10h
sub_7564D0 endp

align 10h



; int __stdcall	sub_7564F0(int,	float, float)
sub_7564F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
fld	[esp+arg_4]
fstp	dword ptr [eax]
fld	[esp+arg_8]
fstp	dword ptr [eax+4]
retn	0Ch
sub_7564F0 endp

align 10h



sub_756510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
fld	dword ptr [eax]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_8]
fstp	dword ptr [ecx]
fld	dword ptr [eax+4]
fstp	dword ptr [edx]
retn	0Ch
sub_756510 endp

align 10h



; int __stdcall	sub_756530(int,	float, float, int)
sub_756530 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	[esp+arg_4]
push	esi
call	__ftol2_sse
fld	[esp+4+arg_8]
mov	esi, [esp+4+arg_0]
mov	[esi], ax
call	__ftol2_sse
mov	[esi+2], ax
mov	eax, [esp+4+arg_C]
mov	[esi+4], eax
pop	esi
retn	10h
sub_756530 endp

align 10h



; int __stdcall	sub_756560(int,	float, float)
sub_756560 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fld	[esp+arg_4]
push	esi
call	__ftol2_sse
fld	[esp+4+arg_8]
mov	esi, [esp+4+arg_0]
mov	[esi], ax
call	__ftol2_sse
mov	[esi+2], ax
pop	esi
retn	0Ch
sub_756560 endp

align 10h



sub_756590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
movsx	ecx, word ptr [eax]
mov	edx, [esp+arg_4]
mov	[esp+arg_0], ecx
mov	ecx, [esp+arg_8]
fild	[esp+arg_0]
fstp	dword ptr [edx]
movsx	eax, word ptr [eax+2]
mov	[esp+arg_0], eax
fild	[esp+arg_0]
fstp	dword ptr [ecx]
retn	0Ch
sub_756590 endp

align 10h



sub_7565C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
mov	[ecx+4], eax
retn	8
sub_7565C0 endp

align 10h



sub_7565D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+4]
retn	4
sub_7565D0 endp

align 10h



; int __stdcall	sub_7565E0(int,	float, float, int)
sub_7565E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

fld	[esp+arg_4]
push	esi
call	__ftol2_sse
fld	[esp+4+arg_8]
mov	esi, [esp+4+arg_0]
mov	[esi], ax
call	__ftol2_sse
mov	[esi+2], ax
mov	eax, [esp+4+arg_C]
mov	[esi+4], eax
mov	dword ptr [esi+8], 0
pop	esi
retn	10h
sub_7565E0 endp




sub_756610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
mov	[ecx+8], eax
retn	8
sub_756610 endp

align 10h



sub_756620 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+8]
retn	4
sub_756620 endp

align 10h



sub_756630 proc	near
mov	eax, [ecx+8]
test	eax, eax
jz	short locret_756645
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

locret_756645:
retn
sub_756630 endp

align 10h



sub_756650 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, ecx
jz	short loc_7566BE
mov	eax, [esi+0Ch]
cmp	dword ptr [eax], 0
jz	short loc_7566BE
cmp	edi, [esi+4]
jbe	short loc_7566BC
cmp	edi, ecx
jbe	short loc_7566BC
mov	eax, [eax+4]
mov	ecx, [esi+10h]
imul	eax, edi
mov	edx, [ecx]
push	ebx
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	ebx, eax
mov	eax, [esi+8]
test	eax, eax
jz	short loc_7566B5
test	ebx, ebx
jz	short loc_7566A4
mov	ecx, [esi+0Ch]
mov	edx, [ecx+4]
imul	edx, [esi]
push	edx
push	eax
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7566A4:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+8]
mov	eax, [eax+30h]
push	edx
call	eax

loc_7566B5:
mov	[esi+8], ebx
mov	[esi+4], edi
pop	ebx

loc_7566BC:
mov	[esi], edi

loc_7566BE:
pop	edi
pop	esi
retn	4
sub_756650 endp

align 10h



sub_7566D0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, ecx
mov	edx, [esi+4]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, edx
jz	short loc_756753
mov	ecx, [esi+0Ch]
cmp	dword ptr [ecx], 0
jz	short loc_756753
mov	eax, [esi]
cmp	edi, eax
jnb	short loc_7566EF
mov	edi, eax

loc_7566EF:
cmp	edi, edx
ja	short loc_7566FE
cmp	[esp+8+arg_4], 0
jz	short loc_756753
cmp	edx, edi
jz	short loc_756753

loc_7566FE:
push	ebx
test	edi, edi
jz	short loc_75671A
mov	eax, [ecx+4]
mov	ecx, [esi+10h]
imul	eax, edi
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	ebx, eax
jmp	short loc_75671C

loc_75671A:
xor	ebx, ebx

loc_75671C:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_75674C
test	ebx, ebx
jz	short loc_75673B
mov	ecx, [esi+0Ch]
mov	edx, [ecx+4]
imul	edx, [esi]
push	edx
push	eax
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_75673B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+8]
mov	eax, [eax+30h]
push	edx
call	eax

loc_75674C:
mov	[esi+8], ebx
mov	[esi+4], edi
pop	ebx

loc_756753:
pop	edi
pop	esi
retn	8
sub_7566D0 endp

align 10h



sub_756760 proc	near
push	esi
push	0
mov	esi, ecx
call	sub_756650
push	1
push	0
mov	ecx, esi
call	sub_7566D0
pop	esi
retn
sub_756760 endp

align 10h



sub_756780 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	eax, [eax]
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi+0Ch]
cmp	eax, [ecx]
jnz	short loc_7567DC
test	eax, eax
jz	short loc_7567DC
mov	edx, [edi]
add	edx, [esi]
push	0
push	edx
mov	ecx, esi
call	sub_7566D0
mov	eax, [edi]
mov	ecx, [esi]
add	eax, ecx
cmp	[esi+4], eax
jb	short loc_7567DC
mov	[esi], eax
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7567DC
mov	edx, [esi+0Ch]
mov	edx, [edx+4]
mov	edi, [edi+8]
push	ebx
mov	ebx, edx
sub	eax, ecx
imul	ebx, ecx
imul	eax, edx
add	eax, [esi+8]
push	ebx
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	ebx

loc_7567DC:
pop	edi
pop	esi
retn	4
sub_756780 endp

align 10h



sub_7567F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	esi
mov	eax, ecx
mov	esi, [eax+0Ch]
mov	esi, [esi]
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx]
mov	edx, [edx+6Ch]
push	esi
mov	esi, [eax]
mov	eax, [eax+8]
push	esi
push	eax
call	edx
pop	esi
retn	8
sub_7567F0 endp

align 10h



sub_756820 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
cmp	[esi+4], eax
ja	short loc_756835
push	0
add	eax, 10h
push	eax
call	sub_7566D0

loc_756835:
mov	eax, [esi]
cmp	[esi+4], eax
jbe	short loc_75685C
mov	ecx, [esi+0Ch]
inc	eax
mov	[esi], eax
dec	eax
mov	edx, eax
imul	edx, [ecx+4]
add	edx, [esi+8]
mov	eax, [esp+4+arg_0]
mov	ecx, [ecx+8]
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	4

loc_75685C:
mov	eax, 1
test	byte ptr dword_1856620,	al
jnz	short loc_756886
or	dword_1856620, eax
push	offset sub_14195E0 ; void (__cdecl *)()
mov	dword_185661C, offset off_1441148
call	_atexit
add	esp, 4

loc_756886:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], offset dword_185661C
pop	esi
retn	4
sub_756820 endp

align 10h



sub_7568A0 proc	near

arg_0= dword ptr  4

mov	eax, 1
test	byte ptr dword_1856638,	al
jnz	short loc_7568CA
or	dword_1856638, eax
push	offset sub_14195D0 ; void (__cdecl *)()
mov	dword_1856634, offset off_1441148
call	_atexit
add	esp, 4

loc_7568CA:
mov	eax, 2
test	byte ptr dword_1856638,	al
jnz	short loc_7568F4
or	dword_1856638, eax
push	offset sub_1419620 ; void (__cdecl *)()
mov	dword_1856630, offset off_1441168
call	_atexit
add	esp, 4

loc_7568F4:
test	byte ptr dword_1856638,	4
jnz	short loc_75691B
or	dword_1856638, 4
push	offset sub_1419610 ; void (__cdecl *)()
mov	dword_185662C, offset off_1441188
call	_atexit
add	esp, 4

loc_75691B:
mov	eax, 8
test	byte ptr dword_1856638,	al
jnz	short loc_756945
or	dword_1856638, eax
push	offset sub_1419600 ; void (__cdecl *)()
mov	dword_1856628, offset off_14411A8
call	_atexit
add	esp, 4

loc_756945:
mov	eax, 10h
test	byte ptr dword_1856638,	al
jnz	short loc_75696F
or	dword_1856638, eax
push	offset sub_14195F0 ; void (__cdecl *)()
mov	dword_1856624, offset off_14411C8
call	_atexit
add	esp, 4

loc_75696F:
mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short loc_75699F ; default
			; jumptable 00756978 case 0
jmp	ds:off_7569A8[eax*4] ; switch jump

loc_75697F:		; jumptable 00756978 case 1
mov	eax, offset unk_167E280
retn	4

loc_756987:		; jumptable 00756978 case 2
mov	eax, offset unk_167E28C
retn	4

loc_75698F:		; jumptable 00756978 case 3
mov	eax, offset unk_167E298
retn	4

loc_756997:		; jumptable 00756978 case 4
mov	eax, offset unk_167E2A4
retn	4

loc_75699F:		; default
mov	eax, offset unk_167E274	; jumptable 00756978 case 0
retn	4
sub_7568A0 endp

align 4
off_7569A8 dd offset loc_75699F	; jump table for switch	statement
dd offset loc_75697F
dd offset loc_756987
dd offset loc_75698F
dd offset loc_756997
align 10h



sub_7569C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
test	eax, eax
jnz	short loc_7569D9
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx

loc_7569D9:
mov	[esi+10h], eax
mov	eax, [esp+4+arg_4]
push	eax
mov	ecx, esi
mov	dword ptr [esi+4], 0
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 0
call	sub_7568A0
mov	ecx, [esp+4+arg_8]
push	ecx
mov	ecx, esi
mov	[esi+0Ch], eax
call	sub_756650
mov	eax, esi
pop	esi
retn	0Ch
sub_7569C0 endp

align 10h



sub_756A20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi], 0
jz	short loc_756A2E
xor	al, al
pop	esi
retn	4

loc_756A2E:
mov	eax, [esi+0Ch]
mov	ecx, [esp+4+arg_0]
push	edi
mov	edi, [eax+4]
imul	edi, [esi+4]
push	ecx
mov	ecx, esi
call	sub_7568A0
mov	ecx, eax
mov	eax, edi
mov	[esi+0Ch], ecx
xor	edx, edx
div	dword ptr [ecx+4]
pop	edi
mov	[esi+4], eax
mov	al, 1
pop	esi
retn	4
sub_756A20 endp

align 10h



sub_756A60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+4]
test	eax, eax
jz	short loc_756A6F
mov	eax, [eax+10h]
retn

loc_756A6F:
xor	eax, eax
retn
sub_756A60 endp

align 10h



sub_756A80 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	eax, [ecx+28h]
retn
sub_756A80 endp

align 10h



sub_756A90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
fld	dword ptr [eax+4]
mov	ecx, [esp+arg_4]
fld	dword ptr [ecx+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_756AAD
mov	eax, 1
retn

loc_756AAD:
xor	eax, eax
retn
sub_756A90 endp




sub_756AB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax+10h]
mov	edx, [esp+arg_4]
cmp	ecx, [edx+10h]
sbb	eax, eax
neg	eax
retn
sub_756AB0 endp

align 10h



sub_756AD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
fld	dword ptr [eax+8]
mov	ecx, [esp+arg_4]
fld	dword ptr [ecx+8]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_756AED
mov	eax, 1
retn

loc_756AED:
xor	eax, eax
retn
sub_756AD0 endp




sub_756AF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
fld	dword ptr [eax]
fsub	dword ptr [ecx]
fstp	[esp+arg_0]
fld	dword ptr [eax+4]
fsub	dword ptr [ecx+4]
fstp	[esp+arg_4]
fld	[esp+arg_4]
fld	[esp+arg_0]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+arg_4]
fld	[esp+arg_4]
retn
sub_756AF0 endp

align 10h



sub_756B30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	byte ptr [esi+20h], 0
test	eax, eax
jz	short loc_756B8D
lea	ecx, [eax-1]
mov	eax, [esi+18h]
mov	[esi+14h], eax
mov	eax, [esi+4]
push	ebx
lea	edx, [eax+1]
push	edi
mov	edi, [esi]
mov	[esi+8], ecx
mov	[esi+4], edx
mov	ebx, [edi]
lea	eax, [eax+eax*2]
lea	eax, [ebx+eax*4]
mov	[esi+10h], eax
test	ecx, ecx
jz	short loc_756B71
lea	ecx, [edx+edx*2]
mov	edx, [edi]
mov	eax, [edx+ecx*4+8]
jmp	short loc_756B74

loc_756B71:
mov	eax, [esi+0Ch]

loc_756B74:
mov	[esi+18h], eax
mov	eax, [esi+10h]
push	eax
call	[esp+10h+arg_0]
add	esp, 4
pop	edi
mov	[esi+1Ch], eax
pop	ebx
mov	al, 1
pop	esi
retn	4

loc_756B8D:
xor	al, al
pop	esi
retn	4
sub_756B30 endp

align 10h



sub_756BA0 proc	near

var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
sub	esp, 150h
push	ebx
mov	ebx, [esp+154h+arg_4]
mov	ecx, eax
sub	ecx, ebx
cmp	ecx, 2
jb	loc_756DD1
push	ebp
mov	ebp, [esp+158h+arg_C]
push	esi
mov	esi, [esp+15Ch+arg_0]
lea	ecx, [esp+15Ch+var_140]
mov	[esp+15Ch+var_150], ebx
push	edi

loc_756BD8:
mov	[esp+160h+var_14C], eax
mov	[esp+160h+var_148], ecx

loc_756BE0:
mov	edx, [esp+160h+var_14C]
mov	eax, edx
sub	eax, ebx
cmp	eax, 9
jle	loc_756D45
mov	edi, [esi]
cdq
sub	eax, edx
mov	edx, [edi+ebx*4]
sar	eax, 1
add	eax, ebx
mov	ecx, [edi+eax*4]
lea	eax, [edi+eax*4]
mov	[edi+ebx*4], ecx
mov	edi, [esp+160h+var_14C]
mov	[eax], edx
mov	eax, [esi]
mov	edx, [eax+ebx*4+4]
mov	eax, [eax+edi*4-4]
inc	ebx
dec	edi
push	edx
push	eax
call	ebp
add	esp, 8
test	al, al
jz	short loc_756C31
mov	eax, [esi]
mov	edx, [eax+ebx*4]
mov	ecx, [eax+edi*4]
mov	[eax+edi*4], edx
mov	[eax+ebx*4], ecx

loc_756C31:
mov	eax, [esi]
mov	ecx, [eax+ebx*4]
mov	edx, [esp+160h+var_150]
mov	eax, [eax+edx*4]
push	ecx
push	eax
call	ebp
add	esp, 8
test	al, al
jz	short loc_756C62
mov	eax, [esi]
mov	ecx, [esp+160h+var_150]
mov	edx, [eax+ecx*4]
mov	[esp+160h+var_144], edx
mov	edx, [eax+ebx*4]
mov	[eax+ecx*4], edx
mov	ecx, [esp+160h+var_144]
mov	[eax+ebx*4], ecx

loc_756C62:
mov	eax, [esi]
mov	edx, [esp+160h+var_150]
mov	ecx, [eax+edx*4]
mov	edx, [eax+edi*4]
push	ecx
push	edx
call	ebp
add	esp, 8
test	al, al
jz	short loc_756C93
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	[esp+160h+var_144], ecx
mov	ecx, [esp+160h+var_150]
mov	edx, [eax+ecx*4]
mov	[eax+edi*4], edx
mov	edx, [esp+160h+var_144]
mov	[eax+ecx*4], edx

loc_756C93:
mov	eax, [esi]
mov	ecx, [esp+160h+var_150]
mov	edx, [eax+ecx*4]
mov	eax, [eax+ebx*4+4]
inc	ebx
push	edx
push	eax
call	ebp
add	esp, 8
test	al, al
jnz	short loc_756C93
lea	esp, [esp+0]

loc_756CB0:
mov	eax, [esi]
mov	ecx, [eax+edi*4-4]
mov	edx, [esp+160h+var_150]
mov	eax, [eax+edx*4]
dec	edi
push	ecx
push	eax
call	ebp
add	esp, 8
test	al, al
jnz	short loc_756CB0
cmp	ebx, edi
mov	eax, [esi]
jg	short loc_756CDD
mov	edx, [eax+edi*4]
mov	ecx, [eax+ebx*4]
mov	[eax+ebx*4], edx
mov	[eax+edi*4], ecx
jmp	short loc_756C93

loc_756CDD:
mov	ecx, [esp+160h+var_150]
mov	edx, [eax+ecx*4]
mov	[esp+160h+var_144], edx
mov	edx, [eax+edi*4]
mov	[eax+ecx*4], edx
mov	ecx, [esp+160h+var_144]
mov	edx, [esp+160h+var_14C]
mov	[eax+edi*4], ecx
mov	eax, [esp+160h+var_150]
mov	ecx, edi
sub	edx, ebx
sub	ecx, eax
cmp	ecx, edx
jle	short loc_756D22
mov	ecx, [esp+160h+var_148]
add	[esp+160h+var_148], 8
mov	[ecx], eax
mov	[ecx+4], edi
mov	ecx, [esp+160h+var_148]
mov	[esp+160h+var_150], ebx
jmp	loc_756BE0

loc_756D22:
mov	eax, [esp+160h+var_148]
mov	edx, [esp+160h+var_14C]
add	[esp+160h+var_148], 8
mov	ecx, [esp+160h+var_148]
mov	[eax], ebx
mov	ebx, [esp+160h+var_150]
mov	[eax+4], edx
mov	[esp+160h+var_14C], edi
jmp	loc_756BE0

loc_756D45:
lea	eax, [ebx+1]
cmp	eax, edx
mov	edi, ebx
mov	[esp+160h+var_150], eax
jge	short loc_756DB2

loc_756D52:
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	edx, [eax+edi*4+4]
lea	eax, [eax+edi*4]
push	ecx
push	edx
call	ebp
add	esp, 8
test	al, al
jz	short loc_756D9D
lea	esp, [esp+0]

loc_756D70:
mov	eax, [esi]
mov	edx, [eax+edi*4]
mov	ecx, [eax+edi*4+4]
lea	eax, [eax+edi*4]
mov	[eax+4], edx
mov	[eax], ecx
cmp	edi, ebx
jz	short loc_756D9D
mov	eax, [esi]
dec	edi
mov	ecx, [eax+edi*4]
mov	edx, [eax+edi*4+4]
lea	eax, [eax+edi*4]
push	ecx
push	edx
call	ebp
add	esp, 8
test	al, al
jnz	short loc_756D70

loc_756D9D:
mov	eax, [esp+160h+var_150]
mov	edi, eax
inc	eax
cmp	eax, [esp+160h+var_14C]
mov	[esp+160h+var_150], eax
jl	short loc_756D52
mov	ecx, [esp+160h+var_148]

loc_756DB2:
lea	eax, [esp+160h+var_140]
cmp	ecx, eax
jbe	short loc_756DCE
mov	edx, [ecx-8]
mov	eax, [ecx-4]
sub	ecx, 8
mov	[esp+160h+var_150], edx
mov	ebx, edx
jmp	loc_756BD8

loc_756DCE:
pop	edi
pop	esi
pop	ebp

loc_756DD1:
pop	ebx
add	esp, 150h
retn
sub_756BA0 endp

align 10h



sub_756DE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+3Ch]
mov	ecx, [esp+arg_0]
push	esi
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [edx+eax*4]
mov	esi, ecx
and	esi, 3FFh
cmp	ecx, [esp+4+arg_4]
fld	dword ptr [eax+esi*8+4]
fstp	[esp+4+arg_0]
jg	short loc_756E30
lea	eax, [ecx+1]
mov	ecx, eax
shr	ecx, 0Ah
mov	edx, [edx+ecx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
fld	[esp+4+arg_0]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_756E7B
mov	eax, 1
pop	esi
retn	8

loc_756E30:
lea	eax, [ecx-1]
mov	esi, eax
shr	esi, 0Ah
mov	esi, [edx+esi*4]
and	eax, 3FFh
fld	dword ptr [esi+eax*8+4]
fld	[esp+4+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jp	short loc_756E79
lea	eax, [ecx+1]
mov	ecx, eax
shr	ecx, 0Ah
mov	edx, [edx+ecx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_756E7B
mov	eax, 1
pop	esi
retn	8

loc_756E79:
fstp	st

loc_756E7B:
xor	eax, eax
pop	esi
retn	8
sub_756DE0 endp

align 10h



sub_756E90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+3Ch]
mov	ecx, [esp+arg_0]
push	esi
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [edx+eax*4]
mov	esi, ecx
and	esi, 3FFh
cmp	ecx, [esp+4+arg_4]
fld	dword ptr [eax+esi*8+4]
fstp	[esp+4+arg_0]
lea	eax, [ecx-1]
jl	short loc_756EE0
mov	ecx, eax
shr	ecx, 0Ah
mov	edx, [edx+ecx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
fld	[esp+4+arg_0]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_756F28
mov	eax, 1
pop	esi
retn	8

loc_756EE0:
mov	esi, eax
shr	esi, 0Ah
mov	esi, [edx+esi*4]
and	eax, 3FFh
fld	dword ptr [esi+eax*8+4]
fld	[esp+4+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_756F26
lea	eax, [ecx+1]
mov	ecx, eax
shr	ecx, 0Ah
mov	edx, [edx+ecx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_756F28
mov	eax, 1
pop	esi
retn	8

loc_756F26:
fstp	st

loc_756F28:
xor	eax, eax
pop	esi
retn	8
sub_756E90 endp

align 10h



sub_756F30 proc	near
mov	eax, [ecx+0DCh]
mov	edx, [ecx+0D8h]
cmp	eax, edx
jb	short loc_756F5D
mov	ecx, [ecx+0CCh]
lea	ecx, [ecx+eax*4]
lea	esp, [esp+0]

loc_756F50:
cmp	dword ptr [ecx], 0
jnz	short locret_756F5F
dec	eax
sub	ecx, 4
cmp	eax, edx
jnb	short loc_756F50

loc_756F5D:
xor	eax, eax

locret_756F5F:
retn
sub_756F30 endp




sub_756F60 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	edi
mov	edi, ecx
mov	eax, [edi+0CCh]
mov	dword ptr [eax], 0
mov	eax, [edi+0D8h]
cmp	eax, [edi+0DCh]
ja	short loc_756F96
nop

loc_756F80:
mov	ecx, [edi+0CCh]
mov	dword ptr [ecx+eax*4], 0
inc	eax
cmp	eax, [edi+0DCh]
jbe	short loc_756F80

loc_756F96:
mov	eax, [esp+0Ch+arg_0]
xor	ebx, ebx
xor	ebp, ebp
cmp	[eax+4], ebx
jbe	short loc_75700E
push	esi

loc_756FA4:
mov	edx, [eax]
mov	esi, [edx+ebx*4]
and	dword ptr [esi+2Ch], 0FFFFFFFBh
test	byte ptr [esi+2Ch], 2
jnz	short loc_757007
cmp	dword ptr [edi], 0
mov	eax, [esi+14h]
mov	edx, [edi+0CCh]
mov	ecx, [esi+18h]
lea	eax, [edx+eax*4]
jnz	short loc_756FDC
mov	edx, [esi+10h]
add	[eax], edx
mov	eax, [edi+0CCh]
lea	eax, [eax+ecx*4]
mov	ecx, [esi+10h]
sub	[eax], ecx
jmp	short loc_756FEC

loc_756FDC:
xor	dword ptr [eax], 1
mov	eax, [edi+0CCh]
xor	dword ptr [eax+ecx*4], 1
lea	eax, [eax+ecx*4]

loc_756FEC:
mov	ecx, edi
call	sub_756F30
mov	[esi+28h], eax
mov	[esi+20h], ebp
cmp	ebp, eax
jz	short loc_757001
or	dword ptr [esi+2Ch], 4

loc_757001:
mov	ebp, eax
mov	eax, [esp+10h+arg_0]

loc_757007:
inc	ebx
cmp	ebx, [eax+4]
jb	short loc_756FA4
pop	esi

loc_75700E:
pop	edi
pop	ebp
pop	ebx
retn	4
sub_756F60 endp

align 10h



sub_757020 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
cmp	edx, [esp+arg_4]
jnb	short locret_757096
push	ebx
push	ebp
push	esi
push	edi
mov	edi, edi

loc_757030:
mov	edi, [ecx+0C8h]
mov	esi, edx
shr	esi, 6
mov	esi, [edi+esi*4]
mov	edi, [ecx+98h]
mov	eax, edx
and	eax, 3Fh
lea	eax, [eax+eax*2]
mov	ebx, [esi+eax*4+4]
mov	ebp, [esi+eax*4]
lea	eax, [esi+eax*4]
mov	esi, [ecx+0B0h]
mov	ebx, [esi+ebx*4]
mov	esi, [esi+ebp*4]
mov	ebp, [edi+ebx*4]
lea	ebx, [edi+ebx*4]
lea	esi, [edi+esi*4]
mov	edi, [esi]
mov	[esi], ebp
mov	[ebx], edi
mov	esi, [ecx+0B0h]
mov	edi, [eax+4]
mov	eax, [eax]
mov	ebx, [esi+edi*4]
lea	edi, [esi+edi*4]
lea	eax, [esi+eax*4]
mov	esi, [eax]
inc	edx
mov	[eax], ebx
mov	[edi], esi
cmp	edx, [esp+10h+arg_4]
jb	short loc_757030
pop	edi
pop	esi
pop	ebp
pop	ebx

locret_757096:
retn	8
sub_757020 endp

align 10h



sub_7570A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [ecx+110h]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
and	eax, 0BFFFFFFFh
push	edi
mov	edi, eax
shr	edi, 0Ah
mov	edi, [ecx+edi*4]
and	eax, 3FFh
lea	edi, [edi+eax*8]
and	edx, 0BFFFFFFFh
mov	eax, edx
shr	eax, 0Ah
mov	eax, [ecx+eax*4]
and	edx, 3FFh
fld	dword ptr [eax+edx*8+4]
lea	eax, [eax+edx*8]
and	esi, 0BFFFFFFFh
mov	edx, esi
shr	edx, 0Ah
mov	ecx, [ecx+edx*4]
and	esi, 3FFh
fsub	dword ptr [ecx+esi*8+4]
lea	ecx, [ecx+esi*8]
fld	dword ptr [edi]
fsub	dword ptr [eax]
fmulp	st(1), st
fld	dword ptr [edi+4]
pop	edi
fsub	dword ptr [eax+4]
pop	esi
fld	dword ptr [eax]
fsub	dword ptr [ecx]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+arg_8]
fld	[esp+arg_8]
retn	0Ch
sub_7570A0 endp




sub_757120 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
mov	eax, [esp+14h+arg_0]
push	ebx
mov	ebx, eax
and	eax, 0BFFFFFFFh
push	ebp
mov	edx, eax
push	esi
mov	esi, [ecx+110h]
shr	ebx, 1Eh
shr	edx, 0Ah
mov	edx, [esi+edx*4]
and	bl, 1
and	eax, 3FFh
push	edi
mov	byte ptr [esp+24h+arg_0], bl
lea	edi, [edx+eax*8]
test	bl, bl
jz	loc_757257
mov	eax, [ecx+194h]
cmp	eax, 2
jb	loc_7571F9
mov	edx, [ecx+1A0h]
add	eax, 0FFFFFFFEh
mov	ebp, eax
and	eax, 0FFh
shr	ebp, 8
mov	ebp, [edx+ebp*4]
mov	eax, [ebp+eax*4+0]
mov	ebp, eax
and	eax, 3FFh
shr	ebp, 0Ah
mov	ebp, [esi+ebp*4]
lea	eax, [ebp+eax*8+0]
mov	[esp+24h+arg_0], eax
mov	eax, [ecx+194h]
dec	eax
mov	ebp, eax
and	eax, 0FFh
shr	ebp, 8
mov	edx, [edx+ebp*4]
mov	eax, [edx+eax*4]
mov	edx, eax
shr	edx, 0Ah
mov	edx, [esi+edx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
lea	eax, [edx+eax*8]
mov	edx, [esp+24h+arg_0]
fsub	dword ptr [edx+4]
fld	dword ptr [edi]
fsub	dword ptr [eax]
fmulp	st(1), st
fld	dword ptr [edi+4]
fsub	dword ptr [eax+4]
fld	dword ptr [eax]
fsub	dword ptr [edx]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+24h+var_14]
fldz
fld	st
fld	[esp+24h+var_14]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_757205

loc_7571F5:
fstp	st(1)

loc_7571F7:
fstp	st

loc_7571F9:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn	4

loc_757205:
mov	edx, [ecx+1CCh]
fcomp	st(1)
fnstsw	ax
test	edx, edx
jnz	short loc_75722B
test	ah, 5
lea	eax, [edx+3]
jnp	short loc_757220
mov	eax, 4

loc_757220:
mov	[ecx+1CCh], eax
jmp	loc_75732C

loc_75722B:
test	ah, 5
jp	short loc_757237
mov	ebp, 1
jmp	short loc_757239

loc_757237:
xor	ebp, ebp

loc_757239:
xor	eax, eax
cmp	edx, 3
setz	al
cmp	eax, ebp
jz	loc_75732C

loc_757249:
pop	edi
fstp	st
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 14h
retn	4

loc_757257:
mov	ebx, [ecx+1A4h]
cmp	ebx, 2
jb	short loc_7571F9
mov	edx, [ecx+1B0h]
lea	eax, [ebx-2]
mov	ebp, eax
and	eax, 0FFh
shr	ebp, 8
mov	ebp, [edx+ebp*4]
mov	eax, [ebp+eax*4+0]
mov	ebp, eax
and	eax, 3FFh
shr	ebp, 0Ah
mov	ebp, [esi+ebp*4]
lea	ebp, [ebp+eax*8+0]
lea	eax, [ebx-1]
mov	ebx, eax
and	eax, 0FFh
shr	ebx, 8
mov	edx, [edx+ebx*4]
mov	eax, [edx+eax*4]
mov	edx, eax
shr	edx, 0Ah
mov	edx, [esi+edx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
lea	eax, [edx+eax*8]
fsub	dword ptr [ebp+4]
fld	dword ptr [edi]
fsub	dword ptr [eax]
fmulp	st(1), st
fld	dword ptr [edi+4]
fsub	dword ptr [eax+4]
fld	dword ptr [eax]
fsub	dword ptr [ebp+0]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+24h+var_14]
fldz
fld	st
fld	[esp+24h+var_14]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	loc_7571F5
mov	ebp, [ecx+1D0h]
fcomp	st(1)
fnstsw	ax
test	ebp, ebp
jnz	short loc_75730A
test	ah, 5
lea	eax, [ebp+3]
jnp	short loc_757302
mov	eax, 4

loc_757302:
mov	[ecx+1D0h], eax
jmp	short loc_757328

loc_75730A:
test	ah, 5
jp	short loc_757316
mov	eax, 1
jmp	short loc_757318

loc_757316:
xor	eax, eax

loc_757318:
xor	edx, edx
cmp	ebp, 3
setz	dl
cmp	edx, eax
jnz	loc_757249

loc_757328:
mov	bl, byte ptr [esp+24h+arg_0]

loc_75732C:
cmp	dword ptr [ecx+1C8h], 0
jnz	short loc_757387
mov	eax, [ecx+1CCh]
test	eax, eax
jz	short loc_757387
mov	ebp, [ecx+1D0h]
test	ebp, ebp
jz	short loc_757387
xor	edx, edx
cmp	eax, 4
setz	dl
xor	eax, eax
mov	[esp+24h+var_10], 3
mov	[esp+24h+var_C], 1
mov	[esp+24h+var_8], 2
mov	[esp+24h+var_4], 4
add	edx, edx
cmp	ebp, 4
setz	al
or	edx, eax
mov	edx, [esp+edx*4+24h+var_10]
mov	[ecx+1C8h], edx

loc_757387:
mov	eax, [ecx+1C8h]
sub	eax, 2
jz	loc_7574D4
sub	eax, 1
jz	loc_75743E
sub	eax, 1
jnz	loc_7571F7
mov	edx, [ecx+194h]
mov	ecx, [ecx+1A0h]
lea	eax, [edx-2]
mov	ebp, eax
shr	ebp, 8
mov	ebp, [ecx+ebp*4]
and	eax, 0FFh
mov	eax, [ebp+eax*4+0]
mov	ebp, eax
and	eax, 3FFh
shr	ebp, 0Ah
mov	ebp, [esi+ebp*4]
lea	ebp, [ebp+eax*8+0]
lea	eax, [edx-1]
mov	edx, eax
shr	edx, 8
mov	ecx, [ecx+edx*4]
and	eax, 0FFh
mov	eax, [ecx+eax*4]
mov	edx, eax
shr	edx, 0Ah
mov	ecx, [esi+edx*4]
and	eax, 3FFh
lea	eax, [ecx+eax*8]
test	bl, bl
jnz	loc_7571F7
fld	dword ptr [eax+4]
fsub	dword ptr [ebp+4]
fld	dword ptr [edi]
fsub	dword ptr [eax]
fmulp	st(1), st
fld	dword ptr [edi+4]
fsub	dword ptr [eax+4]
fld	dword ptr [eax]
fsub	dword ptr [ebp+0]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+24h+arg_0]
fcomp	[esp+24h+arg_0]
fnstsw	ax
test	ah, 41h
jnz	loc_7571F9
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 14h
retn	4

loc_75743E:
mov	edx, [ecx+1A4h]
mov	ecx, [ecx+1B0h]
lea	eax, [edx-2]
mov	ebp, eax
shr	ebp, 8
mov	ebp, [ecx+ebp*4]
and	eax, 0FFh
mov	eax, [ebp+eax*4+0]
mov	ebp, eax
and	eax, 3FFh
shr	ebp, 0Ah
mov	ebp, [esi+ebp*4]
lea	ebp, [ebp+eax*8+0]
lea	eax, [edx-1]
mov	edx, eax
shr	edx, 8
mov	ecx, [ecx+edx*4]
and	eax, 0FFh
mov	eax, [ecx+eax*4]
mov	edx, eax
shr	edx, 0Ah
mov	ecx, [esi+edx*4]
and	eax, 3FFh
lea	eax, [ecx+eax*8]
test	bl, bl
jz	loc_7571F7
fld	dword ptr [eax+4]
fsub	dword ptr [ebp+4]
fld	dword ptr [edi]
fsub	dword ptr [eax]
fmulp	st(1), st
fld	dword ptr [edi+4]
fsub	dword ptr [eax+4]
fld	dword ptr [eax]
fsub	dword ptr [ebp+0]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+24h+arg_0]
fcomp	[esp+24h+arg_0]
fnstsw	ax
test	ah, 5
jp	loc_7571F9
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 14h
retn	4

loc_7574D4:
test	bl, bl
jz	loc_757568
mov	edx, [ecx+1A4h]
mov	ecx, [ecx+1B0h]
lea	eax, [edx-2]
mov	ebx, eax
and	eax, 0FFh
shr	ebx, 8
mov	ebx, [ecx+ebx*4]
mov	eax, [ebx+eax*4]
mov	ebx, eax
and	eax, 3FFh
shr	ebx, 0Ah
mov	ebx, [esi+ebx*4]
lea	ebx, [ebx+eax*8]
lea	eax, [edx-1]
mov	edx, eax
shr	edx, 8
mov	ecx, [ecx+edx*4]
and	eax, 0FFh
mov	eax, [ecx+eax*4]
mov	edx, eax
shr	edx, 0Ah
mov	ecx, [esi+edx*4]
and	eax, 3FFh
fld	dword ptr [ecx+eax*8+4]
lea	eax, [ecx+eax*8]
fsub	dword ptr [ebx+4]
fld	dword ptr [edi]
fsub	dword ptr [eax]
fmulp	st(1), st
fld	dword ptr [edi+4]
fsub	dword ptr [eax+4]
fld	dword ptr [eax]
fsub	dword ptr [ebx]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+24h+arg_0]
fcomp	[esp+24h+arg_0]
fnstsw	ax
test	ah, 5
jp	loc_7571F9
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 14h
retn	4

loc_757568:
mov	edx, [ecx+194h]
mov	ecx, [ecx+1A0h]
lea	eax, [edx-2]
mov	ebx, eax
and	eax, 0FFh
shr	ebx, 8
mov	ebx, [ecx+ebx*4]
mov	eax, [ebx+eax*4]
mov	ebx, eax
and	eax, 3FFh
shr	ebx, 0Ah
mov	ebx, [esi+ebx*4]
lea	ebx, [ebx+eax*8]
lea	eax, [edx-1]
mov	edx, eax
shr	edx, 8
mov	ecx, [ecx+edx*4]
and	eax, 0FFh
mov	eax, [ecx+eax*4]
mov	edx, eax
shr	edx, 0Ah
mov	ecx, [esi+edx*4]
and	eax, 3FFh
fld	dword ptr [ecx+eax*8+4]
lea	eax, [ecx+eax*8]
fsub	dword ptr [ebx+4]
fld	dword ptr [edi]
fsub	dword ptr [eax]
fmulp	st(1), st
fld	dword ptr [edi+4]
fsub	dword ptr [eax+4]
fld	dword ptr [eax]
fsub	dword ptr [ebx]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+24h+arg_0]
fcomp	[esp+24h+arg_0]
fnstsw	ax
test	ah, 41h
jnz	loc_7571F9
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 14h
retn	4
sub_757120 endp

align 10h



sub_757600 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 34h
push	ebx
push	ebp
push	esi
push	edi
mov	[esp+44h+var_14], ecx
mov	edx, [esp+44h+arg_4]
mov	eax, [esp+44h+arg_0]
mov	eax, [eax]
mov	esi, [edx]
mov	edi, [ecx+1B4h]
mov	ebp, esi
shr	ebp, 8
mov	[esp+44h+var_18], edi
mov	edi, [ecx+1C0h]
mov	ebp, [edi+ebp*4]
mov	ebx, esi
and	esi, 0FFh
mov	esi, [ebp+esi*4+0]
mov	ebp, eax
shr	ebp, 8
mov	edi, [edi+ebp*4]
mov	edx, eax
and	eax, 0FFh
mov	eax, [edi+eax*4]
mov	edi, [ecx+110h]
mov	ebp, esi
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
and	esi, 3FFh
fld	dword ptr [ebp+esi*8+0]
lea	esi, [ebp+esi*8+0]
mov	ebp, eax
shr	ebp, 0Ah
mov	edi, [edi+ebp*4]
and	eax, 3FFh
fsub	dword ptr [edi+eax*8]
lea	eax, [edi+eax*8]
mov	[esp+44h+var_28], edx
fstp	[esp+44h+var_20]
mov	[esp+44h+var_2C], ebx
fld	dword ptr [esi+4]
mov	[esp+44h+var_24], 0
fsub	dword ptr [eax+4]
mov	eax, [esp+44h+var_18]
fstp	[esp+44h+var_1C]
fld	[esp+44h+var_1C]
fld	[esp+44h+var_20]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+44h+var_1C]
test	eax, eax
jbe	loc_7578B2
jmp	short loc_7576C4
align 10h

loc_7576C0:
mov	ecx, [esp+44h+var_14]

loc_7576C4:
lea	ebp, [edx+1]
lea	esi, [ebx+1]
mov	[esp+44h+var_20], ebp
mov	[esp+44h+var_30], esi
cmp	ebp, eax
jb	short loc_7576DC
sub	ebp, eax
mov	[esp+44h+var_20], ebp

loc_7576DC:
cmp	esi, eax
jb	short loc_7576E6
sub	esi, eax
mov	[esp+44h+var_30], esi

loc_7576E6:
mov	eax, [ecx+1C0h]
mov	esi, edx
and	edx, 0FFh
shr	esi, 8
mov	esi, [eax+esi*4]
mov	edx, [esi+edx*4]
mov	esi, [ecx+110h]
mov	ecx, edx
shr	ecx, 0Ah
mov	ecx, [esi+ecx*4]
and	edx, 3FFh
lea	edi, [ecx+edx*8]
mov	edx, ebx
shr	edx, 8
mov	ecx, [eax+edx*4]
and	ebx, 0FFh
mov	edx, [ecx+ebx*4]
mov	ecx, edx
shr	ecx, 0Ah
mov	ecx, [esi+ecx*4]
and	edx, 3FFh
lea	ebx, [ecx+edx*8]
fld	dword ptr [ebx]
mov	edx, ebp
shr	edx, 8
mov	ecx, [eax+edx*4]
and	ebp, 0FFh
mov	edx, [ecx+ebp*4]
mov	ecx, edx
shr	ecx, 0Ah
mov	ecx, [esi+ecx*4]
and	edx, 3FFh
fsub	dword ptr [ecx+edx*8]
lea	edx, [ecx+edx*8]
mov	ecx, [esp+44h+var_30]
mov	ebp, ecx
fstp	[esp+44h+var_8]
and	ecx, 0FFh
fld	dword ptr [ebx+4]
shr	ebp, 8
fsub	dword ptr [edx+4]
mov	eax, [eax+ebp*4]
mov	eax, [eax+ecx*4]
mov	ecx, eax
fstp	[esp+44h+var_C]
shr	ecx, 0Ah
mov	ecx, [esi+ecx*4]
and	eax, 3FFh
fld	dword ptr [ecx+eax*8]
lea	eax, [ecx+eax*8]
fsub	dword ptr [edi]
fstp	[esp+44h+var_10]
fld	dword ptr [eax+4]
fsub	dword ptr [edi+4]
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
fld	[esp+44h+var_10]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+44h+var_4]
fld	dword ptr [eax]
fsub	dword ptr [edx]
fstp	[esp+44h+var_34]
fld	dword ptr [eax+4]
fsub	dword ptr [edx+4]
fstp	[esp+44h+var_10]
fld	[esp+44h+var_10]
fld	[esp+44h+var_34]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+44h+var_10]
fld	[esp+44h+var_C]
fld	[esp+44h+var_8]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+44h+var_34]
xor	ecx, ecx
fld	[esp+44h+var_4]
fld	[esp+44h+var_34]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_757815
fstp	st
mov	ecx, 1
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
jmp	short loc_757817

loc_757815:
fstp	st(1)

loc_757817:
fld	[esp+44h+var_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_757835
fstp	st(1)
mov	ecx, 2
fstp	[esp+44h+var_34]
fld	[esp+44h+var_34]
jmp	short loc_757837

loc_757835:
fstp	st

loc_757837:
sub	ecx, 0
jz	short loc_757866
sub	ecx, 1
jz	short loc_75785C
sub	ecx, 1
jnz	short loc_757874
mov	edx, [esp+44h+var_20]
mov	ebx, [esp+44h+var_30]
inc	[esp+44h+var_24]
mov	[esp+44h+var_28], edx
mov	[esp+44h+var_2C], ebx
jmp	short loc_75787C

loc_75785C:
mov	ebx, [esp+44h+var_30]
mov	[esp+44h+var_2C], ebx
jmp	short loc_757878

loc_757866:
mov	edx, [esp+44h+var_20]
mov	ebx, [esp+44h+var_2C]
mov	[esp+44h+var_28], edx
jmp	short loc_75787C

loc_757874:
mov	ebx, [esp+44h+var_2C]

loc_757878:
mov	edx, [esp+44h+var_28]

loc_75787C:
fld	[esp+44h+var_1C]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_75789B
mov	eax, [esp+44h+arg_0]
fstp	[esp+44h+var_1C]
mov	ecx, [esp+44h+arg_4]
mov	[eax], edx
mov	[ecx], ebx
jmp	short loc_75789D

loc_75789B:
fstp	st

loc_75789D:
mov	ecx, [esp+44h+var_24]
mov	eax, [esp+44h+var_18]
inc	ecx
mov	[esp+44h+var_24], ecx
cmp	ecx, eax
jb	loc_7576C0

loc_7578B2:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	8
sub_757600 endp

align 10h



sub_7578C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_757919
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_757915
mov	ecx, dword_1855FC0
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_757915:
xor	eax, eax
mov	[esi], eax

loc_757919:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_7578C0 endp

align 10h



sub_757930 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_757990
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_75798C
mov	ecx, dword_1855FC0
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_75798C:
xor	eax, eax
mov	[esi], eax

loc_757990:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_757930 endp

align 10h



sub_7579A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_7579F8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_7579F4
mov	ecx, dword_1855FC0
lea	edi, [esp+8+arg_0]
mov	[esp+8+arg_0], 85h
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+28h]
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_7579F4:
xor	eax, eax
mov	[esi], eax

loc_7579F8:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_7579A0 endp

align 10h



sub_757A10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_757A6D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_757A69
mov	ecx, dword_1855FC0
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_757A69:
xor	eax, eax
mov	[esi], eax

loc_757A6D:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_757A10 endp

align 10h



sub_757A80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757AD1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757AB0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757ACA

loc_757AB0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757ACA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757AD1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	2000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757A80 endp

align 10h



sub_757B00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757B51
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757B30
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757B4A

loc_757B30:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757B4A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757B51:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	400h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757B00 endp

align 10h



sub_757B80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757BD1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757BB0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757BCA

loc_757BB0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757BCA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757BD1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	4000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757B80 endp

align 10h



sub_757C00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757C51
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757C30
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757C4A

loc_757C30:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757C4A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757C51:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0E00h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757C00 endp

align 10h



sub_757C80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757CD1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757CB0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757CCA

loc_757CB0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757CCA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757CD1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757C80 endp

align 10h



sub_757D00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757D51
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757D30
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757D4A

loc_757D30:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757D4A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757D51:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	300h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757D00 endp

align 10h



sub_757D80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757DCE
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757DB0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757DC7

loc_757DB0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_757DC7:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_757DCE:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1C0h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757D80 endp

align 10h



sub_757E00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757E4E
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757E30
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757E47

loc_757E30:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_757E47:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_757E4E:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	80h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757E00 endp

align 10h



sub_757E80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757ED1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757EB0
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757ECA

loc_757EB0:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757ECA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757ED1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	600h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757E80 endp

align 10h



sub_757F00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_757F51
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_757F30
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_757F4A

loc_757F30:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 85h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_757F4A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_757F51:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 85h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	3000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_757F00 endp

align 10h



sub_757F80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
xor	edx, edx
cmp	[ebp+4], edx
jbe	short loc_757FAE
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]

loc_757F92:
mov	esi, [edi+4]
mov	ecx, [edi]
mov	eax, [ebp+0]
add	ecx, esi
add	eax, edx
inc	esi
mov	[edi+4], esi
mov	al, [eax]
inc	edx
mov	[ecx], al
cmp	edx, [ebp+4]
jb	short loc_757F92
pop	edi
pop	esi

loc_757FAE:
pop	ebp
retn
sub_757F80 endp




sub_757FB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	byte ptr [esi+20h], 0
test	eax, eax
jz	short loc_758021
lea	edx, [eax-1]
mov	eax, [esi+18h]
push	ebx
mov	[esi+14h], eax
mov	eax, [esi+4]
push	ebp
lea	ecx, [eax+1]
mov	ebx, eax
push	edi
mov	edi, [esi]
mov	[esi+8], edx
mov	[esi+4], ecx
mov	ebp, [edi+0Ch]
shr	ebx, 4
mov	ebx, [ebp+ebx*4+0]
and	eax, 0Fh
lea	eax, [ebx+eax*8]
mov	[esi+10h], eax
test	edx, edx
jz	short loc_758004
mov	eax, [edi+0Ch]
mov	edx, ecx
shr	edx, 4
mov	edx, [eax+edx*4]
and	ecx, 0Fh
mov	ecx, [edx+ecx*8]
jmp	short loc_758007

loc_758004:
mov	ecx, [esi+0Ch]

loc_758007:
mov	eax, [esi+10h]
push	eax
mov	[esi+18h], ecx
call	[esp+14h+arg_0]
add	esp, 4
pop	edi
pop	ebp
mov	[esi+1Ch], eax
pop	ebx
mov	al, 1
pop	esi
retn	4

loc_758021:
xor	al, al
pop	esi
retn	4
sub_757FB0 endp

align 10h



sub_758030 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_4]
lea	eax, [ebx+1]
cmp	eax, [esp+14h+arg_8]
mov	[esp+14h+arg_4], eax
jge	loc_758154
push	ebp
push	esi
push	edi
lea	esp, [esp+0]

loc_758050:
mov	eax, [esp+20h+arg_0]
mov	edx, [eax+0Ch]
mov	esi, ebx
mov	edi, ebx
and	edi, 3Fh
shr	esi, 6
lea	edi, [edi+edi*2]
lea	eax, [ebx+1]
mov	ebp, eax
add	esi, esi
add	esi, esi
mov	ecx, [edx+esi]
add	edi, edi
and	eax, 3Fh
add	edi, edi
shr	ebp, 6
mov	edx, [edx+ebp*4]
add	ecx, edi
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
push	ecx
push	eax
call	[esp+28h+arg_C]
add	esp, 8
test	al, al
jz	loc_75813C
lea	ebp, [ebx+1]
lea	esp, [esp+0]

loc_7580A0:
mov	eax, [esp+20h+arg_0]
mov	edx, [eax+0Ch]
mov	eax, [edx+esi]
add	eax, edi
mov	esi, ebp
shr	esi, 6
mov	edx, [edx+esi*4]
mov	ecx, ebp
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
mov	edi, [edx+ecx*4+8]
mov	esi, [edx+ecx*4+4]
lea	ecx, [edx+ecx*4]
mov	edx, [ecx]
mov	[esp+20h+var_4], edi
mov	edi, [eax]
mov	[ecx], edi
mov	edi, [eax+4]
mov	[ecx+4], edi
mov	edi, [eax+8]
mov	[ecx+8], edi
mov	ecx, [esp+20h+var_4]
mov	[eax], edx
mov	[eax+4], esi
mov	[eax+8], ecx
test	ebx, ebx
jle	short loc_75813C
mov	edx, [esp+20h+arg_0]
mov	ecx, [edx+0Ch]
dec	ebx
mov	esi, ebx
mov	edi, ebx
and	edi, 3Fh
shr	esi, 6
lea	edi, [edi+edi*2]
add	esi, esi
add	esi, esi
mov	eax, [ecx+esi]
add	edi, edi
add	edi, edi
add	eax, edi
mov	[esp+20h+var_10], eax
dec	ebp
mov	edx, ebp
shr	edx, 6
mov	ecx, [ecx+edx*4]
mov	edx, [esp+20h+var_10]
mov	eax, ebp
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
push	edx
push	eax
call	[esp+28h+arg_C]
add	esp, 8
test	al, al
jnz	loc_7580A0

loc_75813C:
mov	eax, [esp+20h+arg_4]
mov	ebx, eax
inc	eax
cmp	eax, [esp+20h+arg_8]
mov	[esp+20h+arg_4], eax
jl	loc_758050
pop	edi
pop	esi
pop	ebp

loc_758154:
pop	ebx
add	esp, 10h
retn
sub_758030 endp

align 10h



sub_758160 proc	near

var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
sub	esp, 168h
push	esi
mov	esi, [esp+16Ch+arg_4]
mov	ecx, eax
sub	ecx, esi
cmp	ecx, 2
jb	loc_7585E1
push	ebx
push	ebp
mov	ebp, [esp+174h+arg_0]
lea	ebx, [esp+174h+var_140]
mov	[esp+174h+var_164], eax
push	edi

loc_758191:
mov	[esp+178h+var_144], esi

loc_758195:
mov	eax, [esp+178h+var_164]
sub	eax, esi
cmp	eax, 9
mov	[esp+178h+var_158], ebx
jle	loc_7584FD
cdq
sub	eax, edx
mov	edx, [ebp+0Ch]
sar	eax, 1
add	eax, esi
mov	ecx, eax
and	eax, 3FFh
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
mov	edi, [ecx+eax*4]
lea	eax, [ecx+eax*4]
mov	ebx, esi
mov	ecx, esi
and	ecx, 3FFh
shr	ebx, 0Ah
add	ecx, ecx
add	ebx, ebx
add	ecx, ecx
add	ebx, ebx
mov	edx, [ebx+edx]
add	edx, ecx
mov	[esp+178h+var_14C], ecx
mov	ecx, [edx]
mov	[edx], edi
mov	[eax], ecx
mov	ebp, [ebp+0Ch]
mov	ecx, [esp+178h+var_164]
lea	edx, [esi+1]
mov	esi, edx
shr	esi, 0Ah
mov	[esp+178h+var_168], ebp
mov	edi, edx
and	edi, 3FFh
add	esi, esi
add	esi, esi
mov	eax, [esi+ebp]
add	edi, edi
add	edi, edi
add	eax, edi
mov	[esp+178h+var_148], eax
mov	eax, [eax]
mov	[esp+178h+var_160], eax
dec	ecx
mov	ebp, ecx
and	ebp, 3FFh
add	ebp, ebp
add	ebp, ebp
mov	[esp+178h+var_154], ebp
mov	ebp, [esp+178h+var_168]
mov	eax, ecx
shr	eax, 0Ah
add	eax, eax
add	eax, eax
mov	[esp+178h+var_150], eax
mov	eax, [eax+ebp]
mov	ebp, [esp+178h+var_154]
add	eax, ebp
mov	[esp+178h+var_15C], eax
mov	eax, [eax]
mov	ebp, eax
and	eax, 3FFh
mov	[esp+178h+var_168], eax
mov	eax, [esp+178h+arg_C]
mov	eax, [eax+0Ch]
shr	ebp, 0Ah
mov	eax, [eax+ebp*4]
mov	ebp, [esp+178h+var_168]
fld	dword ptr [eax+ebp*8+4]
mov	eax, [esp+178h+var_160]
mov	ebp, eax
and	eax, 3FFh
mov	[esp+178h+var_160], eax
mov	eax, [esp+178h+arg_C]
mov	eax, [eax+0Ch]
shr	ebp, 0Ah
mov	eax, [eax+ebp*4]
mov	ebp, [esp+178h+var_160]
fld	dword ptr [eax+ebp*8+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_7582BD
mov	eax, [esp+178h+var_15C]
mov	ebp, [eax]
mov	[esp+178h+var_160], ebp
mov	ebp, [esp+178h+var_148]
mov	ebp, [ebp+0]
mov	[eax], ebp
mov	eax, [esp+178h+var_160]
mov	ebp, [esp+178h+var_148]
mov	[ebp+0], eax

loc_7582BD:
mov	eax, [esp+178h+arg_0]
mov	ebp, [eax+0Ch]
mov	eax, [esi+ebp]
mov	esi, [ebx+ebp]
add	edi, eax
mov	eax, [edi]
mov	[esp+178h+var_148], edi
mov	edi, [esp+178h+var_14C]
add	esi, edi
mov	edi, [esp+178h+arg_C]
mov	edi, [edi+0Ch]
mov	[esp+178h+var_168], esi
mov	esi, [esi]
mov	ebp, esi
and	esi, 3FFh
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
fld	dword ptr [ebp+esi*8+4]
mov	esi, eax
shr	esi, 0Ah
mov	esi, [edi+esi*4]
and	eax, 3FFh
fld	dword ptr [esi+eax*8+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_758327
mov	esi, [esp+178h+var_148]
mov	edi, [esp+178h+var_168]
mov	ebp, [esi]
mov	eax, [edi]
mov	[edi], ebp
mov	[esi], eax

loc_758327:
mov	eax, [esp+178h+arg_0]
mov	esi, [eax+0Ch]
mov	eax, [ebx+esi]
mov	edi, [esp+178h+var_14C]
add	eax, edi
mov	edi, [esp+178h+var_150]
mov	esi, [edi+esi]
mov	edi, [esp+178h+var_154]
add	esi, edi
mov	edi, [esp+178h+arg_C]
mov	edi, [edi+0Ch]
mov	[esp+178h+var_15C], esi
mov	esi, [esi]
mov	ebp, esi
and	esi, 3FFh
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
fld	dword ptr [ebp+esi*8+4]
mov	[esp+178h+var_168], eax
mov	eax, [eax]
mov	esi, eax
shr	esi, 0Ah
mov	esi, [edi+esi*4]
and	eax, 3FFh
fld	dword ptr [esi+eax*8+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_7583A0
mov	esi, [esp+178h+var_168]
mov	edi, [esp+178h+var_15C]
mov	ebp, [esi]
mov	eax, [edi]
mov	[edi], ebp
mov	[esi], eax
lea	esp, [esp+0]

loc_7583A0:
mov	eax, [esp+178h+arg_0]
mov	esi, [eax+0Ch]
mov	edi, [esp+178h+var_14C]
mov	eax, [ebx+esi]
mov	eax, [edi+eax]
mov	edi, [esp+178h+arg_C]
mov	edi, [edi+0Ch]
mov	ebp, eax
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
mov	[esp+178h+var_160], eax
and	eax, 3FFh
lea	eax, [ebp+eax*8+4]
mov	[esp+178h+var_150], eax

loc_7583D7:
inc	edx
mov	eax, edx
shr	eax, 0Ah
mov	eax, [esi+eax*4]
mov	ebp, edx
and	ebp, 3FFh
mov	eax, [eax+ebp*4]
mov	ebp, eax
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
and	eax, 3FFh
fld	dword ptr [ebp+eax*8+4]
mov	eax, [esp+178h+var_150]
fld	dword ptr [eax]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_7583D7
mov	eax, [esp+178h+arg_C]
mov	edi, [eax+0Ch]
mov	eax, [esp+178h+var_160]
mov	ebp, eax
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
and	eax, 3FFh
lea	eax, [ebp+eax*8+4]
mov	[esp+178h+var_150], eax
mov	edi, edi

loc_758430:
dec	ecx
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [esi+eax*4]
mov	ebp, ecx
and	ebp, 3FFh
mov	eax, [eax+ebp*4]
mov	ebp, [esp+178h+var_150]
fld	dword ptr [ebp+0]
mov	ebp, eax
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
and	eax, 3FFh
fld	dword ptr [ebp+eax*8+4]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_758430
mov	edi, ecx
and	edi, 3FFh
cmp	edx, ecx
jg	short loc_75849D
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [esi+eax*4]
lea	eax, [eax+edi*4]
mov	edi, edx
shr	edi, 0Ah
mov	esi, [esi+edi*4]
mov	ebp, edx
and	ebp, 3FFh
mov	edi, [esi+ebp*4]
lea	esi, [esi+ebp*4]
mov	ebp, [eax]
mov	[esi], ebp
mov	[eax], edi
jmp	loc_7583A0

loc_75849D:
mov	ebp, [esp+178h+arg_0]
mov	eax, [ebp+0Ch]
mov	ebx, [ebx+eax]
add	ebx, [esp+178h+var_14C]
mov	esi, ecx
shr	esi, 0Ah
mov	esi, [eax+esi*4]
mov	eax, [ebx]
lea	esi, [esi+edi*4]
mov	edi, [esi]
mov	[ebx], edi
mov	[esi], eax
mov	eax, [esp+178h+var_164]
mov	esi, [esp+178h+var_144]
mov	edi, eax
mov	ebx, ecx
sub	ebx, esi
sub	edi, edx
cmp	ebx, edi
mov	ebx, [esp+178h+var_158]
jle	short loc_7584EC
mov	[ebx], esi
mov	esi, edx
mov	[ebx+4], ecx
mov	[esp+178h+var_144], esi
add	ebx, 8
jmp	loc_758195

loc_7584EC:
mov	[ebx], edx
mov	[ebx+4], eax
mov	[esp+178h+var_164], ecx
add	ebx, 8
jmp	loc_758195

loc_7584FD:
lea	eax, [esi+1]
cmp	eax, [esp+178h+var_164]
mov	edi, esi
mov	[esp+178h+var_154], eax
jge	loc_7585C4

loc_758510:
mov	ebp, [ebp+0Ch]
mov	edx, edi
shr	edx, 0Ah
mov	edx, [ebp+edx*4+0]
mov	eax, edi
and	eax, 3FFh
lea	eax, [edx+eax*4]
lea	ecx, [edi+1]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [ebp+edx*4+0]
mov	ebx, ecx
and	ebx, 3FFh
mov	edx, [edx+ebx*4]
mov	ebx, [esp+178h+arg_C]
mov	ebx, [ebx+0Ch]
mov	ebp, edx
shr	ebp, 0Ah
mov	ebp, [ebx+ebp*4]
and	edx, 3FFh
fld	dword ptr [ebp+edx*8+4]
mov	ebp, [esp+178h+arg_0]
mov	[esp+178h+var_15C], eax
mov	eax, [eax]
mov	edx, eax
shr	edx, 0Ah
mov	edx, [ebx+edx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_7585AB
mov	eax, [ebp+0Ch]
mov	edx, ecx
shr	edx, 0Ah
mov	eax, [eax+edx*4]
and	ecx, 3FFh
mov	edx, [eax+ecx*4]
lea	ecx, [eax+ecx*4]
mov	eax, [esp+178h+var_15C]
mov	ebx, [eax]
mov	[ecx], ebx
mov	[eax], edx
cmp	edi, esi
jz	short loc_7585AB
dec	edi
jmp	loc_758510

loc_7585AB:
mov	eax, [esp+178h+var_154]
mov	edi, eax
inc	eax
cmp	eax, [esp+178h+var_164]
mov	[esp+178h+var_154], eax
jl	loc_758510
mov	ebx, [esp+178h+var_158]

loc_7585C4:
lea	ecx, [esp+178h+var_140]
cmp	ebx, ecx
jbe	short loc_7585DE
mov	edx, [ebx-4]
mov	esi, [ebx-8]
sub	ebx, 8
mov	[esp+178h+var_164], edx
jmp	loc_758191

loc_7585DE:
pop	edi
pop	ebp
pop	ebx

loc_7585E1:
pop	esi
add	esp, 168h
retn
sub_758160 endp

align 10h



sub_7585F0 proc	near

var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
sub	esp, 208h
push	ebx
mov	ebx, [esp+20Ch+arg_4]
mov	ecx, eax
sub	ecx, ebx
cmp	ecx, 2
jb	loc_758D14
push	ebp
push	esi
push	edi
mov	edi, [esp+218h+arg_0]
lea	ecx, [esp+218h+var_140]
mov	[esp+218h+var_1F4], ebx
mov	[esp+218h+var_1F8], eax

loc_758628:
mov	[esp+218h+var_200], ecx
lea	esp, [esp+0]

loc_758630:
mov	edx, [esp+218h+var_1F8]
mov	eax, edx
sub	eax, ebx
cmp	eax, 9
mov	ebp, ebx
jle	loc_758B66
mov	esi, [edi+0Ch]
cdq
sub	eax, edx
sar	eax, 1
add	eax, ebx
mov	edx, eax
and	eax, 3Fh
shr	edx, 6
mov	ecx, [esi+edx*4]
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*8]
mov	eax, ebx
and	eax, 3Fh
lea	edx, [eax+eax*2]
add	edx, edx
add	edx, edx
add	edx, edx
shr	ebp, 6
add	ebp, ebp
add	ebp, ebp
mov	eax, [esi+ebp]
mov	esi, [eax+edx+4]
add	eax, edx
mov	[esp+218h+var_154], esi
mov	esi, [eax+8]
mov	[esp+218h+var_150], esi
mov	esi, [eax+0Ch]
mov	[esp+218h+var_14C], esi
mov	esi, [eax+10h]
mov	[esp+218h+var_148], esi
mov	esi, [eax+14h]
mov	[esp+218h+var_144], esi
mov	esi, [ecx]
mov	[esp+218h+var_1FC], edx
mov	edx, [eax]
mov	[eax], esi
mov	esi, [ecx+4]
mov	[eax+4], esi
mov	esi, [ecx+8]
mov	[eax+8], esi
mov	esi, [ecx+0Ch]
mov	[eax+0Ch], esi
mov	esi, [ecx+10h]
mov	[eax+10h], esi
mov	esi, [ecx+14h]
mov	[eax+14h], esi
mov	eax, [esp+218h+var_150]
mov	[ecx], edx
mov	edx, [esp+218h+var_154]
mov	esi, [esp+218h+var_1F8]
mov	[ecx+4], edx
mov	edx, [esp+218h+var_14C]
mov	[ecx+8], eax
mov	eax, [esp+218h+var_148]
mov	[ecx+0Ch], edx
mov	edx, [esp+218h+var_144]
mov	[ecx+10h], eax
mov	[ecx+14h], edx
mov	edx, [edi+0Ch]
inc	ebx
mov	ecx, ebx
shr	ecx, 6
add	ecx, ecx
add	ecx, ecx
mov	edx, [edx+ecx]
mov	eax, ebx
and	eax, 3Fh
lea	eax, [eax+eax*2]
dec	esi
mov	[esp+218h+var_1EC], ecx
add	eax, eax
add	eax, eax
add	eax, eax
mov	ecx, esi
shr	ecx, 6
add	edx, eax
add	ecx, ecx
add	ecx, ecx
mov	[esp+218h+var_1F0], eax
mov	[esp+218h+var_208], ecx
mov	eax, esi
and	eax, 3Fh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
mov	[esp+218h+var_204], eax
mov	eax, [edi+0Ch]
mov	ecx, [ecx+eax]
add	ecx, [esp+218h+var_204]
push	edx
push	ecx
call	[esp+220h+arg_C]
add	esp, 8
test	al, al
jz	loc_7587FE
mov	ecx, [edi+0Ch]
mov	eax, [esp+218h+var_1EC]
mov	eax, [ecx+eax]
add	eax, [esp+218h+var_1F0]
mov	edx, [esp+218h+var_208]
mov	ecx, [ecx+edx]
add	ecx, [esp+218h+var_204]
mov	edx, [ecx]
mov	[esp+218h+var_1E8], edx
mov	edx, [ecx+4]
mov	[esp+218h+var_1E4], edx
mov	edx, [ecx+8]
mov	[esp+218h+var_1E0], edx
mov	edx, [ecx+0Ch]
mov	[esp+218h+var_1DC], edx
mov	edx, [ecx+10h]
mov	[esp+218h+var_1D8], edx
mov	edx, [ecx+14h]
mov	[esp+218h+var_1D4], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	edx, [eax+14h]
mov	[ecx+14h], edx
mov	ecx, [esp+218h+var_1E8]
mov	edx, [esp+218h+var_1E4]
mov	[eax], ecx
mov	ecx, [esp+218h+var_1E0]
mov	[eax+4], edx
mov	edx, [esp+218h+var_1DC]
mov	[eax+8], ecx
mov	ecx, [esp+218h+var_1D8]
mov	[eax+0Ch], edx
mov	edx, [esp+218h+var_1D4]
mov	[eax+10h], ecx
mov	[eax+14h], edx

loc_7587FE:
mov	ecx, [edi+0Ch]
mov	eax, [esp+218h+var_1EC]
mov	eax, [ecx+eax]
add	eax, [esp+218h+var_1F0]
mov	ecx, [ecx+ebp]
add	ecx, [esp+218h+var_1FC]
push	eax
push	ecx
call	[esp+220h+arg_C]
add	esp, 8
test	al, al
jz	loc_7588B0
mov	ecx, [edi+0Ch]
mov	edx, [esp+218h+var_1EC]
mov	eax, [ecx+edx]
mov	ecx, [ecx+ebp]
add	eax, [esp+218h+var_1F0]
add	ecx, [esp+218h+var_1FC]
mov	edx, [ecx]
mov	[esp+218h+var_1D0], edx
mov	edx, [ecx+4]
mov	[esp+218h+var_1CC], edx
mov	edx, [ecx+8]
mov	[esp+218h+var_1C8], edx
mov	edx, [ecx+0Ch]
mov	[esp+218h+var_1C4], edx
mov	edx, [ecx+10h]
mov	[esp+218h+var_1C0], edx
mov	edx, [ecx+14h]
mov	[esp+218h+var_1BC], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	edx, [eax+14h]
mov	[ecx+14h], edx
mov	ecx, [esp+218h+var_1D0]
mov	edx, [esp+218h+var_1CC]
mov	[eax], ecx
mov	ecx, [esp+218h+var_1C8]
mov	[eax+4], edx
mov	edx, [esp+218h+var_1C4]
mov	[eax+8], ecx
mov	ecx, [esp+218h+var_1C0]
mov	[eax+0Ch], edx
mov	edx, [esp+218h+var_1BC]
mov	[eax+10h], ecx
mov	[eax+14h], edx

loc_7588B0:
mov	ecx, [edi+0Ch]
mov	eax, [ecx+ebp]
mov	edx, [esp+218h+var_208]
add	eax, [esp+218h+var_1FC]
mov	ecx, [ecx+edx]
add	ecx, [esp+218h+var_204]
push	eax
push	ecx
call	[esp+220h+arg_C]
add	esp, 8
test	al, al
jz	loc_758962
mov	ecx, [edi+0Ch]
mov	eax, [ecx+ebp]
add	eax, [esp+218h+var_1FC]
mov	edx, [esp+218h+var_208]
mov	ecx, [ecx+edx]
add	ecx, [esp+218h+var_204]
mov	edx, [ecx]
mov	[esp+218h+var_1B8], edx
mov	edx, [ecx+4]
mov	[esp+218h+var_1B4], edx
mov	edx, [ecx+8]
mov	[esp+218h+var_1B0], edx
mov	edx, [ecx+0Ch]
mov	[esp+218h+var_1AC], edx
mov	edx, [ecx+10h]
mov	[esp+218h+var_1A8], edx
mov	edx, [ecx+14h]
mov	[esp+218h+var_1A4], edx
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	edx, [eax+14h]
mov	[ecx+14h], edx
mov	ecx, [esp+218h+var_1B8]
mov	edx, [esp+218h+var_1B4]
mov	[eax], ecx
mov	ecx, [esp+218h+var_1B0]
mov	[eax+4], edx
mov	edx, [esp+218h+var_1AC]
mov	[eax+8], ecx
mov	ecx, [esp+218h+var_1A8]
mov	[eax+0Ch], edx
mov	edx, [esp+218h+var_1A4]

loc_75895C:
mov	[eax+10h], ecx
mov	[eax+14h], edx

loc_758962:
mov	ecx, [edi+0Ch]
mov	eax, [ecx+ebp]
add	eax, [esp+218h+var_1FC]
inc	ebx
mov	[esp+218h+var_208], eax
mov	edx, ebx
shr	edx, 6
mov	ecx, [ecx+edx*4]
mov	edx, [esp+218h+var_208]
mov	eax, ebx
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
push	edx
push	eax
call	[esp+220h+arg_C]
add	esp, 8
test	al, al
jnz	short loc_758962
mov	[esp+218h+var_204], ebx
lea	esp, [esp+0]

loc_7589A0:
mov	ecx, [edi+0Ch]
dec	esi
mov	edx, esi
shr	edx, 6
mov	edx, [ecx+edx*4]
mov	eax, esi
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [edx+eax*8]
mov	eax, [ecx+ebp]
add	eax, [esp+218h+var_1FC]
push	edx
push	eax
call	[esp+220h+arg_C]
add	esp, 8
test	al, al
jnz	short loc_7589A0
mov	ecx, [edi+0Ch]
mov	edx, esi
mov	eax, esi
and	eax, 3Fh
shr	edx, 6
cmp	ebx, esi
mov	edx, [ecx+edx*4]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*8]
jg	loc_758A85
mov	edx, ebx
shr	edx, 6
mov	ecx, [ecx+edx*4]
and	ebx, 3Fh
lea	ebx, [ebx+ebx*2]
mov	edx, [ecx+ebx*8]
lea	ecx, [ecx+ebx*8]
mov	ebx, [ecx+4]
mov	[esp+218h+var_19C], ebx
mov	ebx, [ecx+8]
mov	[esp+218h+var_198], ebx
mov	ebx, [ecx+0Ch]
mov	[esp+218h+var_194], ebx
mov	ebx, [ecx+10h]
mov	[esp+218h+var_190], ebx
mov	ebx, [ecx+14h]
mov	[esp+218h+var_18C], ebx
mov	ebx, [eax]
mov	[ecx], ebx
mov	ebx, [eax+4]
mov	[ecx+4], ebx
mov	ebx, [eax+8]
mov	[ecx+8], ebx
mov	ebx, [eax+0Ch]
mov	[ecx+0Ch], ebx
mov	ebx, [eax+10h]
mov	[ecx+10h], ebx
mov	ebx, [eax+14h]
mov	[ecx+14h], ebx
mov	ecx, [esp+218h+var_198]
mov	ebx, [esp+218h+var_204]
mov	[eax], edx
mov	edx, [esp+218h+var_19C]
mov	[eax+4], edx
mov	edx, [esp+218h+var_194]
mov	[eax+8], ecx
mov	ecx, [esp+218h+var_190]
mov	[eax+0Ch], edx
mov	edx, [esp+218h+var_18C]
jmp	loc_75895C

loc_758A85:
mov	ebp, [ecx+ebp]
add	ebp, [esp+218h+var_1FC]
mov	edx, [ebp+4]
mov	ecx, [ebp+0]
mov	[esp+218h+var_184], edx
mov	edx, [ebp+8]
mov	[esp+218h+var_180], edx
mov	edx, [ebp+0Ch]
mov	[esp+218h+var_17C], edx
mov	edx, [ebp+10h]
mov	[esp+218h+var_178], edx
mov	edx, [ebp+14h]
mov	[esp+218h+var_174], edx
mov	edx, [eax]
mov	[ebp+0], edx
mov	edx, [eax+4]
mov	[ebp+4], edx
mov	edx, [eax+8]
mov	[ebp+8], edx
mov	edx, [eax+0Ch]
mov	[ebp+0Ch], edx
mov	edx, [eax+10h]
mov	[ebp+10h], edx
mov	edx, [eax+14h]
mov	[ebp+14h], edx
mov	edx, [esp+218h+var_180]
mov	[eax], ecx
mov	ecx, [esp+218h+var_184]
mov	[eax+4], ecx
mov	ecx, [esp+218h+var_17C]
mov	[eax+8], edx
mov	edx, [esp+218h+var_178]
mov	[eax+0Ch], ecx
mov	ecx, [esp+218h+var_174]
mov	[eax+10h], edx
mov	[eax+14h], ecx
mov	eax, [esp+218h+var_1F8]
mov	ecx, [esp+218h+var_1F4]
mov	edx, eax
mov	ebp, esi
sub	edx, ebx
sub	ebp, ecx
cmp	ebp, edx
jle	short loc_758B47
mov	eax, [esp+218h+var_200]
add	[esp+218h+var_200], 8
mov	[eax], ecx
mov	ecx, [esp+218h+var_200]
mov	[eax+4], esi
mov	[esp+218h+var_1F4], ebx
jmp	loc_758630

loc_758B47:
mov	ecx, [esp+218h+var_200]
add	[esp+218h+var_200], 8
mov	[ecx], ebx
mov	ebx, [esp+218h+var_1F4]
mov	[ecx+4], eax
mov	ecx, [esp+218h+var_200]
mov	[esp+218h+var_1F8], esi
jmp	loc_758630

loc_758B66:
inc	ebx
cmp	ebx, edx
mov	[esp+218h+var_204], ebx
jge	loc_758CEE

loc_758B73:
mov	ecx, [edi+0Ch]
mov	ebx, ebp
and	ebx, 3Fh
mov	esi, ebp
lea	ebx, [ebx+ebx*2]
shr	esi, 6
add	ebx, ebx
add	esi, esi
add	esi, esi
mov	eax, [ecx+esi]
add	ebx, ebx
add	ebx, ebx
add	eax, ebx
mov	[esp+218h+var_208], eax
lea	eax, [ebp+1]
mov	edx, eax
shr	edx, 6
mov	ecx, [ecx+edx*4]
mov	edx, [esp+218h+var_208]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
push	edx
push	eax
call	[esp+220h+arg_C]
add	esp, 8
test	al, al
jz	loc_758CD5
lea	edx, [ebp+1]
jmp	short loc_758BD4
jmp	short loc_758BD0
align 10h

loc_758BD0:
mov	edx, [esp+218h+var_1F0]

loc_758BD4:
mov	eax, [edi+0Ch]
mov	eax, [eax+esi]
add	eax, ebx
mov	ecx, edx
and	ecx, 3Fh
lea	ebx, [ecx+ecx*2]
mov	ecx, [edi+0Ch]
mov	esi, edx
shr	esi, 6
mov	ecx, [ecx+esi*4]
mov	esi, [ecx+ebx*8]
lea	ecx, [ecx+ebx*8]
mov	ebx, [ecx+4]
mov	[esp+218h+var_16C], ebx
mov	ebx, [ecx+8]
mov	[esp+218h+var_168], ebx
mov	ebx, [ecx+0Ch]
mov	[esp+218h+var_164], ebx
mov	ebx, [ecx+10h]
mov	[esp+218h+var_160], ebx
mov	ebx, [ecx+14h]
mov	[esp+218h+var_15C], ebx
mov	ebx, [eax]
mov	[ecx], ebx
mov	ebx, [eax+4]
mov	[ecx+4], ebx
mov	ebx, [eax+8]
mov	[ecx+8], ebx
mov	ebx, [eax+0Ch]
mov	[ecx+0Ch], ebx
mov	ebx, [eax+10h]
mov	[ecx+10h], ebx
mov	ebx, [eax+14h]
mov	[ecx+14h], ebx
mov	ecx, [esp+218h+var_16C]
mov	[eax], esi
mov	[eax+4], ecx
mov	ecx, [esp+218h+var_168]
mov	[eax+8], ecx
mov	ecx, [esp+218h+var_164]
mov	[eax+0Ch], ecx
mov	ecx, [esp+218h+var_160]
mov	[eax+10h], ecx
mov	ecx, [esp+218h+var_15C]
mov	[eax+14h], ecx
cmp	ebp, [esp+218h+var_1F4]
jz	short loc_758CD5
mov	eax, [edi+0Ch]
dec	ebp
mov	ebx, ebp
and	ebx, 3Fh
mov	esi, ebp
lea	ebx, [ebx+ebx*2]
shr	esi, 6
add	ebx, ebx
add	esi, esi
add	esi, esi
mov	ecx, [esi+eax]
add	ebx, ebx
dec	edx
add	ebx, ebx
add	ecx, ebx
mov	[esp+218h+var_208], ecx
mov	ecx, edx
mov	[esp+218h+var_1F0], edx
shr	ecx, 6
mov	eax, [eax+ecx*4]
mov	ecx, [esp+218h+var_208]
and	edx, 3Fh
lea	edx, [edx+edx*2]
lea	eax, [eax+edx*8]
push	ecx
push	eax
call	[esp+220h+arg_C]
add	esp, 8
test	al, al
jnz	loc_758BD0

loc_758CD5:
mov	eax, [esp+218h+var_204]
mov	ebp, eax
inc	eax
cmp	eax, [esp+218h+var_1F8]
mov	[esp+218h+var_204], eax
jl	loc_758B73
mov	ecx, [esp+218h+var_200]

loc_758CEE:
lea	edx, [esp+218h+var_140]
cmp	ecx, edx
jbe	short loc_758D11
mov	eax, [ecx-8]
mov	edx, [ecx-4]
sub	ecx, 8
mov	[esp+218h+var_1F4], eax
mov	[esp+218h+var_1F8], edx
mov	ebx, eax
jmp	loc_758628

loc_758D11:
pop	edi
pop	esi
pop	ebp

loc_758D14:
pop	ebx
add	esp, 208h
retn
sub_7585F0 endp

align 10h



sub_758D20 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+4]
cmp	edx, 0FFFFFFFFh
jz	short locret_758D8A
push	esi
mov	esi, [ecx+164h]
dec	esi
cmp	edx, esi
pop	esi
jnz	short loc_758D4A
mov	edx, [ecx+164h]
test	edx, edx
jz	short loc_758D4A
dec	edx
mov	[ecx+164h], edx

loc_758D4A:
mov	edx, [eax+8]
mov	[eax+4], edx
mov	edx, [eax+0Ch]
mov	[eax+8], edx
mov	edx, [eax+4]
mov	dword ptr [eax+0Ch], 0FFFFFFFFh
cmp	edx, 0FFFFFFFFh
jnz	short loc_758D6E
mov	dword ptr [eax], 0
retn	4

loc_758D6E:
mov	ecx, [ecx+170h]
mov	eax, edx
shr	eax, 0Ah
mov	eax, [ecx+eax*4]
and	edx, 3FFh
mov	dword ptr [eax+edx*8+4], 0

locret_758D8A:
retn	4
sub_758D20 endp

align 10h



sub_758D90 proc	near
mov	eax, [ecx+54h]
mov	edx, [ecx+168h]
lea	edx, [edx+eax*2]
add	edx, [ecx+108h]
mov	eax, [ecx+188h]
add	edx, [ecx+34h]
lea	eax, [eax+eax*2]
lea	edx, [eax+edx*2]
add	edx, [ecx+80h]
mov	eax, [ecx+1B8h]
lea	edx, [eax+edx*4]
add	edx, [ecx+1A8h]
mov	eax, [ecx+158h]
add	edx, [ecx+198h]
push	esi
add	edx, [ecx+178h]
mov	esi, [ecx+0C0h]
add	edx, [ecx+44h]
lea	eax, [esi+eax*2]
mov	esi, [ecx+138h]
lea	eax, [eax+eax*2]
add	eax, eax
lea	edx, [eax+edx*8]
add	edx, [ecx+148h]
mov	eax, [ecx+64h]
shl	edx, 5
lea	eax, [esi+eax*8]
imul	eax, 70h
add	edx, eax
mov	eax, [ecx+130h]
add	eax, [ecx+124h]
pop	esi
lea	eax, [eax+eax*2]
add	edx, eax
add	edx, [ecx+1BCh]
add	edx, [ecx+1ACh]
add	edx, [ecx+19Ch]
add	edx, [ecx+18Ch]
add	edx, [ecx+17Ch]
add	edx, [ecx+16Ch]
add	edx, [ecx+15Ch]
add	edx, [ecx+14Ch]
add	edx, [ecx+13Ch]
add	edx, [ecx+100h]
add	edx, [ecx+10Ch]
add	edx, [ecx+0D4h]
add	edx, [ecx+0B8h]
add	edx, [ecx+0ACh]
add	edx, [ecx+0C4h]
add	edx, [ecx+0A0h]
add	edx, [ecx+94h]
add	edx, [ecx+84h]
add	edx, [ecx+68h]
add	edx, [ecx+78h]
add	edx, [ecx+58h]
add	edx, [ecx+48h]
add	edx, [ecx+20h]
add	edx, [ecx+38h]
add	edx, [ecx+14h]
mov	ecx, [ecx+2Ch]
lea	eax, [ecx+edx*4]
retn
sub_758D90 endp

align 10h



sub_758EB0 proc	near
fld	ds:flt_14411F0
xor	eax, eax
fst	dword ptr [ecx+0E0h]
mov	[ecx+30h], eax
fstp	dword ptr [ecx+0E4h]
mov	[ecx+40h], eax
fld	ds:flt_14411EC
mov	[ecx+50h], eax
fst	dword ptr [ecx+0E8h]
mov	[ecx+60h], eax
fstp	dword ptr [ecx+0ECh]
mov	[ecx+74h], eax
mov	[ecx+7Ch], eax
mov	[ecx+104h], eax
mov	[ecx+154h], eax
mov	[ecx+164h], eax
mov	[ecx+174h], eax
mov	[ecx+184h], eax
mov	[ecx+0D8h], eax
mov	[ecx+0DCh], eax
mov	[ecx+8], al
retn
sub_758EB0 endp

align 10h



sub_758F20 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= qword ptr -8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 28h
push	ebx
push	ebp
push	esi
mov	esi, ecx
fld	dword ptr [esi+0E8h]
push	edi
fsub	dword ptr [esi+0E0h]
mov	byte ptr [esi+8], 0
fstp	[esp+38h+var_14]
fld	dword ptr [esi+0ECh]
fsub	dword ptr [esi+0E4h]
fstp	[esp+38h+var_18]
fldz
fcom	[esp+38h+var_14]
fnstsw	ax
test	ah, 5
jp	loc_7592E1
fcomp	[esp+38h+var_18]
fnstsw	ax
test	ah, 5
jp	loc_7592E3
cmp	dword ptr [esi+30h], 40h
jbe	loc_7592E3
xor	ebp, ebp
push	ebp
lea	edi, [esi+18h]
push	42h
mov	ecx, edi
call	sub_757A10
push	ebp
lea	ebx, [esi+0Ch]
push	42h
mov	ecx, ebx
mov	dword ptr [edi+4], 42h
call	sub_757A10
mov	dword ptr [ebx+4], 42h
mov	eax, [edi+4]
mov	ecx, [edi]
add	eax, eax
add	eax, eax
push	eax		; size_t
push	ebp		; int
push	ecx		; void *
call	_memset
mov	edx, [ebx+4]
mov	eax, [ebx]
add	edx, edx
add	edx, edx
push	edx		; size_t
push	ebp		; int
push	eax		; void *
call	_memset
fld	[esp+50h+var_14]
fld	ds:dbl_14411F8
xor	ecx, ecx
fld	st
add	esp, 18h
fdivrp	st(2), st
mov	[esp+38h+var_14], ecx
fxch	st(1)
fstp	[esp+38h+var_10]
fdiv	[esp+38h+var_18]
fstp	[esp+38h+var_18]
cmp	[esi+40h], ebp
jbe	loc_75919D
fld	[esp+38h+var_10]
fld	[esp+38h+var_18]
fld	ds:dbl_15FCC48

loc_759005:
mov	edi, [esi+4Ch]
mov	eax, ecx
and	eax, 3Fh
mov	edx, ecx
shr	edx, 6
shl	eax, 4
add	eax, [edi+edx*4]
mov	edi, [eax]
inc	edi
cmp	edi, [eax+4]
mov	[esp+38h+var_18], eax
jg	loc_759189
lea	ecx, [edi-1]
mov	[esp+38h+var_20], ecx
jmp	short loc_759035

loc_759031:
mov	ecx, [esp+38h+var_20]

loc_759035:
mov	eax, [esi+3Ch]
fnstcw	word ptr [esp+38h+var_24]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
and	ecx, 3FFh
fld	dword ptr [edx+ecx*8]
lea	ebp, [edx+ecx*8]
fsub	dword ptr [esi+0E0h]
mov	ecx, edi
shr	ecx, 0Ah
mov	eax, [eax+ecx*4]
fmul	st, st(3)
mov	edx, edi
and	edx, 3FFh
lea	ebx, [eax+edx*8]
movzx	eax, word ptr [esp+38h+var_24]
fstp	[esp+38h+var_10]
fld	[esp+38h+var_10]
or	eax, 0C00h
fadd	st, st(1)
mov	[esp+38h+var_10], eax
fldcw	word ptr [esp+38h+var_10]
fistp	[esp+38h+var_8]
mov	ecx, dword ptr [esp+38h+var_8]
fldcw	word ptr [esp+38h+var_24]
fld	dword ptr [ebx]
fsub	dword ptr [esi+0E0h]
fnstcw	word ptr [esp+38h+var_24]
fmul	st, st(3)
movzx	eax, word ptr [esp+38h+var_24]
or	eax, 0C00h
fstp	[esp+38h+var_10]
fld	[esp+38h+var_10]
mov	[esp+38h+var_10], eax
fadd	st, st(1)
fldcw	word ptr [esp+38h+var_10]
fistp	[esp+38h+var_8]
mov	eax, dword ptr [esp+38h+var_8]
fldcw	word ptr [esp+38h+var_24]
cmp	ecx, eax
jbe	short loc_7590D5
mov	edx, ecx
mov	ecx, eax
mov	eax, edx
cmp	ecx, eax

loc_7590D5:
jnb	short loc_7590E5

loc_7590D7:
mov	edx, [esi+0Ch]
inc	dword ptr [edx+ecx*4]
lea	edx, [edx+ecx*4]
inc	ecx
cmp	ecx, eax
jb	short loc_7590D7

loc_7590E5:
fld	dword ptr [ebp+4]
fsub	dword ptr [esi+0E4h]
fnstcw	word ptr [esp+38h+var_24]
movzx	eax, word ptr [esp+38h+var_24]
fmul	st, st(2)
or	eax, 0C00h
fstp	[esp+38h+var_10]
fld	[esp+38h+var_10]
mov	[esp+38h+var_10], eax
fadd	st, st(1)
fldcw	word ptr [esp+38h+var_10]
fistp	[esp+38h+var_8]
mov	edx, dword ptr [esp+38h+var_8]
fldcw	word ptr [esp+38h+var_24]
fld	dword ptr [ebx+4]
fsub	dword ptr [esi+0E4h]
fnstcw	word ptr [esp+38h+var_24]
fmul	st, st(2)
movzx	eax, word ptr [esp+38h+var_24]
or	eax, 0C00h
fstp	[esp+38h+var_10]
fld	[esp+38h+var_10]
mov	[esp+38h+var_10], eax
fadd	st, st(1)
fldcw	word ptr [esp+38h+var_10]
fistp	[esp+38h+var_8]
mov	ecx, dword ptr [esp+38h+var_8]
fldcw	word ptr [esp+38h+var_24]
cmp	edx, ecx
jbe	short loc_75915D
mov	eax, edx
mov	edx, ecx
mov	ecx, eax

loc_75915D:
mov	eax, edx
cmp	edx, ecx
jnb	short loc_759171

loc_759163:
mov	edx, [esi+18h]
inc	dword ptr [edx+eax*4]
lea	edx, [edx+eax*4]
inc	eax
cmp	eax, ecx
jb	short loc_759163

loc_759171:
mov	eax, [esp+38h+var_18]
inc	[esp+38h+var_20]
inc	edi
cmp	edi, [eax+4]
jle	loc_759031
mov	ecx, [esp+38h+var_14]
xor	ebp, ebp

loc_759189:
inc	ecx
mov	[esp+38h+var_14], ecx
cmp	ecx, [esi+40h]
jb	loc_759005
fstp	st
fstp	st(1)
fstp	st

loc_75919D:
mov	ebx, [esi+0Ch]
mov	[esp+38h+var_C], ebp
mov	[esp+38h+var_14], ebp
mov	[esp+38h+var_18], ebp
mov	[esp+38h+var_1C], ebp
mov	[esp+38h+var_24], ebp
mov	[esp+38h+var_20], ebp
mov	ebp, [esi+18h]
lea	ecx, [ebx+0Ch]
xor	edi, edi
xor	edx, edx
sub	ebx, ebp
mov	dword ptr [esp+38h+var_8], ebx
mov	ebx, [esp+38h+var_C]
lea	eax, [ebp+4]
mov	[esp+38h+var_10], 10h

loc_7591D7:
mov	ebp, dword ptr [esp+38h+var_8]
add	ebx, [eax+ebp]
mov	ebp, [eax]
add	[esp+38h+var_20], ebp
mov	ebp, [ecx-4]
add	[esp+38h+var_18], ebp
mov	ebp, [eax+4]
add	[esp+38h+var_24], ebp
mov	ebp, [ecx]
add	[esp+38h+var_14], ebp
mov	ebp, [eax+8]
add	edi, [ecx-0Ch]
add	edx, [eax-4]
add	[esp+38h+var_1C], ebp
add	eax, 10h
add	ecx, 10h
sub	[esp+38h+var_10], 1
jnz	short loc_7591D7
mov	ecx, [esp+38h+var_20]
mov	eax, [esp+38h+var_24]
add	ecx, eax
add	ecx, [esp+38h+var_1C]
add	edx, ecx
mov	ecx, [esp+38h+var_18]
add	ebx, ecx
add	ebx, [esp+38h+var_14]
add	edi, ebx
cmp	edi, edx
jnb	loc_7592E3
xor	ecx, ecx
cmp	[esi+30h], ecx
jbe	short loc_759271
lea	ecx, [ecx+0]

loc_759240:
mov	eax, [esi+3Ch]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
mov	edi, ecx
and	edi, 3FFh
fld	dword ptr [edx+edi*8]
lea	eax, [edx+edi*8]
fstp	[esp+38h+var_24]
inc	ecx
fld	dword ptr [eax+4]
fchs
fstp	dword ptr [eax]
fld	[esp+38h+var_24]
fstp	dword ptr [eax+4]
cmp	ecx, [esi+30h]
jb	short loc_759240

loc_759271:
fld	dword ptr [esi+0E0h]
mov	byte ptr [esi+8], 1
fstp	[esp+38h+var_24]
fld	dword ptr [esi+0E4h]
fchs
fstp	dword ptr [esi+0E0h]
fld	[esp+38h+var_24]
fstp	dword ptr [esi+0E4h]
fld	dword ptr [esi+0E8h]
fstp	[esp+38h+var_24]
fld	dword ptr [esi+0ECh]
fchs
fstp	dword ptr [esi+0E8h]
fld	[esp+38h+var_24]
fstp	dword ptr [esi+0ECh]
fld	dword ptr [esi+0E0h]
fstp	[esp+38h+var_24]
fld	dword ptr [esi+0E8h]
fstp	dword ptr [esi+0E0h]
fld	[esp+38h+var_24]
fstp	dword ptr [esi+0E8h]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_7592E1:
fstp	st

loc_7592E3:
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_758F20 endp

align 10h



sub_7592F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 10h
push	ebp
mov	ebp, [esp+14h+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+28h]
mov	[esp+1Ch+var_10], esi
cmp	ebp, esi
jb	loc_7593A4
cmp	ebp, [edi+2Ch]
jb	short loc_759382
push	ebx
xor	ebx, ebx
push	ebx
mov	eax, esi
push	eax
lea	ecx, [esp+28h+var_C]
mov	[esp+28h+var_C], ebx
mov	[esp+28h+var_8], ebx
mov	[esp+28h+var_4], ebx
call	sub_7579A0
lea	esi, [edi+24h]
lea	ecx, [esp+20h+var_C]
push	esi
push	ecx
call	sub_757F80
add	esp, 8
push	20h
inc	ebp
push	ebp
mov	ecx, esi
call	sub_7578C0
mov	ebp, [esp+20h+var_8]
xor	ecx, ecx
cmp	ebp, ebx
mov	ebx, [esp+20h+var_C]
jbe	short loc_75936B

loc_759356:
mov	edx, [esi+4]
mov	eax, [esi]
add	eax, edx
inc	edx
mov	[esi+4], edx
mov	dl, [ebx+ecx]
inc	ecx
mov	[eax], dl
cmp	ecx, ebp
jb	short loc_759356

loc_75936B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
mov	esi, [esp+20h+var_10]
mov	ebp, [esp+20h+arg_0]
pop	ebx

loc_759382:
mov	eax, [edi+28h]
cmp	eax, ebp
ja	short loc_7593A4
mov	edx, ebp
sub	edx, eax
inc	edx
mov	edi, edi

loc_759390:
mov	ecx, [edi+28h]
mov	eax, [edi+24h]
add	eax, ecx
inc	ecx
sub	edx, 1
mov	[edi+28h], ecx
mov	byte ptr [eax],	1
jnz	short loc_759390

loc_7593A4:
mov	eax, [edi+24h]
mov	cl, [esp+1Ch+arg_4]
mov	[eax+ebp], cl
test	esi, esi
jnz	short loc_7593BC
test	ebp, ebp
jbe	short loc_7593BC
mov	edx, [edi+24h]
mov	byte ptr [edx],	0

loc_7593BC:
pop	edi
pop	esi
pop	ebp
add	esp, 10h
retn	8
sub_7592F0 endp

align 10h



sub_7593D0 proc	near
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+8Ch]
lea	ebp, [esi+98h]
cmp	edi, ebp
jz	short loc_759412
push	ebx
mov	ebx, [edi+4]
push	0
push	ebx
mov	ecx, ebp
call	sub_757A10
mov	[ebp+4], ebx
test	ebx, ebx
jz	short loc_759411
mov	ecx, [edi]
mov	edx, [ebp+0]
lea	eax, ds:0[ebx*4]
push	eax
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_759411:
pop	ebx

loc_759412:
xor	eax, eax
cmp	[esi+90h], eax
jbe	short loc_75943A
lea	esp, [esp+0]

loc_759420:
mov	ecx, [edi]
mov	edx, [ecx+eax*4]
mov	[edx+30h], eax
mov	ecx, [esi+0B0h]
mov	[ecx+eax*4], eax
inc	eax
cmp	eax, [esi+90h]
jb	short loc_759420

loc_75943A:
pop	edi
pop	esi
pop	ebp
retn
sub_7593D0 endp

align 10h



sub_759440 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_758EB0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0Ch]
mov	eax, [eax+30h]
push	edx
call	eax
xor	edi, edi
mov	[esi+14h], edi
mov	[esi+10h], edi
mov	[esi+0Ch], edi
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+18h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	[esi+20h], edi
mov	[esi+1Ch], edi
mov	[esi+18h], edi
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+24h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+30h]
mov	[esi+2Ch], edi
mov	[esi+28h], edi
mov	[esi+24h], edi
call	sub_74CD90
lea	ecx, [esi+40h]
call	sub_74CD90
lea	ecx, [esi+50h]
call	sub_74CD90
lea	ecx, [esi+60h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+70h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+7Ch]
mov	[esi+78h], edi
mov	[esi+74h], edi
mov	[esi+70h], edi
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+8Ch]
mov	eax, [eax+30h]
push	edx
call	eax
mov	[esi+94h], edi
mov	[esi+90h], edi
mov	[esi+8Ch], edi
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+98h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	[esi+0A0h], edi
mov	[esi+9Ch], edi
mov	[esi+98h], edi
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0A4h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	[esi+0ACh], edi
mov	[esi+0A8h], edi
mov	[esi+0A4h], edi
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0B0h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+0BCh]
mov	[esi+0B8h], edi
mov	[esi+0B4h], edi
mov	[esi+0B0h], edi
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+0CCh]
mov	eax, [eax+30h]
push	edx
call	eax
mov	[esi+0D4h], edi
mov	[esi+0D0h], edi
mov	[esi+0CCh], edi
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0F8h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+104h]
mov	[esi+100h], edi
mov	[esi+0FCh], edi
mov	[esi+0F8h], edi
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+11Ch]
mov	eax, [eax+30h]
push	edx
call	eax
mov	[esi+124h], edi
mov	[esi+120h], edi
mov	[esi+11Ch], edi
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+128h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+134h]
mov	[esi+130h], edi
mov	[esi+12Ch], edi
mov	[esi+128h], edi
call	sub_74CD90
lea	ecx, [esi+144h]
call	sub_74CD90
lea	ecx, [esi+154h]
call	sub_74CD90
lea	ecx, [esi+164h]
call	sub_74CD90
lea	ecx, [esi+174h]
call	sub_74CD90
lea	ecx, [esi+184h]
call	sub_74CD90
lea	ecx, [esi+194h]
call	sub_74CD90
lea	ecx, [esi+1A4h]
call	sub_74CD90
pop	edi
lea	ecx, [esi+1B4h]
pop	esi
jmp	sub_74CD90
sub_759440 endp

align 10h



sub_759690 proc	near
lea	eax, [ecx+154h]
mov	ecx, [eax]
push	offset sub_756AB0
push	ecx
push	0
push	eax
call	sub_7585F0
add	esp, 10h
retn
sub_759690 endp

align 10h



sub_7596B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 0Ah
cmp	edi, [esi+4]
jb	short loc_7596C4
push	edi
call	sub_757A80

loc_7596C4:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+8+arg_0]
mov	edi, [edx]
and	eax, 3FFh
mov	[ecx+eax*8], edi
mov	edx, [edx+4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_7596B0 endp

align 10h



sub_7596F0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	ebx, ecx
mov	esi, [ebx]
shr	esi, 4
push	edi
cmp	esi, [ebx+4]
jb	short loc_759705
push	esi
call	sub_757D80

loc_759705:
mov	eax, [ebx]
mov	ecx, [ebx+0Ch]
and	eax, 0Fh
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [ecx+esi*4]
mov	esi, [esp+0Ch+arg_0]
lea	edi, [eax+edx*4]
mov	ecx, 7
rep movsd
inc	dword ptr [ebx]
pop	edi
pop	esi
pop	ebx
retn	4
sub_7596F0 endp

align 10h



sub_759730 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 4
cmp	edi, [esi+4]
jb	short loc_759744
push	edi
call	sub_757E00

loc_759744:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+8+arg_0]
mov	edi, [edx]
and	eax, 0Fh
mov	[ecx+eax*8], edi
mov	edx, [edx+4]
mov	[ecx+eax*8+4], edx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_759730 endp

align 10h



sub_759770 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_759784
push	edi
call	sub_757E80

loc_759784:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 3Fh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+8+arg_0]
lea	eax, [eax+edx*8]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_759770 endp

align 10h



sub_7597D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_7597E4
push	edi
call	sub_757B00

loc_7597E4:
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
mov	ecx, [esi]
mov	eax, [esp+8+arg_0]
mov	eax, [eax]
and	ecx, 0FFh
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_7597D0 endp

align 10h



sub_759810 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 0Ah
cmp	edi, [esi+4]
jb	short loc_759824
push	edi
call	sub_757F00

loc_759824:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 3FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+8+arg_0]
lea	eax, [eax+edx*4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
mov	[eax+8], ecx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_759810 endp

align 10h



sub_759860 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 54h
push	ebx
mov	edx, ecx
mov	eax, [edx+50h]
push	esi
lea	esi, [edx+50h]
xor	ecx, ecx
push	edi
mov	[esp+60h+var_50], edx
mov	[esp+60h+var_4C], eax
mov	[esp+60h+var_54], ecx
cmp	[esp+60h+arg_4], ecx
jbe	loc_759963
mov	ebx, [esp+60h+arg_0]
push	ebp
jmp	short loc_759890
align 10h

loc_759890:
mov	eax, [edx+3Ch]
mov	ebp, ebx
add	ebx, [esp+64h+arg_8]
mov	ecx, ebp
shr	ecx, 0Ah
mov	ecx, [eax+ecx*4]
mov	edx, ebp
and	edx, 3FFh
lea	ecx, [ecx+edx*8]
mov	edx, ebx
shr	edx, 0Ah
mov	eax, [eax+edx*4]
mov	edi, ebx
and	edi, 3FFh
fld	dword ptr [eax+edi*8]
lea	eax, [eax+edi*8]
fsub	dword ptr [ecx]
mov	edi, [esi]
fld	dword ptr [eax+4]
shr	edi, 0Ah
fsub	dword ptr [ecx+4]
fdivp	st(1), st
fstp	[esp+64h+var_40]
cmp	edi, [esi+4]
jb	short loc_7598E2
push	edi
mov	ecx, esi
call	sub_757B80

loc_7598E2:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	edx, [esp+64h+var_50]
and	eax, 3FFh
shl	eax, 4
mov	[esp+64h+arg_0], eax
mov	eax, [ecx+edi*4]
mov	ecx, [esp+64h+arg_0]
add	eax, ecx
mov	ecx, [esp+64h+var_40]
mov	[eax], ebp
mov	[eax+4], ebx
mov	[eax+8], ecx
xor	ecx, ecx
mov	[eax+0Ch], ecx
inc	dword ptr [esi]
cmp	[esp+64h+var_54], ecx
jz	short loc_759949
mov	ecx, [esi]
mov	edi, [edx+5Ch]
lea	eax, [ecx-1]
mov	ebp, eax
and	eax, 3FFh
shr	ebp, 0Ah
add	ecx, 0FFFFFFFEh
shl	eax, 4
add	eax, [edi+ebp*4]
mov	ebp, ecx
shr	ebp, 0Ah
mov	edi, [edi+ebp*4]
and	ecx, 3FFh
shl	ecx, 4
mov	[edi+ecx+0Ch], eax

loc_759949:
mov	eax, [esp+64h+var_54]
inc	eax
mov	[esp+64h+var_54], eax
cmp	eax, [esp+64h+arg_4]
jb	loc_759890
mov	eax, [esp+64h+var_4C]
xor	ecx, ecx
pop	ebp

loc_759963:
mov	edi, [edx+5Ch]
fldz
mov	esi, eax
fst	[esp+60h+var_34]
and	eax, 3FFh
fst	[esp+60h+var_2C]
shl	eax, 4
fstp	[esp+60h+var_30]
shr	esi, 0Ah
add	eax, [edi+esi*4]
mov	esi, [edx+60h]
mov	[esp+60h+var_38], eax
mov	eax, [esp+60h+arg_8]
lea	ebx, [edx+60h]
mov	[esp+60h+var_28], eax
mov	eax, [esp+60h+arg_C]
mov	[esp+60h+var_24], eax
mov	eax, [esp+60h+arg_10]
shr	esi, 6
mov	[esp+60h+var_20], eax
mov	[esp+60h+var_1C], ecx
mov	[esp+60h+var_18], ecx
mov	[esp+60h+var_14], ecx
mov	[esp+60h+var_10], ecx
mov	[esp+60h+var_C], ecx
mov	[esp+60h+var_4], ecx
mov	[esp+60h+var_8], 0FFFFFFFFh
cmp	esi, [ebx+4]
jb	short loc_7599D6
push	esi
mov	ecx, ebx
call	sub_757C00

loc_7599D6:
mov	eax, [ebx]
mov	ecx, [ebx+0Ch]
and	eax, 3Fh
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [ecx+esi*4]
lea	edi, [eax+edx*8]
mov	ecx, 0Eh
lea	esi, [esp+60h+var_38]
rep movsd
inc	dword ptr [ebx]
pop	edi
pop	esi
pop	ebx
add	esp, 54h
retn	14h
sub_759860 endp

align 10h



sub_759A10 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
push	ebp
mov	ebp, [esp+24h+arg_0]
mov	eax, [ebp+4]
mov	edx, ecx
mov	[esp+24h+var_20], edx
cmp	eax, 2
jb	loc_759BB3
mov	ecx, [edx+30h]
push	ebx
push	esi
lea	esi, [edx+30h]
push	edi
mov	[esp+30h+var_10], ecx
mov	[esp+30h+arg_0], 0
test	eax, eax
jbe	loc_759B58
lea	ebx, [edx+7Ch]
lea	ebx, [ebx+0]

loc_759A50:
mov	eax, [ebp+8]
add	eax, [esp+30h+arg_0]
mov	edi, [ebp+0]
mov	edi, [edi+14h]
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edi+ecx*4]
and	eax, 0FFh
mov	edi, [ecx+eax*8]
mov	eax, [ecx+eax*8+4]
mov	ecx, [esi]
mov	[esp+30h+var_18], edi
mov	edi, [ebx]
shr	edi, 0Ah
mov	[esp+30h+var_14], eax
mov	[esp+30h+var_1C], ecx
cmp	edi, [ebx+4]
jb	short loc_759A95
push	edi
mov	ecx, ebx
call	sub_757C80
mov	edx, [esp+30h+var_20]

loc_759A95:
mov	eax, [ebx+0Ch]
mov	eax, [eax+edi*4]
mov	ecx, [ebx]
mov	edi, [esp+30h+var_1C]
and	ecx, 3FFh
mov	[eax+ecx*4], edi
inc	dword ptr [ebx]
mov	edi, [esi]
shr	edi, 0Ah
cmp	edi, [esi+4]
jb	short loc_759AC2
push	edi
mov	ecx, esi
call	sub_757A80
mov	edx, [esp+30h+var_20]

loc_759AC2:
mov	ecx, [esi+0Ch]
fld	[esp+30h+var_18]
mov	eax, [esi]
mov	edi, [ecx+edi*4]
mov	ecx, [esp+30h+var_18]
and	eax, 3FFh
mov	[edi+eax*8], ecx
mov	ecx, [esp+30h+var_14]
mov	[edi+eax*8+4], ecx
inc	dword ptr [esi]
fld	dword ptr [edx+0E0h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_759AF9
fst	dword ptr [edx+0E0h]

loc_759AF9:
fld	[esp+30h+var_14]
fld	dword ptr [edx+0E4h]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_759B12
fst	dword ptr [edx+0E4h]

loc_759B12:
fld	dword ptr [edx+0E8h]
fcomp	st(2)
fnstsw	ax
test	ah, 5
jp	short loc_759B2B
fxch	st(1)
fstp	dword ptr [edx+0E8h]
jmp	short loc_759B2D

loc_759B2B:
fstp	st(1)

loc_759B2D:
fld	dword ptr [edx+0ECh]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_759B44
fstp	dword ptr [edx+0ECh]
jmp	short loc_759B46

loc_759B44:
fstp	st

loc_759B46:
mov	eax, [esp+30h+arg_0]
inc	eax
mov	[esp+30h+arg_0], eax
cmp	eax, [ebp+4]
jb	loc_759A50

loc_759B58:
mov	ecx, [ebp+0Ch]
mov	eax, [esp+30h+arg_4]
mov	ebx, [edx+40h]
mov	esi, [esi]
mov	ebp, [ebp+10h]
lea	edi, [edx+40h]
add	ecx, eax
shr	ebx, 6
dec	esi
add	ebp, eax
mov	[esp+30h+var_8], ecx
cmp	ebx, [edi+4]
jb	short loc_759B87
push	ebx
mov	ecx, edi
call	sub_757B00
mov	ecx, [esp+30h+var_8]

loc_759B87:
mov	eax, [edi]
mov	edx, [edi+0Ch]
and	eax, 3Fh
shl	eax, 4
mov	[esp+30h+arg_0], eax
mov	eax, [edx+ebx*4]
mov	edx, [esp+30h+arg_0]
add	eax, edx
mov	edx, [esp+30h+var_10]
mov	[eax], edx
mov	[eax+4], esi
mov	[eax+8], ecx
mov	[eax+0Ch], ebp
inc	dword ptr [edi]
pop	edi
pop	esi
pop	ebx

loc_759BB3:
pop	ebp
add	esp, 20h
retn	8
sub_759A10 endp

align 10h



sub_759BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
mov	eax, [ebx+4]
push	ebp
push	esi
mov	esi, [ebx]
cmp	esi, eax
mov	ebp, ecx
push	edi
mov	[esp+18h+var_8], ebp
jge	loc_759C6A
mov	edi, edi

loc_759BE0:
mov	eax, [ebx]
push	eax
push	esi
mov	ecx, ebp
call	sub_756DE0
test	al, al
jz	short loc_759C60
lea	ecx, [esi+1]
mov	[esp+18h+var_4], 1
lea	edx, [ecx+1]
lea	ecx, [ecx+0]

loc_759C00:
cmp	ecx, [ebx+4]
jge	short loc_759C45
mov	eax, [ebp+3Ch]
mov	edi, edx
shr	edi, 0Ah
mov	edi, [eax+edi*4]
mov	ebp, edx
and	ebp, 3FFh
fld	dword ptr [edi+ebp*8+4]
mov	edi, ecx
shr	edi, 0Ah
mov	eax, [eax+edi*4]
mov	ebp, ecx
and	ebp, 3FFh
fld	dword ptr [eax+ebp*8+4]
mov	ebp, [esp+18h+var_8]
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_759C45
inc	[esp+18h+var_4]
inc	ecx
inc	edx
jmp	short loc_759C00

loc_759C45:
mov	ecx, [ebx+0Ch]
mov	edx, [ebx+8]
mov	edi, [esp+18h+var_4]
push	ecx
push	edx
push	1
push	edi
push	esi
mov	ecx, ebp
call	sub_759860
lea	esi, [esi+edi-1]

loc_759C60:
inc	esi
cmp	esi, [ebx+4]
jl	loc_759BE0

loc_759C6A:
mov	eax, [ebx]
mov	esi, [ebx+4]
cmp	esi, eax
mov	[esp+18h+var_4], eax
jle	loc_759D12
jmp	short loc_759C80
align 10h

loc_759C80:
mov	eax, [ebx+4]
push	eax
push	esi
mov	ecx, ebp
call	sub_756E90
test	al, al
jz	short loc_759D03
lea	ecx, [esi-1]
mov	edi, 1
lea	edx, [ecx-1]
jmp	short loc_759CA0
align 10h

loc_759CA0:
cmp	ecx, [esp+18h+var_4]
jle	short loc_759CE7
mov	eax, [ebp+3Ch]
mov	ebx, edx
shr	ebx, 0Ah
mov	ebx, [eax+ebx*4]
mov	ebp, edx
and	ebp, 3FFh
fld	dword ptr [ebx+ebp*8+4]
mov	ebx, ecx
shr	ebx, 0Ah
mov	eax, [eax+ebx*4]
mov	ebx, [esp+18h+arg_0]
mov	ebp, ecx
and	ebp, 3FFh
fld	dword ptr [eax+ebp*8+4]
mov	ebp, [esp+18h+var_8]
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_759CE7
inc	edi
dec	ecx
dec	edx
jmp	short loc_759CA0

loc_759CE7:
mov	ecx, [ebx+0Ch]
mov	edx, [ebx+8]
push	ecx
push	edx
push	0FFFFFFFFh
push	edi
push	esi
mov	ecx, ebp
call	sub_759860
mov	eax, 1
sub	eax, edi
add	esi, eax

loc_759D03:
mov	eax, [ebx]
dec	esi
cmp	esi, eax
mov	[esp+18h+var_4], eax
jg	loc_759C80

loc_759D12:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_759BC0 endp

align 10h



; int __stdcall	sub_759D20(float, float, int, int)
sub_759D20 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
push	ebx
push	ebp
xor	eax, eax
push	esi
push	edi
mov	esi, ecx
mov	[esp+28h+var_18], eax
cmp	[esp+28h+arg_C], eax
jz	short loc_759D3D
mov	[esp+28h+var_18], 1

loc_759D3D:
fld	[esp+28h+arg_4]
mov	dword ptr [esi+0D8h], 3FFFFFFFh
fld	[esp+28h+arg_0]
mov	[esi+0DCh], eax
mov	[esi+0A8h], eax
mov	[esp+28h+var_14], eax
cmp	[esi+90h], eax
jbe	loc_759F70

loc_759D6B:
mov	ecx, [esi+8Ch]
mov	ecx, [ecx+eax*4]
and	dword ptr [ecx+2Ch], 0FFFFFFF7h
mov	edx, [ecx]
mov	eax, [edx+4]
mov	edi, [esi+3Ch]
mov	ebx, [ecx+2Ch]
mov	ebp, eax
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
and	eax, 3FFh
fld	dword ptr [ebp+eax*8+4]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_759EA4
mov	edx, [edx+0Ch]
test	edx, edx
jz	loc_759E86
mov	[ecx], edx
mov	eax, [edx]
mov	edx, [edx+4]
mov	edi, [esi+3Ch]
mov	ebx, edx
shr	ebx, 0Ah
mov	ebx, [edi+ebx*4]
and	edx, 3FFh
lea	edx, [ebx+edx*8]
mov	ebx, eax
shr	ebx, 0Ah
mov	edi, [edi+ebx*4]
and	eax, 3FFh
fld	dword ptr [edi+eax*8]
fstp	dword ptr [ecx+8]
fld	dword ptr [edx+4]
fld	st(2)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_759DEE
fld	dword ptr [edx]
jmp	short loc_759E10

loc_759DEE:
mov	edx, [ecx]
fld	st(1)
mov	eax, [edx]
mov	ebx, [esi+3Ch]
mov	edi, eax
shr	edi, 0Ah
mov	edi, [ebx+edi*4]
and	eax, 3FFh
fsub	dword ptr [edi+eax*8+4]
lea	eax, [edi+eax*8]
fmul	dword ptr [edx+8]
fadd	dword ptr [eax]

loc_759E10:
mov	eax, [ecx+14h]
fstp	[esp+28h+var_10]
fld	[esp+28h+var_10]
mov	edx, [ecx+18h]
fstp	dword ptr [ecx+0Ch]
test	eax, eax
jz	short loc_759E41
cmp	eax, [esi+0D8h]
jnb	short loc_759E33
mov	[esi+0D8h], eax

loc_759E33:
cmp	eax, [esi+0DCh]
jbe	short loc_759E41
mov	[esi+0DCh], eax

loc_759E41:
test	edx, edx
jz	short loc_759E61
cmp	edx, [esi+0D8h]
jnb	short loc_759E53
mov	[esi+0D8h], edx

loc_759E53:
cmp	edx, [esi+0DCh]
jbe	short loc_759E61
mov	[esi+0DCh], edx

loc_759E61:
mov	eax, [esi+0A8h]
mov	edx, [esi+0A4h]
lea	edx, [edx+eax*4]
inc	eax
mov	[esi+0A8h], eax
mov	eax, [esp+28h+var_14]
mov	[edx], eax
or	dword ptr [ecx+2Ch], 8
jmp	loc_759F5F

loc_759E86:
fld	dword ptr [ecx+0Ch]
or	[esp+28h+var_18], 2
mov	eax, [esp+28h+var_14]
fstp	dword ptr [ecx+8]
or	ebx, 2
mov	[ecx+2Ch], ebx
or	dword ptr [ecx+2Ch], 8
jmp	loc_759F5F

loc_759EA4:
mov	eax, [edx+4]
fld	dword ptr [ecx+0Ch]
mov	edx, eax
shr	edx, 0Ah
mov	edx, [edi+edx*4]
fstp	dword ptr [ecx+8]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
lea	edx, [edx+eax*8]
fld	st(2)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_759ED0
fld	dword ptr [edx]
jmp	short loc_759EF2

loc_759ED0:
mov	edx, [ecx]
fld	st(1)
mov	eax, [edx]
mov	ebx, [esi+3Ch]
mov	edi, eax
shr	edi, 0Ah
mov	edi, [ebx+edi*4]
and	eax, 3FFh
fsub	dword ptr [edi+eax*8+4]
lea	eax, [edi+eax*8]
fmul	dword ptr [edx+8]
fadd	dword ptr [eax]

loc_759EF2:
mov	eax, [ecx+14h]
fstp	[esp+28h+var_10]
fld	[esp+28h+var_10]
fstp	dword ptr [ecx+0Ch]
mov	ecx, [ecx+18h]
test	eax, eax
jz	short loc_759F23
cmp	eax, [esi+0D8h]
jnb	short loc_759F15
mov	[esi+0D8h], eax

loc_759F15:
cmp	eax, [esi+0DCh]
jbe	short loc_759F23
mov	[esi+0DCh], eax

loc_759F23:
test	ecx, ecx
jz	short loc_759F43
cmp	ecx, [esi+0D8h]
jnb	short loc_759F35
mov	[esi+0D8h], ecx

loc_759F35:
cmp	ecx, [esi+0DCh]
jbe	short loc_759F43
mov	[esi+0DCh], ecx

loc_759F43:
mov	eax, [esi+0A8h]
mov	ecx, [esi+0A4h]
lea	ecx, [ecx+eax*4]
inc	eax
mov	[esi+0A8h], eax
mov	eax, [esp+28h+var_14]
mov	[ecx], eax

loc_759F5F:
inc	eax
mov	[esp+28h+var_14], eax
cmp	eax, [esi+90h]
jb	loc_759D6B

loc_759F70:
cmp	[esp+28h+arg_C], 0
jz	loc_75A112
mov	eax, [esp+28h+arg_8]
add	eax, eax
add	eax, eax
jmp	short loc_759F89

loc_759F85:
mov	eax, [esp+28h+var_10]

loc_759F89:
mov	edx, [esi+70h]
mov	edi, [eax+edx]
mov	edx, [edi]
mov	ecx, [edx+4]
mov	ebx, [esi+3Ch]
add	eax, 4
mov	ebp, ecx
shr	ebp, 0Ah
mov	ebp, [ebx+ebp*4]
mov	[esp+28h+var_10], eax
mov	eax, [edx]
and	ecx, 3FFh
lea	ecx, [ebp+ecx*8+0]
mov	ebp, eax
shr	ebp, 0Ah
mov	ebx, [ebx+ebp*4]
and	eax, 3FFh
fld	dword ptr [ebx+eax*8]
mov	dword ptr [edi+2Ch], 8
fstp	dword ptr [edi+8]
fld	dword ptr [ecx+4]
fld	st(2)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_759FDE
fld	dword ptr [ecx]
jmp	short loc_759FFE

loc_759FDE:
mov	eax, [edx]
fld	st(1)
mov	ebx, [esi+3Ch]
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [ebx+ecx*4]
and	eax, 3FFh
fsub	dword ptr [ecx+eax*8+4]
lea	eax, [ecx+eax*8]
fmul	dword ptr [edx+8]
fadd	dword ptr [eax]

loc_759FFE:
fstp	[esp+28h+arg_8]
xor	ebx, ebx
fld	[esp+28h+arg_8]
fst	dword ptr [edi+0Ch]
mov	edx, [esi+90h]
test	edx, edx
jle	short loc_75A059

loc_75A015:
mov	eax, [esi+8Ch]
fld	dword ptr [edi+8]
mov	ecx, edx
sar	ecx, 1
lea	ebp, [ecx+ebx]
mov	eax, [eax+ebp*4]
fld	dword ptr [eax+8]
mov	[esp+28h+arg_8], eax
fucompp
fnstsw	ax
test	ah, 44h
mov	eax, [esp+28h+arg_8]
jnp	short loc_75A079
fld	dword ptr [edi+8]
fld	dword ptr [eax+8]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_75A085

loc_75A04B:
or	eax, 0FFFFFFFFh
sub	eax, ecx
lea	ebx, [ebp+1]
add	edx, eax

loc_75A055:
test	edx, edx
jg	short loc_75A015

loc_75A059:
mov	eax, [esi+90h]
fstp	st
cmp	ebx, eax
jb	short loc_75A089
mov	ecx, [esi+8Ch]
lea	ecx, [ecx+eax*4]
inc	eax
mov	[esi+90h], eax
mov	[ecx], edi
jmp	short loc_75A0C1

loc_75A079:
fld	dword ptr [eax+0Ch]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_75A04B

loc_75A085:
mov	edx, ecx
jmp	short loc_75A055

loc_75A089:
mov	edx, [esi+8Ch]
fstp	st
sub	eax, ebx
fstp	st
add	eax, eax
add	eax, eax
lea	ecx, [edx+ebx*4]
push	eax
push	ecx
add	ecx, 4
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
fld	[esp+34h+arg_4]
mov	eax, [esi+8Ch]
fld	[esp+34h+arg_0]
add	esp, 0Ch
mov	[eax+ebx*4], edi
inc	dword ptr [esi+90h]

loc_75A0C1:
mov	eax, [edi+14h]
mov	edi, [edi+18h]
test	eax, eax
jz	short loc_75A0E7
cmp	eax, [esi+0D8h]
jnb	short loc_75A0D9
mov	[esi+0D8h], eax

loc_75A0D9:
cmp	eax, [esi+0DCh]
jbe	short loc_75A0E7
mov	[esi+0DCh], eax

loc_75A0E7:
test	edi, edi
jz	short loc_75A107
cmp	edi, [esi+0D8h]
jnb	short loc_75A0F9
mov	[esi+0D8h], edi

loc_75A0F9:
cmp	edi, [esi+0DCh]
jbe	short loc_75A107
mov	[esi+0DCh], edi

loc_75A107:
sub	[esp+28h+arg_C], 1
jnz	loc_759F85

loc_75A112:
mov	ebx, [esp+28h+var_18]
xor	eax, eax
lea	edi, [esi+0BCh]
mov	[edi], eax
test	bl, 1
jz	short loc_75A163
mov	[esi+0A8h], eax
cmp	[esi+90h], eax
jbe	short loc_75A163

loc_75A133:
mov	ecx, [esi+8Ch]
mov	edx, [ecx+eax*4]
test	byte ptr [edx+2Ch], 2
jnz	short loc_75A15A
mov	ecx, [esi+0A8h]
mov	edx, [esi+0A4h]
lea	edx, [edx+ecx*4]
inc	ecx
mov	[esi+0A8h], ecx
mov	[edx], eax

loc_75A15A:
inc	eax
cmp	eax, [esi+90h]
jb	short loc_75A133

loc_75A163:
cmp	dword ptr [esi+0A8h], 1
fld	st(1)
fsub	st, st(1)
fstp	[esp+28h+var_10]
jbe	loc_75A2D9
xor	ebp, ebp
mov	[esp+28h+arg_C], ebp

loc_75A17E:
test	ebp, ebp
jl	loc_75A2BD

loc_75A186:
mov	eax, [esi+0A4h]
mov	edx, [eax+ebp*4]
mov	ecx, [esi+8Ch]
mov	ebx, [ecx+edx*4]
fld	dword ptr [ebx+0Ch]
lea	eax, [eax+ebp*4]
mov	eax, [eax+4]
mov	ecx, [ecx+eax*4]
fld	dword ptr [ecx+0Ch]
mov	[esp+28h+arg_8], ecx
fcompp
fnstsw	ax
test	ah, 1
jz	loc_75A2BD
cmp	dword ptr [edi], 0
jnz	short loc_75A1D6
fstp	st
mov	ecx, esi
fstp	st
call	sub_7593D0
fld	[esp+28h+arg_0]
mov	ecx, [esp+28h+arg_8]
fld	[esp+28h+arg_4]
fxch	st(1)

loc_75A1D6:
fld	dword ptr [ecx+0Ch]
mov	eax, [ecx+30h]
fsub	dword ptr [ecx+8]
mov	edx, [ebx+30h]
mov	[esp+28h+var_8], eax
mov	[esp+28h+var_C], edx
fsub	dword ptr [ebx+0Ch]
fadd	dword ptr [ebx+8]
fstp	[esp+28h+arg_8]
fldz
fld	[esp+28h+arg_8]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_75A20B
fstp	st
fld	st
jmp	short loc_75A221

loc_75A20B:
fld	dword ptr [ebx+8]
fsub	dword ptr [ecx+8]
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fmul	[esp+28h+var_10]
fdivrp	st(1), st
fadd	st, st(1)

loc_75A221:
fstp	[esp+28h+var_4]
fld	[esp+28h+var_4]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_75A236
fst	[esp+28h+var_4]

loc_75A236:
fld	[esp+28h+var_4]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_75A24B
fxch	st(1)
fst	[esp+28h+var_4]
fxch	st(1)

loc_75A24B:
mov	ebx, [edi]
shr	ebx, 6
cmp	ebx, [edi+4]
jb	short loc_75A269
fstp	st
push	ebx
mov	ecx, edi
fstp	st
call	sub_757D00
fld	[esp+28h+arg_4]
fld	[esp+28h+arg_0]

loc_75A269:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
and	eax, 3Fh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+28h+var_C]
mov	[eax+edx*4], ecx
mov	ecx, [esp+28h+var_4]
lea	eax, [eax+edx*4]
mov	edx, [esp+28h+var_8]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [edi]
mov	edx, [esi+0A4h]
mov	ecx, [esi+8Ch]
lea	eax, [edx+ebp*4]
sub	ebp, 1
mov	edx, [eax+4]
mov	eax, [eax]
mov	ebx, [ecx+edx*4]
lea	edx, [ecx+edx*4]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
mov	[eax], ebx
mov	[edx], ecx
jns	loc_75A186

loc_75A2BD:
mov	ebp, [esp+28h+arg_C]
inc	ebp
lea	ecx, [ebp+1]
mov	[esp+28h+arg_C], ebp
cmp	ecx, [esi+0A8h]
jb	loc_75A17E
mov	ebx, [esp+28h+var_18]

loc_75A2D9:
cmp	dword ptr [edi], 1
fstp	st
fstp	st
jbe	short loc_75A2F5
mov	edx, [edi]
push	offset sub_756AD0
push	edx
push	0
push	edi
call	sub_758030
add	esp, 10h

loc_75A2F5:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 18h
retn	10h
sub_759D20 endp

align 10h



sub_75A310 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, ecx
mov	ecx, [esp+4+arg_0]
fld	dword ptr [ecx+4]
fld	dword ptr [edi+118h]
fcompp
fnstsw	ax
test	ah, 5
jnp	short loc_75A33A
fld	dword ptr [ecx]
fld	dword ptr [edi+114h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_75A389

loc_75A33A:
mov	eax, [ecx]
push	ebx
mov	[edi+114h], eax
mov	ecx, [ecx+4]
push	esi
lea	esi, [edi+104h]
mov	[edi+118h], ecx
mov	ebx, [esi]
shr	ebx, 0Ah
cmp	ebx, [esi+4]
jb	short loc_75A365
push	ebx
mov	ecx, esi
call	sub_757A80

loc_75A365:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ebx, [edx+ebx*4]
mov	ecx, [edi+114h]
and	eax, 3FFh
mov	[ebx+eax*8], ecx
mov	edx, [edi+118h]
mov	[ebx+eax*8+4], edx
inc	dword ptr [esi]
pop	esi
pop	ebx

loc_75A389:
mov	eax, [edi+104h]
dec	eax
pop	edi
retn	4
sub_75A310 endp

align 10h



; int __stdcall	sub_75A3A0(int,	float, float)
sub_75A3A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
cmp	byte ptr [esp+8+arg_8],	0
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	esi
push	edi
mov	esi, ecx
jnz	short loc_75A401
mov	eax, [ebx+1Ch]
cmp	eax, [ebx+20h]
jnz	short loc_75A401
mov	ecx, [ebx+24h]
cmp	ecx, [ebx+28h]
jnz	short loc_75A401
test	byte ptr [ebx+2Ch], 8
jz	short loc_75A3F5
mov	edx, [ebx]
mov	ecx, [edx]
mov	edx, [esi+3Ch]
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [edx+eax*4]
mov	edi, ecx
and	edi, 3FFh
fld	dword ptr [eax+edi*8+4]
fld	[esp+14h+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jnp	loc_75A47D

loc_75A3F5:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 8
retn	0Ch

loc_75A401:
mov	edi, [ebx]
mov	ecx, [edi]
mov	edx, [esi+3Ch]
push	ebp
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [edx+eax*4]
mov	ebp, ecx
and	ebp, 3FFh
fld	dword ptr [eax+ebp*8+4]
pop	ebp
fld	[esp+14h+arg_4]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_75A453
mov	eax, ecx
fstp	st
shr	eax, 0Ah
mov	edx, [edx+eax*4]
and	ecx, 3FFh
lea	eax, [edx+ecx*8]
push	eax
mov	ecx, esi
call	sub_75A310
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch

loc_75A453:
test	byte ptr [ebx+2Ch], 2
jz	short loc_75A49F
mov	ecx, [edi+4]
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [edx+eax*4]
mov	ebx, ecx
and	ebx, 3FFh
fld	dword ptr [eax+ebx*8+4]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_75A49F
fstp	st

loc_75A47D:
mov	eax, ecx
shr	eax, 0Ah
mov	edx, [edx+eax*4]
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
push	ecx
mov	ecx, esi
call	sub_75A310
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch

loc_75A49F:
mov	eax, [edi]
fld	st
mov	ecx, eax
shr	ecx, 0Ah
mov	edx, [edx+ecx*4]
and	eax, 3FFh
fsub	dword ptr [edx+eax*8+4]
lea	eax, [edx+eax*8]
fmul	dword ptr [edi+8]
fadd	dword ptr [eax]
fstp	[esp+14h+arg_8]
fld	dword ptr [esi+118h]
fcomp	st(1)
fnstsw	ax
fld	[esp+14h+arg_8]
test	ah, 5
jp	short loc_75A50A
fstp	[esp+14h+var_8]
mov	ecx, [esp+14h+var_8]
lea	eax, [esi+114h]
fstp	[esp+14h+var_4]
mov	edx, [esp+14h+var_4]
mov	[eax], ecx
push	eax
lea	ecx, [esi+104h]
mov	[eax+4], edx
call	sub_7596B0
mov	eax, [esi+104h]
pop	edi
pop	esi
dec	eax
pop	ebx
add	esp, 8
retn	0Ch

loc_75A50A:
fld	st
lea	ecx, [esi+114h]
fsub	dword ptr [ecx]
fld	dword ptr [esi+0F0h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_75A554
fstp	[esp+14h+var_8]
mov	eax, [esp+14h+var_8]
mov	[ecx], eax
fstp	[esp+14h+var_4]
mov	edx, [esp+14h+var_4]
mov	[ecx+4], edx
push	ecx
lea	ecx, [esi+104h]
call	sub_7596B0
mov	eax, [esi+104h]
pop	edi
pop	esi
dec	eax
pop	ebx
add	esp, 8
retn	0Ch

loc_75A554:
mov	eax, [esi+104h]
fstp	st(1)
pop	edi
fstp	st
pop	esi
dec	eax
pop	ebx
add	esp, 8
retn	0Ch
sub_75A3A0 endp

align 10h



sub_75A570 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi], 0
push	edi
jnz	short loc_75A5E3
mov	ebx, [ecx+164h]
lea	edi, [ecx+164h]
shr	ebx, 0Ah
cmp	ebx, [edi+4]
jb	short loc_75A59D
push	ebx
mov	ecx, edi
call	sub_757A80

loc_75A59D:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
mov	ecx, [ecx+ebx*4]
and	eax, 3FFh
mov	[ecx+eax*8], ebp
xor	edx, edx
mov	[ecx+eax*8+4], edx
inc	dword ptr [edi]
mov	eax, [edi]
mov	ecx, [edi+0Ch]
dec	eax
mov	edx, eax
shr	edx, 0Ah
mov	edx, [ecx+edx*4]
and	eax, 3FFh
lea	eax, [edx+eax*8]
mov	[esi], eax
or	eax, 0FFFFFFFFh
mov	[esi+0Ch], eax
mov	[esi+8], eax
mov	ecx, [edi]
pop	edi
dec	ecx
mov	[esi+4], ecx
pop	esi
pop	ebp
pop	ebx
retn	8

loc_75A5E3:
mov	eax, [esi+4]
mov	edi, [ecx+170h]
mov	edx, eax
shr	edx, 0Ah
mov	edx, [edi+edx*4]
and	eax, 3FFh
lea	edx, [edx+eax*8]
mov	[esp+10h+arg_4], edx
cmp	[edx], ebp
jz	short loc_75A667
mov	ebx, [ecx+164h]
lea	edi, [ecx+164h]
shr	ebx, 0Ah
cmp	ebx, [edi+4]
jb	short loc_75A624
push	ebx
mov	ecx, edi
call	sub_757A80
mov	edx, [esp+10h+arg_4]

loc_75A624:
mov	ecx, [edi+0Ch]
mov	ecx, [ecx+ebx*4]
mov	eax, [edi]
and	eax, 3FFh
mov	[ecx+eax*8], ebp
xor	ebx, ebx
mov	[ecx+eax*8+4], ebx
inc	dword ptr [edi]
mov	eax, [edi]
mov	ebx, [edi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [ebx+ecx*4]
and	eax, 3FFh
lea	eax, [ecx+eax*8]
mov	[edx+4], eax
mov	ecx, [esi+8]
mov	edx, [esi+4]
mov	[esi+0Ch], ecx
mov	[esi+8], edx
mov	eax, [edi]
dec	eax
mov	[esi+4], eax

loc_75A667:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_75A570 endp

align 10h



sub_75A670 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
or	eax, 0FFFFFFFFh
push	esi
lea	esi, [ecx+154h]
lea	ecx, [esp+1Ch+var_18]
xor	edx, edx
mov	[esp+1Ch+var_14], eax
mov	[esp+1Ch+var_10], eax
mov	[esp+1Ch+var_C], eax
mov	eax, [esp+1Ch+arg_0]
push	ecx
mov	ecx, esi
mov	[esp+20h+var_18], edx
mov	[esp+20h+var_8], eax
mov	[esp+20h+var_4], edx
call	sub_759770
mov	eax, [esi]
mov	ecx, [esi+0Ch]
dec	eax
mov	edx, eax
shr	edx, 6
mov	ecx, [ecx+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
pop	esi
add	esp, 18h
retn	4
sub_75A670 endp

align 10h



sub_75A6D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+24h]
push	esi
mov	esi, [esp+4+arg_4]
cmp	byte ptr [esi+eax], 0
jz	short loc_75A74D
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+4]
test	eax, eax
jnz	short loc_75A6F8
push	esi
call	sub_75A670
mov	[edi+4], eax
pop	edi
pop	esi
retn	8

loc_75A6F8:
cmp	[eax+10h], esi
jz	short loc_75A749
cmp	dword ptr [eax], 0
jz	short loc_75A749
push	esi
call	sub_75A670
mov	ecx, [edi+4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
mov	eax, [edi+4]
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], 0
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	dword ptr [eax+14h], 0

loc_75A749:
mov	[eax+10h], esi
pop	edi

loc_75A74D:
pop	esi
retn	8
sub_75A6D0 endp

align 10h



; int __stdcall	sub_75A760(int,	int, float)
sub_75A760 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
sub	esp, 24h
push	ebx
mov	ebx, ecx
test	eax, eax
jz	loc_75A829
push	edi
mov	edi, [eax+4]
test	edi, edi
jz	loc_75A828
mov	ecx, [edi+10h]
mov	edx, [ebx+24h]
cmp	byte ptr [ecx+edx], 0
jz	loc_75A828
cmp	dword ptr [edi+14h], 0
push	ebp
mov	ebp, [esp+30h+arg_4]
jnz	short loc_75A803
mov	ecx, [ebp+0]
fld	[esp+30h+arg_8]
mov	edx, [ecx+1Ch]
fstp	[esp+30h+var_1C]
mov	eax, [eax+8]
mov	ecx, [ebx+144h]
push	esi
mov	[esp+34h+var_18], edx
mov	[esp+34h+var_14], eax
or	eax, 0FFFFFFFFh
lea	edx, [esp+34h+var_1C]
mov	[esp+34h+var_C], ecx
lea	esi, [ebx+134h]
push	edx
mov	ecx, esi
mov	[esp+38h+var_10], eax
mov	[esp+38h+var_8], 0
mov	[esp+38h+var_4], eax
call	sub_7596F0
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
and	eax, 0Fh
shr	ecx, 4
lea	esi, ds:0[eax*8]
sub	esi, eax
mov	eax, [edx+ecx*4]
lea	ecx, [eax+esi*4]
mov	[edi+14h], ecx
pop	esi

loc_75A803:
mov	edx, [ebp+8]
mov	eax, [ebp+4]
lea	ecx, [esp+30h+var_24]
push	ecx
lea	ecx, [ebx+144h]
mov	[esp+34h+var_24], edx
mov	[esp+34h+var_20], eax
call	sub_759730
mov	edi, [edi+14h]
inc	dword ptr [edi+14h]
pop	ebp

loc_75A828:
pop	edi

loc_75A829:
pop	ebx
add	esp, 24h
retn	0Ch
sub_75A760 endp




sub_75A830 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 34h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+44h+arg_0]
mov	eax, [ecx+4]
mov	ebx, [eax+14h]
mov	edx, [eax+10h]
mov	dword ptr [eax+14h], 0
mov	eax, [ecx+4]
mov	esi, [ebx+10h]
mov	ecx, [ebx+14h]
mov	ebp, [ebx+8]
mov	[esp+44h+var_28], eax
mov	[esp+44h+var_34], edx
mov	edx, [ebx+0Ch]
mov	[esp+44h+var_1C], ecx
lea	eax, [esp+44h+var_2C]
mov	[esp+44h+var_14], eax
mov	[esp+44h+var_18], edx
mov	edx, [edi+150h]
mov	ecx, esi
shr	ecx, 4
mov	ecx, [edx+ecx*4]
mov	eax, esi
and	eax, 0Fh
mov	edx, [ecx+eax*8]
mov	eax, [ebx+4]
mov	[esp+44h+var_30], ebx
mov	[esp+44h+var_2C], ebp
mov	[esp+44h+var_20], esi
mov	[esp+44h+var_C], edx
mov	[esp+44h+var_4], 1

loc_75A8A2:
mov	ecx, [esp+44h+var_C]
cmp	ebp, ecx
jz	loc_75A9FE
cmp	[esp+44h+var_4], 0
jz	short loc_75A8F4
mov	ebp, [esp+44h+arg_0]
mov	eax, [ebp+4]
push	ecx
push	eax
mov	ecx, edi
call	sub_75A570
mov	eax, [esp+44h+arg_4]
mov	ebp, [ebp+4]
cmp	eax, 0FFFFFFFFh
jz	loc_75A9FE
or	eax, 40000000h
push	eax
push	ebp
mov	ecx, edi
call	sub_75A570
mov	ecx, [esp+44h+arg_4]
and	ecx, 0BFFFFFFFh
push	ecx
push	ebp
jmp	loc_75A9F7

loc_75A8F4:
cmp	eax, [esp+44h+var_34]
jnz	short loc_75A908
mov	edx, [esp+44h+var_14]
cmp	dword ptr [edx+4], 0
jnz	loc_75A9AC

loc_75A908:
mov	ebx, [edi+154h]
lea	esi, [edi+154h]
shr	ebx, 6
cmp	ebx, [esi+4]
jb	short loc_75A924
push	ebx
mov	ecx, esi
call	sub_757E80

loc_75A924:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 3Fh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
lea	eax, [eax+edx*8]
xor	ecx, ecx
mov	[eax], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+4], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+0Ch], ecx
mov	ecx, [esp+44h+var_34]
mov	[eax+10h], ecx
xor	ecx, ecx
mov	[eax+14h], ecx
inc	dword ptr [esi]
mov	eax, [esi]
mov	ecx, [esi+0Ch]
dec	eax
mov	edx, eax
shr	edx, 6
mov	ecx, [ecx+edx*4]
mov	edx, [esp+44h+var_14]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	esi, [ecx+eax*8]
mov	[edx+4], esi
cmp	ebp, 0FFFFFFFFh
jz	short loc_75A98B
or	ebp, 40000000h
push	ebp
push	esi
mov	ecx, edi
call	sub_75A570

loc_75A98B:
cmp	[esp+44h+var_C], 0FFFFFFFFh
jz	short loc_75A9A4
mov	eax, [esp+44h+var_C]
and	eax, 0BFFFFFFFh
push	eax
push	esi
mov	ecx, edi
call	sub_75A570

loc_75A9A4:
mov	ebx, [esp+44h+var_30]
mov	esi, [esp+44h+var_20]

loc_75A9AC:
cmp	[esp+44h+var_1C], 0
mov	ecx, [esp+44h+var_14]
jz	short loc_75A9E1
cmp	[esp+44h+arg_4], 0FFFFFFFFh
mov	ebp, [ecx+4]
jz	short loc_75A9FE
mov	edx, [esp+44h+arg_4]
or	edx, 40000000h
push	edx
push	ebp
mov	ecx, edi
call	sub_75A570
mov	eax, [esp+44h+arg_4]
and	eax, 0BFFFFFFFh
push	eax
push	ebp
jmp	short loc_75A9F7

loc_75A9E1:
mov	eax, [ecx+4]
mov	ecx, [esp+44h+arg_4]
mov	edx, [esp+44h+arg_0]
or	ecx, 40000000h
push	ecx
mov	[edx+4], eax
push	eax

loc_75A9F7:
mov	ecx, edi
call	sub_75A570

loc_75A9FE:
cmp	[esp+44h+var_1C], 0
mov	[esp+44h+var_4], 0
jz	short loc_75AA70
mov	ecx, [edi+150h]
dec	[esp+44h+var_1C]
mov	ebp, [esp+44h+var_C]
mov	eax, esi
mov	edx, eax
shr	edx, 4
mov	edx, [ecx+edx*4]
and	eax, 0Fh
inc	esi
cmp	[esp+44h+var_1C], 0
lea	eax, [edx+eax*8]
mov	[esp+44h+var_20], esi
mov	[esp+44h+var_14], eax
jz	short loc_75AA4E
mov	edx, esi
shr	edx, 4
mov	ecx, [ecx+edx*4]
mov	eax, esi
and	eax, 0Fh
mov	edx, [ecx+eax*8]
mov	[esp+44h+var_C], edx
jmp	short loc_75AA56

loc_75AA4E:
mov	eax, [esp+44h+var_18]
mov	[esp+44h+var_C], eax

loc_75AA56:
mov	ecx, [esp+44h+var_14]
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_75AA69
mov	eax, [eax+10h]
jmp	loc_75A8A2

loc_75AA69:
xor	eax, eax
jmp	loc_75A8A2

loc_75AA70:
mov	eax, [edi+134h]
mov	ecx, [edi+140h]
dec	eax
mov	edx, eax
and	eax, 0Fh
shr	edx, 4
mov	edx, [ecx+edx*4]
lea	esi, ds:0[eax*8]
sub	esi, eax
lea	eax, [edx+esi*4]
cmp	ebx, eax
jnz	short loc_75AABA
mov	ebx, [ebx+10h]
cmp	ebx, [edi+144h]
jnb	short loc_75AAA9
mov	[edi+144h], ebx

loc_75AAA9:
mov	eax, [edi+134h]
test	eax, eax
jz	short loc_75AABA
dec	eax
mov	[edi+134h], eax

loc_75AABA:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	8
sub_75A830 endp

align 10h



sub_75AAD0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 30h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+40h+arg_0]
mov	eax, [edi+4]
mov	ebp, [eax+14h]
mov	ebx, ecx
mov	ecx, [eax+10h]
mov	dword ptr [eax+14h], 0
mov	eax, [edi+4]
mov	edx, [ebp+8]
mov	esi, [ebp+10h]
mov	[esp+40h+arg_0], ecx
mov	ecx, [ebp+0Ch]
mov	[esp+40h+var_28], eax
mov	eax, [ebp+14h]
mov	[esp+40h+var_2C], edx
mov	[esp+40h+var_1C], eax
mov	eax, [ebx+150h]
mov	[esp+40h+var_18], ecx
mov	edx, esi
shr	edx, 4
mov	edx, [eax+edx*4]
mov	ecx, esi
and	ecx, 0Fh
mov	eax, [edx+ecx*8]
push	eax
mov	[esp+44h+var_C], eax
mov	eax, [edi+4]
push	eax
mov	ecx, ebx
mov	[esp+48h+var_30], ebp
call	sub_75A570
mov	eax, [esp+40h+arg_4]
mov	ecx, [edi+4]
push	eax
push	ecx
mov	ecx, ebx
call	sub_75A570
jmp	short loc_75AB54
align 10h

loc_75AB50:
mov	ebp, [esp+40h+var_30]

loc_75AB54:
cmp	[esp+40h+var_1C], 0
jz	loc_75ACAC
mov	ecx, [ebx+150h]
dec	[esp+40h+var_1C]
mov	ebp, [esp+40h+var_C]
mov	eax, esi
mov	edx, eax
shr	edx, 4
mov	edx, [ecx+edx*4]
and	eax, 0Fh
inc	esi
cmp	[esp+40h+var_1C], 0
lea	edx, [edx+eax*8]
mov	[esp+40h+var_20], esi
mov	[esp+40h+var_14], edx
jz	short loc_75ABA3
mov	eax, esi
shr	eax, 4
mov	ecx, [ecx+eax*4]
mov	edi, esi
and	edi, 0Fh
mov	eax, [ecx+edi*8]
mov	[esp+40h+var_C], eax
jmp	short loc_75ABAB

loc_75ABA3:
mov	ecx, [esp+40h+var_18]
mov	[esp+40h+var_C], ecx

loc_75ABAB:
mov	eax, [edx+4]
test	eax, eax
jz	short loc_75ABB7
mov	eax, [eax+10h]
jmp	short loc_75ABB9

loc_75ABB7:
xor	eax, eax

loc_75ABB9:
cmp	ebp, [esp+40h+var_C]
jz	short loc_75AB50
cmp	eax, [esp+40h+arg_0]
jnz	short loc_75ABCF
cmp	dword ptr [edx+4], 0
jnz	loc_75AC75

loc_75ABCF:
mov	edi, [ebx+154h]
lea	esi, [ebx+154h]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_75ABEF
push	edi
mov	ecx, esi
call	sub_757E80
mov	edx, [esp+40h+var_14]

loc_75ABEF:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ecx, [ecx+edi*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
xor	ecx, ecx
mov	[eax], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+4], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+0Ch], ecx
mov	ecx, [esp+40h+arg_0]
mov	[eax+10h], ecx
xor	ecx, ecx
mov	[eax+14h], ecx
inc	dword ptr [esi]
mov	eax, [esi]
mov	esi, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [esi+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	esi, [ecx+eax*8]
mov	[edx+4], esi
cmp	ebp, 0FFFFFFFFh
jz	short loc_75AC56
or	ebp, 40000000h
push	ebp
push	esi
mov	ecx, ebx
call	sub_75A570
mov	edx, [esp+40h+var_14]

loc_75AC56:
mov	eax, [esp+40h+var_C]
cmp	eax, 0FFFFFFFFh
jz	short loc_75AC71
and	eax, 0BFFFFFFFh
push	eax
push	esi
mov	ecx, ebx
call	sub_75A570
mov	edx, [esp+40h+var_14]

loc_75AC71:
mov	esi, [esp+40h+var_20]

loc_75AC75:
cmp	[esp+40h+arg_4], 0FFFFFFFFh
mov	ebp, [edx+4]
jz	loc_75AB50
mov	edi, [esp+40h+arg_4]
mov	edx, edi
or	edx, 40000000h
push	edx
push	ebp
mov	ecx, ebx
call	sub_75A570
and	edi, 0BFFFFFFFh
push	edi
push	ebp
mov	ecx, ebx
call	sub_75A570
jmp	loc_75AB50

loc_75ACAC:
mov	eax, [ebx+134h]
mov	edx, [ebx+140h]
dec	eax
mov	ecx, eax
and	eax, 0Fh
shr	ecx, 4
lea	esi, ds:0[eax*8]
sub	esi, eax
mov	eax, [edx+ecx*4]
lea	ecx, [eax+esi*4]
cmp	ebp, ecx
jnz	short loc_75ACF6
mov	ebp, [ebp+10h]
cmp	ebp, [ebx+144h]
jnb	short loc_75ACE5
mov	[ebx+144h], ebp

loc_75ACE5:
mov	eax, [ebx+134h]
test	eax, eax
jz	short loc_75ACF6
dec	eax
mov	[ebx+134h], eax

loc_75ACF6:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn	8
sub_75AAD0 endp




sub_75AD00 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
sub	esp, 2Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [eax+18h]
push	edi
mov	edi, [esp+3Ch+arg_0]
cmp	ecx, 0FFFFFFFFh
jnz	short loc_75AD1F
mov	[esp+3Ch+var_2C], edi
jmp	short loc_75AD2F

loc_75AD1F:
mov	edx, [esi+128h]
lea	ecx, [ecx+ecx*2]
lea	ecx, [edx+ecx*4]
mov	[esp+3Ch+var_2C], ecx

loc_75AD2F:
mov	edx, [eax+14h]
mov	ecx, [eax+10h]
mov	ebx, [eax+8]
mov	[esp+3Ch+var_1C], edx
mov	edx, [eax+0Ch]
mov	[esp+3Ch+var_20], ecx
mov	[esp+3Ch+var_18], edx
mov	edx, [esi+128h]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edx+ecx*4+8]
mov	edx, [eax+4]
mov	eax, [edi+4]
mov	[esp+3Ch+var_C], ecx
mov	ecx, [eax+10h]
mov	[esp+3Ch+arg_0], ecx
push	0
mov	ecx, esi
mov	[esp+40h+var_8], edx
mov	[esp+40h+var_4], 1
call	sub_75A670
mov	ebp, eax
mov	eax, [edi+4]
mov	edx, [eax]
mov	[ebp+0], edx
mov	ecx, [eax+4]
mov	[ebp+4], ecx
mov	edx, [eax+8]
mov	[ebp+8], edx
mov	ecx, [eax+0Ch]
mov	[ebp+0Ch], ecx
mov	edx, [eax+10h]
mov	[ebp+10h], edx
mov	eax, [eax+14h]
mov	[ebp+14h], eax
mov	eax, [edi+4]
or	ecx, 0FFFFFFFFh
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	ecx, [esp+3Ch+arg_0]
mov	dword ptr [eax], 0
mov	[eax+10h], ecx
mov	dword ptr [eax+14h], 0

loc_75ADC2:
cmp	[esp+3Ch+var_1C], 0
jz	loc_75AE4F
cmp	ebx, [esp+3Ch+var_C]
jz	loc_75AE81
mov	edx, [esp+3Ch+arg_0]
push	edx
push	edi
mov	ecx, esi
call	sub_75A6D0
mov	ecx, [esp+3Ch+arg_8]
mov	eax, [edi+4]
mov	[esp+3Ch+var_28], eax
cmp	ecx, 0FFFFFFFFh
jz	short loc_75AE19
or	ecx, 40000000h
push	ecx
push	eax
mov	ecx, esi
call	sub_75A570
mov	eax, [esp+3Ch+arg_8]
mov	ecx, [esp+3Ch+var_28]
and	eax, 0BFFFFFFFh
push	eax
push	ecx
mov	ecx, esi
call	sub_75A570

loc_75AE19:
mov	eax, [edi+4]
mov	[esp+3Ch+var_28], eax
cmp	ebx, 0FFFFFFFFh
jz	short loc_75AE3A
mov	edx, ebx
or	edx, 40000000h
push	edx
push	eax
mov	ecx, esi
call	sub_75A570
mov	eax, [esp+3Ch+var_28]

loc_75AE3A:
cmp	[esp+3Ch+var_C], 0FFFFFFFFh
jz	short loc_75AE81
mov	ecx, [esp+3Ch+var_C]
and	ecx, 0BFFFFFFFh
push	ecx
push	eax
jmp	short loc_75AE7A

loc_75AE4F:
mov	[edi+4], ebp
cmp	ebx, 0FFFFFFFFh
jz	short loc_75AE68
mov	edx, ebx
or	edx, 40000000h
push	edx
push	ebp
mov	ecx, esi
call	sub_75A570

loc_75AE68:
cmp	[esp+3Ch+var_C], 0FFFFFFFFh
jz	short loc_75AE81
mov	eax, [esp+3Ch+var_C]
and	eax, 0BFFFFFFFh
push	eax
push	ebp

loc_75AE7A:
mov	ecx, esi
call	sub_75A570

loc_75AE81:
mov	eax, [esp+3Ch+var_8]
cmp	eax, [esp+3Ch+arg_0]
jnz	short loc_75AE91
cmp	dword ptr [edi+4], 0
jnz	short loc_75AEE8

loc_75AE91:
mov	ecx, [esi+24h]
cmp	byte ptr [eax+ecx], 0
jnz	short loc_75AEA3
mov	dword ptr [edi+4], 0
jmp	short loc_75AEE8

loc_75AEA3:
cmp	[esp+3Ch+var_4], 0
jz	short loc_75AEAE
mov	edi, [esp+3Ch+var_2C]

loc_75AEAE:
push	eax
push	edi
mov	ecx, esi
call	sub_75A6D0
mov	edi, [edi+4]
cmp	ebx, 0FFFFFFFFh
jz	short loc_75AECE
or	ebx, 40000000h
push	ebx
push	edi
mov	ecx, esi
call	sub_75A570

loc_75AECE:
cmp	[esp+3Ch+var_C], 0FFFFFFFFh
jz	short loc_75AEE8
mov	edx, [esp+3Ch+var_C]
and	edx, 0BFFFFFFFh
push	edx
push	edi
mov	ecx, esi
call	sub_75A570

loc_75AEE8:
cmp	[esp+3Ch+var_1C], 0
mov	[esp+3Ch+var_4], 0
jz	short loc_75AF49
mov	ecx, [esp+3Ch+var_20]
dec	[esp+3Ch+var_1C]
mov	edx, [esi+128h]
mov	ebx, [esp+3Ch+var_C]
mov	eax, ecx
inc	ecx
cmp	[esp+3Ch+var_1C], 0
lea	eax, [eax+eax*2]
mov	[esp+3Ch+var_20], ecx
lea	edi, [edx+eax*4]
jz	short loc_75AF33
lea	ecx, [ecx+ecx*2]
mov	edx, [edx+ecx*4+8]
mov	ecx, [edi]
mov	[esp+3Ch+var_C], edx
mov	edx, [ecx+28h]
mov	[esp+3Ch+var_8], edx
jmp	loc_75ADC2

loc_75AF33:
mov	ecx, [edi]
mov	eax, [esp+3Ch+var_18]
mov	edx, [ecx+28h]
mov	[esp+3Ch+var_C], eax
mov	[esp+3Ch+var_8], edx
jmp	loc_75ADC2

loc_75AF49:
mov	eax, [esp+3Ch+arg_4]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax+14h], 0
pop	ebx
add	esp, 2Ch
retn	0Ch
sub_75AD00 endp

align 10h



sub_75AF60 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
sub	esp, 2Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [eax+18h]
push	edi
mov	edi, [esp+3Ch+arg_0]
cmp	ecx, 0FFFFFFFFh
jnz	short loc_75AF7F
mov	[esp+3Ch+var_2C], edi
jmp	short loc_75AF8F

loc_75AF7F:
mov	edx, [esi+128h]
lea	ecx, [ecx+ecx*2]
lea	ecx, [edx+ecx*4]
mov	[esp+3Ch+var_2C], ecx

loc_75AF8F:
mov	edx, [eax+14h]
mov	ebx, [eax+10h]
mov	ecx, [eax+0Ch]
mov	ebp, [eax+8]
mov	eax, [esi+128h]
mov	[esp+3Ch+var_1C], edx
lea	edx, [ebx+ebx*2]
mov	[esp+3Ch+var_18], ecx
mov	ecx, [eax+edx*4+8]
mov	edx, [esp+3Ch+arg_4]
mov	eax, [edx+4]
mov	[esp+3Ch+var_C], ecx
mov	ecx, [edi+4]
mov	edx, [ecx+10h]
mov	[esp+3Ch+var_20], ebx
mov	[esp+3Ch+var_4], 1
mov	[esp+3Ch+arg_0], edx

loc_75AFCE:
cmp	[esp+3Ch+var_4], 0
mov	[esp+3Ch+var_8], eax
jz	short loc_75B018
mov	eax, [edi+4]
mov	[esp+3Ch+var_28], eax
cmp	ebp, 0FFFFFFFFh
jz	short loc_75AFFA
mov	ecx, ebp
or	ecx, 40000000h
push	ecx
push	eax
mov	ecx, esi
call	sub_75A570
mov	eax, [esp+3Ch+var_28]

loc_75AFFA:
mov	ecx, [esp+3Ch+var_C]
cmp	ecx, 0FFFFFFFFh
jz	loc_75B08E
and	ecx, 0BFFFFFFFh
push	ecx
push	eax
mov	ecx, esi
call	sub_75A570
jmp	short loc_75B08E

loc_75B018:
cmp	ebp, [esp+3Ch+var_C]
jz	short loc_75B08E
mov	edx, [esp+3Ch+arg_0]
push	edx
push	edi
mov	ecx, esi
call	sub_75A6D0
mov	eax, [esp+3Ch+arg_8]
mov	ebx, [edi+4]
cmp	eax, 0FFFFFFFFh
jz	short loc_75B057
or	eax, 40000000h
push	eax
push	ebx
mov	ecx, esi
call	sub_75A570
mov	eax, [esp+3Ch+arg_8]
and	eax, 0BFFFFFFFh
push	eax
push	ebx
mov	ecx, esi
call	sub_75A570

loc_75B057:
mov	ebx, [edi+4]
cmp	ebp, 0FFFFFFFFh
jz	short loc_75B070
mov	ecx, ebp
or	ecx, 40000000h
push	ecx
push	ebx
mov	ecx, esi
call	sub_75A570

loc_75B070:
cmp	[esp+3Ch+var_C], 0FFFFFFFFh
jz	short loc_75B08A
mov	edx, [esp+3Ch+var_C]
and	edx, 0BFFFFFFFh
push	edx
push	ebx
mov	ecx, esi
call	sub_75A570

loc_75B08A:
mov	ebx, [esp+3Ch+var_20]

loc_75B08E:
mov	eax, [esp+3Ch+var_8]
cmp	eax, [esp+3Ch+arg_0]
jnz	short loc_75B09E
cmp	dword ptr [edi+4], 0
jnz	short loc_75B0F5

loc_75B09E:
mov	ecx, [esi+24h]
cmp	byte ptr [eax+ecx], 0
jnz	short loc_75B0B0
mov	dword ptr [edi+4], 0
jmp	short loc_75B0F5

loc_75B0B0:
cmp	[esp+3Ch+var_4], 0
jz	short loc_75B0BB
mov	edi, [esp+3Ch+var_2C]

loc_75B0BB:
push	eax
push	edi
mov	ecx, esi
call	sub_75A6D0
mov	edi, [edi+4]
cmp	ebp, 0FFFFFFFFh
jz	short loc_75B0DB
or	ebp, 40000000h
push	ebp
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B0DB:
cmp	[esp+3Ch+var_C], 0FFFFFFFFh
jz	short loc_75B0F5
mov	edx, [esp+3Ch+var_C]
and	edx, 0BFFFFFFFh
push	edx
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B0F5:
mov	edx, [esp+3Ch+var_1C]
mov	[esp+3Ch+var_4], 0
test	edx, edx
jz	short loc_75B149
mov	ecx, [esi+128h]
mov	ebp, [esp+3Ch+var_C]
mov	eax, ebx
dec	edx
inc	ebx
lea	eax, [eax+eax*2]
mov	[esp+3Ch+var_1C], edx
mov	[esp+3Ch+var_20], ebx
lea	edi, [ecx+eax*4]
test	edx, edx
jz	short loc_75B137
lea	edx, [ebx+ebx*2]
mov	eax, [ecx+edx*4+8]
mov	edx, [edi]
mov	[esp+3Ch+var_C], eax
mov	eax, [edx+28h]
jmp	loc_75AFCE

loc_75B137:
mov	ecx, [esp+3Ch+var_18]
mov	edx, [edi]
mov	eax, [edx+28h]
mov	[esp+3Ch+var_C], ecx
jmp	loc_75AFCE

loc_75B149:
mov	ecx, [esp+3Ch+arg_4]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ecx+14h], 0
pop	ebx
add	esp, 2Ch
retn	0Ch
sub_75AF60 endp

align 10h



sub_75B160 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 60h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+6Ch+arg_0]
mov	eax, [ecx+4]
mov	ebx, [eax+14h]
mov	edx, [eax+10h]
mov	dword ptr [eax+14h], 0
mov	eax, [ebx+8]
mov	[esp+6Ch+var_50], eax
mov	[esp+6Ch+arg_0], edx
mov	edx, [ecx+4]
mov	[esp+6Ch+var_4C], edx
mov	ebp, [ebx+0Ch]
mov	eax, [ebx+10h]
mov	[esp+6Ch+var_18], ebp
lea	ebp, [esp+1Ch]
mov	[esp+6Ch+var_14], ebp
mov	ebp, [ebx+8]
mov	[esp+6Ch+var_10], ebp
mov	ebp, eax
shr	ebp, 4
mov	[esp+6Ch+var_20], eax
lea	edx, [esi+144h]
mov	[esp+6Ch+var_24], edx
mov	edx, [edx+0Ch]
mov	edx, [edx+ebp*4]
mov	ebp, [esp+6Ch+arg_4]
mov	ebp, [ebp+50h+var_3C]
and	eax, 0Fh
mov	eax, [edx+eax*8]
mov	edx, [ebx+4]
mov	[esp+6Ch+var_C], eax
mov	eax, [esp+6Ch+arg_4]
mov	eax, [eax+10h]
mov	[esp+6Ch+var_8], edx
lea	edx, [esi+128h]
mov	[esp+6Ch+var_44], eax
mov	[esp+6Ch+var_40], ebp
mov	ebp, [esp+6Ch+arg_4]
mov	ebp, [ebp+50h+var_44]
lea	eax, [eax+eax*2]
push	edi
mov	edi, [ebx+14h]
cmp	edi, [esp+70h+var_40]
mov	[esp+70h+var_48], edx
mov	edx, [edx]
mov	eax, [edx+eax*4+8]
mov	[esp+70h+var_38], ecx
mov	ecx, [esp+70h+arg_4]
mov	[esp+70h+var_30], eax
sbb	eax, eax
mov	[esp+70h+var_3C], ebp
mov	ebp, [ecx+8]
mov	ecx, [ecx+4]
neg	eax
mov	[esp+70h+var_54], ebx
mov	[esp+70h+var_1C], edi
mov	[esp+70h+var_4], 1
mov	[esp+70h+var_34], ebp
mov	[esp+70h+var_28], 1
mov	[esp+70h+var_5C], eax

loc_75B23D:
mov	[esp+70h+var_2C], ecx

loc_75B241:
mov	edx, [esp+70h+var_10]
mov	eax, [esp+70h+var_C]
cmp	edx, eax
jnz	short loc_75B265
cmp	ebp, 0FFFFFFFFh
jz	loc_75B31C
mov	ecx, [esp+70h+var_30]
cmp	ecx, 0FFFFFFFFh
jz	loc_75B31C
jmp	short loc_75B269

loc_75B265:
mov	ecx, [esp+70h+var_30]

loc_75B269:
cmp	ebp, ecx
jnz	short loc_75B27F
cmp	edx, 0FFFFFFFFh
jz	loc_75B31C
cmp	eax, 0FFFFFFFFh
jz	loc_75B31C

loc_75B27F:
cmp	edx, eax
jnz	short loc_75B28B
cmp	ebp, ecx
jz	loc_75B31C

loc_75B28B:
mov	eax, [esp+70h+arg_0]
cmp	[esp+70h+var_8], eax
jz	short loc_75B2D3
mov	edi, [esp+70h+var_14]
push	eax
push	edi
mov	ecx, esi
call	sub_75A6D0
mov	eax, [esp+70h+var_10]
mov	edi, [edi+4]
cmp	eax, 0FFFFFFFFh
jz	short loc_75B2BC
or	eax, 40000000h
push	eax
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B2BC:
mov	eax, [esp+70h+var_C]
cmp	eax, 0FFFFFFFFh
jz	short loc_75B2D3
and	eax, 0BFFFFFFFh
push	eax
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B2D3:
mov	edx, [esp+70h+var_14]
mov	edi, [edx+4]
cmp	ebp, 0FFFFFFFFh
jz	short loc_75B2EF
mov	eax, ebp
or	eax, 40000000h
push	eax
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B2EF:
mov	eax, [esp+70h+var_30]
cmp	eax, 0FFFFFFFFh
jz	short loc_75B306
and	eax, 0BFFFFFFFh
push	eax
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B306:
mov	ecx, [esp+70h+var_14]
mov	eax, [esp+70h+var_38]
mov	edx, [ecx+4]
mov	edi, [esp+70h+var_1C]
mov	[eax+4], edx
mov	eax, [esp+70h+var_C]

loc_75B31C:
mov	ecx, [esp+70h+var_2C]
cmp	ecx, [esp+70h+arg_0]
jnz	short loc_75B330
mov	edx, [esp+70h+var_38]
cmp	dword ptr [edx+4], 0
jnz	short loc_75B392

loc_75B330:
mov	edx, [esi+24h]
cmp	byte ptr [ecx+edx], 0
jnz	short loc_75B346
mov	ecx, [esp+70h+var_38]
mov	dword ptr [ecx+4], 0
jmp	short loc_75B392

loc_75B346:
mov	edx, [esp+70h+var_38]
push	ecx
push	edx
mov	ecx, esi
call	sub_75A6D0
mov	eax, [esp+70h+var_38]
mov	edi, [eax+4]
cmp	ebp, 0FFFFFFFFh
jz	short loc_75B370
mov	ecx, ebp
or	ecx, 40000000h
push	ecx
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B370:
cmp	[esp+70h+var_30], 0FFFFFFFFh
jz	short loc_75B38A
mov	edx, [esp+70h+var_30]
and	edx, 0BFFFFFFFh
push	edx
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B38A:
mov	eax, [esp+70h+var_C]
mov	edi, [esp+70h+var_1C]

loc_75B392:
cmp	edi, [esp+70h+var_5C]
jz	loc_75B472
mov	[esp+70h+var_4], 0
test	edi, edi
jz	short loc_75B411
mov	ecx, [esp+70h+var_20]
mov	[esp+70h+var_10], eax
mov	eax, ecx
inc	ecx
mov	edx, eax
mov	[esp+70h+var_20], ecx
mov	ecx, [esi+150h]
shr	edx, 4
mov	edx, [ecx+edx*4]
and	eax, 0Fh
dec	edi
lea	eax, [edx+eax*8]
mov	[esp+70h+var_1C], edi
mov	[esp+70h+var_14], eax
test	edi, edi
jz	short loc_75B3ED
mov	eax, [esp+70h+var_20]
mov	edx, eax
shr	edx, 4
mov	ecx, [ecx+edx*4]
and	eax, 0Fh
mov	edx, [ecx+eax*8]
mov	[esp+70h+var_C], edx
jmp	short loc_75B3F5

loc_75B3ED:
mov	eax, [esp+70h+var_18]
mov	[esp+70h+var_C], eax

loc_75B3F5:
mov	ecx, [esp+70h+var_14]
mov	eax, [ecx+4]
test	eax, eax
jz	short loc_75B409
mov	edx, [eax+10h]
mov	[esp+70h+var_8], edx
jmp	short loc_75B411

loc_75B409:
mov	[esp+70h+var_8], 0

loc_75B411:
cmp	[esp+70h+var_40], 0
mov	[esp+70h+var_28], 0
jz	loc_75B241
mov	edx, [esp+70h+var_44]
mov	ecx, [esi+128h]
dec	[esp+70h+var_40]
mov	ebp, [esp+70h+var_30]
mov	eax, edx
lea	eax, [eax+eax*2]
inc	edx
cmp	[esp+70h+var_40], 0
lea	eax, [ecx+eax*4]
mov	[esp+70h+var_44], edx
mov	[esp+70h+var_38], eax
jz	short loc_75B460
mov	eax, [eax]
lea	edx, [edx+edx*2]
mov	ecx, [ecx+edx*4+8]
mov	[esp+70h+var_30], ecx
mov	ecx, [eax+28h]
jmp	loc_75B23D

loc_75B460:
mov	edx, [esp+70h+var_3C]
mov	eax, [eax]
mov	ecx, [eax+28h]
mov	[esp+70h+var_30], edx
jmp	loc_75B23D

loc_75B472:
mov	edx, [esp+70h+var_10]
mov	[esp+70h+var_34], ebp
mov	[esp+70h+var_60], edx
cmp	eax, 0FFFFFFFFh
jz	short loc_75B487
mov	[esp+70h+var_60], eax

loc_75B487:
cmp	[esp+70h+var_40], 0
jz	loc_75B6F2
cmp	[esp+70h+var_60], 0FFFFFFFFh
jz	loc_75B6F2
xor	ebp, ebp
push	offset sub_756A60
lea	ecx, [esp+74h+var_24]
mov	[esp+74h+var_5C], ebp
call	sub_757FB0
push	offset sub_756A80
lea	ecx, [esp+74h+var_48]
call	sub_756B30
mov	edi, [esp+70h+var_14]
mov	eax, [edi+4]
test	eax, eax
jz	short loc_75B51F
mov	ebx, [esp+70h+arg_0]
cmp	[eax+10h], ebx
jnz	short loc_75B51F
push	ebx
mov	ecx, esi
call	sub_75A670
mov	ecx, [edi+4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	ecx, [ecx+14h]
mov	[eax+14h], ecx
mov	[esp+70h+var_5C], eax
mov	eax, [edi+4]
or	ecx, 0FFFFFFFFh
mov	[eax], ebp
mov	[eax+14h], ebp
mov	ebp, [esp+70h+var_5C]
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ebx

loc_75B51F:
mov	ebx, [esp+70h+var_34]
mov	edi, [esp+70h+var_38]
jmp	short loc_75B530
align 10h

loc_75B530:
cmp	[esp+70h+var_40], 0
jnz	loc_75B5C2
mov	[edi+4], ebp
test	ebp, ebp
jnz	short loc_75B581
mov	edx, [esp+70h+arg_0]
push	edx
mov	ecx, esi
call	sub_75A670
mov	ebp, eax
mov	eax, [esp+70h+var_10]
mov	[edi+4], ebp
cmp	eax, 0FFFFFFFFh
jz	short loc_75B56A
or	eax, 40000000h
push	eax
push	ebp
mov	ecx, esi
call	sub_75A570

loc_75B56A:
mov	eax, [esp+70h+var_C]
cmp	eax, 0FFFFFFFFh
jz	short loc_75B581
and	eax, 0BFFFFFFFh
push	eax
push	ebp
mov	ecx, esi
call	sub_75A570

loc_75B581:
mov	eax, [edi+4]
mov	[esp+70h+var_58], eax
cmp	ebx, 0FFFFFFFFh
jz	short loc_75B59E
mov	ecx, ebx
or	ecx, 40000000h
push	ecx
push	eax
mov	ecx, esi
call	sub_75A570

loc_75B59E:
mov	ebp, [esp+70h+var_30]
cmp	ebp, 0FFFFFFFFh
jz	loc_75B634
mov	eax, [esp+70h+var_58]
mov	edx, ebp
and	edx, 0BFFFFFFFh
push	edx
push	eax
mov	ecx, esi
call	sub_75A570
jmp	short loc_75B634

loc_75B5C2:
cmp	ebx, [esp+70h+var_30]
jz	short loc_75B630
mov	ecx, [esp+70h+arg_0]
push	ecx
push	edi
mov	ecx, esi
call	sub_75A6D0
mov	edx, [esp+70h+var_60]
mov	ebp, [edi+4]
or	edx, 40000000h
push	edx
push	ebp
mov	ecx, esi
call	sub_75A570
mov	eax, [esp+70h+var_60]
and	eax, 0BFFFFFFFh
push	eax
push	ebp
mov	ecx, esi
call	sub_75A570
mov	ebp, [edi+4]
cmp	ebx, 0FFFFFFFFh
jz	short loc_75B616
mov	ecx, ebx
or	ecx, 40000000h
push	ecx
push	ebp
mov	ecx, esi
call	sub_75A570

loc_75B616:
cmp	[esp+70h+var_30], 0FFFFFFFFh
jz	short loc_75B630
mov	edx, [esp+70h+var_30]
and	edx, 0BFFFFFFFh
push	edx
push	ebp
mov	ecx, esi
call	sub_75A570

loc_75B630:
mov	ebp, [esp+70h+var_30]

loc_75B634:
mov	eax, [esp+70h+var_2C]
cmp	eax, [esp+70h+arg_0]
jnz	short loc_75B644
cmp	dword ptr [edi+4], 0
jnz	short loc_75B68C

loc_75B644:
mov	ecx, [esi+24h]
cmp	byte ptr [eax+ecx], 0
jnz	short loc_75B656
mov	dword ptr [edi+4], 0
jmp	short loc_75B68C

loc_75B656:
push	eax
push	edi
mov	ecx, esi
call	sub_75A6D0
mov	edi, [edi+4]
cmp	ebx, 0FFFFFFFFh
jz	short loc_75B676
or	ebx, 40000000h
push	ebx
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B676:
cmp	ebp, 0FFFFFFFFh
jz	short loc_75B68C
mov	edx, ebp
and	edx, 0BFFFFFFFh
push	edx
push	edi
mov	ecx, esi
call	sub_75A570

loc_75B68C:
cmp	[esp+70h+var_40], 0
jz	short loc_75B6EE
mov	edx, [esp+70h+var_44]
mov	ecx, [esp+70h+var_48]
dec	[esp+70h+var_40]
mov	ecx, [ecx]
mov	eax, edx
inc	edx
cmp	[esp+70h+var_40], 0
lea	eax, [eax+eax*2]
mov	ebx, ebp
mov	[esp+70h+var_44], edx
lea	edi, [ecx+eax*4]
jz	short loc_75B6D4
mov	ebp, [esp+70h+var_5C]
lea	edx, [edx+edx*2]
mov	eax, [ecx+edx*4+8]
mov	edx, [edi]
mov	[esp+70h+var_30], eax
mov	eax, [edx+28h]
mov	[esp+70h+var_2C], eax
jmp	loc_75B530

loc_75B6D4:
mov	edx, [edi]
mov	ecx, [esp+70h+var_3C]
mov	eax, [edx+28h]
mov	ebp, [esp+70h+var_5C]
mov	[esp+70h+var_30], ecx
mov	[esp+70h+var_2C], eax
jmp	loc_75B530

loc_75B6EE:
mov	ebx, [esp+70h+var_54]

loc_75B6F2:
mov	eax, [esi+134h]
mov	edx, [esi+140h]
dec	eax
mov	ecx, eax
and	eax, 0Fh
shr	ecx, 4
lea	edi, ds:0[eax*8]
sub	edi, eax
mov	eax, [edx+ecx*4]
lea	ecx, [eax+edi*4]
cmp	ebx, ecx
jnz	short loc_75B760
mov	ebx, [ebx+10h]
cmp	ebx, [esi+144h]
jnb	short loc_75B72B
mov	[esi+144h], ebx

loc_75B72B:
mov	eax, [esi+134h]
xor	ecx, ecx
cmp	eax, ecx
jz	short loc_75B74F
mov	edx, [esp+70h+arg_4]
pop	edi
dec	eax
mov	[esi+134h], eax
pop	esi
pop	ebp
mov	[edx+14h], ecx
pop	ebx
add	esp, 60h
retn	8

loc_75B74F:
mov	eax, [esp+70h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	[eax+14h], ecx
pop	ebx
add	esp, 60h
retn	8

loc_75B760:
mov	ecx, [esp+70h+arg_4]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ecx+14h], 0
pop	ebx
add	esp, 60h
retn	8
sub_75B160 endp

align 10h



sub_75B780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, ecx
test	ebp, ebp
jz	loc_75B8EC
mov	eax, [ebp+4]
test	eax, eax
jz	loc_75B8EC
mov	eax, [eax+4]
cmp	eax, 0FFFFFFFFh
jz	short loc_75B7C1
mov	edx, [edi+170h]
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
and	eax, 3FFh
mov	esi, [ecx+eax*8]
jmp	short loc_75B7C4

loc_75B7C1:
or	esi, 0FFFFFFFFh

loc_75B7C4:
mov	dword ptr [ebx+8], 0FFFFFFFFh
mov	dword ptr [ebx+0Ch], 0FFFFFFFFh
mov	[esp+10h+arg_4], 0
lea	ebx, [ebx+0]

loc_75B7E0:
cmp	esi, 0FFFFFFFFh
jz	loc_75B873
mov	eax, [edi+110h]
mov	ecx, esi
and	ecx, 0BFFFFFFFh
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
mov	ebp, ecx
and	ebp, 3FFh
fld	dword ptr [edx+ebp*8+4]
fld	dword ptr [ebx]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_75B86F
test	esi, 40000000h
jz	short loc_75B823
mov	[ebx+8], ecx
jmp	short loc_75B826

loc_75B823:
mov	[ebx+0Ch], esi

loc_75B826:
mov	ebp, [esp+10h+arg_0]
mov	eax, [ebp+4]
push	eax
mov	ecx, edi
call	sub_758D20
mov	eax, [ebp+4]
mov	eax, [eax+4]
cmp	eax, 0FFFFFFFFh
jz	short loc_75B858
mov	edx, [edi+170h]
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
and	eax, 3FFh
mov	esi, [ecx+eax*8]
jmp	short loc_75B85B

loc_75B858:
or	esi, 0FFFFFFFFh

loc_75B85B:
mov	eax, [esp+10h+arg_4]
inc	eax
mov	[esp+10h+arg_4], eax
cmp	eax, 2
jb	loc_75B7E0
jmp	short loc_75B873

loc_75B86F:
mov	ebp, [esp+10h+arg_0]

loc_75B873:
mov	edx, [ebp+4]
cmp	dword ptr [edx+14h], 0
jz	short loc_75B88C
push	ebx
push	ebp
mov	ecx, edi
call	sub_75B160
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_75B88C:
or	ecx, 0FFFFFFFFh
cmp	esi, ecx
jnz	short loc_75B8BE
mov	eax, [ebx+0Ch]
cmp	eax, ecx
jz	short loc_75B8A6
mov	esi, eax
mov	[ebx+0Ch], ecx
mov	eax, [ebp+4]
push	esi
push	eax
jmp	short loc_75B8B7

loc_75B8A6:
mov	eax, [ebx+8]
cmp	eax, ecx
jz	short loc_75B8BE
mov	esi, eax
mov	[ebx+8], ecx
mov	ecx, [ebp+4]
push	esi
push	ecx

loc_75B8B7:
mov	ecx, edi
call	sub_75A570

loc_75B8BE:
mov	ecx, edi
test	esi, 40000000h
jz	short loc_75B8E4
and	esi, 0BFFFFFFFh
push	esi
push	ebx
push	ebp
call	sub_75AD00
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ebx+14h], 0
pop	ebx
retn	8

loc_75B8E4:
push	esi
push	ebx
push	ebp
call	sub_75AF60

loc_75B8EC:
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ebx+14h], 0
pop	ebx
retn	8
sub_75B780 endp

align 10h



sub_75B900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_0]
push	ebx
xor	ebx, ebx
mov	[esp+8+var_4], ecx
cmp	[eax+18h], ebx
jbe	short loc_75B978
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
push	edi

loc_75B918:
mov	edx, [eax+24h]
mov	ecx, ebx
mov	eax, ebx
and	eax, 3Fh
shr	ecx, 6
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
mov	esi, [ecx+eax*8+0Ch]
mov	edi, [ecx+eax*8+10h]
lea	eax, [ecx+eax*8]
add	esi, ebp
add	edi, ebp
cmp	esi, edi
jz	short loc_75B96B
mov	ecx, [esp+14h+var_4]
push	ebp
push	eax
call	sub_759A10
mov	eax, [esp+14h+var_4]
cmp	esi, [eax+0DCh]
jbe	short loc_75B95B
mov	[eax+0DCh], esi

loc_75B95B:
cmp	edi, [eax+0DCh]
jbe	short loc_75B96B
mov	edx, eax
mov	[edx+0DCh], edi

loc_75B96B:
mov	eax, [esp+14h+arg_0]
inc	ebx
cmp	ebx, [eax+18h]
jb	short loc_75B918
pop	edi
pop	esi
pop	ebp

loc_75B978:
pop	ebx
pop	ecx
retn	8
sub_75B900 endp

align 10h



sub_75B980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	eax, [esi+30h]
push	eax
mov	eax, [esi+7Ch]
lea	ebp, [esi+7Ch]
push	eax
push	0
push	ebp
call	sub_758160
fldz
fcom	dword ptr [esi+0E0h]
add	esp, 10h
fnstsw	ax
fld	dword ptr [esi+0E0h]
test	ah, 41h
jnz	short loc_75B9B6
fchs

loc_75B9B6:
fstp	[esp+18h+var_4]
fcom	dword ptr [esi+0E8h]
fnstsw	ax
fld	dword ptr [esi+0E8h]
test	ah, 41h
jnz	short loc_75B9CF
fchs

loc_75B9CF:
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]
fld	[esp+18h+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_75B9E8
fstp	st
jmp	short loc_75B9EA

loc_75B9E8:
fstp	st(1)

loc_75B9EA:
fstp	[esp+18h+var_4]
fld	[esp+18h+var_4]
fld	ds:dbl_15FD488
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [esi+0F0h]
fxch	st(1)
fcom	dword ptr [esi+0E4h]
fnstsw	ax
fld	dword ptr [esi+0E4h]
test	ah, 41h
jnz	short loc_75BA19
fchs

loc_75BA19:
fstp	[esp+18h+var_4]
fcomp	dword ptr [esi+0ECh]
fnstsw	ax
fld	dword ptr [esi+0ECh]
test	ah, 41h
jnz	short loc_75BA32
fchs

loc_75BA32:
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]
fld	[esp+18h+var_4]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_75BA4B
fstp	st
jmp	short loc_75BA4D

loc_75BA4B:
fstp	st(1)

loc_75BA4D:
fstp	[esp+18h+var_4]
xor	ebx, ebx
xor	edi, edi
fmul	[esp+18h+var_4]
mov	[esp+18h+var_8], ebx
fstp	dword ptr [esi+0F4h]
fld	ds:flt_14411EC
fstp	[esp+18h+var_4]
cmp	[ebp+0], ebx
jbe	loc_75BB01
fld	[esp+18h+var_4]

loc_75BA7A:
mov	eax, [esi+88h]
mov	ecx, ebx
shr	ecx, 0Ah
mov	eax, [eax+ecx*4]
mov	edx, ebx
and	edx, 3FFh
mov	ecx, [eax+edx*4]
mov	eax, [esi+3Ch]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
mov	ebp, ecx
and	ebp, 3FFh
fld	dword ptr [edx+ebp*8+4]
lea	edx, [edx+ebp*8]
fsub	st, st(1)
fld	dword ptr [esi+0F4h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_75BAEB
mov	eax, [esi+88h]
fstp	st
mov	ebx, edi
shr	ebx, 0Ah
mov	eax, [eax+ebx*4]
mov	ebx, [esp+18h+var_8]
mov	ebp, edi
and	ebp, 3FFh
mov	[eax+ebp*4], ecx
fld	dword ptr [edx+4]
fstp	[esp+18h+var_4]
inc	edi
fld	[esp+18h+var_4]
jmp	short loc_75BAEE

loc_75BAEB:
fst	dword ptr [edx+4]

loc_75BAEE:
inc	ebx
lea	ebp, [esi+7Ch]
mov	[esp+18h+var_8], ebx
cmp	ebx, [ebp+0]
jb	loc_75BA7A
fstp	st

loc_75BB01:
cmp	edi, [ebp+0]
jnb	short loc_75BB09
mov	[ebp+0], edi

loc_75BB09:
xor	edi, edi
cmp	[esi+40h], edi
jbe	short loc_75BB31

loc_75BB10:
mov	edx, [esi+4Ch]
mov	eax, edi
and	eax, 3Fh
mov	ecx, edi
shr	ecx, 6
shl	eax, 4
add	eax, [edx+ecx*4]
mov	ecx, esi
push	eax
call	sub_759BC0
inc	edi
cmp	edi, [esi+40h]
jb	short loc_75BB10

loc_75BB31:
mov	ebx, [esi+60h]
cmp	ebx, [esi+78h]
lea	edi, [esi+70h]
jbe	short loc_75BB7C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
lea	eax, [ebx+20h]
mov	[edi+8], eax
test	eax, eax
jz	short loc_75BB78
mov	ecx, dword_1855FC0
add	eax, eax
add	eax, eax
lea	ebp, [esp+18h+var_4]
push	ebp
mov	[esp+1Ch+var_4], 85h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	edi
call	eax
jmp	short loc_75BB7A

loc_75BB78:
xor	eax, eax

loc_75BB7A:
mov	[edi], eax

loc_75BB7C:
xor	eax, eax
mov	[edi+4], ebx
cmp	[esi+60h], eax
jbe	short loc_75BBCB

loc_75BB86:
mov	ebx, [esi+6Ch]
mov	ecx, eax
and	ecx, 3Fh
lea	ebp, ds:0[ecx*8]
sub	ebp, ecx
mov	edx, eax
shr	edx, 6
mov	ecx, [ebx+edx*4]
lea	edx, [ecx+ebp*8]
mov	ecx, [edx]
mov	ecx, [ecx]
mov	ebp, [esi+3Ch]
mov	ebx, ecx
shr	ebx, 0Ah
mov	ebx, [ebp+ebx*4+0]
and	ecx, 3FFh
fld	dword ptr [ebx+ecx*8+4]
inc	eax
fstp	dword ptr [edx+4]
mov	ecx, [edi]
mov	[ecx+eax*4-4], edx
cmp	eax, [esi+60h]
jb	short loc_75BB86

loc_75BBCB:
mov	edx, [edi+4]
push	offset sub_756A90
push	edx
push	0
push	edi
call	sub_756BA0
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_75B980 endp

align 10h



sub_75BBF0 proc	near

var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 40h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+1A0h]
mov	ecx, [esi+1B0h]
mov	eax, [eax]
mov	edx, [eax]
mov	ecx, [ecx]
mov	ecx, [ecx+4]
mov	eax, [eax+4]
mov	ebx, 1
push	edi
mov	[esp+50h+var_3C], ebx
mov	edi, ebx
mov	[esp+50h+var_18], edx
mov	[esp+50h+var_14], ecx
mov	[esp+50h+var_10], eax
cmp	edx, ecx
jz	short loc_75BC44
cmp	ecx, eax
jz	short loc_75BC44
cmp	eax, edx
jz	short loc_75BC44
lea	edx, [esp+50h+var_18]
push	edx
lea	ecx, [esi+184h]
call	sub_759810

loc_75BC44:
mov	eax, [esi+194h]
dec	eax
mov	[esp+50h+var_2C], eax
mov	eax, [esi+1A4h]
dec	eax
mov	[esp+50h+var_30], eax
mov	eax, 2
mov	[esp+50h+var_34], eax
mov	[esp+50h+var_38], eax
jmp	short loc_75BC70
align 10h

loc_75BC70:
cmp	ebx, [esp+50h+var_2C]
jb	loc_75BD3E
cmp	edi, [esp+50h+var_30]
jnb	loc_75C074
mov	ecx, [esi+1A0h]
mov	eax, ebx
shr	eax, 8
mov	eax, [ecx+eax*4]
mov	edx, ebx
and	edx, 0FFh
mov	ecx, [eax+edx*4]
mov	eax, [esi+1B0h]
mov	[esp+50h+var_18], ecx
mov	edx, edi
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ecx, edi
and	ecx, 0FFh
mov	ecx, [edx+ecx*4]
inc	edi
inc	[esp+50h+var_34]
mov	edx, edi
mov	ebp, edi

loc_75BCC3:
shr	edx, 8
mov	eax, [eax+edx*4]
mov	edx, [esp+50h+var_18]
and	ebp, 0FFh
mov	eax, [eax+ebp*4]
mov	[esp+50h+var_14], ecx
mov	[esp+50h+var_10], eax
cmp	edx, ecx
jz	short loc_75BC70
cmp	ecx, eax
jz	short loc_75BC70
cmp	eax, edx
jz	short loc_75BC70
mov	ecx, [esi+184h]
lea	ebp, [esi+184h]
shr	ecx, 0Ah
mov	[esp+50h+var_1C], ecx
cmp	ecx, [ebp+4]
jb	short loc_75BD0E
push	ecx
mov	ecx, ebp
call	sub_757F00
mov	ecx, [esp+50h+var_1C]

loc_75BD0E:
mov	eax, [ebp+0]
mov	edx, [ebp+0Ch]
mov	ecx, [edx+ecx*4]
mov	edx, [esp+50h+var_18]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+50h+var_14]
mov	[eax], edx
mov	edx, [esp+50h+var_10]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [ebp+0]
jmp	loc_75BC70

loc_75BD3E:
mov	eax, [esi+1A0h]
mov	ebp, edi
and	ebp, 0FFh
mov	ecx, ebx
cmp	edi, [esp+50h+var_30]
jnb	loc_75C03C
shr	ecx, 8
mov	edx, [eax+ecx*4]
and	ebx, 0FFh
mov	ecx, [edx+ebx*4]
mov	edx, [esi+1B0h]
mov	ebx, edi
shr	ebx, 8
mov	ebx, [edx+ebx*4]
mov	ebx, [ebx+ebp*4]
mov	[esp+50h+var_28], ebx
mov	[esp+50h+var_14], ebx
mov	ebx, [esp+50h+var_38]
mov	ebp, ebx
mov	[esp+50h+var_18], ecx
mov	[esp+50h+var_C], ecx
mov	ecx, [esp+50h+var_28]
shr	ebp, 8
mov	eax, [eax+ebp*4]
and	ebx, 0FFh
mov	ebx, [eax+ebx*4]
mov	eax, [esp+50h+var_34]
mov	[esp+50h+var_8], ecx
mov	ecx, eax
shr	ecx, 8
mov	edx, [edx+ecx*4]
mov	ecx, [esp+50h+var_18]
and	eax, 0FFh
mov	ebp, [edx+eax*4]
mov	eax, [esi+110h]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
mov	[esp+50h+var_28], ecx
mov	ecx, [esp+50h+var_14]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
mov	edx, ebx
mov	[esp+50h+var_10], ebx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
and	ebx, 3FFh
fld	dword ptr [edx+ebx*8]
lea	edx, [edx+ebx*8]
fsub	dword ptr [ecx]
mov	ebx, ebp
fld	dword ptr [ecx]
shr	ebx, 0Ah
mov	eax, [eax+ebx*4]
mov	[esp+50h+var_4], ebp
and	ebp, 3FFh
lea	ebx, [eax+ebp*8]
mov	ebp, [esp+50h+var_28]
fsub	dword ptr [ebp+0]
mov	[esp+50h+var_3E], 1
fld	dword ptr [ecx+4]
fsub	dword ptr [ebp+4]
fmul	st, st(2)
fld	dword ptr [edx+4]
fsub	dword ptr [ecx+4]
fmul	st, st(2)
fsubp	st(1), st
fstp	[esp+50h+var_28]
fld	[esp+50h+var_28]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_75BE56
mov	[esp+50h+var_3E], 0

loc_75BE56:
fld	dword ptr [ebx]
mov	[esp+50h+var_3D], 1
fsub	dword ptr [ecx]
fld	dword ptr [ecx+4]
fsub	dword ptr [ebp+4]
fmul	st, st(1)
fld	dword ptr [ebx+4]
fsub	dword ptr [ecx+4]
fmulp	st(4), st
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+50h+var_28]
fld	[esp+50h+var_28]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	short loc_75BE89
mov	[esp+50h+var_3D], 0

loc_75BE89:
cmp	[esp+50h+var_3E], 0
jz	loc_75C000
cmp	[esp+50h+var_3D], 0
jz	short loc_75BF06
fld	dword ptr [ebx+4]
mov	[esp+50h+var_3E], 1
fsub	dword ptr [ecx+4]
fld	dword ptr [edx]
fsub	dword ptr [ebx]
fmulp	st(1), st
fld	dword ptr [edx+4]
fsub	dword ptr [ebx+4]
fmulp	st(3), st
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+50h+var_28]
fld	[esp+50h+var_28]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	short loc_75BECE
mov	[esp+50h+var_3E], 0

loc_75BECE:
fld	dword ptr [ebx]
fsub	dword ptr [edx]
fld	dword ptr [edx+4]
fsub	dword ptr [ebp+4]
fmulp	st(1), st
fld	dword ptr [ebx+4]
fsub	dword ptr [edx+4]
fld	dword ptr [edx]
fsub	dword ptr [ebp+0]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+50h+var_28]
fcomp	[esp+50h+var_28]
fnstsw	ax
test	ah, 41h
jp	short loc_75BEFF
mov	[esp+50h+var_3D], 1
jmp	short loc_75BF0A

loc_75BEFF:
mov	[esp+50h+var_3D], 0
jmp	short loc_75BF0A

loc_75BF06:
fstp	st(1)
fstp	st

loc_75BF0A:
cmp	[esp+50h+var_3E], 0
jz	loc_75C004
cmp	[esp+50h+var_3D], 0
jz	loc_75BFC4
fstp	[esp+50h+var_24]
fld	dword ptr [edx+4]
fsub	dword ptr [ecx+4]
fstp	[esp+50h+var_28]
fld	dword ptr [ebx]
fsub	dword ptr [ebp+0]
fstp	[esp+50h+var_1C]
fld	dword ptr [ebx+4]
fsub	dword ptr [ebp+4]
fstp	[esp+50h+var_20]
fld	[esp+50h+var_28]
fld	[esp+50h+var_24]
fld	[esp+50h+var_20]
fld	[esp+50h+var_1C]
fld	st(2)
fmulp	st(3), st
fld	st(3)
fmulp	st(4), st
fxch	st(2)
faddp	st(3), st
fxch	st(2)
fstp	[esp+50h+var_1C]
fld	[esp+50h+var_1C]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+50h+var_1C]
fld	[esp+50h+var_1C]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_75BFA5
mov	edx, [esp+50h+var_18]
mov	eax, [esp+50h+var_14]
cmp	edx, eax
jz	short loc_75BFEE
mov	ecx, [esp+50h+var_10]
cmp	eax, ecx
jz	short loc_75BFEE
cmp	ecx, edx
jz	short loc_75BFEE
lea	ecx, [esp+50h+var_18]
push	ecx
jmp	short loc_75BFE3

loc_75BFA5:
mov	edx, [esp+50h+var_C]
mov	eax, [esp+50h+var_8]
cmp	edx, eax
jz	short loc_75C02E
mov	ecx, [esp+50h+var_4]
cmp	eax, ecx
jz	short loc_75C02E
cmp	ecx, edx
jz	short loc_75C02E
lea	edx, [esp+50h+var_C]
push	edx
jmp	short loc_75C023

loc_75BFC4:
mov	edx, [esp+50h+var_18]
fstp	st
mov	eax, [esp+50h+var_14]
cmp	edx, eax
jz	short loc_75BFEE
mov	ecx, [esp+50h+var_10]
cmp	eax, ecx
jz	short loc_75BFEE
cmp	ecx, edx
jz	short loc_75BFEE
lea	eax, [esp+50h+var_18]
push	eax

loc_75BFE3:
lea	ecx, [esi+184h]
call	sub_759810

loc_75BFEE:
mov	ebx, [esp+50h+var_3C]
inc	ebx
inc	[esp+50h+var_38]
mov	[esp+50h+var_3C], ebx
jmp	loc_75BC70

loc_75C000:
fstp	st(1)
fstp	st(1)

loc_75C004:
mov	edx, [esp+50h+var_C]
fstp	st
mov	eax, [esp+50h+var_8]
cmp	edx, eax
jz	short loc_75C02E
mov	ecx, [esp+50h+var_4]
cmp	eax, ecx
jz	short loc_75C02E
cmp	ecx, edx
jz	short loc_75C02E
lea	ecx, [esp+50h+var_C]
push	ecx

loc_75C023:
lea	ecx, [esi+184h]
call	sub_759810

loc_75C02E:
mov	ebx, [esp+50h+var_3C]
inc	edi
inc	[esp+50h+var_34]
jmp	loc_75BC70

loc_75C03C:
mov	edx, ebx
shr	edx, 8
mov	edx, [eax+edx*4]
and	ecx, 0FFh
mov	ecx, [edx+ecx*4]
mov	[esp+50h+var_18], ecx
mov	ecx, [esi+1B0h]
mov	edx, edi
shr	edx, 8
mov	edx, [ecx+edx*4]
mov	ecx, [edx+ebp*4]
inc	ebx
inc	[esp+50h+var_38]
mov	[esp+50h+var_3C], ebx
mov	edx, ebx
mov	ebp, ebx
jmp	loc_75BCC3

loc_75C074:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 40h
retn
sub_75BBF0 endp

align 10h



sub_75C080 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4

sub	esp, 3Ch
push	ebx
push	ebp
mov	ebx, ecx
xor	ebp, ebp
push	esi
lea	esi, [ebx+1B4h]
push	edi
mov	[esi], ebp
mov	[esp+4Ch+var_34], ebp
cmp	[ebx+1A4h], ebp
jbe	short loc_75C0F0
nop

loc_75C0A0:
mov	ecx, [ebx+1B0h]
mov	edi, [esi]
mov	eax, ebp
shr	eax, 8
mov	eax, [ecx+eax*4]
mov	edx, ebp
and	edx, 0FFh
shr	edi, 8
lea	ecx, [eax+edx*4]
mov	[esp+4Ch+var_2C], ecx
cmp	edi, [esi+4]
jb	short loc_75C0CF
push	edi
mov	ecx, esi
call	sub_757B00

loc_75C0CF:
mov	edx, [esi+0Ch]
mov	ecx, [edx+edi*4]
mov	eax, [esi]
mov	edx, [esp+4Ch+var_2C]
mov	edx, [edx]
and	eax, 0FFh
mov	[ecx+eax*4], edx
inc	dword ptr [esi]
inc	ebp
cmp	ebp, [ebx+1A4h]
jb	short loc_75C0A0

loc_75C0F0:
mov	eax, [ebx+194h]
mov	edi, [ebx+1A0h]
mov	ecx, [esi]
dec	eax
mov	edx, eax
shr	edx, 8
mov	edx, [edi+edx*4]
mov	edi, [ebx+1C0h]
and	eax, 0FFh
mov	eax, [edx+eax*4]
dec	ecx
mov	edx, ecx
shr	edx, 8
mov	edx, [edi+edx*4]
mov	edi, [ebx+110h]
mov	ebp, ecx
and	ebp, 0FFh
mov	edx, [edx+ebp*4]
mov	ebp, eax
and	eax, 3FFh
shr	ebp, 0Ah
mov	ebp, [edi+ebp*4]
fld	dword ptr [ebp+eax*8+4]
mov	eax, edx
shr	eax, 0Ah
mov	eax, [edi+eax*4]
and	edx, 3FFh
fld	dword ptr [eax+edx*8+4]
mov	[esp+4Ch+var_30], ecx
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_75C164
inc	ecx
mov	[esp+4Ch+var_30], ecx

loc_75C164:
mov	ebp, [ebx+194h]
sub	ebp, 1
jz	short loc_75C1BC
nop

loc_75C170:
mov	edx, [ebx+1A0h]
mov	edi, [esi]
mov	ecx, ebp
shr	ecx, 8
mov	ecx, [edx+ecx*4]
mov	eax, ebp
and	eax, 0FFh
shr	edi, 8
lea	edx, [ecx+eax*4]
mov	[esp+4Ch+var_2C], edx
cmp	edi, [esi+4]
jb	short loc_75C19E
push	edi
mov	ecx, esi
call	sub_757B00

loc_75C19E:
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
mov	ecx, [esi]
mov	eax, [esp+4Ch+var_2C]
mov	eax, [eax]
and	ecx, 0FFh
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
sub	ebp, 1
jnz	short loc_75C170

loc_75C1BC:
mov	ecx, [ebx+1A0h]
mov	ebp, [ecx]
mov	edx, [ebx+1B0h]
mov	eax, [edx]
mov	ecx, [ebp+0]
cmp	ecx, [eax]
jz	short loc_75C1FA
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_75C1E5
push	edi
mov	ecx, esi
call	sub_757B00

loc_75C1E5:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+edi*4]
mov	edx, [ebp+0]
and	eax, 0FFh
mov	[ecx+eax*4], edx
inc	dword ptr [esi]

loc_75C1FA:
lea	eax, [esp+4Ch+var_30]
push	eax
lea	ecx, [esp+50h+var_34]
push	ecx
mov	ecx, ebx
call	sub_757600
mov	ebp, [esi]
mov	ecx, [esp+4Ch+var_34]
xor	edx, edx
lea	eax, [ecx+ebp-1]
div	ebp
lea	eax, [ecx+1]
mov	[esp+4Ch+var_2C], ebp
mov	edi, edx
xor	edx, edx
div	ebp
mov	eax, [ebx+1C0h]
mov	esi, edx
mov	edx, ecx
shr	edx, 8
mov	edx, [eax+edx*4]
and	ecx, 0FFh
mov	ecx, [edx+ecx*4]
mov	[esp+4Ch+var_18], ecx
mov	edx, esi
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ecx, esi
and	ecx, 0FFh
mov	ecx, [edx+ecx*4]
mov	[esp+4Ch+var_14], ecx
mov	edx, edi
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ecx, edi
and	ecx, 0FFh
mov	eax, [edx+ecx*4]
mov	edx, [esp+4Ch+var_18]
mov	ecx, [esp+4Ch+var_14]
mov	[esp+4Ch+var_10], eax
cmp	edx, ecx
jz	short loc_75C2E0
cmp	ecx, eax
jz	short loc_75C2E0
cmp	eax, edx
jz	short loc_75C2E0
mov	edx, [ebx+184h]
lea	ecx, [ebx+184h]
shr	edx, 0Ah
mov	[esp+4Ch+var_34], edx
cmp	edx, [ecx+4]
jb	short loc_75C2A7
push	edx
call	sub_757F00
mov	edx, [esp+4Ch+var_34]

loc_75C2A7:
mov	eax, [ebx+184h]
mov	ecx, [ebx+190h]
mov	ecx, [ecx+edx*4]
mov	edx, [esp+4Ch+var_18]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+4Ch+var_14]
mov	[eax], edx
mov	edx, [esp+4Ch+var_10]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [ebx+184h]
jmp	short loc_75C2E0
align 10h

loc_75C2E0:
mov	eax, [esp+4Ch+var_30]
cmp	edi, eax
jnz	loc_75C3B0
cmp	esi, eax
jz	loc_75C690
xor	edx, edx
lea	eax, [esi+1]
div	ebp
mov	eax, [ebx+1C0h]
mov	ecx, edi
shr	ecx, 8
mov	ecx, [eax+ecx*4]
mov	[esp+4Ch+var_38], edx
mov	edx, edi
and	edx, 0FFh
mov	edx, [ecx+edx*4]
mov	ecx, esi
mov	[esp+4Ch+var_18], edx
shr	ecx, 8
mov	edx, [eax+ecx*4]
and	esi, 0FFh
mov	ecx, [edx+esi*4]
mov	edx, [esp+4Ch+var_38]
mov	esi, edx
shr	esi, 8
mov	eax, [eax+esi*4]
and	edx, 0FFh
mov	eax, [eax+edx*4]
mov	edx, [esp+4Ch+var_18]
mov	[esp+4Ch+var_14], ecx
mov	[esp+4Ch+var_10], eax
cmp	edx, ecx
jz	short loc_75C3A7
cmp	ecx, eax
jz	short loc_75C3A7
cmp	eax, edx
jz	short loc_75C3A7
mov	ecx, [ebx+184h]
lea	esi, [ebx+184h]
shr	ecx, 0Ah
mov	[esp+4Ch+var_1C], ecx
cmp	ecx, [esi+4]
jb	short loc_75C37E
push	ecx
mov	ecx, esi
call	sub_757F00
mov	ecx, [esp+4Ch+var_1C]

loc_75C37E:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ecx*4]
mov	edx, [esp+4Ch+var_18]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+4Ch+var_14]
mov	[eax], edx
mov	edx, [esp+4Ch+var_10]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]

loc_75C3A7:
mov	esi, [esp+4Ch+var_38]
jmp	loc_75C2E0

loc_75C3B0:
mov	ecx, edi
xor	edx, edx
shr	ecx, 8
cmp	esi, eax
lea	eax, [edi+ebp-1]
jz	loc_75C5DA
div	ebp
lea	eax, [esi+1]
mov	[esp+4Ch+var_34], edx
xor	edx, edx
div	ebp
mov	eax, [ebx+1C0h]
mov	ecx, [eax+ecx*4]
mov	[esp+4Ch+var_38], edx
mov	edx, edi
and	edx, 0FFh
mov	ebp, [ecx+edx*4]
mov	edx, esi
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ecx, esi
and	ecx, 0FFh
mov	ecx, [edx+ecx*4]
mov	[esp+4Ch+var_3C], ecx
mov	ecx, [esp+4Ch+var_34]
mov	edx, ecx
shr	edx, 8
mov	edx, [eax+edx*4]
and	ecx, 0FFh
mov	ecx, [edx+ecx*4]
mov	[esp+4Ch+var_10], ecx
mov	ecx, [esp+4Ch+var_38]
mov	edx, ecx
shr	edx, 8
mov	eax, [eax+edx*4]
and	ecx, 0FFh
mov	ecx, [eax+ecx*4]
mov	eax, [ebx+110h]
mov	[esp+4Ch+var_4], ecx
mov	edx, ebp
shr	edx, 0Ah
mov	edx, [eax+edx*4]
mov	ecx, ebp
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
mov	[esp+4Ch+var_20], ecx
mov	ecx, [esp+4Ch+var_3C]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
mov	[esp+4Ch+var_24], ecx
mov	ecx, [esp+4Ch+var_10]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
mov	[esp+4Ch+var_28], ecx
mov	ecx, [esp+4Ch+var_4]
mov	edx, ecx
shr	edx, 0Ah
mov	eax, [eax+edx*4]
mov	edx, [esp+4Ch+var_28]
fld	dword ptr [edx]
and	ecx, 3FFh
lea	eax, [eax+ecx*8]
mov	ecx, [esp+4Ch+var_24]
fsub	dword ptr [ecx]
fstp	[esp+4Ch+var_28]
fld	dword ptr [edx+4]
fsub	dword ptr [ecx+4]
mov	ecx, [esp+4Ch+var_20]
fstp	[esp+4Ch+var_24]
fld	dword ptr [eax]
fsub	dword ptr [ecx]
fstp	[esp+4Ch+var_1C]
fld	dword ptr [eax+4]
fsub	dword ptr [ecx+4]
fstp	[esp+4Ch+var_20]
fld	[esp+4Ch+var_24]
fld	[esp+4Ch+var_28]
fld	[esp+4Ch+var_20]
fld	[esp+4Ch+var_1C]
fld	st(2)
fmulp	st(3), st
fld	st(3)
fmulp	st(4), st
fxch	st(2)
faddp	st(3), st
fxch	st(2)
fstp	[esp+4Ch+var_1C]
fld	[esp+4Ch+var_1C]
fld	st(1)
fmulp	st(2), st
fld	st(2)
fmulp	st(3), st
fxch	st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+var_1C]
fld	[esp+4Ch+var_1C]
fcompp
fnstsw	ax
test	ah, 41h
mov	eax, [esp+4Ch+var_3C]
jnz	short loc_75C574
cmp	ebp, eax
jz	short loc_75C567
mov	ecx, [esp+4Ch+var_10]
cmp	eax, ecx
jz	short loc_75C567
cmp	ecx, ebp
jz	short loc_75C567
mov	ecx, [ebx+184h]
lea	edi, [ebx+184h]
shr	ecx, 0Ah
mov	[esp+4Ch+var_1C], ecx
cmp	ecx, [edi+4]
jb	short loc_75C542
push	ecx
mov	ecx, edi
call	sub_757F00
mov	ecx, [esp+4Ch+var_1C]

loc_75C542:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ecx*4]
mov	edx, [esp+4Ch+var_3C]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+4Ch+var_10]
mov	[eax], ebp
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [edi]

loc_75C567:
mov	edi, [esp+4Ch+var_34]
mov	ebp, [esp+4Ch+var_2C]
jmp	loc_75C2E0

loc_75C574:
cmp	ebp, eax
jz	short loc_75C5CD
mov	ecx, [esp+4Ch+var_4]
cmp	eax, ecx
jz	short loc_75C5CD
cmp	ecx, ebp
jz	short loc_75C5CD
mov	ecx, [ebx+184h]
lea	esi, [ebx+184h]
shr	ecx, 0Ah
mov	[esp+4Ch+var_1C], ecx
cmp	ecx, [esi+4]
jb	short loc_75C5A8
push	ecx
mov	ecx, esi
call	sub_757F00
mov	ecx, [esp+4Ch+var_1C]

loc_75C5A8:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ecx*4]
mov	edx, [esp+4Ch+var_3C]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+4Ch+var_4]
mov	[eax], ebp
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]

loc_75C5CD:
mov	esi, [esp+4Ch+var_38]
mov	ebp, [esp+4Ch+var_2C]
jmp	loc_75C2E0

loc_75C5DA:
div	ebp
mov	eax, [ebx+1C0h]
mov	ecx, [eax+ecx*4]
and	edi, 0FFh
mov	ecx, [ecx+edi*4]
mov	[esp+4Ch+var_18], ecx
mov	ecx, esi
shr	ecx, 8
mov	ecx, [eax+ecx*4]
mov	edi, esi
and	edi, 0FFh
mov	ecx, [ecx+edi*4]
mov	[esp+4Ch+var_14], ecx
mov	ecx, edx
shr	ecx, 8
mov	eax, [eax+ecx*4]
mov	ecx, [esp+4Ch+var_14]
mov	edi, edx
and	edi, 0FFh
mov	eax, [eax+edi*4]
mov	edi, [esp+4Ch+var_18]
mov	[esp+4Ch+var_34], edx
mov	[esp+4Ch+var_10], eax
cmp	edi, ecx
jz	short loc_75C689
cmp	ecx, eax
jz	short loc_75C689
cmp	eax, edi
jz	short loc_75C689
mov	ecx, [ebx+184h]
lea	edi, [ebx+184h]
shr	ecx, 0Ah
mov	[esp+4Ch+var_1C], ecx
cmp	ecx, [edi+4]
jb	short loc_75C65C
push	ecx
mov	ecx, edi
call	sub_757F00
mov	ecx, [esp+4Ch+var_1C]

loc_75C65C:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ecx*4]
mov	edx, [esp+4Ch+var_18]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+4Ch+var_14]
mov	[eax], edx
mov	edx, [esp+4Ch+var_10]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [edi]
mov	edx, [esp+4Ch+var_34]

loc_75C689:
mov	edi, edx
jmp	loc_75C2E0

loc_75C690:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn
sub_75C080 endp

align 10h



sub_75C6A0 proc	near
mov	eax, [ecx+1C8h]
cmp	eax, 3
jz	short loc_75C6BA
cmp	eax, 4
jz	short loc_75C6BA
cmp	eax, 2
jnz	short locret_75C6BF
jmp	sub_75C080

loc_75C6BA:
jmp	sub_75BBF0

locret_75C6BF:
retn
sub_75C6A0 endp




sub_75C6C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
and	[esp+arg_8], 0BFFFFFFFh
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_0]
mov	ebp, [esi+194h]
mov	ebx, ecx
mov	eax, edx
push	edi
shr	ebx, 1Eh
shr	eax, 1Eh
lea	edi, [esi+194h]
and	bl, 1
and	al, 1
and	ecx, 0BFFFFFFFh
and	edx, 0BFFFFFFFh
shr	ebp, 8
mov	[esp+10h+arg_0], ecx
mov	[esp+10h+arg_4], edx
cmp	bl, al
jnz	loc_75C81B
cmp	ebp, [edi+4]
jb	short loc_75C71D
push	ebp
mov	ecx, edi
call	sub_757B00

loc_75C71D:
mov	eax, [edi+0Ch]
mov	edx, [eax+ebp*4]
mov	ecx, [edi]
mov	eax, [esp+10h+arg_4]
and	ecx, 0FFh
mov	[edx+ecx*4], eax
inc	dword ptr [edi]
mov	ebp, [esi+1A4h]
add	esi, 1A4h
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_75C750
push	ebp
mov	ecx, esi
call	sub_757B00

loc_75C750:
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+10h+arg_4]
and	edx, 0FFh
mov	[eax+edx*4], ecx
inc	dword ptr [esi]
test	bl, bl
jz	short loc_75C7C3
mov	ebx, [edi]
shr	ebx, 8
cmp	ebx, [edi+4]
jb	short loc_75C77D
push	ebx
mov	ecx, edi
call	sub_757B00

loc_75C77D:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+10h+arg_0]
and	eax, 0FFh
mov	[ecx+eax*4], edx
inc	dword ptr [edi]
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_75C7A5
push	edi
mov	ecx, esi
call	sub_757B00

loc_75C7A5:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	eax, [esp+10h+arg_8]
and	ecx, 0FFh
pop	edi
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_75C7C3:
mov	ebx, [esi]
shr	ebx, 8
cmp	ebx, [esi+4]
jb	short loc_75C7D5
push	ebx
mov	ecx, esi
call	sub_757B00

loc_75C7D5:
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+10h+arg_0]
and	edx, 0FFh
mov	[eax+edx*4], ecx
inc	dword ptr [esi]
mov	esi, [edi]
shr	esi, 8
cmp	esi, [edi+4]
jb	short loc_75C7FE
push	esi
mov	ecx, edi
call	sub_757B00

loc_75C7FE:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+esi*4]
mov	edx, [esp+10h+arg_8]
and	eax, 0FFh
mov	[ecx+eax*4], edx
inc	dword ptr [edi]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_75C81B:
cmp	ebp, [edi+4]
jb	short loc_75C828
push	ebp
mov	ecx, edi
call	sub_757B00

loc_75C828:
mov	eax, [edi+0Ch]
mov	edx, [eax+ebp*4]
mov	ecx, [edi]
mov	eax, [esp+10h+arg_8]
and	ecx, 0FFh
mov	[edx+ecx*4], eax
inc	dword ptr [edi]
mov	ebp, [esi+1A4h]
add	esi, 1A4h
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_75C85B
push	ebp
mov	ecx, esi
call	sub_757B00

loc_75C85B:
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+10h+arg_8]
and	edx, 0FFh
mov	[eax+edx*4], ecx
inc	dword ptr [esi]
test	bl, bl
jz	short loc_75C8CE
mov	ebx, [edi]
shr	ebx, 8
cmp	ebx, [edi+4]
jb	short loc_75C888
push	ebx
mov	ecx, edi
call	sub_757B00

loc_75C888:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+10h+arg_0]
and	eax, 0FFh
mov	[ecx+eax*4], edx
inc	dword ptr [edi]
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_75C8B0
push	edi
mov	ecx, esi
call	sub_757B00

loc_75C8B0:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	eax, [esp+10h+arg_4]
and	ecx, 0FFh
pop	edi
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_75C8CE:
mov	ebx, [esi]
shr	ebx, 8
cmp	ebx, [esi+4]
jb	short loc_75C8E0
push	ebx
mov	ecx, esi
call	sub_757B00

loc_75C8E0:
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+10h+arg_0]
and	edx, 0FFh
mov	[eax+edx*4], ecx
inc	dword ptr [esi]
mov	esi, [edi]
shr	esi, 8
cmp	esi, [edi+4]
jb	short loc_75C909
push	esi
mov	ecx, edi
call	sub_757B00

loc_75C909:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+esi*4]
mov	edx, [esp+10h+arg_4]
and	eax, 0FFh
mov	[ecx+eax*4], edx
inc	dword ptr [edi]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_75C6C0 endp

align 10h



sub_75C930 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_4]
push	ebp
mov	ebp, [esp+14h+arg_8]
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	esi, ecx
mov	eax, edi
mov	ecx, ebx
and	eax, 0BFFFFFFFh
and	ecx, 0BFFFFFFFh
mov	edx, ebp
and	edx, 0BFFFFFFFh
mov	[esp+1Ch+var_C], eax
mov	[esp+1Ch+var_8], ecx
mov	[esp+1Ch+var_4], edx
cmp	eax, ecx
jz	loc_75CA91
cmp	ecx, edx
jz	loc_75CA91
cmp	edx, eax
jz	loc_75CA91
cmp	byte ptr [esi+5], 0
jz	loc_75CA81
mov	eax, [esi+184h]
cmp	eax, [esi+1C4h]
jnz	short loc_75C99F
push	ebp
push	ebx
jmp	loc_75CA79

loc_75C99F:
mov	ebp, [esi+190h]
dec	eax
mov	ebx, eax
and	eax, 3FFh
shr	ebx, 0Ah
mov	ebx, [ebp+ebx*4+0]
lea	eax, [eax+eax*2]
cmp	[ebx+eax*4+4], ecx
lea	eax, [ebx+eax*4]
jnz	short loc_75C9C4
cmp	[eax], edx
jz	short loc_75C9CD

loc_75C9C4:
cmp	[eax+8], edx
jnz	short loc_75CA0A
cmp	[eax], ecx
jnz	short loc_75CA0A

loc_75C9CD:
push	edi
mov	ecx, esi
call	sub_757120
test	al, al
jz	short loc_75CA0A
mov	ecx, edi
shr	ecx, 1Eh
test	cl, 1
jz	short loc_75C9F8
lea	edx, [esp+1Ch+var_C]
push	edx
lea	ecx, [esi+194h]
call	sub_7597D0
jmp	loc_75CA81

loc_75C9F8:
lea	eax, [esp+1Ch+var_C]
push	eax
lea	ecx, [esi+1A4h]
call	sub_7597D0
jmp	short loc_75CA81

loc_75CA0A:
mov	eax, 3
cmp	[esi+194h], eax
jbe	short loc_75CA43
cmp	[esi+1A4h], eax
jbe	short loc_75CA43
cmp	dword ptr [esi+1C8h], 1
jle	short loc_75CA43
mov	eax, [esi+1C4h]
cmp	eax, [esi+184h]
jnb	short loc_75CA3C
mov	[esi+184h], eax

loc_75CA3C:
mov	ecx, esi
call	sub_75C6A0

loc_75CA43:
mov	edx, [esp+1Ch+arg_8]
mov	ecx, [esi+184h]
xor	eax, eax
mov	[esi+194h], eax
mov	[esi+1A4h], eax
mov	[esi+1C8h], eax
mov	[esi+1CCh], eax
mov	[esi+1D0h], eax
mov	eax, [esp+1Ch+arg_4]
push	edx
mov	[esi+1C4h], ecx
push	eax

loc_75CA79:
push	edi
mov	ecx, esi
call	sub_75C6C0

loc_75CA81:
lea	ecx, [esp+1Ch+var_C]
push	ecx
lea	ecx, [esi+184h]
call	sub_759810

loc_75CA91:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_75C930 endp

align 10h



sub_75CAA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
push	esi
mov	esi, ecx
mov	ecx, eax
and	ecx, 0BFFFFFFFh
mov	[esp+10h+var_C], ecx
mov	ecx, [esp+10h+arg_4]
mov	edx, ecx
push	edi
and	edx, 0BFFFFFFFh
mov	[esp+14h+var_8], edx
mov	edx, [esp+14h+arg_8]
push	edx
mov	edi, edx
push	ecx
and	edi, 0BFFFFFFFh
push	eax
mov	ecx, esi
mov	[esp+20h+var_4], edi
call	sub_7570A0
fstp	[esp+14h+arg_0]
fldz
fld	st
fld	[esp+14h+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_75CB25
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_75CB0B
pop	edi
xor	al, al
pop	esi
add	esp, 0Ch
retn	0Ch

loc_75CB0B:
lea	eax, [esp+14h+var_C]
push	eax
lea	ecx, [esi+184h]
call	sub_759810
pop	edi
mov	al, 1
pop	esi
add	esp, 0Ch
retn	0Ch

loc_75CB25:
fstp	st(1)
pop	edi
fstp	st
mov	al, 1
pop	esi
add	esp, 0Ch
retn	0Ch
sub_75CAA0 endp

align 10h



sub_75CB40 proc	near

var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 24h
push	ebx
push	esi
mov	edx, eax
push	edi
mov	edi, ecx
mov	esi, [edi+160h]
xor	ecx, ecx
shr	edx, 6
and	eax, 3Fh
mov	[edi+184h], ecx
mov	[edi+194h], ecx
mov	[edi+1A4h], ecx
mov	[edi+1C4h], ecx
mov	[edi+1C8h], ecx
mov	[edi+1CCh], ecx
mov	[edi+1D0h], ecx
mov	edx, [esi+edx*4]
lea	eax, [eax+eax*2]
mov	ebx, [edx+eax*8]
cmp	ebx, ecx
jnz	short loc_75CB9E
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 24h
retn	4

loc_75CB9E:
mov	eax, [ebx]
mov	edx, [edi+110h]
and	eax, 0BFFFFFFFh
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
and	eax, 3FFh
lea	eax, [ecx+eax*8]
mov	edx, eax
mov	esi, eax
mov	byte ptr [esp+30h+arg_0], 1
mov	[esp+30h+var_10], eax
mov	[esp+30h+var_18], edx
mov	[esp+30h+var_1C], eax
mov	[esp+30h+var_14], esi
push	ebp

loc_75CBD5:
mov	ebp, [ebx]
mov	eax, ebp
shr	eax, 1Eh
test	al, 1
jz	loc_75CCCC
and	ebp, 0BFFFFFFFh
lea	esi, [edi+194h]
mov	[esp+34h+var_C], ebp
mov	ebp, [esi]
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_75CC0A
push	ebp
mov	ecx, esi
call	sub_757B00
mov	edx, [esp+34h+var_18]

loc_75CC0A:
mov	ecx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [ecx+ebp*4]
mov	ebp, [esp+34h+var_C]
and	eax, 0FFh
mov	[ecx+eax*4], ebp
inc	dword ptr [esi]
cmp	byte ptr [esp+34h+arg_0], 0
jz	short loc_75CC86
mov	eax, [ebx]
fld	dword ptr [edx+4]
mov	esi, [edi+110h]
and	eax, 0BFFFFFFFh
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [esi+ecx*4]
and	eax, 3FFh
lea	ecx, [ecx+eax*8]
mov	eax, [esp+34h+var_10]
fsub	dword ptr [eax+4]
fld	dword ptr [ecx]
fsub	dword ptr [edx]
fmulp	st(1), st
fld	dword ptr [ecx+4]
fsub	dword ptr [edx+4]
fld	dword ptr [edx]
fsub	dword ptr [eax]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+34h+var_C]
fld	[esp+34h+var_C]
fcomp	ds:SrcStr
fnstsw	ax
test	ah, 5
jp	short loc_75CC7C
mov	byte ptr [esp+34h+arg_0], 0

loc_75CC7C:
mov	[esp+34h+var_10], edx
mov	edx, ecx
mov	[esp+34h+var_18], edx

loc_75CC86:
mov	esi, [esp+34h+var_14]

loc_75CC8A:
mov	ebx, [ebx+4]
test	ebx, ebx
jnz	loc_75CBD5
cmp	dword ptr [edi+194h], 2
jb	loc_75D389
cmp	dword ptr [edi+1A4h], 2
jb	loc_75D389
cmp	byte ptr [esp+34h+arg_0], bl
jz	loc_75CD7C
mov	ecx, edi
call	sub_75C080
pop	ebp
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 24h
retn	4

loc_75CCCC:
mov	ebp, [edi+1A4h]
shr	ebp, 8
cmp	ebp, [edi+1A8h]
jb	short loc_75CCF1
push	ebp
lea	ecx, [edi+1A4h]
call	sub_757B00
mov	esi, [esp+34h+var_14]
mov	edx, [esp+34h+var_18]

loc_75CCF1:
mov	eax, [edi+1B0h]
mov	ecx, [edi+1A4h]
mov	eax, [eax+ebp*4]
mov	ebp, [ebx]
and	ecx, 0FFh
mov	[eax+ecx*4], ebp
inc	dword ptr [edi+1A4h]
cmp	byte ptr [esp+34h+arg_0], 0
jz	loc_75CC8A
mov	eax, [ebx]
fld	dword ptr [esi+4]
mov	ebp, [edi+110h]
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [ebp+ecx*4+0]
and	eax, 3FFh
lea	ecx, [ecx+eax*8]
mov	eax, [esp+34h+var_1C]
fsub	dword ptr [eax+4]
fld	dword ptr [ecx]
fsub	dword ptr [esi]
fmulp	st(1), st
fld	dword ptr [ecx+4]
fsub	dword ptr [esi+4]
fld	dword ptr [esi]
fsub	dword ptr [eax]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+34h+var_C]
fld	[esp+34h+var_C]
fcomp	ds:SrcStr
fnstsw	ax
test	ah, 41h
jnz	short loc_75CD6D
mov	byte ptr [esp+34h+arg_0], 0

loc_75CD6D:
mov	[esp+34h+var_1C], esi
mov	esi, ecx
mov	[esp+34h+var_14], esi
jmp	loc_75CC8A

loc_75CD7C:
mov	edx, [edi+1B0h]
mov	ecx, [edx]
mov	eax, [edi+1A0h]
mov	edx, [eax]
mov	edx, [edx]
mov	ebx, 1
mov	[esp+34h+var_1C], ebx
mov	[esp+34h+var_C], ebx
xor	ebx, ebx
cmp	edx, [ecx]
lea	esi, [edi+174h]
setz	bl
mov	dword ptr [esi], 0
mov	eax, [eax]
mov	ecx, [eax]
or	ecx, 40000000h
lea	edx, [esp+34h+arg_0]
mov	[esp+34h+arg_0], ecx
push	edx
mov	ecx, esi
mov	ebp, ebx
mov	[esp+38h+var_20], ebx
call	sub_7597D0
mov	ecx, [edi+1B0h]
mov	ebx, [esp+34h+var_C]
mov	eax, ebp
shr	eax, 8
mov	eax, [ecx+eax*4]
mov	edx, ebp
and	edx, 0FFh
lea	ecx, [eax+edx*4]
mov	edx, [edi+1A0h]
mov	eax, [edx]
mov	eax, [eax+4]
cmp	eax, [ecx]
jnb	short loc_75CE1A
lea	ecx, [esp+34h+arg_0]
or	eax, 40000000h
push	ecx
mov	ebx, 2
mov	ecx, esi
mov	[esp+38h+arg_0], eax
mov	[esp+38h+var_1C], ebx
call	sub_7597D0
jmp	short loc_75CE27

loc_75CE1A:
push	ecx
mov	ecx, esi
call	sub_7597D0
inc	ebp
mov	[esp+34h+var_20], ebp

loc_75CE27:
mov	edx, [edi+194h]
mov	eax, [edi+1A4h]
lea	ecx, [ebx-1]
mov	[esp+34h+var_8], edx
mov	[esp+34h+var_C], eax
mov	[esp+34h+var_18], ecx

loc_75CE42:
cmp	ebx, [esp+34h+var_8]
jb	loc_75CF09
cmp	ebp, [esp+34h+var_C]
jnb	loc_75D2EF
mov	eax, [esp+34h+var_20]
mov	edx, [edi+1B0h]
mov	ecx, eax
mov	ebp, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	ebp, 0FFh
mov	ebp, [ecx+ebp*4]
inc	eax
mov	[esp+34h+var_20], eax

loc_75CE78:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
dec	eax
mov	edx, eax
shr	edx, 8
mov	edx, [ecx+edx*4]
and	eax, 0FFh
mov	eax, [edx+eax*4]
mov	[esp+34h+var_4], eax
mov	ecx, ebp
shr	ecx, 1Eh
shr	eax, 1Eh
and	cl, 1
and	al, 1
mov	[esp+34h+var_14], ebp
mov	byte ptr [esp+34h+arg_0], cl
cmp	cl, al
jz	loc_75D238
cmp	dword ptr [esi], 1
jbe	loc_75D20E

loc_75CEB8:
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
mov	edx, [ecx+eax*4]
mov	eax, [esi]
mov	[esp+34h+var_10], edx
test	eax, eax
jz	short loc_75CEDB
dec	eax
mov	[esi], eax

loc_75CEDB:
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
cmp	byte ptr [esp+34h+arg_0], 0
lea	eax, [ecx+eax*4]
mov	ecx, edi
jz	loc_75D1EF
mov	edx, [esp+34h+var_10]
mov	eax, [eax]
jmp	loc_75D1F5

loc_75CF09:
cmp	ebp, [esp+34h+var_C]
jnb	loc_75D1C2
test	ebp, ebp
jnz	short loc_75CF60
mov	eax, [edi+1A0h]
mov	edx, ebx
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ecx, ebx
and	ecx, 0FFh
mov	eax, [edx+ecx*4]
mov	ecx, [edi+1B0h]
mov	edx, [ecx]
mov	ebp, [edx]
cmp	eax, ebp
jnb	short loc_75CF53
or	eax, 40000000h
inc	ebx
inc	[esp+34h+var_18]
mov	ebp, eax
mov	[esp+34h+var_1C], ebx
jmp	loc_75CE78

loc_75CF53:
mov	[esp+34h+var_20], 1
jmp	loc_75CE78

loc_75CF60:
mov	eax, [esp+34h+var_18]
mov	ecx, [edi+1A0h]
mov	edx, eax
shr	edx, 8
mov	ecx, [ecx+edx*4]
mov	edx, [edi+1B0h]
and	eax, 0FFh
mov	eax, [ecx+eax*4]
mov	ecx, [esp+34h+var_20]
dec	ecx
mov	ebp, ecx
shr	ebp, 8
mov	edx, [edx+ebp*4]
mov	ebp, ebx
and	ebx, 0FFh
and	ecx, 0FFh
mov	ecx, [edx+ecx*4]
mov	edx, [edi+1A0h]
shr	ebp, 8
mov	edx, [edx+ebp*4]
mov	edx, [edx+ebx*4]
mov	[esp+34h+arg_0], edx
mov	edx, [esp+34h+var_20]
mov	ebx, edx
shr	ebx, 8
mov	ebp, edx
mov	edx, [edi+1B0h]
mov	edx, [edx+ebx*4]
mov	ebx, eax
and	eax, 3FFh
and	ebp, 0FFh
mov	edx, [edx+ebp*4]
mov	ebp, [esp+34h+arg_0]
shr	ebx, 0Ah
mov	[esp+34h+var_10], edx
mov	edx, [edi+110h]
mov	ebx, [edx+ebx*4]
lea	eax, [ebx+eax*8]
mov	[esp+34h+var_4], eax
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [edx+eax*4]
and	ecx, 3FFh
fld	dword ptr [eax+ecx*8]
lea	ecx, [eax+ecx*8]
mov	eax, ebp
shr	eax, 0Ah
mov	eax, [edx+eax*4]
mov	ebx, ebp
and	ebx, 3FFh
lea	eax, [eax+ebx*8]
mov	[esp+34h+arg_0], eax
mov	eax, [esp+34h+var_10]
mov	ebx, eax
shr	ebx, 0Ah
mov	edx, [edx+ebx*4]
mov	ebx, [esp+34h+var_4]
fsub	dword ptr [ebx]
and	eax, 3FFh
lea	eax, [edx+eax*8]
mov	edx, [esp+34h+arg_0]
fld	dword ptr [edx]
mov	[esp+34h+var_14], eax
fsub	dword ptr [ecx]
mov	[esp+34h+var_21], 1
fld	dword ptr [ecx+4]
fsub	dword ptr [ebx+4]
fmulp	st(1), st
fld	dword ptr [edx+4]
fsub	dword ptr [ecx+4]
fmul	st, st(2)
fsubp	st(1), st
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_75D072
mov	[esp+34h+var_21], 0

loc_75D072:
mov	eax, [esp+34h+var_14]
fld	dword ptr [eax]
fsub	dword ptr [ecx]
fld	dword ptr [ecx+4]
fsub	dword ptr [ebx+4]
fmul	st, st(1)
fld	dword ptr [eax+4]
fsub	dword ptr [ecx+4]
fmulp	st(4), st
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
mov	byte ptr [esp+34h+arg_0], 1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	short loc_75D0A9
mov	byte ptr [esp+34h+arg_0], 0

loc_75D0A9:
cmp	[esp+34h+var_21], 0
jz	loc_75D1A2
cmp	byte ptr [esp+34h+arg_0], 0
jz	short loc_75D12D
mov	eax, [esp+34h+var_14]
fld	dword ptr [edx]
fsub	dword ptr [eax]
mov	[esp+34h+var_21], 1
fld	dword ptr [eax+4]
fsub	dword ptr [ecx+4]
fmulp	st(1), st
fld	dword ptr [edx+4]
fsub	dword ptr [eax+4]
fmulp	st(3), st
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+34h+arg_0]
fld	[esp+34h+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnp	short loc_75D0F2
mov	[esp+34h+var_21], 0

loc_75D0F2:
mov	eax, [esp+34h+var_14]
fld	dword ptr [edx+4]
fsub	dword ptr [ebx+4]
fld	dword ptr [eax]
fsub	dword ptr [edx]
fmulp	st(1), st
fld	dword ptr [edx]
fsub	dword ptr [ebx]
fld	dword ptr [eax+4]
fsub	dword ptr [edx+4]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+34h+arg_0]
fcomp	[esp+34h+arg_0]
fnstsw	ax
test	ah, 41h
jp	short loc_75D126
mov	byte ptr [esp+34h+arg_0], 1
jmp	short loc_75D131

loc_75D126:
mov	byte ptr [esp+34h+arg_0], 0
jmp	short loc_75D131

loc_75D12D:
fstp	st(1)
fstp	st

loc_75D131:
cmp	[esp+34h+var_21], 0
jz	short loc_75D1A6
cmp	byte ptr [esp+34h+arg_0], 0
jz	short loc_75D18A
push	edx
push	ecx
call	sub_756AF0
fstp	[esp+3Ch+arg_0]
mov	ecx, [esp+3Ch+var_14]
push	ecx
push	ebx
call	sub_756AF0
fld	[esp+44h+arg_0]
mov	ebx, [esp+44h+var_1C]
fcompp
add	esp, 10h
fnstsw	ax
test	ah, 5
jp	short loc_75D17D
inc	ebx
or	ebp, 40000000h
inc	[esp+34h+var_18]
mov	[esp+34h+var_1C], ebx
jmp	loc_75CE78

loc_75D17D:
mov	ebp, [esp+34h+var_10]
inc	[esp+34h+var_20]
jmp	loc_75CE78

loc_75D18A:
mov	ebx, [esp+34h+var_1C]
inc	ebx
or	ebp, 40000000h
inc	[esp+34h+var_18]
mov	[esp+34h+var_1C], ebx
jmp	loc_75CE78

loc_75D1A2:
fstp	st(1)
fstp	st

loc_75D1A6:
cmp	byte ptr [esp+34h+arg_0], 0
jz	loc_75D389
mov	ebp, [esp+34h+var_10]
inc	[esp+34h+var_20]
mov	ebx, [esp+34h+var_1C]
jmp	loc_75CE78

loc_75D1C2:
mov	eax, [edi+1A0h]
mov	edx, ebx
shr	edx, 8
mov	edx, [eax+edx*4]
mov	ecx, ebx
and	ecx, 0FFh
mov	ebp, [edx+ecx*4]
inc	ebx
or	ebp, 40000000h
inc	[esp+34h+var_18]
mov	[esp+34h+var_1C], ebx
jmp	loc_75CE78

loc_75D1EF:
mov	edx, [eax]
mov	eax, [esp+34h+var_10]

loc_75D1F5:
push	edx
push	eax
push	ebp
call	sub_75CAA0
test	al, al
jz	loc_75D389
cmp	dword ptr [esi], 1
ja	loc_75CEB8

loc_75D20E:
mov	eax, [esi]
test	eax, eax
jz	short loc_75D217
dec	eax
mov	[esi], eax

loc_75D217:
lea	ecx, [esp+34h+var_4]
push	ecx
mov	ecx, esi
call	sub_7597D0
lea	edx, [esp+34h+var_14]
push	edx
mov	ecx, esi
call	sub_7597D0
mov	ebp, [esp+34h+var_20]
jmp	loc_75CE42

loc_75D238:
cmp	dword ptr [esi], 1
jbe	loc_75D2DA

loc_75D241:
mov	ecx, [esi]
mov	edx, [edi+180h]
lea	eax, [ecx-1]
mov	ebx, eax
and	eax, 0FFh
shr	ebx, 8
mov	ebx, [edx+ebx*4]
mov	ebx, [ebx+eax*4]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 8
mov	edx, [edx+ecx*4]
and	eax, 0FFh
mov	eax, [edx+eax*4]
push	eax
push	ebx
push	ebp
mov	ecx, edi
mov	[esp+40h+arg_0], eax
call	sub_7570A0
fcomp	ds:SrcStr
fnstsw	ax
test	ah, 5
jp	short loc_75D291
mov	ecx, 1
jmp	short loc_75D293

loc_75D291:
xor	ecx, ecx

loc_75D293:
mov	eax, ebx
shr	eax, 1Eh
movzx	edx, al
and	edx, 1
cmp	ecx, edx
jnz	short loc_75D2D6
test	al, 1
jz	short loc_75D2AE
mov	eax, [esp+34h+arg_0]
push	eax
push	ebx
jmp	short loc_75D2B4

loc_75D2AE:
mov	ecx, [esp+34h+arg_0]
push	ebx
push	ecx

loc_75D2B4:
push	ebp
mov	ecx, edi
call	sub_75CAA0
test	al, al
jz	loc_75D389
mov	eax, [esi]
test	eax, eax
jz	short loc_75D2CD
dec	eax
mov	[esi], eax

loc_75D2CD:
cmp	dword ptr [esi], 1
ja	loc_75D241

loc_75D2D6:
mov	ebx, [esp+34h+var_1C]

loc_75D2DA:
lea	edx, [esp+34h+var_14]
push	edx
mov	ecx, esi
call	sub_7597D0
mov	ebp, [esp+34h+var_20]
jmp	loc_75CE42

loc_75D2EF:
mov	eax, [edi+194h]
mov	edx, [edi+1A0h]
dec	eax
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
cmp	dword ptr [esi], 1
mov	ebx, [ecx+eax*4]
jbe	short loc_75D37D

loc_75D311:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
dec	eax
mov	edx, eax
shr	edx, 8
mov	edx, [ecx+edx*4]
and	eax, 0FFh
mov	ecx, [edx+eax*4]
mov	eax, [esi]
test	eax, eax
jz	short loc_75D330
dec	eax
mov	[esi], eax

loc_75D330:
mov	ebp, [esi+0Ch]
mov	eax, ecx
shr	eax, 1Eh
test	al, 1
mov	eax, [esi]
jz	short loc_75D356
dec	eax
mov	edx, eax
shr	edx, 8
mov	edx, [ebp+edx*4+0]
and	eax, 0FFh
lea	eax, [edx+eax*4]
mov	eax, [eax]
push	eax
push	ecx
jmp	short loc_75D36C

loc_75D356:
dec	eax
mov	edx, eax
shr	edx, 8
mov	edx, [ebp+edx*4+0]
and	eax, 0FFh
lea	eax, [edx+eax*4]
mov	eax, [eax]
push	ecx
push	eax

loc_75D36C:
push	ebx
mov	ecx, edi
call	sub_75CAA0
test	al, al
jz	short loc_75D389
cmp	dword ptr [esi], 1
ja	short loc_75D311

loc_75D37D:
pop	ebp
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 24h
retn	4

loc_75D389:
pop	ebp
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 24h
retn	4
sub_75CB40 endp

align 10h



sub_75D3A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 8
push	ebx
push	ebp
xor	ebp, ebp
push	edi
mov	edi, ecx
mov	edx, [edi+160h]
mov	ecx, eax
shr	ecx, 6
and	eax, 3Fh
mov	[edi+184h], ebp
mov	[edi+194h], ebp
mov	[edi+1A4h], ebp
mov	[edi+1C4h], ebp
mov	[edi+1C8h], ebp
mov	[edi+1CCh], ebp
mov	[edi+1D0h], ebp
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
mov	ebx, [ecx+eax*8]
cmp	ebx, ebp
jz	loc_75D6A1
mov	eax, [ebx+4]
cmp	eax, ebp
jz	loc_75D6A1
cmp	[eax+4], ebp
jz	loc_75D6A1
push	esi
lea	esi, [edi+174h]
push	ebx
mov	ecx, esi
mov	[esi], ebp
call	sub_7597D0
mov	ebx, [ebx+4]
push	ebx
mov	ecx, esi
call	sub_7597D0
mov	ebx, [ebx+4]
mov	[esp+18h+var_8], ebx
cmp	[ebx+4], ebp
jz	loc_75D5EC

loc_75D437:
mov	eax, [esi]
mov	edx, [esp+18h+var_8]
mov	ebx, [edx]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
and	eax, 0FFh
shr	ecx, 8
mov	ecx, [edx+ecx*4]
mov	ebp, [ecx+eax*4]
mov	edx, ebx
mov	eax, ebp
shr	edx, 1Eh
shr	eax, 1Eh
and	dl, 1
and	al, 1
mov	[esp+18h+var_4], ebp
mov	byte ptr [esp+18h+arg_0], dl
cmp	dl, al
jz	loc_75D51A
cmp	dword ptr [esi], 1
jbe	short loc_75D4E3
jmp	short loc_75D484
align 10h

loc_75D480:
mov	dl, byte ptr [esp+18h+arg_0]

loc_75D484:
mov	eax, [esi]
mov	ebp, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 8
mov	ecx, [ebp+ecx*4+0]
and	eax, 0FFh
mov	ecx, [ecx+eax*4]
mov	eax, [esi]
test	eax, eax
jz	short loc_75D4A4
dec	eax
mov	[esi], eax

loc_75D4A4:
mov	eax, [esi]
dec	eax
test	dl, dl
mov	edx, eax
jz	short loc_75D4C2
push	ecx
mov	ecx, [esi+0Ch]
shr	edx, 8
mov	edx, [ecx+edx*4]
and	eax, 0FFh
mov	eax, [edx+eax*4]
push	eax
jmp	short loc_75D4D6

loc_75D4C2:
mov	ebp, [esi+0Ch]
shr	edx, 8
mov	edx, [ebp+edx*4+0]
and	eax, 0FFh
mov	eax, [edx+eax*4]
push	eax
push	ecx

loc_75D4D6:
push	ebx
mov	ecx, edi
call	sub_75C930
cmp	dword ptr [esi], 1
ja	short loc_75D480

loc_75D4E3:
mov	eax, [esi]
test	eax, eax
jz	short loc_75D4EC
dec	eax
mov	[esi], eax

loc_75D4EC:
mov	ebp, [esi]
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_75D4FE
push	ebp
mov	ecx, esi
call	sub_757B00

loc_75D4FE:
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+18h+var_4]
and	edx, 0FFh
mov	[eax+edx*4], ecx
inc	dword ptr [esi]
jmp	loc_75D5B1

loc_75D51A:
cmp	dword ptr [esi], 1
jbe	loc_75D5B1

loc_75D523:
mov	ecx, [esi]
mov	edx, [edi+180h]
lea	eax, [ecx-1]
mov	ebp, eax
and	eax, 0FFh
shr	ebp, 8
mov	ebp, [edx+ebp*4]
mov	ebp, [ebp+eax*4+0]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 8
mov	edx, [edx+ecx*4]
and	eax, 0FFh
mov	eax, [edx+eax*4]
push	eax
push	ebp
push	ebx
mov	ecx, edi
mov	[esp+24h+arg_0], eax
call	sub_7570A0
fcomp	ds:SrcStr
fnstsw	ax
test	ah, 5
jp	short loc_75D574
mov	ecx, 1
jmp	short loc_75D576

loc_75D574:
xor	ecx, ecx

loc_75D576:
mov	eax, ebp
shr	eax, 1Eh
movzx	edx, al
and	edx, 1
cmp	ecx, edx
jnz	short loc_75D5B1
test	al, 1
jz	short loc_75D591
mov	eax, [esp+18h+arg_0]
push	eax
push	ebp
jmp	short loc_75D597

loc_75D591:
mov	ecx, [esp+18h+arg_0]
push	ebp
push	ecx

loc_75D597:
push	ebx
mov	ecx, edi
call	sub_75C930
mov	eax, [esi]
test	eax, eax
jz	short loc_75D5A8
dec	eax
mov	[esi], eax

loc_75D5A8:
cmp	dword ptr [esi], 1
ja	loc_75D523

loc_75D5B1:
mov	ebp, [esi]
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_75D5C3
push	ebp
mov	ecx, esi
call	sub_757B00

loc_75D5C3:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+18h+var_8]
and	eax, 0FFh
mov	[ecx+eax*4], ebx
inc	dword ptr [esi]
mov	eax, [edx+4]
cmp	dword ptr [eax+4], 0
mov	[esp+18h+var_8], eax
jnz	loc_75D437
xor	ebp, ebp

loc_75D5EC:
cmp	dword ptr [esi], 1
mov	eax, [esp+18h+var_8]
mov	ebx, [eax]
jbe	short loc_75D667

loc_75D5F7:
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
mov	ecx, [ecx+eax*4]
mov	eax, [esi]
cmp	eax, ebp
jz	short loc_75D616
dec	eax
mov	[esi], eax

loc_75D616:
mov	eax, [esi]
mov	edx, ecx
shr	edx, 1Eh
dec	eax
test	dl, 1
jz	short loc_75D645
mov	ebp, [esi+0Ch]
mov	edx, eax
shr	edx, 8
mov	edx, [ebp+edx*4+0]
and	eax, 0FFh
mov	eax, [edx+eax*4]
push	eax
push	ecx
push	ebx
mov	ecx, edi
call	sub_75C930
xor	ebp, ebp
jmp	short loc_75D662

loc_75D645:
mov	edx, [esi+0Ch]
push	ecx
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
mov	edx, [ecx+eax*4]
push	edx
push	ebx
mov	ecx, edi
call	sub_75C930

loc_75D662:
cmp	dword ptr [esi], 1
ja	short loc_75D5F7

loc_75D667:
mov	eax, 3
pop	esi
cmp	[edi+194h], eax
jbe	short loc_75D6A1
cmp	[edi+1A4h], eax
jbe	short loc_75D6A1
cmp	dword ptr [edi+1C8h], 1
jle	short loc_75D6A1
mov	eax, [edi+1C4h]
cmp	eax, [edi+184h]
jnb	short loc_75D69A
mov	[edi+184h], eax

loc_75D69A:
mov	ecx, edi
call	sub_75C6A0

loc_75D6A1:
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_75D3A0 endp

align 10h



sub_75D6B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+7], 0
push	edi
mov	edi, [esp+8+arg_0]
jz	short loc_75D6C8
push	edi
call	sub_75CB40
test	al, al
jnz	short loc_75D6D0

loc_75D6C8:
push	edi
mov	ecx, esi
call	sub_75D3A0

loc_75D6D0:
pop	edi
pop	esi
retn	4
sub_75D6B0 endp

align 10h



sub_75D6E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
test	eax, eax
jz	short locret_75D732
mov	eax, [eax+4]
test	eax, eax
jz	short locret_75D732
push	esi
mov	esi, [eax+14h]
test	esi, esi
jz	short loc_75D760
fld	dword ptr [esi]
push	ebx
mov	ebx, [ecx+110h]
push	ebp
push	edi
mov	edi, [esp+10h+arg_4]
mov	edx, edi
and	edx, 0BFFFFFFFh
mov	eax, edx
shr	eax, 0Ah
mov	eax, [ebx+eax*4]
mov	ebp, edx
and	ebp, 3FFh
fld	dword ptr [eax+ebp*8+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_75D735
pop	edi
pop	ebp
pop	ebx
mov	[esi+0Ch], edx
pop	esi

locret_75D732:
retn	0Ch

loc_75D735:
push	edi
test	edi, 40000000h
jz	short loc_75D74F
mov	edx, [esp+14h+arg_0]
push	edx
call	sub_75A830
pop	edi
pop	ebp
pop	ebx
pop	esi
retn	0Ch

loc_75D74F:
mov	eax, [esp+14h+arg_0]
push	eax
call	sub_75AAD0
pop	edi
pop	ebp
pop	ebx
pop	esi
retn	0Ch

loc_75D760:
mov	edx, [esp+4+arg_4]
push	edx
push	eax
call	sub_75A570
pop	esi
retn	0Ch
sub_75D6E0 endp

align 10h



; int __stdcall	sub_75D770(int,	float)
sub_75D770 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 6Ch
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+7Ch+arg_0]
xor	edi, edi
xor	eax, eax
mov	[esi+12Ch], edi
mov	[esp+7Ch+var_4C], eax
cmp	[ecx+4], edi
jbe	short loc_75D7DC

loc_75D793:
mov	edx, [ecx]
mov	edx, [edx+eax*4]
test	byte ptr [edx+2Ch], 4
mov	[edx+34h], eax
jz	short loc_75D7D0
mov	eax, [esi+12Ch]
mov	ebx, [esi+128h]
lea	ecx, [eax+eax*2]
or	ebp, 0FFFFFFFFh
lea	ecx, [ebx+ecx*4]
inc	eax
mov	[esi+12Ch], eax
mov	eax, [esp+7Ch+var_4C]
mov	[ecx], edx
mov	[ecx+4], edi
mov	[ecx+8], ebp
mov	ecx, [esp+7Ch+arg_0]

loc_75D7D0:
inc	eax
xor	edi, edi
mov	[esp+7Ch+var_4C], eax
cmp	eax, [ecx+4]
jb	short loc_75D793

loc_75D7DC:
fld	[esp+7Ch+arg_4]
mov	[esp+7Ch+var_68], edi
fstp	[esp+7Ch+var_1C]
mov	[esp+7Ch+var_6C], edi
mov	[esp+7Ch+var_50], 0FFFFFFFFh
mov	[esp+7Ch+var_60], edi
mov	[esp+7Ch+var_64], edi
mov	[esp+7Ch+var_8], edi
mov	[esp+7Ch+var_58], edi
mov	[esp+7Ch+var_5C], edi
jmp	short loc_75D810
align 10h

loc_75D810:
mov	eax, [esi+120h]
mov	ebp, [esp+7Ch+var_68]
cmp	ebp, eax
jnb	loc_75DAD3
mov	edx, [esp+7Ch+var_6C]
cmp	edx, [esi+12Ch]
jnb	loc_75DAD3
mov	edi, [esi+11Ch]
add	edi, [esp+7Ch+var_58]
mov	ebx, [esi+128h]
add	ebx, [esp+7Ch+var_5C]
mov	eax, [edi]
mov	ecx, [ebx]
mov	edx, [ecx+34h]
mov	ebp, [eax+34h]
mov	[esp+7Ch+var_54], edi
mov	[esp+7Ch+var_4C], ebx
cmp	edx, ebp
jnz	loc_75DA92
mov	eax, [ecx+1Ch]
cmp	eax, [ecx+20h]
jnz	short loc_75D8C7
mov	edx, [ecx+24h]
cmp	edx, [ecx+28h]
jnz	short loc_75D8C7
test	byte ptr [ecx+2Ch], 8
jz	short loc_75D8BF
mov	eax, [ecx]
mov	ecx, [eax]
mov	edx, [esi+3Ch]
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [edx+eax*4]
mov	ebp, ecx
and	ebp, 3FFh
fld	dword ptr [eax+ebp*8+4]
fld	[esp+7Ch+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_75D8BF
mov	eax, ecx
shr	eax, 0Ah
mov	edx, [edx+eax*4]
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
push	ecx
mov	ecx, esi
call	sub_75A310
jmp	loc_75DA6D

loc_75D8BF:
or	eax, 0FFFFFFFFh
jmp	loc_75DA6D

loc_75D8C7:
mov	ebp, [ecx]
mov	edx, [ebp+0]
mov	edi, [esi+3Ch]
mov	eax, edx
shr	eax, 0Ah
mov	eax, [edi+eax*4]
mov	ebx, edx
and	ebx, 3FFh
fld	dword ptr [eax+ebx*8+4]
fld	[esp+7Ch+arg_4]
fld	st
fucomp	st(2)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_75D917
mov	ecx, edx
fstp	st
shr	ecx, 0Ah
mov	eax, [edi+ecx*4]
and	edx, 3FFh
lea	edx, [eax+edx*8]
push	edx
mov	ecx, esi
call	sub_75A310
jmp	loc_75DA65

loc_75D917:
test	byte ptr [ecx+2Ch], 2
jz	short loc_75D95E
mov	ecx, [ebp+4]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [edi+edx*4]
mov	eax, ecx
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_75D95E
mov	eax, ecx
fstp	st
shr	eax, 0Ah
mov	edx, [edi+eax*4]
and	ecx, 3FFh
lea	ecx, [edx+ecx*8]
push	ecx
mov	ecx, esi
call	sub_75A310
jmp	loc_75DA65

loc_75D95E:
mov	eax, [ebp+0]
fld	st
mov	ecx, eax
shr	ecx, 0Ah
mov	edx, [edi+ecx*4]
and	eax, 3FFh
fsub	dword ptr [edx+eax*8+4]
lea	eax, [edx+eax*8]
fmul	dword ptr [ebp+8]
fadd	dword ptr [eax]
fstp	[esp+7Ch+var_48]
fld	dword ptr [esi+118h]
fcomp	st(1)
fnstsw	ax
fld	[esp+7Ch+var_48]
test	ah, 5
jp	short loc_75D9EB
fstp	[esp+7Ch+var_44]
mov	eax, [esp+7Ch+var_44]
lea	edi, [esi+104h]
fstp	[esp+7Ch+var_40]
mov	ecx, [esp+7Ch+var_40]
mov	[esi+114h], eax
mov	[esi+118h], ecx
mov	ebx, [edi]
shr	ebx, 0Ah
cmp	ebx, [edi+4]
jb	short loc_75D9C7
push	ebx
mov	ecx, edi
call	sub_757A80

loc_75D9C7:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+ebx*4]
mov	edx, [esi+114h]
and	eax, 3FFh
mov	[ecx+eax*8], edx
mov	edx, [esi+118h]
mov	[ecx+eax*8+4], edx
inc	dword ptr [edi]
jmp	short loc_75DA5E

loc_75D9EB:
fld	st
fsub	dword ptr [esi+114h]
fld	dword ptr [esi+0F0h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_75DA5A
fstp	[esp+7Ch+var_3C]
mov	eax, [esp+7Ch+var_3C]
lea	edi, [esi+104h]
fstp	[esp+7Ch+var_38]
mov	ecx, [esp+7Ch+var_38]
mov	[esi+114h], eax
mov	[esi+118h], ecx
mov	ebx, [edi]
shr	ebx, 0Ah
cmp	ebx, [edi+4]
jb	short loc_75D9C7
push	ebx
mov	ecx, edi
call	sub_757A80
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+ebx*4]
mov	edx, [esi+114h]
and	eax, 3FFh
mov	[ecx+eax*8], edx
mov	edx, [esi+118h]
mov	[ecx+eax*8+4], edx
inc	dword ptr [edi]
jmp	short loc_75DA5E

loc_75DA5A:
fstp	st
fstp	st

loc_75DA5E:
mov	eax, [esi+104h]
dec	eax

loc_75DA65:
mov	edi, [esp+7Ch+var_54]
mov	ebx, [esp+7Ch+var_4C]

loc_75DA6D:
mov	[ebx+8], eax
mov	[edi+8], eax
mov	eax, 1
add	[esp+7Ch+var_68], eax
add	[esp+7Ch+var_6C], eax
mov	ecx, 0Ch
add	[esp+7Ch+var_58], ecx
add	[esp+7Ch+var_5C], ecx
jmp	loc_75D810

loc_75DA92:
fld	[esp+7Ch+arg_4]
push	1		; float
push	ecx		; float
fstp	[esp+84h+var_84]
jnb	short loc_75DABA
push	ecx		; int
mov	ecx, esi
call	sub_75A3A0
inc	[esp+7Ch+var_6C]
add	[esp+7Ch+var_5C], 0Ch
mov	[ebx+8], eax
jmp	loc_75D810

loc_75DABA:		; int
push	eax
mov	ecx, esi
call	sub_75A3A0
inc	[esp+7Ch+var_68]
add	[esp+7Ch+var_58], 0Ch
mov	[edi+8], eax
jmp	loc_75D810

loc_75DAD3:
mov	ecx, [esp+7Ch+var_6C]
cmp	ecx, [esi+12Ch]
jnb	short loc_75DB16
mov	edi, [esi+128h]
fld	[esp+7Ch+arg_4]
mov	ebx, [esp+7Ch+var_5C]
mov	edx, [edi+ebx]
push	1		; float
push	ecx		; float
add	edi, ebx
fstp	[esp+84h+var_84]
push	edx		; int
mov	ecx, esi
call	sub_75A3A0
inc	[esp+7Ch+var_6C]
add	ebx, 0Ch
mov	[edi+8], eax
mov	[esp+7Ch+var_5C], ebx
jmp	loc_75D810

loc_75DB16:
cmp	ebp, eax
jnb	short loc_75DB52
mov	edi, [esi+11Ch]
fld	[esp+7Ch+arg_4]
mov	ebx, [esp+7Ch+var_58]
mov	eax, [edi+ebx]
push	1		; float
push	ecx		; float
add	edi, ebx
fstp	[esp+84h+var_84]
push	eax		; int
mov	ecx, esi
call	sub_75A3A0
inc	ebp
add	ebx, 0Ch
mov	[edi+8], eax
mov	[esp+7Ch+var_68], ebp
mov	[esp+7Ch+var_58], ebx
jmp	loc_75D810

loc_75DB52:
xor	eax, eax
mov	[esp+7Ch+var_68], eax

loc_75DB58:
mov	[esp+7Ch+var_6C], eax
lea	esp, [esp+0]

loc_75DB60:
mov	eax, [esi+120h]
mov	ebx, [esp+7Ch+var_68]
mov	ecx, [esp+7Ch+var_6C]
cmp	ebx, eax
jnb	loc_75E049
cmp	ecx, [esi+12Ch]
jnb	loc_75E124
mov	edi, [esi+11Ch]
mov	eax, ebx
mov	ebx, [esi+128h]
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
mov	ebp, [edi+eax+8]
add	edi, eax
mov	[esp+7Ch+var_4C], eax
lea	eax, [ecx+ecx*2]
add	eax, eax
add	eax, eax
add	ebx, eax
mov	[esp+7Ch+var_58], eax
mov	[esp+7Ch+var_54], edi
mov	eax, 1
mov	[esp+7Ch+var_48], ebp
cmp	ebp, [ebx+8]
jz	short loc_75DBCF
mov	edx, [ebx]
mov	eax, [edi]
mov	edx, [edx+34h]
cmp	edx, [eax+34h]
sbb	eax, eax
add	eax, 3

loc_75DBCF:
mov	edx, 1
sub	eax, edx
jz	loc_75DDAF
sub	eax, edx
jz	short loc_75DC4A
sub	eax, edx
jnz	loc_75DB60
mov	ebx, [esp+7Ch+var_60]
push	edx
push	ebp
push	ebx
mov	ecx, esi
call	sub_75D6E0
mov	eax, [edi+8]
push	1
or	eax, 40000000h
push	eax
push	edi
mov	ecx, esi
call	sub_75D6E0
cmp	[esp+7Ch+var_8], 0
jz	short loc_75DC1D
lea	ecx, [esp+7Ch+var_1C]
push	ecx
push	ebx
mov	ecx, esi
call	sub_75B780

loc_75DC1D:
fld	[esp+7Ch+arg_4]
mov	edx, [esp+7Ch+var_64]
push	ecx		; float
fstp	[esp+80h+var_80]
push	edi		; int
push	edx		; int
mov	ecx, esi
call	sub_75A760
inc	[esp+7Ch+var_68]
mov	[esp+7Ch+var_50], 0FFFFFFFFh
mov	[esp+7Ch+var_60], edi
jmp	loc_75DB60

loc_75DC4A:
mov	eax, [esp+7Ch+var_60]
test	eax, eax
jz	loc_75DCE1
mov	eax, [eax+4]
test	eax, eax
jz	loc_75DCE1
mov	eax, [eax+10h]
mov	edi, [esi+24h]
cmp	byte ptr [eax+edi], 0
jz	short loc_75DCE1
cmp	[esp+7Ch+var_8], 0
jz	short loc_75DC7A
add	[esp+7Ch+var_8], edx
jmp	short loc_75DC93

loc_75DC7A:
mov	eax, [ebx]
mov	eax, [eax+20h]
mov	[esp+7Ch+var_C], ecx
mov	ecx, [esp+7Ch+var_50]
mov	[esp+7Ch+var_18], eax
mov	[esp+7Ch+var_8], edx
mov	[esp+7Ch+var_4], ecx

loc_75DC93:
cmp	[esp+7Ch+var_64], 0
jz	loc_75DDA2
mov	edx, [esp+7Ch+var_64]
mov	eax, [edx+4]
test	eax, eax
jz	loc_75DDA2
mov	ecx, [eax+14h]
test	ecx, ecx
jz	loc_75DDA2
fld	dword ptr [ecx]
fld	[esp+7Ch+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_75DDA2
mov	eax, [ebx+8]
inc	[esp+7Ch+var_6C]
mov	[ecx+0Ch], eax
mov	[esp+7Ch+var_64], ebx
jmp	loc_75DB60

loc_75DCE1:
mov	eax, [ebx+8]
push	1
push	eax
mov	eax, [esp+84h+var_64]
push	eax
mov	ecx, esi
call	sub_75D6E0
mov	eax, [ebx+8]
mov	edx, [ebx]
or	eax, 40000000h
xor	ecx, ecx
mov	[ebx+4], ecx
mov	[esp+7Ch+var_4C], eax
mov	eax, [edx+28h]
mov	edx, [esi+24h]
mov	[esp+7Ch+var_48], eax
cmp	[eax+edx], cl
jz	loc_75DDA2
mov	ebp, [esi+154h]
lea	edi, [esi+154h]
shr	ebp, 6
mov	[esp+7Ch+var_28], 0FFFFFFFFh
mov	[esp+7Ch+var_20], ecx
cmp	ebp, [edi+4]
jb	short loc_75DD41
push	ebp
mov	ecx, edi
call	sub_757E80

loc_75DD41:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
and	eax, 3Fh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
lea	eax, [eax+edx*8]
mov	edx, [esp+7Ch+var_48]
xor	ecx, ecx
mov	[eax], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+4], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
mov	ecx, [esp+7Ch+var_28]
mov	[eax+0Ch], ecx
mov	ecx, [esp+7Ch+var_20]
mov	[eax+10h], edx
mov	[eax+14h], ecx
inc	dword ptr [edi]
mov	eax, [edi]
mov	ecx, [edi+0Ch]
dec	eax
mov	edx, eax
shr	edx, 6
mov	ecx, [ecx+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*8]
mov	eax, [esp+7Ch+var_4C]
push	1
push	eax
push	ebx
mov	ecx, esi
mov	[ebx+4], edx
call	sub_75D6E0

loc_75DDA2:
inc	[esp+7Ch+var_6C]
mov	[esp+7Ch+var_64], ebx
jmp	loc_75DB60

loc_75DDAF:
cmp	ebp, 0FFFFFFFFh
jz	loc_75E011
mov	ecx, [esp+7Ch+var_60]
push	0
push	ebp
push	ecx
mov	ecx, esi
call	sub_75D6E0
mov	edx, [esp+7Ch+var_64]
push	0
push	ebp
push	edx
mov	ecx, esi
call	sub_75D6E0
cmp	[esp+7Ch+var_8], 0
jz	short loc_75DDEE
mov	ecx, [esp+7Ch+var_60]
lea	eax, [esp+7Ch+var_1C]
push	eax
push	ecx
mov	ecx, esi
call	sub_75B780

loc_75DDEE:
mov	edx, [esp+7Ch+var_4C]
mov	ecx, [esp+7Ch+var_68]
mov	eax, [esp+7Ch+var_58]
mov	[esp+7Ch+var_5C], edx
mov	edx, [esp+7Ch+var_6C]
inc	ecx
inc	edx
mov	[esp+7Ch+var_50], eax
mov	[esp+7Ch+var_58], ecx
mov	[esp+7Ch+var_4C], edx

loc_75DE10:
mov	edx, [esp+7Ch+var_58]
xor	ecx, ecx
xor	eax, eax
cmp	edx, [esi+120h]
jnb	short loc_75DE2E
mov	ecx, [esi+11Ch]
mov	edx, [esp+7Ch+var_5C]
lea	ecx, [edx+ecx+0Ch]

loc_75DE2E:
mov	edx, [esp+7Ch+var_4C]
cmp	edx, [esi+12Ch]
jnb	short loc_75DE48
mov	eax, [esi+128h]
mov	edx, [esp+7Ch+var_50]
lea	eax, [edx+eax+0Ch]

loc_75DE48:
test	ecx, ecx
jz	short loc_75DE5C
test	eax, eax
jz	short loc_75DE65
mov	edx, [ecx+8]
cmp	edx, [eax+8]
jz	loc_75DFA9

loc_75DE5C:
test	eax, eax
jz	short loc_75DE65
cmp	[eax+8], ebp
jz	short loc_75DEC6

loc_75DE65:
test	ecx, ecx
jz	loc_75DFA9
cmp	[ecx+8], ebp
jnz	loc_75DFA9
mov	ecx, [esp+7Ch+var_5C]
mov	eax, edi
mov	edi, [esi+11Ch]
add	ecx, 0Ch
add	edi, ecx
mov	[esp+7Ch+var_5C], ecx
mov	edx, 1
add	[esp+7Ch+var_68], edx
add	[esp+7Ch+var_58], edx
push	edx
mov	ecx, ebp
or	ecx, 40000000h
push	ecx
push	eax
mov	ecx, esi
mov	[esp+88h+var_60], eax
mov	[esp+88h+var_54], edi
call	sub_75D6E0
mov	edx, [esp+7Ch+var_60]
push	1
push	ebp
push	edx
mov	ecx, esi
call	sub_75D6E0
jmp	loc_75DE10

loc_75DEC6:
mov	ecx, 1
add	[esp+7Ch+var_6C], ecx
add	[esp+7Ch+var_4C], ecx
mov	ecx, [esp+7Ch+var_50]
mov	eax, ebx
mov	ebx, [esi+128h]
add	ecx, 0Ch
mov	dword ptr [eax+4], 0
mov	[esp+7Ch+var_64], eax
mov	eax, [eax]
mov	eax, [eax+28h]
add	ebx, ecx
mov	[esp+7Ch+var_50], ecx
mov	ecx, [esi+24h]
cmp	byte ptr [eax+ecx], 0
mov	[esp+7Ch+var_60], eax
jz	loc_75DF95
mov	ebp, [esi+154h]
lea	edi, [esi+154h]
shr	ebp, 6
cmp	ebp, [edi+4]
jb	short loc_75DF25
push	ebp
mov	ecx, edi
call	sub_757E80

loc_75DF25:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+7Ch+var_60]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
xor	ecx, ecx
mov	[eax], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+4], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+0Ch], ecx
mov	[eax+10h], edx
xor	ecx, ecx
mov	[eax+14h], ecx
inc	dword ptr [edi]
mov	eax, [edi]
mov	edx, [edi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*8]
mov	ecx, [esp+7Ch+var_48]
mov	eax, [esp+7Ch+var_64]
push	1
or	ecx, 40000000h
push	ecx
push	eax
mov	ecx, esi
mov	[eax+4], edx
call	sub_75D6E0
mov	ebp, [esp+7Ch+var_48]
mov	edi, [esp+7Ch+var_54]

loc_75DF95:
mov	edx, [esp+7Ch+var_64]
push	1
push	ebp
push	edx
mov	ecx, esi
call	sub_75D6E0
jmp	loc_75DE10

loc_75DFA9:
mov	eax, ebp
or	eax, 40000000h
push	0
push	eax
push	edi
mov	ecx, esi
mov	[esp+88h+var_48], eax
call	sub_75D6E0
mov	ecx, [edi]
mov	eax, [ebx]
mov	edx, [ecx+24h]
cmp	edx, [eax+28h]
jnz	short loc_75DFE2
mov	eax, [esp+7Ch+var_64]
push	0
push	ebp
push	eax
mov	ecx, esi
call	sub_75D6E0
mov	ecx, [edi+4]
mov	[ebx+4], ecx
jmp	short loc_75E02F

loc_75DFE2:
mov	dword ptr [ebx+4], 0
mov	eax, [eax+28h]
mov	edx, [esi+24h]
cmp	byte ptr [eax+edx], 0
jz	short loc_75E02F
push	eax
mov	ecx, esi
call	sub_75A670
mov	[ebx+4], eax
mov	eax, [esp+7Ch+var_48]
push	1
push	eax
push	ebx
mov	ecx, esi
call	sub_75D6E0
jmp	short loc_75E02F

loc_75E011:
cmp	[esp+7Ch+var_8], 0
jz	short loc_75E029
mov	edx, [esp+7Ch+var_60]
lea	ecx, [esp+7Ch+var_1C]
push	ecx
push	edx
mov	ecx, esi
call	sub_75B780

loc_75E029:
mov	eax, [edi+4]
mov	[ebx+4], eax

loc_75E02F:
mov	eax, [esp+7Ch+var_6C]
inc	[esp+7Ch+var_68]
mov	[esp+7Ch+var_50], eax
mov	[esp+7Ch+var_60], edi
mov	[esp+7Ch+var_64], ebx
inc	eax
jmp	loc_75DB58

loc_75E049:
cmp	ecx, [esi+12Ch]
jnb	loc_75E124
mov	edx, [esi+128h]
lea	ecx, [ecx+ecx*2]
mov	eax, [edx+ecx*4+8]
lea	ebx, [edx+ecx*4]
mov	ecx, [esp+7Ch+var_64]
push	1
push	eax
push	ecx
mov	ecx, esi
call	sub_75D6E0
mov	eax, [ebx+8]
mov	edx, [ebx]
or	eax, 40000000h
mov	dword ptr [ebx+4], 0
mov	ecx, [esi+24h]
mov	[esp+7Ch+var_4C], eax
mov	eax, [edx+28h]
cmp	byte ptr [eax+ecx], 0
mov	[esp+7Ch+var_48], eax
jz	loc_75E117
mov	ebp, [esi+154h]
lea	edi, [esi+154h]
shr	ebp, 6
cmp	ebp, [edi+4]
jb	short loc_75E0B9
push	ebp
mov	ecx, edi
call	sub_757E80

loc_75E0B9:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+7Ch+var_48]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*8]
xor	ecx, ecx
mov	[eax], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+4], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+8], ecx
or	ecx, 0FFFFFFFFh
mov	[eax+0Ch], ecx
mov	[eax+10h], edx
xor	ecx, ecx
mov	[eax+14h], ecx
inc	dword ptr [edi]
mov	eax, [edi]
mov	edx, [edi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*8]
mov	eax, [esp+7Ch+var_4C]
push	1
push	eax
push	ebx
mov	ecx, esi
mov	[ebx+4], edx
call	sub_75D6E0

loc_75E117:
inc	[esp+7Ch+var_6C]
mov	[esp+7Ch+var_64], ebx
jmp	loc_75DB60

loc_75E124:
cmp	ebx, eax
jnb	short loc_75E19D
mov	edx, [esi+11Ch]
mov	ebp, [esp+7Ch+var_60]
lea	ecx, [ebx+ebx*2]
mov	eax, [edx+ecx*4+8]
lea	edi, [edx+ecx*4]
push	1
push	eax
push	ebp
mov	ecx, esi
call	sub_75D6E0
mov	ecx, [edi+8]
push	1
or	ecx, 40000000h
push	ecx
push	edi
mov	ecx, esi
call	sub_75D6E0
cmp	[esp+7Ch+var_8], 0
jz	short loc_75E16F
lea	edx, [esp+7Ch+var_1C]
push	edx
push	ebp
mov	ecx, esi
call	sub_75B780

loc_75E16F:
fld	[esp+7Ch+arg_4]
mov	eax, [esp+7Ch+var_64]
push	ecx		; float
fstp	[esp+80h+var_80]
push	edi		; int
push	eax		; int
mov	ecx, esi
call	sub_75A760
inc	ebx
mov	[esp+7Ch+var_50], 0FFFFFFFFh
mov	[esp+7Ch+var_60], edi
mov	[esp+7Ch+var_68], ebx
jmp	loc_75DB60

loc_75E19D:
lea	ebx, [esi+128h]
add	esi, 11Ch
cmp	ebx, esi
jz	short loc_75E1D7
mov	edi, [ebx+4]
push	0
push	edi
mov	ecx, esi
call	sub_757930
mov	[esi+4], edi
test	edi, edi
jz	short loc_75E1D7
mov	edx, [ebx]
mov	eax, [esi]
lea	ecx, [edi+edi*2]
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_75E1D7:
mov	edx, [esp+7Ch+arg_0]
xor	ecx, ecx
cmp	[edx+4], ecx
jbe	short loc_75E1FC

loc_75E1E5:
mov	eax, [edx]
mov	eax, [eax+ecx*4]
mov	esi, [eax+20h]
mov	[eax+1Ch], esi
mov	esi, [eax+28h]
inc	ecx
mov	[eax+24h], esi
cmp	ecx, [edx+4]
jb	short loc_75E1E5

loc_75E1FC:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 6Ch
retn	8
sub_75D770 endp

align 10h



; int __stdcall	sub_75E210(float, float, int)
sub_75E210 proc	near

var_1C=	dword ptr -1Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
fld	[esp+8+arg_0]
push	ebx
push	ebp
fst	[esp+10h+var_8]
mov	ebp, ecx
mov	ebx, [ebp+0BCh]
push	esi
xor	esi, esi
cmp	ebx, 4
push	edi
mov	edi, [esp+18h+arg_8]
mov	[esp+18h+var_4], ebp
jl	loc_75E347
mov	edx, [ebp+0C8h]
lea	ecx, [esi+2]
jmp	short loc_75E247

loc_75E245:
fstp	st

loc_75E247:
mov	ebp, esi
mov	eax, esi
and	eax, 3Fh
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebp+eax*4+8]
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	loc_75E358
lea	ebp, [ecx-1]
fstp	st
lea	eax, [ecx-1]
and	eax, 3Fh
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebp+eax*4+8]
mov	edi, 1
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	loc_75E34D
mov	ebp, ecx
fstp	st
mov	eax, ecx
and	eax, 3Fh
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebp+eax*4+8]
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	loc_75E350
lea	eax, [ecx+1]
fstp	st
mov	ebp, eax
and	eax, 3Fh
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebp+eax*4+8]
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_75E355
add	esi, 4
lea	eax, [ebx-3]
add	ecx, 4
cmp	esi, eax
jb	loc_75E245
mov	ebp, [esp+18h+var_4]

loc_75E30A:
cmp	esi, ebx
jnb	short loc_75E35C
mov	ecx, [ebp+0C8h]

loc_75E314:
mov	edx, esi
fstp	st
mov	eax, esi
and	eax, 3Fh
shr	edx, 6
mov	edx, [ecx+edx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [edx+eax*4+8]
fstp	[esp+18h+var_8]
fld	[esp+18h+var_8]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_75E35C
inc	esi
mov	edi, 1
cmp	esi, ebx
jb	short loc_75E314
jmp	short loc_75E35C

loc_75E347:
fld	[esp+18h+var_8]
jmp	short loc_75E30A

loc_75E34D:
inc	esi
jmp	short loc_75E358

loc_75E350:
add	esi, 2
jmp	short loc_75E358

loc_75E355:
add	esi, 3

loc_75E358:
mov	ebp, [esp+18h+var_4]

loc_75E35C:
push	esi
fstp	st(1)
push	0
mov	ecx, ebp
call	sub_757020
test	edi, edi
jz	short loc_75E37E
lea	eax, [ebp+98h]
fstp	st
push	eax
call	sub_756F60
fld	[esp+18h+var_8]

loc_75E37E:
mov	edi, [ebp+0BCh]
cmp	esi, edi
jb	short loc_75E3C7
fstp	st

loc_75E38A:
lea	esi, [ebp+8Ch]
push	esi
mov	ecx, ebp
call	sub_756F60
fld	[esp+18h+var_8]
fld	[esp+18h+arg_4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	loc_75E52E
push	ecx		; float
fstp	[esp+1Ch+var_1C]
push	esi		; int
mov	ecx, ebp
call	sub_75D770
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch

loc_75E3C3:
fld	[esp+18h+var_8]

loc_75E3C7:
fst	[esp+18h+arg_8]
mov	[esp+18h+var_4], esi
cmp	esi, edi
jnb	loc_75E4DE
mov	ecx, edi
sub	ecx, esi
cmp	ecx, 4
jl	loc_75E49D
mov	edx, [ebp+0C8h]
lea	ecx, [esi+2]

loc_75E3ED:
mov	ebx, esi
mov	eax, esi
and	eax, 3Fh
shr	ebx, 6
mov	ebx, [edx+ebx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebx+eax*4+8]
fstp	[esp+18h+arg_8]
fld	[esp+18h+arg_8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	loc_75E4DE
lea	ebx, [ecx-1]
lea	eax, [ecx-1]
and	eax, 3Fh
shr	ebx, 6
mov	ebx, [edx+ebx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebx+eax*4+8]
fstp	[esp+18h+arg_8]
fld	[esp+18h+arg_8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	loc_75E4D3
mov	ebx, ecx
mov	eax, ecx
and	eax, 3Fh
shr	ebx, 6
mov	ebx, [edx+ebx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebx+eax*4+8]
fstp	[esp+18h+arg_8]
fld	[esp+18h+arg_8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_75E4D6
lea	eax, [ecx+1]
mov	ebx, eax
and	eax, 3Fh
shr	ebx, 6
mov	ebx, [edx+ebx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [ebx+eax*4+8]
fstp	[esp+18h+arg_8]
fld	[esp+18h+arg_8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_75E4DB
add	esi, 4
lea	eax, [edi-3]
add	ecx, 4
cmp	esi, eax
jb	loc_75E3ED

loc_75E49D:
cmp	esi, edi
jnb	short loc_75E4DE
mov	ecx, [ebp+0C8h]

loc_75E4A7:
mov	edx, esi
mov	eax, esi
and	eax, 3Fh
shr	edx, 6
mov	edx, [ecx+edx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [edx+eax*4+8]
fstp	[esp+18h+arg_8]
fld	[esp+18h+arg_8]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jz	short loc_75E4DE
inc	esi
cmp	esi, edi
jb	short loc_75E4A7
jmp	short loc_75E4DE

loc_75E4D3:
inc	esi
jmp	short loc_75E4DE

loc_75E4D6:
add	esi, 2
jmp	short loc_75E4DE

loc_75E4DB:
add	esi, 3

loc_75E4DE:
lea	edi, [ebp+98h]
fstp	st
push	edi
mov	ecx, ebp
call	sub_756F60
fld	[esp+18h+arg_0]
push	ecx		; float
fstp	[esp+1Ch+var_1C]
push	edi		; int
mov	ecx, ebp
call	sub_75D770
mov	eax, [esp+18h+var_4]
push	esi
push	eax
mov	ecx, ebp
call	sub_757020
fld	[esp+18h+var_8]
mov	edi, [ebp+0BCh]
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_8]
fstp	[esp+18h+var_8]
cmp	esi, edi
jb	loc_75E3C3
jmp	loc_75E38A

loc_75E52E:
pop	edi
fstp	st
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_75E210 endp

align 10h



sub_75E540 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+7Ch], 0
jz	loc_75E7DA
push	ebx
push	ebp
push	edi
mov	edi, [esi+0DCh]
push	20h
inc	edi
lea	ebx, [esi+0CCh]
push	edi
mov	ecx, ebx
call	sub_757A10
mov	[ebx+4], edi
mov	eax, [esi+0DCh]
push	1
inc	eax
push	eax
mov	ecx, esi
call	sub_7592F0
fld	ds:flt_14411EC
cmp	byte ptr [esi+4], 0
fst	dword ptr [esi+114h]
fstp	dword ptr [esi+118h]
jz	short loc_75E59D
mov	ecx, esi
call	sub_758F20

loc_75E59D:
mov	ecx, esi
call	sub_75B980
mov	edx, [esi+60h]
push	20h
lea	ecx, [esi+8Ch]
push	edx
mov	[esp+28h+var_8], 0
xor	ebx, ebx
call	sub_757A10
mov	eax, [esi+60h]
push	20h
push	eax
lea	ecx, [esi+98h]
call	sub_757A10
mov	ecx, [esi+60h]
push	20h
push	ecx
lea	ecx, [esi+0A4h]
call	sub_757A10
mov	edi, [esi+60h]
push	20h
lea	ebp, [esi+0B0h]
push	edi
mov	ecx, ebp
call	sub_757A10
mov	[ebp+4], edi
mov	edx, [esi+60h]
push	20h
push	edx
lea	ecx, [esi+11Ch]
call	sub_757930
mov	eax, [esi+60h]
push	20h
push	eax
lea	ecx, [esi+128h]
call	sub_757930
mov	edx, [esi+88h]
mov	edi, [esi+3Ch]
xor	ecx, ecx
mov	[esi+134h], ecx
mov	[esi+144h], ecx
mov	eax, [edx]
mov	eax, [eax]
mov	edx, eax
shr	edx, 0Ah
mov	edx, [edi+edx*4]
and	eax, 3FFh
fld	dword ptr [edx+eax*8+4]
fstp	[esp+20h+var_10]
fld	[esp+20h+var_10]
fstp	[esp+20h+var_C]
cmp	[esi+7Ch], ecx
jbe	loc_75E78B
lea	ebx, [ebx+0]

loc_75E660:
mov	ebp, [esp+20h+var_8]
inc	ebp
mov	[esp+20h+var_8], ebp
cmp	ebp, [esi+7Ch]
jnb	short loc_75E69F
mov	ecx, [esi+88h]
mov	eax, ebp
shr	eax, 0Ah
mov	eax, [ecx+eax*4]
mov	edx, ebp
and	edx, 3FFh
mov	eax, [eax+edx*4]
mov	edx, [esi+3Ch]
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
and	eax, 3FFh
fld	dword ptr [ecx+eax*8+4]
fstp	[esp+20h+var_10]

loc_75E69F:
fld	[esp+20h+var_C]
mov	edx, ebx
cmp	ebx, [esi+74h]
jnb	short loc_75E6C7
mov	eax, [esi+70h]
lea	ecx, [eax+ebx*4]

loc_75E6B0:
mov	eax, [ecx]
fld	dword ptr [eax+4]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jp	short loc_75E6C7
inc	ebx
add	ecx, 4
cmp	ebx, [esi+74h]
jb	short loc_75E6B0

loc_75E6C7:
fld	[esp+20h+var_10]
mov	ecx, ebx
sub	ecx, edx
push	ecx		; int
push	edx		; int
sub	esp, 8
fstp	[esp+30h+var_2C]
mov	ecx, esi
fstp	[esp+30h+var_30]
call	sub_759D20
cmp	dword ptr [esi+0BCh], 0
mov	[esp+20h+var_4], eax
jz	short loc_75E70B
fld	[esp+20h+var_10]
push	eax		; int
sub	esp, 8
fstp	[esp+2Ch+var_28]
mov	ecx, esi
fld	[esp+2Ch+var_C]
fstp	[esp+2Ch+var_2C]
call	sub_75E210
jmp	short loc_75E733

loc_75E70B:
test	eax, eax
jz	short loc_75E71D
lea	eax, [esi+8Ch]
push	eax
mov	ecx, esi
call	sub_756F60

loc_75E71D:
fld	[esp+20h+var_C]
push	ecx		; float
lea	eax, [esi+8Ch]
fstp	[esp+24h+var_24]
push	eax		; int
mov	ecx, esi
call	sub_75D770

loc_75E733:
test	byte ptr [esp+20h+var_4], 2
jz	short loc_75E77A
xor	edx, edx
xor	edi, edi
cmp	[esi+90h], edx
jbe	short loc_75E76C
jmp	short loc_75E750
align 10h

loc_75E750:
mov	eax, [esi+8Ch]
mov	ecx, [eax+edx*4]
test	byte ptr [ecx+2Ch], 2
jnz	short loc_75E763
mov	[eax+edi*4], ecx
inc	edi

loc_75E763:
inc	edx
cmp	edx, [esi+90h]
jb	short loc_75E750

loc_75E76C:
cmp	edi, [esi+90h]
jnb	short loc_75E77A
mov	[esi+90h], edi

loc_75E77A:
fld	[esp+20h+var_10]
fstp	[esp+20h+var_C]
cmp	ebp, [esi+7Ch]
jb	loc_75E660

loc_75E78B:
cmp	byte ptr [esi+8], 0
jz	short loc_75E7D7
xor	ecx, ecx
cmp	[esi+104h], ecx
jbe	short loc_75E7D7
jmp	short loc_75E7A0
align 10h

loc_75E7A0:
mov	eax, [esi+110h]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [eax+edx*4]
mov	edi, ecx
and	edi, 3FFh
fld	dword ptr [edx+edi*8+4]
lea	eax, [edx+edi*8]
fstp	[esp+20h+var_4]
inc	ecx
fld	dword ptr [eax]
fchs
fstp	dword ptr [eax+4]
fld	[esp+20h+var_4]
fstp	dword ptr [eax]
cmp	ecx, [esi+104h]
jb	short loc_75E7A0

loc_75E7D7:
pop	edi
pop	ebp
pop	ebx

loc_75E7DA:
pop	esi
add	esp, 10h
retn
sub_75E540 endp

align 10h



sub_75E7E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
call	sub_758EB0
mov	eax, [esp+4+arg_4]
mov	ecx, [esp+4+arg_0]
push	eax
push	ecx
mov	ecx, esi
call	sub_75B900
mov	ecx, esi
call	sub_75E540
pop	esi
retn	8
sub_75E7E0 endp

align 10h



; int __stdcall	sub_75E810(int,	int, int, float, int, int)
sub_75E810 proc	near

var_18=	dword ptr -18h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ebx
push	edi
mov	ebx, ecx
call	sub_765260
mov	eax, [esp+8+arg_14]
mov	ecx, [esp+8+arg_8]
mov	[ebx+8Ch], eax
mov	eax, [esp+8+arg_4]
xor	edi, edi
mov	[ebx+80h], eax
mov	[ebx+84h], ecx
cmp	eax, edi
jz	short loc_75E847
cmp	ecx, edi
jnz	short loc_75E847
mov	[ebx+80h], edi

loc_75E847:
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
mov	byte ptr [ebx+88h], 0
xor	esi, esi
cmp	[ebp+104h], edi
jbe	short loc_75E889
mov	edi, edi

loc_75E860:
mov	edx, [ebp+110h]
mov	ecx, esi
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
mov	eax, esi
and	eax, 3FFh
lea	edx, [ecx+eax*8]
push	edx
mov	ecx, ebx
call	sub_7654F0
inc	esi
cmp	esi, [ebp+104h]
jb	short loc_75E860

loc_75E889:
cmp	[ebx+80h], edi
jz	short loc_75E89D
mov	eax, [ebx+84h]
mov	[esp+10h+arg_4], eax
jmp	short loc_75E8A1

loc_75E89D:
mov	[esp+10h+arg_4], edi

loc_75E8A1:
xor	ecx, ecx
mov	[esp+10h+arg_14], ecx
cmp	[ebp+154h], edi
jbe	loc_75E96B
jmp	short loc_75E8C4
jmp	short loc_75E8C0
align 10h

loc_75E8C0:
mov	ecx, [esp+10h+arg_14]

loc_75E8C4:
mov	esi, [ebp+160h]
mov	edx, ecx
mov	eax, ecx
shr	edx, 6
mov	edx, [esi+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
mov	edi, [edx+eax*8+10h]
dec	edi
cmp	edi, [esp+10h+arg_4]
jge	short loc_75E901
mov	edx, [ebx+80h]
lea	eax, [edi+edi*4]
cmp	byte ptr [edx+eax*8], 0
jz	short loc_75E901
or	edi, 40000000h
mov	byte ptr [ebx+88h], 1

loc_75E901:
push	ecx
mov	ecx, ebp
call	sub_75D6B0
mov	eax, [ebp+184h]
xor	esi, esi
mov	[esp+10h+arg_8], eax
test	eax, eax
jbe	short loc_75E956
lea	esp, [esp+0]

loc_75E920:
mov	edx, [ebp+190h]
mov	ecx, esi
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
mov	eax, esi
and	eax, 3FFh
lea	eax, [eax+eax*2]
mov	edx, [ecx+eax*4+8]
lea	eax, [ecx+eax*4]
mov	ecx, [eax+4]
push	edi
push	edx
mov	edx, [eax]
push	ecx
push	edx
mov	ecx, ebx
call	sub_765550
inc	esi
cmp	esi, [esp+10h+arg_8]
jb	short loc_75E920

loc_75E956:
mov	eax, [esp+10h+arg_14]
inc	eax
mov	[esp+10h+arg_14], eax
cmp	eax, [ebp+154h]
jb	loc_75E8C0

loc_75E96B:
mov	eax, [esp+10h+arg_10]
fld	[esp+10h+arg_C]
push	eax		; int
push	ecx		; float
mov	ecx, ebx
fstp	[esp+18h+var_18]
call	sub_765A90
cmp	byte ptr [ebx+88h], 0
pop	esi
pop	ebp
jz	short loc_75E991
mov	ecx, ebx
call	sub_765380

loc_75E991:
pop	edi
pop	ebx
retn	18h
sub_75E810 endp

align 10h



sub_75E9A0 proc	near
mov	eax, [ecx]
retn
sub_75E9A0 endp

align 10h



sub_75E9B0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	[eax+1Ch], ecx
mov	[eax+20h], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], ecx
mov	[eax+40h], ecx
mov	[eax+44h], ecx
mov	[eax+48h], ecx
mov	[eax+4Ch], ecx
mov	[eax+50h], ecx
mov	[eax+54h], ecx
mov	[eax+58h], ecx
mov	[eax+5Ch], ecx
mov	[eax+60h], ecx
mov	[eax+64h], ecx
mov	[eax+68h], ecx
mov	[eax+6Ch], ecx
mov	[eax+70h], ecx
mov	[eax+74h], ecx
retn
sub_75E9B0 endp

align 10h



sub_75EA10 proc	near
push	esi
mov	esi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+6Ch]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+5Ch]
call	sub_74CD90
lea	ecx, [esi+4Ch]
call	sub_74CD90
lea	ecx, [esi+3Ch]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+30h]
mov	edx, [edx+30h]
push	eax
call	edx
lea	ecx, [esi+20h]
call	sub_74CD90
lea	ecx, [esi+10h]
call	sub_74CD90
mov	ecx, esi
pop	esi
jmp	sub_74CD90
sub_75EA10 endp

align 10h



sub_75EA70 proc	near
push	esi
mov	esi, ecx
call	sub_75E9B0
xor	eax, eax
mov	[esi+80h], eax
mov	[esi+84h], eax
mov	[esi+88h], al
mov	[esi+8Ch], eax
mov	eax, esi
pop	esi
retn
sub_75EA70 endp

align 10h


; Attributes: thunk

sub_75EAA0 proc	near
jmp	sub_75EA10
sub_75EAA0 endp

align 10h



sub_75EAB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	[edi], eax
lea	esi, [edi+4]
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	dword ptr [esi+8], 0
mov	ecx, [edi]
push	ebx
call	sub_756650
cmp	ebx, [esi+4]
jnb	short loc_75EAEF
mov	ecx, [esi+8]
shr	ecx, 1
cmp	ebx, ecx
jnb	short loc_75EB04
push	ebx
jmp	short loc_75EAFC

loc_75EAEF:
cmp	ebx, [esi+8]
jb	short loc_75EB04
mov	edx, ebx
shr	edx, 2
add	edx, ebx
push	edx

loc_75EAFC:
push	esi
mov	ecx, esi
call	sub_714BE0

loc_75EB04:
xor	eax, eax
mov	[esi+4], ebx
cmp	[edi+8], eax
jbe	short loc_75EB1F
mov	edi, edi

loc_75EB10:
mov	ecx, [esi]
mov	dword ptr [ecx+eax*4], 0FFFFFFFFh
inc	eax
cmp	eax, [edi+8]
jb	short loc_75EB10

loc_75EB1F:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	8
sub_75EAB0 endp

align 10h



sub_75EB30 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
mov	ebx, ecx
mov	ecx, [ebx]
mov	edx, [ecx+0Ch]
mov	eax, [edx+4]
push	esi
mov	esi, [esp+1Ch+arg_0]
imul	eax, esi
add	eax, [ecx+8]
mov	ecx, [edx+8]
mov	edx, [ebx+4]
cmp	dword ptr [edx+esi*4], 0FFFFFFFFh
lea	edx, [edx+esi*4]
push	edi
jnz	short loc_75EB73
mov	edi, [esp+20h+arg_4]
mov	[edx], esi
mov	edx, [ecx]
push	edi
push	eax
mov	eax, [edx+14h]
call	eax

loc_75EB68:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 14h
retn	8

loc_75EB73:
mov	edx, [ecx]
push	eax
mov	eax, [edx+1Ch]
call	eax
mov	edi, [esp+20h+arg_4]
cmp	eax, edi
jz	short loc_75EB68
mov	ecx, [ebx+4]
mov	eax, [ecx+esi*4]
cmp	eax, esi
jz	short loc_75EBB9
lea	ecx, [ecx+0]

loc_75EB90:
mov	ecx, [ebx]
mov	edx, [ecx+0Ch]
mov	esi, eax
mov	eax, [edx+4]
imul	eax, esi
add	eax, [ecx+8]
mov	ecx, [edx+8]
mov	edx, [ecx]
push	eax
mov	eax, [edx+1Ch]
call	eax
cmp	eax, edi
jz	short loc_75EB68
mov	ecx, [ebx+4]
mov	eax, [ecx+esi*4]
cmp	eax, esi
jnz	short loc_75EB90

loc_75EBB9:
mov	eax, [ebx]
mov	ecx, [eax+0Ch]
mov	edi, [ecx+4]
imul	edi, esi
add	edi, [eax+8]
push	ebp
mov	ebp, [ecx+8]
mov	edx, [ebp+0]
mov	eax, [edx+18h]
push	edi
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	edx, [edx+0Ch]
mov	[esp+24h+var_14], eax
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+var_C]
push	ecx
push	edi
mov	ecx, ebp
call	edx
mov	eax, [ebx]
mov	edx, [ebx+4]
mov	eax, [eax]
lea	ecx, [ebx+4]
mov	[edx+esi*4], eax
mov	edx, [ebx]
mov	ebp, [edx]
lea	eax, [esp+24h+arg_0]
push	eax
mov	[esp+28h+arg_0], ebp
call	sub_65EDD0
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, [ebx]
call	sub_756820
fld	[esp+24h+var_10]
mov	esi, [eax+4]
mov	edi, [eax]
mov	eax, [esp+24h+var_14]
mov	edx, [esi]
mov	edx, [edx+4]
push	eax
sub	esp, 8
fstp	[esp+30h+var_2C]
mov	ecx, esi
fld	[esp+30h+var_C]
fstp	[esp+30h+var_30]
push	edi
call	edx
mov	ecx, [esp+24h+arg_4]
mov	eax, [esi]
mov	edx, [eax+14h]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	eax, ebp
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn	8
sub_75EB30 endp

align 10h



; int __stdcall	sub_75EC60(int,	int, float)
sub_75EC60 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebp
push	esi
mov	ebp, ecx
mov	eax, [ebp+0]
push	edi
mov	edi, [esp+1Ch+arg_0]
push	eax
mov	ecx, edi
call	sub_756650
mov	ecx, [edi+0Ch]
mov	edx, [ecx]
xor	ecx, ecx
mov	[esp+1Ch+var_4], edx
cmp	[ebp+80h], ecx
jz	short loc_75EC96
mov	eax, [ebp+84h]
mov	[esp+1Ch+var_8], eax
jmp	short loc_75EC9A

loc_75EC96:
mov	[esp+1Ch+var_8], ecx

loc_75EC9A:
mov	[esp+1Ch+var_C], ecx
cmp	[ebp+0], ecx
jbe	loc_75EE61
push	ebx
jmp	short loc_75ECB8
align 10h

loc_75ECB0:
mov	ecx, [esp+20h+var_C]
mov	edi, [esp+20h+arg_0]

loc_75ECB8:
mov	esi, [ebp+0Ch]
fld	[esp+20h+arg_8]
mov	edx, ecx
mov	eax, ecx
and	eax, 0FFh
shr	edx, 8
mov	edx, [esi+edx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [edx+eax*4+4]
lea	ebx, [edx+eax*4]
mov	eax, [edi+0Ch]
fmul	st, st(1)
mov	esi, [eax+4]
imul	esi, ecx
fstp	[esp+20h+var_10]
fld	[esp+20h+var_10]
add	esi, [edi+8]
mov	edi, [eax+8]
mov	eax, [edi]
mov	edx, [eax+4]
push	0
sub	esp, 8
mov	ecx, edi
fstp	[esp+2Ch+var_28]
fmul	dword ptr [ebx]
fstp	[esp+2Ch+var_10]
fld	[esp+2Ch+var_10]
fstp	[esp+2Ch+var_2C]
push	esi
call	edx
mov	eax, [ebx+8]
mov	[esp+20h+var_10], eax
and	eax, offset sub_FFFFFF
cmp	eax, [esp+20h+var_8]
setnl	cl
test	cl, cl
jnz	short loc_75ED3A
mov	ebx, [ebp+80h]
lea	edx, [eax+eax*4]
cmp	[ebx+edx*8], cl
jz	short loc_75ED3A
xor	dl, dl
jmp	short loc_75ED3C

loc_75ED3A:
mov	dl, 1

loc_75ED3C:
test	[esp+20h+var_10], 80000000h
jz	loc_75EDFE
cmp	[esp+20h+var_4], 3
jnz	short loc_75ED9E
test	cl, cl
jz	short loc_75ED64
mov	eax, [edi]
mov	edx, [eax+10h]
push	offset sub_FFFFFF
jmp	loc_75EE49

loc_75ED64:
test	dl, dl
jz	loc_75EE4E
mov	ecx, [ebp+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+20h+var_10], eax
shr	edx, 10h
mov	byte ptr [esp+20h+var_10], dl
mov	byte ptr [esp+20h+var_10+2], al
mov	eax, [edi]
mov	ecx, [esp+20h+var_10]
mov	edx, [eax+10h]
and	ecx, offset sub_FFFFFF
jmp	loc_75EE48

loc_75ED9E:
test	cl, cl
jz	short loc_75EDB9
mov	eax, [edi]
mov	edx, [eax+10h]
push	0FFFFFFFFh
push	esi
mov	ecx, edi
call	edx
mov	ecx, [ebp+8Ch]
jmp	loc_75EE43

loc_75EDB9:
test	dl, dl
jz	short loc_75EDF2
mov	ecx, [ebp+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+20h+var_10], eax
shr	edx, 10h
mov	byte ptr [esp+20h+var_10], dl
mov	byte ptr [esp+20h+var_10+2], al
mov	ecx, [esp+20h+var_10]
mov	eax, [edi]
mov	edx, [eax+10h]
push	ecx
push	esi
mov	ecx, edi
call	edx
mov	ecx, [ebp+8Ch]
jmp	short loc_75EE43

loc_75EDF2:
mov	eax, [edi]
mov	edx, [eax+14h]
push	offset sub_FFFFFF
jmp	short loc_75EE49

loc_75EDFE:
test	cl, cl
jz	short loc_75EE06
push	0FFFFFFFFh
jmp	short loc_75EE2D

loc_75EE06:
test	dl, dl
jz	short loc_75EE37
mov	ecx, [ebp+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+20h+var_10], eax
shr	edx, 10h
mov	byte ptr [esp+20h+var_10], dl
mov	byte ptr [esp+20h+var_10+2], al
mov	ecx, [esp+20h+var_10]
push	ecx

loc_75EE2D:
mov	eax, [edi]
mov	edx, [eax+10h]
push	esi
mov	ecx, edi
call	edx

loc_75EE37:
mov	ecx, [ebp+8Ch]
or	ecx, 0FF000000h

loc_75EE43:
mov	eax, [edi]
mov	edx, [eax+14h]

loc_75EE48:
push	ecx

loc_75EE49:
push	esi
mov	ecx, edi
call	edx

loc_75EE4E:
mov	eax, [esp+20h+var_C]
inc	eax
mov	[esp+20h+var_C], eax
cmp	eax, [ebp+0]
jb	loc_75ECB0
pop	ebx

loc_75EE61:
xor	esi, esi
cmp	[ebp+5Ch], esi
jbe	short loc_75EEA4
mov	edi, [esp+1Ch+arg_4]
lea	esp, [esp+0]

loc_75EE70:
mov	edx, [ebp+68h]
mov	ecx, esi
shr	ecx, 8
mov	ecx, [edx+ecx*4]
mov	eax, esi
and	eax, 0FFh
lea	eax, [eax+eax*2]
movzx	edx, word ptr [ecx+eax*4+8]
lea	eax, [ecx+eax*4]
movzx	ecx, word ptr [eax+4]
push	edx
movzx	edx, word ptr [eax]
push	ecx
push	edx
mov	ecx, edi
call	sub_747650
inc	esi
cmp	esi, [ebp+5Ch]
jb	short loc_75EE70

loc_75EEA4:
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 10h
retn	0Ch
sub_75EC60 endp

align 10h



sub_75EEB0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20h
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
mov	ebx, ecx
mov	eax, [ebx]
push	edi
push	eax
mov	ecx, esi
call	sub_756650
mov	ecx, [esi+0Ch]
mov	edx, [ecx]
xor	ecx, ecx
mov	[esp+2Ch+var_14], edx
cmp	[ebx+80h], ecx
jz	short loc_75EEE5
mov	eax, [ebx+84h]
mov	[esp+2Ch+var_18], eax
jmp	short loc_75EEE9

loc_75EEE5:
mov	[esp+2Ch+var_18], ecx

loc_75EEE9:
mov	[esp+2Ch+var_1C], ecx
cmp	[ebx], ecx
jbe	loc_75F142
push	ebp
jmp	short loc_75EF08
jmp	short loc_75EF00
align 10h

loc_75EF00:
mov	ecx, [esp+30h+var_1C]
mov	esi, [esp+30h+arg_0]

loc_75EF08:
mov	edi, [ebx+0Ch]
mov	edx, ecx
mov	eax, ecx
and	eax, 0FFh
shr	edx, 8
mov	edx, [edi+edx*4]
lea	eax, [eax+eax*2]
fld	dword ptr [edx+eax*4]
lea	ebp, [edx+eax*4]
mov	eax, [esi+0Ch]
fstp	[esp+30h+var_8]
mov	edi, [eax+4]
fld	dword ptr [ebp+4]
imul	edi, ecx
fstp	[esp+30h+var_4]
add	edi, [esi+8]
mov	esi, [eax+8]
lea	eax, [esp+30h+var_8]
push	eax
lea	ecx, [esp+34h+var_10]
push	ecx
mov	ecx, [esp+38h+arg_8]
call	sub_64E9B0
fld	[esp+30h+var_10]
fld	st
fabs
fstp	[esp+30h+var_20]
fld	[esp+30h+var_20]
fld	ds:dbl_15FCC18
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_75EF94
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_75EF88
fld	ds:flt_143764C
fstp	[esp+30h+var_10]
jmp	short loc_75EF96

loc_75EF88:
fld	ds:flt_1437648
fstp	[esp+30h+var_10]
jmp	short loc_75EF96

loc_75EF94:
fstp	st(1)

loc_75EF96:
fld	[esp+30h+var_C]
fld	st
fabs
fstp	[esp+30h+var_20]
fld	[esp+30h+var_20]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_75EFD0
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_75EFC4
fld	ds:flt_143764C
fstp	[esp+30h+var_C]
jmp	short loc_75EFD4

loc_75EFC4:
fld	ds:flt_1437648
fstp	[esp+30h+var_C]
jmp	short loc_75EFD4

loc_75EFD0:
fstp	st(1)
fstp	st

loc_75EFD4:
fld	[esp+30h+var_C]
mov	edx, [esi]
mov	eax, [edx+4]
push	0
sub	esp, 8
fstp	[esp+3Ch+var_38]
mov	ecx, esi
fld	[esp+3Ch+var_10]
fstp	[esp+3Ch+var_3C]
push	edi
call	eax
mov	eax, [ebp+8]
mov	[esp+30h+var_20], eax
and	eax, offset sub_FFFFFF
cmp	eax, [esp+30h+var_18]
setnl	cl
test	cl, cl
jnz	short loc_75F01C
mov	ebp, [ebx+80h]
lea	edx, [eax+eax*4]
cmp	[ebp+edx*8+0], cl
jz	short loc_75F01C
xor	dl, dl
jmp	short loc_75F01E

loc_75F01C:
mov	dl, 1

loc_75F01E:
test	[esp+30h+var_20], 80000000h
jz	loc_75F0E0
cmp	[esp+30h+var_14], 3
jnz	short loc_75F080
test	cl, cl
jz	short loc_75F046
mov	eax, [esi]
mov	edx, [eax+10h]
push	offset sub_FFFFFF
jmp	loc_75F12B

loc_75F046:
test	dl, dl
jz	loc_75F130
mov	ecx, [ebx+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+30h+var_20], eax
shr	edx, 10h
mov	byte ptr [esp+30h+var_20], dl
mov	byte ptr [esp+30h+var_20+2], al
mov	eax, [esi]
mov	ecx, [esp+30h+var_20]
mov	edx, [eax+10h]
and	ecx, offset sub_FFFFFF
jmp	loc_75F12A

loc_75F080:
test	cl, cl
jz	short loc_75F09B
mov	eax, [esi]
mov	edx, [eax+10h]
push	0FFFFFFFFh
push	edi
mov	ecx, esi
call	edx
mov	ecx, [ebx+8Ch]
jmp	loc_75F125

loc_75F09B:
test	dl, dl
jz	short loc_75F0D4
mov	ecx, [ebx+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+30h+var_20], eax
shr	edx, 10h
mov	byte ptr [esp+30h+var_20], dl
mov	byte ptr [esp+30h+var_20+2], al
mov	ecx, [esp+30h+var_20]
mov	eax, [esi]
mov	edx, [eax+10h]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	ecx, [ebx+8Ch]
jmp	short loc_75F125

loc_75F0D4:
mov	eax, [esi]
mov	edx, [eax+14h]
push	offset sub_FFFFFF
jmp	short loc_75F12B

loc_75F0E0:
test	cl, cl
jz	short loc_75F0E8
push	0FFFFFFFFh
jmp	short loc_75F10F

loc_75F0E8:
test	dl, dl
jz	short loc_75F119
mov	ecx, [ebx+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+30h+var_20], eax
shr	edx, 10h
mov	byte ptr [esp+30h+var_20], dl
mov	byte ptr [esp+30h+var_20+2], al
mov	ecx, [esp+30h+var_20]
push	ecx

loc_75F10F:
mov	eax, [esi]
mov	edx, [eax+10h]
push	edi
mov	ecx, esi
call	edx

loc_75F119:
mov	ecx, [ebx+8Ch]
or	ecx, 0FF000000h

loc_75F125:
mov	eax, [esi]
mov	edx, [eax+14h]

loc_75F12A:
push	ecx

loc_75F12B:
push	edi
mov	ecx, esi
call	edx

loc_75F130:
mov	eax, [esp+30h+var_1C]
inc	eax
mov	[esp+30h+var_1C], eax
cmp	eax, [ebx]
jb	loc_75EF00
pop	ebp

loc_75F142:
xor	esi, esi
cmp	[ebx+5Ch], esi
jbe	short loc_75F184
mov	edi, [esp+2Ch+arg_4]
lea	ecx, [ecx+0]

loc_75F150:
mov	edx, [ebx+68h]
mov	ecx, esi
shr	ecx, 8
mov	ecx, [edx+ecx*4]
mov	eax, esi
and	eax, 0FFh
lea	eax, [eax+eax*2]
movzx	edx, word ptr [ecx+eax*4+8]
lea	eax, [ecx+eax*4]
movzx	ecx, word ptr [eax+4]
push	edx
movzx	edx, word ptr [eax]
push	ecx
push	edx
mov	ecx, edi
call	sub_747650
inc	esi
cmp	esi, [ebx+5Ch]
jb	short loc_75F150

loc_75F184:
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 20h
retn	0Ch
sub_75EEB0 endp

align 10h



; int __stdcall	sub_75F190(int,	int, float)
sub_75F190 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6B=	byte ptr -6Bh
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 7Ch
mov	eax, [esp+7Ch+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	ecx, [esi]
push	edi
push	ecx
push	eax
lea	ecx, [esp+94h+var_48]
mov	[esp+94h+var_50], esi
mov	[esp+94h+var_54], edx
call	sub_75EAB0
cmp	dword ptr [esi], 0
mov	[esp+8Ch+var_6B], 0
mov	[esp+8Ch+var_68], 0
jbe	loc_75F39F
mov	ebx, esi

loc_75F1D2:
mov	ecx, [esp+8Ch+var_68]
fld	[esp+8Ch+arg_8]
mov	esi, [ebx+0Ch]
mov	edx, ecx
mov	eax, ecx
shr	edx, 8
mov	edx, [esi+edx*4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
fld	dword ptr [edx+eax*4+4]
lea	ebp, [edx+eax*4]
mov	edx, [esp+8Ch+arg_0]
fmul	st, st(1)
mov	eax, [edx+0Ch]
mov	esi, [eax+4]
mov	edi, [eax+8]
fstp	[esp+8Ch+var_64]
imul	esi, ecx
fld	[esp+8Ch+var_64]
add	esi, [edx+8]
mov	eax, [edi]
mov	edx, [eax+4]
push	0
sub	esp, 8
mov	ecx, edi
fstp	[esp+98h+var_94]
fmul	dword ptr [ebp+0]
fstp	[esp+98h+var_64]
fld	[esp+98h+var_64]
fstp	[esp+98h+var_98]
push	esi
call	edx
mov	eax, [ebp+8]
mov	[esp+8Ch+var_64], eax
and	eax, offset sub_FFFFFF
cmp	eax, [ebx+84h]
setnl	cl
test	cl, cl
jnz	short loc_75F266
mov	ebp, [ebx+80h]
lea	edx, [eax+eax*4]
mov	byte ptr [esp+8Ch+var_7C+1], cl
cmp	[ebp+edx*8+0], cl
jnz	short loc_75F26B

loc_75F266:
mov	byte ptr [esp+8Ch+var_7C+1], 1

loc_75F26B:
test	[esp+8Ch+var_64], 80000000h
jz	loc_75F333
cmp	[esp+8Ch+var_54], 3
jnz	short loc_75F2D0
test	cl, cl
jz	short loc_75F293
mov	eax, [edi]
mov	edx, [eax+10h]
push	offset sub_FFFFFF
jmp	loc_75F381

loc_75F293:
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	loc_75F386
mov	ecx, [ebx+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+8Ch+var_78], eax
shr	edx, 10h
mov	byte ptr [esp+8Ch+var_78], dl
mov	byte ptr [esp+8Ch+var_78+2], al
mov	eax, [edi]
mov	ecx, [esp+8Ch+var_78]
mov	edx, [eax+10h]
and	ecx, offset sub_FFFFFF
jmp	loc_75F380

loc_75F2D0:
test	cl, cl
jz	short loc_75F2EB
mov	eax, [edi]
mov	edx, [eax+10h]
push	0FFFFFFFFh
push	esi
mov	ecx, edi
call	edx
mov	ecx, [ebx+8Ch]
jmp	loc_75F37B

loc_75F2EB:
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	short loc_75F327
mov	ecx, [ebx+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+8Ch+var_78], eax
shr	edx, 10h
mov	byte ptr [esp+8Ch+var_78], dl
mov	byte ptr [esp+8Ch+var_78+2], al
mov	ecx, [esp+8Ch+var_78]
mov	eax, [edi]
mov	edx, [eax+10h]
push	ecx
push	esi
mov	ecx, edi
call	edx
mov	ecx, [ebx+8Ch]
jmp	short loc_75F37B

loc_75F327:
mov	eax, [edi]
mov	edx, [eax+14h]
push	offset sub_FFFFFF
jmp	short loc_75F381

loc_75F333:
test	cl, cl
jz	short loc_75F33B
push	0FFFFFFFFh
jmp	short loc_75F365

loc_75F33B:
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	short loc_75F36F
mov	ecx, [ebx+80h]
lea	eax, [eax+eax*4]
mov	eax, [ecx+eax*8+4]
mov	edx, eax
mov	[esp+8Ch+var_78], eax
shr	edx, 10h
mov	byte ptr [esp+8Ch+var_78], dl
mov	byte ptr [esp+8Ch+var_78+2], al
mov	ecx, [esp+8Ch+var_78]
push	ecx

loc_75F365:
mov	eax, [edi]
mov	edx, [eax+10h]
push	esi
mov	ecx, edi
call	edx

loc_75F36F:
mov	ecx, [ebx+8Ch]
or	ecx, 0FF000000h

loc_75F37B:
mov	eax, [edi]
mov	edx, [eax+14h]

loc_75F380:
push	ecx

loc_75F381:
push	esi
mov	ecx, edi
call	edx

loc_75F386:
mov	al, byte ptr [esp+8Ch+var_7C+1]
or	[esp+8Ch+var_6B], al
mov	eax, [esp+8Ch+var_68]
inc	eax
mov	[esp+8Ch+var_68], eax
cmp	eax, [ebx]
jb	loc_75F1D2

loc_75F39F:
mov	ecx, [esp+8Ch+var_50]
or	eax, 0FFFFFFFFh
mov	[esp+8Ch+var_78], eax
mov	[esp+8Ch+var_4C], eax
mov	[esp+8Ch+var_58], eax
xor	eax, eax
mov	[esp+8Ch+var_54], eax
mov	[esp+8Ch+var_68], eax
cmp	[ecx+5Ch], eax
jbe	loc_75FAB1
mov	esi, [esp+8Ch+var_48]
lea	esp, [esp+0]

loc_75F3D0:
mov	eax, [esp+8Ch+var_68]
mov	ecx, [esp+8Ch+var_50]
mov	edi, [ecx+68h]
mov	ecx, [ecx+0Ch]
mov	edx, eax
and	eax, 0FFh
lea	eax, [eax+eax*2]
shr	edx, 8
mov	edx, [edi+edx*4]
lea	edi, [edx+eax*4]
mov	eax, [edi]
mov	edx, eax
and	eax, 0FFh
lea	eax, [eax+eax*2]
shr	edx, 8
mov	edx, [ecx+edx*4]
lea	edx, [edx+eax*4]
mov	eax, [edi+4]
mov	ebx, eax
and	eax, 0FFh
lea	eax, [eax+eax*2]
shr	ebx, 8
mov	ebx, [ecx+ebx*4]
lea	ebx, [ebx+eax*4]
mov	eax, [edi+8]
mov	ebp, eax
and	eax, 0FFh
mov	[esp+8Ch+var_64], edx
mov	edx, [edx+8]
shr	ebp, 8
mov	ecx, [ecx+ebp*4]
mov	ebp, [ebx+8]
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	[esp+8Ch+var_5C], edx
and	edx, 0C0000000h
cmp	edx, 40000000h
setz	cl
mov	[esp+8Ch+var_34], eax
mov	eax, [eax+8]
mov	edx, ebp
and	edx, 0C0000000h
cmp	edx, 40000000h
mov	[esp+8Ch+var_70], eax
mov	[esp+8Ch+var_38], ebx
setz	bl
and	eax, 0C0000000h
cmp	eax, 40000000h
setz	dl
mov	al, dl
or	al, bl
or	al, cl
mov	byte ptr [esp+8Ch+var_7C+2], cl
mov	ecx, [esp+8Ch+var_78]
mov	[esp+8Ch+var_69], al
mov	eax, [esp+8Ch+var_5C]
and	eax, offset sub_FFFFFF
and	ecx, offset sub_FFFFFF
mov	[esp+8Ch+var_74], ebp
mov	byte ptr [esp+8Ch+var_7C+1], bl
mov	byte ptr [esp+8Ch+var_7C+3], dl
cmp	ecx, eax
jz	short loc_75F4B4
cmp	byte ptr [esp+8Ch+var_7C+2], 0
jnz	short loc_75F4EA

loc_75F4B4:
xor	ebp, [esp+8Ch+var_4C]
test	ebp, offset sub_FFFFFF
jz	short loc_75F4C7
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jnz	short loc_75F4E6

loc_75F4C7:
mov	ebx, [esp+8Ch+var_70]
xor	ebx, [esp+8Ch+var_58]
test	ebx, offset sub_FFFFFF
jz	short loc_75F4DB
test	dl, dl
jnz	short loc_75F4E6

loc_75F4DB:
cmp	[esp+8Ch+var_68], 0
jnz	loc_75F764

loc_75F4E6:
mov	ebp, [esp+8Ch+var_74]

loc_75F4EA:
cmp	[esp+8Ch+var_69], 0
mov	[esp+8Ch+var_74], 0
jz	short loc_75F53E
xor	ebx, ebx
cmp	[esp+8Ch+var_6B], bl
setnz	bl
inc	ebx
cmp	byte ptr [esp+8Ch+var_7C+2], 0
mov	[esp+8Ch+var_74], ebx
jz	short loc_75F53E
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	short loc_75F53E
test	dl, dl
jz	short loc_75F53E
mov	edx, [esp+8Ch+var_70]
mov	ebx, ebp
and	edx, offset sub_FFFFFF
and	ebx, offset sub_FFFFFF
cmp	edx, ebx
jnz	short loc_75F533
cmp	edx, eax
jz	short loc_75F53E

loc_75F533:
mov	ebx, 3
mov	[esp+8Ch+var_74], ebx
jmp	short loc_75F542

loc_75F53E:
mov	ebx, [esp+8Ch+var_74]

loc_75F542:
xor	dl, dl
mov	byte ptr [esp+8Ch+var_60+3], dl
cmp	ebx, 2
jz	short loc_75F55B
cmp	ebx, 1
jz	short loc_75F55B
cmp	ebx, 3
jnz	loc_75F602

loc_75F55B:
mov	edx, [esp+8Ch+var_78]
mov	ebx, [esp+8Ch+var_58]
and	edx, 0C0000000h
cmp	edx, 40000000h
mov	edx, [esp+8Ch+var_70]
setz	[esp+8Ch+var_6A]
and	ebx, offset sub_FFFFFF
and	edx, offset sub_FFFFFF
mov	[esp+8Ch+var_78], ebx
cmp	ebx, edx
jnz	short loc_75F5FE
cmp	ecx, eax
jz	short loc_75F5A9
cmp	eax, edx
jz	short loc_75F5A9
cmp	[esp+8Ch+var_74], 2
jnz	short loc_75F5FE
cmp	byte ptr [esp+8Ch+var_7C+2], 0
jz	short loc_75F5A9
cmp	[esp+8Ch+var_6A], 0
jnz	short loc_75F5FE

loc_75F5A9:
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	short loc_75F5F1
mov	ecx, ebp
and	ecx, offset sub_FFFFFF
cmp	ecx, edx
jz	short loc_75F5C0
cmp	ecx, eax
jnz	short loc_75F5FE

loc_75F5C0:
mov	ecx, [esp+8Ch+var_4C]
mov	ebx, ecx
and	ebx, 0C0000000h
cmp	ebx, 40000000h
jz	short loc_75F5D8
mov	dl, 1
jmp	short loc_75F602

loc_75F5D8:
and	ecx, offset sub_FFFFFF
cmp	ecx, edx
jz	short loc_75F5ED
cmp	ecx, eax
jz	short loc_75F5ED
cmp	[esp+8Ch+var_74], 3
jz	short loc_75F5FE

loc_75F5ED:
mov	dl, 1
jmp	short loc_75F602

loc_75F5F1:
cmp	[esp+8Ch+var_6A], 0
jnz	short loc_75F5FE
mov	dl, 1
cmp	ecx, ebx
jz	short loc_75F602

loc_75F5FE:
mov	dl, byte ptr [esp+8Ch+var_60+3]

loc_75F602:
mov	eax, [esp+8Ch+var_5C]
mov	ecx, [esp+8Ch+var_70]
mov	[esp+8Ch+var_78], eax
mov	[esp+8Ch+var_4C], ebp
mov	[esp+8Ch+var_58], ecx
test	dl, dl
jnz	loc_75F764
mov	ebp, [esp+8Ch+arg_4]
mov	eax, [ebp+4]
lea	ebx, [eax+1]
mov	[esp+8Ch+var_70], eax
cmp	ebx, eax
jnb	short loc_75F656
mov	ecx, [ebp+0]
mov	edx, eax
sub	edx, ebx
push	edx
lea	eax, [ebx+ebx*4]
lea	edx, [ecx+eax*8]
push	edx
call	sub_7479A0
mov	eax, [ebp+8]
shr	eax, 1
add	esp, 8
cmp	ebx, eax
jnb	short loc_75F66B
push	ebx
jmp	short loc_75F663

loc_75F656:
cmp	ebx, [ebp+8]
jb	short loc_75F66F
mov	ecx, ebx
shr	ecx, 2
add	ecx, ebx
push	ecx

loc_75F663:
push	ebp
mov	ecx, ebp
call	sub_7493F0

loc_75F66B:
mov	eax, [esp+8Ch+var_70]

loc_75F66F:
mov	[ebp+4], ebx
cmp	ebx, eax
jbe	short loc_75F6A1
sub	ebx, eax
mov	ecx, [ebp+0]
lea	edx, [eax+eax*4]
lea	edx, [ecx+edx*8]
mov	[esp+8Ch+var_70], edx
jz	short loc_75F6A1

loc_75F687:
cmp	[esp+8Ch+var_70], 0
jz	short loc_75F697
mov	ecx, [esp+8Ch+var_70]
call	sub_747590

loc_75F697:
add	[esp+8Ch+var_70], 28h
sub	ebx, 1
jnz	short loc_75F687

loc_75F6A1:
mov	eax, [ebp+4]
mov	ecx, [ebp+0]
mov	ebx, [esp+8Ch+var_74]
inc	[esp+8Ch+var_54]
lea	eax, [eax+eax*4]
push	ebx
lea	ecx, [ecx+eax*8-28h]
call	sub_7FA0D0
test	ebx, ebx
jle	loc_75F748
cmp	ebx, 2
jle	short loc_75F715
cmp	ebx, 3
jnz	short loc_75F748
mov	edx, [esp+8Ch+var_58]
mov	eax, [esp+8Ch+var_4C]
mov	ecx, edx
mov	ebx, eax
and	ecx, offset sub_FFFFFF
and	ebx, offset sub_FFFFFF
cmp	ecx, ebx
jnz	short loc_75F6EE
mov	eax, [esp+8Ch+var_78]

loc_75F6EE:
mov	ebx, eax
shr	ebx, 1Fh
test	bl, 1
jz	short loc_75F6FD
or	eax, 0FFFFFFFFh
jmp	short loc_75F702

loc_75F6FD:
and	eax, offset sub_FFFFFF

loc_75F702:
shr	edx, 1Fh
test	dl, 1
jz	short loc_75F70D
or	ecx, 0FFFFFFFFh

loc_75F70D:
push	0FFFFFFFFh
push	eax
push	ecx
push	2
jmp	short loc_75F734

loc_75F715:
mov	eax, [esp+8Ch+var_58]
mov	ecx, eax
shr	ecx, 1Fh
test	cl, 1
jz	short loc_75F728
or	eax, 0FFFFFFFFh
jmp	short loc_75F72D

loc_75F728:
and	eax, offset sub_FFFFFF

loc_75F72D:
push	0FFFFFFFFh
push	0FFFFFFFFh
push	eax
push	1

loc_75F734:
mov	eax, [ebp+4]
lea	edx, [eax+eax*4]
mov	eax, [ebp+0]
lea	ecx, [eax+edx*8-28h]
call	sub_746CE0
jmp	short loc_75F76B

loc_75F748:
mov	eax, [ebp+4]
mov	edx, [ebp+0]
push	0FFFFFFFFh
push	0FFFFFFFFh
push	0FFFFFFFFh
lea	ecx, [eax+eax*4]
push	0
lea	ecx, [edx+ecx*8-28h]
call	sub_746CE0
jmp	short loc_75F76B

loc_75F764:
mov	ebp, [esp+8Ch+arg_4]

loc_75F76B:
cmp	[esp+8Ch+var_69], 0
jz	loc_75FA7B
mov	edx, [edi]
mov	ecx, [esi+0Ch]
mov	eax, [ecx+4]
mov	ecx, [ecx+8]
imul	eax, edx
add	eax, [esi+8]
mov	ebx, [edi+4]
mov	edi, [edi+8]
mov	[esp+8Ch+var_74], edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+1Ch]
call	eax
mov	ecx, [esi+0Ch]
mov	ebp, eax
mov	eax, [ecx+4]
mov	ecx, [ecx+8]
imul	eax, ebx
add	eax, [esi+8]
mov	edx, [ecx]
push	eax
mov	eax, [edx+1Ch]
and	ebp, 0FF000000h
call	eax
mov	ecx, [esi+0Ch]
and	eax, 0FF000000h
mov	[esp+8Ch+var_70], eax
mov	eax, [ecx+4]
mov	ecx, [ecx+8]
imul	eax, edi
add	eax, [esi+8]
mov	edx, [ecx]
push	eax
mov	eax, [edx+1Ch]
call	eax
and	eax, 0FF000000h
cmp	byte ptr [esp+8Ch+var_7C+3], 0
mov	[esp+8Ch+var_5C], eax
jz	short loc_75F85A
mov	edx, [esp+8Ch+var_38]
mov	ecx, [esp+8Ch+var_34]
mov	edx, [edx+8]
mov	ecx, [ecx+8]
or	[esp+8Ch+var_5C], offset sub_FFFFFF
mov	eax, edx
and	ecx, offset sub_FFFFFF
and	eax, offset sub_FFFFFF
cmp	eax, ecx
jz	short loc_75F831
shr	edx, 1Fh
test	dl, 1
jnz	short loc_75F831
mov	eax, [esp+8Ch+var_64]
mov	eax, [eax+8]
mov	edx, eax
and	edx, offset sub_FFFFFF
cmp	edx, ecx
jz	short loc_75F854
shr	eax, 1Fh
test	al, 1
jmp	short loc_75F852

loc_75F831:
mov	ecx, [esp+8Ch+var_64]
mov	ecx, [ecx+8]
or	[esp+8Ch+var_70], offset sub_FFFFFF
mov	edx, ecx
and	edx, offset sub_FFFFFF
cmp	edx, eax
jz	short loc_75F854
shr	ecx, 1Fh
test	cl, 1

loc_75F852:
jz	short loc_75F85A

loc_75F854:
or	ebp, offset sub_FFFFFF

loc_75F85A:
cmp	byte ptr [esp+8Ch+var_7C+2], 0
jz	short loc_75F87D
mov	eax, [esp+8Ch+var_74]
push	ebp
push	eax
lea	ecx, [esp+94h+var_48]
call	sub_75EB30
mov	esi, [esp+8Ch+var_48]
mov	[esp+8Ch+var_74], eax
jmp	loc_75F90B

loc_75F87D:
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	short loc_75F8C1
mov	ecx, [esi+0Ch]
mov	ebp, [esi+0Ch]
mov	eax, [ecx+4]
mov	ebp, [ebp+4]
imul	eax, [esp+8Ch+var_74]
mov	edx, [esi+8]
imul	ebp, ebx
mov	ecx, [ecx+8]
add	eax, edx
add	ebp, edx
mov	edx, [esi+0Ch]
mov	edx, [edx+8]
mov	[esp+8Ch+var_2C], edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+18h]
call	eax
mov	ecx, [esp+8Ch+var_2C]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
push	ebp
call	eax

loc_75F8C1:
cmp	byte ptr [esp+8Ch+var_7C+3], 0
jz	short loc_75F90B
mov	ecx, [esi+0Ch]
mov	ebp, [esi+0Ch]
mov	eax, [ecx+4]
mov	ebp, [ebp+4]
imul	eax, [esp+8Ch+var_74]
mov	edx, [esi+8]
imul	ebp, edi
mov	ecx, [ecx+8]
add	eax, edx
add	ebp, edx
mov	edx, [esi+0Ch]
mov	edx, [edx+8]
mov	[esp+8Ch+var_4], edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+18h]
call	eax
mov	ecx, [esp+8Ch+var_4]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
push	ebp
call	eax

loc_75F90B:
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	short loc_75F92C
mov	ecx, [esp+8Ch+var_70]
push	ecx
push	ebx
lea	ecx, [esp+94h+var_48]
call	sub_75EB30
mov	esi, [esp+8Ch+var_48]
mov	ebx, eax
jmp	loc_75F9B8

loc_75F92C:
cmp	byte ptr [esp+8Ch+var_7C+2], 0
jz	short loc_75F970
mov	ecx, [esi+0Ch]
mov	ebp, [esi+0Ch]
mov	eax, [ecx+4]
mov	ebp, [ebp+4]
imul	eax, ebx
imul	ebp, [esp+8Ch+var_74]
mov	edx, [esi+8]
mov	ecx, [ecx+8]
add	eax, edx
add	ebp, edx
mov	edx, [esi+0Ch]
mov	edx, [edx+8]
mov	[esp+8Ch+var_1C], edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+18h]
call	eax
mov	ecx, [esp+8Ch+var_1C]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
push	ebp
call	eax

loc_75F970:
cmp	byte ptr [esp+8Ch+var_7C+3], 0
jz	short loc_75F9D9
mov	ecx, [esi+0Ch]
mov	ebp, [esi+0Ch]
mov	eax, [ecx+4]
mov	ebp, [ebp+4]
imul	eax, ebx
mov	edx, [esi+8]
imul	ebp, edi
mov	ecx, [ecx+8]
add	eax, edx
add	ebp, edx
mov	edx, [esi+0Ch]
mov	edx, [edx+8]
mov	[esp+8Ch+var_C], edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+18h]
call	eax
mov	ecx, [esp+8Ch+var_C]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
push	ebp
call	eax

loc_75F9B8:
cmp	byte ptr [esp+8Ch+var_7C+3], 0
jz	short loc_75F9D9
mov	ecx, [esp+8Ch+var_5C]
push	ecx
push	edi
lea	ecx, [esp+94h+var_48]
call	sub_75EB30
mov	esi, [esp+8Ch+var_48]
mov	edi, eax
jmp	loc_75FA5F

loc_75F9D9:
cmp	byte ptr [esp+8Ch+var_7C+2], 0
jz	short loc_75FA1D
mov	ecx, [esi+0Ch]
mov	ebp, [esi+0Ch]
mov	eax, [ecx+4]
mov	ebp, [ebp+4]
imul	eax, edi
imul	ebp, [esp+8Ch+var_74]
mov	edx, [esi+8]
mov	ecx, [ecx+8]
add	eax, edx
add	ebp, edx
mov	edx, [esi+0Ch]
mov	edx, [edx+8]
mov	[esp+8Ch+var_24], edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+18h]
call	eax
mov	ecx, [esp+8Ch+var_24]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
push	ebp
call	eax

loc_75FA1D:
cmp	byte ptr [esp+8Ch+var_7C+1], 0
jz	short loc_75FA5F
mov	ecx, [esi+0Ch]
mov	ebp, [esi+0Ch]
mov	eax, [ecx+4]
mov	ebp, [ebp+4]
imul	eax, edi
mov	edx, [esi+8]
imul	ebp, ebx
mov	ecx, [ecx+8]
add	eax, edx
add	ebp, edx
mov	edx, [esi+0Ch]
mov	edx, [edx+8]
mov	[esp+8Ch+var_14], edx
mov	edx, [ecx]
push	eax
mov	eax, [edx+18h]
call	eax
mov	ecx, [esp+8Ch+var_14]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10h]
push	ebp
call	eax

loc_75FA5F:
mov	ecx, [esp+8Ch+var_74]
push	edi
push	ebx
push	ecx
mov	ecx, [esp+98h+arg_4]
mov	eax, [ecx+4]
lea	edx, [eax+eax*4]
mov	eax, [ecx]
lea	ecx, [eax+edx*8-28h]
jmp	short loc_75FA96

loc_75FA7B:
movzx	ecx, word ptr [edi+8]
movzx	edx, word ptr [edi+4]
movzx	eax, word ptr [edi]
push	ecx
push	edx
mov	edx, [ebp+0]
push	eax
mov	eax, [ebp+4]
lea	ecx, [eax+eax*4]
lea	ecx, [edx+ecx*8-28h]

loc_75FA96:
call	sub_747650
mov	eax, [esp+8Ch+var_68]
mov	ecx, [esp+8Ch+var_50]
inc	eax
mov	[esp+8Ch+var_68], eax
cmp	eax, [ecx+5Ch]
jb	loc_75F3D0

loc_75FAB1:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esp+8Ch+var_44]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, [esp+8Ch+var_54]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 7Ch
retn	0Ch
sub_75F190 endp

align 10h



sub_75FAE0 proc	near
fldz
mov	eax, ecx
fst	dword ptr [eax]
xor	cl, cl
fst	dword ptr [eax+4]
mov	[eax+0D0h], cl
fst	dword ptr [eax+8]
mov	[eax+0D1h], cl
fst	dword ptr [eax+0Ch]
mov	[eax+0D2h], cl
fst	dword ptr [eax+10h]
mov	[eax+0D3h], cl
fst	dword ptr [eax+14h]
mov	[eax+0D4h], cl
fst	dword ptr [eax+18h]
mov	[eax+0D5h], cl
fst	dword ptr [eax+1Ch]
mov	[eax+0D6h], cl
fst	dword ptr [eax+20h]
mov	[eax+0D7h], cl
fst	dword ptr [eax+24h]
mov	[eax+0D8h], cl
fst	dword ptr [eax+28h]
mov	[eax+0D9h], cl
fst	dword ptr [eax+2Ch]
mov	[eax+0DAh], cl
fst	dword ptr [eax+30h]
fst	dword ptr [eax+34h]
fst	dword ptr [eax+38h]
fst	dword ptr [eax+3Ch]
fst	dword ptr [eax+40h]
fst	dword ptr [eax+44h]
fst	dword ptr [eax+48h]
fst	dword ptr [eax+4Ch]
fst	dword ptr [eax+50h]
fst	dword ptr [eax+54h]
fst	dword ptr [eax+58h]
fst	dword ptr [eax+5Ch]
fst	dword ptr [eax+60h]
fst	dword ptr [eax+64h]
fst	dword ptr [eax+68h]
fst	dword ptr [eax+6Ch]
fst	dword ptr [eax+70h]
fst	dword ptr [eax+74h]
fst	dword ptr [eax+78h]
fst	dword ptr [eax+7Ch]
fst	dword ptr [eax+80h]
fst	dword ptr [eax+84h]
fst	dword ptr [eax+88h]
fst	dword ptr [eax+8Ch]
fst	dword ptr [eax+90h]
fst	dword ptr [eax+94h]
fst	dword ptr [eax+98h]
fst	dword ptr [eax+9Ch]
fst	dword ptr [eax+0A0h]
fst	dword ptr [eax+0A4h]
fst	dword ptr [eax+0A8h]
fst	dword ptr [eax+0ACh]
fst	dword ptr [eax+0B0h]
fst	dword ptr [eax+0B4h]
fst	dword ptr [eax+0B8h]
fst	dword ptr [eax+0BCh]
fst	dword ptr [eax+0C0h]
fst	dword ptr [eax+0C4h]
fst	dword ptr [eax+0C8h]
fstp	dword ptr [eax+0CCh]
retn
sub_75FAE0 endp




; int __cdecl sub_75FC00(float,	float, float, float, float, float, float, float, float)
sub_75FC00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

fld	[esp+arg_8]
fld	[esp+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+arg_1C]
fsub	[esp+arg_14]
fld	[esp+arg_C]
fsub	[esp+arg_4]
fld	[esp+arg_18]
fsub	[esp+arg_10]
fld	st(2)
fmul	st, st(5)
fld	st(1)
fmul	st, st(3)
fsubp	st(1), st
fstp	[esp+arg_8]
fld	[esp+arg_8]
fld	st
fabs
fstp	[esp+arg_8]
fld	[esp+arg_8]
fld	[esp+arg_20]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_75FC5E
fstp	st(4)
mov	al, 1
fstp	st(3)
fstp	st(3)
fstp	st
fstp	st(1)
fstp	st
retn

loc_75FC5E:
fld	[esp+arg_4]
fsub	[esp+arg_14]
fld	[esp+arg_10]
fsubp	st(6), st
fld	st
fmulp	st(3), st
fld	st(5)
fmulp	st(5), st
fxch	st(2)
fsubrp	st(4), st
fxch	st(3)
fstp	[esp+arg_4]
fld	[esp+arg_4]
fdiv	st, st(3)
fstp	[esp+arg_14]
fmulp	st(4), st
fmulp	st(2), st
fxch	st(2)
fsubrp	st(1), st
fstp	[esp+arg_4]
fdivr	[esp+arg_4]
fstp	[esp+arg_4]
fldz
fld	[esp+arg_14]
fcom	st(1)
fnstsw	ax
test	ah, 1
jnz	short loc_75FCD6
fld1
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jnz	short loc_75FCDD
fld	[esp+arg_4]
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 1
jnz	short loc_75FCDD
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_75FCE1
mov	eax, 1
retn

loc_75FCD6:
fstp	st
xor	eax, eax
fstp	st
retn

loc_75FCDD:
fstp	st(1)
fstp	st

loc_75FCE1:
xor	eax, eax
retn
sub_75FC00 endp

align 10h



sub_75FCF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_0]
mov	eax, [esp+arg_4]
fld	dword ptr [eax+4]
mov	ecx, [esp+arg_8]
fsub	dword ptr [edx+4]
fdiv	dword ptr [edx+8]
fstp	[esp+arg_0]
fld	dword ptr [edx]
fsub	dword ptr [eax]
mov	eax, [esp+arg_C]
fdiv	dword ptr [edx+8]
fstp	[esp+arg_4]
fld	dword ptr [ecx]
fld	[esp+arg_0]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+20h]
fld	dword ptr [ecx]
fld	[esp+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+24h]
fld	dword ptr [ecx+4]
fmul	st, st(2)
fstp	dword ptr [eax+50h]
fld	dword ptr [ecx+4]
fmul	st, st(1)
fstp	dword ptr [eax+54h]
fld	dword ptr [ecx+0Ch]
fmul	st, st(2)
fstp	dword ptr [eax+28h]
fld	dword ptr [ecx+0Ch]
fmul	st, st(1)
fstp	dword ptr [eax+2Ch]
fld	dword ptr [ecx+10h]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+58h]
fmul	dword ptr [ecx+10h]
fstp	dword ptr [eax+5Ch]
fld	dword ptr [edx]
fsub	dword ptr [eax+28h]
fstp	dword ptr [eax+0A0h]
fld	dword ptr [edx+4]
fsub	dword ptr [eax+2Ch]
fstp	dword ptr [eax+0A4h]
fld	dword ptr [edx]
fadd	dword ptr [eax+58h]
fstp	dword ptr [eax+0A8h]
fld	dword ptr [eax+5Ch]
fadd	dword ptr [edx+4]
fstp	dword ptr [eax+0ACh]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+0B0h]
fld	dword ptr [ecx+10h]
xor	cl, cl
fstp	dword ptr [eax+0B4h]
mov	[eax+0DAh], cl
mov	[eax+0D8h], cl
mov	[eax+0D5h], cl
mov	[eax+0D4h], cl
retn	10h
sub_75FCF0 endp

align 10h



sub_75FDD0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	dword ptr [ecx+18h]
fstp	dword ptr [edx]
fld	dword ptr [ecx+1Ch]
fstp	dword ptr [edx+4]
fldz
fcom	dword ptr [edx]
fnstsw	ax
test	ah, 41h
jnz	short loc_75FDEC
fst	dword ptr [edx]

loc_75FDEC:
fcom	dword ptr [edx+4]
fnstsw	ax
test	ah, 41h
jnz	short loc_75FDF9
fst	dword ptr [edx+4]

loc_75FDF9:
fld	dword ptr [ecx+20h]
fadd	dword ptr [edx]
fstp	dword ptr [edx+0Ch]
fld	dword ptr [ecx+24h]
fadd	dword ptr [edx+4]
fstp	dword ptr [edx+10h]
fcom	dword ptr [edx+0Ch]
fnstsw	ax
fld1
test	ah, 44h
jp	short loc_75FE1A
fld	st
jmp	short loc_75FE1F

loc_75FE1A:
fld	dword ptr [edx]
fdiv	dword ptr [edx+0Ch]

loc_75FE1F:
fstp	dword ptr [edx+1Ch]
fld	st(1)
fcomp	dword ptr [edx+10h]
fnstsw	ax
test	ah, 44h
jnp	short loc_75FE36
fstp	st
fld	dword ptr [edx+4]
fdiv	dword ptr [edx+10h]

loc_75FE36:
fstp	dword ptr [edx+20h]
mov	[esp+arg_0], 1
fld	dword ptr [ecx+0Ch]
fmul	dword ptr [edx]
fstp	dword ptr [edx+24h]
fld	dword ptr [edx+4]
fmul	dword ptr [ecx+0Ch]
fstp	dword ptr [edx+28h]
fld	dword ptr [ecx+0Ch]
fmul	dword ptr [edx+0Ch]
fstp	dword ptr [edx+2Ch]
fld	dword ptr [edx+10h]
fmul	dword ptr [ecx+0Ch]
fstp	dword ptr [edx+30h]
fld	dword ptr [edx+10h]
fadd	dword ptr [edx+0Ch]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	dword ptr [edx+14h]
fld	dword ptr [edx+4]
fadd	dword ptr [edx]
fmulp	st(1), st
fstp	dword ptr [edx+8]
fcom	dword ptr [edx]
fnstsw	ax
test	ah, 5
jnp	short loc_75FE92
mov	[esp+arg_0], 0

loc_75FE92:
fcom	dword ptr [edx+4]
mov	al, byte ptr [esp+arg_0]
mov	[edx+34h], al
push	ebx
fnstsw	ax
test	ah, 5
jp	short loc_75FEAB
mov	ebx, 1
jmp	short loc_75FEAD

loc_75FEAB:
xor	ebx, ebx

loc_75FEAD:
mov	[edx+35h], bl
fcom	dword ptr [ecx+20h]
fnstsw	ax
test	ah, 5
jp	short loc_75FEC1
mov	eax, 1
jmp	short loc_75FEC3

loc_75FEC1:
xor	eax, eax

loc_75FEC3:
mov	[edx+36h], al
fcomp	dword ptr [ecx+24h]
fnstsw	ax
test	ah, 5
jp	short loc_75FED7
mov	eax, 1
jmp	short loc_75FED9

loc_75FED7:
xor	eax, eax

loc_75FED9:
cmp	byte ptr [esp+4+arg_0],	0
mov	[edx+37h], al
jnz	short loc_75FEF3
test	bl, bl
jnz	short loc_75FEF3
mov	eax, [ecx+10h]
cmp	eax, [ecx+14h]
jnz	short loc_75FEF3
xor	eax, eax
jmp	short loc_75FEF8

loc_75FEF3:
mov	eax, 1

loc_75FEF8:
fld	dword ptr [edx+10h]
mov	[edx+38h], al
fld	dword ptr [edx+0Ch]
pop	ebx
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_75FF12
mov	eax, 1
jmp	short loc_75FF14

loc_75FF12:
xor	eax, eax

loc_75FF14:
mov	[edx+39h], al
test	al, al
jz	short loc_75FF27
fld	dword ptr [edx+0Ch]
fdiv	dword ptr [edx+10h]
fstp	dword ptr [edx+18h]
retn	4

loc_75FF27:
fld	dword ptr [edx+10h]
fdiv	dword ptr [edx+0Ch]
fstp	dword ptr [edx+18h]
retn	4
sub_75FDD0 endp

align 10h



sub_75FF40 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_10]
fld	dword ptr [esi+10h]
mov	ebx, [esp+24h+arg_8]
fstp	dword ptr [esi]
push	edi
fld	dword ptr [esi+14h]
mov	edi, [esp+28h+arg_4]
fstp	dword ptr [esi+4]
mov	ebp, [esp+28h+arg_C]
fld	dword ptr [esi+40h]
fstp	dword ptr [esi+30h]
fld	dword ptr [esi+44h]
fstp	dword ptr [esi+34h]
fld	dword ptr [esi+18h]
fstp	dword ptr [esi+8]
fld	dword ptr [esi+1Ch]
fstp	dword ptr [esi+0Ch]
fld	dword ptr [esi+48h]
fstp	dword ptr [esi+38h]
fld	dword ptr [esi+4Ch]
fstp	dword ptr [esi+3Ch]
fld	dword ptr [esi+20h]
fstp	dword ptr [esi+10h]
fld	dword ptr [esi+24h]
fstp	dword ptr [esi+14h]
fld	dword ptr [esi+50h]
fstp	dword ptr [esi+40h]
fld	dword ptr [esi+54h]
fstp	dword ptr [esi+44h]
fld	dword ptr [esi+28h]
fstp	dword ptr [esi+18h]
fld	dword ptr [esi+2Ch]
fstp	dword ptr [esi+1Ch]
fld	dword ptr [esi+58h]
fstp	dword ptr [esi+48h]
fld	dword ptr [esi+5Ch]
fstp	dword ptr [esi+4Ch]
fld	dword ptr [ebx+4]
fsub	dword ptr [edi+4]
fdiv	dword ptr [edi+8]
fstp	[esp+28h+arg_8]
fld	dword ptr [edi]
fsub	dword ptr [ebx]
fdiv	dword ptr [edi+8]
fstp	[esp+28h+arg_4]
fld	dword ptr [ebp+0]
fld	[esp+28h+arg_8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+20h]
fld	dword ptr [ebp+0]
fld	[esp+28h+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+24h]
fld	dword ptr [ebp+4]
fmul	st, st(2)
fstp	dword ptr [esi+50h]
fld	dword ptr [ebp+4]
fmul	st, st(1)
fstp	dword ptr [esi+54h]
fld	dword ptr [ebp+0Ch]
fmul	st, st(2)
fstp	dword ptr [esi+28h]
fld	dword ptr [ebp+0Ch]
fmul	st, st(1)
fstp	dword ptr [esi+2Ch]
fld	dword ptr [ebp+10h]
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+58h]
fmul	dword ptr [ebp+10h]
fstp	dword ptr [esi+5Ch]
fld	dword ptr [esi+88h]
fstp	dword ptr [esi+70h]
fld	dword ptr [esi+8Ch]
fstp	dword ptr [esi+74h]
movzx	eax, byte ptr [esi+0D2h]
fld	dword ptr [esi+90h]
mov	cl, [esi+0D3h]
fstp	dword ptr [esi+78h]
mov	dl, [esi+0D4h]
fld	dword ptr [esi+94h]
mov	[esi+0D0h], al
fstp	dword ptr [esi+7Ch]
movzx	eax, byte ptr [esi+0D5h]
fld	dword ptr [esi+98h]
fstp	dword ptr [esi+80h]
fld	dword ptr [esi+9Ch]
mov	[esi+0D1h], cl
fstp	dword ptr [esi+84h]
mov	[esi+0D2h], dl
fld	dword ptr [esi+0A0h]
mov	[esi+0D3h], al
fstp	dword ptr [esi+88h]
mov	byte ptr [esp+28h+arg_10], 1
fld	dword ptr [esi+0A4h]
fstp	dword ptr [esi+8Ch]
fld	dword ptr [esi+0A8h]
fstp	dword ptr [esi+90h]
fld	dword ptr [esi+0ACh]
fstp	dword ptr [esi+94h]
fld	dword ptr [esi+0B0h]
fstp	dword ptr [esi+98h]
fld	dword ptr [esi+0B4h]
fstp	dword ptr [esi+9Ch]
cmp	byte ptr [ebp+39h], 0
fld	dword ptr [ebx+8]
fadd	dword ptr [edi+8]
fmul	ds:dbl_15FCCB0
fstp	[esp+28h+arg_C]
jz	loc_760329
fld	dword ptr [esi+38h]
fadd	dword ptr [esi+48h]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+28h+arg_8]
fld	dword ptr [esi+3Ch]
fadd	dword ptr [esi+4Ch]
fmulp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fmul	st, st
fld	[esp+28h+arg_8]
fmul	st, st
faddp	st(1), st
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
call	__CIsqrt
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
mov	ecx, [esp+28h+arg_0]
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fst	dword ptr [esi+6Ch]
fld	st
fmul	dword ptr [ebp+20h]
fstp	dword ptr [esi+68h]
fmul	dword ptr [ebp+18h]
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fst	dword ptr [esi+64h]
fmul	dword ptr [ebp+1Ch]
fstp	dword ptr [esi+60h]
fld	dword ptr [ecx]
fadd	dword ptr [esi+48h]
fstp	[esp+28h+var_8]
fld	dword ptr [esi+4Ch]
fadd	dword ptr [ecx+4]
fstp	[esp+28h+var_4]
fld	dword ptr [edi]
fadd	dword ptr [esi+48h]
fstp	[esp+28h+var_18]
fld	dword ptr [edi+4]
fadd	dword ptr [esi+4Ch]
fstp	[esp+28h+var_10]
fld	dword ptr [edi]
fadd	dword ptr [esi+58h]
fstp	[esp+28h+arg_4]
fld	dword ptr [edi+4]
fadd	dword ptr [esi+5Ch]
fstp	[esp+28h+arg_8]
fld	dword ptr [ebx]
fadd	dword ptr [esi+58h]
fstp	[esp+28h+var_14]
fld	dword ptr [ebx+4]
fadd	dword ptr [esi+5Ch]
fstp	[esp+28h+var_C]
fld	[esp+28h+var_18]
fld	[esp+28h+var_8]
fld	st
fsubp	st(2), st
fld	[esp+28h+var_C]
fsub	[esp+28h+arg_8]
fld	[esp+28h+var_10]
fld	[esp+28h+var_4]
fld	st
fsubp	st(2), st
fld	[esp+28h+var_14]
fsub	[esp+28h+arg_4]
fld	st(3)
fmul	st, st(6)
fld	st(1)
fmul	st, st(4)
fsubp	st(1), st
fstp	[esp+28h+var_8]
fld	[esp+28h+var_8]
fabs
fstp	[esp+28h+var_4]
fld	[esp+28h+var_4]
fld	[esp+28h+arg_C]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_76024B
fstp	st(5)
fstp	st(2)
fstp	st
fstp	st(2)
fld	ds:dbl_15FD2F8
fmul	st(1), st
fld	[esp+28h+var_18]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+28h+arg_4]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+28h+var_14]
fmul	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0A8h]
fmul	st(1), st
fld	[esp+28h+var_10]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+28h+arg_8]
fmul	st, st(1)
faddp	st(2), st
fmul	[esp+28h+var_C]
faddp	st(1), st
jmp	loc_76055F

loc_76024B:
fld	st(1)
fsub	[esp+28h+arg_8]
fmulp	st(1), st
fld	st(4)
fsub	[esp+28h+arg_4]
fmulp	st(4), st
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fdiv	[esp+28h+var_8]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fld	st
fmulp	st(5), st
fxch	st(4)
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+0A8h]
fxch	st(2)
fmulp	st(1), st
faddp	st(1), st
fstp	dword ptr [esi+0ACh]
fld	dword ptr [esi+0A8h]
fsub	dword ptr [edi]
fstp	[esp+28h+arg_8]
fld	dword ptr [esi+0ACh]
fsub	dword ptr [edi+4]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fmul	st, st
fld	[esp+28h+arg_8]
fmul	st, st
faddp	st(1), st
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
call	__CIsqrt
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
mov	ecx, [esp+28h+arg_0]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
mov	byte ptr [esp+28h+arg_10], 0
fst	dword ptr [esi+0B4h]
fmul	dword ptr [ebp+18h]
fstp	dword ptr [esi+0B0h]
fld	dword ptr [edi]
fld	dword ptr [esi+0A8h]
fsub	st, st(1)
fmul	dword ptr [ebp+18h]
fsubp	st(1), st
fstp	dword ptr [esi+0A0h]
fld	dword ptr [edi+4]
fld	dword ptr [esi+0ACh]
fsub	st, st(1)
fmul	dword ptr [ebp+18h]
mov	byte ptr [esi+0D5h], 0
mov	byte ptr [esi+0D4h], 0
fsubp	st(1), st
fstp	dword ptr [esi+0A4h]
jmp	loc_760565

loc_760329:
fld	dword ptr [esi+18h]
fadd	dword ptr [esi+8]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+28h+arg_8]
fld	dword ptr [esi+0Ch]
fadd	dword ptr [esi+1Ch]
fmulp	st(1), st
fstp	[esp+28h+arg_4]
fld	[esp+28h+arg_4]
fmul	st, st
fld	[esp+28h+arg_8]
fmul	st, st
faddp	st(1), st
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
call	__CIsqrt
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
mov	eax, [esp+28h+arg_0]
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fst	dword ptr [esi+64h]
fmul	dword ptr [ebp+1Ch]
fstp	dword ptr [esi+60h]
fld	dword ptr [esi+64h]
fmul	dword ptr [ebp+18h]
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fst	dword ptr [esi+6Ch]
fmul	dword ptr [ebp+20h]
fstp	dword ptr [esi+68h]
fld	dword ptr [eax]
fsub	dword ptr [esi+18h]
fstp	[esp+28h+var_4]
fld	dword ptr [eax+4]
fsub	dword ptr [esi+1Ch]
fstp	[esp+28h+var_18]
fld	dword ptr [edi]
fsub	dword ptr [esi+18h]
fstp	[esp+28h+var_8]
fld	dword ptr [edi+4]
fsub	dword ptr [esi+1Ch]
fstp	[esp+28h+var_10]
fld	dword ptr [edi]
fsub	dword ptr [esi+28h]
fstp	[esp+28h+arg_4]
fld	dword ptr [edi+4]
fsub	dword ptr [esi+2Ch]
fstp	[esp+28h+arg_8]
fld	dword ptr [ebx]
fsub	dword ptr [esi+28h]
fstp	[esp+28h+var_C]
fld	dword ptr [ebx+4]
fsub	dword ptr [esi+2Ch]
fstp	[esp+28h+var_14]
fld	[esp+28h+var_8]
fld	[esp+28h+var_4]
fld	st
fsubp	st(2), st
fld	[esp+28h+var_14]
fsub	[esp+28h+arg_8]
fld	[esp+28h+var_10]
fld	[esp+28h+var_18]
fld	st
fsubp	st(2), st
fld	[esp+28h+var_C]
fsub	[esp+28h+arg_4]
fld	st(3)
fmul	st, st(6)
fld	st(1)
fmul	st, st(4)
fsubp	st(1), st
fstp	[esp+28h+var_18]
fld	[esp+28h+var_18]
fabs
fstp	[esp+28h+var_4]
fld	[esp+28h+var_4]
fld	[esp+28h+arg_C]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_76048C
fstp	st(5)
mov	ecx, [esp+28h+arg_0]
fstp	st(2)
fstp	st
fstp	st(2)
fld	ds:dbl_15FD2F8
fmul	st(1), st
fld	[esp+28h+var_8]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+28h+arg_4]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+28h+var_C]
fmul	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0A0h]
fmul	st(1), st
fld	[esp+28h+var_10]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+28h+arg_8]
fmul	st, st(1)
faddp	st(2), st
fmul	[esp+28h+var_14]
faddp	st(1), st
fstp	dword ptr [esi+0A4h]
jmp	loc_760565

loc_76048C:
fld	st(1)
fsub	[esp+28h+arg_8]
fmulp	st(1), st
fld	st(4)
fsub	[esp+28h+arg_4]
fmulp	st(4), st
fsubrp	st(3), st
fxch	st(2)
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fdiv	[esp+28h+var_18]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fld	st
fmulp	st(5), st
fxch	st(4)
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [esi+0A0h]
fxch	st(2)
fmulp	st(1), st
faddp	st(1), st
fstp	dword ptr [esi+0A4h]
fld	dword ptr [esi+0A0h]
fsub	dword ptr [edi]
fstp	[esp+28h+arg_8]
fld	dword ptr [esi+0A4h]
fsub	dword ptr [edi+4]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fmul	st, st
fld	[esp+28h+arg_8]
fmul	st, st
faddp	st(1), st
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
call	__CIsqrt
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
mov	ecx, [esp+28h+arg_0]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
mov	byte ptr [esp+28h+arg_10], 0
fst	dword ptr [esi+0B0h]
fmul	dword ptr [ebp+18h]
fstp	dword ptr [esi+0B4h]
fld	dword ptr [edi]
fld	dword ptr [esi+0A0h]
fsub	st, st(1)
fmul	dword ptr [ebp+18h]
fsubp	st(1), st
fstp	dword ptr [esi+0A8h]
fld	dword ptr [edi+4]
fld	dword ptr [esi+0A4h]
fsub	st, st(1)
fmul	dword ptr [ebp+18h]
mov	byte ptr [esi+0D5h], 0
mov	byte ptr [esi+0D4h], 0
fsubp	st(1), st

loc_76055F:
fstp	dword ptr [esi+0ACh]

loc_760565:
mov	dl, [esi+0D7h]
mov	al, [esi+0D8h]
mov	[esi+0D7h], al
mov	[esi+0D6h], dl
fld	dword ptr [edi+4]
fsub	dword ptr [ecx+4]
fld	dword ptr [ebx]
fsub	dword ptr [edi]
fmulp	st(1), st
fld	dword ptr [ebx+4]
fsub	dword ptr [edi+4]
fld	dword ptr [edi]
fsub	dword ptr [ecx]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+28h+arg_8]
fld	[esp+28h+arg_8]
fldz
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jp	short loc_7605B3
mov	eax, 1
jmp	short loc_7605B5

loc_7605B3:
xor	eax, eax

loc_7605B5:
cmp	byte ptr [esp+28h+arg_10], 0
mov	[esp+28h+var_8], eax
mov	[esi+0D8h], al
jz	loc_760850
mov	al, [ebp+39h]
fld	dword ptr [edi]
test	al, al
jz	short loc_7605D8
fadd	dword ptr [esi+48h]
jmp	short loc_7605DB

loc_7605D8:
fsub	dword ptr [esi+18h]

loc_7605DB:
fstp	[esp+28h+arg_8]
fld	dword ptr [edi+4]
test	al, al
jz	short loc_7605EB
fadd	dword ptr [esi+4Ch]
jmp	short loc_7605EE

loc_7605EB:
fsub	dword ptr [esi+1Ch]

loc_7605EE:
fstp	[esp+28h+arg_4]
fld	dword ptr [edi]
fstp	[esp+28h+arg_10]
fld	dword ptr [edi+4]
fstp	[esp+28h+var_4]
fld	[esp+28h+arg_8]
fld	st
fld	[esp+28h+arg_10]
fld	st
fsubp	st(2), st
fld	[esp+28h+var_4]
fld	st
fsub	dword ptr [ecx+4]
fmulp	st(3), st
fld	dword ptr [ecx]
fsubp	st(2), st
fld	[esp+28h+arg_4]
fld	st
fsubrp	st(2), st
fxch	st(2)
fmulp	st(1), st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_760644
mov	edx, 1
jmp	short loc_760646

loc_760644:
xor	edx, edx

loc_760646:
fld	dword ptr [ebx]
fstp	[esp+28h+arg_8]
fld	dword ptr [ebx+4]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fld	st
fsub	dword ptr [edi+4]
fld	[esp+28h+arg_8]
fld	st
fsubp	st(5), st
fxch	st(1)
fmulp	st(4), st
fxch	st(2)
fsubrp	st(1), st
fld	dword ptr [edi]
fsubp	st(2), st
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+28h+arg_10]
fcomp	[esp+28h+arg_10]
fnstsw	ax
test	ah, 41h
jnz	short loc_76068A
mov	eax, 1
jmp	short loc_76068C

loc_76068A:
xor	eax, eax

loc_76068C:
cmp	edx, eax
jnz	short loc_7606E3
fld	dword ptr [edi]
fsub	dword ptr [esi+18h]
fstp	dword ptr [esi+0A0h]
fld	dword ptr [edi+4]
fsub	dword ptr [esi+1Ch]
fstp	dword ptr [esi+0A4h]
fld	dword ptr [ebp+2Ch]
fstp	dword ptr [esi+0B0h]
fld	dword ptr [edi]
fadd	dword ptr [esi+48h]
fstp	dword ptr [esi+0A8h]
fld	dword ptr [edi+4]
fadd	dword ptr [esi+4Ch]
fstp	dword ptr [esi+0ACh]
fld	dword ptr [ebp+30h]
mov	byte ptr [esi+0D5h], 0
fstp	dword ptr [esi+0B4h]
mov	byte ptr [esi+0D4h], 0
jmp	loc_760852

loc_7606E3:
cmp	byte ptr [esp+28h+var_8], 0
fld	dword ptr [ecx]
fadd	dword ptr [ebx]
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fsubr	dword ptr [edi]
fstp	[esp+28h+arg_8]
fld	dword ptr [ebx+4]
fadd	dword ptr [ecx+4]
fmulp	st(1), st
fsubr	dword ptr [edi+4]
fstp	[esp+28h+arg_4]
fld	dword ptr [edi]
jz	loc_7607B3
fadd	dword ptr [esi+48h]
fstp	dword ptr [esi+0A8h]
fld	dword ptr [edi+4]
fadd	dword ptr [esi+4Ch]
fstp	dword ptr [esi+0ACh]
fld	dword ptr [ebp+30h]
mov	byte ptr [esi+0D5h], 1
fstp	dword ptr [esi+0B4h]
fld	[esp+28h+arg_8]
fld	ds:dbl_15FD320
fmul	st(1), st
fld	dword ptr [edi]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0A0h]
fmul	[esp+28h+arg_4]
fadd	dword ptr [edi+4]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fst	dword ptr [esi+0A4h]
fld	dword ptr [esi+0A0h]
fsub	dword ptr [edi]
fstp	[esp+28h+arg_8]
fsub	dword ptr [edi+4]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fld	[esp+28h+arg_8]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
call	__CIsqrt
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
mov	ecx, [esp+28h+arg_0]
fstp	dword ptr [esi+0B0h]
mov	byte ptr [esi+0D4h], 0
jmp	loc_760852

loc_7607B3:
fsub	dword ptr [esi+18h]
fstp	dword ptr [esi+0A0h]
fld	dword ptr [edi+4]
fsub	dword ptr [esi+1Ch]
fstp	dword ptr [esi+0A4h]
fld	dword ptr [ebp+2Ch]
mov	byte ptr [esi+0D4h], 1
fstp	dword ptr [esi+0B0h]
fld	[esp+28h+arg_8]
fld	ds:dbl_15FD320
fmul	st(1), st
fld	dword ptr [edi]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esi+0A8h]
fmul	[esp+28h+arg_4]
fadd	dword ptr [edi+4]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fst	dword ptr [esi+0ACh]
fld	dword ptr [esi+0A8h]
fsub	dword ptr [edi]
fstp	[esp+28h+arg_8]
fsub	dword ptr [edi+4]
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
fld	[esp+28h+arg_8]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
call	__CIsqrt
fstp	[esp+28h+arg_10]
fld	[esp+28h+arg_10]
mov	ecx, [esp+28h+arg_0]
fstp	dword ptr [esi+0B4h]
mov	byte ptr [esi+0D5h], 0
jmp	short loc_760852

loc_760850:
fstp	st

loc_760852:
cmp	byte ptr [esi+0D7h], 0
mov	dl, [esi+0DAh]
mov	[esi+0D9h], dl
jz	short loc_76086F
mov	al, [esi+0D3h]
jmp	short loc_760875

loc_76086F:
mov	al, [esi+0D2h]

loc_760875:
mov	[esi+0DAh], al
test	al, al
jnz	short loc_7608E7
fld	[esp+28h+arg_C]
sub	esp, 24h
fstp	[esp+4Ch+var_2C]
fld	dword ptr [esi+0ACh]
fstp	[esp+4Ch+var_30]
fld	dword ptr [esi+0A8h]
fstp	[esp+4Ch+var_34]
fld	dword ptr [esi+0A4h]
fstp	[esp+4Ch+var_38]
fld	dword ptr [esi+0A0h]
fstp	[esp+4Ch+var_3C]
fld	dword ptr [esi+94h]
fstp	[esp+4Ch+var_40]
fld	dword ptr [esi+90h]
fstp	[esp+4Ch+var_44]
fld	dword ptr [esi+8Ch]
fstp	[esp+4Ch+var_48]
fld	dword ptr [esi+88h]
fstp	[esp+4Ch+var_4C]
call	sub_75FC00
add	esp, 24h
mov	[esi+0DAh], al

loc_7608E7:
fld	dword ptr [esi+88h]
pop	edi
fsub	dword ptr [ecx]
fmul	dword ptr [ebp+1Ch]
fadd	dword ptr [ecx]
fstp	dword ptr [esi+0B8h]
fld	dword ptr [esi+8Ch]
fsub	dword ptr [ecx+4]
fmul	dword ptr [ebp+1Ch]
fadd	dword ptr [ecx+4]
fstp	dword ptr [esi+0BCh]
fld	dword ptr [esi+90h]
fsub	dword ptr [ecx]
fmul	dword ptr [ebp+20h]
fadd	dword ptr [ecx]
fstp	dword ptr [esi+0C0h]
fld	dword ptr [esi+94h]
fsub	dword ptr [ecx+4]
fmul	dword ptr [ebp+20h]
fadd	dword ptr [ecx+4]
fstp	dword ptr [esi+0C4h]
fld	dword ptr [ebp+1Ch]
fmul	dword ptr [esi+98h]
fstp	dword ptr [esi+0C8h]
fld	dword ptr [esi+9Ch]
fmul	dword ptr [ebp+20h]
fstp	dword ptr [esi+0CCh]
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h
sub_75FF40 endp

align 10h



sub_760960 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_7609B1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_760990
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_7609AA

loc_760990:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 89h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_7609AA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_7609B1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 89h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0C00h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_760960 endp

align 10h



; int __stdcall	sub_7609E0(float, float, int)
sub_7609E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
fld	[esp+0Ch+arg_0]
push	ebx
mov	ebx, [esp+10h+arg_8]
fstp	[esp+10h+var_C]
fld	[esp+10h+arg_4]
push	esi
lea	esi, [ecx+40h]
fstp	[esp+14h+var_8]
push	edi
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_760A0F
push	edi
mov	ecx, esi
call	sub_760960

loc_760A0F:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+18h+var_C]
lea	eax, [eax+edx*4]
mov	edx, [esp+18h+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebx
inc	dword ptr [esi]
mov	eax, [esi]
pop	edi
pop	esi
dec	eax
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_7609E0 endp




sub_760A40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
lea	esi, [ecx+50h]
push	edi
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_760A61
push	edi
mov	ecx, esi
call	sub_760960

loc_760A61:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+10h+arg_8]
lea	eax, [eax+edx*4]
mov	[eax], ebx
mov	[eax+4], ebp
pop	edi
mov	[eax+8], ecx
inc	dword ptr [esi]
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_760A40 endp

align 10h



; int __stdcall	sub_760A90(int,	int, float, int, float)
sub_760A90 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 3Ch
push	ebx
push	ebp
mov	ebp, [esp+44h+arg_C]
push	esi
push	edi
mov	edi, ecx
mov	cl, byte ptr [esp+4Ch+arg_10]
test	cl, cl
jz	short loc_760ABF
fld	dword ptr [ebp+4]
fstp	[esp+4Ch+arg_C]
fld	dword ptr [ebp+0]
fstp	[esp+4Ch+var_18]
fld	dword ptr [ebp+10h]
fstp	[esp+4Ch+var_1C]
fld	dword ptr [ebp+0Ch]
jmp	short loc_760AD7

loc_760ABF:
fld	dword ptr [ebp+0]
fstp	[esp+4Ch+arg_C]
fld	dword ptr [ebp+4]
fstp	[esp+4Ch+var_18]
fld	dword ptr [ebp+0Ch]
fstp	[esp+4Ch+var_1C]
fld	dword ptr [ebp+10h]

loc_760AD7:
fstp	[esp+4Ch+var_20]
mov	eax, [esp+4Ch+arg_4]
mov	esi, [esp+4Ch+arg_0]
fld	dword ptr [eax+4]
fsub	dword ptr [esi+4]
fld	[esp+4Ch+arg_8]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+arg_8]
fld	dword ptr [esi]
fsub	dword ptr [eax]
xor	eax, eax
mov	[esp+4Ch+var_3C], eax
mov	[esp+4Ch+var_38], eax
fdivrp	st(1), st
fstp	[esp+4Ch+arg_4]
fld	[esp+4Ch+arg_8]
fld	st
fld	[esp+4Ch+arg_C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+var_10]
fld	[esp+4Ch+arg_4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+var_14]
fld	st(1)
fld	[esp+4Ch+var_18]
mov	[esp+4Ch+var_18], eax
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+var_28]
fmul	st, st(1)
fstp	[esp+4Ch+var_2C]
fld	st(1)
fld	[esp+4Ch+var_1C]
mov	[esp+4Ch+var_1C], eax
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+var_30]
fmul	st, st(1)
fstp	[esp+4Ch+var_34]
fld	[esp+4Ch+var_20]
fld	st
fmulp	st(3), st
fxch	st(2)
fstp	[esp+4Ch+var_20]
fmulp	st(1), st
fstp	[esp+4Ch+var_24]
fld	[esp+4Ch+var_24]
fsub	[esp+4Ch+var_2C]
fld	[esp+4Ch+var_34]
fld	[esp+4Ch+var_14]
fld	st
fsubp	st(2), st
fxch	st(2)
faddp	st(1), st
fld	ds:dbl_15FCC48
fmul	st(1), st
fxch	st(1)
fstp	[esp+4Ch+arg_8]
fld	[esp+4Ch+var_28]
fsub	[esp+4Ch+var_20]
fld	[esp+4Ch+var_10]
fld	st
fsub	[esp+4Ch+var_30]
faddp	st(2), st
fxch	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+4Ch+arg_4]
test	cl, cl
jz	short loc_760BCD
mov	cl, [ebp+37h]
mov	al, [ebp+36h]
mov	byte ptr [esp+4Ch+arg_C], cl
mov	byte ptr [esp+4Ch+arg_0], al
jmp	short loc_760BDB

loc_760BCD:
mov	al, [ebp+36h]
mov	cl, [ebp+37h]
mov	byte ptr [esp+4Ch+arg_C], al
mov	byte ptr [esp+4Ch+arg_0], cl

loc_760BDB:
test	al, al
jnz	short loc_760BE7
test	cl, cl
jz	loc_760D03

loc_760BE7:
fld	dword ptr [esi+4]
push	0FFFFFFFFh	; int
fsubrp	st(2), st
sub	esp, 8
fld	[esp+58h+arg_4]
mov	ecx, edi
faddp	st(2), st
fxch	st(1)
fstp	[esp+58h+var_18]
fld	[esp+58h+var_18]
fstp	[esp+58h+var_54]
fsubr	dword ptr [esi]
fadd	[esp+58h+arg_8]
fstp	[esp+58h+var_18]
fld	[esp+58h+var_18]
fstp	[esp+58h+var_58]
call	sub_7609E0
cmp	byte ptr [ebp+38h], 0
mov	ebx, eax
mov	[esp+4Ch+var_1C], ebx
jz	short loc_760C67
fld	[esp+4Ch+var_2C]
push	0FFFFFFFFh	; int
fadd	dword ptr [esi+4]
sub	esp, 8
mov	ecx, edi
fadd	[esp+58h+arg_4]
fstp	[esp+58h+var_18]
fld	[esp+58h+var_18]
fstp	[esp+58h+var_54]
fld	dword ptr [esi]
fadd	[esp+58h+var_28]
fadd	[esp+58h+arg_8]
fstp	[esp+58h+var_18]
fld	[esp+58h+var_18]
fstp	[esp+58h+var_58]
call	sub_7609E0
mov	[esp+4Ch+var_3C], eax
jmp	short loc_760C6B

loc_760C67:
mov	[esp+4Ch+var_3C], ebx

loc_760C6B:
cmp	byte ptr [esp+4Ch+arg_C], 0
jz	short loc_760CB0
fld	dword ptr [esi+4]
push	0FFFFFFFFh	; int
fsub	[esp+50h+var_34]
sub	esp, 8
mov	ecx, edi
fadd	[esp+58h+arg_4]
fstp	[esp+58h+var_18]
fld	[esp+58h+var_18]
fstp	[esp+58h+var_54]
fld	dword ptr [esi]
fsub	[esp+58h+var_30]
fadd	[esp+58h+arg_8]
fstp	[esp+58h+var_18]
fld	[esp+58h+var_18]
fstp	[esp+58h+var_58]
call	sub_7609E0
mov	[esp+4Ch+var_38], eax
jmp	short loc_760CB4

loc_760CB0:
mov	[esp+4Ch+var_38], ebx

loc_760CB4:
cmp	byte ptr [esp+4Ch+arg_0], 0
jz	short loc_760CF9
fld	[esp+4Ch+var_24]
push	0FFFFFFFFh	; int
fadd	dword ptr [esi+4]
sub	esp, 8
mov	ecx, edi
fadd	[esp+58h+arg_4]
fstp	[esp+58h+arg_4]
fld	[esp+58h+arg_4]
fstp	[esp+58h+var_54]
fld	dword ptr [esi]
fadd	[esp+58h+var_20]
fadd	[esp+58h+arg_8]
fstp	[esp+58h+arg_4]
fld	[esp+58h+arg_4]
fstp	[esp+58h+var_58]
call	sub_7609E0
mov	[esp+4Ch+var_18], eax
jmp	short loc_760D07

loc_760CF9:
mov	eax, [esp+4Ch+var_3C]
mov	[esp+4Ch+var_18], eax
jmp	short loc_760D07

loc_760D03:
fstp	st(1)
fstp	st

loc_760D07:
cmp	byte ptr [esp+4Ch+arg_10], 0
jnz	loc_760DFB
fld	dword ptr [esi+4]
mov	ecx, [edi+10h]
fsub	[esp+4Ch+var_14]
push	ecx		; int
sub	esp, 8
mov	ecx, edi
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_54]
fld	dword ptr [esi]
fsub	[esp+58h+var_10]
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_58]
call	sub_7609E0
mov	[edi+60h], eax
cmp	byte ptr [ebp+36h], 0
jz	short loc_760D7D
fld	dword ptr [esi+4]
push	0FFFFFFFFh	; int
fsub	[esp+50h+var_34]
sub	esp, 8
mov	ecx, edi
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_54]
fld	dword ptr [esi]
fsub	[esp+58h+var_30]
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_58]
call	sub_7609E0

loc_760D7D:
mov	[edi+68h], eax
cmp	byte ptr [ebp+38h], 0
jz	short loc_760DBA
fld	[esp+4Ch+var_2C]
mov	edx, [edi+14h]
fadd	dword ptr [esi+4]
push	edx		; int
sub	esp, 8
mov	ecx, edi
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_54]
fld	dword ptr [esi]
fadd	[esp+58h+var_28]
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_58]
call	sub_7609E0
jmp	short loc_760DBD

loc_760DBA:
mov	eax, [edi+60h]

loc_760DBD:
mov	[edi+64h], eax
cmp	byte ptr [ebp+37h], 0
jz	short loc_760DF6
fld	[esp+4Ch+var_24]
push	0FFFFFFFFh	; int
fadd	dword ptr [esi+4]
sub	esp, 8
mov	ecx, edi
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_54]
fld	dword ptr [esi]
fadd	[esp+58h+var_20]
fstp	[esp+58h+arg_10]
fld	[esp+58h+arg_10]
fstp	[esp+58h+var_58]
call	sub_7609E0

loc_760DF6:
mov	[edi+6Ch], eax
jmp	short loc_760E13

loc_760DFB:
mov	eax, [edi+68h]
mov	ecx, [edi+6Ch]
mov	[edi+68h], ecx
mov	[edi+6Ch], eax
mov	edx, [edi+64h]
mov	eax, [edi+60h]
mov	[edi+60h], edx
mov	[edi+64h], eax

loc_760E13:
cmp	byte ptr [ebp+36h], 0
jnz	short loc_760E23
cmp	byte ptr [ebp+37h], 0
jz	loc_760EAE

loc_760E23:
cmp	byte ptr [ebp+34h], 0
jnz	short loc_760E2F
cmp	byte ptr [ebp+35h], 0
jz	short loc_760EAE

loc_760E2F:
mov	ebp, [edi+50h]
mov	ebx, [edi+60h]
lea	esi, [edi+50h]
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_760E48
push	ebp
mov	ecx, esi
call	sub_760960

loc_760E48:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+4Ch+var_1C]
lea	eax, [eax+edx*4]
mov	edx, [esp+4Ch+var_3C]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebx
inc	dword ptr [esi]
mov	ebp, [esi]
mov	eax, [edi+64h]
mov	ebx, [edi+60h]
shr	ebp, 8
mov	[esp+4Ch+var_4], eax
cmp	ebp, [esi+4]
jb	short loc_760E89
push	ebp
mov	ecx, esi
call	sub_760960

loc_760E89:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+4Ch+var_3C]
lea	eax, [eax+edx*4]
mov	edx, [esp+4Ch+var_4]
mov	[eax], ebx
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]

loc_760EAE:
cmp	byte ptr [esp+4Ch+arg_C], 0
jz	short loc_760F34
mov	ebp, [edi+50h]
mov	eax, [edi+68h]
mov	ebx, [edi+60h]
lea	esi, [edi+50h]
shr	ebp, 8
mov	[esp+4Ch+var_8], eax
cmp	ebp, [esi+4]
jb	short loc_760ED5
push	ebp
mov	ecx, esi
call	sub_760960

loc_760ED5:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+4Ch+var_8]
lea	eax, [eax+edx*4]
mov	edx, [esp+4Ch+var_38]
mov	[eax], ebx
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]
mov	ebp, [esi]
mov	ebx, [edi+60h]
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_760F0F
push	ebp
mov	ecx, esi
call	sub_760960

loc_760F0F:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+4Ch+var_38]
lea	eax, [eax+edx*4]
mov	edx, [esp+4Ch+var_1C]
mov	[eax], ebx
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]

loc_760F34:
cmp	byte ptr [esp+4Ch+arg_0], 0
jz	short loc_760FB7
mov	ebp, [edi+50h]
mov	eax, [edi+6Ch]
mov	ebx, [edi+64h]
lea	esi, [edi+50h]
shr	ebp, 8
mov	[esp+4Ch+var_4], eax
cmp	ebp, [esi+4]
jb	short loc_760F5B
push	ebp
mov	ecx, esi
call	sub_760960

loc_760F5B:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+4Ch+var_4]
mov	[eax+edx*4], ebx
mov	ebx, [esp+4Ch+var_18]
lea	eax, [eax+edx*4]
mov	[eax+4], ebx
mov	[eax+8], ecx
inc	dword ptr [esi]
mov	ebp, [esi]
mov	edi, [edi+64h]
shr	ebp, 8
cmp	ebp, [esi+4]
jb	short loc_760F96
push	ebp
mov	ecx, esi
call	sub_760960

loc_760F96:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+4Ch+var_3C]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	[eax], edi
mov	[eax+4], edx
mov	[eax+8], ebx
inc	dword ptr [esi]

loc_760FB7:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn	14h
sub_760A90 endp

align 10h



; int __stdcall	sub_760FD0(int,	int, float, int, char)
sub_760FD0 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	qword ptr -68h
var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

sub	esp, 94h
cmp	[esp+94h+arg_10], 0
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
jz	short loc_761007
mov	ebp, [esp+0A4h+arg_C]
fld	dword ptr [ebp+4]
fstp	[esp+0A4h+var_88]
fld	dword ptr [ebp+0]
fstp	[esp+0A4h+var_7C]
fld	dword ptr [ebp+10h]
fstp	[esp+0A4h+var_8C]
fld	dword ptr [ebp+0Ch]
jmp	short loc_761027

loc_761007:
mov	eax, [esp+0A4h+arg_C]
fld	dword ptr [eax]
mov	ebp, eax
fstp	[esp+0A4h+var_88]
fld	dword ptr [eax+4]
fstp	[esp+0A4h+var_7C]
fld	dword ptr [eax+0Ch]
fstp	[esp+0A4h+var_8C]
fld	dword ptr [eax+10h]

loc_761027:
fstp	[esp+0A4h+var_94]
mov	eax, [esp+0A4h+arg_4]
mov	esi, [esp+0A4h+arg_0]
fld	dword ptr [eax+4]
fsub	dword ptr [esi+4]
fld	[esp+0A4h+arg_8]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_84]
fld	dword ptr [esi]
fsub	dword ptr [eax]
fdivrp	st(1), st
fstp	[esp+0A4h+var_90]
fld	[esp+0A4h+var_84]
fld	st
fld	[esp+0A4h+var_88]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_74]
fld	[esp+0A4h+var_90]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_78]
fld	st(1)
fld	[esp+0A4h+var_7C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_70]
fmul	st, st(1)
fstp	[esp+0A4h+var_80]
fld	st(1)
fld	[esp+0A4h+var_8C]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_90]
fmul	st, st(1)
fstp	[esp+0A4h+var_84]
fld	[esp+0A4h+var_94]
fld	st
fmulp	st(3), st
fxch	st(2)
fstp	[esp+0A4h+var_7C]
fmulp	st(1), st
fstp	[esp+0A4h+var_6C]
fld	[esp+0A4h+var_84]
fchs
fld	[esp+0A4h+var_90]
fchs
call	sub_79A3DA
fstp	[esp+0A4h+var_94]
fld	[esp+0A4h+var_94]
fstp	[esp+0A4h+var_88]
fld	[esp+0A4h+var_88]
fld	ds:dbl_15FCC90
fadd	st, st(1)
fstp	[esp+0A4h+var_94]
fsubr	[esp+0A4h+var_94]
fstp	[esp+0A4h+var_68]
fld	dword ptr [ebp+14h]
fld	dword ptr [edi+28h]
fmul	ds:dbl_15FD2F8
fadd	st, st(1)
fdivp	st(1), st
fstp	[esp+0A4h+var_94]
fld	[esp+0A4h+var_94]
call	__CIacos
fstp	[esp+0A4h+var_94]
fld	[esp+0A4h+var_94]
fadd	st, st
fstp	[esp+0A4h+var_94]
fld	[esp+0A4h+var_94]
fld	[esp+0A4h+var_68]
fld	st
fdivrp	st(2), st
fxch	st(1)
call	__ftol2_sse
mov	ebx, eax
inc	ebx
cmp	[esp+0A4h+arg_10], 0
mov	[esp+0A4h+var_94], ebx
fidiv	[esp+0A4h+var_94]
fstp	[esp+0A4h+var_94]
fld	[esp+0A4h+var_94]
fadd	[esp+0A4h+var_88]
fstp	[esp+0A4h+var_88]
jz	short loc_761162
mov	eax, [edi+64h]
mov	ecx, [edi+6Ch]
mov	[edi+60h], eax
mov	[edi+68h], ecx
jmp	short loc_7611DC

loc_761162:
fld	dword ptr [esi+4]
mov	edx, [edi+10h]
fsub	[esp+0A4h+var_78]
push	edx		; int
sub	esp, 8
mov	ecx, edi
fstp	[esp+0B0h+var_8C]
fld	[esp+0B0h+var_8C]
fstp	[esp+0B0h+var_AC]
fld	dword ptr [esi]
fsub	[esp+0B0h+var_74]
fstp	[esp+0B0h+var_8C]
fld	[esp+0B0h+var_8C]
fstp	[esp+0B0h+var_B0]
call	sub_7609E0
mov	[edi+64h], eax
mov	[edi+60h], eax
cmp	byte ptr [ebp+36h], 0
jnz	short loc_7611A6
cmp	byte ptr [ebp+37h], 0
jz	short loc_7611D6

loc_7611A6:
fld	dword ptr [esi+4]
push	0FFFFFFFFh	; int
fsub	[esp+0A8h+var_84]
sub	esp, 8
mov	ecx, edi
fstp	[esp+0B0h+var_8C]
fld	[esp+0B0h+var_8C]
fstp	[esp+0B0h+var_AC]
fld	dword ptr [esi]
fsub	[esp+0B0h+var_90]
fstp	[esp+0B0h+var_8C]
fld	[esp+0B0h+var_8C]
fstp	[esp+0B0h+var_B0]
call	sub_7609E0

loc_7611D6:
mov	[edi+6Ch], eax
mov	[edi+68h], eax

loc_7611DC:
fld	[esp+0A4h+var_7C]
fsub	[esp+0A4h+var_90]
fld	ds:dbl_15FCC48
fmul	st(1), st
fld	dword ptr [esi]
faddp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_8C]
fld	[esp+0A4h+var_6C]
fsub	[esp+0A4h+var_84]
fmul	st, st(1)
fadd	dword ptr [esi+4]
fstp	[esp+0A4h+var_6C]
fld	[esp+0A4h+var_70]
fsub	[esp+0A4h+var_74]
fmul	st, st(1)
fadd	dword ptr [esi]
fstp	[esp+0A4h+var_70]
fld	[esp+0A4h+var_80]
fsub	[esp+0A4h+var_78]
fmulp	st(1), st
fadd	dword ptr [esi+4]
fstp	[esp+0A4h+var_74]
test	ebx, ebx
jle	loc_7615DE
mov	[esp+0A4h+var_78], ebx

loc_761234:
fld	[esp+0A4h+var_88]
call	__CIcos
fstp	[esp+0A4h+var_80]
fld	[esp+0A4h+var_80]
fstp	[esp+0A4h+var_84]
fld	[esp+0A4h+var_88]
call	__CIsin
fstp	[esp+0A4h+var_80]
cmp	byte ptr [ebp+38h], 0
fld	[esp+0A4h+var_80]
fstp	[esp+0A4h+var_90]
fld	dword ptr [ebp+14h]
fld	[esp+0A4h+var_84]
fld	st
fmulp	st(2), st
fld	[esp+0A4h+var_8C]
faddp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_84]
fld	dword ptr [ebp+14h]
fld	[esp+0A4h+var_90]
fld	st
fmulp	st(2), st
fld	[esp+0A4h+var_6C]
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esp+0A4h+var_68]
fld	dword ptr [ebp+8]
fmulp	st(2), st
fld	[esp+0A4h+var_70]
faddp	st(2), st
fxch	st(1)
fstp	[esp+0A4h+var_80]
fmul	dword ptr [ebp+8]
fadd	[esp+0A4h+var_74]
fstp	[esp+0A4h+var_7C]
jz	short loc_761327
cmp	[esp+0A4h+arg_10], 0
jz	short loc_7612BD
mov	ebp, [edi+10h]
jmp	short loc_7612C0

loc_7612BD:
mov	ebp, [edi+14h]

loc_7612C0:
fld	[esp+0A4h+var_80]
mov	ebx, [edi+40h]
lea	esi, [edi+40h]
fstp	[esp+0A4h+var_24]
fld	[esp+0A4h+var_7C]
shr	ebx, 8
fstp	[esp+0A4h+var_20]
cmp	ebx, [esi+4]
jb	short loc_7612EC
push	ebx
mov	ecx, esi
call	sub_760960

loc_7612EC:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+0A4h+var_24]
lea	eax, [eax+edx*4]
mov	edx, [esp+0A4h+var_20]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebp
inc	dword ptr [esi]
mov	esi, [esi]
mov	ebp, [esp+0A4h+arg_C]
dec	esi
mov	[esp+0A4h+var_90], esi
jmp	short loc_76132E

loc_761327:
mov	eax, [edi+60h]
mov	[esp+0A4h+var_90], eax

loc_76132E:
cmp	byte ptr [ebp+36h], 0
jnz	short loc_761340
cmp	byte ptr [ebp+37h], 0
jnz	short loc_761340
mov	ebx, [esp+0A4h+var_90]
jmp	short loc_761398

loc_761340:
fld	[esp+0A4h+var_84]
mov	ebx, [edi+40h]
lea	esi, [edi+40h]
fstp	[esp+0A4h+var_48]
fld	dword ptr [esp+0A4h+var_68]
shr	ebx, 8
or	ebp, 0FFFFFFFFh
fstp	[esp+0A4h+var_44]
cmp	ebx, [esi+4]
jb	short loc_761369
push	ebx
mov	ecx, esi
call	sub_760960

loc_761369:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+0A4h+var_48]
lea	eax, [eax+edx*4]
mov	edx, [esp+0A4h+var_44]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebp
inc	dword ptr [esi]
mov	ebx, [esi]
mov	ebp, [esp+0A4h+arg_C]
dec	ebx

loc_761398:
cmp	[esp+0A4h+arg_10], 0
jz	loc_7614B9
cmp	byte ptr [ebp+34h], 0
jnz	short loc_7613B2
cmp	byte ptr [ebp+35h], 0
jz	short loc_761406

loc_7613B2:
mov	ebp, [edi+50h]
mov	eax, [edi+60h]
mov	ecx, [edi+64h]
lea	esi, [edi+50h]
shr	ebp, 8
mov	[esp+0A4h+var_60], eax
mov	[esp+0A4h+var_58], ecx
cmp	ebp, [esi+4]
jb	short loc_7613D6
push	ebp
mov	ecx, esi
call	sub_760960

loc_7613D6:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+0A4h+var_60]
mov	ebp, [esp+0A4h+arg_C]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+0A4h+var_90]
mov	[eax], edx
mov	edx, [esp+0A4h+var_58]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]

loc_761406:
cmp	byte ptr [ebp+36h], 0
jnz	short loc_761416
cmp	byte ptr [ebp+37h], 0
jz	loc_7614AA

loc_761416:
mov	ebp, [edi+50h]
mov	eax, [edi+60h]
mov	ecx, [edi+68h]
lea	esi, [edi+50h]
shr	ebp, 8
mov	[esp+0A4h+var_30], eax
mov	[esp+0A4h+var_2C], ecx
cmp	ebp, [esi+4]
jb	short loc_76143A
push	ebp
mov	ecx, esi
call	sub_760960

loc_76143A:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+0A4h+var_30]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+0A4h+var_2C]
mov	[eax], edx
mov	[eax+4], ecx
mov	[eax+8], ebx
inc	dword ptr [esi]
mov	ebp, [esi]
mov	edx, [edi+60h]
shr	ebp, 8
mov	[esp+0A4h+var_18], edx
cmp	ebp, [esi+4]
jb	short loc_76147B
push	ebp
mov	ecx, esi
call	sub_760960

loc_76147B:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+0A4h+var_18]
mov	ebp, [esp+0A4h+arg_C]
lea	eax, [eax+edx*4]
mov	edx, [esp+0A4h+var_90]
mov	[eax], ecx
mov	[eax+4], ebx
mov	[eax+8], edx
inc	dword ptr [esi]

loc_7614AA:
mov	eax, [esp+0A4h+var_90]
mov	[edi+60h], eax
mov	[edi+68h], ebx
jmp	loc_7615C7

loc_7614B9:
cmp	byte ptr [ebp+34h], 0
jnz	short loc_7614C5
cmp	byte ptr [ebp+35h], 0
jz	short loc_761519

loc_7614C5:
mov	ebp, [edi+50h]
mov	ecx, [edi+60h]
mov	edx, [edi+64h]
lea	esi, [edi+50h]
shr	ebp, 8
mov	[esp+0A4h+var_54], ecx
mov	[esp+0A4h+var_50], edx
cmp	ebp, [esi+4]
jb	short loc_7614E9
push	ebp
mov	ecx, esi
call	sub_760960

loc_7614E9:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+0A4h+var_54]
mov	ebp, [esp+0A4h+arg_C]
lea	eax, [eax+edx*4]
mov	edx, [esp+0A4h+var_50]
mov	[eax], ecx
mov	ecx, [esp+0A4h+var_90]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]

loc_761519:
cmp	byte ptr [ebp+36h], 0
jnz	short loc_761529
cmp	byte ptr [ebp+37h], 0
jz	loc_7615BD

loc_761529:
mov	ebp, [edi+50h]
mov	edx, [edi+64h]
mov	eax, [edi+6Ch]
lea	esi, [edi+50h]
shr	ebp, 8
mov	[esp+0A4h+var_3C], edx
mov	[esp+0A4h+var_38], eax
cmp	ebp, [esi+4]
jb	short loc_76154D
push	ebp
mov	ecx, esi
call	sub_760960

loc_76154D:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+0A4h+var_3C]
lea	eax, [eax+edx*4]
mov	edx, [esp+0A4h+var_38]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebx
inc	dword ptr [esi]
mov	ebp, [esi]
mov	eax, [edi+64h]
shr	ebp, 8
mov	[esp+0A4h+var_C], eax
cmp	ebp, [esi+4]
jb	short loc_76158E
push	ebp
mov	ecx, esi
call	sub_760960

loc_76158E:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebp*4]
mov	ecx, [esp+0A4h+var_C]
mov	ebp, [esp+0A4h+arg_C]
lea	eax, [eax+edx*4]
mov	edx, [esp+0A4h+var_90]
mov	[eax], ecx
mov	[eax+4], ebx
mov	[eax+8], edx
inc	dword ptr [esi]

loc_7615BD:
mov	eax, [esp+0A4h+var_90]
mov	[edi+64h], eax
mov	[edi+6Ch], ebx

loc_7615C7:
sub	[esp+0A4h+var_78], 1
fld	[esp+0A4h+var_94]
fadd	[esp+0A4h+var_88]
fstp	[esp+0A4h+var_88]
jnz	loc_761234

loc_7615DE:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 94h
retn	14h
sub_760FD0 endp

align 10h



sub_7615F0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
var_30=	qword ptr -30h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 44h
push	ebx
mov	ebx, [esp+48h+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [esp+54h+arg_8]
mov	al, [edi+0DAh]
or	al, [edi+0D9h]
cmp	byte ptr [edi+0D7h], 0
mov	esi, ecx
mov	byte ptr [esp+54h+arg_8], al
jz	loc_761B29
test	al, al
jz	short loc_761629
fld	dword ptr [edi+38h]
fadd	dword ptr [ebx]
jmp	short loc_76162F

loc_761629:
fld	dword ptr [edi+90h]

loc_76162F:
fstp	dword ptr [esp+54h+var_30]
test	al, al
jz	short loc_76163F
fld	dword ptr [edi+3Ch]
fadd	dword ptr [ebx+4]
jmp	short loc_761645

loc_76163F:
fld	dword ptr [edi+94h]

loc_761645:
mov	eax, [esp+54h+arg_4]
fstp	dword ptr [esp+54h+var_38]
fld	dword ptr [esp+54h+var_30]
fsub	dword ptr [ebx]
fmul	dword ptr [eax+20h]
fadd	dword ptr [ebx]
fstp	[esp+54h+var_28]
fld	dword ptr [esp+54h+var_38]
fsub	dword ptr [ebx+4]
fmul	dword ptr [eax+20h]
mov	eax, [esi+10h]
push	eax		; int
sub	esp, 8
fadd	dword ptr [ebx+4]
fstp	[esp+60h+var_3C]
fld	dword ptr [ebx+4]
fsub	dword ptr [edi+4]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_5C]
fld	dword ptr [ebx]
fsub	dword ptr [edi]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	ecx, [esp+54h+arg_4]
cmp	byte ptr [ecx+36h], 0
mov	ebp, eax
jz	short loc_7616DA
fld	dword ptr [ebx+4]
push	0FFFFFFFFh	; int
fsub	dword ptr [edi+0Ch]
sub	esp, 8
mov	ecx, esi
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_5C]
fld	dword ptr [ebx]
fsub	dword ptr [edi+8]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esp+54h+var_44], eax
jmp	short loc_7616DE

loc_7616DA:
mov	[esp+54h+var_44], ebp

loc_7616DE:
mov	edx, [esp+54h+arg_4]
cmp	byte ptr [edx+38h], 0
jz	short loc_76170B
mov	eax, [esi+14h]
fld	[esp+54h+var_3C]
push	eax		; int
sub	esp, 8
fstp	[esp+60h+var_5C]
mov	ecx, esi
fld	[esp+60h+var_28]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esp+54h+var_3C], eax
jmp	short loc_76170F

loc_76170B:
mov	[esp+54h+var_3C], ebp

loc_76170F:
mov	ecx, [esp+54h+arg_4]
cmp	byte ptr [ecx+37h], 0
jz	short loc_76173A
fld	dword ptr [esp+54h+var_38]
push	0FFFFFFFFh	; int
sub	esp, 8
fstp	[esp+60h+var_5C]
mov	ecx, esi
fld	dword ptr [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esp+54h+var_40], eax
jmp	short loc_761742

loc_76173A:
mov	edx, [esp+54h+var_3C]
mov	[esp+54h+var_40], edx

loc_761742:
mov	eax, [esp+54h+arg_4]
cmp	byte ptr [eax+34h], 0
jnz	short loc_761752
cmp	byte ptr [eax+35h], 0
jz	short loc_761777

loc_761752:
mov	eax, [esp+54h+var_3C]
mov	ecx, [esi+60h]
push	ebp
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40
mov	edx, [esp+54h+var_3C]
mov	eax, [esi+64h]
mov	ecx, [esi+60h]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40

loc_761777:
mov	edx, [esp+54h+arg_4]
cmp	byte ptr [edx+36h], 0
jz	short loc_7617A2
mov	eax, [esi+60h]
mov	ecx, [esi+68h]
push	ebp
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40
mov	edx, [esp+54h+var_44]
mov	eax, [esi+68h]
push	edx
push	ebp
push	eax
mov	ecx, esi
call	sub_760A40

loc_7617A2:
mov	ecx, [esp+54h+arg_4]
cmp	byte ptr [ecx+37h], 0
jz	short loc_7617D5
mov	edx, [esp+54h+var_3C]
mov	eax, [esp+54h+var_40]
mov	ecx, [esi+64h]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40
mov	edx, [esp+54h+var_40]
mov	eax, [esi+6Ch]
mov	ecx, [esi+64h]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40

loc_7617D5:
cmp	byte ptr [esp+54h+arg_8], 0
mov	edx, [esp+54h+var_44]
mov	eax, [esp+54h+var_3C]
mov	ecx, [esp+54h+var_40]
mov	[esi+60h], ebp
mov	[esi+68h], edx
mov	[esi+64h], eax
mov	[esi+6Ch], ecx
jz	short loc_761868
fld	dword ptr [edi+44h]
mov	edx, [esi+14h]
fadd	dword ptr [ebx+4]
push	edx		; int
sub	esp, 8
mov	ecx, esi
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi+40h]
fadd	dword ptr [ebx]
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esi+64h], eax
mov	eax, [esp+54h+arg_4]
cmp	byte ptr [eax+37h], 0
jz	short loc_761861
fld	dword ptr [edi+4Ch]
push	0FFFFFFFFh	; int
fadd	dword ptr [ebx+4]
sub	esp, 8
mov	ecx, esi
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi+48h]
fadd	dword ptr [ebx]
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_60]
call	sub_7609E0
jmp	short loc_761865

loc_761861:
mov	eax, [esp+54h+var_3C]

loc_761865:
mov	[esi+6Ch], eax

loc_761868:
fld	dword ptr [esi+28h]
mov	ecx, [esp+54h+arg_4]
fld	ds:dbl_15FD2F8
fmul	st(1), st
fxch	st(1)
fst	[esp+54h+var_30]
fld	dword ptr [ecx+0Ch]
fsub	dword ptr [edi+64h]
fxch	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+54h+arg_8]
fld	[esp+54h+arg_8]
fcompp
fnstsw	ax
test	ah, 5
jp	loc_762021
fld	dword ptr [edi+0Ch]
fchs
fld	dword ptr [edi+8]
fchs
call	sub_79A3DA
fstp	[esp+54h+arg_8]
fld	[esp+54h+arg_8]
fstp	[esp+54h+arg_8]
fld	dword ptr [edi+1Ch]
fchs
fld	dword ptr [edi+18h]
fchs
call	sub_79A3DA
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
fstp	[esp+54h+var_3C]
fld	[esp+54h+arg_8]
fld	[esp+54h+var_3C]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7618F3
fsub	ds:dbl_15FCC20
fstp	[esp+54h+var_3C]
fld	[esp+54h+var_3C]

loc_7618F3:
mov	edi, [esp+54h+arg_4]
fsubp	st(1), st
fstp	[esp+54h+var_38]
fld	dword ptr [edi+0Ch]
fld	[esp+54h+var_30]
fadd	st, st(1)
fdivp	st(1), st
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
call	__CIacos
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
fadd	st, st
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
fld	[esp+54h+var_38]
fld	st
fdivrp	st(2), st
fxch	st(1)
call	__ftol2_sse
inc	eax
mov	[esp+54h+var_28], eax
fidiv	[esp+54h+var_28]
fstp	[esp+54h+var_3C]
fld	[esp+54h+arg_8]
fsub	[esp+54h+var_3C]
fstp	[esp+54h+arg_8]
test	eax, eax
jle	loc_762021
mov	[esp+54h+var_28], eax
jmp	short loc_761960
align 10h

loc_761960:
fld	[esp+54h+arg_8]
call	__CIcos
fstp	dword ptr [esp+54h+var_30]
fld	dword ptr [esp+54h+var_30]
fstp	dword ptr [esp+54h+var_38]
fld	[esp+54h+arg_8]
call	__CIsin
fstp	dword ptr [esp+54h+var_30]
cmp	byte ptr [edi+38h], 0
fld	dword ptr [esp+54h+var_30]
fstp	dword ptr [esp+54h+var_30]
jz	short loc_7619C8
fld	dword ptr [edi]
mov	edx, [esi+10h]
fmul	dword ptr [esp+54h+var_30]
push	edx		; int
sub	esp, 8
mov	ecx, esi
fadd	dword ptr [ebx+4]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi]
fmul	dword ptr [esp+60h+var_38]
fadd	dword ptr [ebx]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	ebp, eax

loc_7619C8:
cmp	byte ptr [edi+36h], 0
jz	short loc_761A0A
fld	dword ptr [edi+0Ch]
push	0FFFFFFFFh	; int
fmul	dword ptr [esp+58h+var_30]
sub	esp, 8
mov	ecx, esi
fadd	dword ptr [ebx+4]
fstp	dword ptr [esp+60h+var_30]
fld	dword ptr [esp+60h+var_30]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi+0Ch]
fmul	dword ptr [esp+60h+var_38]
fadd	dword ptr [ebx]
fstp	dword ptr [esp+60h+var_30]
fld	dword ptr [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esp+54h+var_44], eax
jmp	short loc_761A0E

loc_761A0A:
mov	[esp+54h+var_44], ebp

loc_761A0E:
cmp	byte ptr [edi+34h], 0
jz	short loc_761A65
mov	ebx, [esi+50h]
mov	eax, [esi+64h]
mov	ecx, [esi+60h]
lea	edi, [esi+50h]
shr	ebx, 8
mov	[esp+54h+var_24], eax
mov	[esp+54h+var_1C], ecx
cmp	ebx, [edi+4]
jb	short loc_761A38
push	ebx
mov	ecx, edi
call	sub_760960

loc_761A38:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+54h+var_24]
mov	ebx, [esp+54h+arg_0]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+54h+var_1C]
mov	[eax], edx
mov	[eax+4], ebp
mov	[eax+8], ecx
inc	dword ptr [edi]
mov	edi, [esp+54h+arg_4]

loc_761A65:
cmp	byte ptr [edi+36h], 0
jz	loc_761AFE
mov	ebx, [esi+50h]
mov	edx, [esi+60h]
mov	eax, [esi+68h]
lea	edi, [esi+50h]
shr	ebx, 8
mov	[esp+54h+var_18], edx
mov	[esp+54h+var_10], eax
cmp	ebx, [edi+4]
jb	short loc_761A93
push	ebx
mov	ecx, edi
call	sub_760960

loc_761A93:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+54h+var_18]
lea	eax, [eax+edx*4]
mov	edx, [esp+54h+var_10]
mov	[eax], ecx
mov	[eax+4], ebp
mov	[eax+8], edx
inc	dword ptr [edi]
mov	ebx, [edi]
mov	eax, [esi+68h]
shr	ebx, 8
mov	[esp+54h+var_C], eax
cmp	ebx, [edi+4]
jb	short loc_761AD1
push	ebx
mov	ecx, edi
call	sub_760960

loc_761AD1:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+54h+var_C]
mov	ebx, [esp+54h+arg_0]
lea	eax, [eax+edx*4]
mov	edx, [esp+54h+var_44]
mov	[eax], ecx
mov	[eax+4], ebp
mov	[eax+8], edx
inc	dword ptr [edi]
mov	edi, [esp+54h+arg_4]

loc_761AFE:
sub	[esp+54h+var_28], 1
fld	[esp+54h+arg_8]
fsub	[esp+54h+var_3C]
mov	eax, [esp+54h+var_44]
mov	[esi+60h], ebp
mov	[esi+68h], eax
fstp	[esp+54h+arg_8]
jnz	loc_761960
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 44h
retn	0Ch

loc_761B29:
test	al, al
jz	short loc_761B34
fld	dword ptr [ebx]
fsub	dword ptr [edi+8]
jmp	short loc_761B3A

loc_761B34:
fld	dword ptr [edi+88h]

loc_761B3A:
fstp	dword ptr [esp+54h+var_30]
test	al, al
jz	short loc_761B4A
fld	dword ptr [ebx+4]
fsub	dword ptr [edi+0Ch]
jmp	short loc_761B50

loc_761B4A:
fld	dword ptr [edi+8Ch]

loc_761B50:
mov	eax, [esp+54h+arg_4]
fstp	dword ptr [esp+54h+var_38]
fld	dword ptr [esp+54h+var_30]
mov	ecx, [esi+14h]
fsub	dword ptr [ebx]
push	ecx		; int
sub	esp, 8
mov	ecx, esi
fmul	dword ptr [eax+1Ch]
fadd	dword ptr [ebx]
fstp	[esp+60h+var_28]
fld	dword ptr [esp+60h+var_38]
fsub	dword ptr [ebx+4]
fmul	dword ptr [eax+1Ch]
fadd	dword ptr [ebx+4]
fstp	[esp+60h+var_3C]
fld	dword ptr [edi+34h]
fadd	dword ptr [ebx+4]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi+30h]
fadd	dword ptr [ebx]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	edx, [esp+54h+arg_4]
cmp	byte ptr [edx+37h], 0
mov	ebp, eax
jz	short loc_761BE8
fld	dword ptr [edi+3Ch]
push	0FFFFFFFFh	; int
fadd	dword ptr [ebx+4]
sub	esp, 8
mov	ecx, esi
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi+38h]
fadd	dword ptr [ebx]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esp+54h+var_40], eax
jmp	short loc_761BEC

loc_761BE8:
mov	[esp+54h+var_40], ebp

loc_761BEC:
mov	eax, [esp+54h+arg_4]
cmp	byte ptr [eax+38h], 0
jz	short loc_761C19
mov	ecx, [esi+10h]
fld	[esp+54h+var_3C]
push	ecx		; int
sub	esp, 8
fstp	[esp+60h+var_5C]
mov	ecx, esi
fld	[esp+60h+var_28]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esp+54h+var_3C], eax
jmp	short loc_761C1D

loc_761C19:
mov	[esp+54h+var_3C], ebp

loc_761C1D:
mov	edx, [esp+54h+arg_4]
cmp	byte ptr [edx+36h], 0
jz	short loc_761C44
fld	dword ptr [esp+54h+var_38]
push	0FFFFFFFFh	; int
sub	esp, 8
fstp	[esp+60h+var_5C]
mov	ecx, esi
fld	dword ptr [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_7609E0
jmp	short loc_761C48

loc_761C44:
mov	eax, [esp+54h+var_3C]

loc_761C48:
mov	[esp+54h+var_44], eax
mov	eax, [esp+54h+arg_4]
cmp	byte ptr [eax+34h], 0
jnz	short loc_761C5C
cmp	byte ptr [eax+35h], 0
jz	short loc_761C81

loc_761C5C:
mov	ecx, [esp+54h+var_3C]
mov	edx, [esi+64h]
push	ecx
push	ebp
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esi+60h]
mov	ecx, [esp+54h+var_3C]
mov	edx, [esi+64h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_761C81:
mov	eax, [esp+54h+arg_4]
cmp	byte ptr [eax+37h], 0
jz	short loc_761CAC
mov	ecx, [esi+64h]
mov	edx, [esi+6Ch]
push	ecx
push	ebp
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esp+54h+var_40]
mov	ecx, [esi+6Ch]
push	ebp
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40

loc_761CAC:
mov	edx, [esp+54h+arg_4]
cmp	byte ptr [edx+36h], 0
jz	short loc_761CDF
mov	eax, [esp+54h+var_44]
mov	ecx, [esp+54h+var_3C]
mov	edx, [esi+60h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esi+68h]
mov	ecx, [esp+54h+var_44]
mov	edx, [esi+60h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_761CDF:
cmp	byte ptr [esp+54h+arg_8], 0
mov	eax, [esp+54h+var_3C]
mov	ecx, [esp+54h+var_44]
mov	edx, [esp+54h+var_40]
mov	[esi+60h], eax
mov	[esi+68h], ecx
mov	[esi+64h], ebp
mov	[esi+6Ch], edx
jz	short loc_761D72
fld	dword ptr [ebx+4]
mov	eax, [esi+10h]
fsub	dword ptr [edi+14h]
push	eax		; int
sub	esp, 8
mov	ecx, esi
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_5C]
fld	dword ptr [ebx]
fsub	dword ptr [edi+10h]
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	ecx, [esp+54h+arg_4]
mov	[esi+60h], eax
cmp	byte ptr [ecx+36h], 0
jz	short loc_761D6B
fld	dword ptr [ebx+4]
push	0FFFFFFFFh	; int
fsub	dword ptr [edi+1Ch]
sub	esp, 8
mov	ecx, esi
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_5C]
fld	dword ptr [ebx]
fsub	dword ptr [edi+18h]
fstp	[esp+60h+arg_8]
fld	[esp+60h+arg_8]
fstp	[esp+60h+var_60]
call	sub_7609E0
jmp	short loc_761D6F

loc_761D6B:
mov	eax, [esp+54h+var_3C]

loc_761D6F:
mov	[esi+68h], eax

loc_761D72:
fld	dword ptr [esi+28h]
mov	edx, [esp+54h+arg_4]
fld	ds:dbl_15FD2F8
fmul	st(1), st
fxch	st(1)
fst	[esp+54h+var_30]
fld	dword ptr [edx+10h]
fsub	dword ptr [edi+6Ch]
fxch	st(1)
fmulp	st(2), st
fxch	st(1)
fstp	[esp+54h+arg_8]
fld	[esp+54h+arg_8]
fcompp
fnstsw	ax
test	ah, 5
jp	loc_762021
fld	dword ptr [edi+3Ch]
fld	dword ptr [edi+38h]
call	sub_79A3DA
fstp	[esp+54h+arg_8]
fld	[esp+54h+arg_8]
fstp	[esp+54h+arg_8]
fld	dword ptr [edi+4Ch]
fld	dword ptr [edi+48h]
call	sub_79A3DA
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
fstp	[esp+54h+var_3C]
fld	[esp+54h+arg_8]
fld	[esp+54h+var_3C]
fcom	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_761DF5
fadd	ds:dbl_15FCC20
fstp	[esp+54h+var_3C]
fld	[esp+54h+var_3C]

loc_761DF5:
mov	edi, [esp+54h+arg_4]
fsubrp	st(1), st
fstp	[esp+54h+var_38]
fld	dword ptr [edi+10h]
fld	[esp+54h+var_30]
fadd	st, st(1)
fdivp	st(1), st
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
call	__CIacos
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
fadd	st, st
fstp	[esp+54h+var_28]
fld	[esp+54h+var_28]
fld	[esp+54h+var_38]
fld	st
fdivrp	st(2), st
fxch	st(1)
call	__ftol2_sse
inc	eax
mov	[esp+54h+var_28], eax
fidiv	[esp+54h+var_28]
fstp	[esp+54h+var_3C]
fld	[esp+54h+var_3C]
fadd	[esp+54h+arg_8]
fstp	[esp+54h+arg_8]
test	eax, eax
jle	loc_762021
mov	[esp+54h+var_28], eax
lea	ecx, [ecx+0]

loc_761E60:
fld	[esp+54h+arg_8]
call	__CIcos
fstp	dword ptr [esp+54h+var_30]
fld	dword ptr [esp+54h+var_30]
fstp	dword ptr [esp+54h+var_38]
fld	[esp+54h+arg_8]
call	__CIsin
fstp	dword ptr [esp+54h+var_30]
cmp	byte ptr [edi+38h], 0
fld	dword ptr [esp+54h+var_30]
fstp	dword ptr [esp+54h+var_30]
jz	short loc_761ECA
fld	dword ptr [edi+4]
mov	eax, [esi+14h]
fmul	dword ptr [esp+54h+var_30]
push	eax		; int
sub	esp, 8
mov	ecx, esi
fadd	dword ptr [ebx+4]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi+4]
fmul	dword ptr [esp+60h+var_38]
fadd	dword ptr [ebx]
fstp	[esp+60h+var_40]
fld	[esp+60h+var_40]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	ebp, eax

loc_761ECA:
cmp	byte ptr [edi+37h], 0
jz	short loc_761F0C
fld	dword ptr [edi+10h]
push	0FFFFFFFFh	; int
fmul	dword ptr [esp+58h+var_30]
sub	esp, 8
mov	ecx, esi
fadd	dword ptr [ebx+4]
fstp	dword ptr [esp+60h+var_30]
fld	dword ptr [esp+60h+var_30]
fstp	[esp+60h+var_5C]
fld	dword ptr [edi+10h]
fmul	dword ptr [esp+60h+var_38]
fadd	dword ptr [ebx]
fstp	dword ptr [esp+60h+var_30]
fld	dword ptr [esp+60h+var_30]
fstp	[esp+60h+var_60]
call	sub_7609E0
mov	[esp+54h+var_40], eax
jmp	short loc_761F10

loc_761F0C:
mov	[esp+54h+var_40], ebp

loc_761F10:
cmp	byte ptr [edi+35h], 0
jz	short loc_761F67
mov	ebx, [esi+50h]
mov	ecx, [esi+60h]
mov	edx, [esi+64h]
lea	edi, [esi+50h]
shr	ebx, 8
mov	[esp+54h+var_18], ecx
mov	[esp+54h+var_14], edx
cmp	ebx, [edi+4]
jb	short loc_761F3A
push	ebx
mov	ecx, edi
call	sub_760960

loc_761F3A:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+54h+var_18]
mov	ebx, [esp+54h+arg_0]
lea	eax, [eax+edx*4]
mov	edx, [esp+54h+var_14]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebp
inc	dword ptr [edi]
mov	edi, [esp+54h+arg_4]

loc_761F67:
cmp	byte ptr [edi+37h], 0
jz	loc_762000
mov	ebx, [esi+50h]
mov	eax, [esi+64h]
mov	ecx, [esi+6Ch]
lea	edi, [esi+50h]
shr	ebx, 8
mov	[esp+54h+var_24], eax
mov	[esp+54h+var_20], ecx
cmp	ebx, [edi+4]
jb	short loc_761F95
push	ebx
mov	ecx, edi
call	sub_760960

loc_761F95:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+54h+var_24]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+54h+var_20]
mov	[eax], edx
mov	[eax+4], ecx
mov	[eax+8], ebp
inc	dword ptr [edi]
mov	ebx, [edi]
mov	edx, [esi+6Ch]
shr	ebx, 8
mov	[esp+54h+var_C], edx
cmp	ebx, [edi+4]
jb	short loc_761FD3
push	ebx
mov	ecx, edi
call	sub_760960

loc_761FD3:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+54h+var_C]
mov	ebx, [esp+54h+arg_0]
lea	eax, [eax+edx*4]
mov	edx, [esp+54h+var_40]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebp
inc	dword ptr [edi]
mov	edi, [esp+54h+arg_4]

loc_762000:
sub	[esp+54h+var_28], 1
fld	[esp+54h+var_3C]
fadd	[esp+54h+arg_8]
mov	eax, [esp+54h+var_40]
mov	[esi+64h], ebp
mov	[esi+6Ch], eax
fstp	[esp+54h+arg_8]
jnz	loc_761E60

loc_762021:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 44h
retn	0Ch
sub_7615F0 endp

align 10h



sub_762030 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 20h
fldz
push	ebx
push	ebp
fst	[esp+28h+var_18]
mov	ebp, [esp+28h+arg_0]
push	esi
push	edi
mov	edi, [esp+30h+arg_8]
mov	al, [edi+0DAh]
or	al, [edi+0D9h]
cmp	byte ptr [edi+0D7h], 0
mov	esi, ecx
mov	byte ptr [esp+30h+arg_8], al
jz	loc_7625EF
test	al, al
jz	short loc_762070
fld	dword ptr [edi+38h]
fadd	dword ptr [ebp+0]
jmp	short loc_762076

loc_762070:
fld	dword ptr [edi+90h]

loc_762076:
fstp	[esp+30h+var_C]
test	al, al
jz	short loc_762086
fld	dword ptr [edi+3Ch]
fadd	dword ptr [ebp+4]
jmp	short loc_76208C

loc_762086:
fld	dword ptr [edi+94h]

loc_76208C:
cmp	[esp+30h+arg_C], 0
fstp	[esp+30h+var_10]
fld	[esp+30h+var_C]
mov	ebx, [esp+30h+arg_4]
fsub	dword ptr [ebp+0]
fmul	dword ptr [ebx+20h]
fadd	dword ptr [ebp+0]
fstp	[esp+30h+var_4]
fld	[esp+30h+var_10]
fsub	dword ptr [ebp+4]
fmul	dword ptr [ebx+20h]
fadd	dword ptr [ebp+4]
fstp	[esp+30h+var_8]
jnz	loc_7621F0
fld	dword ptr [edi+0C8h]
fsub	dword ptr [edi+60h]
fstp	[esp+30h+arg_0]
fld	st
fld	[esp+30h+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld1
test	ah, 44h
jp	short loc_7620ED
fstp	st(1)
fst	[esp+30h+arg_0]
fld	[esp+30h+arg_0]
fxch	st(1)

loc_7620ED:
fld	dword ptr [ebx+2Ch]
fsub	dword ptr [edi+60h]
fsub	dword ptr [ebx+0Ch]
fadd	dword ptr [ebx]
fstp	[esp+30h+var_18]
fld	[esp+30h+var_18]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_762111
fxch	st(1)
fst	[esp+30h+var_18]
fxch	st(1)

loc_762111:
fld	dword ptr [ebx+24h]
fsub	dword ptr [edi+60h]
fstp	[esp+30h+arg_0]
fld	[esp+30h+arg_0]
fadd	[esp+30h+var_18]
fld	ds:dbl_15FCD70
fmul	st(3), st
fxch	st(1)
fdivrp	st(3), st
fxch	st(2)
fstp	[esp+30h+var_18]
fld	dword ptr [edi+98h]
fsub	dword ptr [edi+64h]
fstp	[esp+30h+arg_0]
fxch	st(2)
fcomp	[esp+30h+arg_0]
fnstsw	ax
test	ah, 44h
jp	short loc_762157
fxch	st(1)
fstp	[esp+30h+arg_0]
jmp	short loc_762159

loc_762157:
fstp	st(1)

loc_762159:
fld	dword ptr [ebx+24h]
mov	eax, [esi+10h]
fsub	dword ptr [edi+64h]
push	eax		; int
sub	esp, 8
fadd	dword ptr [ebx+0Ch]
fsub	dword ptr [ebx]
fstp	[esp+3Ch+arg_4]
fld	[esp+3Ch+arg_4]
fld	dword ptr [ebx+2Ch]
fsub	dword ptr [edi+64h]
fstp	[esp+3Ch+arg_4]
fadd	[esp+3Ch+arg_4]
fld	[esp+3Ch+arg_0]
fmulp	st(2), st
fdivrp	st(1), st
fstp	[esp+3Ch+var_14]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi]
fstp	[esp+3Ch+var_1C]
fld	dword ptr [ebp+4]
fsub	dword ptr [edi+4]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+0BCh]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+3Ch+var_18]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+0B8h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+arg_4], eax
jmp	short loc_762259

loc_7621F0:
mov	ecx, [esi+10h]
fstp	st
fld	dword ptr [ebp+4]
push	ecx		; int
fsub	dword ptr [edi+4]
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi]
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
fld	dword ptr [edi+98h]
mov	[esp+30h+arg_4], eax
fsub	dword ptr [edi+64h]
fstp	[esp+30h+arg_0]
fldz
fcomp	[esp+30h+arg_0]
fnstsw	ax
test	ah, 44h
jp	short loc_762246
fld1
fstp	[esp+30h+arg_0]

loc_762246:
fld	dword ptr [edi+60h]
fadd	dword ptr [ebx+0Ch]
fsub	dword ptr [ebx]
fsub	dword ptr [edi+64h]
fdiv	[esp+30h+arg_0]
fstp	[esp+30h+var_14]

loc_762259:
cmp	byte ptr [ebx+36h], 0
fld	[esp+30h+var_14]
jz	short loc_7622C8
fld	dword ptr [ebp+0]
push	0FFFFFFFFh	; int
fsub	dword ptr [edi+8]
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+var_1C]
fld	dword ptr [ebp+4]
fsub	dword ptr [edi+0Ch]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+8Ch]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+88h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+arg_0], eax
jmp	short loc_7622D2

loc_7622C8:
mov	edx, [esp+30h+arg_4]
fstp	st
mov	[esp+30h+arg_0], edx

loc_7622D2:
cmp	byte ptr [ebx+38h], 0
jz	short loc_7622FB
mov	eax, [esi+14h]
fld	[esp+30h+var_8]
push	eax		; int
sub	esp, 8
fstp	[esp+3Ch+var_38]
mov	ecx, esi
fld	[esp+3Ch+var_4]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+var_20], eax
jmp	short loc_762303

loc_7622FB:
mov	ecx, [esp+30h+arg_4]
mov	[esp+30h+var_20], ecx

loc_762303:
cmp	byte ptr [ebx+37h], 0
jz	short loc_76232A
fld	[esp+30h+var_10]
push	0FFFFFFFFh	; int
sub	esp, 8
fstp	[esp+3Ch+var_38]
mov	ecx, esi
fld	[esp+3Ch+var_C]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+var_1C], eax
jmp	short loc_762332

loc_76232A:
mov	edx, [esp+30h+var_20]
mov	[esp+30h+var_1C], edx

loc_762332:
cmp	byte ptr [ebx+34h], 0
jnz	short loc_76233E
cmp	byte ptr [ebx+35h], 0
jz	short loc_762367

loc_76233E:
mov	eax, [esp+30h+arg_4]
mov	ecx, [esp+30h+var_20]
mov	edx, [esi+60h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esp+30h+var_20]
mov	ecx, [esi+64h]
mov	edx, [esi+60h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_762367:
cmp	byte ptr [ebx+36h], 0
jz	short loc_762396
mov	eax, [esp+30h+arg_4]
mov	ecx, [esi+60h]
mov	edx, [esi+68h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esp+30h+arg_0]
mov	ecx, [esp+30h+arg_4]
mov	edx, [esi+68h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_762396:
cmp	byte ptr [ebx+37h], 0
jz	short loc_7623C5
mov	eax, [esp+30h+var_20]
mov	ecx, [esp+30h+var_1C]
mov	edx, [esi+64h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esp+30h+var_1C]
mov	ecx, [esi+6Ch]
mov	edx, [esi+64h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_7623C5:
cmp	byte ptr [esp+30h+arg_8], 0
mov	eax, [esp+30h+arg_4]
mov	ecx, [esp+30h+arg_0]
mov	edx, [esp+30h+var_20]
mov	[esi+60h], eax
mov	eax, [esp+30h+var_1C]
mov	[esi+68h], ecx
mov	[esi+64h], edx
mov	[esi+6Ch], eax
jz	short loc_76245A
fld	dword ptr [edi+44h]
mov	ecx, [esi+14h]
fadd	dword ptr [ebp+4]
push	ecx		; int
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+40h]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esi+64h], eax
cmp	byte ptr [ebx+37h], 0
jz	short loc_762453
fld	dword ptr [edi+4Ch]
push	0FFFFFFFFh	; int
fadd	dword ptr [ebp+4]
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+48h]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
jmp	short loc_762457

loc_762453:
mov	eax, [esp+30h+var_20]

loc_762457:
mov	[esi+6Ch], eax

loc_76245A:
fld	dword ptr [ebx+0Ch]
fsub	dword ptr [edi+64h]
fld	dword ptr [esi+28h]
fld	ds:dbl_15FD2F8
fmul	st(1), st
fmulp	st(1), st
fstp	[esp+30h+arg_0]
fld	[esp+30h+arg_0]
fcompp
fnstsw	ax
test	ah, 5
jp	loc_762B6F
cmp	byte ptr [ebx+38h], 0
jz	loc_762527
cmp	[esp+30h+arg_C], 0
jnz	short loc_7624F2
fld	dword ptr [ebp+0]
mov	edx, [esi+10h]
fsub	dword ptr [edi+10h]
push	edx
sub	esp, 8
fstp	[esp+3Ch+var_1C]
fld	dword ptr [ebp+4]
fsub	dword ptr [edi+14h]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+0BCh]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+3Ch+var_18]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+0B8h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
jmp	short loc_762519

loc_7624F2:
fld	dword ptr [ebp+4]
mov	eax, [esi+10h]
fsub	dword ptr [edi+14h]
push	eax		; int
sub	esp, 8
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_38]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi+10h]
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]

loc_762519:
mov	ecx, esi
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+arg_4], eax

loc_762527:
cmp	byte ptr [ebx+36h], 0
jz	short loc_762596
fld	dword ptr [ebp+0]
push	0FFFFFFFFh	; int
fsub	dword ptr [edi+18h]
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+var_1C]
fld	dword ptr [ebp+4]
fsub	dword ptr [edi+1Ch]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+8Ch]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+3Ch+var_14]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+88h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	edi, eax
jmp	short loc_76259A

loc_762596:
mov	edi, [esp+30h+arg_4]

loc_76259A:
cmp	byte ptr [ebx+34h], 0
jz	short loc_7625B4
mov	ecx, [esi+60h]
mov	edx, [esp+30h+arg_4]
mov	eax, [esi+64h]
push	ecx
push	edx
push	eax
mov	ecx, esi
call	sub_760A40

loc_7625B4:
cmp	byte ptr [ebx+36h], 0
jz	short loc_7625DB
mov	ecx, [esi+68h]
mov	ebx, [esp+30h+arg_4]
mov	edx, [esi+60h]
push	ecx
push	ebx
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esi+68h]
push	edi
push	ebx
push	eax
mov	ecx, esi
call	sub_760A40

loc_7625DB:
mov	ecx, [esp+30h+arg_4]
mov	[esi+68h], edi
pop	edi
mov	[esi+60h], ecx
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	10h

loc_7625EF:
test	al, al
jz	short loc_7625FB
fld	dword ptr [ebp+0]
fsub	dword ptr [edi+8]
jmp	short loc_762601

loc_7625FB:
fld	dword ptr [edi+88h]

loc_762601:
fstp	[esp+30h+var_C]
test	al, al
jz	short loc_762611
fld	dword ptr [ebp+4]
fsub	dword ptr [edi+0Ch]
jmp	short loc_762617

loc_762611:
fld	dword ptr [edi+8Ch]

loc_762617:
cmp	[esp+30h+arg_C], 0
fstp	[esp+30h+var_10]
fld	[esp+30h+var_C]
mov	ebx, [esp+30h+arg_4]
fsub	dword ptr [ebp+0]
fmul	dword ptr [ebx+1Ch]
fadd	dword ptr [ebp+0]
fstp	[esp+30h+var_4]
fld	[esp+30h+var_10]
fsub	dword ptr [ebp+4]
fmul	dword ptr [ebx+1Ch]
fadd	dword ptr [ebp+4]
fstp	[esp+30h+var_8]
jnz	loc_76277E
fld	dword ptr [edi+0CCh]
fsub	dword ptr [edi+68h]
fstp	[esp+30h+arg_0]
fld	st
fld	[esp+30h+arg_0]
fucom	st(1)
fnstsw	ax
fstp	st(1)
fld1
test	ah, 44h
jp	short loc_762678
fstp	st(1)
fst	[esp+30h+arg_0]
fld	[esp+30h+arg_0]
fxch	st(1)

loc_762678:
fld	dword ptr [ebx+30h]
fsub	dword ptr [edi+68h]
fsub	dword ptr [ebx+10h]
fadd	dword ptr [ebx+4]
fstp	[esp+30h+var_18]
fld	[esp+30h+var_18]
fcomp	st(2)
fnstsw	ax
test	ah, 41h
jnz	short loc_76269D
fxch	st(1)
fst	[esp+30h+var_18]
fxch	st(1)

loc_76269D:
fld	dword ptr [ebx+28h]
fsub	dword ptr [edi+68h]
fstp	[esp+30h+arg_0]
fld	[esp+30h+arg_0]
fadd	[esp+30h+var_18]
fld	ds:dbl_15FCD70
fmul	st(3), st
fxch	st(1)
fdivrp	st(3), st
fxch	st(2)
fstp	[esp+30h+var_18]
fld	dword ptr [edi+9Ch]
fsub	dword ptr [edi+6Ch]
fstp	[esp+30h+arg_0]
fxch	st(2)
fcomp	[esp+30h+arg_0]
fnstsw	ax
test	ah, 44h
jp	short loc_7626E3
fxch	st(1)
fstp	[esp+30h+arg_0]
jmp	short loc_7626E5

loc_7626E3:
fstp	st(1)

loc_7626E5:
fld	dword ptr [ebx+28h]
mov	edx, [esi+14h]
fsub	dword ptr [edi+6Ch]
push	edx		; int
sub	esp, 8
fadd	dword ptr [ebx+10h]
fsub	dword ptr [ebx+4]
fstp	[esp+3Ch+arg_4]
fld	[esp+3Ch+arg_4]
fld	dword ptr [ebx+30h]
fsub	dword ptr [edi+6Ch]
fstp	[esp+3Ch+arg_4]
fadd	[esp+3Ch+arg_4]
fld	[esp+3Ch+arg_0]
fmulp	st(2), st
fdivrp	st(1), st
fstp	[esp+3Ch+var_14]
fld	dword ptr [edi+30h]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+var_1C]
fld	dword ptr [edi+34h]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+0C4h]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+3Ch+var_18]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+0C0h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+var_20], eax
jmp	short loc_7627E7

loc_76277E:
mov	eax, [esi+14h]
fstp	st
fld	dword ptr [edi+34h]
push	eax		; int
fadd	dword ptr [ebp+4]
sub	esp, 8
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+30h]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
fld	dword ptr [edi+9Ch]
mov	[esp+30h+var_20], eax
fsub	dword ptr [edi+6Ch]
fstp	[esp+30h+arg_0]
fldz
fcomp	[esp+30h+arg_0]
fnstsw	ax
test	ah, 44h
jp	short loc_7627D3
fld1
fstp	[esp+30h+arg_0]

loc_7627D3:
fld	dword ptr [edi+68h]
fadd	dword ptr [ebx+10h]
fsub	dword ptr [ebx+4]
fsub	dword ptr [edi+6Ch]
fdiv	[esp+30h+arg_0]
fstp	[esp+30h+var_14]

loc_7627E7:
cmp	byte ptr [ebx+37h], 0
fld	[esp+30h+var_14]
jz	short loc_762856
fld	dword ptr [edi+38h]
push	0FFFFFFFFh	; int
fadd	dword ptr [ebp+0]
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+var_1C]
fld	dword ptr [edi+3Ch]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+94h]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	st(2)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+90h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+var_1C], eax
jmp	short loc_762860

loc_762856:
mov	ecx, [esp+30h+var_20]
fstp	st
mov	[esp+30h+var_1C], ecx

loc_762860:
cmp	byte ptr [ebx+38h], 0
jz	short loc_762885
mov	edx, [esi+10h]
fld	[esp+30h+var_8]
push	edx		; int
sub	esp, 8
fstp	[esp+3Ch+var_38]
mov	ecx, esi
fld	[esp+3Ch+var_4]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
jmp	short loc_762889

loc_762885:
mov	eax, [esp+30h+var_20]

loc_762889:
cmp	byte ptr [ebx+36h], 0
mov	[esp+30h+arg_4], eax
jz	short loc_7628B4
fld	[esp+30h+var_10]
push	0FFFFFFFFh	; int
sub	esp, 8
fstp	[esp+3Ch+var_38]
mov	ecx, esi
fld	[esp+3Ch+var_C]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+arg_0], eax
jmp	short loc_7628BC

loc_7628B4:
mov	ecx, [esp+30h+arg_4]
mov	[esp+30h+arg_0], ecx

loc_7628BC:
cmp	byte ptr [ebx+34h], 0
jnz	short loc_7628C8
cmp	byte ptr [ebx+35h], 0
jz	short loc_7628F1

loc_7628C8:
mov	edx, [esp+30h+arg_4]
mov	eax, [esp+30h+var_20]
mov	ecx, [esi+64h]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40
mov	edx, [esi+60h]
mov	eax, [esp+30h+arg_4]
mov	ecx, [esi+64h]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40

loc_7628F1:
cmp	byte ptr [ebx+37h], 0
jz	short loc_762920
mov	edx, [esi+64h]
mov	eax, [esp+30h+var_20]
mov	ecx, [esi+6Ch]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40
mov	edx, [esp+30h+var_20]
mov	eax, [esp+30h+var_1C]
mov	ecx, [esi+6Ch]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40

loc_762920:
cmp	byte ptr [ebx+36h], 0
jz	short loc_76294F
mov	edx, [esp+30h+arg_0]
mov	eax, [esp+30h+arg_4]
mov	ecx, [esi+60h]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40
mov	edx, [esi+68h]
mov	eax, [esp+30h+arg_0]
mov	ecx, [esi+60h]
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40

loc_76294F:
cmp	byte ptr [esp+30h+arg_8], 0
mov	edx, [esp+30h+arg_4]
mov	eax, [esp+30h+arg_0]
mov	ecx, [esp+30h+var_20]
mov	[esi+60h], edx
mov	edx, [esp+30h+var_1C]
mov	[esi+68h], eax
mov	[esi+64h], ecx
mov	[esi+6Ch], edx
jz	short loc_7629E4
fld	dword ptr [ebp+4]
mov	eax, [esi+10h]
fsub	dword ptr [edi+14h]
push	eax		; int
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi+10h]
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esi+60h], eax
cmp	byte ptr [ebx+36h], 0
jz	short loc_7629DD
fld	dword ptr [ebp+4]
push	0FFFFFFFFh	; int
fsub	dword ptr [edi+1Ch]
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_38]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi+18h]
fstp	[esp+3Ch+arg_0]
fld	[esp+3Ch+arg_0]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
jmp	short loc_7629E1

loc_7629DD:
mov	eax, [esp+30h+arg_4]

loc_7629E1:
mov	[esi+68h], eax

loc_7629E4:
fld	dword ptr [ebx+10h]
fsub	dword ptr [edi+6Ch]
fld	dword ptr [esi+28h]
fld	ds:dbl_15FD2F8
fmul	st(1), st
fmulp	st(1), st
fstp	[esp+30h+arg_0]
fld	[esp+30h+arg_0]
fcompp
fnstsw	ax
test	ah, 5
jp	loc_762B6F
cmp	byte ptr [ebx+38h], 0
jz	loc_762AB1
cmp	[esp+30h+arg_C], 0
jnz	short loc_762A7C
fld	dword ptr [edi+40h]
mov	ecx, [esi+14h]
fadd	dword ptr [ebp+0]
push	ecx
sub	esp, 8
fstp	[esp+3Ch+var_1C]
fld	dword ptr [edi+44h]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+0C4h]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+3Ch+var_18]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+0C0h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
jmp	short loc_762AA3

loc_762A7C:
fld	dword ptr [edi+44h]
mov	edx, [esi+14h]
fadd	dword ptr [ebp+4]
push	edx		; int
sub	esp, 8
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+40h]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]

loc_762AA3:
mov	ecx, esi
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	[esp+30h+var_20], eax

loc_762AB1:
cmp	byte ptr [ebx+37h], 0
jz	short loc_762B20
fld	dword ptr [edi+48h]
push	0FFFFFFFFh	; int
fadd	dword ptr [ebp+0]
sub	esp, 8
mov	ecx, esi
fstp	[esp+3Ch+var_1C]
fld	dword ptr [edi+4Ch]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+94h]
fld	[esp+3Ch+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+3Ch+var_14]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_38]
fld	dword ptr [edi+90h]
fld	[esp+3Ch+var_1C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+3Ch+arg_C]
fld	[esp+3Ch+arg_C]
fstp	[esp+3Ch+var_3C]
call	sub_7609E0
mov	edi, eax
jmp	short loc_762B24

loc_762B20:
mov	edi, [esp+30h+var_20]

loc_762B24:
cmp	byte ptr [ebx+35h], 0
jz	short loc_762B3E
mov	eax, [esp+30h+var_20]
mov	ecx, [esi+64h]
mov	edx, [esi+60h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_762B3E:
cmp	byte ptr [ebx+37h], 0
jz	short loc_762B65
mov	ebx, [esp+30h+var_20]
mov	eax, [esi+6Ch]
mov	ecx, [esi+64h]
push	ebx
push	eax
push	ecx
mov	ecx, esi
call	sub_760A40
mov	edx, [esi+6Ch]
push	ebx
push	edi
push	edx
mov	ecx, esi
call	sub_760A40

loc_762B65:
mov	eax, [esp+30h+var_20]
mov	[esi+64h], eax
mov	[esi+6Ch], edi

loc_762B6F:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	10h
sub_762030 endp

align 10h



; int __stdcall	sub_762B80(int,	int, float, int)
sub_762B80 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0F8h
mov	eax, [esp+0F8h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [esp+104h+arg_4]
fld	dword ptr [esi+4]
mov	ebp, [esp+104h+arg_C]
fsub	dword ptr [eax+4]
push	edi
fld	[esp+108h+arg_8]
mov	edi, ecx
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+108h+var_F4]
fld	dword ptr [eax]
fsub	dword ptr [esi]
mov	eax, [edi+10h]
push	eax		; int
sub	esp, 8
fdivrp	st(1), st
fstp	[esp+114h+var_F8]
fld	dword ptr [ebp+0]
fld	[esp+114h+var_F4]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+114h+var_DC]
fld	dword ptr [ebp+0]
fld	[esp+114h+var_F8]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	[esp+114h+var_D8]
fld	st(1)
fmul	dword ptr [ebp+4]
fstp	[esp+114h+var_AC]
fld	st
fmul	dword ptr [ebp+4]
fstp	[esp+114h+var_A8]
fld	st(1)
fmul	dword ptr [ebp+0Ch]
fstp	[esp+114h+var_D4]
fld	st
fmul	dword ptr [ebp+0Ch]
fstp	[esp+114h+var_D0]
fld	dword ptr [ebp+10h]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+114h+var_A4]
fmul	dword ptr [ebp+10h]
fstp	[esp+114h+var_A0]
fld	dword ptr [esi+4]
fsub	[esp+114h+var_D8]
fstp	[esp+114h+var_F4]
fld	[esp+114h+var_F4]
fstp	[esp+114h+var_110]
fld	dword ptr [esi]
fsub	[esp+114h+var_DC]
fstp	[esp+114h+var_F4]
fld	[esp+114h+var_F4]
fstp	[esp+114h+var_114]
call	sub_7609E0
cmp	byte ptr [ebp+36h], 0
mov	ebx, eax
mov	[esp+108h+var_EC], ebx
jz	short loc_762C8C
fld	dword ptr [esi+4]
push	0FFFFFFFFh	; int
fsub	[esp+10Ch+var_D0]
sub	esp, 8
mov	ecx, edi
fstp	[esp+114h+var_F4]
fld	[esp+114h+var_F4]
fstp	[esp+114h+var_110]
fld	dword ptr [esi]
fsub	[esp+114h+var_D4]
fstp	[esp+114h+var_F4]
fld	[esp+114h+var_F4]
fstp	[esp+114h+var_114]
call	sub_7609E0
mov	[esp+108h+var_F4], eax
jmp	short loc_762C90

loc_762C8C:
mov	[esp+108h+var_F4], ebx

loc_762C90:
cmp	byte ptr [ebp+38h], 0
jz	short loc_762CCE
fld	[esp+108h+var_A8]
mov	ecx, [edi+14h]
fadd	dword ptr [esi+4]
push	ecx		; int
sub	esp, 8
mov	ecx, edi
fstp	[esp+114h+var_F8]
fld	[esp+114h+var_F8]
fstp	[esp+114h+var_110]
fld	dword ptr [esi]
fadd	[esp+114h+var_AC]
fstp	[esp+114h+var_F8]
fld	[esp+114h+var_F8]
fstp	[esp+114h+var_114]
call	sub_7609E0
mov	[esp+108h+var_F0], eax
jmp	short loc_762CD2

loc_762CCE:
mov	[esp+108h+var_F0], ebx

loc_762CD2:
cmp	byte ptr [ebp+37h], 0
jz	short loc_762D0E
fld	[esp+108h+var_A0]
push	0FFFFFFFFh	; int
fadd	dword ptr [esi+4]
sub	esp, 8
mov	ecx, edi
fstp	[esp+114h+var_F8]
fld	[esp+114h+var_F8]
fstp	[esp+114h+var_110]
fld	dword ptr [esi]
fadd	[esp+114h+var_A4]
fstp	[esp+114h+var_F8]
fld	[esp+114h+var_F8]
fstp	[esp+114h+var_114]
call	sub_7609E0
mov	[esp+108h+var_F8], eax
jmp	short loc_762D16

loc_762D0E:
mov	edx, [esp+108h+var_F0]
mov	[esp+108h+var_F8], edx

loc_762D16:
cmp	byte ptr [ebp+34h], 0
jnz	short loc_762D26
cmp	byte ptr [ebp+35h], 0
jz	loc_762DB5

loc_762D26:
mov	ebx, [edi+50h]
mov	eax, [edi+60h]
lea	esi, [edi+50h]
shr	ebx, 8
mov	[esp+108h+var_E8], eax
cmp	ebx, [esi+4]
jb	short loc_762D43
push	ebx
mov	ecx, esi
call	sub_760960

loc_762D43:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+108h+var_E8]
lea	eax, [eax+edx*4]
mov	edx, [esp+108h+var_F0]
mov	[eax], ecx
mov	ecx, [esp+108h+var_EC]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]
mov	ebx, [esi]
mov	edx, [edi+60h]
mov	eax, [edi+64h]
shr	ebx, 8
mov	[esp+108h+var_E8], edx
mov	[esp+108h+var_E4], eax
cmp	ebx, [esi+4]
jb	short loc_762D8C
push	ebx
mov	ecx, esi
call	sub_760960

loc_762D8C:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+108h+var_E8]
lea	eax, [eax+edx*4]
mov	edx, [esp+108h+var_E4]
mov	[eax], ecx
mov	ecx, [esp+108h+var_F0]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]

loc_762DB5:
cmp	byte ptr [ebp+36h], 0
jz	loc_762E4E
mov	ebx, [edi+50h]
mov	edx, [edi+68h]
mov	eax, [edi+60h]
lea	esi, [edi+50h]
shr	ebx, 8
mov	[esp+108h+var_E8], edx
mov	[esp+108h+var_E4], eax
cmp	ebx, [esi+4]
jb	short loc_762DE3
push	ebx
mov	ecx, esi
call	sub_760960

loc_762DE3:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+108h+var_E8]
lea	eax, [eax+edx*4]
mov	edx, [esp+108h+var_E4]
mov	[eax], ecx
mov	ecx, [esp+108h+var_EC]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]
mov	ebx, [esi]
mov	edx, [edi+68h]
shr	ebx, 8
mov	[esp+108h+var_E8], edx
cmp	ebx, [esi+4]
jb	short loc_762E25
push	ebx
mov	ecx, esi
call	sub_760960

loc_762E25:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+108h+var_E8]
lea	eax, [eax+edx*4]
mov	edx, [esp+108h+var_EC]
mov	[eax], ecx
mov	ecx, [esp+108h+var_F4]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]

loc_762E4E:
cmp	byte ptr [ebp+37h], 0
jz	loc_762ED8
mov	ebx, [edi+50h]
mov	ebp, [edi+64h]
lea	esi, [edi+50h]
shr	ebx, 8
cmp	ebx, [esi+4]
jb	short loc_762E71
push	ebx
mov	ecx, esi
call	sub_760960

loc_762E71:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+108h+var_F8]
and	eax, 0FFh
lea	eax, [eax+eax*2]
mov	[ecx+eax*4], ebp
lea	eax, [ecx+eax*4]
mov	ecx, [esp+108h+var_F0]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]
mov	ebx, [esi]
mov	edx, [edi+6Ch]
mov	ebp, [edi+64h]
shr	ebx, 8
mov	[esp+108h+var_E4], edx
cmp	ebx, [esi+4]
jb	short loc_762EB3
push	ebx
mov	ecx, esi
call	sub_760960

loc_762EB3:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+108h+var_E4]
lea	eax, [eax+edx*4]
mov	edx, [esp+108h+var_F8]
mov	[eax], ebp
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]

loc_762ED8:
mov	eax, [esp+108h+var_EC]
mov	ecx, [esp+108h+var_F4]
mov	edx, [esp+108h+var_F0]
mov	[edi+60h], eax
mov	eax, [esp+108h+var_F8]
mov	[edi+68h], ecx
mov	[edi+64h], edx
mov	[edi+6Ch], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0F8h
retn	10h
sub_762B80 endp

align 10h



sub_762F10 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 2Ch
push	ebx
push	ebp
mov	ebp, [esp+34h+arg_0]
push	esi
push	edi
mov	edi, [esp+3Ch+arg_8]
mov	dl, [edi+0DAh]
or	dl, [edi+0D9h]
cmp	byte ptr [edi+0D7h], 0
mov	esi, ecx
mov	[esp+3Ch+var_29], dl
jz	loc_763014
fld	dword ptr [edi+88h]
mov	ebx, [esp+3Ch+arg_4]
fstp	[esp+3Ch+var_24]
fld	dword ptr [edi+8Ch]
fstp	[esp+3Ch+var_28]
fld	[esp+3Ch+var_24]
fsub	dword ptr [ebp+0]
fmul	dword ptr [ebx+1Ch]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+var_18]
fld	[esp+3Ch+var_28]
fsub	dword ptr [ebp+4]
fmul	dword ptr [ebx+1Ch]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+arg_0]
fld	dword ptr [edi+98h]
fld	dword ptr [ebx+2Ch]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_762FC1
mov	eax, [esp+3Ch+arg_C]
test	eax, eax
jl	short loc_762FC1
cmp	eax, 1
jle	short loc_762FAE
cmp	eax, 2
jnz	short loc_762FC1
push	edi
push	ebx
push	ebp
call	sub_7615F0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h

loc_762FAE:
push	eax
push	edi
push	ebx
push	ebp
call	sub_762030
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h

loc_762FC1:
test	dl, dl
jz	short loc_762FCD
fld	dword ptr [edi+38h]
fadd	dword ptr [ebp+0]
jmp	short loc_762FD3

loc_762FCD:
fld	dword ptr [edi+90h]

loc_762FD3:
fstp	[esp+3Ch+var_1C]
test	dl, dl
jz	short loc_762FE3
fld	dword ptr [edi+3Ch]
fadd	dword ptr [ebp+4]
jmp	short loc_762FE9

loc_762FE3:
fld	dword ptr [edi+94h]

loc_762FE9:
fstp	[esp+3Ch+var_20]
fld	[esp+3Ch+var_1C]
fsub	dword ptr [ebp+0]
fmul	dword ptr [ebx+20h]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+var_10]
fld	[esp+3Ch+var_20]
fsub	dword ptr [ebp+4]
fmul	dword ptr [ebx+20h]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+var_14]
jmp	loc_7630EB

loc_763014:
fld	dword ptr [edi+90h]
mov	ecx, [esp+3Ch+arg_4]
fstp	[esp+3Ch+var_1C]
fld	dword ptr [edi+94h]
fstp	[esp+3Ch+var_20]
fld	[esp+3Ch+var_1C]
fsub	dword ptr [ebp+0]
fmul	dword ptr [ecx+20h]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+var_10]
fld	[esp+3Ch+var_20]
fsub	dword ptr [ebp+4]
fmul	dword ptr [ecx+20h]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+var_14]
fld	dword ptr [edi+9Ch]
fld	dword ptr [ecx+30h]
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_76309B
mov	eax, [esp+3Ch+arg_C]
test	eax, eax
jl	short loc_76309B
cmp	eax, 1
jle	short loc_763086
cmp	eax, 2
jnz	short loc_76309B
push	edi
push	ecx
push	ebp
mov	ecx, esi
call	sub_7615F0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h

loc_763086:
push	eax
push	edi
push	ecx
push	ebp
mov	ecx, esi
call	sub_762030
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h

loc_76309B:
test	dl, dl
jz	short loc_7630A7
fld	dword ptr [ebp+0]
fsub	dword ptr [edi+8]
jmp	short loc_7630AD

loc_7630A7:
fld	dword ptr [edi+88h]

loc_7630AD:
fstp	[esp+3Ch+var_24]
test	dl, dl
jz	short loc_7630BD
fld	dword ptr [ebp+4]
fsub	dword ptr [edi+0Ch]
jmp	short loc_7630C3

loc_7630BD:
fld	dword ptr [edi+8Ch]

loc_7630C3:
fstp	[esp+3Ch+var_28]
mov	ebx, ecx
fld	[esp+3Ch+var_24]
fsub	dword ptr [ebp+0]
fmul	dword ptr [ecx+1Ch]
fadd	dword ptr [ebp+0]
fstp	[esp+3Ch+var_18]
fld	[esp+3Ch+var_28]
fsub	dword ptr [ebp+4]
fmul	dword ptr [ecx+1Ch]
fadd	dword ptr [ebp+4]
fstp	[esp+3Ch+arg_0]

loc_7630EB:
mov	eax, [esi+10h]
fld	[esp+3Ch+arg_0]
push	eax		; int
sub	esp, 8
fstp	[esp+48h+var_44]
mov	ecx, esi
fld	[esp+48h+var_18]
fstp	[esp+48h+var_48]
call	sub_7609E0
cmp	byte ptr [ebx+36h], 0
mov	[esp+3Ch+arg_C], eax
jz	short loc_76312D
fld	[esp+3Ch+var_28]
push	0FFFFFFFFh	; int
sub	esp, 8
fstp	[esp+48h+var_44]
mov	ecx, esi
fld	[esp+48h+var_24]
fstp	[esp+48h+var_48]
call	sub_7609E0

loc_76312D:
cmp	byte ptr [ebx+38h], 0
mov	[esp+3Ch+var_24], eax
jz	short loc_76315A
mov	ecx, [esi+14h]
fld	[esp+3Ch+var_14]
push	ecx		; int
sub	esp, 8
fstp	[esp+48h+var_44]
mov	ecx, esi
fld	[esp+48h+var_10]
fstp	[esp+48h+var_48]
call	sub_7609E0
mov	[esp+3Ch+arg_0], eax
jmp	short loc_763162

loc_76315A:
mov	edx, [esp+3Ch+arg_C]
mov	[esp+3Ch+arg_0], edx

loc_763162:
cmp	byte ptr [ebx+37h], 0
jz	short loc_763185
fld	[esp+3Ch+var_20]
push	0FFFFFFFFh	; int
sub	esp, 8
fstp	[esp+48h+var_44]
mov	ecx, esi
fld	[esp+48h+var_1C]
fstp	[esp+48h+var_48]
call	sub_7609E0
jmp	short loc_763189

loc_763185:
mov	eax, [esp+3Ch+arg_0]

loc_763189:
cmp	byte ptr [ebx+34h], 0
mov	[esp+3Ch+var_1C], eax
jnz	short loc_76319D
cmp	byte ptr [ebx+35h], 0
jz	loc_763234

loc_76319D:
mov	ebx, [esi+50h]
mov	ecx, [esi+60h]
lea	edi, [esi+50h]
shr	ebx, 8
mov	[esp+3Ch+var_C], ecx
cmp	ebx, [edi+4]
jb	short loc_7631BA
push	ebx
mov	ecx, edi
call	sub_760960

loc_7631BA:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+3Ch+var_C]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+3Ch+arg_0]
mov	[eax], edx
mov	edx, [esp+3Ch+arg_C]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [edi]
mov	ebx, [edi]
mov	eax, [esi+60h]
mov	ecx, [esi+64h]
shr	ebx, 8
mov	[esp+3Ch+var_C], eax
mov	[esp+3Ch+var_8], ecx
cmp	ebx, [edi+4]
jb	short loc_763203
push	ebx
mov	ecx, edi
call	sub_760960

loc_763203:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+3Ch+var_C]
mov	ebx, [esp+3Ch+arg_4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+3Ch+var_8]
mov	[eax], edx
mov	edx, [esp+3Ch+arg_0]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [edi]
mov	edi, [esp+3Ch+arg_8]

loc_763234:
cmp	byte ptr [ebx+36h], 0
jz	short loc_763263
mov	eax, [esp+3Ch+arg_C]
mov	ecx, [esi+60h]
mov	edx, [esi+68h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esp+3Ch+var_24]
mov	ecx, [esp+3Ch+arg_C]
mov	edx, [esi+68h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_763263:
cmp	byte ptr [ebx+37h], 0
jz	short loc_763292
mov	eax, [esp+3Ch+arg_0]
mov	ecx, [esp+3Ch+var_1C]
mov	edx, [esi+64h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40
mov	eax, [esp+3Ch+var_1C]
mov	ecx, [esi+6Ch]
mov	edx, [esi+64h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_760A40

loc_763292:
cmp	[esp+3Ch+var_29], 0
mov	eax, [esp+3Ch+arg_C]
mov	ecx, [esp+3Ch+var_24]
mov	edx, [esp+3Ch+arg_0]
mov	[esi+60h], eax
mov	eax, [esp+3Ch+var_1C]
mov	[esi+68h], ecx
mov	[esi+64h], edx
mov	[esi+6Ch], eax
jz	loc_7633CA
cmp	byte ptr [edi+0D7h], 0
jz	loc_76334D
fld	dword ptr [edi+44h]
mov	ecx, [esi+14h]
fadd	dword ptr [ebp+4]
push	ecx		; int
sub	esp, 8
mov	ecx, esi
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_44]
fld	dword ptr [edi+40h]
fadd	dword ptr [ebp+0]
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_48]
call	sub_7609E0
mov	[esi+64h], eax
cmp	byte ptr [ebx+37h], 0
jz	short loc_76333C
fld	dword ptr [edi+4Ch]
push	0FFFFFFFFh	; int
fadd	dword ptr [ebp+4]
sub	esp, 8
mov	ecx, esi
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_44]
fld	dword ptr [edi+48h]
fadd	dword ptr [ebp+0]
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_48]
call	sub_7609E0
pop	edi
mov	[esi+6Ch], eax
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h

loc_76333C:
mov	eax, [esp+3Ch+arg_0]
pop	edi
mov	[esi+6Ch], eax
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h

loc_76334D:
fld	dword ptr [ebp+4]
mov	edx, [esi+10h]
fsub	dword ptr [edi+14h]
push	edx		; int
sub	esp, 8
mov	ecx, esi
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_44]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi+10h]
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_48]
call	sub_7609E0
mov	[esi+60h], eax
cmp	byte ptr [ebx+36h], 0
jz	short loc_7633C3
fld	dword ptr [ebp+4]
push	0FFFFFFFFh	; int
fsub	dword ptr [edi+1Ch]
sub	esp, 8
mov	ecx, esi
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_44]
fld	dword ptr [ebp+0]
fsub	dword ptr [edi+18h]
fstp	[esp+48h+arg_4]
fld	[esp+48h+arg_4]
fstp	[esp+48h+var_48]
call	sub_7609E0
pop	edi
mov	[esi+68h], eax
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h

loc_7633C3:
mov	eax, [esp+3Ch+arg_C]
mov	[esi+68h], eax

loc_7633CA:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	10h
sub_762F10 endp

align 10h



sub_7633E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_C]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [esp+10h+arg_10]
push	edi
push	ebx
mov	esi, ecx
mov	ecx, [esp+18h+arg_4]
push	eax
push	ecx
push	ebp
mov	ecx, esi
call	sub_75FF40
mov	eax, [esi]
cmp	eax, 4		; switch 5 cases
ja	short loc_763443 ; default
jmp	ds:off_76344C[eax*4] ; switch jump

loc_763414:		; jumptable 0076340D cases 0-2
push	eax
push	edi
push	ebx
push	ebp
mov	ecx, esi
call	sub_762F10
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h

loc_763426:		; jumptable 0076340D case 3
push	edi
push	ebx
push	ebp
mov	ecx, esi
call	sub_7615F0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h

loc_763437:		; jumptable 0076340D case 4
push	4
push	edi
push	ebx
push	ebp
mov	ecx, esi
call	sub_762030

loc_763443:		; default
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h
sub_7633E0 endp

align 4
off_76344C dd offset loc_763414	; jump table for switch	statement
dd offset loc_763414
dd offset loc_763414
dd offset loc_763426
dd offset loc_763437



sub_763460 proc	near

var_144= dword ptr -144h
var_140= dword ptr -140h
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	byte ptr -0F0h
var_EF=	byte ptr -0EFh
var_EE=	byte ptr -0EEh
var_ED=	byte ptr -0EDh
var_EC=	byte ptr -0ECh
var_EB=	byte ptr -0EBh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	byte ptr -0DCh

sub	esp, 128h
fldz
push	ebx
fst	[esp+12Ch+var_124]
push	ebp
fst	[esp+130h+var_120]
push	esi
fst	[esp+134h+var_11C]
push	edi
fst	[esp+138h+var_118]
mov	esi, ecx
fst	[esp+138h+var_114]
lea	eax, [esp+138h+var_124]
fst	[esp+138h+var_110]
mov	edi, 0FFFFFFFCh
fst	[esp+138h+var_10C]
push	eax
fst	[esp+13Ch+var_108]
mov	[esi+60h], edi
fst	[esp+13Ch+var_104]
mov	dword ptr [esi+64h], 0FFFFFFFDh
fst	[esp+13Ch+var_100]
mov	dword ptr [esi+68h], 0FFFFFFFEh
fst	[esp+13Ch+var_FC]
mov	dword ptr [esi+6Ch], 0FFFFFFFFh
fst	[esp+13Ch+var_F8]
mov	[esp+13Ch+var_F0], 0
fstp	[esp+13Ch+var_F4]
mov	[esp+13Ch+var_EF], 0
mov	[esp+13Ch+var_EE], 0
mov	[esp+13Ch+var_ED], 0
mov	[esp+13Ch+var_EC], 0
mov	[esp+13Ch+var_EB], 0
call	sub_75FDD0
lea	ecx, [esp+138h+var_DC]
call	sub_75FAE0
cmp	byte ptr [esi+3Ch], 0
jz	loc_7636CE
mov	ecx, [esi+2Ch]
cmp	ecx, 3
jb	loc_7639E5
mov	edx, [esi+38h]
lea	ebx, [esp+138h+var_DC]
push	ebx
lea	eax, [ecx-1]
lea	ebx, [esp+13Ch+var_124]
push	ebx
mov	ebx, [edx]
push	ebx
mov	ebx, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	ebx, 6
mov	ebx, [edx+ebx*4]
lea	eax, [ebx+eax*4]
add	ecx, 0FFFFFFFEh
push	eax
mov	eax, ecx
shr	eax, 6
mov	edx, [edx+eax*4]
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
lea	eax, [edx+ecx*4]
push	eax
mov	ecx, esi
call	sub_75FF40
mov	ecx, [esi+38h]
mov	edx, [ecx]
mov	eax, [esi+2Ch]
lea	ebx, [esp+138h+var_DC]
push	ebx
lea	ebx, [esp+13Ch+var_124]
push	ebx
lea	ebx, [edx+0Ch]
dec	eax
push	ebx
push	edx
mov	edx, eax
shr	edx, 6
mov	ecx, [ecx+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
push	edx
mov	ecx, esi
call	sub_75FF40
cmp	dword ptr [esi+2Ch], 0
mov	eax, [esi+50h]
mov	[esp+138h+var_128], eax
jbe	loc_763609
mov	eax, 1
mov	edi, edi

loc_763590:
mov	ecx, [esi+2Ch]
lea	edi, [eax+1]
mov	edx, edi
cmp	edi, ecx
jb	short loc_76359E
sub	edx, ecx

loc_76359E:
mov	ebx, [esi+2Ch]
mov	ecx, eax
cmp	eax, ebx
jb	short loc_7635A9
sub	ecx, ebx

loc_7635A9:
mov	ebp, [esi+38h]
lea	ebx, [esp+138h+var_DC]
push	ebx
lea	ebx, [esp+13Ch+var_124]
push	ebx
mov	ebx, edx
and	edx, 3Fh
lea	edx, [edx+edx*2]
shr	ebx, 6
mov	ebx, [ebp+ebx*4+0]
lea	edx, [ebx+edx*4]
push	edx
mov	edx, ecx
and	ecx, 3Fh
shr	edx, 6
lea	ecx, [ecx+ecx*2]
mov	ebx, ebp
mov	edx, [ebx+edx*4]
lea	ecx, [edx+ecx*4]
lea	edx, [eax-1]
push	ecx
dec	eax
shr	edx, 6
and	eax, 3Fh
mov	ecx, ebp
mov	ecx, [ecx+edx*4]
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
push	edx
mov	ecx, esi
call	sub_7633E0
mov	eax, edi
lea	ecx, [eax-1]
cmp	ecx, [esi+2Ch]
jb	short loc_763590
mov	edi, 0FFFFFFFCh

loc_763609:
mov	ecx, [esp+138h+var_128]
xor	edx, edx
nop

loc_763610:
cmp	ecx, [esi+50h]
jnb	loc_7639E5
mov	ebp, [esi+5Ch]
mov	ebx, ecx
mov	eax, ecx
and	eax, 0FFh
shr	ebx, 8
mov	ebx, [ebp+ebx*4+0]
lea	eax, [eax+eax*2]
cmp	[ebx+eax*4], edi
lea	eax, [ebx+eax*4]
jnz	short loc_76363C
mov	ebx, [esi+60h]
mov	[eax], ebx

loc_76363C:
cmp	dword ptr [eax], 0FFFFFFFDh
jnz	short loc_763646
mov	ebx, [esi+64h]
mov	[eax], ebx

loc_763646:
cmp	dword ptr [eax], 0FFFFFFFEh
jnz	short loc_763650
mov	ebx, [esi+68h]
mov	[eax], ebx

loc_763650:
or	ebx, 0FFFFFFFFh
cmp	[eax], ebx
jnz	short loc_76365C
mov	ebp, [esi+6Ch]
mov	[eax], ebp

loc_76365C:
cmp	[eax+4], edi
jnz	short loc_763667
mov	ebp, [esi+60h]
mov	[eax+4], ebp

loc_763667:
cmp	dword ptr [eax+4], 0FFFFFFFDh
jnz	short loc_763673
mov	ebp, [esi+64h]
mov	[eax+4], ebp

loc_763673:
cmp	dword ptr [eax+4], 0FFFFFFFEh
jnz	short loc_76367F
mov	ebp, [esi+68h]
mov	[eax+4], ebp

loc_76367F:
cmp	[eax+4], ebx
jnz	short loc_76368A
mov	ebp, [esi+6Ch]
mov	[eax+4], ebp

loc_76368A:
cmp	[eax+8], edi
jnz	short loc_763695
mov	ebp, [esi+60h]
mov	[eax+8], ebp

loc_763695:
cmp	dword ptr [eax+8], 0FFFFFFFDh
jnz	short loc_7636A1
mov	ebp, [esi+64h]
mov	[eax+8], ebp

loc_7636A1:
cmp	dword ptr [eax+8], 0FFFFFFFEh
jnz	short loc_7636AD
mov	ebp, [esi+68h]
mov	[eax+8], ebp

loc_7636AD:
cmp	[eax+8], ebx
jnz	short loc_7636B8
mov	ebx, [esi+6Ch]
mov	[eax+8], ebx

loc_7636B8:
inc	edx
inc	ecx
cmp	edx, 6
jb	loc_763610
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 128h
retn

loc_7636CE:
mov	edi, 2
cmp	[esi+2Ch], edi
jb	loc_7639E5
fld	dword ptr [esi+1Ch]
mov	ebp, 1
fadd	dword ptr [esi+18h]
fmul	ds:dbl_15FCC48
fstp	[esp+138h+var_128]
fld	[esp+138h+var_128]
cmp	[esi+4], ebp
jnz	short loc_763729
mov	ecx, [esi+38h]
mov	eax, [ecx]
fld	dword ptr [eax]
fld	dword ptr [eax+0Ch]
fsub	st, st(1)
fmul	st, st(2)
fdiv	dword ptr [eax+8]
fsubp	st(1), st
fstp	dword ptr [eax]
fld	dword ptr [eax+4]
fld	dword ptr [eax+10h]
fsub	st, st(1)
fmul	st, st(2)
fdiv	dword ptr [eax+8]
fsubp	st(1), st
fstp	dword ptr [eax+4]
fld	dword ptr [eax+8]
fadd	st, st(1)
fstp	dword ptr [eax+8]

loc_763729:
cmp	[esi+8], ebp
jnz	short loc_763781
mov	ecx, [esi+2Ch]
mov	edx, [esi+38h]
lea	eax, [ecx-2]
mov	ebx, eax
shr	ebx, 6
mov	ebx, [edx+ebx*4]
and	eax, 3Fh
dec	ecx
lea	eax, [eax+eax*2]
lea	eax, [ebx+eax*4]
mov	ebx, ecx
shr	ebx, 6
mov	edx, [edx+ebx*4]
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
fld	dword ptr [edx+ecx*4]
lea	ecx, [edx+ecx*4]
fsub	dword ptr [eax]
fmul	st, st(1)
fdiv	dword ptr [eax+8]
fadd	dword ptr [ecx]
fstp	dword ptr [ecx]
fld	dword ptr [ecx+4]
fsub	dword ptr [eax+4]
fmul	st, st(1)
fdiv	dword ptr [eax+8]
fadd	dword ptr [ecx+4]
fstp	dword ptr [ecx+4]
fadd	dword ptr [eax+8]
fstp	dword ptr [eax+8]
jmp	short loc_763783

loc_763781:
fstp	st

loc_763783:
mov	eax, [esi+38h]
mov	ecx, [eax]
mov	edx, [esi+4]
fld	dword ptr [ecx+8]
mov	eax, ecx
fstp	[esp+138h+var_128]
add	eax, 0Ch
test	edx, edx
jl	short loc_7637D5
cmp	edx, ebp
jle	short loc_7637BD
cmp	edx, edi
jnz	short loc_7637D5
fld	[esp+138h+var_128]
push	0		; char
lea	edx, [esp+13Ch+var_124]
push	edx		; int
push	ecx		; float
fstp	[esp+144h+var_144]
push	eax		; int
push	ecx		; int
mov	ecx, esi
call	sub_760FD0
jmp	short loc_7637D5

loc_7637BD:
fld	[esp+138h+var_128]
push	0		; float
lea	edx, [esp+13Ch+var_124]
push	edx		; int
push	ecx		; float
fstp	[esp+144h+var_144]
push	eax		; int
push	ecx		; int
mov	ecx, esi
call	sub_760A90

loc_7637D5:
cmp	[esi+2Ch], edi
jbe	loc_763903
mov	eax, [esi+38h]
mov	edi, [eax]
lea	ecx, [esp+138h+var_DC]
push	ecx
lea	edx, [esp+13Ch+var_124]
push	edx
lea	ebx, [edi+0Ch]
push	ebx
push	edi
mov	ecx, esi
call	sub_75FCF0
lea	eax, [esp+138h+var_DC]
push	eax
lea	ecx, [esp+13Ch+var_124]
push	ecx
lea	edx, [edi+18h]
push	edx
push	ebx
push	edi
mov	ecx, esi
call	sub_75FF40
mov	ebx, [esi+2Ch]
sub	ebx, 2
mov	edi, ebp
cmp	ebx, ebp
jbe	short loc_763878
mov	ebp, 2

loc_763821:
mov	ecx, [esi+38h]
lea	edx, [esp+138h+var_DC]
push	edx
lea	edx, [esp+13Ch+var_124]
push	edx
lea	eax, [ebp+1]
mov	edx, eax
and	eax, 3Fh
shr	edx, 6
mov	edx, [ecx+edx*4]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
push	eax
mov	edx, ebp
shr	edx, 6
mov	edx, [ecx+edx*4]
mov	eax, ebp
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
push	eax
mov	edx, edi
shr	edx, 6
mov	ecx, [ecx+edx*4]
mov	eax, edi
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
push	edx
mov	ecx, esi
call	sub_7633E0
inc	edi
inc	ebp
cmp	edi, ebx
jb	short loc_763821

loc_763878:
mov	eax, [esi+38h]
mov	edx, ebx
shr	edx, 6
mov	edx, [eax+edx*4]
mov	ecx, ebx
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
lea	ecx, [edx+ecx*4]
inc	ebx
mov	edx, ebx
shr	edx, 6
mov	edx, [eax+edx*4]
and	ebx, 3Fh
lea	ebx, [ebx+ebx*2]
fld	dword ptr [edx+ebx*4]
lea	edx, [edx+ebx*4]
fld	ds:dbl_15FCD70
fmul	st(1), st
fld	dword ptr [ecx]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+138h+var_E8]
fmul	dword ptr [edx+4]
lea	edx, [esp+138h+var_DC]
push	edx
lea	edx, [esp+13Ch+var_124]
fsub	dword ptr [ecx+4]
push	edx
lea	edx, [esp+140h+var_E8]
push	edx
fstp	[esp+144h+var_E4]
fld	dword ptr [ecx+8]
lea	ecx, [edi+1]
mov	edx, ecx
fstp	[esp+144h+var_E0]
shr	edx, 6
mov	edx, [eax+edx*4]
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
lea	ecx, [edx+ecx*4]
mov	edx, edi
push	ecx
shr	edx, 6
mov	edx, [eax+edx*4]
and	edi, 3Fh
lea	ecx, [edi+edi*2]
lea	eax, [edx+ecx*4]
push	eax
mov	ecx, esi
call	sub_7633E0

loc_763903:
mov	ecx, [esi+2Ch]
mov	edi, [esi+38h]
lea	eax, [ecx-2]
lea	edx, [esp+138h+var_124]
push	edx		; int
mov	ebx, eax
mov	edx, eax
and	edx, 3Fh
lea	edx, [edx+edx*2]
dec	ecx
push	ecx		; float
shr	ebx, 6
mov	ebx, [edi+ebx*4]
fld	dword ptr [ebx+edx*4+8]
mov	edx, ecx
shr	edx, 6
fstp	[esp+140h+var_140]
mov	edx, [edi+edx*4]
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
lea	ecx, [edx+ecx*4]
mov	edx, eax
push	ecx		; int
shr	edx, 6
mov	ecx, [edi+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
push	edx		; int
mov	ecx, esi
call	sub_762B80
mov	ecx, [esi+2Ch]
mov	edi, [esi+38h]
lea	eax, [ecx-2]
mov	ebx, eax
mov	edx, eax
and	edx, 3Fh
lea	edx, [edx+edx*2]
shr	ebx, 6
mov	ebx, [edi+ebx*4]
fld	dword ptr [ebx+edx*4+8]
mov	edx, eax
and	eax, 3Fh
fstp	[esp+138h+var_128]
shr	edx, 6
mov	edx, [edi+edx*4]
lea	eax, [eax+eax*2]
dec	ecx
lea	edx, [edx+eax*4]
mov	eax, ecx
shr	eax, 6
mov	eax, [edi+eax*4]
and	ecx, 3Fh
lea	ecx, [ecx+ecx*2]
lea	ecx, [eax+ecx*4]
mov	eax, [esi+8]
test	eax, eax
jl	short loc_7639E5
cmp	eax, 1
jle	short loc_7639CD
cmp	eax, 2
jnz	short loc_7639E5
fld	[esp+138h+var_128]
push	1		; char
lea	eax, [esp+13Ch+var_124]
push	eax		; int
push	ecx		; float
fstp	[esp+144h+var_144]
push	edx		; int
push	ecx		; int
mov	ecx, esi
call	sub_760FD0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 128h
retn

loc_7639CD:
fld	[esp+138h+var_128]
push	1		; float
lea	eax, [esp+13Ch+var_124]
push	eax		; int
push	ecx		; float
fstp	[esp+144h+var_144]
push	edx		; int
push	ecx		; int
mov	ecx, esi
call	sub_760A90

loc_7639E5:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 128h
retn
sub_763460 endp




sub_7639F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 30h
xor	eax, eax
push	ebp
mov	ebp, ecx
mov	ecx, [esp+34h+arg_0]
push	esi
lea	esi, [ebp+2Ch]
mov	[esi], eax
mov	[esi+10h], al
mov	[ebp+40h], eax
mov	[ebp+50h], eax
mov	[esp+38h+var_30], ebp
mov	[esp+38h+var_2C], eax
cmp	[ecx+18h], eax
jbe	loc_763C9F
push	ebx
push	edi
mov	edi, edi

loc_763A20:
mov	ecx, [ecx+24h]
mov	edx, eax
and	eax, 3Fh
shr	edx, 6
mov	ecx, [ecx+edx*4]
lea	eax, [eax+eax*2]
lea	edi, [ecx+eax*8]
mov	eax, [esp+40h+arg_4]
test	eax, eax
jl	short loc_763A45
cmp	[edi+14h], eax
jnz	loc_763C87

loc_763A45:
cmp	dword ptr [edi+4], 0
jz	loc_763C87
mov	eax, [esi]
test	eax, eax
jz	loc_763BC1
mov	ecx, [ebp+38h]
mov	ebx, [edi]
mov	ebx, [ebx+14h]
dec	eax
mov	edx, eax
shr	edx, 6
mov	ecx, [ecx+edx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
mov	eax, [edi+8]
mov	edx, eax
shr	edx, 8
mov	edx, [ebx+edx*4]
and	eax, 0FFh
mov	ebx, [edx+eax*8]
mov	eax, [edx+eax*8+4]
mov	[esp+40h+var_20], ebx
fld	[esp+40h+var_20]
fsub	dword ptr [ecx]
mov	[esp+40h+var_1C], eax
fstp	[esp+40h+var_24]
fld	[esp+40h+var_1C]
fsub	dword ptr [ecx+4]
fstp	[esp+40h+var_28]
fld	[esp+40h+var_28]
fld	[esp+40h+var_24]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+40h+var_24]
fld	[esp+40h+var_24]
call	__CIsqrt
fstp	[esp+40h+var_24]
fld	[esp+40h+var_24]
fcomp	ds:dbl_15FD2F0
fnstsw	ax
test	ah, 41h
jp	loc_763BA7
mov	ebx, 1
cmp	[edi+4], ebx
jbe	loc_763C87
fldz
fstp	[esp+40h+var_10]

loc_763AF1:
mov	eax, [edi+8]
mov	edx, [edi]
mov	edx, [edx+14h]
add	eax, ebx
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8]
lea	eax, [ecx+eax*8]
mov	ecx, [esi]
fstp	[esp+40h+var_18]
fld	dword ptr [eax+4]
fstp	[esp+40h+var_14]
cmp	ecx, 1
jbe	short loc_763B5F
mov	edx, [esi+0Ch]
lea	eax, [ecx-1]
mov	ebp, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	ebp, [ebp+eax*4+0]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
push	ebp
call	sub_74ABE0
test	al, al
jnz	short loc_763B5F
mov	eax, [esi]
test	eax, eax
jz	short loc_763B5F
dec	eax
mov	[esi], eax

loc_763B5F:
mov	ebp, [esi]
shr	ebp, 6
cmp	ebp, [esi+4]
jb	short loc_763B71
push	ebp
mov	ecx, esi
call	sub_74AC50

loc_763B71:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+40h+var_18]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+40h+var_14]
mov	[eax], edx
mov	edx, [esp+40h+var_10]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]
inc	ebx
cmp	ebx, [edi+4]
jb	loc_763AF1
jmp	loc_763C83

loc_763BA7:		; float
push	0
mov	ecx, esi
call	sub_74ACD0
mov	ecx, ebp
call	sub_763460
mov	dword ptr [esi], 0
mov	byte ptr [esi+10h], 0

loc_763BC1:
xor	ebx, ebx
cmp	[edi+4], ebx
jbe	loc_763C87
fldz
fstp	[esp+40h+var_4]

loc_763BD2:
mov	eax, [edi+8]
mov	edx, [edi]
mov	edx, [edx+14h]
add	eax, ebx
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
fld	dword ptr [ecx+eax*8]
lea	eax, [ecx+eax*8]
mov	ecx, [esi]
fstp	[esp+40h+var_C]
fld	dword ptr [eax+4]
fstp	[esp+40h+var_8]
cmp	ecx, 1
jbe	short loc_763C40
mov	edx, [esi+0Ch]
lea	eax, [ecx-1]
mov	ebp, eax
and	eax, 3Fh
lea	eax, [eax+eax*2]
shr	ebp, 6
mov	ebp, [edx+ebp*4]
lea	ebp, [ebp+eax*4+0]
lea	eax, [ecx-2]
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	ecx, [ecx+eax*4]
push	ebp
call	sub_74ABE0
test	al, al
jnz	short loc_763C40
mov	eax, [esi]
test	eax, eax
jz	short loc_763C40
dec	eax
mov	[esi], eax

loc_763C40:
mov	ebp, [esi]
shr	ebp, 6
cmp	ebp, [esi+4]
jb	short loc_763C52
push	ebp
mov	ecx, esi
call	sub_74AC50

loc_763C52:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+40h+var_C]
and	eax, 3Fh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+40h+var_8]
mov	[eax], edx
mov	edx, [esp+40h+var_4]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [esi]
inc	ebx
cmp	ebx, [edi+4]
jb	loc_763BD2

loc_763C83:
mov	ebp, [esp+40h+var_30]

loc_763C87:
mov	eax, [esp+40h+var_2C]
mov	ecx, [esp+40h+arg_0]
inc	eax
mov	[esp+40h+var_2C], eax
cmp	eax, [ecx+18h]
jb	loc_763A20
pop	edi
pop	ebx

loc_763C9F:
cmp	dword ptr [esi], 1
jbe	short loc_763CB4
push	0		; float
mov	ecx, esi
call	sub_74ACD0
mov	ecx, ebp
call	sub_763460

loc_763CB4:
pop	esi
pop	ebp
add	esp, 30h
retn	8
sub_7639F0 endp

align 10h



sub_763CC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	edx, [esp+4+arg_0]
mov	eax, [edx]
push	ebx
push	ebp
push	esi
mov	esi, [ecx]
mov	ecx, [esi+0Ch]
push	edi
mov	edi, eax
and	eax, 0FFh
lea	eax, [eax+eax*2]
shr	edi, 8
mov	edi, [ecx+edi*4]
mov	ebx, [edi+eax*4+8]
mov	eax, [edx+4]
mov	edi, eax
and	eax, 0FFh
lea	eax, [eax+eax*2]
shr	edi, 8
mov	edi, [ecx+edi*4]
mov	eax, [edi+eax*4+8]
mov	edi, [esp+14h+arg_4]
mov	[esp+14h+var_4], eax
mov	eax, [edi]
mov	ebp, eax
and	eax, 0FFh
shr	ebp, 8
mov	ebp, [ecx+ebp*4]
lea	eax, [eax+eax*2]
mov	eax, [ebp+eax*4+8]
mov	[esp+14h+arg_0], eax
mov	eax, [edi+4]
mov	ebp, eax
and	eax, 0FFh
shr	ebp, 8
mov	ecx, [ecx+ebp*4]
lea	eax, [eax+eax*2]
mov	eax, [ecx+eax*4+8]
mov	ecx, [esp+14h+arg_0]
cmp	ebx, ecx
jz	short loc_763D4B
pop	edi
pop	esi
xor	eax, eax
cmp	ebx, ecx
pop	ebp
setl	al
pop	ebx
pop	ecx
retn	8

loc_763D4B:
mov	ecx, [esp+14h+var_4]
cmp	ecx, eax
jz	short loc_763D64
pop	edi
xor	edx, edx
cmp	ecx, eax
pop	esi
setl	dl
pop	ebp
mov	al, dl
pop	ebx
pop	ecx
retn	8

loc_763D64:
mov	ecx, [edi+8]
mov	eax, [edx+8]
mov	esi, [esi+0Ch]
mov	edi, eax
mov	edx, ecx
and	eax, 0FFh
shr	edx, 8
mov	edx, [esi+edx*4]
shr	edi, 8
mov	esi, [esi+edi*4]
and	ecx, 0FFh
lea	eax, [eax+eax*2]
mov	eax, [esi+eax*4+8]
xor	ebx, ebx
lea	ecx, [ecx+ecx*2]
cmp	eax, [edx+ecx*4+8]
pop	edi
pop	esi
setl	bl
pop	ebp
mov	al, bl
pop	ebx
pop	ecx
retn	8
sub_763CC0 endp

align 10h



; int __stdcall	sub_763DB0(float, float, int, int, int,	int)
sub_763DB0 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	qword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	qword ptr -38h
var_30=	qword ptr -30h
var_28=	dword ptr -28h
var_24=	qword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 6Ch
mov	edx, [ecx+48h]
mov	eax, [esp+6Ch+arg_8]
push	ebx
mov	[esp+70h+var_3C], edx
push	ebp
push	esi
mov	esi, eax
and	eax, 3Fh
shr	esi, 6
mov	edx, [edx+esi*4]
mov	eax, [edx+eax*4]
mov	esi, [ecx+2Ch]
mov	edx, eax
shr	edx, 2
push	edi
mov	edi, edx
shr	edx, 8
mov	edx, [esi+edx*4]
mov	ebx, eax
and	edi, 0FFh
and	ebx, 3
mov	ebp, edi
shl	ebp, 4
sub	ebp, edi
mov	edi, [ecx+0Ch]
add	ebp, ds:dword_1441220[ebx*4]
mov	edx, [edx+ebp*4]
mov	ecx, edx
shr	ecx, 8
mov	ecx, [edi+ecx*4]
and	edx, 0FFh
lea	edx, [edx+edx*2]
lea	ecx, [ecx+edx*4]
mov	edx, [ecx]
mov	dword ptr [esp+7Ch+var_30], edx
mov	edx, [ecx+4]
mov	ecx, [ecx+8]
mov	[esp+7Ch+var_28], ecx
mov	ecx, eax
shr	ecx, 2
mov	dword ptr [esp+7Ch+var_30+4], edx
mov	edx, ecx
and	edx, 0FFh
mov	ebx, edx
and	eax, 3
shr	ecx, 8
shl	ebx, 4
sub	ebx, edx
add	ebx, ds:dword_1441224[eax*4]
mov	edx, [esi+ecx*4]
mov	eax, [edx+ebx*4]
mov	ecx, eax
and	eax, 0FFh
shr	ecx, 8
lea	edx, [eax+eax*2]
mov	eax, [edi+ecx*4]
mov	ecx, [eax+edx*4]
lea	eax, [eax+edx*4]
mov	edx, [eax+4]
mov	eax, [eax+8]
mov	[esp+7Ch+var_18], ecx
mov	[esp+7Ch+var_10], eax
mov	eax, [esp+7Ch+arg_C]
mov	ecx, eax
mov	[esp+7Ch+var_14], edx
mov	edx, [esp+7Ch+var_3C]
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
mov	eax, [ecx+eax*4]
mov	ecx, eax
shr	ecx, 2
mov	edx, ecx
and	edx, 0FFh
mov	ebp, edx
shl	ebp, 4
mov	ebx, eax
and	ebx, 3
sub	ebp, edx
add	ebp, ds:dword_1441220[ebx*4]
shr	ecx, 8
mov	edx, [esi+ecx*4]
fld	[esp+7Ch+var_18]
mov	ecx, [edx+ebp*4]
fsub	dword ptr [esp+7Ch+var_30]
mov	edx, ecx
and	ecx, 0FFh
shr	edx, 8
fstp	[esp+7Ch+arg_C]
mov	edx, [edi+edx*4]
fld	[esp+7Ch+var_14]
fsub	dword ptr [esp+7Ch+var_30+4]
lea	ecx, [ecx+ecx*2]
lea	ecx, [edx+ecx*4]
mov	edx, [ecx]
mov	dword ptr [esp+7Ch+var_24], edx
fst	[esp+7Ch+var_38]
mov	edx, [ecx+4]
fstp	[esp+7Ch+arg_8]
mov	ecx, [ecx+8]
fld	[esp+7Ch+arg_8]
fld	[esp+7Ch+arg_C]
mov	[esp+7Ch+var_1C], ecx
mov	ecx, eax
fmul	st, st
shr	ecx, 2
fld	st(1)
mov	dword ptr [esp+7Ch+var_24+4], edx
fmulp	st(2), st
mov	edx, ecx
and	edx, 0FFh
mov	ebx, edx
faddp	st(1), st
and	eax, 3
shl	ebx, 4
sub	ebx, edx
fstp	[esp+7Ch+arg_8]
add	ebx, ds:dword_1441224[eax*4]
fld	[esp+7Ch+arg_8]
shr	ecx, 8
mov	edx, [esi+ecx*4]
mov	eax, [edx+ebx*4]
mov	ecx, eax
and	eax, 0FFh
lea	edx, [eax+eax*2]
shr	ecx, 8
mov	eax, [edi+ecx*4]
mov	ecx, [eax+edx*4]
lea	eax, [eax+edx*4]
mov	edx, [eax+4]
mov	eax, [eax+8]
mov	[esp+7Ch+var_C], ecx
mov	[esp+7Ch+var_8], edx
mov	[esp+7Ch+var_4], eax
call	__CIsqrt
fstp	[esp+7Ch+arg_8]
fld	[esp+7Ch+arg_8]
fstp	[esp+7Ch+arg_8]
fld	[esp+7Ch+var_C]
fsub	dword ptr [esp+7Ch+var_24]
fstp	[esp+7Ch+var_3C]
fld	[esp+7Ch+var_8]
fsub	dword ptr [esp+7Ch+var_24+4]
fst	[esp+7Ch+var_44]
fstp	[esp+7Ch+arg_C]
fld	[esp+7Ch+arg_C]
fld	[esp+7Ch+var_3C]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+7Ch+arg_C]
fld	[esp+7Ch+arg_C]
call	__CIsqrt
fstp	[esp+7Ch+arg_C]
fld	[esp+7Ch+arg_C]
fstp	[esp+7Ch+var_50]
fld	[esp+7Ch+arg_0]
fld	[esp+7Ch+var_38]
fmul	st, st(1)
fld	[esp+7Ch+arg_8]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+arg_C]
fld	dword ptr [esp+7Ch+var_30]
fld	st
fld	[esp+7Ch+var_18]
fld	st
fsubp	st(2), st
fld	st(4)
fmulp	st(2), st
fld	st(3)
fdivp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+arg_0]
fld	st(3)
fmul	[esp+7Ch+var_44]
fld	[esp+7Ch+var_50]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+var_3C]
fld	dword ptr [esp+7Ch+var_24]
fld	[esp+7Ch+var_C]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(6), st
fld	st(1)
fdivp	st(6), st
fxch	st(5)
fstp	[esp+7Ch+var_54]
fld	[esp+7Ch+arg_C]
fld	st
faddp	st(4), st
fxch	st(3)
fstp	[esp+7Ch+var_6C]
fld	[esp+7Ch+arg_0]
fld	st
fadd	dword ptr [esp+7Ch+var_30+4]
fstp	[esp+7Ch+arg_C]
fld	st(2)
faddp	st(4), st
fxch	st(3)
fstp	[esp+7Ch+var_4C]
fld	[esp+7Ch+var_4C]
fstp	[esp+7Ch+var_64]
fld	[esp+7Ch+var_14]
faddp	st(3), st
fxch	st(2)
fstp	[esp+7Ch+var_48]
fld	[esp+7Ch+var_48]
fstp	[esp+7Ch+var_5C]
fld	dword ptr [esp+7Ch+var_24]
fld	[esp+7Ch+var_3C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [esp+7Ch+var_44]
fld	dword ptr [esp+7Ch+var_44]
fstp	[esp+7Ch+var_68]
fld	[esp+7Ch+var_54]
fld	st
fadd	dword ptr [esp+7Ch+var_24+4]
fstp	[esp+7Ch+var_3C]
fld	[esp+7Ch+var_3C]
fstp	[esp+7Ch+arg_0]
fxch	st(5)
faddp	st(1), st
fstp	[esp+7Ch+var_60]
fld	[esp+7Ch+var_8]
faddp	st(4), st
fxch	st(3)
fstp	[esp+7Ch+var_58]
fld	[esp+7Ch+var_64]
fsub	[esp+7Ch+var_6C]
fld	[esp+7Ch+var_58]
fsub	[esp+7Ch+arg_0]
fld	[esp+7Ch+var_5C]
fsub	[esp+7Ch+arg_C]
fst	[esp+7Ch+var_24]
fld	[esp+7Ch+var_60]
fsub	[esp+7Ch+var_68]
fst	[esp+7Ch+var_30]
fld	st(2)
fmul	st, st(4)
fxch	st(1)
fmulp	st(2), st
fsubrp	st(1), st
fstp	[esp+7Ch+var_54]
fld	[esp+7Ch+var_54]
fabs
fstp	dword ptr [esp+7Ch+var_38]
fld	dword ptr [esp+7Ch+var_38]
fld	st(3)
fadd	st, st(5)
fmul	ds:dbl_15FCCB0
fstp	dword ptr [esp+7Ch+var_38]
fld	dword ptr [esp+7Ch+var_38]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_7641D4
fstp	st(4)
mov	ecx, [esp+7Ch+arg_10]
fstp	st
mov	edx, [esp+7Ch+arg_14]
fstp	st(2)
fld	[esp+7Ch+var_6C]
fld	ds:dbl_15FD2F8
fmul	st(1), st
fld	[esp+7Ch+var_64]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+7Ch+var_68]
fmul	st, st(1)
faddp	st(2), st
fld	[esp+7Ch+var_60]
fmul	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [ecx]
fld	[esp+7Ch+arg_C]
fmul	st, st(1)
fld	[esp+7Ch+var_5C]
fmul	st, st(2)
faddp	st(1), st
fld	[esp+7Ch+arg_0]
fmul	st, st(2)
faddp	st(1), st
fld	[esp+7Ch+var_58]
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [edx]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_764340
fld	[esp+7Ch+var_4C]
pop	edi
pop	esi
fstp	dword ptr [ecx]
fld	[esp+74h+var_48]
pop	ebp
fstp	dword ptr [edx]
pop	ebx
add	esp, 6Ch
retn	18h

loc_7641D4:
fstp	st(3)
mov	esi, [esp+7Ch+arg_10]
fstp	st(1)
mov	edi, [esp+7Ch+arg_14]
fld	[esp+7Ch+arg_C]
fld	st
fsub	[esp+7Ch+arg_0]
fmul	[esp+7Ch+var_30]
fld	[esp+7Ch+var_6C]
fld	st
fsub	[esp+7Ch+var_68]
fmulp	st(5), st
fxch	st(1)
fsubrp	st(4), st
fxch	st(3)
fstp	[esp+7Ch+arg_C]
fld	[esp+7Ch+arg_C]
fdiv	[esp+7Ch+var_54]
fstp	[esp+7Ch+arg_C]
fld	[esp+7Ch+arg_C]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(3), st
fxch	st(2)
fstp	dword ptr [esi]
fmul	[esp+7Ch+var_24]
faddp	st(1), st
fstp	[esp+7Ch+arg_10]
fld	[esp+7Ch+arg_10]
fst	dword ptr [edi]
fld	dword ptr [esi]
fsubp	st(2), st
fxch	st(1)
fstp	[esp+7Ch+arg_14]
fsubr	[esp+7Ch+var_14]
fstp	[esp+7Ch+arg_10]
fld	[esp+7Ch+arg_10]
fld	[esp+7Ch+arg_14]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+7Ch+arg_10]
fld	[esp+7Ch+arg_10]
call	__CIsqrt
fstp	[esp+7Ch+arg_10]
fld	[esp+7Ch+arg_10]
fstp	[esp+7Ch+arg_10]
fld	[esp+7Ch+arg_8]
fld	[esp+7Ch+var_50]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7642CA
fstp	st(1)
fstp	[esp+7Ch+arg_8]
fld	[esp+7Ch+arg_8]
jmp	short loc_7642CC

loc_7642CA:
fstp	st

loc_7642CC:
fld	[esp+7Ch+arg_4]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_7642EE
fstp	st
fstp	[esp+7Ch+arg_4]
fld	[esp+7Ch+arg_4]
jmp	short loc_7642F0

loc_7642EE:
fstp	st(1)

loc_7642F0:
fld	[esp+7Ch+arg_10]
fcom	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_764356
fdivp	st(1), st
fstp	[esp+7Ch+arg_4]
fld	dword ptr [esi]
fld	[esp+7Ch+var_18]
fld	st
fsubp	st(2), st
fld	[esp+7Ch+arg_4]
fld	st
fmulp	st(3), st
fxch	st(2)
faddp	st(1), st
fstp	dword ptr [esi]
fld	dword ptr [edi]
fld	[esp+7Ch+var_14]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [edi]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 6Ch
retn	18h

loc_764340:
fld	dword ptr [esp+7Ch+var_44]
pop	edi
pop	esi
fstp	dword ptr [ecx]
fld	[esp+74h+var_3C]
pop	ebp
fstp	dword ptr [edx]
pop	ebx
add	esp, 6Ch
retn	18h

loc_764356:
pop	edi
fstp	st
pop	esi
fstp	st
pop	ebp
pop	ebx
add	esp, 6Ch
retn	18h
sub_763DB0 endp

align 10h



sub_764370 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
mov	edx, [ecx+0Ch]
push	esi
mov	esi, [esp+1Ch+arg_8]
mov	eax, ds:dword_1441224[esi*4]
push	edi
mov	edi, [esp+20h+arg_4]
mov	eax, [edi+eax*4+0Ch]
mov	ecx, eax
and	eax, 0FFh
lea	eax, [eax+eax*2]
shr	ecx, 8
mov	ecx, [edx+ecx*4]
lea	ecx, [ecx+eax*4]
mov	eax, ds:dword_1441228[esi*4]
mov	eax, [edi+eax*4+0Ch]
mov	esi, eax
shr	esi, 8
mov	edx, [edx+esi*4]
mov	esi, [esp+20h+arg_C]
and	eax, 0FFh
lea	eax, [eax+eax*2]
fld	dword ptr [edx+eax*4]
lea	edx, [edx+eax*4]
fsub	dword ptr [ecx]
fld	dword ptr [ecx+4]
fsub	dword ptr [esi+4]
fmulp	st(1), st
fld	dword ptr [edx+4]
fsub	dword ptr [ecx+4]
fld	dword ptr [ecx]
fsub	dword ptr [esi]
fmulp	st(1), st
fsubp	st(1), st
fstp	[esp+20h+arg_8]
fld	[esp+20h+arg_8]
fcomp	ds:dbl_1441238
fnstsw	ax
test	ah, 5
jnp	loc_764579
mov	edi, [esp+20h+arg_0]
fld	dword ptr [edi]
fstp	[esp+20h+arg_0]
fld	dword ptr [edi+4]
fstp	dword ptr [esp+20h+var_10]
fld	dword ptr [esi]
fstp	[esp+20h+arg_C]
fld	dword ptr [esi+4]
fstp	[esp+20h+var_14]
fld	dword ptr [ecx]
fstp	[esp+20h+arg_4]
fld	dword ptr [ecx+4]
fstp	[esp+20h+arg_8]
fld	dword ptr [edx]
fstp	dword ptr [esp+20h+var_8]
fld	dword ptr [edx+4]
fstp	[esp+20h+var_18]
fld	[esp+20h+arg_C]
fld	[esp+20h+arg_0]
fld	st
fsubp	st(2), st
fld	[esp+20h+var_18]
fsub	[esp+20h+arg_8]
fld	[esp+20h+var_14]
fld	dword ptr [esp+20h+var_10]
fld	st
fsubp	st(2), st
fxch	st(1)
fst	[esp+20h+var_10]
fld	dword ptr [esp+20h+var_8]
fsub	[esp+20h+arg_4]
fst	[esp+20h+var_8]
fld	st(3)
fmul	st, st(6)
fxch	st(1)
fmulp	st(2), st
fsubrp	st(1), st
fstp	[esp+20h+arg_C]
fld	[esp+20h+arg_C]
fabs
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	dword ptr [edi]
fsub	dword ptr [esi]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fabs
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fld	dword ptr [edi+4]
fsub	dword ptr [esi+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fabs
fstp	[esp+20h+arg_0]
fadd	[esp+20h+arg_0]
fld	dword ptr [ecx]
fsub	dword ptr [edx]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fabs
fstp	[esp+20h+arg_0]
fadd	[esp+20h+arg_0]
fld	dword ptr [ecx+4]
fsub	dword ptr [edx+4]
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fabs
fstp	[esp+20h+arg_0]
fadd	[esp+20h+arg_0]
fmul	ds:dbl_15FCCB0
fstp	[esp+20h+arg_0]
fld	[esp+20h+arg_0]
fcompp
fnstsw	ax
test	ah, 41h
jz	loc_764571
fld	st
fsub	[esp+20h+arg_8]
fmul	[esp+20h+var_8]
fld	st(3)
fsub	[esp+20h+arg_4]
fmulp	st(3), st
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+20h+arg_8]
fld	[esp+20h+arg_8]
fdiv	[esp+20h+arg_C]
fstp	[esp+20h+arg_8]
fld	[esp+20h+arg_8]
fld	st
fmulp	st(4), st
fxch	st(3)
faddp	st(2), st
fxch	st(1)
fstp	[esp+20h+arg_4]
fxch	st(1)
fmul	[esp+20h+var_10]
faddp	st(1), st
fstp	[esp+20h+arg_8]
fld	dword ptr [edi+4]
fld	[esp+20h+arg_8]
fld	st
fsubp	st(2), st
fld	ds:dbl_15FD2F8
fmul	st(2), st
fxch	st(2)
faddp	st(1), st
fstp	[esp+20h+arg_8]
fld	dword ptr [edi]
pop	edi
fld	[esp+1Ch+arg_4]
fld	st
fsubp	st(2), st
fxch	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	dword ptr [esi]
fld	[esp+1Ch+arg_8]
fstp	dword ptr [esi+4]
pop	esi
add	esp, 18h
retn	14h

loc_764571:
fstp	st(2)
fstp	st(1)
fstp	st(1)
fstp	st

loc_764579:
pop	edi
pop	esi
add	esp, 18h
retn	14h
sub_764370 endp

align 10h



; int __stdcall	sub_764590(int,	float, float)
sub_764590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [ecx+78h]
push	esi
mov	esi, [ecx]
push	edi
cmp	esi, ebp
jbe	short loc_7645F5
mov	edi, [ecx+0Ch]
fld	[esp+10h+arg_8]
fld	[esp+10h+arg_4]
mov	ebx, [esp+10h+arg_0]
lea	ecx, [esi-1]

loc_7645AF:
mov	edx, ecx
shr	edx, 8
mov	edx, [edi+edx*4]
mov	eax, ecx
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	edx, [edx+eax*4]
mov	eax, [edx+8]
and	eax, offset sub_FFFFFF
cmp	eax, ebx
jnz	short loc_7645EB
fld	dword ptr [edx]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7645EB
fld	dword ptr [edx+4]
fld	st(2)
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_7645FF

loc_7645EB:
dec	esi
dec	ecx
cmp	esi, ebp
ja	short loc_7645AF
fstp	st(1)
fstp	st

loc_7645F5:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	0Ch

loc_7645FF:
pop	edi
fstp	st(1)
lea	eax, [esi-1]
fstp	st
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_764590 endp

align 10h



sub_764610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [ecx]
mov	[esp+4+var_4], ecx
test	edx, edx
jz	short loc_764663
mov	eax, [esp+4+arg_0]
inc	eax
cmp	eax, edx
jnb	short loc_764661
push	ebx
push	ebp
push	esi
lea	edx, [eax-1]
push	edi
lea	ebx, [ebx+0]

loc_764630:
mov	ecx, [ecx+0Ch]
mov	esi, eax
shr	esi, 6
mov	esi, [ecx+esi*4]
mov	edi, eax
mov	ebx, edx
and	edi, 3Fh
mov	esi, [esi+edi*4]
shr	ebx, 6
mov	ecx, [ecx+ebx*4]
mov	ebp, edx
and	ebp, 3Fh
mov	[ecx+ebp*4], esi
mov	ecx, [esp+14h+var_4]
inc	eax
inc	edx
cmp	eax, [ecx]
jb	short loc_764630
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_764661:
dec	dword ptr [ecx]

loc_764663:
pop	ecx
retn	4
sub_764610 endp

align 10h



sub_764670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_7646CD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_7646C9
mov	ecx, dword_1855FC0
add	eax, eax
add	eax, eax
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 88h
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_7646C9:
xor	eax, eax
mov	[esi], eax

loc_7646CD:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_764670 endp

align 10h



sub_7646E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_764731
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_764710
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_76472A

loc_764710:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 88h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_76472A:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_764731:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 88h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	3000h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_7646E0 endp

align 10h



sub_764760 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_7647B1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_764790
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_7647AA

loc_764790:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 88h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_7647AA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_7647B1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 88h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	3C00h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_764760 endp

align 10h



sub_7647E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_76482E
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_764810
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_764827

loc_764810:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 88h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_764827:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_76482E:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 88h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	100h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_7647E0 endp

align 10h



sub_764860 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_7648B1
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_764890
push	ebp
mov	ebp, [ecx]
lea	eax, ds:100h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_7648AA

loc_764890:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 88h
mov	edx, [ecx]
mov	edx, [edx+38h]
push	100h
push	esi
call	edx

loc_7648AA:
add	dword ptr [esi+8], 40h
mov	[esi+0Ch], eax

loc_7648B1:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 88h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0C00h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_764860 endp

align 10h



sub_7648E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx]
dec	eax
xor	ecx, ecx
test	eax, eax
jle	short loc_764926
push	ebp
push	esi
push	edi

loc_7648F1:
mov	edx, [ebx+0Ch]
mov	esi, eax
shr	esi, 6
mov	esi, [edx+esi*4]
mov	edi, eax
and	edi, 3Fh
lea	esi, [esi+edi*4]
mov	edi, ecx
shr	edi, 6
mov	edx, [edx+edi*4]
mov	ebp, ecx
and	ebp, 3Fh
mov	edi, [edx+ebp*4]
lea	edx, [edx+ebp*4]
mov	ebp, [esi]
inc	ecx
dec	eax
cmp	ecx, eax
mov	[edx], ebp
mov	[esi], edi
jl	short loc_7648F1
pop	edi
pop	esi
pop	ebp

loc_764926:
pop	ebx
retn
sub_7648E0 endp

align 10h



sub_764930 proc	near

var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h

sub	esp, 15Ch
push	esi
mov	esi, [esp+160h+arg_8]
push	edi
mov	edi, [esp+164h+arg_4]
mov	eax, esi
sub	eax, edi
cmp	eax, 2
jb	loc_764CD2
push	ebx
mov	ebx, [esp+168h+arg_0]
push	ebp
lea	ecx, [esp+16Ch+var_140]
mov	[esp+16Ch+var_154], esi

loc_764964:
mov	[esp+16Ch+var_14C], edi

loc_764968:
mov	eax, esi
sub	eax, edi
cmp	eax, 9
mov	[esp+16Ch+var_150], ecx
jle	loc_764C18
mov	ecx, [ebx]
cdq
sub	eax, edx
mov	edx, [ecx+edi*4]
sar	eax, 1
add	eax, edi
mov	ebp, [ecx+eax*4]
mov	[ecx+edi*4], ebp
lea	eax, [ecx+eax*4]
mov	[eax], edx
mov	edx, [ebx]
lea	ecx, [esi-1]
mov	esi, [esp+16Ch+arg_10]
mov	esi, [esi+0Ch]
mov	[esp+16Ch+var_158], ecx
mov	ecx, [edx+ecx*4]
mov	ebp, ecx
shr	ebp, 0Ah
mov	ebp, [esi+ebp*4]
lea	eax, [edi+1]
and	ecx, 3FFh
mov	[esp+16Ch+var_15C], eax
mov	eax, [edx+eax*4]
lea	ecx, [ecx+ecx*2]
lea	ecx, [ebp+ecx*4+0]
mov	ebp, eax
shr	ebp, 0Ah
mov	esi, [esi+ebp*4]
and	eax, 3FFh
lea	eax, [eax+eax*2]
mov	ebp, [esi+eax*4]
lea	eax, [esi+eax*4]
mov	esi, [ecx]
cmp	esi, ebp
jnz	short loc_7649E7
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]

loc_7649E7:
mov	ebp, [esp+16Ch+var_15C]
setb	al
test	al, al
jz	short loc_764A02
mov	eax, [esp+16Ch+var_158]
mov	esi, [edx+ebp*4]
mov	ecx, [edx+eax*4]
mov	[edx+eax*4], esi
mov	[edx+ebp*4], ecx

loc_764A02:
mov	ecx, [ebx]
mov	eax, [ecx+ebp*4]
mov	ecx, [ecx+edi*4]
mov	edx, [esp+16Ch+arg_10]
mov	edx, [edx+0Ch]
mov	esi, ecx
shr	esi, 0Ah
mov	esi, [edx+esi*4]
and	ecx, 3FFh
lea	ecx, [ecx+ecx*2]
lea	ecx, [esi+ecx*4]
mov	esi, eax
shr	esi, 0Ah
mov	edx, [edx+esi*4]
and	eax, 3FFh
lea	eax, [eax+eax*2]
mov	esi, [edx+eax*4]
lea	eax, [edx+eax*4]
mov	edx, [ecx]
cmp	edx, esi
jnz	short loc_764A4A
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]

loc_764A4A:
setb	al
test	al, al
jz	short loc_764A5F
mov	eax, [ebx]
mov	edx, [eax+ebp*4]
mov	ecx, [eax+edi*4]
mov	[eax+edi*4], edx
mov	[eax+ebp*4], ecx

loc_764A5F:
mov	ecx, [ebx]
mov	eax, [ecx+edi*4]
mov	edx, [esp+16Ch+var_158]
mov	ecx, [ecx+edx*4]
mov	edx, [esp+16Ch+arg_10]
mov	edx, [edx+0Ch]
mov	esi, ecx
shr	esi, 0Ah
mov	esi, [edx+esi*4]
and	ecx, 3FFh
lea	ecx, [ecx+ecx*2]
lea	ecx, [esi+ecx*4]
mov	esi, eax
shr	esi, 0Ah
mov	edx, [edx+esi*4]
and	eax, 3FFh
lea	eax, [eax+eax*2]
mov	esi, [edx+eax*4]
lea	eax, [edx+eax*4]
mov	edx, [ecx]
cmp	edx, esi
jnz	short loc_764AAB
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]

loc_764AAB:
setb	al
test	al, al
jz	short loc_764AC4
mov	eax, [ebx]
mov	ecx, [esp+16Ch+var_158]
mov	esi, [eax+edi*4]
mov	edx, [eax+ecx*4]
mov	[eax+ecx*4], esi
mov	[eax+edi*4], edx

loc_764AC4:
mov	ebx, [ebx]
mov	ecx, [ebx+edi*4]
mov	edx, [esp+16Ch+arg_10]
mov	edi, [edx+0Ch]
mov	edx, ecx
shr	edx, 0Ah
mov	edx, [edi+edx*4]
mov	eax, ecx
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	[esp+16Ch+var_148], eax
mov	eax, [eax]
mov	[esp+16Ch+var_144], eax
lea	esi, [ebx+ebp*4]
jmp	short loc_764B04
jmp	short loc_764B00
align 10h

loc_764B00:
mov	ebp, [esp+16Ch+var_15C]

loc_764B04:
mov	eax, [esi+4]
add	esi, 4
mov	edx, eax
shr	edx, 0Ah
mov	edx, [edi+edx*4]
and	eax, 3FFh
inc	ebp
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	edx, [eax]
mov	[esp+16Ch+var_15C], ebp
mov	ebp, [esp+16Ch+var_144]
cmp	edx, ebp
jnz	short loc_764B36
mov	eax, [eax+4]
mov	edx, [esp+16Ch+var_148]
cmp	eax, [edx+4]

loc_764B36:
setb	al
test	al, al
jnz	short loc_764B00
mov	eax, [esp+16Ch+arg_10]
mov	edi, [eax+0Ch]
mov	esi, [esp+16Ch+var_158]
mov	edx, ecx
shr	edx, 0Ah
and	ecx, 3FFh
lea	eax, [ecx+ecx*2]
mov	ecx, [edi+edx*4]
mov	ebp, [ecx+eax*4]
lea	eax, [ecx+eax*4]
mov	[esp+16Ch+var_148], eax
lea	edx, [ebx+esi*4]
lea	esp, [esp+0]

loc_764B70:
mov	eax, [edx-4]
sub	edx, 4
mov	ecx, eax
shr	ecx, 0Ah
mov	ecx, [edi+ecx*4]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
dec	esi
cmp	ebp, ecx
jnz	short loc_764B9A
mov	ecx, [esp+16Ch+var_148]
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]

loc_764B9A:
setb	al
test	al, al
jnz	short loc_764B70
mov	ebp, [esp+16Ch+var_15C]
cmp	ebp, esi
mov	edi, [esp+16Ch+var_14C]
mov	[esp+16Ch+var_158], esi
jg	short loc_764BC9
mov	edx, [ebx+esi*4]
mov	eax, [ebx+ebp*4]
mov	[ebx+ebp*4], edx
mov	[ebx+esi*4], eax
mov	ebx, [esp+16Ch+arg_0]
jmp	loc_764AC4

loc_764BC9:
mov	ebx, [esp+16Ch+arg_0]
mov	eax, [ebx]
mov	edx, [eax+esi*4]
mov	ecx, [eax+edi*4]
mov	[eax+edi*4], edx
mov	[eax+esi*4], ecx
mov	eax, [esp+16Ch+var_154]
mov	ecx, eax
mov	edx, esi
sub	ecx, ebp
sub	edx, edi
cmp	edx, ecx
mov	ecx, [esp+16Ch+var_150]
jle	short loc_764C07
mov	[ecx], edi
mov	[ecx+4], esi
mov	edi, ebp
mov	[esp+16Ch+var_14C], edi
add	ecx, 8
mov	esi, eax
jmp	loc_764968

loc_764C07:
mov	[ecx], ebp
mov	[ecx+4], eax
mov	[esp+16Ch+var_154], esi
add	ecx, 8
jmp	loc_764968

loc_764C18:
lea	edx, [edi+1]
cmp	edx, esi
mov	eax, edi
mov	[esp+16Ch+var_158], eax
mov	[esp+16Ch+var_15C], edx
jge	loc_764CB4
lea	ecx, [ecx+0]

loc_764C30:
mov	ecx, [ebx]
mov	esi, [esp+16Ch+arg_10]
mov	esi, [esi+0Ch]
lea	edx, [ecx+eax*4]
mov	ecx, [edx+4]
mov	eax, [edx]
mov	ebp, ecx
shr	ebp, 0Ah
mov	ebp, [esi+ebp*4]
and	ecx, 3FFh
lea	ecx, [ecx+ecx*2]
lea	ecx, [ebp+ecx*4+0]
mov	ebp, eax
shr	ebp, 0Ah
mov	esi, [esi+ebp*4]
and	eax, 3FFh
lea	eax, [eax+eax*2]
mov	ebp, [esi+eax*4]
lea	eax, [esi+eax*4]
mov	esi, [ecx]
cmp	esi, ebp
jnz	short loc_764C7B
mov	ecx, [ecx+4]
cmp	ecx, [eax+4]

loc_764C7B:
setb	al
test	al, al
jz	short loc_764C9B
mov	eax, [edx+4]
mov	ecx, [edx]
mov	[edx+4], ecx
mov	[edx], eax
mov	eax, [esp+16Ch+var_158]
cmp	eax, edi
jz	short loc_764C9B
dec	eax
mov	[esp+16Ch+var_158], eax
jmp	short loc_764C30

loc_764C9B:
mov	ecx, [esp+16Ch+var_15C]
mov	eax, ecx
inc	ecx
cmp	ecx, [esp+16Ch+var_154]
mov	[esp+16Ch+var_158], eax
mov	[esp+16Ch+var_15C], ecx
jl	short loc_764C30
mov	ecx, [esp+16Ch+var_150]

loc_764CB4:
lea	edx, [esp+16Ch+var_140]
cmp	ecx, edx
jbe	short loc_764CD0
mov	eax, [ecx-4]
mov	edi, [ecx-8]
sub	ecx, 8
mov	[esp+16Ch+var_154], eax
mov	esi, eax
jmp	loc_764964

loc_764CD0:
pop	ebp
pop	ebx

loc_764CD2:
pop	edi
pop	esi
add	esp, 15Ch
retn
sub_764930 endp

align 10h



sub_764CE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_14=	dword ptr  18h

push	ecx
push	ebx
mov	ebx, [esp+8+arg_8]
push	ebp
mov	ebp, [esp+0Ch+arg_4]
sub	ebx, ebp
test	ebx, ebx
jle	short loc_764D68
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax]
mov	edx, [esp+0Ch+arg_14]
mov	eax, [edx+0Ch]
mov	[esp+0Ch+arg_4], ecx
mov	ecx, [esp+0Ch+arg_C]
mov	edx, [ecx]
push	esi
mov	[esp+10h+arg_8], eax
mov	[esp+10h+var_4], edx
push	edi

loc_764D12:
mov	eax, [esp+14h+arg_4]
mov	esi, [esp+14h+arg_8]
mov	edx, ebx
sar	edx, 1
lea	edi, [edx+ebp]
mov	ecx, [eax+edi*4]
mov	eax, ecx
shr	eax, 0Ah
mov	eax, [esi+eax*4]
and	ecx, 3FFh
lea	ecx, [ecx+ecx*2]
mov	esi, [eax+ecx*4]
lea	ecx, [eax+ecx*4]
mov	eax, [esp+14h+var_4]
cmp	esi, eax
jnz	short loc_764D4D
mov	ecx, [ecx+4]
mov	eax, [esp+14h+arg_C]
cmp	ecx, [eax+4]

loc_764D4D:
setb	al
test	al, al
jz	short loc_764D60
or	ecx, 0FFFFFFFFh
sub	ecx, edx
lea	ebp, [edi+1]
add	ebx, ecx
jmp	short loc_764D62

loc_764D60:
mov	ebx, edx

loc_764D62:
test	ebx, ebx
jg	short loc_764D12
pop	edi
pop	esi

loc_764D68:
mov	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn
sub_764CE0 endp

align 10h



sub_764D70 proc	near

var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_178= dword ptr -178h
var_174= dword ptr -174h
var_168= dword ptr -168h
var_15C= dword ptr -15Ch
var_150= dword ptr -150h
var_144= dword ptr -144h
var_140= byte ptr -140h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	eax, [esp+arg_8]
sub	esp, 1ACh
push	ebp
mov	ebp, [esp+1B0h+arg_4]
mov	ecx, eax
sub	ecx, ebp
cmp	ecx, 2
jb	loc_765220
push	ebx
push	esi
lea	ecx, [esp+1B8h+var_140]
mov	[esp+1B8h+var_1A4], ebp
mov	[esp+1B8h+var_1A0], eax
push	edi

loc_764D9E:
mov	[esp+1BCh+var_1A8], ecx

loc_764DA2:
mov	edx, [esp+1BCh+var_1A0]
mov	eax, edx
sub	eax, ebp
cmp	eax, 9
jle	loc_7650EC
cdq
sub	eax, edx
mov	edx, [esp+1BCh+arg_0]
mov	edi, [edx+0Ch]
sar	eax, 1
add	eax, ebp
mov	ecx, eax
and	eax, 0FFh
lea	edx, [eax+eax*2]
shr	ecx, 8
mov	eax, [edi+ecx*4]
mov	ebx, [eax+edx*4]
lea	ecx, [eax+edx*4]
mov	edx, ebp
shr	edx, 8
mov	eax, ebp
and	eax, 0FFh
lea	esi, [eax+eax*2]
add	edx, edx
add	edx, edx
mov	eax, [edx+edi]
add	esi, esi
add	esi, esi
mov	edi, [eax+esi+8]
add	eax, esi
mov	[esp+1BCh+var_19C], edx
mov	edx, [eax]
mov	[esp+1BCh+var_1AC], esi
mov	esi, [eax+4]
mov	[eax], ebx
mov	ebx, [ecx+4]
mov	[eax+4], ebx
mov	ebx, [ecx+8]
mov	[eax+8], ebx
mov	[ecx], edx
mov	[ecx+4], esi
mov	esi, [esp+1BCh+var_1A0]
mov	[ecx+8], edi
mov	ecx, [esp+1BCh+arg_0]
mov	ecx, [ecx+0Ch]
inc	ebp
mov	edi, ebp
mov	eax, ebp
and	eax, 0FFh
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
shr	edi, 8
add	edi, edi
mov	[esp+1BCh+var_198], eax
add	edi, edi
mov	edx, [edi+ecx]
add	edx, eax
dec	esi
mov	eax, esi
and	eax, 0FFh
mov	ebx, esi
lea	eax, [eax+eax*2]
shr	ebx, 8
add	eax, eax
add	ebx, ebx
add	eax, eax
add	ebx, ebx
mov	ecx, [ebx+ecx]
mov	[esp+1BCh+var_190], eax
add	eax, ecx
push	edx
push	eax
lea	ecx, [esp+1C4h+arg_C]
mov	[esp+1C4h+var_18C], edx
mov	[esp+1C4h+var_194], eax
call	sub_763CC0
test	al, al
jz	short loc_764EC7
mov	ecx, [esp+1BCh+var_194]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	[esp+1BCh+var_188], edx
mov	edx, [ecx+8]
mov	[esp+1BCh+var_180], edx
mov	[esp+1BCh+var_184], eax
mov	eax, [esp+1BCh+var_18C]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	ecx, [esp+1BCh+var_188]
mov	edx, [esp+1BCh+var_184]
mov	[eax], ecx
mov	ecx, [esp+1BCh+var_180]
mov	[eax+4], edx
mov	[eax+8], ecx

loc_764EC7:
mov	edx, [esp+1BCh+arg_0]
mov	eax, [edx+0Ch]
mov	ecx, [edi+eax]
mov	edx, [esp+1BCh+var_198]
lea	edi, [ecx+edx]
mov	ecx, [esp+1BCh+var_19C]
mov	edx, [ecx+eax]
mov	eax, [esp+1BCh+var_1AC]
add	eax, edx
push	edi
push	eax
lea	ecx, [esp+1C4h+arg_C]
mov	[esp+1C4h+var_198], eax
call	sub_763CC0
test	al, al
jz	short loc_764F32
mov	eax, [esp+1BCh+var_198]
mov	edx, [eax+4]
mov	ecx, [eax]
mov	[esp+1BCh+var_178], edx
mov	edx, [eax+8]
mov	[esp+1BCh+var_174], edx
mov	edx, [edi]
mov	[eax], edx
mov	edx, [edi+4]
mov	[eax+4], edx
mov	edx, [edi+8]
mov	[eax+8], edx
mov	eax, [esp+1BCh+var_178]
mov	[edi], ecx
mov	ecx, [esp+1BCh+var_174]
mov	[edi+4], eax
mov	[edi+8], ecx

loc_764F32:
mov	edx, [esp+1BCh+arg_0]
mov	eax, [edx+0Ch]
mov	ecx, [esp+1BCh+var_19C]
mov	edx, [ecx+eax]
mov	ecx, [esp+1BCh+var_1AC]
lea	edi, [edx+ecx]
mov	edx, [ebx+eax]
mov	eax, [esp+1BCh+var_190]
lea	ebx, [edx+eax]
push	edi
push	ebx
lea	ecx, [esp+1C4h+arg_C]
call	sub_763CC0
test	al, al
jz	short loc_764F90
mov	edx, [ebx+8]
mov	eax, [ebx]
mov	ecx, [ebx+4]
mov	[esp+1BCh+var_15C], edx
mov	edx, [edi]
mov	[ebx], edx
mov	edx, [edi+4]
mov	[ebx+4], edx
mov	edx, [edi+8]
mov	[ebx+8], edx
mov	[edi], eax
mov	eax, [esp+1BCh+var_15C]
mov	[edi+4], ecx
mov	[edi+8], eax
mov	edi, edi

loc_764F90:
mov	ecx, [esp+1BCh+arg_0]
mov	ebx, [ecx+0Ch]
mov	edx, [esp+1BCh+var_19C]
mov	eax, [edx+ebx]
mov	ecx, [esp+1BCh+var_1AC]
lea	edi, [eax+ecx]

loc_764FA8:
inc	ebp
mov	edx, ebp
shr	edx, 8
mov	ecx, [ebx+edx*4]
mov	eax, ebp
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
push	edi
push	edx
lea	ecx, [esp+1C4h+arg_C]
call	sub_763CC0
test	al, al
jnz	short loc_764FA8

loc_764FD0:
dec	esi
mov	eax, esi
and	eax, 0FFh
mov	ecx, esi
shr	ecx, 8
lea	edx, [eax+eax*2]
mov	eax, [ebx+ecx*4]
lea	ecx, [eax+edx*4]
push	ecx
push	edi
lea	ecx, [esp+1C4h+arg_C]
call	sub_763CC0
test	al, al
jnz	short loc_764FD0
mov	eax, esi
and	eax, 0FFh
cmp	ebp, esi
lea	eax, [eax+eax*2]
jg	short loc_765056
mov	edx, esi
shr	edx, 8
mov	ecx, [ebx+edx*4]
lea	eax, [ecx+eax*4]
mov	edx, ebp
shr	edx, 8
mov	edx, [ebx+edx*4]
mov	ecx, ebp
and	ecx, 0FFh
lea	ecx, [ecx+ecx*2]
mov	ebx, [edx+ecx*4+8]
mov	edi, [edx+ecx*4+4]
lea	ecx, [edx+ecx*4]
mov	edx, [ecx]
mov	[esp+1BCh+var_144], ebx
mov	ebx, [eax]
mov	[ecx], ebx
mov	ebx, [eax+4]
mov	[ecx+4], ebx
mov	ebx, [eax+8]
mov	[ecx+8], ebx
mov	ecx, [esp+1BCh+var_144]
mov	[eax], edx
mov	[eax+4], edi
mov	[eax+8], ecx
jmp	loc_764F90

loc_765056:
mov	edx, [esp+1BCh+arg_0]
mov	edx, [edx+0Ch]
mov	ecx, esi
shr	ecx, 8
mov	ecx, [edx+ecx*4]
lea	ecx, [ecx+eax*4]
mov	eax, [esp+1BCh+var_19C]
mov	eax, [eax+edx]
add	eax, [esp+1BCh+var_1AC]
mov	ebx, [eax+8]
mov	edx, [eax]
mov	edi, [eax+4]
mov	[esp+1BCh+var_168], ebx
mov	ebx, [ecx]
mov	[eax], ebx
mov	ebx, [ecx+4]
mov	[eax+4], ebx
mov	ebx, [ecx+8]
mov	[eax+8], ebx
mov	eax, [esp+1BCh+var_1A0]
mov	[ecx], edx
mov	edx, [esp+1BCh+var_168]
mov	[ecx+4], edi
mov	[ecx+8], edx
mov	ecx, [esp+1BCh+var_1A4]
mov	edx, eax
mov	edi, esi
sub	edx, ebp
sub	edi, ecx
cmp	edi, edx
jle	short loc_7650CD
mov	eax, [esp+1BCh+var_1A8]
add	[esp+1BCh+var_1A8], 8
mov	[eax], ecx
mov	ecx, [esp+1BCh+var_1A8]
mov	[eax+4], esi
mov	[esp+1BCh+var_1A4], ebp
jmp	loc_764DA2

loc_7650CD:
mov	ecx, [esp+1BCh+var_1A8]
add	[esp+1BCh+var_1A8], 8
mov	[ecx], ebp
mov	ebp, [esp+1BCh+var_1A4]
mov	[ecx+4], eax
mov	ecx, [esp+1BCh+var_1A8]
mov	[esp+1BCh+var_1A0], esi
jmp	loc_764DA2

loc_7650EC:
mov	edi, ebp
inc	ebp
cmp	ebp, edx
mov	[esp+1BCh+var_1AC], ebp
jge	loc_7651FD
jmp	short loc_765100
align 10h

loc_765100:
mov	eax, [esp+1BCh+arg_0]
mov	ebp, [eax+0Ch]
mov	eax, edi
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	ecx, edi
shr	ecx, 8
mov	eax, [ebp+ecx*4+0]
lea	esi, [eax+edx*4]
lea	ebx, [edi+1]
mov	eax, ebx
and	eax, 0FFh
mov	ecx, ebx
shr	ecx, 8
lea	edx, [eax+eax*2]
mov	eax, [ebp+ecx*4+0]
lea	ecx, [eax+edx*4]
push	esi
push	ecx
lea	ecx, [esp+1C4h+arg_C]
call	sub_763CC0
test	al, al
jz	loc_7651E4
nop

loc_765150:
mov	edx, ebx
shr	edx, 8
mov	ecx, [ebp+edx*4+0]
mov	eax, ebx
and	eax, 0FFh
lea	eax, [eax+eax*2]
mov	ebp, [ecx+eax*4+8]
mov	edx, [ecx+eax*4+4]
lea	eax, [ecx+eax*4]
mov	ecx, [eax]
mov	[esp+1BCh+var_150], ebp
mov	ebp, [esi]
mov	[eax], ebp
mov	ebp, [esi+4]
mov	[eax+4], ebp
mov	ebp, [esi+8]
mov	[eax+8], ebp
mov	[esi], ecx
mov	[esi+4], edx
mov	edx, [esp+1BCh+var_150]
mov	[esi+8], edx
cmp	edi, [esp+1BCh+var_1A4]
jz	short loc_7651E4
mov	eax, [esp+1BCh+arg_0]
mov	ebp, [eax+0Ch]
dec	edi
mov	eax, edi
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	ecx, edi
shr	ecx, 8
mov	eax, [ebp+ecx*4+0]
lea	esi, [eax+edx*4]
dec	ebx
mov	eax, ebx
and	eax, 0FFh
mov	ecx, ebx
shr	ecx, 8
lea	edx, [eax+eax*2]
mov	eax, [ebp+ecx*4+0]
lea	ecx, [eax+edx*4]
push	esi
push	ecx
lea	ecx, [esp+1C4h+arg_C]
call	sub_763CC0
test	al, al
jnz	loc_765150

loc_7651E4:
mov	eax, [esp+1BCh+var_1AC]
mov	edi, eax
inc	eax
cmp	eax, [esp+1BCh+var_1A0]
mov	[esp+1BCh+var_1AC], eax
jl	loc_765100
mov	ecx, [esp+1BCh+var_1A8]

loc_7651FD:
lea	edx, [esp+1BCh+var_140]
cmp	ecx, edx
jbe	short loc_76521D
mov	eax, [ecx-8]
mov	edx, [ecx-4]
sub	ecx, 8
mov	[esp+1BCh+var_1A4], eax
mov	[esp+1BCh+var_1A0], edx
mov	ebp, eax
jmp	loc_764D9E

loc_76521D:
pop	edi
pop	esi
pop	ebx

loc_765220:
pop	ebp
add	esp, 1ACh
retn
sub_764D70 endp

align 10h



sub_765230 proc	near
mov	eax, [ecx+24h]
mov	edx, [ecx+50h]
lea	eax, [eax+eax*4]
add	eax, [ecx+60h]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
add	eax, [ecx+40h]
shl	eax, 6
add	eax, [ecx+74h]
add	eax, [ecx+64h]
add	eax, [ecx+54h]
add	eax, [ecx+38h]
add	eax, [ecx+44h]
add	eax, [ecx+28h]
add	eax, eax
add	eax, eax
retn
sub_765230 endp

align 10h



sub_765260 proc	near
xor	eax, eax
mov	[ecx], eax
mov	[ecx+10h], eax
mov	[ecx+20h], eax
retn
sub_765260 endp

align 10h



sub_765270 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_74CD90
lea	ecx, [esi+10h]
call	sub_74CD90
lea	ecx, [esi+20h]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+30h]
mov	eax, [eax+30h]
push	edx
call	eax
xor	edi, edi
lea	ecx, [esi+3Ch]
mov	[esi+38h], edi
mov	[esi+34h], edi
mov	[esi+30h], edi
call	sub_74CD90
lea	ecx, [esi+4Ch]
call	sub_74CD90
lea	ecx, [esi+5Ch]
call	sub_74CD90
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+6Ch]
mov	edx, [edx+30h]
push	eax
call	edx
mov	[esi+74h], edi
mov	[esi+70h], edi
mov	[esi+6Ch], edi
pop	edi
pop	esi
retn
sub_765270 endp

align 10h



sub_7652E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	edx, [esi+1Ch]
mov	ecx, eax
and	eax, 3FFh
shr	ecx, 0Ah
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
mov	ebx, [ecx+eax*4+4]
mov	ebp, [ecx+eax*4]
lea	eax, [ecx+eax*4]
push	edi
lea	eax, [esi+10h]
push	eax
mov	eax, [esi+34h]
push	esi
lea	edi, [esi+30h]
lea	edx, [esp+24h+var_C]
push	edx
push	eax
push	0
push	edi
mov	[esp+34h+var_C], ebx
mov	[esp+34h+var_8], ebp
call	sub_764CE0
add	esp, 18h
cmp	eax, [esi+34h]
jnb	short loc_765365
mov	ecx, [edi]
mov	eax, [ecx+eax*4]
mov	ecx, [esi+1Ch]
mov	edx, eax
and	eax, 3FFh
shr	edx, 0Ah
mov	ecx, [ecx+edx*4]
lea	eax, [eax+eax*2]
cmp	[ecx+eax*4], ebx
lea	eax, [ecx+eax*4]
jnz	short loc_765365
cmp	[eax+4], ebp
jnz	short loc_765365
mov	eax, [eax+8]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4

loc_765365:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 0Ch
retn	4
sub_7652E0 endp

align 10h



sub_765380 proc	near

var_4= dword ptr -4

push	ecx
xor	eax, eax
lea	edx, [ecx+5Ch]
mov	[esp+4+var_4], eax
cmp	[edx], eax
jbe	loc_765481
push	ebx
push	ebp
push	esi
push	edi

loc_765395:
mov	esi, [ecx+68h]
mov	edi, [ecx+0Ch]
mov	edx, eax
shr	edx, 8
mov	edx, [esi+edx*4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
mov	esi, [edx+eax*4]
lea	eax, [edx+eax*4]
mov	edx, [eax+4]
mov	ebx, esi
mov	ebp, edx
shr	ebx, 8
mov	ebx, [edi+ebx*4]
and	edx, 0FFh
shr	ebp, 8
mov	edi, [edi+ebp*4]
and	esi, 0FFh
lea	edx, [edx+edx*2]
mov	edx, [edi+edx*4+8]
lea	esi, [esi+esi*2]
cmp	edx, [ebx+esi*4+8]
jge	short loc_7653EA
mov	esi, [eax]
mov	edx, [eax+4]
mov	[eax+4], esi
mov	[eax], edx

loc_7653EA:
mov	esi, [eax+4]
mov	edx, [eax+8]
mov	edi, [ecx+0Ch]
mov	ebx, esi
mov	ebp, edx
shr	ebx, 8
mov	ebx, [edi+ebx*4]
and	edx, 0FFh
shr	ebp, 8
mov	edi, [edi+ebp*4]
and	esi, 0FFh
lea	edx, [edx+edx*2]
mov	edx, [edi+edx*4+8]
lea	esi, [esi+esi*2]
cmp	edx, [ebx+esi*4+8]
jge	short loc_76542B
mov	esi, [eax+4]
mov	edx, [eax+8]
mov	[eax+8], esi
mov	[eax+4], edx

loc_76542B:
mov	esi, [eax]
mov	edx, [eax+4]
mov	edi, [ecx+0Ch]
mov	ebx, esi
mov	ebp, edx
shr	ebx, 8
mov	ebx, [edi+ebx*4]
and	edx, 0FFh
shr	ebp, 8
mov	edi, [edi+ebp*4]
and	esi, 0FFh
lea	edx, [edx+edx*2]
mov	edx, [edi+edx*4+8]
lea	esi, [esi+esi*2]
cmp	edx, [ebx+esi*4+8]
jge	short loc_765469
mov	esi, [eax]
mov	edx, [eax+4]
mov	[eax+4], esi
mov	[eax], edx

loc_765469:
mov	eax, [esp+14h+var_4]
inc	eax
lea	edx, [ecx+5Ch]
mov	[esp+14h+var_4], eax
cmp	eax, [edx]
jb	loc_765395
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_765481:
mov	eax, [edx]
push	ecx
push	eax
push	0
push	edx
call	sub_764D70
add	esp, 14h
retn
sub_765380 endp

align 10h



sub_7654A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 8
cmp	edi, [esi+4]
jb	short loc_7654B4
push	edi
call	sub_764860

loc_7654B4:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+8+arg_0]
lea	eax, [eax+edx*4]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	ecx, [ecx+8]
mov	[eax+8], ecx
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_7654A0 endp

align 10h



sub_7654F0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
fld	dword ptr [eax]
push	ebx
push	esi
fstp	[esp+14h+var_C]
fld	dword ptr [eax+4]
mov	esi, ecx
push	edi
fstp	[esp+18h+var_8]
mov	edi, [esi]
shr	edi, 8
mov	ebx, 80FFFFFFh
cmp	edi, [esi+4]
jb	short loc_76551E
push	edi
call	sub_764860

loc_76551E:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+18h+var_C]
lea	eax, [eax+edx*4]
mov	edx, [esp+18h+var_8]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], ebx
inc	dword ptr [esi]
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn	4
sub_7654F0 endp

align 10h



sub_765550 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+44h+var_4], eax
mov	eax, [esp+44h+arg_0]
mov	edx, [esp+44h+arg_8]
push	ebx
push	ebp
mov	ebp, ecx
mov	ebx, [ebp+10h]
mov	ecx, [esp+4Ch+arg_4]
push	esi
lea	esi, [ebp+10h]
mov	[esp+50h+var_40], eax
mov	[esp+50h+var_34], eax
mov	eax, [esi]
push	edi
mov	edi, [ebp+20h]
mov	[esp+54h+var_44], ebp
add	ebp, 20h
mov	[esp+54h+var_28], eax
or	eax, 0FFFFFFFFh
add	edi, edi
mov	[esp+54h+var_38], edx
mov	[esp+54h+var_2C], edx
mov	edx, [esp+54h+arg_C]
mov	[esp+54h+var_1C], eax
mov	[esp+54h+var_20], eax
mov	[esp+54h+var_24], eax
mov	[esp+54h+var_10], eax
mov	[esp+54h+var_14], eax
mov	[esp+54h+var_18], eax
xor	al, al
shr	ebx, 0Ah
add	edi, edi
mov	[esp+54h+var_3C], ecx
mov	[esp+54h+var_30], ecx
mov	[esp+54h+var_A], al
mov	[esp+54h+var_B], al
mov	[esp+54h+var_C], al
mov	[esp+54h+var_8], edx
cmp	ebx, [esi+4]
jb	short loc_7655E7
push	ebx
mov	ecx, esi
call	sub_7646E0
mov	ecx, [esp+54h+arg_4]

loc_7655E7:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+ebx*4]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	edx, [esp+54h+arg_0]
mov	[eax], edx
mov	[eax+4], ecx
mov	[eax+8], edi
inc	dword ptr [esi]
mov	ebx, [esi]
shr	ebx, 0Ah
inc	edi
cmp	ebx, [esi+4]
jb	short loc_76561F
push	ebx
mov	ecx, esi
call	sub_7646E0
mov	ecx, [esp+54h+arg_4]

loc_76561F:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	edx, [edx+ebx*4]
and	eax, 3FFh
lea	eax, [eax+eax*2]
mov	[edx+eax*4], ecx
mov	ecx, [esp+54h+arg_8]
lea	eax, [edx+eax*4]
mov	[eax+4], ecx
mov	[eax+8], edi
inc	dword ptr [esi]
mov	ebx, [esi]
shr	ebx, 0Ah
inc	edi
cmp	ebx, [esi+4]
jb	short loc_765654
push	ebx
mov	ecx, esi
call	sub_7646E0

loc_765654:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+54h+arg_8]
and	eax, 3FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+54h+arg_0]
mov	[eax], edx
mov	[eax+4], ecx
mov	[eax+8], edi
inc	dword ptr [esi]
mov	esi, [ebp+0]
shr	esi, 8
cmp	esi, [ebp+4]
jb	short loc_76568C
push	esi
mov	ecx, ebp
call	sub_764760

loc_76568C:
mov	eax, [ebp+0]
mov	edx, [ebp+0Ch]
mov	edx, [edx+esi*4]
and	eax, 0FFh
mov	ecx, eax
shl	ecx, 4
sub	ecx, eax
mov	eax, [esp+54h+var_44]
lea	edi, [edx+ecx*4]
mov	ecx, 0Fh
lea	esi, [esp+54h+var_40]
rep movsd
inc	dword ptr [ebp+0]
mov	ecx, [esp+54h+arg_C]
pop	edi
pop	esi
mov	[eax+7Ch], ecx
mov	ecx, [esp+4Ch+var_4]
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn	10h
sub_765550 endp

align 10h



sub_7656E0 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebp, [esi+10h]
push	edi
lea	ebx, [esi+10h]
push	0
lea	edi, [esi+30h]
push	ebp
mov	ecx, edi
call	sub_764670
xor	eax, eax
mov	[edi+4], ebp
cmp	[ebx], eax
jbe	short loc_76570C

loc_765702:
mov	ecx, [edi]
mov	[ecx+eax*4], eax
inc	eax
cmp	eax, [ebx]
jb	short loc_765702

loc_76570C:
mov	edx, [edi+4]
push	ebx
push	esi
push	edx
push	0
push	edi
call	sub_764930
xor	ebx, ebx
add	esp, 14h
cmp	[esi+20h], ebx
jbe	short loc_765771

loc_765724:
mov	edx, [esi+2Ch]
mov	eax, ebx
and	eax, 0FFh
mov	edi, eax
mov	ecx, ebx
shr	ecx, 8
shl	edi, 4
sub	edi, eax
mov	eax, [edx+ecx*4]
mov	ebp, [eax+edi*4+18h]
lea	edi, [eax+edi*4]
push	ebp
mov	ecx, esi
call	sub_7652E0
lea	ecx, [ebp+1]
push	ecx
mov	ecx, esi
mov	[edi+1Ch], eax
call	sub_7652E0
add	ebp, 2
push	ebp
mov	ecx, esi
mov	[edi+20h], eax
call	sub_7652E0
inc	ebx
mov	[edi+24h], eax
cmp	ebx, [esi+20h]
jb	short loc_765724

loc_765771:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_7656E0 endp

align 10h



sub_765780 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
mov	edx, ecx
push	esi
xor	ebp, ebp
lea	esi, [edx+3Ch]
push	edi
mov	edi, [esp+20h+arg_0]
mov	[esp+20h+var_C], edx
mov	[esp+20h+var_D], 0
mov	[esp+20h+var_8], 7FFFFFFFh
mov	[esi], ebp

loc_7657A5:
mov	ebx, [esi]
shr	ebx, 6
mov	[esp+20h+var_4], edi
cmp	ebx, [esi+4]
jb	short loc_7657BF
push	ebx
mov	ecx, esi
call	sub_7647E0
mov	edx, [esp+20h+var_C]

loc_7657BF:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	eax, [eax+ebx*4]
and	ecx, 3Fh
mov	[eax+ecx*4], edi
inc	dword ptr [esi]
mov	ebx, [esi]
mov	ecx, edi
and	ecx, 3
and	edi, 0FFFFFFFCh
or	edi, ds:dword_1441228[ecx*4]
shr	ebx, 6
cmp	ebx, [esi+4]
jb	short loc_7657F4
push	ebx
mov	ecx, esi
call	sub_7647E0
mov	edx, [esp+20h+var_C]

loc_7657F4:
mov	ecx, [esi]
mov	eax, [esi+0Ch]
mov	eax, [eax+ebx*4]
and	ecx, 3Fh
mov	[eax+ecx*4], edi
mov	eax, [esp+20h+var_8]
inc	dword ptr [esi]
cmp	[esp+20h+var_4], eax
jz	loc_765971
cmp	edi, eax
jz	loc_765971
mov	eax, edi
sar	eax, 2
mov	ecx, eax
and	ecx, 0FFh
mov	ebx, ecx
shl	ebx, 4
sub	ebx, ecx
mov	ecx, [edx+2Ch]
and	edi, 3
shr	eax, 8
mov	eax, [ecx+eax*4]
add	ebx, edi
mov	edi, [eax+ebx*4+1Ch]
cmp	edi, [esp+20h+arg_0]
jz	short loc_765867
test	edi, edi
jl	short loc_76586B
mov	eax, [edx+48h]
mov	ecx, ebp
shr	ecx, 6
mov	ecx, [eax+ecx*4]
mov	ebx, ebp
and	ebx, 3Fh
mov	eax, [ecx+ebx*4]
mov	[esp+20h+var_8], eax
inc	ebp
jmp	loc_7657A5

loc_765867:
mov	bl, 1
jmp	short loc_76586F

loc_76586B:
mov	bl, [esp+20h+var_D]

loc_76586F:
push	esi
call	sub_7648E0
add	esp, 4
test	bl, bl
jnz	loc_765977
mov	edx, [esp+20h+arg_0]
mov	eax, edx
sar	eax, 2
mov	ecx, eax
and	ecx, 0FFh
mov	edi, ecx
shl	edi, 4
sub	edi, ecx
mov	ecx, [esp+20h+var_C]
and	edx, 3
add	edi, edx
mov	edx, [ecx+2Ch]
shr	eax, 8
mov	eax, [edx+eax*4]
mov	edi, [eax+edi*4+1Ch]
test	edi, edi
jl	loc_765965

loc_7658B6:
mov	ebx, [esi]
shr	ebx, 6
mov	[esp+20h+var_4], edi
cmp	ebx, [esi+4]
jb	short loc_7658CC
push	ebx
mov	ecx, esi
call	sub_7647E0

loc_7658CC:
mov	ecx, [esi+0Ch]
mov	eax, [ecx+ebx*4]
mov	edx, [esi]
and	edx, 3Fh
mov	[eax+edx*4], edi
inc	dword ptr [esi]
mov	ebx, [esi]
mov	ecx, edi
and	ecx, 3
and	edi, 0FFFFFFFCh
or	edi, ds:dword_1441224[ecx*4]
shr	ebx, 6
cmp	ebx, [esi+4]
jb	short loc_7658FD
push	ebx
mov	ecx, esi
call	sub_7647E0

loc_7658FD:
mov	eax, [esi]
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebx*4]
and	eax, 3Fh
mov	[ecx+eax*4], edi
mov	eax, [esp+20h+var_8]
inc	dword ptr [esi]
cmp	[esp+20h+var_4], eax
jz	short loc_765971
cmp	edi, eax
jz	short loc_765971
mov	edx, [esp+20h+var_C]
mov	ecx, [edx+48h]
mov	edx, [edx+2Ch]
mov	eax, ebp
shr	eax, 6
mov	eax, [ecx+eax*4]
mov	ebx, ebp
and	ebx, 3Fh
mov	ecx, [eax+ebx*4]
mov	eax, edi
sar	eax, 2
mov	[esp+20h+var_8], ecx
mov	ecx, eax
and	ecx, 0FFh
mov	ebx, ecx
shl	ebx, 4
and	edi, 3
sub	ebx, ecx
shr	eax, 8
mov	eax, [edx+eax*4]
add	ebx, edi
mov	edi, [eax+ebx*4+1Ch]
inc	ebp
test	edi, edi
jge	loc_7658B6

loc_765965:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 10h
retn	4

loc_765971:
mov	dword ptr [esi], 0

loc_765977:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	4
sub_765780 endp

align 10h



sub_765990 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
sub	esp, 0Ch
push	ebx
mov	ebx, ecx
push	ebp
push	esi
mov	esi, [ebx+0Ch]
mov	edx, eax
mov	ecx, eax
shr	edx, 8
mov	edx, [esi+edx*4]
and	ecx, 0FFh
lea	ecx, [ecx+ecx*2]
mov	esi, [edx+ecx*4+8]
lea	ebp, [edx+ecx*4]
test	esi, esi
jns	loc_765A85
mov	ecx, [esp+18h+arg_4]
mov	edx, [ebx+0Ch]
push	edi
mov	edi, ecx
shr	edi, 8
mov	edi, [edx+edi*4]
and	ecx, 0FFh
lea	ecx, [ecx+ecx*2]
mov	edi, [edi+ecx*4+8]
test	edi, edi
jns	short loc_7659FB
mov	ecx, [esp+1Ch+arg_8]
mov	edi, ecx
shr	edi, 8
mov	edx, [edx+edi*4]
and	ecx, 0FFh
lea	ecx, [ecx+ecx*2]
mov	edi, [edx+ecx*4+8]

loc_7659FB:
mov	ecx, esi
and	edi, offset sub_FFFFFF
and	ecx, offset sub_FFFFFF
cmp	ecx, edi
jz	short loc_765A84
test	esi, 8000000h
jz	short loc_765A73
mov	eax, [ebp+4]
mov	edx, [ebp+0]
sub	esp, 8
mov	[esp+24h+var_8], eax
fld	[esp+24h+var_8]
fstp	[esp+24h+var_20]
mov	[esp+24h+var_C], edx
fld	[esp+24h+var_C]
mov	ecx, esi
fstp	[esp+24h+var_24]
mov	[esp+24h+var_4], ecx
push	edi		; int
mov	ecx, ebx
call	sub_764590
test	eax, eax
jge	short loc_765A84
and	esi, 0FF000000h
or	esi, edi
or	esi, 10000000h
lea	edx, [esp+1Ch+var_C]
mov	[esp+1Ch+var_4], esi
mov	esi, [ebx]
push	edx
mov	ecx, ebx
call	sub_7654A0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_765A73:
and	esi, 0FF000000h
or	esi, edi
or	esi, 18000000h
mov	[ebp+8], esi

loc_765A84:
pop	edi

loc_765A85:
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_765990 endp

align 10h



; int __stdcall	sub_765A90(float, int)
sub_765A90 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_70=	dword ptr -70h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 5Ch
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
mov	[esi+5Ch], ebx
call	sub_7656E0
fldz
fld	[esp+64h+arg_0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	loc_7665EF
mov	[esp+64h+var_3C], 90FFFFFFh
cmp	[esp+64h+arg_4], ebx
jnz	short loc_765ADA
mov	eax, [esi+7Ch]
fadd	st, st
or	eax, 90000000h
mov	[esp+64h+var_3C], eax
fstp	[esp+64h+arg_0]
fld	[esp+64h+arg_0]

loc_765ADA:
fabs
push	ebp
fstp	[esp+68h+var_34]
push	edi
fld	[esp+6Ch+var_34]
mov	[esp+6Ch+var_58], ebx
fmul	ds:dbl_15FCE18
fstp	[esp+6Ch+var_38]
cmp	[esi+20h], ebx
jbe	loc_7660E0
lea	ecx, [ecx+0]

loc_765B00:
mov	edx, [esi+2Ch]
mov	eax, ebx
and	eax, 0FFh
mov	edi, eax
mov	ecx, ebx
shl	edi, 4
shr	ecx, 8
sub	edi, eax
mov	eax, [edx+ecx*4]
lea	eax, [eax+edi*4]
xor	edi, edi
mov	[esp+6Ch+var_30], eax
mov	[esp+6Ch+var_54], edi
mov	[esp+6Ch+var_50], eax
jmp	short loc_765B34
align 10h

loc_765B30:
mov	eax, [esp+6Ch+var_30]

loc_765B34:
test	byte ptr [eax+edi+34h],	1
jnz	loc_7660BF
mov	ecx, [esp+6Ch+var_50]
mov	eax, [ecx]
mov	ecx, [esi+0Ch]
mov	edx, eax
shr	edx, 8
mov	ecx, [ecx+edx*4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
test	dword ptr [ecx+eax*4+8], 20000000h
jnz	loc_7660BF
lea	edx, [edi+ebx*4]
push	edx
mov	ecx, esi
call	sub_765780
cmp	dword ptr [esi+3Ch], 0
mov	[esp+6Ch+var_59], al
jz	loc_7660BF
test	al, al
jz	short loc_765BE4
mov	eax, [esi+48h]
mov	ecx, [eax]
mov	edx, [esi+3Ch]
mov	edi, [esi+48h]
mov	ecx, [ecx]
dec	edx
mov	eax, edx
shr	eax, 6
mov	eax, [edi+eax*4]
mov	edi, [esi+2Ch]
and	edx, 3Fh
mov	edx, [eax+edx*4]
sar	edx, 2
mov	eax, edx
and	edx, 0FFh
shr	eax, 8
mov	ebx, edx
sar	ecx, 2
shl	ebx, 4
sub	ebx, edx
mov	edx, [edi+eax*4]
mov	eax, ecx
and	ecx, 0FFh
mov	ebp, ecx
shr	eax, 8
shl	ebp, 4
sub	ebp, ecx
mov	ecx, [edi+eax*4]
mov	eax, [ecx+ebp*4+38h]
cmp	eax, [edx+ebx*4+38h]
jz	loc_7660B7
mov	al, [esp+6Ch+var_59]

loc_765BE4:
mov	ecx, [esp+6Ch+var_50]
mov	ebx, [esi+0Ch]
lea	edi, [esi+4Ch]
mov	dword ptr [edi], 0
mov	ecx, [ecx]
mov	edx, ecx
and	ecx, 0FFh
shr	edx, 8
mov	edx, [ebx+edx*4]
lea	ecx, [ecx+ecx*2]
lea	ecx, [edx+ecx*4]
mov	[esp+6Ch+var_28], ecx
test	al, al
jnz	loc_765D21
fld	[esp+6Ch+var_38]
lea	edx, [esp+6Ch+var_40]
push	edx		; int
lea	eax, [esp+70h+var_44]
push	eax		; int
mov	eax, [esi+3Ch]
dec	eax
push	eax		; int
push	0		; int
sub	esp, 8
fstp	[esp+84h+var_80]
mov	ecx, esi
fld	[esp+84h+arg_0]
fchs
fstp	[esp+84h+var_84]
call	sub_763DB0
mov	ebp, [esi]
fld	[esp+6Ch+var_44]
mov	ebx, ebp
fstp	[esp+6Ch+var_18]
fld	[esp+6Ch+var_40]
shr	ebx, 8
fstp	[esp+6Ch+var_14]
cmp	ebx, [esi+4]
jb	short loc_765C69
push	ebx
mov	ecx, esi
call	sub_764860

loc_765C69:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+6Ch+var_18]
lea	eax, [eax+edx*4]
mov	edx, [esp+6Ch+var_14]
mov	[eax], ecx
mov	ecx, [esp+6Ch+var_3C]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]
mov	ebx, [edi]
shr	ebx, 6
cmp	ebx, [edi+4]
jb	short loc_765CA4
push	ebx
mov	ecx, edi
call	sub_7647E0

loc_765CA4:
mov	edx, [edi+0Ch]
mov	eax, [edi]
mov	ecx, [edx+ebx*4]
and	eax, 3Fh
mov	[ecx+eax*4], ebp
inc	dword ptr [edi]
mov	edx, [esi+48h]
mov	eax, [edx]
mov	ecx, [eax]
mov	eax, ecx
shr	eax, 2
mov	edx, eax
and	edx, 0FFh
mov	edi, edx
shl	edi, 4
sub	edi, edx
and	ecx, 3
add	edi, ds:dword_1441224[ecx*4]
mov	ecx, [esi+2Ch]
shr	eax, 8
mov	edx, [ecx+eax*4]
mov	[edx+edi*4+28h], ebp
mov	eax, [esi+3Ch]
mov	edx, [esi+48h]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
mov	eax, [ecx+eax*4]
mov	ecx, eax
shr	ecx, 2
mov	edx, ecx
and	edx, 0FFh
mov	edi, edx
shl	edi, 4
sub	edi, edx
mov	edx, [esi+2Ch]
and	eax, 3
add	edi, eax
shr	ecx, 8
mov	eax, [edx+ecx*4]
mov	[eax+edi*4+28h], ebp

loc_765D21:
cmp	[esp+6Ch+arg_4], 1
jnz	loc_766092
xor	edi, edi
mov	[esp+6Ch+var_48], edi
cmp	[esi+3Ch], edi
jbe	loc_765F46
jmp	short loc_765D44
align 10h

loc_765D40:
mov	edi, [esp+6Ch+var_48]

loc_765D44:
mov	ecx, [esi+48h]
mov	edx, edi
shr	edx, 6
mov	edx, [ecx+edx*4]
mov	eax, edi
and	eax, 3Fh
mov	eax, [edx+eax*4]
mov	edx, [esi+2Ch]
sar	eax, 2
mov	ebx, eax
and	eax, 0FFh
mov	ebp, eax
shl	ebp, 4
sub	ebp, eax
shr	ebx, 8
mov	eax, [edx+ebx*4]
lea	eax, [eax+ebp*4]
lea	ebp, [edi+1]
mov	[esp+6Ch+var_4C], ebp
cmp	ebp, [esi+3Ch]
jnb	short loc_765DC6
mov	eax, [eax+38h]
mov	[esp+6Ch+var_34], eax

loc_765D87:
mov	eax, ebp
shr	eax, 6
mov	eax, [ecx+eax*4]
mov	edi, ebp
and	edi, 3Fh
mov	eax, [eax+edi*4]
sar	eax, 2
mov	edi, eax
and	eax, 0FFh
mov	ebx, eax
shr	edi, 8
shl	ebx, 4
sub	ebx, eax
mov	eax, [edx+edi*4]
mov	edi, [esp+6Ch+var_34]
cmp	edi, [eax+ebx*4+38h]
jnz	short loc_765DBE
inc	ebp
cmp	ebp, [esi+3Ch]
jb	short loc_765D87

loc_765DBE:
mov	edi, [esp+6Ch+var_48]
mov	[esp+6Ch+var_4C], ebp

loc_765DC6:
fld	[esp+6Ch+var_38]
lea	ecx, [esp+6Ch+var_40]
push	ecx		; int
lea	edx, [esp+70h+var_44]
push	edx		; int
lea	eax, [ebp-1]
push	eax		; int
push	edi		; int
sub	esp, 8
fstp	[esp+84h+var_80]
mov	ecx, esi
fld	[esp+84h+arg_0]
fstp	[esp+84h+var_84]
call	sub_763DB0
mov	edi, [esi]
fld	[esp+6Ch+var_44]
fstp	[esp+6Ch+var_C]
mov	[esp+6Ch+var_34], edi
fld	[esp+6Ch+var_40]
shr	edi, 8
fstp	[esp+6Ch+var_8]
cmp	edi, [esi+4]
jb	short loc_765E17
push	edi
mov	ecx, esi
call	sub_764860

loc_765E17:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+edi*4]
mov	ecx, [esp+6Ch+var_C]
lea	eax, [eax+edx*4]
mov	edx, [esp+6Ch+var_8]
mov	[eax], ecx
mov	ecx, [esp+6Ch+var_3C]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [esi]
mov	ebx, [esi+4Ch]
lea	edi, [esi+4Ch]
shr	ebx, 6
cmp	ebx, [edi+4]
jb	short loc_765E56
push	ebx
mov	ecx, edi
call	sub_7647E0

loc_765E56:
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	eax, [edi]
mov	edx, [esp+6Ch+var_34]
mov	ebx, [esp+6Ch+var_48]
and	eax, 3Fh
mov	[ecx+eax*4], edx
inc	dword ptr [edi]
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 8
mov	ecx, [edx+ecx*4]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
mov	[esp+6Ch+var_2C], edx
cmp	ebx, ebp
jnb	loc_765F35
fld	[esp+6Ch+arg_0]
fchs
fstp	[esp+6Ch+var_48]
lea	ecx, [ecx+0]

loc_765EA0:
mov	ecx, [esi+48h]
fld	[esp+6Ch+var_48]
mov	edi, [esi+2Ch]
mov	eax, ebx
shr	eax, 6
mov	eax, [ecx+eax*4]
mov	edx, ebx
and	edx, 3Fh
mov	eax, [eax+edx*4]
mov	ecx, eax
and	ecx, 3
and	eax, 0FFFFFFFCh
or	eax, ds:dword_1441224[ecx*4]
mov	ecx, eax
shr	ecx, 2
mov	edx, ecx
and	ecx, 0FFh
mov	ebp, ecx
shr	edx, 8
shl	ebp, 4
sub	ebp, ecx
mov	ecx, [edi+edx*4]
mov	edx, [esp+6Ch+var_50]
lea	ebp, [ecx+ebp*4]
mov	ecx, [edx]
push	ecx
mov	edi, eax
fstp	[esp+70h+var_70]
mov	eax, [esp+70h+var_2C]
push	eax
mov	eax, [esi+0Ch]
mov	edx, ecx
and	ecx, 0FFh
shr	edx, 8
mov	edx, [eax+edx*4]
and	edi, 3
push	edi
lea	ecx, [ecx+ecx*2]
lea	eax, [edx+ecx*4]
push	ebp
push	eax
mov	ecx, esi
call	sub_764370
mov	ecx, [esp+6Ch+var_34]
mov	[ebp+edi*4+0Ch], ecx
or	byte ptr [edi+ebp+34h],	1
add	ebx, 2
cmp	ebx, [esp+6Ch+var_4C]
jb	loc_765EA0

loc_765F35:
mov	eax, [esp+6Ch+var_4C]
mov	[esp+6Ch+var_48], eax
cmp	eax, [esi+3Ch]
jb	loc_765D40

loc_765F46:
cmp	dword ptr [esi+4Ch], 2
lea	edi, [esi+4Ch]
jbe	loc_766092

loc_765F53:
mov	ebx, [edi]
fldz
xor	ebp, ebp
fstp	[esp+6Ch+var_34]
xor	edi, edi
test	ebx, ebx
jbe	loc_765FF3

loc_765F67:
mov	eax, [esi+58h]
mov	edx, edi
shr	edx, 6
mov	edx, [eax+edx*4]
mov	ecx, edi
and	ecx, 3Fh
mov	eax, [edx+ecx*4]
mov	ecx, eax
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [esi+0Ch]
shr	ecx, 8
mov	eax, [eax+ecx*4]
mov	ecx, [esp+6Ch+var_28]
fld	dword ptr [ecx]
lea	eax, [eax+edx*4]
fsub	dword ptr [eax]
fstp	[esp+6Ch+var_48]
fld	dword ptr [ecx+4]
fsub	dword ptr [eax+4]
fstp	[esp+6Ch+var_2C]
fld	[esp+6Ch+var_2C]
fld	[esp+6Ch+var_48]
fmul	st, st
fld	st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+6Ch+var_2C]
fld	[esp+6Ch+var_2C]
call	__CIsqrt
fstp	[esp+6Ch+var_2C]
fld	[esp+6Ch+var_2C]
fstp	[esp+6Ch+var_2C]
fld	[esp+6Ch+var_2C]
fld	[esp+6Ch+var_34]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_765FE8
fstp	[esp+6Ch+var_34]
mov	ebp, edi
jmp	short loc_765FEA

loc_765FE8:
fstp	st

loc_765FEA:
inc	edi
cmp	edi, ebx
jb	loc_765F67

loc_765FF3:
xor	edx, edx
lea	eax, [ebp+1]
div	ebx
lea	eax, [ebx+ebp-1]
mov	ecx, edx
xor	edx, edx
div	ebx
mov	eax, [esi+58h]
mov	ebx, [esi+5Ch]
shr	ebx, 8
mov	edi, edx
and	edx, 3Fh
shr	edi, 6
mov	edi, [eax+edi*4]
mov	edx, [edi+edx*4]
mov	[esp+6Ch+var_24], edx
mov	edx, ebp
shr	edx, 6
mov	edx, [eax+edx*4]
mov	edi, ebp
and	edi, 3Fh
mov	edx, [edx+edi*4]
mov	[esp+6Ch+var_20], edx
mov	edx, ecx
lea	edi, [esi+5Ch]
shr	edx, 6
mov	eax, [eax+edx*4]
and	ecx, 3Fh
mov	ecx, [eax+ecx*4]
mov	[esp+6Ch+var_1C], ecx
cmp	ebx, [edi+4]
jb	short loc_766055
push	ebx
mov	ecx, edi
call	sub_764860

loc_766055:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+6Ch+var_24]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+6Ch+var_20]
mov	[eax], edx
mov	edx, [esp+6Ch+var_1C]
mov	[eax+4], ecx
mov	[eax+8], edx
inc	dword ptr [edi]
lea	edi, [esi+4Ch]
push	ebp
mov	ecx, edi
call	sub_764610
cmp	dword ptr [edi], 2
ja	loc_765F53

loc_766092:
mov	eax, [esp+6Ch+var_50]
mov	eax, [eax]
mov	edx, [esi+0Ch]
mov	ecx, eax
and	eax, 0FFh
shr	ecx, 8
mov	ecx, [edx+ecx*4]
lea	eax, [eax+eax*2]
or	dword ptr [ecx+eax*4+8], 20000000h
lea	eax, [ecx+eax*4+8]

loc_7660B7:
mov	ebx, [esp+6Ch+var_58]
mov	edi, [esp+6Ch+var_54]

loc_7660BF:
add	[esp+6Ch+var_50], 4
inc	edi
mov	[esp+6Ch+var_54], edi
cmp	edi, 3
jb	loc_765B30
inc	ebx
mov	[esp+6Ch+var_58], ebx
cmp	ebx, [esi+20h]
jb	loc_765B00

loc_7660E0:
xor	eax, eax
mov	[esp+6Ch+var_58], eax
cmp	[esi+20h], eax
jbe	loc_76646C
nop

loc_7660F0:
mov	ecx, [esi+2Ch]
mov	edx, eax
and	eax, 0FFh
mov	edi, eax
shl	edi, 4
shr	edx, 8
mov	edx, [ecx+edx*4]
sub	edi, eax
mov	eax, [edx+edi*4+0Ch]
mov	ebp, [edx+edi*4+10h]
lea	edi, [edx+edi*4]
mov	[esp+6Ch+var_38], edi
mov	[esp+6Ch+var_28], eax
cmp	eax, ebp
jz	short loc_766172
mov	ecx, [edi+14h]
mov	[esp+6Ch+var_2C], ecx
cmp	ebp, ecx
jz	short loc_766172
cmp	ecx, eax
jz	short loc_766172
mov	ecx, [esi+5Ch]
lea	ebx, [esi+5Ch]
shr	ecx, 8
mov	[esp+6Ch+arg_0], ecx
cmp	ecx, [ebx+4]
jb	short loc_76614D
mov	eax, ecx
push	eax
mov	ecx, ebx
call	sub_764860
mov	ecx, [esp+6Ch+arg_0]

loc_76614D:
mov	eax, [ebx]
mov	edx, [ebx+0Ch]
mov	ecx, [edx+ecx*4]
mov	edx, [esp+6Ch+var_28]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+6Ch+var_2C]
mov	[eax], edx
mov	[eax+4], ebp
mov	[eax+8], ecx
inc	dword ptr [ebx]

loc_766172:
xor	ecx, ecx
lea	edx, [edi+1Ch]
mov	[esp+6Ch+var_54], ecx
mov	[esp+6Ch+var_48], edx
nop

loc_766180:
mov	eax, [esp+6Ch+var_48]
mov	eax, [eax-10h]
mov	edx, [edi+38h]
mov	ebp, [esi+0Ch]
mov	ebx, eax
shr	ebx, 8
mov	ebx, [ebp+ebx*4+0]
and	eax, 0FFh
or	edx, 10000000h
lea	eax, [eax+eax*2]
mov	[ebx+eax*4+8], edx
test	byte ptr [edi+ecx+34h],	2
jnz	loc_766447
mov	edx, [esp+6Ch+var_48]
mov	eax, [edx]
mov	[esp+6Ch+arg_0], eax
test	eax, eax
jge	loc_7662C0
mov	eax, ds:dword_1441224[ecx*4]
mov	eax, [edi+eax*4+28h]
mov	edx, [edx+0Ch]
mov	[esp+6Ch+var_3C], eax
mov	[esp+6Ch+arg_0], edx
test	eax, eax
jl	loc_766442
test	edx, edx
jl	loc_766442
mov	eax, [esp+6Ch+var_58]
add	eax, eax
add	eax, eax
or	eax, ecx
mov	edx, eax
shr	edx, 2
mov	edi, edx
and	edi, 0FFh
mov	ebp, edi
shl	ebp, 4
mov	ebx, eax
and	ebx, 3
sub	ebp, edi
add	ebp, ds:dword_1441224[ebx*4]
mov	edi, [esi+2Ch]
shr	edx, 8
mov	edx, [edi+edx*4]
mov	ebp, [edx+ebp*4+0Ch]
mov	ecx, eax
shr	ecx, 2
mov	edx, ecx
and	edx, 0FFh
mov	ebx, edx
shl	ebx, 4
sub	ebx, edx
and	eax, 3
add	ebx, eax
shr	ecx, 8
mov	eax, [edi+ecx*4]
mov	ecx, [eax+ebx*4+0Ch]
mov	ebx, [esi+5Ch]
lea	edi, [esi+5Ch]
shr	ebx, 8
mov	[esp+6Ch+var_C], ecx
cmp	ebx, [edi+4]
jb	short loc_76625F
push	ebx
mov	ecx, edi
call	sub_764860

loc_76625F:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+6Ch+var_C]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+6Ch+arg_0]
mov	[eax], edx
mov	[eax+4], ebp
mov	[eax+8], ecx
inc	dword ptr [edi]
mov	ebx, [edi]
shr	ebx, 8
cmp	ebx, [edi+4]
jb	short loc_766296
push	ebx
mov	ecx, edi
call	sub_764860

loc_766296:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+6Ch+arg_0]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+6Ch+var_3C]
mov	[eax], edx
mov	[eax+4], ebp
mov	[eax+8], ecx
inc	dword ptr [edi]
jmp	loc_76643A

loc_7662C0:
mov	edx, [esi+2Ch]
sar	eax, 2
mov	ebx, eax
and	eax, 0FFh
mov	ebp, eax
shr	ebx, 8
mov	edx, [edx+ebx*4]
shl	ebp, 4
sub	ebp, eax
lea	eax, [edx+ebp*4]
mov	[esp+6Ch+var_2C], eax
mov	eax, [eax+38h]
cmp	eax, [edi+38h]
jz	loc_766442
mov	eax, [esp+6Ch+var_58]
add	eax, eax
add	eax, eax
or	eax, ecx
mov	ecx, eax
shr	ecx, 2
mov	edi, ecx
and	edi, 0FFh
mov	ebp, edi
shl	ebp, 4
sub	ebp, edi
mov	edi, [esi+2Ch]
shr	ecx, 8
mov	ecx, [edi+ecx*4]
mov	edi, [esp+6Ch+arg_0]
mov	ebx, eax
and	ebx, 3
add	ebp, ds:dword_1441224[ebx*4]
mov	edx, eax
mov	ecx, [ecx+ebp*4+0Ch]
mov	[esp+6Ch+var_34], ecx
mov	ecx, edi
and	edi, 3
mov	[esp+6Ch+arg_0], edi
shr	ecx, 2
mov	edi, ecx
and	edi, 0FFh
mov	ebx, edi
shl	ebx, 4
sub	ebx, edi
add	ebx, [esp+6Ch+arg_0]
mov	ebp, ecx
shr	ebp, 8
mov	[esp+6Ch+var_28], ebx
mov	ebx, [esi+2Ch]
mov	edi, [ebx+ebp*4]
mov	ebp, [esp+6Ch+var_28]
mov	edi, [edi+ebp*4+0Ch]
mov	[esp+6Ch+var_3C], edi
mov	edi, ecx
and	edi, 0FFh
mov	ebp, edi
shl	ebp, 4
sub	ebp, edi
mov	edi, ebp
mov	ebp, [esp+6Ch+arg_0]
add	edi, ds:dword_1441224[ebp*4]
shr	ecx, 8
mov	ecx, [ebx+ecx*4]
mov	ecx, [ecx+edi*4+0Ch]
shr	edx, 2
mov	[esp+6Ch+arg_0], ecx
mov	ecx, edx
and	ecx, 0FFh
mov	edi, ecx
shl	edi, 4
sub	edi, ecx
and	eax, 3
shr	edx, 8
mov	edx, [ebx+edx*4]
mov	ebx, [esi+5Ch]
add	edi, eax
mov	eax, [edx+edi*4+0Ch]
lea	edi, [esi+5Ch]
shr	ebx, 8
mov	[esp+6Ch+var_18], eax
cmp	ebx, [edi+4]
jb	short loc_7663CD
push	ebx
mov	ecx, edi
call	sub_764860

loc_7663CD:
mov	eax, [edi]
mov	ecx, [edi+0Ch]
and	eax, 0FFh
lea	edx, [eax+eax*2]
mov	eax, [ecx+ebx*4]
mov	ecx, [esp+6Ch+var_18]
lea	eax, [eax+edx*4]
mov	edx, [esp+6Ch+var_34]
mov	[eax], ecx
mov	ecx, [esp+6Ch+arg_0]
mov	[eax+4], edx
mov	[eax+8], ecx
inc	dword ptr [edi]
mov	ebx, [edi]
shr	ebx, 8
cmp	ebx, [edi+4]
jb	short loc_766408
push	ebx
mov	ecx, edi
call	sub_764860

loc_766408:
mov	eax, [edi]
mov	edx, [edi+0Ch]
mov	ecx, [edx+ebx*4]
mov	edx, [esp+6Ch+arg_0]
and	eax, 0FFh
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+6Ch+var_34]
mov	[eax], edx
mov	edx, [esp+6Ch+var_3C]
mov	[eax+4], ecx
mov	[eax+8], edx
mov	eax, [esp+6Ch+var_2C]
inc	dword ptr [edi]
or	byte ptr [eax+ebp+34h],	2

loc_76643A:
mov	edi, [esp+6Ch+var_38]
mov	ecx, [esp+6Ch+var_54]

loc_766442:
or	byte ptr [edi+ecx+34h],	2

loc_766447:
add	[esp+6Ch+var_48], 4
inc	ecx
mov	[esp+6Ch+var_54], ecx
cmp	ecx, 3
jb	loc_766180
mov	eax, [esp+6Ch+var_58]
inc	eax
mov	[esp+6Ch+var_58], eax
cmp	eax, [esi+20h]
jb	loc_7660F0

loc_76646C:
cmp	[esp+6Ch+arg_4], 1
jnz	loc_7665E5
mov	ebx, [esi]
cmp	ebx, [esi+74h]
lea	edi, [esi+6Ch]
jbe	short loc_7664C1
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	[edi+8], ebx
test	ebx, ebx
jz	short loc_7664BD
mov	ecx, dword_1855FC0
lea	ebp, [esp+6Ch+arg_0]
push	ebp
lea	eax, ds:0[ebx*4]
mov	[esp+70h+arg_0], 2
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	edi
call	eax
jmp	short loc_7664BF

loc_7664BD:
xor	eax, eax

loc_7664BF:
mov	[edi], eax

loc_7664C1:
mov	[edi+4], ebx
xor	edi, edi
xor	edx, edx
cmp	[esi], edi
jbe	short loc_766524
lea	esp, [esp+0]

loc_7664D0:
mov	ecx, [esi+6Ch]
mov	[ecx+edi*4], edx
mov	ebx, [esi+0Ch]
mov	ecx, edi
mov	eax, edi
and	eax, 0FFh
shr	ecx, 8
mov	ecx, [ebx+ecx*4]
lea	eax, [eax+eax*2]
test	dword ptr [ecx+eax*4+8], 10000000h
lea	eax, [ecx+eax*4]
jz	short loc_76651F
mov	ebp, edx
mov	ecx, edx
and	ecx, 0FFh
shr	ebp, 8
mov	ebx, [ebx+ebp*4]
lea	ecx, [ecx+ecx*2]
lea	ecx, [ebx+ecx*4]
mov	ebx, [eax]
mov	[ecx], ebx
mov	ebx, [eax+4]
mov	[ecx+4], ebx
mov	eax, [eax+8]
mov	[ecx+8], eax
inc	edx

loc_76651F:
inc	edi
cmp	edi, [esi]
jb	short loc_7664D0

loc_766524:
mov	[esi+78h], edx
cmp	edx, [esi]
jnb	short loc_76652D
mov	[esi], edx

loc_76652D:
xor	ebp, ebp
cmp	[esi+5Ch], ebp
jbe	loc_7665E5

loc_766538:
mov	ecx, [esi+68h]
mov	edi, ebp
mov	eax, ebp
and	eax, 0FFh
lea	ebx, [eax+eax*2]
shr	edi, 8
add	edi, edi
add	edi, edi
mov	eax, [edi+ecx]
add	ebx, ebx
add	ebx, ebx
mov	ecx, [eax+ebx+4]
mov	edx, [eax+ebx]
add	eax, ebx
mov	eax, [eax+8]
mov	[esp+6Ch+var_20], ecx
mov	ecx, [esi+6Ch]
mov	edx, [ecx+edx*4]
mov	eax, [ecx+eax*4]
mov	[esp+6Ch+var_24], edx
mov	edx, [esp+6Ch+var_20]
mov	edx, [ecx+edx*4]
push	eax
mov	[esp+70h+var_1C], eax
mov	eax, [esp+70h+var_24]
push	edx
push	eax
mov	ecx, esi
mov	[esp+78h+var_20], edx
call	sub_765990
mov	ecx, [esp+6Ch+var_24]
mov	edx, [esp+6Ch+var_1C]
push	ecx
mov	[esp+70h+var_C], eax
mov	eax, [esp+70h+var_20]
push	edx
push	eax
mov	ecx, esi
call	sub_765990
mov	ecx, [esp+6Ch+var_20]
mov	edx, [esp+6Ch+var_24]
push	ecx
mov	[esp+70h+var_8], eax
mov	eax, [esp+70h+var_1C]
push	edx
push	eax
mov	ecx, esi
call	sub_765990
mov	ecx, [esi+68h]
mov	edi, [edi+ecx]
mov	edx, [esp+6Ch+var_C]
mov	ecx, [esp+6Ch+var_8]
add	edi, ebx
mov	[edi], edx
mov	[edi+4], ecx
inc	ebp
mov	[edi+8], eax
cmp	ebp, [esi+5Ch]
jb	loc_766538

loc_7665E5:
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 5Ch
retn	8

loc_7665EF:
pop	esi
fstp	st
pop	ebx
add	esp, 5Ch
retn	8
sub_765A90 endp

align 10h



sub_766600 proc	near

uMode= dword ptr -28h
Mode= word ptr -24h
var_4= dword ptr -4

sub	esp, 2Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+14h]
push	edi
mov	ebp, offset Mode ; "rb"
test	al, 4
jz	short loc_766632
test	al, 1
jz	short loc_76662B
mov	ebp, offset aWB	; "w+b"
jmp	short loc_766651

loc_76662B:		; "wb"
mov	ebp, offset aWb
jmp	short loc_766651

loc_766632:
test	al, 8
jz	short loc_766648
test	al, 1
jz	short loc_766641
mov	ebp, offset unk_1441840
jmp	short loc_766651

loc_766641:
mov	ebp, offset unk_143967C
jmp	short loc_766651

loc_766648:
test	al, 2
jz	short loc_766651
mov	ebp, offset aRB	; "r+b"

loc_766651:
mov	eax, [esi+8]
and	eax, 0FFFFFFFCh
add	eax, 8
jz	short loc_766679
cmp	byte ptr [eax],	0
jz	short loc_766679
cmp	byte ptr [eax+1], 3Ah
jnz	short loc_766679
mov	ebx, 1
push	ebx		; uMode
call	ds:SetErrorMode
mov	[esp+3Ch+uMode], eax
jmp	short loc_76667B

loc_766679:
xor	ebx, ebx

loc_76667B:
mov	eax, [esi+8]
and	eax, 0FFFFFFFCh
push	0FFFFFFFFh
add	eax, 8
push	eax
call	sub_67BC50
mov	ecx, dword_1855FC0
mov	edx, [ecx]
lea	eax, [eax+eax+2]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	ecx, [esi+8]
and	ecx, 0FFFFFFFCh
push	0FFFFFFFFh
add	ecx, 8
mov	edi, eax
push	ecx
push	edi
call	sub_67BBC0
push	0FFFFFFFFh
push	ebp
lea	edx, [esp+44h+Mode]
push	edx
call	sub_67BBC0
lea	eax, [esp+3Ch+Mode]
push	eax		; Mode
lea	ebp, [esi+10h]
push	edi		; Filename
push	ebp		; File
call	__wfopen_s
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
add	esp, 0Ch
push	edi
call	eax
mov	eax, [ebp+0]
xor	edi, edi
cmp	eax, edi
jz	short loc_7666F3
push	eax		; FILE *
call	_rewind
add	esp, 4

loc_7666F3:
cmp	[ebp+0], edi
setnz	al
mov	[esi+0Ch], al
test	al, al
jnz	short loc_76674C
call	__errno
cmp	dword ptr [eax], 2
jnz	short loc_766714
mov	eax, 1001h
mov	[esi+18h], eax
jmp	short loc_76674F

loc_766714:
call	__errno
cmp	dword ptr [eax], 0Dh
jz	short loc_766742
call	__errno
cmp	dword ptr [eax], 1
jz	short loc_766742
call	__errno
xor	ecx, ecx
cmp	dword ptr [eax], 1Ch
setz	cl
add	ecx, 1003h
mov	eax, ecx
mov	[esi+18h], eax
jmp	short loc_76674F

loc_766742:
mov	eax, 1002h
mov	[esi+18h], eax
jmp	short loc_76674F

loc_76674C:
mov	[esi+18h], edi

loc_76674F:
mov	[esi+1Ch], edi
cmp	ebx, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
jz	short loc_766765
mov	edx, [esp+2Ch+uMode]
push	edx		; uMode
call	ds:SetErrorMode

loc_766765:
mov	ecx, [esp+2Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn
sub_766600 endp

align 10h



sub_766780 proc	near
mov	eax, [ecx+8]
and	eax, 0FFFFFFFCh
add	eax, 8
retn
sub_766780 endp

align 10h



sub_766790 proc	near
mov	al, [ecx+0Ch]
retn
sub_766790 endp

align 10h



sub_7667A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
call	edx
test	al, al
jz	short loc_7667BB
test	byte ptr [esi+14h], 2
jz	short loc_7667BB
mov	eax, 1
pop	esi
retn

loc_7667BB:
xor	eax, eax
pop	esi
retn
sub_7667A0 endp

align 10h



sub_7667C0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+10h]
push	eax		; FILE *
call	_ftell
mov	esi, eax
add	esp, 4
test	esi, esi
jge	short loc_766828
call	__errno
cmp	dword ptr [eax], 2
jnz	short loc_7667ED
mov	eax, 1001h
mov	[edi+18h], eax
pop	edi
mov	eax, esi
pop	esi
retn

loc_7667ED:
call	__errno
cmp	dword ptr [eax], 0Dh
jz	short loc_76681E
call	__errno
cmp	dword ptr [eax], 1
jz	short loc_76681E
call	__errno
xor	ecx, ecx
cmp	dword ptr [eax], 1Ch
setz	cl
add	ecx, 1003h
mov	eax, ecx
mov	[edi+18h], eax
pop	edi
mov	eax, esi
pop	esi
retn

loc_76681E:
mov	eax, 1002h
mov	[edi+18h], eax
mov	eax, esi

loc_766828:
pop	edi
pop	esi
retn
sub_7667C0 endp

align 10h



sub_766830 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
push	edi
push	eax		; FILE *
call	_ftell
mov	edi, eax
add	esp, 4
test	edi, edi
jge	short loc_766898
call	__errno
cmp	dword ptr [eax], 2
jnz	short loc_76685E
mov	eax, 1001h
mov	[esi+18h], eax
mov	eax, edi
pop	edi
cdq
pop	esi
retn

loc_76685E:
call	__errno
cmp	dword ptr [eax], 0Dh
jz	short loc_766890
call	__errno
cmp	dword ptr [eax], 1
jz	short loc_766890
call	__errno
xor	ecx, ecx
cmp	dword ptr [eax], 1Ch
setz	cl
add	ecx, 1003h
mov	eax, ecx
mov	[esi+18h], eax
mov	eax, edi
pop	edi
cdq
pop	esi
retn

loc_766890:
mov	eax, 1002h
mov	[esi+18h], eax

loc_766898:
mov	eax, edi
pop	edi
cdq
pop	esi
retn
sub_766830 endp

align 10h



sub_7668A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+10h]
push	edi
call	edx
mov	edi, eax
test	edi, edi
jl	short loc_7668DC
mov	eax, [esi]
mov	edx, [eax+38h]
push	ebx
push	2
push	0
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
mov	ebx, eax
mov	eax, [esi]
mov	edx, [eax+38h]
push	0
push	edi
mov	ecx, esi
call	edx
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
retn

loc_7668DC:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn
sub_7668A0 endp

align 10h



sub_7668F0 proc	near
mov	eax, [ecx]
mov	edx, [eax+18h]
call	edx
cdq
retn
sub_7668F0 endp

align 10h



; int __stdcall	sub_766900(void	*, size_t)
sub_766900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
push	edi
test	eax, eax
jz	short loc_76691D
cmp	eax, 2
jz	short loc_76691D
mov	eax, [esi+10h]
push	eax		; FILE *
call	_fflush
add	esp, 4

loc_76691D:
mov	ecx, [esi+10h]
mov	edi, [esp+0Ch+arg_4]
mov	edx, [esp+0Ch+arg_0]
push	ecx		; FILE *
push	edi		; size_t
push	1		; size_t
push	edx		; void *
mov	dword ptr [esi+1Ch], 2
call	_fwrite
mov	ebx, eax
add	esp, 10h
cmp	ebx, edi
jge	short loc_766998
call	__errno
cmp	dword ptr [eax], 2
jnz	short loc_76695C
mov	eax, 1001h
pop	edi
mov	[esi+18h], eax
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_76695C:
call	__errno
cmp	dword ptr [eax], 0Dh
jz	short loc_766990
call	__errno
cmp	dword ptr [eax], 1
jz	short loc_766990
call	__errno
xor	ecx, ecx
cmp	dword ptr [eax], 1Ch
pop	edi
setz	cl
add	ecx, 1003h
mov	eax, ecx
mov	[esi+18h], eax
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_766990:
mov	eax, 1002h
mov	[esi+18h], eax

loc_766998:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8
sub_766900 endp




; int __stdcall	sub_7669A0(void	*, size_t)
sub_7669A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
push	edi
test	eax, eax
jz	short loc_7669BD
cmp	eax, 1
jz	short loc_7669BD
mov	eax, [esi+10h]
push	eax		; FILE *
call	_fflush
add	esp, 4

loc_7669BD:
mov	ecx, [esi+10h]
mov	edi, [esp+0Ch+arg_4]
mov	edx, [esp+0Ch+arg_0]
push	ecx		; FILE *
push	edi		; size_t
push	1		; size_t
push	edx		; void *
mov	dword ptr [esi+1Ch], 1
call	_fread
mov	ebx, eax
add	esp, 10h
cmp	ebx, edi
jge	short loc_766A38
call	__errno
cmp	dword ptr [eax], 2
jnz	short loc_7669FC
mov	eax, 1001h
pop	edi
mov	[esi+18h], eax
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_7669FC:
call	__errno
cmp	dword ptr [eax], 0Dh
jz	short loc_766A30
call	__errno
cmp	dword ptr [eax], 1
jz	short loc_766A30
call	__errno
xor	ecx, ecx
cmp	dword ptr [eax], 1Ch
pop	edi
setz	cl
add	ecx, 1003h
mov	eax, ecx
mov	[esi+18h], eax
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_766A30:
mov	eax, 1002h
mov	[esi+18h], eax

loc_766A38:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8
sub_7669A0 endp




sub_766A40 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+14h]
push	edi
call	edx
mov	ebp, [esi]
mov	edi, eax
mov	eax, [esp+10h+arg_0]
mov	ebx, edx
cdq
push	1
push	edx
push	eax
mov	eax, [ebp+3Ch]
mov	ecx, esi
call	eax
mov	ecx, edi
and	ecx, ebx
cmp	ecx, 0FFFFFFFFh
jz	short loc_766A7E
mov	ecx, eax
and	ecx, edx
cmp	ecx, 0FFFFFFFFh
jz	short loc_766A7E
sub	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_766A7E:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	4
sub_766A40 endp

align 10h



sub_766A90 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+14h]
push	edi
call	edx
mov	edi, eax
mov	eax, [esi]
mov	ebx, edx
mov	edx, [eax+1Ch]
mov	ecx, esi
call	edx
mov	ecx, edi
and	ecx, ebx
cmp	ecx, 0FFFFFFFFh
jz	short loc_766AC8
mov	ecx, eax
and	ecx, edx
cmp	ecx, 0FFFFFFFFh
jz	short loc_766AC8
sub	eax, edi
pop	edi
mov	dword ptr [esi+18h], 0
pop	esi
pop	ebx
retn

loc_766AC8:
call	__errno
cmp	dword ptr [eax], 2
jnz	short loc_766AE0
mov	eax, 1001h
pop	edi
mov	[esi+18h], eax
pop	esi
xor	eax, eax
pop	ebx
retn

loc_766AE0:
call	__errno
cmp	dword ptr [eax], 0Dh
jz	short loc_766B12
call	__errno
cmp	dword ptr [eax], 1
jz	short loc_766B12
call	__errno
xor	edx, edx
cmp	dword ptr [eax], 1Ch
pop	edi
setz	dl
add	edx, 1003h
mov	eax, edx
mov	[esi+18h], eax
pop	esi
xor	eax, eax
pop	ebx
retn

loc_766B12:
mov	eax, 1002h
pop	edi
mov	[esi+18h], eax
pop	esi
xor	eax, eax
pop	ebx
retn
sub_766A90 endp




sub_766B20 proc	near
mov	eax, [ecx+10h]
push	eax		; FILE *
call	_fflush
add	esp, 4
neg	eax
sbb	eax, eax
inc	eax
retn
sub_766B20 endp

align 10h



sub_766B40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
xor	edi, edi
sub	eax, edi
mov	esi, ecx
jz	short loc_766B84
sub	eax, 1
jz	short loc_766B7D
sub	eax, 1
jnz	short loc_766B86
mov	edi, 2

loc_766B62:
mov	eax, [esi+10h]
push	edi		; int
push	ebx		; __int32
push	eax		; FILE *
call	_fseek
add	esp, 0Ch
test	eax, eax
jz	short loc_766BA0
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8

loc_766B7D:
mov	edi, 1
jmp	short loc_766B62

loc_766B84:
xor	edi, edi

loc_766B86:
mov	eax, [esi]
mov	edx, [eax+10h]
call	edx
cmp	ebx, eax
jnz	short loc_766B62
mov	eax, [esi]
mov	edx, [eax+10h]
mov	ecx, esi
call	edx
pop	edi
pop	esi
pop	ebx
retn	8

loc_766BA0:
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
pop	edi
pop	esi
pop	ebx
retn	8
sub_766B40 endp

align 10h



sub_766BB0 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_8]
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
mov	edx, [esp+4+arg_0]
push	edx
call	eax
cdq
retn	0Ch
sub_766BB0 endp

align 10h



sub_766BD0 proc	near
mov	dword ptr [ecx+18h], 1003h
xor	al, al
retn	4
sub_766BD0 endp

align 10h



sub_766BE0 proc	near

var_4008= dword	ptr -4008h
var_4004= byte ptr -4004h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, 4008h
call	__alloca_probe
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+4008h+var_4], eax
push	ebx
mov	ebx, [esp+400Ch+arg_0]
push	ebp
push	edi
mov	edi, [esp+4014h+arg_4]
xor	ebp, ebp
mov	[esp+4014h+var_4008], ecx
test	edi, edi
jz	short loc_766C82
push	esi
jmp	short loc_766C20
align 10h

loc_766C20:
cmp	edi, 4000h
mov	esi, 4000h
jg	short loc_766C2F
mov	esi, edi

loc_766C2F:
mov	eax, [ebx]
mov	edx, [eax+28h]
push	esi
lea	ecx, [esp+401Ch+var_4004]
push	ecx
mov	ecx, ebx
call	edx
mov	ecx, eax
xor	eax, eax
test	ecx, ecx
jle	short loc_766C59
mov	eax, [esp+4018h+var_4008]
mov	edx, [eax]
mov	edx, [edx+24h]
push	ecx
lea	ecx, [esp+401Ch+var_4004]
push	ecx
mov	ecx, eax
call	edx

loc_766C59:
add	ebp, eax
sub	edi, eax
cmp	eax, esi
jl	short loc_766C65
test	edi, edi
jnz	short loc_766C20

loc_766C65:
mov	eax, ebp
pop	esi

loc_766C68:
mov	ecx, [esp+4014h+var_4]
pop	edi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 4008h
retn	8

loc_766C82:
mov	eax, ebp
jmp	short loc_766C68
sub_766BE0 endp

align 10h



sub_766C90 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
push	eax		; FILE *
call	_fclose
add	esp, 4
test	eax, eax
jz	short loc_766CF5
call	__errno
cmp	dword ptr [eax], 2
jnz	short loc_766CB9
mov	eax, 1001h
mov	[esi+18h], eax
xor	al, al
pop	esi
retn

loc_766CB9:
call	__errno
cmp	dword ptr [eax], 0Dh
jz	short loc_766CE9
call	__errno
cmp	dword ptr [eax], 1
jz	short loc_766CE9
call	__errno
xor	ecx, ecx
cmp	dword ptr [eax], 1Ch
setz	cl
add	ecx, 1003h
mov	eax, ecx
mov	[esi+18h], eax
xor	al, al
pop	esi
retn

loc_766CE9:
mov	eax, 1002h
mov	[esi+18h], eax
xor	al, al
pop	esi
retn

loc_766CF5:
xor	eax, eax
mov	[esi+0Ch], al
mov	[esi+10h], eax
mov	[esi+18h], eax
mov	al, 1
pop	esi
retn
sub_766C90 endp

align 10h



sub_766D10 proc	near

var_38=	dword ptr -38h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 38h
push	esi
push	edi
mov	edi, [esp+40h+arg_4]
mov	eax, [edi]
and	eax, 0FFFFFFFCh
push	0FFFFFFFFh
add	eax, 8
push	eax
call	sub_67BC50
mov	ecx, dword_1855FC0
mov	edx, [ecx]
lea	eax, [eax+eax+2]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	ecx, [edi]
and	ecx, 0FFFFFFFCh
push	0FFFFFFFFh
add	ecx, 8
mov	esi, eax
push	ecx
push	esi
call	sub_67BBC0
lea	edx, [esp+40h+var_38]
push	edx		; int
push	esi		; lpFileName
call	__wstat64
mov	ecx, dword_1855FC0
mov	edi, eax
mov	eax, [ecx]
mov	edx, [eax+30h]
add	esp, 8
push	esi
call	edx
test	edi, edi
pop	edi
pop	esi
jz	short loc_766D7A
xor	al, al
add	esp, 38h
retn

loc_766D7A:
mov	eax, [esp+38h+arg_0]
mov	ecx, [esp+38h+var_18]
mov	edx, [esp+38h+var_14]
mov	[eax+8], ecx
mov	ecx, [esp+38h+var_10]
mov	[eax+0Ch], edx
mov	edx, [esp+38h+var_C]
mov	[eax], ecx
mov	ecx, [esp+38h+var_20]
mov	[eax+4], edx
mov	edx, [esp+38h+var_1C]
mov	[eax+10h], ecx
mov	[eax+14h], edx
mov	al, 1
add	esp, 38h
retn
sub_766D10 endp

align 10h



sub_766DB0 proc	near

arg_0= byte ptr	 4

push	edi
mov	edi, ecx
cmp	byte ptr [edi+0Ch], 0
mov	dword ptr [edi], offset	off_1441848
jz	short loc_766DC4
call	sub_766C90

loc_766DC4:
push	esi
mov	esi, [edi+8]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_766DEA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_766DEA:
mov	ecx, edi
call	sub_64A3F0
test	[esp+8+arg_0], 1
pop	esi
jz	short loc_766E07
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_766E07:
mov	eax, edi
pop	edi
retn	4
sub_766DB0 endp

align 10h



sub_766E10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	0
push	20h
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_766E5A
mov	eax, [esp+4+arg_0]
mov	dword ptr [esi], offset	off_155F500
push	eax
lea	ecx, [esi+8]
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1441848
call	sub_67AF90
mov	ecx, [esp+4+arg_4]
mov	[esi+14h], ecx
mov	ecx, esi
call	sub_766600
mov	eax, esi
pop	esi
retn

loc_766E5A:
xor	eax, eax
pop	esi
retn
sub_766E10 endp

align 10h



sub_766E60 proc	near

var_4= dword ptr -4

push	ecx
xor	eax, eax
mov	[esp+4+var_4], eax
cmp	[ecx+4], eax
jbe	short loc_766EDA
push	ebx
push	ebp
push	esi
push	edi
nop

loc_766E70:
mov	esi, [ecx+10h]
mov	edx, eax
shr	edx, 4
mov	edx, [esi+edx*4]
mov	edi, eax
and	edi, 0Fh
lea	esi, [edx+edi*8]
mov	edi, [esi+4]
cmp	edi, 2
jbe	short loc_766ECC
mov	eax, [esi]
mov	edx, [ecx+20h]
mov	ebx, eax
mov	ebp, eax
shr	ebx, 6
mov	ebx, [edx+ebx*4]
and	ebp, 3Fh
lea	eax, [eax+edi-1]
lea	ebx, [ebx+ebp*4]
mov	ebp, eax
shr	ebp, 6
mov	edx, [edx+ebp*4]
and	eax, 3Fh
lea	eax, [edx+eax*4]
mov	dx, [ebx]
cmp	dx, [eax]
jnz	short loc_766EC8
mov	dx, [ebx+2]
cmp	dx, [eax+2]
jnz	short loc_766EC8
dec	edi
mov	[esi+4], edi

loc_766EC8:
mov	eax, [esp+14h+var_4]

loc_766ECC:
inc	eax
mov	[esp+14h+var_4], eax
cmp	eax, [ecx+4]
jb	short loc_766E70
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_766EDA:
pop	ecx
retn
sub_766E60 endp

align 10h



sub_766EE0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 1Ch
push	ebp
mov	ebp, 7FFFh
mov	eax, 0FFFF8001h
mov	edx, ebp
push	esi
xor	esi, esi
mov	[ecx+58h], dx
mov	[ecx+5Ah], dx
mov	edx, eax
mov	[esp+24h+var_10], ebp
mov	[esp+24h+var_1C], ebp
mov	[esp+24h+var_18], eax
mov	[esp+24h+var_14], eax
mov	[ecx+5Ch], dx
mov	[ecx+5Eh], ax
mov	[esp+24h+var_8], esi
cmp	[ecx+4], esi
jbe	loc_767050
push	ebx
push	edi

loc_766F24:
mov	eax, [ecx+10h]
mov	edx, esi
shr	edx, 4
mov	eax, [eax+edx*4]
mov	edi, esi
and	edi, 0Fh
mov	edx, [eax+edi*8+4]
lea	eax, [eax+edi*8]
cmp	edx, 2
jbe	loc_767040
mov	ebx, [eax]
mov	esi, [ecx+20h]
lea	eax, [ebx+edx-1]
mov	edi, eax
shr	edi, 6
mov	esi, [esi+edi*4]
and	eax, 3Fh
mov	eax, [esi+eax*4]
mov	[esp+2Ch+var_C], 0
test	edx, edx
jbe	loc_766FE9
mov	[esp+2Ch+var_4], edx
nop

loc_766F70:
mov	edx, [ecx+20h]
mov	esi, ebx
shr	esi, 6
mov	edx, [edx+esi*4]
mov	edi, ebx
and	edi, 3Fh
lea	edi, [edx+edi*4]
movzx	edx, word ptr [edi]
cmp	dx, bp
jge	short loc_766F92
movzx	esi, dx
mov	[esp+2Ch+var_10], esi

loc_766F92:
movzx	esi, word ptr [edi+2]
cmp	si, word ptr [esp+2Ch+var_1C]
jge	short loc_766FA4
movzx	ebp, si
mov	[esp+2Ch+var_1C], ebp

loc_766FA4:
cmp	dx, word ptr [esp+2Ch+var_18]
jle	short loc_766FB2
movzx	ebp, dx
mov	[esp+2Ch+var_18], ebp

loc_766FB2:
cmp	si, word ptr [esp+2Ch+var_14]
jle	short loc_766FC0
movzx	ebp, si
mov	[esp+2Ch+var_14], ebp

loc_766FC0:
mov	ebp, eax
shr	ebp, 10h
movsx	edx, dx
movsx	ebp, bp
imul	ebp, edx
cwde
movsx	edx, si
imul	edx, eax
mov	eax, [edi]
sub	edx, ebp
add	[esp+2Ch+var_C], edx
mov	ebp, [esp+2Ch+var_10]
inc	ebx
sub	[esp+2Ch+var_4], 1
jnz	short loc_766F70

loc_766FE9:
cmp	bp, [ecx+58h]
mov	esi, [esp+2Ch+var_8]
jl	short loc_767014
mov	dx, word ptr [esp+2Ch+var_1C]
cmp	dx, [ecx+5Ah]
jl	short loc_767014
mov	ax, word ptr [esp+2Ch+var_18]
cmp	ax, [ecx+5Ch]
jg	short loc_767014
mov	dx, word ptr [esp+2Ch+var_14]
cmp	dx, [ecx+5Eh]
jle	short loc_767040

loc_767014:
mov	dx, word ptr [esp+2Ch+var_18]
movzx	eax, word ptr [esp+2Ch+var_1C]
mov	[ecx+5Ch], dx
xor	edx, edx
cmp	[esp+2Ch+var_C], edx
mov	[ecx+5Ah], ax
movzx	eax, word ptr [esp+2Ch+var_14]
setnle	dl
mov	[ecx+58h], bp
mov	[ecx+5Eh], ax
inc	edx
mov	[ecx+60h], edx

loc_767040:
inc	esi
mov	[esp+2Ch+var_8], esi
cmp	esi, [ecx+4]
jb	loc_766F24
pop	edi
pop	ebx

loc_767050:
pop	esi
pop	ebp
add	esp, 1Ch
retn
sub_766EE0 endp

align 10h



sub_767060 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
cmp	edi, [esi+8]
jbe	short loc_7670B9
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, [esp+8+arg_4]
lea	eax, [edi+ecx]
mov	[esi+8], eax
test	eax, eax
jz	short loc_7670B5
mov	ecx, dword_1855FC0
lea	edi, [esp+8+arg_0]
push	edi
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
push	eax
mov	eax, [edx+38h]
push	esi
call	eax
pop	edi
mov	[esi], eax
mov	dword ptr [esi+4], 0
pop	esi
retn	8

loc_7670B5:
xor	eax, eax
mov	[esi], eax

loc_7670B9:
pop	edi
mov	dword ptr [esi+4], 0
pop	esi
retn	8
sub_767060 endp

align 10h



sub_7670D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jb	short loc_76711E
mov	edx, [esi+0Ch]
mov	ecx, dword_1855FC0
test	edx, edx
jz	short loc_767100
push	ebp
mov	ebp, [ecx]
lea	eax, ds:40h[eax*4]
push	eax
mov	eax, [ebp+2Ch]
push	edx
call	eax
pop	ebp
jmp	short loc_767117

loc_767100:
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_767117:
add	dword ptr [esi+8], 10h
mov	[esi+0Ch], eax

loc_76711E:
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	100h
push	esi
call	eax
mov	ecx, [esi+0Ch]
mov	[ecx+edi*4], eax
inc	dword ptr [esi+4]
pop	edi
pop	esi
retn	4
sub_7670D0 endp

align 10h



sub_767150 proc	near
xor	eax, eax
mov	[ecx+4], eax
mov	[ecx+14h], eax
mov	[ecx+44h], eax
mov	[ecx+50h], eax
retn
sub_767150 endp

align 10h



sub_767160 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
mov	ebx, ecx
mov	ecx, [esp+20h+arg_0]
push	esi
push	edi
cmp	ecx, 1
jnz	short loc_767177
movzx	eax, word ptr [ebx+58h]
jmp	short loc_76717B

loc_767177:
movzx	eax, word ptr [ebx+5Ah]

loc_76717B:
cwde
mov	[esp+28h+var_C], eax
cmp	ecx, 1
jnz	short loc_767191
movsx	esi, word ptr [ebx+5Ch]
movsx	ecx, word ptr [ebx+58h]
sub	esi, ecx
jmp	short loc_76719B

loc_767191:
movsx	esi, word ptr [ebx+5Eh]
movsx	edx, word ptr [ebx+5Ah]
sub	esi, edx

loc_76719B:
push	0
inc	esi
lea	edi, [ebx+24h]
push	esi
mov	ecx, edi
call	sub_767060
mov	eax, esi
push	eax		; size_t
mov	[edi+4], esi
mov	ecx, [edi]
push	0		; int
push	ecx		; void *
call	_memset
xor	eax, eax
add	esp, 0Ch
mov	[esp+28h+var_4], eax
cmp	[ebx+4], eax
jbe	loc_767357
push	ebp
lea	esp, [esp+0]

loc_7671D0:
mov	ecx, [ebx+10h]
mov	edx, eax
shr	edx, 4
mov	edx, [ecx+edx*4]
mov	esi, eax
and	esi, 0Fh
cmp	dword ptr [edx+esi*8+4], 2
lea	edx, [edx+esi*8]
mov	[esp+2Ch+var_8], edx
jbe	loc_767348
mov	ecx, [ebx+24h]
xor	ebp, ebp
mov	byte ptr [ecx],	3
mov	[esp+2Ch+var_14], ebp
cmp	[edx+4], ebp
jbe	loc_767348
jmp	short loc_767218
align 10h

loc_767210:
mov	edx, [esp+2Ch+var_8]
mov	ebp, [esp+2Ch+var_14]

loc_767218:
mov	ecx, [edx]
mov	esi, [ebx+20h]
lea	eax, [ecx+ebp]
mov	edi, eax
and	eax, 3Fh
shr	edi, 6
mov	edi, [esi+edi*4]
mov	eax, [edi+eax*4]
mov	edi, [edx+4]
mov	[esp+2Ch+var_1C], eax
xor	edx, edx
add	ebp, 2
lea	eax, [ebp-1]
div	edi
add	edx, ecx
mov	eax, edx
shr	eax, 6
mov	eax, [esi+eax*4]
and	edx, 3Fh
mov	edx, [eax+edx*4]
mov	[esp+2Ch+var_10], edx
xor	edx, edx
mov	eax, ebp
div	edi
mov	bp, word ptr [esp+2Ch+var_10]
add	edx, ecx
mov	eax, edx
shr	eax, 6
mov	ecx, [esi+eax*4]
and	edx, 3Fh
cmp	[esp+2Ch+arg_0], 1
mov	edx, [ecx+edx*4]
mov	[esp+2Ch+var_18], edx
jnz	short loc_767292
movzx	eax, word ptr [esp+2Ch+var_1C]
shr	edx, 10h
mov	word ptr [esp+2Ch+var_1C+2], ax
mov	ax, word ptr [esp+2Ch+var_18]
mov	si, bp
neg	edx
jmp	short loc_7672A1

loc_767292:
mov	dx, word ptr [esp+2Ch+var_1C]
mov	si, word ptr [esp+2Ch+var_10+2]
mov	ax, word ptr [esp+2Ch+var_18+2]

loc_7672A1:
mov	di, word ptr [esp+2Ch+var_1C+2]
xor	cl, cl
cmp	di, si
jl	short loc_7672B7
cmp	ax, si
jge	short loc_7672BC
cmp	di, si
jg	short loc_76732E

loc_7672B7:
cmp	ax, si
jg	short loc_7672F7

loc_7672BC:
movsx	eax, si
sub	eax, [esp+2Ch+var_C]
cmp	dx, bp
jg	short loc_7672EC
cmp	bp, word ptr [esp+2Ch+var_18]
jg	short loc_7672E7
mov	ecx, [ebx+24h]
cmp	dword ptr [ebx+60h], 1
lea	edi, [ecx+eax]
setz	cl
inc	cl
or	[edi], cl
mov	di, word ptr [esp+2Ch+var_1C+2]
mov	cl, 1

loc_7672E7:
cmp	dx, bp
jl	short loc_7672F3

loc_7672EC:
cmp	bp, word ptr [esp+2Ch+var_18]
jge	short loc_76731E

loc_7672F3:
test	cl, cl
jnz	short loc_76732E

loc_7672F7:
cmp	di, si
jnz	short loc_76732E
movsx	eax, si
sub	eax, [esp+2Ch+var_C]
cmp	dx, bp
jge	short loc_76731C
cmp	dword ptr [ebx+60h], 1
mov	ecx, [ebx+24h]
lea	esi, [ecx+eax]
setz	cl
inc	cl
or	[esi], cl
cmp	dx, bp

loc_76731C:
jle	short loc_76732E

loc_76731E:
mov	edx, [ebx+24h]
add	eax, edx
cmp	dword ptr [ebx+60h], 1
setnz	cl
inc	cl
or	[eax], cl

loc_76732E:
mov	eax, [esp+2Ch+var_14]
mov	edx, [esp+2Ch+var_8]
inc	eax
mov	[esp+2Ch+var_14], eax
cmp	eax, [edx+4]
jb	loc_767210
mov	eax, [esp+2Ch+var_4]

loc_767348:
inc	eax
mov	[esp+2Ch+var_4], eax
cmp	eax, [ebx+4]
jb	loc_7671D0
pop	ebp

loc_767357:
pop	edi
pop	esi
pop	ebx
add	esp, 1Ch
retn	4
sub_767160 endp




sub_767360 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
shr	edi, 6
cmp	edi, [esi+4]
jb	short loc_767374
push	edi
call	sub_7670D0

loc_767374:
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
mov	ecx, [esi]
mov	eax, [esp+8+arg_0]
mov	eax, [eax]
and	ecx, 3Fh
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
pop	edi
pop	esi
retn	4
sub_767360 endp

align 10h



sub_767390 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= word ptr	 8

sub	esp, 8
mov	eax, [ecx+14h]
mov	dx, word ptr [esp+8+arg_0]
push	ebx
mov	ebx, [ecx+4]
push	ebp
push	esi
push	edi
lea	esi, [ecx+4]
lea	edi, [ecx+14h]
mov	[esp+18h+var_8], eax
mov	ax, [esp+18h+arg_4]
shr	ebx, 4
mov	ebp, 1
mov	word ptr [esp+18h+arg_0], dx
mov	word ptr [esp+18h+arg_0+2], ax
cmp	ebx, [esi+4]
jb	short loc_7673D0
push	ebx
mov	ecx, esi
call	sub_750DA0

loc_7673D0:
mov	eax, [esi]
mov	ecx, [esi+0Ch]
mov	ebx, [ecx+ebx*4]
mov	edx, [esp+18h+var_8]
and	eax, 0Fh
mov	[ebx+eax*8], edx
mov	[ebx+eax*8+4], ebp
inc	dword ptr [esi]
mov	esi, [edi]
shr	esi, 6
cmp	esi, [edi+4]
jb	short loc_7673FA
push	esi
mov	ecx, edi
call	sub_7670D0

loc_7673FA:
mov	eax, [edi+0Ch]
mov	ecx, [edi]
mov	edx, [eax+esi*4]
mov	eax, [esp+18h+arg_0]
and	ecx, 3Fh
mov	[edx+ecx*4], eax
inc	dword ptr [edi]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_767390 endp

align 10h



sub_767420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+14h]
mov	edx, [edi+20h]
lea	esi, [edi+14h]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
mov	edx, [esp+8+arg_4]
and	eax, 3Fh
lea	eax, [ecx+eax*4]
mov	ecx, [esp+8+arg_0]
mov	word ptr [esp+8+arg_0],	cx
mov	word ptr [esp+8+arg_0+2], dx
cmp	cx, [eax]
jnz	short loc_767459
cmp	dx, [eax+2]
jz	short loc_76749B

loc_767459:
push	ebx
mov	ebx, [esi]
shr	ebx, 6
cmp	ebx, [esi+4]
jb	short loc_76746C
push	ebx
mov	ecx, esi
call	sub_7670D0

loc_76746C:
mov	edx, [esi+0Ch]
mov	ecx, [edx+ebx*4]
mov	eax, [esi]
mov	edx, [esp+0Ch+arg_0]
and	eax, 3Fh
mov	[ecx+eax*4], edx
inc	dword ptr [esi]
mov	eax, [edi+4]
mov	edx, [edi+10h]
dec	eax
mov	ecx, eax
shr	ecx, 4
mov	ecx, [edx+ecx*4]
and	eax, 0Fh
inc	dword ptr [ecx+eax*8+4]
lea	eax, [ecx+eax*8+4]
pop	ebx

loc_76749B:
pop	edi
pop	esi
retn	8
sub_767420 endp




sub_7674A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, ecx
mov	ax, [ebp+6Ch]
imul	ax, -4
push	esi
lea	esi, [ebp+30h]
push	edi
mov	dword ptr [esi], 0
mov	edi, [esi]
shr	edi, 6
mov	[esp+28h+var_10], ebp
mov	word ptr [esp+28h+var_18], ax
mov	word ptr [esp+28h+var_18+2], ax
cmp	edi, [esi+4]
jb	short loc_7674DA
push	edi
mov	ecx, esi
call	sub_7670D0

loc_7674DA:
mov	eax, [esi+0Ch]
mov	edx, [eax+edi*4]
mov	ecx, [esi]
mov	edi, [esp+28h+arg_4]
mov	eax, [esp+28h+var_18]
and	ecx, 3Fh
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
mov	ecx, [ebp+6Ch]
lea	eax, [ecx+edi]
add	eax, [esp+28h+arg_C]
mov	[esp+28h+var_14], 0FFFF8001h
cdq
idiv	edi
imul	eax, edi
sub	eax, ecx
mov	[esp+28h+var_C], eax
lea	eax, [ecx+edi]
add	eax, [esp+28h+arg_10]
cdq
idiv	edi
imul	eax, edi
sub	eax, ecx
cmp	[esp+28h+arg_0], 1
mov	[esp+28h+arg_4], eax
jnz	short loc_767530
movzx	eax, word ptr [ebp+58h]
jmp	short loc_767534

loc_767530:
movzx	eax, word ptr [ebp+5Ah]

loc_767534:
movsx	ebx, ax
xor	eax, eax
mov	[esp+28h+var_4], ebx
mov	[esp+28h+var_8], eax
cmp	[ebp+28h], eax
jbe	loc_767713
lea	ebx, [ebx+0]

loc_767550:
cmp	ebx, [esp+28h+arg_8]
mov	ecx, [ebp+24h]
mov	al, [eax+ecx]
jle	loc_767685
cmp	[esp+28h+arg_0], 1
jz	loc_767685
test	al, 2
jz	loc_767700
mov	eax, [esp+28h+arg_10]
test	eax, eax
jz	loc_767641
cmp	ebx, eax
jl	short loc_7675DE
lea	edx, [edi+eax+1]
cmp	ebx, edx
jge	short loc_7675DE
mov	eax, [esp+28h+var_14]
lea	ecx, [edi+eax+1]
cmp	ebx, ecx
jle	short loc_7675B5
mov	eax, [esi]
mov	ecx, [esi+0Ch]
dec	eax
mov	edx, eax
shr	edx, 6
mov	edx, [ecx+edx*4]
and	eax, 3Fh
movsx	eax, word ptr [edx+eax*4+2]
add	eax, edi
cmp	eax, [esp+28h+arg_4]
jl	short loc_7675BE

loc_7675B5:
mov	eax, [esi]
test	eax, eax
jz	short loc_7675BE
dec	eax
mov	[esi], eax

loc_7675BE:
mov	cx, word ptr [esp+28h+arg_4]
lea	edx, [esp+28h+var_18]
mov	word ptr [esp+28h+var_18+2], cx
push	edx
mov	ecx, esi
mov	word ptr [esp+2Ch+var_18], bx
call	sub_767360
jmp	loc_7676FC

loc_7675DE:
mov	eax, [esp+28h+arg_C]
cmp	ebx, eax
jl	short loc_767641
lea	eax, [edi+eax+1]
cmp	ebx, eax
jge	short loc_767641
mov	ecx, [esp+28h+var_14]
lea	edx, [edi+ecx+1]
cmp	ebx, edx
jle	short loc_767618
mov	eax, [esi]
mov	edx, [esi+0Ch]
dec	eax
mov	ecx, eax
shr	ecx, 6
mov	ecx, [edx+ecx*4]
and	eax, 3Fh
movsx	edx, word ptr [ecx+eax*4+2]
add	edx, edi
cmp	edx, [esp+28h+var_C]
jl	short loc_767621

loc_767618:
mov	eax, [esi]
test	eax, eax
jz	short loc_767621
dec	eax
mov	[esi], eax

loc_767621:
mov	ax, word ptr [esp+28h+var_C]
lea	ecx, [esp+28h+var_18]
push	ecx
mov	ecx, esi
mov	word ptr [esp+2Ch+var_18], bx
mov	word ptr [esp+2Ch+var_18+2], ax
call	sub_767360
jmp	loc_7676FC

loc_767641:
mov	ebp, [ebp+6Ch]
lea	eax, [ebx+ebp]
add	eax, edi
cdq
idiv	edi
mov	edx, [esp+28h+var_14]
lea	ecx, [edi+edx+1]
imul	eax, edi
sub	eax, ebp
cmp	ebx, ecx
jle	short loc_76767A
mov	ecx, [esi]
mov	ebp, [esi+0Ch]
dec	ecx
mov	edx, ecx
shr	edx, 6
mov	edx, [ebp+edx*4+0]
and	ecx, 3Fh
movsx	ecx, word ptr [edx+ecx*4+2]
add	ecx, edi
cmp	ecx, eax
jl	short loc_7676C8

loc_76767A:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7676C8
dec	ecx
mov	[esi], ecx
jmp	short loc_7676C8

loc_767685:
test	al, 1
jz	short loc_767700
mov	eax, [esp+28h+var_14]
lea	ecx, [edi+eax+1]
cmp	ebx, ecx
jle	short loc_767700
mov	ecx, [ebp+6Ch]
mov	eax, edi
cdq
sub	eax, edx
sar	eax, 1
add	eax, ecx
lea	eax, [eax+ebx+1]
cdq
idiv	edi
mov	ebp, [esi+0Ch]
imul	eax, edi
sub	eax, ecx
mov	ecx, [esi]
dec	ecx
mov	edx, ecx
shr	edx, 6
mov	edx, [ebp+edx*4+0]
and	ecx, 3Fh
movsx	ecx, word ptr [edx+ecx*4+2]
cmp	ecx, eax
jz	short loc_7676F8

loc_7676C8:
mov	ebp, [esi]
shr	ebp, 6
mov	word ptr [esp+28h+var_18+2], ax
mov	word ptr [esp+28h+var_18], bx
cmp	ebp, [esi+4]
jb	short loc_7676E4
push	ebp
mov	ecx, esi
call	sub_7670D0

loc_7676E4:
mov	edx, [esi+0Ch]
mov	eax, [esi]
mov	ecx, [edx+ebp*4]
mov	edx, [esp+28h+var_18]
and	eax, 3Fh
mov	[ecx+eax*4], edx
inc	dword ptr [esi]

loc_7676F8:
mov	ebp, [esp+28h+var_10]

loc_7676FC:
mov	[esp+28h+var_14], ebx

loc_767700:
mov	eax, [esp+28h+var_8]
inc	eax
inc	ebx
mov	[esp+28h+var_8], eax
cmp	eax, [ebp+28h]
jb	loc_767550

loc_767713:
mov	ax, [ebp+6Ch]
mov	edi, [esi]
add	ax, ax
add	ax, ax
shr	edi, 6
mov	word ptr [esp+28h+var_18], ax
mov	word ptr [esp+28h+var_18+2], ax
cmp	edi, [esi+4]
jb	short loc_767739
push	edi
mov	ecx, esi
call	sub_7670D0

loc_767739:
mov	eax, [esi+0Ch]
mov	ecx, [esi]
mov	edx, [eax+edi*4]
mov	eax, [esp+28h+var_18]
and	ecx, 3Fh
mov	[edx+ecx*4], eax
inc	dword ptr [esi]
cmp	[esp+28h+arg_0], 1
lea	edi, [ebp+40h]
jz	short loc_76775A
lea	edi, [ebp+4Ch]

loc_76775A:
mov	ebx, [ebp+28h]
mov	[esp+28h+arg_4], edi
cmp	ebx, [edi+8]
jbe	short loc_7677A8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	[edi+8], ebx
test	ebx, ebx
jz	short loc_7677A4
mov	ecx, dword_1855FC0
mov	[esp+28h+arg_0], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
lea	ecx, [esp+28h+arg_0]
push	ecx
mov	ecx, dword_1855FC0
lea	eax, [ebx+ebx]
push	eax
push	edi
call	edx
jmp	short loc_7677A6

loc_7677A4:
xor	eax, eax

loc_7677A6:
mov	[edi], eax

loc_7677A8:
mov	[edi+4], ebx
mov	eax, [ebp+3Ch]
mov	ecx, [eax]
mov	eax, [ecx]
mov	edi, [ecx+4]
xor	ebx, ebx
mov	[esp+28h+arg_10], eax
mov	[esp+28h+arg_C], 2
cmp	[ebp+28h], ebx
jbe	loc_76785A
mov	ecx, [esp+28h+var_4]
mov	[esp+28h+arg_0], ecx
jmp	short loc_7677E8
jmp	short loc_7677E0
align 10h

loc_7677E0:
mov	eax, [esp+28h+arg_10]
mov	ebp, [esp+28h+var_10]

loc_7677E8:
movsx	edx, di
cmp	[esp+28h+arg_0], edx
jl	short loc_767817
mov	ecx, [esp+28h+arg_C]
cmp	ecx, [esi]
jnb	short loc_767817
mov	eax, edi
mov	edi, [ebp+3Ch]
mov	edx, ecx
mov	ebp, ecx
shr	edx, 6
mov	edx, [edi+edx*4]
and	ebp, 3Fh
mov	edi, [edx+ebp*4]
inc	ecx
mov	[esp+28h+arg_10], eax
mov	[esp+28h+arg_C], ecx

loc_767817:
movsx	edx, ax
mov	ecx, eax
shr	ecx, 10h
mov	eax, edi
shr	eax, 10h
cwde
movsx	ebp, cx
sub	eax, ebp
mov	ebp, [esp+28h+arg_0]
sub	ebp, edx
imul	eax, ebp
movsx	ebp, di
sub	ebp, edx
cdq
idiv	ebp
inc	[esp+28h+arg_0]
inc	ebx
sub	eax, [esp+28h+var_4]
add	eax, ecx
mov	ecx, [esp+28h+arg_4]
mov	edx, [ecx]
mov	[edx+ebx*2-2], ax
mov	eax, [esp+28h+var_10]
cmp	ebx, [eax+28h]
jb	short loc_7677E0

loc_76785A:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	14h
sub_7674A0 endp

align 10h



sub_767870 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	esi, ecx
test	ebx, ebx
jz	short loc_767884
mov	eax, [esi]
cdq
idiv	ebx
jmp	short loc_767889

loc_767884:
mov	eax, 1

loc_767889:
mov	edi, [esp+0Ch+arg_0]
mov	[esi+64h], eax
test	edi, edi
jz	short loc_76789D
mov	eax, [esi]
cdq
idiv	edi
mov	ecx, eax
jmp	short loc_7678A2

loc_76789D:
mov	ecx, 1

loc_7678A2:
mov	eax, [esi]
cdq
idiv	ecx
mov	[esi+68h], ecx
imul	eax, ecx
mov	[esi+6Ch], eax
test	edi, edi
jnz	short loc_7678BC
test	ebx, ebx
jz	loc_767954

loc_7678BC:
mov	ecx, esi
call	sub_766E60
mov	ecx, esi
call	sub_766EE0
test	edi, edi
jz	short loc_767911
mov	ax, [esi+5Eh]
cmp	ax, [esi+5Ah]
jle	short loc_767911
push	2
call	sub_767160
mov	ecx, [esp+0Ch+arg_C]
movsx	edi, word ptr [esi+5Ah]
mov	edx, [esp+0Ch+arg_8]
push	ecx
movsx	ecx, word ptr [esi+5Eh]
push	edx
sub	ecx, edi
mov	eax, 55555556h
imul	ecx
mov	ecx, [esi+68h]
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
add	eax, edi
push	eax
push	ecx
push	2
mov	ecx, esi
call	sub_7674A0

loc_767911:
test	ebx, ebx
jz	short loc_767954
mov	dx, [esi+5Eh]
cmp	dx, [esi+5Ah]
jle	short loc_767954
push	1
mov	ecx, esi
call	sub_767160
movsx	edi, word ptr [esi+58h]
movsx	ecx, word ptr [esi+5Ch]
sub	ecx, edi
mov	eax, 55555556h
imul	ecx
mov	ecx, [esi+64h]
mov	eax, edx
push	0
shr	eax, 1Fh
push	0
add	eax, edx
add	eax, edi
push	eax
push	ecx
push	1
mov	ecx, esi
call	sub_7674A0

loc_767954:
pop	edi
pop	esi
pop	ebx
retn	10h
sub_767870 endp

align 10h



sub_767960 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 38h
mov	ecx, [esp+38h+arg_C]
mov	eax, [esp+38h+arg_8]
mov	edx, [esp+38h+arg_0]
push	edi
mov	edi, [esp+3Ch+arg_4]
push	38h
mov	[esp+40h+var_34], ecx
mov	[esp+40h+var_38], eax
mov	eax, [edi]
lea	ecx, [esp+40h+var_38]
push	offset a1_2_2	; "1.2.2"
push	ecx
mov	[esp+48h+var_2C], edx
mov	[esp+48h+var_28], eax
mov	[esp+48h+var_18], 0
mov	[esp+48h+var_14], 0
call	sub_767C20
add	esp, 0Ch
test	eax, eax
jnz	short loc_767A0A
push	esi
lea	edx, [esp+40h+var_38]
push	4
push	edx
call	sub_767D20
mov	esi, eax
add	esp, 8
cmp	esi, 1
jz	short loc_7679F6
lea	eax, [esp+40h+var_38]
push	eax
call	sub_7690B0
add	esp, 4
cmp	esi, 2
jz	short loc_7679EB
cmp	esi, 0FFFFFFFBh
jnz	short loc_7679E3
cmp	[esp+40h+var_34], 0
jz	short loc_7679EB

loc_7679E3:
mov	eax, esi
pop	esi
pop	edi
add	esp, 38h
retn

loc_7679EB:
pop	esi
mov	eax, 0FFFFFFFDh
pop	edi
add	esp, 38h
retn

loc_7679F6:
mov	ecx, [esp+40h+var_24]
lea	edx, [esp+40h+var_38]
push	edx
mov	[edi], ecx
call	sub_7690B0
add	esp, 4
pop	esi

loc_767A0A:
pop	edi
add	esp, 38h
retn
sub_767960 endp

align 10h



sub_767A10 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 38h
mov	ecx, [esp+38h+arg_C]
mov	edx, [esp+38h+arg_0]
mov	eax, [esp+38h+arg_8]
push	ebx
mov	ebx, [esp+3Ch+arg_4]
push	38h
mov	[esp+40h+var_34], ecx
mov	ecx, [esp+40h+arg_10]
push	offset a1_2_2	; "1.2.2"
mov	[esp+44h+var_2C], edx
mov	[esp+44h+var_38], eax
mov	eax, [ebx]
push	ecx
lea	edx, [esp+48h+var_38]
push	edx
mov	[esp+4Ch+var_28], eax
mov	[esp+4Ch+var_18], 0
mov	[esp+4Ch+var_14], 0
mov	[esp+4Ch+var_10], 0
call	sub_76A680
add	esp, 10h
test	eax, eax
jnz	short loc_767AB4
push	esi
lea	eax, [esp+40h+var_38]
push	4
push	eax
call	sub_769180
mov	esi, eax
add	esp, 8
cmp	esi, 1
jz	short loc_767AA0
lea	ecx, [esp+40h+var_38]
push	ecx
call	sub_769580
add	esp, 4
mov	eax, 0FFFFFFFBh
test	esi, esi
jz	short loc_767AB3
mov	eax, esi
pop	esi
pop	ebx
add	esp, 38h
retn

loc_767AA0:
mov	edx, [esp+40h+var_24]
lea	eax, [esp+40h+var_38]
push	eax
mov	[ebx], edx
call	sub_769580
add	esp, 4

loc_767AB3:
pop	esi

loc_767AB4:
pop	ebx
add	esp, 38h
retn
sub_767A10 endp

align 10h



sub_767AC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
mov	edx, [esp+arg_4]
push	0FFFFFFFFh
push	eax
mov	eax, [esp+8+arg_0]
push	ecx
push	edx
push	eax
call	sub_767A10
add	esp, 14h
retn
sub_767AC0 endp

align 10h



sub_767AE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, eax
mov	edx, eax
shr	ecx, 0Eh
shr	edx, 0Ch
add	ecx, eax
lea	eax, [edx+ecx+0Bh]
retn
sub_767AE0 endp

align 2
; [00000006 BYTES: COLLAPSED FUNCTION MiniDumpWriteDump. PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_767B00 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
xor	edx, edx
cmp	ecx, edx
jz	short loc_767B4A
mov	eax, [ecx+1Ch]
cmp	eax, edx
jz	short loc_767B4A
mov	[eax+18h], edx
mov	[ecx+14h], edx
mov	[ecx+8], edx
mov	[ecx+18h], edx
mov	dword ptr [ecx+30h], 1
lea	ecx, [eax+528h]
mov	[eax], edx
mov	[eax+4], edx
mov	[eax+0Ch], edx
mov	[eax+20h], edx
mov	[eax+24h], edx
mov	[eax+30h], edx
mov	[eax+34h], edx
mov	[eax+64h], ecx
mov	[eax+48h], ecx
mov	[eax+44h], ecx
xor	eax, eax
retn

loc_767B4A:
mov	eax, 0FFFFFFFEh
retn
sub_767B00 endp




sub_767B50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
push	edi
xor	edi, edi
cmp	eax, edi
jz	loc_767C12
cmp	byte ptr [eax],	31h
jnz	loc_767C12
cmp	[esp+4+arg_C], 38h
jnz	loc_767C12
push	esi
mov	esi, [esp+8+arg_0]
cmp	esi, edi
jz	loc_767C0A
mov	[esi+18h], edi
cmp	[esi+20h], edi
jnz	short loc_767B92
mov	dword ptr [esi+20h], offset sub_76A6B0
mov	[esi+28h], edi

loc_767B92:
cmp	[esi+24h], edi
jnz	short loc_767B9E
mov	dword ptr [esi+24h], offset sub_76A6D0

loc_767B9E:
mov	eax, [esi+28h]
mov	ecx, [esi+20h]
push	1BA8h
push	1
push	eax
call	ecx
add	esp, 0Ch
cmp	eax, edi
jnz	short loc_767BBD
pop	esi
mov	eax, 0FFFFFFFCh
pop	edi
retn

loc_767BBD:
mov	ecx, [esp+8+arg_4]
cmp	ecx, edi
mov	[esi+1Ch], eax
jge	short loc_767BCF
mov	[eax+8], edi
neg	ecx
jmp	short loc_767BE0

loc_767BCF:
mov	edx, ecx
sar	edx, 4
inc	edx
cmp	ecx, 30h
mov	[eax+8], edx
jge	short loc_767BE0
and	ecx, 0Fh

loc_767BE0:
lea	edx, [ecx-8]
cmp	edx, 7
ja	short loc_767BFA
push	esi
mov	[eax+1Ch], ecx
mov	[eax+2Ch], edi
call	sub_767B00
add	esp, 4
pop	esi
pop	edi
retn

loc_767BFA:
mov	ecx, [esi+24h]
push	eax
mov	eax, [esi+28h]
push	eax
call	ecx
add	esp, 8
mov	[esi+1Ch], edi

loc_767C0A:
pop	esi
mov	eax, 0FFFFFFFEh
pop	edi
retn

loc_767C12:
mov	eax, 0FFFFFFFAh
pop	edi
retn
sub_767B50 endp

align 10h



sub_767C20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	eax
push	ecx
push	0Fh
push	edx
call	sub_767B50
add	esp, 10h
retn
sub_767C20 endp

align 10h



sub_767C40 proc	near
push	ebp
push	esi
mov	esi, [ebx+1Ch]
xor	ebp, ebp
push	edi
mov	edi, eax
cmp	[esi+2Ch], ebp
jnz	short loc_767C76
mov	ecx, [esi+1Ch]
mov	edx, [ebx+20h]
mov	eax, 1
shl	eax, cl
mov	ecx, [ebx+28h]
push	1
push	eax
push	ecx
call	edx
add	esp, 0Ch
mov	[esi+2Ch], eax
cmp	eax, ebp
jnz	short loc_767C76
pop	edi
pop	esi
lea	eax, [ebp+1]
pop	ebp
retn

loc_767C76:
cmp	[esi+20h], ebp
jnz	short loc_767C8E
mov	ecx, [esi+1Ch]
mov	eax, 1
shl	eax, cl
mov	[esi+28h], ebp
mov	[esi+24h], ebp
mov	[esi+20h], eax

loc_767C8E:
sub	edi, [ebx+10h]
mov	eax, [esi+20h]
mov	ecx, [ebx+0Ch]
mov	edx, [esi+2Ch]
cmp	edi, eax
jb	short loc_767CBA
push	eax
sub	ecx, eax
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi+20h]
add	esp, 0Ch
pop	edi
mov	[esi+28h], ebp
mov	[esi+24h], eax
pop	esi
xor	eax, eax
pop	ebp
retn

loc_767CBA:
sub	eax, [esi+28h]
mov	ebp, eax
cmp	ebp, edi
cmova	ebp, edi
add	edx, [esi+28h]
push	ebp
sub	ecx, edi
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
sub	edi, ebp
jz	short loc_767CFA
mov	eax, [ebx+0Ch]
mov	ecx, [esi+2Ch]
push	edi
sub	eax, edi
push	eax
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi+20h]
add	esp, 0Ch
mov	[esi+28h], edi
pop	edi
mov	[esi+24h], edx
pop	esi
xor	eax, eax
pop	ebp
retn

loc_767CFA:
add	[esi+28h], ebp
mov	ecx, [esi+28h]
mov	eax, [esi+20h]
cmp	ecx, eax
jnz	short loc_767D0E
mov	dword ptr [esi+28h], 0

loc_767D0E:
mov	ecx, [esi+24h]
cmp	ecx, eax
jnb	short loc_767D1A
add	ecx, ebp
mov	[esi+24h], ecx

loc_767D1A:
pop	edi
pop	esi
xor	eax, eax
pop	ebp
retn
sub_767C40 endp




sub_767D20 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	word ptr -20h
var_1E=	byte ptr -1Eh
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 2Ch
push	edi
test	eax, eax
jz	loc_76901B
mov	edi, [eax+1Ch]
test	edi, edi
jz	loc_76901B
cmp	dword ptr [eax+0Ch], 0
jz	loc_76901B
cmp	dword ptr [eax], 0
jnz	short loc_767D54
cmp	dword ptr [eax+4], 0
jnz	loc_76901B

loc_767D54:
cmp	dword ptr [edi], 0Bh
jnz	short loc_767D5F
mov	dword ptr [edi], 0Ch

loc_767D5F:
mov	ecx, [eax+0Ch]
push	ebx
mov	ebx, [edi+30h]
mov	[esp+34h+var_1C], ecx
mov	ecx, [eax+10h]
push	ebp
mov	ebp, [eax]
mov	eax, [eax+4]
mov	[esp+38h+var_24], ecx
mov	[esp+38h+var_18], ecx
mov	ecx, [edi]
push	esi
mov	esi, [edi+34h]
mov	[esp+3Ch+var_2C], eax
mov	[esp+3Ch+var_4], eax
mov	[esp+3Ch+var_C], 0
cmp	ecx, 1Ch	; switch 29 cases
ja	loc_768EC9	; default
lea	ebx, [ebx+0]

loc_767DA0:		; switch jump
jmp	ds:off_769028[ecx*4]

loc_767DA7:		; jumptable 00767DA0 case 0
cmp	dword ptr [edi+8], 0
jnz	short loc_767DB8
mov	dword ptr [edi], 0Ch
jmp	loc_768EBE

loc_767DB8:
cmp	esi, 10h
jnb	short loc_767DE0
lea	ecx, [ecx+0]

loc_767DC0:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 10h
jb	short loc_767DC0

loc_767DE0:
mov	eax, [edi+8]
test	al, 2
jz	short loc_767E30
cmp	ebx, 8B1Fh
jnz	short loc_767E30
push	0
push	0
push	0
call	sub_76B430
mov	[edi+14h], eax
push	2
lea	eax, [esp+4Ch+var_20]
mov	byte ptr [esp+4Ch+var_20], 1Fh
mov	byte ptr [esp+4Ch+var_20+1], 8Bh
mov	ecx, [edi+14h]
push	eax
push	ecx
call	sub_76B430
add	esp, 18h
mov	[edi+14h], eax
mov	eax, [esp+3Ch+var_2C]
xor	ebx, ebx
xor	esi, esi
mov	dword ptr [edi], 1
jmp	loc_768EBE

loc_767E30:
mov	dword ptr [edi+10h], 0
test	al, 1
jz	loc_767ED0
movzx	eax, bl
shl	eax, 8
mov	edx, ebx
shr	edx, 8
add	eax, edx
xor	edx, edx
mov	ecx, 1Fh
div	ecx
test	edx, edx
jnz	short loc_767ED0
mov	edx, ebx
and	dl, 0Fh
cmp	dl, 8
jz	short loc_767E77
mov	eax, [esp+3Ch+arg_0]
mov	dword ptr [eax+18h], offset aUnknownCompres ; "unknown compression method"
mov	eax, [esp+3Ch+var_2C]
jmp	loc_768EB8

loc_767E77:
shr	ebx, 4
mov	ecx, ebx
and	ecx, 0Fh
add	ecx, 8
sub	esi, 4
cmp	ecx, [edi+1Ch]
jbe	short loc_767E9E
mov	edx, [esp+3Ch+arg_0]
mov	eax, [esp+3Ch+var_2C]
mov	dword ptr [edx+18h], offset aInvalidWindowS ; "invalid window size"
jmp	loc_768EB8

loc_767E9E:
push	0
push	0
push	0
call	sub_76B010
mov	ecx, [esp+48h+arg_0]
shr	ebx, 8
not	ebx
and	ebx, 2
or	ebx, 9
mov	[edi+14h], eax
mov	[ecx+30h], eax
mov	eax, [esp+48h+var_2C]
mov	[edi], ebx
add	esp, 0Ch
xor	ebx, ebx
xor	esi, esi
jmp	loc_768EBE

loc_767ED0:
mov	edx, [esp+3Ch+arg_0]
mov	eax, [esp+3Ch+var_2C]
mov	dword ptr [edx+18h], offset aIncorrectHeade ; "incorrect header	check"
jmp	loc_768EB8

loc_767EE4:		; jumptable 00767DA0 case 1
cmp	esi, 10h
jnb	short loc_767F10
lea	esp, [esp+0]

loc_767EF0:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 10h
jb	short loc_767EF0

loc_767F10:
mov	[edi+10h], ebx
cmp	bl, 8
jz	short loc_767F28
mov	ecx, [esp+3Ch+arg_0]
mov	dword ptr [ecx+18h], offset aUnknownCompres ; "unknown compression method"
jmp	loc_768EB8

loc_767F28:
test	ebx, 0E000h
jz	short loc_767F40
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aUnknownHeaderF ; "unknown header flags set"
jmp	loc_768EB8

loc_767F40:
test	ebx, 200h
jz	short loc_767F6D
mov	byte ptr [esp+3Ch+var_20], bl
shr	ebx, 8
push	2
lea	eax, [esp+40h+var_20]
mov	byte ptr [esp+40h+var_20+1], bl
mov	ecx, [edi+14h]
push	eax
push	ecx
call	sub_76B430
mov	[edi+14h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_767F6D:
xor	ebx, ebx
xor	esi, esi
mov	dword ptr [edi], 2
jmp	short loc_767F80

loc_767F79:		; jumptable 00767DA0 case 2
cmp	esi, 20h
jnb	short loc_767FA0
mov	edi, edi

loc_767F80:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 20h
jb	short loc_767F80

loc_767FA0:
test	dword ptr [edi+10h], 200h
jz	short loc_767FE0
mov	byte ptr [esp+3Ch+var_20], bl
mov	eax, ebx
mov	ecx, ebx
shr	eax, 8
shr	ecx, 10h
shr	ebx, 18h
push	4
lea	edx, [esp+40h+var_20]
mov	byte ptr [esp+40h+var_20+1], al
mov	[esp+40h+var_1E], cl
mov	[esp+40h+var_1D], bl
mov	eax, [edi+14h]
push	edx
push	eax
call	sub_76B430
mov	[edi+14h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_767FE0:
xor	ebx, ebx
xor	esi, esi
mov	dword ptr [edi], 3
jmp	short loc_767FF1

loc_767FEC:		; jumptable 00767DA0 case 3
cmp	esi, 10h
jnb	short loc_768011

loc_767FF1:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 10h
jb	short loc_767FF1

loc_768011:
test	dword ptr [edi+10h], 200h
jz	short loc_76803F
mov	byte ptr [esp+3Ch+var_20], bl
shr	ebx, 8
push	2
lea	eax, [esp+40h+var_20]
mov	byte ptr [esp+40h+var_20+1], bl
mov	ecx, [edi+14h]
push	eax
push	ecx
call	sub_76B430
mov	[edi+14h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_76803F:
xor	ebx, ebx
xor	esi, esi
mov	dword ptr [edi], 4

loc_768049:		; jumptable 00767DA0 case 4
test	dword ptr [edi+10h], 400h
jz	short loc_7680AC
cmp	esi, 10h
jnb	short loc_768077

loc_768057:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 10h
jb	short loc_768057

loc_768077:
test	dword ptr [edi+10h], 200h
mov	[edi+38h], ebx
jz	short loc_7680A8
mov	byte ptr [esp+3Ch+var_20], bl
shr	ebx, 8
push	2
lea	eax, [esp+40h+var_20]
mov	byte ptr [esp+40h+var_20+1], bl
mov	ecx, [edi+14h]
push	eax
push	ecx
call	sub_76B430
mov	[edi+14h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_7680A8:
xor	ebx, ebx
xor	esi, esi

loc_7680AC:
mov	dword ptr [edi], 5

loc_7680B2:		; jumptable 00767DA0 case 5
mov	edx, [edi+10h]
test	edx, 400h
jz	short loc_76810C
mov	ecx, [edi+38h]
mov	[esp+3Ch+var_28], ecx
cmp	ecx, eax
jbe	short loc_7680CE
mov	ecx, eax
mov	[esp+3Ch+var_28], eax

loc_7680CE:
test	ecx, ecx
jz	short loc_768102
test	edx, 200h
jz	short loc_7680F7
mov	edx, [esp+3Ch+var_28]
mov	eax, [edi+14h]
push	edx
push	ebp
push	eax
call	sub_76B430
mov	ecx, [esp+48h+var_28]
mov	[edi+14h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_7680F7:
sub	eax, ecx
add	ebp, ecx
sub	[edi+38h], ecx
mov	[esp+3Ch+var_2C], eax

loc_768102:
cmp	dword ptr [edi+38h], 0
jnz	loc_768F1C

loc_76810C:
mov	dword ptr [edi], 6

loc_768112:		; jumptable 00767DA0 case 6
test	dword ptr [edi+10h], 800h
jz	short loc_76816F
test	eax, eax
jz	loc_768F1C
xor	ecx, ecx

loc_768125:
movzx	edx, byte ptr [ecx+ebp]
inc	ecx
mov	[esp+3Ch+var_14], edx
test	edx, edx
jz	short loc_768136
cmp	ecx, eax
jb	short loc_768125

loc_768136:
test	dword ptr [edi+10h], 2000h
mov	[esp+3Ch+var_28], ecx
jz	short loc_76815C
mov	edx, [edi+14h]
push	ecx
push	ebp
push	edx
call	sub_76B430
mov	ecx, [esp+48h+var_28]
mov	[edi+14h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_76815C:
sub	eax, ecx
add	ebp, ecx
cmp	[esp+3Ch+var_14], 0
mov	[esp+3Ch+var_2C], eax
jnz	loc_768F1C

loc_76816F:
mov	dword ptr [edi], 7

loc_768175:		; jumptable 00767DA0 case 7
test	dword ptr [edi+10h], 1000h
jz	short loc_7681DC
test	eax, eax
jz	loc_768F1C
xor	ecx, ecx
jmp	short loc_768190
align 10h

loc_768190:
movzx	edx, byte ptr [ecx+ebp]
inc	ecx
mov	[esp+3Ch+var_14], edx
test	edx, edx
jz	short loc_7681A1
cmp	ecx, eax
jb	short loc_768190

loc_7681A1:
test	dword ptr [edi+10h], 2000h
mov	[esp+3Ch+var_28], ecx
jz	short loc_7681C9
mov	eax, ecx
mov	ecx, [edi+14h]
push	eax
push	ebp
push	ecx
call	sub_76B430
mov	ecx, [esp+48h+var_28]
mov	[edi+14h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_7681C9:
sub	eax, ecx
add	ebp, ecx
cmp	[esp+3Ch+var_14], 0
mov	[esp+3Ch+var_2C], eax
jnz	loc_768F1C

loc_7681DC:
mov	dword ptr [edi], 8

loc_7681E2:		; jumptable 00767DA0 case 8
test	dword ptr [edi+10h], 200h
jz	short loc_76822C
cmp	esi, 10h
jnb	short loc_768210

loc_7681F0:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 10h
jb	short loc_7681F0

loc_768210:
movzx	ecx, word ptr [edi+14h]
cmp	ebx, ecx
jz	short loc_768228
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aHeaderCrcMisma ; "header crc mismatch"
jmp	loc_768EB8

loc_768228:
xor	ebx, ebx
xor	esi, esi

loc_76822C:
push	0
push	0
push	0
call	sub_76B430
mov	ecx, [esp+48h+arg_0]
mov	[edi+14h], eax
mov	[ecx+30h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch
mov	dword ptr [edi], 0Bh
jmp	loc_768EBE

loc_768253:		; jumptable 00767DA0 case 9
cmp	esi, 20h
jnb	short loc_768278

loc_768258:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 20h
jb	short loc_768258

loc_768278:
mov	ecx, ebx
and	ecx, 0FF00h
mov	edx, ebx
shl	edx, 10h
add	ecx, edx
mov	edx, ebx
shr	edx, 8
shl	ecx, 8
and	edx, 0FF00h
add	ecx, edx
mov	edx, [esp+3Ch+arg_0]
shr	ebx, 18h
add	ecx, ebx
mov	[edi+14h], ecx
mov	[edx+30h], ecx
xor	ebx, ebx
xor	esi, esi
mov	dword ptr [edi], 0Ah

loc_7682B0:		; jumptable 00767DA0 case 10
cmp	dword ptr [edi+0Ch], 0
jz	loc_768ED6
push	0
push	0
push	0
call	sub_76B010
mov	ecx, [esp+48h+arg_0]
mov	[edi+14h], eax
mov	[ecx+30h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch
mov	dword ptr [edi], 0Bh

loc_7682DC:		; jumptable 00767DA0 case 11
cmp	[esp+3Ch+arg_4], 5
jz	loc_768F1C

loc_7682E7:		; jumptable 00767DA0 case 12
cmp	dword ptr [edi+4], 0
jz	short loc_768301
mov	ecx, esi
and	ecx, 7
shr	ebx, cl
sub	esi, ecx
mov	dword ptr [edi], 18h
jmp	loc_768EBE

loc_768301:
cmp	esi, 3
jnb	short loc_768326

loc_768306:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 3
jb	short loc_768306

loc_768326:
mov	ecx, ebx
and	ecx, 1
shr	ebx, 1
mov	[edi+4], ecx
mov	ecx, ebx
and	ecx, 3
dec	esi
cmp	ecx, 3		; switch 4 cases
ja	short loc_7683A2 ; default
jmp	ds:off_76909C[ecx*4] ; switch jump

loc_768342:		; jumptable 0076833B case 0
shr	ebx, 2
mov	dword ptr [edi], 0Dh
sub	esi, 2
jmp	loc_768EBE

loc_768353:		; jumptable 0076833B case 1
shr	ebx, 2
mov	dword ptr [edi+44h], offset unk_14418C8
mov	dword ptr [edi+4Ch], 9
mov	dword ptr [edi+48h], offset unk_14420C8
mov	dword ptr [edi+50h], 5
mov	dword ptr [edi], 12h
sub	esi, 2
jmp	loc_768EBE

loc_768380:		; jumptable 0076833B case 2
shr	ebx, 2
mov	dword ptr [edi], 0Fh
sub	esi, 2
jmp	loc_768EBE

loc_768391:		; jumptable 0076833B case 3
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aInvalidBlockTy ; "invalid block type"
mov	dword ptr [edi], 1Bh

loc_7683A2:		; default
shr	ebx, 2
sub	esi, 2
jmp	loc_768EBE

loc_7683AD:		; jumptable 00767DA0 case 13
mov	ecx, esi
and	ecx, 7
sub	esi, ecx
shr	ebx, cl
cmp	esi, 20h
jnb	short loc_7683E0
jmp	short loc_7683C0
align 10h

loc_7683C0:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 20h
jb	short loc_7683C0

loc_7683E0:
mov	edx, ebx
mov	ecx, ebx
not	edx
and	ecx, 0FFFFh
shr	edx, 10h
cmp	ecx, edx
jz	short loc_768403
mov	ecx, [esp+3Ch+arg_0]
mov	dword ptr [ecx+18h], offset aInvalidStoredB ; "invalid stored block lengths"
jmp	loc_768EB8

loc_768403:
xor	ebx, ebx
mov	[edi+38h], ecx
xor	esi, esi
mov	dword ptr [edi], 0Eh

loc_768410:		; jumptable 00767DA0 case 14
mov	ecx, [edi+38h]
mov	[esp+3Ch+var_28], ecx
test	ecx, ecx
jz	loc_768A83
cmp	ecx, eax
jbe	short loc_768429
mov	ecx, eax
mov	[esp+3Ch+var_28], eax

loc_768429:
mov	edx, [esp+3Ch+var_24]
cmp	ecx, edx
jbe	short loc_768437
mov	ecx, edx
mov	[esp+3Ch+var_28], ecx

loc_768437:
test	ecx, ecx
jz	loc_768F1C
mov	edx, [esp+3Ch+var_28]
mov	eax, [esp+3Ch+var_1C]
push	edx
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+48h+var_28]
sub	[esp+48h+var_2C], eax
sub	[esp+48h+var_24], eax
add	[esp+48h+var_1C], eax
add	ebp, eax
add	esp, 0Ch
sub	[edi+38h], eax
mov	eax, [esp+3Ch+var_2C]
jmp	loc_768EBE

loc_768470:		; jumptable 00767DA0 case 15
cmp	esi, 0Eh
jnb	short loc_768495

loc_768475:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 0Eh
jb	short loc_768475

loc_768495:
mov	ecx, ebx
and	ecx, 1Fh
shr	ebx, 5
add	ecx, 101h
mov	edx, ebx
mov	[edi+58h], ecx
shr	ebx, 5
mov	ecx, ebx
and	edx, 1Fh
and	ecx, 0Fh
inc	edx
add	ecx, 4
shr	ebx, 4
sub	esi, 0Eh
cmp	dword ptr [edi+58h], 11Eh
mov	[edi+5Ch], edx
mov	[edi+54h], ecx
ja	loc_7685B6
cmp	edx, 1Eh
ja	loc_7685B6
mov	dword ptr [edi+60h], 0
mov	dword ptr [edi], 10h

loc_7684E6:		; jumptable 00767DA0 case 16
mov	ecx, [edi+60h]
cmp	ecx, [edi+54h]
jnb	short loc_76853B
mov	edi, edi

loc_7684F0:
cmp	esi, 3
jnb	short loc_768515

loc_7684F5:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 3
jb	short loc_7684F5

loc_768515:
mov	edx, [edi+60h]
movzx	edx, ds:word_1442148[edx*2]
mov	ecx, ebx
and	ecx, 7
mov	[edi+edx*2+68h], cx
inc	dword ptr [edi+60h]
mov	ecx, [edi+60h]
shr	ebx, 3
sub	esi, 3
cmp	ecx, [edi+54h]
jb	short loc_7684F0

loc_76853B:
mov	eax, 13h
cmp	[edi+60h], eax
jnb	short loc_76856A
jmp	short loc_768550
align 10h

loc_768550:
mov	edx, [edi+60h]
movzx	ecx, ds:word_1442148[edx*2]
xor	edx, edx
mov	[edi+ecx*2+68h], dx
inc	dword ptr [edi+60h]
cmp	[edi+60h], eax
jb	short loc_768550

loc_76856A:
lea	eax, [edi+528h]
lea	ecx, [edi+64h]
mov	[ecx], eax
mov	[edi+44h], eax
lea	edx, [edi+2E8h]
push	edx
lea	eax, [edi+4Ch]
push	eax
push	ecx
mov	dword ptr [eax], 7
push	13h
lea	eax, [edi+68h]
push	eax
push	0
call	sub_76AB40
add	esp, 18h
mov	[esp+3Ch+var_C], eax
test	eax, eax
mov	eax, [esp+3Ch+var_2C]
jz	short loc_7685C6
mov	ecx, [esp+3Ch+arg_0]
mov	dword ptr [ecx+18h], offset aInvalidCodeLen ; "invalid code lengths set"
jmp	loc_768EB8

loc_7685B6:
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aTooManyLengthO ; "too many	length or distance symbols"
jmp	loc_768EB8

loc_7685C6:
mov	dword ptr [edi+60h], 0
mov	dword ptr [edi], 11h

loc_7685D3:		; jumptable 00767DA0 case 17
mov	edx, [edi+5Ch]
add	edx, [edi+58h]
cmp	[edi+60h], edx
jnb	loc_7687F6

loc_7685E2:
mov	ecx, [edi+4Ch]
mov	edx, 1
shl	edx, cl
mov	ecx, [edi+44h]
dec	edx
and	edx, ebx
mov	ecx, [ecx+edx*4]
mov	edx, ecx
shr	edx, 8
movzx	edx, dl
mov	[esp+3Ch+var_28], ecx
cmp	edx, esi
jbe	short loc_768643

loc_768605:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [edi+4Ch]
dec	eax
add	esi, 8
add	ebx, edx
mov	edx, 1
shl	edx, cl
mov	ecx, [edi+44h]
inc	ebp
mov	[esp+3Ch+var_2C], eax
dec	edx
and	edx, ebx
mov	ecx, [ecx+edx*4]
mov	edx, ecx
shr	edx, 8
movzx	edx, dl
mov	[esp+3Ch+var_28], ecx
cmp	edx, esi
ja	short loc_768605

loc_768643:
mov	edx, ecx
shr	edx, 10h
cmp	edx, 10h
jnb	short loc_7686A2
mov	edx, ecx
shr	edx, 8
movzx	edx, dl
cmp	esi, edx
jnb	short loc_768686
lea	esp, [esp+0]

loc_768660:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [esp+3Ch+var_28]
dec	eax
add	esi, 8
add	ebx, edx
movzx	edx, ch
inc	ebp
mov	[esp+3Ch+var_2C], eax
cmp	esi, edx
jb	short loc_768660

loc_768686:
mov	dx, word ptr [esp+3Ch+var_28+2]
movzx	ecx, ch
shr	ebx, cl
sub	esi, ecx
mov	ecx, [edi+60h]
mov	[edi+ecx*2+68h], dx
inc	dword ptr [edi+60h]
jmp	loc_7687E7

loc_7686A2:
mov	dx, word ptr [esp+3Ch+var_28+2]
movzx	ecx, ch
mov	[esp+3Ch+var_10], ecx
cmp	dx, 10h
jnz	short loc_768715
lea	edx, [ecx+2]
cmp	esi, edx
jnb	short loc_7686E6
jmp	short loc_7686C0
align 10h

loc_7686C0:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [esp+3Ch+var_10]
dec	eax
add	esi, 8
add	ebx, edx
lea	edx, [ecx+2]
inc	ebp
mov	[esp+3Ch+var_2C], eax
cmp	esi, edx
jb	short loc_7686C0

loc_7686E6:
shr	ebx, cl
sub	esi, ecx
mov	ecx, [edi+60h]
test	ecx, ecx
jz	loc_76884D
movzx	ecx, word ptr [edi+ecx*2+66h]
mov	[esp+3Ch+var_14], ecx
mov	ecx, ebx
and	ecx, 3
add	ecx, 3
shr	ebx, 2
mov	[esp+3Ch+var_28], ecx
sub	esi, 2
jmp	loc_7687B3

loc_768715:
cmp	dx, 11h
jnz	short loc_768760
lea	edx, [ecx+3]
cmp	esi, edx
jnb	short loc_768748

loc_768722:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [esp+3Ch+var_10]
dec	eax
add	esi, 8
add	ebx, edx
lea	edx, [ecx+3]
inc	ebp
mov	[esp+3Ch+var_2C], eax
cmp	esi, edx
jb	short loc_768722

loc_768748:
shr	ebx, cl
mov	edx, ebx
and	edx, 7
add	edx, 3
mov	[esp+3Ch+var_28], edx
shr	ebx, 3
mov	edx, 0FFFFFFFDh
jmp	short loc_7687A3

loc_768760:
lea	edx, [ecx+7]
cmp	esi, edx
jnb	short loc_76878D

loc_768767:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [esp+3Ch+var_10]
dec	eax
add	esi, 8
add	ebx, edx
lea	edx, [ecx+7]
inc	ebp
mov	[esp+3Ch+var_2C], eax
cmp	esi, edx
jb	short loc_768767

loc_76878D:
shr	ebx, cl
mov	edx, ebx
and	edx, 7Fh
add	edx, 0Bh
mov	[esp+3Ch+var_28], edx
shr	ebx, 7
mov	edx, 0FFFFFFF9h

loc_7687A3:
sub	edx, ecx
mov	ecx, [esp+3Ch+var_28]
add	esi, edx
mov	[esp+3Ch+var_14], 0

loc_7687B3:
mov	edx, [edi+60h]
add	edx, ecx
mov	ecx, [edi+5Ch]
add	ecx, [edi+58h]
cmp	edx, ecx
ja	loc_76885D
cmp	[esp+3Ch+var_28], 0
jz	short loc_7687E7
mov	ecx, [esp+3Ch+var_14]

loc_7687D1:
mov	edx, [edi+60h]
dec	[esp+3Ch+var_28]
mov	[edi+edx*2+68h], cx
inc	dword ptr [edi+60h]
cmp	[esp+3Ch+var_28], 0
jnz	short loc_7687D1

loc_7687E7:
mov	ecx, [edi+5Ch]
add	ecx, [edi+58h]
cmp	[edi+60h], ecx
jb	loc_7685E2

loc_7687F6:
cmp	dword ptr [edi], 1Bh
jz	loc_768EBE
lea	eax, [edi+528h]
lea	ecx, [edi+64h]
mov	[ecx], eax
mov	[edi+44h], eax
lea	edx, [edi+2E8h]
push	edx
mov	edx, [edi+58h]
lea	eax, [edi+4Ch]
push	eax
push	ecx
mov	dword ptr [eax], 9
push	edx
lea	eax, [edi+68h]
push	eax
push	1
call	sub_76AB40
add	esp, 18h
mov	[esp+3Ch+var_C], eax
test	eax, eax
jz	short loc_76886D
mov	ecx, [esp+3Ch+arg_0]
mov	eax, [esp+3Ch+var_2C]
mov	dword ptr [ecx+18h], offset aInvalidLiteral ; "invalid literal/lengths set"
jmp	loc_768EB8

loc_76884D:
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aInvalidBitLeng ; "invalid bit length repeat"
jmp	loc_768EB8

loc_76885D:
mov	ecx, [esp+3Ch+arg_0]
mov	dword ptr [ecx+18h], offset aInvalidBitLeng ; "invalid bit length repeat"
jmp	loc_768EB8

loc_76886D:
mov	edx, [edi+64h]
lea	ecx, [edi+64h]
mov	[edi+48h], edx
lea	edx, [edi+2E8h]
push	edx
lea	eax, [edi+50h]
push	eax
push	ecx
mov	ecx, [edi+58h]
mov	dword ptr [eax], 6
mov	eax, [edi+5Ch]
push	eax
lea	edx, [edi+ecx*2+68h]
push	edx
push	2
call	sub_76AB40
add	esp, 18h
mov	[esp+3Ch+var_C], eax
test	eax, eax
jz	short loc_7688BA
mov	eax, [esp+3Ch+arg_0]
mov	dword ptr [eax+18h], offset aInvalidDistanc ; "invalid distances set"
mov	eax, [esp+3Ch+var_2C]
jmp	loc_768EB8

loc_7688BA:
mov	eax, [esp+3Ch+var_2C]
mov	dword ptr [edi], 12h

loc_7688C4:		; jumptable 00767DA0 case 18
cmp	eax, 6
jb	short loc_768928
cmp	[esp+3Ch+var_24], 102h
jb	short loc_768928
mov	eax, [esp+3Ch+arg_0]
mov	edx, [esp+3Ch+var_24]
mov	ecx, [esp+3Ch+var_1C]
mov	[eax+10h], edx
mov	edx, [esp+3Ch+var_18]
mov	[eax+0Ch], ecx
mov	ecx, [esp+3Ch+var_2C]
push	edx
mov	[eax], ebp
mov	[eax+4], ecx
push	eax
mov	[edi+30h], ebx
mov	[edi+34h], esi
call	sub_76A6E0
mov	eax, [esp+44h+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [eax+10h]
mov	ebp, [eax]
mov	eax, [eax+4]
mov	ebx, [edi+30h]
mov	esi, [edi+34h]
add	esp, 8
mov	[esp+3Ch+var_1C], ecx
mov	[esp+3Ch+var_24], edx
mov	[esp+3Ch+var_2C], eax
jmp	loc_768EBE

loc_768928:
mov	ecx, [edi+4Ch]
mov	edx, 1
shl	edx, cl
mov	ecx, [edi+44h]
dec	edx
and	edx, ebx
mov	edx, [ecx+edx*4]
mov	ecx, edx
shr	ecx, 8
movzx	ecx, cl
mov	[esp+3Ch+var_28], edx
cmp	ecx, esi
jbe	short loc_76898E
jmp	short loc_768950
align 10h

loc_768950:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [edi+4Ch]
dec	eax
add	esi, 8
add	ebx, edx
mov	edx, 1
shl	edx, cl
mov	ecx, [edi+44h]
inc	ebp
mov	[esp+3Ch+var_2C], eax
dec	edx
and	edx, ebx
mov	edx, [ecx+edx*4]
mov	ecx, edx
shr	ecx, 8
movzx	ecx, cl
mov	[esp+3Ch+var_28], edx
cmp	ecx, esi
ja	short loc_768950

loc_76898E:
test	dl, dl
jz	loc_768A57
test	dl, 0F0h
jnz	loc_768A57
mov	ecx, edx
shr	ecx, 8
mov	[esp+3Ch+var_8], ecx
movzx	ecx, cl
mov	[esp+3Ch+var_14], ecx
movzx	ecx, dl
add	ecx, [esp+3Ch+var_14]
mov	[esp+3Ch+var_10], edx
mov	edx, 1
shl	edx, cl
mov	ecx, [esp+3Ch+var_14]
dec	edx
and	edx, ebx
shr	edx, cl
mov	ecx, [esp+3Ch+var_28]
shr	ecx, 10h
add	edx, ecx
mov	ecx, [edi+44h]
mov	ecx, [ecx+edx*4]
mov	[esp+3Ch+var_28], ecx
shr	ecx, 8
movzx	edx, cl
movzx	ecx, byte ptr [esp+3Ch+var_8]
add	edx, ecx
cmp	edx, esi
jbe	short loc_768A4A
mov	edi, edi

loc_7689F0:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [esp+3Ch+var_10]
dec	eax
add	esi, 8
add	ebx, edx
movzx	edx, ch
movzx	ecx, cl
add	ecx, edx
mov	[esp+3Ch+var_14], edx
mov	edx, 1
shl	edx, cl
mov	ecx, [esp+3Ch+var_14]
inc	ebp
mov	[esp+3Ch+var_2C], eax
dec	edx
and	edx, ebx
shr	edx, cl
movzx	ecx, word ptr [esp+3Ch+var_10+2]
add	edx, ecx
mov	ecx, [edi+44h]
mov	ecx, [ecx+edx*4]
mov	[esp+3Ch+var_28], ecx
shr	ecx, 8
movzx	edx, cl
add	edx, [esp+3Ch+var_14]
cmp	edx, esi
ja	short loc_7689F0

loc_768A4A:
movzx	ecx, byte ptr [esp+3Ch+var_10+1]
mov	edx, [esp+3Ch+var_28]
shr	ebx, cl
sub	esi, ecx

loc_768A57:
mov	ecx, edx
shr	ecx, 8
movzx	ecx, cl
shr	ebx, cl
sub	esi, ecx
mov	[esp+3Ch+var_14], ecx
mov	ecx, edx
shr	ecx, 10h
mov	[edi+38h], ecx
test	dl, dl
jnz	short loc_768A7E
mov	dword ptr [edi], 17h
jmp	loc_768EBE

loc_768A7E:
test	dl, 20h
jz	short loc_768A8E

loc_768A83:
mov	dword ptr [edi], 0Bh
jmp	loc_768EBE

loc_768A8E:
test	dl, 40h
jz	short loc_768AA3
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aInvalidLiter_0 ; "invalid literal/length code"
jmp	loc_768EB8

loc_768AA3:
movzx	ecx, dl
and	ecx, 0Fh
mov	[edi+40h], ecx
mov	dword ptr [edi], 13h

loc_768AB2:		; jumptable 00767DA0 case 19
mov	ecx, [edi+40h]
test	ecx, ecx
jz	short loc_768AF4
cmp	esi, ecx
jnb	short loc_768AE0
lea	ecx, [ecx+0]

loc_768AC0:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, [edi+40h]
jb	short loc_768AC0

loc_768AE0:
mov	ecx, [edi+40h]
mov	edx, 1
shl	edx, cl
dec	edx
and	edx, ebx
add	[edi+38h], edx
shr	ebx, cl
sub	esi, ecx

loc_768AF4:
mov	dword ptr [edi], 14h

loc_768AFA:		; jumptable 00767DA0 case 20
mov	ecx, [edi+50h]
mov	edx, 1
shl	edx, cl
mov	ecx, [edi+48h]
dec	edx
and	edx, ebx
mov	edx, [ecx+edx*4]
mov	ecx, edx
shr	ecx, 8
movzx	ecx, cl
mov	[esp+3Ch+var_28], edx
cmp	ecx, esi
jbe	short loc_768B5E
lea	ecx, [ecx+0]

loc_768B20:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [edi+50h]
dec	eax
add	esi, 8
add	ebx, edx
mov	edx, 1
shl	edx, cl
mov	ecx, [edi+48h]
inc	ebp
mov	[esp+3Ch+var_2C], eax
dec	edx
and	edx, ebx
mov	edx, [ecx+edx*4]
mov	ecx, edx
shr	ecx, 8
movzx	ecx, cl
mov	[esp+3Ch+var_28], edx
cmp	ecx, esi
ja	short loc_768B20

loc_768B5E:
test	dl, 0F0h
jnz	loc_768C1D
mov	ecx, edx
shr	ecx, 8
mov	[esp+3Ch+var_8], ecx
movzx	ecx, cl
mov	[esp+3Ch+var_14], ecx
movzx	ecx, dl
add	ecx, [esp+3Ch+var_14]
mov	[esp+3Ch+var_10], edx
mov	edx, 1
shl	edx, cl
mov	ecx, [esp+3Ch+var_14]
dec	edx
and	edx, ebx
shr	edx, cl
mov	ecx, [esp+3Ch+var_28]
shr	ecx, 10h
add	edx, ecx
mov	ecx, [edi+48h]
mov	ecx, [ecx+edx*4]
mov	[esp+3Ch+var_28], ecx
shr	ecx, 8
movzx	edx, cl
movzx	ecx, byte ptr [esp+3Ch+var_8]
add	edx, ecx
cmp	edx, esi
jbe	short loc_768C10

loc_768BB6:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
mov	ecx, [esp+3Ch+var_10]
dec	eax
add	esi, 8
add	ebx, edx
movzx	edx, ch
movzx	ecx, cl
add	ecx, edx
mov	[esp+3Ch+var_14], edx
mov	edx, 1
shl	edx, cl
mov	ecx, [esp+3Ch+var_14]
inc	ebp
mov	[esp+3Ch+var_2C], eax
dec	edx
and	edx, ebx
shr	edx, cl
movzx	ecx, word ptr [esp+3Ch+var_10+2]
add	edx, ecx
mov	ecx, [edi+48h]
mov	ecx, [ecx+edx*4]
mov	[esp+3Ch+var_28], ecx
shr	ecx, 8
movzx	edx, cl
add	edx, [esp+3Ch+var_14]
cmp	edx, esi
ja	short loc_768BB6

loc_768C10:
movzx	ecx, byte ptr [esp+3Ch+var_10+1]
mov	edx, [esp+3Ch+var_28]
shr	ebx, cl
sub	esi, ecx

loc_768C1D:
mov	ecx, edx
shr	ecx, 8
movzx	ecx, cl
shr	ebx, cl
sub	esi, ecx
mov	[esp+3Ch+var_14], ecx
test	dl, 40h
jz	short loc_768C42
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aInvalidDista_0 ; "invalid distance	code"
jmp	loc_768EB8

loc_768C42:
mov	ecx, edx
movzx	edx, dl
shr	ecx, 10h
and	edx, 0Fh
mov	[edi+3Ch], ecx
mov	[edi+40h], edx
mov	dword ptr [edi], 15h

loc_768C59:		; jumptable 00767DA0 case 21
mov	ecx, [edi+40h]
test	ecx, ecx
jz	short loc_768C98
cmp	esi, ecx
jnb	short loc_768C84

loc_768C64:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, [edi+40h]
jb	short loc_768C64

loc_768C84:
mov	ecx, [edi+40h]
mov	edx, 1
shl	edx, cl
dec	edx
and	edx, ebx
add	[edi+3Ch], edx
shr	ebx, cl
sub	esi, ecx

loc_768C98:
mov	ecx, [edi+24h]
sub	ecx, [esp+3Ch+var_24]
add	ecx, [esp+3Ch+var_18]
cmp	[edi+3Ch], ecx
jbe	short loc_768CB8
mov	edx, [esp+3Ch+arg_0]
mov	dword ptr [edx+18h], offset aInvalidDista_1 ; "invalid distance	too far	back"
jmp	loc_768EB8

loc_768CB8:
mov	dword ptr [edi], 16h

loc_768CBE:		; jumptable 00767DA0 case 22
cmp	[esp+3Ch+var_24], 0
jz	loc_768F1C
mov	edx, [esp+3Ch+var_18]
sub	edx, [esp+3Ch+var_24]
mov	ecx, [edi+3Ch]
cmp	ecx, edx
jbe	short loc_768D14
sub	ecx, edx
mov	edx, [edi+28h]
mov	[esp+3Ch+var_28], ecx
cmp	ecx, edx
jbe	short loc_768CF5
sub	ecx, edx
mov	edx, [edi+2Ch]
add	edx, [edi+20h]
mov	[esp+3Ch+var_28], ecx
sub	edx, ecx
jmp	short loc_768D01

loc_768CF5:
mov	edx, [edi+2Ch]
sub	edx, ecx
add	edx, [edi+28h]
mov	ecx, [esp+3Ch+var_28]

loc_768D01:
mov	[esp+3Ch+var_10], edx
mov	edx, [edi+38h]
mov	[esp+3Ch+var_8], edx
cmp	ecx, edx
jbe	short loc_768D29
mov	ecx, edx
jmp	short loc_768D25

loc_768D14:
mov	edx, [esp+3Ch+var_1C]
sub	edx, ecx
mov	ecx, [edi+38h]
mov	[esp+3Ch+var_10], edx
mov	[esp+3Ch+var_8], ecx

loc_768D25:
mov	[esp+3Ch+var_28], ecx

loc_768D29:
mov	edx, [esp+3Ch+var_24]
cmp	ecx, edx
jbe	short loc_768D37
mov	ecx, edx
mov	[esp+3Ch+var_28], ecx

loc_768D37:
sub	edx, ecx
mov	[esp+3Ch+var_24], edx
mov	edx, [esp+3Ch+var_8]
sub	edx, ecx
mov	ecx, [esp+3Ch+var_1C]
mov	[edi+38h], edx
lea	ebx, [ebx+0]

loc_768D50:
mov	edx, [esp+3Ch+var_10]
mov	dl, [edx]
inc	[esp+3Ch+var_10]
mov	[ecx], dl
inc	ecx
sub	[esp+3Ch+var_28], 1
jnz	short loc_768D50
cmp	dword ptr [edi+38h], 0
mov	[esp+3Ch+var_1C], ecx
jnz	loc_768EBE
mov	dword ptr [edi], 12h
jmp	loc_768EBE

loc_768D7D:		; jumptable 00767DA0 case 23
cmp	[esp+3Ch+var_24], 0
jz	loc_768F1C
mov	ecx, [esp+3Ch+var_1C]
mov	dl, [edi+38h]
mov	[ecx], dl
inc	ecx
dec	[esp+3Ch+var_24]
mov	[esp+3Ch+var_1C], ecx
mov	dword ptr [edi], 12h
jmp	loc_768EBE

loc_768DA5:		; jumptable 00767DA0 case 24
cmp	dword ptr [edi+8], 0
jz	loc_768E69
cmp	esi, 20h
jnb	short loc_768DD4

loc_768DB4:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 20h
jb	short loc_768DB4

loc_768DD4:
mov	ecx, [esp+3Ch+var_18]
sub	ecx, [esp+3Ch+var_24]
mov	edx, [esp+3Ch+arg_0]
add	[edx+14h], ecx
add	[edi+18h], ecx
mov	[esp+3Ch+var_18], ecx
test	ecx, ecx
jz	short loc_768E1F
mov	edx, [edi+14h]
mov	eax, ecx
mov	ecx, [esp+3Ch+var_1C]
push	eax
sub	ecx, eax
cmp	dword ptr [edi+10h], 0
push	ecx
push	edx
jz	short loc_768E09
call	sub_76B430
jmp	short loc_768E0E

loc_768E09:
call	sub_76B010

loc_768E0E:
mov	ecx, [esp+48h+arg_0]
mov	[edi+14h], eax
mov	[ecx+30h], eax
mov	eax, [esp+48h+var_2C]
add	esp, 0Ch

loc_768E1F:
cmp	dword ptr [edi+10h], 0
mov	edx, [esp+3Ch+var_24]
mov	[esp+3Ch+var_18], edx
mov	ecx, ebx
jnz	short loc_768E53
and	ecx, 0FF00h
mov	edx, ebx
shl	edx, 10h
add	ecx, edx
mov	edx, ebx
shr	edx, 8
and	edx, 0FF00h
shl	ecx, 8
add	ecx, edx
mov	edx, ebx
shr	edx, 18h
add	ecx, edx

loc_768E53:
cmp	ecx, [edi+14h]
jz	short loc_768E65
mov	ecx, [esp+3Ch+arg_0]
mov	dword ptr [ecx+18h], offset aIncorrectDataC ; "incorrect data check"
jmp	short loc_768EB8

loc_768E65:
xor	ebx, ebx
xor	esi, esi

loc_768E69:
mov	dword ptr [edi], 19h

loc_768E6F:		; jumptable 00767DA0 case 25
cmp	dword ptr [edi+8], 0
jz	loc_768F04
cmp	dword ptr [edi+10h], 0
jz	loc_768F04
cmp	esi, 20h
jnb	short loc_768EA8

loc_768E88:
test	eax, eax
jz	loc_768F1C
movzx	edx, byte ptr [ebp+0]
mov	ecx, esi
shl	edx, cl
dec	eax
add	esi, 8
inc	ebp
add	ebx, edx
mov	[esp+3Ch+var_2C], eax
cmp	esi, 20h
jb	short loc_768E88

loc_768EA8:
cmp	ebx, [edi+18h]
jz	short loc_768F00
mov	ecx, [esp+3Ch+arg_0]
mov	dword ptr [ecx+18h], offset aIncorrectLengt ; "incorrect length	check"

loc_768EB8:
mov	dword ptr [edi], 1Bh

loc_768EBE:
mov	ecx, [edi]
cmp	ecx, 1Ch
jbe	loc_767DA0

loc_768EC9:		; default
mov	eax, 0FFFFFFFEh

loc_768ECE:
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 2Ch
retn

loc_768ED6:
mov	ecx, [esp+3Ch+arg_0]
mov	edx, [esp+3Ch+var_1C]
mov	[ecx+0Ch], edx
mov	edx, [esp+3Ch+var_24]
mov	[ecx], ebp
mov	[ecx+4], eax
mov	[ecx+10h], edx
mov	[edi+34h], esi
pop	esi
pop	ebp
mov	[edi+30h], ebx
pop	ebx
mov	eax, 2
pop	edi
add	esp, 2Ch
retn

loc_768F00:
xor	ebx, ebx
xor	esi, esi

loc_768F04:
mov	dword ptr [edi], 1Ah

loc_768F0A:		; jumptable 00767DA0 case 26
mov	[esp+3Ch+var_C], 1
jmp	short loc_768F1C

loc_768F14:		; jumptable 00767DA0 case 27
mov	[esp+3Ch+var_C], 0FFFFFFFDh

loc_768F1C:
mov	ecx, [esp+3Ch+arg_0]
mov	edx, [esp+3Ch+var_1C]
mov	[ecx+0Ch], edx
mov	edx, [esp+3Ch+var_24]
mov	[ecx+10h], edx
mov	[ecx], ebp
mov	[ecx+4], eax
cmp	dword ptr [edi+20h], 0
mov	[edi+30h], ebx
mov	[edi+34h], esi
jnz	short loc_768F4D
cmp	dword ptr [edi], 18h
jge	short loc_768F71
mov	eax, [esp+3Ch+var_18]
cmp	eax, [ecx+10h]
jz	short loc_768F71

loc_768F4D:
mov	eax, [esp+3Ch+var_18]
mov	ebx, [esp+3Ch+arg_0]
call	sub_767C40
test	eax, eax
jz	short loc_768F71
mov	dword ptr [edi], 1Ch

loc_768F64:		; jumptable 00767DA0 case 28
pop	esi
pop	ebp
pop	ebx
mov	eax, 0FFFFFFFCh
pop	edi
add	esp, 2Ch
retn

loc_768F71:
mov	esi, [esp+3Ch+arg_0]
mov	ebp, [esp+3Ch+var_4]
sub	ebp, [esi+4]
mov	ebx, [esp+3Ch+var_18]
sub	ebx, [esi+10h]
add	[esi+8], ebp
add	[esi+14h], ebx
add	[edi+18h], ebx
cmp	dword ptr [edi+8], 0
jz	short loc_768FC6
test	ebx, ebx
jz	short loc_768FC6
cmp	dword ptr [edi+10h], 0
push	ebx
jz	short loc_768FAE
mov	edx, [esi+0Ch]
mov	eax, [edi+14h]
sub	edx, ebx
push	edx
push	eax
call	sub_76B430
jmp	short loc_768FBD

loc_768FAE:
mov	ecx, [esi+0Ch]
mov	edx, [edi+14h]
sub	ecx, ebx
push	ecx
push	edx
call	sub_76B010

loc_768FBD:
mov	[edi+14h], eax
add	esp, 0Ch
mov	[esi+30h], eax

loc_768FC6:
mov	eax, [edi+4]
neg	eax
sbb	eax, eax
and	eax, 40h
xor	ecx, ecx
cmp	dword ptr [edi], 0Bh
setnz	cl
dec	ecx
and	ecx, 80h
add	eax, ecx
add	eax, [edi+34h]
mov	[esi+2Ch], eax
test	ebp, ebp
jnz	short loc_768FEF
test	ebx, ebx
jz	short loc_768FF6

loc_768FEF:
cmp	[esp+3Ch+arg_4], 4
jnz	short loc_76900F

loc_768FF6:
mov	eax, [esp+3Ch+var_C]
test	eax, eax
jnz	loc_768ECE
pop	esi
pop	ebp
pop	ebx
mov	eax, 0FFFFFFFBh
pop	edi
add	esp, 2Ch
retn

loc_76900F:
mov	eax, [esp+3Ch+var_C]
pop	esi
pop	ebp
pop	ebx
pop	edi
add	esp, 2Ch
retn

loc_76901B:
mov	eax, 0FFFFFFFEh
pop	edi
add	esp, 2Ch
retn
sub_767D20 endp

align 4
off_769028 dd offset loc_767DA7	; jump table for switch	statement
dd offset loc_767EE4
dd offset loc_767F79
dd offset loc_767FEC
dd offset loc_768049
dd offset loc_7680B2
dd offset loc_768112
dd offset loc_768175
dd offset loc_7681E2
dd offset loc_768253
dd offset loc_7682B0
dd offset loc_7682DC
dd offset loc_7682E7
dd offset loc_7683AD
dd offset loc_768410
dd offset loc_768470
dd offset loc_7684E6
dd offset loc_7685D3
dd offset loc_7688C4
dd offset loc_768AB2
dd offset loc_768AFA
dd offset loc_768C59
dd offset loc_768CBE
dd offset loc_768D7D
dd offset loc_768DA5
dd offset loc_768E6F
dd offset loc_768F0A
dd offset loc_768F14
dd offset loc_768F64
off_76909C dd offset loc_768342	; jump table for switch	statement
dd offset loc_768353
dd offset loc_768380
dd offset loc_768391
align 10h



sub_7690B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
test	esi, esi
jz	short loc_7690F3
mov	eax, [esi+1Ch]
test	eax, eax
jz	short loc_7690F3
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_7690F3
mov	eax, [eax+2Ch]
test	eax, eax
jz	short loc_7690D8
push	eax
mov	eax, [esi+28h]
push	eax
call	ecx
add	esp, 8

loc_7690D8:
mov	ecx, [esi+1Ch]
mov	edx, [esi+28h]
mov	eax, [esi+24h]
push	ecx
push	edx
call	eax
add	esp, 8
mov	dword ptr [esi+1Ch], 0
xor	eax, eax
pop	esi
retn

loc_7690F3:
mov	eax, 0FFFFFFFEh
pop	esi
retn
sub_7690B0 endp

align 10h



sub_769100 proc	near
push	esi
mov	esi, [eax+8]
push	edi
mov	edi, [eax+14h]
mov	edx, ecx
shr	edx, 8
mov	[esi+edi], dl
mov	edi, [eax+8]
mov	esi, 1
add	[eax+14h], esi
mov	edx, [eax+14h]
mov	[edx+edi], cl
add	[eax+14h], esi
pop	edi
pop	esi
retn
sub_769100 endp

align 10h



sub_769130 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+1Ch]
mov	ecx, [esi+10h]
push	edi
mov	edi, [eax+14h]
cmp	edi, ecx
cmova	edi, ecx
test	edi, edi
jz	short loc_76917B
mov	eax, [eax+10h]
mov	ecx, [esi+0Ch]
push	edi
push	eax
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi+1Ch]
add	[esi+0Ch], edi
add	[eax+10h], edi
add	[esi+14h], edi
sub	[esi+10h], edi
mov	eax, [esi+1Ch]
sub	[eax+14h], edi
mov	esi, [esi+1Ch]
add	esp, 0Ch
cmp	dword ptr [esi+14h], 0
jnz	short loc_76917B
mov	edx, [esi+8]
mov	[esi+10h], edx

loc_76917B:
pop	edi
pop	esi
retn
sub_769130 endp

align 10h



sub_769180 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
test	edi, edi
jz	loc_769577
mov	esi, [edi+1Ch]
test	esi, esi
jz	loc_769577
mov	ebp, [esp+0Ch+arg_4]
cmp	ebp, 4
ja	loc_769577
cmp	dword ptr [edi+0Ch], 0
jz	loc_76956F
cmp	dword ptr [edi], 0
jnz	short loc_7691C0
cmp	dword ptr [edi+4], 0
jnz	loc_76956F

loc_7691C0:
mov	eax, [esi+4]
cmp	eax, 29Ah
jnz	short loc_7691D3
cmp	ebp, 4
jnz	loc_76956F

loc_7691D3:
cmp	dword ptr [edi+10h], 0
jnz	short loc_7691EA
mov	eax, ds:off_1442484
mov	[edi+18h], eax
pop	edi
pop	esi
mov	eax, 0FFFFFFFBh
pop	ebp
retn

loc_7691EA:
mov	ecx, [esi+20h]
push	ebx
mov	[esi], edi
mov	[esp+10h+arg_0], ecx
mov	[esi+20h], ebp
mov	ebx, 1
cmp	eax, 2Ah
jnz	loc_76936B
mov	edx, 2
cmp	[esi+18h], edx
jnz	loc_7692CC
mov	ecx, [esi+14h]
mov	eax, [esi+8]
mov	byte ptr [eax+ecx], 1Fh
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	byte ptr [eax+ecx], 8Bh
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	byte ptr [eax+ecx], 8
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	byte ptr [eax+ecx], 0
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	byte ptr [eax+ecx], 0
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	byte ptr [eax+ecx], 0
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	byte ptr [eax+ecx], 0
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	byte ptr [eax+ecx], 0
add	[esi+14h], ebx
mov	eax, [esi+7Ch]
mov	ecx, [esi+14h]
cmp	eax, 9
jnz	short loc_76928A
mov	eax, edx
jmp	short loc_76929F

loc_76928A:
cmp	[esi+80h], edx
jge	short loc_76929A
cmp	eax, edx
jl	short loc_76929A
xor	eax, eax
jmp	short loc_76929F

loc_76929A:
mov	eax, 4

loc_76929F:
mov	edx, [esi+8]
mov	[ecx+edx], al
add	[esi+14h], ebx
mov	eax, [esi+14h]
mov	ecx, [esi+8]
push	0
mov	byte ptr [eax+ecx], 0FFh
add	[esi+14h], ebx
push	0
push	0
mov	dword ptr [esi+4], 71h
call	sub_76B430
jmp	loc_769365

loc_7692CC:
mov	ecx, [esi+28h]
sub	ecx, 8
shl	ecx, 0Ch
add	ecx, 800h
cmp	[esi+80h], edx
jge	short loc_76930B
mov	ebp, [esi+7Ch]
cmp	ebp, edx
jl	short loc_769307
cmp	ebp, 6
jge	short loc_7692F7
mov	ebp, [esp+10h+arg_4]
mov	eax, ebx
jmp	short loc_76930D

loc_7692F7:
xor	eax, eax
cmp	ebp, 6
mov	ebp, [esp+10h+arg_4]
setnz	al
add	eax, edx
jmp	short loc_76930D

loc_769307:
mov	ebp, [esp+10h+arg_4]

loc_76930B:
xor	eax, eax

loc_76930D:
shl	eax, 6
or	ecx, eax
cmp	dword ptr [esi+64h], 0
jz	short loc_76931B
or	ecx, 20h

loc_76931B:
mov	eax, 8421085h
mul	ecx
sub	ecx, edx
shr	ecx, 1
add	ecx, edx
shr	ecx, 4
add	ecx, ebx
mov	eax, ecx
shl	ecx, 5
sub	ecx, eax
mov	eax, esi
mov	dword ptr [esi+4], 71h
call	sub_769100
cmp	dword ptr [esi+64h], 0
jz	short loc_76935A
movzx	ecx, word ptr [edi+32h]
call	sub_769100
movzx	ecx, word ptr [edi+30h]
call	sub_769100

loc_76935A:
push	0
push	0
push	0
call	sub_76B010

loc_769365:
mov	[edi+30h], eax
add	esp, 0Ch

loc_76936B:
cmp	dword ptr [esi+14h], 0
jz	short loc_76938C
mov	eax, edi
call	sub_769130
cmp	dword ptr [edi+10h], 0
jnz	short loc_7693B0

loc_76937E:
mov	dword ptr [esi+20h], 0FFFFFFFFh

loc_769385:
pop	ebx
pop	edi
pop	esi
xor	eax, eax
pop	ebp
retn

loc_76938C:
cmp	dword ptr [edi+4], 0
jnz	short loc_7693B0
cmp	ebp, [esp+10h+arg_0]
jg	short loc_7693B0
cmp	ebp, 4
jz	short loc_7693B0
mov	edx, ds:off_1442484
pop	ebx
mov	[edi+18h], edx
pop	edi
pop	esi
mov	eax, 0FFFFFFFBh
pop	ebp
retn

loc_7693B0:
mov	eax, [esi+4]
cmp	eax, 29Ah
jnz	short loc_7693D2
cmp	dword ptr [edi+4], 0
jz	short loc_7693D8
mov	eax, ds:off_1442484
pop	ebx
mov	[edi+18h], eax
pop	edi
pop	esi
mov	eax, 0FFFFFFFBh
pop	ebp
retn

loc_7693D2:
cmp	dword ptr [edi+4], 0
jnz	short loc_7693F1

loc_7693D8:
cmp	dword ptr [esi+6Ch], 0
jnz	short loc_7693F1
test	ebp, ebp
jz	loc_769481
cmp	eax, 29Ah
jz	loc_769481

loc_7693F1:
mov	eax, [esi+7Ch]
lea	ecx, [eax+eax*2]
mov	edx, ds:off_1442370[ecx*4]
push	ebp
push	esi
call	edx ; sub_769A20
add	esp, 8
cmp	eax, 2
jz	short loc_76940F
cmp	eax, 3
jnz	short loc_769416

loc_76940F:
mov	dword ptr [esi+4], 29Ah

loc_769416:
test	eax, eax
jz	loc_769557
cmp	eax, 2
jz	loc_769557
cmp	eax, ebx
jnz	short loc_769481
cmp	ebp, ebx
jnz	short loc_76943A
push	esi
call	sub_76CA90
add	esp, 4
jmp	short loc_769470

loc_76943A:
push	0
push	0
push	0
push	esi
call	sub_76C9F0
add	esp, 10h
cmp	ebp, 3
jnz	short loc_769470
mov	eax, [esi+44h]
mov	ecx, [esi+3Ch]
xor	edx, edx
mov	[ecx+eax*2-2], dx
mov	eax, [esi+44h]
lea	ecx, [eax+eax-2]
push	ecx		; size_t
push	edx		; int
mov	edx, [esi+3Ch]
push	edx		; void *
call	_memset
add	esp, 0Ch

loc_769470:
mov	eax, edi
call	sub_769130
cmp	dword ptr [edi+10h], 0
jz	loc_76937E

loc_769481:
cmp	ebp, 4
jnz	loc_769385
mov	eax, [esi+18h]
test	eax, eax
jg	short loc_769498
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
pop	ebp
retn

loc_769498:
cmp	eax, 2
jnz	loc_769523
movzx	edx, byte ptr [edi+30h]
mov	ecx, [esi+14h]
mov	eax, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
movzx	edx, byte ptr [edi+31h]
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
movzx	edx, byte ptr [edi+32h]
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
movzx	edx, byte ptr [edi+33h]
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
movzx	edx, byte ptr [edi+8]
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
movzx	edx, byte ptr [edi+9]
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
movzx	edx, byte ptr [edi+0Ah]
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
movzx	edx, byte ptr [edi+0Bh]
mov	eax, [esi+14h]
mov	ecx, [esi+8]
mov	[eax+ecx], dl
add	[esi+14h], ebx
jmp	short loc_769537

loc_769523:
movzx	ecx, word ptr [edi+32h]
mov	eax, esi
call	sub_769100
movzx	ecx, word ptr [edi+30h]
call	sub_769100

loc_769537:
mov	eax, edi
call	sub_769130
mov	eax, [esi+18h]
test	eax, eax
jle	short loc_76954A
neg	eax
mov	[esi+18h], eax

loc_76954A:
pop	ebx
xor	eax, eax
cmp	[esi+14h], eax
pop	edi
pop	esi
setz	al
pop	ebp
retn

loc_769557:
cmp	dword ptr [edi+10h], 0
jnz	loc_769385
pop	ebx
pop	edi
mov	dword ptr [esi+20h], 0FFFFFFFFh
pop	esi
xor	eax, eax
pop	ebp
retn

loc_76956F:
mov	eax, ds:off_1442478
mov	[edi+18h], eax

loc_769577:
pop	edi
pop	esi
mov	eax, 0FFFFFFFEh
pop	ebp
retn
sub_769180 endp




sub_769580 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
test	esi, esi
jz	loc_769635
mov	eax, [esi+1Ch]
test	eax, eax
jz	loc_769635
push	edi
mov	edi, [eax+4]
cmp	edi, 2Ah
jz	short loc_7695B6
cmp	edi, 71h
jz	short loc_7695B6
cmp	edi, 29Ah
jz	short loc_7695B6
pop	edi
mov	eax, 0FFFFFFFEh
pop	esi
retn

loc_7695B6:
mov	eax, [eax+8]
test	eax, eax
jz	short loc_7695CA
mov	ecx, [esi+24h]
push	eax
mov	eax, [esi+28h]
push	eax
call	ecx
add	esp, 8

loc_7695CA:
mov	edx, [esi+1Ch]
mov	eax, [edx+3Ch]
test	eax, eax
jz	short loc_7695E1
mov	ecx, [esi+24h]
push	eax
mov	eax, [esi+28h]
push	eax
call	ecx
add	esp, 8

loc_7695E1:
mov	edx, [esi+1Ch]
mov	eax, [edx+38h]
test	eax, eax
jz	short loc_7695F8
mov	ecx, [esi+24h]
push	eax
mov	eax, [esi+28h]
push	eax
call	ecx
add	esp, 8

loc_7695F8:
mov	edx, [esi+1Ch]
mov	eax, [edx+30h]
test	eax, eax
jz	short loc_76960F
mov	ecx, [esi+24h]
push	eax
mov	eax, [esi+28h]
push	eax
call	ecx
add	esp, 8

loc_76960F:
mov	edx, [esi+1Ch]
mov	eax, [esi+28h]
mov	ecx, [esi+24h]
push	edx
push	eax
call	ecx
add	esp, 8
xor	eax, eax
cmp	edi, 71h
setnz	al
pop	edi
mov	dword ptr [esi+1Ch], 0
pop	esi
dec	eax
and	eax, 0FFFFFFFDh
retn

loc_769635:
mov	eax, 0FFFFFFFEh
pop	esi
retn
sub_769580 endp

align 10h



sub_769640 proc	near
mov	eax, [esi+24h]
mov	ecx, [esi+44h]
mov	edx, [esi+3Ch]
add	eax, eax
mov	[esi+34h], eax
xor	eax, eax
mov	[edx+ecx*2-2], ax
mov	ecx, [esi+44h]
mov	eax, [esi+3Ch]
push	edi
lea	edx, [ecx+ecx-2]
push	edx		; size_t
xor	edi, edi
push	edi		; int
push	eax		; void *
call	_memset
mov	eax, [esi+7Ch]
lea	eax, [eax+eax*2]
add	eax, eax
movzx	ecx, ds:word_144236A[eax+eax]
add	eax, eax
mov	[esi+78h], ecx
movzx	edx, ds:word_1442368[eax]
mov	[esi+84h], edx
movzx	ecx, ds:word_144236C[eax]
mov	[esi+88h], ecx
movzx	edx, ds:word_144236E[eax]
mov	eax, 2
add	esp, 0Ch
mov	[esi+64h], edi
mov	[esi+54h], edi
mov	[esi+6Ch], edi
mov	[esi+60h], edi
mov	[esi+40h], edi
mov	[esi+74h], edx
mov	[esi+70h], eax
mov	[esi+58h], eax
pop	edi
retn
sub_769640 endp

align 10h



sub_7696D0 proc	near

var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

sub	esp, 14h
mov	ecx, [edi+74h]
mov	edx, [edi+64h]
push	ebx
push	ebp
mov	ebp, [edi+70h]
push	esi
mov	esi, [edi+88h]
mov	[esp+20h+var_10], ecx
mov	ecx, [edi+30h]
mov	[esp+20h+var_C], esi
mov	esi, [edi+24h]
lea	ebx, [esi-106h]
add	ecx, edx
cmp	edx, ebx
jbe	short loc_76970D
sub	edx, esi
add	edx, 106h
mov	[esp+20h+var_8], edx
jmp	short loc_769715

loc_76970D:
mov	[esp+20h+var_8], 0

loc_769715:
movzx	edx, byte ptr [ecx+ebp-1]
mov	[esp+20h+var_12], dl
movzx	edx, byte ptr [ecx+ebp]
lea	esi, [ecx+102h]
mov	[esp+20h+var_11], dl
cmp	ebp, [edi+84h]
jb	short loc_769739
shr	[esp+20h+var_10], 2

loc_769739:
mov	edx, [edi+6Ch]
cmp	[esp+20h+var_C], edx
jbe	short loc_769746
mov	[esp+20h+var_C], edx

loc_769746:
mov	edx, [edi+30h]
mov	bl, [esp+20h+var_11]
add	edx, eax
cmp	[edx+ebp], bl
jnz	loc_7697FB
mov	bl, [esp+20h+var_12]
cmp	[edx+ebp-1], bl
jnz	loc_7697FB
mov	bl, [edx]
cmp	bl, [ecx]
jnz	loc_7697FB
mov	bl, [edx+1]
inc	edx
cmp	bl, [ecx+1]
jnz	loc_7697FB
add	ecx, 2
inc	edx

loc_769781:
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
mov	bl, [ecx+1]
inc	ecx
inc	edx
cmp	bl, [edx]
jnz	short loc_7697CD
cmp	ecx, esi
jb	short loc_769781

loc_7697CD:
mov	edx, ecx
sub	edx, esi
add	edx, 102h
cmp	edx, ebp
lea	ecx, [esi-102h]
jle	short loc_7697FB
cmp	edx, [esp+20h+var_C]
mov	[edi+68h], eax
mov	ebp, edx
jge	short loc_769818
mov	bl, [edx+ecx-1]
mov	dl, [edx+ecx]
mov	[esp+20h+var_12], bl
mov	[esp+20h+var_11], dl

loc_7697FB:
mov	edx, [edi+2Ch]
and	edx, eax
mov	eax, [edi+38h]
movzx	eax, word ptr [eax+edx*2]
cmp	eax, [esp+20h+var_8]
jbe	short loc_769818
sub	[esp+20h+var_10], 1
jnz	loc_769746

loc_769818:
mov	eax, [edi+6Ch]
cmp	ebp, eax
ja	short loc_769821
mov	eax, ebp

loc_769821:
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_7696D0 endp

align 10h



sub_769830 proc	near

arg_0= dword ptr  4

mov	ecx, [esi+30h]
mov	eax, [esi+64h]
push	ebp
mov	ebp, [esp+4+arg_0]
mov	dl, [ecx+ebp]
add	eax, ecx
add	ecx, ebp
push	edi
lea	edi, [eax+102h]
cmp	dl, [eax]
jnz	short loc_7698C7
mov	dl, [ecx+1]
cmp	dl, [eax+1]
jnz	short loc_7698C7
add	eax, 2
add	ecx, 2
jmp	short loc_769860
align 10h

loc_769860:
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
mov	dl, [eax+1]
inc	eax
inc	ecx
cmp	dl, [ecx]
jnz	short loc_7698AC
cmp	eax, edi
jb	short loc_769860

loc_7698AC:
sub	eax, edi
add	eax, 102h
cmp	eax, 3
jl	short loc_7698C7
mov	ecx, [esi+6Ch]
mov	[esi+68h], ebp
cmp	eax, ecx
jbe	short loc_7698CC
pop	edi
mov	eax, ecx
pop	ebp
retn

loc_7698C7:
mov	eax, 2

loc_7698CC:
pop	edi
pop	ebp
retn
sub_769830 endp

align 10h



sub_7698D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esi+24h]
push	edi
lea	esp, [esp+0]

loc_7698E0:
mov	edi, [esi+34h]
sub	edi, [esi+6Ch]
mov	eax, [esi+64h]
mov	ecx, [esi+24h]
sub	edi, eax
lea	edx, [ecx+ebp-106h]
mov	[esp+14h+var_8], edi
cmp	eax, edx
jb	short loc_769960
mov	eax, [esi+30h]
push	ebp
lea	ecx, [eax+ebp]
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi+44h]
mov	eax, [esi+3Ch]
sub	[esi+68h], ebp
sub	[esi+64h], ebp
add	esp, 0Ch
sub	[esi+54h], ebp
lea	ecx, [eax+edx*2]

loc_769920:
movzx	eax, word ptr [ecx-2]
sub	ecx, 2
cmp	eax, ebp
jb	short loc_76992F
sub	eax, ebp
jmp	short loc_769931

loc_76992F:
xor	eax, eax

loc_769931:
sub	edx, 1
mov	[ecx], ax
jnz	short loc_769920
mov	ecx, [esi+38h]
mov	edx, ebp
lea	ecx, [ecx+ebp*2]

loc_769941:
movzx	eax, word ptr [ecx-2]
sub	ecx, 2
cmp	eax, ebp
jb	short loc_769950
sub	eax, ebp
jmp	short loc_769952

loc_769950:
xor	eax, eax

loc_769952:
sub	edx, 1
mov	[ecx], ax
jnz	short loc_769941
add	edi, ebp
mov	[esp+14h+var_8], edi

loc_769960:
mov	edi, [esi]
cmp	dword ptr [edi+4], 0
jz	loc_769A16
mov	eax, [esi+6Ch]
add	eax, [esi+64h]
mov	ecx, [edi+4]
add	eax, [esi+30h]
mov	edx, [esp+14h+var_8]
mov	ebx, ecx
cmp	ebx, edx
cmova	ebx, edx
mov	[esp+14h+var_4], eax
test	ebx, ebx
jz	short loc_7699D8
mov	edx, [edi+1Ch]
sub	ecx, ebx
mov	[edi+4], ecx
mov	ecx, [edx+18h]
cmp	ecx, 1
jnz	short loc_7699AA
mov	eax, [edi]
mov	ecx, [edi+30h]
push	ebx
push	eax
push	ecx
call	sub_76B010
jmp	short loc_7699BC

loc_7699AA:
cmp	ecx, 2
jnz	short loc_7699C6
mov	edx, [edi]
mov	eax, [edi+30h]
push	ebx
push	edx
push	eax
call	sub_76B430

loc_7699BC:
mov	[edi+30h], eax
mov	eax, [esp+20h+var_4]
add	esp, 0Ch

loc_7699C6:
mov	ecx, [edi]
push	ebx
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	[edi], ebx
add	esp, 0Ch
add	[edi+8], ebx

loc_7699D8:
add	[esi+6Ch], ebx
mov	edi, [esi+6Ch]
cmp	edi, 3
jb	short loc_769A02
mov	eax, [esi+30h]
mov	edx, [esi+64h]
mov	ecx, [esi+50h]
add	edx, eax
movzx	eax, byte ptr [edx]
mov	[esi+40h], eax
shl	eax, cl
movzx	ecx, byte ptr [edx+1]
xor	eax, ecx
and	eax, [esi+4Ch]
mov	[esi+40h], eax

loc_769A02:
cmp	edi, 106h
jnb	short loc_769A16
mov	edx, [esi]
cmp	dword ptr [edx+4], 0
jnz	loc_7698E0

loc_769A16:
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_7698D0 endp

align 10h



sub_769A20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+0Ch]
add	eax, 0FFFFFFFBh
push	edi
mov	[esp+10h+var_4], 0FFFFh
cmp	eax, 0FFFFh
jnb	short loc_769A41
mov	[esp+10h+var_4], eax

loc_769A41:
mov	eax, [esi+6Ch]
cmp	eax, 1
ja	short loc_769A59
call	sub_7698D0
mov	eax, [esi+6Ch]
test	eax, eax
jz	loc_769B89

loc_769A59:
add	[esi+64h], eax
mov	ecx, [esi+54h]
mov	eax, [esp+10h+var_4]
mov	edx, [esi+64h]
mov	dword ptr [esi+6Ch], 0
lea	eax, [ecx+eax]
jz	short loc_769A76
cmp	edx, eax
jb	short loc_769AF5

loc_769A76:
sub	edx, eax
mov	[esi+6Ch], edx
mov	[esi+64h], eax
test	ecx, ecx
jl	short loc_769A89
mov	edx, [esi+30h]
add	edx, ecx
jmp	short loc_769A8B

loc_769A89:
xor	edx, edx

loc_769A8B:
push	0
sub	eax, ecx
push	eax
push	edx
push	esi
call	sub_76CC80
mov	ecx, [esi+64h]
mov	edi, [esi]
mov	[esi+54h], ecx
mov	eax, [edi+1Ch]
mov	ebx, [eax+14h]
mov	ecx, [edi+10h]
add	esp, 10h
cmp	ebx, ecx
cmova	ebx, ecx
test	ebx, ebx
jz	short loc_769AE9
mov	edx, [eax+10h]
mov	eax, [edi+0Ch]
push	ebx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi+1Ch]
add	[edi+0Ch], ebx
add	[eax+10h], ebx
add	[edi+14h], ebx
sub	[edi+10h], ebx
mov	eax, [edi+1Ch]
sub	[eax+14h], ebx
mov	edi, [edi+1Ch]
add	esp, 0Ch
cmp	dword ptr [edi+14h], 0
jnz	short loc_769AE9
mov	ecx, [edi+8]
mov	[edi+10h], ecx

loc_769AE9:
mov	edx, [esi]
cmp	dword ptr [edx+10h], 0
jz	loc_769B82

loc_769AF5:
mov	edx, [esi+54h]
mov	ecx, [esi+64h]
mov	eax, [esi+24h]
sub	ecx, edx
sub	eax, 106h
cmp	ecx, eax
jb	loc_769A41
test	edx, edx
jl	short loc_769B18
mov	eax, [esi+30h]
add	eax, edx
jmp	short loc_769B1A

loc_769B18:
xor	eax, eax

loc_769B1A:
push	0
push	ecx
push	eax
push	esi
call	sub_76CC80
mov	ecx, [esi+64h]
mov	edi, [esi]
mov	[esi+54h], ecx
mov	eax, [edi+1Ch]
mov	ebx, [eax+14h]
mov	ecx, [edi+10h]
add	esp, 10h
cmp	ebx, ecx
cmova	ebx, ecx
test	ebx, ebx
jz	short loc_769B76
mov	edx, [eax+10h]
mov	eax, [edi+0Ch]
push	ebx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi+1Ch]
add	[edi+0Ch], ebx
add	[eax+10h], ebx
add	[edi+14h], ebx
sub	[edi+10h], ebx
mov	eax, [edi+1Ch]
sub	[eax+14h], ebx
mov	edi, [edi+1Ch]
add	esp, 0Ch
cmp	dword ptr [edi+14h], 0
jnz	short loc_769B76
mov	ecx, [edi+8]
mov	[edi+10h], ecx

loc_769B76:
mov	edx, [esi]
cmp	dword ptr [edx+10h], 0
jnz	loc_769A41

loc_769B82:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
pop	ecx
retn

loc_769B89:
mov	edi, [esp+10h+arg_4]
test	edi, edi
jz	short loc_769B82
mov	ecx, [esi+54h]
test	ecx, ecx
jl	short loc_769B9F
mov	eax, [esi+30h]
add	eax, ecx
jmp	short loc_769BA1

loc_769B9F:
xor	eax, eax

loc_769BA1:
xor	edx, edx
cmp	edi, 4
setz	dl
push	edx
mov	edx, [esi+64h]
sub	edx, ecx
push	edx
push	eax
push	esi
call	sub_76CC80
mov	eax, [esi+64h]
mov	[esi+54h], eax
mov	eax, [esi]
add	esp, 10h
call	sub_769130
mov	ecx, [esi]
xor	eax, eax
cmp	[ecx+10h], eax
jnz	short loc_769BDF
cmp	edi, 4
setnz	al
pop	edi
pop	esi
pop	ebx
dec	eax
and	eax, 2
pop	ecx
retn

loc_769BDF:
cmp	edi, 4
setz	al
pop	edi
pop	esi
pop	ebx
lea	eax, [eax+eax+1]
pop	ecx
retn
sub_769A20 endp

align 10h



sub_769BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
xor	ebx, ebx
lea	ebx, [ebx+0]

loc_769C00:
mov	eax, [esi+6Ch]
cmp	eax, 106h
jnb	short loc_769C2D
call	sub_7698D0
mov	eax, [esi+6Ch]
mov	edi, [esp+10h+arg_4]
cmp	eax, 106h
jnb	short loc_769C25
test	edi, edi
jz	loc_769EF5

loc_769C25:
test	eax, eax
jz	loc_769EFC

loc_769C2D:
cmp	eax, 3
jb	short loc_769C7B
mov	eax, [esi+40h]
mov	ecx, [esi+50h]
mov	edx, [esi+64h]
mov	edi, [esi+2Ch]
shl	eax, cl
mov	ecx, [esi+30h]
movzx	ecx, byte ptr [ecx+edx+2]
xor	eax, ecx
and	eax, [esi+4Ch]
mov	ecx, [esi+3Ch]
mov	[esi+40h], eax
mov	ax, [ecx+eax*2]
and	edi, edx
mov	edx, [esi+38h]
mov	[edx+edi*2], ax
mov	ecx, [esi+64h]
and	ecx, [esi+2Ch]
mov	edx, [esi+38h]
movzx	ebx, word ptr [edx+ecx*2]
mov	eax, [esi+40h]
mov	ecx, [esi+3Ch]
mov	dx, [esi+64h]
mov	[ecx+eax*2], dx

loc_769C7B:
test	ebx, ebx
jz	short loc_769CAC
mov	eax, [esi+64h]
mov	ecx, [esi+24h]
sub	eax, ebx
sub	ecx, 106h
cmp	eax, ecx
ja	short loc_769CAC
mov	ecx, [esi+80h]
cmp	ecx, 2
jge	loc_769D25
mov	eax, ebx
mov	edi, esi
call	sub_7696D0
mov	[esi+58h], eax

loc_769CAC:
mov	ebp, 1

loc_769CB1:
cmp	dword ptr [esi+58h], 3
jb	loc_769E13
mov	dx, [esi+64h]
sub	dx, [esi+68h]
mov	al, [esi+58h]
mov	edi, [esi+169Ch]
movzx	ecx, dx
mov	edx, [esi+1698h]
mov	[edi+edx*2], cx
mov	edx, [esi+1690h]
mov	edi, [esi+1698h]
sub	al, 3
mov	[edx+edi], al
add	[esi+1698h], ebp
movzx	eax, al
movzx	edx, ds:byte_1444E08[eax]
add	[esi+edx*4+490h], bp
lea	eax, [esi+edx*4+490h]
add	ecx, 0FFFFh
mov	eax, 100h
cmp	cx, ax
jnb	short loc_769D48
movzx	ecx, cx
movzx	eax, ds:byte_1444C08[ecx]
jmp	short loc_769D55

loc_769D25:
cmp	ecx, 3
jnz	short loc_769CAC
mov	ebp, 1
cmp	eax, ebp
jnz	loc_769CB1
push	ebx
call	sub_769830
add	esp, 4
mov	[esi+58h], eax
jmp	loc_769CB1

loc_769D48:
movzx	edx, cx
shr	edx, 7
movzx	eax, ds:byte_1444D08[edx]

loc_769D55:
add	[esi+eax*4+980h], bp
mov	eax, [esi+1694h]
xor	ecx, ecx
sub	eax, ebp
cmp	[esi+1698h], eax
mov	eax, [esi+58h]
setz	cl
sub	[esi+6Ch], eax
mov	edi, ecx
mov	ecx, [esi+6Ch]
cmp	eax, [esi+78h]
ja	short loc_769DE7
cmp	ecx, 3
jb	short loc_769DE7
dec	eax
mov	[esi+58h], eax
lea	esp, [esp+0]

loc_769D90:
add	[esi+64h], ebp
mov	edx, [esi+64h]
mov	ebx, [esi+40h]
mov	ecx, [esi+50h]
mov	eax, [esi+30h]
movzx	eax, byte ptr [edx+eax+2]
shl	ebx, cl
mov	ecx, [esi+3Ch]
xor	eax, ebx
and	eax, [esi+4Ch]
mov	ebx, [esi+2Ch]
and	ebx, edx
mov	edx, [esi+38h]
mov	[esi+40h], eax
mov	ax, [ecx+eax*2]
mov	[edx+ebx*2], ax
mov	ecx, [esi+64h]
and	ecx, [esi+2Ch]
mov	edx, [esi+38h]
movzx	ebx, word ptr [edx+ecx*2]
mov	eax, [esi+40h]
mov	ecx, [esi+3Ch]
mov	dx, [esi+64h]
mov	[ecx+eax*2], dx
add	dword ptr [esi+58h], 0FFFFFFFFh
jnz	short loc_769D90
jmp	loc_769E6D

loc_769DE7:
add	[esi+64h], eax
mov	eax, [esi+64h]
mov	ecx, [esi+30h]
lea	edx, [eax+ecx]
mov	ecx, [esi+50h]
mov	dword ptr [esi+58h], 0
movzx	eax, byte ptr [edx]
mov	[esi+40h], eax
movzx	edx, byte ptr [edx+1]
shl	eax, cl
xor	eax, edx
and	eax, [esi+4Ch]
mov	[esi+40h], eax
jmp	short loc_769E70

loc_769E13:
mov	eax, [esi+64h]
mov	ecx, [esi+30h]
mov	al, [eax+ecx]
mov	edx, [esi+1698h]
mov	ecx, [esi+169Ch]
xor	edi, edi
mov	[ecx+edx*2], di
mov	ecx, [esi+1698h]
mov	edx, [esi+1690h]
mov	[edx+ecx], al
add	[esi+1698h], ebp
movzx	edx, al
add	[esi+edx*4+8Ch], bp
lea	eax, [esi+edx*4+8Ch]
mov	eax, [esi+1694h]
xor	ecx, ecx
sub	eax, ebp
cmp	[esi+1698h], eax
setz	cl
dec	dword ptr [esi+6Ch]
mov	edi, ecx

loc_769E6D:
add	[esi+64h], ebp

loc_769E70:
test	edi, edi
jz	loc_769C00
mov	ecx, [esi+54h]
test	ecx, ecx
jl	short loc_769E86
mov	eax, [esi+30h]
add	eax, ecx
jmp	short loc_769E88

loc_769E86:
xor	eax, eax

loc_769E88:
mov	edx, [esi+64h]
push	0
sub	edx, ecx
push	edx
push	eax
push	esi
call	sub_76CC80
mov	eax, [esi+64h]
mov	edi, [esi]
mov	[esi+54h], eax
mov	eax, [edi+1Ch]
mov	ebp, [eax+14h]
mov	ecx, [edi+10h]
add	esp, 10h
cmp	ebp, ecx
cmova	ebp, ecx
test	ebp, ebp
jz	short loc_769EE9
mov	ecx, [eax+10h]
mov	edx, [edi+0Ch]
push	ebp
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi+1Ch]
add	[edi+0Ch], ebp
add	[eax+10h], ebp
add	[edi+14h], ebp
sub	[edi+10h], ebp
mov	eax, [edi+1Ch]
sub	[eax+14h], ebp
mov	edi, [edi+1Ch]
add	esp, 0Ch
cmp	dword ptr [edi+14h], 0
jnz	short loc_769EE9
mov	eax, [edi+8]
mov	[edi+10h], eax

loc_769EE9:
mov	ecx, [esi]
cmp	dword ptr [ecx+10h], 0
jnz	loc_769C00

loc_769EF5:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_769EFC:
mov	ecx, [esi+54h]
test	ecx, ecx
jl	short loc_769F0A
mov	eax, [esi+30h]
add	eax, ecx
jmp	short loc_769F0C

loc_769F0A:
xor	eax, eax

loc_769F0C:
xor	edx, edx
cmp	edi, 4
setz	dl
push	edx
mov	edx, [esi+64h]
sub	edx, ecx
push	edx
push	eax
push	esi
call	sub_76CC80
mov	eax, [esi+64h]
mov	[esi+54h], eax
mov	eax, [esi]
add	esp, 10h
call	sub_769130
mov	ecx, [esi]
xor	eax, eax
cmp	[ecx+10h], eax
jnz	short loc_769F4A
cmp	edi, 4
setnz	al
pop	edi
pop	esi
pop	ebp
pop	ebx
dec	eax
and	eax, 2
retn

loc_769F4A:
cmp	edi, 4
setz	al
pop	edi
pop	esi
pop	ebp
pop	ebx
lea	eax, [eax+eax+1]
retn
sub_769BF0 endp

align 10h



sub_769F60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	[esp+14h+var_4], 0
mov	ebp, 1

loc_769F76:
mov	eax, [esi+6Ch]
cmp	eax, 106h
jnb	short loc_769FA3
call	sub_7698D0
mov	eax, [esi+6Ch]
mov	edi, [esp+14h+arg_4]
cmp	eax, 106h
jnb	short loc_769F9B
test	edi, edi
jz	loc_76A234

loc_769F9B:
test	eax, eax
jz	loc_76A329

loc_769FA3:
cmp	eax, 3
jb	short loc_769FF5
mov	eax, [esi+40h]
mov	ecx, [esi+50h]
mov	edx, [esi+64h]
mov	edi, [esi+2Ch]
shl	eax, cl
mov	ecx, [esi+30h]
movzx	ecx, byte ptr [ecx+edx+2]
xor	eax, ecx
and	eax, [esi+4Ch]
mov	ecx, [esi+3Ch]
mov	[esi+40h], eax
movzx	eax, word ptr [ecx+eax*2]
and	edi, edx
mov	edx, [esi+38h]
mov	[edx+edi*2], ax
mov	ecx, [esi+64h]
and	ecx, [esi+2Ch]
mov	edx, [esi+38h]
movzx	eax, word ptr [edx+ecx*2]
mov	ecx, [esi+40h]
mov	edx, [esi+3Ch]
mov	[esp+14h+var_4], eax
movzx	eax, word ptr [esi+64h]
mov	[edx+ecx*2], ax

loc_769FF5:
mov	edx, [esi+68h]
mov	ecx, [esi+58h]
mov	[esi+5Ch], edx
mov	edx, [esp+14h+var_4]
mov	ebx, 2
mov	[esi+70h], ecx
mov	[esi+58h], ebx
test	edx, edx
jz	short loc_76A07A
mov	eax, ecx
cmp	eax, [esi+78h]
jnb	short loc_76A07A
mov	eax, [esi+64h]
mov	ecx, [esi+24h]
sub	eax, edx
sub	ecx, 106h
cmp	eax, ecx
ja	short loc_76A07A
mov	ecx, [esi+80h]
cmp	ecx, ebx
jge	short loc_76A03F
mov	eax, edx
mov	edi, esi
call	sub_7696D0
jmp	short loc_76A051

loc_76A03F:
cmp	ecx, 3
jnz	short loc_76A054
cmp	eax, ebp
jnz	short loc_76A054
push	edx
call	sub_769830
add	esp, 4

loc_76A051:
mov	[esi+58h], eax

loc_76A054:
mov	eax, [esi+58h]
cmp	eax, 5
ja	short loc_76A07A
cmp	[esi+80h], ebp
jz	short loc_76A077
cmp	eax, 3
jnz	short loc_76A07A
mov	edx, [esi+64h]
sub	edx, [esi+68h]
cmp	edx, 1000h
jbe	short loc_76A07A

loc_76A077:
mov	[esi+58h], ebx

loc_76A07A:
mov	eax, [esi+70h]
cmp	eax, 3
jb	loc_76A23C
cmp	[esi+58h], eax
ja	loc_76A23C
mov	dx, [esi+64h]
sub	dx, [esi+5Ch]
mov	eax, [esi+64h]
mov	ecx, [esi+6Ch]
mov	ebx, [esi+169Ch]
lea	edi, [eax+ecx-3]
mov	al, [esi+70h]
sub	dx, bp
movzx	ecx, dx
mov	edx, [esi+1698h]
mov	[ebx+edx*2], cx
mov	edx, [esi+1690h]
mov	ebx, [esi+1698h]
sub	al, 3
mov	[edx+ebx], al
add	[esi+1698h], ebp
movzx	eax, al
movzx	edx, ds:byte_1444E08[eax]
add	[esi+edx*4+490h], bp
lea	eax, [esi+edx*4+490h]
add	ecx, 0FFFFh
mov	eax, 100h
cmp	cx, ax
jnb	short loc_76A106
movzx	ecx, cx
movzx	eax, ds:byte_1444C08[ecx]
jmp	short loc_76A113

loc_76A106:
movzx	edx, cx
shr	edx, 7
movzx	eax, ds:byte_1444D08[edx]

loc_76A113:
add	[esi+eax*4+980h], bp
mov	eax, [esi+1694h]
sub	eax, ebp
xor	ebx, ebx
cmp	[esi+1698h], eax
mov	eax, [esi+70h]
setz	bl
mov	ecx, ebp
sub	ecx, eax
add	[esi+6Ch], ecx
add	eax, 0FFFFFFFEh
mov	[esi+70h], eax
mov	edi, edi

loc_76A140:
add	[esi+64h], ebp
mov	edx, [esi+64h]
cmp	edx, edi
ja	short loc_76A198
mov	eax, [esi+40h]
mov	ecx, [esi+50h]
mov	ebp, [esi+38h]
shl	eax, cl
mov	ecx, [esi+30h]
movzx	ecx, byte ptr [ecx+edx+2]
and	edx, [esi+2Ch]
xor	eax, ecx
and	eax, [esi+4Ch]
mov	ecx, [esi+3Ch]
mov	[esi+40h], eax
movzx	eax, word ptr [ecx+eax*2]
mov	[ebp+edx*2+0], ax
mov	ecx, [esi+64h]
and	ecx, [esi+2Ch]
mov	edx, [esi+38h]
movzx	eax, word ptr [edx+ecx*2]
mov	ecx, [esi+40h]
mov	edx, [esi+3Ch]
mov	[esp+14h+var_4], eax
movzx	eax, word ptr [esi+64h]
mov	[edx+ecx*2], ax
mov	ebp, 1

loc_76A198:
add	dword ptr [esi+70h], 0FFFFFFFFh
jnz	short loc_76A140
add	[esi+64h], ebp
mov	eax, [esi+64h]
mov	dword ptr [esi+60h], 0
mov	dword ptr [esi+58h], 2
test	ebx, ebx
jz	loc_769F76
mov	edx, [esi+54h]
test	edx, edx
jl	short loc_76A1C8
mov	ecx, [esi+30h]
add	ecx, edx
jmp	short loc_76A1CA

loc_76A1C8:
xor	ecx, ecx

loc_76A1CA:
push	0
sub	eax, edx
push	eax
push	ecx
push	esi
call	sub_76CC80
mov	ecx, [esi+64h]
mov	edi, [esi]
mov	[esi+54h], ecx
mov	eax, [edi+1Ch]
mov	ebx, [eax+14h]
mov	ecx, [edi+10h]
add	esp, 10h
cmp	ebx, ecx
cmova	ebx, ecx
test	ebx, ebx
jz	short loc_76A228
mov	edx, [eax+10h]
mov	eax, [edi+0Ch]
push	ebx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi+1Ch]
add	[edi+0Ch], ebx
add	[eax+10h], ebx
add	[edi+14h], ebx
sub	[edi+10h], ebx
mov	eax, [edi+1Ch]
sub	[eax+14h], ebx
mov	edi, [edi+1Ch]
add	esp, 0Ch
cmp	dword ptr [edi+14h], 0
jnz	short loc_76A228
mov	ecx, [edi+8]
mov	[edi+10h], ecx

loc_76A228:
mov	edx, [esi]
cmp	dword ptr [edx+10h], 0

loc_76A22E:
jnz	loc_769F76

loc_76A234:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn

loc_76A23C:
cmp	dword ptr [esi+60h], 0
jz	loc_76A31B
mov	eax, [esi+64h]
mov	ecx, [esi+30h]
mov	al, [eax+ecx-1]
mov	edx, [esi+1698h]
mov	ecx, [esi+169Ch]
xor	edi, edi
mov	[ecx+edx*2], di
mov	edx, [esi+1690h]
mov	ecx, [esi+1698h]
mov	[edx+ecx], al
add	[esi+1698h], ebp
movzx	edx, al
add	[esi+edx*4+8Ch], bp
lea	eax, [esi+edx*4+8Ch]
mov	eax, [esi+1694h]
sub	eax, ebp
cmp	[esi+1698h], eax
jnz	short loc_76A30A
mov	ecx, [esi+54h]
test	ecx, ecx
jl	short loc_76A2A7
mov	eax, [esi+30h]
add	eax, ecx
jmp	short loc_76A2A9

loc_76A2A7:
xor	eax, eax

loc_76A2A9:
mov	edx, [esi+64h]
push	0
sub	edx, ecx
push	edx
push	eax
push	esi
call	sub_76CC80
mov	eax, [esi+64h]
mov	edi, [esi]
mov	[esi+54h], eax
mov	eax, [edi+1Ch]
mov	ebx, [eax+14h]
mov	ecx, [edi+10h]
add	esp, 10h
cmp	ebx, ecx
cmova	ebx, ecx
test	ebx, ebx
jz	short loc_76A30A
mov	ecx, [eax+10h]
mov	edx, [edi+0Ch]
push	ebx
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi+1Ch]
add	[edi+0Ch], ebx
add	[eax+10h], ebx
add	[edi+14h], ebx
sub	[edi+10h], ebx
mov	eax, [edi+1Ch]
sub	[eax+14h], ebx
mov	edi, [edi+1Ch]
add	esp, 0Ch
cmp	dword ptr [edi+14h], 0
jnz	short loc_76A30A
mov	eax, [edi+8]
mov	[edi+10h], eax

loc_76A30A:
mov	ecx, [esi]
add	[esi+64h], ebp
dec	dword ptr [esi+6Ch]
cmp	dword ptr [ecx+10h], 0
jmp	loc_76A22E

loc_76A31B:
add	[esi+64h], ebp
dec	dword ptr [esi+6Ch]
mov	[esi+60h], ebp
jmp	loc_769F76

loc_76A329:
cmp	dword ptr [esi+60h], 0
jz	short loc_76A375
mov	edx, [esi+64h]
mov	eax, [esi+30h]
mov	al, [edx+eax-1]
mov	ecx, [esi+1698h]
mov	edx, [esi+169Ch]
xor	ebx, ebx
mov	[edx+ecx*2], bx
mov	edx, [esi+1698h]
mov	ecx, [esi+1690h]
mov	[ecx+edx], al
add	[esi+1698h], ebp
movzx	eax, al
add	[esi+eax*4+8Ch], bp
lea	eax, [esi+eax*4+8Ch]
mov	[esi+60h], ebx

loc_76A375:
mov	ecx, [esi+54h]
test	ecx, ecx
jl	short loc_76A383
mov	eax, [esi+30h]
add	eax, ecx
jmp	short loc_76A385

loc_76A383:
xor	eax, eax

loc_76A385:
xor	edx, edx
cmp	edi, 4
setz	dl
push	edx
mov	edx, [esi+64h]
sub	edx, ecx
push	edx
push	eax
push	esi
call	sub_76CC80
mov	eax, [esi+64h]
mov	[esi+54h], eax
mov	eax, [esi]
add	esp, 10h
call	sub_769130
mov	ecx, [esi]
xor	eax, eax
cmp	[ecx+10h], eax
jnz	short loc_76A3C4
cmp	edi, 4
setnz	al
pop	edi
pop	esi
pop	ebp
pop	ebx
dec	eax
and	eax, 2
pop	ecx
retn

loc_76A3C4:
cmp	edi, 4
setz	al
pop	edi
pop	esi
pop	ebp
pop	ebx
lea	eax, [eax+eax+1]
pop	ecx
retn
sub_769F60 endp

align 10h



sub_76A3E0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
cmp	edi, ebx
jz	short loc_76A466
mov	esi, [edi+1Ch]
cmp	esi, ebx
jz	short loc_76A466
cmp	[edi+20h], ebx
jz	short loc_76A466
cmp	[edi+24h], ebx
jz	short loc_76A466
mov	[edi+14h], ebx
mov	[edi+8], ebx
mov	[edi+18h], ebx
mov	dword ptr [edi+2Ch], 2
mov	eax, [esi+8]
mov	[esi+10h], eax
mov	eax, [esi+18h]
cmp	eax, ebx
mov	[esi+14h], ebx
jge	short loc_76A423
neg	eax
mov	[esi+18h], eax

loc_76A423:
mov	eax, [esi+18h]
mov	ecx, eax
neg	ecx
sbb	ecx, ecx
and	ecx, 0FFFFFFB9h
push	ebx
add	ecx, 71h
push	ebx
mov	[esi+4], ecx
push	ebx
cmp	eax, 2
jnz	short loc_76A444
call	sub_76B430
jmp	short loc_76A449

loc_76A444:
call	sub_76B010

loc_76A449:
add	esp, 0Ch
mov	[edi+30h], eax
push	esi
mov	[esi+20h], ebx
call	sub_76C630
add	esp, 4
call	sub_769640
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn

loc_76A466:
pop	edi
pop	esi
mov	eax, 0FFFFFFFEh
pop	ebx
retn
sub_76A3E0 endp

align 10h



sub_76A470 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_18]
xor	ecx, ecx
push	ebp
mov	ebp, 1
cmp	eax, ecx
jz	loc_76A678
cmp	byte ptr [eax],	31h
jnz	loc_76A678
cmp	[esp+4+arg_1C],	38h
jnz	loc_76A678
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, ecx
jnz	short loc_76A4A7
pop	edi
lea	eax, [ebp-3]
pop	ebp
retn

loc_76A4A7:
mov	[edi+18h], ecx
cmp	[edi+20h], ecx
jnz	short loc_76A4B9
mov	dword ptr [edi+20h], offset sub_76A6B0
mov	[edi+28h], ecx

loc_76A4B9:
cmp	[edi+24h], ecx
jnz	short loc_76A4C5
mov	dword ptr [edi+24h], offset sub_76A6D0

loc_76A4C5:
cmp	[esp+8+arg_4], 0FFFFFFFFh
jnz	short loc_76A4D4
mov	[esp+8+arg_4], 6

loc_76A4D4:
push	ebx
mov	ebx, [esp+0Ch+arg_C]
cmp	ebx, ecx
jge	short loc_76A4E3
xor	ebp, ebp
neg	ebx
jmp	short loc_76A4F0

loc_76A4E3:
cmp	ebx, 0Fh
jle	short loc_76A4F0
mov	ebp, 2
sub	ebx, 10h

loc_76A4F0:
mov	eax, [esp+0Ch+arg_10]
dec	eax
cmp	eax, 8
ja	loc_76A66F
cmp	[esp+0Ch+arg_8], 8
jnz	loc_76A66F
lea	ecx, [ebx-8]
cmp	ecx, 7
ja	loc_76A66F
cmp	[esp+0Ch+arg_4], 9
ja	loc_76A66F
cmp	[esp+0Ch+arg_14], 3
ja	loc_76A66F
cmp	ebx, 8
jnz	short loc_76A535
mov	ebx, 9

loc_76A535:
mov	edx, [edi+28h]
mov	eax, [edi+20h]
push	esi
push	16B8h
push	1
push	edx
call	eax
mov	esi, eax
add	esp, 0Ch
test	esi, esi
jz	loc_76A665
mov	[edi+1Ch], esi
mov	[esi+18h], ebp
mov	ecx, ebx
mov	ebp, 1
shl	ebp, cl
mov	[esi+28h], ebx
mov	ebx, [esp+10h+arg_10]
mov	eax, 1
lea	ecx, [ebp-1]
mov	[esi+2Ch], ecx
lea	ecx, [ebx+7]
shl	eax, cl
mov	[esi+48h], ecx
add	ecx, 2
mov	[esi], edi
mov	[esi+44h], eax
dec	eax
mov	[esi+4Ch], eax
mov	eax, 0AAAAAAABh
mul	ecx
shr	edx, 1
mov	[esi+24h], ebp
mov	[esi+50h], edx
mov	edx, [edi+28h]
mov	eax, [edi+20h]
push	2
push	ebp
push	edx
call	eax
mov	ecx, [esi+24h]
mov	[esi+30h], eax
mov	edx, [edi+28h]
mov	eax, [edi+20h]
push	2
push	ecx
push	edx
call	eax
mov	ecx, [esi+44h]
mov	[esi+38h], eax
mov	edx, [edi+28h]
mov	eax, [edi+20h]
push	2
push	ecx
push	edx
call	eax
mov	[esi+3Ch], eax
lea	ecx, [ebx+6]
mov	eax, 1
shl	eax, cl
push	4
mov	[esi+1694h], eax
mov	ecx, [edi+28h]
mov	edx, [edi+20h]
push	eax
push	ecx
call	edx
mov	ecx, [esi+1694h]
add	esp, 30h
cmp	dword ptr [esi+30h], 0
lea	edx, ds:0[ecx*4]
mov	[esi+8], eax
mov	[esi+0Ch], edx
jz	short loc_76A64D
cmp	dword ptr [esi+38h], 0
jz	short loc_76A64D
cmp	dword ptr [esi+3Ch], 0
jz	short loc_76A64D
test	eax, eax
jz	short loc_76A64D
mov	edx, ecx
shr	edx, 1
lea	edx, [eax+edx*2]
lea	eax, [eax+ecx*2]
add	eax, ecx
mov	ecx, [esp+10h+arg_4]
mov	[esi+169Ch], edx
mov	edx, [esp+10h+arg_14]
push	edi
mov	[esi+1690h], eax
mov	[esi+7Ch], ecx
mov	[esi+80h], edx
mov	byte ptr [esi+1Ch], 8
call	sub_76A3E0
add	esp, 4
pop	esi
pop	ebx
pop	edi
pop	ebp
retn

loc_76A64D:
mov	dword ptr [esi+4], 29Ah
mov	eax, ds:off_1442480
push	edi
mov	[edi+18h], eax
call	sub_769580
add	esp, 4

loc_76A665:
pop	esi
pop	ebx
pop	edi
mov	eax, 0FFFFFFFCh
pop	ebp
retn

loc_76A66F:
pop	ebx
pop	edi
mov	eax, 0FFFFFFFEh
pop	ebp
retn

loc_76A678:
mov	eax, 0FFFFFFFAh
pop	ebp
retn
sub_76A470 endp

align 10h



sub_76A680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	ecx
push	0
push	8
push	0Fh
push	8
push	edx
push	eax
call	sub_76A470
add	esp, 20h
retn
sub_76A680 endp

align 10h



sub_76A6B0 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
imul	eax, [esp+arg_8]
push	eax		; size_t
call	_malloc
add	esp, 4
retn
sub_76A6B0 endp

align 10h



; int __cdecl sub_76A6D0(int, void *)
sub_76A6D0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	eax		; void *
call	_free
pop	ecx
retn
sub_76A6D0 endp

align 10h



sub_76A6E0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 3Ch
push	ebx
push	ebp
push	esi
push	edi
mov	ecx, [esp+4Ch+arg_0]
mov	eax, [ecx+1Ch]
mov	edx, [ecx+4]
mov	ebx, [eax+30h]
mov	ebp, [ecx]
dec	ebp
lea	edx, [edx+ebp-5]
mov	[esp+4Ch+var_38], edx
mov	esi, [ecx+0Ch]
mov	ecx, [ecx+10h]
mov	edx, ecx
sub	edx, [esp+4Ch+arg_4]
dec	esi
add	edx, esi
lea	ecx, [ecx+esi-101h]
mov	[esp+4Ch+var_14], edx
mov	edx, [eax+20h]
mov	[esp+4Ch+var_20], ecx
mov	ecx, [eax+24h]
mov	[esp+4Ch+var_24], edx
mov	edx, [eax+28h]
mov	[esp+4Ch+var_10], ecx
mov	ecx, [eax+2Ch]
mov	[esp+4Ch+var_8], edx
mov	edx, [eax+44h]
mov	[esp+4Ch+var_C], ecx
mov	ecx, [eax+48h]
mov	[esp+4Ch+var_2C], edx
mov	[esp+4Ch+var_28], ecx
mov	ecx, [eax+4Ch]
mov	edx, 1
shl	edx, cl
mov	ecx, [eax+50h]
mov	[esp+4Ch+var_34], eax
mov	edi, [eax+34h]
mov	[esp+4Ch+arg_4], 1
mov	eax, [esp+4Ch+arg_4]
shl	eax, cl
dec	edx
mov	[esp+4Ch+var_3C], ebp
mov	[esp+4Ch+var_4], edx
dec	eax
mov	[esp+4Ch+var_1C], eax

loc_76A777:
cmp	edi, 0Fh
jnb	short loc_76A79C
movzx	eax, byte ptr [ebp+1]
inc	ebp
mov	ecx, edi
shl	eax, cl
inc	ebp
add	edi, 8
mov	ecx, edi
add	ebx, eax
movzx	eax, byte ptr [ebp+0]
shl	eax, cl
mov	[esp+4Ch+var_3C], ebp
add	ebx, eax
add	edi, 8

loc_76A79C:
mov	ecx, [esp+4Ch+var_2C]
and	edx, ebx
mov	eax, [ecx+edx*4]
mov	edx, eax
shr	edx, 8
movzx	ecx, dl
movzx	edx, al
shr	ebx, cl
sub	edi, ecx
test	edx, edx
jz	short loc_76A7F9

loc_76A7B8:
test	dl, 10h
jnz	short loc_76A804
test	dl, 40h
jnz	loc_76AABA
mov	ecx, 1
mov	[esp+4Ch+arg_4], ecx
mov	ecx, edx
mov	edx, [esp+4Ch+arg_4]
shl	edx, cl
shr	eax, 10h
dec	edx
and	edx, ebx
add	edx, eax
mov	eax, [esp+4Ch+var_2C]
mov	eax, [eax+edx*4]
mov	ecx, eax
shr	ecx, 8
movzx	ecx, cl
movzx	edx, al
shr	ebx, cl
sub	edi, ecx
test	edx, edx
jnz	short loc_76A7B8

loc_76A7F9:
inc	esi
shr	eax, 10h
mov	[esi], al
jmp	loc_76AA2F

loc_76A804:
shr	eax, 10h
and	edx, 0Fh
mov	[esp+4Ch+arg_4], eax
jz	short loc_76A83A
cmp	edi, edx
jnb	short loc_76A826
movzx	eax, byte ptr [ebp+1]
inc	ebp
mov	ecx, edi
shl	eax, cl
mov	[esp+4Ch+var_3C], ebp
add	ebx, eax
add	edi, 8

loc_76A826:
mov	ecx, edx
mov	eax, 1
shl	eax, cl
dec	eax
and	eax, ebx
add	[esp+4Ch+arg_4], eax
shr	ebx, cl
sub	edi, edx

loc_76A83A:
cmp	edi, 0Fh
jnb	short loc_76A85F
movzx	edx, byte ptr [ebp+1]
inc	ebp
movzx	eax, byte ptr [ebp+1]
mov	ecx, edi
inc	ebp
shl	edx, cl
add	edi, 8
mov	ecx, edi
shl	eax, cl
add	ebx, edx
mov	[esp+4Ch+var_3C], ebp
add	ebx, eax
add	edi, 8

loc_76A85F:
mov	ecx, [esp+4Ch+var_1C]
mov	edx, [esp+4Ch+var_28]
and	ecx, ebx
mov	edx, [edx+ecx*4]
mov	eax, edx
shr	eax, 8
movzx	ecx, al
movzx	eax, dl
shr	ebx, cl
sub	edi, ecx
mov	[esp+4Ch+var_30], edx
test	al, 10h
jnz	short loc_76A8BC

loc_76A883:
test	al, 40h
jnz	loc_76AAAD
mov	ecx, eax
movzx	eax, word ptr [esp+4Ch+var_30+2]
mov	edx, 1
shl	edx, cl
mov	ecx, [esp+4Ch+var_28]
dec	edx
and	edx, ebx
add	edx, eax
mov	edx, [ecx+edx*4]
mov	eax, edx
shr	eax, 8
movzx	ecx, al
movzx	eax, dl
shr	ebx, cl
sub	edi, ecx
mov	[esp+4Ch+var_30], edx
test	al, 10h
jz	short loc_76A883

loc_76A8BC:
shr	edx, 10h
and	eax, 0Fh
mov	[esp+4Ch+var_30], edx
cmp	edi, eax
jnb	short loc_76A8F2
movzx	edx, byte ptr [ebp+1]
inc	ebp
mov	ecx, edi
shl	edx, cl
add	edi, 8
mov	[esp+4Ch+var_3C], ebp
add	ebx, edx
cmp	edi, eax
jnb	short loc_76A8F2
movzx	edx, byte ptr [ebp+1]
inc	ebp
mov	ecx, edi
shl	edx, cl
mov	[esp+4Ch+var_3C], ebp
add	ebx, edx
add	edi, 8

loc_76A8F2:
mov	ecx, 1
mov	edx, ecx
mov	ecx, eax
shl	edx, cl
sub	edi, eax
dec	edx
and	edx, ebx
mov	ecx, edx
mov	edx, [esp+4Ch+var_30]
add	edx, ecx
mov	ecx, eax
mov	eax, esi
sub	eax, [esp+4Ch+var_14]
shr	ebx, cl
mov	[esp+4Ch+var_30], edx
cmp	edx, eax
jbe	loc_76AA4E
mov	ebp, edx
sub	ebp, eax
cmp	ebp, [esp+4Ch+var_10]
ja	loc_76AA92
mov	ecx, [esp+4Ch+var_C]
mov	eax, [esp+4Ch+var_8]
dec	ecx
mov	[esp+4Ch+var_18], ecx
test	eax, eax
jnz	short loc_76A963
mov	eax, [esp+4Ch+var_24]
sub	eax, ebp
add	ecx, eax
cmp	ebp, [esp+4Ch+arg_4]
jnb	loc_76A9D2
sub	[esp+4Ch+arg_4], ebp

loc_76A955:
mov	al, [ecx+1]
inc	ecx
inc	esi
sub	ebp, 1
mov	[esi], al
jnz	short loc_76A955
jmp	short loc_76A9CE

loc_76A963:
cmp	eax, ebp
jnb	short loc_76A9B4
mov	edx, eax
sub	edx, ebp
add	edx, [esp+4Ch+var_24]
sub	ebp, eax
add	ecx, edx
cmp	ebp, [esp+4Ch+arg_4]
jnb	short loc_76A9D2
sub	[esp+4Ch+arg_4], ebp
lea	ecx, [ecx+0]

loc_76A980:
mov	dl, [ecx+1]
inc	ecx
inc	esi
sub	ebp, 1
mov	[esi], dl
jnz	short loc_76A980
mov	ecx, [esp+4Ch+var_18]
cmp	eax, [esp+4Ch+arg_4]
jnb	short loc_76A9D2
sub	[esp+4Ch+arg_4], eax
mov	ebp, eax
lea	esp, [esp+0]

loc_76A9A0:
mov	al, [ecx+1]
inc	ecx
inc	esi
sub	ebp, 1
mov	[esi], al
jnz	short loc_76A9A0
mov	ecx, esi
sub	ecx, [esp+4Ch+var_30]
jmp	short loc_76A9D2

loc_76A9B4:
sub	eax, ebp
add	ecx, eax
cmp	ebp, [esp+4Ch+arg_4]
jnb	short loc_76A9D2
sub	[esp+4Ch+arg_4], ebp

loc_76A9C2:
mov	al, [ecx+1]
inc	ecx
inc	esi
sub	ebp, 1
mov	[esi], al
jnz	short loc_76A9C2

loc_76A9CE:
mov	ecx, esi
sub	ecx, edx

loc_76A9D2:
mov	eax, [esp+4Ch+arg_4]
cmp	eax, 2
jbe	short loc_76AA11
lea	edx, [eax-3]
mov	eax, 0AAAAAAABh
mul	edx
mov	ebp, edx
shr	ebp, 1
inc	ebp
lea	ebx, [ebx+0]

loc_76A9F0:
movzx	eax, byte ptr [ecx+1]
sub	[esp+4Ch+arg_4], 3
inc	ecx
inc	esi
mov	[esi], al
mov	dl, [ecx+1]
inc	ecx
inc	esi
mov	[esi], dl
movzx	eax, byte ptr [ecx+1]
inc	ecx
inc	esi
sub	ebp, 1
mov	[esi], al
jnz	short loc_76A9F0

loc_76AA11:
mov	ebp, [esp+4Ch+arg_4]
test	ebp, ebp
jz	short loc_76AA2B
mov	dl, [ecx+1]
inc	ecx
inc	esi
mov	[esi], dl
cmp	ebp, 1
jbe	short loc_76AA2B
mov	al, [ecx+1]
inc	esi
mov	[esi], al

loc_76AA2B:
mov	ebp, [esp+4Ch+var_3C]

loc_76AA2F:
mov	edx, [esp+4Ch+var_38]
cmp	ebp, edx
jnb	loc_76AAE4
cmp	esi, [esp+4Ch+var_20]
jnb	loc_76AAE4
mov	edx, [esp+4Ch+var_4]
jmp	loc_76A777

loc_76AA4E:
mov	eax, esi
sub	eax, edx

loc_76AA52:
movzx	ecx, byte ptr [eax+1]
inc	eax
mov	[esi+1], cl
mov	dl, [eax+1]
inc	esi
inc	eax
inc	esi
mov	[esi], dl
movzx	ecx, byte ptr [eax+1]
inc	eax
inc	esi
mov	[esi], cl
mov	ecx, [esp+4Ch+arg_4]
sub	ecx, 3
mov	[esp+4Ch+arg_4], ecx
cmp	ecx, 2
ja	short loc_76AA52
test	ecx, ecx
jz	short loc_76AA2F
mov	dl, [eax+1]
inc	eax
inc	esi
mov	[esi], dl
cmp	ecx, 1
jbe	short loc_76AA2F
mov	al, [eax+1]
inc	esi
mov	[esi], al
jmp	short loc_76AA2F

loc_76AA92:
mov	ecx, [esp+4Ch+arg_0]
mov	edx, [esp+4Ch+var_34]
mov	ebp, [esp+4Ch+var_3C]
mov	dword ptr [ecx+18h], offset aInvalidDista_1 ; "invalid distance	too far	back"
mov	dword ptr [edx], 1Bh
jmp	short loc_76AAE0

loc_76AAAD:
mov	eax, [esp+4Ch+arg_0]
mov	dword ptr [eax+18h], offset aInvalidDista_0 ; "invalid distance	code"
jmp	short loc_76AAD6

loc_76AABA:
test	dl, 20h
jz	short loc_76AACB
mov	edx, [esp+4Ch+var_34]
mov	dword ptr [edx], 0Bh
jmp	short loc_76AAE0

loc_76AACB:
mov	eax, [esp+4Ch+arg_0]
mov	dword ptr [eax+18h], offset aInvalidLiter_0 ; "invalid literal/length code"

loc_76AAD6:
mov	ecx, [esp+4Ch+var_34]
mov	dword ptr [ecx], 1Bh

loc_76AAE0:
mov	edx, [esp+4Ch+var_38]

loc_76AAE4:
mov	eax, edi
shr	eax, 3
sub	ebp, eax
add	eax, eax
add	eax, eax
add	eax, eax
sub	edi, eax
mov	ecx, edi
mov	eax, 1
shl	eax, cl
mov	ecx, [esp+4Ch+arg_0]
sub	edx, ebp
add	edx, 5
dec	eax
and	ebx, eax
lea	eax, [ebp+1]
mov	[ecx], eax
lea	eax, [esi+1]
mov	[ecx+0Ch], eax
mov	eax, [esp+4Ch+var_20]
sub	eax, esi
add	eax, 101h
mov	[ecx+10h], eax
mov	eax, [esp+4Ch+var_34]
mov	[ecx+4], edx
mov	[eax+34h], edi
pop	edi
pop	esi
pop	ebp
mov	[eax+30h], ebx
pop	ebx
add	esp, 3Ch
retn
sub_76A6E0 endp

align 10h



sub_76AB40 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 78h
xor	eax, eax
movzx	ecx, ax
mov	eax, ecx
push	ebx
mov	ebx, [esp+7Ch+arg_4]
shl	ecx, 10h
or	eax, ecx
push	ebp
mov	ebp, [esp+80h+arg_8]
mov	[esp+80h+var_40], eax
mov	[esp+80h+var_3C], eax
mov	[esp+80h+var_38], eax
mov	[esp+80h+var_34], eax
mov	[esp+80h+var_30], eax
mov	[esp+80h+var_2C], eax
mov	[esp+80h+var_28], eax
mov	[esp+80h+var_24], eax
xor	eax, eax
push	esi
test	ebp, ebp
jbe	short loc_76ABA2
jmp	short loc_76AB90
align 10h

loc_76AB90:
movzx	ecx, word ptr [ebx+eax*2]
inc	word ptr [esp+ecx*2+84h+var_40]
lea	ecx, [esp+ecx*2+84h+var_40]
inc	eax
cmp	eax, ebp
jb	short loc_76AB90

loc_76ABA2:
mov	esi, [esp+84h+arg_10]
mov	ecx, [esi]
mov	[esp+84h+var_74], ecx
mov	eax, 0Fh

loc_76ABB4:
cmp	word ptr [esp+eax*2+84h+var_40], 0
jnz	short loc_76ABC2
dec	eax
cmp	eax, 1
jnb	short loc_76ABB4

loc_76ABC2:
mov	[esp+84h+var_6C], eax
cmp	ecx, eax
jbe	short loc_76ABCE
mov	[esp+84h+var_74], eax

loc_76ABCE:
test	eax, eax
jnz	short loc_76AC0B
mov	eax, [esp+84h+arg_C]
xor	edx, edx
mov	word ptr [esp+84h+var_78+2], dx
mov	edx, [eax]
mov	byte ptr [esp+84h+var_78], 40h
mov	byte ptr [esp+84h+var_78+1], 1
mov	ecx, [esp+84h+var_78]
mov	[edx], ecx
add	dword ptr [eax], 4
mov	edx, [eax]
mov	[edx], ecx
add	dword ptr [eax], 4
mov	dword ptr [esi], 1
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 78h
retn

loc_76AC0B:
mov	esi, 1

loc_76AC10:
cmp	word ptr [esp+esi*2+84h+var_40], 0
jnz	short loc_76AC52
cmp	word ptr [esp+esi*2+84h+var_40+2], 0
jnz	short loc_76AC42
cmp	word ptr [esp+esi*2+84h+var_3C], 0
jnz	short loc_76AC45
cmp	word ptr [esp+esi*2+84h+var_3C+2], 0
jnz	short loc_76AC4A
cmp	word ptr [esp+esi*2+84h+var_38], 0
jnz	short loc_76AC4F
add	esi, 5
cmp	esi, 0Fh
jbe	short loc_76AC10
jmp	short loc_76AC52

loc_76AC42:
inc	esi
jmp	short loc_76AC52

loc_76AC45:
add	esi, 2
jmp	short loc_76AC52

loc_76AC4A:
add	esi, 3
jmp	short loc_76AC52

loc_76AC4F:
add	esi, 4

loc_76AC52:
cmp	[esp+84h+var_74], esi
jnb	short loc_76AC5C
mov	[esp+84h+var_74], esi

loc_76AC5C:
mov	edx, 1
mov	eax, edx

loc_76AC63:
movzx	ecx, word ptr [esp+eax*2+84h+var_40]
add	edx, edx
sub	edx, ecx
js	short loc_76AC9D
inc	eax
cmp	eax, 0Fh
jbe	short loc_76AC63
push	edi
mov	edi, [esp+88h+arg_0]
test	edx, edx
jle	short loc_76ACA7
test	edi, edi
jz	short loc_76AC92
movzx	eax, word ptr [esp+88h+var_40]
mov	ecx, ebp
sub	ecx, eax
cmp	ecx, 1
jz	short loc_76ACA7

loc_76AC92:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 78h
retn

loc_76AC9D:
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 78h
retn

loc_76ACA7:
xor	edx, edx
mov	[esp+88h+var_1E], dx
mov	eax, 2

loc_76ACB3:
mov	cx, [esp+eax+88h+var_20]
add	cx, word ptr [esp+eax+88h+var_40]
add	eax, 2
mov	[esp+eax+88h+var_20], cx
cmp	eax, 1Eh
jb	short loc_76ACB3
xor	eax, eax
test	ebp, ebp
jbe	short loc_76ACFD

loc_76ACD0:
cmp	word ptr [ebx+eax*2], 0
jz	short loc_76ACF8
movzx	edx, word ptr [ebx+eax*2]
movzx	ecx, [esp+edx*2+88h+var_20]
mov	edx, [esp+88h+arg_14]
mov	[edx+ecx*2], ax
movzx	edx, word ptr [ebx+eax*2]
inc	[esp+edx*2+88h+var_20]
lea	edx, [esp+edx*2+88h+var_20]

loc_76ACF8:
inc	eax
cmp	eax, ebp
jb	short loc_76ACD0

loc_76ACFD:
mov	eax, edi
sub	eax, 0
mov	edx, 0FFFFFFFFh
jz	short loc_76AD46
sub	eax, 1
jz	short loc_76AD24
mov	[esp+88h+var_54], offset unk_1442540
mov	[esp+88h+var_58], offset unk_1442580
mov	[esp+88h+var_5C], edx
jmp	short loc_76AD5D

loc_76AD24:
mov	eax, offset unk_14424C0
sub	eax, 202h
mov	[esp+88h+var_54], eax
mov	eax, offset unk_1442500
sub	eax, 202h
mov	[esp+88h+var_5C], 100h
jmp	short loc_76AD59

loc_76AD46:
mov	eax, [esp+88h+arg_14]
mov	[esp+88h+var_54], eax
mov	[esp+88h+var_5C], 13h

loc_76AD59:
mov	[esp+88h+var_58], eax

loc_76AD5D:
mov	eax, [esp+88h+arg_C]
mov	ecx, [eax]
mov	[esp+88h+var_68], ecx
mov	ecx, [esp+88h+var_74]
mov	eax, 1
shl	eax, cl
mov	[esp+88h+var_4C], edx
xor	ebp, ebp
xor	ebx, ebx
lea	edx, [eax-1]
mov	[esp+88h+var_70], esi
mov	[esp+88h+var_50], eax
mov	[esp+88h+var_60], eax
mov	[esp+88h+var_48], edx
cmp	edi, 1
jnz	short loc_76ADA0
cmp	eax, 506h
jnb	loc_76AFFB

loc_76ADA0:
mov	eax, [esp+88h+arg_14]
mov	[esp+88h+var_64], eax
jmp	short loc_76ADB0
align 10h

loc_76ADB0:
mov	cl, byte ptr [esp+88h+var_70]
mov	esi, [esp+88h+var_64]
movzx	eax, word ptr [esi]
mov	edx, [esp+88h+var_5C]
sub	cl, bl
mov	byte ptr [esp+88h+var_78+1], cl
movzx	ecx, ax
cmp	ecx, edx
jge	short loc_76ADD8
mov	byte ptr [esp+88h+var_78], 0
mov	word ptr [esp+88h+var_78+2], ax
jmp	short loc_76AE05

loc_76ADD8:
jle	short loc_76ADF9
movzx	eax, word ptr [esi]
mov	edx, [esp+88h+var_58]
add	eax, eax
mov	cl, [eax+edx]
mov	edx, [esp+88h+var_54]
mov	ax, [eax+edx]
mov	byte ptr [esp+88h+var_78], cl
mov	word ptr [esp+88h+var_78+2], ax
jmp	short loc_76AE05

loc_76ADF9:
xor	ecx, ecx
mov	byte ptr [esp+88h+var_78], 60h
mov	word ptr [esp+88h+var_78+2], cx

loc_76AE05:
mov	ecx, [esp+88h+var_70]
mov	edx, [esp+88h+var_50]
sub	ecx, ebx
mov	eax, 1
shl	eax, cl
mov	ecx, ebx
mov	edi, ebp
shr	edi, cl
mov	ecx, [esp+88h+var_68]
lea	esi, ds:0[eax*4]
add	edi, edx
lea	ecx, [ecx+edi*4]
mov	edi, [esp+88h+var_78]

loc_76AE30:
sub	edx, eax
sub	ecx, esi
mov	[ecx], edi
test	edx, edx
jnz	short loc_76AE30
mov	edx, [esp+88h+var_70]
lea	ecx, [edx-1]
mov	eax, 1
shl	eax, cl
test	ebp, eax
jz	short loc_76AE56
lea	esp, [esp+0]

loc_76AE50:
shr	eax, 1
test	ebp, eax
jnz	short loc_76AE50

loc_76AE56:
test	eax, eax
jz	short loc_76AE65
lea	ecx, [eax-1]
and	ecx, ebp
add	ecx, eax
mov	ebp, ecx
jmp	short loc_76AE67

loc_76AE65:
xor	ebp, ebp

loc_76AE67:
add	[esp+88h+var_64], 2
mov	eax, 0FFFFh
add	word ptr [esp+edx*2+88h+var_40], ax
movzx	eax, word ptr [esp+edx*2+88h+var_40]
test	ax, ax
jnz	short loc_76AEA2
cmp	edx, [esp+88h+var_6C]
jz	loc_76AF62
mov	ecx, [esp+88h+var_64]
movzx	edx, word ptr [ecx]
mov	eax, [esp+88h+arg_4]
movzx	ecx, word ptr [eax+edx*2]
mov	[esp+88h+var_70], ecx
mov	edx, ecx

loc_76AEA2:
cmp	edx, [esp+88h+var_74]
jbe	loc_76ADB0
mov	esi, [esp+88h+var_48]
and	esi, ebp
mov	[esp+88h+var_44], esi
cmp	esi, [esp+88h+var_4C]
jz	loc_76ADB0
mov	edx, [esp+88h+var_68]
mov	eax, [esp+88h+var_50]
lea	ecx, [edx+eax*4]
test	ebx, ebx
cmovz	ebx, [esp+88h+var_74]
mov	[esp+88h+var_68], ecx
mov	ecx, [esp+88h+var_70]
sub	ecx, ebx
mov	eax, 1
lea	edx, [ebx+ecx]
shl	eax, cl
cmp	edx, [esp+88h+var_6C]
jnb	short loc_76AF0A
lea	esi, [esp+edx*2+88h+var_40]

loc_76AEF0:
movzx	edi, word ptr [esi]
sub	eax, edi
test	eax, eax
jle	short loc_76AF06
inc	edx
inc	ecx
add	esi, 2
add	eax, eax
cmp	edx, [esp+88h+var_6C]
jb	short loc_76AEF0

loc_76AF06:
mov	esi, [esp+88h+var_44]

loc_76AF0A:
mov	eax, 1
shl	eax, cl
add	[esp+88h+var_60], eax
cmp	[esp+88h+arg_0], 1
mov	[esp+88h+var_50], eax
jnz	short loc_76AF31
cmp	[esp+88h+var_60], 506h
jnb	loc_76AFFB

loc_76AF31:
mov	edx, esi
mov	esi, [esp+88h+arg_C]
mov	eax, [esi]
mov	[eax+edx*4], cl
mov	ecx, [esi]
mov	al, byte ptr [esp+88h+var_74]
mov	[ecx+edx*4+1], al
mov	eax, [esi]
mov	ecx, [esp+88h+var_68]
sub	ecx, eax
sar	ecx, 2
mov	[esp+88h+var_4C], edx
mov	[eax+edx*4+2], cx
jmp	loc_76ADB0

loc_76AF62:
mov	edi, [esp+88h+arg_C]
mov	al, dl
sub	al, bl
xor	ecx, ecx
mov	byte ptr [esp+88h+var_78], 40h
mov	byte ptr [esp+88h+var_78+1], al
mov	word ptr [esp+88h+var_78+2], cx
test	ebp, ebp
jz	short loc_76AFD7
mov	esi, [esp+88h+var_68]

loc_76AF85:
test	ebx, ebx
jz	short loc_76AFA7
mov	eax, [esp+88h+var_48]
and	eax, ebp
cmp	eax, [esp+88h+var_4C]
jz	short loc_76AFA7
mov	eax, [esp+88h+var_74]
mov	esi, [edi]
xor	ebx, ebx
mov	[esp+88h+var_70], eax
mov	byte ptr [esp+88h+var_78+1], al
mov	edx, eax

loc_76AFA7:
mov	ecx, ebx
mov	eax, ebp
shr	eax, cl
mov	ecx, [esp+88h+var_78]
mov	[esi+eax*4], ecx
lea	ecx, [edx-1]
mov	eax, 1
shl	eax, cl
test	ebp, eax
jz	short loc_76AFC8

loc_76AFC2:
shr	eax, 1
test	ebp, eax
jnz	short loc_76AFC2

loc_76AFC8:
test	eax, eax
jz	short loc_76AFD7
lea	ecx, [eax-1]
and	ecx, ebp
add	ecx, eax
mov	ebp, ecx
jnz	short loc_76AF85

loc_76AFD7:
mov	edx, [esp+88h+var_60]
mov	ecx, [esp+88h+arg_10]
lea	eax, ds:0[edx*4]
add	[edi], eax
mov	edx, [esp+88h+var_74]
pop	edi
pop	esi
pop	ebp
mov	[ecx], edx
xor	eax, eax
pop	ebx
add	esp, 78h
retn

loc_76AFFB:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
add	esp, 78h
retn
sub_76AB40 endp

align 10h



sub_76B010 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_0]
movzx	ecx, di
shr	edi, 10h
test	esi, esi
jnz	short loc_76B02A
pop	edi
lea	eax, [esi+1]
pop	esi
retn

loc_76B02A:
push	ebx
mov	ebx, [esp+0Ch+arg_8]
test	ebx, ebx
jbe	loc_76B13A
push	ebp
jmp	short loc_76B040
align 10h

loc_76B040:
mov	eax, ebx
cmp	ebx, 15B0h
jb	short loc_76B04F
mov	eax, 15B0h

loc_76B04F:
sub	ebx, eax
cmp	eax, 10h
jl	loc_76B0FB
mov	edx, eax
shr	edx, 4
mov	ebp, edx
neg	ebp
shl	ebp, 4
add	eax, ebp
jmp	short loc_76B070
align 10h

loc_76B070:
movzx	ebp, byte ptr [esi]
add	ecx, ebp
movzx	ebp, byte ptr [esi+1]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+2]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+3]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+4]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+5]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+6]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+7]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+8]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+9]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+0Ah]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+0Bh]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+0Ch]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+0Dh]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+0Eh]
add	edi, ecx
add	ecx, ebp
movzx	ebp, byte ptr [esi+0Fh]
add	edi, ecx
add	ecx, ebp
add	edi, ecx
add	esi, 10h
sub	edx, 1
jnz	loc_76B070

loc_76B0FB:
test	eax, eax
jz	short loc_76B10D
nop

loc_76B100:
movzx	edx, byte ptr [esi]
add	ecx, edx
inc	esi
add	edi, ecx
sub	eax, 1
jnz	short loc_76B100

loc_76B10D:
mov	eax, 80078071h
mul	ecx
shr	edx, 0Fh
imul	edx, 0FFFF000Fh
add	ecx, edx
mov	eax, 80078071h
mul	edi
shr	edx, 0Fh
imul	edx, 0FFFF000Fh
add	edi, edx
test	ebx, ebx
ja	loc_76B040
pop	ebp

loc_76B13A:
mov	eax, edi
pop	ebx
shl	eax, 10h
pop	edi
or	eax, ecx
pop	esi
retn
sub_76B010 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_76B430

loc_76B150:
push	esi
mov	esi, edx
not	eax
test	esi, esi
jz	short loc_76B180
lea	esp, [esp+0]

loc_76B160:
test	cl, 3
jz	short loc_76B180
movzx	edx, byte ptr [ecx]
xor	edx, eax
and	edx, 0FFh
shr	eax, 8
xor	eax, ds:dword_14425C0[edx*4]
inc	ecx
sub	esi, 1
jnz	short loc_76B160

loc_76B180:
push	ebx
push	edi
cmp	esi, 20h
jb	loc_76B3AB
mov	edi, esi
shr	edi, 5

loc_76B190:
xor	eax, [ecx]
add	ecx, 4
mov	edx, eax
shr	edx, 10h
mov	ebx, eax
shr	ebx, 8
and	edx, 0FFh
mov	edx, ds:dword_14429C0[edx*4]
and	ebx, 0FFh
xor	edx, ds:dword_1442DC0[ebx*4]
mov	ebx, eax
shr	ebx, 18h
xor	edx, ds:dword_14425C0[ebx*4]
and	eax, 0FFh
xor	edx, ds:dword_14431C0[eax*4]
add	ecx, 4
xor	edx, [ecx-4]
add	ecx, 4
mov	eax, edx
shr	eax, 10h
mov	ebx, edx
shr	ebx, 8
and	eax, 0FFh
mov	eax, ds:dword_14429C0[eax*4]
and	ebx, 0FFh
xor	eax, ds:dword_1442DC0[ebx*4]
mov	ebx, edx
shr	ebx, 18h
xor	eax, ds:dword_14425C0[ebx*4]
and	edx, 0FFh
xor	eax, ds:dword_14431C0[edx*4]
add	ecx, 4
xor	eax, [ecx-8]
add	ecx, 4
mov	edx, eax
shr	edx, 10h
mov	ebx, eax
and	edx, 0FFh
mov	edx, ds:dword_14429C0[edx*4]
shr	ebx, 8
and	ebx, 0FFh
xor	edx, ds:dword_1442DC0[ebx*4]
mov	ebx, eax
shr	ebx, 18h
xor	edx, ds:dword_14425C0[ebx*4]
and	eax, 0FFh
xor	edx, ds:dword_14431C0[eax*4]
add	ecx, 4
xor	edx, [ecx-0Ch]
mov	eax, edx
shr	eax, 10h
mov	ebx, edx
shr	ebx, 8
and	eax, 0FFh
mov	eax, ds:dword_14429C0[eax*4]
and	ebx, 0FFh
xor	eax, ds:dword_1442DC0[ebx*4]
mov	ebx, edx
shr	ebx, 18h
xor	eax, ds:dword_14425C0[ebx*4]
and	edx, 0FFh
xor	eax, ds:dword_14431C0[edx*4]
xor	eax, [ecx-8]
mov	edx, eax
shr	edx, 10h
mov	ebx, eax
and	edx, 0FFh
mov	edx, ds:dword_14429C0[edx*4]
shr	ebx, 8
and	ebx, 0FFh
xor	edx, ds:dword_1442DC0[ebx*4]
mov	ebx, eax
shr	ebx, 18h
xor	edx, ds:dword_14425C0[ebx*4]
and	eax, 0FFh
xor	edx, ds:dword_14431C0[eax*4]
xor	edx, [ecx-4]
mov	eax, edx
shr	eax, 10h
and	eax, 0FFh
mov	ebx, edx
mov	eax, ds:dword_14429C0[eax*4]
shr	ebx, 8
and	ebx, 0FFh
xor	eax, ds:dword_1442DC0[ebx*4]
mov	ebx, edx
shr	ebx, 18h
xor	eax, ds:dword_14425C0[ebx*4]
and	edx, 0FFh
xor	eax, ds:dword_14431C0[edx*4]
add	ecx, 4
xor	eax, [ecx-4]
add	ecx, 4
mov	edx, eax
mov	ebx, eax
shr	edx, 10h
shr	ebx, 8
and	edx, 0FFh
mov	edx, ds:dword_14429C0[edx*4]
and	ebx, 0FFh
xor	edx, ds:dword_1442DC0[ebx*4]
mov	ebx, eax
shr	ebx, 18h
xor	edx, ds:dword_14425C0[ebx*4]
and	eax, 0FFh
xor	edx, ds:dword_14431C0[eax*4]
sub	esi, 20h
xor	edx, [ecx-4]
mov	eax, edx
shr	eax, 10h
and	eax, 0FFh
mov	eax, ds:dword_14429C0[eax*4]
mov	ebx, edx
shr	ebx, 8
and	ebx, 0FFh
xor	eax, ds:dword_1442DC0[ebx*4]
mov	ebx, edx
shr	ebx, 18h
xor	eax, ds:dword_14425C0[ebx*4]
and	edx, 0FFh
xor	eax, ds:dword_14431C0[edx*4]
sub	edi, 1
jnz	loc_76B190

loc_76B3AB:
cmp	esi, 4
jb	short loc_76B400
mov	edx, esi
shr	edx, 2

loc_76B3B5:
xor	eax, [ecx]
add	ecx, 4
mov	edi, eax
shr	edi, 10h
and	edi, 0FFh
mov	edi, ds:dword_14429C0[edi*4]
mov	ebx, eax
shr	ebx, 8
and	ebx, 0FFh
xor	edi, ds:dword_1442DC0[ebx*4]
mov	ebx, eax
shr	ebx, 18h
xor	edi, ds:dword_14425C0[ebx*4]
and	eax, 0FFh
xor	edi, ds:dword_14431C0[eax*4]
sub	esi, 4
sub	edx, 1
mov	eax, edi
jnz	short loc_76B3B5

loc_76B400:
pop	edi
pop	ebx
test	esi, esi
jz	short loc_76B42B
jmp	short loc_76B410
; END OF FUNCTION CHUNK	FOR sub_76B430
align 10h
; START	OF FUNCTION CHUNK FOR sub_76B430

loc_76B410:
movzx	edx, byte ptr [ecx]
xor	edx, eax
and	edx, 0FFh
shr	eax, 8
xor	eax, ds:dword_14425C0[edx*4]
inc	ecx
sub	esi, 1
jnz	short loc_76B410

loc_76B42B:
not	eax
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_76B430
align 10h



sub_76B430 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

; FUNCTION CHUNK AT 0076B150 SIZE 000002B8 BYTES
; FUNCTION CHUNK AT 0076B410 SIZE 0000001F BYTES

mov	ecx, [esp+arg_4]
test	ecx, ecx
jnz	short loc_76B43B
xor	eax, eax
retn

loc_76B43B:
mov	edx, [esp+arg_8]
mov	eax, [esp+arg_0]
jmp	loc_76B150
sub_76B430 endp

align 10h



sub_76B450 proc	near
lea	eax, [edx+8Ch]
mov	ecx, 11Eh
push	esi
lea	esp, [esp+0]

loc_76B460:
xor	esi, esi
mov	[eax], si
add	eax, 4
sub	ecx, 1
jnz	short loc_76B460
lea	eax, [edx+980h]
mov	ecx, 1Eh

loc_76B478:
xor	esi, esi
mov	[eax], si
add	eax, 4
sub	ecx, 1
jnz	short loc_76B478
lea	eax, [edx+0A74h]
mov	ecx, 13h

loc_76B490:
xor	esi, esi
mov	[eax], si
add	eax, 4
sub	ecx, 1
jnz	short loc_76B490
mov	eax, 1
mov	[edx+48Ch], ax
xor	eax, eax
mov	[edx+16A4h], eax
mov	[edx+16A0h], eax
mov	[edx+16A8h], eax
mov	[edx+1698h], eax
pop	esi
retn
sub_76B450 endp

align 10h



sub_76B4D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [eax+1448h]
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebp, [eax+esi*4+0B54h]
lea	ecx, [esi+esi]
cmp	ecx, edx
mov	[esp+0Ch+var_4], ebp
jg	loc_76B589
push	ebx

loc_76B4F4:
jge	short loc_76B528
mov	esi, [eax+ecx*4+0B58h]
mov	ebp, [eax+ecx*4+0B54h]
movzx	edx, word ptr [edi+esi*4]
movzx	ebx, word ptr [edi+ebp*4]
cmp	dx, bx
jb	short loc_76B523
jnz	short loc_76B524
mov	dl, [esi+eax+1450h]
cmp	dl, [eax+ebp+1450h]
ja	short loc_76B524

loc_76B523:
inc	ecx

loc_76B524:
mov	ebp, [esp+10h+var_4]

loc_76B528:
mov	esi, [eax+ecx*4+0B54h]
movzx	edx, word ptr [edi+ebp*4]
movzx	ebx, word ptr [edi+esi*4]
cmp	dx, bx
jb	short loc_76B569
jnz	short loc_76B54E
mov	dl, [eax+ebp+1450h]
cmp	dl, [esi+eax+1450h]
jbe	short loc_76B579

loc_76B54E:
mov	edx, [esp+10h+arg_0]
mov	[eax+edx*4+0B54h], esi
mov	edx, [eax+1448h]
mov	[esp+10h+arg_0], ecx
add	ecx, ecx
cmp	ecx, edx
jle	short loc_76B4F4

loc_76B569:
mov	ecx, [esp+10h+arg_0]
pop	ebx
pop	esi
mov	[eax+ecx*4+0B54h], ebp
pop	ebp
pop	ecx
retn

loc_76B579:
mov	edx, [esp+10h+arg_0]
pop	ebx
pop	esi
mov	[eax+edx*4+0B54h], ebp
pop	ebp
pop	ecx
retn

loc_76B589:
mov	[eax+esi*4+0B54h], ebp
pop	esi
pop	ebp
pop	ecx
retn
sub_76B4D0 endp

align 10h



sub_76B5A0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	edx, [ecx+4]
mov	ebx, [ecx]
mov	ecx, [ecx+8]
mov	[esp+30h+var_C], edx
mov	edx, [ecx+4]
mov	ebp, [ecx]
mov	[esp+30h+var_4], edx
mov	edx, [ecx+8]
mov	esi, [ecx+10h]
xor	ecx, ecx
mov	[esp+30h+var_8], edx
movzx	edx, cx
mov	ecx, edx
shl	edx, 10h
or	ecx, edx
mov	[eax+0B34h], ecx
mov	[eax+0B38h], ecx
mov	[eax+0B3Ch], ecx
mov	[eax+0B40h], ecx
mov	[eax+0B44h], ecx
mov	[eax+0B48h], ecx
mov	[eax+0B4Ch], ecx
mov	[eax+0B50h], ecx
mov	ecx, [eax+144Ch]
mov	edx, [eax+ecx*4+0B54h]
xor	ecx, ecx
mov	[ebx+edx*4+2], cx
mov	edi, [eax+144Ch]
inc	edi
cmp	edi, 23Dh
mov	[esp+30h+var_14], esi
mov	[esp+30h+var_18], 0
jge	loc_76B7AB
mov	ecx, 23Dh
sub	ecx, edi
lea	edx, [eax+edi*4+0B54h]
add	edi, ecx
mov	[esp+30h+var_1C], edx
mov	[esp+30h+var_10], ecx
mov	[esp+30h+var_20], edi
jmp	short loc_76B657

loc_76B653:
mov	esi, [esp+30h+var_14]

loc_76B657:
mov	ecx, [esp+30h+var_1C]
mov	edx, [ecx]
movzx	ecx, word ptr [ebx+edx*4+2]
movzx	ecx, word ptr [ebx+ecx*4+2]
inc	ecx
cmp	ecx, esi
jle	short loc_76B672
inc	[esp+30h+var_18]
mov	ecx, esi

loc_76B672:
cmp	edx, [esp+30h+var_C]
mov	[ebx+edx*4+2], cx
jg	short loc_76B6C1
mov	edi, [esp+30h+var_8]
inc	word ptr [eax+ecx*2+0B34h]
xor	esi, esi
cmp	edx, edi
jl	short loc_76B69A
mov	esi, edx
sub	esi, edi
mov	edi, [esp+30h+var_4]
mov	esi, [edi+esi*4]

loc_76B69A:
movzx	edi, word ptr [ebx+edx*4]
add	ecx, esi
imul	ecx, edi
add	[eax+16A0h], ecx
test	ebp, ebp
jz	short loc_76B6BD
movzx	edx, word ptr [ebp+edx*4+2]
add	edx, esi
imul	edx, edi
add	[eax+16A4h], edx

loc_76B6BD:
mov	edi, [esp+30h+var_20]

loc_76B6C1:
add	[esp+30h+var_1C], 4
sub	[esp+30h+var_10], 1
jnz	short loc_76B653
mov	ebp, [esp+30h+var_18]
test	ebp, ebp
jz	loc_76B7AB
mov	ecx, [esp+30h+var_14]
lea	edx, [ecx-1]
mov	[esp+30h+var_4], edx
lea	esi, [eax+ecx*2+0B34h]
jmp	short loc_76B6F0
align 10h

loc_76B6F0:
mov	ecx, [esp+30h+var_4]
cmp	word ptr [eax+ecx*2+0B34h], 0
lea	edx, [eax+ecx*2+0B34h]
jnz	short loc_76B710

loc_76B706:
sub	edx, 2
dec	ecx
cmp	word ptr [edx],	0
jz	short loc_76B706

loc_76B710:
add	word ptr [eax+ecx*2+0B36h], 2
mov	edx, 0FFFFh
add	[eax+ecx*2+0B34h], dx
mov	ecx, edx
add	[esi], cx
sub	ebp, 2
test	ebp, ebp
jg	short loc_76B6F0
mov	edx, [esp+30h+var_14]
test	edx, edx
jz	short loc_76B7AB
mov	[esp+30h+var_10], esi
mov	edi, edi

loc_76B740:
movzx	esi, word ptr [esi]
mov	[esp+30h+var_14], esi
test	esi, esi
jz	short loc_76B79B
lea	ebp, [eax+edi*4+0B54h]

loc_76B752:
mov	ecx, [ebp-4]
dec	[esp+30h+var_20]
sub	ebp, 4
cmp	ecx, [esp+30h+var_C]
mov	[esp+30h+var_4], ebp
jg	short loc_76B793
movzx	edi, word ptr [ebx+ecx*4+2]
lea	esi, [ebx+ecx*4+2]
cmp	edi, edx
jz	short loc_76B78B
movzx	ecx, word ptr [ebx+ecx*4]
mov	ebp, edx
sub	ebp, edi
imul	ebp, ecx
add	[eax+16A0h], ebp
mov	ebp, [esp+30h+var_4]
mov	[esi], dx

loc_76B78B:
dec	[esp+30h+var_14]
mov	esi, [esp+30h+var_14]

loc_76B793:
test	esi, esi
jnz	short loc_76B752
mov	edi, [esp+30h+var_20]

loc_76B79B:
mov	esi, [esp+30h+var_10]
dec	edx
sub	esi, 2
mov	[esp+30h+var_10], esi
test	edx, edx
jnz	short loc_76B740

loc_76B7AB:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn
sub_76B5A0 endp

align 10h



sub_76B7C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
movzx	edi, word ptr [eax+2]
xor	edx, edx
mov	ebx, ecx
mov	[esp+1Ch+var_4], 0FFFFFFFFh
lea	ecx, [edx+7]
lea	esi, [edx+4]
test	edi, edi
jnz	short loc_76B7E9
mov	ecx, 8Ah
lea	esi, [edx+3]

loc_76B7E9:
mov	ebp, 0FFFFh
mov	[eax+ebx*4+6], bp
test	ebx, ebx
jl	loc_76B896
mov	ebp, [esp+1Ch+var_4]
add	eax, 6
inc	ebx
mov	[esp+1Ch+var_8], ebx
mov	ebx, [esp+1Ch+arg_0]
mov	[esp+1Ch+var_C], eax
nop

loc_76B810:
mov	eax, edi
mov	edi, [esp+1Ch+var_C]
movzx	edi, word ptr [edi]
inc	edx
cmp	edx, ecx
jge	short loc_76B822
cmp	eax, edi
jz	short loc_76B886

loc_76B822:
cmp	edx, esi
jge	short loc_76B830
add	[ebx+eax*4+0A74h], dx
jmp	short loc_76B85E

loc_76B830:
test	eax, eax
jz	short loc_76B849
cmp	eax, ebp
jz	short loc_76B840
inc	word ptr [ebx+eax*4+0A74h]

loc_76B840:
inc	word ptr [ebx+0AB4h]
jmp	short loc_76B85E

loc_76B849:
cmp	edx, 0Ah
jg	short loc_76B857
inc	word ptr [ebx+0AB8h]
jmp	short loc_76B85E

loc_76B857:
inc	word ptr [ebx+0ABCh]

loc_76B85E:
xor	edx, edx
mov	ebp, eax
test	edi, edi
jnz	short loc_76B870
mov	ecx, 8Ah
lea	esi, [edx+3]
jmp	short loc_76B886

loc_76B870:
cmp	eax, edi
jnz	short loc_76B87E
mov	ecx, 6
lea	esi, [ecx-3]
jmp	short loc_76B886

loc_76B87E:
mov	ecx, 7
lea	esi, [ecx-3]

loc_76B886:
add	[esp+1Ch+var_C], 4
sub	[esp+1Ch+var_8], 1
jnz	loc_76B810

loc_76B896:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_76B7C0 endp

align 10h



sub_76B8A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 18h
push	ebx
push	ebp
movzx	ebp, word ptr [edx+2]
push	esi
xor	esi, esi
push	edi
mov	ebx, ecx
mov	[esp+28h+var_C], 0FFFFFFFFh
mov	[esp+28h+var_14], ebp
lea	ecx, [esi+7]
lea	edi, [esi+4]
test	ebp, ebp
jnz	short loc_76B8CD
mov	ecx, 8Ah
lea	edi, [ebp+3]

loc_76B8CD:
test	ebx, ebx
jl	loc_76BDA3
add	edx, 6
inc	ebx
mov	[esp+28h+var_10], edx
mov	[esp+28h+var_8], ebx
mov	ebp, 1
jmp	short loc_76B8F0
align 10h

loc_76B8F0:
mov	ebx, [esp+28h+var_10]
movzx	ebx, word ptr [ebx]
mov	edx, [esp+28h+var_14]
add	esi, ebp
cmp	esi, ecx
mov	[esp+28h+var_4], edx
mov	[esp+28h+var_14], ebx
mov	[esp+28h+var_18], esi
jge	short loc_76B915
cmp	edx, ebx
jz	loc_76BD94

loc_76B915:
cmp	esi, edi
jge	loc_76B9BF
lea	ecx, [ecx+0]

loc_76B920:
movzx	edi, word ptr [eax+edx*4+0A76h]
mov	ecx, [eax+16B4h]
mov	ebx, 10h
sub	ebx, edi
cmp	ecx, ebx
jle	short loc_76B994
movzx	esi, word ptr [eax+edx*4+0A74h]
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+8]
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	[ecx+edx], bl
add	[eax+14h], ebp
mov	ecx, [eax+14h]
movzx	ebx, byte ptr [eax+16B1h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, dl
shr	si, cl
lea	ecx, [edx+edi-10h]
mov	edx, [esp+28h+var_4]
mov	[eax+16B0h], si
mov	esi, [esp+28h+var_18]
jmp	short loc_76B9A8

loc_76B994:
mov	bx, [eax+edx*4+0A74h]
shl	bx, cl
or	[eax+16B0h], bx
add	ecx, edi

loc_76B9A8:
sub	esi, ebp
mov	[eax+16B4h], ecx
mov	[esp+28h+var_18], esi
jnz	loc_76B920
jmp	loc_76BD66

loc_76B9BF:
test	edx, edx
jz	loc_76BB6C
cmp	edx, [esp+28h+var_C]
jz	loc_76BA6D
movzx	edi, word ptr [eax+edx*4+0A76h]
mov	ecx, [eax+16B4h]
mov	ebx, 10h
sub	ebx, edi
cmp	ecx, ebx
mov	[esp+28h+var_C], edi
jle	short loc_76BA49
movzx	esi, word ptr [eax+edx*4+0A74h]
mov	edi, esi
shl	edi, cl
mov	ecx, [eax+8]
or	[eax+16B0h], di
movzx	ebx, byte ptr [eax+16B0h]
mov	edi, [eax+14h]
mov	[ecx+edi], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+8]
mov	edi, [eax+14h]
mov	[edi+ecx], bl
mov	ebx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, bl
shr	si, cl
mov	ecx, [esp+28h+var_C]
lea	ecx, [ebx+ecx-10h]
mov	[eax+16B0h], si
mov	esi, [esp+28h+var_18]
jmp	short loc_76BA61

loc_76BA49:
mov	di, [eax+edx*4+0A74h]
shl	di, cl
or	[eax+16B0h], di
mov	edi, [esp+28h+var_C]
add	ecx, edi

loc_76BA61:
sub	esi, ebp
mov	[eax+16B4h], ecx
mov	[esp+28h+var_18], esi

loc_76BA6D:
movzx	edi, word ptr [eax+0AB6h]
mov	ecx, [eax+16B4h]
mov	ebx, 10h
sub	ebx, edi
cmp	ecx, ebx
mov	[esp+28h+var_C], edi
jle	short loc_76BAE3
movzx	esi, word ptr [eax+0AB4h]
mov	edi, esi
shl	edi, cl
mov	ecx, [eax+8]
or	[eax+16B0h], di
movzx	ebx, byte ptr [eax+16B0h]
mov	edi, [eax+14h]
mov	[ecx+edi], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+8]
mov	edi, [eax+14h]
mov	[edi+ecx], bl
mov	ebx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, bl
shr	si, cl
mov	ecx, [esp+28h+var_C]
lea	ecx, [ebx+ecx-10h]
mov	[eax+16B0h], si
mov	esi, [esp+28h+var_18]
jmp	short loc_76BAFA

loc_76BAE3:
mov	di, [eax+0AB4h]
shl	di, cl
or	[eax+16B0h], di
mov	edi, [esp+28h+var_C]
add	ecx, edi

loc_76BAFA:
add	esi, 0FFFFFFFDh
cmp	ecx, 0Eh
mov	[eax+16B4h], ecx
jle	short loc_76BB5B
mov	edi, esi
shl	edi, cl
mov	ecx, [eax+8]
or	[eax+16B0h], di
movzx	ebx, byte ptr [eax+16B0h]
mov	edi, [eax+14h]
mov	[ecx+edi], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	edi, [eax+14h]
mov	ecx, [eax+8]
mov	[edi+ecx], bl
mov	ebx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, bl
shr	si, cl
add	ebx, 0FFFFFFF2h
mov	[eax+16B4h], ebx
mov	[eax+16B0h], si
jmp	loc_76BD66

loc_76BB5B:
shl	esi, cl
or	[eax+16B0h], si
add	ecx, 2
jmp	loc_76BD60

loc_76BB6C:
cmp	esi, 0Ah
mov	ecx, [eax+16B4h]
mov	ebx, 10h
jg	loc_76BC74
movzx	edi, word ptr [eax+0ABAh]
sub	ebx, edi
cmp	ecx, ebx
mov	[esp+28h+var_C], edi
jle	short loc_76BBEB
movzx	esi, word ptr [eax+0AB8h]
mov	edi, esi
shl	edi, cl
mov	ecx, [eax+8]
or	[eax+16B0h], di
movzx	ebx, byte ptr [eax+16B0h]
mov	edi, [eax+14h]
mov	[ecx+edi], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+8]
mov	edi, [eax+14h]
mov	[edi+ecx], bl
mov	ebx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, bl
shr	si, cl
mov	ecx, [esp+28h+var_C]
lea	ecx, [ebx+ecx-10h]
mov	[eax+16B0h], si
mov	esi, [esp+28h+var_18]
jmp	short loc_76BC02

loc_76BBEB:
mov	di, [eax+0AB8h]
shl	di, cl
or	[eax+16B0h], di
mov	edi, [esp+28h+var_C]
add	ecx, edi

loc_76BC02:
add	esi, 0FFFFFFFDh
cmp	ecx, 0Dh
mov	[eax+16B4h], ecx
jle	short loc_76BC63
mov	edi, esi
shl	edi, cl
mov	ecx, [eax+8]
or	[eax+16B0h], di
movzx	ebx, byte ptr [eax+16B0h]
mov	edi, [eax+14h]
mov	[ecx+edi], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	edi, [eax+14h]
mov	ecx, [eax+8]
mov	[edi+ecx], bl
mov	ebx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, bl
shr	si, cl
add	ebx, 0FFFFFFF3h
mov	[eax+16B4h], ebx
mov	[eax+16B0h], si
jmp	loc_76BD66

loc_76BC63:
shl	esi, cl
or	[eax+16B0h], si
add	ecx, 3
jmp	loc_76BD60

loc_76BC74:
movzx	edi, word ptr [eax+0ABEh]
sub	ebx, edi
cmp	ecx, ebx
mov	[esp+28h+var_C], edi
jle	short loc_76BCDF
movzx	esi, word ptr [eax+0ABCh]
mov	edi, esi
shl	edi, cl
mov	ecx, [eax+8]
or	[eax+16B0h], di
movzx	ebx, byte ptr [eax+16B0h]
mov	edi, [eax+14h]
mov	[ecx+edi], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+8]
mov	edi, [eax+14h]
mov	[edi+ecx], bl
mov	ebx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, bl
shr	si, cl
mov	ecx, [esp+28h+var_C]
lea	ecx, [ebx+ecx-10h]
mov	[eax+16B0h], si
mov	esi, [esp+28h+var_18]
jmp	short loc_76BCF6

loc_76BCDF:
mov	di, [eax+0ABCh]
shl	di, cl
or	[eax+16B0h], di
mov	edi, [esp+28h+var_C]
add	ecx, edi

loc_76BCF6:
add	esi, 0FFFFFFF5h
cmp	ecx, 9
mov	[eax+16B4h], ecx
jle	short loc_76BD54
mov	edi, esi
shl	edi, cl
mov	ecx, [eax+8]
or	[eax+16B0h], di
movzx	ebx, byte ptr [eax+16B0h]
mov	edi, [eax+14h]
mov	[ecx+edi], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	edi, [eax+14h]
mov	ecx, [eax+8]
mov	[edi+ecx], bl
mov	ebx, [eax+16B4h]
add	[eax+14h], ebp
mov	cl, 10h
sub	cl, bl
shr	si, cl
add	ebx, 0FFFFFFF7h
mov	[eax+16B4h], ebx
mov	[eax+16B0h], si
jmp	short loc_76BD66

loc_76BD54:
shl	esi, cl
or	[eax+16B0h], si
add	ecx, 7

loc_76BD60:
mov	[eax+16B4h], ecx

loc_76BD66:
mov	ecx, [esp+28h+var_14]
xor	esi, esi
mov	[esp+28h+var_C], edx
test	ecx, ecx
jnz	short loc_76BD7E
mov	ecx, 8Ah
lea	edi, [esi+3]
jmp	short loc_76BD94

loc_76BD7E:
cmp	edx, ecx
jnz	short loc_76BD8C
mov	ecx, 6
lea	edi, [ecx-3]
jmp	short loc_76BD94

loc_76BD8C:
mov	ecx, 7
lea	edi, [ecx-3]

loc_76BD94:
add	[esp+28h+var_10], 4
sub	[esp+28h+var_8], ebp
jnz	loc_76B8F0

loc_76BDA3:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_76B8A0 endp

align 10h



sub_76BDB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [eax+16B4h]
cmp	ecx, 0Bh
push	ebx
mov	ebx, [esp+8+arg_8]
push	ebp
push	esi
push	edi
mov	ebp, 1
jle	short loc_76BE27
mov	esi, [esp+14h+arg_0]
add	esi, 0FFFFFEFFh
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+14h]
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], ebp
mov	ebx, [esp+14h+arg_8]
mov	cl, 10h
sub	cl, dl
shr	si, cl
add	edx, 0FFFFFFF5h
mov	[eax+16B4h], edx
mov	[eax+16B0h], si
jmp	short loc_76BE43

loc_76BE27:
mov	edx, [esp+14h+arg_0]
add	edx, 0FFFFFEFFh
shl	edx, cl
or	[eax+16B0h], dx
add	ecx, 5
mov	[eax+16B4h], ecx

loc_76BE43:
mov	ecx, [eax+16B4h]
cmp	ecx, 0Bh
jle	short loc_76BEAB
mov	esi, [esp+14h+arg_4]
dec	esi
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+14h]
mov	[esp+14h+var_4], ebx
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], ebp
mov	ebx, [esp+14h+var_4]
mov	cl, 10h
sub	cl, dl
shr	si, cl
add	edx, 0FFFFFFF5h
mov	[eax+16B4h], edx
mov	[eax+16B0h], si
jmp	short loc_76BEC2

loc_76BEAB:
mov	edx, [esp+14h+arg_4]
dec	edx
shl	edx, cl
or	[eax+16B0h], dx
add	ecx, 5
mov	[eax+16B4h], ecx

loc_76BEC2:
mov	ecx, [eax+16B4h]
cmp	ecx, 0Ch
jle	short loc_76BF28
lea	esi, [ebx-4]
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+14h]
mov	[esp+14h+var_4], ebx
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], ebp
mov	ebx, [esp+14h+var_4]
mov	cl, 10h
sub	cl, dl
shr	si, cl
add	edx, 0FFFFFFF4h
mov	[eax+16B4h], edx
mov	[eax+16B0h], si
jmp	short loc_76BF3D

loc_76BF28:
lea	edx, [ebx-4]
shl	edx, cl
or	[eax+16B0h], dx
add	ecx, 4
mov	[eax+16B4h], ecx

loc_76BF3D:
xor	edi, edi
test	ebx, ebx
jle	loc_76BFE3
jmp	short loc_76BF50
align 10h

loc_76BF50:
mov	ecx, [eax+16B4h]
cmp	ecx, 0Dh
movzx	edx, ds:byte_1444634[edi]
jle	short loc_76BFBE
movzx	esi, word ptr [eax+edx*4+0A76h]
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+14h]
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], ebp
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], ebp
mov	ebx, [esp+14h+arg_8]
mov	cl, 10h
sub	cl, dl
shr	si, cl
add	edx, 0FFFFFFF3h
mov	[eax+16B4h], edx
mov	[eax+16B0h], si
jmp	short loc_76BFD9

loc_76BFBE:
mov	dx, [eax+edx*4+0A76h]
shl	dx, cl
or	[eax+16B0h], dx
add	ecx, 3
mov	[eax+16B4h], ecx

loc_76BFD9:
add	edi, ebp
cmp	edi, ebx
jl	loc_76BF50

loc_76BFE3:
mov	ecx, [esp+14h+arg_0]
dec	ecx
lea	edx, [eax+8Ch]
call	sub_76B8A0
mov	ecx, [esp+14h+arg_4]
pop	edi
pop	esi
pop	ebp
dec	ecx
lea	edx, [eax+980h]
pop	ebx
add	esp, 4
jmp	sub_76B8A0
sub_76BDB0 endp

align 10h



sub_76C010 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
push	ebp
xor	ecx, ecx
push	esi
push	edi
cmp	[eax+1698h], ecx
jz	loc_76C350
lea	esp, [esp+0]

loc_76C030:
mov	edx, [eax+169Ch]
movzx	ebp, word ptr [edx+ecx*2]
mov	edx, [eax+1690h]
movzx	esi, byte ptr [ecx+edx]
inc	ecx
mov	[esp+1Ch+var_4], ecx
mov	ecx, [eax+16B4h]
test	ebp, ebp
jnz	short loc_76C0D2
movzx	edi, word ptr [ebx+esi*4+2]
mov	edx, 10h
sub	edx, edi
cmp	ecx, edx
jle	short loc_76C0BD
movzx	esi, word ptr [ebx+esi*4]
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+8]
mov	[esp+1Ch+var_C], ebx
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
inc	dword ptr [eax+14h]
mov	ebx, [esp+1Ch+var_C]
mov	cl, 10h
sub	cl, dl
shr	si, cl
lea	ecx, [edx+edi-10h]
mov	[eax+16B0h], si
jmp	loc_76C33A

loc_76C0BD:
mov	dx, [ebx+esi*4]
shl	dx, cl
or	[eax+16B0h], dx
add	ecx, edi
jmp	loc_76C33A

loc_76C0D2:
movzx	edx, ds:byte_1444E08[esi]
movzx	edi, word ptr [ebx+edx*4+406h]
mov	ebx, 10h
sub	ebx, edi
cmp	ecx, ebx
mov	[esp+1Ch+var_C], edi
mov	edi, [esp+1Ch+arg_0]
mov	[esp+1Ch+var_8], edx
jle	short loc_76C159
movzx	edi, word ptr [edi+edx*4+404h]
mov	edx, edi
shl	edx, cl
mov	ecx, [eax+8]
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
mov	ecx, [eax+14h]
movzx	ebx, byte ptr [eax+16B1h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
inc	dword ptr [eax+14h]
mov	cl, 10h
sub	cl, dl
shr	di, cl
mov	ecx, [esp+1Ch+var_C]
lea	edx, [edx+ecx-10h]
mov	[eax+16B4h], edx
mov	edx, [esp+1Ch+var_8]
mov	[eax+16B0h], di
jmp	short loc_76C177

loc_76C159:
mov	di, [edi+edx*4+404h]
shl	di, cl
or	[eax+16B0h], di
mov	edi, [esp+1Ch+var_C]
add	ecx, edi
mov	[eax+16B4h], ecx

loc_76C177:
mov	edi, ds:dword_14445C0[edx*4]
mov	ebx, [esp+1Ch+arg_0]
test	edi, edi
jz	short loc_76C1FE
sub	esi, ds:dword_1444F08[edx*4]
mov	ecx, [eax+16B4h]
mov	edx, 10h
sub	edx, edi
cmp	ecx, edx
jle	short loc_76C1ED
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+8]
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
inc	dword ptr [eax+14h]
mov	ebx, [esp+1Ch+arg_0]
mov	cl, 10h
sub	cl, dl
shr	si, cl
lea	ecx, [edx+edi-10h]
mov	[eax+16B0h], si
jmp	short loc_76C1F8

loc_76C1ED:
shl	esi, cl
or	[eax+16B0h], si
add	ecx, edi

loc_76C1F8:
mov	[eax+16B4h], ecx

loc_76C1FE:
dec	ebp
cmp	ebp, 100h
jnb	short loc_76C210
movzx	edi, ss:byte_1444C08[ebp]
jmp	short loc_76C21C

loc_76C210:
mov	edx, ebp
shr	edx, 7
movzx	edi, ds:byte_1444D08[edx]

loc_76C21C:
mov	ecx, [esp+1Ch+arg_4]
movzx	edx, word ptr [ecx+edi*4+2]
mov	ecx, [eax+16B4h]
mov	esi, 10h
sub	esi, edx
cmp	ecx, esi
mov	[esp+1Ch+var_8], edx
jle	short loc_76C29B
mov	edx, [esp+1Ch+arg_4]
movzx	esi, word ptr [edx+edi*4]
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+8]
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
inc	dword ptr [eax+14h]
mov	ebx, [esp+1Ch+arg_0]
mov	cl, 10h
sub	cl, dl
shr	si, cl
mov	ecx, [esp+1Ch+var_8]
lea	edx, [edx+ecx-10h]
mov	[eax+16B4h], edx
mov	[eax+16B0h], si
jmp	short loc_76C2B5

loc_76C29B:
mov	esi, [esp+1Ch+arg_4]
mov	si, [esi+edi*4]
shl	si, cl
or	[eax+16B0h], si
add	ecx, edx
mov	[eax+16B4h], ecx

loc_76C2B5:
mov	esi, ds:dword_1444648[edi*4]
test	esi, esi
jz	loc_76C340
mov	ecx, [eax+16B4h]
sub	ebp, ds:dword_1444F80[edi*4]
mov	edx, 10h
sub	edx, esi
cmp	ecx, edx
jle	short loc_76C32F
mov	edx, ebp
shl	edx, cl
mov	ecx, [eax+8]
mov	[esp+1Ch+var_8], ebx
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
inc	dword ptr [eax+14h]
mov	ebx, [esp+1Ch+var_8]
mov	cl, 10h
sub	cl, dl
shr	bp, cl
lea	ecx, [edx+esi-10h]
mov	[eax+16B0h], bp
jmp	short loc_76C33A

loc_76C32F:
shl	ebp, cl
or	[eax+16B0h], bp
add	ecx, esi

loc_76C33A:
mov	[eax+16B4h], ecx

loc_76C340:
mov	ecx, [esp+1Ch+var_4]
cmp	ecx, [eax+1698h]
jb	loc_76C030

loc_76C350:
movzx	edi, word ptr [ebx+402h]
mov	ecx, [eax+16B4h]
mov	edx, 10h
sub	edx, edi
cmp	ecx, edx
jle	short loc_76C3D9
movzx	esi, word ptr [ebx+400h]
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+8]
mov	[esp+1Ch+arg_0], ebx
or	[eax+16B0h], dx
mov	edx, [eax+14h]
mov	bl, [eax+16B0h]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
mov	ebp, [eax+14h]
mov	ecx, [eax+8]
mov	dl, [eax+16B1h]
mov	ebx, [esp+1Ch+arg_0]
mov	[ecx+ebp], dl
mov	edx, [eax+16B4h]
inc	dword ptr [eax+14h]
mov	cl, 10h
sub	cl, dl
shr	si, cl
lea	ecx, [edx+edi-10h]
pop	edi
mov	[eax+16B4h], ecx
mov	[eax+16B0h], si
movzx	edx, word ptr [ebx+402h]
pop	esi
pop	ebp
mov	[eax+16ACh], edx
pop	ebx
add	esp, 0Ch
retn

loc_76C3D9:
mov	dx, [ebx+400h]
shl	dx, cl
or	[eax+16B0h], dx
add	ecx, edi
pop	edi
mov	[eax+16B4h], ecx
movzx	ecx, word ptr [ebx+402h]
pop	esi
pop	ebp
mov	[eax+16ACh], ecx
pop	ebx
add	esp, 0Ch
retn
sub_76C010 endp

align 10h



sub_76C410 proc	near

var_4= dword ptr -4

push	ecx
movzx	edx, word ptr [eax+0A0h]
movzx	ecx, word ptr [eax+0A4h]
add	ecx, edx
movzx	edx, word ptr [eax+9Ch]
add	ecx, edx
movzx	edx, word ptr [eax+98h]
add	ecx, edx
movzx	edx, word ptr [eax+94h]
add	ecx, edx
movzx	edx, word ptr [eax+90h]
push	ebx
add	ecx, edx
movzx	edx, word ptr [eax+8Ch]
push	ebp
push	esi
push	edi
xor	edi, edi
add	ecx, edx
xor	ebx, ebx
lea	edx, [eax+0ACh]
lea	esi, [edi+3Ch]
nop

loc_76C460:
movzx	ebp, word ptr [edx-4]
add	edi, ebp
movzx	ebp, word ptr [edx]
add	ebx, ebp
add	edx, 8
sub	esi, 1
jnz	short loc_76C460
movzx	esi, word ptr [eax+288h]
add	ebx, edi
add	esi, ebx
xor	edi, edi
xor	ebx, ebx
lea	edx, [eax+290h]
mov	[esp+14h+var_4], 40h

loc_76C490:
movzx	ebp, word ptr [edx-4]
add	edi, ebp
movzx	ebp, word ptr [edx]
add	ebx, ebp
add	edx, 8
sub	[esp+14h+var_4], 1
jnz	short loc_76C490
mov	edx, [eax]
add	ebx, edi
add	ecx, ebx
shr	esi, 2
cmp	esi, ecx
pop	edi
pop	esi
sbb	ecx, ecx
inc	ecx
pop	ebp
mov	[edx+2Ch], ecx
pop	ebx
pop	ecx
retn
sub_76C410 endp

align 10h



sub_76C4C0 proc	near
mov	ecx, [eax+16B4h]
push	ebx
cmp	ecx, 10h
jnz	short loc_76C503
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	ecx, [eax+8]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
xor	ecx, ecx
mov	[eax+16B0h], cx
mov	[eax+16B4h], ecx
pop	ebx
retn

loc_76C503:
cmp	ecx, 8
jl	short loc_76C530
mov	edx, [eax+8]
mov	ecx, [eax+14h]
mov	bl, [eax+16B0h]
mov	[edx+ecx], bl
movzx	dx, byte ptr [eax+16B1h]
inc	dword ptr [eax+14h]
add	dword ptr [eax+16B4h], 0FFFFFFF8h
mov	[eax+16B0h], dx

loc_76C530:
pop	ebx
retn
sub_76C4C0 endp

align 10h



sub_76C540 proc	near
mov	ecx, [eax+16B4h]
cmp	ecx, 8
push	ebx
jle	short loc_76C56E
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	ecx, [eax+8]
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
movzx	ebx, byte ptr [eax+16B1h]
jmp	short loc_76C57E

loc_76C56E:
test	ecx, ecx
jle	short loc_76C584
mov	ecx, [eax+8]
mov	edx, [eax+14h]
mov	bl, [eax+16B0h]

loc_76C57E:
mov	[ecx+edx], bl
inc	dword ptr [eax+14h]

loc_76C584:
xor	ecx, ecx
mov	[eax+16B0h], cx
mov	[eax+16B4h], ecx
pop	ebx
retn
sub_76C540 endp

align 10h



sub_76C5A0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	ebx, ecx
mov	esi, edx
call	sub_76C540
cmp	[esp+0Ch+arg_0], 0
mov	dword ptr [eax+16ACh], 8
mov	edi, 1
jz	short loc_76C604
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], edi
mov	edx, [eax+8]
push	ebp
mov	ebp, [eax+14h]
mov	ecx, ebx
shr	ecx, 8
mov	[edx+ebp], cl
add	[eax+14h], edi
mov	ebp, [eax+14h]
mov	edx, [eax+8]
mov	cl, bl
not	cl
mov	[edx+ebp], cl
add	[eax+14h], edi
mov	ebp, [eax+14h]
mov	edx, [eax+8]
mov	ecx, ebx
not	ecx
shr	ecx, 8
mov	[edx+ebp], cl
add	[eax+14h], edi
pop	ebp

loc_76C604:
test	ebx, ebx
jz	short loc_76C626

loc_76C608:
mov	ecx, [eax+14h]
mov	edx, [eax+8]
sub	ebx, edi
mov	[esp+0Ch+arg_0], ebx
mov	bl, [esi]
mov	[ecx+edx], bl
mov	ebx, [esp+0Ch+arg_0]
add	[eax+14h], edi
add	esi, edi
test	ebx, ebx
jnz	short loc_76C608

loc_76C626:
pop	edi
pop	esi
pop	ebx
retn
sub_76C5A0 endp

align 10h



sub_76C630 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
lea	eax, [edx+8Ch]
lea	ecx, [edx+980h]
mov	[edx+0B10h], eax
mov	[edx+0B1Ch], ecx
xor	ecx, ecx
lea	eax, [edx+0A74h]
mov	dword ptr [edx+0B18h], offset off_167E2B0
mov	dword ptr [edx+0B24h], offset off_167E2C4
mov	[edx+0B28h], eax
mov	dword ptr [edx+0B30h], offset unk_167E2D8
mov	[edx+16B0h], cx
mov	[edx+16B4h], ecx
mov	dword ptr [edx+16ACh], 8
jmp	sub_76B450
sub_76C630 endp

align 10h



sub_76C6A0 proc	near

var_20=	word ptr -20h
var_1E=	byte ptr -1Eh

sub	esp, 20h
push	esi
lea	esi, [esp+24h+var_1E]
xor	ecx, ecx
mov	eax, 1
sub	edx, esi

loc_76C6B1:
lea	esi, [edx+eax*2]
mov	si, [esp+esi+24h+var_20]
add	si, cx
add	si, si
movzx	ecx, si
mov	[esp+eax*2+24h+var_20],	cx
inc	eax
cmp	eax, 0Fh
jle	short loc_76C6B1
xor	esi, esi
test	ebx, ebx
jl	short loc_76C70C
push	ebp

loc_76C6D4:
movzx	edx, word ptr [edi+esi*4+2]
test	edx, edx
jz	short loc_76C706
movzx	eax, [esp+edx*2+28h+var_20]
movzx	ecx, ax
inc	eax
mov	[esp+edx*2+28h+var_20],	ax
xor	eax, eax
lea	ecx, [ecx+0]

loc_76C6F0:
mov	ebp, ecx
and	ebp, 1
or	eax, ebp
dec	edx
shr	ecx, 1
add	eax, eax
test	edx, edx
jg	short loc_76C6F0
shr	eax, 1
mov	[edi+esi*4], ax

loc_76C706:
inc	esi
cmp	esi, ebx
jle	short loc_76C6D4
pop	ebp

loc_76C70C:
pop	esi
add	esp, 20h
retn
sub_76C6A0 endp

align 10h



sub_76C720 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
push	ebx
push	ebp
push	edi
mov	edi, [eax]
mov	eax, [eax+8]
mov	ecx, [eax+0Ch]
mov	edx, [eax]
xor	ebx, ebx
or	ebp, 0FFFFFFFFh
xor	eax, eax
cmp	ecx, ebx
mov	[esp+14h+var_4], ecx
mov	[esp+14h+var_8], ebp
mov	[esi+1448h], ebx
mov	dword ptr [esi+144Ch], 23Dh
jle	short loc_76C78D

loc_76C757:
cmp	[edi+eax*4], bx
jz	short loc_76C77F
inc	dword ptr [esi+1448h]
mov	ecx, [esi+1448h]
mov	[esi+ecx*4+0B54h], eax
mov	[esp+14h+var_8], eax
mov	[eax+esi+1450h], bl
mov	ebp, eax
jmp	short loc_76C786

loc_76C77F:
xor	ecx, ecx
mov	[edi+eax*4+2], cx

loc_76C786:
inc	eax
cmp	eax, [esp+14h+var_4]
jl	short loc_76C757

loc_76C78D:
cmp	dword ptr [esi+1448h], 2
jge	short loc_76C7E7

loc_76C796:
cmp	ebp, 2
jge	short loc_76C7A0
inc	ebp
mov	eax, ebp
jmp	short loc_76C7A2

loc_76C7A0:
xor	eax, eax

loc_76C7A2:
inc	dword ptr [esi+1448h]
mov	ecx, [esi+1448h]
mov	[esi+ecx*4+0B54h], eax
mov	ecx, 1
mov	[edi+eax*4], cx
mov	[esi+eax+1450h], bl
dec	dword ptr [esi+16A0h]
cmp	edx, ebx
jz	short loc_76C7DA
movzx	eax, word ptr [edx+eax*4+2]
sub	[esi+16A4h], eax

loc_76C7DA:
cmp	dword ptr [esi+1448h], 2
jl	short loc_76C796
mov	[esp+14h+var_8], ebp

loc_76C7E7:
mov	ecx, [esp+14h+arg_0]
mov	[ecx+4], ebp
mov	eax, [esi+1448h]
cdq
sub	eax, edx
mov	ebp, eax
sar	ebp, 1
cmp	ebp, 1
jl	short loc_76C811

loc_76C800:
push	ebp
mov	eax, esi
call	sub_76B4D0
dec	ebp
add	esp, 4
cmp	ebp, 1
jge	short loc_76C800

loc_76C811:
mov	ebx, [esp+14h+var_4]
jmp	short loc_76C820
align 10h

loc_76C820:
mov	eax, [esi+1448h]
mov	edx, [esi+eax*4+0B54h]
mov	ebp, [esi+0B58h]
dec	eax
mov	[esi+1448h], eax
push	1
mov	eax, esi
mov	[esi+0B58h], edx
call	sub_76B4D0
mov	eax, [esi+0B58h]
or	edx, 0FFFFFFFFh
add	[esi+144Ch], edx
mov	ecx, [esi+144Ch]
mov	[esi+ecx*4+0B54h], ebp
add	[esi+144Ch], edx
mov	ecx, [esi+144Ch]
mov	[esi+ecx*4+0B54h], eax
mov	cx, [edi+eax*4]
add	cx, [edi+ebp*4]
add	esp, 4
mov	[edi+ebx*4], cx
mov	cl, [esi+eax+1450h]
mov	dl, [esi+ebp+1450h]
cmp	dl, cl
jb	short loc_76C89E
movzx	ecx, dl
jmp	short loc_76C8A1

loc_76C89E:
movzx	ecx, cl

loc_76C8A1:
inc	cl
mov	[esi+ebx+1450h], cl
movzx	ecx, bx
mov	[edi+eax*4+2], cx
mov	[edi+ebp*4+2], cx
mov	[esi+0B58h], ebx
push	1
mov	eax, esi
inc	ebx
call	sub_76B4D0
add	esp, 4
cmp	dword ptr [esi+1448h], 2
jge	loc_76C820
dec	dword ptr [esi+144Ch]
mov	eax, [esi+144Ch]
mov	edx, [esi+0B58h]
mov	ecx, [esp+14h+arg_0]
mov	[esi+eax*4+0B54h], edx
mov	eax, esi
call	sub_76B5A0
mov	ebx, [esp+14h+var_8]
lea	edx, [esi+0B34h]
call	sub_76C6A0
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_76C720 endp

align 10h



sub_76C920 proc	near
push	esi
mov	esi, eax
mov	ecx, [esi+0B14h]
lea	eax, [esi+8Ch]
push	esi
call	sub_76B7C0
mov	ecx, [esi+0B20h]
lea	eax, [esi+980h]
push	esi
call	sub_76B7C0
lea	eax, [esi+0B28h]
push	eax
call	sub_76C720
add	esp, 0Ch
mov	eax, 12h
jmp	short loc_76C960
align 10h

loc_76C960:
movzx	ecx, ds:byte_1444634[eax]
cmp	word ptr [esi+ecx*4+0A76h], 0
jnz	short loc_76C9DB
movzx	edx, ds:byte_1444633[eax]
cmp	word ptr [esi+edx*4+0A76h], 0
jnz	short loc_76C9BC
movzx	ecx, ds:byte_1444632[eax]
cmp	word ptr [esi+ecx*4+0A76h], 0
jnz	short loc_76C9C9
movzx	edx, ds:byte_1444631[eax]
cmp	word ptr [esi+edx*4+0A76h], 0
jnz	short loc_76C9D8
sub	eax, 4
cmp	eax, 3
jge	short loc_76C960
lea	ecx, [eax+eax*2+11h]
add	[esi+16A0h], ecx
pop	esi
retn

loc_76C9BC:
dec	eax
lea	ecx, [eax+eax*2+11h]
add	[esi+16A0h], ecx
pop	esi
retn

loc_76C9C9:
sub	eax, 2
lea	ecx, [eax+eax*2+11h]
add	[esi+16A0h], ecx
pop	esi
retn

loc_76C9D8:
sub	eax, 3

loc_76C9DB:
lea	ecx, [eax+eax*2+11h]
add	[esi+16A0h], ecx
pop	esi
retn
sub_76C920 endp

align 10h



sub_76C9F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	ecx, [eax+16B4h]
cmp	ecx, 0Dh
jle	short loc_76CA66
push	ebx
push	esi
mov	esi, [esp+8+arg_C]
mov	edx, esi
shl	edx, cl
mov	ecx, [eax+8]
or	[eax+16B0h], dx
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	[ecx+edx], bl
movzx	ebx, byte ptr [eax+16B1h]
inc	dword ptr [eax+14h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
inc	dword ptr [eax+14h]
mov	cl, 10h
sub	cl, dl
shr	si, cl
mov	ecx, [esp+8+arg_8]
add	edx, 0FFFFFFF3h
mov	[eax+16B4h], edx
mov	edx, [esp+8+arg_4]
mov	[eax+16B0h], si
pop	esi
pop	ebx
push	1
call	sub_76C5A0
pop	ecx
retn

loc_76CA66:
mov	edx, [esp+arg_C]
shl	edx, cl
add	ecx, 3
mov	[eax+16B4h], ecx
mov	ecx, [esp+arg_8]
or	[eax+16B0h], dx
mov	edx, [esp+arg_4]
push	1
call	sub_76C5A0
pop	ecx
retn
sub_76C9F0 endp

align 10h



sub_76CA90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+16B4h]
mov	edx, 2
shl	edx, cl
push	ebx
push	esi
push	edi
or	[eax+16B0h], dx
cmp	ecx, 0Dh
mov	esi, 1
jle	short loc_76CAFF
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	ecx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], esi
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], esi
mov	cl, 10h
sub	cl, dl
mov	edi, 2
shr	di, cl
add	edx, 0FFFFFFF3h
mov	[eax+16B4h], edx
mov	[eax+16B0h], di
jmp	short loc_76CB08

loc_76CAFF:
add	ecx, 3
mov	[eax+16B4h], ecx

loc_76CB08:
mov	ecx, [eax+16B4h]
xor	edx, edx
shl	edx, cl
or	[eax+16B0h], dx
cmp	ecx, 9
jle	short loc_76CB65
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	ecx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], esi
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], esi
mov	cl, 10h
sub	cl, dl
xor	edi, edi
shr	di, cl
add	edx, 0FFFFFFF7h
mov	[eax+16B4h], edx
mov	[eax+16B0h], di
jmp	short loc_76CB6E

loc_76CB65:
add	ecx, 7
mov	[eax+16B4h], ecx

loc_76CB6E:
call	sub_76C4C0
mov	ecx, [eax+16B4h]
mov	edx, [eax+16ACh]
sub	edx, ecx
add	edx, 0Bh
cmp	edx, 9
jge	loc_76CC6F
mov	edx, 2
shl	edx, cl
or	[eax+16B0h], dx
cmp	ecx, 0Dh
jle	short loc_76CBEA
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	ecx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], esi
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], esi
mov	cl, 10h
sub	cl, dl
mov	edi, 2
shr	di, cl
add	edx, 0FFFFFFF3h
mov	[eax+16B4h], edx
mov	[eax+16B0h], di
jmp	short loc_76CBF3

loc_76CBEA:
add	ecx, 3
mov	[eax+16B4h], ecx

loc_76CBF3:
mov	ecx, [eax+16B4h]
xor	edx, edx
shl	edx, cl
or	[eax+16B0h], dx
cmp	ecx, 9
jle	short loc_76CC61
movzx	ebx, byte ptr [eax+16B0h]
mov	edx, [eax+14h]
mov	ecx, [eax+8]
mov	[ecx+edx], bl
add	[eax+14h], esi
movzx	ebx, byte ptr [eax+16B1h]
mov	ecx, [eax+14h]
mov	edx, [eax+8]
mov	[ecx+edx], bl
mov	edx, [eax+16B4h]
add	[eax+14h], esi
mov	cl, 10h
sub	cl, dl
xor	esi, esi
shr	si, cl
add	edx, 0FFFFFFF7h
mov	[eax+16B4h], edx
mov	[eax+16B0h], si
call	sub_76C4C0
pop	edi
pop	esi
mov	dword ptr [eax+16ACh], 7
pop	ebx
retn

loc_76CC61:
add	ecx, 7
mov	[eax+16B4h], ecx
call	sub_76C4C0

loc_76CC6F:
pop	edi
pop	esi
mov	dword ptr [eax+16ACh], 7
pop	ebx
retn
sub_76CA90 endp

align 10h



sub_76CC80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebx
mov	ebx, [esp+8+arg_8]
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+7Ch], 0
push	edi
mov	[esp+10h+var_4], 0
jle	short loc_76CCED
mov	eax, [esi]
cmp	dword ptr [eax+2Ch], 2
jnz	short loc_76CCA9
mov	eax, esi
call	sub_76C410

loc_76CCA9:
lea	ecx, [esi+0B10h]
push	ecx
call	sub_76C720
lea	edx, [esi+0B1Ch]
push	edx
call	sub_76C720
add	esp, 8
mov	eax, esi
call	sub_76C920
mov	edx, [esi+16A0h]
mov	ecx, [esi+16A4h]
add	edx, 0Ah
add	ecx, 0Ah
shr	edx, 3
shr	ecx, 3
mov	[esp+10h+var_4], eax
cmp	ecx, edx
ja	short loc_76CCF2
jmp	short loc_76CCF0

loc_76CCED:
lea	ecx, [ebx+5]

loc_76CCF0:
mov	edx, ecx

loc_76CCF2:
lea	eax, [ebx+4]
cmp	eax, edx
ja	short loc_76CD16
mov	eax, [esp+10h+arg_4]
test	eax, eax
jz	short loc_76CD16
mov	edi, [esp+10h+arg_C]
push	edi
push	ebx
push	eax
push	esi
call	sub_76C9F0
add	esp, 10h
jmp	loc_76CE4A

loc_76CD16:
mov	edi, [esp+10h+arg_C]
cmp	ecx, edx
mov	ecx, [esi+16B4h]
jnz	loc_76CDAB
cmp	ecx, 0Dh
lea	eax, [edi+2]
jle	short loc_76CD80
mov	edx, eax
shl	edx, cl
mov	ecx, [esi+14h]
or	[esi+16B0h], dx
movzx	ebx, byte ptr [esi+16B0h]
mov	edx, [esi+8]
mov	[ecx+edx], bl
inc	dword ptr [esi+14h]
movzx	ebx, byte ptr [esi+16B1h]
mov	ecx, [esi+14h]
mov	edx, [esi+8]
mov	[ecx+edx], bl
mov	edx, [esi+16B4h]
inc	dword ptr [esi+14h]
mov	cl, 10h
sub	cl, dl
shr	ax, cl
add	edx, 0FFFFFFF3h
mov	[esi+16B4h], edx
mov	[esi+16B0h], ax
jmp	short loc_76CD92

loc_76CD80:
shl	eax, cl
or	[esi+16B0h], ax
add	ecx, 3
mov	[esi+16B4h], ecx

loc_76CD92:
push	offset unk_1444B90
push	offset unk_1444710
mov	eax, esi
call	sub_76C010
add	esp, 8
jmp	loc_76CE4A

loc_76CDAB:
cmp	ecx, 0Dh
lea	edx, [edi+4]
jle	short loc_76CE03
mov	eax, edx
shl	eax, cl
mov	ecx, [esi+14h]
or	[esi+16B0h], ax
movzx	ebx, byte ptr [esi+16B0h]
mov	eax, [esi+8]
mov	[ecx+eax], bl
inc	dword ptr [esi+14h]
movzx	ebx, byte ptr [esi+16B1h]
mov	ecx, [esi+14h]
mov	eax, [esi+8]
mov	[ecx+eax], bl
mov	ebx, [esi+16B4h]
inc	dword ptr [esi+14h]
mov	cl, 10h
sub	cl, bl
shr	dx, cl
add	ebx, 0FFFFFFF3h
mov	[esi+16B4h], ebx
mov	[esi+16B0h], dx
jmp	short loc_76CE15

loc_76CE03:
shl	edx, cl
or	[esi+16B0h], dx
add	ecx, 3
mov	[esi+16B4h], ecx

loc_76CE15:
mov	eax, [esp+10h+var_4]
mov	ecx, [esi+0B20h]
mov	edx, [esi+0B14h]
inc	eax
push	eax
inc	ecx
push	ecx
inc	edx
push	edx
mov	eax, esi
call	sub_76BDB0
lea	eax, [esi+980h]
push	eax
lea	ecx, [esi+8Ch]
push	ecx
mov	eax, esi
call	sub_76C010
add	esp, 14h

loc_76CE4A:
mov	edx, esi
call	sub_76B450
test	edi, edi
pop	edi
jz	short loc_76CE62
mov	eax, esi
pop	esi
pop	ebx
add	esp, 4
jmp	sub_76C540

loc_76CE62:
pop	esi
pop	ebx
pop	ecx
retn
sub_76CC80 endp

align 10h


; Attributes: bp-based frame

sub_76CE70 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
push	eax
push	offset aResultU_rowcou ; "Result[%u].RowCount"
push	0FFFFFFFFh	; MaxCount
push	400h		; SizeInWords
push	offset word_1856640 ; DstBuf
call	__snwprintf_s
add	esp, 14h
mov	eax, offset word_1856640
pop	ebp
retn
sub_76CE70 endp

align 10h


; Attributes: bp-based frame

sub_76CEA0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
cmp	[ebp+arg_8], 0
jz	short loc_76CED0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	offset aResultU_rowU_S ; "Result[%u].Row[%u].%s"
push	0FFFFFFFFh	; MaxCount
push	400h		; SizeInWords
push	offset word_1856E40 ; DstBuf
call	__snwprintf_s
add	esp, 1Ch
jmp	short loc_76CEF1

loc_76CED0:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
push	offset aResultU_rowU ; "Result[%u].Row[%u]"
push	0FFFFFFFFh	; MaxCount
push	400h		; SizeInWords
push	offset word_1856E40 ; DstBuf
call	__snwprintf_s
add	esp, 18h

loc_76CEF1:
mov	eax, offset word_1856E40
pop	ebp
retn
sub_76CEA0 endp

align 10h
push	ebp
mov	ebp, esp
mov	eax, offset aResult_count ; "Result.Count"
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+8]
mov	[ebp-10h], eax
mov	ecx, [ebp-10h]
add	ecx, 2
mov	[ebp-14h], ecx

loc_76CF25:
mov	edx, [ebp-10h]
mov	ax, [edx]
mov	[ebp-16h], ax
add	dword ptr [ebp-10h], 2
cmp	word ptr [ebp-16h], 0
jnz	short loc_76CF25
mov	ecx, [ebp-10h]
sub	ecx, [ebp-14h]
sar	ecx, 1
mov	[ebp-1Ch], ecx
mov	edx, [ebp-1Ch]
mov	[ebp-4], edx
mov	eax, [ebp-4]
sub	eax, 1
mov	[ebp-0Ch], eax
mov	byte ptr [ebp-5], 0
push	offset szReferrer
push	400h
push	offset unk_1857640
call	_wcscpy_s
add	esp, 0Ch

loc_76CF6F:
movzx	ecx, byte ptr [ebp-5]
test	ecx, ecx
jnz	short loc_76CF9B
cmp	dword ptr [ebp-0Ch], 0
jl	short loc_76CF9B
mov	edx, [ebp-0Ch]
mov	eax, [ebp+8]
movzx	ecx, word ptr [eax+edx*2]
cmp	ecx, 2Eh
jnz	short loc_76CF90
mov	byte ptr [ebp-5], 1

loc_76CF90:
mov	edx, [ebp-0Ch]
sub	edx, 1
mov	[ebp-0Ch], edx
jmp	short loc_76CF6F

loc_76CF9B:
mov	eax, [ebp-0Ch]
mov	ecx, [ebp+8]
lea	edx, [ecx+eax*2+4]
push	edx
push	400h
push	offset unk_1857640
call	_wcscat_s
add	esp, 0Ch
mov	eax, offset unk_1857640
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_76CFD0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_110D9C0
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_1547750
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+25h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_14450C8
mov	eax, [ebp+var_4]
mov	dword ptr [eax+28h], 3
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_76CFD0 endp

align 10h


; Attributes: bp-based frame

sub_76D010 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_14450C8
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_1547750
mov	ecx, [ebp+var_4]
call	sub_110DE00
mov	esp, ebp
pop	ebp
retn
sub_76D010 endp

align 10h


; Attributes: bp-based frame

sub_76D040 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	al, 1
mov	esp, ebp
pop	ebp
retn	4
sub_76D040 endp

align 10h
; [0000000B BYTES: COLLAPSED FUNCTION std::_Init_locks::~_Init_locks(void). PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [0000000B BYTES: COLLAPSED FUNCTION std::_Init_locks::~_Init_locks(void). PRESS KEYPAD "+" TO	EXPAND]
align 10h


; Attributes: bp-based frame

sub_76D070 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	esp, ebp
pop	ebp
retn	8
sub_76D070 endp

align 10h
; [0000000B BYTES: COLLAPSED FUNCTION std::_Init_locks::~_Init_locks(void). PRESS KEYPAD "+" TO	EXPAND]
align 10h
push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset sub_12C89BB
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
mov	[ebp-20h], ecx
mov	ecx, [ebp-20h]
call	??0strstreambuf@@QAE@H@Z ; strstreambuf::strstreambuf(int)
mov	dword ptr [ebp-4], 0
mov	eax, [ebp-20h]
mov	dword ptr [eax], offset	off_1445100
lea	ecx, [ebp-0Dh]
mov	[ebp-24h], ecx
mov	byte ptr [ebp-4], 1
mov	edx, [ebp-24h]
push	edx
mov	ecx, [ebp-20h]
add	ecx, 58h
call	sub_4022A0
mov	byte ptr [ebp-4], 3
mov	ecx, [ebp-20h]
add	ecx, 70h
call	sub_10FB830
mov	eax, [ebp-20h]
mov	dword ptr [eax+8Ch], 0FFFFFFFFh
mov	ecx, [ebp-20h]
mov	dword ptr [ecx+90h], 0
xor	edx, edx
mov	eax, [ebp-20h]
mov	[eax+94h], dx
mov	dword ptr [ebp-4], 0FFFFFFFFh
mov	eax, [ebp-20h]
mov	ecx, [ebp-0Ch]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_76D130 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_76D130
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
mov	dword ptr [eax], offset	off_1445100
mov	[ebp+var_4], 2
push	0
push	64h
mov	ecx, [ebp+var_1C]
call	sub_A30400
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_1C]
add	ecx, 70h
call	sub_10FB7C0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_1C]
add	ecx, 58h
mov	[ebp+var_18], ecx
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_18]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_1C]
call	sub_A31230
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_76D130 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp-10h], ecx
mov	byte ptr [ebp-1], 0
cmp	dword ptr [ebp+8], 0
jz	loc_76D292
mov	eax, [ebp-10h]
mov	ecx, [eax+90h]
mov	[ebp-8], ecx
cmp	dword ptr [ebp-8], 0
jnz	loc_76D292
mov	edx, [ebp+8]
mov	[ebp-14h], edx
mov	eax, [ebp-14h]
add	eax, 1
mov	[ebp-18h], eax

loc_76D1FC:
mov	ecx, [ebp-14h]
mov	dl, [ecx]
mov	[ebp-19h], dl
add	dword ptr [ebp-14h], 1
cmp	byte ptr [ebp-19h], 0
jnz	short loc_76D1FC
mov	eax, [ebp-14h]
sub	eax, [ebp-18h]
mov	[ebp-20h], eax
mov	ecx, [ebp+8]
add	ecx, [ebp-20h]
push	ecx
mov	edx, [ebp+8]
push	edx
mov	ecx, [ebp-10h]
add	ecx, 58h
call	sub_403980
mov	eax, [ebp-10h]
mov	cx, [ebp+0Ch]
mov	[eax+94h], cx
push	0
push	1
mov	ecx, [ebp-10h]
call	sub_A30800
mov	[ebp-1], al
movzx	edx, byte ptr [ebp-1]
test	edx, edx
jz	short loc_76D292
mov	eax, [ebp-10h]
mov	ecx, [eax+6Ch]
mov	[ebp-0Ch], ecx
mov	edx, [ebp-10h]
movzx	eax, word ptr [edx+94h]
push	eax
mov	ecx, [ebp-0Ch]
push	ecx
mov	edx, [ebp-10h]
mov	eax, [edx]
mov	ecx, [ebp-10h]
mov	edx, [eax+4]
call	edx
mov	[ebp-1], al
mov	eax, [ebp-10h]
mov	dword ptr [eax+90h], 1
mov	ecx, [ebp-10h]
call	sub_76D2A0
mov	[ebp-1], al

loc_76D292:
mov	al, [ebp-1]
mov	esp, ebp
pop	ebp
retn	8
align 10h


; Attributes: bp-based frame

sub_76D2A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx

loc_76D2A9:
mov	eax, [ebp+var_10]
mov	ecx, [eax+90h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 1
jnz	short loc_76D2D4
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax+1Ch]
call	edx
push	0Ah		; dwMilliseconds
call	sub_A49F50
add	esp, 4
jmp	short loc_76D2A9

loc_76D2D4:
mov	eax, [ebp+var_10]
mov	ecx, [eax+90h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 2
jnz	short loc_76D2F3
mov	edx, [ebp+var_10]
mov	dword ptr [edx+90h], 3

loc_76D2F3:
mov	eax, [ebp+var_10]
mov	ecx, [eax+90h]
mov	[ebp+var_C], ecx
xor	eax, eax
cmp	[ebp+var_C], 3
setz	al
mov	esp, ebp
pop	ebp
retn
sub_76D2A0 endp

align 10h
push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset sub_12C8A00
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
mov	[ebp-6Ch], ecx
mov	eax, [ebp-6Ch]
mov	ecx, [eax+8Ch]
mov	[ebp-58h], ecx
xor	edx, edx
cmp	dword ptr [ebp-58h], 0FFFFFFFFh
setnz	dl
movzx	eax, dl
test	eax, eax
jnz	short loc_76D3A0
mov	ecx, [ebp-6Ch]
mov	edx, [ecx+6Ch]
mov	[ebp-5Ch], edx
mov	eax, [ebp-6Ch]
movzx	ecx, word ptr [eax+94h]
push	ecx
mov	edx, [ebp-5Ch]
push	edx
mov	eax, [ebp-6Ch]
mov	edx, [eax]
mov	ecx, [ebp-6Ch]
mov	eax, [edx+4]
call	eax
mov	ecx, [ebp-6Ch]
mov	dword ptr [ecx+90h], 1
mov	ecx, [ebp-6Ch]
call	sub_76D2A0
mov	edx, [ebp-6Ch]
mov	eax, [edx+90h]
mov	[ebp-60h], eax
cmp	dword ptr [ebp-60h], 3
jz	short loc_76D3A0
mov	eax, 2
jmp	loc_76D522

loc_76D3A0:
mov	ecx, [ebp+0Ch]
mov	edx, [ebp+0Ch]
mov	eax, [ecx+4]
sub	eax, [edx]
cdq
mov	ecx, 38h
idiv	ecx
mov	[ebp-18h], eax
mov	dword ptr [ebp-14h], 0
mov	dword ptr [ebp-20h], 0
cmp	dword ptr [ebp-18h], 0
jbe	short loc_76D40A
lea	ecx, [ebp-40h]
call	sub_10FB830
mov	dword ptr [ebp-4], 0
lea	edx, [ebp-40h]
push	edx
mov	eax, [ebp+0Ch]
push	eax
mov	ecx, [ebp-6Ch]
call	sub_76DB70
push	0
lea	ecx, [ebp-14h]
push	ecx
lea	edx, [ebp-20h]
push	edx
lea	ecx, [ebp-40h]
call	sub_10EF330
mov	dword ptr [ebp-4], 0FFFFFFFFh
lea	ecx, [ebp-40h]
call	sub_10FB7C0

loc_76D40A:
mov	eax, [ebp-14h]
add	eax, 8Fh
mov	[ebp-1Ch], eax
mov	ecx, [ebp-1Ch]
push	ecx
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp-48h], eax
mov	edx, [ebp-48h]
mov	[ebp-24h], edx
mov	eax, [ebp-24h]
mov	[ebp-50h], eax
cmp	dword ptr [ebp-50h], 0
jz	short loc_76D45A
mov	ecx, 0Eh
mov	edx, [ebp-50h]
mov	[edx], cx
mov	eax, [ebp-50h]
mov	byte ptr [eax+6], 0
mov	ecx, [ebp-50h]
mov	dword ptr [ecx+2], 0
mov	edx, [ebp-50h]
mov	[ebp-70h], edx
jmp	short loc_76D461

loc_76D45A:
mov	dword ptr [ebp-70h], 0

loc_76D461:
mov	eax, [ebp-70h]
mov	[ebp-4Ch], eax
mov	ecx, [ebp-4Ch]
mov	[ebp-10h], ecx
mov	edx, [ebp-10h]
mov	eax, [ebp+14h]
mov	[edx+7], eax
mov	ecx, [ebp-10h]
mov	edx, [ebp-14h]
mov	[ecx+0Bh], edx
mov	eax, [ebp+8]
push	eax
push	40h
mov	ecx, [ebp-10h]
add	ecx, 0Fh
push	ecx
call	_swprintf_s
add	esp, 0Ch
cmp	dword ptr [ebp-14h], 0
jbe	short loc_76D4BA
mov	edx, [ebp-10h]
add	edx, 8Fh
mov	[ebp-44h], edx
mov	eax, [ebp-14h]
push	eax
mov	ecx, [ebp-20h]
push	ecx
mov	edx, [ebp-44h]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_76D4BA:
mov	eax, [ebp-1Ch]
push	eax
mov	ecx, [ebp-10h]
push	ecx
mov	ecx, [ebp-6Ch]
call	sub_76D880
mov	edx, [ebp-24h]
mov	[ebp-54h], edx
mov	eax, [ebp-54h]
push	eax
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	ecx, [ebp-6Ch]
call	sub_76D540
mov	ecx, [ebp-6Ch]
mov	edx, [ecx+90h]
mov	[ebp-64h], edx
cmp	dword ptr [ebp-64h], 4
jnz	short loc_76D51D
mov	eax, [ebp-6Ch]
add	eax, 70h
mov	[ebp-68h], eax
mov	ecx, [ebp-68h]
push	ecx
mov	ecx, [ebp+10h]
call	sub_46B470
mov	edx, [ebp+10h]
mov	eax, [ebp-68h]
mov	cl, [eax+18h]
mov	[edx+18h], cl
xor	eax, eax
jmp	short loc_76D522
jmp	short loc_76D522

loc_76D51D:
mov	eax, 2

loc_76D522:
mov	ecx, [ebp-0Ch]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
align 10h


; Attributes: bp-based frame

sub_76D540 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	[ebp+var_4], 2710h
call	sub_A49F30
add	eax, 2710h
mov	[ebp+var_8], eax

loc_76D55D:
mov	eax, 1
test	eax, eax
jz	short loc_76D5B9
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8Ch]
mov	[ebp+var_C], edx
xor	eax, eax
cmp	[ebp+var_C], 0FFFFFFFFh
setnz	al
movzx	ecx, al
test	ecx, ecx
jnz	short loc_76D586
xor	al, al
jmp	short loc_76D5BB

loc_76D586:
mov	edx, [ebp+var_10]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, al
cmp	eax, 1
jnz	short loc_76D59F
mov	al, 1
jmp	short loc_76D5BB

loc_76D59F:
call	sub_A49F30
cmp	eax, [ebp+var_8]
jbe	short loc_76D5AD
xor	al, al
jmp	short loc_76D5BB

loc_76D5AD:		; dwMilliseconds
push	0
call	sub_A49F50
add	esp, 4
jmp	short loc_76D55D

loc_76D5B9:
xor	al, al

loc_76D5BB:
mov	esp, ebp
pop	ebp
retn
sub_76D540 endp

align 10h
; [0000000D BYTES: COLLAPSED FUNCTION unknown_libname_17. PRESS	KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_76D5D0 proc	near

var_40=	dword ptr -40h
var_3C=	word ptr -3Ch
var_3A=	dword ptr -3Ah
var_36=	byte ptr -36h
var_35=	dword ptr -35h
var_31=	dword ptr -31h
var_2D=	dword ptr -2Dh
var_25=	word ptr -25h
Dst= byte ptr -23h
arg_0= dword ptr  8
arg_4= word ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	[ebp+var_40], ecx
mov	eax, [ebp+var_40]
mov	ecx, [ebp+arg_8]
mov	[eax+8Ch], ecx
xor	edx, edx
mov	[ebp+var_3C], dx
mov	[ebp+var_36], 0
mov	[ebp+var_3A], 0
mov	ecx, [ebp+var_40]
call	sub_76D870
mov	[ebp+var_35], eax
mov	[ebp+var_31], 0
mov	[ebp+var_2D], 0
mov	ecx, [ebp+var_40]
call	sub_A30260
mov	[ebp+var_25], ax
push	offset byte_146D660 ; Src
push	21h		; SizeInBytes
lea	eax, [ebp+Dst]
push	eax		; Dst
call	_strcpy_s
add	esp, 0Ch
push	0
movzx	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	0
push	3
push	1
push	3Ah
lea	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_40]
call	sub_A30330
mov	esp, ebp
pop	ebp
retn	0Ch
sub_76D5D0 endp

align 10h


; Attributes: bp-based frame

sub_76D660 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_76D697
mov	eax, [ebp+var_8]
mov	dword ptr [eax+8Ch], 0FFFFFFFFh
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+90h], 5

loc_76D697:
mov	esp, ebp
pop	ebp
retn	10h
sub_76D660 endp

align 10h


; Attributes: bp-based frame

sub_76D6A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+90h], 3
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+8Ch], edx
mov	esp, ebp
pop	ebp
retn	4
sub_76D6A0 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp-4], ecx
mov	eax, [ebp+8]
mov	[ebp-8], eax
cmp	dword ptr [ebp-8], 9 ; switch 10 cases
ja	short loc_76D723 ; default
			; jumptable 0076D6EF case 2
mov	ecx, [ebp-8]
movzx	edx, ds:byte_76D748[ecx]
jmp	ds:off_76D738[edx*4] ; switch jump
jmp	short loc_76D723 ; default
			; jumptable 0076D6EF case 2

loc_76D6F8:		; jumptable 0076D6EF cases 0,3,5-7
push	offset aConnectionToDa
mov	ecx, [ebp-4]
call	unknown_libname_17 ; Microsoft VisualC 2-9/net runtime
jmp	short loc_76D723 ; default
			; jumptable 0076D6EF case 2

loc_76D707:		; jumptable 0076D6EF cases 4,8,9
push	offset aConnectionTo_0
mov	ecx, [ebp-4]
call	unknown_libname_17 ; Microsoft VisualC 2-9/net runtime
jmp	short loc_76D723 ; default
			; jumptable 0076D6EF case 2

loc_76D716:		; jumptable 0076D6EF case 1
push	offset aConnectionTo_1
mov	ecx, [ebp-4]
call	unknown_libname_17 ; Microsoft VisualC 2-9/net runtime

loc_76D723:		; default
mov	eax, [ebp-4]	; jumptable 0076D6EF case 2
mov	dword ptr [eax+90h], 5
mov	esp, ebp
pop	ebp
retn	4
align 4
off_76D738 dd offset loc_76D6F8	; jump table for switch	statement
dd offset loc_76D716
dd offset loc_76D707
dd offset loc_76D723
byte_76D748 db	    0,	   1,	  3,	 0 ; indirect table for	switch statement
db	2,     0,     0,     0
db	2,     2
align 10h


; Attributes: bp-based frame

sub_76D760 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_76D760
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
mov	[ebp+var_10], 400h
mov	[ebp+var_11], 0
mov	ecx, [ebp+var_34]
call	?do_always_noconv@codecvt_base@std@@MBE_NXZ_1 ;	std::codecvt_base::do_always_noconv(void)
mov	ecx, [ebp+var_34]
call	sub_A30720
mov	[ebp+var_18], 0
jmp	short loc_76D7AB

loc_76D7A2:
mov	eax, [ebp+var_18]
add	eax, 1
mov	[ebp+var_18], eax

loc_76D7AB:
cmp	[ebp+var_18], 400h
jge	loc_76D852
lea	ecx, [ebp+var_24]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_A323D0
mov	[ebp+var_4], 0
lea	ecx, [ebp+var_24]
call	sub_A2FE60
test	eax, eax
jz	short loc_76D836
lea	ecx, [ebp+var_24]
call	sub_A2FF00
movzx	edx, al
test	edx, edx
jz	short loc_76D836
lea	ecx, [ebp+var_24]
call	sub_A2FE10
mov	[ebp+var_2C], eax
cmp	[ebp+var_2C], 7
jnb	short loc_76D808
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_24]
call	??1_Init_locks@std@@QAE@XZ_3 ; std::_Init_locks::~_Init_locks(void)
jmp	short loc_76D7A2

loc_76D808:
lea	ecx, [ebp+var_24]
call	sub_A2FE60
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_24]
call	unknown_libname_215 ; Microsoft	VisualC	2-9/net	runtime
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_34]
call	sub_76D8E0
mov	[ebp+var_11], 1

loc_76D836:
lea	ecx, [ebp+var_24]
call	sub_A2FF20
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_24]
call	??1_Init_locks@std@@QAE@XZ_3 ; std::_Init_locks::~_Init_locks(void)
jmp	loc_76D7A2

loc_76D852:
mov	al, [ebp+var_11]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_76D760 endp

align 10h


; Attributes: bp-based frame

sub_76D870 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, 29C0Eh
mov	esp, ebp
pop	ebp
retn
sub_76D870 endp



; Attributes: bp-based frame

sub_76D880 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	[ebp+var_1], 0
mov	eax, [ebp+var_10]
mov	ecx, [eax+8Ch]
mov	[ebp+var_8], ecx
xor	edx, edx
cmp	[ebp+var_8], 0FFFFFFFFh
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_76D8D4
mov	ecx, [ebp+var_10]
mov	edx, [ecx+8Ch]
mov	[ebp+var_C], edx
push	0
mov	eax, [ebp+var_C]
push	eax
push	0
push	3
push	1
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_10]
call	sub_A30C70
mov	[ebp+var_1], al

loc_76D8D4:
mov	al, [ebp+var_1]
mov	esp, ebp
pop	ebp
retn	8
sub_76D880 endp

align 10h


; Attributes: bp-based frame

sub_76D8E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax]
test	ecx, ecx
jnz	short loc_76D952
mov	edx, [ebp+arg_0]
mov	eax, [edx+2]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_76D910
cmp	[ebp+var_8], 1
jz	short loc_76D926
cmp	[ebp+var_8], 2
jz	short loc_76D93C
jmp	short loc_76D950

loc_76D910:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_76D9F0
jmp	short loc_76D950

loc_76D926:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_76DA60
jmp	short loc_76D950

loc_76D93C:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	sub_76DB60

loc_76D950:
jmp	short loc_76D982

loc_76D952:
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx]
cmp	edx, 5
jnz	short loc_76D982
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 32h
jz	short loc_76D96E
jmp	short loc_76D982

loc_76D96E:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_76D990

loc_76D982:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_76D8E0 endp

align 10h


; Attributes: bp-based frame

sub_76D990 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
cmp	[ebp+arg_4], 4
jnb	short loc_76D9A1
jmp	short loc_76D9E9

loc_76D9A1:
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+7]
add	edx, 0Ch
cmp	[ebp+arg_4], edx
jnb	short loc_76D9B7
jmp	short loc_76D9E9

loc_76D9B7:
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+0Bh]
test	ecx, ecx
jnz	short loc_76D9C4
jmp	short loc_76D9E9

loc_76D9C4:
mov	edx, [ebp+var_8]
add	edx, 0Ch
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 70h
call	sub_10FA580
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+90h], 4

loc_76D9E9:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_76D990 endp

align 10h


; Attributes: bp-based frame

sub_76D9F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
call	sub_76D870
mov	ecx, [ebp+var_4]
cmp	[ecx+7], eax
jz	short loc_76DA4A
push	0
push	1
mov	edx, dword ptr [ebp+arg_8]
push	edx
mov	ecx, [ebp+var_8]
call	sub_A32080
mov	ecx, [ebp+var_8]
call	sub_76D870
push	eax
mov	eax, [ebp+var_4]
mov	ecx, [eax+7]
push	ecx
mov	edx, dword ptr [ebp+arg_8]
push	edx		; char
push	offset aReceivedWrongG ; "Received Wrong Game Version Disconnect "...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 18h
jmp	short loc_76DA56

loc_76DA4A:
mov	eax, dword ptr [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_8]
call	sub_76D6A0

loc_76DA56:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_76D9F0 endp

align 10h


; Attributes: bp-based frame

sub_76DA60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8Ch]
mov	[ebp+var_8], edx
mov	eax, dword ptr [ebp+arg_8]
cmp	eax, [ebp+var_8]
jnz	loc_76DB25	; default
mov	ecx, [ebp+var_4]
mov	edx, [ecx+7]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 3	; switch 4 cases
ja	loc_76DB25	; default
mov	eax, [ebp+var_10]
jmp	ds:off_76DB48[eax*4] ; switch jump

loc_76DAA4:		; jumptable 0076DA9D case 0
mov	ecx, dword ptr [ebp+arg_8]
push	ecx		; char
push	offset aReceivedUnknow ; "Received Unknown Disconnect From DB Pro"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h
jmp	short loc_76DB25 ; default

loc_76DABF:		; jumptable 0076DA9D case 1
mov	ecx, [ebp+var_C]
call	sub_76D870
push	eax
mov	edx, [ebp+var_4]
mov	eax, [edx+0Bh]
push	eax
mov	ecx, dword ptr [ebp+arg_8]
push	ecx		; char
push	offset aReceivedWrongG ; "Received Wrong Game Version Disconnect "...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 18h
jmp	short loc_76DB25 ; default

loc_76DAEA:		; jumptable 0076DA9D case 2
mov	edx, [ebp+var_4]
mov	eax, [edx+0Bh]
push	eax
mov	ecx, dword ptr [ebp+arg_8]
push	ecx		; char
push	offset aReceivedWrongS ; "Received Wrong Server	Version	Disconnec"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 14h
jmp	short loc_76DB25 ; default

loc_76DB0C:		; jumptable 0076DA9D case 3
mov	edx, dword ptr [ebp+arg_8]
push	edx		; char
push	offset aReceivedUnknow ; "Received Unknown Disconnect From DB Pro"...
push	3		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h

loc_76DB25:		; default
mov	eax, [ebp+var_C]
mov	dword ptr [eax+90h], 0
push	0
push	1
mov	ecx, dword ptr [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_C]
call	sub_A32080
mov	esp, ebp
pop	ebp
retn	0Ch
sub_76DA60 endp

off_76DB48 dd offset loc_76DAA4	; jump table for switch	statement
dd offset loc_76DABF
dd offset loc_76DAEA
dd offset loc_76DB0C
align 10h


; Attributes: bp-based frame

sub_76DB60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_76DB60 endp

align 10h


; Attributes: bp-based frame

sub_76DB70 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
psa= dword ptr -1Ch
ppvData= dword ptr -18h
plLbound= dword	ptr -14h
plUbound= dword	ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
jmp	short loc_76DB8C

loc_76DB83:
mov	edx, [ebp+var_4]
add	edx, 38h
mov	[ebp+var_4], edx

loc_76DB8C:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_24]
jz	loc_76DE09
mov	eax, [ebp+var_4]
mov	ecx, [eax+24h]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_28]
mov	dword ptr [ebp+var_8], edx
mov	eax, dword ptr [ebp+var_8]
movzx	ecx, word ptr [eax]
cmp	ecx, 40h
jnz	short loc_76DBC4
mov	edx, dword ptr [ebp+var_8]
add	edx, 2
mov	dword ptr [ebp+var_8], edx

loc_76DBC4:
mov	eax, [ebp+var_4]
add	eax, 28h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
movzx	edx, word ptr [ecx]
mov	[ebp+var_34], edx
cmp	[ebp+var_34], 2011h
jg	short loc_76DC10
cmp	[ebp+var_34], 2011h
jz	loc_76DD78	; jumptable 0076DC09 case 64
mov	eax, [ebp+var_34]
sub	eax, 1
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 40h ; switch 65 cases
ja	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63
mov	ecx, [ebp+var_34]
movzx	edx, ds:byte_76DE50[ecx]
jmp	ds:off_76DE10[edx*4] ; switch jump

loc_76DC10:		; default
jmp	loc_76DE04	; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DC15:		; jumptable 0076DC09 case 0
mov	eax, dword ptr [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_10FB440
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DC26:		; jumptable 0076DC09 case 1
mov	ecx, [ebp+var_C]
movsx	edx, word ptr [ecx+8]
push	edx
mov	eax, dword ptr [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_10FB680
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DC3F:		; jumptable 0076DC09 case 2
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8]
push	edx
mov	eax, dword ptr [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_10FB600
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DC57:		; jumptable 0076DC09 case 3
mov	ecx, [ebp+var_C]
push	ecx		; float
fld	dword ptr [ecx+8]
fstp	[esp+38h+var_38]
mov	edx, dword ptr [ebp+var_8]
push	edx		; char
mov	ecx, [ebp+arg_4]
call	sub_10FB640
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DC72:		; jumptable 0076DC09 case 4
mov	eax, [ebp+var_C]
sub	esp, 8
fld	qword ptr [eax+8]
fstp	qword ptr [esp]
mov	ecx, dword ptr [ebp+var_8]
push	ecx		; char
mov	ecx, [ebp+arg_4]
call	sub_10FB580
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DC8F:		; jumptable 0076DC09 case 7
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, dword ptr [ebp+var_8]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_10FB780
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DCAD:		; jumptable 0076DC09 case 10
mov	eax, [ebp+var_C]
movsx	ecx, word ptr [eax+8]
push	ecx
mov	edx, dword ptr [ebp+var_8]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_10FB680
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DCC6:		; jumptable 0076DC09 cases 15,16
mov	eax, [ebp+var_C]
movzx	ecx, byte ptr [eax+8]
push	ecx
mov	edx, dword ptr [ebp+var_8]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_10FB680
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DCDF:		; jumptable 0076DC09 case 17
mov	eax, [ebp+var_C]
movzx	ecx, word ptr [eax+8]
push	ecx
mov	edx, dword ptr [ebp+var_8]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_10FB680
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DCF8:		; jumptable 0076DC09 case 18
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
push	ecx
mov	edx, dword ptr [ebp+var_8]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_10FB5C0
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DD10:		; jumptable 0076DC09 case 19
mov	eax, [ebp+var_C]
mov	ecx, [eax+0Ch]
push	ecx
mov	edx, [eax+8]
push	edx
mov	eax, dword ptr [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
call	sub_10FB500
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DD2C:		; jumptable 0076DC09 case 20
mov	ecx, [ebp+var_C]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ecx+8]
push	eax
mov	ecx, dword ptr [ebp+var_8]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_10FB4C0
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DD48:		; jumptable 0076DC09 case 21
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
push	eax
mov	ecx, dword ptr [ebp+var_8]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_10FB680
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DD60:		; jumptable 0076DC09 case 22
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
push	eax
mov	ecx, dword ptr [ebp+var_8]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_10FB540
jmp	loc_76DE04	; default
			; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DD78:		; jumptable 0076DC09 case 64
mov	[ebp+plLbound],	0
mov	[ebp+plUbound],	0
mov	[ebp+var_20], 0
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ebp+psa], eax
cmp	[ebp+psa], 0
jz	short loc_76DDC5
lea	ecx, [ebp+plLbound]
push	ecx		; plLbound
push	1		; nDim
mov	edx, [ebp+psa]
push	edx		; psa
call	ds:SafeArrayGetLBound
lea	eax, [ebp+plUbound]
push	eax		; plUbound
push	1		; nDim
mov	ecx, [ebp+psa]
push	ecx		; psa
call	ds:SafeArrayGetUBound
mov	edx, [ebp+plUbound]
sub	edx, [ebp+plLbound]
mov	[ebp+var_20], edx

loc_76DDC5:
mov	[ebp+ppvData], 0
lea	eax, [ebp+ppvData]
push	eax		; ppvData
mov	ecx, [ebp+psa]
push	ecx		; psa
call	ds:SafeArrayAccessData
cmp	[ebp+ppvData], 0
jz	short loc_76DDFA
cmp	[ebp+var_20], 0
jle	short loc_76DDFA
mov	edx, [ebp+var_20]
push	edx
mov	eax, [ebp+ppvData]
push	eax
mov	ecx, dword ptr [ebp+var_8]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_10FB400

loc_76DDFA:
mov	edx, [ebp+psa]
push	edx		; psa
call	ds:SafeArrayUnaccessData

loc_76DE04:		; default
jmp	loc_76DB83	; jumptable 0076DC09 cases 5,6,8,9,11-14,23-63

loc_76DE09:
mov	esp, ebp
pop	ebp
retn	8
sub_76DB70 endp

align 10h
off_76DE10 dd offset loc_76DC15, offset	loc_76DC26 ; jump table	for switch statement
dd offset loc_76DC3F, offset loc_76DC57
dd offset loc_76DC72, offset loc_76DC8F
dd offset loc_76DCAD, offset loc_76DCC6
dd offset loc_76DCDF, offset loc_76DCF8
dd offset loc_76DD10, offset loc_76DD2C
dd offset loc_76DD48, offset loc_76DD60
dd offset loc_76DD78, offset loc_76DE04
byte_76DE50 db	    0,	   1,	  2,	 3 ; indirect table for	switch statement
db	4,   0Fh,   0Fh,     5
db    0Fh,   0Fh,     6,   0Fh
db    0Fh,   0Fh,   0Fh,     7
db	7,     8,     9,   0Ah
db    0Bh,   0Ch,   0Dh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Fh,   0Fh,   0Fh,   0Fh
db    0Eh
align 10h


; Attributes: bp-based frame

sub_76DEA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0Ch ; switch 13 cases
ja	loc_76DFE0	; default
mov	eax, [ebp+var_8]
jmp	ds:off_76DFEC[eax*4] ; switch jump

loc_76DECE:		; jumptable 0076DEC7 case 0
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0FFFFFFFFh
jmp	loc_76DFE0	; default

loc_76DEE4:		; jumptable 0076DEC7 case 1
mov	ecx, [ebp+var_4]
call	sub_76E020
jmp	loc_76DFE0	; default

loc_76DEF1:		; jumptable 0076DEC7 case 2
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+8]
push	eax
mov	ecx, [ebp+var_4]
call	sub_76E050
jmp	loc_76DFE0	; default

loc_76DF06:		; jumptable 0076DEC7 case 3
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
push	edx
mov	ecx, [ebp+var_4]
call	sub_76E080
jmp	loc_76DFE0	; default

loc_76DF1A:		; jumptable 0076DEC7 case 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_76E0B0
jmp	loc_76DFE0	; default

loc_76DF2E:		; jumptable 0076DEC7 case 12
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [edx+8]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_76E0E0
jmp	loc_76DFE0	; default

loc_76DF46:		; jumptable 0076DEC7 case 5
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [edx+8]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_76E120
jmp	loc_76DFE0	; default

loc_76DF5E:		; jumptable 0076DEC7 case 6
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [edx+8]
push	ecx
mov	ecx, [ebp+var_4]
call	sub_76E160
jmp	short loc_76DFE0 ; default

loc_76DF73:		; jumptable 0076DEC7 case 7
mov	edx, [ebp+arg_0]
push	ecx
fld	dword ptr [edx+8]
fstp	[esp+0Ch+var_C]
mov	ecx, [ebp+var_4]
call	sub_76E1A0
jmp	short loc_76DFE0 ; default

loc_76DF87:		; jumptable 0076DEC7 case 8
mov	eax, [ebp+arg_0]
sub	esp, 8
fld	qword ptr [eax+8]
fstp	qword ptr [esp]
mov	ecx, [ebp+var_4]
call	sub_76E1E0
jmp	short loc_76DFE0 ; default

loc_76DF9D:		; jumptable 0076DEC7 case 9
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
add	edx, 4
push	edx
mov	ecx, [ebp+var_4]
call	sub_76E2A0
jmp	short loc_76DFE0 ; default

loc_76DFB1:		; jumptable 0076DEC7 case 10
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
add	ecx, 4
push	ecx
mov	ecx, [ebp+var_4]
call	sub_76E2D0
jmp	short loc_76DFE0 ; default

loc_76DFC5:		; jumptable 0076DEC7 case 11
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
add	eax, 4
push	eax
mov	ecx, [ebp+var_4]
call	sub_76E300

loc_76DFE0:		; default
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_76DEA0 endp

align 4
off_76DFEC dd offset loc_76DECE	; jump table for switch	statement
dd offset loc_76DEE4
dd offset loc_76DEF1
dd offset loc_76DF06
dd offset loc_76DF1A
dd offset loc_76DF46
dd offset loc_76DF5E
dd offset loc_76DF73
dd offset loc_76DF87
dd offset loc_76DF9D
dd offset loc_76DFB1
dd offset loc_76DFC5
dd offset loc_76DF2E


; Attributes: bp-based frame

sub_76E020 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_76E040
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0

loc_76E040:
mov	esp, ebp
pop	ebp
retn
sub_76E020 endp

align 10h


; Attributes: bp-based frame

sub_76E050 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 1
jz	short loc_76E070
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 1

loc_76E070:
mov	edx, [ebp+var_4]
mov	al, [ebp+arg_0]
mov	[edx+8], al
mov	esp, ebp
pop	ebp
retn	4
sub_76E050 endp

align 10h


; Attributes: bp-based frame

sub_76E080 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 2
jz	short loc_76E0A0
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 2

loc_76E0A0:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4
sub_76E080 endp

align 10h


; Attributes: bp-based frame

sub_76E0B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 3
jz	short loc_76E0D0
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 3

loc_76E0D0:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4
sub_76E0B0 endp

align 10h


; Attributes: bp-based frame

sub_76E0E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0Bh
jz	short loc_76E100
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 0Bh

loc_76E100:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	ecx, [ebp+arg_4]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn	8
sub_76E0E0 endp

align 10h


; Attributes: bp-based frame

sub_76E120 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 4
jz	short loc_76E140
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 4

loc_76E140:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	ecx, [ebp+arg_4]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn	8
sub_76E120 endp

align 10h


; Attributes: bp-based frame

sub_76E160 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 5
jz	short loc_76E180
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 5

loc_76E180:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx+8], eax
mov	ecx, [ebp+arg_4]
mov	[edx+0Ch], ecx
mov	esp, ebp
pop	ebp
retn	8
sub_76E160 endp

align 10h


; Attributes: bp-based frame

sub_76E1A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 6
jz	short loc_76E1C0
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 6

loc_76E1C0:
mov	edx, [ebp+var_4]
movss	xmm0, [ebp+arg_0]
movss	dword ptr [edx+8], xmm0
mov	esp, ebp
pop	ebp
retn	4
sub_76E1A0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_76E1E0(double)
sub_76E1E0 proc	near

var_4= dword ptr -4
arg_0= qword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 7
jz	short loc_76E200
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], 7

loc_76E200:
mov	edx, [ebp+var_4]
fld	[ebp+arg_0]
fstp	qword ptr [edx+8]
mov	esp, ebp
pop	ebp
retn	8
sub_76E1E0 endp

align 10h


; Attributes: bp-based frame

sub_76E210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 8
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7712C0
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4
sub_76E210 endp



; Attributes: bp-based frame

sub_76E240 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 9
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_771220
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4
sub_76E240 endp

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp-4], ecx
mov	ecx, [ebp-4]
call	sub_76FF30
mov	eax, [ebp-4]
mov	dword ptr [eax], 0Ah
mov	ecx, [ebp+8]
push	ecx
call	sub_7712C0
add	esp, 4
mov	edx, [ebp-4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4


; Attributes: bp-based frame

sub_76E2A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 8
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_771180
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4
sub_76E2A0 endp



; Attributes: bp-based frame

sub_76E2D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 9
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7711E0
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	4
sub_76E2D0 endp



; Attributes: bp-based frame

sub_76E300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76FF30
mov	eax, [ebp+var_4]
mov	dword ptr [eax], 0Ah
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_771260
add	esp, 8
mov	ecx, [ebp+var_4]
mov	[ecx+8], eax
mov	esp, ebp
pop	ebp
retn	8
sub_76E300 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	[ebp-4], ecx
mov	eax, [ebp-4]
xor	ecx, ecx
cmp	dword ptr [eax], 0
setz	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_76E360 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 1
jz	short loc_76E373
xor	al, al
jmp	short loc_76E380

loc_76E373:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	al, [edx+8]
mov	[ecx], al
mov	al, 1

loc_76E380:
mov	esp, ebp
pop	ebp
retn	4
sub_76E360 endp

align 10h


; Attributes: bp-based frame

sub_76E390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 2
jz	short loc_76E3A3
xor	al, al
jmp	short loc_76E3B0

loc_76E3A3:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx], eax
mov	al, 1

loc_76E3B0:
mov	esp, ebp
pop	ebp
retn	4
sub_76E390 endp

align 10h


; Attributes: bp-based frame

sub_76E3C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 3
jz	short loc_76E3D3
xor	al, al
jmp	short loc_76E3E0

loc_76E3D3:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx], eax
mov	al, 1

loc_76E3E0:
mov	esp, ebp
pop	ebp
retn	4
sub_76E3C0 endp

align 10h


; Attributes: bp-based frame

sub_76E3F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0Bh
jz	short loc_76E403
xor	al, al
jmp	short loc_76E416

loc_76E403:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx], eax
mov	edx, [edx+0Ch]
mov	[ecx+4], edx
mov	al, 1

loc_76E416:
mov	esp, ebp
pop	ebp
retn	4
sub_76E3F0 endp

align 10h


; Attributes: bp-based frame

sub_76E420 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 4
jz	short loc_76E433
xor	al, al
jmp	short loc_76E446

loc_76E433:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx], eax
mov	edx, [edx+0Ch]
mov	[ecx+4], edx
mov	al, 1

loc_76E446:
mov	esp, ebp
pop	ebp
retn	4
sub_76E420 endp

align 10h


; Attributes: bp-based frame

sub_76E450 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 5
jz	short loc_76E463
xor	al, al
jmp	short loc_76E476

loc_76E463:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ecx], eax
mov	edx, [edx+0Ch]
mov	[ecx+4], edx
mov	al, 1

loc_76E476:
mov	esp, ebp
pop	ebp
retn	4
sub_76E450 endp

align 10h


; Attributes: bp-based frame

sub_76E480 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 6
jz	short loc_76E493
xor	al, al
jmp	short loc_76E4A0

loc_76E493:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx]
mov	al, 1

loc_76E4A0:
mov	esp, ebp
pop	ebp
retn	4
sub_76E480 endp

align 10h


; Attributes: bp-based frame

sub_76E4B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 7
jz	short loc_76E4C3
xor	al, al
jmp	short loc_76E4D0

loc_76E4C3:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
fld	qword ptr [edx+8]
fstp	qword ptr [ecx]
mov	al, 1

loc_76E4D0:
mov	esp, ebp
pop	ebp
retn	4
sub_76E4B0 endp

align 10h


; Attributes: bp-based frame

sub_76E4E0 proc	near

var_A0=	dword ptr -0A0h
var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_55=	byte ptr -55h
var_54=	byte ptr -54h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_76E4E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 94h
mov	[ebp+var_88], ecx
mov	eax, [ebp+var_88]
cmp	dword ptr [eax], 9
jnz	loc_76E5DC
lea	ecx, [ebp+var_39]
mov	[ebp+var_8C], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_8C]
push	edx
lea	ecx, [ebp+var_38]
call	sub_402390
mov	byte ptr [ebp+var_4], 2
lea	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_88]
call	sub_76E680
mov	[ebp+var_D], al
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	short loc_76E5B1
lea	edx, [ebp+var_38]
push	edx
lea	eax, [ebp+var_54]
push	eax
call	sub_10F4BF0
add	esp, 8
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_90]
mov	[ebp+var_6C], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_6C]
cmp	edx, [ebp+arg_0]
jz	short loc_76E59D
mov	eax, [ebp+var_6C]
mov	ecx, [eax+10h]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_6C]
mov	eax, [edx+14h]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_64]
push	ecx
mov	edx, [ebp+var_68]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_403980

loc_76E59D:
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_54]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 2

loc_76E5B1:
mov	al, [ebp+var_D]
mov	[ebp+var_55], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 5
lea	ecx, [ebp+var_38]
call	sub_407E10
mov	[ebp+var_4], 0FFFFFFFFh
mov	al, [ebp+var_55]
jmp	loc_76E666

loc_76E5DC:
mov	ecx, [ebp+var_88]
cmp	dword ptr [ecx], 8
jz	short loc_76E5EB
xor	al, al
jmp	short loc_76E666

loc_76E5EB:
mov	edx, [ebp+var_88]
mov	eax, [edx+8]
add	eax, 4
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_94]
add	edx, 1
mov	[ebp+var_98], edx

loc_76E618:
mov	eax, [ebp+var_94]
mov	cl, [eax]
mov	[ebp+var_99], cl
add	[ebp+var_94], 1
cmp	[ebp+var_99], 0
jnz	short loc_76E618
mov	edx, [ebp+var_94]
sub	edx, [ebp+var_98]
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_84]
add	eax, [ebp+var_A0]
push	eax
mov	ecx, [ebp+var_84]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_403980
mov	al, 1

loc_76E666:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_76E4E0 endp

align 10h


; Attributes: bp-based frame

sub_76E680 proc	near

var_9C=	dword ptr -9Ch
var_96=	word ptr -96h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_51=	byte ptr -51h
var_50=	byte ptr -50h
var_26=	byte ptr -26h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_76E680
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 90h
mov	[ebp+var_84], ecx
mov	eax, [ebp+var_84]
cmp	dword ptr [eax], 8
jnz	loc_76E77C
lea	ecx, [ebp+var_26]
mov	[ebp+var_88], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_88]
push	edx
lea	ecx, [ebp+var_24]
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_84]
call	sub_76E4E0
mov	[ebp+var_25], al
movzx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_76E751
lea	edx, [ebp+var_24]
push	edx
lea	eax, [ebp+var_50]
push	eax
call	sub_10EF240
add	esp, 8
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
mov	[ebp+var_68], ecx
mov	byte ptr [ebp+var_4], 3
mov	edx, [ebp+var_68]
cmp	edx, [ebp+arg_0]
jz	short loc_76E73D
mov	eax, [ebp+var_68]
mov	ecx, [eax+20h]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_68]
mov	eax, [edx+24h]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_60]
push	ecx
mov	edx, [ebp+var_64]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_403580

loc_76E73D:
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_50]
call	sub_407E10
mov	byte ptr [ebp+var_4], 2

loc_76E751:
mov	al, [ebp+var_25]
mov	[ebp+var_51], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 5
lea	ecx, [ebp+var_24]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	al, [ebp+var_51]
jmp	loc_76E802

loc_76E77C:
mov	ecx, [ebp+var_84]
cmp	dword ptr [ecx], 9
jz	short loc_76E78B
xor	al, al
jmp	short loc_76E802

loc_76E78B:
mov	edx, [ebp+var_84]
mov	eax, [edx+8]
add	eax, 4
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_80]
mov	[ebp+var_90], ecx
mov	edx, [ebp+var_90]
add	edx, 2
mov	[ebp+var_94], edx

loc_76E7B2:
mov	eax, [ebp+var_90]
mov	cx, [eax]
mov	[ebp+var_96], cx
add	[ebp+var_90], 2
cmp	[ebp+var_96], 0
jnz	short loc_76E7B2
mov	edx, [ebp+var_90]
sub	edx, [ebp+var_94]
sar	edx, 1
mov	[ebp+var_9C], edx
mov	eax, [ebp+var_9C]
mov	ecx, [ebp+var_80]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+var_80]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403580
mov	al, 1

loc_76E802:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_76E680 endp

align 10h


; Attributes: bp-based frame

sub_76E820 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
cmp	dword ptr [eax], 0Ah
jz	short loc_76E835
xor	al, al
jmp	short loc_76E861

loc_76E835:
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
add	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_4408D0
mov	al, 1

loc_76E861:
mov	esp, ebp
pop	ebp
retn	4
sub_76E820 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	[ebp-4], ecx
mov	eax, [ebp-4]
cmp	dword ptr [eax], 8
jz	short loc_76E883
xor	al, al
jmp	short loc_76E893

loc_76E883:
mov	ecx, [ebp-4]
mov	edx, [ecx+8]
add	edx, 4
mov	eax, [ebp+8]
mov	[eax], edx
mov	al, 1

loc_76E893:
mov	esp, ebp
pop	ebp
retn	4
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	[ebp-4], ecx
mov	eax, [ebp-4]
cmp	dword ptr [eax], 9
jz	short loc_76E8B3
xor	al, al
jmp	short loc_76E8C3

loc_76E8B3:
mov	ecx, [ebp-4]
mov	edx, [ecx+8]
add	edx, 4
mov	eax, [ebp+8]
mov	[eax], edx
mov	al, 1

loc_76E8C3:
mov	esp, ebp
pop	ebp
retn	4
align 10h


; Attributes: bp-based frame

sub_76E8D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0Ah
jz	short loc_76E8E3
xor	al, al
jmp	short loc_76E900

loc_76E8E3:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
add	edx, 4
mov	eax, [ebp+arg_0]
mov	[eax], edx
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	eax, [ebp+arg_4]
mov	ecx, [edx]
mov	[eax], ecx
mov	al, 1

loc_76E900:
mov	esp, ebp
pop	ebp
retn	8
sub_76E8D0 endp

align 10h


; Attributes: bp-based frame

sub_76E910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0Ch ; switch 13 cases
ja	short loc_76E9A1 ; default
mov	eax, [ebp+var_8]
jmp	ds:off_76E9A8[eax*4] ; switch jump

loc_76E93A:		; jumptable 0076E933 case 0
xor	eax, eax
jmp	short loc_76E9A3

loc_76E93E:		; jumptable 0076E933 case 1
xor	eax, eax
jmp	short loc_76E9A3

loc_76E942:		; jumptable 0076E933 case 2
mov	eax, 1
jmp	short loc_76E9A3

loc_76E949:		; jumptable 0076E933 case 3
mov	eax, 4
jmp	short loc_76E9A3

loc_76E950:		; jumptable 0076E933 case 4
mov	eax, 4
jmp	short loc_76E9A3

loc_76E957:		; jumptable 0076E933 case 5
mov	eax, 8
jmp	short loc_76E9A3

loc_76E95E:		; jumptable 0076E933 case 12
mov	eax, 8
jmp	short loc_76E9A3

loc_76E965:		; jumptable 0076E933 case 6
mov	eax, 8
jmp	short loc_76E9A3

loc_76E96C:		; jumptable 0076E933 case 7
mov	eax, 4
jmp	short loc_76E9A3

loc_76E973:		; jumptable 0076E933 case 8
mov	eax, 8
jmp	short loc_76E9A3

loc_76E97A:		; jumptable 0076E933 case 9
mov	ecx, [ebp+var_4]
mov	ecx, [ecx+8]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
jmp	short loc_76E9A3

loc_76E987:		; jumptable 0076E933 case 10
mov	edx, [ebp+var_4]
mov	ecx, [edx+8]
call	sub_7711C0
jmp	short loc_76E9A3

loc_76E994:		; jumptable 0076E933 case 11
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
call	unknown_libname_16 ; Microsoft VisualC 2-9/net runtime
jmp	short loc_76E9A3

loc_76E9A1:		; default
xor	eax, eax

loc_76E9A3:
mov	esp, ebp
pop	ebp
retn
sub_76E910 endp

align 4
off_76E9A8 dd offset loc_76E93A	; jump table for switch	statement
dd offset loc_76E93E
dd offset loc_76E942
dd offset loc_76E949
dd offset loc_76E950
dd offset loc_76E957
dd offset loc_76E965
dd offset loc_76E96C
dd offset loc_76E973
dd offset loc_76E97A
dd offset loc_76E987
dd offset loc_76E994
dd offset loc_76E95E
align 10h


; Attributes: bp-based frame

sub_76E9E0 proc	near

var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	byte ptr -0F0h
var_D6=	byte ptr -0D6h
var_D5=	byte ptr -0D5h
var_D4=	byte ptr -0D4h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_BC=	byte ptr -0BCh
var_6C=	byte ptr -6Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_76E9E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 134h
mov	[ebp+var_130], ecx
mov	[ebp+var_F4], 0
push	1
push	10h
lea	ecx, [ebp+var_BC]
call	sub_43FB10
mov	[ebp+var_4], 1
mov	eax, [ebp+var_130]
mov	ecx, [eax]
mov	[ebp+var_134], ecx
mov	edx, [ebp+var_134]
sub	edx, 1
mov	[ebp+var_134], edx
cmp	[ebp+var_134], 0Ah ; switch 11 cases
ja	loc_76EDB2	; default
mov	eax, [ebp+var_134]
jmp	ds:off_76EE10[eax*4] ; switch jump
jmp	loc_76EDB2	; default
jmp	loc_76EDB2	; default

loc_76EA65:		; jumptable 0076EA54 case 0
mov	ecx, [ebp+var_130]
movzx	edx, byte ptr [ecx+8]
push	edx
lea	ecx, [ebp+var_BC]
call	sub_503630
jmp	loc_76EDB2	; default

loc_76EA80:		; jumptable 0076EA54 case 1
mov	eax, [ebp+var_130]
mov	ecx, [eax+8]
push	ecx
lea	ecx, [ebp+var_BC]
call	sub_43D000
jmp	loc_76EDB2	; default

loc_76EA9A:		; jumptable 0076EA54 case 2
mov	edx, [ebp+var_130]
mov	eax, [edx+8]
push	eax
lea	ecx, [ebp+var_BC]
call	sub_43CFE0
jmp	loc_76EDB2	; default

loc_76EAB4:		; jumptable 0076EA54 case 3
mov	ecx, [ebp+var_130]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ecx+8]
push	eax
lea	ecx, [ebp+var_BC]
call	?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z_2 ; std::locale::_Locimp::_Addfac(std::locale::facet *,uint)
jmp	loc_76EDB2	; default

loc_76EAD2:		; jumptable 0076EA54 case 10
mov	ecx, [ebp+var_130]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ecx+8]
push	eax
lea	ecx, [ebp+var_BC]
call	?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z_2 ; std::locale::_Locimp::_Addfac(std::locale::facet *,uint)
jmp	loc_76EDB2	; default

loc_76EAF0:		; jumptable 0076EA54 case 4
mov	ecx, [ebp+var_130]
mov	edx, [ecx+0Ch]
push	edx
mov	eax, [ecx+8]
push	eax
lea	ecx, [ebp+var_BC]
call	?_Addfac@_Locimp@locale@std@@AAEXPAVfacet@23@I@Z_1 ; std::locale::_Locimp::_Addfac(std::locale::facet *,uint)
jmp	loc_76EDB2	; default

loc_76EB0E:		; jumptable 0076EA54 case 5
mov	ecx, [ebp+var_130]
push	ecx		; float
fld	dword ptr [ecx+8]
fstp	[esp+144h+var_144]
lea	ecx, [ebp+var_BC]
call	sub_489FE0
jmp	loc_76EDB2	; default

loc_76EB2B:		; jumptable 0076EA54 case 6
mov	edx, [ebp+var_130]
sub	esp, 8
fld	qword ptr [edx+8]
fstp	qword ptr [esp]
lea	ecx, [ebp+var_BC]
call	sub_771150
jmp	loc_76EDB2	; default

loc_76EB4A:		; jumptable 0076EA54 case 7
lea	eax, [ebp+var_D5]
mov	[ebp+var_100], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_130]
mov	edx, [ecx+8]
mov	eax, [edx]
mov	[ebp+var_FC], eax
mov	ecx, [ebp+var_130]
mov	edx, [ecx+8]
add	edx, 4
mov	[ebp+var_F8], edx
lea	eax, [ebp+var_D4]
mov	[ebp+var_C4], eax
lea	ecx, [ebp+var_D4]
push	ecx
mov	edx, [ebp+var_100]
push	edx
lea	ecx, [ebp+var_C0]
call	sub_407990
mov	byte ptr [ebp+var_4], 3
mov	eax, [ebp+var_F8]
add	eax, [ebp+var_FC]
push	eax
mov	ecx, [ebp+var_F8]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_407CA0
mov	byte ptr [ebp+var_4], 2
lea	edx, [ebp+var_D4]
mov	[ebp+var_138], edx
mov	byte ptr [ebp+var_4], 4
mov	eax, [ebp+var_138]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_10EF240
add	esp, 8
mov	edx, [ebp+var_F4]
or	edx, 1
mov	[ebp+var_F4], edx
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_D4]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 2
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_6C]
call	sub_43FBD0
lea	eax, [ebp+var_6C]
mov	[ebp+var_10C], eax
mov	ecx, [ebp+var_10C]
mov	dword ptr [ecx], offset	off_144627C
mov	ecx, [ebp+var_10C]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
jmp	loc_76EDFF

loc_76EC4A:		; jumptable 0076EA54 case 8
lea	edx, [ebp+var_D6]
mov	[ebp+var_118], edx
mov	byte ptr [ebp+var_4], 6
mov	eax, [ebp+var_130]
mov	ecx, [eax+8]
mov	edx, [ecx]
mov	[ebp+var_114], edx
mov	eax, [ebp+var_130]
mov	ecx, [eax+8]
add	ecx, 4
mov	[ebp+var_110], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	[edx+20h], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_118]
push	edx
mov	ecx, [ebp+arg_0]
add	ecx, 24h
call	sub_407990
mov	byte ptr [ebp+var_4], 7
mov	eax, [ebp+var_114]
mov	ecx, [ebp+var_110]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+var_110]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4077B0
mov	byte ptr [ebp+var_4], 6
mov	ecx, [ebp+var_F4]
or	ecx, 1
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_6C]
call	sub_43FBD0
lea	edx, [ebp+var_6C]
mov	[ebp+var_11C], edx
mov	eax, [ebp+var_11C]
mov	dword ptr [eax], offset	off_144627C
mov	ecx, [ebp+var_11C]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
jmp	loc_76EDFF

loc_76ED0A:		; jumptable 0076EA54 case 9
mov	ecx, [ebp+var_130]
mov	edx, [ecx+8]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_130]
mov	edx, [ecx+8]
add	edx, 4
push	edx
lea	eax, [ebp+var_F0]
push	eax
call	sub_10F2230
add	esp, 0Ch
mov	[ebp+var_13C], eax
mov	ecx, [ebp+var_13C]
mov	[ebp+var_140], ecx
mov	byte ptr [ebp+var_4], 8
mov	edx, [ebp+var_140]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_10EF240
add	esp, 8
mov	ecx, [ebp+var_F4]
or	ecx, 1
mov	[ebp+var_F4], ecx
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_F0]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_6C]
call	sub_43FBD0
lea	edx, [ebp+var_6C]
mov	[ebp+var_128], edx
mov	eax, [ebp+var_128]
mov	dword ptr [eax], offset	off_144627C
mov	ecx, [ebp+var_128]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
jmp	short loc_76EDFF

loc_76EDB2:		; default
mov	ecx, [ebp+arg_0]
push	ecx
lea	ecx, [ebp+var_BC]
call	sub_436BA0
mov	edx, [ebp+var_F4]
or	edx, 1
mov	[ebp+var_F4], edx
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+var_6C]
call	sub_43FBD0
lea	eax, [ebp+var_6C]
mov	[ebp+var_12C], eax
mov	ecx, [ebp+var_12C]
mov	dword ptr [ecx], offset	off_144627C
mov	ecx, [ebp+var_12C]
call	sub_77EEB0
mov	eax, [ebp+arg_0]

loc_76EDFF:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_76E9E0 endp

align 10h
off_76EE10 dd offset loc_76EA65	; jump table for switch	statement
dd offset loc_76EA80
dd offset loc_76EA9A
dd offset loc_76EAB4
dd offset loc_76EAF0
dd offset loc_76EB0E
dd offset loc_76EB2B
dd offset loc_76EB4A
dd offset loc_76EC4A
dd offset loc_76ED0A
dd offset loc_76EAD2
align 10h


; Attributes: bp-based frame

sub_76EE40 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_3C=	byte ptr -3Ch
var_24=	byte ptr -24h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_76EE40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
add	ecx, 1
mov	[ebp+var_60], ecx
cmp	[ebp+var_60], 0Ch ; switch 13 cases
ja	loc_76EFDE	; default
mov	edx, [ebp+var_60]
jmp	ds:off_76EFF0[edx*4] ; switch jump

loc_76EE81:		; jumptable 0076EE7A case 2
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_771460
jmp	loc_76EFDE	; default

loc_76EE92:		; jumptable 0076EE7A case 3
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_771500
jmp	loc_76EFDE	; default

loc_76EEA3:		; jumptable 0076EE7A case 4
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_7715B0
jmp	loc_76EFDE	; default

loc_76EEB4:		; jumptable 0076EE7A case 5
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_771660
jmp	loc_76EFDE	; default

loc_76EEC5:		; jumptable 0076EE7A case 12
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_771660
jmp	loc_76EFDE	; default

loc_76EED6:		; jumptable 0076EE7A case 6
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_771710
jmp	loc_76EFDE	; default

loc_76EEE7:		; jumptable 0076EE7A case 7
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_7717C0
jmp	loc_76EFDE	; default

loc_76EEF8:		; jumptable 0076EE7A case 8
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_771870
jmp	loc_76EFDE	; default

loc_76EF09:		; jumptable 0076EE7A case 0
mov	ecx, [ebp+var_5C]
call	sub_76FF30
mov	edx, [ebp+var_5C]
mov	dword ptr [edx], 0FFFFFFFFh
jmp	loc_76EFDE	; default

loc_76EF1F:		; jumptable 0076EE7A case 1
mov	ecx, [ebp+var_5C]
call	sub_76E020
jmp	loc_76EFDE	; default

loc_76EF2C:		; jumptable 0076EE7A case 9
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3C]
push	ecx
call	sub_10F4BF0
add	esp, 8
mov	[ebp+var_64], eax
mov	edx, [ebp+var_64]
mov	[ebp+var_68], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_76E210
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 1
lea	ecx, [ebp+var_3C]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
jmp	short loc_76EFDE ; default

loc_76EF77:		; jumptable 0076EE7A case 10
mov	ecx, [ebp+arg_4]
push	ecx
mov	ecx, [ebp+var_5C]
call	sub_76E240
jmp	short loc_76EFDE ; default

loc_76EF85:		; jumptable 0076EE7A case 11
mov	edx, [ebp+arg_4]
push	edx
lea	eax, [ebp+var_24]
push	eax
call	sub_770DD0
add	esp, 8
mov	[ebp+var_4], 2
mov	ecx, [ebp+var_14]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_4C], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_48]
sub	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_50]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_76E300
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 3
lea	ecx, [ebp+var_24]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh

loc_76EFDE:		; default
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_76EE40 endp

align 10h
off_76EFF0 dd offset loc_76EF09	; jump table for switch	statement
dd offset loc_76EF1F
dd offset loc_76EE81
dd offset loc_76EE92
dd offset loc_76EEA3
dd offset loc_76EEB4
dd offset loc_76EED6
dd offset loc_76EEE7
dd offset loc_76EEF8
dd offset loc_76EF2C
dd offset loc_76EF77
dd offset loc_76EF85
dd offset loc_76EEC5
align 10h
push	ebp
mov	ebp, esp
sub	esp, 64h
push	esi
push	edi
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	ecx, [ebp+8]
mov	edx, [eax]
cmp	edx, [ecx]
jz	short loc_76F05B
mov	eax, [ebp-4]
mov	ecx, [ebp+8]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setl	al
jmp	loc_76F398

loc_76F05B:
mov	eax, [ebp-4]
mov	ecx, [eax]
mov	[ebp-8], ecx
mov	edx, [ebp-8]
add	edx, 1
mov	[ebp-8], edx
cmp	dword ptr [ebp-8], 0Ch ; switch	13 cases
ja	loc_76F396	; default
mov	eax, [ebp-8]
jmp	ds:off_76F3A0[eax*4] ; switch jump

loc_76F080:		; jumptable 0076F079 case 0
xor	al, al
jmp	loc_76F398

loc_76F087:		; jumptable 0076F079 case 1
xor	al, al
jmp	loc_76F398

loc_76F08E:		; jumptable 0076F079 case 2
mov	ecx, [ebp-4]
movzx	edx, byte ptr [ecx+8]
mov	eax, [ebp+8]
movzx	ecx, byte ptr [eax+8]
xor	eax, eax
cmp	edx, ecx
setl	al
jmp	loc_76F398

loc_76F0A8:		; jumptable 0076F079 case 3
mov	edx, [ebp-4]
mov	eax, [ebp+8]
mov	ecx, [edx+8]
xor	edx, edx
cmp	ecx, [eax+8]
setl	dl
mov	al, dl
jmp	loc_76F398

loc_76F0C0:		; jumptable 0076F079 case 4
mov	eax, [ebp-4]
mov	ecx, [ebp+8]
mov	edx, [eax+8]
cmp	edx, [ecx+8]
sbb	eax, eax
neg	eax
jmp	loc_76F398

loc_76F0D5:		; jumptable 0076F079 case 5
mov	eax, [ebp-4]
mov	ecx, [ebp+8]
mov	[ebp-0Ch], eax
mov	[ebp-10h], ecx
mov	edx, [ebp-0Ch]
mov	eax, [ebp-10h]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+0Ch]
jg	short loc_76F108
jl	short loc_76F0FF
mov	edx, [ebp-0Ch]
mov	eax, [ebp-10h]
mov	ecx, [edx+8]
cmp	ecx, [eax+8]
jnb	short loc_76F108

loc_76F0FF:
mov	dword ptr [ebp-14h], 1
jmp	short loc_76F10F

loc_76F108:
mov	dword ptr [ebp-14h], 0

loc_76F10F:
mov	al, [ebp-14h]
jmp	loc_76F398

loc_76F117:		; jumptable 0076F079 case 12
mov	edx, [ebp-4]
mov	eax, [ebp+8]
mov	[ebp-18h], edx
mov	[ebp-1Ch], eax
mov	ecx, [ebp-18h]
mov	edx, [ebp-1Ch]
mov	eax, [ecx+0Ch]
cmp	eax, [edx+0Ch]
jg	short loc_76F14A
jl	short loc_76F141
mov	ecx, [ebp-18h]
mov	edx, [ebp-1Ch]
mov	eax, [ecx+8]
cmp	eax, [edx+8]
jnb	short loc_76F14A

loc_76F141:
mov	dword ptr [ebp-20h], 1
jmp	short loc_76F151

loc_76F14A:
mov	dword ptr [ebp-20h], 0

loc_76F151:
mov	al, [ebp-20h]
jmp	loc_76F398

loc_76F159:		; jumptable 0076F079 case 6
mov	ecx, [ebp-4]
mov	edx, [ebp+8]
mov	[ebp-24h], ecx
mov	[ebp-28h], edx
mov	eax, [ebp-24h]
mov	ecx, [ebp-28h]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+0Ch]
ja	short loc_76F18C
jb	short loc_76F183
mov	eax, [ebp-24h]
mov	ecx, [ebp-28h]
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnb	short loc_76F18C

loc_76F183:
mov	dword ptr [ebp-2Ch], 1
jmp	short loc_76F193

loc_76F18C:
mov	dword ptr [ebp-2Ch], 0

loc_76F193:
mov	al, [ebp-2Ch]
jmp	loc_76F398

loc_76F19B:		; jumptable 0076F079 case 7
mov	eax, [ebp-4]
fld	dword ptr [eax+8]
mov	ecx, [ebp+8]
fld	dword ptr [ecx+8]
fcomip	st, st(1)
fstp	st
jbe	short loc_76F1B6
mov	dword ptr [ebp-30h], 1
jmp	short loc_76F1BD

loc_76F1B6:
mov	dword ptr [ebp-30h], 0

loc_76F1BD:
mov	al, [ebp-30h]
jmp	loc_76F398

loc_76F1C5:		; jumptable 0076F079 case 8
mov	edx, [ebp-4]
mov	eax, [ebp+8]
fld	qword ptr [edx+8]
fld	qword ptr [eax+8]
fcomip	st, st(1)
fstp	st
jbe	short loc_76F1E0
mov	dword ptr [ebp-34h], 1
jmp	short loc_76F1E7

loc_76F1E0:
mov	dword ptr [ebp-34h], 0

loc_76F1E7:
mov	al, [ebp-34h]
jmp	loc_76F398

loc_76F1EF:		; jumptable 0076F079 case 9
mov	ecx, [ebp-4]
mov	edx, [ecx+8]
mov	eax, [ebp+8]
mov	ecx, [eax+8]
mov	edx, [edx]
cmp	edx, [ecx]
jz	short loc_76F21C
mov	eax, [ebp-4]
mov	ecx, [eax+8]
mov	edx, [ebp+8]
mov	eax, [edx+8]
mov	ecx, [ecx]
cmp	ecx, [eax]
sbb	eax, eax
neg	eax
jmp	loc_76F398
jmp	short loc_76F28D ; jumptable 0076F079 case 10

loc_76F21C:
mov	edx, [ebp+8]
mov	eax, [edx+8]
add	eax, 4
mov	[ebp-38h], eax
mov	ecx, [ebp-4]
mov	edx, [ecx+8]
add	edx, 4
mov	[ebp-3Ch], edx

loc_76F234:
mov	eax, [ebp-3Ch]
mov	cl, [eax]
mov	[ebp-3Dh], cl
mov	edx, [ebp-38h]
cmp	cl, [edx]
jnz	short loc_76F271
cmp	byte ptr [ebp-3Dh], 0
jz	short loc_76F268
mov	eax, [ebp-3Ch]
mov	cl, [eax+1]
mov	[ebp-3Eh], cl
mov	edx, [ebp-38h]
cmp	cl, [edx+1]
jnz	short loc_76F271
add	dword ptr [ebp-3Ch], 2
add	dword ptr [ebp-38h], 2
cmp	byte ptr [ebp-3Eh], 0
jnz	short loc_76F234

loc_76F268:
mov	dword ptr [ebp-44h], 0
jmp	short loc_76F279

loc_76F271:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
mov	[ebp-44h], eax

loc_76F279:
mov	ecx, [ebp-44h]
mov	[ebp-48h], ecx
xor	eax, eax
cmp	dword ptr [ebp-48h], 0
setl	al
jmp	loc_76F398

loc_76F28D:		; jumptable 0076F079 case 10
mov	edx, [ebp-4]
mov	eax, [edx+8]
mov	ecx, [ebp+8]
mov	edx, [ecx+8]
mov	eax, [eax]
cmp	eax, [edx]
jz	short loc_76F2BA
mov	ecx, [ebp-4]
mov	edx, [ecx+8]
mov	eax, [ebp+8]
mov	ecx, [eax+8]
mov	edx, [edx]
cmp	edx, [ecx]
sbb	eax, eax
neg	eax
jmp	loc_76F398
jmp	short loc_76F330 ; jumptable 0076F079 case 11

loc_76F2BA:
mov	eax, [ebp+8]
mov	ecx, [eax+8]
add	ecx, 4
mov	[ebp-4Ch], ecx
mov	edx, [ebp-4]
mov	eax, [edx+8]
add	eax, 4
mov	[ebp-50h], eax

loc_76F2D2:
mov	ecx, [ebp-50h]
mov	dx, [ecx]
mov	[ebp-52h], dx
mov	eax, [ebp-4Ch]
cmp	dx, [eax]
jnz	short loc_76F317
cmp	word ptr [ebp-52h], 0
jz	short loc_76F30E
mov	ecx, [ebp-50h]
mov	dx, [ecx+2]
mov	[ebp-54h], dx
mov	eax, [ebp-4Ch]
cmp	dx, [eax+2]
jnz	short loc_76F317
add	dword ptr [ebp-50h], 4
add	dword ptr [ebp-4Ch], 4
cmp	word ptr [ebp-54h], 0
jnz	short loc_76F2D2

loc_76F30E:
mov	dword ptr [ebp-58h], 0
jmp	short loc_76F31F

loc_76F317:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp-58h], ecx

loc_76F31F:
mov	edx, [ebp-58h]
mov	[ebp-5Ch], edx
xor	eax, eax
cmp	dword ptr [ebp-5Ch], 0
setl	al
jmp	short loc_76F398

loc_76F330:		; jumptable 0076F079 case 11
mov	eax, [ebp-4]
mov	ecx, [eax+8]
mov	edx, [ebp+8]
mov	eax, [edx+8]
mov	ecx, [ecx]
cmp	ecx, [eax]
jz	short loc_76F35A
mov	edx, [ebp-4]
mov	eax, [edx+8]
mov	ecx, [ebp+8]
mov	edx, [ecx+8]
mov	eax, [eax]
cmp	eax, [edx]
sbb	eax, eax
neg	eax
jmp	short loc_76F398
jmp	short loc_76F396 ; default

loc_76F35A:
mov	ecx, [ebp-4]
mov	edx, [ecx+8]
mov	ecx, [edx]
mov	eax, [ebp+8]
mov	edi, [eax+8]
add	edi, 4
mov	edx, [ebp-4]
mov	esi, [edx+8]
add	esi, 4
xor	eax, eax
mov	[ebp-60h], eax
repe cmpsb
jz	short loc_76F385
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp-60h], ecx

loc_76F385:
mov	edx, [ebp-60h]
mov	[ebp-64h], edx
xor	eax, eax
cmp	dword ptr [ebp-64h], 0
setl	al
jmp	short loc_76F398

loc_76F396:		; default
xor	al, al

loc_76F398:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
off_76F3A0 dd offset loc_76F080	; jump table for switch	statement
dd offset loc_76F087
dd offset loc_76F08E
dd offset loc_76F0A8
dd offset loc_76F0C0
dd offset loc_76F0D5
dd offset loc_76F159
dd offset loc_76F19B
dd offset loc_76F1C5
dd offset loc_76F1EF
dd offset loc_76F28D
dd offset loc_76F330
dd offset loc_76F117
align 10h


; Attributes: bp-based frame

sub_76F3E0 proc	near

var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= word ptr -1ACh
var_1AA= word ptr -1AAh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= word ptr -194h
var_192= word ptr -192h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= word ptr -174h
var_172= word ptr -172h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_156= byte ptr -156h
var_155= byte ptr -155h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	byte ptr -9Ch
var_71=	byte ptr -71h
var_70=	byte ptr -70h
var_55=	byte ptr -55h
var_54=	byte ptr -54h
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_76F3E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1B0h
push	esi
push	edi
mov	[ebp+var_DC], ecx
mov	[ebp+var_A0], 0
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_E0], ecx
mov	edx, [ebp+var_E0]
add	edx, 1
mov	[ebp+var_E0], edx
cmp	[ebp+var_E0], 0Ch ; switch 13 cases
ja	loc_76FEE4	; default
mov	eax, [ebp+var_E0]
jmp	ds:off_76FEF8[eax*4] ; switch jump

loc_76F447:		; jumptable 0076F440 cases 0,1
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_DC]
mov	eax, [ecx]
xor	ecx, ecx
cmp	eax, [edx]
setz	cl
mov	al, cl
jmp	loc_76FEE6

loc_76F460:		; jumptable 0076F440 case 2
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_DC]
mov	ecx, [edx]
cmp	ecx, [eax]
jnz	short loc_76F490
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+8]
mov	ecx, [ebp+var_DC]
movzx	edx, byte ptr [ecx+8]
cmp	eax, edx
jnz	short loc_76F490
mov	[ebp+var_E4], 1
jmp	short loc_76F49A

loc_76F490:
mov	[ebp+var_E4], 0

loc_76F49A:
mov	al, byte ptr [ebp+var_E4]
jmp	loc_76FEE6

loc_76F4A5:		; jumptable 0076F440 case 3
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_E8], ecx
cmp	[ebp+var_E8], 2
jz	short loc_76F4C4
cmp	[ebp+var_E8], 3
jz	short loc_76F4DF
jmp	short loc_76F4F8

loc_76F4C4:
mov	edx, [ebp+var_DC]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+8]
xor	edx, edx
cmp	ecx, [eax+8]
setz	dl
mov	al, dl
jmp	loc_76FEE6

loc_76F4DF:
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+8]
xor	eax, eax
cmp	edx, [ecx+8]
setz	al
jmp	loc_76FEE6

loc_76F4F8:
xor	al, al
jmp	loc_76FEE6

loc_76F4FF:		; jumptable 0076F440 case 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_EC], ecx
cmp	[ebp+var_EC], 2
jz	short loc_76F51E
cmp	[ebp+var_EC], 3
jz	short loc_76F539
jmp	short loc_76F552

loc_76F51E:
mov	edx, [ebp+var_DC]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+8]
xor	edx, edx
cmp	ecx, [eax+8]
setz	dl
mov	al, dl
jmp	loc_76FEE6

loc_76F539:
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+8]
xor	eax, eax
cmp	edx, [ecx+8]
setz	al
jmp	loc_76FEE6

loc_76F552:
xor	al, al
jmp	loc_76FEE6

loc_76F559:		; jumptable 0076F440 case 12
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_DC]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_76F5B1
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_DC]
mov	[ebp+var_F0], eax
mov	[ebp+var_F4], ecx
mov	edx, [ebp+var_F0]
mov	eax, [ebp+var_F4]
mov	ecx, [edx+8]
cmp	ecx, [eax+8]
jnz	short loc_76F5B1
mov	edx, [ebp+var_F0]
mov	eax, [ebp+var_F4]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+0Ch]
jnz	short loc_76F5B1
mov	[ebp+var_F8], 1
jmp	short loc_76F5BB

loc_76F5B1:
mov	[ebp+var_F8], 0

loc_76F5BB:
mov	al, byte ptr [ebp+var_F8]
jmp	loc_76FEE6

loc_76F5C6:		; jumptable 0076F440 case 5
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_FC], eax
cmp	[ebp+var_FC], 4
jz	short loc_76F5E8
cmp	[ebp+var_FC], 5
jz	short loc_76F646
jmp	loc_76F6A4

loc_76F5E8:
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+arg_0]
mov	[ebp+var_100], ecx
mov	[ebp+var_104], edx
mov	eax, [ebp+var_100]
mov	ecx, [ebp+var_104]
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnz	short loc_76F631
mov	eax, [ebp+var_100]
mov	ecx, [ebp+var_104]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+0Ch]
jnz	short loc_76F631
mov	[ebp+var_108], 1
jmp	short loc_76F63B

loc_76F631:
mov	[ebp+var_108], 0

loc_76F63B:
mov	al, byte ptr [ebp+var_108]
jmp	loc_76FEE6

loc_76F646:
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+arg_0]
mov	[ebp+var_10C], eax
mov	[ebp+var_110], ecx
mov	edx, [ebp+var_10C]
mov	eax, [ebp+var_110]
mov	ecx, [edx+8]
cmp	ecx, [eax+8]
jnz	short loc_76F68F
mov	edx, [ebp+var_10C]
mov	eax, [ebp+var_110]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+0Ch]
jnz	short loc_76F68F
mov	[ebp+var_114], 1
jmp	short loc_76F699

loc_76F68F:
mov	[ebp+var_114], 0

loc_76F699:
mov	al, byte ptr [ebp+var_114]
jmp	loc_76FEE6

loc_76F6A4:
xor	al, al
jmp	loc_76FEE6

loc_76F6AB:		; jumptable 0076F440 case 6
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_118], eax
cmp	[ebp+var_118], 4
jz	short loc_76F6CD
cmp	[ebp+var_118], 5
jz	short loc_76F72B
jmp	loc_76F789

loc_76F6CD:
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+arg_0]
mov	[ebp+var_11C], ecx
mov	[ebp+var_120], edx
mov	eax, [ebp+var_11C]
mov	ecx, [ebp+var_120]
mov	edx, [eax+8]
cmp	edx, [ecx+8]
jnz	short loc_76F716
mov	eax, [ebp+var_11C]
mov	ecx, [ebp+var_120]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+0Ch]
jnz	short loc_76F716
mov	[ebp+var_124], 1
jmp	short loc_76F720

loc_76F716:
mov	[ebp+var_124], 0

loc_76F720:
mov	al, byte ptr [ebp+var_124]
jmp	loc_76FEE6

loc_76F72B:
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+arg_0]
mov	[ebp+var_128], eax
mov	[ebp+var_12C], ecx
mov	edx, [ebp+var_128]
mov	eax, [ebp+var_12C]
mov	ecx, [edx+8]
cmp	ecx, [eax+8]
jnz	short loc_76F774
mov	edx, [ebp+var_128]
mov	eax, [ebp+var_12C]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+0Ch]
jnz	short loc_76F774
mov	[ebp+var_130], 1
jmp	short loc_76F77E

loc_76F774:
mov	[ebp+var_130], 0

loc_76F77E:
mov	al, byte ptr [ebp+var_130]
jmp	loc_76FEE6

loc_76F789:
xor	al, al
jmp	loc_76FEE6

loc_76F790:		; jumptable 0076F440 case 7
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_134], eax
cmp	[ebp+var_134], 6
jz	short loc_76F7AF
cmp	[ebp+var_134], 7
jz	short loc_76F7EB
jmp	short loc_76F827

loc_76F7AF:
mov	ecx, [ebp+var_DC]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+8]
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_76F7D6
mov	[ebp+var_138], 1
jmp	short loc_76F7E0

loc_76F7D6:
mov	[ebp+var_138], 0

loc_76F7E0:
mov	al, byte ptr [ebp+var_138]
jmp	loc_76FEE6

loc_76F7EB:
mov	eax, [ebp+var_DC]
fld	dword ptr [eax+8]
mov	ecx, [ebp+arg_0]
fld	qword ptr [ecx+8]
fxch	st(1)
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_76F812
mov	[ebp+var_13C], 1
jmp	short loc_76F81C

loc_76F812:
mov	[ebp+var_13C], 0

loc_76F81C:
mov	al, byte ptr [ebp+var_13C]
jmp	loc_76FEE6

loc_76F827:
xor	al, al
jmp	loc_76FEE6

loc_76F82E:		; jumptable 0076F440 case 8
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_140], eax
cmp	[ebp+var_140], 6
jz	short loc_76F84D
cmp	[ebp+var_140], 7
jz	short loc_76F887
jmp	short loc_76F8C1

loc_76F84D:
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+8]
mov	edx, [ebp+var_DC]
fld	qword ptr [edx+8]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_76F872
mov	[ebp+var_144], 1
jmp	short loc_76F87C

loc_76F872:
mov	[ebp+var_144], 0

loc_76F87C:
mov	al, byte ptr [ebp+var_144]
jmp	loc_76FEE6

loc_76F887:
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+arg_0]
fld	qword ptr [ecx+8]
fld	qword ptr [eax+8]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_76F8AC
mov	[ebp+var_148], 1
jmp	short loc_76F8B6

loc_76F8AC:
mov	[ebp+var_148], 0

loc_76F8B6:
mov	al, byte ptr [ebp+var_148]
jmp	loc_76FEE6

loc_76F8C1:
xor	al, al
jmp	loc_76FEE6

loc_76F8C8:		; jumptable 0076F440 case 9
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_14C], eax
cmp	[ebp+var_14C], 8
jz	short loc_76F8EE
cmp	[ebp+var_14C], 9
jz	loc_76F9C7
jmp	loc_76FB97

loc_76F8EE:
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	edx, [edx]
cmp	edx, [ecx]
jnz	loc_76F9B2
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
add	ecx, 4
mov	[ebp+var_150], ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx+8]
add	eax, 4
mov	[ebp+var_154], eax

loc_76F928:
mov	ecx, [ebp+var_154]
mov	dl, [ecx]
mov	[ebp+var_155], dl
mov	eax, [ebp+var_150]
cmp	dl, [eax]
jnz	short loc_76F986
cmp	[ebp+var_155], 0
jz	short loc_76F97A
mov	ecx, [ebp+var_154]
mov	dl, [ecx+1]
mov	[ebp+var_156], dl
mov	eax, [ebp+var_150]
cmp	dl, [eax+1]
jnz	short loc_76F986
add	[ebp+var_154], 2
add	[ebp+var_150], 2
cmp	[ebp+var_156], 0
jnz	short loc_76F928

loc_76F97A:
mov	[ebp+var_15C], 0
jmp	short loc_76F991

loc_76F986:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_15C], ecx

loc_76F991:
mov	edx, [ebp+var_15C]
mov	[ebp+var_160], edx
cmp	[ebp+var_160], 0
jnz	short loc_76F9B2
mov	[ebp+var_164], 1
jmp	short loc_76F9BC

loc_76F9B2:
mov	[ebp+var_164], 0

loc_76F9BC:
mov	al, byte ptr [ebp+var_164]
jmp	loc_76FEE6

loc_76F9C7:
mov	eax, [ebp+var_DC]
mov	ecx, [eax+8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	ecx, [ecx]
cmp	ecx, [eax]
jnz	loc_76FB12
lea	edx, [ebp+var_29]
mov	[ebp+var_168], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_A0]
or	eax, 1
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_168]
push	ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx+8]
add	eax, 4
push	eax
lea	ecx, [ebp+var_28]
call	sub_407D30
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_A0]
or	ecx, 2
mov	[ebp+var_A0], ecx
lea	edx, [ebp+var_28]
push	edx
lea	eax, [ebp+var_54]
push	eax
call	sub_10EF240
add	esp, 8
mov	[ebp+var_A8], eax
mov	ecx, [ebp+var_A0]
or	ecx, 4
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_A8]
mov	eax, [edx+24h]
mov	[ebp+var_A4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
add	edx, 4
mov	[ebp+var_16C], edx
mov	eax, [ebp+var_A4]
mov	[ebp+var_170], eax

loc_76FA80:
mov	ecx, [ebp+var_170]
mov	dx, [ecx]
mov	[ebp+var_172], dx
mov	eax, [ebp+var_16C]
cmp	dx, [eax]
jnz	short loc_76FAE6
cmp	[ebp+var_172], 0
jz	short loc_76FADA
mov	ecx, [ebp+var_170]
mov	dx, [ecx+2]
mov	[ebp+var_174], dx
mov	eax, [ebp+var_16C]
cmp	dx, [eax+2]
jnz	short loc_76FAE6
add	[ebp+var_170], 4
add	[ebp+var_16C], 4
cmp	[ebp+var_174], 0
jnz	short loc_76FA80

loc_76FADA:
mov	[ebp+var_178], 0
jmp	short loc_76FAF1

loc_76FAE6:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_178], ecx

loc_76FAF1:
mov	edx, [ebp+var_178]
mov	[ebp+var_17C], edx
cmp	[ebp+var_17C], 0
jnz	short loc_76FB12
mov	[ebp+var_180], 1
jmp	short loc_76FB1C

loc_76FB12:
mov	[ebp+var_180], 0

loc_76FB1C:
mov	al, byte ptr [ebp+var_180]
mov	[ebp+var_D], al
mov	ecx, [ebp+var_A0]
and	ecx, 4
jz	short loc_76FB4A
and	[ebp+var_A0], 0FFFFFFFBh
mov	[ebp+var_4], 2
lea	ecx, [ebp+var_54]
call	sub_407E10
mov	byte ptr [ebp+var_4], 1

loc_76FB4A:
mov	[ebp+var_4], 0
mov	edx, [ebp+var_A0]
and	edx, 2
jz	short loc_76FB76
and	[ebp+var_A0], 0FFFFFFFDh
mov	[ebp+var_4], 3
lea	ecx, [ebp+var_28]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0

loc_76FB76:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_A0]
and	eax, 1
jz	short loc_76FB8F
and	[ebp+var_A0], 0FFFFFFFEh

loc_76FB8F:
mov	al, [ebp+var_D]
jmp	loc_76FEE6

loc_76FB97:
xor	al, al
jmp	loc_76FEE6

loc_76FB9E:		; jumptable 0076F440 case 10
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_184], edx
cmp	[ebp+var_184], 8
jz	short loc_76FBC4
cmp	[ebp+var_184], 9
jz	loc_76FD9A
jmp	loc_76FE78

loc_76FBC4:
mov	eax, [ebp+var_DC]
mov	ecx, [eax+8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	ecx, [ecx]
cmp	ecx, [eax]
jnz	loc_76FD12
lea	edx, [ebp+var_71]
mov	[ebp+var_188], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_A0]
or	eax, 8
mov	[ebp+var_A0], eax
mov	ecx, [ebp+var_188]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
add	eax, 4
push	eax
lea	ecx, [ebp+var_70]
call	sub_407D30
mov	[ebp+var_4], 5
mov	ecx, [ebp+var_A0]
or	ecx, 10h
mov	[ebp+var_A0], ecx
lea	edx, [ebp+var_70]
push	edx
lea	eax, [ebp+var_9C]
push	eax
call	sub_10EF240
add	esp, 8
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_A0]
or	ecx, 20h
mov	[ebp+var_A0], ecx
mov	edx, [ebp+var_C4]
mov	eax, [edx+24h]
mov	[ebp+var_C0], eax
mov	ecx, [ebp+var_C0]
mov	[ebp+var_18C], ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx+8]
add	eax, 4
mov	[ebp+var_190], eax

loc_76FC80:
mov	ecx, [ebp+var_190]
mov	dx, [ecx]
mov	[ebp+var_192], dx
mov	eax, [ebp+var_18C]
cmp	dx, [eax]
jnz	short loc_76FCE6
cmp	[ebp+var_192], 0
jz	short loc_76FCDA
mov	ecx, [ebp+var_190]
mov	dx, [ecx+2]
mov	[ebp+var_194], dx
mov	eax, [ebp+var_18C]
cmp	dx, [eax+2]
jnz	short loc_76FCE6
add	[ebp+var_190], 4
add	[ebp+var_18C], 4
cmp	[ebp+var_194], 0
jnz	short loc_76FC80

loc_76FCDA:
mov	[ebp+var_198], 0
jmp	short loc_76FCF1

loc_76FCE6:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_198], ecx

loc_76FCF1:
mov	edx, [ebp+var_198]
mov	[ebp+var_19C], edx
cmp	[ebp+var_19C], 0
jnz	short loc_76FD12
mov	[ebp+var_1A0], 1
jmp	short loc_76FD1C

loc_76FD12:
mov	[ebp+var_1A0], 0

loc_76FD1C:
mov	al, byte ptr [ebp+var_1A0]
mov	[ebp+var_55], al
mov	ecx, [ebp+var_A0]
and	ecx, 20h
jz	short loc_76FD4D
and	[ebp+var_A0], 0FFFFFFDFh
mov	[ebp+var_4], 6
lea	ecx, [ebp+var_9C]
call	sub_407E10
mov	byte ptr [ebp+var_4], 5

loc_76FD4D:
mov	[ebp+var_4], 4
mov	edx, [ebp+var_A0]
and	edx, 10h
jz	short loc_76FD79
and	[ebp+var_A0], 0FFFFFFEFh
mov	[ebp+var_4], 7
lea	ecx, [ebp+var_70]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 4

loc_76FD79:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_A0]
and	eax, 8
jz	short loc_76FD92
and	[ebp+var_A0], 0FFFFFFF7h

loc_76FD92:
mov	al, [ebp+var_55]
jmp	loc_76FEE6

loc_76FD9A:
mov	ecx, [ebp+var_DC]
mov	edx, [ecx+8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	edx, [edx]
cmp	edx, [ecx]
jnz	loc_76FE66
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
add	ecx, 4
mov	[ebp+var_1A4], ecx
mov	edx, [ebp+var_DC]
mov	eax, [edx+8]
add	eax, 4
mov	[ebp+var_1A8], eax

loc_76FDD4:
mov	ecx, [ebp+var_1A8]
mov	dx, [ecx]
mov	[ebp+var_1AA], dx
mov	eax, [ebp+var_1A4]
cmp	dx, [eax]
jnz	short loc_76FE3A
cmp	[ebp+var_1AA], 0
jz	short loc_76FE2E
mov	ecx, [ebp+var_1A8]
mov	dx, [ecx+2]
mov	[ebp+var_1AC], dx
mov	eax, [ebp+var_1A4]
cmp	dx, [eax+2]
jnz	short loc_76FE3A
add	[ebp+var_1A8], 4
add	[ebp+var_1A4], 4
cmp	[ebp+var_1AC], 0
jnz	short loc_76FDD4

loc_76FE2E:
mov	[ebp+var_1B0], 0
jmp	short loc_76FE45

loc_76FE3A:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp+var_1B0], ecx

loc_76FE45:
mov	edx, [ebp+var_1B0]
mov	[ebp+var_1B4], edx
cmp	[ebp+var_1B4], 0
jnz	short loc_76FE66
mov	[ebp+var_1B8], 1
jmp	short loc_76FE70

loc_76FE66:
mov	[ebp+var_1B8], 0

loc_76FE70:
mov	al, byte ptr [ebp+var_1B8]
jmp	short loc_76FEE6

loc_76FE78:
xor	al, al
jmp	short loc_76FEE6

loc_76FE7C:		; jumptable 0076F440 case 11
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_DC]
mov	edx, [eax]
cmp	edx, [ecx]
jnz	short loc_76FED2
mov	eax, [ebp+var_DC]
mov	ecx, [eax+8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	ecx, [ecx]
cmp	ecx, [eax]
jnz	short loc_76FED2
mov	edx, [ebp+var_DC]
mov	eax, [edx+8]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	edi, [edx+8]
add	edi, 4
mov	eax, [ebp+var_DC]
mov	esi, [eax+8]
add	esi, 4
xor	edx, edx
repe cmpsb
jnz	short loc_76FED2
mov	[ebp+var_1BC], 1
jmp	short loc_76FEDC

loc_76FED2:
mov	[ebp+var_1BC], 0

loc_76FEDC:
mov	al, byte ptr [ebp+var_1BC]
jmp	short loc_76FEE6

loc_76FEE4:		; default
xor	al, al

loc_76FEE6:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_76F3E0 endp

off_76FEF8 dd offset loc_76F447	; jump table for switch	statement
dd offset loc_76F447
dd offset loc_76F460
dd offset loc_76F4A5
dd offset loc_76F4FF
dd offset loc_76F5C6
dd offset loc_76F6AB
dd offset loc_76F790
dd offset loc_76F82E
dd offset loc_76F8C8
dd offset loc_76FB9E
dd offset loc_76FE7C
dd offset loc_76F559
align 10h


; Attributes: bp-based frame

sub_76FF30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 8
jz	short loc_76FF57
cmp	[ebp+var_14], 9
jz	short loc_76FF6E
cmp	[ebp+var_14], 0Ah
jz	short loc_76FF85
jmp	short loc_76FF9A
jmp	short loc_76FF9A

loc_76FF57:
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
jmp	short loc_76FF9A

loc_76FF6E:
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
jmp	short loc_76FF9A

loc_76FF85:
mov	edx, [ebp+var_10]
mov	eax, [edx+8]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_76FF9A:
mov	esp, ebp
pop	ebp
retn
sub_76FF30 endp

align 10h


; Attributes: bp-based frame

sub_76FFA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7768A0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_76FFD4
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 1
jnz	short loc_76FFD4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	[ecx], eax

loc_76FFD4:
mov	esp, ebp
pop	ebp
retn
sub_76FFA0 endp

align 10h


; Attributes: bp-based frame

sub_76FFE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7768A0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_770014
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 5
jnz	short loc_770014
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_4]
mov	al, [edx+4]
mov	[ecx], al

loc_770014:
mov	esp, ebp
pop	ebp
retn
sub_76FFE0 endp

align 10h


; Attributes: bp-based frame

sub_770020 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7768A0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_770054
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 3
jnz	short loc_770054
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_4]
fld	dword ptr [edx+4]
fstp	dword ptr [ecx]

loc_770054:
mov	esp, ebp
pop	ebp
retn
sub_770020 endp

align 10h
; [00000005 BYTES: COLLAPSED FUNCTION __initp_misc_winxfltr_0. PRESS KEYPAD "+"	TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_770070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7768A0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7700AC
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 6
jnz	short loc_7700AC
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_C]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [edx+4]
mov	[eax+4], edx

loc_7700AC:
mov	esp, ebp
pop	ebp
retn
sub_770070 endp

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+0Ch]
push	eax
mov	ecx, [ebp+10h]
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7768A0
add	esp, 0Ch
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jz	short loc_7700EC
mov	eax, [ebp-4]
cmp	dword ptr [eax], 7
jnz	short loc_7700EC
mov	ecx, [ebp-4]
mov	edx, [ecx+4]
mov	eax, [ebp+14h]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [edx+4]
mov	[eax+4], edx

loc_7700EC:
mov	esp, ebp
pop	ebp
retn


; Attributes: bp-based frame

sub_7700F0 proc	near

var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7768A0
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_770169
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 4
jz	short loc_770123
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 8
jnz	short loc_770169

loc_770123:
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_10], edx

loc_77013B:
mov	eax, [ebp+var_C]
mov	cl, [eax]
mov	[ebp+var_11], cl
add	[ebp+var_C], 1
cmp	[ebp+var_11], 0
jnz	short loc_77013B
mov	edx, [ebp+var_C]
sub	edx, [ebp+var_10]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_8]
add	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	ecx, [ebp+arg_C]
call	sub_403980

loc_770169:
mov	esp, ebp
pop	ebp
retn
sub_7700F0 endp

align 10h


; Attributes: bp-based frame

sub_770170 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_770170
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 70h
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7768A0
add	esp, 0Ch
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	loc_77025A
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 4
jz	short loc_7701C0
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx], 8
jnz	loc_77025A

loc_7701C0:
lea	edx, [ebp+var_29]
mov	[ebp+var_78], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_78]
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
push	edx
lea	ecx, [ebp+var_28]
call	sub_407D30
mov	byte ptr [ebp+var_4], 1
lea	eax, [ebp+var_28]
push	eax
lea	ecx, [ebp+var_54]
push	ecx
call	sub_10EF240
add	esp, 8
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
mov	[ebp+var_60], edx
mov	byte ptr [ebp+var_4], 2
mov	eax, [ebp+var_60]
cmp	eax, [ebp+arg_C]
jz	short loc_77022B
mov	ecx, [ebp+var_60]
mov	edx, [ecx+20h]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_60]
mov	ecx, [eax+24h]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+arg_C]
call	sub_403580

loc_77022B:
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_54]
call	sub_407E10
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_28]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh

loc_77025A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_770170 endp

align 10h


; Attributes: bp-based frame

sub_770270 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ecx+4]
mov	edx, [ebp+arg_8]
mov	eax, [ecx+eax*8+4]
mov	[edx], eax
pop	ebp
retn
sub_770270 endp

align 10h


; Attributes: bp-based frame

sub_770290 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ecx+4]
mov	edx, [ebp+arg_8]
mov	al, [ecx+eax*8+4]
mov	[edx], al
pop	ebp
retn
sub_770290 endp

align 10h


; Attributes: bp-based frame

sub_7702B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ecx+4]
mov	edx, [ebp+arg_8]
fld	dword ptr [ecx+eax*8+4]
fstp	dword ptr [edx]
pop	ebp
retn
sub_7702B0 endp

align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+0Ch]
mov	ecx, [eax+4]
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ecx+4]
fld	dword ptr [ecx+eax*8+4]
mov	edx, [ebp+10h]
fstp	qword ptr [edx]
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7702F0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ecx+4]
mov	edx, [ecx+eax*8+4]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [edx+4]
mov	[eax+4], edx
pop	ebp
retn
sub_7702F0 endp

align 10h


; Attributes: bp-based frame

sub_770320 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ecx+4]
mov	edx, [ecx+eax*8+4]
mov	eax, [ebp+arg_8]
mov	ecx, [edx]
mov	[eax], ecx
mov	edx, [edx+4]
mov	[eax+4], edx
pop	ebp
retn
sub_770320 endp

align 10h


; Attributes: bp-based frame

sub_770350 proc	near

var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ecx+4]
mov	edx, [ecx+eax*8+4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_C], ecx

loc_77037A:
mov	edx, [ebp+var_8]
mov	al, [edx]
mov	[ebp+var_D], al
add	[ebp+var_8], 1
cmp	[ebp+var_D], 0
jnz	short loc_77037A
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_4]
add	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
call	sub_403980
mov	esp, ebp
pop	ebp
retn
sub_770350 endp

align 10h


; Attributes: bp-based frame

sub_7703B0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_25=	byte ptr -25h
var_24=	byte ptr -24h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_7703B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 6Ch
lea	eax, [ebp+var_25]
mov	[ebp+var_74], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_74]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	ecx, [eax+edx*8+4]
push	ecx
lea	ecx, [ebp+var_24]
call	sub_407D30
mov	byte ptr [ebp+var_4], 1
lea	edx, [ebp+var_24]
push	edx
lea	eax, [ebp+var_50]
push	eax
call	sub_10EF240
add	esp, 8
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
mov	[ebp+var_5C], ecx
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_5C]
cmp	edx, [ebp+arg_8]
jz	short loc_770442
mov	eax, [ebp+var_5C]
mov	ecx, [eax+20h]
mov	[ebp+var_54], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx+24h]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	ecx, [ebp+arg_8]
call	sub_403580

loc_770442:
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+var_50]
call	sub_407E10
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+var_24]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_7703B0 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 20h
mov	dword ptr [ebp-4], 0
mov	dword ptr [ebp-8], 0
jmp	short loc_77049F

loc_770496:
mov	eax, [ebp-8]
add	eax, 1
mov	[ebp-8], eax

loc_77049F:
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [ebp-8]
cmp	eax, [edx]
jnb	loc_770530
mov	ecx, [ebp+0Ch]
mov	[ebp-0Ch], ecx
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [eax+8]
mov	edx, [ebp-8]
mov	eax, [ecx+edx*8+4]
mov	[ebp-10h], eax

loc_7704C7:
mov	ecx, [ebp-10h]
mov	dl, [ecx]
mov	[ebp-11h], dl
mov	eax, [ebp-0Ch]
cmp	dl, [eax]
jnz	short loc_770504
cmp	byte ptr [ebp-11h], 0
jz	short loc_7704FB
mov	ecx, [ebp-10h]
mov	dl, [ecx+1]
mov	[ebp-12h], dl
mov	eax, [ebp-0Ch]
cmp	dl, [eax+1]
jnz	short loc_770504
add	dword ptr [ebp-10h], 2
add	dword ptr [ebp-0Ch], 2
cmp	byte ptr [ebp-12h], 0
jnz	short loc_7704C7

loc_7704FB:
mov	dword ptr [ebp-18h], 0
jmp	short loc_77050C

loc_770504:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp-18h], ecx

loc_77050C:
mov	edx, [ebp-18h]
mov	[ebp-1Ch], edx
cmp	dword ptr [ebp-1Ch], 0
jnz	short loc_77052B
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [ecx+8]
mov	eax, [ebp-8]
mov	ecx, [edx+eax*8]
mov	[ebp-4], ecx
jmp	short loc_770530

loc_77052B:
jmp	loc_770496

loc_770530:
mov	edx, [ebp-4]
mov	[ebp-20h], edx
mov	eax, [ebp-20h]
sub	eax, 1
mov	[ebp-20h], eax
cmp	dword ptr [ebp-20h], 7 ; switch	8 cases
ja	short loc_770579 ; default
mov	ecx, [ebp-20h]
jmp	ds:off_770580[ecx*4] ; switch jump

loc_77054F:		; jumptable 00770548 cases 3,7
mov	eax, 8
jmp	short loc_77057C

loc_770556:		; jumptable 00770548 cases 0,1
mov	eax, 2
jmp	short loc_77057C

loc_77055D:		; jumptable 00770548 case 2
mov	eax, 6
jmp	short loc_77057C

loc_770564:		; jumptable 00770548 case 5
mov	eax, 4
jmp	short loc_77057C

loc_77056B:		; jumptable 00770548 case 6
mov	eax, 5
jmp	short loc_77057C

loc_770572:		; jumptable 00770548 case 4
mov	eax, 1
jmp	short loc_77057C

loc_770579:		; default
or	eax, 0FFFFFFFFh

loc_77057C:
mov	esp, ebp
pop	ebp
retn
off_770580 dd offset loc_770556	; jump table for switch	statement
dd offset loc_770556
dd offset loc_77055D
dd offset loc_77054F
dd offset loc_770572
dd offset loc_770564
dd offset loc_77056B
dd offset loc_77054F


; Attributes: bp-based frame

sub_7705A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ecx+4]
mov	edx, [ecx+eax*8]
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 8	; switch 9 cases
ja	short loc_7705F7 ; default
mov	eax, [ebp+var_4]
jmp	ds:off_770600[eax*4] ; switch jump

loc_7705C8:		; jumptable 007705C1 case 0
or	eax, 0FFFFFFFFh
jmp	short loc_7705FA

loc_7705CD:		; jumptable 007705C1 cases 4,8
mov	eax, 8
jmp	short loc_7705FA

loc_7705D4:		; jumptable 007705C1 cases 1,2
mov	eax, 2
jmp	short loc_7705FA

loc_7705DB:		; jumptable 007705C1 case 3
mov	eax, 6
jmp	short loc_7705FA

loc_7705E2:		; jumptable 007705C1 case 6
mov	eax, 4
jmp	short loc_7705FA

loc_7705E9:		; jumptable 007705C1 case 7
mov	eax, 5
jmp	short loc_7705FA

loc_7705F0:		; jumptable 007705C1 case 5
mov	eax, 1
jmp	short loc_7705FA

loc_7705F7:		; default
or	eax, 0FFFFFFFFh

loc_7705FA:
mov	esp, ebp
pop	ebp
retn
sub_7705A0 endp

align 10h
off_770600 dd offset loc_7705C8	; jump table for switch	statement
dd offset loc_7705D4
dd offset loc_7705D4
dd offset loc_7705DB
dd offset loc_7705CD
dd offset loc_7705F0
dd offset loc_7705E2
dd offset loc_7705E9
dd offset loc_7705CD
align 10h


; Attributes: bp-based frame

sub_770630 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_770630
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_14], 0
lea	eax, [ebp+var_D]
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	eax, [eax+8]
mov	ecx, [eax+edx*8+4]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_407D30
mov	edx, [ebp+var_14]
or	edx, 1
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_770630 endp

align 10h


; Attributes: bp-based frame

sub_7706A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx]
setnz	al
mov	esp, ebp
pop	ebp
retn	4
sub_7706A0 endp

align 10h
; [0000001B BYTES: COLLAPSED FUNCTION std::basic_string<char,std::char_traits<char>,std::allocator<char>>::const_iterator::operator++(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_7706E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_7706E0 endp

align 10h


; Attributes: bp-based frame

sub_770710 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_770710 endp

align 10h


; Attributes: bp-based frame

sub_770740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+0Ch]
xor	eax, eax
cmp	edx, [ecx+0Ch]
setnz	al
mov	esp, ebp
pop	ebp
retn	4
sub_770740 endp

align 10h


; Attributes: bp-based frame

sub_770760 proc	near

var_64=	dword ptr -64h
var_24=	dword ptr -24h

push	ebp
mov	ebp, esp
sub	esp, 64h
mov	[ebp+var_64], ecx
mov	[ebp+var_24], 0
mov	eax, [ebp+var_64]
cmp	dword ptr [eax], 0FFFFFFFFh
jnz	loc_770818

loc_77077C:
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_770794
mov	edx, [ebp+var_64]
mov	eax, [edx+0Ch]
mov	ecx, [ebp+var_64]
mov	edx, [eax+4]
mov	[ecx+0Ch], edx

loc_770794:
mov	eax, [ebp+var_64]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_7707DF
mov	ecx, [ebp+var_64]
mov	edx, [ecx+8]
mov	eax, [edx+4]
mov	ecx, [eax]
sub	ecx, 1
mov	edx, [ebp+var_64]
cmp	[edx+4], ecx
jnb	short loc_7707DF
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
add	ecx, 1
mov	edx, [ebp+var_64]
mov	[edx+4], ecx
mov	eax, [ebp+var_64]
mov	ecx, [eax+8]
mov	edx, [ecx+4]
mov	eax, [ebp+var_64]
mov	ecx, [eax+4]
mov	edx, [edx+4]
mov	eax, [ebp+var_64]
mov	ecx, [edx+ecx*4]
mov	[eax+0Ch], ecx
jmp	short loc_7707E1

loc_7707DF:
jmp	short loc_7707EA

loc_7707E1:
mov	edx, [ebp+var_64]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_77077C

loc_7707EA:
mov	eax, [ebp+var_64]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_770816
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_64]
mov	edx, [ecx+10h]
push	edx
call	sub_770E30
add	esp, 8
movzx	eax, al
test	eax, eax
jnz	loc_77077C

loc_770816:
jmp	short loc_77087A

loc_770818:
mov	ecx, 1
test	ecx, ecx
jz	short loc_77087A
mov	edx, [ebp+var_64]
mov	eax, [edx+0Ch]
mov	ecx, [ebp+var_64]
mov	edx, [eax+4]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_64]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_77084E
mov	ecx, [ebp+var_64]
mov	edx, [ecx+0Ch]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_64]
mov	eax, [ecx+4]
cmp	eax, [edx]
jnz	short loc_770878

loc_77084E:
mov	ecx, [ebp+var_64]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_770876
mov	edx, [ebp+var_64]
mov	eax, [edx+0Ch]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+10h]
push	eax
call	sub_770E30
add	esp, 8
movzx	ecx, al
test	ecx, ecx
jnz	short loc_770878

loc_770876:
jmp	short loc_77087A

loc_770878:
jmp	short loc_770818

loc_77087A:
mov	eax, [ebp+var_64]
mov	esp, ebp
pop	ebp
retn
sub_770760 endp

align 10h


; Attributes: bp-based frame

sub_770890 proc	near

var_80=	dword ptr -80h
var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 80h
mov	[ebp+var_80], ecx
mov	[ebp+var_40], 0
mov	[ebp+var_C], 0
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+arg_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_80]
cmp	dword ptr [ecx], 0
jz	loc_7709C3
mov	edx, [ebp+var_80]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_80]
mov	edx, [ecx]
push	edx
call	sub_770F40
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+arg_4], 0FFFFFFFFh
jz	short loc_770928
mov	[ebp+var_10], 0FFFFFFFFh
mov	eax, [ebp+var_80]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jz	short loc_770923
mov	edx, [ebp+var_80]
mov	eax, [edx+4]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_770E30
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_770923
lea	ecx, [ebp+var_14]
call	sub_770760

loc_770923:
jmp	loc_7709C3

loc_770928:
mov	[ebp+var_18], 0
jmp	short loc_77093A

loc_770931:
mov	ecx, [ebp+var_18]
add	ecx, 1
mov	[ebp+var_18], ecx

loc_77093A:
mov	edx, [ebp+var_80]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_18]
cmp	edx, [ecx]
jnb	short loc_7709C3
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	ecx, [ebp+var_18]
cmp	dword ptr [eax+ecx*4], 0
jz	short loc_7709BE
mov	edx, [ebp+var_80]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ecx+4]
mov	eax, [ebp+var_18]
mov	ecx, [edx+eax*4]
cmp	dword ptr [ecx], 0
jz	short loc_7709BE
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	ecx, [ebp+var_18]
mov	edx, [eax+ecx*4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	ecx, [ebp+var_18]
mov	edx, [eax+ecx*4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_770E30
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_7709BC
lea	ecx, [ebp+var_14]
call	sub_770760

loc_7709BC:
jmp	short loc_7709C3

loc_7709BE:
jmp	loc_770931

loc_7709C3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[eax+4], edx
mov	ecx, [ebp+var_C]
mov	[eax+8], ecx
mov	edx, [ebp+var_8]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_4]
mov	[eax+10h], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_770890 endp

align 10h


; Attributes: bp-based frame

sub_7709F0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_C], 0
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_8], 0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[eax+4], edx
mov	ecx, [ebp+var_C]
mov	[eax+8], ecx
mov	edx, [ebp+var_8]
mov	[eax+0Ch], edx
mov	ecx, [ebp+var_4]
mov	[eax+10h], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_7709F0 endp

align 10h


; Attributes: bp-based frame

sub_770A40 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
xor	ecx, ecx
cmp	dword ptr [eax+4], 0
setz	cl
mov	al, cl
mov	esp, ebp
pop	ebp
retn
sub_770A40 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	[ebp-4], ecx
mov	eax, [ebp-4]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp-4]
mov	dword ptr [ecx], 0
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_770A80 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 0FFFFFFFFh
jz	short loc_770ADF
mov	eax, [ebp+var_1C]
cmp	dword ptr [eax+4], 0
jz	short loc_770AD9
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_8], edx
mov	[ebp+var_4], 0

loc_770AA8:
cmp	[ebp+var_8], 0
jz	short loc_770AD2
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [edx+4]
cmp	eax, [ebp+arg_0]
jnz	short loc_770AC7
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_770AC7:
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ebp+var_8], eax
jmp	short loc_770AA8

loc_770AD2:
mov	eax, [ebp+var_4]
jmp	short loc_770B55
jmp	short loc_770ADD

loc_770AD9:
xor	eax, eax
jmp	short loc_770B55

loc_770ADD:
jmp	short loc_770B55

loc_770ADF:
mov	[ebp+var_C], 0
mov	[ebp+var_10], 0
jmp	short loc_770AF8

loc_770AEF:
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_10], ecx

loc_770AF8:
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
cmp	edx, [ecx]
jnb	short loc_770B52
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	ecx, [ebp+var_10]
cmp	dword ptr [eax+ecx*4], 0
jz	short loc_770B50
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
mov	ecx, [edx+eax*4]
mov	[ebp+var_18], ecx
mov	[ebp+var_14], 0

loc_770B36:
cmp	[ebp+var_18], 0
jz	short loc_770B50
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
jmp	short loc_770B36

loc_770B50:
jmp	short loc_770AEF

loc_770B52:
mov	eax, [ebp+var_C]

loc_770B55:
mov	esp, ebp
pop	ebp
retn	4
sub_770A80 endp

align 10h


; Attributes: bp-based frame

sub_770B60 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	edx, [eax]
xor	eax, eax
cmp	edx, [ecx+4]
setz	al
mov	esp, ebp
pop	ebp
retn
sub_770B60 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp-28h], ecx
mov	ecx, [ebp-28h]
call	sub_771090
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_770BA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
jmp	short loc_770BBC

loc_770BB3:
mov	edx, [ebp+var_4]
add	edx, 8
mov	[ebp+var_4], edx

loc_770BBC:
mov	eax, [ebp+var_10]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jz	short loc_770BF5
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [eax+4]
push	ecx		; char *
mov	edx, [ebp+var_C]
push	edx		; char *
call	__stricmp
add	esp, 8
test	eax, eax
jnz	short loc_770BF3
mov	al, 1
jmp	short loc_770BF7

loc_770BF3:
jmp	short loc_770BB3

loc_770BF5:
xor	al, al

loc_770BF7:
mov	esp, ebp
pop	ebp
retn	4
sub_770BA0 endp

align 10h


; Attributes: bp-based frame

sub_770C00 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	short loc_770C1E
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_770FF0

loc_770C1E:
mov	esp, ebp
pop	ebp
retn	4
sub_770C00 endp

align 10h


; Attributes: bp-based frame

sub_770C30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
jmp	short loc_770C68

loc_770C5F:
mov	edx, [ebp+var_C]
add	edx, 8
mov	[ebp+var_C], edx

loc_770C68:
mov	eax, [ebp+var_18]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_10]
jz	short loc_770CB0
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14h]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	ecx, [eax+4]
push	ecx		; char *
mov	edx, [ebp+var_14]
push	edx		; char *
call	__stricmp
add	esp, 8
test	eax, eax
jnz	short loc_770CAE
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
jmp	short loc_770CB0

loc_770CAE:
jmp	short loc_770C5F

loc_770CB0:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]
mov	[ecx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	8
sub_770C30 endp

align 10h


; Attributes: bp-based frame

sub_770CD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_770CD0 endp

align 10h


; Attributes: bp-based frame

sub_770D10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_770D10 endp

align 10h
; [00000011 BYTES: COLLAPSED FUNCTION std::basic_ios<wchar_t,std::char_traits<wchar_t>>::rdbuf(void). PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_770D70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76D010
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_770D95
push	2Ch
mov	ecx, [ebp+var_4]
push	ecx
call	sub_1111040
add	esp, 8

loc_770D95:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_770D70 endp

align 10h


; Attributes: bp-based frame

sub_770DA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_76D130
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_770DC3
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_770DC3:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_770DA0 endp

align 10h


; Attributes: bp-based frame

sub_770DD0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	ecx, [eax+20h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+24h]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+24h]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_C]
sar	eax, 1
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_10F1F20
add	esp, 0Ch
mov	eax, [ebp+var_4]
or	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn
sub_770DD0 endp

align 10h


; Attributes: bp-based frame

sub_770E30 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_770E30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 54h
mov	[ebp+var_30], 0
cmp	[ebp+arg_4], 0
jz	loc_770F28
cmp	[ebp+arg_0], 0FFFFFFFFh
jz	loc_770F28
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
cmp	dword ptr [ecx+edx*8+4], 0
jz	short loc_770ED6
lea	eax, [ebp+var_29]
mov	[ebp+var_5C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_30]
or	ecx, 1
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_5C]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+edx*8+4]
push	eax
lea	ecx, [ebp+var_28]
call	sub_407D30
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_30]
or	ecx, 2
mov	[ebp+var_30], ecx
lea	edx, [ebp+var_28]
push	edx
call	sub_401210
mov	ecx, eax
call	sub_A32EF0
movzx	eax, al
test	eax, eax
jnz	short loc_770ED6
mov	[ebp+var_60], 1
jmp	short loc_770EDD

loc_770ED6:
mov	[ebp+var_60], 0

loc_770EDD:
mov	cl, byte ptr [ebp+var_60]
mov	[ebp+var_D], cl
mov	[ebp+var_4], 0
mov	edx, [ebp+var_30]
and	edx, 2
jz	short loc_770F09
and	[ebp+var_30], 0FFFFFFFDh
mov	[ebp+var_4], 2
lea	ecx, [ebp+var_28]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0

loc_770F09:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_30]
and	eax, 1
jz	short loc_770F1C
and	[ebp+var_30], 0FFFFFFFEh

loc_770F1C:
movzx	ecx, [ebp+var_D]
test	ecx, ecx
jz	short loc_770F28
mov	al, 1
jmp	short loc_770F2A

loc_770F28:
xor	al, al

loc_770F2A:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_770E30 endp

align 10h


; Attributes: bp-based frame

sub_770F40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_4], 0
jmp	short loc_770F58

loc_770F4F:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_770F58:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
cmp	eax, [edx]
jnb	short loc_770FDA
mov	[ebp+var_8], offset aGate_version ; "gate_version"
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+8]
mov	ecx, [ebp+var_4]
mov	edx, [eax+ecx*8+4]
mov	[ebp+var_C], edx

loc_770F7D:
mov	eax, [ebp+var_C]
mov	cl, [eax]
mov	[ebp+var_D], cl
mov	edx, [ebp+var_8]
cmp	cl, [edx]
jnz	short loc_770FBA
cmp	[ebp+var_D], 0
jz	short loc_770FB1
mov	eax, [ebp+var_C]
mov	cl, [eax+1]
mov	[ebp+var_E], cl
mov	edx, [ebp+var_8]
cmp	cl, [edx+1]
jnz	short loc_770FBA
add	[ebp+var_C], 2
add	[ebp+var_8], 2
cmp	[ebp+var_E], 0
jnz	short loc_770F7D

loc_770FB1:
mov	[ebp+var_14], 0
jmp	short loc_770FC2

loc_770FBA:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh
mov	[ebp+var_14], eax

loc_770FC2:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
cmp	[ebp+var_18], 0
jnz	short loc_770FD5
mov	eax, [ebp+var_4]
jmp	short loc_770FDD
jmp	short loc_770FDA

loc_770FD5:
jmp	loc_770F4F

loc_770FDA:
or	eax, 0FFFFFFFFh

loc_770FDD:
mov	esp, ebp
pop	ebp
retn
sub_770F40 endp

align 10h


; Attributes: bp-based frame

sub_770FF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= word ptr	-5
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_14]
mov	edx, [eax+4]
cmp	edx, [ecx+8]
jz	short loc_771062
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
mov	[ebp+var_10], ecx
xor	edx, edx
mov	byte ptr [ebp+var_5+1],	dl
mov	al, byte ptr [ebp+var_5+1]
mov	byte ptr [ebp+var_3+1],	al
xor	ecx, ecx
mov	byte ptr [ebp+var_5], cl
mov	dl, byte ptr [ebp+var_5]
mov	byte ptr [ebp+var_3], dl
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_77104A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	ecx, [ebp+var_C]
mov	[ecx], edx
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
mov	[ebp+var_18], edx
jmp	short loc_771051

loc_77104A:
mov	[ebp+var_18], 0

loc_771051:
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
add	ecx, 8
mov	edx, [ebp+var_14]
mov	[edx+4], ecx
jmp	short loc_771082

loc_771062:
xor	eax, eax
mov	[ebp+var_1], al
push	1
push	1
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+4]
push	ecx
mov	ecx, [ebp+var_14]
call	sub_771300

loc_771082:
mov	esp, ebp
pop	ebp
retn	4
sub_770FF0 endp

align 10h


; Attributes: bp-based frame

sub_771090 proc	near

var_28=	dword ptr -28h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_28]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+var_4]
jnz	short loc_7710B4
jmp	short loc_7710CD

loc_7710B4:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_28]
call	sub_7710E0

loc_7710CD:
mov	esp, ebp
pop	ebp
retn
sub_771090 endp

align 10h


; Attributes: bp-based frame

sub_7710E0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, [ebp+arg_4]
mov	[ebp+var_C], eax
jz	short loc_77111E
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, [ebp+var_C]
mov	[ebp+var_20], eax
jmp	short loc_771124

loc_77111E:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx

loc_771124:
mov	edx, [ebp+var_20]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	[ebp+var_18], ecx
xor	edx, edx
mov	[ebp+var_11], dl
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_7710E0 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_771150(double)
sub_771150 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= qword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
sub	esp, 8
fld	[ebp+arg_0]
fstp	[esp+0Ch+var_C]
mov	eax, [ebp+var_4]
push	eax		; int
call	sub_490FB0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn	8
sub_771150 endp

align 10h


; Attributes: bp-based frame

sub_771180 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 0
jmp	short loc_771196

loc_77118D:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_771196:
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_7711A5
jmp	short loc_77118D

loc_7711A5:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_771260
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_771180 endp

align 10h


; Attributes: bp-based frame

sub_7711C0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	eax, [eax]
shl	eax, 1
mov	esp, ebp
pop	ebp
retn
sub_7711C0 endp

align 10h


; Attributes: bp-based frame

sub_7711E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 0
jmp	short loc_7711F6

loc_7711ED:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_7711F6:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
movzx	eax, word ptr [edx+ecx*2]
test	eax, eax
jz	short loc_771206
jmp	short loc_7711ED

loc_771206:
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_771B70
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_7711E0 endp

align 10h


; Attributes: bp-based frame

sub_771220 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+24h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+24h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
sub	eax, [ebp+var_8]
sar	eax, 1
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_771B70
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_771220 endp

align 10h


; Attributes: bp-based frame

sub_771260 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
add	ecx, 5
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	ecx, [ebp+var_8]
add	ecx, [ebp+arg_4]
mov	byte ptr [ecx+4], 0
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_771260 endp



; Attributes: bp-based frame

sub_7712C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
sub	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	sub_771260
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_7712C0 endp

align 10h


; Attributes: bp-based frame

sub_771300 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_21=	byte ptr -21h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0C0h
mov	[ebp+var_B8], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_B8]
call	sub_771960
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_40], ecx
xor	edx, edx
mov	[ebp+var_21], dl
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_40]
push	ecx
mov	ecx, [ebp+var_B8]
add	ecx, 8
call	sub_771AD0
mov	[ebp+var_8], eax
mov	edx, [ebp+var_B8]
mov	eax, [edx]
mov	[ebp+var_48], eax
mov	ecx, [ebp+arg_0]
sub	ecx, [ebp+var_48]
mov	[ebp+var_44], ecx
jz	short loc_77137A
mov	edx, [ebp+var_44]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, [ebp+var_44]
mov	[ebp+var_BC], eax
jmp	short loc_771383

loc_77137A:
mov	edx, [ebp+var_8]
mov	[ebp+var_BC], edx

loc_771383:
mov	eax, [ebp+var_BC]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	[ebp+var_50], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_4C], edx
jmp	short loc_7713AC

loc_77139A:
mov	eax, [ebp+var_50]
sub	eax, 1
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_4C]
add	ecx, 8
mov	[ebp+var_4C], ecx

loc_7713AC:
cmp	[ebp+var_50], 0
jbe	short loc_7713C4
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edx, [ebp+var_4C]
mov	[edx], eax
mov	[edx+4], ecx
jmp	short loc_77139A

loc_7713C4:
mov	eax, [ebp+var_4C]
mov	[ebp+var_C], eax
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_77141A
mov	edx, [ebp+var_B8]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+var_58]
sub	ecx, [ebp+arg_0]
mov	[ebp+var_54], ecx
jz	short loc_771408
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, [ebp+var_54]
mov	[ebp+var_C0], eax
jmp	short loc_771411

loc_771408:
mov	edx, [ebp+var_C]
mov	[ebp+var_C0], edx

loc_771411:
mov	eax, [ebp+var_C0]
mov	[ebp+var_C], eax

loc_77141A:
mov	ecx, [ebp+var_B8]
call	sub_771A40
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx*8]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B8]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_B8]
mov	ecx, [ebp+var_C]
mov	[eax+4], ecx
mov	edx, [ebp+var_B8]
mov	eax, [ebp+var_B4]
mov	[edx+8], eax
mov	esp, ebp
pop	ebp
retn	14h
sub_771300 endp



; Attributes: bp-based frame

sub_771460 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_74=	byte ptr -74h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_DC], ecx
push	1
push	8
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_D4]
call	sub_771BE0
mov	[ebp+var_4], 0
mov	[ebp+var_D], 0
lea	ecx, [ebp+var_D]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_771D30
movzx	edx, [ebp+var_D]
push	edx
mov	ecx, [ebp+var_DC]
call	sub_76E050
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_771CB0
lea	eax, [ebp+var_74]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	dword ptr [ecx], offset	off_144627C
mov	ecx, [ebp+var_D8]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_771460 endp



; Attributes: bp-based frame

sub_771500 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_74=	byte ptr -74h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_DC], ecx
push	1
push	8
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_D4]
call	sub_771BE0
mov	[ebp+var_4], 0
mov	[ebp+var_10], 0
lea	ecx, [ebp+var_10]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_5EB770
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_DC]
call	sub_76E080
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_771CB0
lea	eax, [ebp+var_74]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	dword ptr [ecx], offset	off_144627C
mov	ecx, [ebp+var_D8]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_771500 endp

align 10h


; Attributes: bp-based frame

sub_7715B0 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_74=	byte ptr -74h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_DC], ecx
push	1
push	8
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_D4]
call	sub_771BE0
mov	[ebp+var_4], 0
mov	[ebp+var_10], 0
lea	ecx, [ebp+var_10]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_771DB0
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+var_DC]
call	sub_76E0B0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_771CB0
lea	eax, [ebp+var_74]
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	dword ptr [ecx], offset	off_144627C
mov	ecx, [ebp+var_D8]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_7715B0 endp

align 10h


; Attributes: bp-based frame

sub_771660 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_74=	byte ptr -74h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_DC], ecx
push	1
push	8
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_D4]
call	sub_771BE0
mov	[ebp+var_4], 0
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0
lea	ecx, [ebp+var_14]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_771D90
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_76E120
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_771CB0
lea	ecx, [ebp+var_74]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_D8]
mov	dword ptr [edx], offset	off_144627C
mov	ecx, [ebp+var_D8]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_771660 endp

align 10h


; Attributes: bp-based frame

sub_771710 proc	near

var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_74=	byte ptr -74h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_DC], ecx
push	1
push	8
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_D4]
call	sub_771BE0
mov	[ebp+var_4], 0
mov	[ebp+var_14], 0
mov	[ebp+var_10], 0
lea	ecx, [ebp+var_14]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_771D70
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_76E160
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_771CB0
lea	ecx, [ebp+var_74]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_D8]
mov	dword ptr [edx], offset	off_144627C
mov	ecx, [ebp+var_D8]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_771710 endp

align 10h


; Attributes: bp-based frame

sub_7717C0 proc	near

var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_74=	byte ptr -74h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_DC], ecx
push	1
push	8
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_D4]
call	sub_771BE0
mov	[ebp+var_4], 0
movss	xmm0, ds:SrcStr
movss	[ebp+var_10], xmm0
lea	ecx, [ebp+var_10]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_5EB750
push	ecx
fld	[ebp+var_10]
fstp	[esp+0E0h+var_E0]
mov	ecx, [ebp+var_DC]
call	sub_76E1A0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_771CB0
lea	edx, [ebp+var_74]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D8]
mov	dword ptr [eax], offset	off_144627C
mov	ecx, [ebp+var_D8]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_7717C0 endp

align 10h


; Attributes: bp-based frame

sub_771870 proc	near

var_E4=	qword ptr -0E4h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	byte ptr -0D4h
var_74=	byte ptr -74h
var_14=	qword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771870
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0D0h
mov	[ebp+var_DC], ecx
push	1
push	8
mov	eax, [ebp+arg_0]
push	eax
lea	ecx, [ebp+var_D4]
call	sub_771BE0
mov	[ebp+var_4], 0
fldz
fstp	[ebp+var_14]
lea	ecx, [ebp+var_14]
push	ecx
lea	ecx, [ebp+var_D4]
call	sub_771D50
sub	esp, 8
fld	[ebp+var_14]
fstp	[esp+0E4h+var_E4]
mov	ecx, [ebp+var_DC]
call	sub_76E1E0
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_74]
call	sub_771CB0
lea	edx, [ebp+var_74]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_D8]
mov	dword ptr [eax], offset	off_144627C
mov	ecx, [ebp+var_D8]
call	sub_77EEB0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_771870 endp

align 10h


; Attributes: bp-based frame

sub_771920 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	ecx, [ebp+var_8]
add	ecx, 60h
call	sub_771CB0
mov	eax, [ebp+var_8]
add	eax, 60h
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_144627C
mov	ecx, [ebp+var_4]
call	sub_77EEB0
mov	esp, ebp
pop	ebp
retn
sub_771920 endp

align 10h


; Attributes: bp-based frame

sub_771960 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
sub	edx, [ecx]
sar	edx, 3
mov	[ebp+var_8], edx
mov	[ebp+var_C], 1FFFFFFFh
mov	[ebp+var_10], 1FFFFFFFh
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jnb	short loc_771998
mov	ecx, [ebp+var_10]
mov	[ebp+var_2C], ecx
jmp	short loc_77199E

loc_771998:
mov	edx, [ebp+var_C]
mov	[ebp+var_2C], edx

loc_77199E:
mov	eax, [ebp+var_2C]
sub	eax, [ebp+var_8]
cmp	[ebp+arg_0], eax
jbe	short loc_7719B1
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_7719B1:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_8]
jnb	short loc_7719C1
lea	edx, [ebp+var_8]
mov	[ebp+var_30], edx
jmp	short loc_7719C7

loc_7719C1:
lea	eax, [ebp+arg_0]
mov	[ebp+var_30], eax

loc_7719C7:
mov	ecx, [ebp+var_30]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
add	eax, [edx]
mov	[ebp+var_4], eax
mov	[ebp+var_18], 1FFFFFFFh
mov	[ebp+var_1C], 1FFFFFFFh
mov	ecx, [ebp+var_1C]
cmp	ecx, [ebp+var_18]
jnb	short loc_7719F6
mov	edx, [ebp+var_1C]
mov	[ebp+var_34], edx
jmp	short loc_7719FC

loc_7719F6:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax

loc_7719FC:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_34]
ja	short loc_771A0C
mov	edx, [ebp+var_4]
cmp	edx, [ebp+var_8]
jnb	short loc_771A36

loc_771A0C:
mov	[ebp+var_20], 1FFFFFFFh
mov	[ebp+var_24], 1FFFFFFFh
mov	eax, [ebp+var_24]
cmp	eax, [ebp+var_20]
jnb	short loc_771A2A
mov	ecx, [ebp+var_24]
mov	[ebp+var_38], ecx
jmp	short loc_771A30

loc_771A2A:
mov	edx, [ebp+var_20]
mov	[ebp+var_38], edx

loc_771A30:
mov	eax, [ebp+var_38]
mov	[ebp+var_4], eax

loc_771A36:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_771960 endp

align 10h


; Attributes: bp-based frame

sub_771A40 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_5C]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_5C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_50E7D0
add	esp, 8
mov	edx, [ebp+var_5C]
mov	eax, [ebp+var_5C]
mov	ecx, [edx+8]
sub	ecx, [eax]
sar	ecx, 3
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_5C]
mov	eax, [edx]
mov	[ebp+var_54], eax
cmp	[ebp+var_54], 0
jz	short loc_771AC9
mov	ecx, [ebp+var_58]
shl	ecx, 3
mov	[ebp+var_50], ecx
cmp	[ebp+var_50], 80h
jbe	short loc_771AB9
mov	edx, [ebp+var_54]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_771AC9

loc_771AB9:
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
call	sub_77E0D0
add	esp, 8

loc_771AC9:
mov	esp, ebp
pop	ebp
retn
sub_771A40 endp

align 10h


; Attributes: bp-based frame

sub_771AD0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 1FFFFFFFh
jbe	short loc_771B06
push	1
push	offset off_167E90C
lea	ecx, [ebp+var_14]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
mov	[ebp+var_14], offset off_1446194
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_771B06:
cmp	[ebp+arg_0], 0
jz	short loc_771B5A
mov	ecx, [ebp+arg_0]
shl	ecx, 3
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 80h
jbe	short loc_771B35
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_20], eax
jmp	short loc_771B44

loc_771B35:
lea	ecx, [ebp+var_4]
push	ecx
call	sub_77E150
add	esp, 4
mov	[ebp+var_20], eax

loc_771B44:
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
shr	eax, 3
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
mov	eax, [ebp+var_8]
jmp	short loc_771B5C

loc_771B5A:
xor	eax, eax

loc_771B5C:
mov	esp, ebp
pop	ebp
retn	8
sub_771AD0 endp

align 10h


; Attributes: bp-based frame

sub_771B70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
shl	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
add	ecx, 6
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
add	eax, 4
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
xor	ecx, ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[eax+edx*2+4], cx
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_771B70 endp

align 10h


; Attributes: bp-based frame

sub_771BE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771BE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	[ebp+var_10], 0
cmp	[ebp+arg_8], 0
jz	short loc_771C2F
mov	eax, [ebp+var_14]
mov	dword ptr [eax], offset	unk_14453E8
mov	ecx, [ebp+var_14]
add	ecx, 60h
call	sub_403170
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_10]
or	ecx, 1
mov	[ebp+var_10], ecx

loc_771C2F:
push	0
push	0
mov	ecx, [ebp+var_14]
call	sub_402E20
mov	[ebp+var_4], 1
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	dword ptr [edx+ecx], offset off_14453E4
mov	eax, [ebp+arg_4]
or	eax, 8
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_14]
add	ecx, 10h
call	sub_5B4C60
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_14]
add	edx, 10h
push	edx
mov	eax, [ebp+var_14]
mov	ecx, [eax]
mov	edx, [ebp+var_14]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4031E0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_771BE0 endp

align 10h


; Attributes: bp-based frame

sub_771CB0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771CB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 8
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [eax-60h]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	dword ptr [eax+edx-60h], offset	off_14453E4
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_14]
sub	ecx, 50h
call	sub_43EB90
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_14]
sub	ecx, 50h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx-10h]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
mov	dword ptr [edx+ecx-10h], offset	off_1446298
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_771CB0 endp

align 10h


; Attributes: bp-based frame

sub_771D30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_771E30
add	esp, 8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_771D30 endp



; Attributes: bp-based frame

sub_771D50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_772020
add	esp, 8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_771D50 endp



; Attributes: bp-based frame

sub_771D70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_772210
add	esp, 8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_771D70 endp



; Attributes: bp-based frame

sub_771D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_772400
add	esp, 8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_771D90 endp



; Attributes: bp-based frame

sub_771DB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_7725F0
add	esp, 8
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_771DB0 endp



; Attributes: bp-based frame

sub_771DD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
sub	eax, 60h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
add	ecx, 60h
call	sub_771CB0
mov	ecx, [ebp+var_8]
add	ecx, 60h
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx], offset	off_144627C
mov	ecx, [ebp+var_4]
call	sub_77EEB0
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_771E1E
mov	ecx, [ebp+var_C]
sub	ecx, 60h
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_771E1E:
mov	eax, [ebp+var_C]
sub	eax, 60h
mov	esp, ebp
pop	ebp
retn	4
sub_771DD0 endp

align 10h


; Attributes: bp-based frame

sub_771E30 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_771E30
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 70h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], 0
xor	eax, eax
jnz	short loc_771E8A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+8]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
and	eax, 1000h
jz	short loc_771E8A
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_51D5D0
add	esp, 4
mov	[ebp+var_71], al
jmp	short loc_771E99

loc_771E8A:
mov	edx, [ebp+arg_0]
push	edx
call	sub_4050F0
add	esp, 4
mov	[ebp+var_71], al

loc_771E99:
mov	al, [ebp+var_71]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_771FF7
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_771EC5
mov	[ebp+var_60], 0
jmp	short loc_771ED3

loc_771EC5:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
mov	[ebp+var_60], ecx

loc_771ED3:
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_48], eax
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_54]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	dword ptr [edx], 0
xor	eax, eax
neg	eax
sbb	eax, eax
add	eax, 1
mov	ecx, [ebp+var_3C]
mov	[ecx+6], al
mov	edx, [ebp+var_3C]
mov	byte ptr [edx+7], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_28], edx
xor	eax, eax
cmp	[ebp+var_40], 0
setz	al
mov	byte ptr [ebp+var_22], al
mov	byte ptr [ebp+var_22+1], 0
mov	[ebp+var_44], 0
mov	ecx, [ebp+var_44]
push	ecx
call	sub_7803A0
add	esp, 4
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_77FFD0
mov	[ebp+var_80], eax
mov	eax, [ebp+var_80]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp-24h]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
mov	edx, [eax+2Ch]
call	edx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_1C]
call	sub_77FF40
jmp	short loc_771FD6

loc_771FB5:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_771FDD
retn

loc_771FD6:
mov	[ebp+var_4], 0

loc_771FDD:
cmp	[ebp+var_18], 0
jz	short loc_771FF7
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_771FF7:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_771E30 endp

align 10h


; Attributes: bp-based frame

sub_772020 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_772020
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 70h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], 0
xor	eax, eax
jnz	short loc_77207A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+8]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
and	eax, 1000h
jz	short loc_77207A
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_51D5D0
add	esp, 4
mov	[ebp+var_71], al
jmp	short loc_772089

loc_77207A:
mov	edx, [ebp+arg_0]
push	edx
call	sub_4050F0
add	esp, 4
mov	[ebp+var_71], al

loc_772089:
mov	al, [ebp+var_71]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_7721E7
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_7720B5
mov	[ebp+var_60], 0
jmp	short loc_7720C3

loc_7720B5:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
mov	[ebp+var_60], ecx

loc_7720C3:
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_48], eax
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_54]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	dword ptr [edx], 0
xor	eax, eax
neg	eax
sbb	eax, eax
add	eax, 1
mov	ecx, [ebp+var_3C]
mov	[ecx+6], al
mov	edx, [ebp+var_3C]
mov	byte ptr [edx+7], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_28], edx
xor	eax, eax
cmp	[ebp+var_40], 0
setz	al
mov	byte ptr [ebp+var_22], al
mov	byte ptr [ebp+var_22+1], 0
mov	[ebp+var_44], 0
mov	ecx, [ebp+var_44]
push	ecx
call	sub_7803A0
add	esp, 4
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_77FFD0
mov	[ebp+var_80], eax
mov	eax, [ebp+var_80]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp-24h]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
mov	edx, [eax+14h]
call	edx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_1C]
call	sub_77FF40
jmp	short loc_7721C6

loc_7721A5:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_7721CD
retn

loc_7721C6:
mov	[ebp+var_4], 0

loc_7721CD:
cmp	[ebp+var_18], 0
jz	short loc_7721E7
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_7721E7:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_772020 endp

align 10h


; Attributes: bp-based frame

sub_772210 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_772210
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 70h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], 0
xor	eax, eax
jnz	short loc_77226A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+8]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
and	eax, 1000h
jz	short loc_77226A
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_51D5D0
add	esp, 4
mov	[ebp+var_71], al
jmp	short loc_772279

loc_77226A:
mov	edx, [ebp+arg_0]
push	edx
call	sub_4050F0
add	esp, 4
mov	[ebp+var_71], al

loc_772279:
mov	al, [ebp+var_71]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_7723D7
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_7722A5
mov	[ebp+var_60], 0
jmp	short loc_7722B3

loc_7722A5:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
mov	[ebp+var_60], ecx

loc_7722B3:
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_48], eax
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_54]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	dword ptr [edx], 0
xor	eax, eax
neg	eax
sbb	eax, eax
add	eax, 1
mov	ecx, [ebp+var_3C]
mov	[ecx+6], al
mov	edx, [ebp+var_3C]
mov	byte ptr [edx+7], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_28], edx
xor	eax, eax
cmp	[ebp+var_40], 0
setz	al
mov	byte ptr [ebp+var_22], al
mov	byte ptr [ebp+var_22+1], 0
mov	[ebp+var_44], 0
mov	ecx, [ebp+var_44]
push	ecx
call	sub_7803A0
add	esp, 4
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_77FFD0
mov	[ebp+var_80], eax
mov	eax, [ebp+var_80]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp-24h]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
mov	edx, [eax+4]
call	edx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_1C]
call	sub_77FF40
jmp	short loc_7723B6

loc_772395:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_7723BD
retn

loc_7723B6:
mov	[ebp+var_4], 0

loc_7723BD:
cmp	[ebp+var_18], 0
jz	short loc_7723D7
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_7723D7:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_772210 endp

align 10h


; Attributes: bp-based frame

sub_772400 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_772400
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 70h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], 0
xor	eax, eax
jnz	short loc_77245A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+8]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
and	eax, 1000h
jz	short loc_77245A
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_51D5D0
add	esp, 4
mov	[ebp+var_71], al
jmp	short loc_772469

loc_77245A:
mov	edx, [ebp+arg_0]
push	edx
call	sub_4050F0
add	esp, 4
mov	[ebp+var_71], al

loc_772469:
mov	al, [ebp+var_71]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_7725C7
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_772495
mov	[ebp+var_60], 0
jmp	short loc_7724A3

loc_772495:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
mov	[ebp+var_60], ecx

loc_7724A3:
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_48], eax
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_54]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	dword ptr [edx], 0
xor	eax, eax
neg	eax
sbb	eax, eax
add	eax, 1
mov	ecx, [ebp+var_3C]
mov	[ecx+6], al
mov	edx, [ebp+var_3C]
mov	byte ptr [edx+7], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_28], edx
xor	eax, eax
cmp	[ebp+var_40], 0
setz	al
mov	byte ptr [ebp+var_22], al
mov	byte ptr [ebp+var_22+1], 0
mov	[ebp+var_44], 0
mov	ecx, [ebp+var_44]
push	ecx
call	sub_7803A0
add	esp, 4
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_77FFD0
mov	[ebp+var_80], eax
mov	eax, [ebp+var_80]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp-24h]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
mov	edx, [eax+8]
call	edx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_1C]
call	sub_77FF40
jmp	short loc_7725A6

loc_772585:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_7725AD
retn

loc_7725A6:
mov	[ebp+var_4], 0

loc_7725AD:
cmp	[ebp+var_18], 0
jz	short loc_7725C7
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_7725C7:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_772400 endp

align 10h


; Attributes: bp-based frame

sub_7725F0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	byte ptr -30h
var_28=	dword ptr -28h
var_22=	word ptr -22h
var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_7725F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 70h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_18], 0
xor	eax, eax
jnz	short loc_77264A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+eax+8]
mov	[ebp+var_38], edx
mov	eax, [ebp+var_38]
and	eax, 1000h
jz	short loc_77264A
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_51D5D0
add	esp, 4
mov	[ebp+var_71], al
jmp	short loc_772659

loc_77264A:
mov	edx, [ebp+arg_0]
push	edx
call	sub_4050F0
add	esp, 4
mov	[ebp+var_71], al

loc_772659:
mov	al, [ebp+var_71]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_7727B7
mov	byte ptr [ebp+var_4], 1
cmp	[ebp+arg_0], 0
jnz	short loc_772685
mov	[ebp+var_60], 0
jmp	short loc_772693

loc_772685:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
add	ecx, [eax+4]
mov	[ebp+var_60], ecx

loc_772693:
lea	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_4325E0
mov	[ebp+var_78], eax
mov	eax, [ebp+var_78]
mov	[ebp+var_48], eax
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_54]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
mov	dword ptr [edx], 0
xor	eax, eax
neg	eax
sbb	eax, eax
add	eax, 1
mov	ecx, [ebp+var_3C]
mov	[ecx+6], al
mov	edx, [ebp+var_3C]
mov	byte ptr [edx+7], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+edx+58h]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_28], edx
xor	eax, eax
cmp	[ebp+var_40], 0
setz	al
mov	byte ptr [ebp+var_22], al
mov	byte ptr [ebp+var_22+1], 0
mov	[ebp+var_44], 0
mov	ecx, [ebp+var_44]
push	ecx
call	sub_7803A0
add	esp, 4
mov	[ebp+var_7C], eax
mov	edx, [ebp+var_7C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_77FFD0
mov	[ebp+var_80], eax
mov	eax, [ebp+var_80]
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_28]
mov	[ebp+var_5C], ecx
mov	edx, [ebp-24h]
mov	[ebp+var_58], edx
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_60]
push	edx
mov	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_5C]
push	eax
lea	ecx, [ebp+var_30]
push	ecx
mov	edx, [ebp+var_4C]
mov	eax, [edx]
mov	ecx, [ebp+var_4C]
mov	edx, [eax+20h]
call	edx
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_1C]
call	sub_77FF40
jmp	short loc_772796

loc_772775:
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
add	edx, [ecx+4]
mov	ecx, edx
call	sub_405360
mov	[ebp+var_4], 0
mov	eax, offset loc_77279D
retn

loc_772796:
mov	[ebp+var_4], 0

loc_77279D:
cmp	[ebp+var_18], 0
jz	short loc_7727B7
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+arg_0]
add	ecx, [edx+4]
call	sub_402D20

loc_7727B7:
mov	eax, [ebp+var_18]
mov	[ebp+var_34], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_7725F0 endp

align 10h


; Attributes: bp-based frame

sub_7727E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
mov	[ebp+var_C], eax
cmp	[ebp+arg_4], 0
jle	short loc_7727F8
cmp	[ebp+arg_0], 0
jnz	short loc_7727FF

loc_7727F8:
xor	eax, eax
jmp	loc_772945

loc_7727FF:
mov	ecx, [ebp+arg_4]
and	ecx, 3
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
sar	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_77281C

loc_772813:
mov	eax, [ebp+arg_4]
sub	eax, 1
mov	[ebp+arg_4], eax

loc_77281C:
cmp	[ebp+arg_4], 0
jle	short loc_772861
mov	ecx, [ebp+arg_0]
movzx	edx, word ptr [ecx]
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax+2]
shl	ecx, 0Bh
xor	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
shl	edx, 10h
xor	edx, [ebp+var_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_C]
shr	ecx, 0Bh
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
jmp	short loc_772813

loc_772861:
mov	edx, [ebp+var_4]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 1
jz	short loc_7728D7
cmp	[ebp+var_10], 2
jz	short loc_7728B1
cmp	[ebp+var_10], 3
jz	short loc_77287B
jmp	short loc_7728FA

loc_77287B:
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax]
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
shl	edx, 10h
xor	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+2]
shl	ecx, 12h
xor	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
shr	edx, 0Bh
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
jmp	short loc_7728FA

loc_7728B1:
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax]
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
shl	edx, 0Bh
xor	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
shr	eax, 11h
add	eax, [ebp+var_C]
mov	[ebp+var_C], eax
jmp	short loc_7728FA

loc_7728D7:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx]
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
shl	eax, 0Ah
xor	eax, [ebp+var_C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
shr	ecx, 1
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx

loc_7728FA:
mov	edx, [ebp+var_C]
shl	edx, 3
xor	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
shr	eax, 5
add	eax, [ebp+var_C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
shl	ecx, 4
xor	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
shr	edx, 11h
add	edx, [ebp+var_C]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
shl	eax, 19h
xor	eax, [ebp+var_C]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
shr	ecx, 6
add	ecx, [ebp+var_C]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]

loc_772945:
mov	esp, ebp
pop	ebp
retn
sub_7727E0 endp

align 10h


; Attributes: bp-based frame

sub_772950 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
sub	eax, 1
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_0]
shr	ecx, 1
or	ecx, [ebp+arg_0]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
shr	edx, 2
or	edx, [ebp+arg_0]
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
shr	eax, 4
or	eax, [ebp+arg_0]
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_0]
shr	ecx, 8
or	ecx, [ebp+arg_0]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
shr	edx, 10h
or	edx, [ebp+arg_0]
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
add	eax, 1
pop	ebp
retn
sub_772950 endp

align 10h


; Attributes: bp-based frame

sub_7729A0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
sub	eax, 1
and	eax, [ebp+arg_0]
pop	ebp
retn
sub_7729A0 endp

align 10h


; Attributes: bp-based frame

sub_7729B0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
add	eax, 3
and	eax, 0FFFFFFFCh
pop	ebp
retn
sub_7729B0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7729C0(int, char *Filename, char)
sub_7729C0 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
File= dword ptr	-4
arg_0= dword ptr  8
Filename= dword	ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 50h
mov	[ebp+var_38], 0
mov	[ebp+File], 0
push	offset Mode	; "rb"
mov	eax, [ebp+Filename]
push	eax		; Filename
lea	ecx, [ebp+File]
push	ecx		; File
call	_fopen_s
add	esp, 0Ch
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	loc_772A8F
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jz	short loc_772A4C
mov	edx, [ebp+var_1C]
mov	dword ptr [edx], offset	off_1573C00
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+4], 0
push	offset dword_1889590 ; lpAddend
call	ds:InterlockedIncrement
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx], offset	off_1573C08
mov	edx, [ebp+var_1C]
mov	dword ptr [edx+8], 0
mov	eax, [ebp+var_1C]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_1C]
mov	[ebp+var_48], ecx
jmp	short loc_772A53

loc_772A4C:
mov	[ebp+var_48], 0

loc_772A53:
mov	edx, [ebp+var_48]
mov	[ebp+var_18], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_772A7E
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_3C]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_772A7E:
mov	eax, [ebp+var_38]
or	eax, 1
mov	[ebp+var_38], eax
mov	eax, [ebp+arg_0]
jmp	loc_772C6E

loc_772A8F:		; int
push	2
push	0		; __int32
mov	ecx, [ebp+File]
push	ecx		; FILE *
call	_fseek
add	esp, 0Ch
mov	edx, [ebp+File]
push	edx		; FILE *
call	_ftell
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+File]
push	eax		; FILE *
call	_rewind
add	esp, 4
movzx	ecx, [ebp+arg_8]
neg	ecx
sbb	ecx, ecx
neg	ecx
add	ecx, [ebp+var_C]
push	ecx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_20], eax
mov	edx, [ebp+var_20]
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 0
jz	loc_772BD0
mov	eax, [ebp+File]
push	eax		; FILE *
mov	ecx, [ebp+var_C]
push	ecx		; size_t
push	1		; size_t
mov	edx, [ebp+var_14]
push	edx		; void *
call	_fread
add	esp, 10h
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_C]
jz	loc_772BBF
mov	ecx, [ebp+var_14]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_24]
push	edx		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4
mov	eax, [ebp+File]
push	eax		; FILE *
call	_fclose
add	esp, 4
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_2C], eax
cmp	[ebp+var_2C], 0
jz	short loc_772B7C
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx], offset	off_1573C00
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+4], 0
push	offset dword_1889590 ; lpAddend
call	ds:InterlockedIncrement
mov	eax, [ebp+var_2C]
mov	dword ptr [eax], offset	off_1573C08
mov	ecx, [ebp+var_2C]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_2C]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+var_2C]
mov	[ebp+var_4C], eax
jmp	short loc_772B83

loc_772B7C:
mov	[ebp+var_4C], 0

loc_772B83:
mov	ecx, [ebp+var_4C]
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_28]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 0
jz	short loc_772BAE
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_772BAE:
mov	edx, [ebp+var_38]
or	edx, 1
mov	[ebp+var_38], edx
mov	eax, [ebp+arg_0]
jmp	loc_772C6E

loc_772BBF:
movzx	eax, [ebp+arg_8]
test	eax, eax
jz	short loc_772BD0
mov	ecx, [ebp+var_14]
add	ecx, [ebp+var_10]
mov	byte ptr [ecx],	0

loc_772BD0:
mov	edx, [ebp+File]
push	edx		; FILE *
call	_fclose
add	esp, 4
push	10h
call	sub_11110D0
add	esp, 4
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 0
jz	short loc_772C30
mov	eax, [ebp+var_34]
mov	dword ptr [eax], offset	off_1573C00
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx+4], 0
push	offset dword_1889590 ; lpAddend
call	ds:InterlockedIncrement
mov	edx, [ebp+var_34]
mov	dword ptr [edx], offset	off_1573C08
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_14]
mov	[eax+8], ecx
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_C]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	[ebp+var_50], ecx
jmp	short loc_772C37

loc_772C30:
mov	[ebp+var_50], 0

loc_772C37:
mov	edx, [ebp+var_50]
mov	[ebp+var_30], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_30]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	short loc_772C62
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_772C62:
mov	eax, [ebp+var_38]
or	eax, 1
mov	[ebp+var_38], eax
mov	eax, [ebp+arg_0]

loc_772C6E:
mov	esp, ebp
pop	ebp
retn
sub_7729C0 endp

align 10h


; Attributes: bp-based frame

sub_772C80 proc	near

var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
jmp	short loc_772CA2

loc_772C99:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_772CA2:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
cmp	edx, [ecx]
jnb	short loc_772CFB
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
mov	edx, [ebp+var_8]
mov	eax, [ecx+edx*8+4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_14], ecx

loc_772CC5:
mov	edx, [ebp+var_10]
mov	al, [edx]
mov	[ebp+var_15], al
add	[ebp+var_10], 1
cmp	[ebp+var_15], 0
jnz	short loc_772CC5
mov	ecx, [ebp+var_10]
sub	ecx, [ebp+var_14]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 1
push	edx
call	sub_7729B0
add	esp, 4
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax+8]
mov	[ebp+var_4], edx
jmp	short loc_772C99

loc_772CFB:
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
add	edx, 1
mov	[ebp+var_24], edx

loc_772D0D:
mov	eax, [ebp+var_20]
mov	cl, [eax]
mov	[ebp+var_25], cl
add	[ebp+var_20], 1
cmp	[ebp+var_25], 0
jnz	short loc_772D0D
mov	edx, [ebp+var_20]
sub	edx, [ebp+var_24]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_2C]
add	eax, 1
push	eax
call	sub_7729B0
add	esp, 4
mov	ecx, [ebp+var_4]
lea	eax, [eax+ecx+0Ch]
mov	esp, ebp
pop	ebp
retn
sub_772C80 endp

align 10h


; Attributes: bp-based frame

sub_772D50 proc	near

var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
SizeInBytes= dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
Dst= dword ptr -24h
var_20=	dword ptr -20h
MaxCount= dword	ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
push	esi
mov	[ebp+var_34], ecx
mov	ecx, [ebp+var_34]
call	sub_772C80
push	eax		; size_t
call	_malloc
add	esp, 4
mov	[ebp+Dst], eax
mov	eax, [ebp+Dst]
mov	[ebp+var_10], eax
mov	ecx, [ebp+Dst]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
add	ecx, 1
mov	[ebp+var_3C], ecx

loc_772D96:
mov	edx, [ebp+var_38]
mov	al, [edx]
mov	[ebp+var_3D], al
add	[ebp+var_38], 1
cmp	[ebp+var_3D], 0
jnz	short loc_772D96
mov	ecx, [ebp+var_38]
sub	ecx, [ebp+var_3C]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
add	edx, 1
push	edx
call	sub_7729B0
add	esp, 4
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
push	eax
call	sub_7729B0
add	esp, 4
mov	[ebp+MaxCount],	eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
lea	ecx, [eax+edx*8+0Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
add	edx, [ebp+MaxCount]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_8]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
add	edx, 0Ch
mov	eax, [ebp+var_18]
mov	[eax+8], edx
mov	ecx, [ebp+Dst]
add	ecx, 0Ch
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_34]
mov	ecx, [eax]
mov	edx, [ebp+Dst]
lea	eax, [edx+ecx*8+0Ch]
mov	[ebp+Dst], eax
mov	ecx, [ebp+MaxCount]
push	ecx		; MaxCount
mov	edx, [ebp+var_34]
mov	eax, [edx+4]
push	eax		; Src
mov	ecx, [ebp+MaxCount]
push	ecx		; SizeInBytes
mov	edx, [ebp+Dst]
push	edx		; Dst
call	_strncpy_s
add	esp, 10h
mov	eax, [ebp+Dst]
add	eax, [ebp+MaxCount]
mov	[ebp+Dst], eax
mov	[ebp+var_28], 0
jmp	short loc_772E53

loc_772E4A:
mov	ecx, [ebp+var_28]
add	ecx, 1
mov	[ebp+var_28], ecx

loc_772E53:
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_28]
cmp	eax, [edx]
jnb	loc_772F08
mov	ecx, [ebp+var_34]
mov	edx, [ecx+8]
mov	eax, [ebp+var_28]
mov	ecx, [edx+eax*8+4]
mov	[ebp+var_48], ecx
mov	edx, [ebp+var_48]
add	edx, 1
mov	[ebp+var_4C], edx

loc_772E7A:
mov	eax, [ebp+var_48]
mov	cl, [eax]
mov	[ebp+var_4D], cl
add	[ebp+var_48], 1
cmp	[ebp+var_4D], 0
jnz	short loc_772E7A
mov	edx, [ebp+var_48]
sub	edx, [ebp+var_4C]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
add	eax, 1
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
push	ecx
call	sub_7729B0
add	esp, 4
mov	[ebp+SizeInBytes], eax
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	esi, [ebp+var_28]
mov	eax, [eax+esi*8]
mov	[edx+ecx*8], eax
mov	ecx, [ebp+var_28]
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
mov	[edx+ecx*8+4], eax
mov	ecx, [ebp+SizeInBytes]
push	ecx		; MaxCount
mov	edx, [ebp+var_34]
mov	eax, [edx+8]
mov	ecx, [ebp+var_28]
mov	edx, [eax+ecx*8+4]
push	edx		; Src
mov	eax, [ebp+SizeInBytes]
push	eax		; SizeInBytes
mov	ecx, [ebp+Dst]
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h
mov	edx, [ebp+Dst]
add	edx, [ebp+SizeInBytes]
mov	[ebp+Dst], edx
mov	eax, [ebp+var_C]
add	eax, [ebp+SizeInBytes]
mov	[ebp+var_C], eax
jmp	loc_772E4A

loc_772F08:
mov	eax, [ebp+var_10]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_772D50 endp

align 10h


; Attributes: bp-based frame

sub_772F20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[edx+4], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[edx+8], ecx
mov	[ebp+var_4], 0
jmp	short loc_772F59

loc_772F50:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_772F59:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
jnb	short loc_772F82
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*8+4]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+8]
mov	ecx, [ebp+var_4]
mov	[edx+ecx*8+4], eax
jmp	short loc_772F50

loc_772F82:
mov	esp, ebp
pop	ebp
retn	4
sub_772F20 endp

align 10h


; Attributes: bp-based frame

sub_772F90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esi, [eax]
mov	ecx, [ebp+var_4]
call	sub_772FB0
lea	eax, [eax+esi*8+8]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_772F90 endp

align 10h


; Attributes: bp-based frame

sub_772FB0 proc	near

var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
jmp	short loc_772FD2

loc_772FC9:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_772FD2:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
cmp	edx, [ecx]
jnb	loc_773075
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
cmp	dword ptr [ecx+edx*8], 4
jz	short loc_772FFE
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
cmp	dword ptr [ecx+edx*8], 8
jnz	short loc_773049

loc_772FFE:
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
mov	eax, [ecx+edx*8+4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_14], ecx

loc_773017:
mov	edx, [ebp+var_10]
mov	al, [edx]
mov	[ebp+var_15], al
add	[ebp+var_10], 1
cmp	[ebp+var_15], 0
jnz	short loc_773017
mov	ecx, [ebp+var_10]
sub	ecx, [ebp+var_14]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
add	edx, 1
push	edx
call	sub_7729B0
add	esp, 4
add	eax, [ebp+var_4]
mov	[ebp+var_4], eax
jmp	short loc_773070

loc_773049:
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
cmp	dword ptr [ecx+edx*8], 6
jz	short loc_773067
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
cmp	dword ptr [ecx+edx*8], 7
jnz	short loc_773070

loc_773067:
mov	eax, [ebp+var_4]
add	eax, 8
mov	[ebp+var_4], eax

loc_773070:
jmp	loc_772FC9

loc_773075:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_772FB0 endp

align 10h


; Attributes: bp-based frame

sub_773080 proc	near

var_30=	dword ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
MaxCount= dword	ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
Dst= dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 30h
push	esi
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_772F90
push	eax		; size_t
call	_malloc
add	esp, 4
mov	[ebp+Dst], eax
mov	eax, [ebp+Dst]
mov	[ebp+var_4], eax
mov	ecx, [ebp+Dst]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
mov	eax, [ebp+var_8]
mov	[eax+4], edx
mov	ecx, [ebp+Dst]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [ebp+Dst]
lea	edx, [ecx+eax*8+8]
mov	[ebp+Dst], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*8+8]
mov	[ebp+arg_0], eax
mov	[ebp+var_14], 0
jmp	short loc_7730F9

loc_7730F0:
mov	ecx, [ebp+var_14]
add	ecx, 1
mov	[ebp+var_14], ecx

loc_7730F9:
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_14]
cmp	eax, [edx]
jnb	loc_773242
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	esi, [ebp+var_14]
mov	edx, [edx+esi*8]
mov	[ecx+eax*8], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
cmp	dword ptr [ecx+edx*8], 4
jz	short loc_77313E
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
cmp	dword ptr [ecx+edx*8], 8
jnz	loc_7731CD

loc_77313E:
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	eax, [ecx+edx*8+4]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
add	ecx, 1
mov	[ebp+var_28], ecx

loc_773157:
mov	edx, [ebp+var_24]
mov	al, [edx]
mov	[ebp+var_29], al
add	[ebp+var_24], 1
cmp	[ebp+var_29], 0
jnz	short loc_773157
mov	ecx, [ebp+var_24]
sub	ecx, [ebp+var_28]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
add	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
call	sub_7729B0
add	esp, 4
mov	[ebp+MaxCount],	eax
mov	ecx, [ebp+MaxCount]
push	ecx		; MaxCount
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
mov	ecx, [ebp+var_14]
mov	edx, [eax+ecx*8+4]
push	edx		; Src
mov	eax, [ebp+MaxCount]
push	eax		; SizeInBytes
mov	ecx, [ebp+Dst]
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	[eax+edx*8+4], ecx
mov	edx, [ebp+Dst]
add	edx, [ebp+MaxCount]
mov	[ebp+Dst], edx
mov	eax, [ebp+arg_0]
add	eax, [ebp+MaxCount]
mov	[ebp+arg_0], eax
jmp	short loc_77323D

loc_7731CD:
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
cmp	dword ptr [edx+eax*8], 6
jz	short loc_7731EB
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
cmp	dword ptr [edx+eax*8], 7
jnz	short loc_773226

loc_7731EB:
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	ecx, [edx+eax*8+4]
mov	edx, [ebp+Dst]
mov	eax, [ecx]
mov	[edx], eax
mov	ecx, [ecx+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	[eax+edx*8+4], ecx
mov	edx, [ebp+Dst]
add	edx, 8
mov	[ebp+Dst], edx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+arg_0], eax
jmp	short loc_77323D

loc_773226:
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	ecx, [edx+eax*8+4]
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_C]
mov	[eax+edx*8+4], ecx

loc_77323D:
jmp	loc_7730F0

loc_773242:
mov	eax, [ebp+var_4]
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_773080 endp

align 10h


; Attributes: bp-based frame

sub_773250 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[edx+4], ecx
mov	[ebp+var_4], 0
jmp	short loc_77327A

loc_773271:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_77327A:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
jnb	short loc_7732DF
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
cmp	dword ptr [ecx+edx*8], 4
jz	short loc_7732C0
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
cmp	dword ptr [ecx+edx*8], 8
jz	short loc_7732C0
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
cmp	dword ptr [ecx+edx*8], 6
jz	short loc_7732C0
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
cmp	dword ptr [ecx+edx*8], 7
jnz	short loc_7732DD

loc_7732C0:
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*8+4]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	ecx, [ebp+var_4]
mov	[edx+ecx*8+4], eax

loc_7732DD:
jmp	short loc_773271

loc_7732DF:
mov	esp, ebp
pop	ebp
retn	4
sub_773250 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	[ebp-4], ecx
mov	ecx, [ebp-4]
call	sub_773310
add	eax, 4
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_773310 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	[ebp+var_8], 0
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_773328:
cmp	[ebp+var_4], 0
jz	short loc_77334D
mov	edx, [ebp+var_4]
mov	ecx, [edx]
call	sub_772F90
mov	ecx, [ebp+var_8]
lea	edx, [ecx+eax+8]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
jmp	short loc_773328

loc_77334D:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn
sub_773310 endp

align 10h


; Attributes: bp-based frame

sub_773360 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_773310
mov	[ebp+var_C], eax
mov	eax, [ebp+var_C]
push	eax		; size_t
call	_malloc
add	esp, 4
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_14]
add	edx, 8
mov	[ebp+var_14], edx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	[ebp+arg_0], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	[ebp+var_10], eax

loc_7733A9:
cmp	[ebp+var_10], 0
jz	loc_773446
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+var_4]
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	ecx, [ebp+var_10]
mov	ecx, [ecx]
call	sub_772F90
mov	[ebp+var_18], eax
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax]
call	sub_773080
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	ecx, [ebp+var_1C]
push	ecx		; void *
call	_free
add	esp, 4
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_773427
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_18]
mov	edx, [ebp+var_4]
mov	[edx+4], ecx
mov	eax, [ebp+var_14]
add	eax, [ebp+var_18]
mov	[ebp+var_4], eax

loc_773427:
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
lea	eax, [edx+ecx+8]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx+8]
mov	[ebp+arg_0], eax
jmp	loc_7733A9

loc_773446:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	4
sub_773360 endp

align 10h


; Attributes: bp-based frame

sub_773450 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_773461:
cmp	[ebp+var_4], 0
jz	short loc_7734B1
mov	edx, [ebp+var_4]
mov	eax, [edx]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[ecx], eax
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
call	sub_773250
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+4], 0FFFFFFFFh
jnz	short loc_773497
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
jmp	short loc_7734A6

loc_773497:
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[edx+4], ecx

loc_7734A6:
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
jmp	short loc_773461

loc_7734B1:
mov	esp, ebp
pop	ebp
retn	4
sub_773450 endp

align 10h


; Attributes: bp-based frame

sub_7734C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jnz	short loc_773500
push	8		; size_t
call	_malloc
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
jmp	short loc_77353C

loc_773500:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+4], 0
jz	short loc_773514
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
jmp	short loc_773500

loc_773514:		; size_t
push	8
call	_malloc
add	esp, 4
mov	ecx, [ebp+var_4]
mov	[ecx+4], eax
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	dword ptr [eax+4], 0

loc_77353C:
mov	esp, ebp
pop	ebp
retn	4
sub_7734C0 endp

align 10h


; Attributes: bp-based frame

sub_773550 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	esi
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	esi, [eax]
mov	ecx, [ebp+var_4]
call	sub_773570
lea	eax, [eax+esi*4+8]
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_773550 endp

align 10h


; Attributes: bp-based frame

sub_773570 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
jmp	short loc_773592

loc_773589:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_773592:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
cmp	edx, [ecx]
jnb	short loc_7735C4
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
cmp	dword ptr [ecx+edx*4], 0
jz	short loc_7735C2
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
lea	ecx, [ecx+edx*4]
call	sub_773310
add	eax, [ebp+var_4]
mov	[ebp+var_4], eax

loc_7735C2:
jmp	short loc_773589

loc_7735C4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_773570 endp

align 10h


; Attributes: bp-based frame

sub_7735D0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_20], ecx
mov	ecx, [ebp+var_20]
call	sub_773550
push	eax		; size_t
call	_malloc
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
add	edx, 8
mov	eax, [ebp+var_8]
mov	[eax+4], edx
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax*4+8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*4+8]
mov	[ebp+arg_0], eax
mov	[ebp+var_14], 0
jmp	short loc_773648

loc_77363F:
mov	ecx, [ebp+var_14]
add	ecx, 1
mov	[ebp+var_14], ecx

loc_773648:
mov	edx, [ebp+var_20]
mov	eax, [ebp+var_14]
cmp	eax, [edx]
jnb	loc_7736E4
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
cmp	dword ptr [edx+eax*4], 0
jnz	short loc_773670
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0FFFFFFFFh
jmp	short loc_7736D6

loc_773670:
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	ecx, [ebp+var_20]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
lea	ecx, [edx+eax*4]
call	sub_773310
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
mov	ecx, [ebp+var_14]
lea	ecx, [eax+ecx*4]
call	sub_773360
mov	[ebp+var_1C], eax
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	edx, [ebp+var_1C]
push	edx		; void *
call	_free
add	esp, 4
mov	eax, [ebp+var_10]
add	eax, [ebp+var_18]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_18]
mov	[ebp+arg_0], ecx

loc_7736D6:
mov	edx, [ebp+var_C]
add	edx, 4
mov	[ebp+var_C], edx
jmp	loc_77363F

loc_7736E4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_7735D0 endp

align 10h


; Attributes: bp-based frame

sub_7736F0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[edx+4], ecx
mov	[ebp+var_4], 0
jmp	short loc_77371A

loc_773711:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_77371A:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
jnb	short loc_773777
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
cmp	dword ptr [ecx+edx*4], 0FFFFFFFFh
jnz	short loc_773745
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
mov	dword ptr [ecx+edx*4], 0
jmp	short loc_773775

loc_773745:
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*4]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	ecx, [ebp+var_4]
mov	[edx+ecx*4], eax
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
lea	ecx, [ecx+edx*4]
call	sub_773450

loc_773775:
jmp	short loc_773711

loc_773777:
mov	esp, ebp
pop	ebp
retn	4
sub_7736F0 endp

align 10h


; Attributes: bp-based frame

sub_773780 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
jmp	short loc_7737A2

loc_773799:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7737A2:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
cmp	edx, [ecx]
jnb	short loc_7737DD
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
mov	ecx, [ecx+edx*8]
call	sub_772C80
add	eax, [ebp+var_4]
mov	[ebp+var_4], eax
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
mov	ecx, [ecx+edx*8+4]
call	sub_773550
add	eax, [ebp+var_4]
mov	[ebp+var_4], eax
jmp	short loc_773799

loc_7737DD:
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
lea	eax, [edx+ecx*8+8]
mov	esp, ebp
pop	ebp
retn
sub_773780 endp

align 10h


; Attributes: bp-based frame

sub_7737F0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	ecx, [ebp+var_2C]
call	sub_773780
push	eax		; size_t
call	_malloc
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 8
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_2C]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 8
mov	ecx, [ebp+var_4]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	eax, [edx]
mov	ecx, [ebp+var_10]
lea	edx, [ecx+eax*8+8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
lea	eax, [edx+ecx*8+8]
mov	[ebp+arg_0], eax
mov	[ebp+var_14], 0
jmp	short loc_773868

loc_77385F:
mov	ecx, [ebp+var_14]
add	ecx, 1
mov	[ebp+var_14], ecx

loc_773868:
mov	edx, [ebp+var_2C]
mov	eax, [ebp+var_14]
cmp	eax, [edx]
jnb	loc_773959
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	ecx, [edx+eax*8]
call	sub_772C80
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+4]
mov	eax, [ebp+var_14]
mov	ecx, [edx+eax*8+4]
call	sub_773550
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	ecx, [ecx+edx*8]
call	sub_772D50
mov	[ebp+var_20], eax
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+var_20]
push	eax		; void *
call	_free
add	esp, 4
mov	ecx, [ebp+var_28]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+var_10]
add	eax, [ebp+var_24]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_24]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_14]
mov	ecx, [ecx+edx*8+4]
call	sub_7735D0
mov	[ebp+var_18], eax
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+var_18]
push	eax		; void *
call	_free
add	esp, 4
mov	ecx, [ebp+var_28]
mov	edx, [ebp+arg_0]
mov	[ecx+4], edx
mov	eax, [ebp+var_10]
add	eax, [ebp+var_1C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+var_1C]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_8]
add	edx, 8
mov	[ebp+var_8], edx
jmp	loc_77385F

loc_773959:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn	4
sub_7737F0 endp

align 10h


; Attributes: bp-based frame

sub_773970 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[edx+4], ecx
mov	[ebp+var_4], 0
jmp	short loc_77399A

loc_773991:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_77399A:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
jnb	short loc_773A09
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*8]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+4]
mov	ecx, [ebp+var_4]
mov	[edx+ecx*8], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
mov	edx, [eax+ecx*8+4]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	eax, [ebp+var_4]
mov	[ecx+eax*8+4], edx
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	ecx, [ebp+var_4]
mov	ecx, [eax+ecx*8]
call	sub_772F20
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	edx, [ebp+var_4]
mov	ecx, [ecx+edx*8+4]
call	sub_7736F0
jmp	short loc_773991

loc_773A09:
mov	esp, ebp
pop	ebp
retn	4
sub_773970 endp

align 10h


; Attributes: bp-based frame

sub_773A10 proc	near

var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_91=	byte ptr -91h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0A4h
mov	[ebp+var_14], offset aAmp ; "&amp;"
mov	[ebp+var_10], offset aLt ; "&lt;"
mov	[ebp+var_C], offset aGt	; "&gt;"
mov	[ebp+var_8], offset aQuot ; "&quot;"
mov	[ebp+var_4], offset aApos ; "&apos;"
mov	[ebp+var_28], offset asc_155DDEC ; "&"
mov	[ebp+var_24], offset asc_154D93C ; "<"
mov	[ebp+var_20], offset asc_154D870 ; ">"
mov	[ebp+var_1C], offset asc_154D890 ; "\""
mov	[ebp+var_18], offset asc_154D8A0 ; "'"
mov	[ebp+var_2C], 0
jmp	short loc_773A71

loc_773A68:
mov	eax, [ebp+var_2C]
add	eax, 1
mov	[ebp+var_2C], eax

loc_773A71:
cmp	[ebp+var_2C], 5
jnb	loc_773BC9
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[ebp+var_34], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_34]
xor	eax, eax
cmp	edx, [ebp+var_38]
setz	al
movzx	ecx, al
test	ecx, ecx
jnz	loc_773BC4
mov	[ebp+var_30], 0

loc_773AAA:
mov	edx, [ebp+var_2C]
mov	eax, [ebp+edx*4+var_14]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_7C]
add	edx, 1
mov	[ebp+var_80], edx

loc_773AC3:
mov	eax, [ebp+var_7C]
mov	cl, [eax]
mov	[ebp+var_81], cl
add	[ebp+var_7C], 1
cmp	[ebp+var_81], 0
jnz	short loc_773AC3
mov	edx, [ebp+var_7C]
sub	edx, [ebp+var_80]
mov	[ebp+var_88], edx
mov	eax, [ebp+var_88]
push	eax
push	0
mov	ecx, [ebp+var_3C]
push	ecx
mov	ecx, [ebp+arg_0]
call	sub_43A9C0
mov	[ebp+var_30], eax
cmp	[ebp+var_30], 0FFFFFFFFh
jz	loc_773BC4
mov	edx, [ebp+var_2C]
mov	eax, [ebp+edx*4+var_14]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_8C]
add	ecx, 1
mov	[ebp+var_90], ecx

loc_773B25:
mov	edx, [ebp+var_8C]
mov	al, [edx]
mov	[ebp+var_91], al
add	[ebp+var_8C], 1
cmp	[ebp+var_91], 0
jnz	short loc_773B25
mov	ecx, [ebp+var_8C]
sub	ecx, [ebp+var_90]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_2C]
mov	eax, [ebp+edx*4+var_28]
mov	[ebp+var_78], eax
mov	ecx, [ebp+var_78]
mov	[ebp+var_98], ecx
mov	edx, [ebp+var_98]
add	edx, 1
mov	[ebp+var_9C], edx

loc_773B74:
mov	eax, [ebp+var_98]
mov	cl, [eax]
mov	[ebp+var_9D], cl
add	[ebp+var_98], 1
cmp	[ebp+var_9D], 0
jnz	short loc_773B74
mov	edx, [ebp+var_98]
sub	edx, [ebp+var_9C]
mov	[ebp+var_A4], edx
mov	eax, [ebp+var_A4]
push	eax
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+var_74]
push	edx
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_4385F0
jmp	loc_773AAA

loc_773BC4:
jmp	loc_773A68

loc_773BC9:
mov	esp, ebp
pop	ebp
retn
sub_773A10 endp

align 10h
push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset sub_12C8FEB
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
mov	eax, 10610h
call	__alloca_probe
mov	[ebp-1054Ch], ecx
mov	dword ptr [ebp-10358h],	0
push	1
mov	eax, [ebp+8]
push	eax
lea	ecx, [ebp-10100h]
push	ecx
call	off_167E910
add	esp, 0Ch
mov	[ebp-101E8h], eax
mov	edx, [ebp-101E8h]
mov	eax, [edx]
mov	[ebp-10h], eax
cmp	dword ptr [ebp-10h], 0
jz	short loc_773C48
mov	ecx, [ebp-10h]
mov	[ebp-101E4h], ecx
mov	edx, [ebp-101E4h]
add	edx, 4
push	edx
call	ds:InterlockedIncrement

loc_773C48:
mov	dword ptr [ebp-4], 0
cmp	dword ptr [ebp-10100h],	0
jz	short loc_773C8B
mov	eax, [ebp-10100h]
mov	[ebp-101ECh], eax
mov	ecx, [ebp-101ECh]
add	ecx, 4
push	ecx
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_773C8B
mov	edx, [ebp-101ECh]
mov	eax, [edx]
mov	ecx, [ebp-101ECh]
mov	edx, [eax+4]
call	edx

loc_773C8B:
cmp	dword ptr [ebp-10h], 0
jz	short loc_773CD3
mov	eax, [ebp-10h]
mov	[ebp-101F0h], eax
mov	ecx, [ebp-101F0h]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_773CBE
mov	edx, [ebp-101F0h]
cmp	dword ptr [edx+8], 0
jz	short loc_773CBE
mov	dword ptr [ebp-10550h],	0
jmp	short loc_773CC8

loc_773CBE:
mov	dword ptr [ebp-10550h],	1

loc_773CC8:
movzx	eax, byte ptr [ebp-10550h]
test	eax, eax
jz	short loc_773D25

loc_773CD3:
mov	dword ptr [ebp-10104h],	0FFFFFFFFh
mov	dword ptr [ebp-4], 0FFFFFFFFh
cmp	dword ptr [ebp-10h], 0
jz	short loc_773D1A
mov	ecx, [ebp-10h]
mov	[ebp-101F4h], ecx
mov	edx, [ebp-101F4h]
add	edx, 4
push	edx
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_773D1A
mov	eax, [ebp-101F4h]
mov	edx, [eax]
mov	ecx, [ebp-101F4h]
mov	eax, [edx+4]
call	eax

loc_773D1A:
mov	eax, [ebp-10104h]
jmp	loc_775110

loc_773D25:
mov	dword ptr [ebp-14h], 200h
push	200h
call	_malloc
add	esp, 4
mov	[ebp-1Ch], eax
push	200h
call	_malloc
add	esp, 4
mov	[ebp-20h], eax
lea	ecx, [ebp-1006Ch]
call	sub_776BC0
mov	byte ptr [ebp-4], 1
mov	ecx, [ebp-10h]
mov	[ebp-101FCh], ecx
mov	edx, [ebp-101FCh]
mov	eax, [edx+8]
mov	[ebp-10200h], eax
mov	ecx, [ebp-10200h]
push	ecx
lea	ecx, [ebp-1006Ch]
call	sub_777840
push	1
push	0
push	offset aDatabase ; "database"
lea	ecx, [ebp-1006Ch]
call	sub_776C70
mov	[ebp-18h], eax
push	1
push	0
push	0
mov	ecx, [ebp-18h]
call	sub_776C70
mov	[ebp-10070h], eax
jmp	short loc_773DC9

loc_773DB2:
push	1
push	0
push	0
mov	ecx, [ebp-10070h]
call	sub_776D40
mov	[ebp-10070h], eax

loc_773DC9:
cmp	dword ptr [ebp-10070h],	0
jz	loc_77509C
push	1
push	0
push	offset aName	; "name"
mov	ecx, [ebp-10070h]
call	sub_776E10
mov	[ebp-1007Ch], eax
mov	edx, [ebp-1007Ch]
cmp	dword ptr [edx+4], 0
jz	short loc_773E0D
mov	eax, [ebp-1007Ch]
mov	ecx, [eax+0Ch]
mov	[ebp-10554h], ecx
jmp	short loc_773E17

loc_773E0D:
mov	dword ptr [ebp-10554h],	0

loc_773E17:
mov	edx, [ebp-1007Ch]
cmp	dword ptr [edx+4], 0
jz	short loc_773E34
mov	eax, [ebp-1007Ch]
mov	ecx, [eax+4]
mov	[ebp-10558h], ecx
jmp	short loc_773E3E

loc_773E34:
mov	dword ptr [ebp-10558h],	offset unk_1857F78

loc_773E3E:
mov	edx, [ebp-10554h]
push	edx
mov	eax, [ebp-10558h]
push	eax
push	200h
mov	ecx, [ebp-20h]
push	ecx
call	_strncpy_s
add	esp, 10h
lea	edx, [ebp-20h]
push	edx
mov	ecx, [ebp-1054Ch]
call	sub_7779A0
lea	eax, [ebp-20h]
push	eax
mov	ecx, [ebp-1054Ch]
call	sub_77B4A0
mov	[ebp-10374h], eax
mov	ecx, [ebp-10374h]
mov	[ebp-10078h], ecx
mov	edx, [ebp-20h]
mov	[ebp-1037Ch], edx
mov	eax, [ebp-10078h]
add	eax, 28h
mov	[ebp-10378h], eax
mov	ecx, [ebp-1037Ch]
mov	[ebp-1055Ch], ecx
mov	edx, [ebp-1055Ch]
add	edx, 1
mov	[ebp-10560h], edx

loc_773EC0:
mov	eax, [ebp-1055Ch]
mov	cl, [eax]
mov	[ebp-10561h], cl
add	dword ptr [ebp-1055Ch],	1
cmp	byte ptr [ebp-10561h], 0
jnz	short loc_773EC0
mov	edx, [ebp-1055Ch]
sub	edx, [ebp-10560h]
mov	[ebp-10568h], edx
mov	eax, [ebp-1037Ch]
add	eax, [ebp-10568h]
push	eax
mov	ecx, [ebp-1037Ch]
push	ecx
mov	ecx, [ebp-10378h]
call	sub_403980
push	1
push	0
push	offset aColumns	; "columns"
mov	ecx, [ebp-10070h]
call	sub_776C70
mov	[ebp-10088h], eax
mov	dword ptr [ebp-10074h],	0
push	1
push	0
push	0
mov	ecx, [ebp-10088h]
call	sub_776C70
mov	[ebp-1008Ch], eax
jmp	short loc_773F63

loc_773F4C:
push	1
push	0
push	0
mov	ecx, [ebp-1008Ch]
call	sub_776D40
mov	[ebp-1008Ch], eax

loc_773F63:
cmp	dword ptr [ebp-1008Ch],	0
jz	loc_77461B
push	1
push	0
push	offset aName	; "name"
mov	ecx, [ebp-1008Ch]
call	sub_776E10
mov	[ebp-10094h], eax
push	1
push	0
push	offset aType	; "type"
mov	ecx, [ebp-1008Ch]
call	sub_776E10
mov	[ebp-10090h], eax
cmp	dword ptr [ebp-10094h],	0
jz	loc_774616
cmp	dword ptr [ebp-10090h],	0
jz	loc_774616
mov	edx, [ebp-10094h]
cmp	dword ptr [edx+4], 0
jz	short loc_773FDB
mov	eax, [ebp-10094h]
mov	ecx, [eax+0Ch]
mov	[ebp-1056Ch], ecx
jmp	short loc_773FE5

loc_773FDB:
mov	dword ptr [ebp-1056Ch],	0

loc_773FE5:
mov	edx, [ebp-10094h]
cmp	dword ptr [edx+4], 0
jz	short loc_774002
mov	eax, [ebp-10094h]
mov	ecx, [eax+4]
mov	[ebp-10570h], ecx
jmp	short loc_77400C

loc_774002:
mov	dword ptr [ebp-10570h],	offset unk_1857F78

loc_77400C:
mov	edx, [ebp-1056Ch]
push	edx
mov	eax, [ebp-10570h]
push	eax
push	200h
mov	ecx, [ebp-1Ch]
push	ecx
call	_strncpy_s
add	esp, 10h
mov	edx, [ebp-10090h]
cmp	dword ptr [edx+4], 0
jz	short loc_774048
mov	eax, [ebp-10090h]
mov	ecx, [eax+0Ch]
mov	[ebp-10574h], ecx
jmp	short loc_774052

loc_774048:
mov	dword ptr [ebp-10574h],	0

loc_774052:
mov	edx, [ebp-10090h]
cmp	dword ptr [edx+4], 0
jz	short loc_77406F
mov	eax, [ebp-10090h]
mov	ecx, [eax+4]
mov	[ebp-10578h], ecx
jmp	short loc_774079

loc_77406F:
mov	dword ptr [ebp-10578h],	offset unk_1857F78

loc_774079:
mov	edx, [ebp-10574h]
push	edx
mov	eax, [ebp-10578h]
push	eax
push	200h
mov	ecx, [ebp-20h]
push	ecx
call	_strncpy_s
add	esp, 10h
push	3
push	offset aInt_0	; "int"
mov	edx, [ebp-20h]
push	edx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7740BE
mov	dword ptr [ebp-10098h],	1
jmp	loc_774330

loc_7740BE:
push	3
push	offset aBit	; "bit"
mov	eax, [ebp-20h]
push	eax
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7740E4
mov	dword ptr [ebp-10098h],	5
jmp	loc_774330

loc_7740E4:
push	3
push	offset aReal	; "real"
mov	ecx, [ebp-20h]
push	ecx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_77410A
mov	dword ptr [ebp-10098h],	3
jmp	loc_774330

loc_77410A:
push	3
push	offset aFloat	; "float"
mov	edx, [ebp-20h]
push	edx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_774130
mov	dword ptr [ebp-10098h],	3
jmp	loc_774330

loc_774130:
push	3
push	offset aNvarchar ; "nvarchar"
mov	eax, [ebp-20h]
push	eax
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_774156
mov	dword ptr [ebp-10098h],	4
jmp	loc_774330

loc_774156:
push	3
push	offset aVarchar	; "varchar"
mov	ecx, [ebp-20h]
push	ecx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_77417C
mov	dword ptr [ebp-10098h],	4
jmp	loc_774330

loc_77417C:
push	3
push	offset aNchar	; "nchar"
mov	edx, [ebp-20h]
push	edx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7741A2
mov	dword ptr [ebp-10098h],	4
jmp	loc_774330

loc_7741A2:
push	3
push	offset aChar	; "char"
mov	eax, [ebp-20h]
push	eax
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7741C8
mov	dword ptr [ebp-10098h],	4
jmp	loc_774330

loc_7741C8:
push	3
push	offset aBigint	; "bigint"
mov	ecx, [ebp-20h]
push	ecx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7741EE
mov	dword ptr [ebp-10098h],	6
jmp	loc_774330

loc_7741EE:
push	3
push	offset aSmallint ; "smallint"
mov	edx, [ebp-20h]
push	edx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_774214
mov	dword ptr [ebp-10098h],	1
jmp	loc_774330

loc_774214:
push	3
push	offset aTinyint	; "tinyint"
mov	eax, [ebp-20h]
push	eax
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_77423A
mov	dword ptr [ebp-10098h],	1
jmp	loc_774330

loc_77423A:
push	3
push	offset aDatetime ; "datetime"
mov	ecx, [ebp-20h]
push	ecx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_774260
mov	dword ptr [ebp-10098h],	6
jmp	loc_774330

loc_774260:
push	3
push	offset aText	; "text"
mov	edx, [ebp-20h]
push	edx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_774286
mov	dword ptr [ebp-10098h],	8
jmp	loc_774330

loc_774286:
push	3
push	offset aImage	; "image"
mov	eax, [ebp-20h]
push	eax
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7742AC
mov	dword ptr [ebp-10098h],	0
jmp	loc_774330

loc_7742AC:
push	3
push	offset aXml	; "xml"
mov	ecx, [ebp-20h]
push	ecx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7742CF
mov	dword ptr [ebp-10098h],	8
jmp	short loc_774330

loc_7742CF:
mov	dword ptr [ebp-10108h],	0FFFFFFFFh
mov	byte ptr [ebp-4], 0
lea	ecx, [ebp-1003Ch]
call	sub_7771A0
mov	dword ptr [ebp-4], 0FFFFFFFFh
cmp	dword ptr [ebp-10h], 0
jz	short loc_774325
mov	edx, [ebp-10h]
mov	[ebp-103A8h], edx
mov	eax, [ebp-103A8h]
add	eax, 4
push	eax
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_774325
mov	ecx, [ebp-103A8h]
mov	edx, [ecx]
mov	ecx, [ebp-103A8h]
mov	eax, [edx+4]
call	eax

loc_774325:
mov	eax, [ebp-10108h]
jmp	loc_775110

loc_774330:
movzx	ecx, byte ptr [ebp+0Ch]
test	ecx, ecx
jnz	loc_77447B
mov	edx, [ebp-10098h]
mov	[ebp-103B4h], edx
mov	eax, [ebp-10074h]
mov	[ebp-103B0h], eax
lea	ecx, [ebp-103C0h]
mov	[ebp-103ACh], ecx
mov	edx, [ebp-103ACh]
mov	eax, [ebp-103B0h]
mov	[edx], eax
mov	ecx, [ebp-103ACh]
mov	edx, [ebp-103B4h]
mov	[ecx+4], edx
mov	eax, [ebp-1Ch]
mov	[ebp-103C4h], eax
mov	ecx, [ebp-103C4h]
mov	[ebp-10138h], ecx
lea	edx, [ebp-10134h]
mov	[ebp-103B8h], edx
mov	eax, [ebp-103B8h]
mov	ecx, [ebp-103C0h]
mov	[eax], ecx
mov	edx, [ebp-103B8h]
mov	eax, [ebp-103BCh]
mov	[edx+4], eax
lea	ecx, [ebp-10138h]
mov	[ebp-103D4h], ecx
lea	edx, [ebp-103C5h]
mov	[ebp-1057Ch], edx
mov	byte ptr [ebp-4], 2
mov	eax, [ebp-1057Ch]
push	eax
mov	ecx, [ebp-103D4h]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp-10128h]
call	sub_407D30
mov	byte ptr [ebp-4], 1
mov	eax, [ebp-103D4h]
add	eax, 4
mov	[ebp-103D0h], eax
lea	ecx, [ebp-10110h]
mov	[ebp-103CCh], ecx
mov	edx, [ebp-103CCh]
mov	eax, [ebp-103D0h]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp-103CCh]
mov	eax, [ebp-103D0h]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	byte ptr [ebp-4], 3
mov	edx, [ebp-10078h]
add	edx, 40h
mov	[ebp-103D8h], edx
lea	eax, [ebp-10128h]
push	eax
lea	ecx, [ebp-10140h]
push	ecx
mov	ecx, [ebp-103D8h]
call	sub_777510
mov	byte ptr [ebp-4], 1
mov	byte ptr [ebp-4], 4
lea	ecx, [ebp-10128h]
call	sub_4079F0
mov	byte ptr [ebp-4], 1
jmp	loc_774594

loc_77447B:
mov	edx, [ebp-10078h]
add	edx, 40h
mov	[ebp-103E0h], edx
lea	eax, [ebp-1Ch]
push	eax
mov	ecx, [ebp-103E0h]
call	sub_77B4A0
mov	[ebp-103DCh], eax
mov	ecx, [ebp-103DCh]
mov	[ebp-1009Ch], ecx
mov	edx, [ebp-10078h]
add	edx, 10h
mov	[ebp-103E4h], edx
mov	eax, [ebp-103E4h]
add	eax, 30h
mov	[ebp-10148h], eax
lea	ecx, [ebp-103F0h]
mov	[ebp-103ECh], ecx
mov	edx, [ebp-10148h]
mov	[ebp-103E8h], edx
mov	eax, [ebp-103ECh]
mov	ecx, [ebp-103E8h]
mov	[eax], ecx
mov	edx, [ebp-1009Ch]
xor	eax, eax
cmp	edx, [ebp-103F0h]
setz	al
mov	[ebp-1057Dh], al
movzx	ecx, byte ptr [ebp-1057Dh]
test	ecx, ecx
jnz	short loc_774533
mov	edx, [ebp-1009Ch]
mov	eax, [edx+2Ch]
cmp	eax, [ebp-10098h]
jnz	short loc_774533
mov	ecx, [ebp-1009Ch]
mov	edx, [ecx+28h]
cmp	edx, [ebp-10074h]
jz	short loc_774594

loc_774533:
mov	dword ptr [ebp-1014Ch],	0FFFFFFFFh
mov	byte ptr [ebp-4], 0
lea	ecx, [ebp-1003Ch]
call	sub_7771A0
mov	dword ptr [ebp-4], 0FFFFFFFFh
cmp	dword ptr [ebp-10h], 0
jz	short loc_774589
mov	eax, [ebp-10h]
mov	[ebp-103F4h], eax
mov	ecx, [ebp-103F4h]
add	ecx, 4
push	ecx
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_774589
mov	edx, [ebp-103F4h]
mov	eax, [edx]
mov	ecx, [ebp-103F4h]
mov	edx, [eax+4]
call	edx

loc_774589:
mov	eax, [ebp-1014Ch]
jmp	loc_775110

loc_774594:
cmp	dword ptr [ebp-10074h],	0
jnz	short loc_774607
cmp	dword ptr [ebp-10098h],	0
jnz	short loc_774607
mov	dword ptr [ebp-10150h],	0FFFFFFFFh
mov	byte ptr [ebp-4], 0
lea	ecx, [ebp-1003Ch]
call	sub_7771A0
mov	dword ptr [ebp-4], 0FFFFFFFFh
cmp	dword ptr [ebp-10h], 0
jz	short loc_7745FC
mov	eax, [ebp-10h]
mov	[ebp-103F8h], eax
mov	ecx, [ebp-103F8h]
add	ecx, 4
push	ecx
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_7745FC
mov	edx, [ebp-103F8h]
mov	eax, [edx]
mov	ecx, [ebp-103F8h]
mov	edx, [eax+4]
call	edx

loc_7745FC:
mov	eax, [ebp-10150h]
jmp	loc_775110

loc_774607:
mov	eax, [ebp-10074h]
add	eax, 1
mov	[ebp-10074h], eax

loc_774616:
jmp	loc_773F4C

loc_77461B:
mov	ecx, [ebp-10078h]
add	ecx, 10h
mov	[ebp-103FCh], ecx
mov	edx, [ebp-103FCh]
mov	eax, [edx+40h]
mov	[ebp-10400h], eax
mov	ecx, [ebp-10400h]
mov	[ebp-10084h], ecx
push	1
push	0
push	offset aRows	; "rows"
mov	ecx, [ebp-10070h]
call	sub_776C70
mov	[ebp-10080h], eax
push	1
push	0
push	0
mov	ecx, [ebp-10080h]
call	sub_776C70
mov	[ebp-100A0h], eax
jmp	short loc_77468F

loc_774678:
push	1
push	0
push	0
mov	ecx, [ebp-100A0h]
call	sub_776D40
mov	[ebp-100A0h], eax

loc_77468F:
cmp	dword ptr [ebp-100A0h],	0
jz	loc_775097
lea	edx, [ebp-10151h]
mov	[ebp-1041Ch], edx
mov	byte ptr [ebp-4], 5
mov	eax, [ebp-1041Ch]
push	eax
lea	ecx, [ebp-100ACh]
call	sub_5E0080
mov	byte ptr [ebp-4], 7
lea	ecx, [ebp-1041Dh]
mov	[ebp-10584h], ecx
mov	byte ptr [ebp-4], 8
mov	edx, [ebp-10584h]
push	edx
lea	ecx, [ebp-10178h]
call	sub_4022A0
mov	byte ptr [ebp-4], 7
mov	dword ptr [ebp-1017Ch],	0
mov	dword ptr [ebp-1015Ch],	0
lea	eax, [ebp-1017Ch]
mov	[ebp-10588h], eax
mov	byte ptr [ebp-4], 9
mov	ecx, [ebp-10588h]
push	ecx
mov	edx, [ebp-10084h]
push	edx
lea	ecx, [ebp-100ACh]
call	sub_777100
mov	byte ptr [ebp-4], 7
lea	eax, [ebp-10178h]
mov	[ebp-10430h], eax
mov	byte ptr [ebp-4], 0Ah
mov	ecx, [ebp-10430h]
call	sub_4079F0
mov	byte ptr [ebp-4], 7
lea	ecx, [ebp-1017Dh]
mov	[ebp-1058Ch], ecx
mov	byte ptr [ebp-4], 0Bh
mov	edx, [ebp-1058Ch]
push	edx
lea	ecx, [ebp-100C4h]
call	sub_4022A0
mov	byte ptr [ebp-4], 0Dh
push	1
push	0
push	0
mov	ecx, [ebp-100A0h]
call	sub_776E10
mov	[ebp-100C8h], eax
jmp	short loc_77479E

loc_774787:
push	1
push	0
push	0
mov	ecx, [ebp-100C8h]
call	sub_776EE0
mov	[ebp-100C8h], eax

loc_77479E:
cmp	dword ptr [ebp-100C8h],	0
jz	loc_774F56
lea	eax, [ebp-10449h]
mov	[ebp-10590h], eax
mov	byte ptr [ebp-4], 0Eh
mov	ecx, [ebp-10590h]
push	ecx
lea	ecx, [ebp-100F0h]
call	sub_4022A0
mov	byte ptr [ebp-4], 0Dh
mov	dword ptr [ebp-100F4h],	0
mov	dword ptr [ebp-100D4h],	0
mov	byte ptr [ebp-4], 0Fh
mov	edx, [ebp-100C8h]
cmp	dword ptr [edx], 0
jz	short loc_774805
mov	eax, [ebp-100C8h]
mov	ecx, [eax+8]
mov	[ebp-10594h], ecx
jmp	short loc_77480F

loc_774805:
mov	dword ptr [ebp-10594h],	0

loc_77480F:
mov	edx, [ebp-100C8h]
cmp	dword ptr [edx], 0
jz	short loc_77482A
mov	eax, [ebp-100C8h]
mov	ecx, [eax]
mov	[ebp-10598h], ecx
jmp	short loc_774834

loc_77482A:
mov	dword ptr [ebp-10598h],	offset unk_1857F78

loc_774834:
mov	edx, [ebp-10594h]
push	edx
mov	eax, [ebp-10598h]
push	eax
push	200h
mov	ecx, [ebp-1Ch]
push	ecx
call	_strncpy_s
add	esp, 10h
mov	edx, [ebp-10078h]
add	edx, 40h
mov	[ebp-10454h], edx
lea	eax, [ebp-1Ch]
push	eax
mov	ecx, [ebp-10454h]
call	sub_77B4A0
mov	[ebp-10450h], eax
mov	ecx, [ebp-10450h]
mov	[ebp-100F8h], ecx
mov	edx, [ebp-10078h]
add	edx, 10h
mov	[ebp-10458h], edx
mov	eax, [ebp-10458h]
add	eax, 30h
mov	[ebp-10188h], eax
lea	ecx, [ebp-10464h]
mov	[ebp-10460h], ecx
mov	edx, [ebp-10188h]
mov	[ebp-1045Ch], edx
mov	eax, [ebp-10460h]
mov	ecx, [ebp-1045Ch]
mov	[eax], ecx
mov	edx, [ebp-100F8h]
xor	eax, eax
cmp	edx, [ebp-10464h]
setnz	al
mov	[ebp-10599h], al
movzx	ecx, byte ptr [ebp-10599h]
test	ecx, ecx
jz	loc_774F2E
mov	edx, [ebp-100F8h]
mov	eax, [edx+2Ch]
mov	[ebp-105A0h], eax
mov	ecx, [ebp-105A0h]
sub	ecx, 1
mov	[ebp-105A0h], ecx
cmp	dword ptr [ebp-105A0h],	7 ; switch 8 cases
ja	loc_774E23	; default
mov	edx, [ebp-105A0h]
jmp	ds:off_775120[edx*4] ; switch jump

loc_774925:		; jumptable 0077491E cases 0,1
mov	eax, [ebp-100C8h]
cmp	dword ptr [eax+4], 0
jz	short loc_774942
mov	ecx, [ebp-100C8h]
mov	edx, [ecx+0Ch]
mov	[ebp-105A4h], edx
jmp	short loc_77494C

loc_774942:
mov	dword ptr [ebp-105A4h],	0

loc_77494C:
mov	eax, [ebp-100C8h]
cmp	dword ptr [eax+4], 0
jz	short loc_774969
mov	ecx, [ebp-100C8h]
mov	edx, [ecx+4]
mov	[ebp-105A8h], edx
jmp	short loc_774973

loc_774969:
mov	dword ptr [ebp-105A8h],	offset unk_1857F78

loc_774973:
mov	eax, [ebp-105A4h]
push	eax
mov	ecx, [ebp-105A8h]
push	ecx
push	200h
mov	edx, [ebp-20h]
push	edx
call	_strncpy_s
add	esp, 10h
mov	dword ptr [ebp-100F4h],	1
mov	eax, [ebp-20h]
push	eax
call	_atoi
add	esp, 4
mov	[ebp-100D4h], eax
jmp	loc_774E23	; default

loc_7749B3:		; jumptable 0077491E case 2
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_7749D0
mov	edx, [ebp-100C8h]
mov	eax, [edx+0Ch]
mov	[ebp-105ACh], eax
jmp	short loc_7749DA

loc_7749D0:
mov	dword ptr [ebp-105ACh],	0

loc_7749DA:
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_7749F7
mov	edx, [ebp-100C8h]
mov	eax, [edx+4]
mov	[ebp-105B0h], eax
jmp	short loc_774A01

loc_7749F7:
mov	dword ptr [ebp-105B0h],	offset unk_1857F78

loc_774A01:
mov	ecx, [ebp-105ACh]
push	ecx
mov	edx, [ebp-105B0h]
push	edx
push	200h
mov	eax, [ebp-20h]
push	eax
call	_strncpy_s
add	esp, 10h
mov	dword ptr [ebp-100F4h],	3
mov	ecx, [ebp-20h]
push	ecx
call	_atof
add	esp, 4
fstp	dword ptr [ebp-100D4h]
jmp	loc_774E23	; default

loc_774A41:		; jumptable 0077491E cases 3,7
mov	edx, [ebp-100F8h]
mov	eax, [edx+2Ch]
mov	[ebp-100F4h], eax
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774A6D
mov	edx, [ebp-100C8h]
mov	eax, [edx+0Ch]
mov	[ebp-105B4h], eax
jmp	short loc_774A77

loc_774A6D:
mov	dword ptr [ebp-105B4h],	0

loc_774A77:
cmp	dword ptr [ebp-105B4h],	200h
jnb	loc_774B6C
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774AA4
mov	edx, [ebp-100C8h]
mov	eax, [edx+0Ch]
mov	[ebp-105B8h], eax
jmp	short loc_774AAE

loc_774AA4:
mov	dword ptr [ebp-105B8h],	0

loc_774AAE:
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774ACB
mov	edx, [ebp-100C8h]
mov	eax, [edx+4]
mov	[ebp-105BCh], eax
jmp	short loc_774AD5

loc_774ACB:
mov	dword ptr [ebp-105BCh],	offset unk_1857F78

loc_774AD5:
mov	ecx, [ebp-105B8h]
push	ecx
mov	edx, [ebp-105BCh]
push	edx
push	200h
mov	eax, [ebp-20h]
push	eax
call	_strncpy_s
add	esp, 10h
mov	ecx, [ebp-20h]
mov	[ebp-10468h], ecx
mov	edx, [ebp-10468h]
mov	[ebp-105C0h], edx
mov	eax, [ebp-105C0h]
add	eax, 1
mov	[ebp-105C4h], eax

loc_774B18:
mov	ecx, [ebp-105C0h]
mov	dl, [ecx]
mov	[ebp-105C5h], dl
add	dword ptr [ebp-105C0h],	1
cmp	byte ptr [ebp-105C5h], 0
jnz	short loc_774B18
mov	eax, [ebp-105C0h]
sub	eax, [ebp-105C4h]
mov	[ebp-105CCh], eax
mov	ecx, [ebp-10468h]
add	ecx, [ebp-105CCh]
push	ecx
mov	edx, [ebp-10468h]
push	edx
lea	ecx, [ebp-100F0h]
call	sub_403980
jmp	loc_774CC0

loc_774B6C:
mov	eax, [ebp-100C8h]
cmp	dword ptr [eax+4], 0
jz	short loc_774B89
mov	ecx, [ebp-100C8h]
mov	edx, [ecx+0Ch]
mov	[ebp-105D0h], edx
jmp	short loc_774B93

loc_774B89:
mov	dword ptr [ebp-105D0h],	0

loc_774B93:
mov	eax, [ebp-105D0h]
add	eax, 1
push	eax
call	_malloc
add	esp, 4
mov	[ebp-100FCh], eax
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774BC8
mov	edx, [ebp-100C8h]
mov	eax, [edx+0Ch]
mov	[ebp-105D4h], eax
jmp	short loc_774BD2

loc_774BC8:
mov	dword ptr [ebp-105D4h],	0

loc_774BD2:
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774BEF
mov	edx, [ebp-100C8h]
mov	eax, [edx+4]
mov	[ebp-105D8h], eax
jmp	short loc_774BF9

loc_774BEF:
mov	dword ptr [ebp-105D8h],	offset unk_1857F78

loc_774BF9:
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774C16
mov	edx, [ebp-100C8h]
mov	eax, [edx+0Ch]
mov	[ebp-105DCh], eax
jmp	short loc_774C20

loc_774C16:
mov	dword ptr [ebp-105DCh],	0

loc_774C20:
mov	ecx, [ebp-105D4h]
push	ecx
mov	edx, [ebp-105D8h]
push	edx
mov	eax, [ebp-105DCh]
add	eax, 1
push	eax
mov	ecx, [ebp-100FCh]
push	ecx
call	_strncpy_s
add	esp, 10h
mov	edx, [ebp-100FCh]
mov	[ebp-105E0h], edx
mov	eax, [ebp-105E0h]
add	eax, 1
mov	[ebp-105E4h], eax

loc_774C62:
mov	ecx, [ebp-105E0h]
mov	dl, [ecx]
mov	[ebp-105E5h], dl
add	dword ptr [ebp-105E0h],	1
cmp	byte ptr [ebp-105E5h], 0
jnz	short loc_774C62
mov	eax, [ebp-105E0h]
sub	eax, [ebp-105E4h]
mov	[ebp-105ECh], eax
mov	ecx, [ebp-100FCh]
add	ecx, [ebp-105ECh]
push	ecx
mov	edx, [ebp-100FCh]
push	edx
lea	ecx, [ebp-100F0h]
call	sub_403980
mov	eax, [ebp-100FCh]
push	eax
call	_free
add	esp, 4

loc_774CC0:
lea	ecx, [ebp-100F0h]
push	ecx
call	sub_773A10
add	esp, 4
jmp	loc_774E23	; default

loc_774CD4:		; jumptable 0077491E case 4
mov	edx, [ebp-100C8h]
cmp	dword ptr [edx+4], 0
jz	short loc_774CF1
mov	eax, [ebp-100C8h]
mov	ecx, [eax+0Ch]
mov	[ebp-105F0h], ecx
jmp	short loc_774CFB

loc_774CF1:
mov	dword ptr [ebp-105F0h],	0

loc_774CFB:
mov	edx, [ebp-100C8h]
cmp	dword ptr [edx+4], 0
jz	short loc_774D18
mov	eax, [ebp-100C8h]
mov	ecx, [eax+4]
mov	[ebp-105F4h], ecx
jmp	short loc_774D22

loc_774D18:
mov	dword ptr [ebp-105F4h],	offset unk_1857F78

loc_774D22:
mov	edx, [ebp-105F0h]
push	edx
mov	eax, [ebp-105F4h]
push	eax
push	200h
mov	ecx, [ebp-20h]
push	ecx
call	_strncpy_s
add	esp, 10h
mov	dword ptr [ebp-100F4h],	5
push	5
push	offset aFalse	; "false"
mov	edx, [ebp-20h]
push	edx
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jz	short loc_774D79
push	1
push	offset a0	; "0"
mov	eax, [ebp-20h]
push	eax
call	__strnicmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_774D85

loc_774D79:
mov	dword ptr [ebp-100D4h],	0
jmp	short loc_774D8F

loc_774D85:
mov	dword ptr [ebp-100D4h],	1

loc_774D8F:		; default
jmp	loc_774E23

loc_774D94:		; jumptable 0077491E cases 5,6
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774DB1
mov	edx, [ebp-100C8h]
mov	eax, [edx+0Ch]
mov	[ebp-105F8h], eax
jmp	short loc_774DBB

loc_774DB1:
mov	dword ptr [ebp-105F8h],	0

loc_774DBB:
mov	ecx, [ebp-100C8h]
cmp	dword ptr [ecx+4], 0
jz	short loc_774DD8
mov	edx, [ebp-100C8h]
mov	eax, [edx+4]
mov	[ebp-105FCh], eax
jmp	short loc_774DE2

loc_774DD8:
mov	dword ptr [ebp-105FCh],	offset unk_1857F78

loc_774DE2:
mov	ecx, [ebp-105F8h]
push	ecx
mov	edx, [ebp-105FCh]
push	edx
push	200h
mov	eax, [ebp-20h]
push	eax
call	_strncpy_s
add	esp, 10h
mov	dword ptr [ebp-100F4h],	6
mov	ecx, [ebp-20h]
push	ecx
call	__atoi64
add	esp, 4
mov	[ebp-100D4h], eax
mov	[ebp-100D0h], edx

loc_774E23:		; default
mov	edx, [ebp-100F8h]
add	edx, 10h
mov	[ebp-1046Ch], edx
lea	eax, [ebp-100F4h]
push	eax
mov	ecx, [ebp-1046Ch]
mov	ecx, [ecx+18h]
imul	ecx, 28h
add	ecx, [ebp-100ACh]
call	sub_776AF0
mov	edx, [ebp-100F8h]
cmp	dword ptr [edx+28h], 0
jnz	loc_774F2E
mov	eax, [ebp-100F8h]
cmp	dword ptr [eax+2Ch], 4
jz	short loc_774E78
mov	ecx, [ebp-100F8h]
cmp	dword ptr [ecx+2Ch], 8
jnz	short loc_774EBB

loc_774E78:
lea	edx, [ebp-100F0h]
lea	eax, [ebp-100C4h]
cmp	edx, eax
jz	short loc_774EB9
mov	ecx, [ebp-100E0h]
mov	[ebp-10480h], ecx
mov	edx, [ebp-100DCh]
mov	[ebp-10484h], edx
mov	eax, [ebp-10480h]
push	eax
mov	ecx, [ebp-10484h]
push	ecx
lea	ecx, [ebp-100C4h]
call	sub_403980

loc_774EB9:
jmp	short loc_774F2E

loc_774EBB:
mov	edx, [ebp-20h]
mov	[ebp-10488h], edx
mov	eax, [ebp-10488h]
mov	[ebp-10600h], eax
mov	ecx, [ebp-10600h]
add	ecx, 1
mov	[ebp-10604h], ecx

loc_774EDF:
mov	edx, [ebp-10600h]
mov	al, [edx]
mov	[ebp-10605h], al
add	dword ptr [ebp-10600h],	1
cmp	byte ptr [ebp-10605h], 0
jnz	short loc_774EDF
mov	ecx, [ebp-10600h]
sub	ecx, [ebp-10604h]
mov	[ebp-1060Ch], ecx
mov	edx, [ebp-10488h]
add	edx, [ebp-1060Ch]
push	edx
mov	eax, [ebp-10488h]
push	eax
lea	ecx, [ebp-100C4h]
call	sub_403980

loc_774F2E:
mov	byte ptr [ebp-4], 0Dh
lea	ecx, [ebp-100F0h]
mov	[ebp-10494h], ecx
mov	byte ptr [ebp-4], 10h
mov	ecx, [ebp-10494h]
call	sub_4079F0
mov	byte ptr [ebp-4], 0Dh
jmp	loc_774787

loc_774F56:
sub	esp, 0Ch
mov	ecx, esp
mov	[ebp-101B0h], esp
lea	edx, [ebp-100ACh]
push	edx
call	sub_776FC0
mov	[ebp-10610h], eax
mov	eax, [ebp-10610h]
mov	[ebp-10614h], eax
mov	byte ptr [ebp-4], 11h
sub	esp, 18h
mov	ecx, esp
mov	[ebp-101B4h], esp
lea	edx, [ebp-100C4h]
push	edx
call	sub_403850
mov	[ebp-10618h], eax
lea	eax, [ebp-101D8h]
push	eax
mov	byte ptr [ebp-4], 0Dh
call	sub_777DF0
add	esp, 28h
mov	[ebp-1061Ch], eax
mov	ecx, [ebp-1061Ch]
mov	[ebp-104B0h], ecx
mov	byte ptr [ebp-4], 12h
mov	edx, [ebp-104B0h]
push	edx
lea	ecx, [ebp-101ACh]
call	sub_403850
mov	byte ptr [ebp-4], 13h
mov	eax, [ebp-104B0h]
add	eax, 18h
push	eax
lea	ecx, [ebp-10194h]
call	sub_776FC0
mov	byte ptr [ebp-4], 14h
mov	ecx, [ebp-10078h]
add	ecx, 58h
mov	[ebp-104B4h], ecx
lea	edx, [ebp-101ACh]
push	edx
lea	eax, [ebp-101DCh]
push	eax
mov	ecx, [ebp-104B4h]
call	sub_777780
mov	byte ptr [ebp-4], 15h
lea	ecx, [ebp-10194h]
call	sub_777080
mov	byte ptr [ebp-4], 12h
mov	byte ptr [ebp-4], 16h
lea	ecx, [ebp-101ACh]
call	sub_4079F0
mov	byte ptr [ebp-4], 12h
mov	byte ptr [ebp-4], 17h
lea	ecx, [ebp-101C0h]
call	sub_777080
mov	byte ptr [ebp-4], 0Dh
mov	byte ptr [ebp-4], 18h
lea	ecx, [ebp-101D8h]
call	sub_4079F0
mov	byte ptr [ebp-4], 0Dh
mov	byte ptr [ebp-4], 7
mov	byte ptr [ebp-4], 19h
lea	ecx, [ebp-100C4h]
call	sub_4079F0
mov	byte ptr [ebp-4], 7
mov	byte ptr [ebp-4], 1
lea	ecx, [ebp-100ACh]
call	sub_777080
jmp	loc_774678

loc_775097:
jmp	loc_773DB2

loc_77509C:
mov	ecx, [ebp-1Ch]
push	ecx
call	_free
add	esp, 4
mov	edx, [ebp-20h]
push	edx
call	_free
add	esp, 4
mov	dword ptr [ebp-101E0h],	0
mov	byte ptr [ebp-4], 0
lea	ecx, [ebp-1003Ch]
call	sub_7771A0
mov	dword ptr [ebp-4], 0FFFFFFFFh
cmp	dword ptr [ebp-10h], 0
jz	short loc_77510A
mov	eax, [ebp-10h]
mov	[ebp-10548h], eax
mov	ecx, [ebp-10548h]
add	ecx, 4
push	ecx
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_77510A
mov	edx, [ebp-10548h]
mov	eax, [edx]
mov	ecx, [ebp-10548h]
mov	edx, [eax+4]
call	edx

loc_77510A:
mov	eax, [ebp-101E0h]

loc_775110:
mov	ecx, [ebp-0Ch]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
off_775120 dd offset loc_774925	; jump table for switch	statement
dd offset loc_774925
dd offset loc_7749B3
dd offset loc_774A41
dd offset loc_774CD4
dd offset loc_774D94
dd offset loc_774D94
dd offset loc_774A41


; Attributes: bp-based frame

sub_775140 proc	near

var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20A= byte ptr -20Ah
var_209= byte ptr -209h
var_208= dword ptr -208h
var_203= byte ptr -203h
var_202= byte ptr -202h
var_201= byte ptr -201h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F5= byte ptr -1F5h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_164= dword ptr -164h
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_DE=	byte ptr -0DEh
var_DD=	byte ptr -0DDh
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_775140
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 20Ch
mov	[ebp+var_1F4], ecx
mov	[ebp+var_164], 0
mov	eax, [ebp+var_1F4]
mov	ecx, [eax+8]
mov	[ebp+var_C8], ecx
mov	edx, [ebp+var_C8]
mov	[ebp+var_10], edx
jmp	short loc_775197

loc_775188:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax

loc_775197:
mov	ecx, [ebp+var_1F4]
mov	[ebp+var_8C], ecx
lea	edx, [ebp+var_D4]
mov	[ebp+var_D0], edx
mov	eax, [ebp+var_8C]
mov	[ebp+var_CC], eax
mov	ecx, [ebp+var_D0]
mov	edx, [ebp+var_CC]
mov	[ecx], edx
mov	eax, [ebp+var_10]
xor	ecx, ecx
cmp	eax, [ebp+var_D4]
setnz	cl
mov	[ebp+var_1F5], cl
movzx	edx, [ebp+var_1F5]
test	edx, edx
jz	loc_7758F3
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_D8], eax
mov	ecx, [ebp+var_D8]
mov	edx, [ecx+58h]
mov	[ebp+var_DC], edx
mov	eax, [ebp+var_DC]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
push	ecx
call	sub_772950
add	esp, 4
mov	[ebp+var_20], eax
mov	[ebp+var_3C], 1
mov	[ebp+var_1C], 0
lea	edx, [ebp+var_DD]
mov	[ebp+var_1FC], edx
mov	[ebp+var_4], 0
lea	eax, [ebp+var_DE]
mov	[ebp+var_200], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_1FC]
push	ecx
mov	edx, [ebp+var_200]
push	edx
lea	ecx, [ebp+var_38]
call	sub_4AB340
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 2
mov	[ebp+var_18], 0
mov	[ebp+var_14], 0
mov	eax, [ebp+var_10]
mov	ecx, [eax+48h]
mov	[ebp+var_E4], ecx
mov	edx, [ebp+var_E4]
mov	[ebp+var_44], edx
jmp	short loc_7752AC

loc_77529D:
mov	eax, [ebp+var_44]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_44], eax

loc_7752AC:
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_E8], ecx
mov	edx, [ebp+var_E8]
add	edx, 30h
mov	[ebp+var_94], edx
lea	eax, [ebp+var_F4]
mov	[ebp+var_F0], eax
mov	ecx, [ebp+var_94]
mov	[ebp+var_EC], ecx
mov	edx, [ebp+var_F0]
mov	eax, [ebp+var_EC]
mov	[edx], eax
mov	ecx, [ebp+var_44]
xor	edx, edx
cmp	ecx, [ebp+var_F4]
setnz	dl
mov	[ebp+var_201], dl
movzx	eax, [ebp+var_201]
test	eax, eax
jz	short loc_775325
mov	ecx, [ebp+var_44]
cmp	dword ptr [ecx+28h], 0
jnz	short loc_775320
mov	edx, [ebp+var_44]
mov	eax, [edx+2Ch]
mov	[ebp+var_14], eax
jmp	short loc_775325

loc_775320:
jmp	loc_77529D

loc_775325:
cmp	[ebp+var_14], 4
jz	short loc_775341
cmp	[ebp+var_14], 8
jz	short loc_775341
cmp	[ebp+var_14], 6
jz	short loc_775341
cmp	[ebp+var_14], 7
jnz	loc_77558D

loc_775341:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+60h]
mov	[ebp+var_F8], edx
mov	eax, [ebp+var_F8]
mov	[ebp+var_48], eax
jmp	short loc_775367

loc_775358:
mov	ecx, [ebp+var_48]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_48], eax

loc_775367:
mov	edx, [ebp+var_10]
add	edx, 10h
mov	[ebp+var_FC], edx
mov	eax, [ebp+var_FC]
add	eax, 48h
mov	[ebp+var_9C], eax
lea	ecx, [ebp+var_108]
mov	[ebp+var_104], ecx
mov	edx, [ebp+var_9C]
mov	[ebp+var_100], edx
mov	eax, [ebp+var_104]
mov	ecx, [ebp+var_100]
mov	[eax], ecx
mov	edx, [ebp+var_48]
xor	eax, eax
cmp	edx, [ebp+var_108]
setnz	al
mov	[ebp+var_202], al
movzx	ecx, [ebp+var_202]
test	ecx, ecx
jz	loc_775576
mov	[ebp+var_50], 0
cmp	[ebp+var_14], 4
jz	short loc_7753E2
cmp	[ebp+var_14], 8
jnz	loc_77546F

loc_7753E2:
mov	edx, [ebp+var_48]
add	edx, 10h
mov	[ebp+var_10C], edx
mov	eax, [ebp+var_10C]
mov	ecx, [eax+18h]
mov	[ebp+var_110], ecx
xor	edx, edx
imul	edx, 28h
mov	eax, [ebp+var_110]
lea	ecx, [eax+edx+4]
call	sub_4042A0
mov	[ebp+var_114], eax
mov	ecx, [ebp+var_48]
add	ecx, 10h
mov	[ebp+var_118], ecx
mov	edx, [ebp+var_118]
mov	eax, [edx+18h]
mov	[ebp+var_11C], eax
xor	ecx, ecx
imul	ecx, 28h
mov	edx, [ebp+var_11C]
mov	eax, [edx+ecx+18h]
mov	[ebp+var_120], eax
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_114]
push	edx
mov	eax, [ebp+var_120]
push	eax
call	sub_7727E0
add	esp, 8
push	eax
call	sub_7729A0
add	esp, 8
mov	[ebp+var_50], eax
jmp	short loc_7754C1

loc_77546F:
mov	ecx, [ebp+var_48]
add	ecx, 10h
mov	[ebp+var_124], ecx
mov	edx, [ebp+var_124]
mov	eax, [edx+18h]
mov	[ebp+var_128], eax
xor	ecx, ecx
imul	ecx, 28h
mov	edx, [ebp+var_128]
mov	eax, [edx+ecx+20h]
mov	[ebp+var_5C], eax
mov	ecx, [edx+ecx+24h]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_20]
push	edx
push	8
lea	eax, [ebp+var_5C]
push	eax
call	sub_7727E0
add	esp, 8
push	eax
call	sub_7729A0
add	esp, 8
mov	[ebp+var_50], eax

loc_7754C1:
lea	ecx, [ebp+var_50]
push	ecx
lea	ecx, [ebp+var_38]
call	sub_4C6940
mov	[ebp+var_12C], eax
mov	edx, [ebp+var_12C]
mov	[ebp+var_4C], edx
lea	eax, [ebp+var_38]
mov	[ebp+var_A4], eax
lea	ecx, [ebp+var_138]
mov	[ebp+var_134], ecx
mov	edx, [ebp+var_A4]
mov	[ebp+var_130], edx
mov	eax, [ebp+var_134]
mov	ecx, [ebp+var_130]
mov	[eax], ecx
mov	edx, [ebp+var_4C]
xor	eax, eax
cmp	edx, [ebp+var_138]
setz	al
mov	[ebp+var_203], al
movzx	ecx, [ebp+var_203]
test	ecx, ecx
jz	short loc_77553E
lea	edx, [ebp+var_50]
push	edx
lea	ecx, [ebp+var_38]
call	sub_48DFD0
mov	dword ptr [eax], 1
jmp	short loc_775571

loc_77553E:
mov	eax, [ebp+var_4C]
add	eax, 14h
mov	[ebp+var_208], eax
mov	ecx, [ebp+var_208]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+var_208]
mov	[eax], edx
mov	ecx, [ebp+var_4C]
mov	edx, [ebp+var_3C]
cmp	edx, [ecx+14h]
jnb	short loc_775571
mov	eax, [ebp+var_4C]
mov	ecx, [eax+14h]
mov	[ebp+var_3C], ecx

loc_775571:
jmp	loc_775358

loc_775576:
mov	edx, [ebp+var_28]
mov	[ebp+var_174], edx
mov	eax, [ebp+var_174]
mov	[ebp+var_1C], eax
jmp	loc_7758B2

loc_77558D:
mov	[ebp+var_64], 0

loc_775594:
mov	ecx, 1
test	ecx, ecx
jz	loc_7758B2
lea	ecx, [ebp+var_38]
call	sub_5021C0
mov	edx, [ebp+var_10]
mov	eax, [edx+60h]
mov	[ebp+var_178], eax
mov	ecx, [ebp+var_178]
mov	[ebp+var_70], ecx
jmp	short loc_7755CF

loc_7755C0:
mov	edx, [ebp+var_70]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_70], eax

loc_7755CF:
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_17C], eax
mov	ecx, [ebp+var_17C]
add	ecx, 48h
mov	[ebp+var_AC], ecx
lea	edx, [ebp+var_188]
mov	[ebp+var_184], edx
mov	eax, [ebp+var_AC]
mov	[ebp+var_180], eax
mov	ecx, [ebp+var_184]
mov	edx, [ebp+var_180]
mov	[ecx], edx
mov	eax, [ebp+var_70]
xor	ecx, ecx
cmp	eax, [ebp+var_188]
setnz	cl
mov	[ebp+var_209], cl
movzx	edx, [ebp+var_209]
test	edx, edx
jz	loc_775722
mov	eax, [ebp+var_70]
add	eax, 10h
mov	[ebp+var_18C], eax
mov	ecx, [ebp+var_18C]
mov	edx, [ecx+18h]
mov	[ebp+var_190], edx
mov	eax, [ebp+var_20]
push	eax
xor	ecx, ecx
imul	ecx, 28h
mov	edx, [ebp+var_190]
mov	eax, [edx+ecx+20h]
push	eax
call	sub_7729A0
add	esp, 8
mov	[ebp+var_78], eax
lea	ecx, [ebp+var_78]
push	ecx
lea	ecx, [ebp+var_38]
call	sub_4C6940
mov	[ebp+var_194], eax
mov	edx, [ebp+var_194]
mov	[ebp+var_74], edx
lea	eax, [ebp+var_38]
mov	[ebp+var_B4], eax
lea	ecx, [ebp+var_1A0]
mov	[ebp+var_19C], ecx
mov	edx, [ebp+var_B4]
mov	[ebp+var_198], edx
mov	eax, [ebp+var_19C]
mov	ecx, [ebp+var_198]
mov	[eax], ecx
mov	edx, [ebp+var_74]
xor	eax, eax
cmp	edx, [ebp+var_1A0]
setz	al
mov	[ebp+var_20A], al
movzx	ecx, [ebp+var_20A]
test	ecx, ecx
jz	short loc_7756EA
lea	edx, [ebp+var_78]
push	edx
lea	ecx, [ebp+var_38]
call	sub_48DFD0
mov	dword ptr [eax], 1
jmp	short loc_77571D

loc_7756EA:
mov	eax, [ebp+var_74]
add	eax, 14h
mov	[ebp+var_210], eax
mov	ecx, [ebp+var_210]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+var_210]
mov	[eax], edx
mov	ecx, [ebp+var_74]
mov	edx, [ebp+var_3C]
cmp	edx, [ecx+14h]
jnb	short loc_77571D
mov	eax, [ebp+var_74]
mov	ecx, [eax+14h]
mov	[ebp+var_3C], ecx

loc_77571D:
jmp	loc_7755C0

loc_775722:
cmp	[ebp+var_64], 0
jnz	loc_7757F4
mov	edx, [ebp+var_28]
mov	[ebp+var_1DC], edx
mov	eax, [ebp+var_1DC]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+var_7C]
push	ecx
call	sub_772950
add	esp, 4
mov	[ebp+var_80], eax
mov	edx, [ebp+var_80]
cmp	edx, [ebp+var_20]
jz	short loc_77575B
cmp	[ebp+var_80], 1
jnz	short loc_775774

loc_77575B:
mov	eax, [ebp+var_28]
mov	[ebp+var_1E0], eax
mov	ecx, [ebp+var_1E0]
mov	[ebp+var_1C], ecx
jmp	loc_7758B2
jmp	short loc_7757EF

loc_775774:
mov	edx, [ebp+var_20]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_1E4], eax
mov	ecx, [ebp+var_1E4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_20]
shr	eax, 1
mov	[ebp+var_B8], eax
mov	[ebp+var_BC], 1
mov	ecx, [ebp+var_BC]
cmp	ecx, [ebp+var_B8]
jnb	short loc_7757C3
lea	edx, [ebp+var_B8]
mov	[ebp+var_214], edx
jmp	short loc_7757CF

loc_7757C3:
lea	eax, [ebp+var_BC]
mov	[ebp+var_214], eax

loc_7757CF:
mov	ecx, [ebp+var_214]
mov	[ebp+var_1E8], ecx
mov	edx, [ebp+var_1E8]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_64]
add	ecx, 1
mov	[ebp+var_64], ecx

loc_7757EF:
jmp	loc_7758AD

loc_7757F4:
mov	edx, [ebp+var_28]
mov	[ebp+var_1EC], edx
mov	eax, [ebp+var_1EC]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_6C]
cmp	ecx, [ebp+var_84]
ja	short loc_775825
cmp	[ebp+var_84], 1
jz	short loc_775825
mov	edx, [ebp+var_60]
cmp	edx, [ebp+var_3C]
jnb	short loc_77583B

loc_775825:
mov	eax, [ebp+var_68]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_60]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_6C]
mov	[ebp+var_1C], edx
jmp	short loc_7758B2
jmp	short loc_7758AD

loc_77583B:
mov	eax, [ebp+var_20]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_84]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_3C]
mov	[ebp+var_60], edx
mov	eax, [ebp+var_20]
shr	eax, 1
mov	[ebp+var_C0], eax
mov	[ebp+var_C4], 1
mov	ecx, [ebp+var_C4]
cmp	ecx, [ebp+var_C0]
jnb	short loc_775881
lea	edx, [ebp+var_C0]
mov	[ebp+var_218], edx
jmp	short loc_77588D

loc_775881:
lea	eax, [ebp+var_C4]
mov	[ebp+var_218], eax

loc_77588D:
mov	ecx, [ebp+var_218]
mov	[ebp+var_1F0], ecx
mov	edx, [ebp+var_1F0]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_64]
add	ecx, 1
mov	[ebp+var_64], ecx

loc_7758AD:
jmp	loc_775594

loc_7758B2:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_20]
mov	[edx+74h], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_3C]
mov	[ecx+70h], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_1C]
mov	[eax+78h], ecx
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 4
lea	ecx, [ebp+var_38]
call	sub_5021C0
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
jmp	loc_775188

loc_7758F3:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_775140 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 10Ch
mov	[ebp-108h], ecx
mov	ecx, [ebp-108h]
call	sub_775140
mov	eax, [ebp-108h]
mov	ecx, [eax+10h]
mov	[ebp-8Ch], ecx
mov	edx, [ebp-8Ch]
mov	[ebp-20h], edx
mov	dword ptr [ebp-18h], 0
mov	eax, [ebp-20h]
shl	eax, 3
push	eax
call	_malloc
add	esp, 4
mov	[ebp-1Ch], eax
mov	ecx, [ebp-108h]
mov	edx, [ecx+8]
mov	[ebp-90h], edx
mov	eax, [ebp-90h]
mov	[ebp-24h], eax
jmp	short loc_77598D

loc_775975:
mov	ecx, [ebp-24h]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp-24h], eax
mov	edx, [ebp-18h]
add	edx, 1
mov	[ebp-18h], edx

loc_77598D:
mov	eax, [ebp-108h]
mov	[ebp-70h], eax
lea	ecx, [ebp-9Ch]
mov	[ebp-98h], ecx
mov	edx, [ebp-70h]
mov	[ebp-94h], edx
mov	eax, [ebp-98h]
mov	ecx, [ebp-94h]
mov	[eax], ecx
mov	edx, [ebp-18h]
cmp	edx, [ebp-20h]
jnb	loc_775EA5
mov	eax, [ebp-18h]
mov	ecx, [ebp-1Ch]
lea	edx, [ecx+eax*8]
mov	[ebp-34h], edx
mov	eax, [ebp-24h]
add	eax, 28h
mov	[ebp-2Ch], eax
push	0Ch
call	_malloc
add	esp, 4
mov	ecx, [ebp-34h]
mov	[ecx], eax
mov	edx, [ebp-2Ch]
mov	eax, [edx+14h]
mov	[ebp-0A0h], eax
mov	ecx, [ebp-34h]
mov	edx, [ecx]
mov	eax, [ebp-0A0h]
mov	[edx+4], eax
mov	ecx, [ebp-2Ch]
mov	edx, [ecx+28h]
mov	[ebp-0A4h], edx
mov	eax, [ebp-34h]
mov	ecx, [eax]
mov	edx, [ebp-0A4h]
mov	[ecx], edx
mov	eax, [ebp-34h]
mov	ecx, [eax]
mov	edx, [ecx]
shl	edx, 3
push	edx
call	_malloc
add	esp, 4
mov	ecx, [ebp-34h]
mov	edx, [ecx]
mov	[edx+8], eax
mov	eax, [ebp-2Ch]
mov	ecx, [eax+20h]
mov	[ebp-0A8h], ecx
mov	edx, [ebp-0A8h]
mov	[ebp-3Ch], edx
jmp	short loc_775A5D

loc_775A4E:
mov	eax, [ebp-3Ch]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp-3Ch], eax

loc_775A5D:
mov	ecx, [ebp-2Ch]
add	ecx, 18h
mov	[ebp-74h], ecx
mov	edx, [ebp-3Ch]
xor	eax, eax
cmp	edx, [ebp-74h]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_775AD6
mov	edx, [ebp-3Ch]
add	edx, 10h
mov	[ebp-0ACh], edx
mov	eax, [ebp-0ACh]
mov	ecx, [eax+14h]
mov	[ebp-0B0h], ecx
mov	edx, [ebp-34h]
mov	eax, [edx]
mov	ecx, [ebp-3Ch]
mov	edx, [ecx+28h]
mov	eax, [eax+8]
mov	ecx, [ebp-0B0h]
mov	[eax+edx*8+4], ecx
mov	edx, [ebp-3Ch]
add	edx, 10h
mov	[ebp-0B4h], edx
mov	eax, [ebp-34h]
mov	ecx, [eax]
mov	edx, [ebp-3Ch]
mov	eax, [edx+28h]
mov	ecx, [ecx+8]
mov	edx, [ebp-0B4h]
mov	edx, [edx+1Ch]
mov	[ecx+eax*8], edx
jmp	loc_775A4E

loc_775AD6:
push	8
call	_malloc
add	esp, 4
mov	ecx, [ebp-34h]
mov	[ecx+4], eax
mov	edx, [ebp-34h]
mov	eax, [edx+4]
mov	ecx, [ebp-24h]
mov	edx, [ecx+74h]
mov	[eax], edx
mov	eax, [ebp-34h]
mov	ecx, [eax+4]
mov	edx, [ecx]
shl	edx, 2
push	edx
call	_malloc
add	esp, 4
mov	ecx, [ebp-34h]
mov	edx, [ecx+4]
mov	[edx+4], eax
mov	dword ptr [ebp-40h], 0
jmp	short loc_775B23

loc_775B1A:
mov	eax, [ebp-40h]
add	eax, 1
mov	[ebp-40h], eax

loc_775B23:
mov	ecx, [ebp-34h]
mov	edx, [ecx+4]
mov	eax, [ebp-40h]
cmp	eax, [edx]
jnb	short loc_775B45
mov	ecx, [ebp-34h]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	ecx, [ebp-40h]
mov	dword ptr [eax+ecx*4], 0
jmp	short loc_775B1A

loc_775B45:
mov	edx, [ebp-24h]
add	edx, 58h
mov	[ebp-38h], edx
mov	dword ptr [ebp-30h], 0
mov	dword ptr [ebp-28h], 0
mov	eax, [ebp-24h]
mov	ecx, [eax+48h]
mov	[ebp-0B8h], ecx
mov	edx, [ebp-0B8h]
mov	[ebp-44h], edx
jmp	short loc_775B82

loc_775B73:
mov	eax, [ebp-44h]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp-44h], eax

loc_775B82:
mov	ecx, [ebp-24h]
add	ecx, 10h
mov	[ebp-0BCh], ecx
mov	edx, [ebp-0BCh]
add	edx, 30h
mov	[ebp-7Ch], edx
lea	eax, [ebp-0C8h]
mov	[ebp-0C4h], eax
mov	ecx, [ebp-7Ch]
mov	[ebp-0C0h], ecx
mov	edx, [ebp-0C4h]
mov	eax, [ebp-0C0h]
mov	[edx], eax
mov	ecx, [ebp-44h]
xor	edx, edx
cmp	ecx, [ebp-0C8h]
setnz	dl
mov	[ebp-109h], dl
movzx	eax, byte ptr [ebp-109h]
test	eax, eax
jz	short loc_775BF2
mov	ecx, [ebp-44h]
cmp	dword ptr [ecx+28h], 0
jnz	short loc_775BF0
mov	edx, [ebp-44h]
mov	eax, [edx+2Ch]
mov	[ebp-28h], eax
jmp	short loc_775BF2

loc_775BF0:
jmp	short loc_775B73

loc_775BF2:
cmp	dword ptr [ebp-28h], 4
jz	short loc_775C02
cmp	dword ptr [ebp-28h], 8
jnz	loc_775D1F

loc_775C02:
mov	ecx, [ebp-38h]
mov	edx, [ecx+8]
mov	[ebp-0CCh], edx
mov	eax, [ebp-0CCh]
mov	[ebp-48h], eax
jmp	short loc_775C28

loc_775C19:
mov	ecx, [ebp-48h]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp-48h], eax

loc_775C28:
mov	edx, [ebp-38h]
mov	[ebp-80h], edx
mov	eax, [ebp-48h]
xor	ecx, ecx
cmp	eax, [ebp-80h]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	loc_775D1A
mov	eax, [ebp-48h]
add	eax, 10h
mov	[ebp-0D0h], eax
mov	ecx, [ebp-0D0h]
mov	edx, [ecx+18h]
mov	[ebp-0D4h], edx
xor	eax, eax
imul	eax, 28h
mov	ecx, [ebp-0D4h]
lea	edx, [ecx+eax+4]
mov	[ebp-0E0h], edx
mov	eax, [ebp-0E0h]
mov	ecx, [eax+10h]
mov	[ebp-0D8h], ecx
mov	edx, [ebp-0E0h]
mov	eax, [edx+14h]
mov	[ebp-0DCh], eax
mov	ecx, [ebp-48h]
add	ecx, 10h
mov	[ebp-0E4h], ecx
mov	edx, [ebp-0E4h]
mov	eax, [edx+18h]
mov	[ebp-0E8h], eax
xor	ecx, ecx
imul	ecx, 28h
mov	edx, [ebp-0E8h]
mov	eax, [edx+ecx+18h]
mov	[ebp-0ECh], eax
mov	ecx, [ebp-34h]
mov	edx, [ecx+4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp-0D8h]
sub	ecx, [ebp-0DCh]
push	ecx
mov	edx, [ebp-0ECh]
push	edx
call	sub_7727E0
add	esp, 8
push	eax
call	sub_7729A0
add	esp, 8
mov	[ebp-4Ch], eax
mov	eax, [ebp-48h]
add	eax, 28h
push	eax
mov	ecx, [ebp-34h]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	ecx, [ebp-4Ch]
lea	edx, [eax+ecx*4]
push	edx
mov	ecx, [ebp-108h]
call	sub_775F20
jmp	loc_775C19

loc_775D1A:
jmp	loc_775EA0

loc_775D1F:
cmp	dword ptr [ebp-28h], 6
jz	short loc_775D2F
cmp	dword ptr [ebp-28h], 7
jnz	loc_775DF6

loc_775D2F:
mov	eax, [ebp-38h]
mov	ecx, [eax+8]
mov	[ebp-0F0h], ecx
mov	edx, [ebp-0F0h]
mov	[ebp-50h], edx
jmp	short loc_775D55

loc_775D46:
mov	eax, [ebp-50h]
push	eax
call	sub_77E2F0
add	esp, 4
mov	[ebp-50h], eax

loc_775D55:
mov	ecx, [ebp-38h]
mov	[ebp-84h], ecx
mov	edx, [ebp-50h]
xor	eax, eax
cmp	edx, [ebp-84h]
setnz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_775DF1
mov	edx, [ebp-50h]
add	edx, 10h
mov	[ebp-0F4h], edx
mov	eax, [ebp-0F4h]
mov	ecx, [eax+18h]
mov	[ebp-0F8h], ecx
xor	edx, edx
imul	edx, 28h
mov	eax, [ebp-0F8h]
mov	ecx, [eax+edx+20h]
mov	[ebp-60h], ecx
mov	edx, [eax+edx+24h]
mov	[ebp-5Ch], edx
mov	eax, [ebp-34h]
mov	ecx, [eax+4]
mov	edx, [ecx]
push	edx
push	8
lea	eax, [ebp-60h]
push	eax
call	sub_7727E0
add	esp, 8
push	eax
call	sub_7729A0
add	esp, 8
mov	[ebp-54h], eax
mov	ecx, [ebp-50h]
add	ecx, 28h
push	ecx
mov	edx, [ebp-34h]
mov	eax, [edx+4]
mov	ecx, [eax+4]
mov	edx, [ebp-54h]
lea	eax, [ecx+edx*4]
push	eax
mov	ecx, [ebp-108h]
call	sub_775F20
jmp	loc_775D46

loc_775DF1:
jmp	loc_775EA0

loc_775DF6:
mov	ecx, [ebp-38h]
mov	edx, [ecx+8]
mov	[ebp-0FCh], edx
mov	eax, [ebp-0FCh]
mov	[ebp-64h], eax
jmp	short loc_775E1C

loc_775E0D:
mov	ecx, [ebp-64h]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp-64h], eax

loc_775E1C:
mov	edx, [ebp-38h]
mov	[ebp-88h], edx
mov	eax, [ebp-64h]
xor	ecx, ecx
cmp	eax, [ebp-88h]
setnz	cl
movzx	edx, cl
test	edx, edx
jz	short loc_775EA0
mov	eax, [ebp-64h]
add	eax, 10h
mov	[ebp-100h], eax
mov	ecx, [ebp-100h]
mov	edx, [ecx+18h]
mov	[ebp-104h], edx
mov	eax, [ebp-34h]
mov	ecx, [eax+4]
mov	edx, [ecx]
push	edx
xor	eax, eax
imul	eax, 28h
mov	ecx, [ebp-104h]
mov	edx, [ecx+eax+20h]
push	edx
call	sub_7729A0
add	esp, 8
mov	[ebp-68h], eax
mov	eax, [ebp-64h]
add	eax, 28h
push	eax
mov	ecx, [ebp-34h]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	ecx, [ebp-68h]
lea	edx, [eax+ecx*4]
push	edx
mov	ecx, [ebp-108h]
call	sub_775F20
jmp	loc_775E0D

loc_775EA0:
jmp	loc_775975

loc_775EA5:
lea	ecx, [ebp-20h]
call	sub_773780
mov	[ebp-14h], eax
push	0
lea	ecx, [ebp-20h]
call	sub_7737F0
mov	[ebp-0Ch], eax
mov	dword ptr [ebp-10h], 0
push	offset aWb	; "wb"
mov	eax, [ebp+8]
push	eax
lea	ecx, [ebp-10h]
push	ecx
call	_fopen_s
add	esp, 0Ch
mov	[ebp-8], eax
cmp	dword ptr [ebp-8], 0
jz	short loc_775EE7
or	eax, 0FFFFFFFFh
jmp	short loc_775F19

loc_775EE7:
mov	edx, [ebp-10h]
push	edx
push	1
mov	eax, [ebp-14h]
push	eax
mov	ecx, [ebp-0Ch]
push	ecx
call	_fwrite
add	esp, 10h
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 1
jz	short loc_775F0B
or	eax, 0FFFFFFFFh
jmp	short loc_775F19

loc_775F0B:
mov	edx, [ebp-10h]
push	edx
call	_fclose
add	esp, 4
xor	eax, eax

loc_775F19:
mov	esp, ebp
pop	ebp
retn	4
align 10h


; Attributes: bp-based frame

sub_775F20 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 3Ch
push	esi
mov	[ebp+var_38], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_4]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8], eax
push	8		; size_t
call	_malloc
add	esp, 4
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 3
push	ecx		; size_t
call	_malloc
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx+4], eax
mov	[ebp+var_C], 0
jmp	short loc_775F7C

loc_775F73:
mov	eax, [ebp+var_C]
add	eax, 1
mov	[ebp+var_C], eax

loc_775F7C:
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_8]
jnb	loc_776111
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	eax, [ebp+var_C]
imul	eax, 28h
mov	ecx, [ebp+var_C]
mov	esi, [ebp+var_10]
mov	eax, [esi+eax]
mov	[edx+ecx*8], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_C]
imul	eax, 28h
mov	ecx, [ebp+var_14]
mov	edx, [ecx+eax]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
sub	eax, 1
mov	[ebp+var_3C], eax
cmp	[ebp+var_3C], 7	; switch 8 cases
ja	loc_7760FB	; default
mov	ecx, [ebp+var_3C]
jmp	ds:off_776124[ecx*4] ; switch jump

loc_775FDC:		; jumptable 00775FD5 case 0
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_C]
imul	ecx, 28h
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	edx, [ebp+var_C]
mov	esi, [ebp+var_18]
mov	ecx, [esi+ecx+20h]
mov	[eax+edx*8+4], ecx
jmp	loc_77610C

loc_776003:		; jumptable 00775FD5 case 1
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_C]
imul	ecx, 28h
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	edx, [ebp+var_C]
mov	esi, [ebp+var_1C]
mov	ecx, [esi+ecx+20h]
mov	[eax+edx*8+4], ecx
jmp	loc_77610C

loc_77602A:		; jumptable 00775FD5 case 2
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_C]
imul	ecx, 28h
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	edx, [ebp+var_C]
mov	esi, [ebp+var_20]
fld	dword ptr [esi+ecx+20h]
fstp	dword ptr [eax+edx*8+4]
jmp	loc_77610C

loc_776051:		; jumptable 00775FD5 case 4
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+var_C]
mov	dword ptr [ecx+edx*8+4], 0
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
imul	edx, 28h
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	eax, [ebp+var_C]
mov	esi, [ebp+var_24]
mov	dl, [esi+edx+20h]
mov	[ecx+eax*8+4], dl
jmp	loc_77610C

loc_776089:		; jumptable 00775FD5 case 5
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_C]
imul	edx, 28h
mov	eax, [ebp+var_28]
lea	ecx, [eax+edx+20h]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	edx, [ebp+var_C]
mov	[eax+edx*8+4], ecx
jmp	short loc_77610C

loc_7760AD:		; jumptable 00775FD5 case 6
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_C]
imul	edx, 28h
mov	eax, [ebp+var_2C]
lea	ecx, [eax+edx+20h]
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	edx, [ebp+var_C]
mov	[eax+edx*8+4], ecx
jmp	short loc_77610C

loc_7760D1:		; jumptable 00775FD5 cases 3,7
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_C]
imul	edx, 28h
mov	eax, [ebp+var_30]
mov	ecx, [eax+edx+18h]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_34]
mov	[eax+ecx*8+4], edx
jmp	short loc_77610C

loc_7760FB:		; default
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+var_C]
mov	dword ptr [ecx+edx*8+4], 0

loc_77610C:
jmp	loc_775F73

loc_776111:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_7734C0
pop	esi
mov	esp, ebp
pop	ebp
retn	8
sub_775F20 endp

off_776124 dd offset loc_775FDC	; jump table for switch	statement
dd offset loc_776003
dd offset loc_77602A
dd offset loc_7760D1
dd offset loc_776051
dd offset loc_776089
dd offset loc_7760AD
dd offset loc_7760D1
align 10h


; Attributes: bp-based frame

sub_776150 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776150
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 38h
mov	[ebp+var_3C], ecx
mov	eax, [ebp+var_3C]
add	eax, 4
mov	[ebp+var_1C], eax
lea	ecx, [ebp+var_F]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_10]
mov	[ebp+var_14], edx
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
call	sub_489C40
mov	ecx, [ebp+var_1C]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_14]
mov	al, [edx]
mov	ecx, [ebp+var_1C]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 2
mov	edx, [ebp+var_3C]
mov	dword ptr [edx+1Ch], 0
lea	eax, [ebp+var_D]
mov	[ebp+var_40], eax
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_40]
push	ecx
mov	ecx, [ebp+var_3C]
add	ecx, 20h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 5
lea	edx, [ebp+var_E]
mov	[ebp+var_44], edx
mov	byte ptr [ebp+var_4], 6
mov	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_3C]
add	ecx, 38h
call	sub_4022A0
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_3C]
add	ecx, 50h
mov	[ebp+var_38], ecx
mov	edx, [ebp+var_38]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_38]
cmp	dword ptr [eax], 0
jz	short loc_776234
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_776234:
mov	ecx, [ebp+var_3C]
mov	dword ptr [ecx], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_776150 endp

align 10h


; Attributes: bp-based frame

sub_776260 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776260
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_3C], ecx
mov	[ebp+var_4], 3
mov	eax, [ebp+var_3C]
mov	dword ptr [eax], 0
push	0
mov	ecx, [ebp+var_3C]
add	ecx, 50h
call	sub_5E2740
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_3C]
add	ecx, 50h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
cmp	dword ptr [edx], 0
jz	short loc_7762D6
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_7762D6
mov	eax, [ebp+var_18]
mov	edx, [eax]
mov	ecx, [ebp+var_18]
mov	eax, [edx+4]
call	eax

loc_7762D6:
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_3C]
add	ecx, 38h
mov	[ebp+var_28], ecx
mov	byte ptr [ebp+var_4], 4
mov	ecx, [ebp+var_28]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	edx, [ebp+var_3C]
add	edx, 20h
mov	[ebp+var_34], edx
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_34]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
add	eax, 4
mov	[ebp+var_38], eax
mov	[ebp+var_4], 7
mov	ecx, [ebp+var_38]
call	sub_5E0AF0
mov	byte ptr [ebp+var_4], 6
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_776260 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_776350(char	*Filename)
sub_776350 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
Filename= dword	ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
mov	[ebp+var_50], ecx
push	1		; char
mov	eax, [ebp+Filename]
push	eax		; Filename
lea	ecx, [ebp+var_14]
push	ecx		; int
call	off_167E910
add	esp, 0Ch
mov	[ebp+var_24], eax
mov	edx, [ebp+var_24]
mov	eax, [edx]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_7763A5
mov	ecx, [ebp+var_10]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_7763A5:
mov	[ebp+var_4], 0
cmp	[ebp+var_14], 0
jz	short loc_7763D6
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
add	ecx, 4
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_7763D6
mov	edx, [ebp+var_28]
mov	eax, [edx]
mov	ecx, [ebp+var_28]
mov	edx, [eax+4]
call	edx

loc_7763D6:
cmp	[ebp+var_10], 0
jz	short loc_77640C
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_7763FD
mov	edx, [ebp+var_2C]
cmp	dword ptr [edx+8], 0
jz	short loc_7763FD
mov	[ebp+var_54], 0
jmp	short loc_776404

loc_7763FD:
mov	[ebp+var_54], 1

loc_776404:
movzx	eax, byte ptr [ebp+var_54]
test	eax, eax
jz	short loc_77644C

loc_77640C:
mov	[ebp+var_18], 0FFFFFFFFh
mov	[ebp+var_4], 0FFFFFFFFh
cmp	[ebp+var_10], 0
jz	short loc_776444
mov	ecx, [ebp+var_10]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_776444
mov	eax, [ebp+var_30]
mov	edx, [eax]
mov	ecx, [ebp+var_30]
mov	eax, [edx+4]
call	eax

loc_776444:
mov	eax, [ebp+var_18]
jmp	loc_776518

loc_77644C:
lea	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+var_50]
add	ecx, 50h
call	sub_4AC7F0
mov	edx, [ebp+var_10]
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_3C]
mov	ecx, [eax+0Ch]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
add	edx, 1
mov	eax, [ebp+var_50]
mov	[eax+1Ch], edx
mov	ecx, [ebp+var_10]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
mov	eax, [edx+8]
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_50]
mov	edx, [ebp+var_48]
mov	[ecx], edx
mov	eax, [ebp+var_50]
add	eax, 20h
push	eax
mov	ecx, [ebp+var_50]
mov	edx, [ecx+1Ch]
push	edx
mov	eax, [ebp+var_50]
mov	ecx, [eax]
push	ecx
call	sub_10EE070
add	esp, 0Ch
mov	edx, [ebp+var_50]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_50]
mov	ecx, [ecx]
call	sub_773970
mov	edx, [ebp+var_50]
add	edx, 38h
push	edx
mov	eax, [ebp+var_50]
mov	ecx, [eax+1Ch]
push	ecx
mov	edx, [ebp+var_50]
mov	eax, [edx]
push	eax
call	sub_10EE070
add	esp, 0Ch
mov	ecx, [ebp+var_50]
call	sub_776530
mov	[ebp+var_1C], 0
mov	[ebp+var_4], 0FFFFFFFFh
cmp	[ebp+var_10], 0
jz	short loc_776515
mov	ecx, [ebp+var_10]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_4C]
add	edx, 4
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_776515
mov	eax, [ebp+var_4C]
mov	edx, [eax]
mov	ecx, [ebp+var_4C]
mov	eax, [edx+4]
call	eax

loc_776515:
mov	eax, [ebp+var_1C]

loc_776518:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_776350 endp

align 10h


; Attributes: bp-based frame

sub_776530 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	byte ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776530
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 4Ch
mov	[ebp+var_54], ecx
mov	[ebp+var_10], 0
jmp	short loc_776560

loc_776557:
mov	eax, [ebp+var_10]
add	eax, 1
mov	[ebp+var_10], eax

loc_776560:
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	eax, [ebp+var_10]
cmp	eax, [edx]
jnb	loc_7765FC
mov	ecx, [ebp+var_10]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
mov	eax, [ecx+edx*8]
mov	ecx, [eax+4]
mov	[ebp+var_40], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_44]
mov	[ebp+var_30], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_58], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_34]
push	eax
lea	ecx, [ebp+var_2C]
call	sub_407D30
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_30]
mov	[ebp+var_14], ecx
mov	[ebp+var_4], 1
lea	edx, [ebp+var_2C]
push	edx
lea	eax, [ebp+var_3C]
push	eax
mov	ecx, [ebp+var_54]
add	ecx, 4
call	sub_57FFB0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 2
lea	ecx, [ebp+var_2C]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
jmp	loc_776557

loc_7765FC:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_776530 endp

align 10h


; Attributes: bp-based frame

sub_776610 proc	near

var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_20], ecx
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 4
call	sub_77B4A0
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_20]
add	edx, 4
mov	[ebp+var_C], edx
lea	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+var_4]
xor	edx, edx
cmp	ecx, [ebp+var_1C]
setnz	dl
mov	[ebp+var_21], dl
movzx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_77666E
mov	ecx, [ebp+var_4]
mov	eax, [ecx+28h]
jmp	short loc_77668A
jmp	short loc_77668A

loc_77666E:
mov	edx, dword ptr [ebp+arg_0]
push	edx		; char
push	offset aCannotFindTabl ; "Cannot Find Table with name %S"
push	5		; int
call	sub_10FF860
push	eax		; int
call	sub_10ED990
add	esp, 10h
or	eax, 0FFFFFFFFh

loc_77668A:
mov	esp, ebp
pop	ebp
retn	4
sub_776610 endp



; Attributes: bp-based frame

sub_776690 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
lea	eax, [edx+eax*8]
mov	esp, ebp
pop	ebp
retn	4
sub_776690 endp

align 10h


; Attributes: bp-based frame

sub_7766B0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	off_167E910, eax
pop	ebp
retn
sub_7766B0 endp

align 10h


; Attributes: bp-based frame

sub_7766C0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_7766E0
add	esp, 8
pop	ebp
retn
sub_7766C0 endp

align 10h


; Attributes: bp-based frame

sub_7766E0 proc	near

var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_3C], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_770F40
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+var_4]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_776950
add	esp, 8
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_10], eax
jmp	short loc_77672B

loc_776722:
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_10], ecx

loc_77672B:
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	ecx, [ebp+var_10]
cmp	ecx, [eax]
jnb	short loc_7767AF
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	ecx, [eax+4]
mov	edx, [ebp+var_10]
mov	eax, [ecx+edx*4]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_7767AA

loc_776750:
cmp	[ebp+var_14], 0
jz	short loc_776793
cmp	[ebp+arg_4], 0
jz	short loc_77676F
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jnz	short loc_776788

loc_77676F:
mov	eax, [ebp+var_14]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_C]
push	edx
call	sub_770E30
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_776793

loc_776788:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
jmp	short loc_776750

loc_776793:
cmp	[ebp+var_14], 0
jz	short loc_7767A0
mov	eax, [ebp+var_14]
mov	eax, [eax]
jmp	short loc_7767B1

loc_7767A0:
cmp	[ebp+arg_4], 0
jz	short loc_7767AA
xor	eax, eax
jmp	short loc_7767B1

loc_7767AA:
jmp	loc_776722

loc_7767AF:
xor	eax, eax

loc_7767B1:
mov	esp, ebp
pop	ebp
retn
sub_7766E0 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 10h
mov	dword ptr [ebp-8], 0
mov	eax, [ebp+8]
mov	ecx, [eax+4]
mov	[ebp-4], ecx
mov	dword ptr [ebp-0Ch], 0
jmp	short loc_7767E8

loc_7767DF:
mov	edx, [ebp-0Ch]
add	edx, 1
mov	[ebp-0Ch], edx

loc_7767E8:
mov	eax, [ebp+8]
mov	ecx, [eax+4]
mov	edx, [ebp-0Ch]
cmp	edx, [ecx]
jnb	short loc_776823
mov	eax, [ebp+8]
mov	ecx, [eax+4]
mov	edx, [ecx+4]
mov	eax, [ebp-0Ch]
mov	ecx, [edx+eax*4]
mov	[ebp-10h], ecx

loc_776807:
cmp	dword ptr [ebp-10h], 0
jz	short loc_776821
mov	edx, [ebp-8]
add	edx, 1
mov	[ebp-8], edx
mov	eax, [ebp-10h]
mov	ecx, [eax+4]
mov	[ebp-10h], ecx
jmp	short loc_776807

loc_776821:
jmp	short loc_7767DF

loc_776823:
mov	eax, [ebp-8]
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_776830 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_776950
add	esp, 8
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
mov	eax, [ecx+edx*4]
mov	[ebp+var_C], eax

loc_776866:
cmp	[ebp+var_C], 0
jz	short loc_77688A
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
mov	edx, [eax+4]
cmp	edx, [ecx+4]
jz	short loc_77688A
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
jmp	short loc_776866

loc_77688A:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_776830 endp

align 10h


; Attributes: bp-based frame

sub_7768A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_4], 0
jmp	short loc_7768B8

loc_7768AF:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_7768B8:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
cmp	edx, [ecx]
jnb	short loc_77693C
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	eax, [ebp+var_4]
mov	ecx, [edx+eax*8+4]
mov	[ebp+var_C], ecx

loc_7768D8:
mov	edx, [ebp+var_C]
mov	al, [edx]
mov	[ebp+var_D], al
mov	ecx, [ebp+var_8]
cmp	al, [ecx]
jnz	short loc_776915
cmp	[ebp+var_D], 0
jz	short loc_77690C
mov	edx, [ebp+var_C]
mov	al, [edx+1]
mov	[ebp+var_E], al
mov	ecx, [ebp+var_8]
cmp	al, [ecx+1]
jnz	short loc_776915
add	[ebp+var_C], 2
add	[ebp+var_8], 2
cmp	[ebp+var_E], 0
jnz	short loc_7768D8

loc_77690C:
mov	[ebp+var_14], 0
jmp	short loc_77691D

loc_776915:
sbb	edx, edx
sbb	edx, 0FFFFFFFFh
mov	[ebp+var_14], edx

loc_77691D:
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0
jnz	short loc_776937
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+4]
mov	eax, [ebp+var_4]
lea	eax, [edx+eax*8]
jmp	short loc_77693E

loc_776937:
jmp	loc_7768AF

loc_77693C:
xor	eax, eax

loc_77693E:
mov	esp, ebp
pop	ebp
retn
sub_7768A0 endp

align 10h


; Attributes: bp-based frame

sub_776950 proc	near

var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_4], 0
cmp	[ebp+arg_0], 0
jz	loc_776A20
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 4
jz	short loc_776977
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 8
jnz	short loc_7769C9

loc_776977:
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 1
mov	[ebp+var_18], ecx

loc_776989:
mov	edx, [ebp+var_14]
mov	al, [edx]
mov	[ebp+var_19], al
add	[ebp+var_14], 1
cmp	[ebp+var_19], 0
jnz	short loc_776989
mov	ecx, [ebp+var_14]
sub	ecx, [ebp+var_18]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
call	sub_7727E0
add	esp, 8
push	eax
call	sub_7729A0
add	esp, 8
mov	[ebp+var_4], eax
jmp	short loc_776A20

loc_7769C9:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax], 6
jz	short loc_7769D9
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx], 7
jnz	short loc_776A0A

loc_7769D9:
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	ecx, [eax]
mov	[ebp+var_10], ecx
mov	edx, [eax+4]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_4]
push	eax
push	8
lea	ecx, [ebp+var_10]
push	ecx
call	sub_7727E0
add	esp, 8
push	eax
call	sub_7729A0
add	esp, 8
mov	[ebp+var_4], eax
jmp	short loc_776A20

loc_776A0A:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
call	sub_7729A0
add	esp, 8
mov	[ebp+var_4], eax

loc_776A20:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_776950 endp

align 10h


; Attributes: bp-based frame

sub_776A30 proc	near

var_1C=	dword ptr -1Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx
mov	ecx, [ebp+var_1C]
add	ecx, 30h
call	sub_7771A0
mov	esp, ebp
pop	ebp
retn
sub_776A30 endp

align 10h


; Attributes: bp-based frame

sub_776A50 proc	near

var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776AA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_776A50 endp

align 10h


; Attributes: bp-based frame

sub_776AA0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776AA0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	eax, [ebp+var_1C]
add	eax, 4
mov	[ebp+var_18], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_18]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_776AA0 endp

align 10h


; Attributes: bp-based frame

sub_776AF0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jz	short loc_776B3F
mov	eax, [ebp+var_10]
mov	ecx, [eax+10h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+14h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	ecx, [ebp+var_C]
call	sub_403980

loc_776B3F:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+20h]
mov	edx, [eax+24h]
mov	eax, [ebp+var_14]
mov	[eax+20h], ecx
mov	[eax+24h], edx
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn	4
sub_776AF0 endp

align 10h


; Attributes: bp-based frame

sub_776B60 proc	near

var_6C=	dword ptr -6Ch
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776B60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_6C]
add	ecx, 18h
call	sub_777080
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_6C]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_776B60 endp

align 10h


; Attributes: bp-based frame

sub_776BC0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+18h], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_10]
add	eax, 30h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+1000Ch],	0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+10010h],	0
mov	eax, [ebp+var_C]
add	eax, 0Ch
mov	ecx, [ebp+var_C]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
and	ecx, 3
mov	edx, 4
sub	edx, ecx
and	edx, 3
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
add	edx, 1000Ch
mov	eax, [ebp+var_C]
mov	[eax+8], edx
mov	eax, [ebp+var_10]
mov	esp, ebp
pop	ebp
retn
sub_776BC0 endp

align 10h


; Attributes: bp-based frame

sub_776C70 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_24], ecx
cmp	[ebp+arg_0], 0
jz	loc_776D33
cmp	[ebp+arg_4], 0
jnz	short loc_776CAD
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax

loc_776C8F:
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_776CA4
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_776C8F

loc_776CA4:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+arg_4], ecx

loc_776CAD:
mov	edx, [ebp+var_24]
mov	eax, [edx+18h]
mov	[ebp+var_4], eax
jmp	short loc_776CC9

loc_776CB8:
push	1
push	0
push	0
mov	ecx, [ebp+var_4]
call	sub_776D40
mov	[ebp+var_4], eax

loc_776CC9:
cmp	[ebp+var_4], 0
jz	short loc_776D2D
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_776CE2
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ebp+var_28], eax
jmp	short loc_776CE9

loc_776CE2:
mov	[ebp+var_28], 0

loc_776CE9:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_776CFB
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_2C], eax
jmp	short loc_776D02

loc_776CFB:
mov	[ebp+var_2C], offset unk_1857F78

loc_776D02:
movzx	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_28]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
call	sub_777E80
add	esp, 14h
movzx	eax, al
test	eax, eax
jz	short loc_776D2B
mov	eax, [ebp+var_4]
jmp	short loc_776D39

loc_776D2B:
jmp	short loc_776CB8

loc_776D2D:
xor	eax, eax
jmp	short loc_776D39
jmp	short loc_776D39

loc_776D33:
mov	ecx, [ebp+var_24]
mov	eax, [ecx+18h]

loc_776D39:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_776C70 endp

align 10h


; Attributes: bp-based frame

sub_776D40 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_14], ecx
cmp	[ebp+arg_0], 0
jz	loc_776DFB
cmp	[ebp+arg_4], 0
jnz	short loc_776D7D
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax

loc_776D5F:
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_776D74
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_776D5F

loc_776D74:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+arg_4], ecx

loc_776D7D:
mov	edx, [ebp+var_14]
mov	eax, [edx+2Ch]
mov	[ebp+var_4], eax
jmp	short loc_776D91

loc_776D88:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+2Ch]
mov	[ebp+var_4], edx

loc_776D91:
cmp	[ebp+var_4], 0
jz	short loc_776DF5
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_776DAA
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	[ebp+var_18], edx
jmp	short loc_776DB1

loc_776DAA:
mov	[ebp+var_18], 0

loc_776DB1:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_776DC3
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
jmp	short loc_776DCA

loc_776DC3:
mov	[ebp+var_1C], offset unk_1857F78

loc_776DCA:
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_777E80
add	esp, 14h
movzx	edx, al
test	edx, edx
jz	short loc_776DF3
mov	eax, [ebp+var_4]
jmp	short loc_776E01

loc_776DF3:
jmp	short loc_776D88

loc_776DF5:
xor	eax, eax
jmp	short loc_776E01
jmp	short loc_776E01

loc_776DFB:
mov	eax, [ebp+var_14]
mov	eax, [eax+2Ch]

loc_776E01:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_776D40 endp

align 10h


; Attributes: bp-based frame

sub_776E10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_14], ecx
cmp	[ebp+arg_0], 0
jz	loc_776ECB
cmp	[ebp+arg_4], 0
jnz	short loc_776E4D
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax

loc_776E2F:
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_776E44
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_776E2F

loc_776E44:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+arg_4], ecx

loc_776E4D:
mov	edx, [ebp+var_14]
mov	eax, [edx+20h]
mov	[ebp+var_4], eax
jmp	short loc_776E61

loc_776E58:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+18h]
mov	[ebp+var_4], edx

loc_776E61:
cmp	[ebp+var_4], 0
jz	short loc_776EC5
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_776E7A
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	[ebp+var_18], edx
jmp	short loc_776E81

loc_776E7A:
mov	[ebp+var_18], 0

loc_776E81:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_776E93
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
jmp	short loc_776E9A

loc_776E93:
mov	[ebp+var_1C], offset unk_1857F78

loc_776E9A:
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_777E80
add	esp, 14h
movzx	edx, al
test	edx, edx
jz	short loc_776EC3
mov	eax, [ebp+var_4]
jmp	short loc_776ED1

loc_776EC3:
jmp	short loc_776E58

loc_776EC5:
xor	eax, eax
jmp	short loc_776ED1
jmp	short loc_776ED1

loc_776ECB:
mov	eax, [ebp+var_14]
mov	eax, [eax+20h]

loc_776ED1:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_776E10 endp

align 10h


; Attributes: bp-based frame

sub_776EE0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_14], ecx
cmp	[ebp+arg_0], 0
jz	loc_776F9B
cmp	[ebp+arg_4], 0
jnz	short loc_776F1D
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax

loc_776EFF:
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_776F14
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_776EFF

loc_776F14:
mov	ecx, [ebp+var_8]
sub	ecx, [ebp+arg_0]
mov	[ebp+arg_4], ecx

loc_776F1D:
mov	edx, [ebp+var_14]
mov	eax, [edx+18h]
mov	[ebp+var_4], eax
jmp	short loc_776F31

loc_776F28:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+18h]
mov	[ebp+var_4], edx

loc_776F31:
cmp	[ebp+var_4], 0
jz	short loc_776F95
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_776F4A
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	[ebp+var_18], edx
jmp	short loc_776F51

loc_776F4A:
mov	[ebp+var_18], 0

loc_776F51:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax], 0
jz	short loc_776F63
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_1C], edx
jmp	short loc_776F6A

loc_776F63:
mov	[ebp+var_1C], offset unk_1857F78

loc_776F6A:
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_777E80
add	esp, 14h
movzx	edx, al
test	edx, edx
jz	short loc_776F93
mov	eax, [ebp+var_4]
jmp	short loc_776FB9

loc_776F93:
jmp	short loc_776F28

loc_776F95:
xor	eax, eax
jmp	short loc_776FB9
jmp	short loc_776FB9

loc_776F9B:
mov	eax, [ebp+var_14]
cmp	dword ptr [eax+10h], 0
jz	short loc_776FAF
mov	ecx, [ebp+var_14]
mov	edx, [ecx+18h]
mov	[ebp+var_20], edx
jmp	short loc_776FB6

loc_776FAF:
mov	[ebp+var_20], 0

loc_776FB6:
mov	eax, [ebp+var_20]

loc_776FB9:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_776EE0 endp

align 10h


; Attributes: bp-based frame

sub_776FC0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_776FC0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 48h
mov	[ebp+var_4C], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_7787B0
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_50]
mov	[ebp+var_54], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+4]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_4C]
call	sub_777230
mov	byte ptr [ebp+var_4], 2
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_40], edx
mov	eax, [ebp+var_4C]
mov	ecx, [eax]
mov	[ebp+var_48], ecx
push	0
lea	edx, [ebp+var_41]
push	edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_40]
push	edx
call	sub_77C4E0
add	esp, 14h
mov	ecx, [ebp+var_4C]
mov	[ecx+4], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_4C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_776FC0 endp

align 10h


; Attributes: bp-based frame

sub_777080 proc	near

var_6C=	dword ptr -6Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_777080
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
mov	[ebp+var_6C], ecx
mov	[ebp+var_4], 0
push	ecx
mov	eax, esp
mov	[ebp+var_10], esp
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_18]
mov	[eax], ecx
push	ecx
mov	edx, esp
mov	[ebp+var_14], esp
mov	[ebp+var_24], edx
mov	eax, [ebp+var_6C]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
mov	eax, [ebp+var_20]
mov	[edx], eax
call	sub_77B8D0
add	esp, 8
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_6C]
call	sub_7772E0
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_777080 endp

align 10h


; Attributes: bp-based frame

sub_777100 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_44]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
cmp	[ebp+arg_0], eax
jnb	short loc_777163
mov	edx, [ebp+var_44]
mov	eax, [edx+4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
imul	eax, 28h
add	eax, [ebp+var_8]
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_38]
cmp	ecx, [ebp+var_4]
jnz	short loc_777148
jmp	short loc_777161

loc_777148:
xor	edx, edx
mov	[ebp+var_9], dl
lea	eax, [ebp+var_9]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_44]
call	sub_7773D0

loc_777161:
jmp	short loc_777199

loc_777163:
mov	eax, [ebp+var_44]
mov	ecx, [ebp+var_44]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_3C], eax
mov	edx, [ebp+var_44]
mov	eax, [edx+4]
mov	[ebp+var_40], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
sub	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_44]
call	sub_777D70

loc_777199:
mov	esp, ebp
pop	ebp
retn	8
sub_777100 endp

align 10h


; Attributes: bp-based frame

sub_7771A0 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_1C], ecx

loc_7771A9:
mov	eax, [ebp+var_1C]
add	eax, 0Ch
mov	ecx, [ebp+var_1C]
cmp	[ecx], eax
jz	short loc_77721C
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
and	ecx, 3
mov	edx, 4
sub	edx, ecx
and	edx, 3
mov	[ebp+var_C], edx
mov	eax, [ebp+var_10]
add	eax, [ebp+var_C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_1C]
cmp	dword ptr [edx+10010h],	0
jz	short loc_7771FE
mov	eax, [ebp+var_1C]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+10010h]
call	eax
add	esp, 4
jmp	short loc_777212

loc_7771FE:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_777212:
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_4]
mov	[ecx], edx
jmp	short loc_7771A9

loc_77721C:
mov	ecx, [ebp+var_1C]
call	sub_777380
mov	esp, ebp
pop	ebp
retn
sub_7771A0 endp

align 10h


; Attributes: bp-based frame

sub_777230 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_777230
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 28h
mov	[ebp+var_34], ecx
mov	eax, [ebp+var_34]
mov	dword ptr [eax], 0
mov	ecx, [ebp+var_34]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_34]
add	edx, 8
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax], 0
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
mov	[ebp+var_30], ecx
xor	edx, edx
mov	[ebp+var_11], dl
lea	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_30]
push	ecx
mov	ecx, [ebp+var_34]
add	ecx, 8
call	sub_777470
mov	edx, [ebp+var_34]
mov	[edx], eax
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_34]
mov	edx, [ecx]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
imul	eax, 28h
mov	ecx, [ebp+var_34]
add	eax, [ecx]
mov	edx, [ebp+var_34]
mov	[edx+8], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_777230 endp

align 10h


; Attributes: bp-based frame

sub_7772E0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_7772E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
cmp	dword ptr [eax], 0
jz	short loc_777361
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_1C]
mov	eax, [ecx+8]
sub	eax, [edx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_18], eax
mov	edx, [ebp+var_1C]
mov	eax, [edx]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	short loc_777361
mov	ecx, [ebp+var_18]
imul	ecx, 28h
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 80h
jbe	short loc_777351
mov	edx, [ebp+var_14]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_777361

loc_777351:
mov	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_77E0D0
add	esp, 8

loc_777361:
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_7772E0 endp

align 10h


; Attributes: bp-based frame

sub_777380 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_C]
add	eax, 0Ch
mov	ecx, [ebp+var_C]
mov	[ecx], eax
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
and	ecx, 3
mov	edx, 4
sub	edx, ecx
and	edx, 3
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	[ecx+4], eax
mov	edx, [ebp+var_C]
add	edx, 1000Ch
mov	eax, [ebp+var_C]
mov	[eax+8], edx
mov	esp, ebp
pop	ebp
retn
sub_777380 endp

align 10h


; Attributes: bp-based frame

sub_7773D0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 44h
mov	[ebp+var_44], ecx
xor	eax, eax
mov	[ebp+var_5], al
mov	ecx, [ebp+var_44]
mov	edx, [ecx+4]
mov	[ebp+var_28], edx
mov	eax, [ebp+arg_0]
mov	[ebp+var_24], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_28]
sub	eax, [ebp+var_20]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_C], eax
jmp	short loc_77740F

loc_777406:
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx

loc_77740F:
cmp	[ebp+var_C], 0
jle	short loc_777435
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+var_24]
call	sub_776AF0
mov	ecx, [ebp+var_20]
add	ecx, 28h
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_24]
add	edx, 28h
mov	[ebp+var_24], edx
jmp	short loc_777406

loc_777435:
mov	eax, [ebp+var_24]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_44]
mov	edx, [ecx+4]
mov	[ebp+var_40], edx
push	0
mov	eax, [ebp+var_40]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_779FB0
add	esp, 0Ch
mov	edx, [ebp+var_44]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	0Ch
sub_7773D0 endp

align 10h


; Attributes: bp-based frame

sub_777470 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 6666666h
jbe	short loc_7774A6
push	1
push	offset off_167E914
lea	ecx, [ebp+var_14]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
mov	[ebp+var_14], offset off_1446194
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_7774A6:
cmp	[ebp+arg_0], 0
jz	short loc_777500
mov	ecx, [ebp+arg_0]
imul	ecx, 28h
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 80h
jbe	short loc_7774D5
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_20], eax
jmp	short loc_7774E4

loc_7774D5:
lea	ecx, [ebp+var_4]
push	ecx
call	sub_77E150
add	esp, 4
mov	[ebp+var_20], eax

loc_7774E4:
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
xor	edx, edx
mov	ecx, 28h
div	ecx
mov	edx, [ebp+arg_4]
mov	[edx], eax
mov	eax, [ebp+var_8]
jmp	short loc_777502

loc_777500:
xor	eax, eax

loc_777502:
mov	esp, ebp
pop	ebp
retn	8
sub_777470 endp

align 10h


; Attributes: bp-based frame

sub_777510 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A700
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B8h
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_AC]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_77754D:
cmp	[ebp+var_1C], 0
jz	loc_7775FC
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_B0], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+10h]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+14h]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+10h]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+14h]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_54]
push	eax
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_7775E2
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_B8], ecx
jmp	short loc_7775EE

loc_7775E2:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_B8], eax

loc_7775EE:
mov	ecx, [ebp+var_B8]
mov	[ebp+var_1C], ecx
jmp	loc_77754D

loc_7775FC:
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_7776A6
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+8]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_28]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_5C]
mov	[eax], ecx
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_B9], al
movzx	ecx, [ebp+var_B9]
test	ecx, ecx
jz	short loc_777697
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_AC]
call	sub_7787E0
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_68], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_777762
jmp	short loc_7776A6

loc_777697:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_7776A6:
lea	ecx, [ebp+var_32]
mov	[ebp+var_C0], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_10]
mov	[ebp+var_78], edx
lea	eax, [ebp+var_71]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_78]
add	ecx, 10h
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_70]
push	eax
call	sub_4050C0
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_77773E
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_AC]
call	sub_7787E0
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_A0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_777762

loc_77773E:
mov	[ebp+var_39], 0
mov	eax, [ebp+var_10]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_A8]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_777762:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_777510 endp

align 10h


; Attributes: bp-based frame

sub_777780 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_16=	byte ptr -16h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_777780
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
mov	eax, [ebp+var_48]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_48]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_7777AD:
cmp	[ebp+var_14], 0
jz	short loc_77780D
mov	eax, [ebp+var_14]
mov	[ebp+var_10], eax
lea	ecx, [ebp+var_16]
mov	[ebp+var_4C], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_1D]
mov	[ebp+var_50], edx
mov	eax, [ebp+var_14]
add	eax, 10h
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_4050C0
add	esp, 8
mov	[ebp+var_15], al
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_777802
mov	ecx, [ebp+var_14]
mov	edx, [ecx+8]
mov	[ebp+var_14], edx
jmp	short loc_77780B

loc_777802:
mov	eax, [ebp+var_14]
mov	ecx, [eax+0Ch]
mov	[ebp+var_14], ecx

loc_77780B:
jmp	short loc_7777AD

loc_77780D:
push	0
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_48]
call	sub_778B60
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_777780 endp

align 10h


; Attributes: bp-based frame

sub_777840 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 5Ch
mov	[ebp+var_5C], ecx
mov	ecx, [ebp+var_5C]
call	sub_778310
mov	ecx, [ebp+var_5C]
call	sub_778360
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
cmp	ecx, 0EFh
jnz	short loc_77788D
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+1]
cmp	eax, 0BBh
jnz	short loc_77788D
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 0BFh
jnz	short loc_77788D
mov	eax, [ebp+arg_0]
add	eax, 3
mov	[ebp+arg_0], eax

loc_77788D:
mov	ecx, 1
test	ecx, ecx
jz	loc_777940
mov	edx, [ebp+arg_0]
mov	[ebp+var_2C], edx

loc_7778A0:
mov	eax, [ebp+var_2C]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_14454A8[ecx]
mov	[ebp+var_2D], dl
movzx	eax, [ebp+var_2D]
test	eax, eax
jz	short loc_7778C2
mov	ecx, [ebp+var_2C]
add	ecx, 1
mov	[ebp+var_2C], ecx
jmp	short loc_7778A0

loc_7778C2:
mov	edx, [ebp+var_2C]
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7778D4
jmp	short loc_777940

loc_7778D4:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
cmp	eax, 3Ch
jnz	short loc_77790B
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
lea	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_5C]
call	sub_779750
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_777909
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_5C]
call	sub_7782A0

loc_777909:
jmp	short loc_77793B

loc_77790B:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_58], ecx
lea	ecx, [ebp+var_18]
call	sub_7965EC
mov	[ebp+var_18], offset off_14454A0
mov	[ebp+var_C], offset aExpected ;	"expected <"
mov	edx, [ebp+var_58]
mov	[ebp+var_8], edx
push	offset unk_1623934
lea	eax, [ebp+var_18]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77793B:
jmp	loc_77788D

loc_777940:
mov	esp, ebp
pop	ebp
retn	4
sub_777840 endp

align 10h


; Attributes: bp-based frame

sub_777950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_7966CA
mov	eax, [ebp+arg_0]
and	eax, 1
jz	short loc_777973
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_777973:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_777950 endp

align 10h


; Attributes: bp-based frame

sub_777980 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_7966CA
mov	esp, ebp
pop	ebp
retn
sub_777980 endp

align 10h


; Attributes: bp-based frame

sub_7779A0 proc	near

var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1A9= byte ptr -1A9h
var_1A8= dword ptr -1A8h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= byte ptr -120h
var_115= byte ptr -115h
var_114= byte ptr -114h
var_FC=	byte ptr -0FCh
var_A8=	byte ptr -0A8h
var_90=	byte ptr -90h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_7779A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1BCh
mov	[ebp+var_1A8], ecx
mov	[ebp+var_124], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_1A8]
call	sub_77C350
mov	[ebp+var_128], eax
mov	ecx, [ebp+var_128]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_1A8]
mov	[ebp+var_1C], edx
lea	eax, [ebp+var_134]
mov	[ebp+var_130], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_12C], ecx
mov	edx, [ebp+var_130]
mov	eax, [ebp+var_12C]
mov	[edx], eax
mov	ecx, [ebp+var_10]
xor	edx, edx
cmp	ecx, [ebp+var_134]
setz	dl
mov	[ebp+var_1A9], dl
movzx	eax, [ebp+var_1A9]
test	eax, eax
jnz	loc_777B36
lea	ecx, [ebp+var_39]
mov	[ebp+var_1B0], ecx
mov	[ebp+var_4], 0
mov	edx, [ebp+var_124]
or	edx, 1
mov	[ebp+var_124], edx
mov	eax, [ebp+var_1B0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp+var_38]
call	sub_407D30
mov	[ebp+var_4], 1
mov	eax, [ebp+var_124]
or	eax, 2
mov	[ebp+var_124], eax
lea	ecx, [ebp+var_1D]
push	ecx
mov	ecx, [ebp+var_1A8]
call	sub_778270
mov	[ebp+var_1B4], eax
mov	edx, [ebp+var_1B4]
mov	[ebp+var_1B8], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_124]
or	eax, 4
mov	[ebp+var_124], eax
mov	ecx, [ebp+var_10]
add	ecx, 10h
mov	[ebp+var_138], ecx
mov	edx, [ebp+var_138]
mov	eax, [edx+10h]
mov	[ebp+var_13C], eax
mov	ecx, [ebp+var_138]
mov	edx, [ecx+14h]
mov	[ebp+var_140], edx
mov	eax, [ebp+var_28]
mov	[ebp+var_144], eax
mov	ecx, [ebp+var_24]
mov	[ebp+var_148], ecx
mov	edx, [ebp+var_13C]
push	edx
mov	eax, [ebp+var_140]
push	eax
mov	ecx, [ebp+var_144]
push	ecx
mov	edx, [ebp+var_148]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
movzx	edx, cl
test	edx, edx
jnz	short loc_777B36
mov	[ebp+var_1BC], 0
jmp	short loc_777B40

loc_777B36:
mov	[ebp+var_1BC], 1

loc_777B40:
mov	al, byte ptr [ebp+var_1BC]
mov	[ebp+var_11], al
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_124]
and	ecx, 4
jz	short loc_777B62
and	[ebp+var_124], 0FFFFFFFBh

loc_777B62:
mov	[ebp+var_4], 0
mov	edx, [ebp+var_124]
and	edx, 2
jz	short loc_777B8E
and	[ebp+var_124], 0FFFFFFFDh
mov	[ebp+var_4], 3
lea	ecx, [ebp+var_38]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0

loc_777B8E:
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_124]
and	eax, 1
jz	short loc_777BA7
and	[ebp+var_124], 0FFFFFFFEh

loc_777BA7:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jz	loc_777D54
lea	edx, [ebp+var_115]
mov	[ebp+var_1C0], edx
mov	[ebp+var_4], 4
mov	eax, [ebp+var_1C0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
lea	ecx, [ebp+var_114]
call	sub_407D30
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_FC]
call	sub_777F70
mov	[ebp+var_1C4], eax
mov	eax, [ebp+var_1C4]
mov	[ebp+var_160], eax
mov	byte ptr [ebp+var_4], 6
lea	ecx, [ebp+var_114]
push	ecx
lea	ecx, [ebp+var_A8]
call	sub_403850
mov	byte ptr [ebp+var_4], 7
lea	edx, [ebp+var_90]
mov	[ebp+var_15C], edx
mov	eax, [ebp+var_160]
push	eax
mov	ecx, [ebp+var_15C]
call	sub_7783B0
mov	byte ptr [ebp+var_4], 8
mov	ecx, [ebp+var_160]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_15C]
add	ecx, 30h
call	sub_778420
mov	edx, [ebp+var_160]
add	edx, 48h
mov	eax, [ebp+var_15C]
add	eax, 48h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	byte ptr [ebp+var_4], 7
mov	byte ptr [ebp+var_4], 6
lea	eax, [ebp+var_A8]
mov	[ebp+var_17C], eax
mov	byte ptr [ebp+var_4], 9
lea	ecx, [ebp+var_178]
mov	[ebp+var_168], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_164], edx
mov	eax, [ebp+var_168]
mov	ecx, [ebp+var_164]
mov	[eax], ecx
mov	edx, [ebp+var_17C]
push	edx
push	ecx
mov	[ebp+var_174], esp
mov	eax, [ebp+var_178]
mov	[ebp+var_170], eax
mov	ecx, [ebp+var_174]
mov	edx, [ebp+var_170]
mov	[ecx], edx
lea	eax, [ebp+var_120]
push	eax
mov	ecx, [ebp+var_1A8]
call	sub_778EE0
lea	ecx, [ebp+var_120]
mov	[ebp+var_1C8], ecx
mov	edx, [ebp+var_1C8]
mov	eax, [edx]
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 0Ah
lea	ecx, [ebp+var_90]
call	sub_778060
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 0Bh
lea	ecx, [ebp+var_A8]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 6
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_FC]
call	sub_778060
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 0Ch
lea	ecx, [ebp+var_114]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 4
mov	[ebp+var_4], 0FFFFFFFFh

loc_777D54:
mov	eax, [ebp+var_10]
add	eax, 28h
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_7779A0 endp

align 10h


; Attributes: bp-based frame

sub_777D70 proc	near

var_8= dword ptr -8
var_3= word ptr	-3
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_777DDB
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	eax, [eax+8]
sub	eax, [ecx+4]
cdq
mov	ecx, 28h
idiv	ecx
cmp	eax, [ebp+arg_4]
jb	short loc_777DB7
xor	edx, edx
mov	[ebp+var_1], dl
lea	eax, [ebp+var_1]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_779C60
jmp	short loc_777DDB

loc_777DB7:
xor	ecx, ecx
mov	byte ptr [ebp+var_3+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_3], dl
push	0
mov	eax, [ebp+arg_4]
push	eax
lea	ecx, [ebp+var_3]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_779A40

loc_777DDB:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_777D70 endp

align 10h


; Attributes: bp-based frame

sub_777DF0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_777DF0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 88h
mov	[ebp+var_10], 0
mov	[ebp+var_4], 2
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_403850
mov	byte ptr [ebp+var_4], 3
lea	ecx, [ebp+arg_1C]
push	ecx
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_776FC0
mov	byte ptr [ebp+var_4], 2
mov	edx, [ebp+var_10]
or	edx, 1
mov	[ebp+var_10], edx
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 4
lea	ecx, [ebp+arg_4]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
lea	ecx, [ebp+arg_1C]
call	sub_777080
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_777DF0 endp

align 10h


; Attributes: bp-based frame

sub_777E80 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_C]
jz	short loc_777E95
xor	al, al
jmp	loc_777F25

loc_777E95:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jz	short loc_777EDA
mov	edx, [ebp+arg_0]
add	edx, [ebp+arg_4]
mov	[ebp+var_4], edx
jmp	short loc_777EBA

loc_777EA8:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx

loc_777EBA:
mov	edx, [ebp+arg_0]
cmp	edx, [ebp+var_4]
jnb	short loc_777ED8
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx]
cmp	ecx, eax
jz	short loc_777ED6
xor	al, al
jmp	short loc_777F25

loc_777ED6:
jmp	short loc_777EA8

loc_777ED8:
jmp	short loc_777F23

loc_777EDA:
mov	ecx, [ebp+arg_0]
add	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
jmp	short loc_777EF7

loc_777EE5:
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax

loc_777EF7:
mov	ecx, [ebp+arg_0]
cmp	ecx, [ebp+var_8]
jnb	short loc_777F23
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx]
movzx	ecx, ds:byte_14455A8[eax]
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx]
movzx	edx, ds:byte_14455A8[eax]
cmp	ecx, edx
jz	short loc_777F21
xor	al, al
jmp	short loc_777F25

loc_777F21:
jmp	short loc_777EE5

loc_777F23:
mov	al, 1

loc_777F25:
mov	esp, ebp
pop	ebp
retn
sub_777E80 endp

align 10h


; Attributes: bp-based frame

sub_777F30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
call	??0exception@std@@QAE@ABV01@@Z ; std::exception::exception(exception::exception	const &)
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx], offset	off_14454A0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_777F30 endp

align 10h


; Attributes: bp-based frame

sub_777F70 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_36=	byte ptr -36h
var_35=	byte ptr -35h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_777F70
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 64h
mov	[ebp+var_68], ecx
lea	eax, [ebp+var_D]
mov	[ebp+var_6C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_6C]
push	ecx
mov	ecx, [ebp+var_68]
call	sub_4022A0
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_68]
add	ecx, 18h
call	sub_7781D0
mov	[ebp+var_4], 0FFFFFFFFh
mov	edx, [ebp+var_68]
add	edx, 30h
mov	[ebp+var_64], edx
lea	eax, [ebp+var_35]
mov	[ebp+var_70], eax
lea	ecx, [ebp+var_36]
mov	[ebp+var_60], ecx
xor	edx, edx
mov	[ebp+var_48], edx
mov	[ebp+var_44], edx
mov	[ebp+var_40], edx
mov	[ebp+var_3C], edx
mov	eax, [ebp+var_48]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_44]
mov	[ebp+var_58], ecx
mov	edx, [ebp+var_40]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_3C]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_64]
mov	edx, [ebp+var_5C]
mov	[ecx], edx
mov	eax, [ebp+var_58]
mov	[ecx+4], eax
mov	edx, [ebp+var_54]
mov	[ecx+8], edx
mov	eax, [ebp+var_50]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_64]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_64]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_64]
mov	ecx, [ebp+var_64]
mov	[eax+8], ecx
mov	edx, [ebp+var_64]
mov	eax, [ebp+var_64]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_64]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_60]
mov	al, [edx]
mov	ecx, [ebp+var_64]
mov	[ecx+14h], al
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_777F70 endp

align 10h


; Attributes: bp-based frame

sub_778060 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778060
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_20]
add	eax, 30h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_778490
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_20]
add	ecx, 18h
mov	[ebp+var_14], ecx
mov	byte ptr [ebp+var_4], 5
mov	ecx, [ebp+var_14]
call	sub_778440
mov	byte ptr [ebp+var_4], 4
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 6
mov	ecx, [ebp+var_20]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_778060 endp

align 10h


; Attributes: bp-based frame

sub_778100 proc	near

var_28=	dword ptr -28h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778100
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1Ch
mov	[ebp+var_28], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_28]
add	ecx, 18h
call	sub_778060
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_28]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_778100 endp

align 10h


; Attributes: bp-based frame

sub_778160 proc	near

var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778160
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
mov	[ebp+var_1C], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_1C]
add	eax, 18h
mov	[ebp+var_10], eax
mov	byte ptr [ebp+var_4], 2
mov	ecx, [ebp+var_10]
call	sub_778440
mov	byte ptr [ebp+var_4], 1
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 3
mov	ecx, [ebp+var_1C]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_778160 endp

align 10h


; Attributes: bp-based frame

sub_7781D0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ebp
mov	ebp, esp
sub	esp, 34h
mov	[ebp+var_30], ecx
lea	eax, [ebp+var_1]
mov	[ebp+var_34], eax
lea	ecx, [ebp+var_2]
mov	[ebp+var_2C], ecx
xor	edx, edx
mov	[ebp+var_14], edx
mov	[ebp+var_10], edx
mov	[ebp+var_C], edx
mov	[ebp+var_8], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_10]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_28]
mov	[ecx], edx
mov	eax, [ebp+var_24]
mov	[ecx+4], eax
mov	edx, [ebp+var_20]
mov	[ecx+8], edx
mov	eax, [ebp+var_1C]
mov	[ecx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_30]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_30]
mov	[eax+8], ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+var_2C]
mov	al, [edx]
mov	ecx, [ebp+var_30]
mov	[ecx+14h], al
mov	eax, [ebp+var_30]
mov	esp, ebp
pop	ebp
retn
sub_7781D0 endp

align 10h


; Attributes: bp-based frame

sub_778270 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_8]
call	sub_7784E0
mov	ecx, [ebp+var_4]
or	ecx, 1
mov	[ebp+var_4], ecx
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_778270 endp

align 10h


; Attributes: bp-based frame

sub_7782A0 proc	near

var_24=	dword ptr -24h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_24], ecx
push	1
push	0
push	0
mov	ecx, [ebp+var_24]
call	sub_776C70
test	eax, eax
jz	short loc_7782D5
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_24]
mov	edx, [ecx+1Ch]
mov	[eax+28h], edx
mov	eax, [ebp+var_24]
mov	ecx, [eax+1Ch]
mov	edx, [ebp+arg_0]
mov	[ecx+2Ch], edx
jmp	short loc_7782E8

loc_7782D5:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+28h], 0
mov	ecx, [ebp+var_24]
mov	edx, [ebp+arg_0]
mov	[ecx+18h], edx

loc_7782E8:
mov	eax, [ebp+var_24]
mov	ecx, [ebp+arg_0]
mov	[eax+1Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_24]
mov	[edx+10h], eax
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+2Ch], 0
mov	esp, ebp
pop	ebp
retn	4
sub_7782A0 endp

align 10h


; Attributes: bp-based frame

sub_778310 proc	near

var_28=	dword ptr -28h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	[ebp+var_28], ecx
push	1
push	0
push	0
mov	ecx, [ebp+var_28]
call	sub_776C70
mov	[ebp+var_4], eax
jmp	short loc_778335

loc_77832C:
mov	eax, [ebp+var_4]
mov	ecx, [eax+2Ch]
mov	[ebp+var_4], ecx

loc_778335:
cmp	[ebp+var_4], 0
jz	short loc_778347
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
jmp	short loc_77832C

loc_778347:
mov	eax, [ebp+var_28]
mov	dword ptr [eax+18h], 0
mov	esp, ebp
pop	ebp
retn
sub_778310 endp

align 10h


; Attributes: bp-based frame

sub_778360 proc	near

var_18=	dword ptr -18h
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx
push	1
push	0
push	0
mov	ecx, [ebp+var_18]
call	sub_776E10
mov	[ebp+var_4], eax
jmp	short loc_778385

loc_77837C:
mov	eax, [ebp+var_4]
mov	ecx, [eax+18h]
mov	[ebp+var_4], ecx

loc_778385:
cmp	[ebp+var_4], 0
jz	short loc_778397
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0
jmp	short loc_77837C

loc_778397:
mov	eax, [ebp+var_18]
mov	dword ptr [eax+20h], 0
mov	esp, ebp
pop	ebp
retn
sub_778360 endp

align 10h


; Attributes: bp-based frame

sub_7783B0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_7783B0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 30h
mov	[ebp+var_3C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_3C]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_3C]
add	ecx, 18h
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_38]
call	sub_778510
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_3C]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_7783B0 endp

align 10h


; Attributes: bp-based frame

sub_778420 proc	near

var_2C=	dword ptr -2Ch
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	[ebp+var_2C], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_2C]
call	sub_778660
mov	eax, [ebp+var_2C]
mov	esp, ebp
pop	ebp
retn	4
sub_778420 endp

align 10h


; Attributes: bp-based frame

sub_778440 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_778485
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_778AE0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_778485:
mov	esp, ebp
pop	ebp
retn
sub_778440 endp

align 10h


; Attributes: bp-based frame

sub_778490 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+10h], 0
jz	short loc_7784D5
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
push	edx		; void *
mov	ecx, [ebp+var_4]
call	sub_778E60
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+8], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_4]
mov	dword ptr [edx+10h], 0

loc_7784D5:
mov	esp, ebp
pop	ebp
retn
sub_778490 endp

align 10h


; Attributes: bp-based frame

sub_7784E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_8]
mov	cl, [eax+14h]
mov	edx, [ebp+arg_0]
mov	[edx], cl
mov	eax, [ebp+var_4]
or	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_7784E0 endp

align 10h


; Attributes: bp-based frame

sub_778510 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778660
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_7787B0
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_48]
call	sub_5E11A0
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_48]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_48]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 0
jz	short loc_778634
mov	ecx, [ebp+var_48]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_778990
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_40], eax

loc_7785F1:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+8], 0
jz	short loc_778605
mov	edx, [ebp+var_40]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
jmp	short loc_7785F1

loc_778605:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx

loc_778617:
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_77862B
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_44], ecx
jmp	short loc_778617

loc_77862B:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_778634:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_778510 endp

align 10h


; Attributes: bp-based frame

sub_778660 proc	near

var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778660
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 44h
mov	[ebp+var_48], ecx
lea	eax, [ebp+var_D]
push	eax
mov	ecx, [ebp+arg_0]
call	sub_7787B0
mov	[ebp+var_4C], eax
mov	ecx, [ebp+var_4C]
mov	[ebp+var_50], ecx
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_20], edx
mov	[ebp+var_1C], edx
mov	[ebp+var_18], edx
mov	[ebp+var_14], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_34], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_2C], edx
mov	eax, [ebp+var_14]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_34]
mov	[ecx], edx
mov	eax, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_2C]
mov	[ecx+8], edx
mov	eax, [ebp+var_28]
mov	[ecx+0Ch], eax
mov	byte ptr [ebp+var_4], 1
mov	ecx, [ebp+var_48]
call	sub_5E11A0
mov	byte ptr [ebp+var_4], 3
mov	ecx, [ebp+var_48]
mov	dword ptr [ecx+10h], 0
mov	edx, [ebp+arg_0]
mov	al, [edx+14h]
mov	ecx, [ebp+var_48]
mov	[ecx+14h], al
mov	byte ptr [ebp+var_4], 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 0
jz	short loc_778784
mov	ecx, [ebp+var_48]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_3C]
push	edx
mov	ecx, [ebp+var_48]
call	sub_778D10
mov	ecx, [ebp+var_48]
mov	[ecx+4], eax
mov	edx, [ebp+var_48]
mov	eax, [edx+4]
mov	[ebp+var_40], eax

loc_778741:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+8], 0
jz	short loc_778755
mov	edx, [ebp+var_40]
mov	eax, [edx+8]
mov	[ebp+var_40], eax
jmp	short loc_778741

loc_778755:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+var_40]
mov	[ecx+8], edx
mov	eax, [ebp+var_48]
mov	ecx, [eax+4]
mov	[ebp+var_44], ecx

loc_778767:
mov	edx, [ebp+var_44]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_77877B
mov	eax, [ebp+var_44]
mov	ecx, [eax+0Ch]
mov	[ebp+var_44], ecx
jmp	short loc_778767

loc_77877B:
mov	edx, [ebp+var_48]
mov	eax, [ebp+var_44]
mov	[edx+0Ch], eax

loc_778784:
mov	ecx, [ebp+var_48]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+10h], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_48]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_778660 endp

align 10h


; Attributes: bp-based frame

sub_7787B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_4]
or	eax, 1
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
mov	esp, ebp
pop	ebp
retn	4
sub_7787B0 endp

align 10h


; Attributes: bp-based frame

sub_7787E0 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A550
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_34]
jnz	short loc_77883C
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_77A030
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_778942

loc_77883C:
cmp	[ebp+arg_10], 0
jnz	short loc_7788C0
cmp	[ebp+arg_C], 0
jnz	short loc_7788B7
lea	edx, [ebp+var_12]
mov	[ebp+var_38], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+10h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+14h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+10h]
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+14h]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_7788C0

loc_7788B7:
mov	[ebp+var_40], 1
jmp	short loc_7788C7

loc_7788C0:
mov	[ebp+var_40], 0

loc_7788C7:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_7788E0
and	[ebp+var_18], 0FFFFFFFEh

loc_7788E0:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_778916
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_34]
call	sub_77A030
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_778914
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_778914:
jmp	short loc_778942

loc_778916:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_77A030
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_778942
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_778942:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_34]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_34]
mov	[edx+10h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_7787E0 endp

align 10h


; Attributes: bp-based frame

sub_778990 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778990
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_77A030
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_778A0F
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_778990
mov	[ebp+var_28], eax
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_28]
mov	[edx+0Ch], eax

loc_778A0F:
mov	ecx, [ebp+var_14]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+arg_0], eax

loc_778A1E:
cmp	[ebp+arg_0], 0
jz	short loc_778A97
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_24]
call	sub_77A030
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_2C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_778A86
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
push	edx
mov	ecx, [ebp+var_24]
call	sub_778990
mov	[ebp+var_30], eax
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_30]
mov	[eax+0Ch], ecx

loc_778A86:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_778A1E

loc_778A97:
jmp	short loc_778ABB

loc_778A99:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_24]
call	sub_778AE0
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_778AC2
retn

loc_778ABB:
mov	[ebp+var_4], 0FFFFFFFFh

loc_778AC2:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_778990 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_778AE0(void	*)
sub_778AE0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_18], ecx

loc_778AE9:
cmp	[ebp+arg_0], 0
jz	short loc_778B56
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_18]
call	sub_778AE0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_77A480
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_778B4E
mov	edx, 1
imul	edx, 30h
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 80h
jbe	short loc_778B3E
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_778B4E

loc_778B3E:
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E0D0
add	esp, 8

loc_778B4E:
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
jmp	short loc_778AE9

loc_778B56:
mov	esp, ebp
pop	ebp
retn	4
sub_778AE0 endp

align 10h


; Attributes: bp-based frame

sub_778B60 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A550
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_34]
jnz	short loc_778BBC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_77A100
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_778CC2

loc_778BBC:
cmp	[ebp+arg_10], 0
jnz	short loc_778C40
cmp	[ebp+arg_C], 0
jnz	short loc_778C37
lea	edx, [ebp+var_12]
mov	[ebp+var_38], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+10h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+14h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+10h]
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+14h]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_778C40

loc_778C37:
mov	[ebp+var_40], 1
jmp	short loc_778C47

loc_778C40:
mov	[ebp+var_40], 0

loc_778C47:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_778C60
and	[ebp+var_18], 0FFFFFFFEh

loc_778C60:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_778C96
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_34]
call	sub_77A100
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_778C94
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_778C94:
jmp	short loc_778CC2

loc_778C96:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_77A100
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_778CC2
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_778CC2:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_34]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_34]
mov	[edx+10h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_778B60 endp

align 10h


; Attributes: bp-based frame

sub_778D10 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778D10
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 20h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_24], ecx
mov	eax, [ebp+arg_0]
add	eax, 10h
push	eax
mov	ecx, [ebp+var_24]
call	sub_77A100
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+arg_0]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_1C]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+0Ch], 0
jz	short loc_778D8F
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx
mov	ecx, [ebp+var_24]
call	sub_778D10
mov	[ebp+var_28], eax
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_28]
mov	[edx+0Ch], eax

loc_778D8F:
mov	ecx, [ebp+var_14]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+arg_0], eax

loc_778D9E:
cmp	[ebp+arg_0], 0
jz	short loc_778E17
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx
mov	ecx, [ebp+var_24]
call	sub_77A100
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_2C]
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_20]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_18]
mov	[ecx+8], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+0Ch], 0
jz	short loc_778E06
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
push	edx
mov	ecx, [ebp+var_24]
call	sub_778D10
mov	[ebp+var_30], eax
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_30]
mov	[eax+0Ch], ecx

loc_778E06:
mov	edx, [ebp+var_18]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
mov	[ebp+arg_0], ecx
jmp	short loc_778D9E

loc_778E17:
jmp	short loc_778E3B

loc_778E19:
mov	edx, [ebp+var_14]
push	edx		; void *
mov	ecx, [ebp+var_24]
call	sub_778E60
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_778E42
retn

loc_778E3B:
mov	[ebp+var_4], 0FFFFFFFFh

loc_778E42:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_778D10 endp

align 10h


; Attributes: bp-based frame

; int __stdcall	sub_778E60(void	*)
sub_778E60 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	[ebp+var_48], ecx

loc_778E69:
cmp	[ebp+arg_0], 0
jz	short loc_778ED6
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
push	ecx		; void *
mov	ecx, [ebp+var_48]
call	sub_778E60
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 10h
push	ecx		; void *
call	sub_77A4E0
add	esp, 4
cmp	[ebp+arg_0], 0
jz	short loc_778ECE
mov	edx, 1
imul	edx, 34h
mov	[ebp+var_44], edx
cmp	[ebp+var_44], 80h
jbe	short loc_778EBE
mov	eax, [ebp+arg_0]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_778ECE

loc_778EBE:
mov	ecx, [ebp+var_44]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77E0D0
add	esp, 8

loc_778ECE:
mov	eax, [ebp+var_4]
mov	[ebp+arg_0], eax
jmp	short loc_778E69

loc_778ED6:
mov	esp, ebp
pop	ebp
retn	4
sub_778E60 endp

align 10h


; Attributes: bp-based frame

sub_778EE0 proc	near

var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1CC= dword ptr -1CCh
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_158= dword ptr -158h
var_151= byte ptr -151h
var_150= dword ptr -150h
var_128= dword ptr -128h
var_121= byte ptr -121h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_105= byte ptr -105h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_E9=	byte ptr -0E9h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C5=	byte ptr -0C5h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	byte ptr -54h
var_4A=	byte ptr -4Ah
var_49=	byte ptr -49h
var_48=	byte ptr -48h
var_47=	byte ptr -47h
var_46=	byte ptr -46h
var_45=	byte ptr -45h
var_44=	byte ptr -44h
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_2D=	byte ptr -2Dh
var_2C=	byte ptr -2Ch
var_2B=	byte ptr -2Bh
var_2A=	byte ptr -2Ah
var_29=	byte ptr -29h
var_28=	byte ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_778EE0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 1C8h
mov	[ebp+var_18C], ecx
mov	[ebp+var_58], 0
mov	eax, [ebp+var_18C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	loc_779244
mov	edx, [ebp+var_18C]
xor	eax, eax
cmp	dword ptr [edx+10h], 0
setz	al
movzx	ecx, al
test	ecx, ecx
jz	short loc_778F61
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_77A700
mov	[ebp+var_60], eax
mov	ecx, [ebp+var_60]
mov	edx, [ecx]
mov	[ebp+var_5C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_5C]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
jmp	loc_77973D

loc_778F61:
lea	edx, [ebp+var_2A]
mov	[ebp+var_190], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
mov	[ebp+var_6C], eax
lea	ecx, [ebp+var_65]
mov	[ebp+var_194], ecx
mov	edx, [ebp+var_6C]
add	edx, 10h
mov	[ebp+var_64], edx
mov	eax, [ebp+var_64]
mov	ecx, [eax+10h]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_64]
mov	eax, [edx+14h]
mov	[ebp+var_74], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+10h]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+14h]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+var_70]
push	edx
mov	eax, [ebp+var_74]
push	eax
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+var_7C]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
mov	[ebp+var_29], cl
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_29]
test	edx, edx
jz	short loc_779008
push	0
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D
jmp	loc_77923F

loc_779008:
lea	ecx, [ebp+var_2B]
mov	[ebp+var_198], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
mov	[ebp+var_88], edx
lea	eax, [ebp+var_81]
mov	[ebp+var_19C], eax
mov	ecx, [ebp+var_88]
add	ecx, 10h
mov	[ebp+var_80], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+10h]
mov	[ebp+var_8C], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+14h]
mov	[ebp+var_90], edx
mov	eax, [ebp+var_80]
mov	ecx, [eax+10h]
mov	[ebp+var_94], ecx
mov	edx, [ebp+var_80]
mov	eax, [edx+14h]
mov	[ebp+var_98], eax
mov	ecx, [ebp+var_8C]
push	ecx
mov	edx, [ebp+var_90]
push	edx
mov	eax, [ebp+var_94]
push	eax
mov	ecx, [ebp+var_98]
push	ecx
call	sub_4051D0
add	esp, 10h
xor	edx, edx
test	eax, eax
setl	dl
mov	[ebp+var_11], dl
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_7790C2
mov	ecx, [ebp+arg_4]
mov	[ebp+var_9C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_9C]
mov	[edx], eax
mov	eax, [ebp+arg_0]
jmp	loc_77973D

loc_7790C2:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_18C]
jnz	short loc_779107
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D

loc_779107:
lea	edx, [ebp+var_2D]
mov	[ebp+var_1A0], edx
mov	[ebp+var_4], 2
mov	eax, [ebp+var_10]
mov	[ebp+var_A8], eax
lea	ecx, [ebp+var_A1]
mov	[ebp+var_1A4], ecx
mov	edx, [ebp+var_A8]
add	edx, 10h
mov	[ebp+var_A0], edx
mov	eax, [ebp+var_A0]
mov	ecx, [eax+10h]
mov	[ebp+var_AC], ecx
mov	edx, [ebp+var_A0]
mov	eax, [edx+14h]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+10h]
mov	[ebp+var_B4], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+14h]
mov	[ebp+var_B8], ecx
mov	edx, [ebp+var_AC]
push	edx
mov	eax, [ebp+var_B0]
push	eax
mov	ecx, [ebp+var_B4]
push	ecx
mov	edx, [ebp+var_B8]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
mov	[ebp+var_2C], cl
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_2C]
test	edx, edx
jz	short loc_779205
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_7791DE
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D
jmp	short loc_779203

loc_7791DE:
push	0
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D

loc_779203:
jmp	short loc_77923F

loc_779205:
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+var_38]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_77A700
mov	[ebp+var_C0], eax
mov	edx, [ebp+var_C0]
mov	eax, [edx]
mov	[ebp+var_BC], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_BC]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
jmp	loc_77973D

loc_77923F:
jmp	loc_77973D

loc_779244:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_18C]
jnz	loc_77936C
lea	ecx, [ebp+var_3A]
mov	[ebp+var_1A8], ecx
mov	[ebp+var_4], 3
mov	edx, [ebp+var_18C]
mov	eax, [edx+0Ch]
mov	[ebp+var_CC], eax
lea	ecx, [ebp+var_C5]
mov	[ebp+var_1AC], ecx
mov	edx, [ebp+var_CC]
add	edx, 10h
mov	[ebp+var_C4], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+10h]
mov	[ebp+var_D0], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+14h]
mov	[ebp+var_D4], eax
mov	ecx, [ebp+var_C4]
mov	edx, [ecx+10h]
mov	[ebp+var_D8], edx
mov	eax, [ebp+var_C4]
mov	ecx, [eax+14h]
mov	[ebp+var_DC], ecx
mov	edx, [ebp+var_D0]
push	edx
mov	eax, [ebp+var_D4]
push	eax
mov	ecx, [ebp+var_D8]
push	ecx
mov	edx, [ebp+var_DC]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
mov	[ebp+var_39], cl
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_39]
test	edx, edx
jz	short loc_77932D
mov	eax, [ebp+arg_4]
push	eax
push	0
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_18C]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D
jmp	short loc_779367

loc_77932D:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_44]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_77A700
mov	[ebp+var_E4], eax
mov	ecx, [ebp+var_E4]
mov	edx, [ecx]
mov	[ebp+var_E0], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_E0]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
jmp	loc_77973D

loc_779367:
jmp	loc_77973D

loc_77936C:
mov	edx, [ebp+arg_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_45]
mov	[ebp+var_1B0], ecx
mov	[ebp+var_4], 4
mov	edx, [ebp+arg_4]
mov	[ebp+var_F0], edx
lea	eax, [ebp+var_E9]
mov	[ebp+var_1B4], eax
mov	ecx, [ebp+var_F0]
add	ecx, 10h
mov	[ebp+var_E8], ecx
mov	edx, [ebp+var_E8]
mov	eax, [edx+10h]
mov	[ebp+var_F4], eax
mov	ecx, [ebp+var_E8]
mov	edx, [ecx+14h]
mov	[ebp+var_F8], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+10h]
mov	[ebp+var_FC], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+14h]
mov	[ebp+var_100], eax
mov	ecx, [ebp+var_F4]
push	ecx
mov	edx, [ebp+var_F8]
push	edx
mov	eax, [ebp+var_FC]
push	eax
mov	ecx, [ebp+var_100]
push	ecx
call	sub_4051D0
add	esp, 10h
xor	edx, edx
test	eax, eax
setl	dl
mov	[ebp+var_12], dl
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_12]
test	eax, eax
jz	loc_7794DD
lea	ecx, [ebp+var_47]
mov	[ebp+var_1B8], ecx
mov	[ebp+var_4], 5
mov	edx, [ebp+var_58]
or	edx, 1
mov	[ebp+var_58], edx
mov	eax, [ebp+var_18]
mov	[ebp+var_10C], eax
lea	ecx, [ebp+var_105]
mov	[ebp+var_1BC], ecx
mov	edx, [ebp+var_10C]
add	edx, 10h
mov	[ebp+var_104], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+10h]
mov	[ebp+var_110], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+14h]
mov	[ebp+var_114], eax
mov	ecx, [ebp+var_104]
mov	edx, [ecx+10h]
mov	[ebp+var_118], edx
mov	eax, [ebp+var_104]
mov	ecx, [eax+14h]
mov	[ebp+var_11C], ecx
mov	edx, [ebp+var_110]
push	edx
mov	eax, [ebp+var_114]
push	eax
mov	ecx, [ebp+var_118]
push	ecx
mov	edx, [ebp+var_11C]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_7794DD
mov	[ebp+var_1C0], 1
jmp	short loc_7794E7

loc_7794DD:
mov	[ebp+var_1C0], 0

loc_7794E7:
mov	al, byte ptr [ebp+var_1C0]
mov	[ebp+var_46], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 1
jz	short loc_779503
and	[ebp+var_58], 0FFFFFFFEh

loc_779503:
movzx	edx, [ebp+var_46]
test	edx, edx
jz	short loc_779565
mov	eax, [ebp+var_18]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_77953B
mov	ecx, [ebp+var_18]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D
jmp	short loc_779560

loc_77953B:
push	0
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D

loc_779560:
jmp	loc_77973D

loc_779565:
mov	eax, [ebp+arg_4]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
push	ecx
call	sub_77E2F0
add	esp, 4
mov	[ebp+var_1C], eax
movzx	edx, [ebp+var_12]
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_1D], dl
movzx	eax, [ebp+var_12]
test	eax, eax
jnz	short loc_7795E1
lea	ecx, [ebp+var_48]
mov	[ebp+var_1C4], ecx
mov	[ebp+var_4], 6
mov	edx, [ebp+arg_4]
mov	[ebp+var_128], edx
lea	eax, [ebp+var_121]
mov	[ebp+var_1C8], eax
mov	ecx, [ebp+var_128]
add	ecx, 10h
mov	[ebp+var_120], ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+var_120]
push	eax
call	sub_4050C0
add	esp, 8
mov	[ebp+var_1D], al
mov	[ebp+var_4], 0FFFFFFFFh

loc_7795E1:
movzx	ecx, [ebp+var_12]
test	ecx, ecx
jnz	short loc_77965F
movzx	edx, [ebp+var_1D]
test	edx, edx
jz	short loc_77965F
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18C]
jz	short loc_779653
lea	ecx, [ebp+var_4A]
mov	[ebp+var_1CC], ecx
mov	[ebp+var_4], 7
mov	edx, [ebp+var_58]
or	edx, 2
mov	[ebp+var_58], edx
mov	eax, [ebp+var_1C]
mov	[ebp+var_158], eax
lea	ecx, [ebp+var_151]
mov	[ebp+var_1D0], ecx
mov	edx, [ebp+var_158]
add	edx, 10h
mov	[ebp+var_150], edx
mov	eax, [ebp+var_150]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_4050C0
add	esp, 8
movzx	edx, al
test	edx, edx
jz	short loc_77965F

loc_779653:
mov	[ebp+var_1D4], 1
jmp	short loc_779669

loc_77965F:
mov	[ebp+var_1D4], 0

loc_779669:
mov	al, byte ptr [ebp+var_1D4]
mov	[ebp+var_49], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_58]
and	ecx, 2
jz	short loc_779685
and	[ebp+var_58], 0FFFFFFFDh

loc_779685:
movzx	edx, [ebp+var_49]
test	edx, edx
jz	short loc_7796E1
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_7796BD
mov	ecx, [ebp+arg_4]
push	ecx
push	0
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	loc_77973D
jmp	short loc_7796DF

loc_7796BD:
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_18C]
call	sub_77A550
mov	eax, [ebp+arg_0]
jmp	short loc_77973D

loc_7796DF:
jmp	short loc_77973D

loc_7796E1:
movzx	eax, [ebp+var_12]
movzx	ecx, [ebp+var_1D]
cmp	eax, ecx
jnz	short loc_779708
mov	edx, [ebp+arg_4]
mov	[ebp+var_180], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_180]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
jmp	short loc_77973D
jmp	short loc_77973D

loc_779708:
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_18C]
call	sub_77A700
mov	[ebp+var_188], eax
mov	ecx, [ebp+var_188]
mov	edx, [ecx]
mov	[ebp+var_184], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_184]
mov	[eax], ecx
mov	eax, [ebp+arg_0]

loc_77973D:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	0Ch
sub_778EE0 endp

align 10h


; Attributes: bp-based frame

sub_779750 proc	near

var_118= byte ptr -118h
var_114= byte ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_105= byte ptr -105h
var_6E=	byte ptr -6Eh
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 118h
mov	[ebp+var_110], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	dl, [ecx]
mov	[ebp+var_114], dl
cmp	[ebp+var_114], 21h
jz	loc_779846
cmp	[ebp+var_114], 3Fh
jz	short loc_779796
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_110]
call	sub_77A970
jmp	loc_779A38

loc_779796:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 78h
jz	short loc_7797BD
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 58h
jnz	short loc_779832

loc_7797BD:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 6Dh
jz	short loc_7797D9
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 4Dh
jnz	short loc_779832

loc_7797D9:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+2]
cmp	eax, 6Ch
jz	short loc_7797F5
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+2]
cmp	eax, 4Ch
jnz	short loc_779832

loc_7797F5:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+3]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_6E], cl
movzx	edx, [ebp+var_6E]
test	edx, edx
jz	short loc_779832
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 4
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_110]
call	sub_77ABC0
jmp	loc_779A38
jmp	short loc_779846

loc_779832:
mov	ecx, [ebp+arg_0]
push	ecx
mov	ecx, [ebp+var_110]
call	sub_77AD20
jmp	loc_779A38

loc_779846:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	cl, [eax+1]
mov	[ebp+var_118], cl
cmp	[ebp+var_118], 2Dh
jz	short loc_779878
cmp	[ebp+var_118], 44h
jz	loc_779926
cmp	[ebp+var_118], 5Bh
jz	short loc_7798AC
jmp	loc_7799BC

loc_779878:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 2Dh
jnz	short loc_7798A7
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 3
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_110]
call	sub_77AFF0
jmp	loc_779A38

loc_7798A7:
jmp	loc_7799BC

loc_7798AC:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 43h
jnz	short loc_779921
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 44h
jnz	short loc_779921
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+4]
cmp	edx, 41h
jnz	short loc_779921
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+5]
cmp	edx, 54h
jnz	short loc_779921
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+6]
cmp	edx, 41h
jnz	short loc_779921
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+7]
cmp	edx, 5Bh
jnz	short loc_779921
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_110]
call	sub_77B170
jmp	loc_779A38

loc_779921:
jmp	loc_7799BC

loc_779926:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+2]
cmp	eax, 4Fh
jnz	loc_7799BC
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+3]
cmp	eax, 43h
jnz	short loc_7799BC
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+4]
cmp	eax, 54h
jnz	short loc_7799BC
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+5]
cmp	eax, 59h
jnz	short loc_7799BC
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+6]
cmp	eax, 50h
jnz	short loc_7799BC
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+7]
cmp	eax, 45h
jnz	short loc_7799BC
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+8]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_105], cl
movzx	edx, [ebp+var_105]
test	edx, edx
jz	short loc_7799BC
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 9
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_110]
call	sub_77B2F0
jmp	short loc_779A38

loc_7799BC:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx

loc_7799C9:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 3Eh
jz	short loc_779A29
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_779A1A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_10C], edx
lea	ecx, [ebp+var_14]
call	sub_7965EC
mov	[ebp+var_14], offset off_14454A0
mov	[ebp+var_8], offset aUnexpectedEndO ; "unexpected end of data"
mov	eax, [ebp+var_10C]
mov	[ebp+var_4], eax
push	offset unk_1623934
lea	ecx, [ebp+var_14]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_779A1A:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	short loc_7799C9

loc_779A29:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
xor	eax, eax

loc_779A38:
mov	esp, ebp
pop	ebp
retn	4
sub_779750 endp

align 10h


; Attributes: bp-based frame

sub_779A40 proc	near

var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6A=	byte ptr -6Ah
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_2D=	byte ptr -2Dh
var_20=	word ptr -20h
var_1E=	word ptr -1Eh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_C= dword ptr  14h
arg_10=	byte ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_779A40
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 0D4h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_DC], ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_DC]
call	sub_77A1D0
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	[ebp+var_4C], ecx
xor	edx, edx
mov	[ebp+var_2D], dl
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	ecx, [ebp+var_DC]
add	ecx, 8
call	sub_777470
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 0
xor	eax, eax
mov	byte ptr [ebp+var_1E+1], al
xor	ecx, ecx
mov	byte ptr [ebp+var_1E], cl
mov	dl, byte ptr [ebp+var_1E]
mov	[ebp+var_55], dl
mov	eax, [ebp+var_DC]
mov	ecx, [eax]
mov	[ebp+var_54], ecx
push	0
lea	edx, [ebp+var_4D]
push	edx
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_54]
push	edx
call	sub_77C4E0
add	esp, 14h
mov	[ebp+var_E0], eax
mov	eax, [ebp+var_E0]
mov	[ebp+var_1C], eax
cmp	[ebp+arg_C], 1
jnz	short loc_779B13
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_77B650
add	esp, 8
mov	eax, [ebp+var_1C]
add	eax, 28h
mov	[ebp+var_1C], eax
jmp	short loc_779B3F

loc_779B13:
mov	ecx, [ebp+arg_C]
imul	ecx, 28h
add	ecx, [ebp+var_1C]
mov	[ebp+var_68], ecx
push	0
lea	edx, [ebp+var_69]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_68]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	sub_77C430
add	esp, 14h
mov	eax, [ebp+var_68]
mov	[ebp+var_1C], eax

loc_779B3F:
movzx	ecx, [ebp+arg_10]
test	ecx, ecx
jnz	short loc_779B8C
xor	edx, edx
mov	byte ptr [ebp+var_20+1], dl
xor	eax, eax
mov	byte ptr [ebp+var_20], al
mov	cl, byte ptr [ebp+var_20]
mov	[ebp+var_71], cl
mov	edx, [ebp+var_DC]
mov	eax, [edx+4]
mov	[ebp+var_70], eax
push	0
lea	ecx, [ebp+var_6A]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_70]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77C4E0
add	esp, 14h
mov	[ebp+var_E4], eax
mov	edx, [ebp+var_E4]
mov	[ebp+var_1C], edx

loc_779B8C:
jmp	short loc_779C01

loc_779B8E:
push	0
mov	eax, [ebp+var_1C]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
call	sub_779FB0
add	esp, 0Ch
mov	edx, [ebp+var_14]
mov	[ebp+var_8C], edx
cmp	[ebp+var_18], 0
jz	short loc_779BEB
mov	eax, [ebp+var_8C]
imul	eax, 28h
mov	[ebp+var_88], eax
cmp	[ebp+var_88], 80h
jbe	short loc_779BD8
mov	ecx, [ebp+var_18]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_779BEB

loc_779BD8:
mov	edx, [ebp+var_88]
push	edx
mov	eax, [ebp+var_18]
push	eax
call	sub_77E0D0
add	esp, 8

loc_779BEB:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_779C08
retn

loc_779C01:
mov	[ebp+var_4], 0FFFFFFFFh

loc_779C08:
mov	ecx, [ebp+var_DC]
call	sub_77A2C0
mov	ecx, [ebp+var_14]
imul	ecx, 28h
add	ecx, [ebp+var_18]
mov	[ebp+var_D8], ecx
mov	edx, [ebp+var_DC]
mov	eax, [ebp+var_18]
mov	[edx], eax
mov	ecx, [ebp+var_DC]
mov	edx, [ebp+var_1C]
mov	[ecx+4], edx
mov	eax, [ebp+var_DC]
mov	ecx, [ebp+var_D8]
mov	[eax+8], ecx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	14h
sub_779A40 endp

align 10h


; Attributes: bp-based frame

sub_779C60 proc	near

var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_8D=	byte ptr -8Dh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	dword ptr -4Ch
var_40=	byte ptr -40h
var_3F=	byte ptr -3Fh
var_3E=	byte ptr -3Eh
var_3D=	byte ptr -3Dh
var_3C=	dword ptr -3Ch
var_38=	byte ptr -38h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_779C60
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B4h
mov	[ebp+var_BC], ecx
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+arg_8]
cmp	ecx, [eax]
jb	short loc_779CAB
mov	edx, [ebp+var_BC]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+4]
jnb	short loc_779CAB
mov	[ebp+var_C0], 1
jmp	short loc_779CB5

loc_779CAB:
mov	[ebp+var_C0], 0

loc_779CB5:
movzx	ecx, byte ptr [ebp+var_C0]
test	ecx, ecx
jz	short loc_779D35
mov	edx, [ebp+arg_8]
mov	eax, [edx]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+arg_8]
add	ecx, 4
push	ecx
lea	ecx, [ebp+var_38]
call	sub_403850
mov	edx, [ebp+arg_8]
mov	eax, [edx+20h]
mov	ecx, [edx+24h]
mov	[ebp+var_1C], eax
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
xor	edx, edx
mov	[ebp+var_3D], dl
lea	eax, [ebp+var_3D]
push	eax
lea	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_BC]
call	sub_779C60
mov	[ebp+var_4], 0FFFFFFFFh
lea	ecx, [ebp+var_38]
mov	[ebp+var_4C], ecx
mov	[ebp+var_4], 1
mov	ecx, [ebp+var_4C]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
jmp	loc_779F99

loc_779D35:
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_10], eax
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+arg_4]
jbe	loc_779E9D
xor	edx, edx
mov	[ebp+var_3E], dl
mov	eax, [ebp+var_BC]
mov	ecx, [eax+4]
mov	[ebp+var_5C], ecx
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
mov	[ebp+var_58], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
sub	eax, ecx
mov	[ebp+var_54], eax
push	0
lea	ecx, [ebp+var_4D]
push	ecx
mov	edx, [ebp+var_5C]
push	edx
mov	eax, [ebp+var_58]
push	eax
mov	ecx, [ebp+var_54]
push	ecx
call	sub_77C4E0
add	esp, 14h
mov	edx, [ebp+arg_4]
imul	edx, 28h
mov	eax, [ebp+var_BC]
add	edx, [eax+4]
mov	ecx, [ebp+var_BC]
mov	[ecx+4], edx
xor	edx, edx
mov	[ebp+var_3F], dl
mov	eax, [ebp+var_14]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+arg_4]
imul	ecx, 28h
mov	edx, [ebp+var_14]
sub	edx, ecx
mov	[ebp+var_68], edx
mov	eax, [ebp+var_68]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_64], eax
jmp	short loc_779DFC

loc_779DF3:
mov	edx, [ebp+var_64]
sub	edx, 1
mov	[ebp+var_64], edx

loc_779DFC:
cmp	[ebp+var_64], 0
jle	short loc_779E44
mov	eax, [ebp+var_68]
sub	eax, 28h
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_6C]
sub	ecx, 28h
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
mov	eax, [ebp+var_68]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_68]
add	edx, 4
push	edx
mov	ecx, [ebp+var_6C]
add	ecx, 4
call	sub_4022F0
mov	eax, [ebp+var_68]
mov	ecx, [eax+20h]
mov	edx, [eax+24h]
mov	eax, [ebp+var_6C]
mov	[eax+20h], ecx
mov	[eax+24h], edx
jmp	short loc_779DF3

loc_779E44:
mov	ecx, [ebp+arg_0]
mov	[ebp+var_88], ecx
mov	eax, [ebp+arg_4]
imul	eax, 28h
add	eax, [ebp+arg_0]
sub	eax, [ebp+var_88]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_74], eax
jmp	short loc_779E81

loc_779E69:
mov	edx, [ebp+var_88]
add	edx, 28h
mov	[ebp+var_88], edx
mov	eax, [ebp+var_74]
sub	eax, 1
mov	[ebp+var_74], eax

loc_779E81:
cmp	[ebp+var_74], 0
jle	short loc_779E98
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_88]
call	sub_776AF0
jmp	short loc_779E69

loc_779E98:
jmp	loc_779F99

loc_779E9D:
mov	edx, [ebp+var_BC]
mov	eax, [edx+4]
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_4]
sub	ecx, [ebp+var_10]
imul	ecx, 28h
add	ecx, [ebp+var_94]
mov	[ebp+var_8C], ecx
push	0
lea	edx, [ebp+var_8D]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_8C]
push	ecx
mov	edx, [ebp+var_94]
push	edx
call	sub_77C430
add	esp, 14h
mov	eax, [ebp+var_BC]
mov	ecx, [ebp+var_8C]
mov	[eax+4], ecx
xor	edx, edx
mov	[ebp+var_40], dl
mov	eax, [ebp+var_BC]
mov	ecx, [eax+4]
mov	[ebp+var_9C], ecx
push	0
lea	edx, [ebp+var_95]
push	edx
mov	eax, [ebp+var_9C]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_77C4E0
add	esp, 14h
mov	eax, [ebp+var_10]
imul	eax, 28h
mov	ecx, [ebp+var_BC]
add	eax, [ecx+4]
mov	edx, [ebp+var_BC]
mov	[edx+4], eax
mov	eax, [ebp+arg_0]
mov	[ebp+var_B8], eax
mov	eax, [ebp+var_14]
sub	eax, [ebp+var_B8]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_A4], eax
jmp	short loc_779F7F

loc_779F61:
mov	edx, [ebp+var_B8]
add	edx, 28h
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_A4]
sub	eax, 1
mov	[ebp+var_A4], eax

loc_779F7F:
cmp	[ebp+var_A4], 0
jle	short loc_779F99
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_B8]
call	sub_776AF0
jmp	short loc_779F61

loc_779F99:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	10h
sub_779C60 endp

align 10h


; Attributes: bp-based frame

sub_779FB0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_779FB0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
xor	eax, eax
mov	[ebp+var_D], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_20], ecx
jmp	short loc_779FE1

loc_779FD8:
mov	edx, [ebp+var_20]
add	edx, 28h
mov	[ebp+var_20], edx

loc_779FE1:
mov	eax, [ebp+var_20]
cmp	eax, [ebp+arg_4]
jz	short loc_77A022
xor	ecx, ecx
mov	[ebp+var_E], cl
mov	edx, [ebp+var_20]
add	edx, 4
mov	[ebp+var_1C], edx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_1C]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
xor	eax, eax
and	eax, 1
jz	short loc_77A020
mov	ecx, [ebp+var_20]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77A020:
jmp	short loc_779FD8

loc_77A022:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_779FB0 endp



; Attributes: bp-based frame

sub_77A030 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A030
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 38h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_48], ecx
push	0
push	1
mov	ecx, [ebp+var_48]
call	sub_77A360
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx
call	sub_77B780
add	esp, 8
jmp	short loc_77A0CE

loc_77A080:
cmp	[ebp+var_14], 0
jz	short loc_77A0B8
mov	edx, 1
imul	edx, 30h
mov	[ebp+var_44], edx
cmp	[ebp+var_44], 80h
jbe	short loc_77A0A8
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_77A0B8

loc_77A0A8:
mov	ecx, [ebp+var_44]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_77E0D0
add	esp, 8

loc_77A0B8:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_77A0D5
retn

loc_77A0CE:
mov	[ebp+var_4], 0FFFFFFFFh

loc_77A0D5:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_77A030 endp

align 10h


; Attributes: bp-based frame

sub_77A100 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A100
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_40], ecx
push	0
push	1
mov	ecx, [ebp+var_40]
call	sub_77A3F0
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx
call	sub_77B830
add	esp, 8
jmp	short loc_77A19E

loc_77A150:
cmp	[ebp+var_14], 0
jz	short loc_77A188
mov	edx, 1
imul	edx, 34h
mov	[ebp+var_3C], edx
cmp	[ebp+var_3C], 80h
jbe	short loc_77A178
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_77A188

loc_77A178:
mov	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_77E0D0
add	esp, 8

loc_77A188:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_77A1A5
retn

loc_77A19E:
mov	[ebp+var_4], 0FFFFFFFFh

loc_77A1A5:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_77A100 endp

align 10h


; Attributes: bp-based frame

sub_77A1D0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_28], ecx
mov	eax, [ebp+var_28]
mov	ecx, [ebp+var_28]
mov	eax, [eax+4]
sub	eax, [ecx]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_8], eax
mov	[ebp+var_C], 6666666h
mov	[ebp+var_10], 6666666h
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnb	short loc_77A20D
mov	eax, [ebp+var_10]
mov	[ebp+var_2C], eax
jmp	short loc_77A213

loc_77A20D:
mov	ecx, [ebp+var_C]
mov	[ebp+var_2C], ecx

loc_77A213:
mov	edx, [ebp+var_2C]
sub	edx, [ebp+var_8]
cmp	[ebp+arg_0], edx
jbe	short loc_77A226
mov	ecx, [ebp+var_28]
call	sub_5BD210

loc_77A226:
mov	eax, [ebp+arg_0]
cmp	eax, [ebp+var_8]
jnb	short loc_77A236
lea	ecx, [ebp+var_8]
mov	[ebp+var_30], ecx
jmp	short loc_77A23C

loc_77A236:
lea	edx, [ebp+arg_0]
mov	[ebp+var_30], edx

loc_77A23C:
mov	eax, [ebp+var_30]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_8]
add	edx, [ecx]
mov	[ebp+var_4], edx
mov	[ebp+var_18], 6666666h
mov	[ebp+var_1C], 6666666h
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_18]
jnb	short loc_77A26B
mov	ecx, [ebp+var_1C]
mov	[ebp+var_34], ecx
jmp	short loc_77A271

loc_77A26B:
mov	edx, [ebp+var_18]
mov	[ebp+var_34], edx

loc_77A271:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_34]
ja	short loc_77A281
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jnb	short loc_77A2AB

loc_77A281:
mov	[ebp+var_20], 6666666h
mov	[ebp+var_24], 6666666h
mov	edx, [ebp+var_24]
cmp	edx, [ebp+var_20]
jnb	short loc_77A29F
mov	eax, [ebp+var_24]
mov	[ebp+var_38], eax
jmp	short loc_77A2A5

loc_77A29F:
mov	ecx, [ebp+var_20]
mov	[ebp+var_38], ecx

loc_77A2A5:
mov	edx, [ebp+var_38]
mov	[ebp+var_4], edx

loc_77A2AB:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_77A1D0 endp

align 10h


; Attributes: bp-based frame

sub_77A2C0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch

push	ebp
mov	ebp, esp
sub	esp, 60h
mov	[ebp+var_60], ecx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_60]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_C]
mov	[edx], eax
push	ecx
mov	[ebp+var_18], esp
mov	ecx, [ebp+var_60]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
call	sub_77B8D0
add	esp, 8
mov	edx, [ebp+var_60]
mov	eax, [ebp+var_60]
mov	ecx, [edx+8]
sub	ecx, [eax]
mov	eax, ecx
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_5C], eax
mov	edx, [ebp+var_60]
mov	eax, [edx]
mov	[ebp+var_58], eax
cmp	[ebp+var_58], 0
jz	short loc_77A350
mov	ecx, [ebp+var_5C]
imul	ecx, 28h
mov	[ebp+var_54], ecx
cmp	[ebp+var_54], 80h
jbe	short loc_77A340
mov	edx, [ebp+var_58]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_77A350

loc_77A340:
mov	eax, [ebp+var_54]
push	eax
mov	ecx, [ebp+var_58]
push	ecx
call	sub_77E0D0
add	esp, 8

loc_77A350:
mov	esp, ebp
pop	ebp
retn
sub_77A2C0 endp

align 10h


; Attributes: bp-based frame

sub_77A360 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 5555555h
jbe	short loc_77A396
push	1
push	offset off_167E914
lea	ecx, [ebp+var_14]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
mov	[ebp+var_14], offset off_1446194
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77A396:
cmp	[ebp+arg_0], 0
jz	short loc_77A3DF
mov	ecx, [ebp+arg_0]
imul	ecx, 30h
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 80h
jbe	short loc_77A3C5
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_20], eax
jmp	short loc_77A3D4

loc_77A3C5:
lea	ecx, [ebp+var_4]
push	ecx
call	sub_77E150
add	esp, 4
mov	[ebp+var_20], eax

loc_77A3D4:
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
jmp	short loc_77A3E1

loc_77A3DF:
xor	eax, eax

loc_77A3E1:
mov	esp, ebp
pop	ebp
retn	8
sub_77A360 endp

align 10h


; Attributes: bp-based frame

sub_77A3F0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 4EC4EC4h
jbe	short loc_77A426
push	1
push	offset off_167E914
lea	ecx, [ebp+var_14]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
mov	[ebp+var_14], offset off_1446194
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77A426:
cmp	[ebp+arg_0], 0
jz	short loc_77A46F
mov	ecx, [ebp+arg_0]
imul	ecx, 34h
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 80h
jbe	short loc_77A455
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_20], eax
jmp	short loc_77A464

loc_77A455:
lea	ecx, [ebp+var_4]
push	ecx
call	sub_77E150
add	esp, 4
mov	[ebp+var_20], eax

loc_77A464:
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
jmp	short loc_77A471

loc_77A46F:
xor	eax, eax

loc_77A471:
mov	esp, ebp
pop	ebp
retn	8
sub_77A3F0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_77A480(void *)
sub_77A480 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A480
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0Ch
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
xor	ecx, ecx
and	ecx, 1
jz	short loc_77A4C9
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77A4C9:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_77A480 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_77A4E0(void *)
sub_77A4E0 proc	near

var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A4E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 60h
xor	eax, eax
mov	[ebp+var_D], al
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
add	ecx, 18h
call	sub_777080
mov	[ebp+var_4], 0FFFFFFFFh
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_0]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
xor	ecx, ecx
and	ecx, 1
jz	short loc_77A542
mov	edx, [ebp+arg_0]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77A542:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_77A4E0 endp



; Attributes: bp-based frame

sub_77A550 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A550
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
mov	[ebp+var_34], ecx
mov	[ebp+var_18], 0
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_34]
jnz	short loc_77A5AC
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_77B900
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx
jmp	loc_77A6B2

loc_77A5AC:
cmp	[ebp+arg_10], 0
jnz	short loc_77A630
cmp	[ebp+arg_C], 0
jnz	short loc_77A627
lea	edx, [ebp+var_12]
mov	[ebp+var_38], edx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_18]
or	eax, 1
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+arg_4]
add	edx, 10h
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+10h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+14h]
mov	[ebp+var_28], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+10h]
mov	[ebp+var_2C], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+14h]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_24]
push	edx
mov	eax, [ebp+var_28]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_30]
push	edx
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
movzx	edx, cl
test	edx, edx
jz	short loc_77A630

loc_77A627:
mov	[ebp+var_40], 1
jmp	short loc_77A637

loc_77A630:
mov	[ebp+var_40], 0

loc_77A637:
mov	al, byte ptr [ebp+var_40]
mov	[ebp+var_11], al
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_18]
and	ecx, 1
jz	short loc_77A650
and	[ebp+var_18], 0FFFFFFFEh

loc_77A650:
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_77A686
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+var_34]
call	sub_77B900
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_34]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+8]
jnz	short loc_77A684
mov	edx, [ebp+var_34]
mov	eax, [ebp+var_10]
mov	[edx+8], eax

loc_77A684:
jmp	short loc_77A6B2

loc_77A686:
mov	ecx, [ebp+arg_8]
push	ecx
mov	ecx, [ebp+var_34]
call	sub_77B900
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_34]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+0Ch]
jnz	short loc_77A6B2
mov	eax, [ebp+var_34]
mov	ecx, [ebp+var_10]
mov	[eax+0Ch], ecx

loc_77A6B2:
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_34]
add	ecx, 4
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	sub_77E4A0
add	esp, 8
mov	eax, [ebp+var_34]
mov	ecx, [eax+10h]
add	ecx, 1
mov	edx, [ebp+var_34]
mov	[edx+10h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	14h
sub_77A550 endp

align 10h


; Attributes: bp-based frame

sub_77A700 proc	near

var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_B9=	byte ptr -0B9h
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_78=	dword ptr -78h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_39=	byte ptr -39h
var_38=	byte ptr -38h
var_33=	byte ptr -33h
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_1D=	byte ptr -1Dh
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77A700
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0B8h
mov	[ebp+var_AC], ecx
mov	eax, [ebp+var_AC]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+4]
mov	[ebp+var_1C], edx
mov	[ebp+var_11], 1

loc_77A73D:
cmp	[ebp+var_1C], 0
jz	loc_77A7EC
mov	eax, [ebp+var_1C]
mov	[ebp+var_18], eax
lea	ecx, [ebp+var_1D]
mov	[ebp+var_B0], ecx
mov	[ebp+var_4], 0
lea	edx, [ebp+var_41]
mov	[ebp+var_B4], edx
mov	eax, [ebp+var_1C]
add	eax, 10h
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_40]
mov	edx, [ecx+10h]
mov	[ebp+var_48], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+14h]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+10h]
mov	[ebp+var_50], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+14h]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_48]
push	eax
mov	ecx, [ebp+var_4C]
push	ecx
mov	edx, [ebp+var_50]
push	edx
mov	eax, [ebp+var_54]
push	eax
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
mov	[ebp+var_11], cl
mov	[ebp+var_4], 0FFFFFFFFh
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_77A7D2
mov	eax, [ebp+var_1C]
mov	ecx, [eax+8]
mov	[ebp+var_B8], ecx
jmp	short loc_77A7DE

loc_77A7D2:
mov	edx, [ebp+var_1C]
mov	eax, [edx+0Ch]
mov	[ebp+var_B8], eax

loc_77A7DE:
mov	ecx, [ebp+var_B8]
mov	[ebp+var_1C], ecx
jmp	loc_77A73D

loc_77A7EC:
mov	edx, [ebp+var_18]
mov	[ebp+var_10], edx
movzx	eax, [ebp+var_11]
test	eax, eax
jz	loc_77A896
mov	ecx, [ebp+var_AC]
mov	edx, [ecx+8]
mov	[ebp+var_58], edx
mov	eax, [ebp+var_58]
mov	[ebp+var_28], eax
lea	ecx, [ebp+var_64]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_28]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_60]
mov	ecx, [ebp+var_5C]
mov	[eax], ecx
mov	edx, [ebp+var_10]
xor	eax, eax
cmp	edx, [ebp+var_64]
setz	al
mov	[ebp+var_B9], al
movzx	ecx, [ebp+var_B9]
test	ecx, ecx
jz	short loc_77A887
mov	[ebp+var_29], 1
push	0
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_30]
push	edx
mov	ecx, [ebp+var_AC]
call	sub_77A550
mov	[ebp+var_6C], eax
mov	eax, [ebp+var_6C]
mov	ecx, [eax]
mov	[ebp+var_68], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_68]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_29]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	loc_77A952
jmp	short loc_77A896

loc_77A887:
mov	eax, [ebp+var_10]
push	eax
call	sub_77E330
add	esp, 4
mov	[ebp+var_10], eax

loc_77A896:
lea	ecx, [ebp+var_32]
mov	[ebp+var_C0], ecx
mov	[ebp+var_4], 1
mov	edx, [ebp+var_10]
mov	[ebp+var_78], edx
lea	eax, [ebp+var_71]
mov	[ebp+var_C4], eax
mov	ecx, [ebp+var_78]
add	ecx, 10h
mov	[ebp+var_70], ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_70]
push	eax
call	sub_4050C0
add	esp, 8
mov	[ebp+var_31], al
mov	[ebp+var_4], 0FFFFFFFFh
movzx	ecx, [ebp+var_31]
test	ecx, ecx
jz	short loc_77A92E
mov	[ebp+var_33], 1
push	0
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
lea	edx, [ebp+var_38]
push	edx
mov	ecx, [ebp+var_AC]
call	sub_77A550
mov	[ebp+var_A4], eax
mov	eax, [ebp+var_A4]
mov	ecx, [eax]
mov	[ebp+var_A0], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_A0]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	dl, [ebp+var_33]
mov	[ecx+4], dl
mov	eax, [ebp+arg_0]
jmp	short loc_77A952

loc_77A92E:
mov	[ebp+var_39], 0
mov	eax, [ebp+var_10]
mov	[ebp+var_A8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_A8]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_39]
mov	[eax+4], cl
mov	eax, [ebp+arg_0]

loc_77A952:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	8
sub_77A700 endp

align 10h


; Attributes: bp-based frame

sub_77A970 proc	near

var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_44=	byte ptr -44h
var_30=	byte ptr -30h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 17Ch
mov	[ebp+var_174], ecx
push	0
push	0
push	0
push	0
push	1
mov	ecx, [ebp+var_174]
add	ecx, 30h
call	sub_77B9D0
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_60], eax

loc_77A9AA:
mov	ecx, [ebp+var_60]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_14456E8[edx]
mov	[ebp+var_61], al
movzx	ecx, [ebp+var_61]
test	ecx, ecx
jz	short loc_77A9CC
mov	edx, [ebp+var_60]
add	edx, 1
mov	[ebp+var_60], edx
jmp	short loc_77A9AA

loc_77A9CC:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_60]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
cmp	eax, [ebp+var_8]
jnz	short loc_77AA10
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_68], edx
lea	ecx, [ebp+var_1C]
call	sub_7965EC
mov	[ebp+var_1C], offset off_14454A0
mov	[ebp+var_10], offset aExpectedElemen ; "expected element name"
mov	eax, [ebp+var_68]
mov	[ebp+var_C], eax
push	offset unk_1623934
lea	ecx, [ebp+var_1C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77AA10:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
sub	eax, [ebp+var_8]
mov	[ebp+var_6C], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_6C]
mov	[eax+8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_70], eax

loc_77AA34:
mov	ecx, [ebp+var_70]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_14454A8[edx]
mov	[ebp+var_71], al
movzx	ecx, [ebp+var_71]
test	ecx, ecx
jz	short loc_77AA56
mov	edx, [ebp+var_70]
add	edx, 1
mov	[ebp+var_70], edx
jmp	short loc_77AA34

loc_77AA56:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_70]
mov	[eax], ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_174]
call	sub_77BCB0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 3Eh
jnz	short loc_77AAA0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	ecx, [ebp+var_174]
call	sub_77C080
jmp	short loc_77AB18

loc_77AAA0:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
cmp	edx, 2Fh
jnz	short loc_77AAF7
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jz	short loc_77AAE8
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
push	offset aExpected_0 ; "expected >"
lea	ecx, [ebp+var_30]
call	sub_77AB80
push	offset unk_1623934
lea	edx, [ebp+var_30]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77AAE8:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx], ecx
jmp	short loc_77AB18

loc_77AAF7:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
push	offset aExpected_0 ; "expected >"
lea	ecx, [ebp+var_44]
call	sub_77AB80
push	offset unk_1623934
lea	edx, [ebp+var_44]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77AB18:
xor	eax, eax
jz	short loc_77AB6A
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_77AB31
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_178], eax
jmp	short loc_77AB3B

loc_77AB31:
mov	[ebp+var_178], offset unk_1857F78

loc_77AB3B:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx], 0
jz	short loc_77AB51
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	[ebp+var_17C], eax
jmp	short loc_77AB5B

loc_77AB51:
mov	[ebp+var_17C], 0

loc_77AB5B:
mov	ecx, [ebp+var_178]
add	ecx, [ebp+var_17C]
mov	byte ptr [ecx],	0

loc_77AB6A:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_77A970 endp

align 10h


; Attributes: bp-based frame

sub_77AB80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], ecx
mov	ecx, [ebp+var_4]
call	sub_7965EC
mov	eax, [ebp+var_4]
mov	dword ptr [eax], offset	off_14454A0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+10h], ecx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	8
sub_77AB80 endp

align 10h


; Attributes: bp-based frame

sub_77ABC0 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 118h
mov	[ebp+var_118], ecx
mov	eax, 1
test	eax, eax
jz	short loc_77AC54

loc_77ABD8:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 3Fh
jnz	short loc_77ABF3
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 3Eh
jz	short loc_77AC40

loc_77ABF3:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_77AC31
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx
lea	ecx, [ebp+var_18]
call	sub_7965EC
mov	[ebp+var_18], offset off_14454A0
mov	[ebp+var_C], offset aUnexpectedEndO ; "unexpected end of data"
mov	eax, [ebp+var_30]
mov	[ebp+var_8], eax
push	offset unk_1623934
lea	ecx, [ebp+var_18]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77AC31:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	short loc_77ABD8

loc_77AC40:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 2
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
xor	eax, eax
jmp	loc_77AD17

loc_77AC54:
push	0
push	0
push	0
push	0
push	5
mov	ecx, [ebp+var_118]
add	ecx, 30h
call	sub_77B9D0
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_78], eax

loc_77AC77:
mov	ecx, [ebp+var_78]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_14454A8[edx]
mov	[ebp+var_79], al
movzx	ecx, [ebp+var_79]
test	ecx, ecx
jz	short loc_77AC99
mov	edx, [ebp+var_78]
add	edx, 1
mov	[ebp+var_78], edx
jmp	short loc_77AC77

loc_77AC99:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_78]
mov	[eax], ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_118]
call	sub_77BCB0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 3Fh
jnz	short loc_77ACCF
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 3Eh
jz	short loc_77AD07

loc_77ACCF:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_114], edx
lea	ecx, [ebp+var_2C]
call	sub_7965EC
mov	[ebp+var_2C], offset off_14454A0
mov	[ebp+var_20], offset aExpected?	; "expected ?>"
mov	eax, [ebp+var_114]
mov	[ebp+var_1C], eax
push	offset unk_1623934
lea	ecx, [ebp+var_2C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77AD07:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 2
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	eax, [ebp+var_4]

loc_77AD17:
mov	esp, ebp
pop	ebp
retn	4
sub_77ABC0 endp

align 10h


; Attributes: bp-based frame

sub_77AD20 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_65=	byte ptr -65h
var_64=	dword ptr -64h
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 98h
mov	[ebp+var_88], ecx
xor	eax, eax
jz	loc_77AF5E
push	0
push	0
push	0
push	0
push	7
mov	ecx, [ebp+var_88]
add	ecx, 30h
call	sub_77B9D0
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_64], ecx

loc_77AD62:
mov	edx, [ebp+var_64]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_14456E8[eax]
mov	[ebp+var_65], cl
movzx	edx, [ebp+var_65]
test	edx, edx
jz	short loc_77AD84
mov	eax, [ebp+var_64]
add	eax, 1
mov	[ebp+var_64], eax
jmp	short loc_77AD62

loc_77AD84:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_64]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
cmp	ecx, [ebp+var_C]
jnz	short loc_77ADC8
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_6C], eax
lea	ecx, [ebp+var_20]
call	sub_7965EC
mov	[ebp+var_20], offset off_14454A0
mov	[ebp+var_14], offset aExpectedPiTarg ; "expected PI target"
mov	ecx, [ebp+var_6C]
mov	[ebp+var_10], ecx
push	offset unk_1623934
lea	edx, [ebp+var_20]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77ADC8:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
sub	ecx, [ebp+var_C]
mov	[ebp+var_70], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_70]
mov	[ecx+8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_74], ecx

loc_77ADEC:
mov	edx, [ebp+var_74]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_75], cl
movzx	edx, [ebp+var_75]
test	edx, edx
jz	short loc_77AE0E
mov	eax, [ebp+var_74]
add	eax, 1
mov	[ebp+var_74], eax
jmp	short loc_77ADEC

loc_77AE0E:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_74]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_77AE1E:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
movzx	ecx, byte ptr [eax]
cmp	ecx, 3Fh
jnz	short loc_77AE39
mov	edx, [ebp+arg_0]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+1]
cmp	ecx, 3Eh
jz	short loc_77AE86

loc_77AE39:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_77AE77
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_7C], eax
lea	ecx, [ebp+var_34]
call	sub_7965EC
mov	[ebp+var_34], offset off_14454A0
mov	[ebp+var_28], offset aUnexpectedEndO ; "unexpected end of data"
mov	ecx, [ebp+var_7C]
mov	[ebp+var_24], ecx
push	offset unk_1623934
lea	edx, [ebp+var_34]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77AE77:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx], ecx
jmp	short loc_77AE1E

loc_77AE86:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
sub	ecx, [ebp+var_4]
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_80]
mov	[ecx+0Ch], edx
xor	eax, eax
jz	loc_77AF4A
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_77AEC0
mov	edx, [ebp+var_8]
mov	eax, [edx]
mov	[ebp+var_8C], eax
jmp	short loc_77AECA

loc_77AEC0:
mov	[ebp+var_8C], offset unk_1857F78

loc_77AECA:
mov	ecx, [ebp+var_8]
cmp	dword ptr [ecx], 0
jz	short loc_77AEE0
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_90], eax
jmp	short loc_77AEEA

loc_77AEE0:
mov	[ebp+var_90], 0

loc_77AEEA:
mov	ecx, [ebp+var_8C]
add	ecx, [ebp+var_90]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_8]
cmp	dword ptr [edx+4], 0
jz	short loc_77AF10
mov	eax, [ebp+var_8]
mov	ecx, [eax+4]
mov	[ebp+var_94], ecx
jmp	short loc_77AF1A

loc_77AF10:
mov	[ebp+var_94], offset unk_1857F78

loc_77AF1A:
mov	edx, [ebp+var_8]
cmp	dword ptr [edx+4], 0
jz	short loc_77AF31
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
mov	[ebp+var_98], ecx
jmp	short loc_77AF3B

loc_77AF31:
mov	[ebp+var_98], 0

loc_77AF3B:
mov	edx, [ebp+var_94]
add	edx, [ebp+var_98]
mov	byte ptr [edx],	0

loc_77AF4A:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 2
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+var_8]
jmp	short loc_77AFDB
jmp	short loc_77AFDB

loc_77AF5E:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
cmp	edx, 3Fh
jnz	short loc_77AF79
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx+1]
cmp	edx, 3Eh
jz	short loc_77AFCC

loc_77AF79:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_77AFBD
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_84], ecx
lea	ecx, [ebp+var_48]
call	sub_7965EC
mov	[ebp+var_48], offset off_14454A0
mov	[ebp+var_3C], offset aUnexpectedEndO ; "unexpected end of data"
mov	edx, [ebp+var_84]
mov	[ebp+var_38], edx
push	offset unk_1623934
lea	eax, [ebp+var_48]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77AFBD:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
jmp	short loc_77AF5E

loc_77AFCC:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 2
mov	eax, [ebp+arg_0]
mov	[eax], edx
xor	eax, eax

loc_77AFDB:
mov	esp, ebp
pop	ebp
retn	4
sub_77AD20 endp

align 10h


; Attributes: bp-based frame

sub_77AFF0 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
mov	eax, 1
test	eax, eax
jz	loc_77B096

loc_77B00C:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 2Dh
jnz	short loc_77B035
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 2Dh
jnz	short loc_77B035
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+2]
cmp	eax, 3Eh
jz	short loc_77B082

loc_77B035:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_77B073
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
lea	ecx, [ebp+var_1C]
call	sub_7965EC
mov	[ebp+var_1C], offset off_14454A0
mov	[ebp+var_10], offset aUnexpectedEndO ; "unexpected end of data"
mov	eax, [ebp+var_34]
mov	[ebp+var_C], eax
push	offset unk_1623934
lea	ecx, [ebp+var_1C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77B073:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	short loc_77B00C

loc_77B082:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 3
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
xor	eax, eax
jmp	loc_77B168

loc_77B096:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_77B09E:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 2Dh
jnz	short loc_77B0C7
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 2Dh
jnz	short loc_77B0C7
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+2]
cmp	eax, 3Eh
jz	short loc_77B114

loc_77B0C7:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_77B105
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_38], edx
lea	ecx, [ebp+var_30]
call	sub_7965EC
mov	[ebp+var_30], offset off_14454A0
mov	[ebp+var_24], offset aUnexpectedEndO ; "unexpected end of data"
mov	eax, [ebp+var_38]
mov	[ebp+var_20], eax
push	offset unk_1623934
lea	ecx, [ebp+var_30]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77B105:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	short loc_77B09E

loc_77B114:
push	0
push	0
push	0
push	0
push	4
mov	ecx, [ebp+var_84]
add	ecx, 30h
call	sub_77B9D0
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
sub	eax, [ebp+var_4]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_80]
mov	[eax+0Ch], ecx
xor	edx, edx
jz	short loc_77B158
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	byte ptr [ecx],	0

loc_77B158:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 3
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	eax, [ebp+var_8]

loc_77B168:
mov	esp, ebp
pop	ebp
retn	4
sub_77AFF0 endp

align 10h


; Attributes: bp-based frame

sub_77B170 proc	near

var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 84h
mov	[ebp+var_84], ecx
xor	eax, eax
jz	loc_77B211

loc_77B187:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 5Dh
jnz	short loc_77B1B0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 5Dh
jnz	short loc_77B1B0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+2]
cmp	eax, 3Eh
jz	short loc_77B1FD

loc_77B1B0:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_77B1EE
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_34], edx
lea	ecx, [ebp+var_1C]
call	sub_7965EC
mov	[ebp+var_1C], offset off_14454A0
mov	[ebp+var_10], offset aUnexpectedEndO ; "unexpected end of data"
mov	eax, [ebp+var_34]
mov	[ebp+var_C], eax
push	offset unk_1623934
lea	ecx, [ebp+var_1C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77B1EE:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	short loc_77B187

loc_77B1FD:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 3
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
xor	eax, eax
jmp	loc_77B2E3

loc_77B211:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_77B219:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
cmp	eax, 5Dh
jnz	short loc_77B242
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 5Dh
jnz	short loc_77B242
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+2]
cmp	eax, 3Eh
jz	short loc_77B28F

loc_77B242:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_77B280
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_38], edx
lea	ecx, [ebp+var_30]
call	sub_7965EC
mov	[ebp+var_30], offset off_14454A0
mov	[ebp+var_24], offset aUnexpectedEndO ; "unexpected end of data"
mov	eax, [ebp+var_38]
mov	[ebp+var_20], eax
push	offset unk_1623934
lea	ecx, [ebp+var_30]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77B280:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	short loc_77B219

loc_77B28F:
push	0
push	0
push	0
push	0
push	3
mov	ecx, [ebp+var_84]
add	ecx, 30h
call	sub_77B9D0
mov	[ebp+var_8], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
sub	eax, [ebp+var_4]
mov	[ebp+var_80], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_80]
mov	[eax+0Ch], ecx
xor	edx, edx
jz	short loc_77B2D3
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	byte ptr [ecx],	0

loc_77B2D3:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 3
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	eax, [ebp+var_8]

loc_77B2E3:
mov	esp, ebp
pop	ebp
retn	4
sub_77B170 endp

align 10h


; Attributes: bp-based frame

sub_77B2F0 proc	near

var_90=	byte ptr -90h
var_8C=	byte ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	[ebp+var_88], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_77B307:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
movzx	ecx, byte ptr [eax]
cmp	ecx, 3Eh
jz	loc_77B428
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	cl, [eax]
mov	[ebp+var_8C], cl
cmp	[ebp+var_8C], 0
jz	loc_77B3E4
cmp	[ebp+var_8C], 5Bh
jz	short loc_77B340
jmp	loc_77B416

loc_77B340:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	[ebp+var_8], 1

loc_77B354:
cmp	[ebp+var_8], 0
jle	loc_77B3E2
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	cl, [eax]
mov	[ebp+var_90], cl
cmp	[ebp+var_90], 0
jz	short loc_77B39E
cmp	[ebp+var_90], 5Bh
jz	short loc_77B388
cmp	[ebp+var_90], 5Dh
jz	short loc_77B393
jmp	short loc_77B3D0

loc_77B388:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77B3D0

loc_77B393:
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_77B3D0

loc_77B39E:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_38], edx
lea	ecx, [ebp+var_20]
call	sub_7965EC
mov	[ebp+var_20], offset off_14454A0
mov	[ebp+var_14], offset aUnexpectedEndO ; "unexpected end of data"
mov	eax, [ebp+var_38]
mov	[ebp+var_10], eax
push	offset unk_1623934
lea	ecx, [ebp+var_20]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77B3D0:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	loc_77B354

loc_77B3E2:
jmp	short loc_77B423

loc_77B3E4:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_3C], eax
lea	ecx, [ebp+var_34]
call	sub_7965EC
mov	[ebp+var_34], offset off_14454A0
mov	[ebp+var_28], offset aUnexpectedEndO ; "unexpected end of data"
mov	ecx, [ebp+var_3C]
mov	[ebp+var_24], ecx
push	offset unk_1623934
lea	edx, [ebp+var_34]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77B416:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx], ecx

loc_77B423:
jmp	loc_77B307

loc_77B428:
xor	eax, eax
jz	short loc_77B48A
push	0
push	0
push	0
push	0
push	6
mov	ecx, [ebp+var_88]
add	ecx, 30h
call	sub_77B9D0
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
sub	edx, [ebp+var_4]
mov	[ebp+var_84], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_84]
mov	[edx+0Ch], eax
xor	ecx, ecx
jz	short loc_77B476
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	byte ptr [eax],	0

loc_77B476:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
mov	eax, [ebp+var_C]
jmp	short loc_77B499
jmp	short loc_77B499

loc_77B48A:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
xor	eax, eax

loc_77B499:
mov	esp, ebp
pop	ebp
retn	4
sub_77B2F0 endp

align 10h


; Attributes: bp-based frame

sub_77B4A0 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_4D=	byte ptr -4Dh
var_4C=	byte ptr -4Ch
var_32=	byte ptr -32h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77B4A0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 0ACh
mov	[ebp+var_A8], ecx
mov	eax, [ebp+var_A8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_A8]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_77B4D9:
cmp	[ebp+var_14], 0
jz	loc_77B5AA
lea	eax, [ebp+var_31]
mov	[ebp+var_AC], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_AC]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_30]
call	sub_407D30
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_55]
mov	[ebp+var_B0], ecx
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_54], edx
mov	eax, [ebp+var_20]
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_1C]
mov	[ebp+var_60], ecx
mov	edx, [ebp+var_54]
mov	eax, [edx+10h]
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx+14h]
mov	[ebp+var_68], edx
mov	eax, [ebp+var_5C]
push	eax
mov	ecx, [ebp+var_60]
push	ecx
mov	edx, [ebp+var_64]
push	edx
mov	eax, [ebp+var_68]
push	eax
call	sub_4051D0
add	esp, 10h
xor	ecx, ecx
test	eax, eax
setl	cl
movzx	edx, cl
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_15], dl
mov	byte ptr [ebp+var_4], 0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_30]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_77B59C
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_77B5A5

loc_77B59C:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_77B5A5:
jmp	loc_77B4D9

loc_77B5AA:
mov	eax, [ebp+var_10]
cmp	eax, [ebp+var_A8]
jz	short loc_77B62F
lea	ecx, [ebp+var_4D]
mov	[ebp+var_B4], ecx
mov	[ebp+var_4], 3
mov	edx, [ebp+var_B4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
lea	ecx, [ebp+var_4C]
call	sub_407D30
mov	byte ptr [ebp+var_4], 4
lea	edx, [ebp+var_75]
mov	[ebp+var_B8], edx
mov	eax, [ebp+var_10]
add	eax, 10h
mov	[ebp+var_74], eax
mov	ecx, [ebp+var_74]
push	ecx
lea	edx, [ebp+var_4C]
push	edx
call	sub_4050C0
add	esp, 8
mov	[ebp+var_32], al
mov	byte ptr [ebp+var_4], 3
mov	byte ptr [ebp+var_4], 5
lea	ecx, [ebp+var_4C]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 3
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_32]
test	eax, eax
jz	short loc_77B62F
mov	ecx, [ebp+var_A8]
mov	[ebp+var_10], ecx

loc_77B62F:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_77B4A0 endp

align 10h


; Attributes: bp-based frame

sub_77B650 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77B780
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 10h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_77B6CA
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+arg_4]
add	edx, 4
push	edx
mov	ecx, [ebp+var_18]
add	ecx, 4
call	sub_403850
mov	eax, [ebp+arg_4]
mov	ecx, [eax+20h]
mov	edx, [eax+24h]
mov	eax, [ebp+var_18]
mov	[eax+20h], ecx
mov	[eax+24h], edx
mov	ecx, [ebp+var_18]
mov	[ebp+var_1C], ecx
jmp	short loc_77B6D1

loc_77B6CA:
mov	[ebp+var_1C], 0

loc_77B6D1:
mov	edx, [ebp+var_1C]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_77B650 endp

align 10h


; Attributes: bp-based frame

sub_77B6F0 proc	near

var_20=	dword ptr -20h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77B6F0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 14h
jmp	short loc_77B716

loc_77B70D:
mov	eax, [ebp+arg_0]
sub	eax, 28h
mov	[ebp+arg_0], eax

loc_77B716:
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	ecx, [ebp+arg_4]
setnz	dl
movzx	eax, dl
test	eax, eax
jz	short loc_77B770
xor	ecx, ecx
mov	[ebp+var_D], cl
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 28h
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
add	ecx, 4
mov	[ebp+var_20], ecx
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_20]
call	sub_4079F0
mov	[ebp+var_4], 0FFFFFFFFh
xor	edx, edx
and	edx, 1
jz	short loc_77B76E
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77B76E:
jmp	short loc_77B70D

loc_77B770:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_77B6F0 endp

align 10h


; Attributes: bp-based frame

sub_77B780 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77B780
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 18h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_77B800
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_403850
mov	eax, [ebp+arg_4]
add	eax, 18h
mov	[ebp+var_20], eax
mov	ecx, [ebp+var_18]
add	ecx, 18h
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_20]
mov	ecx, [eax]
mov	[edx], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	[edx+4], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_24], edx
jmp	short loc_77B807

loc_77B800:
mov	[ebp+var_24], 0

loc_77B807:
mov	eax, [ebp+var_24]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_77B780 endp

align 10h


; Attributes: bp-based frame

sub_77B830 proc	near

var_40=	dword ptr -40h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77C5E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 34h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_77B8A2
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 18h
call	sub_776FC0
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_40], ecx
jmp	short loc_77B8A9

loc_77B8A2:
mov	[ebp+var_40], 0

loc_77B8A9:
mov	edx, [ebp+var_40]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_77B830 endp

align 10h


; Attributes: bp-based frame

sub_77B8D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 38h
push	0
push	ecx
mov	[ebp+var_C], esp
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_10], esp
mov	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_77C5A0
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_77B8D0 endp

align 10h


; Attributes: bp-based frame

sub_77B900 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77B900
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 38h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	[ebp+var_48], ecx
push	0
push	1
mov	ecx, [ebp+var_48]
call	sub_77BC20
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
add	ecx, 10h
push	ecx
call	sub_77C5E0
add	esp, 8
jmp	short loc_77B99E

loc_77B950:
cmp	[ebp+var_14], 0
jz	short loc_77B988
mov	edx, 1
imul	edx, 7Ch
mov	[ebp+var_44], edx
cmp	[ebp+var_44], 80h
jbe	short loc_77B978
mov	eax, [ebp+var_14]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_77B988

loc_77B978:
mov	ecx, [ebp+var_44]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_77E0D0
add	esp, 8

loc_77B988:
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_77B9A5
retn

loc_77B99E:
mov	[ebp+var_4], 0FFFFFFFFh

loc_77B9A5:
mov	eax, [ebp+var_14]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_14]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_77B900 endp

align 10h


; Attributes: bp-based frame

sub_77B9D0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_50], ecx
push	30h
mov	ecx, [ebp+var_50]
call	sub_77BAF0
mov	[ebp+var_4], eax
mov	eax, [ebp+var_4]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_77BA34
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	[ecx+14h], edx
mov	eax, [ebp+var_10]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+20h], 0
mov	edx, [ebp+var_10]
mov	[ebp+var_54], edx
jmp	short loc_77BA3B

loc_77BA34:
mov	[ebp+var_54], 0

loc_77BA3B:
mov	eax, [ebp+var_54]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
cmp	[ebp+arg_4], 0
jz	short loc_77BA95
cmp	[ebp+arg_C], 0
jbe	short loc_77BA66
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_C]
mov	[ecx+8], edx
jmp	short loc_77BA95

loc_77BA66:
mov	eax, [ebp+arg_4]
mov	[ebp+var_48], eax

loc_77BA6C:
mov	ecx, [ebp+var_48]
movzx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_77BA81
mov	eax, [ebp+var_48]
add	eax, 1
mov	[ebp+var_48], eax
jmp	short loc_77BA6C

loc_77BA81:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+var_48]
sub	eax, [ebp+arg_4]
mov	ecx, [ebp+var_8]
mov	[ecx+8], eax

loc_77BA95:
cmp	[ebp+arg_8], 0
jz	short loc_77BAE5
cmp	[ebp+arg_10], 0
jbe	short loc_77BAB5
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_10]
mov	[ecx+0Ch], edx
jmp	short loc_77BAE5

loc_77BAB5:
mov	eax, [ebp+arg_8]
mov	[ebp+var_4C], eax

loc_77BABB:
mov	ecx, [ebp+var_4C]
movzx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_77BAD0
mov	eax, [ebp+var_4C]
add	eax, 1
mov	[ebp+var_4C], eax
jmp	short loc_77BABB

loc_77BAD0:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx+4], edx
mov	eax, [ebp+var_4C]
sub	eax, [ebp+arg_8]
mov	ecx, [ebp+var_8]
mov	[ecx+0Ch], eax

loc_77BAE5:
mov	eax, [ebp+var_8]
mov	esp, ebp
pop	ebp
retn	14h
sub_77B9D0 endp

align 10h


; Attributes: bp-based frame

sub_77BAF0 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	[ebp+var_38], ecx
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_20]
and	edx, 3
mov	eax, 4
sub	eax, edx
and	eax, 3
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_20]
add	ecx, [ebp+var_1C]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_38]
cmp	edx, [eax+8]
jbe	loc_77BBFD
mov	[ebp+var_14], 10000h
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+arg_0]
jnb	short loc_77BB45
mov	edx, [ebp+arg_0]
mov	[ebp+var_14], edx

loc_77BB45:
mov	eax, [ebp+var_14]
add	eax, 0Ah
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_38]
cmp	dword ptr [ecx+1000Ch],	0
jz	short loc_77BB71
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_38]
mov	ecx, [eax+1000Ch]
call	ecx
add	esp, 4
mov	[ebp+var_24], eax
jmp	short loc_77BB86

loc_77BB71:
mov	edx, [ebp+var_10]
push	edx		; unsigned int
call	??_U@YAPAXI@Z	; operator new[](uint)
add	esp, 4
mov	[ebp+var_28], eax
mov	eax, [ebp+var_28]
mov	[ebp+var_24], eax

loc_77BB86:
mov	ecx, [ebp+var_24]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
and	edx, 3
mov	eax, 4
sub	eax, edx
and	eax, 3
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_C]
add	ecx, [ebp+var_2C]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_38]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_38]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_18]
add	edx, 4
mov	eax, [ebp+var_38]
mov	[eax+4], edx
mov	ecx, [ebp+var_C]
add	ecx, [ebp+var_10]
mov	edx, [ebp+var_38]
mov	[edx+8], ecx
mov	eax, [ebp+var_38]
mov	ecx, [eax+4]
mov	[ebp+var_34], ecx
mov	edx, [ebp+var_34]
and	edx, 3
mov	eax, 4
sub	eax, edx
and	eax, 3
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_34]
add	ecx, [ebp+var_30]
mov	[ebp+var_4], ecx

loc_77BBFD:
mov	edx, [ebp+var_4]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_38]
mov	[eax+4], edx
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	4
sub_77BAF0 endp

align 10h


; Attributes: bp-based frame

sub_77BC20 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_1C], ecx
cmp	[ebp+arg_0], 2108421h
jbe	short loc_77BC56
push	1
push	offset off_167E914
lea	ecx, [ebp+var_14]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
mov	[ebp+var_14], offset off_1446194
push	offset unk_1641FD8
lea	eax, [ebp+var_14]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77BC56:
cmp	[ebp+arg_0], 0
jz	short loc_77BC9F
mov	ecx, [ebp+arg_0]
imul	ecx, 7Ch
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 80h
jbe	short loc_77BC85
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[ebp+var_20], eax
jmp	short loc_77BC94

loc_77BC85:
lea	ecx, [ebp+var_4]
push	ecx
call	sub_77E150
add	esp, 4
mov	[ebp+var_20], eax

loc_77BC94:
mov	edx, [ebp+var_20]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
jmp	short loc_77BCA1

loc_77BC9F:
xor	eax, eax

loc_77BCA1:
mov	esp, ebp
pop	ebp
retn	8
sub_77BC20 endp

align 10h


; Attributes: bp-based frame

sub_77BCB0 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B1=	byte ptr -0B1h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A1=	byte ptr -0A1h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_95=	byte ptr -95h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_71=	byte ptr -71h
var_70=	dword ptr -70h
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	[ebp+var_B8], ecx

loc_77BCBF:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_1445840[edx]
mov	[ebp+var_69], al
movzx	ecx, [ebp+var_69]
test	ecx, ecx
jz	loc_77C074
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_14], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_70], edx

loc_77BCF9:
mov	eax, [ebp+var_70]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_1445840[ecx]
mov	[ebp+var_71], dl
movzx	eax, [ebp+var_71]
test	eax, eax
jz	short loc_77BD1B
mov	ecx, [ebp+var_70]
add	ecx, 1
mov	[ebp+var_70], ecx
jmp	short loc_77BCF9

loc_77BD1B:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_70]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
cmp	edx, [ebp+var_14]
jnz	short loc_77BD57
lea	ecx, [ebp+var_2C]
call	sub_7965EC
mov	[ebp+var_2C], offset off_14454A0
mov	[ebp+var_20], offset aExpectedAttrib ; "expected attribute name"
mov	eax, [ebp+var_14]
mov	[ebp+var_1C], eax
push	offset unk_1623934
lea	ecx, [ebp+var_2C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77BD57:
push	0
push	0
push	0
push	0
mov	ecx, [ebp+var_B8]
add	ecx, 30h
call	sub_77C790
mov	[ebp+var_10], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
sub	eax, [ebp+var_14]
mov	[ebp+var_90], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_90]
mov	[eax+8], ecx
mov	edx, [ebp+var_10]
push	edx
mov	ecx, [ebp+arg_4]
call	sub_77C720
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_94], ecx

loc_77BDA9:
mov	edx, [ebp+var_94]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_95], cl
movzx	edx, [ebp+var_95]
test	edx, edx
jz	short loc_77BDDA
mov	eax, [ebp+var_94]
add	eax, 1
mov	[ebp+var_94], eax
jmp	short loc_77BDA9

loc_77BDDA:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_94]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
cmp	edx, 3Dh
jz	short loc_77BE2A
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_9C], ecx
lea	ecx, [ebp+var_40]
call	sub_7965EC
mov	[ebp+var_40], offset off_14454A0
mov	[ebp+var_34], offset aExpected_1 ; "expected ="
mov	edx, [ebp+var_9C]
mov	[ebp+var_30], edx
push	offset unk_1623934
lea	eax, [ebp+var_40]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77BE2A:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
xor	ecx, ecx
jz	short loc_77BE89
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_77BE50
mov	eax, [ebp+var_10]
mov	ecx, [eax]
mov	[ebp+var_BC], ecx
jmp	short loc_77BE5A

loc_77BE50:
mov	[ebp+var_BC], offset unk_1857F78

loc_77BE5A:
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jz	short loc_77BE70
mov	eax, [ebp+var_10]
mov	ecx, [eax+8]
mov	[ebp+var_C0], ecx
jmp	short loc_77BE7A

loc_77BE70:
mov	[ebp+var_C0], 0

loc_77BE7A:
mov	edx, [ebp+var_BC]
add	edx, [ebp+var_C0]
mov	byte ptr [edx],	0

loc_77BE89:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_A0], ecx

loc_77BE94:
mov	edx, [ebp+var_A0]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_A1], cl
movzx	edx, [ebp+var_A1]
test	edx, edx
jz	short loc_77BEC5
mov	eax, [ebp+var_A0]
add	eax, 1
mov	[ebp+var_A0], eax
jmp	short loc_77BE94

loc_77BEC5:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_A0]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	dl, [ecx]
mov	[ebp+var_9], dl
movzx	eax, [ebp+var_9]
cmp	eax, 27h
jz	short loc_77BF24
movzx	ecx, [ebp+var_9]
cmp	ecx, 22h
jz	short loc_77BF24
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_A8], eax
lea	ecx, [ebp+var_54]
call	sub_7965EC
mov	[ebp+var_54], offset off_14454A0
mov	[ebp+var_48], offset aExpectedOr ; "expected ' or \""
mov	ecx, [ebp+var_A8]
mov	[ebp+var_44], ecx
push	offset unk_1623934
lea	edx, [ebp+var_54]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77BF24:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	[ebp+var_4], 0Ch
movzx	edx, [ebp+var_9]
cmp	edx, 27h
jnz	short loc_77BF5A
mov	eax, [ebp+arg_0]
push	eax
call	sub_77C8A0
add	esp, 4
mov	[ebp+var_18], eax
jmp	short loc_77BF69

loc_77BF5A:
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77CCD0
add	esp, 4
mov	[ebp+var_18], eax

loc_77BF69:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	ecx, [ebp+var_18]
sub	ecx, [ebp+var_8]
mov	edx, [ebp+var_10]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
movzx	eax, [ebp+var_9]
cmp	edx, eax
jz	short loc_77BFC6
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_AC], edx
lea	ecx, [ebp+var_68]
call	sub_7965EC
mov	[ebp+var_68], offset off_14454A0
mov	[ebp+var_5C], offset aExpectedOr ; "expected ' or \""
mov	eax, [ebp+var_AC]
mov	[ebp+var_58], eax
push	offset unk_1623934
lea	ecx, [ebp+var_68]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77BFC6:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
xor	edx, edx
jz	short loc_77C028
mov	eax, [ebp+var_10]
cmp	dword ptr [eax+4], 0
jz	short loc_77BFEE
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
mov	[ebp+var_C4], edx
jmp	short loc_77BFF8

loc_77BFEE:
mov	[ebp+var_C4], offset unk_1857F78

loc_77BFF8:
mov	eax, [ebp+var_10]
cmp	dword ptr [eax+4], 0
jz	short loc_77C00F
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[ebp+var_C8], edx
jmp	short loc_77C019

loc_77C00F:
mov	[ebp+var_C8], 0

loc_77C019:
mov	eax, [ebp+var_C4]
add	eax, [ebp+var_C8]
mov	byte ptr [eax],	0

loc_77C028:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_B0], edx

loc_77C033:
mov	eax, [ebp+var_B0]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_14454A8[ecx]
mov	[ebp+var_B1], dl
movzx	eax, [ebp+var_B1]
test	eax, eax
jz	short loc_77C064
mov	ecx, [ebp+var_B0]
add	ecx, 1
mov	[ebp+var_B0], ecx
jmp	short loc_77C033

loc_77C064:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_B0]
mov	[edx], eax
jmp	loc_77BCBF

loc_77C074:
mov	esp, ebp
pop	ebp
retn	8
sub_77BCB0 endp

align 10h


; Attributes: bp-based frame

sub_77C080 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	byte ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_7C=	dword ptr -7Ch
var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_51=	byte ptr -51h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0A8h
mov	[ebp+var_9C], ecx

loc_77C08F:
mov	eax, 1
test	eax, eax
jz	loc_77C34A
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_50], ecx

loc_77C0AC:
mov	edx, [ebp+var_50]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_51], cl
movzx	edx, [ebp+var_51]
test	edx, edx
jz	short loc_77C0CE
mov	eax, [ebp+var_50]
add	eax, 1
mov	[ebp+var_50], eax
jmp	short loc_77C0AC

loc_77C0CE:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_50]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	dl, [ecx]
mov	[ebp+var_5], dl

loc_77C0E0:
mov	al, [ebp+var_5]
mov	[ebp+var_A0], al
cmp	[ebp+var_A0], 0
jz	loc_77C2EE
cmp	[ebp+var_A0], 3Ch
jz	short loc_77C104
jmp	loc_77C326

loc_77C104:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
movzx	eax, byte ptr [edx+1]
cmp	eax, 2Fh
jnz	loc_77C2BB
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 2
mov	eax, [ebp+arg_0]
mov	[eax], edx
xor	ecx, ecx
jz	loc_77C204
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_58], edx

loc_77C13B:
mov	eax, [ebp+var_58]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_14456E8[ecx]
mov	[ebp+var_59], dl
movzx	eax, [ebp+var_59]
test	eax, eax
jz	short loc_77C15D
mov	ecx, [ebp+var_58]
add	ecx, 1
mov	[ebp+var_58], ecx
jmp	short loc_77C13B

loc_77C15D:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_58]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx], 0
jz	short loc_77C17B
mov	edx, [ebp+arg_4]
mov	eax, [edx+8]
mov	[ebp+var_A4], eax
jmp	short loc_77C185

loc_77C17B:
mov	[ebp+var_A4], 0

loc_77C185:
mov	ecx, [ebp+arg_4]
cmp	dword ptr [ecx], 0
jz	short loc_77C19A
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_A8], eax
jmp	short loc_77C1A4

loc_77C19A:
mov	[ebp+var_A8], offset unk_1857F78

loc_77C1A4:
push	1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
sub	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+var_A4]
push	ecx
mov	edx, [ebp+var_A8]
push	edx
call	sub_777E80
add	esp, 14h
movzx	eax, al
test	eax, eax
jnz	short loc_77C202
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_68], edx
lea	ecx, [ebp+var_24]
call	sub_7965EC
mov	[ebp+var_24], offset off_14454A0
mov	[ebp+var_18], offset aInvalidClosing ; "invalid	closing	tag name"
mov	eax, [ebp+var_68]
mov	[ebp+var_14], eax
push	offset unk_1623934
lea	ecx, [ebp+var_24]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77C202:
jmp	short loc_77C236

loc_77C204:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_6C], eax

loc_77C20C:
mov	ecx, [ebp+var_6C]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_14456E8[edx]
mov	[ebp+var_6D], al
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jz	short loc_77C22E
mov	edx, [ebp+var_6C]
add	edx, 1
mov	[ebp+var_6C], edx
jmp	short loc_77C20C

loc_77C22E:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_6C]
mov	[eax], ecx

loc_77C236:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_74], eax

loc_77C23E:
mov	ecx, [ebp+var_74]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_14454A8[edx]
mov	[ebp+var_75], al
movzx	ecx, [ebp+var_75]
test	ecx, ecx
jz	short loc_77C260
mov	edx, [ebp+var_74]
add	edx, 1
mov	[ebp+var_74], edx
jmp	short loc_77C23E

loc_77C260:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_74]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
movzx	ecx, byte ptr [eax]
cmp	ecx, 3Eh
jz	short loc_77C2A7
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_7C], eax
lea	ecx, [ebp+var_38]
call	sub_7965EC
mov	[ebp+var_38], offset off_14454A0
mov	[ebp+var_2C], offset aExpected_0 ; "expected >"
mov	ecx, [ebp+var_7C]
mov	[ebp+var_28], ecx
push	offset unk_1623934
lea	edx, [ebp+var_38]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77C2A7:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx], ecx
jmp	loc_77C34A
jmp	short loc_77C2EC

loc_77C2BB:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_9C]
call	sub_779750
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_77C2EC
mov	ecx, [ebp+var_10]
push	ecx
mov	ecx, [ebp+arg_4]
call	sub_7782A0

loc_77C2EC:
jmp	short loc_77C345

loc_77C2EE:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_98], eax
lea	ecx, [ebp+var_4C]
call	sub_7965EC
mov	[ebp+var_4C], offset off_14454A0
mov	[ebp+var_40], offset aUnexpectedEndO ; "unexpected end of data"
mov	ecx, [ebp+var_98]
mov	[ebp+var_3C], ecx
push	offset unk_1623934
lea	edx, [ebp+var_4C]
push	edx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77C326:
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_9C]
call	sub_77D100
mov	[ebp+var_5], al
jmp	loc_77C0E0

loc_77C345:
jmp	loc_77C08F

loc_77C34A:
mov	esp, ebp
pop	ebp
retn	8
sub_77C080 endp



; Attributes: bp-based frame

sub_77C350 proc	near

var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	byte ptr -30h
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77C350
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
mov	[ebp+var_6C], ecx
mov	eax, [ebp+var_6C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_6C]
mov	edx, [ecx+4]
mov	[ebp+var_14], edx

loc_77C37D:
cmp	[ebp+var_14], 0
jz	loc_77C418
lea	eax, [ebp+var_31]
mov	[ebp+var_70], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_70]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
lea	ecx, [ebp+var_30]
call	sub_407D30
mov	byte ptr [ebp+var_4], 1
lea	ecx, [ebp+var_39]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_14]
add	edx, 10h
mov	[ebp+var_38], edx
lea	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
call	sub_4050C0
add	esp, 8
movzx	edx, al
neg	edx
sbb	edx, edx
add	edx, 1
mov	[ebp+var_15], dl
mov	byte ptr [ebp+var_4], 0
mov	byte ptr [ebp+var_4], 2
lea	ecx, [ebp+var_30]
call	sub_4079F0
mov	byte ptr [ebp+var_4], 0
mov	[ebp+var_4], 0FFFFFFFFh
movzx	eax, [ebp+var_15]
test	eax, eax
jz	short loc_77C40A
mov	ecx, [ebp+var_14]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_14]
mov	eax, [edx+8]
mov	[ebp+var_14], eax
jmp	short loc_77C413

loc_77C40A:
mov	ecx, [ebp+var_14]
mov	edx, [ecx+0Ch]
mov	[ebp+var_14], edx

loc_77C413:
jmp	loc_77C37D

loc_77C418:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_77C350 endp

align 10h


; Attributes: bp-based frame

sub_77C430 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77C430
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_0]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_77C484

loc_77C472:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_14], eax

loc_77C484:
cmp	[ebp+var_18], 0
jle	short loc_77C49C
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_14]
push	edx
call	sub_77B650
add	esp, 8
jmp	short loc_77C472

loc_77C49C:
jmp	short loc_77C4C6

loc_77C49E:
push	0
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_779FB0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_77C4CD
retn

loc_77C4C6:
mov	[ebp+var_4], 0FFFFFFFFh

loc_77C4CD:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_77C430 endp

align 10h


; Attributes: bp-based frame

sub_77C4E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77C4E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
push	ecx
sub	esp, 28h
push	ebx
push	esi
push	edi
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_8]
mov	[ebp+var_14], eax
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
sub	eax, [ebp+arg_0]
cdq
mov	ecx, 28h
idiv	ecx
mov	[ebp+var_18], eax
jmp	short loc_77C52B

loc_77C522:
mov	edx, [ebp+var_18]
sub	edx, 1
mov	[ebp+var_18], edx

loc_77C52B:
cmp	[ebp+var_18], 0
jle	short loc_77C555
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
call	sub_77B650
add	esp, 8
mov	edx, [ebp+arg_0]
add	edx, 28h
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_14]
add	eax, 28h
mov	[ebp+var_14], eax
jmp	short loc_77C522

loc_77C555:
mov	eax, [ebp+var_14]
jmp	short loc_77C589

loc_77C55A:
push	0
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_779FB0
add	esp, 0Ch
push	0
push	0
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, offset loc_77C589
retn
mov	[ebp+var_4], 0FFFFFFFFh

loc_77C589:
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_77C4E0 endp

align 10h


; Attributes: bp-based frame

sub_77C5A0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 28h
xor	eax, eax
mov	[ebp+var_1], al
lea	ecx, [ebp+var_1]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
push	ecx
mov	[ebp+var_10], esp
mov	eax, [ebp+var_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
push	ecx
mov	[ebp+var_14], esp
mov	edx, [ebp+var_14]
mov	eax, [ebp+arg_0]
mov	[edx], eax
call	sub_77B6F0
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_77C5A0 endp

align 10h


; Attributes: bp-based frame

sub_77C5E0 proc	near

var_74=	dword ptr -74h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77C5E0
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 68h
xor	eax, eax
mov	byte ptr [ebp+var_10+1], al
mov	cl, byte ptr [ebp+var_10+1]
mov	byte ptr [ebp+var_E+1],	cl
xor	edx, edx
mov	byte ptr [ebp+var_10], dl
mov	al, byte ptr [ebp+var_10]
mov	byte ptr [ebp+var_E], al
mov	ecx, [ebp+arg_0]
mov	[ebp+var_18], ecx
mov	[ebp+var_4], 0
cmp	[ebp+var_18], 0
jz	short loc_77C652
mov	edx, [ebp+arg_4]
push	edx
mov	ecx, [ebp+var_18]
call	sub_403850
mov	byte ptr [ebp+var_4], 1
mov	eax, [ebp+arg_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 18h
call	sub_77C680
mov	byte ptr [ebp+var_4], 0
mov	ecx, [ebp+var_18]
mov	[ebp+var_74], ecx
jmp	short loc_77C659

loc_77C652:
mov	[ebp+var_74], 0

loc_77C659:
mov	edx, [ebp+var_74]
mov	[ebp+var_14], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn
sub_77C5E0 endp

align 10h


; Attributes: bp-based frame

sub_77C680 proc	near

var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_38=	dword ptr -38h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset SEH_77C680
mov	eax, large fs:0
push	eax
mov	large fs:0, esp
sub	esp, 5Ch
mov	[ebp+var_68], ecx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_68]
call	sub_403850
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_68]
add	ecx, 18h
mov	[ebp+var_38], ecx
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	ecx, [ebp+var_38]
call	sub_778510
mov	[ebp+var_4], 1
mov	eax, [ebp+var_68]
add	eax, 30h
mov	[ebp+var_64], eax
mov	ecx, [ebp+arg_0]
add	ecx, 30h
push	ecx
mov	ecx, [ebp+var_64]
call	sub_778660
mov	edx, [ebp+arg_0]
add	edx, 48h
mov	eax, [ebp+var_68]
add	eax, 48h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	edx, [edx+8]
mov	[eax+8], edx
mov	[ebp+var_4], 0FFFFFFFFh
mov	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
mov	esp, ebp
pop	ebp
retn	4
sub_77C680 endp

align 10h


; Attributes: bp-based frame

sub_77C720 proc	near

var_14=	dword ptr -14h
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_14], ecx
push	1
push	0
push	0
mov	ecx, [ebp+var_14]
call	sub_776E10
test	eax, eax
jz	short loc_77C755
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	edx, [ecx+24h]
mov	[eax+14h], edx
mov	eax, [ebp+var_14]
mov	ecx, [eax+24h]
mov	edx, [ebp+arg_0]
mov	[ecx+18h], edx
jmp	short loc_77C768

loc_77C755:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+14h], 0
mov	ecx, [ebp+var_14]
mov	edx, [ebp+arg_0]
mov	[ecx+20h], edx

loc_77C768:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[eax+24h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_14]
mov	[edx+10h], eax
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+18h], 0
mov	esp, ebp
pop	ebp
retn	4
sub_77C720 endp

align 10h


; Attributes: bp-based frame

sub_77C790 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	[ebp+var_50], ecx
push	1Ch
mov	ecx, [ebp+var_50]
call	sub_77BAF0
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_77C7D7
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_10]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_10]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_10]
mov	[ebp+var_54], ecx
jmp	short loc_77C7DE

loc_77C7D7:
mov	[ebp+var_54], 0

loc_77C7DE:
mov	edx, [ebp+var_54]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_4], eax
cmp	[ebp+arg_0], 0
jz	short loc_77C838
cmp	[ebp+arg_8], 0
jbe	short loc_77C809
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_8]
mov	[eax+8], ecx
jmp	short loc_77C838

loc_77C809:
mov	edx, [ebp+arg_0]
mov	[ebp+var_48], edx

loc_77C80F:
mov	eax, [ebp+var_48]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_77C824
mov	edx, [ebp+var_48]
add	edx, 1
mov	[ebp+var_48], edx
jmp	short loc_77C80F

loc_77C824:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
mov	edx, [ebp+var_48]
sub	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[eax+8], edx

loc_77C838:
cmp	[ebp+arg_4], 0
jz	short loc_77C888
cmp	[ebp+arg_C], 0
jbe	short loc_77C858
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_C]
mov	[eax+0Ch], ecx
jmp	short loc_77C888

loc_77C858:
mov	edx, [ebp+arg_4]
mov	[ebp+var_4C], edx

loc_77C85E:
mov	eax, [ebp+var_4C]
movzx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_77C873
mov	edx, [ebp+var_4C]
add	edx, 1
mov	[ebp+var_4C], edx
jmp	short loc_77C85E

loc_77C873:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_4C]
sub	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[eax+0Ch], edx

loc_77C888:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn	10h
sub_77C790 endp

align 10h


; Attributes: bp-based frame

sub_77C8A0 proc	near

var_74=	dword ptr -74h
var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	eax, 1
test	eax, eax
jz	short loc_77C8C5
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77D240
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx]
jmp	loc_77CC58

loc_77C8C5:
mov	eax, [ebp+arg_0]
push	eax
call	sub_77D2B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax

loc_77C8DF:
mov	ecx, [ebp+var_8]
mov	dl, [ecx]
mov	[ebp+var_3B], dl
mov	eax, 1
test	eax, eax
jz	short loc_77C8FF
movzx	ecx, [ebp+var_3B]
mov	dl, ds:byte_1445B68[ecx]
mov	[ebp+var_3C], dl
jmp	short loc_77C916

loc_77C8FF:
xor	eax, eax
jz	short loc_77C912
movzx	ecx, [ebp+var_3B]
mov	dl, ds:byte_1445A68[ecx]
mov	[ebp+var_3C], dl
jmp	short loc_77C916

loc_77C912:
mov	[ebp+var_3C], 0

loc_77C916:
movzx	eax, [ebp+var_3C]
test	eax, eax
jz	loc_77CC4D
xor	ecx, ecx
jz	loc_77CBD2	; default
			; jumptable 0077C960 cases 1-61,63-67,69-72,74-77
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
cmp	eax, 26h
jnz	loc_77CBD2	; default
			; jumptable 0077C960 cases 1-61,63-67,69-72,74-77
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+1]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
sub	eax, 23h
mov	[ebp+var_74], eax
cmp	[ebp+var_74], 4Eh ; switch 79 cases
ja	loc_77CBD2	; default
			; jumptable 0077C960 cases 1-61,63-67,69-72,74-77
mov	ecx, [ebp+var_74]
movzx	edx, ds:byte_77CC74[ecx]
jmp	ds:off_77CC5C[edx*4] ; switch jump

loc_77C967:		; jumptable 0077C960 case 62
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 6Dh
jnz	short loc_77C9A8
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+3]
cmp	eax, 70h
jnz	short loc_77C9A8
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+4]
cmp	edx, 3Bh
jnz	short loc_77C9A8
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	26h
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 5
mov	[ebp+var_8], edx
jmp	loc_77C8DF

loc_77C9A8:
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 70h
jnz	short loc_77C9F5
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+3]
cmp	eax, 6Fh
jnz	short loc_77C9F5
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+4]
cmp	edx, 73h
jnz	short loc_77C9F5
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+5]
cmp	ecx, 3Bh
jnz	short loc_77C9F5
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	27h
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 6
mov	[ebp+var_8], ecx
jmp	loc_77C8DF

loc_77C9F5:		; default
jmp	loc_77CBD2	; jumptable 0077C960 cases 1-61,63-67,69-72,74-77

loc_77C9FA:		; jumptable 0077C960 case 78
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 75h
jnz	short loc_77CA47
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 6Fh
jnz	short loc_77CA47
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+4]
cmp	ecx, 74h
jnz	short loc_77CA47
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+5]
cmp	eax, 3Bh
jnz	short loc_77CA47
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	22h
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 6
mov	[ebp+var_8], eax
jmp	loc_77C8DF

loc_77CA47:		; default
jmp	loc_77CBD2	; jumptable 0077C960 cases 1-61,63-67,69-72,74-77

loc_77CA4C:		; jumptable 0077C960 case 68
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 74h
jnz	short loc_77CA81
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+3]
cmp	ecx, 3Bh
jnz	short loc_77CA81
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	3Eh
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
jmp	loc_77C8DF

loc_77CA81:		; default
jmp	loc_77CBD2	; jumptable 0077C960 cases 1-61,63-67,69-72,74-77

loc_77CA86:		; jumptable 0077C960 case 73
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 74h
jnz	short loc_77CABB
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 3Bh
jnz	short loc_77CABB
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	3Ch
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
jmp	loc_77C8DF

loc_77CABB:		; default
jmp	loc_77CBD2	; jumptable 0077C960 cases 1-61,63-67,69-72,74-77

loc_77CAC0:		; jumptable 0077C960 case 0
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 78h
jnz	short loc_77CB2E
mov	[ebp+var_C], 0
mov	edx, [ebp+var_8]
add	edx, 3
mov	[ebp+var_8], edx

loc_77CADC:
mov	eax, 1
test	eax, eax
jz	short loc_77CB1C
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_1445968[edx]
mov	[ebp+var_D], al
movzx	ecx, [ebp+var_D]
cmp	ecx, 0FFh
jnz	short loc_77CB02
jmp	short loc_77CB1C

loc_77CB02:
mov	edx, [ebp+var_C]
shl	edx, 4
movzx	eax, [ebp+var_D]
add	edx, eax
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_77CADC

loc_77CB1C:
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_4]
push	eax
call	sub_77D320
add	esp, 8
jmp	short loc_77CB8D

loc_77CB2E:
mov	[ebp+var_14], 0
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_8], ecx

loc_77CB3E:
mov	edx, 1
test	edx, edx
jz	short loc_77CB7D
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_1445968[ecx]
mov	[ebp+var_15], dl
movzx	eax, [ebp+var_15]
cmp	eax, 0FFh
jnz	short loc_77CB63
jmp	short loc_77CB7D

loc_77CB63:
mov	ecx, [ebp+var_14]
imul	ecx, 0Ah
movzx	edx, [ebp+var_15]
add	ecx, edx
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_77CB3E

loc_77CB7D:
mov	ecx, [ebp+var_14]
push	ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_77D320
add	esp, 8

loc_77CB8D:
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
cmp	ecx, 3Bh
jnz	short loc_77CBA3
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77CBCD

loc_77CBA3:
lea	ecx, [ebp+var_2C]
call	sub_7965EC
mov	[ebp+var_2C], offset off_14454A0
mov	[ebp+var_20], offset aExpected_2 ; "expected ;"
mov	eax, [ebp+var_8]
mov	[ebp+var_1C], eax
push	offset unk_1623934
lea	ecx, [ebp+var_2C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77CBCD:
jmp	loc_77C8DF

loc_77CBD2:		; default
xor	edx, edx	; jumptable 0077C960 cases 1-61,63-67,69-72,74-77
jz	short loc_77CC2C
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_14454A8[ecx]
mov	[ebp+var_6D], dl
movzx	eax, [ebp+var_6D]
test	eax, eax
jz	short loc_77CC2C
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	20h
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_77CC05:
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_14454A8[edx]
mov	[ebp+var_6E], al
movzx	ecx, [ebp+var_6E]
test	ecx, ecx
jz	short loc_77CC27
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77CC05

loc_77CC27:
jmp	loc_77C8DF

loc_77CC2C:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	loc_77C8DF

loc_77CC4D:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	eax, [ebp+var_4]

loc_77CC58:
mov	esp, ebp
pop	ebp
retn
sub_77C8A0 endp

off_77CC5C dd offset loc_77CAC0, offset	loc_77C967 ; jump table	for switch statement
dd offset loc_77CA4C, offset loc_77CA86
dd offset loc_77C9FA, offset loc_77CBD2
byte_77CC74 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     1,     5
db	5,     5,     5,     5
db	2,     5,     5,     5
db	5,     3,     5,     5
db	5,     5,     4
align 10h


; Attributes: bp-based frame

sub_77CCD0 proc	near

var_74=	dword ptr -74h
var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_3C=	byte ptr -3Ch
var_3B=	byte ptr -3Bh
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	eax, 1
test	eax, eax
jz	short loc_77CCF5
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_77D4E0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx]
jmp	loc_77D088

loc_77CCF5:
mov	eax, [ebp+arg_0]
push	eax
call	sub_77D550
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_4], eax

loc_77CD0F:
mov	ecx, [ebp+var_8]
mov	dl, [ecx]
mov	[ebp+var_3B], dl
xor	eax, eax
jz	short loc_77CD2A
movzx	ecx, [ebp+var_3B]
mov	dl, ds:byte_1445B68[ecx]
mov	[ebp+var_3C], dl
jmp	short loc_77CD46

loc_77CD2A:
mov	eax, 1
test	eax, eax
jz	short loc_77CD42
movzx	ecx, [ebp+var_3B]
mov	dl, ds:byte_1445A68[ecx]
mov	[ebp+var_3C], dl
jmp	short loc_77CD46

loc_77CD42:
mov	[ebp+var_3C], 0

loc_77CD46:
movzx	eax, [ebp+var_3C]
test	eax, eax
jz	loc_77D07D
xor	ecx, ecx
jz	loc_77D002	; default
			; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
cmp	eax, 26h
jnz	loc_77D002	; default
			; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+1]
mov	[ebp+var_74], edx
mov	eax, [ebp+var_74]
sub	eax, 23h
mov	[ebp+var_74], eax
cmp	[ebp+var_74], 4Eh ; switch 79 cases
ja	loc_77D002	; default
			; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77
mov	ecx, [ebp+var_74]
movzx	edx, ds:byte_77D0A4[ecx]
jmp	ds:off_77D08C[edx*4] ; switch jump

loc_77CD97:		; jumptable 0077CD90 case 62
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 6Dh
jnz	short loc_77CDD8
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+3]
cmp	eax, 70h
jnz	short loc_77CDD8
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+4]
cmp	edx, 3Bh
jnz	short loc_77CDD8
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	26h
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 5
mov	[ebp+var_8], edx
jmp	loc_77CD0F

loc_77CDD8:
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 70h
jnz	short loc_77CE25
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+3]
cmp	eax, 6Fh
jnz	short loc_77CE25
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+4]
cmp	edx, 73h
jnz	short loc_77CE25
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+5]
cmp	ecx, 3Bh
jnz	short loc_77CE25
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	27h
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 6
mov	[ebp+var_8], ecx
jmp	loc_77CD0F

loc_77CE25:		; default
jmp	loc_77D002	; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77

loc_77CE2A:		; jumptable 0077CD90 case 78
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 75h
jnz	short loc_77CE77
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 6Fh
jnz	short loc_77CE77
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+4]
cmp	ecx, 74h
jnz	short loc_77CE77
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+5]
cmp	eax, 3Bh
jnz	short loc_77CE77
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	22h
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 6
mov	[ebp+var_8], eax
jmp	loc_77CD0F

loc_77CE77:		; default
jmp	loc_77D002	; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77

loc_77CE7C:		; jumptable 0077CD90 case 68
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 74h
jnz	short loc_77CEB1
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+3]
cmp	ecx, 3Bh
jnz	short loc_77CEB1
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	3Eh
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
jmp	loc_77CD0F

loc_77CEB1:		; default
jmp	loc_77D002	; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77

loc_77CEB6:		; jumptable 0077CD90 case 73
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 74h
jnz	short loc_77CEEB
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 3Bh
jnz	short loc_77CEEB
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	3Ch
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
jmp	loc_77CD0F

loc_77CEEB:		; default
jmp	loc_77D002	; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77

loc_77CEF0:		; jumptable 0077CD90 case 0
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 78h
jnz	short loc_77CF5E
mov	[ebp+var_C], 0
mov	edx, [ebp+var_8]
add	edx, 3
mov	[ebp+var_8], edx

loc_77CF0C:
mov	eax, 1
test	eax, eax
jz	short loc_77CF4C
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_1445968[edx]
mov	[ebp+var_D], al
movzx	ecx, [ebp+var_D]
cmp	ecx, 0FFh
jnz	short loc_77CF32
jmp	short loc_77CF4C

loc_77CF32:
mov	edx, [ebp+var_C]
shl	edx, 4
movzx	eax, [ebp+var_D]
add	edx, eax
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_77CF0C

loc_77CF4C:
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_4]
push	eax
call	sub_77D320
add	esp, 8
jmp	short loc_77CFBD

loc_77CF5E:
mov	[ebp+var_14], 0
mov	ecx, [ebp+var_8]
add	ecx, 2
mov	[ebp+var_8], ecx

loc_77CF6E:
mov	edx, 1
test	edx, edx
jz	short loc_77CFAD
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_1445968[ecx]
mov	[ebp+var_15], dl
movzx	eax, [ebp+var_15]
cmp	eax, 0FFh
jnz	short loc_77CF93
jmp	short loc_77CFAD

loc_77CF93:
mov	ecx, [ebp+var_14]
imul	ecx, 0Ah
movzx	edx, [ebp+var_15]
add	ecx, edx
mov	[ebp+var_14], ecx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_77CF6E

loc_77CFAD:
mov	ecx, [ebp+var_14]
push	ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_77D320
add	esp, 8

loc_77CFBD:
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
cmp	ecx, 3Bh
jnz	short loc_77CFD3
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77CFFD

loc_77CFD3:
lea	ecx, [ebp+var_2C]
call	sub_7965EC
mov	[ebp+var_2C], offset off_14454A0
mov	[ebp+var_20], offset aExpected_2 ; "expected ;"
mov	eax, [ebp+var_8]
mov	[ebp+var_1C], eax
push	offset unk_1623934
lea	ecx, [ebp+var_2C]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77CFFD:
jmp	loc_77CD0F

loc_77D002:		; default
xor	edx, edx	; jumptable 0077CD90 cases 1-61,63-67,69-72,74-77
jz	short loc_77D05C
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_14454A8[ecx]
mov	[ebp+var_6D], dl
movzx	eax, [ebp+var_6D]
test	eax, eax
jz	short loc_77D05C
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	20h
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_77D035:
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_14454A8[edx]
mov	[ebp+var_6E], al
movzx	ecx, [ebp+var_6E]
test	ecx, ecx
jz	short loc_77D057
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77D035

loc_77D057:
jmp	loc_77CD0F

loc_77D05C:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	loc_77CD0F

loc_77D07D:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	eax, [ebp+var_4]

loc_77D088:
mov	esp, ebp
pop	ebp
retn
sub_77CCD0 endp

off_77D08C dd offset loc_77CEF0, offset	loc_77CD97 ; jump table	for switch statement
dd offset loc_77CE7C, offset loc_77CEB6
dd offset loc_77CE2A, offset loc_77D002
byte_77D0A4 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     1,     5
db	5,     5,     5,     5
db	2,     5,     5,     5
db	5,     3,     5,     5
db	5,     5,     4
align 10h


; Attributes: bp-based frame

sub_77D100 proc	near

var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_4D=	byte ptr -4Dh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 70h
mov	[ebp+var_6C], ecx
mov	eax, 1
test	eax, eax
jz	short loc_77D11A
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_8]
mov	[ecx], edx

loc_77D11A:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
xor	edx, edx
jz	short loc_77D137
mov	eax, [ebp+arg_4]
push	eax
call	sub_77D5C0
add	esp, 4
mov	[ebp+var_8], eax
jmp	short loc_77D146

loc_77D137:
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_77DA10
add	esp, 4
mov	[ebp+var_8], eax

loc_77D146:
xor	edx, edx
jz	short loc_77D188
xor	eax, eax
jz	short loc_77D165
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx-1]
cmp	edx, 20h
jnz	short loc_77D163
mov	eax, [ebp+var_8]
sub	eax, 1
mov	[ebp+var_8], eax

loc_77D163:
jmp	short loc_77D188

loc_77D165:
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx-1]
mov	al, ds:byte_14454A8[edx]
mov	[ebp+var_4D], al
movzx	ecx, [ebp+var_4D]
test	ecx, ecx
jz	short loc_77D188
mov	edx, [ebp+var_8]
sub	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77D165

loc_77D188:
mov	eax, 1
test	eax, eax
jz	short loc_77D1CA
push	0
push	0
push	0
push	0
push	2
mov	ecx, [ebp+var_6C]
add	ecx, 30h
call	sub_77B9D0
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+var_8]
sub	eax, [ebp+var_4]
mov	ecx, [ebp+var_C]
mov	[ecx+0Ch], eax
mov	edx, [ebp+var_C]
push	edx
mov	ecx, [ebp+arg_0]
call	sub_7782A0

loc_77D1CA:
mov	eax, 1
test	eax, eax
jz	short loc_77D20D
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+4], 0
jz	short loc_77D1E7
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ebp+var_70], eax
jmp	short loc_77D1EE

loc_77D1E7:
mov	[ebp+var_70], offset unk_1857F78

loc_77D1EE:
mov	ecx, [ebp+var_70]
movzx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_77D20D
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax+4], ecx
mov	edx, [ebp+var_8]
sub	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	[eax+0Ch], edx

loc_77D20D:
xor	ecx, ecx
jz	short loc_77D226
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	cl, [eax]
mov	[ebp+var_D], cl
mov	edx, [ebp+var_8]
mov	byte ptr [edx],	0
mov	al, [ebp+var_D]
jmp	short loc_77D22D

loc_77D226:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	al, [ecx]

loc_77D22D:
mov	esp, ebp
pop	ebp
retn	0Ch
sub_77D100 endp

align 10h


; Attributes: bp-based frame

sub_77D240 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_77D24E:
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	[ebp+var_5], al
mov	ecx, 1
test	ecx, ecx
jz	short loc_77D26E
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445B68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D285

loc_77D26E:
xor	ecx, ecx
jz	short loc_77D281
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445A68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D285

loc_77D281:
mov	[ebp+var_6], 0

loc_77D285:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_77D298
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
jmp	short loc_77D24E

loc_77D298:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn
sub_77D240 endp

align 10h


; Attributes: bp-based frame

sub_77D2B0 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_77D2BE:
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	[ebp+var_5], al
mov	ecx, 1
test	ecx, ecx
jz	short loc_77D2DE
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445D68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D2F5

loc_77D2DE:
xor	ecx, ecx
jz	short loc_77D2F1
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445C68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D2F5

loc_77D2F1:
mov	[ebp+var_6], 0

loc_77D2F5:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_77D308
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
jmp	short loc_77D2BE

loc_77D308:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn
sub_77D2B0 endp

align 10h


; Attributes: bp-based frame

sub_77D320 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
xor	eax, eax
jz	short loc_77D346
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	al, byte ptr [ebp+arg_4]
mov	[edx], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
jmp	loc_77D4D7

loc_77D346:
cmp	[ebp+arg_4], 80h
jnb	short loc_77D36B
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	al, byte ptr [ebp+arg_4]
mov	[edx], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax], edx
jmp	loc_77D4D7

loc_77D36B:
cmp	[ebp+arg_4], 800h
jnb	short loc_77D3B6
mov	ecx, [ebp+arg_4]
or	ecx, 80h
and	ecx, 0BFh
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[eax+1], cl
mov	ecx, [ebp+arg_4]
shr	ecx, 6
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
or	edx, 0C0h
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ecx], dl
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 2
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
jmp	loc_77D4D7

loc_77D3B6:
cmp	[ebp+arg_4], 10000h
jnb	short loc_77D41F
mov	edx, [ebp+arg_4]
or	edx, 80h
and	edx, 0BFh
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ecx+2], dl
mov	edx, [ebp+arg_4]
shr	edx, 6
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
or	eax, 80h
and	eax, 0BFh
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[edx+1], al
mov	eax, [ebp+arg_4]
shr	eax, 6
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
or	ecx, 0E0h
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 3
mov	eax, [ebp+arg_0]
mov	[eax], edx
jmp	loc_77D4D7

loc_77D41F:
cmp	[ebp+arg_4], 110000h
jnb	short loc_77D4A5
mov	ecx, [ebp+arg_4]
or	ecx, 80h
and	ecx, 0BFh
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[eax+3], cl
mov	ecx, [ebp+arg_4]
shr	ecx, 6
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
or	edx, 80h
and	edx, 0BFh
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ecx+2], dl
mov	edx, [ebp+arg_4]
shr	edx, 6
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
or	eax, 80h
and	eax, 0BFh
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[edx+1], al
mov	eax, [ebp+arg_4]
shr	eax, 6
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
or	ecx, 0F0h
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
add	edx, 4
mov	eax, [ebp+arg_0]
mov	[eax], edx
jmp	short loc_77D4D7

loc_77D4A5:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_18], edx
lea	ecx, [ebp+var_14]
call	sub_7965EC
mov	[ebp+var_14], offset off_14454A0
mov	[ebp+var_8], offset aInvalidNumeric ; "invalid numeric character entity"
mov	eax, [ebp+var_18]
mov	[ebp+var_4], eax
push	offset unk_1623934
lea	ecx, [ebp+var_14]
push	ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77D4D7:
mov	esp, ebp
pop	ebp
retn
sub_77D320 endp

align 10h


; Attributes: bp-based frame

sub_77D4E0 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_77D4EE:
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	[ebp+var_5], al
xor	ecx, ecx
jz	short loc_77D509
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445B68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D525

loc_77D509:
mov	ecx, 1
test	ecx, ecx
jz	short loc_77D521
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445A68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D525

loc_77D521:
mov	[ebp+var_6], 0

loc_77D525:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_77D538
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
jmp	short loc_77D4EE

loc_77D538:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn
sub_77D4E0 endp

align 10h


; Attributes: bp-based frame

sub_77D550 proc	near

var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_77D55E:
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	[ebp+var_5], al
xor	ecx, ecx
jz	short loc_77D579
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445D68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D595

loc_77D579:
mov	ecx, 1
test	ecx, ecx
jz	short loc_77D591
movzx	edx, [ebp+var_5]
mov	al, ds:byte_1445C68[edx]
mov	[ebp+var_6], al
jmp	short loc_77D595

loc_77D591:
mov	[ebp+var_6], 0

loc_77D595:
movzx	ecx, [ebp+var_6]
test	ecx, ecx
jz	short loc_77D5A8
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
jmp	short loc_77D55E

loc_77D5A8:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn
sub_77D550 endp

align 10h


; Attributes: bp-based frame

sub_77D5C0 proc	near

var_74=	dword ptr -74h
var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	eax, 1
test	eax, eax
jz	short loc_77D60B
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx

loc_77D5D7:
mov	eax, [ebp+var_30]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_1445F90[ecx]
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_77D5F9
mov	ecx, [ebp+var_30]
add	ecx, 1
mov	[ebp+var_30], ecx
jmp	short loc_77D5D7

loc_77D5F9:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ecx]
jmp	loc_77D99C

loc_77D60B:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_38], eax

loc_77D613:
mov	ecx, [ebp+var_38]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_1445E90[edx]
mov	[ebp+var_39], al
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_77D635
mov	edx, [ebp+var_38]
add	edx, 1
mov	[ebp+var_38], edx
jmp	short loc_77D613

loc_77D635:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_38]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx

loc_77D64B:
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_1445F90[eax]
mov	[ebp+var_3A], cl
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	loc_77D991
xor	eax, eax
jz	loc_77D916	; default
			; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
cmp	edx, 26h
jnz	loc_77D916	; default
			; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+1]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_74]
sub	edx, 23h
mov	[ebp+var_74], edx
cmp	[ebp+var_74], 4Eh ; switch 79 cases
ja	loc_77D916	; default
			; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77
mov	eax, [ebp+var_74]
movzx	ecx, ds:byte_77D9B8[eax]
jmp	ds:off_77D9A0[ecx*4] ; switch jump

loc_77D6AB:		; jumptable 0077D6A4 case 62
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 6Dh
jnz	short loc_77D6EC
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 70h
jnz	short loc_77D6EC
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+4]
cmp	ecx, 3Bh
jnz	short loc_77D6EC
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	26h
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 5
mov	[ebp+var_8], ecx
jmp	loc_77D64B

loc_77D6EC:
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 70h
jnz	short loc_77D739
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 6Fh
jnz	short loc_77D739
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+4]
cmp	ecx, 73h
jnz	short loc_77D739
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+5]
cmp	eax, 3Bh
jnz	short loc_77D739
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	27h
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 6
mov	[ebp+var_8], eax
jmp	loc_77D64B

loc_77D739:		; default
jmp	loc_77D916	; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77

loc_77D73E:		; jumptable 0077D6A4 case 78
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 75h
jnz	short loc_77D78B
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+3]
cmp	ecx, 6Fh
jnz	short loc_77D78B
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+4]
cmp	eax, 74h
jnz	short loc_77D78B
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+5]
cmp	edx, 3Bh
jnz	short loc_77D78B
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	22h
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 6
mov	[ebp+var_8], edx
jmp	loc_77D64B

loc_77D78B:		; default
jmp	loc_77D916	; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77

loc_77D790:		; jumptable 0077D6A4 case 68
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 74h
jnz	short loc_77D7C5
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+3]
cmp	eax, 3Bh
jnz	short loc_77D7C5
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	3Eh
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax
jmp	loc_77D64B

loc_77D7C5:		; default
jmp	loc_77D916	; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77

loc_77D7CA:		; jumptable 0077D6A4 case 73
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 74h
jnz	short loc_77D7FF
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+3]
cmp	ecx, 3Bh
jnz	short loc_77D7FF
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	3Ch
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
jmp	loc_77D64B

loc_77D7FF:		; default
jmp	loc_77D916	; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77

loc_77D804:		; jumptable 0077D6A4 case 0
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 78h
jnz	short loc_77D871
mov	[ebp+var_C], 0
mov	ecx, [ebp+var_8]
add	ecx, 3
mov	[ebp+var_8], ecx

loc_77D820:
mov	edx, 1
test	edx, edx
jz	short loc_77D85F
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_1445968[ecx]
mov	[ebp+var_D], dl
movzx	eax, [ebp+var_D]
cmp	eax, 0FFh
jnz	short loc_77D845
jmp	short loc_77D85F

loc_77D845:
mov	ecx, [ebp+var_C]
shl	ecx, 4
movzx	edx, [ebp+var_D]
add	ecx, edx
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_77D820

loc_77D85F:
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_77D320
add	esp, 8
jmp	short loc_77D8D1

loc_77D871:
mov	[ebp+var_14], 0
mov	eax, [ebp+var_8]
add	eax, 2
mov	[ebp+var_8], eax

loc_77D881:
mov	ecx, 1
test	ecx, ecx
jz	short loc_77D8C1
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_1445968[eax]
mov	[ebp+var_15], cl
movzx	edx, [ebp+var_15]
cmp	edx, 0FFh
jnz	short loc_77D8A7
jmp	short loc_77D8C1

loc_77D8A7:
mov	eax, [ebp+var_14]
imul	eax, 0Ah
movzx	ecx, [ebp+var_15]
add	eax, ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77D881

loc_77D8C1:
mov	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_77D320
add	esp, 8

loc_77D8D1:
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
cmp	eax, 3Bh
jnz	short loc_77D8E7
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_77D911

loc_77D8E7:
lea	ecx, [ebp+var_2C]
call	sub_7965EC
mov	[ebp+var_2C], offset off_14454A0
mov	[ebp+var_20], offset aExpected_2 ; "expected ;"
mov	edx, [ebp+var_8]
mov	[ebp+var_1C], edx
push	offset unk_1623934
lea	eax, [ebp+var_2C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77D911:
jmp	loc_77D64B

loc_77D916:		; default
xor	ecx, ecx	; jumptable 0077D6A4 cases 1-61,63-67,69-72,74-77
jz	short loc_77D970
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_77D970
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	20h
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_77D949:
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_14454A8[ecx]
mov	[ebp+var_6E], dl
movzx	eax, [ebp+var_6E]
test	eax, eax
jz	short loc_77D96B
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_77D949

loc_77D96B:
jmp	loc_77D64B

loc_77D970:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_77D64B

loc_77D991:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]

loc_77D99C:
mov	esp, ebp
pop	ebp
retn
sub_77D5C0 endp

off_77D9A0 dd offset loc_77D804, offset	loc_77D6AB ; jump table	for switch statement
dd offset loc_77D790, offset loc_77D7CA
dd offset loc_77D73E, offset loc_77D916
byte_77D9B8 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     1,     5
db	5,     5,     5,     5
db	2,     5,     5,     5
db	5,     3,     5,     5
db	5,     5,     4
align 10h


; Attributes: bp-based frame

sub_77DA10 proc	near

var_74=	dword ptr -74h
var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_31=	byte ptr -31h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 74h
mov	eax, 1
test	eax, eax
jz	short loc_77DA5B
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_30], edx

loc_77DA27:
mov	eax, [ebp+var_30]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_1445F90[ecx]
mov	[ebp+var_31], dl
movzx	eax, [ebp+var_31]
test	eax, eax
jz	short loc_77DA49
mov	ecx, [ebp+var_30]
add	ecx, 1
mov	[ebp+var_30], ecx
jmp	short loc_77DA27

loc_77DA49:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_30]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	eax, [ecx]
jmp	loc_77DDEC

loc_77DA5B:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_38], eax

loc_77DA63:
mov	ecx, [ebp+var_38]
movzx	edx, byte ptr [ecx]
mov	al, ds:byte_1446090[edx]
mov	[ebp+var_39], al
movzx	ecx, [ebp+var_39]
test	ecx, ecx
jz	short loc_77DA85
mov	edx, [ebp+var_38]
add	edx, 1
mov	[ebp+var_38], edx
jmp	short loc_77DA63

loc_77DA85:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_38]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx

loc_77DA9B:
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_1445F90[eax]
mov	[ebp+var_3A], cl
movzx	edx, [ebp+var_3A]
test	edx, edx
jz	loc_77DDE1
xor	eax, eax
jz	loc_77DD66	; default
			; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx]
cmp	edx, 26h
jnz	loc_77DD66	; default
			; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+1]
mov	[ebp+var_74], ecx
mov	edx, [ebp+var_74]
sub	edx, 23h
mov	[ebp+var_74], edx
cmp	[ebp+var_74], 4Eh ; switch 79 cases
ja	loc_77DD66	; default
			; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77
mov	eax, [ebp+var_74]
movzx	ecx, ds:byte_77DE08[eax]
jmp	ds:off_77DDF0[ecx*4] ; switch jump

loc_77DAFB:		; jumptable 0077DAF4 case 62
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 6Dh
jnz	short loc_77DB3C
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 70h
jnz	short loc_77DB3C
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+4]
cmp	ecx, 3Bh
jnz	short loc_77DB3C
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	26h
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 5
mov	[ebp+var_8], ecx
jmp	loc_77DA9B

loc_77DB3C:
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 70h
jnz	short loc_77DB89
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+3]
cmp	edx, 6Fh
jnz	short loc_77DB89
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+4]
cmp	ecx, 73h
jnz	short loc_77DB89
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+5]
cmp	eax, 3Bh
jnz	short loc_77DB89
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	27h
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 6
mov	[ebp+var_8], eax
jmp	loc_77DA9B

loc_77DB89:		; default
jmp	loc_77DD66	; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77

loc_77DB8E:		; jumptable 0077DAF4 case 78
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 75h
jnz	short loc_77DBDB
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+3]
cmp	ecx, 6Fh
jnz	short loc_77DBDB
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+4]
cmp	eax, 74h
jnz	short loc_77DBDB
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+5]
cmp	edx, 3Bh
jnz	short loc_77DBDB
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	22h
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 6
mov	[ebp+var_8], edx
jmp	loc_77DA9B

loc_77DBDB:		; default
jmp	loc_77DD66	; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77

loc_77DBE0:		; jumptable 0077DAF4 case 68
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+2]
cmp	ecx, 74h
jnz	short loc_77DC15
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+3]
cmp	eax, 3Bh
jnz	short loc_77DC15
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	3Eh
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax
jmp	loc_77DA9B

loc_77DC15:		; default
jmp	loc_77DD66	; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77

loc_77DC1A:		; jumptable 0077DAF4 case 73
mov	ecx, [ebp+var_8]
movzx	edx, byte ptr [ecx+2]
cmp	edx, 74h
jnz	short loc_77DC4F
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax+3]
cmp	ecx, 3Bh
jnz	short loc_77DC4F
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	3Ch
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
jmp	loc_77DA9B

loc_77DC4F:		; default
jmp	loc_77DD66	; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77

loc_77DC54:		; jumptable 0077DAF4 case 0
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx+2]
cmp	eax, 78h
jnz	short loc_77DCC1
mov	[ebp+var_C], 0
mov	ecx, [ebp+var_8]
add	ecx, 3
mov	[ebp+var_8], ecx

loc_77DC70:
mov	edx, 1
test	edx, edx
jz	short loc_77DCAF
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_1445968[ecx]
mov	[ebp+var_D], dl
movzx	eax, [ebp+var_D]
cmp	eax, 0FFh
jnz	short loc_77DC95
jmp	short loc_77DCAF

loc_77DC95:
mov	ecx, [ebp+var_C]
shl	ecx, 4
movzx	edx, [ebp+var_D]
add	ecx, edx
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	short loc_77DC70

loc_77DCAF:
mov	ecx, [ebp+var_C]
push	ecx
lea	edx, [ebp+var_4]
push	edx
call	sub_77D320
add	esp, 8
jmp	short loc_77DD21

loc_77DCC1:
mov	[ebp+var_14], 0
mov	eax, [ebp+var_8]
add	eax, 2
mov	[ebp+var_8], eax

loc_77DCD1:
mov	ecx, 1
test	ecx, ecx
jz	short loc_77DD11
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_1445968[eax]
mov	[ebp+var_15], cl
movzx	edx, [ebp+var_15]
cmp	edx, 0FFh
jnz	short loc_77DCF7
jmp	short loc_77DD11

loc_77DCF7:
mov	eax, [ebp+var_14]
imul	eax, 0Ah
movzx	ecx, [ebp+var_15]
add	eax, ecx
mov	[ebp+var_14], eax
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx
jmp	short loc_77DCD1

loc_77DD11:
mov	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_77D320
add	esp, 8

loc_77DD21:
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
cmp	eax, 3Bh
jnz	short loc_77DD37
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_77DD61

loc_77DD37:
lea	ecx, [ebp+var_2C]
call	sub_7965EC
mov	[ebp+var_2C], offset off_14454A0
mov	[ebp+var_20], offset aExpected_2 ; "expected ;"
mov	edx, [ebp+var_8]
mov	[ebp+var_1C], edx
push	offset unk_1623934
lea	eax, [ebp+var_2C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77DD61:
jmp	loc_77DA9B

loc_77DD66:		; default
xor	ecx, ecx	; jumptable 0077DAF4 cases 1-61,63-67,69-72,74-77
jz	short loc_77DDC0
mov	edx, [ebp+var_8]
movzx	eax, byte ptr [edx]
mov	cl, ds:byte_14454A8[eax]
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
test	edx, edx
jz	short loc_77DDC0
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	20h
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_77DD99:
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	dl, ds:byte_14454A8[ecx]
mov	[ebp+var_6E], dl
movzx	eax, [ebp+var_6E]
test	eax, eax
jz	short loc_77DDBB
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_77DD99

loc_77DDBB:
jmp	loc_77DA9B

loc_77DDC0:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax
jmp	loc_77DA9B

loc_77DDE1:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+var_4]

loc_77DDEC:
mov	esp, ebp
pop	ebp
retn
sub_77DA10 endp

off_77DDF0 dd offset loc_77DC54, offset	loc_77DAFB ; jump table	for switch statement
dd offset loc_77DBE0, offset loc_77DC1A
dd offset loc_77DB8E, offset loc_77DD66
byte_77DE08 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     1,     5
db	5,     5,     5,     5
db	2,     5,     5,     5
db	5,     3,     5,     5
db	5,     5,     4
align 10h


; Attributes: bp-based frame

sub_77DE60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	ebx
push	esi
mov	[ebp+var_4], ecx
mov	esi, [ebp+var_4]
mov	ebx, [ebp+arg_0]
mov	eax, [esi]
mov	edx, [esi+4]

loc_77DE74:
mov	[ebx], eax
lea	ecx, [edx+1]
lock cmpxchg8b qword ptr [esi]
jnz	short loc_77DE74
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	4
sub_77DE60 endp

align 10h


; Attributes: bp-based frame

sub_77DE90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
push	ebx
push	esi
mov	[ebp+var_4], ecx
mov	esi, [ebp+var_4]
mov	eax, [esi]
mov	edx, [esi+4]

loc_77DEA1:
test	eax, eax
jz	short loc_77DEB0
mov	ebx, [eax]
lea	ecx, [edx+1]
lock cmpxchg8b qword ptr [esi]
jnz	short loc_77DEA1

loc_77DEB0:
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_77DE90 endp

align 10h


; Attributes: bp-based frame

sub_77DEC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	0FFFFFFFFh
push	offset sub_12C96E0
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, ebp
push	eax
lea	eax, [ebp+var_C]
mov	large fs:0, eax
mov	[ebp+var_10], esp
mov	eax, [ebp+arg_4]
mov	esi, [eax]
mov	ebx, [ebp+arg_0]
imul	esi, ebx
mov	ecx, offset unk_1857F88
mov	[ebp+var_14], 0
mov	[ebp+var_18], esi
call	sub_77DE90
mov	ecx, eax
test	ecx, ecx
jz	short loc_77DF85
mov	edi, [ecx+4]
sub	edi, ecx
cmp	edi, esi
jge	short loc_77DF39
cmp	edi, ebx
jl	short loc_77DF42
xor	edx, edx
mov	eax, edi
div	ebx
mov	edx, [ebp+arg_4]
mov	[edx], eax
imul	eax, ebx
mov	esi, eax
mov	[ebp+var_18], esi
sub	edi, esi
lea	eax, [ecx+esi]
mov	ebx, ecx
jmp	short loc_77DF45

loc_77DF39:
mov	ebx, ecx
sub	edi, esi
lea	eax, [ecx+esi]
jmp	short loc_77DF45

loc_77DF42:
mov	ebx, [ebp+var_14]

loc_77DF45:
test	edi, edi
jz	short loc_77DF7D
test	ebx, ebx
jz	short loc_77DF5F
cmp	edi, 8
jl	short loc_77DF5F
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	ecx, offset unk_1857F88
jmp	short loc_77DF77

loc_77DF5F:
add	edi, 8
and	edi, 0FFFFFFF8h
sub	edi, 8
jz	short loc_77DF7D
lea	ecx, [edi-1]
shr	ecx, 3
lea	ecx, unk_1857F90[ecx*8]

loc_77DF77:
push	eax
call	sub_77DE60

loc_77DF7D:
test	ebx, ebx
jnz	loc_77E0B8

loc_77DF85:		; Value
push	0
push	offset dword_1857F84 ; Addend
call	ds:InterlockedExchangeAdd
add	eax, 7
and	eax, 0FFFFFFF8h
lea	edi, [eax+esi*2]
push	edi		; size_t
mov	[ebp+var_4], 0
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	ebx, eax
jmp	loc_77E091

loc_77DFB2:
mov	ebx, [ebp+arg_0]
mov	esi, ebx
cmp	ebx, 80h
ja	short loc_77DFE6
nop

loc_77DFC0:
lea	ecx, [esi-1]
shr	ecx, 3
lea	ecx, unk_1857F90[ecx*8]
call	sub_77DE90
mov	edi, eax
mov	[ebp+arg_0], edi
test	edi, edi
jnz	short loc_77DFFE
add	esi, 8
cmp	esi, 80h
jbe	short loc_77DFC0

loc_77DFE6:
mov	eax, [ebp+var_18]
push	eax		; size_t
mov	[ebp+arg_4], eax
call	??2@YAPAXI@Z	; operator new(uint)
mov	[ebp+var_14], eax
add	esp, 4
mov	eax, offset loc_77E088
retn

loc_77DFFE:
cmp	esi, 8
jnb	short loc_77E04C
xor	edx, edx
mov	eax, esi
div	ebx
mov	edx, [ebp+arg_4]
mov	[edx], eax
imul	eax, ebx
sub	esi, eax
lea	ecx, [esi+8]
and	ecx, 0FFFFFFF8h
sub	ecx, 8
jz	short loc_77E031
dec	ecx
add	edi, eax
shr	ecx, 3
push	edi
lea	ecx, unk_1857F90[ecx*8]
call	sub_77DE60

loc_77E031:
mov	eax, offset loc_77E037
retn

loc_77E037:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_77E04C:
lea	eax, [edi+esi]
push	edi
mov	ecx, offset unk_1857F88
mov	[edi+4], eax
call	sub_77DE60
mov	ecx, [ebp+arg_4]
push	ecx
push	ebx
call	sub_77DEC0
mov	[ebp+arg_4], eax
add	esp, 8
mov	eax, offset loc_77E073
retn

loc_77E073:
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_77E088:
mov	ebx, [ebp+var_14]
mov	esi, [ebp+var_18]
mov	edi, [ebp+arg_4]

loc_77E091:
mov	edx, edi
sar	edx, 4
push	edx		; Value
push	offset dword_1857F84 ; Addend
call	ds:InterlockedExchangeAdd
cmp	edi, esi
jle	short loc_77E0B8
add	esi, ebx
add	edi, ebx
push	esi
mov	ecx, offset unk_1857F88
mov	[esi+4], edi
call	sub_77DE60

loc_77E0B8:
mov	eax, ebx
mov	ecx, [ebp+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_77DEC0 endp

align 10h



sub_77E0D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_0]
dec	ecx
shr	ecx, 3
push	eax
lea	ecx, unk_1857F90[ecx*8]
call	sub_77DE60
retn
sub_77E0D0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_77E150

loc_77E0F0:
push	ecx
push	ebp
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_4]
push	eax
push	edi
mov	[esp+14h+var_4], 14h
call	sub_77DEC0
mov	ebp, eax
mov	eax, 1
add	esp, 8
cmp	[esp+0Ch+var_4], eax
jle	short loc_77E144
push	ebx
lea	ebx, [edi-1]
shr	ebx, 3
sub	[esp+10h+var_4], eax
push	esi
mov	esi, ebp
lea	ebx, unk_1857F90[ebx*8]
jz	short loc_77E142

loc_77E131:
add	esi, edi
push	esi
mov	ecx, ebx
call	sub_77DE60
sub	[esp+14h+var_4], 1
jnz	short loc_77E131

loc_77E142:
pop	esi
pop	ebx

loc_77E144:
pop	edi
mov	eax, ebp
pop	ebp
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_77E150
align 10h



sub_77E150 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

; FUNCTION CHUNK AT 0077E0F0 SIZE 0000005A BYTES

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
add	eax, 7
and	eax, 0FFFFFFF8h
lea	ecx, [eax-1]
shr	ecx, 3
lea	ecx, unk_1857F90[ecx*8]
mov	[esi], eax
call	sub_77DE90
test	eax, eax
jnz	short loc_77E181
mov	eax, [esi]
pop	esi
mov	[esp+arg_0], eax
jmp	loc_77E0F0

loc_77E181:
pop	esi
retn
sub_77E150 endp

align 10h



sub_77E190 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	esi, ecx
call	sub_7965EC
mov	ebx, [esp+0Ch+arg_0]
mov	dword ptr [esi], offset	off_14461A0
mov	eax, [ebx+10Ch]
lea	edx, [eax+1]
lea	ecx, [ecx+0]

loc_77E1B0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_77E1B0
sub	eax, edx
lea	edi, [eax+1]
cmp	edi, 100h
jbe	short loc_77E1EC
push	edi		; size_t
call	_malloc
add	esp, 4
mov	[esi+10Ch], eax
test	eax, eax
jnz	short loc_77E1E7
lea	eax, [esi+0Ch]
mov	edi, 100h
mov	[esi+10Ch], eax
jmp	short loc_77E1F5

loc_77E1E7:
mov	[esi+0Ch], edi
jmp	short loc_77E1F5

loc_77E1EC:
lea	ecx, [esi+0Ch]
mov	[esi+10Ch], ecx

loc_77E1F5:
mov	eax, [ebx+10Ch]
mov	ecx, [esi+10Ch]
lea	edx, [edi-1]
push	edx		; MaxCount
push	eax		; Src
push	edi		; SizeInBytes
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_77E190 endp

align 10h



sub_77E220 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+10Ch]
lea	ecx, [esi+0Ch]
mov	dword ptr [esi], offset	off_14461A0
cmp	eax, ecx
jz	short loc_77E23F
push	eax		; void *
call	_free
add	esp, 4

loc_77E23F:
mov	ecx, esi
pop	esi
jmp	sub_7966CA
sub_77E220 endp

align 10h



sub_77E250 proc	near
mov	eax, [ecx+10Ch]
retn
sub_77E250 endp

align 10h



sub_77E260 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 0Ch
cmp	eax, 3FFFFFFFh
jbe	short loc_77E295
push	1
push	offset off_167E940
lea	ecx, [esp+14h+var_C]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
push	offset unk_1641FD8
lea	eax, [esp+10h+var_C]
push	eax
mov	[esp+14h+var_C], offset	off_1446194
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_77E295:
test	eax, eax
jz	short loc_77E2E4
add	eax, eax
add	eax, eax
mov	[esp+0Ch+arg_0], eax
cmp	eax, 80h
jbe	short loc_77E2C4
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edx, [esp+10h+arg_0]
mov	ecx, [esp+10h+arg_4]
add	esp, 4
shr	edx, 2
mov	[ecx], edx
add	esp, 0Ch
retn	8

loc_77E2C4:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
call	sub_77E150
mov	edx, [esp+10h+arg_0]
mov	ecx, [esp+10h+arg_4]
add	esp, 4
shr	edx, 2
mov	[ecx], edx
add	esp, 0Ch
retn	8

loc_77E2E4:
xor	eax, eax
add	esp, 0Ch
retn	8
sub_77E260 endp

align 10h



sub_77E2F0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx+0Ch]
test	eax, eax
jz	short loc_77E30C
mov	ecx, [eax+8]
test	ecx, ecx
jz	short locret_77E325

loc_77E302:
mov	eax, ecx
mov	ecx, [eax+8]
test	ecx, ecx
jnz	short loc_77E302
retn

loc_77E30C:
mov	eax, [ecx+4]
cmp	ecx, [eax+0Ch]
jnz	short loc_77E31E

loc_77E314:
mov	ecx, eax
mov	eax, [eax+4]
cmp	ecx, [eax+0Ch]
jz	short loc_77E314

loc_77E31E:
cmp	[ecx+0Ch], eax
jnz	short locret_77E325
mov	eax, ecx

locret_77E325:
retn
sub_77E2F0 endp

align 10h



sub_77E330 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
cmp	byte ptr [ecx],	0
jnz	short loc_77E345
mov	eax, [ecx+4]
cmp	[eax+4], ecx
jnz	short loc_77E345
mov	eax, [ecx+0Ch]
retn

loc_77E345:
mov	eax, [ecx+8]
test	eax, eax
jz	short loc_77E35D
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short locret_77E36F

loc_77E353:
mov	eax, ecx
mov	ecx, [eax+0Ch]
test	ecx, ecx
jnz	short loc_77E353
retn

loc_77E35D:
mov	eax, [ecx+4]
cmp	ecx, [eax+8]
jnz	short locret_77E36F

loc_77E365:
mov	ecx, eax
mov	eax, [eax+4]
cmp	ecx, [eax+8]
jz	short loc_77E365

locret_77E36F:
retn
sub_77E330 endp




sub_77E370 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [ecx+0Ch]
mov	edx, [eax+8]
mov	[ecx+0Ch], edx
mov	edx, [eax+8]
test	edx, edx
jz	short loc_77E387
mov	[edx+4], ecx

loc_77E387:
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [esp+arg_4]
cmp	ecx, [edx]
jnz	short loc_77E39E
mov	[edx], eax
mov	[eax+8], ecx
mov	[ecx+4], eax
retn

loc_77E39E:
mov	edx, [ecx+4]
cmp	ecx, [edx+8]
jnz	short loc_77E3B0
mov	[edx+8], eax
mov	[eax+8], ecx
mov	[ecx+4], eax
retn

loc_77E3B0:
mov	[edx+0Ch], eax
mov	[eax+8], ecx
mov	[ecx+4], eax
retn
sub_77E370 endp

align 10h



sub_77E3C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [ecx+8]
mov	edx, [eax+0Ch]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
test	edx, edx
jz	short loc_77E3D7
mov	[edx+4], ecx

loc_77E3D7:
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [esp+arg_4]
cmp	ecx, [edx]
jnz	short loc_77E3EE
mov	[edx], eax
mov	[eax+0Ch], ecx
mov	[ecx+4], eax
retn

loc_77E3EE:
mov	edx, [ecx+4]
cmp	ecx, [edx+0Ch]
jnz	short loc_77E400
mov	[edx+0Ch], eax
mov	[eax+0Ch], ecx
mov	[ecx+4], eax
retn

loc_77E400:
mov	[edx+8], eax
mov	[eax+0Ch], ecx
mov	[ecx+4], eax
retn
sub_77E3C0 endp

align 10h



sub_77E410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_8]
cmp	eax, ecx
jz	short locret_77E445
mov	edx, [ecx+4]
mov	[edx], eax
mov	edx, [esp+arg_4]
push	esi
mov	esi, [edx+4]
mov	[esi], ecx
mov	esi, [eax+4]
mov	[esi], edx
mov	esi, [eax+4]
push	edi
mov	edi, [ecx+4]
mov	[eax+4], edi
mov	eax, [edx+4]
mov	[ecx+4], eax
pop	edi
mov	[edx+4], esi
pop	esi

locret_77E445:
retn
sub_77E410 endp

align 10h



sub_77E450 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
cmp	eax, edx
jz	short locret_77E476
mov	ecx, [esp+arg_8]
cmp	eax, ecx
jz	short locret_77E476
push	ebx
mov	ebx, [ecx]
push	esi
mov	esi, [edx]
push	edi
mov	edi, [eax]
mov	[edx], ebx
mov	[eax], esi
mov	[ecx], edi
pop	edi
pop	esi
pop	ebx

locret_77E476:
retn
sub_77E450 endp

align 10h



sub_77E480 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
test	eax, eax
jz	short locret_77E49C
mov	edx, [esp+arg_4]
lea	esp, [esp+0]

loc_77E490:
mov	ecx, [eax]
cmp	ecx, edx
jz	short locret_77E49C
mov	eax, ecx
test	eax, eax
jnz	short loc_77E490

locret_77E49C:
retn
sub_77E480 endp

align 10h



sub_77E4A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	edi
mov	edi, [esp+4+arg_4]
mov	byte ptr [eax],	0
cmp	eax, [edi]
jz	loc_77E63F
push	esi
jmp	short loc_77E4C0
align 10h

loc_77E4C0:
mov	ecx, [eax+4]
cmp	byte ptr [ecx],	0
jnz	loc_77E646
mov	esi, [ecx+4]
mov	edx, [esi+8]
cmp	ecx, edx
jnz	loc_77E582
mov	edx, [esi+0Ch]
test	edx, edx
jz	short loc_77E4EA
cmp	byte ptr [edx],	0
jz	loc_77E58B

loc_77E4EA:
cmp	eax, [ecx+0Ch]
jnz	short loc_77E528
mov	eax, ecx
mov	ecx, [eax+0Ch]
mov	edx, [ecx+8]
mov	[eax+0Ch], edx
mov	edx, [ecx+8]
test	edx, edx
jz	short loc_77E504
mov	[edx+4], eax

loc_77E504:
mov	edx, [eax+4]
mov	[ecx+4], edx
cmp	eax, [edi]
jnz	short loc_77E512
mov	[edi], ecx
jmp	short loc_77E522

loc_77E512:
mov	edx, [eax+4]
cmp	eax, [edx+8]
jnz	short loc_77E51F
mov	[edx+8], ecx
jmp	short loc_77E522

loc_77E51F:
mov	[edx+0Ch], ecx

loc_77E522:
mov	[ecx+8], eax
mov	[eax+4], ecx

loc_77E528:
mov	ecx, [eax+4]
mov	byte ptr [ecx],	1
mov	edx, [eax+4]
mov	ecx, [edx+4]
mov	byte ptr [ecx],	0
mov	edx, [eax+4]
mov	ecx, [edx+4]
mov	edx, [ecx+8]
mov	esi, [edx+0Ch]
mov	[ecx+8], esi
mov	esi, [edx+0Ch]
test	esi, esi
jz	short loc_77E550
mov	[esi+4], ecx

loc_77E550:
mov	esi, [ecx+4]
mov	[edx+4], esi
cmp	ecx, [edi]
jnz	short loc_77E564
mov	[edi], edx
mov	[edx+0Ch], ecx
jmp	loc_77E62C

loc_77E564:
mov	esi, [ecx+4]
cmp	ecx, [esi+0Ch]
jnz	short loc_77E577
mov	[esi+0Ch], edx
mov	[edx+0Ch], ecx
jmp	loc_77E62C

loc_77E577:
mov	[esi+8], edx
mov	[edx+0Ch], ecx
jmp	loc_77E62C

loc_77E582:
test	edx, edx
jz	short loc_77E5A5
cmp	byte ptr [edx],	0
jnz	short loc_77E5A5

loc_77E58B:
mov	byte ptr [ecx],	1
mov	byte ptr [edx],	1
mov	edx, [eax+4]
mov	ecx, [edx+4]
mov	byte ptr [ecx],	0
mov	edx, [eax+4]
mov	eax, [edx+4]
jmp	loc_77E62F

loc_77E5A5:
cmp	eax, [ecx+8]
jnz	short loc_77E5E3
mov	eax, ecx
mov	ecx, [eax+8]
mov	edx, [ecx+0Ch]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
test	edx, edx
jz	short loc_77E5BF
mov	[edx+4], eax

loc_77E5BF:
mov	edx, [eax+4]
mov	[ecx+4], edx
cmp	eax, [edi]
jnz	short loc_77E5CD
mov	[edi], ecx
jmp	short loc_77E5DD

loc_77E5CD:
mov	edx, [eax+4]
cmp	eax, [edx+0Ch]
jnz	short loc_77E5DA
mov	[edx+0Ch], ecx
jmp	short loc_77E5DD

loc_77E5DA:
mov	[edx+8], ecx

loc_77E5DD:
mov	[ecx+0Ch], eax
mov	[eax+4], ecx

loc_77E5E3:
mov	ecx, [eax+4]
mov	byte ptr [ecx],	1
mov	edx, [eax+4]
mov	ecx, [edx+4]
mov	byte ptr [ecx],	0
mov	edx, [eax+4]
mov	ecx, [edx+4]
mov	edx, [ecx+0Ch]
mov	esi, [edx+8]
mov	[ecx+0Ch], esi
mov	esi, [edx+8]
test	esi, esi
jz	short loc_77E60B
mov	[esi+4], ecx

loc_77E60B:
mov	esi, [ecx+4]
mov	[edx+4], esi
cmp	ecx, [edi]
jnz	short loc_77E619
mov	[edi], edx
jmp	short loc_77E629

loc_77E619:
mov	esi, [ecx+4]
cmp	ecx, [esi+8]
jnz	short loc_77E626
mov	[esi+8], edx
jmp	short loc_77E629

loc_77E626:
mov	[esi+0Ch], edx

loc_77E629:
mov	[edx+8], ecx

loc_77E62C:
mov	[ecx+4], edx

loc_77E62F:
cmp	eax, [edi]
jnz	loc_77E4C0
mov	eax, [edi]
pop	esi
mov	byte ptr [eax],	1
pop	edi
retn

loc_77E63F:
mov	ecx, [edi]
mov	byte ptr [ecx],	1
pop	edi
retn

loc_77E646:
mov	edx, [edi]
pop	esi
mov	byte ptr [edx],	1
pop	edi
retn
sub_77E4A0 endp

align 10h



sub_77E650 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [ecx+8]
push	edi
mov	ebx, ecx
test	esi, esi
jnz	short loc_77E681
mov	ebp, [ecx+0Ch]

loc_77E664:
mov	esi, [ebx+4]
test	ebp, ebp
jz	short loc_77E66E
mov	[ebp+4], esi

loc_77E66E:
mov	eax, [esp+10h+arg_4]
cmp	[eax], ecx
jnz	loc_77E701
mov	[eax], ebp
jmp	loc_77E711

loc_77E681:
mov	eax, [ecx+0Ch]
test	eax, eax
jnz	short loc_77E68C
mov	ebp, esi
jmp	short loc_77E664

loc_77E68C:
mov	edx, [eax+8]
test	edx, edx
jz	short loc_77E69C

loc_77E693:
mov	eax, edx
mov	edx, [eax+8]
test	edx, edx
jnz	short loc_77E693

loc_77E69C:
mov	ebp, [eax+0Ch]
mov	ebx, eax
cmp	eax, ecx
jz	short loc_77E664
mov	[esi+4], eax
mov	edx, [ecx+8]
mov	[eax+8], edx
cmp	eax, [ecx+0Ch]
jz	short loc_77E6D1
mov	esi, [eax+4]
test	ebp, ebp
jz	short loc_77E6BD
mov	[ebp+4], esi

loc_77E6BD:
mov	edx, [eax+4]
mov	[edx+8], ebp
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+0Ch]
mov	[edx+4], eax
jmp	short loc_77E6D3

loc_77E6D1:
mov	esi, eax

loc_77E6D3:
mov	edi, [esp+10h+arg_4]
cmp	[edi], ecx
jnz	short loc_77E6DF
mov	[edi], eax
jmp	short loc_77E6EF

loc_77E6DF:
mov	edx, [ecx+4]
cmp	[edx+8], ecx
jnz	short loc_77E6EC
mov	[edx+8], eax
jmp	short loc_77E6EF

loc_77E6EC:
mov	[edx+0Ch], eax

loc_77E6EF:
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	bl, [ecx]
mov	dl, [eax]
mov	[eax], bl
mov	[ecx], dl
mov	ebx, ecx
jmp	short loc_77E766

loc_77E701:
mov	eax, [ecx+4]
cmp	[eax+8], ecx
jnz	short loc_77E70E
mov	[eax+8], ebp
jmp	short loc_77E711

loc_77E70E:
mov	[eax+0Ch], ebp

loc_77E711:
mov	edi, [esp+10h+arg_8]
cmp	[edi], ecx
jnz	short loc_77E73B
cmp	dword ptr [ecx+0Ch], 0
jnz	short loc_77E726
mov	eax, [ecx+4]
mov	[edi], eax
jmp	short loc_77E73B

loc_77E726:
mov	eax, [ebp+8]
mov	edx, ebp
test	eax, eax
jz	short loc_77E739
nop

loc_77E730:
mov	edx, eax
mov	eax, [edx+8]
test	eax, eax
jnz	short loc_77E730

loc_77E739:
mov	[edi], edx

loc_77E73B:
mov	edx, [esp+10h+arg_C]
cmp	[edx], ecx
jnz	short loc_77E762
cmp	dword ptr [ecx+8], 0
jnz	short loc_77E74E
mov	ecx, [ecx+4]
jmp	short loc_77E760

loc_77E74E:
mov	eax, [ebp+0Ch]
mov	ecx, ebp
test	eax, eax
jz	short loc_77E760

loc_77E757:
mov	ecx, eax
mov	eax, [ecx+0Ch]
test	eax, eax
jnz	short loc_77E757

loc_77E760:
mov	[edx], ecx

loc_77E762:
mov	edi, [esp+10h+arg_4]

loc_77E766:
cmp	byte ptr [ebx],	0
jz	loc_77E8FA
cmp	ebp, [edi]
jz	loc_77E8EB

loc_77E777:
test	ebp, ebp
jz	short loc_77E785
cmp	byte ptr [ebp+0], 1
jnz	loc_77E8EB

loc_77E785:
mov	eax, [esi+8]
cmp	ebp, eax
jnz	loc_77E83B
mov	eax, [esi+0Ch]
cmp	byte ptr [eax],	0
jnz	short loc_77E7D8
mov	byte ptr [eax],	1
mov	eax, [esi+0Ch]
mov	byte ptr [esi],	0
mov	edx, [eax+8]
mov	[esi+0Ch], edx
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_77E7B1
mov	[ecx+4], esi

loc_77E7B1:
mov	ecx, [esi+4]
mov	[eax+4], ecx
cmp	esi, [edi]
jnz	short loc_77E7BF
mov	[edi], eax
jmp	short loc_77E7CF

loc_77E7BF:
mov	ecx, [esi+4]
cmp	esi, [ecx+8]
jnz	short loc_77E7CC
mov	[ecx+8], eax
jmp	short loc_77E7CF

loc_77E7CC:
mov	[ecx+0Ch], eax

loc_77E7CF:
mov	[eax+8], esi
mov	[esi+4], eax
mov	eax, [esi+0Ch]

loc_77E7D8:
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_77E7E4
cmp	byte ptr [ecx],	1
jnz	short loc_77E7F8

loc_77E7E4:
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	loc_77E898
cmp	byte ptr [ecx],	1
jz	loc_77E898

loc_77E7F8:
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short loc_77E804
cmp	byte ptr [ecx],	1
jnz	short loc_77E81E

loc_77E804:
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_77E80E
mov	byte ptr [ecx],	1

loc_77E80E:
push	edi
push	eax
mov	byte ptr [eax],	0
call	sub_77E3C0
mov	eax, [esi+0Ch]
add	esp, 8

loc_77E81E:
mov	dl, [esi]
mov	[eax], dl
mov	byte ptr [esi],	1
mov	eax, [eax+0Ch]
test	eax, eax
jz	short loc_77E82F
mov	byte ptr [eax],	1

loc_77E82F:
push	edi
push	esi
call	sub_77E370
jmp	loc_77E8E8

loc_77E83B:
cmp	byte ptr [eax],	0
jnz	short loc_77E880
mov	byte ptr [eax],	1
mov	eax, [esi+8]
mov	byte ptr [esi],	0
mov	edx, [eax+0Ch]
mov	[esi+8], edx
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short loc_77E859
mov	[ecx+4], esi

loc_77E859:
mov	ecx, [esi+4]
mov	[eax+4], ecx
cmp	esi, [edi]
jnz	short loc_77E867
mov	[edi], eax
jmp	short loc_77E877

loc_77E867:
mov	ecx, [esi+4]
cmp	esi, [ecx+0Ch]
jnz	short loc_77E874
mov	[ecx+0Ch], eax
jmp	short loc_77E877

loc_77E874:
mov	[ecx+8], eax

loc_77E877:
mov	[eax+0Ch], esi
mov	[esi+4], eax
mov	eax, [esi+8]

loc_77E880:
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short loc_77E88C
cmp	byte ptr [ecx],	1
jnz	short loc_77E8AA

loc_77E88C:
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_77E898
cmp	byte ptr [ecx],	1
jnz	short loc_77E8AA

loc_77E898:
mov	ebp, esi
mov	byte ptr [eax],	0
mov	esi, [esi+4]
cmp	ebp, [edi]
jnz	loc_77E777
jmp	short loc_77E8EB

loc_77E8AA:
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_77E8B6
cmp	byte ptr [ecx],	1
jnz	short loc_77E8D0

loc_77E8B6:
mov	ecx, [eax+0Ch]
test	ecx, ecx
jz	short loc_77E8C0
mov	byte ptr [ecx],	1

loc_77E8C0:
push	edi
push	eax
mov	byte ptr [eax],	0
call	sub_77E370
mov	eax, [esi+8]
add	esp, 8

loc_77E8D0:
mov	cl, [esi]
mov	[eax], cl
mov	byte ptr [esi],	1
mov	eax, [eax+8]
test	eax, eax
jz	short loc_77E8E1
mov	byte ptr [eax],	1

loc_77E8E1:
push	edi
push	esi
call	sub_77E3C0

loc_77E8E8:
add	esp, 8

loc_77E8EB:
mov	eax, ebx
test	ebp, ebp
jz	short loc_77E8FC
pop	edi
pop	esi
mov	byte ptr [ebp+0], 1
pop	ebp
pop	ebx
retn

loc_77E8FA:
mov	eax, ebx

loc_77E8FC:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_77E650 endp

align 10h



sub_77E910 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, edx
test	edx, edx
jz	short locret_77E946
lea	ebx, [ebx+0]

loc_77E920:
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_77E92C
mov	eax, ecx
test	eax, eax
jnz	short loc_77E920

loc_77E92C:
cmp	eax, edx
jz	short locret_77E946
mov	ecx, [esp+arg_0]
push	esi
mov	esi, [ecx]
push	edi
mov	edi, [edx]
mov	[ecx], edi
mov	dword ptr [edx], 0
pop	edi
mov	[eax], esi
pop	esi

locret_77E946:
retn
sub_77E910 endp

align 10h



sub_77E950 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	cl, byte ptr [esp+arg_0]
mov	[eax], cl
retn
sub_77E950 endp

align 10h



sub_77E960 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	esi, ecx
call	sub_7965EC
mov	ebx, [esp+0Ch+arg_0]
mov	dword ptr [esi], offset	off_14461A0
mov	eax, [ebx+14h]
lea	edx, [eax+1]
lea	ebx, [ebx+0]

loc_77E980:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_77E980
sub	eax, edx
lea	edi, [eax+1]
cmp	edi, 100h
jbe	short loc_77E9BC
push	edi		; size_t
call	_malloc
add	esp, 4
mov	[esi+10Ch], eax
test	eax, eax
jnz	short loc_77E9B7
lea	eax, [esi+0Ch]
mov	edi, 100h
mov	[esi+10Ch], eax
jmp	short loc_77E9C5

loc_77E9B7:
mov	[esi+0Ch], edi
jmp	short loc_77E9C5

loc_77E9BC:
lea	ecx, [esi+0Ch]
mov	[esi+10Ch], ecx

loc_77E9C5:
mov	eax, [ebx+14h]
mov	ecx, [esi+10Ch]
lea	edx, [edi-1]
push	edx		; MaxCount
push	eax		; Src
push	edi		; SizeInBytes
push	ecx		; Dst
call	_strncpy_s
add	esp, 10h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_77E960 endp

align 10h



sub_77E9F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	eax, [esp+arg_0]
sub	edx, eax
sar	edx, 2
test	edx, edx
jle	short locret_77EA2E
mov	ecx, [esp+arg_8]
push	esi
mov	esi, [ecx]
push	edi
lea	esp, [esp+0]

loc_77EA10:
mov	ecx, edx
sar	ecx, 1
cmp	[eax+ecx*4], esi
jnb	short loc_77EA26
or	edi, 0FFFFFFFFh
sub	edi, ecx
lea	eax, [eax+ecx*4+4]
add	edx, edi
jmp	short loc_77EA28

loc_77EA26:
mov	edx, ecx

loc_77EA28:
test	edx, edx
jg	short loc_77EA10
pop	edi
pop	esi

locret_77EA2E:
retn
sub_77E9F0 endp

align 10h



; int __thiscall sub_77EA30(void *, char)
sub_77EA30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+10Ch]
lea	ecx, [esi+0Ch]
mov	dword ptr [esi], offset	off_14461A0
cmp	eax, ecx
jz	short loc_77EA4F
push	eax		; void *
call	_free
add	esp, 4

loc_77EA4F:
mov	ecx, esi
call	sub_7966CA
test	[esp+4+arg_0], 1
jz	short loc_77EA66
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77EA66:
mov	eax, esi
pop	esi
retn	4
sub_77EA30 endp

align 10h



sub_77EA70 proc	near
mov	edx, [ecx]
test	edx, edx
jz	short locret_77EA9D
mov	eax, [ecx+8]
sub	eax, edx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_77EA93
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_77EA93:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

locret_77EA9D:
retn
sub_77EA70 endp

align 10h



sub_77EAA0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= byte ptr	 4

push	ecx
push	esi
lea	eax, [esp+8+var_2]
push	0
push	eax
call	sub_77E950
lea	ecx, [esp+10h+var_1]
push	0
push	ecx
mov	esi, eax
call	sub_77E950
movzx	edx, byte ptr [esi]
movzx	eax, byte ptr [eax]
push	0
push	edx
push	eax
lea	ecx, [esp+24h+arg_0]
push	ecx
push	offset off_1446220
push	offset unk_14461A8
call	sub_77E9F0
add	esp, 28h
pop	esi
cmp	eax, offset off_1446220
jnz	short loc_77EAEC
mov	eax, 0FFFFFFFBh
pop	ecx
retn

loc_77EAEC:
mov	eax, [eax]
pop	ecx
retn
sub_77EAA0 endp




sub_77EAF0 proc	near

var_2= byte ptr	-2
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
lea	eax, [esp+0Ch+arg_4]
push	0
push	eax
mov	dword ptr [edi], offset	unk_14461A8
call	sub_77E950
lea	ecx, [esp+13h]
push	0
push	ecx
mov	esi, eax
call	sub_77E950
movzx	edx, byte ptr [esi]
movzx	eax, byte ptr [eax]
push	0
push	edx
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
push	offset off_1446220
push	offset unk_14461A8
call	sub_77E9F0
mov	ecx, [esp+34h+arg_8]
add	esp, 28h
mov	[ecx], eax
cmp	eax, offset off_1446220
jz	short loc_77EB51
mov	edx, [eax]
cmp	edx, [esp+0Ch+arg_0]
jnz	short loc_77EB56
cmp	eax, [edi]
jz	short loc_77EB56

loc_77EB51:
add	eax, 0FFFFFFFCh
mov	[ecx], eax

loc_77EB56:
pop	edi
pop	esi
pop	ecx
retn
sub_77EAF0 endp

align 10h



sub_77EB60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [eax]
push	esi
push	eax
push	edx
add	ecx, 8
call	sub_77E260
mov	ecx, [esp+4+arg_4]
mov	esi, eax
mov	eax, [esp+4+arg_8]
cmp	eax, ecx
jz	short loc_77EB8C
sub	eax, ecx
push	eax
push	ecx
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_77EB8C:
mov	eax, esi
pop	esi
retn	0Ch
sub_77EB60 endp

align 10h



sub_77EBA0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_77E190
mov	dword ptr [esi], offset	off_1446230
mov	eax, esi
pop	esi
retn	4
sub_77EBA0 endp

align 10h


; Attributes: noreturn

sub_77EBC0 proc	near

var_135= byte ptr -135h
var_134= byte ptr -134h
var_11C= dword ptr -11Ch
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12C970B
mov	eax, large fs:0
push	eax
sub	esp, 12Ch
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+13Ch+var_C]
mov	large fs:0, eax
mov	ecx, [esp+13Ch+arg_0]
lea	eax, [esp+13Ch+var_135]
push	eax
push	ecx
lea	ecx, [esp+144h+var_134]
call	sub_407D30
lea	edx, [esp+13Ch+var_134]
push	edx
lea	ecx, [esp+140h+var_11C]
mov	[esp+140h+var_4], 0
call	sub_77E960
push	offset unk_16241BC
lea	eax, [esp+140h+var_11C]
push	eax
mov	[esp+144h+var_11C], offset off_1446248
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_77EBC0 endp

align 10h



sub_77EC30 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_77E190
mov	dword ptr [esi], offset	off_1446224
mov	eax, esi
pop	esi
retn	4
sub_77EC30 endp

align 10h



sub_77EC50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_77E190
mov	dword ptr [esi], offset	off_1446248
mov	eax, esi
pop	esi
retn	4
sub_77EC50 endp

align 10h


; Attributes: noreturn

sub_77EC70 proc	near

var_135= byte ptr -135h
var_134= byte ptr -134h
var_11C= dword ptr -11Ch
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12C970B
mov	eax, large fs:0
push	eax
sub	esp, 12Ch
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+13Ch+var_C]
mov	large fs:0, eax
mov	ecx, [esp+13Ch+arg_0]
lea	eax, [esp+13Ch+var_135]
push	eax
push	ecx
lea	ecx, [esp+144h+var_134]
call	sub_407D30
lea	edx, [esp+13Ch+var_134]
push	edx
lea	ecx, [esp+140h+var_11C]
mov	[esp+140h+var_4], 0
call	sub_77E960
push	offset unk_1624218
lea	eax, [esp+140h+var_11C]
push	eax
mov	[esp+144h+var_11C], offset off_144623C
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_77EC70 endp

align 10h



sub_77ECE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_77E190
mov	dword ptr [esi], offset	off_144623C
mov	eax, esi
pop	esi
retn	4
sub_77ECE0 endp

align 10h


; Attributes: noreturn

sub_77ED00 proc	near

var_135= byte ptr -135h
var_134= byte ptr -134h
var_11C= dword ptr -11Ch
var_C= byte ptr	-0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12C970B
mov	eax, large fs:0
push	eax
sub	esp, 12Ch
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+13Ch+var_C]
mov	large fs:0, eax
mov	ecx, [esp+13Ch+arg_0]
lea	eax, [esp+13Ch+var_135]
push	eax
push	ecx
lea	ecx, [esp+144h+var_134]
call	sub_407D30
lea	edx, [esp+13Ch+var_134]
push	edx
lea	ecx, [esp+140h+var_11C]
mov	[esp+140h+var_4], 0
call	sub_77E960
push	offset unk_1624258
lea	eax, [esp+140h+var_11C]
push	eax
mov	[esp+144h+var_11C], offset off_1446254
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_77ED00 endp

align 10h



sub_77ED70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_77E190
mov	dword ptr [esi], offset	off_1446254
mov	eax, esi
pop	esi
retn	4
sub_77ED70 endp

align 10h



sub_77ED90 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	ecx, [esi+8]
lea	ebp, [esi+8]
sub	ecx, eax
sar	ecx, 2
cmp	ecx, edx
jnb	short loc_77EE07
cmp	edx, 3FFFFFFFh
jbe	short loc_77EDBB
push	offset aVector	; "vector"
call	sub_77EC70

loc_77EDBB:
mov	ecx, [esi+4]
push	ebx
mov	ebx, ecx
sub	ebx, eax
sar	ebx, 2
push	edi
test	eax, eax
jz	short loc_77EDE4
push	ecx
push	eax
lea	edx, [esp+18h+arg_0]
push	edx
mov	ecx, esi
call	sub_77EB60
mov	ecx, esi
mov	edi, eax
call	sub_77EA70
jmp	short loc_77EDF3

loc_77EDE4:
lea	eax, [esp+10h+arg_0]
push	eax
push	edx
mov	ecx, ebp
call	sub_77E260
mov	edi, eax

loc_77EDF3:
mov	edx, [esp+10h+arg_0]
lea	ecx, [edi+ebx*4]
lea	eax, [edi+edx*4]
mov	[esi], edi
pop	edi
mov	[esi+4], ecx
mov	[ebp+0], eax
pop	ebx

loc_77EE07:
pop	esi
pop	ebp
retn	4
sub_77ED90 endp

align 10h



sub_77EE10 proc	near
mov	dword ptr [ecx], offset	off_1446260
jmp	sub_77E220
sub_77EE10 endp

align 10h



sub_77EE20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+3Ch]
test	esi, esi
jbe	short loc_77EE4C
push	ebx
mov	ebx, [esp+0Ch+arg_0]

loc_77EE30:
mov	eax, [edi+34h]
mov	ecx, [eax+esi*8-4]
mov	edx, [eax+esi*8-8]
lea	eax, [eax+esi*8]
push	ecx
push	edi
push	ebx
call	edx
add	esp, 0Ch
sub	esi, 1
jnz	short loc_77EE30
pop	ebx

loc_77EE4C:
pop	edi
pop	esi
retn	4
sub_77EE20 endp

align 10h



sub_77EE60 proc	near
push	esi
mov	esi, ecx
push	edi
xor	edi, edi
lea	ecx, [esi+30h]
mov	dword ptr [esi], offset	off_144626C
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	[esi+20h], edi
mov	[esi+24h], edi
mov	[esi+28h], edi
mov	[esi+2Ch], edi
call	sub_77FEE0
mov	[esi+34h], edi
mov	[esi+38h], edi
mov	[esi+3Ch], edi
mov	[esi+40h], edi
mov	[esi+44h], edi
mov	[esi+48h], edi
mov	[esi+4Ch], edi
pop	edi
mov	eax, esi
pop	esi
retn
sub_77EE60 endp

align 10h



sub_77EEB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C973B
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	dword ptr [esi], offset	off_144626C
push	0
mov	[esp+1Ch+var_4], 0
call	sub_77EE20
mov	eax, [esi+34h]
push	eax		; void *
call	_free
mov	ecx, [esi+40h]
push	ecx		; void *
call	_free
mov	edx, [esi+48h]
push	edx		; void *
call	_free
add	esp, 0Ch
lea	ecx, [esi+30h]
call	sub_77FF40
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_77EEB0 endp

align 10h



; int __thiscall sub_77EF30(void *, char)
sub_77EF30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1446260
call	sub_77E220
test	[esp+4+arg_0], 1
jz	short loc_77EF4E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77EF4E:
mov	eax, esi
pop	esi
retn	4
sub_77EF30 endp

align 10h



sub_77EF60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12C9768
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	ebx, [esp+20h+arg_4]
lea	esi, [edi+30h]
push	esi
mov	ecx, ebx
mov	[esp+24h+var_10], 0
call	sub_7801E0
test	al, al
jz	short loc_77EFDF
push	esi
lea	ecx, [esp+24h+arg_4]
call	sub_77FF00
push	ebx
mov	ecx, esi
mov	[esp+24h+var_4], 0
call	sub_77FF50
push	1
mov	ecx, edi
call	sub_77EE20
mov	esi, [esp+20h+arg_0]
lea	eax, [esp+20h+arg_4]
push	eax
mov	ecx, esi
call	sub_77FF00
lea	ecx, [esp+20h+arg_4]
call	sub_77FF40
jmp	short loc_77EFF4

loc_77EFDF:
push	1
mov	ecx, edi
call	sub_77EE20
push	esi
mov	esi, [esp+24h+arg_0]
mov	ecx, esi
call	sub_77FF00

loc_77EFF4:
mov	eax, esi
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn	8
sub_77EF60 endp

align 10h



; int __thiscall sub_77F010(void *, char)
sub_77F010 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_77EEB0
test	[esp+4+arg_0], 1
jz	short loc_77F028
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77F028:
mov	eax, esi
pop	esi
retn	4
sub_77F010 endp

align 10h


; Attributes: noreturn

sub_77F030 proc	near

var_135= byte ptr -135h
var_134= byte ptr -134h
var_11C= dword ptr -11Ch
var_C= byte ptr	-0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C970B
mov	eax, large fs:0
push	eax
sub	esp, 12Ch
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+13Ch+var_C]
mov	large fs:0, eax
lea	eax, [esp+13Ch+var_135]
push	eax
push	offset aIosFailure ; "ios failure"
lea	ecx, [esp+144h+var_134]
call	sub_407D30
lea	ecx, [esp+13Ch+var_134]
push	ecx
lea	ecx, [esp+140h+var_11C]
mov	[esp+140h+var_4], 0
call	sub_77E960
push	offset unk_162431C
lea	edx, [esp+140h+var_11C]
push	edx
mov	[esp+144h+var_11C], offset off_1446260
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_77F030 endp

align 10h



sub_77F0A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_77E190
mov	dword ptr [esi], offset	off_1446260
mov	eax, esi
pop	esi
retn	4
sub_77F0A0 endp

align 10h



; int __fastcall sub_77F0C0(HANDLE hFile)
sub_77F0C0 proc	near

var_34=	_BY_HANDLE_FILE_INFORMATION ptr	-34h

sub	esp, 34h
lea	eax, [esp+34h+var_34]
push	eax		; lpFileInformation
push	ecx		; hFile
call	ds:GetFileInformationByHandle
test	eax, eax
jz	short loc_77F0E1
test	byte ptr [esp+34h+var_34.dwFileAttributes], 10h
jnz	short loc_77F0E1
mov	eax, 1
add	esp, 34h
retn

loc_77F0E1:
xor	eax, eax
add	esp, 34h
retn
sub_77F0C0 endp

align 10h



sub_77F0F0 proc	near

NumberOfBytesRead= dword ptr -8
Buffer=	byte ptr -4

sub	esp, 8
xor	cl, cl
test	eax, eax
jl	short loc_77F10F
mov	ecx, eax
sar	ecx, 5
and	eax, 1Fh
lea	edx, [eax+eax*8]
mov	eax, dword_19736C0[ecx*4]
mov	cl, [eax+edx*4+4]

loc_77F10F:
push	ebx
xor	ebx, ebx
test	cl, 20h
jz	short loc_77F11C
mov	ebx, 8

loc_77F11C:
test	cl, cl
jns	short loc_77F128
or	ebx, 4000h
jmp	short loc_77F12E

loc_77F128:
or	ebx, 8000h

loc_77F12E:
push	esi
push	0		; lpOverlapped
lea	ecx, [esp+14h+NumberOfBytesRead]
push	ecx		; lpNumberOfBytesWritten
push	0		; nNumberOfBytesToWrite
lea	edx, [esp+1Ch+Buffer]
push	edx		; lpBuffer
push	edi		; hFile
call	ds:WriteFile
push	0		; lpOverlapped
mov	esi, eax
lea	eax, [esp+14h+NumberOfBytesRead]
push	eax		; lpNumberOfBytesRead
push	0		; nNumberOfBytesToRead
lea	ecx, [esp+1Ch+Buffer]
push	ecx		; lpBuffer
push	edi		; hFile
call	ds:ReadFile
test	esi, esi
pop	esi
jz	short loc_77F169
test	eax, eax
jz	short loc_77F16D
or	ebx, 2
jmp	short loc_77F170

loc_77F169:
test	eax, eax
jnz	short loc_77F170

loc_77F16D:
or	ebx, 1

loc_77F170:
mov	ecx, ebx
xor	eax, eax
and	ecx, 3
sub	ecx, eax
jz	short loc_77F191
sub	ecx, 1
jz	short loc_77F18A
sub	ecx, 1
jnz	short loc_77F196
lea	eax, [ecx+18h]
jmp	short loc_77F196

loc_77F18A:
mov	eax, 10h
jmp	short loc_77F196

loc_77F191:
mov	eax, 8

loc_77F196:
test	bl, 8
jz	short loc_77F19E
or	eax, 1

loc_77F19E:
test	ebx, 8000h
pop	ebx
jz	short loc_77F1AA
or	eax, 4

loc_77F1AA:
add	esp, 8
retn
sub_77F0F0 endp

align 10h



sub_77F1B0 proc	near
mov	eax, ecx
xor	ecx, ecx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], ecx
mov	[eax+8], cl
mov	[eax+9], cl
mov	[eax+0Ch], ecx
retn
sub_77F1B0 endp

align 10h



sub_77F1D0 proc	near

var_24=	byte ptr -24h
var_20=	dword ptr -20h

sub	esp, 24h
lea	eax, [esp+24h+var_24]
push	eax		; lpSystemInfo
call	ds:GetSystemInfo
mov	ecx, [esp+24h+var_20]
mov	dword_167EB00, ecx
add	esp, 24h
retn
sub_77F1D0 endp

align 10h



sub_77F1F0 proc	near

var_8= dword ptr -8
FileSizeHigh= dword ptr	-4

sub	esp, 8
mov	ecx, [ecx]
push	esi
push	edi
lea	eax, [esp+10h+FileSizeHigh]
push	eax		; lpFileSizeHigh
push	ecx		; hFile
xor	esi, esi
xor	edi, edi
call	ds:GetFileSize
mov	[esp+10h+var_8], eax
cmp	eax, 0FFFFFFFFh
jnz	short loc_77F21E
call	ds:GetLastError
test	eax, eax
jnz	short loc_77F228
mov	eax, [esp+10h+var_8]

loc_77F21E:
mov	edx, [esp+10h+FileSizeHigh]
pop	edi
pop	esi
add	esp, 8
retn

loc_77F228:
mov	edx, edi
pop	edi
mov	eax, esi
pop	esi
add	esp, 8
retn
sub_77F1F0 endp

align 10h



; int __stdcall	sub_77F240(LPCSTR lpFileName, int, DWORD dwFlagsAndAttributes)
sub_77F240 proc	near

lpFileName= dword ptr  4
arg_4= dword ptr  8
dwFlagsAndAttributes= dword ptr	 0Ch

push	edi
mov	edi, ecx
cmp	byte ptr [edi+8], 0
jz	short loc_77F24F
xor	al, al
pop	edi
retn	0Ch

loc_77F24F:
mov	eax, [esp+4+arg_4]
and	eax, 0FFFFFFF9h
push	ebx
add	eax, 0FFFFFFF8h
xor	bl, bl
cmp	eax, 30h	; switch 49 cases
ja	loc_77F339	; default
			; jumptable 0077F26C cases 1-7,10-15,17-39,41-47
movzx	eax, ds:byte_77F358[eax]
jmp	ds:off_77F340[eax*4] ; switch jump

loc_77F273:		; jumptable 0077F26C cases 8,40
mov	eax, 40000000h
jmp	short loc_77F2A6

loc_77F27A:		; jumptable 0077F26C case 9
mov	eax, 40000000h
jmp	short loc_77F2A8

loc_77F281:		; jumptable 0077F26C case 0
mov	eax, 80000000h
mov	ecx, 3
mov	[esp+8+dwFlagsAndAttributes], 0
jmp	short loc_77F2AD

loc_77F295:		; jumptable 0077F26C case 16
mov	eax, 0C0000000h
mov	ecx, 3
jmp	short loc_77F2AD

loc_77F2A1:		; jumptable 0077F26C case 48
mov	eax, 0C0000000h

loc_77F2A6:
mov	bl, 1

loc_77F2A8:
mov	ecx, 4

loc_77F2AD:
mov	edx, [esp+8+dwFlagsAndAttributes]
push	esi
push	0		; hTemplateFile
push	edx		; dwFlagsAndAttributes
push	ecx		; dwCreationDisposition
push	0		; lpSecurityAttributes
push	3		; dwShareMode
push	eax		; dwDesiredAccess
mov	eax, [esp+24h+lpFileName]
push	eax		; lpFileName
call	ds:CreateFileA
mov	esi, eax
cmp	esi, 0FFFFFFFFh
jz	short loc_77F308
push	esi		; hFile
call	ds:GetFileType
cmp	eax, 1
jnz	short loc_77F310
test	bl, bl
jz	short loc_77F2E8
push	esi		; hFile
call	ds:SetEndOfFile
test	eax, eax
jz	short loc_77F301

loc_77F2E8:
test	byte ptr [esp+0Ch+arg_4], 2
jz	short loc_77F310
push	2		; dwMoveMethod
push	0		; lpDistanceToMoveHigh
push	0		; lDistanceToMove
push	esi		; hFile
call	ds:SetFilePointer
cmp	eax, 0FFFFFFFFh
jnz	short loc_77F310

loc_77F301:		; hObject
push	esi
call	ds:CloseHandle

loc_77F308:
pop	esi
pop	ebx
xor	al, al
pop	edi
retn	0Ch

loc_77F310:
mov	ecx, [esp+0Ch+arg_4]
mov	[edi+4], ecx
mov	ecx, esi	; hFile
mov	byte ptr [edi+8], 1
mov	[edi], esi
mov	byte ptr [edi+9], 1
call	sub_77F0C0
mov	[edi+0Ah], al
xor	eax, eax
cmp	[edi+8], al
pop	esi
pop	ebx
setnz	al
pop	edi
retn	0Ch

loc_77F339:		; default
pop	ebx		; jumptable 0077F26C cases 1-7,10-15,17-39,41-47
xor	al, al
pop	edi
retn	0Ch
sub_77F240 endp

off_77F340 dd offset loc_77F281	; jump table for switch	statement
dd offset loc_77F273
dd offset loc_77F27A
dd offset loc_77F295
dd offset loc_77F2A1
dd offset loc_77F339
byte_77F358 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	1,     2,     5,     5
db	5,     5,     5,     5
db	3,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	1,     5,     5,     5
db	5,     5,     5,     5
db	4
align 10h



; int __stdcall	sub_77F390(LPCWSTR lpFileName, int, DWORD dwFlagsAndAttributes)
sub_77F390 proc	near

lpFileName= dword ptr  4
arg_4= dword ptr  8
dwFlagsAndAttributes= dword ptr	 0Ch

push	edi
mov	edi, ecx
cmp	byte ptr [edi+8], 0
jz	short loc_77F39F
xor	al, al
pop	edi
retn	0Ch

loc_77F39F:
mov	eax, [esp+4+arg_4]
and	eax, 0FFFFFFF9h
push	ebx
add	eax, 0FFFFFFF8h
xor	bl, bl
cmp	eax, 30h	; switch 49 cases
ja	loc_77F489	; default
			; jumptable 0077F3BC cases 1-7,10-15,17-39,41-47
movzx	eax, ds:byte_77F4A8[eax]
jmp	ds:off_77F490[eax*4] ; switch jump

loc_77F3C3:		; jumptable 0077F3BC cases 8,40
mov	eax, 40000000h
jmp	short loc_77F3F6

loc_77F3CA:		; jumptable 0077F3BC case 9
mov	eax, 40000000h
jmp	short loc_77F3F8

loc_77F3D1:		; jumptable 0077F3BC case 0
mov	eax, 80000000h
mov	ecx, 3
mov	[esp+8+dwFlagsAndAttributes], 0
jmp	short loc_77F3FD

loc_77F3E5:		; jumptable 0077F3BC case 16
mov	eax, 0C0000000h
mov	ecx, 3
jmp	short loc_77F3FD

loc_77F3F1:		; jumptable 0077F3BC case 48
mov	eax, 0C0000000h

loc_77F3F6:
mov	bl, 1

loc_77F3F8:
mov	ecx, 4

loc_77F3FD:
mov	edx, [esp+8+dwFlagsAndAttributes]
push	esi
push	0		; hTemplateFile
push	edx		; dwFlagsAndAttributes
push	ecx		; dwCreationDisposition
push	0		; lpSecurityAttributes
push	3		; dwShareMode
push	eax		; dwDesiredAccess
mov	eax, [esp+24h+lpFileName]
push	eax		; lpFileName
call	ds:CreateFileW
mov	esi, eax
cmp	esi, 0FFFFFFFFh
jz	short loc_77F458
push	esi		; hFile
call	ds:GetFileType
cmp	eax, 1
jnz	short loc_77F460
test	bl, bl
jz	short loc_77F438
push	esi		; hFile
call	ds:SetEndOfFile
test	eax, eax
jz	short loc_77F451

loc_77F438:
test	byte ptr [esp+0Ch+arg_4], 2
jz	short loc_77F460
push	2		; dwMoveMethod
push	0		; lpDistanceToMoveHigh
push	0		; lDistanceToMove
push	esi		; hFile
call	ds:SetFilePointer
cmp	eax, 0FFFFFFFFh
jnz	short loc_77F460

loc_77F451:		; hObject
push	esi
call	ds:CloseHandle

loc_77F458:
pop	esi
pop	ebx
xor	al, al
pop	edi
retn	0Ch

loc_77F460:
mov	ecx, [esp+0Ch+arg_4]
mov	[edi+4], ecx
mov	ecx, esi	; hFile
mov	byte ptr [edi+8], 1
mov	[edi], esi
mov	byte ptr [edi+9], 1
call	sub_77F0C0
mov	[edi+0Ah], al
xor	eax, eax
cmp	[edi+8], al
pop	esi
pop	ebx
setnz	al
pop	edi
retn	0Ch

loc_77F489:		; default
pop	ebx		; jumptable 0077F3BC cases 1-7,10-15,17-39,41-47
xor	al, al
pop	edi
retn	0Ch
sub_77F390 endp

off_77F490 dd offset loc_77F3D1	; jump table for switch	statement
dd offset loc_77F3C3
dd offset loc_77F3CA
dd offset loc_77F3E5
dd offset loc_77F3F1
dd offset loc_77F489
byte_77F4A8 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	1,     2,     5,     5
db	5,     5,     5,     5
db	3,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	1,     5,     5,     5
db	5,     5,     5,     5
db	4
align 10h



; int __stdcall	sub_77F4E0(LPCSTR lpFileName, int)
sub_77F4E0 proc	near

lpFileName= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+lpFileName]
push	80h		; dwFlagsAndAttributes
push	eax		; int
push	edx		; lpFileName
call	sub_77F240
retn	8
sub_77F4E0 endp

align 10h



; int __stdcall	sub_77F500(LPCWSTR lpFileName, int)
sub_77F500 proc	near

lpFileName= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+lpFileName]
push	80h		; dwFlagsAndAttributes
push	eax		; int
push	edx		; lpFileName
call	sub_77F390
retn	8
sub_77F500 endp

align 10h



sub_77F520 proc	near

FileInformation= _BY_HANDLE_FILE_INFORMATION ptr -34h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 34h
push	ebx
push	esi
mov	esi, ecx
cmp	byte ptr [esi+8], 0
jnz	short loc_77F5A5
mov	ebx, [esp+3Ch+arg_0]
test	ebx, ebx
jl	short loc_77F5A5
push	edi
push	ebx		; int
call	__get_osfhandle
mov	edi, eax
add	esp, 4
cmp	edi, 0FFFFFFFFh
jnz	short loc_77F551
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 34h
retn	8

loc_77F551:
mov	eax, [esp+40h+arg_4]
test	eax, eax
jnz	short loc_77F560
mov	eax, ebx
call	sub_77F0F0

loc_77F560:
mov	[esi+4], eax
lea	eax, [esp+40h+FileInformation]
push	eax		; lpFileInformation
push	edi		; hFile
mov	[esi], edi
mov	byte ptr [esi+8], 1
mov	byte ptr [esi+9], 0
call	ds:GetFileInformationByHandle
test	eax, eax
jz	short loc_77F595
test	byte ptr [esp+40h+FileInformation.dwFileAttributes], 10h
jnz	short loc_77F595
mov	eax, 1
pop	edi
mov	[esi+0Ah], al
pop	esi
pop	ebx
add	esp, 34h
retn	8

loc_77F595:
xor	eax, eax
pop	edi
mov	[esi+0Ah], al
pop	esi
mov	al, 1
pop	ebx
add	esp, 34h
retn	8

loc_77F5A5:
pop	esi
xor	al, al
pop	ebx
add	esp, 34h
retn	8
sub_77F520 endp

align 10h



sub_77F5B0 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+8], 0
jnz	short loc_77F5BD
xor	al, al
pop	esi
retn

loc_77F5BD:
cmp	byte ptr [esi+9], 0
jnz	short loc_77F5D6
mov	byte ptr [esi+9], 0
mov	byte ptr [esi+8], 0
mov	dword ptr [esi+4], 0
mov	al, 1
pop	esi
retn

loc_77F5D6:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_77F5FA
push	eax		; hObject
call	ds:CloseHandle
test	eax, eax
mov	byte ptr [esi+9], 0
mov	byte ptr [esi+8], 0
mov	dword ptr [esi+4], 0
setnz	al
pop	esi
retn

loc_77F5FA:
xor	al, al
mov	[esi+9], al
mov	[esi+8], al
mov	dword ptr [esi+4], 0
pop	esi
retn
sub_77F5B0 endp

align 10h



; int __stdcall	sub_77F610(LONG	lDistanceToMove, LONG DistanceToMoveHigh, int)
sub_77F610 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
lDistanceToMove= dword ptr  4
DistanceToMoveHigh= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+10h+DistanceToMoveHigh]
or	edx, 0FFFFFFFFh
sub	eax, 1
push	esi
push	edi
mov	edi, [esp+18h+lDistanceToMove]
mov	ebx, ecx
mov	[esp+18h+var_8], edx
mov	[esp+18h+var_4], edx
jz	short loc_77F676
sub	eax, 1
jz	short loc_77F66F
sub	eax, 2
jnz	short loc_77F680
call	sub_77F1F0
mov	esi, edi
neg	esi
mov	ecx, ebp
adc	ecx, 0
neg	ecx
cmp	ecx, edx
jl	short loc_77F668
jg	short loc_77F659
cmp	esi, eax
jbe	short loc_77F668

loc_77F659:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
or	edx, eax
pop	ebx
add	esp, 8
retn	0Ch

loc_77F668:
mov	eax, 2
jmp	short loc_77F68E

loc_77F66F:
mov	eax, 1
jmp	short loc_77F68E

loc_77F676:
test	ebp, ebp
jg	short loc_77F68C
jl	short loc_77F680
test	edi, edi
jnb	short loc_77F68C

loc_77F680:
pop	edi
pop	esi
pop	ebp
mov	eax, edx
pop	ebx
add	esp, 8
retn	0Ch

loc_77F68C:
xor	eax, eax

loc_77F68E:
mov	ecx, [ebx]
push	eax		; dwMoveMethod
lea	eax, [esp+1Ch+DistanceToMoveHigh]
push	eax		; lpDistanceToMoveHigh
push	edi		; lDistanceToMove
push	ecx		; hFile
mov	[esp+28h+lDistanceToMove], edi
mov	[esp+28h+DistanceToMoveHigh], ebp
call	ds:SetFilePointer
mov	[esp+18h+lDistanceToMove], eax
cmp	eax, 0FFFFFFFFh
jnz	short loc_77F6BD
call	ds:GetLastError
test	eax, eax
jnz	short loc_77F6C9
mov	eax, [esp+18h+lDistanceToMove]

loc_77F6BD:
mov	edx, [esp+18h+DistanceToMoveHigh]
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], edx

loc_77F6C9:
mov	eax, [esp+18h+var_8]
mov	edx, [esp+18h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	0Ch
sub_77F610 endp

align 10h



; int __stdcall	sub_77F6E0(LPCVOID lpBaseAddress, int, int)
sub_77F6E0 proc	near

lpBaseAddress= dword ptr  4

mov	eax, [esp+lpBaseAddress]
push	esi
mov	esi, ecx
test	eax, eax
jz	short loc_77F6F2
push	eax		; lpBaseAddress
call	ds:UnmapViewOfFile

loc_77F6F2:
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_77F700
push	eax		; hObject
call	ds:CloseHandle

loc_77F700:
mov	dword ptr [esi+0Ch], 0
pop	esi
retn	0Ch
sub_77F6E0 endp

align 10h



sub_77F710 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_77F73E
push	eax		; lpBaseAddress
call	ds:UnmapViewOfFile
mov	eax, [esi+2Ch]
cmp	eax, ebx
jz	short loc_77F732
push	eax		; hObject
call	ds:CloseHandle

loc_77F732:
mov	[esi+2Ch], ebx
mov	[esi+58h], ebx
mov	[esi+60h], ebx
mov	[esi+64h], ebx

loc_77F73E:
mov	[esi+33h], bl
mov	[esi+34h], bl
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	byte ptr [esi+35h], 1
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn
sub_77F710 endp

align 10h



sub_77F760 proc	near

Buffer=	byte ptr -0Dh
var_C= dword ptr -0Ch
NumberOfBytesRead= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, [esp+18h+arg_4]
push	esi
xor	esi, esi
mov	[esp+1Ch+var_C], ecx
mov	[esp+1Ch+NumberOfBytesRead], 0FFFFFFFFh
lea	eax, [esp+1Ch+var_C]
cmp	ecx, 0FFFFFFFFh
jb	short loc_77F787
lea	eax, [esp+1Ch+NumberOfBytesRead]

loc_77F787:
mov	ebx, [eax]
mov	[esp+1Ch+var_4], ebx
cmp	ecx, ebx
jb	loc_77F88B
push	edi

loc_77F796:
mov	eax, [esp+20h+arg_0]
mov	edx, [ebp+0]
push	0		; lpOverlapped
lea	ecx, [esp+24h+NumberOfBytesRead]
push	ecx		; lpNumberOfBytesRead
push	ebx		; nNumberOfBytesToRead
lea	edi, [esi+eax]
push	edi		; lpBuffer
push	edx		; hFile
call	ds:ReadFile
mov	eax, [esp+20h+NumberOfBytesRead]
test	eax, eax
jz	loc_77F88A
test	byte ptr [ebp+4], 4
jnz	loc_77F85C
mov	esi, edi
lea	ebx, [esi+eax-1]
cmp	esi, ebx
ja	short loc_77F7F1

loc_77F7D0:
mov	al, [edi]
cmp	al, 1Ah
jz	short loc_77F7F1
cmp	al, 0Dh
jz	short loc_77F7DE
mov	[esi], al
jmp	short loc_77F7EB

loc_77F7DE:
cmp	edi, ebx
jnb	short loc_77F7FF
cmp	byte ptr [edi+1], 0Ah
jz	short loc_77F7EC

loc_77F7E8:
mov	byte ptr [esi],	0Dh

loc_77F7EB:
inc	esi

loc_77F7EC:
inc	edi
cmp	edi, ebx
jbe	short loc_77F7D0

loc_77F7F1:
sub	esi, [esp+20h+arg_0]
cmp	edi, ebx
jbe	short loc_77F878
mov	ebx, [esp+20h+var_4]
jmp	short loc_77F85E

loc_77F7FF:
mov	edx, [ebp+0]
push	0		; lpOverlapped
lea	eax, [esp+24h+var_C]
push	eax		; lpNumberOfBytesRead
push	1		; nNumberOfBytesToRead
lea	ecx, [esp+2Ch+Buffer]
push	ecx		; lpBuffer
push	edx		; hFile
mov	[esp+34h+Buffer], 20h
call	ds:ReadFile
cmp	[esp+20h+var_C], 0
jz	short loc_77F7E8
mov	al, [esp+20h+Buffer]
cmp	al, 0Ah
jz	short loc_77F857
mov	ecx, [esp+20h+arg_0]
mov	edx, [esp+20h+arg_4]
mov	byte ptr [esi],	0Dh
inc	esi
add	ecx, edx
cmp	esi, ecx
jnb	short loc_77F845
cmp	al, 0Dh
jz	short loc_77F845
mov	[esi], al
jmp	short loc_77F7EB

loc_77F845:
mov	eax, [ebp+0]
push	1		; dwMoveMethod
push	0		; lpDistanceToMoveHigh
push	0FFFFFFFFh	; lDistanceToMove
push	eax		; hFile
call	ds:SetFilePointer
jmp	short loc_77F7EC

loc_77F857:
mov	byte ptr [esi],	0Ah
jmp	short loc_77F7EB

loc_77F85C:
add	esi, eax

loc_77F85E:
mov	ecx, [esp+20h+arg_4]
sub	ecx, esi
cmp	ecx, ebx
jnb	loc_77F796
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8

loc_77F878:
mov	edx, [ebp+0]
push	1		; dwMoveMethod
sub	edi, ebx
push	0		; lpDistanceToMoveHigh
dec	edi
push	edi		; lDistanceToMove
push	edx		; hFile
call	ds:SetFilePointer

loc_77F88A:
pop	edi

loc_77F88B:
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	8
sub_77F760 endp

align 10h



; int __stdcall	sub_77F8A0(void	*, int)
sub_77F8A0 proc	near

var_1038= dword	ptr -1038h
var_1034= dword	ptr -1034h
var_1030= dword	ptr -1030h
var_102C= dword	ptr -102Ch
var_1028= dword	ptr -1028h
var_1024= dword	ptr -1024h
var_1020= dword	ptr -1020h
FileSizeHigh= dword ptr	-101Ch
NumberOfBytesWritten= dword ptr	-1018h
var_1014= dword	ptr -1014h
DistanceToMoveHigh= dword ptr -1010h
var_100C= dword	ptr -100Ch
Buffer=	byte ptr -1008h
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, 1038h
call	__alloca_probe
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+1038h+var_4], eax
mov	eax, [esp+1038h+arg_4]
push	ebx
mov	ebx, [esp+103Ch+arg_0]
push	ebp
push	esi
mov	ebp, ecx
push	edi
mov	[esp+1048h+var_1028], ebp

loc_77F8D0:
test	byte ptr [ebp+4], 1
mov	[esp+1048h+var_1034], eax
mov	[esp+1048h+var_1030], ebx
jz	short loc_77F93C
mov	eax, [ebp+0]
lea	ecx, [esp+1048h+FileSizeHigh]
push	ecx		; lpFileSizeHigh
push	eax		; hFile
call	ds:GetFileSize
mov	[esp+1048h+var_1020], eax
cmp	eax, 0FFFFFFFFh
jnz	short loc_77F904
call	ds:GetLastError
test	eax, eax
jnz	short loc_77F911
mov	eax, [esp+1048h+var_1020]

loc_77F904:
cmp	[esp+1048h+FileSizeHigh], 0
jl	short loc_77F93C
jg	short loc_77F911
test	eax, eax
jb	short loc_77F93C

loc_77F911:		; dwMoveMethod
push	2
xor	eax, eax
lea	edx, [esp+104Ch+DistanceToMoveHigh]
push	edx		; lpDistanceToMoveHigh
push	eax		; lDistanceToMove
mov	[esp+1054h+var_1014], eax
mov	[esp+1054h+DistanceToMoveHigh],	eax
mov	eax, [ebp+0]
push	eax		; hFile
call	ds:SetFilePointer
mov	[esp+1048h+var_1014], eax
cmp	eax, 0FFFFFFFFh
jnz	short loc_77F93C
call	ds:GetLastError

loc_77F93C:
test	byte ptr [ebp+4], 4
jz	short loc_77F9A2
mov	esi, [esp+1048h+var_1034]
xor	edi, edi
mov	[esp+1048h+var_1030], esi
test	esi, esi
jz	loc_77FABC
mov	[esp+1048h+var_1038], 0FFFFFFFFh
lea	esp, [esp+0]

loc_77F960:
lea	eax, [esp+1048h+var_1030]
cmp	esi, 0FFFFFFFFh
jb	short loc_77F96D
lea	eax, [esp+1048h+var_1038]

loc_77F96D:
mov	edx, [eax]
push	0		; lpOverlapped
lea	ecx, [esp+104Ch+NumberOfBytesWritten]
push	ecx		; lpNumberOfBytesWritten
mov	ecx, [ebp+0]
push	edx		; nNumberOfBytesToWrite
lea	eax, [ebx+edi]
push	eax		; lpBuffer
push	ecx		; hFile
call	ds:WriteFile
mov	eax, [esp+1048h+NumberOfBytesWritten]
test	eax, eax
jz	loc_77FAC0
sub	esi, eax
add	edi, eax
mov	[esp+1048h+var_1030], esi
test	esi, esi
jnz	short loc_77F960
jmp	loc_77FAA3

loc_77F9A2:
mov	eax, [esp+1048h+var_1034]
mov	edi, ebx
add	ebx, eax
cmp	eax, 1000h
lea	esi, [esp+1048h+Buffer]
mov	[esp+1048h+var_1038], 1000h
lea	eax, [esp+1048h+var_1038]
jg	short loc_77F9C5
lea	eax, [esp+1048h+var_1034]

loc_77F9C5:
mov	ebp, [eax]
test	ebp, ebp
jle	short loc_77FA49
jmp	short loc_77F9D0
align 10h

loc_77F9D0:		; size_t
push	ebp
push	0Ah		; int
push	edi		; void *
call	_memchr
add	esp, 0Ch
test	eax, eax
jz	short loc_77FA36
sub	eax, edi
mov	ebp, eax
push	ebp
push	edi
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esi, ebp
mov	byte ptr [esi],	0Dh
inc	esi
mov	byte ptr [esi],	0Ah
inc	esi
lea	eax, [esp+1054h+var_8]
sub	eax, esi
lea	edi, [edi+ebp+1]
mov	ecx, ebx
sub	ecx, edi
add	esp, 0Ch
mov	[esp+1048h+var_1038], eax
test	eax, eax
mov	[esp+1048h+var_1024], 0
mov	[esp+1048h+var_102C], ecx
lea	eax, [esp+1048h+var_1038]
jg	short loc_77FA26
lea	eax, [esp+1048h+var_1024]

loc_77FA26:
cmp	[eax], ecx
jl	short loc_77FA2E
lea	eax, [esp+1048h+var_102C]

loc_77FA2E:
mov	ebp, [eax]
test	ebp, ebp
jg	short loc_77F9D0
jmp	short loc_77FA49

loc_77FA36:
test	ebp, ebp
jle	short loc_77FA49
push	ebp
push	edi
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	esi, ebp
add	edi, ebp

loc_77FA49:
lea	ebp, [esp+1048h+Buffer]
mov	edx, ebp
sub	esi, edx
mov	[esp+1048h+var_1038], esi
jz	short loc_77FA97
mov	[esp+1048h+var_102C], 0FFFFFFFFh
nop

loc_77FA60:
lea	eax, [esp+1048h+var_1038]
cmp	esi, 0FFFFFFFFh
jb	short loc_77FA6D
lea	eax, [esp+1048h+var_102C]

loc_77FA6D:
mov	edx, [eax]
mov	eax, [esp+1048h+var_1028]
push	0		; lpOverlapped
lea	ecx, [esp+104Ch+var_100C]
push	ecx		; lpNumberOfBytesWritten
mov	ecx, [eax]
push	edx		; nNumberOfBytesToWrite
push	ebp		; lpBuffer
push	ecx		; hFile
call	ds:WriteFile
mov	eax, [esp+1048h+var_100C]
test	eax, eax
jz	short loc_77FAC0
add	ebp, eax
sub	esi, eax
mov	[esp+1048h+var_1038], esi
jnz	short loc_77FA60

loc_77FA97:
sub	edi, [esp+1048h+var_1030]
mov	ebp, [esp+1048h+var_1028]
mov	ebx, [esp+1048h+var_1030]

loc_77FAA3:
mov	eax, [esp+1048h+var_1034]
cmp	eax, edi
jz	short loc_77FABC
test	edi, edi
jle	short loc_77FAC0
cmp	edi, eax
jge	short loc_77FAC0
sub	eax, edi
add	ebx, edi
jmp	loc_77F8D0

loc_77FABC:
mov	al, 1
jmp	short loc_77FAC2

loc_77FAC0:
xor	al, al

loc_77FAC2:
mov	ecx, [esp+1048h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 1038h
retn	8
sub_77F8A0 endp

align 10h



; int __stdcall	sub_77FAE0(DWORD lpBaseAddress,	DWORD dwFileOffsetHigh,	SIZE_T dwNumberOfBytesToMap, int)
sub_77FAE0 proc	near

lpBaseAddress= dword ptr  4
dwFileOffsetHigh= dword	ptr  8
dwNumberOfBytesToMap= dword ptr	 0Ch
arg_C= dword ptr  10h

push	ebx
push	0		; lpName
push	0		; dwMaximumSizeLow
push	0		; dwMaximumSizeHigh
push	2		; flProtect
mov	ebx, ecx
mov	eax, [ebx]
push	0		; lpFileMappingAttributes
push	eax		; hFile
call	ds:CreateFileMappingA
mov	[ebx+0Ch], eax
test	eax, eax
jz	short loc_77FB60
push	ebp
mov	ebp, [esp+8+dwNumberOfBytesToMap]
push	esi
mov	esi, [esp+0Ch+lpBaseAddress]
push	edi
mov	edi, [esp+10h+dwFileOffsetHigh]
push	ebp		; dwNumberOfBytesToMap
push	esi		; dwFileOffsetLow
push	edi		; dwFileOffsetHigh
push	4		; dwDesiredAccess
push	eax		; hFileMappingObject
call	ds:MapViewOfFile
mov	[esp+10h+lpBaseAddress], eax
test	eax, eax
jz	short loc_77FB46
add	esi, ebp
adc	edi, [esp+10h+arg_C]
push	1		; int
push	edi		; DistanceToMoveHigh
push	esi		; lDistanceToMove
mov	ecx, ebx
call	sub_77F610
test	edx, edx
jg	short loc_77FB66
jl	short loc_77FB3B
test	eax, eax
jnb	short loc_77FB66

loc_77FB3B:
mov	ecx, [esp+10h+lpBaseAddress]
push	ecx		; lpBaseAddress
call	ds:UnmapViewOfFile

loc_77FB46:
mov	eax, [ebx+0Ch]
test	eax, eax
jz	short loc_77FB54
push	eax		; hObject
call	ds:CloseHandle

loc_77FB54:
pop	edi
pop	esi
xor	eax, eax
pop	ebp
mov	[ebx+0Ch], eax
pop	ebx
retn	10h

loc_77FB60:
xor	eax, eax
pop	ebx
retn	10h

loc_77FB66:
mov	eax, [esp+10h+lpBaseAddress]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_77FAE0 endp

align 10h



sub_77FB80 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	short loc_77FBC0
test	byte ptr [esi+24h], 8
jz	short loc_77FBC0
cmp	byte ptr [esi+34h], 0
jnz	short loc_77FBC0
cmp	byte ptr [esi+35h], 0
jnz	short loc_77FBC0
cmp	dword ptr [esi+38h], 0
jnz	short loc_77FBAA
call	sub_44EF60
test	al, al
jz	short loc_77FBC0

loc_77FBAA:
mov	eax, [esi+40h]
mov	[esi+48h], eax
mov	[esi+4Ch], eax
mov	eax, [esi+50h]
mov	[esi+54h], eax
mov	al, 1
mov	[esi+33h], al
pop	esi
retn

loc_77FBC0:
xor	al, al
pop	esi
retn
sub_77FB80 endp

align 10h



sub_77FBD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+54h]
mov	ecx, [esi+48h]
mov	[esi+50h], eax
mov	eax, [esi+4Ch]
push	edi
cmp	eax, ecx
jbe	short loc_77FC0B
mov	edx, [esi+40h]
sub	eax, ecx
mov	edi, eax
jz	short loc_77FC04
push	edi
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi
mov	[esi+4Ch], eax
jmp	short loc_77FC11

loc_77FC04:
mov	eax, edx
mov	[esi+4Ch], eax
jmp	short loc_77FC11

loc_77FC0B:
mov	ecx, [esi+40h]
mov	[esi+4Ch], ecx

loc_77FC11:
mov	eax, [esi+4Ch]
mov	edx, [esi+44h]
sub	edx, eax
push	edx
lea	ecx, [esi+20h]
push	eax
call	sub_77F760
xor	ebx, ebx
cmp	eax, ebx
mov	[esp+1Ch+var_C], eax
jl	loc_77FCDD

loc_77FC31:
add	[esi+4Ch], eax
mov	edi, [esi+4Ch]
cmp	[esi+40h], edi
jz	loc_77FCDD
mov	eax, [esi+3Ch]
mov	edx, [esi+38h]
mov	ecx, [esi+74h]
mov	ebx, [ecx]
lea	ebp, [esp+1Ch+var_8]
push	ebp
push	eax
push	edx
mov	edx, [ebx+8]
lea	eax, [esp+28h+var_4]
push	eax
mov	eax, [esi+40h]
push	edi
push	eax
lea	eax, [esi+54h]
push	eax
call	edx
cmp	eax, 3
jz	loc_77FCF1
cmp	eax, 2
jz	loc_77FD25
mov	eax, [esi+38h]
mov	ecx, [esp+1Ch+var_8]
mov	edx, [esp+1Ch+var_4]
cmp	ecx, eax
jz	short loc_77FC8F
cmp	edx, [esi+40h]
jz	loc_77FD25

loc_77FC8F:
xor	ebx, ebx
cmp	[esi+30h], bl
jz	short loc_77FCA7
mov	edi, ecx
sub	edi, eax
imul	edi, [esi+78h]
mov	ebp, edx
sub	ebp, [esi+40h]
cmp	edi, ebp
jnz	short loc_77FD25

loc_77FCA7:
cmp	ecx, eax
jnz	short loc_77FD0E
mov	edi, edx
sub	edi, [esi+40h]
cmp	edi, [esi+7Ch]
jge	short loc_77FD25
cmp	ecx, eax
jnz	short loc_77FD0E
cmp	[esp+1Ch+var_C], ebx
jle	short loc_77FCDD
mov	eax, [esi+4Ch]
mov	ecx, [esi+44h]
sub	ecx, eax
push	ecx
push	eax
lea	ecx, [esi+20h]
call	sub_77F760
cmp	eax, ebx
mov	[esp+1Ch+var_C], eax
jge	loc_77FC31

loc_77FCDD:
pop	edi
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 0Ch
retn

loc_77FCF1:
mov	eax, [esi+40h]
mov	ecx, [esi+4Ch]
pop	edi
mov	[esi+48h], ecx
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], ecx
movzx	eax, byte ptr [eax]
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_77FD0E:
pop	edi
mov	[esi+48h], edx
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], ecx
movzx	eax, byte ptr [eax]
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_77FD25:
mov	ecx, esi
call	sub_77F710
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_77FBD0 endp

align 10h



sub_77FD40 proc	near

var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
cmp	byte ptr [esi+33h], 0
jnz	short loc_77FD61
mov	ecx, esi
call	sub_77FB80
test	al, al
jnz	short loc_77FD89
or	eax, 0FFFFFFFFh
pop	esi
add	esp, 10h
retn

loc_77FD61:
cmp	byte ptr [esi+36h], 0
jz	short loc_77FD89
mov	eax, [esi+68h]
mov	ecx, [esi+70h]
mov	[esi+4], eax
mov	eax, [esi+6Ch]
mov	[esi+8], eax
mov	[esi+0Ch], ecx
mov	byte ptr [esi+36h], 0
cmp	eax, ecx
jz	short loc_77FD89
movzx	eax, byte ptr [eax]
pop	esi
add	esp, 10h
retn

loc_77FD89:
cmp	byte ptr [esi+2Ah], 0
push	ebx
push	ebp
push	edi
jz	loc_77FEC0
cmp	byte ptr [esi+31h], 0
jz	loc_77FEC0
mov	ecx, [esi+24h]
shr	ecx, 2
test	cl, 1
jz	loc_77FEC0
mov	eax, [esi+58h]
test	eax, eax
jz	short loc_77FDC7
mov	edx, [esi+64h]
mov	ecx, [esi+60h]
push	edx		; int
push	ecx		; int
push	eax		; lpBaseAddress
lea	ecx, [esi+20h]
call	sub_77F6E0

loc_77FDC7:		; int
push	2
push	0		; DistanceToMoveHigh
lea	ebx, [esi+20h]
push	0		; lDistanceToMove
mov	ecx, ebx
call	sub_77F610
mov	ecx, ebx
mov	edi, eax
mov	ebp, edx
call	sub_77F1F0
mov	ebx, edx
xor	ecx, ecx
cmp	ebx, ecx
mov	[esp+20h+var_10], eax
jl	loc_77FEB7
jg	short loc_77FDFC
cmp	eax, ecx
jbe	loc_77FEB7

loc_77FDFC:
cmp	ebp, ecx
jl	loc_77FEB7
jg	short loc_77FE0E
cmp	edi, ecx
jb	loc_77FEB7

loc_77FE0E:
cmp	ebp, ebx
jg	loc_77FEB7
jl	short loc_77FE20
cmp	edi, eax
jnb	loc_77FEB7

loc_77FE20:
mov	eax, dword_167EB00
push	ecx
push	eax
push	ebp
push	edi
call	__alldiv
xor	ecx, ecx
push	ecx
mov	ecx, dword_167EB00
push	ecx
push	edx
push	eax
call	__allmul
mov	ecx, [esp+20h+var_10]
sub	edi, eax
sbb	ebp, edx
sub	ecx, eax
sbb	ebx, edx
mov	[esi+64h], ebx
xor	ebx, ebx
cmp	[esi+64h], ebx
mov	[esp+20h+var_4], ebp
mov	[esi+60h], ecx
jl	short loc_77FE6E
mov	ecx, 100000h
jg	short loc_77FE68
cmp	[esi+60h], ecx
jbe	short loc_77FE6E

loc_77FE68:
mov	[esi+60h], ecx
mov	[esi+64h], ebx

loc_77FE6E:
mov	ecx, [esi+64h]
push	ecx		; int
mov	ecx, [esi+60h]
push	ecx		; dwNumberOfBytesToMap
push	edx		; dwFileOffsetHigh
push	eax		; lpBaseAddress
lea	ecx, [esi+20h]
call	sub_77FAE0
mov	[esi+58h], eax
cmp	eax, ebx
jz	short loc_77FEA3
mov	edx, [esi+60h]
lea	ecx, [eax+edi]
pop	edi
pop	ebp
add	edx, eax
mov	[esi+4], eax
mov	[esi+8], ecx
mov	[esi+0Ch], edx
movzx	eax, byte ptr [ecx]
pop	ebx
pop	esi
add	esp, 10h
retn

loc_77FEA3:
pop	edi
pop	ebp
mov	[esi+60h], ebx
mov	[esi+64h], ebx
pop	ebx
mov	ecx, esi
pop	esi
add	esp, 10h
jmp	sub_77FBD0

loc_77FEB7:
mov	[esi+58h], ecx
mov	[esi+60h], ecx
mov	[esi+64h], ecx

loc_77FEC0:
pop	edi
pop	ebp
pop	ebx
mov	ecx, esi
pop	esi
add	esp, 10h
jmp	sub_77FBD0
sub_77FD40 endp

align 10h



sub_77FED0 proc	near
mov	dword ptr [ecx], offset	off_14463D8
retn
sub_77FED0 endp

align 10h



sub_77FEE0 proc	near
push	esi
mov	esi, ecx
call	sub_7904E0
mov	eax, [eax]
push	eax		; lpAddend
call	sub_780390
mov	[esi], eax
add	esp, 4
mov	eax, esi
pop	esi
retn
sub_77FEE0 endp

align 10h



sub_77FF00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
push	ecx		; lpAddend
call	sub_780390
mov	[esi], eax
add	esp, 4
mov	eax, esi
pop	esi
retn	4
sub_77FF00 endp

align 10h



; int __stdcall	sub_77FF20(volatile LONG *lpAddend)
sub_77FF20 proc	near

lpAddend= dword	ptr  4

mov	eax, [esp+lpAddend]
push	esi
push	eax		; lpAddend
mov	esi, ecx
call	sub_780390
mov	[esi], eax
add	esp, 4
mov	eax, esi
pop	esi
retn	4
sub_77FF20 endp

align 10h



sub_77FF40 proc	near
cmp	dword ptr [ecx], 0
jz	short locret_77FF4C
push	ecx
call	sub_7859F0
pop	ecx

locret_77FF4C:
retn
sub_77FF40 endp

align 10h



sub_77FF50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
mov	edi, [esp+8+arg_0]
cmp	eax, [edi]
jz	short loc_77FF78
test	eax, eax
jz	short loc_77FF6B
push	esi
call	sub_7859F0
add	esp, 4

loc_77FF6B:
mov	eax, [edi]
push	eax		; lpAddend
call	sub_780390
add	esp, 4
mov	[esi], eax

loc_77FF78:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_77FF50 endp

align 10h



; int __thiscall sub_77FF80(void *, char)
sub_77FF80 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14463D8
jz	short loc_77FF99
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_77FF99:
mov	eax, esi
pop	esi
retn	4
sub_77FF80 endp

align 10h



sub_77FFA0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [eax+20h]
sub	edx, [eax+1Ch]
mov	ecx, [esp+arg_0]
mov	ecx, [ecx]
sar	edx, 2
cmp	ecx, edx
jnb	short loc_77FFBE
mov	eax, [eax+1Ch]
mov	eax, [eax+ecx*4]
retn	4

loc_77FFBE:
xor	eax, eax
retn	4
sub_77FFA0 endp

align 10h



sub_77FFD0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [eax+20h]
sub	edx, [eax+1Ch]
mov	ecx, [esp+arg_0]
mov	ecx, [ecx]
sar	edx, 2
cmp	ecx, edx
jnb	short loc_77FFEF
mov	eax, [eax+1Ch]
mov	eax, [eax+ecx*4]
test	eax, eax
jnz	short locret_77FFF4

loc_77FFEF:
call	sub_7802E0

locret_77FFF4:
retn	4
sub_77FFD0 endp

align 10h



sub_780000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx]
push	esi
mov	esi, [esp+8+arg_0]
add	eax, 4
push	eax
mov	ecx, esi
mov	[esp+0Ch+var_4], 0
call	sub_403850
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_780000 endp

align 10h



sub_780030 proc	near

var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12C97C2
mov	eax, large fs:0
push	eax
sub	esp, 4Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+6Ch+var_C]
mov	large fs:0, eax
mov	ebp, ecx
mov	ecx, [esp+6Ch+arg_0]
xor	ebx, ebx
mov	[esp+6Ch+var_58], ebx
mov	eax, [ebp+0]
cmp	eax, [ecx]
jz	short loc_7800E7
lea	edx, [esp+6Ch+var_24]
push	edx
call	sub_780000
mov	esi, eax
lea	eax, [esp+6Ch+var_3C]
mov	edi, 1
push	eax
mov	ecx, ebp
mov	[esp+70h+var_4], ebx
mov	[esp+70h+var_58], edi
call	sub_780000
mov	edx, [eax+10h]
mov	ecx, [esi+10h]
mov	esi, [esi+14h]
mov	[esp+6Ch+var_4], edi
mov	edi, [eax+14h]
mov	ebx, edx
sub	ecx, esi
sub	ebx, edi
mov	[esp+6Ch+var_58], 3
cmp	ebx, ecx
jnz	short loc_780120
mov	eax, edi
sub	edx, eax
push	edx
push	esi
push	eax
call	sub_405D80
add	esp, 0Ch
test	eax, eax
jnz	short loc_780120
lea	ecx, [esp+6Ch+var_54]
push	ecx
mov	ecx, ebp
call	sub_780000
push	offset dword_1858044
push	eax
mov	ebx, 7
call	sub_46F700
add	esp, 8
test	al, al
jz	short loc_780124

loc_7800E7:
mov	byte ptr [esp+6Ch+arg_0], 1

loc_7800EC:
test	bl, 4
jz	short loc_780135
mov	ecx, [esp+6Ch+var_40]
and	ebx, 0FFFFFFFBh
lea	edx, [esp+6Ch+var_54]
mov	[esp+6Ch+var_58], ebx
cmp	ecx, edx
jz	short loc_780135
test	ecx, ecx
jz	short loc_780135
mov	eax, [esp+6Ch+var_54]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78012B
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_780135

loc_780120:
mov	ebx, [esp+6Ch+var_58]

loc_780124:
mov	byte ptr [esp+6Ch+arg_0], 0
jmp	short loc_7800EC

loc_78012B:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_780135:
mov	[esp+6Ch+var_4], 0
test	bl, 2
jz	short loc_78017B
mov	ecx, [esp+6Ch+var_28]
and	ebx, 0FFFFFFFDh
lea	eax, [esp+6Ch+var_3C]
mov	[esp+6Ch+var_58], ebx
cmp	ecx, eax
jz	short loc_78017B
test	ecx, ecx
jz	short loc_78017B
mov	eax, [esp+6Ch+var_3C]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_780171
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78017B

loc_780171:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78017B:
mov	[esp+6Ch+var_4], 0FFFFFFFFh
test	bl, 1
jz	short loc_7801BA
mov	ecx, [esp+6Ch+var_10]
lea	edx, [esp+6Ch+var_24]
cmp	ecx, edx
jz	short loc_7801BA
test	ecx, ecx
jz	short loc_7801BA
mov	eax, [esp+6Ch+var_24]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_7801B0
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7801BA

loc_7801B0:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_7801BA:
mov	al, byte ptr [esp+6Ch+arg_0]
mov	ecx, [esp+6Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 58h
retn	4
sub_780030 endp

align 10h



sub_7801E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax
call	sub_780030
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn	4
sub_7801E0 endp

align 10h



; int __thiscall sub_780200(void *, char)
sub_780200 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_791CC0
test	[esp+4+arg_0], 1
jz	short loc_780218
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_780218:
mov	eax, esi
pop	esi
retn	4
sub_780200 endp

align 10h



; int __thiscall sub_780220(void *, char)
sub_780220 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_792160
test	[esp+4+arg_0], 1
jz	short loc_780238
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_780238:
mov	eax, esi
pop	esi
retn	4
sub_780220 endp

align 10h



; int __thiscall sub_780240(void *, char)
sub_780240 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7921B0
test	[esp+4+arg_0], 1
jz	short loc_780258
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_780258:
mov	eax, esi
pop	esi
retn	4
sub_780240 endp

align 10h



; int __thiscall sub_780260(void *, char)
sub_780260 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7922D0
test	[esp+4+arg_0], 1
jz	short loc_780278
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_780278:
mov	eax, esi
pop	esi
retn	4
sub_780260 endp

align 10h



; int __thiscall sub_780280(void *, char)
sub_780280 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_792310
test	[esp+4+arg_0], 1
jz	short loc_780298
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_780298:
mov	eax, esi
pop	esi
retn	4
sub_780280 endp

align 10h



; int __thiscall sub_7802A0(void *, char)
sub_7802A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_792690
test	[esp+4+arg_0], 1
jz	short loc_7802B8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7802B8:
mov	eax, esi
pop	esi
retn	4
sub_7802A0 endp

align 10h



; int __thiscall sub_7802C0(void *, char)
sub_7802C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7926C0
test	[esp+4+arg_0], 1
jz	short loc_7802D8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7802D8:
mov	eax, esi
pop	esi
retn	4
sub_7802C0 endp

align 10h


; Attributes: noreturn

sub_7802E0 proc	near

var_C= byte ptr	-0Ch

sub	esp, 0Ch
push	offset aBadCast	; "bad cast"
lea	ecx, [esp+10h+var_C]
call	sub_7966ED
push	offset unk_162438C
lea	eax, [esp+10h+var_C]
push	eax
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_7802E0 endp

db 10h dup(0CCh)
; [00000079 BYTES: COLLAPSED FUNCTION __cfltcvt_init. PRESS KEYPAD "+" TO EXPAND]
align 10h



; int __cdecl sub_780390(volatile LONG *lpAddend)
sub_780390 proc	near

lpAddend= dword	ptr  4

push	esi
mov	esi, [esp+4+lpAddend]
push	esi		; lpAddend
call	ds:InterlockedIncrement
mov	eax, esi
pop	esi
retn
sub_780390 endp




sub_7803A0 proc	near
mov	eax, offset dword_1858028
retn
sub_7803A0 endp

align 10h



sub_7803B0 proc	near
mov	eax, offset dword_185802C
retn
sub_7803B0 endp

align 10h



sub_7803C0 proc	near
mov	eax, offset dword_1858024
retn
sub_7803C0 endp

align 10h



; int __thiscall sub_7803D0(void *, char)
sub_7803D0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14464CC
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_7803EE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7803EE:
mov	eax, esi
pop	esi
retn	4
sub_7803D0 endp

align 10h



; int __thiscall sub_780400(void *, char)
sub_780400 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14464F4
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_78041E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_78041E:
mov	eax, esi
pop	esi
retn	4
sub_780400 endp

align 10h



; int __thiscall sub_780430(void *, char)
sub_780430 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1446528
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_78044E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_78044E:
mov	eax, esi
pop	esi
retn	4
sub_780430 endp

align 10h



; int __thiscall sub_780460(void *, char)
sub_780460 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_144655C
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_78047E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_78047E:
mov	eax, esi
pop	esi
retn	4
sub_780460 endp

align 10h



; int __thiscall sub_780490(void *, char)
sub_780490 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1446584
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_7804AE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7804AE:
mov	eax, esi
pop	esi
retn	4
sub_780490 endp

align 10h



; int __thiscall sub_7804C0(void *, char)
sub_7804C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1446594
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_7804DE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7804DE:
mov	eax, esi
pop	esi
retn	4
sub_7804C0 endp

align 10h



; int __thiscall sub_7804F0(void *, char)
sub_7804F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14465A4
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_78050E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_78050E:
mov	eax, esi
pop	esi
retn	4
sub_7804F0 endp

align 10h



; int __thiscall sub_780520(void *, char)
sub_780520 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14465B4
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_78053E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_78053E:
mov	eax, esi
pop	esi
retn	4
sub_780520 endp

align 10h



; int __stdcall	sub_780550(size_t, int)
sub_780550 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 0Ch
cmp	eax, 0FFFFFFFFh
jbe	short loc_780583
push	1
push	offset off_167EF90
lea	ecx, [esp+14h+var_C]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
push	offset unk_1641FD8
lea	eax, [esp+10h+var_C]
push	eax
mov	[esp+14h+var_C], offset	off_1446194
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_780583:
test	eax, eax
jz	short loc_7805B4
mov	[esp+0Ch+arg_0], eax
cmp	eax, 80h
jbe	short loc_7805A1
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
add	esp, 0Ch
retn	8

loc_7805A1:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
call	sub_77E150
add	esp, 4
add	esp, 0Ch
retn	8

loc_7805B4:
xor	eax, eax
add	esp, 0Ch
retn	8
sub_780550 endp

align 10h



sub_7805C0 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 0Ch
cmp	eax, 7FFFFFFFh
jbe	short loc_7805F5
push	1
push	offset off_167EF90
lea	ecx, [esp+14h+var_C]
call	??0exception@std@@QAE@ABQBDH@Z ; std::exception::exception(char	const *	const &,int)
push	offset unk_1641FD8
lea	eax, [esp+10h+var_C]
push	eax
mov	[esp+14h+var_C], offset	off_1446194
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)

loc_7805F5:
test	eax, eax
jz	short loc_780628
add	eax, eax
mov	[esp+0Ch+arg_0], eax
cmp	eax, 80h
jbe	short loc_780615
push	eax		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
add	esp, 0Ch
retn	8

loc_780615:
lea	ecx, [esp+0Ch+arg_0]
push	ecx
call	sub_77E150
add	esp, 4
add	esp, 0Ch
retn	8

loc_780628:
xor	eax, eax
add	esp, 0Ch
retn	8
sub_7805C0 endp




sub_780630 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
test	ecx, ecx
jz	short loc_78065F
push	ebx
mov	edi, edi

loc_780640:
mov	eax, 0CCCCCCCDh
mul	ecx
shr	edx, 3
mov	al, dl
mov	bl, 0Ah
imul	bl
sub	cl, al
add	cl, 30h
dec	esi
mov	[esi], cl
mov	ecx, edx
test	ecx, ecx
jnz	short loc_780640
pop	ebx

loc_78065F:
test	[esp+4+arg_8], 800h
jz	short loc_78066D
dec	esi
mov	byte ptr [esi],	2Bh

loc_78066D:
mov	eax, esi
pop	esi
retn
sub_780630 endp

align 10h



sub_780680 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h

mov	eax, dword ptr [esp+arg_4]
mov	ecx, dword ptr [esp+arg_4+4]
mov	edx, eax
or	edx, ecx
push	esi
mov	esi, [esp+4+arg_0]
jz	short loc_7806B2
push	ebx

loc_780694:
push	0
push	0Ah
push	ecx
push	eax
dec	esi
call	__aulldvrm
add	cl, 30h
mov	[esi], cl
mov	ecx, edx
mov	edx, eax
or	edx, ecx
mov	dword ptr [esp+8+arg_4+4], ebx
jnz	short loc_780694
pop	ebx

loc_7806B2:
test	[esp+4+arg_C], 800h
jz	short loc_7806C0
dec	esi
mov	byte ptr [esi],	2Bh

loc_7806C0:
mov	eax, esi
pop	esi
retn
sub_780680 endp

align 10h



sub_7806D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_8]
mov	eax, [esp+arg_4]
sub	esp, 8
test	ecx, ecx
jg	short loc_780730
jl	short loc_7806E5
test	eax, eax
jnb	short loc_780730

loc_7806E5:
neg	eax
adc	ecx, 0
mov	byte ptr [esp+8+arg_4],	1
neg	ecx

loc_7806F1:
mov	edx, eax
or	edx, ecx
push	esi
mov	esi, [esp+0Ch+arg_0]
jz	short loc_78071E
push	ebx
lea	ecx, [ecx+0]

loc_780700:
push	0
push	0Ah
push	ecx
push	eax
dec	esi
call	__aulldvrm
add	cl, 30h
mov	[esi], cl
mov	ecx, edx
mov	edx, eax
or	edx, ecx
mov	[esp+10h+var_4], ebx
jnz	short loc_780700
pop	ebx

loc_78071E:
cmp	byte ptr [esp+0Ch+arg_4], 0
jz	short loc_780737
dec	esi
mov	byte ptr [esi],	2Dh
mov	eax, esi
pop	esi
add	esp, 8
retn

loc_780730:
mov	byte ptr [esp+8+arg_4],	0
jmp	short loc_7806F1

loc_780737:
test	[esp+0Ch+arg_C], 800h
jz	short loc_780745
dec	esi
mov	byte ptr [esi],	2Bh

loc_780745:
mov	eax, esi
pop	esi
add	esp, 8
retn
sub_7806D0 endp

align 10h



sub_780750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_4]
test	eax, eax
push	ebx
setl	bl
push	esi
mov	byte ptr [esp+10h+arg_4], bl
cdq
test	bl, bl
jz	short loc_78076E
neg	eax
adc	edx, 0
neg	edx

loc_78076E:
mov	esi, [esp+10h+arg_0]
mov	ecx, edx
mov	edx, eax
or	edx, ecx
jz	short loc_7807A1
lea	ebx, [ebx+0]

loc_780780:
push	0
push	0Ah
push	ecx
push	eax
dec	esi
call	__aulldvrm
add	cl, 30h
mov	[esi], cl
mov	ecx, edx
mov	edx, eax
or	edx, ecx
mov	[esp+10h+var_4], ebx
jnz	short loc_780780
mov	bl, byte ptr [esp+10h+arg_4]

loc_7807A1:
test	bl, bl
jz	short loc_7807B1
dec	esi
mov	byte ptr [esi],	2Dh
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_7807B1:
test	[esp+10h+arg_8], 800h
jz	short loc_7807BF
dec	esi
mov	byte ptr [esi],	2Bh

loc_7807BF:
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn
sub_780750 endp

align 10h



sub_7807D0 proc	near

var_24=	byte ptr -24h
var_4= dword ptr -4
arg_0= qword ptr  4

sub	esp, 24h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+24h+var_4], eax
mov	eax, dword ptr [esp+24h+arg_0]
mov	edx, dword ptr [esp+24h+arg_0+4]
push	esi
push	edi
mov	ecx, 8
mov	esi, eax
lea	edi, [esp+2Ch+var_24]
rep movsd
mov	ecx, 8
mov	esi, edx
mov	edi, eax
rep movsd
mov	ecx, 8
lea	esi, [esp+2Ch+var_24]
mov	edi, edx
rep movsd
mov	ecx, [esp+2Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 24h
retn
sub_7807D0 endp

align 10h



sub_780820 proc	near
mov	eax, [ecx+118h]
cmp	eax, ecx
jz	short locret_780859
test	eax, eax
jz	short locret_780859
mov	edx, [ecx]
add	ecx, 14h
sub	edx, eax
cmp	eax, ecx
jz	short locret_780859
test	eax, eax
jz	short locret_780859
cmp	edx, 80h
jbe	short loc_78084F
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_78084F:
push	edx
push	eax
call	sub_77E0D0
add	esp, 8

locret_780859:
retn
sub_780820 endp

align 10h



sub_780860 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+4], 0
jz	short loc_7808A1
mov	ecx, [esi]
mov	eax, [ecx+14h]
cmp	eax, [ecx+18h]
jnb	short loc_780881
mov	dl, [esp+4+arg_0]
mov	[eax], dl
inc	dword ptr [ecx+14h]
movzx	eax, byte ptr [eax]
jmp	short loc_78088E

loc_780881:
movzx	edx, [esp+4+arg_0]
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax

loc_78088E:
cmp	eax, 0FFFFFFFFh
jz	short loc_7808A1
mov	eax, 1
mov	[esi+4], al
mov	eax, esi
pop	esi
retn	4

loc_7808A1:
xor	eax, eax
mov	[esi+4], al
mov	eax, esi
pop	esi
retn	4
sub_780860 endp

align 10h



sub_7808B0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7808C9
inc	eax
mov	[ecx+8], eax
mov	eax, esi
mov	byte ptr [esi+6], 0
pop	esi
retn

loc_7808C9:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx
mov	eax, esi
mov	byte ptr [esi+6], 0
pop	esi
retn
sub_7808B0 endp

align 10h



sub_7808E0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7808FB
add	eax, 2
mov	[ecx+8], eax
mov	eax, esi
mov	byte ptr [esi+7], 0
pop	esi
retn

loc_7808FB:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx
mov	eax, esi
mov	byte ptr [esi+7], 0
pop	esi
retn
sub_7808E0 endp

align 10h



sub_780910 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esp+8+arg_8]
test	edi, edi
jnz	short loc_780944
mov	ecx, [esp+8+arg_4]
lea	eax, [esi-1]
mov	byte ptr [eax],	30h
test	ecx, 800h
jz	loc_7809EF
test	cl, 30h
jnz	loc_7809EF
dec	eax
pop	edi
mov	byte ptr [eax],	2Bh
pop	esi
retn

loc_780944:
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, ebx
and	eax, 38h
cmp	eax, 10h
jz	short loc_7809A0
cmp	eax, 20h
jz	short loc_78096C
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ebx
push	edi
push	esi
call	sub_780630
add	esp, 10h
pop	ebx
pop	edi
pop	esi
retn

loc_78096C:
mov	eax, edi
xor	ecx, ecx
mov	edx, eax
or	edx, ecx
jz	short loc_78098E

loc_780976:
mov	dl, al
and	dl, 7
shrd	eax, ecx, 3
add	dl, 30h
dec	esi
mov	[esi], dl
shr	ecx, 3
mov	edx, eax
or	edx, ecx
jnz	short loc_780976

loc_78098E:
test	ebx, 200h
jz	short loc_7809EC
dec	esi
pop	ebx
pop	edi
mov	byte ptr [esi],	30h
mov	eax, esi
pop	esi
retn

loc_7809A0:
push	ebp
test	ebx, 4000h
jz	short loc_7809B0
call	sub_793A10
jmp	short loc_7809B5

loc_7809B0:
call	sub_793A00

loc_7809B5:
mov	ebp, eax
mov	ecx, edi
xor	edx, edx
mov	eax, ecx
or	eax, edx
jz	short loc_7809D9

loc_7809C1:
mov	eax, ecx
and	eax, 0Fh
mov	al, [eax+ebp]
shrd	ecx, edx, 4
dec	esi
mov	[esi], al
shr	edx, 4
mov	eax, ecx
or	eax, edx
jnz	short loc_7809C1

loc_7809D9:
test	ebx, 200h
jz	short loc_7809EB
mov	cl, [ebp+10h]
dec	esi
mov	[esi], cl
dec	esi
mov	byte ptr [esi],	30h

loc_7809EB:
pop	ebp

loc_7809EC:
mov	eax, esi
pop	ebx

loc_7809EF:
pop	edi
pop	esi
retn
sub_780910 endp

align 10h



sub_780A00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= qword ptr  0Ch

push	ebx
mov	ebx, dword ptr [esp+4+arg_8+4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, dword ptr [esp+0Ch+arg_8]
mov	eax, edi
or	eax, ebx
jnz	short loc_780A3C
mov	ecx, [esp+0Ch+arg_4]
lea	eax, [esi-1]
mov	byte ptr [eax],	30h
test	ecx, 800h
jz	loc_780AE4
test	cl, 30h
jnz	loc_780AE4
pop	edi
dec	eax
pop	esi
mov	byte ptr [eax],	2Bh
pop	ebx
retn

loc_780A3C:
push	ebp
mov	ebp, [esp+10h+arg_4]
mov	eax, ebp
and	eax, 38h
cmp	eax, 10h
jz	short loc_780A9B
cmp	eax, 20h
jz	short loc_780A66
lea	ecx, [esp+10h+arg_0]
push	ecx
push	ebp
push	ebx
push	edi
push	esi
call	sub_780680
add	esp, 14h
pop	ebp
pop	edi
pop	esi
pop	ebx
retn

loc_780A66:
mov	eax, edi
mov	ecx, ebx
lea	ebx, [ebx+0]

loc_780A70:
mov	dl, al
and	dl, 7
shrd	eax, ecx, 3
add	dl, 30h
dec	esi
mov	[esi], dl
shr	ecx, 3
mov	edx, eax
or	edx, ecx
jnz	short loc_780A70
test	ebp, 200h
jz	short loc_780AE1
pop	ebp
dec	esi
pop	edi
mov	byte ptr [esi],	30h
mov	eax, esi
pop	esi
pop	ebx
retn

loc_780A9B:
test	ebp, 4000h
jz	short loc_780AAA
call	sub_793A10
jmp	short loc_780AAF

loc_780AAA:
call	sub_793A00

loc_780AAF:
mov	ebp, eax
mov	ecx, edi
mov	edx, ebx

loc_780AB5:
mov	eax, ecx
and	eax, 0Fh
mov	al, [eax+ebp]
shrd	ecx, edx, 4
dec	esi
mov	[esi], al
shr	edx, 4
mov	eax, ecx
or	eax, edx
jnz	short loc_780AB5
test	[esp+10h+arg_4], 200h
jz	short loc_780AE1
mov	cl, [ebp+10h]
dec	esi
mov	[esi], cl
dec	esi
mov	byte ptr [esi],	30h

loc_780AE1:
mov	eax, esi
pop	ebp

loc_780AE4:
pop	edi
pop	esi
pop	ebx
retn
sub_780A00 endp

align 10h



sub_780AF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= qword ptr  0Ch

push	ebx
mov	ebx, dword ptr [esp+4+arg_8+4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, dword ptr [esp+0Ch+arg_8]
mov	eax, edi
or	eax, ebx
jnz	short loc_780B2C
mov	ecx, [esp+0Ch+arg_4]
lea	eax, [esi-1]
mov	byte ptr [eax],	30h
test	ecx, 800h
jz	loc_780BD4
test	cl, 30h
jnz	loc_780BD4
pop	edi
dec	eax
pop	esi
mov	byte ptr [eax],	2Bh
pop	ebx
retn

loc_780B2C:
push	ebp
mov	ebp, [esp+10h+arg_4]
mov	eax, ebp
and	eax, 38h
cmp	eax, 10h
jz	short loc_780B8B
cmp	eax, 20h
jz	short loc_780B56
lea	ecx, [esp+10h+arg_0]
push	ecx
push	ebp
push	ebx
push	edi
push	esi
call	sub_7806D0
add	esp, 14h
pop	ebp
pop	edi
pop	esi
pop	ebx
retn

loc_780B56:
mov	eax, edi
mov	ecx, ebx
lea	ebx, [ebx+0]

loc_780B60:
mov	dl, al
and	dl, 7
shrd	eax, ecx, 3
add	dl, 30h
dec	esi
mov	[esi], dl
shr	ecx, 3
mov	edx, eax
or	edx, ecx
jnz	short loc_780B60
test	ebp, 200h
jz	short loc_780BD1
pop	ebp
dec	esi
pop	edi
mov	byte ptr [esi],	30h
mov	eax, esi
pop	esi
pop	ebx
retn

loc_780B8B:
test	ebp, 4000h
jz	short loc_780B9A
call	sub_793A10
jmp	short loc_780B9F

loc_780B9A:
call	sub_793A00

loc_780B9F:
mov	ebp, eax
mov	ecx, edi
mov	edx, ebx

loc_780BA5:
mov	eax, ecx
and	eax, 0Fh
mov	al, [eax+ebp]
shrd	ecx, edx, 4
dec	esi
mov	[esi], al
shr	edx, 4
mov	eax, ecx
or	eax, edx
jnz	short loc_780BA5
test	[esp+10h+arg_4], 200h
jz	short loc_780BD1
mov	cl, [ebp+10h]
dec	esi
mov	[esi], cl
dec	esi
mov	byte ptr [esi],	30h

loc_780BD1:
mov	eax, esi
pop	ebp

loc_780BD4:
pop	edi
pop	esi
pop	ebx
retn
sub_780AF0 endp

align 10h



sub_780BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esp+8+arg_8]
test	edi, edi
jnz	short loc_780C14
mov	ecx, [esp+8+arg_4]
lea	eax, [esi-1]
mov	byte ptr [eax],	30h
test	ecx, 800h
jz	loc_780CC1
test	cl, 30h
jnz	loc_780CC1
dec	eax
pop	edi
mov	byte ptr [eax],	2Bh
pop	esi
retn

loc_780C14:
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	eax, ebx
and	eax, 38h
cmp	eax, 10h
jz	short loc_780C71
cmp	eax, 20h
jz	short loc_780C3C
lea	eax, [esp+0Ch+arg_0]
push	eax
push	ebx
push	edi
push	esi
call	sub_780750
add	esp, 10h
pop	ebx
pop	edi
pop	esi
retn

loc_780C3C:
mov	eax, edi
cdq
xor	ecx, ecx
mov	edx, eax
or	edx, ecx
jz	short loc_780C5F

loc_780C47:
mov	dl, al
and	dl, 7
shrd	eax, ecx, 3
add	dl, 30h
dec	esi
mov	[esi], dl
shr	ecx, 3
mov	edx, eax
or	edx, ecx
jnz	short loc_780C47

loc_780C5F:
test	ebx, 200h
jz	short loc_780CBE
dec	esi
pop	ebx
pop	edi
mov	byte ptr [esi],	30h
mov	eax, esi
pop	esi
retn

loc_780C71:
push	ebp
test	ebx, 4000h
jz	short loc_780C81
call	sub_793A10
jmp	short loc_780C86

loc_780C81:
call	sub_793A00

loc_780C86:
mov	ebp, eax
mov	eax, edi
cdq
xor	ecx, ecx
mov	edx, eax
or	edx, ecx
jz	short loc_780CAB

loc_780C93:
mov	edx, eax
and	edx, 0Fh
mov	dl, [edx+ebp]
shrd	eax, ecx, 4
dec	esi
mov	[esi], dl
shr	ecx, 4
mov	edx, eax
or	edx, ecx
jnz	short loc_780C93

loc_780CAB:
test	ebx, 200h
jz	short loc_780CBD
mov	al, [ebp+10h]
dec	esi
mov	[esi], al
dec	esi
mov	byte ptr [esi],	30h

loc_780CBD:
pop	ebp

loc_780CBE:
mov	eax, esi
pop	ebx

loc_780CC1:
pop	edi
pop	esi
retn
sub_780BE0 endp

align 10h



sub_780CD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	esi
mov	esi, [esp+4+arg_10]
test	esi, esi
jl	short loc_780D3C
push	edi
mov	edi, [esp+8+arg_C]
jg	short loc_780CE4
test	edi, edi
jbe	short loc_780D3B

loc_780CE4:
mov	al, byte ptr [esp+8+arg_8]
push	ebp
mov	ebp, [esp+0Ch+arg_14]
push	ebx
mov	edi, edi

loc_780CF0:
test	al, al
jz	short loc_780D23
mov	ecx, [esp+10h+arg_4]
mov	edx, [ecx+14h]
mov	bl, [ebp+0]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_780D0F
mov	[edx], bl
inc	dword ptr [eax]
movzx	eax, byte ptr [edx]
jmp	short loc_780D1A

loc_780D0F:
mov	eax, [ecx]
mov	eax, [eax+30h]
movzx	edx, bl
push	edx
call	eax

loc_780D1A:
cmp	eax, 0FFFFFFFFh
jz	short loc_780D23
mov	al, 1
jmp	short loc_780D25

loc_780D23:
xor	al, al

loc_780D25:
add	edi, 0FFFFFFFFh
adc	esi, 0FFFFFFFFh
mov	byte ptr [esp+10h+arg_8], al
test	esi, esi
jg	short loc_780CF0
jl	short loc_780D39
test	edi, edi
ja	short loc_780CF0

loc_780D39:
pop	ebx
pop	ebp

loc_780D3B:
pop	edi

loc_780D3C:
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
mov	[eax], ecx
mov	[eax+4], edx
pop	esi
retn
sub_780CD0 endp

align 10h



sub_780D50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+6], 0
push	edi
jnz	short loc_780D80
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_780D69
movzx	eax, byte ptr [eax]
jmp	short loc_780D70

loc_780D69:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_780D70:
cmp	eax, 0FFFFFFFFh
mov	[esi+4], al
setz	al
mov	[esi+5], al
mov	byte ptr [esi+6], 1

loc_780D80:
mov	ecx, [esi]
mov	edi, [esp+8+arg_0]
mov	eax, [ecx+8]
mov	edx, [esi+4]
mov	[edi], ecx
mov	[edi+4], edx
cmp	eax, [ecx+0Ch]
jnb	short loc_780DA5
inc	eax
mov	[ecx+8], eax
mov	eax, edi
pop	edi
mov	byte ptr [esi+6], 0
pop	esi
retn	8

loc_780DA5:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx
mov	eax, edi
pop	edi
mov	byte ptr [esi+6], 0
pop	esi
retn	8
sub_780D50 endp

align 10h



sub_780DC0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+7], 0
push	edi
jnz	short loc_780DFC
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_780DD9
movzx	eax, word ptr [eax]
jmp	short loc_780DE3

loc_780DD9:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax

loc_780DE3:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_780DFC:
mov	eax, [esi]
mov	edi, [esp+8+arg_0]
mov	ecx, [esi+4]
mov	[edi+4], ecx
mov	ecx, eax
mov	[edi], eax
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_780E25
add	eax, 2
mov	[ecx+8], eax
mov	eax, edi
pop	edi
mov	byte ptr [esi+7], 0
pop	esi
retn	8

loc_780E25:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax
mov	eax, edi
pop	edi
mov	byte ptr [esi+7], 0
pop	esi
retn	8
sub_780DC0 endp

align 10h


; Attributes: bp-based frame

sub_780E40 proc	near

var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	byte ptr -48h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	byte ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 74h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+74h+var_4], eax
fldz
mov	edx, [ebp+arg_1C]
fst	[esp+74h+var_60]
mov	ecx, [edx+14h]
fild	[ebp+arg_8]
cmp	ecx, [edx+10h]
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
push	ebx
fst	[esp+78h+var_58]
push	esi
fld	ds:dbl_15FD8F0
mov	esi, [ebp+arg_0]
fdiv	st, st(1)
mov	[esp+7Ch+var_68], eax
mov	eax, [esi]
setnz	[esp+7Ch+var_6D]
xor	bl, bl
push	edi
mov	[esp+80h+var_64], edx
mov	[esp+80h+var_6E], 0
lea	edi, [esp+80h+var_48]
fstp	[esp+80h+var_50]
cmp	eax, [ecx]
jz	loc_780F5B

loc_780EA4:
cmp	[esp+80h+var_6D], 0
mov	eax, [esi]
mov	al, [eax]
jz	short loc_780EBE
cmp	al, [ebp+arg_18]
jnz	short loc_780EBE
mov	[edi], bl
inc	edi
xor	bl, bl
jmp	loc_780F4C

loc_780EBE:
movsx	eax, al
cmp	eax, 7Fh
jbe	short loc_780ECD
mov	eax, 0FFh
jmp	short loc_780EEB

loc_780ECD:
fstp	st(1)
push	eax
fstp	st
call	sub_792800
fld	[esp+84h+var_58]
mov	edx, [esp+84h+var_64]
fld	[esp+84h+var_60]
add	esp, 4
movzx	eax, al
fxch	st(1)

loc_780EEB:
cmp	eax, [ebp+arg_8]
mov	[esp+80h+var_6C], eax
jge	short loc_780F5B
fld	[esp+80h+var_50]
inc	[ebp+arg_10]
fcomp	st(2)
inc	bl
fnstsw	ax
test	ah, 5
jp	short loc_780F0D
mov	[esp+80h+var_6E], 1
jmp	short loc_780F4C

loc_780F0D:
fld	st
fmul	st, st(2)
fiadd	[esp+80h+var_6C]
fldz
fucomp	st(3)
fnstsw	ax
test	ah, 44h
jnp	short loc_780F42
cmp	[esp+80h+var_6E], 0
jnz	short loc_780F39
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnp	short loc_780F3B
mov	[esp+80h+var_6E], 0
jmp	short loc_780F44

loc_780F39:
fstp	st(2)

loc_780F3B:
mov	[esp+80h+var_6E], 1
jmp	short loc_780F44

loc_780F42:
fstp	st(2)

loc_780F44:
fxch	st(1)
fst	[esp+80h+var_60]
fxch	st(1)

loc_780F4C:
inc	dword ptr [esi]
mov	ecx, [esi]
mov	eax, [ebp+arg_4]
cmp	ecx, [eax]
jnz	loc_780EA4

loc_780F5B:
mov	cl, [esp+80h+var_6D]
fstp	st
test	cl, cl
jz	short loc_780F70
lea	eax, [esp+80h+var_48]
cmp	edi, eax
jz	short loc_780F70
mov	[edi], bl
inc	edi

loc_780F70:
cmp	[ebp+arg_10], 0
jle	short loc_780FCF
mov	al, [esp+80h+var_6E]
test	al, al
jz	short loc_780F88
fstp	st
fld	ds:dbl_15FD8F0
jmp	short loc_780F90

loc_780F88:
cmp	[ebp+arg_14], 0
jz	short loc_780F90
fchs

loc_780F90:
mov	esi, [esp+80h+var_68]
fstp	qword ptr [esi]
test	al, al
jnz	short loc_780FD1
test	cl, cl
jz	short loc_780FB8
mov	eax, [edx+10h]
mov	ecx, [edx+14h]
push	eax
push	ecx
lea	ecx, [esp+88h+var_48]
push	edi
push	ecx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_780FD1

loc_780FB8:
mov	eax, 1
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+74h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_780FCF:
fstp	st

loc_780FD1:
mov	ecx, [esp+80h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_780E40 endp

align 10h



sub_780FF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	edi
mov	edi, [esp+4+arg_C]
test	edi, edi
jbe	short loc_781042
mov	al, byte ptr [esp+4+arg_8]
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_10]

loc_781003:
test	al, al
jz	short loc_781035
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx+14h]
mov	bl, [esi]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_781021
mov	[edx], bl
inc	dword ptr [eax]
movzx	eax, byte ptr [edx]
jmp	short loc_78102C

loc_781021:
mov	eax, [ecx]
mov	eax, [eax+30h]
movzx	edx, bl
push	edx
call	eax

loc_78102C:
cmp	eax, 0FFFFFFFFh
jz	short loc_781035
mov	al, 1
jmp	short loc_781037

loc_781035:
xor	al, al

loc_781037:
sub	edi, 1
mov	byte ptr [esp+0Ch+arg_8], al
jnz	short loc_781003
pop	esi
pop	ebx

loc_781042:
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
mov	[eax], ecx
mov	[eax+4], edx
pop	edi
retn
sub_780FF0 endp

align 10h


; Attributes: bp-based frame

sub_781060 proc	near

var_6E=	byte ptr -6Eh
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	qword ptr -60h
var_58=	qword ptr -58h
var_50=	qword ptr -50h
var_48=	byte ptr -48h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch
arg_18=	word ptr  20h
arg_1C=	dword ptr  24h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 74h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+74h+var_4], eax
fldz
mov	edx, [ebp+arg_1C]
fst	[esp+74h+var_60]
mov	ecx, [edx+14h]
fild	[ebp+arg_8]
cmp	ecx, [edx+10h]
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
push	ebx
fst	[esp+78h+var_58]
push	esi
fld	ds:dbl_15FD8F0
mov	esi, [ebp+arg_0]
fdiv	st, st(1)
mov	[esp+7Ch+var_68], eax
mov	eax, [esi]
setnz	[esp+7Ch+var_6D]
xor	bl, bl
push	edi
mov	[esp+80h+var_64], edx
mov	[esp+80h+var_6E], 0
lea	edi, [esp+80h+var_48]
fstp	[esp+80h+var_50]
cmp	eax, [ecx]
jz	loc_78117E

loc_7810C4:
cmp	[esp+80h+var_6D], 0
mov	eax, [esi]
movzx	eax, word ptr [eax]
jz	short loc_7810E0
cmp	ax, [ebp+arg_18]
jnz	short loc_7810E0
mov	[edi], bl
inc	edi
xor	bl, bl
jmp	loc_78116E

loc_7810E0:
movzx	eax, ax
cmp	eax, 7Fh
jbe	short loc_7810EF
mov	eax, 0FFh
jmp	short loc_78110D

loc_7810EF:
fstp	st(1)
push	eax
fstp	st
call	sub_792800
fld	[esp+84h+var_58]
mov	edx, [esp+84h+var_64]
fld	[esp+84h+var_60]
add	esp, 4
movzx	eax, al
fxch	st(1)

loc_78110D:
cmp	eax, [ebp+arg_8]
mov	[esp+80h+var_6C], eax
jge	short loc_78117E
fld	[esp+80h+var_50]
inc	[ebp+arg_10]
fcomp	st(2)
inc	bl
fnstsw	ax
test	ah, 5
jp	short loc_78112F
mov	[esp+80h+var_6E], 1
jmp	short loc_78116E

loc_78112F:
fld	st
fmul	st, st(2)
fiadd	[esp+80h+var_6C]
fldz
fucomp	st(3)
fnstsw	ax
test	ah, 44h
jnp	short loc_781164
cmp	[esp+80h+var_6E], 0
jnz	short loc_78115B
fcom	st(2)
fnstsw	ax
fstp	st(2)
test	ah, 41h
jnp	short loc_78115D
mov	[esp+80h+var_6E], 0
jmp	short loc_781166

loc_78115B:
fstp	st(2)

loc_78115D:
mov	[esp+80h+var_6E], 1
jmp	short loc_781166

loc_781164:
fstp	st(2)

loc_781166:
fxch	st(1)
fst	[esp+80h+var_60]
fxch	st(1)

loc_78116E:
add	dword ptr [esi], 2
mov	ecx, [esi]
mov	eax, [ebp+arg_4]
cmp	ecx, [eax]
jnz	loc_7810C4

loc_78117E:
mov	cl, [esp+80h+var_6D]
fstp	st
test	cl, cl
jz	short loc_781193
lea	eax, [esp+80h+var_48]
cmp	edi, eax
jz	short loc_781193
mov	[edi], bl
inc	edi

loc_781193:
cmp	[ebp+arg_10], 0
jle	short loc_7811F2
mov	al, [esp+80h+var_6E]
test	al, al
jz	short loc_7811AB
fstp	st
fld	ds:dbl_15FD8F0
jmp	short loc_7811B3

loc_7811AB:
cmp	[ebp+arg_14], 0
jz	short loc_7811B3
fchs

loc_7811B3:
mov	esi, [esp+80h+var_68]
fstp	qword ptr [esi]
test	al, al
jnz	short loc_7811F4
test	cl, cl
jz	short loc_7811DB
mov	eax, [edx+10h]
mov	ecx, [edx+14h]
push	eax
push	ecx
lea	ecx, [esp+88h+var_48]
push	edi
push	ecx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_7811F4

loc_7811DB:
mov	eax, 1
pop	edi
pop	esi
pop	ebx
mov	ecx, [esp+74h+var_4]
xor	ecx, esp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn

loc_7811F2:
fstp	st

loc_7811F4:
mov	ecx, [esp+80h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_781060 endp

align 10h



sub_781210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	esi
mov	esi, [esp+4+arg_C]
test	esi, esi
jle	short loc_781262
mov	al, byte ptr [esp+4+arg_8]
push	ebx
push	edi
mov	edi, [esp+0Ch+arg_10]

loc_781223:
test	al, al
jz	short loc_781255
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx+14h]
mov	bl, [edi]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_781241
mov	[edx], bl
inc	dword ptr [eax]
movzx	eax, byte ptr [edx]
jmp	short loc_78124C

loc_781241:
mov	eax, [ecx]
mov	eax, [eax+30h]
movzx	edx, bl
push	edx
call	eax

loc_78124C:
cmp	eax, 0FFFFFFFFh
jz	short loc_781255
mov	al, 1
jmp	short loc_781257

loc_781255:
xor	al, al

loc_781257:
dec	esi
mov	byte ptr [esp+0Ch+arg_8], al
test	esi, esi
jg	short loc_781223
pop	edi
pop	ebx

loc_781262:
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
mov	[eax], ecx
mov	[eax+4], edx
pop	esi
retn
sub_781210 endp

align 10h



sub_781280 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	esi
mov	esi, [esp+4+arg_8]
push	edi
mov	edi, [esp+8+arg_4]
sub	esi, edi
test	esi, esi
jle	short loc_7812D4
mov	al, byte ptr [esp+8+arg_10]
push	ebx

loc_781295:
test	al, al
jz	short loc_7812C7
mov	ecx, [esp+0Ch+arg_C]
mov	edx, [ecx+14h]
mov	bl, [edi]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_7812B3
mov	[edx], bl
inc	dword ptr [eax]
movzx	eax, byte ptr [edx]
jmp	short loc_7812BE

loc_7812B3:
mov	eax, [ecx]
mov	eax, [eax+30h]
movzx	edx, bl
push	edx
call	eax

loc_7812BE:
cmp	eax, 0FFFFFFFFh
jz	short loc_7812C7
mov	al, 1
jmp	short loc_7812C9

loc_7812C7:
xor	al, al

loc_7812C9:
dec	esi
inc	edi
mov	byte ptr [esp+0Ch+arg_10], al
test	esi, esi
jg	short loc_781295
pop	ebx

loc_7812D4:
mov	eax, [esp+8+arg_0]
mov	ecx, [esp+8+arg_C]
mov	edx, [esp+8+arg_10]
pop	edi
mov	[eax], ecx
mov	[eax+4], edx
pop	esi
retn
sub_781280 endp

align 10h



sub_7812F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+4], 0
jz	short loc_78133B
mov	ecx, [esi]
mov	eax, [ecx+14h]
cmp	eax, [ecx+18h]
jnb	short loc_781314
mov	dx, word ptr [esp+4+arg_0]
mov	[eax], dx
add	dword ptr [ecx+14h], 2
movzx	eax, word ptr [eax]
jmp	short loc_781323

loc_781314:
mov	eax, [ecx]
mov	edx, [esp+4+arg_0]
mov	eax, [eax+30h]
push	edx
call	eax
movzx	eax, ax

loc_781323:
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_78133B
mov	eax, 1
mov	[esi+4], al
mov	eax, esi
pop	esi
retn	4

loc_78133B:
xor	eax, eax
mov	[esi+4], al
mov	eax, esi
pop	esi
retn	4
sub_7812F0 endp

align 10h



sub_781350 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+6], 0
jnz	short loc_78137F
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781368
movzx	eax, byte ptr [eax]
jmp	short loc_78136F

loc_781368:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_78136F:
cmp	eax, 0FFFFFFFFh
mov	[esi+4], al
setz	al
mov	[esi+5], al
mov	byte ptr [esi+6], 1

loc_78137F:
mov	al, [esi+4]
pop	esi
retn
sub_781350 endp

align 10h



sub_781390 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7813C4
cmp	byte ptr [edi+6], 0
jnz	short loc_7813C4
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7813AD
movzx	eax, byte ptr [eax]
jmp	short loc_7813B4

loc_7813AD:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_7813B4:
cmp	eax, 0FFFFFFFFh
mov	[edi+4], al
setz	al
mov	[edi+5], al
mov	byte ptr [edi+6], 1

loc_7813C4:
mov	esi, [esp+8+arg_0]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7813F8
cmp	byte ptr [esi+6], 0
jnz	short loc_7813F8
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7813E1
movzx	eax, byte ptr [eax]
jmp	short loc_7813E8

loc_7813E1:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_7813E8:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_7813F8:
mov	dl, [edi+5]
xor	eax, eax
cmp	dl, [esi+5]
pop	edi
setz	al
pop	esi
retn	4
sub_781390 endp

align 10h



sub_781410 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+7], 0
jnz	short loc_78144D
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781428
movzx	eax, word ptr [eax]
jmp	short loc_781432

loc_781428:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax

loc_781432:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1
pop	esi
retn

loc_78144D:
mov	ax, [esi+4]
pop	esi
retn
sub_781410 endp

align 10h



sub_781460 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7814A0
cmp	byte ptr [edi+7], 0
jnz	short loc_7814A0
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78147D
movzx	eax, word ptr [eax]
jmp	short loc_781487

loc_78147D:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax

loc_781487:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[edi+4], ax
mov	[edi+6], dl
mov	byte ptr [edi+7], 1

loc_7814A0:
mov	esi, [esp+8+arg_0]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7814E0
cmp	byte ptr [esi+7], 0
jnz	short loc_7814E0
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7814BD
movzx	eax, word ptr [eax]
jmp	short loc_7814C7

loc_7814BD:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax

loc_7814C7:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_7814E0:
mov	al, [edi+6]
xor	ecx, ecx
cmp	al, [esi+6]
pop	edi
setz	cl
mov	al, cl
pop	esi
retn	4
sub_781460 endp

align 10h



sub_781500 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	eax
call	sub_781390
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_781500 endp

align 10h



sub_781520 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	eax
call	sub_781460
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn
sub_781520 endp

align 10h



sub_781540 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	edi
mov	edi, [esp+4+arg_10]
test	edi, edi
jl	short loc_7815B4
push	ebx
mov	ebx, [esp+8+arg_C]
jg	short loc_781554
test	ebx, ebx
jbe	short loc_7815B3

loc_781554:
mov	al, byte ptr [esp+8+arg_8]
push	ebp
mov	ebp, [esp+0Ch+arg_14]
push	esi
mov	edi, edi

loc_781560:
test	al, al
jz	short loc_78159B
mov	ecx, [esp+10h+arg_4]
mov	edx, [ecx+14h]
movzx	esi, word ptr [ebp+0]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_781582
mov	[edx], si
add	dword ptr [eax], 2
movzx	eax, word ptr [edx]
jmp	short loc_78158D

loc_781582:
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
movzx	eax, ax

loc_78158D:
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_78159B
mov	al, 1
jmp	short loc_78159D

loc_78159B:
xor	al, al

loc_78159D:
add	ebx, 0FFFFFFFFh
adc	edi, 0FFFFFFFFh
mov	byte ptr [esp+10h+arg_8], al
test	edi, edi
jg	short loc_781560
jl	short loc_7815B1
test	ebx, ebx
ja	short loc_781560

loc_7815B1:
pop	esi
pop	ebp

loc_7815B3:
pop	ebx

loc_7815B4:
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_4]
mov	ecx, [esp+4+arg_8]
mov	[eax], edx
mov	[eax+4], ecx
pop	edi
retn
sub_781540 endp

align 10h



sub_7815D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
push	edi
lea	eax, [esp+8+arg_C]
push	eax
lea	ecx, [esp+0Ch+arg_4]
call	sub_781390
mov	edi, [esp+8+arg_18]
mov	esi, [esp+8+arg_14]
test	al, al
jnz	short loc_78165F
lea	esp, [esp+0]

loc_7815F0:
cmp	esi, edi
jz	short loc_78165F
cmp	byte ptr [esp+8+arg_8+2], 0
mov	ecx, [esp+8+arg_4]
jnz	short loc_78162A
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78160C
movzx	eax, byte ptr [eax]
jmp	short loc_781617

loc_78160C:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
mov	ecx, [esp+8+arg_4]

loc_781617:
cmp	eax, 0FFFFFFFFh
setz	dl
mov	byte ptr [esp+8+arg_8],	al
mov	byte ptr [esp+8+arg_8+1], dl
mov	byte ptr [esp+8+arg_8+2], 1

loc_78162A:
mov	al, byte ptr [esp+8+arg_8]
cmp	al, [esi]
jnz	short loc_781663
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781640
inc	eax
mov	[ecx+8], eax
jmp	short loc_781647

loc_781640:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_781647:
lea	ecx, [esp+8+arg_C]
push	ecx
lea	ecx, [esp+0Ch+arg_4]
mov	byte ptr [esp+0Ch+arg_8+2], 0
inc	esi
call	sub_781390
test	al, al
jz	short loc_7815F0

loc_78165F:
mov	ecx, [esp+8+arg_4]

loc_781663:
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_8]
cmp	esi, edi
mov	[eax], ecx
setz	cl
pop	edi
mov	[eax+4], edx
mov	[eax+8], cl
pop	esi
retn
sub_7815D0 endp

align 10h



sub_781680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	esi
push	edi
lea	eax, [esp+8+arg_C]
push	eax
lea	ecx, [esp+0Ch+arg_4]
call	sub_781460
mov	edi, [esp+8+arg_18]
mov	esi, [esp+8+arg_14]
test	al, al
jnz	loc_781729

loc_7816A0:
cmp	esi, edi
jz	loc_781729
cmp	byte ptr [esp+8+arg_8+3], 0
mov	ecx, [esp+8+arg_4]
jnz	short loc_7816EA
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7816C0
movzx	eax, word ptr [eax]
jmp	short loc_7816CE

loc_7816C0:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
mov	ecx, [esp+8+arg_4]
movzx	eax, ax

loc_7816CE:
movzx	eax, ax
mov	edx, 0FFFFh
cmp	ax, dx
mov	word ptr [esp+8+arg_8],	ax
setz	al
mov	byte ptr [esp+8+arg_8+2], al
mov	byte ptr [esp+8+arg_8+3], 1

loc_7816EA:
mov	dx, word ptr [esp+8+arg_8]
cmp	dx, [esi]
jnz	short loc_78172D
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781704
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_78170B

loc_781704:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_78170B:
lea	eax, [esp+8+arg_C]
push	eax
lea	ecx, [esp+0Ch+arg_4]
mov	byte ptr [esp+0Ch+arg_8+3], 0
add	esi, 2
call	sub_781460
test	al, al
jz	loc_7816A0

loc_781729:
mov	ecx, [esp+8+arg_4]

loc_78172D:
mov	eax, [esp+8+arg_0]
cmp	esi, edi
mov	[eax], ecx
mov	ecx, [esp+8+arg_8]
setz	dl
pop	edi
mov	[eax+4], ecx
mov	[eax+8], dl
pop	esi
retn
sub_781680 endp

align 10h



sub_781750 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_C]
test	ebx, ebx
jbe	short loc_7817AA
mov	al, byte ptr [esp+4+arg_8]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_10]

loc_781763:
test	al, al
jz	short loc_78179D
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx+14h]
movzx	esi, word ptr [edi]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_781784
mov	[edx], si
add	dword ptr [eax], 2
movzx	eax, word ptr [edx]
jmp	short loc_78178F

loc_781784:
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
movzx	eax, ax

loc_78178F:
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_78179D
mov	al, 1
jmp	short loc_78179F

loc_78179D:
xor	al, al

loc_78179F:
sub	ebx, 1
mov	byte ptr [esp+0Ch+arg_8], al
jnz	short loc_781763
pop	edi
pop	esi

loc_7817AA:
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_4]
mov	ecx, [esp+4+arg_8]
mov	[eax], edx
mov	[eax+4], ecx
pop	ebx
retn
sub_781750 endp

align 10h



sub_7817C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [ecx+10h]
sub	edx, [ecx+118h]
mov	eax, [esp+4+arg_0]
mov	ecx, 0FFFFFFFEh
sub	ecx, edx
mov	[esp+4+var_4], edx
cmp	eax, ecx
jbe	short loc_7817E6
push	offset aBasic_string ; "basic_string"
call	sub_77EC70

loc_7817E6:
cmp	eax, edx
lea	eax, [esp+4+var_4]
jb	short loc_7817F1
lea	eax, [esp+4+arg_0]

loc_7817F1:
mov	eax, [eax]
lea	eax, [eax+edx+1]
cmp	eax, 0FFFFFFFEh
ja	short loc_781800
cmp	eax, edx
jnb	short loc_781805

loc_781800:
mov	eax, 0FFFFFFFEh

loc_781805:
pop	ecx
retn	4
sub_7817C0 endp

align 10h



sub_781810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_C]
test	ebx, ebx
jle	short loc_78186A
mov	al, byte ptr [esp+4+arg_8]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_10]

loc_781823:
test	al, al
jz	short loc_78185D
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx+14h]
movzx	esi, word ptr [edi]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_781844
mov	[edx], si
add	dword ptr [eax], 2
movzx	eax, word ptr [edx]
jmp	short loc_78184F

loc_781844:
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
movzx	eax, ax

loc_78184F:
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_78185D
mov	al, 1
jmp	short loc_78185F

loc_78185D:
xor	al, al

loc_78185F:
dec	ebx
mov	byte ptr [esp+0Ch+arg_8], al
test	ebx, ebx
jg	short loc_781823
pop	edi
pop	esi

loc_78186A:
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_4]
mov	ecx, [esp+4+arg_8]
mov	[eax], edx
mov	[eax+4], ecx
pop	ebx
retn
sub_781810 endp

align 10h



sub_781880 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_8]
sub	edi, ebx
sar	edi, 1
test	edi, edi
jle	short loc_7818E0
mov	al, byte ptr [esp+8+arg_10]
push	esi

loc_781897:
test	al, al
jz	short loc_7818D1
mov	ecx, [esp+0Ch+arg_C]
mov	edx, [ecx+14h]
movzx	esi, word ptr [ebx]
lea	eax, [ecx+14h]
cmp	edx, [ecx+18h]
jnb	short loc_7818B8
mov	[edx], si
add	dword ptr [eax], 2
movzx	eax, word ptr [edx]
jmp	short loc_7818C3

loc_7818B8:
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
movzx	eax, ax

loc_7818C3:
mov	ecx, 0FFFFh
cmp	ax, cx
jz	short loc_7818D1
mov	al, 1
jmp	short loc_7818D3

loc_7818D1:
xor	al, al

loc_7818D3:
dec	edi
add	ebx, 2
mov	byte ptr [esp+0Ch+arg_10], al
test	edi, edi
jg	short loc_781897
pop	esi

loc_7818E0:
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_C]
mov	ecx, [esp+8+arg_10]
pop	edi
mov	[eax], edx
mov	[eax+4], ecx
pop	ebx
retn
sub_781880 endp

align 10h



sub_781900 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [ecx+20h]
sub	edx, [ecx+228h]
mov	eax, [esp+4+arg_0]
sar	edx, 1
mov	ecx, 7FFFFFFEh
sub	ecx, edx
mov	[esp+4+var_4], edx
cmp	eax, ecx
jbe	short loc_781928
push	offset aBasic_string ; "basic_string"
call	sub_77EC70

loc_781928:
cmp	eax, edx
lea	eax, [esp+4+var_4]
jb	short loc_781933
lea	eax, [esp+4+arg_0]

loc_781933:
mov	eax, [eax]
lea	eax, [eax+edx+1]
cmp	eax, 7FFFFFFEh
ja	short loc_781944
cmp	eax, edx
jnb	short loc_781949

loc_781944:
mov	eax, 7FFFFFFEh

loc_781949:
pop	ecx
retn	4
sub_781900 endp

align 10h



sub_781950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx]
mov	edx, [eax+10h]
push	esi
mov	esi, [esp+8+arg_0]
push	esi
mov	[esp+0Ch+var_4], 0
call	edx
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_781950 endp

align 10h



sub_781970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	esi
mov	esi, [esp+8+arg_0]
push	esi
mov	[esp+0Ch+var_4], 0
call	edx
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_781970 endp

align 10h



sub_781990 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx]
mov	edx, [eax+14h]
push	esi
mov	esi, [esp+8+arg_0]
push	esi
mov	[esp+0Ch+var_4], 0
call	edx
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_781990 endp

align 10h



sub_7819B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx]
mov	edx, [eax+18h]
push	esi
mov	esi, [esp+8+arg_0]
push	esi
mov	[esp+0Ch+var_4], 0
call	edx
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_7819B0 endp

align 10h



sub_7819D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C9809
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	ecx, [esi+74h]
lea	eax, [esi+60h]
mov	[esp+18h+var_4], 3
cmp	ecx, eax
jz	short loc_781A32
test	ecx, ecx
jz	short loc_781A32
mov	eax, [eax]
sub	eax, ecx
test	ecx, ecx
jz	short loc_781A32
cmp	eax, 80h
jbe	short loc_781A28
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_781A32

loc_781A28:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_781A32:
mov	ecx, [esi+5Ch]
lea	eax, [esi+48h]
mov	byte ptr [esp+18h+var_4], 2
cmp	ecx, eax
jz	short loc_781A69
test	ecx, ecx
jz	short loc_781A69
mov	eax, [eax]
sub	eax, ecx
test	ecx, ecx
jz	short loc_781A69
cmp	eax, 80h
jbe	short loc_781A5F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_781A69

loc_781A5F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_781A69:
mov	ecx, [esi+44h]
lea	eax, [esi+30h]
mov	byte ptr [esp+18h+var_4], 1
cmp	ecx, eax
jz	short loc_781AA0
test	ecx, ecx
jz	short loc_781AA0
mov	eax, [eax]
sub	eax, ecx
test	ecx, ecx
jz	short loc_781AA0
cmp	eax, 80h
jbe	short loc_781A96
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_781AA0

loc_781A96:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_781AA0:
mov	ecx, [esi+2Ch]
lea	eax, [esi+18h]
mov	byte ptr [esp+18h+var_4], 0
cmp	ecx, eax
jz	short loc_781AD7
test	ecx, ecx
jz	short loc_781AD7
mov	eax, [eax]
sub	eax, ecx
test	ecx, ecx
jz	short loc_781AD7
cmp	eax, 80h
jbe	short loc_781ACD
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_781AD7

loc_781ACD:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_781AD7:
mov	eax, [esi+14h]
mov	[esp+18h+var_4], 0FFFFFFFFh
cmp	eax, esi
jz	short loc_781B1F
test	eax, eax
jz	short loc_781B1F
mov	ecx, eax
mov	eax, [esi]
sub	eax, ecx
test	ecx, ecx
jz	short loc_781B1F
cmp	eax, 80h
jbe	short loc_781B15
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn

loc_781B15:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_781B1F:
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_7819D0 endp




sub_781B30 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
push	ebx
mov	ebx, [esp+14h+arg_C]
push	ebp
mov	ebp, [esp+18h+arg_4]
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
call	sub_792810
mov	edi, eax
add	edi, 5
call	sub_792810
mov	edx, [ebx]
mov	edx, [edx+14h]
lea	ecx, [esp+20h+var_C]
push	ecx
push	edi
push	eax
mov	ecx, ebx
call	edx
xor	ebx, ebx
mov	byte ptr [esp+20h+var_10+3], bl
cmp	[esi+6], bl
jnz	short loc_781B9E
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781B87
movzx	eax, byte ptr [eax]
jmp	short loc_781B8E

loc_781B87:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_781B8E:
cmp	eax, 0FFFFFFFFh
mov	[esi+4], al
setz	al
mov	[esi+5], al
mov	byte ptr [esi+6], 1

loc_781B9E:
mov	al, [esi+4]
cmp	al, [esp+20h+var_B]
jnz	short loc_781BAE
mov	byte ptr [esp+20h+var_10+3], 1
jmp	short loc_781BB4

loc_781BAE:
cmp	al, [esp+20h+var_C]
jnz	short loc_781BCE

loc_781BB4:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781BC4
inc	eax
mov	[ecx+8], eax
jmp	short loc_781BCB

loc_781BC4:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_781BCB:
mov	[esi+6], bl

loc_781BCE:
mov	eax, [esp+20h+arg_8]
and	eax, 38h
cmp	eax, 8
jz	loc_781CAD
cmp	eax, 10h
jz	short loc_781C59
cmp	eax, 20h
jz	short loc_781C52
push	ebp
mov	ecx, esi
call	sub_781390
test	al, al
jnz	loc_781CAD
mov	ecx, esi
call	sub_781350
cmp	al, [esp+20h+var_A]
jnz	loc_781CAD
mov	ecx, esi
call	sub_7808B0
push	ebp
push	esi
call	sub_781500
add	esp, 8
test	al, al
jz	short loc_781C46
mov	ecx, esi
call	sub_781350
cmp	al, [esp+20h+var_9]
jz	short loc_781C38
mov	ecx, esi
call	sub_781350
cmp	al, [esp+20h+var_8]
jnz	short loc_781C46

loc_781C38:
mov	ecx, esi
call	sub_7808B0
mov	edi, 10h
jmp	short loc_781CB2

loc_781C46:
mov	edi, 8

loc_781C4B:
mov	ebx, 1
jmp	short loc_781CB2

loc_781C52:
mov	edi, 8
jmp	short loc_781CB2

loc_781C59:
push	ebp
mov	ecx, esi
mov	edi, 10h
call	sub_781390
test	al, al
jnz	short loc_781CB2
mov	ecx, esi
call	sub_781350
cmp	al, [esp+20h+var_A]
jnz	short loc_781CB2
mov	ecx, esi
call	sub_7808B0
push	ebp
mov	ecx, esi
call	sub_781390
test	al, al
jnz	short loc_781C4B
mov	ecx, esi
call	sub_781350
cmp	al, [esp+20h+var_9]
jz	short loc_781CA4
mov	ecx, esi
call	sub_781350
cmp	al, [esp+20h+var_8]
jnz	short loc_781C4B

loc_781CA4:
mov	ecx, esi
call	sub_7808B0
jmp	short loc_781CB2

loc_781CAD:
mov	edi, 0Ah

loc_781CB2:
movzx	ecx, byte ptr [esp+20h+var_10+3]
lea	eax, [edi+edi]
or	eax, ecx
mov	ecx, [esp+20h+var_4]
pop	edi
pop	esi
add	eax, eax
or	eax, ebx
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn
sub_781B30 endp

align 10h



sub_781CE0 proc	near

var_6B=	word ptr -6Bh
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	qword ptr -5Ch
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+6Ch+var_4], eax
mov	eax, [esp+6Ch+arg_4]
mov	ecx, [esp+6Ch+arg_C]
push	ebx
push	ebp
mov	[esp+74h+var_60], eax
mov	eax, [esp+74h+arg_1C]
mov	edx, [eax+14h]
mov	[esp+74h+var_48], eax
xor	ebx, ebx
push	esi
xor	ebp, ebp
cmp	edx, [eax+10h]
lea	eax, [esp+78h+var_44]
mov	[esp+78h+var_68], eax
mov	eax, [esp+78h+arg_8]
push	edi
mov	edi, [esp+7Ch+arg_0]
cdq
push	edx
mov	esi, eax
push	esi
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	[esp+8Ch+var_54], ecx
mov	byte ptr [esp+8Ch+var_6B+1], 0
setnz	[esp+8Ch+var_69]
mov	byte ptr [esp+8Ch+var_6B], bl
mov	dword ptr [esp+8Ch+var_50], esi
mov	dword ptr [esp+8Ch+var_50+4], edx
call	__aulldiv
mov	ecx, [esp+7Ch+var_60]
push	ecx
mov	ecx, edi
mov	dword ptr [esp+80h+var_5C], eax
mov	dword ptr [esp+80h+var_5C+4], edx
call	sub_781390
test	al, al
jnz	loc_781E8F
lea	ecx, [ecx+0]

loc_781D70:
cmp	byte ptr [edi+6], 0
jnz	short loc_781D9C
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781D85
movzx	eax, byte ptr [eax]
jmp	short loc_781D8C

loc_781D85:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_781D8C:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[edi+4], al
mov	[edi+5], cl
mov	byte ptr [edi+6], 1

loc_781D9C:
cmp	[esp+7Ch+var_69], 0
mov	al, [edi+4]
jz	short loc_781DC8
cmp	al, [esp+7Ch+arg_18]
jnz	short loc_781DC8
mov	eax, [esp+7Ch+var_68]
mov	dl, byte ptr [esp+7Ch+var_6B]
mov	[eax], dl
inc	eax
mov	[esp+7Ch+var_68], eax
mov	byte ptr [esp+7Ch+var_6B], 0
jmp	loc_781E60

loc_781DC8:
movsx	eax, al
cmp	eax, 7Fh
jbe	short loc_781DDA
mov	[esp+7Ch+var_64], 0FFh
jmp	short loc_781DEA

loc_781DDA:
push	eax
call	sub_792800
movzx	eax, al
add	esp, 4
mov	[esp+7Ch+var_64], eax

loc_781DEA:
mov	ecx, [esp+7Ch+var_64]
cmp	ecx, [esp+7Ch+arg_8]
jge	loc_781E8F
inc	[esp+7Ch+arg_10]
inc	byte ptr [esp+7Ch+var_6B]
cmp	ebp, dword ptr [esp+7Ch+var_5C+4]
jb	short loc_781E1B
ja	short loc_781E14
cmp	ebx, dword ptr [esp+7Ch+var_5C]
jbe	short loc_781E1B

loc_781E14:
mov	byte ptr [esp+7Ch+var_6B+1], 1
jmp	short loc_781E60

loc_781E1B:
mov	edx, dword ptr [esp+7Ch+var_50+4]
push	ebp
push	ebx
push	edx
push	esi
call	__allmul
mov	ecx, eax
mov	eax, [esp+7Ch+var_64]
mov	esi, edx
cdq
add	ecx, eax
mov	eax, ebx
adc	esi, edx
or	eax, ebp
jz	short loc_781E58
cmp	byte ptr [esp+7Ch+var_6B+1], 0
jnz	short loc_781E53
cmp	esi, ebp
jb	short loc_781E53
ja	short loc_781E4C
cmp	ecx, ebx
jbe	short loc_781E53

loc_781E4C:
mov	byte ptr [esp+7Ch+var_6B+1], 0
jmp	short loc_781E58

loc_781E53:
mov	byte ptr [esp+7Ch+var_6B+1], 1

loc_781E58:
mov	ebp, esi
mov	esi, dword ptr [esp+7Ch+var_50]
mov	ebx, ecx

loc_781E60:
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781E70
inc	eax
mov	[ecx+8], eax
jmp	short loc_781E77

loc_781E70:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_781E77:
mov	ecx, [esp+7Ch+var_60]
push	ecx
mov	ecx, edi
mov	byte ptr [edi+6], 0
call	sub_781390
test	al, al
jz	loc_781D70

loc_781E8F:
cmp	[esp+7Ch+var_69], 0
mov	edx, [esp+7Ch+var_68]
jz	short loc_781EA9
lea	eax, [esp+7Ch+var_44]
cmp	edx, eax
jz	short loc_781EA9
mov	cl, byte ptr [esp+7Ch+var_6B]
mov	[edx], cl
inc	edx

loc_781EA9:
cmp	[esp+7Ch+arg_10], 0
jle	short loc_781F1D
mov	cl, byte ptr [esp+7Ch+var_6B+1]
test	cl, cl
jz	short loc_781EC3
or	ebx, 0FFFFFFFFh
or	ebp, 0FFFFFFFFh
jmp	short loc_781ED4

loc_781EC3:
cmp	[esp+7Ch+arg_14], 0
jz	short loc_781ED4
neg	ebx
adc	ebp, 0
neg	ebp

loc_781ED4:
mov	eax, [esp+7Ch+var_54]
mov	[eax], ebx
mov	[eax+4], ebp
test	cl, cl
jnz	short loc_781F1D
cmp	[esp+7Ch+var_69], cl
jz	short loc_781F05
mov	eax, [esp+7Ch+var_48]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
push	edx
lea	edx, [esp+88h+var_44]
push	edx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_781F1D

loc_781F05:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+6Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 6Ch
retn

loc_781F1D:
mov	ecx, [esp+7Ch+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 6Ch
retn
sub_781CE0 endp

align 10h



sub_781F40 proc	near

var_6B=	word ptr -6Bh
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	qword ptr -5Ch
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+6Ch+var_4], eax
mov	eax, [esp+6Ch+arg_4]
mov	ecx, [esp+6Ch+arg_C]
push	ebx
push	ebp
mov	[esp+74h+var_60], eax
mov	eax, [esp+74h+arg_1C]
mov	edx, [eax+14h]
mov	[esp+74h+var_48], eax
xor	ebx, ebx
xor	ebp, ebp
cmp	edx, [eax+10h]
push	esi
lea	eax, [esp+78h+var_44]
mov	[esp+78h+var_68], eax
mov	eax, [esp+78h+arg_8]
push	edi
mov	edi, [esp+7Ch+arg_0]
cdq
push	edx
mov	esi, eax
push	esi
push	80000000h
push	ebp
mov	[esp+8Ch+var_54], ecx
mov	byte ptr [esp+8Ch+var_6B+1], 0
setnz	[esp+8Ch+var_69]
mov	byte ptr [esp+8Ch+var_6B], bl
mov	dword ptr [esp+8Ch+var_50], esi
mov	dword ptr [esp+8Ch+var_50+4], edx
call	__alldiv
mov	ecx, [esp+7Ch+var_60]
push	ecx
mov	ecx, edi
mov	dword ptr [esp+80h+var_5C], eax
mov	dword ptr [esp+80h+var_5C+4], edx
call	sub_781390
test	al, al
jnz	loc_7820EF
nop

loc_781FD0:
cmp	byte ptr [edi+6], 0
jnz	short loc_781FFC
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_781FE5
movzx	eax, byte ptr [eax]
jmp	short loc_781FEC

loc_781FE5:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_781FEC:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[edi+4], al
mov	[edi+5], cl
mov	byte ptr [edi+6], 1

loc_781FFC:
cmp	[esp+7Ch+var_69], 0
mov	al, [edi+4]
jz	short loc_782028
cmp	al, [esp+7Ch+arg_18]
jnz	short loc_782028
mov	eax, [esp+7Ch+var_68]
mov	dl, byte ptr [esp+7Ch+var_6B]
mov	[eax], dl
inc	eax
mov	[esp+7Ch+var_68], eax
mov	byte ptr [esp+7Ch+var_6B], 0
jmp	loc_7820C0

loc_782028:
movsx	eax, al
cmp	eax, 7Fh
jbe	short loc_78203A
mov	[esp+7Ch+var_64], 0FFh
jmp	short loc_78204A

loc_78203A:
push	eax
call	sub_792800
movzx	eax, al
add	esp, 4
mov	[esp+7Ch+var_64], eax

loc_78204A:
mov	ecx, [esp+7Ch+var_64]
cmp	ecx, [esp+7Ch+arg_8]
jge	loc_7820EF
inc	[esp+7Ch+arg_10]
inc	byte ptr [esp+7Ch+var_6B]
cmp	ebp, dword ptr [esp+7Ch+var_5C+4]
jg	short loc_78207B
jl	short loc_782074
cmp	ebx, dword ptr [esp+7Ch+var_5C]
jnb	short loc_78207B

loc_782074:
mov	byte ptr [esp+7Ch+var_6B+1], 1
jmp	short loc_7820C0

loc_78207B:
mov	edx, dword ptr [esp+7Ch+var_50+4]
push	ebp
push	ebx
push	edx
push	esi
call	__allmul
mov	ecx, eax
mov	eax, [esp+7Ch+var_64]
mov	esi, edx
cdq
sub	ecx, eax
mov	eax, ebx
sbb	esi, edx
or	eax, ebp
jz	short loc_7820B8
cmp	byte ptr [esp+7Ch+var_6B+1], 0
jnz	short loc_7820B3
cmp	esi, ebp
jg	short loc_7820B3
jl	short loc_7820AC
cmp	ecx, ebx
jnb	short loc_7820B3

loc_7820AC:
mov	byte ptr [esp+7Ch+var_6B+1], 0
jmp	short loc_7820B8

loc_7820B3:
mov	byte ptr [esp+7Ch+var_6B+1], 1

loc_7820B8:
mov	ebp, esi
mov	esi, dword ptr [esp+7Ch+var_50]
mov	ebx, ecx

loc_7820C0:
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7820D0
inc	eax
mov	[ecx+8], eax
jmp	short loc_7820D7

loc_7820D0:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_7820D7:
mov	ecx, [esp+7Ch+var_60]
push	ecx
mov	ecx, edi
mov	byte ptr [edi+6], 0
call	sub_781390
test	al, al
jz	loc_781FD0

loc_7820EF:
cmp	[esp+7Ch+var_69], 0
mov	edx, [esp+7Ch+var_68]
jz	short loc_782109
lea	eax, [esp+7Ch+var_44]
cmp	edx, eax
jz	short loc_782109
mov	cl, byte ptr [esp+7Ch+var_6B]
mov	[edx], cl
inc	edx

loc_782109:
cmp	[esp+7Ch+arg_10], 0
jle	loc_782196
mov	cl, byte ptr [esp+7Ch+var_6B+1]
test	cl, cl
jz	short loc_78213C
cmp	[esp+7Ch+arg_14], 0
jz	short loc_782132
xor	ebx, ebx
mov	ebp, 80000000h
jmp	short loc_78214D

loc_782132:
or	ebx, 0FFFFFFFFh
mov	ebp, 7FFFFFFFh
jmp	short loc_78214D

loc_78213C:
cmp	[esp+7Ch+arg_14], 0
jnz	short loc_78214D
neg	ebx
adc	ebp, 0
neg	ebp

loc_78214D:
mov	eax, [esp+7Ch+var_54]
mov	[eax], ebx
mov	[eax+4], ebp
test	cl, cl
jnz	short loc_782196
cmp	[esp+7Ch+var_69], cl
jz	short loc_78217E
mov	eax, [esp+7Ch+var_48]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
push	edx
lea	edx, [esp+88h+var_44]
push	edx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_782196

loc_78217E:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+6Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 6Ch
retn

loc_782196:
mov	ecx, [esp+7Ch+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 6Ch
retn
sub_781F40 endp

align 10h



sub_7821B0 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+60h+arg_1C]
mov	edx, [ebp+14h]
push	esi
push	edi
mov	[esp+68h+var_50], eax
xor	edi, edi
cmp	edx, [ebp+10h]
lea	eax, [esp+68h+var_44]
setnz	[esp+68h+var_55]
mov	[esp+68h+var_54], eax
or	eax, 0FFFFFFFFh
xor	edx, edx
div	[esp+68h+arg_8]
mov	ecx, [esp+68h+arg_C]
mov	esi, [esp+68h+arg_0]
mov	[esp+68h+var_4C], ecx
mov	ecx, [esp+68h+var_50]
push	ecx
mov	ecx, esi
mov	[esp+6Ch+var_56], 0
xor	bl, bl
mov	[esp+6Ch+var_48], eax
call	sub_781390
test	al, al
jnz	loc_7822F5
lea	ebx, [ebx+0]

loc_782220:
cmp	byte ptr [esi+6], 0
jnz	short loc_78224C
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782235
movzx	eax, byte ptr [eax]
jmp	short loc_78223C

loc_782235:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_78223C:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_78224C:
cmp	[esp+68h+var_55], 0
mov	al, [esi+4]
jz	short loc_78226E
cmp	al, [esp+68h+arg_18]
jnz	short loc_78226E
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_7822C6

loc_78226E:
movsx	eax, al
cmp	eax, 7Fh
jbe	short loc_78227D
mov	ecx, 0FFh
jmp	short loc_782289

loc_78227D:
push	eax
call	sub_792800
add	esp, 4
movzx	ecx, al

loc_782289:
mov	edx, [esp+68h+arg_8]
cmp	ecx, edx
jge	short loc_7822F5
inc	[esp+68h+arg_10]
inc	bl
cmp	edi, [esp+68h+var_48]
jbe	short loc_7822A4
mov	[esp+68h+var_56], 1
jmp	short loc_7822C6

loc_7822A4:
mov	eax, edi
imul	eax, edx
add	eax, ecx
test	edi, edi
jz	short loc_7822C4
cmp	[esp+68h+var_56], 0
jnz	short loc_7822BF
mov	[esp+68h+var_56], 0
cmp	eax, edi
ja	short loc_7822C4

loc_7822BF:
mov	[esp+68h+var_56], 1

loc_7822C4:
mov	edi, eax

loc_7822C6:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7822D6
inc	eax
mov	[ecx+8], eax
jmp	short loc_7822DD

loc_7822D6:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_7822DD:
mov	ecx, [esp+68h+var_50]
push	ecx
mov	ecx, esi
mov	byte ptr [esi+6], 0
call	sub_781390
test	al, al
jz	loc_782220

loc_7822F5:
mov	dl, [esp+68h+var_55]
mov	esi, [esp+68h+var_54]
test	dl, dl
jz	short loc_78230C
lea	eax, [esp+68h+var_44]
cmp	esi, eax
jz	short loc_78230C
mov	[esi], bl
inc	esi

loc_78230C:
cmp	[esp+68h+arg_10], 0
jle	short loc_78236E
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_782320
or	eax, 0FFFFFFFFh
jmp	short loc_78232E

loc_782320:
cmp	[esp+68h+arg_14], 0
jz	short loc_78232C
neg	edi

loc_78232C:
mov	eax, edi

loc_78232E:
mov	edi, [esp+68h+var_4C]
mov	[edi], eax
test	cl, cl
jnz	short loc_78236E
test	dl, dl
jz	short loc_782356
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
lea	ecx, [esp+70h+var_44]
push	esi
push	ecx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_78236E

loc_782356:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_78236E:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_7821B0 endp

align 10h



sub_782390 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_4]
mov	ecx, [esp+58h+arg_C]
push	ebx
push	ebp
mov	ebp, [esp+60h+arg_1C]
mov	edx, [ebp+14h]
mov	[esp+60h+var_50], eax
push	esi
lea	eax, [esp+64h+var_44]
mov	[esp+64h+var_54], eax
push	edi
mov	[esp+68h+var_4C], ecx
movzx	ecx, word ptr [esp+68h+arg_8]
xor	edi, edi
cmp	edx, [ebp+10h]
mov	eax, 0FFFFh
cdq
setnz	[esp+68h+var_55]
idiv	ecx
mov	esi, [esp+68h+arg_0]
mov	ecx, esi
mov	[esp+68h+var_56], 0
xor	bl, bl
movzx	edx, ax
mov	eax, [esp+68h+var_50]
push	eax
mov	[esp+6Ch+var_48], edx
call	sub_781390
test	al, al
jnz	loc_7824DB

loc_782401:
cmp	byte ptr [esi+6], 0
jnz	short loc_78242D
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782416
movzx	eax, byte ptr [eax]
jmp	short loc_78241D

loc_782416:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_78241D:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_78242D:
cmp	[esp+68h+var_55], 0
mov	al, [esi+4]
jz	short loc_78244F
cmp	al, [esp+68h+arg_18]
jnz	short loc_78244F
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_7824AC

loc_78244F:
movsx	eax, al
cmp	eax, 7Fh
jbe	short loc_78245E
mov	eax, 0FFh
jmp	short loc_78246A

loc_78245E:
push	eax
call	sub_792800
add	esp, 4
movzx	eax, al

loc_78246A:
mov	ecx, [esp+68h+arg_8]
cmp	eax, ecx
jge	short loc_7824DB
inc	[esp+68h+arg_10]
inc	bl
cmp	di, word ptr [esp+68h+var_48]
jbe	short loc_782486
mov	[esp+68h+var_56], 1
jmp	short loc_7824AC

loc_782486:
imul	ecx, edi
add	ecx, eax
movzx	eax, cx
test	di, di
jz	short loc_7824A9
cmp	[esp+68h+var_56], 0
jnz	short loc_7824A4
mov	[esp+68h+var_56], 0
cmp	ax, di
ja	short loc_7824A9

loc_7824A4:
mov	[esp+68h+var_56], 1

loc_7824A9:
movzx	edi, ax

loc_7824AC:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7824BC
inc	eax
mov	[ecx+8], eax
jmp	short loc_7824C3

loc_7824BC:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_7824C3:
mov	ecx, [esp+68h+var_50]
push	ecx
mov	ecx, esi
mov	byte ptr [esi+6], 0
call	sub_781390
test	al, al
jz	loc_782401

loc_7824DB:
cmp	[esp+68h+var_55], 0
mov	edx, [esp+68h+var_54]
jz	short loc_7824F1
lea	eax, [esp+68h+var_44]
cmp	edx, eax
jz	short loc_7824F1
mov	[edx], bl
inc	edx

loc_7824F1:
cmp	[esp+68h+arg_10], 0
jle	short loc_782559
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_782507
mov	eax, 0FFFFh
jmp	short loc_782516

loc_782507:
cmp	[esp+68h+arg_14], 0
jz	short loc_782513
neg	edi

loc_782513:
movzx	eax, di

loc_782516:
mov	esi, [esp+68h+var_4C]
mov	[esi], ax
test	cl, cl
jnz	short loc_782559
cmp	[esp+68h+var_55], cl
jz	short loc_782541
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
push	edx
lea	ecx, [esp+74h+var_44]
push	ecx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_782559

loc_782541:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_782559:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_782390 endp

align 10h



sub_782570 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_C]
push	ebx
push	ebp
mov	[esp+60h+var_48], eax
mov	eax, [esp+60h+arg_1C]
mov	ecx, [eax+14h]
push	esi
push	edi
mov	[esp+68h+var_4C], eax
xor	edi, edi
cmp	ecx, [eax+10h]
lea	edx, [esp+68h+var_44]
mov	[esp+68h+var_54], edx
mov	eax, 80000000h
cdq
setnz	[esp+68h+var_55]
idiv	[esp+68h+arg_8]
mov	esi, [esp+68h+arg_0]
mov	ebp, [esp+68h+arg_4]
push	ebp
mov	ecx, esi
mov	[esp+6Ch+var_56], 0
xor	bl, bl
mov	[esp+6Ch+var_50], eax
call	sub_781390
test	al, al
jnz	loc_7826A8

loc_7825D7:
cmp	byte ptr [esi+6], 0
jnz	short loc_782603
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7825EC
movzx	eax, byte ptr [eax]
jmp	short loc_7825F3

loc_7825EC:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_7825F3:
cmp	eax, 0FFFFFFFFh
mov	[esi+4], al
setz	al
mov	[esi+5], al
mov	byte ptr [esi+6], 1

loc_782603:
cmp	[esp+68h+var_55], 0
mov	al, [esi+4]
jz	short loc_782625
cmp	al, [esp+68h+arg_18]
jnz	short loc_782625
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_78267D

loc_782625:
movsx	eax, al
cmp	eax, 7Fh
jbe	short loc_782634
mov	ecx, 0FFh
jmp	short loc_782640

loc_782634:
push	eax
call	sub_792800
add	esp, 4
movzx	ecx, al

loc_782640:
mov	edx, [esp+68h+arg_8]
cmp	ecx, edx
jge	short loc_7826A8
inc	[esp+68h+arg_10]
inc	bl
cmp	edi, [esp+68h+var_50]
jge	short loc_78265B
mov	[esp+68h+var_56], 1
jmp	short loc_78267D

loc_78265B:
mov	eax, edi
imul	eax, edx
sub	eax, ecx
test	edi, edi
jz	short loc_78267B
cmp	[esp+68h+var_56], 0
jnz	short loc_782676
cmp	eax, edi
mov	[esp+68h+var_56], 0
jl	short loc_78267B

loc_782676:
mov	[esp+68h+var_56], 1

loc_78267B:
mov	edi, eax

loc_78267D:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78268D
inc	eax
mov	[ecx+8], eax
jmp	short loc_782694

loc_78268D:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_782694:
push	ebp
mov	ecx, esi
mov	byte ptr [esi+6], 0
call	sub_781390
test	al, al
jz	loc_7825D7

loc_7826A8:
mov	dl, [esp+68h+var_55]
mov	esi, [esp+68h+var_54]
test	dl, dl
jz	short loc_7826BF
lea	ecx, [esp+68h+var_44]
cmp	esi, ecx
jz	short loc_7826BF
mov	[esi], bl
inc	esi

loc_7826BF:
cmp	[esp+68h+arg_10], 0
jle	short loc_782733
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_7826E1
xor	eax, eax
cmp	[esp+68h+arg_14], al
setnz	al
add	eax, 7FFFFFFFh
jmp	short loc_7826EF

loc_7826E1:
cmp	[esp+68h+arg_14], 0
jnz	short loc_7826ED
neg	edi

loc_7826ED:
mov	eax, edi

loc_7826EF:
mov	edi, [esp+68h+var_48]
mov	[edi], eax
test	cl, cl
jnz	short loc_782733
test	dl, dl
jz	short loc_78271B
mov	eax, [esp+68h+var_4C]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
lea	edx, [esp+70h+var_44]
push	esi
push	edx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_782733

loc_78271B:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_782733:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_782570 endp

align 10h



sub_782750 proc	near

var_11=	byte ptr -11h
var_10=	word ptr -10h
var_E= word ptr	-0Eh
var_C= word ptr	-0Ch
var_A= word ptr	-0Ah
var_8= word ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14h+var_4], eax
push	ebx
mov	ebx, [esp+18h+arg_C]
push	ebp
mov	ebp, [esp+1Ch+arg_4]
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
call	sub_792810
mov	edi, eax
add	edi, 5
call	sub_792810
mov	edx, [ebx]
mov	edx, [edx+24h]
lea	ecx, [esp+24h+var_10]
push	ecx
push	edi
push	eax
mov	ecx, ebx
call	edx
xor	ebx, ebx
mov	[esp+24h+var_11], bl
cmp	[esi+7], bl
jnz	short loc_7827CA
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7827A7
movzx	eax, word ptr [eax]
jmp	short loc_7827B1

loc_7827A7:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax

loc_7827B1:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_7827CA:
movzx	eax, word ptr [esi+4]
cmp	ax, [esp+24h+var_E]
jnz	short loc_7827EC
mov	ecx, [esi]
mov	eax, [ecx+8]
mov	[esp+24h+var_11], 1
cmp	eax, [ecx+0Ch]
jnb	short loc_782805
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_78280C

loc_7827EC:
cmp	ax, [esp+24h+var_10]
jnz	short loc_78280F
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782805
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_78280C

loc_782805:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_78280C:
mov	[esi+7], bl

loc_78280F:
mov	eax, [esp+24h+arg_8]
and	eax, 38h
cmp	eax, 8
jz	loc_7828F4
cmp	eax, 10h
jz	short loc_78289D
cmp	eax, 20h
jz	short loc_782896
push	ebp
mov	ecx, esi
call	sub_781460
test	al, al
jnz	loc_7828F4
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+24h+var_C]
jnz	loc_7828F4
mov	ecx, esi
call	sub_7808E0
push	ebp
push	esi
call	sub_781520
add	esp, 8
test	al, al
jz	short loc_78288A
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+24h+var_A]
jz	short loc_78287C
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+24h+var_8]
jnz	short loc_78288A

loc_78287C:
mov	ecx, esi
call	sub_7808E0
mov	edi, 10h
jmp	short loc_7828F9

loc_78288A:
mov	edi, 8

loc_78288F:
mov	ebx, 1
jmp	short loc_7828F9

loc_782896:
mov	edi, 8
jmp	short loc_7828F9

loc_78289D:
push	ebp
mov	ecx, esi
mov	edi, 10h
call	sub_781460
test	al, al
jnz	short loc_7828F9
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+24h+var_C]
jnz	short loc_7828F9
mov	ecx, esi
call	sub_7808E0
push	ebp
mov	ecx, esi
call	sub_781460
test	al, al
jnz	short loc_78288F
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+24h+var_A]
jz	short loc_7828EB
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+24h+var_8]
jnz	short loc_78288F

loc_7828EB:
mov	ecx, esi
call	sub_7808E0
jmp	short loc_7828F9

loc_7828F4:
mov	edi, 0Ah

loc_7828F9:
movzx	ecx, [esp+24h+var_11]
lea	eax, [edi+edi]
or	eax, ecx
mov	ecx, [esp+24h+var_4]
pop	edi
pop	esi
add	eax, eax
or	eax, ebx
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14h
retn
sub_782750 endp

align 10h



sub_782920 proc	near

var_6B=	word ptr -6Bh
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	qword ptr -5Ch
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+6Ch+var_4], eax
mov	eax, [esp+6Ch+arg_4]
mov	ecx, [esp+6Ch+arg_C]
push	ebx
push	ebp
mov	[esp+74h+var_60], eax
mov	eax, [esp+74h+arg_1C]
mov	edx, [eax+14h]
mov	[esp+74h+var_48], eax
xor	ebx, ebx
push	esi
mov	esi, [esp+78h+arg_0]
xor	ebp, ebp
cmp	edx, [eax+10h]
lea	eax, [esp+78h+var_44]
mov	[esp+78h+var_68], eax
mov	eax, [esp+78h+arg_8]
push	edi
cdq
push	edx
mov	edi, eax
push	edi
push	0FFFFFFFFh
push	0FFFFFFFFh
mov	[esp+8Ch+var_54], ecx
mov	byte ptr [esp+8Ch+var_6B+1], 0
setnz	[esp+8Ch+var_69]
mov	byte ptr [esp+8Ch+var_6B], bl
mov	dword ptr [esp+8Ch+var_50], edi
mov	dword ptr [esp+8Ch+var_50+4], edx
call	__aulldiv
mov	ecx, [esp+7Ch+var_60]
push	ecx
mov	ecx, esi
mov	dword ptr [esp+80h+var_5C], eax
mov	dword ptr [esp+80h+var_5C+4], edx
call	sub_781460
test	al, al
jnz	loc_782ADF
lea	ebx, [ebx+0]

loc_7829B0:
cmp	byte ptr [esi+7], 0
jnz	short loc_7829E8
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7829C5
movzx	eax, word ptr [eax]
jmp	short loc_7829CF

loc_7829C5:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_7829CF:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_7829E8:
cmp	[esp+7Ch+var_69], 0
movzx	eax, word ptr [esi+4]
jz	short loc_782A16
cmp	ax, [esp+7Ch+arg_18]
jnz	short loc_782A16
mov	eax, [esp+7Ch+var_68]
mov	cl, byte ptr [esp+7Ch+var_6B]
mov	[eax], cl
inc	eax
mov	[esp+7Ch+var_68], eax
mov	byte ptr [esp+7Ch+var_6B], 0
jmp	loc_782AAE

loc_782A16:
movzx	eax, ax
cmp	eax, 7Fh
jbe	short loc_782A28
mov	[esp+7Ch+var_64], 0FFh
jmp	short loc_782A38

loc_782A28:
push	eax
call	sub_792800
movzx	edx, al
add	esp, 4
mov	[esp+7Ch+var_64], edx

loc_782A38:
mov	eax, [esp+7Ch+var_64]
cmp	eax, [esp+7Ch+arg_8]
jge	loc_782ADF
inc	[esp+7Ch+arg_10]
inc	byte ptr [esp+7Ch+var_6B]
cmp	ebp, dword ptr [esp+7Ch+var_5C+4]
jb	short loc_782A69
ja	short loc_782A62
cmp	ebx, dword ptr [esp+7Ch+var_5C]
jbe	short loc_782A69

loc_782A62:
mov	byte ptr [esp+7Ch+var_6B+1], 1
jmp	short loc_782AAE

loc_782A69:
mov	ecx, dword ptr [esp+7Ch+var_50+4]
push	ebp
push	ebx
push	ecx
push	edi
call	__allmul
mov	ecx, eax
mov	eax, [esp+7Ch+var_64]
mov	edi, edx
cdq
add	ecx, eax
adc	edi, edx
mov	edx, ebx
or	edx, ebp
jz	short loc_782AA6
cmp	byte ptr [esp+7Ch+var_6B+1], 0
jnz	short loc_782AA1
cmp	edi, ebp
jb	short loc_782AA1
ja	short loc_782A9A
cmp	ecx, ebx
jbe	short loc_782AA1

loc_782A9A:
mov	byte ptr [esp+7Ch+var_6B+1], 0
jmp	short loc_782AA6

loc_782AA1:
mov	byte ptr [esp+7Ch+var_6B+1], 1

loc_782AA6:
mov	ebp, edi
mov	edi, dword ptr [esp+7Ch+var_50]
mov	ebx, ecx

loc_782AAE:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782AC0
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_782AC7

loc_782AC0:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_782AC7:
mov	eax, [esp+7Ch+var_60]
push	eax
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_7829B0

loc_782ADF:
cmp	[esp+7Ch+var_69], 0
mov	edx, [esp+7Ch+var_68]
jz	short loc_782AF9
lea	ecx, [esp+7Ch+var_44]
cmp	edx, ecx
jz	short loc_782AF9
mov	al, byte ptr [esp+7Ch+var_6B]
mov	[edx], al
inc	edx

loc_782AF9:
cmp	[esp+7Ch+arg_10], 0
jle	short loc_782B6D
mov	cl, byte ptr [esp+7Ch+var_6B+1]
test	cl, cl
jz	short loc_782B13
or	ebx, 0FFFFFFFFh
or	ebp, 0FFFFFFFFh
jmp	short loc_782B24

loc_782B13:
cmp	[esp+7Ch+arg_14], 0
jz	short loc_782B24
neg	ebx
adc	ebp, 0
neg	ebp

loc_782B24:
mov	eax, [esp+7Ch+var_54]
mov	[eax], ebx
mov	[eax+4], ebp
test	cl, cl
jnz	short loc_782B6D
cmp	[esp+7Ch+var_69], cl
jz	short loc_782B55
mov	eax, [esp+7Ch+var_48]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
push	edx
lea	ecx, [esp+88h+var_44]
push	ecx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_782B6D

loc_782B55:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+6Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 6Ch
retn

loc_782B6D:
mov	ecx, [esp+7Ch+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 6Ch
retn
sub_782920 endp

align 10h



sub_782B90 proc	near

var_6B=	word ptr -6Bh
var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	qword ptr -5Ch
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+6Ch+var_4], eax
mov	eax, [esp+6Ch+arg_4]
mov	ecx, [esp+6Ch+arg_C]
push	ebx
push	ebp
mov	[esp+74h+var_60], eax
mov	eax, [esp+74h+arg_1C]
mov	edx, [eax+14h]
mov	[esp+74h+var_48], eax
xor	ebx, ebx
xor	ebp, ebp
cmp	edx, [eax+10h]
push	esi
mov	esi, [esp+78h+arg_0]
lea	eax, [esp+78h+var_44]
mov	[esp+78h+var_68], eax
mov	eax, [esp+78h+arg_8]
push	edi
cdq
push	edx
mov	edi, eax
push	edi
push	80000000h
push	ebp
mov	[esp+8Ch+var_54], ecx
mov	byte ptr [esp+8Ch+var_6B+1], 0
setnz	[esp+8Ch+var_69]
mov	byte ptr [esp+8Ch+var_6B], bl
mov	dword ptr [esp+8Ch+var_50], edi
mov	dword ptr [esp+8Ch+var_50+4], edx
call	__alldiv
mov	ecx, [esp+7Ch+var_60]
push	ecx
mov	ecx, esi
mov	dword ptr [esp+80h+var_5C], eax
mov	dword ptr [esp+80h+var_5C+4], edx
call	sub_781460
test	al, al
jnz	loc_782D4F
lea	esp, [esp+0]

loc_782C20:
cmp	byte ptr [esi+7], 0
jnz	short loc_782C58
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782C35
movzx	eax, word ptr [eax]
jmp	short loc_782C3F

loc_782C35:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_782C3F:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_782C58:
cmp	[esp+7Ch+var_69], 0
movzx	eax, word ptr [esi+4]
jz	short loc_782C86
cmp	ax, [esp+7Ch+arg_18]
jnz	short loc_782C86
mov	eax, [esp+7Ch+var_68]
mov	cl, byte ptr [esp+7Ch+var_6B]
mov	[eax], cl
inc	eax
mov	[esp+7Ch+var_68], eax
mov	byte ptr [esp+7Ch+var_6B], 0
jmp	loc_782D1E

loc_782C86:
movzx	eax, ax
cmp	eax, 7Fh
jbe	short loc_782C98
mov	[esp+7Ch+var_64], 0FFh
jmp	short loc_782CA8

loc_782C98:
push	eax
call	sub_792800
movzx	edx, al
add	esp, 4
mov	[esp+7Ch+var_64], edx

loc_782CA8:
mov	eax, [esp+7Ch+var_64]
cmp	eax, [esp+7Ch+arg_8]
jge	loc_782D4F
inc	[esp+7Ch+arg_10]
inc	byte ptr [esp+7Ch+var_6B]
cmp	ebp, dword ptr [esp+7Ch+var_5C+4]
jg	short loc_782CD9
jl	short loc_782CD2
cmp	ebx, dword ptr [esp+7Ch+var_5C]
jnb	short loc_782CD9

loc_782CD2:
mov	byte ptr [esp+7Ch+var_6B+1], 1
jmp	short loc_782D1E

loc_782CD9:
mov	ecx, dword ptr [esp+7Ch+var_50+4]
push	ebp
push	ebx
push	ecx
push	edi
call	__allmul
mov	ecx, eax
mov	eax, [esp+7Ch+var_64]
mov	edi, edx
cdq
sub	ecx, eax
sbb	edi, edx
mov	edx, ebx
or	edx, ebp
jz	short loc_782D16
cmp	byte ptr [esp+7Ch+var_6B+1], 0
jnz	short loc_782D11
cmp	edi, ebp
jg	short loc_782D11
jl	short loc_782D0A
cmp	ecx, ebx
jnb	short loc_782D11

loc_782D0A:
mov	byte ptr [esp+7Ch+var_6B+1], 0
jmp	short loc_782D16

loc_782D11:
mov	byte ptr [esp+7Ch+var_6B+1], 1

loc_782D16:
mov	ebp, edi
mov	edi, dword ptr [esp+7Ch+var_50]
mov	ebx, ecx

loc_782D1E:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782D30
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_782D37

loc_782D30:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_782D37:
mov	eax, [esp+7Ch+var_60]
push	eax
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_782C20

loc_782D4F:
cmp	[esp+7Ch+var_69], 0
mov	esi, [esp+7Ch+var_68]
jz	short loc_782D69
lea	ecx, [esp+7Ch+var_44]
cmp	esi, ecx
jz	short loc_782D69
mov	dl, byte ptr [esp+7Ch+var_6B]
mov	[esi], dl
inc	esi

loc_782D69:
cmp	[esp+7Ch+arg_10], 0
jle	loc_782DF8
mov	dl, byte ptr [esp+7Ch+var_6B+1]
test	dl, dl
jz	short loc_782D9C
cmp	[esp+7Ch+arg_14], 0
jz	short loc_782D92
xor	eax, eax
mov	ebp, 80000000h
jmp	short loc_782DAF

loc_782D92:
or	eax, 0FFFFFFFFh
mov	ebp, 7FFFFFFFh
jmp	short loc_782DAF

loc_782D9C:
cmp	[esp+7Ch+arg_14], 0
jnz	short loc_782DAD
neg	ebx
adc	ebp, 0
neg	ebp

loc_782DAD:
mov	eax, ebx

loc_782DAF:
mov	ecx, [esp+7Ch+var_54]
mov	[ecx], eax
mov	[ecx+4], ebp
test	dl, dl
jnz	short loc_782DF8
cmp	[esp+7Ch+var_69], dl
jz	short loc_782DE0
mov	eax, [esp+7Ch+var_48]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
lea	eax, [esp+84h+var_44]
push	esi
push	eax
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_782DF8

loc_782DE0:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+6Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 6Ch
retn

loc_782DF8:
mov	ecx, [esp+7Ch+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 6Ch
retn
sub_782B90 endp

align 10h



sub_782E10 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+60h+arg_1C]
mov	edx, [ebp+14h]
push	esi
push	edi
mov	[esp+68h+var_50], eax
xor	edi, edi
cmp	edx, [ebp+10h]
lea	eax, [esp+68h+var_44]
setnz	[esp+68h+var_55]
mov	[esp+68h+var_54], eax
or	eax, 0FFFFFFFFh
xor	edx, edx
div	[esp+68h+arg_8]
mov	ecx, [esp+68h+arg_C]
mov	esi, [esp+68h+arg_0]
mov	[esp+68h+var_4C], ecx
mov	ecx, [esp+68h+var_50]
push	ecx
mov	ecx, esi
mov	[esp+6Ch+var_56], 0
xor	bl, bl
mov	[esp+6Ch+var_48], eax
call	sub_781460
test	al, al
jnz	loc_782F65
lea	ebx, [ebx+0]

loc_782E80:
cmp	byte ptr [esi+7], 0
jnz	short loc_782EB8
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782E95
movzx	eax, word ptr [eax]
jmp	short loc_782E9F

loc_782E95:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_782E9F:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_782EB8:
cmp	[esp+68h+var_55], 0
movzx	eax, word ptr [esi+4]
jz	short loc_782EDC
cmp	ax, [esp+68h+arg_18]
jnz	short loc_782EDC
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_782F34

loc_782EDC:
movzx	eax, ax
cmp	eax, 7Fh
jbe	short loc_782EEB
mov	ecx, 0FFh
jmp	short loc_782EF7

loc_782EEB:
push	eax
call	sub_792800
add	esp, 4
movzx	ecx, al

loc_782EF7:
mov	edx, [esp+68h+arg_8]
cmp	ecx, edx
jge	short loc_782F65
inc	[esp+68h+arg_10]
inc	bl
cmp	edi, [esp+68h+var_48]
jbe	short loc_782F12
mov	[esp+68h+var_56], 1
jmp	short loc_782F34

loc_782F12:
mov	eax, edi
imul	eax, edx
add	eax, ecx
test	edi, edi
jz	short loc_782F32
cmp	[esp+68h+var_56], 0
jnz	short loc_782F2D
mov	[esp+68h+var_56], 0
cmp	eax, edi
ja	short loc_782F32

loc_782F2D:
mov	[esp+68h+var_56], 1

loc_782F32:
mov	edi, eax

loc_782F34:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_782F46
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_782F4D

loc_782F46:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_782F4D:
mov	eax, [esp+68h+var_50]
push	eax
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_782E80

loc_782F65:
mov	dl, [esp+68h+var_55]
mov	esi, [esp+68h+var_54]
test	dl, dl
jz	short loc_782F7C
lea	ecx, [esp+68h+var_44]
cmp	esi, ecx
jz	short loc_782F7C
mov	[esi], bl
inc	esi

loc_782F7C:
cmp	[esp+68h+arg_10], 0
jle	short loc_782FDE
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_782F90
or	eax, 0FFFFFFFFh
jmp	short loc_782F9E

loc_782F90:
cmp	[esp+68h+arg_14], 0
jz	short loc_782F9C
neg	edi

loc_782F9C:
mov	eax, edi

loc_782F9E:
mov	edi, [esp+68h+var_4C]
mov	[edi], eax
test	cl, cl
jnz	short loc_782FDE
test	dl, dl
jz	short loc_782FC6
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
lea	edx, [esp+70h+var_44]
push	esi
push	edx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_782FDE

loc_782FC6:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_782FDE:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_782E10 endp

align 10h



sub_783000 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_4]
mov	ecx, [esp+58h+arg_C]
push	ebx
push	ebp
mov	ebp, [esp+60h+arg_1C]
mov	edx, [ebp+14h]
mov	[esp+60h+var_50], eax
push	esi
lea	eax, [esp+64h+var_44]
mov	[esp+64h+var_54], eax
push	edi
mov	[esp+68h+var_4C], ecx
movzx	ecx, word ptr [esp+68h+arg_8]
xor	edi, edi
cmp	edx, [ebp+10h]
mov	eax, 0FFFFh
cdq
setnz	[esp+68h+var_55]
idiv	ecx
mov	esi, [esp+68h+arg_0]
mov	ecx, esi
mov	[esp+68h+var_56], 0
xor	bl, bl
movzx	edx, ax
mov	eax, [esp+68h+var_50]
push	eax
mov	[esp+6Ch+var_48], edx
call	sub_781460
test	al, al
jnz	loc_78315B

loc_783071:
cmp	byte ptr [esi+7], 0
jnz	short loc_7830A9
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_783086
movzx	eax, word ptr [eax]
jmp	short loc_783090

loc_783086:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_783090:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_7830A9:
cmp	[esp+68h+var_55], 0
movzx	eax, word ptr [esi+4]
jz	short loc_7830CD
cmp	ax, [esp+68h+arg_18]
jnz	short loc_7830CD
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_78312A

loc_7830CD:
movzx	eax, ax
cmp	eax, 7Fh
jbe	short loc_7830DC
mov	eax, 0FFh
jmp	short loc_7830E8

loc_7830DC:
push	eax
call	sub_792800
add	esp, 4
movzx	eax, al

loc_7830E8:
mov	ecx, [esp+68h+arg_8]
cmp	eax, ecx
jge	short loc_78315B
inc	[esp+68h+arg_10]
inc	bl
cmp	di, word ptr [esp+68h+var_48]
jbe	short loc_783104
mov	[esp+68h+var_56], 1
jmp	short loc_78312A

loc_783104:
imul	ecx, edi
add	ecx, eax
movzx	eax, cx
test	di, di
jz	short loc_783127
cmp	[esp+68h+var_56], 0
jnz	short loc_783122
mov	[esp+68h+var_56], 0
cmp	ax, di
ja	short loc_783127

loc_783122:
mov	[esp+68h+var_56], 1

loc_783127:
movzx	edi, ax

loc_78312A:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78313C
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_783143

loc_78313C:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_783143:
mov	eax, [esp+68h+var_50]
push	eax
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_783071

loc_78315B:
cmp	[esp+68h+var_55], 0
mov	edx, [esp+68h+var_54]
jz	short loc_783171
lea	ecx, [esp+68h+var_44]
cmp	edx, ecx
jz	short loc_783171
mov	[edx], bl
inc	edx

loc_783171:
cmp	[esp+68h+arg_10], 0
jle	short loc_7831D9
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_783187
mov	eax, 0FFFFh
jmp	short loc_783196

loc_783187:
cmp	[esp+68h+arg_14], 0
jz	short loc_783193
neg	edi

loc_783193:
movzx	eax, di

loc_783196:
mov	esi, [esp+68h+var_4C]
mov	[esi], ax
test	cl, cl
jnz	short loc_7831D9
cmp	[esp+68h+var_55], cl
jz	short loc_7831C1
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
push	edx
lea	edx, [esp+74h+var_44]
push	edx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_7831D9

loc_7831C1:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_7831D9:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_783000 endp

align 10h



sub_7831F0 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_C]
push	ebx
push	ebp
mov	[esp+60h+var_48], eax
mov	eax, [esp+60h+arg_1C]
mov	ecx, [eax+14h]
push	esi
push	edi
mov	[esp+68h+var_4C], eax
xor	edi, edi
cmp	ecx, [eax+10h]
lea	edx, [esp+68h+var_44]
mov	[esp+68h+var_54], edx
mov	eax, 80000000h
cdq
setnz	[esp+68h+var_55]
idiv	[esp+68h+arg_8]
mov	esi, [esp+68h+arg_0]
mov	ebp, [esp+68h+arg_4]
push	ebp
mov	ecx, esi
mov	[esp+6Ch+var_56], 0
xor	bl, bl
mov	[esp+6Ch+var_50], eax
call	sub_781460
test	al, al
jnz	loc_783338

loc_783257:
cmp	byte ptr [esi+7], 0
jnz	short loc_78328F
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78326C
movzx	eax, word ptr [eax]
jmp	short loc_783276

loc_78326C:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax

loc_783276:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_78328F:
cmp	[esp+68h+var_55], 0
movzx	eax, word ptr [esi+4]
jz	short loc_7832B3
cmp	ax, [esp+68h+arg_18]
jnz	short loc_7832B3
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_78330B

loc_7832B3:
movzx	eax, ax
cmp	eax, 7Fh
jbe	short loc_7832C2
mov	ecx, 0FFh
jmp	short loc_7832CE

loc_7832C2:
push	eax
call	sub_792800
add	esp, 4
movzx	ecx, al

loc_7832CE:
mov	edx, [esp+68h+arg_8]
cmp	ecx, edx
jge	short loc_783338
inc	[esp+68h+arg_10]
inc	bl
cmp	edi, [esp+68h+var_50]
jge	short loc_7832E9
mov	[esp+68h+var_56], 1
jmp	short loc_78330B

loc_7832E9:
mov	eax, edi
imul	eax, edx
sub	eax, ecx
test	edi, edi
jz	short loc_783309
cmp	[esp+68h+var_56], 0
jnz	short loc_783304
cmp	eax, edi
mov	[esp+68h+var_56], 0
jl	short loc_783309

loc_783304:
mov	[esp+68h+var_56], 1

loc_783309:
mov	edi, eax

loc_78330B:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78331D
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_783324

loc_78331D:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_783324:
push	ebp
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_783257

loc_783338:
mov	dl, [esp+68h+var_55]
mov	esi, [esp+68h+var_54]
test	dl, dl
jz	short loc_78334F
lea	eax, [esp+68h+var_44]
cmp	esi, eax
jz	short loc_78334F
mov	[esi], bl
inc	esi

loc_78334F:
cmp	[esp+68h+arg_10], 0
jle	short loc_7833C3
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_783371
xor	eax, eax
cmp	[esp+68h+arg_14], al
setnz	al
add	eax, 7FFFFFFFh
jmp	short loc_78337F

loc_783371:
cmp	[esp+68h+arg_14], 0
jnz	short loc_78337D
neg	edi

loc_78337D:
mov	eax, edi

loc_78337F:
mov	edi, [esp+68h+var_48]
mov	[edi], eax
test	cl, cl
jnz	short loc_7833C3
test	dl, dl
jz	short loc_7833AB
mov	eax, [esp+68h+var_4C]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
lea	ecx, [esp+70h+var_44]
push	esi
push	ecx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_7833C3

loc_7833AB:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_7833C3:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_7831F0 endp

align 10h



sub_7833E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	ecx, [esp+arg_10]
mov	edx, [esp+arg_C]
push	esi
mov	esi, [esp+4+arg_0]
push	0
lea	eax, [esp+8+arg_0]
push	eax
mov	eax, [esp+0Ch+arg_8]
push	ecx
mov	ecx, [esp+10h+arg_4]
push	edx
push	eax
push	ecx
push	esi
call	sub_781280
add	esp, 1Ch
mov	eax, esi
pop	esi
retn
sub_7833E0 endp

align 10h



sub_783410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, ecx
mov	edx, [esi]
mov	ecx, [esi+8]
mov	ebx, ebp
sub	ebx, eax
push	edi
sub	ecx, edx
mov	edi, ebx
sar	edi, 2
sar	ecx, 2
cmp	edi, ecx
jbe	short loc_7834A7
push	ebp
push	eax
lea	edx, [esp+18h+arg_4]
push	edx
mov	ecx, esi
mov	[esp+1Ch+arg_4], edi
call	sub_77EB60
mov	ecx, [esi]
mov	ebx, eax
test	ecx, ecx
jz	short loc_78348E
mov	eax, [esi+8]
sub	eax, ecx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_783484
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	ecx, [esp+14h+arg_4]
lea	eax, [ebx+edi*4]
lea	edx, [ebx+ecx*4]
add	esp, 4
mov	[esi], ebx
mov	[esi+8], edx
mov	[esi+4], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_783484:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78348E:
mov	ecx, [esp+10h+arg_4]
lea	eax, [ebx+edi*4]
lea	edx, [ebx+ecx*4]
mov	[esi], ebx
mov	[esi+8], edx
mov	[esi+4], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_7834A7:
mov	ecx, [esi+4]
sub	ecx, edx
sar	ecx, 2
cmp	ecx, edi
jb	short loc_7834DA
test	ebx, ebx
jz	short loc_7834CE
push	ebx
push	eax
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, ebx
mov	[esi+4], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_7834CE:
mov	eax, edx
mov	[esi+4], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_7834DA:
lea	edi, [eax+ecx*4]
mov	ecx, edi
sub	ecx, eax
jz	short loc_7834EE
push	ecx
push	eax
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7834EE:
mov	eax, [esi+4]
cmp	ebp, edi
jz	short loc_783506
mov	ebx, ebp
sub	ebx, edi
push	ebx
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, ebx

loc_783506:
pop	edi
mov	[esi+4], eax
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_783410 endp




sub_783510 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
push	ebp
mov	ebp, [esp+8+arg_0]
cmp	[ebx+24h], ebx
jnz	short loc_783530
lea	ecx, [ecx+0]

loc_783520:
cmp	[ebp+24h], ebp
jz	short loc_783577
mov	eax, ebx
mov	ebx, ebp
mov	ebp, eax
cmp	[ebx+24h], ebx
jz	short loc_783520

loc_783530:
cmp	[ebp+24h], ebp
jnz	short loc_7835AB
mov	ecx, [ebx]
mov	eax, [ebx+24h]
mov	edx, [ebx+20h]
push	esi
mov	[esp+0Ch+arg_0], ecx
push	edi
mov	esi, ebp
mov	edi, ebx
mov	ecx, 8
rep movsd
mov	ecx, eax
mov	[ebp+24h], ecx
mov	[ebx+24h], ebx
mov	ecx, [ebp+20h]
sub	ecx, ebp
sar	ecx, 1
lea	ecx, [ebx+ecx*2]
mov	[ebx+20h], ecx
mov	ecx, [esp+10h+arg_0]
pop	edi
pop	esi
mov	[ebp+0], ecx
mov	[ebp+24h], eax
mov	[ebp+20h], edx
pop	ebp
pop	ebx
retn	4

loc_783577:
push	ebp
push	ebx
call	sub_7807D0
mov	edx, [ebp+20h]
sub	edx, [ebp+24h]
mov	ecx, [ebx+24h]
mov	eax, [ebx+20h]
add	esp, 8
sub	eax, ecx
sar	edx, 1
sar	eax, 1
lea	edx, [ecx+edx*2]
mov	[ebx+20h], edx
lea	eax, [ebp+eax*2+0]
mov	[ebp+20h], eax
mov	[ebx+24h], ebx
mov	[ebp+24h], ebp
pop	ebp
pop	ebx
retn	4

loc_7835AB:
mov	edx, [ebp+0]
mov	eax, [ebx]
mov	[ebx], edx
mov	[ebp+0], eax
mov	eax, [ebx+24h]
mov	ecx, [ebp+24h]
mov	[ebx+24h], ecx
mov	[ebp+24h], eax
mov	edx, [ebp+20h]
mov	eax, [ebx+20h]
mov	[ebx+20h], edx
mov	[ebp+20h], eax
pop	ebp
pop	ebx
retn	4
sub_783510 endp

align 10h



sub_7835E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h
arg_14=	dword ptr  18h
arg_18=	qword ptr  1Ch
arg_20=	byte ptr  24h
arg_24=	byte ptr  28h
arg_28=	byte ptr  2Ch

mov	ecx, dword ptr [esp+arg_18+4]
sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_8]
mov	eax, ebx
cdq
cmp	edx, ecx
push	esi
mov	esi, dword ptr [esp+10h+arg_18]
jl	short loc_78362D
jg	short loc_7835FE
cmp	eax, esi
jb	short loc_78362D

loc_7835FE:
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
mov	esi, [esp+10h+arg_0]
push	0
lea	eax, [esp+14h+arg_8]
push	eax
mov	eax, [esp+18h+arg_4]
push	ecx
push	edx
lea	ecx, [eax+ebx]
push	ecx
push	eax
push	esi
call	sub_781280
add	esp, 1Ch
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_78362D:
sub	esi, eax
sbb	ecx, edx
mov	dword ptr [esp+10h+arg_18], esi
mov	dword ptr [esp+10h+arg_18+4], ecx
mov	[esp+10h+var_8], 7FFFFFFFh
mov	[esp+10h+var_4], 0
test	ecx, ecx
jg	short loc_78365D
jl	short loc_783657
cmp	esi, 7FFFFFFFh
jnb	short loc_78365D

loc_783657:
lea	eax, [esp+10h+arg_18]
jmp	short loc_783661

loc_78365D:
lea	eax, [esp+10h+var_8]

loc_783661:
mov	ecx, [esp+10h+arg_14]
push	edi
mov	edi, [eax]
mov	eax, ecx
and	eax, 7
cmp	eax, 1
jnz	short loc_7836C4
mov	eax, dword ptr [esp+14h+arg_C+4]
mov	ecx, dword ptr [esp+14h+arg_C]
push	0
lea	edx, [esp+18h+arg_8]
push	edx
push	eax
mov	eax, [esp+20h+arg_4]
push	ecx
lea	edx, [eax+ebx]
push	edx
push	eax
lea	eax, [esp+2Ch+arg_18]
push	eax
call	sub_781280
mov	ecx, dword ptr [esp+30h+arg_18+4]
mov	eax, dword ptr [esp+30h+arg_18]
mov	esi, [esp+30h+arg_0]
lea	edx, [esp+30h+arg_20]
push	edx
push	edi
push	ecx
push	eax
push	esi
mov	dword ptr [esp+44h+arg_C], eax
mov	dword ptr [esp+44h+arg_C+4], ecx
call	sub_781210
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_7836C4:
mov	esi, [esp+14h+arg_4]
cmp	eax, 4
jnz	loc_7837B4
test	ebx, ebx
jz	short loc_783738
movzx	eax, byte ptr [esi]
cmp	al, [esp+14h+arg_24]
jz	short loc_7836E4
cmp	al, [esp+14h+arg_28]
jnz	short loc_783738

loc_7836E4:
push	eax
lea	ecx, [esp+18h+arg_C]
call	sub_780860
mov	ecx, dword ptr [esp+14h+arg_C+4]
mov	edx, dword ptr [esp+14h+arg_C]
lea	eax, [esp+14h+arg_20]
push	eax
push	edi
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_781210
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
mov	dword ptr [esp+28h+arg_C+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
lea	eax, [esi+ebx]
push	eax
inc	esi
push	esi
mov	esi, [esp+38h+arg_0]
push	esi
call	sub_7833E0
add	esp, 28h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_783738:
cmp	ebx, 2
jl	short loc_7837B4
test	ecx, 200h
jz	short loc_7837B4
and	cl, 38h
cmp	cl, 10h
jnz	short loc_7837B4
movzx	ecx, byte ptr [esi]
push	ecx
lea	ecx, [esp+18h+arg_C]
call	sub_780860
movzx	edx, byte ptr [esi+1]
push	edx
lea	ecx, [esp+18h+arg_C]
call	sub_780860
mov	ecx, dword ptr [esp+14h+arg_C+4]
mov	edx, dword ptr [esp+14h+arg_C]
lea	eax, [esp+14h+arg_20]
push	eax
push	edi
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_781210
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
mov	dword ptr [esp+28h+arg_C+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
lea	eax, [esi+ebx]
push	eax
add	esi, 2
push	esi
mov	esi, [esp+38h+arg_0]
push	esi
call	sub_7833E0
add	esp, 28h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_7837B4:
mov	edx, dword ptr [esp+14h+arg_C+4]
mov	eax, dword ptr [esp+14h+arg_C]
lea	ecx, [esp+14h+arg_20]
push	ecx
push	edi
push	edx
push	eax
lea	ecx, [esp+24h+arg_18]
push	ecx
call	sub_781210
mov	edx, [eax]
mov	dword ptr [esp+28h+arg_C], edx
mov	ecx, [eax+4]
push	0
mov	dword ptr [esp+2Ch+arg_C+4], ecx
mov	ecx, [eax+4]
lea	edx, [esp+2Ch+arg_8]
push	edx
mov	edx, [eax]
push	ecx
push	edx
lea	eax, [esi+ebx]
push	eax
push	esi
mov	esi, [esp+40h+arg_0]
push	esi
call	sub_781280
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn
sub_7835E0 endp

align 10h



sub_783810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h
arg_14=	dword ptr  18h
arg_18=	qword ptr  1Ch
arg_20=	byte ptr  24h
arg_24=	byte ptr  28h
arg_28=	byte ptr  2Ch

mov	ecx, dword ptr [esp+arg_18+4]
push	ebx
mov	ebx, dword ptr [esp+4+arg_18]
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_8]
mov	eax, edi
sub	eax, esi
cdq
cmp	ecx, edx
jg	short loc_783858
jl	short loc_783832
cmp	ebx, eax
ja	short loc_783858

loc_783832:
mov	ecx, dword ptr [esp+0Ch+arg_C+4]
mov	edx, dword ptr [esp+0Ch+arg_C]
push	0
lea	eax, [esp+10h+arg_8]
push	eax
push	ecx
push	edx
push	edi
push	esi
mov	esi, [esp+24h+arg_0]
push	esi
call	sub_781280
add	esp, 1Ch
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn

loc_783858:
sub	ebx, eax
mov	eax, [esp+0Ch+arg_14]
sbb	ecx, edx
and	eax, 7
push	ebp
mov	ebp, ecx
cmp	eax, 1
jnz	short loc_7838B5
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
push	0
lea	eax, [esp+14h+arg_8]
push	eax
push	ecx
push	edx
push	edi
lea	eax, [esp+24h+arg_18]
push	esi
push	eax
call	sub_781280
mov	ecx, dword ptr [esp+2Ch+arg_18+4]
mov	eax, dword ptr [esp+2Ch+arg_18]
mov	esi, [esp+2Ch+arg_0]
lea	edx, [esp+2Ch+arg_20]
push	edx
push	ebp
push	ebx
push	ecx
push	eax
push	esi
mov	dword ptr [esp+44h+arg_C], eax
mov	dword ptr [esp+44h+arg_C+4], ecx
call	sub_780CD0
add	esp, 34h
pop	ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn

loc_7838B5:
cmp	eax, 4
jnz	short loc_78391D
cmp	esi, edi
jz	short loc_78391D
movzx	eax, byte ptr [esi]
cmp	al, [esp+10h+arg_24]
jz	short loc_7838CD
cmp	al, [esp+10h+arg_28]
jnz	short loc_78391D

loc_7838CD:
push	eax
lea	ecx, [esp+14h+arg_C]
call	sub_780860
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
lea	eax, [esp+10h+arg_20]
push	eax
push	ebp
push	ebx
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_780CD0
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
mov	dword ptr [esp+28h+arg_C+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
push	edi
inc	esi
push	esi
mov	esi, [esp+38h+arg_0]
push	esi
call	sub_7833E0
add	esp, 2Ch
pop	ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn

loc_78391D:
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
lea	eax, [esp+10h+arg_20]
push	eax
push	ebp
push	ebx
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_780CD0
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
push	0
mov	dword ptr [esp+2Ch+arg_C+4], edx
mov	edx, [eax+4]
mov	eax, [eax]
lea	ecx, [esp+2Ch+arg_8]
push	ecx
push	edx
push	eax
push	edi
push	esi
mov	esi, [esp+40h+arg_0]
push	esi
call	sub_781280
add	esp, 34h
pop	ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn
sub_783810 endp

align 10h



sub_783970 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C9846
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24h+var_C]
mov	large fs:0, eax
mov	edi, ecx
mov	[esp+24h+var_10], edi
mov	eax, 1
mov	[esp+24h+var_4], eax
test	byte ptr dword_1858098,	al
jnz	short loc_7839BC
or	dword_1858098, eax
mov	dword_1858094, 0

loc_7839BC:
mov	ebx, ds:InterlockedDecrement
push	offset dword_1858094 ; lpAddend
call	ebx ; InterlockedDecrement
mov	ebp, [edi+20h]
mov	esi, [edi+1Ch]
cmp	esi, ebp
jz	short loc_7839FE

loc_7839D3:
mov	eax, [esi]
test	eax, eax
jz	short loc_7839F7
add	eax, 4
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_7839F7
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7839F1
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_7839F1:
mov	dword ptr [esi], 0

loc_7839F7:
add	esi, 4
cmp	esi, ebp
jnz	short loc_7839D3

loc_7839FE:
mov	ecx, [edi+1Ch]
mov	byte ptr [esp+24h+var_4], 0
test	ecx, ecx
jz	short loc_783A32
mov	eax, [edi+24h]
sub	eax, ecx
sar	eax, 2
add	eax, eax
add	eax, eax
cmp	eax, 80h
jbe	short loc_783A28
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_783A32

loc_783A28:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_783A32:
mov	ecx, [edi+18h]
lea	eax, [edi+4]
mov	[esp+24h+var_4], 0FFFFFFFFh
cmp	ecx, eax
jz	short loc_783A7E
test	ecx, ecx
jz	short loc_783A7E
mov	eax, [eax]
sub	eax, ecx
test	ecx, ecx
jz	short loc_783A7E
cmp	eax, 80h
jbe	short loc_783A74
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn

loc_783A74:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_783A7E:
mov	ecx, [esp+24h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_783970 endp

align 10h



sub_783AA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C98A6
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
push	offset sub_407910
push	2
push	18h
lea	eax, [esi+408h]
push	eax
mov	[esp+28h+var_4], 2
call	$LN21_0
push	offset sub_407910
push	18h
push	18h
lea	ecx, [esi+1C8h]
push	ecx
mov	byte ptr [esp+28h+var_4], 1
call	$LN21_0
push	offset sub_407910
push	0Eh
push	18h
lea	edx, [esi+78h]
push	edx
mov	byte ptr [esp+28h+var_4], 0
call	$LN21_0
mov	ecx, esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_7819D0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_783AA0 endp

align 10h



sub_783B40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12CA9F6
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
push	offset sub_407E50
push	2
push	28h
lea	eax, [esi+668h]
push	eax
mov	[esp+28h+var_4], 2
call	$LN21_0
push	offset sub_407E50
push	18h
push	28h
lea	ecx, [esi+2A8h]
push	ecx
mov	byte ptr [esp+28h+var_4], 1
call	$LN21_0
push	offset sub_407E50
push	0Eh
push	28h
lea	edx, [esi+78h]
push	edx
mov	byte ptr [esp+28h+var_4], 0
call	$LN21_0
mov	ecx, esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_7819D0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_783B40 endp

align 10h



sub_783BE0 proc	near
mov	eax, [ecx+228h]
cmp	eax, ecx
jz	short locret_783C1E
test	eax, eax
jz	short locret_783C1E
mov	edx, eax
lea	eax, [ecx+24h]
cmp	edx, eax
jz	short locret_783C1E
test	edx, edx
jz	short locret_783C1E
mov	eax, [ecx]
sub	eax, edx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_783C14
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
retn

loc_783C14:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

locret_783C1E:
retn
sub_783BE0 endp

align 10h



sub_783C20 proc	near

var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C98E0
mov	eax, large fs:0
push	eax
sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
mov	esi, [esp+40h+arg_C]
lea	eax, [esp+40h+var_2C]
push	eax
mov	ecx, esi
call	sub_4325E0
xor	edi, edi
push	offset unk_167EF9C
lea	ecx, [esp+44h+var_2C]
mov	[esp+44h+var_4], edi
call	sub_77FFD0
mov	esi, [esi+8]
mov	ecx, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_4]
push	eax
push	esi
push	ecx
push	ebx
call	sub_781B30
mov	edx, [esp+50h+arg_8]
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edx
mov	ecx, ebx
and	ebp, 1
call	sub_781390
test	al, al
jz	short loc_783CBA
cmp	ebp, edi
jle	short loc_783CB0
mov	eax, [esp+40h+arg_14]
mov	[eax], edi
mov	[eax+4], edi
mov	byte ptr [esp+40h+arg_C], 1
jmp	loc_783D5E

loc_783CB0:
mov	byte ptr [esp+40h+arg_C], 0
jmp	loc_783D5E

loc_783CBA:
push	offset unk_167EFAC
lea	ecx, [esp+44h+var_2C]
call	sub_77FFD0
mov	edi, eax
mov	eax, esi
shr	eax, 1
lea	ecx, [esp+40h+var_24]
and	al, 1
push	ecx
mov	ecx, edi
mov	byte ptr [esp+44h+var_28], al
sar	esi, 2
call	sub_781970
mov	[esp+40h+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+40h+var_4], 1
call	eax
mov	edx, [esp+40h+arg_C]
lea	ecx, [esp+40h+arg_C]
push	ecx
mov	ecx, [esp+44h+var_28]
push	edx
mov	edx, [esp+48h+arg_14]
mov	byte ptr [esp+48h+arg_4], al
mov	eax, [esp+48h+arg_4]
push	eax
mov	eax, [esp+4Ch+arg_8]
push	ecx
push	ebp
push	edx
push	esi
push	eax
push	ebx
call	sub_781CE0
mov	byte ptr [esp+64h+arg_C], al
mov	eax, [esp+64h+var_10]
lea	ecx, [esp+64h+var_24]
add	esp, 24h
mov	byte ptr [esp+40h+var_4], 0
cmp	eax, ecx
jz	short loc_783D5E
test	eax, eax
jz	short loc_783D5E
mov	ecx, [esp+40h+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_783D54
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_783D5E

loc_783D54:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_783D5E:
mov	eax, [esp+40h+arg_8]
mov	esi, [esp+40h+arg_10]
xor	edx, edx
cmp	byte ptr [esp+40h+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781390
test	al, al
jz	short loc_783D84
or	dword ptr [esi], 2

loc_783D84:
mov	ecx, [ebx]
mov	esi, [esp+40h+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+40h+var_2C]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn
sub_783C20 endp

align 10h



sub_783DC0 proc	near

var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C98E0
mov	eax, large fs:0
push	eax
sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
mov	esi, [esp+40h+arg_C]
lea	eax, [esp+40h+var_2C]
push	eax
mov	ecx, esi
call	sub_4325E0
xor	edi, edi
push	offset unk_167EF9C
lea	ecx, [esp+44h+var_2C]
mov	[esp+44h+var_4], edi
call	sub_77FFD0
mov	esi, [esi+8]
mov	ecx, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_4]
push	eax
push	esi
push	ecx
push	ebx
call	sub_781B30
mov	edx, [esp+50h+arg_8]
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edx
mov	ecx, ebx
and	ebp, 1
call	sub_781390
test	al, al
jz	short loc_783E5A
cmp	ebp, edi
jle	short loc_783E50
mov	eax, [esp+40h+arg_14]
mov	[eax], edi
mov	[eax+4], edi
mov	byte ptr [esp+40h+arg_C], 1
jmp	loc_783EFE

loc_783E50:
mov	byte ptr [esp+40h+arg_C], 0
jmp	loc_783EFE

loc_783E5A:
push	offset unk_167EFAC
lea	ecx, [esp+44h+var_2C]
call	sub_77FFD0
mov	edi, eax
mov	eax, esi
shr	eax, 1
lea	ecx, [esp+40h+var_24]
and	al, 1
push	ecx
mov	ecx, edi
mov	byte ptr [esp+44h+var_28], al
sar	esi, 2
call	sub_781970
mov	[esp+40h+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+40h+var_4], 1
call	eax
mov	edx, [esp+40h+arg_C]
lea	ecx, [esp+40h+arg_C]
push	ecx
mov	ecx, [esp+44h+var_28]
push	edx
mov	edx, [esp+48h+arg_14]
mov	byte ptr [esp+48h+arg_4], al
mov	eax, [esp+48h+arg_4]
push	eax
mov	eax, [esp+4Ch+arg_8]
push	ecx
push	ebp
push	edx
push	esi
push	eax
push	ebx
call	sub_781F40
mov	byte ptr [esp+64h+arg_C], al
mov	eax, [esp+64h+var_10]
lea	ecx, [esp+64h+var_24]
add	esp, 24h
mov	byte ptr [esp+40h+var_4], 0
cmp	eax, ecx
jz	short loc_783EFE
test	eax, eax
jz	short loc_783EFE
mov	ecx, [esp+40h+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_783EF4
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_783EFE

loc_783EF4:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_783EFE:
mov	eax, [esp+40h+arg_8]
mov	esi, [esp+40h+arg_10]
xor	edx, edx
cmp	byte ptr [esp+40h+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781390
test	al, al
jz	short loc_783F24
or	dword ptr [esi], 2

loc_783F24:
mov	ecx, [ebx]
mov	esi, [esp+40h+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+40h+var_2C]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn
sub_783DC0 endp

align 10h



sub_783F60 proc	near

var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C98E0
mov	eax, large fs:0
push	eax
sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
mov	esi, [esp+40h+arg_C]
lea	eax, [esp+40h+var_2C]
push	eax
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EF9C
lea	ecx, [esp+44h+var_2C]
mov	[esp+44h+var_4], 0
call	sub_77FFD0
mov	esi, [esi+8]
mov	edi, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_4]
push	eax
push	esi
push	edi
push	ebx
call	sub_781B30
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edi
mov	ecx, ebx
and	ebp, 1
call	sub_781390
test	al, al
jz	short loc_783FF9
test	ebp, ebp
jle	short loc_783FEF
mov	ecx, [esp+40h+arg_14]
mov	dword ptr [ecx], 0
mov	byte ptr [esp+40h+arg_C], 1
jmp	loc_78409E

loc_783FEF:
mov	byte ptr [esp+40h+arg_C], 0
jmp	loc_78409E

loc_783FF9:
push	offset unk_167EFAC
lea	ecx, [esp+44h+var_2C]
call	sub_77FFD0
mov	edx, esi
mov	edi, eax
shr	edx, 1
lea	eax, [esp+40h+var_24]
and	dl, 1
push	eax
mov	ecx, edi
mov	byte ptr [esp+44h+var_28], dl
sar	esi, 2
call	sub_781970
mov	[esp+40h+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+40h+var_4], 1
call	eax
mov	edx, [esp+40h+arg_C]
lea	ecx, [esp+40h+arg_C]
push	ecx
mov	ecx, [esp+44h+var_28]
push	edx
mov	edx, [esp+48h+arg_14]
mov	byte ptr [esp+48h+arg_4], al
mov	eax, [esp+48h+arg_4]
push	eax
mov	eax, [esp+4Ch+arg_8]
push	ecx
push	ebp
push	edx
push	esi
push	eax
push	ebx
call	sub_7821B0
mov	byte ptr [esp+64h+arg_C], al
mov	eax, [esp+64h+var_10]
lea	ecx, [esp+64h+var_24]
add	esp, 24h
mov	byte ptr [esp+40h+var_4], 0
cmp	eax, ecx
jz	short loc_78409E
test	eax, eax
jz	short loc_78409E
mov	ecx, [esp+40h+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_784094
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78409E

loc_784094:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78409E:
mov	eax, [esp+40h+arg_8]
mov	esi, [esp+40h+arg_10]
xor	edx, edx
cmp	byte ptr [esp+40h+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781390
test	al, al
jz	short loc_7840C4
or	dword ptr [esi], 2

loc_7840C4:
mov	ecx, [ebx]
mov	esi, [esp+40h+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+40h+var_2C]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn
sub_783F60 endp

align 10h



sub_784100 proc	near

var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C98E0
mov	eax, large fs:0
push	eax
sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
mov	esi, [esp+40h+arg_C]
lea	eax, [esp+40h+var_2C]
push	eax
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EF9C
lea	ecx, [esp+44h+var_2C]
mov	[esp+44h+var_4], 0
call	sub_77FFD0
mov	esi, [esi+8]
mov	edi, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_4]
push	eax
push	esi
push	edi
push	ebx
call	sub_781B30
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edi
mov	ecx, ebx
and	ebp, 1
call	sub_781390
test	al, al
jz	short loc_784198
test	ebp, ebp
jle	short loc_78418E
mov	edx, [esp+40h+arg_14]
xor	ecx, ecx
mov	[edx], cx
mov	byte ptr [esp+40h+arg_C], 1
jmp	loc_78423C

loc_78418E:
mov	byte ptr [esp+40h+arg_C], 0
jmp	loc_78423C

loc_784198:
push	offset unk_167EFAC
lea	ecx, [esp+44h+var_2C]
call	sub_77FFD0
mov	edi, eax
mov	eax, esi
shr	eax, 1
lea	ecx, [esp+40h+var_24]
and	al, 1
push	ecx
mov	ecx, edi
mov	byte ptr [esp+44h+var_28], al
sar	esi, 2
call	sub_781970
mov	[esp+40h+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+40h+var_4], 1
call	eax
mov	edx, [esp+40h+arg_C]
lea	ecx, [esp+40h+arg_C]
push	ecx
mov	ecx, [esp+44h+var_28]
push	edx
mov	edx, [esp+48h+arg_14]
mov	byte ptr [esp+48h+arg_4], al
mov	eax, [esp+48h+arg_4]
push	eax
mov	eax, [esp+4Ch+arg_8]
push	ecx
push	ebp
push	edx
push	esi
push	eax
push	ebx
call	sub_782390
mov	byte ptr [esp+64h+arg_C], al
mov	eax, [esp+64h+var_10]
lea	ecx, [esp+64h+var_24]
add	esp, 24h
mov	byte ptr [esp+40h+var_4], 0
cmp	eax, ecx
jz	short loc_78423C
test	eax, eax
jz	short loc_78423C
mov	ecx, [esp+40h+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_784232
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78423C

loc_784232:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78423C:
mov	eax, [esp+40h+arg_8]
mov	esi, [esp+40h+arg_10]
xor	edx, edx
cmp	byte ptr [esp+40h+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781390
test	al, al
jz	short loc_784262
or	dword ptr [esi], 2

loc_784262:
mov	ecx, [ebx]
mov	esi, [esp+40h+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+40h+var_2C]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn
sub_784100 endp

align 10h



sub_784290 proc	near

var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C98E0
mov	eax, large fs:0
push	eax
sub	esp, 20h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
mov	esi, [esp+40h+arg_C]
lea	eax, [esp+40h+var_2C]
push	eax
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EF9C
lea	ecx, [esp+44h+var_2C]
mov	[esp+44h+var_4], 0
call	sub_77FFD0
mov	esi, [esi+8]
mov	edi, [esp+40h+arg_8]
mov	ebx, [esp+40h+arg_4]
push	eax
push	esi
push	edi
push	ebx
call	sub_781B30
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edi
mov	ecx, ebx
and	ebp, 1
call	sub_781390
test	al, al
jz	short loc_784329
test	ebp, ebp
jle	short loc_78431F
mov	ecx, [esp+40h+arg_14]
mov	dword ptr [ecx], 0
mov	byte ptr [esp+40h+arg_C], 1
jmp	loc_7843CE

loc_78431F:
mov	byte ptr [esp+40h+arg_C], 0
jmp	loc_7843CE

loc_784329:
push	offset unk_167EFAC
lea	ecx, [esp+44h+var_2C]
call	sub_77FFD0
mov	edx, esi
mov	edi, eax
shr	edx, 1
lea	eax, [esp+40h+var_24]
and	dl, 1
push	eax
mov	ecx, edi
mov	byte ptr [esp+44h+var_28], dl
sar	esi, 2
call	sub_781970
mov	[esp+40h+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+40h+var_4], 1
call	eax
mov	edx, [esp+40h+arg_C]
lea	ecx, [esp+40h+arg_C]
push	ecx
mov	ecx, [esp+44h+var_28]
push	edx
mov	edx, [esp+48h+arg_14]
mov	byte ptr [esp+48h+arg_4], al
mov	eax, [esp+48h+arg_4]
push	eax
mov	eax, [esp+4Ch+arg_8]
push	ecx
push	ebp
push	edx
push	esi
push	eax
push	ebx
call	sub_782570
mov	byte ptr [esp+64h+arg_C], al
mov	eax, [esp+64h+var_10]
lea	ecx, [esp+64h+var_24]
add	esp, 24h
mov	byte ptr [esp+40h+var_4], 0
cmp	eax, ecx
jz	short loc_7843CE
test	eax, eax
jz	short loc_7843CE
mov	ecx, [esp+40h+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_7843C4
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7843CE

loc_7843C4:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_7843CE:
mov	eax, [esp+40h+arg_8]
mov	esi, [esp+40h+arg_10]
xor	edx, edx
cmp	byte ptr [esp+40h+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781390
test	al, al
jz	short loc_7843F4
or	dword ptr [esi], 2

loc_7843F4:
mov	ecx, [ebx]
mov	esi, [esp+40h+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+40h+var_2C]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn
sub_784290 endp

align 10h



sub_784430 proc	near

var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	byte ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9918
mov	eax, large fs:0
push	eax
sub	esp, 4Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+6Ch+var_C]
mov	large fs:0, eax
mov	eax, [esp+6Ch+arg_0]
mov	ecx, [esp+6Ch+arg_8]
mov	edx, [esp+6Ch+arg_14]
mov	ebp, [esp+6Ch+arg_10]
mov	esi, [esp+6Ch+arg_4]
mov	[esp+6Ch+var_48], eax
lea	eax, [esp+6Ch+var_4C]
mov	[esp+6Ch+var_54], ecx
mov	ecx, [esp+6Ch+arg_C]
push	eax
mov	[esp+70h+var_50], ebp
mov	[esp+70h+var_44], edx
call	sub_4325E0
push	offset unk_167EFAC
mov	ecx, eax
mov	[esp+70h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+6Ch+var_4C]
mov	edi, eax
mov	[esp+6Ch+var_4], 0FFFFFFFFh
call	sub_77FF40
lea	ecx, [esp+6Ch+var_28]
push	ecx
mov	ecx, edi
call	sub_781950
lea	edx, [esp+6Ch+var_40]
push	edx
mov	ecx, edi
mov	[esp+70h+var_4], 1
call	sub_781990
mov	eax, [esp+6Ch+var_54]
mov	bl, 1
push	eax
mov	ecx, esi
mov	byte ptr [esp+70h+var_4], 2
mov	[esp+70h+var_55], bl
xor	edi, edi
call	sub_781390
test	al, al
jnz	loc_7845D8

loc_784502:
cmp	byte ptr [esi+6], 0
jnz	short loc_78452E
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_784517
movzx	eax, byte ptr [eax]
jmp	short loc_78451E

loc_784517:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_78451E:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_78452E:
mov	al, [esi+4]
mov	ebp, [esp+6Ch+var_14]
test	bl, bl
jz	short loc_784542
cmp	al, [edi+ebp]
jnz	short loc_784542
mov	bl, 1
jmp	short loc_784544

loc_784542:
xor	bl, bl

loc_784544:
cmp	[esp+6Ch+var_55], 0
mov	ecx, [esp+6Ch+var_2C]
jz	short loc_784559
mov	[esp+6Ch+var_55], 1
cmp	al, [ecx+edi]
jz	short loc_78455E

loc_784559:
mov	[esp+6Ch+var_55], 0

loc_78455E:
inc	edi
test	bl, bl
jnz	short loc_784579
cmp	[esp+6Ch+var_55], bl
jnz	short loc_78458A

loc_784569:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7845C5
inc	eax
mov	[ecx+8], eax
jmp	short loc_7845CC

loc_784579:
mov	edx, [esp+6Ch+var_18]
sub	edx, ebp
cmp	edi, edx
jnb	short loc_784569
cmp	[esp+6Ch+var_55], 0
jz	short loc_784594

loc_78458A:
mov	eax, [esp+6Ch+var_30]
sub	eax, ecx
cmp	edi, eax
jnb	short loc_784569

loc_784594:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7845A4
inc	eax
mov	[ecx+8], eax
jmp	short loc_7845AB

loc_7845A4:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_7845AB:
mov	ecx, [esp+6Ch+var_54]
push	ecx
mov	ecx, esi
mov	byte ptr [esi+6], 0
call	sub_781390
test	al, al
jz	loc_784502
jmp	short loc_7845D0

loc_7845C5:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_7845CC:
mov	byte ptr [esi+6], 0

loc_7845D0:
mov	ebp, [esp+6Ch+var_50]
test	bl, bl
jz	short loc_7845E6

loc_7845D8:
mov	ecx, [esp+6Ch+var_18]
sub	ecx, [esp+6Ch+var_14]
cmp	edi, ecx
jnb	short loc_7845E6
xor	bl, bl

loc_7845E6:
cmp	[esp+6Ch+var_55], 0
jz	short loc_7845FE
mov	edx, [esp+6Ch+var_30]
sub	edx, [esp+6Ch+var_2C]
cmp	edi, edx
jnb	short loc_7845FE
mov	[esp+6Ch+var_55], 0

loc_7845FE:
test	bl, bl
jnz	short loc_784611
cmp	[esp+6Ch+var_55], bl
jnz	short loc_784611
mov	dword ptr [ebp+0], 4
jmp	short loc_78461E

loc_784611:
mov	eax, [esp+6Ch+var_44]
mov	dword ptr [ebp+0], 0
mov	[eax], bl

loc_78461E:
mov	ecx, [esp+6Ch+var_54]
push	ecx
mov	ecx, esi
call	sub_781390
test	al, al
jz	short loc_784632
or	dword ptr [ebp+0], 2

loc_784632:
mov	edx, [esi]
mov	edi, [esp+6Ch+var_48]
mov	ecx, [esp+6Ch+var_2C]
mov	[edi], edx
mov	eax, [esi+4]
lea	edx, [esp+6Ch+var_40]
mov	[edi+4], eax
mov	byte ptr [esp+6Ch+var_4], 1
cmp	ecx, edx
jz	short loc_784677
test	ecx, ecx
jz	short loc_784677
mov	eax, [esp+6Ch+var_40]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78466D
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_784677

loc_78466D:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_784677:
mov	ecx, [esp+6Ch+var_14]
lea	eax, [esp+6Ch+var_28]
mov	[esp+6Ch+var_4], 0FFFFFFFFh
cmp	ecx, eax
jz	short loc_7846B1
test	ecx, ecx
jz	short loc_7846B1
mov	eax, [esp+6Ch+var_28]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_7846A7
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7846B1

loc_7846A7:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_7846B1:
mov	eax, edi
mov	ecx, [esp+6Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+58h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn
sub_784430 endp

align 10h



sub_7846E0 proc	near

var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9950
mov	eax, large fs:0
push	eax
sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+3Ch+arg_C]
lea	eax, [esp+3Ch+var_28]
push	eax
mov	ecx, esi
call	sub_4325E0
xor	edi, edi
push	offset unk_167EFB8
lea	ecx, [esp+40h+var_28]
mov	[esp+40h+var_4], edi
call	sub_77FFD0
mov	esi, [esi+8]
mov	ecx, [esp+3Ch+arg_8]
mov	ebx, [esp+3Ch+arg_4]
push	eax
push	esi
push	ecx
push	ebx
call	sub_782750
mov	edx, [esp+4Ch+arg_8]
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edx
mov	ecx, ebx
and	ebp, 1
call	sub_781460
test	al, al
jz	short loc_78477A
cmp	ebp, edi
jle	short loc_784770
mov	eax, [esp+3Ch+arg_14]
mov	[eax], edi
mov	[eax+4], edi
mov	byte ptr [esp+3Ch+arg_C], 1
jmp	loc_784819

loc_784770:
mov	byte ptr [esp+3Ch+arg_C], 0
jmp	loc_784819

loc_78477A:
push	offset unk_167EFC8
lea	ecx, [esp+40h+var_28]
call	sub_77FFD0
mov	edi, eax
mov	eax, esi
shr	eax, 1
lea	ecx, [esp+3Ch+var_24]
and	al, 1
push	ecx
mov	ecx, edi
mov	byte ptr [esp+40h+arg_4], al
sar	esi, 2
call	sub_781970
mov	[esp+3Ch+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+3Ch+var_4], 1
call	eax
mov	edx, [esp+3Ch+arg_C]
lea	ecx, [esp+3Ch+arg_C]
push	ecx
mov	ecx, [esp+40h+arg_14]
push	edx
mov	edx, [esp+44h+arg_8]
movzx	eax, ax
push	eax
mov	eax, [esp+48h+arg_4]
push	eax
push	ebp
push	ecx
push	esi
push	edx
push	ebx
call	sub_782920
mov	byte ptr [esp+60h+arg_C], al
mov	eax, [esp+60h+var_10]
lea	ecx, [esp+60h+var_24]
add	esp, 24h
mov	byte ptr [esp+3Ch+var_4], 0
cmp	eax, ecx
jz	short loc_784819
test	eax, eax
jz	short loc_784819
mov	ecx, [esp+3Ch+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_78480F
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_784819

loc_78480F:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_784819:
mov	eax, [esp+3Ch+arg_8]
mov	esi, [esp+3Ch+arg_10]
xor	edx, edx
cmp	byte ptr [esp+3Ch+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781460
test	al, al
jz	short loc_78483F
or	dword ptr [esi], 2

loc_78483F:
mov	ecx, [ebx]
mov	esi, [esp+3Ch+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+3Ch+var_28]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_7846E0 endp

align 10h



sub_784870 proc	near

var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9950
mov	eax, large fs:0
push	eax
sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+3Ch+arg_C]
lea	eax, [esp+3Ch+var_28]
push	eax
mov	ecx, esi
call	sub_4325E0
xor	edi, edi
push	offset unk_167EFB8
lea	ecx, [esp+40h+var_28]
mov	[esp+40h+var_4], edi
call	sub_77FFD0
mov	esi, [esi+8]
mov	ecx, [esp+3Ch+arg_8]
mov	ebx, [esp+3Ch+arg_4]
push	eax
push	esi
push	ecx
push	ebx
call	sub_782750
mov	edx, [esp+4Ch+arg_8]
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edx
mov	ecx, ebx
and	ebp, 1
call	sub_781460
test	al, al
jz	short loc_78490A
cmp	ebp, edi
jle	short loc_784900
mov	eax, [esp+3Ch+arg_14]
mov	[eax], edi
mov	[eax+4], edi
mov	byte ptr [esp+3Ch+arg_C], 1
jmp	loc_7849A9

loc_784900:
mov	byte ptr [esp+3Ch+arg_C], 0
jmp	loc_7849A9

loc_78490A:
push	offset unk_167EFC8
lea	ecx, [esp+40h+var_28]
call	sub_77FFD0
mov	edi, eax
mov	eax, esi
shr	eax, 1
lea	ecx, [esp+3Ch+var_24]
and	al, 1
push	ecx
mov	ecx, edi
mov	byte ptr [esp+40h+arg_4], al
sar	esi, 2
call	sub_781970
mov	[esp+3Ch+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+3Ch+var_4], 1
call	eax
mov	edx, [esp+3Ch+arg_C]
lea	ecx, [esp+3Ch+arg_C]
push	ecx
mov	ecx, [esp+40h+arg_14]
push	edx
mov	edx, [esp+44h+arg_8]
movzx	eax, ax
push	eax
mov	eax, [esp+48h+arg_4]
push	eax
push	ebp
push	ecx
push	esi
push	edx
push	ebx
call	sub_782B90
mov	byte ptr [esp+60h+arg_C], al
mov	eax, [esp+60h+var_10]
lea	ecx, [esp+60h+var_24]
add	esp, 24h
mov	byte ptr [esp+3Ch+var_4], 0
cmp	eax, ecx
jz	short loc_7849A9
test	eax, eax
jz	short loc_7849A9
mov	ecx, [esp+3Ch+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_78499F
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7849A9

loc_78499F:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_7849A9:
mov	eax, [esp+3Ch+arg_8]
mov	esi, [esp+3Ch+arg_10]
xor	edx, edx
cmp	byte ptr [esp+3Ch+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781460
test	al, al
jz	short loc_7849CF
or	dword ptr [esi], 2

loc_7849CF:
mov	ecx, [ebx]
mov	esi, [esp+3Ch+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+3Ch+var_28]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_784870 endp

align 10h



sub_784A00 proc	near

var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9950
mov	eax, large fs:0
push	eax
sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+3Ch+arg_C]
lea	eax, [esp+3Ch+var_28]
push	eax
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+40h+var_28]
mov	[esp+40h+var_4], 0
call	sub_77FFD0
mov	esi, [esi+8]
mov	edi, [esp+3Ch+arg_8]
mov	ebx, [esp+3Ch+arg_4]
push	eax
push	esi
push	edi
push	ebx
call	sub_782750
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edi
mov	ecx, ebx
and	ebp, 1
call	sub_781460
test	al, al
jz	short loc_784A99
test	ebp, ebp
jle	short loc_784A8F
mov	ecx, [esp+3Ch+arg_14]
mov	dword ptr [ecx], 0
mov	byte ptr [esp+3Ch+arg_C], 1
jmp	loc_784B39

loc_784A8F:
mov	byte ptr [esp+3Ch+arg_C], 0
jmp	loc_784B39

loc_784A99:
push	offset unk_167EFC8
lea	ecx, [esp+40h+var_28]
call	sub_77FFD0
mov	edx, esi
mov	edi, eax
shr	edx, 1
lea	eax, [esp+3Ch+var_24]
and	dl, 1
push	eax
mov	ecx, edi
mov	byte ptr [esp+40h+arg_4], dl
sar	esi, 2
call	sub_781970
mov	[esp+3Ch+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+3Ch+var_4], 1
call	eax
mov	edx, [esp+3Ch+arg_C]
lea	ecx, [esp+3Ch+arg_C]
push	ecx
mov	ecx, [esp+40h+arg_14]
push	edx
mov	edx, [esp+44h+arg_8]
movzx	eax, ax
push	eax
mov	eax, [esp+48h+arg_4]
push	eax
push	ebp
push	ecx
push	esi
push	edx
push	ebx
call	sub_782E10
mov	byte ptr [esp+60h+arg_C], al
mov	eax, [esp+60h+var_10]
lea	ecx, [esp+60h+var_24]
add	esp, 24h
mov	byte ptr [esp+3Ch+var_4], 0
cmp	eax, ecx
jz	short loc_784B39
test	eax, eax
jz	short loc_784B39
mov	ecx, [esp+3Ch+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_784B2F
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_784B39

loc_784B2F:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_784B39:
mov	eax, [esp+3Ch+arg_8]
mov	esi, [esp+3Ch+arg_10]
xor	edx, edx
cmp	byte ptr [esp+3Ch+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781460
test	al, al
jz	short loc_784B5F
or	dword ptr [esi], 2

loc_784B5F:
mov	ecx, [ebx]
mov	esi, [esp+3Ch+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+3Ch+var_28]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_784A00 endp

align 10h



sub_784B90 proc	near

var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9950
mov	eax, large fs:0
push	eax
sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+3Ch+arg_C]
lea	eax, [esp+3Ch+var_28]
push	eax
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+40h+var_28]
mov	[esp+40h+var_4], 0
call	sub_77FFD0
mov	esi, [esi+8]
mov	edi, [esp+3Ch+arg_8]
mov	ebx, [esp+3Ch+arg_4]
push	eax
push	esi
push	edi
push	ebx
call	sub_782750
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edi
mov	ecx, ebx
and	ebp, 1
call	sub_781460
test	al, al
jz	short loc_784C28
test	ebp, ebp
jle	short loc_784C1E
mov	edx, [esp+3Ch+arg_14]
xor	ecx, ecx
mov	[edx], cx
mov	byte ptr [esp+3Ch+arg_C], 1
jmp	loc_784CC7

loc_784C1E:
mov	byte ptr [esp+3Ch+arg_C], 0
jmp	loc_784CC7

loc_784C28:
push	offset unk_167EFC8
lea	ecx, [esp+40h+var_28]
call	sub_77FFD0
mov	edi, eax
mov	eax, esi
shr	eax, 1
lea	ecx, [esp+3Ch+var_24]
and	al, 1
push	ecx
mov	ecx, edi
mov	byte ptr [esp+40h+arg_4], al
sar	esi, 2
call	sub_781970
mov	[esp+3Ch+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+3Ch+var_4], 1
call	eax
mov	edx, [esp+3Ch+arg_C]
lea	ecx, [esp+3Ch+arg_C]
push	ecx
mov	ecx, [esp+40h+arg_14]
push	edx
mov	edx, [esp+44h+arg_8]
movzx	eax, ax
push	eax
mov	eax, [esp+48h+arg_4]
push	eax
push	ebp
push	ecx
push	esi
push	edx
push	ebx
call	sub_783000
mov	byte ptr [esp+60h+arg_C], al
mov	eax, [esp+60h+var_10]
lea	ecx, [esp+60h+var_24]
add	esp, 24h
mov	byte ptr [esp+3Ch+var_4], 0
cmp	eax, ecx
jz	short loc_784CC7
test	eax, eax
jz	short loc_784CC7
mov	ecx, [esp+3Ch+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_784CBD
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_784CC7

loc_784CBD:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_784CC7:
mov	eax, [esp+3Ch+arg_8]
mov	esi, [esp+3Ch+arg_10]
xor	edx, edx
cmp	byte ptr [esp+3Ch+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781460
test	al, al
jz	short loc_784CED
or	dword ptr [esi], 2

loc_784CED:
mov	ecx, [ebx]
mov	esi, [esp+3Ch+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+3Ch+var_28]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_784B90 endp

align 10h



sub_784D20 proc	near

var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9950
mov	eax, large fs:0
push	eax
sub	esp, 1Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+3Ch+arg_C]
lea	eax, [esp+3Ch+var_28]
push	eax
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+40h+var_28]
mov	[esp+40h+var_4], 0
call	sub_77FFD0
mov	esi, [esi+8]
mov	edi, [esp+3Ch+arg_8]
mov	ebx, [esp+3Ch+arg_4]
push	eax
push	esi
push	edi
push	ebx
call	sub_782750
mov	esi, eax
add	esp, 10h
mov	ebp, esi
push	edi
mov	ecx, ebx
and	ebp, 1
call	sub_781460
test	al, al
jz	short loc_784DB9
test	ebp, ebp
jle	short loc_784DAF
mov	ecx, [esp+3Ch+arg_14]
mov	dword ptr [ecx], 0
mov	byte ptr [esp+3Ch+arg_C], 1
jmp	loc_784E59

loc_784DAF:
mov	byte ptr [esp+3Ch+arg_C], 0
jmp	loc_784E59

loc_784DB9:
push	offset unk_167EFC8
lea	ecx, [esp+40h+var_28]
call	sub_77FFD0
mov	edx, esi
mov	edi, eax
shr	edx, 1
lea	eax, [esp+3Ch+var_24]
and	dl, 1
push	eax
mov	ecx, edi
mov	byte ptr [esp+40h+arg_4], dl
sar	esi, 2
call	sub_781970
mov	[esp+3Ch+arg_C], eax
mov	edx, [edi]
mov	eax, [edx+8]
mov	ecx, edi
mov	byte ptr [esp+3Ch+var_4], 1
call	eax
mov	edx, [esp+3Ch+arg_C]
lea	ecx, [esp+3Ch+arg_C]
push	ecx
mov	ecx, [esp+40h+arg_14]
push	edx
mov	edx, [esp+44h+arg_8]
movzx	eax, ax
push	eax
mov	eax, [esp+48h+arg_4]
push	eax
push	ebp
push	ecx
push	esi
push	edx
push	ebx
call	sub_7831F0
mov	byte ptr [esp+60h+arg_C], al
mov	eax, [esp+60h+var_10]
lea	ecx, [esp+60h+var_24]
add	esp, 24h
mov	byte ptr [esp+3Ch+var_4], 0
cmp	eax, ecx
jz	short loc_784E59
test	eax, eax
jz	short loc_784E59
mov	ecx, [esp+3Ch+var_24]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_784E4F
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_784E59

loc_784E4F:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_784E59:
mov	eax, [esp+3Ch+arg_8]
mov	esi, [esp+3Ch+arg_10]
xor	edx, edx
cmp	byte ptr [esp+3Ch+arg_C], dl
push	eax
setnz	dl
mov	ecx, ebx
dec	edx
and	edx, 4
mov	[esi], edx
call	sub_781460
test	al, al
jz	short loc_784E7F
or	dword ptr [esi], 2

loc_784E7F:
mov	ecx, [ebx]
mov	esi, [esp+3Ch+arg_0]
mov	edx, [ebx+4]
mov	[esi], ecx
lea	ecx, [esp+3Ch+var_28]
mov	[esi+4], edx
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+3Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_784D20 endp

align 10h



sub_784EB0 proc	near

var_75=	byte ptr -75h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9988
mov	eax, large fs:0
push	eax
sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+78h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+8Ch+var_C]
mov	large fs:0, eax
mov	eax, [esp+8Ch+arg_0]
mov	ecx, [esp+8Ch+arg_8]
mov	edx, [esp+8Ch+arg_14]
mov	ebp, [esp+8Ch+arg_10]
mov	esi, [esp+8Ch+arg_4]
mov	[esp+8Ch+var_68], eax
lea	eax, [esp+8Ch+var_6C]
mov	[esp+8Ch+var_74], ecx
mov	ecx, [esp+8Ch+arg_C]
push	eax
mov	[esp+90h+var_70], ebp
mov	[esp+90h+var_64], edx
call	sub_4325E0
push	offset unk_167EFC8
mov	ecx, eax
mov	[esp+90h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+8Ch+var_6C]
mov	edi, eax
mov	[esp+8Ch+var_4], 0FFFFFFFFh
call	sub_77FF40
lea	ecx, [esp+8Ch+var_38]
push	ecx
mov	ecx, edi
call	sub_781950
lea	edx, [esp+8Ch+var_60]
push	edx
mov	ecx, edi
mov	[esp+90h+var_4], 1
call	sub_781990
mov	eax, [esp+8Ch+var_74]
mov	bl, 1
push	eax
mov	ecx, esi
mov	byte ptr [esp+90h+var_4], 2
mov	[esp+90h+var_75], bl
xor	edi, edi
call	sub_781460
test	al, al
jnz	loc_78508E
lea	ecx, [ecx+0]

loc_784FA0:
cmp	byte ptr [esi+7], 0
jnz	short loc_784FD8
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_784FB5
movzx	eax, word ptr [eax]
jmp	short loc_784FBF

loc_784FB5:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_784FBF:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_784FD8:
movzx	eax, word ptr [esi+4]
mov	ebp, [esp+8Ch+var_14]
test	bl, bl
jz	short loc_784FEF
cmp	ax, [ebp+edi*2+0]
jnz	short loc_784FEF
mov	bl, 1
jmp	short loc_784FF1

loc_784FEF:
xor	bl, bl

loc_784FF1:
cmp	[esp+8Ch+var_75], 0
mov	ecx, [esp+8Ch+var_3C]
jz	short loc_785007
mov	[esp+8Ch+var_75], 1
cmp	ax, [ecx+edi*2]
jz	short loc_78500C

loc_785007:
mov	[esp+8Ch+var_75], 0

loc_78500C:
inc	edi
test	bl, bl
jnz	short loc_785029
cmp	[esp+8Ch+var_75], bl
jnz	short loc_78503C

loc_785017:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78507B
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_785082

loc_785029:
mov	eax, [esp+8Ch+var_18]
sub	eax, ebp
sar	eax, 1
cmp	edi, eax
jnb	short loc_785017
cmp	[esp+8Ch+var_75], 0
jz	short loc_785048

loc_78503C:
mov	edx, [esp+8Ch+var_40]
sub	edx, ecx
sar	edx, 1
cmp	edi, edx
jnb	short loc_785017

loc_785048:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78505A
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_785061

loc_78505A:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_785061:
mov	eax, [esp+8Ch+var_74]
push	eax
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_784FA0
jmp	short loc_785086

loc_78507B:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_785082:
mov	byte ptr [esi+7], 0

loc_785086:
mov	ebp, [esp+8Ch+var_70]
test	bl, bl
jz	short loc_78509E

loc_78508E:
mov	ecx, [esp+8Ch+var_18]
sub	ecx, [esp+8Ch+var_14]
sar	ecx, 1
cmp	edi, ecx
jnb	short loc_78509E
xor	bl, bl

loc_78509E:
cmp	[esp+8Ch+var_75], 0
jz	short loc_7850B8
mov	edx, [esp+8Ch+var_40]
sub	edx, [esp+8Ch+var_3C]
sar	edx, 1
cmp	edi, edx
jnb	short loc_7850B8
mov	[esp+8Ch+var_75], 0

loc_7850B8:
test	bl, bl
jnz	short loc_7850CB
cmp	[esp+8Ch+var_75], bl
jnz	short loc_7850CB
mov	dword ptr [ebp+0], 4
jmp	short loc_7850D8

loc_7850CB:
mov	eax, [esp+8Ch+var_64]
mov	dword ptr [ebp+0], 0
mov	[eax], bl

loc_7850D8:
mov	ecx, [esp+8Ch+var_74]
push	ecx
mov	ecx, esi
call	sub_781460
test	al, al
jz	short loc_7850EC
or	dword ptr [ebp+0], 2

loc_7850EC:
mov	edx, [esi]
mov	edi, [esp+8Ch+var_68]
mov	ecx, [esp+8Ch+var_3C]
mov	[edi], edx
mov	eax, [esi+4]
lea	edx, [esp+8Ch+var_60]
mov	[edi+4], eax
mov	byte ptr [esp+8Ch+var_4], 1
cmp	ecx, edx
jz	short loc_785138
test	ecx, ecx
jz	short loc_785138
mov	eax, [esp+8Ch+var_60]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78512E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_785138

loc_78512E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_785138:
mov	ecx, [esp+8Ch+var_14]
lea	eax, [esp+8Ch+var_38]
mov	[esp+8Ch+var_4], 0FFFFFFFFh
cmp	ecx, eax
jz	short loc_785179
test	ecx, ecx
jz	short loc_785179
mov	eax, [esp+8Ch+var_38]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78516F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_785179

loc_78516F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_785179:
mov	eax, edi
mov	ecx, [esp+8Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+78h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 78h
retn
sub_784EB0 endp

align 10h



sub_7851A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	ecx, [esp+arg_10]
mov	edx, [esp+arg_C]
push	esi
mov	esi, [esp+4+arg_0]
push	0
lea	eax, [esp+8+arg_0]
push	eax
mov	eax, [esp+0Ch+arg_8]
push	ecx
mov	ecx, [esp+10h+arg_4]
push	edx
push	eax
push	ecx
push	esi
call	sub_781880
add	esp, 1Ch
mov	eax, esi
pop	esi
retn
sub_7851A0 endp

align 10h



sub_7851D0 proc	near

var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_12C99C0
mov	eax, large fs:0
push	eax
sub	esp, 6Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+78h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+8Ch+var_C]
mov	large fs:0, eax
mov	edi, [esp+8Ch+arg_4]
mov	ebx, [esp+8Ch+arg_8]
mov	eax, [esp+8Ch+arg_0]
mov	esi, [esp+8Ch+arg_14]
lea	ecx, [esp+8Ch+var_78]
push	ecx
sub	ebx, edi
mov	ecx, esi
mov	[esp+90h+var_6C], eax
mov	[esp+90h+var_70], ebx
call	sub_4325E0
push	offset unk_167EFAC
mov	ecx, eax
mov	[esp+90h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+8Ch+var_78]
mov	ebp, eax
mov	[esp+8Ch+var_4], 0FFFFFFFFh
call	sub_77FF40
lea	edx, [esp+8Ch+var_68]
push	edx
mov	ecx, ebp
call	sub_781970
mov	eax, [esp+8Ch+var_54]
mov	[esp+8Ch+var_4], 1
cmp	eax, [esp+8Ch+var_58]
jz	loc_78530D
mov	eax, [esp+8Ch+arg_18]
test	eax, 200h
jz	short loc_7852B7
and	eax, 38h
cmp	eax, 10h
jz	short loc_7852AD
xor	ecx, ecx
cmp	eax, 20h
setz	cl
mov	[esp+8Ch+var_74], ecx
jmp	short loc_7852BF

loc_7852AD:
mov	[esp+8Ch+var_74], 2
jmp	short loc_7852BF

loc_7852B7:
mov	[esp+8Ch+var_74], 0

loc_7852BF:
test	ebx, ebx
jz	short loc_7852D2
push	ebx
lea	edx, [esp+90h+var_50]
push	edi
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7852D2:
mov	eax, [ebp+0]
mov	ebx, [esp+8Ch+var_70]
mov	edx, [eax+8]
mov	ecx, ebp
lea	edi, [esp+8Ch+var_50]
lea	ebx, [esp+ebx+8Ch+var_50]
call	edx
mov	byte ptr [esp+8Ch+var_78], al
mov	eax, [esp+8Ch+var_74]
mov	ecx, [esp+8Ch+var_78]
push	eax
push	2Dh
push	2Bh
push	ecx
lea	edx, [esp+9Ch+var_68]
push	edx
mov	eax, edi
push	ebx
push	eax
call	sub_793BF0
add	esp, 1Ch
jmp	short loc_785311

loc_78530D:
mov	eax, [esp+8Ch+var_70]

loc_785311:
mov	ecx, [esi+28h]
mov	edx, [esi+2Ch]
push	2Dh
push	2Bh
xor	ebx, ebx
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	esi, [esp+94h+arg_1C]
push	esi
mov	esi, [esp+98h+var_6C]
push	edx
mov	edx, dword ptr [esp+9Ch+arg_C+4]
push	ecx
mov	ecx, [esp+0A0h+arg_18]
push	ecx
mov	ecx, dword ptr [esp+0A4h+arg_C]
push	edx
push	ecx
push	eax
push	edi
push	esi
call	sub_7835E0
mov	eax, [esp+0B8h+var_54]
lea	edx, [esp+0B8h+var_68]
add	esp, 2Ch
mov	[esp+8Ch+var_4], 0FFFFFFFFh
cmp	eax, edx
jz	short loc_785392
cmp	eax, ebx
jz	short loc_785392
mov	ecx, [esp+8Ch+var_68]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_785388
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_785392

loc_785388:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_785392:
mov	eax, esi
mov	ecx, [esp+8Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+78h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 78h
retn
sub_7851D0 endp

align 10h



sub_7853C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= qword ptr  0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

mov	ecx, [esp+arg_20]
push	esi
mov	esi, [esp+4+arg_4]
mov	eax, [esi+118h]
mov	edx, [esi+10h]
sub	edx, eax
push	edi
cmp	ecx, edx
jnb	short loc_7853E6
cmp	byte ptr [eax+ecx], 2Eh
jnz	short loc_7853E6
mov	dl, [esp+8+arg_18]
mov	[eax+ecx], dl

loc_7853E6:
mov	eax, [esp+8+arg_24]
mov	edx, [eax+14h]
xor	edi, edi
cmp	edx, [eax+10h]
jz	short loc_785409
mov	edx, [esp+8+arg_1C]
push	edi
push	2Dh
push	2Bh
push	edx
push	eax
push	ecx
push	esi
call	sub_793F60
add	esp, 1Ch

loc_785409:
mov	eax, [esp+8+arg_10]
mov	ecx, [eax+28h]
mov	edx, [eax+2Ch]
push	2Dh
push	2Bh
mov	[eax+28h], edi
mov	[eax+2Ch], edi
mov	edi, [esp+10h+arg_14]
mov	eax, [eax+8]
push	edi
push	edx
mov	edx, dword ptr [esp+18h+arg_8]
push	ecx
mov	ecx, dword ptr [esp+1Ch+arg_8+4]
push	eax
mov	eax, [esi+10h]
push	ecx
mov	ecx, [esi+118h]
mov	esi, [esp+24h+arg_0]
push	edx
push	eax
push	ecx
push	esi
call	sub_783810
add	esp, 2Ch
pop	edi
mov	eax, esi
pop	esi
retn
sub_7853C0 endp

align 10h



sub_785450 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_12C99F8
mov	eax, large fs:0
push	eax
push	ecx
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+1Ch+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+1Ch+var_10], esi
mov	edi, [esp+1Ch+arg_0]
mov	ecx, [esp+1Ch+arg_8]
lea	eax, [edi+1]
push	eax
push	ecx
mov	ecx, esi
call	sub_402CF0
mov	eax, [esi+24h]
push	0
lea	edx, [esp+20h+arg_4]
push	edx
lea	ecx, [esp+24h+arg_4]
push	ecx
lea	edi, [eax+edi*2]
push	edi
push	eax
mov	[esp+30h+var_4], 0
call	sub_44E3E0
add	esp, 14h
xor	edx, edx
mov	[esi+20h], edi
mov	[edi], dx
mov	eax, esi
mov	ecx, [esp+1Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
add	esp, 10h
retn	0Ch
sub_785450 endp

align 10h



; int __stdcall	sub_7854D0(size_t)
sub_7854D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+14h]
cmp	eax, 101h
jbe	short loc_7854F2
push	0		; int
push	eax		; size_t
mov	ecx, ebp
call	sub_780550
mov	edi, eax
jmp	short loc_7854F4

loc_7854F2:
mov	edi, ebp

loc_7854F4:
mov	eax, [esi+10h]
mov	ecx, [esi+118h]
push	0
lea	edx, [esp+14h+arg_0]
push	edx
push	edi
push	eax
push	ecx
call	sub_405470
mov	ebx, eax
mov	byte ptr [ebx],	0
mov	eax, [esi+118h]
add	esp, 14h
cmp	eax, esi
jz	short loc_785547
test	eax, eax
jz	short loc_785547
mov	ecx, [esi]
sub	ecx, eax
cmp	eax, ebp
jz	short loc_785547
cmp	ecx, 80h
jbe	short loc_78553D
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_785547

loc_78553D:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_785547:
mov	eax, [esp+10h+arg_0]
lea	ecx, [edi+eax]
mov	[esi+118h], edi
pop	edi
mov	[esi+10h], ebx
mov	[esi], ecx
pop	esi
pop	ebp
pop	ebx
retn	4
sub_7854D0 endp




sub_785560 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h
arg_14=	dword ptr  18h
arg_18=	qword ptr  1Ch
arg_20=	byte ptr  24h
arg_24=	word ptr  28h
arg_28=	word ptr  2Ch

mov	ecx, dword ptr [esp+arg_18+4]
sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_8]
mov	eax, ebx
cdq
cmp	edx, ecx
push	esi
mov	esi, dword ptr [esp+10h+arg_18]
jl	short loc_7855AD
jg	short loc_78557E
cmp	eax, esi
jb	short loc_7855AD

loc_78557E:
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
mov	esi, [esp+10h+arg_0]
push	0
lea	eax, [esp+14h+arg_8]
push	eax
mov	eax, [esp+18h+arg_4]
push	ecx
push	edx
lea	ecx, [eax+ebx*2]
push	ecx
push	eax
push	esi
call	sub_781880
add	esp, 1Ch
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_7855AD:
sub	esi, eax
sbb	ecx, edx
mov	dword ptr [esp+10h+arg_18], esi
mov	dword ptr [esp+10h+arg_18+4], ecx
mov	[esp+10h+var_8], 7FFFFFFFh
mov	[esp+10h+var_4], 0
test	ecx, ecx
jg	short loc_7855DD
jl	short loc_7855D7
cmp	esi, 7FFFFFFFh
jnb	short loc_7855DD

loc_7855D7:
lea	eax, [esp+10h+arg_18]
jmp	short loc_7855E1

loc_7855DD:
lea	eax, [esp+10h+var_8]

loc_7855E1:
mov	ecx, [esp+10h+arg_14]
push	edi
mov	edi, [eax]
mov	eax, ecx
and	eax, 7
cmp	eax, 1
jnz	short loc_785644
mov	eax, dword ptr [esp+14h+arg_C+4]
mov	ecx, dword ptr [esp+14h+arg_C]
push	0
lea	edx, [esp+18h+arg_8]
push	edx
push	eax
mov	eax, [esp+20h+arg_4]
push	ecx
lea	edx, [eax+ebx*2]
push	edx
push	eax
lea	eax, [esp+2Ch+arg_18]
push	eax
call	sub_781880
mov	ecx, dword ptr [esp+30h+arg_18+4]
mov	eax, dword ptr [esp+30h+arg_18]
mov	esi, [esp+30h+arg_0]
lea	edx, [esp+30h+arg_20]
push	edx
push	edi
push	ecx
push	eax
push	esi
mov	dword ptr [esp+44h+arg_C], eax
mov	dword ptr [esp+44h+arg_C+4], ecx
call	sub_781810
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_785644:
mov	esi, [esp+14h+arg_4]
cmp	eax, 4
jnz	loc_785738
test	ebx, ebx
jz	short loc_7856BC
movzx	eax, word ptr [esi]
cmp	ax, [esp+14h+arg_24]
jz	short loc_785666
cmp	ax, [esp+14h+arg_28]
jnz	short loc_7856BC

loc_785666:
push	eax
lea	ecx, [esp+18h+arg_C]
call	sub_7812F0
mov	ecx, dword ptr [esp+14h+arg_C+4]
mov	edx, dword ptr [esp+14h+arg_C]
lea	eax, [esp+14h+arg_20]
push	eax
push	edi
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_781810
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
mov	dword ptr [esp+28h+arg_C+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
lea	eax, [esi+ebx*2]
push	eax
add	esi, 2
push	esi
mov	esi, [esp+38h+arg_0]
push	esi
call	sub_7851A0
add	esp, 28h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_7856BC:
cmp	ebx, 2
jl	short loc_785738
test	ecx, 200h
jz	short loc_785738
and	cl, 38h
cmp	cl, 10h
jnz	short loc_785738
movzx	ecx, word ptr [esi]
push	ecx
lea	ecx, [esp+18h+arg_C]
call	sub_7812F0
movzx	edx, word ptr [esi+2]
push	edx
lea	ecx, [esp+18h+arg_C]
call	sub_7812F0
mov	ecx, dword ptr [esp+14h+arg_C+4]
mov	edx, dword ptr [esp+14h+arg_C]
lea	eax, [esp+14h+arg_20]
push	eax
push	edi
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_781810
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
mov	dword ptr [esp+28h+arg_C+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
lea	eax, [esi+ebx*2]
push	eax
add	esi, 4
push	esi
mov	esi, [esp+38h+arg_0]
push	esi
call	sub_7851A0
add	esp, 28h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn

loc_785738:
mov	edx, dword ptr [esp+14h+arg_C+4]
mov	eax, dword ptr [esp+14h+arg_C]
lea	ecx, [esp+14h+arg_20]
push	ecx
push	edi
push	edx
push	eax
lea	ecx, [esp+24h+arg_18]
push	ecx
call	sub_781810
mov	edx, [eax]
mov	dword ptr [esp+28h+arg_C], edx
mov	ecx, [eax+4]
push	0
mov	dword ptr [esp+2Ch+arg_C+4], ecx
mov	ecx, [eax+4]
lea	edx, [esp+2Ch+arg_8]
push	edx
mov	edx, [eax]
push	ecx
push	edx
lea	eax, [esi+ebx*2]
push	eax
push	esi
mov	esi, [esp+40h+arg_0]
push	esi
call	sub_781880
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn
sub_785560 endp

align 10h



sub_785790 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h
arg_14=	dword ptr  18h
arg_18=	qword ptr  1Ch
arg_20=	byte ptr  24h
arg_24=	word ptr  28h
arg_28=	word ptr  2Ch

mov	ecx, dword ptr [esp+arg_18+4]
push	ebx
mov	ebx, dword ptr [esp+4+arg_18]
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_8]
mov	eax, edi
sub	eax, esi
sar	eax, 1
cdq
cmp	ecx, edx
jg	short loc_7857DA
jl	short loc_7857B4
cmp	ebx, eax
ja	short loc_7857DA

loc_7857B4:
mov	ecx, dword ptr [esp+0Ch+arg_C+4]
mov	edx, dword ptr [esp+0Ch+arg_C]
push	0
lea	eax, [esp+10h+arg_8]
push	eax
push	ecx
push	edx
push	edi
push	esi
mov	esi, [esp+24h+arg_0]
push	esi
call	sub_781880
add	esp, 1Ch
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn

loc_7857DA:
sub	ebx, eax
mov	eax, [esp+0Ch+arg_14]
sbb	ecx, edx
and	eax, 7
push	ebp
mov	ebp, ecx
cmp	eax, 1
jnz	short loc_785837
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
push	0
lea	eax, [esp+14h+arg_8]
push	eax
push	ecx
push	edx
push	edi
lea	eax, [esp+24h+arg_18]
push	esi
push	eax
call	sub_781880
mov	ecx, dword ptr [esp+2Ch+arg_18+4]
mov	eax, dword ptr [esp+2Ch+arg_18]
mov	esi, [esp+2Ch+arg_0]
lea	edx, [esp+2Ch+arg_20]
push	edx
push	ebp
push	ebx
push	ecx
push	eax
push	esi
mov	dword ptr [esp+44h+arg_C], eax
mov	dword ptr [esp+44h+arg_C+4], ecx
call	sub_781540
add	esp, 34h
pop	ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn

loc_785837:
cmp	eax, 4
jnz	short loc_7858A6
cmp	esi, edi
jz	short loc_7858A6
movzx	eax, word ptr [esi]
cmp	ax, [esp+10h+arg_24]
jz	short loc_785851
cmp	ax, [esp+10h+arg_28]
jnz	short loc_7858A6

loc_785851:
movzx	eax, ax
push	eax
lea	ecx, [esp+14h+arg_C]
call	sub_7812F0
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
lea	eax, [esp+10h+arg_20]
push	eax
push	ebp
push	ebx
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_781540
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
mov	dword ptr [esp+28h+arg_C+4], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
push	edi
add	esi, 2
push	esi
mov	esi, [esp+38h+arg_0]
push	esi
call	sub_7851A0
add	esp, 2Ch
pop	ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn

loc_7858A6:
mov	ecx, dword ptr [esp+10h+arg_C+4]
mov	edx, dword ptr [esp+10h+arg_C]
lea	eax, [esp+10h+arg_20]
push	eax
push	ebp
push	ebx
push	ecx
push	edx
lea	eax, [esp+24h+arg_18]
push	eax
call	sub_781540
mov	ecx, [eax]
mov	dword ptr [esp+28h+arg_C], ecx
mov	edx, [eax+4]
push	0
mov	dword ptr [esp+2Ch+arg_C+4], edx
mov	edx, [eax+4]
mov	eax, [eax]
lea	ecx, [esp+2Ch+arg_8]
push	ecx
push	edx
push	eax
push	edi
push	esi
mov	esi, [esp+40h+arg_0]
push	esi
call	sub_781880
add	esp, 34h
pop	ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn
sub_785790 endp

align 10h



sub_785900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
cmp	edi, ecx
jz	loc_7859E4
mov	edx, [esi+10h]
push	ebp
mov	ebp, ecx
sub	ebp, edi
mov	[esp+0Ch+arg_0], ebp
cmp	[esi+118h], esi
jnz	short loc_785931
mov	eax, esi
sub	eax, edx
add	eax, 10h
jmp	short loc_785935

loc_785931:
mov	eax, [esi]
sub	eax, edx

loc_785935:
cmp	ebp, eax
jb	short loc_7859B8
push	ebx
push	ebp
mov	ecx, esi
call	sub_7817C0
mov	[esp+10h+arg_4], eax
lea	ecx, [esi+14h]
cmp	eax, 101h
jbe	short loc_78595C
push	0		; int
push	eax		; size_t
call	sub_780550
mov	ebx, eax
jmp	short loc_78595E

loc_78595C:
mov	ebx, ecx

loc_78595E:
mov	ecx, [esi+10h]
mov	eax, [esi+118h]
cmp	ecx, eax
jnz	short loc_78596F
mov	eax, ebx
jmp	short loc_785984

loc_78596F:
mov	ebp, ecx
sub	ebp, eax
push	ebp
push	eax
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, ebp
mov	ebp, [esp+10h+arg_0]

loc_785984:
push	ebp
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
add	edi, ebp
add	esp, 0Ch
mov	ecx, esi
mov	byte ptr [edi],	0
call	sub_780820
mov	eax, [esp+10h+arg_4]
lea	ecx, [ebx+eax]
mov	[esi+118h], ebx
pop	ebx
pop	ebp
mov	[esi+10h], edi
pop	edi
mov	[esi], ecx
mov	eax, esi
pop	esi
retn	0Ch

loc_7859B8:
mov	al, [edi]
inc	edi
mov	[edx], al
cmp	ecx, edi
jz	short loc_7859D2
sub	ecx, edi
push	ecx
mov	ecx, [esi+10h]
inc	ecx
push	edi
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7859D2:
mov	edx, [esi+10h]
mov	byte ptr [edx+ebp], 0
add	[esi+10h], ebp
pop	ebp
pop	edi
mov	eax, esi
pop	esi
retn	0Ch

loc_7859E4:
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_785900 endp

align 10h



sub_7859F0 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
mov	eax, [edi]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_785A39
mov	eax, dword_1858070
push	esi
mov	esi, [edi]
cmp	[eax], esi
jz	short loc_785A2B
test	esi, esi
jz	short loc_785A32
mov	ecx, esi
call	sub_783970
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
pop	esi
mov	dword ptr [edi], 0
pop	edi
retn

loc_785A2B:
mov	ecx, esi
call	sub_783970

loc_785A32:
mov	dword ptr [edi], 0
pop	esi

loc_785A39:
pop	edi
retn
sub_7859F0 endp

align 10h



sub_785A40 proc	near
mov	eax, [ecx+440h]
retn
sub_785A40 endp

align 10h



sub_785A50 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 3Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3Ch+var_4], eax
mov	ecx, [esp+3Ch+arg_C]
sub	ecx, [esp+3Ch+arg_8]
mov	eax, 2AAAAAABh
imul	ecx
push	ebx
push	ebp
sar	edx, 2
push	esi
mov	esi, [esp+48h+arg_4]
xor	eax, eax
mov	ebx, edx
push	edi
mov	edi, [esp+4Ch+arg_0]
shr	ebx, 1Fh
add	ebx, edx
push	esi
mov	ecx, edi
mov	[esp+50h+var_24], esi
mov	[esp+50h+var_2C], ebx
xor	ebp, ebp
mov	[esp+50h+var_30], eax
mov	[esp+50h+var_3C], ebx
mov	[esp+50h+var_34], ebx
mov	[esp+50h+var_1C], eax
mov	[esp+50h+var_18], eax
mov	[esp+50h+var_14], eax
mov	[esp+50h+var_10], eax
mov	[esp+50h+var_C], eax
mov	[esp+50h+var_8], eax
call	sub_781390
test	al, al
jz	short loc_785ADA

loc_785ABF:
mov	eax, [esp+4Ch+var_34]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn

loc_785AD6:
mov	ebx, [esp+4Ch+var_2C]

loc_785ADA:
cmp	ebp, ebx
mov	[esp+4Ch+var_28], ebx
mov	esi, ebp
jge	loc_785BB4
mov	ecx, [esp+4Ch+arg_8]
lea	eax, [ebp+ebp*2+0]
lea	edx, [ecx+eax*8+14h]
mov	eax, 1
lea	ecx, [esp+4Ch+var_1C]
sub	eax, ecx
mov	[esp+4Ch+var_38], edx
mov	[esp+4Ch+var_20], eax
jmp	short loc_785B10
align 10h

loc_785B10:
cmp	byte ptr [esp+esi+4Ch+var_1C], 0
lea	ebx, [esp+esi+4Ch+var_1C]
jnz	loc_785B9F
cmp	byte ptr [edi+6], 0
jnz	short loc_785B4B
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_785B34
movzx	eax, byte ptr [eax]
jmp	short loc_785B3B

loc_785B34:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_785B3B:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[edi+4], al
mov	[edi+5], cl
mov	byte ptr [edi+6], 1

loc_785B4B:
mov	edx, [esp+4Ch+var_38]
mov	eax, [edx]
mov	dl, [edi+4]
mov	ecx, [esp+4Ch+var_30]
cmp	dl, [eax+ecx]
jnz	short loc_785B8A
mov	edx, [esp+4Ch+var_38]
mov	edx, [edx-4]
sub	edx, eax
dec	edx
cmp	ecx, edx
jnz	short loc_785B7E
mov	[esp+4Ch+var_34], esi
mov	byte ptr [ebx],	1
cmp	esi, ebp
jnz	short loc_785B77
inc	ebp

loc_785B77:
sub	[esp+4Ch+var_3C], 1
jz	short loc_785BF4

loc_785B7E:
mov	eax, [esp+4Ch+var_20]
add	eax, ebx
mov	[esp+4Ch+var_28], eax
jmp	short loc_785BA4

loc_785B8A:
mov	byte ptr [ebx],	1
cmp	esi, ebp
jnz	short loc_785B92
inc	ebp

loc_785B92:
sub	[esp+4Ch+var_3C], 1
jz	loc_785ABF
jmp	short loc_785BA4

loc_785B9F:
cmp	esi, ebp
jnz	short loc_785BA4
inc	ebp

loc_785BA4:
add	[esp+4Ch+var_38], 18h
inc	esi
cmp	esi, [esp+4Ch+var_2C]
jl	loc_785B10

loc_785BB4:
mov	ecx, [esp+4Ch+var_28]
mov	[esp+4Ch+var_2C], ecx
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_785BCC
inc	eax
mov	[ecx+8], eax
jmp	short loc_785BD3

loc_785BCC:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_785BD3:
mov	ecx, [esp+4Ch+var_24]
inc	[esp+4Ch+var_30]
push	ecx
mov	ecx, edi
mov	byte ptr [edi+6], 0
call	sub_781390
test	al, al
jz	loc_785AD6
jmp	loc_785ABF

loc_785BF4:
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_785C1B
inc	eax
mov	[ecx+8], eax
mov	byte ptr [edi+6], 0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn

loc_785C1B:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax
mov	ecx, [esp+4Ch+var_4]
mov	byte ptr [edi+6], 0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn
sub_785A50 endp

align 10h



sub_785C40 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+60h+arg_1C]
mov	edx, [ebp+14h]
mov	[esp+60h+var_50], eax
push	esi
lea	eax, [esp+64h+var_44]
mov	[esp+64h+var_54], eax
push	edi
xor	edi, edi
cmp	edx, [ebp+10h]
mov	eax, 7FFFFFFFh
cdq
setnz	[esp+68h+var_55]
idiv	[esp+68h+arg_8]
mov	ecx, [esp+68h+arg_C]
mov	esi, [esp+68h+arg_0]
mov	[esp+68h+var_4C], ecx
mov	ecx, [esp+68h+var_50]
push	ecx
mov	ecx, esi
mov	[esp+6Ch+var_56], 0
xor	bl, bl
mov	[esp+6Ch+var_48], eax
call	sub_781390
test	al, al
jnz	loc_785D85
jmp	short loc_785CB0
align 10h

loc_785CB0:
cmp	byte ptr [esi+6], 0
jnz	short loc_785CDC
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_785CC5
movzx	eax, byte ptr [eax]
jmp	short loc_785CCC

loc_785CC5:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_785CCC:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_785CDC:
cmp	[esp+68h+var_55], 0
mov	al, [esi+4]
jz	short loc_785CFE
cmp	al, [esp+68h+arg_18]
jnz	short loc_785CFE
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_785D56

loc_785CFE:
movsx	eax, al
cmp	eax, 7Fh
jbe	short loc_785D0D
mov	ecx, 0FFh
jmp	short loc_785D19

loc_785D0D:
push	eax
call	sub_792800
add	esp, 4
movzx	ecx, al

loc_785D19:
mov	edx, [esp+68h+arg_8]
cmp	ecx, edx
jge	short loc_785D85
inc	[esp+68h+arg_10]
inc	bl
cmp	edi, [esp+68h+var_48]
jle	short loc_785D34
mov	[esp+68h+var_56], 1
jmp	short loc_785D56

loc_785D34:
mov	eax, edi
imul	eax, edx
add	eax, ecx
test	edi, edi
jz	short loc_785D54
cmp	[esp+68h+var_56], 0
jnz	short loc_785D4F
cmp	eax, edi
mov	[esp+68h+var_56], 0
jg	short loc_785D54

loc_785D4F:
mov	[esp+68h+var_56], 1

loc_785D54:
mov	edi, eax

loc_785D56:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_785D66
inc	eax
mov	[ecx+8], eax
jmp	short loc_785D6D

loc_785D66:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_785D6D:
mov	ecx, [esp+68h+var_50]
push	ecx
mov	ecx, esi
mov	byte ptr [esi+6], 0
call	sub_781390
test	al, al
jz	loc_785CB0

loc_785D85:
mov	dl, [esp+68h+var_55]
mov	esi, [esp+68h+var_54]
test	dl, dl
jz	short loc_785D9C
lea	eax, [esp+68h+var_44]
cmp	esi, eax
jz	short loc_785D9C
mov	[esi], bl
inc	esi

loc_785D9C:
cmp	[esp+68h+arg_10], 0
jle	short loc_785E00
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_785DB2
mov	eax, 7FFFFFFFh
jmp	short loc_785DC0

loc_785DB2:
cmp	[esp+68h+arg_14], 0
jz	short loc_785DBE
neg	edi

loc_785DBE:
mov	eax, edi

loc_785DC0:
mov	edi, [esp+68h+var_4C]
mov	[edi], eax
test	cl, cl
jnz	short loc_785E00
test	dl, dl
jz	short loc_785DE8
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
lea	ecx, [esp+70h+var_44]
push	esi
push	ecx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_785E00

loc_785DE8:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_785E00:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_785C40 endp

align 10h



sub_785E20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

lea	eax, [ecx+1D0h]
push	eax
sub	ecx, 0FFFFFF80h
push	ecx
lea	ecx, [esp+8+arg_C]
push	ecx
lea	edx, [esp+0Ch+arg_4]
push	edx
call	sub_785A50
mov	ecx, eax
add	esp, 10h
cmp	ecx, 0Eh
jz	short loc_785E86
mov	eax, 24924925h
mul	ecx
mov	eax, ecx
sub	eax, edx
shr	eax, 1
add	eax, edx
shr	eax, 2
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esp+arg_1C]
sub	ecx, edx
mov	edx, [esp+arg_8]
mov	[eax+18h], ecx
mov	ecx, [esp+arg_18]
mov	eax, [esp+arg_0]
mov	dword ptr [ecx], 0
mov	ecx, [esp+arg_4]
mov	[eax], ecx
mov	[eax+4], edx
retn	20h

loc_785E86:
push	esi
mov	esi, [esp+4+arg_18]
lea	edx, [esp+4+arg_C]
push	edx
lea	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 4
call	sub_781390
test	al, al
jz	short loc_785EA6
or	dword ptr [esi], 2

loc_785EA6:
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
pop	esi
mov	[eax], ecx
mov	[eax+4], edx
retn	20h
sub_785E20 endp

align 10h



sub_785EC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

lea	eax, [ecx+410h]
push	eax
add	ecx, 1D0h
push	ecx
lea	ecx, [esp+8+arg_C]
push	ecx
lea	edx, [esp+0Ch+arg_4]
push	edx
call	sub_785A50
mov	ecx, eax
add	esp, 10h
cmp	ecx, 18h
jz	short loc_785F1F
mov	eax, 0AAAAAAABh
mul	ecx
shr	edx, 3
lea	eax, [edx+edx*2]
mov	edx, [esp+arg_1C]
add	eax, eax
add	eax, eax
sub	ecx, eax
mov	eax, [esp+arg_18]
mov	[edx+10h], ecx
mov	edx, [esp+arg_4]
mov	ecx, [esp+arg_8]
mov	dword ptr [eax], 0
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	[eax+4], ecx
retn	20h

loc_785F1F:
push	esi
mov	esi, [esp+4+arg_18]
lea	ecx, [esp+4+arg_C]
push	ecx
lea	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 4
call	sub_781390
test	al, al
jz	short loc_785F3F
or	dword ptr [esi], 2

loc_785F3F:
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_4]
mov	ecx, [esp+4+arg_8]
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
retn	20h
sub_785EC0 endp

align 10h



sub_785F60 proc	near
mov	eax, [ecx+6C0h]
retn
sub_785F60 endp

align 10h



sub_785F70 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 3Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3Ch+var_4], eax
mov	ecx, [esp+3Ch+arg_C]
sub	ecx, [esp+3Ch+arg_8]
mov	eax, 66666667h
imul	ecx
push	ebx
push	ebp
sar	edx, 4
push	esi
mov	esi, [esp+48h+arg_0]
xor	eax, eax
mov	ebx, edx
push	edi
mov	edi, [esp+4Ch+arg_4]
shr	ebx, 1Fh
add	ebx, edx
push	edi
mov	ecx, esi
mov	[esp+50h+var_24], edi
mov	[esp+50h+var_2C], ebx
xor	ebp, ebp
mov	[esp+50h+var_30], eax
mov	[esp+50h+var_3C], ebx
mov	[esp+50h+var_34], ebx
mov	[esp+50h+var_1C], eax
mov	[esp+50h+var_18], eax
mov	[esp+50h+var_14], eax
mov	[esp+50h+var_10], eax
mov	[esp+50h+var_C], eax
mov	[esp+50h+var_8], eax
call	sub_781460
test	al, al
jz	short loc_785FFA

loc_785FDF:
mov	eax, [esp+4Ch+var_34]
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn

loc_785FF6:
mov	ebx, [esp+4Ch+var_2C]

loc_785FFA:
cmp	ebp, ebx
mov	[esp+4Ch+var_28], ebx
mov	edi, ebp
jge	loc_7860E4
mov	ecx, [esp+4Ch+arg_8]
lea	eax, [ebp+ebp*4+0]
lea	edx, [ecx+eax*8+24h]
mov	eax, 1
lea	ecx, [esp+4Ch+var_1C]
sub	eax, ecx
mov	[esp+4Ch+var_38], edx
mov	[esp+4Ch+var_20], eax
jmp	short loc_786030
align 10h

loc_786030:
cmp	byte ptr [esp+edi+4Ch+var_1C], 0
lea	ebx, [esp+edi+4Ch+var_1C]
jnz	loc_7860CF
cmp	byte ptr [esi+7], 0
jnz	short loc_786077
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_786054
movzx	eax, word ptr [eax]
jmp	short loc_78605E

loc_786054:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_78605E:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_786077:
mov	eax, [esp+4Ch+var_38]
mov	eax, [eax]
mov	dx, [esi+4]
mov	ecx, [esp+4Ch+var_30]
cmp	dx, [eax+ecx*2]
jnz	short loc_7860BA
mov	edx, [esp+4Ch+var_38]
mov	edx, [edx-4]
sub	edx, eax
sar	edx, 1
dec	edx
cmp	ecx, edx
jnz	short loc_7860AE
mov	[esp+4Ch+var_34], edi
mov	byte ptr [ebx],	1
cmp	edi, ebp
jnz	short loc_7860A7
inc	ebp

loc_7860A7:
sub	[esp+4Ch+var_3C], 1
jz	short loc_786126

loc_7860AE:
mov	eax, [esp+4Ch+var_20]
add	eax, ebx
mov	[esp+4Ch+var_28], eax
jmp	short loc_7860D4

loc_7860BA:
mov	byte ptr [ebx],	1
cmp	edi, ebp
jnz	short loc_7860C2
inc	ebp

loc_7860C2:
sub	[esp+4Ch+var_3C], 1
jz	loc_785FDF
jmp	short loc_7860D4

loc_7860CF:
cmp	edi, ebp
jnz	short loc_7860D4
inc	ebp

loc_7860D4:
add	[esp+4Ch+var_38], 28h
inc	edi
cmp	edi, [esp+4Ch+var_2C]
jl	loc_786030

loc_7860E4:
mov	ecx, [esp+4Ch+var_28]
mov	[esp+4Ch+var_2C], ecx
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7860FE
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_786105

loc_7860FE:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_786105:
mov	ecx, [esp+4Ch+var_24]
inc	[esp+4Ch+var_30]
push	ecx
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_785FF6
jmp	loc_785FDF

loc_786126:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78614F
add	eax, 2
mov	[ecx+8], eax
mov	eax, edi
pop	edi
mov	byte ptr [esi+7], 0
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn

loc_78614F:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax
mov	ecx, [esp+4Ch+var_4]
mov	eax, edi
pop	edi
mov	byte ptr [esi+7], 0
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn
sub_785F70 endp

align 10h



sub_786170 proc	near

var_56=	byte ptr -56h
var_55=	byte ptr -55h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
mov	eax, [esp+58h+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+60h+arg_1C]
mov	edx, [ebp+14h]
mov	[esp+60h+var_50], eax
push	esi
lea	eax, [esp+64h+var_44]
mov	[esp+64h+var_54], eax
push	edi
xor	edi, edi
cmp	edx, [ebp+10h]
mov	eax, 7FFFFFFFh
cdq
setnz	[esp+68h+var_55]
idiv	[esp+68h+arg_8]
mov	ecx, [esp+68h+arg_C]
mov	esi, [esp+68h+arg_0]
mov	[esp+68h+var_4C], ecx
mov	ecx, [esp+68h+var_50]
push	ecx
mov	ecx, esi
mov	[esp+6Ch+var_56], 0
xor	bl, bl
mov	[esp+6Ch+var_48], eax
call	sub_781460
test	al, al
jnz	loc_7862C5
jmp	short loc_7861E0
align 10h

loc_7861E0:
cmp	byte ptr [esi+7], 0
jnz	short loc_786218
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7861F5
movzx	eax, word ptr [eax]
jmp	short loc_7861FF

loc_7861F5:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_7861FF:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_786218:
cmp	[esp+68h+var_55], 0
movzx	eax, word ptr [esi+4]
jz	short loc_78623C
cmp	ax, [esp+68h+arg_18]
jnz	short loc_78623C
mov	eax, [esp+68h+var_54]
mov	[eax], bl
inc	eax
mov	[esp+68h+var_54], eax
xor	bl, bl
jmp	short loc_786294

loc_78623C:
movzx	eax, ax
cmp	eax, 7Fh
jbe	short loc_78624B
mov	ecx, 0FFh
jmp	short loc_786257

loc_78624B:
push	eax
call	sub_792800
add	esp, 4
movzx	ecx, al

loc_786257:
mov	edx, [esp+68h+arg_8]
cmp	ecx, edx
jge	short loc_7862C5
inc	[esp+68h+arg_10]
inc	bl
cmp	edi, [esp+68h+var_48]
jle	short loc_786272
mov	[esp+68h+var_56], 1
jmp	short loc_786294

loc_786272:
mov	eax, edi
imul	eax, edx
add	eax, ecx
test	edi, edi
jz	short loc_786292
cmp	[esp+68h+var_56], 0
jnz	short loc_78628D
cmp	eax, edi
mov	[esp+68h+var_56], 0
jg	short loc_786292

loc_78628D:
mov	[esp+68h+var_56], 1

loc_786292:
mov	edi, eax

loc_786294:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7862A6
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_7862AD

loc_7862A6:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_7862AD:
mov	eax, [esp+68h+var_50]
push	eax
mov	ecx, esi
mov	byte ptr [esi+7], 0
call	sub_781460
test	al, al
jz	loc_7861E0

loc_7862C5:
mov	dl, [esp+68h+var_55]
mov	esi, [esp+68h+var_54]
test	dl, dl
jz	short loc_7862DC
lea	ecx, [esp+68h+var_44]
cmp	esi, ecx
jz	short loc_7862DC
mov	[esi], bl
inc	esi

loc_7862DC:
cmp	[esp+68h+arg_10], 0
jle	short loc_786340
mov	cl, [esp+68h+var_56]
test	cl, cl
jz	short loc_7862F2
mov	eax, 7FFFFFFFh
jmp	short loc_786300

loc_7862F2:
cmp	[esp+68h+arg_14], 0
jz	short loc_7862FE
neg	edi

loc_7862FE:
mov	eax, edi

loc_786300:
mov	edi, [esp+68h+var_4C]
mov	[edi], eax
test	cl, cl
jnz	short loc_786340
test	dl, dl
jz	short loc_786328
mov	eax, [ebp+10h]
mov	ecx, [ebp+14h]
push	eax
push	ecx
lea	edx, [esp+70h+var_44]
push	esi
push	edx
call	sub_7927B0
add	esp, 10h
test	al, al
jz	short loc_786340

loc_786328:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
mov	ecx, [esp+58h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 58h
retn

loc_786340:
mov	ecx, [esp+68h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 58h
retn
sub_786170 endp

align 10h



sub_786360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

lea	eax, [ecx+2B0h]
push	eax
sub	ecx, 0FFFFFF80h
push	ecx
lea	ecx, [esp+8+arg_C]
push	ecx
lea	edx, [esp+0Ch+arg_4]
push	edx
call	sub_785F70
mov	ecx, eax
add	esp, 10h
cmp	ecx, 0Eh
jz	short loc_7863C6
mov	eax, 24924925h
mul	ecx
mov	eax, ecx
sub	eax, edx
shr	eax, 1
add	eax, edx
shr	eax, 2
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esp+arg_1C]
sub	ecx, edx
mov	edx, [esp+arg_8]
mov	[eax+18h], ecx
mov	ecx, [esp+arg_18]
mov	eax, [esp+arg_0]
mov	dword ptr [ecx], 0
mov	ecx, [esp+arg_4]
mov	[eax], ecx
mov	[eax+4], edx
retn	20h

loc_7863C6:
push	esi
mov	esi, [esp+4+arg_18]
lea	edx, [esp+4+arg_C]
push	edx
lea	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 4
call	sub_781460
test	al, al
jz	short loc_7863E6
or	dword ptr [esi], 2

loc_7863E6:
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
pop	esi
mov	[eax], ecx
mov	[eax+4], edx
retn	20h
sub_786360 endp

align 10h



sub_786400 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

lea	eax, [ecx+670h]
push	eax
add	ecx, 2B0h
push	ecx
lea	ecx, [esp+8+arg_C]
push	ecx
lea	edx, [esp+0Ch+arg_4]
push	edx
call	sub_785F70
mov	ecx, eax
add	esp, 10h
cmp	ecx, 18h
jz	short loc_78645F
mov	eax, 0AAAAAAABh
mul	ecx
shr	edx, 3
lea	eax, [edx+edx*2]
mov	edx, [esp+arg_1C]
add	eax, eax
add	eax, eax
sub	ecx, eax
mov	eax, [esp+arg_18]
mov	[edx+10h], ecx
mov	edx, [esp+arg_4]
mov	ecx, [esp+arg_8]
mov	dword ptr [eax], 0
mov	eax, [esp+arg_0]
mov	[eax], edx
mov	[eax+4], ecx
retn	20h

loc_78645F:
push	esi
mov	esi, [esp+4+arg_18]
lea	ecx, [esp+4+arg_C]
push	ecx
lea	ecx, [esp+8+arg_4]
mov	dword ptr [esi], 4
call	sub_781460
test	al, al
jz	short loc_78647F
or	dword ptr [esi], 2

loc_78647F:
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_4]
mov	ecx, [esp+4+arg_8]
pop	esi
mov	[eax], edx
mov	[eax+4], ecx
retn	20h
sub_786400 endp

align 10h



sub_7864A0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_783C20
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_7864A0 endp

align 10h



sub_7864D0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_783DC0
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_7864D0 endp

align 10h



sub_786500 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	ecx, [esp+arg_14]
sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_18]
push	edi
mov	edi, [esp+10h+arg_0]
push	0
lea	eax, [esp+14h+var_8]
push	eax
push	esi
push	ecx
lea	edx, [esp+20h+arg_C]
push	edx
lea	eax, [esp+24h+arg_4]
push	eax
push	edi
call	sub_783C20
add	esp, 1Ch
test	byte ptr [esi],	4
mov	eax, edi
jnz	short loc_78653E
mov	ecx, [esp+10h+arg_1C]
mov	edx, [esp+10h+var_8]
mov	[ecx], edx

loc_78653E:
pop	edi
pop	esi
add	esp, 8
retn	20h
sub_786500 endp

align 10h



sub_786550 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_783F60
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_786550 endp

align 10h



sub_786580 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_784100
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_786580 endp

align 10h



sub_7865B0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_784290
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_7865B0 endp

align 10h



sub_7865E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_14]
sub	esp, 8
test	dword ptr [eax+8], 100h
push	esi
push	0
jz	short loc_78661E
mov	ecx, [esp+10h+arg_1C]
mov	edx, [esp+10h+arg_18]
mov	esi, [esp+10h+arg_0]
push	ecx
push	edx
push	eax
lea	eax, [esp+1Ch+arg_C]
push	eax
lea	ecx, [esp+20h+arg_4]
push	ecx
push	esi
call	sub_784430
add	esp, 1Ch
mov	eax, esi
pop	esi
add	esp, 8
retn	20h

loc_78661E:
mov	esi, [esp+10h+arg_18]
lea	edx, [esp+10h+arg_18]
push	edx
push	esi
push	eax
lea	eax, [esp+1Ch+arg_C]
push	eax
lea	ecx, [esp+20h+arg_4]
push	ecx
lea	edx, [esp+24h+var_8]
push	edx
call	sub_784290
mov	eax, [esi]
add	esp, 1Ch
test	al, 4
jnz	short loc_786669
mov	ecx, [esp+0Ch+arg_18]
test	ecx, ecx
jnz	short loc_786656
mov	eax, [esp+0Ch+arg_1C]
mov	[eax], cl
jmp	short loc_786669

loc_786656:
cmp	ecx, 1
jnz	short loc_786664
mov	ecx, [esp+0Ch+arg_1C]
mov	byte ptr [ecx],	1
jmp	short loc_786669

loc_786664:
or	eax, 4
mov	[esi], eax

loc_786669:
mov	eax, [esp+0Ch+arg_0]
mov	edx, [esp+0Ch+var_8]
mov	ecx, [esp+0Ch+var_4]
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
add	esp, 8
retn	20h
sub_7865E0 endp

align 10h



sub_786690 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_7846E0
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_786690 endp

align 10h



sub_7866C0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_784870
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_7866C0 endp

align 10h



sub_7866F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	ecx, [esp+arg_14]
sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_18]
push	edi
mov	edi, [esp+10h+arg_0]
push	0
lea	eax, [esp+14h+var_8]
push	eax
push	esi
push	ecx
lea	edx, [esp+20h+arg_C]
push	edx
lea	eax, [esp+24h+arg_4]
push	eax
push	edi
call	sub_7846E0
add	esp, 1Ch
test	byte ptr [esi],	4
mov	eax, edi
jnz	short loc_78672E
mov	ecx, [esp+10h+arg_1C]
mov	edx, [esp+10h+var_8]
mov	[ecx], edx

loc_78672E:
pop	edi
pop	esi
add	esp, 8
retn	20h
sub_7866F0 endp

align 10h



sub_786740 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_784A00
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_786740 endp

align 10h



sub_786770 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_784B90
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_786770 endp

align 10h



sub_7867A0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_784D20
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_7867A0 endp

align 10h



sub_7867D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_14]
sub	esp, 8
test	dword ptr [eax+8], 100h
push	esi
push	0
jz	short loc_78680E
mov	ecx, [esp+10h+arg_1C]
mov	edx, [esp+10h+arg_18]
mov	esi, [esp+10h+arg_0]
push	ecx
push	edx
push	eax
lea	eax, [esp+1Ch+arg_C]
push	eax
lea	ecx, [esp+20h+arg_4]
push	ecx
push	esi
call	sub_784EB0
add	esp, 1Ch
mov	eax, esi
pop	esi
add	esp, 8
retn	20h

loc_78680E:
mov	esi, [esp+10h+arg_18]
lea	edx, [esp+10h+arg_18]
push	edx
push	esi
push	eax
lea	eax, [esp+1Ch+arg_C]
push	eax
lea	ecx, [esp+20h+arg_4]
push	ecx
lea	edx, [esp+24h+var_8]
push	edx
call	sub_784D20
mov	eax, [esi]
add	esp, 1Ch
test	al, 4
jnz	short loc_786859
mov	ecx, [esp+0Ch+arg_18]
test	ecx, ecx
jnz	short loc_786846
mov	eax, [esp+0Ch+arg_1C]
mov	[eax], cl
jmp	short loc_786859

loc_786846:
cmp	ecx, 1
jnz	short loc_786854
mov	ecx, [esp+0Ch+arg_1C]
mov	byte ptr [ecx],	1
jmp	short loc_786859

loc_786854:
or	eax, 4
mov	[esi], eax

loc_786859:
mov	eax, [esp+0Ch+arg_0]
mov	edx, [esp+0Ch+var_8]
mov	ecx, [esp+0Ch+var_4]
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
add	esp, 8
retn	20h
sub_7867D0 endp

align 10h



sub_786880 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_14]
push	ebx
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [esp+20h+arg_C]
mov	ebx, [edi+8]
push	eax
lea	ecx, [esp+24h+var_6]
push	ebx
push	ecx
call	sub_780910
mov	edx, [esp+2Ch+arg_10]
mov	ecx, dword ptr [esp+2Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+30h+arg_4]
push	ebx
push	edi
push	ecx
push	edx
lea	ecx, [esp+40h+var_6]
push	ecx
push	eax
push	esi
call	sub_7851D0
mov	ecx, [esp+4Ch+var_4]
add	esp, 2Ch
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14h
retn
sub_786880 endp




sub_7868E0 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20h+var_4], eax
mov	eax, dword ptr [esp+20h+arg_14+4]
mov	ecx, dword ptr [esp+20h+arg_14]
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
push	edi
mov	edi, [esp+2Ch+arg_C]
mov	ebx, [edi+8]
push	eax
push	ecx
lea	edx, [esp+34h+var_6]
push	ebx
push	edx
call	sub_780A00
mov	ecx, [esp+3Ch+arg_10]
mov	edx, dword ptr [esp+3Ch+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+40h+arg_4]
push	ebx
push	edi
push	edx
push	ecx
lea	edx, [esp+50h+var_6]
push	edx
push	eax
push	esi
call	sub_7851D0
mov	ecx, [esp+5Ch+var_4]
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 20h
retn
sub_7868E0 endp

align 10h



sub_786950 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20h+var_4], eax
mov	eax, dword ptr [esp+20h+arg_14+4]
mov	ecx, dword ptr [esp+20h+arg_14]
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
push	edi
mov	edi, [esp+2Ch+arg_C]
mov	ebx, [edi+8]
push	eax
push	ecx
lea	edx, [esp+34h+var_6]
push	ebx
push	edx
call	sub_780AF0
mov	ecx, [esp+3Ch+arg_10]
mov	edx, dword ptr [esp+3Ch+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+40h+arg_4]
push	ebx
push	edi
push	edx
push	ecx
lea	edx, [esp+50h+var_6]
push	edx
push	eax
push	esi
call	sub_7851D0
mov	ecx, [esp+5Ch+var_4]
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 20h
retn
sub_786950 endp

align 10h



sub_7869C0 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_14]
push	ebx
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [esp+20h+arg_C]
mov	ebx, [edi+8]
push	eax
lea	ecx, [esp+24h+var_6]
push	ebx
push	ecx
call	sub_780BE0
mov	edx, [esp+2Ch+arg_10]
mov	ecx, dword ptr [esp+2Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+30h+arg_4]
push	ebx
push	edi
push	ecx
push	edx
lea	ecx, [esp+40h+var_6]
push	ecx
push	eax
push	esi
call	sub_7851D0
mov	ecx, [esp+4Ch+var_4]
add	esp, 2Ch
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14h
retn
sub_7869C0 endp




sub_786A20 proc	near

var_69=	byte ptr -69h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h
arg_14=	byte ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9A62
mov	eax, large fs:0
push	eax
sub	esp, 60h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+6Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+80h+var_C]
mov	large fs:0, eax
mov	eax, [esp+80h+arg_0]
mov	esi, [esp+80h+arg_C]
lea	ecx, [esp+80h+var_60]
push	ecx
xor	ebp, ebp
mov	ecx, esi
mov	[esp+84h+var_64], eax
mov	[esp+84h+var_68], ebp
call	sub_4325E0
push	offset unk_167EFAC
mov	ecx, eax
mov	[esp+84h+var_4], ebp
call	sub_77FFD0
lea	ecx, [esp+80h+var_60]
mov	edi, eax
mov	[esp+80h+var_4], 0FFFFFFFFh
call	sub_77FF40
cmp	[esp+80h+arg_14], 0
mov	ecx, edi
jz	short loc_786AB7
lea	edx, [esp+80h+var_40]
push	edx
call	sub_781950
lea	ebx, [ebp+1]
jmp	short loc_786AC6

loc_786AB7:
lea	eax, [esp+80h+var_58]
push	eax
call	sub_781990
mov	ebx, 2

loc_786AC6:
push	eax
lea	ecx, [esp+84h+var_28]
mov	[esp+84h+var_68], ebx
mov	[esp+84h+var_4], ebx
call	sub_403850
mov	[esp+80h+var_4], 4
test	bl, 2
jz	short loc_786B21
mov	ecx, [esp+80h+var_44]
and	ebx, 0FFFFFFFDh
lea	edx, [esp+80h+var_58]
mov	[esp+80h+var_68], ebx
cmp	ecx, edx
jz	short loc_786B21
cmp	ecx, ebp
jz	short loc_786B21
mov	eax, [esp+80h+var_58]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_786B17
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_786B21

loc_786B17:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_786B21:
mov	byte ptr [esp+80h+var_4], 5
test	bl, 1
jz	short loc_786B5D
mov	ecx, [esp+80h+var_2C]
lea	eax, [esp+80h+var_40]
cmp	ecx, eax
jz	short loc_786B5D
cmp	ecx, ebp
jz	short loc_786B5D
mov	eax, [esp+80h+var_40]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_786B53
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_786B5D

loc_786B53:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_786B5D:
mov	ebx, [esp+80h+var_18]
mov	edi, [esp+80h+var_14]
mov	eax, [esi+28h]
mov	ecx, [esi+2Ch]
mov	edx, ebx
sub	edx, edi
mov	[esi+28h], ebp
mov	[esi+2Ch], ebp
cmp	edx, eax
jb	short loc_786BE3
mov	edx, [esp+80h+arg_8]
mov	eax, [esp+80h+arg_4]
mov	esi, [esp+80h+var_64]
push	ebp
lea	ecx, [esp+84h+var_69]
push	ecx
push	edx
push	eax
push	ebx
push	edi
push	esi
call	sub_781280
mov	ecx, [esp+9Ch+var_14]
lea	edx, [esp+9Ch+var_28]
add	esp, 1Ch
mov	[esp+80h+var_4], 0FFFFFFFFh
cmp	ecx, edx
jz	loc_786D3B
cmp	ecx, ebp
jz	loc_786D3B
mov	eax, [esp+80h+var_28]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_786BDC
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	loc_786D3B

loc_786BDC:
push	eax
push	ecx
jmp	loc_786D33

loc_786BE3:
mov	esi, [esi+8]
xor	edi, edi
sub	eax, edx
sbb	ecx, edi
and	esi, 7
mov	edi, eax
mov	ebp, ecx
cmp	esi, 1
jnz	loc_786C98
mov	ecx, [esp+80h+arg_8]
mov	edx, [esp+80h+arg_4]
push	0
lea	eax, [esp+84h+var_69]
push	eax
mov	eax, [esp+88h+var_14]
push	ecx
push	edx
push	ebx
push	eax
lea	ecx, [esp+98h+var_60]
push	ecx
call	sub_781280
mov	ecx, [esp+9Ch+var_5C]
mov	eax, [esp+9Ch+var_60]
mov	esi, [esp+9Ch+var_64]
lea	edx, [esp+9Ch+arg_10]
push	edx
push	ebp
push	edi
push	ecx
push	eax
push	esi
mov	[esp+0B4h+arg_4], eax
mov	[esp+0B4h+arg_8], ecx
call	sub_780CD0
mov	eax, [esp+0B4h+var_14]
lea	ecx, [esp+0B4h+var_28]
add	esp, 34h
mov	[esp+80h+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	loc_786D3B
test	eax, eax
jz	loc_786D3B
mov	ecx, [esp+80h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	loc_786D31
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	loc_786D3B

loc_786C98:
mov	eax, [esp+80h+arg_8]
mov	ecx, [esp+80h+arg_4]
lea	edx, [esp+80h+arg_10]
push	edx
push	ebp
push	edi
push	eax
push	ecx
lea	edx, [esp+94h+var_60]
push	edx
call	sub_780CD0
mov	ecx, [eax]
mov	esi, [esp+98h+var_64]
mov	[esp+98h+arg_4], ecx
mov	edx, [eax+4]
push	0
mov	[esp+9Ch+arg_8], edx
mov	edx, [eax+4]
mov	eax, [eax]
lea	ecx, [esp+9Ch+var_69]
push	ecx
mov	ecx, [esp+0A0h+var_18]
push	edx
mov	edx, [esp+0A4h+var_14]
push	eax
push	ecx
push	edx
push	esi
call	sub_781280
mov	eax, [esp+0B4h+var_14]
lea	ecx, [esp+0B4h+var_28]
add	esp, 34h
mov	[esp+80h+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	short loc_786D3B
test	eax, eax
jz	short loc_786D3B
mov	ecx, [esp+80h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_786D31
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_786D3B

loc_786D31:
push	ecx
push	eax

loc_786D33:
call	sub_77E0D0
add	esp, 8

loc_786D3B:
mov	eax, esi
mov	ecx, [esp+80h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+6Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 6Ch
retn
sub_786A20 endp

align 10h



sub_786D60 proc	near

var_99=	byte ptr -99h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h
arg_14=	byte ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9AE4
mov	eax, large fs:0
push	eax
sub	esp, 90h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+9Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0B0h+var_C]
mov	large fs:0, eax
mov	eax, [esp+0B0h+arg_0]
mov	esi, [esp+0B0h+arg_C]
lea	ecx, [esp+0B0h+var_90]
push	ecx
xor	ebp, ebp
mov	ecx, esi
mov	[esp+0B4h+var_94], eax
mov	[esp+0B4h+var_98], ebp
call	sub_4325E0
push	offset unk_167EFC8
mov	ecx, eax
mov	[esp+0B4h+var_4], ebp
call	sub_77FFD0
lea	ecx, [esp+0B0h+var_90]
mov	edi, eax
mov	[esp+0B0h+var_4], 0FFFFFFFFh
call	sub_77FF40
cmp	[esp+0B0h+arg_14], 0
mov	ecx, edi
jz	short loc_786E03
lea	edx, [esp+0B0h+var_60]
push	edx
call	sub_781950
lea	ebx, [ebp+1]
jmp	short loc_786E12

loc_786E03:
lea	eax, [esp+0B0h+var_88]
push	eax
call	sub_781990
mov	ebx, 2

loc_786E12:
push	eax
lea	ecx, [esp+0B4h+var_38]
mov	[esp+0B4h+var_98], ebx
mov	[esp+0B4h+var_4], ebx
call	sub_403400
mov	[esp+0B0h+var_4], 4
test	bl, 2
jz	short loc_786E74
mov	ecx, [esp+0B0h+var_64]
and	ebx, 0FFFFFFFDh
lea	edx, [esp+0B0h+var_88]
mov	[esp+0B0h+var_98], ebx
cmp	ecx, edx
jz	short loc_786E74
cmp	ecx, ebp
jz	short loc_786E74
mov	eax, [esp+0B0h+var_88]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_786E6A
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_786E74

loc_786E6A:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_786E74:
mov	byte ptr [esp+0B0h+var_4], 5
test	bl, 1
jz	short loc_786EB7
mov	ecx, [esp+0B0h+var_3C]
lea	eax, [esp+0B0h+var_60]
cmp	ecx, eax
jz	short loc_786EB7
cmp	ecx, ebp
jz	short loc_786EB7
mov	eax, [esp+0B0h+var_60]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_786EAD
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_786EB7

loc_786EAD:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_786EB7:
mov	ebx, [esp+0B0h+var_18]
mov	edi, [esp+0B0h+var_14]
mov	ecx, [esi+28h]
mov	edx, [esi+2Ch]
mov	eax, ebx
sub	eax, edi
sar	eax, 1
mov	[esi+28h], ebp
mov	[esi+2Ch], ebp
cmp	eax, ecx
jb	short loc_786F4C
mov	edx, [esp+0B0h+arg_8]
mov	eax, [esp+0B0h+arg_4]
mov	esi, [esp+0B0h+var_94]
push	ebp
lea	ecx, [esp+0B4h+var_99]
push	ecx
push	edx
push	eax
push	ebx
push	edi
push	esi
call	sub_781880
mov	ecx, [esp+0CCh+var_14]
lea	edx, [esp+0CCh+var_38]
add	esp, 1Ch
mov	[esp+0B0h+var_4], 0FFFFFFFFh
cmp	ecx, edx
jz	loc_787075
cmp	ecx, ebp
jz	loc_787075
mov	eax, [esp+0B0h+var_38]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	loc_78706B
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	loc_787075

loc_786F4C:
xor	edi, edi
sub	ecx, eax
mov	eax, [esi+8]
sbb	edx, edi
and	eax, 7
mov	edi, ecx
mov	ebp, edx
cmp	eax, 1
jnz	short loc_786FCC
mov	ecx, [esp+0B0h+arg_8]
mov	edx, [esp+0B0h+arg_4]
push	0
lea	eax, [esp+0B4h+var_99]
push	eax
mov	eax, [esp+0B8h+var_14]
push	ecx
push	edx
push	ebx
push	eax
lea	ecx, [esp+0C8h+var_90]
push	ecx
call	sub_781880
mov	ecx, [esp+0CCh+var_8C]
mov	eax, [esp+0CCh+var_90]
mov	esi, [esp+0CCh+var_94]
lea	edx, [esp+0CCh+arg_10]
push	edx
push	ebp
push	edi
push	ecx
push	eax
push	esi
mov	[esp+0E4h+arg_4], eax
mov	[esp+0E4h+arg_8], ecx
call	sub_781540
mov	ecx, [esp+0E4h+var_14]
lea	eax, [esp+0E4h+var_38]
add	esp, 34h
cmp	ecx, eax
jmp	short loc_78703E

loc_786FCC:
mov	edx, [esp+0B0h+arg_8]
mov	eax, [esp+0B0h+arg_4]
lea	ecx, [esp+0B0h+arg_10]
push	ecx
push	ebp
push	edi
push	edx
push	eax
lea	ecx, [esp+0C4h+var_90]
push	ecx
call	sub_781540
mov	edx, [eax]
mov	esi, [esp+0C8h+var_94]
mov	[esp+0C8h+arg_4], edx
mov	ecx, [eax+4]
push	0
mov	[esp+0CCh+arg_8], ecx
mov	ecx, [eax+4]
lea	edx, [esp+0CCh+var_99]
push	edx
mov	edx, [eax]
mov	eax, [esp+0D0h+var_18]
push	ecx
mov	ecx, [esp+0D4h+var_14]
push	edx
push	eax
push	ecx
push	esi
call	sub_781880
mov	ecx, [esp+0E4h+var_14]
lea	edx, [esp+0E4h+var_38]
add	esp, 34h
cmp	ecx, edx

loc_78703E:
mov	[esp+0B0h+var_4], 0FFFFFFFFh
jz	short loc_787075
test	ecx, ecx
jz	short loc_787075
mov	eax, [esp+0B0h+var_38]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78706B
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_787075

loc_78706B:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_787075:
mov	eax, esi
mov	ecx, [esp+0B0h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+9Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 9Ch
retn
sub_786D60 endp

align 10h



sub_7870A0 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_12C9B28
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
push	ebx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+38h+var_C]
mov	large fs:0, eax
mov	eax, [esp+38h+arg_0]
mov	ecx, [esp+38h+arg_4]
mov	edx, [esp+38h+arg_8]
lea	esi, [esp+38h+var_28]
mov	[esp+38h+var_18], esi
mov	[esp+38h+var_14], esi
mov	byte ptr [esp+38h+var_28], 0
lea	esi, [esp+38h+var_29]
push	esi
lea	esi, [esp+3Ch+var_28]
push	esi
push	0
push	0
push	0
push	edx
push	0Ah
push	ecx
push	eax
mov	[esp+5Ch+var_4], 0
call	sub_785C40
mov	bl, al
mov	eax, [esp+5Ch+var_14]
mov	ecx, esi
add	esp, 24h
mov	[esp+38h+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	short loc_78714D
test	eax, eax
jz	short loc_78714D
mov	ecx, [esp+38h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_787143
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78714D

loc_787143:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78714D:
mov	al, bl
mov	ecx, [esp+38h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
pop	ebx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn
sub_7870A0 endp

align 10h



sub_787170 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_12C9B28
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
push	ebx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+38h+var_C]
mov	large fs:0, eax
mov	eax, [esp+38h+arg_0]
mov	ecx, [esp+38h+arg_4]
mov	edx, [esp+38h+arg_8]
lea	esi, [esp+38h+var_28]
mov	[esp+38h+var_18], esi
mov	[esp+38h+var_14], esi
mov	byte ptr [esp+38h+var_28], 0
lea	esi, [esp+38h+var_29]
push	esi
lea	esi, [esp+3Ch+var_28]
push	esi
push	0
push	0
push	0
push	edx
push	0Ah
push	ecx
push	eax
mov	[esp+5Ch+var_4], 0
call	sub_786170
mov	bl, al
mov	eax, [esp+5Ch+var_14]
mov	ecx, esi
add	esp, 24h
mov	[esp+38h+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	short loc_78721D
test	eax, eax
jz	short loc_78721D
mov	ecx, [esp+38h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_787213
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78721D

loc_787213:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78721D:
mov	al, bl
mov	ecx, [esp+38h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
pop	ebx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn
sub_787170 endp

align 10h



sub_787240 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_12C9B58
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
push	ebx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	eax, [esp+34h+arg_0]
mov	ecx, [esp+34h+arg_8]
lea	edx, [esp+34h+var_28]
mov	[esp+34h+var_18], edx
mov	[esp+34h+var_14], edx
mov	byte ptr [esp+34h+var_28], 0
lea	edx, [esp+34h+var_29]
push	edx
lea	edx, [esp+38h+var_28]
push	edx
push	0
push	0
push	0
push	ecx
mov	ecx, [esp+4Ch+arg_4]
push	0Ah
push	ecx
push	eax
mov	[esp+58h+var_4], 0
call	sub_780E40
mov	bl, al
mov	eax, [esp+58h+var_14]
lea	edx, [esp+58h+var_28]
add	esp, 24h
mov	[esp+34h+var_4], 0FFFFFFFFh
cmp	eax, edx
jz	short loc_7872EE
test	eax, eax
jz	short loc_7872EE
mov	ecx, [esp+34h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_7872E4
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7872EE

loc_7872E4:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_7872EE:
mov	al, bl
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn
sub_787240 endp

align 10h



sub_787310 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_12C9B58
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
push	ebx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	eax, [esp+34h+arg_0]
mov	ecx, [esp+34h+arg_8]
lea	edx, [esp+34h+var_28]
mov	[esp+34h+var_18], edx
mov	[esp+34h+var_14], edx
mov	byte ptr [esp+34h+var_28], 0
lea	edx, [esp+34h+var_29]
push	edx
lea	edx, [esp+38h+var_28]
push	edx
push	0
push	0
push	0
push	ecx
mov	ecx, [esp+4Ch+arg_4]
push	0Ah
push	ecx
push	eax
mov	[esp+58h+var_4], 0
call	sub_781060
mov	bl, al
mov	eax, [esp+58h+var_14]
lea	edx, [esp+58h+var_28]
add	esp, 24h
mov	[esp+34h+var_4], 0FFFFFFFFh
cmp	eax, edx
jz	short loc_7873BE
test	eax, eax
jz	short loc_7873BE
mov	ecx, [esp+34h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_7873B4
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7873BE

loc_7873B4:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_7873BE:
mov	al, bl
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn
sub_787310 endp

align 10h



; int __stdcall	sub_7873E0(size_t, int)
sub_7873E0 proc	near

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12C9B88
mov	eax, large fs:0
push	eax
sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+2Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+40h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+40h+arg_0]
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [esi+14h]
mov	edx, ecx
sub	edx, eax
cmp	ebp, edx
ja	short loc_787464
movsx	ecx, byte ptr [esp+40h+arg_4]
push	ebp		; size_t
push	ecx		; int
push	eax		; void *
call	_memset
mov	edi, [esi+14h]
mov	ebx, [esi+10h]
add	edi, ebp
add	esp, 0Ch
cmp	edi, ebx
jz	loc_787502
mov	eax, ebx
sub	eax, ebx
add	eax, 1
jz	short loc_78745A
push	eax
push	ebx
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_78745A:
sub	edi, ebx
add	[esi+10h], edi
jmp	loc_787502

loc_787464:
cmp	eax, esi
jnz	short loc_78746F
mov	edx, 10h
jmp	short loc_787473

loc_78746F:
mov	edx, [esi]
sub	edx, eax

loc_787473:
dec	edx
cmp	ebp, edx
jnb	short loc_78749F
mov	ebx, [esp+40h+arg_4]
sub	ecx, eax
movsx	edx, bl
push	ecx		; size_t
push	edx		; int
push	eax		; void *
call	_memset
mov	eax, [esi+14h]
sub	eax, [esi+10h]
add	esp, 0Ch
push	ebx
add	eax, ebp
push	eax
mov	ecx, esi
call	sub_43A580
jmp	short loc_787502

loc_78749F:
mov	edx, [esp+40h+arg_4]
lea	ecx, [esp+40h+var_29]
push	ecx
push	edx
push	ebp
lea	ecx, [esp+4Ch+var_28]
call	sub_63FE60
lea	eax, [esp+40h+var_28]
push	eax
mov	ecx, esi
mov	[esp+44h+var_4], 0
call	sub_4386C0
mov	eax, [esp+40h+var_14]
lea	ecx, [esp+40h+var_28]
mov	[esp+40h+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	short loc_787502
test	eax, eax
jz	short loc_787502
mov	ecx, [esp+40h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_7874F8
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_787502

loc_7874F8:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_787502:
mov	eax, esi
mov	ecx, [esp+40h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+2Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 2Ch
retn	8
sub_7873E0 endp

align 10h



sub_787530 proc	near

var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12C9BB8
mov	eax, large fs:0
push	eax
sub	esp, 30h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+50h+var_C]
mov	large fs:0, eax
mov	edx, [esp+50h+arg_0]
mov	esi, ecx
mov	eax, [esi+20h]
mov	edi, [esi+24h]
mov	ecx, eax
sub	ecx, edi
sar	ecx, 1
cmp	edx, ecx
ja	short loc_7875CB
test	edx, edx
jbe	short loc_787595
mov	eax, [esp+50h+arg_4]
movzx	ebx, ax
mov	eax, ebx
shl	ebx, 10h
or	eax, ebx
mov	ecx, edx
shr	ecx, 1
rep stosd
adc	ecx, ecx
rep stosw

loc_787595:
mov	eax, [esi+24h]
mov	edi, [esi+20h]
lea	ebx, [eax+edx*2]
cmp	ebx, edi
jz	loc_78767D
mov	ecx, edi
sub	ecx, edi
sar	ecx, 1
lea	edx, [ecx+ecx+2]
push	edx
push	edi
push	ebx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
sub	edi, ebx
sar	edi, 1
neg	edi
add	edi, edi
add	esp, 0Ch
add	[esi+20h], edi
jmp	loc_78767D

loc_7875CB:
cmp	edi, esi
jnz	short loc_7875D6
mov	ecx, 10h
jmp	short loc_7875DC

loc_7875D6:
mov	ecx, [esi]
sub	ecx, edi
sar	ecx, 1

loc_7875DC:
dec	ecx
cmp	edx, ecx
jnb	short loc_787617
mov	ebx, [esp+50h+arg_4]
sub	eax, edi
sar	eax, 1
jz	short loc_787602
mov	ecx, eax
mov	eax, ebx
movzx	ebp, ax
mov	eax, ebp
shl	ebp, 10h
or	eax, ebp
shr	ecx, 1
rep stosd
adc	ecx, ecx
rep stosw

loc_787602:
mov	eax, [esi+20h]
sub	eax, [esi+24h]
push	ebx
sar	eax, 1
sub	edx, eax
push	edx
mov	ecx, esi
call	sub_43AFB0
jmp	short loc_78767D

loc_787617:
mov	eax, [esp+50h+arg_4]
lea	ecx, [esp+50h+var_39]
push	ecx
push	eax
push	edx
lea	ecx, [esp+5Ch+var_38]
call	sub_785450
lea	ecx, [esp+50h+var_38]
push	ecx
mov	ecx, esi
mov	[esp+54h+var_4], 0
call	sub_783510
mov	ecx, [esp+50h+var_14]
lea	edx, [esp+50h+var_38]
mov	[esp+50h+var_4], 0FFFFFFFFh
cmp	ecx, edx
jz	short loc_78767D
test	ecx, ecx
jz	short loc_78767D
mov	eax, [esp+50h+var_38]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_787673
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78767D

loc_787673:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78767D:
mov	eax, esi
mov	ecx, [esp+50h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn	8
sub_787530 endp




sub_7876A0 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	byte ptr -90h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_12C9BF6
mov	eax, large fs:0
push	eax
sub	esp, 0ACh
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0B8h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0CCh+var_C]
mov	large fs:0, eax
mov	eax, [esp+0CCh+arg_0]
mov	ebp, [esp+0CCh+arg_14]
mov	ebx, [esp+0CCh+arg_4]
mov	edi, [esp+0CCh+arg_8]
lea	ecx, [esp+0CCh+var_B8]
push	ecx
mov	ecx, ebp
mov	[esp+0D0h+var_AC], eax
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+0D0h+var_B8]
mov	[esp+0D0h+var_4], 0
call	sub_77FFD0
mov	esi, eax
mov	edx, [esi]
mov	eax, [edx+28h]
push	2Bh
mov	ecx, esi
call	eax
mov	edx, [esi]
movzx	ecx, ax
mov	eax, [edx+28h]
mov	[esp+0CCh+var_B4], ecx
push	2Dh
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	edx, [edx+24h]
movzx	ecx, ax
lea	eax, [esp+0CCh+var_90]
push	eax
push	edi
mov	[esp+0D4h+var_B0], ecx
push	ebx
mov	ecx, esi
call	edx
sub	edi, ebx
push	offset unk_167EFC8
lea	ecx, [esp+0D0h+var_B8]
lea	ebx, [esp+edi*2+0D0h+var_90]
call	sub_77FFD0
mov	esi, eax
lea	eax, [esp+0CCh+var_A8]
push	eax
mov	ecx, esi
call	sub_781970
mov	ecx, [esp+0CCh+var_94]
mov	byte ptr [esp+0CCh+var_4], 1
cmp	ecx, [esp+0CCh+var_98]
jz	short loc_7877E2
mov	eax, [esp+0CCh+arg_18]
test	eax, 200h
jz	short loc_7877B3
and	eax, 38h
cmp	eax, 10h
jz	short loc_7877AC
xor	edx, edx
cmp	eax, 20h
setz	dl
mov	edi, edx
jmp	short loc_7877B5

loc_7877AC:
mov	edi, 2
jmp	short loc_7877B5

loc_7877B3:
xor	edi, edi

loc_7877B5:
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
mov	ecx, [esp+0CCh+var_B0]
mov	edx, [esp+0CCh+var_B4]
push	edi
push	ecx
movzx	eax, ax
push	edx
push	eax
lea	eax, [esp+0DCh+var_A8]
push	eax
lea	ecx, [esp+0E0h+var_90]
push	ebx
push	ecx
call	sub_793C00
add	esp, 1Ch
mov	edi, eax

loc_7877E2:
mov	edx, [esp+0CCh+var_B0]
mov	ecx, [ebp+2Ch]
mov	eax, [ebp+28h]
push	edx
mov	edx, [esp+0D0h+var_B4]
push	edx
mov	edx, [esp+0D4h+arg_1C]
push	edx
mov	edx, dword ptr [esp+0D8h+arg_C]
push	ecx
mov	ecx, dword ptr [esp+0DCh+arg_C+4]
push	eax
mov	eax, [esp+0E0h+arg_18]
push	eax
push	ecx
push	edx
push	edi
mov	edi, [esp+0F0h+var_AC]
lea	eax, [esp+0F0h+var_90]
push	eax
xor	esi, esi
push	edi
mov	[ebp+28h], esi
mov	[ebp+2Ch], esi
call	sub_785560
mov	eax, [esp+0F8h+var_94]
lea	ecx, [esp+0F8h+var_A8]
add	esp, 2Ch
mov	byte ptr [esp+0CCh+var_4], 0
cmp	eax, ecx
jz	short loc_78786A
cmp	eax, esi
jz	short loc_78786A
mov	ecx, [esp+0CCh+var_A8]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_787860
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78786A

loc_787860:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78786A:
lea	ecx, [esp+0CCh+var_B8]
call	sub_77FF40
mov	eax, edi
mov	ecx, [esp+0CCh+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+0B8h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 0B8h
retn
sub_7876A0 endp

align 10h



sub_7878A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	[esi+118h], esi
jnz	short loc_7878B5
mov	eax, esi
sub	eax, [esi+10h]
add	eax, 10h
jmp	short loc_7878BA

loc_7878B5:
mov	eax, [esi]
sub	eax, [esi+10h]

loc_7878BA:
cmp	eax, 1
jnz	short loc_7878CD
push	eax
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_7878CD:
mov	eax, [esi+10h]
mov	dl, [esp+4+arg_0]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], dl
inc	dword ptr [esi+10h]
pop	esi
retn	4
sub_7878A0 endp

align 10h



sub_7878F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	byte ptr  20h

lea	eax, [esp+arg_C]
push	eax
lea	ecx, [esp+4+arg_4]
call	sub_781390
mov	ecx, [esp+arg_4]
test	al, al
jnz	short loc_787976
cmp	byte ptr [esp+arg_8+2],	al
jnz	short loc_787939
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787919
movzx	eax, byte ptr [eax]
jmp	short loc_787924

loc_787919:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
mov	ecx, [esp+arg_4]

loc_787924:
cmp	eax, 0FFFFFFFFh
setz	dl
mov	byte ptr [esp+arg_8], al
mov	byte ptr [esp+arg_8+1],	dl
mov	byte ptr [esp+arg_8+2],	1
jmp	short loc_78793D

loc_787939:
mov	al, byte ptr [esp+arg_8]

loc_78793D:
cmp	al, [esp+arg_18]
jz	short loc_787958
cmp	al, [esp+arg_1C]
jnz	short loc_787976
mov	ecx, [esp+arg_14]
push	2Dh
call	sub_7878A0
mov	ecx, [esp+arg_4]

loc_787958:
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787966
inc	eax
mov	[ecx+8], eax
jmp	short loc_78796D

loc_787966:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_78796D:
mov	ecx, [esp+arg_4]
mov	byte ptr [esp+arg_8+2],	0

loc_787976:
mov	eax, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_8]
mov	[eax+4], ecx
retn
sub_7878F0 endp

align 10h



sub_787990 proc	near

var_5A=	byte ptr -5Ah
var_59=	byte ptr -59h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= dword ptr  10h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 5Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+5Ch+var_4], eax
mov	ecx, [esp+5Ch+arg_1C]
mov	eax, [esp+5Ch+arg_18]
push	ebx
push	ebp
push	esi
mov	esi, [esp+68h+arg_C]
push	edi
mov	edi, [esp+6Ch+arg_0]
lea	edx, [esp+6Ch+arg_4]
mov	[esp+6Ch+var_4C], ecx
lea	ebp, [esp+28h]
push	edx
mov	ecx, edi
mov	[esp+70h+var_50], eax
mov	[esp+70h+var_59], 0
mov	[esp+70h+var_58], ebp
mov	[esp+70h+var_5A], 0
call	sub_781390
test	al, al
jnz	loc_787B00

loc_7879E0:
cmp	byte ptr [edi+6], 0
jnz	short loc_787A0C
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7879F5
movzx	eax, byte ptr [eax]
jmp	short loc_7879FC

loc_7879F5:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_7879FC:
cmp	eax, 0FFFFFFFFh
mov	[edi+4], al
setz	al
mov	[edi+5], al
mov	byte ptr [edi+6], 1

loc_787A0C:
mov	bl, [edi+4]
cmp	bl, [esp+6Ch+arg_14]
jz	short loc_787A2B
mov	cl, bl
sub	cl, 30h
cmp	cl, 9
ja	loc_787AF0
cmp	bl, 2Ch
jnz	short loc_787A41

loc_787A2B:
mov	dl, [esp+6Ch+var_5A]
mov	[ebp+44h+var_44], dl
inc	ebp
mov	[esp+6Ch+var_58], ebp
mov	[esp+6Ch+var_5A], 0
jmp	loc_787AC1

loc_787A41:
mov	edx, [esi+118h]
mov	eax, [esi+10h]
mov	[esp+6Ch+var_59], 1
cmp	edx, esi
jnz	short loc_787A5C
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_787A60

loc_787A5C:
mov	ecx, [esi]
sub	ecx, eax

loc_787A60:
mov	ebp, 1
cmp	ecx, ebp
jnz	short loc_787AAA
sub	eax, edx
mov	ecx, 0FFFFFFFEh
sub	ecx, eax
mov	[esp+6Ch+var_48], ebp
mov	[esp+6Ch+var_54], eax
cmp	ecx, ebp
jb	loc_787B37
lea	ecx, [esp+6Ch+var_54]
cmp	eax, ebp
ja	short loc_787A8E
lea	ecx, [esp+6Ch+var_48]

loc_787A8E:
mov	edx, [ecx]
lea	ecx, [edx+eax+1]
cmp	ecx, 0FFFFFFFEh
ja	short loc_787A9D
cmp	ecx, eax
jnb	short loc_787AA2

loc_787A9D:
mov	ecx, 0FFFFFFFEh

loc_787AA2:		; size_t
push	ecx
mov	ecx, esi
call	sub_7854D0

loc_787AAA:
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], bl
add	[esi+10h], ebp
inc	[esp+6Ch+var_5A]
mov	ebp, [esp+6Ch+var_58]

loc_787AC1:
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787AD1
inc	eax
mov	[ecx+8], eax
jmp	short loc_787AD8

loc_787AD1:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_787AD8:
lea	ecx, [esp+6Ch+arg_4]
push	ecx
mov	ecx, edi
mov	byte ptr [edi+6], 0
call	sub_781390
test	al, al
jz	loc_7879E0

loc_787AF0:
lea	edx, [esp+6Ch+var_44]
cmp	ebp, edx
jz	short loc_787B00
mov	al, [esp+6Ch+var_5A]
mov	[ebp+44h+var_44], al
inc	ebp

loc_787B00:
mov	eax, [esp+6Ch+var_50]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
lea	ecx, [esp+74h+var_44]
push	ebp
push	ecx
call	sub_7927B0
mov	edx, [esp+7Ch+var_4C]
mov	ecx, [esp+7Ch+var_4]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	[edx], al
mov	al, [esp+5Ch+var_59]
xor	ecx, esp
call	sub_7999A3
add	esp, 5Ch
retn

loc_787B37:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_787990 endp

align 10h



sub_787B50 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= dword ptr  10h

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
lea	eax, [esp+18h+arg_4]
push	eax
mov	ecx, edi
mov	[esp+1Ch+var_9], 0
call	sub_781390
test	al, al
jnz	loc_787C55
mov	esi, [esp+18h+arg_C]

loc_787B77:
cmp	byte ptr [edi+6], 0
jnz	short loc_787BA3
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787B8C
movzx	eax, byte ptr [eax]
jmp	short loc_787B93

loc_787B8C:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_787B93:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[edi+4], al
mov	[edi+5], cl
mov	byte ptr [edi+6], 1

loc_787BA3:
mov	bl, [edi+4]
mov	dl, bl
sub	dl, 30h
cmp	dl, 9
ja	loc_787C55
mov	edx, [esi+118h]
mov	eax, [esi+10h]
cmp	edx, esi
jnz	short loc_787BCA
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_787BCE

loc_787BCA:
mov	ecx, [esi]
sub	ecx, eax

loc_787BCE:
cmp	ecx, 1
jnz	short loc_787C12
mov	[esp+18h+var_4], ecx
sub	eax, edx
mov	ecx, 0FFFFFFFEh
sub	ecx, eax
mov	[esp+18h+var_8], eax
cmp	ecx, 1
jb	short loc_787C60
lea	ecx, [esp+18h+var_8]
cmp	eax, 1
ja	short loc_787BF6
lea	ecx, [esp+18h+var_4]

loc_787BF6:
mov	edx, [ecx]
lea	ecx, [edx+eax+1]
cmp	ecx, 0FFFFFFFEh
ja	short loc_787C05
cmp	ecx, eax
jnb	short loc_787C0A

loc_787C05:
mov	ecx, 0FFFFFFFEh

loc_787C0A:		; size_t
push	ecx
mov	ecx, esi
call	sub_7854D0

loc_787C12:
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], bl
inc	dword ptr [esi+10h]
mov	ecx, [edi]
mov	eax, [ecx+8]
mov	[esp+18h+var_9], 1
cmp	eax, [ecx+0Ch]
jnb	short loc_787C36
inc	eax
mov	[ecx+8], eax
jmp	short loc_787C3D

loc_787C36:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_787C3D:
lea	ecx, [esp+18h+arg_4]
push	ecx
mov	ecx, edi
mov	byte ptr [edi+6], 0
call	sub_781390
test	al, al
jz	loc_787B77

loc_787C55:
mov	al, [esp+18h+var_9]
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn

loc_787C60:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_787B50 endp

align 10h



sub_787C70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	word ptr  20h

lea	eax, [esp+arg_C]
push	eax
lea	ecx, [esp+4+arg_4]
call	sub_781460
mov	ecx, [esp+arg_4]
test	al, al
jnz	loc_787D0B
cmp	byte ptr [esp+arg_8+3],	al
jnz	short loc_787CC9
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787C9D
movzx	eax, word ptr [eax]
jmp	short loc_787CAB

loc_787C9D:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
mov	ecx, [esp+arg_4]
movzx	eax, ax

loc_787CAB:
movzx	eax, ax
mov	edx, 0FFFFh
cmp	ax, dx
setz	dl
mov	word ptr [esp+arg_8], ax
mov	byte ptr [esp+arg_8+2],	dl
mov	byte ptr [esp+arg_8+3],	1
jmp	short loc_787CCE

loc_787CC9:
mov	ax, word ptr [esp+arg_8]

loc_787CCE:
cmp	ax, [esp+arg_18]
jz	short loc_787CEB
cmp	ax, [esp+arg_1C]
jnz	short loc_787D0B
mov	ecx, [esp+arg_14]
push	2Dh
call	sub_7878A0
mov	ecx, [esp+arg_4]

loc_787CEB:
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787CFB
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_787D02

loc_787CFB:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_787D02:
mov	ecx, [esp+arg_4]
mov	byte ptr [esp+arg_8+3],	0

loc_787D0B:
mov	eax, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_8]
mov	[eax+4], ecx
retn
sub_787C70 endp

align 10h



sub_787D20 proc	near

var_62=	byte ptr -62h
var_61=	byte ptr -61h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

sub	esp, 64h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+64h+var_4], eax
mov	eax, [esp+64h+arg_10]
mov	ecx, [esp+64h+arg_18]
mov	edx, [esp+64h+arg_1C]
push	ebx
push	esi
mov	esi, [esp+6Ch+arg_C]
push	edi
mov	edi, [esp+70h+arg_0]
mov	[esp+70h+var_58], eax
lea	eax, [esp+70h+arg_4]
mov	[esp+70h+var_54], ecx
lea	ebx, [esp+70h+var_44]
push	eax
mov	ecx, edi
mov	[esp+74h+var_4C], edx
mov	[esp+74h+var_61], 0
mov	[esp+74h+var_5C], ebx
mov	[esp+74h+var_62], 0
call	sub_781460
test	al, al
jnz	loc_787EBC
lea	ecx, [ecx+0]

loc_787D80:
cmp	byte ptr [edi+7], 0
jnz	short loc_787DB8
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787D95
movzx	eax, word ptr [eax]
jmp	short loc_787D9F

loc_787D95:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_787D9F:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[edi+4], ax
mov	[edi+6], dl
mov	byte ptr [edi+7], 1

loc_787DB8:
movzx	eax, word ptr [edi+4]
mov	ecx, [esp+70h+var_58]
mov	edx, [esp+70h+arg_14]
push	ecx
mov	[esp+74h+var_60], eax
push	edx
lea	eax, [esp+78h+var_60]
push	eax
call	sub_7928E0
add	esp, 0Ch
test	al, al
jz	loc_787EAD
mov	eax, [esp+70h+var_60]
cmp	ax, 2Ch
jnz	short loc_787DFE
mov	cl, [esp+70h+var_62]
mov	[ebx], cl
inc	ebx
mov	[esp+70h+var_5C], ebx
mov	[esp+70h+var_62], 0
jmp	short loc_787E7C

loc_787DFE:
mov	edx, [esi+118h]
mov	bl, al
mov	eax, [esi+10h]
mov	[esp+70h+var_61], 1
cmp	edx, esi
jnz	short loc_787E1B
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_787E1F

loc_787E1B:
mov	ecx, [esi]
sub	ecx, eax

loc_787E1F:
cmp	ecx, 1
jnz	short loc_787E65
sub	eax, edx
mov	edx, 0FFFFFFFEh
sub	edx, eax
mov	[esp+70h+var_48], ecx
mov	[esp+70h+var_50], eax
cmp	edx, ecx
jb	loc_787EF2
cmp	eax, ecx
lea	ecx, [esp+70h+var_50]
ja	short loc_787E49
lea	ecx, [esp+70h+var_48]

loc_787E49:
mov	ecx, [ecx]
lea	ecx, [ecx+eax+1]
cmp	ecx, 0FFFFFFFEh
ja	short loc_787E58
cmp	ecx, eax
jnb	short loc_787E5D

loc_787E58:
mov	ecx, 0FFFFFFFEh

loc_787E5D:		; size_t
push	ecx
mov	ecx, esi
call	sub_7854D0

loc_787E65:
mov	edx, [esi+10h]
mov	byte ptr [edx+1], 0
mov	eax, [esi+10h]
mov	[eax], bl
inc	dword ptr [esi+10h]
inc	[esp+70h+var_62]
mov	ebx, [esp+70h+var_5C]

loc_787E7C:
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787E8E
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_787E95

loc_787E8E:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_787E95:
lea	ecx, [esp+70h+arg_4]
push	ecx
mov	ecx, edi
mov	byte ptr [edi+7], 0
call	sub_781460
test	al, al
jz	loc_787D80

loc_787EAD:
lea	edx, [esp+70h+var_44]
cmp	ebx, edx
jz	short loc_787EBC
mov	al, [esp+70h+var_62]
mov	[ebx], al
inc	ebx

loc_787EBC:
mov	eax, [esp+70h+var_54]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	eax
push	ecx
lea	ecx, [esp+78h+var_44]
push	ebx
push	ecx
call	sub_7927B0
mov	edx, [esp+80h+var_4C]
mov	ecx, [esp+80h+var_4]
add	esp, 10h
pop	edi
pop	esi
pop	ebx
mov	[edx], al
mov	al, [esp+64h+var_61]
xor	ecx, esp
call	sub_7999A3
add	esp, 64h
retn

loc_787EF2:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_787D20 endp

align 10h



sub_787F00 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 0Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+18h+arg_0]
lea	eax, [esp+18h+arg_4]
push	eax
mov	ecx, edi
xor	bl, bl
call	sub_781460
test	al, al
jnz	loc_788022
mov	esi, [esp+18h+arg_C]

loc_787F24:
cmp	byte ptr [edi+7], 0
jnz	short loc_787F5C
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_787F39
movzx	eax, word ptr [eax]
jmp	short loc_787F43

loc_787F39:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_787F43:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[edi+4], ax
mov	[edi+6], dl
mov	byte ptr [edi+7], 1

loc_787F5C:
mov	ecx, [esp+18h+arg_10]
movzx	eax, word ptr [edi+4]
push	ecx
lea	edx, [esp+1Ch+var_C]
push	edx
mov	[esp+20h+var_C], eax
call	sub_7928A0
add	esp, 8
test	al, al
jz	loc_788022
mov	edx, [esi+118h]
mov	bl, byte ptr [esp+18h+var_C]
mov	eax, [esi+10h]
cmp	edx, esi
jnz	short loc_787F98
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_787F9C

loc_787F98:
mov	ecx, [esi]
sub	ecx, eax

loc_787F9C:
cmp	ecx, 1
jnz	short loc_787FE0
mov	[esp+18h+var_4], ecx
sub	eax, edx
mov	ecx, 0FFFFFFFEh
sub	ecx, eax
mov	[esp+18h+var_8], eax
cmp	ecx, 1
jb	short loc_78802B
lea	ecx, [esp+18h+var_8]
cmp	eax, 1
ja	short loc_787FC4
lea	ecx, [esp+18h+var_4]

loc_787FC4:
mov	edx, [ecx]
lea	ecx, [edx+eax+1]
cmp	ecx, 0FFFFFFFEh
ja	short loc_787FD3
cmp	ecx, eax
jnb	short loc_787FD8

loc_787FD3:
mov	ecx, 0FFFFFFFEh

loc_787FD8:		; size_t
push	ecx
mov	ecx, esi
call	sub_7854D0

loc_787FE0:
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], bl
inc	dword ptr [esi+10h]
mov	ecx, [edi]
mov	eax, [ecx+8]
mov	bl, 1
cmp	eax, [ecx+0Ch]
jnb	short loc_788003
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_78800A

loc_788003:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_78800A:
lea	ecx, [esp+18h+arg_4]
push	ecx
mov	ecx, edi
mov	byte ptr [edi+7], 0
call	sub_781460
test	al, al
jz	loc_787F24

loc_788022:
pop	edi
pop	esi
mov	al, bl
pop	ebx
add	esp, 0Ch
retn

loc_78802B:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_787F00 endp

align 10h



sub_788040 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	ecx, [esp+8+arg_4]
mov	esi, [edi+118h]
cmp	eax, ecx
jz	short loc_78806B

loc_788056:
cmp	esi, [edi+10h]
jz	short loc_788067
mov	dl, [eax]
mov	[esi], dl
inc	eax
inc	esi
cmp	eax, ecx
jnz	short loc_788056
jmp	short loc_78806B

loc_788067:
cmp	eax, ecx
jnz	short loc_788094

loc_78806B:
push	ebx
mov	ebx, [edi+10h]
cmp	esi, ebx
jz	short loc_78808C
mov	eax, ebx
sub	eax, ebx
add	eax, 1
jz	short loc_788087
push	eax
push	ebx
push	esi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_788087:
sub	esi, ebx
add	[edi+10h], esi

loc_78808C:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
retn	0Ch

loc_788094:
lea	edx, [esp+8+arg_0]
push	edx
push	ecx
push	eax
mov	ecx, edi
call	sub_785900
mov	eax, edi
pop	edi
pop	esi
retn	0Ch
sub_788040 endp

align 10h



sub_7880B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, ecx
mov	ecx, [esp+4+arg_4]
push	edi
mov	edi, [ebx+228h]
cmp	eax, ecx
jz	short loc_7880E1

loc_7880C6:
cmp	edi, [ebx+20h]
jz	short loc_7880DD
mov	dx, [eax]
mov	[edi], dx
add	eax, 2
add	edi, 2
cmp	eax, ecx
jnz	short loc_7880C6
jmp	short loc_7880E1

loc_7880DD:
cmp	eax, ecx
jnz	short loc_788111

loc_7880E1:
push	esi
mov	esi, [ebx+20h]
cmp	edi, esi
jz	short loc_788109
mov	eax, esi
sub	eax, esi
sar	eax, 1
lea	ecx, [eax+eax+2]
push	ecx
push	esi
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
sub	esi, edi
sar	esi, 1
neg	esi
add	esi, esi
add	esp, 0Ch
add	[ebx+20h], esi

loc_788109:
pop	esi
pop	edi
mov	eax, ebx
pop	ebx
retn	0Ch

loc_788111:
lea	edx, [esp+8+arg_0]
push	edx
push	ecx
push	eax
mov	ecx, ebx
call	sub_794100
pop	edi
mov	eax, ebx
pop	ebx
retn	0Ch
sub_7880B0 endp

align 10h



sub_788130 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4

push	0FFFFFFFFh
push	offset loc_12C9C57
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+20h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+20h+var_14], esi
mov	ecx, [esp+20h+arg_0]
lea	eax, [esp+20h+var_15]
push	eax
push	ecx
lea	ecx, [esi+4]
mov	dword ptr [esi], 0
call	sub_407D30
lea	ecx, [esi+1Ch]
mov	dword ptr [ecx], 0
mov	dword ptr [ecx+4], 0
mov	[esp+20h+var_4], 0
mov	dword ptr [ecx+8], 0
mov	edx, dword_167EF94
push	edx
mov	byte ptr [esp+24h+var_4], 1
call	sub_77ED90
mov	ecx, offset unk_1858060
mov	[esp+20h+arg_0], ecx
mov	[esp+20h+var_10], ecx
mov	byte ptr [esp+20h+var_4], 2
call	sub_7904A0
mov	eax, esi
mov	ecx, [esp+20h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 18h
retn	4
sub_788130 endp

align 10h



sub_7881D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C9C88
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	dword ptr [esi], offset	off_14465C4
lea	ecx, [esi+8]
mov	[esp+18h+var_4], 0
call	sub_783AA0
mov	ecx, esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_77FED0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_7881D0 endp

align 10h



sub_788230 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C9C88
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	dword ptr [esi], offset	off_14465E4
lea	ecx, [esi+8]
mov	[esp+18h+var_4], 0
call	sub_783AA0
mov	ecx, esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_77FED0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_788230 endp

align 10h



sub_788290 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C9C88
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	dword ptr [esi], offset	off_14465F0
lea	ecx, [esi+8]
mov	[esp+18h+var_4], 0
call	sub_783B40
mov	ecx, esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_77FED0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_788290 endp

align 10h



sub_7882F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C9C88
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	dword ptr [esi], offset	off_1446610
lea	ecx, [esi+8]
mov	[esp+18h+var_4], 0
call	sub_783B40
mov	ecx, esi
mov	[esp+18h+var_4], 0FFFFFFFFh
call	sub_77FED0
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_7882F0 endp

align 10h



; int __thiscall sub_788350(void *, char)
sub_788350 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7881D0
test	[esp+4+arg_0], 1
jz	short loc_788368
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_788368:
mov	eax, esi
pop	esi
retn	4
sub_788350 endp

align 10h



; int __thiscall sub_788370(void *, char)
sub_788370 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_788230
test	[esp+4+arg_0], 1
jz	short loc_788388
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_788388:
mov	eax, esi
pop	esi
retn	4
sub_788370 endp

align 10h



; int __thiscall sub_788390(void *, char)
sub_788390 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_788290
test	[esp+4+arg_0], 1
jz	short loc_7883A8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7883A8:
mov	eax, esi
pop	esi
retn	4
sub_788390 endp

align 10h



; int __thiscall sub_7883B0(void *, char)
sub_7883B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7882F0
test	[esp+4+arg_0], 1
jz	short loc_7883C8
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7883C8:
mov	eax, esi
pop	esi
retn	4
sub_7883B0 endp

align 10h



; int __stdcall	sub_7883D0(int,	size_t)
sub_7883D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
lea	eax, [ebx+14h]
mov	[ebx+10h], ebx
mov	ecx, 40h
mov	edi, eax
rep movsd
movsb
mov	esi, [esp+0Ch+arg_4]
mov	[eax+104h], ebx
cmp	esi, 0FFFFFFFFh
ja	short loc_788428
test	esi, esi
jbe	short loc_788428
cmp	esi, 10h
jbe	short loc_788420
cmp	esi, 101h
jbe	short loc_788413
push	0		; int
push	esi		; size_t
mov	ecx, eax
call	sub_780550

loc_788413:
mov	[ebx+118h], eax
mov	[ebx+10h], eax
add	eax, esi
mov	[ebx], eax

loc_788420:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_788428:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_7883D0 endp

align 10h



sub_788440 proc	near

var_1C=	byte ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9CB8
mov	eax, large fs:0
push	eax
sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+30h+var_C]
mov	large fs:0, eax
mov	esi, [esp+30h+arg_C]
lea	eax, [esp+30h+var_1C]
push	eax
mov	ecx, esi
call	sub_4325E0
xor	ebp, ebp
push	offset unk_167EF9C
mov	ecx, eax
mov	[esp+34h+var_4], ebp
call	sub_77FFD0
lea	ecx, [esp+30h+var_1C]
mov	edi, eax
mov	[esp+30h+var_4], 0FFFFFFFFh
call	sub_77FF40
mov	ebx, [esi+8]
mov	ecx, ebx
and	ecx, 0FFFFFFD4h
or	ecx, 214h
mov	eax, 0Ah
mov	[esi+8], ecx
mov	[esi+28h], eax
mov	[esi+2Ch], ebp
cmp	[esp+30h+arg_14], ebp
jnz	short loc_788527
test	ebx, 4000h
jz	short loc_7884CD
call	sub_793A10
jmp	short loc_7884D2

loc_7884CD:
call	sub_793A00

loc_7884D2:
mov	edx, [edi]
mov	[esp+30h+arg_C], eax
mov	eax, [edx+18h]
push	30h
mov	ecx, edi
call	eax
mov	byte ptr [esp+30h+var_18], al
mov	ecx, [esp+30h+var_18]
push	ecx
lea	ecx, [esp+34h+arg_4]
call	sub_780860
mov	edx, [esp+30h+arg_C]
mov	al, [edx+10h]
mov	edx, [edi]
mov	edx, [edx+18h]
mov	byte ptr [esp+30h+arg_C], al
mov	eax, [esp+30h+arg_C]
push	eax
mov	ecx, edi
call	edx
mov	byte ptr [esp+30h+arg_C], al
mov	eax, [esp+30h+arg_C]
push	eax
lea	ecx, [esp+34h+arg_4]
call	sub_780860
mov	dword ptr [esi+28h], 8
jmp	short loc_78852A

loc_788527:
mov	[esi+28h], eax

loc_78852A:
mov	[esi+2Ch], ebp
mov	edx, [edi]
mov	eax, [edx+18h]
push	30h
mov	ecx, edi
call	eax
mov	ecx, [esp+30h+arg_14]
push	ecx
mov	ecx, dword ptr [esp+34h+arg_4]
mov	byte ptr [esp+34h+arg_C], al
mov	edx, [esp+34h+arg_C]
mov	eax, dword ptr [esp+34h+arg_4+4]
push	edx
push	esi
push	eax
push	ecx
lea	edx, [esp+44h+var_14]
push	edx
call	sub_786880
mov	edx, [eax]
mov	ecx, [esp+48h+arg_0]
mov	eax, [eax+4]
mov	[ecx+4], eax
add	esp, 18h
mov	[ecx], edx
mov	[esi+8], ebx
mov	eax, ecx
mov	ecx, [esp+30h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	18h
sub_788440 endp

align 10h



sub_788590 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

mov	eax, dword ptr [esp+arg_14+4]
mov	ecx, dword ptr [esp+arg_14]
mov	edx, [esp+arg_10]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, [esp+8+arg_C]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+10h+arg_4]
push	eax
push	ecx
push	edx
push	esi
call	sub_7868E0
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_788590 endp

align 10h



sub_7885D0 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

mov	eax, dword ptr [esp+arg_14+4]
mov	ecx, dword ptr [esp+arg_14]
mov	edx, [esp+arg_10]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, [esp+8+arg_C]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+10h+arg_4]
push	eax
push	ecx
push	edx
push	esi
call	sub_786950
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_7885D0 endp

align 10h



sub_788610 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_14]
mov	ecx, [esp+arg_10]
mov	edx, [esp+arg_C]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, dword ptr [esp+8+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4]
push	edx
push	eax
push	ecx
push	esi
call	sub_786880
add	esp, 18h
mov	eax, esi
pop	esi
retn	18h
sub_788610 endp

align 10h



sub_788640 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_14]
mov	ecx, [esp+arg_10]
mov	edx, [esp+arg_C]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, dword ptr [esp+8+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4]
push	edx
push	eax
push	ecx
push	esi
call	sub_7869C0
add	esp, 18h
mov	eax, esi
pop	esi
retn	18h
sub_788640 endp

align 10h



sub_788670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_C]
test	dword ptr [eax+8], 100h
push	esi
jnz	short loc_7886A6
movzx	esi, byte ptr [esp+4+arg_14]
mov	edx, [ecx]
mov	edx, [edx+1Ch]
push	esi
mov	esi, [esp+8+arg_10]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	eax
mov	eax, [esp+10h+arg_8]
push	eax
mov	eax, [esp+14h+arg_4]
push	eax
push	esi
call	edx
mov	eax, esi
pop	esi
retn	18h

loc_7886A6:
mov	ecx, [esp+4+arg_14]
mov	edx, [esp+4+arg_10]
mov	esi, [esp+4+arg_0]
push	ecx
mov	ecx, [esp+8+arg_4]
push	edx
push	eax
mov	eax, [esp+10h+arg_8]
push	eax
push	ecx
push	esi
call	sub_786A20
add	esp, 18h
mov	eax, esi
pop	esi
retn	18h
sub_788670 endp

align 10h



sub_7886D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_C]
test	dword ptr [eax+8], 100h
push	esi
jnz	short loc_788706
movzx	esi, byte ptr [esp+4+arg_14]
mov	edx, [ecx]
mov	edx, [edx+1Ch]
push	esi
mov	esi, [esp+8+arg_10]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	eax
mov	eax, [esp+10h+arg_8]
push	eax
mov	eax, [esp+14h+arg_4]
push	eax
push	esi
call	edx
mov	eax, esi
pop	esi
retn	18h

loc_788706:
mov	ecx, [esp+4+arg_14]
mov	edx, [esp+4+arg_10]
mov	esi, [esp+4+arg_0]
push	ecx
mov	ecx, [esp+8+arg_4]
push	edx
push	eax
mov	eax, [esp+10h+arg_8]
push	eax
push	ecx
push	esi
call	sub_786D60
add	esp, 18h
mov	eax, esi
pop	esi
retn	18h
sub_7886D0 endp

align 10h



sub_788730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

lea	eax, [esp+arg_C]
push	eax
lea	ecx, [esp+4+arg_4]
call	sub_781390
test	al, al
jz	short loc_788760
mov	ecx, [esp+arg_18]
mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	dword ptr [ecx], 6
mov	ecx, [esp+arg_8]
mov	[eax], edx
mov	[eax+4], ecx
retn	20h

loc_788760:
push	esi
mov	esi, [esp+4+arg_1C]
push	0
add	esi, 14h
push	esi
lea	edx, [esp+0Ch+arg_C]
push	edx
lea	eax, [esp+10h+arg_4]
push	eax
call	sub_7870A0
add	dword ptr [esi], 0FFFFF894h
mov	esi, [esp+14h+arg_18]
xor	ecx, ecx
add	esp, 10h
test	al, al
setnz	cl
lea	edx, [esp+4+arg_C]
push	edx
dec	ecx
and	ecx, 4
mov	[esi], ecx
lea	ecx, [esp+8+arg_4]
call	sub_781390
test	al, al
jz	short loc_7887A9
or	dword ptr [esi], 2

loc_7887A9:
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
mov	[eax], ecx
mov	[eax+4], edx
pop	esi
retn	20h
sub_788730 endp

align 10h



sub_7887C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

lea	eax, [esp+arg_C]
push	eax
lea	ecx, [esp+4+arg_4]
call	sub_781460
test	al, al
jz	short loc_7887F0
mov	ecx, [esp+arg_18]
mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	dword ptr [ecx], 6
mov	ecx, [esp+arg_8]
mov	[eax], edx
mov	[eax+4], ecx
retn	20h

loc_7887F0:
push	esi
mov	esi, [esp+4+arg_1C]
push	0
add	esi, 14h
push	esi
lea	edx, [esp+0Ch+arg_C]
push	edx
lea	eax, [esp+10h+arg_4]
push	eax
call	sub_787170
add	dword ptr [esi], 0FFFFF894h
mov	esi, [esp+14h+arg_18]
xor	ecx, ecx
add	esp, 10h
test	al, al
setnz	cl
lea	edx, [esp+4+arg_C]
push	edx
dec	ecx
and	ecx, 4
mov	[esi], ecx
lea	ecx, [esp+8+arg_4]
call	sub_781460
test	al, al
jz	short loc_788839
or	dword ptr [esi], 2

loc_788839:
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_8]
mov	[eax], ecx
mov	[eax+4], edx
pop	esi
retn	20h
sub_7887C0 endp

align 10h



sub_788850 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
lea	eax, [ebx+24h]
mov	[ebx+20h], ebx
mov	ecx, 80h
mov	edi, eax
rep movsd
movsw
mov	esi, [esp+0Ch+arg_4]
mov	[eax+204h], ebx
cmp	esi, 7FFFFFFFh
ja	short loc_7888AD
test	esi, esi
jbe	short loc_7888AD
cmp	esi, 10h
jbe	short loc_7888A5
cmp	esi, 101h
jbe	short loc_788897
push	0
push	esi
mov	ecx, eax
call	sub_7805C0

loc_788897:
mov	[ebx+228h], eax
mov	[ebx+20h], eax
lea	eax, [eax+esi*2]
mov	[ebx], eax

loc_7888A5:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_7888AD:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_788850 endp

align 10h



sub_7888C0 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_14]
push	ebx
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [esp+20h+arg_C]
mov	ebx, [edi+8]
push	eax
lea	ecx, [esp+24h+var_6]
push	ebx
push	ecx
call	sub_780910
mov	edx, [esp+2Ch+arg_10]
mov	ecx, dword ptr [esp+2Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+30h+arg_4]
push	ebx
push	edi
push	ecx
push	edx
lea	ecx, [esp+40h+var_6]
push	ecx
push	eax
push	esi
call	sub_7876A0
mov	ecx, [esp+4Ch+var_4]
add	esp, 2Ch
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14h
retn
sub_7888C0 endp




sub_788920 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20h+var_4], eax
mov	eax, dword ptr [esp+20h+arg_14+4]
mov	ecx, dword ptr [esp+20h+arg_14]
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
push	edi
mov	edi, [esp+2Ch+arg_C]
mov	ebx, [edi+8]
push	eax
push	ecx
lea	edx, [esp+34h+var_6]
push	ebx
push	edx
call	sub_780A00
mov	ecx, [esp+3Ch+arg_10]
mov	edx, dword ptr [esp+3Ch+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+40h+arg_4]
push	ebx
push	edi
push	edx
push	ecx
lea	edx, [esp+50h+var_6]
push	edx
push	eax
push	esi
call	sub_7876A0
mov	ecx, [esp+5Ch+var_4]
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 20h
retn
sub_788920 endp

align 10h



sub_788990 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

sub	esp, 20h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20h+var_4], eax
mov	eax, dword ptr [esp+20h+arg_14+4]
mov	ecx, dword ptr [esp+20h+arg_14]
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
push	edi
mov	edi, [esp+2Ch+arg_C]
mov	ebx, [edi+8]
push	eax
push	ecx
lea	edx, [esp+34h+var_6]
push	ebx
push	edx
call	sub_780AF0
mov	ecx, [esp+3Ch+arg_10]
mov	edx, dword ptr [esp+3Ch+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+40h+arg_4]
push	ebx
push	edi
push	edx
push	ecx
lea	edx, [esp+50h+var_6]
push	edx
push	eax
push	esi
call	sub_7876A0
mov	ecx, [esp+5Ch+var_4]
add	esp, 30h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 20h
retn
sub_788990 endp

align 10h



sub_788A00 proc	near

var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 14h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+14h+var_4], eax
mov	eax, [esp+14h+arg_14]
push	ebx
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [esp+20h+arg_C]
mov	ebx, [edi+8]
push	eax
lea	ecx, [esp+24h+var_6]
push	ebx
push	ecx
call	sub_780BE0
mov	edx, [esp+2Ch+arg_10]
mov	ecx, dword ptr [esp+2Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+30h+arg_4]
push	ebx
push	edi
push	ecx
push	edx
lea	ecx, [esp+40h+var_6]
push	ecx
push	eax
push	esi
call	sub_7876A0
mov	ecx, [esp+4Ch+var_4]
add	esp, 2Ch
pop	edi
mov	eax, esi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 14h
retn
sub_788A00 endp




sub_788A60 proc	near

var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h
arg_28=	dword ptr  2Ch

push	0FFFFFFFFh
push	offset loc_12C9CE8
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	ecx, [esp+34h+arg_20]
lea	eax, [esp+34h+var_20]
push	eax
call	sub_4325E0
push	offset unk_167EF9C
mov	ecx, eax
mov	[esp+38h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+34h+var_20]
mov	[esp+34h+var_1C], eax
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_77FF40
lea	ecx, [esp+34h+arg_8]
push	ecx
lea	ecx, [esp+38h+arg_0]
call	sub_781390
mov	ebp, [esp+34h+arg_10]
test	al, al
jnz	loc_788BBF
mov	edi, [esp+34h+arg_28]

loc_788ADC:
cmp	ebp, [esp+34h+arg_14]
jz	loc_788BBF
xor	eax, eax
cmp	byte ptr [ebp+0], 25h
jnz	loc_788CEF
mov	cl, [ebp+1]
inc	ebp
cmp	cl, 23h
jnz	short loc_788AFF
mov	cl, [ebp+1]
inc	ebp

loc_788AFF:
movsx	ecx, cl
add	ecx, 0FFFFFFBFh
cmp	ecx, 38h	; switch 57 cases
ja	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
movzx	edx, ds:byte_788DE4[ecx]
jmp	ds:off_788DAC[edx*4] ; switch jump

loc_788B1C:		; jumptable 00788B15 case 0
mov	eax, 7

loc_788B21:		; jumptable 00788B15 case 32
mov	ecx, [esp+34h+arg_1C]
lea	edx, [eax+eax*2+24h]
lea	edx, [ecx+edx*8]
push	edx
lea	eax, [eax+eax*2+0Fh]
lea	ecx, [ecx+eax*8]
push	ecx
lea	edx, [esp+3Ch+arg_8]
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
call	sub_785A50
add	esp, 10h
cmp	eax, 7
jz	short loc_788BBF
mov	[edi+18h], eax
jmp	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788B54:		; jumptable 00788B15 case 1
mov	eax, 0Ch

loc_788B59:		; jumptable 00788B15 case 33
mov	ecx, [esp+34h+arg_1C]
lea	edx, [eax+eax*2+5Dh]
lea	edx, [ecx+edx*8]
push	edx
lea	eax, [eax+eax*2+39h]
lea	ecx, [ecx+eax*8]
push	ecx
lea	edx, [esp+3Ch+arg_8]
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
call	sub_785A50
add	esp, 10h
cmp	eax, 0Ch
jz	short loc_788BBF
mov	[edi+10h], eax
jmp	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788B8C:		; jumptable 00788B15 case 35
push	0
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+3Ch+arg_8]
push	ecx
lea	edx, [esp+40h+arg_0]
push	edx
call	sub_7870A0
add	esp, 10h
test	al, al
jz	short loc_788BB8
mov	esi, [esi]
cmp	esi, 1
jl	short loc_788BB8
cmp	esi, 1Fh
jle	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788BB8:
mov	eax, [esp+34h+arg_24]
or	dword ptr [eax], 4

loc_788BBF:
mov	eax, ebp
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn

loc_788BD5:		; jumptable 00788B15 cases 7,8
lea	eax, [edi+8]

loc_788BD8:
push	0
push	eax
lea	ecx, [esp+3Ch+arg_8]
push	ecx
lea	edx, [esp+40h+arg_0]
push	edx

loc_788BE5:
call	sub_7870A0
add	esp, 10h
test	al, al
jz	short loc_788BBF
jmp	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788BF6:		; jumptable 00788B15 case 41
lea	eax, [edi+1Ch]
jmp	short loc_788BD8

loc_788BFB:		; jumptable 00788B15 case 44
push	0
lea	esi, [edi+10h]
push	esi
lea	eax, [esp+3Ch+arg_8]
push	eax
lea	ecx, [esp+40h+arg_0]
push	ecx
call	sub_7870A0
dec	dword ptr [esi]
mov	esi, [esi]
add	esp, 10h
test	al, al
jz	short loc_788BB8
test	esi, esi
jl	short loc_788BB8
cmp	esi, 0Bh
jg	short loc_788BB8
jmp	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788C29:		; jumptable 00788B15 case 12
push	0
lea	edx, [edi+4]
push	edx
lea	eax, [esp+3Ch+arg_8]
push	eax
lea	ecx, [esp+40h+arg_0]
push	ecx
jmp	short loc_788BE5

loc_788C3B:		; jumptable 00788B15 case 47
mov	eax, [esp+34h+arg_1C]
lea	edx, [eax+438h]
push	edx
add	eax, 408h
push	eax
lea	eax, [esp+3Ch+arg_8]
push	eax
lea	ecx, [esp+40h+arg_0]
push	ecx
call	sub_785A50
add	esp, 10h
cmp	eax, 2
jz	loc_788BBF
cmp	eax, 1
jnz	short loc_788C83
mov	eax, [edi+8]
cmp	eax, 0Ch
jz	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
add	eax, 0Ch
mov	[edi+8], eax
jmp	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788C83:
test	eax, eax
jnz	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
cmp	dword ptr [edi+8], 0Ch
jnz	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
mov	[edi+8], eax
jmp	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788C9D:		; jumptable 00788B15 case 18
push	0
push	edi
lea	edx, [esp+3Ch+arg_8]
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
jmp	loc_788BE5

loc_788CAF:		; jumptable 00788B15 case 56
push	0
lea	ecx, [edi+14h]
push	ecx
lea	edx, [esp+3Ch+arg_8]
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
jmp	loc_788BE5

loc_788CC4:		; jumptable 00788B15 case 24
push	0
lea	esi, [edi+14h]
push	esi
lea	ecx, [esp+3Ch+arg_8]
push	ecx
lea	edx, [esp+40h+arg_0]
push	edx
call	sub_7870A0
add	dword ptr [esi], 0FFFFF894h
add	esp, 10h
test	al, al
jz	loc_788BBF
jmp	loc_788D8F	; default
			; jumptable 00788B15 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788CEF:
cmp	byte ptr [esp+34h+arg_4+2], 0
mov	ecx, [esp+34h+arg_0]
jnz	short loc_788D25
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_788D07
movzx	eax, byte ptr [eax]
jmp	short loc_788D12

loc_788D07:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
mov	ecx, [esp+34h+arg_0]

loc_788D12:
cmp	eax, 0FFFFFFFFh
mov	byte ptr [esp+34h+arg_4], al
setz	al
mov	byte ptr [esp+34h+arg_4+1], al
mov	byte ptr [esp+34h+arg_4+2], 1

loc_788D25:
mov	eax, [ecx+8]
mov	edx, [esp+34h+arg_4]
mov	esi, ecx
mov	[esp+34h+var_10], edx
cmp	eax, [ecx+0Ch]
jnb	short loc_788D3D
inc	eax
mov	[ecx+8], eax
jmp	short loc_788D44

loc_788D3D:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_788D44:
cmp	byte ptr [esp+34h+var_10+2], 0
mov	byte ptr [esp+34h+arg_4+2], 0
jnz	short loc_788D6C
mov	eax, [esi+8]
cmp	eax, [esi+0Ch]
jnb	short loc_788D5F
movzx	eax, byte ptr [eax]
mov	bl, al
jmp	short loc_788D70

loc_788D5F:
mov	eax, [esi]
mov	edx, [eax+1Ch]
mov	ecx, esi
call	edx
mov	bl, al
jmp	short loc_788D70

loc_788D6C:
mov	bl, byte ptr [esp+34h+var_10]

loc_788D70:
mov	al, [ebp+0]
mov	ecx, [esp+34h+var_1C]
mov	edx, [ecx]
mov	edx, [edx+18h]
mov	byte ptr [esp+34h+var_18], al
mov	eax, [esp+34h+var_18]
push	eax
call	edx
cmp	bl, al
jnz	loc_788BBF

loc_788D8F:		; default
lea	eax, [esp+34h+arg_8] ; jumptable 00788B15 cases	2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
push	eax
lea	ecx, [esp+38h+arg_0]
inc	ebp
call	sub_781390
test	al, al
jz	loc_788ADC
jmp	loc_788BBF
sub_788A60 endp

align 4
off_788DAC dd offset loc_788B1C, offset	loc_788B54 ; jump table	for switch statement
dd offset loc_788BD5, offset loc_788C29
dd offset loc_788C9D, offset loc_788CC4
dd offset loc_788B21, offset loc_788B59
dd offset loc_788B8C, offset loc_788BF6
dd offset loc_788BFB, offset loc_788C3B
dd offset loc_788CAF, offset loc_788D8F
byte_788DE4 db	    0,	   1,	0Dh,   0Dh ; indirect table for	switch statement
db    0Dh,   0Dh,   0Dh,     2
db	2,   0Dh,   0Dh,   0Dh
db	3,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,     4,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db	5,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db	6,     7,   0Dh,     8
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,     9,   0Dh,   0Dh
db    0Ah,   0Dh,   0Dh,   0Bh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Ch
align 10h



sub_788E20 proc	near

var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= byte ptr	 4
arg_8= byte ptr	 0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h
arg_28=	dword ptr  2Ch

push	0FFFFFFFFh
push	offset loc_12C9CE8
mov	eax, large fs:0
push	eax
sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+34h+var_C]
mov	large fs:0, eax
mov	ecx, [esp+34h+arg_20]
lea	eax, [esp+34h+var_20]
push	eax
call	sub_4325E0
push	offset unk_167EFB8
mov	ecx, eax
mov	[esp+38h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+34h+var_20]
mov	[esp+34h+var_1C], eax
mov	[esp+34h+var_4], 0FFFFFFFFh
call	sub_77FF40
lea	ecx, [esp+34h+arg_8]
push	ecx
lea	ecx, [esp+38h+arg_0]
call	sub_781460
mov	ebp, [esp+34h+arg_10]
test	al, al
jnz	loc_788F7E
mov	edi, [esp+34h+arg_28]
mov	ebx, [esp+34h+arg_1C]

loc_788EA0:
cmp	ebp, [esp+34h+arg_14]
jz	loc_788F7E
xor	eax, eax
cmp	byte ptr [ebp+0], 25h
jnz	loc_7890A8
mov	cl, [ebp+1]
inc	ebp
cmp	cl, 23h
jnz	short loc_788EC3
mov	cl, [ebp+1]
inc	ebp

loc_788EC3:
movsx	ecx, cl
add	ecx, 0FFFFFFBFh
cmp	ecx, 38h	; switch 57 cases
ja	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
movzx	edx, ds:byte_78916C[ecx]
jmp	ds:off_789134[edx*4] ; switch jump

loc_788EE0:		; jumptable 00788ED9 case 0
mov	eax, 7

loc_788EE5:		; jumptable 00788ED9 case 32
lea	ecx, [eax+eax*4+32h]
lea	edx, [ebx+ecx*8]
push	edx
lea	eax, [eax+eax*4+0Fh]
lea	ecx, [ebx+eax*8]
push	ecx
lea	edx, [esp+3Ch+arg_8]
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
call	sub_785F70
add	esp, 10h
cmp	eax, 7
jz	short loc_788F7E
mov	[edi+18h], eax
jmp	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788F14:		; jumptable 00788ED9 case 1
mov	eax, 0Ch

loc_788F19:		; jumptable 00788ED9 case 33
lea	ecx, [eax+eax*4+91h]
lea	edx, [ebx+ecx*8]
push	edx
lea	eax, [eax+eax*4+55h]
lea	ecx, [ebx+eax*8]
push	ecx
lea	edx, [esp+3Ch+arg_8]
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
call	sub_785F70
add	esp, 10h
cmp	eax, 0Ch
jz	short loc_788F7E
mov	[edi+10h], eax
jmp	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788F4B:		; jumptable 00788ED9 case 35
push	0
lea	esi, [edi+0Ch]
push	esi
lea	ecx, [esp+3Ch+arg_8]
push	ecx
lea	edx, [esp+40h+arg_0]
push	edx
call	sub_787170
add	esp, 10h
test	al, al
jz	short loc_788F77
mov	esi, [esi]
cmp	esi, 1
jl	short loc_788F77
cmp	esi, 1Fh
jle	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788F77:
mov	eax, [esp+34h+arg_24]
or	dword ptr [eax], 4

loc_788F7E:
mov	eax, ebp
mov	ecx, [esp+34h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn

loc_788F94:		; jumptable 00788ED9 cases 7,8
lea	eax, [edi+8]

loc_788F97:
push	0
push	eax
lea	ecx, [esp+3Ch+arg_8]
push	ecx
lea	edx, [esp+40h+arg_0]
push	edx

loc_788FA4:
call	sub_787170
add	esp, 10h
test	al, al
jz	short loc_788F7E
jmp	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788FB5:		; jumptable 00788ED9 case 41
lea	eax, [edi+1Ch]
jmp	short loc_788F97

loc_788FBA:		; jumptable 00788ED9 case 44
push	0
lea	esi, [edi+10h]
push	esi
lea	eax, [esp+3Ch+arg_8]
push	eax
lea	ecx, [esp+40h+arg_0]
push	ecx
call	sub_787170
dec	dword ptr [esi]
mov	esi, [esi]
add	esp, 10h
test	al, al
jz	short loc_788F77
test	esi, esi
jl	short loc_788F77
cmp	esi, 0Bh
jg	short loc_788F77
jmp	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_788FE8:		; jumptable 00788ED9 case 12
push	0
lea	edx, [edi+4]
push	edx
lea	eax, [esp+3Ch+arg_8]
push	eax
lea	ecx, [esp+40h+arg_0]
push	ecx
jmp	short loc_788FA4

loc_788FFA:		; jumptable 00788ED9 case 47
lea	edx, [ebx+6B8h]
push	edx
lea	eax, [ebx+668h]
push	eax
lea	ecx, [esp+3Ch+arg_8]
push	ecx
lea	edx, [esp+40h+arg_0]
push	edx
call	sub_785F70
add	esp, 10h
cmp	eax, 2
jz	loc_788F7E
cmp	eax, 1
jnz	short loc_78903F
mov	eax, [edi+8]
cmp	eax, 0Ch
jz	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
add	eax, 0Ch
mov	[edi+8], eax
jmp	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_78903F:
test	eax, eax
jnz	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
cmp	dword ptr [edi+8], 0Ch
jnz	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
mov	[edi+8], eax
jmp	loc_789116	; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_789059:		; jumptable 00788ED9 case 18
push	0
push	edi
lea	eax, [esp+3Ch+arg_8]
push	eax
lea	ecx, [esp+40h+arg_0]
push	ecx
jmp	loc_788FA4

loc_78906B:		; jumptable 00788ED9 case 56
push	0
lea	edx, [edi+14h]
push	edx
lea	eax, [esp+3Ch+arg_8]
push	eax
lea	ecx, [esp+40h+arg_0]
push	ecx
jmp	loc_788FA4

loc_789080:		; jumptable 00788ED9 case 24
push	0
lea	esi, [edi+14h]
push	esi
lea	edx, [esp+3Ch+arg_8]
push	edx
lea	eax, [esp+40h+arg_0]
push	eax
call	sub_787170
add	dword ptr [esi], 0FFFFF894h
add	esp, 10h
test	al, al
jz	loc_788F7E
jmp	short loc_789116 ; default
			; jumptable 00788ED9 cases 2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55

loc_7890A8:
push	0
lea	ecx, [esp+38h+var_14]
push	ecx
lea	ecx, [esp+3Ch+arg_0]
call	sub_780DC0
mov	esi, eax
cmp	byte ptr [esi+7], 0
jnz	short loc_7890F2
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7890CF
movzx	eax, word ptr [eax]
jmp	short loc_7890D9

loc_7890CF:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_7890D9:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_7890F2:
mov	al, [ebp+0]
mov	ecx, [esp+34h+var_1C]
mov	edx, [ecx]
mov	edx, [edx+28h]
movzx	esi, word ptr [esi+4]
mov	byte ptr [esp+34h+var_18], al
mov	eax, [esp+34h+var_18]
push	eax
call	edx
cmp	si, ax
jnz	loc_788F7E

loc_789116:		; default
lea	eax, [esp+34h+arg_8] ; jumptable 00788ED9 cases	2-6,9-11,13-17,19-23,25-31,34,36-40,42,43,45,46,48-55
push	eax
lea	ecx, [esp+38h+arg_0]
inc	ebp
call	sub_781460
test	al, al
jz	loc_788EA0
jmp	loc_788F7E
sub_788E20 endp

align 4
off_789134 dd offset loc_788EE0, offset	loc_788F14 ; jump table	for switch statement
dd offset loc_788F94, offset loc_788FE8
dd offset loc_789059, offset loc_789080
dd offset loc_788EE5, offset loc_788F19
dd offset loc_788F4B, offset loc_788FB5
dd offset loc_788FBA, offset loc_788FFA
dd offset loc_78906B, offset loc_789116
byte_78916C db	    0,	   1,	0Dh,   0Dh ; indirect table for	switch statement
db    0Dh,   0Dh,   0Dh,     2
db	2,   0Dh,   0Dh,   0Dh
db	3,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,     4,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db	5,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db	6,     7,   0Dh,     8
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,     9,   0Dh,   0Dh
db    0Ah,   0Dh,   0Dh,   0Bh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Ch
align 10h



sub_7891B0 proc	near

var_3B=	byte ptr -3Bh
var_3A=	byte ptr -3Ah
var_39=	byte ptr -39h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	byte ptr -1Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h

push	0FFFFFFFFh
push	offset loc_12C9D18
mov	eax, large fs:0
push	eax
sub	esp, 30h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+50h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+50h+arg_10]
mov	ebx, [esp+50h+arg_0]
mov	esi, [esp+50h+arg_4]
mov	edi, [esp+50h+arg_8]
lea	eax, [esp+50h+var_34]
push	eax
mov	ecx, ebp
call	sub_781970
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
mov	[esp+50h+var_4], 0
mov	[esp+50h+var_3A], 0
mov	[esp+50h+var_3B], 1
call	eax
mov	edx, [ebp+0]
mov	[esp+50h+var_39], al
mov	eax, [edx+8]
mov	ecx, ebp
call	eax
mov	ecx, [edi+4]
mov	edx, [edi]
push	2Dh
push	2Bh
push	ebx
push	ecx
mov	ecx, [esi]
push	edx
mov	byte ptr [esp+64h+var_38], al
mov	eax, [esi+4]
push	eax
push	ecx
lea	edx, [esp+6Ch+var_1C]
push	edx
call	sub_7878F0
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	eax, [esp+70h+var_20]
add	esp, 20h
mov	[esi+4], edx
cmp	eax, [esp+50h+var_24]
jz	short loc_789287
mov	eax, [esp+50h+var_38]
lea	ecx, [esp+50h+var_3B]
push	ecx
lea	edx, [esp+54h+var_34]
push	edx
mov	edx, [edi+4]
push	eax
mov	eax, [edi]
lea	ecx, [esp+5Ch+var_1C]
push	ecx
push	ebx
push	edx
push	eax
push	esi
call	sub_787990
add	esp, 20h
jmp	short loc_78929D

loc_789287:
mov	edx, [edi+4]
mov	eax, [edi]
lea	ecx, [esp+50h+var_1C]
push	ecx
push	ebx
push	edx
push	eax
push	esi
call	sub_787B50
add	esp, 14h

loc_78929D:
push	edi
mov	ecx, esi
mov	[esp+54h+var_3B], al
call	sub_781390
test	al, al
jnz	short loc_78931D
cmp	[esi+6], al
jnz	short loc_7892D8
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7892C1
movzx	eax, byte ptr [eax]
jmp	short loc_7892C8

loc_7892C1:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_7892C8:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_7892D8:
mov	dl, [esp+50h+var_39]
cmp	[esi+4], dl
jnz	short loc_78931D
push	2Eh
mov	ecx, ebx
call	sub_7878A0
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7892FA
inc	eax
mov	[ecx+8], eax
jmp	short loc_789301

loc_7892FA:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_789301:
lea	eax, [esp+50h+var_1C]
push	eax
mov	byte ptr [esi+6], 0
mov	ecx, [edi+4]
mov	edx, [edi]
push	ebx
push	ecx
push	edx
push	esi
call	sub_787B50
add	esp, 14h
jmp	short loc_789321

loc_78931D:
mov	al, [esp+50h+var_3A]

loc_789321:
cmp	[esp+50h+var_3B], 0
jnz	short loc_789333
test	al, al
jnz	short loc_789333
xor	bl, bl
jmp	loc_7893EE

loc_789333:
push	edi
mov	ecx, esi
mov	[esp+54h+var_3B], 1
call	sub_781390
test	al, al
jnz	loc_7893EA
cmp	[esi+6], al
jnz	short loc_789373
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78935C
movzx	eax, byte ptr [eax]
jmp	short loc_789363

loc_78935C:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_789363:
cmp	eax, 0FFFFFFFFh
mov	[esi+4], al
setz	al
mov	[esi+5], al
mov	byte ptr [esi+6], 1

loc_789373:
mov	al, [esi+4]
cmp	al, 65h
jz	short loc_789385
mov	ecx, esi
call	sub_781350
cmp	al, 45h
jnz	short loc_7893EA

loc_789385:
push	65h
mov	ecx, ebx
call	sub_7878A0
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78939E
inc	eax
mov	[ecx+8], eax
jmp	short loc_7893A5

loc_78939E:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_7893A5:
push	2Dh
push	2Bh
mov	byte ptr [esi+6], 0
mov	ecx, [edi+4]
mov	edx, [edi]
mov	eax, [esi+4]
push	ebx
push	ecx
mov	ecx, [esi]
push	edx
push	eax
push	ecx
lea	edx, [esp+6Ch+var_1C]
push	edx
call	sub_7878F0
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
lea	eax, [esp+70h+var_1C]
push	eax
mov	[esi+4], edx
mov	ecx, [edi+4]
mov	edx, [edi]
push	ebx
push	ecx
push	edx
push	esi
call	sub_787B50
add	esp, 34h
mov	[esp+50h+var_3B], al

loc_7893EA:
mov	bl, [esp+50h+var_3B]

loc_7893EE:
mov	ecx, [esp+50h+var_20]
lea	eax, [esp+50h+var_34]
mov	[esp+50h+var_4], 0FFFFFFFFh
cmp	ecx, eax
jz	short loc_789428
test	ecx, ecx
jz	short loc_789428
mov	eax, [esp+50h+var_34]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78941E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_789428

loc_78941E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_789428:
mov	al, bl
mov	ecx, [esp+50h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 3Ch
retn
sub_7891B0 endp

align 10h



sub_789450 proc	near

var_5E=	byte ptr -5Eh
var_5D=	byte ptr -5Dh
var_5C=	word ptr -5Ch
var_58=	word ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	0FFFFFFFFh
push	offset loc_12C9D48
mov	eax, large fs:0
push	eax
sub	esp, 54h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+60h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+74h+var_C]
mov	large fs:0, eax
mov	eax, [esp+74h+arg_C]
mov	ebp, [esp+74h+arg_10]
mov	ebx, [esp+74h+arg_0]
mov	esi, [esp+74h+arg_4]
mov	edi, [esp+74h+arg_8]
lea	ecx, [esp+74h+var_3C]
push	ecx
mov	ecx, ebp
mov	[esp+78h+var_44], eax
call	sub_781970
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
mov	[esp+74h+var_4], 0
mov	[esp+74h+var_5D], 0
mov	[esp+74h+var_5E], 1
call	eax
mov	edx, [ebp+0]
movzx	ecx, ax
mov	eax, [edx+8]
mov	[esp+74h+var_4C], ecx
mov	ecx, ebp
call	eax
lea	ecx, [esp+74h+var_24]
push	ecx
movzx	ebp, ax
lea	edx, [esp+78h+var_58]
push	edx
lea	eax, [esp+7Ch+var_5C]
push	eax
mov	eax, [esp+80h+var_44]
lea	ecx, [esp+80h+var_54]
push	ecx
lea	edx, [esp+84h+var_50]
push	edx
push	eax
call	sub_795370
mov	ecx, [esp+8Ch+var_54]
mov	edx, [esp+8Ch+var_50]
mov	eax, [edi+4]
push	ecx
mov	ecx, [edi]
push	edx
mov	edx, [esi+4]
push	ebx
push	eax
mov	eax, [esi]
push	ecx
push	edx
push	eax
lea	ecx, [esp+0A8h+var_44]
push	ecx
call	sub_787C70
mov	edx, [eax]
mov	ecx, [esp+0ACh+var_28]
mov	[esi], edx
mov	eax, [eax+4]
add	esp, 38h
cmp	ecx, [esp+74h+var_2C]
mov	[esi+4], eax
lea	ecx, [esp+74h+var_24]
jz	short loc_789562
lea	edx, [esp+74h+var_5E]
push	edx
mov	edx, [edi+4]
lea	eax, [esp+78h+var_3C]
push	eax
mov	eax, [edi]
push	ebp
push	ecx
push	ebx
push	edx
push	eax
push	esi
call	sub_787D20
add	esp, 20h
jmp	short loc_789574

loc_789562:
mov	edx, [edi+4]
mov	eax, [edi]
push	ecx
push	ebx
push	edx
push	eax
push	esi
call	sub_787F00
add	esp, 14h

loc_789574:
push	edi
mov	ecx, esi
mov	[esp+78h+var_5E], al
call	sub_781460
test	al, al
jnz	loc_789608
cmp	[esi+7], al
jnz	short loc_7895BF
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78959C
movzx	eax, word ptr [eax]
jmp	short loc_7895A6

loc_78959C:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_7895A6:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_7895BF:
movzx	eax, word ptr [esi+4]
cmp	ax, word ptr [esp+74h+var_4C]
jnz	short loc_789608
push	2Eh
mov	ecx, ebx
call	sub_7878A0
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7895E5
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_7895EC

loc_7895E5:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_7895EC:
lea	eax, [esp+74h+var_24]
push	eax
mov	byte ptr [esi+7], 0
mov	ecx, [edi+4]
mov	edx, [edi]
push	ebx
push	ecx
push	edx
push	esi
call	sub_787F00
add	esp, 14h
jmp	short loc_78960C

loc_789608:
mov	al, [esp+74h+var_5D]

loc_78960C:
cmp	[esp+74h+var_5E], 0
jnz	short loc_78961E
test	al, al
jnz	short loc_78961E
xor	bl, bl
jmp	loc_7896C0

loc_78961E:
push	edi
mov	ecx, esi
mov	[esp+78h+var_5E], 1
call	sub_781460
test	al, al
jnz	loc_7896BC
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+74h+var_5C]
jz	short loc_78964F
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+74h+var_58]
jnz	short loc_7896BC

loc_78964F:
push	65h
mov	ecx, ebx
call	sub_7878A0
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78966A
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_789671

loc_78966A:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_789671:
mov	eax, [esp+74h+var_54]
mov	ecx, [esp+74h+var_50]
push	eax
push	ecx
mov	byte ptr [esi+7], 0
mov	edx, [edi+4]
mov	eax, [edi]
mov	ecx, [esi+4]
push	ebx
push	edx
mov	edx, [esi]
push	eax
push	ecx
push	edx
lea	eax, [esp+90h+var_4C]
push	eax
call	sub_787C70
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
lea	eax, [esp+94h+var_24]
push	eax
mov	[esi+4], edx
mov	ecx, [edi+4]
mov	edx, [edi]
push	ebx
push	ecx
push	edx
push	esi
call	sub_787F00
add	esp, 34h
mov	[esp+74h+var_5E], al

loc_7896BC:
mov	bl, [esp+74h+var_5E]

loc_7896C0:
mov	ecx, [esp+74h+var_28]
lea	eax, [esp+74h+var_3C]
mov	[esp+74h+var_4], 0FFFFFFFFh
cmp	ecx, eax
jz	short loc_7896FA
test	ecx, ecx
jz	short loc_7896FA
mov	eax, [esp+74h+var_3C]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_7896F0
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7896FA

loc_7896F0:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_7896FA:
mov	al, bl
mov	ecx, [esp+74h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+60h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 60h
retn
sub_789450 endp

align 10h



sub_789720 proc	near

var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_84=	byte ptr -84h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

sub	esp, 94h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+94h+var_4], eax
mov	eax, [esp+94h+arg_24]
push	esi
mov	esi, [esp+98h+arg_0]
push	edi
mov	edi, [esp+9Ch+arg_20]
lea	ecx, [esp+9Ch+arg_4]
push	ecx
mov	ecx, esi
mov	[esp+0A0h+var_90], edi
mov	[esp+0A0h+var_94], eax
call	sub_781390
test	al, al
jnz	loc_789A85
cmp	[esi+6], al
jnz	short loc_789795
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78977E
movzx	eax, byte ptr [eax]
jmp	short loc_789785

loc_78977E:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_789785:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_789795:
movzx	edx, byte ptr [esi+4]
mov	eax, [esp+9Ch+arg_10]
mov	ecx, [eax+8]
mov	edx, [ecx+edx*4]
shr	edx, 6
test	dl, 1
jz	loc_789A85
push	ebx
push	ebp
mov	ebp, [edi+14h]
sub	ebp, [edi+10h]
lea	ecx, [esp+0A4h+arg_4]
neg	ebp
sbb	ebp, ebp
lea	eax, [esp+0A4h+var_84]
push	ecx
mov	ecx, esi
and	ebp, eax
xor	bl, bl
call	sub_781390
test	al, al
jnz	loc_7898EE
lea	ecx, [ecx+0]

loc_7897E0:
cmp	byte ptr [esi+6], 0
jnz	short loc_78980C
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7897F5
movzx	eax, byte ptr [eax]
jmp	short loc_7897FC

loc_7897F5:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_7897FC:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_78980C:
movzx	edx, byte ptr [esi+4]
mov	eax, [esp+0A4h+arg_10]
mov	ecx, [eax+8]
mov	edx, [ecx+edx*4]
shr	edx, 6
test	dl, 1
jz	short loc_78987A
push	0
lea	eax, [esp+0A8h+var_8C]
push	eax
mov	ecx, esi
inc	bl
call	sub_780D50
mov	edi, eax
cmp	byte ptr [edi+6], 0
jnz	short loc_789863
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78984C
movzx	eax, byte ptr [eax]
jmp	short loc_789853

loc_78984C:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_789853:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[edi+4], al
mov	[edi+5], cl
mov	byte ptr [edi+6], 1

loc_789863:
movzx	edx, byte ptr [edi+4]
mov	ecx, [esp+0A4h+arg_C]
push	edx
call	sub_438580
mov	edi, [esp+0A4h+var_90]
jmp	short loc_7898D7

loc_78987A:
test	ebp, ebp
jz	short loc_7898EE
cmp	byte ptr [esi+6], 0
jnz	short loc_7898AA
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_789893
movzx	eax, byte ptr [eax]
jmp	short loc_78989A

loc_789893:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx

loc_78989A:
cmp	eax, 0FFFFFFFFh
mov	[esi+4], al
setz	al
mov	[esi+5], al
mov	byte ptr [esi+6], 1

loc_7898AA:
mov	cl, [esp+0A4h+arg_1C]
cmp	[esi+4], cl
jnz	short loc_7898EE
mov	ecx, [esi]
mov	[ebp+0], bl
mov	eax, [ecx+8]
inc	ebp
xor	bl, bl
cmp	eax, [ecx+0Ch]
jnb	short loc_7898CC
inc	eax
mov	[ecx+8], eax
jmp	short loc_7898D3

loc_7898CC:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_7898D3:
mov	byte ptr [esi+6], 0

loc_7898D7:
lea	ecx, [esp+0A4h+arg_4]
push	ecx
mov	ecx, esi
call	sub_781390
test	al, al
jz	loc_7897E0

loc_7898EE:
mov	ecx, [edi+14h]
mov	eax, [edi+10h]
cmp	ecx, eax
jnz	short loc_789901
mov	edx, [esp+0A4h+var_94]
mov	byte ptr [edx],	1
jmp	short loc_78994E

loc_789901:
lea	edx, [esp+0A4h+var_84]
cmp	ebp, edx
jz	short loc_78990D
mov	[ebp+0], bl
inc	ebp

loc_78990D:
push	eax
push	ecx
lea	eax, [esp+0ACh+var_84]
push	ebp
push	eax
call	sub_7927B0
mov	ecx, [esp+0B4h+var_94]
add	esp, 10h
lea	edx, [esp+0A4h+arg_4]
mov	[ecx], al
push	edx
mov	ecx, esi
call	sub_781390
test	al, al
jnz	loc_789A64
mov	ecx, esi
call	sub_781350
cmp	al, [esp+0A4h+arg_14]
jnz	loc_789A64

loc_78994E:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78995E
inc	eax
mov	[ecx+8], eax
jmp	short loc_789965

loc_78995E:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_789965:
lea	eax, [esp+0A4h+arg_4]
push	eax
mov	ecx, esi
mov	byte ptr [esi+6], 0
xor	ebx, ebx
call	sub_781390
test	al, al
jnz	loc_789A2C

loc_789982:
cmp	byte ptr [esi+6], 0
jnz	short loc_7899AE
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_789997
movzx	eax, byte ptr [eax]
jmp	short loc_78999E

loc_789997:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_78999E:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[esi+4], al
mov	[esi+5], cl
mov	byte ptr [esi+6], 1

loc_7899AE:
movzx	edx, byte ptr [esi+4]
mov	eax, [esp+0A4h+arg_10]
mov	ecx, [eax+8]
mov	edx, [ecx+edx*4]
shr	edx, 6
test	dl, 1
jz	short loc_789A2C
push	0
lea	eax, [esp+0A8h+var_8C]
push	eax
mov	ecx, esi
call	sub_780D50
mov	edi, eax
cmp	byte ptr [edi+6], 0
jnz	short loc_789A03
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_7899EC
movzx	eax, byte ptr [eax]
jmp	short loc_7899F3

loc_7899EC:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax

loc_7899F3:
cmp	eax, 0FFFFFFFFh
setz	cl
mov	[edi+4], al
mov	[edi+5], cl
mov	byte ptr [edi+6], 1

loc_789A03:
movzx	edx, byte ptr [edi+4]
mov	ecx, [esp+0A4h+arg_C]
push	edx
call	sub_438580
lea	eax, [esp+0A4h+arg_4]
push	eax
mov	ecx, esi
inc	ebx
call	sub_781390
test	al, al
jz	loc_789982

loc_789A2C:
mov	ecx, [esp+0A4h+var_94]
cmp	byte ptr [ecx],	0
jz	short loc_789A45
cmp	ebx, [esp+0A4h+arg_18]
jnz	short loc_789A45
mov	eax, 1
jmp	short loc_789A47

loc_789A45:
xor	eax, eax

loc_789A47:
mov	[ecx], al

loc_789A49:
pop	ebp
pop	ebx
pop	edi
mov	al, 1
pop	esi
mov	ecx, [esp+94h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 94h
retn

loc_789A64:
mov	esi, [esp+0A4h+arg_18]
test	esi, esi
jz	short loc_789A49
nop

loc_789A70:
mov	ecx, [esp+0A4h+arg_C]
push	30h
call	sub_438580
sub	esi, 1
jnz	short loc_789A70
jmp	short loc_789A49

loc_789A85:
mov	ecx, [esp+9Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
xor	al, al
call	sub_7999A3
add	esp, 94h
retn
sub_789720 endp

align 10h



sub_789AA0 proc	near

var_89=	byte ptr -89h
var_88=	dword ptr -88h
lpAddend= dword	ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C9E3C
mov	eax, large fs:0
push	eax
sub	esp, 80h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+0A0h+var_C]
mov	large fs:0, eax
mov	ecx, offset unk_18580A8
mov	[esp+0A0h+lpAddend], ecx
mov	[esp+0A0h+var_88], ecx
xor	edi, edi
push	offset aC_2	; "C"
mov	[esp+0A4h+var_4], edi
call	sub_788130
or	ebx, 0FFFFFFFFh
push	8		; size_t
mov	[esp+0A4h+lpAddend], eax
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_7C], edi
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
lea	ebp, [edi+1]
cmp	eax, edi
jz	short loc_789B1B
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_1446460
jmp	short loc_789B1D

loc_789B1B:
xor	eax, eax

loc_789B1D:		; size_t
push	10h
mov	[esp+0A4h+var_78], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+0A0h+var_80], eax
mov	[esp+0A0h+var_4], ebp
cmp	eax, edi
jz	short loc_789B46
push	ebp
push	edi
push	edi
mov	ecx, eax
call	sub_791B70
jmp	short loc_789B48

loc_789B46:
xor	eax, eax

loc_789B48:		; size_t
push	8
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_74], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789B6C
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_1446418
jmp	short loc_789B6E

loc_789B6C:
xor	eax, eax

loc_789B6E:		; size_t
push	10h
mov	[esp+0A4h+var_70], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+0A0h+var_80], eax
mov	[esp+0A0h+var_4], 2
cmp	eax, edi
jz	short loc_789B99
push	ebp
mov	ecx, eax
call	sub_795C90
jmp	short loc_789B9B

loc_789B99:
xor	eax, eax

loc_789B9B:		; size_t
push	10h
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_6C], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+0A0h+var_80], eax
mov	[esp+0A0h+var_4], 3
cmp	eax, edi
jz	short loc_789BCD
push	ebp
mov	ecx, eax
call	sub_795CF0
jmp	short loc_789BCF

loc_789BCD:
xor	eax, eax

loc_789BCF:		; size_t
push	8
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_68], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789BF3
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_1446488
jmp	short loc_789BF5

loc_789BF3:
xor	eax, eax

loc_789BF5:		; size_t
push	8
mov	[esp+0A4h+var_64], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+0A0h+var_80], eax
mov	[esp+0A0h+var_4], 4
cmp	eax, edi
jz	short loc_789C20
push	ebp
mov	ecx, eax
call	sub_795BF0
jmp	short loc_789C22

loc_789C20:
xor	eax, eax

loc_789C22:		; size_t
push	8
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_60], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789C46
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_1446584
jmp	short loc_789C48

loc_789C46:
xor	eax, eax

loc_789C48:		; size_t
push	8
mov	[esp+0A4h+var_5C], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789C65
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_1446594
jmp	short loc_789C67

loc_789C65:
xor	eax, eax

loc_789C67:		; size_t
push	8
mov	[esp+0A4h+var_58], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789C84
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_14464F4
jmp	short loc_789C86

loc_789C84:
xor	eax, eax

loc_789C86:		; size_t
push	8
mov	[esp+0A4h+var_54], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789CA3
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_14464CC
jmp	short loc_789CA5

loc_789CA3:
xor	eax, eax

loc_789CA5:		; size_t
push	444h
mov	[esp+0A4h+var_50], eax
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+0A0h+var_80], esi
mov	[esp+0A0h+var_4], 5
cmp	esi, edi
jz	short loc_789CEC
mov	[esi+4], ebp
mov	dword ptr [esi], offset	off_14463D8
lea	ecx, [esi+8]
mov	byte ptr [esp+0A0h+var_4], 6
call	sub_7952B0
mov	dword ptr [esi], offset	off_14465C4
jmp	short loc_789CEE

loc_789CEC:
xor	esi, esi

loc_789CEE:		; size_t
push	444h
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_4C], esi
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+0A0h+var_80], esi
mov	[esp+0A0h+var_4], 7
cmp	esi, edi
jz	short loc_789D3C
mov	[esi+4], ebp
mov	dword ptr [esi], offset	off_14463D8
lea	ecx, [esi+8]
mov	byte ptr [esp+0A0h+var_4], 8
call	sub_7952B0
mov	dword ptr [esi], offset	off_14465E4
jmp	short loc_789D3E

loc_789D3C:
xor	esi, esi

loc_789D3E:		; size_t
push	8
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_48], esi
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789D62
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_1446474
jmp	short loc_789D64

loc_789D62:
xor	eax, eax

loc_789D64:		; size_t
push	8
mov	[esp+0A4h+var_44], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789D81
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_14463E0
jmp	short loc_789D83

loc_789D81:
xor	eax, eax

loc_789D83:		; size_t
push	8
mov	[esp+0A4h+var_40], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789DA0
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_144643C
jmp	short loc_789DA2

loc_789DA0:
xor	eax, eax

loc_789DA2:		; size_t
push	10h
mov	[esp+0A4h+var_3C], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+0A0h+var_80], eax
mov	[esp+0A0h+var_4], 9
cmp	eax, edi
jz	short loc_789DCD
push	ebp
mov	ecx, eax
call	sub_795D30
jmp	short loc_789DCF

loc_789DCD:
xor	eax, eax

loc_789DCF:		; size_t
push	10h
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_38], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+0A0h+var_80], eax
mov	[esp+0A0h+var_4], 0Ah
cmp	eax, edi
jz	short loc_789E01
push	ebp
mov	ecx, eax
call	sub_795D70
jmp	short loc_789E03

loc_789E01:
xor	eax, eax

loc_789E03:		; size_t
push	8
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_34], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789E27
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_14464A4
jmp	short loc_789E29

loc_789E27:
xor	eax, eax

loc_789E29:		; size_t
push	8
mov	[esp+0A4h+var_30], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+0A0h+var_80], eax
mov	[esp+0A0h+var_4], 0Bh
cmp	eax, edi
jz	short loc_789E54
push	ebp
mov	ecx, eax
call	sub_795C10
jmp	short loc_789E56

loc_789E54:
xor	eax, eax

loc_789E56:		; size_t
push	8
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_2C], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789E7A
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_14465A4
jmp	short loc_789E7C

loc_789E7A:
xor	eax, eax

loc_789E7C:		; size_t
push	8
mov	[esp+0A4h+var_28], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789E99
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_14465B4
jmp	short loc_789E9B

loc_789E99:
xor	eax, eax

loc_789E9B:		; size_t
push	8
mov	[esp+0A4h+var_24], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789EBB
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_1446528
jmp	short loc_789EBD

loc_789EBB:
xor	eax, eax

loc_789EBD:		; size_t
push	8
mov	[esp+0A4h+var_20], eax
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, edi
jz	short loc_789EDD
mov	[eax+4], ebp
mov	dword ptr [eax], offset	off_144655C
jmp	short loc_789EDF

loc_789EDD:
xor	eax, eax

loc_789EDF:		; size_t
push	6C4h
mov	[esp+0A4h+var_1C], eax
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+0A0h+var_80], esi
mov	[esp+0A0h+var_4], 0Ch
cmp	esi, edi
jz	short loc_789F29
mov	[esi+4], ebp
mov	dword ptr [esi], offset	off_14463D8
lea	ecx, [esi+8]
mov	byte ptr [esp+0A0h+var_4], 0Dh
call	sub_795310
mov	dword ptr [esi], offset	off_14465F0
jmp	short loc_789F2B

loc_789F29:
xor	esi, esi

loc_789F2B:		; size_t
push	6C4h
mov	[esp+0A4h+var_4], ebx
mov	[esp+0A4h+var_18], esi
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+0A0h+var_80], esi
mov	[esp+0A0h+var_4], 0Eh
cmp	esi, edi
jz	short loc_789F7C
mov	[esi+4], ebp
mov	dword ptr [esi], offset	off_14463D8
lea	ecx, [esi+8]
mov	byte ptr [esp+0A0h+var_4], 0Fh
call	sub_795310
mov	dword ptr [esi], offset	off_1446610
jmp	short loc_789F7E

loc_789F7C:
xor	esi, esi

loc_789F7E:
mov	[esp+0A0h+var_14], esi
mov	esi, [esp+0A0h+lpAddend]
add	esi, 1Ch
mov	[esp+0A0h+var_4], ebx
mov	[esp+0A0h+var_10], edi
mov	eax, [esi]
mov	ecx, [esi+8]
lea	ebx, [esi+8]
sub	ecx, eax
sar	ecx, 2
mov	[esp+0A0h+var_88], 1Ch
cmp	ecx, 1Ch
jnb	short loc_78A001
mov	ecx, [esi+4]
mov	ebp, ecx
sub	ebp, eax
sar	ebp, 2
cmp	eax, edi
jz	short loc_789FDB
push	ecx
push	eax
lea	edx, [esp+0A8h+var_88]
push	edx
mov	ecx, esi
call	sub_77EB60
mov	ecx, esi
mov	edi, eax
call	sub_77EA70
jmp	short loc_789FEB

loc_789FDB:
lea	eax, [esp+0A0h+var_88]
push	eax
push	1Ch
mov	ecx, ebx
call	sub_77E260
mov	edi, eax

loc_789FEB:
mov	ecx, [esp+0A0h+var_88]
lea	edx, [edi+ebp*4]
lea	eax, [edi+ecx*4]
mov	[esi], edi
mov	[esi+4], edx
mov	[ebx], eax
mov	ebp, 1

loc_78A001:
lea	eax, [esp+0A0h+var_89]
push	eax
lea	ecx, [esp+0A4h+var_C]
push	ecx
lea	edx, [esp+0A8h+var_7C]
push	edx
mov	ecx, esi
call	sub_783410
test	byte ptr dword_18580A4,	1
jnz	short loc_78A05B
or	dword_18580A4, ebp
mov	eax, [esp+0A0h+lpAddend]
push	eax		; lpAddend
mov	ecx, offset unk_18580A0
mov	[esp+0A4h+var_4], 10h
call	sub_77FF20
push	offset sub_1419930 ; void (__cdecl *)()
call	_atexit
add	esp, 4
mov	[esp+0A0h+var_4], 0FFFFFFFFh

loc_78A05B:
test	byte ptr dword_18580A4,	2
mov	dword_1858070, offset unk_18580A0
jnz	short loc_78A09C
or	dword_18580A4, 2
mov	ecx, [esp+0A0h+lpAddend]
push	ecx		; lpAddend
mov	ecx, offset unk_185809C
mov	[esp+0A4h+var_4], 11h
call	sub_77FF20
push	offset sub_1419920 ; void (__cdecl *)()
call	_atexit
add	esp, 4

loc_78A09C:
mov	dword_1858074, offset unk_185809C
mov	ecx, [esp+0A0h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8Ch
retn
sub_789AA0 endp




sub_78A0C0 proc	near

var_18=	byte ptr -18h
var_14=	byte ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12C9E68
mov	eax, large fs:0
push	eax
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+2Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+2Ch+arg_C]
lea	eax, [esp+2Ch+var_18]
push	eax
mov	ecx, esi
call	sub_4325E0
xor	ebp, ebp
push	offset unk_167EFB8
mov	ecx, eax
mov	[esp+30h+var_4], ebp
call	sub_77FFD0
lea	ecx, [esp+2Ch+var_18]
mov	edi, eax
mov	[esp+2Ch+var_4], 0FFFFFFFFh
call	sub_77FF40
mov	ebx, [esi+8]
mov	ecx, ebx
and	ecx, 0FFFFFFD4h
or	ecx, 214h
mov	eax, 0Ah
mov	[esi+8], ecx
mov	[esi+28h], eax
mov	[esi+2Ch], ebp
cmp	[esp+2Ch+arg_14], ebp
jnz	short loc_78A19D
test	ebx, 4000h
jz	short loc_78A14D
call	sub_793A10
jmp	short loc_78A152

loc_78A14D:
call	sub_793A00

loc_78A152:
mov	edx, [edi]
mov	[esp+2Ch+arg_C], eax
mov	eax, [edx+28h]
push	30h
mov	ecx, edi
call	eax
movzx	eax, ax
push	eax
lea	ecx, [esp+30h+arg_4]
call	sub_7812F0
mov	ecx, [esp+2Ch+arg_C]
mov	dl, [ecx+10h]
mov	eax, [edi]
mov	byte ptr [esp+2Ch+arg_C], dl
mov	ecx, [esp+2Ch+arg_C]
mov	edx, [eax+28h]
push	ecx
mov	ecx, edi
call	edx
movzx	eax, ax
push	eax
lea	ecx, [esp+30h+arg_4]
call	sub_7812F0
mov	dword ptr [esi+28h], 8
jmp	short loc_78A1A0

loc_78A19D:
mov	[esi+28h], eax

loc_78A1A0:
mov	[esi+2Ch], ebp
mov	eax, [edi]
mov	edx, [eax+28h]
push	30h
mov	ecx, edi
call	edx
mov	ecx, [esp+2Ch+arg_14]
mov	edx, dword ptr [esp+2Ch+arg_4+4]
push	ecx
movzx	eax, ax
push	eax
mov	eax, dword ptr [esp+34h+arg_4]
push	esi
push	edx
push	eax
lea	ecx, [esp+40h+var_14]
push	ecx
call	sub_7888C0
mov	edx, [eax]
mov	ecx, [esp+44h+arg_0]
mov	eax, [eax+4]
mov	[ecx+4], eax
add	esp, 18h
mov	[ecx], edx
mov	[esi+8], ebx
mov	eax, ecx
mov	ecx, [esp+2Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	18h
sub_78A0C0 endp

align 10h



sub_78A200 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

mov	eax, dword ptr [esp+arg_14+4]
mov	ecx, dword ptr [esp+arg_14]
mov	edx, [esp+arg_10]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, [esp+8+arg_C]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+10h+arg_4]
push	eax
push	ecx
push	edx
push	esi
call	sub_788920
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_78A200 endp

align 10h



sub_78A240 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

mov	eax, dword ptr [esp+arg_14+4]
mov	ecx, dword ptr [esp+arg_14]
mov	edx, [esp+arg_10]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, [esp+8+arg_C]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4+4]
push	edx
mov	edx, dword ptr [esp+10h+arg_4]
push	eax
push	ecx
push	edx
push	esi
call	sub_788990
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_78A240 endp

align 10h



sub_78A280 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_14]
mov	ecx, [esp+arg_10]
mov	edx, [esp+arg_C]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, dword ptr [esp+8+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4]
push	edx
push	eax
push	ecx
push	esi
call	sub_7888C0
add	esp, 18h
mov	eax, esi
pop	esi
retn	18h
sub_78A280 endp

align 10h



sub_78A2B0 proc	near

arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_14]
mov	ecx, [esp+arg_10]
mov	edx, [esp+arg_C]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, dword ptr [esp+8+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+0Ch+arg_4]
push	edx
push	eax
push	ecx
push	esi
call	sub_788A00
add	esp, 18h
mov	eax, esi
pop	esi
retn	18h
sub_78A2B0 endp

align 10h



sub_78A2E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	edx, [esp+arg_1C]
mov	eax, [ecx+1Ch]
push	esi
mov	esi, [ecx+18h]
push	edi
mov	edi, [esp+8+arg_18]
push	edx
mov	edx, [esp+0Ch+arg_14]
push	edi
push	edx
mov	edx, [esp+14h+arg_8]
add	ecx, 8
push	ecx
mov	ecx, [esp+18h+arg_C]
push	0
push	esi
push	eax
mov	eax, [esp+24h+arg_10]
push	eax
mov	eax, [esp+28h+arg_4]
push	ecx
push	edx
push	eax
call	sub_788A60
sub	eax, esi
add	esp, 2Ch
neg	eax
sbb	eax, eax
lea	ecx, [esp+8+arg_C]
and	eax, 4
push	ecx
lea	ecx, [esp+0Ch+arg_4]
mov	[edi], eax
call	sub_781390
test	al, al
jz	short loc_78A33B
or	dword ptr [edi], 2

loc_78A33B:
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
pop	edi
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	20h
sub_78A2E0 endp

align 10h



sub_78A360 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	edx, [esp+arg_1C]
mov	eax, [ecx+34h]
push	esi
mov	esi, [ecx+30h]
push	edi
mov	edi, [esp+8+arg_18]
push	edx
mov	edx, [esp+0Ch+arg_14]
push	edi
push	edx
mov	edx, [esp+14h+arg_8]
add	ecx, 8
push	ecx
mov	ecx, [esp+18h+arg_C]
push	0
push	esi
push	eax
mov	eax, [esp+24h+arg_10]
push	eax
mov	eax, [esp+28h+arg_4]
push	ecx
push	edx
push	eax
call	sub_788A60
add	esp, 2Ch
cmp	eax, esi
jnz	short loc_78A3BB
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
mov	dword ptr [edi], 0
pop	edi
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	20h

loc_78A3BB:
lea	ecx, [esp+8+arg_C]
push	ecx
lea	ecx, [esp+0Ch+arg_4]
mov	dword ptr [edi], 4
call	sub_781390
test	al, al
jz	short loc_78A3D6
or	dword ptr [edi], 2

loc_78A3D6:
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
pop	edi
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	20h
sub_78A360 endp

align 10h



sub_78A3F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	edx, [esp+arg_1C]
mov	eax, [ecx+1Ch]
push	esi
mov	esi, [ecx+18h]
push	edi
mov	edi, [esp+8+arg_18]
push	edx
mov	edx, [esp+0Ch+arg_14]
push	edi
push	edx
mov	edx, [esp+14h+arg_8]
add	ecx, 8
push	ecx
mov	ecx, [esp+18h+arg_C]
push	0
push	esi
push	eax
mov	eax, [esp+24h+arg_10]
push	eax
mov	eax, [esp+28h+arg_4]
push	ecx
push	edx
push	eax
call	sub_788E20
sub	eax, esi
add	esp, 2Ch
neg	eax
sbb	eax, eax
lea	ecx, [esp+8+arg_C]
and	eax, 4
push	ecx
lea	ecx, [esp+0Ch+arg_4]
mov	[edi], eax
call	sub_781460
test	al, al
jz	short loc_78A44B
or	dword ptr [edi], 2

loc_78A44B:
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
pop	edi
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	20h
sub_78A3F0 endp

align 10h



sub_78A470 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	edx, [esp+arg_1C]
mov	eax, [ecx+34h]
push	esi
mov	esi, [ecx+30h]
push	edi
mov	edi, [esp+8+arg_18]
push	edx
mov	edx, [esp+0Ch+arg_14]
push	edi
push	edx
mov	edx, [esp+14h+arg_8]
add	ecx, 8
push	ecx
mov	ecx, [esp+18h+arg_C]
push	0
push	esi
push	eax
mov	eax, [esp+24h+arg_10]
push	eax
mov	eax, [esp+28h+arg_4]
push	ecx
push	edx
push	eax
call	sub_788E20
add	esp, 2Ch
cmp	eax, esi
jnz	short loc_78A4CB
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
mov	dword ptr [edi], 0
pop	edi
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	20h

loc_78A4CB:
lea	ecx, [esp+8+arg_C]
push	ecx
lea	ecx, [esp+0Ch+arg_4]
mov	dword ptr [edi], 4
call	sub_781460
test	al, al
jz	short loc_78A4E6
or	dword ptr [edi], 2

loc_78A4E6:
mov	eax, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
pop	edi
mov	[eax], edx
mov	[eax+4], ecx
pop	esi
retn	20h
sub_78A470 endp

align 10h



sub_78A500 proc	near

var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= byte ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_D4=	dword ptr -0D4h
var_D0=	byte ptr -0D0h
var_B8=	byte ptr -0B8h
var_A0=	byte ptr -0A0h
var_88=	byte ptr -88h
var_70=	dword ptr -70h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

push	0FFFFFFFFh
push	offset loc_12C9FE8
mov	eax, large fs:0
push	eax
sub	esp, 164h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+170h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+184h+var_C]
mov	large fs:0, eax
mov	eax, [esp+184h+arg_20]
mov	ebx, [esp+184h+arg_0]
mov	ebp, [esp+184h+arg_1C]
mov	esi, [esp+184h+arg_18]
mov	edi, [esp+184h+arg_24]
lea	ecx, [esp+184h+arg_C]
push	ecx
lea	ecx, [esp+188h+arg_4]
mov	[esp+188h+var_158], ebx
mov	[esp+188h+var_168], ebp
mov	[esp+188h+var_134], eax
mov	[esp+188h+var_170], 0
call	sub_781390
test	al, al
jz	short loc_78A5A8
mov	eax, [esp+184h+arg_8]
or	dword ptr [ebp+0], 2
mov	edx, [esp+184h+arg_4]
mov	[ebx+4], eax
mov	[ebx], edx
mov	eax, ebx
jmp	loc_78B0A5

loc_78A5A8:
lea	ecx, [esp+184h+var_164]
push	ecx
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EFA8
lea	ecx, [esp+188h+var_164]
mov	[esp+188h+var_4], 0
call	sub_77FFD0
push	offset unk_167EFA4
lea	ecx, [esp+188h+var_164]
mov	[esp+188h+var_160], eax
call	sub_77FFD0
mov	ebp, eax
push	offset unk_167EF9C
lea	ecx, [esp+188h+var_164]
mov	[esp+188h+var_150], ebp
call	sub_77FFD0
mov	bl, [esp+184h+arg_14]
mov	[esp+184h+var_14C], eax
test	bl, bl
jz	short loc_78A617
mov	edx, [ebp+0]
mov	edx, [edx+24h]
lea	eax, [esp+184h+var_148]
push	eax
mov	ecx, ebp
call	edx
lea	eax, [esp+184h+var_148]
jmp	short loc_78A62B

loc_78A617:
mov	ecx, [esp+184h+var_160]
mov	eax, [ecx]
mov	eax, [eax+24h]
lea	edx, [esp+184h+var_154]
push	edx
call	eax
lea	eax, [esp+184h+var_154]

loc_78A62B:
mov	ecx, [eax]
mov	[esp+184h+var_144], ecx
test	bl, bl
jz	short loc_78A653
lea	edx, [esp+184h+var_E8]
push	edx
mov	ecx, ebp
call	sub_7819B0
mov	byte ptr [esp+184h+var_4], 1
mov	ebx, 1
jmp	short loc_78A66D

loc_78A653:
mov	ecx, [esp+184h+var_160]
lea	eax, [esp+184h+var_130]
push	eax
call	sub_7819B0
mov	ebx, 2
mov	[esp+184h+var_4], ebx

loc_78A66D:
push	eax
lea	ecx, [esp+188h+var_58]
mov	[esp+188h+var_170], ebx
call	sub_403850
mov	[esp+184h+var_4], 4
test	bl, 2
jz	short loc_78A6C7
mov	ecx, [esp+184h+var_11C]
and	ebx, 0FFFFFFFDh
lea	edx, [esp+184h+var_130]
mov	[esp+184h+var_170], ebx
cmp	ecx, edx
jz	short loc_78A6C7
test	ecx, ecx
jz	short loc_78A6C7
mov	eax, [esp+184h+var_130]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78A6BD
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78A6C7

loc_78A6BD:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78A6C7:
mov	byte ptr [esp+184h+var_4], 5
test	bl, 1
jz	short loc_78A716
mov	ecx, [esp+184h+var_D4]
and	ebx, 0FFFFFFFEh
lea	eax, [esp+184h+var_E8]
mov	[esp+184h+var_170], ebx
cmp	ecx, eax
jz	short loc_78A716
test	ecx, ecx
jz	short loc_78A716
mov	eax, [esp+184h+var_E8]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78A70C
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78A716

loc_78A70C:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78A716:
cmp	[esp+184h+arg_14], 0
jz	short loc_78A73C
lea	ecx, [esp+184h+var_100]
push	ecx
mov	ecx, ebp
call	sub_781990
mov	byte ptr [esp+184h+var_4], 6
or	ebx, 4
jmp	short loc_78A758

loc_78A73C:
mov	ecx, [esp+184h+var_160]
lea	edx, [esp+184h+var_118]
push	edx
call	sub_781990
mov	[esp+184h+var_4], 7
or	ebx, 8

loc_78A758:
push	eax
lea	ecx, [esp+188h+var_40]
mov	[esp+188h+var_170], ebx
call	sub_403850
mov	[esp+184h+var_4], 9
test	bl, 8
jz	short loc_78A7B5
mov	ecx, [esp+184h+var_104]
and	ebx, 0FFFFFFF7h
lea	eax, [esp+184h+var_118]
mov	[esp+184h+var_170], ebx
cmp	ecx, eax
jz	short loc_78A7B5
test	ecx, ecx
jz	short loc_78A7B5
mov	eax, [esp+184h+var_118]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78A7AB
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78A7B5

loc_78A7AB:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78A7B5:
mov	byte ptr [esp+184h+var_4], 0Ah
test	bl, 4
jz	short loc_78A804
mov	ecx, [esp+184h+var_EC]
and	ebx, 0FFFFFFFBh
lea	edx, [esp+184h+var_100]
mov	[esp+184h+var_170], ebx
cmp	ecx, edx
jz	short loc_78A804
test	ecx, ecx
jz	short loc_78A804
mov	eax, [esp+184h+var_100]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78A7FA
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78A804

loc_78A7FA:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78A804:
mov	eax, [esi+8]
shr	eax, 9
and	al, 1
mov	byte ptr [esp+184h+var_15C+3], al
lea	eax, [esp+184h+var_70]
mov	ecx, eax
mov	[esp+184h+var_60], eax
mov	[esp+184h+var_5C], ecx
mov	byte ptr [esp+184h+var_70], 0
mov	ecx, [esp+184h+arg_4]
mov	byte ptr [esp+184h+var_4], 0Bh
xor	ebp, ebp

loc_78A840:		; switch 5 cases
movsx	eax, byte ptr [esp+ebp+184h+var_144]
cmp	eax, 4
ja	loc_78AD4D	; default
jmp	ds:off_78B0D0[eax*4] ; switch jump

loc_78A855:		; jumptable 0078A84E case 1
cmp	byte ptr [esp+184h+arg_8+2], 0
jnz	short loc_78A896
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78A86C
movzx	eax, byte ptr [eax]
jmp	short loc_78A87A

loc_78A86C:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
mov	ecx, [esp+184h+arg_4]

loc_78A87A:
cmp	eax, 0FFFFFFFFh
setz	dl
mov	byte ptr [esp+184h+arg_8], al
mov	byte ptr [esp+184h+arg_8+1], dl
mov	byte ptr [esp+184h+arg_8+2], 1

loc_78A896:
movzx	eax, byte ptr [esp+184h+arg_8]
mov	edx, [esp+184h+var_14C]
mov	edx, [edx+8]
test	byte ptr [edx+eax*4], 1
jz	loc_78ADD1
lea	ecx, [esp+184h+arg_4]
call	sub_7808B0

loc_78A8BB:		; jumptable 0078A84E case 0
lea	eax, [esp+184h+arg_C]
push	eax
lea	ecx, [esp+188h+arg_4]
call	sub_781390
test	al, al
jnz	loc_78AD46
mov	esi, [esp+184h+var_14C]
jmp	short loc_78A8E0
align 10h

loc_78A8E0:
cmp	byte ptr [esp+184h+arg_8+2], 0
mov	ecx, [esp+184h+arg_4]
jnz	short loc_78A928
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78A8FE
movzx	eax, byte ptr [eax]
jmp	short loc_78A90C

loc_78A8FE:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
mov	ecx, [esp+184h+arg_4]

loc_78A90C:
cmp	eax, 0FFFFFFFFh
setz	dl
mov	byte ptr [esp+184h+arg_8], al
mov	byte ptr [esp+184h+arg_8+1], dl
mov	byte ptr [esp+184h+arg_8+2], 1

loc_78A928:
movzx	eax, byte ptr [esp+184h+arg_8]
mov	edx, [esi+8]
test	byte ptr [edx+eax*4], 1
jz	loc_78AD4D	; default
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78A94B
inc	eax
mov	[ecx+8], eax
jmp	short loc_78A952

loc_78A94B:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_78A952:
lea	eax, [esp+184h+arg_C]
push	eax
lea	ecx, [esp+188h+arg_4]
mov	byte ptr [esp+188h+arg_8+2], 0
call	sub_781390
test	al, al
jz	loc_78A8E0
jmp	loc_78AD46

loc_78A97B:		; jumptable 0078A84E case 2
cmp	[esp+184h+arg_14], 0
jz	short loc_78A9A3
lea	ecx, [esp+184h+var_A0]
push	ecx
mov	ecx, [esp+188h+var_150]
call	sub_781950
mov	byte ptr [esp+184h+var_4], 0Ch
or	ebx, 10h
jmp	short loc_78A9C2

loc_78A9A3:
mov	ecx, [esp+184h+var_160]
lea	edx, [esp+184h+var_B8]
push	edx
call	sub_781950
mov	[esp+184h+var_4], 0Dh
or	ebx, 20h

loc_78A9C2:
push	eax
lea	ecx, [esp+188h+var_28]
mov	[esp+188h+var_170], ebx
call	sub_403850
mov	[esp+184h+var_4], 0Fh
test	bl, 20h
jz	short loc_78A9F6
and	ebx, 0FFFFFFDFh
lea	ecx, [esp+184h+var_B8]
mov	[esp+184h+var_170], ebx
call	sub_407910

loc_78A9F6:
mov	byte ptr [esp+184h+var_4], 10h
test	bl, 10h
jz	short loc_78AA16
and	ebx, 0FFFFFFEFh
lea	ecx, [esp+184h+var_A0]
mov	[esp+184h+var_170], ebx
call	sub_407910

loc_78AA16:
mov	eax, [esp+184h+var_18]
mov	ecx, [esp+184h+var_14]
mov	edx, [esp+184h+arg_10]
push	eax
mov	eax, [esp+188h+arg_C]
push	ecx
mov	ecx, [esp+18Ch+arg_8]
push	edx
mov	edx, [esp+190h+arg_4]
push	eax
push	ecx
push	edx
lea	eax, [esp+19Ch+var_140]
push	eax
call	sub_7815D0
add	esp, 1Ch
cmp	byte ptr [esp+184h+var_138], 0
jnz	short loc_78AA6B
cmp	byte ptr [esp+184h+var_15C+3], 0
jz	short loc_78AA6B
mov	ecx, [esp+184h+var_168]
mov	dword ptr [ecx], 4

loc_78AA6B:
mov	edx, [esp+184h+var_13C]
mov	eax, [esp+184h+var_14]
mov	ecx, [esp+184h+var_140]
mov	[esp+184h+arg_8], edx
lea	edx, [esp+184h+var_28]
mov	[esp+184h+arg_4], ecx
mov	byte ptr [esp+184h+var_4], 0Bh
cmp	eax, edx
jz	loc_78AD4D	; default
test	eax, eax
jz	loc_78AD4D	; default
mov	ecx, [esp+184h+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_78AAC6
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	loc_78AD46

loc_78AAC6:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8
jmp	loc_78AD46

loc_78AAD5:		; jumptable 0078A84E case 3
lea	eax, [esp+184h+arg_C]
push	eax
lea	ecx, [esp+188h+arg_4]
call	sub_781390
test	al, al
jz	short loc_78AB1D
mov	ecx, [esp+184h+var_2C]
cmp	ecx, [esp+184h+var_30]
jz	loc_78AD46
mov	edx, [esp+184h+var_44]
cmp	edx, [esp+184h+var_48]
jnz	loc_78AE2C
mov	byte ptr [edi],	0
jmp	loc_78AD46

loc_78AB1D:
mov	esi, [esp+184h+var_2C]
cmp	esi, [esp+184h+var_30]
jnz	short loc_78AB69
mov	esi, [esp+184h+var_44]
cmp	esi, [esp+184h+var_48]
jz	loc_78AD46
lea	ecx, [esp+184h+arg_4]
call	sub_781350
cmp	al, [esi]
jnz	loc_78AD46
lea	ecx, [esp+184h+arg_4]
call	sub_7808B0
mov	byte ptr [edi],	0
jmp	loc_78AD46

loc_78AB69:
lea	ecx, [esp+184h+arg_4]
call	sub_781350
cmp	al, [esi]
jnz	short loc_78AB8A
lea	ecx, [esp+184h+arg_4]
call	sub_7808B0
jmp	loc_78AD46

loc_78AB8A:
mov	esi, [esp+184h+var_44]
cmp	esi, [esp+184h+var_48]
jz	loc_78AD46
lea	ecx, [esp+184h+arg_4]
call	sub_781350
cmp	al, [esi]
jnz	loc_78AE2C
lea	ecx, [esp+184h+arg_4]
call	sub_7808B0
mov	byte ptr [edi],	0
jmp	loc_78AD46

loc_78ABC6:		; jumptable 0078A84E case 4
cmp	[esp+184h+arg_14], 0
jz	short loc_78AC0A
mov	ecx, [esp+184h+var_150]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
mov	ecx, [esp+184h+var_150]
mov	byte ptr [esp+184h+var_148], al
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
mov	ecx, [esp+184h+var_150]
mov	esi, eax
lea	eax, [esp+184h+var_D0]
push	eax
call	sub_781970
mov	byte ptr [esp+184h+var_4], 11h
or	ebx, 40h
jmp	short loc_78AC48

loc_78AC0A:
mov	ecx, [esp+184h+var_160]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
mov	ecx, [esp+184h+var_160]
mov	byte ptr [esp+184h+var_148], al
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
lea	ecx, [esp+184h+var_88]
push	ecx
mov	ecx, [esp+188h+var_160]
mov	esi, eax
call	sub_781970
mov	[esp+184h+var_4], 12h
or	ebx, 80h

loc_78AC48:
push	eax
lea	ecx, [esp+188h+var_28]
mov	[esp+188h+var_170], ebx
call	sub_403850
mov	[esp+184h+var_4], 14h
test	bl, bl
jns	short loc_78AC7E
and	ebx, 0FFFFFF7Fh
lea	ecx, [esp+184h+var_88]
mov	[esp+184h+var_170], ebx
call	sub_407910

loc_78AC7E:
mov	byte ptr [esp+184h+var_4], 15h
test	bl, 40h
jz	short loc_78AC9E
and	ebx, 0FFFFFFBFh
lea	ecx, [esp+184h+var_D0]
mov	[esp+184h+var_170], ebx
call	sub_407910

loc_78AC9E:
mov	edx, [esp+184h+var_14]
mov	byte ptr [esp+184h+var_16C+3], 1
cmp	edx, [esp+184h+var_18]
jnz	short loc_78ACBA
mov	byte ptr [esp+184h+var_154], 0
jmp	short loc_78ACD7

loc_78ACBA:
cmp	[esp+184h+arg_14], 0
mov	ecx, [esp+184h+var_150]
jnz	short loc_78ACCC
mov	ecx, [esp+184h+var_160]

loc_78ACCC:
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
mov	byte ptr [esp+184h+var_154], al

loc_78ACD7:
mov	edx, [esp+184h+var_154]
lea	eax, [esp+184h+var_16C+3]
push	eax
mov	eax, [esp+188h+var_148]
lea	ecx, [esp+188h+var_28]
push	ecx
mov	ecx, [esp+18Ch+var_14C]
push	edx
push	esi
push	eax
mov	eax, [esp+198h+arg_10]
push	ecx
mov	ecx, [esp+19Ch+arg_C]
lea	edx, [esp+19Ch+var_70]
push	edx
push	eax
push	ecx
lea	edx, [esp+1A8h+arg_4]
push	edx
call	sub_789720
mov	ecx, [esp+1ACh+var_168]
add	esp, 28h
cmp	byte ptr [esp+184h+var_16C+3], 0
jnz	short loc_78AD2A
or	dword ptr [ecx], 4

loc_78AD2A:
mov	byte ptr [esp+184h+var_4], 0Bh
test	al, al
jz	loc_78AE8E
lea	ecx, [esp+184h+var_28]
call	sub_407910

loc_78AD46:
mov	ecx, [esp+184h+arg_4]

loc_78AD4D:		; default
inc	ebp
cmp	ebp, 4
jl	loc_78A840
cmp	byte ptr [edi],	0
jz	loc_78AEF6
mov	edx, [esp+184h+var_30]
mov	eax, [esp+184h+var_2C]
mov	esi, edx
sub	esi, eax
cmp	esi, 1
jbe	loc_78AEBC
push	edx
mov	edx, [esp+188h+arg_10]
inc	eax
push	eax
mov	eax, [esp+18Ch+arg_C]
push	edx
mov	edx, [esp+190h+arg_8]
push	eax
push	edx
push	ecx
lea	eax, [esp+19Ch+var_140]
push	eax
call	sub_7815D0
mov	ecx, [esp+1A0h+var_140]
mov	edx, [esp+1A0h+var_13C]
add	esp, 1Ch
cmp	byte ptr [esp+184h+var_138], 0
mov	[esp+184h+arg_4], ecx
mov	[esp+184h+arg_8], edx
jnz	loc_78AEBC
mov	edi, [esp+184h+var_168]
or	dword ptr [edi], 4
jmp	loc_78AEC0

loc_78ADD1:
mov	eax, [esp+184h+var_168]
mov	esi, [esp+184h+var_158]
mov	dword ptr [eax], 4
mov	[esi], ecx
mov	ecx, [esp+184h+arg_8]
mov	[esi+4], ecx

loc_78ADEB:
lea	ecx, [esp+184h+var_70]
mov	byte ptr [esp+184h+var_4], 0Ah
call	sub_407910
lea	ecx, [esp+184h+var_40]
mov	byte ptr [esp+184h+var_4], 5
call	sub_407910
lea	ecx, [esp+184h+var_58]
mov	byte ptr [esp+184h+var_4], 0
call	sub_407910
jmp	loc_78B09A

loc_78AE2C:
mov	edx, [esp+184h+var_168]
mov	ecx, [esp+184h+arg_8]
mov	esi, [esp+184h+var_158]
mov	eax, [esp+184h+arg_4]
mov	dword ptr [edx], 4
mov	[esi+4], ecx
lea	ecx, [esp+184h+var_70]
mov	[esi], eax
mov	byte ptr [esp+184h+var_4], 0Ah
call	sub_407910
lea	ecx, [esp+184h+var_40]
mov	byte ptr [esp+184h+var_4], 5
call	sub_407910
lea	ecx, [esp+184h+var_58]
mov	byte ptr [esp+184h+var_4], 0
call	sub_407910
jmp	loc_78B09A

loc_78AE8E:
mov	edx, [esp+184h+arg_4]
mov	esi, [esp+184h+var_158]
mov	eax, [esp+184h+arg_8]
mov	dword ptr [ecx], 4
lea	ecx, [esp+184h+var_28]
mov	[esi], edx
mov	[esi+4], eax
call	sub_407910
jmp	loc_78ADEB

loc_78AEBC:
mov	edi, [esp+184h+var_168]

loc_78AEC0:
test	byte ptr [edi],	4
jnz	loc_78AF9F
mov	ecx, [esp+184h+var_134]
lea	eax, [esp+184h+var_70]
cmp	eax, ecx
jz	loc_78AF9F
mov	edx, [esp+184h+var_60]
mov	eax, [esp+184h+var_5C]
push	edx
push	eax
call	sub_403980
jmp	loc_78AF9F

loc_78AEF6:
mov	edx, [esp+184h+var_48]
mov	eax, [esp+184h+var_44]
mov	esi, edx
sub	esi, eax
cmp	esi, 1
jbe	short loc_78AF5C
push	edx
mov	edx, [esp+188h+arg_10]
inc	eax
push	eax
mov	eax, [esp+18Ch+arg_C]
push	edx
mov	edx, [esp+190h+arg_8]
push	eax
push	edx
push	ecx
lea	eax, [esp+19Ch+var_140]
push	eax
call	sub_7815D0
mov	ecx, [esp+1A0h+var_140]
mov	edx, [esp+1A0h+var_13C]
add	esp, 1Ch
cmp	byte ptr [esp+184h+var_138], 0
mov	[esp+184h+arg_4], ecx
mov	[esp+184h+arg_8], edx
jnz	short loc_78AF5C
mov	edi, [esp+184h+var_168]
or	dword ptr [edi], 4
jmp	short loc_78AF60

loc_78AF5C:
mov	edi, [esp+184h+var_168]

loc_78AF60:
test	byte ptr [edi],	4
jnz	short loc_78AF9F
mov	ecx, [esp+184h+var_14C]
mov	eax, [ecx]
mov	edx, [eax+18h]
push	2Dh
call	edx
mov	esi, [esp+184h+var_134]
mov	byte ptr [esp+184h+var_144], al
mov	eax, [esp+184h+var_144]
push	eax		; int
push	1		; size_t
mov	ecx, esi
call	sub_7873E0
mov	ecx, [esp+184h+var_60]
mov	edx, [esp+184h+var_5C]
push	ecx
push	edx
mov	ecx, esi
call	sub_4038B0

loc_78AF9F:
lea	eax, [esp+184h+arg_C]
push	eax
lea	ecx, [esp+188h+arg_4]
call	sub_781390
test	al, al
jz	short loc_78AFBA
or	dword ptr [edi], 2

loc_78AFBA:
mov	ecx, [esp+184h+arg_4]
mov	esi, [esp+184h+var_158]
mov	edx, [esp+184h+arg_8]
mov	[esi], ecx
mov	ecx, [esp+184h+var_5C]
lea	eax, [esp+184h+var_70]
mov	[esi+4], edx
mov	byte ptr [esp+184h+var_4], 0Ah
cmp	ecx, eax
jz	short loc_78B014
test	ecx, ecx
jz	short loc_78B014
mov	eax, [esp+184h+var_70]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78B00A
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78B014

loc_78B00A:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78B014:
mov	ecx, [esp+184h+var_2C]
lea	edx, [esp+184h+var_40]
mov	byte ptr [esp+184h+var_4], 5
cmp	ecx, edx
jz	short loc_78B057
test	ecx, ecx
jz	short loc_78B057
mov	eax, [esp+184h+var_40]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78B04D
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78B057

loc_78B04D:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78B057:
mov	ecx, [esp+184h+var_44]
lea	eax, [esp+184h+var_58]
mov	byte ptr [esp+184h+var_4], 0
cmp	ecx, eax
jz	short loc_78B09A
test	ecx, ecx
jz	short loc_78B09A
mov	eax, [esp+184h+var_58]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78B090
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78B09A

loc_78B090:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78B09A:
lea	ecx, [esp+184h+var_164]
call	sub_77FF40
mov	eax, esi

loc_78B0A5:
mov	ecx, [esp+184h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+170h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 170h
retn
sub_78A500 endp

align 10h
off_78B0D0 dd offset loc_78A8BB	; jump table for switch	statement
dd offset loc_78A855
dd offset loc_78A97B
dd offset loc_78AAD5
dd offset loc_78ABC6
align 10h



sub_78B0F0 proc	near

var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	word ptr -94h
var_90=	dword ptr -90h
var_8C=	byte ptr -8Ch
var_84=	byte ptr -84h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	word ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	word ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

sub	esp, 0ACh
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0ACh+var_4], eax
mov	eax, [esp+0ACh+arg_24]
push	ebp
mov	ebp, [esp+0B0h+arg_20]
push	esi
mov	esi, [esp+0B4h+arg_0]
push	edi
mov	edi, [esp+0B8h+arg_10]
lea	ecx, [esp+0B8h+arg_4]
push	ecx
mov	ecx, esi
mov	[esp+0BCh+var_A4], edi
mov	[esp+0BCh+var_98], ebp
mov	[esp+0BCh+var_A0], eax
call	sub_781460
test	al, al
jnz	loc_78B5E7
cmp	[esi+7], al
jnz	short loc_78B17D
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78B15A
movzx	eax, word ptr [eax]
jmp	short loc_78B164

loc_78B15A:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_78B164:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_78B17D:
movzx	eax, word ptr [esi+4]
mov	edx, [edi]
push	eax
mov	eax, [edx+8]
push	40h
mov	ecx, edi
call	eax
test	al, al
jz	loc_78B5E7
push	ebx
mov	ebx, [ebp+14h]
sub	ebx, [ebp+10h]
lea	ecx, [esp+0BCh+var_84]
neg	ebx
sbb	ebx, ebx
and	ebx, ecx
lea	edx, [esp+0BCh+arg_4]
push	edx
mov	ecx, esi
mov	[esp+0C0h+var_A8], ebx
mov	byte ptr [esp+0C0h+var_AC+3], 0
call	sub_781460
test	al, al
jnz	loc_78B392

loc_78B1C6:
cmp	byte ptr [esi+7], 0
jnz	short loc_78B1FE
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78B1DB
movzx	eax, word ptr [eax]
jmp	short loc_78B1E5

loc_78B1DB:
mov	eax, [ecx]
mov	edx, [eax+1Ch]
call	edx
movzx	eax, ax

loc_78B1E5:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_78B1FE:
movzx	eax, word ptr [esi+4]
mov	edx, [edi]
push	eax
mov	eax, [edx+8]
push	40h
mov	ecx, edi
call	eax
test	al, al
jz	loc_78B300
inc	byte ptr [esp+0BCh+var_AC+3]
push	0
lea	ecx, [esp+0C0h+var_8C]
push	ecx
mov	ecx, esi
call	sub_780DC0
mov	edi, eax
cmp	byte ptr [edi+7], 0
jnz	short loc_78B262
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78B23F
movzx	eax, word ptr [eax]
jmp	short loc_78B249

loc_78B23F:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_78B249:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[edi+4], ax
mov	[edi+6], dl
mov	byte ptr [edi+7], 1

loc_78B262:
movzx	eax, word ptr [edi+4]
mov	ecx, [esp+0BCh+arg_C]
mov	ebp, [ecx+24h]
lea	edi, [ecx+20h]
mov	dword ptr [esp+0BCh+var_94], eax
mov	eax, [edi]
cmp	ebp, ecx
jnz	short loc_78B290
mov	ebx, eax
sub	ebx, ecx
sar	ebx, 1
mov	edx, 10h
sub	edx, ebx
mov	ebx, [esp+0BCh+var_A8]
jmp	short loc_78B296

loc_78B290:
mov	edx, [ecx]
sub	edx, eax
sar	edx, 1

loc_78B296:
cmp	edx, 1
jnz	short loc_78B2E1
sub	eax, ebp
mov	[esp+0BCh+var_9C], edx
sar	eax, 1
mov	edx, 7FFFFFFEh
sub	edx, eax
mov	[esp+0BCh+var_90], eax
cmp	edx, 1
jb	loc_78B3A5
lea	edx, [esp+0BCh+var_90]
cmp	eax, 1
ja	short loc_78B2C4
lea	edx, [esp+0BCh+var_9C]

loc_78B2C4:
mov	edx, [edx]
lea	edx, [edx+eax+1]
cmp	edx, 7FFFFFFEh
ja	short loc_78B2D6
cmp	edx, eax
jnb	short loc_78B2DB

loc_78B2D6:
mov	edx, 7FFFFFFEh

loc_78B2DB:
push	edx
call	sub_42BFB0

loc_78B2E1:
mov	eax, [edi]
mov	ebp, [esp+0BCh+var_98]
xor	ecx, ecx
mov	[eax+2], cx
mov	edx, [edi]
mov	ax, [esp+0BCh+var_94]
mov	[edx], ax
add	dword ptr [edi], 2
mov	edi, [esp+0BCh+var_A4]
jmp	short loc_78B37B

loc_78B300:
test	ebx, ebx
jz	loc_78B392
cmp	byte ptr [esi+7], 0
jnz	short loc_78B340
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78B31D
movzx	eax, word ptr [eax]
jmp	short loc_78B327

loc_78B31D:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_78B327:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_78B340:
mov	ax, [esi+4]
cmp	ax, [esp+0BCh+arg_1C]
jnz	short loc_78B392
mov	cl, byte ptr [esp+0BCh+var_AC+3]
mov	[ebx], cl
mov	ecx, [esi]
mov	eax, [ecx+8]
inc	ebx
mov	[esp+0BCh+var_A8], ebx
mov	byte ptr [esp+0BCh+var_AC+3], 0
cmp	eax, [ecx+0Ch]
jnb	short loc_78B370
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_78B377

loc_78B370:
mov	edx, [ecx]
mov	eax, [edx+20h]
call	eax

loc_78B377:
mov	byte ptr [esi+7], 0

loc_78B37B:
lea	ecx, [esp+0BCh+arg_4]
push	ecx
mov	ecx, esi
call	sub_781460
test	al, al
jz	loc_78B1C6

loc_78B392:
mov	ecx, [ebp+14h]
mov	eax, [ebp+10h]
cmp	ecx, eax
jnz	short loc_78B3AF
mov	edx, [esp+0BCh+var_A0]
mov	byte ptr [edx],	1
jmp	short loc_78B404

loc_78B3A5:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70

loc_78B3AF:
lea	edx, [esp+0BCh+var_84]
cmp	ebx, edx
jz	short loc_78B3C2
mov	dl, byte ptr [esp+0BCh+var_AC+3]
mov	edi, [esp+0BCh+var_A4]
mov	[ebx], dl
inc	ebx

loc_78B3C2:
push	eax
push	ecx
lea	eax, [esp+0C4h+var_84]
push	ebx
push	eax
call	sub_7927B0
mov	ecx, [esp+0CCh+var_A0]
add	esp, 10h
lea	edx, [esp+0BCh+arg_4]
mov	[ecx], al
push	edx
mov	ecx, esi
call	sub_781460
test	al, al
jnz	loc_78B5C7
mov	ecx, esi
call	sub_781410
cmp	ax, [esp+0BCh+arg_14]
jnz	loc_78B5C7

loc_78B404:
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78B416
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_78B41D

loc_78B416:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_78B41D:
lea	eax, [esp+0BCh+arg_4]
push	eax
mov	ecx, esi
mov	byte ptr [esi+7], 0
mov	[esp+0C0h+var_A8], 0
call	sub_781460
test	al, al
jnz	loc_78B58B
jmp	short loc_78B446

loc_78B442:
mov	edi, [esp+0BCh+var_A4]

loc_78B446:
cmp	byte ptr [esi+7], 0
jnz	short loc_78B47E
mov	ecx, [esi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78B45B
movzx	eax, word ptr [eax]
jmp	short loc_78B465

loc_78B45B:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_78B465:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[esi+4], ax
mov	[esi+6], dl
mov	byte ptr [esi+7], 1

loc_78B47E:
movzx	eax, word ptr [esi+4]
mov	edx, [edi]
push	eax
mov	eax, [edx+8]
push	40h
mov	ecx, edi
call	eax
test	al, al
jz	loc_78B58B
push	0
lea	ecx, [esp+0C0h+var_8C]
push	ecx
mov	ecx, esi
call	sub_780DC0
mov	edi, eax
cmp	byte ptr [edi+7], 0
jnz	short loc_78B4DE
mov	ecx, [edi]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78B4BB
movzx	eax, word ptr [eax]
jmp	short loc_78B4C5

loc_78B4BB:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_78B4C5:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	[edi+4], ax
mov	[edi+6], dl
mov	byte ptr [edi+7], 1

loc_78B4DE:
movzx	eax, word ptr [edi+4]
mov	ecx, [esp+0BCh+arg_C]
mov	ebp, [ecx+24h]
lea	edi, [ecx+20h]
mov	[esp+0BCh+var_9C], eax
mov	eax, [edi]
cmp	ebp, ecx
jnz	short loc_78B508
mov	ebx, eax
sub	ebx, ecx
sar	ebx, 1
mov	edx, 10h
sub	edx, ebx
jmp	short loc_78B50E

loc_78B508:
mov	edx, [ecx]
sub	edx, eax
sar	edx, 1

loc_78B50E:
mov	ebx, 1
cmp	edx, ebx
jnz	short loc_78B55B
sub	eax, ebp
sar	eax, 1
mov	edx, 7FFFFFFEh
sub	edx, eax
mov	dword ptr [esp+0BCh+var_94], ebx
mov	[esp+0BCh+var_98], eax
cmp	edx, ebx
jb	loc_78B3A5
lea	edx, [esp+0BCh+var_98]
cmp	eax, ebx
ja	short loc_78B53E
lea	edx, [esp+0BCh+var_94]

loc_78B53E:
mov	edx, [edx]
lea	edx, [eax+edx+1]
cmp	edx, 7FFFFFFEh
ja	short loc_78B550
cmp	edx, eax
jnb	short loc_78B555

loc_78B550:
mov	edx, 7FFFFFFEh

loc_78B555:
push	edx
call	sub_42BFB0

loc_78B55B:
mov	eax, [edi]
add	[esp+0BCh+var_A8], ebx
xor	ecx, ecx
mov	[eax+2], cx
mov	edx, [edi]
mov	ax, word ptr [esp+0BCh+var_9C]
lea	ecx, [esp+0BCh+arg_4]
push	ecx
mov	[edx], ax
add	dword ptr [edi], 2
mov	ecx, esi
call	sub_781460
test	al, al
jz	loc_78B442

loc_78B58B:
mov	ecx, [esp+0BCh+var_A0]
cmp	byte ptr [ecx],	0
jz	short loc_78B5A8
mov	edx, [esp+0BCh+var_A8]
cmp	edx, [esp+0BCh+arg_18]
jnz	short loc_78B5A8
mov	eax, 1
jmp	short loc_78B5AA

loc_78B5A8:
xor	eax, eax

loc_78B5AA:
mov	[ecx], al

loc_78B5AC:
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
mov	ecx, [esp+0ACh+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 0ACh
retn

loc_78B5C7:
mov	esi, [esp+0BCh+arg_18]
test	esi, esi
jz	short loc_78B5AC

loc_78B5D2:
mov	ecx, [esp+0BCh+arg_C]
push	30h
call	sub_438A10
sub	esi, 1
jnz	short loc_78B5D2
jmp	short loc_78B5AC

loc_78B5E7:
mov	ecx, [esp+0B8h+var_4]
pop	edi
pop	esi
pop	ebp
xor	ecx, esp
xor	al, al
call	sub_7999A3
add	esp, 0ACh
retn
sub_78B0F0 endp

align 10h



sub_78B610 proc	near

var_235= byte ptr -235h
var_234= byte ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_12CA036
mov	eax, large fs:0
push	eax
sub	esp, 22Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+238h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+24Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+24Ch+arg_0]
mov	ebx, [esp+24Ch+arg_14]
lea	eax, [esp+24Ch+var_234]
mov	edi, ecx
mov	ecx, [esp+24Ch+arg_C]
push	eax
call	sub_4325E0
push	offset unk_167EF9C
mov	ecx, eax
mov	[esp+250h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+24Ch+var_234]
mov	ebp, eax
mov	[esp+24Ch+var_4], 0FFFFFFFFh
call	sub_77FF40
push	101h		; size_t
lea	ecx, [esp+250h+var_22D]
push	ecx		; int
lea	ecx, [esp+254h+var_12C]
call	sub_7883D0
mov	edx, [esp+24Ch+var_11C]
mov	byte ptr [edx],	0
mov	eax, [esp+24Ch+arg_1C]
mov	ecx, [esp+24Ch+arg_18]
push	ebx
add	edi, 8
push	edi
push	eax
push	ecx
lea	edx, [esp+25Ch+var_12C]
push	ebp
push	edx
mov	[esp+264h+var_4], 1
call	sub_795290
mov	ecx, [esp+264h+arg_8]
mov	edx, [esp+264h+arg_4]
push	0
lea	eax, [esp+268h+var_235]
push	eax
mov	eax, [esp+26Ch+var_11C]
push	ecx
mov	ecx, [esp+270h+var_14]
push	edx
push	eax
push	ecx
push	esi
call	sub_781280
mov	eax, [esp+280h+var_14]
lea	edx, [esp+280h+var_12C]
add	esp, 34h
mov	[esp+24Ch+var_4], 0FFFFFFFFh
cmp	eax, edx
jz	short loc_78B769
test	eax, eax
jz	short loc_78B769
mov	ecx, [esp+24Ch+var_12C]
lea	edx, [esp+24Ch+var_118]
sub	ecx, eax
cmp	eax, edx
jz	short loc_78B769
cmp	ecx, 80h
jbe	short loc_78B75F
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78B769

loc_78B75F:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78B769:
mov	eax, esi
mov	ecx, [esp+24Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+238h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 238h
retn	20h
sub_78B610 endp

align 10h



sub_78B7A0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	ecx
mov	ecx, [esp+4+arg_20]
mov	edx, [esp+4+arg_1C]
push	esi
mov	esi, [esp+8+arg_0]
push	0
lea	eax, [esp+0Ch+var_1]
push	eax
mov	eax, [esp+10h+arg_18]
push	ecx
mov	ecx, [esp+14h+arg_14]
push	edx
mov	edx, [esp+18h+arg_10]
push	eax
mov	eax, [esp+1Ch+arg_C]
push	ecx
mov	ecx, [esp+20h+arg_8]
push	edx
mov	edx, [esp+24h+arg_4]
push	eax
push	ecx
push	edx
push	esi
mov	[esp+34h+var_1], 1
call	sub_78A500
add	esp, 2Ch
mov	eax, esi
pop	esi
pop	ecx
retn	24h
sub_78B7A0 endp

align 10h



sub_78B7F0 proc	near

var_35=	byte ptr -35h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_28=	dword ptr -28h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	0FFFFFFFFh
push	offset loc_12CA078
mov	eax, large fs:0
push	eax
sub	esp, 2Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+38h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+4Ch+var_C]
mov	large fs:0, eax
mov	edi, [esp+4Ch+arg_0]
mov	eax, [esp+4Ch+arg_18]
mov	esi, [esp+4Ch+arg_1C]
mov	ebp, [esp+4Ch+arg_20]
lea	ecx, [esp+4Ch+var_28]
mov	edx, ecx
mov	[esp+4Ch+var_18], ecx
mov	[esp+4Ch+var_14], edx
mov	byte ptr [esp+4Ch+var_28], 0
push	0
lea	ecx, [esp+50h+var_35]
push	ecx
mov	ecx, [esp+54h+arg_10]
push	edx
mov	edx, [esp+58h+arg_C]
push	esi
push	eax
mov	eax, [esp+60h+arg_14]
push	eax
mov	eax, [esp+64h+arg_8]
push	ecx
mov	ecx, [esp+68h+arg_4]
push	edx
push	eax
push	ecx
lea	edx, [esp+74h+var_30]
push	edx
mov	[esp+78h+var_4], 0
mov	[esp+78h+var_35], 1
call	sub_78A500
mov	ecx, [eax]
mov	esi, [esi]
mov	[esp+78h+arg_4], ecx
mov	edx, [eax+4]
add	esp, 2Ch
mov	[esp+4Ch+arg_8], edx
test	esi, esi
jz	short loc_78B89D
cmp	esi, 2
jnz	short loc_78B8DB

loc_78B89D:
mov	bl, [esp+4Ch+var_35]
mov	eax, [esp+4Ch+var_14]
mov	ecx, [esp+4Ch+var_18]
mov	[esp+4Ch+var_34], eax
mov	[esp+4Ch+var_30], ecx
test	bl, bl
jnz	short loc_78B8BA
inc	eax
mov	[esp+4Ch+var_34], eax

loc_78B8BA:
push	0
push	ebp
lea	edx, [esp+54h+var_30]
push	edx
lea	eax, [esp+58h+var_34]
push	eax
call	sub_787240
add	esp, 10h
test	bl, bl
jnz	short loc_78B8DB
fld	qword ptr [ebp+0]
fchs
fstp	qword ptr [ebp+0]

loc_78B8DB:
mov	ecx, [esp+4Ch+arg_4]
mov	eax, [esp+4Ch+var_14]
mov	edx, [esp+4Ch+arg_8]
mov	[edi], ecx
lea	ecx, [esp+4Ch+var_28]
mov	[edi+4], edx
mov	[esp+4Ch+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	short loc_78B923
test	eax, eax
jz	short loc_78B923
mov	ecx, [esp+4Ch+var_28]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_78B919
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78B923

loc_78B919:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78B923:
mov	eax, edi
mov	ecx, [esp+4Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+38h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 38h
retn	24h
sub_78B7F0 endp

align 10h



; int __cdecl sub_78B950(int, int, int,	int, int, double)
sub_78B950 proc	near

var_274= qword ptr -274h
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA0C1
mov	eax, large fs:0
push	eax
sub	esp, 24Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+258h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+26Ch+var_C]
mov	large fs:0, eax
mov	ebp, [esp+26Ch+arg_0]
mov	esi, [esp+26Ch+arg_C]
push	101h		; size_t
lea	eax, [esp+270h+var_22D]
push	eax		; int
lea	ecx, [esp+274h+var_12C]
call	sub_7883D0
mov	ecx, [esp+26Ch+var_11C]
mov	byte ptr [ecx],	0
fld	[esp+26Ch+arg_14]
mov	eax, [esi+20h]
mov	ecx, [esi+8]
mov	edx, [esi+24h]
sub	esp, 8
fstp	[esp+274h+var_274]
push	eax		; int
push	ecx		; int
lea	eax, [esp+27Ch+var_12C]
push	eax		; int
mov	[esp+280h+var_4], 0
mov	[esp+280h+var_24C], edx
call	sub_7939D0
add	esp, 14h
lea	ecx, [esp+26Ch+var_258]
push	ecx
mov	ecx, esi
mov	ebx, eax
call	sub_4325E0
push	offset unk_167EFAC
mov	ecx, eax
mov	byte ptr [esp+270h+var_4], 1
call	sub_77FFD0
lea	ecx, [esp+26Ch+var_258]
mov	edi, eax
mov	byte ptr [esp+26Ch+var_4], 0
call	sub_77FF40
lea	edx, [esp+26Ch+var_248]
push	edx
mov	ecx, edi
call	sub_781970
mov	[esp+26Ch+var_254], eax
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
mov	byte ptr [esp+26Ch+var_4], 2
call	edx
mov	edx, [edi]
mov	byte ptr [esp+26Ch+var_250], al
mov	eax, [esp+26Ch+var_254]
mov	ecx, [esp+26Ch+var_250]
push	eax
mov	eax, [edx+4]
push	ebx
push	ecx
mov	ecx, edi
call	eax
mov	edx, [esp+278h+arg_10]
movzx	ecx, al
mov	eax, dword ptr [esp+278h+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+27Ch+arg_4]
push	edx
push	esi
push	eax
push	ecx
lea	edx, [esp+28Ch+var_12C]
push	edx
push	ebp
call	sub_7853C0
mov	eax, [esp+294h+var_234]
lea	ecx, [esp+294h+var_248]
add	esp, 28h
mov	byte ptr [esp+26Ch+var_4], 0
cmp	eax, ecx
jz	short loc_78BAC7
test	eax, eax
jz	short loc_78BAC7
mov	ecx, [esp+26Ch+var_248]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_78BABD
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78BAC7

loc_78BABD:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78BAC7:
mov	ecx, [esp+26Ch+var_14]
lea	edx, [esp+26Ch+var_12C]
mov	[esp+26Ch+var_4], 0FFFFFFFFh
cmp	ecx, edx
jz	short loc_78BB18
test	ecx, ecx
jz	short loc_78BB18
mov	eax, [esp+26Ch+var_12C]
lea	edx, [esp+26Ch+var_118]
sub	eax, ecx
cmp	ecx, edx
jz	short loc_78BB18
cmp	eax, 80h
jbe	short loc_78BB0E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78BB18

loc_78BB0E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78BB18:
mov	eax, ebp
mov	ecx, [esp+26Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+258h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 258h
retn
sub_78B950 endp

align 10h



; int __cdecl sub_78BB50(int, int, int,	int, int, double)
sub_78BB50 proc	near

var_274= qword ptr -274h
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA0C1
mov	eax, large fs:0
push	eax
sub	esp, 24Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+258h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+26Ch+var_C]
mov	large fs:0, eax
mov	ebp, [esp+26Ch+arg_0]
mov	esi, [esp+26Ch+arg_C]
push	101h		; size_t
lea	eax, [esp+270h+var_22D]
push	eax		; int
lea	ecx, [esp+274h+var_12C]
call	sub_7883D0
mov	ecx, [esp+26Ch+var_11C]
mov	byte ptr [ecx],	0
fld	[esp+26Ch+arg_14]
mov	eax, [esi+20h]
mov	ecx, [esi+8]
mov	edx, [esi+24h]
sub	esp, 8
fstp	[esp+274h+var_274]
push	eax		; int
push	ecx		; int
lea	eax, [esp+27Ch+var_12C]
push	eax		; int
mov	[esp+280h+var_4], 0
mov	[esp+280h+var_24C], edx
call	sub_7939A0
add	esp, 14h
lea	ecx, [esp+26Ch+var_258]
push	ecx
mov	ecx, esi
mov	ebx, eax
call	sub_4325E0
push	offset unk_167EFAC
mov	ecx, eax
mov	byte ptr [esp+270h+var_4], 1
call	sub_77FFD0
lea	ecx, [esp+26Ch+var_258]
mov	edi, eax
mov	byte ptr [esp+26Ch+var_4], 0
call	sub_77FF40
lea	edx, [esp+26Ch+var_248]
push	edx
mov	ecx, edi
call	sub_781970
mov	[esp+26Ch+var_254], eax
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
mov	byte ptr [esp+26Ch+var_4], 2
call	edx
mov	edx, [edi]
mov	byte ptr [esp+26Ch+var_250], al
mov	eax, [esp+26Ch+var_254]
mov	ecx, [esp+26Ch+var_250]
push	eax
mov	eax, [edx+4]
push	ebx
push	ecx
mov	ecx, edi
call	eax
mov	edx, [esp+278h+arg_10]
movzx	ecx, al
mov	eax, dword ptr [esp+278h+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+27Ch+arg_4]
push	edx
push	esi
push	eax
push	ecx
lea	edx, [esp+28Ch+var_12C]
push	edx
push	ebp
call	sub_7853C0
mov	eax, [esp+294h+var_234]
lea	ecx, [esp+294h+var_248]
add	esp, 28h
mov	byte ptr [esp+26Ch+var_4], 0
cmp	eax, ecx
jz	short loc_78BCC7
test	eax, eax
jz	short loc_78BCC7
mov	ecx, [esp+26Ch+var_248]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_78BCBD
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78BCC7

loc_78BCBD:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78BCC7:
mov	ecx, [esp+26Ch+var_14]
lea	edx, [esp+26Ch+var_12C]
mov	[esp+26Ch+var_4], 0FFFFFFFFh
cmp	ecx, edx
jz	short loc_78BD18
test	ecx, ecx
jz	short loc_78BD18
mov	eax, [esp+26Ch+var_12C]
lea	edx, [esp+26Ch+var_118]
sub	eax, ecx
cmp	ecx, edx
jz	short loc_78BD18
cmp	eax, 80h
jbe	short loc_78BD0E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78BD18

loc_78BD0E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78BD18:
mov	eax, ebp
mov	ecx, [esp+26Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+258h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 258h
retn
sub_78BB50 endp

align 10h



sub_78BD50 proc	near

var_240= dword ptr -240h
var_23C= byte ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA106
mov	eax, large fs:0
push	eax
sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+240h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+254h+var_C]
mov	large fs:0, eax
mov	edx, [esp+254h+arg_10]
mov	eax, [esp+254h+arg_0]
mov	ecx, [esp+254h+arg_C]
mov	esi, [esp+254h+arg_4]
mov	edi, [esp+254h+arg_8]
mov	[esp+254h+var_240], edx
mov	[esp+254h+var_234], eax
mov	eax, [esp+254h+arg_14]
lea	edx, [esp+254h+var_23C]
push	edx
mov	[esp+258h+var_238], eax
call	sub_4325E0
push	offset unk_167EF9C
lea	ecx, [esp+258h+var_23C]
mov	[esp+258h+var_4], 0
call	sub_77FFD0
push	offset unk_167EFAC
lea	ecx, [esp+258h+var_23C]
mov	ebp, eax
call	sub_77FFD0
mov	ebx, eax
push	101h		; size_t
lea	eax, [esp+258h+var_22D]
push	eax		; int
lea	ecx, [esp+25Ch+var_12C]
call	sub_7883D0
mov	ecx, [esp+254h+var_11C]
mov	byte ptr [ecx],	0
push	ebx
push	ebp
push	edi
lea	edx, [esp+260h+var_12C]
push	esi
push	edx
mov	byte ptr [esp+268h+var_4], 1
call	sub_7891B0
add	esp, 14h
test	al, al
jz	short loc_78BE57
mov	eax, [esp+254h+var_238]
push	eax
lea	ecx, [esp+258h+var_12C]
push	ecx
call	sub_795B70
mov	ebx, [esp+25Ch+var_240]
add	esp, 8
mov	dword ptr [ebx], 0
jmp	short loc_78BE63

loc_78BE57:
mov	edx, [esp+254h+var_240]
mov	dword ptr [edx], 4
mov	ebx, edx

loc_78BE63:
push	edi
mov	ecx, esi
call	sub_781390
test	al, al
jz	short loc_78BE72
or	dword ptr [ebx], 2

loc_78BE72:
mov	eax, [esi]
mov	edi, [esp+254h+var_234]
mov	[edi], eax
mov	eax, [esp+254h+var_14]
mov	ecx, [esi+4]
lea	edx, [esp+254h+var_12C]
mov	[edi+4], ecx
mov	byte ptr [esp+254h+var_4], 0
cmp	eax, edx
jz	short loc_78BECF
test	eax, eax
jz	short loc_78BECF
mov	ecx, [esp+254h+var_12C]
lea	edx, [esp+254h+var_118]
sub	ecx, eax
cmp	eax, edx
jz	short loc_78BECF
cmp	ecx, 80h
jbe	short loc_78BEC5
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78BECF

loc_78BEC5:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78BECF:
lea	ecx, [esp+254h+var_23C]
call	sub_77FF40
mov	eax, edi
mov	ecx, [esp+254h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+240h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 240h
retn
sub_78BD50 endp

align 10h



sub_78BF10 proc	near

var_240= dword ptr -240h
var_23C= byte ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA106
mov	eax, large fs:0
push	eax
sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+240h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+254h+var_C]
mov	large fs:0, eax
mov	edx, [esp+254h+arg_10]
mov	eax, [esp+254h+arg_0]
mov	ecx, [esp+254h+arg_C]
mov	esi, [esp+254h+arg_4]
mov	edi, [esp+254h+arg_8]
mov	[esp+254h+var_240], edx
mov	[esp+254h+var_234], eax
mov	eax, [esp+254h+arg_14]
lea	edx, [esp+254h+var_23C]
push	edx
mov	[esp+258h+var_238], eax
call	sub_4325E0
push	offset unk_167EF9C
lea	ecx, [esp+258h+var_23C]
mov	[esp+258h+var_4], 0
call	sub_77FFD0
push	offset unk_167EFAC
lea	ecx, [esp+258h+var_23C]
mov	ebp, eax
call	sub_77FFD0
mov	ebx, eax
push	101h		; size_t
lea	eax, [esp+258h+var_22D]
push	eax		; int
lea	ecx, [esp+25Ch+var_12C]
call	sub_7883D0
mov	ecx, [esp+254h+var_11C]
mov	byte ptr [ecx],	0
push	ebx
push	ebp
push	edi
lea	edx, [esp+260h+var_12C]
push	esi
push	edx
mov	byte ptr [esp+268h+var_4], 1
call	sub_7891B0
add	esp, 14h
test	al, al
jz	short loc_78C017
mov	eax, [esp+254h+var_238]
push	eax
lea	ecx, [esp+258h+var_12C]
push	ecx
call	sub_795B50
mov	ebx, [esp+25Ch+var_240]
add	esp, 8
mov	dword ptr [ebx], 0
jmp	short loc_78C023

loc_78C017:
mov	edx, [esp+254h+var_240]
mov	dword ptr [edx], 4
mov	ebx, edx

loc_78C023:
push	edi
mov	ecx, esi
call	sub_781390
test	al, al
jz	short loc_78C032
or	dword ptr [ebx], 2

loc_78C032:
mov	eax, [esi]
mov	edi, [esp+254h+var_234]
mov	[edi], eax
mov	eax, [esp+254h+var_14]
mov	ecx, [esi+4]
lea	edx, [esp+254h+var_12C]
mov	[edi+4], ecx
mov	byte ptr [esp+254h+var_4], 0
cmp	eax, edx
jz	short loc_78C08F
test	eax, eax
jz	short loc_78C08F
mov	ecx, [esp+254h+var_12C]
lea	edx, [esp+254h+var_118]
sub	ecx, eax
cmp	eax, edx
jz	short loc_78C08F
cmp	ecx, 80h
jbe	short loc_78C085
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C08F

loc_78C085:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78C08F:
lea	ecx, [esp+254h+var_23C]
call	sub_77FF40
mov	eax, edi
mov	ecx, [esp+254h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+240h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 240h
retn
sub_78BF10 endp

align 10h



sub_78C0D0 proc	near

var_240= dword ptr -240h
var_23C= byte ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA106
mov	eax, large fs:0
push	eax
sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+240h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+254h+var_C]
mov	large fs:0, eax
mov	edx, [esp+254h+arg_10]
mov	eax, [esp+254h+arg_0]
mov	ecx, [esp+254h+arg_C]
mov	esi, [esp+254h+arg_4]
mov	edi, [esp+254h+arg_8]
mov	[esp+254h+var_240], edx
mov	[esp+254h+var_234], eax
mov	eax, [esp+254h+arg_14]
lea	edx, [esp+254h+var_23C]
push	edx
mov	[esp+258h+var_238], eax
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+258h+var_23C]
mov	[esp+258h+var_4], 0
call	sub_77FFD0
push	offset unk_167EFC8
lea	ecx, [esp+258h+var_23C]
mov	ebp, eax
call	sub_77FFD0
mov	ebx, eax
push	101h		; size_t
lea	eax, [esp+258h+var_22D]
push	eax		; int
lea	ecx, [esp+25Ch+var_12C]
call	sub_7883D0
mov	ecx, [esp+254h+var_11C]
mov	byte ptr [ecx],	0
push	ebx
push	ebp
push	edi
lea	edx, [esp+260h+var_12C]
push	esi
push	edx
mov	byte ptr [esp+268h+var_4], 1
call	sub_789450
add	esp, 14h
test	al, al
jz	short loc_78C1D7
mov	eax, [esp+254h+var_238]
push	eax
lea	ecx, [esp+258h+var_12C]
push	ecx
call	sub_795B70
mov	ebx, [esp+25Ch+var_240]
add	esp, 8
mov	dword ptr [ebx], 0
jmp	short loc_78C1E3

loc_78C1D7:
mov	edx, [esp+254h+var_240]
mov	dword ptr [edx], 4
mov	ebx, edx

loc_78C1E3:
push	edi
mov	ecx, esi
call	sub_781460
test	al, al
jz	short loc_78C1F2
or	dword ptr [ebx], 2

loc_78C1F2:
mov	eax, [esi]
mov	edi, [esp+254h+var_234]
mov	[edi], eax
mov	eax, [esp+254h+var_14]
mov	ecx, [esi+4]
lea	edx, [esp+254h+var_12C]
mov	[edi+4], ecx
mov	byte ptr [esp+254h+var_4], 0
cmp	eax, edx
jz	short loc_78C24F
test	eax, eax
jz	short loc_78C24F
mov	ecx, [esp+254h+var_12C]
lea	edx, [esp+254h+var_118]
sub	ecx, eax
cmp	eax, edx
jz	short loc_78C24F
cmp	ecx, 80h
jbe	short loc_78C245
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C24F

loc_78C245:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78C24F:
lea	ecx, [esp+254h+var_23C]
call	sub_77FF40
mov	eax, edi
mov	ecx, [esp+254h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+240h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 240h
retn
sub_78C0D0 endp

align 10h



sub_78C290 proc	near

var_240= dword ptr -240h
var_23C= byte ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA106
mov	eax, large fs:0
push	eax
sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+240h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+254h+var_C]
mov	large fs:0, eax
mov	edx, [esp+254h+arg_10]
mov	eax, [esp+254h+arg_0]
mov	ecx, [esp+254h+arg_C]
mov	esi, [esp+254h+arg_4]
mov	edi, [esp+254h+arg_8]
mov	[esp+254h+var_240], edx
mov	[esp+254h+var_234], eax
mov	eax, [esp+254h+arg_14]
lea	edx, [esp+254h+var_23C]
push	edx
mov	[esp+258h+var_238], eax
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+258h+var_23C]
mov	[esp+258h+var_4], 0
call	sub_77FFD0
push	offset unk_167EFC8
lea	ecx, [esp+258h+var_23C]
mov	ebp, eax
call	sub_77FFD0
mov	ebx, eax
push	101h		; size_t
lea	eax, [esp+258h+var_22D]
push	eax		; int
lea	ecx, [esp+25Ch+var_12C]
call	sub_7883D0
mov	ecx, [esp+254h+var_11C]
mov	byte ptr [ecx],	0
push	ebx
push	ebp
push	edi
lea	edx, [esp+260h+var_12C]
push	esi
push	edx
mov	byte ptr [esp+268h+var_4], 1
call	sub_789450
add	esp, 14h
test	al, al
jz	short loc_78C397
mov	eax, [esp+254h+var_238]
push	eax
lea	ecx, [esp+258h+var_12C]
push	ecx
call	sub_795B50
mov	ebx, [esp+25Ch+var_240]
add	esp, 8
mov	dword ptr [ebx], 0
jmp	short loc_78C3A3

loc_78C397:
mov	edx, [esp+254h+var_240]
mov	dword ptr [edx], 4
mov	ebx, edx

loc_78C3A3:
push	edi
mov	ecx, esi
call	sub_781460
test	al, al
jz	short loc_78C3B2
or	dword ptr [ebx], 2

loc_78C3B2:
mov	eax, [esi]
mov	edi, [esp+254h+var_234]
mov	[edi], eax
mov	eax, [esp+254h+var_14]
mov	ecx, [esi+4]
lea	edx, [esp+254h+var_12C]
mov	[edi+4], ecx
mov	byte ptr [esp+254h+var_4], 0
cmp	eax, edx
jz	short loc_78C40F
test	eax, eax
jz	short loc_78C40F
mov	ecx, [esp+254h+var_12C]
lea	edx, [esp+254h+var_118]
sub	ecx, eax
cmp	eax, edx
jz	short loc_78C40F
cmp	ecx, 80h
jbe	short loc_78C405
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C40F

loc_78C405:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78C40F:
lea	ecx, [esp+254h+var_23C]
call	sub_77FF40
mov	eax, edi
mov	ecx, [esp+254h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+240h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 240h
retn
sub_78C290 endp

align 10h



sub_78C450 proc	near

var_3A4= dword ptr -3A4h
var_3A0= dword ptr -3A0h
var_39C= qword ptr -39Ch
var_394= dword ptr -394h
var_38C= byte ptr -38Ch
var_388= dword ptr -388h
var_384= dword ptr -384h
var_380= dword ptr -380h
var_37C= dword ptr -37Ch
var_378= dword ptr -378h
var_370= dword ptr -370h
var_36C= dword ptr -36Ch
var_364= dword ptr -364h
var_360= dword ptr -360h
var_35C= dword ptr -35Ch
var_358= dword ptr -358h
var_350= byte ptr -350h
var_348= dword ptr -348h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2EC= dword ptr -2ECh
var_2E8= dword ptr -2E8h
var_2D4= dword ptr -2D4h
var_2D0= dword ptr -2D0h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_28C= dword ptr -28Ch
var_288= byte ptr -288h
var_280= byte ptr -280h
var_275= dword ptr -275h
var_174= dword ptr -174h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h

push	0FFFFFFFFh
push	offset loc_12CA28C
mov	eax, large fs:0
push	eax
sub	esp, 398h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3A4h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3B8h+var_C]
mov	large fs:0, eax
mov	eax, [esp+3B8h+arg_0]
mov	ecx, [esp+3B8h+arg_10]
mov	edx, [esp+3B8h+arg_18]
mov	[esp+3B8h+var_370], eax
lea	eax, [esp+3B8h+var_38C]
xor	esi, esi
push	eax
mov	[esp+3BCh+var_380], ecx
mov	[esp+3BCh+var_378], edx
mov	[esp+3BCh+var_394], esi
call	sub_4325E0
push	offset unk_167EF9C
lea	ecx, [esp+3BCh+var_38C]
mov	[esp+3BCh+var_4], esi
call	sub_77FFD0
push	offset unk_167EFA8
lea	ecx, [esp+3BCh+var_38C]
mov	esi, eax
call	sub_77FFD0
mov	ebp, eax
push	offset unk_167EFA4
lea	ecx, [esp+3BCh+var_38C]
mov	[esp+3BCh+var_3A0], ebp
call	sub_77FFD0
mov	edx, [esi]
mov	edi, eax
mov	eax, [edx+18h]
push	2Dh
mov	ecx, esi
mov	dword ptr [esp+3BCh+var_39C], edi
call	eax
mov	edx, [esi]
mov	byte ptr [esp+3B8h+var_36C], al
mov	eax, [edx+18h]
push	2Bh
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	byte ptr [esp+3B8h+var_388], al
mov	eax, [edx+18h]
push	20h
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	byte ptr [esp+3B8h+var_360], al
mov	eax, [edx+18h]
push	30h
mov	ecx, esi
call	eax
cmp	[esp+3B8h+arg_C], 0
mov	byte ptr [esp+3B8h+var_364], al
mov	ebx, 2
jz	short loc_78C57B
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	byte ptr [esp+3B8h+var_358], al
mov	eax, [edx+8]
mov	ecx, edi
call	eax
lea	ecx, [esp+3B8h+var_348]
push	ecx
mov	ecx, edi
mov	byte ptr [esp+3BCh+var_37C], al
call	sub_781970
mov	byte ptr [esp+3B8h+var_4], 1
mov	ebx, 1
jmp	short loc_78C5AD

loc_78C57B:
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	byte ptr [esp+3B8h+var_358], al
mov	eax, [edx+8]
mov	ecx, ebp
call	eax
lea	edx, [esp+3B8h+var_2B8]
push	edx
mov	ecx, ebp
mov	byte ptr [esp+3BCh+var_37C], al
call	sub_781970
mov	[esp+3B8h+var_4], ebx

loc_78C5AD:
push	eax
lea	ecx, [esp+3BCh+var_144]
mov	[esp+3BCh+var_394], ebx
call	sub_403850
mov	[esp+3B8h+var_4], 4
test	bl, 2
jz	short loc_78C610
mov	ecx, [esp+3B8h+var_2A4]
and	ebx, 0FFFFFFFDh
lea	eax, [esp+3B8h+var_2B8]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, eax
jz	short loc_78C610
test	ecx, ecx
jz	short loc_78C610
mov	eax, [esp+3B8h+var_2B8]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C606
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C610

loc_78C606:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C610:
mov	byte ptr [esp+3B8h+var_4], 5
test	bl, 1
jz	short loc_78C659
mov	ecx, [esp+3B8h+var_334]
and	ebx, 0FFFFFFFEh
lea	edx, [esp+3B8h+var_348]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78C659
test	ecx, ecx
jz	short loc_78C659
mov	eax, [esp+3B8h+var_348]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C64F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C659

loc_78C64F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C659:
cmp	[esp+3B8h+arg_C], 0
jz	short loc_78C68C
mov	eax, [edi]
mov	edx, [eax+1Ch]
mov	ecx, edi
call	edx
mov	[esp+3B8h+var_384], eax
lea	eax, [esp+3B8h+var_318]
push	eax
mov	ecx, edi
call	sub_781950
mov	byte ptr [esp+3B8h+var_4], 6
or	ebx, 4
jmp	short loc_78C6B7

loc_78C68C:
mov	eax, [ebp+0]
mov	edx, [eax+1Ch]
mov	ecx, ebp
call	edx
lea	ecx, [esp+3B8h+var_330]
push	ecx
mov	ecx, ebp
mov	[esp+3BCh+var_384], eax
call	sub_781950
mov	[esp+3B8h+var_4], 7
or	ebx, 8

loc_78C6B7:
push	eax
lea	ecx, [esp+3BCh+var_15C]
mov	[esp+3BCh+var_394], ebx
call	sub_403850
mov	[esp+3B8h+var_4], 9
test	bl, 8
jz	short loc_78C71A
mov	ecx, [esp+3B8h+var_31C]
and	ebx, 0FFFFFFF7h
lea	edx, [esp+3B8h+var_330]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78C71A
test	ecx, ecx
jz	short loc_78C71A
mov	eax, [esp+3B8h+var_330]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C710
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C71A

loc_78C710:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C71A:
mov	byte ptr [esp+3B8h+var_4], 0Ah
test	bl, 4
jz	short loc_78C769
mov	ecx, [esp+3B8h+var_304]
and	ebx, 0FFFFFFFBh
lea	eax, [esp+3B8h+var_318]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, eax
jz	short loc_78C769
test	ecx, ecx
jz	short loc_78C769
mov	eax, [esp+3B8h+var_318]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C75F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C769

loc_78C75F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C769:
mov	ecx, [esp+3B8h+var_378]
mov	eax, [ecx+14h]
mov	ecx, [ecx+10h]
cmp	eax, ecx
jnz	loc_78C7FD
mov	ecx, [esp+3B8h+arg_4]
mov	esi, [esp+3B8h+var_370]
mov	edx, [esp+3B8h+arg_8]
mov	[esi], ecx
mov	ecx, [esp+3B8h+var_148]
lea	eax, [esp+3B8h+var_15C]
mov	[esi+4], edx
mov	byte ptr [esp+3B8h+var_4], 5
cmp	ecx, eax
jz	short loc_78C7E8
test	ecx, ecx
jz	short loc_78C7E8
mov	eax, [esp+3B8h+var_15C]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C7DE
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	ecx, [esp+3BCh+var_130]
lea	edx, [esp+3BCh+var_144]
add	esp, 4
cmp	ecx, edx
jmp	loc_78CFFD

loc_78C7DE:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C7E8:
mov	ecx, [esp+3B8h+var_130]
lea	edx, [esp+3B8h+var_144]
cmp	ecx, edx
jmp	loc_78CFFD

loc_78C7FD:
mov	edx, eax
mov	[esp+3B8h+var_378], eax
mov	al, byte ptr [esp+3B8h+var_36C]
cmp	[edx], al
mov	ebp, ecx
setz	al
mov	byte ptr [esp+3B8h+var_3A4+3], al
test	al, al
jz	short loc_78C81B
inc	edx
mov	[esp+3B8h+var_378], edx

loc_78C81B:
cmp	[esp+3B8h+arg_C], 0
jz	short loc_78C864
test	al, al
jz	short loc_78C845
lea	ecx, [esp+3B8h+var_2E8]
push	ecx
mov	ecx, edi
call	sub_7819B0
mov	byte ptr [esp+3B8h+var_4], 0Bh
or	ebx, 10h
jmp	short loc_78C8AB

loc_78C845:
lea	edx, [esp+3B8h+var_2A0]
push	edx
mov	ecx, edi
call	sub_781990
mov	[esp+3B8h+var_4], 0Ch
or	ebx, 20h
jmp	short loc_78C8AB

loc_78C864:
test	al, al
jz	short loc_78C889
mov	ecx, [esp+3B8h+var_3A0]
lea	eax, [esp+3B8h+var_2D0]
push	eax
call	sub_7819B0
mov	[esp+3B8h+var_4], 0Dh
or	ebx, 40h
jmp	short loc_78C8AB

loc_78C889:
lea	ecx, [esp+3B8h+var_300]
push	ecx
mov	ecx, [esp+3BCh+var_3A0]
call	sub_781990
mov	[esp+3B8h+var_4], 0Eh
or	ebx, 80h

loc_78C8AB:
push	eax
lea	ecx, [esp+3BCh+var_174]
mov	[esp+3BCh+var_394], ebx
call	sub_403850
mov	[esp+3B8h+var_4], 10h
test	bl, bl
jns	short loc_78C910
mov	ecx, [esp+3B8h+var_2EC]
and	ebx, 0FFFFFF7Fh
lea	edx, [esp+3B8h+var_300]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78C910
test	ecx, ecx
jz	short loc_78C910
mov	eax, [esp+3B8h+var_300]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C906
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C910

loc_78C906:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C910:
mov	byte ptr [esp+3B8h+var_4], 11h
test	bl, 40h
jz	short loc_78C95F
mov	ecx, [esp+3B8h+var_2BC]
and	ebx, 0FFFFFFBFh
lea	eax, [esp+3B8h+var_2D0]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, eax
jz	short loc_78C95F
test	ecx, ecx
jz	short loc_78C95F
mov	eax, [esp+3B8h+var_2D0]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C955
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C95F

loc_78C955:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C95F:
mov	byte ptr [esp+3B8h+var_4], 12h
test	bl, 20h
jz	short loc_78C9AE
mov	ecx, [esp+3B8h+var_28C]
and	ebx, 0FFFFFFDFh
lea	edx, [esp+3B8h+var_2A0]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78C9AE
test	ecx, ecx
jz	short loc_78C9AE
mov	eax, [esp+3B8h+var_2A0]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C9A4
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C9AE

loc_78C9A4:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C9AE:
mov	byte ptr [esp+3B8h+var_4], 13h
test	bl, 10h
jz	short loc_78C9F6
mov	ecx, [esp+3B8h+var_2D4]
lea	eax, [esp+3B8h+var_2E8]
cmp	ecx, eax
jz	short loc_78C9F6
test	ecx, ecx
jz	short loc_78C9F6
mov	eax, [esp+3B8h+var_2E8]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78C9EC
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78C9F6

loc_78C9EC:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78C9F6:
cmp	[esp+3B8h+arg_1C], 0
mov	edi, [esp+3B8h+var_378]
jz	loc_78CA82
mov	eax, edi
cmp	edi, ebp
jz	short loc_78CA28
mov	esi, [esi+8]

loc_78CA11:
movzx	ecx, byte ptr [eax]
mov	edx, [esi+ecx*4]
shr	edx, 6
test	dl, 1
jz	short loc_78CA24
inc	eax
cmp	eax, ebp
jnz	short loc_78CA11

loc_78CA24:
cmp	eax, edi
jnz	short loc_78CA80

loc_78CA28:
mov	ecx, [esp+3B8h+arg_8]
mov	esi, [esp+3B8h+var_370]
mov	eax, [esp+3B8h+arg_4]
mov	[esi+4], ecx
lea	ecx, [esp+3B8h+var_174]
mov	[esi], eax
mov	byte ptr [esp+3B8h+var_4], 0Ah
call	sub_407910
lea	ecx, [esp+3B8h+var_15C]
mov	byte ptr [esp+3B8h+var_4], 5
call	sub_407910
lea	ecx, [esp+3B8h+var_144]
mov	byte ptr [esp+3B8h+var_4], 0
call	sub_407910
jmp	loc_78D030

loc_78CA80:
mov	ebp, eax

loc_78CA82:		; size_t
push	101h
lea	edx, [esp+3BCh+var_275]
push	edx		; int
lea	ecx, [esp+3C0h+var_12C]
call	sub_7883D0
mov	eax, [esp+3B8h+var_11C]
mov	byte ptr [eax],	0
mov	ecx, [esp+3B8h+var_130]
mov	byte ptr [esp+3B8h+var_4], 14h
cmp	ecx, [esp+3B8h+var_134]
jz	short loc_78CB1E
lea	edx, [esp+3B8h+var_3A4+2]
push	edx
push	ebp
push	edi
lea	ecx, [esp+3C4h+var_12C]
call	sub_788040
mov	eax, [esp+3B8h+var_36C]
mov	ecx, [esp+3B8h+var_388]
mov	edx, [esp+3B8h+var_37C]
push	0
push	eax
push	ecx
mov	ecx, [esp+3C4h+var_11C]
sub	ecx, [esp+3C4h+var_14]
push	edx
sub	ecx, [esp+3C8h+var_384]
lea	eax, [esp+3C8h+var_144]
push	eax
push	ecx
lea	edx, [esp+3D0h+var_12C]
push	edx
call	sub_793F60
mov	eax, [esp+3D4h+var_14]
mov	ebp, [esp+3D4h+var_11C]
add	esp, 1Ch
mov	[esp+3B8h+var_378], eax

loc_78CB1E:
mov	esi, [esp+3B8h+var_164]
sub	esi, [esp+3B8h+var_160]
mov	ecx, [esp+3B8h+var_380]
mov	ebx, [ecx+28h]
mov	edi, [ecx+2Ch]
mov	eax, ebp
sub	eax, [esp+3B8h+var_378]
add	esi, eax
cmp	[esp+3B8h+var_384], 0
mov	[esp+3B8h+var_37C], eax
jz	short loc_78CB4A
inc	esi

loc_78CB4A:
mov	eax, [ecx+8]
shr	eax, 9
and	al, 1
mov	byte ptr [esp+3B8h+var_3A4+2], al
jz	short loc_78CB68
mov	ecx, [esp+3B8h+var_14C]
sub	ecx, [esp+3B8h+var_148]
add	esi, ecx

loc_78CB68:
cmp	[esp+3B8h+arg_C], 0
jz	short loc_78CBA1
cmp	byte ptr [esp+3B8h+var_3A4+3], 0
mov	ecx, dword ptr [esp+3B8h+var_39C]
jz	short loc_78CB8F
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+3B8h+var_388]
push	eax
call	edx
lea	eax, [esp+3B8h+var_388]
jmp	short loc_78CBCE

loc_78CB8F:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+3B8h+var_39C]
push	edx
call	eax
lea	eax, [esp+3B8h+var_39C]
jmp	short loc_78CBCE

loc_78CBA1:
cmp	byte ptr [esp+3B8h+var_3A4+3], 0
mov	ecx, [esp+3B8h+var_3A0]
jz	short loc_78CBBE
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+3B8h+var_36C]
push	eax
call	edx
lea	eax, [esp+3B8h+var_36C]
jmp	short loc_78CBCE

loc_78CBBE:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+3B8h+var_3A0]
push	edx
call	eax
lea	eax, [esp+3B8h+var_3A0]

loc_78CBCE:
mov	eax, [eax]
mov	ecx, eax
shr	ecx, 8
mov	[esp+3B8h+var_388], eax
cmp	cl, 1
jz	short loc_78CBE5
shr	eax, 10h
cmp	al, 1
jnz	short loc_78CBE6

loc_78CBE5:
inc	esi

loc_78CBE6:
xor	eax, eax
xor	edx, edx
cmp	eax, edi
jg	short loc_78CC02
jl	short loc_78CBF4
cmp	esi, ebx
jnb	short loc_78CC02

loc_78CBF4:
sub	ebx, esi
sbb	edi, eax
mov	dword ptr [esp+3B8h+var_39C], ebx
mov	dword ptr [esp+3B8h+var_39C+4],	edi
jmp	short loc_78CC0A

loc_78CC02:
mov	dword ptr [esp+3B8h+var_39C], edx
mov	dword ptr [esp+3B8h+var_39C+4],	edx

loc_78CC0A:
mov	eax, [esp+3B8h+var_380]
mov	eax, [eax+8]
mov	ecx, dword ptr [esp+3B8h+var_39C]
and	eax, 7
or	ecx, dword ptr [esp+3B8h+var_39C+4]
mov	[esp+3B8h+var_380], eax
jz	short loc_78CC6C
test	al, 5
jnz	short loc_78CC6C
mov	eax, dword ptr [esp+3B8h+var_39C+4]
mov	ecx, dword ptr [esp+3B8h+var_39C]
lea	edx, [esp+3B8h+arg_14]
push	edx
mov	edx, [esp+3BCh+arg_8]
push	eax
mov	eax, [esp+3C0h+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [esp+3CCh+var_36C]
push	ecx
call	sub_780CD0
mov	ecx, [eax]
mov	[esp+3D0h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+3B8h+arg_8], eax
xor	edx, edx
jmp	short loc_78CC7A

loc_78CC6C:
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]

loc_78CC7A:
mov	edi, [esp+3B8h+var_358]
mov	ebx, [esp+3B8h+var_378]
mov	[esp+3B8h+var_3A0], edx
jmp	short loc_78CC90
align 10h

loc_78CC90:
mov	edx, [esp+3B8h+var_3A0]
movsx	edx, byte ptr [esp+edx+3B8h+var_388] ; switch 5	cases
cmp	edx, 4
ja	loc_78CE68	; default
jmp	ds:off_78D064[edx*4] ; switch jump

loc_78CCA9:		; jumptable 0078CCA2 case 1
mov	eax, [esp+3B8h+var_360]
push	eax
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]

loc_78CCC8:		; jumptable 0078CCA2 case 0
mov	edx, dword ptr [esp+3B8h+var_39C]
or	edx, dword ptr [esp+3B8h+var_39C+4]
jz	loc_78CE68	; default
cmp	[esp+3B8h+var_380], 4
jnz	loc_78CE68	; default
lea	edx, [esp+3B8h+arg_14]
push	edx
mov	edx, dword ptr [esp+3BCh+var_39C+4]
push	edx
mov	edx, dword ptr [esp+3C0h+var_39C]
push	edx
push	eax
push	ecx
lea	eax, [esp+3CCh+var_358]
push	eax
call	sub_780CD0
add	esp, 18h
jmp	loc_78CE55

loc_78CD07:		; jumptable 0078CCA2 case 2
cmp	byte ptr [esp+3B8h+var_3A4+2], 0
jz	loc_78CE68	; default
mov	edx, [esp+3B8h+var_148]
push	eax
push	ecx
mov	ecx, [esp+3C0h+var_14C]
push	ecx
push	edx
lea	eax, [esp+3C8h+var_36C]
push	eax
call	sub_7833E0
jmp	loc_78CE52

loc_78CD33:		; jumptable 0078CCA2 case 3
mov	edx, [esp+3B8h+var_164]
cmp	[esp+3B8h+var_160], edx
jz	loc_78CE68	; default
mov	eax, [esp+3B8h+var_160]
movzx	ecx, byte ptr [eax]
push	ecx
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]
jmp	loc_78CE68	; default

loc_78CD71:		; jumptable 0078CCA2 case 4
mov	esi, [esp+3B8h+var_384]
test	esi, esi
jnz	short loc_78CD86
push	eax
push	ecx
push	ebp
push	ebx
lea	edx, [esp+3C8h+var_378]
jmp	loc_78CE4C

loc_78CD86:
cmp	[esp+3B8h+var_37C], esi
jg	short loc_78CDFC
mov	eax, [esp+3B8h+var_364]
push	eax
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
push	edi
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
sub	esi, [esp+3B8h+var_37C]
mov	edx, [esp+3B8h+arg_8]
mov	eax, [esp+3B8h+arg_4]
lea	ecx, [esp+3B8h+var_364]
push	ecx
push	esi
push	edx
push	eax
lea	ecx, [esp+3C8h+var_394]
push	ecx
call	sub_780FF0
mov	edx, [eax]
mov	[esp+3CCh+arg_4], edx
mov	ecx, [eax+4]
mov	[esp+3CCh+arg_8], ecx
mov	edx, [eax+4]
mov	eax, [eax]
push	edx
push	eax
push	ebp
lea	ecx, [esp+3D8h+var_288]
push	ebx
push	ecx
call	sub_7833E0
add	esp, 28h
jmp	short loc_78CE55

loc_78CDFC:
push	eax
mov	esi, ebp
sub	esi, [esp+3BCh+var_384]
push	ecx
push	esi
lea	edx, [esp+3C4h+var_280]
push	ebx
push	edx
call	sub_7833E0
mov	ecx, [eax]
mov	[esp+3CCh+arg_4], ecx
mov	edx, [eax+4]
add	esp, 14h
push	edi
lea	ecx, [esp+3BCh+arg_4]
mov	[esp+3BCh+arg_8], edx
call	sub_780860
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]
push	eax
push	ecx
push	ebp
push	esi
lea	edx, [esp+3C8h+var_350]

loc_78CE4C:
push	edx
call	sub_7833E0

loc_78CE52:
add	esp, 14h

loc_78CE55:
mov	ecx, [eax]
mov	[esp+3B8h+arg_4], ecx
mov	eax, [eax+4]
mov	[esp+3B8h+arg_8], eax

loc_78CE68:		; default
mov	edx, [esp+3B8h+var_3A0]
inc	edx
cmp	edx, 4
mov	[esp+3B8h+var_3A0], edx
jl	loc_78CC90
mov	esi, [esp+3B8h+var_164]
mov	edx, [esp+3B8h+var_160]
mov	edi, esi
sub	edi, edx
cmp	edi, 1
jbe	short loc_78CEC7
push	0
lea	edi, [esp+3BCh+var_3A4+2]
push	edi
push	eax
push	ecx
push	esi
inc	edx
push	edx
lea	eax, [esp+3D0h+var_360]
push	eax
call	sub_781280
mov	ecx, [esp+3D4h+var_360]
mov	eax, [esp+3D4h+var_35C]
mov	edx, [esp+3D4h+var_160]
add	esp, 1Ch
mov	[esp+3B8h+arg_4], ecx
mov	[esp+3B8h+arg_8], eax

loc_78CEC7:
mov	esi, dword ptr [esp+3B8h+var_39C]
mov	edi, dword ptr [esp+3B8h+var_39C+4]
mov	ebx, esi
or	ebx, edi
jz	short loc_78CF0F
test	byte ptr [esp+3B8h+var_380], 6
jnz	short loc_78CF0F
lea	edx, [esp+3B8h+arg_14]
push	edx
push	edi
push	esi
push	eax
push	ecx
lea	eax, [esp+3CCh+var_350]
push	eax
call	sub_780CD0
mov	ecx, [eax]
mov	edx, [esp+3D0h+var_160]
mov	[esp+3D0h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+3B8h+arg_8], eax

loc_78CF0F:
mov	esi, [esp+3B8h+var_370]
mov	[esi], ecx
mov	[esi+4], eax
mov	eax, [esp+3B8h+var_14]
lea	ecx, [esp+3B8h+var_12C]
mov	byte ptr [esp+3B8h+var_4], 13h
cmp	eax, ecx
jz	short loc_78CF6E
test	eax, eax
jz	short loc_78CF6E
mov	ecx, [esp+3B8h+var_12C]
lea	edi, [esp+3B8h+var_118]
sub	ecx, eax
cmp	eax, edi
jz	short loc_78CF6E
cmp	ecx, 80h
jbe	short loc_78CF5D
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78CF67

loc_78CF5D:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78CF67:
mov	edx, [esp+3B8h+var_160]

loc_78CF6E:
lea	eax, [esp+3B8h+var_174]
mov	byte ptr [esp+3B8h+var_4], 0Ah
cmp	edx, eax
jz	short loc_78CFAA
test	edx, edx
jz	short loc_78CFAA
mov	eax, [esp+3B8h+var_174]
sub	eax, edx
cmp	eax, 80h
jbe	short loc_78CFA0
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78CFAA

loc_78CFA0:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

loc_78CFAA:
mov	ecx, [esp+3B8h+var_148]
lea	edx, [esp+3B8h+var_15C]
mov	byte ptr [esp+3B8h+var_4], 5
cmp	ecx, edx
jz	short loc_78CFED
test	ecx, ecx
jz	short loc_78CFED
mov	eax, [esp+3B8h+var_15C]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78CFE3
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78CFED

loc_78CFE3:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78CFED:
mov	ecx, [esp+3B8h+var_130]
lea	eax, [esp+3B8h+var_144]
cmp	ecx, eax

loc_78CFFD:
mov	byte ptr [esp+3B8h+var_4], 0
jz	short loc_78D030
test	ecx, ecx
jz	short loc_78D030
mov	eax, [esp+3B8h+var_144]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D026
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D030

loc_78D026:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D030:
lea	ecx, [esp+3B8h+var_38C]
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+3B8h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3A4h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 3A4h
retn
sub_78C450 endp

align 4
off_78D064 dd offset loc_78CCC8	; jump table for switch	statement
dd offset loc_78CCA9
dd offset loc_78CD07
dd offset loc_78CD33
dd offset loc_78CD71
align 10h



sub_78D080 proc	near

var_3A4= dword ptr -3A4h
var_3A0= dword ptr -3A0h
var_39C= qword ptr -39Ch
var_394= dword ptr -394h
var_38C= byte ptr -38Ch
var_388= dword ptr -388h
var_384= dword ptr -384h
var_380= dword ptr -380h
var_37C= dword ptr -37Ch
var_378= dword ptr -378h
var_370= dword ptr -370h
var_36C= dword ptr -36Ch
var_364= dword ptr -364h
var_360= dword ptr -360h
var_35C= dword ptr -35Ch
var_358= dword ptr -358h
var_350= byte ptr -350h
var_348= dword ptr -348h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2EC= dword ptr -2ECh
var_2E8= dword ptr -2E8h
var_2D4= dword ptr -2D4h
var_2D0= dword ptr -2D0h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_28C= dword ptr -28Ch
var_288= byte ptr -288h
var_280= byte ptr -280h
var_275= dword ptr -275h
var_174= dword ptr -174h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h

push	0FFFFFFFFh
push	offset loc_12CA28C
mov	eax, large fs:0
push	eax
sub	esp, 398h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+3A4h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+3B8h+var_C]
mov	large fs:0, eax
mov	eax, [esp+3B8h+arg_0]
mov	ecx, [esp+3B8h+arg_10]
mov	edx, [esp+3B8h+arg_18]
mov	[esp+3B8h+var_370], eax
lea	eax, [esp+3B8h+var_38C]
xor	esi, esi
push	eax
mov	[esp+3BCh+var_380], ecx
mov	[esp+3BCh+var_378], edx
mov	[esp+3BCh+var_394], esi
call	sub_4325E0
push	offset unk_167EF9C
lea	ecx, [esp+3BCh+var_38C]
mov	[esp+3BCh+var_4], esi
call	sub_77FFD0
push	offset unk_167EFA8
lea	ecx, [esp+3BCh+var_38C]
mov	esi, eax
call	sub_77FFD0
mov	ebp, eax
push	offset unk_167EFA4
lea	ecx, [esp+3BCh+var_38C]
mov	[esp+3BCh+var_3A0], ebp
call	sub_77FFD0
mov	edx, [esi]
mov	edi, eax
mov	eax, [edx+18h]
push	2Dh
mov	ecx, esi
mov	dword ptr [esp+3BCh+var_39C], edi
call	eax
mov	edx, [esi]
mov	byte ptr [esp+3B8h+var_36C], al
mov	eax, [edx+18h]
push	2Bh
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	byte ptr [esp+3B8h+var_388], al
mov	eax, [edx+18h]
push	20h
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	byte ptr [esp+3B8h+var_360], al
mov	eax, [edx+18h]
push	30h
mov	ecx, esi
call	eax
cmp	[esp+3B8h+arg_C], 0
mov	byte ptr [esp+3B8h+var_364], al
mov	ebx, 2
jz	short loc_78D1AB
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax
mov	edx, [edi]
mov	byte ptr [esp+3B8h+var_358], al
mov	eax, [edx+8]
mov	ecx, edi
call	eax
lea	ecx, [esp+3B8h+var_348]
push	ecx
mov	ecx, edi
mov	byte ptr [esp+3BCh+var_37C], al
call	sub_781970
mov	byte ptr [esp+3B8h+var_4], 1
mov	ebx, 1
jmp	short loc_78D1DD

loc_78D1AB:
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	byte ptr [esp+3B8h+var_358], al
mov	eax, [edx+8]
mov	ecx, ebp
call	eax
lea	edx, [esp+3B8h+var_2B8]
push	edx
mov	ecx, ebp
mov	byte ptr [esp+3BCh+var_37C], al
call	sub_781970
mov	[esp+3B8h+var_4], ebx

loc_78D1DD:
push	eax
lea	ecx, [esp+3BCh+var_144]
mov	[esp+3BCh+var_394], ebx
call	sub_403850
mov	[esp+3B8h+var_4], 4
test	bl, 2
jz	short loc_78D240
mov	ecx, [esp+3B8h+var_2A4]
and	ebx, 0FFFFFFFDh
lea	eax, [esp+3B8h+var_2B8]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, eax
jz	short loc_78D240
test	ecx, ecx
jz	short loc_78D240
mov	eax, [esp+3B8h+var_2B8]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D236
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D240

loc_78D236:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D240:
mov	byte ptr [esp+3B8h+var_4], 5
test	bl, 1
jz	short loc_78D289
mov	ecx, [esp+3B8h+var_334]
and	ebx, 0FFFFFFFEh
lea	edx, [esp+3B8h+var_348]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78D289
test	ecx, ecx
jz	short loc_78D289
mov	eax, [esp+3B8h+var_348]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D27F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D289

loc_78D27F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D289:
cmp	[esp+3B8h+arg_C], 0
jz	short loc_78D2BC
mov	eax, [edi]
mov	edx, [eax+1Ch]
mov	ecx, edi
call	edx
mov	[esp+3B8h+var_384], eax
lea	eax, [esp+3B8h+var_318]
push	eax
mov	ecx, edi
call	sub_781950
mov	byte ptr [esp+3B8h+var_4], 6
or	ebx, 4
jmp	short loc_78D2E7

loc_78D2BC:
mov	eax, [ebp+0]
mov	edx, [eax+1Ch]
mov	ecx, ebp
call	edx
lea	ecx, [esp+3B8h+var_330]
push	ecx
mov	ecx, ebp
mov	[esp+3BCh+var_384], eax
call	sub_781950
mov	[esp+3B8h+var_4], 7
or	ebx, 8

loc_78D2E7:
push	eax
lea	ecx, [esp+3BCh+var_15C]
mov	[esp+3BCh+var_394], ebx
call	sub_403850
mov	[esp+3B8h+var_4], 9
test	bl, 8
jz	short loc_78D34A
mov	ecx, [esp+3B8h+var_31C]
and	ebx, 0FFFFFFF7h
lea	edx, [esp+3B8h+var_330]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78D34A
test	ecx, ecx
jz	short loc_78D34A
mov	eax, [esp+3B8h+var_330]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D340
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D34A

loc_78D340:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D34A:
mov	byte ptr [esp+3B8h+var_4], 0Ah
test	bl, 4
jz	short loc_78D399
mov	ecx, [esp+3B8h+var_304]
and	ebx, 0FFFFFFFBh
lea	eax, [esp+3B8h+var_318]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, eax
jz	short loc_78D399
test	ecx, ecx
jz	short loc_78D399
mov	eax, [esp+3B8h+var_318]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D38F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D399

loc_78D38F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D399:
mov	ecx, [esp+3B8h+var_378]
mov	eax, [ecx+118h]
mov	ecx, [ecx+10h]
cmp	eax, ecx
jnz	loc_78D430
mov	ecx, [esp+3B8h+arg_4]
mov	esi, [esp+3B8h+var_370]
mov	edx, [esp+3B8h+arg_8]
mov	[esi], ecx
mov	ecx, [esp+3B8h+var_148]
lea	eax, [esp+3B8h+var_15C]
mov	[esi+4], edx
mov	byte ptr [esp+3B8h+var_4], 5
cmp	ecx, eax
jz	short loc_78D41B
test	ecx, ecx
jz	short loc_78D41B
mov	eax, [esp+3B8h+var_15C]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D411
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	ecx, [esp+3BCh+var_130]
lea	edx, [esp+3BCh+var_144]
add	esp, 4
cmp	ecx, edx
jmp	loc_78DC2D

loc_78D411:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D41B:
mov	ecx, [esp+3B8h+var_130]
lea	edx, [esp+3B8h+var_144]
cmp	ecx, edx
jmp	loc_78DC2D

loc_78D430:
mov	edx, eax
mov	[esp+3B8h+var_378], eax
mov	al, byte ptr [esp+3B8h+var_36C]
cmp	[edx], al
mov	ebp, ecx
setz	al
mov	byte ptr [esp+3B8h+var_3A4+3], al
test	al, al
jz	short loc_78D44E
inc	edx
mov	[esp+3B8h+var_378], edx

loc_78D44E:
cmp	[esp+3B8h+arg_C], 0
jz	short loc_78D497
test	al, al
jz	short loc_78D478
lea	ecx, [esp+3B8h+var_2E8]
push	ecx
mov	ecx, edi
call	sub_7819B0
mov	byte ptr [esp+3B8h+var_4], 0Bh
or	ebx, 10h
jmp	short loc_78D4DE

loc_78D478:
lea	edx, [esp+3B8h+var_2A0]
push	edx
mov	ecx, edi
call	sub_781990
mov	[esp+3B8h+var_4], 0Ch
or	ebx, 20h
jmp	short loc_78D4DE

loc_78D497:
test	al, al
jz	short loc_78D4BC
mov	ecx, [esp+3B8h+var_3A0]
lea	eax, [esp+3B8h+var_2D0]
push	eax
call	sub_7819B0
mov	[esp+3B8h+var_4], 0Dh
or	ebx, 40h
jmp	short loc_78D4DE

loc_78D4BC:
lea	ecx, [esp+3B8h+var_300]
push	ecx
mov	ecx, [esp+3BCh+var_3A0]
call	sub_781990
mov	[esp+3B8h+var_4], 0Eh
or	ebx, 80h

loc_78D4DE:
push	eax
lea	ecx, [esp+3BCh+var_174]
mov	[esp+3BCh+var_394], ebx
call	sub_403850
mov	[esp+3B8h+var_4], 10h
test	bl, bl
jns	short loc_78D543
mov	ecx, [esp+3B8h+var_2EC]
and	ebx, 0FFFFFF7Fh
lea	edx, [esp+3B8h+var_300]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78D543
test	ecx, ecx
jz	short loc_78D543
mov	eax, [esp+3B8h+var_300]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D539
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D543

loc_78D539:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D543:
mov	byte ptr [esp+3B8h+var_4], 11h
test	bl, 40h
jz	short loc_78D592
mov	ecx, [esp+3B8h+var_2BC]
and	ebx, 0FFFFFFBFh
lea	eax, [esp+3B8h+var_2D0]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, eax
jz	short loc_78D592
test	ecx, ecx
jz	short loc_78D592
mov	eax, [esp+3B8h+var_2D0]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D588
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D592

loc_78D588:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D592:
mov	byte ptr [esp+3B8h+var_4], 12h
test	bl, 20h
jz	short loc_78D5E1
mov	ecx, [esp+3B8h+var_28C]
and	ebx, 0FFFFFFDFh
lea	edx, [esp+3B8h+var_2A0]
mov	[esp+3B8h+var_394], ebx
cmp	ecx, edx
jz	short loc_78D5E1
test	ecx, ecx
jz	short loc_78D5E1
mov	eax, [esp+3B8h+var_2A0]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D5D7
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D5E1

loc_78D5D7:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D5E1:
mov	byte ptr [esp+3B8h+var_4], 13h
test	bl, 10h
jz	short loc_78D629
mov	ecx, [esp+3B8h+var_2D4]
lea	eax, [esp+3B8h+var_2E8]
cmp	ecx, eax
jz	short loc_78D629
test	ecx, ecx
jz	short loc_78D629
mov	eax, [esp+3B8h+var_2E8]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78D61F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78D629

loc_78D61F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78D629:
cmp	[esp+3B8h+arg_1C], 0
mov	edi, [esp+3B8h+var_378]
jz	short loc_78D6B1
mov	eax, edi
cmp	edi, ebp
jz	short loc_78D657
mov	esi, [esi+8]

loc_78D640:
movzx	ecx, byte ptr [eax]
mov	edx, [esi+ecx*4]
shr	edx, 6
test	dl, 1
jz	short loc_78D653
inc	eax
cmp	eax, ebp
jnz	short loc_78D640

loc_78D653:
cmp	eax, edi
jnz	short loc_78D6AF

loc_78D657:
mov	ecx, [esp+3B8h+arg_8]
mov	esi, [esp+3B8h+var_370]
mov	eax, [esp+3B8h+arg_4]
mov	[esi+4], ecx
lea	ecx, [esp+3B8h+var_174]
mov	[esi], eax
mov	byte ptr [esp+3B8h+var_4], 0Ah
call	sub_407910
lea	ecx, [esp+3B8h+var_15C]
mov	byte ptr [esp+3B8h+var_4], 5
call	sub_407910
lea	ecx, [esp+3B8h+var_144]
mov	byte ptr [esp+3B8h+var_4], 0
call	sub_407910
jmp	loc_78DC60

loc_78D6AF:
mov	ebp, eax

loc_78D6B1:		; size_t
push	101h
lea	edx, [esp+3BCh+var_275]
push	edx		; int
lea	ecx, [esp+3C0h+var_12C]
call	sub_7883D0
mov	eax, [esp+3B8h+var_11C]
mov	byte ptr [eax],	0
mov	ecx, [esp+3B8h+var_130]
mov	byte ptr [esp+3B8h+var_4], 14h
cmp	ecx, [esp+3B8h+var_134]
jz	short loc_78D74D
lea	edx, [esp+3B8h+var_3A4+2]
push	edx
push	ebp
push	edi
lea	ecx, [esp+3C4h+var_12C]
call	sub_788040
mov	eax, [esp+3B8h+var_36C]
mov	ecx, [esp+3B8h+var_388]
mov	edx, [esp+3B8h+var_37C]
push	0
push	eax
push	ecx
mov	ecx, [esp+3C4h+var_11C]
sub	ecx, [esp+3C4h+var_14]
push	edx
sub	ecx, [esp+3C8h+var_384]
lea	eax, [esp+3C8h+var_144]
push	eax
push	ecx
lea	edx, [esp+3D0h+var_12C]
push	edx
call	sub_793F60
mov	eax, [esp+3D4h+var_14]
mov	ebp, [esp+3D4h+var_11C]
add	esp, 1Ch
mov	[esp+3B8h+var_378], eax

loc_78D74D:
mov	esi, [esp+3B8h+var_164]
sub	esi, [esp+3B8h+var_160]
mov	ecx, [esp+3B8h+var_380]
mov	ebx, [ecx+28h]
mov	edi, [ecx+2Ch]
mov	eax, ebp
sub	eax, [esp+3B8h+var_378]
add	esi, eax
cmp	[esp+3B8h+var_384], 0
mov	[esp+3B8h+var_37C], eax
jz	short loc_78D779
inc	esi

loc_78D779:
mov	eax, [ecx+8]
shr	eax, 9
and	al, 1
mov	byte ptr [esp+3B8h+var_3A4+2], al
jz	short loc_78D797
mov	ecx, [esp+3B8h+var_14C]
sub	ecx, [esp+3B8h+var_148]
add	esi, ecx

loc_78D797:
cmp	[esp+3B8h+arg_C], 0
jz	short loc_78D7D0
cmp	byte ptr [esp+3B8h+var_3A4+3], 0
mov	ecx, dword ptr [esp+3B8h+var_39C]
jz	short loc_78D7BE
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+3B8h+var_388]
push	eax
call	edx
lea	eax, [esp+3B8h+var_388]
jmp	short loc_78D7FD

loc_78D7BE:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+3B8h+var_39C]
push	edx
call	eax
lea	eax, [esp+3B8h+var_39C]
jmp	short loc_78D7FD

loc_78D7D0:
cmp	byte ptr [esp+3B8h+var_3A4+3], 0
mov	ecx, [esp+3B8h+var_3A0]
jz	short loc_78D7ED
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+3B8h+var_36C]
push	eax
call	edx
lea	eax, [esp+3B8h+var_36C]
jmp	short loc_78D7FD

loc_78D7ED:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+3B8h+var_3A0]
push	edx
call	eax
lea	eax, [esp+3B8h+var_3A0]

loc_78D7FD:
mov	eax, [eax]
mov	ecx, eax
shr	ecx, 8
mov	[esp+3B8h+var_388], eax
cmp	cl, 1
jz	short loc_78D814
shr	eax, 10h
cmp	al, 1
jnz	short loc_78D815

loc_78D814:
inc	esi

loc_78D815:
xor	eax, eax
xor	edx, edx
cmp	eax, edi
jg	short loc_78D831
jl	short loc_78D823
cmp	esi, ebx
jnb	short loc_78D831

loc_78D823:
sub	ebx, esi
sbb	edi, eax
mov	dword ptr [esp+3B8h+var_39C], ebx
mov	dword ptr [esp+3B8h+var_39C+4],	edi
jmp	short loc_78D839

loc_78D831:
mov	dword ptr [esp+3B8h+var_39C], edx
mov	dword ptr [esp+3B8h+var_39C+4],	edx

loc_78D839:
mov	eax, [esp+3B8h+var_380]
mov	eax, [eax+8]
mov	ecx, dword ptr [esp+3B8h+var_39C]
and	eax, 7
or	ecx, dword ptr [esp+3B8h+var_39C+4]
mov	[esp+3B8h+var_380], eax
jz	short loc_78D89B
test	al, 5
jnz	short loc_78D89B
mov	eax, dword ptr [esp+3B8h+var_39C+4]
mov	ecx, dword ptr [esp+3B8h+var_39C]
lea	edx, [esp+3B8h+arg_14]
push	edx
mov	edx, [esp+3BCh+arg_8]
push	eax
mov	eax, [esp+3C0h+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [esp+3CCh+var_36C]
push	ecx
call	sub_780CD0
mov	ecx, [eax]
mov	[esp+3D0h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+3B8h+arg_8], eax
xor	edx, edx
jmp	short loc_78D8A9

loc_78D89B:
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]

loc_78D8A9:
mov	edi, [esp+3B8h+var_358]
mov	ebx, [esp+3B8h+var_378]
mov	[esp+3B8h+var_3A0], edx
jmp	short loc_78D8C0
align 10h

loc_78D8C0:
mov	edx, [esp+3B8h+var_3A0]
movsx	edx, byte ptr [esp+edx+3B8h+var_388] ; switch 5	cases
cmp	edx, 4
ja	loc_78DA98	; default
jmp	ds:off_78DC94[edx*4] ; switch jump

loc_78D8D9:		; jumptable 0078D8D2 case 1
mov	eax, [esp+3B8h+var_360]
push	eax
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]

loc_78D8F8:		; jumptable 0078D8D2 case 0
mov	edx, dword ptr [esp+3B8h+var_39C]
or	edx, dword ptr [esp+3B8h+var_39C+4]
jz	loc_78DA98	; default
cmp	[esp+3B8h+var_380], 4
jnz	loc_78DA98	; default
lea	edx, [esp+3B8h+arg_14]
push	edx
mov	edx, dword ptr [esp+3BCh+var_39C+4]
push	edx
mov	edx, dword ptr [esp+3C0h+var_39C]
push	edx
push	eax
push	ecx
lea	eax, [esp+3CCh+var_358]
push	eax
call	sub_780CD0
add	esp, 18h
jmp	loc_78DA85

loc_78D937:		; jumptable 0078D8D2 case 2
cmp	byte ptr [esp+3B8h+var_3A4+2], 0
jz	loc_78DA98	; default
mov	edx, [esp+3B8h+var_148]
push	eax
push	ecx
mov	ecx, [esp+3C0h+var_14C]
push	ecx
push	edx
lea	eax, [esp+3C8h+var_36C]
push	eax
call	sub_7833E0
jmp	loc_78DA82

loc_78D963:		; jumptable 0078D8D2 case 3
mov	edx, [esp+3B8h+var_164]
cmp	[esp+3B8h+var_160], edx
jz	loc_78DA98	; default
mov	eax, [esp+3B8h+var_160]
movzx	ecx, byte ptr [eax]
push	ecx
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]
jmp	loc_78DA98	; default

loc_78D9A1:		; jumptable 0078D8D2 case 4
mov	esi, [esp+3B8h+var_384]
test	esi, esi
jnz	short loc_78D9B6
push	eax
push	ecx
push	ebp
push	ebx
lea	edx, [esp+3C8h+var_378]
jmp	loc_78DA7C

loc_78D9B6:
cmp	[esp+3B8h+var_37C], esi
jg	short loc_78DA2C
mov	eax, [esp+3B8h+var_364]
push	eax
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
push	edi
lea	ecx, [esp+3BCh+arg_4]
call	sub_780860
sub	esi, [esp+3B8h+var_37C]
mov	edx, [esp+3B8h+arg_8]
mov	eax, [esp+3B8h+arg_4]
lea	ecx, [esp+3B8h+var_364]
push	ecx
push	esi
push	edx
push	eax
lea	ecx, [esp+3C8h+var_394]
push	ecx
call	sub_780FF0
mov	edx, [eax]
mov	[esp+3CCh+arg_4], edx
mov	ecx, [eax+4]
mov	[esp+3CCh+arg_8], ecx
mov	edx, [eax+4]
mov	eax, [eax]
push	edx
push	eax
push	ebp
lea	ecx, [esp+3D8h+var_288]
push	ebx
push	ecx
call	sub_7833E0
add	esp, 28h
jmp	short loc_78DA85

loc_78DA2C:
push	eax
mov	esi, ebp
sub	esi, [esp+3BCh+var_384]
push	ecx
push	esi
lea	edx, [esp+3C4h+var_280]
push	ebx
push	edx
call	sub_7833E0
mov	ecx, [eax]
mov	[esp+3CCh+arg_4], ecx
mov	edx, [eax+4]
add	esp, 14h
push	edi
lea	ecx, [esp+3BCh+arg_4]
mov	[esp+3BCh+arg_8], edx
call	sub_780860
mov	eax, [esp+3B8h+arg_8]
mov	ecx, [esp+3B8h+arg_4]
push	eax
push	ecx
push	ebp
push	esi
lea	edx, [esp+3C8h+var_350]

loc_78DA7C:
push	edx
call	sub_7833E0

loc_78DA82:
add	esp, 14h

loc_78DA85:
mov	ecx, [eax]
mov	[esp+3B8h+arg_4], ecx
mov	eax, [eax+4]
mov	[esp+3B8h+arg_8], eax

loc_78DA98:		; default
mov	edx, [esp+3B8h+var_3A0]
inc	edx
cmp	edx, 4
mov	[esp+3B8h+var_3A0], edx
jl	loc_78D8C0
mov	esi, [esp+3B8h+var_164]
mov	edx, [esp+3B8h+var_160]
mov	edi, esi
sub	edi, edx
cmp	edi, 1
jbe	short loc_78DAF7
push	0
lea	edi, [esp+3BCh+var_3A4+2]
push	edi
push	eax
push	ecx
push	esi
inc	edx
push	edx
lea	eax, [esp+3D0h+var_360]
push	eax
call	sub_781280
mov	ecx, [esp+3D4h+var_360]
mov	eax, [esp+3D4h+var_35C]
mov	edx, [esp+3D4h+var_160]
add	esp, 1Ch
mov	[esp+3B8h+arg_4], ecx
mov	[esp+3B8h+arg_8], eax

loc_78DAF7:
mov	esi, dword ptr [esp+3B8h+var_39C]
mov	edi, dword ptr [esp+3B8h+var_39C+4]
mov	ebx, esi
or	ebx, edi
jz	short loc_78DB3F
test	byte ptr [esp+3B8h+var_380], 6
jnz	short loc_78DB3F
lea	edx, [esp+3B8h+arg_14]
push	edx
push	edi
push	esi
push	eax
push	ecx
lea	eax, [esp+3CCh+var_350]
push	eax
call	sub_780CD0
mov	ecx, [eax]
mov	edx, [esp+3D0h+var_160]
mov	[esp+3D0h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+3B8h+arg_8], eax

loc_78DB3F:
mov	esi, [esp+3B8h+var_370]
mov	[esi], ecx
mov	[esi+4], eax
mov	eax, [esp+3B8h+var_14]
lea	ecx, [esp+3B8h+var_12C]
mov	byte ptr [esp+3B8h+var_4], 13h
cmp	eax, ecx
jz	short loc_78DB9E
test	eax, eax
jz	short loc_78DB9E
mov	ecx, [esp+3B8h+var_12C]
lea	edi, [esp+3B8h+var_118]
sub	ecx, eax
cmp	eax, edi
jz	short loc_78DB9E
cmp	ecx, 80h
jbe	short loc_78DB8D
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DB97

loc_78DB8D:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78DB97:
mov	edx, [esp+3B8h+var_160]

loc_78DB9E:
lea	eax, [esp+3B8h+var_174]
mov	byte ptr [esp+3B8h+var_4], 0Ah
cmp	edx, eax
jz	short loc_78DBDA
test	edx, edx
jz	short loc_78DBDA
mov	eax, [esp+3B8h+var_174]
sub	eax, edx
cmp	eax, 80h
jbe	short loc_78DBD0
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DBDA

loc_78DBD0:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

loc_78DBDA:
mov	ecx, [esp+3B8h+var_148]
lea	edx, [esp+3B8h+var_15C]
mov	byte ptr [esp+3B8h+var_4], 5
cmp	ecx, edx
jz	short loc_78DC1D
test	ecx, ecx
jz	short loc_78DC1D
mov	eax, [esp+3B8h+var_15C]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78DC13
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DC1D

loc_78DC13:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78DC1D:
mov	ecx, [esp+3B8h+var_130]
lea	eax, [esp+3B8h+var_144]
cmp	ecx, eax

loc_78DC2D:
mov	byte ptr [esp+3B8h+var_4], 0
jz	short loc_78DC60
test	ecx, ecx
jz	short loc_78DC60
mov	eax, [esp+3B8h+var_144]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78DC56
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DC60

loc_78DC56:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78DC60:
lea	ecx, [esp+3B8h+var_38C]
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+3B8h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+3A4h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 3A4h
retn
sub_78D080 endp

align 4
off_78DC94 dd offset loc_78D8F8	; jump table for switch	statement
dd offset loc_78D8D9
dd offset loc_78D937
dd offset loc_78D963
dd offset loc_78D9A1
align 10h



sub_78DCB0 proc	near

var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= byte ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= dword ptr -1E8h
var_1E4= dword ptr -1E4h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_134= dword ptr -134h
var_130= byte ptr -130h
var_118= byte ptr -118h
var_100= byte ptr -100h
var_D8=	byte ptr -0D8h
var_B0=	dword ptr -0B0h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

push	0FFFFFFFFh
push	offset loc_12CA40E
mov	eax, large fs:0
push	eax
sub	esp, 200h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20Ch+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+220h+var_C]
mov	large fs:0, eax
mov	ecx, [esp+220h+arg_24]
mov	eax, [esp+220h+arg_20]
mov	ebx, [esp+220h+arg_0]
mov	ebp, [esp+220h+arg_1C]
mov	esi, [esp+220h+arg_18]
lea	edx, [esp+220h+arg_C]
mov	[esp+220h+var_1F0], ecx
push	edx
lea	ecx, [esp+224h+arg_4]
mov	[esp+224h+var_1F8], ebx
mov	[esp+224h+var_204], ebp
mov	[esp+224h+var_1D4], eax
mov	[esp+224h+var_20C], 0
call	sub_781460
test	al, al
jz	short loc_78DD5C
mov	eax, [esp+220h+arg_4]
or	dword ptr [ebp+0], 2
mov	ecx, [esp+220h+arg_8]
mov	[ebx], eax
mov	[ebx+4], ecx
mov	eax, ebx
jmp	loc_78E805

loc_78DD5C:
lea	edx, [esp+220h+var_200]
push	edx
mov	ecx, esi
call	sub_4325E0
push	offset unk_167EFC4
lea	ecx, [esp+224h+var_200]
mov	[esp+224h+var_4], 0
call	sub_77FFD0
push	offset unk_167EFC0
lea	ecx, [esp+224h+var_200]
mov	ebp, eax
call	sub_77FFD0
mov	edi, eax
push	offset unk_167EFB8
lea	ecx, [esp+224h+var_200]
mov	[esp+224h+var_1F4], edi
call	sub_77FFD0
mov	bl, [esp+220h+arg_14]
mov	[esp+220h+var_1EC], eax
test	bl, bl
jz	short loc_78DDC8
mov	eax, [edi]
mov	edx, [eax+24h]
lea	ecx, [esp+220h+var_1E8]
push	ecx
mov	ecx, edi
call	edx
lea	eax, [esp+220h+var_1E8]
jmp	short loc_78DDDB

loc_78DDC8:
mov	eax, [ebp+0]
mov	edx, [eax+24h]
lea	ecx, [esp+220h+var_1D8]
push	ecx
mov	ecx, ebp
call	edx
lea	eax, [esp+220h+var_1D8]

loc_78DDDB:
mov	eax, [eax]
mov	[esp+220h+var_1D8], eax
test	bl, bl
jz	short loc_78DE03
lea	ecx, [esp+220h+var_158]
push	ecx
mov	ecx, edi
call	sub_7819B0
mov	byte ptr [esp+220h+var_4], 1
mov	ebx, 1
jmp	short loc_78DE1B

loc_78DE03:
lea	edx, [esp+220h+var_1A8]
push	edx
mov	ecx, ebp
call	sub_7819B0
mov	ebx, 2
mov	[esp+220h+var_4], ebx

loc_78DE1B:
push	eax
lea	ecx, [esp+224h+var_88]
mov	[esp+224h+var_20C], ebx
call	sub_403400
mov	[esp+220h+var_4], 4
test	bl, 2
jz	short loc_78DE7C
mov	ecx, [esp+220h+var_184]
and	ebx, 0FFFFFFFDh
lea	eax, [esp+220h+var_1A8]
mov	[esp+220h+var_20C], ebx
cmp	ecx, eax
jz	short loc_78DE7C
test	ecx, ecx
jz	short loc_78DE7C
mov	eax, [esp+220h+var_1A8]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78DE72
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DE7C

loc_78DE72:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78DE7C:
mov	byte ptr [esp+220h+var_4], 5
test	bl, 1
jz	short loc_78DECF
mov	ecx, [esp+220h+var_134]
and	ebx, 0FFFFFFFEh
lea	edx, [esp+220h+var_158]
mov	[esp+220h+var_20C], ebx
cmp	ecx, edx
jz	short loc_78DECF
test	ecx, ecx
jz	short loc_78DECF
mov	eax, [esp+220h+var_158]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78DEC5
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DECF

loc_78DEC5:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78DECF:
cmp	[esp+220h+arg_14], 0
jz	short loc_78DEF2
lea	eax, [esp+220h+var_1D0]
push	eax
mov	ecx, edi
call	sub_781990
mov	byte ptr [esp+220h+var_4], 6
or	ebx, 4
jmp	short loc_78DF0F

loc_78DEF2:
lea	ecx, [esp+220h+var_180]
push	ecx
mov	ecx, ebp
call	sub_781990
mov	[esp+220h+var_4], 7
or	ebx, 8

loc_78DF0F:
push	eax
lea	ecx, [esp+224h+var_60]
mov	[esp+224h+var_20C], ebx
call	sub_403400
mov	[esp+220h+var_4], 9
test	bl, 8
jz	short loc_78DF76
mov	ecx, [esp+220h+var_15C]
and	ebx, 0FFFFFFF7h
lea	edx, [esp+220h+var_180]
mov	[esp+220h+var_20C], ebx
cmp	ecx, edx
jz	short loc_78DF76
test	ecx, ecx
jz	short loc_78DF76
mov	eax, [esp+220h+var_180]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78DF6C
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DF76

loc_78DF6C:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78DF76:
mov	byte ptr [esp+220h+var_4], 0Ah
test	bl, 4
jz	short loc_78DFC0
mov	ecx, [esp+220h+var_1AC]
and	ebx, 0FFFFFFFBh
lea	eax, [esp+220h+var_1D0]
mov	[esp+220h+var_20C], ebx
cmp	ecx, eax
jz	short loc_78DFC0
test	ecx, ecx
jz	short loc_78DFC0
mov	eax, [esp+220h+var_1D0]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78DFB6
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78DFC0

loc_78DFB6:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78DFC0:
mov	eax, [esi+8]
shr	eax, 9
and	al, 1
lea	ecx, [esp+220h+var_B0]
mov	byte ptr [esp+220h+var_1FC+3], al
mov	edx, ecx
xor	eax, eax
mov	[esp+220h+var_90], ecx
mov	[esp+220h+var_8C], edx
mov	word ptr [esp+220h+var_B0], ax
xor	edi, edi
mov	byte ptr [esp+220h+var_4], 0Bh
mov	[esp+220h+var_1E8], edi
jmp	short loc_78E000
align 10h

loc_78E000:
movsx	eax, byte ptr [esp+edi+220h+var_1D8]
cmp	eax, 4		; switch 5 cases
ja	loc_78E4E6	; default
jmp	ds:off_78E830[eax*4] ; switch jump

loc_78E015:		; jumptable 0078E00E case 1
lea	ecx, [esp+220h+arg_4]
call	sub_781410
mov	ecx, [esp+220h+var_1EC]
mov	edx, [ecx]
movzx	eax, ax
push	eax
mov	eax, [edx+8]
push	1
call	eax
test	al, al
jz	loc_78E57D
lea	ecx, [esp+220h+arg_4]
call	sub_7808E0

loc_78E046:		; jumptable 0078E00E case 0
lea	ecx, [esp+220h+arg_C]
push	ecx
lea	ecx, [esp+224h+arg_4]
call	sub_781460
test	al, al
jnz	loc_78E4E6	; default
mov	esi, [esp+220h+var_1EC]

loc_78E066:
cmp	byte ptr [esp+220h+arg_8+3], 0
jnz	short loc_78E0B3
mov	ecx, [esp+220h+arg_4]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78E084
movzx	eax, word ptr [eax]
jmp	short loc_78E08E

loc_78E084:
mov	edx, [ecx]
mov	eax, [edx+1Ch]
call	eax
movzx	eax, ax

loc_78E08E:
movzx	eax, ax
mov	ecx, 0FFFFh
cmp	ax, cx
setz	dl
mov	word ptr [esp+220h+arg_8], ax
mov	byte ptr [esp+220h+arg_8+2], dl
mov	byte ptr [esp+220h+arg_8+3], 1

loc_78E0B3:
mov	ecx, [esp+220h+arg_8]
mov	eax, [esi]
mov	edx, [eax+8]
push	ecx
push	1
mov	ecx, esi
call	edx
test	al, al
jz	loc_78E4E6	; default
mov	ecx, [esp+220h+arg_4]
mov	eax, [ecx+8]
cmp	eax, [ecx+0Ch]
jnb	short loc_78E0E5
add	eax, 2
mov	[ecx+8], eax
jmp	short loc_78E0EC

loc_78E0E5:
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx

loc_78E0EC:
lea	eax, [esp+220h+arg_C]
push	eax
lea	ecx, [esp+224h+arg_4]
mov	byte ptr [esp+224h+arg_8+3], 0
call	sub_781460
test	al, al
jz	loc_78E066
jmp	loc_78E4E6	; default

loc_78E115:		; jumptable 0078E00E case 2
cmp	[esp+220h+arg_14], 0
jz	short loc_78E13D
lea	ecx, [esp+220h+var_100]
push	ecx
mov	ecx, [esp+224h+var_1F4]
call	sub_781950
mov	byte ptr [esp+220h+var_4], 0Ch
or	ebx, 10h
jmp	short loc_78E15A

loc_78E13D:
lea	edx, [esp+220h+var_D8]
push	edx
mov	ecx, ebp
call	sub_781950
mov	[esp+220h+var_4], 0Dh
or	ebx, 20h

loc_78E15A:
push	eax
lea	ecx, [esp+224h+var_38]
mov	[esp+224h+var_20C], ebx
call	sub_403400
mov	[esp+220h+var_4], 0Fh
test	bl, 20h
jz	short loc_78E18E
and	ebx, 0FFFFFFDFh
lea	ecx, [esp+220h+var_D8]
mov	[esp+220h+var_20C], ebx
call	sub_407E50

loc_78E18E:
mov	byte ptr [esp+220h+var_4], 10h
test	bl, 10h
jz	short loc_78E1AE
and	ebx, 0FFFFFFEFh
lea	ecx, [esp+220h+var_100]
mov	[esp+220h+var_20C], ebx
call	sub_407E50

loc_78E1AE:
mov	eax, [esp+220h+var_18]
mov	ecx, [esp+220h+var_14]
mov	edx, [esp+220h+arg_10]
push	eax
mov	eax, [esp+224h+arg_C]
push	ecx
mov	ecx, [esp+228h+arg_8]
push	edx
mov	edx, [esp+22Ch+arg_4]
push	eax
push	ecx
push	edx
lea	eax, [esp+238h+var_1E4]
push	eax
call	sub_781680
add	esp, 1Ch
cmp	byte ptr [esp+220h+var_1DC], 0
jnz	short loc_78E203
cmp	byte ptr [esp+220h+var_1FC+3], 0
jz	short loc_78E203
mov	ecx, [esp+220h+var_204]
mov	dword ptr [ecx], 4

loc_78E203:
mov	eax, [esp+220h+var_1E0]
mov	edx, [esp+220h+var_1E4]
mov	[esp+220h+arg_8], eax
mov	eax, [esp+220h+var_14]
lea	ecx, [esp+220h+var_38]
mov	[esp+220h+arg_4], edx
mov	byte ptr [esp+220h+var_4], 0Bh
cmp	eax, ecx
jz	loc_78E4E6	; default
test	eax, eax
jz	loc_78E4E6	; default
mov	ecx, [esp+220h+var_38]
sub	ecx, eax
sar	ecx, 1
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_78E262
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	loc_78E4E6	; default

loc_78E262:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8
jmp	loc_78E4E6	; default

loc_78E271:		; jumptable 0078E00E case 3
lea	edx, [esp+220h+arg_C]
push	edx
lea	ecx, [esp+224h+arg_4]
call	sub_781460
test	al, al
jz	short loc_78E2BD
mov	eax, [esp+220h+var_3C]
cmp	eax, [esp+220h+var_40]
jz	loc_78E4E6	; default
mov	ecx, [esp+220h+var_64]
cmp	ecx, [esp+220h+var_68]
jnz	loc_78E57D
mov	edx, [esp+220h+var_1F0]
mov	byte ptr [edx],	0
jmp	loc_78E4E6	; default

loc_78E2BD:
mov	esi, [esp+220h+var_3C]
cmp	esi, [esp+220h+var_40]
jnz	short loc_78E30E
mov	esi, [esp+220h+var_64]
cmp	esi, [esp+220h+var_68]
jz	loc_78E4E6	; default
lea	ecx, [esp+220h+arg_4]
call	sub_781410
cmp	ax, [esi]
jnz	loc_78E4E6	; default
lea	ecx, [esp+220h+arg_4]
call	sub_7808E0
mov	eax, [esp+220h+var_1F0]
mov	byte ptr [eax],	0
jmp	loc_78E4E6	; default

loc_78E30E:
lea	ecx, [esp+220h+arg_4]
call	sub_781410
cmp	ax, [esi]
jnz	short loc_78E330
lea	ecx, [esp+220h+arg_4]
call	sub_7808E0
jmp	loc_78E4E6	; default

loc_78E330:
mov	esi, [esp+220h+var_64]
cmp	esi, [esp+220h+var_68]
jz	loc_78E4E6	; default
lea	ecx, [esp+220h+arg_4]
call	sub_781410
cmp	ax, [esi]
jnz	loc_78E57D
lea	ecx, [esp+220h+arg_4]
call	sub_7808E0
mov	ecx, [esp+220h+var_1F0]
mov	byte ptr [ecx],	0
jmp	loc_78E4E6	; default

loc_78E371:		; jumptable 0078E00E case 4
cmp	[esp+220h+arg_14], 0
jz	short loc_78E3B4
mov	ecx, [esp+220h+var_1F4]
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax
mov	ecx, [esp+220h+var_1F4]
mov	edx, [ecx]
movzx	edi, ax
mov	eax, [edx+1Ch]
call	eax
lea	ecx, [esp+220h+var_130]
push	ecx
mov	ecx, [esp+224h+var_1F4]
mov	esi, eax
call	sub_781970
mov	byte ptr [esp+220h+var_4], 11h
or	ebx, 40h
jmp	short loc_78E3ED

loc_78E3B4:
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
movzx	edi, ax
mov	eax, [edx+1Ch]
mov	ecx, ebp
call	eax
lea	edx, [esp+220h+var_118]
push	edx
mov	ecx, ebp
mov	esi, eax
call	sub_781970
mov	[esp+220h+var_4], 12h
or	ebx, 80h

loc_78E3ED:
push	eax
lea	ecx, [esp+224h+var_38]
mov	[esp+224h+var_20C], ebx
call	sub_403850
mov	[esp+220h+var_4], 14h
test	bl, bl
jns	short loc_78E423
and	ebx, 0FFFFFF7Fh
lea	ecx, [esp+220h+var_118]
mov	[esp+220h+var_20C], ebx
call	sub_407910

loc_78E423:
mov	byte ptr [esp+220h+var_4], 15h
test	bl, 40h
jz	short loc_78E443
and	ebx, 0FFFFFFBFh
lea	ecx, [esp+220h+var_130]
mov	[esp+220h+var_20C], ebx
call	sub_407910

loc_78E443:
mov	eax, [esp+220h+var_24]
mov	byte ptr [esp+220h+var_208+3], 1
cmp	eax, [esp+220h+var_28]
jnz	short loc_78E45C
xor	eax, eax
jmp	short loc_78E47B

loc_78E45C:
cmp	[esp+220h+arg_14], 0
jz	short loc_78E46E
mov	ecx, [esp+220h+var_1F4]
mov	edx, [ecx]
jmp	short loc_78E473

loc_78E46E:
mov	edx, [ebp+0]
mov	ecx, ebp

loc_78E473:
mov	eax, [edx+8]
call	eax
movzx	eax, ax

loc_78E47B:
lea	ecx, [esp+220h+var_208+3]
push	ecx
lea	edx, [esp+224h+var_38]
push	edx
mov	edx, [esp+228h+arg_10]
push	eax
mov	eax, [esp+22Ch+var_1EC]
push	esi
push	edi
push	eax
mov	eax, [esp+238h+arg_C]
lea	ecx, [esp+238h+var_B0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+244h+arg_4]
push	ecx
call	sub_78B0F0
mov	ecx, [esp+248h+var_204]
add	esp, 28h
cmp	byte ptr [esp+220h+var_208+3], 0
jnz	short loc_78E4C6
or	dword ptr [ecx], 4

loc_78E4C6:
mov	byte ptr [esp+220h+var_4], 0Bh
test	al, al
jz	loc_78E5DF
lea	ecx, [esp+220h+var_38]
call	sub_407910
mov	edi, [esp+220h+var_1E8]

loc_78E4E6:		; default
inc	edi
cmp	edi, 4
mov	[esp+220h+var_1E8], edi
jl	loc_78E000
mov	ecx, [esp+220h+var_1F0]
cmp	byte ptr [ecx],	0
jz	loc_78E644
mov	ecx, [esp+220h+var_40]
mov	eax, [esp+220h+var_3C]
mov	edx, ecx
sub	edx, eax
sar	edx, 1
cmp	edx, 1
jbe	loc_78E60A
mov	edx, [esp+220h+arg_8]
push	ecx
mov	ecx, [esp+224h+arg_C]
add	eax, 2
push	eax
mov	eax, [esp+228h+arg_10]
push	eax
mov	eax, [esp+22Ch+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [esp+238h+var_1E4]
push	ecx
call	sub_781680
mov	edx, [esp+23Ch+var_1E4]
mov	eax, [esp+23Ch+var_1E0]
add	esp, 1Ch
cmp	byte ptr [esp+220h+var_1DC], 0
mov	[esp+220h+arg_4], edx
mov	[esp+220h+arg_8], eax
jnz	loc_78E60A
mov	edi, [esp+220h+var_204]
or	dword ptr [edi], 4
jmp	loc_78E60E

loc_78E57D:
mov	edx, [esp+220h+var_204]
mov	esi, [esp+220h+var_1F8]
mov	eax, [esp+220h+arg_4]
mov	ecx, [esp+220h+arg_8]
mov	dword ptr [edx], 4
mov	[esi], eax
mov	[esi+4], ecx

loc_78E59E:
lea	ecx, [esp+220h+var_B0]
mov	byte ptr [esp+220h+var_4], 0Ah
call	sub_407E50
lea	ecx, [esp+220h+var_60]
mov	byte ptr [esp+220h+var_4], 5
call	sub_407E50
lea	ecx, [esp+220h+var_88]
mov	byte ptr [esp+220h+var_4], 0
call	sub_407E50
jmp	loc_78E7FA

loc_78E5DF:
mov	edx, [esp+220h+arg_4]
mov	esi, [esp+220h+var_1F8]
mov	eax, [esp+220h+arg_8]
mov	dword ptr [ecx], 4
lea	ecx, [esp+220h+var_38]
mov	[esi], edx
mov	[esi+4], eax
call	sub_407910
jmp	short loc_78E59E

loc_78E60A:
mov	edi, [esp+220h+var_204]

loc_78E60E:
test	byte ptr [edi],	4
jnz	loc_78E6F3
mov	ecx, [esp+220h+var_1D4]
lea	edx, [esp+220h+var_B0]
cmp	edx, ecx
jz	loc_78E6F3
mov	eax, [esp+220h+var_90]
mov	edx, [esp+220h+var_8C]
push	eax
push	edx
call	sub_403580
jmp	loc_78E6F3

loc_78E644:
mov	ecx, [esp+220h+var_68]
mov	eax, [esp+220h+var_64]
mov	edx, ecx
sub	edx, eax
sar	edx, 1
cmp	edx, 1
jbe	short loc_78E6B5
mov	edx, [esp+220h+arg_8]
push	ecx
mov	ecx, [esp+224h+arg_C]
add	eax, 2
push	eax
mov	eax, [esp+228h+arg_10]
push	eax
mov	eax, [esp+22Ch+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [esp+238h+var_1E4]
push	ecx
call	sub_781680
mov	edx, [esp+23Ch+var_1E4]
mov	eax, [esp+23Ch+var_1E0]
add	esp, 1Ch
cmp	byte ptr [esp+220h+var_1DC], 0
mov	[esp+220h+arg_4], edx
mov	[esp+220h+arg_8], eax
jnz	short loc_78E6B5
mov	edi, [esp+220h+var_204]
or	dword ptr [edi], 4
jmp	short loc_78E6B9

loc_78E6B5:
mov	edi, [esp+220h+var_204]

loc_78E6B9:
test	byte ptr [edi],	4
jnz	short loc_78E6F3
mov	ecx, [esp+220h+var_1EC]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	2Dh
call	eax
mov	esi, [esp+220h+var_1D4]
movzx	eax, ax
push	eax
push	1
mov	ecx, esi
call	sub_787530
mov	ecx, [esp+220h+var_90]
mov	edx, [esp+220h+var_8C]
push	ecx
push	edx
mov	ecx, esi
call	sub_403490

loc_78E6F3:
lea	eax, [esp+220h+arg_C]
push	eax
lea	ecx, [esp+224h+arg_4]
call	sub_781460
test	al, al
jz	short loc_78E70E
or	dword ptr [edi], 2

loc_78E70E:
mov	ecx, [esp+220h+arg_4]
mov	esi, [esp+220h+var_1F8]
mov	edx, [esp+220h+arg_8]
mov	[esi], ecx
mov	ecx, [esp+220h+var_8C]
lea	eax, [esp+220h+var_B0]
mov	[esi+4], edx
mov	byte ptr [esp+220h+var_4], 0Ah
cmp	ecx, eax
jz	short loc_78E76C
test	ecx, ecx
jz	short loc_78E76C
mov	eax, [esp+220h+var_B0]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78E762
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78E76C

loc_78E762:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78E76C:
mov	ecx, [esp+220h+var_3C]
lea	edx, [esp+220h+var_60]
mov	byte ptr [esp+220h+var_4], 5
cmp	ecx, edx
jz	short loc_78E7B3
test	ecx, ecx
jz	short loc_78E7B3
mov	eax, [esp+220h+var_60]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78E7A9
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78E7B3

loc_78E7A9:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78E7B3:
mov	ecx, [esp+220h+var_64]
lea	eax, [esp+220h+var_88]
mov	byte ptr [esp+220h+var_4], 0
cmp	ecx, eax
jz	short loc_78E7FA
test	ecx, ecx
jz	short loc_78E7FA
mov	eax, [esp+220h+var_88]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78E7F0
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78E7FA

loc_78E7F0:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78E7FA:
lea	ecx, [esp+220h+var_200]
call	sub_77FF40
mov	eax, esi

loc_78E805:
mov	ecx, [esp+220h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+20Ch+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 20Ch
retn
sub_78DCB0 endp

align 10h
off_78E830 dd offset loc_78E046	; jump table for switch	statement
dd offset loc_78E015
dd offset loc_78E115
dd offset loc_78E271
dd offset loc_78E371
align 10h



sub_78E850 proc	near

var_634= dword ptr -634h
var_630= dword ptr -630h
var_62C= qword ptr -62Ch
var_624= dword ptr -624h
var_620= byte ptr -620h
var_61C= dword ptr -61Ch
var_618= dword ptr -618h
var_614= dword ptr -614h
var_60C= dword ptr -60Ch
var_608= dword ptr -608h
var_604= dword ptr -604h
var_5FC= dword ptr -5FCh
var_5F8= dword ptr -5F8h
var_5F0= dword ptr -5F0h
var_5E8= dword ptr -5E8h
var_5E4= dword ptr -5E4h
var_5E0= byte ptr -5E0h
var_5D8= dword ptr -5D8h
var_5C4= dword ptr -5C4h
var_5C0= dword ptr -5C0h
var_5AC= dword ptr -5ACh
var_5A8= byte ptr -5A8h
var_5A0= byte ptr -5A0h
var_598= dword ptr -598h
var_574= dword ptr -574h
var_570= dword ptr -570h
var_54C= dword ptr -54Ch
var_548= dword ptr -548h
var_524= dword ptr -524h
var_520= dword ptr -520h
var_4FC= dword ptr -4FCh
var_4F8= dword ptr -4F8h
var_4D4= dword ptr -4D4h
var_4D0= dword ptr -4D0h
var_4AC= dword ptr -4ACh
var_4A6= byte ptr -4A6h
var_2A4= dword ptr -2A4h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h

push	0FFFFFFFFh
push	offset loc_12CA58C
mov	eax, large fs:0
push	eax
sub	esp, 628h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+634h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+648h+var_C]
mov	large fs:0, eax
mov	eax, [esp+648h+arg_0]
mov	ecx, [esp+648h+arg_10]
mov	edx, [esp+648h+arg_18]
mov	[esp+648h+var_608], eax
lea	eax, [esp+648h+var_620]
xor	esi, esi
push	eax
mov	[esp+64Ch+var_61C], ecx
mov	[esp+64Ch+var_614], edx
mov	[esp+64Ch+var_634], esi
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+64Ch+var_620]
mov	[esp+64Ch+var_4], esi
call	sub_77FFD0
push	offset unk_167EFC4
lea	ecx, [esp+64Ch+var_620]
mov	esi, eax
call	sub_77FFD0
mov	edi, eax
push	offset unk_167EFC0
lea	ecx, [esp+64Ch+var_620]
mov	dword ptr [esp+64Ch+var_62C], edi
call	sub_77FFD0
mov	edx, [esi]
mov	ebp, eax
mov	eax, [edx+28h]
push	2Dh
mov	ecx, esi
mov	[esp+64Ch+var_624], ebp
call	eax
mov	edx, [esi]
movzx	ecx, ax
mov	eax, [edx+28h]
mov	[esp+648h+var_5F0], ecx
push	2Bh
mov	ecx, esi
call	eax
mov	edx, [esi]
movzx	ecx, ax
mov	eax, [edx+28h]
mov	[esp+648h+var_618], ecx
push	20h
mov	ecx, esi
call	eax
mov	edx, [esi]
movzx	ecx, ax
mov	eax, [edx+28h]
mov	[esp+648h+var_5E8], ecx
push	30h
mov	ecx, esi
call	eax
cmp	[esp+648h+arg_C], 0
movzx	ecx, ax
mov	[esp+648h+var_5FC], ecx
mov	ebx, 2
jz	short loc_78E98F
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
movzx	ecx, ax
mov	eax, [edx+8]
mov	[esp+648h+var_60C], ecx
mov	ecx, ebp
call	eax
movzx	ecx, ax
lea	edx, [esp+648h+var_5D8]
mov	[esp+648h+var_604], ecx
push	edx
mov	ecx, ebp
call	sub_781970
mov	byte ptr [esp+648h+var_4], 1
mov	ebx, 1
jmp	short loc_78E9C5

loc_78E98F:
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax
mov	edx, [edi]
movzx	ecx, ax
mov	eax, [edx+8]
mov	[esp+648h+var_60C], ecx
mov	ecx, edi
call	eax
movzx	ecx, ax
lea	eax, [esp+648h+var_5C0]
mov	[esp+648h+var_604], ecx
push	eax
mov	ecx, edi
call	sub_781970
mov	[esp+648h+var_4], ebx

loc_78E9C5:
push	eax
lea	ecx, [esp+64Ch+var_2A4]
mov	[esp+64Ch+var_634], ebx
call	sub_403850
mov	[esp+648h+var_4], 4
test	bl, 2
jz	short loc_78EA28
mov	ecx, [esp+648h+var_5AC]
and	ebx, 0FFFFFFFDh
lea	edx, [esp+648h+var_5C0]
mov	[esp+648h+var_634], ebx
cmp	ecx, edx
jz	short loc_78EA28
test	ecx, ecx
jz	short loc_78EA28
mov	eax, [esp+648h+var_5C0]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78EA1E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78EA28

loc_78EA1E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78EA28:
mov	byte ptr [esp+648h+var_4], 5
test	bl, 1
jz	short loc_78EA71
mov	ecx, [esp+648h+var_5C4]
and	ebx, 0FFFFFFFEh
lea	eax, [esp+648h+var_5D8]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78EA71
test	ecx, ecx
jz	short loc_78EA71
mov	eax, [esp+648h+var_5D8]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78EA67
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78EA71

loc_78EA67:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78EA71:
cmp	[esp+648h+arg_C], 0
jz	short loc_78EAA5
mov	edx, [ebp+0]
mov	eax, [edx+1Ch]
mov	ecx, ebp
call	eax
lea	ecx, [esp+648h+var_570]
push	ecx
mov	ecx, ebp
mov	[esp+64Ch+var_5F8], eax
call	sub_781950
mov	byte ptr [esp+648h+var_4], 6
or	ebx, 4
jmp	short loc_78EACF

loc_78EAA5:
mov	edx, [edi]
mov	eax, [edx+1Ch]
mov	ecx, edi
call	eax
lea	edx, [esp+648h+var_4F8]
push	edx
mov	ecx, edi
mov	[esp+64Ch+var_5F8], eax
call	sub_781950
mov	[esp+648h+var_4], 7
or	ebx, 8

loc_78EACF:
push	eax
lea	ecx, [esp+64Ch+var_264]
mov	[esp+64Ch+var_634], ebx
call	sub_403400
mov	[esp+648h+var_4], 9
test	bl, 8
jz	short loc_78EB36
mov	ecx, [esp+648h+var_4D4]
and	ebx, 0FFFFFFF7h
lea	eax, [esp+648h+var_4F8]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78EB36
test	ecx, ecx
jz	short loc_78EB36
mov	eax, [esp+648h+var_4F8]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78EB2C
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78EB36

loc_78EB2C:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78EB36:
mov	byte ptr [esp+648h+var_4], 0Ah
test	bl, 4
jz	short loc_78EB89
mov	ecx, [esp+648h+var_54C]
and	ebx, 0FFFFFFFBh
lea	edx, [esp+648h+var_570]
mov	[esp+648h+var_634], ebx
cmp	ecx, edx
jz	short loc_78EB89
test	ecx, ecx
jz	short loc_78EB89
mov	eax, [esp+648h+var_570]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78EB7F
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78EB89

loc_78EB7F:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78EB89:
mov	ecx, [esp+648h+var_614]
mov	eax, [ecx+24h]
mov	ecx, [ecx+20h]
cmp	eax, ecx
jnz	short loc_78EBFA
mov	esi, [esp+648h+var_608]
mov	ecx, [esp+648h+arg_8]
mov	eax, [esp+648h+arg_4]
mov	[esi+4], ecx
mov	ecx, [esp+648h+var_240]
lea	edx, [esp+648h+var_264]
mov	[esi], eax
mov	byte ptr [esp+648h+var_4], 5
cmp	ecx, edx
jz	loc_78F428
test	ecx, ecx
jz	loc_78F428
mov	eax, [esp+648h+var_264]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	loc_78F41E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	loc_78F428

loc_78EBFA:
mov	edx, eax
mov	ebp, ecx
mov	cx, word ptr [esp+648h+var_5F0]
cmp	[edx], cx
mov	[esp+648h+var_614], eax
setz	al
mov	byte ptr [esp+648h+var_630+3], al
test	al, al
jz	short loc_78EC1C
add	edx, 2
mov	[esp+648h+var_614], edx

loc_78EC1C:
cmp	[esp+648h+arg_C], 0
jz	short loc_78EC65
mov	ecx, [esp+648h+var_624]
test	al, al
jz	short loc_78EC48
lea	edx, [esp+648h+var_598]
push	edx
call	sub_7819B0
mov	byte ptr [esp+648h+var_4], 0Bh
or	ebx, 10h
jmp	short loc_78ECA8

loc_78EC48:
lea	eax, [esp+648h+var_548]
push	eax
call	sub_781990
mov	[esp+648h+var_4], 0Ch
or	ebx, 20h
jmp	short loc_78ECA8

loc_78EC65:
test	al, al
jz	short loc_78EC88
lea	ecx, [esp+648h+var_4D0]
push	ecx
mov	ecx, edi
call	sub_7819B0
mov	[esp+648h+var_4], 0Dh
or	ebx, 40h
jmp	short loc_78ECA8

loc_78EC88:
lea	edx, [esp+648h+var_520]
push	edx
mov	ecx, edi
call	sub_781990
mov	[esp+648h+var_4], 0Eh
or	ebx, 80h

loc_78ECA8:
push	eax
lea	ecx, [esp+64Ch+var_28C]
mov	[esp+64Ch+var_634], ebx
call	sub_403400
mov	[esp+648h+var_4], 10h
test	bl, bl
jns	short loc_78ED11
mov	ecx, [esp+648h+var_4FC]
and	ebx, 0FFFFFF7Fh
lea	eax, [esp+648h+var_520]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78ED11
test	ecx, ecx
jz	short loc_78ED11
mov	eax, [esp+648h+var_520]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78ED07
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78ED11

loc_78ED07:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78ED11:
mov	byte ptr [esp+648h+var_4], 11h
test	bl, 40h
jz	short loc_78ED64
mov	ecx, [esp+648h+var_4AC]
and	ebx, 0FFFFFFBFh
lea	edx, [esp+648h+var_4D0]
mov	[esp+648h+var_634], ebx
cmp	ecx, edx
jz	short loc_78ED64
test	ecx, ecx
jz	short loc_78ED64
mov	eax, [esp+648h+var_4D0]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78ED5A
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78ED64

loc_78ED5A:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78ED64:
mov	byte ptr [esp+648h+var_4], 12h
test	bl, 20h
jz	short loc_78EDB7
mov	ecx, [esp+648h+var_524]
and	ebx, 0FFFFFFDFh
lea	eax, [esp+648h+var_548]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78EDB7
test	ecx, ecx
jz	short loc_78EDB7
mov	eax, [esp+648h+var_548]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78EDAD
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78EDB7

loc_78EDAD:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78EDB7:
mov	byte ptr [esp+648h+var_4], 13h
test	bl, 10h
jz	short loc_78EE03
mov	ecx, [esp+648h+var_574]
lea	edx, [esp+648h+var_598]
cmp	ecx, edx
jz	short loc_78EE03
test	ecx, ecx
jz	short loc_78EE03
mov	eax, [esp+648h+var_598]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78EDF9
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78EE03

loc_78EDF9:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78EE03:
cmp	[esp+648h+arg_1C], 0
jz	loc_78EE98
mov	ebx, [esp+648h+var_614]
mov	edi, ebx
cmp	ebx, ebp
jz	short loc_78EE3E
jmp	short loc_78EE20
align 10h

loc_78EE20:
movzx	eax, word ptr [edi]
mov	edx, [esi]
push	eax
mov	eax, [edx+8]
push	40h
mov	ecx, esi
call	eax
test	al, al
jz	short loc_78EE3A
add	edi, 2
cmp	edi, ebp
jnz	short loc_78EE20

loc_78EE3A:
cmp	edi, ebx
jnz	short loc_78EE96

loc_78EE3E:
mov	ecx, [esp+648h+arg_4]
mov	esi, [esp+648h+var_608]
mov	edx, [esp+648h+arg_8]
mov	[esi], ecx
lea	ecx, [esp+648h+var_28C]
mov	[esi+4], edx
mov	byte ptr [esp+648h+var_4], 0Ah
call	sub_407E50
lea	ecx, [esp+648h+var_264]
mov	byte ptr [esp+648h+var_4], 5
call	sub_407E50
lea	ecx, [esp+648h+var_2A4]
mov	byte ptr [esp+648h+var_4], 0
call	sub_407910
jmp	loc_78F46B

loc_78EE96:
mov	ebp, edi

loc_78EE98:
push	101h
lea	eax, [esp+64Ch+var_4A6]
push	eax
lea	ecx, [esp+650h+var_23C]
call	sub_788850
mov	edx, [esp+648h+var_21C]
xor	ecx, ecx
mov	[edx], cx
mov	eax, [esp+648h+var_290]
mov	byte ptr [esp+648h+var_4], 14h
cmp	eax, [esp+648h+var_294]
jz	short loc_78EF3C
mov	edx, [esp+648h+var_614]
lea	ecx, [esp+648h+var_630+2]
push	ecx
push	ebp
push	edx
lea	ecx, [esp+654h+var_23C]
call	sub_7880B0
mov	eax, [esp+648h+var_5F0]
mov	ecx, [esp+648h+var_618]
mov	edx, [esp+648h+var_604]
push	0
push	eax
push	ecx
mov	ecx, [esp+654h+var_21C]
sub	ecx, [esp+654h+var_14]
push	edx
sar	ecx, 1
sub	ecx, [esp+658h+var_5F8]
lea	eax, [esp+658h+var_2A4]
push	eax
push	ecx
lea	edx, [esp+660h+var_23C]
push	edx
call	sub_7940D0
mov	eax, [esp+664h+var_14]
mov	ebp, [esp+664h+var_21C]
add	esp, 1Ch
mov	[esp+648h+var_614], eax

loc_78EF3C:
mov	esi, [esp+648h+var_26C]
sub	esi, [esp+648h+var_268]
mov	ecx, [esp+648h+var_61C]
mov	ebx, [ecx+28h]
mov	edi, [ecx+2Ch]
mov	eax, ebp
sub	eax, [esp+648h+var_614]
sar	esi, 1
sar	eax, 1
add	esi, eax
cmp	[esp+648h+var_5F8], 0
mov	[esp+648h+var_634], eax
jz	short loc_78EF6C
inc	esi

loc_78EF6C:
mov	eax, [ecx+8]
shr	eax, 9
and	al, 1
mov	byte ptr [esp+648h+var_630+2], al
jz	short loc_78EF8C
mov	ecx, [esp+648h+var_244]
sub	ecx, [esp+648h+var_240]
sar	ecx, 1
add	esi, ecx

loc_78EF8C:
cmp	[esp+648h+arg_C], 0
jz	short loc_78EFC5
cmp	byte ptr [esp+648h+var_630+3], 0
mov	ecx, [esp+648h+var_624]
jz	short loc_78EFB3
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+648h+var_618]
push	eax
call	edx
lea	eax, [esp+648h+var_618]
jmp	short loc_78EFF2

loc_78EFB3:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+648h+var_62C]
push	edx
call	eax
lea	eax, [esp+648h+var_62C]
jmp	short loc_78EFF2

loc_78EFC5:
cmp	byte ptr [esp+648h+var_630+3], 0
mov	ecx, dword ptr [esp+648h+var_62C]
jz	short loc_78EFE2
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+648h+var_604]
push	eax
call	edx
lea	eax, [esp+648h+var_604]
jmp	short loc_78EFF2

loc_78EFE2:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+648h+var_5F0]
push	edx
call	eax
lea	eax, [esp+648h+var_5F0]

loc_78EFF2:
mov	eax, [eax]
mov	ecx, eax
shr	ecx, 8
mov	[esp+648h+var_618], eax
cmp	cl, 1
jz	short loc_78F009
shr	eax, 10h
cmp	al, 1
jnz	short loc_78F00A

loc_78F009:
inc	esi

loc_78F00A:
xor	eax, eax
xor	edx, edx
cmp	eax, edi
jg	short loc_78F026
jl	short loc_78F018
cmp	esi, ebx
jnb	short loc_78F026

loc_78F018:
sub	ebx, esi
sbb	edi, eax
mov	dword ptr [esp+648h+var_62C], ebx
mov	dword ptr [esp+648h+var_62C+4],	edi
jmp	short loc_78F02E

loc_78F026:
mov	dword ptr [esp+648h+var_62C], edx
mov	dword ptr [esp+648h+var_62C+4],	edx

loc_78F02E:
mov	eax, [esp+648h+var_61C]
mov	eax, [eax+8]
mov	ecx, dword ptr [esp+648h+var_62C]
and	eax, 7
or	ecx, dword ptr [esp+648h+var_62C+4]
mov	[esp+648h+var_61C], eax
jz	short loc_78F090
test	al, 5
jnz	short loc_78F090
mov	eax, dword ptr [esp+648h+var_62C+4]
mov	ecx, dword ptr [esp+648h+var_62C]
lea	edx, [esp+648h+arg_14]
push	edx
mov	edx, [esp+64Ch+arg_8]
push	eax
mov	eax, [esp+650h+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [esp+65Ch+var_604]
push	ecx
call	sub_781540
mov	ecx, [eax]
mov	[esp+660h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+648h+arg_8], eax
xor	edx, edx
jmp	short loc_78F09E

loc_78F090:
mov	eax, [esp+648h+arg_8]
mov	ecx, [esp+648h+arg_4]

loc_78F09E:
mov	ebx, [esp+648h+var_5F8]
mov	edi, [esp+648h+var_614]
mov	[esp+648h+var_624], edx
lea	ebx, [ebx+0]

loc_78F0B0:
mov	edx, [esp+648h+var_624]
movsx	edx, byte ptr [esp+edx+648h+var_618] ; switch 5	cases
cmp	edx, 4
ja	loc_78F290	; default
jmp	ds:off_78F4A0[edx*4] ; switch jump

loc_78F0C9:		; jumptable 0078F0C2 case 1
mov	eax, [esp+648h+var_5E8]
push	eax
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	eax, [esp+648h+arg_8]
mov	ecx, [esp+648h+arg_4]

loc_78F0E8:		; jumptable 0078F0C2 case 0
mov	edx, dword ptr [esp+648h+var_62C]
or	edx, dword ptr [esp+648h+var_62C+4]
jz	loc_78F290	; default
cmp	[esp+648h+var_61C], 4
jnz	loc_78F290	; default
lea	edx, [esp+648h+arg_14]
push	edx
mov	edx, dword ptr [esp+64Ch+var_62C+4]
push	edx
mov	edx, dword ptr [esp+650h+var_62C]
push	edx
push	eax
push	ecx
lea	eax, [esp+65Ch+var_604]
push	eax
call	sub_781540
add	esp, 18h
jmp	loc_78F27D

loc_78F127:		; jumptable 0078F0C2 case 2
cmp	byte ptr [esp+648h+var_630+2], 0
jz	loc_78F290	; default
mov	edx, [esp+648h+var_240]
push	eax
push	ecx
mov	ecx, [esp+650h+var_244]
push	ecx
push	edx
lea	eax, [esp+658h+var_5F0]
push	eax
call	sub_7851A0
jmp	loc_78F27A

loc_78F153:		; jumptable 0078F0C2 case 3
mov	edx, [esp+648h+var_26C]
cmp	[esp+648h+var_268], edx
jz	loc_78F290	; default
mov	eax, [esp+648h+var_268]
movzx	ecx, word ptr [eax]
push	ecx
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	eax, [esp+648h+arg_8]
mov	ecx, [esp+648h+arg_4]
jmp	loc_78F290	; default

loc_78F191:		; jumptable 0078F0C2 case 4
test	ebx, ebx
jnz	short loc_78F1A3
push	eax
push	ecx
push	ebp
push	edi
lea	edx, [esp+658h+var_5F8]
push	edx
jmp	loc_78F275

loc_78F1A3:
mov	esi, [esp+648h+var_634]
cmp	esi, ebx
jg	short loc_78F21F
mov	eax, [esp+648h+var_5FC]
push	eax
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	ecx, [esp+648h+var_60C]
push	ecx
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	ecx, [esp+648h+arg_8]
lea	edx, [esp+648h+var_5FC]
push	edx
mov	edx, [esp+64Ch+arg_4]
mov	eax, ebx
sub	eax, esi
push	eax
push	ecx
push	edx
lea	eax, [esp+658h+var_614]
push	eax
call	sub_781750
mov	ecx, [eax]
mov	[esp+65Ch+arg_4], ecx
mov	edx, [eax+4]
mov	[esp+65Ch+arg_8], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
push	ebp
lea	eax, [esp+668h+var_5A8]
push	edi
push	eax
call	sub_7851A0
add	esp, 28h
jmp	short loc_78F27D

loc_78F21F:
push	eax
lea	edx, [ebx+ebx]
push	ecx
mov	esi, ebp
sub	esi, edx
push	esi
lea	eax, [esp+654h+var_5A0]
push	edi
push	eax
call	sub_7851A0
mov	ecx, [eax]
mov	[esp+65Ch+arg_4], ecx
mov	edx, [eax+4]
mov	eax, [esp+65Ch+var_60C]
add	esp, 14h
push	eax
lea	ecx, [esp+64Ch+arg_4]
mov	[esp+64Ch+arg_8], edx
call	sub_7812F0
mov	ecx, [esp+648h+arg_8]
mov	edx, [esp+648h+arg_4]
push	ecx
push	edx
push	ebp
push	esi
lea	eax, [esp+658h+var_5E0]
push	eax

loc_78F275:
call	sub_7851A0

loc_78F27A:
add	esp, 14h

loc_78F27D:
mov	ecx, [eax]
mov	[esp+648h+arg_4], ecx
mov	eax, [eax+4]
mov	[esp+648h+arg_8], eax

loc_78F290:		; default
mov	edx, [esp+648h+var_624]
inc	edx
cmp	edx, 4
mov	[esp+648h+var_624], edx
jl	loc_78F0B0
mov	esi, [esp+648h+var_26C]
mov	edx, [esp+648h+var_268]
mov	edi, esi
sub	edi, edx
sar	edi, 1
cmp	edi, 1
jbe	short loc_78F2F6
push	0
lea	edi, [esp+64Ch+var_630+2]
push	edi
push	eax
push	ecx
push	esi
add	edx, 2
push	edx
lea	ecx, [esp+660h+var_5E8]
push	ecx
call	sub_781880
mov	ecx, [esp+664h+var_5E8]
mov	eax, [esp+664h+var_5E4]
mov	edx, [esp+664h+var_268]
add	esp, 1Ch
mov	[esp+648h+arg_4], ecx
mov	[esp+648h+arg_8], eax

loc_78F2F6:
mov	esi, dword ptr [esp+648h+var_62C]
mov	edi, dword ptr [esp+648h+var_62C+4]
mov	ebx, esi
or	ebx, edi
jz	short loc_78F33E
test	byte ptr [esp+648h+var_61C], 6
jnz	short loc_78F33E
lea	edx, [esp+648h+arg_14]
push	edx
push	edi
push	esi
push	eax
push	ecx
lea	eax, [esp+65Ch+var_5E0]
push	eax
call	sub_781540
mov	ecx, [eax]
mov	edx, [esp+660h+var_268]
mov	[esp+660h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+648h+arg_8], eax

loc_78F33E:
mov	esi, [esp+648h+var_608]
mov	[esi], ecx
mov	[esi+4], eax
mov	eax, [esp+648h+var_14]
lea	ecx, [esp+648h+var_23C]
mov	byte ptr [esp+648h+var_4], 13h
cmp	eax, ecx
jz	short loc_78F3A1
test	eax, eax
jz	short loc_78F3A1
mov	ecx, [esp+648h+var_23C]
sub	ecx, eax
lea	edi, [esp+648h+var_218]
sar	ecx, 1
cmp	eax, edi
jz	short loc_78F3A1
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_78F390
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F39A

loc_78F390:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_78F39A:
mov	edx, [esp+648h+var_268]

loc_78F3A1:
lea	eax, [esp+648h+var_28C]
mov	byte ptr [esp+648h+var_4], 0Ah
cmp	edx, eax
jz	short loc_78F3E1
test	edx, edx
jz	short loc_78F3E1
mov	eax, [esp+648h+var_28C]
sub	eax, edx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78F3D7
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F3E1

loc_78F3D7:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

loc_78F3E1:
mov	ecx, [esp+648h+var_240]
lea	edx, [esp+648h+var_264]
mov	byte ptr [esp+648h+var_4], 5
cmp	ecx, edx
jz	short loc_78F428
test	ecx, ecx
jz	short loc_78F428
mov	eax, [esp+648h+var_264]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78F41E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F428

loc_78F41E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F428:
mov	ecx, [esp+648h+var_290]
lea	eax, [esp+648h+var_2A4]
mov	byte ptr [esp+648h+var_4], 0
cmp	ecx, eax
jz	short loc_78F46B
test	ecx, ecx
jz	short loc_78F46B
mov	eax, [esp+648h+var_2A4]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78F461
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F46B

loc_78F461:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F46B:
lea	ecx, [esp+648h+var_620]
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+648h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+634h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 634h
retn
sub_78E850 endp

align 10h
off_78F4A0 dd offset loc_78F0E8	; jump table for switch	statement
dd offset loc_78F0C9
dd offset loc_78F127
dd offset loc_78F153
dd offset loc_78F191
align 10h



sub_78F4C0 proc	near

var_634= dword ptr -634h
var_630= dword ptr -630h
var_62C= qword ptr -62Ch
var_624= dword ptr -624h
var_620= byte ptr -620h
var_61C= dword ptr -61Ch
var_618= dword ptr -618h
var_614= dword ptr -614h
var_60C= dword ptr -60Ch
var_608= dword ptr -608h
var_604= dword ptr -604h
var_5FC= dword ptr -5FCh
var_5F8= dword ptr -5F8h
var_5F0= dword ptr -5F0h
var_5E8= dword ptr -5E8h
var_5E4= dword ptr -5E4h
var_5E0= byte ptr -5E0h
var_5D8= dword ptr -5D8h
var_5C4= dword ptr -5C4h
var_5C0= dword ptr -5C0h
var_5AC= dword ptr -5ACh
var_5A8= byte ptr -5A8h
var_5A0= byte ptr -5A0h
var_598= dword ptr -598h
var_574= dword ptr -574h
var_570= dword ptr -570h
var_54C= dword ptr -54Ch
var_548= dword ptr -548h
var_524= dword ptr -524h
var_520= dword ptr -520h
var_4FC= dword ptr -4FCh
var_4F8= dword ptr -4F8h
var_4D4= dword ptr -4D4h
var_4D0= dword ptr -4D0h
var_4AC= dword ptr -4ACh
var_4A6= byte ptr -4A6h
var_2A4= dword ptr -2A4h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	byte ptr  20h

push	0FFFFFFFFh
push	offset loc_12CA58C
mov	eax, large fs:0
push	eax
sub	esp, 628h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+634h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+648h+var_C]
mov	large fs:0, eax
mov	eax, [esp+648h+arg_0]
mov	ecx, [esp+648h+arg_10]
mov	edx, [esp+648h+arg_18]
mov	[esp+648h+var_608], eax
lea	eax, [esp+648h+var_620]
xor	esi, esi
push	eax
mov	[esp+64Ch+var_61C], ecx
mov	[esp+64Ch+var_614], edx
mov	[esp+64Ch+var_634], esi
call	sub_4325E0
push	offset unk_167EFB8
lea	ecx, [esp+64Ch+var_620]
mov	[esp+64Ch+var_4], esi
call	sub_77FFD0
push	offset unk_167EFC4
lea	ecx, [esp+64Ch+var_620]
mov	esi, eax
call	sub_77FFD0
mov	edi, eax
push	offset unk_167EFC0
lea	ecx, [esp+64Ch+var_620]
mov	dword ptr [esp+64Ch+var_62C], edi
call	sub_77FFD0
mov	edx, [esi]
mov	ebp, eax
mov	eax, [edx+28h]
push	2Dh
mov	ecx, esi
mov	[esp+64Ch+var_624], ebp
call	eax
mov	edx, [esi]
movzx	ecx, ax
mov	eax, [edx+28h]
mov	[esp+648h+var_5F0], ecx
push	2Bh
mov	ecx, esi
call	eax
mov	edx, [esi]
movzx	ecx, ax
mov	eax, [edx+28h]
mov	[esp+648h+var_618], ecx
push	20h
mov	ecx, esi
call	eax
mov	edx, [esi]
movzx	ecx, ax
mov	eax, [edx+28h]
mov	[esp+648h+var_5E8], ecx
push	30h
mov	ecx, esi
call	eax
cmp	[esp+648h+arg_C], 0
movzx	ecx, ax
mov	[esp+648h+var_5FC], ecx
mov	ebx, 2
jz	short loc_78F5FF
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
movzx	ecx, ax
mov	eax, [edx+8]
mov	[esp+648h+var_60C], ecx
mov	ecx, ebp
call	eax
movzx	ecx, ax
lea	edx, [esp+648h+var_5D8]
mov	[esp+648h+var_604], ecx
push	edx
mov	ecx, ebp
call	sub_781970
mov	byte ptr [esp+648h+var_4], 1
mov	ebx, 1
jmp	short loc_78F635

loc_78F5FF:
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax
mov	edx, [edi]
movzx	ecx, ax
mov	eax, [edx+8]
mov	[esp+648h+var_60C], ecx
mov	ecx, edi
call	eax
movzx	ecx, ax
lea	eax, [esp+648h+var_5C0]
mov	[esp+648h+var_604], ecx
push	eax
mov	ecx, edi
call	sub_781970
mov	[esp+648h+var_4], ebx

loc_78F635:
push	eax
lea	ecx, [esp+64Ch+var_2A4]
mov	[esp+64Ch+var_634], ebx
call	sub_403850
mov	[esp+648h+var_4], 4
test	bl, 2
jz	short loc_78F698
mov	ecx, [esp+648h+var_5AC]
and	ebx, 0FFFFFFFDh
lea	edx, [esp+648h+var_5C0]
mov	[esp+648h+var_634], ebx
cmp	ecx, edx
jz	short loc_78F698
test	ecx, ecx
jz	short loc_78F698
mov	eax, [esp+648h+var_5C0]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78F68E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F698

loc_78F68E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F698:
mov	byte ptr [esp+648h+var_4], 5
test	bl, 1
jz	short loc_78F6E1
mov	ecx, [esp+648h+var_5C4]
and	ebx, 0FFFFFFFEh
lea	eax, [esp+648h+var_5D8]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78F6E1
test	ecx, ecx
jz	short loc_78F6E1
mov	eax, [esp+648h+var_5D8]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_78F6D7
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F6E1

loc_78F6D7:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F6E1:
cmp	[esp+648h+arg_C], 0
jz	short loc_78F715
mov	edx, [ebp+0]
mov	eax, [edx+1Ch]
mov	ecx, ebp
call	eax
lea	ecx, [esp+648h+var_570]
push	ecx
mov	ecx, ebp
mov	[esp+64Ch+var_5F8], eax
call	sub_781950
mov	byte ptr [esp+648h+var_4], 6
or	ebx, 4
jmp	short loc_78F73F

loc_78F715:
mov	edx, [edi]
mov	eax, [edx+1Ch]
mov	ecx, edi
call	eax
lea	edx, [esp+648h+var_4F8]
push	edx
mov	ecx, edi
mov	[esp+64Ch+var_5F8], eax
call	sub_781950
mov	[esp+648h+var_4], 7
or	ebx, 8

loc_78F73F:
push	eax
lea	ecx, [esp+64Ch+var_264]
mov	[esp+64Ch+var_634], ebx
call	sub_403400
mov	[esp+648h+var_4], 9
test	bl, 8
jz	short loc_78F7A6
mov	ecx, [esp+648h+var_4D4]
and	ebx, 0FFFFFFF7h
lea	eax, [esp+648h+var_4F8]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78F7A6
test	ecx, ecx
jz	short loc_78F7A6
mov	eax, [esp+648h+var_4F8]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78F79C
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F7A6

loc_78F79C:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F7A6:
mov	byte ptr [esp+648h+var_4], 0Ah
test	bl, 4
jz	short loc_78F7F9
mov	ecx, [esp+648h+var_54C]
and	ebx, 0FFFFFFFBh
lea	edx, [esp+648h+var_570]
mov	[esp+648h+var_634], ebx
cmp	ecx, edx
jz	short loc_78F7F9
test	ecx, ecx
jz	short loc_78F7F9
mov	eax, [esp+648h+var_570]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78F7EF
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F7F9

loc_78F7EF:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F7F9:
mov	ecx, [esp+648h+var_614]
mov	eax, [ecx+228h]
mov	ecx, [ecx+20h]
cmp	eax, ecx
jnz	short loc_78F86D
mov	esi, [esp+648h+var_608]
mov	ecx, [esp+648h+arg_8]
mov	eax, [esp+648h+arg_4]
mov	[esi+4], ecx
mov	ecx, [esp+648h+var_240]
lea	edx, [esp+648h+var_264]
mov	[esi], eax
mov	byte ptr [esp+648h+var_4], 5
cmp	ecx, edx
jz	loc_790098
test	ecx, ecx
jz	loc_790098
mov	eax, [esp+648h+var_264]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	loc_79008E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	loc_790098

loc_78F86D:
mov	edx, eax
mov	ebp, ecx
mov	cx, word ptr [esp+648h+var_5F0]
cmp	[edx], cx
mov	[esp+648h+var_614], eax
setz	al
mov	byte ptr [esp+648h+var_630+3], al
test	al, al
jz	short loc_78F88F
add	edx, 2
mov	[esp+648h+var_614], edx

loc_78F88F:
cmp	[esp+648h+arg_C], 0
jz	short loc_78F8D8
mov	ecx, [esp+648h+var_624]
test	al, al
jz	short loc_78F8BB
lea	edx, [esp+648h+var_598]
push	edx
call	sub_7819B0
mov	byte ptr [esp+648h+var_4], 0Bh
or	ebx, 10h
jmp	short loc_78F91B

loc_78F8BB:
lea	eax, [esp+648h+var_548]
push	eax
call	sub_781990
mov	[esp+648h+var_4], 0Ch
or	ebx, 20h
jmp	short loc_78F91B

loc_78F8D8:
test	al, al
jz	short loc_78F8FB
lea	ecx, [esp+648h+var_4D0]
push	ecx
mov	ecx, edi
call	sub_7819B0
mov	[esp+648h+var_4], 0Dh
or	ebx, 40h
jmp	short loc_78F91B

loc_78F8FB:
lea	edx, [esp+648h+var_520]
push	edx
mov	ecx, edi
call	sub_781990
mov	[esp+648h+var_4], 0Eh
or	ebx, 80h

loc_78F91B:
push	eax
lea	ecx, [esp+64Ch+var_28C]
mov	[esp+64Ch+var_634], ebx
call	sub_403400
mov	[esp+648h+var_4], 10h
test	bl, bl
jns	short loc_78F984
mov	ecx, [esp+648h+var_4FC]
and	ebx, 0FFFFFF7Fh
lea	eax, [esp+648h+var_520]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78F984
test	ecx, ecx
jz	short loc_78F984
mov	eax, [esp+648h+var_520]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78F97A
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F984

loc_78F97A:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F984:
mov	byte ptr [esp+648h+var_4], 11h
test	bl, 40h
jz	short loc_78F9D7
mov	ecx, [esp+648h+var_4AC]
and	ebx, 0FFFFFFBFh
lea	edx, [esp+648h+var_4D0]
mov	[esp+648h+var_634], ebx
cmp	ecx, edx
jz	short loc_78F9D7
test	ecx, ecx
jz	short loc_78F9D7
mov	eax, [esp+648h+var_4D0]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78F9CD
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78F9D7

loc_78F9CD:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78F9D7:
mov	byte ptr [esp+648h+var_4], 12h
test	bl, 20h
jz	short loc_78FA2A
mov	ecx, [esp+648h+var_524]
and	ebx, 0FFFFFFDFh
lea	eax, [esp+648h+var_548]
mov	[esp+648h+var_634], ebx
cmp	ecx, eax
jz	short loc_78FA2A
test	ecx, ecx
jz	short loc_78FA2A
mov	eax, [esp+648h+var_548]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78FA20
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78FA2A

loc_78FA20:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78FA2A:
mov	byte ptr [esp+648h+var_4], 13h
test	bl, 10h
jz	short loc_78FA76
mov	ecx, [esp+648h+var_574]
lea	edx, [esp+648h+var_598]
cmp	ecx, edx
jz	short loc_78FA76
test	ecx, ecx
jz	short loc_78FA76
mov	eax, [esp+648h+var_598]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_78FA6C
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_78FA76

loc_78FA6C:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_78FA76:
cmp	[esp+648h+arg_1C], 0
jz	loc_78FB08
mov	ebx, [esp+648h+var_614]
mov	edi, ebx
cmp	ebx, ebp
jz	short loc_78FAAE
mov	edi, edi

loc_78FA90:
movzx	eax, word ptr [edi]
mov	edx, [esi]
push	eax
mov	eax, [edx+8]
push	40h
mov	ecx, esi
call	eax
test	al, al
jz	short loc_78FAAA
add	edi, 2
cmp	edi, ebp
jnz	short loc_78FA90

loc_78FAAA:
cmp	edi, ebx
jnz	short loc_78FB06

loc_78FAAE:
mov	ecx, [esp+648h+arg_4]
mov	esi, [esp+648h+var_608]
mov	edx, [esp+648h+arg_8]
mov	[esi], ecx
lea	ecx, [esp+648h+var_28C]
mov	[esi+4], edx
mov	byte ptr [esp+648h+var_4], 0Ah
call	sub_407E50
lea	ecx, [esp+648h+var_264]
mov	byte ptr [esp+648h+var_4], 5
call	sub_407E50
lea	ecx, [esp+648h+var_2A4]
mov	byte ptr [esp+648h+var_4], 0
call	sub_407910
jmp	loc_7900DB

loc_78FB06:
mov	ebp, edi

loc_78FB08:
push	101h
lea	eax, [esp+64Ch+var_4A6]
push	eax
lea	ecx, [esp+650h+var_23C]
call	sub_788850
mov	edx, [esp+648h+var_21C]
xor	ecx, ecx
mov	[edx], cx
mov	eax, [esp+648h+var_290]
mov	byte ptr [esp+648h+var_4], 14h
cmp	eax, [esp+648h+var_294]
jz	short loc_78FBAC
mov	edx, [esp+648h+var_614]
lea	ecx, [esp+648h+var_630+2]
push	ecx
push	ebp
push	edx
lea	ecx, [esp+654h+var_23C]
call	sub_7880B0
mov	eax, [esp+648h+var_5F0]
mov	ecx, [esp+648h+var_618]
mov	edx, [esp+648h+var_604]
push	0
push	eax
push	ecx
mov	ecx, [esp+654h+var_21C]
sub	ecx, [esp+654h+var_14]
push	edx
sar	ecx, 1
sub	ecx, [esp+658h+var_5F8]
lea	eax, [esp+658h+var_2A4]
push	eax
push	ecx
lea	edx, [esp+660h+var_23C]
push	edx
call	sub_7940D0
mov	eax, [esp+664h+var_14]
mov	ebp, [esp+664h+var_21C]
add	esp, 1Ch
mov	[esp+648h+var_614], eax

loc_78FBAC:
mov	esi, [esp+648h+var_26C]
sub	esi, [esp+648h+var_268]
mov	ecx, [esp+648h+var_61C]
mov	ebx, [ecx+28h]
mov	edi, [ecx+2Ch]
mov	eax, ebp
sub	eax, [esp+648h+var_614]
sar	esi, 1
sar	eax, 1
add	esi, eax
cmp	[esp+648h+var_5F8], 0
mov	[esp+648h+var_634], eax
jz	short loc_78FBDC
inc	esi

loc_78FBDC:
mov	eax, [ecx+8]
shr	eax, 9
and	al, 1
mov	byte ptr [esp+648h+var_630+2], al
jz	short loc_78FBFC
mov	ecx, [esp+648h+var_244]
sub	ecx, [esp+648h+var_240]
sar	ecx, 1
add	esi, ecx

loc_78FBFC:
cmp	[esp+648h+arg_C], 0
jz	short loc_78FC35
cmp	byte ptr [esp+648h+var_630+3], 0
mov	ecx, [esp+648h+var_624]
jz	short loc_78FC23
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+648h+var_618]
push	eax
call	edx
lea	eax, [esp+648h+var_618]
jmp	short loc_78FC62

loc_78FC23:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+648h+var_62C]
push	edx
call	eax
lea	eax, [esp+648h+var_62C]
jmp	short loc_78FC62

loc_78FC35:
cmp	byte ptr [esp+648h+var_630+3], 0
mov	ecx, dword ptr [esp+648h+var_62C]
jz	short loc_78FC52
mov	edx, [ecx]
mov	edx, [edx+24h]
lea	eax, [esp+648h+var_604]
push	eax
call	edx
lea	eax, [esp+648h+var_604]
jmp	short loc_78FC62

loc_78FC52:
mov	eax, [ecx]
mov	eax, [eax+20h]
lea	edx, [esp+648h+var_5F0]
push	edx
call	eax
lea	eax, [esp+648h+var_5F0]

loc_78FC62:
mov	eax, [eax]
mov	ecx, eax
shr	ecx, 8
mov	[esp+648h+var_618], eax
cmp	cl, 1
jz	short loc_78FC79
shr	eax, 10h
cmp	al, 1
jnz	short loc_78FC7A

loc_78FC79:
inc	esi

loc_78FC7A:
xor	eax, eax
xor	edx, edx
cmp	eax, edi
jg	short loc_78FC96
jl	short loc_78FC88
cmp	esi, ebx
jnb	short loc_78FC96

loc_78FC88:
sub	ebx, esi
sbb	edi, eax
mov	dword ptr [esp+648h+var_62C], ebx
mov	dword ptr [esp+648h+var_62C+4],	edi
jmp	short loc_78FC9E

loc_78FC96:
mov	dword ptr [esp+648h+var_62C], edx
mov	dword ptr [esp+648h+var_62C+4],	edx

loc_78FC9E:
mov	eax, [esp+648h+var_61C]
mov	eax, [eax+8]
mov	ecx, dword ptr [esp+648h+var_62C]
and	eax, 7
or	ecx, dword ptr [esp+648h+var_62C+4]
mov	[esp+648h+var_61C], eax
jz	short loc_78FD00
test	al, 5
jnz	short loc_78FD00
mov	eax, dword ptr [esp+648h+var_62C+4]
mov	ecx, dword ptr [esp+648h+var_62C]
lea	edx, [esp+648h+arg_14]
push	edx
mov	edx, [esp+64Ch+arg_8]
push	eax
mov	eax, [esp+650h+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [esp+65Ch+var_604]
push	ecx
call	sub_781540
mov	ecx, [eax]
mov	[esp+660h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+648h+arg_8], eax
xor	edx, edx
jmp	short loc_78FD0E

loc_78FD00:
mov	eax, [esp+648h+arg_8]
mov	ecx, [esp+648h+arg_4]

loc_78FD0E:
mov	ebx, [esp+648h+var_5F8]
mov	edi, [esp+648h+var_614]
mov	[esp+648h+var_624], edx
lea	ebx, [ebx+0]

loc_78FD20:
mov	edx, [esp+648h+var_624]
movsx	edx, byte ptr [esp+edx+648h+var_618] ; switch 5	cases
cmp	edx, 4
ja	loc_78FF00	; default
jmp	ds:off_790110[edx*4] ; switch jump

loc_78FD39:		; jumptable 0078FD32 case 1
mov	eax, [esp+648h+var_5E8]
push	eax
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	eax, [esp+648h+arg_8]
mov	ecx, [esp+648h+arg_4]

loc_78FD58:		; jumptable 0078FD32 case 0
mov	edx, dword ptr [esp+648h+var_62C]
or	edx, dword ptr [esp+648h+var_62C+4]
jz	loc_78FF00	; default
cmp	[esp+648h+var_61C], 4
jnz	loc_78FF00	; default
lea	edx, [esp+648h+arg_14]
push	edx
mov	edx, dword ptr [esp+64Ch+var_62C+4]
push	edx
mov	edx, dword ptr [esp+650h+var_62C]
push	edx
push	eax
push	ecx
lea	eax, [esp+65Ch+var_604]
push	eax
call	sub_781540
add	esp, 18h
jmp	loc_78FEED

loc_78FD97:		; jumptable 0078FD32 case 2
cmp	byte ptr [esp+648h+var_630+2], 0
jz	loc_78FF00	; default
mov	edx, [esp+648h+var_240]
push	eax
push	ecx
mov	ecx, [esp+650h+var_244]
push	ecx
push	edx
lea	eax, [esp+658h+var_5F0]
push	eax
call	sub_7851A0
jmp	loc_78FEEA

loc_78FDC3:		; jumptable 0078FD32 case 3
mov	edx, [esp+648h+var_26C]
cmp	[esp+648h+var_268], edx
jz	loc_78FF00	; default
mov	eax, [esp+648h+var_268]
movzx	ecx, word ptr [eax]
push	ecx
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	eax, [esp+648h+arg_8]
mov	ecx, [esp+648h+arg_4]
jmp	loc_78FF00	; default

loc_78FE01:		; jumptable 0078FD32 case 4
test	ebx, ebx
jnz	short loc_78FE13
push	eax
push	ecx
push	ebp
push	edi
lea	edx, [esp+658h+var_5F8]
push	edx
jmp	loc_78FEE5

loc_78FE13:
mov	esi, [esp+648h+var_634]
cmp	esi, ebx
jg	short loc_78FE8F
mov	eax, [esp+648h+var_5FC]
push	eax
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	ecx, [esp+648h+var_60C]
push	ecx
lea	ecx, [esp+64Ch+arg_4]
call	sub_7812F0
mov	ecx, [esp+648h+arg_8]
lea	edx, [esp+648h+var_5FC]
push	edx
mov	edx, [esp+64Ch+arg_4]
mov	eax, ebx
sub	eax, esi
push	eax
push	ecx
push	edx
lea	eax, [esp+658h+var_614]
push	eax
call	sub_781750
mov	ecx, [eax]
mov	[esp+65Ch+arg_4], ecx
mov	edx, [eax+4]
mov	[esp+65Ch+arg_8], edx
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
push	ebp
lea	eax, [esp+668h+var_5A8]
push	edi
push	eax
call	sub_7851A0
add	esp, 28h
jmp	short loc_78FEED

loc_78FE8F:
push	eax
lea	edx, [ebx+ebx]
push	ecx
mov	esi, ebp
sub	esi, edx
push	esi
lea	eax, [esp+654h+var_5A0]
push	edi
push	eax
call	sub_7851A0
mov	ecx, [eax]
mov	[esp+65Ch+arg_4], ecx
mov	edx, [eax+4]
mov	eax, [esp+65Ch+var_60C]
add	esp, 14h
push	eax
lea	ecx, [esp+64Ch+arg_4]
mov	[esp+64Ch+arg_8], edx
call	sub_7812F0
mov	ecx, [esp+648h+arg_8]
mov	edx, [esp+648h+arg_4]
push	ecx
push	edx
push	ebp
push	esi
lea	eax, [esp+658h+var_5E0]
push	eax

loc_78FEE5:
call	sub_7851A0

loc_78FEEA:
add	esp, 14h

loc_78FEED:
mov	ecx, [eax]
mov	[esp+648h+arg_4], ecx
mov	eax, [eax+4]
mov	[esp+648h+arg_8], eax

loc_78FF00:		; default
mov	edx, [esp+648h+var_624]
inc	edx
cmp	edx, 4
mov	[esp+648h+var_624], edx
jl	loc_78FD20
mov	esi, [esp+648h+var_26C]
mov	edx, [esp+648h+var_268]
mov	edi, esi
sub	edi, edx
sar	edi, 1
cmp	edi, 1
jbe	short loc_78FF66
push	0
lea	edi, [esp+64Ch+var_630+2]
push	edi
push	eax
push	ecx
push	esi
add	edx, 2
push	edx
lea	ecx, [esp+660h+var_5E8]
push	ecx
call	sub_781880
mov	ecx, [esp+664h+var_5E8]
mov	eax, [esp+664h+var_5E4]
mov	edx, [esp+664h+var_268]
add	esp, 1Ch
mov	[esp+648h+arg_4], ecx
mov	[esp+648h+arg_8], eax

loc_78FF66:
mov	esi, dword ptr [esp+648h+var_62C]
mov	edi, dword ptr [esp+648h+var_62C+4]
mov	ebx, esi
or	ebx, edi
jz	short loc_78FFAE
test	byte ptr [esp+648h+var_61C], 6
jnz	short loc_78FFAE
lea	edx, [esp+648h+arg_14]
push	edx
push	edi
push	esi
push	eax
push	ecx
lea	eax, [esp+65Ch+var_5E0]
push	eax
call	sub_781540
mov	ecx, [eax]
mov	edx, [esp+660h+var_268]
mov	[esp+660h+arg_4], ecx
mov	eax, [eax+4]
add	esp, 18h
mov	[esp+648h+arg_8], eax

loc_78FFAE:
mov	esi, [esp+648h+var_608]
mov	[esi], ecx
mov	[esi+4], eax
mov	eax, [esp+648h+var_14]
lea	ecx, [esp+648h+var_23C]
mov	byte ptr [esp+648h+var_4], 13h
cmp	eax, ecx
jz	short loc_790011
test	eax, eax
jz	short loc_790011
mov	ecx, [esp+648h+var_23C]
sub	ecx, eax
lea	edi, [esp+648h+var_218]
sar	ecx, 1
cmp	eax, edi
jz	short loc_790011
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_790000
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_79000A

loc_790000:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_79000A:
mov	edx, [esp+648h+var_268]

loc_790011:
lea	eax, [esp+648h+var_28C]
mov	byte ptr [esp+648h+var_4], 0Ah
cmp	edx, eax
jz	short loc_790051
test	edx, edx
jz	short loc_790051
mov	eax, [esp+648h+var_28C]
sub	eax, edx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_790047
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790051

loc_790047:
push	eax
push	edx
call	sub_77E0D0
add	esp, 8

loc_790051:
mov	ecx, [esp+648h+var_240]
lea	edx, [esp+648h+var_264]
mov	byte ptr [esp+648h+var_4], 5
cmp	ecx, edx
jz	short loc_790098
test	ecx, ecx
jz	short loc_790098
mov	eax, [esp+648h+var_264]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_79008E
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790098

loc_79008E:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_790098:
mov	ecx, [esp+648h+var_290]
lea	eax, [esp+648h+var_2A4]
mov	byte ptr [esp+648h+var_4], 0
cmp	ecx, eax
jz	short loc_7900DB
test	ecx, ecx
jz	short loc_7900DB
mov	eax, [esp+648h+var_2A4]
sub	eax, ecx
cmp	eax, 80h
jbe	short loc_7900D1
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_7900DB

loc_7900D1:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_7900DB:
lea	ecx, [esp+648h+var_620]
call	sub_77FF40
mov	eax, esi
mov	ecx, [esp+648h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+634h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 634h
retn
sub_78F4C0 endp

align 10h
off_790110 dd offset loc_78FD58	; jump table for switch	statement
dd offset loc_78FD39
dd offset loc_78FD97
dd offset loc_78FDC3
dd offset loc_78FE01
align 10h



sub_790130 proc	near

var_448= dword ptr -448h
var_444= byte ptr -444h
var_43E= byte ptr -43Eh
var_23C= dword ptr -23Ch
var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= qword ptr  0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

push	0FFFFFFFFh
push	offset loc_12CA5D6
mov	eax, large fs:0
push	eax
sub	esp, 43Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+448h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+45Ch+var_C]
mov	large fs:0, eax
mov	eax, [esp+45Ch+arg_4]
mov	edi, [esp+45Ch+arg_10]
mov	ebp, [esp+45Ch+arg_0]
mov	ebx, [esp+45Ch+arg_24]
lea	ecx, [esp+45Ch+var_444]
push	ecx
mov	ecx, edi
mov	[esp+460h+var_448], eax
call	sub_4325E0
push	offset unk_167EFB8
mov	ecx, eax
mov	[esp+460h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+45Ch+var_444]
mov	esi, eax
mov	[esp+45Ch+var_4], 0FFFFFFFFh
call	sub_77FF40
push	101h
lea	edx, [esp+460h+var_43E]
push	edx
lea	ecx, [esp+464h+var_23C]
call	sub_788850
mov	ecx, [esp+45Ch+var_21C]
xor	eax, eax
mov	[ecx], ax
mov	edx, [esp+45Ch+arg_18]
mov	ecx, [esp+45Ch+var_448]
push	1
push	edx
push	esi
lea	eax, [esp+468h+var_23C]
push	eax
push	ecx
mov	[esp+470h+var_4], 1
call	sub_793440
mov	eax, [ebx+14h]
mov	ecx, [ebx+10h]
add	esp, 14h
cmp	eax, ecx
jz	short loc_79025C
mov	edx, [esi]
mov	eax, [edx+28h]
push	2Dh
mov	ecx, esi
call	eax
mov	edx, [esi]
movzx	eax, ax
push	0
push	eax
mov	eax, [edx+28h]
push	2Bh
mov	ecx, esi
call	eax
mov	edx, [esp+464h+arg_1C]
movzx	ecx, ax
mov	eax, [esp+464h+arg_20]
push	ecx
push	edx
push	ebx
push	eax
lea	ecx, [esp+474h+var_23C]
push	ecx
call	sub_7940D0
add	esp, 1Ch

loc_79025C:
mov	edx, [esi]
mov	eax, [edx+28h]
push	2Dh
mov	ecx, esi
call	eax
mov	edx, [esi]
movzx	ebx, ax
mov	eax, [edx+28h]
push	2Bh
mov	ecx, esi
call	eax
mov	edx, [edi+2Ch]
mov	ecx, [edi+28h]
push	ebx
movzx	eax, ax
push	eax
mov	eax, [esp+464h+arg_14]
push	eax
mov	eax, [esp+468h+var_14]
push	edx
mov	edx, dword ptr [esp+46Ch+arg_8]
push	ecx
mov	ecx, dword ptr [esp+470h+arg_8+4]
xor	esi, esi
mov	[edi+28h], esi
mov	[edi+2Ch], esi
mov	edi, [edi+8]
push	edi
push	ecx
mov	ecx, [esp+478h+var_21C]
push	edx
sub	ecx, eax
sar	ecx, 1
lea	edx, [eax+ecx*2]
push	edx
push	eax
push	ebp
call	sub_785790
mov	eax, [esp+488h+var_14]
lea	ecx, [esp+488h+var_23C]
add	esp, 2Ch
mov	[esp+45Ch+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	short loc_79031C
cmp	eax, esi
jz	short loc_79031C
lea	edx, [esp+45Ch+var_218]
cmp	eax, edx
jz	short loc_79031C
mov	ecx, [esp+45Ch+var_23C]
sub	ecx, eax
sar	ecx, 1
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_790312
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_79031C

loc_790312:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_79031C:
mov	eax, ebp
mov	ecx, [esp+45Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+448h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 448h
retn
sub_790130 endp

align 10h



; int __cdecl sub_790350(int, int, double)
sub_790350 proc	near

var_248= qword ptr -248h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= qword ptr  0Ch

push	0FFFFFFFFh
push	offset loc_12CA626
mov	eax, large fs:0
push	eax
sub	esp, 228h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+234h+var_10], eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+240h+var_C]
mov	large fs:0, eax
mov	esi, [esp+240h+arg_0]
mov	edi, [esp+240h+arg_4]
push	101h		; size_t
lea	eax, [esp+244h+var_22D]
push	eax		; int
lea	ecx, [esp+248h+var_12C]
call	sub_7883D0
mov	ecx, [esp+240h+var_11C]
mov	byte ptr [ecx],	0
fld	[esp+240h+arg_8]
sub	esp, 8
lea	edx, [esp+248h+var_12C]
fstp	[esp+248h+var_248]
push	edx		; int
mov	[esp+24Ch+var_4], 0
call	sub_793380
add	esp, 0Ch
lea	eax, [esp+240h+var_234]
push	eax
mov	ecx, edi
call	sub_4325E0
push	offset unk_167EFB8
mov	ecx, eax
mov	byte ptr [esp+244h+var_4], 1
call	sub_77FFD0
lea	ecx, [esp+240h+var_234]
mov	edi, eax
mov	byte ptr [esp+240h+var_4], 0
call	sub_77FF40
push	0
push	0
push	edi
lea	ecx, [esp+24Ch+var_12C]
push	esi
push	ecx
call	sub_793440
mov	eax, [esp+254h+var_14]
lea	edx, [esp+254h+var_12C]
add	esp, 14h
mov	[esp+240h+var_4], 0FFFFFFFFh
cmp	eax, edx
jz	short loc_79047A
test	eax, eax
jz	short loc_79047A
mov	ecx, [esp+240h+var_12C]
lea	edx, [esp+240h+var_118]
sub	ecx, eax
cmp	eax, edx
jz	short loc_79047A
cmp	ecx, 80h
jbe	short loc_790470
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_79047A

loc_790470:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_79047A:
mov	ecx, [esp+240h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
mov	ecx, [esp+234h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn
sub_790350 endp




sub_7904A0 proc	near
test	byte ptr dword_1858098,	1
push	esi
mov	esi, ecx
jnz	short loc_7904BD
or	dword_1858098, 1
mov	dword_1858094, 0

loc_7904BD:		; lpAddend
push	offset dword_1858094
call	ds:InterlockedIncrement
cmp	eax, 1
jnz	short loc_7904D7
call	__cfltcvt_init
call	sub_789AA0

loc_7904D7:
mov	eax, esi
pop	esi
retn
sub_7904A0 endp

align 10h



sub_7904E0 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12CA66E
mov	eax, large fs:0
push	eax
push	ebx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	ebx, 1
test	byte ptr dword_18580D0,	bl
jnz	short loc_790553
or	dword_18580D0, ebx
xor	eax, eax
mov	[esp+14h+var_4], eax
test	byte ptr dword_1858098,	bl
jnz	short loc_79052D
or	dword_1858098, ebx
mov	dword_1858094, eax

loc_79052D:		; lpAddend
push	offset dword_1858094
call	ds:InterlockedIncrement
cmp	eax, ebx
jnz	short loc_790546
call	__cfltcvt_init
call	sub_789AA0

loc_790546:		; void (__cdecl	*)()
push	offset sub_1419940
call	_atexit
add	esp, 4

loc_790553:
mov	eax, dword_1858074
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebx
add	esp, 0Ch
retn
sub_7904E0 endp

align 10h



; int __stdcall	sub_790570(int,	int, int, int, int, double)
sub_790570 proc	near

var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

fld	[esp+arg_14]
mov	eax, [esp+arg_10]
mov	ecx, [esp+arg_C]
mov	edx, dword ptr [esp+arg_4+4]
push	esi
mov	esi, [esp+4+arg_0]
sub	esp, 8
fstp	[esp+0Ch+var_C]
push	eax		; int
mov	eax, dword ptr [esp+10h+arg_4]
push	ecx		; int
push	edx		; int
push	eax		; int
push	esi		; int
call	sub_78B950
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_790570 endp

align 10h



; int __stdcall	sub_7905B0(int,	int, int, int, int, double)
sub_7905B0 proc	near

var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

fld	[esp+arg_14]
mov	eax, [esp+arg_10]
mov	ecx, [esp+arg_C]
mov	edx, dword ptr [esp+arg_4+4]
push	esi
mov	esi, [esp+4+arg_0]
sub	esp, 8
fstp	[esp+0Ch+var_C]
push	eax		; int
mov	eax, dword ptr [esp+10h+arg_4]
push	ecx		; int
push	edx		; int
push	eax		; int
push	esi		; int
call	sub_78BB50
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_7905B0 endp

align 10h



sub_7905F0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_78BD50
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_7905F0 endp

align 10h



sub_790620 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_78BF10
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_790620 endp

align 10h



sub_790650 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_78C0D0
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_790650 endp

align 10h



sub_790680 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

mov	eax, [esp+arg_1C]
mov	ecx, [esp+arg_18]
mov	edx, [esp+arg_14]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	eax
push	ecx
push	edx
lea	eax, [esp+14h+arg_C]
push	eax
lea	ecx, [esp+18h+arg_4]
push	ecx
push	esi
call	sub_78C290
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	20h
sub_790680 endp

align 10h



sub_7906B0 proc	near

var_445= byte ptr -445h
var_444= byte ptr -444h
var_43E= byte ptr -43Eh
var_23C= dword ptr -23Ch
var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h

push	0FFFFFFFFh
push	offset loc_12CA5D6
mov	eax, large fs:0
push	eax
sub	esp, 43Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+448h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+45Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+45Ch+arg_0]
mov	ebx, [esp+45Ch+arg_14]
lea	eax, [esp+45Ch+var_444]
mov	edi, ecx
mov	ecx, [esp+45Ch+arg_C]
push	eax
call	sub_4325E0
push	offset unk_167EFB8
mov	ecx, eax
mov	[esp+460h+var_4], 0
call	sub_77FFD0
lea	ecx, [esp+45Ch+var_444]
mov	ebp, eax
mov	[esp+45Ch+var_4], 0FFFFFFFFh
call	sub_77FF40
push	101h
lea	ecx, [esp+460h+var_43E]
push	ecx
lea	ecx, [esp+464h+var_23C]
call	sub_788850
mov	eax, [esp+45Ch+var_21C]
xor	edx, edx
mov	[eax], dx
mov	ecx, [esp+45Ch+arg_1C]
mov	edx, [esp+45Ch+arg_18]
push	ebx
add	edi, 8
push	edi
push	ecx
push	edx
lea	eax, [esp+46Ch+var_23C]
push	ebp
push	eax
mov	[esp+474h+var_4], 1
call	sub_7952A0
mov	edx, [esp+474h+arg_8]
mov	eax, [esp+474h+arg_4]
push	0
lea	ecx, [esp+478h+var_445]
push	ecx
mov	ecx, [esp+47Ch+var_21C]
push	edx
mov	edx, [esp+480h+var_14]
push	eax
push	ecx
push	edx
push	esi
call	sub_781880
mov	eax, [esp+490h+var_14]
lea	ecx, [esp+490h+var_23C]
add	esp, 34h
mov	[esp+45Ch+var_4], 0FFFFFFFFh
cmp	eax, ecx
jz	short loc_79080F
test	eax, eax
jz	short loc_79080F
lea	edx, [esp+45Ch+var_218]
cmp	eax, edx
jz	short loc_79080F
mov	ecx, [esp+45Ch+var_23C]
sub	ecx, eax
sar	ecx, 1
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_790805
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_79080F

loc_790805:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_79080F:
mov	eax, esi
mov	ecx, [esp+45Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+448h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 448h
retn	20h
sub_7906B0 endp

align 10h



sub_790840 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_18]
mov	ecx, [esp+arg_14]
mov	edx, [esp+arg_10]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	1
push	eax
mov	eax, [esp+10h+arg_C]
push	ecx
mov	ecx, [esp+14h+arg_8]
push	edx
mov	edx, [esp+18h+arg_4]
push	eax
push	ecx
push	edx
push	esi
call	sub_78C450
add	esp, 24h
mov	eax, esi
pop	esi
retn	1Ch
sub_790840 endp

align 10h



; int __stdcall	sub_790880(int,	int, int, int, int, int, double)
sub_790880 proc	near

var_244= qword ptr -244h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	qword ptr  1Ch

push	0FFFFFFFFh
push	offset loc_12CA69B
mov	eax, large fs:0
push	eax
sub	esp, 224h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+230h+var_10], eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+23Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+23Ch+arg_0]
mov	edi, [esp+23Ch+arg_10]
push	101h		; size_t
lea	eax, [esp+240h+var_22D]
push	eax		; int
lea	ecx, [esp+244h+var_12C]
call	sub_7883D0
mov	ecx, [esp+23Ch+var_11C]
mov	byte ptr [ecx],	0
fld	[esp+23Ch+arg_18]
sub	esp, 8
lea	edx, [esp+244h+var_12C]
fstp	[esp+244h+var_244]
push	edx		; int
mov	[esp+248h+var_4], 0
call	sub_793380
mov	ecx, [esp+248h+arg_14]
mov	edx, [esp+248h+arg_C]
push	0
push	0
lea	eax, [esp+250h+var_12C]
push	eax
mov	eax, [esp+254h+arg_8]
push	ecx
mov	ecx, [esp+258h+arg_4]
push	edi
push	edx
push	eax
push	ecx
push	esi
call	sub_78D080
mov	eax, [esp+26Ch+var_14]
lea	edx, [esp+26Ch+var_12C]
add	esp, 30h
mov	[esp+23Ch+var_4], 0FFFFFFFFh
cmp	eax, edx
jz	short loc_790994
test	eax, eax
jz	short loc_790994
mov	ecx, [esp+23Ch+var_12C]
lea	edx, [esp+23Ch+var_118]
sub	ecx, eax
cmp	eax, edx
jz	short loc_790994
cmp	ecx, 80h
jbe	short loc_79098A
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790994

loc_79098A:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_790994:
mov	eax, esi
mov	ecx, [esp+23Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
mov	ecx, [esp+230h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 230h
retn	20h
sub_790880 endp

align 10h



sub_7909C0 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	ecx
mov	ecx, [esp+4+arg_20]
mov	edx, [esp+4+arg_1C]
push	esi
mov	esi, [esp+8+arg_0]
push	0
lea	eax, [esp+0Ch+var_1]
push	eax
mov	eax, [esp+10h+arg_18]
push	ecx
mov	ecx, [esp+14h+arg_14]
push	edx
mov	edx, [esp+18h+arg_10]
push	eax
mov	eax, [esp+1Ch+arg_C]
push	ecx
mov	ecx, [esp+20h+arg_8]
push	edx
mov	edx, [esp+24h+arg_4]
push	eax
push	ecx
push	edx
push	esi
mov	[esp+34h+var_1], 1
call	sub_78DCB0
add	esp, 2Ch
mov	eax, esi
pop	esi
pop	ecx
retn	24h
sub_7909C0 endp

align 10h



sub_790A10 proc	near

var_45=	byte ptr -45h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_38=	dword ptr -38h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

push	0FFFFFFFFh
push	offset loc_12CA6D8
mov	eax, large fs:0
push	eax
sub	esp, 3Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+48h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+5Ch+var_C]
mov	large fs:0, eax
mov	edi, [esp+5Ch+arg_0]
mov	eax, [esp+5Ch+arg_18]
mov	esi, [esp+5Ch+arg_1C]
mov	ebp, [esp+5Ch+arg_20]
lea	ecx, [esp+5Ch+var_38]
mov	edx, ecx
mov	[esp+5Ch+var_18], ecx
xor	ecx, ecx
mov	[esp+5Ch+var_14], edx
mov	word ptr [esp+5Ch+var_38], cx
push	ecx
mov	[esp+60h+var_4], ecx
lea	edx, [esp+60h+var_45]
push	edx
mov	edx, [esp+64h+arg_14]
lea	ecx, [esp+64h+var_38]
push	ecx
mov	ecx, [esp+68h+arg_C]
push	esi
push	eax
mov	eax, [esp+70h+arg_10]
push	edx
mov	edx, [esp+74h+arg_8]
push	eax
mov	eax, [esp+78h+arg_4]
push	ecx
push	edx
push	eax
lea	ecx, [esp+84h+var_40]
push	ecx
mov	[esp+88h+var_45], 1
call	sub_78DCB0
mov	edx, [eax]
mov	esi, [esi]
mov	[esp+88h+arg_4], edx
mov	eax, [eax+4]
add	esp, 2Ch
mov	[esp+5Ch+arg_8], eax
test	esi, esi
jz	short loc_790ACA
cmp	esi, 2
jnz	short loc_790B0A

loc_790ACA:
mov	bl, [esp+5Ch+var_45]
mov	eax, [esp+5Ch+var_14]
mov	ecx, [esp+5Ch+var_18]
mov	[esp+5Ch+var_44], eax
mov	[esp+5Ch+var_40], ecx
test	bl, bl
jnz	short loc_790AE9
add	eax, 2
mov	[esp+5Ch+var_44], eax

loc_790AE9:
push	0
push	ebp
lea	edx, [esp+64h+var_40]
push	edx
lea	eax, [esp+68h+var_44]
push	eax
call	sub_787310
add	esp, 10h
test	bl, bl
jnz	short loc_790B0A
fld	qword ptr [ebp+0]
fchs
fstp	qword ptr [ebp+0]

loc_790B0A:
mov	ecx, [esp+5Ch+arg_4]
mov	edx, [esp+5Ch+arg_8]
mov	[edi], ecx
mov	ecx, [esp+5Ch+var_14]
lea	eax, [esp+5Ch+var_38]
mov	[edi+4], edx
mov	[esp+5Ch+var_4], 0FFFFFFFFh
cmp	ecx, eax
jz	short loc_790B55
test	ecx, ecx
jz	short loc_790B55
mov	eax, [esp+5Ch+var_38]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_790B4B
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790B55

loc_790B4B:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_790B55:
mov	eax, edi
mov	ecx, [esp+5Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+48h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn	24h
sub_790A10 endp

align 10h



sub_790B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_18]
mov	ecx, [esp+arg_14]
mov	edx, [esp+arg_10]
push	esi
mov	esi, [esp+4+arg_0]
push	0
push	1
push	eax
mov	eax, [esp+10h+arg_C]
push	ecx
mov	ecx, [esp+14h+arg_8]
push	edx
mov	edx, [esp+18h+arg_4]
push	eax
push	ecx
push	edx
push	esi
call	sub_78E850
add	esp, 24h
mov	eax, esi
pop	esi
retn	1Ch
sub_790B80 endp

align 10h



; int __cdecl sub_790BC0(int, int, int,	int, int, double)
sub_790BC0 proc	near

var_270= qword ptr -270h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA721
mov	eax, large fs:0
push	eax
sub	esp, 248h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+254h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+268h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+268h+arg_0]
mov	esi, [esp+268h+arg_C]
push	101h		; size_t
lea	eax, [esp+26Ch+var_22D]
push	eax		; int
lea	ecx, [esp+270h+var_12C]
call	sub_7883D0
mov	ecx, [esp+268h+var_11C]
mov	byte ptr [ecx],	0
fld	[esp+268h+arg_14]
mov	eax, [esi+20h]
mov	ecx, [esi+8]
mov	edx, [esi+24h]
sub	esp, 8
fstp	[esp+270h+var_270]
push	eax		; int
push	ecx		; int
lea	eax, [esp+278h+var_12C]
push	eax		; int
mov	[esp+27Ch+var_4], 0
mov	[esp+27Ch+var_24C], edx
call	sub_7939D0
add	esp, 14h
lea	ecx, [esp+268h+var_254]
push	ecx
mov	ecx, esi
mov	ebx, eax
call	sub_4325E0
push	offset unk_167EFC8
mov	ecx, eax
mov	byte ptr [esp+26Ch+var_4], 1
call	sub_77FFD0
lea	ecx, [esp+268h+var_254]
mov	edi, eax
mov	byte ptr [esp+268h+var_4], 0
call	sub_77FF40
lea	edx, [esp+268h+var_248]
push	edx
mov	ecx, edi
call	sub_781970
mov	[esp+268h+var_250], eax
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
mov	byte ptr [esp+268h+var_4], 2
call	edx
mov	ecx, [esp+268h+var_250]
mov	edx, [edi]
push	ecx
movzx	eax, ax
push	ebx
push	eax
mov	eax, [edx+4]
mov	ecx, edi
call	eax
mov	edx, [esp+274h+arg_10]
movzx	ecx, ax
mov	eax, dword ptr [esp+274h+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+278h+arg_4]
push	edx
push	esi
push	eax
push	ecx
lea	edx, [esp+288h+var_12C]
push	edx
push	ebp
call	sub_790130
mov	eax, [esp+290h+var_234]
lea	ecx, [esp+290h+var_248]
add	esp, 28h
mov	byte ptr [esp+268h+var_4], 0
cmp	eax, ecx
jz	short loc_790D32
test	eax, eax
jz	short loc_790D32
mov	ecx, [esp+268h+var_248]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_790D28
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790D32

loc_790D28:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_790D32:
mov	ecx, [esp+268h+var_14]
lea	edx, [esp+268h+var_12C]
mov	[esp+268h+var_4], 0FFFFFFFFh
cmp	ecx, edx
jz	short loc_790D83
test	ecx, ecx
jz	short loc_790D83
mov	eax, [esp+268h+var_12C]
lea	edx, [esp+268h+var_118]
sub	eax, ecx
cmp	ecx, edx
jz	short loc_790D83
cmp	eax, 80h
jbe	short loc_790D79
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790D83

loc_790D79:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_790D83:
mov	eax, ebp
mov	ecx, [esp+268h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+254h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 254h
retn
sub_790BC0 endp

align 10h



; int __cdecl sub_790DB0(int, int, int,	int, int, double)
sub_790DB0 proc	near

var_270= qword ptr -270h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_234= dword ptr -234h
var_22D= dword ptr -22Dh
var_12C= dword ptr -12Ch
var_11C= dword ptr -11Ch
var_118= byte ptr -118h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

push	0FFFFFFFFh
push	offset loc_12CA721
mov	eax, large fs:0
push	eax
sub	esp, 248h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+254h+var_10], eax
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+268h+var_C]
mov	large fs:0, eax
mov	ebp, [esp+268h+arg_0]
mov	esi, [esp+268h+arg_C]
push	101h		; size_t
lea	eax, [esp+26Ch+var_22D]
push	eax		; int
lea	ecx, [esp+270h+var_12C]
call	sub_7883D0
mov	ecx, [esp+268h+var_11C]
mov	byte ptr [ecx],	0
fld	[esp+268h+arg_14]
mov	eax, [esi+20h]
mov	ecx, [esi+8]
mov	edx, [esi+24h]
sub	esp, 8
fstp	[esp+270h+var_270]
push	eax		; int
push	ecx		; int
lea	eax, [esp+278h+var_12C]
push	eax		; int
mov	[esp+27Ch+var_4], 0
mov	[esp+27Ch+var_24C], edx
call	sub_7939A0
add	esp, 14h
lea	ecx, [esp+268h+var_254]
push	ecx
mov	ecx, esi
mov	ebx, eax
call	sub_4325E0
push	offset unk_167EFC8
mov	ecx, eax
mov	byte ptr [esp+26Ch+var_4], 1
call	sub_77FFD0
lea	ecx, [esp+268h+var_254]
mov	edi, eax
mov	byte ptr [esp+268h+var_4], 0
call	sub_77FF40
lea	edx, [esp+268h+var_248]
push	edx
mov	ecx, edi
call	sub_781970
mov	[esp+268h+var_250], eax
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
mov	byte ptr [esp+268h+var_4], 2
call	edx
mov	ecx, [esp+268h+var_250]
mov	edx, [edi]
push	ecx
movzx	eax, ax
push	ebx
push	eax
mov	eax, [edx+4]
mov	ecx, edi
call	eax
mov	edx, [esp+274h+arg_10]
movzx	ecx, ax
mov	eax, dword ptr [esp+274h+arg_4+4]
push	ecx
mov	ecx, dword ptr [esp+278h+arg_4]
push	edx
push	esi
push	eax
push	ecx
lea	edx, [esp+288h+var_12C]
push	edx
push	ebp
call	sub_790130
mov	eax, [esp+290h+var_234]
lea	ecx, [esp+290h+var_248]
add	esp, 28h
mov	byte ptr [esp+268h+var_4], 0
cmp	eax, ecx
jz	short loc_790F22
test	eax, eax
jz	short loc_790F22
mov	ecx, [esp+268h+var_248]
sub	ecx, eax
cmp	ecx, 80h
jbe	short loc_790F18
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790F22

loc_790F18:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_790F22:
mov	ecx, [esp+268h+var_14]
lea	edx, [esp+268h+var_12C]
mov	[esp+268h+var_4], 0FFFFFFFFh
cmp	ecx, edx
jz	short loc_790F73
test	ecx, ecx
jz	short loc_790F73
mov	eax, [esp+268h+var_12C]
lea	edx, [esp+268h+var_118]
sub	eax, ecx
cmp	ecx, edx
jz	short loc_790F73
cmp	eax, 80h
jbe	short loc_790F69
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_790F73

loc_790F69:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_790F73:
mov	eax, ebp
mov	ecx, [esp+268h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+254h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 254h
retn
sub_790DB0 endp

align 10h



; int __stdcall	sub_790FA0(int,	int, int, int, int, double)
sub_790FA0 proc	near

var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

fld	[esp+arg_14]
mov	eax, [esp+arg_10]
mov	ecx, [esp+arg_C]
mov	edx, dword ptr [esp+arg_4+4]
push	esi
mov	esi, [esp+4+arg_0]
sub	esp, 8
fstp	[esp+0Ch+var_C]
push	eax		; int
mov	eax, dword ptr [esp+10h+arg_4]
push	ecx		; int
push	edx		; int
push	eax		; int
push	esi		; int
call	sub_790BC0
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_790FA0 endp

align 10h



; int __stdcall	sub_790FE0(int,	int, int, int, int, double)
sub_790FE0 proc	near

var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= qword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	qword ptr  18h

fld	[esp+arg_14]
mov	eax, [esp+arg_10]
mov	ecx, [esp+arg_C]
mov	edx, dword ptr [esp+arg_4+4]
push	esi
mov	esi, [esp+4+arg_0]
sub	esp, 8
fstp	[esp+0Ch+var_C]
push	eax		; int
mov	eax, dword ptr [esp+10h+arg_4]
push	ecx		; int
push	edx		; int
push	eax		; int
push	esi		; int
call	sub_790DB0
add	esp, 1Ch
mov	eax, esi
pop	esi
retn	1Ch
sub_790FE0 endp

align 10h



; int __stdcall	sub_791020(int,	int, int, int, int, int, double)
sub_791020 proc	near

var_454= qword ptr -454h
var_43E= byte ptr -43Eh
var_23C= dword ptr -23Ch
var_21C= dword ptr -21Ch
var_218= byte ptr -218h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	qword ptr  1Ch

push	0FFFFFFFFh
push	offset loc_12CA75B
mov	eax, large fs:0
push	eax
sub	esp, 434h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+440h+var_10], eax
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+44Ch+var_C]
mov	large fs:0, eax
mov	esi, [esp+44Ch+arg_0]
mov	edi, [esp+44Ch+arg_10]
push	101h
lea	eax, [esp+450h+var_43E]
push	eax
lea	ecx, [esp+454h+var_23C]
call	sub_788850
mov	edx, [esp+44Ch+var_21C]
xor	ecx, ecx
mov	[edx], cx
fld	[esp+44Ch+arg_18]
sub	esp, 8
fstp	[esp+454h+var_454]
lea	eax, [esp+454h+var_23C]
push	edi		; int
push	eax		; int
mov	[esp+45Ch+var_4], ecx
call	sub_790350
mov	edx, [esp+45Ch+arg_14]
mov	eax, [esp+45Ch+arg_C]
push	0
push	0
lea	ecx, [esp+464h+var_23C]
push	ecx
mov	ecx, [esp+468h+arg_8]
push	edx
mov	edx, [esp+46Ch+arg_4]
push	edi
push	eax
push	ecx
push	edx
push	esi
call	sub_78F4C0
mov	ecx, [esp+480h+var_14]
lea	eax, [esp+480h+var_23C]
add	esp, 34h
mov	[esp+44Ch+var_4], 0FFFFFFFFh
cmp	ecx, eax
jz	short loc_791136
test	ecx, ecx
jz	short loc_791136
lea	edx, [esp+44Ch+var_218]
cmp	ecx, edx
jz	short loc_791136
mov	eax, [esp+44Ch+var_23C]
sub	eax, ecx
sar	eax, 1
add	eax, eax
cmp	eax, 80h
jbe	short loc_79112C
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_791136

loc_79112C:
push	eax
push	ecx
call	sub_77E0D0
add	esp, 8

loc_791136:
mov	eax, esi
mov	ecx, [esp+44Ch+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
mov	ecx, [esp+440h+var_10]
xor	ecx, esp
call	sub_7999A3
add	esp, 440h
retn	20h
sub_791020 endp




; int __thiscall sub_791160(void *, char)
sub_791160 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_796020
test	[esp+4+arg_0], 1
jz	short loc_791178
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_791178:
mov	eax, esi
pop	esi
retn	4
sub_791160 endp

align 10h



; int __thiscall sub_791180(void *, char)
sub_791180 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_796220
test	[esp+4+arg_0], 1
jz	short loc_791198
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_791198:
mov	eax, esi
pop	esi
retn	4
sub_791180 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_12CA79B

loc_7911A0:
mov	ecx, [ecx]
test	ecx, ecx
jz	short locret_7911AE
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

locret_7911AE:
retn
; END OF FUNCTION CHUNK	FOR sub_12CA79B
align 10h



sub_7911B0 proc	near
mov	eax, dword_1858280
mov	ecx, [eax+4]
push	ebx
add	ecx, offset dword_1858280
mov	eax, [ecx+0Ch]
push	esi
xor	esi, esi
mov	[ecx+18h], esi
lea	ebx, [esi+1]
cmp	[ecx+58h], esi
jnz	short loc_7911D2
or	eax, ebx

loc_7911D2:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_7911DE
call	sub_77F030

loc_7911DE:
mov	eax, dword_1858218
mov	ecx, [eax+4]
add	ecx, offset dword_1858218
mov	eax, [ecx+0Ch]
mov	[ecx+18h], esi
cmp	[ecx+58h], esi
jnz	short loc_7911F9
or	eax, ebx

loc_7911F9:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_791205
call	sub_77F030

loc_791205:
mov	eax, dword_18581B0
mov	ecx, [eax+4]
add	ecx, offset dword_18581B0
mov	eax, [ecx+0Ch]
mov	[ecx+18h], esi
cmp	[ecx+58h], esi
jnz	short loc_791220
or	eax, ebx

loc_791220:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_79122C
call	sub_77F030

loc_79122C:
mov	eax, dword_18583C8
mov	ecx, [eax+4]
add	ecx, offset dword_18583C8
mov	eax, [ecx+0Ch]
mov	[ecx+18h], esi
cmp	[ecx+58h], esi
jnz	short loc_791247
or	eax, ebx

loc_791247:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_791253
call	sub_77F030

loc_791253:
mov	eax, dword_1858280
mov	eax, [eax+4]
add	eax, offset dword_1858280
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_791275
mov	ecx, eax
call	sub_77F030

loc_791275:
cmp	ecx, esi
jz	short loc_791280
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_791280:
mov	ecx, dword_1858218
mov	eax, [ecx+4]
add	eax, offset dword_1858218
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_7912A3
mov	ecx, eax
call	sub_77F030

loc_7912A3:
cmp	ecx, esi
jz	short loc_7912AE
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_7912AE:
mov	ecx, dword_18581B0
mov	eax, [ecx+4]
add	eax, offset dword_18581B0
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_7912D1
mov	ecx, eax
call	sub_77F030

loc_7912D1:
cmp	ecx, esi
jz	short loc_7912DC
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_7912DC:
mov	ecx, dword_18583C8
mov	eax, [ecx+4]
add	eax, offset dword_18583C8
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_7912FF
mov	ecx, eax
call	sub_77F030

loc_7912FF:
cmp	ecx, esi
jz	short loc_79130A
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_79130A:
mov	ecx, dword_1858280
mov	eax, [ecx+4]
mov	edx, dword_1858280[eax]
lea	ecx, dword_1858280[eax]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, dword_1858218
mov	eax, [ecx+4]
mov	edx, dword_1858218[eax]
lea	ecx, dword_1858218[eax]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, dword_18581B0
mov	eax, [ecx+4]
mov	edx, dword_18581B0[eax]
lea	ecx, dword_18581B0[eax]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, dword_18583C8
mov	eax, [ecx+4]
mov	edx, dword_18583C8[eax]
lea	ecx, dword_18583C8[eax]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, dword_18582F0
mov	ecx, [ecx+4]
add	ecx, offset dword_18582F0
mov	eax, [ecx+0Ch]
mov	[ecx+18h], esi
cmp	[ecx+58h], esi
jnz	short loc_79138E
or	eax, ebx

loc_79138E:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_79139A
call	sub_77F030

loc_79139A:
mov	eax, dword_1858148
mov	ecx, [eax+4]
add	ecx, offset dword_1858148
mov	eax, [ecx+0Ch]
mov	[ecx+18h], esi
cmp	[ecx+58h], esi
jnz	short loc_7913B5
or	eax, ebx

loc_7913B5:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_7913C1
call	sub_77F030

loc_7913C1:
mov	eax, dword_1858360
mov	ecx, [eax+4]
add	ecx, offset dword_1858360
mov	eax, [ecx+0Ch]
mov	[ecx+18h], esi
cmp	[ecx+58h], esi
jnz	short loc_7913DC
or	eax, ebx

loc_7913DC:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_7913E8
call	sub_77F030

loc_7913E8:
mov	eax, dword_18580E0
mov	ecx, [eax+4]
add	ecx, offset dword_18580E0
mov	eax, [ecx+0Ch]
mov	[ecx+18h], esi
cmp	[ecx+58h], esi
jnz	short loc_791403
or	eax, ebx

loc_791403:
xor	dl, dl
mov	[ecx+0Ch], eax
jz	short loc_79140F
call	sub_77F030

loc_79140F:
mov	eax, dword_18582F0
mov	eax, [eax+4]
add	eax, offset dword_18582F0
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_791431
mov	ecx, eax
call	sub_77F030

loc_791431:
cmp	ecx, esi
jz	short loc_79143C
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_79143C:
mov	ecx, dword_1858148
mov	eax, [ecx+4]
add	eax, offset dword_1858148
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_79145F
mov	ecx, eax
call	sub_77F030

loc_79145F:
cmp	ecx, esi
jz	short loc_79146A
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_79146A:
mov	ecx, dword_1858360
mov	eax, [ecx+4]
add	eax, offset dword_1858360
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_79148D
mov	ecx, eax
call	sub_77F030

loc_79148D:
cmp	ecx, esi
jz	short loc_791498
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_791498:
mov	ecx, dword_18580E0
mov	eax, [ecx+4]
add	eax, offset dword_18580E0
mov	ecx, [eax+58h]
mov	[eax+58h], esi
mov	[eax+0Ch], ebx
test	[eax+18h], bl
jz	short loc_7914BB
mov	ecx, eax
call	sub_77F030

loc_7914BB:
cmp	ecx, esi
jz	short loc_7914C6
mov	edx, [ecx]
mov	eax, [edx]
push	ebx
call	eax

loc_7914C6:
mov	ecx, dword_18582F0
mov	eax, [ecx+4]
mov	edx, dword_18582F0[eax]
lea	ecx, dword_18582F0[eax]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, dword_1858148
mov	eax, [ecx+4]
mov	edx, dword_1858148[eax]
lea	ecx, dword_1858148[eax]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, dword_1858360
mov	eax, [ecx+4]
mov	edx, dword_1858360[eax]
lea	ecx, dword_1858360[eax]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, dword_18580E0
mov	eax, [ecx+4]
mov	edx, dword_18580E0[eax]
lea	ecx, dword_18580E0[eax]
mov	eax, [edx]
push	esi
call	eax
pop	esi
pop	ebx
retn
sub_7911B0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1419910

loc_791540:
sub	dword_18580D8, 1
jnz	short locret_791553
call	sub_7911B0
jmp	loc_791B60

locret_791553:
retn
; END OF FUNCTION CHUNK	FOR sub_1419910
align 10h



sub_791560 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12CA7A3
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
push	90h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_4], 0
test	eax, eax
jz	short loc_7915AA
mov	ecx, eax
call	sub_403330
mov	esi, eax
jmp	short loc_7915AC

loc_7915AA:
xor	esi, esi

loc_7915AC:
mov	[esp+18h+var_10], esi
mov	ecx, [esp+18h+arg_4]
mov	eax, [esp+18h+arg_0]
mov	eax, [eax+10h]
push	ecx
push	eax
lea	ecx, [esi+20h]
mov	[esp+20h+var_4], 1
call	sub_77F520
cmp	byte ptr [esi+28h], 0
jz	short loc_7915E6
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn

loc_7915E6:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	eax
xor	eax, eax
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_791560 endp

align 10h



sub_791610 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12CA7A3
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
push	88h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_4], 0
test	eax, eax
jz	short loc_79165A
mov	ecx, eax
call	sub_43C000
mov	esi, eax
jmp	short loc_79165C

loc_79165A:
xor	esi, esi

loc_79165C:
mov	[esp+18h+var_10], esi
mov	ecx, [esp+18h+arg_4]
mov	eax, [esp+18h+arg_0]
mov	eax, [eax+10h]
push	ecx
push	eax
lea	ecx, [esi+20h]
mov	[esp+20h+var_4], 1
call	sub_77F520
cmp	byte ptr [esi+28h], 0
jz	short loc_791696
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn

loc_791696:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
mov	[esp+1Ch+var_4], 0FFFFFFFFh
call	eax
xor	eax, eax
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_791610 endp

align 10h



sub_7916C0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12CA8E8
mov	eax, large fs:0
push	eax
sub	esp, 24h
push	ebx
push	ebp
push	esi
push	edi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+44h+var_C]
mov	large fs:0, eax
xor	ebx, ebx
mov	[esp+44h+var_30], ebx
mov	[esp+44h+var_4], ebx
mov	[esp+44h+var_24], ebx
mov	[esp+44h+var_20], ebx
mov	[esp+44h+var_2C], ebx
mov	byte ptr [esp+44h+var_4], 3
cmp	byte_167F6C4, bl
jz	short loc_79174E
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_14], esi
mov	byte ptr [esp+44h+var_4], 4
cmp	esi, ebx
jz	short loc_791741
call	sub_7A1F02
push	eax
mov	ecx, esi
call	sub_795F40
mov	dword ptr [esi], offset	off_144661C
mov	byte ptr [esp+44h+var_4], 3
mov	[esp+44h+var_30], esi
jmp	short loc_791762

loc_791741:
xor	esi, esi
mov	byte ptr [esp+44h+var_4], 3
mov	[esp+44h+var_30], esi
jmp	short loc_791762

loc_79174E:
push	8
call	sub_7A1F02
push	eax
call	sub_791610
add	esp, 8
mov	[esp+44h+var_30], eax

loc_791762:
cmp	byte_167F6C4, bl
jz	loc_791827
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_14], esi
mov	byte ptr [esp+44h+var_4], 5
cmp	esi, ebx
jz	short loc_79179F
call	sub_7A1F02
add	eax, 20h
push	eax
mov	ecx, esi
call	sub_795F40
mov	dword ptr [esi], offset	off_1446658
jmp	short loc_7917A1

loc_79179F:
xor	esi, esi

loc_7917A1:
mov	ebp, esi
push	24h		; size_t
mov	byte ptr [esp+48h+var_4], 3
mov	[esp+48h+var_24], ebp
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_14], esi
mov	byte ptr [esp+44h+var_4], 6
cmp	esi, ebx
jz	short loc_7917DD
call	sub_7A1F02
add	eax, 40h
push	eax
mov	ecx, esi
call	sub_795F40
mov	dword ptr [esi], offset	off_1446658
jmp	short loc_7917DF

loc_7917DD:
xor	esi, esi

loc_7917DF:
mov	edi, esi
push	24h		; size_t
mov	byte ptr [esp+48h+var_4], 3
mov	[esp+48h+var_20], edi
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_14], esi
mov	byte ptr [esp+44h+var_4], 7
cmp	esi, ebx
jz	short loc_79181F
call	sub_7A1F02
add	eax, 40h
push	eax
mov	ecx, esi
call	sub_795F40
mov	dword ptr [esi], offset	off_1446658
mov	[esp+44h+var_2C], esi
jmp	short loc_791870

loc_79181F:
xor	esi, esi
mov	[esp+44h+var_2C], esi
jmp	short loc_791870

loc_791827:
push	10h
call	sub_7A1F02
add	eax, 20h
push	eax
call	sub_791610
add	esp, 8
mov	ebp, eax
push	10h
mov	[esp+48h+var_24], ebp
call	sub_7A1F02
add	eax, 40h
push	eax
call	sub_791610
add	esp, 8
mov	edi, eax
push	10h
mov	[esp+48h+var_20], edi
call	sub_7A1F02
add	eax, 40h
push	eax
call	sub_791610
add	esp, 8
mov	[esp+44h+var_2C], eax

loc_791870:
mov	ecx, offset dword_1858280
mov	[esp+44h+var_14], ecx
mov	eax, [esp+44h+var_30]
push	1
push	eax
mov	byte ptr [esp+4Ch+var_4], 8
call	sub_438CD0
mov	ecx, offset dword_1858218
mov	esi, eax
mov	[esp+44h+var_30], ebx
mov	[esp+44h+var_14], ecx
push	1
push	ebp
mov	byte ptr [esp+4Ch+var_4], 9
call	sub_43D300
mov	ecx, offset dword_18581B0
mov	ebp, eax
mov	[esp+44h+var_24], ebx
mov	[esp+44h+var_14], ecx
push	1
push	edi
mov	byte ptr [esp+4Ch+var_4], 0Ah
call	sub_43D300
mov	ecx, offset dword_18583C8
mov	edi, eax
mov	[esp+44h+var_20], ebx
mov	[esp+44h+var_14], ecx
mov	edx, [esp+44h+var_2C]
push	1
push	edx
mov	byte ptr [esp+4Ch+var_4], 0Bh
call	sub_43D300
mov	eax, [esi]
mov	eax, [eax+4]
add	eax, esi
mov	[eax+5Ch], ebp
mov	ecx, [edi]
mov	eax, [ecx+4]
or	dword ptr [eax+edi+8], 2000h
add	eax, edi
mov	[esp+44h+var_2C], ebx
mov	[esp+44h+var_28], ebx
mov	[esp+44h+var_1C], ebx
mov	[esp+44h+var_18], ebx
mov	[esp+44h+var_14], ebx
mov	byte ptr [esp+44h+var_4], 0Fh
cmp	byte_167F6C4, bl
jz	short loc_791960
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_10], esi
mov	byte ptr [esp+44h+var_4], 10h
cmp	esi, ebx
jz	short loc_791953
call	sub_7A1F02
push	eax
mov	ecx, esi
call	sub_7960A0
mov	dword ptr [esi], offset	off_1446694
mov	byte ptr [esp+44h+var_4], 0Fh
mov	[esp+44h+var_28], esi
jmp	short loc_791974

loc_791953:
xor	esi, esi
mov	byte ptr [esp+44h+var_4], 0Fh
mov	[esp+44h+var_28], esi
jmp	short loc_791974

loc_791960:
push	8
call	sub_7A1F02
push	eax
call	sub_791560
add	esp, 8
mov	[esp+44h+var_28], eax

loc_791974:
cmp	byte_167F6C4, bl
jz	loc_791A39
push	24h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_10], esi
mov	byte ptr [esp+44h+var_4], 11h
cmp	esi, ebx
jz	short loc_7919B1
call	sub_7A1F02
add	eax, 20h
push	eax
mov	ecx, esi
call	sub_7960A0
mov	dword ptr [esi], offset	off_14466D0
jmp	short loc_7919B3

loc_7919B1:
xor	esi, esi

loc_7919B3:
mov	ebp, esi
push	24h		; size_t
mov	byte ptr [esp+48h+var_4], 0Fh
mov	[esp+48h+var_1C], ebp
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_10], esi
mov	byte ptr [esp+44h+var_4], 12h
cmp	esi, ebx
jz	short loc_7919EF
call	sub_7A1F02
add	eax, 40h
push	eax
mov	ecx, esi
call	sub_7960A0
mov	dword ptr [esi], offset	off_14466D0
jmp	short loc_7919F1

loc_7919EF:
xor	esi, esi

loc_7919F1:
mov	edi, esi
push	24h		; size_t
mov	byte ptr [esp+48h+var_4], 0Fh
mov	[esp+48h+var_18], edi
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, eax
add	esp, 4
mov	[esp+44h+var_10], esi
mov	byte ptr [esp+44h+var_4], 13h
cmp	esi, ebx
jz	short loc_791A31
call	sub_7A1F02
add	eax, 40h
push	eax
mov	ecx, esi
call	sub_7960A0
mov	dword ptr [esi], offset	off_14466D0
mov	[esp+44h+var_14], esi
jmp	short loc_791A82

loc_791A31:
xor	esi, esi
mov	[esp+44h+var_14], esi
jmp	short loc_791A82

loc_791A39:
push	10h
call	sub_7A1F02
add	eax, 20h
push	eax
call	sub_791560
add	esp, 8
mov	ebp, eax
push	10h
mov	[esp+48h+var_1C], ebp
call	sub_7A1F02
add	eax, 40h
push	eax
call	sub_791560
add	esp, 8
mov	edi, eax
push	10h
mov	[esp+48h+var_18], edi
call	sub_7A1F02
add	eax, 40h
push	eax
call	sub_791560
add	esp, 8
mov	[esp+44h+var_14], eax

loc_791A82:
mov	ecx, offset dword_18582F0
mov	[esp+44h+var_10], ecx
mov	edx, [esp+44h+var_28]
push	1
push	edx
mov	byte ptr [esp+4Ch+var_4], 14h
call	sub_402E20
mov	ecx, offset dword_1858148
mov	esi, eax
mov	[esp+44h+var_28], ebx
mov	[esp+44h+var_10], ecx
push	1
push	ebp
mov	byte ptr [esp+4Ch+var_4], 15h
call	sub_4032A0
mov	ecx, offset dword_1858360
mov	ebp, eax
mov	[esp+44h+var_1C], ebx
mov	[esp+44h+var_10], ecx
push	1
push	edi
mov	byte ptr [esp+4Ch+var_4], 16h
call	sub_4032A0
mov	ecx, offset dword_18580E0
mov	edi, eax
mov	[esp+44h+var_18], ebx
mov	[esp+44h+var_10], ecx
mov	eax, [esp+44h+var_14]
push	1
push	eax
mov	byte ptr [esp+4Ch+var_4], 17h
call	sub_4032A0
mov	ecx, [esi]
mov	eax, [ecx+4]
add	eax, esi
mov	[eax+5Ch], ebp
mov	edx, [edi]
mov	eax, [edx+4]
add	eax, edi
or	dword ptr [eax+8], 2000h
mov	ecx, [esp+44h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 30h
retn
sub_7916C0 endp




sub_791B20 proc	near
mov	eax, dword_18580D8
push	esi
mov	esi, ecx
mov	ecx, eax
inc	eax
mov	dword_18580D8, eax
test	ecx, ecx
jnz	short loc_791B43
call	sub_791B50
call	sub_7916C0
call	sub_77F1D0

loc_791B43:
mov	eax, esi
pop	esi
retn
sub_791B20 endp

align 10h



sub_791B50 proc	near
push	offset stru_1858430 ; lpCriticalSection
call	ds:InitializeCriticalSection
retn
sub_791B50 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_1419910

loc_791B60:		; lpCriticalSection
push	offset stru_1858430
call	ds:DeleteCriticalSection
retn
; END OF FUNCTION CHUNK	FOR sub_1419910
align 10h



sub_791B70 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

mov	eax, ecx
xor	ecx, ecx
cmp	[esp+arg_8], ecx
setnz	cl
mov	[eax+4], ecx
mov	ecx, [esp+arg_0]
mov	dword ptr [eax], offset	off_1447344
mov	edx, ecx
test	ecx, ecx
jnz	short loc_791B93
mov	edx, offset dword_1446F40

loc_791B93:
mov	[eax+8], edx
test	ecx, ecx
jz	short loc_791BAC
cmp	[esp+arg_4], 0
jz	short loc_791BAC
mov	ecx, 1
mov	[eax+0Ch], cl
retn	0Ch

loc_791BAC:
xor	ecx, ecx
mov	[eax+0Ch], cl
retn	0Ch
sub_791B70 endp

align 10h



sub_791BC0 proc	near

arg_0= byte ptr	 4

movzx	eax, [esp+arg_0]
mov	al, ds:byte_1446D40[eax]
retn	4
sub_791BC0 endp

align 10h



sub_791BD0 proc	near

arg_0= byte ptr	 4

movzx	eax, [esp+arg_0]
mov	al, ds:byte_1446E40[eax]
retn	4
sub_791BD0 endp

align 10h



sub_791BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_4]
cmp	ecx, eax
jnb	short locret_791C00
lea	esp, [esp+0]

loc_791BF0:
movzx	edx, byte ptr [ecx]
mov	dl, ds:byte_1446D40[edx]
mov	[ecx], dl
inc	ecx
cmp	ecx, eax
jb	short loc_791BF0

locret_791C00:
retn	8
sub_791BE0 endp

align 10h



sub_791C10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_4]
cmp	ecx, eax
jnb	short locret_791C30
lea	esp, [esp+0]

loc_791C20:
movzx	edx, byte ptr [ecx]
mov	dl, ds:byte_1446E40[edx]
mov	[ecx], dl
inc	ecx
cmp	ecx, eax
jb	short loc_791C20

locret_791C30:
retn	8
sub_791C10 endp

align 10h
; [00000007 BYTES: COLLAPSED FUNCTION std::ctype<char>::do_widen(char).	PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_791C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
mov	eax, esi
sub	eax, ecx
jz	short loc_791C6E
push	eax
mov	eax, [esp+8+arg_8]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_791C6E:
mov	eax, esi
pop	esi
retn	0Ch
sub_791C50 endp

align 10h
; [00000007 BYTES: COLLAPSED FUNCTION std::ctype<char>::do_narrow(char,char). PRESS KEYPAD "+" TO EXPAND]
align 10h



sub_791C90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h

mov	ecx, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
mov	eax, esi
sub	eax, ecx
jz	short loc_791CAE
push	eax
mov	eax, [esp+8+arg_C]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_791CAE:
mov	eax, esi
pop	esi
retn	10h
sub_791C90 endp

align 10h



sub_791CC0 proc	near
mov	dword ptr [ecx], offset	off_14463E0
jmp	sub_77FED0
sub_791CC0 endp

align 10h



sub_791CD0 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

mov	ax, [esp+arg_4]
mov	ecx, 100h
cmp	ax, cx
jnb	short loc_791CF7
movzx	edx, ax
mov	eax, [esp+arg_0]
test	ds:dword_1446F40[edx*4], eax
jz	short loc_791CF7
mov	eax, 1
retn	8

loc_791CF7:
xor	eax, eax
retn	8
sub_791CD0 endp

align 10h



sub_791D00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_4]
cmp	ecx, eax
jnb	short locret_791D3B
push	esi
mov	esi, [esp+4+arg_8]
push	edi

loc_791D12:
movzx	edx, word ptr [ecx]
mov	edi, 100h
cmp	dx, di
jnb	short loc_791D2B
movzx	edx, dx
mov	edx, ds:dword_1446F40[edx*4]
jmp	short loc_791D2D

loc_791D2B:
xor	edx, edx

loc_791D2D:
mov	[esi], edx
add	ecx, 2
add	esi, 4
cmp	ecx, eax
jb	short loc_791D12
pop	edi
pop	esi

locret_791D3B:
retn	0Ch
sub_791D00 endp

align 10h



sub_791D40 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	ecx, 100h
cmp	ax, cx
jnb	short loc_791D5A
movzx	edx, ax
movzx	ax, ds:byte_1446D40[edx]

loc_791D5A:
movzx	eax, ax
retn	4
sub_791D40 endp




sub_791D60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_4]
cmp	ecx, eax
jnb	short locret_791D96
push	esi
lea	ecx, [ecx+0]

loc_791D70:
movzx	edx, word ptr [ecx]
mov	esi, 100h
cmp	dx, si
movzx	edx, dx
jnb	short loc_791D8B
movzx	dx, ds:byte_1446D40[edx]
movzx	edx, dx

loc_791D8B:
mov	[ecx], dx
add	ecx, 2
cmp	ecx, eax
jb	short loc_791D70
pop	esi

locret_791D96:
retn	8
sub_791D60 endp

align 10h



sub_791DA0 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	ecx, 100h
cmp	ax, cx
jnb	short loc_791DBA
movzx	edx, ax
movzx	ax, ds:byte_1446E40[edx]

loc_791DBA:
movzx	eax, ax
retn	4
sub_791DA0 endp




sub_791DC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_4]
cmp	ecx, eax
jnb	short locret_791DF6
push	esi
lea	ecx, [ecx+0]

loc_791DD0:
movzx	edx, word ptr [ecx]
mov	esi, 100h
cmp	dx, si
movzx	edx, dx
jnb	short loc_791DEB
movzx	dx, ds:byte_1446E40[edx]
movzx	edx, dx

loc_791DEB:
mov	[ecx], dx
add	ecx, 2
cmp	ecx, eax
jb	short loc_791DD0
pop	esi

locret_791DF6:
retn	8
sub_791DC0 endp

align 10h



sub_791E00 proc	near

arg_0= byte ptr	 4

movzx	ax, [esp+arg_0]
retn	4
sub_791E00 endp

align 10h



sub_791E10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_4]
cmp	ecx, eax
jz	short locret_791E31
mov	edx, [esp+arg_8]
push	esi

loc_791E21:
movzx	si, byte ptr [ecx]
mov	[edx], si
inc	ecx
add	edx, 2
cmp	ecx, eax
jnz	short loc_791E21
pop	esi

locret_791E31:
retn	0Ch
sub_791E10 endp

align 10h



sub_791E40 proc	near

arg_0= word ptr	 4
arg_4= byte ptr	 8

mov	ax, [esp+arg_0]
movzx	cx, al
cmp	cx, ax
jz	short locret_791E52
mov	al, [esp+arg_4]

locret_791E52:
retn	8
sub_791E40 endp

align 10h



sub_791E60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_0]
mov	eax, [esp+arg_4]
cmp	edx, eax
jz	short locret_791E9B
push	ebx
mov	bl, [esp+4+arg_8]
push	esi
mov	esi, [esp+8+arg_C]
push	edi
jmp	short loc_791E80
align 10h

loc_791E80:
movzx	ecx, word ptr [edx]
movzx	di, cl
add	edx, 2
cmp	di, cx
jz	short loc_791E91
mov	cl, bl

loc_791E91:
mov	[esi], cl
inc	esi
cmp	edx, eax
jnz	short loc_791E80
pop	edi
pop	esi
pop	ebx

locret_791E9B:
retn	10h
sub_791E60 endp

align 10h



; int __thiscall sub_791EA0(void *, char)
sub_791EA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+0Ch], 0
mov	dword ptr [esi], offset	off_1447344
jz	short loc_791EBB
mov	eax, [esi+8]
push	eax		; void *
call	??_V@YAXPAX@Z	; operator delete[](void *)
add	esp, 4

loc_791EBB:
mov	ecx, esi
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_791ED2
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_791ED2:
mov	eax, esi
pop	esi
retn	4
sub_791EA0 endp

align 10h



sub_791EE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
mov	ecx, ebx
push	ebp
sub	ecx, eax
push	esi
mov	esi, [esp+0Ch+arg_C]
sar	ecx, 3
push	edi
mov	edi, [esp+10h+arg_8]
test	ecx, ecx
jle	short loc_791F61
nop

loc_791F00:
movzx	edx, word ptr [eax]
mov	ebp, 100h
cmp	dx, bp
jnb	short loc_791F19
movzx	edx, dx
test	[esi+edx*4], edi
jnz	loc_791FBD

loc_791F19:
movzx	edx, word ptr [eax+2]
add	eax, 2
cmp	dx, bp
jnb	short loc_791F31
movzx	edx, dx
test	[esi+edx*4], edi
jnz	loc_791FBD

loc_791F31:
movzx	edx, word ptr [eax+2]
add	eax, 2
cmp	dx, bp
jnb	short loc_791F45
movzx	edx, dx
test	[esi+edx*4], edi
jnz	short loc_791FBD

loc_791F45:
movzx	edx, word ptr [eax+2]
add	eax, 2
cmp	dx, bp
jnb	short loc_791F59
movzx	edx, dx
test	[esi+edx*4], edi
jnz	short loc_791FBD

loc_791F59:
dec	ecx
add	eax, 2
test	ecx, ecx
jg	short loc_791F00

loc_791F61:
mov	ecx, ebx
sub	ecx, eax
sar	ecx, 1
sub	ecx, 1
jz	short loc_791FA6
sub	ecx, 1
jz	short loc_791F8E
sub	ecx, 1
jnz	short loc_791FBB
movzx	ecx, word ptr [eax]
mov	edx, 100h
cmp	cx, dx
jnb	short loc_791F8B
movzx	ecx, cx
test	[esi+ecx*4], edi
jnz	short loc_791FBD

loc_791F8B:
add	eax, 2

loc_791F8E:
movzx	ecx, word ptr [eax]
mov	edx, 100h
cmp	cx, dx
jnb	short loc_791FA3
movzx	ecx, cx
test	[esi+ecx*4], edi
jnz	short loc_791FBD

loc_791FA3:
add	eax, 2

loc_791FA6:
movzx	ecx, word ptr [eax]
mov	edx, 100h
cmp	cx, dx
jnb	short loc_791FBB
movzx	ecx, cx
test	[esi+ecx*4], edi
jnz	short loc_791FBD

loc_791FBB:
mov	eax, ebx

loc_791FBD:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_791EE0 endp

align 10h



sub_791FD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
mov	ecx, ebx
push	ebp
sub	ecx, eax
push	esi
mov	esi, [esp+0Ch+arg_C]
sar	ecx, 3
push	edi
mov	edi, [esp+10h+arg_8]
test	ecx, ecx
jle	short loc_79205D
nop

loc_791FF0:
movzx	edx, word ptr [eax]
mov	ebp, 100h
cmp	dx, bp
jnb	loc_7920B9
movzx	edx, dx
test	[esi+edx*4], edi
jz	loc_7920B9
movzx	edx, word ptr [eax+2]
add	eax, 2
cmp	dx, bp
jnb	loc_7920B9
movzx	edx, dx
test	[esi+edx*4], edi
jz	loc_7920B9
movzx	edx, word ptr [eax+2]
add	eax, 2
cmp	dx, bp
jnb	loc_7920B9
movzx	edx, dx
test	[esi+edx*4], edi
jz	short loc_7920B9
movzx	edx, word ptr [eax+2]
add	eax, 2
cmp	dx, bp
jnb	short loc_7920B9
movzx	edx, dx
test	[esi+edx*4], edi
jz	short loc_7920B9
dec	ecx
add	eax, 2
test	ecx, ecx
jg	short loc_791FF0

loc_79205D:
mov	ecx, ebx
sub	ecx, eax
sar	ecx, 1
sub	ecx, 1
jz	short loc_7920A2
sub	ecx, 1
jz	short loc_79208A
sub	ecx, 1
jnz	short loc_7920B7
movzx	ecx, word ptr [eax]
mov	edx, 100h
cmp	cx, dx
jnb	short loc_7920B9
movzx	ecx, cx
test	[esi+ecx*4], edi
jz	short loc_7920B9
add	eax, 2

loc_79208A:
movzx	ecx, word ptr [eax]
mov	edx, 100h
cmp	cx, dx
jnb	short loc_7920B9
movzx	ecx, cx
test	[esi+ecx*4], edi
jz	short loc_7920B9
add	eax, 2

loc_7920A2:
movzx	ecx, word ptr [eax]
mov	edx, 100h
cmp	cx, dx
jnb	short loc_7920B9
movzx	ecx, cx
test	[esi+ecx*4], edi
jz	short loc_7920B9

loc_7920B7:
mov	eax, ebx

loc_7920B9:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_791FD0 endp

align 10h



sub_7920C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
mov	edx, [ecx]
mov	eax, [esp+arg_0]
mov	ecx, [ecx+4]
mov	[eax], edx
mov	[eax+4], ecx
retn
sub_7920C0 endp

align 10h



sub_7920E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
lea	edx, [esp+arg_0]
push	edx
mov	ecx, offset dword_1446F40
push	ecx
mov	ecx, [esp+8+arg_4]
push	eax
mov	eax, [esp+0Ch+arg_8]
push	eax
push	ecx
call	sub_791EE0
add	esp, 14h
retn	0Ch
sub_7920E0 endp

align 10h



sub_792110 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
lea	ecx, [esp+10h+var_10]
push	ecx
lea	edx, [esp+14h+var_8]
push	edx
mov	[esp+18h+var_10], eax
mov	[esp+18h+var_C], offset	dword_1446F40
call	sub_7920C0
mov	edx, [eax+4]
mov	eax, [eax]
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, [esp+1Ch+arg_8]
push	edx
mov	edx, [esp+20h+arg_4]
push	eax
push	ecx
push	edx
call	sub_791FD0
add	esp, 2Ch
retn	0Ch
sub_792110 endp

align 10h



sub_792160 proc	near
mov	dword ptr [ecx], offset	off_1446418
jmp	sub_77FED0
sub_792160 endp

align 10h



sub_792170 proc	near

arg_4= dword ptr  8
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_4]
mov	[eax], ecx
mov	eax, 3
retn	10h
sub_792170 endp

align 10h



sub_792190 proc	near

arg_4= dword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_18]
mov	[eax], ecx
mov	eax, [esp+arg_10]
mov	[edx], eax
mov	eax, 3
retn	1Ch
sub_792190 endp

align 10h



sub_7921B0 proc	near
mov	dword ptr [ecx], offset	off_144643C
jmp	sub_77FED0
sub_7921B0 endp

align 10h



sub_7921C0 proc	near
mov	eax, 1
retn
sub_7921C0 endp

align 10h



sub_7921D0 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
sub	eax, [esp+arg_4]
cmp	[esp+arg_C], eax
mov	[esp+arg_8], eax
lea	eax, [esp+arg_C]
jb	short loc_7921EA
lea	eax, [esp+arg_8]

loc_7921EA:
mov	eax, [eax]
retn	10h
sub_7921D0 endp

align 10h



sub_7921F0 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_14]
mov	edx, [esp+arg_10]
push	ebx
mov	ebx, [esp+4+arg_4]
sub	eax, ebx
push	ebp
sar	eax, 1
sub	ecx, edx
push	esi
mov	[esp+0Ch+arg_10], eax
cmp	ecx, eax
push	edi
mov	[esp+10h+arg_14], ecx
lea	eax, [esp+10h+arg_14]
jl	short loc_79221E
lea	eax, [esp+10h+arg_10]

loc_79221E:
mov	edi, [eax]
lea	ebp, [edi+edi]
mov	eax, ebp
sar	eax, 1
mov	esi, edx
mov	ecx, ebx
test	eax, eax
jle	short loc_792241
nop

loc_792230:
mov	bl, [ecx]
mov	[esi], bl
dec	eax
add	ecx, 2
inc	esi
test	eax, eax
jg	short loc_792230
mov	ebx, [esp+10h+arg_4]

loc_792241:
mov	eax, [esp+10h+arg_C]
mov	ecx, [esp+10h+arg_18]
add	ebp, ebx
mov	[eax], ebp
add	edi, edx
mov	[ecx], edi
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	1Ch
sub_7921F0 endp

align 10h



sub_792260 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_14]
mov	ecx, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_10]
sub	eax, edi
sar	eax, 1
sub	ecx, ebx
mov	[esp+0Ch+arg_14], eax
cmp	eax, ecx
mov	[esp+0Ch+arg_10], ecx
lea	eax, [esp+0Ch+arg_14]
jl	short loc_79228D
lea	eax, [esp+0Ch+arg_10]

loc_79228D:
mov	esi, [eax]
mov	eax, esi
mov	edx, edi
mov	ecx, ebx
test	eax, eax
jle	short loc_7922B1
push	ebp
lea	ebx, [ebx+0]

loc_7922A0:
movzx	bp, byte ptr [ecx]
mov	[edx], bp
dec	eax
inc	ecx
add	edx, 2
test	eax, eax
jg	short loc_7922A0
pop	ebp

loc_7922B1:
mov	ecx, [esp+0Ch+arg_C]
lea	eax, [esi+ebx]
lea	edx, [edi+esi*2]
mov	[ecx], eax
mov	eax, [esp+0Ch+arg_18]
pop	edi
pop	esi
mov	[eax], edx
xor	eax, eax
pop	ebx
retn	1Ch
sub_792260 endp

align 10h



sub_7922D0 proc	near
mov	dword ptr [ecx], offset	off_1446460
jmp	sub_77FED0
sub_7922D0 endp

align 10h



sub_7922E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	edx, [esp+arg_4]
xor	eax, eax
cmp	ecx, edx
jnb	short locret_7922FE
push	esi
nop

loc_7922F0:
movsx	esi, byte ptr [ecx]
lea	eax, [eax+eax*4]
inc	ecx
add	eax, esi
cmp	ecx, edx
jb	short loc_7922F0
pop	esi

locret_7922FE:
retn	8
sub_7922E0 endp

align 10h



sub_792310 proc	near
mov	dword ptr [ecx], offset	off_1446474
jmp	sub_77FED0
sub_792310 endp

align 10h



sub_792320 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	edx, [esp+arg_4]
xor	eax, eax
cmp	ecx, edx
jnb	short locret_792340
push	esi
nop

loc_792330:
movzx	esi, word ptr [ecx]
lea	eax, [eax+eax*4]
add	ecx, 2
add	eax, esi
cmp	ecx, edx
jb	short loc_792330
pop	esi

locret_792340:
retn	8
sub_792320 endp

align 10h



sub_792350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_C]
push	esi
mov	esi, [esp+8+arg_8]
push	edi
mov	edi, [esp+0Ch+arg_4]
cmp	eax, edi
jz	short loc_79237B

loc_792367:
cmp	esi, ebx
jz	short loc_79237F
mov	cl, [eax]
mov	dl, [esi]
cmp	dl, cl
jg	short loc_792395
jl	short loc_79238C
inc	eax
inc	esi
cmp	eax, edi
jnz	short loc_792367

loc_79237B:
cmp	esi, ebx
jnz	short loc_792395

loc_79237F:
xor	ecx, ecx
cmp	eax, edi
setnz	cl
pop	edi
pop	esi
pop	ebx
mov	eax, ecx
retn

loc_79238C:
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_792395:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn
sub_792350 endp

align 10h



sub_7923A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_C]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
cmp	eax, edi
jz	short loc_7923D2

loc_7923B7:
cmp	ecx, ebx
jz	short loc_7923D6
movzx	edx, word ptr [eax]
movzx	esi, word ptr [ecx]
cmp	si, dx
ja	short loc_7923EC
jb	short loc_7923E3
add	eax, 2
add	ecx, 2
cmp	eax, edi
jnz	short loc_7923B7

loc_7923D2:
cmp	ecx, ebx
jnz	short loc_7923EC

loc_7923D6:
xor	ecx, ecx
cmp	eax, edi
setnz	cl
pop	edi
pop	esi
pop	ebx
mov	eax, ecx
retn

loc_7923E3:
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_7923EC:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn
sub_7923A0 endp

align 10h



sub_792400 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	ecx
push	edx
push	eax
call	sub_792350
add	esp, 10h
retn	10h
sub_792400 endp

align 10h



sub_792420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	ecx
push	edx
push	eax
call	sub_7923A0
add	esp, 10h
retn	10h
sub_792420 endp

align 10h



sub_792440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
sub	edi, ebp
lea	eax, [edi+1]
mov	esi, ecx
mov	[esp+0Ch+arg_0], eax
cmp	eax, 0FFFFFFFFh
ja	short loc_7924A5
test	eax, eax
jbe	short loc_7924A5
cmp	eax, 10h
jbe	short loc_792483
push	ebx
lea	ecx, [esp+10h+arg_0]
push	ecx		; int
lea	ebx, [esi+14h]
push	eax		; size_t
mov	ecx, ebx
call	sub_407BD0
mov	edx, [esp+10h+arg_0]
mov	[ebx], eax
mov	[esi+10h], eax
add	eax, edx
mov	[esi], eax
pop	ebx

loc_792483:
mov	eax, [esi+14h]
cmp	[esp+0Ch+arg_4], ebp
jz	short loc_792499
push	edi
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi

loc_792499:
pop	edi
mov	[esi+10h], eax
pop	esi
mov	byte ptr [eax],	0
pop	ebp
retn	0Ch

loc_7924A5:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_792440 endp

align 10h



sub_7924B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
sub	edi, ebp
mov	eax, edi
sar	eax, 1
inc	eax
mov	esi, ecx
mov	[esp+0Ch+arg_0], eax
cmp	eax, 7FFFFFFFh
ja	short loc_79251C
test	eax, eax
jbe	short loc_79251C
cmp	eax, 10h
jbe	short loc_7924F8
push	ebx
lea	ecx, [esp+10h+arg_0]
push	ecx
lea	ebx, [esi+24h]
push	eax
mov	ecx, ebx
call	sub_4076B0
mov	edx, [esp+10h+arg_0]
mov	[ebx], eax
mov	[esi+20h], eax
lea	eax, [eax+edx*2]
mov	[esi], eax
pop	ebx

loc_7924F8:
mov	eax, [esi+24h]
cmp	[esp+0Ch+arg_4], ebp
jz	short loc_79250E
push	edi
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, edi

loc_79250E:
pop	edi
mov	[esi+20h], eax
xor	ecx, ecx
pop	esi
mov	[eax], cx
pop	ebp
retn	0Ch

loc_79251C:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_7924B0 endp

align 10h



sub_792530 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12CA918
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	[esi+10h], esi
mov	[esi+14h], esi
mov	ecx, [esp+18h+arg_4]
mov	edx, [esp+18h+arg_0]
lea	eax, [esp+18h+arg_4]
push	eax
push	ecx
push	edx
mov	ecx, esi
mov	[esp+24h+var_4], 0
call	sub_792440
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn	0Ch
sub_792530 endp

align 10h



sub_7925A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	0FFFFFFFFh
push	offset loc_12CA948
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
mov	[esi+20h], esi
mov	[esi+24h], esi
mov	ecx, [esp+18h+arg_4]
mov	edx, [esp+18h+arg_0]
lea	eax, [esp+18h+arg_4]
push	eax
push	ecx
push	edx
mov	ecx, esi
mov	[esp+24h+var_4], 0
call	sub_7924B0
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn	0Ch
sub_7925A0 endp

align 10h



sub_792610 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_8]
push	eax
push	ecx
push	edx
mov	ecx, esi
mov	[esp+14h+var_4], 0
call	sub_792530
mov	eax, esi
pop	esi
pop	ecx
retn	0Ch
sub_792610 endp

align 10h



sub_792640 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_8]
push	eax
push	ecx
push	edx
mov	ecx, esi
mov	[esp+14h+var_4], 0
call	sub_7925A0
mov	eax, esi
pop	esi
pop	ecx
retn	0Ch
sub_792640 endp

align 10h



sub_792670 proc	near
mov	al, 2Eh
retn
sub_792670 endp

align 10h



sub_792680 proc	near
mov	al, 2Ch
retn
sub_792680 endp

align 10h



sub_792690 proc	near
mov	dword ptr [ecx], offset	off_1446488
jmp	sub_77FED0
sub_792690 endp

align 10h



sub_7926A0 proc	near
mov	eax, 2Eh
retn
sub_7926A0 endp

align 10h



sub_7926B0 proc	near
mov	eax, 2Ch
retn
sub_7926B0 endp

align 10h



sub_7926C0 proc	near
mov	dword ptr [ecx], offset	off_14464A4
jmp	sub_77FED0
sub_7926C0 endp

align 10h



sub_7926D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_0]
push	eax
push	offset aTrue	; "true"
mov	ecx, esi
mov	[esp+10h+var_4], 0
call	sub_407D30
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_7926D0 endp

align 10h



sub_792700 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_0]
push	eax
push	offset aFalse	; "false"
mov	ecx, esi
mov	[esp+10h+var_4], 0
call	sub_407D30
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_792700 endp

align 10h



sub_792730 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
mov	[eax+10h], eax
mov	[eax+14h], eax
mov	ecx, [eax+10h]
mov	[esp+4+var_4], 0
mov	byte ptr [ecx],	0
pop	ecx
retn	4
sub_792730 endp

align 10h



sub_792750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_0]
push	eax
push	offset aTrue_0	; "true"
mov	ecx, esi
mov	[esp+10h+var_4], 0
call	sub_407810
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_792750 endp

align 10h



sub_792780 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
lea	eax, [esp+8+arg_0]
push	eax
push	offset aFalse_0	; "false"
mov	ecx, esi
mov	[esp+10h+var_4], 0
call	sub_407810
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_792780 endp

align 10h



sub_7927B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, eax
jz	short loc_7927F3
mov	ecx, [esp+8+arg_8]
mov	esi, [esp+8+arg_C]
cmp	ecx, esi
jz	short loc_7927F3
dec	eax
dec	esi
cmp	edi, eax
jz	short loc_7927E0

loc_7927D0:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_7927EE
dec	eax
cmp	ecx, esi
jz	short loc_7927DC
inc	ecx

loc_7927DC:
cmp	edi, eax
jnz	short loc_7927D0

loc_7927E0:
mov	al, [eax]
xor	edx, edx
cmp	al, [ecx]
pop	edi
setle	dl
mov	al, dl
pop	esi
retn

loc_7927EE:
pop	edi
xor	al, al
pop	esi
retn

loc_7927F3:
pop	edi
mov	al, 1
pop	esi
retn
sub_7927B0 endp

align 10h



sub_792800 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	al, ds:byte_1447368[eax]
retn
sub_792800 endp

align 10h



sub_792810 proc	near
mov	eax, offset a0xx ; "+-0xX"
retn
sub_792810 endp

align 10h



sub_792820 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
mov	ecx, esi
sub	ecx, eax
sar	ecx, 3
push	edi
mov	edi, [esp+8+arg_8]
test	ecx, ecx
jle	short loc_792865
movzx	edx, word ptr [edi]
lea	esp, [esp+0]

loc_792840:
cmp	[eax], dx
jz	short loc_79289A
add	eax, 2
cmp	[eax], dx
jz	short loc_79289A
add	eax, 2
cmp	[eax], dx
jz	short loc_79289A
add	eax, 2
cmp	[eax], dx
jz	short loc_79289A
dec	ecx
add	eax, 2
test	ecx, ecx
jg	short loc_792840

loc_792865:
mov	ecx, esi
sub	ecx, eax
sar	ecx, 1
sub	ecx, 1
jz	short loc_792890
sub	ecx, 1
jz	short loc_792885
sub	ecx, 1
jnz	short loc_792898
mov	cx, [eax]
cmp	cx, [edi]
jz	short loc_79289A
add	eax, 2

loc_792885:
mov	dx, [eax]
cmp	dx, [edi]
jz	short loc_79289A
add	eax, 2

loc_792890:
mov	cx, [eax]
cmp	cx, [edi]
jz	short loc_79289A

loc_792898:
mov	eax, esi

loc_79289A:
pop	edi
pop	esi
retn
sub_792820 endp

align 10h



sub_7928A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
lea	eax, [esp+0Ch+arg_4]
push	eax
push	ebx
lea	esi, [edi+14h]
push	esi
push	edi
call	sub_792820
add	esp, 10h
cmp	eax, esi
jz	short loc_7928D5
sub	eax, edi
sar	eax, 1
add	al, 30h
movsx	cx, al
pop	edi
pop	esi
mov	[ebx], cx
mov	al, 1
pop	ebx
retn

loc_7928D5:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn
sub_7928A0 endp

align 10h



sub_7928E0 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
mov	ax, [ebx]
cmp	ax, [esp+4+arg_4]
jnz	short loc_7928FB
mov	ecx, 2Ch
mov	[ebx], cx
mov	al, 1
pop	ebx
retn

loc_7928FB:
push	esi
mov	esi, [esp+8+arg_8]
push	edi
lea	edx, [esp+0Ch+arg_4]
push	edx
push	ebx
lea	edi, [esi+14h]
push	edi
push	esi
call	sub_792820
add	esp, 10h
cmp	eax, edi
jz	short loc_792929
sub	eax, esi
sar	eax, 1
add	al, 30h
cbw
pop	edi
mov	[ebx], ax
pop	esi
mov	al, 1
pop	ebx
retn

loc_792929:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn
sub_7928E0 endp

align 10h



; int __cdecl sub_792930(double)
sub_792930 proc	near

var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= qword ptr  4

fld	[esp+arg_0]
sub	esp, 8
fstp	[esp+8+var_8]
call	__isnan
add	esp, 8
test	eax, eax
jz	short loc_792971
fld	[esp+arg_0]
sub	esp, 10h
fstp	[esp+10h+var_8]
fld1
fstp	[esp+10h+var_10]
call	__copysign
fcomp	ds:dbl_15FCC10
add	esp, 10h
fnstsw	ax
test	ah, 5
jp	short loc_792971
mov	eax, 1
retn

loc_792971:
xor	eax, eax
retn
sub_792930 endp

align 10h



sub_792980 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
cmp	ebx, edx
jz	loc_792A59
mov	ecx, [esi+10h]
push	edi
mov	edi, edx
sub	edi, ebx
cmp	[esi+118h], esi
jnz	short loc_7929AD
mov	eax, esi
sub	eax, ecx
add	eax, 10h
jmp	short loc_7929B1

loc_7929AD:
mov	eax, [esi]
sub	eax, ecx

loc_7929B1:
cmp	edi, eax
jb	short loc_792A2A
push	ebp
push	edi
mov	ecx, esi
call	sub_7817C0
mov	ebp, eax
lea	ecx, [esi+14h]
cmp	ebp, 101h
jbe	short loc_7929D7
push	0		; int
push	ebp		; size_t
call	sub_780550
mov	edi, eax
jmp	short loc_7929D9

loc_7929D7:
mov	edi, ecx

loc_7929D9:
mov	eax, [esi+10h]
mov	ecx, [esi+118h]
push	0
lea	edx, [esp+14h+arg_4]
push	edx
push	edi
push	eax
push	ecx
call	sub_405470
mov	edx, [esp+24h+arg_4]
push	0
lea	ecx, [esp+28h+arg_4]
push	ecx
push	eax
push	edx
push	ebx
call	sub_405470
mov	ebx, eax
add	esp, 28h
mov	ecx, esi
mov	byte ptr [ebx],	0
call	sub_780820
lea	eax, [edi+ebp]
pop	ebp
mov	[esi+118h], edi
mov	[esi], eax
pop	edi
mov	[esi+10h], ebx
mov	eax, esi
pop	esi
pop	ebx
retn	8

loc_792A2A:
push	0
lea	eax, [esp+10h+arg_4]
push	eax
inc	ecx
push	ecx
push	edx
lea	ecx, [ebx+1]
push	ecx
call	sub_405470
mov	edx, [esi+10h]
mov	byte ptr [edi+edx], 0
mov	eax, [esi+10h]
mov	cl, [ebx]
add	esp, 14h
mov	[eax], cl
add	[esi+10h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8

loc_792A59:
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_792980 endp




sub_792A60 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jbe	short loc_792AE0
mov	eax, [esi+118h]
mov	ecx, [esi+10h]
mov	edx, eax
sub	edx, ecx
sub	edx, 2
cmp	edi, edx
jbe	short loc_792A8A
push	offset aBasic_string ; "basic_string"
call	sub_77EC70

loc_792A8A:
cmp	eax, esi
jnz	short loc_792A97
mov	eax, esi
sub	eax, ecx
add	eax, 10h
jmp	short loc_792A9B

loc_792A97:
mov	eax, [esi]
sub	eax, ecx

loc_792A9B:
cmp	edi, eax
jb	short loc_792AAF
push	edi
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_792AAF:
mov	eax, [esi+10h]
push	0
lea	ecx, [esp+0Ch+arg_4]
push	ecx
inc	eax
lea	edx, [esp+10h+arg_4]
push	edx
lea	ecx, [eax+edi-1]
push	ecx
push	eax
call	sub_44D880
mov	edx, [esi+10h]
mov	cl, [esp+1Ch+arg_4]
mov	byte ptr [edi+edx], 0
mov	eax, [esi+10h]
add	esp, 14h
mov	[eax], cl
add	[esi+10h], edi

loc_792AE0:
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_792A60 endp

align 10h



sub_792AF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	ebp, [esi+24h]
cmp	eax, 101h
jbe	short loc_792B12
push	0
push	eax
mov	ecx, ebp
call	sub_7805C0
mov	edi, eax
jmp	short loc_792B14

loc_792B12:
mov	edi, ebp

loc_792B14:
mov	eax, [esi+20h]
mov	ecx, [esi+228h]
push	0
lea	edx, [esp+14h+arg_0]
push	edx
push	edi
push	eax
push	ecx
call	sub_405400
mov	ebx, eax
xor	eax, eax
mov	[ebx], ax
mov	eax, [esi+228h]
add	esp, 14h
cmp	eax, esi
jz	short loc_792B6D
test	eax, eax
jz	short loc_792B6D
cmp	eax, ebp
jz	short loc_792B6D
mov	ecx, [esi]
sub	ecx, eax
sar	ecx, 1
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_792B63
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_792B6D

loc_792B63:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_792B6D:
mov	ecx, [esp+10h+arg_0]
lea	edx, [edi+ecx*2]
mov	[esi+228h], edi
pop	edi
mov	[esi+20h], ebx
mov	[esi], edx
pop	esi
pop	ebp
pop	ebx
retn	4
sub_792AF0 endp

align 10h



sub_792B90 proc	near

arg_0= word ptr	 4

push	esi
mov	esi, ecx
cmp	[esi+228h], esi
jnz	short loc_792BAB
mov	ecx, [esi+20h]
sub	ecx, esi
sar	ecx, 1
mov	eax, 10h
sub	eax, ecx
jmp	short loc_792BB2

loc_792BAB:
mov	eax, [esi]
sub	eax, [esi+20h]
sar	eax, 1

loc_792BB2:
cmp	eax, 1
jnz	short loc_792BC7
push	eax
mov	ecx, esi
call	sub_781900
push	eax
mov	ecx, esi
call	sub_792AF0

loc_792BC7:
mov	edx, [esi+20h]
xor	eax, eax
mov	[edx+2], ax
mov	ecx, [esi+20h]
mov	dx, [esp+4+arg_0]
mov	[ecx], dx
add	dword ptr [esi+20h], 2
pop	esi
retn	4
sub_792B90 endp

align 10h



sub_792BF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	[esi+118h], esi
jnz	short loc_792C05
mov	eax, esi
sub	eax, [esi+10h]
add	eax, 10h
jmp	short loc_792C0A

loc_792C05:
mov	eax, [esi]
sub	eax, [esi+10h]

loc_792C0A:
cmp	eax, 1
jnz	short loc_792C1D
push	eax
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_792C1D:
mov	eax, [esi+10h]
mov	dl, [esp+4+arg_0]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], dl
inc	dword ptr [esi+10h]
mov	eax, esi
pop	esi
retn	4
sub_792BF0 endp

align 10h



; int __cdecl sub_792C40(double)
sub_792C40 proc	near

var_18=	qword ptr -18h
var_4= dword ptr -4
arg_0= qword ptr  4

push	ecx
fld	[esp+4+arg_0]
push	ebx
push	ebp
push	esi
sub	esp, 8
fstp	[esp+18h+var_18]
mov	esi, eax
call	__fpclass
add	esp, 8
cmp	eax, 4
jz	short loc_792C64
cmp	eax, 200h
jnz	short loc_792C87

loc_792C64:
fld	[esp+10h+arg_0]
sub	esp, 8
fstp	[esp+18h+var_18]
mov	[esp+18h+var_4], offset	off_167FBC0
call	__fpclass
add	esp, 8
cmp	eax, 4
jnz	short loc_792CA9
push	2Dh
jmp	short loc_792CB3

loc_792C87:
fld	[esp+10h+arg_0]
sub	esp, 8
fstp	[esp+18h+var_18]
mov	[esp+18h+var_4], offset	off_167FBB8
call	sub_792930
add	esp, 8
test	al, al
jz	short loc_792CA9
push	2Dh
jmp	short loc_792CB3

loc_792CA9:
test	esi, 800h
jz	short loc_792CBA
push	2Bh

loc_792CB3:
mov	ecx, edi
call	sub_792BF0

loc_792CBA:
mov	eax, [esp+10h+var_4]
mov	ebx, [edi+10h]
mov	ebp, [edi+118h]
shr	esi, 0Eh
and	esi, 1
mov	esi, [eax+esi*4]
mov	eax, esi
lea	edx, [eax+1]

loc_792CD5:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_792CD5
sub	eax, edx
add	eax, esi
push	eax
push	esi
mov	ecx, edi
call	sub_792980
mov	eax, ebx
pop	esi
sub	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn
sub_792C40 endp

align 10h



; int __cdecl sub_792D00(double)
sub_792D00 proc	near

var_18=	qword ptr -18h
var_4= dword ptr -4
arg_0= qword ptr  4

push	ecx
fld	[esp+4+arg_0]
push	ebx
push	ebp
push	esi
sub	esp, 8
fstp	[esp+18h+var_18]
mov	esi, eax
call	__fpclass
add	esp, 8
cmp	eax, 4
jz	short loc_792D24
cmp	eax, 200h
jnz	short loc_792D47

loc_792D24:
fld	[esp+10h+arg_0]
sub	esp, 8
fstp	[esp+18h+var_18]
mov	[esp+18h+var_4], offset	off_167FBD0
call	__fpclass
add	esp, 8
cmp	eax, 4
jnz	short loc_792D69
push	2Dh
jmp	short loc_792D73

loc_792D47:
fld	[esp+10h+arg_0]
sub	esp, 8
fstp	[esp+18h+var_18]
mov	[esp+18h+var_4], offset	off_167FBC8
call	sub_792930
add	esp, 8
test	al, al
jz	short loc_792D69
push	2Dh
jmp	short loc_792D73

loc_792D69:
test	esi, 800h
jz	short loc_792D7A
push	2Bh

loc_792D73:
mov	ecx, edi
call	sub_792BF0

loc_792D7A:
mov	eax, [esp+10h+var_4]
mov	ebx, [edi+10h]
mov	ebp, [edi+118h]
shr	esi, 0Eh
and	esi, 1
mov	esi, [eax+esi*4]
mov	eax, esi
lea	edx, [eax+1]

loc_792D95:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_792D95
sub	eax, edx
add	eax, esi
push	eax
push	esi
mov	ecx, edi
call	sub_792980
mov	eax, ebx
pop	esi
sub	eax, ebp
pop	ebp
pop	ebx
pop	ecx
retn
sub_792D00 endp

align 10h



sub_792DC0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_9= byte ptr	-9
var_7= byte ptr	-7
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
cmp	[esp+18h+arg_4], 0
push	ebx
push	ebp
push	edi
mov	edi, ecx
mov	ebp, 1
jz	short loc_792E1C
cmp	[esi+118h], esi
jnz	short loc_792DF1
mov	eax, esi
sub	eax, [esi+10h]
add	eax, 10h
jmp	short loc_792DF6

loc_792DF1:
mov	eax, [esi]
sub	eax, [esi+10h]

loc_792DF6:
cmp	eax, ebp
jnz	short loc_792E0A
push	ebp
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_792E0A:
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	byte ptr [ecx],	2Dh
add	[esi+10h], ebp
jmp	short loc_792E2F

loc_792E1C:
test	[esp+24h+arg_C], 800h
jz	short loc_792E2F
push	2Bh
mov	ecx, esi
call	sub_792BF0

loc_792E2F:
mov	bl, [edi]
cmp	[esi+118h], esi
jnz	short loc_792E43
mov	eax, esi
sub	eax, [esi+10h]
add	eax, 10h
jmp	short loc_792E48

loc_792E43:
mov	eax, [esi]
sub	eax, [esi+10h]

loc_792E48:
cmp	eax, ebp
jnz	short loc_792E5C
push	ebp
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_792E5C:
mov	edx, [esi+10h]
mov	byte ptr [edx+1], 0
mov	eax, [esi+10h]
mov	[eax], bl
add	[esi+10h], ebp
mov	eax, [esi+10h]
mov	ecx, [esi+118h]
mov	edx, eax
sub	edx, ecx
add	edi, ebp
cmp	[esp+24h+arg_10], 0
mov	[esp+24h+var_14], edx
jnz	short loc_792E8F
test	[esp+24h+arg_C], 400h
jz	short loc_792EC7

loc_792E8F:
cmp	ecx, esi
jnz	short loc_792E9C
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_792EA0

loc_792E9C:
mov	ecx, [esi]
sub	ecx, eax

loc_792EA0:
cmp	ecx, ebp
jnz	short loc_792EB4
push	ebp
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_792EB4:
mov	ecx, [esi+10h]
mov	byte ptr [ecx+1], 0
mov	edx, [esi+10h]
mov	byte ptr [edx],	2Eh
add	[esi+10h], ebp
mov	eax, [esi+10h]

loc_792EC7:
mov	bl, [edi]
test	bl, bl
jz	loc_792F5C

loc_792ED1:
mov	ecx, [esp+24h+arg_10]
mov	edx, ecx
sub	ecx, ebp
mov	[esp+24h+arg_10], ecx
test	edx, edx
jz	short loc_792F5C
mov	edx, [esi+118h]
cmp	edx, esi
jnz	short loc_792EF4
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_792EF8

loc_792EF4:
mov	ecx, [esi]
sub	ecx, eax

loc_792EF8:
cmp	ecx, ebp
jnz	short loc_792F3D
sub	eax, edx
mov	ecx, 0FFFFFFFEh
sub	ecx, eax
mov	[esp+24h+var_18], ebp
mov	[esp+24h+var_10], eax
cmp	ecx, ebp
jb	loc_79302B
lea	ecx, [esp+24h+var_10]
cmp	eax, ebp
ja	short loc_792F21
lea	ecx, [esp+24h+var_18]

loc_792F21:
mov	edx, [ecx]
lea	ecx, [edx+eax+1]
cmp	ecx, 0FFFFFFFEh
ja	short loc_792F30
cmp	ecx, eax
jnb	short loc_792F35

loc_792F30:
mov	ecx, 0FFFFFFFEh

loc_792F35:		; size_t
push	ecx
mov	ecx, esi
call	sub_7854D0

loc_792F3D:
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], bl
add	[esi+10h], ebp
mov	bl, [edi+ebp]
mov	eax, [esi+10h]
add	edi, ebp
test	bl, bl
jnz	loc_792ED1

loc_792F5C:
mov	eax, [esp+24h+arg_10]
test	eax, eax
jle	short loc_792F6E
push	30h
push	eax
mov	ecx, esi
call	sub_792A60

loc_792F6E:
cmp	[esp+24h+arg_8], 0
lea	edi, [esp+24h+var_7]
mov	[esp+24h+var_7], 0
jnz	short loc_792FC6
mov	ebx, [esp+24h+arg_0]
add	ebx, 0FFFFFFFFh
jns	short loc_792F89
neg	ebx

loc_792F89:
cmp	ebx, 9
jle	short loc_792FB7
mov	edi, edi

loc_792F90:
mov	eax, 66666667h
imul	ebx
sar	edx, 2
mov	ecx, edx
shr	ecx, 1Fh
add	ecx, edx
mov	al, cl
mov	dl, 0Ah
imul	dl
sub	bl, al
add	bl, 30h
sub	edi, ebp
mov	[edi], bl
mov	ebx, ecx
cmp	ebx, 9
jg	short loc_792F90

loc_792FB7:
sub	edi, ebp
add	bl, 30h
lea	eax, [esp+24h+var_9]
mov	[edi], bl
cmp	edi, eax
jbe	short loc_792FD3

loc_792FC6:
sub	edi, ebp
lea	ecx, [esp+24h+var_9]
mov	byte ptr [edi],	30h
cmp	edi, ecx
ja	short loc_792FC6

loc_792FD3:
cmp	[esp+24h+arg_0], 0
jg	short loc_792FE3
cmp	[esp+24h+arg_8], 0
mov	al, 2Dh
jz	short loc_792FE5

loc_792FE3:
mov	al, 2Bh

loc_792FE5:
mov	edx, [esp+24h+arg_C]
shr	edx, 9
sub	edi, ebp
not	dl
mov	[edi], al
sub	edi, ebp
and	dl, 20h
or	dl, 45h
mov	eax, edi
mov	[edi], dl
lea	edx, [eax+1]

loc_793001:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_793001
sub	eax, edx
add	eax, edi
push	eax
push	edi
mov	ecx, esi
call	sub_792980
mov	ecx, [esp+24h+var_4]
mov	eax, [esp+24h+var_14]
pop	edi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn

loc_79302B:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_792DC0 endp

align 10h



sub_793040 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
cmp	[esp+8+arg_8], 0
push	ebx
push	ebp
push	edi
mov	ebp, 1
jz	short loc_793072
mov	eax, [esp+14h+arg_10]
neg	eax
cmp	[esp+14h+arg_4], eax
jle	short loc_793072
mov	ecx, [esp+14h+arg_0]
cmp	byte ptr [ecx],	0
jz	short loc_793072
push	2Dh
mov	ecx, esi
call	sub_792BF0
jmp	short loc_7930B7

loc_793072:
test	[esp+14h+arg_C], 800h
jz	short loc_7930B7
cmp	[esi+118h], esi
jnz	short loc_79308E
mov	eax, esi
sub	eax, [esi+10h]
add	eax, 10h
jmp	short loc_793093

loc_79308E:
mov	eax, [esi]
sub	eax, [esi+10h]

loc_793093:
cmp	eax, ebp
jnz	short loc_7930A7
push	ebp
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_7930A7:
mov	edx, [esi+10h]
mov	byte ptr [edx+1], 0
mov	eax, [esi+10h]
mov	byte ptr [eax],	2Bh
add	[esi+10h], ebp

loc_7930B7:
mov	edi, [esp+14h+arg_4]
test	edi, edi
jle	short loc_7930D1

loc_7930BF:
mov	ecx, [esp+14h+arg_0]
mov	al, [ecx]
test	al, al
jz	short loc_7930D1
add	[esp+14h+arg_0], ebp
mov	bl, al
jmp	short loc_7930D3

loc_7930D1:
mov	bl, 30h

loc_7930D3:
mov	edx, [esi+118h]
mov	eax, [esi+10h]
cmp	edx, esi
jnz	short loc_7930E9
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_7930ED

loc_7930E9:
mov	ecx, [esi]
sub	ecx, eax

loc_7930ED:
cmp	ecx, ebp
jnz	short loc_79312E
sub	eax, edx
mov	edx, 0FFFFFFFEh
sub	edx, eax
mov	[esp+14h+var_8], ebp
mov	[esp+14h+arg_8], eax
cmp	edx, ebp
jb	short loc_793176
lea	ecx, [esp+14h+arg_8]
cmp	eax, ebp
ja	short loc_793112
lea	ecx, [esp+14h+var_8]

loc_793112:
mov	ecx, [ecx]
lea	ecx, [ecx+eax+1]
cmp	ecx, 0FFFFFFFEh
ja	short loc_793121
cmp	ecx, eax
jnb	short loc_793126

loc_793121:
mov	ecx, 0FFFFFFFEh

loc_793126:		; size_t
push	ecx
mov	ecx, esi
call	sub_7854D0

loc_79312E:
mov	edx, [esi+10h]
mov	byte ptr [edx+1], 0
mov	eax, [esi+10h]
mov	[eax], bl
add	[esi+10h], ebp
mov	eax, [esi+10h]
sub	edi, ebp
test	edi, edi
jg	loc_7930BF
mov	ecx, [esi+118h]
mov	edx, eax
sub	edx, ecx
test	[esp+14h+arg_C], 400h
mov	[esp+14h+var_4], edx
jnz	short loc_793169
cmp	[esp+14h+arg_10], 0
jle	short loc_7931AB

loc_793169:
cmp	ecx, esi
jnz	short loc_793180
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_793184

loc_793176:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70

loc_793180:
mov	ecx, [esi]
sub	ecx, eax

loc_793184:
cmp	ecx, ebp
jnz	short loc_793198
push	ebp
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_793198:
mov	ecx, [esi+10h]
mov	byte ptr [ecx+1], 0
mov	edx, [esi+10h]
mov	byte ptr [edx],	2Eh
add	[esi+10h], ebp
mov	eax, [esi+10h]

loc_7931AB:
mov	edi, [esp+14h+arg_0]
mov	cl, [edi]
test	cl, cl
jz	loc_793258
lea	esp, [esp+0]

loc_7931C0:
sub	[esp+14h+arg_10], ebp
js	loc_793258
mov	edx, [esp+14h+arg_4]
add	edx, ebp
mov	[esp+14h+arg_4], edx
test	edx, edx
jg	short loc_7931DC
mov	bl, 30h
jmp	short loc_7931E0

loc_7931DC:
mov	bl, cl
add	edi, ebp

loc_7931E0:
mov	edx, [esi+118h]
cmp	edx, esi
jnz	short loc_7931F3
mov	ecx, esi
sub	ecx, eax
add	ecx, 10h
jmp	short loc_7931F7

loc_7931F3:
mov	ecx, [esi]
sub	ecx, eax

loc_7931F7:
cmp	ecx, ebp
jnz	short loc_79323C
sub	eax, edx
mov	ecx, 0FFFFFFFEh
sub	ecx, eax
mov	[esp+14h+var_8], ebp
mov	[esp+14h+arg_8], eax
cmp	ecx, ebp
jb	loc_793176
lea	ecx, [esp+14h+arg_8]
cmp	eax, ebp
ja	short loc_793220
lea	ecx, [esp+14h+var_8]

loc_793220:
mov	edx, [ecx]
lea	ecx, [edx+eax+1]
cmp	ecx, 0FFFFFFFEh
ja	short loc_79322F
cmp	ecx, eax
jnb	short loc_793234

loc_79322F:
mov	ecx, 0FFFFFFFEh

loc_793234:		; size_t
push	ecx
mov	ecx, esi
call	sub_7854D0

loc_79323C:
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], bl
add	[esi+10h], ebp
mov	cl, [edi]
mov	eax, [esi+10h]
test	cl, cl
jnz	loc_7931C0

loc_793258:
mov	eax, [esp+14h+arg_10]
test	eax, eax
jle	short loc_79326A
push	30h
push	eax
mov	ecx, esi
call	sub_792A60

loc_79326A:
mov	eax, [esp+14h+var_4]
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_793040 endp

align 10h



sub_793280 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	edx, [esp+4+arg_8]
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
mov	esi, eax
mov	eax, edi
and	eax, 0C0h
sub	eax, 40h
jz	loc_793368
sub	eax, 40h
jz	loc_79334E
mov	ebx, edi
and	ebx, 400h
jnz	short loc_7932BE
test	ecx, ecx
jg	short loc_7932C7
lea	ecx, [ebx+6]
jmp	short loc_7932C7

loc_7932BE:
test	ecx, ecx
jnz	short loc_7932C7
mov	ecx, 1

loc_7932C7:
cmp	byte ptr [esp+10h+arg_C], 0
jz	short loc_7932D3
mov	ebp, 1

loc_7932D3:
mov	eax, ecx
test	ebx, ebx
jnz	short loc_793310
mov	edx, esi
lea	ebx, [edx+1]
mov	[esp+10h+var_4], ebx

loc_7932E2:
mov	bl, [edx]
inc	edx
test	bl, bl
jnz	short loc_7932E2
sub	edx, [esp+10h+var_4]
cmp	edx, ecx
jnb	short loc_7932F3
mov	eax, edx

loc_7932F3:
cmp	eax, 1
jl	short loc_79330C
mov	dl, 30h
lea	ebx, [ebx+0]

loc_793300:
cmp	[esi+eax-1], dl
jnz	short loc_79330C
dec	eax
cmp	eax, 1
jge	short loc_793300

loc_79330C:
mov	edx, [esp+10h+arg_8]

loc_793310:
cmp	ebp, 0FFFFFFFDh
jl	short loc_793331
cmp	ebp, ecx
jg	short loc_793331
sub	eax, ebp
push	eax
push	edi
push	edx
push	ebp
push	esi
mov	esi, [esp+24h+arg_0]
call	sub_793040
add	esp, 14h
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn

loc_793331:
dec	eax
push	eax
mov	eax, [esp+14h+arg_C]
push	edi
push	eax
push	edx
mov	ecx, esi
mov	esi, [esp+20h+arg_0]
push	ebp
call	sub_792DC0
add	esp, 14h
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn

loc_79334E:
push	ecx
mov	ecx, [esp+14h+arg_C]
push	edi
push	ecx
push	edx
mov	ecx, esi
push	ebp
mov	esi, ebx
call	sub_792DC0
add	esp, 14h
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn

loc_793368:
push	ecx
push	edi
push	edx
push	ebp
push	esi
mov	esi, ebx
call	sub_793040
add	esp, 14h
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_793280 endp

align 10h



; int __cdecl sub_793380(int, double)
sub_793380 proc	near

var_160= qword ptr -160h
var_145= byte ptr -145h
PtSign=	dword ptr -144h
PtDec= dword ptr -140h
DstBuf=	byte ptr -13Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8

sub	esp, 148h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+148h+var_4], eax
fld	[esp+148h+arg_4]
push	esi
mov	esi, [esp+14Ch+arg_0]
lea	eax, [esp+14Ch+PtSign]
push	eax		; PtSign
lea	ecx, [esp+150h+PtDec]
push	ecx		; PtDec
push	0		; NumOfDec
sub	esp, 8
fstp	[esp+160h+var_160]
lea	edx, [esp+160h+DstBuf]
push	135h		; Size
push	edx		; DstBuf
call	__fcvt_s
add	esp, 1Ch
cmp	[esp+14Ch+PtSign], 0
jz	short loc_79340A
cmp	[esi+118h], esi
jnz	short loc_7933E0
mov	eax, esi
sub	eax, [esi+10h]
add	eax, 10h
jmp	short loc_7933E5

loc_7933E0:
mov	eax, [esi]
sub	eax, [esi+10h]

loc_7933E5:
cmp	eax, 1
jnz	short loc_7933FA
push	eax
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_7933FA:
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	byte ptr [ecx],	2Dh
inc	dword ptr [esi+10h]

loc_79340A:
mov	eax, [esp+14Ch+PtDec]
lea	edx, [esp+14Ch+var_145]
push	edx
lea	ecx, [esp+eax+150h+DstBuf]
push	ecx
lea	edx, [esp+154h+DstBuf]
push	edx
mov	ecx, esi
call	sub_785900
mov	ecx, [esp+14Ch+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 148h
retn
sub_793380 endp

align 10h



sub_793440 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
cmp	byte ptr [esp+8+arg_10], 0
mov	eax, [esp+8+arg_0]
push	ebx
mov	ebx, [eax+10h]
push	ebp
push	esi
push	edi
mov	edi, [eax+118h]
mov	[esp+18h+arg_0], ebx
jz	loc_79353E
cmp	edi, ebx
jz	loc_793629
mov	ebp, [esp+18h+arg_8]
mov	esi, [esp+18h+arg_4]
jmp	short loc_793479

loc_793475:
mov	ebx, [esp+18h+arg_0]

loc_793479:
mov	al, [edi]
cmp	al, 2Eh
jz	loc_793538
mov	byte ptr [esp+18h+arg_10], al
mov	ecx, [esp+18h+arg_10]
mov	eax, [ebp+0]
mov	edx, [eax+28h]
push	ecx
mov	ecx, ebp
call	edx
mov	edx, [esi+228h]
movzx	ebx, ax
mov	eax, [esi+20h]
cmp	edx, esi
jnz	short loc_7934B9
mov	ebp, eax
sub	ebp, esi
sar	ebp, 1
mov	ecx, 10h
sub	ecx, ebp
mov	ebp, [esp+18h+arg_8]
jmp	short loc_7934BF

loc_7934B9:
mov	ecx, [esi]
sub	ecx, eax
sar	ecx, 1

loc_7934BF:
cmp	ecx, 1
jnz	short loc_793508
sub	eax, edx
mov	[esp+18h+var_4], ecx
sar	eax, 1
mov	ecx, 7FFFFFFEh
sub	ecx, eax
mov	[esp+18h+var_8], eax
cmp	ecx, 1
jb	short loc_79352E
lea	ecx, [esp+18h+var_8]
cmp	eax, 1
ja	short loc_7934E9
lea	ecx, [esp+18h+var_4]

loc_7934E9:
mov	edx, [ecx]
lea	ecx, [eax+edx+1]
cmp	ecx, 7FFFFFFEh
ja	short loc_7934FB
cmp	ecx, eax
jnb	short loc_793500

loc_7934FB:
mov	ecx, 7FFFFFFEh

loc_793500:
push	ecx
mov	ecx, esi
call	sub_792AF0

loc_793508:
mov	eax, [esi+20h]
xor	ecx, ecx
mov	[eax+2], cx
mov	edx, [esi+20h]
mov	[edx], bx
add	dword ptr [esi+20h], 2
inc	edi
cmp	edi, [esp+18h+arg_0]
jnz	loc_793475
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn

loc_79352E:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70

loc_793538:
mov	eax, [esp+18h+arg_C]
jmp	short loc_793566

loc_79353E:
cmp	edi, ebx
jz	loc_793629
mov	cl, [edi]
mov	ebp, [esp+18h+arg_8]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
mov	byte ptr [esp+18h+arg_10], cl
mov	eax, [esp+18h+arg_10]
push	eax
mov	ecx, ebp
call	edx
mov	esi, [esp+18h+arg_4]
movzx	eax, ax

loc_793566:
push	eax
mov	ecx, esi
call	sub_792B90
cmp	edi, ebx
jz	loc_793629
inc	edi
cmp	edi, ebx
jz	loc_793629
nop

loc_793580:
mov	al, [edi]
mov	edx, [ebp+0]
mov	edx, [edx+28h]
mov	byte ptr [esp+18h+arg_10], al
mov	eax, [esp+18h+arg_10]
push	eax
mov	ecx, ebp
call	edx
mov	edx, [esi+228h]
movzx	ebx, ax
mov	eax, [esi+20h]
cmp	edx, esi
jnz	short loc_7935B8
mov	ebp, eax
sub	ebp, esi
sar	ebp, 1
mov	ecx, 10h
sub	ecx, ebp
mov	ebp, [esp+18h+arg_8]
jmp	short loc_7935BE

loc_7935B8:
mov	ecx, [esi]
sub	ecx, eax
sar	ecx, 1

loc_7935BE:
cmp	ecx, 1
jnz	short loc_79360B
sub	eax, edx
mov	[esp+18h+var_8], ecx
sar	eax, 1
mov	ecx, 7FFFFFFEh
sub	ecx, eax
mov	[esp+18h+var_4], eax
cmp	ecx, 1
jb	loc_79352E
lea	ecx, [esp+18h+var_4]
cmp	eax, 1
ja	short loc_7935EC
lea	ecx, [esp+18h+var_8]

loc_7935EC:
mov	edx, [ecx]
lea	ecx, [edx+eax+1]
cmp	ecx, 7FFFFFFEh
ja	short loc_7935FE
cmp	ecx, eax
jnb	short loc_793603

loc_7935FE:
mov	ecx, 7FFFFFFEh

loc_793603:
push	ecx
mov	ecx, esi
call	sub_792AF0

loc_79360B:
mov	eax, [esi+20h]
xor	ecx, ecx
mov	[eax+2], cx
mov	edx, [esi+20h]
mov	[edx], bx
add	dword ptr [esi+20h], 2
inc	edi
cmp	edi, [esp+18h+arg_0]
jnz	loc_793580

loc_793629:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_793440 endp

align 10h



; int __cdecl sub_793640(int, double)
sub_793640 proc	near

var_180= qword ptr -180h
var_174= qword ptr -174h
PtSign=	dword ptr -164h
PtDec= dword ptr -160h
var_15C= qword ptr -15Ch
DstBuf=	byte ptr -14Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8

sub	esp, 164h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+164h+var_4], eax
fld	[esp+164h+arg_4]
push	esi
mov	esi, [esp+168h+arg_0]
fld	st
fucomp	st(1)
push	edi
mov	edi, ecx
fnstsw	ax
test	ah, 44h
jp	loc_7937BE
xor	eax, eax
mov	word ptr [esp+16Ch+var_15C], ax
xor	ecx, ecx
xor	edx, edx
mov	eax, 7FF0h
mov	word ptr [esp+16Ch+var_15C+6], ax
mov	word ptr [esp+16Ch+var_15C+2], cx
mov	word ptr [esp+16Ch+var_15C+4], dx
fld	[esp+16Ch+var_15C]
fucomp	st(1)
fnstsw	ax
test	ah, 44h
jnp	loc_7937BE
mov	word ptr [esp+16Ch+var_15C], cx
xor	eax, eax
mov	ecx, 7FF0h
mov	word ptr [esp+16Ch+var_15C+4], ax
mov	word ptr [esp+16Ch+var_15C+2], dx
mov	word ptr [esp+16Ch+var_15C+6], cx
fld	[esp+16Ch+var_15C]
fchs
fucomp	st(1)
fnstsw	ax
test	ah, 44h
jnp	loc_7937BE
mov	edx, ebx
and	dl, 0C0h
cmp	dl, 40h
jz	short loc_793719
cmp	esi, 11h
mov	[esp+16Ch+PtDec], 11h
lea	eax, [esp+16Ch+PtDec]
jg	short loc_7936F5
lea	eax, [esp+16Ch+arg_0]

loc_7936F5:
mov	eax, [eax]
lea	ecx, [esp+16Ch+PtSign]
push	ecx		; PtSign
lea	edx, [esp+170h+PtDec]
push	edx		; PtDec
push	eax		; NumOfDights
sub	esp, 8
fstp	[esp+180h+var_180]
lea	ecx, [esp+180h+DstBuf]
push	146h		; Size
push	ecx		; DstBuf
call	__ecvt_s
jmp	short loc_793772

loc_793719:
fld	ds:dbl_15FCD60
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_793738
fld1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
mov	eax, 144h
jz	short loc_79373D

loc_793738:
mov	eax, 11h

loc_79373D:
mov	[esp+16Ch+PtSign], eax
cmp	eax, esi
lea	eax, [esp+16Ch+PtSign]
jl	short loc_793750
lea	eax, [esp+16Ch+arg_0]

loc_793750:
lea	edx, [esp+16Ch+PtSign]
push	edx		; PtSign
mov	edx, [eax]
lea	ecx, [esp+170h+PtDec]
push	ecx		; PtDec
push	edx		; NumOfDec
sub	esp, 8
fstp	[esp+180h+var_180]
lea	eax, [esp+180h+DstBuf]
push	146h		; Size
push	eax		; DstBuf
call	__fcvt_s

loc_793772:
fldz
add	esp, 1Ch
fcomp	[esp+16Ch+arg_4]
fnstsw	ax
test	ah, 44h
jp	short loc_793789
mov	al, 1
jmp	short loc_79378B

loc_793789:
xor	al, al

loc_79378B:
mov	ecx, [esp+16Ch+PtSign]
mov	edx, [esp+16Ch+PtDec]
push	eax
push	ecx
push	edx
push	edi
mov	ecx, esi
mov	edi, ebx
lea	eax, [esp+17Ch+DstBuf]
call	sub_793280
add	esp, 10h
pop	edi
pop	esi
mov	ecx, [esp+164h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 164h
retn

loc_7937BE:
sub	esp, 8
mov	eax, ebx
fstp	[esp+174h+var_174]
call	sub_792C40
mov	ecx, [esp+174h+var_4]
add	esp, 8
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 164h
retn
sub_793640 endp

align 10h



; int __cdecl sub_7937F0(int, double)
sub_7937F0 proc	near

var_180= qword ptr -180h
var_174= qword ptr -174h
PtSign=	dword ptr -164h
PtDec= dword ptr -160h
var_15C= qword ptr -15Ch
DstBuf=	byte ptr -14Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8

sub	esp, 164h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+164h+var_4], eax
fld	[esp+164h+arg_4]
push	esi
mov	esi, [esp+168h+arg_0]
fld	st
fucomp	st(1)
push	edi
mov	edi, ecx
fnstsw	ax
test	ah, 44h
jp	loc_79396E
xor	eax, eax
mov	word ptr [esp+16Ch+var_15C], ax
xor	ecx, ecx
xor	edx, edx
mov	eax, 7FF0h
mov	word ptr [esp+16Ch+var_15C+6], ax
mov	word ptr [esp+16Ch+var_15C+2], cx
mov	word ptr [esp+16Ch+var_15C+4], dx
fld	[esp+16Ch+var_15C]
fucomp	st(1)
fnstsw	ax
test	ah, 44h
jnp	loc_79396E
mov	word ptr [esp+16Ch+var_15C], cx
xor	eax, eax
mov	ecx, 7FF0h
mov	word ptr [esp+16Ch+var_15C+4], ax
mov	word ptr [esp+16Ch+var_15C+2], dx
mov	word ptr [esp+16Ch+var_15C+6], cx
fld	[esp+16Ch+var_15C]
fchs
fucomp	st(1)
fnstsw	ax
test	ah, 44h
jnp	loc_79396E
mov	edx, ebx
and	dl, 0C0h
cmp	dl, 40h
jz	short loc_7938C9
cmp	esi, 11h
mov	[esp+16Ch+PtDec], 11h
lea	eax, [esp+16Ch+PtDec]
jg	short loc_7938A5
lea	eax, [esp+16Ch+arg_0]

loc_7938A5:
mov	eax, [eax]
lea	ecx, [esp+16Ch+PtSign]
push	ecx		; PtSign
lea	edx, [esp+170h+PtDec]
push	edx		; PtDec
push	eax		; NumOfDights
sub	esp, 8
fstp	[esp+180h+var_180]
lea	ecx, [esp+180h+DstBuf]
push	146h		; Size
push	ecx		; DstBuf
call	__ecvt_s
jmp	short loc_793922

loc_7938C9:
fld	ds:dbl_15FCD60
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_7938E8
fld1
fcomp	st(1)
fnstsw	ax
test	ah, 41h
mov	eax, 144h
jz	short loc_7938ED

loc_7938E8:
mov	eax, 11h

loc_7938ED:
mov	[esp+16Ch+PtSign], eax
cmp	eax, esi
lea	eax, [esp+16Ch+PtSign]
jl	short loc_793900
lea	eax, [esp+16Ch+arg_0]

loc_793900:
lea	edx, [esp+16Ch+PtSign]
push	edx		; PtSign
mov	edx, [eax]
lea	ecx, [esp+170h+PtDec]
push	ecx		; PtDec
push	edx		; NumOfDec
sub	esp, 8
fstp	[esp+180h+var_180]
lea	eax, [esp+180h+DstBuf]
push	146h		; Size
push	eax		; DstBuf
call	__fcvt_s

loc_793922:
fldz
add	esp, 1Ch
fcomp	[esp+16Ch+arg_4]
fnstsw	ax
test	ah, 44h
jp	short loc_793939
mov	al, 1
jmp	short loc_79393B

loc_793939:
xor	al, al

loc_79393B:
mov	ecx, [esp+16Ch+PtSign]
mov	edx, [esp+16Ch+PtDec]
push	eax
push	ecx
push	edx
push	edi
mov	ecx, esi
mov	edi, ebx
lea	eax, [esp+17Ch+DstBuf]
call	sub_793280
add	esp, 10h
pop	edi
pop	esi
mov	ecx, [esp+164h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 164h
retn

loc_79396E:
sub	esp, 8
mov	eax, ebx
fstp	[esp+174h+var_174]
call	sub_792D00
mov	ecx, [esp+174h+var_4]
add	esp, 8
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 164h
retn
sub_7937F0 endp

align 10h



; int __cdecl sub_7939A0(int, int, int,	double)
sub_7939A0 proc	near

var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h

fld	[esp+arg_C]
mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
sub	esp, 8
fstp	[esp+0Ch+var_C]
push	eax		; int
call	sub_793640
add	esp, 0Ch
pop	ebx
retn
sub_7939A0 endp

align 10h



; int __cdecl sub_7939D0(int, int, int,	double)
sub_7939D0 proc	near

var_C= qword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= qword ptr  10h

fld	[esp+arg_C]
mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_0]
push	ebx
mov	ebx, [esp+4+arg_4]
sub	esp, 8
fstp	[esp+0Ch+var_C]
push	eax		; int
call	sub_7937F0
add	esp, 0Ch
pop	ebx
retn
sub_7939D0 endp

align 10h



sub_793A00 proc	near
mov	eax, offset a0123456789ab_1 ; "0123456789abcdefx"
retn
sub_793A00 endp

align 10h



sub_793A10 proc	near
mov	eax, offset a0123456789ab_2 ; "0123456789ABCDEFX"
retn
sub_793A10 endp

align 10h



sub_793A20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+44h+var_4], eax
mov	eax, [esp+44h+arg_8]
mov	ecx, [esp+44h+arg_4]
push	esi
push	edi
mov	edi, [esp+4Ch+arg_0]
push	eax
push	ecx
lea	edx, [esp+54h+var_4]
push	edx
call	sub_780BE0
lea	esi, [esp+58h+var_4]
add	esp, 0Ch
sub	esi, eax
jz	short loc_793A71
push	esi
push	eax
push	edi
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
add	eax, esi
pop	esi
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_793A71:
mov	ecx, [esp+4Ch+var_4]
mov	eax, edi
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn
sub_793A20 endp

align 10h



sub_793A90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h
arg_14=	byte ptr  18h
arg_18=	dword ptr  1Ch

mov	edx, [esp+arg_0]
push	ebp
mov	ebp, [esp+4+arg_4]
cmp	edx, ebp
jnz	short loc_793AA1
xor	eax, eax
pop	ebp
retn

loc_793AA1:
mov	al, [edx]
push	ebx
xor	ebx, ebx
push	esi
push	edi
mov	[esp+10h+arg_4], ebx
cmp	al, [esp+10h+arg_10]
jz	short loc_793AB8
cmp	al, [esp+10h+arg_14]
jnz	short loc_793AC1

loc_793AB8:
mov	[esp+10h+arg_4], 1
inc	edx

loc_793AC1:
add	edx, [esp+10h+arg_18]
mov	esi, ebp
mov	[esp+10h+arg_0], edx
xor	edi, edi
lea	ecx, [ecx+0]

loc_793AD0:
mov	ecx, [esp+10h+arg_8]
mov	eax, [ecx+14h]
mov	ecx, [ecx+10h]
sub	ecx, eax
cmp	ebx, ecx
jnb	short loc_793AE5
movsx	edi, byte ptr [eax+ebx]
inc	ebx

loc_793AE5:
test	edi, edi
jle	short loc_793B1D
mov	eax, esi
sub	eax, edx
cmp	edi, eax
jge	short loc_793B1D
cmp	edi, 7Fh
jz	short loc_793B1D
inc	ebp
sub	esi, edi
mov	eax, ebp
sub	eax, esi
test	eax, eax
jle	short loc_793B15
push	eax
mov	ecx, ebp
sub	ecx, eax
inc	ecx
push	esi
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+1Ch+arg_0]
add	esp, 0Ch

loc_793B15:
mov	al, [esp+10h+arg_C]
mov	[esi], al
jmp	short loc_793AD0

loc_793B1D:
mov	eax, [esp+10h+arg_4]
pop	edi
sub	eax, edx
pop	esi
add	eax, ebp
add	eax, [esp+8+arg_18]
pop	ebx
pop	ebp
retn
sub_793A90 endp

align 10h



sub_793B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= word ptr	 0Ch
arg_C= word ptr	 10h
arg_10=	word ptr  14h
arg_14=	dword ptr  18h

push	ecx
push	ebx
mov	ebx, eax
mov	eax, [esp+8+arg_0]
cmp	eax, ebx
jnz	short loc_793B41
xor	eax, eax
pop	ebx
pop	ecx
retn

loc_793B41:
movzx	ecx, word ptr [eax]
push	ebp
xor	ebp, ebp
push	esi
push	edi
mov	[esp+14h+var_4], ebp
cmp	cx, [esp+14h+arg_C]
jz	short loc_793B5B
cmp	cx, [esp+14h+arg_10]
jnz	short loc_793B66

loc_793B5B:
mov	[esp+14h+var_4], 1
add	eax, 2

loc_793B66:
mov	ecx, [esp+14h+arg_14]
lea	edx, [eax+ecx*2]
mov	[esp+14h+arg_0], edx
mov	esi, ebx
xor	edi, edi

loc_793B75:
mov	ecx, [esp+14h+arg_4]
mov	eax, [ecx+14h]
mov	ecx, [ecx+10h]
sub	ecx, eax
cmp	ebp, ecx
jnb	short loc_793B8A
movsx	edi, byte ptr [eax+ebp]
inc	ebp

loc_793B8A:
test	edi, edi
jle	short loc_793BCF
mov	eax, esi
sub	eax, edx
sar	eax, 1
cmp	edi, eax
jge	short loc_793BCF
cmp	edi, 7Fh
jz	short loc_793BCF
mov	ecx, edi
neg	ecx
add	ebx, 2
lea	esi, [esi+ecx*2]
mov	eax, ebx
sub	eax, esi
test	eax, eax
jle	short loc_793BC5
push	eax
mov	edx, ebx
sub	edx, eax
add	edx, 2
push	esi
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+20h+arg_0]
add	esp, 0Ch

loc_793BC5:
mov	ax, [esp+14h+arg_8]
mov	[esi], ax
jmp	short loc_793B75

loc_793BCF:
mov	eax, ebx
sub	eax, edx
pop	edi
sar	eax, 1
add	eax, [esp+10h+var_4]
pop	esi
add	eax, [esp+0Ch+arg_14]
pop	ebp
pop	ebx
pop	ecx
retn
sub_793B30 endp

align 10h


; Attributes: thunk

sub_793BF0 proc	near
jmp	sub_793A90
sub_793BF0 endp

align 10h



sub_793C00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_18]
mov	ecx, [esp+arg_14]
mov	edx, [esp+arg_10]
push	eax
mov	eax, [esp+4+arg_C]
push	ecx
mov	ecx, [esp+8+arg_8]
push	edx
mov	edx, [esp+0Ch+arg_0]
push	eax
mov	eax, [esp+10h+arg_4]
push	ecx
push	edx
call	sub_793B30
add	esp, 18h
retn
sub_793C00 endp

align 10h



sub_793C30 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
cmp	[esi+118h], esi
jnz	short loc_793C4C
mov	eax, esi
sub	eax, ecx
add	eax, 10h
jmp	short loc_793C50

loc_793C4C:
mov	eax, [esi]
sub	eax, ecx

loc_793C50:
cmp	eax, 1
jbe	short loc_793C7E
mov	byte ptr [ecx+1], 0
mov	eax, [esi+10h]
sub	eax, ebx
jz	short loc_793C6E
push	eax
lea	eax, [ebx+1]
push	ebx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_793C6E:
mov	cl, [esp+8+arg_4]
mov	[ebx], cl
inc	dword ptr [esi+10h]
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_793C7E:
push	ebp
push	edi
push	1
mov	ecx, esi
call	sub_7817C0
mov	[esp+10h+arg_0], eax
lea	ecx, [esi+14h]
cmp	eax, 101h
jbe	short loc_793CA3
push	0		; int
push	eax		; size_t
call	sub_780550
mov	ebp, eax
jmp	short loc_793CA5

loc_793CA3:
mov	ebp, ecx

loc_793CA5:
mov	eax, [esi+118h]
push	0
lea	edx, [esp+14h+arg_4]
push	edx
push	ebp
push	ebx
push	eax
call	sub_405470
mov	edi, eax
mov	al, [esp+24h+arg_4]
push	0
lea	ecx, [esp+28h+arg_4]
push	ecx
lea	edx, [edi+1]
mov	[edi], al
mov	eax, [esi+10h]
push	edx
push	eax
push	ebx
call	sub_405470
mov	ebx, eax
mov	byte ptr [ebx],	0
mov	eax, [esi+118h]
add	esp, 28h
cmp	eax, esi
jz	short loc_793D15
test	eax, eax
jz	short loc_793D15
mov	ecx, [esi]
lea	edx, [esi+14h]
sub	ecx, eax
cmp	eax, edx
jz	short loc_793D15
cmp	ecx, 80h
jbe	short loc_793D0B
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_793D15

loc_793D0B:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_793D15:
mov	eax, [esp+10h+arg_0]
lea	ecx, [eax+ebp]
mov	eax, edi
pop	edi
mov	[esi+118h], ebp
pop	ebp
mov	[esi+10h], ebx
mov	[esi], ecx
pop	esi
pop	ebx
retn	8
sub_793C30 endp




sub_793D30 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esi+20h]
cmp	[esi+228h], esi
jnz	short loc_793D52
mov	edx, ecx
sub	edx, esi
sar	edx, 1
mov	eax, 10h
sub	eax, edx
jmp	short loc_793D58

loc_793D52:
mov	eax, [esi]
sub	eax, ecx
sar	eax, 1

loc_793D58:
cmp	eax, 1
jbe	short loc_793D8D
xor	eax, eax
mov	[ecx+2], ax
mov	ecx, [esi+20h]
sub	ecx, ebx
sar	ecx, 1
add	ecx, ecx
push	ecx
lea	edx, [ebx+2]
push	ebx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
mov	ax, [esp+14h+arg_4]
add	esp, 0Ch
mov	[ebx], ax
add	dword ptr [esi+20h], 2
pop	esi
mov	eax, ebx
pop	ebx
retn	8

loc_793D8D:
push	ebp
push	edi
push	1
mov	ecx, esi
call	sub_781900
mov	[esp+10h+arg_0], eax
lea	ecx, [esi+24h]
cmp	eax, 101h
jbe	short loc_793DB2
push	0
push	eax
call	sub_7805C0
mov	ebp, eax
jmp	short loc_793DB4

loc_793DB2:
mov	ebp, ecx

loc_793DB4:
mov	eax, [esi+228h]
push	0
lea	ecx, [esp+14h+arg_4]
push	ecx
push	ebp
push	ebx
push	eax
call	sub_405400
mov	dx, [esp+24h+arg_4]
mov	edi, eax
push	0
mov	[edi], dx
mov	eax, [esi+20h]
lea	ecx, [esp+28h+arg_4]
push	ecx
lea	edx, [edi+2]
push	edx
push	eax
push	ebx
call	sub_405400
mov	ebx, eax
xor	eax, eax
mov	[ebx], ax
mov	eax, [esi+228h]
add	esp, 28h
cmp	eax, esi
jz	short loc_793E2C
test	eax, eax
jz	short loc_793E2C
lea	ecx, [esi+24h]
cmp	eax, ecx
jz	short loc_793E2C
mov	ecx, [esi]
sub	ecx, eax
sar	ecx, 1
add	ecx, ecx
cmp	ecx, 80h
jbe	short loc_793E22
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
jmp	short loc_793E2C

loc_793E22:
push	ecx
push	eax
call	sub_77E0D0
add	esp, 8

loc_793E2C:
mov	ecx, [esp+10h+arg_0]
mov	eax, edi
pop	edi
lea	edx, [ebp+ecx*2+0]
mov	[esi+228h], ebp
pop	ebp
mov	[esi+20h], ebx
mov	[esi], edx
pop	esi
pop	ebx
retn	8
sub_793D30 endp

align 10h



sub_793E50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h

mov	eax, [esi+118h]
mov	ecx, [esi+10h]
sub	ecx, eax
sub	esp, 0Ch
cmp	ecx, edx
jb	loc_793F5A
mov	cl, [eax]
push	edi
xor	edi, edi
cmp	cl, [esp+10h+arg_4]
jz	short loc_793E77
cmp	cl, [esp+10h+arg_8]
jnz	short loc_793E7C

loc_793E77:
mov	edi, 1

loc_793E7C:
add	edi, [esp+10h+arg_C]
push	ebp
mov	[esp+14h+var_C], edi
add	eax, edx
xor	edi, edi
xor	ebp, ebp
jmp	short loc_793E90
align 10h

loc_793E90:
mov	edx, [esp+14h+arg_0]
mov	ecx, [edx+14h]
mov	edx, [edx+10h]
sub	edx, ecx
cmp	ebp, edx
jnb	short loc_793EA5
movsx	edi, byte ptr [ecx+ebp]
inc	ebp

loc_793EA5:
test	edi, edi
jle	loc_793F58
mov	edx, [esi+118h]
mov	ecx, eax
sub	ecx, edx
sub	ecx, [esp+14h+var_C]
cmp	edi, ecx
jge	loc_793F58
cmp	edi, 7Fh
jz	loc_793F58
mov	ecx, [esi+10h]
sub	eax, edi
cmp	eax, ecx
jnz	short loc_793F40
cmp	edx, esi
jnz	short loc_793EE2
mov	eax, esi
sub	eax, ecx
add	eax, 10h
jmp	short loc_793EE6

loc_793EE2:
mov	eax, [esi]
sub	eax, ecx

loc_793EE6:
cmp	eax, 1
jnz	short loc_793F28
sub	ecx, edx
mov	edx, 0FFFFFFFEh
sub	edx, ecx
mov	[esp+14h+var_4], eax
mov	[esp+14h+var_8], ecx
cmp	edx, eax
jb	short loc_793F4E
cmp	ecx, eax
lea	eax, [esp+14h+var_8]
ja	short loc_793F0C
lea	eax, [esp+14h+var_4]

loc_793F0C:
mov	eax, [eax]
lea	eax, [eax+ecx+1]
cmp	eax, 0FFFFFFFEh
ja	short loc_793F1B
cmp	eax, ecx
jnb	short loc_793F20

loc_793F1B:
mov	eax, 0FFFFFFFEh

loc_793F20:		; size_t
push	eax
mov	ecx, esi
call	sub_7854D0

loc_793F28:
mov	ecx, [esi+10h]
mov	byte ptr [ecx+1], 0
mov	edx, [esi+10h]
mov	[edx], bl
inc	dword ptr [esi+10h]
mov	eax, [esi+10h]
dec	eax
jmp	loc_793E90

loc_793F40:
push	ebx
push	eax
mov	ecx, esi
call	sub_793C30
jmp	loc_793E90

loc_793F4E:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70

loc_793F58:
pop	ebp
pop	edi

loc_793F5A:
add	esp, 0Ch
retn
sub_793E50 endp

align 10h



sub_793F60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_18]
mov	ecx, [esp+arg_14]
mov	edx, [esp+arg_10]
push	ebx
mov	bl, [esp+4+arg_C]
push	esi
mov	esi, [esp+8+arg_0]
push	eax
mov	eax, [esp+0Ch+arg_8]
push	ecx
push	edx
mov	edx, [esp+14h+arg_4]
push	eax
call	sub_793E50
add	esp, 10h
pop	esi
pop	ebx
retn
sub_793F60 endp

align 10h



sub_793F90 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= word ptr	 0Ch
arg_C= word ptr	 10h
arg_10=	dword ptr  14h

mov	eax, [esi+228h]
mov	ecx, [esi+20h]
sub	ecx, eax
sar	ecx, 1
sub	esp, 0Ch
cmp	ecx, edx
jb	loc_7940C6
movzx	ecx, word ptr [eax]
push	ebp
xor	ebp, ebp
cmp	cx, [esp+10h+arg_8]
jz	short loc_793FBC
cmp	cx, [esp+10h+arg_C]
jnz	short loc_793FC1

loc_793FBC:
mov	ebp, 1

loc_793FC1:
add	ebp, [esp+10h+arg_10]
push	ebx
push	edi
xor	edi, edi
mov	[esp+18h+var_C], ebp
lea	eax, [eax+edx*2]
xor	ebx, ebx

loc_793FD2:
mov	edx, [esp+18h+arg_0]
mov	ecx, [edx+14h]
mov	edx, [edx+10h]
sub	edx, ecx
cmp	ebx, edx
jnb	short loc_793FE7
movsx	edi, byte ptr [ecx+ebx]
inc	ebx

loc_793FE7:
test	edi, edi
jle	loc_7940C3
mov	edx, [esi+228h]
mov	ecx, eax
sub	ecx, edx
sar	ecx, 1
sub	ecx, ebp
cmp	edi, ecx
jge	loc_7940C3
cmp	edi, 7Fh
jz	loc_7940C3
mov	ecx, edi
neg	ecx
lea	ecx, [eax+ecx*2]
mov	eax, [esi+20h]
cmp	ecx, eax
jnz	loc_7940A7
cmp	edx, esi
jnz	short loc_794037
mov	ebp, eax
sub	ebp, esi
sar	ebp, 1
mov	ecx, 10h
sub	ecx, ebp
mov	ebp, [esp+18h+var_C]
jmp	short loc_79403D

loc_794037:
mov	ecx, [esi]
sub	ecx, eax
sar	ecx, 1

loc_79403D:
cmp	ecx, 1
jnz	short loc_794084
sub	eax, edx
sar	eax, 1
mov	edx, 7FFFFFFEh
sub	edx, eax
mov	[esp+18h+var_4], ecx
mov	[esp+18h+var_8], eax
cmp	edx, ecx
jb	short loc_7940B9
cmp	eax, ecx
lea	ecx, [esp+18h+var_8]
ja	short loc_794065
lea	ecx, [esp+18h+var_4]

loc_794065:
mov	ecx, [ecx]
lea	ecx, [ecx+eax+1]
cmp	ecx, 7FFFFFFEh
ja	short loc_794077
cmp	ecx, eax
jnb	short loc_79407C

loc_794077:
mov	ecx, 7FFFFFFEh

loc_79407C:
push	ecx
mov	ecx, esi
call	sub_792AF0

loc_794084:
mov	edx, [esi+20h]
xor	eax, eax
mov	[edx+2], ax
mov	ecx, [esi+20h]
mov	dx, word ptr [esp+18h+arg_4]
mov	[ecx], dx
add	dword ptr [esi+20h], 2
mov	eax, [esi+20h]
add	eax, 0FFFFFFFEh
jmp	loc_793FD2

loc_7940A7:
mov	eax, [esp+18h+arg_4]
push	eax
push	ecx
mov	ecx, esi
call	sub_793D30
jmp	loc_793FD2

loc_7940B9:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70

loc_7940C3:
pop	edi
pop	ebx
pop	ebp

loc_7940C6:
add	esp, 0Ch
retn
sub_793F90 endp

align 10h



sub_7940D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_18]
mov	ecx, [esp+arg_14]
mov	edx, [esp+arg_10]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
mov	eax, [esp+8+arg_C]
push	ecx
mov	ecx, [esp+0Ch+arg_8]
push	edx
mov	edx, [esp+10h+arg_4]
push	eax
push	ecx
call	sub_793F90
add	esp, 14h
pop	esi
retn
sub_7940D0 endp

align 10h



sub_794100 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
cmp	edi, ecx
jz	loc_7941FC
mov	edx, [esi+20h]
push	ebx
push	ebp
mov	ebp, ecx
sub	ebp, edi
mov	ebx, ebp
sar	ebx, 1
mov	[esp+10h+arg_0], ebp
cmp	[esi+228h], esi
jnz	short loc_79413A
sub	edx, esi
sar	edx, 1
mov	eax, 10h
sub	eax, edx
jmp	short loc_794140

loc_79413A:
mov	eax, [esi]
sub	eax, edx
sar	eax, 1

loc_794140:
cmp	ebx, eax
jb	loc_7941C8
push	ebx
mov	ecx, esi
call	sub_781900
mov	[esp+10h+arg_4], eax
lea	ecx, [esi+24h]
cmp	eax, 101h
jbe	short loc_79416A
push	0
push	eax
call	sub_7805C0
mov	ebx, eax
jmp	short loc_79416C

loc_79416A:
mov	ebx, ecx

loc_79416C:
mov	ecx, [esi+20h]
mov	eax, [esi+228h]
cmp	ecx, eax
jnz	short loc_79417D
mov	eax, ebx
jmp	short loc_794192

loc_79417D:
mov	ebp, ecx
sub	ebp, eax
push	ebp
push	eax
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	eax, ebp
mov	ebp, [esp+10h+arg_0]

loc_794192:
push	ebp
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, eax
add	edi, ebp
xor	eax, eax
add	esp, 0Ch
mov	ecx, esi
mov	[edi], ax
call	sub_783BE0
mov	ecx, [esp+10h+arg_4]
pop	ebp
lea	edx, [ebx+ecx*2]
mov	[esi+228h], ebx
pop	ebx
mov	[esi+20h], edi
pop	edi
mov	[esi], edx
mov	eax, esi
pop	esi
retn	0Ch

loc_7941C8:
mov	dx, [edi]
mov	eax, [esi+20h]
add	edi, 2
mov	[eax], dx
cmp	ecx, edi
jz	short loc_7941EB
mov	eax, [esi+20h]
sub	ecx, edi
push	ecx
add	eax, 2
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7941EB:
mov	ecx, [esi+20h]
lea	eax, [ebx+ebx]
xor	edx, edx
pop	ebp
mov	[eax+ecx], dx
add	[esi+20h], eax
pop	ebx

loc_7941FC:
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_794100 endp

align 10h



sub_794210 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jbe	loc_7942AA
mov	ecx, [esi+20h]
mov	eax, [esi+228h]
mov	edx, ecx
push	ebx
sub	edx, eax
sar	edx, 1
mov	ebx, 7FFFFFFEh
sub	ebx, edx
cmp	edi, ebx
pop	ebx
jbe	short loc_794246
push	offset aBasic_string ; "basic_string"
call	sub_77EC70

loc_794246:
cmp	eax, esi
jnz	short loc_794257
sub	ecx, esi
sar	ecx, 1
mov	eax, 10h
sub	eax, ecx
jmp	short loc_79425D

loc_794257:
mov	eax, [esi]
sub	eax, ecx
sar	eax, 1

loc_79425D:
cmp	edi, eax
jb	short loc_794271
push	edi
mov	ecx, esi
call	sub_781900
push	eax
mov	ecx, esi
call	sub_792AF0

loc_794271:
mov	eax, [esi+20h]
push	0
lea	ecx, [esp+0Ch+arg_4]
push	ecx
add	eax, 2
lea	edx, [esp+10h+arg_4]
add	edi, edi
push	edx
lea	ecx, [edi+eax-2]
push	ecx
push	eax
call	sub_44E3E0
mov	edx, [esi+20h]
xor	eax, eax
mov	[edi+edx], ax
mov	ecx, [esi+20h]
mov	dx, [esp+1Ch+arg_4]
add	esp, 14h
mov	[ecx], dx
add	[esi+20h], edi

loc_7942AA:
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_794210 endp

align 10h



sub_7942C0 proc	near

var_C= dword ptr -0Ch

push	0FFFFFFFFh
push	offset loc_12CA999
mov	eax, large fs:0
push	eax
push	ecx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+14h+var_C]
mov	large fs:0, eax
mov	eax, ecx
mov	[eax+10h], eax
mov	[eax+14h], eax
mov	ecx, [eax+10h]
mov	byte ptr [ecx],	0
lea	ecx, [eax+18h]
mov	[ecx+10h], ecx
mov	[ecx+14h], ecx
mov	ecx, [ecx+10h]
mov	byte ptr [ecx],	0
lea	ecx, [eax+30h]
mov	[ecx+10h], ecx
mov	[ecx+14h], ecx
mov	ecx, [ecx+10h]
mov	byte ptr [ecx],	0
lea	ecx, [eax+48h]
mov	[ecx+10h], ecx
mov	[ecx+14h], ecx
mov	ecx, [ecx+10h]
mov	byte ptr [ecx],	0
lea	ecx, [eax+60h]
mov	[ecx+10h], ecx
mov	[ecx+14h], ecx
mov	ecx, [ecx+10h]
mov	byte ptr [ecx],	0
mov	ecx, [esp+14h+var_C]
mov	large fs:0, ecx
pop	ecx
add	esp, 10h
retn
sub_7942C0 endp

align 10h



sub_794340 proc	near
push	esi
push	edi
mov	esi, offset aSun_1 ; "Sun"
lea	edi, [ebx+78h]
lea	ebx, [ebx+0]

loc_794350:
mov	eax, esi
lea	edx, [eax+1]

loc_794355:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_794355
sub	eax, edx
add	eax, esi
push	eax
push	esi
mov	ecx, edi
call	sub_403980
add	esi, 0Eh
add	edi, 18h
cmp	esi, offset unk_14474EC
jl	short loc_794350
mov	esi, offset unk_14474F0
lea	edi, [ebx+1C8h]

loc_794382:
mov	eax, esi
lea	edx, [eax+1]

loc_794387:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_794387
sub	eax, edx
lea	ecx, [esi+eax]
push	ecx
push	esi
mov	ecx, edi
call	sub_403980
add	esi, 18h
add	edi, 18h
cmp	esi, offset aSun ; "Sun"
jl	short loc_794382
push	(offset	aAm_0+2)
push	offset aAm_0	; "AM"
lea	ecx, [ebx+408h]
call	sub_403980
push	(offset	aPm_0+2)
push	offset aPm_0	; "PM"
lea	ecx, [ebx+420h]
call	sub_403980
push	(offset	aHMS+8)
push	offset aHMS	; "%H:%M:%S"
mov	ecx, ebx
call	sub_403980
push	(offset	aMDY+8)
push	offset aMDY	; "%m/%d/%y"
lea	ecx, [ebx+18h]
call	sub_403980
push	(offset	aMDY+8)
push	offset aMDY	; "%m/%d/%y"
lea	ecx, [ebx+30h]
call	sub_403980
pop	edi
pop	esi
retn
sub_794340 endp

align 10h



sub_794410 proc	near
push	esi
push	edi
mov	esi, offset aSun ; "Sun"
lea	edi, [ebx+78h]
lea	ebx, [ebx+0]

loc_794420:
mov	eax, esi
lea	edx, [eax+2]

loc_794425:
mov	cx, [eax]
add	eax, 2
test	cx, cx
jnz	short loc_794425
sub	eax, edx
sar	eax, 1
lea	eax, [esi+eax*2]
push	eax
push	esi
mov	ecx, edi
call	sub_403580
add	esi, 1Ch
add	edi, 28h
cmp	esi, offset aJan ; "Jan"
jl	short loc_794420
mov	esi, offset aJan ; "Jan"
lea	edi, [ebx+2A8h]
lea	esp, [esp+0]

loc_794460:
mov	eax, esi
lea	edx, [eax+2]

loc_794465:
mov	cx, [eax]
add	eax, 2
test	cx, cx
jnz	short loc_794465
sub	eax, edx
sar	eax, 1
lea	ecx, [esi+eax*2]
push	ecx
push	esi
mov	ecx, edi
call	sub_403580
add	esi, 30h
add	edi, 28h
cmp	esi, offset aMDY ; "%m/%d/%y"
jl	short loc_794460
push	(offset	aAm+4)
push	offset aAm	; "AM"
lea	ecx, [ebx+668h]
call	sub_403580
push	(offset	aPm+4)
push	offset aPm	; "PM"
lea	ecx, [ebx+690h]
call	sub_403580
push	(offset	aHMS+8)
push	offset aHMS	; "%H:%M:%S"
mov	ecx, ebx
call	sub_403980
push	(offset	aMDY+8)
push	offset aMDY	; "%m/%d/%y"
lea	ecx, [ebx+18h]
call	sub_403980
push	(offset	aMDY+8)
push	offset aMDY	; "%m/%d/%y"
lea	ecx, [ebx+30h]
call	sub_403980
pop	edi
pop	esi
retn
sub_794410 endp




sub_7944F0 proc	near

var_2= byte ptr	-2
arg_0= dword ptr  4

push	ecx
mov	edx, [eax+10h]
mov	eax, [eax+14h]
lea	ecx, [esp+3]
push	ecx
mov	ecx, [esp+8+arg_0]
push	edx
push	eax
call	sub_785900
pop	ecx
retn
sub_7944F0 endp

align 10h



sub_794510 proc	near

var_2= byte ptr	-2
arg_0= dword ptr  4

push	ecx
mov	eax, [ecx+24h]
mov	ecx, [ecx+20h]
sub	ecx, eax
lea	edx, [esp+3]
push	edx
sar	ecx, 1
lea	edx, [eax+ecx*2]
mov	ecx, [esp+8+arg_0]
push	edx
push	eax
call	sub_794100
pop	ecx
retn
sub_794510 endp




sub_794530 proc	near

var_85=	byte ptr -85h
var_84=	byte ptr -84h
var_4= dword ptr -4

sub	esp, 88h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+88h+var_4], eax
mov	eax, [ecx]
mov	eax, [eax+24h]
push	esi
mov	esi, edx
lea	edx, [esp+8Ch+var_84]
push	edx
push	esi
push	edi
call	eax
lea	ecx, [esp+8Ch+var_85]
push	ecx
sub	esi, edi
lea	edx, [esp+esi*2+90h+var_84]
push	edx
lea	eax, [esp+94h+var_84]
push	eax
mov	ecx, ebx
call	sub_794100
mov	ecx, [esp+8Ch+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 88h
retn
sub_794530 endp

align 10h



sub_794590 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12C98A6
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
call	sub_7942C0
push	offset sub_407910
push	offset sub_482890
push	0Eh
push	18h
lea	eax, [esi+78h]
push	eax
mov	[esp+2Ch+var_4], 0
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
push	offset sub_407910
push	offset sub_482890
push	18h
push	18h
lea	ecx, [esi+1C8h]
push	ecx
mov	byte ptr [esp+2Ch+var_4], 1
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
push	offset sub_407910
push	offset sub_482890
push	2
push	18h
lea	edx, [esi+408h]
push	edx
mov	byte ptr [esp+2Ch+var_4], 2
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_794590 endp

align 10h



sub_794630 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12CA9F6
mov	eax, large fs:0
push	eax
push	ecx
push	esi
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	esi, ecx
mov	[esp+18h+var_10], esi
call	sub_7942C0
push	offset sub_407E50
push	offset sub_4561B0
push	0Eh
push	28h
lea	eax, [esi+78h]
push	eax
mov	[esp+2Ch+var_4], 0
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
push	offset sub_407E50
push	offset sub_4561B0
push	18h
push	28h
lea	ecx, [esi+2A8h]
push	ecx
mov	byte ptr [esp+2Ch+var_4], 1
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
push	offset sub_407E50
push	offset sub_4561B0
push	2
push	28h
lea	edx, [esi+668h]
push	edx
mov	byte ptr [esp+2Ch+var_4], 2
call	??_L@YGXPAXIHP6EX0@Z1@Z	; `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *))
mov	eax, esi
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	esi
add	esp, 10h
retn
sub_794630 endp

align 10h



sub_7946D0 proc	near

var_45=	byte ptr -45h
DstBuf=	byte ptr -44h
var_43=	byte ptr -43h
var_42=	byte ptr -42h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 48h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+48h+var_4], eax
movsx	eax, [esp+48h+arg_8]
mov	ecx, [esp+48h+arg_4]
push	ebp
mov	ebp, [esp+4Ch+arg_0]
push	esi
mov	esi, [esp+50h+arg_14]
add	eax, 0FFFFFFDBh
push	edi
mov	edi, [esp+54h+arg_10]
cmp	eax, 54h	; switch 85 cases
ja	loc_794B80	; default
movzx	eax, ds:byte_794BF0[eax]
push	ebx
jmp	ds:off_794B94[eax*4] ; switch jump

loc_794711:		; jumptable 0079470A case 60
mov	esi, [esi+18h]
add	esi, 5
lea	ecx, [esi+esi*2]
lea	eax, [edi+ecx*8]
push	ebp
call	sub_7944F0
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794739:		; jumptable 0079470A case 28
mov	esi, [esi+18h]
add	esi, 0Ch
lea	edx, [esi+esi*2]
lea	eax, [edi+edx*8]
push	ebp
call	sub_7944F0
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794761:		; jumptable 0079470A case 61
mov	esi, [esi+10h]
add	esi, 13h
lea	eax, [esi+esi*2]
lea	eax, [edi+eax*8]
push	ebp
call	sub_7944F0
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794789:		; jumptable 0079470A case 29
mov	esi, [esi+10h]
add	esi, 1Fh
lea	ecx, [esi+esi*2]
lea	eax, [edi+ecx*8]
push	ebp
call	sub_7944F0
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_7947B1:		; jumptable 0079470A case 62
cmp	[esp+58h+arg_C], 23h
lea	eax, [edi+30h]
jnz	short loc_7947BE
lea	eax, [edi+60h]

loc_7947BE:
push	esi
push	edi
push	eax
push	ecx
push	ebp
call	sub_795120
add	esp, 14h
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_7947DE:		; jumptable 0079470A case 63
mov	bl, [esp+58h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_7947F1
mov	eax, offset aLd	; "%ld"

loc_7947F1:
mov	edx, [esi+0Ch]
push	edx		; char
push	eax		; Format
lea	eax, [esp+60h+DstBuf]
push	eax		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi+0Ch], 0Ah
jge	short loc_794812
lea	eax, [esp+58h+var_43]
cmp	bl, 23h
jz	short loc_794816

loc_794812:
lea	eax, [esp+58h+var_42]

loc_794816:
lea	ecx, [esp+58h+var_45]
push	ecx
push	eax
lea	edx, [esp+60h+DstBuf]
push	edx
mov	ecx, ebp
call	sub_785900
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_79483B:		; jumptable 0079470A case 64
mov	eax, [esi+0Ch]
push	eax		; char
lea	ecx, [esp+5Ch+DstBuf]
push	offset a2ld	; "%2ld"
push	ecx		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
lea	edx, [esp+58h+var_45]
push	edx
lea	eax, [esp+5Ch+var_42]
push	eax
lea	ecx, [esp+60h+DstBuf]
push	ecx
mov	ecx, ebp
call	sub_785900
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_79487A:		; jumptable 0079470A case 35
mov	bl, [esp+58h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_79488D
mov	eax, offset aLd	; "%ld"

loc_79488D:
mov	edx, [esi+8]
push	edx		; char
push	eax		; Format
lea	eax, [esp+60h+DstBuf]
push	eax		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi+8], 0Ah
jge	short loc_7948AE
lea	eax, [esp+58h+var_43]
cmp	bl, 23h
jz	short loc_7948B2

loc_7948AE:
lea	eax, [esp+58h+var_42]

loc_7948B2:
lea	ecx, [esp+58h+var_45]
push	ecx
push	eax
lea	edx, [esp+60h+DstBuf]
push	edx
mov	ecx, ebp
call	sub_785900
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_7948D7:		; jumptable 0079470A case 36
mov	eax, [esi+8]
cdq
mov	ecx, 0Ch
idiv	ecx
test	edx, edx
jnz	short loc_7948E8
mov	edx, ecx

loc_7948E8:
mov	bl, [esp+58h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_7948FB
mov	eax, offset aLd	; "%ld"

loc_7948FB:		; char
push	edx
push	eax		; Format
lea	edx, [esp+60h+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
mov	eax, [esi+8]
cdq
mov	ecx, 0Ch
idiv	ecx
add	esp, 0Ch
test	edx, edx
jz	short loc_79492B
cmp	edx, 0Ah
jge	short loc_79492B
lea	eax, [esp+58h+var_43]
cmp	bl, 23h
jz	loc_794B44

loc_79492B:
lea	eax, [esp+58h+var_42]
jmp	loc_794B44

loc_794934:		; jumptable 0079470A case 69
mov	ecx, [esi+1Ch]
inc	ecx
push	ecx
jmp	loc_794AF8

loc_79493E:		; jumptable 0079470A case 72
mov	bl, [esp+58h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794951
mov	eax, offset aLd	; "%ld"

loc_794951:
mov	ecx, [esi+10h]
inc	ecx
push	ecx		; char
push	eax		; Format
lea	edx, [esp+60h+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
mov	eax, [esi+10h]
inc	eax
add	esp, 0Ch
cmp	eax, 0Ah
jmp	loc_7949F9

loc_794970:		; jumptable 0079470A case 40
mov	bl, [esp+58h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794983
mov	eax, offset aLd	; "%ld"

loc_794983:
mov	ecx, [esi+4]
push	ecx		; char
push	eax		; Format
lea	edx, [esp+60h+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi+4], 0Ah
jmp	short loc_7949F9

loc_79499B:		; jumptable 0079470A case 75
mov	esi, [esi+8]
mov	eax, 2AAAAAABh
imul	esi
sar	edx, 1
mov	eax, edx
shr	eax, 1Fh
lea	eax, [edx+eax+2Bh]
lea	ecx, [eax+eax*2]
lea	eax, [edi+ecx*8]
push	ebp
call	sub_7944F0
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_7949D2:		; jumptable 0079470A case 46
mov	bl, [esp+58h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_7949E5
mov	eax, offset aLd	; "%ld"

loc_7949E5:
mov	edx, [esi]
push	edx		; char
push	eax		; Format
lea	eax, [esp+60h+DstBuf]
push	eax		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi], 0Ah

loc_7949F9:
jge	short loc_794A08
lea	eax, [esp+58h+var_43]
cmp	bl, 23h
jz	loc_794B07

loc_794A08:
lea	eax, [esp+58h+var_42]
jmp	loc_794B07

loc_794A11:		; jumptable 0079470A case 48
mov	ecx, [esi+1Ch]
sub	ecx, [esi+18h]
mov	eax, 92492493h
add	ecx, 7
imul	ecx
add	edx, ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
push	eax
lea	ecx, [esp+5Ch+DstBuf]
push	0
push	ecx
call	sub_793A20
add	esp, 0Ch
lea	edx, [esp+58h+var_45]
push	edx
push	eax
lea	eax, [esp+60h+DstBuf]
push	eax
mov	ecx, ebp
call	sub_785900
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794A62:		; jumptable 0079470A case 82
mov	ecx, [esi+18h]
push	ecx
jmp	loc_794AF8

loc_794A6B:		; jumptable 0079470A case 50
mov	eax, [esi+18h]
mov	esi, [esi+1Ch]
test	eax, eax
jnz	short loc_794A78
inc	esi
jmp	short loc_794A7D

loc_794A78:
sub	esi, eax
add	esi, 8

loc_794A7D:
mov	eax, 92492493h
imul	esi
add	edx, esi
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
push	eax
push	0
lea	eax, [esp+60h+DstBuf]
push	eax
jmp	short loc_794AFF

loc_794A9A:		; jumptable 0079470A case 83
cmp	[esp+58h+arg_C], 23h
lea	eax, [edi+18h]
jnz	short loc_794AA7
lea	eax, [edi+48h]

loc_794AA7:
push	esi
push	edi
push	eax
push	ecx
push	ebp
call	sub_795120
add	esp, 14h
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794AC7:		; jumptable 0079470A case 51
push	esi
push	edi
push	edi
push	ecx
push	ebp
call	sub_795120
add	esp, 14h
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794AE7:		; jumptable 0079470A case 84
mov	eax, [esi+14h]
add	eax, 76Ch
cdq
mov	ecx, 64h
idiv	ecx
push	edx

loc_794AF8:
push	0
lea	edx, [esp+60h+DstBuf]
push	edx

loc_794AFF:
call	sub_793A20
add	esp, 0Ch

loc_794B07:
lea	ecx, [esp+58h+var_45]
push	ecx
push	eax
lea	edx, [esp+60h+DstBuf]
push	edx
mov	ecx, ebp
call	sub_785900
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794B2C:		; jumptable 0079470A case 52
mov	eax, [esi+14h]
add	eax, 76Ch
push	eax
lea	ecx, [esp+5Ch+DstBuf]
push	0
push	ecx
call	sub_793A20
add	esp, 0Ch

loc_794B44:
lea	edx, [esp+58h+var_45]
push	edx
push	eax
lea	eax, [esp+60h+DstBuf]
push	eax
mov	ecx, ebp
call	sub_785900
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_794B69:		; jumptable 0079470A case 0
mov	edx, [ecx]
mov	eax, [edx+18h]
push	25h
call	eax
movzx	ecx, al
push	ecx
push	1
mov	ecx, ebp
call	sub_792A60

loc_794B7F:		; jumptable 0079470A cases 1-27,30-34,37-39,41-45,47,49,53-59,65-68,70,71,73,74,76-81
pop	ebx

loc_794B80:		; default
mov	ecx, [esp+54h+var_4]
pop	edi
pop	esi
pop	ebp
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn
sub_7946D0 endp

align 4
off_794B94 dd offset loc_794B69, offset	loc_794739 ; jump table	for switch statement
dd offset loc_794789, offset loc_79487A
dd offset loc_7948D7, offset loc_794970
dd offset loc_7949D2, offset loc_794A11
dd offset loc_794A6B, offset loc_794AC7
dd offset loc_794B2C, offset loc_794711
dd offset loc_794761, offset loc_7947B1
dd offset loc_7947DE, offset loc_79483B
dd offset loc_794934, offset loc_79493E
dd offset loc_79499B, offset loc_794A62
dd offset loc_794A9A, offset loc_794AE7
dd offset loc_794B7F
byte_794BF0 db	    0,	 16h,	16h,   16h ; indirect table for	switch statement
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db	1,     2,   16h,   16h
db    16h,   16h,   16h,     3
db	4,   16h,   16h,   16h
db	5,   16h,   16h,   16h
db    16h,   16h,     6,   16h
db	7,   16h,     8,     9
db    0Ah,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    0Bh,   0Ch,   0Dh,   0Eh
db    0Fh,   16h,   16h,   16h
db    16h,   10h,   16h,   16h
db    11h,   16h,   16h,   12h
db    16h,   16h,   16h,   16h
db    16h,   16h,   13h,   14h
db    15h
align 10h



sub_794C50 proc	near

DstBuf=	byte ptr -44h
var_43=	byte ptr -43h
var_42=	byte ptr -42h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= byte ptr	 10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 44h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+44h+var_4], eax
movsx	eax, [esp+44h+arg_8]
mov	ecx, [esp+44h+arg_10]
push	ebp
mov	ebp, [esp+48h+arg_0]
push	esi
mov	esi, [esp+4Ch+arg_14]
add	eax, 0FFFFFFDBh
push	edi
mov	edi, [esp+50h+arg_4]
cmp	eax, 54h	; switch 85 cases
ja	loc_795056	; default
movzx	eax, ds:byte_7950C4[eax]
push	ebx
jmp	ds:off_795068[eax*4] ; switch jump

loc_794C91:		; jumptable 00794C8A case 60
mov	esi, [esi+18h]
add	esi, 3
lea	edx, [esi+esi*4]
lea	ecx, [ecx+edx*8]
push	ebp
call	sub_794510
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794CB9:		; jumptable 00794C8A case 28
mov	esi, [esi+18h]
add	esi, 0Ah
lea	eax, [esi+esi*4]
lea	ecx, [ecx+eax*8]
push	ebp
call	sub_794510
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794CE1:		; jumptable 00794C8A case 61
mov	esi, [esi+10h]
add	esi, 11h
lea	edx, [esi+esi*4]
lea	ecx, [ecx+edx*8]
push	ebp
call	sub_794510
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794D09:		; jumptable 00794C8A case 29
mov	esi, [esi+10h]
add	esi, 1Dh
lea	eax, [esi+esi*4]
lea	ecx, [ecx+eax*8]
push	ebp
call	sub_794510
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794D31:		; jumptable 00794C8A case 62
cmp	[esp+54h+arg_C], 23h
lea	eax, [ecx+30h]
jnz	short loc_794D3E
lea	eax, [ecx+60h]

loc_794D3E:
push	esi
push	ecx
push	eax
push	edi
push	ebp
call	sub_795210
add	esp, 14h
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794D5E:		; jumptable 00794C8A case 63
mov	bl, [esp+54h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794D71
mov	eax, offset aLd	; "%ld"

loc_794D71:
mov	ecx, [esi+0Ch]
push	ecx		; char
push	eax		; Format
lea	edx, [esp+5Ch+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi+0Ch], 0Ah

loc_794D87:
jge	short loc_794D96
lea	edx, [esp+54h+var_43]
cmp	bl, 23h
jz	loc_79501D

loc_794D96:
mov	ecx, edi
lea	edx, [esp+54h+var_42]
lea	edi, [esp+54h+DstBuf]
mov	ebx, ebp
call	sub_794530
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794DBA:		; jumptable 00794C8A case 64
mov	eax, [esi+0Ch]
push	eax		; char
lea	ecx, [esp+58h+DstBuf]
push	offset a2ld	; "%2ld"
push	ecx		; DstBuf
call	sub_43D5A0
mov	ecx, edi
lea	edx, [esp+60h+var_42]
add	esp, 0Ch
lea	edi, [esp+54h+DstBuf]
mov	ebx, ebp
call	sub_794530
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794DF4:		; jumptable 00794C8A case 35
mov	bl, [esp+54h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794E07
mov	eax, offset aLd	; "%ld"

loc_794E07:
mov	edx, [esi+8]
push	edx		; char
push	eax		; Format
lea	eax, [esp+5Ch+DstBuf]
push	eax		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi+8], 0Ah
jmp	loc_794D87

loc_794E22:		; jumptable 00794C8A case 36
mov	eax, [esi+8]
cdq
mov	ecx, 0Ch
idiv	ecx
test	edx, edx
jnz	short loc_794E33
mov	edx, ecx

loc_794E33:
mov	bl, [esp+54h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794E46
mov	eax, offset aLd	; "%ld"

loc_794E46:		; char
push	edx
push	eax		; Format
lea	edx, [esp+5Ch+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
mov	eax, [esi+8]
cdq
mov	ecx, 0Ch
idiv	ecx
add	esp, 0Ch
test	edx, edx
jz	loc_794D96
cmp	edx, 0Ah
jmp	loc_794D87

loc_794E70:		; jumptable 00794C8A case 69
mov	edx, [esi+1Ch]
inc	edx
push	edx
push	0
lea	eax, [esp+5Ch+DstBuf]
push	eax
jmp	loc_795013

loc_794E81:		; jumptable 00794C8A case 72
mov	bl, [esp+54h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794E94
mov	eax, offset aLd	; "%ld"

loc_794E94:
mov	ecx, [esi+10h]
inc	ecx
push	ecx		; char
push	eax		; Format
lea	edx, [esp+5Ch+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
mov	eax, [esi+10h]
inc	eax
add	esp, 0Ch
cmp	eax, 0Ah
jmp	loc_794D87

loc_794EB3:		; jumptable 00794C8A case 40
mov	bl, [esp+54h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794EC6
mov	eax, offset aLd	; "%ld"

loc_794EC6:
mov	ecx, [esi+4]
push	ecx		; char
push	eax		; Format
lea	edx, [esp+5Ch+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi+4], 0Ah
jmp	loc_794D87

loc_794EE1:		; jumptable 00794C8A case 75
mov	esi, [esi+8]
mov	eax, 2AAAAAABh
imul	esi
sar	edx, 1
mov	eax, edx
shr	eax, 1Fh
lea	eax, [edx+eax+29h]
lea	edx, [eax+eax*4]
lea	ecx, [ecx+edx*8]
push	ebp
call	sub_794510
add	esp, 4
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794F18:		; jumptable 00794C8A case 46
mov	bl, [esp+54h+arg_C]
mov	eax, offset a_2ld ; "%.2ld"
cmp	bl, 23h
jnz	short loc_794F2B
mov	eax, offset aLd	; "%ld"

loc_794F2B:
mov	ecx, [esi]
push	ecx		; char
push	eax		; Format
lea	edx, [esp+5Ch+DstBuf]
push	edx		; DstBuf
call	sub_43D5A0
add	esp, 0Ch
cmp	dword ptr [esi], 0Ah
jmp	loc_794D87

loc_794F44:		; jumptable 00794C8A case 48
mov	ecx, [esi+1Ch]
sub	ecx, [esi+18h]
mov	eax, 92492493h
add	ecx, 7
imul	ecx
add	edx, ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
jmp	loc_79500B

loc_794F65:		; jumptable 00794C8A case 82
mov	edx, [esi+18h]
push	edx
push	0
lea	eax, [esp+5Ch+DstBuf]
push	eax
jmp	loc_795013

loc_794F75:		; jumptable 00794C8A case 50
mov	eax, [esi+18h]
mov	esi, [esi+1Ch]
test	eax, eax
jnz	short loc_794F82
inc	esi
jmp	short loc_794F87

loc_794F82:
sub	esi, eax
add	esi, 8

loc_794F87:
mov	eax, 92492493h
imul	esi
add	edx, esi
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
jmp	short loc_79500B

loc_794F9C:		; jumptable 00794C8A case 83
cmp	[esp+54h+arg_C], 23h
lea	eax, [ecx+18h]
jnz	short loc_794FA9
lea	eax, [ecx+48h]

loc_794FA9:
push	esi
push	ecx
push	eax
push	edi
push	ebp
call	sub_795210
add	esp, 14h
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794FC9:		; jumptable 00794C8A case 51
push	esi
push	ecx
push	ecx
push	edi
push	ebp
call	sub_795210
add	esp, 14h
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_794FE9:		; jumptable 00794C8A case 84
mov	eax, [esi+14h]
add	eax, 76Ch
cdq
mov	ecx, 64h
idiv	ecx
push	edx
push	0
lea	edx, [esp+5Ch+DstBuf]
push	edx
jmp	short loc_795013

loc_795003:		; jumptable 00794C8A case 52
mov	eax, [esi+14h]
add	eax, 76Ch

loc_79500B:
push	eax
push	0
lea	ecx, [esp+5Ch+DstBuf]
push	ecx

loc_795013:
call	sub_793A20
mov	edx, eax
add	esp, 0Ch

loc_79501D:
mov	ecx, edi
lea	edi, [esp+54h+DstBuf]
mov	ebx, ebp
call	sub_794530
pop	ebx
pop	edi
pop	esi
pop	ebp
mov	ecx, [esp+44h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn

loc_79503D:		; jumptable 00794C8A case 0
mov	edx, [edi]
mov	eax, [edx+28h]
push	25h
mov	ecx, edi
call	eax
movzx	ecx, ax
push	ecx
push	1
mov	ecx, ebp
call	sub_794210

loc_795055:		; jumptable 00794C8A cases 1-27,30-34,37-39,41-45,47,49,53-59,65-68,70,71,73,74,76-81
pop	ebx

loc_795056:		; default
mov	ecx, [esp+50h+var_4]
pop	edi
pop	esi
pop	ebp
xor	ecx, esp
call	sub_7999A3
add	esp, 44h
retn
sub_794C50 endp

off_795068 dd offset loc_79503D, offset	loc_794CB9 ; jump table	for switch statement
dd offset loc_794D09, offset loc_794DF4
dd offset loc_794E22, offset loc_794EB3
dd offset loc_794F18, offset loc_794F44
dd offset loc_794F75, offset loc_794FC9
dd offset loc_795003, offset loc_794C91
dd offset loc_794CE1, offset loc_794D31
dd offset loc_794D5E, offset loc_794DBA
dd offset loc_794E70, offset loc_794E81
dd offset loc_794EE1, offset loc_794F65
dd offset loc_794F9C, offset loc_794FE9
dd offset loc_795055
byte_7950C4 db	    0,	 16h,	16h,   16h ; indirect table for	switch statement
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db	1,     2,   16h,   16h
db    16h,   16h,   16h,     3
db	4,   16h,   16h,   16h
db	5,   16h,   16h,   16h
db    16h,   16h,     6,   16h
db	7,   16h,     8,     9
db    0Ah,   16h,   16h,   16h
db    16h,   16h,   16h,   16h
db    0Bh,   0Ch,   0Dh,   0Eh
db    0Fh,   16h,   16h,   16h
db    16h,   10h,   16h,   16h
db    11h,   16h,   16h,   12h
db    16h,   16h,   16h,   16h
db    16h,   16h,   13h,   14h
db    15h
align 10h



sub_795120 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
mov	eax, [esp+8+arg_8]
push	ebx
mov	ebx, [eax+10h]
push	edi
mov	edi, [eax+14h]
mov	[esp+10h+var_4], ebx
cmp	edi, ebx
jz	loc_7951F3
push	esi
mov	esi, [esp+14h+arg_0]

loc_795140:
mov	al, [edi]
cmp	al, 25h
jnz	short loc_79517A
inc	edi
cmp	byte ptr [edi],	23h
mov	byte ptr [esp+14h+var_8], 0
jnz	short loc_795157
mov	byte ptr [esp+14h+var_8], 23h
inc	edi

loc_795157:
mov	ecx, [esp+14h+arg_10]
mov	edx, [esp+14h+arg_C]
movzx	eax, byte ptr [edi]
push	ecx
mov	ecx, [esp+18h+var_8]
push	edx
mov	edx, [esp+1Ch+arg_4]
push	ecx
push	eax
push	edx
push	esi
call	sub_7946D0
add	esp, 18h
jmp	short loc_7951E9

loc_79517A:
mov	ecx, [esi+10h]
mov	bl, al
mov	eax, [esi+118h]
mov	edx, eax
sub	edx, ecx
sub	edx, 2
mov	byte ptr [esp+14h+arg_8], bl
cmp	edx, 1
jb	short loc_7951F9
cmp	eax, esi
jnz	short loc_7951A2
mov	eax, esi
sub	eax, ecx
add	eax, 10h
jmp	short loc_7951A6

loc_7951A2:
mov	eax, [esi]
sub	eax, ecx

loc_7951A6:
cmp	eax, 1
ja	short loc_7951BC
push	1
mov	ecx, esi
call	sub_7817C0
push	eax		; size_t
mov	ecx, esi
call	sub_7854D0

loc_7951BC:
mov	eax, [esi+10h]
push	0
lea	ecx, [esp+18h+arg_8]
push	ecx
lea	edx, [esp+1Ch+arg_8]
inc	eax
push	edx
push	eax
push	eax
call	sub_44D880
mov	eax, [esi+10h]
mov	byte ptr [eax+1], 0
mov	ecx, [esi+10h]
mov	[ecx], bl
mov	ebx, [esp+28h+var_4]
add	esp, 14h
inc	dword ptr [esi+10h]

loc_7951E9:
inc	edi
cmp	edi, ebx
jnz	loc_795140
pop	esi

loc_7951F3:
pop	edi
pop	ebx
add	esp, 8
retn

loc_7951F9:		; "basic_string"
push	offset aBasic_string
call	sub_77EC70
sub_795120 endp

align 10h



sub_795210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
mov	eax, [esp+4+arg_8]
push	esi
mov	esi, [eax+14h]
mov	eax, [eax+10h]
mov	[esp+8+var_4], eax
cmp	esi, eax
jz	short loc_79527E
push	ebx
mov	ebx, [esp+0Ch+arg_C]
push	ebp
mov	ebp, [esp+10h+arg_10]
push	edi
mov	edi, [esp+14h+arg_0]

loc_795233:
mov	al, [esi]
cmp	al, 25h
jnz	short loc_795265
inc	esi
cmp	byte ptr [esi],	23h
mov	byte ptr [esp+14h+arg_8], 0
jnz	short loc_79524A
mov	byte ptr [esp+14h+arg_8], 23h
inc	esi

loc_79524A:
movzx	eax, byte ptr [esi]
mov	ecx, [esp+14h+arg_8]
mov	edx, [esp+14h+arg_4]
push	ebp
push	ebx
push	ecx
push	eax
push	edx
push	edi
call	sub_794C50
add	esp, 18h
jmp	short loc_795274

loc_795265:
cbw
movzx	eax, ax
push	eax
push	1
mov	ecx, edi
call	sub_794210

loc_795274:
inc	esi
cmp	esi, [esp+14h+var_4]
jnz	short loc_795233
pop	edi
pop	ebp
pop	ebx

loc_79527E:
pop	esi
pop	ecx
retn
sub_795210 endp

align 10h


; Attributes: thunk

sub_795290 proc	near
jmp	sub_7946D0
sub_795290 endp

align 10h


; Attributes: thunk

sub_7952A0 proc	near
jmp	sub_794C50
sub_7952A0 endp

align 10h



sub_7952B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12CAA28
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	ebx, ecx
mov	[esp+18h+var_10], ebx
call	sub_794590
xor	eax, eax
mov	[esp+18h+var_4], eax
mov	[ebx+438h], eax
call	sub_794340
mov	eax, ebx
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebx
add	esp, 10h
retn
sub_7952B0 endp

align 10h



sub_795310 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4

push	0FFFFFFFFh
push	offset loc_12CAA58
mov	eax, large fs:0
push	eax
push	ecx
push	ebx
mov	eax, dword_167FD30
xor	eax, esp
push	eax
lea	eax, [esp+18h+var_C]
mov	large fs:0, eax
mov	ebx, ecx
mov	[esp+18h+var_10], ebx
call	sub_794630
xor	eax, eax
mov	[esp+18h+var_4], eax
mov	[ebx+6B8h], eax
call	sub_794410
mov	eax, ebx
mov	ecx, [esp+18h+var_C]
mov	large fs:0, ecx
pop	ecx
pop	ebx
add	esp, 10h
retn
sub_795310 endp

align 10h



sub_795370 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= word ptr	-8
var_6= byte ptr	-6
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
mov	eax, [esp+18h+arg_10]
mov	edx, ds:dword_14480A0
mov	ecx, [esp+18h+arg_14]
push	ebx
mov	ebx, [esp+1Ch+arg_8]
push	ebp
mov	ebp, [esp+20h+arg_C]
push	esi
mov	esi, [esp+24h+arg_0]
mov	[esp+24h+var_14], eax
mov	eax, ds:dword_14480A4
mov	[esp+24h+var_18], ecx
mov	cx, ds:word_14480A8
mov	[esp+24h+var_10], edx
mov	dl, ds:byte_14480AA
push	edi
mov	edi, [esp+28h+arg_4]
mov	[esp+28h+var_C], eax
mov	eax, [esi]
mov	[esp+28h+var_8], cx
mov	[esp+28h+var_6], dl
mov	edx, [eax+28h]
push	2Bh
mov	ecx, esi
call	edx
mov	[edi], ax
mov	eax, [esi]
mov	edx, [eax+28h]
push	2Dh
mov	ecx, esi
call	edx
mov	[ebx], ax
mov	eax, [esi]
mov	edx, [eax+28h]
push	65h
mov	ecx, esi
call	edx
mov	[ebp+0], ax
mov	eax, [esi]
mov	edx, [eax+28h]
push	45h
mov	ecx, esi
call	edx
mov	ecx, [esp+28h+var_14]
mov	[ecx], ax
mov	eax, [esp+28h+var_18]
mov	edx, [esi]
mov	edx, [edx+24h]
push	eax
lea	ecx, [esp+2Ch+var_6]
push	ecx
lea	eax, [esp+30h+var_10]
push	eax
mov	ecx, esi
call	edx
mov	ecx, [esp+28h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn
sub_795370 endp

align 10h



sub_795440 proc	near

var_4= dword ptr -4
arg_0= qword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_8]
push	ebp
push	edi
mov	edi, dword ptr [esp+14h+arg_0]
xor	eax, eax
push	eax
push	edi
xor	ebp, ebp
push	ebp
push	ebx
call	__allmul
mov	[esi], eax
xor	eax, eax
push	eax
mov	eax, dword ptr [esp+18h+arg_0+4]
push	eax
push	ebp
push	ebx
mov	[esp+24h+var_4], edx
mov	[esi+4], ebp
call	__allmul
mov	ebx, eax
xor	eax, eax
add	ebx, [esp+14h+var_4]
push	eax
push	edi
mov	ebp, edx
push	eax
adc	ebp, eax
mov	eax, [esp+20h+arg_C]
push	eax
call	__allmul
xor	ecx, ecx
push	1
add	eax, ebx
mov	edi, edx
push	ecx
adc	edi, ecx
push	edi
push	eax
call	__allmul
add	[esi], eax
adc	[esi+4], edx
xor	eax, eax
push	eax
mov	eax, dword ptr [esp+18h+arg_0+4]
push	eax
xor	eax, eax
push	eax
mov	eax, [esp+20h+arg_C]
push	eax
call	__allmul
mov	ecx, eax
xor	eax, eax
add	ecx, edi
adc	edx, eax
add	ecx, ebp
pop	edi
adc	edx, eax
mov	eax, [esp+10h+arg_10]
pop	ebp
mov	[eax], ecx
mov	[eax+4], edx
pop	ebx
add	esp, 8
retn
sub_795440 endp

align 10h



sub_7954E0 proc	near

arg_0= qword ptr  4
arg_8= qword ptr  0Ch

push	ebx
push	ebp
push	esi
push	edi
mov	edi, dword ptr [esp+10h+arg_0+4]
mov	ebx, ecx
mov	edx, edi
xor	ecx, ecx
and	edx, 80000000h
or	ecx, edx
mov	ecx, dword ptr [esp+10h+arg_0]
mov	dword ptr [ebx], 0
jnz	short loc_79555B
mov	esi, dword ptr [esp+10h+arg_8+4]
cmp	ecx, 0FFFFFFFFh
jnz	short loc_795531
cmp	edi, 7FFFFFFFh
jnz	short loc_795531
mov	edx, esi
shr	edx, 1Eh
xor	ebp, ebp
cmp	edx, 3
jnz	short loc_795531
test	ebp, ebp
jnz	short loc_795531
pop	edi
pop	esi
mov	[eax], ebp
pop	ebp
mov	dword ptr [eax+4], 80000000h
pop	ebx
retn

loc_795531:
mov	edx, esi
shld	edi, ecx, 1
shr	edx, 1Fh
add	ecx, ecx
or	edx, ecx
mov	[eax], edx
mov	edx, dword ptr [esp+10h+arg_8]
xor	ebp, ebp
shld	esi, edx, 1
or	ebp, edi
mov	[eax+4], ebp
mov	dword ptr [ebx], 1
add	edx, edx
mov	ebp, esi
jmp	short loc_795568

loc_79555B:
mov	ebp, dword ptr [esp+10h+arg_8+4]
mov	edx, dword ptr [esp+10h+arg_8]
mov	[eax], ecx
mov	[eax+4], edi

loc_795568:
mov	esi, ebp
and	esi, 80000000h
xor	ecx, ecx
or	ecx, esi
jz	short loc_7955AB
mov	esi, [eax]
mov	edi, [eax+4]
mov	ecx, esi
and	ecx, 1
xor	ebx, ebx
or	ecx, ebx
jnz	short loc_795592
test	edx, edx
jnz	short loc_795592
cmp	ebp, 80000000h
jz	short loc_7955AB

loc_795592:
add	esi, 1
adc	edi, ebx
mov	edx, esi
or	edx, edi
mov	[eax], esi
mov	[eax+4], edi
jnz	short loc_7955AB
mov	dword ptr [eax], 1
mov	[eax+4], ebx

loc_7955AB:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_7954E0 endp




sub_7955B0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	qword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	ebp
mov	ebp, [esp+28h+arg_0]
push	esi
push	edi
mov	edi, [esp+30h+arg_4]
mov	esi, eax
mov	dword ptr [edi], 0
test	esi, esi
jz	loc_79574D
push	ebx
xor	ebx, ebx
mov	[esp+34h+var_20], ebx
mov	[esp+34h+var_24], esi
test	esi, esi
jle	short loc_795627
cmp	esi, 1Bh
jle	short loc_795618
inc	esi
cmp	esi, 1Bh
mov	[esp+34h+var_24], esi
jle	short loc_795618
lea	ecx, [esi-1Ch]
mov	eax, 24924925h
mul	ecx
sub	ecx, edx
shr	ecx, 1
add	ecx, edx
shr	ecx, 4
inc	ecx
lea	eax, ds:0[ecx*8]
sub	eax, ecx
mov	ebx, ecx
neg	eax
lea	ecx, [esi+eax*4]
mov	[esp+34h+var_20], ebx
mov	[esp+34h+var_24], ecx

loc_795618:
mov	eax, 1Ah
mov	[esp+34h+var_1C], 0Bh
jmp	short loc_795662

loc_795627:
jge	short loc_795655
or	ecx, 0FFFFFFFFh
sub	ecx, esi
mov	eax, 24924925h
mul	ecx
sub	ecx, edx
shr	ecx, 1
add	ecx, edx
shr	ecx, 4
inc	ecx
lea	edx, ds:0[ecx*8]
sub	edx, ecx
mov	ebx, ecx
lea	eax, [esi+edx*4]
mov	[esp+34h+var_20], ebx
mov	[esp+34h+var_24], eax

loc_795655:
mov	eax, 25h
mov	[esp+34h+var_1C], 0Dh

loc_795662:
test	ebx, ebx
jz	loc_7956EA
dec	eax
mov	[esp+34h+var_14], eax
nop

loc_795670:
cmp	[esp+34h+var_1C], ebx
lea	eax, [esp+34h+var_1C]
jl	short loc_79567E
lea	eax, [esp+34h+var_20]

loc_79567E:
mov	edi, [eax]
sub	ebx, edi
add	edi, [esp+34h+var_14]
lea	ecx, [esp+34h+var_8]
mov	edx, ds:dword_1447D84[edi*8]
mov	eax, ds:dword_1447D80[edi*8]
push	ecx
mov	ecx, [ebp+4]
push	edx
mov	edx, [ebp+0]
push	eax
push	ecx
push	edx
lea	esi, [esp+48h+var_10]
mov	[esp+48h+var_20], ebx
call	sub_795440
mov	eax, dword ptr [esp+48h+var_10+4]
mov	ecx, dword ptr [esp+48h+var_10]
mov	edx, dword ptr [esp+48h+var_8+4]
push	eax
mov	eax, dword ptr [esp+4Ch+var_8]
push	ecx
push	edx
push	eax
lea	ecx, [esp+58h+var_18]
mov	eax, ebp
call	sub_7954E0
movsx	ecx, ds:word_1448000[edi*2]
sub	ecx, [esp+58h+var_18]
mov	eax, [esp+58h+arg_4]
add	[eax], ecx
add	esp, 24h
test	ebx, ebx
jnz	short loc_795670
mov	edi, eax

loc_7956EA:
mov	eax, [esp+34h+var_24]
pop	ebx
test	eax, eax
jz	short loc_79574D
mov	ecx, ds:dword_1447D7C[eax*8]
lea	edx, [esp+30h+var_8]
push	edx
mov	edx, dword ptr ds:(a_2ld+4)[eax*8]
mov	eax, [ebp+4]
push	ecx
mov	ecx, [ebp+0]
push	edx
push	eax
push	ecx
lea	esi, [esp+44h+var_10]
call	sub_795440
mov	edx, dword ptr [esp+44h+var_10+4]
mov	eax, dword ptr [esp+44h+var_10]
mov	ecx, dword ptr [esp+44h+var_8+4]
push	edx
mov	edx, dword ptr [esp+48h+var_8]
push	eax
push	ecx
push	edx
lea	ecx, [esp+54h+var_18]
mov	eax, ebp
call	sub_7954E0
mov	eax, [esp+54h+var_24]
movsx	ecx, ds:word_1447FFE[eax*2]
sub	ecx, [esp+54h+var_18]
add	esp, 24h
add	[edi], ecx

loc_79574D:
pop	edi
pop	esi
pop	ebp
add	esp, 24h
retn
sub_7955B0 endp

align 10h



sub_795760 proc	near

var_10=	qword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
lea	ebp, [ebx+eax]
xor	edi, edi
xor	esi, esi
cmp	ebx, ebp
jnb	short loc_79579A

loc_795778:
push	0
push	0Ah
push	esi
push	edi
call	__allmul
mov	edi, eax
movsx	eax, byte ptr [ebx]
mov	esi, edx
cdq
add	edi, eax
adc	esi, edx
inc	ebx
cmp	ebx, ebp
jb	short loc_795778
mov	ecx, edi
or	ecx, esi
jnz	short loc_7957A4

loc_79579A:
fldz
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn

loc_7957A4:
xor	eax, eax
xor	ebx, ebx
or	eax, esi
jz	short loc_7957B1
mov	ebx, 20h

loc_7957B1:
lea	ebp, [ebx+10h]
mov	eax, edi
mov	edx, esi
mov	ecx, ebp
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
or	eax, edx
jz	short loc_7957C5
mov	ebx, ebp

loc_7957C5:
lea	ebp, [ebx+8]
mov	eax, edi
mov	edx, esi
mov	ecx, ebp
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
or	eax, edx
jz	short loc_7957D9
mov	ebx, ebp

loc_7957D9:
lea	ebp, [ebx+4]
mov	eax, edi
mov	edx, esi
mov	ecx, ebp
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
or	eax, edx
jz	short loc_7957ED
mov	ebx, ebp

loc_7957ED:
lea	ebp, [ebx+2]
mov	eax, edi
mov	edx, esi
mov	ecx, ebp
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
or	eax, edx
jz	short loc_795801
mov	ebx, ebp

loc_795801:
lea	ebp, [ebx+1]
mov	eax, edi
mov	edx, esi
mov	ecx, ebp
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
or	eax, edx
jz	short loc_795815
mov	ebx, ebp

loc_795815:
mov	eax, edi
mov	edx, esi
mov	ecx, ebx
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
or	eax, edx
jz	short loc_795825
inc	ebx

loc_795825:
mov	ecx, 40h
sub	ecx, ebx
mov	eax, edi
mov	edx, esi
call	__allshl
mov	dword ptr [esp+20h+var_10+4], edx
mov	dword ptr [esp+20h+var_10], eax
lea	edx, [esp+20h+arg_0]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
mov	eax, [esp+28h+arg_4]
call	sub_7955B0
mov	ecx, [esp+28h+arg_0]
lea	ebp, [ecx+ebx]
add	esp, 8
cmp	ebp, 0FFFFFC02h
jg	loc_79593A
add	ebp, 3FEh
cmp	ebp, 0FFFFFFCBh
jge	short loc_795887

loc_795871:
pop	edi
pop	esi
xor	eax, eax
pop	ebp
mov	dword ptr [esp+14h+var_10], eax
mov	dword ptr [esp+14h+var_10+4], eax
fld	[esp+14h+var_10]
pop	ebx
add	esp, 10h
retn

loc_795887:
mov	ebx, 0Ch
sub	ebx, ebp
cmp	ebx, 40h
jg	short loc_795871
jnz	short loc_7958B1
mov	ecx, dword ptr [esp+20h+var_10+4]
mov	edi, dword ptr [esp+20h+var_10]
mov	esi, ecx
shr	ecx, 1Fh
and	esi, 7FFFFFFFh
and	ecx, 1
xor	eax, eax
xor	edx, edx
jmp	short loc_7958E2

loc_7958B1:
mov	eax, 1
xor	edx, edx
mov	ecx, ebx
call	__allshl
mov	edi, eax
mov	eax, dword ptr [esp+20h+var_10]
mov	esi, edx
mov	edx, dword ptr [esp+20h+var_10+4]
add	edi, 0FFFFFFFEh
adc	esi, 0FFFFFFFFh
mov	ecx, ebx
and	edi, eax
and	esi, edx
call	unknown_libname_101 ; Microsoft	VisualC	2-9/net	runtime
lea	ecx, [eax-1]
and	ecx, 1

loc_7958E2:
xor	ebx, ebx
mov	dword ptr [esp+20h+var_10+4], edx
mov	dword ptr [esp+20h+var_10], eax
cmp	ecx, ebx
jz	loc_7959EB
mov	ecx, eax
and	ecx, 1
or	ecx, ebx
jnz	short loc_795905
or	edi, esi
jz	loc_7959EB

loc_795905:
add	eax, 1
adc	edx, ebx
mov	dword ptr [esp+20h+var_10], eax
mov	dword ptr [esp+20h+var_10+4], edx
cmp	eax, ebx
jnz	loc_7959EB
cmp	edx, 100000h
jnz	loc_7959EB
pop	edi
pop	esi
mov	dword ptr [esp+18h+var_10], ebx
pop	ebp
mov	dword ptr [esp+14h+var_10+4], edx
fld	[esp+14h+var_10]
pop	ebx
add	esp, 10h
retn

loc_79593A:
mov	ecx, dword ptr [esp+20h+var_10]
mov	eax, dword ptr [esp+20h+var_10+4]
mov	esi, ecx
shrd	ecx, eax, 0Ah
shr	eax, 0Ah
mov	edx, ecx
shrd	ecx, eax, 1
and	edx, 1
shr	eax, 1
and	esi, 3FFh
xor	ebx, ebx
mov	edi, ecx
mov	ecx, eax
test	edx, edx
jz	short loc_79598F
mov	eax, edi
and	eax, 1
xor	edx, edx
or	eax, edx
jnz	short loc_795975
or	esi, ebx
jz	short loc_79598F

loc_795975:
add	edi, 1
adc	ecx, edx
mov	edx, ecx
and	edx, 0FFE00000h
xor	eax, eax
or	eax, edx
jz	short loc_79598F
shrd	edi, ecx, 1
shr	ecx, 1
inc	ebp

loc_79598F:
cmp	ebp, 400h
jle	short loc_7959C2
xor	edx, edx
pop	edi
mov	word ptr [esp+1Ch+var_10], dx
xor	eax, eax
pop	esi
xor	ecx, ecx
mov	edx, 7FF0h
pop	ebp
mov	word ptr [esp+14h+var_10+2], ax
mov	word ptr [esp+14h+var_10+4], cx
mov	word ptr [esp+14h+var_10+6], dx
fld	[esp+14h+var_10]
pop	ebx
add	esp, 10h
retn

loc_7959C2:
lea	eax, [ebp+3FEh]
and	eax, 7FFh
cdq
and	ecx, 0FFEFFFFFh
xor	edx, edx
shl	eax, 14h
and	ecx, 800FFFFFh
or	edx, edi
or	eax, ecx
mov	dword ptr [esp+20h+var_10], edx
mov	dword ptr [esp+20h+var_10+4], eax

loc_7959EB:
fld	[esp+20h+var_10]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_795760 endp

align 10h



sub_795A00 proc	near

var_18=	qword ptr -18h
var_7= byte ptr	-7
var_4= dword ptr -4

sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
movsx	eax, byte ptr [ecx]
push	ebx
push	ebp
push	esi
inc	ecx
xor	ebp, ebp
push	edi
cmp	eax, 2Bh
jz	short loc_795A25
cmp	eax, 2Dh
jnz	short loc_795A29
lea	ebp, [eax-2Ch]

loc_795A25:
movsx	eax, byte ptr [ecx]
inc	ecx

loc_795A29:
xor	edx, edx
lea	edi, [esp+28h+var_18]
xor	ebx, ebx

loc_795A31:
sub	eax, 30h
cmp	eax, 0Ah
jnb	short loc_795A65
lea	esi, [esp+28h+var_7]
cmp	edi, esi
jnz	short loc_795A4E
mov	eax, edx
xor	eax, 1
add	ebx, eax
movsx	eax, byte ptr [ecx]
inc	ecx
jmp	short loc_795A31

loc_795A4E:
test	eax, eax
jnz	short loc_795A5A
lea	esi, [esp+28h+var_18]
cmp	edi, esi
jz	short loc_795A5D

loc_795A5A:
mov	[edi], al
inc	edi

loc_795A5D:
movsx	eax, byte ptr [ecx]
sub	ebx, edx
inc	ecx
jmp	short loc_795A31

loc_795A65:
cmp	eax, 0FFFFFFFEh
jnz	short loc_795A79
test	edx, edx
jnz	short loc_795A79
movsx	eax, byte ptr [ecx]
mov	edx, 1
inc	ecx
jmp	short loc_795A31

loc_795A79:
lea	edx, [esp+28h+var_18]
cmp	edi, edx
jnz	short loc_795A96
fldz
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	ecx, [esp+18h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn

loc_795A96:
cmp	eax, 35h
jz	short loc_795AA0
cmp	eax, 15h
jnz	short loc_795AE0

loc_795AA0:
movsx	eax, byte ptr [ecx]
xor	esi, esi
xor	edx, edx
inc	ecx
cmp	eax, 2Bh
jz	short loc_795ABA
cmp	eax, 20h
jz	short loc_795ABA
cmp	eax, 2Dh
jnz	short loc_795ABE
lea	esi, [edx+1]

loc_795ABA:
movsx	eax, byte ptr [ecx]
inc	ecx

loc_795ABE:
sub	eax, 30h
cmp	eax, 0Ah
jnb	short loc_795AE0

loc_795AC6:
lea	edx, [edx+edx*4]
lea	edx, [eax+edx*2]
movsx	eax, byte ptr [ecx]
sub	eax, 30h
inc	ecx
cmp	eax, 0Ah
jb	short loc_795AC6
test	esi, esi
jz	short loc_795ADE
neg	edx

loc_795ADE:
add	ebx, edx

loc_795AE0:
lea	eax, [esp+28h+var_18]
sub	edi, eax
mov	eax, edi
lea	ecx, [eax+ebx-1]
cmp	ecx, 0FFFFFECDh
jge	short loc_795AF8
fldz
jmp	short loc_795B33

loc_795AF8:
cmp	ecx, 134h
jle	short loc_795B25
xor	ecx, ecx
mov	word ptr [esp+28h+var_18], cx
xor	edx, edx
xor	eax, eax
mov	ecx, 7FF0h
mov	word ptr [esp+28h+var_18+2], dx
mov	word ptr [esp+28h+var_18+4], ax
mov	word ptr [esp+28h+var_18+6], cx
fld	[esp+28h+var_18]
jmp	short loc_795B33

loc_795B25:
push	ebx
push	eax
lea	ecx, [esp+30h+var_18]
call	sub_795760
add	esp, 8

loc_795B33:
test	ebp, ebp
jz	short loc_795B39
fchs

loc_795B39:
mov	ecx, [esp+28h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn
sub_795A00 endp

align 10h



sub_795B50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax+118h]
call	sub_795A00
mov	ecx, [esp+arg_4]
fstp	dword ptr [ecx]
retn
sub_795B50 endp

align 10h



sub_795B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax+118h]
call	sub_795A00
mov	ecx, [esp+arg_4]
fstp	qword ptr [ecx]
retn
sub_795B70 endp

align 10h



; int __thiscall sub_795B90(void *, char)
sub_795B90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14480B0
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_795BAE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_795BAE:
mov	eax, esi
pop	esi
retn	4
sub_795B90 endp

align 10h



; int __thiscall sub_795BC0(void *, char)
sub_795BC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14480C4
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_795BDE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_795BDE:
mov	eax, esi
pop	esi
retn	4
sub_795BC0 endp

align 10h



sub_795BF0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	ecx, ecx
cmp	[esp+arg_0], ecx
setnz	cl
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_14480B0
retn	4
sub_795BF0 endp

align 10h



sub_795C10 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	ecx, ecx
cmp	[esp+arg_0], ecx
setnz	cl
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_14480C4
retn	4
sub_795C10 endp

align 10h



sub_795C30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_10=	dword ptr  14h

push	ecx
mov	eax, [esp+4+arg_10]
push	esi
mov	esi, [esp+8+arg_0]
push	eax
mov	ecx, esi
mov	[esp+0Ch+var_4], 0
call	sub_403400
mov	eax, esi
pop	esi
pop	ecx
retn	14h
sub_795C30 endp

align 10h



sub_795C60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_10=	dword ptr  14h

push	ecx
mov	eax, [esp+4+arg_10]
push	esi
mov	esi, [esp+8+arg_0]
push	eax
mov	ecx, esi
mov	[esp+0Ch+var_4], 0
call	sub_403850
mov	eax, esi
pop	esi
pop	ecx
retn	14h
sub_795C60 endp

align 10h



sub_795C90 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	ecx, ecx
cmp	[esp+arg_0], ecx
mov	dl, 3
setnz	cl
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_14480D8
mov	byte ptr [eax+8], 2
mov	[eax+9], dl
mov	byte ptr [eax+0Ah], 0
mov	cl, 4
mov	[eax+0Bh], cl
mov	byte ptr [eax+0Ch], 2
mov	[eax+0Dh], dl
mov	byte ptr [eax+0Eh], 0
mov	[eax+0Fh], cl
retn	4
sub_795C90 endp

align 10h



sub_795CD0 proc	near
mov	al, 20h
retn
sub_795CD0 endp

align 10h



sub_795CE0 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+8]
mov	eax, [esp+arg_0]
mov	[eax], ecx
retn	4
sub_795CE0 endp

align 10h



sub_795CF0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	ecx, ecx
cmp	[esp+arg_0], ecx
mov	dl, 3
setnz	cl
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_1448104
mov	byte ptr [eax+8], 2
mov	[eax+9], dl
mov	byte ptr [eax+0Ah], 0
mov	cl, 4
mov	[eax+0Bh], cl
mov	byte ptr [eax+0Ch], 2
mov	[eax+0Dh], dl
mov	byte ptr [eax+0Eh], 0
mov	[eax+0Fh], cl
retn	4
sub_795CF0 endp

align 10h



sub_795D30 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	ecx, ecx
cmp	[esp+arg_0], ecx
mov	dl, 3
setnz	cl
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_1448130
mov	byte ptr [eax+8], 2
mov	[eax+9], dl
mov	byte ptr [eax+0Ah], 0
mov	cl, 4
mov	[eax+0Bh], cl
mov	byte ptr [eax+0Ch], 2
mov	[eax+0Dh], dl
mov	byte ptr [eax+0Eh], 0
mov	[eax+0Fh], cl
retn	4
sub_795D30 endp

align 10h



sub_795D70 proc	near

arg_0= dword ptr  4

mov	eax, ecx
xor	ecx, ecx
cmp	[esp+arg_0], ecx
mov	dl, 3
setnz	cl
mov	[eax+4], ecx
mov	dword ptr [eax], offset	off_144815C
mov	byte ptr [eax+8], 2
mov	[eax+9], dl
mov	byte ptr [eax+0Ah], 0
mov	cl, 4
mov	[eax+0Bh], cl
mov	byte ptr [eax+0Ch], 2
mov	[eax+0Dh], dl
mov	byte ptr [eax+0Eh], 0
mov	[eax+0Fh], cl
retn	4
sub_795D70 endp

align 10h



sub_795DB0 proc	near
mov	eax, 20h
retn
sub_795DB0 endp

align 10h



sub_795DC0 proc	near
xor	eax, eax
retn
sub_795DC0 endp

align 10h



sub_795DD0 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+0Ch]
mov	eax, [esp+arg_0]
mov	[eax], ecx
retn	4
sub_795DD0 endp

align 10h



; int __thiscall sub_795DE0(void *, char)
sub_795DE0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14480D8
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_795DFE
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_795DFE:
mov	eax, esi
pop	esi
retn	4
sub_795DE0 endp

align 10h



; int __thiscall sub_795E10(void *, char)
sub_795E10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1448104
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_795E2E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_795E2E:
mov	eax, esi
pop	esi
retn	4
sub_795E10 endp

align 10h



; int __thiscall sub_795E40(void *, char)
sub_795E40 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1448130
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_795E5E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_795E5E:
mov	eax, esi
pop	esi
retn	4
sub_795E40 endp

align 10h



; int __thiscall sub_795E70(void *, char)
sub_795E70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_144815C
call	sub_77FED0
test	[esp+4+arg_0], 1
jz	short loc_795E8E
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_795E8E:
mov	eax, esi
pop	esi
retn	4
sub_795E70 endp

align 10h



sub_795EA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	offset dword_167FC60
mov	ecx, esi
mov	[esp+0Ch+var_4], 0
call	sub_403850
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_795EA0 endp

align 10h



sub_795ED0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	offset dword_167FC78
mov	ecx, esi
mov	[esp+0Ch+var_4], 0
call	sub_403400
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_795ED0 endp

align 10h



sub_795F00 proc	near
mov	eax, [ecx+20h]
push	eax		; FILE *
call	_fflush
add	esp, 4
neg	eax
sbb	eax, eax
retn
sub_795F00 endp

align 10h



sub_795F20 proc	near
xor	eax, eax
xor	edx, edx
retn
sub_795F20 endp

align 10h



sub_795F30 proc	near
or	eax, 0FFFFFFFFh
or	edx, eax
retn
sub_795F30 endp

align 10h



sub_795F40 proc	near

arg_0= dword ptr  4

xor	eax, eax
push	esi
mov	esi, ecx
lea	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_14462A0
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
call	sub_77FEE0
mov	eax, [esp+4+arg_0]
mov	[esi+20h], eax
mov	dword ptr [esi], offset	off_1448188
mov	eax, esi
pop	esi
retn	4
sub_795F40 endp

align 10h



; int __stdcall	sub_795F80(int,	__int64	Offset,	int, int)
sub_795F80 proc	near

arg_0= dword ptr  4
Offset=	qword ptr  8
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
sub	eax, 1
push	esi
mov	esi, ecx
jz	short loc_795FA4
sub	eax, 1
jz	short loc_795F9D
sub	eax, 2
jnz	short loc_795FFD
mov	eax, 2
jmp	short loc_795FA6

loc_795F9D:
mov	eax, 1
jmp	short loc_795FA6

loc_795FA4:
xor	eax, eax

loc_795FA6:
mov	edx, dword ptr [esp+4+Offset+4]
cmp	edx, 7FFFFFFFh
jg	short loc_795FFD
mov	ecx, dword ptr [esp+4+Offset]
jl	short loc_795FBD
cmp	ecx, 0FFFFFFFFh
ja	short loc_795FFD

loc_795FBD:		; Origin
push	eax
mov	eax, [esi+20h]
push	edx
push	ecx		; Offset
push	eax		; File
call	__fseeki64
add	esp, 10h
test	eax, eax
jnz	short loc_795FFD
mov	edx, [esi+20h]
lea	ecx, [esp+4+Offset]
push	ecx		; int
push	edx		; File
call	$LN18_4		; _fgetpos
mov	eax, [esp+0Ch+arg_0]
mov	ecx, dword ptr [esp+0Ch+Offset]
mov	edx, dword ptr [esp+0Ch+Offset+4]
add	esp, 8
mov	[eax], ecx
mov	[eax+4], edx
mov	dword ptr [eax+8], 0
pop	esi
retn	14h

loc_795FFD:
mov	eax, [esp+4+arg_0]
mov	dword ptr [eax+4], 0FFFFFFFFh
mov	dword ptr [eax], 0FFFFFFFFh
mov	dword ptr [eax+8], 0
pop	esi
retn	14h
sub_795F80 endp

align 10h



sub_796020 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	eax		; FILE *
mov	dword ptr [esi], offset	off_1448188
call	_fflush
add	esp, 4
mov	dword ptr [esi], offset	off_14462A0
lea	ecx, [esi+1Ch]
pop	esi
jmp	sub_77FF40
sub_796020 endp

align 10h



sub_796050 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+20h]
push	eax		; FILE *
call	sub_7A2994
mov	esi, eax
add	esp, 4
cmp	esi, 0FFFFFFFFh
jz	short loc_796079
mov	ecx, [edi+20h]
push	ecx		; FILE *
push	esi		; int
call	_ungetc
add	esp, 8
pop	edi
mov	eax, esi
pop	esi
retn

loc_796079:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn
sub_796050 endp

align 10h



sub_796080 proc	near
mov	eax, [ecx+20h]
push	eax		; FILE *
call	sub_7A2994
add	esp, 4
cmp	eax, 0FFFFFFFFh
jnz	short locret_796093
or	eax, eax

locret_796093:
retn
sub_796080 endp

align 10h



sub_7960A0 proc	near

arg_0= dword ptr  4

xor	eax, eax
push	esi
mov	esi, ecx
lea	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_14462EC
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
call	sub_77FEE0
mov	eax, [esp+4+arg_0]
mov	[esi+20h], eax
mov	dword ptr [esi], offset	off_14481C4
mov	eax, esi
pop	esi
retn	4
sub_7960A0 endp

align 10h



sub_7960E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= qword ptr  8

sub	esp, 8
push	ebx
mov	ebx, dword ptr [esp+0Ch+arg_4+4]
push	esi
push	edi
mov	edi, dword ptr [esp+14h+arg_4]
mov	esi, ecx
mov	[esp+14h+var_8], 0FFFFFFFFh
mov	[esp+14h+var_4], 0
test	ebx, ebx
jg	short loc_796111
jl	short loc_79610B
cmp	edi, 0FFFFFFFFh
jnb	short loc_796111

loc_79610B:
lea	eax, [esp+14h+arg_4]
jmp	short loc_796115

loc_796111:
lea	eax, [esp+14h+var_8]

loc_796115:
mov	edx, [esp+14h+arg_0]
mov	ecx, [eax]
test	edx, edx
jnz	short loc_796128
or	edi, ebx
jnz	short loc_796128
lea	eax, [edx+4]
jmp	short loc_79612A

loc_796128:
xor	eax, eax

loc_79612A:		; int
push	ecx
push	eax		; int
mov	eax, [esi+20h]
push	edx		; int
push	eax		; FILE *
call	unknown_libname_102 ; Microsoft	VisualC	2-9/net	runtime
add	esp, 10h
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch
sub_7960E0 endp

align 10h



sub_796150 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
mov	ecx, [ecx+20h]
mov	edx, [esp+10h+arg_8]
mov	[esp+10h+var_10], eax
lea	eax, [esp+10h+var_10]
push	eax		; fpos_t *
push	ecx		; FILE *
mov	[esp+18h+var_C], edx
call	_fsetpos
add	esp, 8
test	eax, eax
jnz	short loc_79617C
lea	ecx, [esp+10h+arg_4]
jmp	short loc_796191

loc_79617C:
or	eax, 0FFFFFFFFh
mov	[esp+10h+var_10], eax
mov	[esp+10h+var_C], eax
mov	[esp+10h+var_8], 0
lea	ecx, [esp+10h+var_10]

loc_796191:
mov	eax, [esp+10h+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	ecx, [ecx+0Ch]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
add	esp, 10h
retn	18h
sub_796150 endp

align 10h



sub_7961C0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+20h]
push	eax		; FILE *
call	_fgetwc
movzx	esi, ax
add	esp, 4
cmp	esi, 0FFFFFFFFh
jz	short loc_7961EB
mov	ecx, [edi+20h]
push	ecx		; FILE *
push	esi		; wint_t
call	_ungetwc
add	esp, 8
pop	edi
mov	ax, si
pop	esi
retn

loc_7961EB:
pop	edi
mov	eax, 0FFFFh
pop	esi
retn
sub_7961C0 endp

align 10h



sub_796200 proc	near
mov	eax, [ecx+20h]
push	eax		; FILE *
call	_fgetwc
movzx	eax, ax
add	esp, 4
cmp	eax, 0FFFFFFFFh
jnz	short locret_796219
mov	eax, 0FFFFh

locret_796219:
retn
sub_796200 endp

align 10h



sub_796220 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	eax		; FILE *
mov	dword ptr [esi], offset	off_14481C4
call	_fflush
add	esp, 4
mov	dword ptr [esi], offset	off_14462EC
lea	ecx, [esi+1Ch]
pop	esi
jmp	sub_77FF40
sub_796220 endp

align 10h



; int __thiscall sub_796250(void *, char)
sub_796250 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	eax		; FILE *
mov	dword ptr [esi], offset	off_1448188
call	_fflush
add	esp, 4
lea	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_14462A0
call	sub_77FF40
test	[esp+4+arg_0], 1
jz	short loc_796283
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_796283:
mov	eax, esi
pop	esi
retn	4
sub_796250 endp

align 10h



sub_796290 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jz	short loc_7962B1
mov	ecx, [ecx+20h]
push	ecx		; FILE *
push	eax		; int
call	_ungetc
add	esp, 8
cmp	eax, 0FFFFFFFFh
jnz	short locret_7962AE

loc_7962AB:
or	eax, 0FFFFFFFFh

locret_7962AE:
retn	4

loc_7962B1:
mov	eax, [ecx+8]
cmp	[ecx+4], eax
jnb	short loc_7962AB
dec	eax
mov	[ecx+8], eax
xor	eax, eax
retn	4
sub_796290 endp

align 10h



sub_7962D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jnz	short loc_79630B
push	edi
mov	edi, [esi+14h]
sub	edi, [esi+10h]
jz	short loc_796304
mov	eax, [esi+20h]
push	eax		; FILE *
call	_fflush
mov	ecx, [esi+14h]
sub	ecx, [esi+10h]
add	esp, 4
xor	eax, eax
cmp	ecx, edi
setl	al
pop	edi
dec	eax

loc_796300:
pop	esi
retn	4

loc_796304:
pop	edi
xor	eax, eax
pop	esi
retn	4

loc_79630B:
mov	edx, [esi+20h]
push	edx		; FILE *
push	eax		; int
call	sub_798126
add	esp, 8
cmp	eax, 0FFFFFFFFh
jnz	short loc_796300
or	eax, eax
pop	esi
retn	4
sub_7962D0 endp

align 10h



; int __thiscall sub_796330(void *, char)
sub_796330 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	eax		; FILE *
mov	dword ptr [esi], offset	off_14481C4
call	_fflush
add	esp, 4
lea	ecx, [esi+1Ch]
mov	dword ptr [esi], offset	off_14462EC
call	sub_77FF40
test	[esp+4+arg_0], 1
jz	short loc_796363
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_796363:
mov	eax, esi
pop	esi
retn	4
sub_796330 endp

align 10h



sub_796370 proc	near

arg_0= word ptr	 4

mov	ax, [esp+arg_0]
mov	edx, 0FFFFh
cmp	ax, dx
jz	short loc_79639C
mov	ecx, [ecx+20h]
movzx	edx, ax
push	ecx		; FILE *
push	edx		; int
call	_ungetc
add	esp, 8
cmp	eax, 0FFFFFFFFh
jnz	short locret_7963B1
mov	eax, 0FFFFh
retn	4

loc_79639C:
mov	eax, [ecx+8]
cmp	[ecx+4], eax
jnb	short loc_7963AF
add	eax, 0FFFFFFFEh
mov	[ecx+8], eax
xor	eax, eax
retn	4

loc_7963AF:
mov	eax, edx

locret_7963B1:
retn	4
sub_796370 endp

align 10h



; int __stdcall	sub_7963C0(wint_t)
sub_7963C0 proc	near

arg_0= word ptr	 4

mov	eax, dword ptr [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, 0FFFFh
cmp	ax, cx
jnz	short loc_796405
push	edi
mov	edi, [esi+14h]
sub	edi, [esi+10h]
sar	edi, 1
jz	short loc_7963FE
mov	edx, [esi+20h]
push	edx		; FILE *
call	_fflush
mov	eax, [esi+14h]
sub	eax, [esi+10h]
add	esp, 4
sar	eax, 1
cmp	eax, edi
jl	short loc_7963FE
mov	eax, 0FFFFh
pop	edi

loc_7963FA:
pop	esi
retn	4

loc_7963FE:
pop	edi
xor	eax, eax
pop	esi
retn	4

loc_796405:
mov	ecx, [esi+20h]
push	ecx		; FILE *
push	eax		; wint_t
call	_fputwc
movzx	eax, ax
add	esp, 8
cmp	eax, 0FFFFFFFFh
jnz	short loc_7963FA
mov	eax, 0FFFFh
pop	esi
retn	4
sub_7963C0 endp

; [0000000B BYTES: COLLAPSED FUNCTION operator new[](uint). PRESS KEYPAD "+" TO	EXPAND]
; [00000005 BYTES: COLLAPSED FUNCTION __uncaught_exception(void). PRESS	KEYPAD "+" TO EXPAND]
; [0000000B BYTES: COLLAPSED FUNCTION operator delete(void *). PRESS KEYPAD "+"	TO EXPAND]
; [000000BA BYTES: COLLAPSED FUNCTION __onexit_nolock. PRESS KEYPAD "+"	TO EXPAND]
___onexitinit db 8Bh, 0FFh
push	esi
push	4
push	20h
call	__calloc_crt
mov	esi, eax
push	esi
call	__encode_pointer
add	esp, 0Ch
mov	dword_19737CC, eax
mov	dword_19737C8, eax
test	esi, esi
jnz	short loc_796522
push	18h
pop	eax
pop	esi
retn

loc_796522:
and	dword ptr [esi], 0
xor	eax, eax
pop	esi
retn
; [00000036 BYTES: COLLAPSED FUNCTION __onexit.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION $LN7. PRESS KEYPAD "+" TO	EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION _atexit. PRESS KEYPAD "+"	TO EXPAND]
; [0000000B BYTES: COLLAPSED FUNCTION operator delete[](void *). PRESS KEYPAD "+" TO EXPAND]
; [00000064 BYTES: COLLAPSED FUNCTION operator new(uint). PRESS	KEYPAD "+" TO EXPAND]
$LN10 db 0CCh



sub_7965EC proc	near
mov	eax, ecx
and	dword ptr [eax+4], 0
and	dword ptr [eax+8], 0
mov	dword ptr [eax], offset	off_1448200
retn
sub_7965EC endp

; [00000053 BYTES: COLLAPSED FUNCTION std::exception::exception(char const * const &). PRESS KEYPAD "+"	TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION std::exception::exception(char const * const &,int). PRESS KEYPAD	"+" TO EXPAND]
; [0000005D BYTES: COLLAPSED FUNCTION std::exception::exception(exception::exception const &). PRESS KEYPAD "+"	TO EXPAND]



sub_7966CA proc	near
cmp	dword ptr [ecx+8], 0
mov	dword ptr [ecx], offset	off_1448200
jz	short locret_7966DF
push	dword ptr [ecx+4] ; void *
call	_free
pop	ecx

locret_7966DF:
retn
sub_7966CA endp

; [0000000D BYTES: COLLAPSED FUNCTION unknown_libname_18. PRESS	KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7966ED proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
lea	eax, [ebp+arg_0]
push	eax
mov	esi, ecx
call	??0exception@std@@QAE@ABQBD@Z ;	std::exception::exception(char const * const &)
mov	dword ptr [esi], offset	off_1448220
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_7966ED endp



; Attributes: bp-based frame

sub_79670B proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
push	[ebp+arg_0]
mov	esi, ecx
call	??0exception@std@@QAE@ABV01@@Z ; std::exception::exception(exception::exception	const &)
mov	dword ptr [esi], offset	off_1448220
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_79670B endp




sub_796728 proc	near
mov	dword ptr [ecx], offset	off_1448220
jmp	sub_7966CA
sub_796728 endp



; Attributes: bp-based frame

sub_796733 proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
lea	eax, [ebp+arg_0]
push	eax
mov	esi, ecx
call	??0exception@std@@QAE@ABQBD@Z ;	std::exception::exception(char const * const &)
mov	dword ptr [esi], offset	off_144822C
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_796733 endp



; Attributes: bp-based frame

sub_796751 proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
push	[ebp+arg_0]
mov	esi, ecx
call	??0exception@std@@QAE@ABV01@@Z ; std::exception::exception(exception::exception	const &)
mov	dword ptr [esi], offset	off_144822C
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_796751 endp



; Attributes: bp-based frame

sub_79676E proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
push	[ebp+arg_0]
mov	esi, ecx
call	sub_796733
mov	dword ptr [esi], offset	off_1448238
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_79676E endp



; Attributes: bp-based frame

sub_79678B proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
push	[ebp+arg_0]
mov	esi, ecx
call	sub_796751
mov	dword ptr [esi], offset	off_1448238
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_79678B endp




sub_7967A8 proc	near
mov	dword ptr [ecx], offset	off_144822C
jmp	sub_7966CA
sub_7967A8 endp



; Attributes: bp-based frame

; int __thiscall sub_7967B3(void *, char)
sub_7967B3 proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
mov	esi, ecx
call	sub_7966CA
test	[ebp+arg_0], 1
jz	short loc_7967CD
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

loc_7967CD:
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_7967B3 endp



; Attributes: bp-based frame

; int __thiscall sub_7967D4(void *, char)
sub_7967D4 proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1448220
call	sub_7966CA
test	[ebp+arg_0], 1
jz	short loc_7967F4
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

loc_7967F4:
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_7967D4 endp



; Attributes: bp-based frame

; int __thiscall sub_7967FB(void *, char)
sub_7967FB proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_144822C
call	sub_7966CA
test	[ebp+arg_0], 1
jz	short loc_79681B
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

loc_79681B:
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_7967FB endp

; [00000014 BYTES: COLLAPSED FUNCTION type_info::name(__type_info_node *). PRESS KEYPAD	"+" TO EXPAND]



sub_796836 proc	near
mov	edi, edi
push	ecx
mov	dword ptr [ecx], offset	off_1448244
call	sub_7A484B
pop	ecx
retn
sub_796836 endp



; Attributes: bp-based frame

; int __thiscall sub_796846(void *, char)
sub_796846 proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
mov	esi, ecx
call	sub_796836
test	[ebp+arg_0], 1
jz	short loc_796860
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

loc_796860:
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_796846 endp

; [00000020 BYTES: COLLAPSED FUNCTION type_info::operator==(type_info const &).	PRESS KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION type_info::before(type_info const	&). PRESS KEYPAD "+" TO	EXPAND]



sub_7968AB proc	near
lea	eax, [ecx+8]
retn
sub_7968AB endp

; [0000005E BYTES: COLLAPSED FUNCTION __ArrayUnwind(void *,uint,int,void (*)(void *)). PRESS KEYPAD "+"	TO EXPAND]
; [0000004B BYTES: COLLAPSED FUNCTION $LN21_0. PRESS KEYPAD "+"	TO EXPAND]



sub_796958 proc	near
cmp	dword ptr [ebp-1Ch], 0
jnz	short locret_79696F
push	dword ptr [ebp+14h] ; void (__thiscall *)(void *)
push	dword ptr [ebp+10h] ; int
push	dword ptr [ebp+0Ch] ; unsigned int
push	dword ptr [ebp+8] ; void *
call	?__ArrayUnwind@@YGXPAXIHP6EX0@Z@Z ; __ArrayUnwind(void *,uint,int,void (*)(void	*))

locret_79696F:
retn
sub_796958 endp

; [000000CC BYTES: COLLAPSED FUNCTION __vsnprintf_helper. PRESS	KEYPAD "+" TO EXPAND]
; [00000088 BYTES: COLLAPSED FUNCTION __vsprintf_s_l. PRESS KEYPAD "+" TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION _vsprintf_s. PRESS KEYPAD	"+" TO EXPAND]
; [00000107 BYTES: COLLAPSED FUNCTION __vsnprintf_s_l. PRESS KEYPAD "+"	TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION __vsnprintf_s. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000365 BYTES: COLLAPSED FUNCTION unknown_libname_19. PRESS	KEYPAD "+" TO EXPAND]
; [000000DD BYTES: COLLAPSED FUNCTION xtoa_s(x,x,x,x,x). PRESS KEYPAD "+" TO EXPAND]
; [0000002A BYTES: COLLAPSED FUNCTION __itoa_s.	PRESS KEYPAD "+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __ultoa_s. PRESS KEYPAD "+" TO EXPAND]
; [000000F8 BYTES: COLLAPSED FUNCTION x64toa_s(x,x,x,x,x,x). PRESS KEYPAD "+" TO EXPAND]
; [00000035 BYTES: COLLAPSED FUNCTION __i64toa_s. PRESS	KEYPAD "+" TO EXPAND]
; [0000001F BYTES: COLLAPSED FUNCTION __ui64toa_s. PRESS KEYPAD	"+" TO EXPAND]
; [0000002A BYTES: COLLAPSED FUNCTION __purecall. PRESS	KEYPAD "+" TO EXPAND]
; [0000001E BYTES: COLLAPSED FUNCTION _swprintf_s. PRESS KEYPAD	"+" TO EXPAND]
; [00000021 BYTES: COLLAPSED FUNCTION __snwprintf_s. PRESS KEYPAD "+" TO EXPAND]
; [00000056 BYTES: COLLAPSED FUNCTION _free. PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN14. PRESS KEYPAD "+" TO EXPAND]
; [0000002F BYTES: COLLAPSED CHUNK OF FUNCTION _free. PRESS KEYPAD "+" TO EXPAND]
; [00000046 BYTES: COLLAPSED FUNCTION _V6_HeapAlloc. PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN8_1. PRESS KEYPAD "+" TO EXPAND]
; [000000CA BYTES: COLLAPSED FUNCTION _malloc. PRESS KEYPAD "+"	TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION __wtol. PRESS KEYPAD "+" TO EXPAND]
; [0000000B BYTES: COLLAPSED FUNCTION __wtoi. PRESS KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION __wtoi64.	PRESS KEYPAD "+" TO EXPAND]
; [0000009D BYTES: COLLAPSED FUNCTION __aligned_offset_malloc. PRESS KEYPAD "+"	TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __aligned_free. PRESS KEYPAD "+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION __aligned_malloc.	PRESS KEYPAD "+" TO EXPAND]
; [00000170 BYTES: COLLAPSED FUNCTION __aligned_offset_realloc.	PRESS KEYPAD "+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __aligned_realloc. PRESS KEYPAD "+" TO EXPAND]
; [00000068 BYTES: COLLAPSED FUNCTION _strcpy_s. PRESS KEYPAD "+" TO EXPAND]
; [0000006F BYTES: COLLAPSED FUNCTION _wcscpy_s. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_797758 proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	0Ch
push	offset unk_1625188
call	__SEH_prolog4
xor	eax, eax
xor	esi, esi
cmp	[ebp+arg_0], esi
setnz	al
cmp	eax, esi
jnz	short loc_79778F
call	__errno
mov	dword ptr [eax], 16h
push	esi
push	esi
push	esi
push	esi
push	esi
call	__invalid_parameter
add	esp, 14h
or	eax, 0FFFFFFFFh
jmp	short loc_7977EE

loc_79778F:
call	sub_7A1F02
push	20h
pop	ebx
add	eax, ebx
push	eax
push	1
call	__lock_file2
pop	ecx
pop	ecx
mov	[ebp+ms_exc.disabled], esi
call	sub_7A1F02
add	eax, ebx
push	eax		; FILE *
call	__stbuf
pop	ecx
mov	edi, eax
lea	eax, [ebp+arg_4]
push	eax		; int
push	esi		; int
push	[ebp+arg_0]	; int
call	sub_7A1F02
add	eax, ebx
push	eax		; FILE *
call	__output_l
mov	[ebp+var_1C], eax
call	sub_7A1F02
add	eax, ebx
push	eax		; FILE *
push	edi		; int
call	__ftbuf
add	esp, 18h
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7977F4
mov	eax, [ebp+var_1C]

loc_7977EE:
call	__SEH_epilog4
retn
sub_797758 endp




sub_7977F4 proc	near
call	sub_7A1F02
add	eax, 20h
push	eax
push	1
call	__unlock_file2
pop	ecx
pop	ecx
retn
sub_7977F4 endp

; [00000018 BYTES: COLLAPSED FUNCTION _printf_s. PRESS KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION __get_printf_count_output. PRESS KEYPAD "+" TO EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION __crt_waiting_on_module_handle. PRESS KEYPAD "+" TO EXPAND]
; [00000029 BYTES: COLLAPSED FUNCTION __amsg_exit. PRESS KEYPAD	"+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION ___crtCorExitProcess. PRESS KEYPAD "+" TO	EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION ___crtExitProcess. PRESS KEYPAD "+" TO EXPAND]
$LN3 db	0CCh
; [00000009 BYTES: COLLAPSED FUNCTION __lockexit. PRESS	KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION __unlockexit. PRESS KEYPAD "+" TO	EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION __initterm. PRESS	KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION __initterm_e. PRESS KEYPAD "+" TO	EXPAND]
; [00000085 BYTES: COLLAPSED FUNCTION __cinit. PRESS KEYPAD "+"	TO EXPAND]
; [00000114 BYTES: COLLAPSED FUNCTION _doexit. PRESS KEYPAD "+"	TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN34_0. PRESS KEYPAD "+"	TO EXPAND]
; [0000000F BYTES: COLLAPSED FUNCTION $LN19. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _doexit.	PRESS KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION $LN32_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION __exit. PRESS KEYPAD "+" TO EXPAND]
; [0000000F BYTES: COLLAPSED FUNCTION __cexit. PRESS KEYPAD "+"	TO EXPAND]
; [0000000F BYTES: COLLAPSED FUNCTION __c_exit.	PRESS KEYPAD "+" TO EXPAND]
; [0000004E BYTES: COLLAPSED FUNCTION __init_pointers. PRESS KEYPAD "+"	TO EXPAND]
; [00000087 BYTES: COLLAPSED FUNCTION _LocaleUpdate::_LocaleUpdate(localeinfo_struct *). PRESS KEYPAD "+" TO EXPAND]
; [00000111 BYTES: COLLAPSED FUNCTION __wcsicmp_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000093 BYTES: COLLAPSED FUNCTION __wcsicmp. PRESS KEYPAD "+" TO EXPAND]
; [0000007D BYTES: COLLAPSED FUNCTION _wcscat_s. PRESS KEYPAD "+" TO EXPAND]
; [00000025 BYTES: COLLAPSED FUNCTION _fast_error_exit.	PRESS KEYPAD "+" TO EXPAND]
db  59h	; Y
db  59h	; Y
db  5Dh	; ]
db 0C3h	; Ã
; [0000017E BYTES: COLLAPSED FUNCTION ___tmainCRTStartup. PRESS	KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN33. PRESS KEYPAD "+" TO EXPAND]
; [00000039 BYTES: COLLAPSED FUNCTION ___ascii_stricmp.	PRESS KEYPAD "+" TO EXPAND]
; [000000D5 BYTES: COLLAPSED FUNCTION __stricmp_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION __stricmp. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_798126(int, FILE *)
sub_798126 proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	0Ch
push	offset unk_16251F0
call	__SEH_prolog4
xor	edi, edi
mov	[ebp+var_1C], edi
xor	eax, eax
mov	esi, [ebp+arg_4]
cmp	esi, edi
setnz	al
cmp	eax, edi
jnz	short loc_798165
call	__errno
mov	dword ptr [eax], 16h
push	edi
push	edi
push	edi
push	edi
push	edi
call	__invalid_parameter
add	esp, 14h
or	eax, 0FFFFFFFFh
jmp	loc_798221

loc_798165:
push	esi
call	__lock_file
pop	ecx
mov	[ebp+ms_exc.disabled], edi
test	byte ptr [esi+0Ch], 40h
jnz	short loc_7981EC
push	esi		; FILE *
call	__fileno
pop	ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_79819C
cmp	eax, 0FFFFFFFEh
jz	short loc_79819C
mov	edx, eax
sar	edx, 5
mov	ecx, eax
and	ecx, 1Fh
shl	ecx, 6
add	ecx, dword_19736C0[edx*4]
jmp	short loc_7981A1

loc_79819C:
mov	ecx, offset unk_167FFF0

loc_7981A1:
test	byte ptr [ecx+24h], 7Fh
jnz	short loc_7981D0
cmp	eax, 0FFFFFFFFh
jz	short loc_7981C5
cmp	eax, 0FFFFFFFEh
jz	short loc_7981C5
mov	ecx, eax
sar	ecx, 5
and	eax, 1Fh
shl	eax, 6
add	eax, dword_19736C0[ecx*4]
jmp	short loc_7981CA

loc_7981C5:
mov	eax, offset unk_167FFF0

loc_7981CA:
test	byte ptr [eax+24h], 80h
jz	short loc_7981EC

loc_7981D0:
call	__errno
mov	dword ptr [eax], 16h
push	edi
push	edi
push	edi
push	edi
push	edi
call	__invalid_parameter
add	esp, 14h
or	[ebp+var_1C], 0FFFFFFFFh

loc_7981EC:
cmp	[ebp+var_1C], edi
jnz	short loc_798212
dec	dword ptr [esi+4]
js	short loc_798204
mov	ecx, [esi]
mov	al, byte ptr [ebp+arg_0]
mov	[ecx], al
movzx	eax, al
inc	dword ptr [esi]
jmp	short loc_79820F

loc_798204:		; FILE *
push	esi
push	[ebp+arg_0]	; int
call	__flsbuf
pop	ecx
pop	ecx

loc_79820F:
mov	[ebp+var_1C], eax

loc_798212:
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_79822A
mov	eax, [ebp+var_1C]

loc_798221:
call	__SEH_epilog4
retn
sub_798126 endp




sub_798227 proc	near
mov	esi, [ebp+0Ch]
sub_798227 endp	; sp-analysis failed




sub_79822A proc	near
push	esi
call	__unlock_file
pop	ecx
retn
sub_79822A endp

; [0000006A BYTES: COLLAPSED FUNCTION _vscan_fn. PRESS KEYPAD "+" TO EXPAND]
; [00000022 BYTES: COLLAPSED FUNCTION _sscanf. PRESS KEYPAD "+"	TO EXPAND]
; [00000022 BYTES: COLLAPSED FUNCTION _sscanf_s. PRESS KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION _atol. PRESS KEYPAD "+" TO EXPAND]
; [0000000B BYTES: COLLAPSED FUNCTION _atoi. PRESS KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION __atoi64.	PRESS KEYPAD "+" TO EXPAND]
; [00000297 BYTES: COLLAPSED FUNCTION strtoxq(localeinfo_struct	*,char const *,char const * *,int,int).	PRESS KEYPAD "+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION __strtoi64. PRESS	KEYPAD "+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION __strtoui64. PRESS KEYPAD	"+" TO EXPAND]
; [000000BA BYTES: COLLAPSED FUNCTION __fsopen.	PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN12. PRESS KEYPAD "+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION _fopen. PRESS KEYPAD "+" TO EXPAND]
; [00000053 BYTES: COLLAPSED FUNCTION _fopen_s.	PRESS KEYPAD "+" TO EXPAND]
; [0000020A BYTES: COLLAPSED FUNCTION __fread_nolock_s.	PRESS KEYPAD "+" TO EXPAND]
; [0000008C BYTES: COLLAPSED FUNCTION _fread_s.	PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN12_0. PRESS KEYPAD "+"	TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION _fread. PRESS KEYPAD "+" TO EXPAND]
; [00000112 BYTES: COLLAPSED FUNCTION _fprintf.	PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN18_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000034 BYTES: COLLAPSED FUNCTION _feof. PRESS KEYPAD "+" TO EXPAND]
; [00000034 BYTES: COLLAPSED FUNCTION _ferror. PRESS KEYPAD "+"	TO EXPAND]
; [0000019D BYTES: COLLAPSED FUNCTION __ftell_nolock. PRESS KEYPAD "+" TO EXPAND]
; [00000064 BYTES: COLLAPSED FUNCTION _ftell. PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN8_2. PRESS KEYPAD "+" TO EXPAND]
; [0000022F BYTES: COLLAPSED FUNCTION strtoxl(localeinfo_struct	*,char const *,char const * *,int,int).	PRESS KEYPAD "+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION _strtol. PRESS KEYPAD "+"	TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION _strtoul.	PRESS KEYPAD "+" TO EXPAND]
; [0000008A BYTES: COLLAPSED FUNCTION __fseek_nolock. PRESS KEYPAD "+" TO EXPAND]
; [0000007B BYTES: COLLAPSED FUNCTION _fseek. PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN11_1. PRESS KEYPAD "+"	TO EXPAND]
; [000000AB BYTES: COLLAPSED FUNCTION __atof_l.	PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION _atof. PRESS KEYPAD "+" TO EXPAND]
; [00000077 BYTES: COLLAPSED FUNCTION __fclose_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [00000071 BYTES: COLLAPSED FUNCTION _fclose. PRESS KEYPAD "+"	TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN13_2. PRESS KEYPAD "+"	TO EXPAND]
; [00000008 BYTES: COLLAPSED FUNCTION $LN10_1. PRESS KEYPAD "+"	TO EXPAND]
; [000000C0 BYTES: COLLAPSED FUNCTION _strncmp.	PRESS KEYPAD "+" TO EXPAND]
; [00000056 BYTES: COLLAPSED FUNCTION __isalpha_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION _isalpha.	PRESS KEYPAD "+" TO EXPAND]
; [00000051 BYTES: COLLAPSED FUNCTION __isdigit_l. PRESS KEYPAD	"+" TO EXPAND]
; [0000002E BYTES: COLLAPSED FUNCTION _isdigit.	PRESS KEYPAD "+" TO EXPAND]
; [00000056 BYTES: COLLAPSED FUNCTION __isxdigit_l. PRESS KEYPAD "+" TO	EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION _isxdigit. PRESS KEYPAD "+" TO EXPAND]
; [00000051 BYTES: COLLAPSED FUNCTION __isspace_l. PRESS KEYPAD	"+" TO EXPAND]
; [0000002E BYTES: COLLAPSED FUNCTION _isspace.	PRESS KEYPAD "+" TO EXPAND]
; [00000056 BYTES: COLLAPSED FUNCTION __isalnum_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION _isalnum.	PRESS KEYPAD "+" TO EXPAND]
; [00000056 BYTES: COLLAPSED FUNCTION __isprint_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION _isprint.	PRESS KEYPAD "+" TO EXPAND]
; [00000051 BYTES: COLLAPSED FUNCTION __iscntrl_l. PRESS KEYPAD	"+" TO EXPAND]
; [0000002E BYTES: COLLAPSED FUNCTION _iscntrl.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000005 BYTES: COLLAPSED CHUNK OF FUNCTION _strchr.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [000000BE BYTES: COLLAPSED FUNCTION _strchr. PRESS KEYPAD "+"	TO EXPAND]
; [00000115 BYTES: COLLAPSED FUNCTION __tolower_l. PRESS KEYPAD	"+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION _tolower.	PRESS KEYPAD "+" TO EXPAND]
; [00000074 BYTES: COLLAPSED FUNCTION _strcat_s. PRESS KEYPAD "+" TO EXPAND]



sub_7999A3 proc	near
cmp	ecx, dword_167FD30
jnz	short loc_7999AD
rep retn

loc_7999AD:
jmp	___report_gsfailure
sub_7999A3 endp

align 10h
; [0000002B BYTES: COLLAPSED FUNCTION __alloca_probe. PRESS KEYPAD "+" TO EXPAND]
; [00000060 BYTES: COLLAPSED FUNCTION __cfltcvt_init_0.	PRESS KEYPAD "+" TO EXPAND]
; [00000023 BYTES: COLLAPSED FUNCTION __fpmath.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000014 BYTES: COLLAPSED FUNCTION __CIsqrt.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION _sqrt. PRESS KEYPAD "+" TO EXPAND]
; [0000009D BYTES: COLLAPSED FUNCTION start. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000001C BYTES: COLLAPSED FUNCTION __ftol2_sse. PRESS KEYPAD	"+" TO EXPAND]

__ftol2_sse_excpt:
cmp	dword_1972688, 0
jz	short __ftol2
sub	esp, 4
fnstcw	word ptr [esp]
pop	eax
and	ax, 7Fh
cmp	ax, 7Fh
jz	short __ftol2_pentium4
; [00000075 BYTES: COLLAPSED FUNCTION __ftol2. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [00000121 BYTES: COLLAPSED FUNCTION _floor. PRESS KEYPAD "+" TO EXPAND]
align 10h

unknown_libname_59:	; Microsoft VisualC 2-9/net runtime
mov	edx, offset unk_167FD60
jmp	unknown_libname_145 ; Microsoft	VisualC	2-9/net	runtime
; [0000000A BYTES: COLLAPSED FUNCTION unknown_libname_60. PRESS	KEYPAD "+" TO EXPAND]



sub_799D24 proc	near
fxch	st(1)

loc_799D26:
cmp	dword_1858534, 1
jz	short loc_799D33
fprem
jmp	short loc_799D38

loc_799D33:		; Microsoft VisualC 2-9/net runtime
call	unknown_libname_176

loc_799D38:
fstsw	ax
wait
sahf
jp	short loc_799D26
fstp	st(1)
retn
sub_799D24 endp

align 10h
; [00000365 BYTES: COLLAPSED FUNCTION unknown_libname_61. PRESS	KEYPAD "+" TO EXPAND]
align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _log. PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [0000004F BYTES: COLLAPSED FUNCTION __CIlog. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION _log. PRESS KEYPAD "+" TO EXPAND]
; [000000B8 BYTES: COLLAPSED FUNCTION start_0. PRESS KEYPAD "+"	TO EXPAND]
; [0000003C BYTES: COLLAPSED FUNCTION __endthreadex. PRESS KEYPAD "+" TO EXPAND]
$LN5 db	0CCh
; [00000021 BYTES: COLLAPSED FUNCTION __callthreadstartex. PRESS KEYPAD	"+" TO EXPAND]
; [00000014 BYTES: COLLAPSED FUNCTION $LN11_3. PRESS KEYPAD "+"	TO EXPAND]
; [0000000B BYTES: COLLAPSED FUNCTION $LN6_0. PRESS KEYPAD "+" TO EXPAND]
$LN10_2	db 0CCh
; [00000082 BYTES: COLLAPSED FUNCTION _threadstartex(x). PRESS KEYPAD "+" TO EXPAND]
$LN7_2 db 0CCh
; [000000B0 BYTES: COLLAPSED FUNCTION __beginthreadex. PRESS KEYPAD "+"	TO EXPAND]
align 10h
mov	edx, offset unk_1680E40
jmp	unknown_libname_145 ; Microsoft	VisualC	2-9/net	runtime



sub_79A3DA proc	near
mov	edx, offset unk_1680E40
jmp	unknown_libname_139 ; Microsoft	VisualC	2-9/net	runtime
sub_79A3DA endp

align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _asin. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000004F BYTES: COLLAPSED FUNCTION __CIasin.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION _asin. PRESS KEYPAD "+" TO EXPAND]
; [000000AE BYTES: COLLAPSED FUNCTION start_1. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _cos. PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [0000004F BYTES: COLLAPSED FUNCTION __CIcos. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION start_10. PRESS KEYPAD "+" TO EXPAND]
; [00000091 BYTES: COLLAPSED FUNCTION start_2. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _sin. PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [0000004F BYTES: COLLAPSED FUNCTION __CIsin. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION start_11. PRESS KEYPAD "+" TO EXPAND]
; [00000091 BYTES: COLLAPSED FUNCTION start_3. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000007A BYTES: COLLAPSED FUNCTION _memset. PRESS KEYPAD "+"	TO EXPAND]
; [000000E1 BYTES: COLLAPSED FUNCTION __wcsicoll_l. PRESS KEYPAD "+" TO	EXPAND]
; [00000093 BYTES: COLLAPSED FUNCTION __wcsicoll. PRESS	KEYPAD "+" TO EXPAND]
; [000000A6 BYTES: COLLAPSED FUNCTION __wcscoll_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION _wcscoll.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000046 BYTES: COLLAPSED FUNCTION _strspn. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [00000046 BYTES: COLLAPSED FUNCTION _strcspn.	PRESS KEYPAD "+" TO EXPAND]
; [000000B5 BYTES: COLLAPSED FUNCTION _strncpy_s. PRESS	KEYPAD "+" TO EXPAND]
align 10h
; [0000002D BYTES: COLLAPSED FUNCTION _strrchr.	PRESS KEYPAD "+" TO EXPAND]
; [000000F2 BYTES: COLLAPSED FUNCTION __strnicmp_l. PRESS KEYPAD "+" TO	EXPAND]
; [0000005E BYTES: COLLAPSED FUNCTION __strnicmp. PRESS	KEYPAD "+" TO EXPAND]
; [000000D3 BYTES: COLLAPSED FUNCTION _wcsncpy_s. PRESS	KEYPAD "+" TO EXPAND]
; [0000011F BYTES: COLLAPSED FUNCTION __strtod_l. PRESS	KEYPAD "+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION _strtod. PRESS KEYPAD "+"	TO EXPAND]
; [00000026 BYTES: COLLAPSED FUNCTION _localeconv. PRESS KEYPAD	"+" TO EXPAND]
align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _tan. PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [0000004F BYTES: COLLAPSED FUNCTION __CItan. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION start_12. PRESS KEYPAD "+" TO EXPAND]
; [00000095 BYTES: COLLAPSED FUNCTION start_4. PRESS KEYPAD "+"	TO EXPAND]
; [0000006C BYTES: COLLAPSED FUNCTION __controlfp_s. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000068 BYTES: COLLAPSED FUNCTION __aulldiv. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000095 BYTES: COLLAPSED FUNCTION __aulldvrm. PRESS	KEYPAD "+" TO EXPAND]
align 10h
; [0000011D BYTES: COLLAPSED FUNCTION _ceil. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000034 BYTES: COLLAPSED FUNCTION __allmul.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000086 BYTES: COLLAPSED FUNCTION _strstr. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000001F BYTES: COLLAPSED FUNCTION unknown_libname_101. PRESS KEYPAD	"+" TO EXPAND]
align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _acos. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000004F BYTES: COLLAPSED FUNCTION __CIacos.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION _acos. PRESS KEYPAD "+" TO EXPAND]
; [000000AE BYTES: COLLAPSED FUNCTION start_5. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _atan. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000004F BYTES: COLLAPSED FUNCTION __CIatan.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION _atan. PRESS KEYPAD "+" TO EXPAND]
; [00000082 BYTES: COLLAPSED FUNCTION start_6. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000003B BYTES: COLLAPSED FUNCTION _exp. PRESS KEYPAD "+" TO	EXPAND]
align 4
; [0000004F BYTES: COLLAPSED FUNCTION __CIexp. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000003F BYTES: COLLAPSED FUNCTION _pow. PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [00000054 BYTES: COLLAPSED FUNCTION __CIpow. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED CHUNK OF FUNCTION _pow. PRESS KEYPAD "+" TO EXPAND]
; [000001C5 BYTES: COLLAPSED FUNCTION start_7. PRESS KEYPAD "+"	TO EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION _test_whether_TOS_is_int.	PRESS KEYPAD "+" TO EXPAND]
; [00000176 BYTES: COLLAPSED FUNCTION __ftime64_s. PRESS KEYPAD	"+" TO EXPAND]
; [0000000B BYTES: COLLAPSED FUNCTION __ftime64. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [000000AA BYTES: COLLAPSED FUNCTION __alldiv.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [000000DF BYTES: COLLAPSED FUNCTION __alldvrm. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [000000B2 BYTES: COLLAPSED FUNCTION __allrem.	PRESS KEYPAD "+" TO EXPAND]
; [00000042 BYTES: COLLAPSED FUNCTION __get_errno_from_oserr. PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION __errno. PRESS KEYPAD "+"	TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION ___doserrno. PRESS KEYPAD	"+" TO EXPAND]
; [00000023 BYTES: COLLAPSED FUNCTION __dosmaperr. PRESS KEYPAD	"+" TO EXPAND]
; [000000BC BYTES: COLLAPSED FUNCTION _rewind. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN12_2. PRESS KEYPAD "+"	TO EXPAND]
; [000000BC BYTES: COLLAPSED FUNCTION __wfsopen. PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN12_3. PRESS KEYPAD "+"	TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION __wfopen.	PRESS KEYPAD "+" TO EXPAND]
; [00000053 BYTES: COLLAPSED FUNCTION __wfopen_s. PRESS	KEYPAD "+" TO EXPAND]
; [00000162 BYTES: COLLAPSED FUNCTION __fwrite_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [00000078 BYTES: COLLAPSED FUNCTION _fwrite. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN10_3. PRESS KEYPAD "+"	TO EXPAND]
; [00000068 BYTES: COLLAPSED FUNCTION __flush. PRESS KEYPAD "+"	TO EXPAND]
; [00000048 BYTES: COLLAPSED FUNCTION __fflush_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [0000009D BYTES: COLLAPSED FUNCTION _flsall. PRESS KEYPAD "+"	TO EXPAND]
; [00000005 BYTES: COLLAPSED FUNCTION $LN31_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000011 BYTES: COLLAPSED FUNCTION $LN24. PRESS KEYPAD "+" TO EXPAND]
; [0000001E BYTES: COLLAPSED CHUNK OF FUNCTION _flsall.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN20_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000049 BYTES: COLLAPSED FUNCTION _fflush. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN8_4. PRESS KEYPAD "+" TO EXPAND]



sub_79C3E4 proc	near
push	1
call	_flsall
pop	ecx
retn
sub_79C3E4 endp

; [000000A1 BYTES: COLLAPSED FUNCTION _IsRootUNCName. PRESS KEYPAD "+" TO EXPAND]
; [00000060 BYTES: COLLAPSED FUNCTION __wfullpath_helper. PRESS	KEYPAD "+" TO EXPAND]
; [000003F2 BYTES: COLLAPSED FUNCTION __wstat64. PRESS KEYPAD "+" TO EXPAND]
; [0000007D BYTES: COLLAPSED FUNCTION _memcpy_s. PRESS KEYPAD "+" TO EXPAND]
; [000000EE BYTES: COLLAPSED FUNCTION _strtok_s. PRESS KEYPAD "+" TO EXPAND]
; [0000007D BYTES: COLLAPSED FUNCTION _sprintf.	PRESS KEYPAD "+" TO EXPAND]
; [0000001E BYTES: COLLAPSED FUNCTION _sprintf_s. PRESS	KEYPAD "+" TO EXPAND]
; [00000021 BYTES: COLLAPSED FUNCTION __snprintf_s. PRESS KEYPAD "+" TO	EXPAND]
; [00000012 BYTES: COLLAPSED FUNCTION _srand. PRESS KEYPAD "+" TO EXPAND]
; [00000022 BYTES: COLLAPSED FUNCTION _rand. PRESS KEYPAD "+" TO EXPAND]
; [000001FF BYTES: COLLAPSED FUNCTION __splitpath_s. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000022 BYTES: COLLAPSED FUNCTION _swap. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000083 BYTES: COLLAPSED FUNCTION _shortsort. PRESS	KEYPAD "+" TO EXPAND]
align 10h
; [0000024D BYTES: COLLAPSED FUNCTION _qsort. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000040 BYTES: COLLAPSED FUNCTION _strpbrk.	PRESS KEYPAD "+" TO EXPAND]
; [0000005D BYTES: COLLAPSED FUNCTION _memmove_s. PRESS	KEYPAD "+" TO EXPAND]
; [000000C2 BYTES: COLLAPSED FUNCTION _bsearch.	PRESS KEYPAD "+" TO EXPAND]
; [00000116 BYTES: COLLAPSED FUNCTION __toupper_l. PRESS KEYPAD	"+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION _toupper.	PRESS KEYPAD "+" TO EXPAND]
; [00000039 BYTES: COLLAPSED FUNCTION __validdrive. PRESS KEYPAD "+" TO	EXPAND]
; [00000137 BYTES: COLLAPSED FUNCTION __getdcwd_nolock.	PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_79D461(LPSTR lpBuffer, size_t)
sub_79D461 proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
lpBuffer= dword	ptr  8
arg_4= dword ptr  0Ch

push	0Ch
push	offset unk_1625398
call	__SEH_prolog4
push	7
call	__lock
pop	ecx
and	[ebp+ms_exc.disabled], 0
push	[ebp+arg_4]	; size_t
push	[ebp+lpBuffer]	; lpBuffer
push	0		; RootPathName
call	__getdcwd_nolock
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_79D4A1
mov	eax, [ebp+var_1C]
call	__SEH_epilog4
retn
sub_79D461 endp




sub_79D4A1 proc	near
push	7
call	__unlock
pop	ecx
retn
sub_79D4A1 endp

; [0000013E BYTES: COLLAPSED FUNCTION _realloc.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION $LN66. PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN48. PRESS KEYPAD "+" TO EXPAND]
; [000000CE BYTES: COLLAPSED CHUNK OF FUNCTION _realloc. PRESS KEYPAD "+" TO EXPAND]
; [000002B8 BYTES: COLLAPSED FUNCTION __localtime64_s. PRESS KEYPAD "+"	TO EXPAND]
; [000001CE BYTES: COLLAPSED FUNCTION _asctime_s. PRESS	KEYPAD "+" TO EXPAND]
; [000000F8 BYTES: COLLAPSED FUNCTION __vswprintf_helper. PRESS	KEYPAD "+" TO EXPAND]
; [0000002A BYTES: COLLAPSED FUNCTION __vswprintf_c_l. PRESS KEYPAD "+"	TO EXPAND]
; [0000008B BYTES: COLLAPSED FUNCTION __vswprintf_s_l. PRESS KEYPAD "+"	TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION _vswprintf_s. PRESS KEYPAD "+" TO	EXPAND]
; [0000010C BYTES: COLLAPSED FUNCTION __vsnwprintf_s_l.	PRESS KEYPAD "+" TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION __vsnwprintf_s. PRESS KEYPAD "+" TO EXPAND]
; [0000014C BYTES: COLLAPSED FUNCTION _puts. PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION $LN19_2. PRESS KEYPAD "+"	TO EXPAND]
; [00000051 BYTES: COLLAPSED FUNCTION __time64.	PRESS KEYPAD "+" TO EXPAND]
; [000000B5 BYTES: COLLAPSED FUNCTION __towlower_l. PRESS KEYPAD "+" TO	EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION _towlower. PRESS KEYPAD "+" TO EXPAND]
; [000002B5 BYTES: COLLAPSED FUNCTION __make__time64_t.	PRESS KEYPAD "+" TO EXPAND]
; [00000012 BYTES: COLLAPSED FUNCTION __mktime64. PRESS	KEYPAD "+" TO EXPAND]
; [0000008C BYTES: COLLAPSED FUNCTION __wtof_l.	PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION __wtof. PRESS KEYPAD "+" TO EXPAND]
; [000000EA BYTES: COLLAPSED FUNCTION __wcsnicmp_l. PRESS KEYPAD "+" TO	EXPAND]
; [000000A6 BYTES: COLLAPSED FUNCTION __wcsnicmp. PRESS	KEYPAD "+" TO EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION __wremove. PRESS KEYPAD "+" TO EXPAND]
; [0000000B BYTES: COLLAPSED FUNCTION __wunlink. PRESS KEYPAD "+" TO EXPAND]
; [00000068 BYTES: COLLAPSED FUNCTION ___time64_t_from_ft. PRESS KEYPAD	"+" TO EXPAND]
; [0000013D BYTES: COLLAPSED FUNCTION _fgets. PRESS KEYPAD "+" TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN41. PRESS KEYPAD "+" TO EXPAND]
; [00000008 BYTES: COLLAPSED FUNCTION $LN29. PRESS KEYPAD "+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION _wcsrchr.	PRESS KEYPAD "+" TO EXPAND]
; [00000061 BYTES: COLLAPSED FUNCTION _wcsstr. PRESS KEYPAD "+"	TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION __freea. PRESS KEYPAD "+"	TO EXPAND]
; [000001D6 BYTES: COLLAPSED FUNCTION _wcsftime_l_stat(wchar_t *,uint,wchar_t const *,tm const *,localeinfo_struct *). PRESS KEYPAD "+"	TO EXPAND]
; [0000003A BYTES: COLLAPSED FUNCTION __wcsftime_l. PRESS KEYPAD "+" TO	EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION _wcsftime. PRESS KEYPAD "+" TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION _clock. PRESS KEYPAD "+" TO EXPAND]
; [00000039 BYTES: COLLAPSED FUNCTION ___inittime. PRESS KEYPAD	"+" TO EXPAND]
; [000000F6 BYTES: COLLAPSED FUNCTION xtow_s(x,x,x,x,x). PRESS KEYPAD "+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION __itow_s.	PRESS KEYPAD "+" TO EXPAND]
; [00000106 BYTES: COLLAPSED FUNCTION x64tow_s(x,x,x,x,x,x). PRESS KEYPAD "+" TO EXPAND]
; [0000001F BYTES: COLLAPSED FUNCTION __ui64tow_s. PRESS KEYPAD	"+" TO EXPAND]
; [00000089 BYTES: COLLAPSED FUNCTION __waccess_s. PRESS KEYPAD	"+" TO EXPAND]
; [00000018 BYTES: COLLAPSED FUNCTION __waccess. PRESS KEYPAD "+" TO EXPAND]
; [0000008A BYTES: COLLAPSED FUNCTION __ctime64_s. PRESS KEYPAD	"+" TO EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION __wrename. PRESS KEYPAD "+" TO EXPAND]
; [000000BE BYTES: COLLAPSED FUNCTION __wstrdate_s. PRESS KEYPAD "+" TO	EXPAND]
; [000000B5 BYTES: COLLAPSED FUNCTION __towupper_l. PRESS KEYPAD "+" TO	EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION _towupper. PRESS KEYPAD "+" TO EXPAND]
; [000002B4 BYTES: COLLAPSED FUNCTION wcstoxq(localeinfo_struct	*,wchar_t const	*,wchar_t const	* *,int,int). PRESS KEYPAD "+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION __wcstoi64. PRESS	KEYPAD "+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION __wcstoui64. PRESS KEYPAD	"+" TO EXPAND]
; [000000B5 BYTES: COLLAPSED FUNCTION __wstrtime_s. PRESS KEYPAD "+" TO	EXPAND]
; [0000003F BYTES: COLLAPSED FUNCTION _set_new_mode(int). PRESS	KEYPAD "+" TO EXPAND]
; [000000F4 BYTES: COLLAPSED FUNCTION unknown_libname_102. PRESS KEYPAD	"+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION unknown_libname_105. PRESS KEYPAD	"+" TO EXPAND]


; Attributes: bp-based frame

sub_79F51A proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword_1858570, eax
pop	ebp
retn
sub_79F51A endp

; [00000036 BYTES: COLLAPSED FUNCTION _set_new_handler(int (*)(uint)). PRESS KEYPAD "+"	TO EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION __callnewh. PRESS	KEYPAD "+" TO EXPAND]
; [00000242 BYTES: COLLAPSED FUNCTION __wcstombs_l_helper. PRESS KEYPAD	"+" TO EXPAND]
; [000000BA BYTES: COLLAPSED FUNCTION __wcstombs_s_l. PRESS KEYPAD "+" TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION _wcstombs_s. PRESS KEYPAD	"+" TO EXPAND]


; Attributes: bp-based frame

sub_79F8A3 proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword_1858574, eax
pop	ebp
retn
sub_79F8A3 endp

; [00000128 BYTES: COLLAPSED FUNCTION __invoke_watson. PRESS KEYPAD "+"	TO EXPAND]


; Attributes: bp-based frame

sub_79F9DA proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
push	dword_1858574
call	__decode_pointer
push	[ebp+arg_0]
mov	esi, eax
call	__encode_pointer
pop	ecx
pop	ecx
mov	dword_1858574, eax
mov	eax, esi
pop	esi
pop	ebp
retn
sub_79F9DA endp

; [00000026 BYTES: COLLAPSED FUNCTION __invalid_parameter. PRESS KEYPAD	"+" TO EXPAND]
; [00000010 BYTES: COLLAPSED FUNCTION __invalid_parameter_noinfo. PRESS	KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION _set_se_translator(void (*)(uint,_EXCEPTION_POINTERS *)).	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000148 BYTES: COLLAPSED FUNCTION _modf. PRESS KEYPAD "+" TO EXPAND]
; [00000099 BYTES: COLLAPSED FUNCTION __vswprintf_l. PRESS KEYPAD "+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __vswprintf. PRESS KEYPAD	"+" TO EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION __get_sys_err_msg. PRESS KEYPAD "+" TO EXPAND]
; [00000061 BYTES: COLLAPSED FUNCTION _strerror_s. PRESS KEYPAD	"+" TO EXPAND]
; [0000004D BYTES: COLLAPSED FUNCTION `eh vector constructor iterator'(void *,uint,int,void (*)(void *),void (*)(void *)). PRESS KEYPAD "+" TO EXPAND]
; [00000018 BYTES: COLLAPSED FUNCTION $LN11_7. PRESS KEYPAD "+"	TO EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION __copysign. PRESS	KEYPAD "+" TO EXPAND]
; [0000001C BYTES: COLLAPSED FUNCTION __finite.	PRESS KEYPAD "+" TO EXPAND]
; [00000034 BYTES: COLLAPSED FUNCTION __isnan. PRESS KEYPAD "+"	TO EXPAND]
; [00000094 BYTES: COLLAPSED FUNCTION __fpclass. PRESS KEYPAD "+" TO EXPAND]
; [0000002D BYTES: COLLAPSED FUNCTION _JumpToContinuation(void *,EHRegistrationNode *).	PRESS KEYPAD "+" TO EXPAND]
pop	ebx
leave
retn	8
; [00000007 BYTES: COLLAPSED FUNCTION sub_79FE87. PRESS	KEYPAD "+" TO EXPAND]
; [00000054 BYTES: COLLAPSED FUNCTION _UnwindNestedFrames(EHRegistrationNode *,EHExceptionRecord *). PRESS KEYPAD "+" TO EXPAND]
; [00000036 BYTES: COLLAPSED FUNCTION ___CxxFrameHandler3. PRESS KEYPAD	"+" TO EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION CatchGuardHandler(EHExceptionRecord *,CatchGuardRN *,void	*,void *). PRESS KEYPAD	"+" TO EXPAND]

; int __cdecl _CallSETranslator(struct EHExceptionRecord *, struct EHRegistrationNode *, void *, void *, struct	_s_FuncInfo const *, int, struct EHRegistrationNode *)
?_CallSETranslator@@YAHPAUEHExceptionRecord@@PAUEHRegistrationNode@@PAX2PBU_s_FuncInfo@@H1@Z:
mov	edi, edi
push	ebp
mov	ebp, esp
sub	esp, 38h
push	ebx
cmp	dword ptr [ebp+8], 123h
jnz	short loc_79FF6F
mov	eax, offset $ExceptionContinuation$27067
mov	ecx, [ebp+0Ch]
mov	[ecx], eax
xor	eax, eax
inc	eax
jmp	loc_7A001F

loc_79FF6F:
and	dword ptr [ebp-28h], 0
mov	dword ptr [ebp-24h], offset ?TranslatorGuardHandler@@YA?AW4_EXCEPTION_DISPOSITION@@PAUEHExceptionRecord@@PAUTranslatorGuardRN@@PAX2@Z ;	TranslatorGuardHandler(EHExceptionRecord *,TranslatorGuardRN *,void *,void *)
mov	eax, dword_167FD30
lea	ecx, [ebp-28h]
xor	eax, ecx
mov	[ebp-20h], eax
mov	eax, [ebp+18h]
mov	[ebp-1Ch], eax
mov	eax, [ebp+0Ch]
mov	[ebp-18h], eax
mov	eax, [ebp+1Ch]
mov	[ebp-14h], eax
mov	eax, [ebp+20h]
mov	[ebp-10h], eax
and	dword ptr [ebp-0Ch], 0
and	dword ptr [ebp-8], 0
and	dword ptr [ebp-4], 0
mov	[ebp-0Ch], esp
mov	[ebp-8], ebp
mov	eax, large fs:0
mov	[ebp-28h], eax
lea	eax, [ebp-28h]
mov	large fs:0, eax
mov	dword ptr [ebp-38h], 1
mov	eax, [ebp+8]
mov	[ebp-34h], eax
mov	eax, [ebp+10h]
mov	[ebp-30h], eax
call	__getptd
mov	eax, [eax+80h]
mov	[ebp-2Ch], eax
lea	eax, [ebp-34h]
push	eax
mov	eax, [ebp+8]
push	dword ptr [eax]
call	dword ptr [ebp-2Ch]
pop	ecx
pop	ecx
and	dword ptr [ebp-38h], 0
$ExceptionContinuation$27067 dd	offset loc_FC7D83
jz	short loc_7A0013
mov	ebx, large fs:0
mov	eax, [ebx]
mov	ebx, [ebp-28h]
mov	[ebx], eax
mov	large fs:0, ebx
jmp	short loc_7A001C

loc_7A0013:
mov	eax, [ebp-28h]
mov	large fs:0, eax

loc_7A001C:
mov	eax, [ebp-38h]

loc_7A001F:
pop	ebx
leave
retn
; [0000009F BYTES: COLLAPSED FUNCTION TranslatorGuardHandler(EHExceptionRecord *,TranslatorGuardRN *,void *,void *). PRESS KEYPAD "+" TO EXPAND]
; [00000075 BYTES: COLLAPSED FUNCTION _GetRangeOfTrysToCheck(_s_FuncInfo const *,int,int,uint *,uint *). PRESS KEYPAD "+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION __CreateFrameInfo. PRESS KEYPAD "+" TO EXPAND]
; [00000027 BYTES: COLLAPSED FUNCTION __IsExceptionObjectToBeDestroyed.	PRESS KEYPAD "+" TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION __FindAndUnlinkFrame. PRESS KEYPAD "+" TO	EXPAND]
; [00000060 BYTES: COLLAPSED FUNCTION _CallCatchBlock2(EHRegistrationNode *,_s_FuncInfo	const *,void *,int,ulong). PRESS KEYPAD	"+" TO EXPAND]
; [0000004C BYTES: COLLAPSED FUNCTION _CxxThrowException(x,x). PRESS KEYPAD "+"	TO EXPAND]
; [000000B7 BYTES: COLLAPSED FUNCTION _fgetws. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN19_3. PRESS KEYPAD "+"	TO EXPAND]
; [00000070 BYTES: COLLAPSED FUNCTION _vscan_fn_0. PRESS KEYPAD	"+" TO EXPAND]
; [00000022 BYTES: COLLAPSED FUNCTION _swscanf_s. PRESS	KEYPAD "+" TO EXPAND]
; [000000EE BYTES: COLLAPSED FUNCTION _wcsncat_s. PRESS	KEYPAD "+" TO EXPAND]
align 10h
; [00000025 BYTES: COLLAPSED FUNCTION operator new(uint,std::nothrow_t const &). PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION __catch$??2@YAPAXIABUnothrow_t@std@@@Z$0.	PRESS KEYPAD "+" TO EXPAND]
; [00000243 BYTES: COLLAPSED FUNCTION __gmtime64_s. PRESS KEYPAD "+" TO	EXPAND]
; [00000043 BYTES: COLLAPSED FUNCTION __difftime64. PRESS KEYPAD "+" TO	EXPAND]


; Attributes: bp-based frame

sub_7A0785 proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	0Ch
push	offset unk_16254D0
call	__SEH_prolog4
xor	eax, eax
xor	esi, esi
cmp	[ebp+arg_0], esi
setnz	al
cmp	eax, esi
jnz	short loc_7A07BC
call	__errno
mov	dword ptr [eax], 16h
push	esi
push	esi
push	esi
push	esi
push	esi
call	__invalid_parameter
add	esp, 14h
or	eax, 0FFFFFFFFh
jmp	short loc_7A081B

loc_7A07BC:
call	sub_7A1F02
push	20h
pop	ebx
add	eax, ebx
push	eax
push	1
call	__lock_file2
pop	ecx
pop	ecx
mov	[ebp+ms_exc.disabled], esi
call	sub_7A1F02
add	eax, ebx
push	eax		; FILE *
call	__stbuf
pop	ecx
mov	edi, eax
lea	eax, [ebp+arg_4]
push	eax
push	esi
push	[ebp+arg_0]
call	sub_7A1F02
add	eax, ebx
push	eax
call	__woutput_l
mov	[ebp+var_1C], eax
call	sub_7A1F02
add	eax, ebx
push	eax		; FILE *
push	edi		; int
call	__ftbuf
add	esp, 18h
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7A0821
mov	eax, [ebp+var_1C]

loc_7A081B:
call	__SEH_epilog4
retn
sub_7A0785 endp




sub_7A0821 proc	near
call	sub_7A1F02
add	eax, 20h
push	eax
push	1
call	__unlock_file2
pop	ecx
pop	ecx
retn
sub_7A0821 endp

; [00000032 BYTES: COLLAPSED FUNCTION __wmkdir.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [000000AD BYTES: COLLAPSED FUNCTION _memchr. PRESS KEYPAD "+"	TO EXPAND]
; [00000254 BYTES: COLLAPSED FUNCTION __ioinit.	PRESS KEYPAD "+" TO EXPAND]
; [00000081 BYTES: COLLAPSED FUNCTION __set_osfhnd. PRESS KEYPAD "+" TO	EXPAND]
; [00000086 BYTES: COLLAPSED FUNCTION __free_osfhnd. PRESS KEYPAD "+" TO EXPAND]
; [00000077 BYTES: COLLAPSED FUNCTION __get_osfhandle. PRESS KEYPAD "+"	TO EXPAND]
; [00000092 BYTES: COLLAPSED FUNCTION ___lock_fhandle. PRESS KEYPAD "+"	TO EXPAND]
; [00000005 BYTES: COLLAPSED FUNCTION $LN14_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN11_8. PRESS KEYPAD "+"	TO EXPAND]
; [00000027 BYTES: COLLAPSED FUNCTION __unlock_fhandle.	PRESS KEYPAD "+" TO EXPAND]
; [000000CD BYTES: COLLAPSED FUNCTION __alloc_osfhnd. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION $LN48_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN35_0. PRESS KEYPAD "+"	TO EXPAND]
; [000000B5 BYTES: COLLAPSED CHUNK OF FUNCTION __alloc_osfhnd. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN31_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000149 BYTES: COLLAPSED FUNCTION ___freetlocinfo. PRESS KEYPAD "+"	TO EXPAND]
; [0000008F BYTES: COLLAPSED FUNCTION ___addlocaleref. PRESS KEYPAD "+"	TO EXPAND]
; [00000099 BYTES: COLLAPSED FUNCTION ___removelocaleref. PRESS	KEYPAD "+" TO EXPAND]
; [00000026 BYTES: COLLAPSED FUNCTION __copytlocinfo_nolock. PRESS KEYPAD "+" TO EXPAND]
; [0000003E BYTES: COLLAPSED FUNCTION __updatetlocinfoEx_nolock. PRESS KEYPAD "+" TO EXPAND]
; [0000006A BYTES: COLLAPSED FUNCTION ___updatetlocinfo. PRESS KEYPAD "+" TO EXPAND]
; [0000000C BYTES: COLLAPSED FUNCTION $LN11_9. PRESS KEYPAD "+"	TO EXPAND]
; [00000053 BYTES: COLLAPSED FUNCTION _sync_legacy_variables_lk. PRESS KEYPAD "+" TO EXPAND]



sub_7A12EE proc	near
xor	eax, eax
retn
sub_7A12EE endp

; [00000040 BYTES: COLLAPSED FUNCTION __strcats. PRESS KEYPAD "+" TO EXPAND]
; [00000129 BYTES: COLLAPSED FUNCTION ___lc_strtolc. PRESS KEYPAD "+" TO EXPAND]
; [0000006D BYTES: COLLAPSED FUNCTION ___lc_lctostr. PRESS KEYPAD "+" TO EXPAND]
; [0000017D BYTES: COLLAPSED FUNCTION __setlocale_get_all. PRESS KEYPAD	"+" TO EXPAND]
; [00000231 BYTES: COLLAPSED FUNCTION __expandlocale. PRESS KEYPAD "+" TO EXPAND]
; [00000302 BYTES: COLLAPSED FUNCTION __setlocale_set_cat. PRESS KEYPAD	"+" TO EXPAND]
; [0000021B BYTES: COLLAPSED FUNCTION __setlocale_nolock. PRESS	KEYPAD "+" TO EXPAND]
; [00000126 BYTES: COLLAPSED FUNCTION _setlocale. PRESS	KEYPAD "+" TO EXPAND]
; [00000008 BYTES: COLLAPSED FUNCTION $LN30_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN21_2. PRESS KEYPAD "+"	TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN31_2. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN25_0. PRESS KEYPAD "+"	TO EXPAND]
jmp	short $LN26
; [00000023 BYTES: COLLAPSED CHUNK OF FUNCTION _setlocale. PRESS KEYPAD	"+" TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN32_2. PRESS KEYPAD "+"	TO EXPAND]
; [00000005 BYTES: COLLAPSED FUNCTION $LN17_1. PRESS KEYPAD "+"	TO EXPAND]



sub_7A1F02 proc	near
mov	eax, offset off_1680038
retn
sub_7A1F02 endp

; [000000B1 BYTES: COLLAPSED FUNCTION ___initstdio. PRESS KEYPAD "+" TO	EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION ___endstdio. PRESS KEYPAD	"+" TO EXPAND]
; [00000041 BYTES: COLLAPSED FUNCTION __lock_file. PRESS KEYPAD	"+" TO EXPAND]
; [00000032 BYTES: COLLAPSED FUNCTION __lock_file2. PRESS KEYPAD "+" TO	EXPAND]
; [0000003C BYTES: COLLAPSED FUNCTION __unlock_file. PRESS KEYPAD "+" TO EXPAND]
; [0000002F BYTES: COLLAPSED FUNCTION __unlock_file2. PRESS KEYPAD "+" TO EXPAND]
; [00000076 BYTES: COLLAPSED FUNCTION _fpcvt(char *,uint,_strflt *,int,int *,int *). PRESS KEYPAD "+" TO EXPAND]
; [000000A9 BYTES: COLLAPSED FUNCTION __fcvt_s.	PRESS KEYPAD "+" TO EXPAND]
; [000000AD BYTES: COLLAPSED FUNCTION __ecvt_s.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000001F BYTES: COLLAPSED FUNCTION __allshl.	PRESS KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION FindCompleteObject(void *	*). PRESS KEYPAD "+" TO	EXPAND]
; [00000077 BYTES: COLLAPSED FUNCTION FindSITargetTypeInstance(_s_RTTICompleteObjectLocator const *,TypeDescriptor *,TypeDescriptor *).	PRESS KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION PMDtoOffset(void *,PMD const &). PRESS KEYPAD "+"	TO EXPAND]
; [00000108 BYTES: COLLAPSED FUNCTION FindMITargetTypeInstance(void *,_s_RTTICompleteObjectLocator const *,TypeDescriptor *,int,TypeDescriptor *). PRESS KEYPAD	"+" TO EXPAND]
; [00000156 BYTES: COLLAPSED FUNCTION FindVITargetTypeInstance(void *,_s_RTTICompleteObjectLocator const *,TypeDescriptor *,int,TypeDescriptor *). PRESS KEYPAD	"+" TO EXPAND]
; [000000A6 BYTES: COLLAPSED FUNCTION ___RTDynamicCast.	PRESS KEYPAD "+" TO EXPAND]
; [00000014 BYTES: COLLAPSED FUNCTION $LN21_3. PRESS KEYPAD "+"	TO EXPAND]
; [0000001B BYTES: COLLAPSED FUNCTION $LN14_1. PRESS KEYPAD "+"	TO EXPAND]
; [0000006E BYTES: COLLAPSED FUNCTION $LN18_4. PRESS KEYPAD "+"	TO EXPAND]
; [0000009C BYTES: COLLAPSED FUNCTION __fseeki64_nolock. PRESS KEYPAD "+" TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION __fseeki64. PRESS	KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN7_5. PRESS KEYPAD "+" TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION _fsetpos.	PRESS KEYPAD "+" TO EXPAND]
; [000000F1 BYTES: COLLAPSED FUNCTION __ungetc_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [00000068 BYTES: COLLAPSED FUNCTION _ungetc. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN8_6. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_7A2994(FILE *)
sub_7A2994 proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8

push	0Ch
push	offset unk_1625668
call	__SEH_prolog4
xor	edi, edi
mov	[ebp+var_1C], edi
xor	eax, eax
mov	esi, [ebp+arg_0]
cmp	esi, edi
setnz	al
cmp	eax, edi
jnz	short loc_7A29D3
call	__errno
mov	dword ptr [eax], 16h
push	edi
push	edi
push	edi
push	edi
push	edi
call	__invalid_parameter
add	esp, 14h
or	eax, 0FFFFFFFFh
jmp	loc_7A2A87

loc_7A29D3:
push	esi
call	__lock_file
pop	ecx
mov	[ebp+ms_exc.disabled], edi
test	byte ptr [esi+0Ch], 40h
jnz	short loc_7A2A5A
push	esi		; FILE *
call	__fileno
pop	ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_7A2A0A
cmp	eax, 0FFFFFFFEh
jz	short loc_7A2A0A
mov	edx, eax
sar	edx, 5
mov	ecx, eax
and	ecx, 1Fh
shl	ecx, 6
add	ecx, dword_19736C0[edx*4]
jmp	short loc_7A2A0F

loc_7A2A0A:
mov	ecx, offset unk_167FFF0

loc_7A2A0F:
test	byte ptr [ecx+24h], 7Fh
jnz	short loc_7A2A3E
cmp	eax, 0FFFFFFFFh
jz	short loc_7A2A33
cmp	eax, 0FFFFFFFEh
jz	short loc_7A2A33
mov	ecx, eax
sar	ecx, 5
and	eax, 1Fh
shl	eax, 6
add	eax, dword_19736C0[ecx*4]
jmp	short loc_7A2A38

loc_7A2A33:
mov	eax, offset unk_167FFF0

loc_7A2A38:
test	byte ptr [eax+24h], 80h
jz	short loc_7A2A5A

loc_7A2A3E:
call	__errno
mov	dword ptr [eax], 16h
push	edi
push	edi
push	edi
push	edi
push	edi
call	__invalid_parameter
add	esp, 14h
or	[ebp+var_1C], 0FFFFFFFFh

loc_7A2A5A:
cmp	[ebp+var_1C], edi
jnz	short loc_7A2A78
dec	dword ptr [esi+4]
js	short loc_7A2A6E
mov	ecx, [esi]
movzx	eax, byte ptr [ecx]
inc	ecx
mov	[esi], ecx
jmp	short loc_7A2A75

loc_7A2A6E:		; FILE *
push	esi
call	__filbuf
pop	ecx

loc_7A2A75:
mov	[ebp+var_1C], eax

loc_7A2A78:
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7A2A90
mov	eax, [ebp+var_1C]

loc_7A2A87:
call	__SEH_epilog4
retn
sub_7A2994 endp




sub_7A2A8D proc	near
mov	esi, [ebp+8]
sub_7A2A8D endp	; sp-analysis failed




sub_7A2A90 proc	near
push	esi
call	__unlock_file
pop	ecx
retn
sub_7A2A90 endp

; [000001BA BYTES: COLLAPSED FUNCTION __ungetwc_nolock.	PRESS KEYPAD "+" TO EXPAND]
; [0000006E BYTES: COLLAPSED FUNCTION _ungetwc.	PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN8_7. PRESS KEYPAD "+" TO EXPAND]
; [000001AB BYTES: COLLAPSED FUNCTION __fgetwc_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [0000006A BYTES: COLLAPSED FUNCTION _fgetwc. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN8_8. PRESS KEYPAD "+" TO EXPAND]
; [00000187 BYTES: COLLAPSED FUNCTION __fputwc_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [0000006F BYTES: COLLAPSED FUNCTION _fputwc. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN8_9. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7A30E9 proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
lea	eax, [ebp+arg_0]
push	eax
mov	esi, ecx
call	??0exception@std@@QAE@ABQBD@Z ;	std::exception::exception(char const * const &)
mov	dword ptr [esi], offset	off_14484A8
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_7A30E9 endp




sub_7A3107 proc	near
mov	dword ptr [ecx], offset	off_14484A8
jmp	sub_7966CA
sub_7A3107 endp



; Attributes: bp-based frame

; int __thiscall sub_7A3112(void *, char)
sub_7A3112 proc	near

arg_0= byte ptr	 8

mov	edi, edi
push	ebp
mov	ebp, esp
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14484A8
call	sub_7966CA
test	[ebp+arg_0], 1
jz	short loc_7A3132
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
pop	ecx

loc_7A3132:
mov	eax, esi
pop	esi
pop	ebp
retn	4
sub_7A3112 endp

; [0000005F BYTES: COLLAPSED FUNCTION ___TypeMatch. PRESS KEYPAD "+" TO	EXPAND]
; [00000049 BYTES: COLLAPSED FUNCTION ___FrameUnwindFilter. PRESS KEYPAD "+" TO	EXPAND]
; [000000C0 BYTES: COLLAPSED FUNCTION ___FrameUnwindToState. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION $LN29_0. PRESS KEYPAD "+"	TO EXPAND]
; [0000001B BYTES: COLLAPSED FUNCTION $LN18_5. PRESS KEYPAD "+"	TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION ExFilterRethrow(_EXCEPTION_POINTERS *). PRESS KEYPAD "+" TO EXPAND]
; [00000043 BYTES: COLLAPSED FUNCTION ___DestructExceptionObject. PRESS	KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN14_2. PRESS KEYPAD "+"	TO EXPAND]
; [00000008 BYTES: COLLAPSED FUNCTION $LN9_10. PRESS KEYPAD "+"	TO EXPAND]
$LN13_5	db 0CCh
; [00000029 BYTES: COLLAPSED FUNCTION ___AdjustPointer.	PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION __uncaught_exception(void). PRESS	KEYPAD "+" TO EXPAND]
; [0000007B BYTES: COLLAPSED FUNCTION IsInExceptionSpec(EHExceptionRecord *,_s_ESTypeList const	*). PRESS KEYPAD "+" TO	EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION $LN20_4. PRESS KEYPAD "+"	TO EXPAND]
db  83h	; ƒ
db  4Dh	; M
db 0FCh	; ü
db 0FFh
db 0E8h	; è
db 0F4h	; ô
db  15h
db    0
db    0


; Attributes: noreturn

sub_7A3444 proc	near
call	__getptd
mov	ecx, [ebp+8]
push	0
push	0
mov	[eax+94h], ecx
call	__CxxThrowException@8 ;	_CxxThrowException(x,x)
sub_7A3444 endp

align 4
; [0000011B BYTES: COLLAPSED FUNCTION CallCatchBlock(EHExceptionRecord *,EHRegistrationNode *,_CONTEXT *,_s_FuncInfo const *,void *,int,ulong).	PRESS KEYPAD "+" TO EXPAND]
; [00000005 BYTES: COLLAPSED CHUNK OF FUNCTION CallCatchBlock(EHExceptionRecord	*,EHRegistrationNode *,_CONTEXT	*,_s_FuncInfo const *,void *,int,ulong). PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION $LN27. PRESS KEYPAD "+" TO EXPAND]
; [00000076 BYTES: COLLAPSED FUNCTION $LN16_0. PRESS KEYPAD "+"	TO EXPAND]
; [0000017F BYTES: COLLAPSED FUNCTION ___BuildCatchObjectHelper. PRESS KEYPAD "+" TO EXPAND]
; [00000085 BYTES: COLLAPSED FUNCTION $LN33_0. PRESS KEYPAD "+"	TO EXPAND]



sub_7A37FC proc	near
xor	eax, eax
inc	eax
retn
sub_7A37FC endp



; Attributes: noreturn

sub_7A3800 proc	near
mov	esp, [ebp-18h]
call	?terminate@@YAXXZ ; terminate(void)
sub_7A3800 endp

db 0CCh
; [0000006E BYTES: COLLAPSED FUNCTION CatchIt(EHExceptionRecord	*,EHRegistrationNode *,_CONTEXT	*,void *,_s_FuncInfo const *,_s_HandlerType const *,_s_CatchableType const *,_s_TryBlockMapEntry const *,int,EHRegistrationNode	*,uchar). PRESS	KEYPAD "+" TO EXPAND]
; [000000F4 BYTES: COLLAPSED FUNCTION FindHandlerForForeignException(EHExceptionRecord *,EHRegistrationNode *,_CONTEXT *,void *,_s_FuncInfo const *,int,int,EHRegistrationNode *). PRESS KEYPAD	"+" TO EXPAND]
; [00000347 BYTES: COLLAPSED FUNCTION FindHandler(EHExceptionRecord *,EHRegistrationNode *,_CONTEXT *,void *,_s_FuncInfo const *,uchar,int,EHRegistrationNode *). PRESS	KEYPAD "+" TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION $LN75. PRESS KEYPAD "+" TO EXPAND]
; [000000E6 BYTES: COLLAPSED FUNCTION ___InternalCxxFrameHandler. PRESS	KEYPAD "+" TO EXPAND]
; [00000072 BYTES: COLLAPSED FUNCTION __encode_pointer.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION __encoded_null. PRESS KEYPAD "+" TO EXPAND]
; [00000072 BYTES: COLLAPSED FUNCTION __decode_pointer.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION __crtTlsAlloc(x).	PRESS KEYPAD "+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __fls_getvalue(x). PRESS KEYPAD "+" TO EXPAND]



sub_7A3EC5 proc	near
mov	eax, dword_16802E8
retn
sub_7A3EC5 endp

; [00000034 BYTES: COLLAPSED FUNCTION ___set_flsgetvalue. PRESS	KEYPAD "+" TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION __fls_setvalue(x,x). PRESS KEYPAD	"+" TO EXPAND]
; [0000003D BYTES: COLLAPSED FUNCTION __mtterm.	PRESS KEYPAD "+" TO EXPAND]
; [000000CF BYTES: COLLAPSED FUNCTION __initptd. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION $LN22_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN10_7. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN14_3. PRESS KEYPAD "+"	TO EXPAND]
; [00000079 BYTES: COLLAPSED FUNCTION __getptd_noexit. PRESS KEYPAD "+"	TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __getptd.	PRESS KEYPAD "+" TO EXPAND]
; [00000117 BYTES: COLLAPSED FUNCTION _freefls(x). PRESS KEYPAD	"+" TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN28_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN20_5. PRESS KEYPAD "+"	TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN29_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN24_2. PRESS KEYPAD "+"	TO EXPAND]
; [0000006E BYTES: COLLAPSED FUNCTION __freeptd. PRESS KEYPAD "+" TO EXPAND]
; [0000018D BYTES: COLLAPSED FUNCTION __mtinit.	PRESS KEYPAD "+" TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION __malloc_crt. PRESS KEYPAD "+" TO	EXPAND]
; [0000004C BYTES: COLLAPSED FUNCTION __calloc_crt. PRESS KEYPAD "+" TO	EXPAND]
; [0000004E BYTES: COLLAPSED FUNCTION __realloc_crt. PRESS KEYPAD "+" TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION __recalloc_crt. PRESS KEYPAD "+" TO EXPAND]
; [00000092 BYTES: COLLAPSED FUNCTION __msize. PRESS KEYPAD "+"	TO EXPAND]
; [00000008 BYTES: COLLAPSED FUNCTION $LN16_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN12_8. PRESS KEYPAD "+"	TO EXPAND]
align 4
; [00000045 BYTES: COLLAPSED FUNCTION __SEH_prolog4. PRESS KEYPAD "+" TO EXPAND]
; [00000014 BYTES: COLLAPSED FUNCTION __SEH_epilog4. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000018C BYTES: COLLAPSED FUNCTION __except_handler4. PRESS KEYPAD "+" TO EXPAND]
$LN31_3	db 4 dup(0CCh)
; [0000008B BYTES: COLLAPSED FUNCTION _strlen. PRESS KEYPAD "+"	TO EXPAND]


; Attributes: bp-based frame

sub_7A484B proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8

push	0Ch
push	offset unk_1625898
call	__SEH_prolog4
push	0Eh
call	__lock
pop	ecx
and	[ebp+ms_exc.disabled], 0
mov	esi, [ebp+arg_0]
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_7A489C
mov	eax, dword_1858598
mov	edx, offset unk_1858594

loc_7A4877:
mov	[ebp+var_1C], eax
test	eax, eax
jz	short loc_7A488F
cmp	[eax], ecx
jnz	short loc_7A48AE
mov	ecx, [eax+4]
mov	[edx+4], ecx
push	eax		; void *
call	_free
pop	ecx

loc_7A488F:		; void *
push	dword ptr [esi+4]
call	_free
pop	ecx
and	dword ptr [esi+4], 0

loc_7A489C:
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7A48B2
call	__SEH_epilog4
retn

loc_7A48AE:
mov	edx, eax
jmp	short loc_7A4877
sub_7A484B endp




sub_7A48B2 proc	near
push	0Eh
call	__unlock
pop	ecx
retn
sub_7A48B2 endp

; [000000E9 BYTES: COLLAPSED FUNCTION type_info::_Name_base(type_info const *,__type_info_node *). PRESS KEYPAD	"+" TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN26_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN15_2. PRESS KEYPAD "+"	TO EXPAND]
; [00000088 BYTES: COLLAPSED FUNCTION _strcmp. PRESS KEYPAD "+"	TO EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION terminate(void). PRESS KEYPAD "+"	TO EXPAND]
call	__SEH_epilog4
retn
; [00000013 BYTES: COLLAPSED FUNCTION unexpected(void).	PRESS KEYPAD "+" TO EXPAND]
; [00000037 BYTES: COLLAPSED FUNCTION _inconsistency(void). PRESS KEYPAD "+" TO	EXPAND]
$LN11_12 db 0CCh
; [00000011 BYTES: COLLAPSED FUNCTION __initp_eh_hooks.	PRESS KEYPAD "+" TO EXPAND]
; [00000164 BYTES: COLLAPSED FUNCTION __flsbuf.	PRESS KEYPAD "+" TO EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION _write_char. PRESS KEYPAD	"+" TO EXPAND]
; [00000026 BYTES: COLLAPSED FUNCTION _write_multi_char. PRESS KEYPAD "+" TO EXPAND]
; [00000B77 BYTES: COLLAPSED FUNCTION __output_l. PRESS	KEYPAD "+" TO EXPAND]
align 2
off_7A5802 dd offset $NORMAL_STATE$28981 ; jump	table for switch statement
dd offset $LN130
dd offset $LN129
dd offset $LN121
dd offset $LN117
dd offset $LN116
dd offset $LN112
dd offset $LN96
; [0000004D BYTES: COLLAPSED FUNCTION _write_string. PRESS KEYPAD "+" TO EXPAND]
; [00000BAE BYTES: COLLAPSED FUNCTION __output_s_l. PRESS KEYPAD "+" TO	EXPAND]
db 8Bh,	0FFh
off_7A641F dd offset $NORMAL_STATE$28987 ; jump	table for switch statement
dd offset $LN131
dd offset $LN130_0
dd offset $LN122
dd offset $LN118
dd offset $LN117_0
dd offset $LN113
dd offset $LN97
; [00000087 BYTES: COLLAPSED FUNCTION _fastcopy_I. PRESS KEYPAD	"+" TO EXPAND]
; [000000E3 BYTES: COLLAPSED FUNCTION __VEC_memcpy. PRESS KEYPAD "+" TO	EXPAND]
; [00000050 BYTES: COLLAPSED FUNCTION _has_osfxsr_set. PRESS KEYPAD "+"	TO EXPAND]
; [00000062 BYTES: COLLAPSED FUNCTION unknown_libname_107. PRESS KEYPAD	"+" TO EXPAND]



sub_7A665B proc	near
call	unknown_libname_107 ; Microsoft	VisualC	2-9/net	runtime
mov	dword_1972688, eax
xor	eax, eax
retn
sub_7A665B endp

; [00000138 BYTES: COLLAPSED FUNCTION _abort. PRESS KEYPAD "+" TO EXPAND]
; [000001AB BYTES: COLLAPSED FUNCTION __NMSG_WRITE. PRESS KEYPAD "+" TO	EXPAND]
; [00000039 BYTES: COLLAPSED FUNCTION __FF_MSGBANNER. PRESS KEYPAD "+" TO EXPAND]
; [0000017F BYTES: COLLAPSED FUNCTION ___getlocaleinfo.	PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7A6B03 proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword_18588BC, eax
pop	ebp
retn
sub_7A6B03 endp

; [0000002F BYTES: COLLAPSED FUNCTION _write_char_0. PRESS KEYPAD "+" TO EXPAND]
; [00000027 BYTES: COLLAPSED FUNCTION _write_multi_char_0. PRESS KEYPAD	"+" TO EXPAND]
; [00000B75 BYTES: COLLAPSED FUNCTION __woutput_l. PRESS KEYPAD	"+" TO EXPAND]
align 10h
off_7A76E0 dd offset $NORMAL_STATE$29479 ; jump	table for switch statement
dd offset $LN131_0
dd offset $LN130_1
dd offset $LN122_0
dd offset $LN118_0
dd offset $LN117_1
dd offset $LN113_0
dd offset $LN97_0
; [00000030 BYTES: COLLAPSED FUNCTION __heap_init. PRESS KEYPAD	"+" TO EXPAND]
; [0000004B BYTES: COLLAPSED FUNCTION __mtinitlocks. PRESS KEYPAD "+" TO EXPAND]
; [00000057 BYTES: COLLAPSED CHUNK OF FUNCTION __mtterm. PRESS KEYPAD "+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION __unlock.	PRESS KEYPAD "+" TO EXPAND]
; [000000BA BYTES: COLLAPSED FUNCTION __mtinitlocknum. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN14_5. PRESS KEYPAD "+"	TO EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION __lock. PRESS KEYPAD "+" TO EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION ___sbh_find_block. PRESS KEYPAD "+" TO EXPAND]
; [00000316 BYTES: COLLAPSED FUNCTION ___sbh_free_block. PRESS KEYPAD "+" TO EXPAND]
; [000000B0 BYTES: COLLAPSED FUNCTION ___sbh_alloc_new_region. PRESS KEYPAD "+"	TO EXPAND]
; [00000108 BYTES: COLLAPSED FUNCTION ___sbh_alloc_new_group. PRESS KEYPAD "+" TO EXPAND]
; [000002E1 BYTES: COLLAPSED FUNCTION ___sbh_resize_block. PRESS KEYPAD	"+" TO EXPAND]
; [000002E5 BYTES: COLLAPSED FUNCTION ___sbh_alloc_block. PRESS	KEYPAD "+" TO EXPAND]
; [000001FA BYTES: COLLAPSED FUNCTION wcstoxl(localeinfo_struct	*,wchar_t const	*,wchar_t const	* *,int,int). PRESS KEYPAD "+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION _wcstol. PRESS KEYPAD "+"	TO EXPAND]
; [0000007F BYTES: COLLAPSED FUNCTION __is_LFH_enabled.	PRESS KEYPAD "+" TO EXPAND]
; [000000E7 BYTES: COLLAPSED FUNCTION __expand.	PRESS KEYPAD "+" TO EXPAND]
; [00000008 BYTES: COLLAPSED FUNCTION $LN27_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN21_7. PRESS KEYPAD "+"	TO EXPAND]
; [00000048 BYTES: COLLAPSED CHUNK OF FUNCTION __expand. PRESS KEYPAD "+" TO EXPAND]
; [0000009C BYTES: COLLAPSED FUNCTION __stbuf. PRESS KEYPAD "+"	TO EXPAND]
; [00000034 BYTES: COLLAPSED FUNCTION __ftbuf. PRESS KEYPAD "+"	TO EXPAND]


; Attributes: bp-based frame

sub_7A8857 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	10h
push	offset unk_1625978
call	__SEH_prolog4
call	sub_7A1F02
mov	esi, eax
add	esi, 20h
mov	[ebp+var_1C], esi
xor	eax, eax
xor	edi, edi
cmp	[ebp+arg_4], edi
setnz	al
cmp	eax, edi
jnz	short loc_7A889B
call	__errno
mov	dword ptr [eax], 16h
push	edi
push	edi
push	edi
push	edi
push	edi
call	__invalid_parameter
add	esp, 14h
or	eax, 0FFFFFFFFh
jmp	short loc_7A88D6

loc_7A889B:
push	esi
call	__lock_file
pop	ecx
mov	[ebp+ms_exc.disabled], edi
push	esi		; FILE *
call	__stbuf
mov	edi, eax
push	[ebp+arg_C]
push	[ebp+arg_8]
push	[ebp+arg_4]
push	esi
call	[ebp+arg_0]
mov	[ebp+var_20], eax
push	esi		; FILE *
push	edi		; int
call	__ftbuf
add	esp, 1Ch
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7A88DF
mov	eax, [ebp+var_20]

loc_7A88D6:
call	__SEH_epilog4
retn
sub_7A8857 endp




sub_7A88DC proc	near
mov	esi, [ebp-1Ch]
sub_7A88DC endp	; sp-analysis failed




sub_7A88DF proc	near
push	esi
call	__unlock_file
pop	ecx
retn
sub_7A88DF endp

; [0000001D BYTES: COLLAPSED FUNCTION __vprintf_s_l. PRESS KEYPAD "+" TO EXPAND]



sub_7A8904 proc	near
mov	edi, edi
push	esi
mov	eax, offset unk_1622D70
mov	esi, offset unk_1622D70
push	edi
mov	edi, eax
cmp	eax, esi
jnb	short loc_7A8927

loc_7A8918:
mov	eax, [edi]
test	eax, eax
jz	short loc_7A8920
call	eax

loc_7A8920:
add	edi, 4
cmp	edi, esi
jb	short loc_7A8918

loc_7A8927:
pop	edi
pop	esi
retn
sub_7A8904 endp




; void __cdecl sub_7A892A()
sub_7A892A proc	near
mov	edi, edi
push	esi
mov	eax, offset unk_1622D78
mov	esi, offset unk_1622D78
push	edi
mov	edi, eax
cmp	eax, esi
jnb	short loc_7A894D

loc_7A893E:
mov	eax, [edi]
test	eax, eax
jz	short loc_7A8946
call	eax

loc_7A8946:
add	edi, 4
cmp	edi, esi
jb	short loc_7A893E

loc_7A894D:
pop	edi
pop	esi
retn
sub_7A892A endp

; [00000021 BYTES: COLLAPSED FUNCTION __initp_misc_cfltcvt_tab.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000035 BYTES: COLLAPSED FUNCTION __ValidateImageBase. PRESS KEYPAD	"+" TO EXPAND]
align 10h
; [00000044 BYTES: COLLAPSED FUNCTION __FindPESection. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [000000BD BYTES: COLLAPSED FUNCTION __IsNonwritableInCurrentImage. PRESS KEYPAD "+" TO EXPAND]
; [00000001 BYTES: COLLAPSED FUNCTION nullsub_3. PRESS KEYPAD "+" TO EXPAND]
; [00000160 BYTES: COLLAPSED FUNCTION __XcptFilter. PRESS KEYPAD "+" TO	EXPAND]
; [0000001E BYTES: COLLAPSED FUNCTION __initp_misc_winsig. PRESS KEYPAD	"+" TO EXPAND]
; [00000037 BYTES: COLLAPSED FUNCTION _siglookup. PRESS	KEYPAD "+" TO EXPAND]



sub_7A8C83 proc	near
push	dword_1858A38
call	__decode_pointer
pop	ecx
retn
sub_7A8C83 endp

; [0000016E BYTES: COLLAPSED FUNCTION _raise. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION $LN50. PRESS KEYPAD "+" TO EXPAND]
; [0000000F BYTES: COLLAPSED FUNCTION $LN37_1. PRESS KEYPAD "+"	TO EXPAND]
; [00000027 BYTES: COLLAPSED FUNCTION sub_7A8E13. PRESS	KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _raise. PRESS KEYPAD "+"	TO EXPAND]
; [0000000F BYTES: COLLAPSED FUNCTION $LN44. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7A8E4F proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword_1858A48, eax
pop	ebp
retn
sub_7A8E4F endp

; [00000060 BYTES: COLLAPSED FUNCTION ___crtInitCritSecAndSpinCount. PRESS KEYPAD "+" TO EXPAND]
; [0000002F BYTES: COLLAPSED FUNCTION _CPtoLCID. PRESS KEYPAD "+" TO EXPAND]
; [00000064 BYTES: COLLAPSED FUNCTION setSBCS(threadmbcinfostruct *). PRESS KEYPAD "+" TO EXPAND]
; [00000193 BYTES: COLLAPSED FUNCTION setSBUpLow(threadmbcinfostruct *). PRESS KEYPAD "+" TO EXPAND]
; [00000098 BYTES: COLLAPSED FUNCTION ___updatetmbcinfo. PRESS KEYPAD "+" TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN18_6. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN13_12.	PRESS KEYPAD "+" TO EXPAND]
; [0000007C BYTES: COLLAPSED FUNCTION getSystemCP(int).	PRESS KEYPAD "+" TO EXPAND]
; [000001E5 BYTES: COLLAPSED FUNCTION __setmbcp_nolock.	PRESS KEYPAD "+" TO EXPAND]
; [00000161 BYTES: COLLAPSED FUNCTION __setmbcp. PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN27_2. PRESS KEYPAD "+"	TO EXPAND]
jmp	short $LN28_2
; [0000002E BYTES: COLLAPSED CHUNK OF FUNCTION __setmbcp. PRESS	KEYPAD "+" TO EXPAND]
; [0000001E BYTES: COLLAPSED FUNCTION ___initmbctable. PRESS KEYPAD "+"	TO EXPAND]
; [00000042 BYTES: COLLAPSED FUNCTION __CxxUnhandledExceptionFilter(_EXCEPTION_POINTERS	*). PRESS KEYPAD "+" TO	EXPAND]
; [0000000E BYTES: COLLAPSED FUNCTION $LN5_0. PRESS KEYPAD "+" TO EXPAND]
; [0000005F BYTES: COLLAPSED FUNCTION __wincmdln. PRESS	KEYPAD "+" TO EXPAND]
; [000000DE BYTES: COLLAPSED FUNCTION __setenvp. PRESS KEYPAD "+" TO EXPAND]
; [0000019A BYTES: COLLAPSED FUNCTION _parse_cmdline. PRESS KEYPAD "+" TO EXPAND]
; [000000BB BYTES: COLLAPSED FUNCTION __setargv. PRESS KEYPAD "+" TO EXPAND]
; [00000137 BYTES: COLLAPSED FUNCTION ___crtGetEnvironmentStringsA. PRESS KEYPAD "+" TO	EXPAND]
; [00000096 BYTES: COLLAPSED FUNCTION ___security_init_cookie. PRESS KEYPAD "+"	TO EXPAND]
; [00000032 BYTES: COLLAPSED FUNCTION __fileno.	PRESS KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION __inc. PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION __un_inc.	PRESS KEYPAD "+" TO EXPAND]
; [0000002A BYTES: COLLAPSED FUNCTION __whiteout. PRESS	KEYPAD "+" TO EXPAND]
; [00000FBD BYTES: COLLAPSED FUNCTION __input_l. PRESS KEYPAD "+" TO EXPAND]
; [00000057 BYTES: COLLAPSED FUNCTION ___check_float_string. PRESS KEYPAD "+" TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION __hextodec. PRESS	KEYPAD "+" TO EXPAND]
; [00001124 BYTES: COLLAPSED FUNCTION __input_s_l. PRESS KEYPAD	"+" TO EXPAND]
; [000000B8 BYTES: COLLAPSED FUNCTION __isctype_l. PRESS KEYPAD	"+" TO EXPAND]
; [000002C9 BYTES: COLLAPSED FUNCTION __openfile. PRESS	KEYPAD "+" TO EXPAND]
; [0000012C BYTES: COLLAPSED FUNCTION __getstream. PRESS KEYPAD	"+" TO EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION $LN24_3. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN19_7. PRESS KEYPAD "+"	TO EXPAND]
align 4
; [000000D6 BYTES: COLLAPSED FUNCTION __local_unwind4. PRESS KEYPAD "+"	TO EXPAND]
; [0000001C BYTES: COLLAPSED FUNCTION _seh_longjmp_unwind4(x). PRESS KEYPAD "+"	TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION _EH4_CallFilterFunc(x,x).	PRESS KEYPAD "+" TO EXPAND]
; [00000019 BYTES: COLLAPSED FUNCTION _EH4_TransferToHandler(x,x). PRESS KEYPAD	"+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION _EH4_GlobalUnwind(x). PRESS KEYPAD "+" TO	EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION _EH4_LocalUnwind(x,x,x,x). PRESS KEYPAD "+" TO EXPAND]
; [0000012B BYTES: COLLAPSED FUNCTION __filbuf.	PRESS KEYPAD "+" TO EXPAND]
; [000005C2 BYTES: COLLAPSED FUNCTION __read_nolock. PRESS KEYPAD "+" TO EXPAND]
; [000000F3 BYTES: COLLAPSED FUNCTION __read. PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN15_4. PRESS KEYPAD "+"	TO EXPAND]
; [00000075 BYTES: COLLAPSED FUNCTION __lseek_nolock. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_7ACB9A(int, LONG lDistanceToMove, DWORD dwMoveMethod)
sub_7ACB9A proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8
lDistanceToMove= dword ptr  0Ch
dwMoveMethod= dword ptr	 10h

push	10h
push	offset unk_1625A78
call	__SEH_prolog4
mov	eax, [ebp+arg_0]
cmp	eax, 0FFFFFFFEh
jnz	short loc_7ACBC9
call	___doserrno
and	dword ptr [eax], 0
call	__errno
mov	dword ptr [eax], 9

loc_7ACBC1:
or	eax, 0FFFFFFFFh
jmp	loc_7ACC66

loc_7ACBC9:
xor	edi, edi
cmp	eax, edi
jl	short loc_7ACBD7
cmp	eax, uNumber
jb	short loc_7ACBF8

loc_7ACBD7:
call	___doserrno
mov	[eax], edi
call	__errno
mov	dword ptr [eax], 9
push	edi
push	edi
push	edi
push	edi
push	edi
call	__invalid_parameter
add	esp, 14h
jmp	short loc_7ACBC1

loc_7ACBF8:
mov	ecx, eax
sar	ecx, 5
lea	ebx, dword_19736C0[ecx*4]
mov	esi, eax
and	esi, 1Fh
shl	esi, 6
mov	ecx, [ebx]
movsx	ecx, byte ptr [ecx+esi+4]
and	ecx, 1
jz	short loc_7ACBD7
push	eax
call	___lock_fhandle
pop	ecx
mov	[ebp+ms_exc.disabled], edi
mov	eax, [ebx]
test	byte ptr [eax+esi+4], 1
jz	short loc_7ACC41
push	[ebp+dwMoveMethod] ; dwMoveMethod
push	[ebp+lDistanceToMove] ;	lDistanceToMove
push	[ebp+arg_0]	; int
call	__lseek_nolock
add	esp, 0Ch
mov	[ebp+var_1C], eax
jmp	short loc_7ACC57

loc_7ACC41:
call	__errno
mov	dword ptr [eax], 9
call	___doserrno
mov	[eax], edi
or	[ebp+var_1C], 0FFFFFFFFh

loc_7ACC57:
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7ACC6C
mov	eax, [ebp+var_1C]

loc_7ACC66:
call	__SEH_epilog4
retn
sub_7ACB9A endp




sub_7ACC6C proc	near
push	dword ptr [ebp+8]
call	__unlock_fhandle
pop	ecx
retn
sub_7ACC6C endp

; [000000A7 BYTES: COLLAPSED FUNCTION __fltin2.	PRESS KEYPAD "+" TO EXPAND]
; [000006C7 BYTES: COLLAPSED FUNCTION ___strgtold12_l. PRESS KEYPAD "+"	TO EXPAND]
db 90h
off_7AD3E5 dd offset $LN119 ; jump table for switch statement
dd offset $LN108
dd offset $LN97_1
dd offset $LN88
dd offset $LN75_0
dd offset $LN61
dd offset $LN58
dd offset $LN43
dd offset $LN49_0
dd offset $LN36_3
dd offset $LN254
dd offset $LN28_3
; [0000009C BYTES: COLLAPSED FUNCTION __close_nolock. PRESS KEYPAD "+" TO EXPAND]
; [000000C3 BYTES: COLLAPSED FUNCTION __close. PRESS KEYPAD "+"	TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN14_8. PRESS KEYPAD "+"	TO EXPAND]
; [00000031 BYTES: COLLAPSED FUNCTION __freebuf. PRESS KEYPAD "+" TO EXPAND]
; [000003A5 BYTES: COLLAPSED FUNCTION __crtLCMapStringA_stat(localeinfo_struct *,ulong,ulong,char const	*,int,char *,int,int,int). PRESS KEYPAD	"+" TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION ___crtLCMapStringA. PRESS	KEYPAD "+" TO EXPAND]
; [00000038 BYTES: COLLAPSED FUNCTION __isleadbyte_l. PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION _isleadbyte. PRESS KEYPAD	"+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION _iswalpha. PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION _iswdigit. PRESS KEYPAD "+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION _iswspace. PRESS KEYPAD "+" TO EXPAND]
; [00000106 BYTES: COLLAPSED FUNCTION ___report_gsfailure. PRESS KEYPAD	"+" TO EXPAND]
; [00000073 BYTES: COLLAPSED FUNCTION __forcdecpt_l. PRESS KEYPAD "+" TO EXPAND]
; [00000082 BYTES: COLLAPSED FUNCTION __cropzeros_l. PRESS KEYPAD "+" TO EXPAND]
; [0000001C BYTES: COLLAPSED FUNCTION __positive. PRESS	KEYPAD "+" TO EXPAND]
; [00000042 BYTES: COLLAPSED FUNCTION __fassign_l. PRESS KEYPAD	"+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __fassign. PRESS KEYPAD "+" TO EXPAND]
; [0000001F BYTES: COLLAPSED FUNCTION __shift. PRESS KEYPAD "+"	TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION __forcdecpt. PRESS KEYPAD	"+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION __cropzeros. PRESS KEYPAD	"+" TO EXPAND]
; [0000016F BYTES: COLLAPSED FUNCTION __cftoe2_l. PRESS	KEYPAD "+" TO EXPAND]
; [000000D0 BYTES: COLLAPSED FUNCTION __cftoe_l. PRESS KEYPAD "+" TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION __cftoe. PRESS KEYPAD "+"	TO EXPAND]
; [00000373 BYTES: COLLAPSED FUNCTION __cftoa_l. PRESS KEYPAD "+" TO EXPAND]
; [000000F7 BYTES: COLLAPSED FUNCTION __cftof2_l. PRESS	KEYPAD "+" TO EXPAND]
; [000000BB BYTES: COLLAPSED FUNCTION __cftof_l. PRESS KEYPAD "+" TO EXPAND]
; [000000FA BYTES: COLLAPSED FUNCTION __cftog_l. PRESS KEYPAD "+" TO EXPAND]
; [00000088 BYTES: COLLAPSED FUNCTION __cfltcvt_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000023 BYTES: COLLAPSED FUNCTION __cfltcvt. PRESS KEYPAD "+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION __setdefaultprecision. PRESS KEYPAD "+" TO EXPAND]
; [0000003E BYTES: COLLAPSED FUNCTION __ms_p5_test_fdiv. PRESS KEYPAD "+" TO EXPAND]
; [00000029 BYTES: COLLAPSED FUNCTION __ms_p5_mp_test_fdiv. PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [00000067 BYTES: COLLAPSED FUNCTION unknown_libname_109. PRESS KEYPAD	"+" TO EXPAND]
; [0000008C BYTES: COLLAPSED FUNCTION unknown_libname_110. PRESS KEYPAD	"+" TO EXPAND]

unknown_libname_111:	; Microsoft VisualC 2-9/net runtime
call	unknown_libname_126
; START	OF FUNCTION CHUNK FOR sub_9F8BE8

unknown_libname_112:	; Microsoft VisualC 2-9/net runtime
fxch	st(1)

unknown_libname_113:	; Microsoft VisualC 2-9/net runtime
fstp	st
; END OF FUNCTION CHUNK	FOR sub_9F8BE8
; [00000001 BYTES: COLLAPSED FUNCTION unknown_libname_114. PRESS KEYPAD	"+" TO EXPAND]

unknown_libname_115:	; Microsoft VisualC 2-9/net runtime
call	unknown_libname_126
jmp	short unknown_libname_113 ; Microsoft VisualC 2-9/net runtime
; [00000002 BYTES: COLLAPSED FUNCTION unknown_libname_116. PRESS KEYPAD	"+" TO EXPAND]
; [00000005 BYTES: COLLAPSED CHUNK OF FUNCTION unknown_libname_189. PRESS KEYPAD "+" TO	EXPAND]

unknown_libname_118:	; Microsoft VisualC 2-9/net runtime
fstp	st
; [00000005 BYTES: COLLAPSED FUNCTION unknown_libname_119. PRESS KEYPAD	"+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION unknown_libname_120. PRESS KEYPAD	"+" TO EXPAND]
; [00000002 BYTES: COLLAPSED FUNCTION unknown_libname_121. PRESS KEYPAD	"+" TO EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION unknown_libname_122. PRESS KEYPAD	"+" TO EXPAND]
; [0000003F BYTES: COLLAPSED FUNCTION unknown_libname_123. PRESS KEYPAD	"+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION unknown_libname_124. PRESS KEYPAD	"+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION unknown_libname_126. PRESS KEYPAD	"+" TO EXPAND]
; [00000007 BYTES: COLLAPSED CHUNK OF FUNCTION unknown_libname_205. PRESS KEYPAD "+" TO	EXPAND]
align 10h
; [00000017 BYTES: COLLAPSED FUNCTION unknown_libname_128. PRESS KEYPAD	"+" TO EXPAND]
; [0000003C BYTES: COLLAPSED FUNCTION unknown_libname_129. PRESS KEYPAD	"+" TO EXPAND]
align 10h
; [00000015 BYTES: COLLAPSED FUNCTION unknown_libname_130. PRESS KEYPAD	"+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION unknown_libname_131. PRESS KEYPAD	"+" TO EXPAND]
; [00000019 BYTES: COLLAPSED FUNCTION unknown_libname_132. PRESS KEYPAD	"+" TO EXPAND]
; [00000043 BYTES: COLLAPSED FUNCTION unknown_libname_133. PRESS KEYPAD	"+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION unknown_libname_134. PRESS KEYPAD	"+" TO EXPAND]
; [0000000D BYTES: COLLAPSED CHUNK OF FUNCTION start_7.	PRESS KEYPAD "+" TO EXPAND]
; [0000002A BYTES: COLLAPSED CHUNK OF FUNCTION start. PRESS KEYPAD "+" TO EXPAND]

unknown_libname_137:	; Microsoft VisualC 2-9/net runtime
sub	esp, 8
fst	qword ptr [esp]
mov	eax, [esp+4]
add	esp, 8
and	eax, 7FF00000h
jmp	short loc_7AE9CD
; [000000A3 BYTES: COLLAPSED FUNCTION unknown_libname_138. PRESS KEYPAD	"+" TO EXPAND]
; [0000027C BYTES: COLLAPSED FUNCTION ___libm_error_support. PRESS KEYPAD "+" TO EXPAND]
off_7AECD8 dd offset $LN26_3 ; jump table for switch statement
dd offset $LN24_4
dd offset $LN22_3
dd offset $LN20_8
dd offset $LN18_8
dd offset $LN16_4
dd offset $LN36_4
dd offset $LN12_12
dd offset $LN30_2
dd offset $LN8_12
dd offset $LN6_4
dd offset $LN4
dd offset $LN2
; [00000014 BYTES: COLLAPSED FUNCTION __sse2_mathfcns_init. PRESS KEYPAD "+" TO	EXPAND]
; [000000D5 BYTES: COLLAPSED FUNCTION __floor_default. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [0000003E BYTES: COLLAPSED FUNCTION unknown_libname_139. PRESS KEYPAD	"+" TO EXPAND]
; [0000003D BYTES: COLLAPSED FUNCTION unknown_libname_142. PRESS KEYPAD	"+" TO EXPAND]
; [00000048 BYTES: COLLAPSED FUNCTION unknown_libname_145. PRESS KEYPAD	"+" TO EXPAND]
; [00000007 BYTES: COLLAPSED FUNCTION unknown_libname_146. PRESS KEYPAD	"+" TO EXPAND]
; [00000147 BYTES: COLLAPSED FUNCTION unknown_libname_147. PRESS KEYPAD	"+" TO EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION unknown_libname_157. PRESS KEYPAD	"+" TO EXPAND]
; [0000003C BYTES: COLLAPSED FUNCTION unknown_libname_158. PRESS KEYPAD	"+" TO EXPAND]
; [00000117 BYTES: COLLAPSED FUNCTION unknown_libname_161. PRESS KEYPAD	"+" TO EXPAND]
unknown_libname_162 db 83h
dd 0E0832CECh, 8524FF3Fh
dd offset off_1680CDE



sub_7AF1A4 proc	near
fdiv	st, st
add	esp, 2Ch
retn
sub_7AF1A4 endp	; sp-analysis failed

word_7AF1AA dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 2

sub_7AF1AF proc	near
fdivr	st, st
add	esp, 2Ch
retn
sub_7AF1AF endp	; sp-analysis failed

byte_7AF1B5 db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 4

sub_7AF1BA proc	near
fdiv	st, st
add	esp, 2Ch
retn
sub_7AF1BA endp	; sp-analysis failed



; jumptable 007AF19D case 5

sub_7AF1C0 proc	near
fdivp	st, st
add	esp, 2Ch
retn
sub_7AF1C0 endp	; sp-analysis failed



; jumptable 007AF19D case 6

sub_7AF1C6 proc	near
fdivr	st, st
add	esp, 2Ch
retn
sub_7AF1C6 endp	; sp-analysis failed



; jumptable 007AF19D case 7

sub_7AF1CC proc	near
fdivrp	st, st
add	esp, 2Ch
retn
sub_7AF1CC endp	; sp-analysis failed



; jumptable 007AF19D case 8

sub_7AF1D2 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fstp	[esp+arg_8]
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fld	[esp+arg_1C]
fxch	st(1)
add	esp, 2Ch
retn
sub_7AF1D2 endp	; sp-analysis failed

word_7AF1EE dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 10

sub_7AF1F3 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fld	[esp+arg_8]
fxch	st(1)
add	esp, 2Ch
retn
sub_7AF1F3 endp	; sp-analysis failed

byte_7AF209 db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 12

sub_7AF20E proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fxch	st(1)
fstp	[esp+arg_8]
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fld	[esp+arg_1C]
add	esp, 2Ch
retn
sub_7AF20E endp	; sp-analysis failed



; jumptable 007AF19D case 13

sub_7AF22A proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
add	esp, 2Ch
retn
sub_7AF22A endp	; sp-analysis failed



; jumptable 007AF19D case 14

sub_7AF23A proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fld	[esp+arg_8]
add	esp, 2Ch
retn
sub_7AF23A endp	; sp-analysis failed



; jumptable 007AF19D case 15

sub_7AF24E proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
add	esp, 2Ch
retn
sub_7AF24E endp	; sp-analysis failed



; jumptable 007AF19D case 16

sub_7AF25E proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fstp	[esp+arg_8]
fxch	st(1)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(1)
fld	[esp+arg_1C]
fxch	st(2)
add	esp, 2Ch
retn
sub_7AF25E endp	; sp-analysis failed

word_7AF27E dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 18

sub_7AF283 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(1)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(1)
fld	[esp+arg_8]
fxch	st(2)
add	esp, 2Ch
retn
sub_7AF283 endp	; sp-analysis failed

byte_7AF29D db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 20

sub_7AF2A2 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fxch	st(2)
fstp	[esp+arg_8]
fxch	st(1)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(1)
fld	[esp+arg_1C]
add	esp, 2Ch
retn
sub_7AF2A2 endp	; sp-analysis failed



; jumptable 007AF19D case 21

sub_7AF2C2 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(1)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(1)
add	esp, 2Ch
retn
sub_7AF2C2 endp	; sp-analysis failed



; jumptable 007AF19D case 22

sub_7AF2D6 proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(1)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(1)
fld	[esp+arg_8]
add	esp, 2Ch
retn
sub_7AF2D6 endp	; sp-analysis failed



; jumptable 007AF19D case 23

sub_7AF2EE proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(1)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(1)
add	esp, 2Ch
retn
sub_7AF2EE endp	; sp-analysis failed



; jumptable 007AF19D case 24

sub_7AF302 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fstp	[esp+arg_8]
fxch	st(2)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(2)
fld	[esp+arg_1C]
fxch	st(3)
add	esp, 2Ch
retn
sub_7AF302 endp	; sp-analysis failed

word_7AF322 dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 26

sub_7AF327 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(2)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(2)
fld	[esp+arg_8]
fxch	st(3)
add	esp, 2Ch
retn
sub_7AF327 endp	; sp-analysis failed

byte_7AF341 db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 28

sub_7AF346 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fxch	st(3)
fstp	[esp+arg_8]
fxch	st(2)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(2)
fld	[esp+arg_1C]
add	esp, 2Ch
retn
sub_7AF346 endp	; sp-analysis failed



; jumptable 007AF19D case 29

sub_7AF366 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(2)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(2)
add	esp, 2Ch
retn
sub_7AF366 endp	; sp-analysis failed



; jumptable 007AF19D case 30

sub_7AF37A proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(2)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(2)
fld	[esp+arg_8]
add	esp, 2Ch
retn
sub_7AF37A endp	; sp-analysis failed



; jumptable 007AF19D case 31

sub_7AF392 proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(2)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(2)
add	esp, 2Ch
retn
sub_7AF392 endp	; sp-analysis failed



; jumptable 007AF19D case 32

sub_7AF3A6 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fstp	[esp+arg_8]
fxch	st(3)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(3)
fld	[esp+arg_1C]
fxch	st(4)
add	esp, 2Ch
retn
sub_7AF3A6 endp	; sp-analysis failed

word_7AF3C6 dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 34

sub_7AF3CB proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(3)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(3)
fld	[esp+arg_8]
fxch	st(4)
add	esp, 2Ch
retn
sub_7AF3CB endp	; sp-analysis failed

byte_7AF3E5 db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 36

sub_7AF3EA proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fxch	st(4)
fstp	[esp+arg_8]
fxch	st(3)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(3)
fld	[esp+arg_1C]
add	esp, 2Ch
retn
sub_7AF3EA endp	; sp-analysis failed



; jumptable 007AF19D case 37

sub_7AF40A proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(3)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(3)
add	esp, 2Ch
retn
sub_7AF40A endp	; sp-analysis failed



; jumptable 007AF19D case 38

sub_7AF41E proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(3)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(3)
fld	[esp+arg_8]
add	esp, 2Ch
retn
sub_7AF41E endp	; sp-analysis failed



; jumptable 007AF19D case 39

sub_7AF436 proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(3)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(3)
add	esp, 2Ch
retn
sub_7AF436 endp	; sp-analysis failed



; jumptable 007AF19D case 40

sub_7AF44A proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fstp	[esp+arg_8]
fxch	st(4)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(4)
fld	[esp+arg_1C]
fxch	st(5)
add	esp, 2Ch
retn
sub_7AF44A endp	; sp-analysis failed

word_7AF46A dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 42

sub_7AF46F proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(4)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(4)
fld	[esp+arg_8]
fxch	st(5)
add	esp, 2Ch
retn
sub_7AF46F endp	; sp-analysis failed

byte_7AF489 db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 44

sub_7AF48E proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fxch	st(5)
fstp	[esp+arg_8]
fxch	st(4)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(4)
fld	[esp+arg_1C]
add	esp, 2Ch
retn
sub_7AF48E endp	; sp-analysis failed



; jumptable 007AF19D case 45

sub_7AF4AE proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(4)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(4)
add	esp, 2Ch
retn
sub_7AF4AE endp	; sp-analysis failed



; jumptable 007AF19D case 46

sub_7AF4C2 proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(4)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(4)
fld	[esp+arg_8]
add	esp, 2Ch
retn
sub_7AF4C2 endp	; sp-analysis failed



; jumptable 007AF19D case 47

sub_7AF4DA proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(4)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(4)
add	esp, 2Ch
retn
sub_7AF4DA endp	; sp-analysis failed



; jumptable 007AF19D case 48

sub_7AF4EE proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fstp	[esp+arg_8]
fxch	st(5)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(5)
fld	[esp+arg_1C]
fxch	st(6)
add	esp, 2Ch
retn
sub_7AF4EE endp	; sp-analysis failed

word_7AF50E dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 50

sub_7AF513 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(5)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(5)
fld	[esp+arg_8]
fxch	st(6)
add	esp, 2Ch
retn
sub_7AF513 endp	; sp-analysis failed

byte_7AF52D db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 52

sub_7AF532 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fxch	st(6)
fstp	[esp+arg_8]
fxch	st(5)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(5)
fld	[esp+arg_1C]
add	esp, 2Ch
retn
sub_7AF532 endp	; sp-analysis failed



; jumptable 007AF19D case 53

sub_7AF552 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(5)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(5)
add	esp, 2Ch
retn
sub_7AF552 endp	; sp-analysis failed



; jumptable 007AF19D case 54

sub_7AF566 proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(5)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(5)
fld	[esp+arg_8]
add	esp, 2Ch
retn
sub_7AF566 endp	; sp-analysis failed



; jumptable 007AF19D case 55

sub_7AF57E proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(5)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(5)
add	esp, 2Ch
retn
sub_7AF57E endp	; sp-analysis failed



; jumptable 007AF19D case 56

sub_7AF592 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fstp	[esp+arg_8]
fxch	st(6)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(6)
fld	[esp+arg_1C]
fxch	st(7)
add	esp, 2Ch
retn
sub_7AF592 endp	; sp-analysis failed

word_7AF5B2 dw 0C483h
sub	al, 0CDh
push	es


; jumptable 007AF19D case 58

sub_7AF5B7 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(6)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(6)
fld	[esp+arg_8]
fxch	st(7)
add	esp, 2Ch
retn
sub_7AF5B7 endp	; sp-analysis failed

byte_7AF5D1 db 83h, 0C4h, 2Ch
db 0CDh, 6


; jumptable 007AF19D case 60

sub_7AF5D6 proc	near

arg_8= tbyte ptr  0Ch
arg_1C=	tbyte ptr  20h

fxch	st(7)
fstp	[esp+arg_8]
fxch	st(6)
fld	st
fstp	tbyte ptr [esp+0]
fstp	[esp+arg_1C]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(6)
fld	[esp+arg_1C]
add	esp, 2Ch
retn
sub_7AF5D6 endp	; sp-analysis failed



; jumptable 007AF19D case 61

sub_7AF5F6 proc	near

arg_8= tbyte ptr  0Ch

fstp	tbyte ptr [esp+0]
fxch	st(6)
fstp	[esp+arg_8]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(6)
add	esp, 2Ch
retn
sub_7AF5F6 endp	; sp-analysis failed



; jumptable 007AF19D case 62

sub_7AF60A proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(6)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(6)
fld	[esp+arg_8]
add	esp, 2Ch
retn
sub_7AF60A endp	; sp-analysis failed



; jumptable 007AF19D case 63

sub_7AF622 proc	near

arg_8= tbyte ptr  0Ch

fstp	[esp+arg_8]
fxch	st(6)
fstp	tbyte ptr [esp+0]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
fxch	st(6)
add	esp, 2Ch
retn
sub_7AF622 endp	; sp-analysis failed

; [00000013 BYTES: COLLAPSED FUNCTION unknown_libname_163. PRESS KEYPAD	"+" TO EXPAND]
; [00000013 BYTES: COLLAPSED FUNCTION unknown_libname_164. PRESS KEYPAD	"+" TO EXPAND]

unknown_libname_165:	; Microsoft VisualC 2-9/net runtime
push	eax
mov	eax, [esp+8]
and	eax, 7F800000h
cmp	eax, 7F800000h
jz	short loc_7AF6A0
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF683
fld	dword ptr [esp+8]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	4

loc_7AF683:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fld	dword ptr [esp+14h]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	4

loc_7AF6A0:
fdiv	dword ptr [esp+8]
pop	eax
retn	4

unknown_libname_166:	; Microsoft VisualC 2-9/net runtime
push	eax
mov	eax, [esp+0Ch]
and	eax, 7FF00000h
cmp	eax, 7FF00000h
jz	short loc_7AF6EC
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF6CF
fld	qword ptr [esp+8]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	8

loc_7AF6CF:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fld	qword ptr [esp+14h]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	8

loc_7AF6EC:
fdiv	qword ptr [esp+8]
pop	eax
retn	8

unknown_libname_167:	; Microsoft VisualC 2-9/net runtime
push	eax
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF70B
fild	word ptr [esp+8]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	4

loc_7AF70B:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fild	word ptr [esp+14h]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	4

unknown_libname_168:	; Microsoft VisualC 2-9/net runtime
push	eax
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF73F
fild	dword ptr [esp+8]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	4

loc_7AF73F:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fild	dword ptr [esp+14h]
call	unknown_libname_163 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	4

unknown_libname_169:	; Microsoft VisualC 2-9/net runtime
push	eax
mov	eax, [esp+8]
and	eax, 7F800000h
cmp	eax, 7F800000h
jz	short loc_7AF7A0
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF783
fld	dword ptr [esp+8]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	4

loc_7AF783:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fld	dword ptr [esp+14h]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	4

loc_7AF7A0:
fdivr	dword ptr [esp+8]
pop	eax
retn	4

unknown_libname_170:	; Microsoft VisualC 2-9/net runtime
push	eax
mov	eax, [esp+0Ch]
and	eax, 7FF00000h
cmp	eax, 7FF00000h
jz	short loc_7AF7EC
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF7CF
fld	qword ptr [esp+8]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	8

loc_7AF7CF:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fld	qword ptr [esp+14h]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	8

loc_7AF7EC:
fdivr	qword ptr [esp+8]
pop	eax
retn	8

unknown_libname_171:	; Microsoft VisualC 2-9/net runtime
push	eax
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF80B
fild	word ptr [esp+8]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	4

loc_7AF80B:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fild	word ptr [esp+14h]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	4

unknown_libname_172:	; Microsoft VisualC 2-9/net runtime
push	eax
fnstsw	ax
and	eax, 3800h
jz	short loc_7AF83F
fild	dword ptr [esp+8]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
pop	eax
retn	4

loc_7AF83F:
fxch	st(1)
sub	esp, 0Ch
fstp	tbyte ptr [esp]
fild	dword ptr [esp+14h]
call	unknown_libname_164 ; Microsoft	VisualC	2-9/net	runtime
fld	tbyte ptr [esp]
fxch	st(1)
add	esp, 0Ch
pop	eax
retn	4

unknown_libname_173:	; Microsoft VisualC 2-9/net runtime
push	eax
sub	esp, 2Ch
fstp	tbyte ptr [esp]
fstp	tbyte ptr [esp+0Ch]
call	unknown_libname_161 ; Microsoft	VisualC	2-9/net	runtime
add	esp, 2Ch
pop	eax
retn
; [00000015 BYTES: COLLAPSED FUNCTION unknown_libname_174. PRESS KEYPAD	"+" TO EXPAND]
; [00000206 BYTES: COLLAPSED FUNCTION unknown_libname_175. PRESS KEYPAD	"+" TO EXPAND]
; [000000B2 BYTES: COLLAPSED FUNCTION unknown_libname_176. PRESS KEYPAD	"+" TO EXPAND]
; [00000206 BYTES: COLLAPSED FUNCTION unknown_libname_177. PRESS KEYPAD	"+" TO EXPAND]
; [000000B5 BYTES: COLLAPSED FUNCTION unknown_libname_178. PRESS KEYPAD	"+" TO EXPAND]

unknown_libname_179:	; Microsoft VisualC 2-9/net runtime
call	unknown_libname_176
retn

unknown_libname_180:	; Microsoft VisualC 2-9/net runtime
call	unknown_libname_178
retn

unknown_libname_181:	; Microsoft VisualC 2-9/net runtime
fpatan
retn

unknown_libname_182:	; Microsoft VisualC 2-9/net runtime
fptan
retn
align 10h
; [00000018 BYTES: COLLAPSED FUNCTION __CIlog_pentium4.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _log. PRESS KEYPAD "+" TO EXPAND]
; [0000024E BYTES: COLLAPSED FUNCTION start_8. PRESS KEYPAD "+"	TO EXPAND]
align 10h
mov	byte ptr [ebp-90h], 0FEh
or	ch, ch
jnz	short loc_7B00D6
fxch	st(1)

loc_7B008D:
fyl2x
jmp	short loc_7B009E
; [00000045 BYTES: COLLAPSED FUNCTION unknown_libname_183. PRESS KEYPAD	"+" TO EXPAND]

loc_7B00D6:
call	sub_7B0221
or	eax, eax
jz	short loc_7B00F3
xor	ch, ch
cmp	eax, 2
jz	short loc_7B00E8
not	ch

loc_7B00E8:
fxch	st(1)
fabs
jmp	short loc_7B008D
jmp	unknown_libname_118 ; Microsoft	VisualC	2-9/net	runtime

loc_7B00F3:		; Microsoft VisualC 2-9/net runtime
jmp	unknown_libname_124

unknown_libname_184:	; Microsoft VisualC 2-9/net runtime
fstp	st

unknown_libname_185:	; Microsoft VisualC 2-9/net runtime
fstp	st
fld	tbyte_1680DE0
mov	byte ptr [ebp-90h], 2
retn

unknown_libname_186:	; Microsoft VisualC 2-9/net runtime
fldln2
fxch	st(1)
ftst
fstsw	word ptr [ebp-0A0h]
wait
test	byte ptr [ebp-9Fh], 41h
jnz	short loc_7B00F3
fyl2x
retn
mov	byte ptr [ebp-90h], 2
fstp	st
fld	tbyte_1680DEA
retn
or	cl, cl
jnz	short loc_7B018B
retn
fldlg2
jmp	short loc_7B013F
fldln2

loc_7B013F:
fxch	st(1)
or	cl, cl
jnz	short loc_7B00F3
fyl2x
retn
jmp	unknown_libname_118 ; Microsoft	VisualC	2-9/net	runtime
call	sub_7B0221
fstp	st
fstp	st
or	cl, cl
jnz	short loc_7B0168
fldz
cmp	eax, 1
jnz	short locret_7B0167
or	ch, ch
jz	short locret_7B0167
fchs

locret_7B0167:
retn

loc_7B0168:
mov	byte ptr [ebp-90h], 2
fld	tbyte_1680DE0
cmp	eax, 1
jnz	short locret_7B0167
or	ch, ch
jz	short locret_7B0167
fchs
jmp	short locret_7B0167
fstp	st
; START	OF FUNCTION CHUNK FOR sub_7B01D1

loc_7B0184:		; Microsoft VisualC 2-9/net runtime
jmp	unknown_libname_117
; END OF FUNCTION CHUNK	FOR sub_7B01D1
fstp	st

loc_7B018B:		; Microsoft VisualC 2-9/net runtime
jmp	unknown_libname_125
; [0000002F BYTES: COLLAPSED CHUNK OF FUNCTION unknown_libname_189. PRESS KEYPAD "+" TO	EXPAND]

unknown_libname_187:	; Microsoft VisualC 2-9/net runtime
fstp	st
; [00000010 BYTES: COLLAPSED FUNCTION unknown_libname_188. PRESS KEYPAD	"+" TO EXPAND]



sub_7B01D1 proc	near

; FUNCTION CHUNK AT 007B0184 SIZE 00000005 BYTES

or	cl, cl
jnz	short loc_7B0184
fstp	st
fld	tbyte_1680DE0
retn
sub_7B01D1 endp

; [00000043 BYTES: COLLAPSED FUNCTION unknown_libname_189. PRESS KEYPAD	"+" TO EXPAND]



sub_7B0221 proc	near
fld	st
frndint
fcomp	st(1)
fstsw	ax
sahf
jnz	short loc_7B0247
fld	st
fmul	dbl_1680E12
fld	st
frndint
fcompp
fstsw	ax
sahf
jz	short loc_7B024E
mov	eax, 1

locret_7B0246:
retn

loc_7B0247:
mov	eax, 0
jmp	short locret_7B0246

loc_7B024E:
mov	eax, 2
jmp	short locret_7B0246
sub_7B0221 endp

push	esi
sub	esp, 74h
mov	esi, esp
push	esi
sub	esp, 8
fstp	qword ptr [esp]
sub	esp, 8
fstp	qword ptr [esp]
fsave	byte ptr [esi+8]
call	__powhlp
add	esp, 14h
frstor	byte ptr [esi+8]
fld	qword ptr [esi]
add	esp, 74h
pop	esi
test	eax, eax
jz	short locret_7B0286
jmp	unknown_libname_126 ; Microsoft	VisualC	2-9/net	runtime

locret_7B0286:
retn
align 10h

unknown_libname_190:	; Microsoft VisualC 2-9/net runtime
call	unknown_libname_197
xchg	ch, cl
jmp	short unknown_libname_194 ; Microsoft VisualC 2-9/net runtime

unknown_libname_191:	; Microsoft VisualC 2-9/net runtime
call	unknown_libname_197
fxch	st(1)
jmp	short unknown_libname_194 ; Microsoft VisualC 2-9/net runtime

unknown_libname_192:	; Microsoft VisualC 2-9/net runtime
fabs
fld1
mov	ch, cl
xor	cl, cl
jmp	short unknown_libname_194 ; Microsoft VisualC 2-9/net runtime
; [00000020 BYTES: COLLAPSED FUNCTION unknown_libname_193. PRESS KEYPAD	"+" TO EXPAND]
; [00000030 BYTES: COLLAPSED FUNCTION unknown_libname_197. PRESS KEYPAD	"+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION unknown_libname_199. PRESS KEYPAD	"+" TO EXPAND]
; [0000001C BYTES: COLLAPSED FUNCTION unknown_libname_200. PRESS KEYPAD	"+" TO EXPAND]

unknown_libname_203:	; Microsoft VisualC 2-9/net runtime
fstp	st

unknown_libname_204:	; Microsoft VisualC 2-9/net runtime
jmp	unknown_libname_125
; [00000010 BYTES: COLLAPSED FUNCTION unknown_libname_205. PRESS KEYPAD	"+" TO EXPAND]
align 10h
; [00000018 BYTES: COLLAPSED FUNCTION __CIasin_pentium4. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _asin. PRESS KEYPAD "+" TO EXPAND]
; [00000562 BYTES: COLLAPSED FUNCTION start_9. PRESS KEYPAD "+"	TO EXPAND]
; [00000018 BYTES: COLLAPSED FUNCTION __CIcos_pentium4.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _cos. PRESS KEYPAD "+" TO EXPAND]
; [0000018B BYTES: COLLAPSED FUNCTION start_10.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000018 BYTES: COLLAPSED FUNCTION __CIsin_pentium4.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _sin. PRESS KEYPAD "+" TO EXPAND]
; [000001A9 BYTES: COLLAPSED FUNCTION start_11.	PRESS KEYPAD "+" TO EXPAND]
align 4
; [00000057 BYTES: COLLAPSED FUNCTION _fastzero_I. PRESS KEYPAD	"+" TO EXPAND]
; [0000008F BYTES: COLLAPSED FUNCTION __VEC_memzero. PRESS KEYPAD "+" TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION wcsncnt(wchar_t const *,int). PRESS KEYPAD "+" TO	EXPAND]
; [0000007C BYTES: COLLAPSED FUNCTION ___crtCompareStringW. PRESS KEYPAD "+" TO	EXPAND]
; [00000037 BYTES: COLLAPSED FUNCTION _wcscmp. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [00000061 BYTES: COLLAPSED FUNCTION ___ascii_strnicmp. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000018 BYTES: COLLAPSED FUNCTION __CItan_pentium4.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _tan. PRESS KEYPAD "+" TO EXPAND]
; [00000234 BYTES: COLLAPSED FUNCTION start_12.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000008E BYTES: COLLAPSED FUNCTION __hw_cw. PRESS KEYPAD "+"	TO EXPAND]
; [000000A0 BYTES: COLLAPSED FUNCTION ___hw_cw_sse2. PRESS KEYPAD "+" TO EXPAND]
; [0000030F BYTES: COLLAPSED FUNCTION __control87. PRESS KEYPAD	"+" TO EXPAND]
; [000000D5 BYTES: COLLAPSED FUNCTION __ceil_default. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000018 BYTES: COLLAPSED FUNCTION __CIacos_pentium4. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _acos. PRESS KEYPAD "+" TO EXPAND]
; [00000536 BYTES: COLLAPSED FUNCTION start_13.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000018 BYTES: COLLAPSED FUNCTION __CIatan_pentium4. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _atan. PRESS KEYPAD "+" TO EXPAND]
; [000002CD BYTES: COLLAPSED FUNCTION start_14.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000018 BYTES: COLLAPSED FUNCTION __CIexp_pentium4.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED CHUNK OF FUNCTION _exp. PRESS KEYPAD "+" TO EXPAND]
; [0000029F BYTES: COLLAPSED FUNCTION start_15.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000019 BYTES: COLLAPSED FUNCTION __CIpow_pentium4.	PRESS KEYPAD "+" TO EXPAND]
; [00000B38 BYTES: COLLAPSED FUNCTION __pow_pentium4. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000066 BYTES: COLLAPSED FUNCTION __d_inttype. PRESS KEYPAD	"+" TO EXPAND]
; [00000140 BYTES: COLLAPSED FUNCTION __powhlp.	PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7B2E06 proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
push	esi
xor	esi, esi
cmp	eax, esi
jnz	short loc_7B2E32
call	__errno
push	esi
push	esi
push	esi
push	esi
push	esi
mov	dword ptr [eax], 16h
call	__invalid_parameter
add	esp, 14h
push	16h
pop	eax
jmp	short loc_7B2E3C

loc_7B2E32:
mov	ecx, dword_1680EA4
mov	[eax], ecx
xor	eax, eax

loc_7B2E3C:
pop	esi
pop	ebp
retn
sub_7B2E06 endp



; Attributes: bp-based frame

sub_7B2E3F proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
push	esi
xor	esi, esi
cmp	eax, esi
jnz	short loc_7B2E6B
call	__errno
push	esi
push	esi
push	esi
push	esi
push	esi
mov	dword ptr [eax], 16h
call	__invalid_parameter
add	esp, 14h
push	16h
pop	eax
jmp	short loc_7B2E75

loc_7B2E6B:
mov	ecx, dword_1680EA8
mov	[eax], ecx
xor	eax, eax

loc_7B2E75:
pop	esi
pop	ebp
retn
sub_7B2E3F endp



; Attributes: bp-based frame

sub_7B2E78 proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
push	esi
xor	esi, esi
cmp	eax, esi
jnz	short loc_7B2EA4
call	__errno
push	esi
push	esi
push	esi
push	esi
push	esi
mov	dword ptr [eax], 16h
call	__invalid_parameter
add	esp, 14h
push	16h
pop	eax
jmp	short loc_7B2EAE

loc_7B2EA4:
mov	ecx, dword_1680EA0
mov	[eax], ecx
xor	eax, eax

loc_7B2EAE:
pop	esi
pop	ebp
retn
sub_7B2E78 endp




sub_7B2EB1 proc	near
mov	eax, offset dword_1680EA4
retn
sub_7B2EB1 endp




sub_7B2EB7 proc	near
mov	eax, offset dword_1680EA8
retn
sub_7B2EB7 endp




sub_7B2EBD proc	near
mov	eax, offset dword_1680EA0
retn
sub_7B2EBD endp




sub_7B2EC3 proc	near
mov	eax, offset off_1680F30
retn
sub_7B2EC3 endp



; Attributes: bp-based frame

sub_7B2EC9 proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
call	sub_7B2EB1
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
pop	ebp
retn
sub_7B2EC9 endp



; Attributes: bp-based frame

sub_7B2EDA proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
call	sub_7B2EB7
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
pop	ebp
retn
sub_7B2EDA endp



; Attributes: bp-based frame

sub_7B2EEB proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
call	sub_7B2EBD
mov	ecx, [ebp+arg_0]
mov	[eax], ecx
pop	ebp
retn
sub_7B2EEB endp

; [000002A7 BYTES: COLLAPSED FUNCTION __tzset_nolock. PRESS KEYPAD "+" TO EXPAND]
; [00000005 BYTES: COLLAPSED FUNCTION $LN77. PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN38_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000091 BYTES: COLLAPSED CHUNK OF FUNCTION __tzset_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [000001F7 BYTES: COLLAPSED FUNCTION _cvtdate.	PRESS KEYPAD "+" TO EXPAND]
; [000001D8 BYTES: COLLAPSED FUNCTION __isindst_nolock.	PRESS KEYPAD "+" TO EXPAND]
; [00000046 BYTES: COLLAPSED FUNCTION ___tzset.	PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN9_12. PRESS KEYPAD "+"	TO EXPAND]
; [00000038 BYTES: COLLAPSED FUNCTION __isindst. PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN7_13. PRESS KEYPAD "+"	TO EXPAND]
align 10h
; [00000075 BYTES: COLLAPSED FUNCTION __aullrem. PRESS KEYPAD "+" TO EXPAND]
; [000002B4 BYTES: COLLAPSED FUNCTION __wopenfile. PRESS KEYPAD	"+" TO EXPAND]
; [00000733 BYTES: COLLAPSED FUNCTION __write_nolock. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_7B410C(int, int, DWORD nNumberOfBytesToWrite)
sub_7B410C proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
nNumberOfBytesToWrite= dword ptr  10h

push	10h
push	offset unk_1625B18
call	__SEH_prolog4
mov	eax, [ebp+arg_0]
cmp	eax, 0FFFFFFFEh
jnz	short loc_7B413B
call	___doserrno
and	dword ptr [eax], 0
call	__errno
mov	dword ptr [eax], 9

loc_7B4133:
or	eax, 0FFFFFFFFh
jmp	loc_7B41D8

loc_7B413B:
xor	edi, edi
cmp	eax, edi
jl	short loc_7B4149
cmp	eax, uNumber
jb	short loc_7B416A

loc_7B4149:
call	___doserrno
mov	[eax], edi
call	__errno
mov	dword ptr [eax], 9
push	edi
push	edi
push	edi
push	edi
push	edi
call	__invalid_parameter
add	esp, 14h
jmp	short loc_7B4133

loc_7B416A:
mov	ecx, eax
sar	ecx, 5
lea	ebx, dword_19736C0[ecx*4]
mov	esi, eax
and	esi, 1Fh
shl	esi, 6
mov	ecx, [ebx]
movsx	ecx, byte ptr [ecx+esi+4]
and	ecx, 1
jz	short loc_7B4149
push	eax
call	___lock_fhandle
pop	ecx
mov	[ebp+ms_exc.disabled], edi
mov	eax, [ebx]
test	byte ptr [eax+esi+4], 1
jz	short loc_7B41B3
push	[ebp+nNumberOfBytesToWrite] ; nNumberOfBytesToWrite
push	[ebp+arg_4]	; int
push	[ebp+arg_0]	; int
call	__write_nolock
add	esp, 0Ch
mov	[ebp+var_1C], eax
jmp	short loc_7B41C9

loc_7B41B3:
call	__errno
mov	dword ptr [eax], 9
call	___doserrno
mov	[eax], edi
or	[ebp+var_1C], 0FFFFFFFFh

loc_7B41C9:
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7B41DE
mov	eax, [ebp+var_1C]

loc_7B41D8:
call	__SEH_epilog4
retn
sub_7B410C endp




sub_7B41DE proc	near
push	dword ptr [ebp+8]
call	__unlock_fhandle
pop	ecx
retn
sub_7B41DE endp

; [000000D7 BYTES: COLLAPSED FUNCTION __commit.	PRESS KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN16_5. PRESS KEYPAD "+"	TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION _wcslen. PRESS KEYPAD "+"	TO EXPAND]
; [0000010E BYTES: COLLAPSED FUNCTION __wfullpath. PRESS KEYPAD	"+" TO EXPAND]
; [000000C3 BYTES: COLLAPSED FUNCTION ___wdtoxmode. PRESS KEYPAD "+" TO	EXPAND]
; [0000026B BYTES: COLLAPSED FUNCTION ___loctotime64_t.	PRESS KEYPAD "+" TO EXPAND]
; [000000C9 BYTES: COLLAPSED FUNCTION __getdrive. PRESS	KEYPAD "+" TO EXPAND]
; [00000043 BYTES: COLLAPSED FUNCTION _wcspbrk.	PRESS KEYPAD "+" TO EXPAND]
; [0000007E BYTES: COLLAPSED FUNCTION __vsprintf_l. PRESS KEYPAD "+" TO	EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION _vsprintf. PRESS KEYPAD "+" TO EXPAND]
; [00000053 BYTES: COLLAPSED FUNCTION x_ismbbtype_l(localeinfo_struct *,uint,int,int). PRESS KEYPAD "+"	TO EXPAND]
; [00000018 BYTES: COLLAPSED FUNCTION __ismbblead. PRESS KEYPAD	"+" TO EXPAND]
; [00000040 BYTES: COLLAPSED FUNCTION _calloc. PRESS KEYPAD "+"	TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION _write_string_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000B7E BYTES: COLLAPSED FUNCTION __woutput_s_l. PRESS KEYPAD "+" TO EXPAND]
align 10h
off_7B5540 dd offset $NORMAL_STATE$29486 ; jump	table for switch statement
dd offset $LN132
dd offset $LN131_1
dd offset $LN123
dd offset $LN119_0
dd offset $LN118_1
dd offset $LN114
dd offset $LN98
; [00000057 BYTES: COLLAPSED FUNCTION ___crtLCMapStringW. PRESS	KEYPAD "+" TO EXPAND]
; [0000008A BYTES: COLLAPSED FUNCTION __iswctype_l. PRESS KEYPAD "+" TO	EXPAND]
; [00000076 BYTES: COLLAPSED FUNCTION _iswctype. PRESS KEYPAD "+" TO EXPAND]
; [000000A9 BYTES: COLLAPSED FUNCTION __wfltin2. PRESS KEYPAD "+" TO EXPAND]
; [0000072B BYTES: COLLAPSED FUNCTION ___wstrgtold12_l.	PRESS KEYPAD "+" TO EXPAND]
align 4
off_7B5E8C dd offset $LN119_1 ;	jump table for switch statement
dd offset $LN108_0
dd offset $LN97_2
dd offset $LN88_0
dd offset $LN75_1
dd offset $LN61_0
dd offset $LN58_0
dd offset $LN43_0
dd offset $LN49_1
dd offset $LN36_5
dd offset $LN255
dd offset $LN28_4
; [000001A1 BYTES: COLLAPSED FUNCTION __mbstowcs_l_helper. PRESS KEYPAD	"+" TO EXPAND]
; [00000110 BYTES: COLLAPSED FUNCTION __mbstowcs_s_l. PRESS KEYPAD "+" TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION __store_str. PRESS KEYPAD	"+" TO EXPAND]
; [0000007B BYTES: COLLAPSED FUNCTION _store_num(int,int,char *	*,uint *,uint).	PRESS KEYPAD "+" TO EXPAND]
; [000003E8 BYTES: COLLAPSED FUNCTION _expandtime(localeinfo_struct *,char,tm const *,char * *,uint *,__lc_time_data *,uint). PRESS KEYPAD "+" TO EXPAND]
; [00000461 BYTES: COLLAPSED FUNCTION _store_winword(localeinfo_struct *,int,tm	const *,char * *,uint *,__lc_time_data *). PRESS KEYPAD	"+" TO EXPAND]
; [000001A4 BYTES: COLLAPSED FUNCTION __Strftime_l. PRESS KEYPAD "+" TO	EXPAND]
; [0000001F BYTES: COLLAPSED FUNCTION _strftime. PRESS KEYPAD "+" TO EXPAND]
align 10h
; [00000016 BYTES: COLLAPSED FUNCTION __alloca_probe_16. PRESS KEYPAD "+" TO EXPAND]

__alloca_probe_8:
push	ecx
lea	ecx, [esp+8]
sub	ecx, eax
and	ecx, 7
add	eax, ecx
sbb	ecx, ecx
or	eax, ecx
pop	ecx
jmp	__alloca_probe
; [000001DB BYTES: COLLAPSED FUNCTION __wchartodigit. PRESS KEYPAD "+" TO EXPAND]



sub_7B6E27 proc	near
and	dword_1972660, 0
retn
sub_7B6E27 endp

; [0000010F BYTES: COLLAPSED FUNCTION __modf_default. PRESS KEYPAD "+" TO EXPAND]



sub_7B6F3E proc	near
mov	eax, offset unk_1681138
retn
sub_7B6F3E endp




sub_7B6F44 proc	near
mov	eax, offset off_1681088
retn
sub_7B6F44 endp

; [000001B2 BYTES: COLLAPSED FUNCTION _ldexp. PRESS KEYPAD "+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION __set_exp. PRESS KEYPAD "+" TO EXPAND]
; [00000060 BYTES: COLLAPSED FUNCTION __sptype.	PRESS KEYPAD "+" TO EXPAND]
; [000000B9 BYTES: COLLAPSED FUNCTION __decomp.	PRESS KEYPAD "+" TO EXPAND]
; [000002DC BYTES: COLLAPSED FUNCTION __raise_exc_ex. PRESS KEYPAD "+" TO EXPAND]
; [00000023 BYTES: COLLAPSED FUNCTION __raise_exc. PRESS KEYPAD	"+" TO EXPAND]
; [000001E2 BYTES: COLLAPSED FUNCTION __handle_exc. PRESS KEYPAD "+" TO	EXPAND]
; [0000002D BYTES: COLLAPSED FUNCTION __set_errno_from_matherr.	PRESS KEYPAD "+" TO EXPAND]
; [00000034 BYTES: COLLAPSED FUNCTION __errcode. PRESS KEYPAD "+" TO EXPAND]
; [000000A0 BYTES: COLLAPSED FUNCTION __umatherr. PRESS	KEYPAD "+" TO EXPAND]
; [00000055 BYTES: COLLAPSED FUNCTION __handle_qnan1. PRESS KEYPAD "+" TO EXPAND]
; [00000061 BYTES: COLLAPSED FUNCTION __handle_qnan2. PRESS KEYPAD "+" TO EXPAND]
; [000000C9 BYTES: COLLAPSED FUNCTION __except1. PRESS KEYPAD "+" TO EXPAND]
; [000000D8 BYTES: COLLAPSED FUNCTION __except2. PRESS KEYPAD "+" TO EXPAND]
; [00000010 BYTES: COLLAPSED FUNCTION __statfp.	PRESS KEYPAD "+" TO EXPAND]
; [00000011 BYTES: COLLAPSED FUNCTION __clrfp. PRESS KEYPAD "+"	TO EXPAND]
; [00000029 BYTES: COLLAPSED FUNCTION __ctrlfp.	PRESS KEYPAD "+" TO EXPAND]
; [00000058 BYTES: COLLAPSED FUNCTION __set_statfp. PRESS KEYPAD "+" TO	EXPAND]
; [00000072 BYTES: COLLAPSED FUNCTION ___set_fpsr_sse2.	PRESS KEYPAD "+" TO EXPAND]
align 10h
; [0000004C BYTES: COLLAPSED FUNCTION unknown_libname_207. PRESS KEYPAD	"+" TO EXPAND]
; [0000005A BYTES: COLLAPSED FUNCTION ___check_float_string_0. PRESS KEYPAD "+"	TO EXPAND]
; [00000036 BYTES: COLLAPSED FUNCTION __hextodec_0. PRESS KEYPAD "+" TO	EXPAND]
; [00000018 BYTES: COLLAPSED FUNCTION __un_inc_0. PRESS	KEYPAD "+" TO EXPAND]
; [00000032 BYTES: COLLAPSED FUNCTION __whiteout_0. PRESS KEYPAD "+" TO	EXPAND]
; [00001221 BYTES: COLLAPSED FUNCTION __winput_s_l. PRESS KEYPAD "+" TO	EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION __EH_prolog3. PRESS KEYPAD "+" TO	EXPAND]
; [00000036 BYTES: COLLAPSED FUNCTION __EH_prolog3_catch. PRESS	KEYPAD "+" TO EXPAND]
; [00000014 BYTES: COLLAPSED FUNCTION __EH_epilog3. PRESS KEYPAD "+" TO	EXPAND]
; [0000041B BYTES: COLLAPSED FUNCTION __get_lc_time. PRESS KEYPAD "+" TO EXPAND]
; [00000195 BYTES: COLLAPSED FUNCTION ___free_lc_time. PRESS KEYPAD "+"	TO EXPAND]
; [00000079 BYTES: COLLAPSED FUNCTION ___init_time. PRESS KEYPAD "+" TO	EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION ___free_lconv_num. PRESS KEYPAD "+" TO EXPAND]
; [000001CA BYTES: COLLAPSED FUNCTION ___init_numeric. PRESS KEYPAD "+"	TO EXPAND]
; [0000008E BYTES: COLLAPSED FUNCTION ___free_lconv_mon. PRESS KEYPAD "+" TO EXPAND]
; [000002C6 BYTES: COLLAPSED FUNCTION ___init_monetary.	PRESS KEYPAD "+" TO EXPAND]
; [00000319 BYTES: COLLAPSED FUNCTION ___init_ctype. PRESS KEYPAD "+" TO EXPAND]
; [0000000D BYTES: COLLAPSED CHUNK OF FUNCTION $error_cleanup$28330. PRESS KEYPAD "+" TO EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION $error_cleanup$28330. PRESS KEYPAD "+" TO	EXPAND]
; [00000045 BYTES: COLLAPSED CHUNK OF FUNCTION ___init_ctype. PRESS KEYPAD "+" TO EXPAND]
; [0000000F BYTES: COLLAPSED CHUNK OF FUNCTION $error_cleanup$28330. PRESS KEYPAD "+" TO EXPAND]
; [00000026 BYTES: COLLAPSED FUNCTION ____lc_codepage_func. PRESS KEYPAD "+" TO	EXPAND]
; [00000062 BYTES: COLLAPSED FUNCTION _TranslateName. PRESS KEYPAD "+" TO EXPAND]
; [000000A4 BYTES: COLLAPSED FUNCTION _ProcessCodePage.	PRESS KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION _TestDefaultCountry. PRESS KEYPAD	"+" TO EXPAND]
; [00000034 BYTES: COLLAPSED FUNCTION _LcidFromHexString. PRESS	KEYPAD "+" TO EXPAND]
; [0000001B BYTES: COLLAPSED FUNCTION _GetPrimaryLen. PRESS KEYPAD "+" TO EXPAND]
; [00000098 BYTES: COLLAPSED FUNCTION CountryEnumProc(x). PRESS	KEYPAD "+" TO EXPAND]
; [00000074 BYTES: COLLAPSED FUNCTION _TestDefaultLanguage. PRESS KEYPAD "+" TO	EXPAND]
; [000001D2 BYTES: COLLAPSED FUNCTION LangCountryEnumProc(x). PRESS KEYPAD "+" TO EXPAND]
; [000000C1 BYTES: COLLAPSED FUNCTION LanguageEnumProc(x). PRESS KEYPAD	"+" TO EXPAND]
; [00000067 BYTES: COLLAPSED FUNCTION _GetLcidFromLangCountry. PRESS KEYPAD "+"	TO EXPAND]
; [0000003C BYTES: COLLAPSED FUNCTION _GetLcidFromLanguage. PRESS KEYPAD "+" TO	EXPAND]
; [000001F1 BYTES: COLLAPSED FUNCTION ___get_qualified_locale. PRESS KEYPAD "+"	TO EXPAND]
; [00001600 BYTES: COLLAPSED FUNCTION _memcmp. PRESS KEYPAD "+"	TO EXPAND]
off_7BBC54 dd offset $LN132_0 ;	jump table for switch statement
dd offset $LN103
dd offset $LN88_1
dd offset $LN73
dd offset $LN120
dd offset $LN105
dd offset $LN90
dd offset $LN75_2
dd offset $LN122_1
dd offset $LN107
dd offset $LN92
dd offset $LN77_0
dd offset $LN124
dd offset $LN109
dd offset $LN94
dd offset $LN79
dd offset $LN126
dd offset $LN111
dd offset $LN96_0
dd offset $LN81_0
dd offset $LN128
dd offset $LN113_1
dd offset $LN98_0
dd offset $LN83
dd offset $LN130_2
dd offset $LN115
dd offset $LN100
dd offset $LN85
dd offset $LN131_2
dd offset $LN116_0
dd offset $LN101
dd offset $LN86
; [000001BA BYTES: COLLAPSED FUNCTION __crtGetStringTypeA_stat(localeinfo_struct *,ulong,char const *,int,ushort *,int,int,int). PRESS KEYPAD "+" TO EXPAND]
; [00000042 BYTES: COLLAPSED FUNCTION ___crtGetStringTypeA. PRESS KEYPAD "+" TO	EXPAND]
; [00000096 BYTES: COLLAPSED FUNCTION __fcloseall. PRESS KEYPAD	"+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN13_14.	PRESS KEYPAD "+" TO EXPAND]
; [000000BF BYTES: COLLAPSED FUNCTION __fptostr. PRESS KEYPAD "+" TO EXPAND]
; [000000BD BYTES: COLLAPSED FUNCTION ___dtold.	PRESS KEYPAD "+" TO EXPAND]
; [00000090 BYTES: COLLAPSED FUNCTION __fltout2. PRESS KEYPAD "+" TO EXPAND]
; [0000034C BYTES: COLLAPSED FUNCTION __ftelli64_nolock. PRESS KEYPAD "+" TO EXPAND]
; [00000040 BYTES: COLLAPSED FUNCTION __ftelli64. PRESS	KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN7_14. PRESS KEYPAD "+"	TO EXPAND]
; [00000085 BYTES: COLLAPSED FUNCTION __lseeki64_nolock. PRESS KEYPAD "+" TO EXPAND]
; [0000010F BYTES: COLLAPSED FUNCTION __lseeki64. PRESS	KEYPAD "+" TO EXPAND]
; [0000000A BYTES: COLLAPSED FUNCTION $LN14_11.	PRESS KEYPAD "+" TO EXPAND]
; [00000049 BYTES: COLLAPSED FUNCTION __getbuf.	PRESS KEYPAD "+" TO EXPAND]
; [0000016C BYTES: COLLAPSED FUNCTION __wctomb_s_l. PRESS KEYPAD "+" TO	EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION _wctomb_s. PRESS KEYPAD "+" TO EXPAND]
; [00000139 BYTES: COLLAPSED FUNCTION __filwbuf. PRESS KEYPAD "+" TO EXPAND]
; [00000117 BYTES: COLLAPSED FUNCTION __mbtowc_l. PRESS	KEYPAD "+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION _mbtowc. PRESS KEYPAD "+"	TO EXPAND]
; [00000174 BYTES: COLLAPSED FUNCTION __flswbuf. PRESS KEYPAD "+" TO EXPAND]
; [00000012 BYTES: COLLAPSED FUNCTION unknown_libname_209. PRESS KEYPAD	"+" TO EXPAND]
; [000000F7 BYTES: COLLAPSED FUNCTION __calloc_impl. PRESS KEYPAD "+" TO EXPAND]
; [00000005 BYTES: COLLAPSED FUNCTION $LN37_3. PRESS KEYPAD "+"	TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN24_5. PRESS KEYPAD "+"	TO EXPAND]
; [00000019 BYTES: COLLAPSED CHUNK OF FUNCTION __calloc_impl. PRESS KEYPAD "+" TO EXPAND]
; [0000007B BYTES: COLLAPSED FUNCTION __recalloc. PRESS	KEYPAD "+" TO EXPAND]
; [00000028 BYTES: COLLAPSED FUNCTION HeapManager::Destructor(void). PRESS KEYPAD "+" TO EXPAND]
; [00000063 BYTES: COLLAPSED FUNCTION UnDecorator::getNumberOfDimensions(void).	PRESS KEYPAD "+" TO EXPAND]
; [000004C7 BYTES: COLLAPSED FUNCTION UnDecorator::getTypeEncoding(void). PRESS	KEYPAD "+" TO EXPAND]
db 90h
off_7BD35D dd offset $LN15_8 ; jump table for switch statement
dd offset $LN14_12
dd offset $LN13_16
dd offset $LN12_14
dd offset $LN10_12
dd offset $LN11_16
dd offset $LN9_13
dd offset $LN8_16
dd offset $LN7_15
; [0000001E BYTES: COLLAPSED FUNCTION UnDecorator::UScore(Tokens). PRESS KEYPAD	"+" TO EXPAND]
; [00000088 BYTES: COLLAPSED FUNCTION HeapManager::getMemory(uint,int).	PRESS KEYPAD "+" TO EXPAND]
; [00000018 BYTES: COLLAPSED FUNCTION DName::getString(char *,char *). PRESS KEYPAD "+"	TO EXPAND]
; [0000001F BYTES: COLLAPSED FUNCTION DName::operator=|(DName const &).	PRESS KEYPAD "+" TO EXPAND]
; [00000018 BYTES: COLLAPSED FUNCTION unknown_libname_210. PRESS KEYPAD	"+" TO EXPAND]



sub_7BD476 proc	near
xor	eax, eax
inc	eax
retn
sub_7BD476 endp




sub_7BD47A proc	near
mov	al, [ecx+4]
retn
sub_7BD47A endp

; [00000017 BYTES: COLLAPSED FUNCTION charNode::getString(char *,char *). PRESS	KEYPAD "+" TO EXPAND]
; [0000002A BYTES: COLLAPSED FUNCTION pDNameNode::pDNameNode(DName *). PRESS KEYPAD "+"	TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION pDNameNode::length(void).	PRESS KEYPAD "+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION pDNameNode::getLastChar(void). PRESS KEYPAD "+" TO EXPAND]
; [00000019 BYTES: COLLAPSED FUNCTION pDNameNode::getString(char *,char	*). PRESS KEYPAD "+" TO	EXPAND]



sub_7BD505 proc	near
mov	eax, [ecx+8]
retn
sub_7BD505 endp

; [0000000C BYTES: COLLAPSED FUNCTION DNameStatusNode::getLastChar(void). PRESS	KEYPAD "+" TO EXPAND]
; [00000086 BYTES: COLLAPSED FUNCTION DNameStatusNode::make(DNameStatus). PRESS	KEYPAD "+" TO EXPAND]
; [00000021 BYTES: COLLAPSED FUNCTION pairNode::pairNode(DNameNode *,DNameNode *). PRESS KEYPAD	"+" TO EXPAND]
; [0000002B BYTES: COLLAPSED FUNCTION pairNode::length(void). PRESS KEYPAD "+" TO EXPAND]
; [0000001C BYTES: COLLAPSED FUNCTION pairNode::getLastChar(void). PRESS KEYPAD	"+" TO EXPAND]
; [0000002C BYTES: COLLAPSED FUNCTION pairNode::getString(char *,char *). PRESS	KEYPAD "+" TO EXPAND]
; [0000002A BYTES: COLLAPSED FUNCTION und_strncmp(char const *,char const *,uint). PRESS KEYPAD	"+" TO EXPAND]
; [0000006F BYTES: COLLAPSED FUNCTION UnDecorator::UnDecorator(char *,char const *,int,char * (*)(long),ulong).	PRESS KEYPAD "+" TO EXPAND]
; [00000035 BYTES: COLLAPSED FUNCTION UnDecorator::getDataIndirectType(void). PRESS KEYPAD "+" TO EXPAND]
; [00000036 BYTES: COLLAPSED FUNCTION UnDecorator::getThisType(void). PRESS KEYPAD "+" TO EXPAND]
; [00000037 BYTES: COLLAPSED FUNCTION getStringHelper(char *,char *,char *,int). PRESS KEYPAD "+" TO EXPAND]
; [00000053 BYTES: COLLAPSED FUNCTION DName::DName(DName *). PRESS KEYPAD "+" TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION DName::DName(DNameStatus). PRESS KEYPAD "+" TO EXPAND]
; [00000058 BYTES: COLLAPSED FUNCTION DName::getString(char *,int). PRESS KEYPAD "+" TO	EXPAND]
; [0000003F BYTES: COLLAPSED FUNCTION DName::append(DNameNode *). PRESS	KEYPAD "+" TO EXPAND]
; [00000037 BYTES: COLLAPSED FUNCTION DName::operator=(DNameStatus). PRESS KEYPAD "+" TO EXPAND]
; [0000004A BYTES: COLLAPSED FUNCTION Replicator::operator+=(DName const &). PRESS KEYPAD "+" TO EXPAND]
; [00000040 BYTES: COLLAPSED FUNCTION Replicator::operator[](int). PRESS KEYPAD	"+" TO EXPAND]
; [00000057 BYTES: COLLAPSED FUNCTION pcharNode::pcharNode(char	const *,int). PRESS KEYPAD "+" TO EXPAND]
; [00000012 BYTES: COLLAPSED FUNCTION pcharNode::getLastChar(void). PRESS KEYPAD "+" TO	EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION pcharNode::getString(char	*,char *). PRESS KEYPAD	"+" TO EXPAND]
; [00000029 BYTES: COLLAPSED FUNCTION DNameStatusNode::getString(char *,char *). PRESS KEYPAD "+" TO EXPAND]
; [00000031 BYTES: COLLAPSED FUNCTION UnDecorator::getReturnType(DName *). PRESS KEYPAD	"+" TO EXPAND]
; [00000042 BYTES: COLLAPSED FUNCTION DName::operator+=(DNameStatus). PRESS KEYPAD "+" TO EXPAND]
; [0000007C BYTES: COLLAPSED FUNCTION DName::doPchar(char const	*,int).	PRESS KEYPAD "+" TO EXPAND]
; [00000039 BYTES: COLLAPSED FUNCTION DName::DName(char	const *). PRESS	KEYPAD "+" TO EXPAND]
; [000000BF BYTES: COLLAPSED FUNCTION DName::DName(char	const *	&,char). PRESS KEYPAD "+" TO EXPAND]
; [0000006E BYTES: COLLAPSED FUNCTION DName::DName(unsigned __int64). PRESS KEYPAD "+" TO EXPAND]
; [0000009B BYTES: COLLAPSED FUNCTION DName::DName(__int64). PRESS KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION DName::operator+(DNameStatus). PRESS KEYPAD "+" TO EXPAND]
; [00000043 BYTES: COLLAPSED FUNCTION DName::operator+=(DName const &).	PRESS KEYPAD "+" TO EXPAND]
; [0000002D BYTES: COLLAPSED FUNCTION DName::operator=(char). PRESS KEYPAD "+" TO EXPAND]
; [00000035 BYTES: COLLAPSED FUNCTION DName::operator=(char const *). PRESS KEYPAD "+" TO EXPAND]
; [000000AA BYTES: COLLAPSED FUNCTION UnDecorator::getCallingConvention(void). PRESS KEYPAD "+"	TO EXPAND]
; [00000039 BYTES: COLLAPSED FUNCTION UnDecorator::getVCallThunkType(void). PRESS KEYPAD "+" TO	EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION DName::operator+(DName const &). PRESS KEYPAD "+"	TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION DName::operator+=(char). PRESS KEYPAD "+"	TO EXPAND]
; [00000064 BYTES: COLLAPSED FUNCTION DName::operator+=(char const *). PRESS KEYPAD "+"	TO EXPAND]
db 2 dup(0CCh)
; [00000102 BYTES: COLLAPSED FUNCTION UnDecorator::getArgumentList(void). PRESS	KEYPAD "+" TO EXPAND]
; [00000054 BYTES: COLLAPSED FUNCTION UnDecorator::getVdispMapType(DName const &). PRESS KEYPAD	"+" TO EXPAND]


; Attributes: bp-based frame

sub_7BE0D7 proc	near

var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

mov	edi, edi
push	ebp
mov	ebp, esp
push	ecx
push	ecx
push	[ebp+arg_8]
lea	ecx, [ebp+var_8]
push	[ebp+arg_0]
push	[ebp+arg_4]
call	??4DName@@QAEAAV0@D@Z ;	DName::operator=(char)
mov	ecx, eax
call	??HDName@@QBE?AV0@ABV0@@Z ; DName::operator+(DName const &)
mov	eax, [ebp+arg_0]
leave
retn
sub_7BE0D7 endp

; [00000024 BYTES: COLLAPSED FUNCTION operator+(DNameStatus,DName const	&). PRESS KEYPAD "+" TO	EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION operator+(char const *,DName const &). PRESS KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION DName::operator+(char). PRESS KEYPAD "+" TO EXPAND]
; [00000024 BYTES: COLLAPSED FUNCTION DName::operator+(char const *). PRESS KEYPAD "+" TO EXPAND]
; [00000152 BYTES: COLLAPSED FUNCTION UnDecorator::getDimension(bool). PRESS KEYPAD "+"	TO EXPAND]
; [000000B4 BYTES: COLLAPSED FUNCTION UnDecorator::getEnumType(void). PRESS KEYPAD "+" TO EXPAND]
off_7BE391 dd offset $LN10_13 ;	jump table for switch statement
dd offset $LN10_13
dd offset $LN9_14
dd offset $LN9_14
dd offset $LN11_17
dd offset $LN7_16
dd offset $LN6_7
dd offset $LN6_7
; [000000DC BYTES: COLLAPSED FUNCTION UnDecorator::getArgumentTypes(void). PRESS KEYPAD	"+" TO EXPAND]
; [0000007F BYTES: COLLAPSED FUNCTION UnDecorator::getThrowTypes(void).	PRESS KEYPAD "+" TO EXPAND]
; [0000017D BYTES: COLLAPSED FUNCTION UnDecorator::getExtendedDataIndirectType(char &,bool &,int). PRESS KEYPAD	"+" TO EXPAND]
; [0000017A BYTES: COLLAPSED FUNCTION UnDecorator::getArrayType(DName const &).	PRESS KEYPAD "+" TO EXPAND]
; [00000033 BYTES: COLLAPSED FUNCTION UnDecorator::getLexicalFrame(void). PRESS	KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION UnDecorator::getDisplacement(void). PRESS	KEYPAD "+" TO EXPAND]
; [00000016 BYTES: COLLAPSED FUNCTION unknown_libname_211. PRESS KEYPAD	"+" TO EXPAND]
; [00000137 BYTES: COLLAPSED FUNCTION UnDecorator::getVfTableType(DName	const &). PRESS	KEYPAD "+" TO EXPAND]
; [000000A4 BYTES: COLLAPSED FUNCTION UnDecorator::getStringEncoding(char *,int). PRESS	KEYPAD "+" TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION UnDecorator::getSignedDimension(void). PRESS KEYPAD "+" TO EXPAND]
; [000002CD BYTES: COLLAPSED FUNCTION UnDecorator::getTemplateConstant(void). PRESS KEYPAD "+" TO EXPAND]
; [000000DE BYTES: COLLAPSED FUNCTION UnDecorator::getPtrRefDataType(DName const &,int). PRESS KEYPAD "+" TO EXPAND]
; [000001C4 BYTES: COLLAPSED FUNCTION UnDecorator::getTemplateArgumentList(void). PRESS	KEYPAD "+" TO EXPAND]
; [0000059D BYTES: COLLAPSED FUNCTION UnDecorator::getOperatorName(bool,bool *). PRESS KEYPAD "+" TO EXPAND]
; [00000147 BYTES: COLLAPSED FUNCTION UnDecorator::getTemplateName(bool). PRESS	KEYPAD "+" TO EXPAND]
; [000001F6 BYTES: COLLAPSED FUNCTION UnDecorator::getZName(bool,bool).	PRESS KEYPAD "+" TO EXPAND]
; [000000D1 BYTES: COLLAPSED FUNCTION UnDecorator::getScopedName(void).	PRESS KEYPAD "+" TO EXPAND]
; [00000107 BYTES: COLLAPSED FUNCTION UnDecorator::getECSUDataType(void). PRESS	KEYPAD "+" TO EXPAND]
; [0000004A BYTES: COLLAPSED FUNCTION UnDecorator::getSymbolName(void).	PRESS KEYPAD "+" TO EXPAND]
; [00000098 BYTES: COLLAPSED FUNCTION UnDecorator::getBasedType(void). PRESS KEYPAD "+"	TO EXPAND]
; [00000B9B BYTES: COLLAPSED FUNCTION UnDecorator::composeDeclaration(DName const &). PRESS KEYPAD "+" TO EXPAND]
; [00000218 BYTES: COLLAPSED FUNCTION UnDecorator::getDecoratedName(void). PRESS KEYPAD	"+" TO EXPAND]
; [00000270 BYTES: COLLAPSED FUNCTION UnDecorator::getScope(void). PRESS KEYPAD	"+" TO EXPAND]
; [00000354 BYTES: COLLAPSED FUNCTION UnDecorator::getFunctionIndirectType(DName const &). PRESS KEYPAD	"+" TO EXPAND]
; [000004C7 BYTES: COLLAPSED FUNCTION UnDecorator::getDataIndirectType(DName const &,char,DName	const &,int). PRESS KEYPAD "+" TO EXPAND]
; [00000131 BYTES: COLLAPSED FUNCTION UnDecorator::operator char *(void). PRESS	KEYPAD "+" TO EXPAND]
; [000000F9 BYTES: COLLAPSED FUNCTION UnDecorator::getPtrRefType(DName const &,DName const &,char). PRESS KEYPAD "+" TO	EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION UnDecorator::getPointerType(DName	const &,DName const &).	PRESS KEYPAD "+" TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION UnDecorator::getReferenceType(DName const	&,DName	const &). PRESS	KEYPAD "+" TO EXPAND]
; [00000091 BYTES: COLLAPSED FUNCTION ___unDName. PRESS	KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN9_15. PRESS KEYPAD "+"	TO EXPAND]
; [00000394 BYTES: COLLAPSED FUNCTION UnDecorator::getBasicDataType(DName const	&). PRESS KEYPAD "+" TO	EXPAND]
off_7C1A62 dd offset $LN46 ; jump table	for switch statement
dd offset $LN45
dd offset $LN44_0
dd offset $LN43_1
dd offset $LN42
dd offset $LN97_3
byte_7C1A7A db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     2,     2,     3
db	3,     5,     4
; [00000138 BYTES: COLLAPSED FUNCTION UnDecorator::getPrimaryDataType(DName const &). PRESS KEYPAD "+" TO EXPAND]
; [000000C0 BYTES: COLLAPSED FUNCTION UnDecorator::getDataType(DName *). PRESS KEYPAD "+" TO EXPAND]
; [0000006E BYTES: COLLAPSED FUNCTION UnDecorator::getExternalDataType(DName const &). PRESS KEYPAD "+"	TO EXPAND]
; [00000064 BYTES: COLLAPSED FUNCTION __isatty.	PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7C1D4F proc	near

var_24=	dword ptr -24h
var_14=	byte ptr -14h
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

mov	edi, edi
push	ebp
mov	ebp, esp
sub	esp, 14h
push	ebx
push	esi
push	edi
call	__encoded_null
and	[ebp+var_4], 0
cmp	dword_1859008, 0
mov	ebx, eax
jnz	loc_7C1E00
push	offset aUser32_dll_0 ; "USER32.DLL"
call	ds:LoadLibraryA
mov	edi, eax
test	edi, edi
jz	loc_7C1EB1
mov	esi, ds:GetProcAddress
push	offset aMessageboxa ; "MessageBoxA"
push	edi		; hModule
call	esi ; GetProcAddress
test	eax, eax
jz	loc_7C1EB1
push	eax		; lpProcName
call	__encode_pointer
mov	[esp+24h+var_24], offset aGetactivewindo ; "GetActiveWindow"
push	edi		; hModule
mov	dword_1859008, eax
call	esi ; GetProcAddress
push	eax		; lpProcName
call	__encode_pointer
mov	[esp+24h+var_24], offset aGetlastactivep ; "GetLastActivePopup"
push	edi		; hModule
mov	dword_185900C, eax
call	esi ; GetProcAddress
push	eax		; lpProcName
call	__encode_pointer
mov	[esp+24h+var_24], offset aGetuserobjecti ; "GetUserObjectInformationA"
push	edi		; hModule
mov	dword_1859010, eax
call	esi ; GetProcAddress
push	eax
call	__encode_pointer
pop	ecx
mov	dword_1859018, eax
test	eax, eax
jz	short loc_7C1E00
push	offset aGetprocesswind ; "GetProcessWindowStation"
push	edi		; hModule
call	esi ; GetProcAddress
push	eax
call	__encode_pointer
pop	ecx
mov	dword_1859014, eax

loc_7C1E00:
mov	eax, dword_1859014
cmp	eax, ebx
jz	short loc_7C1E58
cmp	dword_1859018, ebx
jz	short loc_7C1E58
push	eax
call	__decode_pointer
push	dword_1859018
mov	esi, eax
call	__decode_pointer
pop	ecx
pop	ecx
mov	edi, eax
test	esi, esi
jz	short loc_7C1E58
test	edi, edi
jz	short loc_7C1E58
call	esi
test	eax, eax
jz	short loc_7C1E4F
lea	ecx, [ebp+var_8]
push	ecx
push	0Ch
lea	ecx, [ebp+var_14]
push	ecx
push	1
push	eax
call	edi
test	eax, eax
jz	short loc_7C1E4F
test	[ebp+var_C], 1
jnz	short loc_7C1E58

loc_7C1E4F:
or	[ebp+arg_8], 200000h
jmp	short loc_7C1E91

loc_7C1E58:
mov	eax, dword_185900C
cmp	eax, ebx
jz	short loc_7C1E91
push	eax
call	__decode_pointer
pop	ecx
test	eax, eax
jz	short loc_7C1E91
call	eax
mov	[ebp+var_4], eax
test	eax, eax
jz	short loc_7C1E91
mov	eax, dword_1859010
cmp	eax, ebx
jz	short loc_7C1E91
push	eax
call	__decode_pointer
pop	ecx
test	eax, eax
jz	short loc_7C1E91
push	[ebp+var_4]
call	eax
mov	[ebp+var_4], eax

loc_7C1E91:
push	dword_1859008
call	__decode_pointer
pop	ecx
test	eax, eax
jz	short loc_7C1EB1
push	[ebp+arg_8]
push	[ebp+arg_4]
push	[ebp+arg_0]
push	[ebp+var_4]
call	eax
jmp	short loc_7C1EB3

loc_7C1EB1:
xor	eax, eax

loc_7C1EB3:
pop	edi
pop	esi
pop	ebx
leave
retn
sub_7C1D4F endp

; [0000004B BYTES: COLLAPSED FUNCTION __set_error_mode.	PRESS KEYPAD "+" TO EXPAND]
; [00000034 BYTES: COLLAPSED FUNCTION ___crtGetLocaleInfoW. PRESS KEYPAD "+" TO	EXPAND]
; [0000013F BYTES: COLLAPSED FUNCTION __crtGetLocaleInfoA_stat(localeinfo_struct *,ulong,ulong,char *,int,int).	PRESS KEYPAD "+" TO EXPAND]
; [0000003D BYTES: COLLAPSED FUNCTION ___crtGetLocaleInfoA. PRESS KEYPAD "+" TO	EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION __fptrap.	PRESS KEYPAD "+" TO EXPAND]
; [0000071F BYTES: COLLAPSED FUNCTION __tsopen_nolock. PRESS KEYPAD "+"	TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_7C27DB(LPCSTR	lpFileName, int, int, int, int,	int)
sub_7C27DB proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	14h
push	offset unk_1625C18
call	__SEH_prolog4
xor	esi, esi
mov	[ebp+var_1C], esi
xor	eax, eax
mov	edi, [ebp+arg_10]
cmp	edi, esi
setnz	al
cmp	eax, esi
jnz	short loc_7C2815

loc_7C27FA:
call	__errno
push	16h
pop	edi
mov	[eax], edi
push	esi
push	esi
push	esi
push	esi
push	esi
call	__invalid_parameter
add	esp, 14h
mov	eax, edi
jmp	short loc_7C286E

loc_7C2815:
or	dword ptr [edi], 0FFFFFFFFh
xor	eax, eax
cmp	[ebp+lpFileName], esi
setnz	al
cmp	eax, esi
jz	short loc_7C27FA
cmp	[ebp+arg_14], esi
jz	short loc_7C2838
mov	eax, [ebp+arg_C]
and	eax, 0FFFFFE7Fh
neg	eax
sbb	eax, eax
inc	eax
jz	short loc_7C27FA

loc_7C2838:
mov	[ebp+ms_exc.disabled], esi
push	[ebp+arg_C]	; int
push	[ebp+arg_8]	; int
push	[ebp+arg_4]	; int
push	[ebp+lpFileName] ; lpFileName
lea	eax, [ebp+var_1C]
push	eax		; int
mov	eax, edi
call	__tsopen_nolock
add	esp, 14h
mov	[ebp+var_20], eax
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7C2879
mov	eax, [ebp+var_20]
cmp	eax, esi
jz	short loc_7C286E
or	dword ptr [edi], 0FFFFFFFFh

loc_7C286E:
call	__SEH_epilog4
retn
sub_7C27DB endp




sub_7C2874 proc	near
xor	esi, esi
mov	edi, [ebp+18h]
sub_7C2874 endp	; sp-analysis failed




sub_7C2879 proc	near
cmp	[ebp-1Ch], esi
jz	short locret_7C28A6
cmp	[ebp-20h], esi
jz	short loc_7C289E
mov	eax, [edi]
mov	ecx, eax
sar	ecx, 5
and	eax, 1Fh
shl	eax, 6
mov	ecx, dword_19736C0[ecx*4]
lea	eax, [ecx+eax+4]
and	byte ptr [eax],	0FEh

loc_7C289E:
push	dword ptr [edi]
call	__unlock_fhandle
pop	ecx

locret_7C28A6:
retn
sub_7C2879 endp



; Attributes: bp-based frame

; int __cdecl sub_7C28A7(int, LPCSTR lpFileName, int, int, int)
sub_7C28A7 proc	near

arg_0= dword ptr  8
lpFileName= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

mov	edi, edi
push	ebp
mov	ebp, esp
push	1		; int
push	[ebp+arg_0]	; int
push	[ebp+arg_10]	; int
push	[ebp+arg_C]	; int
push	[ebp+arg_8]	; int
push	[ebp+lpFileName] ; lpFileName
call	sub_7C27DB
add	esp, 18h
pop	ebp
retn
sub_7C28A7 endp

; [0000022B BYTES: COLLAPSED FUNCTION __mbsnbicmp_l. PRESS KEYPAD "+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __mbsnbicmp. PRESS KEYPAD	"+" TO EXPAND]
; [0000016A BYTES: COLLAPSED FUNCTION __mbsnbcmp_l. PRESS KEYPAD "+" TO	EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __mbsnbcmp. PRESS	KEYPAD "+" TO EXPAND]
; [00000020 BYTES: COLLAPSED FUNCTION __global_unwind2.	PRESS KEYPAD "+" TO EXPAND]
; [00000045 BYTES: COLLAPSED FUNCTION __unwind_handler.	PRESS KEYPAD "+" TO EXPAND]
; [00000084 BYTES: COLLAPSED FUNCTION __local_unwind2. PRESS KEYPAD "+"	TO EXPAND]
; [00000023 BYTES: COLLAPSED FUNCTION __abnormal_termination. PRESS KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION __NLG_Notify1. PRESS KEYPAD "+" TO EXPAND]
; [0000001F BYTES: COLLAPSED FUNCTION __NLG_Notify. PRESS KEYPAD "+" TO	EXPAND]
; [00000003 BYTES: COLLAPSED FUNCTION __NLG_Call. PRESS	KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7C2DC7 proc	near

var_2C=	byte ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

mov	edi, edi
push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax+0Ah]
push	ebx
mov	ebx, ecx
and	ecx, 8000h
mov	[ebp+var_14], ecx
mov	ecx, [eax+6]
mov	[ebp+var_20], ecx
mov	ecx, [eax+2]
movzx	eax, word ptr [eax]
and	ebx, 7FFFh
sub	ebx, 3FFFh
shl	eax, 10h
push	edi
mov	[ebp+var_1C], ecx
mov	[ebp+var_18], eax
cmp	ebx, 0FFFFC001h
jnz	short loc_7C2E33
xor	ebx, ebx
xor	eax, eax

loc_7C2E10:
cmp	[ebp+eax*4+var_20], ebx
jnz	short loc_7C2E23
inc	eax
cmp	eax, 3
jl	short loc_7C2E10
xor	eax, eax
jmp	loc_7C32C8

loc_7C2E23:
xor	eax, eax
lea	edi, [ebp+var_20]
stosd
stosd
push	2
stosd
pop	eax
jmp	loc_7C32C8

loc_7C2E33:
and	[ebp+arg_0], 0
push	esi
lea	esi, [ebp+var_20]
lea	edi, [ebp+var_2C]
movsd
movsd
movsd
mov	esi, dword_16812A0
dec	esi
lea	ecx, [esi+1]
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
sar	eax, 5
mov	edx, ecx
and	edx, 8000001Fh
mov	[ebp+var_10], ebx
mov	[ebp+var_C], eax
jns	short loc_7C2E6B
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C2E6B:
lea	edi, [ebp+eax*4+var_20]
push	1Fh
xor	eax, eax
pop	ecx
sub	ecx, edx
inc	eax
shl	eax, cl
mov	[ebp+var_8], ecx
test	[edi], eax
jz	loc_7C2F11
mov	eax, [ebp+var_C]
or	edx, 0FFFFFFFFh
shl	edx, cl
not	edx
test	[ebp+eax*4+var_20], edx
jmp	short loc_7C2E99

loc_7C2E94:
cmp	[ebp+eax*4+var_20], 0

loc_7C2E99:
jnz	short loc_7C2EA3
inc	eax
cmp	eax, 3
jl	short loc_7C2E94
jmp	short loc_7C2F11

loc_7C2EA3:
mov	eax, esi
cdq
push	1Fh
pop	ecx
and	edx, ecx
add	eax, edx
sar	eax, 5
and	esi, 8000001Fh
jns	short loc_7C2EBD
dec	esi
or	esi, 0FFFFFFE0h
inc	esi

loc_7C2EBD:
and	[ebp+var_4], 0
sub	ecx, esi
xor	edx, edx
inc	edx
shl	edx, cl
lea	ecx, [ebp+eax*4+var_20]
mov	esi, [ecx]
add	esi, edx
mov	[ebp+arg_0], esi
mov	esi, [ecx]
cmp	[ebp+arg_0], esi
jb	short loc_7C2EFC
cmp	[ebp+arg_0], edx
jmp	short loc_7C2EFA

loc_7C2EDF:
test	ecx, ecx
jz	short loc_7C2F0E
and	[ebp+var_4], 0
lea	ecx, [ebp+eax*4+var_20]
mov	edx, [ecx]
lea	esi, [edx+1]
mov	[ebp+arg_0], esi
cmp	esi, edx
jb	short loc_7C2EFC
cmp	esi, 1

loc_7C2EFA:
jnb	short loc_7C2F03

loc_7C2EFC:
mov	[ebp+var_4], 1

loc_7C2F03:
dec	eax
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_4]
jns	short loc_7C2EDF

loc_7C2F0E:
mov	[ebp+arg_0], ecx

loc_7C2F11:
mov	ecx, [ebp+var_8]
or	eax, 0FFFFFFFFh
shl	eax, cl
and	[edi], eax
mov	eax, [ebp+var_C]
inc	eax
cmp	eax, 3
jge	short loc_7C2F31
push	3
pop	ecx
lea	edi, [ebp+eax*4+var_20]
sub	ecx, eax
xor	eax, eax
rep stosd

loc_7C2F31:
cmp	[ebp+arg_0], 0
jz	short loc_7C2F38
inc	ebx

loc_7C2F38:
mov	eax, dword_168129C
mov	ecx, eax
sub	ecx, dword_16812A0
cmp	ebx, ecx
jge	short loc_7C2F56
xor	eax, eax
lea	edi, [ebp+var_20]
stosd
stosd
stosd
jmp	loc_7C3163

loc_7C2F56:
cmp	ebx, eax
jg	loc_7C316D
sub	eax, [ebp+var_10]
lea	esi, [ebp+var_2C]
mov	ecx, eax
lea	edi, [ebp+var_20]
movsd
cdq
and	edx, 1Fh
add	eax, edx
movsd
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
movsd
jns	short loc_7C2F84
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C2F84:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	edi, 0FFFFFFFFh
mov	ecx, edx
shl	edi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	edi

loc_7C2F9F:
mov	ebx, [ebp+arg_0]
lea	ebx, [ebp+ebx*4+var_20]
mov	esi, [ebx]
mov	ecx, esi
and	ecx, edi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	esi, cl
mov	ecx, [ebp+var_4]
or	esi, [ebp+var_C]
mov	[ebx], esi
mov	esi, [ebp+var_10]
shl	esi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], esi
jl	short loc_7C2F9F
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C2FD9:
cmp	edx, eax
jl	short loc_7C2FE5
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C2FEA

loc_7C2FE5:
and	[ebp+edx*4+var_20], 0

loc_7C2FEA:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C2FD9
mov	esi, dword_16812A0
dec	esi
lea	ecx, [esi+1]
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
sar	eax, 5
mov	edx, ecx
and	edx, 8000001Fh
mov	[ebp+var_C], eax
jns	short loc_7C3019
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C3019:
push	1Fh
pop	ecx
sub	ecx, edx
xor	edx, edx
inc	edx
shl	edx, cl
lea	ebx, [ebp+eax*4+var_20]
mov	[ebp+var_10], ecx
test	[ebx], edx
jz	loc_7C30B4
or	edx, 0FFFFFFFFh
shl	edx, cl
not	edx
test	[ebp+eax*4+var_20], edx
jmp	short loc_7C3044

loc_7C303F:
cmp	[ebp+eax*4+var_20], 0

loc_7C3044:
jnz	short loc_7C304E
inc	eax
cmp	eax, 3
jl	short loc_7C303F
jmp	short loc_7C30B4

loc_7C304E:
mov	eax, esi
cdq
push	1Fh
pop	ecx
and	edx, ecx
add	eax, edx
sar	eax, 5
and	esi, 8000001Fh
jns	short loc_7C3068
dec	esi
or	esi, 0FFFFFFE0h
inc	esi

loc_7C3068:
and	[ebp+arg_0], 0
xor	edx, edx
sub	ecx, esi
inc	edx
shl	edx, cl
lea	ecx, [ebp+eax*4+var_20]
mov	esi, [ecx]
lea	edi, [esi+edx]
cmp	edi, esi
jb	short loc_7C3084
cmp	edi, edx
jnb	short loc_7C308B

loc_7C3084:
mov	[ebp+arg_0], 1

loc_7C308B:
mov	[ecx], edi
mov	ecx, [ebp+arg_0]
jmp	short loc_7C30B1

loc_7C3092:
test	ecx, ecx
jz	short loc_7C30B4
lea	ecx, [ebp+eax*4+var_20]
mov	edx, [ecx]
lea	esi, [edx+1]
xor	edi, edi
cmp	esi, edx
jb	short loc_7C30AA
cmp	esi, 1
jnb	short loc_7C30AD

loc_7C30AA:
xor	edi, edi
inc	edi

loc_7C30AD:
mov	[ecx], esi
mov	ecx, edi

loc_7C30B1:
dec	eax
jns	short loc_7C3092

loc_7C30B4:
mov	ecx, [ebp+var_10]
or	eax, 0FFFFFFFFh
shl	eax, cl
and	[ebx], eax
mov	eax, [ebp+var_C]
inc	eax
cmp	eax, 3
jge	short loc_7C30D4
push	3
pop	ecx
lea	edi, [ebp+eax*4+var_20]
sub	ecx, eax
xor	eax, eax
rep stosd

loc_7C30D4:
mov	ecx, dword_16812A4
inc	ecx
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
jns	short loc_7C30F5
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C30F5:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	edi, 0FFFFFFFFh
mov	ecx, edx
shl	edi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	edi

loc_7C3110:
mov	ebx, [ebp+arg_0]
lea	ebx, [ebp+ebx*4+var_20]
mov	esi, [ebx]
mov	ecx, esi
and	ecx, edi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	esi, cl
mov	ecx, [ebp+var_4]
or	esi, [ebp+var_C]
mov	[ebx], esi
mov	esi, [ebp+var_10]
shl	esi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], esi
jl	short loc_7C3110
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C314A:
cmp	edx, eax
jl	short loc_7C3156
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C315B

loc_7C3156:
and	[ebp+edx*4+var_20], 0

loc_7C315B:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C314A

loc_7C3163:
push	2
xor	ebx, ebx
pop	eax
jmp	loc_7C32C7

loc_7C316D:
cmp	ebx, dword_1681298
mov	ecx, dword_16812A4
jl	loc_7C322C
xor	eax, eax
lea	edi, [ebp+var_20]
stosd
stosd
stosd
or	[ebp+var_20], 80000000h
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
jns	short loc_7C31A8
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C31A8:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	edi, 0FFFFFFFFh
mov	ecx, edx
shl	edi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	edi

loc_7C31C3:
mov	ebx, [ebp+arg_0]
lea	ebx, [ebp+ebx*4+var_20]
mov	esi, [ebx]
mov	ecx, esi
and	ecx, edi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	esi, cl
mov	ecx, [ebp+var_4]
or	esi, [ebp+var_C]
mov	[ebx], esi
mov	esi, [ebp+var_10]
shl	esi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], esi
jl	short loc_7C31C3
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C31FD:
cmp	edx, eax
jl	short loc_7C3209
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C320E

loc_7C3209:
and	[ebp+edx*4+var_20], 0

loc_7C320E:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C31FD
mov	eax, dword_1681298
mov	ecx, dword_16812AC
lea	ebx, [ecx+eax]
xor	eax, eax
inc	eax
jmp	loc_7C32C7

loc_7C322C:
mov	eax, dword_16812AC
and	[ebp+var_20], 7FFFFFFFh
add	ebx, eax
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
jns	short loc_7C3254
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C3254:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	esi, 0FFFFFFFFh
mov	ecx, edx
shl	esi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	esi

loc_7C326F:
mov	ecx, [ebp+arg_0]
mov	edi, [ebp+ecx*4+var_20]
mov	ecx, edi
and	ecx, esi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	edi, cl
mov	ecx, [ebp+arg_0]
or	edi, [ebp+var_C]
mov	[ebp+ecx*4+var_20], edi
mov	edi, [ebp+var_10]
mov	ecx, [ebp+var_4]
shl	edi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], edi
jl	short loc_7C326F
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C32AC:
cmp	edx, eax
jl	short loc_7C32B8
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C32BD

loc_7C32B8:
and	[ebp+edx*4+var_20], 0

loc_7C32BD:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C32AC
xor	eax, eax

loc_7C32C7:
pop	esi

loc_7C32C8:
push	1Fh
pop	ecx
sub	ecx, dword_16812A4
shl	ebx, cl
mov	ecx, [ebp+var_14]
neg	ecx
sbb	ecx, ecx
and	ecx, 80000000h
or	ebx, ecx
mov	ecx, dword_16812A8
or	ebx, [ebp+var_20]
cmp	ecx, 40h
jnz	short loc_7C32FD
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_1C]
mov	[ecx+4], ebx
mov	[ecx], edx
jmp	short loc_7C3307

loc_7C32FD:
cmp	ecx, 20h
jnz	short loc_7C3307
mov	ecx, [ebp+arg_4]
mov	[ecx], ebx

loc_7C3307:
pop	edi
pop	ebx
leave
retn
sub_7C2DC7 endp



; Attributes: bp-based frame

sub_7C330B proc	near

var_2C=	byte ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

mov	edi, edi
push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_0]
movzx	ecx, word ptr [eax+0Ah]
push	ebx
mov	ebx, ecx
and	ecx, 8000h
mov	[ebp+var_14], ecx
mov	ecx, [eax+6]
mov	[ebp+var_20], ecx
mov	ecx, [eax+2]
movzx	eax, word ptr [eax]
and	ebx, 7FFFh
sub	ebx, 3FFFh
shl	eax, 10h
push	edi
mov	[ebp+var_1C], ecx
mov	[ebp+var_18], eax
cmp	ebx, 0FFFFC001h
jnz	short loc_7C3377
xor	ebx, ebx
xor	eax, eax

loc_7C3354:
cmp	[ebp+eax*4+var_20], ebx
jnz	short loc_7C3367
inc	eax
cmp	eax, 3
jl	short loc_7C3354
xor	eax, eax
jmp	loc_7C380C

loc_7C3367:
xor	eax, eax
lea	edi, [ebp+var_20]
stosd
stosd
push	2
stosd
pop	eax
jmp	loc_7C380C

loc_7C3377:
and	[ebp+arg_0], 0
push	esi
lea	esi, [ebp+var_20]
lea	edi, [ebp+var_2C]
movsd
movsd
movsd
mov	esi, dword_16812B8
dec	esi
lea	ecx, [esi+1]
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
sar	eax, 5
mov	edx, ecx
and	edx, 8000001Fh
mov	[ebp+var_10], ebx
mov	[ebp+var_C], eax
jns	short loc_7C33AF
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C33AF:
lea	edi, [ebp+eax*4+var_20]
push	1Fh
xor	eax, eax
pop	ecx
sub	ecx, edx
inc	eax
shl	eax, cl
mov	[ebp+var_8], ecx
test	[edi], eax
jz	loc_7C3455
mov	eax, [ebp+var_C]
or	edx, 0FFFFFFFFh
shl	edx, cl
not	edx
test	[ebp+eax*4+var_20], edx
jmp	short loc_7C33DD

loc_7C33D8:
cmp	[ebp+eax*4+var_20], 0

loc_7C33DD:
jnz	short loc_7C33E7
inc	eax
cmp	eax, 3
jl	short loc_7C33D8
jmp	short loc_7C3455

loc_7C33E7:
mov	eax, esi
cdq
push	1Fh
pop	ecx
and	edx, ecx
add	eax, edx
sar	eax, 5
and	esi, 8000001Fh
jns	short loc_7C3401
dec	esi
or	esi, 0FFFFFFE0h
inc	esi

loc_7C3401:
and	[ebp+var_4], 0
sub	ecx, esi
xor	edx, edx
inc	edx
shl	edx, cl
lea	ecx, [ebp+eax*4+var_20]
mov	esi, [ecx]
add	esi, edx
mov	[ebp+arg_0], esi
mov	esi, [ecx]
cmp	[ebp+arg_0], esi
jb	short loc_7C3440
cmp	[ebp+arg_0], edx
jmp	short loc_7C343E

loc_7C3423:
test	ecx, ecx
jz	short loc_7C3452
and	[ebp+var_4], 0
lea	ecx, [ebp+eax*4+var_20]
mov	edx, [ecx]
lea	esi, [edx+1]
mov	[ebp+arg_0], esi
cmp	esi, edx
jb	short loc_7C3440
cmp	esi, 1

loc_7C343E:
jnb	short loc_7C3447

loc_7C3440:
mov	[ebp+var_4], 1

loc_7C3447:
dec	eax
mov	edx, [ebp+arg_0]
mov	[ecx], edx
mov	ecx, [ebp+var_4]
jns	short loc_7C3423

loc_7C3452:
mov	[ebp+arg_0], ecx

loc_7C3455:
mov	ecx, [ebp+var_8]
or	eax, 0FFFFFFFFh
shl	eax, cl
and	[edi], eax
mov	eax, [ebp+var_C]
inc	eax
cmp	eax, 3
jge	short loc_7C3475
push	3
pop	ecx
lea	edi, [ebp+eax*4+var_20]
sub	ecx, eax
xor	eax, eax
rep stosd

loc_7C3475:
cmp	[ebp+arg_0], 0
jz	short loc_7C347C
inc	ebx

loc_7C347C:
mov	eax, dword_16812B4
mov	ecx, eax
sub	ecx, dword_16812B8
cmp	ebx, ecx
jge	short loc_7C349A
xor	eax, eax
lea	edi, [ebp+var_20]
stosd
stosd
stosd
jmp	loc_7C36A7

loc_7C349A:
cmp	ebx, eax
jg	loc_7C36B1
sub	eax, [ebp+var_10]
lea	esi, [ebp+var_2C]
mov	ecx, eax
lea	edi, [ebp+var_20]
movsd
cdq
and	edx, 1Fh
add	eax, edx
movsd
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
movsd
jns	short loc_7C34C8
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C34C8:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	edi, 0FFFFFFFFh
mov	ecx, edx
shl	edi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	edi

loc_7C34E3:
mov	ebx, [ebp+arg_0]
lea	ebx, [ebp+ebx*4+var_20]
mov	esi, [ebx]
mov	ecx, esi
and	ecx, edi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	esi, cl
mov	ecx, [ebp+var_4]
or	esi, [ebp+var_C]
mov	[ebx], esi
mov	esi, [ebp+var_10]
shl	esi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], esi
jl	short loc_7C34E3
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C351D:
cmp	edx, eax
jl	short loc_7C3529
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C352E

loc_7C3529:
and	[ebp+edx*4+var_20], 0

loc_7C352E:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C351D
mov	esi, dword_16812B8
dec	esi
lea	ecx, [esi+1]
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
sar	eax, 5
mov	edx, ecx
and	edx, 8000001Fh
mov	[ebp+var_C], eax
jns	short loc_7C355D
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C355D:
push	1Fh
pop	ecx
sub	ecx, edx
xor	edx, edx
inc	edx
shl	edx, cl
lea	ebx, [ebp+eax*4+var_20]
mov	[ebp+var_10], ecx
test	[ebx], edx
jz	loc_7C35F8
or	edx, 0FFFFFFFFh
shl	edx, cl
not	edx
test	[ebp+eax*4+var_20], edx
jmp	short loc_7C3588

loc_7C3583:
cmp	[ebp+eax*4+var_20], 0

loc_7C3588:
jnz	short loc_7C3592
inc	eax
cmp	eax, 3
jl	short loc_7C3583
jmp	short loc_7C35F8

loc_7C3592:
mov	eax, esi
cdq
push	1Fh
pop	ecx
and	edx, ecx
add	eax, edx
sar	eax, 5
and	esi, 8000001Fh
jns	short loc_7C35AC
dec	esi
or	esi, 0FFFFFFE0h
inc	esi

loc_7C35AC:
and	[ebp+arg_0], 0
xor	edx, edx
sub	ecx, esi
inc	edx
shl	edx, cl
lea	ecx, [ebp+eax*4+var_20]
mov	esi, [ecx]
lea	edi, [esi+edx]
cmp	edi, esi
jb	short loc_7C35C8
cmp	edi, edx
jnb	short loc_7C35CF

loc_7C35C8:
mov	[ebp+arg_0], 1

loc_7C35CF:
mov	[ecx], edi
mov	ecx, [ebp+arg_0]
jmp	short loc_7C35F5

loc_7C35D6:
test	ecx, ecx
jz	short loc_7C35F8
lea	ecx, [ebp+eax*4+var_20]
mov	edx, [ecx]
lea	esi, [edx+1]
xor	edi, edi
cmp	esi, edx
jb	short loc_7C35EE
cmp	esi, 1
jnb	short loc_7C35F1

loc_7C35EE:
xor	edi, edi
inc	edi

loc_7C35F1:
mov	[ecx], esi
mov	ecx, edi

loc_7C35F5:
dec	eax
jns	short loc_7C35D6

loc_7C35F8:
mov	ecx, [ebp+var_10]
or	eax, 0FFFFFFFFh
shl	eax, cl
and	[ebx], eax
mov	eax, [ebp+var_C]
inc	eax
cmp	eax, 3
jge	short loc_7C3618
push	3
pop	ecx
lea	edi, [ebp+eax*4+var_20]
sub	ecx, eax
xor	eax, eax
rep stosd

loc_7C3618:
mov	ecx, dword_16812BC
inc	ecx
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
jns	short loc_7C3639
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C3639:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	edi, 0FFFFFFFFh
mov	ecx, edx
shl	edi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	edi

loc_7C3654:
mov	ebx, [ebp+arg_0]
lea	ebx, [ebp+ebx*4+var_20]
mov	esi, [ebx]
mov	ecx, esi
and	ecx, edi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	esi, cl
mov	ecx, [ebp+var_4]
or	esi, [ebp+var_C]
mov	[ebx], esi
mov	esi, [ebp+var_10]
shl	esi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], esi
jl	short loc_7C3654
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C368E:
cmp	edx, eax
jl	short loc_7C369A
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C369F

loc_7C369A:
and	[ebp+edx*4+var_20], 0

loc_7C369F:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C368E

loc_7C36A7:
push	2
xor	ebx, ebx
pop	eax
jmp	loc_7C380B

loc_7C36B1:
cmp	ebx, dword_16812B0
mov	ecx, dword_16812BC
jl	loc_7C3770
xor	eax, eax
lea	edi, [ebp+var_20]
stosd
stosd
stosd
or	[ebp+var_20], 80000000h
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
jns	short loc_7C36EC
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C36EC:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	edi, 0FFFFFFFFh
mov	ecx, edx
shl	edi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	edi

loc_7C3707:
mov	ebx, [ebp+arg_0]
lea	ebx, [ebp+ebx*4+var_20]
mov	esi, [ebx]
mov	ecx, esi
and	ecx, edi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	esi, cl
mov	ecx, [ebp+var_4]
or	esi, [ebp+var_C]
mov	[ebx], esi
mov	esi, [ebp+var_10]
shl	esi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], esi
jl	short loc_7C3707
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C3741:
cmp	edx, eax
jl	short loc_7C374D
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C3752

loc_7C374D:
and	[ebp+edx*4+var_20], 0

loc_7C3752:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C3741
mov	eax, dword_16812B0
mov	ecx, dword_16812C4
lea	ebx, [ecx+eax]
xor	eax, eax
inc	eax
jmp	loc_7C380B

loc_7C3770:
mov	eax, dword_16812C4
and	[ebp+var_20], 7FFFFFFFh
add	ebx, eax
mov	eax, ecx
cdq
and	edx, 1Fh
add	eax, edx
mov	edx, ecx
sar	eax, 5
and	edx, 8000001Fh
jns	short loc_7C3798
dec	edx
or	edx, 0FFFFFFE0h
inc	edx

loc_7C3798:
and	[ebp+var_C], 0
and	[ebp+arg_0], 0
or	esi, 0FFFFFFFFh
mov	ecx, edx
shl	esi, cl
mov	[ebp+var_4], 20h
sub	[ebp+var_4], edx
not	esi

loc_7C37B3:
mov	ecx, [ebp+arg_0]
mov	edi, [ebp+ecx*4+var_20]
mov	ecx, edi
and	ecx, esi
mov	[ebp+var_10], ecx
mov	ecx, edx
shr	edi, cl
mov	ecx, [ebp+arg_0]
or	edi, [ebp+var_C]
mov	[ebp+ecx*4+var_20], edi
mov	edi, [ebp+var_10]
mov	ecx, [ebp+var_4]
shl	edi, cl
inc	[ebp+arg_0]
cmp	[ebp+arg_0], 3
mov	[ebp+var_C], edi
jl	short loc_7C37B3
mov	esi, eax
push	2
shl	esi, 2
lea	ecx, [ebp+var_18]
pop	edx
sub	ecx, esi

loc_7C37F0:
cmp	edx, eax
jl	short loc_7C37FC
mov	esi, [ecx]
mov	[ebp+edx*4+var_20], esi
jmp	short loc_7C3801

loc_7C37FC:
and	[ebp+edx*4+var_20], 0

loc_7C3801:
dec	edx
sub	ecx, 4
test	edx, edx
jge	short loc_7C37F0
xor	eax, eax

loc_7C380B:
pop	esi

loc_7C380C:
push	1Fh
pop	ecx
sub	ecx, dword_16812BC
shl	ebx, cl
mov	ecx, [ebp+var_14]
neg	ecx
sbb	ecx, ecx
and	ecx, 80000000h
or	ebx, ecx
mov	ecx, dword_16812C0
or	ebx, [ebp+var_20]
cmp	ecx, 40h
jnz	short loc_7C3841
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_1C]
mov	[ecx+4], ebx
mov	[ecx], edx
jmp	short loc_7C384B

loc_7C3841:
cmp	ecx, 20h
jnz	short loc_7C384B
mov	ecx, [ebp+arg_4]
mov	[ecx], ebx

loc_7C384B:
pop	edi
pop	ebx
leave
retn
sub_7C330B endp

; [000001CE BYTES: COLLAPSED FUNCTION ___mtold12. PRESS	KEYPAD "+" TO EXPAND]
; [00000049 BYTES: COLLAPSED FUNCTION ___ansicp. PRESS KEYPAD "+" TO EXPAND]
; [000001B4 BYTES: COLLAPSED FUNCTION ___convertcp. PRESS KEYPAD "+" TO	EXPAND]


; Attributes: bp-based frame

sub_7C3C1A proc	near

var_28=	byte ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

mov	edi, edi
push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, dword_167FD30
xor	eax, ebp
mov	[ebp+var_4], eax
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
push	[ebp+arg_8]
mov	edi, [ebp+arg_4]
lea	ecx, [ebp+var_24]
call	??0_LocaleUpdate@@QAE@PAUlocaleinfo_struct@@@Z ; _LocaleUpdate::_LocaleUpdate(localeinfo_struct	*)
lea	eax, [ebp+var_24]
push	eax
xor	ebx, ebx
push	ebx
push	ebx
push	ebx
push	ebx
push	edi
lea	eax, [ebp+var_28]
push	eax
lea	eax, [ebp+var_10]
push	eax
call	___strgtold12_l
mov	[ebp+var_14], eax
lea	eax, [ebp+var_10]
push	esi
push	eax
call	sub_7C2DC7
add	esp, 28h
test	byte ptr [ebp+var_14], 3
jnz	short loc_7C3C99
cmp	eax, 1
jnz	short loc_7C3C84

loc_7C3C73:
cmp	[ebp+var_18], bl
jz	short loc_7C3C7F
mov	eax, [ebp+var_1C]
and	dword ptr [eax+70h], 0FFFFFFFDh

loc_7C3C7F:
push	3

loc_7C3C81:
pop	eax
jmp	short loc_7C3CB3

loc_7C3C84:
cmp	eax, 2
jnz	short loc_7C3CA5

loc_7C3C89:
cmp	[ebp+var_18], bl
jz	short loc_7C3C95
mov	eax, [ebp+var_1C]
and	dword ptr [eax+70h], 0FFFFFFFDh

loc_7C3C95:
push	4
jmp	short loc_7C3C81

loc_7C3C99:
test	byte ptr [ebp+var_14], 1
jnz	short loc_7C3C89
test	byte ptr [ebp+var_14], 2
jnz	short loc_7C3C73

loc_7C3CA5:
cmp	[ebp+var_18], bl
jz	short loc_7C3CB1
mov	eax, [ebp+var_1C]
and	dword ptr [eax+70h], 0FFFFFFFDh

loc_7C3CB1:
xor	eax, eax

loc_7C3CB3:
mov	ecx, [ebp+var_4]
pop	edi
pop	esi
xor	ecx, ebp
pop	ebx
call	sub_7999A3
leave
retn
sub_7C3C1A endp



; Attributes: bp-based frame

sub_7C3CC2 proc	near

var_28=	byte ptr -28h
var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

mov	edi, edi
push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, dword_167FD30
xor	eax, ebp
mov	[ebp+var_4], eax
push	ebx
push	esi
mov	esi, [ebp+arg_0]
push	edi
push	[ebp+arg_8]
mov	edi, [ebp+arg_4]
lea	ecx, [ebp+var_24]
call	??0_LocaleUpdate@@QAE@PAUlocaleinfo_struct@@@Z ; _LocaleUpdate::_LocaleUpdate(localeinfo_struct	*)
lea	eax, [ebp+var_24]
push	eax
xor	ebx, ebx
push	ebx
push	ebx
push	ebx
push	ebx
push	edi
lea	eax, [ebp+var_28]
push	eax
lea	eax, [ebp+var_10]
push	eax
call	___strgtold12_l
mov	[ebp+var_14], eax
lea	eax, [ebp+var_10]
push	esi
push	eax
call	sub_7C330B
add	esp, 28h
test	byte ptr [ebp+var_14], 3
jnz	short loc_7C3D41
cmp	eax, 1
jnz	short loc_7C3D2C

loc_7C3D1B:
cmp	[ebp+var_18], bl
jz	short loc_7C3D27
mov	eax, [ebp+var_1C]
and	dword ptr [eax+70h], 0FFFFFFFDh

loc_7C3D27:
push	3

loc_7C3D29:
pop	eax
jmp	short loc_7C3D5B

loc_7C3D2C:
cmp	eax, 2
jnz	short loc_7C3D4D

loc_7C3D31:
cmp	[ebp+var_18], bl
jz	short loc_7C3D3D
mov	eax, [ebp+var_1C]
and	dword ptr [eax+70h], 0FFFFFFFDh

loc_7C3D3D:
push	4
jmp	short loc_7C3D29

loc_7C3D41:
test	byte ptr [ebp+var_14], 1
jnz	short loc_7C3D31
test	byte ptr [ebp+var_14], 2
jnz	short loc_7C3D1B

loc_7C3D4D:
cmp	[ebp+var_18], bl
jz	short loc_7C3D59
mov	eax, [ebp+var_1C]
and	dword ptr [eax+70h], 0FFFFFFFDh

loc_7C3D59:
xor	eax, eax

loc_7C3D5B:
mov	ecx, [ebp+var_4]
pop	edi
pop	esi
xor	ecx, ebp
pop	ebx
call	sub_7999A3
leave
retn
sub_7C3CC2 endp

; [0000013F BYTES: COLLAPSED FUNCTION __87except. PRESS	KEYPAD "+" TO EXPAND]
; [00000014 BYTES: COLLAPSED FUNCTION __frnd. PRESS KEYPAD "+" TO EXPAND]
; [00000087 BYTES: COLLAPSED FUNCTION __getenv_helper_nolock. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_7C3F44(char *Str)
sub_7C3F44 proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
Str= dword ptr	8

push	10h
push	offset unk_1625C38
call	__SEH_prolog4
xor	eax, eax
xor	esi, esi
cmp	[ebp+Str], esi
setnz	al
cmp	eax, esi
jnz	short loc_7C3F7A

loc_7C3F5E:
call	__errno
mov	dword ptr [eax], 16h
push	esi
push	esi
push	esi
push	esi
push	esi
call	__invalid_parameter
add	esp, 14h
xor	eax, eax
jmp	short loc_7C3FB8

loc_7C3F7A:
mov	edi, 7FFFh
push	edi		; MaxCount
push	[ebp+Str]	; Str
call	_strnlen
pop	ecx
pop	ecx
cmp	eax, edi
sbb	eax, eax
neg	eax
jz	short loc_7C3F5E
push	7
call	__lock
pop	ecx
mov	[ebp+ms_exc.disabled], esi
push	[ebp+Str]	; char *
call	__getenv_helper_nolock
pop	ecx
mov	[ebp+var_1C], eax
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7C3FBE
mov	eax, [ebp+var_1C]

loc_7C3FB8:
call	__SEH_epilog4
retn
sub_7C3F44 endp




sub_7C3FBE proc	near
push	7
call	__unlock
pop	ecx
retn
sub_7C3FBE endp

; [000000DD BYTES: COLLAPSED FUNCTION __dupenv_s. PRESS	KEYPAD "+" TO EXPAND]
; [00000009 BYTES: COLLAPSED FUNCTION $LN7_17. PRESS KEYPAD "+"	TO EXPAND]
; [00000720 BYTES: COLLAPSED FUNCTION __tsopen_nolock_0. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_7C47CD(LPCWSTR lpFileName, int, int, int, int, int)
sub_7C47CD proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
lpFileName= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	14h
push	offset unk_1625C78
call	__SEH_prolog4
xor	esi, esi
mov	[ebp+var_1C], esi
xor	eax, eax
mov	edi, [ebp+arg_10]
cmp	edi, esi
setnz	al
cmp	eax, esi
jnz	short loc_7C4807

loc_7C47EC:
call	__errno
push	16h
pop	edi
mov	[eax], edi
push	esi
push	esi
push	esi
push	esi
push	esi
call	__invalid_parameter
add	esp, 14h
mov	eax, edi
jmp	short loc_7C4860

loc_7C4807:
or	dword ptr [edi], 0FFFFFFFFh
xor	eax, eax
cmp	[ebp+lpFileName], esi
setnz	al
cmp	eax, esi
jz	short loc_7C47EC
cmp	[ebp+arg_14], esi
jz	short loc_7C482A
mov	eax, [ebp+arg_C]
and	eax, 0FFFFFE7Fh
neg	eax
sbb	eax, eax
inc	eax
jz	short loc_7C47EC

loc_7C482A:
mov	[ebp+ms_exc.disabled], esi
push	[ebp+arg_C]	; int
push	[ebp+arg_8]	; int
push	[ebp+arg_4]	; int
push	[ebp+lpFileName] ; lpFileName
lea	eax, [ebp+var_1C]
push	eax		; int
mov	eax, edi
call	__tsopen_nolock_0
add	esp, 14h
mov	[ebp+var_20], eax
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7C486B
mov	eax, [ebp+var_20]
cmp	eax, esi
jz	short loc_7C4860
or	dword ptr [edi], 0FFFFFFFFh

loc_7C4860:
call	__SEH_epilog4
retn
sub_7C47CD endp




sub_7C4866 proc	near
xor	esi, esi
mov	edi, [ebp+18h]
sub_7C4866 endp	; sp-analysis failed




sub_7C486B proc	near
cmp	[ebp-1Ch], esi
jz	short locret_7C4898
cmp	[ebp-20h], esi
jz	short loc_7C4890
mov	eax, [edi]
mov	ecx, eax
sar	ecx, 5
and	eax, 1Fh
shl	eax, 6
mov	ecx, dword_19736C0[ecx*4]
lea	eax, [ecx+eax+4]
and	byte ptr [eax],	0FEh

loc_7C4890:
push	dword ptr [edi]
call	__unlock_fhandle
pop	ecx

locret_7C4898:
retn
sub_7C486B endp



; Attributes: bp-based frame

; int __cdecl sub_7C4899(int, LPCWSTR lpFileName, int, int, int)
sub_7C4899 proc	near

arg_0= dword ptr  8
lpFileName= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

mov	edi, edi
push	ebp
mov	ebp, esp
push	1		; int
push	[ebp+arg_0]	; int
push	[ebp+arg_10]	; int
push	[ebp+arg_C]	; int
push	[ebp+arg_8]	; int
push	[ebp+lpFileName] ; lpFileName
call	sub_7C47CD
add	esp, 18h
pop	ebp
retn
sub_7C4899 endp

; [00000037 BYTES: COLLAPSED FUNCTION _wcsncmp.	PRESS KEYPAD "+" TO EXPAND]
; [000000C5 BYTES: COLLAPSED FUNCTION __putwch_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [0000014C BYTES: COLLAPSED FUNCTION __wgetdcwd_nolock. PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

; int __cdecl sub_7C4B01(LPWSTR	lpBuffer, size_t)
sub_7C4B01 proc	near

var_1C=	dword ptr -1Ch
ms_exc=	CPPEH_RECORD ptr -18h
lpBuffer= dword	ptr  8
arg_4= dword ptr  0Ch

push	0Ch
push	offset unk_1625C98
call	__SEH_prolog4
push	7
call	__lock
pop	ecx
and	[ebp+ms_exc.disabled], 0
push	[ebp+arg_4]	; size_t
push	[ebp+lpBuffer]	; lpBuffer
push	0		; RootPathName
call	__wgetdcwd_nolock
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	[ebp+ms_exc.disabled], 0FFFFFFFEh
call	sub_7C4B41
mov	eax, [ebp+var_1C]
call	__SEH_epilog4
retn
sub_7C4B01 endp




sub_7C4B41 proc	near
push	7
call	__unlock
pop	ecx
retn
sub_7C4B41 endp

; [000000BC BYTES: COLLAPSED FUNCTION __mbsrchr_l. PRESS KEYPAD	"+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION __mbsrchr. PRESS KEYPAD "+" TO EXPAND]
; [0000003E BYTES: COLLAPSED FUNCTION ___crtGetStringTypeW. PRESS KEYPAD "+" TO	EXPAND]
; [00000924 BYTES: COLLAPSED FUNCTION _$I10_OUTPUT. PRESS KEYPAD "+" TO	EXPAND]
; [000001B6 BYTES: COLLAPSED FUNCTION __chsize_nolock. PRESS KEYPAD "+"	TO EXPAND]
; [000000BC BYTES: COLLAPSED FUNCTION __setmode_nolock.	PRESS KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7C57F1 proc	near

arg_0= dword ptr  8

mov	edi, edi
push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
push	esi
xor	esi, esi
cmp	eax, esi
jnz	short loc_7C581D
call	__errno
push	esi
push	esi
push	esi
push	esi
push	esi
mov	dword ptr [eax], 16h
call	__invalid_parameter
add	esp, 14h
push	16h
pop	eax
jmp	short loc_7C5827

loc_7C581D:
mov	ecx, dword_1859028
mov	[eax], ecx
xor	eax, eax

loc_7C5827:
pop	esi
pop	ebp
retn
sub_7C57F1 endp

; [000000EE BYTES: COLLAPSED FUNCTION __mbsnbicoll_l. PRESS KEYPAD "+" TO EXPAND]
; [0000001A BYTES: COLLAPSED FUNCTION __mbsnbicoll. PRESS KEYPAD "+" TO	EXPAND]
; [00000097 BYTES: COLLAPSED FUNCTION ___wtomb_environ.	PRESS KEYPAD "+" TO EXPAND]
; [0000001D BYTES: COLLAPSED FUNCTION _strnlen.	PRESS KEYPAD "+" TO EXPAND]
; [0000001F BYTES: COLLAPSED FUNCTION ___initconout. PRESS KEYPAD "+" TO EXPAND]
; [0000002D BYTES: COLLAPSED FUNCTION ___termcon. PRESS	KEYPAD "+" TO EXPAND]
; [0000001E BYTES: COLLAPSED FUNCTION strncnt(char const *,int). PRESS KEYPAD "+" TO EXPAND]
; [00000370 BYTES: COLLAPSED FUNCTION __crtCompareStringA_stat(localeinfo_struct *,ulong,ulong,char const *,int,char const *,int,int). PRESS KEYPAD "+"	TO EXPAND]
; [00000042 BYTES: COLLAPSED FUNCTION ___crtCompareStringA. PRESS KEYPAD "+" TO	EXPAND]
; [000000FA BYTES: COLLAPSED FUNCTION __strnicoll_l. PRESS KEYPAD "+" TO EXPAND]
; [00000052 BYTES: COLLAPSED FUNCTION _findenv.	PRESS KEYPAD "+" TO EXPAND]
; [0000005A BYTES: COLLAPSED FUNCTION _copy_environ. PRESS KEYPAD "+" TO EXPAND]
; [0000024B BYTES: COLLAPSED FUNCTION ___crtsetenv. PRESS KEYPAD "+" TO	EXPAND]
; [00000055 BYTES: COLLAPSED FUNCTION __strdup.	PRESS KEYPAD "+" TO EXPAND]
; [000000BC BYTES: COLLAPSED FUNCTION __mbschr_l. PRESS	KEYPAD "+" TO EXPAND]
; [00000017 BYTES: COLLAPSED FUNCTION __mbschr.	PRESS KEYPAD "+" TO EXPAND]
align 4
; [00000006 BYTES: COLLAPSED FUNCTION D3DXGetVertexShaderProfile. PRESS	KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXGetPixelShaderProfile. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXSaveSurfaceToFileA. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXCreateBuffer.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXGetImageInfoFromFileInMemory.	PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXCreateTextureFromFileInMemory. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXCreateCubeTextureFromFileInMemory. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXCreateVolumeTextureFromFileInMemory. PRESS KEYPAD "+"	TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXAssembleShaderFromFileA. PRESS KEYPAD	"+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXAssembleShader. PRESS	KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXGetShaderConstantTable. PRESS	KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXCompileShaderFromFileA. PRESS	KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXCompileShader. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXMatrixTranspose. PRESS KEYPAD	"+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXMatrixInverse. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXMatrixMultiply. PRESS	KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXVec4Transform. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXVec4Hermite. PRESS KEYPAD "+"	TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXSaveSurfaceToFileW. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXSaveSurfaceToFileInMemory. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXCreateEffectCompilerFromFileW. PRESS KEYPAD "+" TO EXPAND]
; [00000006 BYTES: COLLAPSED FUNCTION D3DXVec3CatmullRom. PRESS	KEYPAD "+" TO EXPAND]


; Attributes: bp-based frame

sub_7C63A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [ecx], xmm0
mov	esp, ebp
pop	ebp
retn
sub_7C63A0 endp

align 10h


; Attributes: bp-based frame

sub_7C6530 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, [ebp+arg_4]
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
movss	xmm0, [ebp+arg_8]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
movss	xmm0, [ebp+arg_C]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [ecx], xmm0
mov	esp, ebp
pop	ebp
retn
sub_7C6530 endp

align 10h


; Attributes: bp-based frame

sub_7C66B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 4
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp+var_4]
add	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	esp, ebp
pop	ebp
retn
sub_7C66B0 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+8]
mov	[ebp-4], eax
mov	ecx, [ebp+0Ch]
mov	[ebp-8], ecx
mov	edx, [ebp-4]
mov	eax, [ebp-8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp-4]
add	ecx, 4
mov	[ebp-4], ecx
mov	edx, [ebp-8]
add	edx, 4
mov	[ebp-8], edx
mov	eax, [ebp-4]
mov	ecx, [ebp-8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp-4]
add	edx, 4
mov	[ebp-4], edx
mov	eax, [ebp-8]
add	eax, 4
mov	[ebp-8], eax
mov	ecx, [ebp-4]
mov	edx, [ebp-8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp-4]
add	eax, 4
mov	[ebp-4], eax
mov	ecx, [ebp-8]
add	ecx, 4
mov	[ebp-8], ecx
mov	edx, [ebp-4]
add	edx, 4
mov	[ebp-4], edx
mov	eax, [ebp-8]
add	eax, 4
mov	[ebp-8], eax
mov	ecx, [ebp-4]
mov	edx, [ebp-8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp-4]
add	eax, 4
mov	[ebp-4], eax
mov	ecx, [ebp-8]
add	ecx, 4
mov	[ebp-8], ecx
mov	edx, [ebp-4]
mov	eax, [ebp-8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp-4]
add	ecx, 4
mov	[ebp-4], ecx
mov	edx, [ebp-8]
add	edx, 4
mov	[ebp-8], edx
mov	eax, [ebp-4]
mov	ecx, [ebp-8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp-4]
add	edx, 4
mov	[ebp-4], edx
mov	eax, [ebp-8]
add	eax, 4
mov	[ebp-8], eax
mov	ecx, [ebp-4]
add	ecx, 4
mov	[ebp-4], ecx
mov	edx, [ebp-8]
add	edx, 4
mov	[ebp-8], edx
mov	eax, [ebp-4]
mov	ecx, [ebp-8]
fld	dword ptr [ecx]
fstp	dword ptr [eax]
mov	edx, [ebp-4]
add	edx, 4
mov	[ebp-4], edx
mov	eax, [ebp-8]
add	eax, 4
mov	[ebp-8], eax
mov	ecx, [ebp-4]
mov	edx, [ebp-8]
fld	dword ptr [edx]
fstp	dword ptr [ecx]
mov	eax, [ebp-4]
add	eax, 4
mov	[ebp-4], eax
mov	ecx, [ebp-8]
add	ecx, 4
mov	[ebp-8], ecx
mov	edx, [ebp-4]
mov	eax, [ebp-8]
fld	dword ptr [eax]
fstp	dword ptr [edx]
mov	ecx, [ebp-4]
add	ecx, 4
mov	[ebp-4], ecx
mov	edx, [ebp-8]
add	edx, 4
mov	[ebp-8], edx
mov	eax, [ebp-4]
add	eax, 4
mov	[ebp-4], eax
mov	ecx, [ebp-8]
add	ecx, 4
mov	[ebp-8], ecx
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7C69D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+10h]
faddp	st(1), st
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+20h]
faddp	st(1), st
fstp	[ebp+var_C]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+4]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+14h]
faddp	st(1), st
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+24h]
faddp	st(1), st
fstp	[ebp+var_8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+8]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+18h]
faddp	st(1), st
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+28h]
faddp	st(1), st
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+8]
mov	ecx, [ebp+arg_0]
movss	xmm0, [ebp+var_C]
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_8]
movss	dword ptr [edx+4], xmm0
mov	esp, ebp
pop	ebp
retn
sub_7C69D0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C6A80(int, int, float)
sub_7C6A80 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_14], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_10], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[edx+8]
movss	[ebp+var_C], xmm0
fld	[ebp+arg_8]
call	__CIcos
fstp	[ebp+var_18]
fld	[ebp+arg_8]
call	__CIsin
fstp	[ebp+var_1C]
fld	[ebp+var_14]
fmul	[ebp+var_14]
fld	[ebp+var_10]
fmul	[ebp+var_10]
faddp	st(1), st
fld	[ebp+var_C]
fmul	[ebp+var_C]
faddp	st(1), st
fstp	[ebp+var_30]
fld	[ebp+var_30]
push	ecx
fstp	[esp+34h+var_34]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_24]
fld	[ebp+var_14]
fmul	[ebp+var_24]
fstp	[ebp+var_14]
fld	[ebp+var_10]
fmul	[ebp+var_24]
fstp	[ebp+var_10]
fld	[ebp+var_C]
fmul	[ebp+var_24]
fstp	[ebp+var_C]
movss	xmm0, [ebp+var_14]
movss	[ebp+var_8], xmm0
movss	xmm0, [ebp+var_10]
movss	[ebp+var_4], xmm0
movss	xmm0, [ebp+var_C]
movss	[ebp+var_20], xmm0
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_8]
fmul	[ebp+var_8]
fadd	[ebp+var_18]
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_8]
fmul	[ebp+var_4]
fld	[ebp+var_1C]
fmul	[ebp+var_20]
faddp	st(1), st
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+10h]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_8]
fmul	[ebp+var_20]
fld	[ebp+var_1C]
fmul	[ebp+var_4]
fsubp	st(1), st
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+20h]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_8]
fmul	[ebp+var_4]
fld	[ebp+var_20]
fmul	[ebp+var_1C]
fsubp	st(1), st
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+4]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_4]
fmul	[ebp+var_4]
fadd	[ebp+var_18]
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+14h]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_4]
fmul	[ebp+var_20]
fld	[ebp+var_8]
fmul	[ebp+var_1C]
faddp	st(1), st
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+24h]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_8]
fmul	[ebp+var_20]
fld	[ebp+var_1C]
fmul	[ebp+var_4]
faddp	st(1), st
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+8]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_4]
fmul	[ebp+var_20]
fld	[ebp+var_1C]
fmul	[ebp+var_8]
fsubp	st(1), st
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+18h]
fld	[ebp+var_18]
fld1
fsubrp	st(1), st
fmul	[ebp+var_20]
fmul	[ebp+var_20]
fadd	[ebp+var_18]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+28h]
mov	esp, ebp
pop	ebp
retn
sub_7C6A80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C6C10(int, float, float, float)
sub_7C6C10 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
fld	[ebp+arg_4]
call	__CIcos
fstp	[ebp+var_C]
fld	[ebp+arg_4]
call	__CIsin
fstp	[ebp+var_14]
fld	[ebp+arg_8]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+arg_8]
call	__CIsin
fstp	[ebp+var_10]
fld	[ebp+arg_C]
call	__CIcos
fstp	[ebp+var_18]
fld	[ebp+arg_C]
call	__CIsin
fstp	[ebp+var_8]
fld	[ebp+var_4]
fmul	[ebp+var_18]
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax]
fld	[ebp+var_4]
fchs
fmul	[ebp+var_8]
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+4]
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_10]
movss	dword ptr [edx+8], xmm0
fld	[ebp+var_C]
fmul	[ebp+var_8]
fld	[ebp+var_14]
fmul	[ebp+var_10]
fmul	[ebp+var_18]
faddp	st(1), st
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+10h]
fld	[ebp+var_C]
fmul	[ebp+var_18]
fld	[ebp+var_14]
fmul	[ebp+var_10]
fmul	[ebp+var_8]
fsubp	st(1), st
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+14h]
fld	[ebp+var_14]
fchs
fmul	[ebp+var_4]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+18h]
fld	[ebp+var_14]
fmul	[ebp+var_8]
fld	[ebp+var_C]
fmul	[ebp+var_10]
fmul	[ebp+var_18]
fsubp	st(1), st
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+20h]
fld	[ebp+var_14]
fmul	[ebp+var_18]
fld	[ebp+var_C]
fmul	[ebp+var_10]
fmul	[ebp+var_8]
faddp	st(1), st
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+24h]
fld	[ebp+var_C]
fmul	[ebp+var_4]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+28h]
mov	esp, ebp
pop	ebp
retn
sub_7C6C10 endp

align 10h


; Attributes: bp-based frame

sub_7C6D00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+10h]
faddp	st(1), st
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+0Ch]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+30h]
faddp	st(1), st
fstp	[ebp+var_10]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+4]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+14h]
faddp	st(1), st
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+8]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+24h]
faddp	st(1), st
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+0Ch]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+34h]
faddp	st(1), st
fstp	[ebp+var_C]
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+18h]
faddp	st(1), st
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+8]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+28h]
faddp	st(1), st
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+0Ch]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+38h]
faddp	st(1), st
fstp	[ebp+var_8]
mov	eax, [ebp+arg_4]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+0Ch]
mov	edx, [ebp+arg_4]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+1Ch]
faddp	st(1), st
mov	ecx, [ebp+arg_4]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+2Ch]
faddp	st(1), st
mov	eax, [ebp+arg_4]
fld	dword ptr [eax+0Ch]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+3Ch]
faddp	st(1), st
fstp	[ebp+var_4]
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_10]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, [ebp+var_C]
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, [ebp+var_8]
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_4]
movss	dword ptr [edx+0Ch], xmm0
mov	esp, ebp
pop	ebp
retn
sub_7C6D00 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C6E20(int, float)
sub_7C6E20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_7CB690
add	esp, 8
cmp	[ebp+var_8], 0
jz	short loc_7C6E57
push	ecx
fld	[ebp+arg_4]
fstp	[esp+0Ch+var_C]
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7C6FB0
add	esp, 10h

loc_7C6E57:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+288h], 0
jz	short loc_7C6E7C
push	ecx
fld	[ebp+arg_4]
fstp	[esp+0Ch+var_C]
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+288h]
call	edx
add	esp, 8

loc_7C6E7C:
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_7CB690
add	esp, 8
cmp	[ebp+var_8], 0
jz	short loc_7C6E9E
mov	edx, [ebp+arg_0]
push	edx
call	sub_7C7430
add	esp, 4

loc_7C6E9E:
mov	esp, ebp
pop	ebp
retn
sub_7C6E20 endp

align 10h


; Attributes: bp-based frame

sub_7C6EB0 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+280h], 0
jz	short loc_7C6ED8
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+280h]
call	ecx
add	esp, 8

loc_7C6ED8:
mov	edx, [ebp+arg_4]
mov	eax, [edx+64h]
mov	[ebp+var_44], eax
cmp	[ebp+var_44], 0
jz	loc_7C6F74
mov	ecx, [ebp+var_44]
cmp	dword ptr [ecx+2A0h], 0
jz	short loc_7C6F3A
mov	edx, [ebp+var_44]
mov	eax, [edx+2A0h]
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_7C6F3A
mov	ecx, [ebp+var_48]
mov	edx, [ecx+0Ch]
cmp	dword ptr [edx+4], 0
jz	short loc_7C6F3A
mov	eax, [ebp+var_48]
mov	ecx, [eax+0Ch]
mov	edx, [ecx+4]
cmp	dword ptr [edx+28h], 1
jle	short loc_7C6F3A
push	ecx		; float
fld	ds:flt_15FD4F8
fstp	[esp+4Ch+var_4C]
mov	eax, [ebp+var_48]
push	eax		; int
call	sub_7CEF70
add	esp, 8

loc_7C6F3A:
mov	ecx, [ebp+arg_4]
push	ecx
fld	dword ptr [ecx+28h]
fstp	[esp+4Ch+var_4C]
mov	edx, [ebp+arg_4]
push	ecx
fld	dword ptr [edx+24h]
fstp	[esp+50h+var_50]
mov	eax, [ebp+arg_4]
push	ecx
fld	dword ptr [eax+20h]
fstp	[esp+54h+var_54]
lea	ecx, [ebp+var_40]
push	ecx
call	sub_7C6530
add	esp, 10h
lea	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_44]
push	eax
call	sub_7CE180
add	esp, 8

loc_7C6F74:
mov	esp, ebp
pop	ebp
retn
sub_7C6EB0 endp

align 10h


; Attributes: bp-based frame

sub_7C6F80 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+168h], 0
jz	short loc_7C6FA1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
push	edx
call	sub_7D0300
add	esp, 4

loc_7C6FA1:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+168h], 0
pop	ebp
retn
sub_7C6F80 endp



; Attributes: bp-based frame

sub_7C6FB0 proc	near

var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	byte ptr -50h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 6Ch
push	esi
push	edi
mov	[ebp+var_58], 0
mov	[ebp+var_54], 0
mov	[ebp+var_C], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
cmp	dword ptr [ecx+194h], 0
jnz	short loc_7C6FEB
jmp	loc_7C737B

loc_7C6FEB:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+198h]
mov	edx, [ecx+3Ch]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jnz	short loc_7C700B
jmp	loc_7C737B

loc_7C700B:
lea	eax, [ebp+var_50]
push	eax
call	sub_7C63A0
add	esp, 4
mov	[ebp+var_8], 0
jmp	short loc_7C7029

loc_7C7020:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_7C7029:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	loc_7C737B
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+eax*4]
mov	[ebp+var_54], edx
mov	eax, [ebp+var_54]
push	ecx
fld	dword ptr [eax+28h]
fstp	[esp+78h+var_78]
mov	ecx, [ebp+var_54]
push	ecx
fld	dword ptr [ecx+24h]
fstp	[esp+7Ch+var_7C]
mov	edx, [ebp+var_54]
push	ecx
fld	dword ptr [edx+20h]
fstp	[esp+80h+var_80]
lea	eax, [ebp+var_50]
push	eax
call	sub_7C6530
add	esp, 10h
mov	[ebp+var_68], 1A4h
mov	ecx, [ebp+var_10]
mov	edx, [ecx+168h]
mov	eax, [edx+124h]
shl	eax, 6
add	eax, [ebp+var_68]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+168h]
mov	eax, [edx+114h]
shl	eax, 5
add	eax, [ebp+var_68]
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+168h]
mov	eax, [edx+130h]
shl	eax, 6
add	eax, [ebp+var_68]
mov	[ebp+var_68], eax
push	0
push	0
mov	ecx, [ebp+var_68]
push	ecx
call	sub_7D0080
add	esp, 0Ch
mov	[ebp+var_64], eax
cmp	[ebp+var_64], 0
jnz	short loc_7C70D8
jmp	loc_7C737B

loc_7C70D8:
mov	[ebp+var_68], 0
mov	edx, [ebp+var_10]
mov	esi, [edx+168h]
mov	ecx, 69h
mov	edi, [ebp+var_64]
rep movsd
mov	eax, [ebp+var_64]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_68]
add	ecx, 1A4h
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+124h]
shl	ecx, 6
push	ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+12Ch]
push	ecx
mov	edx, [ebp+var_64]
add	edx, [ebp+var_68]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+var_64]
add	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	[ecx+12Ch], eax
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+124h]
shl	ecx, 6
add	ecx, [ebp+var_68]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_C]
mov	ecx, [eax+12Ch]
mov	[edx+128h], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+114h]
shl	ecx, 5
push	ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+118h]
push	ecx
mov	edx, [ebp+var_64]
add	edx, [ebp+var_68]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+var_64]
add	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	[ecx+118h], eax
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+114h]
shl	ecx, 5
add	ecx, [ebp+var_68]
mov	[ebp+var_68], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+130h]
shl	ecx, 6
push	ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+134h]
push	ecx
mov	edx, [ebp+var_64]
add	edx, [ebp+var_68]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+var_64]
add	eax, [ebp+var_68]
mov	ecx, [ebp+var_C]
mov	[ecx+134h], eax
mov	edx, [ebp+var_10]
mov	eax, [edx+168h]
mov	ecx, [eax+130h]
shl	ecx, 6
add	ecx, [ebp+var_68]
mov	[ebp+var_68], ecx
mov	[ebp+var_58], 0
mov	[ebp+var_4], 0
mov	[ebp+var_60], 0
mov	[ebp+var_5C], 0FFFFFFFFh
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+2B4h], 0
jz	short loc_7C728B
mov	eax, [ebp+arg_0]
mov	ecx, [eax+31Ch]
push	ecx
mov	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_50]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [edx+198h]
mov	ecx, [eax+3Ch]
push	ecx
lea	edx, [ebp+var_4]
push	edx
lea	eax, [ebp+var_60]
push	eax
lea	ecx, [ebp+var_58]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+2B4h]
call	eax
add	esp, 1Ch
mov	[ebp+var_5C], eax

loc_7C728B:
cmp	[ebp+var_5C], 0
jge	short loc_7C72A2
mov	ecx, [ebp+var_64]
push	ecx
call	sub_7D0300
add	esp, 4
jmp	loc_7C737B

loc_7C72A2:
cmp	[ebp+var_4], 0
jnz	short loc_7C72C5
mov	edx, [ebp+var_64]
push	edx
call	sub_7D0300
add	esp, 4
lea	eax, [ebp+var_58]
push	eax
call	sub_7CC3E0
add	esp, 4
jmp	loc_7C737B

loc_7C72C5:
mov	ecx, [ebp+var_58]
mov	edx, [ebp+arg_0]
mov	[ecx+2B0h], edx
mov	eax, [ebp+var_58]
mov	dword ptr [eax+2A0h], 0
cmp	[ebp+var_60], 0
jz	short loc_7C733C
mov	ecx, [ebp+var_60]
cmp	dword ptr [ecx+28h], 0
jz	short loc_7C733C
push	0
push	0
call	sub_7CFD90
push	eax
call	sub_7D0080
add	esp, 0Ch
mov	[ebp+var_6C], eax
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_6C]
push	eax
call	sub_7CFDB0
add	esp, 8
mov	ecx, [ebp+var_60]
push	ecx
mov	edx, [ebp+var_6C]
push	edx
call	sub_7CFBE0
add	esp, 8
push	1
mov	eax, [ebp+var_6C]
push	eax
call	sub_7CFC90
add	esp, 8
mov	ecx, [ebp+var_58]
mov	edx, [ebp+var_6C]
mov	[ecx+2A0h], edx

loc_7C733C:
mov	eax, [ebp+var_58]
mov	ecx, [eax+104h]
or	ecx, 20h
mov	edx, [ebp+var_58]
mov	[edx+104h], ecx
mov	eax, [ebp+var_54]
mov	ecx, [ebp+var_58]
mov	[eax+64h], ecx
mov	edx, [ebp+var_58]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	sub_7CC500
add	esp, 8
mov	ecx, [ebp+var_58]
push	ecx
call	sub_7CE020
add	esp, 4
jmp	loc_7C7020

loc_7C737B:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7C6FB0 endp

align 10h


; Attributes: bp-based frame

sub_7C7390 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
jmp	short loc_7C73AF

loc_7C73A6:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7C73AF:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7C742C
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+edx*4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx+64h]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jz	short loc_7C7427
mov	ecx, [ebp+var_10]
mov	edx, [ecx+168h]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_10]
cmp	dword ptr [eax+2A0h], 0
jz	short loc_7C7408
mov	ecx, [ebp+var_10]
mov	edx, [ecx+2A0h]
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 0
jz	short loc_7C7408
mov	eax, [ebp+var_14]
push	eax
call	sub_7D0300
add	esp, 4

loc_7C7408:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+104h]
or	edx, 18h
mov	eax, [ebp+var_10]
mov	[eax+104h], edx
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+64h], 0

loc_7C7427:
jmp	loc_7C73A6

loc_7C742C:
mov	esp, ebp
pop	ebp
retn
sub_7C7390 endp



; Attributes: bp-based frame

sub_7C7430 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_8]
push	eax
lea	ecx, [ebp+var_4]
push	ecx
call	sub_7CB690
add	esp, 4
fldz
fstp	[esp+0Ch+var_C]
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7C7390
add	esp, 10h
mov	esp, ebp
pop	ebp
retn
sub_7C7430 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C7470(int, float)
sub_7C7470 proc	near

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0ACh
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [ecx+88h]
mov	[eax+90h], ecx

loc_7C7497:
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [eax+90h]
mov	[ebp+var_48], ecx
cmp	[ebp+var_48], 0
jz	loc_7C7E6D
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [eax+90h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [ecx]
mov	[eax+90h], ecx
mov	edx, [ebp+var_48]
fld	dword ptr [edx+1Ch]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+50h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7C74E9
jmp	short loc_7C7497

loc_7C74E9:
mov	ecx, [ebp+var_48]
fld1
fld	dword ptr [ecx+3Ch]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C74FD
jmp	short loc_7C7497

loc_7C74FD:
mov	edx, [ebp+var_48]
add	edx, 20h
mov	[ebp+var_78], edx
movss	xmm0, ds:SrcStr
movss	[ebp+var_2C], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_28], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_24], xmm0
mov	[ebp+var_34], 0
jmp	short loc_7C753F

loc_7C7536:
mov	eax, [ebp+var_34]
add	eax, 1
mov	[ebp+var_34], eax

loc_7C753F:
cmp	[ebp+var_34], 8
jge	loc_7C7880
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [ebp+arg_0]
fldz
fld	dword ptr [edx+ecx+17Ch]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C7567
jmp	short loc_7C7536

loc_7C7567:
mov	eax, [ebp+var_48]
fld	dword ptr [eax+20h]
mov	ecx, [ebp+arg_0]
fsub	dword ptr [ecx+144h]
fstp	[ebp+var_64]
mov	edx, [ebp+var_48]
fld	dword ptr [edx+24h]
mov	eax, [ebp+arg_0]
fsub	dword ptr [eax+148h]
fstp	[ebp+var_60]
mov	ecx, [ebp+var_48]
fld	dword ptr [ecx+28h]
mov	edx, [ebp+arg_0]
fsub	dword ptr [edx+14Ch]
fstp	[ebp+var_5C]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+eax+170h]
fsub	[ebp+var_64]
fstp	[ebp+var_10]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+edx+174h]
fsub	[ebp+var_60]
fstp	[ebp+var_C]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+ecx+178h]
fsub	[ebp+var_5C]
fstp	[ebp+var_8]
fld	[ebp+var_10]
fmul	[ebp+var_10]
fld	[ebp+var_C]
fmul	[ebp+var_C]
faddp	st(1), st
fld	[ebp+var_8]
fmul	[ebp+var_8]
faddp	st(1), st
fstp	[ebp+var_90]
fld	[ebp+var_90]
push	ecx
fstp	[esp+0B0h+var_B0]
call	sub_45C9E0
add	esp, 4
fld1
fdivrp	st(1), st
fstp	[ebp+var_44]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [ebp+arg_0]
fld	[ebp+var_44]
fld	dword ptr [ecx+eax+180h]
fcomip	st, st(1)
fstp	st
jb	short loc_7C763C
fld	[ebp+var_44]
fmul	[ebp+var_44]
fld1
fdivrp	st(1), st
fstp	[ebp+var_7C]
jmp	short loc_7C7649

loc_7C763C:
movss	xmm0, ds:SrcStr
movss	[ebp+var_7C], xmm0

loc_7C7649:
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ebp+arg_0]
fld1
fld	dword ptr [eax+edx+184h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C76B5
fld	[ebp+var_10]
fmul	[ebp+var_7C]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+ecx+17Ch]
fstp	[ebp+var_10]
fld	[ebp+var_C]
fmul	[ebp+var_7C]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+eax+17Ch]
fstp	[ebp+var_C]
fld	[ebp+var_8]
fmul	[ebp+var_7C]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+edx+17Ch]
fstp	[ebp+var_8]
jmp	loc_7C7860

loc_7C76B5:
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [ebp+arg_0]
fldz
fld	dword ptr [edx+ecx+184h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C7727
fld	[ebp+var_7C]
fchs
fmul	[ebp+var_10]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+eax+17Ch]
fstp	[ebp+var_10]
fld	[ebp+var_7C]
fchs
fmul	[ebp+var_C]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+edx+17Ch]
fstp	[ebp+var_C]
fld	[ebp+var_7C]
fchs
fmul	[ebp+var_8]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+ecx+17Ch]
fstp	[ebp+var_8]
jmp	loc_7C7860

loc_7C7727:
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [ebp+arg_0]
fld	ds:dbl_15FCD70
fld	dword ptr [ecx+eax+184h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	loc_7C7860
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ebp+arg_0]
fld	[ebp+var_44]
fld	dword ptr [eax+edx+180h]
fcomip	st, st(1)
fstp	st
jb	loc_7C7839
call	ds:off_15FDCC8
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_94], edx
fild	[ebp+var_94]
fmul	ds:dbl_15FCD70
fmul	ds:dbl_15FCCB0
fadd	ds:dbl_15FCD60
fstp	[ebp+var_10]
call	ds:off_15FDCC8
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_98], edx
fild	[ebp+var_98]
fmul	ds:dbl_15FCD70
fmul	ds:dbl_15FCCB0
fadd	ds:dbl_15FCD60
fstp	[ebp+var_C]
call	ds:off_15FDCC8
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_9C], edx
fild	[ebp+var_9C]
fmul	ds:dbl_15FCD70
fmul	ds:dbl_15FCCB0
fadd	ds:dbl_15FCD60
fstp	[ebp+var_8]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+edx+17Ch]
fmul	[ebp+var_10]
fstp	[ebp+var_10]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+ecx+17Ch]
fmul	[ebp+var_C]
fstp	[ebp+var_C]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+eax+17Ch]
fmul	[ebp+var_8]
fstp	[ebp+var_8]
jmp	short loc_7C7860

loc_7C7839:
movss	xmm0, ds:SrcStr
movss	[ebp+var_10], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_C], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_8], xmm0

loc_7C7860:
fld	[ebp+var_2C]
fadd	[ebp+var_10]
fstp	[ebp+var_2C]
fld	[ebp+var_28]
fadd	[ebp+var_C]
fstp	[ebp+var_28]
fld	[ebp+var_24]
fadd	[ebp+var_8]
fstp	[ebp+var_24]
jmp	loc_7C7536

loc_7C7880:
mov	[ebp+var_34], 0
jmp	short loc_7C7892

loc_7C7889:
mov	edx, [ebp+var_34]
add	edx, 1
mov	[ebp+var_34], edx

loc_7C7892:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_34]
cmp	edx, [ecx+114h]
jge	loc_7C7C82
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ecx+118h]
fldz
fld	dword ptr [eax+edx+0Ch]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C78D1
jmp	short loc_7C7889

loc_7C78D1:
mov	ecx, [ebp+var_48]
fld	dword ptr [ecx+20h]
mov	edx, [ebp+arg_0]
fsub	dword ptr [edx+144h]
fstp	[ebp+var_64]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+24h]
mov	ecx, [ebp+arg_0]
fsub	dword ptr [ecx+148h]
fstp	[ebp+var_60]
mov	edx, [ebp+var_48]
fld	dword ptr [edx+28h]
mov	eax, [ebp+arg_0]
fsub	dword ptr [eax+14Ch]
fstp	[ebp+var_5C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [edx+118h]
fld	dword ptr [ecx+eax]
fsub	[ebp+var_64]
fstp	[ebp+var_10]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [eax+118h]
fld	dword ptr [edx+ecx+4]
fsub	[ebp+var_60]
fstp	[ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ecx+118h]
fld	dword ptr [eax+edx+8]
fsub	[ebp+var_5C]
fstp	[ebp+var_8]
fld	[ebp+var_10]
fmul	[ebp+var_10]
fld	[ebp+var_C]
fmul	[ebp+var_C]
faddp	st(1), st
fld	[ebp+var_8]
fmul	[ebp+var_8]
faddp	st(1), st
fstp	[ebp+var_A0]
fld	[ebp+var_A0]
push	ecx
fstp	[esp+0B0h+var_B0]
call	sub_45C9E0
add	esp, 4
fld1
fdivrp	st(1), st
fstp	[ebp+var_44]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [edx+118h]
fld	[ebp+var_44]
fld	dword ptr [ecx+eax+10h]
fcomip	st, st(1)
fstp	st
jb	short loc_7C79C9
fld	[ebp+var_44]
fmul	[ebp+var_44]
fld1
fdivrp	st(1), st
fstp	[ebp+var_7C]
jmp	short loc_7C79D6

loc_7C79C9:
movss	xmm0, ds:SrcStr
movss	[ebp+var_7C], xmm0

loc_7C79D6:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [eax+118h]
fld1
fld	dword ptr [edx+ecx+14h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C7A66
fld	[ebp+var_10]
fmul	[ebp+var_7C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ecx+118h]
fmul	dword ptr [eax+edx+0Ch]
fstp	[ebp+var_10]
fld	[ebp+var_C]
fmul	[ebp+var_7C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [edx+118h]
fmul	dword ptr [ecx+eax+0Ch]
fstp	[ebp+var_C]
fld	[ebp+var_8]
fmul	[ebp+var_7C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [eax+118h]
fmul	dword ptr [edx+ecx+0Ch]
fstp	[ebp+var_8]
jmp	loc_7C7C62

loc_7C7A66:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ecx+118h]
fldz
fld	dword ptr [eax+edx+14h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C7AFC
fld	[ebp+var_7C]
fchs
fmul	[ebp+var_10]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [edx+118h]
fmul	dword ptr [ecx+eax+0Ch]
fstp	[ebp+var_10]
fld	[ebp+var_7C]
fchs
fmul	[ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [eax+118h]
fmul	dword ptr [edx+ecx+0Ch]
fstp	[ebp+var_C]
fld	[ebp+var_7C]
fchs
fmul	[ebp+var_8]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ecx+118h]
fmul	dword ptr [eax+edx+0Ch]
fstp	[ebp+var_8]
jmp	loc_7C7C62

loc_7C7AFC:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [edx+118h]
fld	ds:dbl_15FCD70
fld	dword ptr [ecx+eax+14h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	loc_7C7C62
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [eax+118h]
fld	[ebp+var_44]
fld	dword ptr [edx+ecx+10h]
fcomip	st, st(1)
fstp	st
jb	loc_7C7C3B
call	ds:off_15FDCC8
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_A4], edx
fild	[ebp+var_A4]
fmul	ds:dbl_15FCD70
fmul	ds:dbl_15FCCB0
fadd	ds:dbl_15FCD60
fstp	[ebp+var_10]
call	ds:off_15FDCC8
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_A8], edx
fild	[ebp+var_A8]
fmul	ds:dbl_15FCD70
fmul	ds:dbl_15FCCB0
fadd	ds:dbl_15FCD60
fstp	[ebp+var_C]
call	ds:off_15FDCC8
cdq
mov	ecx, 64h
idiv	ecx
mov	[ebp+var_AC], edx
fild	[ebp+var_AC]
fmul	ds:dbl_15FCD70
fmul	ds:dbl_15FCCB0
fadd	ds:dbl_15FCD60
fstp	[ebp+var_8]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_34]
shl	ecx, 5
mov	edx, [eax+118h]
fld	dword ptr [edx+ecx+0Ch]
fmul	[ebp+var_10]
fstp	[ebp+var_10]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_34]
shl	edx, 5
mov	eax, [ecx+118h]
fld	dword ptr [eax+edx+0Ch]
fmul	[ebp+var_C]
fstp	[ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_34]
shl	eax, 5
mov	ecx, [edx+118h]
fld	dword ptr [ecx+eax+0Ch]
fmul	[ebp+var_8]
fstp	[ebp+var_8]
jmp	short loc_7C7C62

loc_7C7C3B:
movss	xmm0, ds:SrcStr
movss	[ebp+var_10], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_C], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_8], xmm0

loc_7C7C62:
fld	[ebp+var_2C]
fadd	[ebp+var_10]
fstp	[ebp+var_2C]
fld	[ebp+var_28]
fadd	[ebp+var_C]
fstp	[ebp+var_28]
fld	[ebp+var_24]
fadd	[ebp+var_8]
fstp	[ebp+var_24]
jmp	loc_7C7889

loc_7C7C82:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	dword ptr [eax+0D0h]
fmul	[ebp+arg_4]
fstp	[ebp+var_30]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+154h]
fmul	[ebp+var_30]
fstp	[ebp+var_40]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+158h]
fmul	[ebp+var_30]
fstp	[ebp+var_3C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+15Ch]
fmul	[ebp+var_30]
fstp	[ebp+var_38]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+30h]
fmul	dword ptr [edx+84h]
fstp	[ebp+var_1C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+34h]
fmul	dword ptr [edx+84h]
fstp	[ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+38h]
fmul	dword ptr [edx+84h]
fstp	[ebp+var_14]
fld	[ebp+var_2C]
fadd	[ebp+var_1C]
fstp	[ebp+var_2C]
fld	[ebp+var_28]
fadd	[ebp+var_18]
fstp	[ebp+var_28]
fld	[ebp+var_24]
fadd	[ebp+var_14]
fstp	[ebp+var_24]
fld	[ebp+var_2C]
fmul	[ebp+arg_4]
fstp	[ebp+var_2C]
fld	[ebp+var_28]
fmul	[ebp+arg_4]
fstp	[ebp+var_28]
fld	[ebp+var_24]
fmul	[ebp+arg_4]
fstp	[ebp+var_24]
mov	ecx, [ebp+var_48]
fld	dword ptr [ecx+30h]
fadd	[ebp+var_2C]
mov	edx, [ebp+var_48]
fstp	dword ptr [edx+30h]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+34h]
fadd	[ebp+var_28]
mov	ecx, [ebp+var_48]
fstp	dword ptr [ecx+34h]
mov	edx, [ebp+var_48]
fld	dword ptr [edx+38h]
fadd	[ebp+var_24]
mov	eax, [ebp+var_48]
fstp	dword ptr [eax+38h]
mov	ecx, [ebp+var_48]
fld	dword ptr [ecx+30h]
fmul	[ebp+arg_4]
fstp	[ebp+var_54]
mov	edx, [ebp+var_48]
fld	dword ptr [edx+34h]
fmul	[ebp+arg_4]
fstp	[ebp+var_50]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+38h]
fmul	[ebp+arg_4]
fstp	[ebp+var_4C]
mov	ecx, [ebp+var_48]
fld	dword ptr [ecx+30h]
fadd	[ebp+var_40]
mov	edx, [ebp+var_48]
fstp	dword ptr [edx+30h]
mov	eax, [ebp+var_48]
fld	dword ptr [eax+34h]
fadd	[ebp+var_3C]
mov	ecx, [ebp+var_48]
fstp	dword ptr [ecx+34h]
mov	edx, [ebp+var_48]
fld	dword ptr [edx+38h]
fadd	[ebp+var_38]
mov	eax, [ebp+var_48]
fstp	dword ptr [eax+38h]
mov	ecx, [ebp+var_78]
fld	dword ptr [ecx]
fadd	[ebp+var_54]
mov	edx, [ebp+var_78]
fstp	dword ptr [edx]
mov	eax, [ebp+var_78]
fld	dword ptr [eax+4]
fadd	[ebp+var_50]
mov	ecx, [ebp+var_78]
fstp	dword ptr [ecx+4]
mov	edx, [ebp+var_78]
fld	dword ptr [edx+8]
fadd	[ebp+var_4C]
mov	eax, [ebp+var_78]
fstp	dword ptr [eax+8]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [edx+68h]
and	eax, 20000h
jz	short loc_7C7E68
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+144h]
mov	edx, [ebp+arg_0]
fsub	dword ptr [edx+2F4h]
fstp	[ebp+var_74]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+148h]
mov	ecx, [ebp+arg_0]
fsub	dword ptr [ecx+2F8h]
fstp	[ebp+var_70]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+14Ch]
mov	eax, [ebp+arg_0]
fsub	dword ptr [eax+2FCh]
fstp	[ebp+var_6C]
mov	ecx, [ebp+var_78]
fld	dword ptr [ecx]
fadd	[ebp+var_74]
mov	edx, [ebp+var_78]
fstp	dword ptr [edx]
mov	eax, [ebp+var_78]
fld	dword ptr [eax+4]
fadd	[ebp+var_70]
mov	ecx, [ebp+var_78]
fstp	dword ptr [ecx+4]
mov	edx, [ebp+var_78]
fld	dword ptr [edx+8]
fadd	[ebp+var_6C]
mov	eax, [ebp+var_78]
fstp	dword ptr [eax+8]

loc_7C7E68:
jmp	loc_7C7497

loc_7C7E6D:
mov	esp, ebp
pop	ebp
retn
sub_7C7470 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C7E80(int, float)
sub_7C7E80 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 200h
jz	short loc_7C7EAD
push	ecx		; float
fld	[ebp+arg_4]
fstp	[esp+0Ch+var_C]
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_7C8900
add	esp, 8

loc_7C7EAD:		; float
push	ecx
fld	[ebp+arg_4]
fstp	[esp+0Ch+var_C]
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_7CD490
add	esp, 8
lea	edx, [ebp+var_8]
push	edx
lea	eax, [ebp+var_4]
push	eax
call	sub_7CB690
add	esp, 8
mov	esp, ebp
pop	ebp
retn
sub_7C7E80 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C7EE0(int, float)
sub_7C7EE0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7CD410
add	esp, 4

loc_7C7EF0:
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7CD470
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7C7F07
jmp	short loc_7C7F42

loc_7C7F07:
mov	edx, [ebp+arg_0]
push	edx
call	sub_7CD440
add	esp, 4
mov	eax, [ebp+var_4]
fld	dword ptr [eax+1Ch]
mov	ecx, [ebp+var_4]
fld	dword ptr [ecx+50h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7C7F29
jmp	short loc_7C7EF0

loc_7C7F29:		; float
push	ecx
fld	[ebp+arg_4]
fstp	[esp+8+var_8]
mov	edx, [ebp+arg_0]
push	edx		; int
mov	eax, [ebp+var_4]
push	eax		; int
call	sub_7C8E50
add	esp, 0Ch
jmp	short loc_7C7EF0

loc_7C7F42:
mov	esp, ebp
pop	ebp
retn
sub_7C7EE0 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 4Ch
push	esi
movss	xmm0, ds:SrcStr
movss	dword ptr [ebp-2Ch], xmm0
mov	eax, [ebp+8]
mov	ecx, [eax+17Ch]
mov	[ebp-20h], ecx
push	0
push	0
mov	edx, [ebp-20h]
mov	eax, [edx]
imul	eax, 0Ch
push	eax
call	sub_7D0080
add	esp, 0Ch
mov	ecx, [ebp-20h]
mov	[ecx+8], eax
push	0
push	0
mov	edx, [ebp-20h]
mov	eax, [edx]
imul	eax, 0Ch
push	eax
call	sub_7D0080
add	esp, 0Ch
mov	ecx, [ebp-20h]
mov	[ecx+0Ch], eax
mov	edx, [ebp-20h]
mov	eax, [edx]
mov	[ebp-34h], eax
mov	ecx, [ebp+8]
mov	edx, [ecx+174h]
sub	edx, 1
mov	[ebp-3Ch], edx
mov	eax, [ebp+8]
mov	ecx, [eax+178h]
movss	xmm0, dword ptr	[ecx]
mov	edx, [ebp-20h]
mov	eax, [edx+8]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+8]
mov	edx, [ecx+178h]
movss	xmm0, dword ptr	[edx+4]
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+8]
mov	eax, [edx+178h]
movss	xmm0, dword ptr	[eax+8]
mov	ecx, [ebp-20h]
mov	edx, [ecx+8]
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp-20h]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+4], xmm0
mov	dword ptr [ebp-24h], 1
jmp	short loc_7C8028

loc_7C801F:
mov	ecx, [ebp-24h]
add	ecx, 1
mov	[ebp-24h], ecx

loc_7C8028:
mov	edx, [ebp-24h]
cmp	edx, [ebp-34h]
jge	loc_7C82C7
movss	xmm0, ds:SrcStr
movss	dword ptr [ebp-18h], xmm0
movss	xmm0, ds:SrcStr
movss	dword ptr [ebp-14h], xmm0
movss	xmm0, ds:SrcStr
movss	dword ptr [ebp-10h], xmm0
fild	dword ptr [ebp-24h]
fidiv	dword ptr [ebp-34h]
fstp	dword ptr [ebp-2Ch]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [ebp-1Ch], xmm0
fld	dword ptr [ebp-2Ch]
fld1
fsubrp	st(1), st
fild	dword ptr [ebp-3Ch]
call	__CIpow
fstp	dword ptr [ebp-30h]
mov	dword ptr [ebp-48h], 0
jmp	short loc_7C8095

loc_7C808C:
mov	eax, [ebp-48h]
add	eax, 1
mov	[ebp-48h], eax

loc_7C8095:
mov	ecx, [ebp-48h]
cmp	ecx, [ebp-3Ch]
jg	loc_7C8195
mov	edx, [ebp-3Ch]
mov	[ebp-38h], edx
mov	eax, [ebp-48h]
mov	[ebp-28h], eax
mov	ecx, [ebp-3Ch]
sub	ecx, [ebp-48h]
mov	[ebp-44h], ecx
fld	dword ptr [ebp-1Ch]
fmul	dword ptr [ebp-30h]
fstp	dword ptr [ebp-40h]
fld	dword ptr [ebp-1Ch]
fmul	dword ptr [ebp-2Ch]
fstp	dword ptr [ebp-1Ch]
fld	dword ptr [ebp-2Ch]
fld1
fsubrp	st(1), st
fdivr	dword ptr [ebp-30h]
fstp	dword ptr [ebp-30h]

loc_7C80D5:
cmp	dword ptr [ebp-38h], 1
jl	short loc_7C811F
fild	dword ptr [ebp-38h]
fmul	dword ptr [ebp-40h]
fstp	dword ptr [ebp-40h]
mov	edx, [ebp-38h]
sub	edx, 1
mov	[ebp-38h], edx
cmp	dword ptr [ebp-28h], 1
jle	short loc_7C8105
fild	dword ptr [ebp-28h]
fdivr	dword ptr [ebp-40h]
fstp	dword ptr [ebp-40h]
mov	eax, [ebp-28h]
sub	eax, 1
mov	[ebp-28h], eax

loc_7C8105:
cmp	dword ptr [ebp-44h], 1
jle	short loc_7C811D
fild	dword ptr [ebp-44h]
fdivr	dword ptr [ebp-40h]
fstp	dword ptr [ebp-40h]
mov	ecx, [ebp-44h]
sub	ecx, 1
mov	[ebp-44h], ecx

loc_7C811D:
jmp	short loc_7C80D5

loc_7C811F:
mov	edx, [ebp-48h]
imul	edx, 0Ch
mov	eax, [ebp+8]
mov	ecx, [eax+178h]
movss	xmm0, dword ptr	[edx+ecx]
movss	dword ptr [ebp-0Ch], xmm0
mov	edx, [ebp-48h]
imul	edx, 0Ch
mov	eax, [ebp+8]
mov	ecx, [eax+178h]
movss	xmm0, dword ptr	[ecx+edx+4]
movss	dword ptr [ebp-8], xmm0
mov	edx, [ebp-48h]
imul	edx, 0Ch
mov	eax, [ebp+8]
mov	ecx, [eax+178h]
movss	xmm0, dword ptr	[ecx+edx+8]
movss	dword ptr [ebp-4], xmm0
fld	dword ptr [ebp-0Ch]
fmul	dword ptr [ebp-40h]
fadd	dword ptr [ebp-18h]
fstp	dword ptr [ebp-18h]
fld	dword ptr [ebp-8]
fmul	dword ptr [ebp-40h]
fadd	dword ptr [ebp-14h]
fstp	dword ptr [ebp-14h]
fld	dword ptr [ebp-4]
fmul	dword ptr [ebp-40h]
fadd	dword ptr [ebp-10h]
fstp	dword ptr [ebp-10h]
jmp	loc_7C808C

loc_7C8195:
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
movss	xmm0, dword ptr	[ebp-18h]
movss	dword ptr [edx+ecx], xmm0
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
movss	xmm0, dword ptr	[ebp-14h]
movss	dword ptr [ecx+edx+4], xmm0
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
movss	xmm0, dword ptr	[ebp-10h]
movss	dword ptr [ecx+edx+8], xmm0
mov	edx, [ebp-24h]
sub	edx, 1
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
fld	dword ptr [ebp-18h]
fsub	dword ptr [ecx+edx]
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+0Ch]
fstp	dword ptr [edx+ecx]
mov	edx, [ebp-24h]
sub	edx, 1
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
fld	dword ptr [ebp-14h]
fsub	dword ptr [ecx+edx+4]
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+0Ch]
fstp	dword ptr [ecx+edx+4]
mov	edx, [ebp-24h]
sub	edx, 1
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+8]
fld	dword ptr [ebp-10h]
fsub	dword ptr [ecx+edx+8]
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+0Ch]
fstp	dword ptr [ecx+edx+8]
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	eax, [ebp-20h]
mov	ecx, [eax+0Ch]
mov	eax, [ebp-24h]
imul	eax, 0Ch
mov	esi, [ebp-20h]
mov	esi, [esi+0Ch]
fld	dword ptr [ecx+edx]
fmul	dword ptr [esi+eax]
mov	ecx, [ebp-24h]
imul	ecx, 0Ch
mov	edx, [ebp-20h]
mov	eax, [edx+0Ch]
mov	edx, [ebp-24h]
imul	edx, 0Ch
mov	esi, [ebp-20h]
mov	esi, [esi+0Ch]
fld	dword ptr [eax+ecx+4]
fmul	dword ptr [esi+edx+4]
faddp	st(1), st
mov	eax, [ebp-24h]
imul	eax, 0Ch
mov	ecx, [ebp-20h]
mov	edx, [ecx+0Ch]
mov	ecx, [ebp-24h]
imul	ecx, 0Ch
mov	esi, [ebp-20h]
mov	esi, [esi+0Ch]
fld	dword ptr [edx+eax+8]
fmul	dword ptr [esi+ecx+8]
faddp	st(1), st
call	__CIsqrt
fstp	dword ptr [ebp-4Ch]
fld	dword ptr [ebp-4Ch]
mov	edx, [ebp-20h]
fadd	dword ptr [edx+4]
mov	eax, [ebp-20h]
fstp	dword ptr [eax+4]
jmp	loc_7C801F

loc_7C82C7:
pop	esi
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
mov	ecx, [eax+17Ch]
mov	[ebp-4], ecx
mov	edx, [ebp-4]
mov	eax, [edx+8]
add	eax, [ebp+8]
mov	ecx, [ebp-4]
mov	[ecx+8], eax
mov	edx, [ebp-4]
mov	eax, [edx+0Ch]
add	eax, [ebp+8]
mov	ecx, [ebp-4]
mov	[ecx+0Ch], eax
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7C8310 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+17Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[ecx+8], eax
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[ecx+0Ch], eax
mov	esp, ebp
pop	ebp
retn
sub_7C8310 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C8350(float,	int, int)
sub_7C8350 proc	near

var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E0=	qword ptr -0E0h
var_D8=	qword ptr -0D8h
var_D0=	qword ptr -0D0h
var_C8=	qword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	qword ptr -0B8h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0E0h
push	esi
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
cmp	dword ptr [ecx+170h], 0
jnz	short loc_7C83CF
mov	edx, [ebp+arg_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+8], xmm0
jmp	loc_7C88F4

loc_7C83CF:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+170h]
and	ecx, 1
jz	loc_7C877B
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+17Ch]
mov	[ebp+var_20], ecx
call	sub_7CA890
mov	ecx, [ebp+var_20]
xor	edx, edx
div	dword ptr [ecx]
mov	[ebp+var_4], edx
push	ecx		; float
fld1
fstp	[esp+0E8h+var_E8]
call	sub_7CA8B0
add	esp, 4
fstp	[ebp+var_54]
push	ecx		; float
fld	ds:flt_15FD368
fstp	[esp+0E8h+var_E8]
call	sub_7CA8B0
add	esp, 4
fstp	[ebp+var_28]
movss	xmm0, ds:flt_15AA9FC
movss	[ebp+var_A4], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_A0], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_9C], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_50], xmm0
movss	xmm0, ds:flt_15AA9FC
movss	[ebp+var_4C], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_48], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_10], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_C], xmm0
movss	xmm0, ds:flt_15AA9FC
movss	[ebp+var_8], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_34], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_30], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_2C], xmm0
mov	edx, [ebp+arg_0]
mov	esi, [edx+168h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	dword ptr [ecx+18Ch]
fsub	dword ptr [eax+188h]
push	ecx		; float
fld1
fstp	[esp+0E8h+var_E8]
fstp	[ebp+var_B8]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_B8]
fadd	dword ptr [esi+188h]
fstp	[ebp+var_24]
fld	[ebp+var_24]
fmul	ds:dbl_15FCBF8
call	__ftol2_sse
and	eax, 80000001h
jns	short loc_7C8537
dec	eax
or	eax, 0FFFFFFFEh
inc	eax

loc_7C8537:
test	eax, eax
jnz	short loc_7C8547
fld	[ebp+var_24]
fmul	ds:dbl_15FCD60
fstp	[ebp+var_24]

loc_7C8547:
fld	[ebp+var_28]
call	__CIsin
fstp	[ebp+var_BC]
fld	[ebp+var_BC]
fmul	[ebp+var_24]
fstp	[ebp+var_44]
movss	xmm0, ds:SrcStr
movss	[ebp+var_40], xmm0
fld	[ebp+var_28]
call	__CIcos
fstp	[ebp+var_C0]
fld	[ebp+var_C0]
fmul	[ebp+var_24]
fstp	[ebp+var_3C]
movss	xmm0, ds:SrcStr
movss	[ebp+var_38], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_20]
mov	eax, [edx+0Ch]
movss	xmm0, dword ptr	[eax+ecx]
movss	[ebp+var_1C], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_20]
mov	eax, [edx+0Ch]
movss	xmm0, dword ptr	[eax+ecx+4]
movss	[ebp+var_18], xmm0
mov	ecx, [ebp+var_4]
add	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_20]
mov	eax, [edx+0Ch]
movss	xmm0, dword ptr	[eax+ecx+8]
movss	[ebp+var_14], xmm0
fld	[ebp+var_1C]
fmul	[ebp+var_A4]
fld	[ebp+var_18]
fmul	[ebp+var_A0]
faddp	st(1), st
fld	[ebp+var_14]
fmul	[ebp+var_9C]
faddp	st(1), st
fstp	[ebp+var_34]
fld	[ebp+var_1C]
fmul	[ebp+var_50]
fld	[ebp+var_18]
fmul	[ebp+var_4C]
faddp	st(1), st
fld	[ebp+var_14]
fmul	[ebp+var_48]
faddp	st(1), st
fstp	[ebp+var_30]
fld	[ebp+var_1C]
fmul	[ebp+var_10]
fld	[ebp+var_18]
fmul	[ebp+var_C]
faddp	st(1), st
fld	[ebp+var_14]
fmul	[ebp+var_8]
faddp	st(1), st
fstp	[ebp+var_2C]
push	ecx		; float
fld	[ebp+var_34]
fstp	[esp+0E8h+var_E8]
push	ecx		; float
fld	[ebp+var_2C]
fstp	[esp+0ECh+var_EC]
push	ecx		; float
fld	[ebp+var_30]
fstp	[esp+0F0h+var_F0]
lea	ecx, [ebp+var_98]
push	ecx		; int
call	sub_7C6C10
add	esp, 10h
lea	edx, [ebp+var_98]
push	edx
lea	eax, [ebp+var_44]
push	eax
lea	ecx, [ebp+var_44]
push	ecx
call	sub_7C69D0
add	esp, 0Ch
mov	edx, [ebp+var_4]
imul	edx, 0Ch
mov	eax, [ebp+var_20]
mov	ecx, [eax+8]
fld	[ebp+var_44]
fadd	dword ptr [ecx+edx]
mov	edx, [ebp+var_4]
add	edx, 1
imul	edx, 0Ch
mov	eax, [ebp+var_20]
mov	ecx, [eax+0Ch]
fld	dword ptr [ecx+edx]
fmul	[ebp+var_54]
faddp	st(1), st
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx]
mov	eax, [ebp+var_4]
imul	eax, 0Ch
mov	ecx, [ebp+var_20]
mov	edx, [ecx+8]
fld	[ebp+var_40]
fadd	dword ptr [edx+eax+4]
mov	eax, [ebp+var_4]
add	eax, 1
imul	eax, 0Ch
mov	ecx, [ebp+var_20]
mov	edx, [ecx+0Ch]
fld	dword ptr [edx+eax+4]
fmul	[ebp+var_54]
faddp	st(1), st
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+var_4]
imul	ecx, 0Ch
mov	edx, [ebp+var_20]
mov	eax, [edx+8]
fld	[ebp+var_3C]
fadd	dword ptr [eax+ecx+8]
mov	ecx, [ebp+var_4]
add	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_20]
mov	eax, [edx+0Ch]
fld	dword ptr [eax+ecx+8]
fmul	[ebp+var_54]
faddp	st(1), st
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+60h]
fmul	ds:dbl_15FCCA8
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [eax+64h]
fsub	dword ptr [edx+60h]
push	ecx		; float
fld1
fstp	[esp+0E8h+var_E8]
fstp	[ebp+var_C8]
fstp	[ebp+var_D0]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_C8]
fadd	[ebp+var_D0]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+8], xmm0
jmp	loc_7C88F4

loc_7C877B:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+170h]
and	ecx, 2
jz	loc_7C88F4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+17Ch]
mov	[ebp+var_AC], ecx
call	sub_7CA890
mov	ecx, [ebp+var_AC]
xor	edx, edx
div	dword ptr [ecx]
mov	[ebp+var_A8], edx
push	ecx		; float
fld1
fstp	[esp+0E8h+var_E8]
call	sub_7CA8B0
add	esp, 4
fstp	[ebp+var_B0]
mov	edx, [ebp+var_A8]
imul	edx, 0Ch
mov	eax, [ebp+var_AC]
mov	ecx, [eax+8]
mov	eax, [ebp+var_A8]
add	eax, 1
imul	eax, 0Ch
mov	esi, [ebp+var_AC]
mov	esi, [esi+0Ch]
fld	dword ptr [esi+eax]
fmul	[ebp+var_B0]
fadd	dword ptr [ecx+edx]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx]
mov	edx, [ebp+var_A8]
imul	edx, 0Ch
mov	eax, [ebp+var_AC]
mov	ecx, [eax+8]
mov	eax, [ebp+var_A8]
add	eax, 1
imul	eax, 0Ch
mov	esi, [ebp+var_AC]
mov	esi, [esi+0Ch]
fld	dword ptr [esi+eax+4]
fmul	[ebp+var_B0]
fadd	dword ptr [ecx+edx+4]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+4]
mov	edx, [ebp+var_A8]
imul	edx, 0Ch
mov	eax, [ebp+var_AC]
mov	ecx, [eax+8]
mov	eax, [ebp+var_A8]
add	eax, 1
imul	eax, 0Ch
mov	esi, [ebp+var_AC]
mov	esi, [esi+0Ch]
fld	dword ptr [esi+eax+8]
fmul	[ebp+var_B0]
fadd	dword ptr [ecx+edx+8]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+60h]
fmul	ds:dbl_15FCCA8
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [eax+64h]
fsub	dword ptr [edx+60h]
push	ecx		; float
fld1
fstp	[esp+0E8h+var_E8]
fstp	[ebp+var_D8]
fstp	[ebp+var_E0]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_D8]
fadd	[ebp+var_E0]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+8], xmm0

loc_7C88F4:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7C8350 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C8900(int, float)
sub_7C8900 proc	near

var_F4=	dword ptr -0F4h
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	byte ptr -58h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0E8h
push	esi
push	edi
movss	xmm0, ds:SrcStr
movss	[ebp+var_18], xmm0
mov	[ebp+var_5C], 0
movss	xmm0, ds:SrcStr
movss	[ebp+var_14], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_10], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_C], xmm0
movss	xmm0, ds:flt_15AA9FC
movss	[ebp+var_8], xmm0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+170h]
and	edx, 3
jnz	short loc_7C896C
jmp	loc_7C8E3B

loc_7C896C:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+17Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+170h]
and	edx, 4
jz	short loc_7C89F7
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	[ebp+arg_4]
fmul	dword ptr [ecx+190h]
mov	edx, [ebp+arg_0]
fadd	dword ptr [edx+2A4h]
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+2A4h]
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+2A4h]
movss	[ebp+var_18], xmm0
cvttss2si edx, [ebp+var_18]
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_5C]
cmp	ecx, [eax]
jl	short loc_7C89F2
mov	[ebp+var_5C], 0
mov	edx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+2A4h], xmm0

loc_7C89F2:
jmp	loc_7C8A79

loc_7C89F7:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	[ebp+arg_4]
fmul	dword ptr [ecx+190h]
mov	edx, [ebp+arg_0]
fadd	dword ptr [edx+2A4h]
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+2A4h]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+2A4h]
mov	edx, [ebp+var_4]
fdiv	dword ptr [edx+4]
fstp	[ebp+var_18]
fld1
fld	[ebp+var_18]
fcomip	st, st(1)
fstp	st
jbe	short loc_7C8A4F
cvttss2si eax, [ebp+var_18]
mov	[ebp+var_C4], eax
fild	[ebp+var_C4]
fsubr	[ebp+var_18]
fstp	[ebp+var_18]

loc_7C8A4F:
mov	ecx, [ebp+var_4]
fild	dword ptr [ecx]
fmul	[ebp+var_18]
fstp	[ebp+var_18]
cvttss2si edx, [ebp+var_18]
mov	[ebp+var_5C], edx
cmp	[ebp+var_5C], 0
jl	short loc_7C8A72
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_5C]
cmp	ecx, [eax]
jl	short loc_7C8A79

loc_7C8A72:
mov	[ebp+var_5C], 0

loc_7C8A79:
mov	edx, [ebp+var_5C]
imul	edx, 0Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
mov	eax, [ebp+var_5C]
add	eax, 1
imul	eax, 0Ch
mov	esi, [ebp+var_4]
mov	esi, [esi+0Ch]
cvttss2si edi, [ebp+var_18]
mov	[ebp+var_C8], edi
fild	[ebp+var_C8]
fsubr	[ebp+var_18]
fmul	dword ptr [esi+eax]
fadd	dword ptr [ecx+edx]
fstp	[ebp+var_14]
mov	ecx, [ebp+var_5C]
imul	ecx, 0Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+8]
mov	edx, [ebp+var_5C]
add	edx, 1
imul	edx, 0Ch
mov	esi, [ebp+var_4]
mov	esi, [esi+0Ch]
cvttss2si edi, [ebp+var_18]
mov	[ebp+var_CC], edi
fild	[ebp+var_CC]
fsubr	[ebp+var_18]
fmul	dword ptr [esi+edx+4]
fadd	dword ptr [eax+ecx+4]
fstp	[ebp+var_10]
mov	eax, [ebp+var_5C]
imul	eax, 0Ch
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	ecx, [ebp+var_5C]
add	ecx, 1
imul	ecx, 0Ch
mov	esi, [ebp+var_4]
mov	esi, [esi+0Ch]
cvttss2si edi, [ebp+var_18]
mov	[ebp+var_D0], edi
fild	[ebp+var_D0]
fsubr	[ebp+var_18]
fmul	dword ptr [esi+ecx+8]
fadd	dword ptr [edx+eax+8]
fstp	[ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+68h]
and	ecx, 400h
jz	loc_7C8D97
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
movss	xmm0, dword ptr	[eax+18Ch]
movss	[ebp+var_60], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [edx+68h]
and	eax, 800h
jz	loc_7C8C5F
movss	xmm0, [ebp+var_60]
movss	[ebp+var_C0], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_BC], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_B8], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_B4], xmm0
mov	ecx, [ebp+var_5C]
add	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
movss	xmm0, dword ptr	[ecx+eax]
movss	[ebp+var_70], xmm0
mov	ecx, [ebp+var_5C]
add	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
movss	xmm0, dword ptr	[eax+ecx+4]
movss	[ebp+var_6C], xmm0
mov	ecx, [ebp+var_5C]
add	ecx, 1
imul	ecx, 0Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+0Ch]
movss	xmm0, dword ptr	[eax+ecx+8]
movss	[ebp+var_68], xmm0
xor	ecx, ecx
mov	[ebp+var_64], ecx
mov	edx, [ebp+arg_0]
push	ecx		; float
fld	dword ptr [edx+2A8h]
fstp	[esp+0F4h+var_F4]
lea	eax, [ebp+var_70]
push	eax		; int
lea	ecx, [ebp+var_B0]
push	ecx		; int
call	sub_7C6A80
add	esp, 0Ch
lea	edx, [ebp+var_B0]
push	edx
lea	eax, [ebp+var_C0]
push	eax
lea	ecx, [ebp+var_C0]
push	ecx
call	sub_7C69D0
add	esp, 0Ch
fld	[ebp+var_14]
fadd	[ebp+var_C0]
fstp	[ebp+var_14]
fld	[ebp+var_10]
fadd	[ebp+var_BC]
fstp	[ebp+var_10]
fld	[ebp+var_C]
fadd	[ebp+var_B8]
fstp	[ebp+var_C]
jmp	loc_7C8D73

loc_7C8C5F:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+68h]
and	ecx, 1000h
jz	short loc_7C8CBE
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+2A8h]
call	__CIsin
fstp	[ebp+var_D4]
fld	[ebp+var_D4]
fmul	[ebp+var_60]
fadd	[ebp+var_10]
fstp	[ebp+var_10]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+2A8h]
call	__CIcos
fstp	[ebp+var_D8]
fld	[ebp+var_D8]
fmul	[ebp+var_60]
fadd	[ebp+var_C]
fstp	[ebp+var_C]
jmp	loc_7C8D73

loc_7C8CBE:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [edx+68h]
and	eax, 2000h
jz	short loc_7C8D19
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+2A8h]
call	__CIsin
fstp	[ebp+var_DC]
fld	[ebp+var_DC]
fmul	[ebp+var_60]
fadd	[ebp+var_14]
fstp	[ebp+var_14]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+2A8h]
call	__CIcos
fstp	[ebp+var_E0]
fld	[ebp+var_E0]
fmul	[ebp+var_60]
fadd	[ebp+var_C]
fstp	[ebp+var_C]
jmp	short loc_7C8D73

loc_7C8D19:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 4000h
jz	short loc_7C8D73
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+2A8h]
call	__CIsin
fstp	[ebp+var_E4]
fld	[ebp+var_E4]
fmul	[ebp+var_60]
fadd	[ebp+var_14]
fstp	[ebp+var_14]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+2A8h]
call	__CIcos
fstp	[ebp+var_E8]
fld	[ebp+var_E8]
fmul	[ebp+var_60]
fadd	[ebp+var_10]
fstp	[ebp+var_10]

loc_7C8D73:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	dword ptr [eax+190h]
fmul	[ebp+arg_4]
mov	ecx, [ebp+arg_0]
fadd	dword ptr [ecx+2A8h]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+2A8h]

loc_7C8D97:
mov	eax, [ebp+arg_0]
add	eax, 114h
push	eax
lea	ecx, [ebp+var_58]
push	ecx
call	sub_7C66B0
add	esp, 8
mov	edx, [ebp+var_4]
movss	xmm0, dword ptr	[edx+10h]
movss	[ebp+var_28], xmm0
mov	eax, [ebp+var_4]
movss	xmm0, dword ptr	[eax+14h]
movss	[ebp+var_24], xmm0
mov	ecx, [ebp+var_4]
movss	xmm0, dword ptr	[ecx+18h]
movss	[ebp+var_20], xmm0
lea	edx, [ebp+var_58]
push	edx
lea	eax, [ebp+var_14]
push	eax
lea	ecx, [ebp+var_14]
push	ecx
call	sub_7C69D0
add	esp, 0Ch
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+144h], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, [ebp+var_10]
movss	dword ptr [eax+148h], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, [ebp+var_C]
movss	dword ptr [ecx+14Ch], xmm0
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	[ebp+arg_4]
fmul	dword ptr [eax+190h]
mov	ecx, [ebp+arg_0]
fadd	dword ptr [ecx+2A4h]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+2A4h]

loc_7C8E3B:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7C8900 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C8E50(int, int, float)
sub_7C8E50 proc	near

var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 168h
push	esi
push	edi
mov	eax, [ebp+arg_4]
mov	ecx, [eax+168h]
mov	edx, [ecx+17Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
add	eax, 20h
mov	[ebp+var_38], eax
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+20h]
movss	[ebp+var_34], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+24h]
movss	[ebp+var_30], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+28h]
movss	[ebp+var_2C], xmm0
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30h]
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+30h]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+34h]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+34h]
faddp	st(1), st
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+38h]
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+38h]
faddp	st(1), st
call	__CIsqrt
fstp	[ebp+var_8]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+1Ch]
fmul	[ebp+var_8]
fstp	[ebp+var_1C]
fld	[ebp+var_1C]
fldz
fcomip	st, st(1)
fstp	st
jbe	short loc_7C8EF5
movss	xmm0, [ebp+var_1C]
xorps	xmm0, ds:xmmword_1573EB0
movss	[ebp+var_1C], xmm0

loc_7C8EF5:
fldz
fld	[ebp+arg_8]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C8F09
jmp	loc_7C9686

loc_7C8F09:
mov	edx, [ebp+arg_4]
mov	eax, [edx+168h]
mov	ecx, [eax+170h]
and	ecx, 1
jnz	short loc_7C8F35
mov	edx, [ebp+arg_4]
mov	eax, [edx+168h]
mov	ecx, [eax+170h]
and	ecx, 2
jz	loc_7C953B

loc_7C8F35:
mov	edx, [ebp+var_4]
fldz
fld	dword ptr [edx+4]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7C8F56
movss	xmm0, ds:SrcStr
movss	[ebp+var_3C], xmm0
jmp	short loc_7C8F62

loc_7C8F56:
fld	[ebp+var_1C]
mov	eax, [ebp+var_4]
fdiv	dword ptr [eax+4]
fstp	[ebp+var_3C]

loc_7C8F62:
fld1
fld	[ebp+var_3C]
fcomip	st, st(1)
fstp	st
jbe	short loc_7C8F84
cvttss2si ecx, [ebp+var_3C]
mov	[ebp+var_140], ecx
fild	[ebp+var_140]
fsubr	[ebp+var_3C]
fstp	[ebp+var_3C]

loc_7C8F84:
mov	edx, [ebp+var_4]
fild	dword ptr [edx]
fmul	[ebp+var_3C]
fstp	[ebp+var_3C]
cvttss2si eax, [ebp+var_3C]
mov	[ebp+var_40], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_40]
cmp	edx, [ecx]
jge	short loc_7C8FA7
cmp	[ebp+var_40], 0
jge	short loc_7C8FAE

loc_7C8FA7:
mov	[ebp+var_40], 0

loc_7C8FAE:
mov	eax, [ebp+var_40]
imul	eax, 0Ch
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	ecx, [ebp+var_40]
add	ecx, 1
imul	ecx, 0Ch
mov	esi, [ebp+var_4]
mov	esi, [esi+0Ch]
cvttss2si edi, [ebp+var_3C]
mov	[ebp+var_144], edi
fild	[ebp+var_144]
fsubr	[ebp+var_3C]
fmul	dword ptr [esi+ecx]
fadd	dword ptr [edx+eax]
mov	edx, [ebp+var_38]
fstp	dword ptr [edx]
mov	eax, [ebp+var_40]
imul	eax, 0Ch
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	ecx, [ebp+var_40]
add	ecx, 1
imul	ecx, 0Ch
mov	esi, [ebp+var_4]
mov	esi, [esi+0Ch]
cvttss2si edi, [ebp+var_3C]
mov	[ebp+var_148], edi
fild	[ebp+var_148]
fsubr	[ebp+var_3C]
fmul	dword ptr [esi+ecx+4]
fadd	dword ptr [edx+eax+4]
mov	edx, [ebp+var_38]
fstp	dword ptr [edx+4]
mov	eax, [ebp+var_40]
imul	eax, 0Ch
mov	ecx, [ebp+var_4]
mov	edx, [ecx+8]
mov	ecx, [ebp+var_40]
add	ecx, 1
imul	ecx, 0Ch
mov	esi, [ebp+var_4]
mov	esi, [esi+0Ch]
cvttss2si edi, [ebp+var_3C]
mov	[ebp+var_14C], edi
fild	[ebp+var_14C]
fsubr	[ebp+var_3C]
fmul	dword ptr [esi+ecx+8]
fadd	dword ptr [edx+eax+8]
mov	edx, [ebp+var_38]
fstp	dword ptr [edx+8]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 400h
jz	loc_7C92DD
fld	[ebp+var_8]
fmul	[ebp+arg_8]
mov	eax, [ebp+arg_0]
fadd	dword ptr [eax+74h]
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+74h]
mov	edx, [ebp+arg_4]
mov	eax, [edx+168h]
mov	ecx, [eax+68h]
and	ecx, 800h
jz	loc_7C91A4
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+68h]
movss	[ebp+var_A0], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+6Ch]
movss	[ebp+var_9C], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+70h]
movss	[ebp+var_98], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_94], xmm0
mov	edx, [ebp+var_40]
add	edx, 1
imul	edx, 0Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
movss	xmm0, dword ptr	[edx+ecx]
movss	[ebp+var_4C], xmm0
mov	edx, [ebp+var_40]
add	edx, 1
imul	edx, 0Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
movss	xmm0, dword ptr	[ecx+edx+4]
movss	[ebp+var_48], xmm0
mov	edx, [ebp+var_40]
add	edx, 1
imul	edx, 0Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
movss	xmm0, dword ptr	[ecx+edx+8]
movss	[ebp+var_44], xmm0
mov	edx, [ebp+arg_0]
push	ecx		; float
fld	dword ptr [edx+74h]
fstp	[esp+174h+var_174]
lea	eax, [ebp+var_4C]
push	eax		; int
lea	ecx, [ebp+var_90]
push	ecx		; int
call	sub_7C6A80
add	esp, 0Ch
lea	edx, [ebp+var_90]
push	edx
lea	eax, [ebp+var_A0]
push	eax
lea	ecx, [ebp+var_A0]
push	ecx
call	sub_7C69D0
add	esp, 0Ch
mov	edx, [ebp+var_38]
fld	dword ptr [edx]
fadd	[ebp+var_A0]
mov	eax, [ebp+var_38]
fstp	dword ptr [eax]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+4]
fadd	[ebp+var_9C]
mov	edx, [ebp+var_38]
fstp	dword ptr [edx+4]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+8]
fadd	[ebp+var_98]
mov	ecx, [ebp+var_38]
fstp	dword ptr [ecx+8]
jmp	loc_7C92D8

loc_7C91A4:
mov	edx, [ebp+arg_4]
mov	eax, [edx+168h]
mov	ecx, [eax+68h]
and	ecx, 1000h
jz	short loc_7C920F
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+74h]
call	__CIsin
fstp	[ebp+var_150]
fld	[ebp+var_150]
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+6Ch]
mov	ecx, [ebp+var_38]
fadd	dword ptr [ecx+4]
mov	edx, [ebp+var_38]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+74h]
call	__CIcos
fstp	[ebp+var_154]
fld	[ebp+var_154]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+70h]
mov	edx, [ebp+var_38]
fadd	dword ptr [edx+8]
mov	eax, [ebp+var_38]
fstp	dword ptr [eax+8]
jmp	loc_7C92D8

loc_7C920F:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+168h]
mov	eax, [edx+68h]
and	eax, 2000h
jz	short loc_7C9274
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+74h]
call	__CIsin
fstp	[ebp+var_158]
fld	[ebp+var_158]
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+68h]
mov	eax, [ebp+var_38]
fadd	dword ptr [eax]
mov	ecx, [ebp+var_38]
fstp	dword ptr [ecx]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+74h]
call	__CIcos
fstp	[ebp+var_15C]
fld	[ebp+var_15C]
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+70h]
mov	ecx, [ebp+var_38]
fadd	dword ptr [ecx+8]
mov	edx, [ebp+var_38]
fstp	dword ptr [edx+8]
jmp	short loc_7C92D8

loc_7C9274:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 4000h
jz	short loc_7C92D8
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+74h]
call	__CIsin
fstp	[ebp+var_160]
fld	[ebp+var_160]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+68h]
mov	edx, [ebp+var_38]
fadd	dword ptr [edx]
mov	eax, [ebp+var_38]
fstp	dword ptr [eax]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+74h]
call	__CIcos
fstp	[ebp+var_164]
fld	[ebp+var_164]
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+6Ch]
mov	eax, [ebp+var_38]
fadd	dword ptr [eax+4]
mov	ecx, [ebp+var_38]
fstp	dword ptr [ecx+4]

loc_7C92D8:
jmp	loc_7C953B

loc_7C92DD:
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+68h]
movss	[ebp+var_D4], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+6Ch]
movss	[ebp+var_D0], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+70h]
movss	[ebp+var_CC], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_C8], xmm0
mov	edx, [ebp+var_40]
add	edx, 1
imul	edx, 0Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
movss	xmm0, dword ptr	[edx+ecx]
movss	[ebp+var_B8], xmm0
mov	edx, [ebp+var_40]
add	edx, 1
imul	edx, 0Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
movss	xmm0, dword ptr	[ecx+edx+4]
movss	[ebp+var_B4], xmm0
mov	edx, [ebp+var_40]
add	edx, 1
imul	edx, 0Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
movss	xmm0, dword ptr	[ecx+edx+8]
movss	[ebp+var_B0], xmm0
movss	xmm0, ds:flt_15AA9FC
movss	[ebp+var_EC], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_E8], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_E4], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_E0], xmm0
movss	xmm0, ds:flt_15AA9FC
movss	[ebp+var_DC], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_D8], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_AC], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_A8], xmm0
movss	xmm0, ds:flt_15AA9FC
movss	[ebp+var_A4], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_C4], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_C0], xmm0
movss	xmm0, ds:SrcStr
movss	[ebp+var_BC], xmm0
fld	[ebp+var_B8]
fmul	[ebp+var_EC]
fld	[ebp+var_B4]
fmul	[ebp+var_E8]
faddp	st(1), st
fld	[ebp+var_B0]
fmul	[ebp+var_E4]
faddp	st(1), st
fstp	[ebp+var_C4]
fld	[ebp+var_B8]
fmul	[ebp+var_E0]
fld	[ebp+var_B4]
fmul	[ebp+var_DC]
faddp	st(1), st
fld	[ebp+var_B0]
fmul	[ebp+var_D8]
faddp	st(1), st
fstp	[ebp+var_C0]
fld	[ebp+var_B8]
fmul	[ebp+var_AC]
fld	[ebp+var_B4]
fmul	[ebp+var_A8]
faddp	st(1), st
fld	[ebp+var_B0]
fmul	[ebp+var_A4]
faddp	st(1), st
fstp	[ebp+var_BC]
push	ecx		; float
fld	[ebp+var_C4]
fstp	[esp+174h+var_174]
push	ecx		; float
fld	[ebp+var_BC]
fstp	[esp+178h+var_178]
push	ecx		; float
fld	[ebp+var_C0]
fstp	[esp+17Ch+var_17C]
lea	edx, [ebp+var_130]
push	edx		; int
call	sub_7C6C10
add	esp, 10h
lea	eax, [ebp+var_130]
push	eax
lea	ecx, [ebp+var_D4]
push	ecx
lea	edx, [ebp+var_D4]
push	edx
call	sub_7C69D0
add	esp, 0Ch
mov	eax, [ebp+var_38]
fld	dword ptr [eax]
fadd	[ebp+var_D4]
mov	ecx, [ebp+var_38]
fstp	dword ptr [ecx]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+4]
fadd	[ebp+var_D0]
mov	eax, [ebp+var_38]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+8]
fadd	[ebp+var_CC]
mov	edx, [ebp+var_38]
fstp	dword ptr [edx+8]

loc_7C953B:
mov	eax, [ebp+var_38]
movss	xmm0, dword ptr	[eax+0Ch]
movss	[ebp+var_C], xmm0
mov	ecx, [ebp+var_38]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [ecx+0Ch], xmm0
mov	edx, [ebp+arg_4]
add	edx, 114h
push	edx
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+var_38]
push	ecx
call	sub_7C6D00
add	esp, 0Ch
mov	edx, [ebp+var_38]
movss	xmm0, [ebp+var_C]
movss	dword ptr [edx+0Ch], xmm0
mov	eax, [ebp+arg_4]
mov	ecx, [eax+168h]
mov	edx, [ecx+170h]
and	edx, 1
jnz	short loc_7C95AB
mov	eax, [ebp+arg_4]
mov	ecx, [eax+168h]
mov	edx, [ecx+170h]
and	edx, 2
jz	loc_7C9686

loc_7C95AB:
mov	eax, [ebp+var_38]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_28], xmm0
mov	ecx, [ebp+var_38]
movss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_24], xmm0
mov	edx, [ebp+var_38]
movss	xmm0, dword ptr	[edx+8]
movss	[ebp+var_20], xmm0
fld	[ebp+var_28]
fsub	[ebp+var_34]
fstp	[ebp+var_18]
fld	[ebp+var_24]
fsub	[ebp+var_30]
fstp	[ebp+var_14]
fld	[ebp+var_20]
fsub	[ebp+var_2C]
fstp	[ebp+var_10]
fld	[ebp+var_18]
fmul	[ebp+var_18]
fld	[ebp+var_14]
fmul	[ebp+var_14]
faddp	st(1), st
fld	[ebp+var_10]
fmul	[ebp+var_10]
faddp	st(1), st
fstp	[ebp+var_168]
fld	[ebp+var_168]
push	ecx
fstp	[esp+174h+var_174]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_134]
fld	[ebp+var_18]
fmul	[ebp+var_134]
fstp	[ebp+var_18]
fld	[ebp+var_14]
fmul	[ebp+var_134]
fstp	[ebp+var_14]
fld	[ebp+var_10]
fmul	[ebp+var_134]
fstp	[ebp+var_10]
fld	[ebp+var_18]
fmul	[ebp+var_8]
fstp	[ebp+var_18]
fld	[ebp+var_14]
fmul	[ebp+var_8]
fstp	[ebp+var_14]
fld	[ebp+var_10]
fmul	[ebp+var_8]
fstp	[ebp+var_10]
mov	eax, [ebp+arg_0]
movss	xmm0, [ebp+var_18]
movss	dword ptr [eax+30h], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, [ebp+var_14]
movss	dword ptr [ecx+34h], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_10]
movss	dword ptr [edx+38h], xmm0

loc_7C9686:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7C8E50 endp

align 10h


; Attributes: bp-based frame

sub_7C9690 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0D4h]
fstp	[ebp+var_14]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fmul	dword ptr [eax+0D8h]
fstp	[ebp+var_20]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fmul	dword ptr [edx+0DCh]
fstp	[ebp+var_1C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0D4h]
fmul	ds:dbl_15FCC48
fsubr	[ebp+var_14]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0DCh]
fmul	ds:dbl_15FCC48
fsubr	[ebp+var_1C]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0D8h]
fmul	ds:dbl_15FCC48
fsubr	[ebp+var_20]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+8]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_18]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0E0h]
fstp	[ebp+var_C]
fld	[ebp+var_18]
call	__CIcos
fstp	[ebp+var_30]
fld	[ebp+var_30]
fmul	[ebp+var_C]
fstp	[ebp+var_4]
fld	[ebp+var_18]
call	__CIsin
fstp	[ebp+var_34]
fld	[ebp+var_34]
fmul	[ebp+var_C]
fstp	[ebp+var_8]
movss	xmm0, ds:dword_1577A6C
movss	[ebp+var_10], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_4]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_10]
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+4]
faddp	st(1), st
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+8]
faddp	st(1), st
fstp	[ebp+var_38]
fld	[ebp+var_38]
push	ecx
fstp	[esp+3Ch+var_3C]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_24]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
fmul	[ebp+var_24]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fmul	[ebp+var_24]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
fmul	[ebp+var_24]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx+8]
mov	esp, ebp
pop	ebp
retn
sub_7C9690 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C9850(float,	int, int)
sub_7C9850 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
movss	xmm0, dword ptr	[ecx+0D4h]
movss	[ebp+var_C], xmm0
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
movss	xmm0, dword ptr	[eax+0D8h]
movss	[ebp+var_30], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
movss	xmm0, dword ptr	[edx+0DCh]
movss	[ebp+var_28], xmm0
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
fmul	ds:dbl_15FCC90
fstp	[ebp+var_18]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_10]
fld	[ebp+var_10]
call	__CIsin
fstp	[ebp+var_24]
fld	[ebp+var_18]
call	__CIsin
fstp	[ebp+var_2C]
fld	[ebp+var_10]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_18]
call	__CIcos
fstp	[ebp+var_1C]
fld	[ebp+var_C]
fmul	[ebp+var_24]
fmul	[ebp+var_1C]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax]
fld	[ebp+var_30]
fmul	[ebp+var_24]
fmul	[ebp+var_2C]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
fld	[ebp+var_28]
fmul	[ebp+var_4]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_8], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[edx+8]
movss	[ebp+var_14], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_20]
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+4]
faddp	st(1), st
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[ebp+var_40]
fld	[ebp+var_40]
push	ecx
fstp	[esp+44h+var_44]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_34]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
fmul	[ebp+var_34]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fmul	[ebp+var_34]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
fmul	[ebp+var_34]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+8]
mov	esp, ebp
pop	ebp
retn
sub_7C9850 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C99E0(float,	float, int)
sub_7C99E0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
movss	xmm0, dword ptr	[ecx+0D4h]
movss	[ebp+var_28], xmm0
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
movss	xmm0, dword ptr	[eax+0DCh]
movss	[ebp+var_2C], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
movss	xmm0, dword ptr	[edx+0D8h]
movss	[ebp+var_20], xmm0
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_20]
fstp	[ebp+var_14]
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_C]
fld	[ebp+var_C]
call	__CIsin
fstp	[ebp+var_24]
fld	[ebp+var_C]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_28]
fmul	[ebp+var_14]
fdiv	[ebp+var_20]
fsubr	[ebp+var_28]
fmul	[ebp+var_4]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax]
fld	[ebp+var_2C]
fmul	[ebp+var_14]
fdiv	[ebp+var_20]
fsubr	[ebp+var_2C]
fmul	[ebp+var_24]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
mov	edx, [ebp+arg_4]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+4], xmm0
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_30]
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0E0h]
fstp	[ebp+var_18]
fld	[ebp+var_30]
call	__CIcos
fstp	[ebp+var_40]
fld	[ebp+var_40]
fmul	[ebp+var_18]
fstp	[ebp+var_8]
fld	[ebp+var_30]
call	__CIsin
fstp	[ebp+var_44]
fld	[ebp+var_44]
fmul	[ebp+var_18]
fstp	[ebp+var_10]
movss	xmm0, ds:dword_1577A6C
movss	[ebp+var_1C], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_1C]
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_10]
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+4]
faddp	st(1), st
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+8]
faddp	st(1), st
fstp	[ebp+var_48]
fld	[ebp+var_48]
push	ecx
fstp	[esp+4Ch+var_4C]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_34]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
fmul	[ebp+var_34]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fmul	[ebp+var_34]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
fmul	[ebp+var_34]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx+8]
mov	esp, ebp
pop	ebp
retn
sub_7C99E0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C9BA0(float,	int, int)
sub_7C9BA0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
movss	xmm0, dword ptr	[ecx+0D4h]
movss	[ebp+var_24], xmm0
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
movss	xmm0, dword ptr	[eax+0DCh]
movss	[ebp+var_28], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
movss	xmm0, dword ptr	[edx+0D8h]
movss	[ebp+var_1C], xmm0
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_1C]
fstp	[ebp+var_14]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_C]
fld	[ebp+var_C]
call	__CIsin
fstp	[ebp+var_20]
fld	[ebp+var_C]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_24]
fmul	[ebp+var_4]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax]
fld	[ebp+var_28]
fmul	[ebp+var_20]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
mov	edx, [ebp+arg_4]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_8], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_18], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[edx+8]
movss	[ebp+var_10], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_18]
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_10]
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+4]
faddp	st(1), st
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[ebp+var_38]
fld	[ebp+var_38]
push	ecx
fstp	[esp+3Ch+var_3C]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_2C]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
fmul	[ebp+var_2C]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fmul	[ebp+var_2C]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
fmul	[ebp+var_2C]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+8]
mov	esp, ebp
pop	ebp
retn
sub_7C9BA0 endp

align 10h


; Attributes: bp-based frame

sub_7C9D10 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0D4h]
fstp	[ebp+var_14]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fmul	dword ptr [eax+0D8h]
fstp	[ebp+var_20]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fmul	dword ptr [edx+0DCh]
fstp	[ebp+var_1C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0D4h]
fmul	ds:dbl_15FCC48
fsubr	[ebp+var_14]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0DCh]
fmul	ds:dbl_15FCC48
fsubr	[ebp+var_1C]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0D8h]
fmul	ds:dbl_15FCC48
fsubr	[ebp+var_20]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+8]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_18]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0E0h]
fstp	[ebp+var_C]
fld	[ebp+var_18]
call	__CIcos
fstp	[ebp+var_30]
fld	[ebp+var_30]
fmul	[ebp+var_C]
fstp	[ebp+var_4]
fld	[ebp+var_18]
call	__CIsin
fstp	[ebp+var_34]
fld	[ebp+var_34]
fmul	[ebp+var_C]
fstp	[ebp+var_8]
movss	xmm0, ds:dword_1577A6C
movss	[ebp+var_10], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_4]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_10]
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+4]
faddp	st(1), st
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+8]
faddp	st(1), st
fstp	[ebp+var_38]
fld	[ebp+var_38]
push	ecx
fstp	[esp+3Ch+var_3C]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_24]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
fmul	[ebp+var_24]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fmul	[ebp+var_24]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
fmul	[ebp+var_24]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx+8]
mov	esp, ebp
pop	ebp
retn
sub_7C9D10 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7C9ED0(float,	int, int)
sub_7C9ED0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0D4h]
fstp	[ebp+var_C]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fmul	dword ptr [eax+0D8h]
fstp	[ebp+var_30]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fmul	dword ptr [edx+0DCh]
fstp	[ebp+var_28]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
fmul	ds:dbl_15FCC90
fstp	[ebp+var_18]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_10]
fld	[ebp+var_10]
call	__CIsin
fstp	[ebp+var_24]
fld	[ebp+var_18]
call	__CIsin
fstp	[ebp+var_2C]
fld	[ebp+var_10]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_18]
call	__CIcos
fstp	[ebp+var_1C]
fld	[ebp+var_C]
fmul	[ebp+var_24]
fmul	[ebp+var_1C]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax]
fld	[ebp+var_30]
fmul	[ebp+var_24]
fmul	[ebp+var_2C]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
fld	[ebp+var_28]
fmul	[ebp+var_4]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_8], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[edx+8]
movss	[ebp+var_14], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_20]
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+4]
faddp	st(1), st
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[ebp+var_40]
fld	[ebp+var_40]
push	ecx
fstp	[esp+44h+var_44]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_34]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
fmul	[ebp+var_34]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fmul	[ebp+var_34]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
fmul	[ebp+var_34]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+8]
mov	esp, ebp
pop	ebp
retn
sub_7C9ED0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CA080(float,	float, int)
sub_7CA080 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 48h
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0D4h]
fstp	[ebp+var_28]
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fmul	dword ptr [eax+0DCh]
fstp	[ebp+var_2C]
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fmul	dword ptr [edx+0D8h]
fstp	[ebp+var_20]
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_20]
fstp	[ebp+var_14]
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_C]
fld	[ebp+var_C]
call	__CIsin
fstp	[ebp+var_24]
fld	[ebp+var_C]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_28]
fmul	[ebp+var_14]
fdiv	[ebp+var_20]
fsubr	[ebp+var_28]
fmul	[ebp+var_4]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax]
fld	[ebp+var_2C]
fmul	[ebp+var_14]
fdiv	[ebp+var_20]
fsubr	[ebp+var_2C]
fmul	[ebp+var_24]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
mov	edx, [ebp+arg_4]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+4], xmm0
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_30]
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0E0h]
fstp	[ebp+var_18]
fld	[ebp+var_30]
call	__CIcos
fstp	[ebp+var_40]
fld	[ebp+var_40]
fmul	[ebp+var_18]
fstp	[ebp+var_8]
fld	[ebp+var_30]
call	__CIsin
fstp	[ebp+var_44]
fld	[ebp+var_44]
fmul	[ebp+var_18]
fstp	[ebp+var_10]
movss	xmm0, ds:dword_1577A6C
movss	[ebp+var_1C], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_1C]
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_10]
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+4]
faddp	st(1), st
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+8]
faddp	st(1), st
fstp	[ebp+var_48]
fld	[ebp+var_48]
push	ecx
fstp	[esp+4Ch+var_4C]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_34]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
fmul	[ebp+var_34]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fmul	[ebp+var_34]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
fmul	[ebp+var_34]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx+8]
mov	esp, ebp
pop	ebp
retn
sub_7CA080 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CA260(float,	int, int)
sub_7CA260 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 38h
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0D4h]
fstp	[ebp+var_24]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fmul	dword ptr [eax+0DCh]
fstp	[ebp+var_28]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fmul	dword ptr [edx+0D8h]
fstp	[ebp+var_1C]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_1C]
fstp	[ebp+var_14]
push	ecx		; float
fld1
fstp	[esp+3Ch+var_3C]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_C]
fld	[ebp+var_C]
call	__CIsin
fstp	[ebp+var_20]
fld	[ebp+var_C]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_24]
fmul	[ebp+var_4]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax]
fld	[ebp+var_28]
fmul	[ebp+var_20]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
mov	edx, [ebp+arg_4]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_8], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_18], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[edx+8]
movss	[ebp+var_10], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_18]
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_10]
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+4]
faddp	st(1), st
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[ebp+var_38]
fld	[ebp+var_38]
push	ecx
fstp	[esp+3Ch+var_3C]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_2C]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
fmul	[ebp+var_2C]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fmul	[ebp+var_2C]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
fmul	[ebp+var_2C]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+8]
mov	esp, ebp
pop	ebp
retn
sub_7CA260 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CA3F0(int, float, int)
sub_7CA3F0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+8], xmm0
push	ecx		; float
fld1
fstp	[esp+30h+var_30]
call	sub_7CA8B0
add	esp, 4
fadd	st, st
fmul	ds:dbl_15FCC90
fstp	[ebp+var_14]
push	ecx		; float
fld1
fstp	[esp+30h+var_30]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0E0h]
fstp	[ebp+var_C]
fld	[ebp+var_14]
call	__CIcos
fstp	[ebp+var_24]
fld	[ebp+var_24]
fmul	[ebp+var_C]
fstp	[ebp+var_4]
fld	[ebp+var_14]
call	__CIsin
fstp	[ebp+var_28]
fld	[ebp+var_28]
fmul	[ebp+var_C]
fstp	[ebp+var_8]
movss	xmm0, ds:dword_1577A6C
movss	[ebp+var_10], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_4]
movss	dword ptr [edx], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_10]
movss	dword ptr [eax+4], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [ecx+8], xmm0
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+4]
faddp	st(1), st
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+8]
faddp	st(1), st
fstp	[ebp+var_2C]
fld	[ebp+var_2C]
push	ecx
fstp	[esp+30h+var_30]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_18]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx]
fmul	[ebp+var_18]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+4]
fmul	[ebp+var_18]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+8]
fmul	[ebp+var_18]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx+8]
mov	esp, ebp
pop	ebp
retn
sub_7CA3F0 endp

align 10h


; Attributes: bp-based frame

sub_7CA530 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
movss	xmm0, dword ptr	[ecx+0D4h]
movss	[ebp+var_C], xmm0
movss	xmm0, [ebp+var_C]
movss	[ebp+var_30], xmm0
movss	xmm0, [ebp+var_C]
movss	[ebp+var_28], xmm0
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	dword ptr [eax+0D8h]
fmul	ds:dbl_15FCEC0
fmulp	st(1), st
fstp	[ebp+var_18]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [edx+0DCh]
fmul	ds:dbl_15FCEC0
fmulp	st(1), st
fstp	[ebp+var_10]
fld	[ebp+var_10]
call	__CIsin
fstp	[ebp+var_24]
fld	[ebp+var_18]
call	__CIsin
fstp	[ebp+var_2C]
fld	[ebp+var_10]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_18]
call	__CIcos
fstp	[ebp+var_1C]
fld	[ebp+var_C]
fmul	[ebp+var_24]
fmul	[ebp+var_1C]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax]
fld	[ebp+var_30]
fmul	[ebp+var_24]
fmul	[ebp+var_2C]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx+8]
fld	[ebp+var_28]
fmul	[ebp+var_4]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+4]
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[eax]
movss	[ebp+var_8], xmm0
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx+4]
movss	[ebp+var_20], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[edx+8]
movss	[ebp+var_14], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [eax], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_20]
movss	dword ptr [ecx+4], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_14]
movss	dword ptr [edx+8], xmm0
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+4]
faddp	st(1), st
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx+8]
faddp	st(1), st
fstp	[ebp+var_40]
fld	[ebp+var_40]
push	ecx
fstp	[esp+44h+var_44]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_34]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax]
fmul	[ebp+var_34]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+4]
fmul	[ebp+var_34]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx+8]
fmul	[ebp+var_34]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx+8]
mov	esp, ebp
pop	ebp
retn
sub_7CA530 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CA6C0(float,	int, int)
sub_7CA6C0 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 40h
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fmul	dword ptr [ecx+0D4h]
fstp	[ebp+var_C]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fmul	dword ptr [eax+0D4h]
fstp	[ebp+var_30]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fmul	dword ptr [edx+0D4h]
fstp	[ebp+var_28]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0D8h]
fmul	ds:dbl_15FCEC0
fmulp	st(1), st
fstp	[ebp+var_18]
push	ecx		; float
fld1
fstp	[esp+44h+var_44]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	dword ptr [eax+0DCh]
fmul	ds:dbl_15FCEC0
fmulp	st(1), st
fstp	[ebp+var_10]
fld	[ebp+var_10]
call	__CIsin
fstp	[ebp+var_24]
fld	[ebp+var_18]
call	__CIsin
fstp	[ebp+var_2C]
fld	[ebp+var_10]
call	__CIcos
fstp	[ebp+var_4]
fld	[ebp+var_18]
call	__CIcos
fstp	[ebp+var_1C]
fld	[ebp+var_C]
fmul	[ebp+var_24]
fmul	[ebp+var_1C]
mov	ecx, [ebp+arg_4]
fstp	dword ptr [ecx]
fld	[ebp+var_30]
fmul	[ebp+var_24]
fmul	[ebp+var_2C]
mov	edx, [ebp+arg_4]
fstp	dword ptr [edx+8]
fld	[ebp+var_28]
fmul	[ebp+var_4]
mov	eax, [ebp+arg_4]
fstp	dword ptr [eax+4]
mov	ecx, [ebp+arg_4]
movss	xmm0, dword ptr	[ecx]
movss	[ebp+var_8], xmm0
mov	edx, [ebp+arg_4]
movss	xmm0, dword ptr	[edx+4]
movss	[ebp+var_20], xmm0
mov	eax, [ebp+arg_4]
movss	xmm0, dword ptr	[eax+8]
movss	[ebp+var_14], xmm0
mov	ecx, [ebp+arg_8]
movss	xmm0, [ebp+var_8]
movss	dword ptr [ecx], xmm0
mov	edx, [ebp+arg_8]
movss	xmm0, [ebp+var_20]
movss	dword ptr [edx+4], xmm0
mov	eax, [ebp+arg_8]
movss	xmm0, [ebp+var_14]
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx]
mov	edx, [ebp+arg_8]
fmul	dword ptr [edx]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+4]
mov	ecx, [ebp+arg_8]
fmul	dword ptr [ecx+4]
faddp	st(1), st
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+8]
mov	eax, [ebp+arg_8]
fmul	dword ptr [eax+8]
faddp	st(1), st
fstp	[ebp+var_40]
fld	[ebp+var_40]
push	ecx
fstp	[esp+44h+var_44]
call	sub_45C9E0
add	esp, 4
fstp	[ebp+var_34]
mov	ecx, [ebp+arg_8]
fld	dword ptr [ecx]
fmul	[ebp+var_34]
mov	edx, [ebp+arg_8]
fstp	dword ptr [edx]
mov	eax, [ebp+arg_8]
fld	dword ptr [eax+4]
fmul	[ebp+var_34]
mov	ecx, [ebp+arg_8]
fstp	dword ptr [ecx+4]
mov	edx, [ebp+arg_8]
fld	dword ptr [edx+8]
fmul	[ebp+var_34]
mov	eax, [ebp+arg_8]
fstp	dword ptr [eax+8]
mov	esp, ebp
pop	ebp
retn
sub_7CA6C0 endp

align 10h


; Attributes: bp-based frame

sub_7CA890 proc	near
push	ebp
mov	ebp, esp
mov	eax, dword_1859034
imul	eax, 19660Dh
add	eax, 3C6EF35Fh
mov	dword_1859034, eax
mov	eax, dword_1859034
pop	ebp
retn
sub_7CA890 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CA8B0(float)
sub_7CA8B0 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, dword_1859030
imul	eax, 19660Dh
add	eax, 3C6EF35Fh
mov	dword_1859030, eax
mov	ecx, dword_1859030
mov	dword ptr [ebp+var_8], ecx
mov	dword ptr [ebp+var_8+4], 0
fild	[ebp+var_8]
fmul	[ebp+arg_0]
fdiv	ds:dbl_15FCE08
fstp	[ebp+var_C]
fld	[ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_7CA8B0 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	dword ptr [ebp-4], 0
mov	dword_1859038, 0
mov	dword_185903C, 0
mov	dword_1859040, 0
push	88h
mov	eax, [ebp+8]
push	eax
push	offset aPsystempool ; "PSystemPool"
push	offset dword_1859038
call	sub_7D0580
add	esp, 10h
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jge	short loc_7CA95A
call	sub_7CAA70
mov	eax, [ebp-4]
jmp	loc_7CAA5E

loc_7CA95A:
push	338h
mov	ecx, [ebp+0Ch]
push	ecx
push	offset aPemitterpool ; "PEmitterPool"
push	offset dword_185903C
call	sub_7D0580
add	esp, 10h
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jge	short loc_7CA98B
call	sub_7CAA70
mov	eax, [ebp-4]
jmp	loc_7CAA5E

loc_7CA98B:
cmp	dword_1859054, 0
jnz	short loc_7CA9C2
push	7Ch
mov	edx, [ebp+10h]
push	edx
push	offset aParticlepool ; "ParticlePool"
push	offset dword_1859040
call	sub_7D0580
add	esp, 10h
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jge	short loc_7CA9C2
call	sub_7CAA70
mov	eax, [ebp-4]
jmp	loc_7CAA5E

loc_7CA9C2:
push	0
push	0
mov	eax, [ebp+0Ch]
shl	eax, 2
push	eax
call	sub_7D0080
add	esp, 0Ch
mov	dword_1859044, eax
cmp	dword_1859044, 0
jnz	short loc_7CA9ED
call	sub_7CAA70
or	eax, 0FFFFFFFFh
jmp	short loc_7CAA5E

loc_7CA9ED:
push	0
push	0
mov	ecx, [ebp+10h]
shl	ecx, 2
push	ecx
call	sub_7D0080
add	esp, 0Ch
mov	dword_1859048, eax
cmp	dword_1859048, 0
jnz	short loc_7CAA18
call	sub_7CAA70
or	eax, 0FFFFFFFFh
jmp	short loc_7CAA5E

loc_7CAA18:
movss	xmm0, ds:SrcStr
movss	dword_1681594, xmm0
movss	xmm0, ds:flt_15AA9FC
movss	dword_1681598, xmm0
movss	xmm0, ds:SrcStr
movss	dword_168159C, xmm0
push	80h
push	0
push	offset dword_19725E0
call	_memset
add	esp, 0Ch
xor	eax, eax

loc_7CAA5E:
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CAA70 proc	near
push	ebp
mov	ebp, esp
cmp	dword_1859044, 0
jz	short loc_7CAA8A
mov	eax, dword_1859044
push	eax
call	sub_7D0300
add	esp, 4

loc_7CAA8A:
cmp	dword_1859048, 0
jz	short loc_7CAAA2
mov	ecx, dword_1859048
push	ecx
call	sub_7D0300
add	esp, 4

loc_7CAAA2:
cmp	dword_1859038, 0
jz	short loc_7CAAB8
push	offset dword_1859038
call	sub_7D06B0
add	esp, 4

loc_7CAAB8:
cmp	dword_185903C, 0
jz	short loc_7CAACE
push	offset dword_185903C
call	sub_7D06B0
add	esp, 4

loc_7CAACE:
cmp	dword_1859040, 0
jz	short loc_7CAAE4
push	offset dword_1859040
call	sub_7D06B0
add	esp, 4

loc_7CAAE4:
mov	dword_1859044, 0
mov	dword_1859048, 0
pop	ebp
retn
sub_7CAA70 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
mov	dword ptr [eax], 0
mov	ecx, dword_1859038
push	ecx
call	sub_7D06D0
add	esp, 4
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jnz	short loc_7CAB2D
or	eax, 0FFFFFFFFh
jmp	loc_7CABE0

loc_7CAB2D:
push	offset sub_7CC3E0
mov	edx, [ebp+0Ch]
push	edx
mov	eax, [ebp-4]
push	eax
call	sub_7D09A0
add	esp, 0Ch
mov	ecx, [ebp-4]
cmp	dword ptr [ecx], 0
jnz	short loc_7CAB5E
mov	edx, [ebp-4]
push	edx
call	sub_7D0720
add	esp, 4
or	eax, 0FFFFFFFFh
jmp	loc_7CABE0

loc_7CAB5E:
mov	eax, [ebp-4]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp-4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp-4]
mov	dword ptr [edx+4], 0
mov	eax, [ebp-4]
add	eax, 20h
push	eax
call	sub_7C63A0
add	esp, 4
mov	ecx, [ebp-4]
mov	dword ptr [ecx+64h], 0
xor	edx, edx
mov	eax, [ebp-4]
add	eax, 68h
mov	[eax], edx
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax+0Ch], edx
mov	ecx, [ebp-4]
mov	dword ptr [ecx+78h], 0
mov	edx, [ebp-4]
mov	dword ptr [edx+7Ch], 0
mov	eax, [ebp-4]
mov	dword ptr [eax+80h], 0
mov	ecx, [ebp-4]
mov	dword ptr [ecx+84h], 0
mov	edx, [ebp+8]
mov	eax, [ebp-4]
mov	[edx], eax
xor	eax, eax

loc_7CABE0:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [eax]
push	ecx
call	sub_7D0A40
add	esp, 4
mov	edx, [ebp+8]
mov	eax, [edx]
cmp	dword ptr [eax+84h], 0
jz	short loc_7CAC23
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [edx+84h]
push	eax
call	sub_7D0300
add	esp, 4

loc_7CAC23:
mov	ecx, [ebp+8]
mov	edx, [ecx]
push	edx
call	sub_7D0720
add	esp, 4
mov	eax, [ebp+8]
mov	dword ptr [eax], 0
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CAC40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+2BCh]
mov	ecx, [ebp+var_10]
fld	dword ptr [ecx+2BCh]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_7CAC81
or	eax, 0FFFFFFFFh
jmp	short loc_7CACA2

loc_7CAC81:
mov	edx, [ebp+var_4]
fld	dword ptr [edx+2BCh]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+2BCh]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CACA0
mov	eax, 1
jmp	short loc_7CACA2

loc_7CACA0:
xor	eax, eax

loc_7CACA2:
mov	esp, ebp
pop	ebp
retn
sub_7CAC40 endp

align 10h


; Attributes: bp-based frame

sub_7CACB0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+2BCh]
mov	ecx, [ebp+var_10]
fld	dword ptr [ecx+2BCh]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_7CACF3
mov	eax, 1
jmp	short loc_7CAD12

loc_7CACF3:
mov	edx, [ebp+var_4]
fld	dword ptr [edx+2BCh]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+2BCh]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CAD10
or	eax, 0FFFFFFFFh
jmp	short loc_7CAD12

loc_7CAD10:
xor	eax, eax

loc_7CAD12:
mov	esp, ebp
pop	ebp
retn
sub_7CACB0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CAD20(const void *, const void *)
sub_7CAD20 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+2Ch]
mov	ecx, [ebp+var_10]
fld	dword ptr [ecx+2Ch]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_7CAD5B
or	eax, 0FFFFFFFFh
jmp	short loc_7CAD76

loc_7CAD5B:
mov	edx, [ebp+var_4]
fld	dword ptr [edx+2Ch]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+2Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CAD74
mov	eax, 1
jmp	short loc_7CAD76

loc_7CAD74:
xor	eax, eax

loc_7CAD76:
mov	esp, ebp
pop	ebp
retn
sub_7CAD20 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CAD80(const void *, const void *)
sub_7CAD80 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_4]
fld	dword ptr [eax+2Ch]
mov	ecx, [ebp+var_10]
fld	dword ptr [ecx+2Ch]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_7CADBD
mov	eax, 1
jmp	short loc_7CADD6

loc_7CADBD:
mov	edx, [ebp+var_4]
fld	dword ptr [edx+2Ch]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+2Ch]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CADD4
or	eax, 0FFFFFFFFh
jmp	short loc_7CADD6

loc_7CADD4:
xor	eax, eax

loc_7CADD6:
mov	esp, ebp
pop	ebp
retn
sub_7CAD80 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 40h
mov	dword ptr [ebp-8], 0
mov	dword ptr [ebp-4], 0
mov	eax, [ebp+8]
cmp	dword ptr [eax+64h], 0
jz	short loc_7CAE58
mov	ecx, [ebp+8]
mov	edx, [ecx+80h]
mov	eax, [ebp+8]
mov	ecx, [ebp+8]
mov	edx, [ecx+edx*4+68h]
mov	[eax+78h], edx
mov	eax, [ebp+8]
mov	eax, [eax+80h]
add	eax, 1
mov	ecx, [ebp+8]
cdq
idiv	dword ptr [ecx+7Ch]
mov	eax, [ebp+8]
mov	[eax+80h], edx
mov	ecx, [ebp+8]
mov	edx, [ecx+78h]
mov	[ebp-4], edx
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [ebp-4]
mov	eax, [ecx+84h]
mov	[edx+8], eax
mov	ecx, [ebp+8]
mov	edx, [ecx+78h]
add	edx, 20h
mov	eax, [ebp+8]
mov	[eax+78h], edx

loc_7CAE58:
mov	dword_185904C, 0
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 1
jz	loc_7CAF37
mov	dword ptr [ebp-0Ch], 0
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ecx+88h]
mov	[eax+90h], ecx

loc_7CAE8E:
mov	edx, [ebp+8]
mov	eax, [edx]
cmp	dword ptr [eax+90h], 0
jz	short loc_7CAEAF
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [edx+90h]
mov	ecx, [eax+34h]
mov	[ebp-38h], ecx
jmp	short loc_7CAEB6

loc_7CAEAF:
mov	dword ptr [ebp-38h], 0

loc_7CAEB6:
mov	edx, [ebp-38h]
mov	[ebp-8], edx
cmp	dword ptr [ebp-8], 0
jnz	short loc_7CAEC4
jmp	short loc_7CAF37

loc_7CAEC4:
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [ecx+90h]
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [edx]
mov	[ecx+90h], edx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 2
jz	short loc_7CAF1A
mov	edx, [ebp-8]
add	edx, 144h
mov	[ebp-10h], edx
mov	eax, [ebp+8]
add	eax, 20h
push	eax
mov	ecx, [ebp-10h]
push	ecx
lea	edx, [ebp-20h]
push	edx
call	sub_7C6D00
add	esp, 0Ch
mov	eax, [ebp-8]
movss	xmm0, dword ptr	[ebp-18h]
movss	dword ptr [eax+2BCh], xmm0

loc_7CAF1A:
mov	ecx, [ebp-0Ch]
mov	edx, dword_1859044
mov	eax, [ebp-8]
mov	[edx+ecx*4], eax
mov	ecx, [ebp-0Ch]
add	ecx, 1
mov	[ebp-0Ch], ecx
jmp	loc_7CAE8E

loc_7CAF37:
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
and	eax, 1
jz	loc_7CB085
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [edx+84h]
mov	[ebp-28h], eax
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 4
jz	short loc_7CAF7C
push	offset sub_7CAC40
push	4
mov	eax, [ebp-28h]
push	eax
mov	ecx, dword_1859044
push	ecx
call	ds:off_15FDCCC
add	esp, 10h
jmp	short loc_7CAF96

loc_7CAF7C:
push	offset sub_7CACB0
push	4
mov	edx, [ebp-28h]
push	edx
mov	eax, dword_1859044
push	eax
call	ds:off_15FDCCC
add	esp, 10h

loc_7CAF96:
mov	dword ptr [ebp-24h], 0
jmp	short loc_7CAFA8

loc_7CAF9F:
mov	ecx, [ebp-24h]
add	ecx, 1
mov	[ebp-24h], ecx

loc_7CAFA8:
mov	edx, [ebp-24h]
cmp	edx, [ebp-28h]
jge	loc_7CB080
mov	eax, [ebp-24h]
mov	ecx, dword_1859044
mov	edx, [ecx+eax*4]
mov	[ebp-8], edx
mov	eax, [ebp-8]
mov	ecx, [eax+104h]
and	ecx, 40h
jz	short loc_7CB01A
mov	edx, [ebp-8]
fld	dword ptr [edx+304h]
fsub	dword ptr [ebp+0Ch]
mov	eax, [ebp-8]
fstp	dword ptr [eax+304h]
mov	ecx, [ebp-8]
fldz
fld	dword ptr [ecx+304h]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CAFF9
jmp	short loc_7CAF9F

loc_7CAFF9:
mov	edx, [ebp-8]
mov	eax, [edx+104h]
and	eax, 0FFFFFFBFh
mov	ecx, [ebp-8]
mov	[ecx+104h], eax
mov	edx, [ebp-8]
push	edx
call	sub_7CDF30
add	esp, 4

loc_7CB01A:
mov	eax, [ebp-8]
cmp	dword ptr [eax+270h], 0
jz	short loc_7CB03F
push	ecx
fld	dword ptr [ebp+0Ch]
fstp	dword ptr [esp]
mov	ecx, [ebp-8]
push	ecx
mov	edx, [ebp-8]
mov	eax, [edx+270h]
call	eax
add	esp, 8

loc_7CB03F:
mov	ecx, [ebp-8]
mov	edx, [ecx+104h]
and	edx, 10h
jz	short loc_7CB07B
mov	eax, [ebp-8]
mov	ecx, [eax+108h]
cmp	dword ptr [ecx+84h], 0
jnz	short loc_7CB07B
mov	edx, [ebp-8]
push	edx
mov	eax, [ebp+8]
push	eax
call	sub_7CC540
add	esp, 8
lea	ecx, [ebp-8]
push	ecx
call	sub_7CC3E0
add	esp, 4

loc_7CB07B:
jmp	loc_7CAF9F

loc_7CB080:
jmp	loc_7CB1AC

loc_7CB085:
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [eax+88h]
mov	[edx+90h], eax

loc_7CB09B:
mov	ecx, [ebp+8]
mov	edx, [ecx]
cmp	dword ptr [edx+90h], 0
jz	short loc_7CB0BC
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [ecx+90h]
mov	eax, [edx+34h]
mov	[ebp-3Ch], eax
jmp	short loc_7CB0C3

loc_7CB0BC:
mov	dword ptr [ebp-3Ch], 0

loc_7CB0C3:
mov	ecx, [ebp-3Ch]
mov	[ebp-8], ecx
cmp	dword ptr [ebp-8], 0
jnz	short loc_7CB0D4
jmp	loc_7CB1AC

loc_7CB0D4:
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [eax+90h]
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ecx]
mov	[eax+90h], ecx
mov	edx, [ebp-8]
mov	eax, [edx+104h]
and	eax, 40h
jz	short loc_7CB146
mov	ecx, [ebp-8]
fld	dword ptr [ecx+304h]
fsub	dword ptr [ebp+0Ch]
mov	edx, [ebp-8]
fstp	dword ptr [edx+304h]
mov	eax, [ebp-8]
fldz
fld	dword ptr [eax+304h]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CB125
jmp	loc_7CB09B

loc_7CB125:
mov	ecx, [ebp-8]
mov	edx, [ecx+104h]
and	edx, 0FFFFFFBFh
mov	eax, [ebp-8]
mov	[eax+104h], edx
mov	ecx, [ebp-8]
push	ecx
call	sub_7CDF30
add	esp, 4

loc_7CB146:
mov	edx, [ebp-8]
cmp	dword ptr [edx+270h], 0
jz	short loc_7CB16B
push	ecx
fld	dword ptr [ebp+0Ch]
fstp	dword ptr [esp]
mov	eax, [ebp-8]
push	eax
mov	ecx, [ebp-8]
mov	edx, [ecx+270h]
call	edx
add	esp, 8

loc_7CB16B:
mov	eax, [ebp-8]
mov	ecx, [eax+104h]
and	ecx, 10h
jz	short loc_7CB1A7
mov	edx, [ebp-8]
mov	eax, [edx+108h]
cmp	dword ptr [eax+84h], 0
jnz	short loc_7CB1A7
mov	ecx, [ebp-8]
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7CC540
add	esp, 8
lea	eax, [ebp-8]
push	eax
call	sub_7CC3E0
add	esp, 4

loc_7CB1A7:
jmp	loc_7CB09B

loc_7CB1AC:
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 10h
jz	loc_7CB3B2
mov	dword ptr [ebp-30h], 0
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 4
jz	short loc_7CB1EC
push	offset sub_7CAD20
push	4
mov	edx, dword_185904C
push	edx
mov	eax, dword_1859048
push	eax
call	ds:off_15FDCCC
add	esp, 10h
jmp	short loc_7CB20A

loc_7CB1EC:
push	offset sub_7CAD80
push	4
mov	ecx, dword_185904C
push	ecx
mov	edx, dword_1859048
push	edx
call	ds:off_15FDCCC
add	esp, 10h

loc_7CB20A:
mov	dword ptr [ebp-2Ch], 0
jmp	short loc_7CB21C

loc_7CB213:
mov	eax, [ebp-2Ch]
add	eax, 1
mov	[ebp-2Ch], eax

loc_7CB21C:
mov	ecx, [ebp-2Ch]
cmp	ecx, dword_185904C
jge	loc_7CB2E7
mov	edx, [ebp-2Ch]
mov	eax, dword_1859048
mov	ecx, [eax+edx*4]
mov	[ebp-34h], ecx
mov	edx, [ebp-34h]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+2Ch], xmm0
mov	eax, [ebp-34h]
mov	ecx, [eax+78h]
mov	[ebp-8], ecx
mov	edx, [ebp-8]
cmp	edx, [ebp-30h]
jz	short loc_7CB280
mov	eax, [ebp-8]
mov	[ebp-30h], eax
mov	ecx, [ebp-8]
cmp	dword ptr [ecx+2B8h], 0
jz	short loc_7CB280
push	0
mov	edx, [ebp-8]
push	edx
mov	eax, [ebp-8]
mov	ecx, [eax+2B8h]
call	ecx
add	esp, 8

loc_7CB280:
mov	edx, [ebp-8]
cmp	dword ptr [edx+290h], 0
jz	short loc_7CB2B2
mov	eax, [ebp-8]
mov	ecx, [eax+104h]
and	ecx, 4
jz	short loc_7CB2B2
mov	edx, [ebp-34h]
push	edx
mov	eax, [ebp-8]
push	eax
mov	ecx, [ebp-8]
mov	edx, [ecx+290h]
call	edx
add	esp, 8
jmp	short loc_7CB2E2

loc_7CB2B2:
mov	eax, [ebp-8]
cmp	dword ptr [eax+280h], 0
jz	short loc_7CB2E2
mov	ecx, [ebp-8]
mov	edx, [ecx+104h]
and	edx, 4
jz	short loc_7CB2E2
mov	eax, [ebp-34h]
push	eax
mov	ecx, [ebp-8]
push	ecx
mov	edx, [ebp-8]
mov	eax, [edx+280h]
call	eax
add	esp, 8

loc_7CB2E2:
jmp	loc_7CB213

loc_7CB2E7:
cmp	dword ptr [ebp-8], 0
jz	short loc_7CB30D
mov	ecx, [ebp-8]
cmp	dword ptr [ecx+2B8h], 0
jz	short loc_7CB30D
push	1
mov	edx, [ebp-8]
push	edx
mov	eax, [ebp-8]
mov	ecx, [eax+2B8h]
call	ecx
add	esp, 8

loc_7CB30D:
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [eax+88h]
mov	[edx+90h], eax

loc_7CB323:
mov	ecx, [ebp+8]
mov	edx, [ecx]
cmp	dword ptr [edx+90h], 0
jz	short loc_7CB344
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [ecx+90h]
mov	eax, [edx+34h]
mov	[ebp-40h], eax
jmp	short loc_7CB34B

loc_7CB344:
mov	dword ptr [ebp-40h], 0

loc_7CB34B:
mov	ecx, [ebp-40h]
mov	[ebp-8], ecx
cmp	dword ptr [ebp-8], 0
jnz	short loc_7CB359
jmp	short loc_7CB3B2

loc_7CB359:
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [eax+90h]
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ecx]
mov	[eax+90h], ecx
mov	edx, [ebp-8]
mov	eax, [edx+104h]
and	eax, 10h
jz	short loc_7CB3AD
mov	ecx, [ebp-8]
mov	edx, [ecx+108h]
cmp	dword ptr [edx+84h], 0
jnz	short loc_7CB3AD
mov	eax, [ebp-8]
push	eax
mov	ecx, [ebp+8]
push	ecx
call	sub_7CC540
add	esp, 8
lea	edx, [ebp-8]
push	edx
call	sub_7CC3E0
add	esp, 4

loc_7CB3AD:
jmp	loc_7CB323

loc_7CB3B2:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
push	edi
mov	eax, [ebp+0Ch]
mov	[ebp-0Ch], eax
cmp	dword ptr [ebp-0Ch], 0
jz	short loc_7CB3E9
cmp	dword ptr [ebp-0Ch], 1
jz	short loc_7CB439
cmp	dword ptr [ebp-0Ch], 2
jz	loc_7CB466
jmp	loc_7CB587

loc_7CB3E9:
mov	ecx, [ebp+10h]
mov	[ebp-4], ecx
cmp	dword ptr [ebp-4], 0
jz	short loc_7CB416
mov	esi, [ebp-4]
mov	edi, [ebp+8]
add	edi, 20h
mov	ecx, 10h
rep movsd
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
or	eax, 2
mov	ecx, [ebp+8]
mov	[ecx+0Ch], eax
jmp	short loc_7CB434

loc_7CB416:
mov	edx, [ebp+8]
add	edx, 20h
push	edx
call	sub_7C63A0
add	esp, 4
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFFDh
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx

loc_7CB434:
jmp	loc_7CB587

loc_7CB439:
mov	eax, [ebp+10h]
cmp	dword ptr [eax], 0
jnz	short loc_7CB452
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 0FFFFFFFBh
mov	eax, [ebp+8]
mov	[eax+0Ch], edx
jmp	short loc_7CB461

loc_7CB452:
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
or	edx, 4
mov	eax, [ebp+8]
mov	[eax+0Ch], edx

loc_7CB461:
jmp	loc_7CB587

loc_7CB466:
cmp	dword ptr [ebp+10h], 0
jnz	short loc_7CB49E
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 0FFFFFFFEh
mov	eax, [ebp+8]
mov	[eax+0Ch], edx
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 0FFFFFFF7h
mov	eax, [ebp+8]
mov	[eax+0Ch], edx
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 0FFFFFFEFh
mov	eax, [ebp+8]
mov	[eax+0Ch], edx
jmp	loc_7CB587

loc_7CB49E:
mov	ecx, [ebp+10h]
mov	edx, [ecx]
mov	[ebp-8], edx
cmp	dword ptr [ebp-8], 0
jnz	short loc_7CB4D9
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFFEh
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFF7h
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFEFh
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx

loc_7CB4D9:
cmp	dword ptr [ebp-8], 1
jnz	short loc_7CB4FD
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFEFh
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
or	ecx, 1
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx

loc_7CB4FD:
cmp	dword ptr [ebp-8], 2
jnz	short loc_7CB521
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFEFh
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
or	ecx, 8
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx

loc_7CB521:
cmp	dword ptr [ebp-8], 4
jnz	short loc_7CB554
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFFEh
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFF7h
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
or	ecx, 10h
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx

loc_7CB554:
cmp	dword ptr [ebp-8], 3
jnz	short loc_7CB587
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
and	ecx, 0FFFFFFEFh
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
or	ecx, 1
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
or	ecx, 8
mov	edx, [ebp+8]
mov	[edx+0Ch], ecx

loc_7CB587:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
push	esi
push	edi
mov	eax, [ebp+0Ch]
mov	[ebp-8], eax
cmp	dword ptr [ebp-8], 0
jz	short loc_7CB5BC
cmp	dword ptr [ebp-8], 2
jz	short loc_7CB5AC
jmp	short loc_7CB5D2

loc_7CB5AC:
mov	ecx, [ebp+8]
mov	edx, [ecx+0Ch]
and	edx, 19h
mov	eax, [ebp+10h]
mov	[eax], edx
jmp	short loc_7CB5D2

loc_7CB5BC:
mov	ecx, [ebp+10h]
mov	[ebp-4], ecx
mov	esi, [ebp+8]
add	esi, 20h
mov	ecx, 10h
mov	edi, [ebp-4]
rep movsd

loc_7CB5D2:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CB5EF
cmp	dword ptr [ebp+0Ch], 20h
jl	short loc_7CB5F4

loc_7CB5EF:
or	eax, 0FFFFFFFFh
jmp	short loc_7CB603

loc_7CB5F4:
mov	eax, [ebp+0Ch]
mov	ecx, [ebp+8]
mov	dword_19725E0[eax*4], ecx
xor	eax, eax

loc_7CB603:
pop	ebp
retn
align 10h
; [0000000F BYTES: COLLAPSED FUNCTION ___setargv. PRESS	KEYPAD "+" TO EXPAND]
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
movss	xmm0, dword ptr	[eax]
movss	dword_1681594, xmm0
mov	ecx, [ebp+8]
movss	xmm0, dword ptr	[ecx+4]
movss	dword_1681598, xmm0
mov	edx, [ebp+8]
movss	xmm0, dword ptr	[edx+8]
movss	dword_168159C, xmm0
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, dword_185903C
mov	eax, [eax+8]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, dword_1859040
mov	eax, [eax+8]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, dword_1859038
mov	eax, [eax+8]
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CB690 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	dword_19715E0
mov	ecx, [ebp+arg_4]
mov	edx, dword_1859058
mov	[ecx], edx
pop	ebp
retn
sub_7CB690 endp

align 10h


; Attributes: bp-based frame

sub_7CB6B0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 18h
push	esi
push	edi
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2C0h]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_18]
mov	edx, [ecx+78h]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_8]
mov	eax, [ecx+10Ch]
mov	[edx+8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_8]
mov	ecx, [edx+68h]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_8]
mov	edx, [eax+128h]
mov	[ecx+0Ch], edx
mov	esi, [ebp+arg_0]
add	esi, 114h
mov	edi, [ebp+var_8]
add	edi, 10h
mov	ecx, 10h
rep movsd
mov	eax, [ebp+var_18]
mov	ecx, [eax+78h]
add	ecx, 80h
mov	edx, [ebp+var_18]
mov	[edx+78h], ecx
mov	eax, [ebp+var_18]
mov	ecx, [eax+0Ch]
and	ecx, 8
jnz	short loc_7CB756
mov	edx, [ebp+var_18]
mov	eax, [edx+0Ch]
and	eax, 10h
jz	loc_7CB8E1

loc_7CB756:
mov	[ebp+var_C], 0
jmp	short loc_7CB768

loc_7CB75F:
mov	ecx, [ebp+var_C]
add	ecx, 1
mov	[ebp+var_C], ecx

loc_7CB768:
mov	edx, [ebp+var_C]
cmp	edx, dword_185904C
jge	loc_7CB8DC
mov	eax, [ebp+var_C]
mov	ecx, dword_1859048
mov	edx, [ecx+eax*4]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_18]
mov	ecx, [eax+78h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_14]
fld	dword ptr [eax+20h]
fstp	dword ptr [edx]
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_14]
fld	dword ptr [edx+24h]
fstp	dword ptr [ecx+4]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_14]
fld	dword ptr [ecx+28h]
fstp	dword ptr [eax+8]
mov	edx, [ebp+var_10]
fld	dword ptr [edx+98h]
mov	eax, [ebp+var_14]
fadd	dword ptr [eax+58h]
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+0Ch]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+128h]
push	ecx
call	sub_7CECF0
add	esp, 4
mov	edx, [ebp+var_4]
fld	dword ptr [eax]
fstp	dword ptr [edx+20h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+128h]
push	edx
call	sub_7CECF0
add	esp, 4
mov	ecx, [ebp+var_4]
fld	dword ptr [eax+8]
fstp	dword ptr [ecx+28h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+128h]
push	ecx
call	sub_7CECF0
add	esp, 4
mov	edx, [ebp+var_4]
fld	dword ptr [eax+4]
fstp	dword ptr [edx+24h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+128h]
push	edx
call	sub_7CECF0
add	esp, 4
mov	ecx, [ebp+var_4]
fld	dword ptr [eax+8]
fstp	dword ptr [ecx+2Ch]
mov	edx, [ebp+var_10]
fld	dword ptr [edx+88h]
mov	eax, [ebp+var_14]
fmul	dword ptr [eax+54h]
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+30h]
mov	edx, [ebp+var_10]
fld	dword ptr [edx+8Ch]
mov	eax, [ebp+var_14]
fmul	dword ptr [eax+54h]
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+34h]
mov	edx, [ebp+var_10]
fld	dword ptr [edx+0A8h]
mov	eax, [ebp+var_14]
fmul	dword ptr [eax+40h]
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+10h]
mov	edx, [ebp+var_10]
fld	dword ptr [edx+0ACh]
mov	eax, [ebp+var_14]
fmul	dword ptr [eax+44h]
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+14h]
mov	edx, [ebp+var_10]
fld	dword ptr [edx+0B0h]
mov	eax, [ebp+var_14]
fmul	dword ptr [eax+48h]
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+18h]
mov	edx, [ebp+var_10]
fld	dword ptr [edx+0B4h]
mov	eax, [ebp+var_14]
fmul	dword ptr [eax+4Ch]
mov	ecx, [ebp+var_4]
fstp	dword ptr [ecx+1Ch]
mov	edx, [ebp+var_18]
mov	eax, [edx+78h]
add	eax, 40h
mov	ecx, [ebp+var_18]
mov	[ecx+78h], eax
jmp	loc_7CB75F

loc_7CB8DC:
jmp	loc_7CBA68

loc_7CB8E1:
mov	edx, [ebp+arg_0]
push	edx
call	sub_7CD410
add	esp, 4

loc_7CB8ED:
mov	eax, [ebp+arg_0]
push	eax
call	sub_7CD470
add	esp, 4
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jz	loc_7CBA68
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7CD440
add	esp, 4
mov	edx, [ebp+var_18]
mov	eax, [edx+78h]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_14]
fld	dword ptr [edx+20h]
fstp	dword ptr [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_14]
fld	dword ptr [ecx+24h]
fstp	dword ptr [eax+4]
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_14]
fld	dword ptr [eax+28h]
fstp	dword ptr [edx+8]
mov	ecx, [ebp+var_10]
fld	dword ptr [ecx+98h]
mov	edx, [ebp+var_14]
fadd	dword ptr [edx+58h]
mov	eax, [ebp+var_4]
fstp	dword ptr [eax+0Ch]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [edx+128h]
push	eax
call	sub_7CECF0
add	esp, 4
mov	ecx, [ebp+var_4]
fld	dword ptr [eax]
fstp	dword ptr [ecx+20h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+128h]
push	ecx
call	sub_7CECF0
add	esp, 4
mov	edx, [ebp+var_4]
fld	dword ptr [eax+8]
fstp	dword ptr [edx+28h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+128h]
push	edx
call	sub_7CECF0
add	esp, 4
mov	ecx, [ebp+var_4]
fld	dword ptr [eax+4]
fstp	dword ptr [ecx+24h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+128h]
push	ecx
call	sub_7CECF0
add	esp, 4
mov	edx, [ebp+var_4]
fld	dword ptr [eax+8]
fstp	dword ptr [edx+2Ch]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+88h]
mov	ecx, [ebp+var_14]
fmul	dword ptr [ecx+54h]
mov	edx, [ebp+var_4]
fstp	dword ptr [edx+30h]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+8Ch]
mov	ecx, [ebp+var_14]
fmul	dword ptr [ecx+54h]
mov	edx, [ebp+var_4]
fstp	dword ptr [edx+34h]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+0A8h]
mov	ecx, [ebp+var_14]
fmul	dword ptr [ecx+40h]
mov	edx, [ebp+var_4]
fstp	dword ptr [edx+10h]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+0ACh]
mov	ecx, [ebp+var_14]
fmul	dword ptr [ecx+44h]
mov	edx, [ebp+var_4]
fstp	dword ptr [edx+14h]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+0B0h]
mov	ecx, [ebp+var_14]
fmul	dword ptr [ecx+48h]
mov	edx, [ebp+var_4]
fstp	dword ptr [edx+18h]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+0B4h]
mov	ecx, [ebp+var_14]
fmul	dword ptr [ecx+4Ch]
mov	edx, [ebp+var_4]
fstp	dword ptr [edx+1Ch]
mov	eax, [ebp+var_18]
mov	ecx, [eax+78h]
add	ecx, 40h
mov	edx, [ebp+var_18]
mov	[edx+78h], ecx
jmp	loc_7CB8ED

loc_7CBA68:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	edx, [ebp+var_8]
mov	eax, [ecx+84h]
mov	[edx+4], eax
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7CB6B0 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+8]
mov	dword ptr [eax+64h], 1
mov	ecx, [ebp+8]
mov	edx, [ebp+0Ch]
mov	[ecx+7Ch], edx
mov	eax, [ebp+8]
cmp	dword ptr [eax+7Ch], 4
jle	short loc_7CBABC
mov	ecx, [ebp+8]
mov	dword ptr [ecx+7Ch], 4

loc_7CBABC:
cmp	dword ptr [ebp+10h], 0
jz	short loc_7CBAE4
mov	edx, [ebp+8]
mov	eax, [edx+7Ch]
shl	eax, 2
push	eax
mov	ecx, [ebp+10h]
push	ecx
mov	edx, [ebp+8]
add	edx, 68h
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
jmp	loc_7CBB82

loc_7CBAE4:
mov	eax, [ebp+18h]
shl	eax, 6
mov	ecx, [ebp+14h]
shl	ecx, 7
lea	edx, [eax+ecx+20h]
mov	[ebp-8], edx
push	0
push	0
mov	eax, [ebp+8]
mov	ecx, [ebp-8]
imul	ecx, [eax+7Ch]
push	ecx
call	sub_7D0080
add	esp, 0Ch
mov	edx, [ebp+8]
mov	[edx+84h], eax
mov	eax, [ebp+8]
cmp	dword ptr [eax+84h], 0
jnz	short loc_7CBB2A
xor	eax, eax
jmp	loc_7CBC57

loc_7CBB2A:
mov	ecx, [ebp+8]
mov	edx, [ebp-8]
imul	edx, [ecx+7Ch]
push	edx
push	0
mov	eax, [ebp+8]
mov	ecx, [eax+84h]
push	ecx
call	_memset
add	esp, 0Ch
mov	dword ptr [ebp-4], 0
jmp	short loc_7CBB5B

loc_7CBB52:
mov	edx, [ebp-4]
add	edx, 1
mov	[ebp-4], edx

loc_7CBB5B:
mov	eax, [ebp+8]
mov	ecx, [ebp-4]
cmp	ecx, [eax+7Ch]
jge	short loc_7CBB82
mov	edx, [ebp-8]
imul	edx, [ebp-4]
mov	eax, [ebp+8]
add	edx, [eax+84h]
mov	ecx, [ebp-4]
mov	eax, [ebp+8]
mov	[eax+ecx*4+68h], edx
jmp	short loc_7CBB52

loc_7CBB82:
mov	dword ptr [ebp-4], 0
jmp	short loc_7CBB94

loc_7CBB8B:
mov	ecx, [ebp-4]
add	ecx, 1
mov	[ebp-4], ecx

loc_7CBB94:
mov	edx, [ebp+8]
mov	eax, [ebp-4]
cmp	eax, [edx+7Ch]
jge	short loc_7CBC02
mov	ecx, [ebp-4]
mov	edx, [ebp+8]
mov	eax, [edx+ecx*4+68h]
mov	dword ptr [eax], 0
mov	ecx, [ebp-4]
mov	edx, [ebp+8]
mov	eax, [edx+ecx*4+68h]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp-4]
mov	edx, [ebp+8]
mov	eax, [edx+ecx*4+68h]
mov	ecx, [ebp+8]
mov	[eax+0Ch], ecx
mov	edx, [ebp-4]
mov	eax, [ebp+8]
mov	ecx, [eax+edx*4+68h]
mov	edx, [ebp-4]
mov	[ecx+10h], edx
mov	eax, [ebp-4]
mov	ecx, [ebp+8]
mov	edx, [ecx+eax*4+68h]
mov	eax, [ebp+14h]
mov	[edx+14h], eax
mov	ecx, [ebp-4]
mov	edx, [ebp+8]
mov	eax, [edx+ecx*4+68h]
mov	ecx, [ebp+18h]
mov	[eax+18h], ecx
jmp	short loc_7CBB8B

loc_7CBC02:
mov	dword ptr [ebp-4], 0
jmp	short loc_7CBC14

loc_7CBC0B:
mov	edx, [ebp-4]
add	edx, 1
mov	[ebp-4], edx

loc_7CBC14:
mov	eax, [ebp+8]
mov	ecx, [eax+7Ch]
sub	ecx, 1
cmp	[ebp-4], ecx
jge	short loc_7CBC3B
mov	edx, [ebp-4]
mov	eax, [ebp+8]
mov	ecx, [eax+edx*4+68h]
mov	edx, [ebp-4]
mov	eax, [ebp+8]
mov	edx, [eax+edx*4+6Ch]
mov	[ecx+4], edx
jmp	short loc_7CBC0B

loc_7CBC3B:
mov	eax, [ebp+8]
mov	ecx, [eax+7Ch]
mov	edx, [ebp+8]
mov	eax, [edx+ecx*4+64h]
mov	ecx, [ebp+8]
mov	edx, [ecx+68h]
mov	[eax+4], edx
mov	eax, [ebp+8]
mov	eax, [eax+68h]

loc_7CBC57:
mov	esp, ebp
pop	ebp
retn
align 10h
; [0000000B BYTES: COLLAPSED FUNCTION __tolower. PRESS KEYPAD "+" TO EXPAND]
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
add	eax, 80h
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
add	eax, 40h
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CBC90 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+308h]
fld	flt_16815A4
fcomip	st, st(1)
fstp	st
jb	short loc_7CBCBD
movss	xmm0, flt_16815A4
movss	[ebp+var_4], xmm0
jmp	loc_7CBD4E

loc_7CBCBD:
mov	ecx, [ebp+arg_0]
fld	flt_16815A8
fld	dword ptr [ecx+308h]
fcomip	st, st(1)
fstp	st
jb	short loc_7CBCE1
movss	xmm0, flt_16815A8
movss	[ebp+var_4], xmm0
jmp	short loc_7CBD4E

loc_7CBCE1:
fld	flt_16815AC
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+308h]
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+308h]
fstp	[ebp+var_8]
fld	flt_16815A8
fsub	flt_16815A4
fmul	[ebp+var_8]
fadd	flt_16815A4
fstp	[ebp+var_4]
fld	flt_16815A8
fld	[ebp+var_4]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CBD32
movss	xmm0, flt_16815A8
movss	[ebp+var_4], xmm0
jmp	short loc_7CBD4E

loc_7CBD32:
fld	[ebp+var_4]
fld	flt_16815A4
fcomip	st, st(1)
fstp	st
jbe	short loc_7CBD4E
movss	xmm0, flt_16815A4
movss	[ebp+var_4], xmm0

loc_7CBD4E:
fld	[ebp+var_4]
fsub	flt_16815A4
fstp	[ebp+var_4]
fld	[ebp+var_4]
fadd	ds:dbl_15FD2F0
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+314h]
fcomip	st, st(1)
fstp	st
ja	short loc_7CBD8C
fld	[ebp+var_4]
fsub	ds:dbl_15FD2F0
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+314h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_7CBDB7

loc_7CBD8C:
fld	[ebp+var_4]
mov	eax, [ebp+arg_0]
fsub	dword ptr [eax+310h]
fmul	flt_16815A0
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+318h]
mov	edx, [ebp+arg_0]
movss	xmm0, [ebp+var_4]
movss	dword ptr [edx+314h], xmm0

loc_7CBDB7:
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+310h]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+314h]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CBE16
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+310h]
mov	eax, [ebp+arg_0]
fadd	dword ptr [eax+318h]
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+310h]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+310h]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+314h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_7CBE16
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+314h]
fstp	dword ptr [ecx+310h]

loc_7CBE16:
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+310h]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+314h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jbe	short loc_7CBE7B
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+318h]
fmul	ds:dbl_15FCD40
mov	eax, [ebp+arg_0]
fadd	dword ptr [eax+310h]
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+310h]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+310h]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+314h]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CBE7B
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+314h]
fstp	dword ptr [ecx+310h]

loc_7CBE7B:
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+310h]
fld1
fsubrp	st(1), st
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+30Ch]
mov	esp, ebp
pop	ebp
retn
sub_7CBC90 endp

align 10h
push	ebp
mov	ebp, esp
fldz
fld	flt_16815A0
fcomip	st, st(1)
fstp	st
jb	short loc_7CBEBE
movss	xmm0, dword ptr	[ebp+8]
movss	flt_16815A0, xmm0

loc_7CBEBE:
fldz
fld	flt_16815A4
fcomip	st, st(1)
fstp	st
jb	short loc_7CBED9
movss	xmm0, dword ptr	[ebp+0Ch]
movss	flt_16815A4, xmm0

loc_7CBED9:
fldz
fld	flt_16815A8
fcomip	st, st(1)
fstp	st
jb	short loc_7CBEF4
movss	xmm0, dword ptr	[ebp+10h]
movss	flt_16815A8, xmm0

loc_7CBEF4:
fldz
fld	flt_16815AC
fcomip	st, st(1)
fstp	st
jb	short loc_7CBF0F
movss	xmm0, dword ptr	[ebp+14h]
movss	flt_16815AC, xmm0

loc_7CBF0F:
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	dword_16815B0, eax
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
mov	dword ptr [ebp-4], 0
mov	eax, dword_185903C
push	eax
call	sub_7D06D0
add	esp, 4
mov	[ebp-8], eax
cmp	dword ptr [ebp-8], 0
jnz	short loc_7CBF5C
or	eax, 0FFFFFFFFh
jmp	loc_7CC318

loc_7CBF5C:
push	0
push	offset aLclparticles ; "LclParticles"
mov	ecx, [ebp-8]
add	ecx, 108h
push	ecx
call	sub_7D09A0
add	esp, 0Ch
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jge	short loc_7CBF92
mov	edx, [ebp-8]
push	edx
call	sub_7D0720
add	esp, 4
mov	eax, [ebp-4]
jmp	loc_7CC318

loc_7CBF92:
mov	eax, [ebp-8]
mov	dword ptr [eax+334h], 0
cmp	dword_1859040, 0
jnz	short loc_7CBFE9
push	7Ch
mov	ecx, [ebp+14h]
cvttss2si edx, dword ptr [ecx+0E4h]
push	edx
mov	eax, [ebp-8]
push	eax
mov	ecx, [ebp-8]
add	ecx, 334h
push	ecx
call	sub_7D0580
add	esp, 10h
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jge	short loc_7CBFE9
mov	edx, [ebp-8]
push	edx
call	sub_7D0720
add	esp, 4
mov	eax, [ebp-4]
jmp	loc_7CC318

loc_7CBFE9:
mov	eax, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+10Ch], xmm0
mov	ecx, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+110h], xmm0
cmp	dword ptr [ebp+10h], 0
jz	short loc_7CC02C
mov	edx, [ebp+10h]
push	edx
mov	eax, [ebp-8]
add	eax, 114h
push	eax
call	sub_7C66B0
add	esp, 8
jmp	short loc_7CC03E

loc_7CC02C:
mov	ecx, [ebp-8]
add	ecx, 114h
push	ecx
call	sub_7C63A0
add	esp, 4

loc_7CC03E:
mov	edx, [ebp-8]
add	edx, 114h
push	edx
mov	eax, [ebp-8]
add	eax, 2C4h
push	eax
call	sub_7C66B0
add	esp, 8
mov	ecx, [ebp-8]
mov	dword ptr [ecx+16Ch], 0
mov	edx, [ebp-8]
mov	eax, [ebp+14h]
mov	[edx+168h], eax
mov	ecx, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+2A8h], xmm0
mov	edx, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+2A4h], xmm0
mov	eax, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+2BCh], xmm0
mov	ecx, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+308h], xmm0
mov	edx, [ebp-8]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [edx+30Ch], xmm0
mov	eax, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+314h], xmm0
mov	ecx, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+310h], xmm0
mov	edx, [ebp-8]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+318h], xmm0
push	100h
push	0
mov	eax, [ebp-8]
add	eax, 170h
push	eax
call	_memset
add	esp, 0Ch
mov	ecx, [ebp-8]
mov	dword ptr [ecx+2A0h], 0
mov	edx, [ebp-8]
mov	dword ptr [edx+270h], offset sub_7CC5A0
mov	eax, [ebp-8]
mov	dword ptr [eax+284h], offset sub_7C9690
mov	ecx, [ebp-8]
mov	dword ptr [ecx+280h], 0
mov	edx, [ebp-8]
mov	dword ptr [edx+274h], offset sub_7CD0A0
mov	eax, [ebp-8]
mov	dword ptr [eax+278h], offset sub_7CC910
mov	ecx, [ebp-8]
mov	dword ptr [ecx+288h], offset sub_7CD490
mov	edx, [ebp-8]
mov	dword ptr [edx+294h], 0
mov	eax, [ebp-8]
mov	dword ptr [eax+290h], 0
mov	ecx, [ebp-8]
mov	dword ptr [ecx+298h], 0
mov	edx, [ebp-8]
mov	dword ptr [edx+2ACh], 0
mov	eax, [ebp-8]
mov	dword ptr [eax+2B0h], 0
mov	ecx, [ebp-8]
mov	dword ptr [ecx+2B8h], 0
mov	edx, [ebp-8]
mov	dword ptr [edx+27Ch], 0
mov	eax, [ebp-8]
mov	dword ptr [eax+29Ch], 0
mov	ecx, [ebp+14h]
cmp	dword ptr [ecx+194h], 0
jle	short loc_7CC218
mov	edx, [ebp-8]
mov	dword ptr [edx+294h], offset sub_7C6E20
mov	eax, [ebp-8]
mov	dword ptr [eax+290h], offset sub_7C6EB0
mov	ecx, [ebp-8]
mov	dword ptr [ecx+298h], offset sub_7C7430

loc_7CC218:
mov	edx, [ebp-8]
mov	eax, [edx+168h]
mov	ecx, [eax+68h]
and	ecx, 200h
jz	short loc_7CC23B
mov	edx, [ebp-8]
mov	dword ptr [edx+288h], offset sub_7C7E80
jmp	short loc_7CC27E

loc_7CC23B:
mov	eax, [ebp-8]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 8000h
jz	short loc_7CC25E
mov	eax, [ebp-8]
mov	dword ptr [eax+284h], offset sub_7C8350
jmp	short loc_7CC27E

loc_7CC25E:
mov	ecx, [ebp-8]
mov	edx, [ecx+168h]
mov	eax, [edx+68h]
and	eax, 100h
jz	short loc_7CC27E
mov	ecx, [ebp-8]
mov	dword ptr [ecx+288h], offset sub_7C7E80

loc_7CC27E:
mov	edx, [ebp+0Ch]
push	edx
push	104h
mov	eax, [ebp-8]
push	eax
call	ds:off_15FDCD0
add	esp, 0Ch
mov	ecx, [ebp-8]
mov	dword ptr [ecx+104h], 6
mov	edx, [ebp+8]
mov	eax, [ebp-8]
mov	[edx], eax
mov	ecx, [ebp+14h]
fld	dword ptr [ecx+50h]
fld1
fdivrp	st(1), st
mov	edx, [ebp-8]
fstp	dword ptr [edx+320h]
mov	eax, [ebp+14h]
fld	dword ptr [eax+54h]
mov	ecx, [ebp+14h]
fsub	dword ptr [ecx+50h]
fld1
fdivrp	st(1), st
mov	edx, [ebp-8]
fstp	dword ptr [edx+324h]
mov	eax, [ebp+14h]
fld	dword ptr [eax+54h]
fld1
fsubrp	st(1), st
fld1
fdivrp	st(1), st
mov	ecx, [ebp-8]
fstp	dword ptr [ecx+328h]
mov	edx, [ebp+14h]
fld	dword ptr [edx+78h]
fld1
fdivrp	st(1), st
mov	eax, [ebp-8]
fstp	dword ptr [eax+32Ch]
mov	ecx, [ebp+14h]
fld	dword ptr [ecx+78h]
fld1
fsubrp	st(1), st
fld1
fdivrp	st(1), st
mov	edx, [ebp-8]
fstp	dword ptr [edx+330h]
xor	eax, eax

loc_7CC318:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+8]
mov	ecx, [eax]
push	ecx
call	sub_7D0920
add	esp, 4
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ebp+8]
mov	edx, [ecx]
mov	eax, [eax+88h]
mov	[edx+90h], eax

loc_7CC34A:
mov	ecx, [ebp+8]
mov	edx, [ecx]
cmp	dword ptr [edx+90h], 0
jz	short loc_7CC36B
mov	eax, [ebp+8]
mov	ecx, [eax]
mov	edx, [ecx+90h]
mov	eax, [edx+34h]
mov	[ebp-8], eax
jmp	short loc_7CC372

loc_7CC36B:
mov	dword ptr [ebp-8], 0

loc_7CC372:
mov	ecx, [ebp-8]
mov	[ebp-4], ecx
cmp	dword ptr [ebp-4], 0
jz	short loc_7CC3C2
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [eax+90h]
mov	edx, [ebp+8]
mov	eax, [edx]
mov	ecx, [ecx]
mov	[eax+90h], ecx
mov	edx, [ebp-4]
mov	eax, [edx+2B0h]
cmp	eax, [ebp+0Ch]
jnz	short loc_7CC3C0
mov	ecx, [ebp-4]
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7CC540
add	esp, 8
lea	eax, [ebp-4]
push	eax
call	sub_7CC3E0
add	esp, 4

loc_7CC3C0:
jmp	short loc_7CC34A

loc_7CC3C2:
mov	ecx, [ebp+8]
mov	edx, [ecx]
push	edx
call	sub_7D0960
add	esp, 4
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CC3E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jz	short loc_7CC400
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+108h], 0
jnz	short loc_7CC405

loc_7CC400:
jmp	loc_7CC4F6

loc_7CC405:
mov	eax, [ebp+var_4]
mov	ecx, [eax+108h]
cmp	dword ptr [ecx+88h], 0
jz	short loc_7CC46C
mov	edx, [ebp+var_4]
mov	eax, [edx+108h]
mov	ecx, [eax+88h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+108h]
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
mov	[eax+88h], edx
mov	eax, [ebp+var_8]
push	eax
call	sub_7D0720
add	esp, 4
mov	ecx, [ebp+var_4]
mov	edx, [ecx+108h]
mov	eax, [edx+84h]
sub	eax, 1
mov	ecx, [ebp+var_4]
mov	edx, [ecx+108h]
mov	[edx+84h], eax
jmp	short loc_7CC405

loc_7CC46C:
mov	eax, [ebp+var_4]
mov	ecx, [eax+108h]
push	ecx
call	sub_7D0720
add	esp, 4
mov	edx, [ebp+var_4]
mov	dword ptr [edx+108h], 0
mov	eax, [ebp+var_4]
mov	ecx, [eax+104h]
and	ecx, 20h
jz	short loc_7CC4A5
mov	edx, [ebp+var_4]
push	edx
call	sub_7C6F80
add	esp, 4

loc_7CC4A5:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+2ACh], 0
jz	short loc_7CC4C3
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+2ACh]
call	eax
add	esp, 4

loc_7CC4C3:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+334h], 0
jz	short loc_7CC4E1
mov	edx, [ebp+var_4]
add	edx, 334h
push	edx
call	sub_7D06B0
add	esp, 4

loc_7CC4E1:
mov	eax, [ebp+var_4]
push	eax
call	sub_7D0720
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], 0

loc_7CC4F6:
mov	esp, ebp
pop	ebp
retn
sub_7CC3E0 endp

align 10h


; Attributes: bp-based frame

sub_7CC500 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
push	1		; int
mov	eax, [ebp+arg_4]
push	eax		; int
push	offset aLocemitter ; "LocEmitter"
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx		; int
call	sub_7D0AE0
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax+16Ch], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	[edx+2C0h], eax
mov	esp, ebp
pop	ebp
retn
sub_7CC500 endp

align 10h


; Attributes: bp-based frame

sub_7CC540 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+16Ch], 0
jz	short loc_7CC593
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+16Ch]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_7D0C40
add	esp, 8
mov	edx, [ebp+arg_4]
mov	eax, [edx+16Ch]
push	eax
call	sub_7D0720
add	esp, 4
mov	ecx, [ebp+arg_4]
mov	dword ptr [ecx+16Ch], 0
mov	edx, [ebp+arg_4]
mov	dword ptr [edx+2C0h], 0

loc_7CC593:
pop	ebp
retn
sub_7CC540 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CC5A0(int, float)
sub_7CC5A0 proc	near

var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
push	esi
movss	xmm0, ds:SrcStr
movss	[ebp+var_8], xmm0
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+104h]
and	ecx, 2
jnz	short loc_7CC5CE
jmp	loc_7CC904

loc_7CC5CE:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	[ebp+arg_4]
fmul	dword ptr [eax+110h]
fstp	[ebp+arg_4]
mov	ecx, [ebp+arg_0]
movss	xmm0, dword_1681594
movss	dword ptr [ecx+154h], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, dword_1681598
movss	dword ptr [edx+158h], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, dword_168159C
movss	dword ptr [eax+15Ch], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [edx+68h]
and	eax, 80000000h
jnz	short loc_7CC66B
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+29Ch], 0
jz	short loc_7CC656
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+29Ch]
call	ecx
add	esp, 4
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+308h]

loc_7CC656:
cmp	dword_16815B0, 0
jz	short loc_7CC66B
mov	eax, [ebp+arg_0]
push	eax
call	sub_7CBC90
add	esp, 4

loc_7CC66B:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
and	edx, 1
jnz	loc_7CC7AC
mov	eax, [ebp+arg_0]
mov	ecx, [eax+104h]
and	ecx, 8
jnz	loc_7CC7AA
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+27Ch], 0
jz	short loc_7CC6BC
push	ecx
fld	[ebp+arg_4]
fstp	[esp+14h+var_14]
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+27Ch]
call	edx
add	esp, 8
mov	[ebp+var_C], eax
jmp	loc_7CC748

loc_7CC6BC:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+0CCh]
fmul	[ebp+arg_4]
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+30Ch]
fstp	[ebp+var_8]
cvttss2si eax, [ebp+var_8]
mov	[ebp+var_C], eax
fild	[ebp+var_C]
fsubr	[ebp+var_8]
mov	ecx, [ebp+arg_0]
fadd	dword ptr [ecx+110h]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+110h]
mov	eax, [ebp+arg_0]
fld1
fld	dword ptr [eax+110h]
fcomip	st, st(1)
fstp	st
jb	short loc_7CC727
mov	ecx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+110h], xmm0
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_C], edx

loc_7CC727:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 40000000h
jz	short loc_7CC748
cmp	[ebp+var_C], 1
jle	short loc_7CC748
mov	[ebp+var_C], 1

loc_7CC748:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	esi, [ebp+var_C]
add	esi, [ecx+84h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30Ch]
fmul	dword ptr [eax+0E4h]
call	__ftol2_sse
cmp	esi, eax
jle	short loc_7CC7AA
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+30Ch]
fmul	dword ptr [eax+0E4h]
call	__ftol2_sse
mov	edx, [ebp+arg_0]
mov	ecx, [edx+108h]
sub	eax, [ecx+84h]
mov	[ebp+var_C], eax

loc_7CC7AA:
jmp	short loc_7CC7B9

loc_7CC7AC:
movss	xmm0, ds:SrcStr
movss	[ebp+arg_4], xmm0

loc_7CC7B9:
cmp	[ebp+var_C], 0
jge	short loc_7CC7C6
mov	[ebp+var_C], 0

loc_7CC7C6:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C]
mov	[edx+160h], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+278h], 0
jz	short loc_7CC7F0
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+278h]
call	ecx
add	esp, 4

loc_7CC7F0:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+294h], 0
jz	short loc_7CC817
push	ecx
fld	[ebp+arg_4]
fstp	[esp+14h+var_14]
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+294h]
call	edx
add	esp, 8
jmp	short loc_7CC83C

loc_7CC817:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+288h], 0
jz	short loc_7CC83C
push	ecx
fld	[ebp+arg_4]
fstp	[esp+14h+var_14]
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+288h]
call	eax
add	esp, 8

loc_7CC83C:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+274h], 0
jz	short loc_7CC861
push	ecx
fld	[ebp+arg_4]
fstp	[esp+14h+var_14]
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+274h]
call	ecx
add	esp, 8

loc_7CC861:
mov	edx, [ebp+arg_0]
mov	eax, [edx+2C0h]
cmp	dword ptr [eax+64h], 0
jz	short loc_7CC87C
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7CB6B0
add	esp, 4

loc_7CC87C:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+28Ch], 0
jz	short loc_7CC89A
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+28Ch]
call	edx
add	esp, 4

loc_7CC89A:
mov	[ebp+var_4], 0
jmp	short loc_7CC8AC

loc_7CC8A3:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_7CC8AC:
mov	ecx, [ebp+var_4]
cmp	ecx, dword_1859058
jge	short loc_7CC8E9
mov	edx, [ebp+var_4]
mov	eax, dword_19715E0[edx*4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+108h]
push	edx
call	sub_7D0C40
add	esp, 8
mov	eax, [ebp+var_4]
mov	ecx, dword_19715E0[eax*4]
push	ecx
call	sub_7D0720
add	esp, 4
jmp	short loc_7CC8A3

loc_7CC8E9:
mov	edx, [ebp+arg_0]
add	edx, 114h
push	edx
mov	eax, [ebp+arg_0]
add	eax, 2C4h
push	eax
call	sub_7C66B0
add	esp, 8

loc_7CC904:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7CC5A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CC910(float)
sub_7CC910 proc	near

var_60=	dword ptr -60h
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	qword ptr -50h
var_48=	dword ptr -48h
var_44=	qword ptr -44h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 58h
push	esi
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+160h]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 400h
jle	short loc_7CC93F
mov	[ebp+var_14], 400h

loc_7CC93F:
cmp	dword_1859040, 0
jz	short loc_7CC965
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, dword_1859040
push	edx
push	offset dword_19715E0
call	sub_7D07B0
add	esp, 0Ch
mov	[ebp+var_14], eax
jmp	short loc_7CC983

loc_7CC965:
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+334h]
push	edx
push	offset dword_19715E0
call	sub_7D07B0
add	esp, 0Ch
mov	[ebp+var_14], eax

loc_7CC983:
mov	eax, [ebp+var_14]
mov	dword_1859058, eax
mov	[ebp+var_C], 0
jmp	short loc_7CC99D

loc_7CC994:
mov	ecx, [ebp+var_C]
add	ecx, 1
mov	[ebp+var_C], ecx

loc_7CC99D:
mov	edx, [ebp+var_C]
cmp	edx, [ebp+var_14]
jge	loc_7CD00C
mov	eax, [ebp+var_C]
mov	ecx, dword_19715E0[eax*4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	dword ptr [edx+60h], 0
mov	eax, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+20h], xmm0
mov	ecx, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+24h], xmm0
mov	edx, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+28h], xmm0
mov	eax, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+2Ch], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_18]
fld	dword ptr [edx+10h]
fstp	dword ptr [eax+40h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_18]
fld	dword ptr [edx+14h]
fstp	dword ptr [eax+44h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_18]
fld	dword ptr [edx+18h]
fstp	dword ptr [eax+48h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+var_18]
fld	dword ptr [edx+1Ch]
fstp	dword ptr [eax+4Ch]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0E8h]
and	edx, 0FFh
cmp	edx, 9
jz	short loc_7CCA88
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 20h
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_10]
mov	ecx, [eax+0E8h]
and	ecx, 0FFh
mov	edx, off_16815B4[ecx*4]
call	edx ; sub_7C9690
add	esp, 0Ch
jmp	short loc_7CCAA5

loc_7CCA88:
lea	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 20h
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+284h]
call	ecx
add	esp, 0Ch

loc_7CCAA5:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [eax+68h]
and	ecx, 20000h
jz	short loc_7CCB25
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+144h]
mov	eax, [ebp+arg_0]
fsub	dword ptr [eax+2F4h]
fstp	[ebp+var_30]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+148h]
mov	edx, [ebp+arg_0]
fsub	dword ptr [edx+2F8h]
fstp	[ebp+var_2C]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+14Ch]
mov	ecx, [ebp+arg_0]
fsub	dword ptr [ecx+2FCh]
fstp	[ebp+var_28]
mov	edx, [ebp+var_18]
fld	dword ptr [edx+20h]
fsub	[ebp+var_30]
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+20h]
mov	ecx, [ebp+var_18]
fld	dword ptr [ecx+24h]
fsub	[ebp+var_2C]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+24h]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+28h]
fsub	[ebp+var_28]
mov	ecx, [ebp+var_18]
fstp	dword ptr [ecx+28h]

loc_7CCB25:		; float
push	ecx
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+var_10]
fld	dword ptr [edx+64h]
mov	eax, [ebp+var_10]
fsub	dword ptr [eax+60h]
fmulp	st(1), st
fstp	[ebp+var_4]
fld	[ebp+var_4]
mov	ecx, [ebp+var_10]
fadd	dword ptr [ecx+60h]
fstp	[ebp+var_4]
fld	[ebp+var_24]
fmul	[ebp+var_4]
fstp	[ebp+var_24]
fld	[ebp+var_20]
fmul	[ebp+var_4]
fstp	[ebp+var_20]
fld	[ebp+var_1C]
fmul	[ebp+var_4]
fstp	[ebp+var_1C]
mov	edx, [ebp+arg_0]
add	edx, 114h
push	edx
lea	eax, [ebp+var_24]
push	eax
lea	ecx, [ebp+var_24]
push	ecx
call	sub_7C69D0
add	esp, 0Ch
mov	edx, [ebp+var_18]
movss	xmm0, [ebp+var_24]
movss	dword ptr [edx+30h], xmm0
mov	eax, [ebp+var_18]
movss	xmm0, [ebp+var_20]
movss	dword ptr [eax+34h], xmm0
mov	ecx, [ebp+var_18]
movss	xmm0, [ebp+var_1C]
movss	dword ptr [ecx+38h], xmm0
mov	edx, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+3Ch], xmm0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 400000h
jz	short loc_7CCC12
mov	eax, [ebp+arg_0]
mov	esi, [eax+168h]
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [edx+80h]
fsub	dword ptr [ecx+7Ch]
fmulp	st(1), st
fadd	dword ptr [esi+7Ch]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+14h]
jmp	loc_7CCCE3

loc_7CCC12:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 200000h
jz	short loc_7CCC6D
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [ecx+7Ch]
fchs
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
fstp	[ebp+var_44]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [eax+80h]
fsub	dword ptr [edx+7Ch]
fmulp	st(1), st
fsubr	[ebp+var_44]
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+14h]
jmp	short loc_7CCCE3

loc_7CCC6D:
mov	ecx, [ebp+arg_0]
mov	esi, [ecx+168h]
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [eax+80h]
fsub	dword ptr [edx+7Ch]
fmulp	st(1), st
fadd	dword ptr [esi+7Ch]
fstp	[ebp+var_8]
call	sub_7CA890
xor	edx, edx
mov	ecx, 2
div	ecx
test	edx, edx
jz	short loc_7CCCC5
movss	xmm0, [ebp+var_8]
movss	[ebp+var_48], xmm0
jmp	short loc_7CCCD6

loc_7CCCC5:
movss	xmm0, [ebp+var_8]
xorps	xmm0, ds:xmmword_1573EB0
movss	[ebp+var_48], xmm0

loc_7CCCD6:
mov	edx, [ebp+var_18]
movss	xmm0, [ebp+var_48]
movss	dword ptr [edx+14h], xmm0

loc_7CCCE3:
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_18]
fld	dword ptr [ecx+14h]
fstp	dword ptr [eax+58h]
mov	edx, [ebp+arg_0]
mov	esi, [edx+168h]
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	dword ptr [ecx+5Ch]
fsub	dword ptr [eax+58h]
fmulp	st(1), st
fadd	dword ptr [esi+58h]
fstp	[ebp+var_34]
fld	[ebp+var_34]
fldz
fcomip	st, st(1)
fstp	st
jb	short loc_7CCD40
mov	ecx, [ebp+var_10]
fld	dword ptr [ecx+5Ch]
fmul	ds:dbl_15FCC48
fstp	[ebp+var_34]

loc_7CCD40:
mov	edx, [ebp+var_18]
movss	xmm0, [ebp+var_34]
movss	dword ptr [edx+50h], xmm0
mov	eax, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+1Ch], xmm0
mov	ecx, [ebp+arg_0]
mov	esi, [ecx+168h]
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [eax+6Ch]
fsub	dword ptr [edx+0B8h]
fmulp	st(1), st
fadd	dword ptr [esi+0B8h]
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+8]
mov	ecx, [ebp+arg_0]
mov	esi, [ecx+168h]
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [eax+70h]
fsub	dword ptr [edx+0BCh]
fmulp	st(1), st
fadd	dword ptr [esi+0BCh]
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+0Ch]
mov	ecx, [ebp+arg_0]
mov	esi, [ecx+168h]
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
fld	dword ptr [eax+74h]
fsub	dword ptr [edx+0C0h]
fmulp	st(1), st
fadd	dword ptr [esi+0C0h]
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+10h]
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_18]
fld	dword ptr [edx+8]
fstp	dword ptr [ecx+54h]
mov	eax, [ebp+arg_0]
add	eax, 114h
push	eax
mov	ecx, [ebp+var_18]
add	ecx, 20h
push	ecx
mov	edx, [ebp+var_18]
add	edx, 20h
push	edx
call	sub_7C69D0
add	esp, 0Ch
mov	eax, [ebp+var_18]
fld	dword ptr [eax+20h]
mov	ecx, [ebp+arg_0]
fadd	dword ptr [ecx+144h]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+20h]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+24h]
mov	ecx, [ebp+arg_0]
fadd	dword ptr [ecx+148h]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+24h]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+28h]
mov	ecx, [ebp+arg_0]
fadd	dword ptr [ecx+14Ch]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+28h]
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+10h]
mov	ecx, [ebp+var_18]
movss	dword ptr [ecx+40h], xmm0
mov	edx, [ebp+var_10]
movss	xmm0, dword ptr	[edx+14h]
mov	eax, [ebp+var_18]
movss	dword ptr [eax+44h], xmm0
mov	ecx, [ebp+var_10]
movss	xmm0, dword ptr	[ecx+18h]
mov	edx, [ebp+var_18]
movss	dword ptr [edx+48h], xmm0
mov	eax, [ebp+var_10]
movss	xmm0, dword ptr	[eax+1Ch]
mov	ecx, [ebp+var_18]
movss	dword ptr [ecx+4Ch], xmm0
mov	edx, [ebp+var_10]
mov	eax, [edx+68h]
and	eax, 1
jz	short loc_7CCEF6
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+var_10]
fimul	dword ptr [ecx+124h]
call	__ftol2_sse
mov	edx, [ebp+var_18]
mov	[edx+18h], eax
jmp	short loc_7CCF00

loc_7CCEF6:
mov	eax, [ebp+var_18]
mov	dword ptr [eax+18h], 0

loc_7CCF00:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+68h]
and	edx, 100h
jz	loc_7CCFD3
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
call	sub_7CA8B0
add	esp, 4
fmul	ds:dbl_15FD370
fstp	[ebp+var_3C]
mov	eax, [ebp+var_10]
fld	dword ptr [eax+18Ch]
mov	ecx, [ebp+var_10]
fsub	dword ptr [ecx+188h]
push	ecx		; float
fld1
fstp	[esp+60h+var_60]
fstp	[ebp+var_50]
call	sub_7CA8B0
add	esp, 4
fmul	[ebp+var_50]
mov	edx, [ebp+var_10]
fadd	dword ptr [edx+188h]
fstp	[ebp+var_38]
fld	[ebp+var_38]
fmul	ds:dbl_15FCBF8
call	__ftol2_sse
and	eax, 80000001h
jns	short loc_7CCF75
dec	eax
or	eax, 0FFFFFFFEh
inc	eax

loc_7CCF75:
test	eax, eax
jnz	short loc_7CCF85
fld	[ebp+var_38]
fmul	ds:dbl_15FCD60
fstp	[ebp+var_38]

loc_7CCF85:
fld	[ebp+var_3C]
call	__CIsin
fstp	[ebp+var_54]
fld	[ebp+var_54]
fmul	[ebp+var_38]
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+68h]
mov	ecx, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+6Ch], xmm0
fld	[ebp+var_3C]
call	__CIcos
fstp	[ebp+var_58]
fld	[ebp+var_58]
fmul	[ebp+var_38]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+70h]
mov	eax, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+74h], xmm0

loc_7CCFD3:
mov	ecx, [ebp+var_18]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+var_18]
mov	dword ptr [edx], 0
mov	eax, [ebp+var_18]
mov	ecx, [ebp+arg_0]
mov	[eax+78h], ecx
push	1
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
push	ecx
call	sub_7D0E80
add	esp, 0Ch
jmp	loc_7CC994

loc_7CD00C:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7CC910 endp

align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 8000h
jz	short loc_7CD04D
mov	eax, [ebp+10h]
push	eax
mov	ecx, [ebp+0Ch]
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7C8350
add	esp, 0Ch
jmp	short loc_7CD094

loc_7CD04D:
mov	eax, [ebp+8]
mov	ecx, [eax+168h]
mov	edx, [ecx+0E8h]
and	edx, 0FFh
cmp	edx, 9
jz	short loc_7CD094
mov	eax, [ebp+10h]
push	eax
mov	ecx, [ebp+0Ch]
push	ecx
mov	edx, [ebp+8]
push	edx
mov	eax, [ebp+8]
mov	ecx, [eax+168h]
mov	edx, [ecx+0E8h]
and	edx, 0FFh
mov	eax, off_16815B4[edx*4]
call	eax ; sub_7C9690
add	esp, 0Ch

loc_7CD094:
pop	ebp
retn
align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CD0A0(int, float)
sub_7CD0A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ecx+68h]
and	edx, 100h
jz	short loc_7CD0CC
push	ecx		; float
fld	[ebp+arg_4]
fstp	[esp+4+var_4]
mov	eax, [ebp+arg_0]
push	eax		; int
call	sub_7C7EE0
add	esp, 8
jmp	short loc_7CD0DF

loc_7CD0CC:		; float
push	ecx
fld	[ebp+arg_4]
fstp	[esp+4+var_4]
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_7C7470
add	esp, 8

loc_7CD0DF:
pop	ebp
retn
sub_7CD0A0 endp

align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	dword ptr [eax], 0
cmp	dword ptr [ebp+10h], 0
jl	short loc_7CD121
cmp	dword ptr [ebp+10h], 8
jge	short loc_7CD121
mov	ecx, [ebp+10h]
shl	ecx, 5
mov	edx, [ebp+0Ch]
lea	eax, [edx+ecx+170h]
mov	ecx, [ebp+8]
mov	[ecx], eax
xor	eax, eax
jmp	short loc_7CD124

loc_7CD121:
or	eax, 0FFFFFFFFh

loc_7CD124:
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	esi
push	edi
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CD15F
cmp	dword ptr [ebp+0Ch], 8
jge	short loc_7CD15F
mov	esi, [ebp+10h]
mov	eax, [ebp+0Ch]
shl	eax, 5
mov	ecx, [ebp+8]
lea	edi, [ecx+eax+170h]
mov	ecx, 8
rep movsd
xor	eax, eax
jmp	short loc_7CD162

loc_7CD15F:
or	eax, 0FFFFFFFFh

loc_7CD162:
pop	edi
pop	esi
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+0Ch]
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0Bh ; switch	12 cases
ja	loc_7CD254	; default
mov	ecx, [ebp-4]
jmp	ds:off_7CD258[ecx*4] ; switch jump

loc_7CD18E:		; jumptable 007CD187 case 0
mov	edx, [ebp+8]
mov	eax, [ebp+10h]
mov	[edx+270h], eax
jmp	loc_7CD254	; default

loc_7CD19F:		; jumptable 007CD187 case 1
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
mov	[ecx+274h], edx
jmp	loc_7CD254	; default

loc_7CD1B0:		; jumptable 007CD187 case 2
mov	eax, [ebp+8]
mov	ecx, [ebp+10h]
mov	[eax+278h], ecx
jmp	loc_7CD254	; default

loc_7CD1C1:		; jumptable 007CD187 case 3
mov	edx, [ebp+8]
mov	eax, [ebp+10h]
mov	[edx+280h], eax
jmp	loc_7CD254	; default

loc_7CD1D2:		; jumptable 007CD187 case 4
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
mov	[ecx+284h], edx
push	9
mov	eax, [ebp+8]
mov	ecx, [eax+168h]
push	ecx
call	sub_7CEAA0
add	esp, 8
jmp	short loc_7CD254 ; default

loc_7CD1F4:		; jumptable 007CD187 case 5
mov	edx, [ebp+8]
mov	eax, [ebp+10h]
mov	[edx+288h], eax
jmp	short loc_7CD254 ; default

loc_7CD202:		; jumptable 007CD187 case 7
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
mov	[ecx+2B8h], edx
jmp	short loc_7CD254 ; default

loc_7CD210:		; jumptable 007CD187 case 6
mov	eax, [ebp+8]
mov	ecx, [ebp+10h]
mov	[eax+2B4h], ecx
jmp	short loc_7CD254 ; default

loc_7CD21E:		; jumptable 007CD187 case 8
mov	edx, [ebp+8]
mov	eax, [ebp+10h]
mov	[edx+2ACh], eax
jmp	short loc_7CD254 ; default

loc_7CD22C:		; jumptable 007CD187 case 9
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
mov	[ecx+27Ch], edx
jmp	short loc_7CD254 ; default

loc_7CD23A:		; jumptable 007CD187 case 10
mov	eax, [ebp+8]
mov	ecx, [ebp+10h]
mov	[eax+28Ch], ecx
jmp	short loc_7CD254 ; default

loc_7CD248:		; jumptable 007CD187 case 11
mov	edx, [ebp+8]
mov	eax, [ebp+10h]
mov	[edx+29Ch], eax

loc_7CD254:		; default
mov	esp, ebp
pop	ebp
retn
off_7CD258 dd offset loc_7CD18E	; jump table for switch	statement
dd offset loc_7CD19F
dd offset loc_7CD1B0
dd offset loc_7CD1C1
dd offset loc_7CD1D2
dd offset loc_7CD1F4
dd offset loc_7CD210
dd offset loc_7CD202
dd offset loc_7CD21E
dd offset loc_7CD22C
dd offset loc_7CD23A
dd offset loc_7CD248
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+10h]
mov	dword ptr [eax], 0
mov	ecx, [ebp+0Ch]
mov	[ebp-4], ecx
cmp	dword ptr [ebp-4], 0Bh ; switch	12 cases
ja	loc_7CD37E	; default
mov	edx, [ebp-4]
jmp	ds:off_7CD384[edx*4] ; switch jump

loc_7CD2B7:		; jumptable 007CD2B0 case 0
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+270h]
mov	[eax], edx
jmp	loc_7CD37E	; default

loc_7CD2CA:		; jumptable 007CD2B0 case 1
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+274h]
mov	[eax], edx
jmp	loc_7CD37E	; default

loc_7CD2DD:		; jumptable 007CD2B0 case 2
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+278h]
mov	[eax], edx
jmp	loc_7CD37E	; default

loc_7CD2F0:		; jumptable 007CD2B0 case 3
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+280h]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD300:		; jumptable 007CD2B0 case 4
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+284h]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD310:		; jumptable 007CD2B0 case 5
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+288h]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD320:		; jumptable 007CD2B0 case 7
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+2B8h]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD330:		; jumptable 007CD2B0 case 6
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+2B4h]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD340:		; jumptable 007CD2B0 case 8
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+2ACh]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD350:		; jumptable 007CD2B0 case 9
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+27Ch]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD360:		; jumptable 007CD2B0 case 10
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+28Ch]
mov	[eax], edx
jmp	short loc_7CD37E ; default

loc_7CD370:		; jumptable 007CD2B0 case 11
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+29Ch]
mov	[eax], edx

loc_7CD37E:		; default
mov	esp, ebp
pop	ebp
retn
align 4
off_7CD384 dd offset loc_7CD2B7	; jump table for switch	statement
dd offset loc_7CD2CA
dd offset loc_7CD2DD
dd offset loc_7CD2F0
dd offset loc_7CD300
dd offset loc_7CD310
dd offset loc_7CD330
dd offset loc_7CD320
dd offset loc_7CD340
dd offset loc_7CD350
dd offset loc_7CD360
dd offset loc_7CD370
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [ebp+0Ch]
mov	[eax+2A0h], ecx
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+168h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [ebp+0Ch]
mov	[eax+168h], ecx
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CD410 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [ecx+88h]
mov	[eax+90h], ecx
pop	ebp
retn
sub_7CD410 endp

align 10h


; Attributes: bp-based frame

sub_7CD440 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	edx, [ecx+90h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	edx, [edx]
mov	[ecx+90h], edx
pop	ebp
retn
sub_7CD440 endp

align 10h


; Attributes: bp-based frame

sub_7CD470 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	eax, [ecx+90h]
pop	ebp
retn
sub_7CD470 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CD490(int, float)
sub_7CD490 proc	near

var_4C=	dword ptr -4Ch
var_48=	qword ptr -48h
var_40=	dword ptr -40h
var_3A=	word ptr -3Ah
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 48h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2C0h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	[ebp+var_C], eax
mov	[ebp+var_4], 0
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
and	edx, 10h
jnz	short loc_7CD4CA
mov	dword_185904C, 0

loc_7CD4CA:
mov	dword_1859058, 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [ecx+88h]
mov	[eax+90h], ecx

loc_7CD4F2:
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [eax+90h]
mov	[ebp+var_18], ecx
cmp	[ebp+var_18], 0
jnz	short loc_7CD50F
jmp	loc_7CDB6D

loc_7CD50F:
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [eax+90h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [ecx]
mov	[eax+90h], ecx
mov	edx, [ebp+var_18]
fld	dword ptr [edx+1Ch]
fadd	[ebp+arg_4]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+50h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7CD583
cmp	dword_1859058, 400h
jge	short loc_7CD56F
mov	ecx, dword_1859058
mov	edx, [ebp+var_18]
mov	dword_19715E0[ecx*4], edx
mov	eax, dword_1859058
add	eax, 1
mov	dword_1859058, eax

loc_7CD56F:
mov	ecx, [ebp+var_18]
fld	dword ptr [ecx+1Ch]
fadd	[ebp+arg_4]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+1Ch]
jmp	loc_7CD4F2

loc_7CD583:
mov	eax, [ebp+var_18]
fld	dword ptr [eax+1Ch]
mov	ecx, [ebp+var_18]
fdiv	dword ptr [ecx+50h]
fstp	[ebp+var_1C]
mov	edx, [ebp+var_18]
fld1
fld	dword ptr [edx+3Ch]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	loc_7CD642
mov	eax, [ebp+var_18]
fld	dword ptr [eax+4Ch]
fmul	ds:dbl_15FD7F0
mov	ecx, [ebp+var_18]
fstp	dword ptr [ecx+4Ch]
mov	edx, [ebp+var_18]
fld	dword ptr [edx+54h]
fmul	ds:dbl_15FD530
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+54h]
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+290h], 0
jz	short loc_7CD5FE
mov	edx, [ebp+arg_0]
mov	eax, [edx+104h]
and	eax, 4
jz	short loc_7CD5FE
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+290h]
call	ecx
add	esp, 8
jmp	short loc_7CD62E

loc_7CD5FE:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+280h], 0
jz	short loc_7CD62E
mov	eax, [ebp+arg_0]
mov	ecx, [eax+104h]
and	ecx, 4
jz	short loc_7CD62E
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+280h]
call	edx
add	esp, 8

loc_7CD62E:
mov	eax, [ebp+var_18]
fld	dword ptr [eax+1Ch]
fadd	[ebp+arg_4]
mov	ecx, [ebp+var_18]
fstp	dword ptr [ecx+1Ch]
jmp	loc_7CD4F2

loc_7CD642:
fld	[ebp+var_1C]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+50h]
fcomip	st, st(1)
fstp	st
jb	loc_7CD6DD
fld	[ebp+var_1C]
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+320h]
fstp	[ebp+var_14]
mov	ecx, [ebp+var_C]
fld	dword ptr [ecx+10h]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+20h]
mov	eax, [ebp+var_C]
fsub	dword ptr [eax+10h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	ecx, [ebp+var_18]
fstp	dword ptr [ecx+40h]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+14h]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+24h]
mov	ecx, [ebp+var_C]
fsub	dword ptr [ecx+14h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+44h]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+18h]
mov	ecx, [ebp+var_C]
fld	dword ptr [ecx+28h]
mov	edx, [ebp+var_C]
fsub	dword ptr [edx+18h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+48h]
mov	ecx, [ebp+var_C]
fld	dword ptr [ecx+1Ch]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+2Ch]
mov	eax, [ebp+var_C]
fsub	dword ptr [eax+1Ch]
fmul	[ebp+var_14]
faddp	st(1), st
mov	ecx, [ebp+var_18]
fstp	dword ptr [ecx+4Ch]
jmp	loc_7CD807

loc_7CD6DD:
fld	[ebp+var_1C]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+54h]
fcomip	st, st(1)
fstp	st
jb	loc_7CD77E
fld	[ebp+var_1C]
mov	eax, [ebp+var_C]
fsub	dword ptr [eax+50h]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+324h]
fstp	[ebp+var_14]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+20h]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+30h]
mov	ecx, [ebp+var_C]
fsub	dword ptr [ecx+20h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+40h]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+24h]
mov	ecx, [ebp+var_C]
fld	dword ptr [ecx+34h]
mov	edx, [ebp+var_C]
fsub	dword ptr [edx+24h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+44h]
mov	ecx, [ebp+var_C]
fld	dword ptr [ecx+28h]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+38h]
mov	eax, [ebp+var_C]
fsub	dword ptr [eax+28h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	ecx, [ebp+var_18]
fstp	dword ptr [ecx+48h]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+2Ch]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+3Ch]
mov	ecx, [ebp+var_C]
fsub	dword ptr [ecx+2Ch]
fmul	[ebp+var_14]
faddp	st(1), st
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+4Ch]
jmp	loc_7CD807

loc_7CD77E:
fld	[ebp+var_1C]
mov	eax, [ebp+var_C]
fsub	dword ptr [eax+54h]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+328h]
fstp	[ebp+var_14]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+30h]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+40h]
mov	ecx, [ebp+var_C]
fsub	dword ptr [ecx+30h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+40h]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+34h]
mov	ecx, [ebp+var_C]
fld	dword ptr [ecx+44h]
mov	edx, [ebp+var_C]
fsub	dword ptr [edx+34h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	eax, [ebp+var_18]
fstp	dword ptr [eax+44h]
mov	ecx, [ebp+var_C]
fld	dword ptr [ecx+38h]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+48h]
mov	eax, [ebp+var_C]
fsub	dword ptr [eax+38h]
fmul	[ebp+var_14]
faddp	st(1), st
mov	ecx, [ebp+var_18]
fstp	dword ptr [ecx+48h]
mov	edx, [ebp+var_C]
fld	dword ptr [edx+3Ch]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+4Ch]
mov	ecx, [ebp+var_C]
fsub	dword ptr [ecx+3Ch]
fmul	[ebp+var_14]
faddp	st(1), st
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+4Ch]

loc_7CD807:
fld	[ebp+var_1C]
mov	eax, [ebp+var_C]
fld	dword ptr [eax+78h]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CD844
fld	[ebp+var_1C]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+32Ch]
fstp	[ebp+var_10]
mov	edx, [ebp+var_18]
fld	dword ptr [edx+8]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+0Ch]
mov	ecx, [ebp+var_18]
fsub	dword ptr [ecx+8]
fmul	[ebp+var_10]
faddp	st(1), st
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+54h]
jmp	short loc_7CD876

loc_7CD844:
fld	[ebp+var_1C]
mov	eax, [ebp+var_C]
fsub	dword ptr [eax+78h]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+330h]
fstp	[ebp+var_10]
mov	edx, [ebp+var_18]
fld	dword ptr [edx+0Ch]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+10h]
mov	ecx, [ebp+var_18]
fsub	dword ptr [ecx+0Ch]
fmul	[ebp+var_10]
faddp	st(1), st
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+54h]

loc_7CD876:
mov	eax, [ebp+var_18]
fld	dword ptr [eax+14h]
fmul	[ebp+arg_4]
mov	ecx, [ebp+var_18]
fadd	dword ptr [ecx+58h]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+58h]
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+124h], 0
jz	loc_7CD98A
mov	ecx, [ebp+var_C]
mov	edx, [ecx+68h]
and	edx, 2
jz	loc_7CD98A
mov	eax, [ebp+var_18]
fldz
fld	dword ptr [eax+1Ch]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7CD8E9
mov	ecx, [ebp+var_C]
mov	edx, [ecx+68h]
and	edx, 4
jz	short loc_7CD8E9
push	ecx		; float
fld1
fstp	[esp+4Ch+var_4C]
call	sub_7CA8B0
add	esp, 4
mov	eax, [ebp+var_C]
fimul	dword ptr [eax+124h]
call	__ftol2_sse
mov	ecx, [ebp+var_18]
mov	[ecx+18h], eax

loc_7CD8E9:
mov	edx, [ebp+var_C]
fld	dword ptr [edx+108h]
mov	eax, [ebp+var_18]
fmul	dword ptr [eax+1Ch]
fnstcw	[ebp+var_3A]
movzx	eax, [ebp+var_3A]
or	eax, 0C00h
mov	[ebp+var_40], eax
fldcw	word ptr [ebp+var_40]
fistp	[ebp+var_48]
fldcw	[ebp+var_3A]
mov	ecx, dword ptr [ebp+var_48]
mov	edx, [ebp+var_18]
add	ecx, [edx+18h]
mov	[ebp+var_20], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+68h]
and	ecx, 40000h
jz	short loc_7CD94C
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_20]
cmp	eax, [edx+124h]
jb	short loc_7CD94C
mov	ecx, [ebp+var_C]
mov	edx, [ecx+124h]
sub	edx, 1
mov	eax, [ebp+var_18]
mov	[eax+18h], edx
jmp	short loc_7CD960

loc_7CD94C:
mov	ecx, [ebp+var_C]
mov	eax, [ebp+var_20]
xor	edx, edx
div	dword ptr [ecx+124h]
mov	eax, [ebp+var_18]
mov	[eax+5Ch], edx

loc_7CD960:
mov	ecx, [ebp+var_18]
mov	edx, [ecx+5Ch]
shl	edx, 6
mov	eax, [ebp+var_C]
add	edx, [eax+12Ch]
mov	ecx, [ebp+var_C]
mov	[ecx+128h], edx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	ecx, [eax+5Ch]
mov	[edx+164h], ecx

loc_7CD98A:
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+124h], 0
jz	short loc_7CD9F2
mov	eax, [ebp+var_C]
mov	ecx, [eax+68h]
and	ecx, 1
jz	short loc_7CD9F2
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_18]
mov	ecx, [eax+18h]
mov	[edx+5Ch], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+var_C]
mov	ecx, [edx+5Ch]
cmp	ecx, [eax+124h]
jl	short loc_7CD9C8
mov	edx, [ebp+var_18]
mov	dword ptr [edx+5Ch], 0

loc_7CD9C8:
mov	eax, [ebp+var_18]
mov	ecx, [eax+5Ch]
shl	ecx, 6
mov	edx, [ebp+var_C]
add	ecx, [edx+12Ch]
mov	eax, [ebp+var_C]
mov	[eax+128h], ecx
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_18]
mov	eax, [edx+5Ch]
mov	[ecx+164h], eax

loc_7CD9F2:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
and	edx, 8
jnz	short loc_7CDA08
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
and	ecx, 10h
jz	short loc_7CDA75

loc_7CDA08:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
and	eax, 2
jz	short loc_7CDA42
mov	ecx, [ebp+var_18]
add	ecx, 20h
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_8]
add	edx, 20h
push	edx
mov	eax, [ebp+var_24]
push	eax
lea	ecx, [ebp+var_34]
push	ecx
call	sub_7C6D00
add	esp, 0Ch
mov	edx, [ebp+var_18]
movss	xmm0, [ebp+var_2C]
movss	dword ptr [edx+2Ch], xmm0
jmp	short loc_7CDA52

loc_7CDA42:
mov	eax, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+2Ch], xmm0

loc_7CDA52:
mov	ecx, dword_185904C
mov	edx, dword_1859048
mov	eax, [ebp+var_18]
mov	[edx+ecx*4], eax
mov	ecx, dword_185904C
add	ecx, 1
mov	dword_185904C, ecx
jmp	short loc_7CDAD7

loc_7CDA75:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+290h], 0
jz	short loc_7CDAA7
mov	eax, [ebp+arg_0]
mov	ecx, [eax+104h]
and	ecx, 4
jz	short loc_7CDAA7
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+290h]
call	edx
add	esp, 8
jmp	short loc_7CDAD7

loc_7CDAA7:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+280h], 0
jz	short loc_7CDAD7
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
and	edx, 4
jz	short loc_7CDAD7
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+280h]
call	eax
add	esp, 8

loc_7CDAD7:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [edx+68h]
and	eax, 20000000h
jnz	short loc_7CDAF9
mov	ecx, [ebp+var_18]
fld	dword ptr [ecx+1Ch]
fadd	[ebp+arg_4]
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+1Ch]

loc_7CDAF9:
mov	eax, [ebp+var_C]
mov	ecx, [eax+68h]
and	ecx, 10000000h
jz	short loc_7CDB33
mov	edx, [ebp+var_18]
fld	dword ptr [edx+1Ch]
fadd	[ebp+arg_4]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+50h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7CDB33
mov	ecx, [ebp+var_18]
fld	dword ptr [ecx+50h]
fsub	[ebp+arg_4]
fsub	ds:dbl_15FD2F0
mov	edx, [ebp+var_18]
fstp	dword ptr [edx+1Ch]

loc_7CDB33:
mov	eax, [ebp+var_C]
mov	ecx, [eax+68h]
and	ecx, 100000h
jz	short loc_7CDB68
mov	edx, [ebp+var_18]
fld	dword ptr [edx+1Ch]
fadd	[ebp+arg_4]
mov	eax, [ebp+var_18]
fld	dword ptr [eax+50h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7CDB68
mov	ecx, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+1Ch], xmm0

loc_7CDB68:
jmp	loc_7CD4F2

loc_7CDB6D:
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
and	eax, 8
jz	loc_7CDC79
mov	ecx, [ebp+var_8]
mov	edx, [ecx+0Ch]
and	edx, 10h
jnz	loc_7CDC79
mov	eax, [ebp+var_8]
mov	ecx, [eax+0Ch]
and	ecx, 4
jz	short loc_7CDBB5
push	offset sub_7CAD20 ; int	(__cdecl *)(const void *, const	void *)
push	4		; size_t
mov	edx, dword_185904C
push	edx		; size_t
mov	eax, dword_1859048
push	eax		; void *
call	ds:off_15FDCCC
add	esp, 10h
jmp	short loc_7CDBD3

loc_7CDBB5:		; int (__cdecl *)(const	void *,	const void *)
push	offset sub_7CAD80
push	4		; size_t
mov	ecx, dword_185904C
push	ecx		; size_t
mov	edx, dword_1859048
push	edx		; void *
call	ds:off_15FDCCC
add	esp, 10h

loc_7CDBD3:
mov	[ebp+var_38], 0
jmp	short loc_7CDBE5

loc_7CDBDC:
mov	eax, [ebp+var_38]
add	eax, 1
mov	[ebp+var_38], eax

loc_7CDBE5:
mov	ecx, [ebp+var_38]
cmp	ecx, dword_185904C
jge	loc_7CDC79
mov	edx, [ebp+var_38]
mov	eax, dword_1859048
mov	ecx, [eax+edx*4]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+2Ch], xmm0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+290h], 0
jz	short loc_7CDC44
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
and	edx, 4
jz	short loc_7CDC44
mov	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+290h]
call	eax
add	esp, 8
jmp	short loc_7CDC74

loc_7CDC44:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+280h], 0
jz	short loc_7CDC74
mov	edx, [ebp+arg_0]
mov	eax, [edx+104h]
and	eax, 4
jz	short loc_7CDC74
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+280h]
call	ecx
add	esp, 8

loc_7CDC74:
jmp	loc_7CDBDC

loc_7CDC79:
mov	esp, ebp
pop	ebp
retn
sub_7CD490 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	dword_1859058, 0

loc_7CDC8E:
mov	eax, [ebp+8]
mov	ecx, [eax+108h]
cmp	dword ptr [ecx+88h], 0
jz	loc_7CDD5E
mov	edx, [ebp+8]
mov	eax, [edx+108h]
mov	ecx, [eax+88h]
mov	[ebp-4], ecx
mov	edx, [ebp+8]
mov	eax, [edx+108h]
mov	ecx, [ebp-4]
mov	edx, [ecx]
mov	[eax+88h], edx
mov	eax, dword_1859058
mov	ecx, [ebp-4]
mov	dword_19715E0[eax*4], ecx
mov	edx, dword_1859058
add	edx, 1
mov	dword_1859058, edx
cmp	dword_1859058, 400h
jnz	short loc_7CDD2C
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_7CDD04
mov	eax, [ebp+8]
push	eax
call	dword ptr [ebp+0Ch]
add	esp, 4

loc_7CDD04:
mov	ecx, [ebp+8]
cmp	dword ptr [ecx+298h], 0
jz	short loc_7CDD22
mov	edx, [ebp+8]
push	edx
mov	eax, [ebp+8]
mov	ecx, [eax+298h]
call	ecx
add	esp, 4

loc_7CDD22:
mov	dword_1859058, 0

loc_7CDD2C:
mov	edx, [ebp-4]
push	edx
call	sub_7D0720
add	esp, 4
mov	eax, [ebp+8]
mov	ecx, [eax+108h]
mov	edx, [ecx+84h]
sub	edx, 1
mov	eax, [ebp+8]
mov	ecx, [eax+108h]
mov	[ecx+84h], edx
jmp	loc_7CDC8E

loc_7CDD5E:
cmp	dword_1859058, 0
jz	short loc_7CDD95
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_7CDD77
mov	edx, [ebp+8]
push	edx
call	dword ptr [ebp+0Ch]
add	esp, 4

loc_7CDD77:
mov	eax, [ebp+8]
cmp	dword ptr [eax+298h], 0
jz	short loc_7CDD95
mov	ecx, [ebp+8]
push	ecx
mov	edx, [ebp+8]
mov	eax, [edx+298h]
call	eax
add	esp, 4

loc_7CDD95:
mov	dword_1859058, 0
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CDDB0(int, float, int)
sub_7CDDB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+104h]
and	ecx, 2
jnz	short loc_7CDDC7
jmp	loc_7CDF29

loc_7CDDC7:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	[ebp+arg_4]
fmul	dword ptr [eax+110h]
fstp	[ebp+arg_4]
mov	ecx, [ebp+arg_0]
movss	xmm0, dword_1681594
movss	dword ptr [ecx+154h], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, dword_1681598
movss	dword ptr [edx+158h], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, dword_168159C
movss	dword ptr [eax+15Ch], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
and	edx, 1
jnz	short loc_7CDE25
jmp	short loc_7CDE32

loc_7CDE25:
movss	xmm0, ds:SrcStr
movss	[ebp+arg_4], xmm0

loc_7CDE32:
cmp	[ebp+arg_8], 0
jge	short loc_7CDE3F
mov	[ebp+arg_8], 0

loc_7CDE3F:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx+160h], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+278h], 0
jz	short loc_7CDE69
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+278h]
call	ecx
add	esp, 4

loc_7CDE69:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+294h], 0
jz	short loc_7CDE90
push	ecx
fld	[ebp+arg_4]
fstp	[esp+8+var_8]
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+294h]
call	edx
add	esp, 8
jmp	short loc_7CDEB5

loc_7CDE90:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+288h], 0
jz	short loc_7CDEB5
push	ecx
fld	[ebp+arg_4]
fstp	[esp+8+var_8]
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+288h]
call	eax
add	esp, 8

loc_7CDEB5:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+274h], 0
jz	short loc_7CDEDA
push	ecx
fld	[ebp+arg_4]
fstp	[esp+8+var_8]
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+274h]
call	ecx
add	esp, 8

loc_7CDEDA:
mov	[ebp+var_4], 0
jmp	short loc_7CDEEC

loc_7CDEE3:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_7CDEEC:
mov	eax, [ebp+var_4]
cmp	eax, dword_1859058
jge	short loc_7CDF29
mov	ecx, [ebp+var_4]
mov	edx, dword_19715E0[ecx*4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
push	ecx
call	sub_7D0C40
add	esp, 8
mov	edx, [ebp+var_4]
mov	eax, dword_19715E0[edx*4]
push	eax
call	sub_7D0720
add	esp, 4
jmp	short loc_7CDEE3

loc_7CDF29:
mov	esp, ebp
pop	ebp
retn
sub_7CDDB0 endp

align 10h


; Attributes: bp-based frame

sub_7CDF30 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+280h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+280h], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+104h]
mov	[edx+160h], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+160h], 0
jge	short loc_7CDF80
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+160h], 0

loc_7CDF80:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
cmp	dword ptr [ecx+104h], 0
jle	short loc_7CDFAE
mov	edx, [ebp+arg_0]
mov	eax, [edx+160h]
push	eax		; int
push	ecx		; float
fldz
fstp	[esp+14h+var_14]
mov	ecx, [ebp+arg_0]
push	ecx		; int
call	sub_7CDDB0
add	esp, 0Ch

loc_7CDFAE:
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
fld	dword ptr [eax+0C4h]
fdiv	ds:dbl_15FD9E8
call	__ftol2_sse
mov	[ebp+var_4], eax
mov	[ebp+var_8], 0
jmp	short loc_7CDFDD

loc_7CDFD4:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_7CDFDD:
mov	edx, [ebp+var_8]
cmp	edx, [ebp+var_4]
jge	short loc_7CE00F
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+270h], 0
jz	short loc_7CE00D
push	ecx
fld	ds:flt_15FD4F8
fstp	[esp+10h+var_10]
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+270h]
call	eax
add	esp, 8

loc_7CE00D:
jmp	short loc_7CDFD4

loc_7CE00F:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx+280h], edx
mov	esp, ebp
pop	ebp
retn
sub_7CDF30 endp

align 10h


; Attributes: bp-based frame

sub_7CE020 proc	near

var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	esi

loc_7CE025:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+108h]
cmp	dword ptr [ecx+88h], 0
jz	short loc_7CE08C
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [eax+88h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+108h]
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[eax+88h], edx
mov	eax, [ebp+var_4]
push	eax
call	sub_7D0720
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+108h]
mov	eax, [edx+84h]
sub	eax, 1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+108h]
mov	[edx+84h], eax
jmp	short loc_7CE025

loc_7CE08C:
mov	eax, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+110h], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+10Ch], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+2A8h], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+2A4h], xmm0
mov	ecx, [ebp+arg_0]
add	ecx, 114h
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 2C4h
push	edx
call	sub_7C66B0
add	esp, 8
mov	eax, [ebp+arg_0]
mov	esi, [eax+168h]
push	ecx		; float
fld1
fstp	[esp+0Ch+var_C]
call	sub_7CA8B0
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
fld	dword ptr [edx+1A0h]
fsub	dword ptr [ecx+19Ch]
fmulp	st(1), st
fadd	dword ptr [esi+19Ch]
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+304h]
mov	eax, [ebp+arg_0]
fldz
fld	dword ptr [eax+304h]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CE162
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
or	edx, 40h
mov	eax, [ebp+arg_0]
mov	[eax+104h], edx
jmp	short loc_7CE16E

loc_7CE162:
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7CDF30
add	esp, 4

loc_7CE16E:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7CE020 endp

align 10h


; Attributes: bp-based frame

sub_7CE180 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
add	eax, 114h
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 2C4h
push	ecx
call	sub_7C66B0
add	esp, 8
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 114h
push	eax
call	sub_7C66B0
add	esp, 8
pop	ebp
retn
sub_7CE180 endp

align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [ebp+0Ch]
mov	[eax+31Ch], ecx
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+0Ch]
mov	ecx, [ebp+8]
mov	edx, [ecx+31Ch]
mov	[eax], edx
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
cmp	dword ptr [ebp+10h], 0
jz	short loc_7CE220
mov	eax, [ebp+8]
mov	ecx, [eax+104h]
or	ecx, [ebp+0Ch]
mov	edx, [ebp+8]
mov	[edx+104h], ecx
jmp	short loc_7CE237

loc_7CE220:
mov	eax, [ebp+0Ch]
not	eax
mov	ecx, [ebp+8]
and	eax, [ecx+104h]
mov	edx, [ebp+8]
mov	[edx+104h], eax

loc_7CE237:
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [eax+108h]
mov	eax, [ecx+84h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+0Ch]
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 12h ; switch	19 cases
ja	loc_7CE449	; default
mov	ecx, [ebp-4]
jmp	ds:off_7CE450[ecx*4] ; switch jump

loc_7CE27E:		; jumptable 007CE277 case 0
mov	edx, [ebp+8]
add	edx, 10h
mov	eax, [ebp+10h]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	loc_7CE449	; default

loc_7CE2A2:		; jumptable 007CE277 case 1
mov	eax, [ebp+8]
add	eax, 20h
mov	ecx, [ebp+10h]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
jmp	loc_7CE449	; default

loc_7CE2C6:		; jumptable 007CE277 case 2
mov	ecx, [ebp+8]
add	ecx, 30h
mov	edx, [ebp+10h]
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
jmp	loc_7CE449	; default

loc_7CE2EA:		; jumptable 007CE277 case 3
mov	edx, [ebp+8]
add	edx, 40h
mov	eax, [ebp+10h]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	loc_7CE449	; default

loc_7CE30E:		; jumptable 007CE277 case 4
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
fld	dword ptr [ecx+60h]
fstp	dword ptr [eax]
jmp	loc_7CE449	; default

loc_7CE31E:		; jumptable 007CE277 case 5
mov	edx, [ebp+10h]
mov	eax, [ebp+8]
fld	dword ptr [eax+64h]
fstp	dword ptr [edx]
jmp	loc_7CE449	; default

loc_7CE32E:		; jumptable 007CE277 case 6
mov	ecx, [ebp+10h]
mov	edx, [ebp+8]
fld	dword ptr [edx+84h]
fstp	dword ptr [ecx]
jmp	loc_7CE449	; default

loc_7CE341:		; jumptable 007CE277 case 7
mov	eax, [ebp+8]
add	eax, 0A8h
mov	ecx, [ebp+10h]
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
jmp	loc_7CE449	; default

loc_7CE367:		; jumptable 007CE277 case 8
mov	ecx, [ebp+10h]
mov	edx, [ebp+8]
fld	dword ptr [edx+0D0h]
fstp	dword ptr [ecx]
jmp	loc_7CE449	; default

loc_7CE37A:		; jumptable 007CE277 case 9
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
fld	dword ptr [ecx+0D4h]
fstp	dword ptr [eax]
jmp	loc_7CE449	; default

loc_7CE38D:		; jumptable 007CE277 case 10
mov	edx, [ebp+10h]
mov	eax, [ebp+8]
fld	dword ptr [eax+0D8h]
fstp	dword ptr [edx]
jmp	loc_7CE449	; default

loc_7CE3A0:		; jumptable 007CE277 case 11
mov	ecx, [ebp+10h]
mov	edx, [ebp+8]
fld	dword ptr [edx+0DCh]
fstp	dword ptr [ecx]
jmp	loc_7CE449	; default

loc_7CE3B3:		; jumptable 007CE277 case 12
mov	eax, [ebp+8]
push	eax
call	sub_7CEA80
add	esp, 4
mov	ecx, [ebp+10h]
mov	[ecx], eax
jmp	loc_7CE449	; default

loc_7CE3C9:		; jumptable 007CE277 case 13
mov	edx, [ebp+8]
add	edx, 0ECh
mov	eax, [ebp+10h]
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
mov	ecx, [edx+10h]
mov	[eax+10h], ecx
mov	edx, [edx+14h]
mov	[eax+14h], edx
jmp	short loc_7CE449 ; default

loc_7CE3F9:		; jumptable 007CE277 case 14
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
mov	edx, [ecx+10Ch]
mov	[eax], edx
jmp	short loc_7CE449 ; default

loc_7CE409:		; jumptable 007CE277 case 15
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
fld	dword ptr [ecx+7Ch]
fstp	dword ptr [eax]
jmp	short loc_7CE449 ; default

loc_7CE416:		; jumptable 007CE277 case 16
mov	edx, [ebp+10h]
mov	eax, [ebp+8]
fld	dword ptr [eax+80h]
fstp	dword ptr [edx]
jmp	short loc_7CE449 ; default

loc_7CE426:		; jumptable 007CE277 case 17
mov	ecx, [ebp+8]
cvttss2si edx, dword ptr [ecx+0E4h]
mov	eax, [ebp+10h]
mov	[eax], edx
jmp	short loc_7CE449 ; default

loc_7CE438:		; jumptable 007CE277 case 18
mov	ecx, [ebp+8]
push	ecx
call	sub_7CEAD0
add	esp, 4
mov	edx, [ebp+10h]
mov	[edx], eax

loc_7CE449:		; default
mov	esp, ebp
pop	ebp
retn
align 10h
off_7CE450 dd offset loc_7CE27E	; jump table for switch	statement
dd offset loc_7CE2A2
dd offset loc_7CE2C6
dd offset loc_7CE2EA
dd offset loc_7CE30E
dd offset loc_7CE31E
dd offset loc_7CE32E
dd offset loc_7CE341
dd offset loc_7CE367
dd offset loc_7CE37A
dd offset loc_7CE38D
dd offset loc_7CE3A0
dd offset loc_7CE3B3
dd offset loc_7CE3C9
dd offset loc_7CE3F9
dd offset loc_7CE409
dd offset loc_7CE416
dd offset loc_7CE426
dd offset loc_7CE438
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+0Ch]
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 12h ; switch	19 cases
ja	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17
mov	ecx, [ebp-4]
jmp	ds:off_7CE660[ecx*4] ; switch jump

loc_7CE4BE:		; jumptable 007CE4B7 case 0
mov	edx, [ebp+10h]
mov	eax, [ebp+8]
add	eax, 10h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE4E2:		; jumptable 007CE4B7 case 1
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
add	ecx, 20h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE506:		; jumptable 007CE4B7 case 2
mov	ecx, [ebp+10h]
mov	edx, [ebp+8]
add	edx, 30h
mov	eax, [ecx]
mov	[edx], eax
mov	eax, [ecx+4]
mov	[edx+4], eax
mov	eax, [ecx+8]
mov	[edx+8], eax
mov	ecx, [ecx+0Ch]
mov	[edx+0Ch], ecx
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE52A:		; jumptable 007CE4B7 case 3
mov	edx, [ebp+10h]
mov	eax, [ebp+8]
add	eax, 40h
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	ecx, [edx+8]
mov	[eax+8], ecx
mov	edx, [edx+0Ch]
mov	[eax+0Ch], edx
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE54E:		; jumptable 007CE4B7 case 4
mov	eax, [ebp+8]
mov	ecx, [ebp+10h]
fld	dword ptr [ecx]
fstp	dword ptr [eax+60h]
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE55E:		; jumptable 007CE4B7 case 5
mov	edx, [ebp+8]
mov	eax, [ebp+10h]
fld	dword ptr [eax]
fstp	dword ptr [edx+64h]
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE56E:		; jumptable 007CE4B7 case 6
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
fld	dword ptr [edx]
fstp	dword ptr [ecx+84h]
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE581:		; jumptable 007CE4B7 case 7
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
add	ecx, 0A8h
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	eax, [eax+0Ch]
mov	[ecx+0Ch], eax
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE5A8:		; jumptable 007CE4B7 case 8
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
fld	dword ptr [edx]
fstp	dword ptr [ecx+0D0h]
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE5BB:		; jumptable 007CE4B7 case 9
mov	eax, [ebp+8]
mov	ecx, [ebp+10h]
fld	dword ptr [ecx]
fstp	dword ptr [eax+0D4h]
jmp	loc_7CE65A	; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE5CE:		; jumptable 007CE4B7 case 10
mov	edx, [ebp+8]
mov	eax, [ebp+10h]
fld	dword ptr [eax]
fstp	dword ptr [edx+0D8h]
jmp	short loc_7CE65A ; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE5DE:		; jumptable 007CE4B7 case 11
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
fld	dword ptr [edx]
fstp	dword ptr [ecx+0DCh]
jmp	short loc_7CE65A ; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE5EE:		; jumptable 007CE4B7 case 12
mov	eax, [ebp+10h]
mov	ecx, [eax]
and	ecx, 0FFh
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7CEAA0
add	esp, 8
jmp	short loc_7CE65A ; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE608:		; jumptable 007CE4B7 case 13
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
add	ecx, 0ECh
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	edx, [eax+8]
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
mov	[ecx+10h], edx
mov	eax, [eax+14h]
mov	[ecx+14h], eax
jmp	short loc_7CE65A ; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE638:		; jumptable 007CE4B7 case 14
mov	ecx, [ebp+8]
mov	edx, [ebp+10h]
mov	eax, [edx]
mov	[ecx+10Ch], eax
jmp	short loc_7CE65A ; default
			; jumptable 007CE4B7 cases 15-17

loc_7CE648:		; jumptable 007CE4B7 case 18
mov	ecx, [ebp+10h]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+8]
push	eax
call	sub_7CEB50
add	esp, 8

loc_7CE65A:		; default
mov	esp, ebp	; jumptable 007CE4B7 cases 15-17
pop	ebp
retn
align 10h
off_7CE660 dd offset loc_7CE4BE	; jump table for switch	statement
dd offset loc_7CE4E2
dd offset loc_7CE506
dd offset loc_7CE52A
dd offset loc_7CE54E
dd offset loc_7CE55E
dd offset loc_7CE56E
dd offset loc_7CE581
dd offset loc_7CE5A8
dd offset loc_7CE5BB
dd offset loc_7CE5CE
dd offset loc_7CE5DE
dd offset loc_7CE5EE
dd offset loc_7CE608
dd offset loc_7CE638
dd offset loc_7CE65A
dd offset loc_7CE65A
dd offset loc_7CE65A
dd offset loc_7CE648
align 10h
push	ebp
mov	ebp, esp
push	esi
push	edi
mov	esi, [ebp+0Ch]
mov	ecx, 69h
mov	edi, [ebp+8]
rep movsd
pop	edi
pop	esi
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, 1A4h
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+120h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+11Ch]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	esi
push	edi
mov	esi, [ebp+0Ch]
mov	eax, [ebp+8]
mov	edi, [eax+128h]
mov	ecx, 10h
rep movsd
pop	edi
pop	esi
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+128h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
cmp	dword ptr [eax+138h], 0
jz	short loc_7CE74E
mov	ecx, [ebp+8]
mov	edx, [ecx+13Ch]
mov	[ebp-4], edx
jmp	short loc_7CE755

loc_7CE74E:
mov	dword ptr [ebp-4], 0

loc_7CE755:
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+10h]
mov	dword ptr [eax], 0
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CE780
mov	ecx, [ebp+8]
mov	edx, [ebp+0Ch]
cmp	edx, [ecx+124h]
jl	short loc_7CE785

loc_7CE780:
or	eax, 0FFFFFFFFh
jmp	short loc_7CE79B

loc_7CE785:
mov	eax, [ebp+0Ch]
shl	eax, 6
mov	ecx, [ebp+8]
add	eax, [ecx+12Ch]
mov	edx, [ebp+10h]
mov	[edx], eax
xor	eax, eax

loc_7CE79B:
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+10h]
mov	dword ptr [eax], 0
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CE7C0
mov	ecx, [ebp+8]
mov	edx, [ebp+0Ch]
cmp	edx, [ecx+194h]
jl	short loc_7CE7C5

loc_7CE7C0:
or	eax, 0FFFFFFFFh
jmp	short loc_7CE7DB

loc_7CE7C5:
mov	eax, [ebp+0Ch]
shl	eax, 6
mov	ecx, [ebp+8]
add	eax, [ecx+198h]
mov	edx, [ebp+10h]
mov	[edx], eax
xor	eax, eax

loc_7CE7DB:
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+10h]
mov	dword ptr [eax], 0
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CE800
mov	ecx, [ebp+8]
mov	edx, [ebp+0Ch]
cmp	edx, [ecx+130h]
jl	short loc_7CE805

loc_7CE800:
or	eax, 0FFFFFFFFh
jmp	short loc_7CE81B

loc_7CE805:
mov	eax, [ebp+0Ch]
shl	eax, 6
mov	ecx, [ebp+8]
add	eax, [ecx+134h]
mov	edx, [ebp+10h]
mov	[edx], eax
xor	eax, eax

loc_7CE81B:
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+10h]
mov	dword ptr [eax], 0
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CE840
mov	ecx, [ebp+8]
mov	edx, [ebp+0Ch]
cmp	edx, [ecx+180h]
jl	short loc_7CE845

loc_7CE840:
or	eax, 0FFFFFFFFh
jmp	short loc_7CE85B

loc_7CE845:
mov	eax, [ebp+0Ch]
shl	eax, 6
mov	ecx, [ebp+8]
add	eax, [ecx+184h]
mov	edx, [ebp+10h]
mov	[edx], eax
xor	eax, eax

loc_7CE85B:
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	esi
push	edi
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CE879
mov	eax, [ebp+8]
mov	ecx, [ebp+0Ch]
cmp	ecx, [eax+124h]
jl	short loc_7CE87E

loc_7CE879:
or	eax, 0FFFFFFFFh
jmp	short loc_7CE89B

loc_7CE87E:
mov	esi, [ebp+10h]
mov	edx, [ebp+0Ch]
shl	edx, 6
mov	eax, [ebp+8]
mov	edi, [eax+12Ch]
add	edi, edx
mov	ecx, 10h
rep movsd
xor	eax, eax

loc_7CE89B:
pop	edi
pop	esi
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+124h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+194h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+130h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+180h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	esi
push	edi
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CE8F9
mov	eax, [ebp+8]
mov	ecx, [ebp+0Ch]
cmp	ecx, [eax+114h]
jl	short loc_7CE8FE

loc_7CE8F9:
or	eax, 0FFFFFFFFh
jmp	short loc_7CE91B

loc_7CE8FE:
mov	edx, [ebp+0Ch]
shl	edx, 5
mov	eax, [ebp+8]
mov	esi, [eax+118h]
add	esi, edx
mov	ecx, 8
mov	edi, [ebp+10h]
rep movsd
xor	eax, eax

loc_7CE91B:
pop	edi
pop	esi
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	esi
push	edi
cmp	dword ptr [ebp+0Ch], 0
jl	short loc_7CE939
mov	eax, [ebp+8]
mov	ecx, [ebp+0Ch]
cmp	ecx, [eax+114h]
jl	short loc_7CE93E

loc_7CE939:
or	eax, 0FFFFFFFFh
jmp	short loc_7CE95B

loc_7CE93E:
mov	esi, [ebp+10h]
mov	edx, [ebp+0Ch]
shl	edx, 5
mov	eax, [ebp+8]
mov	edi, [eax+118h]
add	edi, edx
mov	ecx, 8
rep movsd
xor	eax, eax

loc_7CE95B:
pop	edi
pop	esi
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 28h
mov	dword ptr [ebp-4], 0FFFFFFFFh
mov	dword ptr [ebp-8], offset byte_146D660
mov	eax, [ebp+8]
add	eax, 150h
mov	[ebp-0Ch], eax

loc_7CE97F:
mov	ecx, [ebp-0Ch]
mov	dl, [ecx]
mov	[ebp-0Dh], dl
mov	eax, [ebp-8]
cmp	dl, [eax]
jnz	short loc_7CE9BC
cmp	byte ptr [ebp-0Dh], 0
jz	short loc_7CE9B3
mov	ecx, [ebp-0Ch]
mov	dl, [ecx+1]
mov	[ebp-0Eh], dl
mov	eax, [ebp-8]
cmp	dl, [eax+1]
jnz	short loc_7CE9BC
add	dword ptr [ebp-0Ch], 2
add	dword ptr [ebp-8], 2
cmp	byte ptr [ebp-0Eh], 0
jnz	short loc_7CE97F

loc_7CE9B3:
mov	dword ptr [ebp-14h], 0
jmp	short loc_7CE9C4

loc_7CE9BC:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh
mov	[ebp-14h], ecx

loc_7CE9C4:
mov	edx, [ebp-14h]
mov	[ebp-18h], edx
cmp	dword ptr [ebp-18h], 0
jnz	short loc_7CE9D8
mov	eax, [ebp-4]
jmp	loc_7CEA60

loc_7CE9D8:
cmp	dword ptr [ebp+0Ch], 0
jz	short loc_7CEA24
mov	eax, [ebp+8]
add	eax, 150h
mov	[ebp-1Ch], eax
mov	ecx, [ebp+0Ch]
mov	[ebp-20h], ecx
mov	edx, [ebp-20h]
mov	[ebp-24h], edx

loc_7CE9F5:
mov	eax, [ebp-1Ch]
mov	cl, [eax]
mov	[ebp-25h], cl
mov	edx, [ebp-20h]
mov	al, [ebp-25h]
mov	[edx], al
mov	ecx, [ebp-1Ch]
add	ecx, 1
mov	[ebp-1Ch], ecx
mov	edx, [ebp-20h]
add	edx, 1
mov	[ebp-20h], edx
cmp	byte ptr [ebp-25h], 0
jnz	short loc_7CE9F5
mov	dword ptr [ebp-4], 0

loc_7CEA24:
cmp	dword ptr [ebp+10h], 0
jz	short loc_7CEA5D
mov	eax, [ebp+10h]
mov	ecx, [ebp+8]
fld	dword ptr [ecx+140h]
fstp	dword ptr [eax]
mov	edx, [ebp+10h]
mov	eax, [ebp+8]
fld	dword ptr [eax+144h]
fstp	dword ptr [edx+4]
mov	ecx, [ebp+10h]
mov	edx, [ebp+8]
fld	dword ptr [edx+148h]
fstp	dword ptr [ecx+8]
mov	dword ptr [ebp-4], 0

loc_7CEA5D:
mov	eax, [ebp-4]

loc_7CEA60:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+114h]
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CEA80 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	eax, [eax+0E8h]
and	eax, 0FFh
pop	ebp
retn
sub_7CEA80 endp

align 10h


; Attributes: bp-based frame

sub_7CEAA0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
and	ecx, 0FFFFFF00h
mov	edx, [ebp+arg_4]
and	edx, 0FFh
or	ecx, edx
mov	eax, [ebp+arg_0]
mov	[eax+0E8h], ecx
pop	ebp
retn
sub_7CEAA0 endp

align 10h


; Attributes: bp-based frame

sub_7CEAD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
and	ecx, 0FF00h
sar	ecx, 8
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+68h]
and	eax, 8000000h
jnz	short loc_7CEAFC
cmp	[ebp+var_4], 1
jnz	short loc_7CEB05

loc_7CEAFC:
mov	eax, 1
jmp	short loc_7CEB4C
jmp	short loc_7CEB4A

loc_7CEB05:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+68h]
and	edx, 40000000h
jnz	short loc_7CEB19
cmp	[ebp+var_4], 2
jnz	short loc_7CEB22

loc_7CEB19:
mov	eax, 2
jmp	short loc_7CEB4C
jmp	short loc_7CEB4A

loc_7CEB22:
cmp	[ebp+var_4], 4
jnz	short loc_7CEB31
mov	eax, 4
jmp	short loc_7CEB4C
jmp	short loc_7CEB4A

loc_7CEB31:
cmp	[ebp+var_4], 3
jnz	short loc_7CEB40
mov	eax, 3
jmp	short loc_7CEB4C
jmp	short loc_7CEB4A

loc_7CEB40:
cmp	[ebp+var_4], 0
jnz	short loc_7CEB4A
xor	eax, eax
jmp	short loc_7CEB4C

loc_7CEB4A:
xor	eax, eax

loc_7CEB4C:
mov	esp, ebp
pop	ebp
retn
sub_7CEAD0 endp



; Attributes: bp-based frame

sub_7CEB50 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
cmp	[ebp+arg_4], 1
jnz	short loc_7CEBA0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
and	ecx, 0B7FFFFFFh
mov	edx, [ebp+arg_0]
mov	[edx+68h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
and	ecx, 0FFFF00FFh
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
or	ecx, 100h
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
jmp	loc_7CECC6

loc_7CEBA0:
cmp	[ebp+arg_4], 2
jnz	short loc_7CEBED
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
and	ecx, 0B7FFFFFFh
mov	edx, [ebp+arg_0]
mov	[edx+68h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
and	ecx, 0FFFF00FFh
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
or	ecx, 200h
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
jmp	loc_7CECC6

loc_7CEBED:
cmp	[ebp+arg_4], 4
jnz	short loc_7CEC3A
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
and	ecx, 0B7FFFFFFh
mov	edx, [ebp+arg_0]
mov	[edx+68h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
and	ecx, 0FFFF00FFh
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
or	ecx, 400h
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
jmp	loc_7CECC6

loc_7CEC3A:
cmp	[ebp+arg_4], 3
jnz	short loc_7CEC84
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
and	ecx, 0B7FFFFFFh
mov	edx, [ebp+arg_0]
mov	[edx+68h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
and	ecx, 0FFFF00FFh
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
or	ecx, 300h
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
jmp	short loc_7CECC6

loc_7CEC84:
cmp	[ebp+arg_4], 0
jnz	short loc_7CECC6
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
and	ecx, 0B7FFFFFFh
mov	edx, [ebp+arg_0]
mov	[edx+68h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
and	ecx, 0FFFF00FFh
mov	edx, [ebp+arg_0]
mov	[edx+0E8h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0E8h]
mov	[eax+0E8h], edx

loc_7CECC6:
pop	ebp
retn
sub_7CEB50 endp

align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
add	eax, 4
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CECF0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
add	eax, 2Ch
pop	ebp
retn
sub_7CECF0 endp

align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+3Ch]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [ebp+0Ch]
mov	[eax+3Ch], ecx
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+20h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+24h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	eax, [eax+28h]
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	ecx, [eax+120h]
mov	dword_1859050, ecx
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, dword_1859050
mov	ecx, [eax+24h]
mov	edx, dword_1859050
lea	eax, [edx+ecx+2Ch]
mov	dword_1859050, eax
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
mov	ecx, dword_1859050
sub	ecx, [eax+120h]
mov	[ebp-4], ecx
mov	edx, [ebp+8]
mov	eax, [ebp-4]
cmp	eax, [edx+11Ch]
jb	short loc_7CEDC8
xor	eax, eax
jmp	short loc_7CEDCD

loc_7CEDC8:
mov	eax, dword_1859050

loc_7CEDCD:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
add	eax, 2Ch
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CEDF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+11Ch], 0
jz	short loc_7CEE1B
mov	edx, [ebp+var_4]
mov	eax, [edx+120h]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[ecx+120h], eax

loc_7CEE1B:
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+138h], 0
jz	short loc_7CEE3C
mov	eax, [ebp+var_4]
mov	ecx, [eax+13Ch]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[edx+13Ch], ecx

loc_7CEE3C:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+124h], 0
jz	short loc_7CEE5D
mov	ecx, [ebp+var_4]
mov	edx, [ecx+12Ch]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[eax+12Ch], edx

loc_7CEE5D:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+114h], 0
jz	short loc_7CEE7E
mov	edx, [ebp+var_4]
mov	eax, [edx+118h]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[ecx+118h], eax

loc_7CEE7E:
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+130h], 0
jz	short loc_7CEE9F
mov	eax, [ebp+var_4]
mov	ecx, [eax+134h]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[edx+134h], ecx

loc_7CEE9F:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+180h], 0
jz	short loc_7CEEC0
mov	ecx, [ebp+var_4]
mov	edx, [ecx+184h]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[eax+184h], edx

loc_7CEEC0:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+194h], 0
jz	short loc_7CEEE1
mov	edx, [ebp+var_4]
mov	eax, [edx+198h]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[ecx+198h], eax

loc_7CEEE1:
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+174h], 0
jz	short loc_7CEF02
mov	eax, [ebp+var_4]
mov	ecx, [eax+178h]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[edx+178h], ecx

loc_7CEF02:
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+170h], 0
jz	short loc_7CEF23
mov	ecx, [ebp+var_4]
mov	edx, [ecx+17Ch]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[eax+17Ch], edx

loc_7CEF23:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [edx+12Ch]
mov	[ecx+128h], eax
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+138h], 0
jz	short loc_7CEF53
mov	edx, [ebp+var_4]
mov	eax, [edx+13Ch]
push	eax
call	sub_7CFE20
add	esp, 4

loc_7CEF53:
mov	ecx, [ebp+var_4]
cmp	dword ptr [ecx+170h], 0
jz	short loc_7CEF6B
mov	edx, [ebp+var_4]
push	edx
call	sub_7C8310
add	esp, 4

loc_7CEF6B:
mov	esp, ebp
pop	ebp
retn
sub_7CEDF0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CEF70(int, float)
sub_7CEF70 proc	near

var_4C=	dword ptr -4Ch
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 40h
push	esi
push	edi
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+12Ch]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+118h]
mov	[ebp+var_20], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+134h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+17Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+184h]
mov	[ebp+var_28], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+194h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+198h]
mov	[ebp+var_2C], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+138h]
mov	[ebp+var_24], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+13Ch]
mov	[ebp+var_18], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
mov	[ebp+var_C], eax
push	ecx		; float
fld	[ebp+arg_4]
fstp	[esp+4Ch+var_4C]
mov	ecx, [ebp+var_C]
push	ecx		; int
call	sub_7CF880
add	esp, 8
mov	edx, [ebp+var_C]
push	edx
call	sub_7CF6E0
add	esp, 4
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	edx, [ecx+20h]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
and	eax, (offset sub_FFFEFF+1)
jz	loc_7CF567
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+18h]
mov	edx, [edx+2Ch]
mov	eax, [edx+ecx*4]
add	eax, 4
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+4]
mov	eax, [ebp+var_C]
mov	ecx, [eax+1Ch]
mov	edx, [edx+2Ch]
mov	eax, [edx+ecx*4]
add	eax, 4
mov	[ebp+var_38], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx+38h]
mov	[ebp+var_34], edx
mov	esi, [ebp+var_3C]
mov	ecx, 69h
mov	edi, [ebp+var_34]
rep movsd
mov	eax, [ebp+var_14]
and	eax, 200h
jz	short loc_7CF0E1
mov	ecx, [ebp+var_3C]
fld	dword ptr [ecx+0D0h]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+0D0h]
mov	eax, [ebp+var_3C]
fsub	dword ptr [eax+0D0h]
mov	ecx, [ebp+var_C]
fmul	dword ptr [ecx+20h]
faddp	st(1), st
mov	edx, [ebp+var_34]
fstp	dword ptr [edx+0D0h]

loc_7CF0E1:
mov	eax, [ebp+var_14]
and	eax, 400h
jz	loc_7CF173
mov	ecx, [ebp+var_3C]
fld	dword ptr [ecx+0DCh]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+0DCh]
mov	eax, [ebp+var_3C]
fsub	dword ptr [eax+0DCh]
mov	ecx, [ebp+var_C]
fmul	dword ptr [ecx+20h]
faddp	st(1), st
mov	edx, [ebp+var_34]
fstp	dword ptr [edx+0DCh]
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+0D8h]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+0D8h]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+0D8h]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+0D8h]
mov	edx, [ebp+var_3C]
fld	dword ptr [edx+0D4h]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+0D4h]
mov	ecx, [ebp+var_3C]
fsub	dword ptr [ecx+0D4h]
mov	edx, [ebp+var_C]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+var_34]
fstp	dword ptr [eax+0D4h]

loc_7CF173:
mov	ecx, [ebp+var_14]
and	ecx, 800h
jz	short loc_7CF1AA
mov	edx, [ebp+var_3C]
fld	dword ptr [edx+0CCh]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+0CCh]
mov	ecx, [ebp+var_3C]
fsub	dword ptr [ecx+0CCh]
mov	edx, [ebp+var_C]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+var_34]
fstp	dword ptr [eax+0CCh]

loc_7CF1AA:
mov	ecx, [ebp+var_14]
and	ecx, 1000h
jz	short loc_7CF1F5
mov	edx, [ebp+var_3C]
fld	dword ptr [edx+58h]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+58h]
mov	ecx, [ebp+var_3C]
fsub	dword ptr [ecx+58h]
mov	edx, [ebp+var_C]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+var_34]
fstp	dword ptr [eax+58h]
mov	ecx, [ebp+var_3C]
fld	dword ptr [ecx+5Ch]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+5Ch]
mov	eax, [ebp+var_3C]
fsub	dword ptr [eax+5Ch]
mov	ecx, [ebp+var_C]
fmul	dword ptr [ecx+20h]
faddp	st(1), st
mov	edx, [ebp+var_34]
fstp	dword ptr [edx+5Ch]

loc_7CF1F5:
mov	eax, [ebp+var_14]
and	eax, 2000h
jz	short loc_7CF24B
mov	ecx, [ebp+var_3C]
fld	dword ptr [ecx+7Ch]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+7Ch]
mov	eax, [ebp+var_3C]
fsub	dword ptr [eax+7Ch]
mov	ecx, [ebp+var_C]
fmul	dword ptr [ecx+20h]
faddp	st(1), st
mov	edx, [ebp+var_34]
fstp	dword ptr [edx+7Ch]
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+80h]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+80h]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+80h]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+80h]

loc_7CF24B:
mov	edx, [ebp+var_14]
and	edx, 100h
jz	short loc_7CF282
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+0E0h]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+0E0h]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+0E0h]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+0E0h]

loc_7CF282:
mov	edx, [ebp+var_14]
and	edx, 4000h
jz	short loc_7CF2B9
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+84h]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+84h]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+84h]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+84h]

loc_7CF2B9:
mov	edx, [ebp+var_14]
and	edx, 8000h
jz	short loc_7CF2F0
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+0E4h]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+0E4h]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+0E4h]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+0E4h]

loc_7CF2F0:
mov	edx, [ebp+var_14]
and	edx, 20000h
jz	loc_7CF383
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+88h]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+88h]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+88h]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+88h]
mov	edx, [ebp+var_3C]
fld	dword ptr [edx+8Ch]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+8Ch]
mov	ecx, [ebp+var_3C]
fsub	dword ptr [ecx+8Ch]
mov	edx, [ebp+var_C]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+var_34]
fstp	dword ptr [eax+8Ch]
mov	ecx, [ebp+var_3C]
fld	dword ptr [ecx+90h]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+90h]
mov	eax, [ebp+var_3C]
fsub	dword ptr [eax+90h]
mov	ecx, [ebp+var_C]
fmul	dword ptr [ecx+20h]
faddp	st(1), st
mov	edx, [ebp+var_34]
fstp	dword ptr [edx+90h]

loc_7CF383:
mov	eax, [ebp+var_14]
and	eax, 10000h
jz	loc_7CF415
mov	ecx, [ebp+var_3C]
fld	dword ptr [ecx+98h]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+98h]
mov	eax, [ebp+var_3C]
fsub	dword ptr [eax+98h]
mov	ecx, [ebp+var_C]
fmul	dword ptr [ecx+20h]
faddp	st(1), st
mov	edx, [ebp+var_34]
fstp	dword ptr [edx+98h]
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+9Ch]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+9Ch]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+9Ch]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+9Ch]
mov	edx, [ebp+var_3C]
fld	dword ptr [edx+0A0h]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+0A0h]
mov	ecx, [ebp+var_3C]
fsub	dword ptr [ecx+0A0h]
mov	edx, [ebp+var_C]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+var_34]
fstp	dword ptr [eax+0A0h]

loc_7CF415:
mov	ecx, [ebp+var_14]
and	ecx, 40000h
jz	loc_7CF4D4
mov	edx, [ebp+var_3C]
fld	dword ptr [edx+0A8h]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+0A8h]
mov	ecx, [ebp+var_3C]
fsub	dword ptr [ecx+0A8h]
mov	edx, [ebp+var_C]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+var_34]
fstp	dword ptr [eax+0A8h]
mov	ecx, [ebp+var_3C]
fld	dword ptr [ecx+0ACh]
mov	edx, [ebp+var_38]
fld	dword ptr [edx+0ACh]
mov	eax, [ebp+var_3C]
fsub	dword ptr [eax+0ACh]
mov	ecx, [ebp+var_C]
fmul	dword ptr [ecx+20h]
faddp	st(1), st
mov	edx, [ebp+var_34]
fstp	dword ptr [edx+0ACh]
mov	eax, [ebp+var_3C]
fld	dword ptr [eax+0B0h]
mov	ecx, [ebp+var_38]
fld	dword ptr [ecx+0B0h]
mov	edx, [ebp+var_3C]
fsub	dword ptr [edx+0B0h]
mov	eax, [ebp+var_C]
fmul	dword ptr [eax+20h]
faddp	st(1), st
mov	ecx, [ebp+var_34]
fstp	dword ptr [ecx+0B0h]
mov	edx, [ebp+var_3C]
fld	dword ptr [edx+0B4h]
mov	eax, [ebp+var_38]
fld	dword ptr [eax+0B4h]
mov	ecx, [ebp+var_3C]
fsub	dword ptr [ecx+0B4h]
mov	edx, [ebp+var_C]
fmul	dword ptr [edx+20h]
faddp	st(1), st
mov	eax, [ebp+var_34]
fstp	dword ptr [eax+0B4h]

loc_7CF4D4:
mov	esi, [ebp+var_34]
mov	ecx, [ebp+var_30]
mov	edi, [ecx+168h]
mov	ecx, 69h
rep movsd
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+124h]
shl	ecx, 6
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx+12Ch]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+114h]
shl	ecx, 5
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx+118h]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [eax+130h]
shl	ecx, 6
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx+134h]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
jmp	loc_7CF60D

loc_7CF567:
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+18h]
mov	eax, [eax+2Ch]
mov	ecx, [eax+edx*4]
add	ecx, 4
mov	[ebp+var_40], ecx
mov	esi, [ebp+var_40]
mov	edx, [ebp+var_30]
mov	edi, [edx+168h]
mov	ecx, 69h
rep movsd
mov	eax, [ebp+var_30]
mov	ecx, [eax+168h]
mov	edx, [ecx+124h]
shl	edx, 6
push	edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+12Ch]
push	ecx
mov	edx, [ebp+var_1C]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+var_30]
mov	ecx, [eax+168h]
mov	edx, [ecx+114h]
shl	edx, 5
push	edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+118h]
push	ecx
mov	edx, [ebp+var_20]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+var_30]
mov	ecx, [eax+168h]
mov	edx, [ecx+130h]
shl	edx, 6
push	edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+134h]
push	ecx
mov	edx, [ebp+var_10]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7CF60D:
mov	eax, [ebp+var_30]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_1C]
mov	[ecx+12Ch], edx
mov	eax, [ebp+var_30]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_20]
mov	[ecx+118h], edx
mov	eax, [ebp+var_30]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_10]
mov	[ecx+134h], edx
mov	eax, [ebp+var_30]
mov	ecx, [eax+168h]
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [ecx+12Ch]
mov	[eax+128h], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_8]
mov	[eax+17Ch], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_28]
mov	[eax+184h], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_4]
mov	[eax+194h], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_2C]
mov	[eax+198h], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_24]
mov	[eax+138h], ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+168h]
mov	ecx, [ebp+var_18]
mov	[eax+13Ch], ecx
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7CEF70 endp

align 10h


; Attributes: bp-based frame

sub_7CF6E0 proc	near

var_14=	qword ptr -14h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
movss	xmm0, dword ptr	[eax+24h]
movss	[ebp+var_8], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	eax, [edx+38h]
mov	[ebp+var_4], eax

loc_7CF6FF:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+60h]
cmp	edx, [ebp+var_4]
jge	short loc_7CF76E
mov	eax, [ebp+arg_0]
mov	ecx, [eax+64h]
mov	edx, [ecx]
mov	eax, [edx]
mov	dword ptr [ebp+var_14],	eax
mov	dword ptr [ebp+var_14+4], 0
fild	[ebp+var_14]
fld	[ebp+var_8]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CF76E
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+64h]
mov	eax, [edx]
add	eax, 4
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+54h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+50h]
call	edx
add	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax+64h]
add	ecx, 4
mov	edx, [ebp+arg_0]
mov	[edx+64h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+60h], ecx
jmp	short loc_7CF6FF

loc_7CF76E:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
and	ecx, 4
jz	short loc_7CF791
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+60h], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+3Ch]
mov	[edx+64h], eax

loc_7CF791:
mov	esp, ebp
pop	ebp
retn
sub_7CF6E0 endp

align 10h


; Attributes: bp-based frame

sub_7CF7A0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [eax+8], xmm0
mov	ecx, [ebp+arg_0]
movss	xmm0, ds:flt_15AA9FC
movss	dword ptr [ecx+0Ch], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+10h], xmm0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_4]
mov	eax, [edx+28h]
mov	ecx, [ecx+2Ch]
mov	edx, [ecx+eax*4-4]
mov	eax, [edx]
mov	dword ptr [ebp+var_8], eax
mov	dword ptr [ebp+var_8+4], 0
fild	[ebp+var_8]
mov	ecx, [ebp+arg_0]
fstp	dword ptr [ecx+14h]
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+18h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+1Ch], 1
mov	ecx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [ecx+20h], xmm0
mov	edx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+24h], xmm0
mov	eax, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [eax+28h], xmm0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+14h]
fstp	dword ptr [ecx+2Ch]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+2Ch]
mov	ecx, [ebp+arg_4]
fdiv	dword ptr [ecx+24h]
fld1
fdivrp	st(1), st
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+30h]
mov	esp, ebp
pop	ebp
retn
sub_7CF7A0 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7CF880(int, float)
sub_7CF880 proc	near

var_88=	dword ptr -88h
var_84=	qword ptr -84h
var_7C=	qword ptr -7Ch
var_74=	qword ptr -74h
var_6C=	qword ptr -6Ch
var_64=	qword ptr -64h
var_5C=	qword ptr -5Ch
var_54=	dword ptr -54h
var_4E=	word ptr -4Eh
var_4C=	qword ptr -4Ch
var_44=	qword ptr -44h
var_3C=	qword ptr -3Ch
var_34=	dword ptr -34h
var_2E=	word ptr -2Eh
var_2C=	qword ptr -2Ch
var_24=	qword ptr -24h
var_1C=	qword ptr -1Ch
var_14=	dword ptr -14h
var_E= word ptr	-0Eh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 88h
mov	eax, [ebp+arg_0]
fldz
fld	dword ptr [eax+24h]
fucomip	st, st(1)
fstp	st
lahf
test	ah, 44h
jp	short loc_7CF8A4
mov	[ebp+var_C], 1
jmp	short loc_7CF8AB

loc_7CF8A4:
mov	[ebp+var_C], 0

loc_7CF8AB:
mov	ecx, [ebp+var_C]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+24h]
fstp	dword ptr [edx+28h]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+2Ch]
mov	edx, [ebp+arg_0]
fmul	dword ptr [edx+8]
mov	eax, [ebp+arg_0]
fmul	dword ptr [eax+0Ch]
fmul	[ebp+arg_4]
mov	ecx, [ebp+arg_0]
fmul	dword ptr [ecx+30h]
mov	edx, [ebp+arg_0]
fadd	dword ptr [edx+24h]
mov	eax, [ebp+arg_0]
fstp	dword ptr [eax+24h]
mov	[ebp+var_4], 0
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+24h]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+10h]
fcomip	st, st(1)
fstp	st
jb	short loc_7CF910
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+24h]
mov	[ebp+var_4], 1

loc_7CF910:
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+24h]
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+14h]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7CF937
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
fld	dword ptr [edx+14h]
fstp	dword ptr [ecx+24h]
mov	[ebp+var_4], 1

loc_7CF937:
cmp	[ebp+var_8], 0
jnz	loc_7CFB1D
cmp	[ebp+var_4], 0
jnz	loc_7CFB1D
mov	eax, [ebp+arg_0]
fld	dword ptr [eax+0Ch]
fldz
fcomip	st, st(1)
fstp	st
jbe	short loc_7CF9D3

loc_7CF959:
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+24h]
fnstcw	[ebp+var_E]
movzx	eax, [ebp+var_E]
or	eax, 0C00h
mov	[ebp+var_14], eax
fldcw	word ptr [ebp+var_14]
fistp	[ebp+var_1C]
fldcw	[ebp+var_E]
mov	edx, dword ptr [ebp+var_1C]
mov	dword ptr [ebp+var_24],	edx
mov	dword ptr [ebp+var_24+4], 0
fild	[ebp+var_24]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	ecx, [ecx+2Ch]
mov	edx, [ecx+eax*4]
mov	eax, [edx]
mov	dword ptr [ebp+var_2C],	eax
mov	dword ptr [ebp+var_2C+4], 0
fild	[ebp+var_2C]
fcomip	st, st(1)
fstp	st
jbe	short loc_7CF9CE
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+18h], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
jmp	short loc_7CF959

loc_7CF9CE:
jmp	loc_7CFAA4

loc_7CF9D3:
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+24h]
fnstcw	[ebp+var_2E]
movzx	eax, [ebp+var_2E]
or	eax, 0C00h
mov	[ebp+var_34], eax
fldcw	word ptr [ebp+var_34]
fistp	[ebp+var_3C]
fldcw	[ebp+var_2E]
mov	edx, dword ptr [ebp+var_3C]
mov	dword ptr [ebp+var_44],	edx
mov	dword ptr [ebp+var_44+4], 0
fild	[ebp+var_44]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	ecx, [ecx+2Ch]
mov	edx, [ecx+eax*4]
mov	eax, [edx]
mov	dword ptr [ebp+var_4C],	eax
mov	dword ptr [ebp+var_4C+4], 0
fild	[ebp+var_4C]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7CFAA4
mov	ecx, [ebp+arg_0]
fld	dword ptr [ecx+24h]
fnstcw	[ebp+var_4E]
movzx	eax, [ebp+var_4E]
or	eax, 0C00h
mov	[ebp+var_54], eax
fldcw	word ptr [ebp+var_54]
fistp	[ebp+var_5C]
fldcw	[ebp+var_4E]
mov	edx, dword ptr [ebp+var_5C]
mov	dword ptr [ebp+var_64],	edx
mov	dword ptr [ebp+var_64+4], 0
fild	[ebp+var_64]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	ecx, [ecx+2Ch]
mov	edx, [ecx+eax*4]
mov	eax, [edx]
mov	dword ptr [ebp+var_6C],	eax
mov	dword ptr [ebp+var_6C+4], 0
fild	[ebp+var_6C]
fxch	st(1)
fcomip	st, st(1)
fstp	st
jb	short loc_7CFAA4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+18h], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
jmp	loc_7CF9D3

loc_7CFAA4:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	edx, [edx+2Ch]
mov	eax, [edx+ecx*4]
mov	ecx, [eax]
mov	dword ptr [ebp+var_74],	ecx
mov	dword ptr [ebp+var_74+4], 0
fild	[ebp+var_74]
mov	edx, [ebp+arg_0]
fsubr	dword ptr [edx+24h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	ecx, [ecx+2Ch]
mov	edx, [ecx+eax*4]
mov	eax, [edx]
mov	dword ptr [ebp+var_7C],	eax
mov	dword ptr [ebp+var_7C+4], 0
fild	[ebp+var_7C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	edx, [edx+2Ch]
mov	eax, [edx+ecx*4]
mov	ecx, [eax]
mov	dword ptr [ebp+var_84],	ecx
mov	dword ptr [ebp+var_84+4], 0
fild	[ebp+var_84]
fsubp	st(1), st
fdivp	st(1), st
mov	edx, [ebp+arg_0]
fstp	dword ptr [edx+20h]

loc_7CFB1D:
fldz
fld	[ebp+arg_4]
fcomip	st, st(1)
fstp	st
jbe	loc_7CFBC1
cmp	[ebp+var_4], 0
jz	loc_7CFBC1
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
and	ecx, 1
jz	short loc_7CFBB4
mov	edx, [ebp+arg_0]
mov	eax, [edx]
and	eax, 2
jz	short loc_7CFB5C
mov	ecx, [ebp+arg_0]
movss	xmm0, dword ptr	[ecx+14h]
movss	[ebp+var_88], xmm0
jmp	short loc_7CFB6C

loc_7CFB5C:
mov	edx, [ebp+arg_0]
movss	xmm0, dword ptr	[edx+10h]
movss	[ebp+var_88], xmm0

loc_7CFB6C:
mov	eax, [ebp+arg_0]
movss	xmm0, [ebp+var_88]
movss	dword ptr [eax+24h], xmm0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+18h], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1Ch], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
or	eax, 4
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+arg_0]
movss	xmm0, ds:SrcStr
movss	dword ptr [edx+20h], xmm0
jmp	short loc_7CFBC1

loc_7CFBB4:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
or	ecx, 10h
mov	edx, [ebp+arg_0]
mov	[edx], ecx

loc_7CFBC1:
cmp	[ebp+var_4], 0
jnz	short loc_7CFBD4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
and	ecx, 0FFFFFFFBh
mov	edx, [ebp+arg_0]
mov	[edx], ecx

loc_7CFBD4:
mov	esp, ebp
pop	ebp
retn
sub_7CF880 endp

align 10h


; Attributes: bp-based frame

sub_7CFBE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 0
mov	eax, [ebp+var_4]
imul	eax, 68h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	dword ptr [edx+eax+38h], offset	unk_1859060
mov	eax, [ebp+var_4]
imul	eax, 68h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [edx+eax+34h]
or	eax, 2
mov	ecx, [ebp+var_4]
imul	ecx, 68h
mov	edx, [ebp+arg_0]
mov	edx, [edx+0Ch]
mov	[edx+ecx+34h], eax
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_4]
imul	ecx, 68h
mov	edx, [ebp+arg_0]
add	ecx, [edx+0Ch]
push	ecx
call	sub_7CF7A0
add	esp, 8
mov	eax, [ebp+var_4]
imul	eax, 68h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	dword ptr [edx+eax+60h], 0
mov	eax, [ebp+var_4]
imul	eax, 68h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	ecx, [ebp+arg_4]
mov	ecx, [ecx+3Ch]
mov	[edx+eax+64h], ecx
mov	esp, ebp
pop	ebp
retn
sub_7CFBE0 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
mov	[ebp-4], ecx
mov	edx, [ebp-4]
movss	xmm0, dword ptr	[ebp+0Ch]
movss	dword ptr [edx+8], xmm0
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7CFC90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	[ebp+var_4], ecx
cmp	[ebp+arg_4], 0
jz	short loc_7CFCB2
mov	edx, [ebp+var_4]
mov	eax, [edx]
or	eax, 1
mov	ecx, [ebp+var_4]
mov	[ecx], eax
jmp	short loc_7CFCBF

loc_7CFCB2:
mov	edx, [ebp+var_4]
mov	eax, [edx]
and	eax, 0FFFFFFFEh
mov	ecx, [ebp+var_4]
mov	[ecx], eax

loc_7CFCBF:
mov	esp, ebp
pop	ebp
retn
sub_7CFC90 endp

align 10h


; Attributes: bp-based frame

sub_7CFCD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+34h]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[eax+34h], edx
mov	ecx, [ebp+var_4]
mov	edx, [ecx+2Ch]
add	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[eax+2Ch], edx
mov	[ebp+var_8], 0
jmp	short loc_7CFD0C

loc_7CFD03:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_7CFD0C:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
cmp	eax, [edx+28h]
jge	short loc_7CFD34
mov	ecx, [ebp+var_4]
mov	edx, [ecx+2Ch]
mov	eax, [ebp+var_8]
mov	ecx, [edx+eax*4]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	eax, [edx+2Ch]
mov	edx, [ebp+var_8]
mov	[eax+edx*4], ecx
jmp	short loc_7CFD03

loc_7CFD34:
mov	eax, [ebp+var_4]
mov	ecx, [eax+3Ch]
add	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[edx+3Ch], ecx
mov	[ebp+var_8], 0
jmp	short loc_7CFD55

loc_7CFD4C:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7CFD55:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
cmp	edx, [ecx+38h]
jge	short loc_7CFD7D
mov	eax, [ebp+var_4]
mov	ecx, [eax+3Ch]
mov	edx, [ebp+var_8]
mov	eax, [ecx+edx*4]
add	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	edx, [ecx+3Ch]
mov	ecx, [ebp+var_8]
mov	[edx+ecx*4], eax
jmp	short loc_7CFD4C

loc_7CFD7D:
mov	esp, ebp
pop	ebp
retn
sub_7CFCD0 endp

align 10h


; Attributes: bp-based frame

sub_7CFD90 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 1
mov	eax, [ebp+var_4]
imul	eax, 68h
add	eax, 14h
mov	esp, ebp
pop	ebp
retn
sub_7CFD90 endp

align 10h


; Attributes: bp-based frame

sub_7CFDB0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	[ebp+var_8], 1
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+arg_0], ecx
mov	edx, [ebp+var_4]
add	edx, 14h
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx+8], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+10h], offset sub_7CEF70
mov	ecx, [ebp+var_8]
imul	ecx, 68h
push	ecx		; size_t
push	0		; int
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	esp, ebp
pop	ebp
retn
sub_7CFDB0 endp

align 10h


; Attributes: bp-based frame

sub_7CFE20 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
push	eax
call	sub_7CFCD0
add	esp, 4
mov	[ebp+var_4], 0
jmp	short loc_7CFE44

loc_7CFE3B:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7CFE44:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
cmp	eax, [edx+28h]
jge	loc_7CFEE2
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+2Ch]
mov	eax, [ebp+var_4]
mov	ecx, [edx+eax*4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+124h]
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	[ecx+124h], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+140h]
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	[ecx+140h], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+130h]
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	[ecx+130h], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+11Ch]
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	[ecx+11Ch], eax
mov	edx, [ebp+var_8]
mov	eax, [edx+138h]
add	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	[ecx+138h], eax
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_8]
mov	ecx, [eax+130h]
mov	[edx+12Ch], ecx
jmp	loc_7CFE3B

loc_7CFEE2:
mov	esp, ebp
pop	ebp
retn
sub_7CFE20 endp

align 10h
; [0000000F BYTES: COLLAPSED FUNCTION __crt_debugger_hook. PRESS KEYPAD	"+" TO EXPAND]
align 10h
; [00000012 BYTES: COLLAPSED FUNCTION ___inc_tmpoff. PRESS KEYPAD "+" TO EXPAND]
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
mov	ecx, dword_1859204
cmp	ecx, [eax+28h]
jl	short loc_7CFF36
xor	eax, eax
jmp	short loc_7CFF4E

loc_7CFF36:
mov	edx, [ebp+8]
mov	eax, [edx+2Ch]
mov	ecx, dword_1859204
mov	edx, [eax+ecx*4]
mov	[ebp-4], edx
mov	eax, [ebp-4]
add	eax, 4

loc_7CFF4E:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
mov	[ebp-4], ecx
mov	edx, [ebp-4]
mov	eax, [edx]
and	eax, 4
neg	eax
sbb	eax, eax
neg	eax
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+8]
mov	ecx, [eax+4]
mov	[ebp-0Ch], ecx
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
mov	ecx, [eax+4]
mov	[ebp-8], ecx
mov	edx, [ebp+8]
mov	eax, [edx+0Ch]
mov	ecx, [eax]
and	ecx, 1
mov	[ebp-4], ecx
mov	edx, [ebp-0Ch]
push	edx
mov	eax, [ebp+8]
push	eax
call	sub_7CFDB0
add	esp, 8
mov	ecx, [ebp-8]
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7CFBE0
add	esp, 8
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
or	edx, [ebp-4]
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
mov	[ecx], edx
mov	esp, ebp
pop	ebp
retn
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
mov	ecx, [eax+0Ch]
mov	[ebp-4], ecx
mov	edx, [ebp-4]
mov	eax, [edx]
and	eax, 10h
neg	eax
sbb	eax, eax
neg	eax
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	dword ptr [ebp-4], 0
mov	eax, [ebp+8]
mov	dword_1859208, eax
mov	ecx, [ebp+0Ch]
sub	ecx, 8
mov	edx, dword_1859208
mov	[edx], ecx
mov	eax, dword_1859208
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
mov	edx, dword_1859208
mov	[edx], ecx
mov	eax, [ebp+0Ch]
mov	ecx, dword_1859208
lea	edx, [ecx+eax-4]
mov	[ebp-4], edx
mov	eax, [ebp-4]
mov	dword ptr [eax], 40000000h
xor	eax, eax
mov	esp, ebp
pop	ebp
retn
align 10h
; [00000005 BYTES: COLLAPSED FUNCTION __initp_misc_winxfltr_1. PRESS KEYPAD "+"	TO EXPAND]
align 10h
push	ebp
mov	ebp, esp
mov	eax, [ebp+8]
mov	dword_16815E4, eax
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7D0080 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_20], 0
mov	[ebp+var_18], 0
mov	[ebp+var_4], 0
mov	[ebp+var_8], 0
mov	[ebp+var_1C], 0
mov	[ebp+var_24], 0
mov	eax, dword_16815E4
mov	ecx, [ebp+arg_0]
lea	edx, [ecx+eax-1]
mov	eax, dword_16815E4
imul	eax, -1
and	edx, eax
mov	[ebp+var_C], edx
mov	ecx, dword_16815E4
mov	edx, [ebp+var_C]
lea	eax, [edx+ecx+0Ch]
mov	ecx, dword_16815E4
lea	edx, [eax+ecx+7]
mov	eax, dword_16815E4
imul	eax, -1
and	edx, eax
mov	[ebp+var_4], edx
mov	ecx, dword_1859208
mov	[ebp+var_8], ecx

loc_7D00F6:
mov	edx, [ebp+var_8]
mov	eax, [edx]
and	eax, 7FFFFFFFh
sar	eax, 1Eh
sub	eax, 1
neg	eax
sbb	eax, eax
add	eax, 1
jnz	loc_7D02E0
cmp	[ebp+var_20], 0
jnz	loc_7D02E0
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	[ebp+var_18], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax]
sar	ecx, 1Fh
neg	ecx
sbb	ecx, ecx
add	ecx, 1
jz	loc_7D02CE
mov	edx, [ebp+var_18]
cmp	edx, [ebp+var_4]
jnz	loc_7D01E6
mov	eax, [ebp+var_8]
mov	ecx, [eax]
or	ecx, 80000000h
mov	edx, [ebp+var_8]
mov	[edx], ecx
mov	eax, [ebp+var_8]
add	eax, 4
mov	[ebp+var_10], eax
mov	ecx, dword_16815E4
mov	edx, [ebp+var_10]
lea	eax, [edx+ecx-1]
mov	ecx, dword_16815E4
imul	ecx, -1
and	eax, ecx
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [ebp+var_10]
mov	[edx+8], eax
mov	ecx, [ebp+var_10]
add	ecx, 0Ch
mov	edx, [ebp+var_1C]
mov	[edx+4], ecx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
mov	edx, [ebp+var_1C]
mov	edx, [edx+4]
mov	eax, [eax-0Ch]
mov	ecx, [ecx-4]
mov	[edx+eax], ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	ecx, [ebp+var_1C]
mov	ecx, [ecx+4]
mov	edx, [edx-0Ch]
mov	eax, [eax-8]
mov	[ecx+edx+4], eax
mov	[ebp+var_20], 1
jmp	loc_7D02CC

loc_7D01E6:
mov	ecx, [ebp+var_4]
add	ecx, 0Ch
cmp	[ebp+var_18], ecx
jbe	loc_7D02BF
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx]
or	edx, 80000000h
mov	eax, [ebp+var_8]
mov	[eax], edx
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_10], ecx
mov	edx, dword_16815E4
mov	eax, [ebp+var_10]
lea	ecx, [eax+edx-1]
mov	edx, dword_16815E4
imul	edx, -1
and	ecx, edx
mov	[ebp+var_10], ecx
mov	eax, [ebp+var_10]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
mov	edx, [ebp+var_C]
mov	[ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [ebp+var_10]
mov	[eax+8], ecx
mov	edx, [ebp+var_10]
add	edx, 0Ch
mov	eax, [ebp+var_1C]
mov	[eax+4], edx
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+4]
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	eax, [ebp+var_1C]
mov	eax, [eax+4]
mov	ecx, [ecx-0Ch]
mov	edx, [edx-4]
mov	[eax+ecx], edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+4]
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
mov	edx, [ebp+var_1C]
mov	edx, [edx+4]
mov	eax, [eax-0Ch]
mov	ecx, [ecx-8]
mov	[edx+eax+4], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx+4]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_18]
sub	edx, [ebp+var_4]
sub	edx, 4
mov	eax, [ebp+var_14]
mov	[eax], edx
mov	ecx, [ebp+var_14]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	eax, [ebp+var_14]
mov	[eax], edx
mov	[ebp+var_20], 1
jmp	short loc_7D02CC

loc_7D02BF:
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx+4]
mov	[ebp+var_8], eax

loc_7D02CC:
jmp	short loc_7D02DB

loc_7D02CE:
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_8]
lea	eax, [edx+ecx+4]
mov	[ebp+var_8], eax

loc_7D02DB:
jmp	loc_7D00F6

loc_7D02E0:
cmp	[ebp+var_20], 0
jz	short loc_7D02F0
mov	ecx, [ebp+var_1C]
mov	eax, [ecx+4]
jmp	short loc_7D02F2
jmp	short loc_7D02F2

loc_7D02F0:
xor	eax, eax

loc_7D02F2:
mov	esp, ebp
pop	ebp
retn
sub_7D0080 endp

align 10h


; Attributes: bp-based frame

sub_7D0300 proc	near

var_28=	dword ptr -28h
var_24=	byte ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 28h
push	esi
push	edi
cmp	[ebp+arg_0], 0
jz	short loc_7D037E
mov	eax, [ebp+arg_0]
mov	ecx, [eax-0Ch]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+ecx]
cmp	ecx, [eax-4]
jnz	short loc_7D0340
mov	edx, [ebp+arg_0]
mov	eax, [edx-0Ch]
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+eax+4]
cmp	eax, [edx-8]
jnz	short loc_7D0340
mov	[ebp+var_28], 1
jmp	short loc_7D0347

loc_7D0340:
mov	[ebp+var_28], 0

loc_7D0347:
cmp	[ebp+var_28], 0
jnz	short loc_7D035C
mov	ecx, 8
mov	esi, [ebp+arg_0]
lea	edi, [ebp+var_24]
rep movsd
jmp	short loc_7D037E

loc_7D035C:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx-4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
sub	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	eax, [ebp+var_4]
mov	[eax], edx

loc_7D037E:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7D0300 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	dword ptr [ebp-4], 0
mov	eax, dword_1859208
mov	[ebp-8], eax
mov	ecx, [ebp-8]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	[ebp-0Ch], edx

loc_7D03B3:
mov	eax, [ebp-8]
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
sar	ecx, 1Eh
sub	ecx, 1
neg	ecx
sbb	ecx, ecx
add	ecx, 1
jnz	loc_7D0454
mov	edx, [ebp-8]
mov	eax, [edx]
sar	eax, 1Fh
neg	eax
sbb	eax, eax
add	eax, 1
jz	short loc_7D042D
cmp	dword ptr [ebp-4], 0
jz	short loc_7D0425
mov	ecx, [ebp-4]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	eax, [ebp-0Ch]
lea	ecx, [edx+eax+4]
mov	edx, [ebp-4]
mov	[edx], ecx
mov	eax, [ebp-4]
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
mov	edx, [ebp-4]
mov	[edx], ecx
mov	eax, [ebp-4]
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
mov	[ebp-0Ch], ecx
mov	edx, [ebp-4]
mov	[ebp-8], edx
jmp	short loc_7D042B

loc_7D0425:
mov	eax, [ebp-8]
mov	[ebp-4], eax

loc_7D042B:
jmp	short loc_7D0434

loc_7D042D:
mov	dword ptr [ebp-4], 0

loc_7D0434:
mov	ecx, [ebp-0Ch]
mov	edx, [ebp-8]
lea	eax, [edx+ecx+4]
mov	[ebp-8], eax
mov	ecx, [ebp-8]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	[ebp-0Ch], edx
jmp	loc_7D03B3

loc_7D0454:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	dword ptr [ebp-8], 0
mov	dword ptr [ebp-0Ch], 0
mov	dword ptr [ebp-4], 0
mov	eax, dword_1859208
mov	[ebp-8], eax
mov	ecx, [ebp-8]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	[ebp-0Ch], edx

loc_7D0491:
mov	eax, [ebp-8]
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
sar	ecx, 1Eh
sub	ecx, 1
neg	ecx
sbb	ecx, ecx
add	ecx, 1
jnz	short loc_7D04E7
mov	edx, [ebp-8]
mov	eax, [edx]
sar	eax, 1Fh
neg	eax
sbb	eax, eax
add	eax, 1
jz	short loc_7D04CA
mov	ecx, [ebp-0Ch]
cmp	ecx, [ebp-4]
jle	short loc_7D04CA
mov	edx, [ebp-0Ch]
mov	[ebp-4], edx

loc_7D04CA:
mov	eax, [ebp-0Ch]
mov	ecx, [ebp-8]
lea	edx, [ecx+eax+4]
mov	[ebp-8], edx
mov	eax, [ebp-8]
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
mov	[ebp-0Ch], ecx
jmp	short loc_7D0491

loc_7D04E7:
mov	eax, [ebp-4]
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	dword ptr [ebp-4], 0
mov	dword ptr [ebp-8], 0
mov	dword ptr [ebp-0Ch], 0
mov	eax, dword_1859208
mov	[ebp-4], eax
mov	ecx, [ebp-4]
mov	edx, [ecx]
and	edx, 7FFFFFFFh
mov	[ebp-8], edx

loc_7D0521:
mov	eax, [ebp-4]
mov	ecx, [eax]
and	ecx, 7FFFFFFFh
sar	ecx, 1Eh
sub	ecx, 1
neg	ecx
sbb	ecx, ecx
add	ecx, 1
jnz	short loc_7D0571
mov	edx, [ebp-4]
mov	eax, [edx]
sar	eax, 1Fh
neg	eax
sbb	eax, eax
add	eax, 1
jz	short loc_7D0555
mov	ecx, [ebp-0Ch]
add	ecx, [ebp-8]
mov	[ebp-0Ch], ecx

loc_7D0555:
mov	edx, [ebp-8]
mov	eax, [ebp-4]
lea	ecx, [eax+edx+4]
mov	[ebp-4], ecx
mov	edx, [ebp-4]
mov	eax, [edx]
and	eax, 7FFFFFFFh
mov	[ebp-8], eax
jmp	short loc_7D0521

loc_7D0571:
mov	eax, [ebp-0Ch]
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7D0580 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_C]
add	ecx, 14h
imul	ecx, [ebp+arg_8]
add	ecx, 20h
mov	[ebp+var_1C], ecx
push	0
push	0
mov	edx, [ebp+var_1C]
push	edx
call	sub_7D0080
add	esp, 0Ch
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jnz	short loc_7D05C0
or	eax, 0FFFFFFFFh
jmp	loc_7D06A3

loc_7D05C0:
mov	eax, [ebp+var_1C]
push	eax		; size_t
push	0		; int
mov	ecx, [ebp+var_8]
push	ecx		; void *
call	_memset
add	esp, 0Ch
mov	edx, [ebp+var_8]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_8]
add	eax, 20h
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_8]
imul	ecx, 0Ch
add	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_C]
add	edx, 8
mov	[ebp+arg_C], edx
mov	[ebp+var_C], 0
jmp	short loc_7D0616

loc_7D060D:
mov	eax, [ebp+var_C]
add	eax, 1
mov	[ebp+var_C], eax

loc_7D0616:
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+arg_8]
jge	short loc_7D0699
mov	edx, [ebp+var_C]
imul	edx, 0Ch
add	edx, [ebp+var_20]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
mov	dword ptr [eax+4], 0
mov	ecx, [ebp+arg_C]
imul	ecx, [ebp+var_C]
add	ecx, [ebp+var_4]
mov	edx, [ebp+var_14]
mov	[edx], ecx
mov	eax, [ebp+var_10]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_7D0657
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx+0Ch], edx
jmp	short loc_7D066C

loc_7D0657:
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0Ch]
mov	[eax+4], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_14]
mov	[eax+0Ch], ecx

loc_7D066C:
mov	edx, [ebp+var_14]
mov	eax, [edx]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+var_18]
mov	ecx, [ebp+var_10]
mov	[eax+4], ecx
mov	edx, [ebp+var_10]
mov	eax, [edx+4]
add	eax, 1
mov	ecx, [ebp+var_10]
mov	[ecx+4], eax
jmp	loc_7D060D

loc_7D0699:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_10]
mov	[edx], eax
xor	eax, eax

loc_7D06A3:
mov	esp, ebp
pop	ebp
retn
sub_7D0580 endp

align 10h


; Attributes: bp-based frame

sub_7D06B0 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_7D0300
add	esp, 4
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
pop	ebp
retn
sub_7D06B0 endp

align 10h


; Attributes: bp-based frame

sub_7D06D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_7D06E1
xor	eax, eax
jmp	short loc_7D071A

loc_7D06E1:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+4]
mov	[edx+0Ch], eax
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+8], eax
mov	edx, [ebp+var_4]
mov	eax, [edx]
add	eax, 8

loc_7D071A:
mov	esp, ebp
pop	ebp
retn
sub_7D06D0 endp

align 10h


; Attributes: bp-based frame

sub_7D0720 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
sub	eax, 8
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_C]
cmp	dword ptr [edx+8], 0
jz	short loc_7D0758
mov	eax, [ebp+var_C]
mov	ecx, [eax+8]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx+4], eax

loc_7D0758:
mov	ecx, [ebp+var_C]
cmp	dword ptr [ecx+4], 0
jz	short loc_7D0770
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8]
mov	[eax+8], edx

loc_7D0770:
mov	eax, [ebp+var_C]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_8]
mov	eax, [edx+0Ch]
mov	[ecx+4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+8]
sub	ecx, 1
mov	edx, [ebp+var_8]
mov	[edx+8], ecx
xor	eax, eax
mov	esp, ebp
pop	ebp
retn
sub_7D0720 endp

align 10h


; Attributes: bp-based frame

sub_7D07B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
cmp	[ebp+arg_8], 0
jg	short loc_7D07C3
xor	eax, eax
jmp	loc_7D0883

loc_7D07C3:
cmp	[ebp+arg_4], 0
jnz	short loc_7D07D0
xor	eax, eax
jmp	loc_7D0883

loc_7D07D0:
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_7D07E0
xor	eax, eax
jmp	loc_7D0883

loc_7D07E0:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_4]
mov	eax, [ecx+4]
sub	eax, [edx+8]
cmp	[ebp+arg_8], eax
jle	short loc_7D0800
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_4]
mov	eax, [ecx+4]
sub	eax, [edx+8]
mov	[ebp+arg_8], eax

loc_7D0800:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+0Ch]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
mov	[ebp+var_8], eax
mov	[ebp+var_10], 0
mov	[ebp+var_4], 0
jmp	short loc_7D0828

loc_7D081F:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7D0828:
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_8]
jge	short loc_7D0852
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
add	edx, 8
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	[ecx+eax*4], edx
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ebp+var_C], eax
jmp	short loc_7D081F

loc_7D0852:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_C]
mov	[ecx+0Ch], edx
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_7D0871
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+0Ch]
mov	dword ptr [edx+8], 0

loc_7D0871:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
add	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_4]
mov	[edx+8], ecx
mov	eax, [ebp+arg_8]

loc_7D0883:
mov	esp, ebp
pop	ebp
retn
sub_7D07B0 endp

align 10h
push	ebp
mov	ebp, esp
push	98h
mov	eax, [ebp+8]
push	eax
push	offset aFrkll	; "frkLL"
push	offset dword_1859230
call	sub_7D0580
add	esp, 10h
cmp	dword_1859230, 0
jnz	short loc_7D08BC
or	eax, 0FFFFFFFFh
jmp	short loc_7D08EE

loc_7D08BC:
push	38h
mov	ecx, [ebp+0Ch]
push	ecx
push	offset aFrkllnode ; "frkLLNode"
push	offset dword_1859234
call	sub_7D0580
add	esp, 10h
cmp	dword_1859234, 0
jnz	short loc_7D08E2
or	eax, 0FFFFFFFFh
jmp	short loc_7D08EE

loc_7D08E2:
mov	dword_1859238, 0
xor	eax, eax

loc_7D08EE:
pop	ebp
retn
push	ebp
mov	ebp, esp
push	offset dword_1859230
call	sub_7D06B0
add	esp, 4
push	offset dword_1859234
call	sub_7D06B0
add	esp, 4
xor	eax, eax
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7D0920 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
cmp	dword_1859238, 8
jl	short loc_7D0931
or	eax, 0FFFFFFFFh
jmp	short loc_7D0955

loc_7D0931:
mov	eax, dword_1859238
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	dword_1859210[eax*4], edx
mov	eax, dword_1859238
add	eax, 1
mov	dword_1859238, eax
xor	eax, eax

loc_7D0955:
pop	ebp
retn
sub_7D0920 endp

align 10h


; Attributes: bp-based frame

sub_7D0960 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
cmp	dword_1859238, 0
jnz	short loc_7D0971
or	eax, 0FFFFFFFFh
jmp	short loc_7D0996

loc_7D0971:
mov	eax, dword_1859238
sub	eax, 1
mov	dword_1859238, eax
mov	ecx, [ebp+arg_0]
mov	edx, dword_1859238
mov	eax, dword_1859210[edx*4]
mov	[ecx+90h], eax
xor	eax, eax

loc_7D0996:
pop	ebp
retn
sub_7D0960 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7D09A0(int, char *Src, int)
sub_7D09A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
Src= dword ptr	0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, dword_1859230
push	ecx
call	sub_7D06D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7D09CC
mov	eax, 0FFFFFFFEh
jmp	short loc_7D0A35

loc_7D09CC:		; size_t
push	98h
push	0		; int
mov	edx, [ebp+var_4]
push	edx		; void *
call	_memset
add	esp, 0Ch
mov	eax, [ebp+Src]
push	eax		; Src
push	80h		; SizeInBytes
mov	ecx, [ebp+var_4]
add	ecx, 4
push	ecx		; Dst
call	ds:off_15FDCD0
add	esp, 0Ch
mov	edx, [ebp+var_4]
mov	dword ptr [edx+88h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+8Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+90h], 0
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_8]
mov	[edx+94h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx], edx
xor	eax, eax

loc_7D0A35:
mov	esp, ebp
pop	ebp
retn
sub_7D09A0 endp

align 10h


; Attributes: bp-based frame

sub_7D0A40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_7D0920
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [eax+88h]
mov	[edx+90h], eax

loc_7D0A68:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+90h]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7D0AA8
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [edx+90h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [eax]
mov	[edx+90h], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
call	sub_7D0BD0
add	esp, 8
jmp	short loc_7D0A68

loc_7D0AA8:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
call	sub_7D0960
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
push	ecx
call	sub_7D0720
add	esp, 4
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	esp, ebp
pop	ebp
retn
sub_7D0A40 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7D0AE0(int, char *Src, int, int)
sub_7D0AE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
Src= dword ptr	0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, dword_1859234
push	eax
call	sub_7D06D0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7D0AFF
xor	eax, eax
jmp	short loc_7D0B45

loc_7D0AFF:		; size_t
push	38h
push	0		; int
mov	ecx, [ebp+var_4]
push	ecx		; void *
call	_memset
add	esp, 0Ch
mov	edx, [ebp+Src]
push	edx		; Src
push	20h		; SizeInBytes
mov	eax, [ebp+var_4]
add	eax, 10h
push	eax		; Dst
call	ds:off_15FDCD0
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_8]
mov	[ecx+34h], edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7D0E80
add	esp, 0Ch
mov	eax, [ebp+var_4]

loc_7D0B45:
mov	esp, ebp
pop	ebp
retn
sub_7D0AE0 endp

align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+10h]
push	eax
mov	ecx, [ebp+0Ch]
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7D0D10
add	esp, 0Ch
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jnz	short loc_7D0B76
or	eax, 0FFFFFFFFh
jmp	short loc_7D0B88

loc_7D0B76:
mov	eax, [ebp-4]
push	eax
mov	ecx, [ebp+8]
push	ecx
call	sub_7D0BD0
add	esp, 8
xor	eax, eax

loc_7D0B88:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
push	0
mov	eax, [ebp+0Ch]
push	eax
mov	ecx, [ebp+8]
push	ecx
call	sub_7D0D10
add	esp, 0Ch
mov	[ebp-4], eax
cmp	dword ptr [ebp-4], 0
jz	short loc_7D0BBC
mov	edx, [ebp-4]
mov	eax, [edx+34h]
mov	[ebp-8], eax
jmp	short loc_7D0BC3

loc_7D0BBC:
mov	dword ptr [ebp-8], 0

loc_7D0BC3:
mov	eax, [ebp-8]
mov	esp, ebp
pop	ebp
retn
align 10h


; Attributes: bp-based frame

sub_7D0BD0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7D0C40
add	esp, 8
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+94h], 0
jz	short loc_7D0C1A
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+34h], 0
jz	short loc_7D0C1A
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
sar	edx, 1Eh
test	edx, edx
jnz	short loc_7D0C1A
mov	eax, [ebp+arg_4]
add	eax, 34h
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+94h]
call	edx
add	esp, 4

loc_7D0C1A:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
sar	ecx, 1Fh
test	ecx, ecx
jnz	short loc_7D0C33
mov	edx, [ebp+arg_4]
push	edx
call	sub_7D0720
add	esp, 4

loc_7D0C33:
pop	ebp
retn
sub_7D0BD0 endp

align 10h


; Attributes: bp-based frame

sub_7D0C40 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+88h]
jnz	short loc_7D0C7A
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx+88h], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+88h], 0
jnz	short loc_7D0C78
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+8Ch], 0

loc_7D0C78:
jmp	short loc_7D0C97

loc_7D0C7A:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+8Ch]
jnz	short loc_7D0C97
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax+8Ch], edx

loc_7D0C97:
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+4], 0
jz	short loc_7D0CAD
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[edx], ecx

loc_7D0CAD:
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx], 0
jz	short loc_7D0CC3
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	[ecx+4], eax

loc_7D0CC3:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+84h]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+84h], edx
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+84h], 0
jge	short loc_7D0CF1
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+84h], 0

loc_7D0CF1:
mov	eax, [ebp+arg_4]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_4]
mov	dword ptr [ecx+4], 0
pop	ebp
retn
sub_7D0C40 endp

align 10h


; Attributes: bp-based frame

sub_7D0D10 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_12=	byte ptr -12h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
cmp	[ebp+arg_4], 0
jz	loc_7D0DFB
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
call	sub_7D0920
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+88h]
mov	[ecx+90h], eax

loc_7D0D45:
cmp	[ebp+var_4], 0
jnz	loc_7D0DE7
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0
jz	loc_7D0DE7
mov	eax, [ebp+arg_4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_8]
add	ecx, 10h
mov	[ebp+var_10], ecx

loc_7D0D74:
mov	edx, [ebp+var_10]
mov	al, [edx]
mov	[ebp+var_11], al
mov	ecx, [ebp+var_C]
cmp	al, [ecx]
jnz	short loc_7D0DB1
cmp	[ebp+var_11], 0
jz	short loc_7D0DA8
mov	edx, [ebp+var_10]
mov	al, [edx+1]
mov	[ebp+var_12], al
mov	ecx, [ebp+var_C]
cmp	al, [ecx+1]
jnz	short loc_7D0DB1
add	[ebp+var_10], 2
add	[ebp+var_C], 2
cmp	[ebp+var_12], 0
jnz	short loc_7D0D74

loc_7D0DA8:
mov	[ebp+var_18], 0
jmp	short loc_7D0DB9

loc_7D0DB1:
sbb	edx, edx
sbb	edx, 0FFFFFFFFh
mov	[ebp+var_18], edx

loc_7D0DB9:
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jnz	short loc_7D0DCE
mov	[ebp+var_4], 1
jmp	short loc_7D0DE2

loc_7D0DCE:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	eax, [ebp+arg_0]
mov	ecx, [edx]
mov	[eax+90h], ecx

loc_7D0DE2:
jmp	loc_7D0D45

loc_7D0DE7:
mov	edx, [ebp+arg_0]
push	edx
call	sub_7D0960
add	esp, 4
mov	eax, [ebp+var_8]
jmp	loc_7D0E7B

loc_7D0DFB:
cmp	[ebp+arg_8], 0
jz	short loc_7D0E79
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_0]
push	eax
call	sub_7D0920
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+88h]
mov	[ecx+90h], eax

loc_7D0E26:
cmp	[ebp+var_4], 0
jnz	short loc_7D0E68
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0
jz	short loc_7D0E68
mov	eax, [ebp+var_8]
mov	ecx, [eax+34h]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7D0E52
mov	[ebp+var_4], 1
jmp	short loc_7D0E66

loc_7D0E52:
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx+90h], edx

loc_7D0E66:
jmp	short loc_7D0E26

loc_7D0E68:
mov	eax, [ebp+arg_0]
push	eax
call	sub_7D0960
add	esp, 4
mov	eax, [ebp+var_8]
jmp	short loc_7D0E7B

loc_7D0E79:
xor	eax, eax

loc_7D0E7B:
mov	esp, ebp
pop	ebp
retn
sub_7D0D10 endp

align 10h


; Attributes: bp-based frame

sub_7D0E80 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+84h]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+84h], ecx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+88h], 0
jnz	short loc_7D0EC4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+88h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+8Ch], ecx
jmp	loc_7D1014

loc_7D0EC4:
cmp	[ebp+arg_8], 1
jnz	short loc_7D0EF8
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+88h]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+88h]
mov	ecx, [ebp+arg_4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx+88h], eax
jmp	loc_7D1014

loc_7D0EF8:
cmp	[ebp+arg_8], 2
jnz	short loc_7D0F2C
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8Ch]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8Ch]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+8Ch], edx
jmp	loc_7D1014

loc_7D0F2C:
cmp	[ebp+arg_8], 3
jnz	loc_7D1014
mov	eax, [ebp+arg_0]
push	eax
call	sub_7D0920
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+88h]
mov	[ecx+90h], eax

loc_7D0F54:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 0
jz	short loc_7D0F98
mov	eax, [ebp+arg_4]
mov	ecx, [eax+0Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [edx+0Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_8]
jle	short loc_7D0F82
jmp	short loc_7D0F98

loc_7D0F82:
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx+90h], edx
jmp	short loc_7D0F54

loc_7D0F98:
cmp	[ebp+var_C], 0
jnz	short loc_7D0FC9
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8Ch]
mov	[eax+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8Ch]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+8Ch], ecx
jmp	short loc_7D1008

loc_7D0FC9:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_C]
mov	[edx], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_C]
mov	eax, [edx+4]
mov	[ecx+4], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax+4], 0
jnz	short loc_7D0FFD
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+88h], edx
jmp	short loc_7D1008

loc_7D0FFD:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_4]
mov	[ecx], edx

loc_7D1008:
mov	eax, [ebp+arg_0]
push	eax
call	sub_7D0960
add	esp, 4

loc_7D1014:
mov	esp, ebp
pop	ebp
retn
sub_7D0E80 endp

align 10h
push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+8]
mov	ecx, [eax+88h]
mov	[ebp-8], ecx
mov	edx, [ebp+8]
mov	dword ptr [edx+88h], 0
mov	eax, [ebp+8]
mov	dword ptr [eax+8Ch], 0
mov	ecx, [ebp+8]
mov	dword ptr [ecx+84h], 0
mov	edx, [ebp-8]
mov	[ebp-4], edx

loc_7D105F:
cmp	dword ptr [ebp-8], 0
jz	short loc_7D109A
mov	eax, [ebp-8]
mov	[ebp-4], eax
mov	ecx, [ebp-4]
mov	edx, [ecx]
mov	[ebp-8], edx
mov	eax, [ebp-4]
mov	dword ptr [eax], 0
mov	ecx, [ebp-4]
mov	dword ptr [ecx+4], 0
push	3
mov	edx, [ebp-4]
push	edx
mov	eax, [ebp+8]
push	eax
call	sub_7D0E80
add	esp, 0Ch
jmp	short loc_7D105F

loc_7D109A:
mov	esp, ebp
pop	ebp
retn
align 10h
push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+8]
push	eax
call	sub_7D0920
add	esp, 4
mov	ecx, [ebp+8]
mov	edx, [ebp+8]
mov	eax, [edx+88h]
mov	[ecx+90h], eax

loc_7D10C2:
mov	ecx, [ebp+8]
mov	edx, [ecx+90h]
mov	[ebp-4], edx
cmp	dword ptr [ebp-4], 0
jz	short loc_7D1106
mov	eax, [ebp+8]
mov	ecx, [eax+90h]
mov	edx, [ebp+8]
mov	eax, [ecx]
mov	[edx+90h], eax
mov	ecx, [ebp-4]
push	ecx
mov	edx, [ebp+8]
push	edx
call	sub_7D0C40
add	esp, 8
mov	eax, [ebp-4]
push	eax
call	sub_7D0720
add	esp, 4
jmp	short loc_7D10C2

loc_7D1106:
mov	ecx, [ebp+8]
push	ecx
call	sub_7D0960
add	esp, 4
mov	esp, ebp
pop	ebp
retn
align 10h



; int __cdecl sub_7D1120(unsigned int CurrentState, int, int, char)
sub_7D1120 proc	near

NewValue= dword	ptr -14h
var_10=	byte ptr -10h
CurrentState= dword ptr	 4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 14h
push	esi
mov	esi, [esp+18h+CurrentState]
cmp	dword ptr [esi+30h], 0
jnz	short loc_7D1135
xor	eax, eax
pop	esi
add	esp, 14h
retn

loc_7D1135:
push	edi
push	0		; Mask
lea	eax, [esp+20h+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+2Ch+CurrentState]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	edi, [esp+34h+arg_4]
add	esp, 18h
cmp	dword ptr [esi+23DCh], 0
mov	[esp+1Ch+var_10], 0
jz	short loc_7D1193
push	edi
mov	ecx, esi
call	sub_69B2B0
test	eax, eax
jz	short loc_7D1193
mov	ecx, [esp+1Ch+arg_8]
lea	edx, [esp+1Ch+arg_C]
push	edx
push	ecx
lea	edx, [esp+24h+var_10]
push	edx
push	eax
push	edi
mov	ecx, esi
call	sub_696B20
jmp	short loc_7D11AB

loc_7D1193:
mov	ecx, [esp+1Ch+arg_8]
lea	eax, [esp+1Ch+arg_C]
push	eax
push	ecx
mov	ecx, [esi+30h]
lea	edx, [esp+24h+var_10]
push	edx
push	edi
call	sub_67F630

loc_7D11AB:
test	al, al
jz	loc_7D1288
mov	eax, [esi+23C8h]
mov	dword ptr [eax+18h], 0
mov	eax, [esi+23C8h]
mov	edi, [eax+18h]
lea	ecx, [edi+1]
mov	[eax+18h], ecx
mov	eax, [esi+23C8h]
mov	ecx, [eax+18h]
cmp	[eax+0Ch], ecx
jnb	short loc_7D11F0
cmp	ecx, 1
jnb	short loc_7D11E7
mov	ecx, 1

loc_7D11E7:
push	ecx
lea	ecx, [eax+8]
call	sub_669EC0

loc_7D11F0:
mov	ecx, [esi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
push	ebx
push	ebp
call	eax
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+30h+CurrentState]
push	ecx
lea	ecx, [esp+34h+var_10]
call	sub_652F60
mov	edx, [esi+23C8h]
mov	eax, [esp+24h+CurrentState]
lea	ebp, ds:0[edi*4]
mov	edi, [edx+8]
inc	dword ptr [eax+8]
mov	ecx, [edi+ebp]
add	edi, ebp
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	ebx, eax
jnz	short loc_7D1238
call	sub_650DF0

loc_7D1238:
mov	[edi], ebx
mov	eax, [esp+24h+CurrentState]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D1250
call	sub_650DF0

loc_7D1250:
mov	eax, [esi+23C8h]
mov	ecx, [eax+8]
mov	edx, [ecx+ebp]
mov	esi, [edx]
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esp+24h+NewValue]
push	30000h		; Mask
push	eax		; NewValue
lea	ecx, [esp+2Ch+CurrentState]
push	ecx		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	ebp
pop	ebx
pop	edi
mov	eax, esi
pop	esi
add	esp, 14h
retn

loc_7D1288:
lea	ecx, [esp+1Ch+var_10]
call	sub_652830
mov	edx, [esp+1Ch+NewValue]
push	30000h		; Mask
push	edx		; NewValue
lea	eax, [esp+24h+CurrentState]
push	eax		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	edi
xor	eax, eax
pop	esi
add	esp, 14h
retn
sub_7D1120 endp




; int __stdcall	sub_7D12B0(int,	int, unsigned int CurrentState)
sub_7D12B0 proc	near

NewValue= dword	ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
CurrentState= dword ptr	 0Ch

sub	esp, 28h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+30h], 0
jnz	short loc_7D12C5
xor	eax, eax
pop	esi
add	esp, 28h
retn	0Ch

loc_7D12C5:
push	ebx
push	ebp
push	edi
push	0		; Mask
lea	eax, [esp+3Ch+NewValue]
push	0		; NewValue
push	eax		; CurrentState
call	__controlfp_s
push	30000h		; Mask
lea	ecx, [esp+48h+var_24]
push	10000h		; NewValue
push	ecx		; CurrentState
call	__controlfp_s
mov	ecx, [esi+30h]
mov	[esp+50h+var_20], 0
mov	edx, [ecx]
mov	eax, [edx+70h]
add	esp, 18h
call	eax
mov	ebp, [esp+38h+CurrentState]
add	ebp, 0FFFFFFFFh
mov	[esp+38h+var_24], eax
js	short loc_7D135B
mov	edx, [esp+38h+arg_4]
lea	ecx, [ebp+ebp*2+0]
lea	edi, [eax+8]
lea	ebx, [edx+ecx*8]

loc_7D1317:
lea	eax, [esp+38h+var_10]
push	eax
push	ebx
mov	ecx, esi
mov	[esp+40h+var_10], 0
call	sub_64ABC0
add	dword ptr [edi], 10h
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_7D133A
mov	ecx, edi
call	sub_64B530

loc_7D133A:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7D134A
lea	edx, [esp+38h+var_10]
push	edx
call	sub_652330

loc_7D134A:
lea	ecx, [esp+38h+var_10]
call	sub_652830
dec	ebp
sub	ebx, 18h
test	ebp, ebp
jge	short loc_7D1317

loc_7D135B:
cmp	dword ptr [esi+23DCh], 0
mov	edi, [esp+38h+arg_0]
jz	short loc_7D1389
push	edi
mov	ecx, esi
call	sub_69B2B0
test	eax, eax
jz	short loc_7D1389
mov	ebp, [esp+38h+CurrentState]
push	ebp
lea	ecx, [esp+3Ch+var_20]
push	ecx
push	eax
push	edi
mov	ecx, esi
call	sub_696A30
jmp	short loc_7D13A0

loc_7D1389:
mov	edx, [esp+38h+CurrentState]
mov	ecx, [esi+30h]
push	edx
lea	eax, [esp+3Ch+var_20]
push	eax
push	edi
call	sub_681040
mov	ebp, [esp+38h+CurrentState]

loc_7D13A0:
mov	edi, [esp+38h+var_24]
add	edi, 8
mov	bl, al
test	ebp, ebp
jbe	short loc_7D13CD
lea	ecx, [ecx+0]

loc_7D13B0:
mov	ecx, [edi]
call	sub_652830
add	dword ptr [edi], 0FFFFFFF0h
mov	eax, [edi]
cmp	eax, [edi+4]
jnb	short loc_7D13C8
mov	ecx, edi
call	sub_64B660

loc_7D13C8:
sub	ebp, 1
jnz	short loc_7D13B0

loc_7D13CD:
test	bl, bl
jz	loc_7D14AF
mov	ecx, [esi+23C8h]
mov	dword ptr [ecx+18h], 0
mov	eax, [esi+23C8h]
mov	edi, [eax+18h]
lea	edx, [edi+1]
mov	[eax+18h], edx
mov	eax, [esi+23C8h]
mov	ecx, [eax+0Ch]
cmp	ecx, [eax+18h]
jnb	short loc_7D1417
mov	ecx, eax
mov	eax, [ecx+18h]
cmp	eax, 1
jnb	short loc_7D140E
mov	eax, 1

loc_7D140E:
push	eax
add	ecx, 8
call	sub_669EC0

loc_7D1417:
mov	ecx, [esi+30h]
mov	edx, [ecx]
mov	eax, [edx+70h]
call	eax
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+44h+CurrentState]
push	ecx
lea	ecx, [esp+48h+var_20]
call	sub_652F60
mov	edx, [esi+23C8h]
mov	eax, [esp+38h+CurrentState]
lea	ebp, ds:0[edi*4]
mov	edi, [edx+8]
inc	dword ptr [eax+8]
mov	ecx, [edi+ebp]
add	edi, ebp
add	dword ptr [ecx+8], 0FFFFFFFFh
mov	ebx, eax
jnz	short loc_7D145D
call	sub_650DF0

loc_7D145D:
mov	[edi], ebx
mov	eax, [esp+38h+CurrentState]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D1475
call	sub_650DF0

loc_7D1475:
mov	eax, [esi+23C8h]
mov	ecx, [eax+8]
mov	edx, [ecx+ebp]
mov	esi, [edx]
lea	ecx, [esp+38h+var_20]
call	sub_652830
mov	eax, [esp+38h+NewValue]
push	30000h		; Mask
push	eax		; NewValue
lea	ecx, [esp+40h+CurrentState]
push	ecx		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	edi
pop	ebp
pop	ebx
mov	eax, esi
pop	esi
add	esp, 28h
retn	0Ch

loc_7D14AF:
lea	ecx, [esp+38h+var_20]
call	sub_652830
mov	edx, [esp+38h+NewValue]
push	30000h		; Mask
push	edx		; NewValue
lea	eax, [esp+40h+CurrentState]
push	eax		; CurrentState
call	__controlfp_s
add	esp, 0Ch
pop	edi
pop	ebp
pop	ebx
xor	eax, eax
pop	esi
add	esp, 28h
retn	0Ch
sub_7D12B0 endp

align 10h



sub_7D14E0 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+4]
jmp	eax
sub_7D14E0 endp

align 10h



sub_7D14F0 proc	near
mov	ecx, [ecx+0Ch]
mov	eax, [ecx]
mov	eax, [eax+8]
jmp	eax
sub_7D14F0 endp

align 10h



sub_7D1500 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+64h]
test	ebp, ebp
jz	short loc_7D153E
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_7D153E
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_7D153E
add	eax, 4
jnz	short loc_7D15B7

loc_7D153E:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_7D49E0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_7D157C
call	sub_64B3B0

loc_7D157C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_7D15B7:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_7D1500 endp




sub_7D15C0 proc	near

var_19=	byte ptr -19h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	ebp
mov	ebp, [ecx+28Ch]
push	esi
push	edi
lea	edi, [ecx+28Ch]
lea	esi, [ecx+68h]
test	ebp, ebp
jz	short loc_7D15FE
mov	eax, [esi]
mov	ecx, [eax+0Ch]
and	ecx, [ebp+4]
push	ecx
push	esi
mov	ecx, edi
call	sub_66A130
test	eax, eax
jl	short loc_7D15FE
shl	eax, 4
lea	eax, [eax+ebp+0Ch]
test	eax, eax
jz	short loc_7D15FE
add	eax, 4
jnz	short loc_7D1677

loc_7D15FE:
mov	eax, esi
mov	[esp+28h+var_18], offset sub_7D77D0
mov	[esp+28h+var_14], 0
mov	[esp+28h+var_10], eax
mov	eax, [eax]
mov	ecx, [eax+0Ch]
lea	edx, [esp+28h+var_18]
push	ecx
mov	[esp+2Ch+var_C], edx
lea	edx, [esp+2Ch+var_10]
push	edx
push	edi
mov	ecx, edi
call	sub_671900
mov	ecx, [esp+28h+var_14]
test	ecx, ecx
jz	short loc_7D163C
call	sub_64B3B0

loc_7D163C:
mov	eax, [esi]
mov	ecx, [esp+28h+arg_4]
lea	edx, [esp+28h+var_19]
push	edx
mov	[esp+2Ch+var_C], eax
lea	edx, [esp+2Ch+var_10]
push	edx
mov	edx, [esp+30h+arg_0]
mov	[esp+30h+var_19], 0
mov	byte ptr [esp+30h+var_10], 0Bh
inc	dword ptr [eax+8]
mov	eax, [ecx+10h]
mov	eax, [eax+28h]
add	ecx, 10h
push	esi
push	edx
call	eax
lea	ecx, [esp+28h+var_10]
call	sub_652830

loc_7D1677:
pop	edi
pop	esi
pop	ebp
add	esp, 1Ch
retn	8
sub_7D15C0 endp




sub_7D1680 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+2ACh]
push	edi
mov	edi, [esp+8+arg_4]
push	eax
push	edi
mov	ecx, esi
call	sub_7D1500
mov	ecx, [esi+2ACh]
push	ecx
push	edi
mov	ecx, esi
call	sub_7D15C0
pop	edi
pop	esi
retn	8
sub_7D1680 endp

align 10h



sub_7D16B0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	ebx, ebx
jnz	short loc_7D16C3
pop	esi
xor	al, al
pop	ebx
retn	4

loc_7D16C3:
push	edi
mov	edi, [esi]
mov	ecx, edi
call	sub_64D770
mov	edx, [esi+8]
xor	eax, eax
test	edx, edx
jbe	short loc_7D16EC
mov	esi, [esi+4]
mov	ecx, esi
jmp	short loc_7D16E0
align 10h

loc_7D16E0:
cmp	[ecx], ebx
jz	short loc_7D16FB
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_7D16E0

loc_7D16EC:
mov	ecx, edi
call	sub_64E350
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4

loc_7D16FB:
mov	eax, [esi+eax*4]
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+8]
push	1
call	eax
mov	ecx, edi
call	sub_64E350
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_7D16B0 endp

align 10h



sub_7D1720 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+8+arg_8]
push	eax
push	ecx
mov	ecx, esi
call	sub_64E4B0
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_1456158
mov	dword ptr [esi+0Ch], offset off_1456144
test	edi, edi
jz	short loc_7D1751
mov	ecx, edi
call	sub_64A420

loc_7D1751:
mov	[esi+34h], edi
mov	edi, [esp+8+arg_4]
test	edi, edi
jz	short loc_7D1763
mov	ecx, edi
call	sub_64A420

loc_7D1763:
mov	[esi+38h], edi
pop	edi
mov	eax, esi
pop	esi
retn	10h
sub_7D1720 endp

align 10h



sub_7D1770 proc	near

arg_0= byte ptr	 4

sub	ecx, 0Ch
jmp	sub_7D21F0
sub_7D1770 endp

align 10h



sub_7D1780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_7D17A8
push	edi
mov	edi, eax

loc_7D1794:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D179F
call	sub_64A430

loc_7D179F:
sub	esi, 4
sub	edi, 1
jnz	short loc_7D1794
pop	edi

loc_7D17A8:
pop	esi
retn
sub_7D1780 endp

align 10h



sub_7D17B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_7D17EE
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7D1780
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_7D1807
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_714BE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_7D17EE:
cmp	esi, [edi+8]
jb	short loc_7D1807
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_714BE0

loc_7D1807:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_7D17B0 endp

align 10h



sub_7D1810 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+4], 1
jnz	short loc_7D1825
push	0
push	esi
call	sub_7D17B0
pop	esi
retn	4

loc_7D1825:
mov	eax, [esi]
push	ebx
mov	ebx, [esp+8+arg_0]
push	edi
lea	edi, ds:0[ebx*4]
add	eax, edi
mov	eax, [eax]
test	eax, eax
jz	short loc_7D1843
mov	ecx, eax
call	sub_64A430

loc_7D1843:
mov	ecx, [esi+4]
mov	eax, [esi]
sub	ecx, ebx
add	eax, edi
lea	edx, ds:0FFFFFFFCh[ecx*4]
push	edx
lea	ecx, [eax+4]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+4]
add	esp, 0Ch
pop	edi
pop	ebx
pop	esi
retn	4
sub_7D1810 endp

align 10h



sub_7D1870 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	ebx, [esi]
push	edi
mov	ecx, ebx
call	sub_64D770
xor	edi, edi
cmp	[esi+8], edi
jbe	short loc_7D189A

loc_7D1885:
mov	eax, [esi+4]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1
call	eax
inc	edi
cmp	edi, [esi+8]
jb	short loc_7D1885

loc_7D189A:
mov	ecx, ebx
call	sub_64E350
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+4]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
retn
sub_7D1870 endp

align 10h



sub_7D18C0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	ebp, ebp
jz	short loc_7D191C
push	ebx
mov	ebx, [esi]
push	edi
mov	ecx, ebx
call	sub_64D770
lea	edi, [esi+4]
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_7D18EF
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_7D1904
push	esi
jmp	short loc_7D18FC

loc_7D18EF:
cmp	esi, [edi+8]
jb	short loc_7D1904
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_7D18FC:
push	edi
mov	ecx, edi
call	sub_714BE0

loc_7D1904:
mov	edx, [edi]
lea	eax, [edx+esi*4-4]
mov	[edi+4], esi
test	eax, eax
jz	short loc_7D1913
mov	[eax], ebp

loc_7D1913:
mov	ecx, ebx
call	sub_64E350
pop	edi
pop	ebx

loc_7D191C:
pop	esi
pop	ebp
retn	4
sub_7D18C0 endp

align 10h



sub_7D1930 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+34h]
test	al, al
jz	short loc_7D1940
xor	al, al
pop	esi
retn	4

loc_7D1940:
push	ebx
push	ebp
push	edi
lea	edi, [esi+18h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+10h]
mov	ebx, [esp+10h+arg_0]
xor	eax, eax
test	ecx, ecx
jbe	short loc_7D1979
mov	ebx, [ebx+8]
mov	edx, [esi+0Ch]
and	ebx, 0FF0000h

loc_7D1966:
mov	ebp, [edx]
cmp	ebx, [ebp+3Ch]
jz	short loc_7D1975
inc	eax
add	edx, 4
cmp	eax, ecx
jb	short loc_7D1966

loc_7D1975:
mov	ebx, [esp+10h+arg_0]

loc_7D1979:		; lpCriticalSection
push	edi
cmp	eax, ecx
jnz	short loc_7D198D
call	ds:LeaveCriticalSection
pop	edi
pop	ebp
pop	ebx
xor	al, al
pop	esi
retn	4

loc_7D198D:
call	ds:LeaveCriticalSection
mov	edi, [esi+38h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
test	ebx, ebx
jz	short loc_7D19AB
mov	ecx, ebx
call	sub_64A420

loc_7D19AB:
mov	ecx, [esi+4]
inc	ecx
push	ecx
push	esi
mov	ecx, esi
call	sub_7D17B0
mov	edx, [esi+4]
mov	eax, [esi]
lea	ebp, [eax+edx*4-4]
test	ebp, ebp
jz	short loc_7D19D3
test	ebx, ebx
jz	short loc_7D19D0
mov	ecx, ebx
call	sub_64A420

loc_7D19D0:
mov	[ebp+0], ebx

loc_7D19D3:
test	ebx, ebx
jz	short loc_7D19DE
mov	ecx, ebx
call	sub_64A430

loc_7D19DE:
lea	ecx, [esi+30h]
call	sub_64D8F0
mov	ecx, edi
call	sub_64E350
pop	edi
pop	ebp
pop	ebx
mov	al, 1
pop	esi
retn	4
sub_7D1930 endp

align 10h



sub_7D1A00 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
xor	eax, eax
xor	edi, edi
cmp	[esi+4], eax
jbe	loc_7D1A9F
mov	edx, [esi]
push	ebx
mov	ebx, [esp+0Ch+arg_0]
mov	ecx, edx
push	ebp
jmp	short loc_7D1A20
align 10h

loc_7D1A20:
mov	ebp, [ecx]
mov	ebp, [ebp+8]
and	ebp, ebx
test	ebp, 0FF0000h
jnz	short loc_7D1A3F
inc	edi
add	ecx, 4
cmp	edi, [esi+4]
jb	short loc_7D1A20
pop	ebp
pop	ebx
pop	edi
pop	esi
retn	4

loc_7D1A3F:
mov	ebp, [edx+edi*4]
lea	ebx, ds:0[edi*4]
mov	ecx, ebp
call	sub_64A420
cmp	dword ptr [esi+4], 1
jnz	short loc_7D1A69
push	0
push	esi
mov	ecx, esi
call	sub_7D17B0
mov	eax, ebp
pop	ebp
pop	ebx
pop	edi
pop	esi
retn	4

loc_7D1A69:
mov	eax, [esi]
add	eax, ebx
mov	eax, [eax]
test	eax, eax
jz	short loc_7D1A7A
mov	ecx, eax
call	sub_64A430

loc_7D1A7A:
mov	ecx, [esi+4]
mov	eax, [esi]
sub	ecx, edi
add	eax, ebx
lea	edx, ds:0FFFFFFFCh[ecx*4]
push	edx
lea	ecx, [eax+4]
push	ecx
push	eax
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]
mov	eax, ebp
pop	ebp
pop	ebx

loc_7D1A9F:
pop	edi
pop	esi
retn	4
sub_7D1A00 endp

align 10h



sub_7D1AB0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	ebx, [esi+38h]
add	ebx, 8
mov	ecx, ebx
mov	[esp+0Ch+var_4], ebx
call	sub_64D770
mov	al, [esi+34h]
test	al, al
jz	short loc_7D1AD9
pop	esi
mov	ecx, ebx
pop	ebx
add	esp, 4
jmp	sub_64E350

loc_7D1AD9:
push	edi
xor	edi, edi
mov	byte ptr [esi+34h], 1
cmp	[esi+4], edi
jbe	short loc_7D1AF9

loc_7D1AE5:
mov	ecx, [esi]
mov	ecx, [ecx+edi*4]
mov	edx, [ecx]
mov	eax, [edx+8]
push	0
call	eax
inc	edi
cmp	edi, [esi+4]
jb	short loc_7D1AE5

loc_7D1AF9:
mov	eax, [esi+4]
test	eax, eax
jbe	short loc_7D1B61
mov	ecx, [esi]
lea	edi, [ecx+eax*4-4]
mov	ebx, eax

loc_7D1B08:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7D1B13
call	sub_64A430

loc_7D1B13:
sub	edi, 4
sub	ebx, 1
jnz	short loc_7D1B08
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_7D1B41
mov	eax, [esi]
test	eax, eax
jz	short loc_7D1B3A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_7D1B3A:
mov	dword ptr [esi+8], 0

loc_7D1B41:
mov	ebx, [esp+10h+var_4]

loc_7D1B45:
lea	ecx, [esi+30h]
mov	dword ptr [esi+4], 0
call	sub_64D8F0
pop	edi
pop	esi
mov	ecx, ebx
pop	ebx
add	esp, 4
jmp	sub_64E350

loc_7D1B61:
cmp	dword ptr [esi+8], 0
ja	short loc_7D1B45
push	0
push	esi
mov	ecx, esi
call	sub_714BE0
jmp	short loc_7D1B45
sub_7D1AB0 endp

align 10h



sub_7D1B80 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, ecx
test	ebp, ebp
jnz	short loc_7D1B93
pop	ebp
xor	al, al
pop	ebx
retn	4

loc_7D1B93:
push	esi
push	edi
mov	edi, [ebx+38h]
add	edi, 8
mov	ecx, edi
call	sub_64D770
mov	ecx, [ebx+4]
xor	esi, esi
test	ecx, ecx
jbe	short loc_7D1BBC
mov	edx, [ebx]
mov	eax, edx
nop

loc_7D1BB0:
cmp	[eax], ebp
jz	short loc_7D1BDA
inc	esi
add	eax, 4
cmp	esi, ecx
jb	short loc_7D1BB0

loc_7D1BBC:
mov	ecx, [ebx+38h]
add	ecx, 1Ch
push	ebp
call	sub_7D16B0
mov	ecx, edi
mov	bl, al
call	sub_64E350
pop	edi
pop	esi
pop	ebp
mov	al, bl
pop	ebx
retn	4

loc_7D1BDA:
mov	ecx, [edx+esi*4]
mov	eax, [ecx]
mov	edx, [eax+8]
push	0
call	edx
push	esi
mov	ecx, ebx
call	sub_7D1810
mov	ecx, edi
call	sub_64E350
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn	4
sub_7D1B80 endp

align 10h



sub_7D1C00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_155F500
mov	[edi+10h], eax
mov	ebx, 1
mov	[edi+4], ebx
mov	dword ptr [edi+8], 17h
mov	dword ptr [edi], offset	off_1456178
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
xor	ebp, ebp
push	ebp
push	30h
call	eax
mov	esi, eax
cmp	esi, ebp
jz	short loc_7D1C77
mov	dword ptr [esi], offset	off_155F500
mov	[esi+4], ebx
push	ebp
lea	ebx, [esi+8]
push	1
mov	ecx, ebx
mov	dword ptr [esi], offset	off_1456174
call	sub_64D9B0
mov	[esi+1Ch], ebx
mov	[esi+20h], ebp
mov	[esi+24h], ebp
mov	[esi+28h], ebp
mov	[esi+2Ch], ebp
mov	[edi+0Ch], esi
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_7D1C77:
mov	[edi+0Ch], ebp
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_7D1C00 endp

align 10h



sub_7D1C90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, ecx
test	ebx, ebx
jnz	short loc_7D1CA3
pop	edi
xor	al, al
pop	ebx
retn	4

loc_7D1CA3:
mov	eax, [edi+0Ch]
mov	ecx, [eax+2Ch]
test	ecx, ecx
jz	short loc_7D1CBE
push	ebx
call	sub_7D1930
test	al, al
jz	short loc_7D1CBE
pop	edi
mov	al, 1
pop	ebx
retn	4

loc_7D1CBE:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	0
push	3Ch
call	eax
test	eax, eax
jz	short loc_7D1D12
mov	ecx, [edi+10h]
mov	edx, [edi+0Ch]
push	0FFFFFFFFh
push	ecx
push	edx
push	ebx
mov	ecx, eax
call	sub_7D1720
mov	esi, eax
test	esi, esi
jz	short loc_7D1D12
mov	ecx, [edi+0Ch]
push	ebx
add	ecx, 1Ch
call	sub_7D18C0
mov	eax, [esi]
mov	edx, [eax+14h]
push	1
mov	ecx, esi
call	edx
mov	ecx, esi
call	sub_64A430
pop	esi
pop	edi
mov	al, 1
pop	ebx
retn	4

loc_7D1D12:
pop	esi
pop	edi
xor	al, al
pop	ebx
retn	4
sub_7D1C90 endp

align 10h



sub_7D1D20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jnz	short loc_7D1D33
pop	edi
xor	al, al
pop	esi
retn	4

loc_7D1D33:
push	ebx
mov	ebx, [esi]
mov	ecx, ebx
call	sub_64D770
mov	ecx, [esi+8]
xor	eax, eax
test	ecx, ecx
jbe	short loc_7D1D5C
mov	edx, [esi+4]
lea	esp, [esp+0]

loc_7D1D50:
cmp	[edx], edi
jz	short loc_7D1D6B
inc	eax
add	edx, 4
cmp	eax, ecx
jb	short loc_7D1D50

loc_7D1D5C:
mov	ecx, ebx
call	sub_64E350
pop	ebx
pop	edi
xor	al, al
pop	esi
retn	4

loc_7D1D6B:
cmp	ecx, 1
jnz	short loc_7D1DB2
test	dword ptr [esi+0Ch], 0FFFFFFFEh
jbe	short loc_7D1D9C
mov	eax, [esi+4]
test	eax, eax
jz	short loc_7D1D95
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+4], 0

loc_7D1D95:
mov	dword ptr [esi+0Ch], 0

loc_7D1D9C:
mov	ecx, ebx
mov	dword ptr [esi+8], 0
call	sub_64E350
pop	ebx
pop	edi
mov	al, 1
pop	esi
retn	4

loc_7D1DB2:
mov	edx, [esi+4]
lea	edx, [edx+eax*4]
sub	ecx, eax
lea	eax, ds:0FFFFFFFCh[ecx*4]
push	eax
lea	ecx, [edx+4]
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+8]
add	esp, 0Ch
mov	ecx, ebx
call	sub_64E350
pop	ebx
pop	edi
mov	al, 1
pop	esi
retn	4
sub_7D1D20 endp

align 10h



sub_7D1DF0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	ebx, [esi+1Ch]
push	edi
mov	ecx, ebx
call	sub_64D770
xor	edi, edi
cmp	[esi+24h], edi
jbe	short loc_7D1E1B

loc_7D1E06:
mov	eax, [esi+20h]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1
call	eax
inc	edi
cmp	edi, [esi+24h]
jb	short loc_7D1E06

loc_7D1E1B:
mov	ecx, ebx
call	sub_64E350
mov	ecx, [esi+2Ch]
pop	edi
pop	esi
pop	ebx
test	ecx, ecx
jz	short locret_7D1E31
jmp	sub_7D1AB0

locret_7D1E31:
retn
sub_7D1DF0 endp

align 10h



sub_7D1E40 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D1E73
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
mov	eax, [esi+34h]
mov	ecx, [esi+38h]
push	eax
add	ecx, 1Ch
call	sub_7D1D20
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D1E6C
call	sub_64A430

loc_7D1E6C:
mov	dword ptr [esi+34h], 0

loc_7D1E73:
mov	eax, 1
pop	esi
retn
sub_7D1E40 endp

align 10h



sub_7D1E80 proc	near

arg_0= dword ptr  4

push	ebx
xor	ebx, ebx
push	esi
mov	esi, ecx
mov	[esi], ebx
mov	[esi+4], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
push	ebx		; int
lea	ecx, [esi+18h]	; lpCriticalSection
mov	[esi+14h], ebx
call	sub_64D6D0
lea	ecx, [esi+30h]
call	sub_64DC50
mov	eax, [esp+8+arg_0]
mov	[esi+38h], eax
mov	[esi+34h], bl
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_7D1E80 endp

align 10h



sub_7D1EC0 proc	near
push	esi
push	edi
mov	esi, ecx
call	sub_7D1AB0
xor	edi, edi
cmp	[esi+10h], edi
jbe	short loc_7D1EE3

loc_7D1ED0:
mov	eax, [esi+0Ch]
mov	ecx, [eax+edi*4]
push	0FFFFFFFFh
call	sub_6A1E90
inc	edi
cmp	edi, [esi+10h]
jb	short loc_7D1ED0

loc_7D1EE3:
lea	ecx, [esi+30h]
call	sub_64DF80
lea	ecx, [esi+18h]	; lpCriticalSection
call	sub_64D730
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+0Ch]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, [esi+4]
mov	ecx, [esi]
lea	edi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_7D1F28
push	ebx
mov	ebx, eax

loc_7D1F14:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7D1F1F
call	sub_64A430

loc_7D1F1F:
sub	edi, 4
sub	ebx, 1
jnz	short loc_7D1F14
pop	ebx

loc_7D1F28:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
pop	edi
pop	esi
retn
sub_7D1EC0 endp

align 10h



sub_7D1F40 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
push	edi
lea	ebx, [esi+18h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, [esi+10h]
xor	eax, eax
test	ecx, ecx
jbe	short loc_7D1F6C
mov	edx, [esi+0Ch]
mov	edi, [esp+0Ch+arg_0]
nop

loc_7D1F60:
cmp	[edx], edi
jz	short loc_7D1F7B
inc	eax
add	edx, 4
cmp	eax, ecx
jb	short loc_7D1F60

loc_7D1F6C:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	esi
xor	al, al
pop	ebx
retn	4

loc_7D1F7B:
cmp	ecx, 1
jnz	short loc_7D1FC2
test	dword ptr [esi+14h], 0FFFFFFFEh
jbe	short loc_7D1FAC
mov	eax, [esi+0Ch]
test	eax, eax
jz	short loc_7D1FA5
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi+0Ch], 0

loc_7D1FA5:
mov	dword ptr [esi+14h], 0

loc_7D1FAC:		; lpCriticalSection
push	ebx
mov	dword ptr [esi+10h], 0
call	ds:LeaveCriticalSection
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4

loc_7D1FC2:
mov	edx, [esi+0Ch]
lea	edx, [edx+eax*4]
sub	ecx, eax
lea	eax, ds:0FFFFFFFCh[ecx*4]
push	eax
lea	ecx, [edx+4]
push	ecx
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
dec	dword ptr [esi+10h]
add	esp, 0Ch
push	ebx		; lpCriticalSection
call	ds:LeaveCriticalSection
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	4
sub_7D1F40 endp

align 10h



sub_7D2000 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	al, [esi+34h]
test	al, al
jz	short loc_7D2010
xor	eax, eax
pop	esi
retn	4

loc_7D2010:
push	ebx
mov	ebx, [esi+38h]
add	ebx, 8
push	edi
mov	ecx, ebx
call	sub_64D770
mov	cl, [esi+34h]
xor	edi, edi
test	cl, cl
jnz	short loc_7D2073
push	ebp
mov	ebp, [esp+10h+arg_0]
lea	ecx, [ecx+0]

loc_7D2030:
push	ebp
mov	ecx, esi
call	sub_7D1A00
mov	edi, eax
test	edi, edi
jnz	short loc_7D2066
mov	edx, [esi+38h]
push	0FFFFFFFFh
add	edx, 8
push	edx
lea	ecx, [esi+30h]
call	sub_64DCA0
mov	al, [esi+34h]
test	al, al
jz	short loc_7D2030
pop	ebp
mov	ecx, ebx
call	sub_64E350
mov	eax, edi
pop	edi
pop	ebx
pop	esi
retn	4

loc_7D2066:
mov	ecx, [esi+38h]
push	edi
add	ecx, 1Ch
call	sub_7D18C0
pop	ebp

loc_7D2073:
mov	ecx, ebx
call	sub_64E350
mov	eax, edi
pop	edi
pop	ebx
pop	esi
retn	4
sub_7D2000 endp

align 10h



sub_7D2090 proc	near
mov	eax, [ecx+0Ch]
mov	ecx, [eax+2Ch]
test	ecx, ecx
jz	short loc_7D209F
jmp	sub_7D1B80

loc_7D209F:
lea	ecx, [eax+1Ch]
jmp	sub_7D16B0
sub_7D2090 endp

align 10h



sub_7D20B0 proc	near
mov	ecx, [ecx+0Ch]
jmp	sub_7D1DF0
sub_7D20B0 endp

align 10h



sub_7D20C0 proc	near

; FUNCTION CHUNK AT 0064DCB0 SIZE 0000003B BYTES

push	esi
mov	esi, ecx
mov	ecx, [esi+34h]
mov	dword ptr [esi], offset	off_1456158
mov	dword ptr [esi+0Ch], offset off_1456144
test	ecx, ecx
jz	short loc_7D20EF
mov	eax, [ecx]
mov	edx, [eax+8]
push	1
call	edx
mov	eax, [esi+34h]
mov	ecx, [esi+38h]
push	eax
add	ecx, 1Ch
call	sub_7D1D20

loc_7D20EF:
mov	ecx, [esi+38h]
mov	ecx, [ecx+2Ch]
test	ecx, ecx
jz	short loc_7D20FF
push	esi
call	sub_7D1F40

loc_7D20FF:
mov	ecx, [esi+38h]
test	ecx, ecx
jz	short loc_7D210B
call	sub_64A430

loc_7D210B:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D2117
call	sub_64A430

loc_7D2117:
mov	ecx, esi
pop	esi
jmp	loc_64DCB0
sub_7D20C0 endp	; sp-analysis failed

align 10h



sub_7D2120 proc	near
push	esi
push	edi
mov	esi, ecx

loc_7D2124:
mov	eax, [esi+38h]
mov	edx, [esi+3Ch]
mov	ecx, [eax+2Ch]
push	edx
call	sub_7D2000
mov	edi, eax
test	edi, edi
jz	short loc_7D218E
cmp	dword ptr [esi+34h], 0
jnz	short loc_7D2155
mov	ecx, edi
call	sub_64A420
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D2152
call	sub_64A430

loc_7D2152:
mov	[esi+34h], edi

loc_7D2155:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D2185
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
mov	eax, [esi+34h]
mov	ecx, [esi+38h]
push	eax
add	ecx, 1Ch
call	sub_7D1D20
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D217E
call	sub_64A430

loc_7D217E:
mov	dword ptr [esi+34h], 0

loc_7D2185:
mov	ecx, edi
call	sub_64A430
jmp	short loc_7D2124

loc_7D218E:
pop	edi
mov	eax, 1
pop	esi
retn
sub_7D2120 endp

align 10h



sub_7D21A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
mov	dword ptr [esi], offset	off_1456178
test	ecx, ecx
jz	short loc_7D21BD
call	sub_7D1DF0
mov	ecx, [esi+0Ch]
call	sub_64A430

loc_7D21BD:
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7D21DF
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D21DF:
mov	eax, esi
pop	esi
retn	4
sub_7D21A0 endp

align 10h



sub_7D21F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7D20C0
test	[esp+4+arg_0], 1
jz	short loc_7D220D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D220D:
mov	eax, esi
pop	esi
retn	4
sub_7D21F0 endp

align 10h



sub_7D2220 proc	near

arg_0= byte ptr	 4

sub	ecx, 0Ch
jmp	loc_7D2230
align 10h

loc_7D2230:
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_145619C
mov	dword ptr [esi+0Ch], offset off_1456188
call	sub_7D20C0
test	[esp+4+arg_0], 1
jz	short loc_7D225A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D225A:
mov	eax, esi
pop	esi
retn	4
sub_7D2220 endp




sub_7D2260 proc	near
push	ebx
push	ebp
mov	ebx, ecx
push	esi
mov	dword ptr [ebx], offset	off_1456174
mov	ebp, [ebx+1Ch]
lea	esi, [ebx+1Ch]
push	edi
mov	ecx, ebp
call	sub_64D770
xor	edi, edi
cmp	[esi+8], edi
jbe	short loc_7D2295

loc_7D2280:
mov	eax, [esi+4]
mov	ecx, [eax+edi*4]
mov	edx, [ecx]
mov	eax, [edx+8]
push	1
call	eax
inc	edi
cmp	edi, [esi+8]
jb	short loc_7D2280

loc_7D2295:
mov	ecx, ebp
call	sub_64E350
mov	edi, [ebx+2Ch]
test	edi, edi
jz	short loc_7D22B8
mov	ecx, edi
call	sub_7D1EC0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_7D22B8:
mov	ecx, esi
call	sub_7D1870
lea	ecx, [ebx+8]
call	sub_64DF30
pop	edi
pop	esi
pop	ebp
mov	ecx, ebx
pop	ebx
jmp	sub_64A3F0
sub_7D2260 endp

align 10h



sub_7D22E0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
push	ebp
mov	ebp, ecx
mov	al, [ebp+34h]
test	al, al
jz	short loc_7D22F2
xor	al, al
pop	ebp
pop	ecx
retn	10h

loc_7D22F2:
push	esi
lea	esi, [ebp+18h]
push	esi		; lpCriticalSection
mov	[esp+10h+var_4], esi
call	ds:EnterCriticalSection
cmp	[esp+0Ch+arg_4], 0
jbe	loc_7D23D6
push	ebx
push	edi
lea	ebx, [ebp+0Ch]

loc_7D2311:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
dec	[esp+14h+arg_4]
push	0
push	40h
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_7D2378
mov	ecx, [esp+10h+arg_10]
mov	edx, [esp+10h+arg_C]
mov	edi, [ebp+38h]
push	ecx
push	edx
mov	ecx, esi
call	sub_64E4B0
mov	dword ptr [esi], offset	off_1456158
mov	dword ptr [esi+0Ch], offset off_1456144
mov	dword ptr [esi+34h], 0
test	edi, edi
jz	short loc_7D235F
mov	ecx, edi
call	sub_64A420

loc_7D235F:
mov	eax, [esp+10h+arg_4]
mov	[esi+38h], edi
mov	dword ptr [esi], offset	off_145619C
mov	dword ptr [esi+0Ch], offset off_1456188
mov	[esi+3Ch], eax
jmp	short loc_7D237A

loc_7D2378:
xor	esi, esi

loc_7D237A:
mov	edx, [esi]
mov	eax, [edx+14h]
push	1
mov	ecx, esi
call	eax
mov	edi, [ebx+4]
inc	edi
cmp	edi, [ebx+4]
jnb	short loc_7D239A
mov	ecx, [ebx+8]
shr	ecx, 1
cmp	edi, ecx
jnb	short loc_7D23AF
push	edi
jmp	short loc_7D23A7

loc_7D239A:
cmp	edi, [ebx+8]
jb	short loc_7D23AF
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx

loc_7D23A7:
push	ebx
mov	ecx, ebx
call	sub_714BE0

loc_7D23AF:
mov	eax, [ebx]
lea	eax, [eax+edi*4-4]
mov	[ebx+4], edi
test	eax, eax
jz	short loc_7D23BE
mov	[eax], esi

loc_7D23BE:
mov	ecx, esi
call	sub_64A430
cmp	[esp+14h+arg_4], 0
ja	loc_7D2311
mov	esi, [esp+14h+var_4]
pop	edi
pop	ebx

loc_7D23D6:		; lpCriticalSection
push	esi
call	ds:LeaveCriticalSection
pop	esi
mov	al, 1
pop	ebp
pop	ecx
retn	10h
sub_7D22E0 endp

align 10h



sub_7D23F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7D2260
test	[esp+4+arg_0], 1
jz	short loc_7D240D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D240D:
mov	eax, esi
pop	esi
retn	4
sub_7D23F0 endp

align 10h



sub_7D2420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, [ecx+0Ch]
cmp	dword ptr [esi+2Ch], 0
jnz	short loc_7D244E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	3Ch
call	edx
test	eax, eax
jz	short loc_7D2449
push	esi
mov	ecx, eax
call	sub_7D1E80
jmp	short loc_7D244B

loc_7D2449:
xor	eax, eax

loc_7D244B:
mov	[esi+2Ch], eax

loc_7D244E:
mov	eax, [esp+4+arg_C]
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	eax
mov	eax, [esp+8+arg_0]
push	ecx
mov	ecx, [esi+2Ch]
push	edx
push	eax
call	sub_7D22E0
pop	esi
retn	10h
sub_7D2420 endp

align 10h



sub_7D2470 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
test	esi, esi
jz	loc_7D2520
mov	eax, [esi]
mov	edx, [eax+28h]
mov	ecx, esi
call	edx
test	al, al
jnz	loc_7D2520
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	ecx, esi
call	edx
mov	eax, [esp+8+arg_4]
mov	edx, [esi]
push	eax
mov	eax, [edx+14h]
mov	ecx, esi
call	eax
mov	edx, [esi]
push	eax
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
push	eax
push	2
call	sub_73D6D0
mov	edi, eax
test	edi, edi
jz	short loc_7D2510
mov	edx, [esi]
mov	eax, [edx+14h]
push	ebx
mov	ecx, esi
xor	ebx, ebx
call	eax
test	eax, eax
jbe	short loc_7D250F
mov	edi, edi

loc_7D24D0:
mov	eax, [edi+18h]
mov	edx, [esi]
imul	eax, ebx
add	eax, [edi+1Ch]
mov	ecx, esi
push	eax
mov	eax, [edx+1Ch]
call	eax
test	eax, eax
jz	short loc_7D2506
mov	edx, [esi]
mov	eax, [edx+14h]
mov	ecx, esi
inc	ebx
call	eax
cmp	ebx, eax
jb	short loc_7D24D0
mov	edx, [esi]
mov	eax, [edx+10h]
pop	ebx
mov	ecx, esi
call	eax
mov	eax, edi
pop	edi
pop	esi
retn	8

loc_7D2506:
mov	ecx, edi
call	sub_64A400
xor	edi, edi

loc_7D250F:
pop	ebx

loc_7D2510:
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax
mov	eax, edi
pop	edi
pop	esi
retn	8

loc_7D2520:
xor	eax, eax
pop	esi
retn	8
sub_7D2470 endp

align 10h



sub_7D2530 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+0Ch]
test	eax, eax
jnz	short loc_7D253A
retn	8

loc_7D253A:
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	ecx
push	eax
push	edx
call	sub_73DD70
retn	8
sub_7D2530 endp

align 10h



sub_7D2550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

; FUNCTION CHUNK AT 0073CC20 SIZE 0000002D BYTES
; FUNCTION CHUNK AT 0073CC50 SIZE 0000002F BYTES

mov	eax, ecx
mov	ecx, [esp+arg_8]
test	ecx, ecx
jnz	short loc_7D255F

loc_7D255A:
xor	al, al
retn	0Ch

loc_7D255F:
mov	eax, [eax+0Ch]
test	eax, eax
jz	short loc_7D255A
mov	[esp+arg_8], eax
jmp	loc_73CC20
sub_7D2550 endp

align 10h



sub_7D2570 proc	near
mov	ecx, [ecx+0Ch]
test	ecx, ecx
jnz	short loc_7D257C
xor	eax, eax
retn	4

loc_7D257C:
mov	eax, [ecx]
mov	eax, [eax+0Ch]
jmp	eax
sub_7D2570 endp

align 10h



sub_7D2590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+4]
push	edi
push	ecx
mov	ecx, esi
call	edx
mov	edi, eax
test	edi, edi
jnz	short loc_7D25AD
pop	edi
pop	esi
retn	8

loc_7D25AD:
mov	eax, [edi]
mov	edx, [eax+28h]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_7D25CD
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
xor	esi, esi
call	edx
pop	edi
mov	eax, esi
pop	esi
retn	8

loc_7D25CD:
mov	ecx, [esp+8+arg_4]
mov	eax, [esi]
mov	edx, [eax+14h]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	esi, eax
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_7D2590 endp

align 10h



sub_7D25F0 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+4]
push	esi
push	edx
call	eax
mov	esi, eax
test	esi, esi
jnz	short loc_7D2607
pop	esi
retn	8

loc_7D2607:
mov	edx, [esi]
mov	eax, [edx+28h]
push	ebx
mov	ecx, esi
xor	ebx, ebx
call	eax
test	al, al
jnz	loc_7D2711
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
test	eax, eax
jz	loc_7D2711
mov	ecx, [esp+4+arg_8]
mov	edx, [esi]
mov	eax, [edx+14h]
push	ecx
mov	ecx, esi
call	eax
mov	edx, [esi]
push	eax
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
push	eax
push	1
call	sub_73D6D0
mov	ebx, eax
test	ebx, ebx
jz	loc_7D2708
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	edx, [edx+28h]
push	ebp
mov	ebp, [ebx+10h]
push	edi
push	0
lea	eax, [ebp+ebp*2+0]
push	eax
call	edx
mov	[esp+8+arg_8], eax
mov	eax, [esi]
mov	edx, [eax+14h]
xor	edi, edi
mov	ecx, esi
mov	[esp+8+arg_C], edi
call	edx
test	eax, eax
jbe	short loc_7D26F4

loc_7D2686:
mov	ecx, [esp+8+arg_8]
mov	eax, [esi]
mov	edx, [eax+1Ch]
push	ecx
mov	ecx, esi
call	edx
test	eax, eax
jz	short loc_7D26EB
mov	eax, [ebx+18h]
imul	eax, edi
add	eax, [ebx+1Ch]
test	ebp, ebp
jbe	short loc_7D26D7
mov	ecx, [esp+8+arg_8]
add	eax, 2
add	ecx, 2
mov	edi, ebp

loc_7D26B1:
movzx	edx, byte ptr [ecx-2]
mov	[eax-2], dl
movzx	edx, byte ptr [ecx-1]
mov	[eax-1], dl
movzx	edx, byte ptr [ecx]
mov	[eax], dl
mov	byte ptr [eax+1], 0FFh
add	ecx, 3
add	eax, 4
sub	edi, 1
jnz	short loc_7D26B1
mov	edi, [esp+8+arg_C]

loc_7D26D7:
mov	eax, [esi]
mov	edx, [eax+14h]
inc	edi
mov	ecx, esi
mov	[esp+8+arg_C], edi
call	edx
cmp	edi, eax
jb	short loc_7D2686
jmp	short loc_7D26F4

loc_7D26EB:
mov	ecx, ebx
call	sub_64A400
xor	ebx, ebx

loc_7D26F4:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+8+arg_8]
mov	eax, [eax+30h]
push	edx
call	eax
pop	edi
pop	ebp

loc_7D2708:
mov	edx, [esi]
mov	eax, [edx+10h]
mov	ecx, esi
call	eax

loc_7D2711:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
mov	eax, ebx
pop	ebx
pop	esi
retn	8
sub_7D25F0 endp

align 10h



sub_7D2730 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], 1Dh
mov	dword ptr [esi], offset	off_14561B8
push	edi
mov	dword ptr [esi+0Ch], 0
call	sub_7D85F0
mov	ecx, [esi+0Ch]
mov	edi, eax
test	ecx, ecx
jz	short loc_7D2768
call	sub_64A430

loc_7D2768:
mov	[esi+0Ch], edi
pop	edi
mov	eax, esi
pop	esi
retn
sub_7D2730 endp




sub_7D2770 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_7D277F
call	sub_64A430

loc_7D277F:
mov	ecx, esi
mov	dword ptr [esi], offset	off_15477D0
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7D27A1
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D27A1:
mov	eax, esi
pop	esi
retn	4
sub_7D2770 endp

align 10h



sub_7D27B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	esi
xor	ebx, ebx
mov	[esp+0Ch+var_4], ebx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	ebx
push	0Ch
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_7D27FD
mov	eax, [esp+10h+arg_0]
push	eax
lea	ecx, [esp+14h+var_4]
call	sub_67AE10
mov	ecx, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_4]
push	ecx
push	edx
lea	eax, [esp+18h+var_4]
push	eax
mov	ecx, esi
mov	ebx, 1
call	sub_7519F0
mov	edi, eax
jmp	short loc_7D27FF

loc_7D27FD:
xor	edi, edi

loc_7D27FF:
test	bl, 1
jz	short loc_7D282A
mov	esi, [esp+10h+var_4]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7D282A
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7D282A:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	0Ch
sub_7D27B0 endp

align 10h



sub_7D2840 proc	near

var_18=	qword ptr -18h
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 18h
push	ebx
push	esi
push	eax
lea	ecx, [esp+24h+arg_0]
call	sub_67AE10
lea	ecx, [esp+20h+arg_0]
push	ecx
lea	edx, [esp+24h+var_18]
push	edx
call	sub_766D10
mov	esi, [esp+28h+arg_0]
add	esp, 8
mov	bl, al
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7D288D
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7D288D:
pop	esi
test	bl, bl
pop	ebx
jz	short loc_7D28A0
mov	eax, dword ptr [esp+18h+var_18]
mov	edx, dword ptr [esp+18h+var_18+4]
add	esp, 18h
retn	4

loc_7D28A0:
or	eax, 0FFFFFFFFh
or	edx, eax
add	esp, 18h
retn	4
sub_7D2840 endp

align 10h



sub_7D28B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_C]
mov	eax, [ecx]
mov	eax, [eax+4]
push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edx
mov	edx, [esp+0Ch+arg_8]
push	edx
push	edi
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_7D28E2
mov	edx, [esi]
mov	eax, [edx+20h]
mov	ecx, esi
call	eax
test	eax, eax
jnz	short loc_7D28E2
pop	edi
mov	eax, esi
pop	esi
retn	10h

loc_7D28E2:
mov	eax, [esp+8+arg_4]
test	eax, eax
jz	short loc_7D28FC
push	edi
add	eax, 0Ch
push	offset aErrorGfxload_4 ; "Error: GFxLoader failed to open '%s'\n"
push	eax
call	sub_67E7F0
add	esp, 0Ch

loc_7D28FC:
test	esi, esi
jz	short loc_7D2907
mov	ecx, esi
call	sub_64A430

loc_7D2907:
pop	edi
xor	eax, eax
pop	esi
retn	10h
sub_7D28B0 endp

align 10h



sub_7D2910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	eax, ecx
mov	ecx, dword_1855FC0
lea	esi, [esp+8+var_4]
push	esi
mov	[esp+0Ch+var_4], 2
mov	edx, [ecx]
push	0Ch
push	eax
mov	eax, [edx+38h]
call	eax
pop	esi
test	eax, eax
jz	short loc_7D2946
mov	ecx, [esp+4+arg_0]
push	ecx
mov	ecx, eax
call	sub_7D8D10
pop	ecx
retn	4

loc_7D2946:
xor	eax, eax
pop	ecx
retn	4
sub_7D2910 endp

align 10h



sub_7D2950 proc	near

var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_24=	byte ptr -24h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 5Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+5Ch+var_4], eax
mov	edx, [esp+5Ch+arg_8]
mov	eax, [esp+5Ch+arg_4]
push	esi
mov	esi, [esp+60h+arg_0]
push	edx
push	eax
push	ecx
lea	eax, [esp+6Ch+var_5C]
push	eax
call	sub_7D8740
add	esp, 10h
test	eax, eax
jz	short loc_7D298A
push	eax
push	offset aErrorGfx_infla ; "Error: GFx_InflateWrapper() inflateInit"...
jmp	loc_7D2A44

loc_7D298A:
lea	ecx, [esp+60h+var_24]
mov	edx, ecx
push	20h
mov	[esp+64h+var_5C], ecx
push	edx
mov	ecx, esi
call	sub_6A9CB0
mov	[esp+60h+var_58], eax
lea	eax, [esp+60h+var_5C]
push	2
push	eax
call	sub_767D20
add	esp, 8
cmp	eax, 1
jz	short loc_7D2A12

loc_7D29B6:
test	eax, eax
jnz	short loc_7D29E8
lea	ecx, [esp+60h+var_24]
mov	edx, ecx
push	20h
mov	[esp+64h+var_5C], ecx
push	edx
mov	ecx, esi
call	sub_6A9CB0
mov	[esp+60h+var_58], eax
lea	eax, [esp+60h+var_5C]
push	2
push	eax
call	sub_767D20
add	esp, 8
cmp	eax, 1
jnz	short loc_7D29B6
jmp	short loc_7D2A12

loc_7D29E8:
push	eax
push	offset aErrorGfx_inf_0 ; "Error: GFx_InflateWrapper() Inflate()	r"...
push	esi
call	sub_680970
mov	eax, [esp+6Ch+var_58]
add	esp, 0Ch
test	eax, eax
jbe	short loc_7D2A2D
mov	ecx, [esi+34h]
sub	ecx, [esi+30h]
add	ecx, [esi+2Ch]
sub	ecx, eax
push	ecx
mov	ecx, esi
call	sub_6A9D50

loc_7D2A12:
mov	eax, [esp+60h+var_58]
test	eax, eax
jbe	short loc_7D2A2D
mov	edx, [esi+34h]
sub	edx, [esi+30h]
mov	ecx, esi
add	edx, [esi+2Ch]
sub	edx, eax
push	edx
call	sub_6A9D50

loc_7D2A2D:
lea	eax, [esp+60h+var_5C]
push	eax
call	sub_7690B0
add	esp, 4
test	eax, eax
jz	short loc_7D2A4D
push	eax
push	offset aErrorGfx_inf_1 ; "Error: GFx_InflateWrapper() InflateEnd("...

loc_7D2A44:
push	esi
call	sub_680970
add	esp, 0Ch

loc_7D2A4D:
mov	ecx, [esp+60h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 5Ch
retn	0Ch
sub_7D2950 endp

align 10h



sub_7D2A60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	esi
push	eax
push	edx
add	ecx, 10h
call	sub_7D93D0
mov	esi, [esp+4+arg_0]
push	eax
mov	ecx, esi
call	sub_7D8DE0
mov	eax, esi
pop	esi
retn	0Ch
sub_7D2A60 endp

align 10h



sub_7D2A90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D2AB2
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60

loc_7D2AB2:
pop	esi
retn
sub_7D2A90 endp

align 10h



sub_7D2AC0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D2AEA
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_7D2AEA:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_7D2B33
lea	ecx, [eax-10h]
test	ecx, ecx
jz	short loc_7D2B33
fldz
mov	esi, [esi+4]
fcomp	qword ptr [ecx+40h]
fnstsw	ax
test	ah, 41h
jnz	short loc_7D2B16
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
add	esp, 8
retn

loc_7D2B16:
cmp	byte ptr [esi],	5
fld	qword ptr [ecx+40h]
fstp	[esp+0Ch+var_8]
jb	short loc_7D2B29
mov	ecx, esi
call	sub_652060

loc_7D2B29:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_7D2B33:
pop	esi
add	esp, 8
retn
sub_7D2AC0 endp

align 10h



sub_7D2B40 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D2B6A
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 8
retn

loc_7D2B6A:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_7D2BB3
lea	ecx, [eax-10h]
test	ecx, ecx
jz	short loc_7D2BB3
fldz
mov	esi, [esi+4]
fcomp	qword ptr [ecx+48h]
fnstsw	ax
test	ah, 41h
jnz	short loc_7D2B96
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0
pop	esi
add	esp, 8
retn

loc_7D2B96:
cmp	byte ptr [esi],	5
fld	qword ptr [ecx+48h]
fstp	[esp+0Ch+var_8]
jb	short loc_7D2BA9
mov	ecx, esi
call	sub_652060

loc_7D2BA9:
fld	[esp+0Ch+var_8]
mov	byte ptr [esi],	3
fstp	qword ptr [esi+4]

loc_7D2BB3:
pop	esi
add	esp, 8
retn
sub_7D2B40 endp

align 10h



sub_7D2BC0 proc	near

arg_0= dword ptr  4

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+28h]
push	0
push	edx
call	eax
retn
sub_7D2BC0 endp

align 10h



sub_7D2BE0 proc	near
mov	eax, 1Ch
retn
sub_7D2BE0 endp

align 10h



sub_7D2BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [esp+10h+arg_4]
add	esi, 14Ch
cmp	byte ptr [ebp+4], 6
mov	ebx, ecx
mov	ecx, [edi]
jbe	short loc_7D2C13
cmp	[esi], ecx
jmp	short loc_7D2C28

loc_7D2C13:
cmp	dword ptr [ecx+4], 0
jnz	short loc_7D2C1E
call	sub_651580

loc_7D2C1E:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_7D2C28:
setz	al
mov	byte ptr [esp+10h+arg_4], al
test	al, al
jnz	short loc_7D2C77
mov	esi, [ebp+0]
add	esi, 148h
cmp	byte ptr [ebp+4], 6
jbe	short loc_7D2C46
cmp	[esi], ecx
jmp	short loc_7D2C5B

loc_7D2C46:
cmp	dword ptr [ecx+4], 0
jnz	short loc_7D2C51
call	sub_651580

loc_7D2C51:
mov	eax, [esi]
mov	ecx, [edi]
mov	edx, [eax+4]
cmp	edx, [ecx+4]

loc_7D2C5B:
setz	al
test	al, al
jnz	short loc_7D2C77
mov	eax, [esp+10h+arg_8]
push	eax
push	edi
push	ebp
mov	ecx, ebx
call	sub_663C50
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_7D2C77:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_8]
push	ecx
push	edx
push	edi
push	ebp
lea	eax, [ebx-10h]
push	eax
lea	ecx, [ebx+40h]
call	sub_664D40
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_7D2BF0 endp

align 10h



sub_7D2CA0 proc	near
add	ecx, 40h
jmp	sub_665AD0
sub_7D2CA0 endp

align 10h



sub_7D2CB0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	ecx, eax
jnz	short loc_7D2CBD
mov	al, 1
retn	8

loc_7D2CBD:
mov	[esp+arg_4], eax
add	ecx, 50h
jmp	loc_663310
sub_7D2CB0 endp

align 10h



sub_7D2CD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+50h]
mov	dword ptr [esi], offset	off_145631C
mov	dword ptr [esi+10h], offset off_1456530
mov	dword ptr [ecx], offset	off_1456318
call	sub_665A40
mov	ecx, esi
call	sub_7D4C90
test	[esp+4+arg_0], 1
jz	short loc_7D2D0A
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D2D0A:
mov	eax, esi
pop	esi
retn	4
sub_7D2CD0 endp




sub_7D2D10 proc	near

arg_0= byte ptr	 4

sub	ecx, 50h
jmp	sub_7D2CD0
sub_7D2D10 endp

align 10h



sub_7D2D20 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1456340
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7D2D43
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D2D43:
mov	eax, esi
pop	esi
retn	4
sub_7D2D20 endp

align 10h



sub_7D2D50 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+38h]
test	eax, eax
jz	short loc_7D2D67
mov	eax, [eax+1Ch]
test	eax, eax
jz	short loc_7D2D67
mov	dword ptr [eax], 0

loc_7D2D67:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D2D73
call	sub_64A400

loc_7D2D73:
mov	dword ptr [esi+34h], 0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_7D2D50 endp

align 10h



sub_7D2D90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax]
push	esi
push	edi
and	eax, 0FFFFFFFCh
push	1B6h
mov	edi, ecx
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx]
add	eax, 8
push	21h
push	eax
mov	eax, [edx+4]
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_7D2DFE
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_7D2DF7
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
mov	[edi+14h], eax
test	eax, eax
jz	short loc_7D2DF7
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	ecx, [edi+14h]
mov	[edi+10h], eax
mov	edx, [esi]
mov	edx, [edx+28h]
push	ecx
push	eax
mov	ecx, esi
call	edx

loc_7D2DF7:
mov	ecx, esi
call	sub_64A430

loc_7D2DFE:
pop	edi
pop	esi
retn	8
sub_7D2D90 endp

align 10h



sub_7D2E10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax]
push	esi
push	edi
and	eax, 0FFFFFFFCh
push	1B6h
mov	edi, ecx
mov	ecx, [esp+0Ch+arg_4]
mov	edx, [ecx]
add	eax, 8
push	21h
push	eax
mov	eax, [edx+4]
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_7D2E7E
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
test	al, al
jz	short loc_7D2E77
mov	edx, [esi]
mov	eax, [edx+18h]
mov	ecx, esi
call	eax
mov	[edi+0Ch], eax
test	eax, eax
jz	short loc_7D2E77
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+28h]
call	eax
mov	ecx, [edi+0Ch]
mov	[edi+8], eax
mov	edx, [esi]
mov	edx, [edx+28h]
push	ecx
push	eax
mov	ecx, esi
call	edx

loc_7D2E77:
mov	ecx, esi
call	sub_64A430

loc_7D2E7E:
pop	edi
pop	esi
retn	8
sub_7D2E10 endp

align 10h



sub_7D2E90 proc	near

var_28=	byte ptr -28h
var_24=	dword ptr -24h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, dword_1855FC0
sub	esp, 28h
push	ebx
push	esi
push	eax
mov	ebx, ecx
push	offset byte_146D660
lea	ecx, [esp+38h+var_18]
call	sub_67AD40
mov	esi, [esp+30h+arg_4]
test	esi, esi
jz	loc_7D2FA9
push	0FFFFFFFFh
push	offset a?_7	; "<?"
lea	ecx, [esp+38h+var_18]
call	sub_679D10
mov	ecx, [esi+3Ch]
cmp	dword ptr [ecx+0Ch], 0
jbe	short loc_7D2F01
push	0FFFFFFFFh
push	offset aXmlVersion ; "xml version=\""
lea	ecx, [esp+38h+var_18]
call	sub_679D10
mov	edx, [esi+3Ch]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+38h+var_18]
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D890 ; "\""
lea	ecx, [esp+38h+var_18]
call	sub_679D10

loc_7D2F01:
mov	ecx, [esi+40h]
cmp	dword ptr [ecx+0Ch], 0
jbe	short loc_7D2F54
mov	edx, [esi+3Ch]
cmp	dword ptr [edx+0Ch], 0
jbe	short loc_7D2F23
push	0FFFFFFFFh
push	offset asc_154D868 ; " "
lea	ecx, [esp+38h+var_18]
call	sub_679D10

loc_7D2F23:
push	0FFFFFFFFh
push	offset aEncoding_0 ; "encoding=\""
lea	ecx, [esp+38h+var_18]
call	sub_679D10
mov	eax, [esi+40h]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+38h+var_18]
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D890 ; "\""
lea	ecx, [esp+38h+var_18]
call	sub_679D10

loc_7D2F54:
cmp	byte ptr [esi+44h], 0FFh
jz	short loc_7D2F99
mov	edx, [esi+3Ch]
cmp	dword ptr [edx+0Ch], 0
ja	short loc_7D2F6C
mov	eax, [esi+40h]
cmp	dword ptr [eax+0Ch], 0
jbe	short loc_7D2F7C

loc_7D2F6C:
push	0FFFFFFFFh
push	offset asc_154D868 ; " "
lea	ecx, [esp+38h+var_18]
call	sub_679D10

loc_7D2F7C:
cmp	byte ptr [esi+44h], 0
push	0FFFFFFFFh
lea	ecx, [esp+34h+var_18]
jz	short loc_7D2F8F
push	offset aStandaloneYes ;	"standalone=\"yes\""
jmp	short loc_7D2F94

loc_7D2F8F:		; "standalone=\"no\""
push	offset aStandaloneNo

loc_7D2F94:
call	sub_679D10

loc_7D2F99:
push	0FFFFFFFFh
push	offset a?_6	; "?>"
lea	ecx, [esp+38h+var_18]
call	sub_679D10

loc_7D2FA9:
mov	ecx, [esi+3Ch]
cmp	dword ptr [ecx+0Ch], 0
ja	short loc_7D2FC5
mov	edx, [esi+40h]
cmp	dword ptr [edx+0Ch], 0
ja	short loc_7D2FC5
cmp	byte ptr [esi+44h], 0FFh
jz	loc_7D3067

loc_7D2FC5:
mov	eax, [esp+30h+var_18]
push	edi
mov	edi, [esp+34h+arg_0]
test	eax, eax
jnz	short loc_7D2FD7
mov	eax, offset byte_146D660

loc_7D2FD7:
mov	edx, [esp+34h+var_14]
mov	ecx, [edi+78h]
mov	ecx, [ecx+280h]
push	edx
push	eax
call	sub_650F20
mov	esi, eax
inc	dword ptr [esi+8]
mov	[esp+34h+var_28], 5
mov	[esp+34h+var_24], esi
inc	dword ptr [esi+8]
mov	eax, [edi+78h]
push	0
push	7
mov	byte ptr [esp+3Ch+arg_4], 0
mov	ecx, [eax+280h]
push	offset aXmldecl	; "xmlDecl"
call	sub_650E40
mov	[esp+34h+arg_0], eax
inc	dword ptr [eax+8]
mov	edx, [ebx+10h]
mov	edx, [edx+0Ch]
lea	eax, [esp+34h+arg_4]
push	eax
lea	eax, [esp+38h+var_28]
push	eax
lea	ecx, [ebx+10h]
lea	eax, [esp+3Ch+arg_0]
push	eax
push	edi
call	edx
mov	eax, [esp+34h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_7D3051
call	sub_650DF0

loc_7D3051:
lea	ecx, [esp+30h+var_28]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_7D3067
mov	ecx, esi
call	sub_650DF0

loc_7D3067:
lea	ecx, [esp+30h+var_18]
call	sub_679B60
pop	esi
pop	ebx
add	esp, 28h
retn	8
sub_7D2E90 endp

align 10h



sub_7D3080 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+6Ch]
test	eax, eax
jz	short loc_7D30AB
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+6Ch]
mov	eax, [eax+30h]
push	edx
call	eax

loc_7D30AB:
mov	eax, [esi+38h]
test	eax, eax
jz	short loc_7D30BF
mov	eax, [eax+1Ch]
test	eax, eax
jz	short loc_7D30BF
mov	dword ptr [eax], 0

loc_7D30BF:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D30CB
call	sub_64A400

loc_7D30CB:
mov	dword ptr [esi+34h], 0
mov	ecx, esi
pop	esi
jmp	sub_664580
sub_7D3080 endp

align 10h



sub_7D30E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_7D3108
push	edi
mov	edi, eax

loc_7D30F4:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D30FF
call	sub_64A400

loc_7D30FF:
sub	esi, 4
sub	edi, 1
jnz	short loc_7D30F4
pop	edi

loc_7D3108:
pop	esi
retn
sub_7D30E0 endp

align 10h



sub_7D3110 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D3134
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_7D3134:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_7D315C
add	eax, 0FFFFFFF0h
jz	short loc_7D315C
mov	ecx, esi
call	sub_651C20
test	eax, eax
jz	short loc_7D315C
add	eax, 0Ch
push	offset aXml_addrequest ; "XML.addRequestHeader is not implemented"...
push	eax
call	sub_650A10
add	esp, 8

loc_7D315C:
pop	esi
retn
sub_7D3110 endp

align 10h



sub_7D3160 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D3184
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_7D3184:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_7D31AC
add	eax, 0FFFFFFF0h
jz	short loc_7D31AC
mov	ecx, esi
call	sub_651C20
test	eax, eax
jz	short loc_7D31AC
add	eax, 0Ch
push	offset aXml_sendIsNotI ; "XML.send is not implemented."
push	eax
call	sub_650A10
add	esp, 8

loc_7D31AC:
pop	esi
retn
sub_7D3160 endp

align 10h



sub_7D31B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D31D4
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
retn

loc_7D31D4:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_7D31FC
add	eax, 0FFFFFFF0h
jz	short loc_7D31FC
mov	ecx, esi
call	sub_651C20
test	eax, eax
jz	short loc_7D31FC
add	eax, 0Ch
push	offset aXml_sendandloa ; "XML.sendAndLoad is not implemented."
push	eax
call	sub_650A10
add	esp, 8

loc_7D31FC:
pop	esi
retn
sub_7D31B0 endp

align 10h



sub_7D3200 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+4]
mov	ecx, [ebx]
push	esi
lea	esi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_7D3228
push	edi
mov	edi, eax

loc_7D3214:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D321F
call	sub_64A400

loc_7D321F:
sub	esi, 4
sub	edi, 1
jnz	short loc_7D3214
pop	edi

loc_7D3228:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebx]
mov	edx, [edx+30h]
push	eax
call	edx
pop	esi
pop	ebx
retn
sub_7D3200 endp

align 10h



sub_7D3240 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
lea	esi, [ecx+eax*8-8]
test	eax, eax
jbe	short loc_7D3274
push	edi
mov	edi, eax

loc_7D3254:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_7D3260
call	sub_64A400

loc_7D3260:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D326B
call	sub_64A400

loc_7D326B:
sub	esi, 8
sub	edi, 1
jnz	short loc_7D3254
pop	edi

loc_7D3274:
pop	esi
retn
sub_7D3240 endp

align 10h



sub_7D3280 proc	near
push	edi
mov	edi, ecx
call	sub_6625C0
lea	ecx, [edi+54h]
call	sub_67C000
lea	ecx, [edi+60h]
call	sub_67C000
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_7D32F0
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_7D32EE
lea	ebx, [ebx+0]

loc_7D32B0:
mov	eax, [edi+6Ch]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D32E9
dec	dword ptr [ecx+8]
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jz	short loc_7D32E9
and	eax, 9FFFFFFFh
or	eax, 10000000h
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
push	1
call	edx

loc_7D32E9:
inc	esi
cmp	esi, ebx
jb	short loc_7D32B0

loc_7D32EE:
pop	esi
pop	ebx

loc_7D32F0:
pop	edi
retn
sub_7D3280 endp

align 10h



sub_7D3300 proc	near
push	edi
mov	edi, ecx
call	sub_6626E0
lea	ecx, [edi+54h]
call	sub_67BFB0
lea	ecx, [edi+60h]
call	sub_67BFB0
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_7D3362
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_7D3360
lea	ebx, [ebx+0]

loc_7D3330:
mov	eax, [edi+6Ch]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D335B
inc	dword ptr [ecx+8]
mov	eax, [ecx+8]
test	eax, 70000000h
jz	short loc_7D335B
mov	edx, [ecx]
and	eax, 8FFFFFFFh
mov	[ecx+8], eax
mov	eax, [edx]
push	2
call	eax

loc_7D335B:
inc	esi
cmp	esi, ebx
jb	short loc_7D3330

loc_7D3360:
pop	esi
pop	ebx

loc_7D3362:
pop	edi
retn
sub_7D3300 endp

align 10h



sub_7D3370 proc	near
push	edi
mov	edi, ecx
call	sub_6627F0
lea	ecx, [edi+54h]
call	sub_67C070
lea	ecx, [edi+60h]
call	sub_67C070
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_7D33ED
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_7D33EB
lea	ebx, [ebx+0]

loc_7D33A0:
mov	eax, [edi+6Ch]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D33E6
mov	eax, [ecx+8]
mov	edx, eax
and	edx, 70000000h
cmp	edx, 10000000h
jnz	short loc_7D33E6
test	eax, 0FFFFFFFh
jbe	short loc_7D33D1
and	eax, 8FFFFFFFh
push	2
jmp	short loc_7D33DD

loc_7D33D1:
and	eax, 0AFFFFFFFh
or	eax, 20000000h
push	4

loc_7D33DD:
mov	[ecx+8], eax
mov	eax, [ecx]
mov	edx, [eax]
call	edx

loc_7D33E6:
inc	esi
cmp	esi, ebx
jb	short loc_7D33A0

loc_7D33EB:
pop	esi
pop	ebx

loc_7D33ED:
pop	edi
retn
sub_7D3370 endp

align 10h



sub_7D33F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch

push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+8+arg_0]
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_14563B8
test	edi, edi
jz	short loc_7D3416
mov	ecx, edi
call	sub_64A420

loc_7D3416:
mov	eax, [esp+8+arg_4]
mov	cl, [esp+8+arg_8]
mov	[esi+8], edi
mov	[esi+0Ch], eax
pop	edi
mov	dword ptr [esi+10h], 0
mov	dword ptr [esi+14h], 0
mov	[esi+18h], cl
mov	eax, esi
pop	esi
retn	0Ch
sub_7D33F0 endp

align 10h



sub_7D3440 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	dword ptr [esi], offset	off_14563B8
test	eax, eax
jz	short loc_7D345E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_7D345E:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_7D346A
call	sub_64A430

loc_7D346A:
mov	ecx, esi
mov	dword ptr [esi], offset	off_14408CC
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7D348C
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7D348C:
mov	eax, esi
pop	esi
retn	4
sub_7D3440 endp

align 10h



sub_7D34A0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	dword ptr [esi], offset	off_14563C4
test	eax, eax
jz	short loc_7D34BE
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_7D34BE:
mov	ecx, esi
mov	dword ptr [esi], offset	off_14408CC
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7D34E0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7D34E0:
mov	eax, esi
pop	esi
retn	4
sub_7D34A0 endp

align 10h



sub_7D34F0 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+54h]
call	sub_67C210
lea	ecx, [edi+60h]
call	sub_67C210
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_7D353A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_7D3538
lea	ebx, [ebx+0]

loc_7D3520:
mov	eax, [edi+6Ch]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D3533
call	sub_64B020

loc_7D3533:
inc	esi
cmp	esi, ebx
jb	short loc_7D3520

loc_7D3538:
pop	esi
pop	ebx

loc_7D353A:
pop	edi
retn
sub_7D34F0 endp

align 10h



sub_7D3540 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+54h]
call	sub_67C1F0
lea	ecx, [edi+60h]
call	sub_67C1F0
mov	eax, [edi+6Ch]
test	eax, eax
jz	short loc_7D358A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_7D3588
lea	ebx, [ebx+0]

loc_7D3570:
mov	eax, [edi+6Ch]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D3583
call	sub_64B3B0

loc_7D3583:
inc	esi
cmp	esi, ebx
jb	short loc_7D3570

loc_7D3588:
pop	esi
pop	ebx

loc_7D358A:
pop	edi
retn
sub_7D3540 endp

align 10h



sub_7D3590 proc	near
mov	eax, 1Dh
retn
sub_7D3590 endp

align 10h



sub_7D35A0 proc	near

arg_0= byte ptr	 4

sub	ecx, 10h
jmp	loc_7D35B0
align 10h

loc_7D35B0:
push	esi
mov	esi, ecx
call	sub_7D4C90
test	[esp+4+arg_0], 1
jz	short loc_7D35CD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D35CD:
mov	eax, esi
pop	esi
retn	4
sub_7D35A0 endp

align 10h



sub_7D35E0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_7D5670
lea	edi, [esi+10h]
mov	dword ptr [esi], offset	off_1456494
mov	dword ptr [edi], offset	off_14564B8
mov	ecx, [ebp+78h]
lea	ebx, [ebp+78h]
push	17h
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
fld	ds:dbl_15FCD60
push	edi
fst	qword ptr [esi+40h]
push	ebx
fstp	qword ptr [esi+48h]
call	sub_6C2A50
push	edi
push	edi
push	ebp
call	sub_6C2350
add	esp, 14h
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_7D35E0 endp

align 10h



sub_7D3640 proc	near

var_50=	byte ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	dword ptr -30h
var_24=	byte ptr -24h
var_20=	byte ptr -20h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
var_4= byte ptr	-4
arg_0= dword ptr  4

sub	esp, 54h
push	esi
mov	esi, [esp+58h+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D366A
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 54h
retn

loc_7D366A:
mov	eax, [esi+8]
test	eax, eax
jz	loc_7D38AD
push	edi
lea	edi, [eax-10h]
mov	[esp+5Ch+var_48], edi
test	edi, edi
jz	loc_7D38AC
cmp	dword ptr [esi+1Ch], 0
jnz	short loc_7D36A2
mov	esi, [esi+4]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0
pop	esi
add	esp, 54h
retn

loc_7D36A2:
push	ebx
mov	ebx, [esi+18h]
push	ebp
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebx
lea	ecx, [esp+70h+var_4C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	ecx, [esi+18h]
lea	edx, [esp+64h+var_10]
push	edx
push	offset aOndata	; "onData"
lea	eax, [esp+6Ch+var_50]
mov	[esp+6Ch+var_10], 0
mov	ebx, [edi+10h]
lea	ebp, [edi+10h]
push	eax
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx+10h]
push	eax
push	ecx
mov	ecx, ebp
call	edx
mov	eax, [esp+58h+var_44]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
xor	ebx, ebx
cmp	[eax], ebx
jnz	short loc_7D3706
call	sub_650DF0

loc_7D3706:
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+5Ch+var_30]
push	ecx
lea	ecx, [esp+60h+var_4]
call	sub_652DC0
mov	ecx, [esp+58h+var_30]
mov	edx, [ecx]
mov	eax, [edx+34h]
call	eax
test	al, al
jz	short loc_7D379B
mov	ecx, offset sub_7D2A90
test	ecx, ecx
jnz	short loc_7D377F
cmp	[esp+58h+var_30], ebx
setz	al
test	al, al
jz	short loc_7D379B

loc_7D373B:
mov	ecx, [esi+18h]
call	sub_668010
mov	ebx, eax
mov	eax, [ebx+118h]
test	eax, eax
jnz	loc_7D38D1
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	40h
call	eax
test	eax, eax
jz	loc_7D38B2
push	ebx
mov	ecx, eax
call	sub_7D9680
jmp	loc_7D38B4

loc_7D377F:
mov	ecx, [esp+58h+var_30]
mov	edx, [ecx]
mov	eax, [edx+34h]
call	eax
test	al, al
jz	short loc_7D379B
mov	ecx, [esp+58h+var_30]
cmp	dword ptr [ecx+34h], offset sub_7D2A90
jz	short loc_7D373B

loc_7D379B:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	ebx
push	10h
call	eax
cmp	eax, ebx
jz	short loc_7D37CA
mov	dword ptr [eax], offset	off_155F500
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_14563C4
mov	ebx, eax

loc_7D37CA:
mov	ecx, [esp+58h+var_40]
mov	eax, [ecx]
mov	ecx, [esi+18h]
push	0
push	eax
push	ebx
push	edi
call	sub_668010
mov	ecx, eax
call	sub_696130
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	2
mov	byte ptr [edi+4], 1
test	ebx, ebx
jz	short loc_7D3800
mov	ecx, ebx
call	sub_64A430

loc_7D3800:
mov	esi, [esi+18h]
mov	ebx, [ebp+0]
lea	edx, [esp+58h+var_48+3]
push	edx
lea	eax, [esp+5Ch+var_14]
push	eax
push	offset aLoaded_0 ; "loaded"
lea	ecx, [esp+64h+var_34]
add	esi, 78h
push	ecx
mov	ecx, esi
mov	byte ptr [esp+68h+var_48+3], 2
mov	[esp+68h+var_14], 2
mov	[esp+68h+var_10], 0
call	sub_4E4640
mov	edx, [ebx+28h]
push	eax
push	esi
mov	ecx, ebp
call	edx
mov	eax, [esp+64h+var_40]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
xor	esi, esi
pop	ebp
pop	ebx
cmp	[eax], esi
jnz	short loc_7D3855
call	sub_650DF0

loc_7D3855:
lea	ecx, [esp+5Ch+var_20]
call	sub_652830
test	[esp+5Ch+var_34], 2
jnz	short loc_7D3872
mov	ecx, [esp+5Ch+var_3C]
cmp	ecx, esi
jz	short loc_7D3872
call	sub_64B3B0

loc_7D3872:
test	[esp+5Ch+var_34], 1
mov	[esp+5Ch+var_3C], esi
jnz	short loc_7D388A
mov	ecx, [esp+5Ch+var_38]
cmp	ecx, esi
jz	short loc_7D388A
call	sub_64B3B0

loc_7D388A:
lea	ecx, [esp+5Ch+var_10]
mov	[esp+5Ch+var_38], esi
call	sub_652830
mov	eax, [esp+5Ch+var_4C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], esi
jnz	short loc_7D38AC
call	sub_650DF0

loc_7D38AC:
pop	edi

loc_7D38AD:
pop	esi
add	esp, 54h
retn

loc_7D38B2:
xor	eax, eax

loc_7D38B4:
mov	[esp+58h+var_44], eax
test	eax, eax
jz	short loc_7D38C7
add	eax, 8
mov	[ebx+118h], eax
jmp	short loc_7D38DD

loc_7D38C7:
xor	eax, eax
mov	[ebx+118h], eax
jmp	short loc_7D38DD

loc_7D38D1:
add	eax, 0FFFFFFF8h
jz	short loc_7D38D9
inc	dword ptr [eax+4]

loc_7D38D9:
mov	[esp+58h+var_44], eax

loc_7D38DD:
mov	edx, [ebx+8]
mov	eax, [edx+0Ch]
lea	ecx, [ebx+8]
push	1Ch
call	eax
mov	edi, eax
test	edi, edi
jz	short loc_7D38F7
mov	ecx, edi
call	sub_64A430

loc_7D38F7:
fldz
mov	ecx, [esp+58h+var_3C]
mov	ebx, [ebp+0]
fstp	qword ptr [ecx+40h]
mov	ecx, [esi+18h]
lea	edx, [esp+58h+var_24]
push	edx
push	offset aIgnorewhite ; "ignoreWhite"
lea	eax, [esp+60h+var_38]
push	eax
mov	[esp+64h+var_24], 0
call	sub_651CB0
mov	ecx, [esi+18h]
mov	edx, [ebx+10h]
push	eax
push	ecx
mov	ecx, ebp
call	edx
mov	eax, [esp+58h+var_38]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3941
call	sub_650DF0

loc_7D3941:
mov	eax, [esi+18h]
push	eax
lea	ecx, [esp+5Ch+var_24]
call	sub_651D80
push	1Ch
mov	byte ptr [esp+5Ch+var_38], al
call	sub_7D2BC0
add	esp, 4
test	eax, eax
jz	short loc_7D3976
mov	ecx, [esp+58h+var_38]
mov	edx, [esp+58h+var_44]
push	ecx
push	edx
push	edi
mov	ecx, eax
call	sub_7D33F0
mov	ebx, eax
jmp	short loc_7D3978

loc_7D3976:
xor	ebx, ebx

loc_7D3978:
mov	eax, [esp+58h+var_40]
mov	eax, [eax]
mov	ecx, [esp+58h+var_3C]
push	0
push	eax
push	ebx
push	ecx
mov	ecx, [esi+18h]
call	sub_668010
mov	ecx, eax
call	sub_696130
mov	ecx, [esi+4]
push	1
call	sub_64A6C0
test	ebx, ebx
jz	short loc_7D39AB
mov	ecx, ebx
call	sub_64A430

loc_7D39AB:
lea	ecx, [esp+58h+var_24]
call	sub_652830
mov	ecx, [esp+58h+var_44]
test	ecx, ecx
jz	loc_7D3800
call	sub_64A400
jmp	loc_7D3800
sub_7D3640 endp

align 10h



sub_7D39D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_7D39F9
push	esi
mov	ecx, eax
call	sub_7D35E0
pop	esi
retn	4

loc_7D39F9:
xor	eax, eax
pop	esi
retn	4
sub_7D39D0 endp

align 10h



sub_7D3A00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
xor	ebx, ebx
push	eax
mov	dword ptr [esi], offset	off_1456494
mov	dword ptr [edi], offset	off_1456440
mov	[esi+34h], ebx
push	ebp
mov	ecx, edi
mov	[esi+38h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+50h]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_145631C
mov	dword ptr [edi], offset	off_1456530
mov	dword ptr [ecx], offset	off_1456318
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_7D3A00 endp

align 10h



sub_7D3A80 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
mov	ebx, [esp+4+arg_0]
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
push	ebp
push	esi
lea	esi, [ebx+8]
push	edi
mov	edi, ecx
cmp	eax, [esi+8]
jb	short loc_7D3AA0
mov	ecx, esi
call	sub_64B530

loc_7D3AA0:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D3AB0
lea	eax, [esp+10h+arg_4]
push	eax
call	sub_652330

loc_7D3AB0:
test	edi, edi
jz	short loc_7D3AB9
lea	ebp, [edi+10h]
jmp	short loc_7D3ABB

loc_7D3AB9:
xor	ebp, ebp

loc_7D3ABB:
mov	ecx, [esi]
sub	ecx, [esi+4]
mov	edx, [esi+14h]
mov	eax, [ebx+78h]
push	0
sar	ecx, 4
shl	edx, 5
push	6
lea	edi, [ecx+edx-20h]
mov	ecx, [eax+280h]
push	offset aOndata	; "onData"
call	sub_650E40
push	edi
push	1
lea	ecx, [esp+18h+arg_0]
push	ecx
push	ebp
mov	[esp+20h+arg_0], eax
inc	dword ptr [eax+8]
push	ebx
call	sub_6C2A80
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_7D3B13
call	sub_650DF0

loc_7D3B13:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_7D3B2B
mov	ecx, esi
call	sub_64B660

loc_7D3B2B:
lea	ecx, [esp+10h+arg_4]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h
sub_7D3A80 endp

align 10h



sub_7D3B40 proc	near

var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
mov	al, byte ptr [esp+18h+arg_4]
push	ebx
mov	ebx, [esp+1Ch+arg_0]
push	ebp
push	esi
push	edi
push	0
mov	esi, ecx
mov	ecx, [ebx+78h]
lea	edi, [ebx+78h]
push	6
mov	[esp+30h+var_15], 2
mov	[esp+30h+var_10], 2
mov	byte ptr [esp+30h+var_C], al
mov	ecx, [ecx+280h]
push	offset aLoaded_0 ; "loaded"
call	sub_650E40
mov	[esp+28h+var_14], eax
inc	dword ptr [eax+8]
mov	edx, [esi+10h]
mov	edx, [edx+28h]
lea	eax, [esp+28h+var_15]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	ebp, [esi+10h]
lea	eax, [esp+30h+var_14]
push	eax
push	edi
mov	ecx, ebp
call	edx
mov	eax, [esp+28h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3BB3
call	sub_650DF0

loc_7D3BB3:
lea	ecx, [esp+28h+var_10]
call	sub_652830
add	dword ptr [ebx+8], 10h
mov	eax, [ebx+8]
cmp	eax, [ebx+10h]
lea	esi, [ebx+8]
jb	short loc_7D3BD2
mov	ecx, esi
call	sub_64B530

loc_7D3BD2:
mov	eax, [esi]
test	eax, eax
jz	short loc_7D3BE2
mov	cl, byte ptr [esp+28h+arg_4]
mov	byte ptr [eax],	2
mov	[eax+4], cl

loc_7D3BE2:
mov	edx, [esi]
sub	edx, [esi+4]
mov	eax, [esi+14h]
mov	ecx, [edi]
mov	ecx, [ecx+280h]
push	0
push	6
sar	edx, 4
shl	eax, 5
push	offset aOnload	; "onLoad"
lea	ebx, [edx+eax-20h]
call	sub_650E40
push	ebx
push	1
lea	edx, [esp+30h+arg_4]
mov	[esp+30h+arg_4], eax
inc	dword ptr [eax+8]
mov	eax, [esp+30h+arg_0]
push	edx
push	ebp
push	eax
call	sub_6C2A80
mov	eax, [esp+3Ch+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	short loc_7D3C3D
call	sub_650DF0

loc_7D3C3D:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_7D3C55
mov	ecx, esi
call	sub_64B660

loc_7D3C55:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn	8
sub_7D3B40 endp

align 10h



sub_7D3C60 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	ebx, ecx
mov	ecx, [esp+20h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebx
call	sub_7D3A00
lea	edx, [esp+20h+arg_8]
push	edx
push	offset off_14562C8
push	esi
lea	ecx, [ebx+50h]
lea	edi, [ebx+10h]
push	ebx
mov	dword ptr [ebx], offset	off_145631C
mov	dword ptr [edi], offset	off_1456530
mov	dword ptr [ecx], offset	off_1456318
mov	byte ptr [esp+30h+arg_8], 6
call	sub_663110
mov	eax, [esi]
push	0
push	21h
mov	byte ptr [esp+28h+arg_8], 2
mov	ecx, [eax+280h]
push	offset aApplicationX_0 ; "application/x-www-form-urlencoded"
call	sub_650E40
mov	ebp, eax
mov	eax, 1
add	[ebp+8], eax
mov	[esp+20h+var_10], 5
mov	[esp+20h+var_C], ebp
add	[ebp+8], eax
mov	ecx, [esi]
mov	ecx, [ecx+280h]
push	0
push	0Bh
push	offset aContenttype ; "contentType"
call	sub_650E40
mov	[esp+20h+arg_4], eax
inc	dword ptr [eax+8]
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3D28
call	sub_650DF0

loc_7D3D28:
lea	ecx, [esp+20h+var_10]
call	sub_652830
add	dword ptr [ebp+8], 0FFFFFFFFh
jnz	short loc_7D3D3E
mov	ecx, ebp
call	sub_650DF0

loc_7D3D3E:
mov	edx, [esi]
push	0
push	0Bh
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 0
mov	ecx, [edx+280h]
push	offset aDoctypedecl ; "docTypeDecl"
call	sub_650E40
mov	[esp+20h+arg_4], eax
mov	ebp, 1
add	[eax+8], ebp
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
lea	edx, [esp+28h+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3D97
call	sub_650DF0

loc_7D3D97:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	eax, [esi]
push	0
push	5
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 0
mov	ecx, [eax+280h]
push	offset aIdmap	; "idMap"
call	sub_650E40
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3DF4
call	sub_650DF0

loc_7D3DF4:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	ecx, [esi]
push	0
push	0Bh
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 2
mov	byte ptr [esp+28h+var_C], 0
mov	ecx, [ecx+280h]
push	offset aIgnorewhite ; "ignoreWhite"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3E56
call	sub_650DF0

loc_7D3E56:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	edx, [esi]
push	0
push	6
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 0
mov	ecx, [edx+280h]
push	offset aLoaded_0 ; "loaded"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+20h+arg_8]
push	eax
lea	ecx, [esp+24h+var_10]
push	ecx
lea	edx, [esp+28h+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3EB3
call	sub_650DF0

loc_7D3EB3:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	eax, [esi]
push	0
push	6
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], 0
mov	ecx, [eax+280h]
push	offset aStatus	; "status"
call	sub_650E40
lea	ecx, [esp+20h+arg_8]
push	ecx
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+var_10]
push	edx
lea	eax, [esp+28h+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3F18
call	sub_650DF0

loc_7D3F18:
lea	ecx, [esp+20h+var_10]
call	sub_652830
mov	ecx, [esi]
push	0
push	7
mov	byte ptr [esp+28h+arg_8], 2
mov	[esp+28h+var_10], 0
mov	ecx, [ecx+280h]
push	offset aXmldecl	; "xmlDecl"
call	sub_650E40
mov	[esp+20h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+20h+arg_8]
push	edx
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [esp+28h+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+20h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D3F75
call	sub_650DF0

loc_7D3F75:
lea	ecx, [esp+20h+var_10]
call	sub_652830
lea	edx, [esp+20h+arg_8]
push	edx
push	offset sub_7D2A90
push	esi
lea	ecx, [esp+2Ch+var_10]
mov	byte ptr [esp+2Ch+arg_8], 1
call	sub_651D30
push	eax
push	offset aOndata	; "onData"
push	esi
mov	ecx, edi
call	sub_65E060
lea	ecx, [esp+20h+var_10]
call	sub_652830
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 10h
retn	0Ch
sub_7D3C60 endp

align 10h



sub_7D3FC0 proc	near
sub	ecx, 10h
jmp	sub_7D2CD0
sub_7D3FC0 endp

align 10h



sub_7D3FD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	eax, 4		; switch 5 cases
ja	short locret_7D4005 ; default
jmp	ds:off_7D4008[eax*4] ; switch jump

loc_7D3FE0:		; jumptable 007D3FD9 case 0
call	sub_7D3540
retn	4

loc_7D3FE8:		; jumptable 007D3FD9 case 1
call	sub_7D3280
retn	4

loc_7D3FF0:		; jumptable 007D3FD9 case 2
call	sub_7D3300
retn	4

loc_7D3FF8:		; jumptable 007D3FD9 case 3
call	sub_7D34F0
retn	4

loc_7D4000:		; jumptable 007D3FD9 case 4
call	sub_7D3370

locret_7D4005:		; default
retn	4
sub_7D3FD0 endp

off_7D4008 dd offset loc_7D3FE0	; jump table for switch	statement
dd offset loc_7D3FE8
dd offset loc_7D3FF0
dd offset loc_7D3FF8
dd offset loc_7D4000
align 10h



sub_7D4020 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+50h]
test	ecx, ecx
jz	short loc_7D402F
call	sub_64A400

loc_7D402F:
mov	eax, [esi+48h]
mov	ecx, [esi+44h]
push	eax
push	ecx
call	sub_7D3240
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+44h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	eax, [esi+3Ch]
mov	ecx, [esi+38h]
push	eax
push	ecx
call	sub_7D3240
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+38h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
lea	ecx, [esi+2Ch]
call	sub_7D3200
lea	ecx, [esi+10h]
call	sub_679B60
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_7D408D
call	sub_64A400

loc_7D408D:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_7D4099
call	sub_64A430

loc_7D4099:
mov	dword ptr [esi], offset	off_1456340
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_7D4020 endp

align 10h



sub_7D40B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, ecx
mov	edx, [edi+8]
test	edx, edx
jz	short loc_7D4120
mov	eax, [edi+0Ch]
mov	ebx, [esp+0Ch+arg_0]
mov	ecx, [ebx+78h]
mov	ecx, [ecx+280h]
push	eax
push	edx
call	sub_650F20
mov	esi, eax
sub	esp, 10h
mov	ecx, 1
add	[esi+8], ecx
mov	eax, esp
mov	byte ptr [eax],	5
mov	[eax+4], esi
add	[esi+8], ecx
mov	ecx, [esp+1Ch+arg_4]
push	ebx
call	sub_7D3A80
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_7D4102
mov	ecx, esi
call	sub_650DF0

loc_7D4102:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edi+8]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [edi+8], 0
pop	edi
pop	esi
pop	ebx
retn	8

loc_7D4120:
mov	ecx, [esp+0Ch+arg_4]
sub	esp, 10h
mov	eax, esp
mov	byte ptr [eax],	0
mov	eax, [esp+1Ch+arg_0]
push	eax
call	sub_7D3A80
pop	edi
pop	esi
pop	ebx
retn	8
sub_7D40B0 endp

align 10h



sub_7D4140 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_60=	byte ptr -60h
arg_0= dword ptr  4

sub	esp, 7Ch
push	ebx
push	ebp
push	esi
mov	ebx, eax
push	edi
mov	ecx, ebx
call	sub_651C20
mov	ecx, [ebx+18h]
mov	ebp, eax
call	sub_668010
mov	esi, eax
mov	eax, [esi+118h]
test	eax, eax
jnz	short loc_7D41A8
mov	eax, [ebx+18h]
mov	eax, [eax+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	40h
call	eax
test	eax, eax
jz	short loc_7D418B
push	esi
mov	ecx, eax
call	sub_7D9680
jmp	short loc_7D418D

loc_7D418B:
xor	eax, eax

loc_7D418D:
mov	edi, eax
test	eax, eax
jz	short loc_7D419E
add	eax, 8
mov	[esi+118h], eax
jmp	short loc_7D41B2

loc_7D419E:
xor	eax, eax
mov	[esi+118h], eax
jmp	short loc_7D41B2

loc_7D41A8:
add	eax, 0FFFFFFF8h
jz	short loc_7D41B0
inc	dword ptr [eax+4]

loc_7D41B0:
mov	edi, eax

loc_7D41B2:
cmp	dword ptr [ebx+1Ch], 0
mov	[esp+8Ch+var_70], 0
jle	loc_7D42B4
push	0
mov	ecx, ebx
call	sub_651EC0
push	eax
lea	ecx, [esp+90h+var_70]
call	sub_652520
mov	ecx, [ebx+18h]
call	sub_668010
mov	edx, [eax+8]
add	eax, 8
mov	ecx, eax
mov	eax, [edx+0Ch]
push	1Ch
call	eax
mov	esi, eax
test	esi, esi
jz	loc_7D429F
mov	ecx, esi
call	sub_64A430
push	1
push	ecx
mov	ecx, esi
mov	ebp, esp
call	sub_64A420
lea	ecx, [esp+94h+var_60]
mov	[ebp+0], esi
call	sub_7DA890
mov	ecx, [ebx+18h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+98h+var_7C]
push	edx
lea	ecx, [esp+9Ch+var_70]
call	sub_652F60
push	ecx
mov	eax, esp
test	edi, edi
jz	short loc_7D4234
inc	dword ptr [edi+4]

loc_7D4234:
mov	[eax], edi
mov	eax, [esp+90h+var_7C]
mov	ecx, [eax+10h]
mov	eax, [eax]
push	ecx
push	eax
lea	eax, [esp+98h+var_74]
push	eax
lea	ecx, [esp+9Ch+var_60]
call	sub_7D9CC0
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D4258
inc	dword ptr [ecx+4]

loc_7D4258:
mov	ecx, [esp+8Ch+var_74]
mov	esi, [eax]
test	ecx, ecx
jz	short loc_7D4267
call	sub_64A400

loc_7D4267:
mov	ecx, [ebx+18h]
mov	ebp, [esp+8Ch+arg_0]
push	esi
push	ecx
mov	ecx, ebp
call	sub_7D2E90
mov	eax, [esp+8Ch+var_7C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D4290
call	sub_650DF0

loc_7D4290:
lea	ecx, [esp+8Ch+var_60]
call	sub_7D4020
test	esi, esi
jnz	short loc_7D42C4
jmp	short loc_7D42BB

loc_7D429F:
test	ebp, ebp
jz	short loc_7D42B4
push	offset aXmlNoXmlParser ; "XML: No XML parser state set for movie!"...
add	ebp, 0Ch
push	ebp
call	sub_650A10
add	esp, 8

loc_7D42B4:
mov	ebp, [esp+8Ch+arg_0]

loc_7D42BB:
mov	ecx, edi
call	sub_7D8F80
mov	esi, eax

loc_7D42C4:
push	4
push	offset aNull_0	; "null"
lea	ecx, [edi+10h]
call	sub_7D93D0
push	eax
lea	ecx, [esp+90h+var_78]
call	sub_7D8DE0
mov	edx, [esp+8Ch+var_78]
push	edx
lea	ecx, [esi+0Ch]
call	sub_7D94E0
lea	ecx, [esp+8Ch+var_78]
call	sub_7D94B0
push	esi
mov	ecx, edi
mov	[ebp+38h], esi
call	sub_7D9180
mov	ecx, [ebp+34h]
mov	[esp+8Ch+var_78], eax
test	ecx, ecx
jz	short loc_7D430E
call	sub_64A400

loc_7D430E:
mov	eax, [esp+8Ch+var_78]
mov	ecx, edi
mov	[ebp+34h], eax
call	sub_7D97B0
mov	ebp, eax
mov	[esi+1Ch], ebp
mov	ecx, [ebx+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	3Ch
call	edx
test	eax, eax
jz	short loc_7D434B
mov	ecx, [ebx+18h]
push	ecx
mov	ecx, eax
call	sub_7D5670
mov	ebx, eax
jmp	short loc_7D434D

loc_7D434B:
xor	ebx, ebx

loc_7D434D:
mov	ecx, [ebp+4]
test	ecx, ecx
jz	short loc_7D4359
call	sub_64B3B0

loc_7D4359:
mov	edx, [esp+8Ch+arg_0]
mov	[ebp+4], ebx
lea	ecx, [esp+8Ch+var_70]
mov	[ebp+0], edx
call	sub_652830
mov	ecx, esi
call	sub_64A400
test	edi, edi
jz	short loc_7D4381
mov	ecx, edi
call	sub_64A400

loc_7D4381:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 7Ch
retn
sub_7D4140 endp

align 10h



sub_7D4390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D43B6
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_7D43B6:
mov	eax, [esi+8]
test	eax, eax
jz	loc_7D44D7
add	eax, 0FFFFFFF0h
jz	loc_7D44D7
push	ebx
push	edi
push	0
mov	ecx, esi
call	sub_651EC0
mov	edi, [esi+18h]
add	dword ptr [edi+8], 10h
add	edi, 8
mov	ebx, eax
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_7D43EF
mov	ecx, edi
call	sub_64B530

loc_7D43EF:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7D43FB
push	ebx
call	sub_652330

loc_7D43FB:
mov	edi, [esi+18h]
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
add	edi, 8
cmp	eax, [edi+8]
jb	short loc_7D4414
mov	ecx, edi
call	sub_64B530

loc_7D4414:
mov	edi, [edi]
mov	ebx, 1
test	edi, edi
jz	short loc_7D4425
mov	byte ptr [edi],	4
mov	[edi+4], ebx

loc_7D4425:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	0
push	7
push	offset aXmlnode	; "XMLNode"
call	sub_650E40
mov	[esp+10h+var_4], eax
add	[eax+8], ebx
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	eax, [edx+2ACh]
push	0FFFFFFFFh
push	2
lea	edx, [esp+18h+var_4]
push	edx
push	eax
call	sub_671840
mov	ecx, [esi+4]
mov	edi, eax
push	edi
call	sub_652E40
mov	esi, [esi+18h]
mov	ecx, [esi+8]
add	esi, 8
lea	eax, [ecx-20h]
cmp	eax, [esi+4]
jnb	short loc_7D44A2
push	ebp
mov	ebp, 2

loc_7D4483:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_7D449B
mov	ecx, esi
call	sub_64B660

loc_7D449B:
sub	ebp, ebx
jnz	short loc_7D4483
pop	ebp
jmp	short loc_7D44B4

loc_7D44A2:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h

loc_7D44B4:
test	edi, edi
jz	short loc_7D44BF
mov	ecx, edi
call	sub_64B3B0

loc_7D44BF:
mov	eax, [esp+10h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebx
jnz	short loc_7D44D7
call	sub_650DF0

loc_7D44D7:
pop	esi
pop	ecx
retn
sub_7D4390 endp

align 10h



sub_7D44E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D4506
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ecx
retn

loc_7D4506:
mov	eax, [esi+8]
test	eax, eax
jz	loc_7D4625
add	eax, 0FFFFFFF0h
jz	loc_7D4625
push	ebx
push	edi
push	0
mov	ecx, esi
call	sub_651EC0
mov	edi, [esi+18h]
add	dword ptr [edi+8], 10h
add	edi, 8
mov	ebx, eax
mov	eax, [edi]
cmp	eax, [edi+8]
jb	short loc_7D453F
mov	ecx, edi
call	sub_64B530

loc_7D453F:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7D454B
push	ebx
call	sub_652330

loc_7D454B:
mov	edi, [esi+18h]
add	dword ptr [edi+8], 10h
mov	eax, [edi+8]
add	edi, 8
cmp	eax, [edi+8]
jb	short loc_7D4564
mov	ecx, edi
call	sub_64B530

loc_7D4564:
mov	edi, [edi]
test	edi, edi
jz	short loc_7D4574
mov	byte ptr [edi],	4
mov	dword ptr [edi+4], 3

loc_7D4574:
mov	eax, [esi+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+280h]
push	0
push	7
push	offset aXmlnode	; "XMLNode"
call	sub_650E40
mov	[esp+10h+var_4], eax
inc	dword ptr [eax+8]
mov	ecx, [esi+18h]
mov	edx, [ecx+78h]
mov	eax, [edx+2ACh]
push	0FFFFFFFFh
push	2
lea	edx, [esp+18h+var_4]
push	edx
push	eax
call	sub_671840
mov	ecx, [esi+4]
mov	edi, eax
push	edi
call	sub_652E40
mov	esi, [esi+18h]
mov	ecx, [esi+8]
add	esi, 8
lea	eax, [ecx-20h]
cmp	eax, [esi+4]
jnb	short loc_7D45F0
mov	ebx, 2

loc_7D45D1:
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	eax, [esi]
cmp	eax, [esi+4]
jnb	short loc_7D45E9
mov	ecx, esi
call	sub_64B660

loc_7D45E9:
sub	ebx, 1
jnz	short loc_7D45D1
jmp	short loc_7D4602

loc_7D45F0:
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h
mov	ecx, [esi]
call	sub_652830
add	dword ptr [esi], 0FFFFFFF0h

loc_7D4602:
test	edi, edi
jz	short loc_7D460D
mov	ecx, edi
call	sub_64B3B0

loc_7D460D:
mov	eax, [esp+10h+var_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
pop	ebx
jnz	short loc_7D4625
call	sub_650DF0

loc_7D4625:
pop	esi
pop	ecx
retn
sub_7D44E0 endp

align 10h



sub_7D4630 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  4

sub	esp, 18h
push	esi
mov	esi, [esp+1Ch+arg_0]
push	1Ch
mov	ecx, esi
call	sub_651C40
test	al, al
jnz	short loc_7D465A
push	0
push	0
push	offset aXml_0	; "XML"
mov	ecx, esi
call	sub_651C60
pop	esi
add	esp, 18h
retn

loc_7D465A:
push	ebp
mov	ebp, [esi+8]
test	ebp, ebp
jz	loc_7D4743
add	ebp, 0FFFFFFF0h
jz	loc_7D4743
push	ebx
push	ebp
mov	eax, esi
call	sub_7D4140
mov	esi, [esi+18h]
mov	eax, [esi+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esp, 4
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_7D46A2
push	esi
mov	ecx, eax
call	sub_663BE0
mov	ebx, eax
jmp	short loc_7D46A4

loc_7D46A2:
xor	ebx, ebx

loc_7D46A4:
mov	ecx, [ebp+38h]
push	edi
mov	edi, [ecx+34h]
test	edi, edi
jz	short loc_7D46CC
nop

loc_7D46B0:
cmp	byte ptr [edi+20h], 1
jnz	short loc_7D46C5
mov	edx, [ebp+34h]
push	ebx
push	edx
push	edi
push	esi
call	sub_7D5CC0
add	esp, 10h

loc_7D46C5:
mov	edi, [edi+18h]
test	edi, edi
jnz	short loc_7D46B0

loc_7D46CC:
mov	eax, [esi+78h]
push	0
push	5
mov	[esp+28h+var_D], 2
mov	ecx, [eax+280h]
push	offset aIdmap	; "idMap"
call	sub_650E40
lea	ecx, [esp+20h+var_D]
push	ecx
mov	[esp+24h+var_C], eax
inc	dword ptr [eax+8]
lea	edi, [ebp+10h]
mov	ebp, [edi]
push	ebx
lea	ecx, [esp+28h+var_8]
call	sub_652700
push	eax
mov	eax, [ebp+0Ch]
lea	edx, [esp+28h+var_C]
push	edx
push	esi
mov	ecx, edi
call	eax
mov	eax, [esp+28h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	edi
jnz	short loc_7D4728
call	sub_650DF0

loc_7D4728:
lea	ecx, [esp+24h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_7D4742
mov	ecx, ebx
pop	ebx
pop	ebp
pop	esi
add	esp, 18h
jmp	sub_64B3B0

loc_7D4742:
pop	ebx

loc_7D4743:
pop	ebp
pop	esi
add	esp, 18h
retn
sub_7D4630 endp

align 10h



sub_7D4750 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
cmp	dword ptr [edi+8], 0
jz	short loc_7D478B
mov	ecx, [edi+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 1Ch
jnz	short loc_7D478B
mov	eax, [edi+8]
test	eax, eax
jz	short loc_7D4787
lea	esi, [eax-10h]
test	esi, esi
jz	short loc_7D47B7
mov	eax, [esi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[esi+8], eax
jmp	short loc_7D47B7

loc_7D4787:
xor	esi, esi
jmp	short loc_7D47B7

loc_7D478B:
mov	ecx, [edi+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	50h
call	edx
test	eax, eax
jz	short loc_7D47B3
mov	ecx, [edi+18h]
push	ecx
mov	ecx, eax
call	sub_7D35E0
jmp	short loc_7D47B5

loc_7D47B3:
xor	eax, eax

loc_7D47B5:
mov	esi, eax

loc_7D47B7:
push	esi
mov	eax, edi
call	sub_7D4140
add	esp, 4
pop	edi
test	esi, esi
jz	short loc_7D47CF
mov	ecx, esi
pop	esi
jmp	sub_64B3B0

loc_7D47CF:
pop	esi
retn
sub_7D4750 endp

align 10h



sub_7D47E0 proc	near

var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	byte ptr -70h
var_6C=	byte ptr -6Ch
var_60=	byte ptr -60h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 7Ch
push	ebp
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 0
push	edi
jnz	short loc_7D4816
fldz
mov	ecx, [esp+88h+arg_4]
fstp	qword ptr [ecx+40h]
fld	ds:dbl_15FCD60
fstp	qword ptr [ecx+48h]
pop	edi
pop	esi
pop	ebp
add	esp, 7Ch
mov	[esp+arg_4], 0
jmp	sub_7D3B40

loc_7D4816:
movzx	ecx, byte ptr [esi+18h]
push	ecx
push	ecx
mov	ecx, [esi+8]
mov	edi, esp
test	ecx, ecx
jz	short loc_7D482A
call	sub_64A420

loc_7D482A:
mov	edx, [esi+8]
lea	ecx, [esp+90h+var_60]
mov	[edi], edx
call	sub_7DA890
mov	eax, [esi+0Ch]
push	ecx
mov	ecx, esp
test	eax, eax
jz	short loc_7D4845
inc	dword ptr [eax+4]

loc_7D4845:
mov	[ecx], eax
mov	eax, [esi+14h]
mov	ecx, [esi+10h]
push	eax
push	ecx
lea	edx, [esp+94h+var_78]
push	edx
lea	ecx, [esp+98h+var_60]
call	sub_7D9CC0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+10h]
mov	eax, [eax+30h]
push	edx
call	eax
mov	eax, [esp+88h+var_78]
mov	edi, [esp+88h+arg_4]
mov	dword ptr [esi+10h], 0
mov	[edi+38h], eax
mov	ecx, [esi+0Ch]
push	eax
call	sub_7D9180
mov	ecx, [edi+34h]
mov	ebp, eax
test	ecx, ecx
jz	short loc_7D489A
call	sub_64A400

loc_7D489A:
mov	[edi+34h], ebp
mov	ecx, [esi+0Ch]
call	sub_7D97B0
mov	esi, eax
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_7D48B3
call	sub_64B3B0

loc_7D48B3:
mov	ebp, [esp+88h+arg_0]
mov	dword ptr [esi+4], 0
mov	[esi], edi
mov	ecx, [esp+88h+var_78]
mov	[ecx+1Ch], esi
mov	edx, [esp+88h+var_78]
push	edx
push	ebp
mov	ecx, edi
call	sub_7D2E90
cmp	byte ptr [esp+88h+var_C+1], 0
jz	short loc_7D4910
cmp	[esp+88h+var_8], 0
jnz	short loc_7D4910
mov	eax, [esp+88h+var_4]
fild	[esp+88h+var_4]
test	eax, eax
jge	short loc_7D4900
fadd	ds:dbl_15FCE08

loc_7D4900:
fstp	qword ptr [edi+40h]
push	0
fld	ds:dbl_15FCD60
jmp	loc_7D49AF

loc_7D4910:
mov	ecx, [ebp+78h]
push	0
mov	al, 2
lea	esi, [ebp+78h]
push	6
mov	byte ptr [esp+90h+var_7C+3], al
mov	[esp+90h+var_70], al
mov	[esp+90h+var_6C], 1
mov	ecx, [ecx+280h]
push	offset aLoaded_0 ; "loaded"
call	sub_650E40
mov	[esp+88h+var_74], eax
inc	dword ptr [eax+8]
mov	edx, [edi+10h]
mov	edx, [edx+28h]
lea	eax, [esp+88h+var_7C+3]
push	eax
lea	eax, [esp+8Ch+var_70]
push	eax
lea	ecx, [edi+10h]
lea	eax, [esp+90h+var_74]
push	eax
push	esi
call	edx
mov	eax, [esp+88h+var_74]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D4971
call	sub_650DF0

loc_7D4971:
lea	ecx, [esp+88h+var_70]
call	sub_652830
fild	[esp+88h+var_4]
mov	eax, [esp+88h+var_4]
test	eax, eax
jge	short loc_7D4992
fadd	ds:dbl_15FCE08

loc_7D4992:
mov	ecx, [esp+88h+var_8]
fstp	qword ptr [edi+40h]
fild	[esp+88h+var_8]
test	ecx, ecx
jge	short loc_7D49AD
fadd	ds:dbl_15FCE08

loc_7D49AD:
push	1

loc_7D49AF:
push	ebp
fstp	qword ptr [edi+48h]
mov	ecx, edi
call	sub_7D3B40
mov	ecx, [esp+88h+var_78]
test	ecx, ecx
jz	short loc_7D49C7
call	sub_64A400

loc_7D49C7:
lea	ecx, [esp+88h+var_60]
call	sub_7D4020
pop	edi
pop	esi
pop	ebp
add	esp, 7Ch
retn	8
sub_7D47E0 endp

align 10h



sub_7D49E0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_4]
mov	eax, [esi+68h]
push	edi
push	ecx
mov	ecx, esp
mov	[ecx], eax
inc	dword ptr [eax+8]
mov	ecx, esi
call	sub_66F480
xor	edi, edi
cmp	eax, edi
jnz	short loc_7D4A3D
lea	eax, [esp+28h+var_10]
push	esi
push	eax
call	sub_7D77D0
add	esp, 8
test	byte ptr [esp+28h+var_8], 2
jnz	short loc_7D4A25
mov	ecx, [esp+28h+var_10]
cmp	ecx, edi
jz	short loc_7D4A25
call	sub_64B3B0

loc_7D4A25:
test	byte ptr [esp+28h+var_8], 1
mov	[esp+28h+var_10], edi
jnz	short loc_7D4A3D
mov	ecx, [esp+28h+var_C]
cmp	ecx, edi
jz	short loc_7D4A3D
call	sub_64B3B0

loc_7D4A3D:
mov	ecx, [esi+294h]
mov	[esp+28h+var_18], esi
mov	[esp+28h+var_14], 8
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	38h
call	eax
mov	ebx, eax
cmp	ebx, edi
jz	short loc_7D4A7C
push	offset sub_7D4750
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, ebx
call	sub_67C3D0
mov	dword ptr [ebx], offset	off_14565B0
mov	dword ptr [ebx+10h], offset off_1439710
jmp	short loc_7D4A7E

loc_7D4A7C:
xor	ebx, ebx

loc_7D4A7E:
mov	ebp, [esp+28h+arg_0]
mov	byte ptr [ebp+8], 0
mov	[ebp+0], ebx
mov	[ebp+4], edi
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	70h
call	eax
mov	ebx, eax
cmp	ebx, edi
jz	loc_7D4B54
push	ebp
push	18h
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+30h+var_18]
push	ecx
mov	ecx, ebx
call	sub_7D3C60
mov	ebx, eax
cmp	ebx, edi
jz	short loc_7D4AD0
mov	edx, [ebx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ebx+8], edx

loc_7D4AD0:
lea	eax, [esp+28h+arg_4]
push	eax
lea	ecx, [esp+2Ch+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+30h+arg_4], ebx
mov	[esp+30h+arg_0], 17h
call	sub_661470
mov	ecx, [esp+28h+arg_4]
cmp	ecx, edi
jz	short loc_7D4AFE
call	sub_64B3B0

loc_7D4AFE:
mov	eax, [esi+2ACh]
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	edi, [eax]
push	edx
push	ebp
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	edi, 28h
call	sub_651E70
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [edi]
push	eax
add	esi, 64h
push	esi
lea	eax, [esp+34h+var_18]
push	eax
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
test	ebx, ebx
jz	short loc_7D4B4A
mov	ecx, ebx
call	sub_64B3B0

loc_7D4B4A:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_7D4B54:
xor	ebx, ebx
jmp	loc_7D4AD0
sub_7D49E0 endp

align 10h



sub_7D4B60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
add	ecx, 28h
push	ecx
mov	ecx, esi
call	sub_7D8DE0
mov	eax, esi
pop	esi
retn	4
sub_7D4B60 endp

align 10h



sub_7D4B80 proc	near

arg_0= dword ptr  4

push	ebx
push	edi
mov	edi, [esp+8+arg_0]
push	1Dh
mov	ecx, edi
call	sub_651C40
push	1Ch
mov	ecx, edi
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D4BB5
test	al, al
jnz	short loc_7D4BB5
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	ebx
retn

loc_7D4BB5:
mov	ebx, [edi+8]
test	ebx, ebx
jz	short loc_7D4BF8
add	ebx, 0FFFFFFF0h
jz	short loc_7D4BF8
push	esi
mov	esi, [edi+4]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	2
mov	byte ptr [esi+4], 0
mov	ecx, [ebx+38h]
pop	esi
test	ecx, ecx
jz	short loc_7D4BF8
cmp	byte ptr [ecx+20h], 1
jnz	short loc_7D4BF8
call	sub_7DAA30
mov	edi, [edi+4]
mov	ecx, edi
mov	bl, al
call	sub_652060
mov	byte ptr [edi],	2
mov	[edi+4], bl

loc_7D4BF8:
pop	edi
pop	ebx
retn
sub_7D4B80 endp

align 10h



sub_7D4C00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	0FFFFFFFFh
push	offset asc_154D868 ; " "
call	sub_679D10
mov	eax, [esp+4+arg_0]
mov	ecx, [eax]
mov	edx, [ecx]
mov	ecx, [esi+8]
push	0FFFFFFFFh
push	edx
call	sub_679D10
mov	ecx, [esi+8]
push	0FFFFFFFFh
push	offset asc_154D88C ; "=\""
call	sub_679D10
mov	eax, [esi+4]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+10h+arg_0]
push	ecx
mov	ecx, [esp+14h+arg_4]
call	sub_652F60
mov	edx, [esp+4+arg_0]
mov	eax, [edx]
mov	ecx, [esi+8]
push	0FFFFFFFFh
push	eax
call	sub_679D10
mov	eax, [esp+4+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D4C71
call	sub_650DF0

loc_7D4C71:
mov	ecx, [esi+8]
push	0FFFFFFFFh
push	offset asc_154D890 ; "\""
call	sub_679D10
pop	esi
retn	0Ch
sub_7D4C00 endp

align 10h



sub_7D4C90 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+38h]
mov	dword ptr [esi], offset	off_1456494
mov	dword ptr [esi+10h], offset off_1456440
test	eax, eax
jz	short loc_7D4CB4
mov	eax, [eax+1Ch]
test	eax, eax
jz	short loc_7D4CB4
mov	dword ptr [eax], 0

loc_7D4CB4:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D4CC0
call	sub_64A400

loc_7D4CC0:
mov	ecx, esi
pop	esi
jmp	sub_664A30
sub_7D4C90 endp

align 10h



sub_7D4CD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+10h+arg_4]
push	ecx
mov	ecx, [esp+14h+arg_4]
call	sub_652F60
mov	edx, [esi+8]
mov	eax, [esp+4+arg_4]
cmp	eax, [edx]
jnz	short loc_7D4D2C
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi]
mov	eax, [ecx]
push	5		; size_t
push	offset aXmlns	; "xmlns"
push	eax		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jnz	short loc_7D4D2B
mov	esi, [esi+0Ch]
cmp	byte ptr [esi],	5
jb	short loc_7D4D20
mov	ecx, esi
call	sub_652060

loc_7D4D20:
mov	byte ptr [esi],	5
mov	eax, [edi]
mov	[esi+4], eax
inc	dword ptr [eax+8]

loc_7D4D2B:
pop	edi

loc_7D4D2C:
mov	eax, [esp+4+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
pop	esi
jnz	short locret_7D4D43
call	sub_650DF0

locret_7D4D43:
retn	0Ch
sub_7D4CD0 endp

align 10h



sub_7D4D50 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	1Dh
mov	ecx, esi
call	sub_651C40
push	1Ch
mov	ecx, esi
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D4D85
test	al, al
jnz	short loc_7D4D85
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ebx
retn

loc_7D4D85:
mov	esi, [esi+8]
test	esi, esi
jz	short loc_7D4DC6
add	esi, 0FFFFFFF0h
jz	short loc_7D4DC6
mov	eax, [esi+38h]
test	eax, eax
jz	short loc_7D4DC6
push	edi
mov	edi, [eax+10h]
test	edi, edi
jz	short loc_7D4DC5
mov	ecx, [edi+8]
push	eax
call	sub_7D9180
mov	ecx, [esi+34h]
mov	ebx, eax
test	ecx, ecx
jz	short loc_7D4DB7
call	sub_64A400

loc_7D4DB7:
mov	[esi+34h], ebx
mov	eax, [esi+38h]
push	eax
mov	ecx, edi
call	sub_7DAC00

loc_7D4DC5:
pop	edi

loc_7D4DC6:
pop	esi
pop	ebx
retn
sub_7D4D50 endp

align 10h



sub_7D4DD0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 2Ch
push	ebx
mov	ebx, [esp+30h+arg_4]
movzx	eax, byte ptr [ebx+20h]
sub	eax, 1
jz	short loc_7D4DF7
mov	eax, [ebx+0Ch]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, [esp+38h+arg_8]
call	sub_679D10
pop	ebx
add	esp, 2Ch
retn

loc_7D4DF7:
push	ebp
push	esi
push	edi
mov	edi, [ebx+1Ch]
test	edi, edi
jz	loc_7D4F54
mov	eax, [edi]
test	eax, eax
jz	loc_7D4F54
mov	edx, [eax+10h]
lea	ecx, [eax+10h]
mov	eax, [edx+8]
call	eax
cmp	eax, 1Ch
jnz	loc_7D4F54
mov	esi, [edi]
mov	ebp, [esp+3Ch+arg_0]
lea	ecx, [esp+3Ch+var_20]
push	ecx
mov	byte ptr [esp+40h+var_20], 0
mov	edi, [esi+10h]
add	esi, 10h
push	offset aXmldecl	; "xmlDecl"
lea	edx, [esp+44h+var_28]
lea	ebx, [ebp+78h]
push	edx
mov	ecx, ebx
add	edi, 10h
call	sub_4E4640
push	eax
mov	eax, [edi]
push	ebp
mov	ecx, esi
call	eax
mov	eax, [esp+3Ch+var_28]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D4E6E
call	sub_650DF0

loc_7D4E6E:
mov	al, byte ptr [esp+3Ch+var_20]
test	al, al
jz	loc_7D4F22
cmp	al, 0Ah
jz	loc_7D4F22
push	0
push	0FFFFFFFFh
push	ebp
lea	ecx, [esp+48h+var_2C]
push	ecx
lea	ecx, [esp+4Ch+var_20]
call	sub_652F60
mov	edx, [esp+3Ch+var_2C]
mov	eax, [edx]
mov	ecx, [esp+3Ch+arg_8]
push	0FFFFFFFFh
push	eax
call	sub_679D10
mov	eax, [esp+3Ch+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D4EBD
call	sub_650DF0

loc_7D4EBD:
mov	edi, [esi]
lea	ecx, [esp+3Ch+var_10]
push	ecx
push	offset aIgnorewhite ; "ignoreWhite"
lea	edx, [esp+44h+var_24]
push	edx
mov	ecx, ebx
mov	byte ptr [esp+48h+var_10], 0
add	edi, 10h
call	sub_4E4640
push	eax
mov	eax, [edi]
push	ebp
mov	ecx, esi
call	eax
mov	eax, [esp+3Ch+var_24]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D4EFB
call	sub_650DF0

loc_7D4EFB:
push	ebp
lea	ecx, [esp+40h+var_10]
call	sub_651D80
test	al, al
jnz	short loc_7D4F19
mov	ecx, [esp+3Ch+arg_8]
push	0FFFFFFFFh
push	offset asc_154D83C ; "\n"
call	sub_679D10

loc_7D4F19:
lea	ecx, [esp+3Ch+var_10]
call	sub_652830

loc_7D4F22:
mov	ecx, [esp+3Ch+arg_4]
mov	esi, [ecx+34h]
test	esi, esi
jz	short loc_7D4F43
mov	edi, [esp+3Ch+arg_8]

loc_7D4F31:
push	edi
push	esi
push	ebp
call	sub_7D4DD0
mov	esi, [esi+18h]
add	esp, 0Ch
test	esi, esi
jnz	short loc_7D4F31

loc_7D4F43:
lea	ecx, [esp+3Ch+var_20]
call	sub_652830
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn

loc_7D4F54:
mov	esi, [esp+3Ch+arg_8]
push	0FFFFFFFFh
push	offset asc_154D93C ; "<"
mov	ecx, esi
call	sub_679D10
mov	eax, [ebx+24h]
cmp	dword ptr [eax+0Ch], 0
jbe	short loc_7D4F89
mov	edx, [eax]
push	0FFFFFFFFh
push	edx
mov	ecx, esi
call	sub_679D10
push	0FFFFFFFFh
push	offset word_1545F80
mov	ecx, esi
call	sub_679D10

loc_7D4F89:
mov	eax, [ebx+0Ch]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, esi
call	sub_679D10
mov	ebp, [esp+3Ch+arg_0]
test	edi, edi
jz	short loc_7D4FD0
mov	edi, [edi+4]
test	edi, edi
jz	short loc_7D4FD0
push	0
push	0
lea	eax, [esp+44h+var_20]
lea	ecx, [edi+10h]
push	eax
mov	[esp+48h+var_20], offset off_1456730
mov	[esp+48h+var_1C], ebp
mov	[esp+48h+var_18], esi
mov	edx, [ecx]
mov	edx, [edx+20h]
lea	eax, [ebp+78h]
push	eax
call	edx
jmp	short loc_7D5025

loc_7D4FD0:
mov	edi, [ebx+2Ch]
test	edi, edi
jz	short loc_7D5025

loc_7D4FD7:
push	0FFFFFFFFh
push	offset asc_154D868 ; " "
mov	ecx, esi
call	sub_679D10
mov	eax, [edi]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, esi
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D88C ; "=\""
mov	ecx, esi
call	sub_679D10
mov	edx, [edi+4]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
mov	ecx, esi
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D890 ; "\""
mov	ecx, esi
call	sub_679D10
mov	edi, [edi+8]
test	edi, edi
jnz	short loc_7D4FD7

loc_7D5025:
mov	ecx, ebx
call	sub_7DAA30
push	0FFFFFFFFh
mov	ecx, esi
test	al, al
jz	short loc_7D503B
push	offset asc_154D870 ; ">"
jmp	short loc_7D5040

loc_7D503B:		; " />"
push	offset asc_154D86C

loc_7D5040:
call	sub_679D10
mov	edi, [ebx+34h]
test	edi, edi
jz	short loc_7D5062
lea	esp, [esp+0]

loc_7D5050:
push	esi
push	edi
push	ebp
call	sub_7D4DD0
mov	edi, [edi+18h]
add	esp, 0Ch
test	edi, edi
jnz	short loc_7D5050

loc_7D5062:
mov	ecx, ebx
call	sub_7DAA30
test	al, al
jz	short loc_7D50BB
push	0FFFFFFFFh
push	offset asc_154D940 ; "</"
mov	ecx, esi
call	sub_679D10
mov	eax, [ebx+24h]
cmp	dword ptr [eax+0Ch], 0
jbe	short loc_7D509E
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
mov	ecx, esi
call	sub_679D10
push	0FFFFFFFFh
push	offset word_1545F80
mov	ecx, esi
call	sub_679D10

loc_7D509E:
mov	edx, [ebx+0Ch]
mov	eax, [edx]
push	0FFFFFFFFh
push	eax
mov	ecx, esi
call	sub_679D10
push	0FFFFFFFFh
push	offset asc_154D870 ; ">"
mov	ecx, esi
call	sub_679D10

loc_7D50BB:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn
sub_7D4DD0 endp

align 10h



sub_7D50D0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
arg_0= dword ptr  4

sub	esp, 18h
push	ebx
push	edi
mov	edi, [esp+20h+arg_0]
push	1Dh
mov	ecx, edi
call	sub_651C40
push	1Ch
mov	ecx, edi
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D510B
test	al, al
jnz	short loc_7D510B
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	ebx
add	esp, 18h
retn

loc_7D510B:
mov	eax, [edi+8]
test	eax, eax
jz	loc_7D51E0
push	esi
lea	esi, [eax-10h]
test	esi, esi
jz	loc_7D51DF
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esp+28h+var_18]
call	sub_679B40
mov	eax, [esi+38h]
test	eax, eax
jz	loc_7D51C9
mov	ebx, 1
cmp	[eax+20h], bl
jnz	short loc_7D515A
mov	edx, [edi+18h]
lea	ecx, [esp+24h+var_18]
push	ecx
push	eax
push	edx
call	sub_7D4DD0
add	esp, 0Ch
jmp	short loc_7D516B

loc_7D515A:
mov	eax, [eax+0Ch]
mov	ecx, [eax]
push	0FFFFFFFFh
push	ecx
lea	ecx, [esp+2Ch+var_18]
call	sub_679D10

loc_7D516B:
mov	eax, [esp+24h+var_18]
test	eax, eax
jnz	short loc_7D5178
mov	eax, offset byte_146D660

loc_7D5178:
mov	edx, [edi+18h]
mov	ecx, [edx+78h]
mov	edx, [esp+24h+var_14]
mov	ecx, [ecx+280h]
push	edx
push	eax
call	sub_650F20
mov	esi, eax
add	[esi+8], ebx
mov	edi, [edi+4]
cmp	byte ptr [edi],	5
jb	short loc_7D51A3
mov	ecx, edi
call	sub_652060

loc_7D51A3:
mov	byte ptr [edi],	5
mov	[edi+4], esi
add	[esi+8], ebx
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_7D51D6
mov	ecx, esi
call	sub_650DF0
lea	ecx, [esp+24h+var_18]
call	sub_679B60
pop	esi
pop	edi
pop	ebx
add	esp, 18h
retn

loc_7D51C9:
mov	edi, [edi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	0

loc_7D51D6:
lea	ecx, [esp+24h+var_18]
call	sub_679B60

loc_7D51DF:
pop	esi

loc_7D51E0:
pop	edi
pop	ebx
add	esp, 18h
retn
sub_7D50D0 endp

align 10h



sub_7D51F0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+3Ch]
mov	dword ptr [esi], offset	off_14567A4
mov	dword ptr [esi+10h], offset off_1456750
mov	dword ptr [ecx], offset	off_1456748
call	sub_665A40
mov	eax, [esi+38h]
mov	dword ptr [esi], offset	off_1456494
mov	dword ptr [esi+10h], offset off_1456440
test	eax, eax
jz	short loc_7D522F
mov	eax, [eax+1Ch]
test	eax, eax
jz	short loc_7D522F
mov	dword ptr [eax], 0

loc_7D522F:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D523B
call	sub_64A400

loc_7D523B:
mov	ecx, esi
pop	esi
jmp	sub_664A30
sub_7D51F0 endp

align 10h



sub_7D5250 proc	near

arg_0= byte ptr	 4

sub	ecx, 3Ch
jmp	loc_7D52D0
align 10h

loc_7D5260:
sub	ecx, 10h
jmp	loc_7D52D0
align 10h

loc_7D5270:
push	esi
mov	esi, ecx
mov	eax, [esi+58h]
test	eax, eax
jz	short loc_7D529B
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [eax]
mov	edx, [edx+30h]
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+58h]
mov	eax, [eax+30h]
push	edx
call	eax

loc_7D529B:
mov	eax, [esi+38h]
test	eax, eax
jz	short loc_7D52AF
mov	eax, [eax+1Ch]
test	eax, eax
jz	short loc_7D52AF
mov	dword ptr [eax], 0

loc_7D52AF:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D52BB
call	sub_64A400

loc_7D52BB:
mov	dword ptr [esi+34h], 0
mov	ecx, esi
pop	esi
jmp	sub_664580
align 10h

loc_7D52D0:
push	esi
mov	esi, ecx
call	sub_7D51F0
test	[esp+4+arg_0], 1
jz	short loc_7D52ED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D52ED:
mov	eax, esi
pop	esi
retn	4
sub_7D5250 endp

align 10h



sub_7D5300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	edi
mov	edi, [esp+0Ch+arg_0]
push	1Dh
mov	ecx, edi
call	sub_651C40
push	1Ch
mov	ecx, edi
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D5337
test	al, al
jnz	short loc_7D5337
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, edi
call	sub_651C60
pop	edi
pop	ebx
pop	ecx
retn

loc_7D5337:
mov	eax, [edi+8]
test	eax, eax
jz	loc_7D5498
push	ebp
lea	ebp, [eax-10h]
mov	[esp+10h+var_4], ebp
test	ebp, ebp
jz	loc_7D5497
mov	ebx, [ebp+38h]
test	ebx, ebx
jz	loc_7D5497
cmp	byte ptr [ebx+20h], 1
jnz	loc_7D5497
cmp	dword ptr [edi+1Ch], 1
jle	loc_7D5497
mov	eax, [edi+18h]
push	esi
push	eax
push	0
mov	ecx, edi
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	ecx, [edi+18h]
push	ecx
push	1
mov	ecx, edi
mov	esi, eax
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	edi, eax
test	esi, esi
jz	loc_7D5496
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 1Dh
jnz	loc_7D5496
test	edi, edi
jz	loc_7D5443
mov	edx, [edi+10h]
mov	eax, [edx+8]
lea	ecx, [edi+10h]
call	eax
cmp	eax, 1Dh
jnz	short loc_7D5443
mov	eax, [edi+38h]
test	eax, eax
jz	short loc_7D5443
mov	eax, [eax+10h]
test	eax, eax
jz	short loc_7D5443
cmp	eax, ebx
jnz	short loc_7D5443
mov	ebp, [esi+38h]
test	ebp, ebp
jz	loc_7D5496
inc	dword ptr [ebp+4]
mov	ecx, [esi+38h]
cmp	dword ptr [ecx+10h], 0
jz	short loc_7D5406
mov	eax, ecx
mov	ecx, [eax+10h]
push	eax
call	sub_7DAC00

loc_7D5406:
mov	edx, [edi+38h]
mov	eax, [esi+38h]
push	edx
push	eax
mov	ecx, ebx
call	sub_7DA9D0
mov	edi, [esp+14h+var_4]
mov	eax, [edi+34h]
test	eax, eax
jz	short loc_7D5423
inc	dword ptr [eax+4]

loc_7D5423:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D542F
call	sub_64A400

loc_7D542F:
mov	ecx, [edi+34h]
mov	[esi+34h], ecx
pop	esi
mov	ecx, ebp
pop	ebp
pop	edi
pop	ebx
add	esp, 4
jmp	sub_64A400

loc_7D5443:
mov	edi, [esi+38h]
test	edi, edi
jz	short loc_7D5496
inc	dword ptr [edi+4]
mov	edx, [esi+38h]
cmp	dword ptr [edx+10h], 0
jz	short loc_7D5461
mov	eax, edx
mov	ecx, [eax+10h]
push	eax
call	sub_7DAC00

loc_7D5461:
mov	eax, [esi+38h]
push	eax
mov	ecx, ebx
call	sub_7DA970
mov	eax, [ebp+34h]
test	eax, eax
jz	short loc_7D5476
inc	dword ptr [eax+4]

loc_7D5476:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D5482
call	sub_64A400

loc_7D5482:
mov	ecx, [ebp+34h]
mov	[esi+34h], ecx
pop	esi
pop	ebp
mov	ecx, edi
pop	edi
pop	ebx
add	esp, 4
jmp	sub_64A400

loc_7D5496:
pop	esi

loc_7D5497:
pop	ebp

loc_7D5498:
pop	edi
pop	ebx
pop	ecx
retn
sub_7D5300 endp

align 10h



sub_7D54A0 proc	near
push	edi
mov	edi, ecx
call	sub_662DF0
lea	ecx, [edi+40h]
call	sub_67C210
lea	ecx, [edi+4Ch]
call	sub_67C210
mov	eax, [edi+58h]
test	eax, eax
jz	short loc_7D54EA
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_7D54E8
lea	ebx, [ebx+0]

loc_7D54D0:
mov	eax, [edi+58h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D54E3
call	sub_64B020

loc_7D54E3:
inc	esi
cmp	esi, ebx
jb	short loc_7D54D0

loc_7D54E8:
pop	esi
pop	ebx

loc_7D54EA:
pop	edi
retn
sub_7D54A0 endp

align 10h



sub_7D54F0 proc	near
push	edi
mov	edi, ecx
call	sub_662CF0
lea	ecx, [edi+40h]
call	sub_67C1F0
lea	ecx, [edi+4Ch]
call	sub_67C1F0
mov	eax, [edi+58h]
test	eax, eax
jz	short loc_7D553A
push	ebx
mov	ebx, [eax+4]
push	esi
xor	esi, esi
test	ebx, ebx
jbe	short loc_7D5538
lea	ebx, [ebx+0]

loc_7D5520:
mov	eax, [edi+58h]
mov	ecx, [eax]
lea	eax, [ecx+esi*4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7D5533
call	sub_64B3B0

loc_7D5533:
inc	esi
cmp	esi, ebx
jb	short loc_7D5520

loc_7D5538:
pop	esi
pop	ebx

loc_7D553A:
pop	edi
retn
sub_7D54F0 endp

align 10h



sub_7D5540 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_0]
mov	eax, [ebp+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
mov	esi, [esp+24h+arg_4]
push	edi
mov	edi, [esi+1Ch]
push	0
push	34h
mov	[esp+30h+var_14], edi
call	eax
test	eax, eax
jz	short loc_7D557A
push	ebp
mov	ecx, eax
call	sub_663BE0
mov	ebx, eax
jmp	short loc_7D557C

loc_7D557A:
xor	ebx, ebx

loc_7D557C:
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7D5588
call	sub_64B3B0

loc_7D5588:
mov	ecx, esi
mov	[edi+4], ebx
call	sub_7DA960
test	al, al
jz	loc_7D565C
mov	ebx, [esi+2Ch]
test	ebx, ebx
jz	loc_7D564E
jmp	short loc_7D55AB

loc_7D55A7:
mov	edi, [esp+28h+var_14]

loc_7D55AB:
mov	ecx, [ebx+4]
mov	eax, [ecx]
mov	edx, [ebp+78h]
mov	ecx, [edx+280h]
push	eax
call	sub_651000
mov	esi, eax
mov	eax, 1
add	[esi+8], eax
mov	byte ptr [esp+28h+var_10], 5
mov	[esp+28h+var_C], esi
add	[esi+8], eax
mov	eax, [ebx]
mov	ecx, [ebp+78h]
mov	edi, [edi+4]
mov	byte ptr [esp+28h+arg_0], 0
mov	eax, [eax]
mov	ecx, [ecx+280h]
push	eax
add	edi, 10h
call	sub_651000
mov	[esp+28h+var_18], eax
inc	dword ptr [eax+8]
mov	edx, [edi]
mov	edx, [edx+0Ch]
lea	eax, [esp+28h+arg_0]
push	eax
lea	ecx, [esp+2Ch+var_10]
push	ecx
lea	eax, [esp+30h+var_18]
push	eax
push	ebp
mov	ecx, edi
call	edx
mov	eax, [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D5629
call	sub_650DF0

loc_7D5629:
lea	ecx, [esp+28h+var_10]
call	sub_652830
add	dword ptr [esi+8], 0FFFFFFFFh
jnz	short loc_7D563F
mov	ecx, esi
call	sub_650DF0

loc_7D563F:
mov	ebx, [ebx+8]
test	ebx, ebx
jnz	loc_7D55A7
mov	esi, [esp+28h+arg_4]

loc_7D564E:
pop	edi
mov	ecx, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
jmp	sub_7DAA40

loc_7D565C:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_7D5540 endp

align 10h



sub_7D5670 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_663BE0
xor	eax, eax
mov	dword ptr [esi], offset	off_1456494
lea	edi, [esi+10h]
mov	dword ptr [edi], offset	off_1456440
mov	[esi+34h], eax
mov	[esi+38h], eax
mov	ecx, [ebx+78h]
add	ebx, 78h
push	18h
call	sub_66FB00
push	eax
push	ebx
mov	ecx, edi
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_7D5670 endp

align 10h



sub_7D56C0 proc	near

var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	qword ptr -30h
var_28=	qword ptr -28h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 44h
push	ebx
mov	ebx, [esp+48h+arg_0]
cmp	dword ptr [ebx+8], 0
push	ebp
push	esi
push	edi
jz	short loc_7D570F
mov	ecx, [ebx+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 1Dh
jz	short loc_7D56EF
mov	ecx, [ebx+8]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
cmp	eax, 1Ch
jnz	short loc_7D570F

loc_7D56EF:
mov	edi, [ebx+8]
test	edi, edi
jz	short loc_7D570B
add	edi, 0FFFFFFF0h
test	edi, edi
jz	short loc_7D573B
mov	eax, [edi+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[edi+8], eax
jmp	short loc_7D573B

loc_7D570B:
xor	edi, edi
jmp	short loc_7D573B

loc_7D570F:
mov	ecx, [ebx+18h]
mov	edx, [ecx+78h]
mov	ecx, [edx+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	3Ch
call	edx
test	eax, eax
jz	short loc_7D5737
mov	ecx, [ebx+18h]
push	ecx
mov	ecx, eax
call	sub_7D5670
jmp	short loc_7D5739

loc_7D5737:
xor	eax, eax

loc_7D5739:
mov	edi, eax

loc_7D573B:
mov	ecx, ebx
call	sub_651C20
cmp	dword ptr [ebx+1Ch], 0
mov	esi, eax
mov	[esp+54h+var_10], 0
mov	[esp+54h+var_20], 0
jle	loc_7D5AD3
push	0
mov	ecx, ebx
call	sub_651EC0
push	eax
lea	ecx, [esp+58h+var_10]
call	sub_652520
cmp	dword ptr [ebx+1Ch], 1
jle	short loc_7D5784
push	1
mov	ecx, ebx
call	sub_651EC0
push	eax
lea	ecx, [esp+58h+var_20]
call	sub_652520

loc_7D5784:
mov	al, [esp+54h+var_10]
test	al, al
jz	loc_7D5AD3
cmp	al, 0Ah
jz	loc_7D5AD3
mov	edx, [ebx+18h]
push	edx
lea	ecx, [esp+58h+var_10]
call	sub_653400
fstp	[esp+54h+var_28]
mov	al, [esp+54h+var_20]
test	al, al
jz	loc_7D5ABC
cmp	al, 0Ah
jz	loc_7D5ABC
mov	ecx, [ebx+18h]
call	sub_668010
mov	ebp, eax
mov	eax, [ebp+118h]
test	eax, eax
jnz	short loc_7D5813
mov	eax, [ebx+18h]
mov	ecx, [eax+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	40h
call	eax
test	eax, eax
jz	short loc_7D57F6
push	ebp
mov	ecx, eax
call	sub_7D9680
jmp	short loc_7D57F8

loc_7D57F6:
xor	eax, eax

loc_7D57F8:
mov	esi, eax
test	eax, eax
jz	short loc_7D5809
add	eax, 8
mov	[ebp+118h], eax
jmp	short loc_7D581D

loc_7D5809:
xor	eax, eax
mov	[ebp+118h], eax
jmp	short loc_7D581D

loc_7D5813:
lea	esi, [eax-8]
test	esi, esi
jz	short loc_7D581D
inc	dword ptr [esi+4]

loc_7D581D:
lea	ebp, [esi+28h]
push	ebp
lea	ecx, [esp+58h+var_40]
call	sub_7D8DE0
push	ebp
lea	ecx, [esp+58h+var_38]
call	sub_7D8DE0
mov	ecx, [ebx+18h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+60h+var_3C]
push	edx
lea	ecx, [esp+64h+var_20]
call	sub_652F60
fld1
fld	[esp+54h+var_28]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	loc_7D594D
mov	eax, [esp+54h+var_3C]
fstp	st
mov	eax, [eax]
push	3Ah		; int
push	eax		; char *
call	_strchr
mov	ebp, eax
add	esp, 8
test	ebp, ebp
jz	short loc_7D58DA
mov	ecx, [esp+54h+var_3C]
mov	eax, [ecx]
mov	edx, ebp
sub	edx, eax
push	edx
push	eax
lea	eax, [esp+5Ch+var_44]
push	eax
mov	ecx, esi
call	sub_7D2A60
mov	ecx, [eax]
push	ecx
lea	ecx, [esp+58h+var_38]
call	sub_7D94E0
lea	ecx, [esp+54h+var_44]
call	sub_7D94B0
mov	eax, ebp
lea	edx, [eax+1]
lea	ebx, [ebx+0]

loc_7D58B0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7D58B0
sub	eax, edx
push	eax
inc	ebp
push	ebp
lea	edx, [esp+5Ch+var_34]
push	edx
mov	ecx, esi
call	sub_7D2A60
mov	eax, [eax]
push	eax
lea	ecx, [esp+58h+var_40]
call	sub_7D94E0
lea	ecx, [esp+54h+var_34]
jmp	short loc_7D5901

loc_7D58DA:
mov	eax, [esp+54h+var_3C]
mov	ecx, [eax+10h]
mov	eax, [eax]
push	ecx
push	eax
lea	ecx, [esp+5Ch+var_30]
push	ecx
mov	ecx, esi
call	sub_7D2A60
mov	edx, [eax]
push	edx
lea	ecx, [esp+58h+var_40]
call	sub_7D94E0
lea	ecx, [esp+54h+var_30]

loc_7D5901:
call	sub_7D94B0
push	ecx
lea	eax, [esp+58h+var_40]
mov	ecx, esp
push	eax
call	sub_7D8DF0
mov	ecx, esi
call	sub_7D96D0
mov	ebp, eax
push	ebp
mov	ecx, esi
mov	[edi+38h], ebp
call	sub_7D9180
mov	ecx, [edi+34h]
mov	ebx, eax
test	ecx, ecx
jz	short loc_7D5935
call	sub_64A400

loc_7D5935:
mov	ecx, [esp+54h+var_38]
push	ecx
mov	[edi+34h], ebx
mov	ecx, [edi+38h]
add	ecx, 24h
call	sub_7D94E0
jmp	loc_7D5A1A

loc_7D594D:
fld	ds:dbl_15FCD78
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7D59BC
mov	eax, [esp+54h+var_3C]
mov	ecx, [eax+10h]
mov	eax, [eax]
push	ecx
push	eax
lea	edx, [esp+5Ch+var_30+4]
push	edx
mov	ecx, esi
call	sub_7D2A60
mov	eax, [eax]
push	eax
lea	ecx, [esp+58h+var_40]
call	sub_7D94E0
lea	ecx, [esp+54h+var_30+4]
call	sub_7D94B0
push	ecx
lea	edx, [esp+58h+var_40]
mov	ecx, esp
push	edx
call	sub_7D8DF0
mov	ecx, esi
call	sub_7D9740
mov	ebp, eax
push	ebp
mov	ecx, esi
mov	[edi+38h], ebp
call	sub_7D9180
mov	ecx, [edi+34h]
mov	ebx, eax
test	ecx, ecx
jz	short loc_7D59B7
call	sub_64A400

loc_7D59B7:
mov	[edi+34h], ebx
jmp	short loc_7D5A1A

loc_7D59BC:
push	ecx
lea	eax, [esp+58h+var_40]
mov	ecx, esp
push	eax
call	sub_7D8DF0
mov	ecx, esi
call	sub_7D9740
mov	ebp, eax
push	ebp
mov	ecx, esi
mov	[edi+38h], ebp
call	sub_7D9180
mov	ecx, [edi+34h]
mov	ebx, eax
test	ecx, ecx
jz	short loc_7D59EB
call	sub_64A400

loc_7D59EB:
fld	[esp+54h+var_28]
mov	[edi+34h], ebx
mov	edx, [edi+38h]
fnstcw	word ptr [esp+54h+var_44]
movzx	eax, word ptr [esp+54h+var_44]
or	eax, 0C00h
mov	dword ptr [esp+54h+var_30+4], eax
fldcw	word ptr [esp+54h+var_30+4]
fistp	dword ptr [esp+54h+var_30+4]
mov	cl, byte ptr [esp+54h+var_30+4]
mov	[edx+20h], cl
fldcw	word ptr [esp+54h+var_44]

loc_7D5A1A:
test	ebp, ebp
jz	short loc_7D5A25
mov	ecx, ebp
call	sub_64A400

loc_7D5A25:
mov	ebp, [edi+38h]
cmp	dword ptr [ebp+1Ch], 0
mov	eax, [esp+54h+arg_0]
mov	ebx, [eax+18h]
jnz	short loc_7D5A50
mov	ecx, [ebp+8]
call	sub_7D97B0
cmp	byte ptr [ebp+20h], 1
mov	[ebp+1Ch], eax
jnz	short loc_7D5A50
push	ebp
push	ebx
call	sub_7D5540
add	esp, 8

loc_7D5A50:
mov	ecx, [ebp+1Ch]
mov	[ecx], edi
mov	eax, [esp+54h+var_3C]
mov	ecx, eax
add	eax, 8
mov	[edi+38h], ebp
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_7D5A6D
call	sub_650DF0

loc_7D5A6D:
lea	ecx, [esp+54h+var_38]
call	sub_7D94B0
lea	ecx, [esp+54h+var_40]
call	sub_7D94B0
test	esi, esi
jz	short loc_7D5A8A
mov	ecx, esi
call	sub_64A400

loc_7D5A8A:
mov	ebx, [esp+54h+arg_0]

loc_7D5A8E:
mov	ecx, [ebx+4]
push	edi
call	sub_652E40
lea	ecx, [esp+54h+var_20]
call	sub_652830
lea	ecx, [esp+54h+var_10]
call	sub_652830
test	edi, edi
jz	short loc_7D5AB4
mov	ecx, edi
call	sub_64B3B0

loc_7D5AB4:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 44h
retn

loc_7D5ABC:
test	esi, esi
jz	short loc_7D5A8E
push	offset aWarningXmlnode ; "Warning: XMLNodeCtorFunction::GlobalCto"...
add	esi, 0Ch
push	esi
call	sub_68FAE0
add	esp, 8
jmp	short loc_7D5A8E

loc_7D5AD3:
test	esi, esi
jz	short loc_7D5A8E
push	offset aWarningXmlno_0 ; "Warning: XMLNodeCtorFunction::GlobalCto"...
add	esi, 0Ch
push	esi
call	sub_68FAE0
add	esp, 8
jmp	short loc_7D5A8E
sub_7D56C0 endp

align 10h



sub_7D5AF0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+78h]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	esi
push	edi
lea	edi, [ebx+78h]
push	0
push	3Ch
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_7D5B53
push	ebx
mov	ecx, esi
call	sub_663BE0
mov	dword ptr [esi], offset	off_1456494
lea	ebx, [esi+10h]
mov	dword ptr [ebx], offset	off_1456440
mov	dword ptr [esi+34h], 0
mov	dword ptr [esi+38h], 0
mov	ecx, [edi]
push	18h
call	sub_66FB00
push	eax
push	edi
mov	ecx, ebx
call	sub_64B8D0
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	4

loc_7D5B53:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_7D5AF0 endp

align 10h



sub_7D5B60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	ebp
mov	esi, ecx
call	sub_663B00
mov	eax, [esp+10h+arg_4]
lea	edi, [esi+10h]
xor	ebx, ebx
push	eax
mov	dword ptr [esi], offset	off_1456494
mov	dword ptr [edi], offset	off_1456440
mov	[esi+34h], ebx
push	ebp
mov	ecx, edi
mov	[esi+38h], ebx
call	sub_64B8D0
mov	edx, [esp+10h+arg_8]
lea	ecx, [esi+3Ch]
mov	dword ptr [ecx], offset	off_1432704
mov	[ecx+0Ch], bl
mov	[ecx+4], ebx
mov	[ecx+8], ebx
push	edx
mov	[ecx+18h], bl
mov	[ecx+10h], ebx
mov	[ecx+14h], ebx
mov	[ecx+1Ch], ebx
push	ebp
push	esi
mov	dword ptr [esi], offset	off_14567A4
mov	dword ptr [edi], offset	off_1456750
mov	dword ptr [ecx], offset	off_1456748
call	sub_663FB0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_7D5B60 endp

align 10h



sub_7D5BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	edi
mov	edi, eax
mov	eax, [ebp+78h]
mov	ecx, [eax+294h]
mov	eax, [ecx]
mov	edx, [eax+28h]
lea	ebx, [ebp+78h]
push	0
push	3Ch
call	edx
mov	esi, eax
test	esi, esi
jz	short loc_7D5C3F
push	ebp
mov	ecx, esi
call	sub_663BE0
xor	eax, eax
mov	dword ptr [esi], offset	off_1456494
lea	ebp, [esi+10h]
mov	dword ptr [ebp+0], offset off_1456440
mov	[esi+34h], eax
mov	[esi+38h], eax
mov	ecx, [ebx]
push	18h
call	sub_66FB00
push	eax
push	ebx
mov	ecx, ebp
call	sub_64B8D0
mov	ebp, [esp+10h+arg_4]
jmp	short loc_7D5C41

loc_7D5C3F:
xor	esi, esi

loc_7D5C41:
cmp	dword ptr [edi+1Ch], 0
mov	ebx, [esp+10h+arg_0]
mov	[ebx], esi
jnz	short loc_7D5C68
mov	ecx, [edi+8]
call	sub_7D97B0
cmp	byte ptr [edi+20h], 1
mov	[edi+1Ch], eax
jnz	short loc_7D5C68
push	edi
push	ebp
call	sub_7D5540
add	esp, 8

loc_7D5C68:
mov	eax, [edi+1Ch]
mov	[eax], esi
mov	[esi+38h], edi
mov	esi, [esp+10h+arg_8]
test	esi, esi
jz	short loc_7D5C93
mov	edi, [ebx]
inc	dword ptr [esi+4]
mov	ecx, [edi+34h]
test	ecx, ecx
jz	short loc_7D5C89
call	sub_64A400

loc_7D5C89:
mov	[edi+34h], esi
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn

loc_7D5C93:
mov	ecx, [edi+8]
mov	esi, [ebx]
push	edi
call	sub_7D9180
mov	ecx, [esi+34h]
mov	edi, eax
test	ecx, ecx
jz	short loc_7D5CAC
call	sub_64A400

loc_7D5CAC:
mov	[esi+34h], edi
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn
sub_7D5BE0 endp

align 10h



sub_7D5CC0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 20h
mov	eax, [esp+20h+arg_4]
push	ebx
mov	ebx, [eax+34h]
mov	[esp+24h+var_20], ebx
test	ebx, ebx
jz	loc_7D5EE2
push	ebp
push	esi
push	edi
mov	edi, [esp+30h+arg_0]
jmp	short loc_7D5CE4

loc_7D5CE0:
mov	ebx, [esp+30h+var_20]

loc_7D5CE4:
cmp	byte ptr [ebx+20h], 1
jnz	loc_7D5ED0
mov	ecx, [esp+30h+arg_C]
mov	ebp, [esp+30h+arg_8]
push	ecx
push	ebp
push	ebx
push	edi
call	sub_7D5CC0
mov	esi, [ebx+2Ch]
add	esp, 10h
test	esi, esi
jz	loc_7D5ED0
lea	ecx, [ecx+0]

loc_7D5D10:
mov	edx, [esi]
mov	eax, [edx]
push	2		; size_t
push	offset aId_2	; "id"
push	eax		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	short loc_7D5D34
mov	esi, [esi+8]
test	esi, esi
jnz	short loc_7D5D10
jmp	loc_7D5ED0

loc_7D5D34:
mov	ecx, [esi+4]
mov	edx, [ecx]
push	edx
lea	ecx, [esp+34h+var_18]
call	sub_67AE10
mov	eax, [ebx+1Ch]
test	eax, eax
jnz	short loc_7D5D86
push	ebp
lea	eax, [esp+34h+var_14]
push	edi
push	eax
mov	eax, ebx
call	sub_7D5BE0
mov	ecx, [eax]
add	esp, 0Ch
test	ecx, ecx
jz	short loc_7D5D6E
mov	edx, [ecx+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[ecx+8], edx

loc_7D5D6E:
mov	ecx, [esp+30h+var_14]
mov	ebp, [eax]
test	ecx, ecx
jz	loc_7D5E22
call	sub_64B3B0
jmp	loc_7D5E22

loc_7D5D86:
mov	ebp, [eax]
test	ebp, ebp
jz	short loc_7D5DA0
mov	eax, [ebp+8]
inc	eax
and	eax, 8FFFFFFFh
mov	[ebp+8], eax
test	ebp, ebp
jnz	loc_7D5E22

loc_7D5DA0:
mov	ecx, [edi+78h]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
lea	ebp, [edi+78h]
push	0
push	3Ch
call	eax
mov	esi, eax
test	esi, esi
jz	short loc_7D5DF5
push	edi
mov	ecx, esi
call	sub_663BE0
xor	eax, eax
mov	dword ptr [esi], offset	off_1456494
lea	ebx, [esi+10h]
mov	dword ptr [ebx], offset	off_1456440
mov	[esi+34h], eax
mov	[esi+38h], eax
mov	ecx, [ebp+0]
push	18h
call	sub_66FB00
push	eax
push	ebp
mov	ecx, ebx
call	sub_64B8D0
mov	ebx, [esp+30h+var_20]
jmp	short loc_7D5DF7

loc_7D5DF5:
xor	esi, esi

loc_7D5DF7:
cmp	dword ptr [ebx+1Ch], 0
mov	ebp, esi
jnz	short loc_7D5E1A
mov	ecx, [ebx+8]
call	sub_7D97B0
cmp	byte ptr [ebx+20h], 1
mov	[ebx+1Ch], eax
jnz	short loc_7D5E1A
push	ebx
push	edi
call	sub_7D5540
add	esp, 8

loc_7D5E1A:
mov	ecx, [ebx+1Ch]
mov	[ecx], esi
mov	[esi+38h], ebx

loc_7D5E22:
mov	edx, [edi+78h]
mov	eax, [esp+30h+var_18]
mov	byte ptr [esp+30h+arg_4], 0
mov	ecx, [edx+280h]
mov	edx, eax
and	edx, 0FFFFFFFCh
mov	edx, [edx]
and	edx, 7FFFFFFFh
and	eax, 0FFFFFFFCh
push	edx
add	eax, 8
push	eax
call	sub_650F20
mov	esi, [esp+30h+arg_C]
mov	[esp+30h+var_1C], eax
inc	dword ptr [eax+8]
mov	ebx, [esi+10h]
lea	eax, [esp+30h+arg_4]
push	eax
add	esi, 10h
push	ebp
lea	ecx, [esp+38h+var_10]
call	sub_652700
mov	edx, [ebx+0Ch]
push	eax
lea	ecx, [esp+38h+var_1C]
push	ecx
push	edi
mov	ecx, esi
call	edx
mov	eax, [esp+30h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D5E92
call	sub_650DF0

loc_7D5E92:
lea	ecx, [esp+30h+var_10]
call	sub_652830
test	ebp, ebp
jz	short loc_7D5EA6
mov	ecx, ebp
call	sub_64B3B0

loc_7D5EA6:
mov	esi, [esp+30h+var_18]
and	esi, 0FFFFFFFCh
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7D5ECC
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7D5ECC:
mov	ebx, [esp+30h+var_20]

loc_7D5ED0:
mov	ebx, [ebx+18h]
mov	[esp+30h+var_20], ebx
test	ebx, ebx
jnz	loc_7D5CE0
pop	edi
pop	esi
pop	ebp

loc_7D5EE2:
pop	ebx
add	esp, 20h
retn
sub_7D5CC0 endp

align 10h



sub_7D5EF0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	ebp
mov	ebx, eax
mov	eax, [esi+78h]
mov	ecx, [eax+280h]
push	5
push	offset aXmlns	; "xmlns"
call	sub_650F20
mov	[esp+24h+var_1C], eax
inc	dword ptr [eax+8]
mov	ecx, [ebx+24h]
cmp	dword ptr [ecx+0Ch], 0
jbe	short loc_7D5F39
push	offset word_1545F80
lea	ecx, [esp+28h+var_1C]
call	sub_651470
mov	edx, [ebx+24h]
mov	eax, [edx]
push	eax
lea	ecx, [esp+28h+var_1C]
call	sub_651470

loc_7D5F39:
mov	ecx, [ebx+8]
add	ecx, 28h
push	ecx
lea	ecx, [esp+28h+var_18]
mov	[esp+28h+var_10], 0
call	sub_7D8DE0
mov	edx, [esp+24h+var_18]
lea	ebp, [ebx+28h]
push	edx
mov	ecx, ebp
call	sub_7D94E0
lea	ecx, [esp+24h+var_18]
call	sub_7D94B0
mov	eax, [ebx+1Ch]
mov	ecx, [eax+4]
mov	edx, [ecx+10h]
mov	edx, [edx+10h]
lea	eax, [esp+24h+var_10]
push	eax
add	ecx, 10h
lea	eax, [esp+28h+var_1C]
push	eax
push	esi
call	edx
mov	al, [esp+24h+var_10]
test	al, al
jz	short loc_7D5FFA
cmp	al, 0Ah
jz	short loc_7D5FFA
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+30h+var_14]
push	eax
lea	ecx, [esp+34h+var_10]
call	sub_652F60
mov	eax, [esp+24h+var_14]
mov	ecx, [eax+10h]
mov	eax, [eax]
mov	ebx, [ebx+8]
push	ecx
push	eax
lea	ecx, [ebx+10h]
call	sub_7D93D0
push	eax
lea	ecx, [esp+28h+var_18]
call	sub_7D8DE0
mov	ecx, [esp+24h+var_18]
push	ecx
mov	ecx, ebp
call	sub_7D94E0
lea	ecx, [esp+24h+var_18]
call	sub_7D94B0
mov	eax, [esp+24h+var_14]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D5FEC
call	sub_650DF0

loc_7D5FEC:
lea	ecx, [esp+24h+var_10]
call	sub_652830
jmp	loc_7D60C7

loc_7D5FFA:
push	edi
mov	edi, [ebx+10h]
test	edi, edi
jz	loc_7D60BD

loc_7D6006:
cmp	dword ptr [edi+1Ch], 0
jnz	short loc_7D602E
mov	edx, [esp+28h+arg_0]
push	edx
lea	eax, [esp+2Ch+var_14]
push	esi
push	eax
mov	eax, edi
call	sub_7D5BE0
mov	ecx, [esp+34h+var_14]
add	esp, 0Ch
test	ecx, ecx
jz	short loc_7D602E
call	sub_64B3B0

loc_7D602E:
mov	ecx, [edi+1Ch]
mov	eax, [ecx+4]
mov	edx, [eax+10h]
mov	edx, [edx+10h]
lea	ecx, [eax+10h]
lea	eax, [esp+28h+var_10]
push	eax
lea	eax, [esp+2Ch+var_1C]
push	eax
push	esi
call	edx
mov	al, [esp+28h+var_10]
test	al, al
jz	short loc_7D6056
cmp	al, 0Ah
jnz	short loc_7D605F

loc_7D6056:
mov	edi, [edi+10h]
test	edi, edi
jnz	short loc_7D6006
jmp	short loc_7D60BD

loc_7D605F:
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+34h+var_18]
push	eax
lea	ecx, [esp+38h+var_10]
call	sub_652F60
mov	eax, [esp+28h+var_18]
mov	ecx, [eax+10h]
mov	eax, [eax]
mov	ebx, [ebx+8]
push	ecx
push	eax
lea	ecx, [ebx+10h]
call	sub_7D93D0
push	eax
lea	ecx, [esp+2Ch+var_14]
call	sub_7D8DE0
mov	ecx, [esp+28h+var_14]
push	ecx
mov	ecx, ebp
call	sub_7D94E0
lea	ecx, [esp+28h+var_14]
call	sub_7D94B0
mov	eax, [esp+28h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D60BD
call	sub_650DF0

loc_7D60BD:
lea	ecx, [esp+28h+var_10]
call	sub_652830
pop	edi

loc_7D60C7:
mov	eax, [esp+24h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D60DD
call	sub_650DF0

loc_7D60DD:
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_7D5EF0 endp

align 10h



sub_7D60F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	1Dh
mov	ecx, ebp
call	sub_651C40
push	1Ch
mov	ecx, ebp
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D6127
test	al, al
jnz	short loc_7D6127
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, ebp
call	sub_651C60
pop	ebp
pop	ebx
pop	ecx
retn

loc_7D6127:
mov	eax, [ebp+8]
test	eax, eax
jz	loc_7D61CE
lea	ebx, [eax-10h]
test	ebx, ebx
jz	loc_7D61CE
push	edi
mov	ecx, ebp
call	sub_651C20
mov	edi, eax
mov	eax, [ebx+38h]
mov	[esp+10h+var_4], eax
test	eax, eax
jz	short loc_7D61CD
cmp	byte ptr [eax+20h], 1
jnz	loc_7D625E
cmp	dword ptr [ebp+1Ch], 0
jle	short loc_7D61CD
mov	eax, [ebp+18h]
push	esi
push	eax
push	0
mov	ecx, ebp
call	sub_651EC0
mov	ecx, eax
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	loc_7D6243
mov	edx, [esi+10h]
mov	eax, [edx+8]
lea	ecx, [esi+10h]
call	eax
cmp	eax, 1Dh
jnz	loc_7D6243
mov	edx, [esi+38h]
test	edx, edx
jz	short loc_7D61CC
mov	ecx, [ebx+38h]
mov	eax, [ecx+10h]
test	eax, eax
jz	short loc_7D61B3

loc_7D61A6:
mov	ecx, [eax+10h]
test	ecx, ecx
jz	short loc_7D61B3
mov	eax, ecx
test	eax, eax
jnz	short loc_7D61A6

loc_7D61B3:
cmp	eax, edx
jnz	short loc_7D61D2
test	edi, edi
jz	short loc_7D61CC
push	offset aWarningXmlno_1 ; "Warning! XMLNode::appendChild	- trying "...
add	edi, 0Ch
push	edi
call	sub_68FAE0
add	esp, 8

loc_7D61CC:
pop	esi

loc_7D61CD:
pop	edi

loc_7D61CE:
pop	ebp
pop	ebx
pop	ecx
retn

loc_7D61D2:
mov	edi, edx
inc	dword ptr [edi+4]
mov	edx, [esi+38h]
cmp	dword ptr [edx+10h], 0
jz	short loc_7D61EB
mov	eax, edx
mov	ecx, [eax+10h]
push	eax
call	sub_7DAC00

loc_7D61EB:
mov	eax, [esi+38h]
mov	ecx, [esp+14h+var_4]
push	eax
call	sub_7DA970
mov	eax, [ebx+34h]
test	eax, eax
jz	short loc_7D6202
inc	dword ptr [eax+4]

loc_7D6202:
mov	ecx, [esi+34h]
test	ecx, ecx
jz	short loc_7D620E
call	sub_64A400

loc_7D620E:
mov	ecx, [ebx+34h]
mov	[esi+34h], ecx
mov	eax, [esi+38h]
cmp	byte ptr [eax+20h], 1
jnz	short loc_7D6235
mov	edx, [eax+28h]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_7D6235
mov	ecx, [ebx+34h]
mov	esi, [ebp+18h]
push	ecx
call	sub_7D5EF0
add	esp, 4

loc_7D6235:
pop	esi
mov	ecx, edi
pop	edi
pop	ebp
pop	ebx
add	esp, 4
jmp	sub_64A400

loc_7D6243:
test	edi, edi
jz	short loc_7D61CC
push	offset aWarningXmlno_2 ; "Warning! XMLNode::appendChild	- trying "...
add	edi, 0Ch
push	edi
call	sub_68FAE0
add	esp, 8
pop	esi
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn

loc_7D625E:
test	edi, edi
jz	loc_7D61CD
push	offset aWarningXmlno_3 ; "Warning: XMLNode::appendChild	- trying "...
add	edi, 0Ch
push	edi
call	sub_68FAE0
add	esp, 8
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn
sub_7D60F0 endp

align 10h



sub_7D6280 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1Dh
mov	ecx, esi
call	sub_651C40
push	1Ch
mov	ecx, esi
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D62B7
test	al, al
jnz	short loc_7D62B7
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ebx
pop	ecx
retn

loc_7D62B7:
push	edi
mov	edi, [esi+8]
test	edi, edi
jz	loc_7D6394
add	edi, 0FFFFFFF0h
jz	loc_7D6394
cmp	dword ptr [edi+38h], 0
jz	loc_7D6394
cmp	dword ptr [esi+1Ch], 0
mov	byte ptr [esp+10h+var_4], 0
jle	short loc_7D62F9
mov	eax, [esi+18h]
push	eax
push	0
mov	ecx, esi
call	sub_651EC0
mov	ecx, eax
call	sub_651D80
mov	byte ptr [esp+10h+var_4], al

loc_7D62F9:
mov	ecx, [edi+38h]
cmp	byte ptr [ecx+20h], 1
mov	eax, [esp+10h+var_4]
mov	edi, ecx
mov	edx, [edi]
mov	edx, [edx+4]
push	eax
jnz	short loc_7D6350
call	edx
mov	edi, eax
mov	eax, [esi+18h]
push	0
push	eax
lea	ecx, [esp+18h+var_4]
push	ecx
mov	eax, edi
call	sub_7D5BE0
mov	ebx, [esp+1Ch+var_4]
mov	ecx, [esi+4]
add	esp, 0Ch
push	ebx
call	sub_652E40
test	ebx, ebx
jz	short loc_7D633F
mov	ecx, ebx
call	sub_64B3B0

loc_7D633F:
test	edi, edi
jz	short loc_7D6394
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
add	esp, 4
jmp	sub_64A400

loc_7D6350:
call	edx
mov	ebx, eax
mov	eax, [esi+18h]
push	0
push	eax
lea	ecx, [esp+18h+var_4]
push	ecx
mov	eax, ebx
call	sub_7D5BE0
mov	dl, [edi+20h]
mov	edi, [esp+1Ch+var_4]
add	esp, 0Ch
mov	[ebx+20h], dl
mov	ecx, [esi+4]
push	edi
call	sub_652E40
test	edi, edi
jz	short loc_7D6387
mov	ecx, edi
call	sub_64B3B0

loc_7D6387:
pop	edi
pop	esi
mov	ecx, ebx
pop	ebx
add	esp, 4
jmp	sub_64A400

loc_7D6394:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_7D6280 endp

align 10h



sub_7D63A0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 20h
push	ebx
push	esi
mov	esi, [esp+28h+arg_0]
push	1Dh
mov	ecx, esi
call	sub_651C40
push	1Ch
mov	ecx, esi
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D63DB
test	al, al
jnz	short loc_7D63DB
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ebx
add	esp, 20h
retn

loc_7D63DB:
mov	eax, [esi+8]
test	eax, eax
jz	loc_7D65BF
push	ebp
lea	ebp, [eax-10h]
mov	[esp+2Ch+var_18], ebp
test	ebp, ebp
jz	loc_7D65BE
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	ebx, 1
mov	ecx, esi
mov	[edi], bl
call	sub_651C20
mov	edi, [ebp+38h]
test	edi, edi
jz	loc_7D65BD
cmp	[edi+20h], bl
jnz	loc_7D65A8
cmp	[esi+1Ch], ebx
jl	loc_7D65BD
mov	ebp, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebp
lea	ecx, [esp+3Ch+var_1C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+18h]
mov	eax, [edx+78h]
mov	ecx, [eax+280h]
push	5
push	offset aXmlns	; "xmlns"
call	sub_650F20
mov	[esp+30h+var_20], eax
add	[eax+8], ebx
mov	ecx, [esp+30h+var_1C]
cmp	dword ptr [ecx+10h], 0
jbe	short loc_7D6490
push	offset word_1545F80
lea	ecx, [esp+34h+var_20]
call	sub_651470
mov	edx, [esp+30h+var_1C]
mov	eax, [edx]
push	eax
lea	ecx, [esp+34h+var_20]
call	sub_651470

loc_7D6490:
mov	[esp+30h+var_10], 0
mov	ecx, [edi+1Ch]
mov	eax, [ecx+4]
mov	edx, [eax+10h]
mov	edx, [edx+10h]
lea	ecx, [eax+10h]
lea	eax, [esp+30h+var_10]
push	eax
lea	eax, [esp+34h+var_20]
push	eax
mov	eax, [esi+18h]
push	eax
call	edx
mov	al, [esp+30h+var_10]
test	al, al
jz	short loc_7D64C0
cmp	al, 0Ah
jnz	short loc_7D6532

loc_7D64C0:
mov	edi, [edi+10h]
test	edi, edi
jz	loc_7D656B
jmp	short loc_7D64D0
align 10h

loc_7D64D0:
cmp	dword ptr [edi+1Ch], 0
jnz	short loc_7D64FE
mov	eax, [esp+30h+var_18]
mov	ecx, [eax+34h]
mov	edx, [esi+18h]
push	ecx
push	edx
lea	eax, [esp+38h+var_14]
push	eax
mov	eax, edi
call	sub_7D5BE0
mov	ecx, [esp+3Ch+var_14]
add	esp, 0Ch
test	ecx, ecx
jz	short loc_7D64FE
call	sub_64B3B0

loc_7D64FE:
mov	ecx, [edi+1Ch]
mov	eax, [ecx+4]
mov	edx, [eax+10h]
mov	edx, [edx+10h]
lea	ecx, [eax+10h]
lea	eax, [esp+30h+var_10]
push	eax
lea	eax, [esp+34h+var_20]
push	eax
mov	eax, [esi+18h]
push	eax
call	edx
mov	al, [esp+30h+var_10]
test	al, al
jz	short loc_7D6529
cmp	al, 0Ah
jnz	short loc_7D6532

loc_7D6529:
mov	edi, [edi+10h]
test	edi, edi
jnz	short loc_7D64D0
jmp	short loc_7D656B

loc_7D6532:
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+3Ch+var_18]
push	ecx
lea	ecx, [esp+40h+var_10]
call	sub_652F60
mov	ecx, [esi+4]
lea	edx, [esp+30h+var_18]
push	edx
call	sub_64A680
mov	eax, [esp+30h+var_18]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D656B
call	sub_650DF0

loc_7D656B:
lea	ecx, [esp+30h+var_10]
call	sub_652830
mov	eax, [esp+30h+var_20]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D658A
call	sub_650DF0

loc_7D658A:
mov	eax, [esp+30h+var_1C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D65BD
call	sub_650DF0
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 20h
retn

loc_7D65A8:
test	eax, eax
jz	short loc_7D65BD
add	eax, 0Ch
push	offset aWarningXmlno_4 ; "Warning: XMLNodeProto::GetNamespaceForP"...
push	eax
call	sub_68FAE0
add	esp, 8

loc_7D65BD:
pop	edi

loc_7D65BE:
pop	ebp

loc_7D65BF:
pop	esi
pop	ebx
add	esp, 20h
retn
sub_7D63A0 endp

align 10h



sub_7D65D0 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 30h
push	ebx
push	esi
mov	esi, [esp+38h+arg_0]
push	1Dh
mov	ecx, esi
call	sub_651C40
push	1Ch
mov	ecx, esi
mov	bl, al
call	sub_651C40
test	bl, bl
jnz	short loc_7D660B
test	al, al
jnz	short loc_7D660B
push	0
push	0
push	offset aXmlnode	; "XMLNode"
mov	ecx, esi
call	sub_651C60
pop	esi
pop	ebx
add	esp, 30h
retn

loc_7D660B:
push	ebp
mov	ebp, [esi+8]
test	ebp, ebp
jz	loc_7D68A5
add	ebp, 0FFFFFFF0h
mov	[esp+3Ch+var_28], ebp
jz	loc_7D68A5
push	edi
mov	edi, [esi+4]
mov	ecx, edi
call	sub_652060
mov	byte ptr [edi],	1
mov	ebx, [esi+18h]
mov	ecx, esi
add	ebx, 78h
call	sub_651C20
mov	edi, [ebp+38h]
test	edi, edi
jz	loc_7D68A4
cmp	byte ptr [edi+20h], 1
jnz	loc_7D688F
cmp	dword ptr [esi+1Ch], 1
jl	loc_7D68A4
mov	ebp, [esi+18h]
push	0
mov	ecx, esi
call	sub_651EC0
push	0
push	0FFFFFFFFh
push	ebp
lea	ecx, [esp+4Ch+var_2C]
push	ecx
mov	ecx, eax
call	sub_652F60
mov	edx, [esi+18h]
mov	[esp+40h+var_1C], edx
mov	[esp+40h+var_10], 0
mov	[esp+40h+var_20], offset off_1456738
lea	eax, [esp+40h+var_2C]
mov	[esp+40h+var_18], eax
lea	ecx, [esp+40h+var_10]
mov	[esp+40h+var_14], ecx
mov	edx, [edi+1Ch]
mov	eax, [edx+4]
push	0
lea	ecx, [eax+10h]
mov	eax, [ecx]
mov	eax, [eax+20h]
push	0
lea	edx, [esp+48h+var_20]
push	edx
push	ebx
call	eax
mov	al, [esp+40h+var_10]
test	al, al
jz	short loc_7D66FE
cmp	al, 0Ah
jz	short loc_7D66FE
mov	ecx, [esi+18h]
push	0
push	0FFFFFFFFh
push	ecx
lea	edx, [esp+4Ch+var_30]
push	edx
lea	ecx, [esp+50h+var_10]
call	sub_652F60
mov	ecx, [esi+4]
lea	eax, [esp+40h+var_30]
push	eax
call	sub_64A680
mov	eax, [esp+40h+var_30]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D66FE
call	sub_650DF0

loc_7D66FE:
mov	ecx, [esi+4]
cmp	byte ptr [ecx],	1
mov	ebp, [edi+10h]
jnz	loc_7D67C8
lea	ecx, [ecx+0]

loc_7D6710:
test	ebp, ebp
jz	loc_7D67C8
cmp	dword ptr [ebp+1Ch], 0
jnz	short loc_7D6746
mov	edx, [esp+40h+var_28]
mov	eax, [edx+34h]
mov	ecx, [esi+18h]
push	eax
push	ecx
lea	edx, [esp+48h+var_24]
push	edx
mov	eax, ebp
call	sub_7D5BE0
mov	ecx, [esp+4Ch+var_24]
add	esp, 0Ch
test	ecx, ecx
jz	short loc_7D6746
call	sub_64B3B0

loc_7D6746:
mov	eax, [ebp+1Ch]
mov	eax, [eax+4]
mov	edx, [eax+10h]
mov	edx, [edx+20h]
push	0
lea	ecx, [eax+10h]
push	0
lea	eax, [esp+48h+var_20]
push	eax
push	ebx
call	edx
mov	al, [esp+40h+var_10]
test	al, al
jz	short loc_7D67B9
cmp	al, 0Ah
jz	short loc_7D67B9
mov	eax, [esi+18h]
push	0
push	0FFFFFFFFh
push	eax
lea	ecx, [esp+4Ch+var_30]
push	ecx
lea	ecx, [esp+50h+var_10]
call	sub_652F60
mov	edi, [esi+4]
cmp	byte ptr [edi],	5
jb	short loc_7D6792
mov	ecx, edi
call	sub_652060

loc_7D6792:
mov	byte ptr [edi],	5
mov	edx, [esp+40h+var_30]
mov	[edi+4], edx
mov	eax, [esp+40h+var_30]
inc	dword ptr [eax+8]
mov	eax, [esp+40h+var_30]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D67B9
call	sub_650DF0

loc_7D67B9:
mov	eax, [esi+4]
cmp	byte ptr [eax],	1
mov	ebp, [ebp+10h]
jz	loc_7D6710

loc_7D67C8:
mov	ecx, [esi+4]
cmp	byte ptr [ecx],	1
jz	loc_7D6860
mov	edx, [esi+18h]
push	0
or	ebp, 0FFFFFFFFh
push	ebp
push	edx
lea	eax, [esp+4Ch+var_30]
push	eax
call	sub_652F60
mov	ecx, [esp+40h+var_30]
mov	edi, [ecx]
push	3Ah		; int
push	edi		; char *
call	_strchr
mov	ecx, [ebx]
mov	ecx, [ecx+280h]
add	esp, 8
test	eax, eax
jz	short loc_7D6814
mov	edx, [esp+40h+var_30]
mov	eax, [edx+10h]
add	eax, 0FFFFFFFAh
add	edi, 6
jmp	short loc_7D6821

loc_7D6814:
mov	eax, [esp+40h+var_30]
mov	eax, [eax+10h]
add	eax, 0FFFFFFFBh
add	edi, 5

loc_7D6821:
push	eax
push	edi
call	sub_650F20
mov	edi, eax
inc	dword ptr [edi+8]
mov	ecx, [esi+4]
lea	edx, [esp+40h+var_24]
push	edx
mov	[esp+44h+var_24], edi
call	sub_64A680
add	[edi+8], ebp
jnz	short loc_7D684A
mov	ecx, edi
call	sub_650DF0

loc_7D684A:
mov	eax, [esp+40h+var_30]
add	[eax+8], ebp
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D6860
call	sub_650DF0

loc_7D6860:
lea	ecx, [esp+40h+var_10]
mov	[esp+40h+var_20], offset off_15818F8
call	sub_652830
mov	eax, [esp+40h+var_2C]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D68A4
call	sub_650DF0
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 30h
retn

loc_7D688F:
test	eax, eax
jz	short loc_7D68A4
add	eax, 0Ch
push	offset aWarningXmlno_4 ; "Warning: XMLNodeProto::GetNamespaceForP"...
push	eax
call	sub_68FAE0
add	esp, 8

loc_7D68A4:
pop	edi

loc_7D68A5:
pop	ebp
pop	esi
pop	ebx
add	esp, 30h
retn
sub_7D65D0 endp

align 10h



sub_7D68B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi]
mov	ecx, [eax+0Ch]
shr	ecx, 1Dh
or	bl, 0FFh
test	cl, 1
jz	short loc_7D6903
mov	edx, [esp+8+arg_0]
mov	ecx, [edx+78h]
push	esi
push	18h
call	sub_66FB00
mov	esi, [eax+5Ch]
add	eax, 5Ch
test	esi, esi
jz	short loc_7D6902
mov	ecx, [edi]
mov	edx, [ecx+0Ch]
and	edx, [esi+4]
mov	ecx, eax
push	edx
push	edi
call	sub_692130
test	eax, eax
jl	short loc_7D6902
lea	eax, [eax+eax*2+3]
lea	eax, [esi+eax*4]
test	eax, eax
jz	short loc_7D6902
mov	bl, [eax+4]

loc_7D6902:
pop	esi

loc_7D6903:
pop	edi
movsx	eax, bl
pop	ebx
retn	8
sub_7D68B0 endp

align 10h



sub_7D6910 proc	near

var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, ecx
mov	ecx, esi
call	sub_668000
cmp	dword ptr [edi+28h], 0
mov	ebp, [esp+20h+arg_4]
mov	ebx, eax
jz	loc_7D6BFA
push	ebp
push	esi
lea	ecx, [edi-10h]
call	sub_7D68B0
sub	eax, 0
jz	loc_7D6B6B
sub	eax, 7
jz	loc_7D69F6
sub	eax, 2
jnz	loc_7D6BFA
mov	eax, [edi+28h]
test	eax, eax
jz	short loc_7D69D1
cmp	byte ptr [eax+20h], 1
jz	short loc_7D69D1
mov	ecx, [esp+20h+arg_8]
push	0
push	0FFFFFFFFh
push	esi
lea	eax, [esp+2Ch+arg_8]
push	eax
call	sub_652F60
mov	eax, [esp+20h+arg_8]
mov	edx, [eax+10h]
mov	eax, [eax]
mov	ecx, [edi+28h]
mov	ecx, [ecx+8]
push	edx
push	eax
lea	edx, [esp+28h+arg_C]
push	edx
call	sub_7D2A60
mov	eax, [eax]
mov	ecx, [edi+28h]
push	eax
add	ecx, 0Ch
call	sub_7D94E0
lea	ecx, [esp+20h+arg_C]
call	sub_7D94B0
mov	eax, [esp+20h+arg_8]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_7D6B5F
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D69D1:
test	ebx, ebx
jz	loc_7D6B5F
push	offset aWarningXmlno_5 ; "Warning! XMLNodeObject::SetMember - can"...
add	ebx, 0Ch
push	ebx
call	sub_68FAE0
add	esp, 8
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D69F6:
mov	eax, [edi+28h]
test	eax, eax
jz	loc_7D6B4A
mov	al, [eax+20h]
cmp	al, 1
jnz	loc_7D6B25
mov	eax, [edi+28h]
lea	ecx, [esp+20h+arg_4]
push	ecx
mov	ecx, [eax+8]
mov	[esp+24h+var_4], eax
call	sub_7D4B60
mov	ecx, [esp+20h+arg_8]
push	0
push	0FFFFFFFFh
push	esi
lea	edx, [esp+2Ch+arg_0]
push	edx
call	sub_652F60
mov	eax, [esp+20h+arg_0]
mov	ebx, [eax]
push	3Ah		; int
push	ebx		; char *
call	_strchr
mov	ecx, [edi+28h]
mov	ecx, [ecx+8]
mov	ebp, eax
add	esp, 8
test	ebp, ebp
jz	short loc_7D6AAF
mov	edx, ebp
sub	edx, ebx
push	edx
push	ebx
lea	eax, [esp+28h+var_10]
push	eax
call	sub_7D2A60
mov	ecx, [eax]
push	ecx
lea	ecx, [esp+24h+arg_4]
call	sub_7D94E0
lea	ecx, [esp+20h+var_10]
call	sub_7D94B0
lea	edx, [ebp+1]
mov	eax, edx
lea	ebx, [eax+1]
lea	ecx, [ecx+0]

loc_7D6A80:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7D6A80
mov	ecx, [edi+28h]
mov	ecx, [ecx+8]
sub	eax, ebx
push	eax
push	edx
lea	edx, [esp+28h+var_C]
push	edx
call	sub_7D2A60
mov	eax, [eax]
mov	ecx, [edi+28h]
push	eax
add	ecx, 0Ch
call	sub_7D94E0
lea	ecx, [esp+20h+var_C]
jmp	short loc_7D6AD6

loc_7D6AAF:
mov	eax, [esp+20h+arg_0]
mov	edx, [eax+10h]
mov	eax, [eax]
push	edx
push	eax
lea	edx, [esp+28h+var_8]
push	edx
call	sub_7D2A60
mov	eax, [eax]
mov	ecx, [edi+28h]
push	eax
add	ecx, 0Ch
call	sub_7D94E0
lea	ecx, [esp+20h+var_8]

loc_7D6AD6:
call	sub_7D94B0
mov	ecx, [esp+20h+arg_4]
mov	ebx, [esp+20h+var_4]
push	ecx
lea	ecx, [ebx+24h]
call	sub_7D94E0
mov	edx, [edi+24h]
push	edx
mov	eax, ebx
call	sub_7D5EF0
mov	eax, [esp+24h+arg_0]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
add	esp, 4
cmp	dword ptr [eax], 0
jnz	short loc_7D6B10
call	sub_650DF0

loc_7D6B10:
lea	ecx, [esp+20h+arg_4]
call	sub_7D94B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D6B25:
test	ebx, ebx
jz	short loc_7D6B5F
movzx	eax, al
push	eax
push	offset aWarningXmlno_6 ; "Warning: XMLNodeObject::SetMember - can"...
add	ebx, 0Ch
push	ebx
call	sub_68FAE0
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D6B4A:
test	ebx, ebx
jz	short loc_7D6B5F
push	offset aWarningXmlno_7 ; "Warning: XMLNodeObject::SetMember - can"...
add	ebx, 0Ch
push	ebx
call	sub_68FAE0
add	esp, 8

loc_7D6B5F:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D6B6B:
mov	edi, [edi+28h]
test	edi, edi
jz	short loc_7D6BD9
mov	al, [edi+20h]
cmp	al, 1
jnz	short loc_7D6BB4
mov	ecx, [esp+20h+arg_8]
mov	edi, [edi+1Ch]
push	esi
call	sub_652C20
mov	esi, eax
test	esi, esi
jz	short loc_7D6B99
mov	ecx, [esi+8]
inc	ecx
and	ecx, 8FFFFFFFh
mov	[esi+8], ecx

loc_7D6B99:
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7D6BA5
call	sub_64B3B0

loc_7D6BA5:
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D6BB4:
test	ebx, ebx
jz	short loc_7D6B5F
movzx	edx, al
push	edx
push	offset aWarningXmlno_8 ; "Warning: XMLNodeObject::SetMember - can"...
add	ebx, 0Ch
push	ebx
call	sub_68FAE0
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D6BD9:
test	ebx, ebx
jz	short loc_7D6B5F
push	offset aWarningXmlno_9 ; "Warning: XMLNodeObject::SetMember - can"...
add	ebx, 0Ch
push	ebx
call	sub_68FAE0
add	esp, 8
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 10h
retn	10h

loc_7D6BFA:
mov	eax, [esp+20h+arg_C]
mov	ecx, [esp+20h+arg_8]
push	eax
push	ecx
push	ebp
push	esi
mov	ecx, edi
call	sub_665190
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn	10h
sub_7D6910 endp

align 10h



sub_7D6C20 proc	near

var_60=	qword ptr -60h
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 48h
push	ebx
mov	ebx, [esp+4Ch+arg_4]
push	ebp
mov	ebp, [esp+50h+arg_0]
push	esi
mov	esi, ecx
cmp	dword ptr [esi+28h], 0
push	edi
lea	edi, [ebp+78h]
jz	loc_7D7164	; default
push	ebx
push	ebp
lea	ecx, [esi-10h]
call	sub_7D68B0
cmp	eax, 0Ch	; switch 13 cases
ja	loc_7D7164	; default
jmp	ds:off_7D717C[eax*4] ; switch jump

loc_7D6C58:		; jumptable 007D6C51 case 2
mov	edi, [esi+28h]
test	edi, edi
jz	short loc_7D6CD5
cmp	byte ptr [edi+20h], 1
jnz	short loc_7D6CBB
mov	ecx, edi
call	sub_7DAA30
test	al, al
jz	short loc_7D6CBB
mov	eax, [edi+34h]
mov	ecx, [eax+1Ch]
test	ecx, ecx
jz	short loc_7D6C84
mov	ecx, [ecx]
test	ecx, ecx
jnz	loc_7D6F3B

loc_7D6C84:
mov	esi, [esi+24h]
push	esi
lea	ecx, [esp+5Ch+arg_4]
push	ebp
push	ecx
call	sub_7D5BE0
mov	edx, [eax]
mov	ecx, [esp+64h+arg_8]
add	esp, 0Ch
push	edx
call	sub_652E40
mov	ecx, [esp+58h+arg_4]
test	ecx, ecx
jz	short loc_7D6CE3
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6CBB:
mov	esi, [esp+58h+arg_8]
mov	ecx, esi
call	sub_652060
pop	edi
mov	byte ptr [esi],	1
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6CD5:
mov	esi, [esp+58h+arg_8]
mov	ecx, esi
call	sub_652060
mov	byte ptr [esi],	0

loc_7D6CE3:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6CEF:		; jumptable 007D6C51 case 6
mov	eax, [esi+28h]
test	eax, eax
jz	short loc_7D6CD5
mov	eax, [eax+18h]
test	eax, eax
jz	short loc_7D6CBB
mov	ecx, [eax+1Ch]
test	ecx, ecx
jz	short loc_7D6D0E
mov	ecx, [ecx]
test	ecx, ecx
jnz	loc_7D6F3B

loc_7D6D0E:
mov	esi, [esi+24h]
push	esi
lea	ecx, [esp+5Ch+var_48]
push	ebp
push	ecx
call	sub_7D5BE0
mov	edx, [eax]
mov	ecx, [esp+64h+arg_8]
add	esp, 0Ch
push	edx
call	sub_652E40
mov	ecx, [esp+58h+var_48]
test	ecx, ecx
jz	short loc_7D6CE3
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6D45:		; jumptable 007D6C51 case 1
mov	eax, [esi+28h]
test	eax, eax
jz	short loc_7D6CD5
cmp	byte ptr [eax+20h], 1
jnz	short loc_7D6CD5
mov	eax, [edi]
mov	ecx, [eax+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	50h
call	eax
test	eax, eax
jz	short loc_7D6D75
push	ebp
mov	ecx, eax
call	sub_65EF40
mov	ebx, eax
jmp	short loc_7D6D77

loc_7D6D75:
xor	ebx, ebx

loc_7D6D77:
mov	ecx, [esi+28h]
mov	edi, [ecx+34h]
test	edi, edi
jz	short loc_7D6DF4

loc_7D6D81:
mov	eax, [edi+1Ch]
test	eax, eax
jz	short loc_7D6DAF
mov	eax, [eax]
test	eax, eax
jz	short loc_7D6DAF
push	eax
lea	ecx, [esp+5Ch+var_20]
call	sub_652700
lea	edx, [esp+58h+var_20]
push	edx
mov	ecx, ebx
call	sub_65E720
lea	ecx, [esp+58h+var_20]
call	sub_652830
jmp	short loc_7D6DED

loc_7D6DAF:
mov	eax, [esi+24h]
push	eax
lea	eax, [esp+5Ch+var_44]
push	ebp
push	eax
mov	eax, edi
call	sub_7D5BE0
mov	eax, [eax]
add	esp, 0Ch
push	eax
lea	ecx, [esp+5Ch+var_10]
call	sub_652700
push	eax
mov	ecx, ebx
call	sub_65E720
lea	ecx, [esp+58h+var_10]
call	sub_652830
mov	ecx, [esp+58h+var_44]
test	ecx, ecx
jz	short loc_7D6DED
call	sub_64B3B0

loc_7D6DED:
mov	edi, [edi+18h]
test	edi, edi
jnz	short loc_7D6D81

loc_7D6DF4:
mov	ecx, [esp+58h+arg_8]
push	ebx
call	sub_652E40
test	ebx, ebx
jz	loc_7D6CE3
mov	ecx, ebx
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6E19:		; jumptable 007D6C51 case 7
mov	esi, [esi+28h]
test	esi, esi
jz	loc_7D6CD5
cmp	byte ptr [esi+20h], 1
jnz	loc_7D6CBB
mov	eax, [esi+24h]
cmp	dword ptr [eax+0Ch], 0
jbe	short loc_7D6E77
mov	ecx, [eax]
push	ecx
lea	edx, [esp+5Ch+arg_0]
push	edx
mov	ecx, edi
call	sub_64ABA0
push	offset word_1545F80
lea	ecx, [esp+5Ch+arg_0]
call	sub_651470
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	ecx
lea	ecx, [esp+5Ch+arg_0]
call	sub_651470
mov	ecx, [esp+58h+arg_8]
lea	edx, [esp+58h+arg_0]
push	edx
call	sub_64A680
mov	eax, [esp+58h+arg_0]
jmp	short loc_7D6E97

loc_7D6E77:
mov	eax, [esi+0Ch]
mov	eax, [eax]
push	eax
lea	ecx, [esp+5Ch+var_40]
push	ecx
mov	ecx, edi
call	sub_64ABA0
mov	ecx, [esp+58h+arg_8]
push	eax
call	sub_64A680
mov	eax, [esp+58h+var_40]

loc_7D6E97:
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_7D6CE3
call	sub_650DF0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6EB9:		; jumptable 007D6C51 case 9
mov	esi, [esi+28h]
test	esi, esi
jz	loc_7D6CD5
cmp	byte ptr [esi+20h], 1
jz	loc_7D6CBB
mov	edx, [esi+0Ch]
mov	eax, [edx]
push	eax
lea	eax, [esp+5Ch+var_3C]
push	eax
mov	ecx, edi
call	sub_64ABA0
mov	ecx, [esp+58h+arg_8]
push	eax
call	sub_64A680
mov	eax, [esp+58h+var_3C]
jmp	short loc_7D6E97

loc_7D6EF0:		; jumptable 007D6C51 case 0
mov	esi, [esi+28h]
test	esi, esi
jz	loc_7D6CD5
mov	esi, [esi+1Ch]
cmp	dword ptr [esi+4], 0
jnz	short loc_7D6F38
mov	ecx, [edi]
mov	ecx, [ecx+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	34h
call	eax
test	eax, eax
jz	short loc_7D6F27
push	ebp
mov	ecx, eax
call	sub_663BE0
mov	edi, eax
jmp	short loc_7D6F29

loc_7D6F27:
xor	edi, edi

loc_7D6F29:
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_7D6F35
call	sub_64B3B0

loc_7D6F35:
mov	[esi+4], edi

loc_7D6F38:
mov	ecx, [esi+4]

loc_7D6F3B:
push	ecx
mov	ecx, [esp+5Ch+arg_8]
call	sub_652E40
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6F51:		; jumptable 007D6C51 case 3
mov	edi, [esi+28h]
test	edi, edi
jz	loc_7D6CD5
cmp	byte ptr [edi+20h], 1
jnz	loc_7D6CBB
mov	ecx, edi
call	sub_7DAA30
test	al, al
jz	loc_7D6CBB
mov	eax, [edi+38h]
mov	ecx, [eax+1Ch]
test	ecx, ecx
jz	short loc_7D6F85
mov	ecx, [ecx]
test	ecx, ecx
jnz	short loc_7D6F3B

loc_7D6F85:
mov	esi, [esi+24h]
push	esi
lea	edx, [esp+5Ch+var_38]
push	ebp
push	edx
call	sub_7D5BE0
mov	eax, [eax]
mov	ecx, [esp+64h+arg_8]
add	esp, 0Ch
push	eax
call	sub_652E40
mov	ecx, [esp+58h+var_38]
test	ecx, ecx
jz	loc_7D6CE3
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D6FC0:		; jumptable 007D6C51 case 12
mov	eax, [esi+28h]
test	eax, eax
jz	loc_7D6CD5
mov	eax, [eax+14h]
test	eax, eax
jz	loc_7D6CBB
mov	ecx, [eax+1Ch]
test	ecx, ecx
jz	short loc_7D6FE7
mov	ecx, [ecx]
test	ecx, ecx
jnz	loc_7D6F3B

loc_7D6FE7:
mov	esi, [esi+24h]
push	esi
lea	ecx, [esp+5Ch+var_34]
push	ebp
push	ecx
call	sub_7D5BE0
mov	edx, [eax]
mov	ecx, [esp+64h+arg_8]
add	esp, 0Ch
push	edx
call	sub_652E40
mov	ecx, [esp+58h+var_34]
test	ecx, ecx
jz	loc_7D6CE3
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D7022:		; jumptable 007D6C51 case 10
mov	eax, [esi+28h]
test	eax, eax
jz	loc_7D6CD5
mov	eax, [eax+10h]
test	eax, eax
jz	loc_7D6CBB
mov	ecx, [eax+1Ch]
test	ecx, ecx
jz	short loc_7D7049
mov	ecx, [ecx]
test	ecx, ecx
jnz	loc_7D6F3B

loc_7D7049:
mov	esi, [esi+24h]
push	esi
lea	ecx, [esp+5Ch+var_30]
push	ebp
push	ecx
call	sub_7D5BE0
mov	edx, [eax]
mov	ecx, [esp+64h+arg_8]
add	esp, 0Ch
push	edx
call	sub_652E40
mov	ecx, [esp+58h+var_30]
test	ecx, ecx
jz	loc_7D6CE3
call	sub_64B3B0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D7084:		; jumptable 007D6C51 case 4
mov	esi, [esi+28h]
test	esi, esi
jz	loc_7D6CD5
cmp	byte ptr [esi+20h], 1
jnz	loc_7D6CD5
mov	eax, [esi+0Ch]
mov	eax, [eax]
push	eax
lea	ecx, [esp+5Ch+var_2C]
push	ecx
mov	ecx, edi
call	sub_64ABA0
mov	ecx, [esp+58h+arg_8]
push	eax
call	sub_64A680
mov	eax, [esp+58h+var_2C]
jmp	loc_7D6E97

loc_7D70BE:		; jumptable 007D6C51 case 5
mov	esi, [esi+28h]
test	esi, esi
jz	loc_7D6CD5
cmp	byte ptr [esi+20h], 1
jnz	loc_7D6CD5
mov	edx, [esi+28h]
mov	eax, [edx]
push	eax
lea	eax, [esp+5Ch+var_28]
push	eax
mov	ecx, edi
call	sub_64ABA0
mov	ecx, [esp+58h+arg_8]
push	eax
call	sub_64A680
mov	eax, [esp+58h+var_28]
jmp	loc_7D6E97

loc_7D70F8:		; jumptable 007D6C51 case 11
mov	esi, [esi+28h]
test	esi, esi
jz	loc_7D6CD5
cmp	byte ptr [esi+20h], 1
jnz	loc_7D6CD5
mov	ecx, [esi+24h]
mov	eax, [ecx]
push	eax
lea	edx, [esp+5Ch+var_24]
push	edx
mov	ecx, edi
call	sub_64ABA0
mov	ecx, [esp+58h+arg_8]
push	eax
call	sub_64A680
mov	eax, [esp+58h+var_24]
jmp	loc_7D6E97

loc_7D7132:		; jumptable 007D6C51 case 8
mov	esi, [esi+28h]
test	esi, esi
jz	loc_7D6CD5
movzx	eax, byte ptr [esi+20h]
mov	ecx, [esp+58h+arg_8]
mov	[esp+58h+arg_0], eax
sub	esp, 8
fild	[esp+60h+arg_0]
fstp	[esp+60h+var_60]
call	sub_64A6A0
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 48h
retn	0Ch

loc_7D7164:		; default
mov	ecx, [esp+58h+arg_8]
push	ecx
push	ebx
push	ebp
mov	ecx, esi
call	sub_6E2610
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 48h
retn	0Ch
sub_7D6C20 endp

off_7D717C dd offset loc_7D6EF0	; jump table for switch	statement
dd offset loc_7D6D45
dd offset loc_7D6C58
dd offset loc_7D6F51
dd offset loc_7D7084
dd offset loc_7D70BE
dd offset loc_7D6CEF
dd offset loc_7D6E19
dd offset loc_7D7132
dd offset loc_7D6EB9
dd offset loc_7D7022
dd offset loc_7D70F8
dd offset loc_7D6FC0



sub_7D71B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 8
push	ebx
mov	ebx, [eax+280h]
push	esi
mov	esi, [esp+10h+arg_4]
mov	eax, [esi]
push	edi
test	eax, eax
jz	short loc_7D71CF
cmp	dword ptr [eax], 10h
jnb	short loc_7D71D9

loc_7D71CF:
push	10h
push	esi
mov	ecx, esi
call	sub_657320

loc_7D71D9:
cmp	off_16815E8, 0
mov	edi, offset off_16815E8
jz	short loc_7D7259
lea	ecx, [esp+14h+arg_4]
lea	edx, [esp+14h+arg_0]
mov	[esp+14h+var_8], ecx
mov	[esp+14h+var_4], edx
push	ebp

loc_7D71F8:
mov	ecx, [edi]
mov	eax, ecx
lea	ebp, [eax+1]
nop

loc_7D7200:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_7D7200
push	20000000h
sub	eax, ebp
push	eax
push	ecx
mov	ecx, ebx
call	sub_650E40
mov	[esp+18h+arg_4], eax
inc	dword ptr [eax+8]
mov	al, [edi+4]
mov	ecx, [esp+18h+arg_4]
mov	byte ptr [esp+18h+arg_0], al
mov	edx, [ecx+0Ch]
push	edx
lea	eax, [esp+1Ch+var_8]
push	eax
push	esi
mov	ecx, esi
call	sub_6575E0
mov	eax, [esp+18h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	dword ptr [eax], 0
jnz	short loc_7D7250
call	sub_650DF0

loc_7D7250:
add	edi, 8
cmp	dword ptr [edi], 0
jnz	short loc_7D71F8
pop	ebp

loc_7D7259:
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_7D71B0 endp




sub_7D7260 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 14h
mov	eax, [esp+14h+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
mov	ebp, ecx
mov	ecx, [esp+24h+arg_4]
push	eax
push	ecx
push	esi
mov	ecx, ebp
mov	[esp+30h+var_14], ebp
call	sub_7D5B60
lea	edx, [esp+24h+arg_8]
push	edx
push	offset off_14566E8
lea	ecx, [ebp+3Ch]
push	esi
lea	edi, [ebp+10h]
mov	dword ptr [ebp+0], offset off_1456C04
mov	dword ptr [edi], offset	off_1456BB0
mov	dword ptr [ecx], offset	off_1456BA8
xor	ebx, ebx
push	ebp
mov	[ebp+5Ch], ebx
mov	byte ptr [esp+34h+arg_8], 6
call	sub_663110
mov	eax, [esi]
push	ebx
push	0Ah
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], bl
mov	ecx, [eax+280h]
push	offset aAttributes ; "attributes"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
mov	ebp, 1
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D730D
call	sub_650DF0

loc_7D730D:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esi]
push	ebx
push	0Ah
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [ecx+280h]
push	offset aChildnodes ; "childNodes"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+arg_8]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D7367
call	sub_650DF0

loc_7D7367:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	edx, [esi]
push	ebx
push	0Ah
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [edx+280h]
push	offset aFirstchild ; "firstChild"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D73C1
call	sub_650DF0

loc_7D73C1:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	9
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [eax+280h]
push	offset aLastchild ; "lastChild"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D741B
call	sub_650DF0

loc_7D741B:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esi]
push	ebx
push	9
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [ecx+280h]
push	offset aLocalname ; "localName"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+arg_8]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D7475
call	sub_650DF0

loc_7D7475:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	edx, [esi]
push	ebx
push	0Ch
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [edx+280h]
push	offset aNamespaceuri ; "namespaceURI"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D74CF
call	sub_650DF0

loc_7D74CF:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	0Bh
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [eax+280h]
push	offset aNextsibling ; "nextSibling"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D7529
call	sub_650DF0

loc_7D7529:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esi]
push	ebx
push	8
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], bl
mov	ecx, [ecx+280h]
push	offset aNodename_0 ; "nodeName"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+arg_8]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D7583
call	sub_650DF0

loc_7D7583:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	edx, [esi]
push	ebx
push	8
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [edx+280h]
push	offset aNodetype ; "nodeType"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D75DD
call	sub_650DF0

loc_7D75DD:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	9
mov	byte ptr [esp+2Ch+arg_8], 2
mov	[esp+2Ch+var_10], bl
mov	ecx, [eax+280h]
push	offset aNodevalue ; "nodeValue"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D7637
call	sub_650DF0

loc_7D7637:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	ecx, [esi]
push	ebx
push	0Ah
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [ecx+280h]
push	offset aParentnode ; "parentNode"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+24h+arg_8]
push	edx
lea	eax, [esp+28h+var_10]
push	eax
lea	ecx, [esp+2Ch+arg_4]
push	ecx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D7691
call	sub_650DF0

loc_7D7691:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	edx, [esi]
push	ebx
push	6
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [edx+280h]
push	offset aPrefix	; "prefix"
call	sub_650E40
mov	[esp+24h+arg_4], eax
add	[eax+8], ebp
lea	eax, [esp+24h+arg_8]
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
lea	edx, [esp+2Ch+arg_4]
push	edx
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
jnz	short loc_7D76EB
call	sub_650DF0

loc_7D76EB:
lea	ecx, [esp+24h+var_10]
call	sub_652830
mov	eax, [esi]
push	ebx
push	0Fh
mov	byte ptr [esp+2Ch+arg_8], 6
mov	[esp+2Ch+var_10], bl
mov	ecx, [eax+280h]
push	offset aPrevioussiblin ; "previousSibling"
call	sub_650E40
lea	ecx, [esp+24h+arg_8]
push	ecx
mov	[esp+28h+arg_4], eax
add	[eax+8], ebp
lea	edx, [esp+28h+var_10]
push	edx
lea	eax, [esp+2Ch+arg_4]
push	eax
push	esi
mov	ecx, edi
call	sub_665530
mov	eax, [esp+24h+arg_4]
dec	dword ptr [eax+8]
pop	edi
mov	ecx, eax
add	eax, 8
cmp	[eax], ebx
pop	esi
pop	ebp
pop	ebx
jnz	short loc_7D7749
call	sub_650DF0

loc_7D7749:
lea	ecx, [esp+14h+var_10]
call	sub_652830
mov	eax, [esp+14h+var_14]
add	esp, 14h
retn	0Ch
sub_7D7260 endp

align 10h



sub_7D7760 proc	near
sub	ecx, 10h
jmp	loc_7D7780
sub_7D7760 endp

align 10h



sub_7D7770 proc	near

arg_0= byte ptr	 4

sub	ecx, 3Ch
jmp	loc_7D7780
align 10h

loc_7D7780:
push	esi
mov	esi, ecx
lea	ecx, [esi+5Ch]
call	sub_693EA0
mov	ecx, esi
call	sub_7D51F0
test	[esp+4+arg_0], 1
jz	short loc_7D77A7
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D77A7:
mov	eax, esi
pop	esi
retn	4
sub_7D7770 endp

align 10h



sub_7D77B0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+5Ch]
call	sub_693EA0
mov	ecx, esi
pop	esi
jmp	loc_7D5270
sub_7D77B0 endp

align 10h



sub_7D77D0 proc	near

var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	ebx
push	esi
mov	esi, [esp+20h+arg_4]
mov	ecx, [esi+294h]
push	edi
mov	[esp+24h+var_18], esi
mov	[esp+24h+var_14], 8
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	38h
call	edx
mov	edi, eax
test	edi, edi
jz	short loc_7D781A
push	offset sub_7D56C0
lea	eax, [esp+28h+var_18]
push	eax
mov	ecx, edi
call	sub_67C3D0
mov	dword ptr [edi], offset	off_14569B0
mov	dword ptr [edi+10h], offset off_1439710
jmp	short loc_7D781C

loc_7D781A:
xor	edi, edi

loc_7D781C:
mov	ebx, [esp+24h+arg_0]
mov	byte ptr [ebx+8], 0
mov	[ebx], edi
mov	dword ptr [ebx+4], 0
mov	ecx, [esi+294h]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	60h
call	eax
mov	edi, eax
test	edi, edi
jz	loc_7D7905
push	ebx
push	1
mov	ecx, esi
call	sub_66FB00
push	eax
lea	ecx, [esp+2Ch+var_18]
push	ecx
mov	ecx, edi
call	sub_7D7260
mov	edi, eax
test	edi, edi
jz	short loc_7D7872
mov	edx, [edi+8]
inc	edx
and	edx, 8FFFFFFFh
mov	[edi+8], edx

loc_7D7872:
lea	eax, [esp+24h+arg_4]
push	eax
lea	ecx, [esp+28h+arg_0]
push	ecx
lea	ecx, [esi+284h]
mov	[esp+2Ch+arg_4], edi
mov	[esp+2Ch+arg_0], 18h
call	sub_661470
mov	ecx, [esp+24h+arg_4]
test	ecx, ecx
jz	short loc_7D78A0
call	sub_64B3B0

loc_7D78A0:
mov	eax, [esi+2ACh]
push	ebp
add	eax, 10h
lea	edx, [esp+28h+arg_4]
mov	byte ptr [esp+28h+arg_4], 0
mov	ebp, [eax]
push	edx
push	ebx
lea	ecx, [esp+30h+var_10]
mov	[esp+30h+arg_0], eax
add	ebp, 28h
call	sub_651E70
mov	edx, [ebp+0]
push	eax
lea	eax, [esi+68h]
push	eax
lea	ecx, [esp+34h+var_18]
push	ecx
mov	ecx, [esp+38h+arg_0]
call	edx
lea	ecx, [esp+28h+var_10]
call	sub_652830
lea	eax, [edi+5Ch]
push	eax
push	esi
call	sub_7D71B0
add	esp, 8
pop	ebp
test	edi, edi
jz	short loc_7D78FC
mov	ecx, edi
call	sub_64B3B0

loc_7D78FC:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 18h
retn

loc_7D7905:
xor	edi, edi
jmp	loc_7D7872
sub_7D77D0 endp

align 10h



sub_7D7910 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+18h]
mov	byte ptr [ecx+20h], 1
retn
sub_7D7910 endp

align 10h



sub_7D7920 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+18h]
lea	ecx, [eax+18h]
mov	[eax], ecx
mov	dword ptr [eax+4], 800h
retn
sub_7D7920 endp

align 10h


; Attributes: bp-based frame

sub_7D7940 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14Ch]
push	0
push	ecx
call	__setjmp3
add	esp, 8
test	eax, eax
jz	short loc_7D796B
mov	edx, [ebp+arg_0]
push	edx
call	sub_804E00
add	esp, 4
xor	eax, eax
pop	ebp
retn

loc_7D796B:
mov	eax, [ebp+arg_0]
push	1B0h		; int
push	3Eh		; int
push	eax		; void *
call	sub_804D00
add	esp, 0Ch
mov	eax, 1
pop	ebp
retn
sub_7D7940 endp

align 10h


; Attributes: bp-based frame

sub_7D7990 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [eax+14Ch]
push	0
push	ecx
call	__setjmp3
add	esp, 8
test	eax, eax
jz	short loc_7D79BB
mov	edx, [ebp+arg_0]
push	edx
call	sub_804E00
add	esp, 4
xor	eax, eax
pop	ebp
retn

loc_7D79BB:
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_0]
push	eax
push	ecx
call	sub_805190
add	esp, 8
mov	eax, 1
pop	ebp
retn
sub_7D7990 endp

align 10h



sub_7D79E0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+18h]
mov	ecx, [esi+1Ch]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	800h
lea	edi, [esi+21h]
push	edi
call	eax
mov	dl, 0D9h
test	eax, eax
ja	short loc_7D7A18
cmp	byte ptr [esi+20h], 0
jz	short loc_7D7A0D
pop	edi
xor	al, al
pop	esi
retn

loc_7D7A0D:
mov	byte ptr [edi],	0FFh
mov	[esi+22h], dl
mov	eax, 2

loc_7D7A18:
cmp	byte ptr [esi+20h], 0
jz	short loc_7D7A40
cmp	eax, 4
jb	short loc_7D7A40
cmp	byte ptr [edi],	0FFh
jnz	short loc_7D7A40
cmp	[esi+22h], dl
jnz	short loc_7D7A40
cmp	byte ptr [esi+23h], 0FFh
jnz	short loc_7D7A40
mov	cl, 0D8h
cmp	[esi+24h], cl
jnz	short loc_7D7A40
mov	[esi+22h], cl
mov	[esi+24h], dl

loc_7D7A40:
mov	[esi], edi
mov	[esi+4], eax
pop	edi
mov	byte ptr [esi+20h], 0
mov	al, 1
pop	esi
retn
sub_7D79E0 endp

align 10h



sub_7D7A50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [ebx+18h]
test	esi, esi
jle	short loc_7D7A7D
cmp	esi, [edi+4]
jle	short loc_7D7A78

loc_7D7A67:
sub	esi, [edi+4]
push	ebx
call	sub_7D79E0
add	esp, 4
cmp	esi, [edi+4]
jg	short loc_7D7A67

loc_7D7A78:
add	[edi], esi
sub	[edi+4], esi

loc_7D7A7D:
pop	edi
pop	esi
pop	ebx
retn
sub_7D7A50 endp

align 10h



sub_7D7A90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+18h]
mov	ecx, [esi+14h]
mov	edx, [ecx]
mov	eax, [edx+24h]
push	edi
push	800h
lea	edi, [esi+18h]
push	edi
call	eax
cmp	eax, 800h
jz	short loc_7D7AB8
pop	edi
xor	al, al
pop	esi
retn

loc_7D7AB8:
mov	[esi], edi
pop	edi
mov	dword ptr [esi+4], 800h
mov	al, 1
pop	esi
retn
sub_7D7A90 endp

align 10h



sub_7D7AD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	dword ptr [esi+1Ch], 0
test	edi, edi
jz	short loc_7D7AEA
mov	ecx, edi
call	sub_64A420

loc_7D7AEA:
mov	ecx, [esi+1Ch]
test	ecx, ecx
jz	short loc_7D7AF6
call	sub_64A430

loc_7D7AF6:
mov	[esi+1Ch], edi
pop	edi
mov	byte ptr [esi+20h], 1
mov	dword ptr [esi+8], offset sub_7D7910
mov	dword ptr [esi+0Ch], offset sub_7D79E0
mov	dword ptr [esi+10h], offset sub_7D7A50
mov	dword ptr [esi+14h], offset sub_806A20
mov	dword ptr [esi+18h], offset nullsub_2
mov	dword ptr [esi+4], 0
mov	dword ptr [esi], 0
mov	eax, esi
pop	esi
retn	4
sub_7D7AD0 endp

align 10h



sub_7D7B40 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [ebx+18h]
mov	esi, 800h
sub	esi, [edi+4]
test	esi, esi
jle	short loc_7D7B69
mov	ecx, [edi+14h]
mov	eax, [ecx]
mov	eax, [eax+24h]
push	esi
lea	edx, [edi+18h]
push	edx
call	eax
cmp	eax, esi
jnz	short loc_7D7B8A

loc_7D7B69:
mov	ecx, [edi+14h]
test	ecx, ecx
jz	short loc_7D7B75
call	sub_64A430

loc_7D7B75:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax
mov	dword ptr [ebx+18h], 0

loc_7D7B8A:
pop	edi
pop	esi
pop	ebx
retn
sub_7D7B40 endp

align 10h



sub_7D7B90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7DB080
test	[esp+4+arg_0], 1
jz	short loc_7D7BAD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D7BAD:
mov	eax, esi
pop	esi
retn	4
sub_7D7B90 endp

align 10h



sub_7D7BC0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
mov	dword ptr [esi+14h], 0
test	edi, edi
jz	short loc_7D7BDA
mov	ecx, edi
call	sub_64A420

loc_7D7BDA:
mov	ecx, [esi+14h]
test	ecx, ecx
jz	short loc_7D7BE6
call	sub_64A430

loc_7D7BE6:
mov	[esi+14h], edi
lea	eax, [esi+18h]
mov	[esi], eax
pop	edi
mov	dword ptr [esi+8], offset sub_7D7920
mov	dword ptr [esi+0Ch], offset sub_7D7A90
mov	dword ptr [esi+10h], offset sub_7D7B40
mov	dword ptr [esi+4], 800h
mov	eax, esi
pop	esi
retn	4
sub_7D7BC0 endp

align 10h


; Attributes: noreturn

sub_7D7C20 proc	near

Src= byte ptr -0CCh
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0CCh
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0CCh+var_4], eax
mov	eax, [esp+0CCh+arg_0]
push	esi
mov	esi, [eax]
mov	edx, [esi+0Ch]
lea	ecx, [esp+0D0h+Src]
push	ecx
push	eax
call	edx
lea	eax, [esp+0D8h+Src]
push	eax		; Src
lea	ecx, [esi+84h]
push	0C8h		; SizeInBytes
push	ecx		; Dst
call	_strcpy_s
mov	edx, [esi+14Ch]
add	esp, 14h
push	1		; int
push	edx		; int *
call	_longjmp
sub_7D7C20 endp

dd 0CCCCCC5Eh, 3 dup(0CCCCCCCCh)


; Attributes: bp-based frame

sub_7D7C80 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
cmp	byte ptr [ecx+309h], 0
push	esi
mov	[ebp+var_4], ecx
jnz	short loc_7D7CC3
mov	eax, [ecx+304h]
push	0
push	eax
call	__setjmp3
mov	esi, [ebp+var_4]
add	esp, 8
test	eax, eax
jz	short loc_7D7CCA
lea	ecx, [esi+8]
push	ecx
call	sub_804E00
add	esp, 4
mov	byte ptr [esi+308h], 0
mov	byte ptr [esi+309h], 1

loc_7D7CC3:
xor	eax, eax
pop	esi
mov	esp, ebp
pop	ebp
retn

loc_7D7CCA:
cmp	dword ptr [esi+1Ch], 0CAh
jz	short loc_7D7CE1
lea	edx, [esi+8]
push	1
push	edx
call	sub_805190
add	esp, 8

loc_7D7CE1:
lea	eax, [esi+8]
push	eax
call	sub_806F20
add	esp, 4
mov	byte ptr [esi+308h], 1
mov	eax, 1
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7D7C80 endp

align 10h



sub_7D7D00 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	dword ptr [ebp+0], offset off_1456C98
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+24h]
xor	esi, esi
push	esi
push	20h
push	40h
call	edx
mov	ecx, [esp+28h+arg_4]
mov	[ebp+304h], eax
xor	eax, eax
mov	[esp+28h+var_1C], eax
mov	[esp+28h+var_18], eax
mov	[esp+28h+var_14], eax
mov	[esp+28h+var_10], eax
mov	[esp+28h+var_C], eax
mov	[esp+28h+var_8], eax
mov	[esp+28h+var_4], eax
mov	eax, [esp+28h+arg_8]
lea	ebx, [ebp+1B8h]
push	ebx
mov	[esp+2Ch+var_18], eax
mov	[esp+2Ch+var_1C], ecx
mov	byte ptr [ebp+309h], 0
mov	byte ptr [ebp+308h], 0
call	sub_806D60
lea	ecx, [ebp+8]
push	ebx
mov	dword ptr [ebx], offset	sub_7D7C20
push	ecx
mov	[ecx], eax
call	sub_7D7940
add	esp, 0Ch
test	eax, eax
jz	short loc_7D7DE3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	esi
push	824h
call	eax
mov	edi, eax
mov	[esp+2Ch+arg_8], edi
cmp	edi, esi
jz	short loc_7D7DCE
mov	ecx, esi
mov	[edi+1Ch], esi
cmp	ecx, esi
jz	short loc_7D7DB6
call	sub_64A430

loc_7D7DB6:
mov	eax, [esp+2Ch+arg_8]
mov	[edi+1Ch], esi
mov	ecx, 7
lea	esi, [esp+2Ch+var_1C]
mov	byte ptr [edi+20h], 1
rep movsd
jmp	short loc_7D7DD0

loc_7D7DCE:
xor	eax, eax

loc_7D7DD0:
push	0
mov	[ebp+20h], eax
lea	eax, [ebp+8]
push	ebx
push	eax
call	sub_7D7990
add	esp, 0Ch
pop	edi

loc_7D7DE3:
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 1Ch
retn	0Ch
sub_7D7D00 endp

align 10h



sub_7D7DF0 proc	near
mov	al, [ecx+309h]
retn
sub_7D7DF0 endp

align 10h



sub_7D7E00 proc	near
mov	eax, [ecx+20h]
test	eax, eax
jz	short locret_7D7E14
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], 0

locret_7D7E14:
retn
sub_7D7E00 endp

align 10h


; Attributes: bp-based frame

sub_7D7E20 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
cmp	byte ptr [ecx+309h], 0
push	esi
mov	[ebp+var_4], ecx
jnz	short loc_7D7E63
mov	eax, [ecx+304h]
push	0
push	eax
call	__setjmp3
mov	esi, [ebp+var_4]
add	esp, 8
test	eax, eax
jz	short loc_7D7E6A
lea	ecx, [esi+8]
push	ecx
call	sub_804E00
add	esp, 4
mov	byte ptr [esi+308h], 0
mov	byte ptr [esi+309h], 1

loc_7D7E63:
xor	eax, eax
pop	esi
mov	esp, ebp
pop	ebp
retn

loc_7D7E6A:
cmp	dword ptr [esi+1Ch], 0CAh
jz	short loc_7D7E81
lea	edx, [esi+8]
push	1
push	edx
call	sub_805190
add	esp, 8

loc_7D7E81:
mov	byte ptr [esi+308h], 1
mov	eax, 1
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7D7E20 endp

align 10h


; Attributes: bp-based frame

sub_7D7EA0 proc	near

var_4= dword ptr -4

push	ebp
mov	ebp, esp
push	ecx
cmp	byte ptr [ecx+309h], 0
push	esi
mov	[ebp+var_4], ecx
jnz	short loc_7D7EEC
cmp	byte ptr [ecx+308h], 0
jz	short loc_7D7F06
mov	eax, [ecx+304h]
push	0
push	eax
call	__setjmp3
mov	esi, [ebp+var_4]
add	esp, 8
test	eax, eax
jz	short loc_7D7EF3
lea	ecx, [esi+8]
push	ecx
call	sub_804E00
add	esp, 4
mov	byte ptr [esi+308h], 0
mov	byte ptr [esi+309h], 1

loc_7D7EEC:
xor	eax, eax
pop	esi
mov	esp, ebp
pop	ebp
retn

loc_7D7EF3:
lea	edx, [esi+8]
push	edx
call	sub_8050C0
add	esp, 4
mov	byte ptr [esi+308h], 0

loc_7D7F06:
mov	eax, 1
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7D7EA0 endp




sub_7D7F10 proc	near
mov	eax, [ecx+68h]
retn
sub_7D7F10 endp

align 10h



sub_7D7F20 proc	near
mov	eax, [ecx+64h]
retn
sub_7D7F20 endp

align 10h


; Attributes: bp-based frame

sub_7D7F30 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 8

push	ebp
mov	ebp, esp
push	ecx
cmp	byte ptr [ecx+309h], 0
push	esi
mov	[ebp+var_4], ecx
jnz	short loc_7D7F73
mov	eax, [ecx+304h]
push	0
push	eax
call	__setjmp3
add	esp, 8
test	eax, eax
jz	short loc_7D7F7C
mov	esi, [ebp+var_4]
lea	ecx, [esi+8]
push	ecx
call	sub_804E00
add	esp, 4
mov	byte ptr [esi+308h], 0
mov	byte ptr [esi+309h], 1

loc_7D7F73:
xor	eax, eax
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_7D7F7C:
mov	eax, [ebp+var_4]
push	1
lea	edx, [ebp+arg_0]
push	edx
add	eax, 8
push	eax
call	sub_806E80
add	esp, 0Ch
mov	eax, 1
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_7D7F30 endp

align 10h


; Attributes: bp-based frame

sub_7D7FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
cmp	byte ptr [ecx+309h], 0
push	esi
mov	[ebp+var_4], ecx
jnz	short loc_7D7FE3
mov	eax, [ecx+304h]
push	0
push	eax
call	__setjmp3
add	esp, 8
test	eax, eax
jz	short loc_7D7FEC
mov	esi, [ebp+var_4]
lea	ecx, [esi+8]
push	ecx
call	sub_804E00
add	esp, 4
mov	byte ptr [esi+308h], 0
mov	byte ptr [esi+309h], 1

loc_7D7FE3:
xor	eax, eax
pop	esi
mov	esp, ebp
pop	ebp
retn	4

loc_7D7FEC:
mov	edx, [ebp+var_4]
add	edx, 8
push	edx
call	sub_8070C0
mov	ecx, [ebp+arg_0]
add	esp, 4
mov	[ecx], eax
mov	eax, 1
pop	esi
mov	esp, ebp
pop	ebp
retn	4
sub_7D7FA0 endp

align 10h



sub_7D8010 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7DB060
test	[esp+4+arg_0], 1
jz	short loc_7D802D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D802D:
mov	eax, esi
pop	esi
retn	4
sub_7D8010 endp

align 10h



sub_7D8040 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7DB070
test	[esp+4+arg_0], 1
jz	short loc_7D805D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D805D:
mov	eax, esi
pop	esi
retn	4
sub_7D8040 endp

align 10h



sub_7D8070 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	eax, ecx
mov	ecx, dword_1855FC0
lea	esi, [esp+8+var_4]
push	esi
mov	[esp+0Ch+var_4], 2
mov	edx, [ecx]
push	310h
push	eax
mov	eax, [edx+38h]
call	eax
pop	esi
test	eax, eax
jz	short loc_7D80B0
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
push	ecx
push	edx
push	0
mov	ecx, eax
call	sub_7D7D00
pop	ecx
retn	8

loc_7D80B0:
xor	eax, eax
pop	ecx
retn	8
sub_7D8070 endp

align 10h



sub_7D80C0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1456C40
call	sub_7DB080
test	[esp+4+arg_0], 1
jz	short loc_7D80E3
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D80E3:
mov	eax, esi
pop	esi
retn	4
sub_7D80C0 endp

align 10h



sub_7D80F0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1456C98
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+24h]
push	0
push	20h
push	40h
call	edx
mov	[esi+304h], eax
lea	edi, [esi+1B8h]
push	edi
mov	byte ptr [esi+309h], 0
mov	byte ptr [esi+308h], 0
call	sub_806D60
lea	ecx, [esi+8]
push	edi
mov	dword ptr [edi], offset	sub_7D7C20
push	ecx
mov	[ecx], eax
call	sub_7D7940
add	esp, 0Ch
test	eax, eax
jz	short loc_7D8187
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	824h
call	edx
test	eax, eax
jz	short loc_7D817B
mov	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, eax
call	sub_7D7AD0
mov	ecx, esi
mov	[esi+20h], eax
call	sub_7D7C80
pop	edi
mov	eax, esi
pop	esi
retn	4

loc_7D817B:
xor	eax, eax
mov	ecx, esi
mov	[esi+20h], eax
call	sub_7D7C80

loc_7D8187:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_7D80F0 endp

align 10h



sub_7D8190 proc	near

arg_4= dword ptr  8

push	ebp
push	esi
push	edi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1456C98
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+24h]
push	0
push	20h
push	40h
call	edx
mov	[esi+304h], eax
lea	edi, [esi+1B8h]
push	edi
mov	byte ptr [esi+309h], 0
mov	byte ptr [esi+308h], 0
call	sub_806D60
lea	ebp, [esi+8]
push	edi
mov	dword ptr [edi], offset	sub_7D7C20
push	ebp
mov	[ebp+0], eax
call	sub_7D7940
add	esp, 0Ch
test	eax, eax
jz	short loc_7D821F
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	824h
call	edx
test	eax, eax
jz	short loc_7D820E
mov	ecx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, eax
call	sub_7D7AD0
jmp	short loc_7D8210

loc_7D820E:
xor	eax, eax

loc_7D8210:
push	0
push	edi
push	ebp
mov	[esi+20h], eax
call	sub_7D7990
add	esp, 0Ch

loc_7D821F:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
retn	8
sub_7D8190 endp

align 10h



sub_7D8230 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_7D827A
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_7D827A
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	310h
push	esi
call	eax
test	eax, eax
jz	short loc_7D827A
push	edi
mov	ecx, eax
call	sub_7D80F0
pop	edi
pop	esi
retn	4

loc_7D827A:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_7D8230 endp

align 10h



sub_7D8290 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
test	esi, esi
jz	short loc_7D82DC
mov	eax, [esi]
mov	edx, [eax+8]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_7D82DC
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	310h
push	edi
call	eax
test	eax, eax
jz	short loc_7D82DC
push	esi
push	0
mov	ecx, eax
call	sub_7D8190
pop	edi
pop	esi
retn	4

loc_7D82DC:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_7D8290 endp

align 10h



sub_7D82F0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1456C98
call	sub_7D7EA0
mov	edi, [esi+20h]
test	edi, edi
jz	short loc_7D8320
mov	ecx, [edi+1Ch]
test	ecx, ecx
jz	short loc_7D8312
call	sub_64A430

loc_7D8312:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_7D8320:
lea	eax, [esi+8]
push	eax
mov	dword ptr [esi+20h], 0
call	sub_804E00
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+304h]
mov	edx, [edx+30h]
add	esp, 4
push	eax
call	edx
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_7DB060
sub_7D82F0 endp




sub_7D8350 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7D82F0
test	[esp+4+arg_0], 1
jz	short loc_7D836D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D836D:
mov	eax, esi
pop	esi
retn	4
sub_7D8350 endp

align 10h



sub_7D8380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
push	edi
lea	eax, [esi+170h]
push	eax
mov	dword ptr [esi], offset	off_1456CC4
lea	edi, [esi+8]
call	sub_806D60
push	168h		; int
push	3Eh		; int
push	edi		; void *
mov	[edi], eax
call	sub_807CE0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esp, 10h
push	0
push	818h
call	eax
test	eax, eax
jz	short loc_7D83D1
mov	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, eax
call	sub_7D7BC0
jmp	short loc_7D83D3

loc_7D83D1:
xor	eax, eax

loc_7D83D3:
mov	edx, [esp+8+arg_4]
mov	[esi+20h], eax
mov	eax, [esp+8+arg_8]
push	edi
mov	[esi+24h], edx
mov	[esi+28h], eax
mov	dword ptr [esi+2Ch], 3
mov	dword ptr [esi+30h], 2
call	sub_807BD0
mov	ecx, [esp+0Ch+arg_C]
push	1
push	ecx
push	edi
call	sub_807490
push	1
push	edi
call	sub_807180
add	esp, 18h
pop	edi
mov	eax, esi
pop	esi
retn	10h
sub_7D8380 endp

align 10h



sub_7D8420 proc	near

arg_0= byte ptr	 4

push	1
lea	eax, [esp+4+arg_0]
push	eax
add	ecx, 8
push	ecx
call	sub_807200
add	esp, 0Ch
retn	4
sub_7D8420 endp

align 10h



sub_7D8440 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax
add	ecx, 8
push	ecx
call	sub_808580
add	esp, 8
retn	4
sub_7D8440 endp

align 10h



sub_7D8460 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
add	ecx, 8
push	ecx
push	eax
call	sub_807F40
add	esp, 8
retn	4
sub_7D8460 endp

align 10h



sub_7D8480 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+8]
push	edi
mov	dword ptr [esi], offset	off_1456CC4
call	sub_807E20
push	edi
call	sub_804E00
add	esp, 8
mov	ecx, esi
call	sub_7DB070
test	[esp+8+arg_0], 1
jz	short loc_7D84B8
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D84B8:
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_7D8480 endp

align 10h



sub_7D84C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
lea	eax, [esi+170h]
push	eax
mov	dword ptr [esi], offset	off_1456CC4
lea	edi, [esi+8]
call	sub_806D60
push	168h		; int
push	3Eh		; int
push	edi		; void *
mov	[edi], eax
call	sub_807CE0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
add	esp, 10h
push	0
push	818h
call	eax
test	eax, eax
jz	short loc_7D8519
mov	ecx, [esp+8+arg_0]
push	ecx
mov	ecx, eax
call	sub_7D7BC0
mov	[esi+20h], eax
pop	edi
mov	eax, esi
pop	esi
retn	4

loc_7D8519:
xor	eax, eax
mov	[esi+20h], eax
pop	edi
mov	eax, esi
pop	esi
retn	4
sub_7D84C0 endp

align 10h



sub_7D8530 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_7D8589
mov	eax, [edi]
mov	edx, [eax+0Ch]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_7D8589
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1F8h
push	esi
call	eax
test	eax, eax
jz	short loc_7D8589
mov	ecx, [esp+8+arg_C]
mov	edx, [esp+8+arg_8]
push	ecx
mov	ecx, [esp+0Ch+arg_4]
push	edx
push	ecx
push	edi
mov	ecx, eax
call	sub_7D8380
pop	edi
pop	esi
retn	10h

loc_7D8589:
pop	edi
xor	eax, eax
pop	esi
retn	10h
sub_7D8530 endp




sub_7D8590 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, ecx
test	edi, edi
jz	short loc_7D85DA
mov	eax, [edi]
mov	edx, [eax+0Ch]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_7D85DA
mov	ecx, dword_1855FC0
lea	edx, [esp+8+arg_0]
push	edx
mov	[esp+0Ch+arg_0], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1F8h
push	esi
call	eax
test	eax, eax
jz	short loc_7D85DA
push	edi
mov	ecx, eax
call	sub_7D84C0
pop	edi
pop	esi
retn	4

loc_7D85DA:
pop	edi
xor	eax, eax
pop	esi
retn	4
sub_7D8590 endp

align 10h



sub_7D85F0 proc	near
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	8
call	edx
test	eax, eax
jz	short loc_7D8619
mov	dword ptr [eax], offset	off_155F500
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], offset	off_1456C40
retn

loc_7D8619:
xor	eax, eax
retn
sub_7D85F0 endp

align 10h



sub_7D8620 proc	near
xor	eax, eax
cmp	[ecx+8], eax
setnz	al
retn
sub_7D8620 endp

align 10h



sub_7D8630 proc	near
mov	eax, [ecx+8]
test	eax, eax
jnz	short loc_7D863B
or	eax, 0FFFFFFFFh
retn

loc_7D863B:
mov	eax, [eax+4Ch]
retn
sub_7D8630 endp

align 10h



sub_7D8640 proc	near
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
cdq
retn
sub_7D8640 endp

align 10h



sub_7D8650 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+8]
test	eax, eax
jnz	short loc_7D865E

loc_7D865A:
xor	eax, eax
pop	esi
retn

loc_7D865E:
cmp	dword ptr [eax+48h], 0
jnz	short loc_7D865A
push	ebx
push	edi
mov	edi, [eax+4Ch]
mov	eax, [esi]
mov	edx, [eax+38h]
push	2
push	0
call	edx
mov	ebx, eax
mov	eax, [esi]
mov	edx, [eax+38h]
push	0
push	edi
mov	ecx, esi
call	edx
pop	edi
mov	eax, ebx
pop	ebx
pop	esi
retn
sub_7D8650 endp

align 10h



sub_7D8690 proc	near
mov	eax, [ecx+8]
test	eax, eax
jz	short loc_7D869B
mov	eax, [eax+48h]
retn

loc_7D869B:
xor	eax, eax
retn
sub_7D8690 endp

align 10h



sub_7D86A0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx]
mov	edx, [esp+arg_0]
mov	eax, [eax+38h]
push	1
push	edx
call	eax
retn	4
sub_7D86A0 endp

align 10h



sub_7D86C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+8]
test	eax, eax
jnz	short loc_7D86CE

loc_7D86CA:
xor	eax, eax
pop	esi
retn

loc_7D86CE:
cmp	dword ptr [eax+48h], 0
jnz	short loc_7D86CA
push	ebx
push	edi
mov	edi, [eax+4Ch]
mov	eax, [esi]
mov	edx, [eax+38h]
push	2
push	0
call	edx
mov	ebx, eax
mov	eax, [esi]
mov	edx, [eax+38h]
push	0
push	edi
mov	ecx, esi
call	edx
mov	eax, ebx
sub	eax, edi
pop	edi
pop	ebx
pop	esi
retn
sub_7D86C0 endp

align 10h



sub_7D8700 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
imul	edx, [esp+arg_8]
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+38h]
push	0
push	edx
mov	edx, [esp+8+arg_0]
push	edx
call	eax
retn
sub_7D8700 endp

align 10h



sub_7D8720 proc	near

arg_4= dword ptr  8

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esp+arg_4]
mov	eax, [eax+30h]
push	edx
call	eax
retn
sub_7D8720 endp

align 10h



sub_7D8740 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_8]
push	38h
mov	[eax+28h], ecx
xor	ecx, ecx
mov	[eax+0Ch], edx
mov	edx, [esp+4+arg_C]
push	offset a1_2_3	; "1.2.3"
push	eax
mov	dword ptr [eax+20h], offset sub_7D8700
mov	dword ptr [eax+24h], offset sub_7D8720
mov	[eax], ecx
mov	[eax+4], ecx
mov	[eax+10h], edx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+34h], ecx
call	sub_767C20
add	esp, 0Ch
retn
sub_7D8740 endp

align 10h



sub_7D8790 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
xor	ebx, ebx
mov	esi, ecx
mov	[esi], ebx
cmp	edi, ebx
jz	short loc_7D87B3
mov	ecx, edi
call	sub_64A420
mov	ecx, [esi]
cmp	ecx, ebx
jz	short loc_7D87B3
call	sub_64A430

loc_7D87B3:
mov	[esi], edi
mov	eax, [edi]
mov	edx, [eax+10h]
mov	ecx, edi
call	edx
mov	[esi+3Ch], eax
lea	eax, [esi+4]
mov	[esi+40h], ebx
mov	[esi+44h], bl
mov	[esi+48h], ebx
push	38h
push	offset a1_2_3	; "1.2.3"
push	eax
mov	dword ptr [eax+20h], offset sub_7D8700
mov	dword ptr [eax+24h], offset sub_7D8720
mov	[eax+28h], esi
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+2Ch], ebx
mov	[eax+30h], ebx
mov	[eax+34h], ebx
call	sub_767C20
add	esp, 0Ch
test	eax, eax
mov	eax, esi
jz	short loc_7D8815
pop	edi
mov	dword ptr [esi+48h], 1
pop	esi
pop	ebx
retn	4

loc_7D8815:
pop	edi
mov	[esi+54h], ebx
mov	[esi+50h], ebx
mov	[esi+4Ch], ebx
pop	esi
pop	ebx
retn	4
sub_7D8790 endp

align 10h



sub_7D8830 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
xor	ebx, ebx
lea	edi, [esi+4]
push	edi
mov	[esi+48h], ebx
mov	[esi+44h], bl
call	sub_767B00
add	esp, 4
test	eax, eax
jz	short loc_7D8858
pop	edi
mov	dword ptr [esi+48h], 1
pop	esi
pop	ebx
retn

loc_7D8858:
mov	ecx, [esi]
mov	edx, [esi+3Ch]
mov	[edi], ebx
mov	[esi+8], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	eax, [ecx]
mov	eax, [eax+38h]
push	ebx
push	edx
call	eax
pop	edi
mov	[esi+40h], ebx
mov	[esi+54h], ebx
mov	[esi+50h], ebx
mov	[esi+4Ch], ebx
pop	esi
pop	ebx
retn
sub_7D8830 endp

align 10h



sub_7D8890 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi+48h], 0
jz	short loc_7D889F
xor	eax, eax
pop	esi
retn	8

loc_7D889F:
mov	eax, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	edi
mov	[esi+10h], eax
mov	[esi+14h], ebp
nop

loc_7D88B0:
cmp	dword ptr [esi+8], 0
jnz	short loc_7D88D5
mov	ecx, [esi]
mov	edx, [ecx]
mov	eax, [edx+28h]
push	1000h
lea	edi, [esi+858h]
push	edi
call	eax
test	eax, eax
jz	short loc_7D8918
mov	[esi+4], edi
mov	[esi+8], eax

loc_7D88D5:
lea	ecx, [esi+4]
push	2
push	ecx
call	sub_767D20
add	esp, 8
cmp	eax, 1
jz	short loc_7D88FF
test	eax, eax
jnz	short loc_7D8911
cmp	[esi+14h], eax
jnz	short loc_7D88B0
sub	ebp, [esi+14h]
pop	edi
mov	eax, ebp
add	[esi+40h], eax
pop	ebp
pop	esi
retn	8

loc_7D88FF:
sub	ebp, [esi+14h]
pop	edi
mov	eax, ebp
add	[esi+40h], eax
pop	ebp
mov	byte ptr [esi+44h], 1
pop	esi
retn	8

loc_7D8911:
mov	dword ptr [esi+48h], 1

loc_7D8918:
sub	ebp, [esi+14h]
pop	edi
mov	eax, ebp
add	[esi+40h], eax
pop	ebp
pop	esi
retn	8
sub_7D8890 endp

align 10h



sub_7D8930 proc	near
mov	eax, [ecx+8]
test	eax, eax
jz	short loc_7D8940
mov	ecx, [eax]
mov	eax, [ecx]
mov	edx, [eax+4]
jmp	edx

loc_7D8940:
xor	eax, eax
retn
sub_7D8930 endp

align 10h



sub_7D8950 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
test	esi, esi
jnz	short loc_7D8960
pop	edi
xor	al, al
pop	esi
retn

loc_7D8960:
cmp	dword ptr [esi+8], 0
jbe	short loc_7D897E
mov	ecx, [esi]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
sub	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+38h]
call	eax

loc_7D897E:
mov	ecx, [edi+8]
add	ecx, 4
push	ebx
push	ecx
call	sub_7690B0
mov	edx, [edi+8]
mov	ecx, [edx]
mov	ebx, eax
mov	eax, [ecx]
mov	edx, [eax+48h]
add	esp, 4
call	edx
mov	esi, [edi+8]
test	esi, esi
jz	short loc_7D89BC
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D89AE
call	sub_64A430

loc_7D89AE:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D89BC:
xor	eax, eax
test	ebx, ebx
pop	ebx
mov	dword ptr [edi+8], 0
pop	edi
setz	al
pop	esi
retn
sub_7D8950 endp

align 10h



sub_7D89D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4Ch]
mov	ecx, [esi+40h]
cmp	eax, ecx
push	edi
mov	edi, [esp+18h+arg_4]
mov	[esp+18h+var_8], 0
jge	loc_7D8A79
sub	ecx, eax
cmp	ecx, edi
mov	[esp+18h+var_8], ecx
mov	ebp, edi
jg	short loc_7D8A01
mov	ebp, ecx

loc_7D8A01:
mov	edx, [esi+50h]
cmp	ecx, edx
mov	eax, ebp
mov	[esp+18h+var_4], eax
jle	short loc_7D8A48
mov	edi, [esi+54h]
mov	eax, edi
sub	eax, ecx
add	eax, edx
sub	edi, eax
cmp	edi, ebp
jle	short loc_7D8A1F
mov	edi, ebp

loc_7D8A1F:
mov	ebx, [esp+18h+arg_0]
push	edi
lea	eax, [eax+esi+58h]
push	eax
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
sub	[esp+24h+var_8], edi
mov	eax, [esp+24h+var_4]
mov	ecx, [esp+24h+var_8]
sub	ebp, edi
add	esp, 0Ch
add	ebx, edi
mov	edi, [esp+18h+arg_4]
jmp	short loc_7D8A4C

loc_7D8A48:
mov	ebx, [esp+18h+arg_0]

loc_7D8A4C:
test	ebp, ebp
jle	short loc_7D8A6E
mov	edx, [esi+50h]
sub	edx, ecx
push	ebp
lea	eax, [edx+esi+58h]
push	eax
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+24h+var_4]
mov	edi, [esp+24h+arg_4]
add	esp, 0Ch
add	ebx, ebp

loc_7D8A6E:
sub	edi, eax
add	[esi+4Ch], eax
mov	[esp+18h+var_8], eax
jmp	short loc_7D8A7D

loc_7D8A79:
mov	ebx, [esp+18h+arg_0]

loc_7D8A7D:
test	edi, edi
jle	loc_7D8B40
push	edi
push	ebx
mov	ecx, esi
call	sub_7D8890
mov	edi, eax
mov	eax, 800h
cmp	edi, eax
jl	short loc_7D8ACA
push	eax
lea	ecx, [edi+ebx-800h]
push	ecx
lea	edx, [esi+58h]
push	edx
mov	[esi+50h], eax
mov	[esi+54h], eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi+40h]
add	esp, 0Ch
mov	[esi+4Ch], eax
mov	eax, [esp+18h+var_8]
add	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_7D8ACA:
test	edi, edi
jle	short loc_7D8B2A
sub	eax, [esi+50h]
cmp	eax, edi
mov	ebp, eax
jl	short loc_7D8AD9
mov	ebp, edi

loc_7D8AD9:
test	ebp, ebp
jle	short loc_7D8AF4
mov	eax, [esi+50h]
push	ebp
lea	ecx, [eax+esi+58h]
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
add	ebx, ebp
add	[esi+50h], ebp

loc_7D8AF4:
cmp	edi, ebp
jle	short loc_7D8B0D
mov	eax, edi
sub	eax, ebp
push	eax
lea	edx, [esi+58h]
push	ebx
push	edx
mov	[esi+50h], eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7D8B0D:
mov	eax, [esi+54h]
cmp	eax, 800h
jge	short loc_7D8B2A
add	eax, edi
cmp	eax, 800h
mov	[esi+54h], eax
jle	short loc_7D8B2A
mov	dword ptr [esi+54h], 800h

loc_7D8B2A:
mov	eax, [esi+40h]
mov	[esi+4Ch], eax
mov	eax, [esp+18h+var_8]
add	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_7D8B40:
mov	eax, [esp+18h+var_8]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_7D89D0 endp

align 10h



sub_7D8B50 proc	near

var_1004= byte ptr -1004h
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, 1004h
call	__alloca_probe
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+1004h+var_4], eax
push	esi
mov	esi, ecx
mov	eax, [esi+40h]
push	edi
mov	edi, [esp+100Ch+arg_0]
cmp	edi, eax
jge	short loc_7D8B8F
sub	eax, [esi+54h]
cmp	edi, eax
jl	short loc_7D8B88
mov	[esi+4Ch], edi
mov	eax, edi
jmp	short loc_7D8BCA

loc_7D8B88:
call	sub_7D8830
jmp	short loc_7D8B94

loc_7D8B8F:
jle	short loc_7D8B94
mov	[esi+4Ch], eax

loc_7D8B94:
cmp	[esi+4Ch], edi
jge	short loc_7D8BC7
lea	esp, [esp+0]

loc_7D8BA0:
mov	eax, edi
sub	eax, [esi+4Ch]
cmp	eax, 1000h
jl	short loc_7D8BB1
mov	eax, 1000h

loc_7D8BB1:
push	eax
lea	eax, [esp+1010h+var_1004]
push	eax
mov	ecx, esi
call	sub_7D89D0
test	eax, eax
jz	short loc_7D8BC7
cmp	[esi+4Ch], edi
jl	short loc_7D8BA0

loc_7D8BC7:
mov	eax, [esi+4Ch]

loc_7D8BCA:
mov	ecx, [esp+100Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 1004h
retn	4
sub_7D8B50 endp

align 10h



sub_7D8BF0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
mov	dword ptr [edi], offset	off_1456CE0
test	esi, esi
jz	short loc_7D8C4E
cmp	dword ptr [esi+8], 0
jbe	short loc_7D8C1F
mov	ecx, [esi]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
sub	eax, [esi+8]
mov	ecx, [esi]
mov	edx, [ecx]
push	0
push	eax
mov	eax, [edx+38h]
call	eax

loc_7D8C1F:
mov	ecx, [edi+8]
add	ecx, 4
push	ecx
call	sub_7690B0
mov	esi, [edi+8]
add	esp, 4
test	esi, esi
jz	short loc_7D8C4E
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D8C40
call	sub_64A430

loc_7D8C40:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_7D8C4E:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_64A3F0
sub_7D8BF0 endp

align 10h



sub_7D8C60 proc	near
mov	ecx, [ecx+8]
test	ecx, ecx
jnz	short loc_7D8C6D
or	eax, 0FFFFFFFFh
retn	8

loc_7D8C6D:
jmp	sub_7D89D0
sub_7D8C60 endp

align 10h



sub_7D8C80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
test	ecx, ecx
jnz	short loc_7D8C91
or	eax, 0FFFFFFFFh
pop	esi
retn	8

loc_7D8C91:
cmp	dword ptr [ecx+48h], 0
jz	short loc_7D8C9E
mov	eax, [ecx+4Ch]
pop	esi
retn	8

loc_7D8C9E:
mov	eax, [esp+4+arg_4]
sub	eax, 0
jz	short loc_7D8CF0
sub	eax, 1
jz	short loc_7D8CD9
sub	eax, 1
jnz	short loc_7D8CFA
push	7FFFFFFFh
call	sub_7D8B50
mov	eax, [esp+4+arg_0]
test	eax, eax
jz	short loc_7D8CFA
mov	ecx, [esi+8]
add	eax, [ecx+4Ch]
push	eax
call	sub_7D8B50
mov	eax, [esi+8]
mov	eax, [eax+4Ch]
pop	esi
retn	8

loc_7D8CD9:
mov	eax, [esp+4+arg_0]
add	eax, [ecx+4Ch]
push	eax
call	sub_7D8B50
mov	eax, [esi+8]
mov	eax, [eax+4Ch]
pop	esi
retn	8

loc_7D8CF0:
mov	eax, [esp+4+arg_0]
push	eax
call	sub_7D8B50

loc_7D8CFA:
mov	eax, [esi+8]
mov	eax, [eax+4Ch]
pop	esi
retn	8
sub_7D8C80 endp

align 10h



sub_7D8D10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1456CE0
mov	dword ptr [esi+8], 0
test	edi, edi
jz	short loc_7D8D80
mov	eax, [edi]
mov	edx, [eax+8]
mov	ecx, edi
call	edx
test	al, al
jz	short loc_7D8D80
mov	ecx, dword_1855FC0
lea	edx, [esp+0Ch+var_4]
push	edx
mov	[esp+10h+var_4], 2
mov	eax, [ecx]
mov	eax, [eax+38h]
push	1858h
push	esi
call	eax
test	eax, eax
jz	short loc_7D8D7B
push	edi
mov	ecx, eax
call	sub_7D8790
mov	[esi+8], eax
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	4

loc_7D8D7B:
xor	eax, eax
mov	[esi+8], eax

loc_7D8D80:
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	4
sub_7D8D10 endp

align 10h



sub_7D8D90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7D8BF0
test	[esp+4+arg_0], 1
jz	short loc_7D8DAD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D8DAD:
mov	eax, esi
pop	esi
retn	4
sub_7D8D90 endp

align 10h



; int __thiscall sub_7D8DC0(void *, char)
sub_7D8DC0 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1456D2C
jz	short loc_7D8DD9
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7D8DD9:
mov	eax, esi
pop	esi
retn	4
sub_7D8DC0 endp

align 10h



sub_7D8DE0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
inc	dword ptr [ecx+10h]
retn	4
sub_7D8DE0 endp

align 10h



sub_7D8DF0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
inc	dword ptr [edx+10h]
retn	4
sub_7D8DF0 endp




sub_7D8E00 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	9F0h
call	edx
test	eax, eax
jz	short loc_7D8E47
mov	ecx, [esi+8]
mov	[eax+9ECh], ecx
mov	[esi+8], eax
mov	ecx, 7Fh
lea	esp, [esp+0]

loc_7D8E30:
mov	dword ptr [eax], 0
mov	edx, [esi+4]
mov	[eax+4], edx
mov	[esi+4], eax
add	eax, 14h
sub	ecx, 1
jnz	short loc_7D8E30

loc_7D8E47:
pop	esi
retn
sub_7D8E00 endp

align 10h



sub_7D8E50 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+14h]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	7F0h
call	edx
lea	ecx, [eax+7]
and	ecx, 0FFFFFFF8h
jz	short loc_7D8EB3
mov	[ecx+7E4h], eax
mov	eax, [esi+10h]
mov	[ecx+7E0h], eax
push	edi
mov	[esi+10h], ecx
lea	eax, [ecx+18h]
mov	edi, 1Ch

loc_7D8E87:
mov	edx, [esi+0Ch]
mov	[eax-18h], edx
lea	ecx, [eax-18h]
mov	[eax-0Ch], ecx
lea	edx, [eax-0Ch]
mov	[eax], edx
lea	ecx, [eax+0Ch]
mov	[ecx], eax
lea	edx, [eax+18h]
mov	[edx], ecx
lea	ecx, [eax+24h]
add	eax, 48h
sub	edi, 1
mov	[ecx], edx
mov	[esi+0Ch], ecx
jnz	short loc_7D8E87
pop	edi

loc_7D8EB3:
pop	esi
retn
sub_7D8E50 endp

align 10h



sub_7D8EC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
cmp	ebx, 0Ch
jnb	short loc_7D8EEB
cmp	dword ptr [edi+0Ch], 0
jnz	short loc_7D8ED9
call	sub_7D8E50

loc_7D8ED9:
mov	eax, [edi+0Ch]
xor	esi, esi
test	eax, eax
jz	short loc_7D8EFD
mov	esi, eax
mov	eax, [eax]
mov	[edi+0Ch], eax
jmp	short loc_7D8EFD

loc_7D8EEB:
mov	ecx, [edi+14h]
mov	edx, [ecx]
mov	edx, [edx+28h]
push	0
lea	eax, [ebx+1]
push	eax
call	edx
mov	esi, eax

loc_7D8EFD:
test	esi, esi
jz	short loc_7D8F14
mov	eax, [esp+0Ch+arg_0]
push	ebx
push	eax
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	byte ptr [esi+ebx], 0

loc_7D8F14:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_7D8EC0 endp

align 10h



sub_7D8F20 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi]
mov	esi, ecx
test	eax, eax
jz	short loc_7D8F64
cmp	dword ptr [edi+0Ch], 0Ch
jnb	short loc_7D8F50
mov	ecx, [esi+0Ch]
mov	[eax], ecx
mov	[esi+0Ch], eax
mov	dword ptr [edi], 0
mov	ecx, [esi+4]
mov	[edi+4], ecx
mov	[esi+4], edi
pop	edi
pop	esi
retn	4

loc_7D8F50:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7D8F64:
mov	ecx, [esi+4]
mov	[edi+4], ecx
mov	[esi+4], edi
pop	edi
pop	esi
retn	4
sub_7D8F20 endp

align 10h



sub_7D8F80 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+3Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	48h
call	edx
test	eax, eax
jz	short loc_7D8F9F
push	esi
mov	ecx, eax
call	sub_7DAF50
pop	esi
retn

loc_7D8F9F:
xor	eax, eax
pop	esi
retn
sub_7D8F80 endp

align 10h



sub_7D8FB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jnz	short loc_7D8FC3
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_7D8FE5

loc_7D8FC3:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_7D8FEA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, esi

loc_7D8FE5:
call	sub_7D9270

loc_7D8FEA:
mov	eax, [esi]
mov	ecx, [esp+8+arg_8]
and	ecx, [eax+4]
inc	dword ptr [eax]
mov	eax, [esi]
mov	ebp, [eax+ecx*8+8]
mov	esi, 0FFFFFFFEh
cmp	ebp, esi
jnz	short loc_7D901B
mov	edx, [esp+8+arg_4]
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
mov	edx, [edx]
pop	esi
mov	[eax+ecx*8+0Ch], edx
pop	ebp
retn	0Ch

loc_7D901B:
push	edi
mov	edi, [eax+4]
mov	edx, ecx

loc_7D9021:
inc	edx
and	edx, edi
cmp	[eax+edx*8+8], esi
jnz	short loc_7D9021
mov	esi, [eax+ecx*8+0Ch]
mov	esi, [esi+8]
and	esi, edi
push	ebx
lea	ebx, [eax+edx*8+8]
cmp	esi, ecx
jnz	short loc_7D905E
test	ebx, ebx
jz	short loc_7D9049
mov	[ebx], ebp
mov	esi, [eax+ecx*8+0Ch]
mov	[ebx+4], esi

loc_7D9049:
mov	esi, [esp+10h+arg_4]
mov	esi, [esi]
pop	ebx
pop	edi
mov	[eax+ecx*8+0Ch], esi
pop	esi
mov	[eax+ecx*8+8], edx
pop	ebp
retn	0Ch

loc_7D905E:
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jz	short loc_7D907C
jmp	short loc_7D9070
align 10h

loc_7D9070:
mov	esi, [esi]
cmp	[eax+esi*8+8], ecx
lea	esi, [eax+esi*8+8]
jnz	short loc_7D9070

loc_7D907C:
test	ebx, ebx
jz	short loc_7D9089
mov	[ebx], ebp
mov	edi, [eax+ecx*8+0Ch]
mov	[ebx+4], edi

loc_7D9089:
mov	[esi], edx
mov	edx, [esp+10h+arg_4]
mov	edx, [edx]
pop	ebx
pop	edi
pop	esi
mov	[eax+ecx*8+0Ch], edx
mov	dword ptr [eax+ecx*8+8], 0FFFFFFFFh
pop	ebp
retn	0Ch
sub_7D8FB0 endp

align 10h



sub_7D90B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [ecx]
push	ebp
mov	ebp, [esp+8+arg_4]
cmp	dword ptr [eax+ebp*8+8], 0FFFFFFFEh
push	esi
lea	esi, [eax+ebp*8+8]
push	edi
mov	[esp+10h+var_4], ecx
mov	edi, ebp
jz	short loc_7D9135
mov	ecx, [esi+4]
mov	edx, [ecx+8]
and	edx, [eax+4]
cmp	edx, ebp
jnz	short loc_7D9135
push	ebx
mov	ebx, [esp+14h+arg_0]
lea	ecx, [ecx+0]

loc_7D90E0:
mov	ecx, [esi+4]
mov	edx, [ecx+8]
and	edx, [eax+4]
cmp	edx, ebp
jnz	short loc_7D910D
mov	eax, [ebx+8]
cmp	[ecx+0Ch], eax
jnz	short loc_7D910D
mov	ecx, [ecx]
push	eax		; size_t
mov	eax, [ebx]
push	eax		; char *
push	ecx		; char *
call	_strncmp
add	esp, 0Ch
test	eax, eax
setz	al
test	al, al
jnz	short loc_7D9120

loc_7D910D:
mov	edi, [esi]
cmp	edi, 0FFFFFFFFh
jz	short loc_7D912A
mov	edx, [esp+14h+var_4]
mov	eax, [edx]
lea	esi, [eax+edi*8+8]
jmp	short loc_7D90E0

loc_7D9120:
pop	ebx
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8

loc_7D912A:
pop	ebx
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8

loc_7D9135:
pop	edi
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
pop	ecx
retn	8
sub_7D90B0 endp

align 10h



sub_7D9140 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_7D914F
call	sub_64A400

loc_7D914F:
mov	ecx, esi
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7D916B
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D916B:
mov	eax, esi
pop	esi
retn	4
sub_7D9140 endp

align 10h



sub_7D9180 proc	near

arg_0= dword ptr  4

mov	ecx, [ecx+3Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0Ch
call	edx
test	eax, eax
jz	short loc_7D91B7
mov	ecx, [esp+arg_0]
mov	dword ptr [eax], offset	off_155F500
mov	edx, 1
mov	[eax+4], edx
mov	dword ptr [eax], offset	off_1456D30
test	ecx, ecx
jz	short loc_7D91B1
add	[ecx+4], edx

loc_7D91B1:
mov	[eax+8], ecx
retn	4

loc_7D91B7:
xor	eax, eax
retn	4
sub_7D9180 endp

align 10h



sub_7D91C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	edi
mov	edi, [ecx]
mov	[esp+0Ch+var_4], ecx
test	edi, edi
jz	loc_7D9262
mov	eax, [esp+0Ch+arg_0]
mov	eax, [eax]
mov	edx, [eax+8]
push	ebx
mov	ebx, [edi+4]
and	edx, ebx
cmp	dword ptr [edi+edx*8+8], 0FFFFFFFEh
mov	[esp+10h+var_8], eax
lea	eax, [edi+edx*8+8]
jz	short loc_7D9261
mov	ecx, [eax+4]
mov	ecx, [ecx+8]
and	ecx, ebx
cmp	ecx, edx
jnz	short loc_7D9261
push	ebp
mov	[esp+14h+arg_0], edx
or	ebp, 0FFFFFFFFh
push	esi

loc_7D9205:
mov	esi, [eax+4]
mov	ecx, [esi+8]
and	ecx, ebx
cmp	ecx, [esp+18h+arg_0]
jnz	short loc_7D9219
cmp	esi, [esp+18h+var_8]
jz	short loc_7D9228

loc_7D9219:
mov	ebp, edx
mov	edx, [eax]
cmp	edx, 0FFFFFFFFh
jz	short loc_7D925F
lea	eax, [edi+edx*8+8]
jmp	short loc_7D9205

loc_7D9228:
cmp	[esp+18h+arg_0], edx
mov	edx, [eax]
jnz	short loc_7D924D
cmp	edx, 0FFFFFFFFh
jz	short loc_7D9251
lea	edx, [edi+edx*8+8]
mov	dword ptr [eax], 0FFFFFFFEh
mov	ecx, [edx]
mov	[eax], ecx
mov	ecx, [edx+4]
mov	[eax+4], ecx
mov	eax, edx
jmp	short loc_7D9251

loc_7D924D:
mov	[edi+ebp*8+8], edx

loc_7D9251:
mov	dword ptr [eax], 0FFFFFFFEh
mov	eax, [esp+18h+var_4]
mov	eax, [eax]
dec	dword ptr [eax]

loc_7D925F:
pop	esi
pop	ebp

loc_7D9261:
pop	ebx

loc_7D9262:
pop	edi
add	esp, 8
retn	4
sub_7D91C0 endp

align 10h



sub_7D9270 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	edi, ecx
mov	[esp+10h+var_C], edi
test	eax, eax
jnz	short loc_7D928E
call	sub_716800
pop	edi
add	esp, 0Ch
retn	8

loc_7D928E:
push	ebp
push	esi
cmp	eax, 8
jnb	short loc_7D929C
mov	esi, 8
jmp	short loc_7D9301

loc_7D929C:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_7D92AF
fadd	ds:flt_15FCC08

loc_7D92AF:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	cl, byte ptr [esp+18h+var_8]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_7D9301:
mov	ecx, dword_1855FC0
mov	ebp, [esp+18h+arg_0]
lea	edx, [esp+18h+var_8]
push	edx
lea	edx, ds:8[esi*8]
mov	[esp+1Ch+arg_4], 0
mov	dword ptr [esp+1Ch+var_8], 145h
mov	eax, [ecx]
mov	eax, [eax+38h]
push	edx
push	ebp
call	eax
mov	[esp+18h+arg_4], eax
mov	dword ptr [eax], 0
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
xor	eax, eax
mov	[edx+4], ecx
test	esi, esi
jbe	short loc_7D9361
lea	ebx, [ebx+0]

loc_7D9350:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [ecx+eax*8+8], 0FFFFFFFEh
inc	eax
cmp	eax, esi
jb	short loc_7D9350

loc_7D9361:
mov	eax, [edi]
test	eax, eax
jz	short loc_7D93BA
push	ebx
mov	ebx, [eax+4]
xor	edi, edi
lea	ecx, [ecx+0]

loc_7D9370:
mov	edx, [esp+1Ch+var_C]
mov	eax, [edx]
cmp	dword ptr [eax+edi*8+8], 0FFFFFFFEh
lea	esi, [eax+edi*8+8]
jz	short loc_7D939C
mov	ecx, [esi+4]
mov	edx, [ecx+8]
lea	eax, [esi+4]
push	edx
push	eax
push	ebp
lea	ecx, [esp+28h+arg_4]
call	sub_7D8FB0
mov	dword ptr [esi], 0FFFFFFFEh

loc_7D939C:
inc	edi
cmp	edi, ebx
jbe	short loc_7D9370
mov	ecx, dword_1855FC0
mov	edx, [esp+1Ch+var_C]
mov	eax, [ecx]
mov	edx, [edx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	edi, [esp+1Ch+var_C]
pop	ebx

loc_7D93BA:
mov	ecx, [esp+18h+arg_4]
pop	esi
pop	ebp
mov	[edi], ecx
pop	edi
add	esp, 0Ch
retn	8
sub_7D9270 endp

align 10h



sub_7D93D0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_4]
push	esi
push	1505h
push	ebp
push	eax
mov	esi, ecx
mov	[esp+24h+var_C], eax
call	sub_679AD0
mov	ebx, eax
mov	eax, [esi]
and	ebx, offset sub_FFFFFF
mov	[esp+18h+var_8], ebx
mov	[esp+18h+var_4], ebp
test	eax, eax
jz	short loc_7D942B
mov	eax, [eax+4]
and	eax, ebx
push	eax
lea	eax, [esp+1Ch+var_C]
push	eax
mov	ecx, esi
call	sub_7D90B0
test	eax, eax
jl	short loc_7D942B
mov	ecx, [esi]
mov	eax, [ecx+eax*8+0Ch]
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_7D942B:
test	ebp, ebp
jnz	short loc_7D943B
lea	eax, [esi+18h]
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_7D943B:
cmp	dword ptr [esi+4], 0
jnz	short loc_7D9448
mov	ecx, esi
call	sub_7D8E00

loc_7D9448:
push	edi
mov	edi, [esi+4]
test	edi, edi
jz	short loc_7D9456
mov	edx, [edi+4]
mov	[esi+4], edx

loc_7D9456:
mov	eax, [esp+1Ch+arg_0]
push	ebp
push	eax
mov	ecx, esi
mov	[edi+4], esi
mov	[esp+24h+arg_4], edi
call	sub_7D8EC0
mov	[edi], eax
test	eax, eax
jz	short loc_7D9497
push	ebx
lea	ecx, [esp+20h+arg_4]
push	ecx
mov	dword ptr [edi+10h], 0
mov	[edi+0Ch], ebp
push	esi
mov	ecx, esi
mov	[edi+8], ebx
call	sub_7D8FB0
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8

loc_7D9497:
push	edi
mov	ecx, esi
call	sub_7D8F20
pop	edi
lea	eax, [esi+18h]
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	8
sub_7D93D0 endp

align 10h



sub_7D94B0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, [ecx]
add	dword ptr [esi+10h], 0FFFFFFFFh
jnz	short loc_7D94D4
mov	ecx, [esi+4]
lea	eax, [esp+8+var_4]
push	eax
mov	[esp+0Ch+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D94D4:
pop	esi
pop	ecx
retn
sub_7D94B0 endp

align 10h



sub_7D94E0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
inc	dword ptr [ebx+10h]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi]
add	dword ptr [esi+10h], 0FFFFFFFFh
jnz	short loc_7D950E
mov	ecx, [esi+4]
lea	eax, [esp+0Ch+arg_0]
push	eax
mov	[esp+10h+arg_0], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D950E:
mov	[edi], ebx
pop	edi
pop	esi
pop	ebx
retn	4
sub_7D94E0 endp

align 10h



sub_7D9520 proc	near

var_4= dword ptr -4

push	ecx
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
mov	[esi], edi
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+3Ch]
push	esi
call	edx
push	1505h
push	edi
push	offset byte_146D660
mov	[esi+14h], eax
mov	[esi+8], edi
mov	[esi+4], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	dword ptr [esi+28h], 1
mov	[esi+24h], edi
call	sub_679AD0
and	eax, offset sub_FFFFFF
mov	[esi+20h], eax
lea	eax, [esi+18h]
mov	dword ptr [eax], offset	byte_146D660
mov	[esi+1Ch], esi
mov	[esp+0Ch+var_4], eax
mov	eax, [eax+8]
push	eax
lea	ecx, [esp+10h+var_4]
push	ecx
push	esi
mov	ecx, esi
call	sub_7D8FB0
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn
sub_7D9520 endp

align 10h



sub_7D9590 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+8], 0
jz	short loc_7D95F5
push	ebx
push	ebp
push	edi
lea	esp, [esp+0]

loc_7D95A0:
mov	ebx, [esi+8]
mov	eax, [ebx+9ECh]
mov	[esi+8], eax
mov	edi, ebx
mov	ebp, 7Fh

loc_7D95B3:
mov	eax, [edi]
test	eax, eax
jz	short loc_7D95D7
cmp	dword ptr [edi+0Ch], 0Ch
jnb	short loc_7D95C9
mov	ecx, [esi+0Ch]
mov	[eax], ecx
mov	[esi+0Ch], eax
jmp	short loc_7D95D7

loc_7D95C9:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax

loc_7D95D7:
add	edi, 14h
sub	ebp, 1
jnz	short loc_7D95B3
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	ebx
call	eax
cmp	[esi+8], ebp
jnz	short loc_7D95A0
pop	edi
pop	ebp
pop	ebx

loc_7D95F5:
cmp	dword ptr [esi+10h], 0
jz	short loc_7D9626
jmp	short loc_7D9600
align 10h

loc_7D9600:
mov	eax, [esi+10h]
mov	edx, [eax+7E4h]
mov	ecx, [eax+7E0h]
mov	[esi+10h], ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
push	edx
mov	edx, [eax+30h]
call	edx
cmp	dword ptr [esi+10h], 0
jnz	short loc_7D9600

loc_7D9626:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7D965F
mov	edx, [ecx+4]
xor	eax, eax

loc_7D9631:
mov	ecx, [esi]
cmp	dword ptr [ecx+eax*8+8], 0FFFFFFFEh
lea	ecx, [ecx+eax*8+8]
jz	short loc_7D9644
mov	dword ptr [ecx], 0FFFFFFFEh

loc_7D9644:
inc	eax
cmp	eax, edx
jbe	short loc_7D9631
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_7D965F:
pop	esi
retn
sub_7D9590 endp

align 10h



sub_7D9670 proc	near

arg_0= byte ptr	 4

sub	ecx, 8
jmp	sub_7D9950
sub_7D9670 endp

align 10h



sub_7D9680 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi+8], offset off_1456D2C
mov	[esi+0Ch], eax
lea	ecx, [esi+10h]
mov	dword ptr [esi], offset	off_1456D38
mov	dword ptr [esi+8], offset off_1456D34
call	sub_7D9520
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+3Ch]
push	esi
call	eax
mov	[esi+3Ch], eax
mov	eax, esi
pop	esi
retn	4
sub_7D9680 endp

align 10h



sub_7D96D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi+3Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	0
push	3Ch
call	edx
test	eax, eax
jz	short loc_7D9703
mov	edx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	ecx, [esp+10h+arg_0]
inc	dword ptr [ecx+10h]
push	esi
mov	ecx, eax
call	sub_7DAE10
mov	edi, eax
jmp	short loc_7D9705

loc_7D9703:
xor	edi, edi

loc_7D9705:
mov	esi, [esp+0Ch+arg_0]
dec	dword ptr [esi+10h]
cmp	dword ptr [esi+10h], 0
lea	eax, [esi+10h]
jnz	short loc_7D972F
mov	ecx, [esi+4]
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D972F:
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn	4
sub_7D96D0 endp

align 10h



sub_7D9740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi+3Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	edi
push	0
push	24h
call	edx
test	eax, eax
jz	short loc_7D9773
mov	edx, [esp+0Ch+arg_0]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	ecx, [esp+10h+arg_0]
inc	dword ptr [ecx+10h]
push	esi
mov	ecx, eax
call	sub_7DAF10
mov	edi, eax
jmp	short loc_7D9775

loc_7D9773:
xor	edi, edi

loc_7D9775:
mov	esi, [esp+0Ch+arg_0]
dec	dword ptr [esi+10h]
cmp	dword ptr [esi+10h], 0
lea	eax, [esi+10h]
jnz	short loc_7D979F
mov	ecx, [esi+4]
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D979F:
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn	4
sub_7D9740 endp

align 10h



sub_7D97B0 proc	near
mov	ecx, [ecx+3Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	8
call	edx
test	eax, eax
jz	short loc_7D97D0
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
retn

loc_7D97D0:
xor	eax, eax
retn
sub_7D97B0 endp

align 10h



sub_7D97E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	[esi], eax
mov	ecx, 1
add	[eax+10h], ecx
mov	eax, [esp+8+arg_4]
mov	[esi+4], eax
add	[eax+10h], ecx
mov	eax, [esp+8+arg_0]
push	edi
mov	edi, eax
add	eax, 10h
mov	dword ptr [esi+8], 0
dec	dword ptr [eax]
cmp	dword ptr [eax], 0
jnz	short loc_7D982E
mov	ecx, [edi+4]
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], edi
call	sub_7D91C0
mov	ecx, [edi+4]
push	edi
call	sub_7D8F20

loc_7D982E:
mov	edi, [esp+0Ch+arg_4]
dec	dword ptr [edi+10h]
cmp	dword ptr [edi+10h], 0
lea	eax, [edi+10h]
jnz	short loc_7D9858
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, [edi+4]
mov	[esp+10h+var_4], edi
call	sub_7D91C0
mov	ecx, [edi+4]
push	edi
call	sub_7D8F20

loc_7D9858:
pop	edi
mov	eax, esi
pop	esi
pop	ecx
retn	8
sub_7D97E0 endp




sub_7D9860 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 8
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi], offset	off_1456D3C
mov	ecx, 1
mov	[esi+4], ecx
mov	[esi+8], eax
add	[eax+10h], ecx
mov	eax, [esp+0Ch+arg_4]
mov	[esi+0Ch], eax
add	[eax+10h], ecx
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+10h]
push	edi
mov	edi, eax
add	eax, 10h
cmp	dword ptr [eax], 0
jnz	short loc_7D98BA
mov	ecx, [edi+4]
lea	eax, [esp+10h+var_8]
push	eax
mov	[esp+14h+var_8], edi
call	sub_7D91C0
mov	ecx, [edi+4]
push	edi
call	sub_7D8F20

loc_7D98BA:
mov	edi, [esp+10h+arg_4]
dec	dword ptr [edi+10h]
cmp	dword ptr [edi+10h], 0
lea	eax, [edi+10h]
jnz	short loc_7D98E4
lea	ecx, [esp+10h+var_4]
push	ecx
mov	ecx, [edi+4]
mov	[esp+14h+var_4], edi
call	sub_7D91C0
mov	ecx, [edi+4]
push	edi
call	sub_7D8F20

loc_7D98E4:
pop	edi
mov	eax, esi
pop	esi
add	esp, 8
retn	8
sub_7D9860 endp

align 10h



sub_7D98F0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+0Ch]
add	dword ptr [esi+10h], 0FFFFFFFFh
jnz	short loc_7D9918
mov	ecx, [esi+4]
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D9918:
mov	esi, [edi+8]
add	dword ptr [esi+10h], 0FFFFFFFFh
jnz	short loc_7D993B
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, [esi+4]
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D993B:
mov	ecx, edi
pop	edi
pop	esi
add	esp, 4
jmp	sub_64A3F0
sub_7D98F0 endp

align 10h



sub_7D9950 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	dword ptr [esi], offset	off_1456D38
mov	dword ptr [esi+8], offset off_1456D34
test	eax, eax
jz	short loc_7D9971
mov	dword ptr [eax+118h], 0

loc_7D9971:
lea	ecx, [esi+10h]
call	sub_7D9590
mov	ecx, esi
mov	dword ptr [esi+8], offset off_1456D2C
call	sub_64A3F0
test	[esp+4+arg_0], 1
jz	short loc_7D999C
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D999C:
mov	eax, esi
pop	esi
retn	4
sub_7D9950 endp

align 10h



sub_7D99B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [ecx+3Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	edi
push	0
push	0Ch
call	edx
test	eax, eax
jz	short loc_7D99F5
mov	edx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	ecx, [esp+10h+arg_4]
mov	edx, 1
add	[ecx+10h], edx
mov	esi, [esp+10h+arg_0]
push	ecx
mov	ecx, esp
mov	[ecx], esi
mov	ecx, [esp+14h+arg_0]
add	[ecx+10h], edx
mov	ecx, eax
call	sub_7D97E0
mov	edi, eax
jmp	short loc_7D99F7

loc_7D99F5:
xor	edi, edi

loc_7D99F7:
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+10h]
mov	esi, eax
add	eax, 10h
cmp	dword ptr [eax], 0
jnz	short loc_7D9A22
mov	ecx, [esi+4]
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D9A22:
mov	esi, [esp+0Ch+arg_4]
dec	dword ptr [esi+10h]
cmp	dword ptr [esi+10h], 0
lea	eax, [esi+10h]
jnz	short loc_7D9A4C
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, [esi+4]
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D9A4C:
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn	8
sub_7D99B0 endp

align 10h



sub_7D9A60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [ecx+3Ch]
mov	eax, [ecx]
mov	edx, [eax+28h]
push	esi
push	edi
push	0
push	10h
call	edx
test	eax, eax
jz	short loc_7D9AA5
mov	edx, [esp+0Ch+arg_4]
push	ecx
mov	ecx, esp
mov	[ecx], edx
mov	ecx, [esp+10h+arg_4]
mov	edx, 1
add	[ecx+10h], edx
mov	esi, [esp+10h+arg_0]
push	ecx
mov	ecx, esp
mov	[ecx], esi
mov	ecx, [esp+14h+arg_0]
add	[ecx+10h], edx
mov	ecx, eax
call	sub_7D9860
mov	edi, eax
jmp	short loc_7D9AA7

loc_7D9AA5:
xor	edi, edi

loc_7D9AA7:
mov	eax, [esp+0Ch+arg_0]
dec	dword ptr [eax+10h]
mov	esi, eax
add	eax, 10h
cmp	dword ptr [eax], 0
jnz	short loc_7D9AD2
mov	ecx, [esi+4]
lea	eax, [esp+0Ch+var_4]
push	eax
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D9AD2:
mov	esi, [esp+0Ch+arg_4]
dec	dword ptr [esi+10h]
cmp	dword ptr [esi+10h], 0
lea	eax, [esi+10h]
jnz	short loc_7D9AFC
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, [esi+4]
mov	[esp+10h+var_4], esi
call	sub_7D91C0
mov	ecx, [esi+4]
push	esi
call	sub_7D8F20

loc_7D9AFC:
mov	eax, edi
pop	edi
pop	esi
pop	ecx
retn	8
sub_7D9A60 endp

align 10h



sub_7D9B10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7D98F0
test	[esp+4+arg_0], 1
jz	short loc_7D9B2D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7D9B2D:
mov	eax, esi
pop	esi
retn	4
sub_7D9B10 endp

align 10h



sub_7D9B40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+28h], eax
retn	4
sub_7D9B40 endp

align 10h



sub_7D9B50 proc	near
mov	eax, [ecx+28h]
mov	edx, [eax+20h]
mov	[ecx+5Ch], edx
mov	byte ptr [ecx+55h], 1
retn	4
sub_7D9B50 endp




sub_7D9B60 proc	near
mov	eax, [ecx+28h]
mov	edx, [eax+20h]
mov	[ecx+5Ch], edx
retn	4
sub_7D9B60 endp

align 10h



sub_7D9B70 proc	near

arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
mov	ecx, [eax+0Ch]
mov	edx, [ecx]
push	ebx
lea	eax, [esp+8+arg_0]
push	eax
mov	[esp+0Ch+arg_0], edx
mov	bl, 1
call	sub_67B600
test	eax, eax
jz	short loc_7D9BE9
push	esi

loc_7D9B90:
movzx	eax, ax
mov	ecx, eax
shr	ecx, 8
movzx	edx, ds:word_1434648[ecx*2]
test	edx, edx
jz	short loc_7D9BE3
cmp	edx, 1
jz	short loc_7D9BCF
mov	ecx, eax
shr	eax, 4
and	eax, 0Fh
and	ecx, 0Fh
add	eax, edx
movzx	edx, ds:word_1434648[eax*2]
mov	esi, 1
shl	esi, cl
and	esi, edx
neg	esi
sbb	esi, esi
neg	esi
jz	short loc_7D9BE3

loc_7D9BCF:
lea	eax, [esp+0Ch+arg_0]
push	eax
call	sub_67B600
test	eax, eax
jnz	short loc_7D9B90
pop	esi
mov	al, bl
pop	ebx
pop	ecx
retn

loc_7D9BE3:
pop	esi
xor	al, al
pop	ebx
pop	ecx
retn

loc_7D9BE9:
mov	al, bl
pop	ebx
pop	ecx
retn
sub_7D9B70 endp

align 10h



sub_7D9BF0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [ebx+34h]
test	esi, esi
jz	short loc_7D9C35
push	edi
mov	edi, edi

loc_7D9C00:
mov	al, [esi+20h]
mov	edi, [esi+18h]
cmp	al, 1
jnz	short loc_7D9C15
push	esi
call	sub_7D9BF0
add	esp, 4
jmp	short loc_7D9C2E

loc_7D9C15:
cmp	al, 3
jnz	short loc_7D9C2E
push	esi
call	sub_7D9B70
add	esp, 4
test	al, al
jz	short loc_7D9C2E
push	esi
mov	ecx, ebx
call	sub_7DAC00

loc_7D9C2E:
mov	esi, edi
test	edi, edi
jnz	short loc_7D9C00
pop	edi

loc_7D9C35:
pop	esi
pop	ebx
retn
sub_7D9BF0 endp

align 10h



sub_7D9C40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+34h]
test	esi, esi
jz	short loc_7D9C66
lea	esp, [esp+0]

loc_7D9C50:
cmp	byte ptr [esi+20h], 1
jnz	short loc_7D9C5F
push	esi
call	sub_7D9BF0
add	esp, 4

loc_7D9C5F:
mov	esi, [esi+18h]
test	esi, esi
jnz	short loc_7D9C50

loc_7D9C66:
pop	esi
retn
sub_7D9C40 endp

align 10h



sub_7D9C70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	edx, 1
test	ecx, ecx
jz	short loc_7D9C87
add	[ecx+4], edx
mov	ecx, [esp+4+arg_0]

loc_7D9C87:
mov	eax, [esp+4+arg_4]
mov	[esi], ecx
test	eax, eax
jz	short loc_7D9C9C
add	[eax+4], edx
mov	eax, [esp+4+arg_4]
mov	ecx, [esp+4+arg_0]

loc_7D9C9C:
mov	[esi+4], eax
test	ecx, ecx
jz	short loc_7D9CAC
call	sub_64A400
mov	eax, [esp+4+arg_4]

loc_7D9CAC:
test	eax, eax
jz	short loc_7D9CB7
mov	ecx, eax
call	sub_64A400

loc_7D9CB7:
mov	eax, esi
pop	esi
retn	8
sub_7D9C70 endp

align 10h



sub_7D9CC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_C]
xor	ebx, ebx
push	edi
mov	[esi+55h], bl
mov	[esi+58h], ebx
mov	[esi+5Ch], ebx
cmp	ecx, ebx
jnz	short loc_7D9D0D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	ebx
push	40h
call	edx
cmp	eax, ebx
jz	short loc_7D9CF8
push	ebx
mov	ecx, eax
call	sub_7D9680
mov	edi, eax
jmp	short loc_7D9CFA

loc_7D9CF8:
xor	edi, edi

loc_7D9CFA:
mov	ecx, [esp+0Ch+arg_C]
cmp	ecx, ebx
jz	short loc_7D9D07
call	sub_64A400

loc_7D9D07:
mov	ecx, edi
mov	[esp+0Ch+arg_C], ecx

loc_7D9D0D:
call	sub_7D8F80
mov	ecx, [esi+50h]
mov	edi, eax
cmp	ecx, ebx
jz	short loc_7D9D20
call	sub_64A400

loc_7D9D20:
mov	[esi+50h], edi
mov	ecx, [esi+8]
cmp	ecx, ebx
jz	short loc_7D9D44
mov	edx, [esp+0Ch+arg_8]
mov	eax, [ecx]
mov	eax, [eax+8]
push	esi
push	edx
mov	edx, [esp+14h+arg_4]
push	edx
call	eax
test	al, al
setz	cl
mov	[esi+55h], cl

loc_7D9D44:
mov	eax, [esi+50h]
cmp	eax, ebx
jz	short loc_7D9D4E
inc	dword ptr [eax+4]

loc_7D9D4E:
mov	edx, [esi+50h]
mov	edi, [esp+0Ch+arg_0]
mov	ecx, edx
mov	[edi], edx
cmp	ecx, ebx
jz	short loc_7D9D62
call	sub_64A400

loc_7D9D62:
mov	eax, [edi]
mov	[esi+50h], ebx
cmp	eax, ebx
jz	short loc_7D9D79
cmp	[esi+54h], bl
jz	short loc_7D9D79
push	eax
call	sub_7D9C40
add	esp, 4

loc_7D9D79:
mov	ecx, [esp+0Ch+arg_C]
cmp	ecx, ebx
jz	short loc_7D9D86
call	sub_64A400

loc_7D9D86:
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	10h
sub_7D9CC0 endp

align 10h



sub_7D9D90 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+28h]
mov	ecx, [eax+20h]
mov	eax, [esi+50h]
add	eax, 8
mov	[esi+5Ch], ecx
mov	ecx, [eax]
push	edi
test	ecx, ecx
jz	short loc_7D9DAD
inc	dword ptr [ecx+4]

loc_7D9DAD:
cmp	dword ptr [esi+0Ch], 0
mov	edi, [eax]
jnz	short loc_7D9DD9
push	ecx
lea	edx, [edi+28h]
mov	ecx, esp
push	edx
call	sub_7D8DE0
mov	ecx, edi
call	sub_7D9740
mov	ecx, [esi+0Ch]
mov	ebx, eax
test	ecx, ecx
jz	short loc_7D9DD6
call	sub_64A400

loc_7D9DD6:
mov	[esi+0Ch], ebx

loc_7D9DD9:
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax+4]
mov	edx, [eax]
push	ecx
push	edx
lea	ecx, [esi+10h]
call	sub_679D10
test	edi, edi
jz	short loc_7D9DF7
mov	ecx, edi
call	sub_64A400

loc_7D9DF7:
pop	edi
pop	esi
pop	ebx
retn	4
sub_7D9D90 endp

align 10h



sub_7D9E00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_7D9E3E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7D30E0
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_7D9E57
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_714BE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_7D9E3E:
cmp	esi, [edi+8]
jb	short loc_7D9E57
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_714BE0

loc_7D9E57:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_7D9E00 endp

align 10h



sub_7D9E60 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
test	eax, eax
jnz	short loc_7D9E90
mov	eax, [edi]
test	eax, eax
jz	short loc_7D9E85
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7D9E85:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_7D9E90:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_7D9EC3
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*8]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_7D9EC3:
lea	eax, [esp+8+arg_4]
push	eax
mov	[esp+0Ch+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+28h]
lea	eax, ds:0[esi*8]
push	eax
call	edx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8
sub_7D9E60 endp

align 10h



sub_7D9EF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_7D9F2E
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*8]
push	ecx
call	sub_7D3240
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_7D9F47
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_7D9E60
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_7D9F2E:
cmp	esi, [edi+8]
jb	short loc_7D9F47
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_7D9E60

loc_7D9F47:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_7D9EF0 endp

align 10h



sub_7D9F50 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+50h]
push	edi
test	eax, eax
jz	short loc_7D9F5E
inc	dword ptr [eax+4]

loc_7D9F5E:
mov	eax, [ebx+30h]
mov	edi, [ebx+50h]
push	esi
lea	esi, [ebx+2Ch]
inc	eax
push	eax
push	esi
mov	ecx, esi
call	sub_7D9E00
mov	ecx, [esi+4]
mov	edx, [esi]
lea	eax, [edx+ecx*4-4]
pop	esi
test	eax, eax
jz	short loc_7D9F89
test	edi, edi
jz	short loc_7D9F87
inc	dword ptr [edi+4]

loc_7D9F87:
mov	[eax], edi

loc_7D9F89:
test	edi, edi
jz	short loc_7D9F94
mov	ecx, edi
call	sub_64A400

loc_7D9F94:
mov	eax, [ebx+28h]
mov	ecx, [eax+1Ch]
pop	edi
mov	[ebx+58h], ecx
pop	ebx
retn
sub_7D9F50 endp




sub_7D9FA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+28h]
mov	ecx, [eax+20h]
push	edi
mov	[esi+5Ch], ecx
lea	ecx, [esi+2Ch]
push	0
push	ecx
call	sub_7D9E00
mov	eax, [esi+50h]
mov	ecx, [eax+8]
add	eax, 8
test	ecx, ecx
jz	short loc_7D9FCC
inc	dword ptr [ecx+4]

loc_7D9FCC:
mov	edi, [eax]
mov	eax, [esi+28h]
mov	ecx, [eax+14h]
mov	eax, [eax+10h]
push	ecx
lea	ebx, [edi+10h]
push	eax
mov	ecx, ebx
call	sub_7D93D0
push	eax
lea	ecx, [esp+18h+var_8]
call	sub_7D8DE0
mov	edx, [esp+14h+var_8]
mov	ecx, [esi+50h]
push	edx
add	ecx, 3Ch
call	sub_7D94E0
lea	ecx, [esp+14h+var_8]
call	sub_7D94B0
mov	eax, [esi+28h]
mov	ecx, [eax+0Ch]
mov	eax, [eax+8]
push	ecx
push	eax
mov	ecx, ebx
call	sub_7D93D0
push	eax
lea	ecx, [esp+18h+var_4]
call	sub_7D8DE0
mov	eax, [esp+14h+var_4]
mov	ecx, [esi+50h]
push	eax
add	ecx, 40h
call	sub_7D94E0
lea	ecx, [esp+14h+var_4]
call	sub_7D94B0
mov	ecx, [esi+28h]
mov	edx, [esi+50h]
mov	al, [ecx+18h]
mov	[edx+44h], al
test	edi, edi
jz	short loc_7DA058
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
add	esp, 8
jmp	sub_64A400

loc_7DA058:
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_7D9FA0 endp

align 10h



sub_7DA060 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+28h]
mov	ecx, [eax+20h]
mov	eax, [esi+50h]
mov	[esi+5Ch], ecx
mov	ecx, [eax+8]
push	edi
mov	[esp+34h+var_14], esi
test	ecx, ecx
jz	short loc_7DA083
inc	dword ptr [ecx+4]

loc_7DA083:
cmp	dword ptr [esi+0Ch], 0
mov	ebx, [eax+8]
mov	[esp+34h+var_24], ebx
jz	loc_7DA11A
mov	edx, [esi+30h]
mov	eax, [esi+2Ch]
mov	ecx, [eax+edx*4-4]
lea	eax, [eax+edx*4-4]
test	ecx, ecx
jz	short loc_7DA0A9
inc	dword ptr [ecx+4]

loc_7DA0A9:
mov	edi, [eax]
mov	eax, [esi+0Ch]
push	eax
mov	ecx, edi
call	sub_7DA970
mov	eax, [esi+10h]
mov	ecx, [esi+14h]
lea	ebp, [esi+10h]
test	eax, eax
jnz	short loc_7DA0C8
mov	eax, offset byte_146D660

loc_7DA0C8:
push	ecx
push	eax
lea	ecx, [ebx+10h]
call	sub_7D93D0
push	eax
lea	ecx, [esp+38h+var_20]
call	sub_7D8DE0
mov	ecx, [esp+34h+var_20]
mov	eax, [esi+0Ch]
push	ecx
lea	ecx, [eax+0Ch]
call	sub_7D94E0
lea	ecx, [esp+34h+var_20]
call	sub_7D94B0
mov	ecx, [esi+0Ch]
test	ecx, ecx
jz	short loc_7DA101
call	sub_64A400

loc_7DA101:
mov	ecx, ebp
mov	dword ptr [esi+0Ch], 0
call	sub_679C50
test	edi, edi
jz	short loc_7DA11A
mov	ecx, edi
call	sub_64A400

loc_7DA11A:
mov	eax, [esp+34h+arg_4]
mov	edx, [eax+4]
mov	eax, [eax]
push	ecx
mov	edi, esp
push	edx
lea	ecx, [ebx+10h]
push	eax
call	sub_7D93D0
push	eax
mov	ecx, edi
call	sub_7D8DE0
mov	ecx, ebx
call	sub_7D96D0
mov	ebx, [esp+34h+arg_8]
xor	edi, edi
mov	edx, eax
mov	[esp+34h+arg_4], edx
cmp	[ebx+4], edi
jbe	short loc_7DA1BD
xor	ebp, ebp

loc_7DA152:
mov	esi, [ebx]
mov	ecx, [esi+ebp+8]
mov	eax, [esi+ebp+0Ch]
add	esi, ebp
push	ecx
mov	[esp+38h+arg_8], esp
push	eax
push	ecx
mov	ecx, [esp+40h+var_24]
add	ecx, 10h
call	sub_7D93D0
mov	ecx, [esp+38h+arg_8]
push	eax
call	sub_7D8DE0
mov	ecx, [esi]
mov	eax, [esi+4]
push	ecx
mov	esi, esp
push	eax
push	ecx
mov	ecx, [esp+44h+var_24]
add	ecx, 10h
call	sub_7D93D0
push	eax
mov	ecx, esi
call	sub_7D8DE0
mov	ecx, [esp+3Ch+var_24]
call	sub_7D99B0
mov	ecx, [esp+34h+arg_4]
push	eax
call	sub_7DA940
inc	edi
add	ebp, 10h
cmp	edi, [ebx+4]
jb	short loc_7DA152
mov	esi, [esp+34h+var_14]
mov	edx, [esp+34h+arg_4]

loc_7DA1BD:
mov	eax, [esi+3Ch]
test	eax, eax
jbe	short loc_7DA1FD
lea	ebx, [eax-1]
test	ebx, ebx
jl	short loc_7DA1FD
mov	ebp, 1

loc_7DA1D0:
mov	eax, [esi+38h]
cmp	dword ptr [eax+ebx*8+4], 0
lea	edi, [eax+ebx*8]
jnz	short loc_7DA202
test	edx, edx
jz	short loc_7DA1E4
add	[edx+4], ebp

loc_7DA1E4:
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7DA1F4
call	sub_64A400
mov	edx, [esp+34h+arg_4]

loc_7DA1F4:
sub	ebx, ebp
mov	[edi+4], edx
jns	short loc_7DA1D0
jmp	short loc_7DA202

loc_7DA1FD:
mov	ebp, 1

loc_7DA202:
cmp	dword ptr [esi+48h], 0
jbe	short loc_7DA233
mov	ecx, [esi+48h]
mov	eax, [esi+44h]
cmp	dword ptr [eax+ecx*8-4], 0
lea	edi, [eax+ecx*8-8]
jnz	short loc_7DA233
test	edx, edx
jz	short loc_7DA220
add	[edx+4], ebp

loc_7DA220:
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7DA230
call	sub_64A400
mov	edx, [esp+34h+arg_4]

loc_7DA230:
mov	[edi+4], edx

loc_7DA233:
mov	ebp, [esp+34h+arg_0]
cmp	dword ptr [ebp+4], 0
jbe	loc_7DA330
mov	eax, [esi+3Ch]
test	eax, eax
jbe	short loc_7DA251
add	eax, 0FFFFFFFFh
mov	[esp+34h+arg_8], eax
jns	short loc_7DA2B5

loc_7DA251:
mov	eax, [ebp+4]
mov	ebp, [ebp+0]
mov	ebx, [esp+34h+var_24]
push	eax
push	ebp
lea	ecx, [ebx+10h]
call	sub_7D93D0
push	eax
lea	ecx, [esp+38h+var_1C]
call	sub_7D8DE0
mov	eax, [esp+34h+var_1C]
mov	edi, [esp+34h+arg_4]
push	eax
lea	ecx, [edi+24h]
call	sub_7D94E0
lea	ecx, [esp+34h+var_1C]
call	sub_7D94B0
add	ebx, 28h
push	ebx
lea	ecx, [esp+38h+var_18]
call	sub_7D8DE0
mov	ecx, [esp+34h+var_18]
push	ecx
lea	ecx, [edi+28h]
call	sub_7D94E0
lea	ecx, [esp+34h+var_18]
call	sub_7D94B0
jmp	loc_7DA392

loc_7DA2B1:
mov	eax, [esp+34h+arg_8]

loc_7DA2B5:
mov	ecx, [esi+38h]
lea	eax, [ecx+eax*8]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7DA2C4
inc	dword ptr [ecx+4]

loc_7DA2C4:
mov	ecx, [eax+4]
mov	edi, [eax]
mov	[esp+34h+var_10], edi
test	ecx, ecx
jz	short loc_7DA2D8
inc	dword ptr [ecx+4]
mov	edi, [esp+34h+var_10]

loc_7DA2D8:
mov	ebx, [eax+4]
mov	ecx, [ebp+4]
mov	eax, [ebp+0]
mov	edx, [edi+8]
push	ecx		; size_t
push	eax		; char *
mov	eax, [edx]
push	eax		; char *
mov	[esp+40h+var_C], ebx
call	_strncmp
add	esp, 0Ch
test	eax, eax
jz	short loc_7DA317
test	ebx, ebx
jz	short loc_7DA304
mov	ecx, ebx
call	sub_64A400

loc_7DA304:
mov	ecx, edi
call	sub_64A400
sub	[esp+34h+arg_8], 1
jns	short loc_7DA2B1
jmp	loc_7DA251

loc_7DA317:
mov	ecx, [edi+8]
mov	ebp, [esp+34h+arg_4]
push	ecx
lea	ecx, [ebp+24h]
call	sub_7D94E0
mov	edx, [edi+0Ch]
push	edx
lea	ecx, [ebp+28h]
jmp	short loc_7DA37B

loc_7DA330:
cmp	dword ptr [esi+48h], 0
jbe	short loc_7DA396
mov	ecx, [esi+44h]
mov	eax, [esi+48h]
lea	eax, [ecx+eax*8-8]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7DA349
inc	dword ptr [ecx+4]

loc_7DA349:
mov	ecx, [eax+4]
mov	edi, [eax]
mov	[esp+34h+var_8], edi
test	ecx, ecx
jz	short loc_7DA35D
inc	dword ptr [ecx+4]
mov	edi, [esp+34h+var_8]

loc_7DA35D:
mov	ebx, [eax+4]
mov	eax, [edi+8]
push	eax
lea	ecx, [edx+24h]
mov	[esp+38h+var_4], ebx
call	sub_7D94E0
mov	ecx, [edi+0Ch]
push	ecx
mov	ecx, [esp+38h+arg_4]
add	ecx, 28h

loc_7DA37B:
call	sub_7D94E0
test	ebx, ebx
jz	short loc_7DA38B
mov	ecx, ebx
call	sub_64A400

loc_7DA38B:
mov	ecx, edi
call	sub_64A400

loc_7DA392:
mov	edx, [esp+34h+arg_4]

loc_7DA396:
mov	ecx, [esi+2Ch]
mov	eax, [esi+30h]
lea	edi, [esi+2Ch]
lea	eax, [ecx+eax*4-4]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7DA3AC
inc	dword ptr [ecx+4]

loc_7DA3AC:
mov	ebp, [eax]
push	edx
mov	ecx, ebp
mov	[esp+38h+arg_8], ebp
call	sub_7DA970
mov	esi, [edi+4]
mov	eax, [edi+4]
inc	esi
cmp	esi, eax
jnb	short loc_7DA3F7
mov	ecx, [edi]
sub	eax, esi
lea	edx, [eax+esi]
lea	ebx, [ecx+edx*4-4]
jz	short loc_7DA3EB
mov	ebp, eax

loc_7DA3D4:
mov	ecx, [ebx]
test	ecx, ecx
jz	short loc_7DA3DF
call	sub_64A400

loc_7DA3DF:
sub	ebx, 4
sub	ebp, 1
jnz	short loc_7DA3D4
mov	ebp, [esp+34h+arg_8]

loc_7DA3EB:
mov	edx, [edi+8]
shr	edx, 1
cmp	esi, edx
jnb	short loc_7DA40C
push	esi
jmp	short loc_7DA404

loc_7DA3F7:
cmp	esi, [edi+8]
jb	short loc_7DA40C
mov	eax, esi
shr	eax, 2
add	eax, esi
push	eax

loc_7DA404:
push	edi
mov	ecx, edi
call	sub_714BE0

loc_7DA40C:
mov	ecx, [edi]
mov	[edi+4], esi
mov	edi, [esp+34h+arg_4]
lea	esi, [ecx+esi*4-4]
test	esi, esi
jz	short loc_7DA426
test	edi, edi
jz	short loc_7DA424
inc	dword ptr [edi+4]

loc_7DA424:
mov	[esi], edi

loc_7DA426:
test	ebp, ebp
jz	short loc_7DA431
mov	ecx, ebp
call	sub_64A400

loc_7DA431:
test	edi, edi
jz	short loc_7DA43C
mov	ecx, edi
call	sub_64A400

loc_7DA43C:
mov	ecx, [esp+34h+var_24]
test	ecx, ecx
jz	short loc_7DA449
call	sub_64A400

loc_7DA449:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn	0Ch
sub_7DA060 endp

align 10h



sub_7DA460 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

sub	esp, 20h
push	ebx
mov	ebx, ecx
mov	eax, [ebx+28h]
mov	ecx, [eax+20h]
push	ebp
lea	ebp, [ebx+2Ch]
mov	[ebx+5Ch], ecx
mov	edx, [ebp+4]
mov	eax, [ebp+0]
mov	ecx, [eax+edx*4-4]
lea	eax, [eax+edx*4-4]
push	esi
mov	[esp+2Ch+var_20], ebp
test	ecx, ecx
jz	short loc_7DA48D
inc	dword ptr [ecx+4]

loc_7DA48D:
cmp	dword ptr [ebx+0Ch], 0
mov	edx, [eax]
push	edi
mov	[esp+30h+var_18], edx
jz	loc_7DA51F
mov	eax, [ebx+50h]
mov	ecx, [eax+8]
add	eax, 8
test	ecx, ecx
jz	short loc_7DA4AE
inc	dword ptr [ecx+4]

loc_7DA4AE:
mov	ecx, [ebx+0Ch]
mov	esi, [eax]
push	ecx
mov	ecx, edx
call	sub_7DA970
mov	eax, [ebx+10h]
mov	ecx, [ebx+14h]
lea	edi, [ebx+10h]
test	eax, eax
jnz	short loc_7DA4CD
mov	eax, offset byte_146D660

loc_7DA4CD:
push	ecx
push	eax
lea	ecx, [esi+10h]
call	sub_7D93D0
push	eax
lea	ecx, [esp+34h+var_14]
call	sub_7D8DE0
mov	edx, [esp+30h+var_14]
mov	ecx, [ebx+0Ch]
push	edx
add	ecx, 0Ch
call	sub_7D94E0
lea	ecx, [esp+30h+var_14]
call	sub_7D94B0
mov	ecx, [ebx+0Ch]
test	ecx, ecx
jz	short loc_7DA506
call	sub_64A400

loc_7DA506:
mov	ecx, edi
mov	dword ptr [ebx+0Ch], 0
call	sub_679C50
test	esi, esi
jz	short loc_7DA51F
mov	ecx, esi
call	sub_64A400

loc_7DA51F:
mov	eax, [ebx+3Ch]
test	eax, eax
jbe	loc_7DA5EC
add	eax, 0FFFFFFFFh
mov	[esp+30h+var_1C], eax
js	loc_7DA5EC
lea	ebp, [ebx+38h]
jmp	short loc_7DA544
align 10h

loc_7DA540:
mov	eax, [esp+30h+var_1C]

loc_7DA544:
mov	ecx, [ebp+0]
lea	eax, [ecx+eax*8]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7DA553
inc	dword ptr [ecx+4]

loc_7DA553:
mov	ecx, [eax+4]
mov	edx, [eax]
mov	[esp+30h+var_10], edx
test	ecx, ecx
jz	short loc_7DA563
inc	dword ptr [ecx+4]

loc_7DA563:
mov	eax, [eax+4]
mov	[esp+30h+var_C], eax
cmp	eax, [esp+30h+var_18]
jnz	short loc_7DA5D0
mov	esi, [ebp+4]
lea	edi, [esi-1]
push	edi
push	ebp
mov	ecx, ebp
call	sub_7D9EF0
cmp	edi, esi
jbe	short loc_7DA5A9
sub	edi, esi
mov	eax, [ebp+0]
lea	eax, [eax+esi*8]
jz	short loc_7DA5A9
lea	ecx, [ecx+0]

loc_7DA590:
test	eax, eax
jz	short loc_7DA5A1
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0

loc_7DA5A1:
add	eax, 8
sub	edi, 1
jnz	short loc_7DA590

loc_7DA5A9:
mov	ecx, [esp+30h+var_C]
test	ecx, ecx
jz	short loc_7DA5B6
call	sub_64A400

loc_7DA5B6:
mov	ecx, [esp+30h+var_10]
test	ecx, ecx
jz	short loc_7DA5C3
call	sub_64A400

loc_7DA5C3:
sub	[esp+30h+var_1C], 1
jns	loc_7DA540
jmp	short loc_7DA5E8

loc_7DA5D0:
test	eax, eax
jz	short loc_7DA5DB
mov	ecx, eax
call	sub_64A400

loc_7DA5DB:
mov	ecx, [esp+30h+var_10]
test	ecx, ecx
jz	short loc_7DA5E8
call	sub_64A400

loc_7DA5E8:
mov	ebp, [esp+30h+var_20]

loc_7DA5EC:
cmp	dword ptr [ebx+48h], 0
jbe	loc_7DA676
mov	ecx, [ebx+48h]
mov	edx, [ebx+44h]
lea	esi, [ebx+44h]
lea	eax, [edx+ecx*8-8]
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_7DA60C
inc	dword ptr [ecx+4]

loc_7DA60C:
mov	ecx, [eax]
mov	[esp+30h+var_8], ecx
mov	ecx, [eax+4]
test	ecx, ecx
jz	short loc_7DA61C
inc	dword ptr [ecx+4]

loc_7DA61C:
mov	ebp, [eax+4]
cmp	ebp, [esp+30h+var_18]
jnz	short loc_7DA65A
mov	edi, [esi+4]
lea	ebx, [edi-1]
push	ebx
push	esi
mov	ecx, esi
call	sub_7D9EF0
cmp	ebx, edi
jbe	short loc_7DA65A
sub	ebx, edi
mov	edx, [esi]
lea	eax, [edx+edi*8]
jz	short loc_7DA65A

loc_7DA641:
test	eax, eax
jz	short loc_7DA652
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0

loc_7DA652:
add	eax, 8
sub	ebx, 1
jnz	short loc_7DA641

loc_7DA65A:
test	ebp, ebp
jz	short loc_7DA665
mov	ecx, ebp
call	sub_64A400

loc_7DA665:
mov	ecx, [esp+30h+var_8]
test	ecx, ecx
jz	short loc_7DA672
call	sub_64A400

loc_7DA672:
mov	ebp, [esp+30h+var_20]

loc_7DA676:
mov	ebx, [ebp+4]
lea	esi, [ebx-1]
cmp	esi, ebx
jnb	short loc_7DA6B5
mov	edx, [ebp+0]
mov	eax, ebx
sub	eax, esi
lea	ecx, [eax+esi]
lea	edi, [edx+ecx*4-4]
jz	short loc_7DA6A9
mov	ebp, eax

loc_7DA692:
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7DA69D
call	sub_64A400

loc_7DA69D:
sub	edi, 4
sub	ebp, 1
jnz	short loc_7DA692
mov	ebp, [esp+30h+var_20]

loc_7DA6A9:
mov	eax, [ebp+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_7DA6CA
push	esi
jmp	short loc_7DA6C2

loc_7DA6B5:
cmp	esi, [ebp+8]
jb	short loc_7DA6CA
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_7DA6C2:
push	ebp
mov	ecx, ebp
call	sub_714BE0

loc_7DA6CA:
mov	[ebp+4], esi
pop	edi
cmp	esi, ebx
jbe	short loc_7DA6F2
sub	esi, ebx
mov	edx, [ebp+0]
lea	eax, [edx+ebx*4]
jz	short loc_7DA6F2
lea	esp, [esp+0]

loc_7DA6E0:
test	eax, eax
jz	short loc_7DA6EA
mov	dword ptr [eax], 0

loc_7DA6EA:
add	eax, 4
sub	esi, 1
jnz	short loc_7DA6E0

loc_7DA6F2:
mov	ecx, [esp+2Ch+var_18]
pop	esi
pop	ebp
pop	ebx
test	ecx, ecx
jz	short loc_7DA702
call	sub_64A400

loc_7DA702:
add	esp, 20h
retn	8
sub_7DA460 endp

align 10h



sub_7DA710 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
push	ebp
mov	ebp, ecx
mov	eax, [ebp+28h]
mov	ecx, [eax+20h]
mov	eax, [ebp+50h]
mov	[ebp+5Ch], ecx
mov	ecx, [eax+8]
push	esi
push	edi
test	ecx, ecx
jz	short loc_7DA72F
inc	dword ptr [ecx+4]

loc_7DA72F:
mov	esi, [eax+8]
mov	eax, [esp+24h+arg_4]
mov	ecx, [eax+4]
mov	eax, [eax]
push	ecx
mov	edi, esp
push	ecx
mov	[esp+2Ch+var_14], esi
add	esi, 10h
push	eax
mov	ecx, esi
call	sub_7D93D0
push	eax
mov	ecx, edi
call	sub_7D8DE0
mov	edi, [esp+28h+arg_0]
mov	ecx, [edi]
mov	eax, [edi+4]
push	ecx
mov	ebx, esp
push	eax
push	ecx
mov	ecx, esi
call	sub_7D93D0
push	eax
mov	ecx, ebx
call	sub_7D8DE0
mov	ecx, [esp+2Ch+var_14]
call	sub_7D9A60
cmp	dword ptr [edi+4], 0
push	ecx
mov	ebx, eax
mov	eax, esp
push	ecx
mov	dword ptr [eax], 0
mov	eax, esp
jbe	short loc_7DA7F7
test	ebx, ebx
jz	short loc_7DA797
inc	dword ptr [ebx+4]

loc_7DA797:
lea	ecx, [esp+2Ch+var_10]
mov	[eax], ebx
call	sub_7D9C70
mov	edx, [ebp+3Ch]
lea	esi, [ebp+38h]
mov	ebp, 1
add	edx, ebp
push	edx
push	esi
mov	ecx, esi
mov	edi, eax
call	sub_7D9EF0
mov	eax, [esi+4]
mov	ecx, [esi]
lea	eax, [ecx+eax*8-8]
test	eax, eax
jz	short loc_7DA7E4
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7DA7D0
add	[ecx+4], ebp

loc_7DA7D0:
mov	edx, [edi]
mov	[eax], edx
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7DA7DE
add	[ecx+4], ebp

loc_7DA7DE:
mov	ecx, [edi+4]
mov	[eax+4], ecx

loc_7DA7E4:
mov	ecx, [esp+24h+var_C]
test	ecx, ecx
jz	short loc_7DA7F1
call	sub_64A400

loc_7DA7F1:
mov	ecx, [esp+24h+var_10]
jmp	short loc_7DA85C

loc_7DA7F7:
test	ebx, ebx
jz	short loc_7DA7FE
inc	dword ptr [ebx+4]

loc_7DA7FE:
lea	ecx, [esp+2Ch+var_8]
mov	[eax], ebx
call	sub_7D9C70
mov	edx, [ebp+48h]
lea	esi, [ebp+44h]
mov	ebp, 1
add	edx, ebp
push	edx
push	esi
mov	ecx, esi
mov	edi, eax
call	sub_7D9EF0
mov	eax, [esi+4]
mov	ecx, [esi]
lea	eax, [ecx+eax*8-8]
test	eax, eax
jz	short loc_7DA84B
mov	ecx, [edi]
test	ecx, ecx
jz	short loc_7DA837
add	[ecx+4], ebp

loc_7DA837:
mov	edx, [edi]
mov	[eax], edx
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7DA845
add	[ecx+4], ebp

loc_7DA845:
mov	ecx, [edi+4]
mov	[eax+4], ecx

loc_7DA84B:
mov	ecx, [esp+24h+var_4]
test	ecx, ecx
jz	short loc_7DA858
call	sub_64A400

loc_7DA858:
mov	ecx, [esp+24h+var_8]

loc_7DA85C:
test	ecx, ecx
jz	short loc_7DA865
call	sub_64A400

loc_7DA865:
test	ebx, ebx
jz	short loc_7DA870
mov	ecx, ebx
call	sub_64A400

loc_7DA870:
mov	ecx, [esp+24h+var_14]
test	ecx, ecx
jz	short loc_7DA87D
call	sub_64A400

loc_7DA87D:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	8
sub_7DA710 endp

align 10h



sub_7DA890 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esp+8+arg_0]
xor	ebx, ebx
mov	dword ptr [esi], offset	off_155F500
mov	dword ptr [esi+4], 1
mov	dword ptr [esi], offset	off_1456D40
cmp	ecx, ebx
jz	short loc_7DA8BA
call	sub_64A420
mov	ecx, [esp+8+arg_0]

loc_7DA8BA:
mov	[esi+8], ecx
mov	[esi+0Ch], ebx
mov	eax, dword_1855FC0
push	eax
lea	ecx, [esi+10h]
call	sub_679B40
mov	cl, [esp+8+arg_4]
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	[esi+3Ch], ebx
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], cl
mov	ecx, [esp+8+arg_0]
mov	[esi+55h], bl
cmp	ecx, ebx
jz	short loc_7DA906
call	sub_64A430

loc_7DA906:
mov	eax, esi
pop	esi
pop	ebx
retn	8
sub_7DA890 endp

align 10h



sub_7DA910 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7D4020
test	[esp+4+arg_0], 1
jz	short loc_7DA92D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7DA92D:
mov	eax, esi
pop	esi
retn	4
sub_7DA910 endp

align 10h



sub_7DA940 proc	near

arg_0= dword ptr  4

cmp	dword ptr [ecx+2Ch], 0
mov	eax, [esp+arg_0]
jnz	short loc_7DA953
mov	[ecx+2Ch], eax
mov	[ecx+30h], eax
retn	4

loc_7DA953:
mov	edx, [ecx+30h]
mov	[edx+8], eax
mov	[ecx+30h], eax
retn	4
sub_7DA940 endp

align 10h



sub_7DA960 proc	near
xor	eax, eax
cmp	[ecx+2Ch], eax
setnz	al
retn
sub_7DA960 endp

align 10h



sub_7DA970 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, ecx
mov	eax, [ebx+38h]
push	esi
mov	esi, [esp+8+arg_0]
test	eax, eax
jnz	short loc_7DA9A0
test	esi, esi
jz	short loc_7DA986
inc	dword ptr [esi+4]

loc_7DA986:
mov	ecx, [ebx+34h]
test	ecx, ecx
jz	short loc_7DA992
call	sub_64A400

loc_7DA992:
mov	[ebx+34h], esi
mov	[ebx+38h], esi
mov	[esi+10h], ebx
pop	esi
pop	ebx
retn	4

loc_7DA9A0:
mov	[esi+14h], eax
push	edi
mov	edi, [ebx+38h]
inc	dword ptr [esi+4]
mov	ecx, [edi+18h]
add	edi, 18h
test	ecx, ecx
jz	short loc_7DA9B9
call	sub_64A400

loc_7DA9B9:
mov	[edi], esi
mov	[ebx+38h], esi
pop	edi
mov	[esi+10h], ebx
pop	esi
pop	ebx
retn	4
sub_7DA970 endp

align 10h



sub_7DA9D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_4]
mov	ebx, [edi+14h]
mov	[edi+14h], esi
mov	[esi+14h], ebx
inc	dword ptr [edi+4]
mov	ebp, ecx
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_7DA9F6
call	sub_64A400

loc_7DA9F6:
mov	[esi+18h], edi
test	ebx, ebx
jz	short loc_7DAA0F
inc	dword ptr [esi+4]
mov	ecx, [ebx+18h]
test	ecx, ecx
jz	short loc_7DAA0C
call	sub_64A400

loc_7DAA0C:
mov	[ebx+18h], esi

loc_7DAA0F:
cmp	edi, [ebp+34h]
jnz	short loc_7DAA26
inc	dword ptr [esi+4]
mov	ecx, [ebp+34h]
test	ecx, ecx
jz	short loc_7DAA23
call	sub_64A400

loc_7DAA23:
mov	[ebp+34h], esi

loc_7DAA26:
pop	edi
mov	[esi+10h], ebp
pop	esi
pop	ebp
pop	ebx
retn	8
sub_7DA9D0 endp




sub_7DAA30 proc	near
xor	eax, eax
cmp	[ecx+34h], eax
setnz	al
retn
sub_7DAA30 endp

align 10h



sub_7DAA40 proc	near
push	ebx
push	ebp
mov	ebx, ecx
push	esi
mov	esi, [ebx+2Ch]
xor	ebp, ebp
cmp	esi, ebp
jz	short loc_7DAA77
push	edi
nop

loc_7DAA50:
mov	edi, [esi+8]
lea	ecx, [esi+4]
call	sub_7D94B0
mov	ecx, esi
call	sub_7D94B0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	esi, edi
cmp	edi, ebp
jnz	short loc_7DAA50
pop	edi

loc_7DAA77:
pop	esi
mov	[ebx+30h], ebp
mov	[ebx+2Ch], ebp
pop	ebp
pop	ebx
retn
sub_7DAA40 endp

align 10h



sub_7DAA90 proc	near
push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+8]
push	ecx
lea	eax, [esi+0Ch]
mov	ecx, esp
push	eax
call	sub_7D8DF0
mov	ecx, edi
call	sub_7D9740
mov	cl, [esi+20h]
pop	edi
mov	[eax+20h], cl
pop	esi
retn	4
sub_7DAA90 endp

align 10h



sub_7DAAC0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
push	edi
xor	edi, edi
mov	dword ptr [esi], offset	off_155F500
mov	ecx, 1
mov	[esi+4], ecx
mov	dword ptr [esi], offset	off_1456D78
cmp	eax, edi
jz	short loc_7DAAE5
add	[eax+4], ecx

loc_7DAAE5:
mov	[esi+8], eax
lea	eax, [esp+8+arg_8]
push	eax
lea	ecx, [esi+0Ch]
call	sub_7D8DF0
mov	cl, [esp+8+arg_4]
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	[esi+20h], cl
lea	ecx, [esp+8+arg_8]
mov	[esi+1Ch], edi
call	sub_7D94B0
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
sub_7DAAC0 endp

align 10h



sub_7DAB20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	ebp, ecx
mov	eax, [ebp+24h]
push	edi
mov	edi, [esp+10h+arg_0]
push	eax
lea	ecx, [edi+24h]
call	sub_7D94E0
mov	esi, [ebp+2Ch]
test	esi, esi
jz	short loc_7DAB7A
lea	ecx, [ecx+0]

loc_7DAB40:
mov	ebx, [ebp+8]
push	ecx
lea	edx, [esi+4]
mov	ecx, esp
push	edx
call	sub_7D8DF0
push	ecx
mov	ecx, esp
push	esi
call	sub_7D8DF0
mov	ecx, ebx
call	sub_7D99B0
cmp	dword ptr [edi+2Ch], 0
jnz	short loc_7DAB6A
mov	[edi+2Ch], eax
jmp	short loc_7DAB70

loc_7DAB6A:
mov	ecx, [edi+30h]
mov	[ecx+8], eax

loc_7DAB70:
mov	[edi+30h], eax
mov	esi, [esi+8]
test	esi, esi
jnz	short loc_7DAB40

loc_7DAB7A:
cmp	byte ptr [esp+10h+arg_4], 0
jz	short loc_7DABEE
mov	ebx, [ebp+34h]
test	ebx, ebx
jz	short loc_7DABEE
jmp	short loc_7DAB90
align 10h

loc_7DAB90:
mov	edx, [ebx]
mov	eax, [esp+10h+arg_4]
mov	edx, [edx+4]
push	eax
mov	ecx, ebx
call	edx
mov	esi, eax
mov	eax, [edi+38h]
test	eax, eax
jnz	short loc_7DABBF
test	esi, esi
jz	short loc_7DABAE
inc	dword ptr [esi+4]

loc_7DABAE:
mov	ecx, [edi+34h]
test	ecx, ecx
jz	short loc_7DABBA
call	sub_64A400

loc_7DABBA:
mov	[edi+34h], esi
jmp	short loc_7DABDA

loc_7DABBF:
mov	[esi+14h], eax
mov	ebp, [edi+38h]
inc	dword ptr [esi+4]
mov	ecx, [ebp+18h]
add	ebp, 18h
test	ecx, ecx
jz	short loc_7DABD7
call	sub_64A400

loc_7DABD7:
mov	[ebp+0], esi

loc_7DABDA:
mov	[edi+38h], esi
mov	ecx, esi
mov	[esi+10h], edi
call	sub_64A400
mov	ebx, [ebx+18h]
test	ebx, ebx
jnz	short loc_7DAB90

loc_7DABEE:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_7DAB20 endp

align 10h



sub_7DAC00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
test	esi, esi
jz	short loc_7DAC0F
inc	dword ptr [esi+4]

loc_7DAC0F:
cmp	esi, [edi+34h]
jnz	short loc_7DAC30
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_7DAC1E
inc	dword ptr [eax+4]

loc_7DAC1E:
mov	ecx, [edi+34h]
test	ecx, ecx
jz	short loc_7DAC2A
call	sub_64A400

loc_7DAC2A:
mov	eax, [esi+18h]
mov	[edi+34h], eax

loc_7DAC30:
cmp	esi, [edi+38h]
jnz	short loc_7DAC3B
mov	ecx, [esi+14h]
mov	[edi+38h], ecx

loc_7DAC3B:
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_7DAC48
mov	edx, [esi+14h]
mov	[eax+14h], edx

loc_7DAC48:
mov	edi, [esi+14h]
test	edi, edi
jz	short loc_7DAC6B
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_7DAC59
inc	dword ptr [eax+4]

loc_7DAC59:
mov	ecx, [edi+18h]
test	ecx, ecx
jz	short loc_7DAC65
call	sub_64A400

loc_7DAC65:
mov	eax, [esi+18h]
mov	[edi+18h], eax

loc_7DAC6B:
mov	dword ptr [esi+10h], 0
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_7DAC7E
call	sub_64A400

loc_7DAC7E:
mov	dword ptr [esi+18h], 0
mov	ecx, esi
mov	dword ptr [esi+14h], 0
call	sub_64A400
pop	edi
pop	esi
retn	4
sub_7DAC00 endp

align 10h



sub_7DACA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	edi
call	sub_7D8F80
mov	edi, eax
mov	eax, [esp+8+arg_0]
push	eax
push	edi
mov	ecx, esi
call	sub_7DAB20
mov	ecx, [esi+40h]
push	ecx
lea	ecx, [edi+40h]
call	sub_7D94E0
mov	dl, [esi+44h]
mov	[edi+44h], dl
mov	eax, [esi+3Ch]
push	eax
lea	ecx, [edi+3Ch]
call	sub_7D94E0
mov	cl, [esi+20h]
mov	[edi+20h], cl
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_7DACA0 endp

align 10h



sub_7DACF0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	esi, ecx
mov	edi, [esi+8]
push	ecx
lea	eax, [esi+0Ch]
mov	ecx, esp
push	eax
call	sub_7D8DF0
mov	ecx, edi
call	sub_7D96D0
mov	ecx, [esp+8+arg_0]
push	ecx
mov	edi, eax
push	edi
mov	ecx, esi
call	sub_7DAB20
mov	dl, [esi+20h]
mov	[edi+20h], dl
mov	eax, edi
pop	edi
pop	esi
retn	4
sub_7DACF0 endp

align 10h



sub_7DAD30 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+1Ch]
mov	dword ptr [esi], offset	off_1456D78
test	edi, edi
jz	short loc_7DAD5B
mov	ecx, [edi+4]
test	ecx, ecx
jz	short loc_7DAD4D
call	sub_64B3B0

loc_7DAD4D:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	edi
call	edx

loc_7DAD5B:
mov	ecx, [esi+18h]
test	ecx, ecx
jz	short loc_7DAD67
call	sub_64A400

loc_7DAD67:
lea	ecx, [esi+0Ch]
call	sub_7D94B0
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_7DAD7B
call	sub_64A400

loc_7DAD7B:
pop	edi
mov	ecx, esi
pop	esi
jmp	sub_64A3F0
sub_7DAD30 endp

align 10h



sub_7DAD90 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, ecx
push	edi
xor	edi, edi
mov	dword ptr [esi], offset	off_155F500
mov	ebx, 1
mov	[esi+4], ebx
mov	dword ptr [esi], offset	off_1456D78
cmp	ebp, edi
jz	short loc_7DADB7
add	[ebp+4], ebx

loc_7DADB7:
mov	eax, ebp
add	eax, 28h
push	eax
lea	ecx, [esi+0Ch]
mov	[esi+8], ebp
call	sub_7D8DE0
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
mov	[esi+20h], bl
lea	ebx, [ebp+28h]
push	ebx
lea	ecx, [esi+24h]
mov	[esi+1Ch], edi
mov	dword ptr [esi], offset	off_1456D80
call	sub_7D8DE0
push	ebx
lea	ecx, [esi+28h]
call	sub_7D8DE0
mov	[esi+2Ch], edi
mov	[esi+30h], edi
mov	[esi+34h], edi
mov	[esi+38h], edi
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_7DAD90 endp

align 10h



sub_7DAE10 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
push	edi
push	ecx
mov	esi, ecx
lea	eax, [esp+0Ch+arg_4]
mov	ecx, esp
push	eax
call	sub_7D8DF0
mov	edi, [esp+0Ch+arg_0]
push	1
push	edi
mov	ecx, esi
call	sub_7DAAC0
add	edi, 28h
push	edi
lea	ecx, [esi+24h]
mov	dword ptr [esi], offset	off_1456D80
call	sub_7D8DE0
push	edi
lea	ecx, [esi+28h]
call	sub_7D8DE0
xor	eax, eax
mov	[esi+2Ch], eax
mov	[esi+30h], eax
mov	[esi+34h], eax
lea	ecx, [esp+8+arg_4]
mov	[esi+38h], eax
call	sub_7D94B0
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_7DAE10 endp

align 10h



sub_7DAE70 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+38h]
push	ebp
xor	ebp, ebp
push	esi
mov	dword ptr [ebx], offset	off_1456D80
cmp	eax, ebp
jz	short loc_7DAEA3

loc_7DAE84:
mov	esi, [eax+14h]
mov	[eax+10h], ebp
cmp	esi, ebp
jz	short loc_7DAE9D
mov	ecx, [esi+18h]
cmp	ecx, ebp
jz	short loc_7DAE9A
call	sub_64A400

loc_7DAE9A:
mov	[esi+18h], ebp

loc_7DAE9D:
mov	eax, esi
cmp	esi, ebp
jnz	short loc_7DAE84

loc_7DAEA3:
cmp	[ebx+34h], ebp
jz	short loc_7DAEB7
mov	ecx, [ebx+34h]
cmp	ecx, ebp
jz	short loc_7DAEB4
call	sub_64A400

loc_7DAEB4:
mov	[ebx+34h], ebp

loc_7DAEB7:
mov	esi, [ebx+2Ch]
cmp	esi, ebp
jz	short loc_7DAEE7
push	edi
nop

loc_7DAEC0:
mov	edi, [esi+8]
lea	ecx, [esi+4]
call	sub_7D94B0
mov	ecx, esi
call	sub_7D94B0
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx
mov	esi, edi
cmp	edi, ebp
jnz	short loc_7DAEC0
pop	edi

loc_7DAEE7:
mov	ecx, [ebx+34h]
cmp	ecx, ebp
jz	short loc_7DAEF3
call	sub_64A400

loc_7DAEF3:
lea	ecx, [ebx+28h]
call	sub_7D94B0
lea	ecx, [ebx+24h]
call	sub_7D94B0
pop	esi
pop	ebp
mov	ecx, ebx
pop	ebx
jmp	sub_7DAD30
sub_7DAE70 endp

align 10h



sub_7DAF10 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
push	ecx
mov	esi, ecx
lea	eax, [esp+8+arg_4]
mov	ecx, esp
push	eax
call	sub_7D8DF0
mov	ecx, [esp+8+arg_0]
push	3
push	ecx
mov	ecx, esi
call	sub_7DAAC0
lea	ecx, [esp+4+arg_4]
mov	dword ptr [esi], offset	off_1456D88
call	sub_7D94B0
mov	eax, esi
pop	esi
retn	8
sub_7DAF10 endp

align 10h



sub_7DAF50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_7DAD90
mov	ecx, [esi+8]
add	ecx, 28h
push	ecx
lea	ecx, [esi+3Ch]
mov	dword ptr [esi], offset	off_1456D90
call	sub_7D8DE0
mov	edx, [esi+8]
add	edx, 28h
push	edx
lea	ecx, [esi+40h]
call	sub_7D8DE0
mov	byte ptr [esi+44h], 0FFh
mov	eax, esi
pop	esi
retn	4
sub_7DAF50 endp

align 10h



sub_7DAF90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7DAD30
test	[esp+4+arg_0], 1
jz	short loc_7DAFAD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7DAFAD:
mov	eax, esi
pop	esi
retn	4
sub_7DAF90 endp

align 10h



sub_7DAFC0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7DAE70
test	[esp+4+arg_0], 1
jz	short loc_7DAFDD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7DAFDD:
mov	eax, esi
pop	esi
retn	4
sub_7DAFC0 endp

align 10h



sub_7DAFF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1456D88
call	sub_7DAD30
test	[esp+4+arg_0], 1
jz	short loc_7DB013
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7DB013:
mov	eax, esi
pop	esi
retn	4
sub_7DAFF0 endp

align 10h



sub_7DB020 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
lea	ecx, [esi+40h]
mov	dword ptr [esi], offset	off_1456D90
call	sub_7D94B0
lea	ecx, [esi+3Ch]
call	sub_7D94B0
mov	ecx, esi
call	sub_7DAE70
test	[esp+4+arg_0], 1
jz	short loc_7DB055
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7DB055:
mov	eax, esi
pop	esi
retn	4
sub_7DB020 endp

align 10h



sub_7DB060 proc	near
mov	dword ptr [ecx], offset	off_1456C58
retn
sub_7DB060 endp

align 10h



sub_7DB070 proc	near
mov	dword ptr [ecx], offset	off_1456C84
retn
sub_7DB070 endp

align 10h



sub_7DB080 proc	near
mov	dword ptr [ecx], offset	off_1456C28
jmp	sub_64A3F0
sub_7DB080 endp

align 10h



sub_7DB090 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	edx, [eax+8]
push	esi
mov	esi, [esp+4+arg_4]
push	edi
test	esi, esi
jz	short loc_7DB0B1
mov	eax, esi
lea	edi, [eax+1]

loc_7DB0A6:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7DB0A6
sub	eax, edi
jmp	short loc_7DB0B3

loc_7DB0B1:
xor	eax, eax

loc_7DB0B3:
mov	[edx+10h], esi
mov	esi, [esp+8+arg_8]
mov	[edx+14h], eax
test	esi, esi
jz	short loc_7DB0DF
mov	eax, esi
lea	edi, [eax+1]

loc_7DB0C6:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7DB0C6
mov	ecx, [esp+8+arg_C]
sub	eax, edi
pop	edi
mov	[edx+8], esi
mov	[edx+0Ch], eax
mov	[edx+18h], ecx
pop	esi
retn

loc_7DB0DF:
mov	ecx, [esp+8+arg_C]
xor	eax, eax
pop	edi
mov	[edx+8], esi
mov	[edx+0Ch], eax
mov	[edx+18h], ecx
pop	esi
retn
sub_7DB090 endp

align 10h



; int __cdecl sub_7DB100(int, char *, int)
sub_7DB100 proc	near

var_23D= byte ptr -23Dh
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= byte ptr -200h
var_1FC= byte ptr -1FCh
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 240h
push	ebx
push	ebp
push	esi
push	edi
mov	ecx, 1Fh
lea	eax, [esp+250h+var_1FC]
xor	ebx, ebx

loc_7DB115:
mov	[eax-4], ebx
mov	[eax], ebx
mov	[eax+4], ebx
mov	[eax+8], ebx
add	eax, 10h
sub	ecx, 1
jns	short loc_7DB115
mov	edi, [esp+250h+arg_8]
xor	esi, esi
mov	[esp+250h+var_23D], bl
cmp	[edi], ebx
jz	short loc_7DB148
mov	eax, edi
jmp	short loc_7DB140
align 10h

loc_7DB140:
add	eax, 8
inc	esi
cmp	[eax], ebx
jnz	short loc_7DB140

loc_7DB148:
mov	[esp+250h+var_238], esi
cmp	esi, 20h
jbe	short loc_7DB1A9
xor	ecx, ecx
mov	eax, esi
mov	edx, 10h
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
cmp	eax, ebx
jz	short loc_7DB19E
lea	edx, [esi-1]
cmp	edx, ebx
jl	short loc_7DB193
lea	ecx, [eax+4]
lea	ebx, [ebx+0]

loc_7DB180:
mov	[ecx-4], ebx
mov	[ecx], ebx
mov	[ecx+4], ebx
mov	[ecx+8], ebx
add	ecx, 10h
sub	edx, 1
jns	short loc_7DB180

loc_7DB193:
mov	[esp+250h+var_23C], eax
mov	[esp+250h+var_23D], 1
jmp	short loc_7DB1B1

loc_7DB19E:
mov	[esp+250h+var_23C], ebx
mov	[esp+250h+var_23D], 1
jmp	short loc_7DB1B1

loc_7DB1A9:
lea	eax, [esp+250h+var_200]
mov	[esp+250h+var_23C], eax

loc_7DB1B1:
mov	[esp+250h+var_22C], ebx
cmp	[edi], ebx
jz	loc_7DB32F
mov	esi, edi
xor	ebp, ebp

loc_7DB1C1:
mov	edx, [esi]
cmp	edx, ebx
jz	short loc_7DB1E2
mov	eax, edx
lea	edi, [eax+1]
lea	esp, [esp+0]

loc_7DB1D0:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB1D0
sub	eax, edi
mov	edi, [esp+250h+arg_8]
jmp	short loc_7DB1E4

loc_7DB1E2:
xor	eax, eax

loc_7DB1E4:
mov	ecx, [esp+250h+var_23C]
mov	[ecx+ebp], edx
mov	edx, [esp+250h+var_23C]
mov	[edx+ebp+4], eax
mov	ecx, [esi+4]
cmp	ecx, ebx
jz	short loc_7DB212
mov	eax, ecx
lea	edi, [eax+1]
nop

loc_7DB200:
mov	dl, [eax]
inc	eax
cmp	dl, bl
jnz	short loc_7DB200
sub	eax, edi
mov	edi, [esp+250h+arg_8]
jmp	short loc_7DB214

loc_7DB212:
xor	eax, eax

loc_7DB214:
mov	edx, [esp+250h+var_23C]
mov	[edx+ebp+8], ecx
mov	ecx, [esp+250h+var_23C]
mov	[ecx+ebp+0Ch], eax
mov	eax, [esi]
cmp	byte ptr [eax],	78h
jnz	loc_7DB316
cmp	byte ptr [eax+1], 6Dh
jnz	loc_7DB316
cmp	byte ptr [eax+2], 6Ch
jnz	loc_7DB316
cmp	byte ptr [eax+3], 6Eh
jnz	loc_7DB316
cmp	byte ptr [eax+4], 73h
jnz	loc_7DB316
cmp	byte ptr [eax+5], 3Ah
jnz	short loc_7DB2C1
mov	ecx, [esi+4]
mov	[esp+250h+var_218], ecx
cmp	ecx, ebx
jz	short loc_7DB27F
lea	esi, [ecx+1]
jmp	short loc_7DB270
align 10h

loc_7DB270:
mov	dl, [ecx]
inc	ecx
cmp	dl, bl
jnz	short loc_7DB270
sub	ecx, esi
mov	[esp+250h+var_214], ecx
jmp	short loc_7DB283

loc_7DB27F:
mov	[esp+250h+var_214], ebx

loc_7DB283:
add	eax, 6
mov	[esp+250h+var_210], eax
cmp	eax, ebx
jz	short loc_7DB2A0
lea	edx, [eax+1]

loc_7DB291:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB291
sub	eax, edx
mov	[esp+250h+var_20C], eax
jmp	short loc_7DB2A4

loc_7DB2A0:
mov	[esp+250h+var_20C], ebx

loc_7DB2A4:
mov	edx, [esp+250h+arg_0]
mov	ecx, [edx+4]
mov	eax, [ecx]
mov	eax, [eax+14h]
lea	edx, [esp+250h+var_218]
push	edx
lea	edx, [esp+254h+var_210]
push	edx
call	eax
jmp	short loc_7DB316

loc_7DB2C1:
lea	edx, [eax+1]

loc_7DB2C4:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB2C4
sub	eax, edx
cmp	eax, 5
jnz	short loc_7DB316
mov	eax, [esi+4]
mov	[esp+250h+var_220], eax
cmp	eax, ebx
jz	short loc_7DB2EF
lea	edx, [eax+1]

loc_7DB2E0:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB2E0
sub	eax, edx
mov	[esp+250h+var_21C], eax
jmp	short loc_7DB2F3

loc_7DB2EF:
mov	[esp+250h+var_21C], ebx

loc_7DB2F3:
mov	ecx, [esp+250h+arg_0]
mov	ecx, [ecx+4]
lea	eax, [esp+250h+var_220]
push	eax
mov	[esp+254h+var_208], ebx
mov	[esp+254h+var_204], ebx
mov	edx, [ecx]
mov	edx, [edx+14h]
lea	eax, [esp+254h+var_208]
push	eax
call	edx

loc_7DB316:
mov	eax, [esp+250h+var_22C]
add	eax, 2
lea	esi, [edi+eax*4]
add	ebp, 10h
mov	[esp+250h+var_22C], eax
cmp	[esi], ebx
jnz	loc_7DB1C1

loc_7DB32F:
mov	esi, [esp+250h+arg_4]
push	3Ah		; int
push	esi		; char *
mov	[esp+258h+var_228], ebx
mov	[esp+258h+var_224], ebx
mov	[esp+258h+var_234], ebx
mov	[esp+258h+var_230], ebx
call	_strchr
add	esp, 8
cmp	eax, ebx
jnz	short loc_7DB377
cmp	esi, ebx
jz	short loc_7DB36F
mov	eax, esi
lea	edx, [eax+1]
mov	edi, edi

loc_7DB360:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB360
sub	eax, edx
mov	[esp+250h+var_234], esi
jmp	short loc_7DB3A1

loc_7DB36F:
xor	eax, eax
mov	[esp+250h+var_234], esi
jmp	short loc_7DB3A1

loc_7DB377:
mov	ecx, eax
sub	ecx, esi
lea	edx, [eax+1]
mov	[esp+250h+var_228], esi
mov	[esp+250h+var_224], ecx
cmp	edx, ebx
jz	short loc_7DB39B
mov	eax, edx
lea	esi, [eax+1]
nop

loc_7DB390:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB390
sub	eax, esi
jmp	short loc_7DB39D

loc_7DB39B:
xor	eax, eax

loc_7DB39D:
mov	[esp+250h+var_234], edx

loc_7DB3A1:
mov	ebp, [esp+250h+arg_0]
mov	edi, [ebp+0]
mov	esi, [ebp+8]
push	edi
mov	[esp+254h+var_230], eax
call	sub_7DCB00
inc	eax
push	edi
mov	[esi], eax
call	sub_7DCA80
push	edi
mov	[esi+4], eax
call	sub_7DCA50
add	esp, 0Ch
lea	edx, [esp+250h+var_23C]
push	edx
mov	[esi+20h], eax
mov	ecx, [ebp+4]
mov	eax, [ecx]
mov	eax, [eax+0Ch]
lea	edx, [esp+254h+var_234]
push	edx
lea	edx, [esp+258h+var_228]
push	edx
call	eax
cmp	[esp+250h+var_23D], bl
pop	edi
pop	esi
pop	ebp
pop	ebx
jz	short loc_7DB400
mov	ecx, [esp+240h+var_23C]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_7DB400:
add	esp, 240h
retn
sub_7DB100 endp

align 10h



; int __cdecl sub_7DB410(int, char *)
sub_7DB410 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	esi
mov	esi, [esp+18h+arg_4]
push	edi
xor	ebx, ebx
push	3Ah		; int
push	esi		; char *
mov	[esp+24h+var_8], ebx
mov	[esp+24h+var_4], ebx
mov	[esp+24h+var_10], ebx
mov	[esp+24h+var_C], ebx
call	_strchr
add	esp, 8
cmp	eax, ebx
jnz	short loc_7DB45B
cmp	esi, ebx
jz	short loc_7DB453
mov	eax, esi
lea	edx, [eax+1]

loc_7DB444:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB444
sub	eax, edx
mov	[esp+1Ch+var_10], esi
jmp	short loc_7DB484

loc_7DB453:
xor	eax, eax
mov	[esp+1Ch+var_10], esi
jmp	short loc_7DB484

loc_7DB45B:
mov	ecx, eax
sub	ecx, esi
lea	edx, [eax+1]
mov	[esp+1Ch+var_8], esi
mov	[esp+1Ch+var_4], ecx
cmp	edx, ebx
jz	short loc_7DB47E
mov	eax, edx
lea	esi, [eax+1]

loc_7DB473:
mov	cl, [eax]
inc	eax
cmp	cl, bl
jnz	short loc_7DB473
sub	eax, esi
jmp	short loc_7DB480

loc_7DB47E:
xor	eax, eax

loc_7DB480:
mov	[esp+1Ch+var_10], edx

loc_7DB484:
mov	ebx, [esp+1Ch+arg_0]
mov	edi, [ebx]
mov	esi, [ebx+8]
push	edi
mov	[esp+20h+var_C], eax
call	sub_7DCB00
inc	eax
push	edi
mov	[esi], eax
call	sub_7DCA80
push	edi
mov	[esi+4], eax
call	sub_7DCA50
mov	[esi+20h], eax
mov	ecx, [ebx+4]
mov	eax, [ecx]
mov	eax, [eax+10h]
add	esp, 0Ch
lea	edx, [esp+1Ch+var_10]
push	edx
lea	edx, [esp+20h+var_8]
push	edx
call	eax
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn
sub_7DB410 endp

align 10h



sub_7DB4D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	esi
mov	esi, [ebx+8]
push	edi
mov	edi, [ebx]
push	edi
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], ecx
call	sub_7DCB00
inc	eax
push	edi
mov	[esi], eax
call	sub_7DCA80
push	edi
mov	[esi+4], eax
call	sub_7DCA50
mov	[esi+20h], eax
mov	ecx, [ebx+4]
mov	edx, [ecx]
mov	edx, [edx+18h]
add	esp, 0Ch
lea	eax, [esp+14h+var_8]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_7DB4D0 endp

align 10h



sub_7DB530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
mov	eax, [esp+8+arg_4]
mov	[esp+8+var_8], eax
test	eax, eax
jz	short loc_7DB550
lea	edx, [eax+1]

loc_7DB541:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7DB541
sub	eax, edx
mov	[esp+8+var_4], eax
jmp	short loc_7DB558

loc_7DB550:
mov	[esp+8+var_4], 0

loc_7DB558:
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	esi
mov	esi, [ebx+8]
push	edi
mov	edi, [ebx]
push	edi
call	sub_7DCB00
inc	eax
push	edi
mov	[esi], eax
call	sub_7DCA80
push	edi
mov	[esi+4], eax
call	sub_7DCA50
mov	[esi+20h], eax
mov	ecx, [ebx+4]
mov	eax, [ecx]
mov	eax, [eax+28h]
add	esp, 0Ch
lea	edx, [esp+14h+var_8]
push	edx
call	eax
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_7DB530 endp

align 10h



sub_7DB5A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_4]
mov	ecx, [esp+8+arg_8]
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	esi
mov	esi, [ebx+8]
push	edi
mov	edi, [ebx]
push	edi
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], ecx
call	sub_7DCB00
inc	eax
push	edi
mov	[esi], eax
call	sub_7DCA80
push	edi
mov	[esi+4], eax
call	sub_7DCA50
mov	[esi+20h], eax
mov	ecx, [ebx+4]
mov	edx, [ecx]
mov	edx, [edx+20h]
add	esp, 0Ch
lea	eax, [esp+14h+var_8]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_7DB5A0 endp

align 10h


; Attributes: noreturn

sub_7DB600 proc	near

var_24=	byte ptr -24h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 38h
push	ebx
mov	ebx, [esp+3Ch+arg_4]
push	ebp
push	esi
push	edi
mov	edi, [esp+48h+arg_8]
mov	eax, [edi]
mov	edx, [eax+24h]
xor	esi, esi
lea	ecx, [esp+48h+var_24]
push	ecx
mov	ecx, edi
mov	[esp+4Ch+var_1C], esi
mov	[esp+4Ch+var_18], esi
mov	[esp+4Ch+var_14], esi
mov	[esp+4Ch+var_10], esi
mov	[esp+4Ch+var_C], 0FFFFFFFFh
mov	[esp+4Ch+var_8], ebx
mov	[esp+4Ch+var_4], esi
call	edx
push	esi		; int
call	_exit
sub_7DB600 endp

mov	esi, eax
push	offset sub_7DB100
push	esi
call	sub_7DC360
push	offset sub_7DB410
push	esi
call	sub_7DC370
push	offset sub_7DB4D0
push	esi
call	sub_7DC380
push	offset sub_7DB530
push	esi
call	sub_7DC390
push	offset sub_7DB090
push	esi
call	sub_7DC3C0
push	offset sub_7DB5A0
push	esi
call	sub_7DC3A0
lea	ecx, [esp+4Ch]
push	ecx
lea	eax, [esp+5Ch]
push	esi
mov	[esp+54h], esi
mov	[esp+58h], edi
mov	[esp+5Ch], eax
call	sub_7DC310
mov	edx, [edi]
mov	eax, [edx+4]
add	esp, 3Ch
mov	ecx, edi
mov	byte ptr [esp+50h], 0
call	eax
mov	ecx, [esp+4Ch]
push	1
push	ebx
push	ecx
push	esi
call	sub_7DC3E0
mov	ebx, [esp+28h]
mov	ebp, [esp+30h]
add	esp, 10h
push	ebx
cmp	eax, 1
jz	short loc_7DB72E
call	sub_7DCB00
inc	eax
push	ebx
mov	[ebp+0], eax
call	sub_7DCA80
push	ebx
mov	[ebp+4], eax
call	sub_7DCA50
push	esi
mov	[ebp+20h], eax
call	sub_7E2640
push	eax
call	sub_7DCB80
add	esp, 14h
test	eax, eax
jz	short loc_7DB712
mov	ecx, eax
lea	ebx, [ecx+1]

loc_7DB707:
mov	dl, [ecx]
inc	ecx
test	dl, dl
jnz	short loc_7DB707
sub	ecx, ebx
jmp	short loc_7DB714

loc_7DB712:
xor	ecx, ecx

loc_7DB714:
mov	edx, [edi]
mov	edx, [edx+30h]
mov	[esp+10h], eax
lea	eax, [esp+10h]
mov	[esp+14h], ecx
push	eax
mov	ecx, edi
call	edx
mov	bl, 1
jmp	short loc_7DB759

loc_7DB72E:
call	sub_7DCB00
inc	eax
push	ebx
mov	[ebp+0], eax
call	sub_7DCA80
push	ebx
mov	[ebp+4], eax
call	sub_7DCA50
mov	[ebp+20h], eax
mov	eax, [edi]
mov	edx, [eax+8]
add	esp, 0Ch
mov	ecx, edi
call	edx
mov	bl, [esp+50h]

loc_7DB759:
push	esi
call	sub_7DC090
add	esp, 4
pop	edi
pop	esi
xor	eax, eax
test	bl, bl
pop	ebp
setz	al
pop	ebx
add	esp, 38h
retn	0Ch
align 10h



; int __cdecl sub_7DB780(int, char *, int)
sub_7DB780 proc	near

var_304= byte ptr -304h
var_2F8= dword ptr -2F8h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 304h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+304h+var_4], eax
mov	eax, [esp+304h+arg_0]
push	esi
mov	esi, [esp+308h+arg_4]
push	edi
mov	edi, [esp+30Ch+arg_8]
push	eax
lea	ecx, [esp+310h+var_304]
call	sub_6A4BC0
push	esi		; char *
lea	ecx, [esp+310h+var_304]
call	sub_6A4D30
push	edi
lea	ecx, [esp+310h+var_304]
call	sub_66A070
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4090
mov	esi, [esp+30Ch+var_2F8]
lea	ecx, [esp+30Ch+var_304]
call	sub_6A4940
mov	ecx, [esp+30Ch+var_4]
pop	edi
mov	eax, esi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 304h
retn
sub_7DB780 endp

align 10h



sub_7DB800 proc	near

var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= byte ptr -128h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 144h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+144h+var_4], eax
mov	eax, [esp+144h+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [esp+150h+arg_8]
push	edi
push	1B6h
mov	[esp+158h+var_140], ecx
mov	ecx, [esp+158h+arg_4]
mov	edx, [ecx]
xor	edi, edi
push	21h
mov	[esp+15Ch+var_138], eax
push	eax
mov	eax, [edx+4]
mov	byte ptr [esp+160h+var_144+3], 0
mov	[esp+160h+var_120], edi
mov	[esp+160h+var_11C], edi
mov	[esp+160h+var_118], edi
mov	[esp+160h+var_114], edi
mov	[esp+160h+var_110], 0FFFFFFFFh
mov	[esp+160h+var_10C], edi
mov	[esp+160h+var_108], edi
call	eax
mov	ebx, eax
cmp	ebx, edi
jz	loc_7DB930
mov	edx, [ebx]
mov	eax, [edx+8]
mov	ecx, ebx
call	eax
test	al, al
jz	loc_7DB930
mov	edx, [ebx]
mov	eax, [edx+18h]
mov	ecx, ebx
call	eax
mov	ebp, eax
cmp	ebp, edi
jz	short loc_7DB8D8
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	edi
push	ebp
call	eax
mov	edx, [ebx]
mov	edi, eax
mov	eax, [edx+28h]
push	ebp
push	edi
mov	ecx, ebx
call	eax
mov	ecx, [esp+154h+var_140]
mov	edx, [ecx]
mov	eax, [edx+8]
push	esi
push	ebp
push	edi
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	byte ptr [esp+154h+var_144+3], al
mov	eax, [edx+30h]
push	edi
call	eax
xor	edi, edi
jmp	loc_7DB997

loc_7DB8D8:
mov	edx, [esi]
mov	edx, [edx+24h]
lea	eax, [esp+154h+var_128]
push	eax
mov	ecx, esi
call	edx
lea	ecx, [esp+154h+var_138]
push	ecx		; int
lea	edx, [esp+158h+var_134]
lea	eax, [esp+158h+var_104]
push	offset aFile0IsEmpty ; "File {0} is empty!"
push	edx		; int
mov	[esp+160h+var_134], 2
mov	[esp+160h+var_130], eax
mov	[esp+160h+var_12C], 100h
call	sub_7DB780
lea	eax, [esp+160h+var_104]
add	esp, 0Ch
lea	edx, [eax+1]
lea	esp, [esp+0]

loc_7DB920:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7DB920
sub	eax, edx
mov	edx, [esi]
mov	edx, [edx+34h]
jmp	short loc_7DB982

loc_7DB930:
mov	eax, [esi]
mov	edx, [eax+24h]
lea	ecx, [esp+154h+var_128]
push	ecx
mov	ecx, esi
call	edx
lea	ecx, [esp+154h+var_138]
push	ecx		; int
lea	edx, [esp+158h+var_134]
lea	eax, [esp+158h+var_104]
push	offset aFile0DoesNotEx ; "File {0} does	not exist!"
push	edx		; int
mov	[esp+160h+var_134], 2
mov	[esp+160h+var_130], eax
mov	[esp+160h+var_12C], 100h
call	sub_7DB780
lea	eax, [esp+160h+var_104]
add	esp, 0Ch
lea	edx, [eax+1]

loc_7DB974:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7DB974
sub	eax, edx
mov	edx, [esi]
mov	edx, [edx+30h]

loc_7DB982:
mov	[esp+154h+var_13C], eax
lea	ecx, [esp+154h+var_104]
lea	eax, [esp+154h+var_140]
mov	[esp+154h+var_140], ecx
push	eax
mov	ecx, esi
call	edx

loc_7DB997:
cmp	ebx, edi
jz	short loc_7DB9A2
mov	ecx, ebx
call	sub_64A430

loc_7DB9A2:
mov	ecx, [esp+154h+var_4]
mov	al, byte ptr [esp+154h+var_144+3]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 144h
retn	0Ch
sub_7DB800 endp

align 10h
; [00000015 BYTES: COLLAPSED FUNCTION _exit. PRESS KEYPAD "+" TO EXPAND]
align 10h


; Attributes: bp-based frame

sub_7DB9F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
push	0
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DBA50
add	esp, 10h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7DBA49
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+0ECh]
test	ecx, ecx
jz	short loc_7DBA49
push	offset aXmlHttpWww_w3_ ; "xml=http://www.w3.org/XML/1998/namespac"...
mov	edx, [ebp+var_4]
push	edx
call	sub_7E4090
add	esp, 8
movzx	eax, al
test	eax, eax
jnz	short loc_7DBA49
mov	ecx, [ebp+var_4]
push	ecx
call	sub_7DC090
add	esp, 4
xor	eax, eax
jmp	short loc_7DBA4C

loc_7DBA49:
mov	eax, [ebp+var_4]

loc_7DBA4C:
mov	esp, ebp
pop	ebp
retn
sub_7DB9F0 endp



; Attributes: bp-based frame

sub_7DBA50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
cmp	[ebp+arg_4], 0
jz	short loc_7DBAA1
push	1F0h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
call	ecx
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7DBA9F
mov	edx, [ebp+var_4]
add	edx, 0Ch
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
mov	[eax+8], edx

loc_7DBA9F:
jmp	short loc_7DBADD

loc_7DBAA1:		; size_t
push	1F0h
call	_malloc
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7DBADD
mov	eax, [ebp+var_4]
add	eax, 0Ch
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], offset	_malloc
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], offset _realloc
mov	eax, [ebp+var_C]
mov	dword ptr [eax+8], offset _free

loc_7DBADD:
cmp	[ebp+var_4], 0
jnz	short loc_7DBAEB
mov	eax, [ebp+var_4]
jmp	loc_7DBD5C

loc_7DBAEB:
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+20h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+17Ch], 10h
mov	ecx, [ebp+var_4]
mov	edx, [ecx+17Ch]
shl	edx, 4
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	edx, [ebp+var_4]
mov	[edx+188h], eax
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+188h], 0
jnz	short loc_7DBB4F
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+14h]
call	eax
add	esp, 4
xor	eax, eax
jmp	loc_7DBD5C

loc_7DBB4F:
push	400h
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0Ch]
call	edx
add	esp, 4
mov	ecx, [ebp+var_4]
mov	[ecx+2Ch], eax
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+2Ch], 0
jnz	short loc_7DBB99
mov	eax, [ebp+var_4]
mov	ecx, [eax+188h]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+14h]
call	eax
add	esp, 4
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+14h]
call	eax
add	esp, 4
xor	eax, eax
jmp	loc_7DBD5C

loc_7DBB99:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+2Ch]
add	edx, 400h
mov	eax, [ebp+var_4]
mov	[eax+30h], edx
cmp	[ebp+arg_C], 0
jz	short loc_7DBBBF
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_C]
mov	[ecx+164h], edx
jmp	short loc_7DBC20

loc_7DBBBF:
mov	eax, [ebp+var_4]
add	eax, 0Ch
push	eax
call	sub_7E4540
add	esp, 4
mov	ecx, [ebp+var_4]
mov	[ecx+164h], eax
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+164h], 0
jnz	short loc_7DBC20
mov	eax, [ebp+var_4]
mov	ecx, [eax+2Ch]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+14h]
call	eax
add	esp, 4
mov	ecx, [ebp+var_4]
mov	edx, [ecx+188h]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+14h]
call	ecx
add	esp, 4
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+14h]
call	ecx
add	esp, 4
xor	eax, eax
jmp	loc_7DBD5C

loc_7DBC20:
mov	edx, [ebp+var_4]
mov	dword ptr [edx+178h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+170h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+130h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+1D4h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+1D0h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+7Ch], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0F8h], 0
mov	eax, [ebp+var_4]
mov	byte ptr [eax+1D8h], 21h
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0ECh], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0EDh], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+18Ch], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+190h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+194h], 0
mov	eax, [ebp+var_4]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 1A0h
push	ecx
call	sub_7E4D10
add	esp, 8
mov	edx, [ebp+var_4]
add	edx, 0Ch
push	edx
mov	eax, [ebp+var_4]
add	eax, 1B8h
push	eax
call	sub_7E4D10
add	esp, 8
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4]
push	edx
call	sub_7DBD60
add	esp, 8
cmp	[ebp+arg_0], 0
jz	short loc_7DBD1D
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+0E8h], 0
jnz	short loc_7DBD1D
mov	ecx, [ebp+var_4]
push	ecx
call	sub_7DC090
add	esp, 4
xor	eax, eax
jmp	short loc_7DBD5C

loc_7DBD1D:
cmp	[ebp+arg_8], 0
jz	short loc_7DBD4B
mov	edx, [ebp+var_4]
mov	byte ptr [edx+0ECh], 1
call	sub_7F8340
mov	ecx, [ebp+var_4]
mov	[ecx+0E4h], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_8]
mov	cl, [eax]
mov	[edx+1D8h], cl
jmp	short loc_7DBD59

loc_7DBD4B:
call	sub_7F7730
mov	edx, [ebp+var_4]
mov	[edx+0E4h], eax

loc_7DBD59:
mov	eax, [ebp+var_4]

loc_7DBD5C:
mov	esp, ebp
pop	ebp
retn
sub_7DBA50 endp



; Attributes: bp-based frame

sub_7DBD60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+118h], offset sub_7DF880
mov	ecx, [ebp+arg_0]
add	ecx, 100h
push	ecx
call	sub_7F8540
add	esp, 4
cmp	[ebp+arg_4], 0
jz	short loc_7DBDA3
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E4EC0
add	esp, 8
mov	[ebp+var_4], eax
jmp	short loc_7DBDAA

loc_7DBDA3:
mov	[ebp+var_4], 0

loc_7DBDAA:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx+0E8h], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+168h], 0
push	0
mov	ecx, [ebp+arg_0]
add	ecx, 90h
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 94h
push	edx
call	sub_7F7740
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+34h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+38h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+3Ch], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+40h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+44h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+48h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+4Ch], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+50h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+54h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+58h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+5Ch], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+60h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+64h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+68h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+6Ch], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+70h], 0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	[eax+74h], ecx
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+78h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+80h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+84h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+88h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+8Ch], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+18h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
mov	[ecx+1Ch], eax
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+24h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+28h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+158h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+15Ch], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+13Ch], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+140h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+144h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+148h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+14Ch], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+150h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+154h], 0
mov	eax, [ebp+arg_0]
mov	byte ptr [eax+160h], 0
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx+161h], 0
push	8		; size_t
push	0		; int
mov	edx, [ebp+arg_0]
add	edx, 198h
push	edx		; void *
call	_memset
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+11Ch], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+120h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+124h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+128h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+12Ch], 0
mov	edx, [ebp+arg_0]
mov	byte ptr [edx+134h], 1
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+138h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+16Ch], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+174h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+180h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+0F0h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+0FCh], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+0F4h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+1DCh], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+1E0h], 0
mov	eax, [ebp+arg_0]
mov	byte ptr [eax+1E8h], 0
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx+1E9h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+1ECh], 0
mov	esp, ebp
pop	ebp
retn
sub_7DBD60 endp

align 10h


; Attributes: bp-based frame

sub_7DC090 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
cmp	[ebp+arg_0], 0
jnz	short loc_7DC0A1
jmp	loc_7DC2B6

loc_7DC0A1:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+16Ch]
mov	[ebp+var_4], ecx

loc_7DC0AD:
cmp	[ebp+var_4], 0
jnz	short loc_7DC0DA
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+170h], 0
jnz	short loc_7DC0C1
jmp	short loc_7DC11E

loc_7DC0C1:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+170h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+170h], 0

loc_7DC0DA:
mov	eax, [ebp+var_4]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+24h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
call	eax
add	esp, 4
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx+2Ch]
push	eax
call	sub_7DC2C0
add	esp, 8
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
call	eax
add	esp, 4
jmp	short loc_7DC0AD

loc_7DC11E:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+12Ch]
mov	[ebp+var_8], edx

loc_7DC12A:
cmp	[ebp+var_8], 0
jnz	short loc_7DC157
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+130h], 0
jnz	short loc_7DC13E
jmp	short loc_7DC177

loc_7DC13E:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+130h]
mov	[ebp+var_8], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+130h], 0

loc_7DC157:
mov	ecx, [ebp+var_8]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
call	eax
add	esp, 4
jmp	short loc_7DC12A

loc_7DC177:
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+178h]
push	eax
call	sub_7DC2C0
add	esp, 8
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+174h]
push	eax
call	sub_7DC2C0
add	esp, 8
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4DD0
add	esp, 4
mov	edx, [ebp+arg_0]
add	edx, 1B8h
push	edx
call	sub_7E4DD0
add	esp, 4
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E8h]
test	ecx, ecx
jnz	short loc_7DC20B
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+164h], 0
jz	short loc_7DC20B
mov	eax, [ebp+arg_0]
add	eax, 0Ch
push	eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+1DCh], 0
setz	dl
movzx	eax, dl
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+164h]
push	edx
call	sub_7E4690
add	esp, 0Ch

loc_7DC20B:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
call	eax
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1D0h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
call	ecx
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
call	edx
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
call	eax
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18Ch]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
call	ecx
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+0F0h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
call	edx
add	esp, 4
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0FCh], 0
jz	short loc_7DC2A7
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0F4h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0FCh]
call	ecx
add	esp, 4

loc_7DC2A7:
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
call	ecx
add	esp, 4

loc_7DC2B6:
mov	esp, ebp
pop	ebp
retn
sub_7DC090 endp

align 10h


; Attributes: bp-based frame

sub_7DC2C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx

loc_7DC2C4:
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7DC2D2
jmp	short loc_7DC2FE

loc_7DC2D2:
mov	ecx, [ebp+var_4]
mov	edx, [ecx+4]
mov	[ebp+arg_0], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+14h]
call	eax
add	esp, 4
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+14h]
call	eax
add	esp, 4
jmp	short loc_7DC2C4

loc_7DC2FE:
mov	esp, ebp
pop	ebp
retn
sub_7DC2C0 endp

align 10h


; Attributes: bp-based frame

sub_7DC310 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+4]
cmp	edx, [ecx]
jnz	short loc_7DC333
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx+4], eax
jmp	short loc_7DC33B

loc_7DC333:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx], edx

loc_7DC33B:
pop	ebp
retn
sub_7DC310 endp

align 10h


; Attributes: bp-based frame

sub_7DC340 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+34h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx+38h], eax
pop	ebp
retn
sub_7DC340 endp

align 10h


; Attributes: bp-based frame

sub_7DC360 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+34h], ecx
pop	ebp
retn
sub_7DC360 endp

align 10h


; Attributes: bp-based frame

sub_7DC370 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+38h], ecx
pop	ebp
retn
sub_7DC370 endp

align 10h


; Attributes: bp-based frame

sub_7DC380 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+3Ch], ecx
pop	ebp
retn
sub_7DC380 endp

align 10h


; Attributes: bp-based frame

sub_7DC390 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+44h], ecx
pop	ebp
retn
sub_7DC390 endp

align 10h


; Attributes: bp-based frame

sub_7DC3A0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+50h], ecx
mov	edx, [ebp+arg_0]
mov	byte ptr [edx+134h], 0
pop	ebp
retn
sub_7DC3A0 endp

align 10h


; Attributes: bp-based frame

sub_7DC3C0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+8Ch], ecx
pop	ebp
retn
sub_7DC3C0 endp

align 10h


; Attributes: bp-based frame

sub_7DC3E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1E0h]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 2
jz	short loc_7DC414
cmp	[ebp+var_8], 3
jz	short loc_7DC400
jmp	short loc_7DC428

loc_7DC400:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+11Ch], 21h
xor	eax, eax
jmp	loc_7DC5A5

loc_7DC414:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+11Ch], 24h
xor	eax, eax
jmp	loc_7DC5A5

loc_7DC428:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+1E0h], 1
cmp	[ebp+arg_8], 0
jnz	loc_7DC55E
mov	edx, [ebp+arg_0]
mov	al, byte ptr [ebp+arg_C]
mov	[edx+1E4h], al
cmp	[ebp+arg_C], 0
jnz	short loc_7DC45B
mov	eax, 1
jmp	loc_7DC5A5

loc_7DC45B:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ecx+128h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]
mov	[ecx+28h], eax
mov	ecx, [ebp+arg_0]
add	ecx, 18h
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+28h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+118h]
call	edx
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	[ecx+11Ch], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+11Ch], 0
jnz	loc_7DC539
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1E0h]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jl	short loc_7DC532
cmp	[ebp+var_C], 1
jle	short loc_7DC525
cmp	[ebp+var_C], 3
jz	short loc_7DC4D6
jmp	short loc_7DC532

loc_7DC4D6:
mov	edx, [ebp+arg_0]
add	edx, 198h
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+128h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
mov	edx, [ecx+34h]
call	edx
add	esp, 10h
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18h]
mov	[eax+128h], edx
mov	eax, 2
jmp	loc_7DC5A5

loc_7DC525:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+1E0h], 2

loc_7DC532:
mov	eax, 1
jmp	short loc_7DC5A5

loc_7DC539:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+120h]
mov	[ecx+124h], eax
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+118h], offset sub_7E2640
xor	eax, eax
jmp	short loc_7DC5A5
jmp	short loc_7DC5A5

loc_7DC55E:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DC750
add	esp, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7DC57D
xor	eax, eax
jmp	short loc_7DC5A5
jmp	short loc_7DC5A5

loc_7DC57D:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_4]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DC5B0
add	esp, 0Ch

loc_7DC5A5:
mov	esp, ebp
pop	ebp
retn
sub_7DC3E0 endp

align 10h


; Attributes: bp-based frame

sub_7DC5B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_8], 1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1E0h]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 2
jz	short loc_7DC5EB
cmp	[ebp+var_C], 3
jz	short loc_7DC5D7
jmp	short loc_7DC5FF

loc_7DC5D7:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+11Ch], 21h
xor	eax, eax
jmp	loc_7DC741

loc_7DC5EB:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+11Ch], 24h
xor	eax, eax
jmp	loc_7DC741

loc_7DC5FF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+1E0h], 1
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx+128h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
add	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1Ch]
mov	[eax+28h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+24h]
add	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_0]
mov	[edx+24h], ecx
mov	eax, [ebp+arg_0]
mov	cl, byte ptr [ebp+arg_8]
mov	[eax+1E4h], cl
mov	edx, [ebp+arg_0]
add	edx, 18h
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+28h]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+118h]
call	edx
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	[ecx+11Ch], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+11Ch], 0
jz	short loc_7DC6B8
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+120h]
mov	[eax+124h], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+118h], offset sub_7E2640
xor	eax, eax
jmp	loc_7DC741
jmp	short loc_7DC6F9

loc_7DC6B8:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1E0h]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0
jl	short loc_7DC6F9
cmp	[ebp+var_10], 1
jle	short loc_7DC6E1
cmp	[ebp+var_10], 3
jz	short loc_7DC6D8
jmp	short loc_7DC6F9

loc_7DC6D8:
mov	[ebp+var_8], 2
jmp	short loc_7DC6F9

loc_7DC6E1:
cmp	[ebp+arg_8], 0
jz	short loc_7DC6F9
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+1E0h], 2
mov	eax, [ebp+var_8]
jmp	short loc_7DC741

loc_7DC6F9:
mov	ecx, [ebp+arg_0]
add	ecx, 198h
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+18h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+128h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	ecx, [eax+34h]
call	ecx
add	esp, 10h
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
mov	[edx+128h], ecx
mov	eax, [ebp+var_8]

loc_7DC741:
mov	esp, ebp
pop	ebp
retn
sub_7DC5B0 endp

align 10h


; Attributes: bp-based frame

sub_7DC750 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1E0h]
mov	[ebp+var_1C], ecx
cmp	[ebp+var_1C], 2
jz	short loc_7DC784
cmp	[ebp+var_1C], 3
jz	short loc_7DC770
jmp	short loc_7DC798

loc_7DC770:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+11Ch], 21h
xor	eax, eax
jmp	loc_7DC991

loc_7DC784:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+11Ch], 24h
xor	eax, eax
jmp	loc_7DC991

loc_7DC798:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+20h]
sub	eax, [edx+1Ch]
cmp	[ebp+arg_4], eax
jle	loc_7DC98B
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1Ch]
sub	eax, [edx+18h]
add	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+18h]
sub	eax, [edx+8]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 400h
jle	short loc_7DC7DE
mov	[ebp+var_8], 400h

loc_7DC7DE:
mov	ecx, [ebp+var_4]
add	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+20h]
sub	ecx, [eax+8]
cmp	[ebp+var_4], ecx
jg	short loc_7DC867
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+18h]
sub	ecx, [eax+8]
cmp	[ebp+var_8], ecx
jge	short loc_7DC862
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+18h]
sub	ecx, [eax+8]
sub	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+1Ch]
sub	ecx, [eax+18h]
add	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
add	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
push	edx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1Ch]
sub	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18h]
sub	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	[edx+18h], ecx

loc_7DC862:
jmp	loc_7DC98B

loc_7DC867:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+20h]
sub	edx, [ecx+18h]
mov	[ebp+var_14], edx
jnz	short loc_7DC87F
mov	[ebp+var_14], 400h

loc_7DC87F:
mov	eax, [ebp+var_14]
shl	eax, 1
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+var_4]
jl	short loc_7DC87F
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7DC8BB
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+11Ch], 1
xor	eax, eax
jmp	loc_7DC991

loc_7DC8BB:
mov	eax, [ebp+var_10]
add	eax, [ebp+var_14]
mov	ecx, [ebp+arg_0]
mov	[ecx+20h], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+18h], 0
jz	loc_7DC964
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+18h]
sub	edx, [ecx+8]
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 400h
jle	short loc_7DC8F3
mov	[ebp+var_18], 400h

loc_7DC8F3:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1Ch]
sub	edx, [ecx+18h]
add	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_18]
neg	eax
mov	ecx, [ebp+arg_0]
add	eax, [ecx+18h]
push	eax
mov	edx, [ebp+var_10]
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
call	eax
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1Ch]
sub	edx, [ecx+18h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
add	ecx, edx
add	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[edx+1Ch], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
add	ecx, [ebp+var_18]
mov	edx, [ebp+arg_0]
mov	[edx+18h], ecx
jmp	short loc_7DC98B

loc_7DC964:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1Ch]
sub	edx, [ecx+18h]
add	edx, [ebp+var_10]
mov	eax, [ebp+arg_0]
mov	[eax+1Ch], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_10]
mov	[ecx+8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax+18h], ecx

loc_7DC98B:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1Ch]

loc_7DC991:
mov	esp, ebp
pop	ebp
retn
sub_7DC750 endp

align 10h


; Attributes: bp-based frame

sub_7DC9A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1E0h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 2
jz	short loc_7DC9E6
cmp	[ebp+var_4], 3
jz	short loc_7DC9BE
jmp	short loc_7DC9F7

loc_7DC9BE:
movzx	edx, [ebp+arg_4]
test	edx, edx
jz	short loc_7DC9D7
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+11Ch], 21h
xor	eax, eax
jmp	short loc_7DCA3F

loc_7DC9D7:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+1E0h], 2
jmp	short loc_7DCA3A

loc_7DC9E6:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+11Ch], 24h
xor	eax, eax
jmp	short loc_7DCA3F

loc_7DC9F7:
movzx	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_7DCA2D
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+1E8h]
test	edx, edx
jz	short loc_7DCA1E
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+11Ch], 25h
xor	eax, eax
jmp	short loc_7DCA3F

loc_7DCA1E:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+1E0h], 3
jmp	short loc_7DCA3A

loc_7DCA2D:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+1E0h], 2

loc_7DCA3A:
mov	eax, 1

loc_7DCA3F:
mov	esp, ebp
pop	ebp
retn
sub_7DC9A0 endp

align 10h


; Attributes: bp-based frame

sub_7DCA50 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+120h], 0
jz	short loc_7DCA7A
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+28h]
sub	eax, [edx+120h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+24h]
sub	edx, eax
mov	eax, edx
jmp	short loc_7DCA7D

loc_7DCA7A:
or	eax, 0FFFFFFFFh

loc_7DCA7D:
pop	ebp
retn
sub_7DCA50 endp

align 10h


; Attributes: bp-based frame

sub_7DCA80 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+120h], 0
jz	short loc_7DCAEE
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+120h]
cmp	eax, [edx+128h]
jb	short loc_7DCAEE
mov	ecx, [ebp+arg_0]
add	ecx, 198h
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+120h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+128h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	ecx, [eax+34h]
call	ecx
add	esp, 10h
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+120h]
mov	[edx+128h], ecx

loc_7DCAEE:
mov	edx, [ebp+arg_0]
mov	eax, [edx+198h]
add	eax, 1
pop	ebp
retn
sub_7DCA80 endp

align 10h


; Attributes: bp-based frame

sub_7DCB00 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+120h], 0
jz	short loc_7DCB6E
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+120h]
cmp	eax, [edx+128h]
jb	short loc_7DCB6E
mov	ecx, [ebp+arg_0]
add	ecx, 198h
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+120h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+128h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	ecx, [eax+34h]
call	ecx
add	esp, 10h
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+120h]
mov	[edx+128h], ecx

loc_7DCB6E:
mov	edx, [ebp+arg_0]
mov	eax, [edx+19Ch]
pop	ebp
retn
sub_7DCB00 endp

align 10h


; Attributes: bp-based frame

sub_7DCB80 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
cmp	[ebp+arg_0], 0
jle	short loc_7DCB9B
cmp	[ebp+arg_0], 29h
jnb	short loc_7DCB9B
mov	eax, [ebp+arg_0]
mov	eax, ds:dword_1457378[eax*4]
jmp	short loc_7DCB9D

loc_7DCB9B:
xor	eax, eax

loc_7DCB9D:
pop	ebp
retn
sub_7DCB80 endp

align 10h


; Attributes: bp-based frame

sub_7DCBA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E4h]
test	ecx, ecx
setz	dl
movzx	eax, dl
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
push	1
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DCD20
add	esp, 1Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7DCBFE
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DCC10
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7DCBFE
mov	eax, 1
jmp	short loc_7DCC01

loc_7DCBFE:
mov	eax, [ebp+var_4]

loc_7DCC01:
mov	esp, ebp
pop	ebp
retn
sub_7DCBA0 endp

align 10h


; Attributes: bp-based frame

sub_7DCC10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+16Ch]
mov	[ebp+var_4], ecx

loc_7DCC22:
cmp	[ebp+var_4], 0
jz	loc_7DCD1A
mov	edx, [ebp+var_4]
mov	eax, [edx+18h]
add	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+24h]
add	edx, [ebp+var_C]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
cmp	ecx, [ebp+var_8]
jnz	short loc_7DCC54
jmp	loc_7DCD1A

loc_7DCC54:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
add	eax, [edx+8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [ecx+28h]
sub	eax, [edx+24h]
cmp	[ebp+var_10], eax
jle	short loc_7DCCEA
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+24h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
call	edx
add	esp, 8
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jnz	short loc_7DCC97
xor	al, al
jmp	loc_7DCD1C

loc_7DCC97:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+24h]
jnz	short loc_7DCCAE
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_14]
mov	[eax+0Ch], ecx

loc_7DCCAE:
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+10h], 0
jz	short loc_7DCCCC
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_4]
mov	edx, [eax+10h]
sub	edx, [ecx+24h]
add	edx, [ebp+var_14]
mov	eax, [ebp+var_4]
mov	[eax+10h], edx

loc_7DCCCC:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_14]
mov	[ecx+24h], edx
mov	eax, [ebp+var_14]
add	eax, [ebp+var_10]
mov	ecx, [ebp+var_4]
mov	[ecx+28h], eax
mov	edx, [ebp+var_14]
add	edx, [ebp+var_C]
mov	[ebp+var_8], edx

loc_7DCCEA:
mov	eax, [ebp+var_4]
mov	ecx, [eax+8]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[edx+4], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
jmp	loc_7DCC22

loc_7DCD1A:
mov	al, 1

loc_7DCD1C:
mov	esp, ebp
pop	ebp
retn
sub_7DCC10 endp



; Attributes: bp-based frame

sub_7DCD20 proc	near

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_9D=	byte ptr -9Dh
var_9C=	byte ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_21=	byte ptr -21h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	byte ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 0B8h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
cmp	eax, [edx+90h]
jnz	short loc_7DCD5D
mov	ecx, [ebp+arg_0]
add	ecx, 120h
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 124h
mov	[ebp+var_4], edx
jmp	short loc_7DCD78

loc_7DCD5D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+12Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+12Ch]
add	eax, 4
mov	[ebp+var_4], eax

loc_7DCD78:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_C]
mov	[ecx], edx

loc_7DCD80:
mov	eax, [ebp+arg_C]
mov	[ebp+var_14], eax
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+4]
call	eax
add	esp, 10h
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+var_10]
mov	[ebp+var_B4], eax
mov	ecx, [ebp+var_B4]
add	ecx, 5
mov	[ebp+var_B4], ecx
cmp	[ebp+var_B4], 12h ; switch 19 cases
ja	loc_7DDCBD	; default
mov	edx, [ebp+var_B4]
jmp	ds:off_7DDD2C[edx*4] ; switch jump

loc_7DCDDE:		; jumptable 007DCDD7 case 2
movzx	eax, [ebp+arg_18]
test	eax, eax
jz	short loc_7DCDF5
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7DDD27

loc_7DCDF5:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+3Ch], 0
jz	short loc_7DCE24
mov	[ebp+var_15], 0Ah
push	1
lea	eax, [ebp+var_15]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 0Ch
jmp	short loc_7DCE45

loc_7DCE24:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DCE45
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DCE45:
cmp	[ebp+arg_4], 0
jnz	short loc_7DCE55
mov	eax, 3
jmp	loc_7DDD27

loc_7DCE55:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+138h]
cmp	edx, [ebp+arg_4]
jz	short loc_7DCE6D
mov	eax, 0Dh
jmp	loc_7DDD27

loc_7DCE6D:
mov	eax, [ebp+arg_14]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7DDD27

loc_7DCE7C:		; jumptable 007DCDD7 case 1
movzx	edx, [ebp+arg_18]
test	edx, edx
jz	short loc_7DCE93
mov	eax, [ebp+arg_14]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7DDD27

loc_7DCE93:
cmp	[ebp+arg_4], 0
jle	short loc_7DCEC0
mov	edx, [ebp+arg_0]
mov	eax, [edx+138h]
cmp	eax, [ebp+arg_4]
jz	short loc_7DCEB1
mov	eax, 0Dh
jmp	loc_7DDD27

loc_7DCEB1:
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7DDD27

loc_7DCEC0:
mov	eax, 3
jmp	loc_7DDD27

loc_7DCECA:		; jumptable 007DCDD7 case 5
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	eax, 4
jmp	loc_7DDD27

loc_7DCEDC:		; jumptable 007DCDD7 case 4
movzx	edx, [ebp+arg_18]
test	edx, edx
jz	short loc_7DCEF3
mov	eax, [ebp+arg_14]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7DDD27

loc_7DCEF3:
mov	eax, 5
jmp	loc_7DDD27

loc_7DCEFD:		; jumptable 007DCDD7 case 3
movzx	edx, [ebp+arg_18]
test	edx, edx
jz	short loc_7DCF14
mov	eax, [ebp+arg_14]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7DDD27

loc_7DCF14:
mov	eax, 6
jmp	loc_7DDD27

loc_7DCF1E:		; jumptable 007DCDD7 case 14
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_14]
sub	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_C]
add	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+30h]
call	edx
add	esp, 0Ch
mov	[ebp+var_21], al
movsx	eax, [ebp+var_21]
test	eax, eax
jz	short loc_7DCF95
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+3Ch], 0
jz	short loc_7DCF6F
push	1
lea	edx, [ebp+var_21]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+3Ch]
call	eax
add	esp, 0Ch
jmp	short loc_7DCF90

loc_7DCF6F:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+50h], 0
jz	short loc_7DCF90
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3440
add	esp, 10h

loc_7DCF90:
jmp	loc_7DDCDE

loc_7DCF95:
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+var_14]
sub	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_C]
add	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+var_C]
add	edx, 50h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jnz	short loc_7DCFCF
mov	eax, 1
jmp	loc_7DDD27

loc_7DCFCF:		; size_t
push	0
mov	eax, [ebp+var_20]
push	eax		; int
mov	ecx, [ebp+var_C]
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_C]
mov	ecx, [eax+60h]
mov	[edx+5Ch], ecx
mov	edx, [ebp+var_C]
movzx	eax, byte ptr [edx+81h]
test	eax, eax
jz	short loc_7DD00C
mov	ecx, [ebp+var_C]
movzx	edx, byte ptr [ecx+82h]
test	edx, edx
jz	short loc_7DD035

loc_7DD00C:
cmp	[ebp+var_1C], 0
jnz	short loc_7DD01E
mov	eax, 0Bh
jmp	loc_7DDD27
jmp	short loc_7DD033

loc_7DD01E:
mov	eax, [ebp+var_1C]
movzx	ecx, byte ptr [eax+22h]
test	ecx, ecx
jnz	short loc_7DD033
mov	eax, 18h
jmp	loc_7DDD27

loc_7DD033:
jmp	short loc_7DD084

loc_7DD035:
cmp	[ebp+var_1C], 0
jnz	short loc_7DD084
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+78h], 0
jz	short loc_7DD05E
push	0
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+78h]
call	ecx
add	esp, 0Ch
jmp	short loc_7DD07F

loc_7DD05E:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DD07F
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DD07F:
jmp	loc_7DDCDE

loc_7DD084:
mov	ecx, [ebp+var_1C]
movzx	edx, byte ptr [ecx+20h]
test	edx, edx
jz	short loc_7DD099
mov	eax, 0Ch
jmp	loc_7DDD27

loc_7DD099:
mov	eax, [ebp+var_1C]
cmp	dword ptr [eax+1Ch], 0
jz	short loc_7DD0AC
mov	eax, 0Fh
jmp	loc_7DDD27

loc_7DD0AC:
mov	ecx, [ebp+var_1C]
cmp	dword ptr [ecx+4], 0
jz	loc_7DD13A
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+134h]
test	eax, eax
jnz	short loc_7DD112
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+78h], 0
jz	short loc_7DD0EC
push	0
mov	edx, [ebp+var_1C]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+78h]
call	ecx
add	esp, 0Ch
jmp	short loc_7DD10D

loc_7DD0EC:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DD10D
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DD10D:
jmp	loc_7DDCDE

loc_7DD112:
push	0
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E2240
add	esp, 0Ch
mov	[ebp+var_28], eax
cmp	[ebp+var_28], 0
jz	short loc_7DD135
mov	eax, [ebp+var_28]
jmp	loc_7DDD27

loc_7DD135:
jmp	loc_7DD1DE

loc_7DD13A:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+70h], 0
jz	short loc_7DD1BD
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+20h], 1
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3B10
add	esp, 4
mov	[ebp+var_2C], eax
mov	eax, [ebp+var_1C]
mov	byte ptr [eax+20h], 0
cmp	[ebp+var_2C], 0
jnz	short loc_7DD170
mov	eax, 1
jmp	loc_7DDD27

loc_7DD170:
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+18h]
push	edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+var_1C]
mov	eax, [edx+14h]
push	eax
mov	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+74h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+70h]
call	edx
add	esp, 14h
test	eax, eax
jnz	short loc_7DD1A9
mov	eax, 15h
jmp	loc_7DDD27

loc_7DD1A9:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
mov	[eax+1ACh], edx
jmp	short loc_7DD1DE

loc_7DD1BD:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7DD1DE
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7DD1DE:
jmp	loc_7DDCDE

loc_7DD1E3:		; jumptable 007DCDD7 cases 6,7
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+170h], 0
jz	short loc_7DD211
mov	eax, [ebp+arg_0]
mov	ecx, [eax+170h]
mov	[ebp+var_30], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+170h]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx+170h], edx
jmp	short loc_7DD275

loc_7DD211:
push	30h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	[ebp+var_30], eax
cmp	[ebp+var_30], 0
jnz	short loc_7DD231
mov	eax, 1
jmp	loc_7DDD27

loc_7DD231:
push	20h
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
call	eax
add	esp, 4
mov	ecx, [ebp+var_30]
mov	[ecx+24h], eax
mov	edx, [ebp+var_30]
cmp	dword ptr [edx+24h], 0
jnz	short loc_7DD266
mov	eax, [ebp+var_30]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
call	edx
add	esp, 4
mov	eax, 1
jmp	loc_7DDD27

loc_7DD266:
mov	eax, [ebp+var_30]
mov	ecx, [eax+24h]
add	ecx, 20h
mov	edx, [ebp+var_30]
mov	[edx+28h], ecx

loc_7DD275:
mov	eax, [ebp+var_30]
mov	dword ptr [eax+2Ch], 0
mov	ecx, [ebp+var_30]
mov	edx, [ebp+arg_0]
mov	eax, [edx+16Ch]
mov	[ecx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_30]
mov	[ecx+16Ch], edx
mov	eax, [ebp+var_30]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_30]
mov	dword ptr [ecx+14h], 0
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_C]
add	eax, [edx+44h]
mov	ecx, [ebp+var_30]
mov	[ecx+4], eax
mov	edx, [ebp+var_30]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+20h]
call	eax
add	esp, 8
mov	ecx, [ebp+var_30]
mov	[ecx+8], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+138h]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+138h], eax
mov	edx, [ebp+var_30]
mov	eax, [edx+4]
mov	ecx, [ebp+var_30]
add	eax, [ecx+8]
mov	[ebp+var_40], eax
mov	edx, [ebp+var_30]
mov	eax, [edx+4]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_30]
mov	edx, [ecx+24h]
mov	[ebp+var_34], edx

loc_7DD30E:
mov	eax, [ebp+var_30]
mov	ecx, [eax+28h]
sub	ecx, 1
push	ecx
lea	edx, [ebp+var_34]
push	edx
mov	eax, [ebp+var_40]
push	eax
lea	ecx, [ebp+var_3C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 14h
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_34]
sub	eax, [edx+24h]
mov	[ebp+var_44], eax
mov	ecx, [ebp+var_3C]
cmp	ecx, [ebp+var_40]
jnz	short loc_7DD352
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_44]
mov	[edx+18h], eax
jmp	short loc_7DD3AF

loc_7DD352:
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_30]
mov	eax, [ecx+28h]
sub	eax, [edx+24h]
shl	eax, 1
mov	[ebp+var_48], eax
mov	ecx, [ebp+var_48]
push	ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+24h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
call	edx
add	esp, 8
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jnz	short loc_7DD38C
mov	eax, 1
jmp	loc_7DDD27

loc_7DD38C:
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_4C]
mov	[eax+24h], ecx
mov	edx, [ebp+var_4C]
add	edx, [ebp+var_48]
mov	eax, [ebp+var_30]
mov	[eax+28h], edx
mov	ecx, [ebp+var_4C]
add	ecx, [ebp+var_44]
mov	[ebp+var_34], ecx
jmp	loc_7DD30E

loc_7DD3AF:
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_30]
mov	ecx, [eax+24h]
mov	[edx+0Ch], ecx
mov	edx, [ebp+var_34]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_30]
add	eax, 2Ch
push	eax
mov	ecx, [ebp+var_30]
add	ecx, 0Ch
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DDD80
add	esp, 14h
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 0
jz	short loc_7DD3F4
mov	eax, [ebp+var_38]
jmp	loc_7DDD27

loc_7DD3F4:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+34h], 0
jz	short loc_7DD422
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
push	ecx
mov	edx, [ebp+var_30]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+34h]
call	ecx
add	esp, 0Ch
jmp	short loc_7DD443

loc_7DD422:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DD443
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DD443:
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4D50
add	esp, 4
jmp	loc_7DDCDE

loc_7DD45A:		; jumptable 007DCDD7 cases 8,9
mov	edx, [ebp+arg_8]
mov	eax, [ebp+arg_C]
add	eax, [edx+44h]
mov	[ebp+var_6C], eax
mov	[ebp+var_50], 0
mov	[ebp+var_6D], 1
mov	ecx, [ebp+var_6C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+20h]
call	ecx
add	esp, 8
add	eax, [ebp+var_6C]
push	eax
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_68], eax
cmp	[ebp+var_68], 0
jnz	short loc_7DD4B5
mov	eax, 1
jmp	loc_7DDD27

loc_7DD4B5:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	[edx+1B0h], ecx
lea	edx, [ebp+var_50]
push	edx
lea	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DDD80
add	esp, 14h
mov	[ebp+var_74], eax
cmp	[ebp+var_74], 0
jz	short loc_7DD4F4
mov	eax, [ebp+var_74]
jmp	loc_7DDD27

loc_7DD4F4:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	[ecx+1B0h], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+34h], 0
jz	short loc_7DD533
mov	edx, [ebp+arg_0]
mov	eax, [edx+188h]
push	eax
mov	ecx, [ebp+var_68]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+34h]
call	edx
add	esp, 0Ch
mov	[ebp+var_6D], 0

loc_7DD533:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+38h], 0
jz	short loc_7DD569
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+34h], 0
jz	short loc_7DD54F
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[edx], ecx

loc_7DD54F:
mov	edx, [ebp+var_68]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+38h]
call	eax
add	esp, 8
mov	[ebp+var_6D], 0

loc_7DD569:
movzx	ecx, [ebp+var_6D]
test	ecx, ecx
jz	short loc_7DD592
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DD592
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DD592:
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4D50
add	esp, 4

loc_7DD5A4:
cmp	[ebp+var_50], 0
jz	short loc_7DD607
mov	edx, [ebp+var_50]
mov	[ebp+var_78], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+68h], 0
jz	short loc_7DD5D3
mov	ecx, [ebp+var_78]
mov	edx, [ecx]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+68h]
call	ecx
add	esp, 8

loc_7DD5D3:
mov	edx, [ebp+var_50]
mov	eax, [edx+4]
mov	[ebp+var_50], eax
mov	ecx, [ebp+var_78]
mov	edx, [ebp+arg_0]
mov	eax, [edx+178h]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_78]
mov	[ecx+178h], edx
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	edx, [ebp+var_78]
mov	eax, [edx+8]
mov	[ecx+4], eax
jmp	short loc_7DD5A4

loc_7DD607:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+138h], 0
jnz	short loc_7DD630
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E1FE0
add	esp, 10h
jmp	loc_7DDD27

loc_7DD630:
jmp	loc_7DDCDE

loc_7DD635:		; jumptable 007DCDD7 case 10
mov	eax, [ebp+arg_0]
mov	ecx, [eax+138h]
cmp	ecx, [ebp+arg_4]
jnz	short loc_7DD652
mov	eax, 0Dh
jmp	loc_7DDD27
jmp	loc_7DD8FD

loc_7DD652:
mov	edx, [ebp+arg_0]
mov	eax, [edx+16Ch]
mov	[ebp+var_7C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_7C]
mov	eax, [edx]
mov	[ecx+16Ch], eax
mov	ecx, [ebp+var_7C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+170h]
mov	[ecx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_7C]
mov	[ecx+170h], edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+44h]
mov	edx, [ebp+arg_C]
lea	eax, [edx+ecx*2]
mov	[ebp+var_84], eax
mov	ecx, [ebp+var_84]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+20h]
call	ecx
add	esp, 8
mov	[ebp+var_80], eax
mov	edx, [ebp+var_7C]
mov	eax, [ebp+var_80]
cmp	eax, [edx+8]
jnz	short loc_7DD6DA
mov	ecx, [ebp+var_80]
push	ecx		; size_t
mov	edx, [ebp+var_84]
push	edx		; void *
mov	eax, [ebp+var_7C]
mov	ecx, [eax+4]
push	ecx		; void *
call	_memcmp
add	esp, 0Ch
test	eax, eax
jz	short loc_7DD6EF

loc_7DD6DA:
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_84]
mov	[edx], eax
mov	eax, 7
jmp	loc_7DDD27

loc_7DD6EF:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+138h]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+138h], edx
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+38h], 0
jz	loc_7DD82F
mov	edx, [ebp+var_7C]
mov	eax, [edx+10h]
mov	[ebp+var_88], eax
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+0ECh]
test	edx, edx
jz	loc_7DD814
cmp	[ebp+var_88], 0
jz	loc_7DD814
mov	eax, [ebp+var_7C]
mov	ecx, [eax+0Ch]
mov	edx, [ebp+var_7C]
add	ecx, [edx+1Ch]
mov	[ebp+var_90], ecx

loc_7DD74E:
mov	eax, [ebp+var_88]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_7DD78B
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_88]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_90]
add	edx, 1
mov	[ebp+var_90], edx
mov	eax, [ebp+var_88]
add	eax, 1
mov	[ebp+var_88], eax
jmp	short loc_7DD74E

loc_7DD78B:
mov	ecx, [ebp+var_7C]
mov	edx, [ecx+14h]
mov	[ebp+var_8C], edx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+0EDh]
test	ecx, ecx
jz	short loc_7DD80B
cmp	[ebp+var_8C], 0
jz	short loc_7DD80B
mov	edx, [ebp+var_90]
mov	eax, [ebp+arg_0]
mov	cl, [eax+1D8h]
mov	[edx], cl
mov	edx, [ebp+var_90]
add	edx, 1
mov	[ebp+var_90], edx

loc_7DD7CE:
mov	eax, [ebp+var_8C]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_7DD80B
mov	edx, [ebp+var_90]
mov	eax, [ebp+var_8C]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_90]
add	edx, 1
mov	[ebp+var_90], edx
mov	eax, [ebp+var_8C]
add	eax, 1
mov	[ebp+var_8C], eax
jmp	short loc_7DD7CE

loc_7DD80B:
mov	ecx, [ebp+var_90]
mov	byte ptr [ecx],	0

loc_7DD814:
mov	edx, [ebp+var_7C]
mov	eax, [edx+0Ch]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+38h]
call	ecx
add	esp, 8
jmp	short loc_7DD850

loc_7DD82F:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DD850
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DD850:
mov	ecx, [ebp+var_7C]
cmp	dword ptr [ecx+2Ch], 0
jz	short loc_7DD8D4
mov	edx, [ebp+var_7C]
mov	eax, [edx+2Ch]
mov	[ebp+var_94], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+68h], 0
jz	short loc_7DD88B
mov	edx, [ebp+var_94]
mov	eax, [edx]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+68h]
call	edx
add	esp, 8

loc_7DD88B:
mov	eax, [ebp+var_7C]
mov	ecx, [eax+2Ch]
mov	edx, [ebp+var_7C]
mov	eax, [ecx+4]
mov	[edx+2Ch], eax
mov	ecx, [ebp+var_94]
mov	edx, [ebp+arg_0]
mov	eax, [edx+178h]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_94]
mov	[ecx+178h], edx
mov	eax, [ebp+var_94]
mov	ecx, [eax]
mov	edx, [ebp+var_94]
mov	eax, [edx+8]
mov	[ecx+4], eax
jmp	loc_7DD850

loc_7DD8D4:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+138h], 0
jnz	short loc_7DD8FD
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E1FE0
add	esp, 10h
jmp	loc_7DDD27

loc_7DD8FD:
jmp	loc_7DDCDE

loc_7DD902:		; jumptable 007DCDD7 case 15
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+2Ch]
call	eax
add	esp, 8
mov	[ebp+var_98], eax
cmp	[ebp+var_98], 0
jge	short loc_7DD92E
mov	eax, 0Eh
jmp	loc_7DDD27

loc_7DD92E:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+3Ch], 0
jz	short loc_7DD969
lea	edx, [ebp+var_9C]
push	edx
mov	eax, [ebp+var_98]
push	eax
call	sub_7F6F20
add	esp, 8
push	eax
lea	ecx, [ebp+var_9C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+3Ch]
call	edx
add	esp, 0Ch
jmp	short loc_7DD98A

loc_7DD969:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7DD98A
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7DD98A:
jmp	loc_7DDCDE

loc_7DD98F:		; jumptable 007DCDD7 case 17
mov	eax, 11h
jmp	loc_7DDD27

loc_7DD999:		; jumptable 007DCDD7 case 12
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+3Ch], 0
jz	short loc_7DD9C6
mov	[ebp+var_9D], 0Ah
push	1
lea	eax, [ebp+var_9D]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 0Ch
jmp	short loc_7DD9E7

loc_7DD9C6:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DD9E7
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DD9E7:
jmp	loc_7DDCDE

loc_7DD9EC:		; jumptable 007DCDD7 case 13
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+48h], 0
jz	short loc_7DDA09
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+48h]
call	edx
add	esp, 4
jmp	short loc_7DDA2A

loc_7DDA09:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7DDA2A
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7DDA2A:
movzx	edx, [ebp+arg_18]
push	edx
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
lea	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DF090
add	esp, 18h
mov	[ebp+var_A4], eax
cmp	[ebp+var_A4], 0
jz	short loc_7DDA67
mov	eax, [ebp+var_A4]
jmp	loc_7DDD27
jmp	short loc_7DDA85

loc_7DDA67:
cmp	[ebp+var_14], 0
jnz	short loc_7DDA85
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+118h], offset sub_7DEF70
mov	eax, [ebp+var_A4]
jmp	loc_7DDD27

loc_7DDA85:
jmp	loc_7DDCDE

loc_7DDA8A:		; jumptable 007DCDD7 case 0
movzx	eax, [ebp+arg_18]
test	eax, eax
jz	short loc_7DDAA1
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7DDD27

loc_7DDAA1:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+3Ch], 0
jz	loc_7DDB31
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx+48h]
test	edx, edx
jnz	short loc_7DDB12
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2Ch]
mov	[ebp+var_A8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
push	eax
lea	ecx, [ebp+var_A8]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
lea	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+3Ch]
call	eax
add	esp, 14h
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_A8]
sub	edx, [ecx+2Ch]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+3Ch]
call	edx
add	esp, 0Ch
jmp	short loc_7DDB2F

loc_7DDB12:
mov	eax, [ebp+arg_10]
sub	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+3Ch]
call	edx
add	esp, 0Ch

loc_7DDB2F:
jmp	short loc_7DDB52

loc_7DDB31:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7DDB52
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7DDB52:
cmp	[ebp+arg_4], 0
jnz	short loc_7DDB6A
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_10]
mov	[edx], eax
mov	eax, 3
jmp	loc_7DDD27

loc_7DDB6A:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+138h]
cmp	edx, [ebp+arg_4]
jz	short loc_7DDB8A
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_10]
mov	[eax], ecx
mov	eax, 0Dh
jmp	loc_7DDD27

loc_7DDB8A:
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_10]
mov	[edx], eax
xor	eax, eax
jmp	loc_7DDD27

loc_7DDB99:		; jumptable 007DCDD7 case 11
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+3Ch]
mov	[ebp+var_AC], edx
cmp	[ebp+var_AC], 0
jz	loc_7DDC4D
mov	eax, [ebp+arg_8]
movsx	ecx, byte ptr [eax+48h]
test	ecx, ecx
jnz	short loc_7DDC30

loc_7DDBBD:
mov	edx, [ebp+arg_0]
mov	eax, [edx+2Ch]
mov	[ebp+var_B0], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+30h]
push	edx
lea	eax, [ebp+var_B0]
push	eax
mov	ecx, [ebp+var_14]
push	ecx
lea	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+3Ch]
call	edx
add	esp, 14h
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_B0]
sub	eax, [edx+2Ch]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+2Ch]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
call	[ebp+var_AC]
add	esp, 0Ch
mov	edx, [ebp+arg_C]
cmp	edx, [ebp+var_14]
jnz	short loc_7DDC24
jmp	short loc_7DDC2E

loc_7DDC24:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
jmp	short loc_7DDBBD

loc_7DDC2E:
jmp	short loc_7DDC4B

loc_7DDC30:
mov	edx, [ebp+var_14]
sub	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
call	[ebp+var_AC]
add	esp, 0Ch

loc_7DDC4B:
jmp	short loc_7DDC6E

loc_7DDC4D:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7DDC6E
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7DDC6E:
jmp	short loc_7DDCDE

loc_7DDC70:		; jumptable 007DCDD7 case 16
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E31C0
add	esp, 10h
test	eax, eax
jnz	short loc_7DDC96
mov	eax, 1
jmp	loc_7DDD27

loc_7DDC96:
jmp	short loc_7DDCDE

loc_7DDC98:		; jumptable 007DCDD7 case 18
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3390
add	esp, 10h
test	eax, eax
jnz	short loc_7DDCBB
mov	eax, 1
jmp	short loc_7DDD27

loc_7DDCBB:
jmp	short loc_7DDCDE

loc_7DDCBD:		; default
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+50h], 0
jz	short loc_7DDCDE
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3440
add	esp, 10h

loc_7DDCDE:
mov	eax, [ebp+var_14]
mov	[ebp+arg_C], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1E0h]
mov	[ebp+var_B8], ecx
cmp	[ebp+var_B8], 2
jz	short loc_7DDD1B
cmp	[ebp+var_B8], 3
jz	short loc_7DDD0F
jmp	short loc_7DDD22

loc_7DDD0F:
mov	edx, [ebp+arg_14]
mov	eax, [ebp+var_14]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7DDD27

loc_7DDD1B:
mov	eax, 23h
jmp	short loc_7DDD27

loc_7DDD22:
jmp	loc_7DCD80

loc_7DDD27:
mov	esp, ebp
pop	ebp
retn
sub_7DCD20 endp

align 4
off_7DDD2C dd offset loc_7DDA8A	; jump table for switch	statement
dd offset loc_7DCE7C
dd offset loc_7DCDDE
dd offset loc_7DCEFD
dd offset loc_7DCEDC
dd offset loc_7DCECA
dd offset loc_7DD1E3
dd offset loc_7DD1E3
dd offset loc_7DD45A
dd offset loc_7DD45A
dd offset loc_7DD635
dd offset loc_7DDB99
dd offset loc_7DD999
dd offset loc_7DD9EC
dd offset loc_7DCF1E
dd offset loc_7DD902
dd offset loc_7DDC70
dd offset loc_7DD98F
dd offset loc_7DDC98
align 10h


; Attributes: bp-based frame

sub_7DDD80 proc	near

var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_81=	byte ptr -81h
var_80=	dword ptr -80h
var_7A=	byte ptr -7Ah
var_79=	byte ptr -79h
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_41=	byte ptr -41h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0A0h
push	esi
push	edi
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_20], ecx
mov	[ebp+var_30], 0
mov	[ebp+var_28], 0
push	0		; size_t
mov	edx, [ebp+arg_C]
mov	eax, [edx]
push	eax		; int
mov	ecx, [ebp+var_20]
add	ecx, 14h
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jnz	short loc_7DDE41
mov	edx, [ebp+arg_C]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_20]
add	ecx, 50h
push	ecx
call	sub_7E4EC0
add	esp, 8
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 0
jnz	short loc_7DDDED
mov	eax, 1
jmp	loc_7DEBDB

loc_7DDDED:		; size_t
push	18h
mov	edx, [ebp+var_34]
push	edx		; int
mov	eax, [ebp+var_20]
add	eax, 14h
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jnz	short loc_7DDE15
mov	eax, 1
jmp	loc_7DEBDB

loc_7DDE15:
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+0ECh]
test	edx, edx
jz	short loc_7DDE41
mov	eax, [ebp+var_24]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3690
add	esp, 8
test	eax, eax
jnz	short loc_7DDE41
mov	eax, 1
jmp	loc_7DEBDB

loc_7DDE41:
mov	edx, [ebp+var_24]
mov	eax, [edx+0Ch]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+188h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+17Ch]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
call	edx
add	esp, 10h
mov	[ebp+var_10], eax
mov	eax, [ebp+var_10]
add	eax, [ebp+var_2C]
mov	ecx, [ebp+arg_0]
cmp	eax, [ecx+17Ch]
jle	loc_7DDF12
mov	edx, [ebp+arg_0]
mov	eax, [edx+17Ch]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+var_10]
lea	eax, [edx+ecx+10h]
mov	ecx, [ebp+arg_0]
mov	[ecx+17Ch], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+17Ch]
shl	eax, 4
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+188h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
call	ecx
add	esp, 8
mov	[ebp+var_38], eax
cmp	[ebp+var_38], 0
jnz	short loc_7DDEDD
mov	eax, 1
jmp	loc_7DEBDB

loc_7DDEDD:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_38]
mov	[edx+188h], eax
mov	ecx, [ebp+var_10]
cmp	ecx, [ebp+var_3C]
jle	short loc_7DDF12
mov	edx, [ebp+arg_0]
mov	eax, [edx+188h]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+28h]
call	edx
add	esp, 10h

loc_7DDF12:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
mov	[ebp+var_8], ecx
mov	[ebp+var_14], 0
jmp	short loc_7DDF30

loc_7DDF27:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_7DDF30:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_10]
jge	loc_7DE1E4
mov	esi, [ebp+var_14]
shl	esi, 4
mov	ecx, [ebp+arg_0]
mov	edi, [ecx+188h]
mov	edx, [ebp+var_14]
shl	edx, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
mov	edx, [ecx+edx]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+20h]
call	edx
add	esp, 8
add	eax, [edi+esi]
push	eax
mov	eax, [ebp+var_14]
shl	eax, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+188h]
mov	eax, [edx+eax]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3810
add	esp, 10h
mov	[ebp+var_40], eax
cmp	[ebp+var_40], 0
jnz	short loc_7DDFA7
mov	eax, 1
jmp	loc_7DEBDB

loc_7DDFA7:
mov	eax, [ebp+var_40]
mov	ecx, [eax]
movsx	edx, byte ptr [ecx-1]
test	edx, edx
jz	short loc_7DDFE7
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7DDFDD
mov	edx, [ebp+var_14]
shl	edx, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+ecx]
mov	[eax+120h], ecx

loc_7DDFDD:
mov	eax, 8
jmp	loc_7DEBDB

loc_7DDFE7:
mov	edx, [ebp+var_40]
mov	eax, [edx]
mov	byte ptr [eax-1], 1
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_40]
mov	eax, [eax]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_30]
add	ecx, 1
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_14]
shl	edx, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
movsx	edx, byte ptr [ecx+edx+0Ch]
test	edx, edx
jnz	loc_7DE0F5
mov	[ebp+var_41], 1
mov	eax, [ebp+var_40]
movzx	ecx, byte ptr [eax+8]
test	ecx, ecx
jz	short loc_7DE077
mov	[ebp+var_4C], 0
jmp	short loc_7DE044

loc_7DE03B:
mov	edx, [ebp+var_4C]
add	edx, 1
mov	[ebp+var_4C], edx

loc_7DE044:
mov	eax, [ebp+var_4C]
cmp	eax, [ebp+var_2C]
jge	short loc_7DE077
mov	ecx, [ebp+var_4C]
imul	ecx, 0Ch
mov	edx, [ebp+var_24]
mov	eax, [edx+14h]
mov	edx, [ebp+var_40]
cmp	edx, [ecx+eax]
jnz	short loc_7DE075
mov	eax, [ebp+var_4C]
imul	eax, 0Ch
mov	ecx, [ebp+var_24]
mov	edx, [ecx+14h]
mov	al, [edx+eax+4]
mov	[ebp+var_41], al
jmp	short loc_7DE077

loc_7DE075:
jmp	short loc_7DE03B

loc_7DE077:
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
mov	edx, [ebp+var_14]
shl	edx, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
mov	edx, [ecx+edx+8]
push	edx
mov	eax, [ebp+var_14]
shl	eax, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+188h]
mov	eax, [edx+eax+4]
push	eax
movzx	ecx, [ebp+var_41]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E2650
add	esp, 18h
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jz	short loc_7DE0CF
mov	eax, [ebp+var_48]
jmp	loc_7DEBDB

loc_7DE0CF:
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_0]
mov	eax, [eax+1B0h]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	[ecx+1B0h], eax
jmp	short loc_7DE164

loc_7DE0F5:
mov	ecx, [ebp+var_14]
shl	ecx, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+188h]
mov	ecx, [eax+ecx+8]
push	ecx
mov	edx, [ebp+var_14]
shl	edx, 4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+188h]
mov	edx, [ecx+edx+4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	edx, [ebp+var_30]
mov	ecx, [ebp+var_8]
mov	[ecx+edx*4], eax
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_8]
cmp	dword ptr [eax+edx*4], 0
jnz	short loc_7DE152
mov	eax, 1
jmp	loc_7DEBDB

loc_7DE152:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	[ecx+1B0h], eax

loc_7DE164:
mov	ecx, [ebp+var_40]
cmp	dword ptr [ecx+4], 0
jz	short loc_7DE1D6
mov	edx, [ebp+var_40]
movzx	eax, byte ptr [edx+9]
test	eax, eax
jz	short loc_7DE1B9
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_8]
mov	ecx, [eax+edx*4]
push	ecx
mov	edx, [ebp+var_40]
push	edx
mov	eax, [ebp+var_40]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DEBF0
add	esp, 14h
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jz	short loc_7DE1AE
mov	eax, [ebp+var_50]
jmp	loc_7DEBDB

loc_7DE1AE:
mov	eax, [ebp+var_30]
sub	eax, 1
mov	[ebp+var_30], eax
jmp	short loc_7DE1D4

loc_7DE1B9:
mov	ecx, [ebp+var_30]
add	ecx, 1
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_28]
add	edx, 1
mov	[ebp+var_28], edx
mov	eax, [ebp+var_40]
mov	ecx, [eax]
mov	byte ptr [ecx-1], 2

loc_7DE1D4:
jmp	short loc_7DE1DF

loc_7DE1D6:
mov	edx, [ebp+var_30]
add	edx, 1
mov	[ebp+var_30], edx

loc_7DE1DF:
jmp	loc_7DDF27

loc_7DE1E4:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_30]
mov	[eax+180h], ecx
mov	edx, [ebp+var_24]
cmp	dword ptr [edx+8], 0
jz	short loc_7DE248
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
mov	edx, [ecx]
movsx	eax, byte ptr [edx-1]
test	eax, eax
jz	short loc_7DE248
mov	[ebp+var_14], 0
jmp	short loc_7DE21B

loc_7DE212:
mov	ecx, [ebp+var_14]
add	ecx, 2
mov	[ebp+var_14], ecx

loc_7DE21B:
mov	edx, [ebp+var_14]
cmp	edx, [ebp+var_30]
jge	short loc_7DE246
mov	eax, [ebp+var_24]
mov	ecx, [eax+8]
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
mov	edx, [eax+edx*4]
cmp	edx, [ecx]
jnz	short loc_7DE244
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_14]
mov	[eax+184h], ecx
jmp	short loc_7DE246

loc_7DE244:
jmp	short loc_7DE212

loc_7DE246:
jmp	short loc_7DE255

loc_7DE248:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+184h], 0FFFFFFFFh

loc_7DE255:
mov	[ebp+var_14], 0
jmp	short loc_7DE267

loc_7DE25E:
mov	eax, [ebp+var_14]
add	eax, 1
mov	[ebp+var_14], eax

loc_7DE267:
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+var_2C]
jge	loc_7DE37F
mov	edx, [ebp+var_14]
imul	edx, 0Ch
mov	eax, [ebp+var_24]
add	edx, [eax+14h]
mov	[ebp+var_54], edx
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	eax, [edx]
movsx	ecx, byte ptr [eax-1]
test	ecx, ecx
jnz	loc_7DE37A
mov	edx, [ebp+var_54]
cmp	dword ptr [edx+8], 0
jz	loc_7DE37A
mov	eax, [ebp+var_54]
mov	ecx, [eax]
cmp	dword ptr [ecx+4], 0
jz	loc_7DE33E
mov	edx, [ebp+var_54]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+9]
test	ecx, ecx
jz	short loc_7DE2F7
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+var_54]
mov	ecx, [eax+8]
push	ecx
mov	edx, [ebp+var_54]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DEBF0
add	esp, 14h
mov	[ebp+var_58], eax
cmp	[ebp+var_58], 0
jz	short loc_7DE2F5
mov	eax, [ebp+var_58]
jmp	loc_7DEBDB

loc_7DE2F5:
jmp	short loc_7DE33C

loc_7DE2F7:
mov	edx, [ebp+var_54]
mov	eax, [edx]
mov	ecx, [eax]
mov	byte ptr [ecx-1], 2
mov	edx, [ebp+var_28]
add	edx, 1
mov	[ebp+var_28], edx
mov	eax, [ebp+var_54]
mov	ecx, [eax]
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_8]
mov	ecx, [ecx]
mov	[eax+edx*4], ecx
mov	edx, [ebp+var_30]
add	edx, 1
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_54]
mov	edx, [edx+8]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_30]
add	eax, 1
mov	[ebp+var_30], eax

loc_7DE33C:
jmp	short loc_7DE37A

loc_7DE33E:
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	eax, [edx]
mov	byte ptr [eax-1], 1
mov	ecx, [ebp+var_54]
mov	edx, [ecx]
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_8]
mov	edx, [edx]
mov	[ecx+eax*4], edx
mov	eax, [ebp+var_30]
add	eax, 1
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_54]
mov	eax, [eax+8]
mov	[edx+ecx*4], eax
mov	ecx, [ebp+var_30]
add	ecx, 1
mov	[ebp+var_30], ecx

loc_7DE37A:
jmp	loc_7DE25E

loc_7DE37F:
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_8]
mov	dword ptr [eax+edx*4], 0
mov	[ebp+var_14], 0
cmp	[ebp+var_28], 0
jz	loc_7DE952
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+190h]
mov	[ebp+var_60], edx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+194h]
mov	edx, 1
shl	edx, cl
mov	[ebp+var_5C], edx
mov	eax, [ebp+var_28]
shl	eax, 1
mov	ecx, [ebp+arg_0]
movzx	ecx, byte ptr [ecx+194h]
sar	eax, cl
test	eax, eax
jz	loc_7DE46F

loc_7DE3D6:
mov	edx, [ebp+arg_0]
movzx	ecx, byte ptr [edx+194h]
mov	eax, [ebp+var_28]
sar	eax, cl
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+194h]
add	dl, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+194h], dl
test	eax, eax
jz	short loc_7DE400
jmp	short loc_7DE3D6

loc_7DE400:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+194h]
cmp	eax, 3
jge	short loc_7DE419
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx+194h], 3

loc_7DE419:
mov	edx, [ebp+arg_0]
movzx	ecx, byte ptr [edx+194h]
mov	eax, 1
shl	eax, cl
mov	[ebp+var_5C], eax
mov	ecx, [ebp+var_5C]
imul	ecx, 0Ch
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+18Ch]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
call	edx
add	esp, 8
mov	[ebp+var_68], eax
cmp	[ebp+var_68], 0
jnz	short loc_7DE45C
mov	eax, 1
jmp	loc_7DEBDB

loc_7DE45C:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_68]
mov	[eax+18Ch], ecx
mov	[ebp+var_60], 0

loc_7DE46F:
cmp	[ebp+var_60], 0
jnz	short loc_7DE4A8
mov	[ebp+var_60], 0FFFFFFFFh
mov	edx, [ebp+var_5C]
mov	[ebp+var_64], edx

loc_7DE482:
cmp	[ebp+var_64], 0
jz	short loc_7DE4A8
mov	eax, [ebp+var_64]
sub	eax, 1
mov	[ebp+var_64], eax
mov	ecx, [ebp+var_64]
imul	ecx, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [edx+18Ch]
mov	edx, [ebp+var_60]
mov	[ecx+eax], edx
jmp	short loc_7DE482

loc_7DE4A8:
mov	eax, [ebp+var_60]
sub	eax, 1
mov	[ebp+var_60], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_60]
mov	[ecx+190h], edx
jmp	short loc_7DE4C8

loc_7DE4BF:
mov	eax, [ebp+var_14]
add	eax, 2
mov	[ebp+var_14], eax

loc_7DE4C8:
mov	ecx, [ebp+var_14]
cmp	ecx, [ebp+var_30]
jge	loc_7DE952
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
mov	ecx, [eax+edx*4]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+var_6C]
movsx	eax, byte ptr [edx-1]
cmp	eax, 2
jnz	loc_7DE946
mov	[ebp+var_74], 0
mov	ecx, [ebp+var_6C]
mov	byte ptr [ecx-1], 0
push	0		; size_t
mov	edx, [ebp+var_6C]
push	edx		; int
mov	eax, [ebp+var_20]
add	eax, 28h
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_70], eax
mov	ecx, [ebp+var_70]
mov	edx, [ecx+4]
mov	eax, [edx+4]
mov	[ebp+var_78], eax
cmp	[ebp+var_78], 0
jnz	short loc_7DE532
mov	eax, 1Bh
jmp	loc_7DEBDB

loc_7DE532:
mov	[ebp+var_64], 0
jmp	short loc_7DE544

loc_7DE53B:
mov	ecx, [ebp+var_64]
add	ecx, 1
mov	[ebp+var_64], ecx

loc_7DE544:
mov	edx, [ebp+var_78]
mov	eax, [ebp+var_64]
cmp	eax, [edx+14h]
jge	loc_7DE5F2
mov	ecx, [ebp+var_78]
mov	edx, [ecx+10h]
mov	eax, [ebp+var_64]
mov	cl, [edx+eax]
mov	[ebp+var_79], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+1ACh]
cmp	ecx, [eax+1A8h]
jnz	short loc_7DE59B
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E5040
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_7DE59B
mov	[ebp+var_94], 0
jmp	short loc_7DE5C8

loc_7DE59B:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	al, [ebp+var_79]
mov	[edx], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_94], 1

loc_7DE5C8:
cmp	[ebp+var_94], 0
jnz	short loc_7DE5DB
mov	eax, 1
jmp	loc_7DEBDB

loc_7DE5DB:
mov	ecx, [ebp+var_74]
imul	ecx, 0F4243h
movzx	edx, [ebp+var_79]
xor	ecx, edx
mov	[ebp+var_74], ecx
jmp	loc_7DE53B

loc_7DE5F2:
mov	eax, [ebp+var_6C]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+var_6C]
add	edx, 1
mov	[ebp+var_6C], edx
cmp	ecx, 3Ah
jz	short loc_7DE608
jmp	short loc_7DE5F2

loc_7DE608:
mov	eax, [ebp+var_6C]
mov	cl, [eax]
mov	[ebp+var_7A], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+1ACh]
cmp	ecx, [eax+1A8h]
jnz	short loc_7DE649
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E5040
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_7DE649
mov	[ebp+var_98], 0
jmp	short loc_7DE678

loc_7DE649:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	eax, [ebp+var_6C]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1ACh], eax
mov	[ebp+var_98], 1

loc_7DE678:
cmp	[ebp+var_98], 0
jnz	short loc_7DE68B
mov	eax, 1
jmp	loc_7DEBDB

loc_7DE68B:
mov	edx, [ebp+var_74]
imul	edx, 0F4243h
movzx	eax, [ebp+var_7A]
xor	edx, eax
mov	[ebp+var_74], edx
mov	ecx, [ebp+var_6C]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+var_6C]
add	eax, 1
mov	[ebp+var_6C], eax
test	edx, edx
jnz	loc_7DE608
mov	[ebp+var_81], 0
mov	ecx, [ebp+var_5C]
sub	ecx, 1
mov	[ebp+var_80], ecx
mov	edx, [ebp+var_74]
and	edx, [ebp+var_80]
mov	[ebp+var_64], edx

loc_7DE6CD:
mov	eax, [ebp+var_64]
imul	eax, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18Ch]
mov	eax, [eax+edx]
cmp	eax, [ebp+var_60]
jnz	loc_7DE801
mov	ecx, [ebp+var_64]
imul	ecx, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [edx+18Ch]
mov	edx, [ebp+var_74]
cmp	edx, [eax+ecx+4]
jnz	loc_7DE788
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1B0h]
mov	[ebp+var_8C], ecx
mov	edx, [ebp+var_64]
imul	edx, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18Ch]
mov	edx, [ecx+edx+8]
mov	[ebp+var_88], edx
jmp	short loc_7DE74C

loc_7DE72E:
mov	eax, [ebp+var_8C]
add	eax, 1
mov	[ebp+var_8C], eax
mov	ecx, [ebp+var_88]
add	ecx, 1
mov	[ebp+var_88], ecx

loc_7DE74C:
mov	edx, [ebp+var_8C]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+var_88]
movsx	edx, byte ptr [ecx]
cmp	eax, edx
jnz	short loc_7DE771
mov	eax, [ebp+var_8C]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_7DE771
jmp	short loc_7DE72E

loc_7DE771:
mov	edx, [ebp+var_8C]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7DE788
mov	eax, 8
jmp	loc_7DEBDB

loc_7DE788:
movzx	ecx, [ebp+var_81]
test	ecx, ecx
jnz	short loc_7DE7BB
mov	edx, [ebp+var_80]
not	edx
and	edx, [ebp+var_74]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+194h]
sub	ecx, 1
shr	edx, cl
mov	ecx, [ebp+var_80]
shr	ecx, 2
and	edx, ecx
or	edx, 1
mov	[ebp+var_81], dl

loc_7DE7BB:
movzx	edx, [ebp+var_81]
cmp	[ebp+var_64], edx
jge	short loc_7DE7E4
movzx	eax, [ebp+var_81]
mov	ecx, [ebp+var_5C]
sub	ecx, eax
add	ecx, [ebp+var_64]
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	[ebp+var_9C], edx
jmp	short loc_7DE7FC

loc_7DE7E4:
movzx	eax, [ebp+var_81]
mov	ecx, [ebp+var_64]
sub	ecx, eax
mov	[ebp+var_64], ecx
mov	edx, [ebp+var_64]
mov	[ebp+var_9C], edx

loc_7DE7FC:
jmp	loc_7DE6CD

loc_7DE801:
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+0EDh]
test	ecx, ecx
jz	loc_7DE8C3
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+1D8h]
mov	[eax-1], dl
mov	eax, [ebp+var_78]
mov	ecx, [eax]
mov	edx, [ecx]
mov	[ebp+var_6C], edx

loc_7DE832:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7DE86A
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7DE86A
mov	[ebp+var_A0], 0
jmp	short loc_7DE899

loc_7DE86A:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	ecx, [ebp+var_6C]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+1ACh], ecx
mov	[ebp+var_A0], 1

loc_7DE899:
cmp	[ebp+var_A0], 0
jnz	short loc_7DE8AC
mov	eax, 1
jmp	loc_7DEBDB

loc_7DE8AC:
mov	eax, [ebp+var_6C]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+var_6C]
add	edx, 1
mov	[ebp+var_6C], edx
test	ecx, ecx
jnz	loc_7DE832

loc_7DE8C3:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1B0h]
mov	[ebp+var_6C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	[edx+1B0h], ecx
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_6C]
mov	[eax+edx*4], ecx
mov	edx, [ebp+var_64]
imul	edx, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+18Ch]
mov	eax, [ebp+var_60]
mov	[edx+ecx], eax
mov	ecx, [ebp+var_64]
imul	ecx, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [edx+18Ch]
mov	edx, [ebp+var_74]
mov	[eax+ecx+4], edx
mov	eax, [ebp+var_64]
imul	eax, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+18Ch]
mov	ecx, [ebp+var_6C]
mov	[edx+eax+8], ecx
mov	edx, [ebp+var_28]
sub	edx, 1
mov	[ebp+var_28], edx
jnz	short loc_7DE944
mov	eax, [ebp+var_14]
add	eax, 2
mov	[ebp+var_14], eax
jmp	short loc_7DE952

loc_7DE944:
jmp	short loc_7DE94D

loc_7DE946:
mov	ecx, [ebp+var_6C]
mov	byte ptr [ecx-1], 0

loc_7DE94D:
jmp	loc_7DE4BF

loc_7DE952:
jmp	short loc_7DE95D

loc_7DE954:
mov	edx, [ebp+var_14]
add	edx, 2
mov	[ebp+var_14], edx

loc_7DE95D:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_30]
jge	short loc_7DE974
mov	ecx, [ebp+var_14]
mov	edx, [ebp+var_8]
mov	eax, [edx+ecx*4]
mov	byte ptr [eax-1], 0
jmp	short loc_7DE954

loc_7DE974:
mov	ecx, [ebp+arg_10]
mov	edx, [ecx]
mov	[ebp+var_C], edx
jmp	short loc_7DE987

loc_7DE97E:
mov	eax, [ebp+var_C]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx

loc_7DE987:
cmp	[ebp+var_C], 0
jz	short loc_7DE99B
mov	edx, [ebp+var_C]
mov	eax, [edx+0Ch]
mov	ecx, [eax]
mov	byte ptr [ecx-1], 0
jmp	short loc_7DE97E

loc_7DE99B:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+0ECh]
test	eax, eax
jnz	short loc_7DE9B0
xor	eax, eax
jmp	loc_7DEBDB

loc_7DE9B0:
mov	ecx, [ebp+var_24]
cmp	dword ptr [ecx+4], 0
jz	short loc_7DE9F5
mov	edx, [ebp+var_24]
mov	eax, [edx+4]
mov	ecx, [eax+4]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jnz	short loc_7DE9D5
mov	eax, 1Bh
jmp	loc_7DEBDB

loc_7DE9D5:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ebp+var_4], eax

loc_7DE9DD:
mov	ecx, [ebp+var_4]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
cmp	edx, 3Ah
jz	short loc_7DE9F3
jmp	short loc_7DE9DD

loc_7DE9F3:
jmp	short loc_7DEA1E

loc_7DE9F5:
mov	ecx, [ebp+var_20]
cmp	dword ptr [ecx+9Ch], 0
jz	short loc_7DEA17
mov	edx, [ebp+var_20]
mov	eax, [edx+9Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	[ebp+var_4], edx
jmp	short loc_7DEA1E

loc_7DEA17:
xor	eax, eax
jmp	loc_7DEBDB

loc_7DEA1E:
mov	[ebp+var_1C], 0
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+0EDh]
test	ecx, ecx
jz	short loc_7DEA5A
mov	edx, [ebp+var_C]
mov	eax, [edx]
cmp	dword ptr [eax], 0
jz	short loc_7DEA5A

loc_7DEA3D:
mov	ecx, [ebp+var_C]
mov	edx, [ecx]
mov	eax, [edx]
mov	ecx, [ebp+var_1C]
movsx	edx, byte ptr [eax+ecx]
mov	eax, [ebp+var_1C]
add	eax, 1
mov	[ebp+var_1C], eax
test	edx, edx
jz	short loc_7DEA5A
jmp	short loc_7DEA3D

loc_7DEA5A:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+14h]
mov	[eax+10h], edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ebp+arg_C]
mov	eax, [ecx]
mov	[edx+8], eax
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_1C]
mov	[ecx+14h], edx
mov	[ebp+var_14], 0

loc_7DEA8C:
mov	eax, [ebp+var_4]
add	eax, [ebp+var_14]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx
test	ecx, ecx
jz	short loc_7DEAA4
jmp	short loc_7DEA8C

loc_7DEAA4:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_14]
add	ecx, [eax+14h]
add	ecx, [ebp+var_1C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_10]
cmp	eax, [edx+18h]
jle	loc_7DEB6F
mov	ecx, [ebp+var_10]
add	ecx, 18h
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
call	eax
add	esp, 4
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0
jnz	short loc_7DEAE7
mov	eax, 1
jmp	loc_7DEBDB

loc_7DEAE7:
mov	ecx, [ebp+var_10]
add	ecx, 18h
mov	edx, [ebp+var_C]
mov	[edx+18h], ecx
mov	eax, [ebp+var_C]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [ebp+var_C]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [edx+16Ch]
mov	[ebp+var_90], eax
jmp	short loc_7DEB2C

loc_7DEB1E:
mov	ecx, [ebp+var_90]
mov	edx, [ecx]
mov	[ebp+var_90], edx

loc_7DEB2C:
cmp	[ebp+var_90], 0
jz	short loc_7DEB54
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_C]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+10h]
jnz	short loc_7DEB52
mov	eax, [ebp+var_90]
mov	ecx, [ebp+var_18]
mov	[eax+0Ch], ecx

loc_7DEB52:
jmp	short loc_7DEB1E

loc_7DEB54:
mov	edx, [ebp+var_C]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
call	edx
add	esp, 4
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_18]
mov	[eax+10h], ecx

loc_7DEB6F:
mov	edx, [ebp+var_C]
mov	eax, [edx+10h]
mov	ecx, [ebp+var_C]
add	eax, [ecx+14h]
mov	[ebp+var_18], eax
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
cmp	[ebp+var_1C], 0
jz	short loc_7DEBCE
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_18]
lea	ecx, [eax+edx-1]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
mov	eax, [ebp+arg_0]
mov	cl, [eax+1D8h]
mov	[edx], cl
mov	edx, [ebp+var_1C]
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_18]
add	eax, 1
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7DEBCE:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+var_C]
mov	eax, [edx+10h]
mov	[ecx], eax
xor	eax, eax

loc_7DEBDB:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7DDD80 endp

align 10h


; Attributes: bp-based frame

sub_7DEBF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_B], 0
mov	[ebp+var_A], 1
mov	[ebp+var_9], 1
mov	eax, [ebp+arg_C]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7DEC1E
mov	edx, [ebp+arg_4]
cmp	dword ptr [edx], 0
jz	short loc_7DEC1E
mov	eax, 1Ch
jmp	loc_7DEF6A

loc_7DEC1E:
mov	eax, [ebp+arg_4]
cmp	dword ptr [eax], 0
jz	short loc_7DEC93
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movsx	eax, byte ptr [edx]
cmp	eax, 78h
jnz	short loc_7DEC93
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movsx	eax, byte ptr [edx+1]
cmp	eax, 6Dh
jnz	short loc_7DEC93
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movsx	eax, byte ptr [edx+2]
cmp	eax, 6Ch
jnz	short loc_7DEC93
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movsx	eax, byte ptr [edx+3]
cmp	eax, 6Eh
jnz	short loc_7DEC82
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movsx	eax, byte ptr [edx+4]
cmp	eax, 73h
jnz	short loc_7DEC82
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movsx	eax, byte ptr [edx+5]
test	eax, eax
jnz	short loc_7DEC82
mov	eax, 27h
jmp	loc_7DEF6A

loc_7DEC82:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movsx	eax, byte ptr [edx+3]
test	eax, eax
jnz	short loc_7DEC93
mov	[ebp+var_B], 1

loc_7DEC93:
mov	[ebp+var_4], 0
jmp	short loc_7DECA5

loc_7DEC9C:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7DECA5:
mov	edx, [ebp+arg_C]
add	edx, [ebp+var_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jz	short loc_7DED18
movzx	ecx, [ebp+var_A]
test	ecx, ecx
jz	short loc_7DECE0
mov	edx, [ebp+var_4]
cmp	edx, ds:dword_145741C
jg	short loc_7DECDC
mov	eax, [ebp+arg_C]
add	eax, [ebp+var_4]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+var_4]
movsx	eax, ds:byte_1457468[edx]
cmp	ecx, eax
jz	short loc_7DECE0

loc_7DECDC:
mov	[ebp+var_A], 0

loc_7DECE0:
movzx	ecx, [ebp+var_B]
test	ecx, ecx
jnz	short loc_7DED16
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_7DED16
mov	eax, [ebp+var_4]
cmp	eax, ds:dword_14574B0
jg	short loc_7DED12
mov	ecx, [ebp+arg_C]
add	ecx, [ebp+var_4]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+var_4]
movsx	ecx, ds:byte_1457490[eax]
cmp	edx, ecx
jz	short loc_7DED16

loc_7DED12:
mov	[ebp+var_9], 0

loc_7DED16:
jmp	short loc_7DEC9C

loc_7DED18:
movzx	edx, [ebp+var_A]
test	edx, edx
jz	short loc_7DED34
mov	eax, [ebp+var_4]
cmp	eax, ds:dword_145741C
jnz	short loc_7DED34
mov	[ebp+var_14], 1
jmp	short loc_7DED3B

loc_7DED34:
mov	[ebp+var_14], 0

loc_7DED3B:
mov	cl, byte ptr [ebp+var_14]
mov	[ebp+var_A], cl
movzx	edx, [ebp+var_9]
test	edx, edx
jz	short loc_7DED5D
mov	eax, [ebp+var_4]
cmp	eax, ds:dword_14574B0
jnz	short loc_7DED5D
mov	[ebp+var_18], 1
jmp	short loc_7DED64

loc_7DED5D:
mov	[ebp+var_18], 0

loc_7DED64:
mov	cl, byte ptr [ebp+var_18]
mov	[ebp+var_9], cl
movzx	edx, [ebp+var_B]
movzx	eax, [ebp+var_A]
cmp	edx, eax
jz	short loc_7DED89
movzx	eax, [ebp+var_B]
neg	eax
sbb	eax, eax
and	eax, 0FFFFFFFEh
add	eax, 28h
jmp	loc_7DEF6A

loc_7DED89:
movzx	ecx, [ebp+var_9]
test	ecx, ecx
jz	short loc_7DED9B
mov	eax, 28h
jmp	loc_7DEF6A

loc_7DED9B:
mov	edx, [ebp+arg_0]
movsx	eax, byte ptr [edx+1D8h]
test	eax, eax
jz	short loc_7DEDB2
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7DEDB2:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+178h], 0
jz	short loc_7DEE27
mov	eax, [ebp+arg_0]
mov	ecx, [eax+178h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
cmp	eax, [edx+18h]
jle	short loc_7DEE16
mov	ecx, [ebp+var_4]
add	ecx, 18h
push	ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
call	edx
add	esp, 8
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7DEE01
mov	eax, 1
jmp	loc_7DEF6A

loc_7DEE01:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_10]
mov	[eax+10h], ecx
mov	edx, [ebp+var_4]
add	edx, 18h
mov	eax, [ebp+var_8]
mov	[eax+18h], edx

loc_7DEE16:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	eax, [edx+4]
mov	[ecx+178h], eax
jmp	short loc_7DEE8D

loc_7DEE27:
push	1Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
call	edx
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jnz	short loc_7DEE47
mov	eax, 1
jmp	loc_7DEF6A

loc_7DEE47:
mov	eax, [ebp+var_4]
add	eax, 18h
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
call	edx
add	esp, 4
mov	ecx, [ebp+var_8]
mov	[ecx+10h], eax
mov	edx, [ebp+var_8]
cmp	dword ptr [edx+10h], 0
jnz	short loc_7DEE81
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
call	edx
add	esp, 4
mov	eax, 1
jmp	loc_7DEF6A

loc_7DEE81:
mov	eax, [ebp+var_4]
add	eax, 18h
mov	ecx, [ebp+var_8]
mov	[ecx+18h], eax

loc_7DEE8D:
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
mov	[edx+14h], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+10h]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	edx, [ebp+arg_0]
movsx	eax, byte ptr [edx+1D8h]
test	eax, eax
jz	short loc_7DEED1
mov	ecx, [ebp+var_8]
mov	edx, [ecx+10h]
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	cl, [ecx+1D8h]
mov	[eax+edx-1], cl

loc_7DEED1:
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx+0Ch], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
mov	[eax+8], edx
mov	eax, [ebp+arg_C]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7DEF17
mov	edx, [ebp+arg_0]
mov	eax, [edx+164h]
add	eax, 98h
cmp	[ebp+arg_4], eax
jnz	short loc_7DEF17
mov	ecx, [ebp+arg_4]
mov	dword ptr [ecx+4], 0
jmp	short loc_7DEF20

loc_7DEF17:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_8]
mov	[edx+4], eax

loc_7DEF20:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_10]
mov	eax, [edx]
mov	[ecx+4], eax
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+var_8]
mov	[ecx], edx
cmp	[ebp+arg_8], 0
jz	short loc_7DEF68
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+64h], 0
jz	short loc_7DEF68
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4]
neg	edx
sbb	edx, edx
and	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+64h]
call	edx
add	esp, 0Ch

loc_7DEF68:
xor	eax, eax

loc_7DEF6A:
mov	esp, ebp
pop	ebp
retn
sub_7DEBF0 endp

align 10h


; Attributes: bp-based frame

sub_7DEF70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E4h]
test	ecx, ecx
setz	dl
movzx	eax, dl
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DF090
add	esp, 18h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7DEFB7
mov	eax, [ebp+var_4]
jmp	short loc_7DF01C

loc_7DEFB7:
cmp	[ebp+arg_4], 0
jz	short loc_7DF019
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+1DCh], 0
jz	short loc_7DEFF2
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+118h], offset sub_7DCBA0
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DCBA0
add	esp, 10h
jmp	short loc_7DF01C
jmp	short loc_7DF019

loc_7DEFF2:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+118h], offset sub_7DF020
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DF020
add	esp, 10h
jmp	short loc_7DF01C

loc_7DF019:
mov	eax, [ebp+var_4]

loc_7DF01C:
mov	esp, ebp
pop	ebp
retn
sub_7DEF70 endp



; Attributes: bp-based frame

sub_7DF020 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E4h]
test	ecx, ecx
setz	dl
movzx	eax, dl
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DCD20
add	esp, 1Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7DF07E
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DCC10
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7DF07E
mov	eax, 1
jmp	short loc_7DF081

loc_7DF07E:
mov	eax, [ebp+var_4]

loc_7DF081:
mov	esp, ebp
pop	ebp
retn
sub_7DF020 endp

align 10h


; Attributes: bp-based frame

sub_7DF090 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_15=	byte ptr -15h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 28h
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+90h]
jnz	short loc_7DF0CE
mov	ecx, [ebp+arg_0]
add	ecx, 120h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 124h
mov	[ebp+var_8], ecx
jmp	short loc_7DF0E9

loc_7DF0CE:
mov	edx, [ebp+arg_0]
mov	eax, [edx+12Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+12Ch]
add	edx, 4
mov	[ebp+var_8], edx

loc_7DF0E9:
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	dword ptr [edx], 0

loc_7DF0FA:
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+8]
call	edx
add	esp, 10h
mov	[ebp+var_10], eax
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_10]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
add	eax, 4
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 2Ch ; switch 45 cases
ja	loc_7DF30E	; default
			; jumptable 007DF143 cases 1,5-9,12-43
mov	ecx, [ebp+var_24]
movzx	edx, ds:byte_7DF380[ecx]
jmp	ds:off_7DF364[edx*4] ; switch jump

loc_7DF14A:		; jumptable 007DF143 case 44
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4Ch], 0
jz	short loc_7DF167
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4Ch]
call	ecx
add	esp, 4
jmp	short loc_7DF188

loc_7DF167:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7DF188
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7DF188:
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+1E0h], 2
jnz	short loc_7DF1B0
mov	eax, 23h
jmp	loc_7DF35D
jmp	short loc_7DF1B7 ; jumptable 007DF143 case 11

loc_7DF1B0:
xor	eax, eax
jmp	loc_7DF35D

loc_7DF1B7:		; jumptable 007DF143 case 11
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+3Ch], 0
jz	short loc_7DF1DE
mov	[ebp+var_15], 0Ah
push	1
lea	ecx, [ebp+var_15]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+3Ch]
call	edx
add	esp, 0Ch
jmp	short loc_7DF1FF

loc_7DF1DE:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7DF1FF
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7DF1FF:
jmp	loc_7DF31D

loc_7DF204:		; jumptable 007DF143 case 10
mov	edx, [ebp+arg_0]
mov	eax, [edx+3Ch]
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jz	loc_7DF2A3
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+48h]
test	edx, edx
jnz	short loc_7DF289

loc_7DF222:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2Ch]
mov	[ebp+var_20], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+30h]
push	eax
lea	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+var_14]
push	edx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+3Ch]
call	eax
add	esp, 14h
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_20]
sub	ecx, [eax+2Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+2Ch]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
call	[ebp+var_1C]
add	esp, 0Ch
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_14]
jnz	short loc_7DF27D
jmp	short loc_7DF287

loc_7DF27D:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_4]
mov	[ecx], edx
jmp	short loc_7DF222

loc_7DF287:
jmp	short loc_7DF2A1

loc_7DF289:
mov	eax, [ebp+var_14]
sub	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
call	[ebp+var_1C]
add	esp, 0Ch

loc_7DF2A1:
jmp	short loc_7DF2C4

loc_7DF2A3:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+50h], 0
jz	short loc_7DF2C4
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3440
add	esp, 10h

loc_7DF2C4:
jmp	short loc_7DF31D

loc_7DF2C6:		; jumptable 007DF143 case 4
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	eax, 4
jmp	loc_7DF35D

loc_7DF2D8:		; jumptable 007DF143 case 2
movzx	edx, [ebp+arg_14]
test	edx, edx
jz	short loc_7DF2EC
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7DF35D

loc_7DF2EC:
mov	eax, 6
jmp	short loc_7DF35D

loc_7DF2F3:		; jumptable 007DF143 cases 0,3
movzx	edx, [ebp+arg_14]
test	edx, edx
jz	short loc_7DF307
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7DF35D

loc_7DF307:
mov	eax, 14h
jmp	short loc_7DF35D

loc_7DF30E:		; default
mov	edx, [ebp+var_C] ; jumptable 007DF143 cases 1,5-9,12-43
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	eax, 17h
jmp	short loc_7DF35D

loc_7DF31D:
mov	ecx, [ebp+var_14]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1E0h]
mov	[ebp+var_28], edx
cmp	[ebp+var_28], 2
jz	short loc_7DF351
cmp	[ebp+var_28], 3
jz	short loc_7DF345
jmp	short loc_7DF358

loc_7DF345:
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7DF35D

loc_7DF351:
mov	eax, 23h
jmp	short loc_7DF35D

loc_7DF358:
jmp	loc_7DF0FA

loc_7DF35D:
mov	esp, ebp
pop	ebp
retn
sub_7DF090 endp

align 4
off_7DF364 dd offset loc_7DF2F3	; jump table for switch	statement
dd offset loc_7DF2D8
dd offset loc_7DF2C6
dd offset loc_7DF204
dd offset loc_7DF1B7
dd offset loc_7DF14A
dd offset loc_7DF30E
byte_7DF380 db	    0,	   6,	  1,	 0 ; indirect table for	switch statement
db	2,     6,     6,     6
db	6,     6,     3,     4
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	5
align 10h


; Attributes: bp-based frame

sub_7DF3B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E8h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+0ECh]
test	eax, eax
jz	short loc_7DF3D9
mov	[ebp+var_8], offset sub_7F8350
jmp	short loc_7DF3E0

loc_7DF3D9:
mov	[ebp+var_8], offset sub_7F7740

loc_7DF3E0:
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 90h
push	edx
mov	eax, [ebp+arg_0]
add	eax, 94h
push	eax
call	[ebp+var_8]
add	esp, 0Ch
test	eax, eax
jz	short loc_7DF405
xor	eax, eax
jmp	short loc_7DF41B

loc_7DF405:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0E8h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DF720
add	esp, 8

loc_7DF41B:
mov	esp, ebp
pop	ebp
retn
sub_7DF3B0 endp

align 10h


; Attributes: bp-based frame

sub_7DF420 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	[ebp+var_1C], 0
mov	[ebp+var_10], 0
mov	[ebp+var_18], 0
mov	[ebp+var_14], 0FFFFFFFFh
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+0ECh]
test	ecx, ecx
jz	short loc_7DF467
mov	[ebp+var_24], offset sub_7F8410
jmp	short loc_7DF46E

loc_7DF467:
mov	[ebp+var_24], offset sub_7F7C10

loc_7DF46E:
lea	edx, [ebp+var_14]
push	edx
lea	eax, [ebp+var_1C]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 120h
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_4]
push	eax
call	[ebp+var_24]
add	esp, 28h
test	eax, eax
jnz	short loc_7DF4C8
cmp	[ebp+arg_4], 0
jz	short loc_7DF4BE
mov	eax, 1Fh
jmp	loc_7DF71A
jmp	short loc_7DF4C8

loc_7DF4BE:
mov	eax, 1Eh
jmp	loc_7DF71A

loc_7DF4C8:
cmp	[ebp+arg_4], 0
jnz	short loc_7DF4FD
cmp	[ebp+var_14], 1
jnz	short loc_7DF4FD
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+164h]
mov	byte ptr [edx+82h], 1
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+1ECh], 1
jnz	short loc_7DF4FD
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+1ECh], 0

loc_7DF4FD:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+8Ch], 0
jz	loc_7DF5E6
cmp	[ebp+var_8], 0
jz	short loc_7DF57A
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
mov	edx, [ecx+20h]
call	edx
add	esp, 8
add	eax, [ebp+var_8]
push	eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 1B8h
push	eax
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7DF568
mov	eax, 1
jmp	loc_7DF71A

loc_7DF568:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1C4h]
mov	[ecx+1C8h], eax

loc_7DF57A:
cmp	[ebp+var_10], 0
jz	short loc_7DF5C3
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	eax, [ebp+var_C]
sub	eax, [edx+44h]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1B8h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0
jnz	short loc_7DF5C3
mov	eax, 1
jmp	loc_7DF71A

loc_7DF5C3:
mov	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8Ch]
call	edx
add	esp, 10h
jmp	short loc_7DF60D

loc_7DF5E6:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7DF60D
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3440
add	esp, 10h

loc_7DF60D:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0E8h], 0
jnz	loc_7DF6FB
cmp	[ebp+var_1C], 0
jz	short loc_7DF65E
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	eax, [ebp+var_1C]
mov	ecx, [eax+44h]
cmp	ecx, [edx+44h]
jz	short loc_7DF64D
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx+120h], eax
mov	eax, 13h
jmp	loc_7DF71A

loc_7DF64D:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_1C]
mov	[ecx+90h], edx
jmp	loc_7DF6FB

loc_7DF65E:
cmp	[ebp+var_8], 0
jz	loc_7DF6FB
cmp	[ebp+var_4], 0
jnz	short loc_7DF6C0
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
mov	edx, [ecx+20h]
call	edx
add	esp, 8
add	eax, [ebp+var_8]
push	eax
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 1B8h
push	eax
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7DF6C0
mov	eax, 1
jmp	short loc_7DF71A

loc_7DF6C0:
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DF720
add	esp, 8
mov	[ebp+var_20], eax
mov	eax, [ebp+arg_0]
add	eax, 1B8h
push	eax
call	sub_7E4D50
add	esp, 4
cmp	[ebp+var_20], 12h
jnz	short loc_7DF6F6
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx+120h], edx

loc_7DF6F6:
mov	eax, [ebp+var_20]
jmp	short loc_7DF71A

loc_7DF6FB:
cmp	[ebp+var_4], 0
jnz	short loc_7DF707
cmp	[ebp+var_18], 0
jz	short loc_7DF718

loc_7DF707:
mov	eax, [ebp+arg_0]
add	eax, 1B8h
push	eax
call	sub_7E4D50
add	esp, 4

loc_7DF718:
xor	eax, eax

loc_7DF71A:
mov	esp, ebp
pop	ebp
retn
sub_7DF420 endp

align 10h


; Attributes: bp-based frame

sub_7DF720 proc	near

var_420= dword ptr -420h
var_41C= dword ptr -41Ch
var_418= dword ptr -418h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 420h
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+7Ch], 0
jz	loc_7DF86E
mov	[ebp+var_4], 0
jmp	short loc_7DF748

loc_7DF73F:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7DF748:
cmp	[ebp+var_4], 100h
jge	short loc_7DF761
mov	edx, [ebp+var_4]
mov	[ebp+edx*4+var_418], 0FFFFFFFFh
jmp	short loc_7DF73F

loc_7DF761:
mov	[ebp+var_14], 0
mov	[ebp+var_18], 0
mov	[ebp+var_10], 0
lea	eax, [ebp+var_418]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0F8h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+7Ch]
call	edx
add	esp, 0Ch
test	eax, eax
jz	loc_7DF85E
call	sub_7F7030
push	eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	edx, [ebp+arg_0]
mov	[edx+0F0h], eax
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0F0h], 0
jnz	short loc_7DF7DE
cmp	[ebp+var_10], 0
jz	short loc_7DF7D4
mov	ecx, [ebp+var_18]
push	ecx
call	[ebp+var_10]
add	esp, 4

loc_7DF7D4:
mov	eax, 1
jmp	loc_7DF873

loc_7DF7DE:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+0ECh]
test	eax, eax
jz	short loc_7DF7F8
mov	[ebp+var_420], offset sub_7F8500
jmp	short loc_7DF802

loc_7DF7F8:
mov	[ebp+var_420], offset sub_7F7040

loc_7DF802:
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+var_14]
push	edx
lea	eax, [ebp+var_418]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0F0h]
push	edx
call	[ebp+var_420]
add	esp, 10h
mov	[ebp+var_41C], eax
cmp	[ebp+var_41C], 0
jz	short loc_7DF85E
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_18]
mov	[eax+0F4h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_10]
mov	[edx+0FCh], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_41C]
mov	[ecx+90h], edx
xor	eax, eax
jmp	short loc_7DF873

loc_7DF85E:
cmp	[ebp+var_10], 0
jz	short loc_7DF86E
mov	eax, [ebp+var_18]
push	eax
call	[ebp+var_10]
add	esp, 4

loc_7DF86E:
mov	eax, 12h

loc_7DF873:
mov	esp, ebp
pop	ebp
retn
sub_7DF720 endp

align 10h


; Attributes: bp-based frame

sub_7DF880 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DF3B0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7DF89E
mov	eax, [ebp+var_4]
jmp	short loc_7DF8C3

loc_7DF89E:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+118h], offset sub_7DF8D0
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DF8D0
add	esp, 10h

loc_7DF8C3:
mov	esp, ebp
pop	ebp
retn
sub_7DF880 endp

align 10h


; Attributes: bp-based frame

sub_7DF8D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
lea	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
mov	edx, [ecx]
call	edx
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E4h]
test	ecx, ecx
setz	dl
movzx	eax, dl
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DF950
add	esp, 20h
mov	esp, ebp
pop	ebp
retn
sub_7DF8D0 endp

align 10h


; Attributes: bp-based frame

sub_7DF950 proc	near

var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_6D=	byte ptr -6Dh
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_2D=	byte ptr -2Dh
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	byte ptr  24h

push	ebp
mov	ebp, esp
sub	esp, 0C8h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+90h]
jnz	short loc_7DF98D
mov	ecx, [ebp+arg_0]
add	ecx, 120h
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
add	edx, 124h
mov	[ebp+var_8], edx
jmp	short loc_7DF9A8

loc_7DF98D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+12Ch]
mov	[ebp+var_C], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+12Ch]
add	eax, 4
mov	[ebp+var_8], eax

loc_7DF9A8:
mov	[ebp+var_11], 1
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_14]
mov	[eax], ecx
cmp	[ebp+arg_10], 0
jg	loc_7DFAE0
movzx	edx, [ebp+arg_1C]
test	edx, edx
jz	short loc_7DF9E3
cmp	[ebp+arg_10], 0
jz	short loc_7DF9E3
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E1CB0

loc_7DF9E3:
mov	edx, [ebp+arg_10]
mov	[ebp+var_94], edx
mov	eax, [ebp+var_94]
add	eax, 4
mov	[ebp+var_94], eax
cmp	[ebp+var_94], 4	; switch 5 cases
ja	loc_7DFAD2	; default
			; jumptable 007DFA0E case 1
mov	ecx, [ebp+var_94]
jmp	ds:off_7E1CB4[ecx*4] ; switch jump

loc_7DFA15:		; jumptable 007DFA0E case 4
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_14]
mov	[edx], eax
mov	eax, 4
jmp	loc_7E1CB0

loc_7DFA27:		; jumptable 007DFA0E case 3
mov	eax, 5
jmp	loc_7E1CB0

loc_7DFA31:		; jumptable 007DFA0E case 2
mov	eax, 6
jmp	loc_7E1CB0

loc_7DFA3B:		; jumptable 007DFA0E case 0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+90h]
jz	short loc_7DFA69
mov	eax, [ebp+arg_0]
mov	ecx, [eax+12Ch]
movzx	edx, byte ptr [ecx+14h]
test	edx, edx
jnz	short loc_7DFA69
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E1CB0

loc_7DFA69:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+1E8h]
test	eax, eax
jnz	short loc_7DFA85
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+90h]
jz	short loc_7DFAC8

loc_7DFA85:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
push	0FFFFFFFCh
mov	eax, [ebp+arg_0]
add	eax, 100h
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+100h]
call	edx
add	esp, 14h
cmp	eax, 0FFFFFFFFh
jnz	short loc_7DFAB9
mov	eax, 1Dh
jmp	loc_7E1CB0

loc_7DFAB9:
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E1CB0

loc_7DFAC8:
mov	eax, 3
jmp	loc_7E1CB0

loc_7DFAD2:		; default
mov	edx, [ebp+arg_10] ; jumptable 007DFA0E case 1
neg	edx
mov	[ebp+arg_10], edx
mov	eax, [ebp+arg_C]
mov	[ebp+arg_14], eax

loc_7DFAE0:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 100h
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+100h]
call	ecx
add	esp, 14h
mov	[ebp+var_18], eax
mov	edx, [ebp+var_18]
mov	[ebp+var_98], edx
mov	eax, [ebp+var_98]
add	eax, 1
mov	[ebp+var_98], eax
cmp	[ebp+var_98], 3Dh ; switch 62 cases
ja	loc_7E1C29	; default
mov	ecx, [ebp+var_98]
jmp	ds:off_7E1CC8[ecx*4] ; switch jump

loc_7DFB3D:		; jumptable 007DFB36 case 2
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
push	0
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DF420
add	esp, 10h
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 0
jz	short loc_7DFB64
mov	eax, [ebp+var_1C]
jmp	loc_7E1CB0

loc_7DFB64:
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	[ebp+arg_4], eax
mov	[ebp+var_11], 0
jmp	loc_7E1C29	; default

loc_7DFB79:		; jumptable 007DFB36 case 5
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+54h], 0
jz	short loc_7DFBE2
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	[ecx+140h], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+140h], 0
jnz	short loc_7DFBBF
mov	eax, 1
jmp	loc_7E1CB0

loc_7DFBBF:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	[eax+1B0h], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+148h], 0
mov	[ebp+var_11], 0

loc_7DFBE2:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+144h], 0
jmp	loc_7E1C29	; default

loc_7DFBF4:		; jumptable 007DFB36 case 8
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+54h], 0
jz	short loc_7DFC52
push	1
mov	eax, [ebp+arg_0]
mov	ecx, [eax+148h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+144h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+140h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+54h]
call	eax
add	esp, 14h
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+140h], 0
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4D50
add	esp, 4
mov	[ebp+var_11], 0

loc_7DFC52:		; default
jmp	loc_7E1C29

loc_7DFC57:		; jumptable 007DFB36 case 58
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
push	1
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DF420
add	esp, 10h
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jz	short loc_7DFC7E
mov	eax, [ebp+var_20]
jmp	loc_7E1CB0

loc_7DFC7E:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
mov	[ebp+arg_4], ecx
mov	[ebp+var_11], 0
jmp	loc_7E1C29	; default

loc_7DFC93:		; jumptable 007DFB36 case 7
mov	edx, [ebp+arg_0]
mov	byte ptr [edx+1E9h], 0
push	24h		; size_t
push	offset unk_14574B4 ; int
mov	eax, [ebp+var_10]
add	eax, 84h
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ecx+13Ch], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+13Ch], 0
jnz	short loc_7DFCD4
mov	eax, 1
jmp	loc_7E1CB0

loc_7DFCD4:
mov	eax, [ebp+var_10]
mov	byte ptr [eax+81h], 1
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+54h], 0
jz	loc_7DFD87	; jumptable 007DFB36 case 15
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+38h]
call	ecx
add	esp, 10h
test	eax, eax
jnz	short loc_7DFD14
mov	eax, 20h
jmp	loc_7E1CB0

loc_7DFD14:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_14]
sub	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_8]
add	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	edx, [ebp+arg_0]
mov	[edx+148h], eax
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+148h], 0
jnz	short loc_7DFD5D
mov	eax, 1
jmp	loc_7E1CB0

loc_7DFD5D:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+148h]
push	edx
call	sub_7E4490
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	[eax+1B0h], edx
mov	[ebp+var_11], 0
jmp	short loc_7DFDB0

loc_7DFD87:		; jumptable 007DFB36 case 15
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+38h]
call	edx
add	esp, 10h
test	eax, eax
jnz	short loc_7DFDB0
mov	eax, 20h
jmp	loc_7E1CB0

loc_7DFDB0:
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+80h]
test	ecx, ecx
jz	short loc_7DFE3B
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+13Ch], 0
jz	short loc_7DFE3B
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_14]
sub	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
add	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_10]
add	edx, 50h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jnz	short loc_7DFE04
mov	eax, 1
jmp	loc_7E1CB0

loc_7DFE04:
mov	eax, [ebp+var_24]
push	eax
call	sub_7E4490
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	eax, [ebp+var_24]
mov	[edx+18h], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [edx+5Ch]
mov	[ecx+60h], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+88h], 0
jz	short loc_7DFE3B
mov	[ebp+var_11], 0

loc_7DFE3B:		; default
jmp	loc_7E1C29

loc_7DFE40:		; jumptable 007DFB36 case 9
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+140h], 0
jz	short loc_7DFE94
push	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+148h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+144h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+140h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+54h]
call	eax
add	esp, 14h
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4D50
add	esp, 4
mov	[ebp+var_11], 0

loc_7DFE94:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+144h], 0
jnz	short loc_7DFEB2
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E9h]
test	ecx, ecx
jz	loc_7DFFD8

loc_7DFEB2:
mov	edx, [ebp+var_10]
mov	al, [edx+81h]
mov	[ebp+var_25], al
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+81h], 1
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+1ECh], 0
jz	loc_7DFFCE
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+70h], 0
jz	loc_7DFFCE
push	24h		; size_t
push	offset unk_14574B4 ; int
mov	ecx, [ebp+var_10]
add	ecx, 84h
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_2C], eax
cmp	[ebp+var_2C], 0
jnz	short loc_7DFF11
mov	eax, 1
jmp	loc_7E1CB0

loc_7DFF11:
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+1E9h]
test	eax, eax
jz	short loc_7DFF2E
mov	ecx, [ebp+var_2C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
mov	[ecx+14h], eax

loc_7DFF2E:
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+83h], 0
mov	edx, [ebp+var_2C]
mov	eax, [edx+18h]
push	eax
mov	ecx, [ebp+var_2C]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+var_2C]
mov	ecx, [eax+14h]
push	ecx
push	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+74h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+70h]
call	edx
add	esp, 14h
test	eax, eax
jnz	short loc_7DFF6F
mov	eax, 15h
jmp	loc_7E1CB0

loc_7DFF6F:
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+83h]
test	ecx, ecx
jz	short loc_7DFFB6
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+82h]
test	eax, eax
jnz	short loc_7DFFB4
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+6Ch], 0
jz	short loc_7DFFB4
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+6Ch]
call	edx
add	esp, 4
test	eax, eax
jnz	short loc_7DFFB4
mov	eax, 16h
jmp	loc_7E1CB0

loc_7DFFB4:
jmp	short loc_7DFFCE

loc_7DFFB6:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+144h], 0
jnz	short loc_7DFFCE
mov	ecx, [ebp+var_10]
mov	dl, [ebp+var_25]
mov	[ecx+81h], dl

loc_7DFFCE:
mov	eax, [ebp+arg_0]
mov	byte ptr [eax+1E9h], 0

loc_7DFFD8:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+58h], 0
jz	short loc_7DFFF7
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+58h]
call	edx
add	esp, 4
mov	[ebp+var_11], 0

loc_7DFFF7:		; default
jmp	loc_7E1C29

loc_7DFFFC:		; jumptable 007DFB36 case 3
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E9h]
test	ecx, ecx
jz	loc_7E0110
mov	edx, [ebp+var_10]
mov	al, [edx+81h]
mov	[ebp+var_2D], al
mov	ecx, [ebp+var_10]
mov	byte ptr [ecx+81h], 1
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+1ECh], 0
jz	loc_7E0110
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+70h], 0
jz	loc_7E0110
push	24h		; size_t
push	offset unk_14574B4 ; int
mov	ecx, [ebp+var_10]
add	ecx, 84h
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 0
jnz	short loc_7E006D
mov	eax, 1
jmp	loc_7E1CB0

loc_7E006D:
mov	edx, [ebp+var_34]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
mov	[edx+14h], ecx
mov	edx, [ebp+var_10]
mov	byte ptr [edx+83h], 0
mov	eax, [ebp+var_34]
mov	ecx, [eax+18h]
push	ecx
mov	edx, [ebp+var_34]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+var_34]
mov	edx, [ecx+14h]
push	edx
push	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+74h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+70h]
call	eax
add	esp, 14h
test	eax, eax
jnz	short loc_7E00BD
mov	eax, 15h
jmp	loc_7E1CB0

loc_7E00BD:
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+83h]
test	edx, edx
jz	short loc_7E0104
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+82h]
test	ecx, ecx
jnz	short loc_7E0102
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+6Ch], 0
jz	short loc_7E0102
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+6Ch]
call	eax
add	esp, 4
test	eax, eax
jnz	short loc_7E0102
mov	eax, 16h
jmp	loc_7E1CB0

loc_7E0102:
jmp	short loc_7E0110

loc_7E0104:
mov	ecx, [ebp+var_10]
mov	dl, [ebp+var_2D]
mov	[ecx+81h], dl

loc_7E0110:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+118h], offset sub_7DF020
mov	ecx, [ebp+arg_18]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DF020
add	esp, 10h
jmp	loc_7E1CB0

loc_7E013A:		; jumptable 007DFB36 case 35
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E56E0
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	[ecx+158h], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+158h], 0
jnz	short loc_7E0171
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0171:
jmp	loc_7E025D

loc_7E0176:		; jumptable 007DFB36 case 23
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3810
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	[ecx+15Ch], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+15Ch], 0
jnz	short loc_7E01AD
mov	eax, 1
jmp	loc_7E1CB0

loc_7E01AD:
mov	eax, [ebp+arg_0]
mov	byte ptr [eax+160h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+14Ch], 0
mov	edx, [ebp+arg_0]
mov	byte ptr [edx+161h], 0
jmp	loc_7E025D

loc_7E01D3:		; jumptable 007DFB36 case 24
mov	eax, [ebp+arg_0]
mov	byte ptr [eax+160h], 1
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+14Ch], offset aCdata_0 ;	"CDATA"
jmp	short loc_7E025D

loc_7E01EC:		; jumptable 007DFB36 case 25
mov	edx, [ebp+arg_0]
mov	byte ptr [edx+161h], 1
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+14Ch], offset aId ; "ID"
jmp	short loc_7E025D

loc_7E0205:		; jumptable 007DFB36 case 26
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+14Ch], offset aIdref ; "IDREF"
jmp	short loc_7E025D

loc_7E0214:		; jumptable 007DFB36 case 27
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+14Ch], offset aIdrefs ; "IDREFS"
jmp	short loc_7E025D

loc_7E0223:		; jumptable 007DFB36 case 28
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+14Ch], offset aEntity ; "ENTITY"
jmp	short loc_7E025D

loc_7E0232:		; jumptable 007DFB36 case 29
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+14Ch], offset aEntities ; "ENTITIES"
jmp	short loc_7E025D

loc_7E0241:		; jumptable 007DFB36 case 30
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+14Ch], offset aNmtoken ;	"NMTOKEN"
jmp	short loc_7E025D

loc_7E0250:		; jumptable 007DFB36 case 31
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+14Ch], offset aNmtokens ; "NMTOKENS"

loc_7E025D:
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+80h]
test	edx, edx
jz	short loc_7E027B
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+84h], 0
jz	short loc_7E027B
mov	[ebp+var_11], 0

loc_7E027B:		; default
jmp	loc_7E1C29

loc_7E0280:		; jumptable 007DFB36 cases 32,33
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+80h]
test	edx, edx
jz	loc_7E0342
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+84h], 0
jz	loc_7E0342
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+14Ch], 0
jz	short loc_7E02B7
mov	[ebp+var_38], offset asc_1457508 ; "|"
jmp	short loc_7E02DC

loc_7E02B7:
cmp	[ebp+var_18], 20h
jnz	short loc_7E02C9
mov	[ebp+var_9C], offset aNotation ; "NOTATION("
jmp	short loc_7E02D3

loc_7E02C9:		; "("
mov	[ebp+var_9C], offset asc_145750C

loc_7E02D3:
mov	edx, [ebp+var_9C]
mov	[ebp+var_38], edx

loc_7E02DC:
mov	eax, [ebp+var_38]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4F50
add	esp, 8
test	eax, eax
jnz	short loc_7E0300
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0300:
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4E40
add	esp, 10h
test	eax, eax
jnz	short loc_7E032C
mov	eax, 1
jmp	loc_7E1CB0

loc_7E032C:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
mov	[eax+14Ch], edx
mov	[ebp+var_11], 0

loc_7E0342:		; default
jmp	loc_7E1C29

loc_7E0347:		; jumptable 007DFB36 cases 36,37
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+80h]
test	ecx, ecx
jz	loc_7E0563
mov	edx, [ebp+arg_0]
push	edx
push	0
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+161h]
push	ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+160h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+15Ch]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+158h]
push	ecx
call	sub_7E3530
add	esp, 18h
test	eax, eax
jnz	short loc_7E039F
mov	eax, 1
jmp	loc_7E1CB0

loc_7E039F:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+84h], 0
jz	loc_7E0563
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+14Ch], 0
jz	loc_7E0563
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14Ch]
movsx	eax, byte ptr [edx]
cmp	eax, 28h
jz	short loc_7E03FB
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14Ch]
movsx	eax, byte ptr [edx]
cmp	eax, 4Eh
jnz	loc_7E0503
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14Ch]
movsx	eax, byte ptr [edx+1]
cmp	eax, 4Fh
jnz	loc_7E0503

loc_7E03FB:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1ACh]
cmp	eax, [edx+1A8h]
jnz	short loc_7E0434
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E0434
mov	[ebp+var_A0], 0
jmp	short loc_7E045F

loc_7E0434:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	byte ptr [ecx],	29h
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1ACh], eax
mov	[ebp+var_A0], 1

loc_7E045F:
cmp	[ebp+var_A0], 0
jz	short loc_7E04D5
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+1ACh]
cmp	ecx, [eax+1A8h]
jnz	short loc_7E04A1
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E5040
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_7E04A1
mov	[ebp+var_A4], 0
jmp	short loc_7E04CC

loc_7E04A1:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	byte ptr [edx],	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+1ACh], ecx
mov	[ebp+var_A4], 1

loc_7E04CC:
cmp	[ebp+var_A4], 0
jnz	short loc_7E04DF

loc_7E04D5:
mov	eax, 1
jmp	loc_7E1CB0

loc_7E04DF:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
mov	[eax+14Ch], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	[eax+1B0h], edx

loc_7E0503:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	edx, edx
cmp	[ebp+var_18], 24h
setz	dl
push	edx
push	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+84h]
call	edx
add	esp, 18h
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E4D50
add	esp, 4
mov	[ebp+var_11], 0

loc_7E0563:		; default
jmp	loc_7E1C29

loc_7E0568:		; jumptable 007DFB36 cases 38,39
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+80h]
test	edx, edx
jz	loc_7E07DA
mov	eax, [ebp+var_10]
add	eax, 50h
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_14]
sub	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
add	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+160h]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E2650
add	esp, 18h
mov	[ebp+var_40], eax
cmp	[ebp+var_40], 0
jz	short loc_7E05C1
mov	eax, [ebp+var_40]
jmp	loc_7E1CB0

loc_7E05C1:
mov	eax, [ebp+var_10]
mov	ecx, [eax+60h]
mov	[ebp+var_3C], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	ecx, [eax+5Ch]
mov	[edx+60h], ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_3C]
push	eax
push	0
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+160h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+15Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
push	eax
call	sub_7E3530
add	esp, 18h
test	eax, eax
jnz	short loc_7E0615
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0615:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+84h], 0
jz	loc_7E07DA
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+14Ch], 0
jz	loc_7E07DA
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
movsx	edx, byte ptr [ecx]
cmp	edx, 28h
jz	short loc_7E0671
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
movsx	edx, byte ptr [ecx]
cmp	edx, 4Eh
jnz	loc_7E0778
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 4Fh
jnz	loc_7E0778

loc_7E0671:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E06A9
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E06A9
mov	[ebp+var_A8], 0
jmp	short loc_7E06D4

loc_7E06A9:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	byte ptr [eax],	29h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_A8], 1

loc_7E06D4:
cmp	[ebp+var_A8], 0
jz	short loc_7E074A
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1ACh]
cmp	eax, [edx+1A8h]
jnz	short loc_7E0716
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E0716
mov	[ebp+var_AC], 0
jmp	short loc_7E0741

loc_7E0716:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1ACh], eax
mov	[ebp+var_AC], 1

loc_7E0741:
cmp	[ebp+var_AC], 0
jnz	short loc_7E0754

loc_7E074A:
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0754:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1B0h]
mov	[edx+14Ch], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	[edx+1B0h], ecx

loc_7E0778:
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx], eax
xor	ecx, ecx
cmp	[ebp+var_18], 26h
setz	cl
push	ecx
mov	edx, [ebp+var_3C]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+84h]
call	edx
add	esp, 18h
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E4D50
add	esp, 4
mov	[ebp+var_11], 0

loc_7E07DA:		; default
jmp	loc_7E1C29

loc_7E07DF:		; jumptable 007DFB36 case 13
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+80h]
test	edx, edx
jz	loc_7E08EB
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_14]
sub	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
add	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E2CF0
add	esp, 10h
mov	[ebp+var_44], eax
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+13Ch], 0
jz	loc_7E08D1
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	eax, [ebp+var_10]
mov	ecx, [eax+78h]
mov	[edx+4], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	ecx, [edx+74h]
sub	ecx, [eax+78h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	[eax+8], ecx
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [edx+74h]
mov	[ecx+78h], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+88h], 0
jz	short loc_7E08CF
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx], eax
push	0
push	0
push	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx+8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
movzx	edx, byte ptr [ecx+21h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+88h]
call	eax
add	esp, 24h
mov	[ebp+var_11], 0

loc_7E08CF:
jmp	short loc_7E08DD

loc_7E08D1:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [edx+78h]
mov	[ecx+74h], eax

loc_7E08DD:
cmp	[ebp+var_44], 0
jz	short loc_7E08EB
mov	eax, [ebp+var_44]
jmp	loc_7E1CB0

loc_7E08EB:		; default
jmp	loc_7E1C29

loc_7E08F0:		; jumptable 007DFB36 case 6
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx+1E9h], 0
mov	edx, [ebp+var_10]
mov	byte ptr [edx+81h], 1
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+54h], 0
jz	short loc_7E096D
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_14]
sub	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
add	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E4FD0
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	[ecx+144h], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+144h], 0
jnz	short loc_7E0955
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0955:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	[eax+1B0h], edx
mov	[ebp+var_11], 0
jmp	short loc_7E097A

loc_7E096D:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+144h], offset unk_14574B4

loc_7E097A:
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+82h]
test	edx, edx
jnz	short loc_7E09BD
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+1ECh], 0
jnz	short loc_7E09BD
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+6Ch], 0
jz	short loc_7E09BD
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+6Ch]
call	edx
add	esp, 4
test	eax, eax
jnz	short loc_7E09BD
mov	eax, 16h
jmp	loc_7E1CB0

loc_7E09BD:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+13Ch], 0
jnz	short loc_7E0A11 ; jumptable 007DFB36 case 14
push	24h		; size_t
push	offset unk_14574B4 ; int
mov	ecx, [ebp+var_10]
add	ecx, 84h
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	[edx+13Ch], eax
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+13Ch], 0
jnz	short loc_7E0A01
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0A01:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	dword ptr [edx+18h], 0

loc_7E0A11:		; jumptable 007DFB36 case 14
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+80h]
test	ecx, ecx
jz	loc_7E0AAC
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+13Ch], 0
jz	short loc_7E0AAC
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_14]
sub	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
add	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_10]
add	edx, 50h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	[edx+10h], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
cmp	dword ptr [ecx+10h], 0
jnz	short loc_7E0A7B
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0A7B:
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
mov	[eax+14h], edx
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+5Ch]
mov	[eax+60h], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+88h], 0
jz	short loc_7E0AAC
mov	[ebp+var_11], 0

loc_7E0AAC:		; default
jmp	loc_7E1C29

loc_7E0AB1:		; jumptable 007DFB36 case 16
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+80h]
test	edx, edx
jz	loc_7E0B43
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+13Ch], 0
jz	short loc_7E0B43
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+88h], 0
jz	short loc_7E0B43
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx], eax
push	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	eax, [edx+18h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	eax, [edx+14h]
push	eax
push	0
push	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
movzx	eax, byte ptr [edx+21h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+88h]
call	ecx
add	esp, 24h
mov	[ebp+var_11], 0

loc_7E0B43:		; default
jmp	loc_7E1C29

loc_7E0B48:		; jumptable 007DFB36 case 17
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+80h]
test	eax, eax
jz	loc_7E0C92
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+13Ch], 0
jz	loc_7E0C92
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_10]
add	edx, 50h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	[edx+1Ch], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
cmp	dword ptr [ecx+1Ch], 0
jnz	short loc_7E0BAA
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0BAA:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	ecx, [eax+5Ch]
mov	[edx+60h], ecx
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+5Ch], 0
jz	short loc_7E0C1F
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	ecx, [eax+1Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	ecx, [eax+18h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+5Ch]
call	edx
add	esp, 18h
mov	[ebp+var_11], 0
jmp	short loc_7E0C92

loc_7E0C1F:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+88h], 0
jz	short loc_7E0C92
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx+1Ch]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx+18h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx+14h]
push	edx
push	0
push	0
push	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+88h]
call	eax
add	esp, 24h
mov	[ebp+var_11], 0

loc_7E0C92:		; default
jmp	loc_7E1C29

loc_7E0C97:		; jumptable 007DFB36 case 10
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+30h]
call	edx
add	esp, 0Ch
test	eax, eax
jz	short loc_7E0CC4
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+13Ch], 0
jmp	loc_7E1C29	; default

loc_7E0CC4:
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+80h]
test	edx, edx
jz	loc_7E0DDB
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_10]
add	eax, 50h
push	eax
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_48], eax
cmp	[ebp+var_48], 0
jnz	short loc_7E0D04
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0D04:		; size_t
push	24h
mov	ecx, [ebp+var_48]
push	ecx		; int
mov	edx, [ebp+var_10]
push	edx		; int
call	sub_7E4790
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	[ecx+13Ch], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+13Ch], 0
jnz	short loc_7E0D35
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0D35:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	edx, [ecx]
cmp	edx, [ebp+var_48]
jz	short loc_7E0D60
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+60h]
mov	[eax+5Ch], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+13Ch], 0
jmp	short loc_7E0DD9

loc_7E0D60:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [edx+5Ch]
mov	[ecx+60h], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	dword ptr [edx+18h], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+13Ch]
mov	byte ptr [ecx+21h], 0
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+1DCh], 0
jnz	short loc_7E0DAD
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+12Ch], 0
jnz	short loc_7E0DAD
mov	[ebp+var_B0], 1
jmp	short loc_7E0DB7

loc_7E0DAD:
mov	[ebp+var_B0], 0

loc_7E0DB7:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	al, byte ptr [ebp+var_B0]
mov	[edx+22h], al
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+88h], 0
jz	short loc_7E0DD9
mov	[ebp+var_11], 0

loc_7E0DD9:
jmp	short loc_7E0DF4

loc_7E0DDB:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	ecx, [eax+60h]
mov	[edx+5Ch], ecx
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+13Ch], 0

loc_7E0DF4:		; default
jmp	loc_7E1C29

loc_7E0DF9:		; jumptable 007DFB36 case 11
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+80h]
test	ecx, ecx
jz	loc_7E0F16
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_10]
add	edx, 50h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_4C], eax
cmp	[ebp+var_4C], 0
jnz	short loc_7E0E39
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0E39:		; size_t
push	24h
mov	eax, [ebp+var_4C]
push	eax		; int
mov	ecx, [ebp+var_10]
add	ecx, 84h
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	edx, [ebp+arg_0]
mov	[edx+13Ch], eax
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+13Ch], 0
jnz	short loc_7E0E70
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0E70:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	eax, [edx]
cmp	eax, [ebp+var_4C]
jz	short loc_7E0E9B
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [edx+60h]
mov	[ecx+5Ch], eax
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+13Ch], 0
jmp	short loc_7E0F14

loc_7E0E9B:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	ecx, [eax+5Ch]
mov	[edx+60h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	dword ptr [eax+18h], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+13Ch]
mov	byte ptr [edx+21h], 1
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+1DCh], 0
jnz	short loc_7E0EE8
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+12Ch], 0
jnz	short loc_7E0EE8
mov	[ebp+var_B4], 1
jmp	short loc_7E0EF2

loc_7E0EE8:
mov	[ebp+var_B4], 0

loc_7E0EF2:
mov	edx, [ebp+arg_0]
mov	eax, [edx+13Ch]
mov	cl, byte ptr [ebp+var_B4]
mov	[eax+22h], cl
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+88h], 0
jz	short loc_7E0F14
mov	[ebp+var_11], 0

loc_7E0F14:
jmp	short loc_7E0F2F

loc_7E0F16:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+60h]
mov	[eax+5Ch], edx
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+13Ch], 0

loc_7E0F2F:		; default
jmp	loc_7E1C29

loc_7E0F34:		; jumptable 007DFB36 case 19
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+154h], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+150h], 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+60h], 0
jz	short loc_7E0FAA
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	edx, [ebp+arg_0]
mov	[edx+150h], eax
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+150h], 0
jnz	short loc_7E0F94
mov	eax, 1
jmp	loc_7E1CB0

loc_7E0F94:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	[ecx+1B0h], eax
mov	[ebp+var_11], 0

loc_7E0FAA:		; default
jmp	loc_7E1C29

loc_7E0FAF:		; jumptable 007DFB36 case 22
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+38h]
call	eax
add	esp, 10h
test	eax, eax
jnz	short loc_7E0FD8
mov	eax, 20h
jmp	loc_7E1CB0

loc_7E0FD8:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+150h], 0
jz	short loc_7E104F
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_14]
sub	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_8]
add	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_50], eax
cmp	[ebp+var_50], 0
jnz	short loc_7E1021
mov	eax, 1
jmp	loc_7E1CB0

loc_7E1021:
mov	edx, [ebp+var_50]
push	edx
call	sub_7E4490
add	esp, 4
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_50]
mov	[eax+154h], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	[edx+1B0h], ecx
mov	[ebp+var_11], 0

loc_7E104F:		; default
jmp	loc_7E1C29

loc_7E1054:		; jumptable 007DFB36 case 20
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+150h], 0
jz	loc_7E10E9
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+60h], 0
jz	short loc_7E10E9
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_14]
sub	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
add	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_54], eax
cmp	[ebp+var_54], 0
jnz	short loc_7E10A9
mov	eax, 1
jmp	loc_7E1CB0

loc_7E10A9:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+154h]
push	ecx
mov	edx, [ebp+var_54]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+150h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
call	ecx
add	esp, 14h
mov	[ebp+var_11], 0

loc_7E10E9:
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4D50
add	esp, 4
jmp	loc_7E1C29	; default

loc_7E1100:		; jumptable 007DFB36 case 21
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+154h], 0
jz	short loc_7E1153
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+60h], 0
jz	short loc_7E1153
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+154h]
push	edx
push	0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+150h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+60h]
call	ecx
add	esp, 14h
mov	[ebp+var_11], 0

loc_7E1153:
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4D50
add	esp, 4
jmp	loc_7E1C29	; default

loc_7E116A:		; jumptable 007DFB36 case 0
mov	eax, [ebp+arg_10]
mov	[ebp+var_B8], eax
cmp	[ebp+var_B8], 0Ch
jz	short loc_7E1191
cmp	[ebp+var_B8], 1Ch
jz	short loc_7E1187
jmp	short loc_7E119B

loc_7E1187:
mov	eax, 0Ah
jmp	loc_7E1CB0

loc_7E1191:
mov	eax, 11h
jmp	loc_7E1CB0

loc_7E119B:
mov	eax, 2
jmp	loc_7E1CB0

loc_7E11A5:		; jumptable 007DFB36 case 59
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+50h], 0
jz	short loc_7E11C6
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3440
add	esp, 10h

loc_7E11C6:
mov	[ebp+var_11], 0
movzx	eax, [ebp+arg_1C]
push	eax
mov	ecx, [ebp+arg_18]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E1E40
add	esp, 18h
mov	[ebp+var_58], eax
cmp	[ebp+var_58], 0
jz	short loc_7E11FE
mov	eax, [ebp+var_58]
jmp	loc_7E1CB0
jmp	short loc_7E1219

loc_7E11FE:
cmp	[ebp+arg_14], 0
jnz	short loc_7E1219
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+118h], offset sub_7E1DC0
mov	eax, [ebp+var_58]
jmp	loc_7E1CB0

loc_7E1219:		; default
jmp	loc_7E1C29

loc_7E121E:		; jumptable 007DFB36 case 45
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+104h]
cmp	eax, [edx+1D4h]
jb	loc_7E1320
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+1D4h], 0
jz	loc_7E12E7
mov	edx, [ebp+arg_0]
mov	eax, [edx+1D4h]
shl	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1D4h], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+1D4h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1D0h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
call	ecx
add	esp, 8
mov	[ebp+var_5C], eax
cmp	[ebp+var_5C], 0
jnz	short loc_7E128C
mov	eax, 1
jmp	loc_7E1CB0

loc_7E128C:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_5C]
mov	[edx+1D0h], eax
mov	ecx, [ebp+var_10]
cmp	dword ptr [ecx+0B8h], 0
jz	short loc_7E12E5
mov	edx, [ebp+arg_0]
mov	eax, [edx+1D4h]
shl	eax, 2
push	eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0B8h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
call	ecx
add	esp, 8
mov	[ebp+var_60], eax
cmp	[ebp+var_60], 0
jnz	short loc_7E12D9
mov	eax, 1
jmp	loc_7E1CB0

loc_7E12D9:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_60]
mov	[edx+0B8h], eax

loc_7E12E5:
jmp	short loc_7E1320

loc_7E12E7:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+1D4h], 20h
push	20h
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
call	eax
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	[ecx+1D0h], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+1D0h], 0
jnz	short loc_7E1320
mov	eax, 1
jmp	loc_7E1CB0

loc_7E1320:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1D0h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+104h]
mov	byte ptr [ecx+eax], 0
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+0A0h]
test	edx, edx
jz	short loc_7E13B6
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E52F0
add	esp, 4
mov	[ebp+var_64], eax
cmp	[ebp+var_64], 0
jge	short loc_7E1363
mov	eax, 1
jmp	loc_7E1CB0

loc_7E1363:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0B4h]
mov	eax, [ebp+var_10]
mov	ecx, [eax+0B8h]
mov	eax, [ebp+var_64]
mov	[ecx+edx*4], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0B4h]
add	edx, 1
mov	eax, [ebp+var_10]
mov	[eax+0B4h], edx
mov	ecx, [ebp+var_64]
imul	ecx, 1Ch
mov	edx, [ebp+var_10]
mov	eax, [edx+0A4h]
mov	dword ptr [ecx+eax], 6
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+80h], 0
jz	short loc_7E13B6
mov	[ebp+var_11], 0

loc_7E13B6:		; default
jmp	loc_7E1C29

loc_7E13BB:		; jumptable 007DFB36 case 51
mov	edx, [ebp+arg_0]
mov	eax, [edx+1D0h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
movsx	eax, byte ptr [eax+edx]
cmp	eax, 7Ch
jnz	short loc_7E13E0
mov	eax, 2
jmp	loc_7E1CB0

loc_7E13E0:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1D0h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+104h]
mov	byte ptr [edx+ecx], 2Ch
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+0A0h]
test	eax, eax
jz	short loc_7E1414
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+80h], 0
jz	short loc_7E1414
mov	[ebp+var_11], 0

loc_7E1414:		; default
jmp	loc_7E1C29

loc_7E1419:		; jumptable 007DFB36 case 50
mov	edx, [ebp+arg_0]
mov	eax, [edx+1D0h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
movsx	eax, byte ptr [eax+edx]
cmp	eax, 2Ch
jnz	short loc_7E143E
mov	eax, 2
jmp	loc_7E1CB0

loc_7E143E:
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+0A0h]
test	edx, edx
jz	short loc_7E14C7
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1D0h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+104h]
movsx	ecx, byte ptr [ecx+eax]
test	ecx, ecx
jnz	short loc_7E14C7
mov	edx, [ebp+var_10]
mov	eax, [edx+0B4h]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0B8h]
mov	eax, [edx+eax*4-4]
imul	eax, 1Ch
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0A4h]
cmp	dword ptr [eax+edx], 3
jz	short loc_7E14C7
mov	eax, [ebp+var_10]
mov	ecx, [eax+0B4h]
mov	edx, [ebp+var_10]
mov	eax, [edx+0B8h]
mov	ecx, [eax+ecx*4-4]
imul	ecx, 1Ch
mov	edx, [ebp+var_10]
mov	eax, [edx+0A4h]
mov	dword ptr [ecx+eax], 5
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+80h], 0
jz	short loc_7E14C7
mov	[ebp+var_11], 0

loc_7E14C7:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1D0h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+104h]
mov	byte ptr [eax+edx], 7Ch
jmp	loc_7E1C29	; default

loc_7E14E2:		; jumptable 007DFB36 cases 60,61
mov	eax, [ebp+var_10]
mov	byte ptr [eax+81h], 1
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+1ECh], 0
jnz	short loc_7E150F
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_10]
mov	cl, [eax+82h]
mov	[edx+80h], cl
jmp	loc_7E172F

loc_7E150F:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_14]
sub	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_8]
add	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_10]
add	ecx, 50h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_6C], eax
cmp	[ebp+var_6C], 0
jnz	short loc_7E1549
mov	eax, 1
jmp	loc_7E1CB0

loc_7E1549:		; size_t
push	0
mov	edx, [ebp+var_6C]
push	edx		; int
mov	eax, [ebp+var_10]
add	eax, 84h
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_68], eax
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [edx+60h]
mov	[ecx+5Ch], eax
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+110h], 0
jz	short loc_7E15E9
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+82h]
test	eax, eax
jz	short loc_7E15A0
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	dword ptr [ecx+12Ch], 0
setz	dl
mov	[ebp+var_BC], edx
jmp	short loc_7E15B7

loc_7E15A0:
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+81h]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_BC], ecx

loc_7E15B7:
cmp	[ebp+var_BC], 0
jz	short loc_7E15E9
cmp	[ebp+var_68], 0
jnz	short loc_7E15D2
mov	eax, 0Bh
jmp	loc_7E1CB0
jmp	short loc_7E15E7

loc_7E15D2:
mov	edx, [ebp+var_68]
movzx	eax, byte ptr [edx+22h]
test	eax, eax
jnz	short loc_7E15E7
mov	eax, 18h
jmp	loc_7E1CB0

loc_7E15E7:
jmp	short loc_7E1631

loc_7E15E9:
cmp	[ebp+var_68], 0
jnz	short loc_7E1631
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	al, [edx+82h]
mov	[ecx+80h], al
cmp	[ebp+var_18], 3Ch
jnz	short loc_7E162C
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+78h], 0
jz	short loc_7E162C
push	1
mov	edx, [ebp+var_6C]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+78h]
call	eax
add	esp, 0Ch
mov	[ebp+var_11], 0

loc_7E162C:		; default
jmp	loc_7E1C29

loc_7E1631:
mov	ecx, [ebp+var_68]
movzx	edx, byte ptr [ecx+20h]
test	edx, edx
jz	short loc_7E1646
mov	eax, 0Ch
jmp	loc_7E1CB0

loc_7E1646:
mov	eax, [ebp+var_68]
cmp	dword ptr [eax+4], 0
jz	short loc_7E168A
xor	ecx, ecx
cmp	[ebp+var_18], 3Ch
setz	cl
mov	[ebp+var_6D], cl
movzx	edx, [ebp+var_6D]
push	edx
mov	eax, [ebp+var_68]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E2240
add	esp, 0Ch
mov	[ebp+var_74], eax
cmp	[ebp+var_74], 0
jz	short loc_7E1681
mov	eax, [ebp+var_74]
jmp	loc_7E1CB0

loc_7E1681:
mov	[ebp+var_11], 0
jmp	loc_7E1C29	; default

loc_7E168A:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+70h], 0
jz	loc_7E1718
mov	eax, [ebp+var_10]
mov	byte ptr [eax+83h], 0
mov	ecx, [ebp+var_68]
mov	byte ptr [ecx+20h], 1
mov	edx, [ebp+var_68]
mov	eax, [edx+18h]
push	eax
mov	ecx, [ebp+var_68]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+var_68]
mov	ecx, [eax+14h]
push	ecx
push	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+74h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+70h]
call	edx
add	esp, 14h
test	eax, eax
jnz	short loc_7E16E6
mov	eax, [ebp+var_68]
mov	byte ptr [eax+20h], 0
mov	eax, 15h
jmp	loc_7E1CB0

loc_7E16E6:
mov	ecx, [ebp+var_68]
mov	byte ptr [ecx+20h], 0
mov	[ebp+var_11], 0
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+83h]
test	eax, eax
jnz	short loc_7E1716
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	al, [edx+82h]
mov	[ecx+80h], al
jmp	loc_7E1C29	; default

loc_7E1716:
jmp	short loc_7E172F

loc_7E1718:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	al, [edx+82h]
mov	[ecx+80h], al
jmp	loc_7E1C29	; default

loc_7E172F:
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+82h]
test	edx, edx
jnz	short loc_7E1766
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+6Ch], 0
jz	short loc_7E1766
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+6Ch]
call	ecx
add	esp, 4
test	eax, eax
jnz	short loc_7E1766
mov	eax, 16h
jmp	loc_7E1CB0

loc_7E1766:		; default
jmp	loc_7E1C29

loc_7E176B:		; jumptable 007DFB36 case 41
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+80h], 0
jz	short loc_7E17D6
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E56E0
add	esp, 10h
mov	ecx, [ebp+arg_0]
mov	[ecx+158h], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+158h], 0
jnz	short loc_7E17AE
mov	eax, 1
jmp	loc_7E1CB0

loc_7E17AE:
mov	eax, [ebp+var_10]
mov	dword ptr [eax+0B4h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+0B0h], 0
mov	edx, [ebp+var_10]
mov	byte ptr [edx+0A0h], 1
mov	[ebp+var_11], 0

loc_7E17D6:		; default
jmp	loc_7E1C29

loc_7E17DB:		; jumptable 007DFB36 cases 42,43
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+0A0h]
test	ecx, ecx
jz	loc_7E1891
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+80h], 0
jz	loc_7E1887
push	14h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	[ebp+var_78], eax
cmp	[ebp+var_78], 0
jnz	short loc_7E181D
mov	eax, 1
jmp	loc_7E1CB0

loc_7E181D:
mov	edx, [ebp+var_78]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+var_78]
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+var_78]
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+var_78]
mov	dword ptr [edx+10h], 0
xor	eax, eax
cmp	[ebp+var_18], 29h
setz	al
add	eax, 1
mov	ecx, [ebp+var_78]
mov	[ecx], eax
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+var_78]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+80h]
call	edx
add	esp, 0Ch
mov	[ebp+var_11], 0

loc_7E1887:
mov	eax, [ebp+var_10]
mov	byte ptr [eax+0A0h], 0

loc_7E1891:		; default
jmp	loc_7E1C29

loc_7E1896:		; jumptable 007DFB36 case 44
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+0A0h]
test	edx, edx
jz	short loc_7E18DD
mov	eax, [ebp+var_10]
mov	ecx, [eax+0B4h]
mov	edx, [ebp+var_10]
mov	eax, [edx+0B8h]
mov	ecx, [eax+ecx*4-4]
imul	ecx, 1Ch
mov	edx, [ebp+var_10]
mov	eax, [edx+0A4h]
mov	dword ptr [ecx+eax], 3
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+80h], 0
jz	short loc_7E18DD
mov	[ebp+var_11], 0

loc_7E18DD:		; default
jmp	loc_7E1C29

loc_7E18E2:		; jumptable 007DFB36 case 52
mov	[ebp+var_4], 0
jmp	short loc_7E1904

loc_7E18EB:		; jumptable 007DFB36 case 54
mov	[ebp+var_4], 1
jmp	short loc_7E1904

loc_7E18F4:		; jumptable 007DFB36 case 53
mov	[ebp+var_4], 2
jmp	short loc_7E1904

loc_7E18FD:		; jumptable 007DFB36 case 55
mov	[ebp+var_4], 3

loc_7E1904:
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+0A0h]
test	eax, eax
jz	loc_7E1A38
cmp	[ebp+var_4], 0
jnz	short loc_7E1927
mov	ecx, [ebp+arg_14]
mov	[ebp+var_C0], ecx
jmp	short loc_7E1936

loc_7E1927:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_14]
sub	eax, [edx+44h]
mov	[ebp+var_C0], eax

loc_7E1936:
mov	ecx, [ebp+var_C0]
mov	[ebp+var_7C], ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E52F0
add	esp, 4
mov	[ebp+var_80], eax
cmp	[ebp+var_80], 0
jge	short loc_7E195E
mov	eax, 1
jmp	loc_7E1CB0

loc_7E195E:
mov	eax, [ebp+var_80]
imul	eax, 1Ch
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0A4h]
mov	dword ptr [eax+edx], 4
mov	eax, [ebp+var_80]
imul	eax, 1Ch
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0A4h]
mov	ecx, [ebp+var_4]
mov	[edx+eax+4], ecx
mov	edx, [ebp+var_7C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E56E0
add	esp, 10h
mov	[ebp+var_8C], eax
cmp	[ebp+var_8C], 0
jnz	short loc_7E19BB
mov	eax, 1
jmp	loc_7E1CB0

loc_7E19BB:
mov	eax, [ebp+var_8C]
mov	ecx, [eax]
mov	[ebp+var_88], ecx
mov	edx, [ebp+var_80]
imul	edx, 1Ch
mov	eax, [ebp+var_10]
mov	ecx, [eax+0A4h]
mov	eax, [ebp+var_88]
mov	[ecx+edx+8], eax
mov	[ebp+var_84], 0

loc_7E19EC:
mov	ecx, [ebp+var_88]
add	ecx, [ebp+var_84]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+var_84]
add	eax, 1
mov	[ebp+var_84], eax
test	edx, edx
jz	short loc_7E1A10
jmp	short loc_7E19EC

loc_7E1A10:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0A8h]
add	edx, [ebp+var_84]
mov	eax, [ebp+var_10]
mov	[eax+0A8h], edx
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+80h], 0
jz	short loc_7E1A38
mov	[ebp+var_11], 0

loc_7E1A38:		; default
jmp	loc_7E1C29

loc_7E1A3D:		; jumptable 007DFB36 case 46
mov	[ebp+var_4], 0
jmp	short loc_7E1A5F

loc_7E1A46:		; jumptable 007DFB36 case 48
mov	[ebp+var_4], 1
jmp	short loc_7E1A5F

loc_7E1A4F:		; jumptable 007DFB36 case 47
mov	[ebp+var_4], 2
jmp	short loc_7E1A5F

loc_7E1A58:		; jumptable 007DFB36 case 49
mov	[ebp+var_4], 3

loc_7E1A5F:
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+0A0h]
test	eax, eax
jz	loc_7E1B3E
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+80h], 0
jz	short loc_7E1A81
mov	[ebp+var_11], 0

loc_7E1A81:
mov	edx, [ebp+var_10]
mov	eax, [edx+0B4h]
sub	eax, 1
mov	ecx, [ebp+var_10]
mov	[ecx+0B4h], eax
mov	edx, [ebp+var_10]
mov	eax, [edx+0B4h]
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0B8h]
mov	eax, [edx+eax*4]
imul	eax, 1Ch
mov	ecx, [ebp+var_10]
mov	edx, [ecx+0A4h]
mov	ecx, [ebp+var_4]
mov	[edx+eax+4], ecx
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+0B4h], 0
jnz	short loc_7E1B3E
movzx	eax, [ebp+var_11]
test	eax, eax
jnz	short loc_7E1B27
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E54E0
add	esp, 4
mov	[ebp+var_90], eax
cmp	[ebp+var_90], 0
jnz	short loc_7E1AF7
mov	eax, 1
jmp	loc_7E1CB0

loc_7E1AF7:
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+var_90]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+80h]
call	edx
add	esp, 0Ch

loc_7E1B27:
mov	eax, [ebp+var_10]
mov	byte ptr [eax+0A0h], 0
mov	ecx, [ebp+var_10]
mov	dword ptr [ecx+0A8h], 0

loc_7E1B3E:		; default
jmp	loc_7E1C29

loc_7E1B43:		; jumptable 007DFB36 case 56
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E31C0
add	esp, 10h
test	eax, eax
jnz	short loc_7E1B69
mov	eax, 1
jmp	loc_7E1CB0

loc_7E1B69:
mov	[ebp+var_11], 0
jmp	loc_7E1C29	; default

loc_7E1B72:		; jumptable 007DFB36 case 57
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3390
add	esp, 10h
test	eax, eax
jnz	short loc_7E1B98
mov	eax, 1
jmp	loc_7E1CB0

loc_7E1B98:
mov	[ebp+var_11], 0
jmp	loc_7E1C29	; default

loc_7E1BA1:		; jumptable 007DFB36 case 1
mov	ecx, [ebp+arg_10]
mov	[ebp+var_C4], ecx
cmp	[ebp+var_C4], 0Eh
jz	short loc_7E1BB5
jmp	short loc_7E1BB9

loc_7E1BB5:
mov	[ebp+var_11], 0

loc_7E1BB9:		; default
jmp	short loc_7E1C29

loc_7E1BBB:		; jumptable 007DFB36 case 4
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+54h], 0
jz	short loc_7E1BC8
mov	[ebp+var_11], 0

loc_7E1BC8:		; default
jmp	short loc_7E1C29

loc_7E1BCA:		; jumptable 007DFB36 case 12
mov	eax, [ebp+var_10]
movzx	ecx, byte ptr [eax+80h]
test	ecx, ecx
jz	short loc_7E1BE8
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+88h], 0
jz	short loc_7E1BE8
mov	[ebp+var_11], 0

loc_7E1BE8:		; default
jmp	short loc_7E1C29

loc_7E1BEA:		; jumptable 007DFB36 case 18
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+60h], 0
jz	short loc_7E1BF7
mov	[ebp+var_11], 0

loc_7E1BF7:		; default
jmp	short loc_7E1C29

loc_7E1BF9:		; jumptable 007DFB36 case 34
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+80h]
test	edx, edx
jz	short loc_7E1C17
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+84h], 0
jz	short loc_7E1C17
mov	[ebp+var_11], 0

loc_7E1C17:		; default
jmp	short loc_7E1C29

loc_7E1C19:		; jumptable 007DFB36 case 40
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+80h], 0
jz	short loc_7E1C29 ; default
mov	[ebp+var_11], 0

loc_7E1C29:		; default
movzx	edx, [ebp+var_11]
test	edx, edx
jz	short loc_7E1C52
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7E1C52
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7E1C52:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1E0h]
mov	[ebp+var_C8], eax
cmp	[ebp+var_C8], 2
jz	short loc_7E1C81
cmp	[ebp+var_C8], 3
jz	short loc_7E1C75
jmp	short loc_7E1C88

loc_7E1C75:
mov	ecx, [ebp+arg_18]
mov	edx, [ebp+arg_14]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E1CB0

loc_7E1C81:
mov	eax, 23h
jmp	short loc_7E1CB0

loc_7E1C88:
mov	eax, [ebp+arg_14]
mov	[ebp+arg_8], eax
lea	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
call	eax
add	esp, 10h
mov	[ebp+arg_10], eax
jmp	loc_7DF9A8

loc_7E1CB0:
mov	esp, ebp
pop	ebp
retn
sub_7DF950 endp

off_7E1CB4 dd offset loc_7DFA3B	; jump table for switch	statement
dd offset loc_7DFAD2
dd offset loc_7DFA31
dd offset loc_7DFA27
dd offset loc_7DFA15
off_7E1CC8 dd offset loc_7E116A, offset	loc_7E1BA1 ; jump table	for switch statement
dd offset loc_7DFB3D, offset loc_7DFFFC
dd offset loc_7E1BBB, offset loc_7DFB79
dd offset loc_7E08F0, offset loc_7DFC93
dd offset loc_7DFBF4, offset loc_7DFE40
dd offset loc_7E0C97, offset loc_7E0DF9
dd offset loc_7E1BCA, offset loc_7E07DF
dd offset loc_7E0A11, offset loc_7DFD87
dd offset loc_7E0AB1, offset loc_7E0B48
dd offset loc_7E1BEA, offset loc_7E0F34
dd offset loc_7E1054, offset loc_7E1100
dd offset loc_7E0FAF, offset loc_7E0176
dd offset loc_7E01D3, offset loc_7E01EC
dd offset loc_7E0205, offset loc_7E0214
dd offset loc_7E0223, offset loc_7E0232
dd offset loc_7E0241, offset loc_7E0250
dd offset loc_7E0280, offset loc_7E0280
dd offset loc_7E1BF9, offset loc_7E013A
dd offset loc_7E0347, offset loc_7E0347
dd offset loc_7E0568, offset loc_7E0568
dd offset loc_7E1C19, offset loc_7E176B
dd offset loc_7E17DB, offset loc_7E17DB
dd offset loc_7E1896, offset loc_7E121E
dd offset loc_7E1A3D, offset loc_7E1A4F
dd offset loc_7E1A46, offset loc_7E1A58
dd offset loc_7E1419, offset loc_7E13BB
dd offset loc_7E18E2, offset loc_7E18F4
dd offset loc_7E18EB, offset loc_7E18FD
dd offset loc_7E1B43, offset loc_7E1B72
dd offset loc_7DFC57, offset loc_7E11A5
dd offset loc_7E14E2, offset loc_7E14E2


; Attributes: bp-based frame

sub_7E1DC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+1E4h]
test	ecx, ecx
setz	dl
movzx	eax, dl
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
lea	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E1E40
add	esp, 18h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7E1E07
mov	eax, [ebp+var_4]
jmp	short loc_7E1E37

loc_7E1E07:
cmp	[ebp+arg_4], 0
jz	short loc_7E1E34
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+118h], offset sub_7DF8D0
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DF8D0
add	esp, 10h
jmp	short loc_7E1E37

loc_7E1E34:
mov	eax, [ebp+var_4]

loc_7E1E37:
mov	esp, ebp
pop	ebp
retn
sub_7E1DC0 endp

align 10h


; Attributes: bp-based frame

sub_7E1E40 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	byte ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_8]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+90h]
jnz	short loc_7E1E7E
mov	ecx, [ebp+arg_0]
add	ecx, 120h
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
add	ecx, 124h
mov	[ebp+var_C], ecx
jmp	short loc_7E1E99

loc_7E1E7E:
mov	edx, [ebp+arg_0]
mov	eax, [edx+12Ch]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+12Ch]
add	edx, 4
mov	[ebp+var_C], edx

loc_7E1E99:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
mov	dword ptr [edx], 0
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+0Ch]
call	edx
add	esp, 10h
mov	[ebp+var_4], eax
mov	eax, [ebp+var_C]
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
add	eax, 4
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 2Eh ; switch 47 cases
ja	loc_7E1F89	; default
			; jumptable 007E1EF3 cases 1,5-45
mov	ecx, [ebp+var_18]
movzx	edx, ds:byte_7E1FB0[ecx]
jmp	ds:off_7E1F9C[edx*4] ; switch jump

loc_7E1EFA:		; jumptable 007E1EF3 case 46
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+50h], 0
jz	short loc_7E1F1B
mov	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h

loc_7E1F1B:
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_14]
mov	[edx], eax
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+1E0h], 2
jnz	short loc_7E1F40
mov	eax, 23h
jmp	short loc_7E1F96
jmp	short loc_7E1F44 ; jumptable 007E1EF3 case 4

loc_7E1F40:
xor	eax, eax
jmp	short loc_7E1F96

loc_7E1F44:		; jumptable 007E1EF3 case 4
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_14]
mov	[ecx], edx
mov	eax, 4
jmp	short loc_7E1F96

loc_7E1F53:		; jumptable 007E1EF3 case 2
movzx	eax, [ebp+arg_14]
test	eax, eax
jz	short loc_7E1F67
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+var_8]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E1F96

loc_7E1F67:
mov	eax, 6
jmp	short loc_7E1F96

loc_7E1F6E:		; jumptable 007E1EF3 cases 0,3
movzx	eax, [ebp+arg_14]
test	eax, eax
jz	short loc_7E1F82
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+var_8]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E1F96

loc_7E1F82:
mov	eax, 2
jmp	short loc_7E1F96

loc_7E1F89:		; default
mov	eax, [ebp+var_10] ; jumptable 007E1EF3 cases 1,5-45
mov	ecx, [ebp+var_14]
mov	[eax], ecx
mov	eax, 17h

loc_7E1F96:
mov	esp, ebp
pop	ebp
retn
sub_7E1E40 endp

align 4
off_7E1F9C dd offset loc_7E1F6E	; jump table for switch	statement
dd offset loc_7E1F53
dd offset loc_7E1F44
dd offset loc_7E1EFA
dd offset loc_7E1F89
byte_7E1FB0 db	    0,	   4,	  1,	 0 ; indirect table for	switch statement
db	2,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     3
align 10h


; Attributes: bp-based frame

sub_7E1FE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+118h], offset sub_7E1FE0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+120h], edx

loc_7E1FFF:
mov	[ebp+var_8], 0
lea	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
mov	ecx, [eax]
call	ecx
add	esp, 10h
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx+124h], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
add	edx, 0Fh
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 1Eh ; switch 31 cases
ja	loc_7E21A3	; default
			; jumptable 007E205E cases 1-10,12,16-25,27,29
mov	eax, [ebp+var_C]
movzx	ecx, ds:byte_7E2218[eax]
jmp	ds:off_7E21F4[ecx*4] ; switch jump

loc_7E2065:		; jumptable 007E205E case 0
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+50h], 0
jz	short loc_7E20A2
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3440
add	esp, 10h
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+1E0h], 2
jnz	short loc_7E20A2
mov	eax, 23h
jmp	loc_7E21EE

loc_7E20A2:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E21EE

loc_7E20B1:		; jumptable 007E205E case 11
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E21EE

loc_7E20C0:		; jumptable 007E205E case 30
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+50h], 0
jz	short loc_7E20E7
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E3440
add	esp, 10h

loc_7E20E7:
jmp	loc_7E21AA

loc_7E20EC:		; jumptable 007E205E case 26
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E31C0
add	esp, 10h
test	eax, eax
jnz	short loc_7E2118
mov	eax, 1
jmp	loc_7E21EE

loc_7E2118:
jmp	loc_7E21AA

loc_7E211D:		; jumptable 007E205E case 28
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E3390
add	esp, 10h
test	eax, eax
jnz	short loc_7E2149
mov	eax, 1
jmp	loc_7E21EE

loc_7E2149:
jmp	short loc_7E21AA

loc_7E214B:		; jumptable 007E205E case 15
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx+120h], eax
mov	eax, 4
jmp	loc_7E21EE

loc_7E2161:		; jumptable 007E205E case 14
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+1E4h]
test	edx, edx
jnz	short loc_7E217B
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7E21EE

loc_7E217B:
mov	eax, 5
jmp	short loc_7E21EE

loc_7E2182:		; jumptable 007E205E case 13
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+1E4h]
test	eax, eax
jnz	short loc_7E219C
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E21EE

loc_7E219C:
mov	eax, 6
jmp	short loc_7E21EE

loc_7E21A3:		; default
mov	eax, 9		; jumptable 007E205E cases 1-10,12,16-25,27,29
jmp	short loc_7E21EE

loc_7E21AA:
mov	eax, [ebp+var_8]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+120h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1E0h]
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 2
jz	short loc_7E21E2
cmp	[ebp+var_10], 3
jz	short loc_7E21D6
jmp	short loc_7E21E9

loc_7E21D6:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+var_8]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E21EE

loc_7E21E2:
mov	eax, 23h
jmp	short loc_7E21EE

loc_7E21E9:
jmp	loc_7E1FFF

loc_7E21EE:
mov	esp, ebp
pop	ebp
retn
sub_7E1FE0 endp

align 4
off_7E21F4 dd offset loc_7E2065	; jump table for switch	statement
dd offset loc_7E20B1
dd offset loc_7E2182
dd offset loc_7E2161
dd offset loc_7E214B
dd offset loc_7E20EC
dd offset loc_7E211D
dd offset loc_7E20C0
dd offset loc_7E21A3
byte_7E2218 db	    0,	   8,	  8,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     8,     1
db	8,     2,     3,     4
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     5,     8
db	6,     8,     7
align 10h


; Attributes: bp-based frame

sub_7E2240 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+130h], 0
jz	short loc_7E226F
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+130h]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8]
mov	[eax+130h], edx
jmp	short loc_7E228F

loc_7E226F:
push	18h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_7E228F
mov	eax, 1
jmp	loc_7E2406

loc_7E228F:
mov	edx, [ebp+arg_4]
mov	byte ptr [edx+20h], 1
mov	eax, [ebp+arg_4]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+12Ch]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx+12Ch], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_4]
mov	[eax+0Ch], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+138h]
mov	[edx+10h], ecx
mov	edx, [ebp+var_C]
mov	al, [ebp+arg_8]
mov	[edx+14h], al
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+4], 0
mov	eax, [ebp+arg_4]
mov	ecx, [eax+4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_4]
add	eax, [ecx+8]
mov	[ebp+var_4], eax
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+21h]
test	eax, eax
jz	short loc_7E236C
lea	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0E4h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E4h]
mov	edx, [ecx]
call	edx
add	esp, 10h
mov	[ebp+var_18], eax
push	0
lea	eax, [ebp+var_10]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0E4h]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DF950
add	esp, 20h
mov	[ebp+var_14], eax
jmp	short loc_7E239D

loc_7E236C:
push	0
lea	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0E4h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+138h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DCD20
add	esp, 1Ch
mov	[ebp+var_14], eax

loc_7E239D:
cmp	[ebp+var_14], 0
jnz	short loc_7E2403
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+var_10]
jz	short loc_7E23D2
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+1E0h], 3
jnz	short loc_7E23D2
mov	eax, [ebp+var_10]
sub	eax, [ebp+var_8]
mov	ecx, [ebp+arg_4]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+118h], offset sub_7E2410
jmp	short loc_7E2403

loc_7E23D2:
mov	eax, [ebp+arg_4]
mov	byte ptr [eax+20h], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	eax, [edx+8]
mov	[ecx+12Ch], eax
mov	ecx, [ebp+var_C]
mov	edx, [ebp+arg_0]
mov	eax, [edx+130h]
mov	[ecx+8], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx+130h], edx

loc_7E2403:
mov	eax, [ebp+var_14]

loc_7E2406:
mov	esp, ebp
pop	ebp
retn
sub_7E2240 endp

align 10h


; Attributes: bp-based frame

sub_7E2410 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+12Ch]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0
jnz	short loc_7E2432
mov	eax, 17h
jmp	loc_7E262E

loc_7E2432:
mov	edx, [ebp+var_C]
mov	eax, [edx+0Ch]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
add	edx, [eax+0Ch]
mov	[ebp+var_8], edx
mov	ecx, [ebp+var_10]
mov	edx, [ecx+4]
mov	eax, [ebp+var_10]
add	edx, [eax+8]
mov	[ebp+var_4], edx
mov	ecx, [ebp+var_10]
movzx	edx, byte ptr [ecx+21h]
test	edx, edx
jz	short loc_7E24BE
lea	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E4h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0E4h]
mov	ecx, [eax]
call	ecx
add	esp, 10h
mov	[ebp+var_1C], eax
push	0
lea	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_1C]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0E4h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DF950
add	esp, 20h
mov	[ebp+var_18], eax
jmp	short loc_7E24EC

loc_7E24BE:
push	0
lea	ecx, [ebp+var_14]
push	ecx
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0E4h]
push	edx
mov	eax, [ebp+var_C]
mov	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DCD20
add	esp, 1Ch
mov	[ebp+var_18], eax

loc_7E24EC:
cmp	[ebp+var_18], 0
jz	short loc_7E24FC
mov	eax, [ebp+var_18]
jmp	loc_7E262E
jmp	short loc_7E255A

loc_7E24FC:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+var_14]
jz	short loc_7E2529
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+1E0h], 3
jnz	short loc_7E2529
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_14]
sub	eax, [edx+4]
mov	ecx, [ebp+var_10]
mov	[ecx+0Ch], eax
mov	eax, [ebp+var_18]
jmp	loc_7E262E
jmp	short loc_7E255A

loc_7E2529:
mov	edx, [ebp+var_10]
mov	byte ptr [edx+20h], 0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	edx, [ecx+8]
mov	[eax+12Ch], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+130h]
mov	[eax+8], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	[eax+130h], ecx

loc_7E255A:
mov	edx, [ebp+var_10]
movzx	eax, byte ptr [edx+21h]
test	eax, eax
jz	short loc_7E25DC
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+118h], offset sub_7DF8D0
lea	edx, [ebp+var_14]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+90h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
mov	eax, [edx]
call	eax
add	esp, 10h
mov	[ebp+var_20], eax
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+1E4h]
test	edx, edx
setz	al
movzx	ecx, al
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_14]
push	eax
mov	ecx, [ebp+var_20]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+90h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7DF950
add	esp, 20h
jmp	short loc_7E262E
jmp	short loc_7E262E

loc_7E25DC:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+118h], offset sub_7DF020
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+1E4h]
test	eax, eax
setz	cl
movzx	edx, cl
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+90h]
push	ecx
mov	edx, [ebp+arg_0]
xor	eax, eax
cmp	dword ptr [edx+1DCh], 0
setnz	al
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7DCD20
add	esp, 1Ch

loc_7E262E:
mov	esp, ebp
pop	ebp
retn
sub_7E2410 endp

align 10h


; Attributes: bp-based frame

sub_7E2640 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	eax, [eax+11Ch]
pop	ebp
retn
sub_7E2640 endp

align 10h


; Attributes: bp-based frame

sub_7E2650 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
movzx	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E2720
add	esp, 18h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7E2688
mov	eax, [ebp+var_4]
jmp	loc_7E2714

loc_7E2688:
movzx	eax, [ebp+arg_8]
test	eax, eax
jnz	short loc_7E26BC
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_14]
mov	eax, [ecx+0Ch]
sub	eax, [edx+10h]
jz	short loc_7E26BC
mov	ecx, [ebp+arg_14]
mov	edx, [ecx+0Ch]
movsx	eax, byte ptr [edx-1]
cmp	eax, 20h
jnz	short loc_7E26BC
mov	ecx, [ebp+arg_14]
mov	edx, [ecx+0Ch]
sub	edx, 1
mov	eax, [ebp+arg_14]
mov	[eax+0Ch], edx

loc_7E26BC:
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_14]
mov	eax, [ecx+0Ch]
cmp	eax, [edx+8]
jnz	short loc_7E26E6
mov	ecx, [ebp+arg_14]
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E26E6
mov	[ebp+var_8], 0
jmp	short loc_7E2705

loc_7E26E6:
mov	eax, [ebp+arg_14]
mov	ecx, [eax+0Ch]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_14]
mov	eax, [edx+0Ch]
add	eax, 1
mov	ecx, [ebp+arg_14]
mov	[ecx+0Ch], eax
mov	[ebp+var_8], 1

loc_7E2705:
cmp	[ebp+var_8], 0
jnz	short loc_7E2712
mov	eax, 1
jmp	short loc_7E2714

loc_7E2712:
xor	eax, eax

loc_7E2714:
mov	esp, ebp
pop	ebp
retn
sub_7E2650 endp

align 10h


; Attributes: bp-based frame

sub_7E2720 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_19=	byte ptr -19h
var_18=	byte ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_4], ecx

loc_7E2732:
lea	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+10h]
call	ecx
add	esp, 10h
mov	[ebp+var_8], eax
mov	edx, [ebp+var_8]
mov	[ebp+var_34], edx
mov	eax, [ebp+var_34]
add	eax, 4
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 2Bh ; switch 44 cases
ja	loc_7E2C61	; default
			; jumptable 007E2773 cases 2,5-9,12,15-42
mov	ecx, [ebp+var_34]
movzx	edx, ds:byte_7E2CB8[ecx]
jmp	ds:off_7E2C94[edx*4] ; switch jump

loc_7E277A:		; jumptable 007E2773 case 0
xor	eax, eax
jmp	loc_7E2C8D

loc_7E2781:		; jumptable 007E2773 case 4
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7E279B
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_C]
mov	[edx+120h], eax

loc_7E279B:
mov	eax, 4
jmp	loc_7E2C8D

loc_7E27A5:		; jumptable 007E2773 case 3
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+90h]
jnz	short loc_7E27BF
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_C]
mov	[eax+120h], ecx

loc_7E27BF:
mov	eax, 4
jmp	loc_7E2C8D

loc_7E27C9:		; jumptable 007E2773 case 14
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+2Ch]
call	edx
add	esp, 8
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jge	short loc_7E2809
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7E27FF
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+120h], eax

loc_7E27FF:
mov	eax, 0Eh
jmp	loc_7E2C8D

loc_7E2809:
movzx	ecx, [ebp+arg_8]
test	ecx, ecx
jnz	short loc_7E2839
cmp	[ebp+var_10], 20h
jnz	short loc_7E2839
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_14]
mov	ecx, [edx+0Ch]
sub	ecx, [eax+10h]
jz	short loc_7E2834
mov	edx, [ebp+arg_14]
mov	eax, [edx+0Ch]
movsx	ecx, byte ptr [eax-1]
cmp	ecx, 20h
jnz	short loc_7E2839

loc_7E2834:
jmp	loc_7E2C82

loc_7E2839:
lea	edx, [ebp+var_18]
push	edx
mov	eax, [ebp+var_10]
push	eax
call	sub_7F6F20
add	esp, 8
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7E2876
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+90h]
jnz	short loc_7E286C
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_C]
mov	[eax+120h], ecx

loc_7E286C:
mov	eax, 0Eh
jmp	loc_7E2C8D

loc_7E2876:
mov	[ebp+var_14], 0
jmp	short loc_7E2888

loc_7E287F:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_7E2888:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_10]
jge	short loc_7E28F1
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_14]
mov	eax, [ecx+0Ch]
cmp	eax, [edx+8]
jnz	short loc_7E28BA
mov	ecx, [ebp+arg_14]
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E28BA
mov	[ebp+var_38], 0
jmp	short loc_7E28DF

loc_7E28BA:
mov	eax, [ebp+arg_14]
mov	ecx, [eax+0Ch]
mov	edx, [ebp+var_14]
mov	al, [ebp+edx+var_18]
mov	[ecx], al
mov	ecx, [ebp+arg_14]
mov	edx, [ecx+0Ch]
add	edx, 1
mov	eax, [ebp+arg_14]
mov	[eax+0Ch], edx
mov	[ebp+var_38], 1

loc_7E28DF:
cmp	[ebp+var_38], 0
jnz	short loc_7E28EF
mov	eax, 1
jmp	loc_7E2C8D

loc_7E28EF:
jmp	short loc_7E287F

loc_7E28F1:
jmp	loc_7E2C82

loc_7E28F6:		; jumptable 007E2773 case 10
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_14]
push	ecx
call	sub_7E4E40
add	esp, 10h
test	eax, eax
jnz	short loc_7E291C
mov	eax, 1
jmp	loc_7E2C8D

loc_7E291C:
jmp	loc_7E2C82

loc_7E2921:		; jumptable 007E2773 case 1
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_C]
add	eax, [edx+44h]
mov	[ebp+var_C], eax

loc_7E292D:		; jumptable 007E2773 cases 11,43
movzx	ecx, [ebp+arg_8]
test	ecx, ecx
jnz	short loc_7E2957
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_14]
mov	ecx, [edx+0Ch]
sub	ecx, [eax+10h]
jz	short loc_7E2952
mov	edx, [ebp+arg_14]
mov	eax, [edx+0Ch]
movsx	ecx, byte ptr [eax-1]
cmp	ecx, 20h
jnz	short loc_7E2957

loc_7E2952:
jmp	loc_7E2C82

loc_7E2957:
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_14]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+8]
jnz	short loc_7E2981
mov	edx, [ebp+arg_14]
push	edx
call	sub_7E5040
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_7E2981
mov	[ebp+var_3C], 0
jmp	short loc_7E29A0

loc_7E2981:
mov	ecx, [ebp+arg_14]
mov	edx, [ecx+0Ch]
mov	byte ptr [edx],	20h
mov	eax, [ebp+arg_14]
mov	ecx, [eax+0Ch]
add	ecx, 1
mov	edx, [ebp+arg_14]
mov	[edx+0Ch], ecx
mov	[ebp+var_3C], 1

loc_7E29A0:
cmp	[ebp+var_3C], 0
jnz	short loc_7E29B0
mov	eax, 1
jmp	loc_7E2C8D

loc_7E29B0:
jmp	loc_7E2C82

loc_7E29B5:		; jumptable 007E2773 case 13
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_C]
sub	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_C]
add	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+30h]
call	eax
add	esp, 0Ch
mov	[ebp+var_25], al
movsx	ecx, [ebp+var_25]
test	ecx, ecx
jz	short loc_7E2A43
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_14]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+8]
jnz	short loc_7E2A0D
mov	edx, [ebp+arg_14]
push	edx
call	sub_7E5040
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_7E2A0D
mov	[ebp+var_40], 0
jmp	short loc_7E2A2E

loc_7E2A0D:
mov	ecx, [ebp+arg_14]
mov	edx, [ecx+0Ch]
mov	al, [ebp+var_25]
mov	[edx], al
mov	ecx, [ebp+arg_14]
mov	edx, [ecx+0Ch]
add	edx, 1
mov	eax, [ebp+arg_14]
mov	[eax+0Ch], edx
mov	[ebp+var_40], 1

loc_7E2A2E:
cmp	[ebp+var_40], 0
jnz	short loc_7E2A3E
mov	eax, 1
jmp	loc_7E2C8D

loc_7E2A3E:
jmp	loc_7E2C82

loc_7E2A43:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_C]
sub	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_C]
add	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
add	eax, 1B8h
push	eax
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jnz	short loc_7E2A7F
mov	eax, 1
jmp	loc_7E2C8D

loc_7E2A7F:		; size_t
push	0
mov	ecx, [ebp+var_24]
push	ecx		; int
mov	edx, [ebp+var_4]
push	edx		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_20], eax
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1C8h]
mov	[eax+1C4h], edx
mov	eax, [ebp+var_4]
add	eax, 50h
cmp	[ebp+arg_14], eax
jnz	short loc_7E2B11
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+110h], 0
jz	short loc_7E2B02
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+82h]
test	eax, eax
jz	short loc_7E2ADF
mov	ecx, [ebp+arg_0]
xor	edx, edx
cmp	dword ptr [ecx+12Ch], 0
setz	dl
mov	[ebp+var_44], edx
jmp	short loc_7E2AF3

loc_7E2ADF:
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+81h]
neg	ecx
sbb	ecx, ecx
add	ecx, 1
mov	[ebp+var_44], ecx

loc_7E2AF3:
cmp	[ebp+var_44], 0
jz	short loc_7E2B02
mov	[ebp+var_48], 1
jmp	short loc_7E2B09

loc_7E2B02:
mov	[ebp+var_48], 0

loc_7E2B09:
mov	dl, byte ptr [ebp+var_48]
mov	[ebp+var_19], dl
jmp	short loc_7E2B43

loc_7E2B11:
mov	eax, [ebp+var_4]
movzx	ecx, byte ptr [eax+81h]
test	ecx, ecx
jz	short loc_7E2B36
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+82h]
test	eax, eax
jnz	short loc_7E2B36
mov	[ebp+var_4C], 0
jmp	short loc_7E2B3D

loc_7E2B36:
mov	[ebp+var_4C], 1

loc_7E2B3D:
mov	cl, byte ptr [ebp+var_4C]
mov	[ebp+var_19], cl

loc_7E2B43:
movsx	edx, [ebp+var_19]
test	edx, edx
jz	short loc_7E2B74
cmp	[ebp+var_20], 0
jnz	short loc_7E2B5D
mov	eax, 0Bh
jmp	loc_7E2C8D
jmp	short loc_7E2B72

loc_7E2B5D:
mov	eax, [ebp+var_20]
movzx	ecx, byte ptr [eax+22h]
test	ecx, ecx
jnz	short loc_7E2B72
mov	eax, 18h
jmp	loc_7E2C8D

loc_7E2B72:
jmp	short loc_7E2B7F

loc_7E2B74:
cmp	[ebp+var_20], 0
jnz	short loc_7E2B7F
jmp	loc_7E2C82

loc_7E2B7F:
mov	edx, [ebp+var_20]
movzx	eax, byte ptr [edx+20h]
test	eax, eax
jz	short loc_7E2BAE
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+90h]
jnz	short loc_7E2BA4
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_C]
mov	[eax+120h], ecx

loc_7E2BA4:
mov	eax, 0Ch
jmp	loc_7E2C8D

loc_7E2BAE:
mov	edx, [ebp+var_20]
cmp	dword ptr [edx+1Ch], 0
jz	short loc_7E2BDB
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7E2BD1
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_C]
mov	[edx+120h], eax

loc_7E2BD1:
mov	eax, 0Fh
jmp	loc_7E2C8D

loc_7E2BDB:
mov	ecx, [ebp+var_20]
cmp	dword ptr [ecx+4], 0
jnz	short loc_7E2C0A
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+90h]
jnz	short loc_7E2BFE
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_C]
mov	[ecx+120h], edx

loc_7E2BFE:
mov	eax, 10h
jmp	loc_7E2C8D
jmp	short loc_7E2C5F

loc_7E2C0A:
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	edx, [ebp+var_20]
add	ecx, [edx+8]
mov	[ebp+var_2C], ecx
mov	eax, [ebp+var_20]
mov	byte ptr [eax+20h], 1
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+var_2C]
push	edx
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
push	ecx
movzx	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0E4h]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E2720
add	esp, 18h
mov	[ebp+var_30], eax
mov	eax, [ebp+var_20]
mov	byte ptr [eax+20h], 0
cmp	[ebp+var_30], 0
jz	short loc_7E2C5F
mov	eax, [ebp+var_30]
jmp	short loc_7E2C8D

loc_7E2C5F:
jmp	short loc_7E2C82

loc_7E2C61:		; default
mov	ecx, [ebp+arg_0] ; jumptable 007E2773 cases 2,5-9,12,15-42
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+90h]
jnz	short loc_7E2C7B
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_C]
mov	[eax+120h], ecx

loc_7E2C7B:
mov	eax, 17h
jmp	short loc_7E2C8D

loc_7E2C82:
mov	edx, [ebp+var_C]
mov	[ebp+arg_C], edx
jmp	loc_7E2732

loc_7E2C8D:
mov	esp, ebp
pop	ebp
retn
sub_7E2720 endp

align 4
off_7E2C94 dd offset loc_7E277A	; jump table for switch	statement
dd offset loc_7E2921
dd offset loc_7E27A5
dd offset loc_7E2781
dd offset loc_7E28F6
dd offset loc_7E292D
dd offset loc_7E29B5
dd offset loc_7E27C9
dd offset loc_7E2C61
byte_7E2CB8 db	    0,	   1,	  8,	 2 ; indirect table for	switch statement
db	3,     8,     8,     8
db	8,     8,     4,     5
db	8,     6,     7,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     5
align 10h


; Attributes: bp-based frame

sub_7E2CF0 proc	near

var_30=	dword ptr -30h
var_2C=	byte ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
add	edx, 68h
mov	[ebp+var_10], edx
mov	[ebp+var_C], 0
mov	eax, [ebp+arg_0]
mov	ecx, [eax+114h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+114h], 1
mov	eax, [ebp+var_10]
cmp	dword ptr [eax], 0
jnz	short loc_7E2D50
mov	ecx, [ebp+var_10]
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E2D50
mov	eax, 1
jmp	loc_7E3174

loc_7E2D50:
lea	eax, [ebp+var_18]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+14h]
call	edx
add	esp, 10h
mov	[ebp+var_14], eax
mov	eax, [ebp+var_14]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
add	ecx, 4
mov	[ebp+var_30], ecx
cmp	[ebp+var_30], 20h ; switch 33 cases
ja	loc_7E3137	; default
			; jumptable 007E2D91 cases 2,5-9,12,15-31
mov	edx, [ebp+var_30]
movzx	eax, ds:byte_7E319C[edx]
jmp	ds:off_7E3178[eax*4] ; switch jump

loc_7E2D98:		; jumptable 007E2D91 case 32
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+1E8h]
test	edx, edx
jnz	short loc_7E2DB8
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jz	loc_7E2F60

loc_7E2DB8:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_18]
sub	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+arg_8]
add	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jnz	short loc_7E2DF7
mov	[ebp+var_C], 1
jmp	loc_7E3165

loc_7E2DF7:		; size_t
push	0
mov	edx, [ebp+var_20]
push	edx		; int
mov	eax, [ebp+var_4]
add	eax, 84h
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_1C], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1B0h]
mov	[ecx+1ACh], eax
cmp	[ebp+var_1C], 0
jnz	short loc_7E2E40
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	al, [edx+82h]
mov	[ecx+80h], al
jmp	loc_7E3165

loc_7E2E40:
mov	ecx, [ebp+var_1C]
movzx	edx, byte ptr [ecx+20h]
test	edx, edx
jz	short loc_7E2E71
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7E2E65
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx+120h], eax

loc_7E2E65:
mov	[ebp+var_C], 0Ch
jmp	loc_7E3165

loc_7E2E71:
mov	ecx, [ebp+var_1C]
cmp	dword ptr [ecx+10h], 0
jz	loc_7E2F15
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+70h], 0
jz	short loc_7E2F01
mov	eax, [ebp+var_4]
mov	byte ptr [eax+83h], 0
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+20h], 1
mov	edx, [ebp+var_1C]
mov	eax, [edx+18h]
push	eax
mov	ecx, [ebp+var_1C]
mov	edx, [ecx+10h]
push	edx
mov	eax, [ebp+var_1C]
mov	ecx, [eax+14h]
push	ecx
push	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+74h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+70h]
call	edx
add	esp, 14h
test	eax, eax
jnz	short loc_7E2ED8
mov	eax, [ebp+var_1C]
mov	byte ptr [eax+20h], 0
mov	[ebp+var_C], 15h
jmp	loc_7E3165

loc_7E2ED8:
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+20h], 0
mov	edx, [ebp+var_4]
movzx	eax, byte ptr [edx+83h]
test	eax, eax
jnz	short loc_7E2EFF
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	al, [edx+82h]
mov	[ecx+80h], al

loc_7E2EFF:
jmp	short loc_7E2F13

loc_7E2F01:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	al, [edx+82h]
mov	[ecx+80h], al

loc_7E2F13:
jmp	short loc_7E2F5B

loc_7E2F15:
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+20h], 1
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
mov	ecx, [ebp+var_1C]
add	eax, [ecx+8]
push	eax
mov	edx, [ebp+var_1C]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0E4h]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E2CF0
add	esp, 10h
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_1C]
mov	byte ptr [ecx+20h], 0
cmp	[ebp+var_C], 0
jz	short loc_7E2F5B
jmp	loc_7E3165

loc_7E2F5B:
jmp	loc_7E315A

loc_7E2F60:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx+120h], eax
mov	[ebp+var_C], 0Ah
jmp	loc_7E3165

loc_7E2F78:		; jumptable 007E2D91 case 0
mov	[ebp+var_C], 0
jmp	loc_7E3165

loc_7E2F84:		; jumptable 007E2D91 cases 10,13
mov	ecx, [ebp+var_18]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_10]
push	ecx
call	sub_7E4E40
add	esp, 10h
test	eax, eax
jnz	short loc_7E2FAC
mov	[ebp+var_C], 1
jmp	loc_7E3165

loc_7E2FAC:
jmp	loc_7E315A

loc_7E2FB1:		; jumptable 007E2D91 case 1
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
add	eax, [edx+44h]
mov	[ebp+var_18], eax

loc_7E2FBD:		; jumptable 007E2D91 case 11
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_10]
mov	eax, [ecx+8]
cmp	eax, [edx+0Ch]
jnz	short loc_7E2FEA
mov	ecx, [ebp+var_10]
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E2FEA
mov	[ebp+var_C], 1
jmp	loc_7E3165

loc_7E2FEA:
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
mov	byte ptr [ecx],	0Ah
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
add	eax, 1
mov	ecx, [ebp+var_10]
mov	[ecx+0Ch], eax
jmp	loc_7E315A

loc_7E3007:		; jumptable 007E2D91 case 14
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+2Ch]
call	edx
add	esp, 8
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jge	short loc_7E3049
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7E303D
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx+120h], eax

loc_7E303D:
mov	[ebp+var_C], 0Eh
jmp	loc_7E3165

loc_7E3049:
lea	ecx, [ebp+var_2C]
push	ecx
mov	edx, [ebp+var_24]
push	edx
call	sub_7F6F20
add	esp, 8
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jnz	short loc_7E3088
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7E307C
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx+120h], eax

loc_7E307C:
mov	[ebp+var_C], 0Eh
jmp	loc_7E3165

loc_7E3088:
mov	[ebp+var_28], 0
jmp	short loc_7E309A

loc_7E3091:
mov	ecx, [ebp+var_28]
add	ecx, 1
mov	[ebp+var_28], ecx

loc_7E309A:
mov	edx, [ebp+var_28]
cmp	edx, [ebp+var_24]
jge	short loc_7E30EF
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_10]
mov	edx, [eax+8]
cmp	edx, [ecx+0Ch]
jnz	short loc_7E30CF
mov	eax, [ebp+var_10]
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E30CF
mov	[ebp+var_C], 1
jmp	loc_7E3165

loc_7E30CF:
mov	edx, [ebp+var_10]
mov	eax, [edx+0Ch]
mov	ecx, [ebp+var_28]
mov	dl, [ebp+ecx+var_2C]
mov	[eax], dl
mov	eax, [ebp+var_10]
mov	ecx, [eax+0Ch]
add	ecx, 1
mov	edx, [ebp+var_10]
mov	[edx+0Ch], ecx
jmp	short loc_7E3091

loc_7E30EF:
jmp	short loc_7E315A

loc_7E30F1:		; jumptable 007E2D91 case 3
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+90h]
jnz	short loc_7E310B
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_8]
mov	[edx+120h], eax

loc_7E310B:
mov	[ebp+var_C], 4
jmp	short loc_7E3165

loc_7E3114:		; jumptable 007E2D91 case 4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+90h]
jnz	short loc_7E312E
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_18]
mov	[eax+120h], ecx

loc_7E312E:
mov	[ebp+var_C], 4
jmp	short loc_7E3165

loc_7E3137:		; default
mov	edx, [ebp+arg_0] ; jumptable 007E2D91 cases 2,5-9,12,15-31
mov	eax, [ebp+arg_4]
cmp	eax, [edx+90h]
jnz	short loc_7E3151
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_8]
mov	[ecx+120h], edx

loc_7E3151:
mov	[ebp+var_C], 17h
jmp	short loc_7E3165

loc_7E315A:
mov	eax, [ebp+var_18]
mov	[ebp+arg_8], eax
jmp	loc_7E2D50

loc_7E3165:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx+114h], edx
mov	eax, [ebp+var_C]

loc_7E3174:
mov	esp, ebp
pop	ebp
retn
sub_7E2CF0 endp

off_7E3178 dd offset loc_7E2F78	; jump table for switch	statement
dd offset loc_7E2FB1
dd offset loc_7E30F1
dd offset loc_7E3114
dd offset loc_7E2F84
dd offset loc_7E2FBD
dd offset loc_7E3007
dd offset loc_7E2D98
dd offset loc_7E3137
byte_7E319C db	    0,	   1,	  8,	 2 ; indirect table for	switch statement
db	3,     8,     8,     8
db	8,     8,     4,     5
db	8,     4,     6,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	7
align 10h


; Attributes: bp-based frame

sub_7E31C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+40h], 0
jnz	short loc_7E31FA
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+50h], 0
jz	short loc_7E31F0
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3440
add	esp, 10h

loc_7E31F0:
mov	eax, 1
jmp	loc_7E32E4

loc_7E31FA:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+44h]
mov	edx, [ebp+arg_8]
lea	eax, [edx+ecx*2]
mov	[ebp+arg_8], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+20h]
call	ecx
add	esp, 8
add	eax, [ebp+arg_8]
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jnz	short loc_7E3250
xor	eax, eax
jmp	loc_7E32E4

loc_7E3250:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
mov	[eax+1B0h], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+44h]
shl	ecx, 1
mov	edx, [ebp+arg_C]
sub	edx, ecx
push	edx
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+24h]
call	eax
add	esp, 8
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_7E32A7
xor	eax, eax
jmp	short loc_7E32E4

loc_7E32A7:
mov	eax, [ebp+var_C]
push	eax
call	sub_7E32F0
add	esp, 4
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+40h]
call	eax
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E4D50
add	esp, 4
mov	eax, 1

loc_7E32E4:
mov	esp, ebp
pop	ebp
retn
sub_7E31C0 endp

align 10h


; Attributes: bp-based frame

sub_7E32F0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
jmp	short loc_7E32FF

loc_7E32F6:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax

loc_7E32FF:
mov	ecx, [ebp+arg_0]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7E330B
jmp	short loc_7E3385

loc_7E330B:
mov	eax, [ebp+arg_0]
movsx	ecx, byte ptr [eax]
cmp	ecx, 0Dh
jnz	short loc_7E3318
jmp	short loc_7E331A

loc_7E3318:
jmp	short loc_7E32F6

loc_7E331A:
mov	edx, [ebp+arg_0]
mov	[ebp+var_4], edx

loc_7E3320:
mov	eax, [ebp+arg_0]
movsx	ecx, byte ptr [eax]
cmp	ecx, 0Dh
jnz	short loc_7E3359
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	0Ah
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx
mov	edx, [ebp+arg_0]
movsx	eax, byte ptr [edx]
cmp	eax, 0Ah
jnz	short loc_7E3357
mov	ecx, [ebp+arg_0]
add	ecx, 1
mov	[ebp+arg_0], ecx

loc_7E3357:
jmp	short loc_7E3375

loc_7E3359:
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax

loc_7E3375:
mov	ecx, [ebp+arg_0]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7E3320
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0

loc_7E3385:
mov	esp, ebp
pop	ebp
retn
sub_7E32F0 endp

align 10h


; Attributes: bp-based frame

sub_7E3390 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+44h], 0
jnz	short loc_7E33C5
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+50h], 0
jz	short loc_7E33BE
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3440
add	esp, 10h

loc_7E33BE:
mov	eax, 1
jmp	short loc_7E343C

loc_7E33C5:
mov	eax, [ebp+arg_4]
mov	ecx, [eax+44h]
imul	ecx, 3
mov	edx, [ebp+arg_C]
sub	edx, ecx
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+44h]
mov	edx, [ebp+arg_8]
lea	eax, [edx+ecx*4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 1A0h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7E3404
xor	eax, eax
jmp	short loc_7E343C

loc_7E3404:
mov	eax, [ebp+var_4]
push	eax
call	sub_7E32F0
add	esp, 4
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+44h]
call	edx
add	esp, 8
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E4D50
add	esp, 4
mov	eax, 1

loc_7E343C:
mov	esp, ebp
pop	ebp
retn
sub_7E3390 endp



; Attributes: bp-based frame

sub_7E3440 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+48h]
test	ecx, ecx
jnz	loc_7E3500
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+90h]
jnz	short loc_7E347D
mov	ecx, [ebp+arg_0]
add	ecx, 120h
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
add	edx, 124h
mov	[ebp+var_4], edx
jmp	short loc_7E3498

loc_7E347D:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+12Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+12Ch]
add	eax, 4
mov	[ebp+var_4], eax

loc_7E3498:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+2Ch]
mov	[ebp+var_C], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+30h]
push	ecx
lea	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_C]
push	eax
lea	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 14h
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
sub	edx, [ecx+2Ch]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+2Ch]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+50h]
call	edx
add	esp, 0Ch
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_C]
jnz	short loc_7E3498
jmp	short loc_7E351D

loc_7E3500:
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+50h]
call	edx
add	esp, 0Ch

loc_7E351D:
mov	esp, ebp
pop	ebp
retn
sub_7E3440 endp

align 10h


; Attributes: bp-based frame

sub_7E3530 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= byte ptr	 10h
arg_C= byte ptr	 14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
cmp	[ebp+arg_10], 0
jnz	short loc_7E3544
movzx	eax, [ebp+arg_C]
test	eax, eax
jz	short loc_7E35A6

loc_7E3544:
mov	[ebp+var_8], 0
jmp	short loc_7E3556

loc_7E354D:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_7E3556:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
cmp	eax, [edx+0Ch]
jge	short loc_7E3581
mov	ecx, [ebp+var_8]
imul	ecx, 0Ch
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	edx, [ebp+arg_4]
cmp	edx, [ecx+eax]
jnz	short loc_7E357F
mov	eax, 1
jmp	loc_7E368A

loc_7E357F:
jmp	short loc_7E354D

loc_7E3581:
movzx	eax, [ebp+arg_C]
test	eax, eax
jz	short loc_7E35A6
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+8], 0
jnz	short loc_7E35A6
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+9]
test	eax, eax
jnz	short loc_7E35A6
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+8], edx

loc_7E35A6:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+10h]
jnz	loc_7E363B
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+10h], 0
jnz	short loc_7E35F8
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+10h], 8
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
imul	eax, 0Ch
push	eax
mov	ecx, [ebp+arg_14]
mov	edx, [ecx+0Ch]
call	edx
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	[ecx+14h], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+14h], 0
jnz	short loc_7E35F6
xor	eax, eax
jmp	loc_7E368A

loc_7E35F6:
jmp	short loc_7E363B

loc_7E35F8:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
shl	ecx, 1
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
imul	edx, 0Ch
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
push	ecx
mov	edx, [ebp+arg_14]
mov	eax, [edx+10h]
call	eax
add	esp, 8
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7E3629
xor	eax, eax
jmp	short loc_7E368A

loc_7E3629:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_C]
mov	[ecx+10h], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_10]
mov	[eax+14h], ecx

loc_7E363B:
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
imul	eax, 0Ch
mov	ecx, [ebp+arg_0]
add	eax, [ecx+14h]
mov	[ebp+var_4], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_10]
mov	[ecx+8], edx
mov	eax, [ebp+var_4]
mov	cl, [ebp+arg_8]
mov	[eax+4], cl
movzx	edx, [ebp+arg_8]
test	edx, edx
jnz	short loc_7E3676
mov	eax, [ebp+arg_4]
mov	byte ptr [eax+8], 1

loc_7E3676:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+0Ch], edx
mov	eax, 1

loc_7E368A:
mov	esp, ebp
pop	ebp
retn
sub_7E3530 endp

align 10h


; Attributes: bp-based frame

sub_7E3690 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_8], eax
jmp	short loc_7E36B5

loc_7E36AC:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx

loc_7E36B5:
mov	edx, [ebp+var_8]
movsx	eax, byte ptr [edx]
test	eax, eax
jz	loc_7E37FC
mov	ecx, [ebp+var_8]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Ah
jnz	loc_7E37F7
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_C], ecx
jmp	short loc_7E36E5

loc_7E36DC:
mov	edx, [ebp+var_C]
add	edx, 1
mov	[ebp+var_C], edx

loc_7E36E5:
mov	eax, [ebp+var_C]
cmp	eax, [ebp+var_8]
jz	short loc_7E374C
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [ecx+5Ch]
cmp	eax, [edx+58h]
jnz	short loc_7E371A
mov	ecx, [ebp+var_4]
add	ecx, 50h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E371A
mov	[ebp+var_14], 0
jmp	short loc_7E373D

loc_7E371A:
mov	eax, [ebp+var_4]
mov	ecx, [eax+5Ch]
mov	edx, [ebp+var_C]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_4]
mov	edx, [ecx+5Ch]
add	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+5Ch], edx
mov	[ebp+var_14], 1

loc_7E373D:
cmp	[ebp+var_14], 0
jnz	short loc_7E374A
xor	eax, eax
jmp	loc_7E3801

loc_7E374A:
jmp	short loc_7E36DC

loc_7E374C:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [ecx+5Ch]
cmp	eax, [edx+58h]
jnz	short loc_7E3779
mov	ecx, [ebp+var_4]
add	ecx, 50h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E3779
mov	[ebp+var_18], 0
jmp	short loc_7E3798

loc_7E3779:
mov	eax, [ebp+var_4]
mov	ecx, [eax+5Ch]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_4]
mov	eax, [edx+5Ch]
add	eax, 1
mov	ecx, [ebp+var_4]
mov	[ecx+5Ch], eax
mov	[ebp+var_18], 1

loc_7E3798:
cmp	[ebp+var_18], 0
jnz	short loc_7E37A2
xor	eax, eax
jmp	short loc_7E3801

loc_7E37A2:		; size_t
push	8
mov	edx, [ebp+var_4]
mov	eax, [edx+60h]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7E37C7
xor	eax, eax
jmp	short loc_7E3801

loc_7E37C7:
mov	edx, [ebp+var_10]
mov	eax, [ebp+var_4]
mov	ecx, [edx]
cmp	ecx, [eax+60h]
jnz	short loc_7E37E2
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [eax+5Ch]
mov	[edx+60h], ecx
jmp	short loc_7E37EE

loc_7E37E2:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [eax+60h]
mov	[edx+5Ch], ecx

loc_7E37EE:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_10]
mov	[edx+4], eax

loc_7E37F7:
jmp	loc_7E36AC

loc_7E37FC:
mov	eax, 1

loc_7E3801:
mov	esp, ebp
pop	ebp
retn
sub_7E3690 endp

align 10h


; Attributes: bp-based frame

sub_7E3810 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_8]
mov	ecx, [edx+5Ch]
cmp	ecx, [eax+58h]
jnz	short loc_7E384F
mov	edx, [ebp+var_8]
add	edx, 50h
push	edx
call	sub_7E5040
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_7E384F
mov	[ebp+var_18], 0
jmp	short loc_7E386E

loc_7E384F:
mov	ecx, [ebp+var_8]
mov	edx, [ecx+5Ch]
mov	byte ptr [edx],	0
mov	eax, [ebp+var_8]
mov	ecx, [eax+5Ch]
add	ecx, 1
mov	edx, [ebp+var_8]
mov	[edx+5Ch], ecx
mov	[ebp+var_18], 1

loc_7E386E:
cmp	[ebp+var_18], 0
jnz	short loc_7E387B
xor	eax, eax
jmp	loc_7E3B06

loc_7E387B:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_8]
add	eax, 50h
push	eax
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_7E38A6
xor	eax, eax
jmp	loc_7E3B06

loc_7E38A6:
mov	ecx, [ebp+var_C]
add	ecx, 1
mov	[ebp+var_C], ecx
push	0Ch		; size_t
mov	edx, [ebp+var_C]
push	edx		; int
mov	eax, [ebp+var_8]
add	eax, 28h
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7E38D4
xor	eax, eax
jmp	loc_7E3B06

loc_7E38D4:
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
cmp	edx, [ebp+var_C]
jz	short loc_7E38EF
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+60h]
mov	[eax+5Ch], edx
jmp	loc_7E3B03

loc_7E38EF:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_8]
mov	edx, [ecx+5Ch]
mov	[eax+60h], edx
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+0ECh]
test	ecx, ecx
jnz	short loc_7E390E
jmp	loc_7E3B03

loc_7E390E:
mov	edx, [ebp+var_C]
movsx	eax, byte ptr [edx]
cmp	eax, 78h
jnz	loc_7E39AD
mov	ecx, [ebp+var_C]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 6Dh
jnz	loc_7E39AD
mov	eax, [ebp+var_C]
movsx	ecx, byte ptr [eax+2]
cmp	ecx, 6Ch
jnz	short loc_7E39AD
mov	edx, [ebp+var_C]
movsx	eax, byte ptr [edx+3]
cmp	eax, 6Eh
jnz	short loc_7E39AD
mov	ecx, [ebp+var_C]
movsx	edx, byte ptr [ecx+4]
cmp	edx, 73h
jnz	short loc_7E39AD
mov	eax, [ebp+var_C]
movsx	ecx, byte ptr [eax+5]
test	ecx, ecx
jz	short loc_7E3968
mov	edx, [ebp+var_C]
movsx	eax, byte ptr [edx+5]
cmp	eax, 3Ah
jnz	short loc_7E39AD

loc_7E3968:
mov	ecx, [ebp+var_C]
movsx	edx, byte ptr [ecx+5]
test	edx, edx
jnz	short loc_7E3983
mov	eax, [ebp+var_8]
add	eax, 98h
mov	ecx, [ebp+var_4]
mov	[ecx+4], eax
jmp	short loc_7E39A1

loc_7E3983:		; size_t
push	8
mov	edx, [ebp+var_C]
add	edx, 6
push	edx		; int
mov	eax, [ebp+var_8]
add	eax, 3Ch
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	ecx, [ebp+var_4]
mov	[ecx+4], eax

loc_7E39A1:
mov	edx, [ebp+var_4]
mov	byte ptr [edx+9], 1
jmp	loc_7E3B03

loc_7E39AD:
mov	[ebp+var_10], 0
jmp	short loc_7E39BF

loc_7E39B6:
mov	eax, [ebp+var_10]
add	eax, 1
mov	[ebp+var_10], eax

loc_7E39BF:
mov	ecx, [ebp+var_C]
add	ecx, [ebp+var_10]
movsx	edx, byte ptr [ecx]
test	edx, edx
jz	loc_7E3B03
mov	eax, [ebp+var_C]
add	eax, [ebp+var_10]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Ah
jnz	loc_7E3AFE
mov	[ebp+var_14], 0
jmp	short loc_7E39F4

loc_7E39EB:
mov	edx, [ebp+var_14]
add	edx, 1
mov	[ebp+var_14], edx

loc_7E39F4:
mov	eax, [ebp+var_14]
cmp	eax, [ebp+var_10]
jge	short loc_7E3A5E
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	eax, [ecx+5Ch]
cmp	eax, [edx+58h]
jnz	short loc_7E3A29
mov	ecx, [ebp+var_8]
add	ecx, 50h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E3A29
mov	[ebp+var_1C], 0
jmp	short loc_7E3A4F

loc_7E3A29:
mov	eax, [ebp+var_8]
mov	ecx, [eax+5Ch]
mov	edx, [ebp+var_C]
add	edx, [ebp+var_14]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+var_8]
mov	edx, [ecx+5Ch]
add	edx, 1
mov	eax, [ebp+var_8]
mov	[eax+5Ch], edx
mov	[ebp+var_1C], 1

loc_7E3A4F:
cmp	[ebp+var_1C], 0
jnz	short loc_7E3A5C
xor	eax, eax
jmp	loc_7E3B06

loc_7E3A5C:
jmp	short loc_7E39EB

loc_7E3A5E:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	eax, [ecx+5Ch]
cmp	eax, [edx+58h]
jnz	short loc_7E3A8B
mov	ecx, [ebp+var_8]
add	ecx, 50h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E3A8B
mov	[ebp+var_20], 0
jmp	short loc_7E3AAA

loc_7E3A8B:
mov	eax, [ebp+var_8]
mov	ecx, [eax+5Ch]
mov	byte ptr [ecx],	0
mov	edx, [ebp+var_8]
mov	eax, [edx+5Ch]
add	eax, 1
mov	ecx, [ebp+var_8]
mov	[ecx+5Ch], eax
mov	[ebp+var_20], 1

loc_7E3AAA:
cmp	[ebp+var_20], 0
jnz	short loc_7E3AB4
xor	eax, eax
jmp	short loc_7E3B06

loc_7E3AB4:		; size_t
push	8
mov	edx, [ebp+var_8]
mov	eax, [edx+60h]
push	eax		; int
mov	ecx, [ebp+var_8]
add	ecx, 3Ch
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	edx, [ebp+var_4]
mov	[edx+4], eax
mov	eax, [ebp+var_4]
mov	ecx, [eax+4]
mov	edx, [ebp+var_8]
mov	eax, [ecx]
cmp	eax, [edx+60h]
jnz	short loc_7E3AF0
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	eax, [edx+5Ch]
mov	[ecx+60h], eax
jmp	short loc_7E3AFC

loc_7E3AF0:
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_8]
mov	eax, [edx+60h]
mov	[ecx+5Ch], eax

loc_7E3AFC:
jmp	short loc_7E3B03

loc_7E3AFE:
jmp	loc_7E39B6

loc_7E3B03:
mov	eax, [ebp+var_4]

loc_7E3B06:
mov	esp, ebp
pop	ebp
retn
sub_7E3810 endp

align 10h


; Attributes: bp-based frame

sub_7E3B10 proc	near

var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_1= byte ptr	-1
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 54h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_10], ecx
mov	[ebp+var_1], 0
mov	edx, [ebp+var_10]
cmp	dword ptr [edx+9Ch], 0
jz	loc_7E3C68
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E3B6B
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E3B6B
mov	[ebp+var_34], 0
jmp	short loc_7E3B93

loc_7E3B6B:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	byte ptr [eax],	3Dh
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_34], 1

loc_7E3B93:
cmp	[ebp+var_34], 0
jnz	short loc_7E3BA0
xor	eax, eax
jmp	loc_7E407F

loc_7E3BA0:
mov	ecx, [ebp+var_10]
mov	edx, [ecx+9Ch]
mov	eax, [edx+14h]
mov	[ebp+var_18], eax
mov	ecx, [ebp+arg_0]
movsx	edx, byte ptr [ecx+1D8h]
test	edx, edx
jz	short loc_7E3BC6
mov	eax, [ebp+var_18]
sub	eax, 1
mov	[ebp+var_18], eax

loc_7E3BC6:
mov	[ebp+var_14], 0
jmp	short loc_7E3BD8

loc_7E3BCF:
mov	ecx, [ebp+var_14]
add	ecx, 1
mov	[ebp+var_14], ecx

loc_7E3BD8:
mov	edx, [ebp+var_14]
cmp	edx, [ebp+var_18]
jge	loc_7E3C64
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E3C19
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E3C19
mov	[ebp+var_38], 0
jmp	short loc_7E3C52

loc_7E3C19:
mov	edx, [ebp+var_10]
mov	eax, [edx+9Ch]
mov	ecx, [eax+10h]
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	edx, [ebp+var_14]
mov	cl, [ecx+edx]
mov	[eax], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1ACh], eax
mov	[ebp+var_38], 1

loc_7E3C52:
cmp	[ebp+var_38], 0
jnz	short loc_7E3C5F
xor	eax, eax
jmp	loc_7E407F

loc_7E3C5F:
jmp	loc_7E3BCF

loc_7E3C64:
mov	[ebp+var_1], 1

loc_7E3C68:
mov	edx, [ebp+var_10]
add	edx, 3Ch
push	edx
lea	eax, [ebp+var_C]
push	eax
call	sub_7E4CA0
add	esp, 8

loc_7E3C7B:
lea	ecx, [ebp+var_C]
push	ecx
call	sub_7E4CD0
add	esp, 4
mov	[ebp+var_20], eax
cmp	[ebp+var_20], 0
jnz	short loc_7E3C95
jmp	loc_7E3ED3

loc_7E3C95:
mov	edx, [ebp+var_20]
cmp	dword ptr [edx+4], 0
jnz	short loc_7E3CA0
jmp	short loc_7E3C7B

loc_7E3CA0:
movzx	eax, [ebp+var_1]
test	eax, eax
jz	short loc_7E3D13
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1ACh]
cmp	eax, [edx+1A8h]
jnz	short loc_7E3CDE
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E3CDE
mov	[ebp+var_3C], 0
jmp	short loc_7E3D06

loc_7E3CDE:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	byte ptr [ecx],	0Ch
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1ACh], eax
mov	[ebp+var_3C], 1

loc_7E3D06:
cmp	[ebp+var_3C], 0
jnz	short loc_7E3D13
xor	eax, eax
jmp	loc_7E407F

loc_7E3D13:
mov	edx, [ebp+var_20]
mov	eax, [edx]
mov	[ebp+var_24], eax
jmp	short loc_7E3D26

loc_7E3D1D:
mov	ecx, [ebp+var_24]
add	ecx, 1
mov	[ebp+var_24], ecx

loc_7E3D26:
mov	edx, [ebp+var_24]
movsx	eax, byte ptr [edx]
test	eax, eax
jz	short loc_7E3DA4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1ACh]
cmp	eax, [edx+1A8h]
jnz	short loc_7E3D66
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E3D66
mov	[ebp+var_40], 0
jmp	short loc_7E3D92

loc_7E3D66:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	edx, [ebp+var_24]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_40], 1

loc_7E3D92:
cmp	[ebp+var_40], 0
jnz	short loc_7E3D9F
xor	eax, eax
jmp	loc_7E407F

loc_7E3D9F:
jmp	loc_7E3D1D

loc_7E3DA4:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1ACh]
cmp	eax, [edx+1A8h]
jnz	short loc_7E3DDA
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E3DDA
mov	[ebp+var_44], 0
jmp	short loc_7E3E02

loc_7E3DDA:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	byte ptr [ecx],	3Dh
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+1ACh], eax
mov	[ebp+var_44], 1

loc_7E3E02:
cmp	[ebp+var_44], 0
jnz	short loc_7E3E0F
xor	eax, eax
jmp	loc_7E407F

loc_7E3E0F:
mov	edx, [ebp+var_20]
mov	eax, [edx+4]
mov	ecx, [eax+14h]
mov	[ebp+var_28], ecx
mov	edx, [ebp+arg_0]
movsx	eax, byte ptr [edx+1D8h]
test	eax, eax
jz	short loc_7E3E32
mov	ecx, [ebp+var_28]
sub	ecx, 1
mov	[ebp+var_28], ecx

loc_7E3E32:
mov	[ebp+var_1C], 0
jmp	short loc_7E3E44

loc_7E3E3B:
mov	edx, [ebp+var_1C]
add	edx, 1
mov	[ebp+var_1C], edx

loc_7E3E44:
mov	eax, [ebp+var_1C]
cmp	eax, [ebp+var_28]
jge	short loc_7E3ECA
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1ACh]
cmp	eax, [edx+1A8h]
jnz	short loc_7E3E82
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E3E82
mov	[ebp+var_48], 0
jmp	short loc_7E3EB8

loc_7E3E82:
mov	eax, [ebp+var_20]
mov	ecx, [eax+4]
mov	edx, [ecx+10h]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	eax, [ebp+var_1C]
mov	dl, [edx+eax]
mov	[ecx], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+1ACh], ecx
mov	[ebp+var_48], 1

loc_7E3EB8:
cmp	[ebp+var_48], 0
jnz	short loc_7E3EC5
xor	eax, eax
jmp	loc_7E407F

loc_7E3EC5:
jmp	loc_7E3E3B

loc_7E3ECA:
mov	[ebp+var_1], 1
jmp	loc_7E3C7B

loc_7E3ED3:
mov	eax, [ebp+var_10]
push	eax
lea	ecx, [ebp+var_C]
push	ecx
call	sub_7E4CA0
add	esp, 8

loc_7E3EE3:
lea	edx, [ebp+var_C]
push	edx
call	sub_7E4CD0
add	esp, 4
mov	[ebp+var_30], eax
cmp	[ebp+var_30], 0
jnz	short loc_7E3EFD
jmp	loc_7E400F

loc_7E3EFD:
mov	eax, [ebp+var_30]
movzx	ecx, byte ptr [eax+20h]
test	ecx, ecx
jnz	short loc_7E3F0A
jmp	short loc_7E3EE3

loc_7E3F0A:
movzx	edx, [ebp+var_1]
test	edx, edx
jz	short loc_7E3F7C
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E3F47
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E3F47
mov	[ebp+var_4C], 0
jmp	short loc_7E3F6F

loc_7E3F47:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	byte ptr [eax],	0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_4C], 1

loc_7E3F6F:
cmp	[ebp+var_4C], 0
jnz	short loc_7E3F7C
xor	eax, eax
jmp	loc_7E407F

loc_7E3F7C:
mov	ecx, [ebp+var_30]
mov	edx, [ecx]
mov	[ebp+var_2C], edx
jmp	short loc_7E3F8F

loc_7E3F86:
mov	eax, [ebp+var_2C]
add	eax, 1
mov	[ebp+var_2C], eax

loc_7E3F8F:
mov	ecx, [ebp+var_2C]
movsx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_7E4006
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E3FCE
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E3FCE
mov	[ebp+var_50], 0
jmp	short loc_7E3FFA

loc_7E3FCE:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	ecx, [ebp+var_2C]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+1ACh], ecx
mov	[ebp+var_50], 1

loc_7E3FFA:
cmp	[ebp+var_50], 0
jnz	short loc_7E4004
xor	eax, eax
jmp	short loc_7E407F

loc_7E4004:
jmp	short loc_7E3F86

loc_7E4006:
mov	[ebp+var_1], 1
jmp	loc_7E3EE3

loc_7E400F:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E4044
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E4044
mov	[ebp+var_54], 0
jmp	short loc_7E406C

loc_7E4044:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	byte ptr [eax],	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_54], 1

loc_7E406C:
cmp	[ebp+var_54], 0
jnz	short loc_7E4076
xor	eax, eax
jmp	short loc_7E407F

loc_7E4076:
mov	ecx, [ebp+arg_0]
mov	eax, [ecx+1B0h]

loc_7E407F:
mov	esp, ebp
pop	ebp
retn
sub_7E3B10 endp

align 10h


; Attributes: bp-based frame

sub_7E4090 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+arg_4]
mov	[ebp+var_4], edx

loc_7E40A8:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	loc_7E4483
mov	edx, [ebp+var_4]
movsx	eax, byte ptr [edx]
cmp	eax, 0Ch
jz	short loc_7E40CF
mov	ecx, [ebp+var_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	loc_7E4191

loc_7E40CF:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E4104
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E4104
mov	[ebp+var_14], 0
jmp	short loc_7E412C

loc_7E4104:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	byte ptr [eax],	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_14], 1

loc_7E412C:
cmp	[ebp+var_14], 0
jnz	short loc_7E4139
xor	al, al
jmp	loc_7E4485

loc_7E4139:		; size_t
push	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
push	edx		; int
mov	eax, [ebp+var_8]
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jz	short loc_7E4161
mov	ecx, [ebp+var_C]
mov	byte ptr [ecx+20h], 1

loc_7E4161:
mov	edx, [ebp+var_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jz	short loc_7E4174
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7E4174:
mov	edx, [ebp+var_4]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
mov	[eax+1ACh], edx
jmp	loc_7E447E

loc_7E4191:
mov	eax, [ebp+var_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Dh
jnz	loc_7E4409
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+1ACh]
sub	ecx, [eax+1B0h]
jnz	short loc_7E41C5
mov	edx, [ebp+var_8]
add	edx, 98h
mov	[ebp+var_10], edx
jmp	loc_7E42A5

loc_7E41C5:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E41FA
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E41FA
mov	[ebp+var_18], 0
jmp	short loc_7E4222

loc_7E41FA:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	byte ptr [eax],	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_18], 1

loc_7E4222:
cmp	[ebp+var_18], 0
jnz	short loc_7E422F
xor	al, al
jmp	loc_7E4485

loc_7E422F:		; size_t
push	8
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
push	edx		; int
mov	eax, [ebp+var_8]
add	eax, 3Ch
push	eax		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7E425A
xor	al, al
jmp	loc_7E4485

loc_7E425A:
mov	ecx, [ebp+var_10]
mov	edx, [ebp+arg_0]
mov	eax, [ecx]
cmp	eax, [edx+1B0h]
jnz	short loc_7E4293
mov	ecx, [ebp+var_10]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_8]
add	eax, 50h
push	eax
call	sub_7E4EC0
add	esp, 8
mov	ecx, [ebp+var_10]
mov	[ecx], eax
mov	edx, [ebp+var_10]
cmp	dword ptr [edx], 0
jnz	short loc_7E4293
xor	al, al
jmp	loc_7E4485

loc_7E4293:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
mov	[eax+1ACh], edx

loc_7E42A5:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	short loc_7E42B9

loc_7E42B0:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E42B9:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 0Ch
jz	short loc_7E4341
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jz	short loc_7E4341
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E4303
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E4303
mov	[ebp+var_1C], 0
jmp	short loc_7E432F

loc_7E4303:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+1ACh], ecx
mov	[ebp+var_1C], 1

loc_7E432F:
cmp	[ebp+var_1C], 0
jnz	short loc_7E433C
xor	al, al
jmp	loc_7E4485

loc_7E433C:
jmp	loc_7E42B0

loc_7E4341:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+1ACh]
cmp	edx, [ecx+1A8h]
jnz	short loc_7E4376
mov	eax, [ebp+arg_0]
add	eax, 1A0h
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E4376
mov	[ebp+var_20], 0
jmp	short loc_7E439E

loc_7E4376:
mov	edx, [ebp+arg_0]
mov	eax, [edx+1ACh]
mov	byte ptr [eax],	0
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_20], 1

loc_7E439E:
cmp	[ebp+var_20], 0
jnz	short loc_7E43AB
xor	al, al
jmp	loc_7E4485

loc_7E43AB:
mov	ecx, [ebp+arg_0]
add	ecx, 174h
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+1B0h]
push	eax
push	0
mov	ecx, [ebp+var_10]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7DEBF0
add	esp, 14h
test	eax, eax
jz	short loc_7E43DC
xor	al, al
jmp	loc_7E4485

loc_7E43DC:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1B0h]
mov	[eax+1ACh], edx
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_7E4401
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E4401:
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
jmp	short loc_7E447E

loc_7E4409:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+1ACh]
cmp	eax, [edx+1A8h]
jnz	short loc_7E443F
mov	ecx, [ebp+arg_0]
add	ecx, 1A0h
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E443F
mov	[ebp+var_24], 0
jmp	short loc_7E446B

loc_7E443F:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1ACh]
mov	edx, [ebp+var_4]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+1ACh]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+1ACh], edx
mov	[ebp+var_24], 1

loc_7E446B:
cmp	[ebp+var_24], 0
jnz	short loc_7E4475
xor	al, al
jmp	short loc_7E4485

loc_7E4475:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7E447E:
jmp	loc_7E40A8

loc_7E4483:
mov	al, 1

loc_7E4485:
mov	esp, ebp
pop	ebp
retn
sub_7E4090 endp

align 10h


; Attributes: bp-based frame

sub_7E4490 proc	near

var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_0]
mov	[ebp+var_8], ecx
jmp	short loc_7E44AD

loc_7E44A4:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_7E44AD:
mov	eax, [ebp+var_8]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_7E450D
mov	edx, [ebp+var_8]
mov	al, [edx]
mov	[ebp+var_C], al
cmp	[ebp+var_C], 0Ah
jz	short loc_7E44D3
cmp	[ebp+var_C], 0Dh
jz	short loc_7E44D3
cmp	[ebp+var_C], 20h
jz	short loc_7E44D3
jmp	short loc_7E44F8

loc_7E44D3:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jz	short loc_7E44F6
mov	edx, [ebp+var_4]
movsx	eax, byte ptr [edx-1]
cmp	eax, 20h
jz	short loc_7E44F6
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx],	20h
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_7E44F6:
jmp	short loc_7E450B

loc_7E44F8:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_7E450B:
jmp	short loc_7E44A4

loc_7E450D:
mov	ecx, [ebp+var_4]
cmp	ecx, [ebp+arg_0]
jz	short loc_7E452A
mov	edx, [ebp+var_4]
movsx	eax, byte ptr [edx-1]
cmp	eax, 20h
jnz	short loc_7E452A
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_7E452A:
mov	edx, [ebp+var_4]
mov	byte ptr [edx],	0
mov	esp, ebp
pop	ebp
retn
sub_7E4490 endp

align 10h


; Attributes: bp-based frame

sub_7E4540 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
push	0BCh
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
call	ecx
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jnz	short loc_7E4564
mov	eax, [ebp+var_4]
jmp	loc_7E4686

loc_7E4564:
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
add	eax, 50h
push	eax
call	sub_7E4D10
add	esp, 8
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4]
add	edx, 68h
push	edx
call	sub_7E4D10
add	esp, 8
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
push	ecx
call	sub_7E4C60
add	esp, 8
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+var_4]
add	eax, 14h
push	eax
call	sub_7E4C60
add	esp, 8
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+var_4]
add	edx, 28h
push	edx
call	sub_7E4C60
add	esp, 8
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 3Ch
push	ecx
call	sub_7E4C60
add	esp, 8
mov	edx, [ebp+var_4]
mov	byte ptr [edx+83h], 0
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+var_4]
add	ecx, 84h
push	ecx
call	sub_7E4C60
add	esp, 8
mov	edx, [ebp+var_4]
mov	dword ptr [edx+98h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+9Ch], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+0A0h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0B8h], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0A4h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0B4h], 0
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0ACh], 0
mov	eax, [ebp+var_4]
mov	dword ptr [eax+0B0h], 0
mov	ecx, [ebp+var_4]
mov	dword ptr [ecx+0A8h], 0
mov	edx, [ebp+var_4]
mov	byte ptr [edx+80h], 1
mov	eax, [ebp+var_4]
mov	byte ptr [eax+81h], 0
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+82h], 0
mov	eax, [ebp+var_4]

loc_7E4686:
mov	esp, ebp
pop	ebp
retn
sub_7E4540 endp

align 10h


; Attributes: bp-based frame

sub_7E4690 proc	near

var_C= dword ptr -0Ch
var_8= byte ptr	-8
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
add	eax, 14h
push	eax
lea	ecx, [ebp+var_8]
push	ecx
call	sub_7E4CA0
add	esp, 8

loc_7E46A9:
lea	edx, [ebp+var_8]
push	edx
call	sub_7E4CD0
add	esp, 4
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_7E46C0
jmp	short loc_7E46DD

loc_7E46C0:
mov	eax, [ebp+var_C]
cmp	dword ptr [eax+10h], 0
jz	short loc_7E46DB
mov	ecx, [ebp+var_C]
mov	edx, [ecx+14h]
push	edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+8]
call	ecx
add	esp, 4

loc_7E46DB:
jmp	short loc_7E46A9

loc_7E46DD:
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E4C00
add	esp, 4
mov	eax, [ebp+arg_0]
add	eax, 84h
push	eax
call	sub_7E4C00
add	esp, 4
mov	ecx, [ebp+arg_0]
add	ecx, 14h
push	ecx
call	sub_7E4C00
add	esp, 4
mov	edx, [ebp+arg_0]
add	edx, 28h
push	edx
call	sub_7E4C00
add	esp, 4
mov	eax, [ebp+arg_0]
add	eax, 3Ch
push	eax
call	sub_7E4C00
add	esp, 4
mov	ecx, [ebp+arg_0]
add	ecx, 50h
push	ecx
call	sub_7E4DD0
add	esp, 4
mov	edx, [ebp+arg_0]
add	edx, 68h
push	edx
call	sub_7E4DD0
add	esp, 4
movzx	eax, [ebp+arg_4]
test	eax, eax
jz	short loc_7E4777
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0B8h]
push	edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+8]
call	ecx
add	esp, 4
mov	edx, [ebp+arg_0]
mov	eax, [edx+0A4h]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+8]
call	edx
add	esp, 4

loc_7E4777:
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+8]
call	edx
add	esp, 4
mov	esp, ebp
pop	ebp
retn
sub_7E4690 endp

align 10h


; Attributes: bp-based frame

; int __cdecl sub_7E4790(int, int, size_t)
sub_7E4790 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_25=	byte ptr -25h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
push	esi
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+8], 0
jnz	loc_7E4830
cmp	[ebp+arg_8], 0
jnz	short loc_7E47B1
xor	eax, eax
jmp	loc_7E4B75

loc_7E47B1:
mov	ecx, [ebp+arg_0]
mov	byte ptr [ecx+4], 6
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 40h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
shl	ecx, 2
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	edx, [ecx]
call	edx
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jnz	short loc_7E47FD
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+8], 0
xor	eax, eax
jmp	loc_7E4B75

loc_7E47FD:
mov	ecx, [ebp+var_8]
push	ecx		; size_t
push	0		; int
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, [ebp+arg_4]
push	ecx
call	sub_7E4BC0
add	esp, 4
mov	edx, [ebp+arg_0]
mov	ecx, [edx+8]
sub	ecx, 1
and	eax, ecx
mov	[ebp+var_4], eax
jmp	loc_7E4B03

loc_7E4830:
mov	edx, [ebp+arg_4]
push	edx
call	sub_7E4BC0
add	esp, 4
mov	[ebp+var_C], eax
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
sub	ecx, 1
mov	[ebp+var_10], ecx
mov	[ebp+var_11], 0
mov	edx, [ebp+var_C]
and	edx, [ebp+var_10]
mov	[ebp+var_4], edx

loc_7E4858:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
cmp	dword ptr [ecx+edx*4], 0
jz	loc_7E48FF
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*4]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
call	sub_7E4B80
add	esp, 8
movzx	eax, al
test	eax, eax
jz	short loc_7E489B
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	eax, [edx+eax*4]
jmp	loc_7E4B75

loc_7E489B:
movzx	ecx, [ebp+var_11]
test	ecx, ecx
jnz	short loc_7E48C5
mov	edx, [ebp+var_10]
not	edx
and	edx, [ebp+var_C]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+4]
sub	ecx, 1
shr	edx, cl
mov	ecx, [ebp+var_10]
shr	ecx, 2
and	edx, ecx
or	edx, 1
mov	[ebp+var_11], dl

loc_7E48C5:
movzx	edx, [ebp+var_11]
cmp	[ebp+var_4], edx
jnb	short loc_7E48E8
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
sub	edx, eax
add	edx, [ebp+var_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_34], eax
jmp	short loc_7E48FA

loc_7E48E8:
movzx	ecx, [ebp+var_11]
mov	edx, [ebp+var_4]
sub	edx, ecx
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_34], eax

loc_7E48FA:
jmp	loc_7E4858

loc_7E48FF:
cmp	[ebp+arg_8], 0
jnz	short loc_7E490C
xor	eax, eax
jmp	loc_7E4B75

loc_7E490C:
mov	ecx, [ebp+arg_0]
movzx	ecx, byte ptr [ecx+4]
sub	ecx, 1
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
shr	eax, cl
test	eax, eax
jz	loc_7E4B03
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+4]
add	edx, 1
mov	[ebp+var_25], dl
movzx	ecx, [ebp+var_25]
mov	eax, 1
shl	eax, cl
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 1
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_18]
shl	edx, 2
mov	[ebp+var_20], edx
mov	eax, [ebp+var_20]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	eax, [edx]
call	eax
add	esp, 4
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 0
jnz	short loc_7E4974
xor	eax, eax
jmp	loc_7E4B75

loc_7E4974:
mov	ecx, [ebp+var_20]
push	ecx		; size_t
push	0		; int
mov	edx, [ebp+var_24]
push	edx		; void *
call	_memset
add	esp, 0Ch
mov	[ebp+var_4], 0
jmp	short loc_7E4998

loc_7E498F:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_7E4998:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+8]
jnb	loc_7E4A5F
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
cmp	dword ptr [ecx+edx*4], 0
jz	loc_7E4A5A
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*4]
mov	ecx, [eax]
push	ecx
call	sub_7E4BC0
add	esp, 4
mov	[ebp+var_2C], eax
mov	edx, [ebp+var_2C]
and	edx, [ebp+var_1C]
mov	[ebp+var_30], edx
mov	[ebp+var_11], 0

loc_7E49DF:
mov	eax, [ebp+var_30]
mov	ecx, [ebp+var_24]
cmp	dword ptr [ecx+eax*4], 0
jz	short loc_7E4A46
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_7E4A12
mov	eax, [ebp+var_1C]
not	eax
and	eax, [ebp+var_2C]
movzx	ecx, [ebp+var_25]
sub	ecx, 1
shr	eax, cl
mov	ecx, [ebp+var_1C]
shr	ecx, 2
and	eax, ecx
or	eax, 1
mov	[ebp+var_11], al

loc_7E4A12:
movzx	edx, [ebp+var_11]
cmp	[ebp+var_30], edx
jnb	short loc_7E4A32
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+var_18]
sub	ecx, eax
add	ecx, [ebp+var_30]
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	[ebp+var_38], edx
jmp	short loc_7E4A44

loc_7E4A32:
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+var_30]
sub	ecx, eax
mov	[ebp+var_30], ecx
mov	edx, [ebp+var_30]
mov	[ebp+var_38], edx

loc_7E4A44:
jmp	short loc_7E49DF

loc_7E4A46:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_30]
mov	eax, [ebp+var_24]
mov	esi, [ebp+var_4]
mov	ecx, [ecx+esi*4]
mov	[eax+edx*4], ecx

loc_7E4A5A:
jmp	loc_7E498F

loc_7E4A5F:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	eax, [edx+8]
call	eax
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_24]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	cl, [ebp+var_25]
mov	[eax+4], cl
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_18]
mov	[edx+8], eax
mov	ecx, [ebp+var_C]
and	ecx, [ebp+var_1C]
mov	[ebp+var_4], ecx
mov	[ebp+var_11], 0

loc_7E4A9A:
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
cmp	dword ptr [eax+ecx*4], 0
jz	short loc_7E4B03
movzx	edx, [ebp+var_11]
test	edx, edx
jnz	short loc_7E4ACF
mov	eax, [ebp+var_1C]
not	eax
and	eax, [ebp+var_C]
movzx	ecx, [ebp+var_25]
sub	ecx, 1
shr	eax, cl
mov	ecx, [ebp+var_1C]
shr	ecx, 2
and	eax, ecx
or	eax, 1
mov	[ebp+var_11], al

loc_7E4ACF:
movzx	edx, [ebp+var_11]
cmp	[ebp+var_4], edx
jnb	short loc_7E4AEF
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+var_18]
sub	ecx, eax
add	ecx, [ebp+var_4]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_3C], edx
jmp	short loc_7E4B01

loc_7E4AEF:
movzx	eax, [ebp+var_11]
mov	ecx, [ebp+var_4]
sub	ecx, eax
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_3C], edx

loc_7E4B01:
jmp	short loc_7E4A9A

loc_7E4B03:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	eax, [edx]
call	eax
add	esp, 4
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	ecx, [ebp+var_4]
mov	[edx+ecx*4], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+var_4]
cmp	dword ptr [eax+ecx*4], 0
jnz	short loc_7E4B31
xor	eax, eax
jmp	short loc_7E4B75

loc_7E4B31:
mov	edx, [ebp+arg_8]
push	edx		; size_t
push	0		; int
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*4]
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+var_4]
mov	ecx, [edx+eax*4]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*4]

loc_7E4B75:
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_7E4790 endp

align 10h


; Attributes: bp-based frame

sub_7E4B80 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
jmp	short loc_7E4B97

loc_7E4B85:
mov	eax, [ebp+arg_0]
add	eax, 1
mov	[ebp+arg_0], eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E4B97:
mov	edx, [ebp+arg_0]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	eax, edx
jnz	short loc_7E4BB7
mov	eax, [ebp+arg_0]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7E4BB5
mov	al, 1
jmp	short loc_7E4BB9

loc_7E4BB5:
jmp	short loc_7E4B85

loc_7E4BB7:
xor	al, al

loc_7E4BB9:
pop	ebp
retn
sub_7E4B80 endp

align 10h


; Attributes: bp-based frame

sub_7E4BC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 0

loc_7E4BCB:
mov	eax, [ebp+arg_0]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_7E4BF4
mov	edx, [ebp+var_4]
imul	edx, 0F4243h
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax]
xor	edx, ecx
mov	[ebp+var_4], edx
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx
jmp	short loc_7E4BCB

loc_7E4BF4:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_7E4BC0 endp

align 10h


; Attributes: bp-based frame

sub_7E4C00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	[ebp+var_4], 0
jmp	short loc_7E4C16

loc_7E4C0D:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_7E4C16:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
cmp	edx, [ecx+8]
jnb	short loc_7E4C3D
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_4]
mov	eax, [ecx+edx*4]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	eax, [edx+8]
call	eax
add	esp, 4
jmp	short loc_7E4C0D

loc_7E4C3D:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	edx, [ecx+8]
call	edx
add	esp, 4
mov	esp, ebp
pop	ebp
retn
sub_7E4C00 endp

align 10h


; Attributes: bp-based frame

sub_7E4C60 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	byte ptr [eax+4], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
mov	[ecx+10h], edx
pop	ebp
retn
sub_7E4C60 endp

align 10h


; Attributes: bp-based frame

sub_7E4CA0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+8]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
lea	ecx, [eax+ecx*4]
mov	edx, [ebp+arg_0]
mov	[edx+4], ecx
pop	ebp
retn
sub_7E4CA0 endp

align 10h


; Attributes: bp-based frame

sub_7E4CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx

loc_7E4CD4:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
cmp	edx, [ecx+4]
jz	short loc_7E4D05
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 4
mov	edx, [ebp+arg_0]
mov	[edx], ecx
cmp	[ebp+var_4], 0
jz	short loc_7E4D03
mov	eax, [ebp+var_4]
jmp	short loc_7E4D07

loc_7E4D03:
jmp	short loc_7E4CD4

loc_7E4D05:
xor	eax, eax

loc_7E4D07:
mov	esp, ebp
pop	ebp
retn
sub_7E4CD0 endp

align 10h


; Attributes: bp-based frame

sub_7E4D10 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+4], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+10h], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+8], 0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
mov	[edx+14h], eax
pop	ebp
retn
sub_7E4D10 endp

align 10h


; Attributes: bp-based frame

sub_7E4D50 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jnz	short loc_7E4D6C
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx+4], eax
jmp	short loc_7E4D9E

loc_7E4D6C:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[ebp+var_4], edx

loc_7E4D74:
cmp	[ebp+var_4], 0
jz	short loc_7E4D9E
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_4]
mov	[edx+4], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_4], ecx
jmp	short loc_7E4D74

loc_7E4D9E:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+0Ch], 0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 0
mov	esp, ebp
pop	ebp
retn
sub_7E4D50 endp

align 10h


; Attributes: bp-based frame

sub_7E4DD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	[ebp+var_4], ecx

loc_7E4DDE:
cmp	[ebp+var_4], 0
jz	short loc_7E4E06
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [eax+8]
call	ecx
add	esp, 4
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
jmp	short loc_7E4DDE

loc_7E4E06:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[ebp+var_4], ecx

loc_7E4E0F:
cmp	[ebp+var_4], 0
jz	short loc_7E4E37
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	ecx, [eax+8]
call	ecx
add	esp, 4
mov	edx, [ebp+var_C]
mov	[ebp+var_4], edx
jmp	short loc_7E4E0F

loc_7E4E37:
mov	esp, ebp
pop	ebp
retn
sub_7E4DD0 endp

align 10h


; Attributes: bp-based frame

sub_7E4E40 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jnz	short loc_7E4E63
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E4E63
xor	eax, eax
jmp	short loc_7E4EB1

loc_7E4E63:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+8]
push	ecx
mov	edx, [ebp+arg_0]
add	edx, 0Ch
push	edx
mov	eax, [ebp+arg_C]
push	eax
lea	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 14h
mov	edx, [ebp+arg_8]
cmp	edx, [ebp+arg_C]
jnz	short loc_7E4E92
jmp	short loc_7E4EAB

loc_7E4E92:
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E4EA9
xor	eax, eax
jmp	short loc_7E4EB1

loc_7E4EA9:
jmp	short loc_7E4E63

loc_7E4EAB:
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]

loc_7E4EB1:
pop	ebp
retn
sub_7E4E40 endp

align 10h


; Attributes: bp-based frame

sub_7E4EC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx

loc_7E4EC4:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+0Ch]
cmp	edx, [ecx+8]
jnz	short loc_7E4EEE
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E5040
add	esp, 4
movzx	ecx, al
test	ecx, ecx
jnz	short loc_7E4EEE
mov	[ebp+var_4], 0
jmp	short loc_7E4F11

loc_7E4EEE:
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
mov	ecx, [ebp+arg_4]
mov	dl, [ecx]
mov	[eax], dl
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
add	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+0Ch], ecx
mov	[ebp+var_4], 1

loc_7E4F11:
cmp	[ebp+var_4], 0
jnz	short loc_7E4F1B
xor	eax, eax
jmp	short loc_7E4F46

loc_7E4F1B:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
test	ecx, ecx
jnz	short loc_7E4EC4
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	[edx+10h], ecx
mov	eax, [ebp+arg_4]

loc_7E4F46:
mov	esp, ebp
pop	ebp
retn
sub_7E4EC0 endp

align 10h


; Attributes: bp-based frame

sub_7E4F50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx

loc_7E4F54:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jz	short loc_7E4FC0
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+8]
jnz	short loc_7E4F88
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E5040
add	esp, 4
movzx	eax, al
test	eax, eax
jnz	short loc_7E4F88
mov	[ebp+var_4], 0
jmp	short loc_7E4FAB

loc_7E4F88:
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+0Ch]
mov	eax, [ebp+arg_4]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+0Ch], eax
mov	[ebp+var_4], 1

loc_7E4FAB:
cmp	[ebp+var_4], 0
jnz	short loc_7E4FB5
xor	eax, eax
jmp	short loc_7E4FC6

loc_7E4FB5:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	short loc_7E4F54

loc_7E4FC0:
mov	eax, [ebp+arg_0]
mov	eax, [eax+10h]

loc_7E4FC6:
mov	esp, ebp
pop	ebp
retn
sub_7E4F50 endp

align 10h


; Attributes: bp-based frame

sub_7E4FD0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E4E40
add	esp, 10h
test	eax, eax
jnz	short loc_7E4FF3
xor	eax, eax
jmp	short loc_7E5036

loc_7E4FF3:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+0Ch]
cmp	eax, [edx+8]
jnz	short loc_7E5018
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E5040
add	esp, 4
movzx	edx, al
test	edx, edx
jnz	short loc_7E5018
xor	eax, eax
jmp	short loc_7E5036

loc_7E5018:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
mov	byte ptr [ecx],	0
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]

loc_7E5036:
pop	ebp
retn
sub_7E4FD0 endp

align 10h


; Attributes: bp-based frame

sub_7E5040 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+4], 0
jz	loc_7E5165
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+10h], 0
jnz	short loc_7E50B5
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	[edx], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	dword ptr [ecx], 0
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 8
mov	ecx, [ebp+arg_0]
mov	[ecx+10h], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
add	edx, [eax+4]
mov	eax, [ebp+arg_0]
mov	[eax+8], edx
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx+0Ch], eax
mov	al, 1
jmp	loc_7E52DD

loc_7E50B5:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [ecx+8]
sub	eax, [edx+10h]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
cmp	eax, [edx+4]
jge	loc_7E5165
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ecx]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ebp+arg_0]
mov	eax, [edx]
mov	[ecx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_0]
mov	eax, [edx+4]
mov	[ecx], eax
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_4]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+8]
sub	edx, [ecx+10h]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 8
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	eax, [eax+0Ch]
sub	eax, [ecx+10h]
lea	ecx, [edx+eax+8]
mov	edx, [ebp+arg_0]
mov	[edx+0Ch], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 8
mov	edx, [ebp+arg_0]
mov	[edx+10h], ecx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
add	eax, [ecx+4]
mov	ecx, [ebp+arg_0]
mov	[ecx+8], eax
mov	al, 1
jmp	loc_7E52DD

loc_7E5165:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jz	loc_7E520D
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
add	ecx, 8
mov	edx, [ebp+arg_0]
cmp	[edx+10h], ecx
jnz	loc_7E520D
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_0]
mov	edx, [eax+8]
sub	edx, [ecx+10h]
shl	edx, 1
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
add	eax, 8
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	edx, [ecx+4]
call	edx
add	esp, 8
mov	ecx, [ebp+arg_0]
mov	[ecx], eax
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx], 0
jnz	short loc_7E51C5
xor	al, al
jmp	loc_7E52DD

loc_7E51C5:
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+var_8]
mov	[ecx+4], edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax]
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	edx, [edx+0Ch]
sub	edx, [eax+10h]
lea	eax, [ecx+edx+8]
mov	ecx, [ebp+arg_0]
mov	[ecx+0Ch], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx]
add	eax, 8
mov	ecx, [ebp+arg_0]
mov	[ecx+10h], eax
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
add	eax, [ebp+var_8]
mov	ecx, [ebp+arg_0]
mov	[ecx+8], eax
jmp	loc_7E52DB

loc_7E520D:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+8]
sub	ecx, [eax+10h]
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 400h
jge	short loc_7E522E
mov	[ebp+var_10], 400h
jmp	short loc_7E5236

loc_7E522E:
mov	edx, [ebp+var_10]
shl	edx, 1
mov	[ebp+var_10], edx

loc_7E5236:
mov	eax, [ebp+var_10]
add	eax, 8
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	eax, [edx]
call	eax
add	esp, 4
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_7E525A
xor	al, al
jmp	loc_7E52DD

loc_7E525A:
mov	ecx, [ebp+var_C]
mov	edx, [ebp+var_10]
mov	[ecx+4], edx
mov	eax, [ebp+var_C]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+0Ch]
cmp	ecx, [eax+10h]
jz	short loc_7E52A6
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+0Ch]
sub	ecx, [eax+10h]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
push	eax
mov	ecx, [ebp+var_C]
add	ecx, 8
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7E52A6:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_0]
mov	ecx, [edx+0Ch]
sub	ecx, [eax+10h]
mov	edx, [ebp+var_C]
lea	eax, [edx+ecx+8]
mov	ecx, [ebp+arg_0]
mov	[ecx+0Ch], eax
mov	edx, [ebp+var_C]
add	edx, 8
mov	eax, [ebp+arg_0]
mov	[eax+10h], edx
mov	ecx, [ebp+var_10]
mov	edx, [ebp+var_C]
lea	eax, [edx+ecx+8]
mov	ecx, [ebp+arg_0]
mov	[ecx+8], eax

loc_7E52DB:
mov	al, 1

loc_7E52DD:
mov	esp, ebp
pop	ebp
retn
sub_7E5040 endp

align 10h


; Attributes: bp-based frame

sub_7E52F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+0B8h], 0
jnz	short loc_7E5352
mov	eax, [ebp+arg_0]
mov	ecx, [eax+1D4h]
shl	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
call	eax
add	esp, 4
mov	ecx, [ebp+var_4]
mov	[ecx+0B8h], eax
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+0B8h], 0
jnz	short loc_7E5343
or	eax, 0FFFFFFFFh
jmp	loc_7E54D6

loc_7E5343:
mov	eax, [ebp+var_4]
mov	ecx, [eax+0B8h]
mov	dword ptr [ecx], 0

loc_7E5352:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	ecx, [edx+0B0h]
cmp	ecx, [eax+0ACh]
jb	loc_7E53FB
mov	edx, [ebp+var_4]
cmp	dword ptr [edx+0A4h], 0
jz	short loc_7E53C1
mov	eax, [ebp+var_4]
mov	ecx, [eax+0ACh]
shl	ecx, 1
imul	ecx, 1Ch
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+0A4h]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
call	edx
add	esp, 8
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7E53AB
or	eax, 0FFFFFFFFh
jmp	loc_7E54D6

loc_7E53AB:
mov	eax, [ebp+var_4]
mov	ecx, [eax+0ACh]
shl	ecx, 1
mov	edx, [ebp+var_4]
mov	[edx+0ACh], ecx
jmp	short loc_7E53EF

loc_7E53C1:
push	380h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 0
jnz	short loc_7E53E2
or	eax, 0FFFFFFFFh
jmp	loc_7E54D6

loc_7E53E2:
mov	edx, [ebp+var_4]
mov	dword ptr [edx+0ACh], 20h

loc_7E53EF:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_10]
mov	[eax+0A4h], ecx

loc_7E53FB:
mov	edx, [ebp+var_4]
mov	eax, [edx+0B0h]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0B0h]
add	edx, 1
mov	eax, [ebp+var_4]
mov	[eax+0B0h], edx
mov	ecx, [ebp+var_8]
imul	ecx, 1Ch
mov	edx, [ebp+var_4]
add	ecx, [edx+0A4h]
mov	[ebp+var_C], ecx
mov	eax, [ebp+var_4]
cmp	dword ptr [eax+0B4h], 0
jz	short loc_7E54AB
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0B4h]
mov	eax, [ebp+var_4]
mov	ecx, [eax+0B8h]
mov	edx, [ecx+edx*4-4]
imul	edx, 1Ch
mov	eax, [ebp+var_4]
add	edx, [eax+0A4h]
mov	[ebp+var_14], edx
mov	ecx, [ebp+var_14]
cmp	dword ptr [ecx+10h], 0
jz	short loc_7E5481
mov	edx, [ebp+var_14]
mov	eax, [edx+10h]
imul	eax, 1Ch
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0A4h]
mov	ecx, [ebp+var_8]
mov	[edx+eax+18h], ecx

loc_7E5481:
mov	edx, [ebp+var_14]
cmp	dword ptr [edx+14h], 0
jnz	short loc_7E5493
mov	eax, [ebp+var_14]
mov	ecx, [ebp+var_8]
mov	[eax+0Ch], ecx

loc_7E5493:
mov	edx, [ebp+var_14]
mov	eax, [ebp+var_8]
mov	[edx+10h], eax
mov	ecx, [ebp+var_14]
mov	edx, [ecx+14h]
add	edx, 1
mov	eax, [ebp+var_14]
mov	[eax+14h], edx

loc_7E54AB:
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+18h], 0
mov	edx, [ebp+var_C]
mov	dword ptr [edx+14h], 0
mov	eax, [ebp+var_C]
mov	dword ptr [eax+10h], 0
mov	ecx, [ebp+var_C]
mov	dword ptr [ecx+0Ch], 0
mov	eax, [ebp+var_8]

loc_7E54D6:
mov	esp, ebp
pop	ebp
retn
sub_7E52F0 endp

align 10h


; Attributes: bp-based frame

sub_7E54E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
mov	eax, [edx+0B0h]
imul	eax, 14h
mov	ecx, [ebp+var_8]
add	eax, [ecx+0A8h]
mov	[ebp+var_10], eax
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
call	ecx
add	esp, 4
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_7E5526
xor	eax, eax
jmp	short loc_7E555E

loc_7E5526:
mov	edx, [ebp+var_8]
mov	eax, [edx+0B0h]
imul	eax, 14h
add	eax, [ebp+var_C]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_C]
add	ecx, 14h
mov	[ebp+var_4], ecx
lea	edx, [ebp+var_14]
push	edx
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_C]
push	ecx
push	0
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E5570
add	esp, 14h
mov	eax, [ebp+var_C]

loc_7E555E:
mov	esp, ebp
pop	ebp
retn
sub_7E54E0 endp

align 10h


; Attributes: bp-based frame

sub_7E5570 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
imul	edx, 1Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0A4h]
mov	eax, [ebp+arg_8]
mov	ecx, [edx+ecx]
mov	[eax], ecx
mov	edx, [ebp+arg_4]
imul	edx, 1Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0A4h]
mov	eax, [ebp+arg_8]
mov	ecx, [ecx+edx+4]
mov	[eax+4], ecx
mov	edx, [ebp+arg_8]
cmp	dword ptr [edx], 4
jnz	short loc_7E5624
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_10]
mov	edx, [ecx]
mov	[eax+8], edx
mov	eax, [ebp+arg_4]
imul	eax, 1Ch
mov	ecx, [ebp+var_4]
mov	edx, [ecx+0A4h]
mov	eax, [edx+eax+8]
mov	[ebp+var_8], eax

loc_7E55DB:
mov	ecx, [ebp+arg_10]
mov	edx, [ecx]
mov	eax, [ebp+var_8]
mov	cl, [eax]
mov	[edx], cl
mov	edx, [ebp+arg_10]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_10]
mov	[ecx], eax
mov	edx, [ebp+var_8]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7E5600
jmp	short loc_7E560B

loc_7E5600:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
jmp	short loc_7E55DB

loc_7E560B:
mov	edx, [ebp+arg_8]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+arg_8]
mov	dword ptr [eax+10h], 0
jmp	loc_7E56D5

loc_7E5624:
mov	ecx, [ebp+arg_4]
imul	ecx, 1Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+0A4h]
mov	edx, [ebp+arg_8]
mov	eax, [eax+ecx+14h]
mov	[edx+0Ch], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[ecx+10h], eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+0Ch]
imul	edx, 14h
mov	eax, [ebp+arg_C]
add	edx, [eax]
mov	ecx, [ebp+arg_C]
mov	[ecx], edx
mov	[ebp+var_C], 0
mov	edx, [ebp+arg_4]
imul	edx, 1Ch
mov	eax, [ebp+var_4]
mov	ecx, [eax+0A4h]
mov	edx, [ecx+edx+0Ch]
mov	[ebp+var_10], edx
jmp	short loc_7E5699

loc_7E567A:
mov	eax, [ebp+var_C]
add	eax, 1
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
imul	ecx, 1Ch
mov	edx, [ebp+var_4]
mov	eax, [edx+0A4h]
mov	ecx, [eax+ecx+18h]
mov	[ebp+var_10], ecx

loc_7E5699:
mov	edx, [ebp+arg_8]
mov	eax, [ebp+var_C]
cmp	eax, [edx+0Ch]
jnb	short loc_7E56CB
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_C]
imul	eax, 14h
mov	ecx, [ebp+arg_8]
add	eax, [ecx+10h]
push	eax
mov	edx, [ebp+var_10]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E5570
add	esp, 14h
jmp	short loc_7E567A

loc_7E56CB:
mov	ecx, [ebp+arg_8]
mov	dword ptr [ecx+8], 0

loc_7E56D5:
mov	esp, ebp
pop	ebp
retn
sub_7E5570 endp

align 10h


; Attributes: bp-based frame

sub_7E56E0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
add	edx, 50h
push	edx
call	sub_7E4FD0
add	esp, 10h
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jnz	short loc_7E571A
xor	eax, eax
jmp	short loc_7E577B

loc_7E571A:		; size_t
push	18h
mov	eax, [ebp+var_8]
push	eax		; int
mov	ecx, [ebp+var_4]
add	ecx, 14h
push	ecx		; int
call	sub_7E4790
add	esp, 0Ch
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0
jnz	short loc_7E573C
xor	eax, eax
jmp	short loc_7E577B

loc_7E573C:
mov	edx, [ebp+var_C]
mov	eax, [edx]
cmp	eax, [ebp+var_8]
jz	short loc_7E5754
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [edx+60h]
mov	[ecx+5Ch], eax
jmp	short loc_7E5778

loc_7E5754:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_4]
mov	eax, [edx+5Ch]
mov	[ecx+60h], eax
mov	ecx, [ebp+var_C]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E3690
add	esp, 8
test	eax, eax
jnz	short loc_7E5778
xor	eax, eax
jmp	short loc_7E577B

loc_7E5778:
mov	eax, [ebp+var_C]

loc_7E577B:
mov	esp, ebp
pop	ebp
retn
sub_7E56E0 endp

align 10h


; Attributes: bp-based frame

sub_7E5780 proc	near

arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 2
and	ecx, 7
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 3
shl	ecx, 1
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
and	ecx, 1
add	edx, ecx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
pop	ebp
retn
sub_7E5780 endp

align 10h


; Attributes: bp-based frame

sub_7E57D0 proc	near

arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 0Fh
shl	ecx, 4
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
sar	eax, 2
and	eax, 0Fh
movzx	ecx, ds:byte_1457B10[ecx+eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
and	eax, 3
shl	eax, 1
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
sar	ecx, 5
and	ecx, 1
add	edx, ecx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
pop	ebp
retn
sub_7E57D0 endp

align 10h


; Attributes: bp-based frame

sub_7E5830 proc	near

arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 2
and	ecx, 7
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 3
shl	ecx, 1
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
and	ecx, 1
add	edx, ecx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
pop	ebp
retn
sub_7E5830 endp

align 10h


; Attributes: bp-based frame

sub_7E5880 proc	near

arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 0Fh
shl	ecx, 4
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
sar	eax, 2
and	eax, 0Fh
movzx	ecx, ds:byte_1457A10[ecx+eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
and	eax, 3
shl	eax, 1
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
sar	ecx, 5
and	ecx, 1
add	edx, ecx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
pop	ebp
retn
sub_7E5880 endp

align 10h


; Attributes: bp-based frame

sub_7E58E0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
cmp	ecx, 0C2h
jl	short loc_7E591E
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
and	eax, 80h
jz	short loc_7E591E
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
and	edx, 0C0h
cmp	edx, 0C0h
jz	short loc_7E591E
mov	[ebp+var_4], 0
jmp	short loc_7E5925

loc_7E591E:
mov	[ebp+var_4], 1

loc_7E5925:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_7E58E0 endp

align 10h


; Attributes: bp-based frame

sub_7E5930 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
and	ecx, 80h
jz	loc_7E5A61
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
cmp	eax, 0EFh
jnz	short loc_7E597C
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
cmp	edx, 0BFh
jnz	short loc_7E597C
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
xor	edx, edx
cmp	ecx, 0BDh
setnle	dl
mov	[ebp+var_4], edx
jmp	short loc_7E5997

loc_7E597C:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
and	ecx, 0C0h
xor	edx, edx
cmp	ecx, 0C0h
setz	dl
mov	[ebp+var_4], edx

loc_7E5997:
cmp	[ebp+var_4], 0
jnz	loc_7E5A61
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
cmp	ecx, 0E0h
jnz	short loc_7E59EA
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
cmp	eax, 0A0h
jl	short loc_7E59DB
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
and	edx, 0C0h
cmp	edx, 0C0h
jz	short loc_7E59DB
mov	[ebp+var_8], 0
jmp	short loc_7E59E2

loc_7E59DB:
mov	[ebp+var_8], 1

loc_7E59E2:
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
jmp	short loc_7E5A52

loc_7E59EA:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
and	edx, 80h
jz	short loc_7E5A45
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
cmp	ecx, 0EDh
jnz	short loc_7E5A1D
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
xor	ecx, ecx
cmp	eax, 9Fh
setnle	cl
mov	[ebp+var_10], ecx
jmp	short loc_7E5A36

loc_7E5A1D:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
and	eax, 0C0h
xor	ecx, ecx
cmp	eax, 0C0h
setz	cl
mov	[ebp+var_10], ecx

loc_7E5A36:
cmp	[ebp+var_10], 0
jnz	short loc_7E5A45
mov	[ebp+var_14], 0
jmp	short loc_7E5A4C

loc_7E5A45:
mov	[ebp+var_14], 1

loc_7E5A4C:
mov	edx, [ebp+var_14]
mov	[ebp+var_C], edx

loc_7E5A52:
cmp	[ebp+var_C], 0
jnz	short loc_7E5A61
mov	[ebp+var_18], 0
jmp	short loc_7E5A68

loc_7E5A61:
mov	[ebp+var_18], 1

loc_7E5A68:
mov	eax, [ebp+var_18]
mov	esp, ebp
pop	ebp
retn
sub_7E5930 endp

align 10h


; Attributes: bp-based frame

sub_7E5A70 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+3]
and	ecx, 80h
jz	loc_7E5B8E
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+3]
and	eax, 0C0h
cmp	eax, 0C0h
jz	loc_7E5B8E
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+2]
and	edx, 80h
jz	loc_7E5B8E
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
and	ecx, 0C0h
cmp	ecx, 0C0h
jz	loc_7E5B8E
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
cmp	eax, 0F0h
jnz	short loc_7E5B15
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
cmp	edx, 90h
jl	short loc_7E5B06
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 0C0h
cmp	ecx, 0C0h
jz	short loc_7E5B06
mov	[ebp+var_4], 0
jmp	short loc_7E5B0D

loc_7E5B06:
mov	[ebp+var_4], 1

loc_7E5B0D:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
jmp	short loc_7E5B7F

loc_7E5B15:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 80h
jz	short loc_7E5B72
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
cmp	eax, 0F4h
jnz	short loc_7E5B48
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
xor	eax, eax
cmp	edx, 8Fh
setnle	al
mov	[ebp+var_C], eax
jmp	short loc_7E5B63

loc_7E5B48:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
and	edx, 0C0h
xor	eax, eax
cmp	edx, 0C0h
setz	al
mov	[ebp+var_C], eax

loc_7E5B63:
cmp	[ebp+var_C], 0
jnz	short loc_7E5B72
mov	[ebp+var_10], 0
jmp	short loc_7E5B79

loc_7E5B72:
mov	[ebp+var_10], 1

loc_7E5B79:
mov	ecx, [ebp+var_10]
mov	[ebp+var_8], ecx

loc_7E5B7F:
cmp	[ebp+var_8], 0
jnz	short loc_7E5B8E
mov	[ebp+var_14], 0
jmp	short loc_7E5B95

loc_7E5B8E:
mov	[ebp+var_14], 1

loc_7E5B95:
mov	eax, [ebp+var_14]
mov	esp, ebp
pop	ebp
retn
sub_7E5A70 endp

align 10h


; Attributes: bp-based frame

sub_7E5BA0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E5BB8
mov	eax, 0FFFFFFFCh
jmp	loc_7E5EF6

loc_7E5BB8:
xor	ecx, ecx
jz	short loc_7E5BEA
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
and	eax, 0
jz	short loc_7E5BEA
mov	ecx, [ebp+var_4]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jnz	short loc_7E5BE1
or	eax, 0FFFFFFFFh
jmp	loc_7E5EF6

loc_7E5BE1:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_4]
mov	[ebp+arg_8], edx

loc_7E5BEA:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0Ah ; switch 11 cases
ja	loc_7E5DC8	; default
			; jumptable 007E5C08 cases 2,3
mov	ecx, [ebp+var_8]
jmp	ds:off_7E5EFC[ecx*4] ; switch jump

loc_7E5C0F:		; jumptable 007E5C08 case 4
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E5C28
or	eax, 0FFFFFFFFh
jmp	loc_7E5EF6

loc_7E5C28:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 5Dh
jz	short loc_7E5C38
jmp	loc_7E5DD1

loc_7E5C38:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E5C51
or	eax, 0FFFFFFFFh
jmp	loc_7E5EF6

loc_7E5C51:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 3Eh
jz	short loc_7E5C6A
mov	ecx, [ebp+arg_4]
sub	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_7E5DD1

loc_7E5C6A:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 28h
jmp	loc_7E5EF6

loc_7E5C7F:		; jumptable 007E5C08 case 9
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E5C98
or	eax, 0FFFFFFFFh
jmp	loc_7E5EF6

loc_7E5C98:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
cmp	eax, 0Ah
jnz	short loc_7E5CB4
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E5CB4:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 7
jmp	loc_7E5EF6

loc_7E5CC6:		; jumptable 007E5C08 case 10
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 7
jmp	loc_7E5EF6

loc_7E5CDB:		; jumptable 007E5C08 case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E5CF0
mov	eax, 0FFFFFFFEh
jmp	loc_7E5EF6

loc_7E5CF0:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E5D19
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E5EF6

loc_7E5D19:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E5DD1

loc_7E5D27:		; jumptable 007E5C08 case 6
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E5D3C
mov	eax, 0FFFFFFFEh
jmp	loc_7E5EF6

loc_7E5D3C:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E5D65
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E5EF6

loc_7E5D65:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7E5DD1

loc_7E5D70:		; jumptable 007E5C08 case 7
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E5D85
mov	eax, 0FFFFFFFEh
jmp	loc_7E5EF6

loc_7E5D85:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+16Ch]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E5DAE
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E5EF6

loc_7E5DAE:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E5DD1

loc_7E5DB9:		; jumptable 007E5C08 cases 0,1,8
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E5EF6

loc_7E5DC8:		; default
mov	edx, [ebp+arg_4] ; jumptable 007E5C08 cases 2,3
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E5DD1:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E5EE9
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0Ah ; switch 11 cases
ja	loc_7E5EDB	; default
			; jumptable 007E5E02 cases 2,3
mov	edx, [ebp+var_C]
movzx	eax, ds:byte_7E5F3C[edx]
jmp	ds:off_7E5F28[eax*4] ; switch jump

loc_7E5E09:		; jumptable 007E5E02 case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jl	short loc_7E5E2E
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+164h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E5E40

loc_7E5E2E:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7E5EF6

loc_7E5E40:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7E5EE4

loc_7E5E4E:		; jumptable 007E5E02 case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jl	short loc_7E5E73
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E5E82

loc_7E5E73:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	short loc_7E5EF6

loc_7E5E82:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7E5EE4

loc_7E5E8D:		; jumptable 007E5E02 case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jl	short loc_7E5EB2
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+16Ch]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E5EC1

loc_7E5EB2:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7E5EF6

loc_7E5EC1:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7E5EE4

loc_7E5ECC:		; jumptable 007E5E02 cases 0,1,4,8-10
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7E5EF6

loc_7E5EDB:		; default
mov	eax, [ebp+arg_4] ; jumptable 007E5E02 cases 2,3
add	eax, 1
mov	[ebp+arg_4], eax

loc_7E5EE4:
jmp	loc_7E5DD1

loc_7E5EE9:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7E5EF6:
mov	esp, ebp
pop	ebp
retn
sub_7E5BA0 endp

align 4
off_7E5EFC dd offset loc_7E5DB9	; jump table for switch	statement
dd offset loc_7E5DB9
dd offset loc_7E5DC8
dd offset loc_7E5DC8
dd offset loc_7E5C0F
dd offset loc_7E5CDB
dd offset loc_7E5D27
dd offset loc_7E5D70
dd offset loc_7E5DB9
dd offset loc_7E5C7F
dd offset loc_7E5CC6
off_7E5F28 dd offset loc_7E5ECC	; jump table for switch	statement
dd offset loc_7E5E09
dd offset loc_7E5E4E
dd offset loc_7E5E8D
dd offset loc_7E5EDB
byte_7E5F3C db	    0,	   0,	  4,	 4 ; indirect table for	switch statement
db	0,     1,     2,     3
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7E5F50 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E5F68
mov	eax, 0FFFFFFFCh
jmp	loc_7E6342

loc_7E5F68:
xor	ecx, ecx
jz	short loc_7E5F9A
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
and	eax, 0
jz	short loc_7E5F9A
mov	ecx, [ebp+var_4]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0
jnz	short loc_7E5F91
or	eax, 0FFFFFFFFh
jmp	loc_7E6342

loc_7E5F91:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_4]
mov	[ebp+arg_8], edx

loc_7E5F9A:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0Ah ; switch 11 cases
ja	loc_7E61B8	; default
mov	ecx, [ebp+var_8]
jmp	ds:off_7E6348[ecx*4] ; switch jump

loc_7E5FBF:		; jumptable 007E5FB8 case 2
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E6880
add	esp, 10h
jmp	loc_7E6342

loc_7E5FDF:		; jumptable 007E5FB8 case 3
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 1
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E63A0
add	esp, 10h
jmp	loc_7E6342

loc_7E5FFF:		; jumptable 007E5FB8 case 9
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E601A
mov	eax, 0FFFFFFFDh
jmp	loc_7E6342

loc_7E601A:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
cmp	eax, 0Ah
jnz	short loc_7E6036
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E6036:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 7
jmp	loc_7E6342

loc_7E6048:		; jumptable 007E5FB8 case 10
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 7
jmp	loc_7E6342

loc_7E605D:		; jumptable 007E5FB8 case 4
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E6078
mov	eax, 0FFFFFFFBh
jmp	loc_7E6342

loc_7E6078:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 5Dh
jz	short loc_7E6088
jmp	loc_7E61C1

loc_7E6088:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E60A3
mov	eax, 0FFFFFFFBh
jmp	loc_7E6342

loc_7E60A3:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Eh
jz	short loc_7E60BC
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E61C1

loc_7E60BC:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6342

loc_7E60CB:		; jumptable 007E5FB8 case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E60E0
mov	eax, 0FFFFFFFEh
jmp	loc_7E6342

loc_7E60E0:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+164h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E6109
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E6342

loc_7E6109:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E61C1

loc_7E6117:		; jumptable 007E5FB8 case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E612C
mov	eax, 0FFFFFFFEh
jmp	loc_7E6342

loc_7E612C:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E6155
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6342

loc_7E6155:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7E61C1

loc_7E6160:		; jumptable 007E5FB8 case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E6175
mov	eax, 0FFFFFFFEh
jmp	loc_7E6342

loc_7E6175:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+16Ch]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E619E
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6342

loc_7E619E:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7E61C1

loc_7E61A9:		; jumptable 007E5FB8 cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6342

loc_7E61B8:		; default
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E61C1:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7E6335
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0Ah ; switch 11 cases
ja	loc_7E6327	; default
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7E6388[ecx]
jmp	ds:off_7E6374[edx*4] ; switch jump

loc_7E61F9:		; jumptable 007E61F2 case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jl	short loc_7E621E
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+164h]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E6230

loc_7E621E:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	loc_7E6342

loc_7E6230:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E6330

loc_7E623E:		; jumptable 007E61F2 case 6
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jl	short loc_7E6263
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+168h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E6275

loc_7E6263:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7E6342

loc_7E6275:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7E6330

loc_7E6283:		; jumptable 007E61F2 case 7
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jl	short loc_7E62A8
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+16Ch]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E62BA

loc_7E62A8:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7E6342

loc_7E62BA:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E6330

loc_7E62C5:		; jumptable 007E61F2 case 4
mov	eax, [ebp+arg_4]
add	eax, 1
cmp	eax, [ebp+arg_8]
jz	short loc_7E6318 ; jumptable 007E61F2 cases 0-3,8-10
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 5Dh
jz	short loc_7E62E7
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	short loc_7E6330

loc_7E62E7:
mov	ecx, [ebp+arg_4]
add	ecx, 2
cmp	ecx, [ebp+arg_8]
jz	short loc_7E6318 ; jumptable 007E61F2 cases 0-3,8-10
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+2]
cmp	eax, 3Eh
jz	short loc_7E6309
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	short loc_7E6330

loc_7E6309:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
xor	eax, eax
jmp	short loc_7E6342

loc_7E6318:		; jumptable 007E61F2 cases 0-3,8-10
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7E6342

loc_7E6327:		; default
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax

loc_7E6330:
jmp	loc_7E61C1

loc_7E6335:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7E6342:
mov	esp, ebp
pop	ebp
retn
sub_7E5F50 endp

align 4
off_7E6348 dd offset loc_7E61A9	; jump table for switch	statement
dd offset loc_7E61A9
dd offset loc_7E5FBF
dd offset loc_7E5FDF
dd offset loc_7E605D
dd offset loc_7E60CB
dd offset loc_7E6117
dd offset loc_7E6160
dd offset loc_7E61A9
dd offset loc_7E5FFF
dd offset loc_7E6048
off_7E6374 dd offset loc_7E6318	; jump table for switch	statement
dd offset loc_7E62C5
dd offset loc_7E61F9
dd offset loc_7E623E
dd offset loc_7E6283
byte_7E6388 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	1,     2,     3,     4
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7E63A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E63B6
or	eax, 0FFFFFFFFh
jmp	loc_7E6680

loc_7E63B6:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 5
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 18h ; switch 25 cases
ja	loc_7E650F	; default
			; jumptable 007E63E4 cases 3-13,15,16,18,20-23
mov	eax, [ebp+var_4]
movzx	ecx, ds:byte_7E66A0[eax]
jmp	ds:off_7E6684[ecx*4] ; switch jump

loc_7E63EB:		; jumptable 007E63E4 case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E6403 ; jumptable 007E63E4 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6680

loc_7E6403:		; jumptable 007E63E4 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E651E

loc_7E6411:		; jumptable 007E63E4 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E6426
mov	eax, 0FFFFFFFEh
jmp	loc_7E6680

loc_7E6426:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+158h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E644F
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6680

loc_7E644F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E651E

loc_7E645D:		; jumptable 007E63E4 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E6472
mov	eax, 0FFFFFFFEh
jmp	loc_7E6680

loc_7E6472:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E649B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E6680

loc_7E649B:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7E651E

loc_7E64A6:		; jumptable 007E63E4 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E64BB
mov	eax, 0FFFFFFFEh
jmp	loc_7E6680

loc_7E64BB:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E64E4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6680

loc_7E64E4:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E651E

loc_7E64EF:		; jumptable 007E63E4 case 14
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 1
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E6700
add	esp, 10h
jmp	loc_7E6680

loc_7E650F:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E63E4 cases 3-13,15,16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E6680

loc_7E651E:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E667D
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
sub	edx, 5
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7E666C	; default
			; jumptable 007E6558 cases 3-12,14-16,18,23
mov	eax, [ebp+var_8]
movzx	ecx, ds:byte_7E66D8[eax]
jmp	ds:off_7E66BC[ecx*4] ; switch jump

loc_7E655F:		; jumptable 007E6558 case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E6577 ; jumptable 007E6558 cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6680

loc_7E6577:		; jumptable 007E6558 cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E6678

loc_7E6585:		; jumptable 007E6558 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E659A
mov	eax, 0FFFFFFFEh
jmp	loc_7E6680

loc_7E659A:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E65C3
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6680

loc_7E65C3:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E6678

loc_7E65D1:		; jumptable 007E6558 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E65E6
mov	eax, 0FFFFFFFEh
jmp	loc_7E6680

loc_7E65E6:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+150h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E660C
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E6680

loc_7E660C:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7E6678

loc_7E6617:		; jumptable 007E6558 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E6629
mov	eax, 0FFFFFFFEh
jmp	short loc_7E6680

loc_7E6629:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+154h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E664F
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7E6680

loc_7E664F:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E6678

loc_7E665A:		; jumptable 007E6558 case 13
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 9
jmp	short loc_7E6680

loc_7E666C:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E6558 cases 3-12,14-16,18,23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E6680

loc_7E6678:
jmp	loc_7E651E

loc_7E667D:
or	eax, 0FFFFFFFFh

loc_7E6680:
mov	esp, ebp
pop	ebp
retn
sub_7E63A0 endp

off_7E6684 dd offset loc_7E6411	; jump table for switch	statement
dd offset loc_7E645D
dd offset loc_7E64A6
dd offset loc_7E64EF
dd offset loc_7E6403
dd offset loc_7E63EB
dd offset loc_7E650F
byte_7E66A0 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     3,     6
db	6,     4,     6,     4
db	6,     6,     6,     6
db	5
align 4
off_7E66BC dd offset loc_7E6585	; jump table for switch	statement
dd offset loc_7E65D1
dd offset loc_7E6617
dd offset loc_7E665A
dd offset loc_7E6577
dd offset loc_7E655F
dd offset loc_7E666C
byte_7E66D8 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     3,     6,     6
db	6,     4,     6,     4
db	4,     4,     4,     6
db	5
align 10h


; Attributes: bp-based frame

sub_7E6700 proc	near

var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E67BF
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 78h
jnz	short loc_7E673D
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 1
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E67D0
add	esp, 10h
jmp	loc_7E67C2

loc_7E673D:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
mov	cl, [eax+edx+4Ch]
mov	[ebp+var_4], cl
cmp	[ebp+var_4], 19h
jz	short loc_7E6755
jmp	short loc_7E6757

loc_7E6755:
jmp	short loc_7E6763

loc_7E6757:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E67C2

loc_7E6763:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	short loc_7E6777

loc_7E676E:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E6777:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_7E67BF
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
mov	cl, [eax+edx+4Ch]
mov	[ebp+var_8], cl
cmp	[ebp+var_8], 12h
jz	short loc_7E679F
cmp	[ebp+var_8], 19h
jz	short loc_7E679D
jmp	short loc_7E67B1

loc_7E679D:
jmp	short loc_7E67BD

loc_7E679F:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 0Ah
jmp	short loc_7E67C2

loc_7E67B1:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E67C2

loc_7E67BD:
jmp	short loc_7E676E

loc_7E67BF:
or	eax, 0FFFFFFFFh

loc_7E67C2:
mov	esp, ebp
pop	ebp
retn
sub_7E6700 endp

align 10h


; Attributes: bp-based frame

sub_7E67D0 proc	near

var_8= byte ptr	-8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E6870
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
mov	cl, [eax+edx+4Ch]
mov	[ebp+var_4], cl
cmp	[ebp+var_4], 18h
jb	short loc_7E6802
cmp	[ebp+var_4], 19h
jbe	short loc_7E6800
jmp	short loc_7E6802

loc_7E6800:
jmp	short loc_7E680E

loc_7E6802:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E6873

loc_7E680E:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	short loc_7E6822

loc_7E6819:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E6822:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_7E6870
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
mov	cl, [eax+edx+4Ch]
mov	[ebp+var_8], cl
cmp	[ebp+var_8], 12h
jz	short loc_7E6850
cmp	[ebp+var_8], 17h
jbe	short loc_7E6862
cmp	[ebp+var_8], 19h
jbe	short loc_7E684E
jmp	short loc_7E6862

loc_7E684E:
jmp	short loc_7E686E

loc_7E6850:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 0Ah
jmp	short loc_7E6873

loc_7E6862:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E6873

loc_7E686E:
jmp	short loc_7E6819

loc_7E6870:
or	eax, 0FFFFFFFFh

loc_7E6873:
mov	esp, ebp
pop	ebp
retn
sub_7E67D0 endp

align 10h


; Attributes: bp-based frame

sub_7E6880 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E6896
or	eax, 0FFFFFFFFh
jmp	loc_7E6F76

loc_7E6896:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
sub	edx, 5
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7E6A9B	; default
			; jumptable 007E68C4 cases 3-9,13-16,18,20-23
mov	eax, [ebp+var_8]
movzx	ecx, ds:byte_7E6FA0[eax]
jmp	ds:off_7E6F7C[ecx*4] ; switch jump

loc_7E68CB:		; jumptable 007E68C4 case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E68E3 ; jumptable 007E68C4 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6F76

loc_7E68E3:		; jumptable 007E68C4 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E6AAA

loc_7E68F1:		; jumptable 007E68C4 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E6906
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6906:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+158h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E692F
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E692F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E6AAA

loc_7E693D:		; jumptable 007E68C4 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E6952
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6952:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E697B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E6F76

loc_7E697B:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7E6AAA

loc_7E6989:		; jumptable 007E68C4 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E699E
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E699E:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E69C7
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6F76

loc_7E69C7:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7E6AAA

loc_7E69D5:		; jumptable 007E68C4 case 11
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E69EE
or	eax, 0FFFFFFFFh
jmp	loc_7E6F76

loc_7E69EE:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+eax+4Ch]
mov	[ebp+var_C], dl
cmp	[ebp+var_C], 14h
jz	short loc_7E6A2C
cmp	[ebp+var_C], 1Bh
jz	short loc_7E6A0C
jmp	short loc_7E6A4C

loc_7E6A0C:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 1
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E7080
add	esp, 10h
jmp	loc_7E6F76

loc_7E6A2C:
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E78D0
add	esp, 10h
jmp	loc_7E6F76

loc_7E6A4C:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6A5B:		; jumptable 007E68C4 case 10
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E7290
add	esp, 10h
jmp	loc_7E6F76

loc_7E6A7B:		; jumptable 007E68C4 case 12
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E7940
add	esp, 10h
jmp	loc_7E6F76

loc_7E6A9B:		; default
mov	eax, [ebp+arg_C] ; jumptable 007E68C4 cases 3-9,13-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6AAA:
mov	[ebp+var_4], 0

loc_7E6AB1:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7E6F73
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 5
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7E6F62	; default
			; jumptable 007E6AEB cases 3,7-11,13-15,23
mov	edx, [ebp+var_10]
movzx	eax, ds:byte_7E6FE4[edx]
jmp	ds:off_7E6FBC[eax*4] ; switch jump

loc_7E6AF2:		; jumptable 007E6AEB case 24
mov	ecx, 1
test	ecx, ecx
jz	short loc_7E6B0A ; jumptable 007E6AEB cases 17,19-22
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6B0A:		; jumptable 007E6AEB cases 17,19-22
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_7E6F6E

loc_7E6B18:		; jumptable 007E6AEB case 0
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E6B2D
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6B2D:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E6B56
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6B56:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E6F6E

loc_7E6B64:		; jumptable 007E6AEB case 1
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E6B79
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6B79:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+150h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E6BA2
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6BA2:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7E6F6E

loc_7E6BB0:		; jumptable 007E6AEB case 2
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E6BC5
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6BC5:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+154h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E6BEE
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6BEE:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7E6F6E

loc_7E6BFC:		; jumptable 007E6AEB case 18
cmp	[ebp+var_4], 0
jz	short loc_7E6C11
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6C11:
mov	[ebp+var_4], 1
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E6C31
or	eax, 0FFFFFFFFh
jmp	loc_7E6F76

loc_7E6C31:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
sub	ecx, 5
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 18h ; switch 25 cases
ja	loc_7E6D6A	; default
			; jumptable 007E6C5F cases 3-16,18,20-23
mov	edx, [ebp+var_14]
movzx	eax, ds:byte_7E7018[edx]
jmp	ds:off_7E7000[eax*4] ; switch jump

loc_7E6C66:		; jumptable 007E6C5F case 24
mov	ecx, 1
test	ecx, ecx
jz	short loc_7E6C7E ; jumptable 007E6C5F cases 17,19
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6C7E:		; jumptable 007E6C5F cases 17,19
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_7E6D79

loc_7E6C8C:		; jumptable 007E6C5F case 0
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E6CA1
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6CA1:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E6CCA
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6CCA:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E6D79

loc_7E6CD8:		; jumptable 007E6C5F case 1
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E6CED
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6CED:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+15Ch]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E6D16
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6D16:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7E6D79

loc_7E6D21:		; jumptable 007E6C5F case 2
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E6D36
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6D36:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+160h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E6D5F
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6D5F:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7E6D79

loc_7E6D6A:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E6C5F cases 3-16,18,20-23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6D79:
jmp	loc_7E6F6E

loc_7E6D7E:		; jumptable 007E6AEB cases 4,5,16
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E6D87:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7E6F0C
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_18], eax
mov	ecx, [ebp+var_18]
sub	ecx, 5
mov	[ebp+var_18], ecx
cmp	[ebp+var_18], 18h ; switch 25 cases
ja	loc_7E6EDE	; default
			; jumptable 007E6DC1 cases 3,7-11,13-15,18,20-23
mov	edx, [ebp+var_18]
movzx	eax, ds:byte_7E7058[edx]
jmp	ds:off_7E7034[eax*4] ; switch jump

loc_7E6DC8:		; jumptable 007E6DC1 case 24
mov	ecx, 1
test	ecx, ecx
jz	short loc_7E6DE0 ; jumptable 007E6DC1 cases 17,19
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6DE0:		; jumptable 007E6DC1 cases 17,19
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_7E6EED

loc_7E6DEE:		; jumptable 007E6DC1 case 0
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E6E03
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6E03:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E6E2C
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6E2C:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E6EED

loc_7E6E3A:		; jumptable 007E6DC1 case 1
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E6E4F
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6E4F:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+15Ch]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E6E78
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6E78:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7E6EED

loc_7E6E83:		; jumptable 007E6DC1 case 2
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E6E98
mov	eax, 0FFFFFFFEh
jmp	loc_7E6F76

loc_7E6E98:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+160h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E6EC1
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E6F76

loc_7E6EC1:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7E6EED

loc_7E6ECC:		; jumptable 007E6DC1 case 6
jmp	short loc_7E6F11

loc_7E6ECE:		; jumptable 007E6DC1 case 12
jmp	short loc_7E6F23

loc_7E6ED0:		; jumptable 007E6DC1 cases 4,5,16
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E6D87

loc_7E6EDE:		; default
mov	eax, [ebp+arg_C] ; jumptable 007E6DC1 cases 3,7-11,13-15,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E6F76

loc_7E6EED:
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E7D30
add	esp, 10h
jmp	short loc_7E6F76
jmp	loc_7E6D87

loc_7E6F0C:
or	eax, 0FFFFFFFFh
jmp	short loc_7E6F76

loc_7E6F11:		; jumptable 007E6AEB case 6
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 2
jmp	short loc_7E6F76

loc_7E6F23:		; jumptable 007E6AEB case 12
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E6F39
or	eax, 0FFFFFFFFh
jmp	short loc_7E6F76

loc_7E6F39:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jz	short loc_7E6F50
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7E6F76

loc_7E6F50:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 4
jmp	short loc_7E6F76

loc_7E6F62:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E6AEB cases 3,7-11,13-15,23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E6F76

loc_7E6F6E:
jmp	loc_7E6AB1

loc_7E6F73:
or	eax, 0FFFFFFFFh

loc_7E6F76:
mov	esp, ebp
pop	ebp
retn
sub_7E6880 endp

align 4
off_7E6F7C dd offset loc_7E68F1	; jump table for switch	statement
dd offset loc_7E693D
dd offset loc_7E6989
dd offset loc_7E6A5B
dd offset loc_7E69D5
dd offset loc_7E6A7B
dd offset loc_7E68E3
dd offset loc_7E68CB
dd offset loc_7E6A9B
byte_7E6FA0 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     3,     4
db	5,     8,     8,     8
db	8,     6,     8,     6
db	8,     8,     8,     8
db	7
align 4
off_7E6FBC dd offset loc_7E6B18	; jump table for switch	statement
dd offset loc_7E6B64
dd offset loc_7E6BB0
dd offset loc_7E6D7E
dd offset loc_7E6F11
dd offset loc_7E6F23
dd offset loc_7E6B0A
dd offset loc_7E6BFC
dd offset loc_7E6AF2
dd offset loc_7E6F62
byte_7E6FE4 db	    0,	   1,	  2,	 9 ; indirect table for	switch statement
db	3,     3,     4,     9
db	9,     9,     9,     9
db	5,     9,     9,     9
db	3,     6,     7,     6
db	6,     6,     6,     9
db	8
align 10h
off_7E7000 dd offset loc_7E6C8C	; jump table for switch	statement
dd offset loc_7E6CD8
dd offset loc_7E6D21
dd offset loc_7E6C7E
dd offset loc_7E6C66
dd offset loc_7E6D6A
byte_7E7018 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7E7034 dd offset loc_7E6DEE	; jump table for switch	statement
dd offset loc_7E6E3A
dd offset loc_7E6E83
dd offset loc_7E6ED0
dd offset loc_7E6ECC
dd offset loc_7E6ECE
dd offset loc_7E6DE0
dd offset loc_7E6DC8
dd offset loc_7E6EDE
byte_7E7058 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	5,     8,     8,     8
db	3,     6,     8,     6
db	8,     8,     8,     8
db	7
align 10h


; Attributes: bp-based frame

sub_7E7080 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E7248
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 2Dh
jz	short loc_7E70AA
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E724B

loc_7E70AA:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E70B3:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E7248
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 1Bh ; switch 28 cases
ja	loc_7E723A	; default
			; jumptable 007E70E4 cases 2-4,9-26
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7E7268[edx]
jmp	ds:off_7E7250[eax*4] ; switch jump

loc_7E70EB:		; jumptable 007E70E4 case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7E7100
mov	eax, 0FFFFFFFEh
jmp	loc_7E724B

loc_7E7100:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+164h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E7129
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E724B

loc_7E7129:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7E7243

loc_7E7137:		; jumptable 007E70E4 case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7E714C
mov	eax, 0FFFFFFFEh
jmp	loc_7E724B

loc_7E714C:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+168h]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E7175
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E724B

loc_7E7175:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7E7243

loc_7E7183:		; jumptable 007E70E4 case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7E7198
mov	eax, 0FFFFFFFEh
jmp	loc_7E724B

loc_7E7198:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+16Ch]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E71C1
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E724B

loc_7E71C1:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7E7243

loc_7E71CC:		; jumptable 007E70E4 cases 0,1,8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E724B

loc_7E71D8:		; jumptable 007E70E4 case 27
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E71EE
or	eax, 0FFFFFFFFh
jmp	short loc_7E724B

loc_7E71EE:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 2Dh
jnz	short loc_7E7238
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E720F
or	eax, 0FFFFFFFFh
jmp	short loc_7E724B

loc_7E720F:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Eh
jz	short loc_7E7226
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E724B

loc_7E7226:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 0Dh
jmp	short loc_7E724B

loc_7E7238:
jmp	short loc_7E7243

loc_7E723A:		; default
mov	eax, [ebp+arg_4] ; jumptable 007E70E4 cases 2-4,9-26
add	eax, 1
mov	[ebp+arg_4], eax

loc_7E7243:
jmp	loc_7E70B3

loc_7E7248:
or	eax, 0FFFFFFFFh

loc_7E724B:
mov	esp, ebp
pop	ebp
retn
sub_7E7080 endp

align 10h
off_7E7250 dd offset loc_7E71CC	; jump table for switch	statement
dd offset loc_7E70EB
dd offset loc_7E7137
dd offset loc_7E7183
dd offset loc_7E71D8
dd offset loc_7E723A
byte_7E7268 db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     4
align 10h


; Attributes: bp-based frame

sub_7E7290 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E72AC
or	eax, 0FFFFFFFFh
jmp	loc_7E7754

loc_7E72AC:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
sub	eax, 5
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 18h ; switch 25 cases
ja	loc_7E73E5	; default
			; jumptable 007E72DA cases 3-16,18,20-23
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7E7770[ecx]
jmp	ds:off_7E7758[edx*4] ; switch jump

loc_7E72E1:		; jumptable 007E72DA case 24
mov	eax, 1
test	eax, eax
jz	short loc_7E72F9 ; jumptable 007E72DA cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7754

loc_7E72F9:		; jumptable 007E72DA cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	loc_7E73F4

loc_7E7307:		; jumptable 007E72DA case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7E731C
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E731C:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+158h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E7345
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7754

loc_7E7345:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7E73F4

loc_7E7353:		; jumptable 007E72DA case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7E7368
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E7368:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+15Ch]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E7391
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E7754

loc_7E7391:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7E73F4

loc_7E739C:		; jumptable 007E72DA case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7E73B1
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E73B1:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+160h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E73DA
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7754

loc_7E73DA:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7E73F4

loc_7E73E5:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E72DA cases 3-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7754

loc_7E73F4:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E7751
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 5
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7E7740	; default
			; jumptable 007E742E cases 3,6-9,11-15,18,23
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7E77AC[eax]
jmp	ds:off_7E778C[ecx*4] ; switch jump

loc_7E7435:		; jumptable 007E742E case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E744D ; jumptable 007E742E cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7754

loc_7E744D:		; jumptable 007E742E cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E774C

loc_7E745B:		; jumptable 007E742E case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E7470
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E7470:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E7499
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E7754

loc_7E7499:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E774C

loc_7E74A7:		; jumptable 007E742E case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E74BC
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E74BC:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+150h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E74E5
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7754

loc_7E74E5:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7E774C

loc_7E74F3:		; jumptable 007E742E case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E7508
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E7508:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+154h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E7531
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7754

loc_7E7531:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7E774C

loc_7E753F:		; jumptable 007E742E cases 4,5,16
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E77F0
add	esp, 10h
test	eax, eax
jnz	short loc_7E756A
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7754

loc_7E756A:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax

loc_7E7573:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7E76E2
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 0Fh ; switch 16 cases
ja	loc_7E76D4	; default
			; jumptable 007E75A4 cases 2-4,9-14
mov	eax, [ebp+var_14]
movzx	ecx, ds:byte_7E77E0[eax]
jmp	ds:off_7E77C8[ecx*4] ; switch jump

loc_7E75AB:		; jumptable 007E75A4 case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E75C0
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E75C0:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+164h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E75E9
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7754

loc_7E75E9:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E76DD

loc_7E75F7:		; jumptable 007E75A4 case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E760C
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E760C:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E7635
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7754

loc_7E7635:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7E76DD

loc_7E7643:		; jumptable 007E75A4 case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E7658
mov	eax, 0FFFFFFFEh
jmp	loc_7E7754

loc_7E7658:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+16Ch]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E7681
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E7754

loc_7E7681:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7E76DD

loc_7E768C:		; jumptable 007E75A4 cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E7754

loc_7E769B:		; jumptable 007E75A4 case 15
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E76B4
or	eax, 0FFFFFFFFh
jmp	loc_7E7754

loc_7E76B4:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Eh
jnz	short loc_7E76D2
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, [ebp+var_4]
jmp	loc_7E7754

loc_7E76D2:
jmp	short loc_7E76DD

loc_7E76D4:		; default
mov	ecx, [ebp+arg_4] ; jumptable 007E75A4 cases 2-4,9-14
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E76DD:
jmp	loc_7E7573

loc_7E76E2:
or	eax, 0FFFFFFFFh
jmp	short loc_7E7754

loc_7E76E7:		; jumptable 007E742E case 10
lea	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E77F0
add	esp, 10h
test	eax, eax
jnz	short loc_7E770F
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7E7754

loc_7E770F:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E7725
or	eax, 0FFFFFFFFh
jmp	short loc_7E7754

loc_7E7725:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jnz	short loc_7E7740 ; default
			; jumptable 007E742E cases 3,6-9,11-15,18,23
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, [ebp+var_4]
jmp	short loc_7E7754

loc_7E7740:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E742E cases 3,6-9,11-15,18,23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E7754

loc_7E774C:
jmp	loc_7E73F4

loc_7E7751:
or	eax, 0FFFFFFFFh

loc_7E7754:
mov	esp, ebp
pop	ebp
retn
sub_7E7290 endp

off_7E7758 dd offset loc_7E7307	; jump table for switch	statement
dd offset loc_7E7353
dd offset loc_7E739C
dd offset loc_7E72F9
dd offset loc_7E72E1
dd offset loc_7E73E5
byte_7E7770 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7E778C dd offset loc_7E745B	; jump table for switch	statement
dd offset loc_7E74A7
dd offset loc_7E74F3
dd offset loc_7E753F
dd offset loc_7E76E7
dd offset loc_7E744D
dd offset loc_7E7435
dd offset loc_7E7740
byte_7E77AC db	    0,	   1,	  2,	 7 ; indirect table for	switch statement
db	3,     3,     7,     7
db	7,     7,     4,     7
db	7,     7,     7,     7
db	3,     5,     7,     5
db	5,     5,     5,     7
db	6
align 4
off_7E77C8 dd offset loc_7E768C	; jump table for switch	statement
dd offset loc_7E75AB
dd offset loc_7E75F7
dd offset loc_7E7643
dd offset loc_7E769B
dd offset loc_7E76D4
byte_7E77E0 db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	5,     5,     5,     4


; Attributes: bp-based frame

sub_7E77F0 proc	near

var_10=	byte ptr -10h
var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_C]
mov	dword ptr [eax], 0Bh
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jz	short loc_7E781B
mov	eax, 1
jmp	loc_7E78BD

loc_7E781B:
mov	edx, [ebp+arg_4]
mov	al, [edx]
mov	[ebp+var_8], al
cmp	[ebp+var_8], 58h
jz	short loc_7E7833
cmp	[ebp+var_8], 78h
jz	short loc_7E7831
jmp	short loc_7E783C

loc_7E7831:
jmp	short loc_7E7843

loc_7E7833:
mov	[ebp+var_4], 1
jmp	short loc_7E7843

loc_7E783C:
mov	eax, 1
jmp	short loc_7E78BD

loc_7E7843:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
mov	al, [edx]
mov	[ebp+var_C], al
cmp	[ebp+var_C], 4Dh
jz	short loc_7E7864
cmp	[ebp+var_C], 6Dh
jz	short loc_7E7862
jmp	short loc_7E786D

loc_7E7862:
jmp	short loc_7E7874

loc_7E7864:
mov	[ebp+var_4], 1
jmp	short loc_7E7874

loc_7E786D:
mov	eax, 1
jmp	short loc_7E78BD

loc_7E7874:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
mov	al, [edx]
mov	[ebp+var_10], al
cmp	[ebp+var_10], 4Ch
jz	short loc_7E7895
cmp	[ebp+var_10], 6Ch
jz	short loc_7E7893
jmp	short loc_7E789E

loc_7E7893:
jmp	short loc_7E78A5

loc_7E7895:
mov	[ebp+var_4], 1
jmp	short loc_7E78A5

loc_7E789E:
mov	eax, 1
jmp	short loc_7E78BD

loc_7E78A5:
cmp	[ebp+var_4], 0
jz	short loc_7E78AF
xor	eax, eax
jmp	short loc_7E78BD

loc_7E78AF:
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx], 0Ch
mov	eax, 1

loc_7E78BD:
mov	esp, ebp
pop	ebp
retn
sub_7E77F0 endp

align 10h


; Attributes: bp-based frame

sub_7E78D0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 6
jge	short loc_7E78E4
or	eax, 0FFFFFFFFh
jmp	short loc_7E7934

loc_7E78E4:
mov	[ebp+var_4], 0
jmp	short loc_7E78FF

loc_7E78ED:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E78FF:
cmp	[ebp+var_4], 6
jge	short loc_7E7927
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+var_4]
movsx	eax, ds:byte_1457C10[edx]
cmp	ecx, eax
jz	short loc_7E7925
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E7934

loc_7E7925:
jmp	short loc_7E78ED

loc_7E7927:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 8

loc_7E7934:
mov	esp, ebp
pop	ebp
retn
sub_7E78D0 endp

align 10h


; Attributes: bp-based frame

sub_7E7940 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E7956
or	eax, 0FFFFFFFFh
jmp	loc_7E7C8E

loc_7E7956:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 5
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 18h ; switch 25 cases
ja	loc_7E7A8F	; default
			; jumptable 007E7984 cases 3-16,18,20-23
mov	eax, [ebp+var_4]
movzx	ecx, ds:byte_7E7CAC[eax]
jmp	ds:off_7E7C94[ecx*4] ; switch jump

loc_7E798B:		; jumptable 007E7984 case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E79A3 ; jumptable 007E7984 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7C8E

loc_7E79A3:		; jumptable 007E7984 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E7A9E

loc_7E79B1:		; jumptable 007E7984 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E79C6
mov	eax, 0FFFFFFFEh
jmp	loc_7E7C8E

loc_7E79C6:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+158h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E79EF
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E7C8E

loc_7E79EF:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E7A9E

loc_7E79FD:		; jumptable 007E7984 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E7A12
mov	eax, 0FFFFFFFEh
jmp	loc_7E7C8E

loc_7E7A12:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E7A3B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7C8E

loc_7E7A3B:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7E7A9E

loc_7E7A46:		; jumptable 007E7984 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E7A5B
mov	eax, 0FFFFFFFEh
jmp	loc_7E7C8E

loc_7E7A5B:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E7A84
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7C8E

loc_7E7A84:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E7A9E

loc_7E7A8F:		; default
mov	eax, [ebp+arg_C] ; jumptable 007E7984 cases 3-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7C8E

loc_7E7A9E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7E7C8B
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
sub	ecx, 5
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7E7C7A	; default
			; jumptable 007E7AD8 cases 3,7-15,23
mov	edx, [ebp+var_8]
movzx	eax, ds:byte_7E7CEC[edx]
jmp	ds:off_7E7CC8[eax*4] ; switch jump

loc_7E7ADF:		; jumptable 007E7AD8 case 24
mov	ecx, 1
test	ecx, ecx
jz	short loc_7E7AF7 ; jumptable 007E7AD8 cases 17,19-22
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E7C8E

loc_7E7AF7:		; jumptable 007E7AD8 cases 17,19-22
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_7E7C86

loc_7E7B05:		; jumptable 007E7AD8 case 0
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E7B1A
mov	eax, 0FFFFFFFEh
jmp	loc_7E7C8E

loc_7E7B1A:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E7B43
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E7C8E

loc_7E7B43:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E7C86

loc_7E7B51:		; jumptable 007E7AD8 case 1
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E7B66
mov	eax, 0FFFFFFFEh
jmp	loc_7E7C8E

loc_7E7B66:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+150h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E7B8F
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E7C8E

loc_7E7B8F:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7E7C86

loc_7E7B9D:		; jumptable 007E7AD8 case 2
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E7BB2
mov	eax, 0FFFFFFFEh
jmp	loc_7E7C8E

loc_7E7BB2:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+154h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E7BDB
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E7C8E

loc_7E7BDB:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7E7C86

loc_7E7BE9:		; jumptable 007E7AD8 cases 4,5,16
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	short loc_7E7BFD

loc_7E7BF4:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax

loc_7E7BFD:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	short loc_7E7C58
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
sub	eax, 9
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0Ch ; switch 13 cases
ja	short loc_7E7C4A ; default
			; jumptable 007E7C2F cases 3-11
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7E7D14[ecx]
jmp	ds:off_7E7D08[edx*4] ; switch jump

loc_7E7C36:		; jumptable 007E7C2F cases 0,1,12
jmp	short loc_7E7C56

loc_7E7C38:		; jumptable 007E7C2F case 2
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 5
jmp	short loc_7E7C8E

loc_7E7C4A:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E7C2F cases 3-11
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E7C8E

loc_7E7C56:
jmp	short loc_7E7BF4

loc_7E7C58:
or	eax, 0FFFFFFFFh
jmp	short loc_7E7C8E

loc_7E7C5D:		; jumptable 007E7AD8 case 18
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	short loc_7E7C86

loc_7E7C68:		; jumptable 007E7AD8 case 6
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 5
jmp	short loc_7E7C8E

loc_7E7C7A:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E7AD8 cases 3,7-15,23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E7C8E

loc_7E7C86:
jmp	loc_7E7A9E

loc_7E7C8B:
or	eax, 0FFFFFFFFh

loc_7E7C8E:
mov	esp, ebp
pop	ebp
retn
sub_7E7940 endp

align 4
off_7E7C94 dd offset loc_7E79B1	; jump table for switch	statement
dd offset loc_7E79FD
dd offset loc_7E7A46
dd offset loc_7E79A3
dd offset loc_7E798B
dd offset loc_7E7A8F
byte_7E7CAC db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7E7CC8 dd offset loc_7E7B05	; jump table for switch	statement
dd offset loc_7E7B51
dd offset loc_7E7B9D
dd offset loc_7E7BE9
dd offset loc_7E7C68
dd offset loc_7E7AF7
dd offset loc_7E7C5D
dd offset loc_7E7ADF
dd offset loc_7E7C7A
byte_7E7CEC db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	3,     5,     6,     5
db	5,     5,     5,     8
db	7
align 4
off_7E7D08 dd offset loc_7E7C36	; jump table for switch	statement
dd offset loc_7E7C38
dd offset loc_7E7C4A
byte_7E7D14 db	    0,	   0,	  1,	 2 ; indirect table for	switch statement
db	2,     2,     2,     2
db	2,     2,     2,     2
db	0
align 10h


; Attributes: bp-based frame

sub_7E7D30 proc	near

var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 30h
mov	[ebp+var_4], 0

loc_7E7D3D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7E84A5
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 5
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 18h ; switch 25 cases
ja	loc_7E8494	; default
			; jumptable 007E7D77 cases 3,6-8,10-15,23
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7E84D0[eax]
jmp	ds:off_7E84AC[ecx*4] ; switch jump

loc_7E7D7E:		; jumptable 007E7D77 case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E7D96 ; jumptable 007E7D77 cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E7D96:		; jumptable 007E7D77 cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E84A0

loc_7E7DA4:		; jumptable 007E7D77 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E7DB9
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E7DB9:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14Ch]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E7DE2
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E84A8

loc_7E7DE2:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E84A0

loc_7E7DF0:		; jumptable 007E7D77 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E7E05
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E7E05:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+150h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E7E2E
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E84A8

loc_7E7E2E:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7E84A0

loc_7E7E3C:		; jumptable 007E7D77 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E7E51
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E7E51:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+154h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E7E7A
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E7E7A:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7E84A0

loc_7E7E88:		; jumptable 007E7D77 case 18
cmp	[ebp+var_4], 0
jz	short loc_7E7E9D
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E7E9D:
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E7EBD
or	eax, 0FFFFFFFFh
jmp	loc_7E84A8

loc_7E7EBD:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_1C], ecx
mov	edx, [ebp+var_1C]
sub	edx, 5
mov	[ebp+var_1C], edx
cmp	[ebp+var_1C], 18h ; switch 25 cases
ja	loc_7E7FF6	; default
			; jumptable 007E7EEB cases 3-16,18,20-23
mov	eax, [ebp+var_1C]
movzx	ecx, ds:byte_7E8504[eax]
jmp	ds:off_7E84EC[ecx*4] ; switch jump

loc_7E7EF2:		; jumptable 007E7EEB case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E7F0A ; jumptable 007E7EEB cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E7F0A:		; jumptable 007E7EEB cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E8005

loc_7E7F18:		; jumptable 007E7EEB case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E7F2D
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E7F2D:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+158h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E7F56
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E84A8

loc_7E7F56:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E8005

loc_7E7F64:		; jumptable 007E7EEB case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E7F79
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E7F79:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E7FA2
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E84A8

loc_7E7FA2:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7E8005

loc_7E7FAD:		; jumptable 007E7EEB case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E7FC2
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E7FC2:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E7FEB
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E7FEB:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E8005

loc_7E7FF6:		; default
mov	eax, [ebp+arg_C] ; jumptable 007E7EEB cases 3-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E8005:
jmp	loc_7E84A0

loc_7E800A:		; jumptable 007E7D77 cases 4,5,16
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E8023
or	eax, 0FFFFFFFFh
jmp	loc_7E84A8

loc_7E8023:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0Eh
jnz	short loc_7E803C
jmp	short loc_7E8069 ; jumptable 007E7D77 case 9

loc_7E803C:
mov	edx, [ebp+var_8]
mov	[ebp+var_20], edx
cmp	[ebp+var_20], 9
jl	short loc_7E8058
cmp	[ebp+var_20], 0Ah
jle	short loc_7E8056
cmp	[ebp+var_20], 15h
jz	short loc_7E8056
jmp	short loc_7E8058

loc_7E8056:
jmp	short loc_7E8067

loc_7E8058:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E8067:		; jumptable 007E7D77 cases 4,5,16
jmp	short loc_7E800A

loc_7E8069:		; jumptable 007E7D77 case 9
mov	[ebp+var_4], 0

loc_7E8070:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E8089
or	eax, 0FFFFFFFFh
jmp	loc_7E84A8

loc_7E8089:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0Ch
jz	short loc_7E80A6
cmp	[ebp+var_C], 0Dh
jnz	short loc_7E80A8

loc_7E80A6:
jmp	short loc_7E80D5

loc_7E80A8:
mov	edx, [ebp+var_C]
mov	[ebp+var_24], edx
cmp	[ebp+var_24], 9
jl	short loc_7E80C4
cmp	[ebp+var_24], 0Ah
jle	short loc_7E80C2
cmp	[ebp+var_24], 15h
jz	short loc_7E80C2
jmp	short loc_7E80C4

loc_7E80C2:
jmp	short loc_7E80D3

loc_7E80C4:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E80D3:
jmp	short loc_7E8070

loc_7E80D5:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E80DE:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E80EE
or	eax, 0FFFFFFFFh
jmp	loc_7E84A8

loc_7E80EE:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnz	short loc_7E810C
jmp	loc_7E826F

loc_7E810C:
mov	eax, [ebp+var_10]
mov	[ebp+var_28], eax
cmp	[ebp+var_28], 8	; switch 9 cases
ja	loc_7E8261	; default
			; jumptable 007E811F case 4
mov	ecx, [ebp+var_28]
jmp	ds:off_7E8520[ecx*4] ; switch jump

loc_7E8126:		; jumptable 007E811F case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E813B
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E813B:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+164h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E8164
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E84A8

loc_7E8164:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E826A

loc_7E8172:		; jumptable 007E811F case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E8187
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E8187:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E81B0
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E81B0:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7E826A

loc_7E81BE:		; jumptable 007E811F case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E81D3
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E81D3:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+16Ch]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E81FC
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E84A8

loc_7E81FC:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7E826A

loc_7E8207:		; jumptable 007E811F cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E84A8

loc_7E8216:		; jumptable 007E811F case 3
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E63A0
add	esp, 10h
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jg	short loc_7E8250
cmp	[ebp+var_14], 0
jnz	short loc_7E8248
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax

loc_7E8248:
mov	eax, [ebp+var_14]
jmp	loc_7E84A8

loc_7E8250:
jmp	short loc_7E826A

loc_7E8252:		; jumptable 007E811F case 2
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E84A8

loc_7E8261:		; default
mov	eax, [ebp+arg_4] ; jumptable 007E811F case 4
add	eax, 1
mov	[ebp+arg_4], eax

loc_7E826A:
jmp	loc_7E80DE

loc_7E826F:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E8288
or	eax, 0FFFFFFFFh
jmp	loc_7E84A8

loc_7E8288:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
sub	ecx, 9
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 0Ch ; switch 13 cases
ja	short loc_7E82C5 ; default
			; jumptable 007E82B2 cases 3-7,9-11
mov	edx, [ebp+var_2C]
movzx	eax, ds:byte_7E8554[edx]
jmp	ds:off_7E8544[eax*4] ; switch jump

loc_7E82B9:		; jumptable 007E82B2 cases 0,1,12
jmp	short loc_7E82D4

loc_7E82BB:		; jumptable 007E82B2 case 8
jmp	loc_7E8440

loc_7E82C0:		; jumptable 007E82B2 case 2
jmp	loc_7E842E

loc_7E82C5:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E82B2 cases 3-7,9-11
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E84A8

loc_7E82D4:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E82ED
or	eax, 0FFFFFFFFh
jmp	loc_7E84A8

loc_7E82ED:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_30], edx
mov	eax, [ebp+var_30]
sub	eax, 5
mov	[ebp+var_30], eax
cmp	[ebp+var_30], 18h ; switch 25 cases
ja	loc_7E847F	; default
			; jumptable 007E831B cases 3,7-11,13-15,18,20-23
mov	ecx, [ebp+var_30]
movzx	edx, ds:byte_7E8588[ecx]
jmp	ds:off_7E8564[edx*4] ; switch jump

loc_7E8322:		; jumptable 007E831B case 24
mov	eax, 1
test	eax, eax
jz	short loc_7E833A ; jumptable 007E831B cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E84A8

loc_7E833A:		; jumptable 007E831B cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	loc_7E848B

loc_7E8348:		; jumptable 007E831B case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7E835D
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E835D:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+158h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E8386
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E84A8

loc_7E8386:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7E848B

loc_7E8394:		; jumptable 007E831B case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7E83A9
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E83A9:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+15Ch]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E83D2
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E84A8

loc_7E83D2:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7E848B

loc_7E83E0:		; jumptable 007E831B case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7E83F5
mov	eax, 0FFFFFFFEh
jmp	loc_7E84A8

loc_7E83F5:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+160h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E841E
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E84A8

loc_7E841E:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7E848B

loc_7E8429:		; jumptable 007E831B cases 4,5,16
jmp	loc_7E82D4

loc_7E842E:		; jumptable 007E831B case 6
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1
jmp	short loc_7E84A8

loc_7E8440:		; jumptable 007E831B case 12
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E8456
or	eax, 0FFFFFFFFh
jmp	short loc_7E84A8

loc_7E8456:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 3Eh
jz	short loc_7E846D
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E84A8

loc_7E846D:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 3
jmp	short loc_7E84A8

loc_7E847F:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E831B cases 3,7-11,13-15,18,20-23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E84A8

loc_7E848B:
jmp	short loc_7E8492
jmp	loc_7E82D4

loc_7E8492:
jmp	short loc_7E84A0

loc_7E8494:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E7D77 cases 3,6-8,10-15,23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E84A8

loc_7E84A0:
jmp	loc_7E7D3D

loc_7E84A5:
or	eax, 0FFFFFFFFh

loc_7E84A8:
mov	esp, ebp
pop	ebp
retn
sub_7E7D30 endp

off_7E84AC dd offset loc_7E7DA4	; jump table for switch	statement
dd offset loc_7E7DF0
dd offset loc_7E7E3C
dd offset loc_7E800A
dd offset loc_7E8069
dd offset loc_7E7D96
dd offset loc_7E7E88
dd offset loc_7E7D7E
dd offset loc_7E8494
byte_7E84D0 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     8,     8
db	8,     4,     8,     8
db	8,     8,     8,     8
db	3,     5,     6,     5
db	5,     5,     5,     8
db	7
align 4
off_7E84EC dd offset loc_7E7F18	; jump table for switch	statement
dd offset loc_7E7F64
dd offset loc_7E7FAD
dd offset loc_7E7F0A
dd offset loc_7E7EF2
dd offset loc_7E7FF6
byte_7E8504 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 10h
off_7E8520 dd offset loc_7E8207	; jump table for switch	statement
dd offset loc_7E8207
dd offset loc_7E8252
dd offset loc_7E8216
dd offset loc_7E8261
dd offset loc_7E8126
dd offset loc_7E8172
dd offset loc_7E81BE
dd offset loc_7E8207
off_7E8544 dd offset loc_7E82B9	; jump table for switch	statement
dd offset loc_7E82C0
dd offset loc_7E82BB
dd offset loc_7E82C5
byte_7E8554 db	    0,	   0,	  1,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	2,     3,     3,     3
db	0
align 4
off_7E8564 dd offset loc_7E8348	; jump table for switch	statement
dd offset loc_7E8394
dd offset loc_7E83E0
dd offset loc_7E8429
dd offset loc_7E842E
dd offset loc_7E8440
dd offset loc_7E833A
dd offset loc_7E8322
dd offset loc_7E847F
byte_7E8588 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	5,     8,     8,     8
db	3,     6,     8,     6
db	8,     8,     8,     8
db	7
align 10h


; Attributes: bp-based frame

sub_7E85B0 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	byte ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 24h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E85C8
mov	eax, 0FFFFFFFCh
jmp	loc_7E8EB0

loc_7E85C8:
xor	ecx, ecx
jz	short loc_7E85FA
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
and	eax, 0
jz	short loc_7E85FA
mov	ecx, [ebp+var_8]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 0
jnz	short loc_7E85F1
or	eax, 0FFFFFFFFh
jmp	loc_7E8EB0

loc_7E85F1:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_8]
mov	[ebp+arg_8], edx

loc_7E85FA:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
sub	ecx, 2
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 22h ; switch 35 cases
ja	loc_7E8B3E	; default
			; jumptable 007E8628 cases 1,6,12-16,26,31,32
mov	edx, [ebp+var_C]
movzx	eax, ds:byte_7E8F08[edx]
jmp	ds:off_7E8EB4[eax*4] ; switch jump

loc_7E862F:		; jumptable 007E8628 case 10
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
push	0Ch
call	sub_7E9860
add	esp, 14h
jmp	loc_7E8EB0

loc_7E8651:		; jumptable 007E8628 case 11
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	0Dh
call	sub_7E9860
add	esp, 14h
jmp	loc_7E8EB0

loc_7E8673:		; jumptable 007E8628 case 0
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E868C
or	eax, 0FFFFFFFFh
jmp	loc_7E8EB0

loc_7E868C:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 5
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	short loc_7E8712 ; default
			; jumptable 007E86B6 cases 3-9,12-16,18,20-23
mov	ecx, [ebp+var_10]
movzx	edx, ds:byte_7E8F3C[ecx]
jmp	ds:off_7E8F2C[edx*4] ; switch jump

loc_7E86BD:		; jumptable 007E86B6 case 11
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 1
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E9010
add	esp, 10h
jmp	loc_7E8EB0

loc_7E86DD:		; jumptable 007E86B6 case 10
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E7290
add	esp, 10h
jmp	loc_7E8EB0

loc_7E86FD:		; jumptable 007E86B6 cases 0-2,17,19,24
mov	edx, [ebp+arg_4]
sub	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 1Dh
jmp	loc_7E8EB0

loc_7E8712:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E86B6 cases 3-9,12-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8721:		; jumptable 007E8628 case 7
mov	eax, [ebp+arg_4]
add	eax, 1
cmp	eax, [ebp+arg_8]
jnz	short loc_7E873E ; jumptable 007E8628 cases 8,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, 0FFFFFFF1h
jmp	loc_7E8EB0

loc_7E873E:		; jumptable 007E8628 cases 8,19
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E8751
jmp	short loc_7E8798

loc_7E8751:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
mov	dl, [ecx+eax+4Ch]
mov	[ebp+var_14], dl
cmp	[ebp+var_14], 9
jz	short loc_7E8777
cmp	[ebp+var_14], 0Ah
jz	short loc_7E8775
cmp	[ebp+var_14], 15h
jz	short loc_7E8775
jmp	short loc_7E8784

loc_7E8775:
jmp	short loc_7E8796

loc_7E8777:
mov	eax, [ebp+arg_4]
add	eax, 1
cmp	eax, [ebp+arg_8]
jz	short loc_7E8784
jmp	short loc_7E8796

loc_7E8784:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 0Fh
jmp	loc_7E8EB0

loc_7E8796:		; jumptable 007E8628 cases 8,19
jmp	short loc_7E873E

loc_7E8798:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 0Fh
jmp	loc_7E8EB0

loc_7E87AA:		; jumptable 007E8628 case 28
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E91D0
add	esp, 10h
jmp	loc_7E8EB0

loc_7E87CA:		; jumptable 007E8628 case 33
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 26h
jmp	loc_7E8EB0

loc_7E87DF:		; jumptable 007E8628 case 18
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 19h
jmp	loc_7E8EB0

loc_7E87F4:		; jumptable 007E8628 case 2
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E880F
mov	eax, 0FFFFFFE6h
jmp	loc_7E8EB0

loc_7E880F:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 5Dh
jnz	short loc_7E884E
mov	edx, [ebp+arg_4]
add	edx, 1
cmp	edx, [ebp+arg_8]
jnz	short loc_7E882D
or	eax, 0FFFFFFFFh
jmp	loc_7E8EB0

loc_7E882D:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 3Eh
jnz	short loc_7E884E
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 22h
jmp	loc_7E8EB0

loc_7E884E:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 1Ah
jmp	loc_7E8EB0

loc_7E8860:		; jumptable 007E8628 case 29
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 17h
jmp	loc_7E8EB0

loc_7E8875:		; jumptable 007E8628 case 30
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E8890
mov	eax, 0FFFFFFE8h
jmp	loc_7E8EB0

loc_7E8890:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 9
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 1Bh ; switch 28 cases
ja	short loc_7E8912 ; default
			; jumptable 007E88BA cases 3-5,7-11,13-22
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7E8F6C[eax]
jmp	ds:off_7E8F58[ecx*4] ; switch jump

loc_7E88C1:		; jumptable 007E88BA case 24
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 24h
jmp	loc_7E8EB0

loc_7E88D6:		; jumptable 007E88BA case 6
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 23h
jmp	loc_7E8EB0

loc_7E88EB:		; jumptable 007E88BA case 25
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 25h
jmp	loc_7E8EB0

loc_7E8900:		; jumptable 007E88BA cases 0-2,12,23,26,27
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 18h
jmp	loc_7E8EB0

loc_7E8912:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E88BA cases 3-5,7-11,13-22
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8921:		; jumptable 007E8628 case 34
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 15h
jmp	loc_7E8EB0

loc_7E8936:		; jumptable 007E8628 case 9
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 11h
jmp	loc_7E8EB0

loc_7E894B:		; jumptable 007E8628 case 17
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E9520
add	esp, 10h
jmp	loc_7E8EB0

loc_7E896B:		; jumptable 007E8628 case 3
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E8980
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8980:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+158h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E89AF
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 12h
jmp	loc_7E8B4D

loc_7E89AF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14Ch]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E89DE
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	[ebp+var_4], 13h
jmp	loc_7E8B4D

loc_7E89DE:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E89ED:		; jumptable 007E8628 case 4
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7E8A02
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8A02:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+15Ch]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E8A31
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
mov	[ebp+var_4], 12h
jmp	loc_7E8B4D

loc_7E8A31:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+150h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E8A60
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 13h
jmp	loc_7E8B4D

loc_7E8A60:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8A6F:		; jumptable 007E8628 case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E8A84
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8A84:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E8AB3
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
mov	[ebp+var_4], 12h
jmp	loc_7E8B4D

loc_7E8AB3:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+154h]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E8ADF
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
mov	[ebp+var_4], 13h
jmp	short loc_7E8B4D

loc_7E8ADF:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8AEE:		; jumptable 007E8628 cases 20,22
mov	[ebp+var_4], 12h
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	short loc_7E8B4D

loc_7E8B00:		; jumptable 007E8628 cases 21,23-25
mov	[ebp+var_4], 13h
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	short loc_7E8B4D

loc_7E8B12:		; jumptable 007E8628 case 27
xor	ecx, ecx
jz	short loc_7E8B28
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	[ebp+var_4], 12h
jmp	short loc_7E8B4D

loc_7E8B28:
xor	eax, eax
jz	short loc_7E8B3E ; default
			; jumptable 007E8628 cases 1,6,12-16,26,31,32
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 13h
jmp	short loc_7E8B4D

loc_7E8B3E:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E8628 cases 1,6,12-16,26,31,32
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8B4D:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7E8EAB
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
sub	eax, 5
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 1Fh ; switch 32 cases
ja	loc_7E8E9A	; default
			; jumptable 007E8B87 cases 3,7-9,11-14,23,26
mov	ecx, [ebp+var_1C]
movzx	edx, ds:byte_7E8FB4[ecx]
jmp	ds:off_7E8F88[edx*4] ; switch jump

loc_7E8B8E:		; jumptable 007E8B87 case 24
mov	eax, 1
test	eax, eax
jz	short loc_7E8BA6 ; jumptable 007E8B87 cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8BA6:		; jumptable 007E8B87 cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	loc_7E8EA6

loc_7E8BB4:		; jumptable 007E8B87 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7E8BC9
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8BC9:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14Ch]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E8BF2
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8BF2:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7E8EA6

loc_7E8C00:		; jumptable 007E8B87 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7E8C15
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8C15:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+150h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E8C3E
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8C3E:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7E8EA6

loc_7E8C4C:		; jumptable 007E8B87 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7E8C61
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8C61:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+154h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E8C8A
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8C8A:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7E8EA6

loc_7E8C98:		; jumptable 007E8B87 cases 4-6,15,16,25,27,30,31
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, [ebp+var_4]
jmp	loc_7E8EB0

loc_7E8CA8:		; jumptable 007E8B87 case 18
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+var_4]
mov	[ebp+var_20], ecx
cmp	[ebp+var_20], 12h
jz	short loc_7E8CCC
cmp	[ebp+var_20], 29h
jz	loc_7E8E25
jmp	loc_7E8E2C

loc_7E8CCC:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E8CDC
or	eax, 0FFFFFFFFh
jmp	loc_7E8EB0

loc_7E8CDC:
mov	[ebp+var_4], 29h
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 5
mov	[ebp+var_24], ecx
cmp	[ebp+var_24], 18h ; switch 25 cases
ja	loc_7E8E1C	; default
			; jumptable 007E8D11 cases 3-16,18,23
mov	edx, [ebp+var_24]
movzx	eax, ds:byte_7E8FEC[edx]
jmp	ds:off_7E8FD4[eax*4] ; switch jump

loc_7E8D18:		; jumptable 007E8D11 case 24
mov	ecx, 1
test	ecx, ecx
jz	short loc_7E8D30 ; jumptable 007E8D11 cases 17,19-22
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8D30:		; jumptable 007E8D11 cases 17,19-22
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_7E8E23

loc_7E8D3E:		; jumptable 007E8D11 case 0
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E8D53
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8D53:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E8D7C
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8D7C:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E8E23

loc_7E8D8A:		; jumptable 007E8D11 case 1
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E8D9F
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8D9F:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+150h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E8DC8
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8DC8:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7E8E23

loc_7E8DD3:		; jumptable 007E8D11 case 2
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E8DE8
mov	eax, 0FFFFFFFEh
jmp	loc_7E8EB0

loc_7E8DE8:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+154h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E8E11
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E8EB0

loc_7E8E11:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7E8E23

loc_7E8E1C:		; default
mov	[ebp+var_4], 13h ; jumptable 007E8D11 cases 3-16,18,23

loc_7E8E23:
jmp	short loc_7E8E2C

loc_7E8E25:
mov	[ebp+var_4], 13h

loc_7E8E2C:
jmp	short loc_7E8EA6

loc_7E8E2E:		; jumptable 007E8B87 case 29
cmp	[ebp+var_4], 13h
jnz	short loc_7E8E40
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E8EB0

loc_7E8E40:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 20h
jmp	short loc_7E8EB0

loc_7E8E52:		; jumptable 007E8B87 case 28
cmp	[ebp+var_4], 13h
jnz	short loc_7E8E64
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7E8EB0

loc_7E8E64:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 1Fh
jmp	short loc_7E8EB0

loc_7E8E76:		; jumptable 007E8B87 case 10
cmp	[ebp+var_4], 13h
jnz	short loc_7E8E88
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E8EB0

loc_7E8E88:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 1Eh
jmp	short loc_7E8EB0

loc_7E8E9A:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E8B87 cases 3,7-9,11-14,23,26
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E8EB0

loc_7E8EA6:
jmp	loc_7E8B4D

loc_7E8EAB:
mov	eax, [ebp+var_4]
neg	eax

loc_7E8EB0:
mov	esp, ebp
pop	ebp
retn
sub_7E85B0 endp

off_7E8EB4 dd offset loc_7E8673	; jump table for switch	statement
dd offset loc_7E87F4
dd offset loc_7E896B
dd offset loc_7E89ED
dd offset loc_7E8A6F
dd offset loc_7E8721
dd offset loc_7E873E
dd offset loc_7E8936
dd offset loc_7E862F
dd offset loc_7E8651
dd offset loc_7E894B
dd offset loc_7E87DF
dd offset loc_7E8AEE
dd offset loc_7E8B00
dd offset loc_7E8B12
dd offset loc_7E87AA
dd offset loc_7E8860
dd offset loc_7E8875
dd offset loc_7E87CA
dd offset loc_7E8921
dd offset loc_7E8B3E
byte_7E8F08 db	    0,	 14h,	  1,	 2 ; indirect table for	switch statement
db	3,     4,   14h,     5
db	6,     7,     8,     9
db    14h,   14h,   14h,   14h
db    14h,   0Ah,   0Bh,     6
db    0Ch,   0Dh,   0Ch,   0Dh
db    0Dh,   0Dh,   14h,   0Eh
db    0Fh,   10h,   11h,   14h
db    14h,   12h,   13h
align 4
off_7E8F2C dd offset loc_7E86FD	; jump table for switch	statement
dd offset loc_7E86DD
dd offset loc_7E86BD
dd offset loc_7E8712
byte_7E8F3C db	    0,	   0,	  0,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     1,     2
db	3,     3,     3,     3
db	3,     0,     3,     0
db	3,     3,     3,     3
db	0
align 4
off_7E8F58 dd offset loc_7E8900	; jump table for switch	statement
dd offset loc_7E88D6
dd offset loc_7E88C1
dd offset loc_7E88EB
dd offset loc_7E8912
byte_7E8F6C db	    0,	   0,	  0,	 4 ; indirect table for	switch statement
db	4,     4,     1,     4
db	4,     4,     4,     4
db	0,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     0
db	2,     3,     0,     0
off_7E8F88 dd offset loc_7E8BB4	; jump table for switch	statement
dd offset loc_7E8C00
dd offset loc_7E8C4C
dd offset loc_7E8C98
dd offset loc_7E8E76
dd offset loc_7E8BA6
dd offset loc_7E8CA8
dd offset loc_7E8B8E
dd offset loc_7E8E52
dd offset loc_7E8E2E
dd offset loc_7E8E9A
byte_7E8FB4 db	    0,	   1,	  2,   0Ah ; indirect table for	switch statement
db	3,     3,     3,   0Ah
db    0Ah,   0Ah,     4,   0Ah
db    0Ah,   0Ah,   0Ah,     3
db	3,     5,     6,     5
db	5,     5,     5,   0Ah
db	7,     3,   0Ah,     3
db	8,     9,     3,     3
off_7E8FD4 dd offset loc_7E8D3E	; jump table for switch	statement
dd offset loc_7E8D8A
dd offset loc_7E8DD3
dd offset loc_7E8D30
dd offset loc_7E8D18
dd offset loc_7E8E1C
byte_7E8FEC db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	3,     3,     3,     5
db	4
align 10h


; Attributes: bp-based frame

sub_7E9010 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E9026
or	eax, 0FFFFFFFFh
jmp	loc_7E9158

loc_7E9026:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 14h
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 7	; switch 8 cases
ja	short loc_7E9090 ; default
			; jumptable 007E9049 cases 1,3,5,6
mov	eax, [ebp+var_4]
jmp	ds:off_7E915C[eax*4] ; switch jump

loc_7E9050:		; jumptable 007E9049 case 7
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 1
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7E7080
add	esp, 10h
jmp	loc_7E9158

loc_7E9070:		; jumptable 007E9049 case 0
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 21h
jmp	loc_7E9158

loc_7E9085:		; jumptable 007E9049 cases 2,4
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	short loc_7E909F

loc_7E9090:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E9049 cases 1,3,5,6
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E9158

loc_7E909F:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7E9155
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 9
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 15h ; switch 22 cases
ja	short loc_7E9144 ; default
			; jumptable 007E90D5 cases 2-11,14,16-20
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7E918C[ecx]
jmp	ds:off_7E917C[edx*4] ; switch jump

loc_7E90DC:		; jumptable 007E90D5 case 21
mov	eax, [ebp+arg_4]
add	eax, 1
cmp	eax, [ebp+arg_8]
jnz	short loc_7E90EC
or	eax, 0FFFFFFFFh
jmp	short loc_7E9158

loc_7E90EC:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
sub	edx, 9
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 15h ; switch 22 cases
ja	short loc_7E912A ; jumptable 007E90D5 cases 0,1,12
			; jumptable 007E9117 cases 2-11,13-20
mov	eax, [ebp+var_C]
movzx	ecx, ds:byte_7E91AC[eax]
jmp	ds:off_7E91A4[ecx*4] ; switch jump

loc_7E911E:		; jumptable 007E9117 cases 0,1,12,21
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E9158

loc_7E912A:		; jumptable 007E90D5 cases 0,1,12
mov	ecx, [ebp+arg_C] ; jumptable 007E9117 cases 2-11,13-20
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 10h
jmp	short loc_7E9158

loc_7E9139:		; jumptable 007E90D5 cases 13,15
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	short loc_7E9150

loc_7E9144:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E90D5 cases 2-11,14,16-20
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E9158

loc_7E9150:
jmp	loc_7E909F

loc_7E9155:
or	eax, 0FFFFFFFFh

loc_7E9158:
mov	esp, ebp
pop	ebp
retn
sub_7E9010 endp

off_7E915C dd offset loc_7E9070	; jump table for switch	statement
dd offset loc_7E9090
dd offset loc_7E9085
dd offset loc_7E9090
dd offset loc_7E9085
dd offset loc_7E9090
dd offset loc_7E9090
dd offset loc_7E9050
off_7E917C dd offset loc_7E912A	; jump table for switch	statement
dd offset loc_7E9139
dd offset loc_7E90DC
dd offset loc_7E9144
byte_7E918C db	    0,	   0,	  3,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     3,     3
db	0,     1,     3,     1
db	3,     3,     3,     3
db	3,     2
align 4
off_7E91A4 dd offset loc_7E911E	; jump table for switch	statement
dd offset loc_7E912A
byte_7E91AC db	    0,	   0,	  1,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     0
align 10h


; Attributes: bp-based frame

sub_7E91D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E91E8
mov	eax, 0FFFFFFEAh
jmp	loc_7E94A4

loc_7E91E8:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 5
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 19h ; switch 26 cases
ja	loc_7E9333	; default
			; jumptable 007E9216 cases 3,6-15,18,20-23
mov	eax, [ebp+var_4]
movzx	ecx, ds:byte_7E94C4[eax]
jmp	ds:off_7E94A8[ecx*4] ; switch jump

loc_7E921D:		; jumptable 007E9216 case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E9235 ; jumptable 007E9216 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E94A4

loc_7E9235:		; jumptable 007E9216 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E9342

loc_7E9243:		; jumptable 007E9216 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E9258
mov	eax, 0FFFFFFFEh
jmp	loc_7E94A4

loc_7E9258:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+158h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E9281
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E94A4

loc_7E9281:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E9342

loc_7E928F:		; jumptable 007E9216 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E92A4
mov	eax, 0FFFFFFFEh
jmp	loc_7E94A4

loc_7E92A4:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E92CD
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E94A4

loc_7E92CD:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7E9342

loc_7E92D8:		; jumptable 007E9216 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E92ED
mov	eax, 0FFFFFFFEh
jmp	loc_7E94A4

loc_7E92ED:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E9316
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E94A4

loc_7E9316:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E9342

loc_7E9321:		; jumptable 007E9216 cases 4,5,16,25
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 16h
jmp	loc_7E94A4

loc_7E9333:		; default
mov	edx, [ebp+arg_C] ; jumptable 007E9216 cases 3,6-15,18,20-23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E94A4

loc_7E9342:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7E94A1
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7E9490	; default
			; jumptable 007E937C cases 3-12,14-16,18,23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7E94FC[ecx]
jmp	ds:off_7E94E0[edx*4] ; switch jump

loc_7E9383:		; jumptable 007E937C case 24
mov	eax, 1
test	eax, eax
jz	short loc_7E939B ; jumptable 007E937C cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E94A4

loc_7E939B:		; jumptable 007E937C cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	loc_7E949C

loc_7E93A9:		; jumptable 007E937C case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7E93BE
mov	eax, 0FFFFFFFEh
jmp	loc_7E94A4

loc_7E93BE:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14Ch]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E93E7
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E94A4

loc_7E93E7:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7E949C

loc_7E93F5:		; jumptable 007E937C case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7E940A
mov	eax, 0FFFFFFFEh
jmp	loc_7E94A4

loc_7E940A:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+150h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E9430
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E94A4

loc_7E9430:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7E949C

loc_7E943B:		; jumptable 007E937C case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7E944D
mov	eax, 0FFFFFFFEh
jmp	short loc_7E94A4

loc_7E944D:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+154h]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E9473
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E94A4

loc_7E9473:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7E949C

loc_7E947E:		; jumptable 007E937C case 13
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1Ch
jmp	short loc_7E94A4

loc_7E9490:		; default
mov	eax, [ebp+arg_C] ; jumptable 007E937C cases 3-12,14-16,18,23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7E94A4

loc_7E949C:
jmp	loc_7E9342

loc_7E94A1:
or	eax, 0FFFFFFFFh

loc_7E94A4:
mov	esp, ebp
pop	ebp
retn
sub_7E91D0 endp

off_7E94A8 dd offset loc_7E9243	; jump table for switch	statement
dd offset loc_7E928F
dd offset loc_7E92D8
dd offset loc_7E9321
dd offset loc_7E9235
dd offset loc_7E921D
dd offset loc_7E9333
byte_7E94C4 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	3,     3,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	3,     4,     6,     4
db	6,     6,     6,     6
db	5,     3
align 10h
off_7E94E0 dd offset loc_7E93A9	; jump table for switch	statement
dd offset loc_7E93F5
dd offset loc_7E943B
dd offset loc_7E947E
dd offset loc_7E939B
dd offset loc_7E9383
dd offset loc_7E9490
byte_7E94FC db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     3,     6,     6
db	6,     4,     6,     4
db	4,     4,     4,     6
db	5
align 10h


; Attributes: bp-based frame

sub_7E9520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E9536
or	eax, 0FFFFFFFFh
jmp	loc_7E97DF

loc_7E9536:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 5
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 18h ; switch 25 cases
ja	loc_7E966F	; default
			; jumptable 007E9564 cases 3-16,18,20-23
mov	eax, [ebp+var_4]
movzx	ecx, ds:byte_7E97FC[eax]
jmp	ds:off_7E97E4[ecx*4] ; switch jump

loc_7E956B:		; jumptable 007E9564 case 24
mov	edx, 1
test	edx, edx
jz	short loc_7E9583 ; jumptable 007E9564 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E97DF

loc_7E9583:		; jumptable 007E9564 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7E967E

loc_7E9591:		; jumptable 007E9564 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7E95A6
mov	eax, 0FFFFFFFEh
jmp	loc_7E97DF

loc_7E95A6:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+158h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E95CF
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E97DF

loc_7E95CF:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E967E

loc_7E95DD:		; jumptable 007E9564 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7E95F2
mov	eax, 0FFFFFFFEh
jmp	loc_7E97DF

loc_7E95F2:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+15Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E961B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E97DF

loc_7E961B:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7E967E

loc_7E9626:		; jumptable 007E9564 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7E963B
mov	eax, 0FFFFFFFEh
jmp	loc_7E97DF

loc_7E963B:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+160h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E9664
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E97DF

loc_7E9664:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7E967E

loc_7E966F:		; default
mov	eax, [ebp+arg_C] ; jumptable 007E9564 cases 3-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E97DF

loc_7E967E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7E97DA
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
sub	ecx, 5
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 1Fh ; switch 32 cases
ja	loc_7E97C9	; default
			; jumptable 007E96B8 cases 3,7-15,18,23,26,28-30
mov	edx, [ebp+var_8]
movzx	eax, ds:byte_7E9834[edx]
jmp	ds:off_7E9818[eax*4] ; switch jump

loc_7E96BF:		; jumptable 007E96B8 case 24
mov	ecx, 1
test	ecx, ecx
jz	short loc_7E96D7 ; jumptable 007E96B8 cases 17,19-22
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E97DF

loc_7E96D7:		; jumptable 007E96B8 cases 17,19-22
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	loc_7E97D5

loc_7E96E5:		; jumptable 007E96B8 case 0
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E96FA
mov	eax, 0FFFFFFFEh
jmp	loc_7E97DF

loc_7E96FA:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+14Ch]
call	eax
add	esp, 8
test	eax, eax
jnz	short loc_7E9723
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E97DF

loc_7E9723:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7E97D5

loc_7E9731:		; jumptable 007E96B8 case 1
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E9746
mov	eax, 0FFFFFFFEh
jmp	loc_7E97DF

loc_7E9746:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+150h]
call	edx
add	esp, 8
test	eax, eax
jnz	short loc_7E976C
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7E97DF

loc_7E976C:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7E97D5

loc_7E9777:		; jumptable 007E96B8 case 2
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E9789
mov	eax, 0FFFFFFFEh
jmp	short loc_7E97DF

loc_7E9789:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+154h]
call	ecx
add	esp, 8
test	eax, eax
jnz	short loc_7E97AF
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E97DF

loc_7E97AF:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7E97D5

loc_7E97BA:		; jumptable 007E96B8 cases 4-6,16,25,27,31
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 14h
jmp	short loc_7E97DF

loc_7E97C9:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007E96B8 cases 3,7-15,18,23,26,28-30
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7E97DF

loc_7E97D5:
jmp	loc_7E967E

loc_7E97DA:
mov	eax, 0FFFFFFECh

loc_7E97DF:
mov	esp, ebp
pop	ebp
retn
sub_7E9520 endp

align 4
off_7E97E4 dd offset loc_7E9591	; jump table for switch	statement
dd offset loc_7E95DD
dd offset loc_7E9626
dd offset loc_7E9583
dd offset loc_7E956B
dd offset loc_7E966F
byte_7E97FC db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7E9818 dd offset loc_7E96E5	; jump table for switch	statement
dd offset loc_7E9731
dd offset loc_7E9777
dd offset loc_7E97BA
dd offset loc_7E96D7
dd offset loc_7E96BF
dd offset loc_7E97C9
byte_7E9834 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	3,     3,     3,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	3,     4,     6,     4
db	4,     4,     4,     6
db	5,     3,     6,     3
db	6,     6,     6,     3
align 10h


; Attributes: bp-based frame

sub_7E9860 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 0Ch

loc_7E9866:
mov	eax, [ebp+arg_8]
cmp	eax, [ebp+arg_C]
jz	loc_7E9A05
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0Dh ; switch 14 cases
ja	loc_7E99F7	; default
			; jumptable 007E989D cases 2-4,9-11
mov	eax, [ebp+var_8]
movzx	ecx, ds:byte_7E9A24[eax]
jmp	ds:off_7E9A0C[ecx*4] ; switch jump

loc_7E98A4:		; jumptable 007E989D case 5
mov	edx, [ebp+arg_C]
sub	edx, [ebp+arg_8]
cmp	edx, 2
jge	short loc_7E98B9
mov	eax, 0FFFFFFFEh
jmp	loc_7E9A08

loc_7E98B9:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx+164h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E98E2
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7E9A08

loc_7E98E2:
mov	eax, [ebp+arg_8]
add	eax, 2
mov	[ebp+arg_8], eax
jmp	loc_7E9A00

loc_7E98F0:		; jumptable 007E989D case 6
mov	ecx, [ebp+arg_C]
sub	ecx, [ebp+arg_8]
cmp	ecx, 3
jge	short loc_7E9905
mov	eax, 0FFFFFFFEh
jmp	loc_7E9A08

loc_7E9905:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+168h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E992E
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7E9A08

loc_7E992E:
mov	edx, [ebp+arg_8]
add	edx, 3
mov	[ebp+arg_8], edx
jmp	loc_7E9A00

loc_7E993C:		; jumptable 007E989D case 7
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
cmp	eax, 4
jge	short loc_7E9951
mov	eax, 0FFFFFFFEh
jmp	loc_7E9A08

loc_7E9951:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_4]
mov	ecx, [eax+16Ch]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E997A
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E9A08

loc_7E997A:
mov	ecx, [ebp+arg_8]
add	ecx, 4
mov	[ebp+arg_8], ecx
jmp	short loc_7E9A00

loc_7E9985:		; jumptable 007E989D cases 0,1,8
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7E9A08

loc_7E9991:		; jumptable 007E989D cases 12,13
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_0]
jz	short loc_7E99A4
jmp	short loc_7E9A00

loc_7E99A4:
mov	eax, [ebp+arg_8]
cmp	eax, [ebp+arg_C]
jnz	short loc_7E99B3
mov	eax, 0FFFFFFE5h
jmp	short loc_7E9A08

loc_7E99B3:
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
sub	ecx, 9
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 15h ; switch 22 cases
ja	short loc_7E99F3 ; default
			; jumptable 007E99E5 cases 3-10,13-20
mov	edx, [ebp+var_C]
movzx	eax, ds:byte_7E9A3C[edx]
jmp	ds:off_7E9A34[eax*4] ; switch jump

loc_7E99EC:		; jumptable 007E99E5 cases 0-2,11,12,21
mov	eax, 1Bh
jmp	short loc_7E9A08

loc_7E99F3:		; default
xor	eax, eax	; jumptable 007E99E5 cases 3-10,13-20
jmp	short loc_7E9A08

loc_7E99F7:		; default
mov	ecx, [ebp+arg_8] ; jumptable 007E989D cases 2-4,9-11
add	ecx, 1
mov	[ebp+arg_8], ecx

loc_7E9A00:
jmp	loc_7E9866

loc_7E9A05:
or	eax, 0FFFFFFFFh

loc_7E9A08:
mov	esp, ebp
pop	ebp
retn
sub_7E9860 endp

off_7E9A0C dd offset loc_7E9985	; jump table for switch	statement
dd offset loc_7E98A4
dd offset loc_7E98F0
dd offset loc_7E993C
dd offset loc_7E9991
dd offset loc_7E99F7
byte_7E9A24 db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	4,     4
align 4
off_7E9A34 dd offset loc_7E99EC	; jump table for switch	statement
dd offset loc_7E99F3
byte_7E9A3C db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     0
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     0
align 10h


; Attributes: bp-based frame

sub_7E9A60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E9A78
mov	eax, 0FFFFFFFCh
jmp	loc_7E9BFF

loc_7E9A78:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx

loc_7E9A7E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7E9BF2
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
sub	ecx, 2
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 13h ; switch 20 cases
ja	loc_7E9BE4	; default
			; jumptable 007E9AB8 cases 2,6,9-18
mov	edx, [ebp+var_8]
movzx	eax, ds:byte_7E9C28[edx]
jmp	ds:off_7E9C04[eax*4] ; switch jump

loc_7E9ABF:		; jumptable 007E9AB8 case 3
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E9BED

loc_7E9ACD:		; jumptable 007E9AB8 case 4
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7E9BED

loc_7E9ADB:		; jumptable 007E9AB8 case 5
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7E9BED

loc_7E9AE9:		; jumptable 007E9AB8 case 1
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7E9B11
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E63A0
add	esp, 10h
jmp	loc_7E9BFF

loc_7E9B11:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7E9BFF

loc_7E9B23:		; jumptable 007E9AB8 case 0
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7E9BFF

loc_7E9B32:		; jumptable 007E9AB8 case 8
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7E9B4F
mov	edx, [ebp+arg_4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 7
jmp	loc_7E9BFF

loc_7E9B4F:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7E9BFF

loc_7E9B61:		; jumptable 007E9AB8 case 7
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jnz	short loc_7E9BAC
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E9B81
mov	eax, 0FFFFFFFDh
jmp	short loc_7E9BFF

loc_7E9B81:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
cmp	eax, 0Ah
jnz	short loc_7E9B9D
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E9B9D:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 7
jmp	short loc_7E9BFF

loc_7E9BAC:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7E9BFF

loc_7E9BBB:		; jumptable 007E9AB8 case 19
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jnz	short loc_7E9BD5
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 27h
jmp	short loc_7E9BFF

loc_7E9BD5:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	short loc_7E9BFF

loc_7E9BE4:		; default
mov	edx, [ebp+arg_4] ; jumptable 007E9AB8 cases 2,6,9-18
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E9BED:
jmp	loc_7E9A7E

loc_7E9BF2:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6

loc_7E9BFF:
mov	esp, ebp
pop	ebp
retn
sub_7E9A60 endp

align 4
off_7E9C04 dd offset loc_7E9B23	; jump table for switch	statement
dd offset loc_7E9AE9
dd offset loc_7E9ABF
dd offset loc_7E9ACD
dd offset loc_7E9ADB
dd offset loc_7E9B61
dd offset loc_7E9B32
dd offset loc_7E9BBB
dd offset loc_7E9BE4
byte_7E9C28 db	    0,	   1,	  8,	 2 ; indirect table for	switch statement
db	3,     4,     8,     5
db	6,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     7
align 10h


; Attributes: bp-based frame

sub_7E9C40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E9C58
mov	eax, 0FFFFFFFCh
jmp	loc_7E9DEE

loc_7E9C58:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx

loc_7E9C5E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7E9DE1
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_C]
sub	ecx, 3
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 1Bh ; switch 28 cases
ja	loc_7E9DD3	; default
			; jumptable 007E9C98 cases 1,5,8-26
mov	edx, [ebp+var_C]
movzx	eax, ds:byte_7E9E14[edx]
jmp	ds:off_7E9DF4[eax*4] ; switch jump

loc_7E9C9F:		; jumptable 007E9C98 case 2
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7E9DDC

loc_7E9CAD:		; jumptable 007E9C98 case 3
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7E9DDC

loc_7E9CBB:		; jumptable 007E9C98 case 4
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7E9DDC

loc_7E9CC9:		; jumptable 007E9C98 case 0
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7E9CF1
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7E63A0
add	esp, 10h
jmp	loc_7E9DEE

loc_7E9CF1:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7E9DEE

loc_7E9D03:		; jumptable 007E9C98 case 27
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7E9D3B
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 1
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7E91D0
add	esp, 10h
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
sub	eax, 16h
neg	eax
sbb	eax, eax
and	eax, [ebp+var_8]
jmp	loc_7E9DEE

loc_7E9D3B:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7E9DEE

loc_7E9D4D:		; jumptable 007E9C98 case 7
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jnz	short loc_7E9D6A
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 7
jmp	loc_7E9DEE

loc_7E9D6A:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	short loc_7E9DEE

loc_7E9D79:		; jumptable 007E9C98 case 6
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7E9DC4
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7E9D99
mov	eax, 0FFFFFFFDh
jmp	short loc_7E9DEE

loc_7E9D99:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
cmp	edx, 0Ah
jnz	short loc_7E9DB5
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax

loc_7E9DB5:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 7
jmp	short loc_7E9DEE

loc_7E9DC4:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	short loc_7E9DEE

loc_7E9DD3:		; default
mov	edx, [ebp+arg_4] ; jumptable 007E9C98 cases 1,5,8-26
add	edx, 1
mov	[ebp+arg_4], edx

loc_7E9DDC:
jmp	loc_7E9C5E

loc_7E9DE1:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6

loc_7E9DEE:
mov	esp, ebp
pop	ebp
retn
sub_7E9C40 endp

align 4
off_7E9DF4 dd offset loc_7E9CC9	; jump table for switch	statement
dd offset loc_7E9C9F
dd offset loc_7E9CAD
dd offset loc_7E9CBB
dd offset loc_7E9D79
dd offset loc_7E9D4D
dd offset loc_7E9D03
dd offset loc_7E9DD3
byte_7E9E14 db	    0,	   7,	  1,	 2 ; indirect table for	switch statement
db	3,     7,     4,     5
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     6


; Attributes: bp-based frame

sub_7E9E30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	[ebp+var_4], 0
xor	eax, eax
jz	short loc_7E9E61
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
and	edx, 0
jz	short loc_7E9E61
mov	eax, [ebp+var_8]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
add	ecx, [ebp+var_8]
mov	[ebp+arg_8], ecx

loc_7E9E61:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7EA05A
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 8	; switch 9 cases
ja	loc_7EA04C	; default
			; jumptable 007E9E8B case 3
mov	ecx, [ebp+var_C]
jmp	ds:off_7EA064[ecx*4] ; switch jump

loc_7E9E92:		; jumptable 007E9E8B case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7E9EA7
mov	eax, 0FFFFFFFEh
jmp	loc_7EA05D

loc_7E9EA7:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+164h]
call	eax
add	esp, 8
test	eax, eax
jz	short loc_7E9ED0
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EA05D

loc_7E9ED0:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EA055

loc_7E9EDE:		; jumptable 007E9E8B case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7E9EF3
mov	eax, 0FFFFFFFEh
jmp	loc_7EA05D

loc_7E9EF3:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+168h]
call	edx
add	esp, 8
test	eax, eax
jz	short loc_7E9F1C
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EA05D

loc_7E9F1C:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7EA055

loc_7E9F2A:		; jumptable 007E9E8B case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7E9F3F
mov	eax, 0FFFFFFFEh
jmp	loc_7EA05D

loc_7E9F3F:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+16Ch]
call	ecx
add	esp, 8
test	eax, eax
jz	short loc_7E9F68
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EA05D

loc_7E9F68:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7EA055

loc_7E9F76:		; jumptable 007E9E8B cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EA05D

loc_7E9F85:		; jumptable 007E9E8B case 2
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7E9F9E
or	eax, 0FFFFFFFFh
jmp	loc_7EA05D

loc_7E9F9E:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 21h
jnz	short loc_7E9FDF
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E9FC2
or	eax, 0FFFFFFFFh
jmp	loc_7EA05D

loc_7E9FC2:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 5Bh
jnz	short loc_7E9FDF
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7E9FDF:
jmp	short loc_7EA055

loc_7E9FE1:		; jumptable 007E9E8B case 4
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7E9FF7
or	eax, 0FFFFFFFFh
jmp	short loc_7EA05D

loc_7E9FF7:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 5Dh
jnz	short loc_7EA04A
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EA018
or	eax, 0FFFFFFFFh
jmp	short loc_7EA05D

loc_7EA018:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 3Eh
jnz	short loc_7EA04A
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	[ebp+var_4], 0
jnz	short loc_7EA041
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 2Ah
jmp	short loc_7EA05D

loc_7EA041:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_7EA04A:
jmp	short loc_7EA055

loc_7EA04C:		; default
mov	edx, [ebp+arg_4] ; jumptable 007E9E8B case 3
add	edx, 1
mov	[ebp+arg_4], edx

loc_7EA055:
jmp	loc_7E9E61

loc_7EA05A:
or	eax, 0FFFFFFFFh

loc_7EA05D:
mov	esp, ebp
pop	ebp
retn
sub_7E9E30 endp

align 4
off_7EA064 dd offset loc_7E9F76	; jump table for switch	statement
dd offset loc_7E9F76
dd offset loc_7E9F85
dd offset loc_7EA04C
dd offset loc_7E9FE1
dd offset loc_7E9E92
dd offset loc_7E9EDE
dd offset loc_7E9F2A
dd offset loc_7E9F76
align 10h


; Attributes: bp-based frame

sub_7EA090 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_8]
sub	ecx, 1
mov	[ebp+arg_8], ecx
jmp	short loc_7EA0B3

loc_7EA0AA:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7EA0B3:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EA141
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 9
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 1Ah ; switch 27 cases
ja	short loc_7EA118 ; default
			; jumptable 007EA0E9 cases 2,3,11,19,20
mov	eax, [ebp+var_4]
movzx	ecx, ds:byte_7EA15C[eax]
jmp	ds:off_7EA14C[ecx*4] ; switch jump

loc_7EA0F0:		; jumptable 007EA0E9 cases 0,1,4-10,14-16,18,21-26
jmp	short loc_7EA13C

loc_7EA0F2:		; jumptable 007EA0E9 case 12
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 9
jnz	short loc_7EA109
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EA146

loc_7EA109:
jmp	short loc_7EA13C

loc_7EA10B:		; jumptable 007EA0E9 cases 13,17
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
and	ecx, 0FFFFFF80h
jnz	short loc_7EA118 ; default
			; jumptable 007EA0E9 cases 2,3,11,19,20
jmp	short loc_7EA13C

loc_7EA118:		; default
mov	edx, [ebp+arg_4] ; jumptable 007EA0E9 cases 2,3,11,19,20
mov	al, [edx]
mov	[ebp+var_8], al
cmp	[ebp+var_8], 24h
jz	short loc_7EA12E
cmp	[ebp+var_8], 40h
jz	short loc_7EA12E
jmp	short loc_7EA130

loc_7EA12E:
jmp	short loc_7EA13C

loc_7EA130:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EA146

loc_7EA13C:
jmp	loc_7EA0AA

loc_7EA141:
mov	eax, 1

loc_7EA146:
mov	esp, ebp
pop	ebp
retn
sub_7EA090 endp

align 4
off_7EA14C dd offset loc_7EA0F0	; jump table for switch	statement
dd offset loc_7EA0F2
dd offset loc_7EA10B
dd offset loc_7EA118
byte_7EA15C db	    0,	   0,	  3,	 3 ; indirect table for	switch statement
db	0,     0,     0,     0
db	0,     0,     0,     3
db	1,     2,     0,     0
db	0,     2,     0,     3
db	3,     0,     0,     0
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7EA180 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], 1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	short loc_7EA1AF

loc_7EA1A6:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7EA1AF:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 3
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 1Ah ; switch 27 cases
ja	loc_7EA472	; default
			; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25
mov	ecx, [ebp+var_10]
movzx	edx, ds:byte_7EA4A8[ecx]
jmp	ds:off_7EA47C[edx*4] ; switch jump

loc_7EA1E4:		; jumptable 007EA1DD case 2
cmp	[ebp+var_C], 0
jnz	short loc_7EA216
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7EA20F
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx+ecx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	byte ptr [edx+ecx+0Ch],	1

loc_7EA20F:
mov	[ebp+var_C], 1

loc_7EA216:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	loc_7EA472	; default
			; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA224:		; jumptable 007EA1DD case 3
cmp	[ebp+var_C], 0
jnz	short loc_7EA256
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7EA24F
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax+edx], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	byte ptr [eax+edx+0Ch],	1

loc_7EA24F:
mov	[ebp+var_C], 1

loc_7EA256:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7EA472	; default
			; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA264:		; jumptable 007EA1DD case 4
cmp	[ebp+var_C], 0
jnz	short loc_7EA296
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7EA28F
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx+eax], edx
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	1

loc_7EA28F:
mov	[ebp+var_C], 1

loc_7EA296:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7EA472	; default
			; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA2A4:		; jumptable 007EA1DD cases 19,21,26
cmp	[ebp+var_C], 0
jnz	short loc_7EA2D6
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7EA2CF
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx+ecx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	byte ptr [edx+ecx+0Ch],	1

loc_7EA2CF:
mov	[ebp+var_C], 1

loc_7EA2D6:		; default
jmp	loc_7EA472	; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA2DB:		; jumptable 007EA1DD case 9
cmp	[ebp+var_C], 2
jz	short loc_7EA30C
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7EA2FC
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	[eax+edx+4], ecx

loc_7EA2FC:
mov	[ebp+var_C], 2
mov	[ebp+var_4], 0Ch
jmp	short loc_7EA33A

loc_7EA30C:
cmp	[ebp+var_4], 0Ch
jnz	short loc_7EA33A
mov	[ebp+var_C], 0
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7EA331
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax+edx+8], ecx

loc_7EA331:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_7EA33A:		; default
jmp	loc_7EA472	; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA33F:		; jumptable 007EA1DD case 10
cmp	[ebp+var_C], 2
jz	short loc_7EA370
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7EA360
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	[eax+edx+4], ecx

loc_7EA360:
mov	[ebp+var_C], 2
mov	[ebp+var_4], 0Dh
jmp	short loc_7EA39E

loc_7EA370:
cmp	[ebp+var_4], 0Dh
jnz	short loc_7EA39E
mov	[ebp+var_C], 0
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7EA395
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax+edx+8], ecx

loc_7EA395:
mov	edx, [ebp+var_8]
add	edx, 1
mov	[ebp+var_8], edx

loc_7EA39E:		; default
jmp	loc_7EA472	; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA3A3:		; jumptable 007EA1DD case 0
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7EA3B9
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	byte ptr [edx+ecx+0Ch],	0

loc_7EA3B9:		; default
jmp	loc_7EA472	; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA3BE:		; jumptable 007EA1DD case 18
cmp	[ebp+var_C], 1
jnz	short loc_7EA3CD
mov	[ebp+var_C], 0
jmp	short loc_7EA438

loc_7EA3CD:
cmp	[ebp+var_C], 2
jnz	short loc_7EA438
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7EA438
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
movsx	eax, byte ptr [edx+ecx+0Ch]
test	eax, eax
jz	short loc_7EA438
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
cmp	eax, [edx+ecx+4]
jz	short loc_7EA42A
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 20h
jnz	short loc_7EA42A
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 20h
jz	short loc_7EA42A
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
cmp	edx, [ebp+var_4]
jnz	short loc_7EA438

loc_7EA42A:
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	0

loc_7EA438:		; default
jmp	short loc_7EA472 ; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA43A:		; jumptable 007EA1DD cases 6,7
cmp	[ebp+var_C], 1
jnz	short loc_7EA449
mov	[ebp+var_C], 0
jmp	short loc_7EA465

loc_7EA449:
cmp	[ebp+var_C], 2
jnz	short loc_7EA465
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7EA465
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	0

loc_7EA465:		; default
jmp	short loc_7EA472 ; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA467:		; jumptable 007EA1DD cases 8,14
cmp	[ebp+var_C], 2
jz	short loc_7EA472 ; default
			; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25
mov	eax, [ebp+var_8]
jmp	short loc_7EA477

loc_7EA472:		; default
jmp	loc_7EA1A6	; jumptable 007EA1DD cases 1,5,11-13,15-17,20,22-25

loc_7EA477:
mov	esp, ebp
pop	ebp
retn
sub_7EA180 endp

align 4
off_7EA47C dd offset loc_7EA3A3	; jump table for switch	statement
dd offset loc_7EA1E4
dd offset loc_7EA224
dd offset loc_7EA264
dd offset loc_7EA43A
dd offset loc_7EA467
dd offset loc_7EA2DB
dd offset loc_7EA33F
dd offset loc_7EA3BE
dd offset loc_7EA2A4
dd offset loc_7EA472
byte_7EA4A8 db	    0,	 0Ah,	  1,	 2 ; indirect table for	switch statement
db	3,   0Ah,     4,     4
db	5,     6,     7,   0Ah
db    0Ah,   0Ah,     5,   0Ah
db    0Ah,   0Ah,     8,     9
db    0Ah,     9,   0Ah,   0Ah
db    0Ah,   0Ah,     9
align 10h


; Attributes: bp-based frame

sub_7EA4D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 78h
jnz	loc_7EA5A1
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
jmp	short loc_7EA509

loc_7EA500:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx

loc_7EA509:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 3Bh
jz	loc_7EA59F
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 30h
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 36h ; switch 55 cases
ja	short loc_7EA58C ; default
			; jumptable 007EA540 cases 10-16,23-48
mov	edx, [ebp+var_10]
movzx	eax, ds:byte_7EA608[edx]
jmp	ds:off_7EA5F8[eax*4] ; switch jump

loc_7EA547:		; jumptable 007EA540 cases 0-9
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
sub	edx, 30h
or	edx, [ebp+var_4]
mov	[ebp+var_4], edx
jmp	short loc_7EA58C ; default
			; jumptable 007EA540 cases 10-16,23-48

loc_7EA55E:		; jumptable 007EA540 cases 17-22
mov	eax, [ebp+var_4]
shl	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
mov	edx, [ebp+var_4]
lea	eax, [edx+ecx-37h]
mov	[ebp+var_4], eax
jmp	short loc_7EA58C ; default
			; jumptable 007EA540 cases 10-16,23-48

loc_7EA576:		; jumptable 007EA540 cases 49-54
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx-57h]
mov	[ebp+var_4], ecx

loc_7EA58C:		; default
cmp	[ebp+var_4], 110000h ; jumptable 007EA540 cases	10-16,23-48
jl	short loc_7EA59A
or	eax, 0FFFFFFFFh
jmp	short loc_7EA5F2

loc_7EA59A:
jmp	loc_7EA500

loc_7EA59F:
jmp	short loc_7EA5E6

loc_7EA5A1:
jmp	short loc_7EA5AC

loc_7EA5A3:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx

loc_7EA5AC:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Bh
jz	short loc_7EA5E6
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
imul	ecx, 0Ah
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx-30h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 110000h
jl	short loc_7EA5E4
or	eax, 0FFFFFFFFh
jmp	short loc_7EA5F2

loc_7EA5E4:
jmp	short loc_7EA5A3

loc_7EA5E6:
mov	edx, [ebp+var_4]
push	edx
call	sub_7F6EB0
add	esp, 4

loc_7EA5F2:
mov	esp, ebp
pop	ebp
retn
sub_7EA4D0 endp

align 4
off_7EA5F8 dd offset loc_7EA547, offset	loc_7EA55E ; jump table	for switch statement
dd offset loc_7EA576, offset loc_7EA58C
byte_7EA608 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	0,     0,     0,     0
db	0,     0,     3,     3
db	3,     3,     3,     3
db	3,     1,     1,     1
db	1,     1,     1,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     2,     2,     2
db	2,     2,     2
align 10h


; Attributes: bp-based frame

sub_7EA640 proc	near

var_C= byte ptr	-0Ch
var_8= byte ptr	-8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 2
jz	short loc_7EA66A
cmp	[ebp+var_4], 3
jz	short loc_7EA6A5
cmp	[ebp+var_4], 4
jz	loc_7EA6E7
jmp	loc_7EA788

loc_7EA66A:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 74h
jnz	short loc_7EA6A0
mov	eax, [ebp+arg_4]
mov	cl, [eax]
mov	[ebp+var_8], cl
cmp	[ebp+var_8], 67h
jz	short loc_7EA696
cmp	[ebp+var_8], 6Ch
jz	short loc_7EA68C
jmp	short loc_7EA6A0

loc_7EA68C:
mov	eax, 3Ch
jmp	loc_7EA78A

loc_7EA696:
mov	eax, 3Eh
jmp	loc_7EA78A

loc_7EA6A0:
jmp	loc_7EA788

loc_7EA6A5:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 61h
jnz	short loc_7EA6E2
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 6Dh
jnz	short loc_7EA6E2
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 70h
jnz	short loc_7EA6E2
mov	eax, 26h
jmp	loc_7EA78A

loc_7EA6E2:
jmp	loc_7EA788

loc_7EA6E7:
mov	ecx, [ebp+arg_4]
mov	dl, [ecx]
mov	[ebp+var_C], dl
cmp	[ebp+var_C], 61h
jz	short loc_7EA745
cmp	[ebp+var_C], 71h
jz	short loc_7EA700
jmp	loc_7EA788

loc_7EA700:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 75h
jnz	short loc_7EA743
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 6Fh
jnz	short loc_7EA743
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 74h
jnz	short loc_7EA743
mov	eax, 22h
jmp	short loc_7EA78A

loc_7EA743:
jmp	short loc_7EA788

loc_7EA745:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 70h
jnz	short loc_7EA788
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 6Fh
jnz	short loc_7EA788
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 73h
jnz	short loc_7EA788
mov	eax, 27h
jmp	short loc_7EA78A

loc_7EA788:
xor	eax, eax

loc_7EA78A:
mov	esp, ebp
pop	ebp
retn
sub_7EA640 endp

align 10h


; Attributes: bp-based frame

sub_7EA790 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8

loc_7EA796:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 5
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 18h ; switch 25 cases
ja	loc_7EA927	; default
			; jumptable 007EA7C4 cases 3-16,23
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7EA9A0[edx]
jmp	ds:off_7EA98C[eax*4] ; switch jump

loc_7EA7CB:		; jumptable 007EA7C4 case 2
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
cmp	ecx, edx
jz	short loc_7EA7F4 ; jumptable 007EA7C4 case 1
xor	eax, eax
jmp	loc_7EA988

loc_7EA7F4:		; jumptable 007EA7C4 case 1
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
cmp	ecx, edx
jz	short loc_7EA81D ; jumptable 007EA7C4 case 0
xor	eax, eax
jmp	loc_7EA988

loc_7EA81D:		; jumptable 007EA7C4 case 0
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
cmp	ecx, edx
jz	short loc_7EA846
xor	eax, eax
jmp	loc_7EA988

loc_7EA846:
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
cmp	ecx, edx
jz	short loc_7EA86F
xor	eax, eax
jmp	loc_7EA988

loc_7EA86F:
jmp	loc_7EA983

loc_7EA874:		; jumptable 007EA7C4 cases 17-22,24
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_8]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
cmp	ecx, edx
jz	short loc_7EA89D
xor	eax, eax
jmp	loc_7EA988

loc_7EA89D:
xor	ecx, ecx
jz	loc_7EA925
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
cmp	edx, eax
jz	short loc_7EA8CE
xor	eax, eax
jmp	loc_7EA988

loc_7EA8CE:
xor	edx, edx
jz	short loc_7EA925
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	edx, [ebp+arg_8]
add	edx, 1
mov	[ebp+arg_8], edx
cmp	eax, ecx
jz	short loc_7EA8FB
xor	eax, eax
jmp	loc_7EA988

loc_7EA8FB:
xor	eax, eax
jz	short loc_7EA925
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_8]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
cmp	ecx, edx
jz	short loc_7EA925
xor	eax, eax
jmp	short loc_7EA988

loc_7EA925:
jmp	short loc_7EA983

loc_7EA927:		; default
mov	ecx, 1		; jumptable 007EA7C4 cases 3-16,23
test	ecx, ecx
jz	short loc_7EA947
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
cmp	eax, edx
jnz	short loc_7EA947
mov	eax, 1
jmp	short loc_7EA988

loc_7EA947:
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
sub	ecx, 5
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	short loc_7EA97C ; default
			; jumptable 007EA971 cases 3-16,23
mov	edx, [ebp+var_8]
movzx	eax, ds:byte_7EA9C4[edx]
jmp	ds:off_7EA9BC[eax*4] ; switch jump

loc_7EA978:		; jumptable 007EA971 cases 0-2,17-22,24
xor	eax, eax
jmp	short loc_7EA988

loc_7EA97C:		; default
mov	eax, 1		; jumptable 007EA971 cases 3-16,23
jmp	short loc_7EA988

loc_7EA983:
jmp	loc_7EA796

loc_7EA988:
mov	esp, ebp
pop	ebp
retn
sub_7EA790 endp

off_7EA98C dd offset loc_7EA81D	; jump table for switch	statement
dd offset loc_7EA7F4
dd offset loc_7EA7CB
dd offset loc_7EA874
dd offset loc_7EA927
byte_7EA9A0 db	    0,	   1,	  2,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3,     3,     3
db	3,     3,     3,     4
db	3
align 4
off_7EA9BC dd offset loc_7EA978	; jump table for switch	statement
dd offset loc_7EA97C
byte_7EA9C4 db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     0,     0,     0
db	0,     0,     0,     1
db	0
align 10h


; Attributes: bp-based frame

sub_7EA9E0 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
jmp	short loc_7EA9F7

loc_7EA9E5:
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_C]
add	ecx, 1
mov	[ebp+arg_C], ecx

loc_7EA9F7:
mov	edx, [ebp+arg_C]
movsx	eax, byte ptr [edx]
test	eax, eax
jz	short loc_7EAA23
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EAA0D
xor	eax, eax
jmp	short loc_7EAA30

loc_7EAA0D:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_C]
movsx	edx, byte ptr [ecx]
cmp	eax, edx
jz	short loc_7EAA21
xor	eax, eax
jmp	short loc_7EAA30

loc_7EAA21:
jmp	short loc_7EA9E5

loc_7EAA23:
mov	eax, [ebp+arg_4]
xor	ecx, ecx
cmp	eax, [ebp+arg_8]
setz	cl
mov	eax, ecx

loc_7EAA30:
pop	ebp
retn
sub_7EA9E0 endp

align 10h


; Attributes: bp-based frame

sub_7EAA40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax

loc_7EAA4C:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
sub	edx, 5
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	short loc_7EAAA9 ; default
			; jumptable 007EAA76 cases 3-16,23
mov	eax, [ebp+var_8]
movzx	ecx, ds:byte_7EAACC[eax]
jmp	ds:off_7EAAB8[ecx*4] ; switch jump

loc_7EAA7D:		; jumptable 007EAA76 case 0
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EAAB1

loc_7EAA88:		; jumptable 007EAA76 case 1
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7EAAB1

loc_7EAA93:		; jumptable 007EAA76 case 2
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7EAAB1

loc_7EAA9E:		; jumptable 007EAA76 cases 17-22,24
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	short loc_7EAAB1

loc_7EAAA9:		; default
mov	eax, [ebp+arg_4] ; jumptable 007EAA76 cases 3-16,23
sub	eax, [ebp+var_4]
jmp	short loc_7EAAB3

loc_7EAAB1:
jmp	short loc_7EAA4C

loc_7EAAB3:
mov	esp, ebp
pop	ebp
retn
sub_7EAA40 endp

align 4
off_7EAAB8 dd offset loc_7EAA7D	; jump table for switch	statement
dd offset loc_7EAA88
dd offset loc_7EAA93
dd offset loc_7EAA9E
dd offset loc_7EAAA9
byte_7EAACC db	    0,	   1,	  2,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3,     3,     3
db	3,     3,     3,     4
db	3
align 10h


; Attributes: bp-based frame

sub_7EAAF0 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx

loc_7EAAF4:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+4Ch]
mov	[ebp+var_4], al
cmp	[ebp+var_4], 9
jb	short loc_7EAB23
cmp	[ebp+var_4], 0Ah
jbe	short loc_7EAB18
cmp	[ebp+var_4], 15h
jz	short loc_7EAB18
jmp	short loc_7EAB23

loc_7EAB18:
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
jmp	short loc_7EAB28

loc_7EAB23:
mov	eax, [ebp+arg_4]
jmp	short loc_7EAB2A

loc_7EAB28:
jmp	short loc_7EAAF4

loc_7EAB2A:
mov	esp, ebp
pop	ebp
retn
sub_7EAAF0 endp

align 10h


; Attributes: bp-based frame

sub_7EAB30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx

loc_7EAB34:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EAC17
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_4]
sub	edx, 5
mov	[ebp+var_4], edx
cmp	[ebp+var_4], 5	; switch 6 cases
ja	loc_7EABFA	; default
			; jumptable 007EAB67 case 3
mov	eax, [ebp+var_4]
jmp	ds:off_7EAC1C[eax*4] ; switch jump

loc_7EAB6E:		; jumptable 007EAB67 case 0
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7EAC03

loc_7EAB7C:		; jumptable 007EAB67 case 1
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7EAC03

loc_7EAB87:		; jumptable 007EAB67 case 2
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EAC03

loc_7EAB92:		; jumptable 007EAB67 case 5
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx+4], 0FFFFFFFFh
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	short loc_7EAC03

loc_7EABB4:		; jumptable 007EAB67 case 4
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	short loc_7EABEE
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
cmp	edx, 0Ah
jnz	short loc_7EABEE
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax

loc_7EABEE:
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx+4], 0FFFFFFFFh
jmp	short loc_7EAC03

loc_7EABFA:		; default
mov	edx, [ebp+arg_4] ; jumptable 007EAB67 case 3
add	edx, 1
mov	[ebp+arg_4], edx

loc_7EAC03:
mov	eax, [ebp+arg_C]
mov	ecx, [eax+4]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx+4], ecx
jmp	loc_7EAB34

loc_7EAC17:
mov	esp, ebp
pop	ebp
retn
sub_7EAB30 endp

align 4
off_7EAC1C dd offset loc_7EAB6E	; jump table for switch	statement
dd offset loc_7EAB7C
dd offset loc_7EAB87
dd offset loc_7EABFA
dd offset loc_7EABB4
dd offset loc_7EAB92
align 10h


; Attributes: bp-based frame

sub_7EAC40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
sub	ecx, [eax]
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_10]
sub	eax, [edx]
cmp	ecx, eax
jle	short loc_7EAC98
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
mov	eax, [ebp+arg_4]
add	edx, [eax]
mov	[ebp+arg_8], edx
jmp	short loc_7EAC75

loc_7EAC6C:
mov	ecx, [ebp+arg_8]
sub	ecx, 1
mov	[ebp+arg_8], ecx

loc_7EAC75:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_8]
cmp	eax, [edx]
jbe	short loc_7EAC98
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx-1]
and	edx, 0C0h
cmp	edx, 80h
jz	short loc_7EAC96
jmp	short loc_7EAC98

loc_7EAC96:
jmp	short loc_7EAC6C

loc_7EAC98:
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_8], eax
jmp	short loc_7EACBC

loc_7EACAA:
mov	ecx, [ebp+var_8]
add	ecx, 1
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_7EACBC:
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jz	short loc_7EACD0
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	al, [edx]
mov	[ecx], al
jmp	short loc_7EACAA

loc_7EACD0:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn
sub_7EAC40 endp

align 10h


; Attributes: bp-based frame

sub_7EACF0 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	[ebp+var_8], eax

loc_7EAD06:
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jz	loc_7EAE73
mov	edx, [ebp+var_4]
cmp	edx, [ebp+arg_10]
jz	loc_7EAE73
mov	eax, [ebp+var_8]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
mov	al, [edx+ecx+4Ch]
mov	[ebp+var_10], al
cmp	[ebp+var_10], 5
jz	short loc_7EAD45
cmp	[ebp+var_10], 6
jz	short loc_7EAD7A
cmp	[ebp+var_10], 7
jz	short loc_7EADBE
jmp	loc_7EAE4F

loc_7EAD45:
mov	ecx, [ebp+var_8]
movsx	edx, byte ptr [ecx]
and	edx, 1Fh
shl	edx, 6
mov	eax, [ebp+var_8]
movsx	ecx, byte ptr [eax+1]
and	ecx, 3Fh
or	edx, ecx
mov	eax, [ebp+var_4]
mov	[eax], dx
mov	ecx, [ebp+var_4]
add	ecx, 2
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
add	edx, 2
mov	[ebp+var_8], edx
jmp	loc_7EAE6E

loc_7EAD7A:
mov	eax, [ebp+var_8]
movsx	ecx, byte ptr [eax]
and	ecx, 0Fh
shl	ecx, 0Ch
mov	edx, [ebp+var_8]
movsx	eax, byte ptr [edx+1]
and	eax, 3Fh
shl	eax, 6
or	ecx, eax
mov	edx, [ebp+var_8]
movsx	eax, byte ptr [edx+2]
and	eax, 3Fh
or	ecx, eax
mov	edx, [ebp+var_4]
mov	[edx], cx
mov	eax, [ebp+var_4]
add	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 3
mov	[ebp+var_8], ecx
jmp	loc_7EAE6E

loc_7EADBE:
mov	edx, [ebp+var_4]
add	edx, 2
cmp	edx, [ebp+arg_10]
jnz	short loc_7EADCE
jmp	loc_7EAE73

loc_7EADCE:
mov	eax, [ebp+var_8]
movsx	ecx, byte ptr [eax]
and	ecx, 7
shl	ecx, 12h
mov	edx, [ebp+var_8]
movsx	eax, byte ptr [edx+1]
and	eax, 3Fh
shl	eax, 0Ch
or	ecx, eax
mov	edx, [ebp+var_8]
movsx	eax, byte ptr [edx+2]
and	eax, 3Fh
shl	eax, 6
or	ecx, eax
mov	edx, [ebp+var_8]
movsx	eax, byte ptr [edx+3]
and	eax, 3Fh
or	ecx, eax
mov	[ebp+var_C], ecx
mov	ecx, [ebp+var_C]
sub	ecx, 10000h
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
shr	edx, 0Ah
or	edx, 0D800h
mov	eax, [ebp+var_4]
mov	[eax], dx
mov	ecx, [ebp+var_C]
and	ecx, 3FFh
or	ecx, 0DC00h
mov	edx, [ebp+var_4]
mov	[edx+2], cx
mov	eax, [ebp+var_4]
add	eax, 4
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_8]
add	ecx, 4
mov	[ebp+var_8], ecx
jmp	short loc_7EAE6E

loc_7EAE4F:
mov	edx, [ebp+var_8]
movsx	ax, byte ptr [edx]
mov	ecx, [ebp+var_4]
mov	[ecx], ax
mov	edx, [ebp+var_4]
add	edx, 2
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7EAE6E:
jmp	loc_7EAD06

loc_7EAE73:
mov	ecx, [ebp+arg_4]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
mov	esp, ebp
pop	ebp
retn
sub_7EACF0 endp

align 10h


; Attributes: bp-based frame

sub_7EAE90 proc	near

var_1= byte ptr	-1
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx

loc_7EAE94:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EAEA3
jmp	loc_7EAF55

loc_7EAEA3:
mov	edx, [ebp+arg_4]
mov	eax, [edx]
mov	cl, [eax]
mov	[ebp+var_1], cl
movzx	edx, [ebp+var_1]
and	edx, 80h
jz	short loc_7EAF1C
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_10]
sub	ecx, [eax]
cmp	ecx, 2
jge	short loc_7EAECB
jmp	loc_7EAF55

loc_7EAECB:
movzx	edx, [ebp+var_1]
sar	edx, 6
or	edx, 0C0h
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ecx], dl
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
movzx	edx, [ebp+var_1]
and	edx, 3Fh
or	edx, 80h
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ecx], dl
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	edx, [ebp+arg_4]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
jmp	short loc_7EAF50

loc_7EAF1C:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
cmp	eax, [ebp+arg_10]
jnz	short loc_7EAF28
jmp	short loc_7EAF55

loc_7EAF28:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	dl, [edx]
mov	[ecx], dl
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_4]
mov	[edx], ecx

loc_7EAF50:
jmp	loc_7EAE94

loc_7EAF55:
mov	esp, ebp
pop	ebp
retn
sub_7EAE90 endp

align 10h


; Attributes: bp-based frame

sub_7EAF60 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp

loc_7EAF63:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_8]
jz	short loc_7EAFA4
mov	edx, [ebp+arg_C]
mov	eax, [edx]
cmp	eax, [ebp+arg_10]
jz	short loc_7EAFA4
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
movzx	dx, byte ptr [edx]
mov	[ecx], dx
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_4]
mov	[edx], ecx
jmp	short loc_7EAF63

loc_7EAFA4:
pop	ebp
retn
sub_7EAF60 endp

align 10h


; Attributes: bp-based frame

sub_7EAFB0 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp

loc_7EAFB3:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_8]
jz	short loc_7EAFF1
mov	edx, [ebp+arg_C]
mov	eax, [edx]
cmp	eax, [ebp+arg_10]
jz	short loc_7EAFF1
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	dl, [edx]
mov	[ecx], dl
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_4]
mov	[edx], ecx
jmp	short loc_7EAFB3

loc_7EAFF1:
pop	ebp
retn
sub_7EAFB0 endp

align 10h


; Attributes: bp-based frame

sub_7EB000 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
jmp	short loc_7EB019

loc_7EB010:
mov	edx, [ebp+var_4]
add	edx, 2
mov	[ebp+var_4], edx

loc_7EB019:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EB289
mov	ecx, [ebp+var_4]
mov	dl, [ecx]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_4]
mov	cl, [eax+1]
mov	[ebp+var_7], cl
movzx	edx, [ebp+var_7]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0DBh ; switch 220	cases
ja	loc_7EB104	; default
			; jumptable 007EB054 cases 8-215
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7EB2A8[eax]
jmp	ds:off_7EB298[ecx*4] ; switch jump

loc_7EB05B:		; jumptable 007EB054 case 0
movzx	edx, [ebp+var_5]
cmp	edx, 80h
jge	short loc_7EB09A ; jumptable 007EB054 cases 1-7
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_10]
jnz	short loc_7EB07E
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx], eax
jmp	loc_7EB291

loc_7EB07E:
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	al, [ebp+var_5]
mov	[edx], al
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
jmp	loc_7EB284

loc_7EB09A:		; jumptable 007EB054 cases 1-7
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	edx, 2
jge	short loc_7EB0B4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
jmp	loc_7EB291

loc_7EB0B4:
movzx	edx, [ebp+var_5]
sar	edx, 6
movzx	eax, [ebp+var_7]
shl	eax, 2
or	edx, eax
or	edx, 0C0h
mov	ecx, [ebp+arg_C]
mov	eax, [ecx]
mov	[eax], dl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
movzx	ecx, [ebp+var_5]
and	ecx, 3Fh
or	ecx, 80h
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
jmp	loc_7EB284

loc_7EB104:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007EB054 cases 8-215
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	edx, 3
jge	short loc_7EB11E
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
jmp	loc_7EB291

loc_7EB11E:
movzx	edx, [ebp+var_7]
sar	edx, 4
or	edx, 0E0h
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ecx], dl
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
movzx	edx, [ebp+var_7]
and	edx, 0Fh
shl	edx, 2
movzx	eax, [ebp+var_5]
sar	eax, 6
or	edx, eax
or	edx, 80h
mov	ecx, [ebp+arg_C]
mov	eax, [ecx]
mov	[eax], dl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
movzx	ecx, [ebp+var_5]
and	ecx, 3Fh
or	ecx, 80h
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
jmp	loc_7EB284

loc_7EB192:		; jumptable 007EB054 cases 216-219
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	edx, 4
jge	short loc_7EB1AC
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
jmp	loc_7EB291

loc_7EB1AC:
movzx	edx, [ebp+var_7]
and	edx, 3
shl	edx, 2
movzx	eax, [ebp+var_5]
sar	eax, 6
and	eax, 3
or	edx, eax
add	edx, 1
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
sar	ecx, 2
or	ecx, 0F0h
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
movzx	ecx, [ebp+var_5]
sar	ecx, 2
and	ecx, 0Fh
mov	edx, [ebp+var_C]
and	edx, 3
shl	edx, 4
or	ecx, edx
or	ecx, 80h
mov	eax, [ebp+arg_C]
mov	edx, [eax]
mov	[edx], cl
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+var_4]
add	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dl, [ecx]
mov	[ebp+var_6], dl
movzx	eax, [ebp+var_5]
and	eax, 3
shl	eax, 4
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx+1]
and	edx, 3
shl	edx, 2
or	eax, edx
movzx	ecx, [ebp+var_6]
sar	ecx, 6
or	eax, ecx
or	eax, 80h
mov	edx, [ebp+arg_C]
mov	ecx, [edx]
mov	[ecx], al
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
movzx	edx, [ebp+var_6]
and	edx, 3Fh
or	edx, 80h
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ecx], dl
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax

loc_7EB284:
jmp	loc_7EB010

loc_7EB289:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx], eax

loc_7EB291:
mov	esp, ebp
pop	ebp
retn
sub_7EB000 endp

align 4
off_7EB298 dd offset loc_7EB05B, offset	loc_7EB09A ; jump table	for switch statement
dd offset loc_7EB192, offset loc_7EB104
byte_7EB2A8 db 0, 1, 1,	1, 1, 1, 1, 1, 3, 3, 3,	3, 3 ; indirect	table for switch statement
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 2, 2, 2, 2
align 10h


; Attributes: bp-based frame

sub_7EB390 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
sub	ecx, [eax]
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_10]
sub	eax, [edx]
sar	eax, 1
shl	eax, 1
cmp	ecx, eax
jle	short loc_7EB3C9
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx-1]
and	edx, 0F8h
cmp	edx, 0D8h
jnz	short loc_7EB3C9
mov	eax, [ebp+arg_8]
sub	eax, 2
mov	[ebp+arg_8], eax

loc_7EB3C9:
jmp	short loc_7EB3D8

loc_7EB3CB:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
add	edx, 2
mov	eax, [ebp+arg_4]
mov	[eax], edx

loc_7EB3D8:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
cmp	edx, [ebp+arg_8]
jz	short loc_7EB419
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_10]
jz	short loc_7EB419
mov	edx, [ebp+arg_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax+1]
shl	ecx, 8
mov	edx, [ebp+arg_4]
mov	eax, [edx]
movzx	edx, byte ptr [eax]
or	ecx, edx
mov	eax, [ebp+arg_C]
mov	edx, [eax]
mov	[edx], cx
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
jmp	short loc_7EB3CB

loc_7EB419:
pop	ebp
retn
sub_7EB390 endp

align 10h


; Attributes: bp-based frame

sub_7EB420 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
mov	[ebp+var_4], ecx
jmp	short loc_7EB439

loc_7EB430:
mov	edx, [ebp+var_4]
add	edx, 2
mov	[ebp+var_4], edx

loc_7EB439:
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EB6A9
mov	ecx, [ebp+var_4]
mov	dl, [ecx+1]
mov	[ebp+var_5], dl
mov	eax, [ebp+var_4]
mov	cl, [eax]
mov	[ebp+var_7], cl
movzx	edx, [ebp+var_7]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 0DBh ; switch 220	cases
ja	loc_7EB524	; default
			; jumptable 007EB474 cases 8-215
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7EB6C8[eax]
jmp	ds:off_7EB6B8[ecx*4] ; switch jump

loc_7EB47B:		; jumptable 007EB474 case 0
movzx	edx, [ebp+var_5]
cmp	edx, 80h
jge	short loc_7EB4BA ; jumptable 007EB474 cases 1-7
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_10]
jnz	short loc_7EB49E
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx], eax
jmp	loc_7EB6B1

loc_7EB49E:
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
mov	al, [ebp+var_5]
mov	[edx], al
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
jmp	loc_7EB6A4

loc_7EB4BA:		; jumptable 007EB474 cases 1-7
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	edx, 2
jge	short loc_7EB4D4
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
jmp	loc_7EB6B1

loc_7EB4D4:
movzx	edx, [ebp+var_5]
sar	edx, 6
movzx	eax, [ebp+var_7]
shl	eax, 2
or	edx, eax
or	edx, 0C0h
mov	ecx, [ebp+arg_C]
mov	eax, [ecx]
mov	[eax], dl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
movzx	ecx, [ebp+var_5]
and	ecx, 3Fh
or	ecx, 80h
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
jmp	loc_7EB6A4

loc_7EB524:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007EB474 cases 8-215
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	edx, 3
jge	short loc_7EB53E
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
jmp	loc_7EB6B1

loc_7EB53E:
movzx	edx, [ebp+var_7]
sar	edx, 4
or	edx, 0E0h
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ecx], dl
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
movzx	edx, [ebp+var_7]
and	edx, 0Fh
shl	edx, 2
movzx	eax, [ebp+var_5]
sar	eax, 6
or	edx, eax
or	edx, 80h
mov	ecx, [ebp+arg_C]
mov	eax, [ecx]
mov	[eax], dl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
movzx	ecx, [ebp+var_5]
and	ecx, 3Fh
or	ecx, 80h
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
jmp	loc_7EB6A4

loc_7EB5B2:		; jumptable 007EB474 cases 216-219
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	edx, 4
jge	short loc_7EB5CC
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+var_4]
mov	[eax], ecx
jmp	loc_7EB6B1

loc_7EB5CC:
movzx	edx, [ebp+var_7]
and	edx, 3
shl	edx, 2
movzx	eax, [ebp+var_5]
sar	eax, 6
and	eax, 3
or	edx, eax
add	edx, 1
mov	[ebp+var_C], edx
mov	ecx, [ebp+var_C]
sar	ecx, 2
or	ecx, 0F0h
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	[eax], cl
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
movzx	ecx, [ebp+var_5]
sar	ecx, 2
and	ecx, 0Fh
mov	edx, [ebp+var_C]
and	edx, 3
shl	edx, 4
or	ecx, edx
or	ecx, 80h
mov	eax, [ebp+arg_C]
mov	edx, [eax]
mov	[edx], cl
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+var_4]
add	eax, 2
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
mov	dl, [ecx+1]
mov	[ebp+var_6], dl
movzx	eax, [ebp+var_5]
and	eax, 3
shl	eax, 4
mov	ecx, [ebp+var_4]
movzx	edx, byte ptr [ecx]
and	edx, 3
shl	edx, 2
or	eax, edx
movzx	ecx, [ebp+var_6]
sar	ecx, 6
or	eax, ecx
or	eax, 80h
mov	edx, [ebp+arg_C]
mov	ecx, [edx]
mov	[ecx], al
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
movzx	edx, [ebp+var_6]
and	edx, 3Fh
or	edx, 80h
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	[ecx], dl
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_C]
mov	[ecx], eax

loc_7EB6A4:
jmp	loc_7EB430

loc_7EB6A9:
mov	edx, [ebp+arg_4]
mov	eax, [ebp+var_4]
mov	[edx], eax

loc_7EB6B1:
mov	esp, ebp
pop	ebp
retn
sub_7EB420 endp

align 4
off_7EB6B8 dd offset loc_7EB47B, offset	loc_7EB4BA ; jump table	for switch statement
dd offset loc_7EB5B2, offset loc_7EB524
byte_7EB6C8 db 0, 1, 1,	1, 1, 1, 1, 1, 3, 3, 3,	3, 3 ; indirect	table for switch statement
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 3, 3, 3, 3, 3
db 3, 3, 3, 3, 3, 3, 3,	3, 2, 2, 2, 2
align 10h


; Attributes: bp-based frame

sub_7EB7B0 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_4]
mov	ecx, [ebp+arg_8]
sub	ecx, [eax]
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_10]
sub	eax, [edx]
sar	eax, 1
shl	eax, 1
cmp	ecx, eax
jle	short loc_7EB7E9
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx-2]
and	edx, 0F8h
cmp	edx, 0D8h
jnz	short loc_7EB7E9
mov	eax, [ebp+arg_8]
sub	eax, 2
mov	[ebp+arg_8], eax

loc_7EB7E9:
jmp	short loc_7EB7F8

loc_7EB7EB:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
add	edx, 2
mov	eax, [ebp+arg_4]
mov	[eax], edx

loc_7EB7F8:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
cmp	edx, [ebp+arg_8]
jz	short loc_7EB839
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_10]
jz	short loc_7EB839
mov	edx, [ebp+arg_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax]
shl	ecx, 8
mov	edx, [ebp+arg_4]
mov	eax, [edx]
movzx	edx, byte ptr [eax+1]
or	ecx, edx
mov	eax, [ebp+arg_C]
mov	edx, [eax]
mov	[edx], cx
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
jmp	short loc_7EB7EB

loc_7EB839:
pop	ebp
retn
sub_7EB7B0 endp

align 10h


; Attributes: bp-based frame

sub_7EB840 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EB858
mov	eax, 0FFFFFFFCh
jmp	loc_7EBBAB

loc_7EB858:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EB88E
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
and	eax, 1
jz	short loc_7EB88E
mov	ecx, [ebp+var_4]
and	ecx, 0FFFFFFFEh
mov	[ebp+var_4], ecx
jnz	short loc_7EB885
or	eax, 0FFFFFFFFh
jmp	loc_7EBBAB

loc_7EB885:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_4]
mov	[ebp+arg_8], edx

loc_7EB88E:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EB8AC
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
jmp	short loc_7EB8C6

loc_7EB8AC:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7EB8C6:
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0Ah ; switch 11 cases
ja	loc_7EBA95	; default
			; jumptable 007EB8D9 cases 2,3
mov	edx, [ebp+var_C]
jmp	ds:off_7EBBB0[edx*4] ; switch jump

loc_7EB8E0:		; jumptable 007EB8D9 case 4
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EB8F9
or	eax, 0FFFFFFFFh
jmp	loc_7EBBAB

loc_7EB8F9:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EB90F
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 5Dh
jz	short loc_7EB914

loc_7EB90F:
jmp	loc_7EBA9E

loc_7EB914:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EB92D
or	eax, 0FFFFFFFFh
jmp	loc_7EBBAB

loc_7EB92D:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EB943
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jz	short loc_7EB951

loc_7EB943:
mov	eax, [ebp+arg_4]
sub	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EBA9E

loc_7EB951:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 28h
jmp	loc_7EBBAB

loc_7EB966:		; jumptable 007EB8D9 case 9
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EB97F
or	eax, 0FFFFFFFFh
jmp	loc_7EBBAB

loc_7EB97F:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EB99D
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_10], ecx
jmp	short loc_7EB9B7

loc_7EB99D:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7EB9B7:
cmp	[ebp+var_10], 0Ah
jnz	short loc_7EB9C6
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7EB9C6:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 7
jmp	loc_7EBBAB

loc_7EB9D8:		; jumptable 007EB8D9 case 10
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 7
jmp	loc_7EBBAB

loc_7EB9ED:		; jumptable 007EB8D9 case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7EBA02
mov	eax, 0FFFFFFFEh
jmp	loc_7EBBAB

loc_7EBA02:
xor	eax, eax
jz	short loc_7EBA15
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EBBAB

loc_7EBA15:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7EBA9E

loc_7EBA20:		; jumptable 007EB8D9 case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7EBA35
mov	eax, 0FFFFFFFEh
jmp	loc_7EBBAB

loc_7EBA35:
xor	edx, edx
jz	short loc_7EBA48
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EBBAB

loc_7EBA48:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7EBA9E

loc_7EBA53:		; jumptable 007EB8D9 case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7EBA68
mov	eax, 0FFFFFFFEh
jmp	loc_7EBBAB

loc_7EBA68:
xor	ecx, ecx
jz	short loc_7EBA7B
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EBBAB

loc_7EBA7B:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7EBA9E

loc_7EBA86:		; jumptable 007EB8D9 cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EBBAB

loc_7EBA95:		; default
mov	ecx, [ebp+arg_4] ; jumptable 007EB8D9 cases 2,3
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7EBA9E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7EBB9E
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EBAC8
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7EBAE2

loc_7EBAC8:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7EBAE2:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
cmp	[ebp+var_18], 0Ah ; switch 11 cases
ja	loc_7EBB90	; default
			; jumptable 007EBAFC cases 2,3
mov	edx, [ebp+var_18]
movzx	eax, ds:byte_7EBBF0[edx]
jmp	ds:off_7EBBDC[eax*4] ; switch jump

loc_7EBB03:		; jumptable 007EBAFC case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jl	short loc_7EBB12
xor	edx, edx
jz	short loc_7EBB24

loc_7EBB12:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7EBBAB

loc_7EBB24:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EBB99

loc_7EBB2F:		; jumptable 007EBAFC case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jl	short loc_7EBB3E
xor	ecx, ecx
jz	short loc_7EBB4D

loc_7EBB3E:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	short loc_7EBBAB

loc_7EBB4D:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EBB99

loc_7EBB58:		; jumptable 007EBAFC case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jl	short loc_7EBB67
xor	eax, eax
jz	short loc_7EBB76

loc_7EBB67:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7EBBAB

loc_7EBB76:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EBB99

loc_7EBB81:		; jumptable 007EBAFC cases 0,1,4,8-10
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7EBBAB

loc_7EBB90:		; default
mov	eax, [ebp+arg_4] ; jumptable 007EBAFC cases 2,3
add	eax, 2
mov	[ebp+arg_4], eax

loc_7EBB99:
jmp	loc_7EBA9E

loc_7EBB9E:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7EBBAB:
mov	esp, ebp
pop	ebp
retn
sub_7EB840 endp

align 10h
off_7EBBB0 dd offset loc_7EBA86	; jump table for switch	statement
dd offset loc_7EBA86
dd offset loc_7EBA95
dd offset loc_7EBA95
dd offset loc_7EB8E0
dd offset loc_7EB9ED
dd offset loc_7EBA20
dd offset loc_7EBA53
dd offset loc_7EBA86
dd offset loc_7EB966
dd offset loc_7EB9D8
off_7EBBDC dd offset loc_7EBB81	; jump table for switch	statement
dd offset loc_7EBB03
dd offset loc_7EBB2F
dd offset loc_7EBB58
dd offset loc_7EBB90
byte_7EBBF0 db	    0,	   0,	  4,	 4 ; indirect table for	switch statement
db	0,     1,     2,     3
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7EBC00 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4
arg_0= byte ptr	 8
arg_4= byte ptr	 0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
movzx	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0D8h
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 27h ; switch 40 cases
ja	short loc_7EBC56 ; default
			; jumptable 007EBC29 cases 8-38
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7EBC70[edx]
jmp	ds:off_7EBC60[eax*4] ; switch jump

loc_7EBC30:		; jumptable 007EBC29 cases 0-3
mov	eax, 7
jmp	short loc_7EBC5B

loc_7EBC37:		; jumptable 007EBC29 cases 4-7
mov	eax, 8
jmp	short loc_7EBC5B

loc_7EBC3E:		; jumptable 007EBC29 case 39
mov	cl, [ebp+arg_4]
mov	[ebp+var_8], cl
cmp	[ebp+var_8], 0FEh
jb	short loc_7EBC56 ; default
			; jumptable 007EBC29 cases 8-38
cmp	[ebp+var_8], 0FFh
jbe	short loc_7EBC52
jmp	short loc_7EBC56 ; default
			; jumptable 007EBC29 cases 8-38

loc_7EBC52:
xor	eax, eax
jmp	short loc_7EBC5B

loc_7EBC56:		; default
mov	eax, 1Dh	; jumptable 007EBC29 cases 8-38

loc_7EBC5B:
mov	esp, ebp
pop	ebp
retn
sub_7EBC00 endp

align 10h
off_7EBC60 dd offset loc_7EBC30	; jump table for switch	statement
dd offset loc_7EBC37
dd offset loc_7EBC3E
dd offset loc_7EBC56
byte_7EBC70 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	1,     1,     1,     1
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     2
align 10h


; Attributes: bp-based frame

sub_7EBCA0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EBCB8
mov	eax, 0FFFFFFFCh
jmp	loc_7EC0C3

loc_7EBCB8:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EBCEE
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
and	eax, 1
jz	short loc_7EBCEE
mov	ecx, [ebp+var_4]
and	ecx, 0FFFFFFFEh
mov	[ebp+var_4], ecx
jnz	short loc_7EBCE5
or	eax, 0FFFFFFFFh
jmp	loc_7EC0C3

loc_7EBCE5:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_4]
mov	[ebp+arg_8], edx

loc_7EBCEE:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EBD0C
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
jmp	short loc_7EBD26

loc_7EBD0C:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7EBD26:
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0Ah ; switch 11 cases
ja	loc_7EBF35	; default
mov	edx, [ebp+var_C]
jmp	ds:off_7EC0C8[edx*4] ; switch jump

loc_7EBD40:		; jumptable 007EBD39 case 2
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7EC700
add	esp, 10h
jmp	loc_7EC0C3

loc_7EBD60:		; jumptable 007EBD39 case 3
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7EC120
add	esp, 10h
jmp	loc_7EC0C3

loc_7EBD80:		; jumptable 007EBD39 case 9
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EBD9B
mov	eax, 0FFFFFFFDh
jmp	loc_7EC0C3

loc_7EBD9B:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EBDB9
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_10], eax
jmp	short loc_7EBDD3

loc_7EBDB9:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7EBDD3:
cmp	[ebp+var_10], 0Ah
jnz	short loc_7EBDE2
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7EBDE2:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 7
jmp	loc_7EC0C3

loc_7EBDF4:		; jumptable 007EBD39 case 10
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 7
jmp	loc_7EC0C3

loc_7EBE09:		; jumptable 007EBD39 case 4
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EBE24
mov	eax, 0FFFFFFFBh
jmp	loc_7EC0C3

loc_7EBE24:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EBE3A
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 5Dh
jz	short loc_7EBE3F

loc_7EBE3A:
jmp	loc_7EBF3E

loc_7EBE3F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EBE5A
mov	eax, 0FFFFFFFBh
jmp	loc_7EC0C3

loc_7EBE5A:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EBE70
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 3Eh
jz	short loc_7EBE7E

loc_7EBE70:
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7EBF3E

loc_7EBE7E:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EC0C3

loc_7EBE8D:		; jumptable 007EBD39 case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EBEA2
mov	eax, 0FFFFFFFEh
jmp	loc_7EC0C3

loc_7EBEA2:
xor	edx, edx
jz	short loc_7EBEB5
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EC0C3

loc_7EBEB5:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EBF3E

loc_7EBEC0:		; jumptable 007EBD39 case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EBED5
mov	eax, 0FFFFFFFEh
jmp	loc_7EC0C3

loc_7EBED5:
xor	ecx, ecx
jz	short loc_7EBEE8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EC0C3

loc_7EBEE8:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EBF3E

loc_7EBEF3:		; jumptable 007EBD39 case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EBF08
mov	eax, 0FFFFFFFEh
jmp	loc_7EC0C3

loc_7EBF08:
xor	eax, eax
jz	short loc_7EBF1B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EC0C3

loc_7EBF1B:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EBF3E

loc_7EBF26:		; jumptable 007EBD39 cases 0,1,8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EC0C3

loc_7EBF35:		; default
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7EBF3E:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7EC0B6
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EBF68
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_14], ecx
jmp	short loc_7EBF82

loc_7EBF68:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7EBF82:
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0Ah ; switch 11 cases
ja	loc_7EC0A8	; default
mov	ecx, [ebp+var_18]
movzx	edx, ds:byte_7EC108[ecx]
jmp	ds:off_7EC0F4[edx*4] ; switch jump

loc_7EBFA3:		; jumptable 007EBF9C case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jl	short loc_7EBFB2
xor	ecx, ecx
jz	short loc_7EBFC4

loc_7EBFB2:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	loc_7EC0C3

loc_7EBFC4:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7EC0B1

loc_7EBFD2:		; jumptable 007EBF9C case 6
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jl	short loc_7EBFE1
xor	eax, eax
jz	short loc_7EBFF3

loc_7EBFE1:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7EC0C3

loc_7EBFF3:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7EC0B1

loc_7EC001:		; jumptable 007EBF9C case 7
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jl	short loc_7EC010
xor	edx, edx
jz	short loc_7EC022

loc_7EC010:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7EC0C3

loc_7EC022:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7EC0B1

loc_7EC030:		; jumptable 007EBF9C case 4
mov	eax, [ebp+arg_4]
add	eax, 2
cmp	eax, [ebp+arg_8]
jz	short loc_7EC099 ; jumptable 007EBF9C cases 0-3,8-10
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+3]
test	edx, edx
jnz	short loc_7EC052
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+2]
cmp	ecx, 5Dh
jz	short loc_7EC05D

loc_7EC052:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EC0B1

loc_7EC05D:
mov	eax, [ebp+arg_4]
add	eax, 4
cmp	eax, [ebp+arg_8]
jz	short loc_7EC099 ; jumptable 007EBF9C cases 0-3,8-10
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+5]
test	edx, edx
jnz	short loc_7EC07F
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+4]
cmp	ecx, 3Eh
jz	short loc_7EC08A

loc_7EC07F:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EC0B1

loc_7EC08A:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
xor	eax, eax
jmp	short loc_7EC0C3

loc_7EC099:		; jumptable 007EBF9C cases 0-3,8-10
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	short loc_7EC0C3

loc_7EC0A8:		; default
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7EC0B1:
jmp	loc_7EBF3E

loc_7EC0B6:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6

loc_7EC0C3:
mov	esp, ebp
pop	ebp
retn
sub_7EBCA0 endp

align 4
off_7EC0C8 dd offset loc_7EBF26	; jump table for switch	statement
dd offset loc_7EBF26
dd offset loc_7EBD40
dd offset loc_7EBD60
dd offset loc_7EBE09
dd offset loc_7EBE8D
dd offset loc_7EBEC0
dd offset loc_7EBEF3
dd offset loc_7EBF26
dd offset loc_7EBD80
dd offset loc_7EBDF4
off_7EC0F4 dd offset loc_7EC099	; jump table for switch	statement
dd offset loc_7EC030
dd offset loc_7EBFA3
dd offset loc_7EBFD2
dd offset loc_7EC001
byte_7EC108 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	1,     2,     3,     4
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7EC120 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EC136
or	eax, 0FFFFFFFFh
jmp	loc_7EC445

loc_7EC136:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EC154
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7EC16E

loc_7EC154:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7EC16E:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7EC2B3	; default
			; jumptable 007EC191 cases 3-13,15,16,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7EC468[ecx]
jmp	ds:off_7EC44C[edx*4] ; switch jump

loc_7EC198:		; jumptable 007EC191 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EC1DA ; jumptable 007EC191 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EC445

loc_7EC1DA:		; jumptable 007EC191 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EC2C2

loc_7EC1E8:		; jumptable 007EC191 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EC1FD
mov	eax, 0FFFFFFFEh
jmp	loc_7EC445

loc_7EC1FD:
mov	edx, 1
test	edx, edx
jz	short loc_7EC215
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EC445

loc_7EC215:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EC2C2

loc_7EC223:		; jumptable 007EC191 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EC238
mov	eax, 0FFFFFFFEh
jmp	loc_7EC445

loc_7EC238:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EC250
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EC445

loc_7EC250:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EC2C2

loc_7EC25B:		; jumptable 007EC191 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EC270
mov	eax, 0FFFFFFFEh
jmp	loc_7EC445

loc_7EC270:
mov	eax, 1
test	eax, eax
jz	short loc_7EC288
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EC445

loc_7EC288:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EC2C2

loc_7EC293:		; jumptable 007EC191 case 14
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7EC4C0
add	esp, 10h
jmp	loc_7EC445

loc_7EC2B3:		; default
mov	edx, [ebp+arg_C] ; jumptable 007EC191 cases 3-13,15,16,18,20-23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EC445

loc_7EC2C2:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7EC442
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EC2EC
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
jmp	short loc_7EC306

loc_7EC2EC:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EC306:
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 5
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7EC431	; default
			; jumptable 007EC329 cases 3-12,14-16,18,23
mov	edx, [ebp+var_10]
movzx	eax, ds:byte_7EC4A0[edx]
jmp	ds:off_7EC484[eax*4] ; switch jump

loc_7EC330:		; jumptable 007EC329 case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7EC372 ; jumptable 007EC329 cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EC445

loc_7EC372:		; jumptable 007EC329 cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EC43D

loc_7EC380:		; jumptable 007EC329 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7EC395
mov	eax, 0FFFFFFFEh
jmp	loc_7EC445

loc_7EC395:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EC3AD
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EC445

loc_7EC3AD:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7EC43D

loc_7EC3BB:		; jumptable 007EC329 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7EC3CD
mov	eax, 0FFFFFFFEh
jmp	short loc_7EC445

loc_7EC3CD:
mov	eax, 1
test	eax, eax
jz	short loc_7EC3E2
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EC445

loc_7EC3E2:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7EC43D

loc_7EC3ED:		; jumptable 007EC329 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7EC3FF
mov	eax, 0FFFFFFFEh
jmp	short loc_7EC445

loc_7EC3FF:
mov	edx, 1
test	edx, edx
jz	short loc_7EC414
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EC445

loc_7EC414:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7EC43D

loc_7EC41F:		; jumptable 007EC329 case 13
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 9
jmp	short loc_7EC445

loc_7EC431:		; default
mov	edx, [ebp+arg_C] ; jumptable 007EC329 cases 3-12,14-16,18,23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7EC445

loc_7EC43D:
jmp	loc_7EC2C2

loc_7EC442:
or	eax, 0FFFFFFFFh

loc_7EC445:
mov	esp, ebp
pop	ebp
retn
sub_7EC120 endp

align 4
off_7EC44C dd offset loc_7EC1E8	; jump table for switch	statement
dd offset loc_7EC223
dd offset loc_7EC25B
dd offset loc_7EC293
dd offset loc_7EC1DA
dd offset loc_7EC198
dd offset loc_7EC2B3
byte_7EC468 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     3,     6
db	6,     4,     6,     4
db	6,     6,     6,     6
db	5
align 4
off_7EC484 dd offset loc_7EC380	; jump table for switch	statement
dd offset loc_7EC3BB
dd offset loc_7EC3ED
dd offset loc_7EC41F
dd offset loc_7EC372
dd offset loc_7EC330
dd offset loc_7EC431
byte_7EC4A0 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     3,     6,     6
db	6,     4,     6,     4
db	4,     4,     4,     6
db	5
align 10h


; Attributes: bp-based frame

sub_7EC4C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EC5E9
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EC508
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 78h
jnz	short loc_7EC508
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7EC5F0
add	esp, 10h
jmp	loc_7EC5EC

loc_7EC508:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EC526
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7EC540

loc_7EC526:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7EC540:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 19h
jz	short loc_7EC54E
jmp	short loc_7EC550

loc_7EC54E:
jmp	short loc_7EC55F

loc_7EC550:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EC5EC

loc_7EC55F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7EC573

loc_7EC56A:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7EC573:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_7EC5E9
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EC599
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
jmp	short loc_7EC5B3

loc_7EC599:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EC5B3:
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 12h
jz	short loc_7EC5C9
cmp	[ebp+var_10], 19h
jz	short loc_7EC5C7
jmp	short loc_7EC5DB

loc_7EC5C7:
jmp	short loc_7EC5E7

loc_7EC5C9:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 0Ah
jmp	short loc_7EC5EC

loc_7EC5DB:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7EC5EC

loc_7EC5E7:
jmp	short loc_7EC56A

loc_7EC5E9:
or	eax, 0FFFFFFFFh

loc_7EC5EC:
mov	esp, ebp
pop	ebp
retn
sub_7EC4C0 endp



; Attributes: bp-based frame

sub_7EC5F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EC6F2
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EC620
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7EC63A

loc_7EC620:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7EC63A:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 18h
jl	short loc_7EC650
cmp	[ebp+var_8], 19h
jle	short loc_7EC64E
jmp	short loc_7EC650

loc_7EC64E:
jmp	short loc_7EC65F

loc_7EC650:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EC6F5

loc_7EC65F:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EC673

loc_7EC66A:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7EC673:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	short loc_7EC6F2
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EC699
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
jmp	short loc_7EC6B3

loc_7EC699:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EC6B3:
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 12h
jz	short loc_7EC6CF
cmp	[ebp+var_10], 17h
jle	short loc_7EC6E1
cmp	[ebp+var_10], 19h
jle	short loc_7EC6CD
jmp	short loc_7EC6E1

loc_7EC6CD:
jmp	short loc_7EC6ED

loc_7EC6CF:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 0Ah
jmp	short loc_7EC6F5

loc_7EC6E1:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EC6F5

loc_7EC6ED:
jmp	loc_7EC66A

loc_7EC6F2:
or	eax, 0FFFFFFFFh

loc_7EC6F5:
mov	esp, ebp
pop	ebp
retn
sub_7EC5F0 endp

align 10h


; Attributes: bp-based frame

sub_7EC700 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EC716
or	eax, 0FFFFFFFFh
jmp	loc_7ECEBC

loc_7EC716:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EC734
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
jmp	short loc_7EC74E

loc_7EC734:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7EC74E:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
sub	eax, 5
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 18h ; switch 25 cases
ja	loc_7EC96D	; default
			; jumptable 007EC771 cases 3-9,13-16,18,20-23
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7ECEE4[ecx]
jmp	ds:off_7ECEC0[edx*4] ; switch jump

loc_7EC778:		; jumptable 007EC771 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EC7BA ; jumptable 007EC771 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7EC7BA:		; jumptable 007EC771 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EC97C

loc_7EC7C8:		; jumptable 007EC771 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EC7DD
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7EC7DD:
mov	edx, 1
test	edx, edx
jz	short loc_7EC7F5
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ECEBC

loc_7EC7F5:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EC97C

loc_7EC803:		; jumptable 007EC771 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EC818
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7EC818:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EC830
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ECEBC

loc_7EC830:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7EC97C

loc_7EC83E:		; jumptable 007EC771 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EC853
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7EC853:
mov	eax, 1
test	eax, eax
jz	short loc_7EC86B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7EC86B:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7EC97C

loc_7EC879:		; jumptable 007EC771 case 11
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EC892
or	eax, 0FFFFFFFFh
jmp	loc_7ECEBC

loc_7EC892:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EC8B0
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_10], edx
jmp	short loc_7EC8CA

loc_7EC8B0:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7EC8CA:
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 14h
jz	short loc_7EC8FE
cmp	[ebp+var_14], 1Bh
jz	short loc_7EC8DE
jmp	short loc_7EC91E

loc_7EC8DE:
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7ECFC0
add	esp, 10h
jmp	loc_7ECEBC

loc_7EC8FE:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7ED8C0
add	esp, 10h
jmp	loc_7ECEBC

loc_7EC91E:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7EC92D:		; jumptable 007EC771 case 10
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7ED1E0
add	esp, 10h
jmp	loc_7ECEBC

loc_7EC94D:		; jumptable 007EC771 case 12
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7ED940
add	esp, 10h
jmp	loc_7ECEBC

loc_7EC96D:		; default
mov	edx, [ebp+arg_C] ; jumptable 007EC771 cases 3-9,13-16,18,20-23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ECEBC

loc_7EC97C:
mov	[ebp+var_4], 0

loc_7EC983:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7ECEB9
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EC9AD
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_18], ecx
jmp	short loc_7EC9C7

loc_7EC9AD:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_18], eax

loc_7EC9C7:
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 5
mov	[ebp+var_1C], ecx
cmp	[ebp+var_1C], 18h ; switch 25 cases
ja	loc_7ECEA8	; default
			; jumptable 007EC9EA cases 3,7-11,13-15,23
mov	edx, [ebp+var_1C]
movzx	eax, ds:byte_7ECF28[edx]
jmp	ds:off_7ECF00[eax*4] ; switch jump

loc_7EC9F1:		; jumptable 007EC9EA case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7ECA33 ; jumptable 007EC9EA cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECA33:		; jumptable 007EC9EA cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7ECEB4

loc_7ECA41:		; jumptable 007EC9EA case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7ECA56
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECA56:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7ECA6E
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECA6E:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7ECEB4

loc_7ECA7C:		; jumptable 007EC9EA case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7ECA91
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECA91:
mov	eax, 1
test	eax, eax
jz	short loc_7ECAA9
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECAA9:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7ECEB4

loc_7ECAB7:		; jumptable 007EC9EA case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7ECACC
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECACC:
mov	edx, 1
test	edx, edx
jz	short loc_7ECAE4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECAE4:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7ECEB4

loc_7ECAF2:		; jumptable 007EC9EA case 18
cmp	[ebp+var_4], 0
jz	short loc_7ECB07
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECB07:
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7ECB27
or	eax, 0FFFFFFFFh
jmp	loc_7ECEBC

loc_7ECB27:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7ECB45
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_20], eax
jmp	short loc_7ECB5F

loc_7ECB45:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_20], eax

loc_7ECB5F:
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
sub	eax, 5
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 18h ; switch 25 cases
ja	loc_7ECC81	; default
			; jumptable 007ECB82 cases 3-16,18,20-23
mov	ecx, [ebp+var_24]
movzx	edx, ds:byte_7ECF5C[ecx]
jmp	ds:off_7ECF44[edx*4] ; switch jump

loc_7ECB89:		; jumptable 007ECB82 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7ECBCB ; jumptable 007ECB82 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECBCB:		; jumptable 007ECB82 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7ECC90

loc_7ECBD9:		; jumptable 007ECB82 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7ECBEE
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECBEE:
mov	edx, 1
test	edx, edx
jz	short loc_7ECC06
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECC06:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7ECC90

loc_7ECC11:		; jumptable 007ECB82 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7ECC26
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECC26:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7ECC3E
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECC3E:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7ECC90

loc_7ECC49:		; jumptable 007ECB82 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7ECC5E
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECC5E:
mov	eax, 1
test	eax, eax
jz	short loc_7ECC76
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECC76:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7ECC90

loc_7ECC81:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007ECB82 cases 3-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECC90:
jmp	loc_7ECEB4

loc_7ECC95:		; jumptable 007EC9EA cases 4,5,16
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7ECC9E:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7ECE47
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ECCC8
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_28], ecx
jmp	short loc_7ECCE2

loc_7ECCC8:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_28], eax

loc_7ECCE2:
mov	eax, [ebp+var_28]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
sub	ecx, 5
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 18h ; switch 25 cases
ja	loc_7ECE19	; default
			; jumptable 007ECD05 cases 3,7-11,13-15,18,20-23
mov	edx, [ebp+var_2C]
movzx	eax, ds:byte_7ECF9C[edx]
jmp	ds:off_7ECF78[eax*4] ; switch jump

loc_7ECD0C:		; jumptable 007ECD05 case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
movzx	eax, ds:byte_1457A10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7ECD4E ; jumptable 007ECD05 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECD4E:		; jumptable 007ECD05 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7ECE28

loc_7ECD5C:		; jumptable 007ECD05 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7ECD71
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECD71:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7ECD89
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECD89:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7ECE28

loc_7ECD97:		; jumptable 007ECD05 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7ECDAC
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECDAC:
mov	eax, 1
test	eax, eax
jz	short loc_7ECDC4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECDC4:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7ECE28

loc_7ECDCF:		; jumptable 007ECD05 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7ECDE4
mov	eax, 0FFFFFFFEh
jmp	loc_7ECEBC

loc_7ECDE4:
mov	edx, 1
test	edx, edx
jz	short loc_7ECDFC
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECDFC:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7ECE28

loc_7ECE07:		; jumptable 007ECD05 case 6
jmp	short loc_7ECE4C

loc_7ECE09:		; jumptable 007ECD05 case 12
jmp	short loc_7ECE5E

loc_7ECE0B:		; jumptable 007ECD05 cases 4,5,16
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7ECC9E

loc_7ECE19:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007ECD05 cases 3,7-11,13-15,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ECEBC

loc_7ECE28:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7EDDA0
add	esp, 10h
jmp	short loc_7ECEBC
jmp	loc_7ECC9E

loc_7ECE47:
or	eax, 0FFFFFFFFh
jmp	short loc_7ECEBC

loc_7ECE4C:		; jumptable 007EC9EA case 6
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 2
jmp	short loc_7ECEBC

loc_7ECE5E:		; jumptable 007EC9EA case 12
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7ECE74
or	eax, 0FFFFFFFFh
jmp	short loc_7ECEBC

loc_7ECE74:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ECE8A
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jz	short loc_7ECE96

loc_7ECE8A:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7ECEBC

loc_7ECE96:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 4
jmp	short loc_7ECEBC

loc_7ECEA8:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007EC9EA cases 3,7-11,13-15,23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7ECEBC

loc_7ECEB4:
jmp	loc_7EC983

loc_7ECEB9:
or	eax, 0FFFFFFFFh

loc_7ECEBC:
mov	esp, ebp
pop	ebp
retn
sub_7EC700 endp

off_7ECEC0 dd offset loc_7EC7C8	; jump table for switch	statement
dd offset loc_7EC803
dd offset loc_7EC83E
dd offset loc_7EC92D
dd offset loc_7EC879
dd offset loc_7EC94D
dd offset loc_7EC7BA
dd offset loc_7EC778
dd offset loc_7EC96D
byte_7ECEE4 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     3,     4
db	5,     8,     8,     8
db	8,     6,     8,     6
db	8,     8,     8,     8
db	7
align 10h
off_7ECF00 dd offset loc_7ECA41	; jump table for switch	statement
dd offset loc_7ECA7C
dd offset loc_7ECAB7
dd offset loc_7ECC95
dd offset loc_7ECE4C
dd offset loc_7ECE5E
dd offset loc_7ECA33
dd offset loc_7ECAF2
dd offset loc_7EC9F1
dd offset loc_7ECEA8
byte_7ECF28 db	    0,	   1,	  2,	 9 ; indirect table for	switch statement
db	3,     3,     4,     9
db	9,     9,     9,     9
db	5,     9,     9,     9
db	3,     6,     7,     6
db	6,     6,     6,     9
db	8
align 4
off_7ECF44 dd offset loc_7ECBD9	; jump table for switch	statement
dd offset loc_7ECC11
dd offset loc_7ECC49
dd offset loc_7ECBCB
dd offset loc_7ECB89
dd offset loc_7ECC81
byte_7ECF5C db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7ECF78 dd offset loc_7ECD5C	; jump table for switch	statement
dd offset loc_7ECD97
dd offset loc_7ECDCF
dd offset loc_7ECE0B
dd offset loc_7ECE07
dd offset loc_7ECE09
dd offset loc_7ECD4E
dd offset loc_7ECD0C
dd offset loc_7ECE19
byte_7ECF9C db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	5,     8,     8,     8
db	3,     6,     8,     6
db	8,     8,     8,     8
db	7
align 10h


; Attributes: bp-based frame

sub_7ECFC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7ED19C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7ECFE8
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 2Dh
jz	short loc_7ECFF7

loc_7ECFE8:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ED19F

loc_7ECFF7:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7ED000:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7ED19C
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7ED02A
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7ED044

loc_7ED02A:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7ED044:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 1Bh ; switch 28 cases
ja	loc_7ED18E	; default
			; jumptable 007ED05E cases 2-4,9-26
mov	edx, [ebp+var_8]
movzx	eax, ds:byte_7ED1BC[edx]
jmp	ds:off_7ED1A4[eax*4] ; switch jump

loc_7ED065:		; jumptable 007ED05E case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7ED07A
mov	eax, 0FFFFFFFEh
jmp	loc_7ED19F

loc_7ED07A:
xor	edx, edx
jz	short loc_7ED08D
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ED19F

loc_7ED08D:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7ED197

loc_7ED09B:		; jumptable 007ED05E case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7ED0B0
mov	eax, 0FFFFFFFEh
jmp	loc_7ED19F

loc_7ED0B0:
xor	ecx, ecx
jz	short loc_7ED0C3
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ED19F

loc_7ED0C3:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7ED197

loc_7ED0D1:		; jumptable 007ED05E case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7ED0E6
mov	eax, 0FFFFFFFEh
jmp	loc_7ED19F

loc_7ED0E6:
xor	eax, eax
jz	short loc_7ED0F9
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ED19F

loc_7ED0F9:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7ED197

loc_7ED107:		; jumptable 007ED05E cases 0,1,8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ED19F

loc_7ED116:		; jumptable 007ED05E case 27
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7ED12C
or	eax, 0FFFFFFFFh
jmp	short loc_7ED19F

loc_7ED12C:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED18C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 2Dh
jnz	short loc_7ED18C
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7ED158
or	eax, 0FFFFFFFFh
jmp	short loc_7ED19F

loc_7ED158:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED16E
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jz	short loc_7ED17A

loc_7ED16E:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7ED19F

loc_7ED17A:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 0Dh
jmp	short loc_7ED19F

loc_7ED18C:
jmp	short loc_7ED197

loc_7ED18E:		; default
mov	ecx, [ebp+arg_4] ; jumptable 007ED05E cases 2-4,9-26
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7ED197:
jmp	loc_7ED000

loc_7ED19C:
or	eax, 0FFFFFFFFh

loc_7ED19F:
mov	esp, ebp
pop	ebp
retn
sub_7ECFC0 endp

align 4
off_7ED1A4 dd offset loc_7ED107	; jump table for switch	statement
dd offset loc_7ED065
dd offset loc_7ED09B
dd offset loc_7ED0D1
dd offset loc_7ED116
dd offset loc_7ED18E
byte_7ED1BC db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     4
align 10h


; Attributes: bp-based frame

sub_7ED1E0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7ED1FC
or	eax, 0FFFFFFFFh
jmp	loc_7ED6EA

loc_7ED1FC:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED21A
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
jmp	short loc_7ED234

loc_7ED21A:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7ED234:
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 5
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7ED356	; default
			; jumptable 007ED257 cases 3-16,18,20-23
mov	edx, [ebp+var_10]
movzx	eax, ds:byte_7ED708[edx]
jmp	ds:off_7ED6F0[eax*4] ; switch jump

loc_7ED25E:		; jumptable 007ED257 case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
movzx	eax, ds:byte_1457A10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7ED2A0 ; jumptable 007ED257 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED2A0:		; jumptable 007ED257 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7ED365

loc_7ED2AE:		; jumptable 007ED257 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7ED2C3
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED2C3:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7ED2DB
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED2DB:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7ED365

loc_7ED2E6:		; jumptable 007ED257 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7ED2FB
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED2FB:
mov	eax, 1
test	eax, eax
jz	short loc_7ED313
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED313:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7ED365

loc_7ED31E:		; jumptable 007ED257 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7ED333
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED333:
mov	edx, 1
test	edx, edx
jz	short loc_7ED34B
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED34B:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7ED365

loc_7ED356:		; default
mov	eax, [ebp+arg_C] ; jumptable 007ED257 cases 3-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED365:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7ED6E7
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7ED38F
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7ED3A9

loc_7ED38F:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7ED3A9:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 5
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 18h ; switch 25 cases
ja	loc_7ED6D6	; default
			; jumptable 007ED3CC cases 3,6-9,11-15,18,23
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7ED744[eax]
jmp	ds:off_7ED724[ecx*4] ; switch jump

loc_7ED3D3:		; jumptable 007ED3CC case 24
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
movzx	ecx, ds:byte_1457B10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7ED415 ; jumptable 007ED3CC cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED415:		; jumptable 007ED3CC cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7ED6E2

loc_7ED423:		; jumptable 007ED3CC case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7ED438
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED438:
mov	edx, 1
test	edx, edx
jz	short loc_7ED450
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED450:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7ED6E2

loc_7ED45E:		; jumptable 007ED3CC case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7ED473
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED473:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7ED48B
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED48B:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7ED6E2

loc_7ED499:		; jumptable 007ED3CC case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7ED4AE
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED4AE:
mov	eax, 1
test	eax, eax
jz	short loc_7ED4C6
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED4C6:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7ED6E2

loc_7ED4D4:		; jumptable 007ED3CC cases 4,5,16
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7ED790
add	esp, 10h
test	eax, eax
jnz	short loc_7ED4FF
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED4FF:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7ED508:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7ED66D
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7ED532
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_1C], edx
jmp	short loc_7ED54C

loc_7ED532:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_1C], eax

loc_7ED54C:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_20], ecx
cmp	[ebp+var_20], 0Fh ; switch 16 cases
ja	loc_7ED65F	; default
			; jumptable 007ED566 cases 2-4,9-14
mov	edx, [ebp+var_20]
movzx	eax, ds:byte_7ED778[edx]
jmp	ds:off_7ED760[eax*4] ; switch jump

loc_7ED56D:		; jumptable 007ED566 case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7ED582
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED582:
xor	edx, edx
jz	short loc_7ED595
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED595:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7ED668

loc_7ED5A3:		; jumptable 007ED566 case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7ED5B8
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED5B8:
xor	ecx, ecx
jz	short loc_7ED5CB
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED5CB:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7ED668

loc_7ED5D9:		; jumptable 007ED566 case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7ED5EE
mov	eax, 0FFFFFFFEh
jmp	loc_7ED6EA

loc_7ED5EE:
xor	eax, eax
jz	short loc_7ED601
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED601:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7ED668

loc_7ED60C:		; jumptable 007ED566 cases 0,1,8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7ED6EA

loc_7ED61B:		; jumptable 007ED566 case 15
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7ED634
or	eax, 0FFFFFFFFh
jmp	loc_7ED6EA

loc_7ED634:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED65D
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jnz	short loc_7ED65D
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, [ebp+var_4]
jmp	loc_7ED6EA

loc_7ED65D:
jmp	short loc_7ED668

loc_7ED65F:		; default
mov	edx, [ebp+arg_4] ; jumptable 007ED566 cases 2-4,9-14
add	edx, 2
mov	[ebp+arg_4], edx

loc_7ED668:
jmp	loc_7ED508

loc_7ED66D:
or	eax, 0FFFFFFFFh
jmp	short loc_7ED6EA

loc_7ED672:		; jumptable 007ED3CC case 10
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7ED790
add	esp, 10h
test	eax, eax
jnz	short loc_7ED69A
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7ED6EA

loc_7ED69A:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7ED6B0
or	eax, 0FFFFFFFFh
jmp	short loc_7ED6EA

loc_7ED6B0:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED6D6 ; default
			; jumptable 007ED3CC cases 3,6-9,11-15,18,23
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jnz	short loc_7ED6D6 ; default
			; jumptable 007ED3CC cases 3,6-9,11-15,18,23
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, [ebp+var_4]
jmp	short loc_7ED6EA

loc_7ED6D6:		; default
mov	edx, [ebp+arg_C] ; jumptable 007ED3CC cases 3,6-9,11-15,18,23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7ED6EA

loc_7ED6E2:
jmp	loc_7ED365

loc_7ED6E7:
or	eax, 0FFFFFFFFh

loc_7ED6EA:
mov	esp, ebp
pop	ebp
retn
sub_7ED1E0 endp

align 10h
off_7ED6F0 dd offset loc_7ED2AE	; jump table for switch	statement
dd offset loc_7ED2E6
dd offset loc_7ED31E
dd offset loc_7ED2A0
dd offset loc_7ED25E
dd offset loc_7ED356
byte_7ED708 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7ED724 dd offset loc_7ED423	; jump table for switch	statement
dd offset loc_7ED45E
dd offset loc_7ED499
dd offset loc_7ED4D4
dd offset loc_7ED672
dd offset loc_7ED415
dd offset loc_7ED3D3
dd offset loc_7ED6D6
byte_7ED744 db	    0,	   1,	  2,	 7 ; indirect table for	switch statement
db	3,     3,     7,     7
db	7,     7,     4,     7
db	7,     7,     7,     7
db	3,     5,     7,     5
db	5,     5,     5,     7
db	6
align 10h
off_7ED760 dd offset loc_7ED60C	; jump table for switch	statement
dd offset loc_7ED56D
dd offset loc_7ED5A3
dd offset loc_7ED5D9
dd offset loc_7ED61B
dd offset loc_7ED65F
byte_7ED778 db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	5,     5,     5,     4
align 10h


; Attributes: bp-based frame

sub_7ED790 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_C]
mov	dword ptr [eax], 0Bh
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 6
jz	short loc_7ED7BB
mov	eax, 1
jmp	loc_7ED8B1

loc_7ED7BB:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED7D1
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_8], edx
jmp	short loc_7ED7D8

loc_7ED7D1:
mov	[ebp+var_8], 0FFFFFFFFh

loc_7ED7D8:
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 58h
jz	short loc_7ED7EE
cmp	[ebp+var_C], 78h
jz	short loc_7ED7EC
jmp	short loc_7ED7F7

loc_7ED7EC:
jmp	short loc_7ED801

loc_7ED7EE:
mov	[ebp+var_4], 1
jmp	short loc_7ED801

loc_7ED7F7:
mov	eax, 1
jmp	loc_7ED8B1

loc_7ED801:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED820
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_10], edx
jmp	short loc_7ED827

loc_7ED820:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7ED827:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 4Dh
jz	short loc_7ED83D
cmp	[ebp+var_14], 6Dh
jz	short loc_7ED83B
jmp	short loc_7ED846

loc_7ED83B:
jmp	short loc_7ED84D

loc_7ED83D:
mov	[ebp+var_4], 1
jmp	short loc_7ED84D

loc_7ED846:
mov	eax, 1
jmp	short loc_7ED8B1

loc_7ED84D:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7ED86C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_18], edx
jmp	short loc_7ED873

loc_7ED86C:
mov	[ebp+var_18], 0FFFFFFFFh

loc_7ED873:
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 4Ch
jz	short loc_7ED889
cmp	[ebp+var_1C], 6Ch
jz	short loc_7ED887
jmp	short loc_7ED892

loc_7ED887:
jmp	short loc_7ED899

loc_7ED889:
mov	[ebp+var_4], 1
jmp	short loc_7ED899

loc_7ED892:
mov	eax, 1
jmp	short loc_7ED8B1

loc_7ED899:
cmp	[ebp+var_4], 0
jz	short loc_7ED8A3
xor	eax, eax
jmp	short loc_7ED8B1

loc_7ED8A3:
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx], 0Ch
mov	eax, 1

loc_7ED8B1:
mov	esp, ebp
pop	ebp
retn
sub_7ED790 endp

align 10h


; Attributes: bp-based frame

sub_7ED8C0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 0Ch
jge	short loc_7ED8D4
or	eax, 0FFFFFFFFh
jmp	short loc_7ED92F

loc_7ED8D4:
mov	[ebp+var_4], 0
jmp	short loc_7ED8EF

loc_7ED8DD:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7ED8EF:
cmp	[ebp+var_4], 6
jge	short loc_7ED922
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7ED914
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+var_4]
movsx	edx, ds:byte_1458798[ecx]
cmp	eax, edx
jz	short loc_7ED920

loc_7ED914:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7ED92F

loc_7ED920:
jmp	short loc_7ED8DD

loc_7ED922:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 8

loc_7ED92F:
mov	esp, ebp
pop	ebp
retn
sub_7ED8C0 endp

align 10h


; Attributes: bp-based frame

sub_7ED940 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7ED956
or	eax, 0FFFFFFFFh
jmp	loc_7EDD07

loc_7ED956:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7ED974
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7ED98E

loc_7ED974:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7ED98E:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7EDAB0	; default
			; jumptable 007ED9B1 cases 3-16,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7EDD24[ecx]
jmp	ds:off_7EDD0C[edx*4] ; switch jump

loc_7ED9B8:		; jumptable 007ED9B1 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7ED9FA ; jumptable 007ED9B1 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EDD07

loc_7ED9FA:		; jumptable 007ED9B1 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EDABF

loc_7EDA08:		; jumptable 007ED9B1 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EDA1D
mov	eax, 0FFFFFFFEh
jmp	loc_7EDD07

loc_7EDA1D:
mov	edx, 1
test	edx, edx
jz	short loc_7EDA35
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EDD07

loc_7EDA35:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EDABF

loc_7EDA40:		; jumptable 007ED9B1 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EDA55
mov	eax, 0FFFFFFFEh
jmp	loc_7EDD07

loc_7EDA55:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EDA6D
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EDD07

loc_7EDA6D:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EDABF

loc_7EDA78:		; jumptable 007ED9B1 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EDA8D
mov	eax, 0FFFFFFFEh
jmp	loc_7EDD07

loc_7EDA8D:
mov	eax, 1
test	eax, eax
jz	short loc_7EDAA5
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EDD07

loc_7EDAA5:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EDABF

loc_7EDAB0:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007ED9B1 cases 3-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EDD07

loc_7EDABF:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EDD04
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EDAE9
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
jmp	short loc_7EDB03

loc_7EDAE9:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EDB03:
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 5
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7EDCF3	; default
			; jumptable 007EDB26 cases 3,7-15,23
mov	ecx, [ebp+var_10]
movzx	edx, ds:byte_7EDD64[ecx]
jmp	ds:off_7EDD40[edx*4] ; switch jump

loc_7EDB2D:		; jumptable 007EDB26 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EDB6F ; jumptable 007EDB26 cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EDD07

loc_7EDB6F:		; jumptable 007EDB26 cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EDCFF

loc_7EDB7D:		; jumptable 007EDB26 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EDB92
mov	eax, 0FFFFFFFEh
jmp	loc_7EDD07

loc_7EDB92:
mov	edx, 1
test	edx, edx
jz	short loc_7EDBAA
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EDD07

loc_7EDBAA:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EDCFF

loc_7EDBB8:		; jumptable 007EDB26 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EDBCD
mov	eax, 0FFFFFFFEh
jmp	loc_7EDD07

loc_7EDBCD:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EDBE5
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EDD07

loc_7EDBE5:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7EDCFF

loc_7EDBF3:		; jumptable 007EDB26 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EDC08
mov	eax, 0FFFFFFFEh
jmp	loc_7EDD07

loc_7EDC08:
mov	eax, 1
test	eax, eax
jz	short loc_7EDC20
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EDD07

loc_7EDC20:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7EDCFF

loc_7EDC2E:		; jumptable 007EDB26 cases 4,5,16
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7EDC42

loc_7EDC39:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7EDC42:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EDCD1
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EDC6C
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_14], eax
jmp	short loc_7EDC86

loc_7EDC6C:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7EDC86:
mov	edx, [ebp+var_14]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
sub	eax, 9
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0Ch ; switch 13 cases
ja	short loc_7EDCC0 ; default
			; jumptable 007EDCA5 cases 3-11
mov	ecx, [ebp+var_18]
movzx	edx, ds:byte_7EDD8C[ecx]
jmp	ds:off_7EDD80[edx*4] ; switch jump

loc_7EDCAC:		; jumptable 007EDCA5 cases 0,1,12
jmp	short loc_7EDCCC

loc_7EDCAE:		; jumptable 007EDCA5 case 2
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 5
jmp	short loc_7EDD07

loc_7EDCC0:		; default
mov	edx, [ebp+arg_C] ; jumptable 007EDCA5 cases 3-11
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7EDD07

loc_7EDCCC:
jmp	loc_7EDC39

loc_7EDCD1:
or	eax, 0FFFFFFFFh
jmp	short loc_7EDD07

loc_7EDCD6:		; jumptable 007EDB26 case 18
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7EDCFF

loc_7EDCE1:		; jumptable 007EDB26 case 6
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 5
jmp	short loc_7EDD07

loc_7EDCF3:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007EDB26 cases 3,7-15,23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EDD07

loc_7EDCFF:
jmp	loc_7EDABF

loc_7EDD04:
or	eax, 0FFFFFFFFh

loc_7EDD07:
mov	esp, ebp
pop	ebp
retn
sub_7ED940 endp

align 4
off_7EDD0C dd offset loc_7EDA08	; jump table for switch	statement
dd offset loc_7EDA40
dd offset loc_7EDA78
dd offset loc_7ED9FA
dd offset loc_7ED9B8
dd offset loc_7EDAB0
byte_7EDD24 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 10h
off_7EDD40 dd offset loc_7EDB7D	; jump table for switch	statement
dd offset loc_7EDBB8
dd offset loc_7EDBF3
dd offset loc_7EDC2E
dd offset loc_7EDCE1
dd offset loc_7EDB6F
dd offset loc_7EDCD6
dd offset loc_7EDB2D
dd offset loc_7EDCF3
byte_7EDD64 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	3,     5,     6,     5
db	5,     5,     5,     8
db	7
align 10h
off_7EDD80 dd offset loc_7EDCAC	; jump table for switch	statement
dd offset loc_7EDCAE
dd offset loc_7EDCC0
byte_7EDD8C db	    0,	   0,	  1,	 2 ; indirect table for	switch statement
db	2,     2,     2,     2
db	2,     2,     2,     2
db	0
align 10h


; Attributes: bp-based frame

sub_7EDDA0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4], 0

loc_7EDDAD:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EE601
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EDDD7
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_18], eax
jmp	short loc_7EDDF1

loc_7EDDD7:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_18], eax

loc_7EDDF1:
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
sub	eax, 5
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 18h ; switch 25 cases
ja	loc_7EE5F0	; default
			; jumptable 007EDE14 cases 3,6-8,10-15,23
mov	ecx, [ebp+var_1C]
movzx	edx, ds:byte_7EE62C[ecx]
jmp	ds:off_7EE608[edx*4] ; switch jump

loc_7EDE1B:		; jumptable 007EDE14 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EDE5D ; jumptable 007EDE14 cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EDE5D:		; jumptable 007EDE14 cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EE5FC

loc_7EDE6B:		; jumptable 007EDE14 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EDE80
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EDE80:
mov	edx, 1
test	edx, edx
jz	short loc_7EDE98
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EE604

loc_7EDE98:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EE5FC

loc_7EDEA6:		; jumptable 007EDE14 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EDEBB
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EDEBB:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EDED3
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EE604

loc_7EDED3:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7EE5FC

loc_7EDEE1:		; jumptable 007EDE14 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EDEF6
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EDEF6:
mov	eax, 1
test	eax, eax
jz	short loc_7EDF0E
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EDF0E:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7EE5FC

loc_7EDF1C:		; jumptable 007EDE14 case 18
cmp	[ebp+var_4], 0
jz	short loc_7EDF31
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EDF31:
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EDF51
or	eax, 0FFFFFFFFh
jmp	loc_7EE604

loc_7EDF51:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EDF6F
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_20], ecx
jmp	short loc_7EDF89

loc_7EDF6F:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_20], eax

loc_7EDF89:
mov	eax, [ebp+var_20]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 5
mov	[ebp+var_24], ecx
cmp	[ebp+var_24], 18h ; switch 25 cases
ja	loc_7EE0AB	; default
			; jumptable 007EDFAC cases 3-16,18,20-23
mov	edx, [ebp+var_24]
movzx	eax, ds:byte_7EE660[edx]
jmp	ds:off_7EE648[eax*4] ; switch jump

loc_7EDFB3:		; jumptable 007EDFAC case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
movzx	eax, ds:byte_1457A10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7EDFF5 ; jumptable 007EDFAC cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EE604

loc_7EDFF5:		; jumptable 007EDFAC cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EE0BA

loc_7EE003:		; jumptable 007EDFAC case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7EE018
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE018:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EE030
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EE604

loc_7EE030:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7EE0BA

loc_7EE03B:		; jumptable 007EDFAC case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7EE050
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE050:
mov	eax, 1
test	eax, eax
jz	short loc_7EE068
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EE068:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7EE0BA

loc_7EE073:		; jumptable 007EDFAC case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7EE088
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE088:
mov	edx, 1
test	edx, edx
jz	short loc_7EE0A0
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EE604

loc_7EE0A0:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7EE0BA

loc_7EE0AB:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EDFAC cases 3-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EE604

loc_7EE0BA:
jmp	loc_7EE5FC

loc_7EE0BF:		; jumptable 007EDE14 cases 4,5,16
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EE0D8
or	eax, 0FFFFFFFFh
jmp	loc_7EE604

loc_7EE0D8:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EE0F6
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_28], eax
jmp	short loc_7EE110

loc_7EE0F6:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_28], eax

loc_7EE110:
mov	edx, [ebp+var_28]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0Eh
jnz	short loc_7EE11E
jmp	short loc_7EE14E ; jumptable 007EDE14 case 9

loc_7EE11E:
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
cmp	[ebp+var_2C], 9
jl	short loc_7EE13A
cmp	[ebp+var_2C], 0Ah
jle	short loc_7EE138
cmp	[ebp+var_2C], 15h
jz	short loc_7EE138
jmp	short loc_7EE13A

loc_7EE138:
jmp	short loc_7EE149

loc_7EE13A:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EE149:		; jumptable 007EDE14 cases 4,5,16
jmp	loc_7EE0BF

loc_7EE14E:		; jumptable 007EDE14 case 9
mov	[ebp+var_4], 0

loc_7EE155:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EE16E
or	eax, 0FFFFFFFFh
jmp	loc_7EE604

loc_7EE16E:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EE18C
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_30], ecx
jmp	short loc_7EE1A6

loc_7EE18C:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_30], eax

loc_7EE1A6:
mov	eax, [ebp+var_30]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0Ch
jz	short loc_7EE1B8
cmp	[ebp+var_C], 0Dh
jnz	short loc_7EE1BA

loc_7EE1B8:
jmp	short loc_7EE1EA

loc_7EE1BA:
mov	ecx, [ebp+var_C]
mov	[ebp+var_34], ecx
cmp	[ebp+var_34], 9
jl	short loc_7EE1D6
cmp	[ebp+var_34], 0Ah
jle	short loc_7EE1D4
cmp	[ebp+var_34], 15h
jz	short loc_7EE1D4
jmp	short loc_7EE1D6

loc_7EE1D4:
jmp	short loc_7EE1E5

loc_7EE1D6:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EE604

loc_7EE1E5:
jmp	loc_7EE155

loc_7EE1EA:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7EE1F3:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EE203
or	eax, 0FFFFFFFFh
jmp	loc_7EE604

loc_7EE203:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EE221
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_38], edx
jmp	short loc_7EE23B

loc_7EE221:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_38], eax

loc_7EE23B:
mov	ecx, [ebp+var_38]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnz	short loc_7EE24E
jmp	loc_7EE36F

loc_7EE24E:
mov	eax, [ebp+var_10]
mov	[ebp+var_3C], eax
cmp	[ebp+var_3C], 8	; switch 9 cases
ja	loc_7EE361	; default
			; jumptable 007EE261 case 4
mov	ecx, [ebp+var_3C]
jmp	ds:off_7EE67C[ecx*4] ; switch jump

loc_7EE268:		; jumptable 007EE261 case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7EE27D
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE27D:
xor	eax, eax
jz	short loc_7EE290
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EE290:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EE36A

loc_7EE29E:		; jumptable 007EE261 case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7EE2B3
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE2B3:
xor	edx, edx
jz	short loc_7EE2C6
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EE604

loc_7EE2C6:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7EE36A

loc_7EE2D4:		; jumptable 007EE261 case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7EE2E9
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE2E9:
xor	ecx, ecx
jz	short loc_7EE2FC
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EE604

loc_7EE2FC:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7EE36A

loc_7EE307:		; jumptable 007EE261 cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EE604

loc_7EE316:		; jumptable 007EE261 case 3
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7EC120
add	esp, 10h
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jg	short loc_7EE350
cmp	[ebp+var_14], 0
jnz	short loc_7EE348
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax

loc_7EE348:
mov	eax, [ebp+var_14]
jmp	loc_7EE604

loc_7EE350:
jmp	short loc_7EE36A

loc_7EE352:		; jumptable 007EE261 case 2
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EE361:		; default
mov	eax, [ebp+arg_4] ; jumptable 007EE261 case 4
add	eax, 2
mov	[ebp+arg_4], eax

loc_7EE36A:
jmp	loc_7EE1F3

loc_7EE36F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EE388
or	eax, 0FFFFFFFFh
jmp	loc_7EE604

loc_7EE388:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EE3A6
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_40], edx
jmp	short loc_7EE3C0

loc_7EE3A6:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_40], eax

loc_7EE3C0:
mov	ecx, [ebp+var_40]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
sub	edx, 9
mov	[ebp+var_44], edx
cmp	[ebp+var_44], 0Ch ; switch 13 cases
ja	short loc_7EE3F2 ; default
			; jumptable 007EE3DF cases 3-7,9-11
mov	eax, [ebp+var_44]
movzx	ecx, ds:byte_7EE6B0[eax]
jmp	ds:off_7EE6A0[ecx*4] ; switch jump

loc_7EE3E6:		; jumptable 007EE3DF cases 0,1,12
jmp	short loc_7EE401

loc_7EE3E8:		; jumptable 007EE3DF case 8
jmp	loc_7EE591

loc_7EE3ED:		; jumptable 007EE3DF case 2
jmp	loc_7EE57F

loc_7EE3F2:		; default
mov	edx, [ebp+arg_C] ; jumptable 007EE3DF cases 3-7,9-11
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EE604

loc_7EE401:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EE41A
or	eax, 0FFFFFFFFh
jmp	loc_7EE604

loc_7EE41A:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EE438
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_48], edx
jmp	short loc_7EE452

loc_7EE438:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_48], eax

loc_7EE452:
mov	ecx, [ebp+var_48]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_4C]
sub	edx, 5
mov	[ebp+var_4C], edx
cmp	[ebp+var_4C], 18h ; switch 25 cases
ja	loc_7EE5DB	; default
			; jumptable 007EE475 cases 3,7-11,13-15,18,20-23
mov	eax, [ebp+var_4C]
movzx	ecx, ds:byte_7EE6E4[eax]
jmp	ds:off_7EE6C0[ecx*4] ; switch jump

loc_7EE47C:		; jumptable 007EE475 case 24
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
movzx	ecx, ds:byte_1457A10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EE4BE ; jumptable 007EE475 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EE4BE:		; jumptable 007EE475 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EE5E7

loc_7EE4CC:		; jumptable 007EE475 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EE4E1
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE4E1:
mov	edx, 1
test	edx, edx
jz	short loc_7EE4F9
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EE604

loc_7EE4F9:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EE5E7

loc_7EE507:		; jumptable 007EE475 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EE51C
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE51C:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EE534
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EE604

loc_7EE534:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7EE5E7

loc_7EE542:		; jumptable 007EE475 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EE557
mov	eax, 0FFFFFFFEh
jmp	loc_7EE604

loc_7EE557:
mov	eax, 1
test	eax, eax
jz	short loc_7EE56F
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EE604

loc_7EE56F:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EE5E7

loc_7EE57A:		; jumptable 007EE475 cases 4,5,16
jmp	loc_7EE401

loc_7EE57F:		; jumptable 007EE475 case 6
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1
jmp	short loc_7EE604

loc_7EE591:		; jumptable 007EE475 case 12
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EE5A7
or	eax, 0FFFFFFFFh
jmp	short loc_7EE604

loc_7EE5A7:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EE5BD
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 3Eh
jz	short loc_7EE5C9

loc_7EE5BD:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EE604

loc_7EE5C9:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 3
jmp	short loc_7EE604

loc_7EE5DB:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007EE475 cases 3,7-11,13-15,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EE604

loc_7EE5E7:
jmp	short loc_7EE5EE
jmp	loc_7EE401

loc_7EE5EE:
jmp	short loc_7EE5FC

loc_7EE5F0:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EDE14 cases 3,6-8,10-15,23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EE604

loc_7EE5FC:
jmp	loc_7EDDAD

loc_7EE601:
or	eax, 0FFFFFFFFh

loc_7EE604:
mov	esp, ebp
pop	ebp
retn
sub_7EDDA0 endp

off_7EE608 dd offset loc_7EDE6B	; jump table for switch	statement
dd offset loc_7EDEA6
dd offset loc_7EDEE1
dd offset loc_7EE0BF
dd offset loc_7EE14E
dd offset loc_7EDE5D
dd offset loc_7EDF1C
dd offset loc_7EDE1B
dd offset loc_7EE5F0
byte_7EE62C db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     8,     8
db	8,     4,     8,     8
db	8,     8,     8,     8
db	3,     5,     6,     5
db	5,     5,     5,     8
db	7
align 4
off_7EE648 dd offset loc_7EE003	; jump table for switch	statement
dd offset loc_7EE03B
dd offset loc_7EE073
dd offset loc_7EDFF5
dd offset loc_7EDFB3
dd offset loc_7EE0AB
byte_7EE660 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7EE67C dd offset loc_7EE307	; jump table for switch	statement
dd offset loc_7EE307
dd offset loc_7EE352
dd offset loc_7EE316
dd offset loc_7EE361
dd offset loc_7EE268
dd offset loc_7EE29E
dd offset loc_7EE2D4
dd offset loc_7EE307
off_7EE6A0 dd offset loc_7EE3E6	; jump table for switch	statement
dd offset loc_7EE3ED
dd offset loc_7EE3E8
dd offset loc_7EE3F2
byte_7EE6B0 db	    0,	   0,	  1,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	2,     3,     3,     3
db	0
align 10h
off_7EE6C0 dd offset loc_7EE4CC	; jump table for switch	statement
dd offset loc_7EE507
dd offset loc_7EE542
dd offset loc_7EE57A
dd offset loc_7EE57F
dd offset loc_7EE591
dd offset loc_7EE4BE
dd offset loc_7EE47C
dd offset loc_7EE5DB
byte_7EE6E4 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	5,     8,     8,     8
db	3,     6,     8,     6
db	8,     8,     8,     8
db	7
align 10h


; Attributes: bp-based frame

sub_7EE700 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EE718
mov	eax, 0FFFFFFFCh
jmp	loc_7EF0FA

loc_7EE718:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EE74E
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
and	eax, 1
jz	short loc_7EE74E
mov	ecx, [ebp+var_8]
and	ecx, 0FFFFFFFEh
mov	[ebp+var_8], ecx
jnz	short loc_7EE745
or	eax, 0FFFFFFFFh
jmp	loc_7EF0FA

loc_7EE745:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_8]
mov	[ebp+arg_8], edx

loc_7EE74E:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EE76C
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7EE786

loc_7EE76C:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EE786:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 2
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 22h ; switch 35 cases
ja	loc_7EED43	; default
			; jumptable 007EE7A9 cases 1,6,12-16,26,31,32
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7EF154[eax]
jmp	ds:off_7EF100[ecx*4] ; switch jump

loc_7EE7B0:		; jumptable 007EE7A9 case 10
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	0Ch
call	sub_7EFBC0
add	esp, 14h
jmp	loc_7EF0FA

loc_7EE7D2:		; jumptable 007EE7A9 case 11
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
push	0Dh
call	sub_7EFBC0
add	esp, 14h
jmp	loc_7EF0FA

loc_7EE7F4:		; jumptable 007EE7A9 case 0
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EE80D
or	eax, 0FFFFFFFFh
jmp	loc_7EF0FA

loc_7EE80D:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EE82B
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7EE845

loc_7EE82B:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7EE845:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 5
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 18h ; switch 25 cases
ja	short loc_7EE8C0 ; default
			; jumptable 007EE864 cases 3-9,12-16,18,20-23
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7EF188[eax]
jmp	ds:off_7EF178[ecx*4] ; switch jump

loc_7EE86B:		; jumptable 007EE864 case 11
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7EF260
add	esp, 10h
jmp	loc_7EF0FA

loc_7EE88B:		; jumptable 007EE864 case 10
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7ED1E0
add	esp, 10h
jmp	loc_7EF0FA

loc_7EE8AB:		; jumptable 007EE864 cases 0-2,17,19,24
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1Dh
jmp	loc_7EF0FA

loc_7EE8C0:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EE864 cases 3-9,12-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EE8CF:		; jumptable 007EE7A9 case 7
mov	edx, [ebp+arg_4]
add	edx, 2
cmp	edx, [ebp+arg_8]
jnz	short loc_7EE8EC ; jumptable 007EE7A9 cases 8,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	eax, 0FFFFFFF1h
jmp	loc_7EF0FA

loc_7EE8EC:		; jumptable 007EE7A9 cases 8,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EE8FF
jmp	short loc_7EE977

loc_7EE8FF:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EE91D
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_1C], eax
jmp	short loc_7EE937

loc_7EE91D:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_1C], eax

loc_7EE937:
mov	edx, [ebp+var_1C]
mov	[ebp+var_20], edx
cmp	[ebp+var_20], 9
jz	short loc_7EE953
cmp	[ebp+var_20], 0Ah
jz	short loc_7EE951
cmp	[ebp+var_20], 15h
jz	short loc_7EE951
jmp	short loc_7EE960

loc_7EE951:
jmp	short loc_7EE972

loc_7EE953:
mov	eax, [ebp+arg_4]
add	eax, 2
cmp	eax, [ebp+arg_8]
jz	short loc_7EE960
jmp	short loc_7EE972

loc_7EE960:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 0Fh
jmp	loc_7EF0FA

loc_7EE972:		; jumptable 007EE7A9 cases 8,19
jmp	loc_7EE8EC

loc_7EE977:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 0Fh
jmp	loc_7EF0FA

loc_7EE989:		; jumptable 007EE7A9 case 28
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7EF4B0
add	esp, 10h
jmp	loc_7EF0FA

loc_7EE9A9:		; jumptable 007EE7A9 case 33
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 26h
jmp	loc_7EF0FA

loc_7EE9BE:		; jumptable 007EE7A9 case 18
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 19h
jmp	loc_7EF0FA

loc_7EE9D3:		; jumptable 007EE7A9 case 2
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7EE9EE
mov	eax, 0FFFFFFE6h
jmp	loc_7EF0FA

loc_7EE9EE:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EEA43
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 5Dh
jnz	short loc_7EEA43
mov	ecx, [ebp+arg_4]
add	ecx, 2
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EEA17
or	eax, 0FFFFFFFFh
jmp	loc_7EF0FA

loc_7EEA17:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+3]
test	eax, eax
jnz	short loc_7EEA43
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+2]
cmp	edx, 3Eh
jnz	short loc_7EEA43
mov	eax, [ebp+arg_4]
add	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 22h
jmp	loc_7EF0FA

loc_7EEA43:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 1Ah
jmp	loc_7EF0FA

loc_7EEA55:		; jumptable 007EE7A9 case 29
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 17h
jmp	loc_7EF0FA

loc_7EEA6A:		; jumptable 007EE7A9 case 30
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EEA85
mov	eax, 0FFFFFFE8h
jmp	loc_7EF0FA

loc_7EEA85:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EEAA3
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_24], ecx
jmp	short loc_7EEABD

loc_7EEAA3:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_24], eax

loc_7EEABD:
mov	eax, [ebp+var_24]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
sub	ecx, 9
mov	[ebp+var_28], ecx
cmp	[ebp+var_28], 1Bh ; switch 28 cases
ja	short loc_7EEB34 ; default
			; jumptable 007EEADC cases 3-5,7-11,13-22
mov	edx, [ebp+var_28]
movzx	eax, ds:byte_7EF1B8[edx]
jmp	ds:off_7EF1A4[eax*4] ; switch jump

loc_7EEAE3:		; jumptable 007EEADC case 24
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 24h
jmp	loc_7EF0FA

loc_7EEAF8:		; jumptable 007EEADC case 6
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 23h
jmp	loc_7EF0FA

loc_7EEB0D:		; jumptable 007EEADC case 25
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 25h
jmp	loc_7EF0FA

loc_7EEB22:		; jumptable 007EEADC cases 0-2,12,23,26,27
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 18h
jmp	loc_7EF0FA

loc_7EEB34:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EEADC cases 3-5,7-11,13-22
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEB43:		; jumptable 007EE7A9 case 34
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 15h
jmp	loc_7EF0FA

loc_7EEB58:		; jumptable 007EE7A9 case 9
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 11h
jmp	loc_7EF0FA

loc_7EEB6D:		; jumptable 007EE7A9 case 17
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7EF840
add	esp, 10h
jmp	loc_7EF0FA

loc_7EEB8D:		; jumptable 007EE7A9 case 3
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EEBA2
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EEBA2:
xor	edx, edx
jz	short loc_7EEBBB
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	[ebp+var_4], 12h
jmp	loc_7EED52

loc_7EEBBB:
xor	ecx, ecx
jz	short loc_7EEBD4
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	[ebp+var_4], 13h
jmp	loc_7EED52

loc_7EEBD4:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEBE3:		; jumptable 007EE7A9 case 4
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7EEBF8
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EEBF8:
xor	eax, eax
jz	short loc_7EEC11
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 12h
jmp	loc_7EED52

loc_7EEC11:
xor	edx, edx
jz	short loc_7EEC2A
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
mov	[ebp+var_4], 13h
jmp	loc_7EED52

loc_7EEC2A:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEC39:		; jumptable 007EE7A9 case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7EEC4E
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EEC4E:
xor	ecx, ecx
jz	short loc_7EEC67
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
mov	[ebp+var_4], 12h
jmp	loc_7EED52

loc_7EEC67:
xor	eax, eax
jz	short loc_7EEC80
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 13h
jmp	loc_7EED52

loc_7EEC80:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEC8F:		; jumptable 007EE7A9 cases 20,22
mov	[ebp+var_4], 12h
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7EED52

loc_7EECA4:		; jumptable 007EE7A9 cases 21,23-25
mov	[ebp+var_4], 13h
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EED52

loc_7EECB9:		; jumptable 007EE7A9 case 27
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jz	short loc_7EECFE
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 12h
jmp	short loc_7EED52

loc_7EECFE:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
movzx	ecx, ds:byte_1457B10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jz	short loc_7EED43 ; default
			; jumptable 007EE7A9 cases 1,6,12-16,26,31,32
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 13h
jmp	short loc_7EED52

loc_7EED43:		; default
mov	edx, [ebp+arg_C] ; jumptable 007EE7A9 cases 1,6,12-16,26,31,32
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EF0FA

loc_7EED52:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7EF0F5
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EED7C
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_2C], ecx
jmp	short loc_7EED96

loc_7EED7C:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_2C], eax

loc_7EED96:
mov	eax, [ebp+var_2C]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
sub	ecx, 5
mov	[ebp+var_30], ecx
cmp	[ebp+var_30], 1Fh ; switch 32 cases
ja	loc_7EF0E4	; default
			; jumptable 007EEDB9 cases 3,7-9,11-14,23,26
mov	edx, [ebp+var_30]
movzx	eax, ds:byte_7EF200[edx]
jmp	ds:off_7EF1D4[eax*4] ; switch jump

loc_7EEDC0:		; jumptable 007EEDB9 case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7EEE02 ; jumptable 007EEDB9 cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEE02:		; jumptable 007EEDB9 cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EF0F0

loc_7EEE10:		; jumptable 007EEDB9 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7EEE25
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EEE25:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EEE3D
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEE3D:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7EF0F0

loc_7EEE4B:		; jumptable 007EEDB9 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7EEE60
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EEE60:
mov	eax, 1
test	eax, eax
jz	short loc_7EEE78
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEE78:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7EF0F0

loc_7EEE86:		; jumptable 007EEDB9 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7EEE9B
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EEE9B:
mov	edx, 1
test	edx, edx
jz	short loc_7EEEB3
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEEB3:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7EF0F0

loc_7EEEC1:		; jumptable 007EEDB9 cases 4-6,15,16,25,27,30,31
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+var_4]
jmp	loc_7EF0FA

loc_7EEED1:		; jumptable 007EEDB9 case 18
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 12h
jz	short loc_7EEEF5
cmp	[ebp+var_34], 29h
jz	loc_7EF06F
jmp	loc_7EF076

loc_7EEEF5:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7EEF05
or	eax, 0FFFFFFFFh
jmp	loc_7EF0FA

loc_7EEF05:
mov	[ebp+var_4], 29h
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7EEF2A
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_38], ecx
jmp	short loc_7EEF44

loc_7EEF2A:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_38], eax

loc_7EEF44:
mov	eax, [ebp+var_38]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
sub	ecx, 5
mov	[ebp+var_3C], ecx
cmp	[ebp+var_3C], 18h ; switch 25 cases
ja	loc_7EF066	; default
			; jumptable 007EEF67 cases 3-16,18,23
mov	edx, [ebp+var_3C]
movzx	eax, ds:byte_7EF238[edx]
jmp	ds:off_7EF220[eax*4] ; switch jump

loc_7EEF6E:		; jumptable 007EEF67 case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7EEFB0 ; jumptable 007EEF67 cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEFB0:		; jumptable 007EEF67 cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EF06D

loc_7EEFBE:		; jumptable 007EEF67 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7EEFD3
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EEFD3:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EEFEB
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EF0FA

loc_7EEFEB:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7EF06D

loc_7EEFF6:		; jumptable 007EEF67 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7EF00B
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EF00B:
mov	eax, 1
test	eax, eax
jz	short loc_7EF023
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EF023:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7EF06D

loc_7EF02E:		; jumptable 007EEF67 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7EF043
mov	eax, 0FFFFFFFEh
jmp	loc_7EF0FA

loc_7EF043:
mov	edx, 1
test	edx, edx
jz	short loc_7EF05B
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF0FA

loc_7EF05B:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7EF06D

loc_7EF066:		; default
mov	[ebp+var_4], 13h ; jumptable 007EEF67 cases 3-16,18,23

loc_7EF06D:
jmp	short loc_7EF076

loc_7EF06F:
mov	[ebp+var_4], 13h

loc_7EF076:
jmp	short loc_7EF0F0

loc_7EF078:		; jumptable 007EEDB9 case 29
cmp	[ebp+var_4], 13h
jnz	short loc_7EF08A
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EF0FA

loc_7EF08A:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 20h
jmp	short loc_7EF0FA

loc_7EF09C:		; jumptable 007EEDB9 case 28
cmp	[ebp+var_4], 13h
jnz	short loc_7EF0AE
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EF0FA

loc_7EF0AE:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 1Fh
jmp	short loc_7EF0FA

loc_7EF0C0:		; jumptable 007EEDB9 case 10
cmp	[ebp+var_4], 13h
jnz	short loc_7EF0D2
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7EF0FA

loc_7EF0D2:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1Eh
jmp	short loc_7EF0FA

loc_7EF0E4:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EEDB9 cases 3,7-9,11-14,23,26
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EF0FA

loc_7EF0F0:
jmp	loc_7EED52

loc_7EF0F5:
mov	eax, [ebp+var_4]
neg	eax

loc_7EF0FA:
mov	esp, ebp
pop	ebp
retn
sub_7EE700 endp

align 10h
off_7EF100 dd offset loc_7EE7F4	; jump table for switch	statement
dd offset loc_7EE9D3
dd offset loc_7EEB8D
dd offset loc_7EEBE3
dd offset loc_7EEC39
dd offset loc_7EE8CF
dd offset loc_7EE8EC
dd offset loc_7EEB58
dd offset loc_7EE7B0
dd offset loc_7EE7D2
dd offset loc_7EEB6D
dd offset loc_7EE9BE
dd offset loc_7EEC8F
dd offset loc_7EECA4
dd offset loc_7EECB9
dd offset loc_7EE989
dd offset loc_7EEA55
dd offset loc_7EEA6A
dd offset loc_7EE9A9
dd offset loc_7EEB43
dd offset loc_7EED43
byte_7EF154 db	    0,	 14h,	  1,	 2 ; indirect table for	switch statement
db	3,     4,   14h,     5
db	6,     7,     8,     9
db    14h,   14h,   14h,   14h
db    14h,   0Ah,   0Bh,     6
db    0Ch,   0Dh,   0Ch,   0Dh
db    0Dh,   0Dh,   14h,   0Eh
db    0Fh,   10h,   11h,   14h
db    14h,   12h,   13h
align 4
off_7EF178 dd offset loc_7EE8AB	; jump table for switch	statement
dd offset loc_7EE88B
dd offset loc_7EE86B
dd offset loc_7EE8C0
byte_7EF188 db	    0,	   0,	  0,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     1,     2
db	3,     3,     3,     3
db	3,     0,     3,     0
db	3,     3,     3,     3
db	0
align 4
off_7EF1A4 dd offset loc_7EEB22	; jump table for switch	statement
dd offset loc_7EEAF8
dd offset loc_7EEAE3
dd offset loc_7EEB0D
dd offset loc_7EEB34
byte_7EF1B8 db	    0,	   0,	  0,	 4 ; indirect table for	switch statement
db	4,     4,     1,     4
db	4,     4,     4,     4
db	0,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     0
db	2,     3,     0,     0
off_7EF1D4 dd offset loc_7EEE10	; jump table for switch	statement
dd offset loc_7EEE4B
dd offset loc_7EEE86
dd offset loc_7EEEC1
dd offset loc_7EF0C0
dd offset loc_7EEE02
dd offset loc_7EEED1
dd offset loc_7EEDC0
dd offset loc_7EF09C
dd offset loc_7EF078
dd offset loc_7EF0E4
byte_7EF200 db	    0,	   1,	  2,   0Ah ; indirect table for	switch statement
db	3,     3,     3,   0Ah
db    0Ah,   0Ah,     4,   0Ah
db    0Ah,   0Ah,   0Ah,     3
db	3,     5,     6,     5
db	5,     5,     5,   0Ah
db	7,     3,   0Ah,     3
db	8,     9,     3,     3
off_7EF220 dd offset loc_7EEFBE	; jump table for switch	statement
dd offset loc_7EEFF6
dd offset loc_7EF02E
dd offset loc_7EEFB0
dd offset loc_7EEF6E
dd offset loc_7EF066
byte_7EF238 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	3,     3,     3,     5
db	4
align 10h


; Attributes: bp-based frame

sub_7EF260 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EF276
or	eax, 0FFFFFFFFh
jmp	loc_7EF437

loc_7EF276:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EF294
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7EF2AE

loc_7EF294:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7EF2AE:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 14h
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 7	; switch 8 cases
ja	short loc_7EF30D ; default
			; jumptable 007EF2C6 cases 1,3,5,6
mov	ecx, [ebp+var_8]
jmp	ds:off_7EF43C[ecx*4] ; switch jump

loc_7EF2CD:		; jumptable 007EF2C6 case 7
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7ECFC0
add	esp, 10h
jmp	loc_7EF437

loc_7EF2ED:		; jumptable 007EF2C6 case 0
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 21h
jmp	loc_7EF437

loc_7EF302:		; jumptable 007EF2C6 cases 2,4
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EF31C

loc_7EF30D:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EF2C6 cases 1,3,5,6
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF437

loc_7EF31C:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7EF434
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EF346
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7EF360

loc_7EF346:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EF360:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 9
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 15h ; switch 22 cases
ja	loc_7EF423	; default
			; jumptable 007EF383 cases 2-11,14,16-20
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7EF46C[eax]
jmp	ds:off_7EF45C[ecx*4] ; switch jump

loc_7EF38A:		; jumptable 007EF383 case 21
mov	edx, [ebp+arg_4]
add	edx, 2
cmp	edx, [ebp+arg_8]
jnz	short loc_7EF39D
or	eax, 0FFFFFFFFh
jmp	loc_7EF437

loc_7EF39D:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+3]
test	ecx, ecx
jnz	short loc_7EF3BC
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+2]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7EF3D7

loc_7EF3BC:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+3]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7EF3D7:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 9
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 15h ; switch 22 cases
ja	short loc_7EF409 ; jumptable 007EF383 cases 0,1,12
			; jumptable 007EF3F6 cases 2-11,13-20
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7EF48C[eax]
jmp	ds:off_7EF484[ecx*4] ; switch jump

loc_7EF3FD:		; jumptable 007EF3F6 cases 0,1,12,21
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7EF437

loc_7EF409:		; jumptable 007EF383 cases 0,1,12
mov	ecx, [ebp+arg_C] ; jumptable 007EF3F6 cases 2-11,13-20
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 10h
jmp	short loc_7EF437

loc_7EF418:		; jumptable 007EF383 cases 13,15
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7EF42F

loc_7EF423:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007EF383 cases 2-11,14,16-20
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EF437

loc_7EF42F:
jmp	loc_7EF31C

loc_7EF434:
or	eax, 0FFFFFFFFh

loc_7EF437:
mov	esp, ebp
pop	ebp
retn
sub_7EF260 endp

align 4
off_7EF43C dd offset loc_7EF2ED	; jump table for switch	statement
dd offset loc_7EF30D
dd offset loc_7EF302
dd offset loc_7EF30D
dd offset loc_7EF302
dd offset loc_7EF30D
dd offset loc_7EF30D
dd offset loc_7EF2CD
off_7EF45C dd offset loc_7EF409	; jump table for switch	statement
dd offset loc_7EF418
dd offset loc_7EF38A
dd offset loc_7EF423
byte_7EF46C db	    0,	   0,	  3,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     3,     3
db	0,     1,     3,     1
db	3,     3,     3,     3
db	3,     2
align 4
off_7EF484 dd offset loc_7EF3FD	; jump table for switch	statement
dd offset loc_7EF409
byte_7EF48C db	    0,	   0,	  1,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     0
align 10h


; Attributes: bp-based frame

sub_7EF4B0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EF4C8
mov	eax, 0FFFFFFEAh
jmp	loc_7EF7C9

loc_7EF4C8:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EF4E6
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7EF500

loc_7EF4E6:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7EF500:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 19h ; switch 26 cases
ja	loc_7EF637	; default
			; jumptable 007EF523 cases 3,6-15,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7EF7EC[ecx]
jmp	ds:off_7EF7D0[edx*4] ; switch jump

loc_7EF52A:		; jumptable 007EF523 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EF56C ; jumptable 007EF523 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EF7C9

loc_7EF56C:		; jumptable 007EF523 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EF646

loc_7EF57A:		; jumptable 007EF523 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EF58F
mov	eax, 0FFFFFFFEh
jmp	loc_7EF7C9

loc_7EF58F:
mov	edx, 1
test	edx, edx
jz	short loc_7EF5A7
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF7C9

loc_7EF5A7:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EF646

loc_7EF5B5:		; jumptable 007EF523 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EF5CA
mov	eax, 0FFFFFFFEh
jmp	loc_7EF7C9

loc_7EF5CA:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EF5E2
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EF7C9

loc_7EF5E2:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EF646

loc_7EF5ED:		; jumptable 007EF523 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EF602
mov	eax, 0FFFFFFFEh
jmp	loc_7EF7C9

loc_7EF602:
mov	eax, 1
test	eax, eax
jz	short loc_7EF61A
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EF7C9

loc_7EF61A:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EF646

loc_7EF625:		; jumptable 007EF523 cases 4,5,16,25
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 16h
jmp	loc_7EF7C9

loc_7EF637:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EF523 cases 3,6-15,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF7C9

loc_7EF646:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7EF7C6
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EF670
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7EF68A

loc_7EF670:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EF68A:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 5
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7EF7B5	; default
			; jumptable 007EF6AD cases 3-12,14-16,18,23
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7EF824[eax]
jmp	ds:off_7EF808[ecx*4] ; switch jump

loc_7EF6B4:		; jumptable 007EF6AD case 24
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
movzx	ecx, ds:byte_1457B10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EF6F6 ; jumptable 007EF6AD cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EF7C9

loc_7EF6F6:		; jumptable 007EF6AD cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EF7C1

loc_7EF704:		; jumptable 007EF6AD case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EF719
mov	eax, 0FFFFFFFEh
jmp	loc_7EF7C9

loc_7EF719:
mov	edx, 1
test	edx, edx
jz	short loc_7EF731
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EF7C9

loc_7EF731:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EF7C1

loc_7EF73F:		; jumptable 007EF6AD case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EF751
mov	eax, 0FFFFFFFEh
jmp	short loc_7EF7C9

loc_7EF751:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EF766
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7EF7C9

loc_7EF766:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EF7C1

loc_7EF771:		; jumptable 007EF6AD case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EF783
mov	eax, 0FFFFFFFEh
jmp	short loc_7EF7C9

loc_7EF783:
mov	eax, 1
test	eax, eax
jz	short loc_7EF798
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EF7C9

loc_7EF798:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EF7C1

loc_7EF7A3:		; jumptable 007EF6AD case 13
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1Ch
jmp	short loc_7EF7C9

loc_7EF7B5:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EF6AD cases 3-12,14-16,18,23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EF7C9

loc_7EF7C1:
jmp	loc_7EF646

loc_7EF7C6:
or	eax, 0FFFFFFFFh

loc_7EF7C9:
mov	esp, ebp
pop	ebp
retn
sub_7EF4B0 endp

align 10h
off_7EF7D0 dd offset loc_7EF57A	; jump table for switch	statement
dd offset loc_7EF5B5
dd offset loc_7EF5ED
dd offset loc_7EF625
dd offset loc_7EF56C
dd offset loc_7EF52A
dd offset loc_7EF637
byte_7EF7EC db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	3,     3,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	3,     4,     6,     4
db	6,     6,     6,     6
db	5,     3
align 4
off_7EF808 dd offset loc_7EF704	; jump table for switch	statement
dd offset loc_7EF73F
dd offset loc_7EF771
dd offset loc_7EF7A3
dd offset loc_7EF6F6
dd offset loc_7EF6B4
dd offset loc_7EF7B5
byte_7EF824 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     3,     6,     6
db	6,     4,     6,     4
db	4,     4,     4,     6
db	5
align 10h


; Attributes: bp-based frame

sub_7EF840 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EF856
or	eax, 0FFFFFFFFh
jmp	loc_7EFB3E

loc_7EF856:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EF874
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7EF88E

loc_7EF874:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7EF88E:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7EF9B0	; default
			; jumptable 007EF8B1 cases 3-16,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7EFB5C[ecx]
jmp	ds:off_7EFB44[edx*4] ; switch jump

loc_7EF8B8:		; jumptable 007EF8B1 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EF8FA ; jumptable 007EF8B1 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EFB3E

loc_7EF8FA:		; jumptable 007EF8B1 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EF9BF

loc_7EF908:		; jumptable 007EF8B1 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EF91D
mov	eax, 0FFFFFFFEh
jmp	loc_7EFB3E

loc_7EF91D:
mov	edx, 1
test	edx, edx
jz	short loc_7EF935
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EFB3E

loc_7EF935:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EF9BF

loc_7EF940:		; jumptable 007EF8B1 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EF955
mov	eax, 0FFFFFFFEh
jmp	loc_7EFB3E

loc_7EF955:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EF96D
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EFB3E

loc_7EF96D:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EF9BF

loc_7EF978:		; jumptable 007EF8B1 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EF98D
mov	eax, 0FFFFFFFEh
jmp	loc_7EFB3E

loc_7EF98D:
mov	eax, 1
test	eax, eax
jz	short loc_7EF9A5
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EFB3E

loc_7EF9A5:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EF9BF

loc_7EF9B0:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007EF8B1 cases 3-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EFB3E

loc_7EF9BF:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7EFB39
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EF9E9
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
jmp	short loc_7EFA03

loc_7EF9E9:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7EFA03:
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 5
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 1Fh ; switch 32 cases
ja	loc_7EFB28	; default
			; jumptable 007EFA26 cases 3,7-15,18,23,26,28-30
mov	ecx, [ebp+var_10]
movzx	edx, ds:byte_7EFB94[ecx]
jmp	ds:off_7EFB78[edx*4] ; switch jump

loc_7EFA2D:		; jumptable 007EFA26 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7EFA6F ; jumptable 007EFA26 cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EFB3E

loc_7EFA6F:		; jumptable 007EFA26 cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7EFB34

loc_7EFA7D:		; jumptable 007EFA26 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7EFA92
mov	eax, 0FFFFFFFEh
jmp	loc_7EFB3E

loc_7EFA92:
mov	edx, 1
test	edx, edx
jz	short loc_7EFAAA
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EFB3E

loc_7EFAAA:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7EFB34

loc_7EFAB5:		; jumptable 007EFA26 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7EFAC7
mov	eax, 0FFFFFFFEh
jmp	short loc_7EFB3E

loc_7EFAC7:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7EFADC
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7EFB3E

loc_7EFADC:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7EFB34

loc_7EFAE7:		; jumptable 007EFA26 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7EFAF9
mov	eax, 0FFFFFFFEh
jmp	short loc_7EFB3E

loc_7EFAF9:
mov	eax, 1
test	eax, eax
jz	short loc_7EFB0E
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7EFB3E

loc_7EFB0E:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7EFB34

loc_7EFB19:		; jumptable 007EFA26 cases 4-6,16,25,27,31
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 14h
jmp	short loc_7EFB3E

loc_7EFB28:		; default
mov	eax, [ebp+arg_C] ; jumptable 007EFA26 cases 3,7-15,18,23,26,28-30
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7EFB3E

loc_7EFB34:
jmp	loc_7EF9BF

loc_7EFB39:
mov	eax, 0FFFFFFECh

loc_7EFB3E:
mov	esp, ebp
pop	ebp
retn
sub_7EF840 endp

align 4
off_7EFB44 dd offset loc_7EF908	; jump table for switch	statement
dd offset loc_7EF940
dd offset loc_7EF978
dd offset loc_7EF8FA
dd offset loc_7EF8B8
dd offset loc_7EF9B0
byte_7EFB5C db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7EFB78 dd offset loc_7EFA7D	; jump table for switch	statement
dd offset loc_7EFAB5
dd offset loc_7EFAE7
dd offset loc_7EFB19
dd offset loc_7EFA6F
dd offset loc_7EFA2D
dd offset loc_7EFB28
byte_7EFB94 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	3,     3,     3,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	3,     4,     6,     4
db	4,     4,     4,     6
db	5,     3,     6,     3
db	6,     6,     6,     3
align 10h


; Attributes: bp-based frame

sub_7EFBC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h

loc_7EFBC6:
mov	eax, [ebp+arg_8]
cmp	eax, [ebp+arg_C]
jz	loc_7EFD89
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EFBF0
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
jmp	short loc_7EFC0A

loc_7EFBF0:
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7EFC0A:
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0Dh ; switch 14 cases
ja	loc_7EFD7B	; default
			; jumptable 007EFC2A cases 2-4,9-11
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7EFDA8[ecx]
jmp	ds:off_7EFD90[edx*4] ; switch jump

loc_7EFC31:		; jumptable 007EFC2A case 5
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
cmp	eax, 2
jge	short loc_7EFC46
mov	eax, 0FFFFFFFEh
jmp	loc_7EFD8C

loc_7EFC46:
xor	ecx, ecx
jz	short loc_7EFC59
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
xor	eax, eax
jmp	loc_7EFD8C

loc_7EFC59:
mov	ecx, [ebp+arg_8]
add	ecx, 2
mov	[ebp+arg_8], ecx
jmp	loc_7EFD84

loc_7EFC67:		; jumptable 007EFC2A case 6
mov	edx, [ebp+arg_C]
sub	edx, [ebp+arg_8]
cmp	edx, 3
jge	short loc_7EFC7C
mov	eax, 0FFFFFFFEh
jmp	loc_7EFD8C

loc_7EFC7C:
xor	eax, eax
jz	short loc_7EFC8F
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7EFD8C

loc_7EFC8F:
mov	eax, [ebp+arg_8]
add	eax, 3
mov	[ebp+arg_8], eax
jmp	loc_7EFD84

loc_7EFC9D:		; jumptable 007EFC2A case 7
mov	ecx, [ebp+arg_C]
sub	ecx, [ebp+arg_8]
cmp	ecx, 4
jge	short loc_7EFCB2
mov	eax, 0FFFFFFFEh
jmp	loc_7EFD8C

loc_7EFCB2:
xor	edx, edx
jz	short loc_7EFCC5
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EFD8C

loc_7EFCC5:
mov	edx, [ebp+arg_8]
add	edx, 4
mov	[ebp+arg_8], edx
jmp	loc_7EFD84

loc_7EFCD3:		; jumptable 007EFC2A cases 0,1,8
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EFD8C

loc_7EFCE2:		; jumptable 007EFC2A cases 12,13
mov	edx, [ebp+arg_8]
add	edx, 2
mov	[ebp+arg_8], edx
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_0]
jz	short loc_7EFCF8
jmp	loc_7EFD84

loc_7EFCF8:
mov	ecx, [ebp+arg_8]
cmp	ecx, [ebp+arg_C]
jnz	short loc_7EFD0A
mov	eax, 0FFFFFFE5h
jmp	loc_7EFD8C

loc_7EFD0A:
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EFD30
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_10], eax
jmp	short loc_7EFD4A

loc_7EFD30:
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7EFD4A:
mov	edx, [ebp+var_10]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 9
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 15h ; switch 22 cases
ja	short loc_7EFD77 ; default
			; jumptable 007EFD69 cases 3-10,13-20
mov	ecx, [ebp+var_14]
movzx	edx, ds:byte_7EFDC0[ecx]
jmp	ds:off_7EFDB8[edx*4] ; switch jump

loc_7EFD70:		; jumptable 007EFD69 cases 0-2,11,12,21
mov	eax, 1Bh
jmp	short loc_7EFD8C

loc_7EFD77:		; default
xor	eax, eax	; jumptable 007EFD69 cases 3-10,13-20
jmp	short loc_7EFD8C

loc_7EFD7B:		; default
mov	eax, [ebp+arg_8] ; jumptable 007EFC2A cases 2-4,9-11
add	eax, 2
mov	[ebp+arg_8], eax

loc_7EFD84:
jmp	loc_7EFBC6

loc_7EFD89:
or	eax, 0FFFFFFFFh

loc_7EFD8C:
mov	esp, ebp
pop	ebp
retn
sub_7EFBC0 endp

off_7EFD90 dd offset loc_7EFCD3	; jump table for switch	statement
dd offset loc_7EFC31
dd offset loc_7EFC67
dd offset loc_7EFC9D
dd offset loc_7EFCE2
dd offset loc_7EFD7B
byte_7EFDA8 db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	4,     4
align 4
off_7EFDB8 dd offset loc_7EFD70	; jump table for switch	statement
dd offset loc_7EFD77
byte_7EFDC0 db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     0
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     0
align 10h


; Attributes: bp-based frame

sub_7EFDE0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EFDF8
mov	eax, 0FFFFFFFCh
jmp	loc_7EFFDA

loc_7EFDF8:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx

loc_7EFDFE:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7EFFCD
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7EFE28
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
jmp	short loc_7EFE42

loc_7EFE28:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7EFE42:
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
sub	edx, 2
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 13h ; switch 20 cases
ja	loc_7EFFBF	; default
			; jumptable 007EFE65 cases 2,6,9-18
mov	eax, [ebp+var_C]
movzx	ecx, ds:byte_7F0004[eax]
jmp	ds:off_7EFFE0[ecx*4] ; switch jump

loc_7EFE6C:		; jumptable 007EFE65 case 3
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7EFFC8

loc_7EFE7A:		; jumptable 007EFE65 case 4
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7EFFC8

loc_7EFE88:		; jumptable 007EFE65 case 5
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7EFFC8

loc_7EFE96:		; jumptable 007EFE65 case 1
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7EFEBE
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7EC120
add	esp, 10h
jmp	loc_7EFFDA

loc_7EFEBE:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7EFFDA

loc_7EFED0:		; jumptable 007EFE65 case 0
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7EFFDA

loc_7EFEDF:		; jumptable 007EFE65 case 8
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7EFEFC
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 7
jmp	loc_7EFFDA

loc_7EFEFC:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	loc_7EFFDA

loc_7EFF0E:		; jumptable 007EFE65 case 7
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7EFF87
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7EFF31
mov	eax, 0FFFFFFFDh
jmp	loc_7EFFDA

loc_7EFF31:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7EFF4F
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_10], eax
jmp	short loc_7EFF69

loc_7EFF4F:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7EFF69:
cmp	[ebp+var_10], 0Ah
jnz	short loc_7EFF78
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7EFF78:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 7
jmp	short loc_7EFFDA

loc_7EFF87:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	short loc_7EFFDA

loc_7EFF96:		; jumptable 007EFE65 case 19
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7EFFB0
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 27h
jmp	short loc_7EFFDA

loc_7EFFB0:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7EFFDA

loc_7EFFBF:		; default
mov	eax, [ebp+arg_4] ; jumptable 007EFE65 cases 2,6,9-18
add	eax, 2
mov	[ebp+arg_4], eax

loc_7EFFC8:
jmp	loc_7EFDFE

loc_7EFFCD:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7EFFDA:
mov	esp, ebp
pop	ebp
retn
sub_7EFDE0 endp

align 10h
off_7EFFE0 dd offset loc_7EFED0	; jump table for switch	statement
dd offset loc_7EFE96
dd offset loc_7EFE6C
dd offset loc_7EFE7A
dd offset loc_7EFE88
dd offset loc_7EFF0E
dd offset loc_7EFEDF
dd offset loc_7EFF96
dd offset loc_7EFFBF
byte_7F0004 db	    0,	   1,	  8,	 2 ; indirect table for	switch statement
db	3,     4,     8,     5
db	6,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     7
align 10h


; Attributes: bp-based frame

sub_7F0020 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F0038
mov	eax, 0FFFFFFFCh
jmp	loc_7F022C

loc_7F0038:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx

loc_7F003E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F021F
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F0068
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F0082

loc_7F0068:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F0082:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 3
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 1Bh ; switch 28 cases
ja	loc_7F0211	; default
			; jumptable 007F00A5 cases 1,5,8-26
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7F0250[eax]
jmp	ds:off_7F0230[ecx*4] ; switch jump

loc_7F00AC:		; jumptable 007F00A5 case 2
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F021A

loc_7F00BA:		; jumptable 007F00A5 case 3
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F021A

loc_7F00C8:		; jumptable 007F00A5 case 4
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7F021A

loc_7F00D6:		; jumptable 007F00A5 case 0
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7F00FE
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7EC120
add	esp, 10h
jmp	loc_7F022C

loc_7F00FE:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7F022C

loc_7F0110:		; jumptable 007F00A5 case 27
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jnz	short loc_7F0148
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7EF4B0
add	esp, 10h
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
sub	eax, 16h
neg	eax
sbb	eax, eax
and	eax, [ebp+var_8]
jmp	loc_7F022C

loc_7F0148:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	loc_7F022C

loc_7F015A:		; jumptable 007F00A5 case 7
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7F0177
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 7
jmp	loc_7F022C

loc_7F0177:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7F022C

loc_7F0189:		; jumptable 007F00A5 case 6
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jnz	short loc_7F0202
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F01AC
mov	eax, 0FFFFFFFDh
jmp	loc_7F022C

loc_7F01AC:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F01CA
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7F01E4

loc_7F01CA:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F01E4:
cmp	[ebp+var_14], 0Ah
jnz	short loc_7F01F3
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F01F3:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 7
jmp	short loc_7F022C

loc_7F0202:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7F022C

loc_7F0211:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F00A5 cases 1,5,8-26
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F021A:
jmp	loc_7F003E

loc_7F021F:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7F022C:
mov	esp, ebp
pop	ebp
retn
sub_7F0020 endp

off_7F0230 dd offset loc_7F00D6	; jump table for switch	statement
dd offset loc_7F00AC
dd offset loc_7F00BA
dd offset loc_7F00C8
dd offset loc_7F0189
dd offset loc_7F015A
dd offset loc_7F0110
dd offset loc_7F0211
byte_7F0250 db	    0,	   7,	  1,	 2 ; indirect table for	switch statement
db	3,     7,     4,     5
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     6
align 10h


; Attributes: bp-based frame

sub_7F0270 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], 0
mov	eax, 1
test	eax, eax
jz	short loc_7F02A9
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
and	edx, 1
jz	short loc_7F02A9
mov	eax, [ebp+var_8]
and	eax, 0FFFFFFFEh
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
add	ecx, [ebp+var_8]
mov	[ebp+arg_8], ecx

loc_7F02A9:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F04BC
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F02D3
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F02ED

loc_7F02D3:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F02ED:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 8	; switch 9 cases
ja	loc_7F04AE	; default
			; jumptable 007F0300 case 3
mov	edx, [ebp+var_10]
jmp	ds:off_7F04C4[edx*4] ; switch jump

loc_7F0307:		; jumptable 007F0300 case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F031C
mov	eax, 0FFFFFFFEh
jmp	loc_7F04BF

loc_7F031C:
xor	ecx, ecx
jz	short loc_7F032F
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F04BF

loc_7F032F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F04B7

loc_7F033D:		; jumptable 007F0300 case 6
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F0352
mov	eax, 0FFFFFFFEh
jmp	loc_7F04BF

loc_7F0352:
xor	eax, eax
jz	short loc_7F0365
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F04BF

loc_7F0365:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F04B7

loc_7F0373:		; jumptable 007F0300 case 7
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F0388
mov	eax, 0FFFFFFFEh
jmp	loc_7F04BF

loc_7F0388:
xor	edx, edx
jz	short loc_7F039B
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F04BF

loc_7F039B:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7F04B7

loc_7F03A9:		; jumptable 007F0300 cases 0,1,8
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F04BF

loc_7F03B8:		; jumptable 007F0300 case 2
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F03D1
or	eax, 0FFFFFFFFh
jmp	loc_7F04BF

loc_7F03D1:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0428
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 21h
jnz	short loc_7F0428
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F0400
or	eax, 0FFFFFFFFh
jmp	loc_7F04BF

loc_7F0400:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0428
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 5Bh
jnz	short loc_7F0428
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F0428:
jmp	loc_7F04B7

loc_7F042D:		; jumptable 007F0300 case 4
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F0443
or	eax, 0FFFFFFFFh
jmp	short loc_7F04BF

loc_7F0443:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F04AC
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 5Dh
jnz	short loc_7F04AC
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F046F
or	eax, 0FFFFFFFFh
jmp	short loc_7F04BF

loc_7F046F:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F04AC
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 3Eh
jnz	short loc_7F04AC
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
cmp	[ebp+var_4], 0
jnz	short loc_7F04A3
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 2Ah
jmp	short loc_7F04BF

loc_7F04A3:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_7F04AC:
jmp	short loc_7F04B7

loc_7F04AE:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F0300 case 3
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F04B7:
jmp	loc_7F02A9

loc_7F04BC:
or	eax, 0FFFFFFFFh

loc_7F04BF:
mov	esp, ebp
pop	ebp
retn
sub_7F0270 endp

align 4
off_7F04C4 dd offset loc_7F03A9	; jump table for switch	statement
dd offset loc_7F03A9
dd offset loc_7F03B8
dd offset loc_7F04AE
dd offset loc_7F042D
dd offset loc_7F0307
dd offset loc_7F033D
dd offset loc_7F0373
dd offset loc_7F03A9
align 10h


; Attributes: bp-based frame

sub_7F04F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_8]
sub	ecx, 2
mov	[ebp+arg_8], ecx
jmp	short loc_7F0513

loc_7F050A:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F0513:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F0611
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F053D
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F0557

loc_7F053D:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F0557:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 9
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 1Ah ; switch 27 cases
ja	short loc_7F05CD ; default
			; jumptable 007F0576 cases 2,3,11,19,20
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7F062C[ecx]
jmp	ds:off_7F061C[edx*4] ; switch jump

loc_7F057D:		; jumptable 007F0576 cases 0,1,4-10,14-16,18,21-26
jmp	loc_7F060C

loc_7F0582:		; jumptable 007F0576 case 12
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F05A4
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 9
jnz	short loc_7F05A4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F0616

loc_7F05A4:
jmp	short loc_7F060C

loc_7F05A6:		; jumptable 007F0576 cases 13,17
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F05BC
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	[ebp+var_C], eax
jmp	short loc_7F05C3

loc_7F05BC:
mov	[ebp+var_C], 0FFFFFFFFh

loc_7F05C3:
mov	ecx, [ebp+var_C]
and	ecx, 0FFFFFF80h
jnz	short loc_7F05CD ; default
			; jumptable 007F0576 cases 2,3,11,19,20
jmp	short loc_7F060C

loc_7F05CD:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F0576 cases 2,3,11,19,20
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F05E3
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_10], edx
jmp	short loc_7F05EA

loc_7F05E3:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7F05EA:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 24h
jz	short loc_7F05FE
cmp	[ebp+var_14], 40h
jz	short loc_7F05FE
jmp	short loc_7F0600

loc_7F05FE:
jmp	short loc_7F060C

loc_7F0600:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F0616

loc_7F060C:
jmp	loc_7F050A

loc_7F0611:
mov	eax, 1

loc_7F0616:
mov	esp, ebp
pop	ebp
retn
sub_7F04F0 endp

align 4
off_7F061C dd offset loc_7F057D	; jump table for switch	statement
dd offset loc_7F0582
dd offset loc_7F05A6
dd offset loc_7F05CD
byte_7F062C db	    0,	   0,	  3,	 3 ; indirect table for	switch statement
db	0,     0,     0,     0
db	0,     0,     0,     3
db	1,     2,     0,     0
db	0,     2,     0,     3
db	3,     0,     0,     0
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7F0650 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_C], 1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F067F

loc_7F0676:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F067F:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F069D
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_10], ecx
jmp	short loc_7F06B7

loc_7F069D:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7F06B7:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
sub	ecx, 3
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 1Ah ; switch 27 cases
ja	loc_7F09DD	; default
			; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25
mov	edx, [ebp+var_14]
movzx	eax, ds:byte_7F0A14[edx]
jmp	ds:off_7F09E8[eax*4] ; switch jump

loc_7F06E1:		; jumptable 007F06DA case 2
cmp	[ebp+var_C], 0
jnz	short loc_7F0713
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F070C
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax+edx], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	byte ptr [eax+edx+0Ch],	1

loc_7F070C:
mov	[ebp+var_C], 1

loc_7F0713:
mov	ecx, [ebp+arg_4]
mov	[ebp+arg_4], ecx
jmp	loc_7F09DD	; default
			; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F071E:		; jumptable 007F06DA case 3
cmp	[ebp+var_C], 0
jnz	short loc_7F0750
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F0749
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx+eax], edx
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	1

loc_7F0749:
mov	[ebp+var_C], 1

loc_7F0750:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7F09DD	; default
			; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F075E:		; jumptable 007F06DA case 4
cmp	[ebp+var_C], 0
jnz	short loc_7F0790
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7F0789
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx+ecx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	byte ptr [edx+ecx+0Ch],	1

loc_7F0789:
mov	[ebp+var_C], 1

loc_7F0790:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F09DD	; default
			; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F079E:		; jumptable 007F06DA cases 19,21,26
cmp	[ebp+var_C], 0
jnz	short loc_7F07D0
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F07C9
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax+edx], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	byte ptr [eax+edx+0Ch],	1

loc_7F07C9:
mov	[ebp+var_C], 1

loc_7F07D0:		; default
jmp	loc_7F09DD	; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F07D5:		; jumptable 007F06DA case 9
cmp	[ebp+var_C], 2
jz	short loc_7F0806
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F07F6
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx+eax+4], edx

loc_7F07F6:
mov	[ebp+var_C], 2
mov	[ebp+var_4], 0Ch
jmp	short loc_7F0834

loc_7F0806:
cmp	[ebp+var_4], 0Ch
jnz	short loc_7F0834
mov	[ebp+var_C], 0
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F082B
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx+eax+8], edx

loc_7F082B:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7F0834:		; default
jmp	loc_7F09DD	; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F0839:		; jumptable 007F06DA case 10
cmp	[ebp+var_C], 2
jz	short loc_7F086A
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F085A
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx+eax+4], edx

loc_7F085A:
mov	[ebp+var_C], 2
mov	[ebp+var_4], 0Dh
jmp	short loc_7F0898

loc_7F086A:
cmp	[ebp+var_4], 0Dh
jnz	short loc_7F0898
mov	[ebp+var_C], 0
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F088F
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx+eax+8], edx

loc_7F088F:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7F0898:		; default
jmp	loc_7F09DD	; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F089D:		; jumptable 007F06DA case 0
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F08B3
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	byte ptr [eax+edx+0Ch],	0

loc_7F08B3:		; default
jmp	loc_7F09DD	; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F08B8:		; jumptable 007F06DA case 18
cmp	[ebp+var_C], 1
jnz	short loc_7F08CA
mov	[ebp+var_C], 0
jmp	loc_7F09A3

loc_7F08CA:
cmp	[ebp+var_C], 2
jnz	loc_7F09A3
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	loc_7F09A3
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
movsx	ecx, byte ptr [eax+edx+0Ch]
test	ecx, ecx
jz	loc_7F09A3
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+edx+4]
jz	loc_7F0995
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F0922
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_18], edx
jmp	short loc_7F0929

loc_7F0922:
mov	[ebp+var_18], 0FFFFFFFFh

loc_7F0929:
cmp	[ebp+var_18], 20h
jnz	short loc_7F0995
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+3]
test	ecx, ecx
jnz	short loc_7F0946
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+2]
mov	[ebp+var_1C], eax
jmp	short loc_7F094D

loc_7F0946:
mov	[ebp+var_1C], 0FFFFFFFFh

loc_7F094D:
cmp	[ebp+var_1C], 20h
jz	short loc_7F0995
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+3]
test	edx, edx
jnz	short loc_7F0972
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_20], eax
jmp	short loc_7F098D

loc_7F0972:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+2]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+3]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_20], eax

loc_7F098D:
mov	edx, [ebp+var_20]
cmp	edx, [ebp+var_4]
jnz	short loc_7F09A3

loc_7F0995:
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	0

loc_7F09A3:		; default
jmp	short loc_7F09DD ; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F09A5:		; jumptable 007F06DA cases 6,7
cmp	[ebp+var_C], 1
jnz	short loc_7F09B4
mov	[ebp+var_C], 0
jmp	short loc_7F09D0

loc_7F09B4:
cmp	[ebp+var_C], 2
jnz	short loc_7F09D0
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F09D0
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	0

loc_7F09D0:		; default
jmp	short loc_7F09DD ; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F09D2:		; jumptable 007F06DA cases 8,14
cmp	[ebp+var_C], 2
jz	short loc_7F09DD ; default
			; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25
mov	eax, [ebp+var_8]
jmp	short loc_7F09E2

loc_7F09DD:		; default
jmp	loc_7F0676	; jumptable 007F06DA cases 1,5,11-13,15-17,20,22-25

loc_7F09E2:
mov	esp, ebp
pop	ebp
retn
sub_7F0650 endp

align 4
off_7F09E8 dd offset loc_7F089D	; jump table for switch	statement
dd offset loc_7F06E1
dd offset loc_7F071E
dd offset loc_7F075E
dd offset loc_7F09A5
dd offset loc_7F09D2
dd offset loc_7F07D5
dd offset loc_7F0839
dd offset loc_7F08B8
dd offset loc_7F079E
dd offset loc_7F09DD
byte_7F0A14 db	    0,	 0Ah,	  1,	 2 ; indirect table for	switch statement
db	3,   0Ah,     4,     4
db	5,     6,     7,   0Ah
db    0Ah,   0Ah,     5,   0Ah
db    0Ah,   0Ah,     8,     9
db    0Ah,     9,   0Ah,   0Ah
db    0Ah,   0Ah,     9
align 10h


; Attributes: bp-based frame

sub_7F0A30 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	loc_7F0B35
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 78h
jnz	loc_7F0B35
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F0A78

loc_7F0A6F:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F0A78:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0A92
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Bh
jz	loc_7F0B33

loc_7F0A92:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F0AA8
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_10], edx
jmp	short loc_7F0AAF

loc_7F0AA8:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7F0AAF:
mov	eax, [ebp+var_10]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
sub	edx, 30h
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 36h ; switch 55 cases
ja	short loc_7F0B20 ; default
			; jumptable 007F0AD4 cases 10-16,23-48
mov	eax, [ebp+var_14]
movzx	ecx, ds:byte_7F0BC0[eax]
jmp	ds:off_7F0BB0[ecx*4] ; switch jump

loc_7F0ADB:		; jumptable 007F0AD4 cases 0-9
mov	edx, [ebp+var_4]
shl	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
sub	eax, 30h
or	eax, [ebp+var_4]
mov	[ebp+var_4], eax
jmp	short loc_7F0B20 ; default
			; jumptable 007F0AD4 cases 10-16,23-48

loc_7F0AF2:		; jumptable 007F0AD4 cases 17-22
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx-37h]
mov	[ebp+var_4], ecx
jmp	short loc_7F0B20 ; default
			; jumptable 007F0AD4 cases 10-16,23-48

loc_7F0B0A:		; jumptable 007F0AD4 cases 49-54
mov	edx, [ebp+var_4]
shl	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax-57h]
mov	[ebp+var_4], edx

loc_7F0B20:		; default
cmp	[ebp+var_4], 110000h ; jumptable 007F0AD4 cases	10-16,23-48
jl	short loc_7F0B2E
or	eax, 0FFFFFFFFh
jmp	short loc_7F0BAB

loc_7F0B2E:
jmp	loc_7F0A6F

loc_7F0B33:
jmp	short loc_7F0B9F

loc_7F0B35:
jmp	short loc_7F0B40

loc_7F0B37:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F0B40:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0B56
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 3Bh
jz	short loc_7F0B9F

loc_7F0B56:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F0B6C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_18], edx
jmp	short loc_7F0B73

loc_7F0B6C:
mov	[ebp+var_18], 0FFFFFFFFh

loc_7F0B73:
mov	eax, [ebp+var_18]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
imul	ecx, 0Ah
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx-30h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 110000h
jl	short loc_7F0B9D
or	eax, 0FFFFFFFFh
jmp	short loc_7F0BAB

loc_7F0B9D:
jmp	short loc_7F0B37

loc_7F0B9F:
mov	edx, [ebp+var_4]
push	edx
call	sub_7F6EB0
add	esp, 4

loc_7F0BAB:
mov	esp, ebp
pop	ebp
retn
sub_7F0A30 endp

align 10h
off_7F0BB0 dd offset loc_7F0ADB, offset	loc_7F0AF2 ; jump table	for switch statement
dd offset loc_7F0B0A, offset loc_7F0B20
byte_7F0BC0 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	0,     0,     0,     0
db	0,     0,     3,     3
db	3,     3,     3,     3
db	3,     1,     1,     1
db	1,     1,     1,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     2,     2,     2
db	2,     2,     2
align 10h


; Attributes: bp-based frame

sub_7F0C00 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 2
jz	short loc_7F0C2F
cmp	[ebp+var_4], 3
jz	short loc_7F0C90
cmp	[ebp+var_4], 4
jz	loc_7F0CF3
jmp	loc_7F0DF1

loc_7F0C2F:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+3]
test	ecx, ecx
jnz	short loc_7F0C8B
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+2]
cmp	eax, 74h
jnz	short loc_7F0C8B
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0C5C
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	[ebp+var_8], ecx
jmp	short loc_7F0C63

loc_7F0C5C:
mov	[ebp+var_8], 0FFFFFFFFh

loc_7F0C63:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 67h
jz	short loc_7F0C81
cmp	[ebp+var_C], 6Ch
jz	short loc_7F0C77
jmp	short loc_7F0C8B

loc_7F0C77:
mov	eax, 3Ch
jmp	loc_7F0DF3

loc_7F0C81:
mov	eax, 3Eh
jmp	loc_7F0DF3

loc_7F0C8B:
jmp	loc_7F0DF1

loc_7F0C90:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F0CEE
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 61h
jnz	short loc_7F0CEE
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F0CEE
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 6Dh
jnz	short loc_7F0CEE
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0CEE
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 70h
jnz	short loc_7F0CEE
mov	eax, 26h
jmp	loc_7F0DF3

loc_7F0CEE:
jmp	loc_7F0DF1

loc_7F0CF3:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F0D09
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	[ebp+var_10], edx
jmp	short loc_7F0D10

loc_7F0D09:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7F0D10:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 61h
jz	short loc_7F0D8D
cmp	[ebp+var_14], 71h
jz	short loc_7F0D27
jmp	loc_7F0DF1

loc_7F0D27:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F0D8B
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 75h
jnz	short loc_7F0D8B
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0D8B
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 6Fh
jnz	short loc_7F0D8B
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F0D8B
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 74h
jnz	short loc_7F0D8B
mov	eax, 22h
jmp	short loc_7F0DF3

loc_7F0D8B:
jmp	short loc_7F0DF1

loc_7F0D8D:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F0DF1
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
cmp	edx, 70h
jnz	short loc_7F0DF1
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F0DF1
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
cmp	ecx, 6Fh
jnz	short loc_7F0DF1
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F0DF1
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
cmp	eax, 73h
jnz	short loc_7F0DF1
mov	eax, 27h
jmp	short loc_7F0DF3

loc_7F0DF1:
xor	eax, eax

loc_7F0DF3:
mov	esp, ebp
pop	ebp
retn
sub_7F0C00 endp

align 10h


; Attributes: bp-based frame

sub_7F0E00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h

loc_7F0E06:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F0E24
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7F0E3E

loc_7F0E24:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F0E3E:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
sub	edx, 5
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7F0FC9	; default
			; jumptable 007F0E61 cases 3-16,23
mov	eax, [ebp+var_8]
movzx	ecx, ds:byte_7F105C[eax]
jmp	ds:off_7F1048[ecx*4] ; switch jump

loc_7F0E68:		; jumptable 007F0E61 case 2
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F0E91 ; jumptable 007F0E61 case 1
xor	eax, eax
jmp	loc_7F1042

loc_7F0E91:		; jumptable 007F0E61 case 1
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F0EBA ; jumptable 007F0E61 case 0
xor	eax, eax
jmp	loc_7F1042

loc_7F0EBA:		; jumptable 007F0E61 case 0
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F0EE3
xor	eax, eax
jmp	loc_7F1042

loc_7F0EE3:
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F0F0C
xor	eax, eax
jmp	loc_7F1042

loc_7F0F0C:
jmp	loc_7F103D

loc_7F0F11:		; jumptable 007F0E61 cases 17-22,24
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
cmp	edx, eax
jz	short loc_7F0F3A
xor	eax, eax
jmp	loc_7F1042

loc_7F0F3A:
mov	edx, 1
test	edx, edx
jz	loc_7F0FC7
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	edx, [ebp+arg_8]
add	edx, 1
mov	[ebp+arg_8], edx
cmp	eax, ecx
jz	short loc_7F0F70
xor	eax, eax
jmp	loc_7F1042

loc_7F0F70:
xor	eax, eax
jz	short loc_7F0FC7
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_8]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
cmp	ecx, edx
jz	short loc_7F0F9D
xor	eax, eax
jmp	loc_7F1042

loc_7F0F9D:
xor	ecx, ecx
jz	short loc_7F0FC7
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
cmp	edx, eax
jz	short loc_7F0FC7
xor	eax, eax
jmp	short loc_7F1042

loc_7F0FC7:
jmp	short loc_7F103D

loc_7F0FC9:		; default
xor	edx, edx	; jumptable 007F0E61 cases 3-16,23
jz	short loc_7F0FD4
mov	eax, 1
jmp	short loc_7F1042

loc_7F0FD4:
mov	eax, [ebp+arg_8]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F0FF2
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F100C

loc_7F0FF2:
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F100C:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 5
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	short loc_7F1036 ; default
			; jumptable 007F102B cases 3-16,23
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7F1080[eax]
jmp	ds:off_7F1078[ecx*4] ; switch jump

loc_7F1032:		; jumptable 007F102B cases 0-2,17-22,24
xor	eax, eax
jmp	short loc_7F1042

loc_7F1036:		; default
mov	eax, 1		; jumptable 007F102B cases 3-16,23
jmp	short loc_7F1042

loc_7F103D:
jmp	loc_7F0E06

loc_7F1042:
mov	esp, ebp
pop	ebp
retn
sub_7F0E00 endp

align 4
off_7F1048 dd offset loc_7F0EBA	; jump table for switch	statement
dd offset loc_7F0E91
dd offset loc_7F0E68
dd offset loc_7F0F11
dd offset loc_7F0FC9
byte_7F105C db	    0,	   1,	  2,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3,     3,     3
db	3,     3,     3,     4
db	3
align 4
off_7F1078 dd offset loc_7F1032	; jump table for switch	statement
dd offset loc_7F1036
byte_7F1080 db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     0,     0,     0
db	0,     0,     0,     1
db	0
align 10h


; Attributes: bp-based frame

sub_7F10A0 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
jmp	short loc_7F10B7

loc_7F10A5:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_C]
add	ecx, 1
mov	[ebp+arg_C], ecx

loc_7F10B7:
mov	edx, [ebp+arg_C]
movsx	eax, byte ptr [edx]
test	eax, eax
jz	short loc_7F10EE
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F10CD
xor	eax, eax
jmp	short loc_7F10F9

loc_7F10CD:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
test	eax, eax
jnz	short loc_7F10E8
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_C]
movsx	ecx, byte ptr [eax]
cmp	edx, ecx
jz	short loc_7F10EC

loc_7F10E8:
xor	eax, eax
jmp	short loc_7F10F9

loc_7F10EC:
jmp	short loc_7F10A5

loc_7F10EE:
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+arg_8]
setz	al

loc_7F10F9:
pop	ebp
retn
sub_7F10A0 endp

align 10h


; Attributes: bp-based frame

sub_7F1100 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax

loc_7F110C:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F112A
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
jmp	short loc_7F1144

loc_7F112A:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7F1144:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
sub	eax, 5
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 18h ; switch 25 cases
ja	short loc_7F1196 ; default
			; jumptable 007F1163 cases 3-16,23
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7F11BC[ecx]
jmp	ds:off_7F11A8[edx*4] ; switch jump

loc_7F116A:		; jumptable 007F1163 case 0
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F119E

loc_7F1175:		; jumptable 007F1163 case 1
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F119E

loc_7F1180:		; jumptable 007F1163 case 2
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7F119E

loc_7F118B:		; jumptable 007F1163 cases 17-22,24
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F119E

loc_7F1196:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F1163 cases 3-16,23
sub	eax, [ebp+var_4]
jmp	short loc_7F11A3

loc_7F119E:
jmp	loc_7F110C

loc_7F11A3:
mov	esp, ebp
pop	ebp
retn
sub_7F1100 endp

align 4
off_7F11A8 dd offset loc_7F116A	; jump table for switch	statement
dd offset loc_7F1175
dd offset loc_7F1180
dd offset loc_7F118B
dd offset loc_7F1196
byte_7F11BC db	    0,	   1,	  2,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3,     3,     3
db	3,     3,     3,     4
db	3
align 10h


; Attributes: bp-based frame

sub_7F11E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8

loc_7F11E6:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F1204
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7F121E

loc_7F1204:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F121E:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 9
jl	short loc_7F1243
cmp	[ebp+var_8], 0Ah
jle	short loc_7F1238
cmp	[ebp+var_8], 15h
jz	short loc_7F1238
jmp	short loc_7F1243

loc_7F1238:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F1248

loc_7F1243:
mov	eax, [ebp+arg_4]
jmp	short loc_7F124A

loc_7F1248:
jmp	short loc_7F11E6

loc_7F124A:
mov	esp, ebp
pop	ebp
retn
sub_7F11E0 endp

align 10h


; Attributes: bp-based frame

sub_7F1250 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch

loc_7F1256:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F1397
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F1280
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F129A

loc_7F1280:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F129A:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 5	; switch 6 cases
ja	loc_7F137A	; default
			; jumptable 007F12B6 case 3
mov	ecx, [ebp+var_8]
jmp	ds:off_7F139C[ecx*4] ; switch jump

loc_7F12BD:		; jumptable 007F12B6 case 0
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F1383

loc_7F12CB:		; jumptable 007F12B6 case 1
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F1383

loc_7F12D9:		; jumptable 007F12B6 case 2
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7F1383

loc_7F12E7:		; jumptable 007F12B6 case 5
mov	edx, [ebp+arg_C]
mov	dword ptr [edx+4], 0FFFFFFFFh
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F1383

loc_7F1309:		; jumptable 007F12B6 case 4
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	short loc_7F136E
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
test	ecx, ecx
jnz	short loc_7F1345
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F135F

loc_7F1345:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F135F:
cmp	[ebp+var_C], 0Ah
jnz	short loc_7F136E
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F136E:
mov	edx, [ebp+arg_C]
mov	dword ptr [edx+4], 0FFFFFFFFh
jmp	short loc_7F1383

loc_7F137A:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F12B6 case 3
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F1383:
mov	ecx, [ebp+arg_C]
mov	edx, [ecx+4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax+4], edx
jmp	loc_7F1256

loc_7F1397:
mov	esp, ebp
pop	ebp
retn
sub_7F1250 endp

align 4
off_7F139C dd offset loc_7F12BD	; jump table for switch	statement
dd offset loc_7F12CB
dd offset loc_7F12D9
dd offset loc_7F137A
dd offset loc_7F1309
dd offset loc_7F12E7
align 10h


; Attributes: bp-based frame

sub_7F13C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F13D8
mov	eax, 0FFFFFFFCh
jmp	loc_7F172B

loc_7F13D8:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F140E
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
and	eax, 1
jz	short loc_7F140E
mov	ecx, [ebp+var_4]
and	ecx, 0FFFFFFFEh
mov	[ebp+var_4], ecx
jnz	short loc_7F1405
or	eax, 0FFFFFFFFh
jmp	loc_7F172B

loc_7F1405:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_4]
mov	[ebp+arg_8], edx

loc_7F140E:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F142C
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
jmp	short loc_7F1446

loc_7F142C:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7F1446:
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0Ah ; switch 11 cases
ja	loc_7F1615	; default
			; jumptable 007F1459 cases 2,3
mov	edx, [ebp+var_C]
jmp	ds:off_7F1730[edx*4] ; switch jump

loc_7F1460:		; jumptable 007F1459 case 4
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F1479
or	eax, 0FFFFFFFFh
jmp	loc_7F172B

loc_7F1479:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F148F
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 5Dh
jz	short loc_7F1494

loc_7F148F:
jmp	loc_7F161E

loc_7F1494:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F14AD
or	eax, 0FFFFFFFFh
jmp	loc_7F172B

loc_7F14AD:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F14C3
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 3Eh
jz	short loc_7F14D1

loc_7F14C3:
mov	eax, [ebp+arg_4]
sub	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F161E

loc_7F14D1:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 28h
jmp	loc_7F172B

loc_7F14E6:		; jumptable 007F1459 case 9
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F14FF
or	eax, 0FFFFFFFFh
jmp	loc_7F172B

loc_7F14FF:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F151D
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_10], ecx
jmp	short loc_7F1537

loc_7F151D:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7F1537:
cmp	[ebp+var_10], 0Ah
jnz	short loc_7F1546
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F1546:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 7
jmp	loc_7F172B

loc_7F1558:		; jumptable 007F1459 case 10
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 7
jmp	loc_7F172B

loc_7F156D:		; jumptable 007F1459 case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7F1582
mov	eax, 0FFFFFFFEh
jmp	loc_7F172B

loc_7F1582:
xor	eax, eax
jz	short loc_7F1595
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F172B

loc_7F1595:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F161E

loc_7F15A0:		; jumptable 007F1459 case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7F15B5
mov	eax, 0FFFFFFFEh
jmp	loc_7F172B

loc_7F15B5:
xor	edx, edx
jz	short loc_7F15C8
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F172B

loc_7F15C8:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	short loc_7F161E

loc_7F15D3:		; jumptable 007F1459 case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7F15E8
mov	eax, 0FFFFFFFEh
jmp	loc_7F172B

loc_7F15E8:
xor	ecx, ecx
jz	short loc_7F15FB
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F172B

loc_7F15FB:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7F161E

loc_7F1606:		; jumptable 007F1459 cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F172B

loc_7F1615:		; default
mov	ecx, [ebp+arg_4] ; jumptable 007F1459 cases 2,3
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F161E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F171E
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F1648
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7F1662

loc_7F1648:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F1662:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
cmp	[ebp+var_18], 0Ah ; switch 11 cases
ja	loc_7F1710	; default
			; jumptable 007F167C cases 2,3
mov	edx, [ebp+var_18]
movzx	eax, ds:byte_7F1770[edx]
jmp	ds:off_7F175C[eax*4] ; switch jump

loc_7F1683:		; jumptable 007F167C case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jl	short loc_7F1692
xor	edx, edx
jz	short loc_7F16A4

loc_7F1692:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7F172B

loc_7F16A4:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F1719

loc_7F16AF:		; jumptable 007F167C case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jl	short loc_7F16BE
xor	ecx, ecx
jz	short loc_7F16CD

loc_7F16BE:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	short loc_7F172B

loc_7F16CD:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F1719

loc_7F16D8:		; jumptable 007F167C case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jl	short loc_7F16E7
xor	eax, eax
jz	short loc_7F16F6

loc_7F16E7:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7F172B

loc_7F16F6:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F1719

loc_7F1701:		; jumptable 007F167C cases 0,1,4,8-10
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7F172B

loc_7F1710:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F167C cases 2,3
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F1719:
jmp	loc_7F161E

loc_7F171E:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7F172B:
mov	esp, ebp
pop	ebp
retn
sub_7F13C0 endp

align 10h
off_7F1730 dd offset loc_7F1606	; jump table for switch	statement
dd offset loc_7F1606
dd offset loc_7F1615
dd offset loc_7F1615
dd offset loc_7F1460
dd offset loc_7F156D
dd offset loc_7F15A0
dd offset loc_7F15D3
dd offset loc_7F1606
dd offset loc_7F14E6
dd offset loc_7F1558
off_7F175C dd offset loc_7F1701	; jump table for switch	statement
dd offset loc_7F1683
dd offset loc_7F16AF
dd offset loc_7F16D8
dd offset loc_7F1710
byte_7F1770 db	    0,	   0,	  4,	 4 ; indirect table for	switch statement
db	0,     1,     2,     3
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7F1780 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F1798
mov	eax, 0FFFFFFFCh
jmp	loc_7F1BA3

loc_7F1798:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F17CE
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
and	eax, 1
jz	short loc_7F17CE
mov	ecx, [ebp+var_4]
and	ecx, 0FFFFFFFEh
mov	[ebp+var_4], ecx
jnz	short loc_7F17C5
or	eax, 0FFFFFFFFh
jmp	loc_7F1BA3

loc_7F17C5:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_4]
mov	[ebp+arg_8], edx

loc_7F17CE:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F17EC
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
jmp	short loc_7F1806

loc_7F17EC:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7F1806:
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0Ah ; switch 11 cases
ja	loc_7F1A15	; default
mov	edx, [ebp+var_C]
jmp	ds:off_7F1BA8[edx*4] ; switch jump

loc_7F1820:		; jumptable 007F1819 case 2
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F21E0
add	esp, 10h
jmp	loc_7F1BA3

loc_7F1840:		; jumptable 007F1819 case 3
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7F1C00
add	esp, 10h
jmp	loc_7F1BA3

loc_7F1860:		; jumptable 007F1819 case 9
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F187B
mov	eax, 0FFFFFFFDh
jmp	loc_7F1BA3

loc_7F187B:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F1899
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_10], eax
jmp	short loc_7F18B3

loc_7F1899:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7F18B3:
cmp	[ebp+var_10], 0Ah
jnz	short loc_7F18C2
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F18C2:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 7
jmp	loc_7F1BA3

loc_7F18D4:		; jumptable 007F1819 case 10
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 7
jmp	loc_7F1BA3

loc_7F18E9:		; jumptable 007F1819 case 4
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F1904
mov	eax, 0FFFFFFFBh
jmp	loc_7F1BA3

loc_7F1904:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F191A
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 5Dh
jz	short loc_7F191F

loc_7F191A:
jmp	loc_7F1A1E

loc_7F191F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F193A
mov	eax, 0FFFFFFFBh
jmp	loc_7F1BA3

loc_7F193A:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F1950
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 3Eh
jz	short loc_7F195E

loc_7F1950:
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F1A1E

loc_7F195E:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F1BA3

loc_7F196D:		; jumptable 007F1819 case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F1982
mov	eax, 0FFFFFFFEh
jmp	loc_7F1BA3

loc_7F1982:
xor	edx, edx
jz	short loc_7F1995
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F1BA3

loc_7F1995:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F1A1E

loc_7F19A0:		; jumptable 007F1819 case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F19B5
mov	eax, 0FFFFFFFEh
jmp	loc_7F1BA3

loc_7F19B5:
xor	ecx, ecx
jz	short loc_7F19C8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F1BA3

loc_7F19C8:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F1A1E

loc_7F19D3:		; jumptable 007F1819 case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F19E8
mov	eax, 0FFFFFFFEh
jmp	loc_7F1BA3

loc_7F19E8:
xor	eax, eax
jz	short loc_7F19FB
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F1BA3

loc_7F19FB:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F1A1E

loc_7F1A06:		; jumptable 007F1819 cases 0,1,8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F1BA3

loc_7F1A15:		; default
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F1A1E:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7F1B96
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F1A48
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_14], ecx
jmp	short loc_7F1A62

loc_7F1A48:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F1A62:
mov	eax, [ebp+var_14]
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0Ah ; switch 11 cases
ja	loc_7F1B88	; default
mov	ecx, [ebp+var_18]
movzx	edx, ds:byte_7F1BE8[ecx]
jmp	ds:off_7F1BD4[edx*4] ; switch jump

loc_7F1A83:		; jumptable 007F1A7C case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jl	short loc_7F1A92
xor	ecx, ecx
jz	short loc_7F1AA4

loc_7F1A92:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	loc_7F1BA3

loc_7F1AA4:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F1B91

loc_7F1AB2:		; jumptable 007F1A7C case 6
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jl	short loc_7F1AC1
xor	eax, eax
jz	short loc_7F1AD3

loc_7F1AC1:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7F1BA3

loc_7F1AD3:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F1B91

loc_7F1AE1:		; jumptable 007F1A7C case 7
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jl	short loc_7F1AF0
xor	edx, edx
jz	short loc_7F1B02

loc_7F1AF0:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 6
jmp	loc_7F1BA3

loc_7F1B02:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7F1B91

loc_7F1B10:		; jumptable 007F1A7C case 4
mov	eax, [ebp+arg_4]
add	eax, 2
cmp	eax, [ebp+arg_8]
jz	short loc_7F1B79 ; jumptable 007F1A7C cases 0-3,8-10
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+2]
test	edx, edx
jnz	short loc_7F1B32
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+3]
cmp	ecx, 5Dh
jz	short loc_7F1B3D

loc_7F1B32:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F1B91

loc_7F1B3D:
mov	eax, [ebp+arg_4]
add	eax, 4
cmp	eax, [ebp+arg_8]
jz	short loc_7F1B79 ; jumptable 007F1A7C cases 0-3,8-10
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+4]
test	edx, edx
jnz	short loc_7F1B5F
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+5]
cmp	ecx, 3Eh
jz	short loc_7F1B6A

loc_7F1B5F:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F1B91

loc_7F1B6A:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
xor	eax, eax
jmp	short loc_7F1BA3

loc_7F1B79:		; jumptable 007F1A7C cases 0-3,8-10
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	short loc_7F1BA3

loc_7F1B88:		; default
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F1B91:
jmp	loc_7F1A1E

loc_7F1B96:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6

loc_7F1BA3:
mov	esp, ebp
pop	ebp
retn
sub_7F1780 endp

align 4
off_7F1BA8 dd offset loc_7F1A06	; jump table for switch	statement
dd offset loc_7F1A06
dd offset loc_7F1820
dd offset loc_7F1840
dd offset loc_7F18E9
dd offset loc_7F196D
dd offset loc_7F19A0
dd offset loc_7F19D3
dd offset loc_7F1A06
dd offset loc_7F1860
dd offset loc_7F18D4
off_7F1BD4 dd offset loc_7F1B79	; jump table for switch	statement
dd offset loc_7F1B10
dd offset loc_7F1A83
dd offset loc_7F1AB2
dd offset loc_7F1AE1
byte_7F1BE8 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	1,     2,     3,     4
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7F1C00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F1C16
or	eax, 0FFFFFFFFh
jmp	loc_7F1F27

loc_7F1C16:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F1C34
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F1C4E

loc_7F1C34:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F1C4E:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7F1D94	; default
			; jumptable 007F1C71 cases 3-13,15,16,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7F1F48[ecx]
jmp	ds:off_7F1F2C[edx*4] ; switch jump

loc_7F1C78:		; jumptable 007F1C71 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F1CBB ; jumptable 007F1C71 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F1F27

loc_7F1CBB:		; jumptable 007F1C71 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F1DA3

loc_7F1CC9:		; jumptable 007F1C71 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F1CDE
mov	eax, 0FFFFFFFEh
jmp	loc_7F1F27

loc_7F1CDE:
mov	edx, 1
test	edx, edx
jz	short loc_7F1CF6
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F1F27

loc_7F1CF6:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F1DA3

loc_7F1D04:		; jumptable 007F1C71 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F1D19
mov	eax, 0FFFFFFFEh
jmp	loc_7F1F27

loc_7F1D19:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F1D31
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F1F27

loc_7F1D31:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F1DA3

loc_7F1D3C:		; jumptable 007F1C71 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F1D51
mov	eax, 0FFFFFFFEh
jmp	loc_7F1F27

loc_7F1D51:
mov	eax, 1
test	eax, eax
jz	short loc_7F1D69
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F1F27

loc_7F1D69:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F1DA3

loc_7F1D74:		; jumptable 007F1C71 case 14
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7F1FA0
add	esp, 10h
jmp	loc_7F1F27

loc_7F1D94:		; default
mov	edx, [ebp+arg_C] ; jumptable 007F1C71 cases 3-13,15,16,18,20-23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F1F27

loc_7F1DA3:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7F1F24
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F1DCD
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
jmp	short loc_7F1DE7

loc_7F1DCD:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F1DE7:
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 5
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7F1F13	; default
			; jumptable 007F1E0A cases 3-12,14-16,18,23
mov	edx, [ebp+var_10]
movzx	eax, ds:byte_7F1F80[edx]
jmp	ds:off_7F1F64[eax*4] ; switch jump

loc_7F1E11:		; jumptable 007F1E0A case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx+1]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7F1E54 ; jumptable 007F1E0A cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F1F27

loc_7F1E54:		; jumptable 007F1E0A cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F1F1F

loc_7F1E62:		; jumptable 007F1E0A case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F1E77
mov	eax, 0FFFFFFFEh
jmp	loc_7F1F27

loc_7F1E77:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F1E8F
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F1F27

loc_7F1E8F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F1F1F

loc_7F1E9D:		; jumptable 007F1E0A case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F1EAF
mov	eax, 0FFFFFFFEh
jmp	short loc_7F1F27

loc_7F1EAF:
mov	eax, 1
test	eax, eax
jz	short loc_7F1EC4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F1F27

loc_7F1EC4:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7F1F1F

loc_7F1ECF:		; jumptable 007F1E0A case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F1EE1
mov	eax, 0FFFFFFFEh
jmp	short loc_7F1F27

loc_7F1EE1:
mov	edx, 1
test	edx, edx
jz	short loc_7F1EF6
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F1F27

loc_7F1EF6:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7F1F1F

loc_7F1F01:		; jumptable 007F1E0A case 13
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 9
jmp	short loc_7F1F27

loc_7F1F13:		; default
mov	edx, [ebp+arg_C] ; jumptable 007F1E0A cases 3-12,14-16,18,23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F1F27

loc_7F1F1F:
jmp	loc_7F1DA3

loc_7F1F24:
or	eax, 0FFFFFFFFh

loc_7F1F27:
mov	esp, ebp
pop	ebp
retn
sub_7F1C00 endp

align 4
off_7F1F2C dd offset loc_7F1CC9	; jump table for switch	statement
dd offset loc_7F1D04
dd offset loc_7F1D3C
dd offset loc_7F1D74
dd offset loc_7F1CBB
dd offset loc_7F1C78
dd offset loc_7F1D94
byte_7F1F48 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     3,     6
db	6,     4,     6,     4
db	6,     6,     6,     6
db	5
align 4
off_7F1F64 dd offset loc_7F1E62	; jump table for switch	statement
dd offset loc_7F1E9D
dd offset loc_7F1ECF
dd offset loc_7F1F01
dd offset loc_7F1E54
dd offset loc_7F1E11
dd offset loc_7F1F13
byte_7F1F80 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     3,     6,     6
db	6,     4,     6,     4
db	4,     4,     4,     6
db	5
align 10h


; Attributes: bp-based frame

sub_7F1FA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F20C9
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F1FE8
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 78h
jnz	short loc_7F1FE8
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F20D0
add	esp, 10h
jmp	loc_7F20CC

loc_7F1FE8:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F2006
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7F2020

loc_7F2006:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F2020:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 19h
jz	short loc_7F202E
jmp	short loc_7F2030

loc_7F202E:
jmp	short loc_7F203F

loc_7F2030:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F20CC

loc_7F203F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7F2053

loc_7F204A:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F2053:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	short loc_7F20C9
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F2079
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
jmp	short loc_7F2093

loc_7F2079:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F2093:
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 12h
jz	short loc_7F20A9
cmp	[ebp+var_10], 19h
jz	short loc_7F20A7
jmp	short loc_7F20BB

loc_7F20A7:
jmp	short loc_7F20C7

loc_7F20A9:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 0Ah
jmp	short loc_7F20CC

loc_7F20BB:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F20CC

loc_7F20C7:
jmp	short loc_7F204A

loc_7F20C9:
or	eax, 0FFFFFFFFh

loc_7F20CC:
mov	esp, ebp
pop	ebp
retn
sub_7F1FA0 endp



; Attributes: bp-based frame

sub_7F20D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F21D2
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F2100
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F211A

loc_7F2100:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F211A:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 18h
jl	short loc_7F2130
cmp	[ebp+var_8], 19h
jle	short loc_7F212E
jmp	short loc_7F2130

loc_7F212E:
jmp	short loc_7F213F

loc_7F2130:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F21D5

loc_7F213F:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F2153

loc_7F214A:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F2153:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	short loc_7F21D2
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F2179
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
jmp	short loc_7F2193

loc_7F2179:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F2193:
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 12h
jz	short loc_7F21AF
cmp	[ebp+var_10], 17h
jle	short loc_7F21C1
cmp	[ebp+var_10], 19h
jle	short loc_7F21AD
jmp	short loc_7F21C1

loc_7F21AD:
jmp	short loc_7F21CD

loc_7F21AF:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 0Ah
jmp	short loc_7F21D5

loc_7F21C1:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F21D5

loc_7F21CD:
jmp	loc_7F214A

loc_7F21D2:
or	eax, 0FFFFFFFFh

loc_7F21D5:
mov	esp, ebp
pop	ebp
retn
sub_7F20D0 endp

align 10h


; Attributes: bp-based frame

sub_7F21E0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 2Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F21F6
or	eax, 0FFFFFFFFh
jmp	loc_7F29A0

loc_7F21F6:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F2214
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
jmp	short loc_7F222E

loc_7F2214:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7F222E:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
sub	eax, 5
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 18h ; switch 25 cases
ja	loc_7F244E	; default
			; jumptable 007F2251 cases 3-9,13-16,18,20-23
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7F29C8[ecx]
jmp	ds:off_7F29A4[edx*4] ; switch jump

loc_7F2258:		; jumptable 007F2251 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F229B ; jumptable 007F2251 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F229B:		; jumptable 007F2251 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F245D

loc_7F22A9:		; jumptable 007F2251 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F22BE
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F22BE:
mov	edx, 1
test	edx, edx
jz	short loc_7F22D6
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F29A0

loc_7F22D6:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F245D

loc_7F22E4:		; jumptable 007F2251 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F22F9
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F22F9:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F2311
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F29A0

loc_7F2311:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7F245D

loc_7F231F:		; jumptable 007F2251 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F2334
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F2334:
mov	eax, 1
test	eax, eax
jz	short loc_7F234C
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F234C:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7F245D

loc_7F235A:		; jumptable 007F2251 case 11
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F2373
or	eax, 0FFFFFFFFh
jmp	loc_7F29A0

loc_7F2373:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F2391
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_10], edx
jmp	short loc_7F23AB

loc_7F2391:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7F23AB:
mov	ecx, [ebp+var_10]
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 14h
jz	short loc_7F23DF
cmp	[ebp+var_14], 1Bh
jz	short loc_7F23BF
jmp	short loc_7F23FF

loc_7F23BF:
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F2AA0
add	esp, 10h
jmp	loc_7F29A0

loc_7F23DF:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F33A0
add	esp, 10h
jmp	loc_7F29A0

loc_7F23FF:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F240E:		; jumptable 007F2251 case 10
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F2CC0
add	esp, 10h
jmp	loc_7F29A0

loc_7F242E:		; jumptable 007F2251 case 12
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7F3420
add	esp, 10h
jmp	loc_7F29A0

loc_7F244E:		; default
mov	edx, [ebp+arg_C] ; jumptable 007F2251 cases 3-9,13-16,18,20-23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F29A0

loc_7F245D:
mov	[ebp+var_4], 0

loc_7F2464:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7F299D
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F248E
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_18], ecx
jmp	short loc_7F24A8

loc_7F248E:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_18], eax

loc_7F24A8:
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
mov	ecx, [ebp+var_1C]
sub	ecx, 5
mov	[ebp+var_1C], ecx
cmp	[ebp+var_1C], 18h ; switch 25 cases
ja	loc_7F298C	; default
			; jumptable 007F24CB cases 3,7-11,13-15,23
mov	edx, [ebp+var_1C]
movzx	eax, ds:byte_7F2A0C[edx]
jmp	ds:off_7F29E4[eax*4] ; switch jump

loc_7F24D2:		; jumptable 007F24CB case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx+1]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7F2515 ; jumptable 007F24CB cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F29A0

loc_7F2515:		; jumptable 007F24CB cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F2998

loc_7F2523:		; jumptable 007F24CB case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F2538
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F2538:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F2550
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F29A0

loc_7F2550:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F2998

loc_7F255E:		; jumptable 007F24CB case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F2573
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F2573:
mov	eax, 1
test	eax, eax
jz	short loc_7F258B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F258B:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F2998

loc_7F2599:		; jumptable 007F24CB case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F25AE
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F25AE:
mov	edx, 1
test	edx, edx
jz	short loc_7F25C6
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F29A0

loc_7F25C6:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7F2998

loc_7F25D4:		; jumptable 007F24CB case 18
cmp	[ebp+var_4], 0
jz	short loc_7F25E9
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F29A0

loc_7F25E9:
mov	[ebp+var_4], 1
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F2609
or	eax, 0FFFFFFFFh
jmp	loc_7F29A0

loc_7F2609:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F2627
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_20], eax
jmp	short loc_7F2641

loc_7F2627:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_20], eax

loc_7F2641:
mov	edx, [ebp+var_20]
mov	[ebp+var_24], edx
mov	eax, [ebp+var_24]
sub	eax, 5
mov	[ebp+var_24], eax
cmp	[ebp+var_24], 18h ; switch 25 cases
ja	loc_7F2764	; default
			; jumptable 007F2664 cases 3-16,18,20-23
mov	ecx, [ebp+var_24]
movzx	edx, ds:byte_7F2A40[ecx]
jmp	ds:off_7F2A28[edx*4] ; switch jump

loc_7F266B:		; jumptable 007F2664 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F26AE ; jumptable 007F2664 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F26AE:		; jumptable 007F2664 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F2773

loc_7F26BC:		; jumptable 007F2664 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F26D1
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F26D1:
mov	edx, 1
test	edx, edx
jz	short loc_7F26E9
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F29A0

loc_7F26E9:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F2773

loc_7F26F4:		; jumptable 007F2664 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F2709
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F2709:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F2721
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F29A0

loc_7F2721:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F2773

loc_7F272C:		; jumptable 007F2664 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F2741
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F2741:
mov	eax, 1
test	eax, eax
jz	short loc_7F2759
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F2759:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F2773

loc_7F2764:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F2664 cases 3-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F2773:
jmp	loc_7F2998

loc_7F2778:		; jumptable 007F24CB cases 4,5,16
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F2781:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7F292B
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F27AB
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_28], ecx
jmp	short loc_7F27C5

loc_7F27AB:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_28], eax

loc_7F27C5:
mov	eax, [ebp+var_28]
mov	[ebp+var_2C], eax
mov	ecx, [ebp+var_2C]
sub	ecx, 5
mov	[ebp+var_2C], ecx
cmp	[ebp+var_2C], 18h ; switch 25 cases
ja	loc_7F28FD	; default
			; jumptable 007F27E8 cases 3,7-11,13-15,18,20-23
mov	edx, [ebp+var_2C]
movzx	eax, ds:byte_7F2A80[edx]
jmp	ds:off_7F2A5C[eax*4] ; switch jump

loc_7F27EF:		; jumptable 007F27E8 case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
movzx	eax, ds:byte_1457A10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx+1]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7F2832 ; jumptable 007F27E8 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F29A0

loc_7F2832:		; jumptable 007F27E8 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F290C

loc_7F2840:		; jumptable 007F27E8 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F2855
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F2855:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F286D
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F29A0

loc_7F286D:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F290C

loc_7F287B:		; jumptable 007F27E8 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F2890
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F2890:
mov	eax, 1
test	eax, eax
jz	short loc_7F28A8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F28A8:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7F290C

loc_7F28B3:		; jumptable 007F27E8 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F28C8
mov	eax, 0FFFFFFFEh
jmp	loc_7F29A0

loc_7F28C8:
mov	edx, 1
test	edx, edx
jz	short loc_7F28E0
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F29A0

loc_7F28E0:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7F290C

loc_7F28EB:		; jumptable 007F27E8 case 6
jmp	short loc_7F2930

loc_7F28ED:		; jumptable 007F27E8 case 12
jmp	short loc_7F2942

loc_7F28EF:		; jumptable 007F27E8 cases 4,5,16
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F2781

loc_7F28FD:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F27E8 cases 3,7-11,13-15,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F29A0

loc_7F290C:
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F3880
add	esp, 10h
jmp	short loc_7F29A0
jmp	loc_7F2781

loc_7F292B:
or	eax, 0FFFFFFFFh
jmp	short loc_7F29A0

loc_7F2930:		; jumptable 007F24CB case 6
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 2
jmp	short loc_7F29A0

loc_7F2942:		; jumptable 007F24CB case 12
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F2958
or	eax, 0FFFFFFFFh
jmp	short loc_7F29A0

loc_7F2958:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F296E
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 3Eh
jz	short loc_7F297A

loc_7F296E:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F29A0

loc_7F297A:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 4
jmp	short loc_7F29A0

loc_7F298C:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F24CB cases 3,7-11,13-15,23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F29A0

loc_7F2998:
jmp	loc_7F2464

loc_7F299D:
or	eax, 0FFFFFFFFh

loc_7F29A0:
mov	esp, ebp
pop	ebp
retn
sub_7F21E0 endp

off_7F29A4 dd offset loc_7F22A9	; jump table for switch	statement
dd offset loc_7F22E4
dd offset loc_7F231F
dd offset loc_7F240E
dd offset loc_7F235A
dd offset loc_7F242E
dd offset loc_7F229B
dd offset loc_7F2258
dd offset loc_7F244E
byte_7F29C8 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     3,     4
db	5,     8,     8,     8
db	8,     6,     8,     6
db	8,     8,     8,     8
db	7
align 4
off_7F29E4 dd offset loc_7F2523	; jump table for switch	statement
dd offset loc_7F255E
dd offset loc_7F2599
dd offset loc_7F2778
dd offset loc_7F2930
dd offset loc_7F2942
dd offset loc_7F2515
dd offset loc_7F25D4
dd offset loc_7F24D2
dd offset loc_7F298C
byte_7F2A0C db	    0,	   1,	  2,	 9 ; indirect table for	switch statement
db	3,     3,     4,     9
db	9,     9,     9,     9
db	5,     9,     9,     9
db	3,     6,     7,     6
db	6,     6,     6,     9
db	8
align 4
off_7F2A28 dd offset loc_7F26BC	; jump table for switch	statement
dd offset loc_7F26F4
dd offset loc_7F272C
dd offset loc_7F26AE
dd offset loc_7F266B
dd offset loc_7F2764
byte_7F2A40 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7F2A5C dd offset loc_7F2840	; jump table for switch	statement
dd offset loc_7F287B
dd offset loc_7F28B3
dd offset loc_7F28EF
dd offset loc_7F28EB
dd offset loc_7F28ED
dd offset loc_7F2832
dd offset loc_7F27EF
dd offset loc_7F28FD
byte_7F2A80 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	5,     8,     8,     8
db	3,     6,     8,     6
db	8,     8,     8,     8
db	7
align 10h


; Attributes: bp-based frame

sub_7F2AA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F2C7C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F2AC8
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 2Dh
jz	short loc_7F2AD7

loc_7F2AC8:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F2C7F

loc_7F2AD7:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F2AE0:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F2C7C
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F2B0A
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7F2B24

loc_7F2B0A:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F2B24:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 1Bh ; switch 28 cases
ja	loc_7F2C6E	; default
			; jumptable 007F2B3E cases 2-4,9-26
mov	edx, [ebp+var_8]
movzx	eax, ds:byte_7F2C9C[edx]
jmp	ds:off_7F2C84[eax*4] ; switch jump

loc_7F2B45:		; jumptable 007F2B3E case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F2B5A
mov	eax, 0FFFFFFFEh
jmp	loc_7F2C7F

loc_7F2B5A:
xor	edx, edx
jz	short loc_7F2B6D
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F2C7F

loc_7F2B6D:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F2C77

loc_7F2B7B:		; jumptable 007F2B3E case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F2B90
mov	eax, 0FFFFFFFEh
jmp	loc_7F2C7F

loc_7F2B90:
xor	ecx, ecx
jz	short loc_7F2BA3
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F2C7F

loc_7F2BA3:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7F2C77

loc_7F2BB1:		; jumptable 007F2B3E case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F2BC6
mov	eax, 0FFFFFFFEh
jmp	loc_7F2C7F

loc_7F2BC6:
xor	eax, eax
jz	short loc_7F2BD9
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F2C7F

loc_7F2BD9:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7F2C77

loc_7F2BE7:		; jumptable 007F2B3E cases 0,1,8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F2C7F

loc_7F2BF6:		; jumptable 007F2B3E case 27
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F2C0C
or	eax, 0FFFFFFFFh
jmp	short loc_7F2C7F

loc_7F2C0C:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F2C6C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 2Dh
jnz	short loc_7F2C6C
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F2C38
or	eax, 0FFFFFFFFh
jmp	short loc_7F2C7F

loc_7F2C38:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F2C4E
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 3Eh
jz	short loc_7F2C5A

loc_7F2C4E:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F2C7F

loc_7F2C5A:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 0Dh
jmp	short loc_7F2C7F

loc_7F2C6C:
jmp	short loc_7F2C77

loc_7F2C6E:		; default
mov	ecx, [ebp+arg_4] ; jumptable 007F2B3E cases 2-4,9-26
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F2C77:
jmp	loc_7F2AE0

loc_7F2C7C:
or	eax, 0FFFFFFFFh

loc_7F2C7F:
mov	esp, ebp
pop	ebp
retn
sub_7F2AA0 endp

align 4
off_7F2C84 dd offset loc_7F2BE7	; jump table for switch	statement
dd offset loc_7F2B45
dd offset loc_7F2B7B
dd offset loc_7F2BB1
dd offset loc_7F2BF6
dd offset loc_7F2C6E
byte_7F2C9C db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     4
align 10h


; Attributes: bp-based frame

sub_7F2CC0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F2CDC
or	eax, 0FFFFFFFFh
jmp	loc_7F31CC

loc_7F2CDC:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F2CFA
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_C], ecx
jmp	short loc_7F2D14

loc_7F2CFA:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F2D14:
mov	eax, [ebp+var_C]
mov	[ebp+var_10], eax
mov	ecx, [ebp+var_10]
sub	ecx, 5
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7F2E37	; default
			; jumptable 007F2D37 cases 3-16,18,20-23
mov	edx, [ebp+var_10]
movzx	eax, ds:byte_7F31E8[edx]
jmp	ds:off_7F31D0[eax*4] ; switch jump

loc_7F2D3E:		; jumptable 007F2D37 case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
movzx	eax, ds:byte_1457A10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx+1]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7F2D81 ; jumptable 007F2D37 cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F31CC

loc_7F2D81:		; jumptable 007F2D37 cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F2E46

loc_7F2D8F:		; jumptable 007F2D37 case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F2DA4
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F2DA4:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F2DBC
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F31CC

loc_7F2DBC:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7F2E46

loc_7F2DC7:		; jumptable 007F2D37 case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F2DDC
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F2DDC:
mov	eax, 1
test	eax, eax
jz	short loc_7F2DF4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F31CC

loc_7F2DF4:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7F2E46

loc_7F2DFF:		; jumptable 007F2D37 case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F2E14
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F2E14:
mov	edx, 1
test	edx, edx
jz	short loc_7F2E2C
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F31CC

loc_7F2E2C:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7F2E46

loc_7F2E37:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F2D37 cases 3-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F31CC

loc_7F2E46:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F31C9
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F2E70
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7F2E8A

loc_7F2E70:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F2E8A:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 5
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 18h ; switch 25 cases
ja	loc_7F31B8	; default
			; jumptable 007F2EAD cases 3,6-9,11-15,18,23
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7F3224[eax]
jmp	ds:off_7F3204[ecx*4] ; switch jump

loc_7F2EB4:		; jumptable 007F2EAD case 24
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
movzx	ecx, ds:byte_1457B10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F2EF7 ; jumptable 007F2EAD cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F31CC

loc_7F2EF7:		; jumptable 007F2EAD cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F31C4

loc_7F2F05:		; jumptable 007F2EAD case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F2F1A
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F2F1A:
mov	edx, 1
test	edx, edx
jz	short loc_7F2F32
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F31CC

loc_7F2F32:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F31C4

loc_7F2F40:		; jumptable 007F2EAD case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F2F55
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F2F55:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F2F6D
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F31CC

loc_7F2F6D:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7F31C4

loc_7F2F7B:		; jumptable 007F2EAD case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F2F90
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F2F90:
mov	eax, 1
test	eax, eax
jz	short loc_7F2FA8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F31CC

loc_7F2FA8:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7F31C4

loc_7F2FB6:		; jumptable 007F2EAD cases 4,5,16
lea	ecx, [ebp+var_4]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7F3270
add	esp, 10h
test	eax, eax
jnz	short loc_7F2FE1
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F31CC

loc_7F2FE1:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F2FEA:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F314F
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F3014
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_1C], edx
jmp	short loc_7F302E

loc_7F3014:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_1C], eax

loc_7F302E:
mov	ecx, [ebp+var_1C]
mov	[ebp+var_20], ecx
cmp	[ebp+var_20], 0Fh ; switch 16 cases
ja	loc_7F3141	; default
			; jumptable 007F3048 cases 2-4,9-14
mov	edx, [ebp+var_20]
movzx	eax, ds:byte_7F3258[edx]
jmp	ds:off_7F3240[eax*4] ; switch jump

loc_7F304F:		; jumptable 007F3048 case 5
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F3064
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F3064:
xor	edx, edx
jz	short loc_7F3077
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F31CC

loc_7F3077:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F314A

loc_7F3085:		; jumptable 007F3048 case 6
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F309A
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F309A:
xor	ecx, ecx
jz	short loc_7F30AD
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F31CC

loc_7F30AD:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7F314A

loc_7F30BB:		; jumptable 007F3048 case 7
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F30D0
mov	eax, 0FFFFFFFEh
jmp	loc_7F31CC

loc_7F30D0:
xor	eax, eax
jz	short loc_7F30E3
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F31CC

loc_7F30E3:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F314A

loc_7F30EE:		; jumptable 007F3048 cases 0,1,8
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F31CC

loc_7F30FD:		; jumptable 007F3048 case 15
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F3116
or	eax, 0FFFFFFFFh
jmp	loc_7F31CC

loc_7F3116:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F313F
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 3Eh
jnz	short loc_7F313F
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, [ebp+var_4]
jmp	loc_7F31CC

loc_7F313F:
jmp	short loc_7F314A

loc_7F3141:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F3048 cases 2-4,9-14
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F314A:
jmp	loc_7F2FEA

loc_7F314F:
or	eax, 0FFFFFFFFh
jmp	short loc_7F31CC

loc_7F3154:		; jumptable 007F2EAD case 10
lea	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F3270
add	esp, 10h
test	eax, eax
jnz	short loc_7F317C
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F31CC

loc_7F317C:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F3192
or	eax, 0FFFFFFFFh
jmp	short loc_7F31CC

loc_7F3192:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F31B8 ; default
			; jumptable 007F2EAD cases 3,6-9,11-15,18,23
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 3Eh
jnz	short loc_7F31B8 ; default
			; jumptable 007F2EAD cases 3,6-9,11-15,18,23
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, [ebp+var_4]
jmp	short loc_7F31CC

loc_7F31B8:		; default
mov	edx, [ebp+arg_C] ; jumptable 007F2EAD cases 3,6-9,11-15,18,23
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F31CC

loc_7F31C4:
jmp	loc_7F2E46

loc_7F31C9:
or	eax, 0FFFFFFFFh

loc_7F31CC:
mov	esp, ebp
pop	ebp
retn
sub_7F2CC0 endp

off_7F31D0 dd offset loc_7F2D8F	; jump table for switch	statement
dd offset loc_7F2DC7
dd offset loc_7F2DFF
dd offset loc_7F2D81
dd offset loc_7F2D3E
dd offset loc_7F2E37
byte_7F31E8 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7F3204 dd offset loc_7F2F05	; jump table for switch	statement
dd offset loc_7F2F40
dd offset loc_7F2F7B
dd offset loc_7F2FB6
dd offset loc_7F3154
dd offset loc_7F2EF7
dd offset loc_7F2EB4
dd offset loc_7F31B8
byte_7F3224 db	    0,	   1,	  2,	 7 ; indirect table for	switch statement
db	3,     3,     7,     7
db	7,     7,     4,     7
db	7,     7,     7,     7
db	3,     5,     7,     5
db	5,     5,     5,     7
db	6
align 10h
off_7F3240 dd offset loc_7F30EE	; jump table for switch	statement
dd offset loc_7F304F
dd offset loc_7F3085
dd offset loc_7F30BB
dd offset loc_7F30FD
dd offset loc_7F3141
byte_7F3258 db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	5,     5,     5,     4
align 10h


; Attributes: bp-based frame

sub_7F3270 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 1Ch
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_C]
mov	dword ptr [eax], 0Bh
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 6
jz	short loc_7F329B
mov	eax, 1
jmp	loc_7F3391

loc_7F329B:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F32B1
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_8], edx
jmp	short loc_7F32B8

loc_7F32B1:
mov	[ebp+var_8], 0FFFFFFFFh

loc_7F32B8:
mov	eax, [ebp+var_8]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 58h
jz	short loc_7F32CE
cmp	[ebp+var_C], 78h
jz	short loc_7F32CC
jmp	short loc_7F32D7

loc_7F32CC:
jmp	short loc_7F32E1

loc_7F32CE:
mov	[ebp+var_4], 1
jmp	short loc_7F32E1

loc_7F32D7:
mov	eax, 1
jmp	loc_7F3391

loc_7F32E1:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F3300
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_10], edx
jmp	short loc_7F3307

loc_7F3300:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7F3307:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 4Dh
jz	short loc_7F331D
cmp	[ebp+var_14], 6Dh
jz	short loc_7F331B
jmp	short loc_7F3326

loc_7F331B:
jmp	short loc_7F332D

loc_7F331D:
mov	[ebp+var_4], 1
jmp	short loc_7F332D

loc_7F3326:
mov	eax, 1
jmp	short loc_7F3391

loc_7F332D:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F334C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_18], edx
jmp	short loc_7F3353

loc_7F334C:
mov	[ebp+var_18], 0FFFFFFFFh

loc_7F3353:
mov	eax, [ebp+var_18]
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 4Ch
jz	short loc_7F3369
cmp	[ebp+var_1C], 6Ch
jz	short loc_7F3367
jmp	short loc_7F3372

loc_7F3367:
jmp	short loc_7F3379

loc_7F3369:
mov	[ebp+var_4], 1
jmp	short loc_7F3379

loc_7F3372:
mov	eax, 1
jmp	short loc_7F3391

loc_7F3379:
cmp	[ebp+var_4], 0
jz	short loc_7F3383
xor	eax, eax
jmp	short loc_7F3391

loc_7F3383:
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx], 0Ch
mov	eax, 1

loc_7F3391:
mov	esp, ebp
pop	ebp
retn
sub_7F3270 endp

align 10h


; Attributes: bp-based frame

sub_7F33A0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 0Ch
jge	short loc_7F33B4
or	eax, 0FFFFFFFFh
jmp	short loc_7F340F

loc_7F33B4:
mov	[ebp+var_4], 0
jmp	short loc_7F33CF

loc_7F33BD:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F33CF:
cmp	[ebp+var_4], 6
jge	short loc_7F3402
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F33F4
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
mov	ecx, [ebp+var_4]
movsx	edx, ds:byte_1458D60[ecx]
cmp	eax, edx
jz	short loc_7F3400

loc_7F33F4:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F340F

loc_7F3400:
jmp	short loc_7F33BD

loc_7F3402:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 8

loc_7F340F:
mov	esp, ebp
pop	ebp
retn
sub_7F33A0 endp

align 10h


; Attributes: bp-based frame

sub_7F3420 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F3436
or	eax, 0FFFFFFFFh
jmp	loc_7F37E9

loc_7F3436:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F3454
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F346E

loc_7F3454:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F346E:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7F3591	; default
			; jumptable 007F3491 cases 3-16,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7F3808[ecx]
jmp	ds:off_7F37F0[edx*4] ; switch jump

loc_7F3498:		; jumptable 007F3491 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F34DB ; jumptable 007F3491 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F37E9

loc_7F34DB:		; jumptable 007F3491 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F35A0

loc_7F34E9:		; jumptable 007F3491 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F34FE
mov	eax, 0FFFFFFFEh
jmp	loc_7F37E9

loc_7F34FE:
mov	edx, 1
test	edx, edx
jz	short loc_7F3516
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F37E9

loc_7F3516:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F35A0

loc_7F3521:		; jumptable 007F3491 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F3536
mov	eax, 0FFFFFFFEh
jmp	loc_7F37E9

loc_7F3536:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F354E
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F37E9

loc_7F354E:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F35A0

loc_7F3559:		; jumptable 007F3491 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F356E
mov	eax, 0FFFFFFFEh
jmp	loc_7F37E9

loc_7F356E:
mov	eax, 1
test	eax, eax
jz	short loc_7F3586
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F37E9

loc_7F3586:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F35A0

loc_7F3591:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F3491 cases 3-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F37E9

loc_7F35A0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F37E6
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F35CA
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
jmp	short loc_7F35E4

loc_7F35CA:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F35E4:
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 5
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7F37D5	; default
			; jumptable 007F3607 cases 3,7-15,23
mov	ecx, [ebp+var_10]
movzx	edx, ds:byte_7F3848[ecx]
jmp	ds:off_7F3824[edx*4] ; switch jump

loc_7F360E:		; jumptable 007F3607 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F3651 ; jumptable 007F3607 cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F37E9

loc_7F3651:		; jumptable 007F3607 cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F37E1

loc_7F365F:		; jumptable 007F3607 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F3674
mov	eax, 0FFFFFFFEh
jmp	loc_7F37E9

loc_7F3674:
mov	edx, 1
test	edx, edx
jz	short loc_7F368C
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F37E9

loc_7F368C:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F37E1

loc_7F369A:		; jumptable 007F3607 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F36AF
mov	eax, 0FFFFFFFEh
jmp	loc_7F37E9

loc_7F36AF:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F36C7
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F37E9

loc_7F36C7:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7F37E1

loc_7F36D5:		; jumptable 007F3607 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F36EA
mov	eax, 0FFFFFFFEh
jmp	loc_7F37E9

loc_7F36EA:
mov	eax, 1
test	eax, eax
jz	short loc_7F3702
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F37E9

loc_7F3702:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7F37E1

loc_7F3710:		; jumptable 007F3607 cases 4,5,16
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7F3724

loc_7F371B:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F3724:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F37B3
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F374E
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_14], eax
jmp	short loc_7F3768

loc_7F374E:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F3768:
mov	edx, [ebp+var_14]
mov	[ebp+var_18], edx
mov	eax, [ebp+var_18]
sub	eax, 9
mov	[ebp+var_18], eax
cmp	[ebp+var_18], 0Ch ; switch 13 cases
ja	short loc_7F37A2 ; default
			; jumptable 007F3787 cases 3-11
mov	ecx, [ebp+var_18]
movzx	edx, ds:byte_7F3870[ecx]
jmp	ds:off_7F3864[edx*4] ; switch jump

loc_7F378E:		; jumptable 007F3787 cases 0,1,12
jmp	short loc_7F37AE

loc_7F3790:		; jumptable 007F3787 case 2
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 5
jmp	short loc_7F37E9

loc_7F37A2:		; default
mov	edx, [ebp+arg_C] ; jumptable 007F3787 cases 3-11
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F37E9

loc_7F37AE:
jmp	loc_7F371B

loc_7F37B3:
or	eax, 0FFFFFFFFh
jmp	short loc_7F37E9

loc_7F37B8:		; jumptable 007F3607 case 18
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7F37E1

loc_7F37C3:		; jumptable 007F3607 case 6
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 5
jmp	short loc_7F37E9

loc_7F37D5:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F3607 cases 3,7-15,23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F37E9

loc_7F37E1:
jmp	loc_7F35A0

loc_7F37E6:
or	eax, 0FFFFFFFFh

loc_7F37E9:
mov	esp, ebp
pop	ebp
retn
sub_7F3420 endp

align 10h
off_7F37F0 dd offset loc_7F34E9	; jump table for switch	statement
dd offset loc_7F3521
dd offset loc_7F3559
dd offset loc_7F34DB
dd offset loc_7F3498
dd offset loc_7F3591
byte_7F3808 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7F3824 dd offset loc_7F365F	; jump table for switch	statement
dd offset loc_7F369A
dd offset loc_7F36D5
dd offset loc_7F3710
dd offset loc_7F37C3
dd offset loc_7F3651
dd offset loc_7F37B8
dd offset loc_7F360E
dd offset loc_7F37D5
byte_7F3848 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	3,     5,     6,     5
db	5,     5,     5,     8
db	7
align 4
off_7F3864 dd offset loc_7F378E	; jump table for switch	statement
dd offset loc_7F3790
dd offset loc_7F37A2
byte_7F3870 db	    0,	   0,	  1,	 2 ; indirect table for	switch statement
db	2,     2,     2,     2
db	2,     2,     2,     2
db	0
align 10h


; Attributes: bp-based frame

sub_7F3880 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 4Ch
mov	[ebp+var_4], 0

loc_7F388D:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F40E4
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F38B7
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_18], eax
jmp	short loc_7F38D1

loc_7F38B7:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_18], eax

loc_7F38D1:
mov	edx, [ebp+var_18]
mov	[ebp+var_1C], edx
mov	eax, [ebp+var_1C]
sub	eax, 5
mov	[ebp+var_1C], eax
cmp	[ebp+var_1C], 18h ; switch 25 cases
ja	loc_7F40D3	; default
			; jumptable 007F38F4 cases 3,6-8,10-15,23
mov	ecx, [ebp+var_1C]
movzx	edx, ds:byte_7F4110[ecx]
jmp	ds:off_7F40EC[edx*4] ; switch jump

loc_7F38FB:		; jumptable 007F38F4 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F393E ; jumptable 007F38F4 cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F393E:		; jumptable 007F38F4 cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F40DF

loc_7F394C:		; jumptable 007F38F4 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F3961
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3961:
mov	edx, 1
test	edx, edx
jz	short loc_7F3979
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3979:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F40DF

loc_7F3987:		; jumptable 007F38F4 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F399C
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F399C:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F39B4
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F40E7

loc_7F39B4:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7F40DF

loc_7F39C2:		; jumptable 007F38F4 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F39D7
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F39D7:
mov	eax, 1
test	eax, eax
jz	short loc_7F39EF
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F39EF:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	loc_7F40DF

loc_7F39FD:		; jumptable 007F38F4 case 18
cmp	[ebp+var_4], 0
jz	short loc_7F3A12
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3A12:
mov	[ebp+var_4], 1
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F3A32
or	eax, 0FFFFFFFFh
jmp	loc_7F40E7

loc_7F3A32:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F3A50
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_20], ecx
jmp	short loc_7F3A6A

loc_7F3A50:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_20], eax

loc_7F3A6A:
mov	eax, [ebp+var_20]
mov	[ebp+var_24], eax
mov	ecx, [ebp+var_24]
sub	ecx, 5
mov	[ebp+var_24], ecx
cmp	[ebp+var_24], 18h ; switch 25 cases
ja	loc_7F3B8D	; default
			; jumptable 007F3A8D cases 3-16,18,20-23
mov	edx, [ebp+var_24]
movzx	eax, ds:byte_7F4144[edx]
jmp	ds:off_7F412C[eax*4] ; switch jump

loc_7F3A94:		; jumptable 007F3A8D case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
movzx	eax, ds:byte_1457A10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx+1]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7F3AD7 ; jumptable 007F3A8D cases 17,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3AD7:		; jumptable 007F3A8D cases 17,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F3B9C

loc_7F3AE5:		; jumptable 007F3A8D case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F3AFA
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3AFA:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F3B12
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F40E7

loc_7F3B12:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7F3B9C

loc_7F3B1D:		; jumptable 007F3A8D case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F3B32
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3B32:
mov	eax, 1
test	eax, eax
jz	short loc_7F3B4A
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3B4A:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7F3B9C

loc_7F3B55:		; jumptable 007F3A8D case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F3B6A
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3B6A:
mov	edx, 1
test	edx, edx
jz	short loc_7F3B82
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3B82:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7F3B9C

loc_7F3B8D:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F3A8D cases 3-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3B9C:
jmp	loc_7F40DF

loc_7F3BA1:		; jumptable 007F38F4 cases 4,5,16
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F3BBA
or	eax, 0FFFFFFFFh
jmp	loc_7F40E7

loc_7F3BBA:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F3BD8
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_28], eax
jmp	short loc_7F3BF2

loc_7F3BD8:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_28], eax

loc_7F3BF2:
mov	edx, [ebp+var_28]
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 0Eh
jnz	short loc_7F3C00
jmp	short loc_7F3C30 ; jumptable 007F38F4 case 9

loc_7F3C00:
mov	eax, [ebp+var_8]
mov	[ebp+var_2C], eax
cmp	[ebp+var_2C], 9
jl	short loc_7F3C1C
cmp	[ebp+var_2C], 0Ah
jle	short loc_7F3C1A
cmp	[ebp+var_2C], 15h
jz	short loc_7F3C1A
jmp	short loc_7F3C1C

loc_7F3C1A:
jmp	short loc_7F3C2B

loc_7F3C1C:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3C2B:		; jumptable 007F38F4 cases 4,5,16
jmp	loc_7F3BA1

loc_7F3C30:		; jumptable 007F38F4 case 9
mov	[ebp+var_4], 0

loc_7F3C37:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F3C50
or	eax, 0FFFFFFFFh
jmp	loc_7F40E7

loc_7F3C50:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F3C6E
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_30], ecx
jmp	short loc_7F3C88

loc_7F3C6E:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_30], eax

loc_7F3C88:
mov	eax, [ebp+var_30]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0Ch
jz	short loc_7F3C9A
cmp	[ebp+var_C], 0Dh
jnz	short loc_7F3C9C

loc_7F3C9A:
jmp	short loc_7F3CCC

loc_7F3C9C:
mov	ecx, [ebp+var_C]
mov	[ebp+var_34], ecx
cmp	[ebp+var_34], 9
jl	short loc_7F3CB8
cmp	[ebp+var_34], 0Ah
jle	short loc_7F3CB6
cmp	[ebp+var_34], 15h
jz	short loc_7F3CB6
jmp	short loc_7F3CB8

loc_7F3CB6:
jmp	short loc_7F3CC7

loc_7F3CB8:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F40E7

loc_7F3CC7:
jmp	loc_7F3C37

loc_7F3CCC:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F3CD5:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F3CE5
or	eax, 0FFFFFFFFh
jmp	loc_7F40E7

loc_7F3CE5:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F3D03
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_38], edx
jmp	short loc_7F3D1D

loc_7F3D03:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_38], eax

loc_7F3D1D:
mov	ecx, [ebp+var_38]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
cmp	edx, [ebp+var_C]
jnz	short loc_7F3D30
jmp	loc_7F3E51

loc_7F3D30:
mov	eax, [ebp+var_10]
mov	[ebp+var_3C], eax
cmp	[ebp+var_3C], 8	; switch 9 cases
ja	loc_7F3E43	; default
			; jumptable 007F3D43 case 4
mov	ecx, [ebp+var_3C]
jmp	ds:off_7F4160[ecx*4] ; switch jump

loc_7F3D4A:		; jumptable 007F3D43 case 5
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 2
jge	short loc_7F3D5F
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3D5F:
xor	eax, eax
jz	short loc_7F3D72
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3D72:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F3E4C

loc_7F3D80:		; jumptable 007F3D43 case 6
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 3
jge	short loc_7F3D95
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3D95:
xor	edx, edx
jz	short loc_7F3DA8
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3DA8:
mov	edx, [ebp+arg_4]
add	edx, 3
mov	[ebp+arg_4], edx
jmp	loc_7F3E4C

loc_7F3DB6:		; jumptable 007F3D43 case 7
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7F3DCB
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3DCB:
xor	ecx, ecx
jz	short loc_7F3DDE
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F40E7

loc_7F3DDE:
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	short loc_7F3E4C

loc_7F3DE9:		; jumptable 007F3D43 cases 0,1,8
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F40E7

loc_7F3DF8:		; jumptable 007F3D43 case 3
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7F1C00
add	esp, 10h
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 0
jg	short loc_7F3E32
cmp	[ebp+var_14], 0
jnz	short loc_7F3E2A
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax

loc_7F3E2A:
mov	eax, [ebp+var_14]
jmp	loc_7F40E7

loc_7F3E32:
jmp	short loc_7F3E4C

loc_7F3E34:		; jumptable 007F3D43 case 2
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3E43:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F3D43 case 4
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F3E4C:
jmp	loc_7F3CD5

loc_7F3E51:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F3E6A
or	eax, 0FFFFFFFFh
jmp	loc_7F40E7

loc_7F3E6A:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F3E88
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_40], edx
jmp	short loc_7F3EA2

loc_7F3E88:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_40], eax

loc_7F3EA2:
mov	ecx, [ebp+var_40]
mov	[ebp+var_44], ecx
mov	edx, [ebp+var_44]
sub	edx, 9
mov	[ebp+var_44], edx
cmp	[ebp+var_44], 0Ch ; switch 13 cases
ja	short loc_7F3ED4 ; default
			; jumptable 007F3EC1 cases 3-7,9-11
mov	eax, [ebp+var_44]
movzx	ecx, ds:byte_7F4194[eax]
jmp	ds:off_7F4184[ecx*4] ; switch jump

loc_7F3EC8:		; jumptable 007F3EC1 cases 0,1,12
jmp	short loc_7F3EE3

loc_7F3ECA:		; jumptable 007F3EC1 case 8
jmp	loc_7F4074

loc_7F3ECF:		; jumptable 007F3EC1 case 2
jmp	loc_7F4062

loc_7F3ED4:		; default
mov	edx, [ebp+arg_C] ; jumptable 007F3EC1 cases 3-7,9-11
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F40E7

loc_7F3EE3:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F3EFC
or	eax, 0FFFFFFFFh
jmp	loc_7F40E7

loc_7F3EFC:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F3F1A
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_48], edx
jmp	short loc_7F3F34

loc_7F3F1A:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_48], eax

loc_7F3F34:
mov	ecx, [ebp+var_48]
mov	[ebp+var_4C], ecx
mov	edx, [ebp+var_4C]
sub	edx, 5
mov	[ebp+var_4C], edx
cmp	[ebp+var_4C], 18h ; switch 25 cases
ja	loc_7F40BE	; default
			; jumptable 007F3F57 cases 3,7-11,13-15,18,20-23
mov	eax, [ebp+var_4C]
movzx	ecx, ds:byte_7F41C8[eax]
jmp	ds:off_7F41A4[ecx*4] ; switch jump

loc_7F3F5E:		; jumptable 007F3F57 case 24
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
movzx	ecx, ds:byte_1457A10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F3FA1 ; jumptable 007F3F57 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3FA1:		; jumptable 007F3F57 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F40CA

loc_7F3FAF:		; jumptable 007F3F57 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F3FC4
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3FC4:
mov	edx, 1
test	edx, edx
jz	short loc_7F3FDC
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F40E7

loc_7F3FDC:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F40CA

loc_7F3FEA:		; jumptable 007F3F57 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F3FFF
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F3FFF:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F4017
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F40E7

loc_7F4017:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	loc_7F40CA

loc_7F4025:		; jumptable 007F3F57 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F403A
mov	eax, 0FFFFFFFEh
jmp	loc_7F40E7

loc_7F403A:
mov	eax, 1
test	eax, eax
jz	short loc_7F4052
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F40E7

loc_7F4052:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F40CA

loc_7F405D:		; jumptable 007F3F57 cases 4,5,16
jmp	loc_7F3EE3

loc_7F4062:		; jumptable 007F3F57 case 6
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1
jmp	short loc_7F40E7

loc_7F4074:		; jumptable 007F3F57 case 12
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F408A
or	eax, 0FFFFFFFFh
jmp	short loc_7F40E7

loc_7F408A:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F40A0
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 3Eh
jz	short loc_7F40AC

loc_7F40A0:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F40E7

loc_7F40AC:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 3
jmp	short loc_7F40E7

loc_7F40BE:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F3F57 cases 3,7-11,13-15,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F40E7

loc_7F40CA:
jmp	short loc_7F40D1
jmp	loc_7F3EE3

loc_7F40D1:
jmp	short loc_7F40DF

loc_7F40D3:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F38F4 cases 3,6-8,10-15,23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F40E7

loc_7F40DF:
jmp	loc_7F388D

loc_7F40E4:
or	eax, 0FFFFFFFFh

loc_7F40E7:
mov	esp, ebp
pop	ebp
retn
sub_7F3880 endp

align 4
off_7F40EC dd offset loc_7F394C	; jump table for switch	statement
dd offset loc_7F3987
dd offset loc_7F39C2
dd offset loc_7F3BA1
dd offset loc_7F3C30
dd offset loc_7F393E
dd offset loc_7F39FD
dd offset loc_7F38FB
dd offset loc_7F40D3
byte_7F4110 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     8,     8
db	8,     4,     8,     8
db	8,     8,     8,     8
db	3,     5,     6,     5
db	5,     5,     5,     8
db	7
align 4
off_7F412C dd offset loc_7F3AE5	; jump table for switch	statement
dd offset loc_7F3B1D
dd offset loc_7F3B55
dd offset loc_7F3AD7
dd offset loc_7F3A94
dd offset loc_7F3B8D
byte_7F4144 db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 10h
off_7F4160 dd offset loc_7F3DE9	; jump table for switch	statement
dd offset loc_7F3DE9
dd offset loc_7F3E34
dd offset loc_7F3DF8
dd offset loc_7F3E43
dd offset loc_7F3D4A
dd offset loc_7F3D80
dd offset loc_7F3DB6
dd offset loc_7F3DE9
off_7F4184 dd offset loc_7F3EC8	; jump table for switch	statement
dd offset loc_7F3ECF
dd offset loc_7F3ECA
dd offset loc_7F3ED4
byte_7F4194 db	    0,	   0,	  1,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	2,     3,     3,     3
db	0
align 4
off_7F41A4 dd offset loc_7F3FAF	; jump table for switch	statement
dd offset loc_7F3FEA
dd offset loc_7F4025
dd offset loc_7F405D
dd offset loc_7F4062
dd offset loc_7F4074
dd offset loc_7F3FA1
dd offset loc_7F3F5E
dd offset loc_7F40BE
byte_7F41C8 db	    0,	   1,	  2,	 8 ; indirect table for	switch statement
db	3,     3,     4,     8
db	8,     8,     8,     8
db	5,     8,     8,     8
db	3,     6,     8,     6
db	8,     8,     8,     8
db	7
align 10h


; Attributes: bp-based frame

sub_7F41F0 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 3Ch
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F4208
mov	eax, 0FFFFFFFCh
jmp	loc_7F4BEE

loc_7F4208:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F423E
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
and	eax, 1
jz	short loc_7F423E
mov	ecx, [ebp+var_8]
and	ecx, 0FFFFFFFEh
mov	[ebp+var_8], ecx
jnz	short loc_7F4235
or	eax, 0FFFFFFFFh
jmp	loc_7F4BEE

loc_7F4235:
mov	edx, [ebp+arg_4]
add	edx, [ebp+var_8]
mov	[ebp+arg_8], edx

loc_7F423E:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F425C
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F4276

loc_7F425C:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F4276:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 2
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 22h ; switch 35 cases
ja	loc_7F4835	; default
			; jumptable 007F4299 cases 1,6,12-16,26,31,32
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7F4C48[eax]
jmp	ds:off_7F4BF4[ecx*4] ; switch jump

loc_7F42A0:		; jumptable 007F4299 case 10
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
push	0Ch
call	sub_7F56B0
add	esp, 14h
jmp	loc_7F4BEE

loc_7F42C2:		; jumptable 007F4299 case 11
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
push	0Dh
call	sub_7F56B0
add	esp, 14h
jmp	loc_7F4BEE

loc_7F42E4:		; jumptable 007F4299 case 0
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F42FD
or	eax, 0FFFFFFFFh
jmp	loc_7F4BEE

loc_7F42FD:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F431B
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7F4335

loc_7F431B:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F4335:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 5
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 18h ; switch 25 cases
ja	short loc_7F43B0 ; default
			; jumptable 007F4354 cases 3-9,12-16,18,20-23
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7F4C7C[eax]
jmp	ds:off_7F4C6C[ecx*4] ; switch jump

loc_7F435B:		; jumptable 007F4354 case 11
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F4D50
add	esp, 10h
jmp	loc_7F4BEE

loc_7F437B:		; jumptable 007F4354 case 10
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F2CC0
add	esp, 10h
jmp	loc_7F4BEE

loc_7F439B:		; jumptable 007F4354 cases 0-2,17,19,24
mov	ecx, [ebp+arg_4]
sub	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1Dh
jmp	loc_7F4BEE

loc_7F43B0:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F4354 cases 3-9,12-16,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F43BF:		; jumptable 007F4299 case 7
mov	edx, [ebp+arg_4]
add	edx, 2
cmp	edx, [ebp+arg_8]
jnz	short loc_7F43DC ; jumptable 007F4299 cases 8,19
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
mov	eax, 0FFFFFFF1h
jmp	loc_7F4BEE

loc_7F43DC:		; jumptable 007F4299 cases 8,19
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F43EF
jmp	short loc_7F4467

loc_7F43EF:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F440D
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_1C], eax
jmp	short loc_7F4427

loc_7F440D:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_1C], eax

loc_7F4427:
mov	edx, [ebp+var_1C]
mov	[ebp+var_20], edx
cmp	[ebp+var_20], 9
jz	short loc_7F4443
cmp	[ebp+var_20], 0Ah
jz	short loc_7F4441
cmp	[ebp+var_20], 15h
jz	short loc_7F4441
jmp	short loc_7F4450

loc_7F4441:
jmp	short loc_7F4462

loc_7F4443:
mov	eax, [ebp+arg_4]
add	eax, 2
cmp	eax, [ebp+arg_8]
jz	short loc_7F4450
jmp	short loc_7F4462

loc_7F4450:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 0Fh
jmp	loc_7F4BEE

loc_7F4462:		; jumptable 007F4299 cases 8,19
jmp	loc_7F43DC

loc_7F4467:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 0Fh
jmp	loc_7F4BEE

loc_7F4479:		; jumptable 007F4299 case 28
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F4FA0
add	esp, 10h
jmp	loc_7F4BEE

loc_7F4499:		; jumptable 007F4299 case 33
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 26h
jmp	loc_7F4BEE

loc_7F44AE:		; jumptable 007F4299 case 18
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 19h
jmp	loc_7F4BEE

loc_7F44C3:		; jumptable 007F4299 case 2
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F44DE
mov	eax, 0FFFFFFE6h
jmp	loc_7F4BEE

loc_7F44DE:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F4533
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 5Dh
jnz	short loc_7F4533
mov	ecx, [ebp+arg_4]
add	ecx, 2
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F4507
or	eax, 0FFFFFFFFh
jmp	loc_7F4BEE

loc_7F4507:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+2]
test	eax, eax
jnz	short loc_7F4533
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+3]
cmp	edx, 3Eh
jnz	short loc_7F4533
mov	eax, [ebp+arg_4]
add	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 22h
jmp	loc_7F4BEE

loc_7F4533:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 1Ah
jmp	loc_7F4BEE

loc_7F4545:		; jumptable 007F4299 case 29
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 17h
jmp	loc_7F4BEE

loc_7F455A:		; jumptable 007F4299 case 30
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F4575
mov	eax, 0FFFFFFE8h
jmp	loc_7F4BEE

loc_7F4575:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F4593
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_24], ecx
jmp	short loc_7F45AD

loc_7F4593:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_24], eax

loc_7F45AD:
mov	eax, [ebp+var_24]
mov	[ebp+var_28], eax
mov	ecx, [ebp+var_28]
sub	ecx, 9
mov	[ebp+var_28], ecx
cmp	[ebp+var_28], 1Bh ; switch 28 cases
ja	short loc_7F4624 ; default
			; jumptable 007F45CC cases 3-5,7-11,13-22
mov	edx, [ebp+var_28]
movzx	eax, ds:byte_7F4CAC[edx]
jmp	ds:off_7F4C98[eax*4] ; switch jump

loc_7F45D3:		; jumptable 007F45CC case 24
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 24h
jmp	loc_7F4BEE

loc_7F45E8:		; jumptable 007F45CC case 6
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 23h
jmp	loc_7F4BEE

loc_7F45FD:		; jumptable 007F45CC case 25
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 25h
jmp	loc_7F4BEE

loc_7F4612:		; jumptable 007F45CC cases 0-2,12,23,26,27
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 18h
jmp	loc_7F4BEE

loc_7F4624:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F45CC cases 3-5,7-11,13-22
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4633:		; jumptable 007F4299 case 34
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 15h
jmp	loc_7F4BEE

loc_7F4648:		; jumptable 007F4299 case 9
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 11h
jmp	loc_7F4BEE

loc_7F465D:		; jumptable 007F4299 case 17
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F5330
add	esp, 10h
jmp	loc_7F4BEE

loc_7F467D:		; jumptable 007F4299 case 3
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F4692
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F4692:
xor	edx, edx
jz	short loc_7F46AB
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	[ebp+var_4], 12h
jmp	loc_7F4844

loc_7F46AB:
xor	ecx, ecx
jz	short loc_7F46C4
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	[ebp+var_4], 13h
jmp	loc_7F4844

loc_7F46C4:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F46D3:		; jumptable 007F4299 case 4
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F46E8
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F46E8:
xor	eax, eax
jz	short loc_7F4701
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 12h
jmp	loc_7F4844

loc_7F4701:
xor	edx, edx
jz	short loc_7F471A
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
mov	[ebp+var_4], 13h
jmp	loc_7F4844

loc_7F471A:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4729:		; jumptable 007F4299 case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 4
jge	short loc_7F473E
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F473E:
xor	ecx, ecx
jz	short loc_7F4757
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
mov	[ebp+var_4], 12h
jmp	loc_7F4844

loc_7F4757:
xor	eax, eax
jz	short loc_7F4770
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 13h
jmp	loc_7F4844

loc_7F4770:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F4BEE

loc_7F477F:		; jumptable 007F4299 cases 20,22
mov	[ebp+var_4], 12h
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F4844

loc_7F4794:		; jumptable 007F4299 cases 21,23-25
mov	[ebp+var_4], 13h
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F4844

loc_7F47A9:		; jumptable 007F4299 case 27
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jz	short loc_7F47EF
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 12h
jmp	short loc_7F4844

loc_7F47EF:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
movzx	ecx, ds:byte_1457B10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jz	short loc_7F4835 ; default
			; jumptable 007F4299 cases 1,6,12-16,26,31,32
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	[ebp+var_4], 13h
jmp	short loc_7F4844

loc_7F4835:		; default
mov	edx, [ebp+arg_C] ; jumptable 007F4299 cases 1,6,12-16,26,31,32
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4844:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jz	loc_7F4BE9
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F486E
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_2C], ecx
jmp	short loc_7F4888

loc_7F486E:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_2C], eax

loc_7F4888:
mov	eax, [ebp+var_2C]
mov	[ebp+var_30], eax
mov	ecx, [ebp+var_30]
sub	ecx, 5
mov	[ebp+var_30], ecx
cmp	[ebp+var_30], 1Fh ; switch 32 cases
ja	loc_7F4BD8	; default
			; jumptable 007F48AB cases 3,7-9,11-14,23,26
mov	edx, [ebp+var_30]
movzx	eax, ds:byte_7F4CF4[edx]
jmp	ds:off_7F4CC8[eax*4] ; switch jump

loc_7F48B2:		; jumptable 007F48AB case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx+1]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7F48F5 ; jumptable 007F48AB cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F48F5:		; jumptable 007F48AB cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F4BE4

loc_7F4903:		; jumptable 007F48AB case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F4918
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F4918:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F4930
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4930:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F4BE4

loc_7F493E:		; jumptable 007F48AB case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F4953
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F4953:
mov	eax, 1
test	eax, eax
jz	short loc_7F496B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F496B:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F4BE4

loc_7F4979:		; jumptable 007F48AB case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F498E
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F498E:
mov	edx, 1
test	edx, edx
jz	short loc_7F49A6
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F49A6:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7F4BE4

loc_7F49B4:		; jumptable 007F48AB cases 4-6,15,16,25,27,30,31
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, [ebp+var_4]
jmp	loc_7F4BEE

loc_7F49C4:		; jumptable 007F48AB case 18
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_34], eax
cmp	[ebp+var_34], 12h
jz	short loc_7F49E8
cmp	[ebp+var_34], 29h
jz	loc_7F4B63
jmp	loc_7F4B6A

loc_7F49E8:
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F49F8
or	eax, 0FFFFFFFFh
jmp	loc_7F4BEE

loc_7F49F8:
mov	[ebp+var_4], 29h
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F4A1D
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_38], ecx
jmp	short loc_7F4A37

loc_7F4A1D:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_38], eax

loc_7F4A37:
mov	eax, [ebp+var_38]
mov	[ebp+var_3C], eax
mov	ecx, [ebp+var_3C]
sub	ecx, 5
mov	[ebp+var_3C], ecx
cmp	[ebp+var_3C], 18h ; switch 25 cases
ja	loc_7F4B5A	; default
			; jumptable 007F4A5A cases 3-16,18,23
mov	edx, [ebp+var_3C]
movzx	eax, ds:byte_7F4D2C[edx]
jmp	ds:off_7F4D14[eax*4] ; switch jump

loc_7F4A61:		; jumptable 007F4A5A case 24
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
sar	edx, 5
lea	eax, [edx+eax*8]
mov	ecx, [ebp+arg_4]
movzx	ecx, byte ptr [ecx+1]
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
and	edx, ds:dword_1457510[eax*4]
jnz	short loc_7F4AA4 ; jumptable 007F4A5A cases 17,19-22
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4AA4:		; jumptable 007F4A5A cases 17,19-22
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F4B61

loc_7F4AB2:		; jumptable 007F4A5A case 0
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F4AC7
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F4AC7:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F4ADF
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4ADF:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	short loc_7F4B61

loc_7F4AEA:		; jumptable 007F4A5A case 1
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F4AFF
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F4AFF:
mov	eax, 1
test	eax, eax
jz	short loc_7F4B17
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4B17:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	short loc_7F4B61

loc_7F4B22:		; jumptable 007F4A5A case 2
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F4B37
mov	eax, 0FFFFFFFEh
jmp	loc_7F4BEE

loc_7F4B37:
mov	edx, 1
test	edx, edx
jz	short loc_7F4B4F
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4BEE

loc_7F4B4F:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7F4B61

loc_7F4B5A:		; default
mov	[ebp+var_4], 13h ; jumptable 007F4A5A cases 3-16,18,23

loc_7F4B61:
jmp	short loc_7F4B6A

loc_7F4B63:
mov	[ebp+var_4], 13h

loc_7F4B6A:
jmp	short loc_7F4BE4

loc_7F4B6C:		; jumptable 007F48AB case 29
cmp	[ebp+var_4], 13h
jnz	short loc_7F4B7E
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F4BEE

loc_7F4B7E:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 20h
jmp	short loc_7F4BEE

loc_7F4B90:		; jumptable 007F48AB case 28
cmp	[ebp+var_4], 13h
jnz	short loc_7F4BA2
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F4BEE

loc_7F4BA2:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 1Fh
jmp	short loc_7F4BEE

loc_7F4BB4:		; jumptable 007F48AB case 10
cmp	[ebp+var_4], 13h
jnz	short loc_7F4BC6
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F4BEE

loc_7F4BC6:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1Eh
jmp	short loc_7F4BEE

loc_7F4BD8:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F48AB cases 3,7-9,11-14,23,26
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F4BEE

loc_7F4BE4:
jmp	loc_7F4844

loc_7F4BE9:
mov	eax, [ebp+var_4]
neg	eax

loc_7F4BEE:
mov	esp, ebp
pop	ebp
retn
sub_7F41F0 endp

align 4
off_7F4BF4 dd offset loc_7F42E4	; jump table for switch	statement
dd offset loc_7F44C3
dd offset loc_7F467D
dd offset loc_7F46D3
dd offset loc_7F4729
dd offset loc_7F43BF
dd offset loc_7F43DC
dd offset loc_7F4648
dd offset loc_7F42A0
dd offset loc_7F42C2
dd offset loc_7F465D
dd offset loc_7F44AE
dd offset loc_7F477F
dd offset loc_7F4794
dd offset loc_7F47A9
dd offset loc_7F4479
dd offset loc_7F4545
dd offset loc_7F455A
dd offset loc_7F4499
dd offset loc_7F4633
dd offset loc_7F4835
byte_7F4C48 db	    0,	 14h,	  1,	 2 ; indirect table for	switch statement
db	3,     4,   14h,     5
db	6,     7,     8,     9
db    14h,   14h,   14h,   14h
db    14h,   0Ah,   0Bh,     6
db    0Ch,   0Dh,   0Ch,   0Dh
db    0Dh,   0Dh,   14h,   0Eh
db    0Fh,   10h,   11h,   14h
db    14h,   12h,   13h
align 4
off_7F4C6C dd offset loc_7F439B	; jump table for switch	statement
dd offset loc_7F437B
dd offset loc_7F435B
dd offset loc_7F43B0
byte_7F4C7C db	    0,	   0,	  0,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     1,     2
db	3,     3,     3,     3
db	3,     0,     3,     0
db	3,     3,     3,     3
db	0
align 4
off_7F4C98 dd offset loc_7F4612	; jump table for switch	statement
dd offset loc_7F45E8
dd offset loc_7F45D3
dd offset loc_7F45FD
dd offset loc_7F4624
byte_7F4CAC db	    0,	   0,	  0,	 4 ; indirect table for	switch statement
db	4,     4,     1,     4
db	4,     4,     4,     4
db	0,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     0
db	2,     3,     0,     0
off_7F4CC8 dd offset loc_7F4903	; jump table for switch	statement
dd offset loc_7F493E
dd offset loc_7F4979
dd offset loc_7F49B4
dd offset loc_7F4BB4
dd offset loc_7F48F5
dd offset loc_7F49C4
dd offset loc_7F48B2
dd offset loc_7F4B90
dd offset loc_7F4B6C
dd offset loc_7F4BD8
byte_7F4CF4 db	    0,	   1,	  2,   0Ah ; indirect table for	switch statement
db	3,     3,     3,   0Ah
db    0Ah,   0Ah,     4,   0Ah
db    0Ah,   0Ah,   0Ah,     3
db	3,     5,     6,     5
db	5,     5,     5,   0Ah
db	7,     3,   0Ah,     3
db	8,     9,     3,     3
off_7F4D14 dd offset loc_7F4AB2	; jump table for switch	statement
dd offset loc_7F4AEA
dd offset loc_7F4B22
dd offset loc_7F4AA4
dd offset loc_7F4A61
dd offset loc_7F4B5A
byte_7F4D2C db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	3,     3,     3,     5
db	4
align 10h


; Attributes: bp-based frame

sub_7F4D50 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F4D66
or	eax, 0FFFFFFFFh
jmp	loc_7F4F27

loc_7F4D66:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F4D84
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F4D9E

loc_7F4D84:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F4D9E:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 14h
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 7	; switch 8 cases
ja	short loc_7F4DFD ; default
			; jumptable 007F4DB6 cases 1,3,5,6
mov	ecx, [ebp+var_8]
jmp	ds:off_7F4F2C[ecx*4] ; switch jump

loc_7F4DBD:		; jumptable 007F4DB6 case 7
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
add	ecx, 2
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F2AA0
add	esp, 10h
jmp	loc_7F4F27

loc_7F4DDD:		; jumptable 007F4DB6 case 0
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 21h
jmp	loc_7F4F27

loc_7F4DF2:		; jumptable 007F4DB6 cases 2,4
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F4E0C

loc_7F4DFD:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F4DB6 cases 1,3,5,6
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F4F27

loc_7F4E0C:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F4F24
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F4E36
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F4E50

loc_7F4E36:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F4E50:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 9
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 15h ; switch 22 cases
ja	loc_7F4F13	; default
			; jumptable 007F4E73 cases 2-11,14,16-20
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7F4F5C[eax]
jmp	ds:off_7F4F4C[ecx*4] ; switch jump

loc_7F4E7A:		; jumptable 007F4E73 case 21
mov	edx, [ebp+arg_4]
add	edx, 2
cmp	edx, [ebp+arg_8]
jnz	short loc_7F4E8D
or	eax, 0FFFFFFFFh
jmp	loc_7F4F27

loc_7F4E8D:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+2]
test	ecx, ecx
jnz	short loc_7F4EAC
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+3]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7F4EC7

loc_7F4EAC:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+3]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+2]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F4EC7:
mov	ecx, [ebp+var_14]
mov	[ebp+var_18], ecx
mov	edx, [ebp+var_18]
sub	edx, 9
mov	[ebp+var_18], edx
cmp	[ebp+var_18], 15h ; switch 22 cases
ja	short loc_7F4EF9 ; jumptable 007F4E73 cases 0,1,12
			; jumptable 007F4EE6 cases 2-11,13-20
mov	eax, [ebp+var_18]
movzx	ecx, ds:byte_7F4F7C[eax]
jmp	ds:off_7F4F74[ecx*4] ; switch jump

loc_7F4EED:		; jumptable 007F4EE6 cases 0,1,12,21
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F4F27

loc_7F4EF9:		; jumptable 007F4E73 cases 0,1,12
mov	ecx, [ebp+arg_C] ; jumptable 007F4EE6 cases 2-11,13-20
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 10h
jmp	short loc_7F4F27

loc_7F4F08:		; jumptable 007F4E73 cases 13,15
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F4F1F

loc_7F4F13:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F4E73 cases 2-11,14,16-20
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F4F27

loc_7F4F1F:
jmp	loc_7F4E0C

loc_7F4F24:
or	eax, 0FFFFFFFFh

loc_7F4F27:
mov	esp, ebp
pop	ebp
retn
sub_7F4D50 endp

align 4
off_7F4F2C dd offset loc_7F4DDD	; jump table for switch	statement
dd offset loc_7F4DFD
dd offset loc_7F4DF2
dd offset loc_7F4DFD
dd offset loc_7F4DF2
dd offset loc_7F4DFD
dd offset loc_7F4DFD
dd offset loc_7F4DBD
off_7F4F4C dd offset loc_7F4EF9	; jump table for switch	statement
dd offset loc_7F4F08
dd offset loc_7F4E7A
dd offset loc_7F4F13
byte_7F4F5C db	    0,	   0,	  3,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     3,     3
db	0,     1,     3,     1
db	3,     3,     3,     3
db	3,     2
align 4
off_7F4F74 dd offset loc_7F4EED	; jump table for switch	statement
dd offset loc_7F4EF9
byte_7F4F7C db	    0,	   0,	  1,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     0
align 10h


; Attributes: bp-based frame

sub_7F4FA0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F4FB8
mov	eax, 0FFFFFFEAh
jmp	loc_7F52BB

loc_7F4FB8:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F4FD6
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F4FF0

loc_7F4FD6:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F4FF0:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 19h ; switch 26 cases
ja	loc_7F5128	; default
			; jumptable 007F5013 cases 3,6-15,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7F52DC[ecx]
jmp	ds:off_7F52C0[edx*4] ; switch jump

loc_7F501A:		; jumptable 007F5013 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F505D ; jumptable 007F5013 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F52BB

loc_7F505D:		; jumptable 007F5013 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F5137

loc_7F506B:		; jumptable 007F5013 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F5080
mov	eax, 0FFFFFFFEh
jmp	loc_7F52BB

loc_7F5080:
mov	edx, 1
test	edx, edx
jz	short loc_7F5098
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F52BB

loc_7F5098:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F5137

loc_7F50A6:		; jumptable 007F5013 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F50BB
mov	eax, 0FFFFFFFEh
jmp	loc_7F52BB

loc_7F50BB:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F50D3
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F52BB

loc_7F50D3:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F5137

loc_7F50DE:		; jumptable 007F5013 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F50F3
mov	eax, 0FFFFFFFEh
jmp	loc_7F52BB

loc_7F50F3:
mov	eax, 1
test	eax, eax
jz	short loc_7F510B
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F52BB

loc_7F510B:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F5137

loc_7F5116:		; jumptable 007F5013 cases 4,5,16,25
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 16h
jmp	loc_7F52BB

loc_7F5128:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F5013 cases 3,6-15,18,20-23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F52BB

loc_7F5137:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F52B8
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F5161
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F517B

loc_7F5161:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F517B:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 5
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	loc_7F52A7	; default
			; jumptable 007F519E cases 3-12,14-16,18,23
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7F5314[eax]
jmp	ds:off_7F52F8[ecx*4] ; switch jump

loc_7F51A5:		; jumptable 007F519E case 24
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
movzx	ecx, ds:byte_1457B10[eax]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
sar	eax, 5
lea	edx, [eax+ecx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F51E8 ; jumptable 007F519E cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F52BB

loc_7F51E8:		; jumptable 007F519E cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F52B3

loc_7F51F6:		; jumptable 007F519E case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F520B
mov	eax, 0FFFFFFFEh
jmp	loc_7F52BB

loc_7F520B:
mov	edx, 1
test	edx, edx
jz	short loc_7F5223
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F52BB

loc_7F5223:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F52B3

loc_7F5231:		; jumptable 007F519E case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F5243
mov	eax, 0FFFFFFFEh
jmp	short loc_7F52BB

loc_7F5243:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F5258
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F52BB

loc_7F5258:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F52B3

loc_7F5263:		; jumptable 007F519E case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F5275
mov	eax, 0FFFFFFFEh
jmp	short loc_7F52BB

loc_7F5275:
mov	eax, 1
test	eax, eax
jz	short loc_7F528A
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F52BB

loc_7F528A:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F52B3

loc_7F5295:		; jumptable 007F519E case 13
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, 1Ch
jmp	short loc_7F52BB

loc_7F52A7:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F519E cases 3-12,14-16,18,23
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F52BB

loc_7F52B3:
jmp	loc_7F5137

loc_7F52B8:
or	eax, 0FFFFFFFFh

loc_7F52BB:
mov	esp, ebp
pop	ebp
retn
sub_7F4FA0 endp

align 10h
off_7F52C0 dd offset loc_7F506B	; jump table for switch	statement
dd offset loc_7F50A6
dd offset loc_7F50DE
dd offset loc_7F5116
dd offset loc_7F505D
dd offset loc_7F501A
dd offset loc_7F5128
byte_7F52DC db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	3,     3,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	3,     4,     6,     4
db	6,     6,     6,     6
db	5,     3
align 4
off_7F52F8 dd offset loc_7F51F6	; jump table for switch	statement
dd offset loc_7F5231
dd offset loc_7F5263
dd offset loc_7F5295
dd offset loc_7F51E8
dd offset loc_7F51A5
dd offset loc_7F52A7
byte_7F5314 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     3,     6,     6
db	6,     4,     6,     4
db	4,     4,     4,     6
db	5
align 10h


; Attributes: bp-based frame

sub_7F5330 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F5346
or	eax, 0FFFFFFFFh
jmp	loc_7F5630

loc_7F5346:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F5364
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F537E

loc_7F5364:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F537E:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7F54A1	; default
			; jumptable 007F53A1 cases 3-16,18,20-23
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7F564C[ecx]
jmp	ds:off_7F5634[edx*4] ; switch jump

loc_7F53A8:		; jumptable 007F53A1 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F53EB ; jumptable 007F53A1 cases 17,19
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F5630

loc_7F53EB:		; jumptable 007F53A1 cases 17,19
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F54B0

loc_7F53F9:		; jumptable 007F53A1 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F540E
mov	eax, 0FFFFFFFEh
jmp	loc_7F5630

loc_7F540E:
mov	edx, 1
test	edx, edx
jz	short loc_7F5426
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F5630

loc_7F5426:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F54B0

loc_7F5431:		; jumptable 007F53A1 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F5446
mov	eax, 0FFFFFFFEh
jmp	loc_7F5630

loc_7F5446:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F545E
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F5630

loc_7F545E:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F54B0

loc_7F5469:		; jumptable 007F53A1 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F547E
mov	eax, 0FFFFFFFEh
jmp	loc_7F5630

loc_7F547E:
mov	eax, 1
test	eax, eax
jz	short loc_7F5496
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F5630

loc_7F5496:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F54B0

loc_7F54A1:		; default
mov	ecx, [ebp+arg_C] ; jumptable 007F53A1 cases 3-16,18,20-23
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F5630

loc_7F54B0:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F562B
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F54DA
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_C], eax
jmp	short loc_7F54F4

loc_7F54DA:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F54F4:
mov	edx, [ebp+var_C]
mov	[ebp+var_10], edx
mov	eax, [ebp+var_10]
sub	eax, 5
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 1Fh ; switch 32 cases
ja	loc_7F561A	; default
			; jumptable 007F5517 cases 3,7-15,18,23,26,28-30
mov	ecx, [ebp+var_10]
movzx	edx, ds:byte_7F5684[ecx]
jmp	ds:off_7F5668[edx*4] ; switch jump

loc_7F551E:		; jumptable 007F5517 case 24
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
sar	ecx, 5
lea	edx, [ecx+edx*8]
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jnz	short loc_7F5561 ; jumptable 007F5517 cases 17,19-22
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F5630

loc_7F5561:		; jumptable 007F5517 cases 17,19-22
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F5626

loc_7F556F:		; jumptable 007F5517 case 0
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 2
jge	short loc_7F5584
mov	eax, 0FFFFFFFEh
jmp	loc_7F5630

loc_7F5584:
mov	edx, 1
test	edx, edx
jz	short loc_7F559C
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F5630

loc_7F559C:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F5626

loc_7F55A7:		; jumptable 007F5517 case 1
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 3
jge	short loc_7F55B9
mov	eax, 0FFFFFFFEh
jmp	short loc_7F5630

loc_7F55B9:
mov	ecx, 1
test	ecx, ecx
jz	short loc_7F55CE
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F5630

loc_7F55CE:
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F5626

loc_7F55D9:		; jumptable 007F5517 case 2
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 4
jge	short loc_7F55EB
mov	eax, 0FFFFFFFEh
jmp	short loc_7F5630

loc_7F55EB:
mov	eax, 1
test	eax, eax
jz	short loc_7F5600
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F5630

loc_7F5600:
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
jmp	short loc_7F5626

loc_7F560B:		; jumptable 007F5517 cases 4-6,16,25,27,31
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 14h
jmp	short loc_7F5630

loc_7F561A:		; default
mov	eax, [ebp+arg_C] ; jumptable 007F5517 cases 3,7-15,18,23,26,28-30
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	short loc_7F5630

loc_7F5626:
jmp	loc_7F54B0

loc_7F562B:
mov	eax, 0FFFFFFECh

loc_7F5630:
mov	esp, ebp
pop	ebp
retn
sub_7F5330 endp

off_7F5634 dd offset loc_7F53F9	; jump table for switch	statement
dd offset loc_7F5431
dd offset loc_7F5469
dd offset loc_7F53EB
dd offset loc_7F53A8
dd offset loc_7F54A1
byte_7F564C db	    0,	   1,	  2,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     3,     5,     3
db	5,     5,     5,     5
db	4
align 4
off_7F5668 dd offset loc_7F556F	; jump table for switch	statement
dd offset loc_7F55A7
dd offset loc_7F55D9
dd offset loc_7F560B
dd offset loc_7F5561
dd offset loc_7F551E
dd offset loc_7F561A
byte_7F5684 db	    0,	   1,	  2,	 6 ; indirect table for	switch statement
db	3,     3,     3,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	3,     4,     6,     4
db	4,     4,     4,     6
db	5,     3,     6,     3
db	6,     6,     6,     3
align 10h


; Attributes: bp-based frame

sub_7F56B0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h

loc_7F56B6:
mov	eax, [ebp+arg_8]
cmp	eax, [ebp+arg_C]
jz	loc_7F5879
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F56E0
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
jmp	short loc_7F56FA

loc_7F56E0:
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7F56FA:
mov	edx, [ebp+var_8]
mov	[ebp+var_4], edx
mov	eax, [ebp+var_4]
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 0Dh ; switch 14 cases
ja	loc_7F586B	; default
			; jumptable 007F571A cases 2-4,9-11
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7F5898[ecx]
jmp	ds:off_7F5880[edx*4] ; switch jump

loc_7F5721:		; jumptable 007F571A case 5
mov	eax, [ebp+arg_C]
sub	eax, [ebp+arg_8]
cmp	eax, 2
jge	short loc_7F5736
mov	eax, 0FFFFFFFEh
jmp	loc_7F587C

loc_7F5736:
xor	ecx, ecx
jz	short loc_7F5749
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F587C

loc_7F5749:
mov	ecx, [ebp+arg_8]
add	ecx, 2
mov	[ebp+arg_8], ecx
jmp	loc_7F5874

loc_7F5757:		; jumptable 007F571A case 6
mov	edx, [ebp+arg_C]
sub	edx, [ebp+arg_8]
cmp	edx, 3
jge	short loc_7F576C
mov	eax, 0FFFFFFFEh
jmp	loc_7F587C

loc_7F576C:
xor	eax, eax
jz	short loc_7F577F
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+arg_8]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F587C

loc_7F577F:
mov	eax, [ebp+arg_8]
add	eax, 3
mov	[ebp+arg_8], eax
jmp	loc_7F5874

loc_7F578D:		; jumptable 007F571A case 7
mov	ecx, [ebp+arg_C]
sub	ecx, [ebp+arg_8]
cmp	ecx, 4
jge	short loc_7F57A2
mov	eax, 0FFFFFFFEh
jmp	loc_7F587C

loc_7F57A2:
xor	edx, edx
jz	short loc_7F57B5
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F587C

loc_7F57B5:
mov	edx, [ebp+arg_8]
add	edx, 4
mov	[ebp+arg_8], edx
jmp	loc_7F5874

loc_7F57C3:		; jumptable 007F571A cases 0,1,8
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_8]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F587C

loc_7F57D2:		; jumptable 007F571A cases 12,13
mov	edx, [ebp+arg_8]
add	edx, 2
mov	[ebp+arg_8], edx
mov	eax, [ebp+var_4]
cmp	eax, [ebp+arg_0]
jz	short loc_7F57E8
jmp	loc_7F5874

loc_7F57E8:
mov	ecx, [ebp+arg_8]
cmp	ecx, [ebp+arg_C]
jnz	short loc_7F57FA
mov	eax, 0FFFFFFE5h
jmp	loc_7F587C

loc_7F57FA:
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
mov	[edx], eax
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F5820
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_10], eax
jmp	short loc_7F583A

loc_7F5820:
mov	ecx, [ebp+arg_8]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7F583A:
mov	edx, [ebp+var_10]
mov	[ebp+var_14], edx
mov	eax, [ebp+var_14]
sub	eax, 9
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 15h ; switch 22 cases
ja	short loc_7F5867 ; default
			; jumptable 007F5859 cases 3-10,13-20
mov	ecx, [ebp+var_14]
movzx	edx, ds:byte_7F58B0[ecx]
jmp	ds:off_7F58A8[edx*4] ; switch jump

loc_7F5860:		; jumptable 007F5859 cases 0-2,11,12,21
mov	eax, 1Bh
jmp	short loc_7F587C

loc_7F5867:		; default
xor	eax, eax	; jumptable 007F5859 cases 3-10,13-20
jmp	short loc_7F587C

loc_7F586B:		; default
mov	eax, [ebp+arg_8] ; jumptable 007F571A cases 2-4,9-11
add	eax, 2
mov	[ebp+arg_8], eax

loc_7F5874:
jmp	loc_7F56B6

loc_7F5879:
or	eax, 0FFFFFFFFh

loc_7F587C:
mov	esp, ebp
pop	ebp
retn
sub_7F56B0 endp

off_7F5880 dd offset loc_7F57C3	; jump table for switch	statement
dd offset loc_7F5721
dd offset loc_7F5757
dd offset loc_7F578D
dd offset loc_7F57D2
dd offset loc_7F586B
byte_7F5898 db	    0,	   0,	  5,	 5 ; indirect table for	switch statement
db	5,     1,     2,     3
db	0,     5,     5,     5
db	4,     4
align 4
off_7F58A8 dd offset loc_7F5860	; jump table for switch	statement
dd offset loc_7F5867
byte_7F58B0 db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     0
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     0
align 10h


; Attributes: bp-based frame

sub_7F58D0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F58E8
mov	eax, 0FFFFFFFCh
jmp	loc_7F5ACA

loc_7F58E8:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx

loc_7F58EE:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F5ABD
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F5918
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_8], edx
jmp	short loc_7F5932

loc_7F5918:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7F5932:
mov	ecx, [ebp+var_8]
mov	[ebp+var_C], ecx
mov	edx, [ebp+var_C]
sub	edx, 2
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 13h ; switch 20 cases
ja	loc_7F5AAF	; default
			; jumptable 007F5955 cases 2,6,9-18
mov	eax, [ebp+var_C]
movzx	ecx, ds:byte_7F5AF4[eax]
jmp	ds:off_7F5AD0[ecx*4] ; switch jump

loc_7F595C:		; jumptable 007F5955 case 3
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F5AB8

loc_7F596A:		; jumptable 007F5955 case 4
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F5AB8

loc_7F5978:		; jumptable 007F5955 case 5
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7F5AB8

loc_7F5986:		; jumptable 007F5955 case 1
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7F59AE
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F1C00
add	esp, 10h
jmp	loc_7F5ACA

loc_7F59AE:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7F5ACA

loc_7F59C0:		; jumptable 007F5955 case 0
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F5ACA

loc_7F59CF:		; jumptable 007F5955 case 8
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7F59EC
mov	eax, [ebp+arg_4]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
mov	eax, 7
jmp	loc_7F5ACA

loc_7F59EC:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	loc_7F5ACA

loc_7F59FE:		; jumptable 007F5955 case 7
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7F5A77
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F5A21
mov	eax, 0FFFFFFFDh
jmp	loc_7F5ACA

loc_7F5A21:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F5A3F
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_10], eax
jmp	short loc_7F5A59

loc_7F5A3F:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7F5A59:
cmp	[ebp+var_10], 0Ah
jnz	short loc_7F5A68
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F5A68:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
mov	eax, 7
jmp	short loc_7F5ACA

loc_7F5A77:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	short loc_7F5ACA

loc_7F5A86:		; jumptable 007F5955 case 19
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7F5AA0
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 27h
jmp	short loc_7F5ACA

loc_7F5AA0:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7F5ACA

loc_7F5AAF:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F5955 cases 2,6,9-18
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F5AB8:
jmp	loc_7F58EE

loc_7F5ABD:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7F5ACA:
mov	esp, ebp
pop	ebp
retn
sub_7F58D0 endp

align 10h
off_7F5AD0 dd offset loc_7F59C0	; jump table for switch	statement
dd offset loc_7F5986
dd offset loc_7F595C
dd offset loc_7F596A
dd offset loc_7F5978
dd offset loc_7F59FE
dd offset loc_7F59CF
dd offset loc_7F5A86
dd offset loc_7F5AAF
byte_7F5AF4 db	    0,	   1,	  8,	 2 ; indirect table for	switch statement
db	3,     4,     8,     5
db	6,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     7
align 10h


; Attributes: bp-based frame

sub_7F5B10 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F5B28
mov	eax, 0FFFFFFFCh
jmp	loc_7F5D1C

loc_7F5B28:
mov	ecx, [ebp+arg_4]
mov	[ebp+var_4], ecx

loc_7F5B2E:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F5D0F
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F5B58
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F5B72

loc_7F5B58:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F5B72:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 3
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 1Bh ; switch 28 cases
ja	loc_7F5D01	; default
			; jumptable 007F5B95 cases 1,5,8-26
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7F5D40[eax]
jmp	ds:off_7F5D20[ecx*4] ; switch jump

loc_7F5B9C:		; jumptable 007F5B95 case 2
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F5D0A

loc_7F5BAA:		; jumptable 007F5B95 case 3
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F5D0A

loc_7F5BB8:		; jumptable 007F5B95 case 4
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7F5D0A

loc_7F5BC6:		; jumptable 007F5B95 case 0
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+var_4]
jnz	short loc_7F5BEE
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
add	edx, 2
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F1C00
add	esp, 10h
jmp	loc_7F5D1C

loc_7F5BEE:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7F5D1C

loc_7F5C00:		; jumptable 007F5B95 case 27
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jnz	short loc_7F5C38
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
add	eax, 2
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7F4FA0
add	esp, 10h
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
sub	eax, 16h
neg	eax
sbb	eax, eax
and	eax, [ebp+var_8]
jmp	loc_7F5D1C

loc_7F5C38:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 6
jmp	loc_7F5D1C

loc_7F5C4A:		; jumptable 007F5B95 case 7
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+var_4]
jnz	short loc_7F5C67
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	eax, 7
jmp	loc_7F5D1C

loc_7F5C67:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	loc_7F5D1C

loc_7F5C79:		; jumptable 007F5B95 case 6
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+var_4]
jnz	short loc_7F5CF2
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F5C9C
mov	eax, 0FFFFFFFDh
jmp	loc_7F5D1C

loc_7F5C9C:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F5CBA
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_14], edx
jmp	short loc_7F5CD4

loc_7F5CBA:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_14], eax

loc_7F5CD4:
cmp	[ebp+var_14], 0Ah
jnz	short loc_7F5CE3
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F5CE3:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 7
jmp	short loc_7F5D1C

loc_7F5CF2:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6
jmp	short loc_7F5D1C

loc_7F5D01:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F5B95 cases 1,5,8-26
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F5D0A:
jmp	loc_7F5B2E

loc_7F5D0F:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
mov	eax, 6

loc_7F5D1C:
mov	esp, ebp
pop	ebp
retn
sub_7F5B10 endp

off_7F5D20 dd offset loc_7F5BC6	; jump table for switch	statement
dd offset loc_7F5B9C
dd offset loc_7F5BAA
dd offset loc_7F5BB8
dd offset loc_7F5C79
dd offset loc_7F5C4A
dd offset loc_7F5C00
dd offset loc_7F5D01
byte_7F5D40 db	    0,	   7,	  1,	 2 ; indirect table for	switch statement
db	3,     7,     4,     5
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     6
align 10h


; Attributes: bp-based frame

sub_7F5D60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_4], 0
mov	eax, 1
test	eax, eax
jz	short loc_7F5D99
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
and	edx, 1
jz	short loc_7F5D99
mov	eax, [ebp+var_8]
and	eax, 0FFFFFFFEh
mov	[ebp+var_8], eax
mov	ecx, [ebp+arg_4]
add	ecx, [ebp+var_8]
mov	[ebp+arg_8], ecx

loc_7F5D99:
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	loc_7F5FAC
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F5DC3
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F5DDD

loc_7F5DC3:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F5DDD:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 8	; switch 9 cases
ja	loc_7F5F9E	; default
			; jumptable 007F5DF0 case 3
mov	edx, [ebp+var_10]
jmp	ds:off_7F5FB4[edx*4] ; switch jump

loc_7F5DF7:		; jumptable 007F5DF0 case 5
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cmp	eax, 2
jge	short loc_7F5E0C
mov	eax, 0FFFFFFFEh
jmp	loc_7F5FAF

loc_7F5E0C:
xor	ecx, ecx
jz	short loc_7F5E1F
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F5FAF

loc_7F5E1F:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
jmp	loc_7F5FA7

loc_7F5E2D:		; jumptable 007F5DF0 case 6
mov	edx, [ebp+arg_8]
sub	edx, [ebp+arg_4]
cmp	edx, 3
jge	short loc_7F5E42
mov	eax, 0FFFFFFFEh
jmp	loc_7F5FAF

loc_7F5E42:
xor	eax, eax
jz	short loc_7F5E55
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F5FAF

loc_7F5E55:
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F5FA7

loc_7F5E63:		; jumptable 007F5DF0 case 7
mov	ecx, [ebp+arg_8]
sub	ecx, [ebp+arg_4]
cmp	ecx, 4
jge	short loc_7F5E78
mov	eax, 0FFFFFFFEh
jmp	loc_7F5FAF

loc_7F5E78:
xor	edx, edx
jz	short loc_7F5E8B
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F5FAF

loc_7F5E8B:
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	loc_7F5FA7

loc_7F5E99:		; jumptable 007F5DF0 cases 0,1,8
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F5FAF

loc_7F5EA8:		; jumptable 007F5DF0 case 2
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F5EC1
or	eax, 0FFFFFFFFh
jmp	loc_7F5FAF

loc_7F5EC1:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F5F18
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 21h
jnz	short loc_7F5F18
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F5EF0
or	eax, 0FFFFFFFFh
jmp	loc_7F5FAF

loc_7F5EF0:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F5F18
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 5Bh
jnz	short loc_7F5F18
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F5F18:
jmp	loc_7F5FA7

loc_7F5F1D:		; jumptable 007F5DF0 case 4
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F5F33
or	eax, 0FFFFFFFFh
jmp	short loc_7F5FAF

loc_7F5F33:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F5F9C
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 5Dh
jnz	short loc_7F5F9C
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F5F5F
or	eax, 0FFFFFFFFh
jmp	short loc_7F5FAF

loc_7F5F5F:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F5F9C
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 3Eh
jnz	short loc_7F5F9C
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
cmp	[ebp+var_4], 0
jnz	short loc_7F5F93
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax
mov	eax, 2Ah
jmp	short loc_7F5FAF

loc_7F5F93:
mov	ecx, [ebp+var_4]
sub	ecx, 1
mov	[ebp+var_4], ecx

loc_7F5F9C:
jmp	short loc_7F5FA7

loc_7F5F9E:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F5DF0 case 3
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F5FA7:
jmp	loc_7F5D99

loc_7F5FAC:
or	eax, 0FFFFFFFFh

loc_7F5FAF:
mov	esp, ebp
pop	ebp
retn
sub_7F5D60 endp

align 4
off_7F5FB4 dd offset loc_7F5E99	; jump table for switch	statement
dd offset loc_7F5E99
dd offset loc_7F5EA8
dd offset loc_7F5F9E
dd offset loc_7F5F1D
dd offset loc_7F5DF7
dd offset loc_7F5E2D
dd offset loc_7F5E63
dd offset loc_7F5E99
align 10h


; Attributes: bp-based frame

sub_7F5FE0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_8]
sub	ecx, 2
mov	[ebp+arg_8], ecx
jmp	short loc_7F6003

loc_7F5FFA:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx

loc_7F6003:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F6101
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F602D
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F6047

loc_7F602D:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F6047:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 9
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 1Ah ; switch 27 cases
ja	short loc_7F60BD ; default
			; jumptable 007F6066 cases 2,3,11,19,20
mov	ecx, [ebp+var_8]
movzx	edx, ds:byte_7F611C[ecx]
jmp	ds:off_7F610C[edx*4] ; switch jump

loc_7F606D:		; jumptable 007F6066 cases 0,1,4-10,14-16,18,21-26
jmp	loc_7F60FC

loc_7F6072:		; jumptable 007F6066 case 12
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F6094
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 9
jnz	short loc_7F6094
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F6106

loc_7F6094:
jmp	short loc_7F60FC

loc_7F6096:		; jumptable 007F6066 cases 13,17
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F60AC
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
mov	[ebp+var_C], eax
jmp	short loc_7F60B3

loc_7F60AC:
mov	[ebp+var_C], 0FFFFFFFFh

loc_7F60B3:
mov	ecx, [ebp+var_C]
and	ecx, 0FFFFFF80h
jnz	short loc_7F60BD ; default
			; jumptable 007F6066 cases 2,3,11,19,20
jmp	short loc_7F60FC

loc_7F60BD:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F6066 cases 2,3,11,19,20
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F60D3
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_10], edx
jmp	short loc_7F60DA

loc_7F60D3:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7F60DA:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 24h
jz	short loc_7F60EE
cmp	[ebp+var_14], 40h
jz	short loc_7F60EE
jmp	short loc_7F60F0

loc_7F60EE:
jmp	short loc_7F60FC

loc_7F60F0:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F6106

loc_7F60FC:
jmp	loc_7F5FFA

loc_7F6101:
mov	eax, 1

loc_7F6106:
mov	esp, ebp
pop	ebp
retn
sub_7F5FE0 endp

align 4
off_7F610C dd offset loc_7F606D	; jump table for switch	statement
dd offset loc_7F6072
dd offset loc_7F6096
dd offset loc_7F60BD
byte_7F611C db	    0,	   0,	  3,	 3 ; indirect table for	switch statement
db	0,     0,     0,     0
db	0,     0,     0,     3
db	1,     2,     0,     0
db	0,     2,     0,     3
db	3,     0,     0,     0
db	0,     0,     0
align 10h


; Attributes: bp-based frame

sub_7F6140 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 20h
mov	[ebp+var_C], 1
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F616F

loc_7F6166:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F616F:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F618D
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_0]
movzx	ecx, byte ptr [eax+edx+4Ch]
mov	[ebp+var_10], ecx
jmp	short loc_7F61A7

loc_7F618D:
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
push	eax
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx]
push	edx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_10], eax

loc_7F61A7:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
mov	ecx, [ebp+var_14]
sub	ecx, 3
mov	[ebp+var_14], ecx
cmp	[ebp+var_14], 1Ah ; switch 27 cases
ja	loc_7F64CD	; default
			; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25
mov	edx, [ebp+var_14]
movzx	eax, ds:byte_7F6504[edx]
jmp	ds:off_7F64D8[eax*4] ; switch jump

loc_7F61D1:		; jumptable 007F61CA case 2
cmp	[ebp+var_C], 0
jnz	short loc_7F6203
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F61FC
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax+edx], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	byte ptr [eax+edx+0Ch],	1

loc_7F61FC:
mov	[ebp+var_C], 1

loc_7F6203:
mov	ecx, [ebp+arg_4]
mov	[ebp+arg_4], ecx
jmp	loc_7F64CD	; default
			; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F620E:		; jumptable 007F61CA case 3
cmp	[ebp+var_C], 0
jnz	short loc_7F6240
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F6239
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx+eax], edx
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	1

loc_7F6239:
mov	[ebp+var_C], 1

loc_7F6240:
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
jmp	loc_7F64CD	; default
			; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F624E:		; jumptable 007F61CA case 4
cmp	[ebp+var_C], 0
jnz	short loc_7F6280
mov	eax, [ebp+var_8]
cmp	eax, [ebp+arg_8]
jge	short loc_7F6279
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx+ecx], eax
mov	ecx, [ebp+var_8]
shl	ecx, 4
mov	edx, [ebp+arg_C]
mov	byte ptr [edx+ecx+0Ch],	1

loc_7F6279:
mov	[ebp+var_C], 1

loc_7F6280:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	loc_7F64CD	; default
			; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F628E:		; jumptable 007F61CA cases 19,21,26
cmp	[ebp+var_C], 0
jnz	short loc_7F62C0
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F62B9
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
mov	[eax+edx], ecx
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	byte ptr [eax+edx+0Ch],	1

loc_7F62B9:
mov	[ebp+var_C], 1

loc_7F62C0:		; default
jmp	loc_7F64CD	; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F62C5:		; jumptable 007F61CA case 9
cmp	[ebp+var_C], 2
jz	short loc_7F62F6
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F62E6
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx+eax+4], edx

loc_7F62E6:
mov	[ebp+var_C], 2
mov	[ebp+var_4], 0Ch
jmp	short loc_7F6324

loc_7F62F6:
cmp	[ebp+var_4], 0Ch
jnz	short loc_7F6324
mov	[ebp+var_C], 0
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F631B
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx+eax+8], edx

loc_7F631B:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7F6324:		; default
jmp	loc_7F64CD	; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F6329:		; jumptable 007F61CA case 10
cmp	[ebp+var_C], 2
jz	short loc_7F635A
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F634A
mov	edx, [ebp+arg_4]
add	edx, 2
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	[ecx+eax+4], edx

loc_7F634A:
mov	[ebp+var_C], 2
mov	[ebp+var_4], 0Dh
jmp	short loc_7F6388

loc_7F635A:
cmp	[ebp+var_4], 0Dh
jnz	short loc_7F6388
mov	[ebp+var_C], 0
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F637F
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_4]
mov	[ecx+eax+8], edx

loc_7F637F:
mov	eax, [ebp+var_8]
add	eax, 1
mov	[ebp+var_8], eax

loc_7F6388:		; default
jmp	loc_7F64CD	; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F638D:		; jumptable 007F61CA case 0
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	short loc_7F63A3
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	byte ptr [eax+edx+0Ch],	0

loc_7F63A3:		; default
jmp	loc_7F64CD	; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F63A8:		; jumptable 007F61CA case 18
cmp	[ebp+var_C], 1
jnz	short loc_7F63BA
mov	[ebp+var_C], 0
jmp	loc_7F6493

loc_7F63BA:
cmp	[ebp+var_C], 2
jnz	loc_7F6493
mov	ecx, [ebp+var_8]
cmp	ecx, [ebp+arg_8]
jge	loc_7F6493
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
movsx	ecx, byte ptr [eax+edx+0Ch]
test	ecx, ecx
jz	loc_7F6493
mov	edx, [ebp+var_8]
shl	edx, 4
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax+edx+4]
jz	loc_7F6485
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F6412
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_18], edx
jmp	short loc_7F6419

loc_7F6412:
mov	[ebp+var_18], 0FFFFFFFFh

loc_7F6419:
cmp	[ebp+var_18], 20h
jnz	short loc_7F6485
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+2]
test	ecx, ecx
jnz	short loc_7F6436
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+3]
mov	[ebp+var_1C], eax
jmp	short loc_7F643D

loc_7F6436:
mov	[ebp+var_1C], 0FFFFFFFFh

loc_7F643D:
cmp	[ebp+var_1C], 20h
jz	short loc_7F6485
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+2]
test	edx, edx
jnz	short loc_7F6462
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+3]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_20], eax
jmp	short loc_7F647D

loc_7F6462:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+3]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+2]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_20], eax

loc_7F647D:
mov	edx, [ebp+var_20]
cmp	edx, [ebp+var_4]
jnz	short loc_7F6493

loc_7F6485:
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	0

loc_7F6493:		; default
jmp	short loc_7F64CD ; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F6495:		; jumptable 007F61CA cases 6,7
cmp	[ebp+var_C], 1
jnz	short loc_7F64A4
mov	[ebp+var_C], 0
jmp	short loc_7F64C0

loc_7F64A4:
cmp	[ebp+var_C], 2
jnz	short loc_7F64C0
mov	edx, [ebp+var_8]
cmp	edx, [ebp+arg_8]
jge	short loc_7F64C0
mov	eax, [ebp+var_8]
shl	eax, 4
mov	ecx, [ebp+arg_C]
mov	byte ptr [ecx+eax+0Ch],	0

loc_7F64C0:		; default
jmp	short loc_7F64CD ; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F64C2:		; jumptable 007F61CA cases 8,14
cmp	[ebp+var_C], 2
jz	short loc_7F64CD ; default
			; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25
mov	eax, [ebp+var_8]
jmp	short loc_7F64D2

loc_7F64CD:		; default
jmp	loc_7F6166	; jumptable 007F61CA cases 1,5,11-13,15-17,20,22-25

loc_7F64D2:
mov	esp, ebp
pop	ebp
retn
sub_7F6140 endp

align 4
off_7F64D8 dd offset loc_7F638D	; jump table for switch	statement
dd offset loc_7F61D1
dd offset loc_7F620E
dd offset loc_7F624E
dd offset loc_7F6495
dd offset loc_7F64C2
dd offset loc_7F62C5
dd offset loc_7F6329
dd offset loc_7F63A8
dd offset loc_7F628E
dd offset loc_7F64CD
byte_7F6504 db	    0,	 0Ah,	  1,	 2 ; indirect table for	switch statement
db	3,   0Ah,     4,     4
db	5,     6,     7,   0Ah
db    0Ah,   0Ah,     5,   0Ah
db    0Ah,   0Ah,     8,     9
db    0Ah,     9,   0Ah,   0Ah
db    0Ah,   0Ah,     9
align 10h


; Attributes: bp-based frame

sub_7F6520 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 18h
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_4]
add	eax, 4
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	loc_7F6625
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 78h
jnz	loc_7F6625
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F6568

loc_7F655F:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F6568:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F6582
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 3Bh
jz	loc_7F6623

loc_7F6582:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F6598
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_10], edx
jmp	short loc_7F659F

loc_7F6598:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7F659F:
mov	eax, [ebp+var_10]
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
mov	[ebp+var_14], ecx
mov	edx, [ebp+var_14]
sub	edx, 30h
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 36h ; switch 55 cases
ja	short loc_7F6610 ; default
			; jumptable 007F65C4 cases 10-16,23-48
mov	eax, [ebp+var_14]
movzx	ecx, ds:byte_7F66B0[eax]
jmp	ds:off_7F66A0[ecx*4] ; switch jump

loc_7F65CB:		; jumptable 007F65C4 cases 0-9
mov	edx, [ebp+var_4]
shl	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
sub	eax, 30h
or	eax, [ebp+var_4]
mov	[ebp+var_4], eax
jmp	short loc_7F6610 ; default
			; jumptable 007F65C4 cases 10-16,23-48

loc_7F65E2:		; jumptable 007F65C4 cases 17-22
mov	ecx, [ebp+var_4]
shl	ecx, 4
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx-37h]
mov	[ebp+var_4], ecx
jmp	short loc_7F6610 ; default
			; jumptable 007F65C4 cases 10-16,23-48

loc_7F65FA:		; jumptable 007F65C4 cases 49-54
mov	edx, [ebp+var_4]
shl	edx, 4
mov	[ebp+var_4], edx
mov	eax, [ebp+var_8]
mov	ecx, [ebp+var_4]
lea	edx, [ecx+eax-57h]
mov	[ebp+var_4], edx

loc_7F6610:		; default
cmp	[ebp+var_4], 110000h ; jumptable 007F65C4 cases	10-16,23-48
jl	short loc_7F661E
or	eax, 0FFFFFFFFh
jmp	short loc_7F669B

loc_7F661E:
jmp	loc_7F655F

loc_7F6623:
jmp	short loc_7F668F

loc_7F6625:
jmp	short loc_7F6630

loc_7F6627:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F6630:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F6646
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 3Bh
jz	short loc_7F668F

loc_7F6646:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F665C
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_18], edx
jmp	short loc_7F6663

loc_7F665C:
mov	[ebp+var_18], 0FFFFFFFFh

loc_7F6663:
mov	eax, [ebp+var_18]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_4]
imul	ecx, 0Ah
mov	[ebp+var_4], ecx
mov	edx, [ebp+var_C]
mov	eax, [ebp+var_4]
lea	ecx, [eax+edx-30h]
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 110000h
jl	short loc_7F668D
or	eax, 0FFFFFFFFh
jmp	short loc_7F669B

loc_7F668D:
jmp	short loc_7F6627

loc_7F668F:
mov	edx, [ebp+var_4]
push	edx
call	sub_7F6EB0
add	esp, 4

loc_7F669B:
mov	esp, ebp
pop	ebp
retn
sub_7F6520 endp

align 10h
off_7F66A0 dd offset loc_7F65CB, offset	loc_7F65E2 ; jump table	for switch statement
dd offset loc_7F65FA, offset loc_7F6610
byte_7F66B0 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	0,     0,     0,     0
db	0,     0,     3,     3
db	3,     3,     3,     3
db	3,     1,     1,     1
db	1,     1,     1,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     2,     2,     2
db	2,     2,     2
align 10h


; Attributes: bp-based frame

sub_7F66F0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_8]
sub	eax, [ebp+arg_4]
cdq
sub	eax, edx
sar	eax, 1
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 2
jz	short loc_7F671F
cmp	[ebp+var_4], 3
jz	short loc_7F6780
cmp	[ebp+var_4], 4
jz	loc_7F67E3
jmp	loc_7F68E1

loc_7F671F:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+2]
test	ecx, ecx
jnz	short loc_7F677B
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+3]
cmp	eax, 74h
jnz	short loc_7F677B
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F674C
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
mov	[ebp+var_8], ecx
jmp	short loc_7F6753

loc_7F674C:
mov	[ebp+var_8], 0FFFFFFFFh

loc_7F6753:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
cmp	[ebp+var_C], 67h
jz	short loc_7F6771
cmp	[ebp+var_C], 6Ch
jz	short loc_7F6767
jmp	short loc_7F677B

loc_7F6767:
mov	eax, 3Ch
jmp	loc_7F68E3

loc_7F6771:
mov	eax, 3Eh
jmp	loc_7F68E3

loc_7F677B:
jmp	loc_7F68E1

loc_7F6780:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F67DE
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 61h
jnz	short loc_7F67DE
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F67DE
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 6Dh
jnz	short loc_7F67DE
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F67DE
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 70h
jnz	short loc_7F67DE
mov	eax, 26h
jmp	loc_7F68E3

loc_7F67DE:
jmp	loc_7F68E1

loc_7F67E3:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F67F9
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	[ebp+var_10], edx
jmp	short loc_7F6800

loc_7F67F9:
mov	[ebp+var_10], 0FFFFFFFFh

loc_7F6800:
mov	eax, [ebp+var_10]
mov	[ebp+var_14], eax
cmp	[ebp+var_14], 61h
jz	short loc_7F687D
cmp	[ebp+var_14], 71h
jz	short loc_7F6817
jmp	loc_7F68E1

loc_7F6817:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F687B
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 75h
jnz	short loc_7F687B
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F687B
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 6Fh
jnz	short loc_7F687B
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F687B
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 74h
jnz	short loc_7F687B
mov	eax, 22h
jmp	short loc_7F68E3

loc_7F687B:
jmp	short loc_7F68E1

loc_7F687D:
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F68E1
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
cmp	edx, 70h
jnz	short loc_7F68E1
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F68E1
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+1]
cmp	ecx, 6Fh
jnz	short loc_7F68E1
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F68E1
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+1]
cmp	eax, 73h
jnz	short loc_7F68E1
mov	eax, 27h
jmp	short loc_7F68E3

loc_7F68E1:
xor	eax, eax

loc_7F68E3:
mov	esp, ebp
pop	ebp
retn
sub_7F66F0 endp

align 10h


; Attributes: bp-based frame

sub_7F68F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 10h

loc_7F68F6:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F6914
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7F692E

loc_7F6914:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F692E:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
mov	edx, [ebp+var_8]
sub	edx, 5
mov	[ebp+var_8], edx
cmp	[ebp+var_8], 18h ; switch 25 cases
ja	loc_7F6AB9	; default
			; jumptable 007F6951 cases 3-16,23
mov	eax, [ebp+var_8]
movzx	ecx, ds:byte_7F6B4C[eax]
jmp	ds:off_7F6B38[ecx*4] ; switch jump

loc_7F6958:		; jumptable 007F6951 case 2
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F6981 ; jumptable 007F6951 case 1
xor	eax, eax
jmp	loc_7F6B32

loc_7F6981:		; jumptable 007F6951 case 1
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F69AA ; jumptable 007F6951 case 0
xor	eax, eax
jmp	loc_7F6B32

loc_7F69AA:		; jumptable 007F6951 case 0
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F69D3
xor	eax, eax
jmp	loc_7F6B32

loc_7F69D3:
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
cmp	edx, eax
jz	short loc_7F69FC
xor	eax, eax
jmp	loc_7F6B32

loc_7F69FC:
jmp	loc_7F6B2D

loc_7F6A01:		; jumptable 007F6951 cases 17-22,24
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
cmp	edx, eax
jz	short loc_7F6A2A
xor	eax, eax
jmp	loc_7F6B32

loc_7F6A2A:
mov	edx, 1
test	edx, edx
jz	loc_7F6AB7
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_8]
movsx	eax, byte ptr [edx]
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
mov	edx, [ebp+arg_8]
add	edx, 1
mov	[ebp+arg_8], edx
cmp	eax, ecx
jz	short loc_7F6A60
xor	eax, eax
jmp	loc_7F6B32

loc_7F6A60:
xor	eax, eax
jz	short loc_7F6AB7
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
mov	eax, [ebp+arg_8]
movsx	ecx, byte ptr [eax]
mov	eax, [ebp+arg_4]
add	eax, 1
mov	[ebp+arg_4], eax
mov	eax, [ebp+arg_8]
add	eax, 1
mov	[ebp+arg_8], eax
cmp	ecx, edx
jz	short loc_7F6A8D
xor	eax, eax
jmp	loc_7F6B32

loc_7F6A8D:
xor	ecx, ecx
jz	short loc_7F6AB7
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_8]
movsx	edx, byte ptr [ecx]
mov	ecx, [ebp+arg_4]
add	ecx, 1
mov	[ebp+arg_4], ecx
mov	ecx, [ebp+arg_8]
add	ecx, 1
mov	[ebp+arg_8], ecx
cmp	edx, eax
jz	short loc_7F6AB7
xor	eax, eax
jmp	short loc_7F6B32

loc_7F6AB7:
jmp	short loc_7F6B2D

loc_7F6AB9:		; default
xor	edx, edx	; jumptable 007F6951 cases 3-16,23
jz	short loc_7F6AC4
mov	eax, 1
jmp	short loc_7F6B32

loc_7F6AC4:
mov	eax, [ebp+arg_8]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F6AE2
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F6AFC

loc_7F6AE2:
mov	eax, [ebp+arg_8]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_8]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F6AFC:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
sub	edx, 5
mov	[ebp+var_10], edx
cmp	[ebp+var_10], 18h ; switch 25 cases
ja	short loc_7F6B26 ; default
			; jumptable 007F6B1B cases 3-16,23
mov	eax, [ebp+var_10]
movzx	ecx, ds:byte_7F6B70[eax]
jmp	ds:off_7F6B68[ecx*4] ; switch jump

loc_7F6B22:		; jumptable 007F6B1B cases 0-2,17-22,24
xor	eax, eax
jmp	short loc_7F6B32

loc_7F6B26:		; default
mov	eax, 1		; jumptable 007F6B1B cases 3-16,23
jmp	short loc_7F6B32

loc_7F6B2D:
jmp	loc_7F68F6

loc_7F6B32:
mov	esp, ebp
pop	ebp
retn
sub_7F68F0 endp

align 4
off_7F6B38 dd offset loc_7F69AA	; jump table for switch	statement
dd offset loc_7F6981
dd offset loc_7F6958
dd offset loc_7F6A01
dd offset loc_7F6AB9
byte_7F6B4C db	    0,	   1,	  2,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3,     3,     3
db	3,     3,     3,     4
db	3
align 4
off_7F6B68 dd offset loc_7F6B22	; jump table for switch	statement
dd offset loc_7F6B26
byte_7F6B70 db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     0,     0,     0
db	0,     0,     0,     1
db	0
align 10h


; Attributes: bp-based frame

sub_7F6B90 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
jmp	short loc_7F6BA7

loc_7F6B95:
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_C]
add	ecx, 1
mov	[ebp+arg_C], ecx

loc_7F6BA7:
mov	edx, [ebp+arg_C]
movsx	eax, byte ptr [edx]
test	eax, eax
jz	short loc_7F6BDE
mov	ecx, [ebp+arg_4]
cmp	ecx, [ebp+arg_8]
jnz	short loc_7F6BBD
xor	eax, eax
jmp	short loc_7F6BE9

loc_7F6BBD:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx]
test	eax, eax
jnz	short loc_7F6BD8
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+1]
mov	eax, [ebp+arg_C]
movsx	ecx, byte ptr [eax]
cmp	edx, ecx
jz	short loc_7F6BDC

loc_7F6BD8:
xor	eax, eax
jmp	short loc_7F6BE9

loc_7F6BDC:
jmp	short loc_7F6B95

loc_7F6BDE:
mov	edx, [ebp+arg_4]
xor	eax, eax
cmp	edx, [ebp+arg_8]
setz	al

loc_7F6BE9:
pop	ebp
retn
sub_7F6B90 endp

align 10h


; Attributes: bp-based frame

sub_7F6BF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax

loc_7F6BFC:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F6C1A
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_8], eax
jmp	short loc_7F6C34

loc_7F6C1A:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_8], eax

loc_7F6C34:
mov	edx, [ebp+var_8]
mov	[ebp+var_C], edx
mov	eax, [ebp+var_C]
sub	eax, 5
mov	[ebp+var_C], eax
cmp	[ebp+var_C], 18h ; switch 25 cases
ja	short loc_7F6C86 ; default
			; jumptable 007F6C53 cases 3-16,23
mov	ecx, [ebp+var_C]
movzx	edx, ds:byte_7F6CAC[ecx]
jmp	ds:off_7F6C98[edx*4] ; switch jump

loc_7F6C5A:		; jumptable 007F6C53 case 0
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F6C8E

loc_7F6C65:		; jumptable 007F6C53 case 1
mov	ecx, [ebp+arg_4]
add	ecx, 3
mov	[ebp+arg_4], ecx
jmp	short loc_7F6C8E

loc_7F6C70:		; jumptable 007F6C53 case 2
mov	edx, [ebp+arg_4]
add	edx, 4
mov	[ebp+arg_4], edx
jmp	short loc_7F6C8E

loc_7F6C7B:		; jumptable 007F6C53 cases 17-22,24
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F6C8E

loc_7F6C86:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F6C53 cases 3-16,23
sub	eax, [ebp+var_4]
jmp	short loc_7F6C93

loc_7F6C8E:
jmp	loc_7F6BFC

loc_7F6C93:
mov	esp, ebp
pop	ebp
retn
sub_7F6BF0 endp

align 4
off_7F6C98 dd offset loc_7F6C5A	; jump table for switch	statement
dd offset loc_7F6C65
dd offset loc_7F6C70
dd offset loc_7F6C7B
dd offset loc_7F6C86
byte_7F6CAC db	    0,	   1,	  2,	 4 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3,     3,     3
db	3,     3,     3,     4
db	3
align 10h


; Attributes: bp-based frame

sub_7F6CD0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8

loc_7F6CD6:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F6CF4
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_4], edx
jmp	short loc_7F6D0E

loc_7F6CF4:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F6D0E:
mov	ecx, [ebp+var_4]
mov	[ebp+var_8], ecx
cmp	[ebp+var_8], 9
jl	short loc_7F6D33
cmp	[ebp+var_8], 0Ah
jle	short loc_7F6D28
cmp	[ebp+var_8], 15h
jz	short loc_7F6D28
jmp	short loc_7F6D33

loc_7F6D28:
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	short loc_7F6D38

loc_7F6D33:
mov	eax, [ebp+arg_4]
jmp	short loc_7F6D3A

loc_7F6D38:
jmp	short loc_7F6CD6

loc_7F6D3A:
mov	esp, ebp
pop	ebp
retn
sub_7F6CD0 endp

align 10h


; Attributes: bp-based frame

sub_7F6D40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 0Ch

loc_7F6D46:
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jz	loc_7F6E87
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx]
test	edx, edx
jnz	short loc_7F6D70
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	[ebp+var_4], eax
jmp	short loc_7F6D8A

loc_7F6D70:
mov	ecx, [ebp+arg_4]
movzx	edx, byte ptr [ecx+1]
push	edx
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax]
push	ecx
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_4], eax

loc_7F6D8A:
mov	edx, [ebp+var_4]
mov	[ebp+var_8], edx
mov	eax, [ebp+var_8]
sub	eax, 5
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 5	; switch 6 cases
ja	loc_7F6E6A	; default
			; jumptable 007F6DA6 case 3
mov	ecx, [ebp+var_8]
jmp	ds:off_7F6E8C[ecx*4] ; switch jump

loc_7F6DAD:		; jumptable 007F6DA6 case 0
mov	edx, [ebp+arg_4]
add	edx, 2
mov	[ebp+arg_4], edx
jmp	loc_7F6E73

loc_7F6DBB:		; jumptable 007F6DA6 case 1
mov	eax, [ebp+arg_4]
add	eax, 3
mov	[ebp+arg_4], eax
jmp	loc_7F6E73

loc_7F6DC9:		; jumptable 007F6DA6 case 2
mov	ecx, [ebp+arg_4]
add	ecx, 4
mov	[ebp+arg_4], ecx
jmp	loc_7F6E73

loc_7F6DD7:		; jumptable 007F6DA6 case 5
mov	edx, [ebp+arg_C]
mov	dword ptr [edx+4], 0FFFFFFFFh
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_C]
mov	[edx], ecx
mov	eax, [ebp+arg_4]
add	eax, 2
mov	[ebp+arg_4], eax
jmp	short loc_7F6E73

loc_7F6DF9:		; jumptable 007F6DA6 case 4
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	short loc_7F6E5E
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F6E35
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx+1]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	[ebp+var_C], edx
jmp	short loc_7F6E4F

loc_7F6E35:
mov	eax, [ebp+arg_4]
movzx	ecx, byte ptr [eax+1]
push	ecx
mov	edx, [ebp+arg_4]
movzx	eax, byte ptr [edx]
push	eax
call	sub_7EBC00
add	esp, 8
mov	[ebp+var_C], eax

loc_7F6E4F:
cmp	[ebp+var_C], 0Ah
jnz	short loc_7F6E5E
mov	ecx, [ebp+arg_4]
add	ecx, 2
mov	[ebp+arg_4], ecx

loc_7F6E5E:
mov	edx, [ebp+arg_C]
mov	dword ptr [edx+4], 0FFFFFFFFh
jmp	short loc_7F6E73

loc_7F6E6A:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F6DA6 case 3
add	eax, 2
mov	[ebp+arg_4], eax

loc_7F6E73:
mov	ecx, [ebp+arg_C]
mov	edx, [ecx+4]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax+4], edx
jmp	loc_7F6D46

loc_7F6E87:
mov	esp, ebp
pop	ebp
retn
sub_7F6D40 endp

align 4
off_7F6E8C dd offset loc_7F6DAD	; jump table for switch	statement
dd offset loc_7F6DBB
dd offset loc_7F6DC9
dd offset loc_7F6E6A
dd offset loc_7F6DF9
dd offset loc_7F6DD7
align 10h


; Attributes: bp-based frame

sub_7F6EB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
sar	eax, 8
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0DFh
jg	short loc_7F6ED7
cmp	[ebp+var_4], 0D8h
jge	short loc_7F6EE2
cmp	[ebp+var_4], 0
jz	short loc_7F6EE7
jmp	short loc_7F6F13

loc_7F6ED7:
cmp	[ebp+var_4], 0FFh
jz	short loc_7F6EFC
jmp	short loc_7F6F13

loc_7F6EE2:
or	eax, 0FFFFFFFFh
jmp	short loc_7F6F16

loc_7F6EE7:
mov	ecx, [ebp+arg_0]
movzx	edx, ds:byte_1458394[ecx]
test	edx, edx
jnz	short loc_7F6EFA
or	eax, 0FFFFFFFFh
jmp	short loc_7F6F16

loc_7F6EFA:
jmp	short loc_7F6F13

loc_7F6EFC:
cmp	[ebp+arg_0], 0FFFEh
jz	short loc_7F6F0E
cmp	[ebp+arg_0], 0FFFFh
jnz	short loc_7F6F13

loc_7F6F0E:
or	eax, 0FFFFFFFFh
jmp	short loc_7F6F16

loc_7F6F13:
mov	eax, [ebp+arg_0]

loc_7F6F16:
mov	esp, ebp
pop	ebp
retn
sub_7F6EB0 endp

align 10h


; Attributes: bp-based frame

sub_7F6F20 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
cmp	[ebp+arg_0], 0
jge	short loc_7F6F30
xor	eax, eax
jmp	loc_7F7025

loc_7F6F30:
cmp	[ebp+arg_0], 80h
jge	short loc_7F6F4B
mov	eax, [ebp+arg_4]
mov	cl, byte ptr [ebp+arg_0]
mov	[eax], cl
mov	eax, 1
jmp	loc_7F7025

loc_7F6F4B:
cmp	[ebp+arg_0], 800h
jge	short loc_7F6F81
mov	edx, [ebp+arg_0]
sar	edx, 6
or	edx, 0C0h
mov	eax, [ebp+arg_4]
mov	[eax], dl
mov	ecx, [ebp+arg_0]
and	ecx, 3Fh
or	ecx, 80h
mov	edx, [ebp+arg_4]
mov	[edx+1], cl
mov	eax, 2
jmp	loc_7F7025

loc_7F6F81:
cmp	[ebp+arg_0], 10000h
jge	short loc_7F6FC8
mov	eax, [ebp+arg_0]
sar	eax, 0Ch
or	eax, 0E0h
mov	ecx, [ebp+arg_4]
mov	[ecx], al
mov	edx, [ebp+arg_0]
sar	edx, 6
and	edx, 3Fh
or	edx, 80h
mov	eax, [ebp+arg_4]
mov	[eax+1], dl
mov	ecx, [ebp+arg_0]
and	ecx, 3Fh
or	ecx, 80h
mov	edx, [ebp+arg_4]
mov	[edx+2], cl
mov	eax, 3
jmp	short loc_7F7025

loc_7F6FC8:
cmp	[ebp+arg_0], 110000h
jge	short loc_7F7023
mov	eax, [ebp+arg_0]
sar	eax, 12h
or	eax, 0F0h
mov	ecx, [ebp+arg_4]
mov	[ecx], al
mov	edx, [ebp+arg_0]
sar	edx, 0Ch
and	edx, 3Fh
or	edx, 80h
mov	eax, [ebp+arg_4]
mov	[eax+1], dl
mov	ecx, [ebp+arg_0]
sar	ecx, 6
and	ecx, 3Fh
or	ecx, 80h
mov	edx, [ebp+arg_4]
mov	[edx+2], cl
mov	eax, [ebp+arg_0]
and	eax, 3Fh
or	eax, 80h
mov	ecx, [ebp+arg_4]
mov	[ecx+3], al
mov	eax, 4
jmp	short loc_7F7025

loc_7F7023:
xor	eax, eax

loc_7F7025:
pop	ebp
retn
sub_7F6F20 endp

align 10h


; Attributes: bp-based frame

sub_7F7030 proc	near
push	ebp
mov	ebp, esp
mov	eax, 778h
pop	ebp
retn
sub_7F7030 endp

align 10h


; Attributes: bp-based frame

sub_7F7040 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax
mov	[ebp+var_4], 0
jmp	short loc_7F705E

loc_7F7055:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7F705E:
cmp	[ebp+var_4], 170h
jge	short loc_7F707A
mov	edx, [ebp+arg_0]
add	edx, [ebp+var_4]
mov	eax, [ebp+var_4]
mov	cl, ds:off_1458348[eax]
mov	[edx], cl
jmp	short loc_7F7055

loc_7F707A:
mov	[ebp+var_4], 0
jmp	short loc_7F708C

loc_7F7083:
mov	edx, [ebp+var_4]
add	edx, 1
mov	[ebp+var_4], edx

loc_7F708C:
cmp	[ebp+var_4], 80h
jge	short loc_7F70C9
mov	eax, [ebp+var_4]
movzx	ecx, ds:byte_1458394[eax]
cmp	ecx, 1Ch
jz	short loc_7F70C7
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_1458394[edx]
test	eax, eax
jz	short loc_7F70C7
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_4]
mov	eax, [edx+ecx*4]
cmp	eax, [ebp+var_4]
jz	short loc_7F70C7
xor	eax, eax
jmp	loc_7F73F1

loc_7F70C7:
jmp	short loc_7F7083

loc_7F70C9:
mov	[ebp+var_4], 0
jmp	short loc_7F70DB

loc_7F70D2:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7F70DB:
cmp	[ebp+var_4], 100h
jge	loc_7F7347
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_4]
mov	ecx, [eax+edx*4]
mov	[ebp+var_C], ecx
cmp	[ebp+var_C], 0FFFFFFFFh
jnz	short loc_7F7138
mov	edx, [ebp+var_8]
add	edx, [ebp+var_4]
mov	byte ptr [edx+4Ch], 1
mov	eax, 0FFFFh
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[edx+ecx*2+178h], ax
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+eax*4+378h], 1
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	byte ptr [eax+edx*4+379h], 0
jmp	loc_7F7342

loc_7F7138:
cmp	[ebp+var_C], 0
jge	short loc_7F7184
cmp	[ebp+var_C], 0FFFFFFFCh
jge	short loc_7F714B
xor	eax, eax
jmp	loc_7F73F1

loc_7F714B:
mov	ecx, [ebp+var_C]
add	ecx, 2
mov	edx, 5
sub	edx, ecx
mov	eax, [ebp+var_8]
add	eax, [ebp+var_4]
mov	[eax+4Ch], dl
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	byte ptr [edx+ecx*4+378h], 0
xor	eax, eax
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[edx+ecx*2+178h], ax
jmp	loc_7F7342

loc_7F7184:
cmp	[ebp+var_C], 80h
jge	loc_7F7219
mov	eax, [ebp+var_C]
movzx	ecx, ds:byte_1458394[eax]
cmp	ecx, 1Ch
jz	short loc_7F71BD
mov	edx, [ebp+var_C]
movzx	eax, ds:byte_1458394[edx]
test	eax, eax
jz	short loc_7F71BD
mov	ecx, [ebp+var_C]
cmp	ecx, [ebp+var_4]
jz	short loc_7F71BD
xor	eax, eax
jmp	loc_7F73F1

loc_7F71BD:
mov	edx, [ebp+var_8]
add	edx, [ebp+var_4]
mov	eax, [ebp+var_C]
mov	cl, ds:byte_1458394[eax]
mov	[edx+4Ch], cl
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	byte ptr [eax+edx*4+378h], 1
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	al, byte ptr [ebp+var_C]
mov	[edx+ecx*4+379h], al
cmp	[ebp+var_C], 0
jnz	short loc_7F71FC
mov	[ebp+var_10], 0FFFFh
jmp	short loc_7F7202

loc_7F71FC:
mov	ecx, [ebp+var_C]
mov	[ebp+var_10], ecx

loc_7F7202:
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	cx, word ptr [ebp+var_10]
mov	[eax+edx*2+178h], cx
jmp	loc_7F7342

loc_7F7219:
mov	edx, [ebp+var_C]
push	edx
call	sub_7F6EB0
add	esp, 4
test	eax, eax
jge	short loc_7F7267
mov	eax, [ebp+var_8]
add	eax, [ebp+var_4]
mov	byte ptr [eax+4Ch], 0
mov	ecx, 0FFFFh
mov	edx, [ebp+var_4]
mov	eax, [ebp+var_8]
mov	[eax+edx*2+178h], cx
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	byte ptr [edx+ecx*4+378h], 1
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	byte ptr [ecx+eax*4+379h], 0
jmp	loc_7F7342

loc_7F7267:
cmp	[ebp+var_C], 0FFFFh
jle	short loc_7F7277
xor	eax, eax
jmp	loc_7F73F1

loc_7F7277:
mov	edx, [ebp+var_C]
sar	edx, 8
movzx	eax, ds:byte_1457A10[edx]
mov	ecx, [ebp+var_C]
and	ecx, 0FFh
sar	ecx, 5
lea	edx, [ecx+eax*8]
mov	ecx, [ebp+var_C]
and	ecx, 0FFh
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jz	short loc_7F72BB
mov	ecx, [ebp+var_8]
add	ecx, [ebp+var_4]
mov	byte ptr [ecx+4Ch], 16h
jmp	short loc_7F7309

loc_7F72BB:
mov	edx, [ebp+var_C]
sar	edx, 8
movzx	eax, ds:byte_1457B10[edx]
mov	ecx, [ebp+var_C]
and	ecx, 0FFh
sar	ecx, 5
lea	edx, [ecx+eax*8]
mov	ecx, [ebp+var_C]
and	ecx, 0FFh
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]
jz	short loc_7F72FF
mov	ecx, [ebp+var_8]
add	ecx, [ebp+var_4]
mov	byte ptr [ecx+4Ch], 1Ah
jmp	short loc_7F7309

loc_7F72FF:
mov	edx, [ebp+var_8]
add	edx, [ebp+var_4]
mov	byte ptr [edx+4Ch], 1Ch

loc_7F7309:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
lea	edx, [ecx+eax*4+379h]
push	edx
mov	eax, [ebp+var_C]
push	eax
call	sub_7F6F20
add	esp, 8
mov	ecx, [ebp+var_4]
mov	edx, [ebp+var_8]
mov	[edx+ecx*4+378h], al
mov	eax, [ebp+var_4]
mov	ecx, [ebp+var_8]
mov	dx, word ptr [ebp+var_C]
mov	[ecx+eax*2+178h], dx

loc_7F7342:
jmp	loc_7F70D2

loc_7F7347:
mov	eax, [ebp+var_8]
mov	ecx, [ebp+arg_C]
mov	[eax+174h], ecx
mov	edx, [ebp+var_8]
mov	eax, [ebp+arg_8]
mov	[edx+170h], eax
cmp	[ebp+arg_8], 0
jz	short loc_7F73DA
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+14Ch], offset sub_7F7400
mov	edx, [ebp+var_8]
mov	dword ptr [edx+150h], offset sub_7F7400
mov	eax, [ebp+var_8]
mov	dword ptr [eax+154h], offset sub_7F7400
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+158h], offset sub_7F7480
mov	edx, [ebp+var_8]
mov	dword ptr [edx+15Ch], offset sub_7F7480
mov	eax, [ebp+var_8]
mov	dword ptr [eax+160h], offset sub_7F7480
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+164h], offset sub_7F7500
mov	edx, [ebp+var_8]
mov	dword ptr [edx+168h], offset sub_7F7500
mov	eax, [ebp+var_8]
mov	dword ptr [eax+16Ch], offset sub_7F7500

loc_7F73DA:
mov	ecx, [ebp+var_8]
mov	dword ptr [ecx+3Ch], offset sub_7F7560
mov	edx, [ebp+var_8]
mov	dword ptr [edx+40h], offset sub_7F7670
mov	eax, [ebp+var_8]

loc_7F73F1:
mov	esp, ebp
pop	ebp
retn
sub_7F7040 endp

align 10h


; Attributes: bp-based frame

sub_7F7400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+174h]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+170h]
call	edx
add	esp, 8
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
and	eax, 0FFFF0000h
jz	short loc_7F7439
xor	eax, eax
jmp	short loc_7F746E

loc_7F7439:
mov	ecx, [ebp+var_8]
sar	ecx, 8
movzx	edx, ds:byte_1457B10[ecx]
mov	eax, [ebp+var_8]
and	eax, 0FFh
sar	eax, 5
lea	edx, [eax+edx*8]
mov	ecx, [ebp+var_8]
and	ecx, 0FFh
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]

loc_7F746E:
mov	esp, ebp
pop	ebp
retn
sub_7F7400 endp

align 10h


; Attributes: bp-based frame

sub_7F7480 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+174h]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+170h]
call	edx
add	esp, 8
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
and	eax, 0FFFF0000h
jz	short loc_7F74B9
xor	eax, eax
jmp	short loc_7F74EE

loc_7F74B9:
mov	ecx, [ebp+var_8]
sar	ecx, 8
movzx	edx, ds:byte_1457A10[ecx]
mov	eax, [ebp+var_8]
and	eax, 0FFh
sar	eax, 5
lea	edx, [eax+edx*8]
mov	ecx, [ebp+var_8]
and	ecx, 0FFh
and	ecx, 1Fh
mov	eax, 1
shl	eax, cl
and	eax, ds:dword_1457510[edx*4]

loc_7F74EE:
mov	esp, ebp
pop	ebp
retn
sub_7F7480 endp

align 10h


; Attributes: bp-based frame

sub_7F7500 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 0Ch
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx+174h]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+170h]
call	edx
add	esp, 8
mov	[ebp+var_8], eax
mov	eax, [ebp+var_8]
and	eax, 0FFFF0000h
jnz	short loc_7F754E
mov	ecx, [ebp+var_8]
push	ecx
call	sub_7F6EB0
add	esp, 4
test	eax, eax
jl	short loc_7F754E
mov	[ebp+var_C], 0
jmp	short loc_7F7555

loc_7F754E:
mov	[ebp+var_C], 1

loc_7F7555:
mov	eax, [ebp+var_C]
mov	esp, ebp
pop	ebp
retn
sub_7F7500 endp

align 10h


; Attributes: bp-based frame

sub_7F7560 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_0]
mov	[ebp+var_8], eax

loc_7F756C:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
cmp	edx, [ebp+arg_8]
jnz	short loc_7F757B
jmp	loc_7F765F

loc_7F757B:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+var_8]
lea	ecx, [eax+edx*4+378h]
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_10]
movsx	eax, byte ptr [edx]
mov	[ebp+var_C], eax
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_10], ecx
cmp	[ebp+var_C], 0
jnz	short loc_7F7611
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_8]
mov	edx, [ecx+174h]
push	edx
mov	eax, [ebp+var_8]
mov	ecx, [eax+170h]
call	ecx
add	esp, 8
mov	[ebp+var_14], eax
lea	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_14]
push	eax
call	sub_7F6F20
add	esp, 8
mov	[ebp+var_C], eax
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	[ebp+var_C], edx
jle	short loc_7F75EB
jmp	short loc_7F765F

loc_7F75EB:
lea	eax, [ebp+var_4]
mov	[ebp+var_10], eax
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
movzx	eax, byte ptr [edx]
mov	ecx, [ebp+arg_0]
movzx	edx, byte ptr [ecx+eax+4Ch]
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
lea	edx, [edx+ecx-3]
mov	eax, [ebp+arg_4]
mov	[eax], edx
jmp	short loc_7F762D

loc_7F7611:
mov	ecx, [ebp+arg_C]
mov	edx, [ebp+arg_10]
sub	edx, [ecx]
cmp	[ebp+var_C], edx
jle	short loc_7F7620
jmp	short loc_7F765F

loc_7F7620:
mov	eax, [ebp+arg_4]
mov	ecx, [eax]
add	ecx, 1
mov	edx, [ebp+arg_4]
mov	[edx], ecx

loc_7F762D:
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
mov	edx, [ebp+var_10]
mov	al, [edx]
mov	[ecx], al
mov	ecx, [ebp+arg_C]
mov	edx, [ecx]
add	edx, 1
mov	eax, [ebp+arg_C]
mov	[eax], edx
mov	ecx, [ebp+var_10]
add	ecx, 1
mov	[ebp+var_10], ecx
mov	edx, [ebp+var_C]
sub	edx, 1
mov	[ebp+var_C], edx
jnz	short loc_7F762D
jmp	loc_7F756C

loc_7F765F:
mov	esp, ebp
pop	ebp
retn
sub_7F7560 endp

align 10h


; Attributes: bp-based frame

sub_7F7670 proc	near

var_8= word ptr	-8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax

loc_7F767C:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
cmp	edx, [ebp+arg_8]
jz	loc_7F7724
mov	eax, [ebp+arg_C]
mov	ecx, [eax]
cmp	ecx, [ebp+arg_10]
jz	loc_7F7724
mov	edx, [ebp+arg_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+var_4]
mov	ax, [edx+ecx*2+178h]
mov	[ebp+var_8], ax
movzx	ecx, [ebp+var_8]
test	ecx, ecx
jnz	short loc_7F76F9
mov	edx, [ebp+arg_4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx+174h]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax+170h]
call	ecx
add	esp, 8
mov	[ebp+var_8], ax
mov	edx, [ebp+arg_4]
mov	eax, [edx]
movzx	ecx, byte ptr [eax]
mov	edx, [ebp+arg_0]
movzx	eax, byte ptr [edx+ecx+4Ch]
mov	ecx, [ebp+arg_4]
mov	edx, [ecx]
lea	eax, [eax+edx-3]
mov	ecx, [ebp+arg_4]
mov	[ecx], eax
jmp	short loc_7F7706

loc_7F76F9:
mov	edx, [ebp+arg_4]
mov	eax, [edx]
add	eax, 1
mov	ecx, [ebp+arg_4]
mov	[ecx], eax

loc_7F7706:
mov	edx, [ebp+arg_C]
mov	eax, [edx]
mov	cx, [ebp+var_8]
mov	[eax], cx
mov	edx, [ebp+arg_C]
mov	eax, [edx]
add	eax, 2
mov	ecx, [ebp+arg_C]
mov	[ecx], eax
jmp	loc_7F767C

loc_7F7724:
mov	esp, ebp
pop	ebp
retn
sub_7F7670 endp

align 10h


; Attributes: bp-based frame

sub_7F7730 proc	near
push	ebp
mov	ebp, esp
mov	eax, offset off_1458068
pop	ebp
retn
sub_7F7730 endp

align 10h


; Attributes: bp-based frame

sub_7F7740 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
push	eax
call	sub_7F77C0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0FFFFFFFFh
jnz	short loc_7F775D
xor	eax, eax
jmp	short loc_7F7799

loc_7F775D:
mov	ecx, [ebp+arg_0]
mov	dl, byte ptr [ebp+var_4]
mov	[ecx+49h], dl
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F78B0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+4], offset sub_7F7BE0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+34h], offset sub_7F77A0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+4Ch], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	eax, 1

loc_7F7799:
mov	esp, ebp
pop	ebp
retn
sub_7F7740 endp

align 10h


; Attributes: bp-based frame

sub_7F77A0 proc	near

arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
push	offset off_1457D88
call	sub_7EAB30
add	esp, 10h
pop	ebp
retn
sub_7F77A0 endp

align 10h


; Attributes: bp-based frame

sub_7F77C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
cmp	[ebp+arg_0], 0
jnz	short loc_7F77D1
mov	eax, 6
jmp	short loc_7F780E

loc_7F77D1:
mov	[ebp+var_4], 0
jmp	short loc_7F77E3

loc_7F77DA:
mov	eax, [ebp+var_4]
add	eax, 1
mov	[ebp+var_4], eax

loc_7F77E3:
cmp	[ebp+var_4], 6
jge	short loc_7F780B
mov	ecx, [ebp+var_4]
mov	edx, ds:off_14590B0[ecx*4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F7820
add	esp, 8
test	eax, eax
jz	short loc_7F7809
mov	eax, [ebp+var_4]
jmp	short loc_7F780E

loc_7F7809:
jmp	short loc_7F77DA

loc_7F780B:
or	eax, 0FFFFFFFFh

loc_7F780E:
mov	esp, ebp
pop	ebp
retn
sub_7F77C0 endp

align 10h


; Attributes: bp-based frame

sub_7F7820 proc	near

var_2= byte ptr	-2
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx

loc_7F7824:
mov	eax, [ebp+arg_0]
mov	cl, [eax]
mov	[ebp+var_1], cl
mov	edx, [ebp+arg_0]
add	edx, 1
mov	[ebp+arg_0], edx
mov	eax, [ebp+arg_4]
mov	cl, [eax]
mov	[ebp+var_2], cl
mov	edx, [ebp+arg_4]
add	edx, 1
mov	[ebp+arg_4], edx
movsx	eax, [ebp+var_1]
cmp	eax, 61h
jl	short loc_7F7862
movsx	ecx, [ebp+var_1]
cmp	ecx, 7Ah
jg	short loc_7F7862
movsx	edx, [ebp+var_1]
sub	edx, 20h
mov	[ebp+var_1], dl

loc_7F7862:
movsx	eax, [ebp+var_2]
cmp	eax, 61h
jl	short loc_7F787E
movsx	ecx, [ebp+var_2]
cmp	ecx, 7Ah
jg	short loc_7F787E
movsx	edx, [ebp+var_2]
sub	edx, 20h
mov	[ebp+var_2], dl

loc_7F787E:
movsx	eax, [ebp+var_1]
movsx	ecx, [ebp+var_2]
cmp	eax, ecx
jz	short loc_7F788E
xor	eax, eax
jmp	short loc_7F789F

loc_7F788E:
movsx	edx, [ebp+var_1]
test	edx, edx
jnz	short loc_7F7898
jmp	short loc_7F789A

loc_7F7898:
jmp	short loc_7F7824

loc_7F789A:
mov	eax, 1

loc_7F789F:
mov	esp, ebp
pop	ebp
retn
sub_7F7820 endp

align 10h


; Attributes: bp-based frame

sub_7F78B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
push	offset off_14590C8
call	sub_7F78E0
add	esp, 18h
pop	ebp
retn
sub_7F78B0 endp

align 10h


; Attributes: bp-based frame

sub_7F78E0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch

push	ebp
mov	ebp, esp
sub	esp, 14h
mov	eax, [ebp+arg_C]
cmp	eax, [ebp+arg_10]
jnz	short loc_7F78F8
mov	eax, 0FFFFFFFCh
jmp	loc_7F7BD5

loc_7F78F8:
mov	ecx, [ebp+arg_4]
mov	edx, [ecx+4Ch]
mov	[ebp+var_4], edx
mov	eax, [ebp+arg_C]
add	eax, 1
cmp	eax, [ebp+arg_10]
jnz	short loc_7F7988
mov	ecx, [ebp+arg_4]
mov	dl, [ecx+49h]
mov	[ebp+var_C], dl
cmp	[ebp+var_C], 3
jl	short loc_7F792B
cmp	[ebp+var_C], 5
jle	short loc_7F7923
jmp	short loc_7F792B

loc_7F7923:
or	eax, 0FFFFFFFFh
jmp	loc_7F7BD5

loc_7F792B:
mov	eax, [ebp+arg_C]
movzx	ecx, byte ptr [eax]
mov	[ebp+var_10], ecx
cmp	[ebp+var_10], 0EFh
jg	short loc_7F7954
cmp	[ebp+var_10], 0EFh
jz	short loc_7F7968
cmp	[ebp+var_10], 0
jz	short loc_7F797B
cmp	[ebp+var_10], 3Ch
jz	short loc_7F797B
jmp	short loc_7F7983

loc_7F7954:
cmp	[ebp+var_10], 0FEh
jl	short loc_7F7983
cmp	[ebp+var_10], 0FFh
jle	short loc_7F7968
jmp	short loc_7F7983

loc_7F7968:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+49h]
test	eax, eax
jnz	short loc_7F797B
cmp	[ebp+arg_8], 1
jnz	short loc_7F797B
jmp	short loc_7F7983

loc_7F797B:
or	eax, 0FFFFFFFFh
jmp	loc_7F7BD5

loc_7F7983:
jmp	loc_7F7BA1

loc_7F7988:
mov	ecx, [ebp+arg_C]
movzx	edx, byte ptr [ecx]
shl	edx, 8
mov	eax, [ebp+arg_C]
movzx	ecx, byte ptr [eax+1]
or	edx, ecx
mov	[ebp+var_14], edx
cmp	[ebp+var_14], 0FEFFh
jg	short loc_7F79CA
cmp	[ebp+var_14], 0FEFFh
jz	short loc_7F79DC
cmp	[ebp+var_14], 3C00h
jz	short loc_7F7A12
cmp	[ebp+var_14], 0EFBBh
jz	loc_7F7A9D
jmp	loc_7F7B10

loc_7F79CA:
cmp	[ebp+var_14], 0FFFEh
jz	loc_7F7A67
jmp	loc_7F7B10

loc_7F79DC:
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+49h]
test	eax, eax
jnz	short loc_7F79F2
cmp	[ebp+arg_8], 1
jnz	short loc_7F79F2
jmp	loc_7F7BA1

loc_7F79F2:
mov	ecx, [ebp+arg_C]
add	ecx, 2
mov	edx, [ebp+arg_14]
mov	[edx], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+10h]
mov	[eax], edx
mov	eax, 0Eh
jmp	loc_7F7BD5

loc_7F7A12:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+49h]
cmp	ecx, 4
jz	short loc_7F7A2A
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+49h]
cmp	eax, 3
jnz	short loc_7F7A35

loc_7F7A2A:
cmp	[ebp+arg_8], 1
jnz	short loc_7F7A35
jmp	loc_7F7BA1

loc_7F7A35:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+14h]
mov	[ecx], eax
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_8]
mov	eax, [ecx+edx*4]
call	eax
add	esp, 10h
jmp	loc_7F7BD5

loc_7F7A67:
mov	ecx, [ebp+arg_4]
movsx	edx, byte ptr [ecx+49h]
test	edx, edx
jnz	short loc_7F7A7D
cmp	[ebp+arg_8], 1
jnz	short loc_7F7A7D
jmp	loc_7F7BA1

loc_7F7A7D:
mov	eax, [ebp+arg_C]
add	eax, 2
mov	ecx, [ebp+arg_14]
mov	[ecx], eax
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+14h]
mov	[edx], ecx
mov	eax, 0Eh
jmp	loc_7F7BD5

loc_7F7A9D:
cmp	[ebp+arg_8], 1
jnz	short loc_7F7ACA
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+49h]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0
jz	short loc_7F7AC5
cmp	[ebp+var_8], 4
jz	short loc_7F7AC5
cmp	[ebp+var_8], 5
jz	short loc_7F7AC5
cmp	[ebp+var_8], 3
jnz	short loc_7F7ACA

loc_7F7AC5:
jmp	loc_7F7BA1

loc_7F7ACA:
mov	ecx, [ebp+arg_C]
add	ecx, 2
cmp	ecx, [ebp+arg_10]
jnz	short loc_7F7ADD
or	eax, 0FFFFFFFFh
jmp	loc_7F7BD5

loc_7F7ADD:
mov	edx, [ebp+arg_C]
movzx	eax, byte ptr [edx+2]
cmp	eax, 0BFh
jnz	short loc_7F7B0B
mov	ecx, [ebp+arg_C]
add	ecx, 3
mov	edx, [ebp+arg_14]
mov	[edx], ecx
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+8]
mov	[eax], edx
mov	eax, 0Eh
jmp	loc_7F7BD5

loc_7F7B0B:
jmp	loc_7F7BA1

loc_7F7B10:
mov	eax, [ebp+arg_C]
movsx	ecx, byte ptr [eax]
test	ecx, ecx
jnz	short loc_7F7B5F
cmp	[ebp+arg_8], 1
jnz	short loc_7F7B2E
mov	edx, [ebp+arg_4]
movsx	eax, byte ptr [edx+49h]
cmp	eax, 5
jnz	short loc_7F7B2E
jmp	short loc_7F7BA1

loc_7F7B2E:
mov	ecx, [ebp+var_4]
mov	edx, [ebp+arg_0]
mov	eax, [edx+10h]
mov	[ecx], eax
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
mov	edx, [ebp+arg_8]
mov	eax, [ecx+edx*4]
call	eax
add	esp, 10h
jmp	short loc_7F7BD5
jmp	short loc_7F7BA1

loc_7F7B5F:
mov	ecx, [ebp+arg_C]
movsx	edx, byte ptr [ecx+1]
test	edx, edx
jnz	short loc_7F7BA1
cmp	[ebp+arg_8], 1
jnz	short loc_7F7B72
jmp	short loc_7F7BA1

loc_7F7B72:
mov	eax, [ebp+var_4]
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+14h]
mov	[eax], edx
mov	eax, [ebp+arg_14]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+var_4]
mov	ecx, [eax]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
mov	ecx, [ebp+arg_8]
mov	edx, [eax+ecx*4]
call	edx
add	esp, 10h
jmp	short loc_7F7BD5

loc_7F7BA1:
mov	eax, [ebp+arg_4]
movsx	ecx, byte ptr [eax+49h]
mov	edx, [ebp+var_4]
mov	eax, [ebp+arg_0]
mov	ecx, [eax+ecx*4]
mov	[edx], ecx
mov	edx, [ebp+arg_14]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+var_4]
mov	eax, [edx]
push	eax
mov	ecx, [ebp+var_4]
mov	edx, [ecx]
mov	eax, [ebp+arg_8]
mov	ecx, [edx+eax*4]
call	ecx
add	esp, 10h

loc_7F7BD5:
mov	esp, ebp
pop	ebp
retn
sub_7F78E0 endp

align 10h


; Attributes: bp-based frame

sub_7F7BE0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
push	1
mov	eax, [ebp+arg_0]
push	eax
push	offset off_14590C8
call	sub_7F78E0
add	esp, 18h
pop	ebp
retn
sub_7F7BE0 endp

align 10h


; Attributes: bp-based frame

sub_7F7C10 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_24]
push	eax
mov	ecx, [ebp+arg_20]
push	ecx
mov	edx, [ebp+arg_1C]
push	edx
mov	eax, [ebp+arg_18]
push	eax
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
push	offset sub_7F8290
call	sub_7F7C50
add	esp, 2Ch
pop	ebp
retn
sub_7F7C10 endp

align 10h


; Attributes: bp-based frame

sub_7F7C50 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch
arg_28=	dword ptr  30h

push	ebp
mov	ebp, esp
sub	esp, 10h
mov	[ebp+var_C], 0
mov	[ebp+var_8], 0
mov	[ebp+var_4], 0
mov	eax, [ebp+arg_8]
mov	ecx, [eax+44h]
imul	ecx, 5
add	ecx, [ebp+arg_C]
mov	[ebp+arg_C], ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+44h]
shl	eax, 1
mov	ecx, [ebp+arg_10]
sub	ecx, eax
mov	[ebp+arg_10], ecx
lea	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_7F8000
add	esp, 1Ch
test	eax, eax
jz	short loc_7F7CB8
cmp	[ebp+var_8], 0
jnz	short loc_7F7CC7

loc_7F7CB8:
mov	eax, [ebp+arg_14]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F7F47

loc_7F7CC7:		; "version"
push	offset aVersion
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+1Ch]
call	eax
add	esp, 10h
test	eax, eax
jnz	short loc_7F7CFE
cmp	[ebp+arg_4], 0
jnz	short loc_7F7CFC
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+var_8]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F7F47

loc_7F7CFC:
jmp	short loc_7F7D76

loc_7F7CFE:
cmp	[ebp+arg_18], 0
jz	short loc_7F7D0C
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+var_C]
mov	[eax], ecx

loc_7F7D0C:
cmp	[ebp+arg_1C], 0
jz	short loc_7F7D1A
mov	edx, [ebp+arg_1C]
mov	eax, [ebp+arg_C]
mov	[edx], eax

loc_7F7D1A:
lea	ecx, [ebp+arg_C]
push	ecx
lea	edx, [ebp+var_C]
push	edx
lea	eax, [ebp+var_4]
push	eax
lea	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_7F8000
add	esp, 1Ch
test	eax, eax
jnz	short loc_7F7D51
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_C]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F7F47

loc_7F7D51:
cmp	[ebp+var_8], 0
jnz	short loc_7F7D76
cmp	[ebp+arg_4], 0
jz	short loc_7F7D6C
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F7F47

loc_7F7D6C:
mov	eax, 1
jmp	loc_7F7F47

loc_7F7D76:		; "encoding"
push	offset aEncoding
mov	eax, [ebp+var_4]
push	eax
mov	ecx, [ebp+var_8]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_8]
mov	ecx, [eax+1Ch]
call	ecx
add	esp, 10h
test	eax, eax
jz	loc_7F7E50
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
call	sub_7F7F50
add	esp, 0Ch
mov	[ebp+var_10], eax
cmp	[ebp+var_10], 61h
jl	short loc_7F7DBD
cmp	[ebp+var_10], 7Ah
jle	short loc_7F7DD8

loc_7F7DBD:
cmp	[ebp+var_10], 41h
jl	short loc_7F7DC9
cmp	[ebp+var_10], 5Ah
jle	short loc_7F7DD8

loc_7F7DC9:
mov	edx, [ebp+arg_14]
mov	eax, [ebp+var_C]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F7F47

loc_7F7DD8:
cmp	[ebp+arg_20], 0
jz	short loc_7F7DE6
mov	ecx, [ebp+arg_20]
mov	edx, [ebp+var_C]
mov	[ecx], edx

loc_7F7DE6:
cmp	[ebp+arg_24], 0
jz	short loc_7F7E09
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_C]
sub	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
call	[ebp+arg_0]
add	esp, 0Ch
mov	ecx, [ebp+arg_24]
mov	[ecx], eax

loc_7F7E09:
lea	edx, [ebp+arg_C]
push	edx
lea	eax, [ebp+var_C]
push	eax
lea	ecx, [ebp+var_4]
push	ecx
lea	edx, [ebp+var_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
call	sub_7F8000
add	esp, 1Ch
test	eax, eax
jnz	short loc_7F7E40
mov	eax, [ebp+arg_14]
mov	ecx, [ebp+arg_C]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F7F47

loc_7F7E40:
cmp	[ebp+var_8], 0
jnz	short loc_7F7E50
mov	eax, 1
jmp	loc_7F7F47

loc_7F7E50:		; "standalone"
push	offset aStandalone
mov	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+var_8]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+1Ch]
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_7F7E76
cmp	[ebp+arg_4], 0
jz	short loc_7F7E85

loc_7F7E76:
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+var_8]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F7F47

loc_7F7E85:		; "yes"
push	offset aYes
mov	eax, [ebp+arg_8]
mov	ecx, [ebp+arg_C]
sub	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+var_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_8]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F7EBC
cmp	[ebp+arg_28], 0
jz	short loc_7F7EBA
mov	eax, [ebp+arg_28]
mov	dword ptr [eax], 1

loc_7F7EBA:
jmp	short loc_7F7EFF

loc_7F7EBC:		; "no"
push	offset aNo
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_C]
sub	edx, [ecx+44h]
push	edx
mov	eax, [ebp+var_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_8]
mov	eax, [edx+1Ch]
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_7F7EF3
cmp	[ebp+arg_28], 0
jz	short loc_7F7EF1
mov	ecx, [ebp+arg_28]
mov	dword ptr [ecx], 0

loc_7F7EF1:
jmp	short loc_7F7EFF

loc_7F7EF3:
mov	edx, [ebp+arg_14]
mov	eax, [ebp+var_C]
mov	[edx], eax
xor	eax, eax
jmp	short loc_7F7F47

loc_7F7EFF:
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
call	sub_7F7F50
add	esp, 0Ch
push	eax
call	sub_7F7FA0
add	esp, 4
test	eax, eax
jz	short loc_7F7F2E
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_C]
add	edx, [ecx+44h]
mov	[ebp+arg_C], edx
jmp	short loc_7F7EFF

loc_7F7F2E:
mov	eax, [ebp+arg_C]
cmp	eax, [ebp+arg_10]
jz	short loc_7F7F42
mov	ecx, [ebp+arg_14]
mov	edx, [ebp+arg_C]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F7F47

loc_7F7F42:
mov	eax, 1

loc_7F7F47:
mov	esp, ebp
pop	ebp
retn
sub_7F7C50 endp

align 10h


; Attributes: bp-based frame

sub_7F7F50 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= byte ptr	 0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 8
lea	eax, [ebp+var_5]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 1
push	ecx
lea	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 14h
mov	edx, [ebp+var_4]
lea	eax, [ebp+var_5]
cmp	edx, eax
jnz	short loc_7F7F8F
or	eax, 0FFFFFFFFh
jmp	short loc_7F7F93
jmp	short loc_7F7F93

loc_7F7F8F:
movsx	eax, [ebp+var_5]

loc_7F7F93:
mov	esp, ebp
pop	ebp
retn
sub_7F7F50 endp

align 10h


; Attributes: bp-based frame

sub_7F7FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_0]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 9
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 17h ; switch 24 cases
ja	short loc_7F7FD1 ; default
			; jumptable 007F7FC3 cases 2,3,5-22
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F7FE0[edx]
jmp	ds:off_7F7FD8[eax*4] ; switch jump

loc_7F7FCA:		; jumptable 007F7FC3 cases 0,1,4,23
mov	eax, 1
jmp	short loc_7F7FD3

loc_7F7FD1:		; default
xor	eax, eax	; jumptable 007F7FC3 cases 2,3,5-22

loc_7F7FD3:
mov	esp, ebp
pop	ebp
retn
sub_7F7FA0 endp

align 4
off_7F7FD8 dd offset loc_7F7FCA	; jump table for switch	statement
dd offset loc_7F7FD1
byte_7F7FE0 db	    0,	   0,	  1,	 1 ; indirect table for	switch statement
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     0
align 10h


; Attributes: bp-based frame

sub_7F8000 proc	near

var_8= dword ptr -8
var_1= byte ptr	-1
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F8021
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx], 0
mov	eax, 1
jmp	loc_7F827D

loc_7F8021:
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7F7F50
add	esp, 0Ch
push	eax
call	sub_7F7FA0
add	esp, 4
test	eax, eax
jnz	short loc_7F8051
mov	edx, [ebp+arg_18]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F827D

loc_7F8051:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
add	edx, [ecx+44h]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F7F50
add	esp, 0Ch
push	eax
call	sub_7F7FA0
add	esp, 4
test	eax, eax
jnz	short loc_7F8051
mov	eax, [ebp+arg_4]
cmp	eax, [ebp+arg_8]
jnz	short loc_7F8099
mov	ecx, [ebp+arg_C]
mov	dword ptr [ecx], 0
mov	eax, 1
jmp	loc_7F827D

loc_7F8099:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_4]
mov	[edx], eax

loc_7F80A1:
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F7F50
add	esp, 0Ch
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0FFFFFFFFh
jnz	short loc_7F80CD
mov	ecx, [ebp+arg_18]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	loc_7F827D

loc_7F80CD:
cmp	[ebp+var_8], 3Dh
jnz	short loc_7F80DD
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
jmp	short loc_7F8150

loc_7F80DD:
mov	edx, [ebp+var_8]
push	edx
call	sub_7F7FA0
add	esp, 4
test	eax, eax
jz	short loc_7F813F
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx

loc_7F80F5:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+arg_4]
add	eax, [edx+44h]
mov	[ebp+arg_4], eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F7F50
add	esp, 0Ch
mov	[ebp+var_8], eax
mov	ecx, [ebp+var_8]
push	ecx
call	sub_7F7FA0
add	esp, 4
test	eax, eax
jnz	short loc_7F80F5
cmp	[ebp+var_8], 3Dh
jz	short loc_7F813D
mov	edx, [ebp+arg_18]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F827D

loc_7F813D:
jmp	short loc_7F8150

loc_7F813F:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
add	edx, [ecx+44h]
mov	[ebp+arg_4], edx
jmp	loc_7F80A1

loc_7F8150:
mov	eax, [ebp+arg_C]
mov	ecx, [ebp+arg_4]
cmp	ecx, [eax]
jnz	short loc_7F8169
mov	edx, [ebp+arg_18]
mov	eax, [ebp+arg_4]
mov	[edx], eax
xor	eax, eax
jmp	loc_7F827D

loc_7F8169:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
add	edx, [ecx+44h]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F7F50
add	esp, 0Ch
mov	[ebp+var_8], eax

loc_7F818C:
mov	eax, [ebp+var_8]
push	eax
call	sub_7F7FA0
add	esp, 4
test	eax, eax
jz	short loc_7F81C1
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
add	edx, [ecx+44h]
mov	[ebp+arg_4], edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F7F50
add	esp, 0Ch
mov	[ebp+var_8], eax
jmp	short loc_7F818C

loc_7F81C1:
cmp	[ebp+var_8], 22h
jz	short loc_7F81DC
cmp	[ebp+var_8], 27h
jz	short loc_7F81DC
mov	eax, [ebp+arg_18]
mov	ecx, [ebp+arg_4]
mov	[eax], ecx
xor	eax, eax
jmp	loc_7F827D

loc_7F81DC:
mov	dl, byte ptr [ebp+var_8]
mov	[ebp+var_1], dl
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
add	ecx, [eax+44h]
mov	[ebp+arg_4], ecx
mov	edx, [ebp+arg_14]
mov	eax, [ebp+arg_4]
mov	[edx], eax
jmp	short loc_7F8204

loc_7F81F8:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+arg_4]
add	edx, [ecx+44h]
mov	[ebp+arg_4], edx

loc_7F8204:
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F7F50
add	esp, 0Ch
mov	[ebp+var_8], eax
movsx	eax, [ebp+var_1]
cmp	[ebp+var_8], eax
jnz	short loc_7F8226
jmp	short loc_7F826A

loc_7F8226:
cmp	[ebp+var_8], 61h
jl	short loc_7F8232
cmp	[ebp+var_8], 7Ah
jle	short loc_7F8268

loc_7F8232:
cmp	[ebp+var_8], 41h
jl	short loc_7F823E
cmp	[ebp+var_8], 5Ah
jle	short loc_7F8268

loc_7F823E:
cmp	[ebp+var_8], 30h
jl	short loc_7F824A
cmp	[ebp+var_8], 39h
jle	short loc_7F8268

loc_7F824A:
cmp	[ebp+var_8], 2Eh
jz	short loc_7F8268
cmp	[ebp+var_8], 2Dh
jz	short loc_7F8268
cmp	[ebp+var_8], 5Fh
jz	short loc_7F8268
mov	ecx, [ebp+arg_18]
mov	edx, [ebp+arg_4]
mov	[ecx], edx
xor	eax, eax
jmp	short loc_7F827D

loc_7F8268:
jmp	short loc_7F81F8

loc_7F826A:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
add	ecx, [eax+44h]
mov	edx, [ebp+arg_18]
mov	[edx], ecx
mov	eax, 1

loc_7F827D:
mov	esp, ebp
pop	ebp
retn
sub_7F8000 endp

align 10h


; Attributes: bp-based frame

sub_7F8290 proc	near

var_90=	byte ptr -90h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	eax, dword_167FD30
xor	eax, ebp
mov	[ebp+var_C], eax
lea	eax, [ebp+var_90]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 7Fh
push	ecx
lea	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 14h
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	short loc_7F82DA
xor	eax, eax
jmp	short loc_7F832C

loc_7F82DA:
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
push	offset aUtf16	; "UTF-16"
lea	ecx, [ebp+var_90]
push	ecx
call	sub_7F7820
add	esp, 8
test	eax, eax
jz	short loc_7F8306
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+44h], 2
jnz	short loc_7F8306
mov	eax, [ebp+arg_0]
jmp	short loc_7F832C

loc_7F8306:
lea	eax, [ebp+var_90]
push	eax
call	sub_7F77C0
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0FFFFFFFFh
jnz	short loc_7F8322
xor	eax, eax
jmp	short loc_7F832C

loc_7F8322:
mov	ecx, [ebp+var_8]
mov	eax, ds:off_14590C8[ecx*4]

loc_7F832C:
mov	ecx, [ebp+var_C]
xor	ecx, ebp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_7F8290 endp

align 10h


; Attributes: bp-based frame

sub_7F8340 proc	near
push	ebp
mov	ebp, esp
mov	eax, offset off_1457EF8
pop	ebp
retn
sub_7F8340 endp

align 10h


; Attributes: bp-based frame

sub_7F8350 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_8]
push	eax
call	sub_7F77C0
add	esp, 4
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0FFFFFFFFh
jnz	short loc_7F836D
xor	eax, eax
jmp	short loc_7F83A9

loc_7F836D:
mov	ecx, [ebp+arg_0]
mov	dl, byte ptr [ebp+var_4]
mov	[ecx+49h], dl
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F83B0
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+4], offset sub_7F83E0
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+34h], offset sub_7F77A0
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+arg_4]
mov	[eax+4Ch], ecx
mov	edx, [ebp+arg_4]
mov	eax, [ebp+arg_0]
mov	[edx], eax
mov	eax, 1

loc_7F83A9:
mov	esp, ebp
pop	ebp
retn
sub_7F8350 endp

align 10h


; Attributes: bp-based frame

sub_7F83B0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
push	0
mov	eax, [ebp+arg_0]
push	eax
push	offset off_14590E4
call	sub_7F78E0
add	esp, 18h
pop	ebp
retn
sub_7F83B0 endp

align 10h


; Attributes: bp-based frame

sub_7F83E0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
push	1
mov	eax, [ebp+arg_0]
push	eax
push	offset off_14590E4
call	sub_7F78E0
add	esp, 18h
pop	ebp
retn
sub_7F83E0 endp

align 10h


; Attributes: bp-based frame

sub_7F8410 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h
arg_14=	dword ptr  1Ch
arg_18=	dword ptr  20h
arg_1C=	dword ptr  24h
arg_20=	dword ptr  28h
arg_24=	dword ptr  2Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_24]
push	eax
mov	ecx, [ebp+arg_20]
push	ecx
mov	edx, [ebp+arg_1C]
push	edx
mov	eax, [ebp+arg_18]
push	eax
mov	ecx, [ebp+arg_14]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
push	offset sub_7F8450
call	sub_7F7C50
add	esp, 2Ch
pop	ebp
retn
sub_7F8410 endp

align 10h


; Attributes: bp-based frame

sub_7F8450 proc	near

var_90=	byte ptr -90h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
sub	esp, 90h
mov	eax, dword_167FD30
xor	eax, ebp
mov	[ebp+var_C], eax
lea	eax, [ebp+var_90]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 7Fh
push	ecx
lea	edx, [ebp+var_4]
push	edx
mov	eax, [ebp+arg_8]
push	eax
lea	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
mov	eax, [ebp+arg_0]
mov	ecx, [eax+3Ch]
call	ecx
add	esp, 14h
mov	edx, [ebp+arg_4]
cmp	edx, [ebp+arg_8]
jz	short loc_7F849A
xor	eax, eax
jmp	short loc_7F84EC

loc_7F849A:
mov	eax, [ebp+var_4]
mov	byte ptr [eax],	0
push	offset aUtf16	; "UTF-16"
lea	ecx, [ebp+var_90]
push	ecx
call	sub_7F7820
add	esp, 8
test	eax, eax
jz	short loc_7F84C6
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+44h], 2
jnz	short loc_7F84C6
mov	eax, [ebp+arg_0]
jmp	short loc_7F84EC

loc_7F84C6:
lea	eax, [ebp+var_90]
push	eax
call	sub_7F77C0
add	esp, 4
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0FFFFFFFFh
jnz	short loc_7F84E2
xor	eax, eax
jmp	short loc_7F84EC

loc_7F84E2:
mov	ecx, [ebp+var_8]
mov	eax, ds:off_14590E4[ecx*4]

loc_7F84EC:
mov	ecx, [ebp+var_C]
xor	ecx, ebp
call	sub_7999A3
mov	esp, ebp
pop	ebp
retn
sub_7F8450 endp

align 10h


; Attributes: bp-based frame

sub_7F8500 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7F7040
add	esp, 10h
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0
jz	short loc_7F852F
mov	ecx, [ebp+var_4]
mov	byte ptr [ecx+86h], 17h

loc_7F852F:
mov	eax, [ebp+var_4]
mov	esp, ebp
pop	ebp
retn
sub_7F8500 endp

align 10h


; Attributes: bp-based frame

sub_7F8540 proc	near

arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F8570
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+10h], 1
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+0Ch], 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+14h], 0
pop	ebp
retn
sub_7F8540 endp

align 10h


; Attributes: bp-based frame

sub_7F8570 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Bh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 12h ; switch 19 cases
ja	loc_7F862D	; default
			; jumptable 007F8597 cases 6-17
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F8664[edx]
jmp	ds:off_7F8644[eax*4] ; switch jump

loc_7F859E:		; jumptable 007F8597 case 4
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8680
xor	eax, eax
jmp	loc_7F863D

loc_7F85AE:		; jumptable 007F8597 case 1
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F8680
mov	eax, 1
jmp	short loc_7F863D

loc_7F85BE:		; jumptable 007F8597 case 0
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F8680
mov	eax, 37h
jmp	short loc_7F863D

loc_7F85CE:		; jumptable 007F8597 case 2
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8680
mov	eax, 38h
jmp	short loc_7F863D

loc_7F85DE:		; jumptable 007F8597 case 3
xor	eax, eax
jmp	short loc_7F863D

loc_7F85E2:		; jumptable 007F8597 case 5
push	offset aDoctype
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_10]
mov	ecx, [eax+44h]
mov	edx, [ebp+arg_8]
lea	eax, [edx+ecx*2]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+1Ch]
call	eax
add	esp, 10h
test	eax, eax
jnz	short loc_7F860D
jmp	short loc_7F862D ; default
			; jumptable 007F8597 cases 6-17

loc_7F860D:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8750
mov	eax, 3
jmp	short loc_7F863D

loc_7F861D:		; jumptable 007F8597 case 18
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7FA090
mov	eax, 2
jmp	short loc_7F863D

loc_7F862D:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F8597 cases 6-17
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F863D:
mov	esp, ebp
pop	ebp
retn
sub_7F8570 endp

align 4
off_7F8644 dd offset loc_7F85BE	; jump table for switch	statement
dd offset loc_7F85AE
dd offset loc_7F85CE
dd offset loc_7F85DE
dd offset loc_7F859E
dd offset loc_7F85E2
dd offset loc_7F861D
dd offset loc_7F862D
byte_7F8664 db	    0,	   1,	  2,	 3 ; indirect table for	switch statement
db	4,     5,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     6
align 10h


; Attributes: bp-based frame

sub_7F8680 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Bh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 12h ; switch 19 cases
ja	short loc_7F870B ; default
			; jumptable 007F86A3 cases 1,6-17
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F873C[edx]
jmp	ds:off_7F8720[eax*4] ; switch jump

loc_7F86AA:		; jumptable 007F86A3 case 4
xor	eax, eax
jmp	short loc_7F871B

loc_7F86AE:		; jumptable 007F86A3 case 0
mov	eax, 37h
jmp	short loc_7F871B

loc_7F86B5:		; jumptable 007F86A3 case 2
mov	eax, 38h
jmp	short loc_7F871B

loc_7F86BC:		; jumptable 007F86A3 case 3
xor	eax, eax
jmp	short loc_7F871B

loc_7F86C0:		; jumptable 007F86A3 case 5
push	offset aDoctype
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+44h]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jnz	short loc_7F86EB
jmp	short loc_7F870B ; default
			; jumptable 007F86A3 cases 1,6-17

loc_7F86EB:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F8750
mov	eax, 3
jmp	short loc_7F871B

loc_7F86FB:		; jumptable 007F86A3 case 18
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA090
mov	eax, 2
jmp	short loc_7F871B

loc_7F870B:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F86A3 cases 1,6-17
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F871B:
mov	esp, ebp
pop	ebp
retn
sub_7F8680 endp

align 10h
off_7F8720 dd offset loc_7F86AE	; jump table for switch	statement
dd offset loc_7F86B5
dd offset loc_7F86BC
dd offset loc_7F86AA
dd offset loc_7F86C0
dd offset loc_7F86FB
dd offset loc_7F870B
byte_7F873C db	    0,	   6,	  1,	 2 ; indirect table for	switch statement
db	3,     4,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     5
align 10h


; Attributes: bp-based frame

sub_7F8750 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F876E
cmp	[ebp+var_4], 12h
jz	short loc_7F8775
cmp	[ebp+var_4], 29h
jz	short loc_7F8775
jmp	short loc_7F8785

loc_7F876E:
mov	eax, 3
jmp	short loc_7F8795

loc_7F8775:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F87A0
mov	eax, 4
jmp	short loc_7F8795

loc_7F8785:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F8795:
mov	esp, ebp
pop	ebp
retn
sub_7F8750 endp

align 10h


; Attributes: bp-based frame

sub_7F87A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Fh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 0Ah ; switch 11 cases
ja	loc_7F885B	; default
			; jumptable 007F87C7 cases 1,4-9
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F8884[edx]
jmp	ds:off_7F8870[eax*4] ; switch jump

loc_7F87CE:		; jumptable 007F87C7 case 0
mov	eax, 3
jmp	loc_7F886B

loc_7F87D8:		; jumptable 007F87C7 case 10
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8A20
mov	eax, 7
jmp	loc_7F886B

loc_7F87EB:		; jumptable 007F87C7 case 2
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F8890
mov	eax, 8
jmp	short loc_7F886B

loc_7F87FB:		; jumptable 007F87C7 case 3
push	offset aSystem_0
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_10]
mov	ecx, [eax+1Ch]
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_7F882B
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F8970
mov	eax, 3
jmp	short loc_7F886B

loc_7F882B:		; "PUBLIC"
push	offset aPublic_0
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_8]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_10]
mov	ecx, [eax+1Ch]
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_7F885B ; default
			; jumptable 007F87C7 cases 1,4-9
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F8920
mov	eax, 3
jmp	short loc_7F886B

loc_7F885B:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F87C7 cases 1,4-9
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F886B:
mov	esp, ebp
pop	ebp
retn
sub_7F87A0 endp

align 10h
off_7F8870 dd offset loc_7F87CE	; jump table for switch	statement
dd offset loc_7F87EB
dd offset loc_7F87FB
dd offset loc_7F87D8
dd offset loc_7F885B
byte_7F8884 db	    0,	   4,	  1,	 2 ; indirect table for	switch statement
db	4,     4,     4,     4
db	4,     4,     3
align 10h


; Attributes: bp-based frame

sub_7F8890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Bh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 12h ; switch 19 cases
ja	short loc_7F88DC ; default
			; jumptable 007F88B3 cases 1,3,5-17
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F8904[edx]
jmp	ds:off_7F88F0[eax*4] ; switch jump

loc_7F88BA:		; jumptable 007F88B3 case 4
xor	eax, eax
jmp	short loc_7F88EC

loc_7F88BE:		; jumptable 007F88B3 case 0
mov	eax, 37h
jmp	short loc_7F88EC

loc_7F88C5:		; jumptable 007F88B3 case 2
mov	eax, 38h
jmp	short loc_7F88EC

loc_7F88CC:		; jumptable 007F88B3 case 18
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA090
mov	eax, 2
jmp	short loc_7F88EC

loc_7F88DC:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F88B3 cases 1,3,5-17
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F88EC:
mov	esp, ebp
pop	ebp
retn
sub_7F8890 endp

off_7F88F0 dd offset loc_7F88BE	; jump table for switch	statement
dd offset loc_7F88C5
dd offset loc_7F88BA
dd offset loc_7F88CC
dd offset loc_7F88DC
byte_7F8904 db	    0,	   4,	  1,	 4 ; indirect table for	switch statement
db	2,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     3
align 10h


; Attributes: bp-based frame

sub_7F8920 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8938
cmp	[ebp+var_4], 1Bh
jz	short loc_7F893F
jmp	short loc_7F894F

loc_7F8938:
mov	eax, 3
jmp	short loc_7F895F

loc_7F893F:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8970
mov	eax, 6
jmp	short loc_7F895F

loc_7F894F:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F895F:
mov	esp, ebp
pop	ebp
retn
sub_7F8920 endp

align 10h


; Attributes: bp-based frame

sub_7F8970 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8988
cmp	[ebp+var_4], 1Bh
jz	short loc_7F898F
jmp	short loc_7F899F

loc_7F8988:
mov	eax, 3
jmp	short loc_7F89AF

loc_7F898F:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F89C0
mov	eax, 5
jmp	short loc_7F89AF

loc_7F899F:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F89AF:
mov	esp, ebp
pop	ebp
retn
sub_7F8970 endp

align 10h


; Attributes: bp-based frame

sub_7F89C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F89DE
cmp	[ebp+var_4], 11h
jz	short loc_7F89F5
cmp	[ebp+var_4], 19h
jz	short loc_7F89E5
jmp	short loc_7F8A05

loc_7F89DE:
mov	eax, 3
jmp	short loc_7F8A15

loc_7F89E5:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8A20
mov	eax, 7
jmp	short loc_7F8A15

loc_7F89F5:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F8890
mov	eax, 8
jmp	short loc_7F8A15

loc_7F8A05:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F8A15:
mov	esp, ebp
pop	ebp
retn
sub_7F89C0 endp

align 10h


; Attributes: bp-based frame

sub_7F8A20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 20h ; switch 33 cases
ja	loc_7F8B6A	; default
			; jumptable 007F8A47 cases 1-14,16,18,21-29,31
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F8BA0[edx]
jmp	ds:off_7F8B80[eax*4] ; switch jump

loc_7F8A4E:		; jumptable 007F8A47 case 19
xor	eax, eax
jmp	loc_7F8B7A

loc_7F8A55:		; jumptable 007F8A47 case 20
push	offset aEntity_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+44h]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F8A91
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F8C20
mov	eax, 0Bh
jmp	loc_7F8B7A

loc_7F8A91:		; "ATTLIST"
push	offset aAttlist
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+44h]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F8ACD
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F93D0
mov	eax, 21h
jmp	loc_7F8B7A

loc_7F8ACD:		; "ELEMENT"
push	offset aElement
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+44h]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F8B06
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F98E0
mov	eax, 27h
jmp	short loc_7F8B7A

loc_7F8B06:		; "NOTATION"
push	offset aNotation_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+44h]
mov	ecx, [ebp+arg_8]
lea	edx, [ecx+eax*2]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F8B3F
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F91C0
mov	eax, 11h
jmp	short loc_7F8B7A

loc_7F8B3F:		; default
jmp	short loc_7F8B6A ; jumptable 007F8A47 cases 1-14,16,18,21-29,31

loc_7F8B41:		; jumptable 007F8A47 case 15
mov	eax, 37h
jmp	short loc_7F8B7A

loc_7F8B48:		; jumptable 007F8A47 case 17
mov	eax, 38h
jmp	short loc_7F8B7A

loc_7F8B4F:		; jumptable 007F8A47 case 32
mov	eax, 3Ch
jmp	short loc_7F8B7A

loc_7F8B56:		; jumptable 007F8A47 case 30
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8BD0
mov	eax, 3
jmp	short loc_7F8B7A

loc_7F8B66:		; jumptable 007F8A47 case 0
xor	eax, eax
jmp	short loc_7F8B7A

loc_7F8B6A:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F8A47 cases 1-14,16,18,21-29,31
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F8B7A:
mov	esp, ebp
pop	ebp
retn
sub_7F8A20 endp

align 10h
off_7F8B80 dd offset loc_7F8B66	; jump table for switch	statement
dd offset loc_7F8B41
dd offset loc_7F8B48
dd offset loc_7F8A4E
dd offset loc_7F8A55
dd offset loc_7F8B56
dd offset loc_7F8B4F
dd offset loc_7F8B6A
byte_7F8BA0 db	    0,	   7,	  7,	 7 ; indirect table for	switch statement
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     1
db	7,     2,     7,     3
db	4,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     5,     7
db	6
align 10h


; Attributes: bp-based frame

sub_7F8BD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8BE8
cmp	[ebp+var_4], 11h
jz	short loc_7F8BEF
jmp	short loc_7F8BFF

loc_7F8BE8:
mov	eax, 3
jmp	short loc_7F8C0F

loc_7F8BEF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8890
mov	eax, 8
jmp	short loc_7F8C0F

loc_7F8BFF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F8C0F:
mov	esp, ebp
pop	ebp
retn
sub_7F8BD0 endp

align 10h


; Attributes: bp-based frame

sub_7F8C20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8C3E
cmp	[ebp+var_4], 12h
jz	short loc_7F8C55
cmp	[ebp+var_4], 16h
jz	short loc_7F8C45
jmp	short loc_7F8C65

loc_7F8C3E:
mov	eax, 0Bh
jmp	short loc_7F8C75

loc_7F8C45:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8C80
mov	eax, 0Bh
jmp	short loc_7F8C75

loc_7F8C55:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F8CD0
mov	eax, 9
jmp	short loc_7F8C75

loc_7F8C65:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F8C75:
mov	esp, ebp
pop	ebp
retn
sub_7F8C20 endp

align 10h


; Attributes: bp-based frame

sub_7F8C80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8C98
cmp	[ebp+var_4], 12h
jz	short loc_7F8C9F
jmp	short loc_7F8CAF

loc_7F8C98:
mov	eax, 0Bh
jmp	short loc_7F8CBF

loc_7F8C9F:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9000
mov	eax, 0Ah
jmp	short loc_7F8CBF

loc_7F8CAF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F8CBF:
mov	esp, ebp
pop	ebp
retn
sub_7F8C80 endp

align 10h


; Attributes: bp-based frame

sub_7F8CD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8CF1
cmp	[ebp+var_4], 12h
jz	short loc_7F8CFB
cmp	[ebp+var_4], 1Bh
jz	short loc_7F8D5D
jmp	loc_7F8D77

loc_7F8CF1:
mov	eax, 0Bh
jmp	loc_7F8D87

loc_7F8CFB:		; "SYSTEM"
push	offset aSystem_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F8D2B
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F8DE0
mov	eax, 0Bh
jmp	short loc_7F8D87

loc_7F8D2B:		; "PUBLIC"
push	offset aPublic_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F8D5B
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F8D90
mov	eax, 0Bh
jmp	short loc_7F8D87

loc_7F8D5B:
jmp	short loc_7F8D77

loc_7F8D5D:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 0Bh
mov	eax, 0Ch
jmp	short loc_7F8D87

loc_7F8D77:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F8D87:
mov	esp, ebp
pop	ebp
retn
sub_7F8CD0 endp

align 10h


; Attributes: bp-based frame

sub_7F8D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8DA8
cmp	[ebp+var_4], 1Bh
jz	short loc_7F8DAF
jmp	short loc_7F8DBF

loc_7F8DA8:
mov	eax, 0Bh
jmp	short loc_7F8DCF

loc_7F8DAF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8DE0
mov	eax, 0Eh
jmp	short loc_7F8DCF

loc_7F8DBF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F8DCF:
mov	esp, ebp
pop	ebp
retn
sub_7F8D90 endp

align 10h


; Attributes: bp-based frame

sub_7F8DE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8DF8
cmp	[ebp+var_4], 1Bh
jz	short loc_7F8DFF
jmp	short loc_7F8E0F

loc_7F8DF8:
mov	eax, 0Bh
jmp	short loc_7F8E1F

loc_7F8DFF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8E30
mov	eax, 0Dh
jmp	short loc_7F8E1F

loc_7F8E0F:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F8E1F:
mov	esp, ebp
pop	ebp
retn
sub_7F8DE0 endp

align 10h


; Attributes: bp-based frame

sub_7F8E30 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8E50
cmp	[ebp+var_4], 11h
jz	short loc_7F8E57
cmp	[ebp+var_4], 12h
jz	short loc_7F8E7F
jmp	short loc_7F8EAF

loc_7F8E50:
mov	eax, 0Bh
jmp	short loc_7F8EBF

loc_7F8E57:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+10h], 0
jz	short loc_7F8E69
mov	[ebp+var_8], offset sub_7F8A20
jmp	short loc_7F8E70

loc_7F8E69:
mov	[ebp+var_8], offset sub_7F8ED0

loc_7F8E70:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	eax, 0Fh
jmp	short loc_7F8EBF

loc_7F8E7F:		; "NDATA"
push	offset aNdata
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F8EAF
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F8FB0
mov	eax, 0Bh
jmp	short loc_7F8EBF

loc_7F8EAF:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7FA0A0
add	esp, 8

loc_7F8EBF:
mov	esp, ebp
pop	ebp
retn
sub_7F8E30 endp

align 10h


; Attributes: bp-based frame

sub_7F8ED0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
add	ecx, 4
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 26h ; switch 39 cases
ja	short loc_7F8F3A ; default
			; jumptable 007F8EF3 cases 1-18,20-29,31-36
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F8F84[edx]
jmp	ds:off_7F8F6C[eax*4] ; switch jump

loc_7F8EFA:		; jumptable 007F8EF3 case 37
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9F10
xor	eax, eax
jmp	short loc_7F8F68

loc_7F8F07:		; jumptable 007F8EF3 case 38
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+0Ch], 0
jnz	short loc_7F8F12
jmp	short loc_7F8F58

loc_7F8F12:
mov	eax, [ebp+arg_0]
mov	ecx, [eax+0Ch]
sub	ecx, 1
mov	edx, [ebp+arg_0]
mov	[edx+0Ch], ecx
xor	eax, eax
jmp	short loc_7F8F68

loc_7F8F25:		; jumptable 007F8EF3 case 19
xor	eax, eax
jmp	short loc_7F8F68

loc_7F8F29:		; jumptable 007F8EF3 case 30
jmp	short loc_7F8F58

loc_7F8F2B:		; jumptable 007F8EF3 case 0
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+0Ch], 0
jz	short loc_7F8F36
jmp	short loc_7F8F58

loc_7F8F36:
xor	eax, eax
jmp	short loc_7F8F68

loc_7F8F3A:		; default
mov	ecx, [ebp+arg_10] ; jumptable 007F8EF3 cases 1-18,20-29,31-36
push	ecx
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7F8A20
add	esp, 14h
jmp	short loc_7F8F68

loc_7F8F58:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F8F68:
mov	esp, ebp
pop	ebp
retn
sub_7F8ED0 endp

off_7F8F6C dd offset loc_7F8F2B	; jump table for switch	statement
dd offset loc_7F8F25
dd offset loc_7F8F29
dd offset loc_7F8EFA
dd offset loc_7F8F07
dd offset loc_7F8F3A
byte_7F8F84 db	    0,	   5,	  5,	 5 ; indirect table for	switch statement
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     5,     1
db	5,     5,     5,     5
db	5,     5,     5,     5
db	5,     5,     2,     5
db	5,     5,     5,     5
db	5,     3,     4
align 10h


; Attributes: bp-based frame

sub_7F8FB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F8FC8
cmp	[ebp+var_4], 12h
jz	short loc_7F8FCF
jmp	short loc_7F8FE9

loc_7F8FC8:
mov	eax, 0Bh
jmp	short loc_7F8FF9

loc_7F8FCF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 0Bh
mov	eax, 10h
jmp	short loc_7F8FF9

loc_7F8FE9:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F8FF9:
mov	esp, ebp
pop	ebp
retn
sub_7F8FB0 endp

align 10h


; Attributes: bp-based frame

sub_7F9000 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9021
cmp	[ebp+var_4], 12h
jz	short loc_7F902B
cmp	[ebp+var_4], 1Bh
jz	short loc_7F908D
jmp	loc_7F90A7

loc_7F9021:
mov	eax, 0Bh
jmp	loc_7F90B7

loc_7F902B:		; "SYSTEM"
push	offset aSystem_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F905B
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9110
mov	eax, 0Bh
jmp	short loc_7F90B7

loc_7F905B:		; "PUBLIC"
push	offset aPublic_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F908B
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F90C0
mov	eax, 0Bh
jmp	short loc_7F90B7

loc_7F908B:
jmp	short loc_7F90A7

loc_7F908D:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 0Bh
mov	eax, 0Ch
jmp	short loc_7F90B7

loc_7F90A7:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F90B7:
mov	esp, ebp
pop	ebp
retn
sub_7F9000 endp

align 10h


; Attributes: bp-based frame

sub_7F90C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F90D8
cmp	[ebp+var_4], 1Bh
jz	short loc_7F90DF
jmp	short loc_7F90EF

loc_7F90D8:
mov	eax, 0Bh
jmp	short loc_7F90FF

loc_7F90DF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9110
mov	eax, 0Eh
jmp	short loc_7F90FF

loc_7F90EF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F90FF:
mov	esp, ebp
pop	ebp
retn
sub_7F90C0 endp

align 10h


; Attributes: bp-based frame

sub_7F9110 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9128
cmp	[ebp+var_4], 1Bh
jz	short loc_7F912F
jmp	short loc_7F913F

loc_7F9128:
mov	eax, 0Bh
jmp	short loc_7F914F

loc_7F912F:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9160
mov	eax, 0Dh
jmp	short loc_7F914F

loc_7F913F:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F914F:
mov	esp, ebp
pop	ebp
retn
sub_7F9110 endp

align 10h


; Attributes: bp-based frame

sub_7F9160 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F917A
cmp	[ebp+var_4], 11h
jz	short loc_7F9181
jmp	short loc_7F91A9

loc_7F917A:
mov	eax, 0Bh
jmp	short loc_7F91B9

loc_7F9181:
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+10h], 0
jz	short loc_7F9193
mov	[ebp+var_8], offset sub_7F8A20
jmp	short loc_7F919A

loc_7F9193:
mov	[ebp+var_8], offset sub_7F8ED0

loc_7F919A:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	eax, 0Fh
jmp	short loc_7F91B9

loc_7F91A9:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7FA0A0
add	esp, 8

loc_7F91B9:
mov	esp, ebp
pop	ebp
retn
sub_7F9160 endp

align 10h


; Attributes: bp-based frame

sub_7F91C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F91D8
cmp	[ebp+var_4], 12h
jz	short loc_7F91DF
jmp	short loc_7F91EF

loc_7F91D8:
mov	eax, 11h
jmp	short loc_7F91FF

loc_7F91DF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9210
mov	eax, 12h
jmp	short loc_7F91FF

loc_7F91EF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F91FF:
mov	esp, ebp
pop	ebp
retn
sub_7F91C0 endp

align 10h


; Attributes: bp-based frame

sub_7F9210 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9228
cmp	[ebp+var_4], 12h
jz	short loc_7F922F
jmp	short loc_7F928F

loc_7F9228:
mov	eax, 11h
jmp	short loc_7F929F

loc_7F922F:		; "SYSTEM"
push	offset aSystem_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F925F
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9300
mov	eax, 11h
jmp	short loc_7F929F

loc_7F925F:		; "PUBLIC"
push	offset aPublic_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F928F
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F92B0
mov	eax, 11h
jmp	short loc_7F929F

loc_7F928F:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7FA0A0
add	esp, 8

loc_7F929F:
mov	esp, ebp
pop	ebp
retn
sub_7F9210 endp

align 10h


; Attributes: bp-based frame

sub_7F92B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F92C8
cmp	[ebp+var_4], 1Bh
jz	short loc_7F92CF
jmp	short loc_7F92DF

loc_7F92C8:
mov	eax, 11h
jmp	short loc_7F92EF

loc_7F92CF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9350
mov	eax, 15h
jmp	short loc_7F92EF

loc_7F92DF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F92EF:
mov	esp, ebp
pop	ebp
retn
sub_7F92B0 endp

align 10h


; Attributes: bp-based frame

sub_7F9300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9318
cmp	[ebp+var_4], 1Bh
jz	short loc_7F931F
jmp	short loc_7F9339

loc_7F9318:
mov	eax, 11h
jmp	short loc_7F9349

loc_7F931F:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 11h
mov	eax, 13h
jmp	short loc_7F9349

loc_7F9339:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F9349:
mov	esp, ebp
pop	ebp
retn
sub_7F9300 endp

align 10h


; Attributes: bp-based frame

sub_7F9350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9370
cmp	[ebp+var_4], 11h
jz	short loc_7F9391
cmp	[ebp+var_4], 1Bh
jz	short loc_7F9377
jmp	short loc_7F93B9

loc_7F9370:
mov	eax, 11h
jmp	short loc_7F93C9

loc_7F9377:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 11h
mov	eax, 13h
jmp	short loc_7F93C9

loc_7F9391:
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+10h], 0
jz	short loc_7F93A3
mov	[ebp+var_8], offset sub_7F8A20
jmp	short loc_7F93AA

loc_7F93A3:
mov	[ebp+var_8], offset sub_7F8ED0

loc_7F93AA:
mov	ecx, [ebp+arg_0]
mov	edx, [ebp+var_8]
mov	[ecx], edx
mov	eax, 14h
jmp	short loc_7F93C9

loc_7F93B9:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F93C9:
mov	esp, ebp
pop	ebp
retn
sub_7F9350 endp

align 10h


; Attributes: bp-based frame

sub_7F93D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F93EE
cmp	[ebp+var_4], 12h
jz	short loc_7F93F5
cmp	[ebp+var_4], 29h
jz	short loc_7F93F5
jmp	short loc_7F9405

loc_7F93EE:
mov	eax, 21h
jmp	short loc_7F9415

loc_7F93F5:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9420
mov	eax, 22h
jmp	short loc_7F9415

loc_7F9405:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9415:
mov	esp, ebp
pop	ebp
retn
sub_7F93D0 endp

align 10h


; Attributes: bp-based frame

sub_7F9420 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Fh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 1Ah ; switch 27 cases
ja	short loc_7F948B ; default
			; jumptable 007F9445 cases 1,4-25
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F94B0[edx]
jmp	ds:off_7F94A0[eax*4] ; switch jump

loc_7F944C:		; jumptable 007F9445 case 0
mov	eax, 21h
jmp	short loc_7F949B

loc_7F9453:		; jumptable 007F9445 case 2
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+10h], 0
jz	short loc_7F9465
mov	[ebp+var_8], offset sub_7F8A20
jmp	short loc_7F946C

loc_7F9465:
mov	[ebp+var_8], offset sub_7F8ED0

loc_7F946C:
mov	edx, [ebp+arg_0]
mov	eax, [ebp+var_8]
mov	[edx], eax
mov	eax, 21h
jmp	short loc_7F949B

loc_7F947B:		; jumptable 007F9445 cases 3,26
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F94D0
mov	eax, 16h
jmp	short loc_7F949B

loc_7F948B:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F9445 cases 1,4-25
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F949B:
mov	esp, ebp
pop	ebp
retn
sub_7F9420 endp

align 10h
off_7F94A0 dd offset loc_7F944C	; jump table for switch	statement
dd offset loc_7F9453
dd offset loc_7F947B
dd offset loc_7F948B
byte_7F94B0 db	    0,	   3,	  1,	 2 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     2
align 10h


; Attributes: bp-based frame

sub_7F94D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_8], eax
cmp	[ebp+var_8], 0Fh
jz	short loc_7F94F7
cmp	[ebp+var_8], 12h
jz	short loc_7F9501
cmp	[ebp+var_8], 17h
jz	loc_7F9584
jmp	loc_7F9594

loc_7F94F7:
mov	eax, 21h
jmp	loc_7F95A4

loc_7F9501:
mov	[ebp+var_4], 0
jmp	short loc_7F9513

loc_7F950A:
mov	ecx, [ebp+var_4]
add	ecx, 1
mov	[ebp+var_4], ecx

loc_7F9513:
cmp	[ebp+var_4], 8
jge	short loc_7F9552
mov	edx, [ebp+var_4]
mov	eax, ds:off_14591C0[edx*4]
push	eax
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F9550
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9790
mov	eax, [ebp+var_4]
add	eax, 17h
jmp	short loc_7F95A4

loc_7F9550:
jmp	short loc_7F950A

loc_7F9552:		; "NOTATION"
push	offset aNotation_0
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F9582
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9690
mov	eax, 21h
jmp	short loc_7F95A4

loc_7F9582:
jmp	short loc_7F9594

loc_7F9584:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F95B0
mov	eax, 21h
jmp	short loc_7F95A4

loc_7F9594:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F95A4:
mov	esp, ebp
pop	ebp
retn
sub_7F94D0 endp

align 10h


; Attributes: bp-based frame

sub_7F95B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Fh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 1Ah ; switch 27 cases
ja	short loc_7F95F1 ; default
			; jumptable 007F95D3 cases 1,2,5-25
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F9614[edx]
jmp	ds:off_7F9608[eax*4] ; switch jump

loc_7F95DA:		; jumptable 007F95D3 case 0
mov	eax, 21h
jmp	short loc_7F9601

loc_7F95E1:		; jumptable 007F95D3 cases 3,4,26
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9630
mov	eax, 1Fh
jmp	short loc_7F9601

loc_7F95F1:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F95D3 cases 1,2,5-25
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9601:
mov	esp, ebp
pop	ebp
retn
sub_7F95B0 endp

align 4
off_7F9608 dd offset loc_7F95DA	; jump table for switch	statement
dd offset loc_7F95E1
dd offset loc_7F95F1
byte_7F9614 db	    0,	   2,	  2,	 1 ; indirect table for	switch statement
db	1,     2,     2,     2
db	2,     2,     2,     2
db	2,     2,     2,     2
db	2,     2,     2,     2
db	2,     2,     2,     2
db	2,     2,     1
align 10h


; Attributes: bp-based frame

sub_7F9630 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F964E
cmp	[ebp+var_4], 15h
jz	short loc_7F9665
cmp	[ebp+var_4], 18h
jz	short loc_7F9655
jmp	short loc_7F9675

loc_7F964E:
mov	eax, 21h
jmp	short loc_7F9685

loc_7F9655:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9790
mov	eax, 21h
jmp	short loc_7F9685

loc_7F9665:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F95B0
mov	eax, 21h
jmp	short loc_7F9685

loc_7F9675:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F9685:
mov	esp, ebp
pop	ebp
retn
sub_7F9630 endp

align 10h


; Attributes: bp-based frame

sub_7F9690 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F96A8
cmp	[ebp+var_4], 17h
jz	short loc_7F96AF
jmp	short loc_7F96BF

loc_7F96A8:
mov	eax, 21h
jmp	short loc_7F96CF

loc_7F96AF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F96E0
mov	eax, 21h
jmp	short loc_7F96CF

loc_7F96BF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F96CF:
mov	esp, ebp
pop	ebp
retn
sub_7F9690 endp

align 10h


; Attributes: bp-based frame

sub_7F96E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F96F8
cmp	[ebp+var_4], 12h
jz	short loc_7F96FF
jmp	short loc_7F970F

loc_7F96F8:
mov	eax, 21h
jmp	short loc_7F971F

loc_7F96FF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9730
mov	eax, 20h
jmp	short loc_7F971F

loc_7F970F:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F971F:
mov	esp, ebp
pop	ebp
retn
sub_7F96E0 endp

align 10h


; Attributes: bp-based frame

sub_7F9730 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F974E
cmp	[ebp+var_4], 15h
jz	short loc_7F9765
cmp	[ebp+var_4], 18h
jz	short loc_7F9755
jmp	short loc_7F9775

loc_7F974E:
mov	eax, 21h
jmp	short loc_7F9785

loc_7F9755:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9790
mov	eax, 21h
jmp	short loc_7F9785

loc_7F9765:
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F96E0
mov	eax, 21h
jmp	short loc_7F9785

loc_7F9775:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F9785:
mov	esp, ebp
pop	ebp
retn
sub_7F9730 endp

align 10h


; Attributes: bp-based frame

sub_7F9790 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F97B5
cmp	[ebp+var_4], 14h
jz	short loc_7F97BF
cmp	[ebp+var_4], 1Bh
jz	loc_7F9866
jmp	loc_7F9876

loc_7F97B5:
mov	eax, 21h
jmp	loc_7F9886

loc_7F97BF:		; "IMPLIED"
push	offset aImplied
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
add	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+1Ch]
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_7F97F8
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9420
mov	eax, 23h
jmp	loc_7F9886

loc_7F97F8:		; "REQUIRED"
push	offset aRequired
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_10]
mov	ecx, [ebp+arg_8]
add	ecx, [eax+44h]
push	ecx
mov	edx, [ebp+arg_10]
push	edx
mov	eax, [ebp+arg_10]
mov	ecx, [eax+1Ch]
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_7F982E
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F9420
mov	eax, 24h
jmp	short loc_7F9886

loc_7F982E:		; "FIXED"
push	offset aFixed
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ebp+arg_8]
add	edx, [ecx+44h]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F9864
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9890
mov	eax, 21h
jmp	short loc_7F9886

loc_7F9864:
jmp	short loc_7F9876

loc_7F9866:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9420
mov	eax, 25h
jmp	short loc_7F9886

loc_7F9876:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9886:
mov	esp, ebp
pop	ebp
retn
sub_7F9790 endp

align 10h


; Attributes: bp-based frame

sub_7F9890 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F98A8
cmp	[ebp+var_4], 1Bh
jz	short loc_7F98AF
jmp	short loc_7F98BF

loc_7F98A8:
mov	eax, 21h
jmp	short loc_7F98CF

loc_7F98AF:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9420
mov	eax, 26h
jmp	short loc_7F98CF

loc_7F98BF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F98CF:
mov	esp, ebp
pop	ebp
retn
sub_7F9890 endp

align 10h


; Attributes: bp-based frame

sub_7F98E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F98FE
cmp	[ebp+var_4], 12h
jz	short loc_7F9905
cmp	[ebp+var_4], 29h
jz	short loc_7F9905
jmp	short loc_7F9915

loc_7F98FE:
mov	eax, 27h
jmp	short loc_7F9925

loc_7F9905:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9930
mov	eax, 28h
jmp	short loc_7F9925

loc_7F9915:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9925:
mov	esp, ebp
pop	ebp
retn
sub_7F98E0 endp

align 10h


; Attributes: bp-based frame

sub_7F9930 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9955
cmp	[ebp+var_4], 12h
jz	short loc_7F995F
cmp	[ebp+var_4], 17h
jz	loc_7F99D5
jmp	loc_7F99EF

loc_7F9955:
mov	eax, 27h
jmp	loc_7F99FF

loc_7F995F:		; "EMPTY"
push	offset aEmpty
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F9999
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7FA030
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+8], 27h
mov	eax, 2Ah
jmp	short loc_7F99FF

loc_7F9999:
push	offset unk_1459100
mov	edx, [ebp+arg_C]
push	edx
mov	eax, [ebp+arg_8]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+1Ch]
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_7F99D3
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 27h
mov	eax, 29h
jmp	short loc_7F99FF

loc_7F99D3:
jmp	short loc_7F99EF

loc_7F99D5:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9A10
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+4], 1
mov	eax, 2Ch
jmp	short loc_7F99FF

loc_7F99EF:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F99FF:
mov	esp, ebp
pop	ebp
retn
sub_7F9930 endp

align 10h


; Attributes: bp-based frame

sub_7F9A10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Fh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 1Ah ; switch 27 cases
ja	loc_7F9ADA	; default
			; jumptable 007F9A37 cases 1,2,4,6,7,9-14,18-25
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F9B10[edx]
jmp	ds:off_7F9AF0[eax*4] ; switch jump

loc_7F9A3E:		; jumptable 007F9A37 case 0
mov	eax, 27h
jmp	loc_7F9AEA

loc_7F9A48:		; jumptable 007F9A37 case 5
push	offset aPcdata
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [ebp+arg_8]
add	eax, [edx+44h]
push	eax
mov	ecx, [ebp+arg_10]
push	ecx
mov	edx, [ebp+arg_10]
mov	eax, [edx+1Ch]
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_7F9A7E
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9B30
mov	eax, 2Bh
jmp	short loc_7F9AEA

loc_7F9A7E:		; default
jmp	short loc_7F9ADA ; jumptable 007F9A37 cases 1,2,4,6,7,9-14,18-25

loc_7F9A80:		; jumptable 007F9A37 case 8
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+4], 2
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9CB0
mov	eax, 2Ch
jmp	short loc_7F9AEA

loc_7F9A9A:		; jumptable 007F9A37 cases 3,26
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9D90
mov	eax, 33h
jmp	short loc_7F9AEA

loc_7F9AAA:		; jumptable 007F9A37 case 15
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F9D90
mov	eax, 35h
jmp	short loc_7F9AEA

loc_7F9ABA:		; jumptable 007F9A37 case 16
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9D90
mov	eax, 34h
jmp	short loc_7F9AEA

loc_7F9ACA:		; jumptable 007F9A37 case 17
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9D90
mov	eax, 36h
jmp	short loc_7F9AEA

loc_7F9ADA:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F9A37 cases 1,2,4,6,7,9-14,18-25
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9AEA:
mov	esp, ebp
pop	ebp
retn
sub_7F9A10 endp

align 10h
off_7F9AF0 dd offset loc_7F9A3E	; jump table for switch	statement
dd offset loc_7F9A9A
dd offset loc_7F9A48
dd offset loc_7F9A80
dd offset loc_7F9AAA
dd offset loc_7F9ABA
dd offset loc_7F9ACA
dd offset loc_7F9ADA
byte_7F9B10 db	    0,	   7,	  7,	 1 ; indirect table for	switch statement
db	7,     2,     7,     7
db	3,     7,     7,     7
db	7,     7,     7,     4
db	5,     6,     7,     7
db	7,     7,     7,     7
db	7,     7,     1
align 10h


; Attributes: bp-based frame

sub_7F9B30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Fh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 15h ; switch 22 cases
ja	short loc_7F9BA5 ; default
			; jumptable 007F9B53 cases 1-5,7,8,10-20
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F9BD0[edx]
jmp	ds:off_7F9BBC[eax*4] ; switch jump

loc_7F9B5A:		; jumptable 007F9B53 case 0
mov	eax, 27h
jmp	short loc_7F9BB5

loc_7F9B61:		; jumptable 007F9B53 case 9
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 27h
mov	eax, 2Dh
jmp	short loc_7F9BB5

loc_7F9B7B:		; jumptable 007F9B53 case 21
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7FA030
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx+8], 27h
mov	eax, 2Eh
jmp	short loc_7F9BB5

loc_7F9B95:		; jumptable 007F9B53 case 6
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F9BF0
mov	eax, 27h
jmp	short loc_7F9BB5

loc_7F9BA5:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F9B53 cases 1-5,7,8,10-20
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F9BB5:
mov	esp, ebp
pop	ebp
retn
sub_7F9B30 endp

align 4
off_7F9BBC dd offset loc_7F9B5A	; jump table for switch	statement
dd offset loc_7F9B95
dd offset loc_7F9B61
dd offset loc_7F9B7B
dd offset loc_7F9BA5
byte_7F9BD0 db	    0,	   4,	  4,	 4 ; indirect table for	switch statement
db	4,     4,     1,     4
db	4,     2,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     3
align 10h


; Attributes: bp-based frame

sub_7F9BF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9C0E
cmp	[ebp+var_4], 12h
jz	short loc_7F9C15
cmp	[ebp+var_4], 29h
jz	short loc_7F9C15
jmp	short loc_7F9C25

loc_7F9C0E:
mov	eax, 27h
jmp	short loc_7F9C35

loc_7F9C15:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9C40
mov	eax, 33h
jmp	short loc_7F9C35

loc_7F9C25:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9C35:
mov	esp, ebp
pop	ebp
retn
sub_7F9BF0 endp

align 10h


; Attributes: bp-based frame

sub_7F9C40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9C5E
cmp	[ebp+var_4], 15h
jz	short loc_7F9C7F
cmp	[ebp+var_4], 24h
jz	short loc_7F9C65
jmp	short loc_7F9C8F

loc_7F9C5E:
mov	eax, 27h
jmp	short loc_7F9C9F

loc_7F9C65:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA030
mov	edx, [ebp+arg_0]
mov	dword ptr [edx+8], 27h
mov	eax, 2Eh
jmp	short loc_7F9C9F

loc_7F9C7F:
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9BF0
mov	eax, 27h
jmp	short loc_7F9C9F

loc_7F9C8F:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7FA0A0
add	esp, 8

loc_7F9C9F:
mov	esp, ebp
pop	ebp
retn
sub_7F9C40 endp

align 10h


; Attributes: bp-based frame

sub_7F9CB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Fh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 1Ah ; switch 27 cases
ja	short loc_7F9D37 ; default
			; jumptable 007F9CD3 cases 1,2,4-7,9-14,18-25
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F9D68[edx]
jmp	ds:off_7F9D4C[eax*4] ; switch jump

loc_7F9CDA:		; jumptable 007F9CD3 case 0
mov	eax, 27h
jmp	short loc_7F9D47

loc_7F9CE1:		; jumptable 007F9CD3 case 8
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
add	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+4], edx
mov	eax, 2Ch
jmp	short loc_7F9D47

loc_7F9CF7:		; jumptable 007F9CD3 cases 3,26
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9D90
mov	eax, 33h
jmp	short loc_7F9D47

loc_7F9D07:		; jumptable 007F9CD3 case 15
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F9D90
mov	eax, 35h
jmp	short loc_7F9D47

loc_7F9D17:		; jumptable 007F9CD3 case 16
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9D90
mov	eax, 34h
jmp	short loc_7F9D47

loc_7F9D27:		; jumptable 007F9CD3 case 17
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9D90
mov	eax, 36h
jmp	short loc_7F9D47

loc_7F9D37:		; default
mov	edx, [ebp+arg_4] ; jumptable 007F9CD3 cases 1,2,4-7,9-14,18-25
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9D47:
mov	esp, ebp
pop	ebp
retn
sub_7F9CB0 endp

align 4
off_7F9D4C dd offset loc_7F9CDA	; jump table for switch	statement
dd offset loc_7F9CF7
dd offset loc_7F9CE1
dd offset loc_7F9D07
dd offset loc_7F9D17
dd offset loc_7F9D27
dd offset loc_7F9D37
byte_7F9D68 db	    0,	   6,	  6,	 1 ; indirect table for	switch statement
db	6,     6,     6,     6
db	2,     6,     6,     6
db	6,     6,     6,     3
db	4,     5,     6,     6
db	6,     6,     6,     6
db	6,     6,     1
align 10h


; Attributes: bp-based frame

sub_7F9D90 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
mov	ecx, [ebp+var_4]
sub	ecx, 0Fh
mov	[ebp+var_4], ecx
cmp	[ebp+var_4], 17h ; switch 24 cases
ja	loc_7F9EB6	; default
			; jumptable 007F9DB7 cases 1-5,7,8,10-19
mov	edx, [ebp+var_4]
movzx	eax, ds:byte_7F9EEC[edx]
jmp	ds:off_7F9ECC[eax*4] ; switch jump

loc_7F9DBE:		; jumptable 007F9DB7 case 0
mov	eax, 27h
jmp	loc_7F9EC6

loc_7F9DC8:		; jumptable 007F9DB7 case 9
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_7F9DF3
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7FA030
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+8], 27h

loc_7F9DF3:
mov	eax, 2Dh
jmp	loc_7F9EC6

loc_7F9DFD:		; jumptable 007F9DB7 case 21
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_7F9E28
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7FA030
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+8], 27h

loc_7F9E28:
mov	eax, 2Eh
jmp	loc_7F9EC6

loc_7F9E32:		; jumptable 007F9DB7 case 20
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_7F9E5D
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7FA030
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+8], 27h

loc_7F9E5D:
mov	eax, 2Fh
jmp	short loc_7F9EC6

loc_7F9E64:		; jumptable 007F9DB7 case 22
mov	ecx, [ebp+arg_0]
mov	edx, [ecx+4]
sub	edx, 1
mov	eax, [ebp+arg_0]
mov	[eax+4], edx
mov	ecx, [ebp+arg_0]
cmp	dword ptr [ecx+4], 0
jnz	short loc_7F9E8F
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7FA030
mov	eax, [ebp+arg_0]
mov	dword ptr [eax+8], 27h

loc_7F9E8F:
mov	eax, 30h
jmp	short loc_7F9EC6

loc_7F9E96:		; jumptable 007F9DB7 case 23
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F9CB0
mov	eax, 32h
jmp	short loc_7F9EC6

loc_7F9EA6:		; jumptable 007F9DB7 case 6
mov	edx, [ebp+arg_0]
mov	dword ptr [edx], offset	sub_7F9CB0
mov	eax, 31h
jmp	short loc_7F9EC6

loc_7F9EB6:		; default
mov	eax, [ebp+arg_4] ; jumptable 007F9DB7 cases 1-5,7,8,10-19
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7F9EC6:
mov	esp, ebp
pop	ebp
retn
sub_7F9D90 endp

align 4
off_7F9ECC dd offset loc_7F9DBE	; jump table for switch	statement
dd offset loc_7F9EA6
dd offset loc_7F9DC8
dd offset loc_7F9E32
dd offset loc_7F9DFD
dd offset loc_7F9E64
dd offset loc_7F9E96
dd offset loc_7F9EB6
byte_7F9EEC db	    0,	   7,	  7,	 7 ; indirect table for	switch statement
db	7,     7,     1,     7
db	7,     2,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	3,     4,     5,     6
align 10h


; Attributes: bp-based frame

sub_7F9F10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h
arg_10=	dword ptr  18h

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9F28
cmp	[ebp+var_4], 12h
jz	short loc_7F9F2C
jmp	short loc_7F9F86

loc_7F9F28:
xor	eax, eax
jmp	short loc_7F9F96

loc_7F9F2C:		; "INCLUDE"
push	offset aInclude
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F9F59
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9FA0
xor	eax, eax
jmp	short loc_7F9F96

loc_7F9F59:		; "IGNORE"
push	offset aIgnore
mov	ecx, [ebp+arg_C]
push	ecx
mov	edx, [ebp+arg_8]
push	edx
mov	eax, [ebp+arg_10]
push	eax
mov	ecx, [ebp+arg_10]
mov	edx, [ecx+1Ch]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_7F9F86
mov	eax, [ebp+arg_0]
mov	dword ptr [eax], offset	sub_7F9FF0
xor	eax, eax
jmp	short loc_7F9F96

loc_7F9F86:
mov	ecx, [ebp+arg_4]
push	ecx
mov	edx, [ebp+arg_0]
push	edx
call	sub_7FA0A0
add	esp, 8

loc_7F9F96:
mov	esp, ebp
pop	ebp
retn
sub_7F9F10 endp

align 10h


; Attributes: bp-based frame

sub_7F9FA0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7F9FB8
cmp	[ebp+var_4], 19h
jz	short loc_7F9FBC
jmp	short loc_7F9FD8

loc_7F9FB8:
xor	eax, eax
jmp	short loc_7F9FE8

loc_7F9FBC:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8ED0
mov	edx, [ebp+arg_0]
mov	eax, [edx+0Ch]
add	eax, 1
mov	ecx, [ebp+arg_0]
mov	[ecx+0Ch], eax
xor	eax, eax
jmp	short loc_7F9FE8

loc_7F9FD8:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7F9FE8:
mov	esp, ebp
pop	ebp
retn
sub_7F9FA0 endp

align 10h


; Attributes: bp-based frame

sub_7F9FF0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
push	ecx
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7FA008
cmp	[ebp+var_4], 19h
jz	short loc_7FA00C
jmp	short loc_7FA01C

loc_7FA008:
xor	eax, eax
jmp	short loc_7FA02C

loc_7FA00C:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7F8ED0
mov	eax, 3Ah
jmp	short loc_7FA02C

loc_7FA01C:
mov	edx, [ebp+arg_4]
push	edx
mov	eax, [ebp+arg_0]
push	eax
call	sub_7FA0A0
add	esp, 8

loc_7FA02C:
mov	esp, ebp
pop	ebp
retn
sub_7F9FF0 endp



; Attributes: bp-based frame

sub_7FA030 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
sub	esp, 8
mov	eax, [ebp+arg_4]
mov	[ebp+var_4], eax
cmp	[ebp+var_4], 0Fh
jz	short loc_7FA04A
cmp	[ebp+var_4], 11h
jz	short loc_7FA052
jmp	short loc_7FA07B

loc_7FA04A:
mov	ecx, [ebp+arg_0]
mov	eax, [ecx+8]
jmp	short loc_7FA08B

loc_7FA052:
mov	edx, [ebp+arg_0]
cmp	dword ptr [edx+10h], 0
jz	short loc_7FA064
mov	[ebp+var_8], offset sub_7F8A20
jmp	short loc_7FA06B

loc_7FA064:
mov	[ebp+var_8], offset sub_7F8ED0

loc_7FA06B:
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_8]
mov	[eax], ecx
mov	edx, [ebp+arg_0]
mov	eax, [edx+8]
jmp	short loc_7FA08B

loc_7FA07B:
mov	eax, [ebp+arg_4]
push	eax
mov	ecx, [ebp+arg_0]
push	ecx
call	sub_7FA0A0
add	esp, 8

loc_7FA08B:
mov	esp, ebp
pop	ebp
retn
sub_7FA030 endp

align 10h


; Attributes: bp-based frame

sub_7FA090 proc	near
push	ebp
mov	ebp, esp
xor	eax, eax
pop	ebp
retn
sub_7FA090 endp

align 10h


; Attributes: bp-based frame

sub_7FA0A0 proc	near

arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
cmp	dword ptr [eax+10h], 0
jnz	short loc_7FA0B9
cmp	[ebp+arg_4], 1Ch
jnz	short loc_7FA0B9
mov	eax, 3Bh
jmp	short loc_7FA0C5

loc_7FA0B9:
mov	ecx, [ebp+arg_0]
mov	dword ptr [ecx], offset	sub_7FA090
or	eax, 0FFFFFFFFh

loc_7FA0C5:
pop	ebp
retn
sub_7FA0A0 endp

align 10h



sub_7FA0D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+10h], eax
retn	4
sub_7FA0D0 endp

align 10h



sub_7FA0E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [ecx+0Ch]
mov	edx, [esp+arg_C]
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
imul	edi, ebx
add	edi, [ecx+8]
lea	esi, [eax+edx*2]
cmp	ebx, 4
jz	loc_7FA277
cmp	ebx, 8
jz	loc_7FA216
cmp	ebx, 0Ch
jz	short loc_7FA178
mov	eax, [esp+10h+arg_10]
test	eax, eax
jle	loc_7FA2A9
mov	[esp+10h+arg_10], eax

loc_7FA127:
movzx	eax, word ptr [esi]
imul	eax, ebx
push	ebx
add	eax, edi
push	eax
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
movzx	ecx, word ptr [esi+2]
add	esi, 2
imul	ecx, ebx
push	ebx
add	ecx, edi
push	ecx
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
movzx	edx, word ptr [esi+2]
add	esi, 2
imul	edx, ebx
push	ebx
add	edx, edi
push	edx
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
lea	eax, [ebx+ebx*2]
add	esp, 24h
add	esi, 2
add	ebp, eax
sub	[esp+10h+arg_10], 1
jnz	short loc_7FA127
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h

loc_7FA178:
mov	edx, [esp+10h+arg_10]
test	edx, edx
jle	loc_7FA2A9
lea	eax, [ebp+8]

loc_7FA187:
movzx	ecx, word ptr [esi]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4]
mov	[eax-8], ecx
movzx	ecx, word ptr [esi]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4+4]
mov	[eax-4], ecx
movzx	ecx, word ptr [esi]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4+8]
mov	[eax], ecx
movzx	ecx, word ptr [esi+2]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4]
add	esi, 2
mov	[eax+4], ecx
movzx	ecx, word ptr [esi]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4+4]
mov	[eax+8], ecx
movzx	ecx, word ptr [esi]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4+8]
mov	[eax+0Ch], ecx
movzx	ecx, word ptr [esi+2]
add	esi, 2
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4]
mov	[eax+10h], ecx
movzx	ecx, word ptr [esi]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4+4]
mov	[eax+14h], ecx
movzx	ecx, word ptr [esi]
lea	ecx, [ecx+ecx*2]
mov	ecx, [edi+ecx*4+8]
mov	[eax+18h], ecx
add	esi, 2
add	eax, 24h
sub	edx, 1
jnz	loc_7FA187
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h

loc_7FA216:
mov	ecx, [esp+10h+arg_10]
test	ecx, ecx
jle	loc_7FA2A9
lea	eax, [ebp+8]

loc_7FA225:
movzx	edx, word ptr [esi]
mov	edx, [edi+edx*8]
mov	[eax-8], edx
movzx	edx, word ptr [esi]
mov	edx, [edi+edx*8+4]
mov	[eax-4], edx
movzx	edx, word ptr [esi+2]
mov	edx, [edi+edx*8]
add	esi, 2
mov	[eax], edx
movzx	edx, word ptr [esi]
mov	edx, [edi+edx*8+4]
mov	[eax+4], edx
movzx	edx, word ptr [esi+2]
mov	edx, [edi+edx*8]
add	esi, 2
mov	[eax+8], edx
movzx	edx, word ptr [esi]
mov	edx, [edi+edx*8+4]
mov	[eax+0Ch], edx
add	esi, 2
add	eax, 18h
sub	ecx, 1
jnz	short loc_7FA225
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h

loc_7FA277:
mov	ecx, [esp+10h+arg_10]
test	ecx, ecx
jle	short loc_7FA2A9
lea	eax, [ebp+8]

loc_7FA282:
movzx	edx, word ptr [esi]
mov	edx, [edi+edx*4]
mov	[eax-8], edx
movzx	edx, word ptr [esi+2]
mov	edx, [edi+edx*4]
mov	[eax-4], edx
movzx	edx, word ptr [esi+4]
mov	edx, [edi+edx*4]
mov	[eax], edx
add	esi, 6
add	eax, 0Ch
sub	ecx, 1
jnz	short loc_7FA282

loc_7FA2A9:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	14h
sub_7FA0E0 endp




sub_7FA2B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_4]
mov	edx, [ebx]
push	ebp
mov	ebp, [esp+14h+arg_0]
mov	eax, [ebp+0]
push	esi
push	edi
mov	edi, eax
mov	ecx, edx
sar	edi, 1
sar	ecx, 1
cmp	edi, 1
mov	[esp+1Ch+var_C], ecx
jge	short loc_7FA2DA
mov	edi, 1

loc_7FA2DA:
cmp	ecx, 1
jge	short loc_7FA2E8
mov	ecx, 1
mov	[esp+1Ch+var_C], ecx

loc_7FA2E8:
lea	esi, [edi+edi]
cmp	esi, eax
jnz	short loc_7FA36C
lea	eax, [ecx+ecx]
cmp	eax, edx
jnz	short loc_7FA36C
xor	edx, edx
mov	[esp+1Ch+var_8], edx
test	ecx, ecx
jle	short loc_7FA36C
mov	esi, [esp+1Ch+arg_8]
mov	[esp+1Ch+var_4], esi
jmp	short loc_7FA310
align 10h

loc_7FA310:
lea	eax, [edx+edx]
imul	eax, [ebp+0]
add	eax, [esp+1Ch+arg_8]
test	edi, edi
jle	short loc_7FA359
mov	[esp+1Ch+arg_0], edi

loc_7FA323:
mov	ecx, [ebp+0]
movzx	edx, byte ptr [ecx+eax+1]
movzx	ebx, byte ptr [eax+1]
add	ecx, eax
movzx	ecx, byte ptr [ecx]
add	edx, ebx
add	edx, ecx
movzx	ecx, byte ptr [eax]
add	edx, ecx
sar	edx, 2
mov	[esi], dl
inc	esi
add	eax, 2
sub	[esp+1Ch+arg_0], 1
jnz	short loc_7FA323
mov	ebx, [esp+1Ch+arg_4]
mov	ecx, [esp+1Ch+var_C]
mov	edx, [esp+1Ch+var_8]

loc_7FA359:
mov	esi, [esp+1Ch+var_4]
inc	edx
add	esi, edi
cmp	edx, ecx
mov	[esp+1Ch+var_8], edx
mov	[esp+1Ch+var_4], esi
jl	short loc_7FA310

loc_7FA36C:
mov	[ebp+0], edi
pop	edi
pop	esi
pop	ebp
mov	[ebx], ecx
pop	ebx
add	esp, 0Ch
retn
sub_7FA2B0 endp

align 10h



sub_7FA380 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
xor	ebx, ebx
cmp	[esp+4+arg_8], ebx
push	esi
setnz	bl
mov	esi, ecx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	edi
mov	edi, [esp+0Ch+arg_0]
inc	ebx
cmp	[esp+0Ch+arg_4], 1
jnz	short loc_7FA3B4
push	3
push	1
push	edi
push	eax
call	edx
push	3
jmp	short loc_7FA3BE

loc_7FA3B4:
push	1
push	1
push	edi
push	eax
call	edx
push	1

loc_7FA3BE:
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	2
push	edi
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	ebx
push	6
push	edi
push	eax
call	edx
mov	esi, [esi+1ACh]
mov	eax, [esi]
mov	ecx, [eax+114h]
push	ebx
push	5
push	edi
push	esi
call	ecx
pop	edi
pop	esi
pop	ebx
retn	10h
sub_7FA380 endp

align 10h



sub_7FA410 proc	near
mov	eax, [ecx+34h]
retn
sub_7FA410 endp

align 10h



sub_7FA420 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_7FA438
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[esi+34h], ebx

loc_7FA438:
mov	[esi+20h], bl
mov	[esi+1Ch], ebx
pop	esi
pop	ebx
retn
sub_7FA420 endp

align 10h



sub_7FA450 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_10]
sub	eax, 1
push	ebx
mov	ebx, [esp+4+arg_C]
push	ebp
mov	ebp, [esp+8+arg_8]
jz	short loc_7FA4A1
sub	eax, 2
jz	short loc_7FA487
sub	eax, 1
jnz	short loc_7FA4B8
mov	eax, [esp+8+arg_4]
push	1
push	ecx
mov	ecx, [esp+10h+arg_0]
push	edx
push	esi
push	edi
push	ebx
push	ebp
push	eax
push	ecx
call	sub_68CF50
pop	ebp
pop	ebx
retn

loc_7FA487:
mov	eax, [esp+8+arg_0]
push	2
push	ecx
push	edx
mov	edx, [esp+14h+arg_4]
push	esi
push	edi
push	ebx
push	ebp
push	edx
push	eax
call	sub_68CF50
pop	ebp
pop	ebx
retn

loc_7FA4A1:
push	3
push	ecx
mov	ecx, [esp+10h+arg_4]
push	edx
mov	edx, [esp+14h+arg_0]
push	esi
push	edi
push	ebx
push	ebp
push	ecx
push	edx
call	sub_68CF50

loc_7FA4B8:
pop	ebp
pop	ebx
retn
sub_7FA450 endp

align 10h



sub_7FA4C0 proc	near

var_20=	byte ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 20h
push	esi
mov	esi, ecx
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_7FA528
cmp	dword ptr [eax+1ACh], 0
jz	short loc_7FA528
mov	eax, [esi]
mov	edx, [eax+38h]
push	edi
call	edx
mov	edi, [esp+28h+arg_0]
test	edi, edi
jz	short loc_7FA515
mov	eax, [edi]
mov	edx, [eax+44h]
lea	ecx, [esp+28h+var_20]
push	ecx
push	0
push	edi
call	edx
mov	eax, [esp+28h+var_8]
mov	ecx, [esp+28h+var_4]
mov	[esi+28h], eax
mov	[esi+2Ch], ecx
mov	[esi+34h], edi
mov	edx, [edi]
mov	eax, [edx+4]
push	edi
call	eax
mov	cl, [esp+28h+arg_4]
mov	[esi+20h], cl

loc_7FA515:
push	0
mov	ecx, esi
call	sub_804AB0
pop	edi
mov	al, 1
pop	esi
add	esp, 20h
retn	8

loc_7FA528:
xor	al, al
pop	esi
add	esp, 20h
retn	8
sub_7FA4C0 endp

align 10h



sub_7FA540 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	esi
mov	esi, ecx
mov	eax, [esi+24h]
test	eax, eax
jz	loc_7FA682
cmp	dword ptr [eax+1ACh], 0
jz	loc_7FA682
mov	eax, [esi]
mov	edx, [eax+38h]
call	edx
mov	eax, [esp+4+arg_8]
cmp	eax, 1
jnz	short loc_7FA574
mov	dword ptr [esi+1Ch], 15h
jmp	short loc_7FA597

loc_7FA574:
cmp	eax, 2
jnz	short loc_7FA582
mov	dword ptr [esi+1Ch], 15h
jmp	short loc_7FA597

loc_7FA582:
cmp	eax, 9
jnz	loc_7FA682
mov	eax, [esi+24h]
mov	ecx, [eax+1C8h]
mov	[esi+1Ch], ecx

loc_7FA597:
mov	edx, [esp+4+arg_0]
mov	eax, [esp+4+arg_4]
mov	ecx, [esi+24h]
mov	[esi+28h], edx
mov	[esi+2Ch], eax
cmp	byte ptr [ecx+395h], 0
mov	ecx, [esp+4+arg_10]
jnz	short loc_7FA5BE
test	cl, 20h
jnz	short loc_7FA5BE
xor	eax, eax
jmp	short loc_7FA5C3

loc_7FA5BE:
mov	eax, 1

loc_7FA5C3:
push	ebp
push	edi
mov	[esi+20h], al
mov	eax, [esp+0Ch+arg_C]
and	ecx, 40h
mov	[esi+30h], eax
mov	[esp+0Ch+arg_8], ecx
lea	edi, [esi+34h]
lea	ebp, [eax+1]
push	ebx
lea	ecx, [ecx+0]

loc_7FA5E0:
cmp	[esp+10h+arg_8], 0
jz	short loc_7FA5EE
mov	ecx, 1
jmp	short loc_7FA609

loc_7FA5EE:
mov	edx, [esi+24h]
cmp	byte ptr [edx+394h], 0
jz	short loc_7FA607
cmp	byte ptr [esi+20h], 0
jnz	short loc_7FA607
mov	ecx, 200h
jmp	short loc_7FA609

loc_7FA607:
xor	ecx, ecx

loc_7FA609:
mov	eax, [esi+24h]
mov	eax, [eax+1ACh]
mov	edx, [eax]
mov	edx, [edx+5Ch]
xor	ebx, ebx
cmp	[esi+20h], bl
push	0
setnz	bl
push	edi
push	ebx
mov	ebx, [esi+1Ch]
push	ebx
push	ecx
mov	ecx, [esp+24h+arg_4]
push	ebp
push	ecx
mov	ecx, [esp+2Ch+arg_0]
push	ecx
push	eax
call	edx
test	eax, eax
jz	short loc_7FA679
mov	eax, [esi+1Ch]
cmp	eax, 1Ch
jnz	short loc_7FA655
mov	ecx, [esi+24h]
mov	eax, 33h
mov	[ecx+1C8h], eax
mov	[esi+1Ch], eax
jmp	short loc_7FA5E0

loc_7FA655:
cmp	eax, 33h
jnz	short loc_7FA670
mov	edx, [esi+24h]
mov	eax, 1Ah
mov	[edx+1C8h], eax
mov	[esi+1Ch], eax
jmp	loc_7FA5E0

loc_7FA670:
pop	ebx
pop	edi
pop	ebp
xor	al, al
pop	esi
retn	14h

loc_7FA679:
pop	ebx
pop	edi
pop	ebp
mov	al, 1
pop	esi
retn	14h

loc_7FA682:
xor	al, al
pop	esi
retn	14h
sub_7FA540 endp

align 10h



sub_7FA690 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

sub	esp, 8
push	esi
mov	esi, ecx
cmp	dword ptr [esi+34h], 0
jnz	short loc_7FA6D1
cmp	dword ptr [esi+1Ch], 15h
mov	eax, 9
jnz	short loc_7FA6AC
mov	eax, 1

loc_7FA6AC:
mov	ecx, [esi+30h]
mov	edx, [esi]
mov	edx, [edx+8]
push	20h
push	ecx
mov	ecx, [esi+28h]
push	eax
mov	eax, [esi+2Ch]
push	eax
push	ecx
mov	ecx, esi
call	edx
test	al, al
jnz	short loc_7FA6D1
xor	eax, eax
pop	esi
add	esp, 8
retn	10h

loc_7FA6D1:
mov	eax, [esp+0Ch+arg_0]
push	ebx
mov	ebx, [esi+2Ch]
push	edi
mov	edi, [esi+28h]
test	eax, eax
jle	short loc_7FA700
mov	ecx, eax

loc_7FA6E3:
sar	ebx, 1
cmp	ebx, 1
jge	short loc_7FA6EF
mov	ebx, 1

loc_7FA6EF:
sar	edi, 1
cmp	edi, 1
jge	short loc_7FA6FB
mov	edi, 1

loc_7FA6FB:
sub	ecx, 1
jnz	short loc_7FA6E3

loc_7FA700:
mov	esi, [esi+34h]
mov	ecx, [esi]
push	0
push	0
lea	edx, [esp+1Ch+var_8]
push	edx
push	eax
mov	eax, [ecx+4Ch]
push	esi
call	eax
test	eax, eax
jge	short loc_7FA724
pop	edi
pop	ebx
xor	eax, eax
pop	esi
add	esp, 8
retn	10h

loc_7FA724:
mov	eax, [esp+14h+arg_8]
mov	ecx, [esp+14h+var_4]
mov	edx, [esp+14h+var_8]
mov	[eax], edi
pop	edi
mov	[eax+4], ebx
pop	ebx
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	eax, 1
pop	esi
add	esp, 8
retn	10h
sub_7FA690 endp

align 10h



sub_7FA750 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+34h]
mov	edx, [esp+arg_0]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+50h]
call	eax
neg	eax
sbb	eax, eax
inc	eax
retn	10h
sub_7FA750 endp

align 10h



sub_7FA770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
cmp	dword ptr [esi+34h], 0
push	edi
jnz	short loc_7FA77F
call	sub_8047A0

loc_7FA77F:
mov	edx, [esi+34h]
mov	eax, [esi+24h]
mov	eax, [eax+1ACh]
mov	edi, [esp+8+arg_0]
mov	ecx, [eax]
push	edx
push	edi
push	eax
mov	eax, [ecx+104h]
call	eax
mov	ecx, [esp+8+arg_C]
mov	edx, [esp+8+arg_8]
mov	eax, [esp+8+arg_4]
push	ecx
mov	ecx, [esi+24h]
push	edx
push	eax
push	edi
call	sub_7FA380
pop	edi
pop	esi
retn	10h
sub_7FA770 endp

align 10h



sub_7FA7C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
push	edi
test	eax, eax
jz	short loc_7FA7DA
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi+34h], 0

loc_7FA7DA:
mov	dword ptr [esi+1Ch], 0
mov	byte ptr [esi+20h], 0
add	esi, 3Ch
mov	edi, 3
lea	ecx, [ecx+0]

loc_7FA7F0:
mov	eax, [esi]
test	eax, eax
jz	short loc_7FA804
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_7FA804:
add	esi, 4
sub	edi, 1
jnz	short loc_7FA7F0
pop	edi
pop	esi
retn
sub_7FA7C0 endp

align 10h



sub_7FA810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	eax, [esi+24h]
test	eax, eax
jz	loc_7FA90C
cmp	dword ptr [eax+1ACh], 0
jz	loc_7FA90C
mov	eax, [esi]
mov	edx, [eax+38h]
push	ebx
push	ebp
push	edi
call	edx
mov	edi, [esp+10h+arg_C]
mov	ebx, [esp+10h+arg_0]
mov	ebp, [esp+10h+arg_4]
mov	eax, [esi+24h]
push	0
lea	edx, [esi+34h]
push	edx
push	1
push	1Ch
mov	[esi+30h], edi
push	0
inc	edi
push	edi
mov	[esi+28h], ebx
mov	[esi+2Ch], ebp
mov	byte ptr [esi+20h], 1
mov	eax, [eax+1ACh]
mov	ecx, [eax]
push	ebp
push	ebx
push	eax
mov	eax, [ecx+5Ch]
call	eax
mov	ecx, [esi+24h]
push	0
mov	[esp+14h+arg_C], eax
mov	eax, [ecx+1ACh]
mov	edx, [eax]
mov	edx, [edx+5Ch]
lea	ecx, [esi+3Ch]
push	ecx
push	1
push	1Ch
push	0
push	edi
sar	ebp, 1
push	ebp
sar	ebx, 1
push	ebx
push	eax
call	edx
or	[esp+10h+arg_C], eax
mov	eax, [esi+24h]
mov	eax, [eax+1ACh]
mov	ecx, [eax]
push	0
lea	edx, [esi+40h]
push	edx
push	1
push	1Ch
push	0
push	edi
push	ebp
push	ebx
push	eax
mov	eax, [ecx+5Ch]
call	eax
mov	ebx, [esp+10h+arg_C]
or	ebx, eax
cmp	[esp+10h+arg_8], 1
jnz	short loc_7FA8F8
mov	ecx, [esi+24h]
push	0
mov	byte ptr [esi+38h], 1
mov	eax, [ecx+1ACh]
mov	edx, [eax]
mov	edx, [edx+5Ch]
lea	ecx, [esi+44h]
push	ecx
mov	ecx, [esp+18h+arg_4]
push	1
push	1Ch
push	0
push	edi
push	ecx
mov	ecx, [esp+2Ch+arg_0]
push	ecx
push	eax
call	edx
or	ebx, eax
jmp	short loc_7FA8FC

loc_7FA8F8:
mov	byte ptr [esi+38h], 0

loc_7FA8FC:
pop	edi
pop	ebp
test	ebx, ebx
pop	ebx
jz	short loc_7FA912
mov	eax, [esi]
mov	edx, [eax+38h]
mov	ecx, esi
call	edx

loc_7FA90C:
xor	al, al
pop	esi
retn	14h

loc_7FA912:
mov	al, 1
pop	esi
retn	14h
sub_7FA810 endp

align 10h



sub_7FA920 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+34h], 0
jnz	short loc_7FA95A
mov	ecx, [ebx+30h]
mov	eax, [ebx]
mov	eax, [eax+8]
xor	edx, edx
cmp	[ebx+38h], dl
push	20h
setz	dl
push	ecx
mov	ecx, [ebx+2Ch]
inc	edx
push	edx
mov	edx, [ebx+28h]
push	ecx
push	edx
mov	ecx, ebx
call	eax
test	al, al
jnz	short loc_7FA95A
xor	eax, eax
pop	ebx
add	esp, 10h
retn	10h

loc_7FA95A:
mov	ecx, [ebx+2Ch]
push	ebp
push	esi
mov	esi, [ebx+28h]
mov	[esp+1Ch+var_10], ecx
mov	ecx, [esp+1Ch+arg_0]
push	edi
mov	[esp+20h+var_C], esi
test	ecx, ecx
jle	short loc_7FA9A0
mov	edx, ecx

loc_7FA975:
mov	edi, [esp+20h+var_10]
sar	edi, 1
mov	eax, 1
cmp	edi, eax
mov	[esp+20h+var_10], edi
jge	short loc_7FA98C
mov	[esp+20h+var_10], eax

loc_7FA98C:
sar	esi, 1
cmp	esi, eax
mov	[esp+20h+var_C], esi
jge	short loc_7FA99C
mov	[esp+20h+var_C], eax
mov	esi, eax

loc_7FA99C:
sub	edx, eax
jnz	short loc_7FA975

loc_7FA9A0:
mov	eax, [ebx+34h]
xor	edx, edx
cmp	[ebx+38h], dl
push	0
setnz	dl
push	0
lea	edi, [esp+28h+var_8]
push	edi
push	ecx
push	eax
add	edx, 3
mov	ebp, edx
mov	edx, [eax]
mov	eax, [edx+4Ch]
call	eax
mov	edi, [esp+20h+arg_8]
mov	ecx, [esp+20h+var_4]
mov	edx, [esp+20h+var_8]
mov	eax, [esp+20h+var_10]
mov	[edi], esi
mov	esi, 1
cmp	ebp, esi
mov	[edi+8], ecx
mov	[edi+0Ch], edx
mov	[edi+4], eax
jle	short loc_7FAA36

loc_7FA9E6:
mov	eax, [ebx+esi*4+38h]
mov	ecx, [eax]
push	0
push	0
lea	edx, [esp+28h+var_8]
push	edx
mov	edx, [esp+2Ch+arg_0]
push	edx
push	eax
mov	eax, [ecx+4Ch]
call	eax
mov	edx, [esp+20h+var_4]
mov	ecx, esi
shl	ecx, 4
lea	eax, [ecx+edi]
mov	ecx, [esp+20h+var_8]
mov	[eax+0Ch], ecx
mov	ecx, [esp+20h+var_C]
mov	[eax+8], edx
cmp	esi, 3
jz	short loc_7FAA21
sar	ecx, 1

loc_7FAA21:
mov	[eax], ecx
mov	ecx, [esp+20h+var_10]
cmp	esi, 3
jz	short loc_7FAA2E
sar	ecx, 1

loc_7FAA2E:
inc	esi
cmp	esi, ebp
mov	[eax+4], ecx
jl	short loc_7FA9E6

loc_7FAA36:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	10h
sub_7FA920 endp

align 10h



sub_7FAA50 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
mov	ecx, [eax]
mov	edx, [ecx+50h]
push	edi
push	ebx
push	eax
call	edx
add	esi, 3Ch
mov	edi, 3
lea	ecx, [ecx+0]

loc_7FAA70:
cmp	dword ptr [esi], 0
jz	short loc_7FAA80
mov	eax, [esi]
mov	ecx, [eax]
mov	edx, [ecx+50h]
push	ebx
push	eax
call	edx

loc_7FAA80:
add	esi, 4
sub	edi, 1
jnz	short loc_7FAA70
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn	10h
sub_7FAA50 endp




sub_7FAA90 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	ecx, [esi+34h]
test	ecx, ecx
jnz	short loc_7FAABF
mov	ecx, [esi+30h]
mov	eax, [esi]
mov	eax, [eax+8]
xor	edx, edx
cmp	[esi+38h], dl
push	20h
setz	dl
push	ecx
mov	ecx, [esi+2Ch]
inc	edx
push	edx
mov	edx, [esi+28h]
push	ecx
push	edx
mov	ecx, esi
call	eax
pop	esi
retn	10h

loc_7FAABF:
mov	edx, [esi+24h]
mov	eax, [edx+1ACh]
mov	edx, [eax]
push	ebx
push	ebp
push	edi
push	ecx
push	0
push	eax
mov	eax, [edx+104h]
call	eax
mov	ecx, [esi+24h]
mov	eax, [ecx+1ACh]
mov	ecx, [esi+3Ch]
mov	edx, [eax]
mov	edx, [edx+104h]
push	ecx
push	1
push	eax
call	edx
mov	edx, [esi+40h]
mov	eax, [esi+24h]
mov	eax, [eax+1ACh]
mov	ecx, [eax]
push	edx
push	2
push	eax
mov	eax, [ecx+104h]
call	eax
mov	edi, [esp+10h+arg_C]
mov	ebx, [esp+10h+arg_8]
mov	ebp, [esp+10h+arg_4]
mov	ecx, [esi+24h]
push	edi
push	ebx
push	ebp
push	0
call	sub_7FA380
mov	ecx, [esi+24h]
push	edi
push	ebx
push	ebp
push	1
call	sub_7FA380
mov	ecx, [esi+24h]
push	edi
push	ebx
push	ebp
push	2
call	sub_7FA380
mov	eax, [esi+44h]
test	eax, eax
jz	short loc_7FAB6B
mov	ecx, [esi+24h]
mov	ecx, [ecx+1ACh]
mov	edx, [ecx]
push	eax
mov	eax, [edx+104h]
push	3
push	ecx
call	eax
mov	ecx, [esi+24h]
push	edi
push	ebx
push	ebp
push	3
call	sub_7FA380

loc_7FAB6B:
pop	edi
pop	ebp
pop	ebx
pop	esi
retn	10h
sub_7FAA90 endp

align 10h



sub_7FAB80 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+38h]
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_7FAB95
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FAB95:
mov	[esi+1Ch], edi
mov	[esi+38h], edi
pop	edi
pop	esi
retn
sub_7FAB80 endp

align 10h



sub_7FABA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_7FAC04
cmp	dword ptr [eax+1ACh], 0
jz	short loc_7FAC04
mov	eax, [esi]
mov	edx, [eax+38h]
push	edi
call	edx
mov	ecx, [esp+8+arg_0]
mov	edx, [esp+8+arg_4]
mov	eax, [esp+8+arg_C]
push	0
mov	[esi+30h], eax
mov	eax, [esi+24h]
mov	[esi+28h], ecx
mov	[esi+2Ch], edx
mov	dword ptr [esi+1Ch], 4Bh
mov	eax, [eax+1ACh]
mov	edi, [eax]
add	esi, 38h
push	esi
push	1
push	0
push	0
push	4Bh
push	edx
push	ecx
mov	ecx, [edi+74h]
push	eax
call	ecx
xor	eax, eax
cmp	[esi], eax
pop	edi
setnz	al
pop	esi
retn	14h

loc_7FAC04:
xor	al, al
pop	esi
retn	14h
sub_7FABA0 endp

align 10h



sub_7FAC10 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
lea	ebp, [esi+24h]
xor	ebx, ebx
mov	dword ptr [esi+2Ch], 0C0000h
mov	dword ptr [esi+30h], 30000h
cmp	[ebp+0], ebx
jnz	short loc_7FAC65
lea	ecx, [ecx+0]

loc_7FAC30:
mov	eax, [esi]
mov	edx, [esi+2Ch]
mov	ecx, [eax]
push	ebx
push	ebp
push	ebx
push	ebx
push	208h
push	edx
push	eax
mov	eax, [ecx+68h]
call	eax
cmp	eax, ebx
jge	short loc_7FAC65
mov	eax, [esi+2Ch]
cmp	eax, 18000h
jbe	short loc_7FAC5C
shr	eax, 1
mov	[esi+2Ch], eax
jmp	short loc_7FAC30

loc_7FAC5C:
mov	[esi+2Ch], ebx
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_7FAC65:
cmp	[esi+28h], ebx
push	edi
lea	edi, [esi+28h]
jnz	short loc_7FACBC
mov	edi, edi

loc_7FAC70:
mov	eax, [esi]
mov	edx, [esi+30h]
mov	ecx, [eax]
push	ebx
push	edi
push	ebx
push	65h
push	208h
push	edx
push	eax
mov	eax, [ecx+6Ch]
call	eax
cmp	eax, ebx
jge	short loc_7FACBC
mov	eax, [esi+30h]
cmp	eax, 0C000h
jbe	short loc_7FAC9D
shr	eax, 1
mov	[esi+30h], eax
jmp	short loc_7FAC70

loc_7FAC9D:
mov	eax, [ebp+0]
cmp	eax, ebx
jz	short loc_7FACAC
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FACAC:
mov	[ebp+0], ebx
pop	edi
mov	[esi+30h], ebx
mov	[esi+2Ch], ebx
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_7FACBC:
pop	edi
mov	[esi+34h], ebx
mov	[esi+38h], ebx
mov	[esi+3Ch], bl
mov	[esi+3Dh], bl
mov	[esi+40h], ebx
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+64h], ebx
mov	[esi+68h], ebx
mov	[esi+4], bl
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_7FAC10 endp

align 10h



sub_7FACF0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+24h]
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_7FAD05
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FAD05:
mov	[esi+24h], edi
mov	eax, [esi+28h]
cmp	eax, edi
jz	short loc_7FAD17
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FAD17:
mov	al, [esp+8+arg_0]
mov	[esi+28h], edi
mov	[esi+2Ch], edi
mov	[esi+30h], edi
mov	[esi+64h], edi
mov	[esi+68h], edi
pop	edi
mov	[esi+4], al
pop	esi
retn	4
sub_7FACF0 endp

align 10h



; int __stdcall	sub_7FAD40(LPVOID lp, int)
sub_7FAD40 proc	near

lp= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
xor	eax, eax
cmp	[esi+4], al
jz	short loc_7FAD4E
pop	esi
retn	8

loc_7FAD4E:
mov	ecx, [esi+2Ch]
push	ebp
mov	ebp, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+lp]
imul	edi, ebp
cmp	edi, ecx
ja	loc_7FADEA
mov	edx, [esi+24h]
cmp	edx, eax
jz	short loc_7FADEA
mov	[esp+0Ch+lp], eax
mov	[esi+3Ch], al
mov	eax, [esi+38h]
push	ebx
lea	ebx, [eax+edi]
add	ebx, ebp
cmp	ebx, ecx
jnb	short loc_7FAD90
mov	ebx, eax
lea	eax, [ebx+edi]
mov	[esi+38h], eax
mov	eax, 1000h
jmp	short loc_7FAD9A

loc_7FAD90:
xor	ebx, ebx
mov	[esi+38h], edi
mov	eax, 2000h

loc_7FAD9A:
mov	ecx, [edx]
mov	ecx, [ecx+2Ch]
push	eax
lea	eax, [esp+14h+lp]
push	eax
push	edi
push	ebx
push	edx
call	ecx
test	eax, eax
jl	short loc_7FADD0
mov	edx, [esp+10h+lp]
push	edi		; ucb
push	edx		; lp
call	ds:IsBadWritePtr
test	eax, eax
jz	short loc_7FADD9
mov	esi, [esi+24h]
mov	eax, [esi]
mov	ecx, [eax+30h]
push	esi
mov	byte_185923C, 1
call	ecx

loc_7FADD0:
pop	ebx
pop	edi
pop	ebp
xor	eax, eax
pop	esi
retn	8

loc_7FADD9:
mov	eax, [esp+10h+lp]
mov	[esi+40h], ebx
pop	ebx
pop	edi
mov	[esi+4Ch], ebp
pop	ebp
pop	esi
retn	8

loc_7FADEA:
pop	edi
pop	ebp
xor	eax, eax
pop	esi
retn	8
sub_7FAD40 endp

align 10h



sub_7FAE00 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+24h]
mov	ecx, [eax]
mov	edx, [ecx+30h]
push	eax
call	edx
mov	edx, [esi+4Ch]
mov	eax, [esi]
mov	ecx, [eax]
push	edx
mov	edx, [esi+40h]
push	edx
mov	edx, [esi+24h]
push	edx
push	0
push	eax
mov	eax, [ecx+190h]
call	eax
pop	esi
retn
sub_7FAE00 endp

align 10h



; int __stdcall	sub_7FAE30(LPVOID lp, int)
sub_7FAE30 proc	near

lp= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	[esi+4], bl
jz	short loc_7FAE42
pop	esi
xor	eax, eax
pop	ebx
retn	8

loc_7FAE42:
mov	ecx, [esi+30h]
push	edi
mov	edi, [esp+0Ch+lp]
imul	edi, [esp+0Ch+arg_4]
cmp	edi, ecx
ja	short loc_7FAEAF
mov	edx, [esi+28h]
cmp	edx, ebx
jz	short loc_7FAEAF
mov	eax, [esi+34h]
sub	ecx, eax
mov	[esp+0Ch+lp], ebx
mov	[esi+3Dh], bl
cmp	ecx, edi
jbe	short loc_7FAE78
mov	ebx, eax
add	eax, edi
mov	[esi+34h], eax
mov	eax, 1000h
jmp	short loc_7FAE80

loc_7FAE78:
mov	[esi+34h], edi
mov	eax, 2000h

loc_7FAE80:
mov	ecx, [edx]
mov	ecx, [ecx+2Ch]
push	eax
lea	eax, [esp+10h+lp]
push	eax
push	edi
push	ebx
push	edx
call	ecx
test	eax, eax
jl	short loc_7FAEAF
mov	edx, [esp+0Ch+lp]
push	edi		; ucb
push	edx		; lp
call	ds:IsBadWritePtr
test	eax, eax
jz	short loc_7FAEB7
mov	esi, [esi+28h]
mov	eax, [esi]
mov	ecx, [eax+30h]
push	esi
call	ecx

loc_7FAEAF:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	8

loc_7FAEB7:
mov	eax, [esp+0Ch+lp]
pop	edi
mov	[esi+48h], ebx
pop	esi
pop	ebx
retn	8
sub_7FAE30 endp

align 10h



; int __stdcall	sub_7FAED0(int,	LPVOID lp)
sub_7FAED0 proc	near

arg_0= dword ptr  4
lp= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+lp]
mov	esi, ecx
mov	eax, [esi+14h]
push	eax		; int
push	edi		; lp
call	sub_7FAD40
test	eax, eax
jnz	short loc_7FAEED
pop	edi
xor	al, al
pop	esi
retn	8

loc_7FAEED:
mov	ecx, [esi+14h]
mov	edx, ecx
imul	ecx, [esp+8+arg_0]
add	ecx, [esi+8]
imul	edx, edi
push	edx
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi+24h]
mov	ecx, [eax]
mov	edx, [ecx+30h]
add	esp, 0Ch
push	eax
call	edx
mov	edx, [esi+4Ch]
mov	eax, [esi]
mov	ecx, [eax]
push	edx
mov	edx, [esi+40h]
push	edx
mov	edx, [esi+24h]
push	edx
push	0
push	eax
mov	eax, [ecx+190h]
call	eax
pop	edi
mov	al, 1
pop	esi
retn	8
sub_7FAED0 endp

align 10h



sub_7FAF40 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+24h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_7FAF55
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FAF55:
mov	[esi+24h], ebx
mov	eax, [esi+28h]
cmp	eax, ebx
jz	short loc_7FAF67
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FAF67:
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
mov	[esi+30h], ebx
mov	[esi+64h], ebx
mov	[esi+68h], ebx
mov	[esi+4], bl
mov	eax, [esi+28h]
cmp	eax, ebx
jz	short loc_7FAF88
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FAF88:
mov	esi, [esi+24h]
cmp	esi, ebx
jz	short loc_7FAF97
mov	eax, [esi]
mov	ecx, [eax+8]
push	esi
call	ecx

loc_7FAF97:
pop	esi
pop	ebx
retn
sub_7FAF40 endp

align 10h



sub_7FAFA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
cmp	byte ptr [esi+4], 0
jz	short loc_7FAFAF
xor	al, al
pop	esi
retn	4

loc_7FAFAF:
mov	eax, [esp+4+arg_0]
mov	ecx, [eax]
mov	[esi+50h], ecx
mov	edx, [eax+4]
mov	[esi+54h], edx
mov	ecx, [eax+8]
mov	[esi+58h], ecx
mov	edx, [eax+0Ch]
mov	[esi+5Ch], edx
mov	edx, [esi+1Ch]
mov	eax, [eax+10h]
push	edi
mov	[esi+60h], eax
cmp	edx, 20h
jnb	short loc_7FAFF7
mov	eax, [esi+14h]
lea	ecx, [eax+eax*2]
mov	eax, [esi+2Ch]
xor	edx, edx
div	ecx
pop	edi
mov	dword ptr [esi+64h], 3
mov	[esi+68h], eax
mov	al, 1
pop	esi
retn	4

loc_7FAFF7:
cmp	byte ptr [esi+3Ch], 0
jnz	short loc_7FB055
mov	ecx, [esi+14h]
mov	eax, [esi+2Ch]
mov	edi, ecx
imul	edi, edx
cmp	edi, eax
jbe	short loc_7FB024
lea	ecx, [ecx+ecx*2]
xor	edx, edx
div	ecx
pop	edi
mov	dword ptr [esi+64h], 3
mov	[esi+68h], eax
mov	al, 1
pop	esi
retn	4

loc_7FB024:		; int
push	ecx
push	edx		; lp
mov	ecx, esi
call	sub_7FAD40
test	eax, eax
jz	loc_7FB0CF
mov	edx, [esi+1Ch]
imul	edx, [esi+14h]
mov	ecx, [esi+8]
push	edx
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	ecx, esi
call	sub_7FAE00
mov	byte ptr [esi+3Ch], 1

loc_7FB055:
cmp	byte ptr [esi+3Dh], 0
jnz	short loc_7FB0C1
mov	ecx, [esi+20h]
mov	eax, [esi+30h]
xor	edx, edx
cmp	dword ptr [esi+18h], 65h
setnz	dl
lea	edx, [edx+edx+2]
mov	edi, edx
mov	edx, ecx
imul	edx, edi
cmp	edx, eax
jbe	short loc_7FB091
lea	ecx, [edi+edi*2]
xor	edx, edx
div	ecx
pop	edi
mov	dword ptr [esi+64h], 2
mov	[esi+68h], eax
mov	al, 1
pop	esi
retn	4

loc_7FB091:		; int
push	edi
push	ecx		; lp
mov	ecx, esi
call	sub_7FAE30
test	eax, eax
jz	short loc_7FB0CF
mov	edx, [esi+20h]
mov	ecx, [esi+0Ch]
imul	edx, edi
push	edx
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi+28h]
mov	edx, [eax]
add	esp, 0Ch
push	eax
mov	eax, [edx+30h]
call	eax
mov	byte ptr [esi+3Dh], 1

loc_7FB0C1:
pop	edi
mov	dword ptr [esi+64h], 1
mov	al, 1
pop	esi
retn	4

loc_7FB0CF:
pop	edi
mov	dword ptr [esi+64h], 0
xor	al, al
pop	esi
retn	4
sub_7FAFA0 endp

align 10h



sub_7FB0E0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+64h]
cmp	eax, 1
jnz	short loc_7FB115
mov	edx, [esi+60h]
mov	eax, [esi]
mov	ecx, [eax]
push	edx
mov	edx, [esi+48h]
shr	edx, 1
add	edx, [esi+5Ch]
push	edx
mov	edx, [esi+58h]
push	edx
mov	edx, [esi+54h]
push	edx
mov	edx, [esi+50h]
push	edx
push	4
push	eax
mov	eax, [ecx+148h]
call	eax
pop	esi
retn

loc_7FB115:
push	ebx
push	edi
cmp	eax, 3
jnz	loc_7FB1B3
mov	eax, [esi+60h]
xor	edi, edi
test	eax, eax
jle	loc_7FB258
lea	ecx, [ecx+0]

loc_7FB130:
mov	ecx, [esi+68h]
sub	eax, edi
cmp	eax, ecx
mov	ebx, eax
jl	short loc_7FB13D
mov	ebx, ecx

loc_7FB13D:
mov	ecx, [esi+14h]
push	ecx		; int
lea	edx, [ebx+ebx*2]
push	edx		; lp
mov	ecx, esi
call	sub_7FAD40
test	eax, eax
jz	loc_7FB258
mov	edx, [esi+14h]
push	ebx
lea	ecx, [edi+edi*2]
add	ecx, [esi+5Ch]
push	ecx
mov	ecx, [esi+50h]
push	edx
push	ecx
push	eax
mov	ecx, esi
call	sub_7FA0E0
mov	eax, [esi+24h]
mov	edx, [eax]
push	eax
mov	eax, [edx+30h]
call	eax
mov	edx, [esi+4Ch]
mov	eax, [esi]
mov	ecx, [eax]
push	edx
mov	edx, [esi+40h]
push	edx
mov	edx, [esi+24h]
push	edx
push	0
push	eax
mov	eax, [ecx+190h]
call	eax
mov	edx, [esi+44h]
mov	eax, [esi]
mov	ecx, [eax]
push	ebx
push	edx
push	4
push	eax
mov	eax, [ecx+144h]
call	eax
mov	eax, [esi+60h]
add	edi, ebx
cmp	edi, eax
jl	short loc_7FB130
pop	edi
pop	ebx
pop	esi
retn

loc_7FB1B3:
cmp	eax, 2
jnz	loc_7FB258
mov	eax, [esi+60h]
xor	ebx, ebx
test	eax, eax
jle	loc_7FB258
push	ebp
lea	ebx, [ebx+0]

loc_7FB1D0:
mov	ecx, [esi+68h]
sub	eax, ebx
cmp	eax, ecx
mov	edi, eax
jl	short loc_7FB1DD
mov	edi, ecx

loc_7FB1DD:
xor	ecx, ecx
cmp	dword ptr [esi+18h], 65h
lea	edx, [edi+edi*2]
setnz	cl
lea	ecx, [ecx+ecx+2]
mov	ebp, ecx
push	ebp		; int
push	edx		; lp
mov	ecx, esi
call	sub_7FAE30
test	eax, eax
jz	short loc_7FB257
mov	ecx, ebp
imul	ecx, edi
lea	ecx, [ecx+ecx*2]
push	ecx
mov	ecx, [esi+5Ch]
lea	edx, [ebx+ebx*2]
add	ecx, edx
imul	ecx, ebp
add	ecx, [esi+0Ch]
push	ecx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esi+28h]
mov	edx, [eax]
add	esp, 0Ch
push	eax
mov	eax, [edx+30h]
call	eax
mov	edx, [esi+48h]
mov	eax, [esi]
mov	ecx, [eax]
push	edi
shr	edx, 1
push	edx
mov	edx, [esi+58h]
push	edx
mov	edx, [esi+54h]
push	edx
mov	edx, [esi+50h]
push	edx
push	4
push	eax
mov	eax, [ecx+148h]
call	eax
mov	eax, [esi+60h]
add	ebx, edi
cmp	ebx, eax
jl	loc_7FB1D0

loc_7FB257:
pop	ebp

loc_7FB258:
pop	edi
pop	ebx
pop	esi
retn
sub_7FB0E0 endp

align 10h



sub_7FB260 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
mov	[esi+24h], edi
call	sub_666680
test	al, al
jz	short loc_7FB2BE
mov	eax, [esi]
mov	edx, [eax+38h]
mov	ecx, esi
call	edx
push	2
mov	ecx, esi
call	sub_804AB0
cmp	[esi+0Ch], edi
jz	short loc_7FB2A0
mov	eax, [esi+8]
mov	ecx, [esi+0Ch]
mov	[eax+4], ecx
mov	edx, [esi+0Ch]
mov	eax, [esi+8]
mov	[edx], eax
mov	[esi+8], edi
mov	[esi+0Ch], edi

loc_7FB2A0:		; Value
push	0FFFFFFFFh
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FB2DA
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
pop	edi
pop	esi
retn

loc_7FB2BE:
cmp	[esi+0Ch], edi
jz	short loc_7FB2DA
mov	ecx, [esi+8]
mov	edx, [esi+0Ch]
mov	[ecx+4], edx
mov	eax, [esi+0Ch]
mov	ecx, [esi+8]
mov	[eax], ecx
mov	[esi+8], edi
mov	[esi+0Ch], edi

loc_7FB2DA:
pop	edi
pop	esi
retn
sub_7FB260 endp

align 10h


; Attributes: bp-based frame

sub_7FB2E0 proc	near

var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 64h
push	ebx
push	esi
mov	esi, [ebp+arg_C]
mov	eax, [esi]
push	edi
mov	edi, ecx
mov	[esp+70h+var_58], edi
mov	[esp+70h+var_5C], 0
cmp	eax, 1
jnz	short loc_7FB30E
mov	[esp+70h+var_5C], 4
jmp	short loc_7FB32A

loc_7FB30E:
cmp	eax, 2
jnz	short loc_7FB31D
mov	[esp+70h+var_5C], 3
jmp	short loc_7FB32A

loc_7FB31D:
cmp	eax, 9
jnz	short loc_7FB32A
mov	[esp+70h+var_5C], 1

loc_7FB32A:
cmp	dword ptr [edi+34h], 0
jnz	short loc_7FB33D
call	sub_8047A0
test	al, al
jz	loc_7FB984

loc_7FB33D:
mov	ecx, [edi+24h]
cmp	byte ptr [ecx+394h], 0
jnz	loc_7FB86E
cmp	byte ptr [edi+20h], 0
jnz	loc_7FB86E
mov	eax, [edi+1Ch]
cmp	eax, 1Ch
jnz	short loc_7FB3BE
cmp	dword ptr [ecx+374h], 0
jnz	short loc_7FB3B0
push	0
mov	eax, ecx
mov	ecx, [eax+1ACh]
mov	edx, [ecx]
lea	ebx, [eax+374h]
push	ebx
mov	ebx, [eax+370h]
mov	eax, [eax+36Ch]
push	2
push	1Ch
push	0
push	1
push	ebx
push	eax
push	ecx
mov	ecx, [edx+5Ch]
call	ecx
mov	eax, [edi+24h]
mov	ecx, [eax+374h]
mov	edx, [ecx]
add	eax, 384h
push	eax
mov	eax, [edx+48h]
push	0
push	ecx
call	eax

loc_7FB3B0:
mov	ecx, [edi+24h]
mov	edx, [ecx+384h]
jmp	loc_7FB4E6

loc_7FB3BE:
cmp	eax, 33h
jnz	short loc_7FB422
cmp	dword ptr [ecx+378h], 0
jnz	short loc_7FB414
push	0
mov	eax, ecx
mov	ecx, [eax+1ACh]
mov	edx, [ecx]
lea	ebx, [eax+378h]
push	ebx
mov	ebx, [eax+370h]
mov	eax, [eax+36Ch]
push	2
push	33h
push	0
push	1
push	ebx
push	eax
push	ecx
mov	ecx, [edx+5Ch]
call	ecx
mov	eax, [edi+24h]
mov	ecx, [eax+378h]
mov	edx, [ecx]
add	eax, 388h
push	eax
mov	eax, [edx+48h]
push	0
push	ecx
call	eax

loc_7FB414:
mov	ecx, [edi+24h]
mov	edx, [ecx+388h]
jmp	loc_7FB4E6

loc_7FB422:
cmp	eax, 1Ah
jnz	short loc_7FB483
cmp	dword ptr [ecx+37Ch], 0
jnz	short loc_7FB478
push	0
mov	eax, ecx
mov	ecx, [eax+1ACh]
mov	edx, [ecx]
lea	ebx, [eax+37Ch]
push	ebx
mov	ebx, [eax+370h]
mov	eax, [eax+36Ch]
push	2
push	1Ah
push	0
push	1
push	ebx
push	eax
push	ecx
mov	ecx, [edx+5Ch]
call	ecx
mov	eax, [edi+24h]
mov	ecx, [eax+37Ch]
mov	edx, [ecx]
add	eax, 38Ch
push	eax
mov	eax, [edx+48h]
push	0
push	ecx
call	eax

loc_7FB478:
mov	ecx, [edi+24h]
mov	edx, [ecx+38Ch]
jmp	short loc_7FB4E6

loc_7FB483:
cmp	eax, 15h
jnz	loc_7FB984
cmp	dword ptr [ecx+380h], 0
jnz	short loc_7FB4DD
push	0
mov	eax, ecx
mov	ecx, [eax+1ACh]
mov	edx, [ecx]
lea	ebx, [eax+380h]
push	ebx
mov	ebx, [eax+370h]
mov	eax, [eax+36Ch]
push	2
push	15h
push	0
push	1
push	ebx
push	eax
push	ecx
mov	ecx, [edx+5Ch]
call	ecx
mov	eax, [edi+24h]
mov	ecx, [eax+380h]
mov	edx, [ecx]
add	eax, 390h
push	eax
mov	eax, [edx+48h]
push	0
push	ecx
call	eax

loc_7FB4DD:
mov	ecx, [edi+24h]
mov	edx, [ecx+390h]

loc_7FB4E6:
mov	eax, [edi+34h]
mov	ecx, [eax]
mov	[esp+70h+var_60], edx
lea	edx, [esp+70h+var_4C]
push	edx
mov	edx, [ebp+arg_0]
push	edx
push	eax
mov	eax, [ecx+48h]
call	eax
test	eax, eax
jnz	loc_7FB984
cmp	[ebp+arg_4], eax
mov	[esp+70h+var_48], eax
jle	loc_7FB859
mov	eax, [ebp+arg_8]
add	eax, 10h
mov	[esp+70h+var_50], eax
lea	ecx, [ecx+0]

loc_7FB520:
mov	edx, [eax]
mov	ecx, [eax-8]
mov	ebx, [eax-4]
mov	[esp+70h+var_18], edx
mov	edx, [eax+4]
mov	[esp+70h+var_14], edx
mov	edx, [eax-10h]
mov	[esp+70h+var_30], edx
mov	edx, [eax-0Ch]
mov	[esp+70h+var_2C], edx
mov	edx, [esp+70h+var_18]
cmp	ecx, edx
mov	[esp+70h+var_20], ecx
mov	[esp+70h+var_1C], ebx
mov	[esp+70h+var_64], ecx
jge	loc_7FB840
lea	esp, [esp+0]

loc_7FB560:
cmp	ebx, [esp+70h+var_14]
mov	[esp+70h+var_54], ebx
jge	loc_7FB825
mov	edi, edi

loc_7FB570:
mov	eax, [edi+24h]
mov	edi, [eax+36Ch]
mov	eax, [eax+370h]
mov	edx, [esp+70h+var_18]
add	edi, ecx
add	eax, ebx
cmp	edi, edx
jle	short loc_7FB58D
mov	edi, edx

loc_7FB58D:
mov	edx, [esp+70h+var_14]
cmp	eax, edx
jle	short loc_7FB597
mov	eax, edx

loc_7FB597:
sub	eax, ebx
push	0
mov	[esp+74h+var_34], eax
mov	eax, [esp+74h+var_60]
push	0
lea	edx, [esp+78h+var_40]
sub	edi, ecx
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+34h]
call	eax
test	eax, eax
jl	loc_7FB859
mov	ecx, [esp+70h+var_58]
mov	eax, [ecx+1Ch]
add	eax, 0FFFFFFEBh
cmp	eax, 1Eh	; switch 31 cases
ja	loc_7FB79D	; default
			; jumptable 007FB5D6 cases 1-4,6,8-29
movzx	edx, ds:byte_7FB9A4[eax]
jmp	ds:off_7FB990[edx*4] ; switch jump

loc_7FB5DD:		; jumptable 007FB5D6 case 30
xor	ecx, ecx
cmp	[esp+70h+var_34], ecx
mov	[esp+70h+var_5C], ecx
jle	loc_7FB79D	; default
			; jumptable 007FB5D6 cases 1-4,6,8-29

loc_7FB5ED:
xor	eax, eax
test	edi, edi
jle	short loc_7FB643
lea	edx, [ecx+ebx]
mov	[esp+70h+var_44], edx

loc_7FB5FA:
mov	edx, [esi+0Ch]
imul	edx, [esp+70h+var_44]
mov	ebx, [esp+70h+var_40]
add	edx, [esi+10h]
imul	ebx, ecx
lea	ecx, [eax+eax]
add	ebx, ecx
mov	ecx, [esp+70h+var_64]
add	edx, eax
mov	dl, [edx+ecx]
mov	ecx, [esp+70h+var_3C]
mov	[ebx+ecx+1], dl
mov	ebx, [esp+70h+var_40]
mov	ecx, [esp+70h+var_5C]
imul	ebx, ecx
lea	edx, [eax+eax]
add	ebx, edx
mov	edx, [esp+70h+var_3C]
inc	eax
cmp	eax, edi
mov	byte ptr [ebx+edx], 0FFh
jl	short loc_7FB5FA
mov	ebx, [esp+70h+var_54]

loc_7FB643:
inc	ecx
cmp	ecx, [esp+70h+var_34]
mov	[esp+70h+var_5C], ecx
jl	short loc_7FB5ED
jmp	loc_7FB79D	; default
			; jumptable 007FB5D6 cases 1-4,6,8-29

loc_7FB653:		; jumptable 007FB5D6 case 5
xor	edx, edx
cmp	[esp+70h+var_34], edx
mov	[esp+70h+var_5C], edx
jle	loc_7FB79D	; default
			; jumptable 007FB5D6 cases 1-4,6,8-29

loc_7FB663:
xor	eax, eax
test	edi, edi
jle	short loc_7FB6B9
lea	ecx, [edx+ebx]
mov	[esp+70h+var_44], ecx

loc_7FB670:
imul	edx, [esp+70h+var_40]
mov	ebx, [esp+70h+var_3C]
lea	ecx, [eax+eax]
add	edx, ecx
mov	byte ptr [edx+ebx], 0FFh
mov	edx, [esi+0Ch]
imul	edx, [esp+70h+var_44]
add	edx, [esi+10h]
mov	ebx, [esp+70h+var_64]
add	edx, eax
mov	dl, [edx+ebx]
mov	ebx, [esp+70h+var_5C]
imul	ebx, [esp+70h+var_40]
add	ebx, ecx
mov	ecx, [esp+70h+var_3C]
or	dl, 0Fh
inc	eax
cmp	eax, edi
mov	[ebx+ecx+1], dl
mov	edx, [esp+70h+var_5C]
jl	short loc_7FB670
mov	ebx, [esp+70h+var_54]

loc_7FB6B9:
inc	edx
cmp	edx, [esp+70h+var_34]
mov	[esp+70h+var_5C], edx
jl	short loc_7FB663
jmp	loc_7FB79D	; default
			; jumptable 007FB5D6 cases 1-4,6,8-29

loc_7FB6C9:		; jumptable 007FB5D6 case 7
cmp	[esp+70h+var_34], 0
mov	[esp+70h+var_5C], 0
jle	loc_7FB79D	; default
			; jumptable 007FB5D6 cases 1-4,6,8-29
lea	esp, [esp+0]

loc_7FB6E0:
mov	edx, [esi]
push	edx
call	sub_73CAA0
mov	[esp+70h+var_44], eax
mov	eax, [esi]
push	eax
call	sub_73CAA0
imul	eax, [esp+70h+var_64]
mov	ecx, [esp+70h+var_44]
mov	edx, [esp+70h+var_5C]
imul	ecx, edi
imul	edx, [esp+70h+var_40]
add	edx, [esp+70h+var_3C]
push	ecx
mov	ecx, [esp+74h+var_5C]
add	ecx, ebx
imul	ecx, [esi+0Ch]
add	ecx, eax
add	ecx, [esi+10h]
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+7Ch+var_5C]
inc	eax
add	esp, 0Ch
cmp	eax, [esp+70h+var_34]
mov	[esp+70h+var_5C], eax
jl	short loc_7FB6E0
jmp	short loc_7FB79D ; default
			; jumptable 007FB5D6 cases 1-4,6,8-29

loc_7FB738:		; jumptable 007FB5D6 case 0
cmp	[esp+70h+var_34], 0
mov	[esp+70h+var_5C], 0
jle	short loc_7FB79D ; default
			; jumptable 007FB5D6 cases 1-4,6,8-29

loc_7FB747:
mov	eax, [esi]
push	eax
call	sub_73CAA0
mov	ecx, [esi]
push	ecx
mov	[esp+74h+var_44], eax
call	sub_73CAA0
imul	eax, [esp+70h+var_64]
mov	edx, [esp+70h+var_5C]
mov	ecx, [esp+70h+var_44]
add	edx, ebx
imul	ecx, edi
imul	edx, [esi+0Ch]
add	edx, eax
mov	eax, [esp+70h+var_5C]
imul	eax, [esp+70h+var_40]
add	edx, [esi+10h]
add	eax, [esp+70h+var_3C]
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+7Ch+var_5C]
inc	eax
add	esp, 0Ch
cmp	eax, [esp+70h+var_34]
mov	[esp+70h+var_5C], eax
jl	short loc_7FB747

loc_7FB79D:		; default
mov	eax, [esp+70h+var_60] ;	jumptable 007FB5D6 cases 1-4,6,8-29
mov	ecx, [eax]
mov	edx, [ecx+38h]
push	eax
call	edx
mov	edx, [esp+70h+var_2C]
sub	edx, [esp+70h+var_1C]
mov	ecx, [esp+70h+var_30]
sub	ecx, [esp+70h+var_20]
add	edx, ebx
add	ecx, [esp+70h+var_64]
mov	[esp+70h+var_24], edx
xor	eax, eax
mov	[esp+70h+var_10], eax
mov	[esp+70h+var_C], eax
mov	eax, [esp+70h+var_34]
lea	edx, [esp+70h+var_28]
push	edx
mov	edx, [esp+74h+var_4C]
push	edx
mov	[esp+78h+var_8], edi
mov	edi, [esp+78h+var_58]
mov	[esp+78h+var_4], eax
mov	eax, [edi+24h]
lea	edx, [esp+78h+var_10]
push	edx
mov	edx, [esp+7Ch+var_60]
mov	[esp+7Ch+var_28], ecx
mov	eax, [eax+1ACh]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+78h]
call	eax
mov	ecx, [edi+24h]
add	ebx, [ecx+370h]
mov	ecx, [esp+70h+var_64]
cmp	ebx, [esp+70h+var_14]
mov	[esp+70h+var_54], ebx
jl	loc_7FB570
mov	ebx, [esp+70h+var_1C]

loc_7FB825:
mov	edx, [edi+24h]
add	ecx, [edx+36Ch]
mov	eax, [esp+70h+var_50]
cmp	ecx, [esp+70h+var_18]
mov	[esp+70h+var_64], ecx
jl	loc_7FB560

loc_7FB840:
mov	ecx, [esp+70h+var_48]
inc	ecx
add	eax, 18h
cmp	ecx, [ebp+arg_4]
mov	[esp+70h+var_48], ecx
mov	[esp+70h+var_50], eax
jl	loc_7FB520

loc_7FB859:
mov	eax, [esp+70h+var_4C]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h

loc_7FB86E:
cmp	[ebp+arg_4], 0
mov	[esp+70h+var_54], 0
jle	loc_7FB984
mov	ebx, [ebp+arg_8]
add	ebx, 10h

loc_7FB886:
mov	edx, [ebx-4]
mov	ecx, [ebx+4]
mov	eax, [ebx-8]
sub	ecx, edx
mov	[esp+70h+var_1C], edx
mov	edx, [ebx-0Ch]
mov	[esp+70h+var_48], ecx
add	ecx, edx
mov	[esp+70h+var_20], eax
mov	eax, [ebx-10h]
mov	[esp+70h+var_4], ecx
mov	ecx, [ebx]
sub	ecx, [esp+70h+var_20]
mov	[esp+70h+var_10], eax
mov	[esp+70h+var_44], ecx
add	ecx, eax
mov	eax, edx
push	0
lea	edx, [esp+74h+var_10]
push	edx
lea	edx, [esp+78h+var_28]
push	edx
mov	edx, [ebp+arg_0]
mov	[esp+7Ch+var_C], eax
mov	eax, [edi+34h]
mov	[esp+7Ch+var_8], ecx
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+4Ch]
call	eax
test	eax, eax
jl	loc_7FB984
mov	ecx, [esp+70h+var_24]
xor	eax, eax
cmp	[esp+70h+var_48], eax
mov	[esp+70h+var_60], ecx
mov	[esp+70h+var_50], eax
jle	short loc_7FB960
mov	ecx, [esp+70h+var_44]
mov	edx, [esp+70h+var_5C]
imul	ecx, edx
mov	[esp+70h+var_58], ecx
mov	ecx, [esp+70h+var_20]
imul	ecx, edx
mov	[esp+70h+var_44], ecx
jmp	short loc_7FB928
jmp	short loc_7FB920
align 10h

loc_7FB920:
mov	ecx, [esp+70h+var_44]
mov	eax, [esp+70h+var_50]

loc_7FB928:
mov	edx, [esp+70h+var_58]
push	edx
mov	edx, [esp+74h+var_1C]
add	edx, eax
imul	edx, [esi+0Ch]
add	edx, [esi+10h]
add	edx, ecx
mov	ecx, [esp+74h+var_28]
imul	ecx, eax
add	ecx, [esp+74h+var_60]
push	edx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+7Ch+var_50]
inc	eax
add	esp, 0Ch
cmp	eax, [esp+70h+var_48]
mov	[esp+70h+var_50], eax
jl	short loc_7FB920

loc_7FB960:
mov	eax, [edi+34h]
mov	ecx, [ebp+arg_0]
mov	edx, [eax]
mov	edx, [edx+50h]
push	ecx
push	eax
call	edx
mov	eax, [esp+70h+var_54]
inc	eax
add	ebx, 18h
cmp	eax, [ebp+arg_4]
mov	[esp+70h+var_54], eax
jl	loc_7FB886

loc_7FB984:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	10h
sub_7FB2E0 endp

align 10h
off_7FB990 dd offset loc_7FB738	; jump table for switch	statement
dd offset loc_7FB653
dd offset loc_7FB6C9
dd offset loc_7FB5DD
dd offset loc_7FB79D
byte_7FB9A4 db	    0,	   4,	  4,	 4 ; indirect table for	switch statement
db	4,     1,     4,     2
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     4,     4
db	4,     4,     3
align 10h



sub_7FB9D0 proc	near
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
mov	[esi+24h], edi
call	sub_666680
test	al, al
jz	short loc_7FBA49
mov	eax, [esi+2Ch]
cmp	eax, edi
jz	short loc_7FB9F4
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[esi+2Ch], edi

loc_7FB9F4:
mov	eax, [esi+34h]
cmp	eax, edi
jz	short loc_7FBA06
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[esi+34h], edi

loc_7FBA06:
push	2
mov	ecx, esi
call	sub_804C30
cmp	[esi+0Ch], edi
jz	short loc_7FBA2B
mov	eax, [esi+8]
mov	ecx, [esi+0Ch]
mov	[eax+4], ecx
mov	edx, [esi+0Ch]
mov	eax, [esi+8]
mov	[edx], eax
mov	[esi+8], edi
mov	[esi+0Ch], edi

loc_7FBA2B:		; Value
push	0FFFFFFFFh
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FBA65
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
pop	edi
pop	esi
retn

loc_7FBA49:
cmp	[esi+0Ch], edi
jz	short loc_7FBA65
mov	ecx, [esi+8]
mov	edx, [esi+0Ch]
mov	[ecx+4], edx
mov	eax, [esi+0Ch]
mov	ecx, [esi+8]
mov	[eax], ecx
mov	[esi+8], edi
mov	[esi+0Ch], edi

loc_7FBA65:
pop	edi
pop	esi
retn
sub_7FB9D0 endp

align 10h



sub_7FBA70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, ecx
mov	eax, [esi+2Ch]
test	eax, eax
jz	short loc_7FBA89
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi+2Ch], 0

loc_7FBA89:
mov	eax, [esi+34h]
test	eax, eax
jz	short loc_7FBA9F
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi+34h], 0

loc_7FBA9F:
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	edi
test	ebp, ebp
jz	short loc_7FBAB8
push	1		; Value
lea	eax, [ebp+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd

loc_7FBAB8:
mov	edi, [esi+28h]
test	edi, edi
jz	short loc_7FBADA
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FBADA
test	edi, edi
jz	short loc_7FBADA
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_7FBADA:
mov	[esi+28h], ebp
mov	eax, ebp
mov	ecx, [eax+28h]
mov	[esi+1Ch], ecx
mov	edx, [eax+2Ch]
mov	[esi+20h], edx
test	eax, eax
jz	short loc_7FBB04
mov	eax, [eax+34h]
test	eax, eax
jz	short loc_7FBB04
mov	edx, [eax]
lea	ecx, [esi+2Ch]
push	ecx
push	0
push	eax
mov	eax, [edx+48h]
call	eax

loc_7FBB04:
mov	ebp, [esp+10h+arg_4]
test	ebp, ebp
jz	short loc_7FBB38
push	1		; Value
lea	ecx, [ebp+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_7FBB6A
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FBB6A
test	edi, edi
jz	short loc_7FBB6A
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx
jmp	short loc_7FBB6A

loc_7FBB38:
mov	ebp, [esp+10h+arg_8]
test	ebp, ebp
jz	short loc_7FBB6D
push	1		; Value
lea	eax, [ebp+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
mov	edi, [esi+30h]
test	edi, edi
jz	short loc_7FBB6A
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FBB6A
test	edi, edi
jz	short loc_7FBB6A
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_7FBB6A:
mov	[esi+30h], ebp

loc_7FBB6D:
mov	eax, [esi+30h]
pop	edi
pop	ebp
pop	ebx
test	eax, eax
jz	short loc_7FBB8F
cmp	dword ptr [eax+1Ch], 4Bh
jnz	short loc_7FBB8F
mov	eax, [eax+38h]
test	eax, eax
jz	short loc_7FBB8F
mov	[esi+34h], eax
mov	ecx, [eax]
mov	edx, [ecx+4]
push	eax
call	edx

loc_7FBB8F:
mov	al, 1
pop	esi
retn	0Ch
sub_7FBA70 endp

align 10h



sub_7FBBA0 proc	near

var_20=	byte ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
sub	esp, 20h
push	esi
mov	esi, ecx
mov	ecx, [esp+24h+arg_4]
push	edi
mov	[esi+2Ch], eax
mov	[esi+34h], ecx
mov	edi, [esi+28h]
test	edi, edi
jz	short loc_7FBBDB
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FBBDB
test	edi, edi
jz	short loc_7FBBDB
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_7FBBDB:
mov	dword ptr [esi+28h], 0
mov	eax, [esi+2Ch]
mov	ecx, [eax]
lea	edx, [esp+28h+var_20]
push	edx
push	eax
mov	eax, [ecx+30h]
call	eax
mov	ecx, [esp+28h+var_8]
mov	edx, [esp+28h+var_4]
pop	edi
mov	[esi+1Ch], ecx
mov	[esi+20h], edx
mov	al, 1
pop	esi
add	esp, 20h
retn	8
sub_7FBBA0 endp

align 10h



sub_7FBC10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	edi
lea	edi, [ecx+eax*4-4]
test	eax, eax
jbe	short loc_7FBC5C
push	ebx
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
push	esi
mov	ebx, eax
lea	esp, [esp+0]

loc_7FBC30:
mov	esi, [edi]
test	esi, esi
jz	short loc_7FBC51
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ebp ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FBC51
test	esi, esi
jz	short loc_7FBC51
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx

loc_7FBC51:
sub	edi, 4
sub	ebx, 1
jnz	short loc_7FBC30
pop	esi
pop	ebp
pop	ebx

loc_7FBC5C:
pop	edi
retn
sub_7FBC10 endp

align 10h



sub_7FBC60 proc	near

arg_0= dword ptr  4

xor	eax, eax
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_155F500
mov	[esi+8], eax
mov	dword ptr [esi+4], 1
mov	[esi+28h], eax
mov	[esi+2Ch], eax
mov	[esi+30h], eax
mov	eax, [esp+4+arg_0]
push	eax
mov	dword ptr [esi], offset	off_1440B54
call	sub_73E010
mov	eax, esi
pop	esi
retn	4
sub_7FBC60 endp

align 10h



sub_7FBCA0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, ecx
test	ebp, ebp
jz	short loc_7FBD03
push	ebx
push	edi
lea	ebx, [esi+3B0h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
lea	edi, [esi+3A4h]
mov	esi, [edi+4]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_7FBCD6
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_7FBCEB
push	esi
jmp	short loc_7FBCE3

loc_7FBCD6:
cmp	esi, [edi+8]
jb	short loc_7FBCEB
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_7FBCE3:
push	edi
mov	ecx, edi
call	sub_668FE0

loc_7FBCEB:
mov	edx, [edi]
lea	eax, [edx+esi*4-4]
mov	[edi+4], esi
test	eax, eax
jz	short loc_7FBCFA
mov	[eax], ebp

loc_7FBCFA:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
pop	edi
pop	ebx

loc_7FBD03:
pop	esi
pop	ebp
retn	4
sub_7FBCA0 endp

align 10h



sub_7FBD10 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+34h]
mov	dword ptr [esi], offset	off_1463B48
test	eax, eax
jz	short loc_7FBD36
mov	ecx, [esi+24h]
push	eax
test	ecx, ecx
jz	short loc_7FBD2F
call	sub_7FBCA0
jmp	short loc_7FBD36

loc_7FBD2F:
mov	ecx, [eax]
mov	edx, [ecx+8]
call	edx

loc_7FBD36:
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_7FBD78
push	edi
lea	edi, [eax+290h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
cmp	dword ptr [esi+0Ch], 0
jz	short loc_7FBD70
mov	eax, [esi+8]
mov	ecx, [esi+0Ch]
mov	[eax+4], ecx
mov	edx, [esi+0Ch]
mov	eax, [esi+8]
mov	[edx], eax
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0

loc_7FBD70:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection
pop	edi

loc_7FBD78:
mov	ecx, esi
pop	esi
jmp	sub_804A40
sub_7FBD10 endp




sub_7FBD80 proc	near

var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 40h
push	esi
mov	esi, ecx
mov	eax, [esi+24h]
mov	[esp+44h+var_38], esi
test	eax, eax
jz	loc_7FC397
cmp	dword ptr [eax+1ACh], 0
jz	loc_7FC397
mov	eax, [esi]
mov	edx, [eax+38h]
call	edx
mov	edx, [esp+44h+arg_0]
test	edx, edx
jz	loc_7FC385
cmp	dword ptr [edx+10h], 0
jz	loc_7FC385
mov	eax, [edx]
push	edi
mov	edi, 1
mov	ecx, 15h
cmp	eax, edi
jnz	short loc_7FBDDD
mov	[esp+48h+var_3C], 4
mov	[esi+1Ch], ecx
jmp	short loc_7FBE32

loc_7FBDDD:
cmp	eax, 2
jnz	short loc_7FBDEF
mov	[esp+48h+var_3C], 3
mov	[esi+1Ch], ecx
jmp	short loc_7FBE32

loc_7FBDEF:
cmp	eax, 9
jnz	short loc_7FBE02
mov	eax, [esi+24h]
mov	ecx, [eax+1C8h]
mov	[esi+1Ch], ecx
jmp	short loc_7FBE2E

loc_7FBE02:
cmp	eax, 0Ah
jnz	short loc_7FBE10
mov	dword ptr [esi+1Ch], 31545844h
jmp	short loc_7FBE2E

loc_7FBE10:
cmp	eax, 0Bh
jnz	short loc_7FBE1E
mov	dword ptr [esi+1Ch], 33545844h
jmp	short loc_7FBE2E

loc_7FBE1E:
cmp	eax, 0Ch
jnz	loc_7FC37B
mov	dword ptr [esi+1Ch], 35545844h

loc_7FBE2E:
mov	[esp+48h+var_3C], edi

loc_7FBE32:
mov	eax, [esi+24h]
mov	cl, [eax+395h]
test	byte ptr [esp+48h+arg_4], 1
mov	[esi+20h], cl
mov	ecx, [edx+4]
mov	edi, [edx+8]
mov	edx, 0
setnz	dl
push	ebx
mov	ebx, edi
push	ebp
mov	ebp, ecx
mov	[esp+50h+var_2C], ebx
inc	edx
cmp	[eax+44h], edx
jge	short loc_7FBE8D
mov	ebp, 1
cmp	ecx, ebp
jbe	short loc_7FBE76
lea	ebx, [ebx+0]

loc_7FBE70:
add	ebp, ebp
cmp	ebp, ecx
jb	short loc_7FBE70

loc_7FBE76:
mov	ebx, 1
mov	[esp+50h+var_2C], ebx
cmp	edi, ebx
jbe	short loc_7FBE8D

loc_7FBE83:
add	ebx, ebx
cmp	ebx, edi
jb	short loc_7FBE83
mov	[esp+50h+var_2C], ebx

loc_7FBE8D:
mov	edi, [esp+50h+arg_0]
mov	eax, esi
mov	[eax+28h], ebp
mov	[eax+2Ch], ebx
mov	esi, [edi]
cmp	esi, 0Ah
jl	short loc_7FBEA5
cmp	esi, 0Ch
jle	short loc_7FBEC5

loc_7FBEA5:
cmp	dword ptr [edi+18h], 1
ja	short loc_7FBEC5
mov	edx, 1
mov	eax, ebp
mov	ecx, ebx

loc_7FBEB4:
cmp	eax, 1
ja	short loc_7FBEBE
cmp	ecx, 1
jbe	short loc_7FBEDD

loc_7FBEBE:
shr	eax, 1
shr	ecx, 1
inc	edx
jmp	short loc_7FBEB4

loc_7FBEC5:
mov	eax, [edi+18h]
cmp	eax, 1
jnb	short loc_7FBED7
mov	[esp+50h+arg_4], 1
jmp	short loc_7FBEE1

loc_7FBED7:
mov	[esp+50h+arg_4], eax
jmp	short loc_7FBEE1

loc_7FBEDD:
mov	[esp+50h+arg_4], edx

loc_7FBEE1:
cmp	esi, 0Ah
mov	[esp+50h+var_40], 0
jl	short loc_7FBEF7
cmp	esi, 0Ch
jle	loc_7FBFE5

loc_7FBEF7:
cmp	ebp, [edi+4]
jnz	short loc_7FBF0E
cmp	ebx, [edi+8]
jnz	short loc_7FBF0E
cmp	esi, 2
jnz	loc_7FBFE5
mov	edi, [esp+50h+arg_0]

loc_7FBF0E:
push	34h
call	sub_7D2BC0
add	esp, 4
test	eax, eax
jz	short loc_7FBF36
mov	edx, [edi]
cmp	edx, 2
jnz	short loc_7FBF28
mov	edx, 1

loc_7FBF28:
push	ebx
push	ebp
push	edx
mov	ecx, eax
call	sub_73D620
mov	edi, eax
jmp	short loc_7FBF38

loc_7FBF36:
xor	edi, edi

loc_7FBF38:
mov	[esp+50h+var_40], edi
test	edi, edi
jz	loc_7FBFE5
mov	ecx, [esp+50h+arg_0]
mov	esi, [ecx+4]
cmp	ebp, esi
jnz	short loc_7FBFAF
cmp	ebx, [ecx+8]
jnz	short loc_7FBFAF
cmp	dword ptr [ecx], 2
jnz	short loc_7FBFD7
xor	eax, eax
test	ebx, ebx
jbe	short loc_7FBFD7
nop

loc_7FBF60:
mov	ecx, [esp+50h+arg_0]
mov	edx, [ecx+0Ch]
imul	edx, eax
add	edx, [ecx+10h]
mov	ecx, [edi+18h]
imul	ecx, eax
add	ecx, [edi+1Ch]
test	ebp, ebp
jbe	short loc_7FBFA8
add	ecx, 2
add	edx, 2
mov	esi, ebp

loc_7FBF82:
movzx	ebx, byte ptr [edx-2]
mov	[ecx-2], bl
movzx	ebx, byte ptr [edx-1]
mov	[ecx-1], bl
movzx	ebx, byte ptr [edx]
mov	[ecx], bl
mov	byte ptr [ecx+1], 0FFh
add	edx, 3
add	ecx, 4
sub	esi, 1
jnz	short loc_7FBF82
mov	ebx, [esp+50h+var_2C]

loc_7FBFA8:
inc	eax
cmp	eax, ebx
jb	short loc_7FBF60
jmp	short loc_7FBFD3

loc_7FBFAF:
mov	eax, [esp+50h+var_3C]
mov	ecx, [edi+18h]
mov	edx, [edi+1Ch]
push	eax
mov	eax, [esp+54h+arg_0]
mov	edi, [eax+10h]
push	ecx
mov	ecx, [eax+0Ch]
push	ebx
push	ebp
push	edx
mov	edx, [eax+8]
call	sub_7FA450
add	esp, 14h

loc_7FBFD3:
mov	ecx, [esp+50h+arg_0]

loc_7FBFD7:
mov	eax, 1
cmp	[ecx+18h], eax
jbe	short loc_7FBFE5
mov	[esp+50h+arg_4], eax

loc_7FBFE5:
mov	eax, [esp+50h+arg_0]
mov	ecx, 1
cmp	[eax+18h], ecx
ja	short loc_7FBFFF
cmp	[esp+50h+var_3C], ecx
jz	short loc_7FBFFF
mov	[esp+50h+arg_4], ecx
jmp	short loc_7FC010

loc_7FBFFF:
mov	eax, [esp+50h+arg_4]
dec	eax
mov	[esp+50h+arg_4], ecx
cmp	eax, ecx
jb	short loc_7FC010
mov	[esp+50h+arg_4], eax

loc_7FC010:
mov	eax, [esp+50h+var_38]
mov	esi, [esp+50h+var_38]
lea	edi, [eax+34h]
mov	eax, [eax+24h]
mov	ecx, [eax+1ACh]
mov	edx, [ecx]
xor	edx, edx
cmp	[eax+395h], dl
mov	eax, [esi+1Ch]
push	0
setnz	dl
push	edi
mov	[esp+58h+var_34], edi
push	edx
mov	edx, [esp+5Ch+arg_4]
push	eax
push	0
push	edx
mov	edx, [ecx]
mov	eax, [edx+5Ch]
push	ebx
push	ebp
push	ecx
call	eax
test	eax, eax
jz	short loc_7FC0BB

loc_7FC052:
mov	eax, [esi+1Ch]
mov	ecx, 33h
lea	edx, [ecx-19h]
cmp	eax, 1Ch
jnz	short loc_7FC070
mov	edx, [esi+24h]
mov	[edx+1C8h], ecx
mov	[esi+1Ch], ecx
jmp	short loc_7FC084

loc_7FC070:
cmp	eax, ecx
jnz	loc_7FC362
mov	eax, [esi+24h]
mov	[eax+1C8h], edx
mov	[esi+1Ch], edx

loc_7FC084:
mov	eax, [esi+24h]
mov	ecx, [eax+1ACh]
mov	edx, [ecx]
mov	esi, [esp+50h+var_38]
xor	edx, edx
cmp	[eax+395h], dl
mov	eax, [esi+1Ch]
push	0
setnz	dl
push	edi
push	edx
mov	edx, [esp+5Ch+arg_4]
push	eax
push	0
push	edx
mov	edx, [ecx]
mov	eax, [edx+5Ch]
push	ebx
push	ebp
push	ecx
call	eax
test	eax, eax
jnz	short loc_7FC052

loc_7FC0BB:
mov	edi, [esp+50h+arg_0]
mov	ecx, edi
call	sub_73C9E0
test	al, al
jnz	loc_7FC262
mov	eax, 1
cmp	[edi+18h], eax
ja	loc_7FC262
cmp	[esp+50h+var_3C], eax
jnz	short loc_7FC11D
cmp	[esp+50h+arg_4], eax
jbe	short loc_7FC11D
cmp	[esp+50h+var_40], 0
jnz	short loc_7FC11D
mov	ecx, [edi+8]
mov	edx, [edi+4]
mov	eax, [edi]
push	0
push	ecx
push	edx
push	eax
call	sub_73D6D0
mov	ecx, [edi+0Ch]
imul	ecx, [edi+8]
mov	edx, [edi+10h]
push	ecx
mov	[esp+54h+var_40], eax
mov	eax, [eax+1Ch]
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_7FC11D:
cmp	[esp+50h+var_40], 0
mov	[esp+50h+var_30], 0
jz	short loc_7FC133
mov	edi, [esp+50h+var_40]
add	edi, 0Ch

loc_7FC133:
xor	eax, eax
xor	ecx, ecx
cmp	[esp+50h+var_3C], 1
mov	[esp+50h+var_14], ebx
setnz	cl
xor	ebx, ebx
mov	[esp+50h+var_18], ebp
mov	[esp+50h+var_20], eax
mov	[esp+50h+var_1C], eax
lea	ecx, ds:1Ch[ecx*4]
mov	ebp, ecx
cmp	[esp+50h+arg_4], eax
jbe	loc_7FC240

loc_7FC164:
mov	esi, [esp+50h+var_34]
mov	eax, [esi]
mov	edx, [eax]
mov	edx, [edx+48h]
lea	ecx, [esp+50h+var_30]
push	ecx
push	ebx
push	eax
call	edx
test	eax, eax
jnz	loc_7FC352
cmp	[esp+50h+var_3C], 1
mov	eax, [esp+50h+var_18]
jz	short loc_7FC18E
mov	eax, [edi+0Ch]

loc_7FC18E:
mov	edx, [edi+10h]
push	0
push	0FFFFFFFFh
lea	ecx, [esp+58h+var_20]
push	ecx
push	0
push	eax
mov	eax, [esp+64h+var_30]
push	ebp
push	edx
push	0
push	0
push	eax
call	D3DXLoadSurfaceFromMemory
mov	esi, eax
mov	eax, [esp+50h+var_30]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[esp+50h+var_30], 0
test	esi, esi
jnz	loc_7FC34E
mov	eax, [esp+50h+arg_4]
dec	eax
cmp	ebx, eax
jnb	short loc_7FC231
mov	esi, [esp+50h+arg_0]
cmp	edi, esi
jnz	short loc_7FC21B
push	34h
call	sub_7D2BC0
add	esp, 4
test	eax, eax
jz	short loc_7FC215
push	esi
mov	ecx, eax
call	sub_7FBC60
mov	esi, eax
test	esi, esi
jz	short loc_7FC1FB
inc	dword ptr [esi+4]

loc_7FC1FB:
mov	ecx, [esp+50h+var_40]
test	ecx, ecx
jz	short loc_7FC208
call	sub_64A400

loc_7FC208:
mov	[esp+50h+var_40], esi
test	esi, esi
jz	short loc_7FC219
lea	edi, [esi+0Ch]
jmp	short loc_7FC21B

loc_7FC215:
xor	esi, esi
jmp	short loc_7FC1FB

loc_7FC219:
xor	edi, edi

loc_7FC21B:
mov	ecx, [edi+10h]
push	ecx
lea	edx, [esp+54h+var_14]
push	edx
lea	eax, [esp+58h+var_18]
push	eax
call	sub_7FA2B0
add	esp, 0Ch

loc_7FC231:
inc	ebx
cmp	ebx, [esp+50h+arg_4]
jb	loc_7FC164

loc_7FC23C:
mov	esi, [esp+50h+var_38]

loc_7FC240:
push	0
mov	ecx, esi
call	sub_804AB0
mov	ecx, [esp+50h+var_40]
test	ecx, ecx
jz	short loc_7FC256
call	sub_64A400

loc_7FC256:
pop	ebp
pop	ebx
pop	edi
mov	al, 1
pop	esi
add	esp, 40h
retn	8

loc_7FC262:
mov	eax, [esp+50h+var_40]
xor	ecx, ecx
mov	[esp+50h+var_2C], ecx
cmp	eax, ecx
jz	short loc_7FC273
lea	edi, [eax+0Ch]

loc_7FC273:
mov	eax, [esi+1Ch]
mov	[esp+50h+var_10], ecx
mov	[esp+50h+var_C], ecx
mov	[esp+50h+var_8], ebp
mov	[esp+50h+var_4], ebx
mov	[esp+50h+var_30], 20h
cmp	eax, 15h
jz	short loc_7FC297
mov	[esp+50h+var_30], eax

loc_7FC297:
xor	ebp, ebp
cmp	[esp+50h+arg_4], ecx
jbe	short loc_7FC240
nop

loc_7FC2A0:
mov	esi, [esp+50h+var_34]
mov	eax, [esi]
mov	ecx, [eax]
lea	edx, [esp+50h+var_2C]
push	edx
push	ebp
push	eax
mov	eax, [ecx+48h]
call	eax
test	eax, eax
jnz	loc_7FC352
push	eax
lea	ecx, [esp+54h+var_24]
push	ecx
lea	edx, [esp+58h+var_28]
push	edx
push	ebp
mov	ecx, edi
call	sub_73D180
mov	esi, [esp+50h+var_28]
mov	ecx, [esp+50h+arg_0]
mov	ebx, eax
mov	eax, [esp+50h+var_24]
mov	[esp+50h+var_8], esi
mov	[esp+50h+var_4], eax
call	sub_73C9E0
test	al, al
jz	short loc_7FC2FB
mov	ecx, [edi]
push	1
push	esi
push	ecx
call	sub_73D0F0
jmp	short loc_7FC304

loc_7FC2FB:
mov	edx, [edi]
push	esi
push	edx
call	sub_73CB60

loc_7FC304:
mov	edx, [esp+50h+var_30]
push	0
push	0FFFFFFFFh
lea	ecx, [esp+58h+var_10]
push	ecx
push	0
push	eax
mov	eax, [esp+64h+var_2C]
push	edx
push	ebx
push	0
push	0
push	eax
call	D3DXLoadSurfaceFromMemory
mov	esi, eax
mov	eax, [esp+50h+var_2C]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[esp+50h+var_2C], 0
test	esi, esi
jnz	short loc_7FC34E
inc	ebp
cmp	ebp, [esp+50h+arg_4]
jb	loc_7FC2A0
jmp	loc_7FC23C

loc_7FC34E:
mov	esi, [esp+50h+var_34]

loc_7FC352:
mov	eax, [esi]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_7FC362:
mov	ecx, [esp+50h+var_40]
test	ecx, ecx
jz	short loc_7FC36F
call	sub_64A400

loc_7FC36F:
pop	ebp
pop	ebx
pop	edi
xor	al, al
pop	esi
add	esp, 40h
retn	8

loc_7FC37B:
pop	edi
xor	al, al
pop	esi
add	esp, 40h
retn	8

loc_7FC385:
push	0
mov	ecx, esi
call	sub_804AB0
mov	al, 1
pop	esi
add	esp, 40h
retn	8

loc_7FC397:
xor	al, al
pop	esi
add	esp, 40h
retn	8
sub_7FBD80 endp




sub_7FC3A0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	dword ptr [edi], offset	off_1463BB0
lea	esi, [edi+3Ch]
mov	ebx, 3

loc_7FC3B3:
mov	eax, [esi]
test	eax, eax
jz	short loc_7FC3CF
mov	ecx, [edi+24h]
push	eax
test	ecx, ecx
jz	short loc_7FC3C8
call	sub_7FBCA0
jmp	short loc_7FC3CF

loc_7FC3C8:
mov	ecx, [eax]
mov	edx, [ecx+8]
call	edx

loc_7FC3CF:
add	esi, 4
sub	ebx, 1
jnz	short loc_7FC3B3
mov	ecx, edi
pop	edi
pop	esi
pop	ebx
jmp	sub_7FBD10
sub_7FC3A0 endp

align 10h



sub_7FC3F0 proc	near
xor	eax, eax
cmp	[ecx+38h], al
setnz	al
inc	eax
retn
sub_7FC3F0 endp

align 10h



sub_7FC400 proc	near
xor	eax, eax
cmp	[ecx+38h], eax
setnz	al
retn
sub_7FC400 endp

align 10h



sub_7FC410 proc	near
xor	al, al
retn	8
sub_7FC410 endp

align 10h
; [00000003 BYTES: COLLAPSED FUNCTION nullsub_44. PRESS	KEYPAD "+" TO EXPAND]
align 10h



sub_7FC430 proc	near
xor	eax, eax
retn	10h
sub_7FC430 endp

align 10h



sub_7FC440 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+2Ch]
push	edi
mov	dword ptr [esi], offset	off_1463B8C
test	eax, eax
jz	short loc_7FC46B
mov	ecx, [esi+24h]
test	ecx, ecx
jz	short loc_7FC46B
push	eax
call	sub_7FBCA0
mov	eax, [esi+34h]
mov	ecx, [esi+24h]
push	eax
call	sub_7FBCA0

loc_7FC46B:
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_7FC4AB
lea	edi, [eax+290h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
cmp	dword ptr [esi+0Ch], 0
jz	short loc_7FC4A4
mov	ecx, [esi+8]
mov	edx, [esi+0Ch]
mov	[ecx+4], edx
mov	eax, [esi+0Ch]
mov	ecx, [esi+8]
mov	[eax], ecx
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0

loc_7FC4A4:		; lpCriticalSection
push	edi
call	ds:LeaveCriticalSection

loc_7FC4AB:
mov	edi, [esi+30h]
mov	ebx, ds:InterlockedExchangeAdd
test	edi, edi
jz	short loc_7FC4D3
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FC4D3
test	edi, edi
jz	short loc_7FC4D3
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_7FC4D3:
mov	edi, [esi+28h]
test	edi, edi
jz	short loc_7FC4F5
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_7FC4F5
test	edi, edi
jz	short loc_7FC4F5
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_7FC4F5:
pop	edi
mov	ecx, esi
pop	esi
pop	ebx
jmp	sub_8049A0
sub_7FC440 endp

align 10h



sub_7FC500 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7FC3A0
test	[esp+4+arg_0], 1
jz	short loc_7FC51D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7FC51D:
mov	eax, esi
pop	esi
retn	4
sub_7FC500 endp

align 10h



sub_7FC530 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+38h]
mov	dword ptr [esi], offset	off_1463BF8
test	eax, eax
jz	short loc_7FC556
mov	ecx, [esi+24h]
push	eax
test	ecx, ecx
jz	short loc_7FC54F
call	sub_7FBCA0
jmp	short loc_7FC556

loc_7FC54F:
mov	ecx, [eax]
mov	edx, [ecx+8]
call	edx

loc_7FC556:
mov	ecx, esi
call	sub_7FBD10
test	[esp+4+arg_0], 1
jz	short loc_7FC572
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7FC572:
mov	eax, esi
pop	esi
retn	4
sub_7FC530 endp

align 10h



sub_7FC580 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7FBD10
test	[esp+4+arg_0], 1
jz	short loc_7FC59D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7FC59D:
mov	eax, esi
pop	esi
retn	4
sub_7FC580 endp

align 10h



sub_7FC5B0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_7FC440
test	[esp+4+arg_0], 1
jz	short loc_7FC5CD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_7FC5CD:
mov	eax, esi
pop	esi
retn	4
sub_7FC5B0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_8027C0

loc_7FC5E0:
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_68D570
fldz
mov	dword ptr [esi], offset	off_1463C40
fst	dword ptr [esi+1D4h]
xor	eax, eax
fst	dword ptr [esi+1D8h]
xor	ebx, ebx
fst	dword ptr [esi+1DCh]
mov	[esi+5Ch], ebx
fstp	dword ptr [esi+1E0h]
mov	[esi+60h], ebx
mov	[esi+64h], ebx
mov	[esi+68h], ebx
mov	[esi+6Ch], ebx
mov	[esi+70h], ebx
mov	[esi+74h], ebx
mov	[esi+78h], ebx
mov	[esi+7Ch], ebx
mov	[esi+80h], ebx
mov	[esi+84h], ebx
lea	ebp, [esi+70h]
lea	edi, [esi+88h]
mov	ecx, 2Eh
rep stosd
mov	[esi+140h], eax
mov	[esi+144h], eax
mov	[esi+148h], eax
mov	[esi+14Ch], eax
mov	[esi+150h], eax
mov	[esi+154h], eax
mov	[esi+158h], eax
mov	[esi+15Ch], eax
mov	[esi+160h], eax
mov	[esi+164h], eax
mov	[esi+168h], eax
mov	[esi+16Ch], eax
mov	[esi+170h], eax
mov	[esi+174h], eax
mov	[esi+178h], eax
mov	[esi+17Ch], eax
mov	[esi+180h], eax
mov	[esi+184h], eax
mov	[esi+188h], eax
mov	[esi+18Ch], eax
mov	[esi+190h], eax
mov	[esi+194h], eax
mov	[esi+198h], eax
mov	[esi+19Ch], eax
mov	[esi+1A0h], eax
mov	[esi+1A4h], eax
lea	ecx, [esi+1E4h]
mov	[esi+1A8h], eax
call	sub_64E8E0
lea	ecx, [esi+1FCh]
call	sub_64E8E0
fld1
mov	edi, 1
fst	dword ptr [esi+240h]
lea	ecx, [esi+248h]
fstp	dword ptr [esi+23Ch]
mov	[esi+214h], ebx
mov	[esi+218h], ebx
mov	[esi+220h], ebx
mov	[esi+21Ch], ebx
mov	[esi+228h], edi
mov	[esi+224h], edi
mov	[esi+238h], ebx
mov	[esi+234h], ebx
mov	[esi+230h], ebx
mov	[esi+22Ch], ebx
mov	[esi+244h], ebx
call	sub_64E8E0
lea	ecx, [esi+260h]
call	sub_68CFB0
lea	eax, [esi+280h]
mov	[eax], eax
mov	[eax+4], eax
lea	eax, [esi+288h]
push	ebx		; int
lea	ecx, [esi+290h]	; lpCriticalSection
mov	[eax], eax
mov	[eax+4], eax
call	sub_64D6D0
mov	[esi+2CCh], ebx
mov	[esi+2D0h], ebx
mov	[esi+2F8h], ebx
mov	[esi+2FCh], ebx
mov	[esi+300h], ebx
mov	[esi+304h], ebx
mov	[esi+308h], ebx
mov	[esi+2A8h], ebx
mov	[esi+2ACh], bl
mov	[esi+2B0h], ebx
mov	[esi+2B4h], ebx
mov	[esi+2C0h], ebx
mov	[esi+2B8h], ebx
mov	[esi+2C4h], ebx
mov	[esi+2C8h], ebx
mov	[esi+2DCh], ebx
mov	[esi+2E0h], ebx
mov	[esi+2E4h], bl
mov	[esi+2E5h], bl
mov	[esi+2E8h], ebx
mov	[esi+2F0h], ebx
mov	[esi+2ECh], ebx
mov	[esi+320h], ebx
mov	[esi+324h], ebx
mov	[esi+328h], ebx
mov	[esi+374h], ebx
mov	[esi+378h], ebx
mov	[esi+37Ch], ebx
mov	[esi+380h], ebx
mov	[esi+384h], ebx
mov	[esi+388h], ebx
mov	[esi+38Ch], ebx
mov	[esi+390h], ebx
mov	[esi+398h], ebx
mov	[esi+39Ch], ebx
mov	[esi+3A0h], ebx
mov	[esi+3A4h], ebx
mov	[esi+3A8h], ebx
push	ebx		; int
lea	ecx, [esi+3B0h]	; lpCriticalSection
mov	[esi+3ACh], ebx
call	sub_64D6D0
mov	[esi+3C8h], ebx
mov	[esi+3CCh], ebx
mov	[esi+3D0h], ebx
mov	[esi+3D4h], ebx
mov	[esi+3D8h], ebx
mov	[esi+3ECh], ebx
mov	[esi+3F0h], ebx
mov	[esi+3F4h], ebx
mov	[esi+3F8h], ebx
mov	[esi+3FCh], ebx
mov	[esi+400h], ebx
mov	[esi+404h], ebx
mov	[esi+408h], ebx
mov	[esi+40Ch], ebx
mov	[esi+410h], ebx
lea	eax, [esi+41Ch]
mov	ecx, 0Fh

loc_7FC8E7:
mov	[eax], ebx
mov	[eax+4], ebx
add	eax, 8
sub	ecx, edi
jns	short loc_7FC8E7
lea	ecx, [esi+49Ch]	; void *
call	sub_64F7C0
lea	ecx, [esi+4DCh]	; void *
call	sub_64F7C0
lea	ecx, [esi+524h]	; void *
call	sub_64F7C0
lea	edi, [esi+564h]
mov	[esp+14h+var_4], 1

loc_7FC922:
lea	ecx, [edi+0Ch]
call	sub_68CFB0
lea	ecx, [edi+34h]
call	sub_64E8E0
lea	ecx, [edi+58h]
call	sub_64E8E0
mov	[edi], ebx
mov	[edi+4], ebx
mov	[edi+30h], ebx
mov	[edi+54h], ebx
mov	[edi+2Ch], bl
mov	[edi+2Dh], bl
add	edi, 78h
sub	[esp+14h+var_4], 1
jns	short loc_7FC922
mov	eax, 3
mov	[esi+1C0h], eax
mov	[esi+1C4h], eax
mov	eax, 1
mov	[esi+314h], eax
mov	[esi+318h], eax
mov	eax, 200h
mov	[esi+28h], bl
mov	[esi+30h], bl
mov	[esi+394h], bl
mov	[esi+395h], bl
mov	[esi+58h], ebx
mov	[esi+1B0h], bl
mov	[esi+1B1h], bl
mov	[esi+1B3h], bl
mov	[esi+1B2h], bl
mov	[esi+1B8h], ebx
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
mov	[esi+1ACh], ebx
mov	[esi+364h], ebx
mov	[esi+31Ch], ebx
mov	[esi+2Ch], ebx
mov	[esi+36Ch], eax
mov	[esi+370h], eax
mov	dword ptr [esi+1C8h], 1Ch
mov	[esi+51Ch], ebx
mov	[esi+520h], bl
mov	edi, 6

loc_7FC9F7:
mov	eax, [ebp+0]
cmp	eax, ebx
jz	short loc_7FCA06
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FCA06:
mov	[ebp+0], ebx
add	ebp, 4
sub	edi, 1
jnz	short loc_7FC9F7
lea	ebp, [esi+88h]
mov	edi, 2Eh
lea	esp, [esp+0]

loc_7FCA20:
mov	eax, [ebp+0]
cmp	eax, ebx
jz	short loc_7FCA2F
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FCA2F:
mov	[ebp+0], ebx
add	ebp, 4
sub	edi, 1
jnz	short loc_7FCA20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_8027C0
align 10h



sub_7FCA50 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	edx, [ecx+4]
mov	[eax+4], edx
mov	edx, [ecx+8]
mov	[eax+8], edx
mov	edx, [ecx+0Ch]
mov	[eax+0Ch], edx
mov	edx, [ecx+10h]
mov	[eax+10h], edx
mov	edx, [ecx+14h]
mov	[eax+14h], edx
mov	edx, [ecx+30h]
mov	[eax+30h], edx
mov	edx, [ecx+18h]
mov	[eax+18h], edx
mov	edx, [ecx+1Ch]
mov	[eax+1Ch], edx
mov	edx, [ecx+20h]
mov	[eax+20h], edx
mov	edx, [ecx+24h]
mov	[eax+24h], edx
fld	dword ptr [ecx+28h]
fstp	dword ptr [eax+28h]
fld	dword ptr [ecx+2Ch]
fstp	dword ptr [eax+2Ch]
retn	4
sub_7FCA50 endp

align 10h



sub_7FCAB0 proc	near
push	esi
mov	esi, ecx
lea	ecx, [esi+4]
call	sub_64E8E0
lea	ecx, [esi+1Ch]	; void *
call	sub_64F7C0
lea	ecx, [esi+5Ch]	; void *
call	sub_64F7C0
fld1
xor	eax, eax
fst	dword ptr [esi+0CCh]
mov	[esi+0A0h], eax
fstp	dword ptr [esi+0C8h]
mov	[esi+0A4h], eax
mov	[esi+0ACh], eax
mov	[esi+0A8h], eax
mov	ecx, 1
mov	[esi+0C4h], eax
mov	[esi+0C0h], eax
mov	[esi+0BCh], eax
mov	[esi+0B8h], eax
mov	[esi+0D0h], eax
mov	[esi+0B4h], ecx
mov	[esi+0B0h], ecx
mov	[esi], eax
mov	[esi+9Ch], eax
mov	eax, esi
pop	esi
retn
sub_7FCAB0 endp

align 10h



sub_7FCB30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, ecx
push	edi
lea	edi, [eax+4DCh]
mov	ecx, 10h
rep movsd
pop	edi
mov	byte ptr [eax+520h], 1
pop	esi
retn	4
sub_7FCB30 endp

align 10h



sub_7FCB60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, ecx
push	edi
lea	edi, [eax+49Ch]
mov	ecx, 10h
rep movsd
pop	edi
mov	byte ptr [eax+520h], 1
pop	esi
retn	4
sub_7FCB60 endp

align 10h



sub_7FCB90 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+51Ch], eax
retn	4
sub_7FCB90 endp

align 10h



sub_7FCBA0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
xor	edi, edi
mov	ebx, ecx
test	esi, esi
jz	short loc_7FCBEF
mov	ecx, [esi]
cmp	ecx, 0FFFFFFFFh
jz	short loc_7FCBEF
push	ebp
jmp	short loc_7FCBC0
align 10h

loc_7FCBC0:
mov	ebp, [esi+8]
mov	eax, [ebx+1ACh]
mov	edx, [eax]
push	ebp
mov	ebp, [esi+4]
push	ebp
push	ecx
push	eax
mov	eax, [edx+10Ch]
call	eax
mov	eax, [esi]
cmp	eax, edi
jb	short loc_7FCBE3
lea	edi, [eax+1]

loc_7FCBE3:
mov	ecx, [esi+0Ch]
add	esi, 0Ch
cmp	ecx, 0FFFFFFFFh
jnz	short loc_7FCBC0
pop	ebp

loc_7FCBEF:
test	byte ptr [ebx+2Ch], 2
jz	short loc_7FCC23
mov	esi, offset unk_14639D4
lea	ebx, [ebx+0]

loc_7FCC00:
mov	edx, [esi+4]
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
push	edx
mov	edx, [esi]
push	edx
push	edi
push	eax
mov	eax, [ecx+10Ch]
call	eax
add	esi, 0Ch
cmp	dword ptr [esi-4], 0FFFFFFFFh
jnz	short loc_7FCC00
inc	edi

loc_7FCC23:
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+10Ch]
push	1
push	1
push	edi
push	eax
call	edx
mov	ebx, [ebx+1ACh]
mov	eax, [ebx]
mov	ecx, [eax+10Ch]
push	1
push	4
push	edi
push	ebx
call	ecx
pop	edi
pop	esi
pop	ebx
retn	4
sub_7FCBA0 endp

align 10h



sub_7FCC60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
mov	edi, ecx
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_7FCCF0
mov	edx, [esi+20h]
mov	eax, [ecx]
mov	eax, [eax+40h]
push	ebx
push	0
push	edx
mov	edx, [esi+1Ch]
push	edx
mov	edx, [esp+28h+arg_4]
push	edx
call	eax
fldz
mov	eax, [edi+1ACh]
fstp	[esp+1Ch+var_8]
fld	dword ptr [esi+4]
mov	ebx, [esp+1Ch+arg_8]
fstp	[esp+1Ch+var_10]
push	1
fld	dword ptr [esi+8]
lea	edx, [esp+20h+var_10]
fstp	[esp+20h+var_C]
push	edx
fld	dword ptr [esi+0Ch]
push	ebx
fstp	[esp+28h+var_4]
push	eax
mov	ecx, [eax]
mov	eax, [ecx+178h]
call	eax
fld	dword ptr [esi+10h]
mov	eax, [edi+1ACh]
fstp	[esp+1Ch+var_10]
fld	dword ptr [esi+14h]
push	1
fstp	[esp+20h+var_C]
lea	edx, [esp+20h+var_10]
fld	dword ptr [esi+18h]
push	edx
inc	ebx
fstp	[esp+24h+var_4]
mov	ecx, [eax]
push	ebx
push	eax
mov	eax, [ecx+178h]
call	eax
pop	ebx

loc_7FCCF0:
pop	edi
pop	esi
add	esp, 10h
retn	0Ch
sub_7FCC60 endp

align 10h



sub_7FCD00 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
cmp	byte ptr [ecx+30h], 0
jz	short loc_7FCD75
mov	eax, [esp+20h+arg_0]
fld	dword ptr [eax]
push	2
fstp	[esp+24h+var_20]
lea	edx, [esp+24h+var_20]
fld	dword ptr [eax+8]
push	edx
fstp	[esp+28h+var_1C]
mov	edx, [esp+28h+arg_4]
fld	dword ptr [eax+10h]
push	edx
fstp	[esp+2Ch+var_18]
fld	dword ptr [eax+18h]
fstp	[esp+2Ch+var_14]
fld	dword ptr [eax+4]
fld	ds:dbl_15FCDC0
fmul	st(1), st
fxch	st(1)
fstp	[esp+2Ch+var_10]
fld	dword ptr [eax+0Ch]
fmul	st, st(1)
fstp	[esp+2Ch+var_C]
fld	dword ptr [eax+14h]
fmul	st, st(1)
fstp	[esp+2Ch+var_8]
fmul	dword ptr [eax+1Ch]
mov	eax, [ecx+1ACh]
push	eax
fstp	[esp+30h+var_4]
mov	ecx, [eax]
mov	eax, [ecx+1B4h]
call	eax
add	esp, 20h
retn	8

loc_7FCD75:
mov	edx, [ecx+1ACh]
mov	ecx, [esp+20h+arg_0]
fnstcw	word ptr [esp+20h+arg_0]
movzx	eax, word ptr [esp+20h+arg_0]
fld	dword ptr [ecx+18h]
fld	ds:dbl_15FCCF8
or	eax, 0C00h
mov	[esp+20h+arg_4], eax
fmul	st(1), st
fxch	st(1)
push	esi
fldcw	word ptr [esp+24h+arg_4]
push	edi
mov	esi, [edx]
fistp	[esp+28h+arg_4]
movzx	eax, byte ptr [esp+28h+arg_4]
movzx	edi, al
fldcw	word ptr [esp+28h+arg_0]
shl	edi, 8
fld	dword ptr [ecx]
fnstcw	word ptr [esp+28h+arg_0]
fmul	st, st(1)
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	[esp+28h+arg_4], eax
fldcw	word ptr [esp+28h+arg_4]
fistp	[esp+28h+arg_4]
movzx	eax, byte ptr [esp+28h+arg_4]
or	edi, eax
shl	edi, 8
fldcw	word ptr [esp+28h+arg_0]
fld	dword ptr [ecx+8]
fnstcw	word ptr [esp+28h+arg_0]
fmul	st, st(1)
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	[esp+28h+arg_4], eax
fldcw	word ptr [esp+28h+arg_4]
fistp	[esp+28h+arg_4]
movzx	eax, byte ptr [esp+28h+arg_4]
or	edi, eax
shl	edi, 8
fldcw	word ptr [esp+28h+arg_0]
fmul	dword ptr [ecx+10h]
fnstcw	word ptr [esp+28h+arg_0]
movzx	eax, word ptr [esp+28h+arg_0]
or	eax, 0C00h
mov	[esp+28h+arg_4], eax
fldcw	word ptr [esp+28h+arg_4]
fistp	[esp+28h+arg_4]
mov	cl, byte ptr [esp+28h+arg_4]
movzx	eax, cl
mov	ecx, [esi+0E4h]
fldcw	word ptr [esp+28h+arg_0]
or	edi, eax
push	edi
push	3Ch
push	edx
call	ecx
pop	edi
pop	esi
add	esp, 20h
retn	8
sub_7FCD00 endp




sub_7FCE50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	edx, [ecx+1ACh]
mov	ecx, [esp+4+arg_0]
fnstcw	word ptr [esp+4+arg_0]
movzx	eax, word ptr [esp+4+arg_0]
fld	dword ptr [ecx+18h]
fmul	ds:dbl_15FCCF8
or	eax, 0C00h
mov	[esp+4+var_4], eax
push	esi
push	edi
fldcw	word ptr [esp+0Ch+var_4]
mov	esi, [edx]
fistp	[esp+0Ch+var_4]
movzx	eax, byte ptr [esp+0Ch+var_4]
movzx	edi, al
fldcw	word ptr [esp+0Ch+arg_0]
shl	edi, 8
fld	dword ptr [ecx+4]
fnstcw	word ptr [esp+0Ch+arg_0]
movzx	eax, word ptr [esp+0Ch+arg_0]
or	eax, 0C00h
mov	[esp+0Ch+var_4], eax
fldcw	word ptr [esp+0Ch+var_4]
fistp	[esp+0Ch+var_4]
movzx	eax, byte ptr [esp+0Ch+var_4]
or	edi, eax
shl	edi, 8
fldcw	word ptr [esp+0Ch+arg_0]
fld	dword ptr [ecx+0Ch]
fnstcw	word ptr [esp+0Ch+arg_0]
movzx	eax, word ptr [esp+0Ch+arg_0]
or	eax, 0C00h
mov	[esp+0Ch+var_4], eax
fldcw	word ptr [esp+0Ch+var_4]
fistp	[esp+0Ch+var_4]
movzx	eax, byte ptr [esp+0Ch+var_4]
or	edi, eax
shl	edi, 8
fldcw	word ptr [esp+0Ch+arg_0]
fld	dword ptr [ecx+14h]
fnstcw	word ptr [esp+0Ch+arg_0]
movzx	eax, word ptr [esp+0Ch+arg_0]
or	eax, 0C00h
mov	[esp+0Ch+var_4], eax
fldcw	word ptr [esp+0Ch+var_4]
fistp	[esp+0Ch+var_4]
mov	cl, byte ptr [esp+0Ch+var_4]
movzx	eax, cl
mov	ecx, [esi+0E4h]
fldcw	word ptr [esp+0Ch+arg_0]
or	edi, eax
push	edi
push	3Ch
push	edx
call	ecx
pop	edi
pop	esi
pop	ecx
retn	4
sub_7FCE50 endp

align 10h



sub_7FCF30 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
cmp	byte ptr [edx+30h], 0
jz	short loc_7FCF3F

loc_7FCF3A:
xor	al, al
retn	4

loc_7FCF3F:
mov	eax, [ecx]
cmp	eax, 2
jz	short loc_7FCF4B
cmp	eax, 3
jnz	short loc_7FCF3A

loc_7FCF4B:
mov	eax, [edx+50h]
lea	eax, [eax+eax*2]
cmp	dword_168195C[eax*4], 0
jz	short loc_7FCF3A
mov	al, [ecx+2Ch]
retn	4
sub_7FCF30 endp

align 10h



sub_7FCF70 proc	near

arg_0= dword ptr  4

fld1
mov	edx, ecx
push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
lea	ebx, [edx+0Ch]
mov	ecx, 8
mov	edi, ebx
rep movsd
fcom	dword ptr [edx+10h]
xor	al, al
mov	[edx+2Ch], al
mov	[edx+2Dh], al
fnstsw	ax
test	ah, 5
jnp	short loc_7FCFC1
fcom	dword ptr [edx+18h]
fnstsw	ax
test	ah, 5
jnp	short loc_7FCFC1
fcom	dword ptr [edx+20h]
fnstsw	ax
test	ah, 5
jnp	short loc_7FCFC1
fcomp	dword ptr [edx+28h]
fnstsw	ax
test	ah, 5
jp	short loc_7FCFFC
pop	edi
pop	esi
mov	byte ptr [edx+2Ch], 1
pop	ebx
retn	4

loc_7FCFC1:
fstp	st
fldz
fcom	dword ptr [ebx]
fnstsw	ax
test	ah, 44h
jp	short loc_7FCFF6
fcom	dword ptr [edx+14h]
fnstsw	ax
test	ah, 44h
jp	short loc_7FCFF6
fcom	dword ptr [edx+1Ch]
fnstsw	ax
test	ah, 44h
jp	short loc_7FCFF6
fcomp	dword ptr [edx+28h]
fnstsw	ax
test	ah, 44h
jp	short loc_7FCFF8
pop	edi
pop	esi
mov	byte ptr [edx+2Dh], 1
pop	ebx
retn	4

loc_7FCFF6:
fstp	st

loc_7FCFF8:
mov	byte ptr [edx+2Ch], 1

loc_7FCFFC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_7FCF70 endp

align 10h



sub_7FD010 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

cmp	[esp+arg_4], 0
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_0]
mov	[esi+3E8h], ecx
jz	short loc_7FD065
mov	eax, [esi+1ACh]
test	eax, eax
jz	short loc_7FD065
test	ecx, ecx
jz	short loc_7FD065
mov	ecx, [ecx+2Ch]
mov	edx, [eax]
mov	edx, [edx+94h]
push	ecx
push	0
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	edx, [esi+3E8h]
mov	ecx, [eax]
mov	edx, [edx+34h]
pop	esi
mov	dword ptr [esp+arg_4], edx
mov	[esp+arg_0], eax
mov	eax, [ecx+9Ch]
jmp	eax

loc_7FD065:
pop	esi
retn	8
sub_7FD010 endp

align 10h



sub_7FD070 proc	near

arg_0= dword ptr  4

cmp	byte ptr [ecx+30h], 0
jnz	short loc_7FD07B
xor	eax, eax
retn	4

loc_7FD07B:
mov	eax, [esp+arg_0]
mov	edx, 1
cmp	[eax+0Ch], edx
ja	short loc_7FD0AE
fld	dword ptr [eax+8]
fmul	dword ptr [eax+4]
mov	eax, [ecx+414h]
fild	dword ptr [ecx+414h]
test	eax, eax
jge	short loc_7FD0A5
fadd	ds:flt_15FCC08

loc_7FD0A5:
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_7FD0B3

loc_7FD0AE:
mov	edx, 3

loc_7FD0B3:
mov	eax, edx
retn	4
sub_7FD070 endp

align 10h



sub_7FD0C0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [ecx+248h]
fld	dword ptr [eax+4]
fstp	dword ptr [ecx+24Ch]
fld	dword ptr [eax+8]
fstp	dword ptr [ecx+250h]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [ecx+254h]
fld	dword ptr [eax+10h]
fstp	dword ptr [ecx+258h]
fld	dword ptr [eax+14h]
fstp	dword ptr [ecx+25Ch]
retn	4
sub_7FD0C0 endp

align 10h



sub_7FD100 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
fld	dword ptr [eax]
fstp	dword ptr [ecx+1E4h]
fld	dword ptr [eax+4]
fstp	dword ptr [ecx+1E8h]
fld	dword ptr [eax+8]
fstp	dword ptr [ecx+1ECh]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [ecx+1F0h]
fld	dword ptr [eax+10h]
fstp	dword ptr [ecx+1F4h]
fld	dword ptr [eax+14h]
fstp	dword ptr [ecx+1F8h]
mov	byte ptr [ecx+520h], 1
retn	4
sub_7FD100 endp

align 10h



sub_7FD150 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
lea	edi, [ecx+260h]
mov	ecx, 8
rep movsd
pop	edi
pop	esi
retn	4
sub_7FD150 endp

align 10h



sub_7FD170 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h

push	esi
mov	esi, ecx
cmp	dword ptr [esi+1ACh], 0
jz	loc_7FD433
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, 0Fh
jb	short loc_7FD18C
xor	edi, edi

loc_7FD18C:
cmp	byte ptr [esi+40h], 0
jz	loc_7FD2D9
test	byte ptr [esi+2Ch], 2
jnz	short loc_7FD1E5
cmp	[esp+8+arg_4], 0
jnz	short loc_7FD1E5
mov	eax, [esi+1ACh]
mov	ecx, [eax]
lea	edi, [edi+edi*2]
add	edi, edi
mov	edx, dword_1681CB8[edi+edi]
add	edi, edi
push	edx
push	0ABh
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0
push	0CEh
push	eax
call	edx
jmp	loc_7FD313

loc_7FD1E5:
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	0CEh
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
lea	edi, [edi+edi*4]
add	edi, edi
mov	edx, dword_1681B88[edi+edi]
add	edi, edi
push	edx
push	0ABh
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	edx, dword_1681B88[edi]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	0D1h
push	eax
mov	eax, [ecx+0E4h]
call	eax
cmp	[esp+4+arg_C], 0
jz	short loc_7FD266
cmp	dword_1681B8C[edi], 5
jnz	short loc_7FD266
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	2
push	13h
push	eax
call	edx
jmp	short loc_7FD280

loc_7FD266:
mov	edx, dword_1681B8C[edi]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	13h
push	eax
mov	eax, [ecx+0E4h]
call	eax

loc_7FD280:
mov	edx, dword_1681B90[edi]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	14h
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	edx, dword_1681B94[edi]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	0CFh
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	edx, dword_1681B98[edi]
mov	esi, [esi+1ACh]
mov	ecx, [esi]
mov	eax, [ecx+0E4h]
push	edx
push	0D0h
push	esi
call	eax
pop	edi
pop	esi
retn	0Ch

loc_7FD2D9:
test	byte ptr [esi+2Ch], 2
jnz	loc_7FD373
cmp	[esp+8+arg_4], 0
jnz	loc_7FD373
mov	eax, [esi+1ACh]
mov	ecx, [eax]
lea	edi, [edi+edi*2]
add	edi, edi
mov	edx, dword_1681CB8[edi+edi]
add	edi, edi
push	edx
push	0ABh
push	eax
mov	eax, [ecx+0E4h]
call	eax

loc_7FD313:
cmp	[esp+4+arg_C], 0
jz	short loc_7FD33A
cmp	dword_1681CBC[edi], 5
jnz	short loc_7FD33A
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	2
push	13h
push	eax
call	edx
jmp	short loc_7FD354

loc_7FD33A:
mov	edx, dword_1681CBC[edi]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	13h
push	eax
mov	eax, [ecx+0E4h]
call	eax

loc_7FD354:
mov	edx, dword_1681CC0[edi]
mov	esi, [esi+1ACh]
mov	ecx, [esi]
mov	eax, [ecx+0E4h]
push	edx
push	14h
push	esi
call	eax
pop	edi
pop	esi
retn	0Ch

loc_7FD373:
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	ebx
lea	ebx, [edi+edi*4]
add	ebx, ebx
mov	edx, dword_1681B88[ebx+ebx]
add	ebx, ebx
push	edx
push	0ABh
push	eax
mov	eax, [ecx+0E4h]
call	eax
cmp	[esp+4+arg_10],	0
jz	short loc_7FD3C0
cmp	dword_1681B8C[ebx], 5
jnz	short loc_7FD3C0
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	2
push	13h
push	eax
call	edx
jmp	short loc_7FD3DA

loc_7FD3C0:
mov	edx, dword_1681B8C[ebx]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	13h
push	eax
mov	eax, [ecx+0E4h]
call	eax

loc_7FD3DA:
mov	edx, dword_1681B90[ebx]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	14h
push	eax
mov	eax, [ecx+0E4h]
call	eax
cmp	byte ptr [esi+1B4h], 0
pop	ebx
jnz	short loc_7FD432
mov	esi, [esi+1ACh]
cmp	edi, 8
jnz	short loc_7FD420
mov	ecx, [esi]
mov	edx, [ecx+0E4h]
push	7
push	0A8h
push	esi
call	edx
pop	edi
pop	esi
retn	0Ch

loc_7FD420:
mov	eax, [esi]
mov	ecx, [eax+0E4h]
push	0Fh
push	0A8h
push	esi
call	ecx

loc_7FD432:
pop	edi

loc_7FD433:
pop	esi
retn	0Ch
sub_7FD170 endp

align 10h



sub_7FD440 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [esp+arg_0]
sub	esp, 18h
cmp	byte ptr [ecx+30h], 0
jz	loc_7FD50D
mov	edx, eax
shr	edx, 18h
mov	[esp+18h+var_18], edx
fild	[esp+18h+var_18]
mov	edx, eax
fld	ds:dbl_15FCDC0
shr	edx, 10h
movzx	edx, dl
fmul	st(1), st
mov	[esp+18h+var_18], edx
fxch	st(1)
mov	edx, eax
shr	edx, 8
fstp	[esp+18h+var_14]
movzx	edx, dl
fild	[esp+18h+var_18]
mov	[esp+18h+var_18], edx
fmul	st, st(1)
movzx	eax, al
fstp	[esp+18h+var_10]
fild	[esp+18h+var_18]
mov	[esp+18h+var_18], eax
mov	eax, [ecx+31Ch]
fmul	st, st(1)
fstp	[esp+18h+var_C]
fild	[esp+18h+var_18]
fmulp	st(1), st
fstp	[esp+18h+var_8]
fld	[esp+18h+var_14]
fst	[esp+18h+var_4]
cmp	eax, 3
jz	short loc_7FD4B9
cmp	eax, 6
jnz	short loc_7FD4EB

loc_7FD4B9:
fld	[esp+18h+var_10]
fld1
fsub	st(1), st
fld	st(2)
fmulp	st(2), st
fadd	st(1), st
fxch	st(1)
fstp	[esp+18h+var_10]
fld	[esp+18h+var_C]
fsub	st, st(1)
fmul	st, st(2)
fadd	st, st(1)
fstp	[esp+18h+var_C]
fld	[esp+18h+var_8]
fsub	st, st(1)
fmulp	st(2), st
faddp	st(1), st
fstp	[esp+18h+var_8]
jmp	short loc_7FD4ED

loc_7FD4EB:
fstp	st

loc_7FD4ED:
mov	ecx, [ecx+1ACh]
mov	edx, [ecx]
push	1
lea	eax, [esp+1Ch+var_10]
push	eax
push	0
push	ecx
mov	ecx, [edx+1B4h]
call	ecx
add	esp, 18h
retn	4

loc_7FD50D:
mov	ecx, [ecx+1ACh]
mov	edx, [ecx]
push	eax
push	3Ch
push	ecx
mov	ecx, [edx+0E4h]
call	ecx
add	esp, 18h
retn	4
sub_7FD440 endp

align 10h



sub_7FD530 proc	near
xor	eax, eax
mov	[ecx+564h], eax
mov	[ecx+594h], eax
retn
sub_7FD530 endp

align 10h



sub_7FD540 proc	near
xor	eax, eax
mov	[ecx+5DCh], eax
mov	[ecx+60Ch], eax
retn
sub_7FD540 endp

align 10h



sub_7FD550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx+2B0h], eax
mov	eax, [esp+arg_8]
mov	[ecx+2C4h], edx
xor	edx, edx
mov	[ecx+2B8h], eax
sub	eax, edx
mov	[ecx+2E4h], dl
mov	dword ptr [ecx+2BCh], 4
jz	short loc_7FD5A8
sub	eax, 3
jz	short loc_7FD59B
sub	eax, 1
jnz	short locret_7FD5AE
mov	dword ptr [ecx+2BCh], 0Ch
retn	10h

loc_7FD59B:
mov	dword ptr [ecx+2BCh], 8
retn	10h

loc_7FD5A8:
mov	[ecx+2BCh], edx

locret_7FD5AE:
retn	10h
sub_7FD550 endp

align 10h



sub_7FD5C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	[ecx+2B4h], eax
mov	eax, [esp+arg_8]
mov	[ecx+2C8h], edx
xor	edx, edx
sub	eax, edx
mov	[ecx+2E5h], dl
jz	short loc_7FD608
sub	eax, 1
jz	short loc_7FD5FB
sub	eax, 1
jnz	short locret_7FD60E
mov	dword ptr [ecx+2C0h], 66h
retn	10h

loc_7FD5FB:
mov	dword ptr [ecx+2C0h], 65h
retn	10h

loc_7FD608:
mov	[ecx+2C0h], edx

locret_7FD60E:
retn	10h
sub_7FD5C0 endp

align 10h



sub_7FD620 proc	near

var_34=	dword ptr -34h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
arg_0= dword ptr  4

sub	esp, 24h
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	loc_7FD98A
mov	al, [esi+1B1h]
push	ebx
mov	ebx, 1
mov	[esi+1B4h], bl
test	al, al
jnz	loc_7FD6F6
cmp	[esi+1B3h], al
jnz	loc_7FD6EE
cmp	[esi+1B0h], al
jnz	short loc_7FD6D8
mov	eax, [esi+1ACh]
lea	edx, [esp+2Ch+var_24]
mov	[esp+2Ch+var_24], 0
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+0A0h]
call	eax
mov	eax, [esp+2Ch+var_24]
test	eax, eax
jz	short loc_7FD6CB
mov	ecx, [eax]
lea	edx, [esp+2Ch+var_20]
push	edx
push	eax
mov	eax, [ecx+30h]
call	eax
mov	eax, [esp+28h+var_1C]
add	eax, 0FFFFFFB7h
cmp	eax, 0Ah	; switch 11 cases
ja	short loc_7FD6B7 ; default
			; jumptable 007FD6A4 cases 1,3-5,7-9
movzx	ecx, ds:byte_7FD9A0[eax]
jmp	ds:off_7FD994[ecx*4] ; switch jump

loc_7FD6AB:		; jumptable 007FD6A4 cases 2,6,10
mov	[esi+1B2h], bl

loc_7FD6B1:		; jumptable 007FD6A4 case 0
mov	[esi+1B1h], bl

loc_7FD6B7:		; default
mov	eax, [esp+28h+var_20] ;	jumptable 007FD6A4 cases 1,3-5,7-9
mov	edx, [eax]
push	eax
mov	eax, [edx+8]
call	eax
mov	[esi+1B3h], bl
jmp	short loc_7FD6D2

loc_7FD6CB:
mov	byte ptr [esi+1B1h], 0

loc_7FD6D2:
mov	[esi+1B0h], bl

loc_7FD6D8:
mov	al, [esi+1B1h]
test	al, al
jnz	short loc_7FD6F6
cmp	[esi+1B3h], al
jz	loc_7FD989

loc_7FD6EE:
test	al, al
jz	loc_7FD8D0

loc_7FD6F6:
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0
push	0A8h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	34h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0FFh
push	3Ah
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	35h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	36h
push	eax
call	edx
cmp	byte ptr [esi+1B2h], 0
jz	short loc_7FD778
cmp	dword ptr [esi+1C0h], 3
jz	short loc_7FD778
mov	cl, bl
jmp	short loc_7FD77A

loc_7FD778:
xor	cl, cl

loc_7FD77A:
mov	eax, [esp+2Ch+arg_0]
sub	eax, 0
jz	loc_7FD85D
sub	eax, ebx
jz	short loc_7FD7FC
sub	eax, ebx
jnz	loc_7FD983
mov	eax, [esi+1ACh]
test	cl, cl
mov	ecx, [eax]
jz	short loc_7FD7F4
mov	edx, [esi+1B8h]
push	edx
push	39h
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	3
push	38h
push	eax
call	edx
mov	edx, [esi+1C4h]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	37h
push	eax
mov	eax, [ecx+0E4h]
call	eax
dec	dword ptr [esi+1B8h]
add	[esi+3D4h], ebx
pop	ebx
pop	esi
add	esp, 24h
retn	4

loc_7FD7F4:
push	ebx
push	37h
jmp	loc_7FD97A

loc_7FD7FC:
mov	eax, [esi+1ACh]
test	cl, cl
mov	ecx, [eax]
jz	short loc_7FD7F4
mov	edx, [esi+1B8h]
push	edx
push	39h
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	3
push	38h
push	eax
call	edx
mov	edx, [esi+1C0h]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	37h
push	eax
mov	eax, [ecx+0E4h]
call	eax
add	[esi+1B8h], ebx
add	[esi+3D4h], ebx
pop	ebx
pop	esi
add	esp, 24h
retn	4

loc_7FD85D:
mov	eax, [esi+1ACh]
fldz
mov	ecx, [eax]
mov	edx, [ecx+0ACh]
push	0
push	ecx
fstp	[esp+34h+var_34]
push	0
push	4
push	0
push	0
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	8
push	38h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	3
push	37h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	39h
push	eax
call	edx
add	[esi+3D4h], ebx
mov	[esi+1B8h], ebx
pop	ebx
pop	esi
add	esp, 24h
retn	4

loc_7FD8D0:
cmp	byte ptr [esi+1B3h], 0
jz	loc_7FD983
cmp	[esp+2Ch+arg_0], 0
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	0
jnz	short loc_7FD94B
fld1
mov	edx, [ecx+0ACh]
push	ecx
fstp	[esp+34h+var_34]
push	0
push	2
push	0
push	0
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	8
push	0A8h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	0Eh
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	7
push	eax
call	edx
push	8
push	17h
jmp	short loc_7FD972

loc_7FD94B:
mov	edx, [ecx+0E4h]
push	0A8h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0
push	0Eh
push	eax
call	edx
push	0
push	7

loc_7FD972:
mov	eax, [esi+1ACh]
mov	ecx, [eax]

loc_7FD97A:
mov	edx, [ecx+0E4h]
push	eax
call	edx

loc_7FD983:
add	[esi+3D4h], ebx

loc_7FD989:
pop	ebx

loc_7FD98A:
pop	esi
add	esp, 24h
retn	4
sub_7FD620 endp

align 4
off_7FD994 dd offset loc_7FD6B1	; jump table for switch	statement
dd offset loc_7FD6AB
dd offset loc_7FD6B7
byte_7FD9A0 db	    0,	   2,	  1,	 2 ; indirect table for	switch statement
db	2,     2,     1,     2
db	2,     2,     1
align 10h



sub_7FD9B0 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	loc_7FDA92
mov	eax, [esi+1ACh]
push	0Fh
mov	byte ptr [esi+1B4h], 0
mov	byte ptr [esi+1BCh], 1
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0A8h
push	eax
call	edx
cmp	byte ptr [esi+1B1h], 0
jz	short loc_7FDA4A
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	3
push	38h
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	37h
push	eax
call	edx
mov	edx, [esi+1B8h]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edx
push	39h
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	esi, [esi+1ACh]
mov	ecx, [esi]
mov	edx, [ecx+0E4h]
push	0FFh
push	3Ah
push	esi
call	edx
pop	esi
retn

loc_7FDA4A:
cmp	byte ptr [esi+1B3h], 0
jz	short loc_7FDA92
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0
push	0Eh
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	7
push	eax
call	edx
mov	esi, [esi+1ACh]
mov	eax, [esi]
mov	ecx, [eax+0E4h]
push	3
push	17h
push	esi
call	ecx

loc_7FDA92:
pop	esi
retn
sub_7FD9B0 endp

align 10h



sub_7FDAA0 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	loc_7FDB3E
mov	eax, [esi+1ACh]
push	0Fh
mov	byte ptr [esi+1BCh], 0
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0A8h
push	eax
call	edx
cmp	byte ptr [esi+1B1h], 0
jz	short loc_7FDAF6
mov	dword ptr [esi+1B8h], 0
mov	esi, [esi+1ACh]
mov	eax, [esi]
mov	ecx, [eax+0E4h]
push	0
push	34h
push	esi
call	ecx
pop	esi
retn

loc_7FDAF6:
cmp	byte ptr [esi+1B3h], 0
jz	short loc_7FDB3E
mov	eax, [esi+1ACh]
mov	edx, [eax]
push	0
push	0Eh
push	eax
mov	eax, [edx+0E4h]
call	eax
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0
push	7
push	eax
call	edx
mov	esi, [esi+1ACh]
mov	eax, [esi]
mov	ecx, [eax+0E4h]
push	4
push	17h
push	esi
call	ecx

loc_7FDB3E:
pop	esi
retn
sub_7FDAA0 endp




sub_7FDB40 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [esp+arg_0]
xor	edx, edx
cmp	eax, edx
jz	short loc_7FDB78
push	esi
mov	esi, [ecx+3C8h]
mov	[eax], esi
mov	esi, [ecx+3CCh]
mov	[eax+4], esi
mov	esi, [ecx+3D0h]
mov	[eax+8], esi
mov	esi, [ecx+3D4h]
mov	[eax+0Ch], esi
mov	esi, [ecx+3D8h]
mov	[eax+10h], esi
pop	esi

loc_7FDB78:
cmp	[esp+arg_4], dl
jz	short locret_7FDB9C
mov	[ecx+3C8h], edx
mov	[ecx+3CCh], edx
mov	[ecx+3D0h], edx
mov	[ecx+3D4h], edx
mov	[ecx+3D8h], edx

locret_7FDB9C:
retn	8
sub_7FDB40 endp

align 10h



sub_7FDBA0 proc	near

var_4= dword ptr -4

push	ecx
xor	eax, eax
mov	[esp+4+var_4], eax
cmp	[ecx+1ACh], eax
jz	short loc_7FDBC3
mov	ecx, [ecx+1ACh]
mov	eax, [ecx]
mov	eax, [eax+18h]
lea	edx, [esp+4+var_4]
push	edx
push	ecx
call	eax
mov	eax, [esp+4+var_4]

loc_7FDBC3:
pop	ecx
retn
sub_7FDBA0 endp

align 10h



sub_7FDBD0 proc	near
mov	eax, [ecx+1ACh]
retn
sub_7FDBD0 endp

align 10h



sub_7FDBE0 proc	near

arg_0= dword ptr  4

cmp	byte ptr [ecx+28h], 0
jnz	short loc_7FDBEB
xor	al, al
retn	4

loc_7FDBEB:
push	esi
push	edi
mov	edi, [esp+8+arg_0]
lea	esi, [ecx+32Ch]
mov	ecx, 0Eh
rep movsd
pop	edi
mov	al, 1
pop	esi
retn	4
sub_7FDBE0 endp

align 10h



sub_7FDC10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	byte ptr  24h

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_4]
fld	dword ptr [ecx]
mov	edx, [esp+arg_10]
fstp	dword ptr [eax+4]
push	esi
fld	dword ptr [ecx+4]
mov	esi, [esp+4+arg_8]
fstp	dword ptr [eax+8]
push	edi
fld	dword ptr [ecx+8]
lea	edi, [eax+1Ch]
fstp	dword ptr [eax+0Ch]
fld	dword ptr [ecx+0Ch]
fstp	dword ptr [eax+10h]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+14h]
fld	dword ptr [ecx+14h]
mov	ecx, 10h
fstp	dword ptr [eax+18h]
rep movsd
mov	esi, [esp+8+arg_C]
lea	edi, [eax+5Ch]
mov	ecx, 10h
rep movsd
mov	ecx, [esp+8+arg_14]
mov	[eax+9Ch], edx
mov	edx, [ecx]
mov	[eax+0A0h], edx
mov	edx, [ecx+4]
mov	[eax+0A4h], edx
mov	edx, [ecx+8]
mov	[eax+0A8h], edx
mov	edx, [ecx+0Ch]
mov	[eax+0ACh], edx
mov	edx, [ecx+10h]
mov	[eax+0B0h], edx
mov	edx, [ecx+14h]
mov	[eax+0B4h], edx
mov	edx, [ecx+30h]
mov	[eax+0D0h], edx
mov	edx, [ecx+18h]
mov	[eax+0B8h], edx
mov	edx, [ecx+1Ch]
mov	[eax+0BCh], edx
mov	edx, [ecx+20h]
mov	[eax+0C0h], edx
mov	edx, [ecx+24h]
mov	[eax+0C4h], edx
mov	edx, [esp+8+arg_1C]
fld	dword ptr [ecx+28h]
pop	edi
fstp	dword ptr [eax+0C8h]
pop	esi
fld	dword ptr [ecx+2Ch]
mov	ecx, [esp+arg_18]
fstp	dword ptr [eax+0CCh]
mov	[eax+0D4h], ecx
mov	cl, [esp+arg_20]
mov	[eax+0D8h], edx
mov	[eax+0DCh], cl
retn	24h
sub_7FDC10 endp

align 10h



sub_7FDD10 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
cmp	dword ptr [ebp+0], 0
push	esi
push	edi
mov	edi, ecx
jnz	loc_7FDDDF
mov	edx, [esp+10h+arg_4]
mov	eax, edx
mov	[esp+10h+arg_0], 0
mov	[esp+10h+var_4], 0
lea	esi, [eax+1]
lea	ecx, [ecx+0]

loc_7FDD40:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7FDD40
push	0
lea	ecx, [esp+14h+var_4]
push	ecx
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, [edi+3Ch]
push	0
push	ecx
push	offset aMain	; "main"
push	0
push	0
sub	eax, esi
push	eax
push	edx
call	D3DXCompileShader
test	eax, eax
jge	short loc_7FDD98
mov	eax, [esp+10h+var_4]
test	eax, eax
jz	short loc_7FDD7F
mov	edx, [eax]
push	eax
mov	eax, [edx+8]
call	eax

loc_7FDD7F:
mov	eax, [esp+10h+arg_0]
test	eax, eax
jz	short loc_7FDD8F
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FDD8F:
pop	edi
pop	esi
xor	al, al
pop	ebp
pop	ecx
retn	8

loc_7FDD98:
mov	eax, [esp+10h+arg_0]
test	eax, eax
jz	short loc_7FDDEC
mov	ecx, [eax]
mov	esi, [edi+1ACh]
mov	edx, [ecx+0Ch]
mov	edi, [esi]
push	ebp
push	eax
call	edx
push	eax
mov	eax, [edi+16Ch]
push	esi
call	eax
test	eax, eax
jnz	short loc_7FDDE8
mov	eax, [esp+10h+var_4]
test	eax, eax
jz	short loc_7FDDCF
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FDDCF:
mov	eax, [esp+10h+arg_0]
test	eax, eax
jz	short loc_7FDDDF
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FDDDF:
pop	edi
pop	esi
mov	al, 1
pop	ebp
pop	ecx
retn	8

loc_7FDDE8:
mov	eax, [esp+10h+arg_0]

loc_7FDDEC:
mov	ecx, [esp+10h+var_4]
test	ecx, ecx
jz	short loc_7FDE00
mov	eax, [ecx]
push	ecx
mov	ecx, [eax+8]
call	ecx
mov	eax, [esp+10h+arg_0]

loc_7FDE00:
test	eax, eax
jz	short loc_7FDE0C
mov	edx, [eax]
push	eax
mov	eax, [edx+8]
call	eax

loc_7FDE0C:
pop	edi
pop	esi
xor	al, al
pop	ebp
pop	ecx
retn	8
sub_7FDD10 endp

align 10h



sub_7FDE20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_0]
cmp	dword ptr [ebp+0], 0
push	esi
push	edi
mov	edi, ecx
jnz	loc_7FDEEB
mov	edx, [esp+10h+arg_4]
mov	eax, edx
mov	[esp+10h+var_4], 0
mov	[esp+10h+arg_0], 0
lea	esi, [eax+1]
lea	ecx, [ecx+0]

loc_7FDE50:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_7FDE50
push	0
lea	ecx, [esp+14h+var_4]
push	ecx
lea	ecx, [esp+18h+arg_0]
push	ecx
mov	ecx, [edi+38h]
push	0
push	ecx
push	offset aMain	; "main"
push	0
push	0
sub	eax, esi
push	eax
push	edx
call	D3DXCompileShader
test	eax, eax
mov	eax, [esp+10h+arg_0]
jge	short loc_7FDEA8
test	eax, eax
jz	short loc_7FDE8F
mov	edx, [eax]
push	eax
mov	eax, [edx+8]
call	eax

loc_7FDE8F:
mov	eax, [esp+10h+var_4]
test	eax, eax
jz	short loc_7FDE9F
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FDE9F:
pop	edi
pop	esi
xor	al, al
pop	ebp
pop	ecx
retn	8

loc_7FDEA8:
test	eax, eax
jz	short loc_7FDE8F
mov	ecx, [eax]
mov	esi, [edi+1ACh]
mov	edx, [ecx+0Ch]
mov	edi, [esi]
push	ebp
push	eax
call	edx
push	eax
mov	eax, [edi+1A8h]
push	esi
call	eax
test	eax, eax
mov	eax, [esp+10h+arg_0]
jnz	short loc_7FDEF4
test	eax, eax
jz	short loc_7FDEDB
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FDEDB:
mov	eax, [esp+10h+var_4]
test	eax, eax
jz	short loc_7FDEEB
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FDEEB:
pop	edi
pop	esi
mov	al, 1
pop	ebp
pop	ecx
retn	8

loc_7FDEF4:
test	eax, eax
jz	short loc_7FDE8F
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
jmp	short loc_7FDE8F
sub_7FDE20 endp

align 10h



sub_7FDF10 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
cmp	[ecx+48h], edx
jz	short locret_7FDF34
mov	eax, [ecx+1ACh]
mov	[ecx+48h], edx
mov	ecx, [ecx+edx*4+5Ch]
push	esi
mov	esi, [eax]
mov	edx, [esi+15Ch]
push	ecx
push	eax
call	edx
pop	esi

locret_7FDF34:
retn	4
sub_7FDF10 endp

align 10h



sub_7FDF40 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
cmp	[ecx+4Ch], edx
jz	short locret_7FDF64
mov	eax, [ecx+1ACh]
mov	[ecx+4Ch], edx
mov	ecx, [ecx+edx*4+70h]
push	esi
mov	esi, [eax]
mov	edx, [esi+170h]
push	ecx
push	eax
call	edx
pop	esi

locret_7FDF64:
retn	4
sub_7FDF40 endp

align 10h



sub_7FDF70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, ecx
cmp	edi, [esi+50h]
jnz	short loc_7FDF8B
cmp	[esi+54h], ebx
jz	loc_7FE015

loc_7FDF8B:
cmp	byte ptr [esi+30h], 0
jz	short loc_7FDFC5
test	byte ptr [esi+2Ch], 2
jz	short loc_7FDFA0
cmp	byte ptr [esi+40h], 0
jnz	short loc_7FDFA0
add	edi, 17h

loc_7FDFA0:
mov	eax, [esi+1ACh]
mov	edx, [esi+edi*4+88h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+1ACh]
call	eax
mov	[esi+50h], edi
pop	edi
mov	[esi+54h], ebx
pop	esi
pop	ebx
retn	8

loc_7FDFC5:
test	edi, edi
jnz	short loc_7FDFDB
push	edi
call	sub_7FCBA0
mov	[esi+50h], edi
pop	edi
mov	[esi+54h], ebx
pop	esi
pop	ebx
retn	8

loc_7FDFDB:
test	ebx, ebx
jnz	short loc_7FDFFD
lea	ecx, [edi+edi*2]
mov	edx, off_1681958[ecx*4]
push	edx
mov	ecx, esi
call	sub_7FCBA0
mov	[esi+50h], edi
pop	edi
mov	[esi+54h], ebx
pop	esi
pop	ebx
retn	8

loc_7FDFFD:
lea	eax, [edi+edi*2]
mov	ecx, dword_168195C[eax*4]
push	ecx
mov	ecx, esi
call	sub_7FCBA0
mov	[esi+50h], edi
mov	[esi+54h], ebx

loc_7FE015:
pop	edi
pop	esi
pop	ebx
retn	8
sub_7FDF70 endp

align 10h



sub_7FE020 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+31Ch]
push	edi
mov	edi, [esi+1ACh]
push	0
push	0
mov	ebx, ecx
push	eax
mov	ecx, esi
call	sub_7FD170
cmp	byte ptr [ebx+0Bh], 0FFh
jnz	short loc_7FE05A
cmp	dword ptr [esi+31Ch], 1
jg	short loc_7FE05A
cmp	dword ptr [ebx], 3
jz	short loc_7FE05A
xor	eax, eax
jmp	short loc_7FE05F

loc_7FE05A:
mov	eax, 1

loc_7FE05F:
mov	ecx, [edi]
mov	edx, [ecx+0E4h]
push	eax
push	1Bh
push	edi
call	edx
mov	eax, [ebx]
cmp	eax, 1
jnz	short loc_7FE094
push	0
push	eax
mov	ecx, esi
call	sub_7FDF70
push	ecx
mov	ecx, [ebx+8]
mov	eax, esp
mov	[eax], ecx
mov	ecx, esi
call	sub_7FD440
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_7FE094:
cmp	eax, 2
jnz	loc_7FE162
mov	edx, [ebx+8]
push	ecx
mov	eax, esp
mov	ecx, esi
mov	[eax], edx
call	sub_7FD440
cmp	dword ptr [ebx+30h], 0
lea	ebp, [ebx+30h]
jnz	short loc_7FE0C7
push	0
push	0
mov	ecx, esi
call	sub_7FDF70
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_7FE0C7:
mov	eax, [edi]
mov	ecx, [eax+0E4h]
push	1
push	1Bh
push	edi
call	ecx
cmp	byte ptr [esi+30h], 0
jnz	short loc_7FE121
cmp	byte ptr [ebx+2Dh], 0
jz	short loc_7FE121
mov	eax, [esi+31Ch]
cmp	eax, 3
jz	short loc_7FE0F8
cmp	eax, 6
jz	short loc_7FE0F8
push	0
push	4
jmp	short loc_7FE0FC

loc_7FE0F8:
push	0
push	5

loc_7FE0FC:
mov	ecx, esi
call	sub_7FDF70
add	ebx, 0Ch
push	ebx
mov	ecx, esi
call	sub_7FCE50
push	4
push	0
push	ebp
mov	ecx, esi
call	sub_7FCC60
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_7FE121:
mov	eax, [esi+31Ch]
cmp	eax, 3
jz	short loc_7FE137
cmp	eax, 6
jz	short loc_7FE137
push	0
push	2
jmp	short loc_7FE13B

loc_7FE137:
push	0
push	3

loc_7FE13B:
mov	ecx, esi
call	sub_7FDF70
push	2
add	ebx, 0Ch
push	ebx
mov	ecx, esi
call	sub_7FCD00
push	4
push	0
push	ebp
mov	ecx, esi
call	sub_7FCC60
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_7FE162:
cmp	eax, 3
jnz	loc_7FE1F6
cmp	dword ptr [ebx+30h], 0
mov	edx, [edi]
mov	eax, [edx+0E4h]
push	1
lea	ebp, [ebx+30h]
push	1Bh
push	edi
jnz	short loc_7FE196
call	eax
xor	ecx, ecx
cmp	dword ptr [esi+2B8h], 3
setz	cl
add	ecx, 0Dh
mov	edi, ecx
jmp	short loc_7FE1CC

loc_7FE196:
call	eax
push	4
push	0
push	ebp
mov	ecx, esi
call	sub_7FCC60
mov	eax, [ebx+4]
cmp	eax, 2
jz	short loc_7FE1C7
cmp	eax, 1
jz	short loc_7FE1C7
push	6
push	1
lea	ecx, [ebx+54h]
push	ecx
mov	ecx, esi
mov	edi, 10h
call	sub_7FCC60
jmp	short loc_7FE1CC

loc_7FE1C7:
mov	edi, 0Fh

loc_7FE1CC:
mov	eax, [esi+31Ch]
cmp	eax, 3
jz	short loc_7FE1DC
cmp	eax, 6
jnz	short loc_7FE1DF

loc_7FE1DC:
add	edi, 4

loc_7FE1DF:
push	0
push	edi
mov	ecx, esi
call	sub_7FDF70
push	2
add	ebx, 0Ch
push	ebx
mov	ecx, esi
call	sub_7FCD00

loc_7FE1F6:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_7FE020 endp

align 10h



sub_7FE200 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fld	dword ptr [ecx+28h]
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
fnstcw	word ptr [esp+0Ch+arg_0]
movzx	eax, word ptr [esp+0Ch+arg_0]
or	eax, 0C00h
mov	[esp+0Ch+var_4], eax
mov	edx, [esi+1ACh]
push	edi
fldcw	word ptr [esp+10h+var_4]
mov	edi, [edx]
fistp	[esp+10h+var_4]
movzx	eax, byte ptr [esp+10h+var_4]
movzx	ebx, al
fldcw	word ptr [esp+10h+arg_0]
shl	ebx, 8
fld	dword ptr [ecx+10h]
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
or	eax, 0C00h
mov	[esp+10h+var_4], eax
fldcw	word ptr [esp+10h+var_4]
fistp	[esp+10h+var_4]
movzx	eax, byte ptr [esp+10h+var_4]
or	ebx, eax
shl	ebx, 8
fldcw	word ptr [esp+10h+arg_0]
fld	dword ptr [ecx+18h]
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
or	eax, 0C00h
mov	[esp+10h+var_4], eax
fldcw	word ptr [esp+10h+var_4]
fistp	[esp+10h+var_4]
movzx	eax, byte ptr [esp+10h+var_4]
or	ebx, eax
shl	ebx, 8
fldcw	word ptr [esp+10h+arg_0]
fld	dword ptr [ecx+20h]
fnstcw	word ptr [esp+10h+arg_0]
movzx	eax, word ptr [esp+10h+arg_0]
or	eax, 0C00h
mov	[esp+10h+var_4], eax
fldcw	word ptr [esp+10h+var_4]
fistp	[esp+10h+var_4]
mov	cl, byte ptr [esp+10h+var_4]
movzx	eax, cl
mov	ecx, [edi+0E4h]
fldcw	word ptr [esp+10h+arg_0]
or	ebx, eax
push	ebx
push	3Ch
push	edx
call	ecx
mov	edx, [esi+50h]
push	1
push	edx
mov	ecx, esi
call	sub_7FDF70
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	5
push	13h
push	eax
call	edx
mov	esi, [esi+1ACh]
mov	eax, [esi]
mov	ecx, [eax+0E4h]
push	2
push	14h
push	esi
call	ecx
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_7FE200 endp

align 10h



sub_7FE310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	dword ptr [ecx], 2
mov	edx, [eax]
mov	[ecx+30h], edx
fld	dword ptr [eax+4]
fstp	dword ptr [ecx+34h]
fld	dword ptr [eax+8]
fstp	dword ptr [ecx+38h]
fld	dword ptr [eax+0Ch]
fstp	dword ptr [ecx+3Ch]
fld	dword ptr [eax+10h]
fstp	dword ptr [ecx+40h]
fld	dword ptr [eax+14h]
fstp	dword ptr [ecx+44h]
fld	dword ptr [eax+18h]
fstp	dword ptr [ecx+48h]
mov	edx, [eax+1Ch]
mov	[ecx+4Ch], edx
mov	eax, [eax+20h]
mov	edx, [esp+arg_4]
mov	[ecx+50h], eax
push	edx
mov	dword ptr [ecx+8], 0FFFFFFFFh
call	sub_7FCF70
retn	8
sub_7FE310 endp

align 10h



sub_7FE370 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	edi, [esp+8+arg_8]
mov	esi, ecx
test	eax, eax
jnz	short loc_7FE3AF
test	edi, edi
jnz	short loc_7FE3A9
cmp	[esp+8+arg_C], edi
jnz	short loc_7FE3A9
mov	eax, [esp+8+arg_10]
push	eax
call	sub_7FCF70
mov	[esi+30h], edi

loc_7FE397:
mov	ecx, [esp+8+arg_0]
pop	edi
mov	[esi+4], ecx
mov	dword ptr [esi], 3
pop	esi
retn	14h

loc_7FE3A9:
test	eax, eax
jnz	short loc_7FE3AF
mov	eax, edi

loc_7FE3AF:
mov	edx, [esp+8+arg_10]
push	edx
push	eax
call	sub_7FE310
test	edi, edi
jz	short loc_7FE397
mov	eax, [edi]
mov	[esi+54h], eax
fld	dword ptr [edi+4]
fstp	dword ptr [esi+58h]
mov	eax, [esp+8+arg_0]
fld	dword ptr [edi+8]
fstp	dword ptr [esi+5Ch]
fld	dword ptr [edi+0Ch]
fstp	dword ptr [esi+60h]
fld	dword ptr [edi+10h]
fstp	dword ptr [esi+64h]
fld	dword ptr [edi+14h]
fstp	dword ptr [esi+68h]
fld	dword ptr [edi+18h]
fstp	dword ptr [esi+6Ch]
mov	ecx, [edi+1Ch]
mov	[esi+70h], ecx
mov	edx, [edi+20h]
mov	[esi+74h], edx
pop	edi
mov	[esi+4], eax
mov	dword ptr [esi], 3
pop	esi
retn	14h
sub_7FE370 endp

align 10h



sub_7FE410 proc	near

var_130= byte ptr -130h
var_D8=	dword ptr -0D8h
var_A8=	byte ptr -0A8h
arg_0= dword ptr  4

sub	esp, 130h
push	esi
mov	esi, [esp+134h+arg_0]
push	edi
mov	edi, ecx
mov	dword ptr [esi], 10104h
mov	dword ptr [esi+8], 36Bh
mov	dword ptr [esi+4], 1Bh
cmp	byte ptr [edi+28h], 0
jnz	short loc_7FE448
pop	edi
xor	al, al
pop	esi
add	esp, 130h
retn	4

loc_7FE448:
mov	eax, [edi+1ACh]
mov	ecx, [eax]
lea	edx, [esp+138h+var_130]
push	edx
push	eax
mov	eax, [ecx+1Ch]
call	eax
cmp	byte ptr [edi+30h], 0
jz	short loc_7FE476
or	dword ptr [esi], 1200h
cmp	dword ptr [edi+34h], 0
mov	eax, [esi]
jz	short loc_7FE476
or	eax, 0C00020h
mov	[esi], eax

loc_7FE476:
mov	eax, 1
cmp	[edi+44h], eax
jl	short loc_7FE486
or	dword ptr [esi], 4000h

loc_7FE486:
cmp	dword ptr [edi+44h], 2
jl	short loc_7FE492
or	dword ptr [esi], 88000h

loc_7FE492:
test	[esp+138h+var_A8], 48h
jz	short loc_7FE4A2
or	dword ptr [esi], 2000h

loc_7FE4A2:
mov	ecx, [esp+138h+var_D8]
pop	edi
mov	[esi+0Ch], ecx
pop	esi
add	esp, 130h
retn	4
sub_7FE410 endp

align 10h



sub_7FE4C0 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	byte ptr -0C0h
var_80=	byte ptr -80h
var_40=	byte ptr -40h
arg_0= dword ptr  4

sub	esp, 118h
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+51Ch], 0
jnz	loc_7FE5A3
fld	dword ptr [ebx+1FCh]
mov	eax, [esp+11Ch+arg_0]
fstp	[esp+11Ch+var_118]
push	eax
fld	dword ptr [ebx+200h]
lea	ecx, [esp+120h+var_118]
fstp	[esp+120h+var_114]
fld	dword ptr [ebx+204h]
fstp	[esp+120h+var_110]
fld	dword ptr [ebx+208h]
fstp	[esp+120h+var_10C]
fld	dword ptr [ebx+20Ch]
fstp	[esp+120h+var_108]
fld	dword ptr [ebx+210h]
fstp	[esp+120h+var_104]
call	sub_64EAF0
fld	[esp+11Ch+var_118]
mov	ebx, [ebx+1ACh]
fstp	[esp+11Ch+var_100]
push	4
fld	[esp+120h+var_114]
lea	edx, [esp+120h+var_100]
fstp	[esp+120h+var_FC]
push	edx
fldz
push	0
fst	[esp+128h+var_F8]
push	ebx
fld	[esp+12Ch+var_110]
fstp	[esp+12Ch+var_F4]
fld	[esp+12Ch+var_10C]
fstp	[esp+12Ch+var_F0]
fld	[esp+12Ch+var_108]
fstp	[esp+12Ch+var_EC]
fst	[esp+12Ch+var_E8]
fld	[esp+12Ch+var_104]
fstp	[esp+12Ch+var_E4]
fst	[esp+12Ch+var_E0]
fst	[esp+12Ch+var_DC]
fld1
fst	[esp+12Ch+var_D8]
fstp	[esp+12Ch+var_C4]
fst	[esp+12Ch+var_D4]
fst	[esp+12Ch+var_D0]
fst	[esp+12Ch+var_CC]
fstp	[esp+12Ch+var_C8]
mov	ecx, [ebx]
mov	eax, [ecx+178h]
call	eax
pop	ebx
add	esp, 118h
retn	4

loc_7FE5A3:
mov	ecx, [esp+11Ch+arg_0]
push	esi
push	edi
push	ecx
lea	ecx, [esp+128h+var_40]
call	sub_64F570
cmp	byte ptr [ebx+520h], 0
jz	short loc_7FE632
lea	edx, [ebx+1E4h]
push	edx
lea	ecx, [esp+128h+var_100]
call	sub_64F570
mov	ecx, 10h
lea	esi, [esp+124h+var_100]
lea	edi, [esp+124h+var_C0]
rep movsd
lea	eax, [ebx+49Ch]
push	eax
lea	ecx, [esp+128h+var_C0]
push	ecx
lea	ecx, [esp+12Ch+var_100]
call	sub_64F7E0
lea	edx, [ebx+4DCh]
mov	ecx, 10h
lea	esi, [esp+124h+var_100]
lea	edi, [esp+124h+var_C0]
push	edx
lea	eax, [esp+128h+var_C0]
rep movsd
push	eax
lea	ecx, [esp+12Ch+var_100]
call	sub_64F7E0
lea	edi, [ebx+524h]
mov	ecx, 10h
lea	esi, [esp+124h+var_100]
rep movsd
mov	byte ptr [ebx+520h], 0

loc_7FE632:
mov	ecx, 10h
lea	esi, [esp+124h+var_40]
lea	edi, [esp+124h+var_80]
rep movsd
mov	ecx, 10h
lea	esi, [esp+124h+var_40]
lea	edi, [esp+124h+var_C0]
rep movsd
mov	ecx, [ebx+51Ch]
push	ecx
lea	edx, [esp+128h+var_C0]
push	edx
lea	ecx, [esp+12Ch+var_80]
call	sub_64F7E0
mov	ecx, 10h
lea	esi, [esp+124h+var_80]
lea	edi, [esp+124h+var_C0]
rep movsd
lea	eax, [ebx+524h]
push	eax
lea	ecx, [esp+128h+var_C0]
push	ecx
lea	ecx, [esp+12Ch+var_80]
call	sub_64F7E0
lea	ecx, [esp+124h+var_80]
call	sub_64FDC0
mov	ebx, [ebx+1ACh]
mov	edx, [ebx]
mov	ecx, [edx+178h]
push	4
lea	eax, [esp+128h+var_80]
push	eax
push	0
push	ebx
call	ecx
pop	edi
pop	esi
pop	ebx
add	esp, 118h
retn	4
sub_7FE4C0 endp




sub_7FE6D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	ecx
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_0]
mov	eax, esp
lea	edx, [esp+0Ch+var_4]
mov	[eax], ecx
push	edx
lea	ecx, [esi+260h]
call	sub_68D0C0
mov	eax, [esp+8+var_4]
mov	dword ptr [esi+564h], 1
mov	[esi+56Ch], eax
pop	esi
pop	ecx
retn	4
sub_7FE6D0 endp

align 10h



sub_7FE710 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
push	ecx
mov	esi, ecx
mov	ecx, [esp+0Ch+arg_0]
mov	eax, esp
lea	edx, [esp+0Ch+var_4]
mov	[eax], ecx
push	edx
lea	ecx, [esi+260h]
call	sub_68D0C0
mov	eax, [esp+8+var_4]
mov	dword ptr [esi+5DCh], 1
mov	[esi+5E4h], eax
pop	esi
pop	ecx
retn	4
sub_7FE710 endp

align 10h



sub_7FE750 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
lea	eax, [ecx+260h]
push	eax
push	edx
add	ecx, 564h
call	sub_7FE310
retn	4
sub_7FE750 endp

align 10h



sub_7FE770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_C]
lea	eax, [ecx+260h]
push	eax
mov	eax, [esp+4+arg_8]
push	edx
mov	edx, [esp+8+arg_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
push	edx
push	eax
add	ecx, 564h
call	sub_7FE370
retn	10h
sub_7FE770 endp

align 10h



sub_7FE7A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	loc_7FE85A
cmp	dword ptr [esi+2B0h], 0
jz	loc_7FE85A
push	ebx
mov	ebx, 1
cmp	[esi+48h], ebx
jz	short loc_7FE7DD
mov	eax, [esi+1ACh]
mov	[esi+48h], ebx
mov	edx, [esi+60h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+15Ch]
call	eax

loc_7FE7DD:
cmp	[esi+4Ch], ebx
jz	short loc_7FE7FA
mov	eax, [esi+1ACh]
mov	[esi+4Ch], ebx
mov	edx, [esi+74h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+170h]
call	eax

loc_7FE7FA:
push	edi
push	esi
lea	ecx, [esi+5DCh]
call	sub_7FE020
lea	ecx, [esi+248h]
push	ecx
mov	ecx, esi
call	sub_7FE4C0
mov	edi, [esp+0Ch+arg_4]
mov	eax, [esp+0Ch+arg_0]
lea	edx, [edi+1]
push	edx		; lp
push	eax		; int
lea	ecx, [esi+2A8h]
call	sub_7FAED0
test	al, al
jz	short loc_7FE858
mov	edx, [esi+2ECh]
mov	eax, [esi+1ACh]
mov	ecx, [eax]
push	edi
push	edx
push	3
push	eax
mov	eax, [ecx+144h]
call	eax
add	[esi+3CCh], edi
add	[esi+3D0h], ebx

loc_7FE858:
pop	edi
pop	ebx

loc_7FE85A:
pop	esi
retn	8
sub_7FE7A0 endp

align 10h



sub_7FE860 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 38h
push	ebx
push	ebp
mov	ebp, ecx
cmp	byte ptr [ebp+28h], 0
push	esi
push	edi
jz	loc_7FEFC8
cmp	[esp+48h+arg_0], 0
jz	loc_7FEFC8
mov	esi, [esp+48h+arg_10]
test	esi, esi
jz	loc_7FEFC8
cmp	dword ptr [esi+34h], 0
jnz	short loc_7FE89F
mov	ecx, esi
call	sub_8047A0
test	al, al
jz	loc_7FEFC8

loc_7FE89F:
mov	eax, [ebp+31Ch]
push	0
push	0
push	eax
mov	ecx, ebp
call	sub_7FD170
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	1Bh
push	eax
call	edx
mov	eax, [esi]
mov	edx, [eax+3Ch]
mov	ecx, esi
xor	bl, bl
call	edx
cmp	eax, 2
jnz	short loc_7FE8F2
mov	eax, [ebp+31Ch]
cmp	eax, 3
jz	short loc_7FE8EC
cmp	eax, 6
jz	short loc_7FE8EC
push	0
push	0Bh
jmp	short loc_7FE952

loc_7FE8EC:
push	0
push	0Ch
jmp	short loc_7FE952

loc_7FE8F2:
mov	eax, [esi]
mov	edx, [eax+3Ch]
mov	ecx, esi
call	edx
cmp	eax, 1
jnz	short loc_7FE91C
mov	eax, [ebp+31Ch]
cmp	eax, 3
jz	short loc_7FE916
cmp	eax, 6
jz	short loc_7FE916
push	0
push	9
jmp	short loc_7FE952

loc_7FE916:
push	0
push	0Ah
jmp	short loc_7FE952

loc_7FE91C:
mov	eax, [esi+1Ch]
cmp	eax, 1Ch
jz	short loc_7FE946
cmp	eax, 33h
jz	short loc_7FE946
cmp	eax, 1Ah
jz	short loc_7FE946
mov	eax, [ebp+31Ch]
xor	bl, bl
cmp	eax, 3
jz	short loc_7FE94E
cmp	eax, 6
jz	short loc_7FE94E
push	0
push	7
jmp	short loc_7FE952

loc_7FE946:
push	0
mov	bl, 1
push	6
jmp	short loc_7FE952

loc_7FE94E:
push	0
push	8

loc_7FE952:
mov	ecx, ebp
call	sub_7FDF70
mov	edi, [esi]
mov	eax, [edi+3Ch]
mov	ecx, esi
call	eax
test	eax, eax
mov	eax, [edi+40h]
setz	cl
movzx	edx, cl
push	edx
push	1
push	1
push	0
mov	ecx, esi
call	eax
mov	esi, 2
cmp	[ebp+48h], esi
jz	short loc_7FE99A
mov	eax, [ebp+1ACh]
mov	[ebp+48h], esi
mov	edx, [ebp+64h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+15Ch]
call	eax

loc_7FE99A:
cmp	[ebp+4Ch], esi
jz	short loc_7FE9B7
mov	eax, [ebp+1ACh]
mov	[ebp+4Ch], esi
mov	edx, [ebp+78h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+170h]
call	eax

loc_7FE9B7:
cmp	byte ptr [ebp+30h], 0
jz	short loc_7FE9CC
push	esi
lea	ecx, [ebp+260h]
push	ecx
mov	ecx, ebp
call	sub_7FCD00

loc_7FE9CC:
mov	edx, [esp+48h+arg_14]
push	edx
mov	ecx, ebp
call	sub_7FE4C0
fldz
xor	edx, edx
lea	esi, [ebp+260h]
mov	ecx, 8
lea	edi, [esp+48h+var_20]
mov	[esp+48h+arg_14], edx
rep movsd
test	bl, bl
jnz	short loc_7FEA05
fst	[esp+48h+var_4]
fst	[esp+48h+var_C]
fst	[esp+48h+var_14]
fst	[esp+48h+var_1C]

loc_7FEA05:
mov	[esp+48h+var_34], edx
mov	byte ptr [esp+48h+arg_10], dl
cmp	[ebp+30h], dl
jnz	loc_7FEB1B
test	bl, bl
jnz	loc_7FEB1B
fcom	dword ptr [ebp+264h]
fnstsw	ax
test	ah, 5
jnp	short loc_7FEA58
fcom	dword ptr [ebp+26Ch]
fnstsw	ax
test	ah, 5
jnp	short loc_7FEA58
fcom	dword ptr [ebp+274h]
fnstsw	ax
test	ah, 5
jnp	short loc_7FEA58
fcomp	dword ptr [ebp+27Ch]
fnstsw	ax
test	ah, 5
jp	loc_7FEB1D
jmp	short loc_7FEA5A

loc_7FEA58:
fstp	st

loc_7FEA5A:
fld	dword ptr [ebp+27Ch]
fnstcw	word ptr [esp+48h+arg_10]
movzx	eax, word ptr [esp+48h+arg_10]
or	eax, 0C00h
mov	[esp+48h+var_34], eax
fldcw	word ptr [esp+48h+var_34]
fistp	[esp+48h+var_34]
movzx	eax, byte ptr [esp+48h+var_34]
movzx	ecx, al
fldcw	word ptr [esp+48h+arg_10]
shl	ecx, 8
fld	dword ptr [ebp+264h]
fnstcw	word ptr [esp+48h+arg_10]
movzx	eax, word ptr [esp+48h+arg_10]
or	eax, 0C00h
mov	[esp+48h+var_34], eax
fldcw	word ptr [esp+48h+var_34]
fistp	[esp+48h+var_34]
movzx	eax, byte ptr [esp+48h+var_34]
or	ecx, eax
shl	ecx, 8
fldcw	word ptr [esp+48h+arg_10]
fld	dword ptr [ebp+26Ch]
fnstcw	word ptr [esp+48h+arg_10]
movzx	eax, word ptr [esp+48h+arg_10]
or	eax, 0C00h
mov	[esp+48h+var_34], eax
fldcw	word ptr [esp+48h+var_34]
fistp	[esp+48h+var_34]
movzx	eax, byte ptr [esp+48h+var_34]
or	ecx, eax
shl	ecx, 8
fldcw	word ptr [esp+48h+arg_10]
fld	dword ptr [ebp+274h]
fnstcw	word ptr [esp+48h+arg_10]
movzx	eax, word ptr [esp+48h+arg_10]
or	eax, 0C00h
mov	[esp+48h+var_34], eax
fldcw	word ptr [esp+48h+var_34]
fistp	[esp+48h+var_34]
movzx	eax, byte ptr [esp+48h+var_34]
or	ecx, eax
mov	[esp+48h+var_34], ecx
fldcw	word ptr [esp+48h+arg_10]
mov	byte ptr [esp+48h+arg_10], 1
jmp	short loc_7FEB1D

loc_7FEB1B:
fstp	st

loc_7FEB1D:
cmp	[esp+48h+arg_C], edx
jle	loc_7FEFBB
lea	edi, [ebp+2A8h]
lea	ecx, [ecx+0]

loc_7FEB30:
mov	eax, [esp+48h+arg_C]
sub	eax, [esp+48h+arg_14]
lea	eax, [eax+eax*2]
add	eax, eax
cmp	eax, 480h
jge	short loc_7FEB4C
mov	esi, eax
mov	[esp+48h+var_38], esi
jmp	short loc_7FEB58

loc_7FEB4C:
mov	[esp+48h+var_38], 480h
mov	esi, [esp+48h+var_38]

loc_7FEB58:		; int
push	14h
push	esi		; lp
mov	ecx, edi
call	sub_7FAD40
test	eax, eax
jz	loc_7FEFC8
xor	ebx, ebx
cmp	[ebp+30h], bl
jz	loc_7FEE0D
test	esi, esi
jle	loc_7FECF5
mov	ecx, [esp+48h+arg_8]
mov	edi, [esp+48h+arg_14]
add	ecx, edi
lea	edx, [ecx+ecx*8]
mov	ecx, [esp+48h+arg_0]
lea	ecx, [ecx+edx*4+4]
add	eax, 1Ch

loc_7FEB95:
cmp	edi, [esp+48h+arg_C]
jge	loc_7FECF1
fld	dword ptr [ecx]
mov	edx, [ecx+1Ch]
fstp	[esp+48h+arg_14]
fld	dword ptr [ecx+0Ch]
fstp	[esp+48h+var_38]
fld	dword ptr [ecx+10h]
fstp	[esp+48h+var_30]
fld	dword ptr [ecx-4]
fstp	dword ptr [eax-1Ch]
fld	[esp+48h+arg_14]
fstp	dword ptr [eax-18h]
fld	[esp+48h+var_38]
fstp	dword ptr [eax-14h]
fld	[esp+48h+var_30]
fstp	dword ptr [eax-10h]
mov	[eax-0Ch], edx
fld	dword ptr [ecx]
mov	edx, [ecx+1Ch]
fstp	[esp+48h+arg_14]
fld	dword ptr [ecx+14h]
fstp	[esp+48h+var_30]
fld	dword ptr [ecx+10h]
fstp	[esp+48h+var_38]
fld	dword ptr [ecx+4]
fstp	dword ptr [eax-8]
fld	[esp+48h+arg_14]
fstp	dword ptr [eax-4]
fld	[esp+48h+var_30]
fstp	dword ptr [eax]
fld	[esp+48h+var_38]
fstp	dword ptr [eax+4]
mov	[eax+8], edx
fld	dword ptr [ecx+8]
mov	edx, [ecx+1Ch]
fstp	[esp+48h+arg_14]
fld	dword ptr [ecx+0Ch]
fstp	[esp+48h+var_30]
fld	dword ptr [ecx+18h]
fstp	[esp+48h+var_38]
fld	dword ptr [ecx-4]
fstp	dword ptr [eax+0Ch]
fld	[esp+48h+arg_14]
fstp	dword ptr [eax+10h]
fld	[esp+48h+var_30]
fstp	dword ptr [eax+14h]
fld	[esp+48h+var_38]
fstp	dword ptr [eax+18h]
mov	[eax+1Ch], edx
fld	dword ptr [ecx+8]
mov	edx, [ecx+1Ch]
fstp	[esp+48h+arg_14]
fld	dword ptr [ecx+0Ch]
fstp	[esp+48h+var_30]
fld	dword ptr [ecx+18h]
fstp	[esp+48h+var_38]
fld	dword ptr [ecx-4]
fstp	dword ptr [eax+20h]
fld	[esp+48h+arg_14]
fstp	dword ptr [eax+24h]
fld	[esp+48h+var_30]
fstp	dword ptr [eax+28h]
fld	[esp+48h+var_38]
fstp	dword ptr [eax+2Ch]
mov	[eax+30h], edx
fld	dword ptr [ecx]
mov	edx, [ecx+1Ch]
fstp	[esp+48h+arg_14]
fld	dword ptr [ecx+14h]
fstp	[esp+48h+var_30]
fld	dword ptr [ecx+10h]
fstp	[esp+48h+var_38]
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+34h]
fld	[esp+48h+arg_14]
fstp	dword ptr [eax+38h]
fld	[esp+48h+var_30]
fstp	dword ptr [eax+3Ch]
fld	[esp+48h+var_38]
fstp	dword ptr [eax+40h]
mov	[eax+44h], edx
mov	edx, [ecx+1Ch]
fld	dword ptr [ecx+8]
add	ebx, 6
fstp	[esp+48h+arg_14]
inc	edi
fld	dword ptr [ecx+14h]
add	ecx, 24h
fstp	[esp+48h+var_30]
add	eax, 78h
cmp	ebx, esi
fld	dword ptr [ecx-0Ch]
fstp	[esp+48h+var_38]
fld	dword ptr [ecx-20h]
fstp	dword ptr [eax-30h]
fld	[esp+48h+arg_14]
fstp	dword ptr [eax-2Ch]
fld	[esp+48h+var_30]
fstp	dword ptr [eax-28h]
fld	[esp+48h+var_38]
fstp	dword ptr [eax-24h]
mov	[eax-20h], edx
jl	loc_7FEB95

loc_7FECF1:
mov	[esp+48h+arg_14], edi

loc_7FECF5:
mov	eax, [ebp+2CCh]
mov	ecx, [eax]
mov	edx, [ecx+30h]
lea	edi, [ebp+2A8h]
push	eax
call	edx
mov	edx, [edi+4Ch]
mov	eax, [edi]
mov	ecx, [eax]
push	edx
mov	edx, [edi+40h]
push	edx
mov	edx, [edi+24h]
push	edx
push	0
push	eax
mov	eax, [ecx+190h]
call	eax
test	ebx, ebx
jz	loc_7FEFAD
mov	eax, 55555556h
imul	ebx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	esi, edx
shr	esi, 1Fh
add	esi, edx
mov	edx, [ebp+2ECh]
push	esi
push	edx
push	4
push	eax
mov	eax, [ecx+144h]
call	eax
mov	ebx, 1
add	[ebp+3D0h], ebx
cmp	byte ptr [esp+48h+arg_10], 0
jz	loc_7FEFAD
mov	edx, [esp+48h+var_34]
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	edx
push	3Ch
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	ecx, [ebp+50h]
push	ebx
push	ecx
mov	ecx, ebp
call	sub_7FDF70
mov	eax, [ebp+1ACh]
mov	edx, [eax]
push	5
push	13h
push	eax
mov	eax, [edx+0E4h]
call	eax
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	2
push	14h
push	eax
call	edx
mov	edx, [ebp+2ECh]
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	esi
push	edx
push	4
push	eax
mov	eax, [ecx+144h]
call	eax
mov	ecx, [ebp+31Ch]
add	[ebp+3D0h], ebx
push	0
push	0
push	ecx
mov	ecx, ebp
call	sub_7FD170
mov	eax, [ebp+31Ch]
cmp	eax, 3
jz	loc_7FEFA2
cmp	eax, 6
jz	loc_7FEFA2
push	0
push	7
jmp	loc_7FEFA6

loc_7FEE0D:
test	esi, esi
jle	loc_7FECF5
mov	edx, [esp+48h+arg_8]
mov	ecx, [esp+48h+arg_14]
add	ecx, edx
lea	edx, [ecx+ecx*8]
mov	ecx, [esp+48h+arg_0]
lea	edi, [ecx+edx*4+10h]
lea	esi, [eax+1Ch]
lea	ecx, [ecx+0]

loc_7FEE30:
mov	edx, [esp+48h+arg_14]
cmp	edx, [esp+48h+arg_C]
jge	loc_7FECF5
push	ecx
mov	ecx, [edi+10h]
mov	eax, esp
lea	edx, [esp+4Ch+var_24]
mov	[eax], ecx
push	edx
lea	ecx, [esp+50h+var_20]
call	sub_68D0C0
fld	dword ptr [edi-0Ch]
fstp	[esp+48h+var_30]
mov	eax, [esp+48h+var_24]
fld	dword ptr [edi]
fstp	[esp+48h+var_2C]
fld	dword ptr [edi+4]
fstp	[esp+48h+var_28]
fld	dword ptr [edi-10h]
fstp	dword ptr [esi-1Ch]
fld	[esp+48h+var_30]
fstp	dword ptr [esi-18h]
fld	[esp+48h+var_2C]
fstp	dword ptr [esi-14h]
fld	[esp+48h+var_28]
fstp	dword ptr [esi-10h]
mov	[esi-0Ch], eax
fld	dword ptr [edi-0Ch]
fstp	[esp+48h+var_28]
fld	dword ptr [edi+8]
fstp	[esp+48h+var_2C]
fld	dword ptr [edi+4]
fstp	[esp+48h+var_30]
fld	dword ptr [edi-8]
fstp	dword ptr [esi-8]
fld	[esp+48h+var_28]
fstp	dword ptr [esi-4]
fld	[esp+48h+var_2C]
fstp	dword ptr [esi]
fld	[esp+48h+var_30]
fstp	dword ptr [esi+4]
mov	[esi+8], eax
fld	dword ptr [edi-4]
fstp	[esp+48h+var_28]
fld	dword ptr [edi]
fstp	[esp+48h+var_2C]
fld	dword ptr [edi+0Ch]
fstp	[esp+48h+var_30]
fld	dword ptr [edi-10h]
fstp	dword ptr [esi+0Ch]
fld	[esp+48h+var_28]
fstp	dword ptr [esi+10h]
fld	[esp+48h+var_2C]
fstp	dword ptr [esi+14h]
fld	[esp+48h+var_30]
fstp	dword ptr [esi+18h]
mov	[esi+1Ch], eax
fld	dword ptr [edi-4]
fstp	[esp+48h+var_28]
fld	dword ptr [edi]
fstp	[esp+48h+var_2C]
fld	dword ptr [edi+0Ch]
fstp	[esp+48h+var_30]
fld	dword ptr [edi-10h]
fstp	dword ptr [esi+20h]
fld	[esp+48h+var_28]
fstp	dword ptr [esi+24h]
fld	[esp+48h+var_2C]
fstp	dword ptr [esi+28h]
fld	[esp+48h+var_30]
fstp	dword ptr [esi+2Ch]
mov	[esi+30h], eax
fld	dword ptr [edi-0Ch]
fstp	[esp+48h+var_28]
fld	dword ptr [edi+8]
fstp	[esp+48h+var_2C]
fld	dword ptr [edi+4]
fstp	[esp+48h+var_30]
fld	dword ptr [edi-8]
fstp	dword ptr [esi+34h]
fld	[esp+48h+var_28]
fstp	dword ptr [esi+38h]
fld	[esp+48h+var_2C]
fstp	dword ptr [esi+3Ch]
fld	[esp+48h+var_30]
inc	[esp+48h+arg_14]
fstp	dword ptr [esi+40h]
mov	[esi+44h], eax
fld	dword ptr [edi-4]
add	ebx, 6
fstp	[esp+48h+var_28]
add	edi, 24h
fld	dword ptr [edi-1Ch]
add	esi, 78h
cmp	ebx, [esp+48h+var_38]
fstp	[esp+48h+var_2C]
fld	dword ptr [edi-18h]
fstp	[esp+48h+var_30]
fld	dword ptr [edi-2Ch]
fstp	dword ptr [esi-30h]
fld	[esp+48h+var_28]
fstp	dword ptr [esi-2Ch]
fld	[esp+48h+var_2C]
fstp	dword ptr [esi-28h]
fld	[esp+48h+var_30]
fstp	dword ptr [esi-24h]
mov	[esi-20h], eax
jl	loc_7FEE30
jmp	loc_7FECF5

loc_7FEFA2:
push	0
push	8

loc_7FEFA6:
mov	ecx, ebp
call	sub_7FDF70

loc_7FEFAD:
mov	edx, [esp+48h+arg_C]
cmp	[esp+48h+arg_14], edx
jl	loc_7FEB30

loc_7FEFBB:
mov	eax, [esp+48h+arg_C]
lea	ecx, [eax+eax]
add	[ebp+3C8h], ecx

loc_7FEFC8:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 38h
retn	1Ch
sub_7FE860 endp

align 10h



sub_7FEFE0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	ecx, [edx]
mov	[eax], ecx
fld	dword ptr [edx+4]
fstp	dword ptr [eax+4]
push	esi
fld	dword ptr [edx+8]
push	edi
fstp	dword ptr [eax+8]
lea	esi, [edx+1Ch]
fld	dword ptr [edx+0Ch]
lea	edi, [eax+1Ch]
fstp	dword ptr [eax+0Ch]
mov	ecx, 10h
fld	dword ptr [edx+10h]
fstp	dword ptr [eax+10h]
fld	dword ptr [edx+14h]
fstp	dword ptr [eax+14h]
fld	dword ptr [edx+18h]
fstp	dword ptr [eax+18h]
rep movsd
lea	esi, [edx+5Ch]
lea	edi, [eax+5Ch]
mov	ecx, 10h
rep movsd
mov	ecx, [edx+9Ch]
mov	[eax+9Ch], ecx
mov	ecx, [edx+0A0h]
mov	[eax+0A0h], ecx
mov	ecx, [edx+0A4h]
mov	[eax+0A4h], ecx
mov	ecx, [edx+0A8h]
mov	[eax+0A8h], ecx
mov	ecx, [edx+0ACh]
mov	[eax+0ACh], ecx
mov	ecx, [edx+0B0h]
mov	[eax+0B0h], ecx
mov	ecx, [edx+0B4h]
mov	[eax+0B4h], ecx
mov	ecx, [edx+0D0h]
mov	[eax+0D0h], ecx
mov	ecx, [edx+0B8h]
mov	[eax+0B8h], ecx
mov	ecx, [edx+0BCh]
mov	[eax+0BCh], ecx
mov	ecx, [edx+0C0h]
mov	[eax+0C0h], ecx
mov	ecx, [edx+0C4h]
mov	[eax+0C4h], ecx
pop	edi
fld	dword ptr [edx+0C8h]
pop	esi
fstp	dword ptr [eax+0C8h]
fld	dword ptr [edx+0CCh]
fstp	dword ptr [eax+0CCh]
mov	ecx, [edx+0D4h]
mov	[eax+0D4h], ecx
mov	ecx, [edx+0D8h]
mov	[eax+0D8h], ecx
mov	dl, [edx+0DCh]
mov	[eax+0DCh], dl
retn	4
sub_7FEFE0 endp

align 10h



sub_7FF100 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi]
test	eax, eax
jz	short loc_7FF142
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_7FF111:
mov	eax, [esi]
cmp	dword ptr [ecx+eax+8], 0FFFFFFFEh
lea	eax, [ecx+eax+8]
jz	short loc_7FF124
mov	dword ptr [eax], 0FFFFFFFEh

loc_7FF124:
add	ecx, 50h
sub	edx, 1
jnz	short loc_7FF111
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [esi], 0

loc_7FF142:
pop	esi
retn
sub_7FF100 endp

align 10h



sub_7FF150 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
cmp	eax, [edi+8]
jb	loc_7FF1E3
test	eax, eax
jnz	short loc_7FF189
mov	eax, [edi]
test	eax, eax
jz	short loc_7FF17E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7FF17E:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_7FF189:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_7FF1BC
mov	edx, [ecx]
push	ebx
lea	ebx, ds:0[esi*4]
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_7FF1BC:
lea	eax, [esp+8+arg_4]
push	eax
lea	eax, ds:0[esi*4]
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
mov	[edi], eax
pop	esi

loc_7FF1E3:
pop	edi
retn	8
sub_7FF150 endp

align 10h



sub_7FF1F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	edi
mov	edi, ecx
cmp	eax, [edi+8]
jb	loc_7FF285
test	eax, eax
jnz	short loc_7FF229
mov	eax, [edi]
test	eax, eax
jz	short loc_7FF21E
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [edi], 0

loc_7FF21E:
mov	dword ptr [edi+8], 0
pop	edi
retn	8

loc_7FF229:
mov	ecx, dword_1855FC0
push	esi
lea	esi, [eax+3]
mov	eax, [edi]
shr	esi, 2
add	esi, esi
add	esi, esi
test	eax, eax
jz	short loc_7FF25D
mov	edx, [ecx]
push	ebx
mov	ebx, esi
imul	ebx, 0E0h
push	ebx
push	eax
mov	eax, [edx+2Ch]
call	eax
pop	ebx
mov	[edi+8], esi
pop	esi
mov	[edi], eax
pop	edi
retn	8

loc_7FF25D:
lea	eax, [esp+8+arg_4]
push	eax
mov	eax, esi
imul	eax, 0E0h
push	eax
mov	eax, [esp+10h+arg_0]
mov	[esp+10h+arg_4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	eax
call	edx
mov	[edi+8], esi
mov	[edi], eax
pop	esi

loc_7FF285:
pop	edi
retn	8
sub_7FF1F0 endp

align 10h



sub_7FF290 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [ecx]
push	edi
mov	edi, [esp+8+arg_4]
lea	eax, [edi+edi*4]
shl	eax, 4
cmp	dword ptr [eax+ebx+8], 0FFFFFFFEh
lea	ecx, [eax+ebx+8]
mov	edx, edi
jz	short loc_7FF30B
cmp	[ecx+4], edi
jnz	short loc_7FF30B
push	esi
mov	esi, [esp+0Ch+arg_0]

loc_7FF2B5:
cmp	[ecx+4], edi
jnz	short loc_7FF2E7
mov	eax, [ecx+8]
cmp	eax, [esi]
jnz	short loc_7FF2E7
fld	dword ptr [ecx+0Ch]
fld	dword ptr [esi+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7FF2E7
fld	dword ptr [ecx+10h]
fld	dword ptr [esi+8]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_7FF2E7
mov	eax, [ecx+14h]
cmp	eax, [esi+0Ch]
jz	short loc_7FF2FA

loc_7FF2E7:
mov	edx, [ecx]
cmp	edx, 0FFFFFFFFh
jz	short loc_7FF302
lea	ecx, [edx+edx*4]
shl	ecx, 4
lea	ecx, [ecx+ebx+8]
jmp	short loc_7FF2B5

loc_7FF2FA:
pop	esi
pop	edi
mov	eax, edx
pop	ebx
retn	8

loc_7FF302:
pop	esi
pop	edi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8

loc_7FF30B:
pop	edi
or	eax, 0FFFFFFFFh
pop	ebx
retn	8
sub_7FF290 endp

align 10h



sub_7FF320 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 60h
push	ebx
mov	ebx, ecx
mov	eax, [ebx+31Ch]
push	ebp
push	esi
cmp	eax, 3
jz	short loc_7FF33E
cmp	eax, 6
jz	short loc_7FF33E
push	0
push	15h
jmp	short loc_7FF342

loc_7FF33E:
push	0
push	16h

loc_7FF342:
call	sub_7FDF70
mov	esi, 2
cmp	[ebx+48h], esi
jz	short loc_7FF369
mov	eax, [ebx+1ACh]
mov	[ebx+48h], esi
mov	edx, [ebx+64h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+15Ch]
call	eax

loc_7FF369:
cmp	[ebx+4Ch], esi
jz	short loc_7FF386
mov	eax, [ebx+1ACh]
mov	[ebx+4Ch], esi
mov	edx, [ebx+78h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+170h]
call	eax

loc_7FF386:
mov	esi, [esp+6Ch+arg_0]
fild	dword ptr [esi+28h]
mov	eax, [esp+6Ch+arg_4]
lea	ecx, [ebx+248h]
push	ecx
fstp	[esp+70h+arg_0]
mov	ecx, ebx
fld	dword ptr [eax]
fld	[esp+70h+arg_0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+70h+var_60]
fild	dword ptr [esi+2Ch]
fstp	[esp+70h+arg_0]
fld	dword ptr [eax+4]
fld	[esp+70h+arg_0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+70h+var_5C]
fld	dword ptr [eax+8]
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+70h+var_58]
fdivr	dword ptr [eax+0Ch]
fstp	[esp+70h+var_54]
call	sub_7FE4C0
mov	edx, [esi]
mov	eax, [edx+40h]
push	0
push	1
push	1
push	0
mov	ecx, esi
call	eax
mov	eax, [ebx+1ACh]
mov	esi, [esp+6Ch+arg_C]
mov	ecx, [eax]
mov	edx, [ecx+1B4h]
push	4
push	esi
push	0
push	eax
call	edx
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+1B4h]
push	1
add	esi, 40h
push	esi
push	4
push	eax
call	edx
mov	eax, [ebx+31Ch]
push	1
push	0
push	eax
mov	ecx, ebx
call	sub_7FD170
mov	eax, [esp+6Ch+arg_8]
fld	dword ptr [eax]
or	ecx, 0FFFFFFFFh
fstp	[esp+6Ch+var_50]
mov	[esp+6Ch+var_40], ecx
fld	dword ptr [eax+4]
mov	[esp+6Ch+var_2C], ecx
fstp	[esp+6Ch+var_4C]
fld	[esp+6Ch+var_60]
fst	[esp+6Ch+var_48]
fld	[esp+6Ch+var_5C]
fst	[esp+6Ch+var_44]
fld	dword ptr [eax+8]
fstp	[esp+6Ch+var_3C]
fld	dword ptr [eax+4]
fstp	[esp+6Ch+var_38]
fld	[esp+6Ch+var_58]
fst	[esp+6Ch+var_34]
fxch	st(1)
fstp	[esp+6Ch+var_30]
fld	dword ptr [eax]
fstp	[esp+6Ch+var_28]
push	14h		; int
fld	dword ptr [eax+0Ch]
mov	[esp+70h+var_18], ecx
fstp	[esp+70h+var_24]
mov	[esp+70h+var_4], ecx
fxch	st(1)
lea	ebp, [ebx+2A8h]
fstp	[esp+70h+var_20]
push	4		; lp
fld	[esp+74h+var_54]
mov	ecx, ebp
fst	[esp+74h+var_1C]
fld	dword ptr [eax+8]
fstp	[esp+74h+var_14]
fld	dword ptr [eax+0Ch]
fstp	[esp+74h+var_10]
fxch	st(1)
fstp	[esp+74h+var_C]
fstp	[esp+74h+var_8]
call	sub_7FAD40
test	eax, eax
jz	short loc_7FF51D
push	edi
mov	edi, eax
mov	ecx, 14h
lea	esi, [esp+70h+var_50]
rep movsd
mov	eax, [ebp+24h]
mov	ecx, [eax]
mov	edx, [ecx+30h]
push	eax
call	edx
mov	edx, [ebp+4Ch]
mov	eax, [ebp+0]
mov	ecx, [eax]
push	edx
mov	edx, [ebp+40h]
push	edx
mov	edx, [ebp+24h]
push	edx
push	0
push	eax
mov	eax, [ecx+190h]
call	eax
mov	edx, [ebx+2ECh]
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
push	2
push	edx
push	5
push	eax
mov	eax, [ecx+144h]
call	eax
pop	edi

loc_7FF51D:
mov	ecx, [ebx+31Ch]
push	0
push	0
push	ecx
mov	ecx, ebx
call	sub_7FD170
pop	esi
pop	ebp
pop	ebx
add	esp, 60h
retn	10h
sub_7FF320 endp

align 10h



sub_7FF540 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 14h
push	esi
mov	esi, ecx
cmp	byte ptr [esi+28h], 0
jz	loc_7FF65D
cmp	dword ptr [esi+2B0h], 0
jz	loc_7FF65D
cmp	dword ptr [esi+2B4h], 0
jz	loc_7FF65D
cmp	dword ptr [esi+2C0h], 0
jz	loc_7FF65D
cmp	dword ptr [esi+564h], 3
mov	eax, [esi+2B8h]
push	ebx
lea	ebx, [esi+564h]
jnz	short loc_7FF5BA
cmp	eax, 3
jnz	short loc_7FF59C
push	eax
call	sub_7FDF10
push	3
jmp	short loc_7FF5C3

loc_7FF59C:
cmp	eax, 4
jnz	short loc_7FF5CA
push	eax
call	sub_7FDF10
cmp	dword ptr [esi+568h], 3
mov	ecx, esi
jz	short loc_7FF5B6
push	4
jmp	short loc_7FF5C5

loc_7FF5B6:
push	5
jmp	short loc_7FF5C5

loc_7FF5BA:
push	1
call	sub_7FDF10
push	1

loc_7FF5C3:
mov	ecx, esi

loc_7FF5C5:
call	sub_7FDF40

loc_7FF5CA:
push	ebp
push	edi
push	esi
mov	ecx, ebx
call	sub_7FE020
lea	eax, [esi+248h]
push	eax
mov	ecx, esi
call	sub_7FE4C0
mov	ecx, [esp+24h+arg_0]
mov	edx, [esp+24h+arg_4]
mov	eax, [esp+24h+arg_8]
mov	ebp, [esp+24h+arg_10]
mov	[esp+24h+var_14], ecx
mov	ecx, [esp+24h+arg_C]
mov	[esp+24h+var_10], edx
lea	edx, [esp+24h+var_14]
mov	[esp+24h+var_8], ecx
lea	edi, [esi+2A8h]
push	edx
mov	ecx, edi
mov	[esp+28h+var_C], eax
mov	[esp+28h+var_4], ebp
call	sub_7FAFA0
test	al, al
jz	short loc_7FF65A
mov	ecx, edi
call	sub_7FB0E0
add	[esi+3C8h], ebp
inc	dword ptr [esi+3D0h]
push	esi
mov	ecx, ebx
call	sub_7FCF30
test	al, al
jz	short loc_7FF65A
push	esi
mov	ecx, ebx
call	sub_7FE200
mov	ecx, edi
call	sub_7FB0E0
add	[esi+3C8h], ebp
inc	dword ptr [esi+3D0h]

loc_7FF65A:
pop	edi
pop	ebp
pop	ebx

loc_7FF65D:
pop	esi
add	esp, 14h
retn	14h
sub_7FF540 endp

align 10h



sub_7FF670 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	ecx, [edx]
push	esi
mov	esi, [ecx]
mov	[eax], esi
fld	dword ptr [ecx+4]
fstp	dword ptr [eax+4]
push	edi
fld	dword ptr [ecx+8]
lea	edi, [eax+24h]
fstp	dword ptr [eax+8]
mov	esi, [ecx+0Ch]
mov	[eax+0Ch], esi
fld	dword ptr [ecx+14h]
fstp	[esp+8+arg_0]
fld	dword ptr [ecx+10h]
fstp	dword ptr [eax+10h]
fld	[esp+8+arg_0]
fstp	dword ptr [eax+14h]
mov	esi, [ecx+18h]
mov	[eax+18h], esi
mov	esi, [ecx+1Ch]
mov	[eax+1Ch], esi
fld	dword ptr [ecx+20h]
lea	esi, [ecx+24h]
fstp	dword ptr [eax+20h]
mov	ecx, 8
rep movsd
mov	ecx, [edx+4]
mov	edx, [ecx]
pop	edi
mov	[eax+44h], edx
pop	esi
retn	4
sub_7FF670 endp




sub_7FF6D0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	ecx, [edx]
mov	[eax], ecx
fld	dword ptr [edx+4]
fstp	dword ptr [eax+4]
push	esi
fld	dword ptr [edx+8]
push	edi
fstp	dword ptr [eax+8]
mov	ecx, [edx+0Ch]
mov	[eax+0Ch], ecx
fld	dword ptr [edx+14h]
fstp	[esp+8+arg_0]
lea	esi, [edx+24h]
fld	dword ptr [edx+10h]
lea	edi, [eax+24h]
fstp	dword ptr [eax+10h]
fld	[esp+8+arg_0]
fstp	dword ptr [eax+14h]
mov	ecx, [edx+18h]
mov	[eax+18h], ecx
mov	ecx, [edx+1Ch]
mov	[eax+1Ch], ecx
fld	dword ptr [edx+20h]
fstp	dword ptr [eax+20h]
mov	ecx, 8
rep movsd
mov	edx, [edx+44h]
pop	edi
mov	[eax+44h], edx
pop	esi
retn	4
sub_7FF6D0 endp

align 10h



sub_7FF730 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
xor	edi, edi
cmp	eax, edi
jbe	short loc_7FF76A
mov	eax, [esi+8]
test	eax, 0FFFFFFFEh
jbe	short loc_7FF776
cmp	eax, edi
ja	short loc_7FF776
mov	eax, [esi]
cmp	eax, edi
jz	short loc_7FF761
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], edi

loc_7FF761:
mov	[esi+8], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn

loc_7FF76A:
cmp	[esi+8], edi
ja	short loc_7FF776
push	edi
push	esi
call	sub_7FF150

loc_7FF776:
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_7FF730 endp

align 10h



sub_7FF780 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebx, ecx
mov	ebp, [ebx+4]
push	edi
mov	edi, [esp+0Ch+arg_0]
cmp	edi, ebp
jnb	short loc_7FF79C
mov	eax, [ebx+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_7FF7B1
push	edi
jmp	short loc_7FF7AB

loc_7FF79C:
cmp	edi, [ebx+8]
jb	short loc_7FF7B1
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx
mov	ecx, ebx

loc_7FF7AB:
push	ebx
call	sub_7FF1F0

loc_7FF7B1:
mov	[ebx+4], edi
cmp	edi, ebp
jbe	short loc_7FF7DE
push	esi
mov	esi, ebp
imul	esi, 0E0h
add	esi, [ebx]
sub	edi, ebp
jz	short loc_7FF7DD

loc_7FF7C7:
test	esi, esi
jz	short loc_7FF7D2
mov	ecx, esi
call	sub_7FCAB0

loc_7FF7D2:
add	esi, 0E0h
sub	edi, 1
jnz	short loc_7FF7C7

loc_7FF7DD:
pop	esi

loc_7FF7DE:
pop	edi
pop	ebp
pop	ebx
retn	4
sub_7FF780 endp

align 10h



sub_7FF7F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	edi
mov	edi, [esp+4+arg_0]
test	eax, eax
jbe	short loc_7FF834
push	ebx
push	ebp
mov	ebp, ds:InterlockedExchangeAdd
push	esi
mov	esi, [esp+10h+arg_8]
mov	ebx, eax
lea	esp, [esp+0]

loc_7FF810:
test	edi, edi
jz	short loc_7FF826
mov	eax, [esi]
test	eax, eax
jz	short loc_7FF822
push	1		; Value
add	eax, 4
push	eax		; Addend
call	ebp ; InterlockedExchangeAdd

loc_7FF822:
mov	eax, [esi]
mov	[edi], eax

loc_7FF826:
add	esi, 4
add	edi, 4
sub	ebx, 1
jnz	short loc_7FF810
pop	esi
pop	ebp
pop	ebx

loc_7FF834:
pop	edi
retn
sub_7FF7F0 endp

align 10h



sub_7FF840 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [ecx]
test	edi, edi
jnz	short loc_7FF84E
or	eax, 0FFFFFFFFh
pop	edi
retn	4

loc_7FF84E:
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, 44h
mov	edx, 1505h
mov	edi, edi

loc_7FF860:
movzx	ebx, byte ptr [eax+esi-1]
imul	edx, 1003Fh
dec	eax
add	edx, ebx
test	eax, eax
ja	short loc_7FF860
mov	eax, [edi+4]
and	eax, edx
push	eax
push	esi
call	sub_7FF290
pop	esi
pop	ebx
pop	edi
retn	4
sub_7FF840 endp

align 10h



sub_7FF890 proc	near

var_4= dword ptr -4

push	ecx
push	ebp
push	esi
mov	ebp, ecx
push	edi
mov	[esp+10h+var_4], ebp
lea	esi, [ebp+5Ch]
mov	edi, 5

loc_7FF8A2:
cmp	dword ptr [esi], 0
jz	short loc_7FF8BB
mov	eax, [esi]
test	eax, eax
jz	short loc_7FF8B5
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FF8B5:
mov	dword ptr [esi], 0

loc_7FF8BB:
add	esi, 4
sub	edi, 1
jnz	short loc_7FF8A2
lea	esi, [ebp+70h]
mov	edi, 6
jmp	short loc_7FF8D0
align 10h

loc_7FF8D0:
cmp	dword ptr [esi], 0
jz	short loc_7FF8E9
mov	eax, [esi]
test	eax, eax
jz	short loc_7FF8E3
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FF8E3:
mov	dword ptr [esi], 0

loc_7FF8E9:
add	esi, 4
sub	edi, 1
jnz	short loc_7FF8D0
lea	esi, [ebp+88h]
mov	edi, 2Eh
lea	esp, [esp+0]

loc_7FF900:
cmp	dword ptr [esi], 0
jz	short loc_7FF919
mov	eax, [esi]
test	eax, eax
jz	short loc_7FF913
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FF913:
mov	dword ptr [esi], 0

loc_7FF919:
add	esi, 4
sub	edi, 1
jnz	short loc_7FF900
lea	esi, [ebp+140h]
mov	edi, 1Bh
lea	esp, [esp+0]

loc_7FF930:
mov	eax, [esi]
test	eax, eax
jz	short loc_7FF93E
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FF93E:
mov	dword ptr [esi], 0
add	esi, 4
sub	edi, 1
jnz	short loc_7FF930
mov	ecx, [ebp+410h]
add	ebp, 410h
test	ecx, ecx
jnz	short loc_7FF960
xor	eax, eax
jmp	short loc_7FF975

loc_7FF960:
xor	eax, eax
lea	edx, [ecx+8]

loc_7FF965:
cmp	dword ptr [edx], 0FFFFFFFEh
jnz	short loc_7FF973
inc	eax
add	edx, 50h
cmp	eax, [ecx+4]
jbe	short loc_7FF965

loc_7FF973:
mov	ecx, ebp

loc_7FF975:
push	ebx
mov	ebx, ecx
mov	esi, eax
lea	ebx, [ebx+0]

loc_7FF980:
test	ebx, ebx
jz	short loc_7FF9E0
mov	eax, [ebx]
test	eax, eax
jz	short loc_7FF9E0
cmp	esi, [eax+4]
jg	short loc_7FF9E0
lea	ecx, [esi+esi*4]
shl	ecx, 4
mov	edi, [ecx+eax+54h]
test	edi, edi
jz	short loc_7FF9B9
mov	eax, [edi]
test	eax, eax
jz	short loc_7FF9AB
mov	edx, [eax]
push	eax
mov	eax, [edx+8]
call	eax

loc_7FF9AB:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_7FF9B9:
mov	ecx, [ebx]
mov	eax, [ecx+4]
cmp	esi, eax
jg	short loc_7FF980
inc	esi
cmp	esi, eax
ja	short loc_7FF980
lea	edx, [esi+esi*4]
shl	edx, 4
lea	ecx, [edx+ecx+8]

loc_7FF9D1:
cmp	dword ptr [ecx], 0FFFFFFFEh
jnz	short loc_7FF980
inc	esi
add	ecx, 50h
cmp	esi, eax
jbe	short loc_7FF9D1
jmp	short loc_7FF980

loc_7FF9E0:
mov	eax, [ebp+0]
pop	ebx
test	eax, eax
jz	short loc_7FFA24
mov	eax, [eax+4]
xor	ecx, ecx
lea	edx, [eax+1]

loc_7FF9F0:
mov	eax, [ebp+0]
cmp	dword ptr [eax+ecx+8], 0FFFFFFFEh
lea	eax, [eax+ecx+8]
jz	short loc_7FFA04
mov	dword ptr [eax], 0FFFFFFFEh

loc_7FFA04:
add	ecx, 50h
sub	edx, 1
jnz	short loc_7FF9F0
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
mov	dword ptr [ebp+0], 0

loc_7FFA24:
mov	esi, [esp+10h+var_4]
add	esi, 41Ch
mov	edi, 10h

loc_7FFA33:
mov	eax, [esi+4]
test	eax, eax
jz	short loc_7FFA42
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FFA42:
mov	dword ptr [esi+4], 0
mov	eax, [esi]
test	eax, eax
jz	short loc_7FFA57
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FFA57:
mov	dword ptr [esi], 0
add	esi, 8
sub	edi, 1
jnz	short loc_7FFA33
pop	edi
pop	esi
pop	ebp
pop	ecx
retn
sub_7FF890 endp

align 10h



; int __stdcall	sub_7FFA70(__int16, int, float,	float, float, float)
sub_7FFA70 proc	near

var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	byte ptr -6Ch
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h
var_8= dword ptr -8
var_4= dword ptr -4
arg_3= byte ptr	 7
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 0A4h
push	ebx
push	ebp
mov	ebp, ecx
cmp	byte ptr [ebp+28h], 0
push	esi
push	edi
jz	loc_800405
fld	[esp+0B4h+arg_C]
mov	esi, [esp+0B4h+arg_4]
fld	st
mov	dword ptr [ebp+2Ch], 2
fld	[esp+0B4h+arg_8]
mov	[esp+0B4h+var_94], 0
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_98]
fld	[esp+0B4h+var_98]
fabs
fstp	[esp+0B4h+var_90]
fld	[esp+0B4h+var_90]
fstp	dword ptr [ebp+1CCh]
fld	[esp+0B4h+arg_14]
fld	st
fld	[esp+0B4h+arg_10]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_A0]
fld	[esp+0B4h+var_A0]
fabs
fstp	[esp+0B4h+var_90]
fld	[esp+0B4h+var_90]
fstp	dword ptr [ebp+1D0h]
fxch	st(2)
fstp	dword ptr [ebp+1D4h]
fxch	st(1)
fstp	dword ptr [ebp+1D8h]
fxch	st(1)
fstp	dword ptr [ebp+1DCh]
fstp	dword ptr [ebp+1E0h]
mov	ecx, [esi+14h]
mov	eax, [esi+10h]
mov	[esp+0B4h+var_4], ecx
mov	[esp+0B4h+var_8], eax
mov	eax, [ebp+1ACh]
mov	edx, [eax]
mov	edx, [edx+98h]
lea	ecx, [esp+0B4h+var_94]
push	ecx
push	0
push	eax
call	edx
mov	eax, [esp+0B4h+var_94]
test	eax, eax
jz	short loc_7FFB6A
mov	ecx, [eax]
lea	edx, [esp+0B4h+var_20]
push	edx
push	eax
mov	eax, [ecx+30h]
call	eax
mov	eax, [esp+0B4h+var_94]
test	eax, eax
jz	short loc_7FFB6A
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_7FFB6A:
fld	[esp+0B4h+var_98]
fstp	[esp+0B4h+var_9C]
fld	[esp+0B4h+var_A0]
fstp	[esp+0B4h+var_A0]
fld1
fcom	[esp+0B4h+var_9C]
fnstsw	ax
test	ah, 41h
jnz	short loc_7FFB8B
fst	[esp+0B4h+var_9C]

loc_7FFB8B:
fcom	[esp+0B4h+var_A0]
fnstsw	ax
test	ah, 41h
jnz	short loc_7FFB9C
fstp	[esp+0B4h+var_A0]
jmp	short loc_7FFB9E

loc_7FFB9C:
fstp	st

loc_7FFB9E:
fld	[esp+0B4h+arg_8]
push	esi
fstp	[esp+0B8h+var_98]
lea	ecx, [esp+0B8h+var_6C]
fld	[esp+0B8h+arg_C]
fstp	[esp+0B8h+var_8C]
fld	[esp+0B8h+arg_10]
fstp	[esp+0B8h+var_94]
fld	[esp+0B8h+arg_14]
fstp	[esp+0B8h+var_90]
call	sub_7FCA50
mov	edx, [esp+0B4h+var_64]
mov	esi, [esp+0B4h+var_5C]
mov	ebx, [esp+0B4h+var_60]
mov	ecx, [esp+0B4h+var_58]
mov	edi, esi
mov	[esp+0B4h+var_74], edx
mov	[esp+0B4h+var_70], ebx
mov	[esp+0B4h+var_A4], edi
mov	[esp+0B4h+var_88], ecx
test	edx, edx
jge	short loc_7FFC2D
mov	eax, edx
neg	eax
cmp	eax, esi
mov	[esp+0B4h+var_98], eax
fild	[esp+0B4h+var_98]
fmul	[esp+0B4h+var_9C]
fidiv	[esp+0B4h+var_5C]
fadd	[esp+0B4h+arg_8]
fstp	[esp+0B4h+var_98]
jl	short loc_7FFC21
xor	esi, esi
jmp	short loc_7FFC23

loc_7FFC21:
add	esi, edx

loc_7FFC23:
xor	edx, edx
mov	[esp+0B4h+var_5C], esi
mov	[esp+0B4h+var_64], edx

loc_7FFC2D:
mov	eax, [esp+0B4h+var_74]
add	edi, eax
mov	eax, [esp+0B4h+var_8]
cmp	edi, eax
jle	short loc_7FFC71
mov	esi, eax
sub	esi, [esp+0B4h+var_74]
mov	[esp+0B4h+var_8C], esi
fild	[esp+0B4h+var_8C]
test	esi, esi
jge	short loc_7FFC56
fadd	ds:flt_15FCC08

loc_7FFC56:
fmul	[esp+0B4h+var_9C]
sub	eax, edx
mov	esi, eax
mov	[esp+0B4h+var_5C], esi
fidiv	[esp+0B4h+var_A4]
fadd	[esp+0B4h+arg_8]
fstp	[esp+0B4h+var_8C]

loc_7FFC71:
test	ebx, ebx
jge	short loc_7FFCA8
mov	eax, ebx
neg	eax
cmp	eax, ecx
mov	[esp+0B4h+var_A4], eax
fild	[esp+0B4h+var_A4]
fmul	[esp+0B4h+var_A0]
fidiv	[esp+0B4h+var_58]
fadd	[esp+0B4h+arg_10]
fstp	[esp+0B4h+var_94]
jl	short loc_7FFC9C
xor	ecx, ecx
jmp	short loc_7FFC9E

loc_7FFC9C:
add	ecx, ebx

loc_7FFC9E:
xor	ebx, ebx
mov	[esp+0B4h+var_58], ecx
mov	[esp+0B4h+var_60], ebx

loc_7FFCA8:
mov	eax, [esp+0B4h+var_88]
mov	edi, [esp+0B4h+var_70]
add	edi, eax
mov	eax, [esp+0B4h+var_4]
cmp	edi, eax
jle	short loc_7FFCF0
mov	ecx, eax
sub	ecx, [esp+0B4h+var_70]
mov	[esp+0B4h+var_A4], ecx
fild	[esp+0B4h+var_A4]
test	ecx, ecx
jge	short loc_7FFCD5
fadd	ds:flt_15FCC08

loc_7FFCD5:
fmul	[esp+0B4h+var_A0]
sub	eax, ebx
mov	ecx, eax
mov	[esp+0B4h+var_58], ecx
fidiv	[esp+0B4h+var_88]
fadd	[esp+0B4h+arg_10]
fstp	[esp+0B4h+var_90]

loc_7FFCF0:
test	byte ptr [esp+0B4h+var_3C], 4
fld	[esp+0B4h+var_8C]
fld	[esp+0B4h+var_98]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_9C]
fld	[esp+0B4h+var_90]
fld	[esp+0B4h+var_94]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_A0]
fldz
fstp	[esp+0B4h+var_28]
fld1
fstp	[esp+0B4h+var_24]
jz	loc_7FFE07
mov	eax, [esp+0B4h+var_54]
cmp	eax, edx
mov	ecx, [esp+0B4h+var_50]
mov	edi, eax
mov	[esp+0B4h+var_A4], ecx
jge	short loc_7FFD49
mov	eax, edx
mov	[esp+0B4h+var_54], eax

loc_7FFD49:
cmp	ecx, ebx
jge	short loc_7FFD53
mov	ecx, ebx
mov	[esp+0B4h+var_50], ecx

loc_7FFD53:
sub	edi, eax
add	[esp+0B4h+var_4C], edi
mov	edi, [esp+0B4h+var_A4]
sub	edi, ecx
add	[esp+0B4h+var_48], edi
mov	edi, [esp+0B4h+var_4C]
add	edi, eax
lea	ebx, [esi+edx]
cmp	edi, ebx
jle	short loc_7FFD78
sub	esi, eax
add	esi, edx
mov	[esp+0B4h+var_4C], esi

loc_7FFD78:
mov	esi, [esp+0B4h+var_48]
mov	ebx, [esp+0B4h+var_58]
mov	edi, [esp+0B4h+var_60]
add	esi, ecx
add	ebx, edi
cmp	esi, ebx
jle	short loc_7FFD98
mov	esi, [esp+0B4h+var_58]
sub	esi, ecx
add	esi, edi
mov	[esp+0B4h+var_48], esi

loc_7FFD98:
fld	[esp+0B4h+var_9C]
mov	[esp+0B4h+var_38], eax
fidiv	[esp+0B4h+var_5C]
sub	eax, edx
mov	[esp+0B4h+var_A4], eax
mov	esi, [esp+0B4h+var_4C]
mov	[esp+0B4h+var_34], ecx
sub	ecx, edi
mov	[esp+0B4h+var_30], esi
mov	esi, [esp+0B4h+var_48]
mov	[esp+0B4h+var_2C], esi
fild	[esp+0B4h+var_A4]
mov	[esp+0B4h+var_A4], ecx
fmul	st, st(1)
faddp	st(3), st
fxch	st(2)
fstp	[esp+0B4h+var_98]
fld	[esp+0B4h+var_A0]
fidiv	[esp+0B4h+var_58]
fild	[esp+0B4h+var_A4]
fmul	st, st(1)
faddp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_94]
fild	[esp+0B4h+var_4C]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+0B4h+var_9C]
fimul	[esp+0B4h+var_48]
fstp	[esp+0B4h+var_A0]
jmp	short loc_7FFE24

loc_7FFE07:
fstp	st(1)
mov	[esp+0B4h+var_38], edx
fstp	st
mov	[esp+0B4h+var_34], ebx
mov	[esp+0B4h+var_30], esi
mov	[esp+0B4h+var_2C], ecx

loc_7FFE24:
mov	eax, [ebp+1ACh]
mov	edx, [eax]
mov	edx, [edx+0BCh]
lea	ecx, [esp+0B4h+var_38]
push	ecx
push	eax
call	edx
lea	ebx, [ebp+1FCh]
mov	ecx, ebx
call	sub_64E8E0
fld	[esp+0B4h+var_9C]
fdivr	ds:dbl_15FCD70
mov	eax, [esp+0B4h+var_30]
lea	edi, [ebp+214h]
mov	ecx, 0Dh
lea	esi, [esp+0B4h+var_6C]
rep movsd
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
fst	dword ptr [ebx]
fld	[esp+0B4h+var_A0]
fdivr	ds:dbl_15FCDC8
fstp	[esp+0B4h+var_A4]
fld	[esp+0B4h+var_A4]
fst	dword ptr [ebp+20Ch]
fldz
fld1
test	eax, eax
jbe	short loc_7FFEA7
mov	[esp+0B4h+var_A4], eax
fild	[esp+0B4h+var_A4]
jge	short loc_7FFEA3
fadd	ds:flt_15FCC08

loc_7FFEA3:
fdivr	st, st(1)
jmp	short loc_7FFEA9

loc_7FFEA7:
fld	st(1)

loc_7FFEA9:
mov	eax, [esp+0B4h+var_2C]
fstp	[esp+0B4h+var_A4]
test	eax, eax
jbe	short loc_7FFECE
mov	[esp+0B4h+var_90], eax
fstp	st(1)
fild	[esp+0B4h+var_90]
jge	short loc_7FFECA
fadd	ds:flt_15FCC08

loc_7FFECA:
fdivr	st, st(1)
jmp	short loc_7FFED0

loc_7FFECE:
fxch	st(1)

loc_7FFED0:
fld	[esp+0B4h+var_98]
lea	eax, [ebp+1E4h]
fmulp	st(4), st
push	eax
fld	ds:dbl_15FCD60
mov	ecx, ebx
fsubrp	st(4), st
fld	[esp+0B8h+var_A4]
fsubp	st(4), st
fxch	st(3)
fstp	dword ptr [ebp+204h]
fld	[esp+0B8h+var_94]
fmulp	st(2), st
fsubrp	st(1), st
fxch	st(1)
fstp	[esp+0B8h+var_A4]
fadd	[esp+0B8h+var_A4]
fstp	dword ptr [ebp+210h]
call	sub_64EAF0
lea	esi, [ebp+320h]
mov	ecx, esi
call	sub_7FF730
mov	edi, 10h
cmp	[esi+8], edi
jnb	short loc_7FFF5D
mov	eax, [esi]
mov	ecx, dword_1855FC0
test	eax, eax
jz	short loc_7FFF41
mov	edx, [ecx]
push	40h
push	eax
mov	eax, [edx+2Ch]
call	eax
jmp	short loc_7FFF58

loc_7FFF41:
lea	eax, [esp+0B4h+var_A4]
push	eax
mov	[esp+0B8h+var_A4], 2
mov	edx, [ecx]
mov	edx, [edx+38h]
push	40h
push	esi
call	edx

loc_7FFF58:
mov	[esi], eax
mov	[esi+8], edi

loc_7FFF5D:
mov	eax, [ebp+1ACh]
mov	ebx, 1
push	ebx
mov	dword ptr [ebp+31Ch], 0
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1Bh
push	eax
call	edx
mov	eax, [ebp+31Ch]
xor	edi, edi
push	edi
push	edi
push	eax
mov	ecx, ebp
call	sub_7FD170
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	0Fh
push	eax
call	edx
fld	ds:flt_15FD214
mov	eax, [ebp+1ACh]
fstp	[esp+0B4h+var_A4]
push	edi
mov	[ebp+314h], ebx
mov	[ebp+318h], ebx
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0AEh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	2
push	6
push	edi
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	2
push	5
push	edi
push	eax
call	edx

loc_7FFFFF:
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	2
push	7
push	edi
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	2

loc_800025:
push	6
push	ebx
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	2
push	5
push	ebx
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	2
push	7
push	ebx
push	eax
call	edx
mov	edx, [esp+0B4h+var_A4]
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	edx
push	8
push	edi
push	eax
mov	eax, [ecx+114h]
call	eax
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	edi
push	0Ch
push	edi
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+114h]
push	edi
push	0Ch
push	ebx
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+10Ch]
push	ebx
push	ebx
push	edi
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	0Eh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	7
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	89h
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	1Ch
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	98h
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	edi
push	88h
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	edi
push	1Dh
push	eax
mov	edx, [ecx+0E4h]
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0Fh
push	0A8h
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	edi
push	edi
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	edi
push	ebx
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	edi
push	2
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	edi
push	3
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+10Ch]
push	edi
push	0Bh
push	edi
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+10Ch]
push	edi
push	18h
push	edi
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+10Ch]
push	ebx
push	0Bh
push	ebx
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+10Ch]
push	edi
push	18h
push	ebx
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	16h
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	8
push	17h
push	eax
mov	edx, [ecx+0E4h]
call	edx
test	[ebp+58h], bl
jnz	short loc_80023C
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0A4h]
push	eax
call	edx

loc_80023C:
mov	eax, [ebp+1ACh]
mov	[ebp+4Ch], edi
mov	[ebp+50h], edi
mov	[ebp+48h], ebx
mov	edx, [ebp+60h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+15Ch]
call	eax
cmp	[ebp+4Ch], ebx
jz	short loc_800277
mov	eax, [ebp+1ACh]
mov	[ebp+4Ch], ebx
mov	edx, [ebp+74h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+170h]
call	eax

loc_800277:
push	edi
push	ebx
mov	ecx, ebp
call	sub_7FDF70
cmp	byte ptr [ebp+2ACh], 0
lea	esi, [ebp+2A8h]
jz	short loc_800296
mov	ecx, esi
call	sub_7FAC10

loc_800296:
mov	eax, [esi]
mov	ecx, [eax]
mov	edx, [ecx+198h]
push	ebx
push	edi
push	eax
call	edx
mov	eax, [esi]
mov	edx, [esi+28h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+1A0h]
call	eax
cmp	[esp+0B4h+arg_3], 0
mov	byte ptr [ebp+1B0h], 0
mov	byte ptr [ebp+1B1h], 0
mov	byte ptr [ebp+1B2h], 0
mov	byte ptr [ebp+1B3h], 0
mov	[ebp+1B8h], edi
mov	byte ptr [ebp+1B4h], 0
mov	byte ptr [ebp+1BCh], 0
jbe	loc_800405
push	ecx
mov	ecx, [esp+0BCh]
mov	eax, esp
mov	[eax], ecx
mov	ecx, ebp
call	sub_7FD440
mov	edx, [ebp+0]
mov	eax, [edx+38h]
push	offset flt_167D000
mov	ecx, ebp
call	eax
mov	edx, [ebp+0]
mov	eax, [edx+5Ch]
push	edi
mov	ecx, ebp
call	eax
lea	ecx, [ebp+248h]
push	ecx
mov	ecx, ebp
call	sub_7FE4C0
mov	eax, [ebp+1ACh]
mov	edx, [eax]
mov	edx, [edx+0E4h]
xor	ecx, ecx
cmp	[esp+0B4h+arg_3], 0FFh
setnz	cl
push	ecx
push	1Bh
push	eax
call	edx
fld	[esp+0B4h+arg_8]
call	__ftol2_sse
fld	[esp+0B4h+arg_10]
mov	bx, ax
mov	word ptr [esp+0B4h+var_84], bx
call	__ftol2_sse
fld	[esp+0B4h+arg_C]
mov	di, ax
mov	word ptr [esp+0B4h+var_84+2], di
call	__ftol2_sse
fld	[esp+0B4h+arg_14]
mov	word ptr [esp+0B4h+var_9C], ax
mov	word ptr [esp+0B4h+var_80], ax
mov	word ptr [esp+0B4h+var_80+2], di
mov	word ptr [esp+0B4h+var_7C], bx
call	__ftol2_sse
mov	cx, word ptr [esp+0B4h+var_9C]
push	4		; int
mov	word ptr [esp+0B8h+var_78], cx
push	4		; lp
mov	ecx, esi
mov	word ptr [esp+0BCh+var_7C+2], ax
mov	word ptr [esp+0BCh+var_78+2], ax
call	sub_7FAD40
test	eax, eax
jz	short loc_800405
mov	edx, [esp+0B4h+var_84]
mov	ecx, [esp+0B4h+var_80]
mov	[eax], edx
mov	edx, [esp+0B4h+var_7C]
mov	[eax+4], ecx
mov	ecx, [esp+0B4h+var_78]
mov	[eax+8], edx
mov	[eax+0Ch], ecx
mov	ecx, esi
call	sub_7FAE00
mov	ecx, [ebp+2ECh]
mov	eax, [ebp+1ACh]
mov	edx, [eax]
mov	edx, [edx+144h]
push	2
push	ecx
push	5
push	eax
call	edx

loc_800405:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0A4h
retn	18h
sub_7FFA70 endp

align 10h



sub_800420 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	ebx, ecx
mov	esi, [ebx+324h]
push	edi
lea	edi, [ebx+320h]
inc	esi
cmp	esi, [edi+4]
jnb	short loc_800443
mov	eax, [edi+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_800458
push	esi
jmp	short loc_800450

loc_800443:
cmp	esi, [edi+8]
jb	short loc_800458
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_800450:
push	edi
mov	ecx, edi
call	sub_7FF150

loc_800458:
mov	edx, [edi]
lea	eax, [edx+esi*4-4]
mov	[edi+4], esi
test	eax, eax
jz	short loc_80046D
mov	ecx, [ebx+31Ch]
mov	[eax], ecx

loc_80046D:
mov	eax, [esp+0Ch+arg_0]
cmp	eax, 2
jle	short loc_800490
cmp	[ebx+31Ch], eax
jz	short loc_800490
push	0
push	0
push	eax
mov	ecx, ebx
mov	[ebx+31Ch], eax
call	sub_7FD170

loc_800490:
pop	edi
pop	esi
pop	ebx
retn	4
sub_800420 endp

align 10h



sub_8004A0 proc	near
push	ebx
mov	ebx, ecx
mov	eax, [ebx+324h]
test	eax, eax
jz	short loc_800528
push	ebp
xor	ebp, ebp
add	eax, 0FFFFFFFFh
js	short loc_8004D2
mov	edx, [ebx+320h]
lea	ecx, [edx+eax*4]
mov	edi, edi

loc_8004C0:
cmp	dword ptr [ecx], 2
jg	short loc_8004CF
dec	eax
sub	ecx, 4
test	eax, eax
jge	short loc_8004C0
jmp	short loc_8004D2

loc_8004CF:
mov	ebp, [edx+eax*4]

loc_8004D2:
mov	eax, [ebx+324h]
push	esi
lea	esi, [ebx+320h]
push	edi
lea	edi, [eax-1]
cmp	edi, eax
jnb	short loc_8004F3
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_800508
push	edi
jmp	short loc_800500

loc_8004F3:
cmp	edi, [esi+8]
jb	short loc_800508
mov	ecx, edi
shr	ecx, 2
add	ecx, edi
push	ecx

loc_800500:
push	esi
mov	ecx, esi
call	sub_7FF150

loc_800508:
mov	[esi+4], edi
pop	edi
pop	esi
cmp	ebp, [ebx+31Ch]
jz	short loc_800527
push	0
push	0
push	ebp
mov	ecx, ebx
mov	[ebx+31Ch], ebp
call	sub_7FD170

loc_800527:
pop	ebp

loc_800528:
pop	ebx
retn
sub_8004A0 endp

align 10h



sub_800530 proc	near

var_C= qword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebp
push	edi
xor	edi, edi
mov	ebp, ecx
mov	[esp+14h+var_4], ebp
cmp	eax, edi
jnz	short loc_800552
call	sub_7FF100
pop	edi
pop	ebp
add	esp, 0Ch
retn	8

loc_800552:
push	esi
cmp	eax, 8
jnb	short loc_80055F
mov	esi, 8
jmp	short loc_8005C4

loc_80055F:
dec	eax
mov	[esp+18h+arg_4], eax
fild	[esp+18h+arg_4]
test	eax, eax
jge	short loc_800572
fadd	ds:flt_15FCC08

loc_800572:
call	__CIlog
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
mov	esi, 1
fdiv	ds:dbl_14319B0
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fadd	ds:dbl_15FCC40
fstp	[esp+18h+arg_4]
fld	[esp+18h+arg_4]
fnstcw	word ptr [esp+18h+arg_4]
movzx	eax, word ptr [esp+18h+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_C], eax
fldcw	word ptr [esp+18h+var_C]
fistp	[esp+18h+var_C]
mov	cl, byte ptr [esp+18h+var_C]
shl	esi, cl
fldcw	word ptr [esp+18h+arg_4]

loc_8005C4:
mov	ecx, dword_1855FC0
lea	edx, [esp+18h+var_C]
push	edx
lea	edx, [esi+esi*4]
shl	edx, 4
mov	[esp+1Ch+arg_4], edi
mov	dword ptr [esp+1Ch+var_C], 2
mov	eax, [ecx]
mov	eax, [eax+28h]
add	edx, 8
push	edx
call	eax
mov	[esp+18h+arg_4], eax
mov	[eax], edi
mov	edx, [esp+18h+arg_4]
lea	ecx, [esi-1]
mov	[edx+4], ecx
cmp	esi, edi
jbe	short loc_800624
xor	eax, eax
jmp	short loc_800610
db 8Dh,	0A4h, 24h, 4 dup(0)
jmp	short loc_800610
align 10h

loc_800610:
mov	ecx, [esp+18h+arg_4]
mov	dword ptr [eax+ecx+8], 0FFFFFFFEh
add	eax, 50h
sub	esi, 1
jnz	short loc_800610

loc_800624:
mov	eax, [ebp+0]
cmp	eax, edi
jz	short loc_800696
mov	eax, [eax+4]
push	ebx
lea	ebx, [eax+1]

loc_800632:
mov	edx, [ebp+0]
cmp	dword ptr [edi+edx+8], 0FFFFFFFEh
lea	esi, [edi+edx+8]
jz	short loc_80067C
lea	edx, [esi+8]
mov	eax, 44h
mov	ecx, 1505h
lea	ecx, [ecx+0]

loc_800650:
movzx	ebp, byte ptr [eax+edx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, ebp
test	eax, eax
ja	short loc_800650
mov	eax, [esp+1Ch+arg_0]
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+arg_4]
call	sub_801420
mov	ebp, [esp+1Ch+var_4]
mov	dword ptr [esi], 0FFFFFFFEh

loc_80067C:
add	edi, 50h
sub	ebx, 1
jnz	short loc_800632
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [ebp+0]
mov	edx, [edx+30h]
push	eax
call	edx
pop	ebx

loc_800696:
mov	eax, [esp+18h+arg_4]
pop	esi
pop	edi
mov	[ebp+0], eax
pop	ebp
add	esp, 0Ch
retn	8
sub_800530 endp

align 10h



sub_8006B0 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	ebx, [esi+3B0h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
xor	edi, edi
cmp	[esi+3A8h], edi
jbe	short loc_8006EA
lea	esp, [esp+0]

loc_8006D0:
mov	eax, [esi+3A4h]
mov	eax, [eax+edi*4]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
inc	edi
cmp	edi, [esi+3A8h]
jb	short loc_8006D0

loc_8006EA:
add	esi, 3A4h
cmp	dword ptr [esi+4], 0
jbe	short loc_800732
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_800742
mov	eax, [esi]
test	eax, eax
jz	short loc_800719
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_800719:		; lpCriticalSection
push	ebx
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+4], 0
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn

loc_800732:
cmp	dword ptr [esi+8], 0
ja	short loc_800742
push	0
push	esi
mov	ecx, esi
call	sub_668FE0

loc_800742:		; lpCriticalSection
push	ebx
mov	dword ptr [esi+4], 0
call	ds:LeaveCriticalSection
pop	edi
pop	esi
pop	ebx
retn
sub_8006B0 endp

align 10h



sub_800760 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
lea	ebx, [esi+290h]
push	ebx		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [esi+284h]
lea	edi, [esi+280h]
cmp	eax, edi
jz	short loc_80079C

loc_800782:
test	eax, eax
jz	short loc_80078B
lea	ecx, [eax-8]
jmp	short loc_80078D

loc_80078B:
xor	ecx, ecx

loc_80078D:
call	sub_7FB260
mov	eax, [esi+284h]
cmp	eax, edi
jnz	short loc_800782

loc_80079C:
mov	eax, [esi+28Ch]
lea	edi, [esi+288h]
cmp	eax, edi
jz	short loc_8007CA
lea	esp, [esp+0]

loc_8007B0:
test	eax, eax
jz	short loc_8007B9
lea	ecx, [eax-8]
jmp	short loc_8007BB

loc_8007B9:
xor	ecx, ecx

loc_8007BB:
call	sub_7FB9D0
mov	eax, [esi+28Ch]
cmp	eax, edi
jnz	short loc_8007B0

loc_8007CA:		; lpCriticalSection
push	ebx
call	ds:LeaveCriticalSection
cmp	byte ptr [esi+28h], 0
mov	ecx, esi
pop	edi
jz	short loc_8007E6
mov	eax, [esi]
mov	edx, [eax+0D0h]
pop	esi
pop	ebx
jmp	edx

loc_8007E6:
pop	esi
pop	ebx
jmp	sub_8006B0
sub_800760 endp

align 10h


; Attributes: thunk

sub_8007F0 proc	near
jmp	sub_800760
sub_8007F0 endp

align 10h



sub_800800 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
test	byte ptr [eax+0ECh], 2
push	ebx
push	ebp
push	esi
push	edi
mov	ebx, ecx
mov	[esp+18h+var_5], 1
mov	[esp+18h+var_4], 0
jnz	short loc_80082B
mov	[esp+18h+var_4], 1

loc_80082B:
mov	esi, [esp+18h+var_4]
shl	esi, 4
mov	ebp, 1
lea	edi, [ebx+60h]
add	esi, offset off_168193C

loc_800840:
cmp	dword ptr [edi], 0
mov	ecx, [esi]
jnz	short loc_80085E
mov	eax, [ebx+1ACh]
mov	edx, [eax]
push	edi
push	ecx
push	eax
mov	eax, [edx+158h]
call	eax
test	eax, eax
jnz	short loc_80086C

loc_80085E:
inc	ebp
add	esi, 4
add	edi, 4
cmp	ebp, 5
jb	short loc_800840
jmp	short loc_800871

loc_80086C:
mov	[esp+18h+var_5], 0

loc_800871:
mov	eax, [esp+18h+var_4]
lea	edi, [eax+eax*4]
mov	esi, 1
lea	ebp, [ebx+74h]
lea	edi, dword_1859240[edi*4]

loc_800887:
mov	ecx, [edi]
push	ecx
push	ebp
mov	ecx, ebx
call	sub_7FDD10
test	al, al
jz	short loc_8008A4
inc	esi
add	edi, 4
add	ebp, 4
cmp	esi, 6
jb	short loc_800887
jmp	short loc_8008A9

loc_8008A4:
mov	[esp+18h+var_5], 0

loc_8008A9:
cmp	byte ptr [ebx+30h], 0
jz	short loc_80092B
lea	edi, [ebx+8Ch]
mov	ebp, offset dword_1681960
mov	esi, 0Ch
nop

loc_8008C0:
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_8008D4
push	eax
push	edi
mov	ecx, ebx
call	sub_7FDE20
test	al, al
jz	short loc_8008E7

loc_8008D4:
add	esi, 0Ch
add	edi, 4
add	ebp, 0Ch
cmp	esi, 228h
jb	short loc_8008C0
jmp	short loc_8008EC

loc_8008E7:
mov	[esp+18h+var_5], 0

loc_8008EC:
cmp	dword ptr [ebx+34h], 3
jl	short loc_80092B
mov	esi, offset unk_1681730
lea	edi, [ebx+140h]
lea	ecx, [ecx+0]

loc_800900:
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_80091D
mov	eax, [ebx+1ACh]
mov	edx, [eax]
push	edi
push	ecx
push	eax
mov	eax, [edx+1A8h]
call	eax
test	eax, eax
jl	short loc_800939

loc_80091D:
add	esi, 4
add	edi, 4
cmp	esi, offset off_1681794
jl	short loc_800900

loc_80092B:
cmp	[esp+18h+var_5], 0
jnz	short loc_800945
mov	ecx, ebx
call	sub_7FF890

loc_800939:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn	4

loc_800945:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn	4
sub_800800 endp

align 10h



sub_800960 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
call	sub_8006B0
lea	ebp, [edi+290h]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	38h
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_8009C4
lea	eax, [edi+280h]
push	eax
mov	ecx, esi
call	sub_804810
push	ebp		; lpCriticalSection
mov	dword ptr [esi], offset	off_1463B48
mov	[esi+24h], edi
mov	[esi+34h], ebx
mov	[esi+20h], bl
mov	[esi+2Ch], ebx
mov	[esi+28h], ebx
mov	[esi+1Ch], ebx
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn

loc_8009C4:		; lpCriticalSection
push	ebp
xor	esi, esi
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn
sub_800960 endp

align 10h



sub_8009E0 proc	near

var_1D8= dword ptr -1D8h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= qword ptr -180h
var_178= byte ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= byte ptr -160h
var_120= byte ptr -120h
var_E0=	byte ptr -0E0h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1C0h
push	ebx
push	ebp
mov	ebp, ecx
movzx	ecx, byte ptr [ebp+1BCh]
mov	edx, [ebp+1B8h]
push	esi
push	edi
push	ecx
mov	ecx, [ebp+2Ch]
push	edx
mov	edx, [ebp+51Ch]
push	ecx
lea	eax, [ebp+214h]
push	eax
push	edx
mov	edx, [ebp+3E8h]
lea	eax, [ebp+4DCh]
push	eax
lea	ecx, [ebp+49Ch]
push	ecx
lea	edi, [ebp+1FCh]
push	edi
push	edx
lea	ecx, [esp+1F4h+var_E0]
call	sub_7FDC10
mov	esi, [ebp+3F0h]
lea	ebx, [ebp+3ECh]
inc	esi
mov	[esp+1D0h+var_1C0], eax
cmp	esi, [ebx+4]
jnb	short loc_800A57
mov	eax, [ebx+8]
shr	eax, 1
cmp	esi, eax
jnb	short loc_800A6C
push	esi
jmp	short loc_800A64

loc_800A57:
cmp	esi, [ebx+8]
jb	short loc_800A6C
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx

loc_800A64:
push	ebx
mov	ecx, ebx
call	sub_7FF1F0

loc_800A6C:
mov	edx, [ebx]
mov	[ebx+4], esi
imul	esi, 0E0h
lea	ecx, [esi+edx-0E0h]
xor	ebx, ebx
cmp	ecx, ebx
jz	short loc_800A8E
mov	eax, [esp+1D0h+var_1C0]
push	eax
call	sub_7FEFE0

loc_800A8E:
mov	esi, [esp+1D0h+arg_0]
mov	ecx, [esp+1D0h+arg_4]
mov	[ebp+3E8h], ecx
fld	dword ptr [esi+8]
fsub	dword ptr [esi]
fstp	[esp+1D0h+var_1BC]
fld	dword ptr [esi+0Ch]
fsub	dword ptr [esi+4]
fstp	[esp+1D0h+var_1C0]
fld1
fcom	[esp+1D0h+var_1BC]
fnstsw	ax
test	ah, 41h
jnz	short loc_800AC6
fst	[esp+1D0h+var_1BC]

loc_800AC6:
fcom	[esp+1D0h+var_1C0]
fnstsw	ax
test	ah, 41h
jnz	short loc_800AD7
fstp	[esp+1D0h+var_1C0]
jmp	short loc_800AD9

loc_800AD7:
fstp	st

loc_800AD9:
mov	eax, [ecx+1Ch]
fldz
fld1
cmp	eax, ebx
jbe	short loc_800AFA
mov	[esp+1D0h+var_1B8], eax
fild	[esp+1D0h+var_1B8]
test	eax, eax
jge	short loc_800AF6
fadd	ds:flt_15FCC08

loc_800AF6:
fdivr	st, st(1)
jmp	short loc_800AFC

loc_800AFA:
fld	st(1)

loc_800AFC:
mov	ecx, [ecx+20h]
fstp	[esp+1D0h+var_1B8]
cmp	ecx, ebx
jbe	short loc_800B1F
mov	dword ptr [esp+1D0h+var_180], ecx
fstp	st(1)
fild	dword ptr [esp+1D0h+var_180]
test	ecx, ecx
jge	short loc_800B1B
fadd	ds:flt_15FCC08

loc_800B1B:
fdivp	st(1), st
jmp	short loc_800B21

loc_800B1F:
fstp	st

loc_800B21:
mov	ecx, edi
fstp	[esp+1D0h+var_180]
call	sub_64E8E0
fld	[esp+1D0h+var_1BC]
fdivr	ds:dbl_15FCD70
lea	ecx, [esp+1D0h+var_120]	; void *
fstp	[esp+1D0h+var_1BC]
fld	[esp+1D0h+var_1BC]
fst	dword ptr [edi]
fld	[esp+1D0h+var_1C0]
fdivr	ds:dbl_15FCDC8
fstp	[esp+1D0h+var_1C0]
fld	[esp+1D0h+var_1C0]
fst	dword ptr [ebp+20Ch]
fld	dword ptr [esi]
fmulp	st(2), st
fld	ds:dbl_15FCD60
fsubrp	st(2), st
fld	[esp+1D0h+var_1B8]
fsubp	st(2), st
fxch	st(1)
fstp	dword ptr [ebp+204h]
fmul	dword ptr [esi+4]
fld1
fsubrp	st(1), st
fld	[esp+1D0h+var_180]
fstp	[esp+1D0h+var_1B8]
fadd	[esp+1D0h+var_1B8]
fstp	dword ptr [ebp+210h]
call	sub_64F7C0
lea	ecx, [esp+1D0h+var_160]	; void *
call	sub_64F7C0
fld	ds:flt_1437740
mov	edx, [ebp+0]
mov	edx, [edx+60h]
push	ebx
push	ecx
fstp	[esp+1D8h+var_1D8]
lea	eax, [esp+1D8h+var_160]
push	eax
lea	ecx, [esp+1DCh+var_120]
push	ecx
push	esi
mov	ecx, ebp
call	edx
mov	eax, [ebp+0]
mov	edx, [eax+58h]
lea	ecx, [esp+1D0h+var_120]
push	ecx
mov	ecx, ebp
call	edx
mov	eax, [ebp+0]
mov	edx, [eax+54h]
lea	ecx, [esp+1D0h+var_160]
push	ecx
mov	ecx, ebp
call	edx
mov	eax, [ebp+0]
mov	edx, [eax+5Ch]
push	ebx
mov	ecx, ebp
call	edx
fld1
mov	eax, [ebp+3E8h]
fst	[esp+1D0h+var_188]
fstp	[esp+1D0h+var_18C]
mov	[esp+1D0h+var_1AC], ebx
mov	[esp+1D0h+var_1A8], ebx
mov	[esp+1D0h+var_184], 3
mov	[esp+1D0h+var_190], ebx
mov	[esp+1D0h+var_194], ebx
mov	[esp+1D0h+var_198], ebx
mov	[esp+1D0h+var_19C], ebx
lea	esi, [esp+1D0h+var_1B4]
lea	edi, [ebp+214h]
cmp	[eax+28h], ebx
jz	short loc_800C4B
mov	ecx, [eax+28h]
mov	edx, [ecx+28h]
mov	ecx, [ecx+2Ch]
mov	[esp+1D0h+var_1B4], edx
mov	edx, [eax+1Ch]
mov	[esp+1D0h+var_1B0], ecx
mov	ecx, [eax+20h]
mov	[esp+1D0h+var_1A4], edx
jmp	short loc_800C5C

loc_800C4B:
mov	ecx, 40h
mov	[esp+1D0h+var_1B4], ecx
mov	[esp+1D0h+var_1B0], ecx
mov	[esp+1D0h+var_1A4], ecx

loc_800C5C:
mov	[esp+1D0h+var_1A0], ecx
mov	ecx, 0Dh
rep movsd
mov	ecx, [ebp+1ACh]
mov	dword ptr [ebp+2Ch], 2
mov	eax, [eax+2Ch]
mov	edx, [ecx]
push	eax
push	ebx
push	ecx
mov	ecx, [edx+94h]
call	ecx
test	eax, eax
jl	short loc_800CA3
mov	ecx, [ebp+3E8h]
mov	eax, [ebp+1ACh]
mov	ecx, [ecx+34h]
mov	edx, [eax]
mov	edx, [edx+9Ch]
push	ecx
push	eax
call	edx

loc_800CA3:
mov	eax, [ebp+3E8h]
cmp	[eax+34h], ebx
jnz	short loc_800CC0
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+9Ch]
push	ebx
push	eax
call	edx

loc_800CC0:
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	0AEh
push	eax
call	edx
fldz
mov	eax, [ebp+3E8h]
fstp	[esp+1D0h+var_168]
fld1
mov	dword ptr [esp+1D0h+var_178], ebx
fstp	[esp+1D0h+var_164]
mov	[esp+1D0h+var_174], ebx
cmp	[eax+28h], ebx
jz	short loc_800D51
mov	ecx, [eax+28h]
mov	edx, [ecx+28h]
mov	[esp+1D0h+var_170], edx
mov	eax, [eax+28h]
mov	ecx, [eax+2Ch]
mov	eax, [ebp+1ACh]
mov	[esp+1D0h+var_16C], ecx
mov	edx, [eax]
mov	edx, [edx+0BCh]
lea	ecx, [esp+1D0h+var_178]
push	ecx
push	eax
call	edx
mov	eax, [ebp+3E8h]
mov	ecx, 1
cmp	[eax+34h], ebx
jz	short loc_800D35
mov	ecx, 5

loc_800D35:
fld1
mov	eax, [ebp+1ACh]
mov	edx, [eax]
push	ebx
push	ecx
fstp	[esp+1D8h+var_1D8]
push	ebx
push	ecx
push	ebx
push	ebx
push	eax
mov	eax, [edx+0ACh]
call	eax

loc_800D51:
mov	eax, [ebp+3E8h]
mov	ecx, [eax+1Ch]
mov	[esp+1D0h+var_170], ecx
mov	edx, [eax+20h]
mov	eax, [ebp+1ACh]
mov	[esp+1D0h+var_16C], edx
mov	ecx, [eax]
lea	edx, [esp+1D0h+var_178]
push	edx
push	eax
mov	eax, [ecx+0BCh]
call	eax
mov	ecx, [ebp+31Ch]
push	ebx
push	ebx
push	ecx
mov	ecx, ebp
call	sub_7FD170
mov	[ebp+1BCh], bl
cmp	[ebp+1B1h], bl
jz	short loc_800DBB
mov	ebp, [ebp+1ACh]
mov	edx, [ebp+0]
mov	eax, [edx+0E4h]
push	ebx
push	34h
push	ebp
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1C0h
retn	8

loc_800DBB:
cmp	[ebp+1B3h], bl
jz	short loc_800E01
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	0Eh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	ebx
push	7
push	eax
call	edx
mov	ebp, [ebp+1ACh]
mov	eax, [ebp+0]
mov	ecx, [eax+0E4h]
push	4
push	17h
push	ebp
call	ecx

loc_800E01:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1C0h
retn	8
sub_8009E0 endp

align 10h



sub_800E10 proc	near

var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	byte ptr -0C4h
var_84=	byte ptr -84h
var_44=	dword ptr -44h
var_40=	byte ptr -40h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= byte ptr	-4

sub	esp, 0F8h
push	ebx
push	esi
mov	ebx, ecx
push	edi
mov	edi, [ebx+3E8h]
cmp	byte ptr [edi+38h], 0
jz	short loc_800E54
mov	esi, [edi+30h]
test	esi, esi
jz	short loc_800E4D
push	0FFFFFFFFh	; Value
lea	eax, [esi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_800E4D
test	esi, esi
jz	short loc_800E4D
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax

loc_800E4D:
mov	dword ptr [edi+30h], 0

loc_800E54:
mov	ecx, [ebx+3F0h]
mov	edx, [ebx+3ECh]
imul	ecx, 0E0h
lea	esi, [ebx+3ECh]
lea	eax, [ecx+edx-0E0h]
push	eax
lea	ecx, [esp+108h+var_E0]
call	sub_7FEFE0
mov	ecx, [esi+4]
dec	ecx
push	ecx
mov	ecx, esi
call	sub_7FF780
mov	edx, [esp+104h+var_E0]
fld	[esp+104h+var_DC]
mov	eax, [esp+104h+var_C]
mov	[ebx+3E8h], edx
fstp	dword ptr [ebx+1FCh]
fld	[esp+104h+var_D8]
mov	edx, [esp+104h+var_8]
fstp	dword ptr [ebx+200h]
lea	edi, [ebx+214h]
fld	[esp+104h+var_D4]
mov	ecx, 0Dh
fstp	dword ptr [ebx+204h]
lea	esi, [esp+104h+var_40]
fld	[esp+104h+var_D0]
fstp	dword ptr [ebx+208h]
fld	[esp+104h+var_CC]
fstp	dword ptr [ebx+20Ch]
fld	[esp+104h+var_C8]
fstp	dword ptr [ebx+210h]
rep movsd
mov	cl, [esp+104h+var_4]
mov	[ebx+1BCh], cl
mov	[ebx+2Ch], eax
mov	eax, [ebx]
lea	ecx, [esp+104h+var_C4]
mov	[ebx+1B8h], edx
mov	edx, [eax+58h]
push	ecx
mov	ecx, ebx
call	edx
mov	eax, [ebx]
mov	edx, [eax+54h]
lea	ecx, [esp+104h+var_84]
push	ecx
mov	ecx, ebx
call	edx
mov	ecx, [esp+104h+var_44]
mov	eax, [ebx]
mov	edx, [eax+5Ch]
push	ecx
mov	ecx, ebx
call	edx
mov	edx, [ebx+3E8h]
mov	edx, [edx+2Ch]
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
push	edx
push	0
push	eax
mov	eax, [ecx+94h]
call	eax
test	eax, eax
jl	short loc_800F73
mov	edx, [ebx+3E8h]
mov	eax, [ebx+1ACh]
mov	edx, [edx+34h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+9Ch]
call	eax

loc_800F73:
mov	ecx, [ebx+3E8h]
cmp	dword ptr [ecx+34h], 0
jnz	short loc_800F92
mov	eax, [ebx+1ACh]
mov	edx, [eax]
push	0
push	eax
mov	eax, [edx+9Ch]
call	eax

loc_800F92:
mov	ecx, [ebx+21Ch]
fldz
mov	eax, [ebx+224h]
fstp	[esp+104h+var_E8]
mov	edx, [ebx+220h]
fld1
mov	[esp+104h+var_F8], ecx
fstp	[esp+104h+var_E4]
mov	ecx, [ebx+228h]
mov	[esp+104h+var_F0], eax
mov	eax, [ebx+1ACh]
mov	[esp+104h+var_EC], ecx
mov	[esp+104h+var_F4], edx
mov	edx, [eax]
mov	edx, [edx+0BCh]
lea	ecx, [esp+104h+var_F8]
push	ecx
push	eax
call	edx
mov	edx, [ebx+244h]
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
shr	edx, 2
and	edx, 1
push	edx
push	0AEh
push	eax
mov	eax, [ecx+0E4h]
call	eax
mov	ecx, [ebx+31Ch]
push	0
push	0
push	ecx
mov	ecx, ebx
call	sub_7FD170
cmp	byte ptr [ebx+1BCh], 0
jz	short loc_801051
mov	edx, [ebx+3E8h]
cmp	dword ptr [edx+34h], 0
jz	short loc_801051
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	34h
push	eax
call	edx
mov	eax, [ebx]
mov	edx, [eax+0A4h]
mov	ecx, ebx
call	edx
pop	edi
pop	esi
pop	ebx
add	esp, 0F8h
retn

loc_801051:
mov	eax, [ebx]
mov	edx, [eax+0A8h]
mov	ecx, ebx
call	edx
pop	edi
pop	esi
pop	ebx
add	esp, 0F8h
retn
sub_800E10 endp

align 10h



sub_801070 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	3Ch
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_8010B9
lea	eax, [edi+288h]
push	eax
mov	ecx, esi
call	sub_804850
mov	dword ptr [esi], offset	off_1463B8C
mov	[esi+28h], ebx
mov	[esi+30h], ebx
mov	[esi+24h], edi
pop	edi
mov	[esi+2Ch], ebx
mov	[esi+34h], ebx
mov	[esi+38h], bl
mov	eax, esi
pop	esi
pop	ebx
retn

loc_8010B9:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn
sub_801070 endp

align 10h



sub_8010C0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1ACh], 0
jz	short loc_801114
push	0
push	0
call	sub_7FDF70
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+170h]
push	0
push	eax
call	edx
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	0
push	0
push	eax
call	edx
test	byte ptr [esi+58h], 1
jnz	short loc_801114
mov	eax, [esi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0A8h]
push	eax
call	edx

loc_801114:
mov	ecx, esi
pop	esi
jmp	sub_8006B0
sub_8010C0 endp

align 10h



sub_801120 proc	near

var_134= dword ptr -134h
var_130= byte ptr -130h
var_124= dword ptr -124h
var_110= dword ptr -110h
var_F4=	dword ptr -0F4h
var_A8=	byte ptr -0A8h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 134h
push	ebx
push	ebp
push	esi
mov	esi, [esp+140h+arg_0]
xor	ebx, ebx
mov	ebp, ecx
cmp	esi, ebx
jz	loc_8013B0
cmp	[esp+140h+arg_4], ebx
jz	loc_8013B0
mov	[ebp+1ACh], esi
mov	eax, [esi]
mov	ecx, [eax+4]
push	esi
call	ecx
mov	eax, [ebp+1ACh]
lea	ecx, [esp+140h+var_130]
mov	[ebp+30h], bl
mov	[ebp+31h], bl
mov	[ebp+44h], ebx
mov	[ebp+34h], ebx
mov	edx, [eax]
mov	edx, [edx+1Ch]
push	ecx
push	eax
call	edx
mov	eax, [esp+140h+var_F4]
test	al, 2
jnz	short loc_80118D
and	eax, 100h
neg	eax
sbb	eax, eax
add	eax, 2
mov	[ebp+44h], eax

loc_80118D:
mov	ecx, [esp+140h+var_64]
and	ecx, 0FFFFh
cmp	ecx, 101h
jb	short loc_8011A6
mov	byte ptr [ebp+30h], 1

loc_8011A6:
cmp	ecx, 104h
jb	short loc_8011C6
fld	ds:flt_15AACC4
fcomp	[esp+140h+var_60]
fnstsw	ax
test	ah, 41h
jp	short loc_8011C6
mov	byte ptr [ebp+31h], 1

loc_8011C6:
push	edi
mov	edi, 3
cmp	ecx, 300h
jb	short loc_8011F1
mov	[ebp+34h], edi
mov	dword ptr [ebp+414h], 20h
mov	dword ptr [ebp+38h], offset aPs_3_0 ; "ps_3_0"
mov	dword ptr [ebp+3Ch], offset aVs_3_0 ; "vs_3_0"
jmp	short loc_801241

loc_8011F1:
cmp	ecx, 201h
jb	short loc_80121A
mov	dword ptr [ebp+34h], 2
mov	dword ptr [ebp+414h], 10h
mov	dword ptr [ebp+38h], offset aPs_2_a ; "ps_2_a"
mov	dword ptr [ebp+3Ch], offset aVs_2_a ; "vs_2_a"
jmp	short loc_801241

loc_80121A:		; "ps_2_0"
mov	dword ptr [ebp+38h], offset aPs_2_0
mov	dword ptr [ebp+3Ch], offset aVs_2_0 ; "vs_2_0"
cmp	ecx, 200h
jb	short loc_801241
mov	dword ptr [ebp+34h], 1
mov	dword ptr [ebp+414h], 8

loc_801241:
test	[esp+144h+var_124], 20000000h
mov	eax, [esp+144h+arg_8]
mov	[ebp+58h], eax
jz	short loc_801262
test	al, 4
jz	short loc_801262
mov	byte ptr [ebp+394h], 1
jmp	short loc_801268

loc_801262:
mov	[ebp+394h], bl

loc_801268:
test	al, 8
jz	short loc_801275
mov	byte ptr [ebp+395h], 1
jmp	short loc_80127B

loc_801275:
mov	[ebp+395h], bl

loc_80127B:
mov	eax, [ebp+1ACh]
push	ebx
lea	edx, [esp+148h+var_134]
push	edx
xor	edx, edx
cmp	[ebp+395h], bl
mov	dword ptr [ebp+1C8h], 1Ch
setnz	dl
mov	[esp+14Ch+var_134], ebx
mov	ecx, [eax]
push	edx
push	1Ch
push	ebx
push	1
push	1
push	1
push	eax
mov	eax, [ecx+5Ch]
call	eax
test	eax, eax
jz	short loc_8012B9
mov	[ebp+31h], bl

loc_8012B9:
mov	al, [esp+144h+var_A8]
test	al, 40h
jz	short loc_8012DA
mov	dword ptr [ebp+1C0h], 7
mov	dword ptr [ebp+1C4h], 8
jmp	short loc_801300

loc_8012DA:
test	al, 8
jz	short loc_8012F4
mov	dword ptr [ebp+1C0h], 4
mov	dword ptr [ebp+1C4h], 5
jmp	short loc_801300

loc_8012F4:
mov	[ebp+1C0h], edi
mov	[ebp+1C4h], edi

loc_801300:
mov	ecx, [esp+144h+var_110]
shr	ecx, 11h
and	cl, 1
lea	edx, [esp+144h+var_130]
mov	[ebp+40h], cl
push	edx
mov	ecx, ebp
call	sub_800800
test	al, al
jz	short loc_801332
lea	edi, [ebp+2A8h]
mov	ecx, edi
mov	[edi], esi
call	sub_7FAC10
test	al, al
jnz	short loc_80136C
mov	[edi], ebx

loc_801332:
mov	ecx, ebp
call	sub_7FF890
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	eax, [esp+144h+var_134]
mov	[ebp+1ACh], ebx
cmp	eax, ebx
jz	short loc_80135D
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_80135D:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 134h
retn	10h

loc_80136C:
mov	esi, [esp+144h+arg_4]
mov	eax, [esp+144h+arg_C]
lea	edi, [ebp+32Ch]
mov	ecx, 0Eh
rep movsd
mov	[ebp+364h], eax
mov	eax, [esp+144h+var_134]
mov	byte ptr [ebp+28h], 1
cmp	eax, ebx
jz	short loc_8013A1
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_8013A1:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 134h
retn	10h

loc_8013B0:
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 134h
retn	10h
sub_801120 endp

align 10h



sub_8013C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+4]
cmp	esi, eax
jnb	short loc_8013FE
sub	eax, esi
push	eax
mov	eax, [edi]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7FBC10
mov	edx, [edi+8]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_801417
mov	eax, [esp+8+arg_0]
push	esi
push	eax
mov	ecx, edi
call	sub_668FE0
mov	[edi+4], esi
pop	edi
pop	esi
retn	8

loc_8013FE:
cmp	esi, [edi+8]
jb	short loc_801417
mov	edx, [esp+8+arg_0]
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
push	edx
mov	ecx, edi
call	sub_668FE0

loc_801417:
mov	[edi+4], esi
pop	edi
pop	esi
retn	8
sub_8013C0 endp

align 10h



sub_801420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_801433
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_801455

loc_801433:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_80145A
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_801455:
call	sub_800530

loc_80145A:
mov	eax, [edi]
mov	esi, [esp+8+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
lea	edx, [esi+esi*4]
shl	edx, 4
lea	edi, [edx+eax+8]
mov	edx, [edi]
cmp	edx, 0FFFFFFFEh
jnz	short loc_801493
mov	eax, [esp+8+arg_4]
push	eax
lea	ecx, [edi+8]
mov	dword ptr [edi], 0FFFFFFFFh
call	sub_7FF6D0
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_801493:
mov	ecx, [eax+4]
push	ebx
mov	ebx, esi
push	ebp
lea	ebx, [ebx+0]

loc_8014A0:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*4]
shl	ebp, 4
cmp	dword ptr [eax+ebp+8], 0FFFFFFFEh
jnz	short loc_8014A0
mov	ebp, [edi+4]
lea	ecx, [ebx+ebx*4]
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	ebp, esi
jnz	short loc_8014F2
test	ecx, ecx
jz	short loc_8014D9
mov	[ecx], edx
mov	edx, [edi+4]
lea	eax, [edi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_7FF6D0

loc_8014D9:
mov	ecx, [esp+10h+arg_4]
push	ecx
lea	ecx, [edi+8]
call	sub_7FF6D0
pop	ebp
mov	[edi], ebx
pop	ebx
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_8014F2:
lea	ebp, [ebp+ebp*4+0]
shl	ebp, 4
cmp	[eax+ebp+8], esi
lea	ebp, [eax+ebp+8]
jz	short loc_801517

loc_801503:
mov	ebp, [ebp+0]
lea	ebp, [ebp+ebp*4+0]
shl	ebp, 4
cmp	[eax+ebp+8], esi
lea	ebp, [eax+ebp+8]
jnz	short loc_801503

loc_801517:
test	ecx, ecx
jz	short loc_80152F
mov	[ecx], edx
mov	edx, [edi+4]
lea	eax, [edi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_7FF6D0

loc_80152F:
mov	ecx, [esp+10h+arg_4]
push	ecx
lea	ecx, [edi+8]
mov	[ebp+0], ebx
call	sub_7FF6D0
pop	ebp
pop	ebx
mov	[edi+4], esi
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
retn	0Ch
sub_801420 endp

align 10h



sub_801550 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
lea	eax, [edi+280h]
push	eax
mov	esi, ecx
call	sub_804810
xor	eax, eax
mov	[esi+24h], edi
mov	[esi+34h], eax
mov	[esi+20h], al
mov	[esi+2Ch], eax
mov	[esi+28h], eax
mov	[esi+1Ch], eax
mov	[esi+44h], eax
mov	[esi+40h], eax
mov	[esi+3Ch], eax
pop	edi
mov	dword ptr [esi], offset	off_1463BB0
mov	eax, esi
pop	esi
retn	4
sub_801550 endp

align 10h



sub_801590 proc	near
push	esi
mov	esi, ecx
cmp	byte ptr [esi+31h], 0
jnz	short loc_80159D
xor	eax, eax
pop	esi
retn

loc_80159D:
push	edi
call	sub_8006B0
lea	edi, [esi+290h]
push	edi		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	48h
call	edx
test	eax, eax
jz	short loc_8015DB
push	esi
mov	ecx, eax
call	sub_801550
push	edi		; lpCriticalSection
mov	esi, eax
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn

loc_8015DB:		; lpCriticalSection
push	edi
xor	esi, esi
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
retn
sub_801590 endp

align 10h



sub_8015F0 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
call	sub_8006B0
lea	ebp, [edi+290h]
push	ebp		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
xor	ebx, ebx
push	ebx
push	3Ch
call	edx
mov	esi, eax
cmp	esi, ebx
jz	short loc_801657
lea	eax, [edi+280h]
push	eax
mov	ecx, esi
call	sub_804810
push	ebp		; lpCriticalSection
mov	[esi+24h], edi
mov	[esi+34h], ebx
mov	[esi+20h], bl
mov	[esi+2Ch], ebx
mov	[esi+28h], ebx
mov	[esi+1Ch], ebx
mov	dword ptr [esi], offset	off_1463BF8
mov	[esi+38h], ebx
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn

loc_801657:		; lpCriticalSection
push	ebp
xor	esi, esi
call	ds:LeaveCriticalSection
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn
sub_8015F0 endp

align 10h



sub_801670 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
test	eax, eax
jnz	short loc_801683
mov	eax, [esp+8+arg_0]
push	8
push	eax
jmp	short loc_8016A5

loc_801683:
mov	ecx, [eax+4]
lea	edx, ds:4[ecx*4]
mov	ecx, [eax]
lea	ecx, [ecx+ecx*4]
cmp	ecx, edx
jbe	short loc_8016AA
mov	edx, [eax+4]
mov	ecx, [esp+8+arg_0]
lea	eax, [edx+edx+2]
push	eax
push	ecx
mov	ecx, edi

loc_8016A5:
call	sub_800530

loc_8016AA:
mov	eax, [edi]
mov	esi, [esp+8+arg_8]
and	esi, [eax+4]
inc	dword ptr [eax]
mov	eax, [edi]
lea	edx, [esi+esi*4]
shl	edx, 4
lea	edi, [edx+eax+8]
mov	edx, [edi]
cmp	edx, 0FFFFFFFEh
jnz	short loc_8016E3
mov	eax, [esp+8+arg_4]
push	eax
lea	ecx, [edi+8]
mov	dword ptr [edi], 0FFFFFFFFh
call	sub_7FF670
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_8016E3:
mov	ecx, [eax+4]
push	ebx
mov	ebx, esi
push	ebp
lea	ebx, [ebx+0]

loc_8016F0:
inc	ebx
and	ebx, ecx
lea	ebp, [ebx+ebx*4]
shl	ebp, 4
cmp	dword ptr [eax+ebp+8], 0FFFFFFFEh
jnz	short loc_8016F0
mov	ebp, [edi+4]
lea	ecx, [ebx+ebx*4]
shl	ecx, 4
lea	ecx, [ecx+eax+8]
cmp	ebp, esi
jnz	short loc_801742
test	ecx, ecx
jz	short loc_801729
mov	[ecx], edx
mov	edx, [edi+4]
lea	eax, [edi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_7FF6D0

loc_801729:
mov	ecx, [esp+10h+arg_4]
push	ecx
lea	ecx, [edi+8]
call	sub_7FF670
pop	ebp
mov	[edi], ebx
pop	ebx
mov	[edi+4], esi
pop	edi
pop	esi
retn	0Ch

loc_801742:
lea	ebp, [ebp+ebp*4+0]
shl	ebp, 4
cmp	[eax+ebp+8], esi
lea	ebp, [eax+ebp+8]
jz	short loc_801767

loc_801753:
mov	ebp, [ebp+0]
lea	ebp, [ebp+ebp*4+0]
shl	ebp, 4
cmp	[eax+ebp+8], esi
lea	ebp, [eax+ebp+8]
jnz	short loc_801753

loc_801767:
test	ecx, ecx
jz	short loc_80177F
mov	[ecx], edx
mov	edx, [edi+4]
lea	eax, [edi+8]
mov	[ecx+4], edx
push	eax
add	ecx, 8
call	sub_7FF6D0

loc_80177F:
mov	ecx, [esp+10h+arg_4]
push	ecx
lea	ecx, [edi+8]
mov	[ebp+0], ebx
call	sub_7FF670
pop	ebp
pop	ebx
mov	[edi+4], esi
mov	dword ptr [edi], 0FFFFFFFFh
pop	edi
pop	esi
retn	0Ch
sub_801670 endp

align 10h



sub_8017A0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 14h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ebx, 1
xor	ecx, ecx
mov	edx, ebx
push	edi
mov	[esp+24h+var_8], ebx
mov	[esp+24h+var_10], edx
mov	[esp+24h+var_11], 0
cmp	[esi+3FCh], ecx
jbe	short loc_80180E
jmp	short loc_8017D0
align 10h

loc_8017D0:
mov	eax, [esi+3F8h]
mov	eax, [eax+ecx*4]
mov	eax, [eax+28h]
add	eax, 4
cmp	[eax], edx
jg	short loc_801805
mov	eax, [esi+3F8h]
mov	eax, [eax+ecx*4]
mov	eax, [eax+28h]
mov	edi, [esp+24h+arg_4]
cmp	[eax+28h], edi
jl	short loc_801805
mov	edi, [esp+24h+arg_8]
cmp	[eax+2Ch], edi
jge	loc_8018F4

loc_801805:
inc	ecx
cmp	ecx, [esi+3FCh]
jb	short loc_8017D0

loc_80180E:
mov	eax, [esp+24h+arg_4]
cmp	eax, 1
jle	short loc_801821

loc_801817:
add	ebx, ebx
cmp	ebx, eax
jl	short loc_801817
mov	[esp+24h+var_8], ebx

loc_801821:
mov	eax, [esp+24h+arg_8]
cmp	eax, 1
jle	short loc_80183A
lea	ebx, [ebx+0]

loc_801830:
add	edx, edx
cmp	edx, eax
jl	short loc_801830
mov	[esp+24h+var_10], edx

loc_80183A:
xor	ecx, ecx
cmp	[esi+3FCh], ecx
jbe	short loc_801865

loc_801844:
mov	eax, [esi+3F8h]
mov	eax, [eax+ecx*4]
mov	eax, [eax+28h]
add	eax, 4
cmp	dword ptr [eax], 1
jle	loc_801906
inc	ecx
cmp	ecx, [esi+3FCh]
jb	short loc_801844

loc_801865:
mov	edx, [esi]
mov	eax, [edx+8]
mov	ecx, esi
call	eax
mov	edx, [esi]
mov	ebx, eax
mov	eax, [edx+18h]
mov	ecx, esi
mov	[esp+24h+var_4], ebx
call	eax
mov	ebp, eax
mov	[esp+24h+var_C], ebp
mov	byte ptr [ebp+38h], 1
test	ebx, ebx
jz	short loc_801897
push	1		; Value
lea	ecx, [ebx+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd

loc_801897:
mov	edi, [ebp+28h]
test	edi, edi
jz	short loc_8018BD
push	0FFFFFFFFh	; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_8018BD
test	edi, edi
jz	short loc_8018BD
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_8018BD:
mov	[ebp+28h], ebx
mov	edi, [esi+3FCh]
mov	eax, [esi+3FCh]
lea	ebx, [esi+3F8h]
inc	edi
cmp	edi, eax
jnb	short loc_801917
sub	eax, edi
push	eax
mov	eax, [ebx]
lea	ecx, [eax+edi*4]
push	ecx
call	sub_7FBC10
mov	edx, [ebx+8]
shr	edx, 1
add	esp, 8
cmp	edi, edx
jnb	short loc_80192C
push	edi
jmp	short loc_801924

loc_8018F4:
mov	eax, [esi+3F8h]
mov	ebp, [eax+ecx*4]
mov	[esp+24h+var_C], ebp
jmp	loc_80198D

loc_801906:
mov	eax, [esi+3F8h]
mov	ecx, [eax+ecx*4]
mov	[esp+24h+var_C], ecx
mov	ebp, ecx
jmp	short loc_801988

loc_801917:
cmp	edi, [ebx+8]
jb	short loc_80192C
mov	eax, edi
shr	eax, 2
add	eax, edi
push	eax

loc_801924:
push	ebx
mov	ecx, ebx
call	sub_668FE0

loc_80192C:
mov	ecx, [ebx]
mov	[ebx+4], edi
mov	ebx, ds:InterlockedExchangeAdd
lea	edi, [ecx+edi*4-4]
test	edi, edi
jz	short loc_801949
push	1		; Value
lea	edx, [ebp+4]
push	edx		; Addend
call	ebx ; InterlockedExchangeAdd
mov	[edi], ebp

loc_801949:		; Value
push	0FFFFFFFFh
lea	eax, [ebp+4]
push	eax		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_801961
mov	edx, [ebp+0]
mov	eax, [edx]
push	1
mov	ecx, ebp
call	eax

loc_801961:
mov	edi, [esp+24h+var_4]
push	0FFFFFFFFh	; Value
lea	ecx, [edi+4]
push	ecx		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_801980
test	edi, edi
jz	short loc_801980
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_801980:
mov	ebx, [esp+24h+var_8]
mov	edx, [esp+24h+var_10]

loc_801988:
mov	[esp+24h+var_11], 1

loc_80198D:
mov	eax, [ebp+28h]
mov	ecx, [eax+28h]
xor	edi, edi
cmp	ebx, ecx
jge	short loc_80199F
mov	[esp+24h+var_8], ecx
mov	ebx, ecx

loc_80199F:
mov	eax, [eax+2Ch]
cmp	edx, eax
jge	short loc_8019AC
mov	[esp+24h+var_10], eax
mov	edx, eax

loc_8019AC:
cmp	[esp+24h+arg_C], 0
jz	loc_801B69
mov	eax, [ebp+30h]
test	eax, eax
jz	short loc_8019C8
cmp	dword ptr [eax+4], 1
jle	loc_801B69

loc_8019C8:
xor	ecx, ecx
cmp	[esi+408h], ecx
jbe	short loc_801A1A

loc_8019D2:
mov	eax, [esi+404h]
mov	eax, [eax+ecx*4]
add	eax, 4
cmp	dword ptr [eax], 1
jg	short loc_8019FE
mov	eax, [esi+404h]
mov	eax, [eax+ecx*4]
mov	edi, [esp+24h+arg_4]
cmp	[eax+28h], edi
jl	short loc_8019FE
mov	edi, [esp+24h+arg_8]
cmp	[eax+2Ch], edi
jge	short loc_801A09

loc_8019FE:
inc	ecx
cmp	ecx, [esi+408h]
jb	short loc_8019D2
jmp	short loc_801A1A

loc_801A09:
mov	eax, [esi+404h]
mov	edi, [eax+ecx*4]
test	edi, edi
jnz	loc_801B0A

loc_801A1A:
xor	ecx, ecx
cmp	[esi+408h], ecx
jbe	short loc_801A3E

loc_801A24:
mov	eax, [esi+404h]
mov	eax, [eax+ecx*4]
add	eax, 4
cmp	dword ptr [eax], 1
jle	short loc_801A93
inc	ecx
cmp	ecx, [esi+408h]
jb	short loc_801A24

loc_801A3E:
mov	ecx, esi
call	sub_8015F0
mov	ecx, [esp+24h+var_10]
push	40h
push	0
mov	edi, eax
mov	eax, [edi]
mov	edx, [eax+8]
push	12Eh
push	ecx
push	ebx
mov	ecx, edi
call	edx
mov	ebp, [esi+408h]
mov	eax, [esi+408h]
lea	ebx, [esi+404h]
inc	ebp
cmp	ebp, eax
jnb	short loc_801AB2
sub	eax, ebp
push	eax
mov	eax, [ebx]
lea	ecx, [eax+ebp*4]
push	ecx
call	sub_7FBC10
mov	edx, [ebx+8]
shr	edx, 1
add	esp, 8
cmp	ebp, edx
jnb	short loc_801AC7
push	ebp
jmp	short loc_801ABF

loc_801A93:
mov	eax, [esi+404h]
mov	edi, [eax+ecx*4]
mov	eax, [edi]
push	40h
push	0
push	12Eh
push	edx
mov	edx, [eax+8]
push	ebx
mov	ecx, edi
call	edx
jmp	short loc_801B06

loc_801AB2:
cmp	ebp, [ebx+8]
jb	short loc_801AC7
mov	eax, ebp
shr	eax, 2
add	eax, ebp
push	eax

loc_801ABF:
push	ebx
mov	ecx, ebx
call	sub_668FE0

loc_801AC7:
mov	ecx, [ebx]
mov	[ebx+4], ebp
lea	ebp, [ecx+ebp*4-4]
test	ebp, ebp
jz	short loc_801AE3
push	1		; Value
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
mov	[ebp+0], edi

loc_801AE3:		; Value
push	0FFFFFFFFh
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_801AFE
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_801AFE:
mov	ebx, [esp+24h+var_8]
mov	ebp, [esp+24h+var_C]

loc_801B06:
mov	edx, [esp+24h+var_10]

loc_801B0A:
cmp	[esp+24h+var_11], 0
jnz	short loc_801B70
mov	eax, [ebp+34h]
test	eax, eax
jz	short loc_801B20
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801B20:
test	edi, edi
jz	short loc_801B30
push	1		; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd

loc_801B30:
mov	ebx, [ebp+30h]
test	ebx, ebx
jz	short loc_801B56
push	0FFFFFFFFh	; Value
lea	ecx, [ebx+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_801B56
test	ebx, ebx
jz	short loc_801B56
mov	edx, [ebx]
mov	eax, [edx]
push	1
mov	ecx, ebx
call	eax

loc_801B56:
mov	[ebp+30h], edi
mov	edi, [edi+38h]
mov	[ebp+34h], edi
mov	ecx, [edi]
mov	edx, [ecx+4]
push	edi
call	edx
jmp	short loc_801B9C

loc_801B69:
cmp	[esp+24h+var_11], 0
jz	short loc_801B9C

loc_801B70:
mov	ecx, [ebp+28h]
cmp	ebx, [ecx+28h]
jnz	short loc_801B7D
cmp	edx, [ecx+2Ch]
jz	short loc_801B8C

loc_801B7D:
mov	eax, [ecx]
push	40h
push	0
push	1
push	edx
mov	edx, [eax+8]
push	ebx
call	edx

loc_801B8C:
mov	ecx, [ebp+28h]
mov	eax, [ebp+0]
mov	edx, [eax+4]
push	edi
push	edi
push	ecx
mov	ecx, ebp
call	edx

loc_801B9C:
mov	eax, [esp+24h+arg_4]
mov	ecx, [esp+24h+arg_8]
mov	[ebp+1Ch], eax
mov	eax, [esp+24h+arg_0]
mov	[ebp+20h], ecx
mov	edx, [esi]
mov	edx, [edx+20h]
push	ebp
push	eax
mov	ecx, esi
call	edx
mov	eax, [ebp+28h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	10h
sub_8017A0 endp

align 10h



sub_801BD0 proc	near

var_4= dword ptr -4

push	ecx
push	edi
mov	edi, ecx
cmp	byte ptr [edi+28h], 0
jz	loc_801F16
push	ebx
push	ebp
push	esi
call	sub_8006B0
lea	eax, [edi+290h]
push	eax		; lpCriticalSection
call	ds:EnterCriticalSection
mov	ebx, [edi+284h]
xor	esi, esi
cmp	ebx, esi
jz	loc_801C9A
add	ebx, 0FFFFFFF8h
cmp	ebx, esi
jz	loc_801C9A
mov	edi, edi

loc_801C10:
cmp	ebx, esi
jz	short loc_801C19
lea	eax, [ebx+8]
jmp	short loc_801C1B

loc_801C19:
xor	eax, eax

loc_801C1B:
lea	ecx, [edi+280h]
cmp	eax, ecx
jz	short loc_801C9A
mov	eax, [ebx+0Ch]
cmp	eax, esi
jz	short loc_801C35
add	eax, 0FFFFFFF8h
mov	[esp+14h+var_4], eax
jmp	short loc_801C39

loc_801C35:
mov	[esp+14h+var_4], esi

loc_801C39:
mov	esi, [ebx+4]
lea	ebp, [ebx+4]
test	esi, esi
jz	short loc_801C8C

loc_801C43:		; Comperand
push	esi
lea	eax, [esi+1]
push	eax		; Exchange
push	ebp		; Destination
call	ds:InterlockedCompareExchange
cmp	eax, esi
jz	short loc_801C5C
mov	esi, [ebp+0]
test	esi, esi
jnz	short loc_801C43
jmp	short loc_801C8C

loc_801C5C:
cmp	byte ptr [ebx+20h], 0
jnz	short loc_801C74
mov	edx, [ebx]
mov	eax, [edx+38h]
mov	ecx, ebx
call	eax
push	1
mov	ecx, ebx
call	sub_804AB0

loc_801C74:		; Value
push	0FFFFFFFFh
push	ebp		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_801C8C
mov	edx, [ebx]
mov	eax, [edx]
push	1
mov	ecx, ebx
call	eax

loc_801C8C:
mov	ebx, [esp+14h+var_4]
xor	esi, esi
test	ebx, ebx
jnz	loc_801C10

loc_801C9A:
mov	ebp, [edi+28Ch]
cmp	ebp, esi
jz	loc_801D5E
add	ebp, 0FFFFFFF8h
cmp	ebp, esi
jz	loc_801D5E

loc_801CB3:
cmp	ebp, esi
jz	short loc_801CBC
lea	eax, [ebp+8]
jmp	short loc_801CBE

loc_801CBC:
xor	eax, eax

loc_801CBE:
lea	ecx, [edi+288h]
cmp	eax, ecx
jz	loc_801D5E
mov	eax, [ebp+0Ch]
cmp	eax, esi
jz	short loc_801CDC
add	eax, 0FFFFFFF8h
mov	[esp+14h+var_4], eax
jmp	short loc_801CE0

loc_801CDC:
mov	[esp+14h+var_4], esi

loc_801CE0:
mov	esi, [ebp+4]
lea	ebx, [ebp+4]
test	esi, esi
jz	short loc_801D50
lea	ebx, [ebx+0]

loc_801CF0:		; Comperand
push	esi
lea	ecx, [esi+1]
push	ecx		; Exchange
push	ebx		; Destination
call	ds:InterlockedCompareExchange
cmp	eax, esi
jz	short loc_801D08
mov	esi, [ebx]
test	esi, esi
jnz	short loc_801CF0
jmp	short loc_801D50

loc_801D08:
mov	eax, [ebp+2Ch]
xor	esi, esi
cmp	eax, esi
jz	short loc_801D37
mov	edx, [eax]
push	eax
mov	eax, [edx+8]
call	eax
mov	eax, [ebp+34h]
mov	[ebp+2Ch], esi
cmp	eax, esi
jz	short loc_801D2E
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[ebp+34h], esi

loc_801D2E:
push	1
mov	ecx, ebp
call	sub_804C30

loc_801D37:		; Value
push	0FFFFFFFFh
push	ebx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_801D50
mov	eax, [ebp+0]
mov	edx, [eax]
push	1
mov	ecx, ebp
call	edx

loc_801D50:
mov	ebp, [esp+14h+var_4]
xor	esi, esi
test	ebp, ebp
jnz	loc_801CB3

loc_801D5E:
lea	ecx, [edi+3F8h]
push	esi
push	ecx
call	sub_8013C0
lea	ecx, [edi+404h]
push	esi
push	ecx
call	sub_8013C0
lea	eax, [edi+290h]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
mov	eax, [edi+2CCh]
cmp	eax, esi
jz	short loc_801D97
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801D97:
mov	[edi+2CCh], esi
mov	eax, [edi+2D0h]
cmp	eax, esi
jz	short loc_801DAF
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801DAF:
mov	[edi+2D0h], esi
mov	[edi+2D4h], esi
mov	[edi+2D8h], esi
mov	[edi+30Ch], esi
mov	[edi+310h], esi
mov	byte ptr [edi+2ACh], 0
mov	[edi+2A8h], esi
mov	eax, [edi+390h]
cmp	eax, esi
jz	short loc_801DEC
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801DEC:
mov	[edi+390h], esi
mov	eax, [edi+38Ch]
cmp	eax, esi
jz	short loc_801E04
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801E04:
mov	eax, [edi+390h]
mov	[edi+38Ch], eax
cmp	eax, esi
jz	short loc_801E1C
mov	ecx, [eax]
mov	edx, [ecx+4]
push	eax
call	edx

loc_801E1C:
mov	eax, [edi+388h]
cmp	eax, esi
jz	short loc_801E2E
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801E2E:
mov	eax, [edi+38Ch]
mov	[edi+388h], eax
cmp	eax, esi
jz	short loc_801E46
mov	ecx, [eax]
mov	edx, [ecx+4]
push	eax
call	edx

loc_801E46:
mov	eax, [edi+384h]
cmp	eax, esi
jz	short loc_801E58
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801E58:
mov	eax, [edi+388h]
mov	[edi+384h], eax
mov	eax, [edi+380h]
cmp	eax, esi
jz	short loc_801E76
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801E76:
mov	[edi+380h], esi
mov	eax, [edi+37Ch]
cmp	eax, esi
jz	short loc_801E8E
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801E8E:
mov	eax, [edi+380h]
mov	[edi+37Ch], eax
cmp	eax, esi
jz	short loc_801EA6
mov	ecx, [eax]
mov	edx, [ecx+4]
push	eax
call	edx

loc_801EA6:
mov	eax, [edi+378h]
cmp	eax, esi
jz	short loc_801EB8
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801EB8:
mov	eax, [edi+37Ch]
mov	[edi+378h], eax
cmp	eax, esi
jz	short loc_801ED0
mov	ecx, [eax]
mov	edx, [ecx+4]
push	eax
call	edx

loc_801ED0:
mov	eax, [edi+374h]
cmp	eax, esi
jz	short loc_801EE2
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_801EE2:
mov	eax, [edi+378h]
mov	ecx, edi
mov	[edi+374h], eax
call	sub_7FF890
mov	eax, [edi+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[edi+1ACh], esi
mov	[edi+364h], esi
pop	esi
pop	ebp
mov	byte ptr [edi+28h], 0
pop	ebx

loc_801F16:
mov	al, 1
pop	edi
pop	ecx
retn
sub_801BD0 endp

align 10h



sub_801F20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
mov	ebx, ecx
cmp	byte ptr [ebx+28h], 0
mov	[esp+10h+var_8], ebx
jnz	short loc_801F3A
mov	eax, 1
pop	ebx
add	esp, 0Ch
retn

loc_801F3A:
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0Ch]
push	eax
call	edx
mov	[esp+10h+var_4], eax
test	eax, eax
jnz	short loc_801F55
pop	ebx
add	esp, 0Ch
retn

loc_801F55:
mov	eax, [ebx+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	ebp
push	esi
push	edi
push	0
push	0
push	eax
call	edx
lea	eax, [ebx+290h]
push	eax		; lpCriticalSection
call	ds:EnterCriticalSection
mov	eax, [ebx+284h]
test	eax, eax
jz	short loc_801F89
lea	edi, [eax-8]
jmp	short loc_801F90

loc_801F89:
xor	edi, edi
jmp	short loc_801F90
align 10h

loc_801F90:
test	edi, edi
jz	short loc_801F99
lea	eax, [edi+8]
jmp	short loc_801F9B

loc_801F99:
xor	eax, eax

loc_801F9B:
lea	ecx, [ebx+280h]
cmp	eax, ecx
jz	loc_802044
mov	eax, [edi+0Ch]
test	eax, eax
jz	short loc_801FB9
add	eax, 0FFFFFFF8h
mov	[esp+1Ch+var_C], eax
jmp	short loc_801FC1

loc_801FB9:
mov	[esp+1Ch+var_C], 0

loc_801FC1:
mov	esi, [edi+4]
lea	ebp, [edi+4]
test	esi, esi
jz	short loc_80203B
jmp	short loc_801FD0
align 10h

loc_801FD0:		; Comperand
push	esi
lea	eax, [esi+1]
push	eax		; Exchange
push	ebp		; Destination
call	ds:InterlockedCompareExchange
cmp	eax, esi
jz	short loc_801FED
mov	esi, [ebp+0]
test	esi, esi
jnz	short loc_801FD0
mov	edi, [esp+1Ch+var_C]
jmp	short loc_801F90

loc_801FED:
mov	eax, [edi+34h]
test	eax, eax
jz	short loc_802014
cmp	byte ptr [edi+20h], 0
jnz	short loc_802014
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
push	1
mov	ecx, edi
mov	dword ptr [edi+34h], 0
call	sub_804AB0
jmp	short loc_802023

loc_802014:
cmp	dword ptr [edi+1Ch], 4Bh
jnz	short loc_802023
mov	eax, [edi]
mov	edx, [eax+38h]
mov	ecx, edi
call	edx

loc_802023:		; Value
push	0FFFFFFFFh
push	ebp		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_80203B
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_80203B:
mov	edi, [esp+1Ch+var_C]
jmp	loc_801F90

loc_802044:
mov	eax, [ebx+28Ch]
test	eax, eax
jz	loc_8020FF
lea	edi, [eax-8]
test	edi, edi
jz	loc_8020FF
lea	ecx, [ecx+0]

loc_802060:
test	edi, edi
jz	short loc_802069
lea	eax, [edi+8]
jmp	short loc_80206B

loc_802069:
xor	eax, eax

loc_80206B:
lea	ecx, [ebx+288h]
cmp	eax, ecx
jz	loc_8020FF
mov	eax, [edi+0Ch]
test	eax, eax
jz	short loc_802085
lea	ebx, [eax-8]
jmp	short loc_802087

loc_802085:
xor	ebx, ebx

loc_802087:
mov	esi, [edi+4]
lea	ebp, [edi+4]
test	esi, esi
jz	short loc_8020F1

loc_802091:		; Comperand
push	esi
lea	eax, [esi+1]
push	eax		; Exchange
push	ebp		; Destination
call	ds:InterlockedCompareExchange
cmp	eax, esi
jz	short loc_8020AA
mov	esi, [ebp+0]
test	esi, esi
jnz	short loc_802091
jmp	short loc_8020F1

loc_8020AA:
mov	eax, [edi+2Ch]
xor	esi, esi
cmp	eax, esi
jz	short loc_8020D9
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	eax, [edi+34h]
mov	[edi+2Ch], esi
cmp	eax, esi
jz	short loc_8020D0
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx
mov	[edi+34h], esi

loc_8020D0:
push	1
mov	ecx, edi
call	sub_804C30

loc_8020D9:		; Value
push	0FFFFFFFFh
push	ebp		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_8020F1
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_8020F1:
mov	edi, ebx
test	ebx, ebx
mov	ebx, [esp+1Ch+var_8]
jnz	loc_802060

loc_8020FF:
lea	ecx, [ebx+3F8h]
push	0
push	ecx
call	sub_8013C0
lea	ecx, [ebx+404h]
push	0
push	ecx
call	sub_8013C0
lea	eax, [ebx+290h]
push	eax		; lpCriticalSection
call	ds:LeaveCriticalSection
push	1
lea	ecx, [ebx+2A8h]
call	sub_7FACF0
xor	eax, eax
cmp	[esp+1Ch+var_4], 88760869h
pop	edi
setz	al
pop	esi
pop	ebp
pop	ebx
add	eax, 2
add	esp, 0Ch
retn
sub_801F20 endp

align 10h



sub_802150 proc	near
push	ebx
push	esi
mov	esi, ecx
push	edi
mov	dword ptr [esi], offset	off_1463C40
call	sub_800760
lea	edi, [esi+49Ch]
mov	ebx, 0Fh
jmp	short loc_802170
align 10h

loc_802170:
mov	eax, [edi-4]
sub	edi, 8
test	eax, eax
jz	short loc_802182
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802182:
mov	eax, [edi]
test	eax, eax
jz	short loc_802190
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802190:
sub	ebx, 1
jns	short loc_802170
lea	ecx, [esi+410h]
call	sub_7FF100
mov	eax, [esi+408h]
mov	ecx, [esi+404h]
push	eax
push	ecx
call	sub_7FBC10
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+404h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	eax, [esi+3FCh]
mov	ecx, [esi+3F8h]
push	eax
push	ecx
call	sub_7FBC10
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+3F8h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+3ECh]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+3B0h]	; lpCriticalSection
call	sub_64D730
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+3A4h]
mov	edx, [edx+30h]
push	eax
call	edx
mov	eax, [esi+39Ch]
mov	ecx, [esi+398h]
push	eax
push	ecx
call	sub_7FBC10
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [esi+398h]
mov	edx, [edx+30h]
add	esp, 8
push	eax
call	edx
mov	eax, [esi+390h]
test	eax, eax
jz	short loc_802263
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802263:
mov	eax, [esi+38Ch]
test	eax, eax
jz	short loc_802275
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802275:
mov	eax, [esi+388h]
test	eax, eax
jz	short loc_802287
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802287:
mov	eax, [esi+384h]
test	eax, eax
jz	short loc_802299
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802299:
mov	eax, [esi+380h]
test	eax, eax
jz	short loc_8022AB
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_8022AB:
mov	eax, [esi+37Ch]
test	eax, eax
jz	short loc_8022BD
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_8022BD:
mov	eax, [esi+378h]
test	eax, eax
jz	short loc_8022CF
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_8022CF:
mov	eax, [esi+374h]
test	eax, eax
jz	short loc_8022E1
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_8022E1:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [esi+320h]
mov	eax, [eax+30h]
push	edx
call	eax
lea	ecx, [esi+2A8h]
call	sub_7FAF40
lea	ecx, [esi+290h]	; lpCriticalSection
call	sub_64D730
lea	edi, [esi+1ACh]
mov	ebx, 1Ah

loc_802316:
mov	eax, [edi-4]
sub	edi, 4
test	eax, eax
jz	short loc_802328
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802328:
sub	ebx, 1
jns	short loc_802316
lea	edi, [esi+140h]
mov	ebx, 2Dh

loc_802338:
mov	eax, [edi-4]
sub	edi, 4
test	eax, eax
jz	short loc_80234A
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_80234A:
sub	ebx, 1
jns	short loc_802338
lea	edi, [esi+88h]
mov	ebx, 5
lea	ebx, [ebx+0]

loc_802360:
mov	eax, [edi-4]
sub	edi, 4
test	eax, eax
jz	short loc_802372
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802372:
sub	ebx, 1
jns	short loc_802360
lea	edi, [esi+70h]
mov	ebx, 4
nop

loc_802380:
mov	eax, [edi-4]
sub	edi, 4
test	eax, eax
jz	short loc_802392
mov	ecx, [eax]
mov	edx, [ecx+8]
push	eax
call	edx

loc_802392:
sub	ebx, 1
jns	short loc_802380
pop	edi
mov	ecx, esi
pop	esi
pop	ebx
jmp	sub_68D2C0
sub_802150 endp

align 10h



sub_8023B0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
mov	eax, [esp+20h+arg_0]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
xor	ecx, ecx
xor	ebp, ebp
mov	[esp+30h+var_C], ecx
mov	[esp+30h+var_8], ecx
mov	[esp+30h+var_4], ecx
mov	[esp+30h+var_18], ecx
mov	[esp+30h+var_14], ebp
mov	[esp+30h+var_10], ecx
mov	[esp+30h+var_20], eax
mov	[esp+30h+var_1C], ecx
cmp	[edi+3FCh], ecx
jbe	loc_8024D6
lea	ecx, [ecx+0]

loc_8023F0:
mov	edx, [edi+3F8h]
lea	ebx, ds:0[ecx*4]
mov	eax, [ebx+edx]
mov	eax, [eax+28h]
add	eax, 4
cmp	dword ptr [eax], 1
jg	short loc_802428
mov	edx, [edi+3F8h]
mov	eax, [ebx+edx]
mov	eax, [eax+28h]
mov	edx, [eax+2Ch]
imul	edx, [eax+28h]
cmp	edx, [esp+30h+arg_0]
ja	loc_8024BF

loc_802428:
mov	eax, [esp+30h+var_8]
mov	ebp, [edi+3F8h]
lea	esi, [eax+1]
add	ebp, ebx
cmp	esi, eax
jnb	short loc_802460
sub	eax, esi
push	eax
mov	eax, [esp+34h+var_C]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7FBC10
mov	edx, [esp+38h+var_4]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_80247C
push	esi
lea	eax, [esp+34h+var_C]
push	eax
jmp	short loc_802473

loc_802460:
cmp	esi, [esp+30h+var_4]
jb	short loc_80247C
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
lea	edx, [esp+34h+var_C]
push	edx

loc_802473:
lea	ecx, [esp+38h+var_C]
call	sub_714BE0

loc_80247C:
mov	eax, [esp+30h+var_C]
mov	[esp+30h+var_8], esi
lea	esi, [eax+esi*4-4]
test	esi, esi
jz	short loc_8024A4
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_80249F
push	1		; Value
add	eax, 4
push	eax		; Addend
call	ds:InterlockedExchangeAdd

loc_80249F:
mov	ecx, [ebp+0]
mov	[esi], ecx

loc_8024A4:
mov	edx, [edi+3F8h]
mov	eax, [ebx+edx]
mov	eax, [eax+28h]
mov	ecx, [eax+2Ch]
imul	ecx, [eax+28h]
sub	[esp+30h+arg_0], ecx
mov	ecx, [esp+30h+var_1C]

loc_8024BF:
inc	ecx
mov	[esp+30h+var_1C], ecx
cmp	ecx, [edi+3FCh]
jb	loc_8023F0
mov	ebp, [esp+30h+var_14]
xor	ecx, ecx

loc_8024D6:
mov	eax, [edi+3FCh]
lea	esi, [edi+3F8h]
cmp	eax, ecx
jbe	short loc_80251E
mov	edx, [esi]
push	eax
push	edx
call	sub_7FBC10
add	esp, 8
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_80252C
mov	eax, [esi]
test	eax, eax
jz	short loc_802515
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_802515:
mov	dword ptr [esi+8], 0
jmp	short loc_80252C

loc_80251E:
cmp	[esi+8], ecx
ja	short loc_80252C
push	ecx
push	esi
mov	ecx, esi
call	sub_668FE0

loc_80252C:
mov	ebx, [esp+30h+var_8]
mov	dword ptr [esi+4], 0
test	ebx, ebx
jz	short loc_802597
mov	ebp, [esi+4]
add	ebx, ebp
cmp	ebx, ebp
jnb	short loc_802563
mov	edx, [esi]
mov	ecx, ebp
sub	ecx, ebx
push	ecx
lea	eax, [edx+ebx*4]
push	eax
call	sub_7FBC10
mov	ecx, [esi+8]
shr	ecx, 1
add	esp, 8
cmp	ebx, ecx
jnb	short loc_802578
push	ebx
jmp	short loc_802570

loc_802563:
cmp	ebx, [esi+8]
jb	short loc_802578
mov	edx, ebx
shr	edx, 2
add	edx, ebx
push	edx

loc_802570:
push	esi
mov	ecx, esi
call	sub_668FE0

loc_802578:
mov	eax, [esp+30h+var_C]
mov	ecx, [esp+30h+var_8]
mov	edx, [esi]
push	eax
push	ecx
lea	eax, [edx+ebp*4]
push	eax
mov	[esi+4], ebx
call	sub_7FF7F0
mov	ebp, [esp+3Ch+var_14]
add	esp, 0Ch

loc_802597:
xor	ecx, ecx
mov	[esp+30h+arg_0], ecx
cmp	[edi+408h], ecx
jbe	loc_80268B
lea	esp, [esp+0]

loc_8025B0:
mov	edx, [edi+404h]
mov	eax, [edx+ecx*4]
lea	ebx, ds:0[ecx*4]
add	eax, 4
cmp	dword ptr [eax], 1
jg	short loc_8025E2
mov	eax, [edi+404h]
mov	eax, [ebx+eax]
mov	edx, [eax+2Ch]
imul	edx, [eax+28h]
cmp	edx, [esp+30h+var_20]
ja	loc_802676

loc_8025E2:
mov	eax, [esp+30h+var_14]
mov	ebp, [edi+404h]
lea	esi, [eax+1]
add	ebp, ebx
cmp	esi, eax
jnb	short loc_80261A
sub	eax, esi
push	eax
mov	eax, [esp+34h+var_18]
lea	ecx, [eax+esi*4]
push	ecx
call	sub_7FBC10
mov	edx, [esp+38h+var_10]
shr	edx, 1
add	esp, 8
cmp	esi, edx
jnb	short loc_802636
push	esi
lea	eax, [esp+34h+var_18]
push	eax
jmp	short loc_80262D

loc_80261A:
cmp	esi, [esp+30h+var_10]
jb	short loc_802636
mov	ecx, esi
shr	ecx, 2
add	ecx, esi
push	ecx
lea	edx, [esp+34h+var_18]
push	edx

loc_80262D:
lea	ecx, [esp+38h+var_18]
call	sub_714BE0

loc_802636:
mov	eax, [esp+30h+var_18]
mov	[esp+30h+var_14], esi
lea	esi, [eax+esi*4-4]
test	esi, esi
jz	short loc_80265E
mov	eax, [ebp+0]
test	eax, eax
jz	short loc_802659
push	1		; Value
add	eax, 4
push	eax		; Addend
call	ds:InterlockedExchangeAdd

loc_802659:
mov	ecx, [ebp+0]
mov	[esi], ecx

loc_80265E:
mov	edx, [edi+404h]
mov	ebx, [ebx+edx]
mov	eax, [ebx+2Ch]
imul	eax, [ebx+28h]
sub	[esp+30h+var_20], eax
mov	ecx, [esp+30h+arg_0]

loc_802676:
inc	ecx
mov	[esp+30h+arg_0], ecx
cmp	ecx, [edi+408h]
jb	loc_8025B0
mov	ebp, [esp+30h+var_14]

loc_80268B:
mov	eax, [edi+408h]
lea	esi, [edi+404h]
test	eax, eax
jbe	short loc_8026D3
mov	ecx, [esi]
push	eax
push	ecx
call	sub_7FBC10
add	esp, 8
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_8026E3
mov	eax, [esi]
test	eax, eax
jz	short loc_8026CA
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	dword ptr [esi], 0

loc_8026CA:
mov	dword ptr [esi+8], 0
jmp	short loc_8026E3

loc_8026D3:
cmp	dword ptr [esi+8], 0
ja	short loc_8026E3
push	0
push	esi
mov	ecx, esi
call	sub_668FE0

loc_8026E3:
mov	dword ptr [esi+4], 0
test	ebp, ebp
jz	short loc_802743
mov	ebx, [esi+4]
lea	edi, [ebx+ebp]
cmp	edi, ebx
jnb	short loc_802717
mov	edx, [esi]
mov	ecx, ebx
sub	ecx, edi
push	ecx
lea	eax, [edx+edi*4]
push	eax
call	sub_7FBC10
mov	ecx, [esi+8]
shr	ecx, 1
add	esp, 8
cmp	edi, ecx
jnb	short loc_80272C
push	edi
jmp	short loc_802724

loc_802717:
cmp	edi, [esi+8]
jb	short loc_80272C
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx

loc_802724:
push	esi
mov	ecx, esi
call	sub_668FE0

loc_80272C:
mov	eax, [esp+30h+var_18]
mov	ecx, [esi]
push	eax
lea	edx, [ecx+ebx*4]
push	ebp
push	edx
mov	[esi+4], edi
call	sub_7FF7F0
add	esp, 0Ch

loc_802743:
mov	esi, [esp+30h+var_18]
push	ebp
push	esi
call	sub_7FBC10
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
add	esp, 8
push	esi
call	edx
mov	eax, [esp+30h+var_8]
mov	esi, [esp+30h+var_C]
push	eax
push	esi
call	sub_7FBC10
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
add	esp, 8
push	esi
call	eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 20h
retn	4
sub_8023B0 endp

align 10h



sub_802790 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_802150
test	[esp+4+arg_0], 1
jz	short loc_8027AD
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_8027AD:
mov	eax, esi
pop	esi
retn	4
sub_802790 endp

align 10h



sub_8027C0 proc	near

var_4= dword ptr -4

; FUNCTION CHUNK AT 007FC5E0 SIZE 00000462 BYTES

mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	654h
call	edx
test	eax, eax
jz	short loc_8027DF
mov	ecx, eax
jmp	loc_7FC5E0

loc_8027DF:
xor	eax, eax
retn
sub_8027C0 endp

align 10h



sub_8027F0 proc	near

var_120= qword ptr -120h
var_118= dword ptr -118h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_D4=	qword ptr -0D4h
var_CC=	dword ptr -0CCh
var_C8=	qword ptr -0C8h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_A8=	dword ptr -0A8h
var_90=	byte ptr -90h
var_8C=	byte ptr -8Ch
var_8B=	byte ptr -8Bh
var_8A=	byte ptr -8Ah
var_88=	word ptr -88h
var_86=	word ptr -86h
var_84=	byte ptr -84h
var_83=	byte ptr -83h
var_82=	byte ptr -82h
var_81=	byte ptr -81h
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 100h
push	ebx
mov	ebx, [esp+104h+arg_0]
push	esi
lea	esi, [ecx+410h]
mov	[esp+108h+var_CC], ecx
push	ebx
mov	ecx, esi
mov	[esp+10Ch+var_B8], esi
call	sub_7FF840
test	eax, eax
jl	short loc_80283B
mov	ecx, [esi]
lea	eax, [eax+eax*4]
shl	eax, 4
lea	eax, [eax+ecx+10h]
test	eax, eax
jz	short loc_80283B
add	eax, 44h
jz	short loc_80283B
mov	eax, [eax]
pop	esi
pop	ebx
add	esp, 100h
retn	8

loc_80283B:
mov	edx, dword_1855FC0
push	edx
lea	ecx, [esp+10Ch+var_EC]
call	sub_679B40
mov	ecx, [ebx]
test	cl, 3
jz	loc_802FDF
fld	dword ptr [ebx+4]
push	edi
fld1
fnstcw	word ptr [esp+10Ch+var_100]
movzx	eax, word ptr [esp+10Ch+var_100]
fsub	st(1), st
or	eax, 0C00h
fxch	st(1)
mov	[esp+10Ch+var_F0], eax
fldcw	word ptr [esp+10Ch+var_F0]
fistp	[esp+10Ch+var_D4]
mov	eax, dword ptr [esp+10Ch+var_D4]
fldcw	word ptr [esp+10Ch+var_100]
fild	dword ptr [esp+10Ch+var_D4]
test	eax, eax
jge	short loc_802890
fadd	ds:flt_15FCC08

loc_802890:
fld	ds:dbl_15FCC48
fmul	st(1), st
fnstcw	word ptr [esp+10Ch+var_100]
movzx	eax, word ptr [esp+10Ch+var_100]
fxch	st(1)
or	eax, 0C00h
fstp	[esp+10Ch+var_C0]
mov	[esp+10Ch+var_F0], eax
fld	dword ptr [ebx+8]
fsub	st, st(2)
fldcw	word ptr [esp+10Ch+var_F0]
fistp	[esp+10Ch+var_D4]
mov	edx, dword ptr [esp+10Ch+var_D4]
fldcw	word ptr [esp+10Ch+var_100]
fild	dword ptr [esp+10Ch+var_D4]
test	edx, edx
jge	short loc_8028D3
fadd	ds:flt_15FCC08

loc_8028D3:
fmulp	st(1), st
xor	edx, edx
fnstcw	word ptr [esp+10Ch+var_100]
movzx	eax, word ptr [esp+10Ch+var_100]
fstp	[esp+10Ch+var_BC]
or	eax, 0C00h
fld	[esp+10Ch+var_BC]
mov	[esp+10Ch+var_F0], eax
fld	ds:dbl_15FCD70
mov	edi, 8
fmul	st(1), st
fxch	st(1)
fadd	st, st(2)
fld	[esp+10Ch+var_C0]
fmulp	st(2), st
fxch	st(1)
faddp	st(2), st
fmulp	st(1), st
fst	[esp+10Ch+var_D4]
fldcw	word ptr [esp+10Ch+var_F0]
mov	[esp+10Ch+var_F0], edx
fistp	[esp+10Ch+var_C8]
mov	esi, dword ptr [esp+10Ch+var_C8]
mov	dword ptr [esp+10Ch+var_C8], esi
fldcw	word ptr [esp+10Ch+var_100]
test	cl, 2
jz	short loc_802938
mov	edx, 1
mov	[esp+10Ch+var_F0], edx

loc_802938:
push	ebp
mov	eax, ecx
mov	ebp, edi
and	eax, 6
sub	ebp, edx
cmp	eax, 6
jnz	short loc_80294C
shr	ebp, 1
lea	edi, [edx+ebp*2]

loc_80294C:
cmp	ebp, esi
jbe	short loc_802962
xor	ecx, ecx
cmp	eax, 6
setz	cl
mov	ebp, esi
inc	ecx
imul	ecx, esi
add	ecx, edx
mov	edi, ecx

loc_802962:
cmp	[esp+110h+arg_4], 0
jz	loc_802B5B
mov	edx, [esp+110h+var_CC]
cmp	dword ptr [edx+edi*8+41Ch], 0
lea	eax, [edx+edi*8+41Ch]
jnz	loc_802B5B
push	90h		; size_t
lea	eax, [esp+114h+var_90]
push	0		; int
push	eax		; void *
call	_memset
mov	ecx, dword_1855FC0
add	esp, 0Ch
push	ecx
lea	ecx, [esp+114h+var_A8]
mov	[esp+114h+var_8C], 1
mov	[esp+114h+var_8B], 0
mov	[esp+114h+var_8A], 0
call	sub_679B40
push	0FFFFFFFFh
push	offset aUniformFloat4x ; "uniform float4x4 mvp : register(c0);\nvo"...
lea	ecx, [esp+118h+var_A8]
call	sub_679D10
xor	bl, bl
test	edi, edi
jbe	loc_802A6F
xor	esi, esi

loc_8029E4:
push	esi
push	esi
lea	eax, [esp+118h+var_B4]
lea	edx, [esp+118h+var_A8]
push	offset aFloat2IntcDTex ; "	    float2 intc%d : TEXCOORD%d,\n"
push	eax
mov	[esp+120h+var_B4], 1
mov	[esp+120h+var_B0], edx
call	sub_6A54B0
push	esi
push	esi
lea	edx, [esp+128h+var_FC]
lea	ecx, [esp+128h+var_A8]
push	offset aOutFloat2TcDTe ; "	    out	float2 tc%d : TEXCOORD%d,"...
push	edx
mov	[esp+130h+var_FC], 1
mov	[esp+130h+var_F8], ecx
call	sub_6A54B0
movzx	ax, bl
inc	ax
add	ax, ax
add	ax, ax
add	ax, ax
mov	[esp+esi*8+130h+var_81], bl
inc	bl
mov	[esp+esi*8+130h+var_86], ax
mov	[esp+esi*8+130h+var_84], 1
mov	[esp+esi*8+130h+var_83], 0
mov	[esp+esi*8+130h+var_82], 5
movzx	esi, bl
add	esp, 20h
cmp	esi, edi
jb	loc_8029E4

loc_802A6F:
mov	ecx, 0FFh
push	0FFFFFFFFh
mov	[esp+edi*8+114h+var_88], cx
push	offset aOutFloat4OposP ; "	    out	float4 opos : POSITION)\n{"...
lea	ecx, [esp+118h+var_A8]
mov	[esp+edi*8+118h+var_84], 11h
call	sub_679D10
xor	esi, esi
test	edi, edi
jbe	short loc_802AC6
mov	ebx, 1
nop

loc_802AA0:
push	esi
push	esi
lea	eax, [esp+118h+var_FC]
lea	edx, [esp+118h+var_A8]
push	offset aTcDIntcD ; "  tc%d = intc%d;\n"
push	eax
mov	[esp+120h+var_FC], ebx
mov	[esp+120h+var_F8], edx
call	sub_6A54B0
add	esi, ebx
add	esp, 10h
cmp	esi, edi
jb	short loc_802AA0

loc_802AC6:
push	0FFFFFFFFh
push	offset asc_14643D4 ; "\n}"
lea	ecx, [esp+118h+var_A8]
call	sub_679D10
mov	eax, [esp+110h+var_A8]
test	eax, eax
jnz	short loc_802AE3
mov	eax, offset byte_146D660

loc_802AE3:
mov	esi, [esp+110h+var_CC]
push	eax
lea	eax, [esi+edi*8+41Ch]
push	eax
mov	ecx, esi
call	sub_7FDD10
test	al, al
jz	short loc_802B2A
cmp	dword ptr [esi+edi*8+420h], 0
lea	eax, [esi+edi*8+420h]
jnz	short loc_802B4B
mov	ecx, [esi+1ACh]
mov	edx, [ecx]
push	eax
lea	eax, [esp+114h+var_90]
push	eax
push	ecx
mov	ecx, [edx+158h]
call	ecx
test	eax, eax
jz	short loc_802B4B

loc_802B2A:
lea	ecx, [esp+110h+var_A8]
call	sub_679B60

loc_802B33:
lea	ecx, [esp+110h+var_EC]
call	sub_679B60
pop	ebp
pop	edi
pop	esi
xor	eax, eax
pop	ebx
add	esp, 100h
retn	8

loc_802B4B:
lea	ecx, [esp+110h+var_A8]
call	sub_679B60
mov	ebx, [esp+110h+arg_0]

loc_802B5B:
push	0FFFFFFFFh
push	offset aSamplerTexRegi ; "sampler tex	  : register(s0);\nfloat4 "...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
test	byte ptr [ebx],	2
jz	short loc_802B95
push	0FFFFFFFFh
push	offset aFloat4OffsetRe ; "float4 offset	: register(c3);\nfloat4	sc"...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
test	byte ptr [ebx],	4
jz	short loc_802B95
push	0FFFFFFFFh
push	offset aFloat4Scolor2R ; "float4 scolor2 : register(c6);\n"
lea	ecx, [esp+118h+var_EC]
call	sub_679D10

loc_802B95:
mov	bl, [esp+110h+arg_4]
test	bl, bl
jnz	short loc_802BD4
fld	[esp+110h+var_BC]
sub	esp, 10h
fstp	qword ptr [esp+120h+var_118]
lea	eax, [esp+120h+var_FC]
fld	[esp+120h+var_C0]
lea	edx, [esp+120h+var_EC]
fstp	[esp+120h+var_120]
push	offset aStaticConstFlo ; "static const float2 fsize = float2(%f,%"...
push	eax
mov	[esp+128h+var_FC], 1
mov	[esp+128h+var_F8], edx
call	sub_6A54B0
add	esp, 18h

loc_802BD4:
push	0FFFFFFFFh
push	offset aVoidMain ; "void main(\n"
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
test	bl, bl
jz	short loc_802C19
xor	esi, esi
lea	ebx, [esi+1]
test	edi, edi
jbe	short loc_802C2E

loc_802BF1:
push	esi
push	esi
lea	edx, [esp+118h+var_FC]
lea	ecx, [esp+118h+var_EC]
push	offset aFloat2TcDTexco ; "float2 tc%d :	TEXCOORD%d,\n"
push	edx
mov	[esp+120h+var_FC], ebx
mov	[esp+120h+var_F8], ecx
call	sub_6A54B0
add	esi, ebx
add	esp, 10h
cmp	esi, edi
jb	short loc_802BF1
jmp	short loc_802C2E

loc_802C19:
push	0FFFFFFFFh
push	offset aFloat2TcTexcoo ; "float2 tc : TEXCOORD,\n"
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
mov	ebx, 1

loc_802C2E:
push	0FFFFFFFFh
push	offset aOutFloat4Ocolo ; "out float4 ocolor : COLOR)\n{\n"
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
cmp	[esp+110h+arg_4], 0
push	0FFFFFFFFh
lea	ecx, [esp+114h+var_EC]
jz	short loc_802C55
push	offset aFloat4Color0 ; "  float4 color = 0;\n"
jmp	short loc_802C5A

loc_802C55:		; "  float4 color = 0;\n  float2 i = float2"...
push	offset aFloat4Color0Fl

loc_802C5A:
call	sub_679D10
mov	eax, [esp+110h+arg_0]
mov	eax, [eax]
test	al, 2
jz	loc_802E7E
test	al, 4
jz	loc_802CFC
cmp	[esp+110h+arg_4], 0
jz	short loc_802CE5
test	ebp, ebp
jbe	short loc_802CF5
xor	esi, esi
mov	ebx, ebp
lea	ebx, [ebx+0]

loc_802C90:
push	esi
lea	edx, [esp+114h+var_FC]
lea	ecx, [esp+114h+var_EC]
push	offset aColor_aTex2dTe ; "  color.a += tex2D(tex, tc%d).a;\n"
push	edx
mov	[esp+11Ch+var_FC], 1
mov	[esp+11Ch+var_F8], ecx
call	sub_6A54B0
lea	ecx, [esi+1]
push	ecx
lea	edx, [esp+120h+var_B4]
lea	eax, [esp+120h+var_EC]
push	offset aColor_rTex2dTe ; "  color.r += tex2D(tex, tc%d).a;\n"
push	edx
mov	[esp+128h+var_B4], 1
mov	[esp+128h+var_B0], eax
call	sub_6A54B0
add	esp, 18h
add	esi, 2
sub	ebx, 1
jnz	short loc_802C90
mov	esi, offset aScolorColor_aS ; "(scolor * color.a + scolor2 * color.r)"
jmp	short loc_802D4C

loc_802CE5:
push	0FFFFFFFFh
push	offset aColor_aTex2d_0 ; "  {\n	   color.a += tex2D(tex, tc + (off"...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10

loc_802CF5:		; "(scolor * color.a + scolor2 * color.r)"
mov	esi, offset aScolorColor_aS
jmp	short loc_802D4C

loc_802CFC:
cmp	[esp+110h+arg_4], 0
jz	short loc_802D37
xor	esi, esi
test	ebp, ebp
jbe	short loc_802D47
lea	esp, [esp+0]

loc_802D10:
push	esi
lea	ecx, [esp+114h+var_FC]
lea	eax, [esp+114h+var_EC]
push	offset aColorTex2dTexT ; "  color += tex2D(tex,	tc%d);\n"
push	ecx
mov	[esp+11Ch+var_FC], ebx
mov	[esp+11Ch+var_F8], eax
call	sub_6A54B0
add	esi, ebx
add	esp, 0Ch
cmp	esi, ebp
jb	short loc_802D10
jmp	short loc_802D47

loc_802D37:
push	0FFFFFFFFh
push	offset aColorTex2dTe_0 ; "    color += tex2D(tex, tc + (offset.xy"...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10

loc_802D47:		; "(scolor * color.a)"
mov	esi, offset aScolorColor_a

loc_802D4C:
fld1
sub	esp, 8
fdiv	[esp+118h+var_D4]
lea	eax, [esp+118h+var_FC]
lea	edx, [esp+118h+var_EC]
mov	[esp+118h+var_FC], 1
mov	[esp+118h+var_F8], edx
fstp	qword ptr [esp+118h+var_118]
push	offset aColorF	; "  color *= %f;\n"
push	eax
call	sub_6A54B0
mov	ebx, [esp+120h+arg_0]
add	esp, 10h
test	dword ptr [ebx], 400h
lea	ecx, [esp+110h+var_EC]
jz	short loc_802D9E
push	0FFFFFFFFh
push	offset aOcolorScolorCo ; "  ocolor = (scolor * color.a);}\n"
call	sub_679D10
jmp	loc_802F08

loc_802D9E:
cmp	[esp+110h+arg_4], 0
jz	short loc_802DCC
lea	edx, [edi-1]
push	edx
lea	eax, [esp+114h+var_FC]
push	offset aFloat4BaseTex2 ; "  float4 base	= tex2D(srctex,	tc%d);\n"
push	eax
mov	[esp+11Ch+var_FC], 1
mov	[esp+11Ch+var_F8], ecx
call	sub_6A54B0
add	esp, 0Ch
jmp	short loc_802DD8

loc_802DCC:
push	0FFFFFFFFh
push	offset aFloat4BaseTe_0 ; "  float4 base	= tex2D(srctex,	tc * srct"...
call	sub_679D10

loc_802DD8:
mov	eax, [ebx]
test	eax, 200h
jz	short loc_802E2F
push	0FFFFFFFFh
test	al, 4
jz	short loc_802DFE
push	offset aColor_arSatura ; "  color.ar = saturate((1 - color.ar) - "...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
push	0FFFFFFFFh
push	offset aColorScolorCol ; "  color = (scolor * (color.a)	+ scolor2"...
jmp	short loc_802E11

loc_802DFE:
test	eax, 100h
jz	short loc_802E0C
push	offset aColorScolor1Co ; "  color = scolor * (1-color.a) * base.a"...
jmp	short loc_802E11

loc_802E0C:		; "  color = lerp(scolor, base,	color.a) *"...
push	offset aColorLerpScolo

loc_802E11:
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
push	0FFFFFFFFh
push	offset aOcolorColorCxm ; "  ocolor = color * cxmul + cxadd * colo"...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
jmp	loc_802F08

loc_802E2F:
push	esi
lea	edx, [esp+114h+var_FC]
lea	ecx, [esp+114h+var_EC]
push	offset aColorS1Base_aB ; "  color = %s * (1-base.a) + base;\n"
push	edx
mov	[esp+11Ch+var_FC], 1
mov	[esp+11Ch+var_F8], ecx
call	sub_6A54B0
add	esp, 0Ch
test	dword ptr [ebx], 100h
push	0FFFFFFFFh
lea	ecx, [esp+114h+var_EC]
jz	short loc_802E6F
push	offset aColor1Base_aOc ; "  color *= (1	- base.a);\n  ocolor = col"...
call	sub_679D10
jmp	loc_802F08

loc_802E6F:		; "  ocolor = color * cxmul + cxadd * colo"...
push	offset aOcolorColorCxm
call	sub_679D10
jmp	loc_802F08

loc_802E7E:
cmp	[esp+110h+arg_4], 0
jz	short loc_802EB7
xor	esi, esi
test	ebp, ebp
jbe	short loc_802EC7
mov	edi, edi

loc_802E90:
push	esi
lea	ecx, [esp+114h+var_FC]
lea	eax, [esp+114h+var_EC]
push	offset aColorTex2dTexT ; "  color += tex2D(tex,	tc%d);\n"
push	ecx
mov	[esp+11Ch+var_FC], ebx
mov	[esp+11Ch+var_F8], eax
call	sub_6A54B0
add	esi, ebx
add	esp, 0Ch
cmp	esi, ebp
jb	short loc_802E90
jmp	short loc_802EC7

loc_802EB7:
push	0FFFFFFFFh
push	offset aColorTex2dTe_1 ; "    color += tex2D(tex, tc + i * texsca"...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10

loc_802EC7:
fld1
sub	esp, 8
fdiv	[esp+118h+var_D4]
lea	eax, [esp+118h+var_FC]
lea	edx, [esp+118h+var_EC]
mov	[esp+118h+var_FC], ebx
mov	[esp+118h+var_F8], edx
fstp	qword ptr [esp+118h+var_118]
push	offset aColorColorF ; "	 color = color * %f;\n"
push	eax
call	sub_6A54B0
add	esp, 10h
push	0FFFFFFFFh
push	offset aOcolorColorC_0 ; "  ocolor = color * cxmul + cxadd * colo"...
lea	ecx, [esp+118h+var_EC]
call	sub_679D10
mov	ebx, [esp+110h+arg_0]

loc_802F08:
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+28h]
push	0
push	18h
call	eax
test	eax, eax
jz	short loc_802F25
mov	dword ptr [eax], 0
jmp	short loc_802F27

loc_802F25:
xor	eax, eax

loc_802F27:
mov	ecx, dword ptr [esp+110h+var_C8]
mov	[esp+110h+var_100], eax
mov	[eax+10h], ecx
mov	edx, [esp+110h+var_100]
mov	ecx, [esp+110h+var_F0]
mov	[edx+4], ebp
movzx	edx, [esp+110h+arg_4]
mov	eax, [esp+110h+var_100]
neg	edx
mov	[eax+8], ecx
mov	eax, [esp+110h+var_100]
mov	ecx, [esp+110h+var_CC]
sbb	edx, edx
and	edx, edi
mov	[eax+0Ch], edx
mov	eax, [esp+110h+var_100]
lea	edx, [ecx+edi*8+41Ch]
mov	[eax+14h], edx
mov	eax, [esp+110h+var_EC]
test	eax, eax
jnz	short loc_802F78
mov	eax, offset byte_146D660

loc_802F78:
mov	edx, [esp+110h+var_100]
push	eax
push	edx
call	sub_7FDE20
test	al, al
jz	loc_802B33
lea	eax, [esp+110h+var_100]
mov	dword ptr [esp+110h+var_D4+4], eax
mov	dword ptr [esp+110h+var_D4], ebx
mov	eax, 44h
mov	ecx, 1505h

loc_802FA1:
movzx	edx, byte ptr [eax+ebx-1]
imul	ecx, 1003Fh
dec	eax
add	ecx, edx
test	eax, eax
ja	short loc_802FA1
push	ecx
mov	ecx, [esp+114h+var_B8]
lea	eax, [esp+114h+var_D4]
push	eax
push	ecx
call	sub_801670
mov	esi, [esp+110h+var_100]
lea	ecx, [esp+110h+var_EC]
call	sub_679B60
pop	ebp
pop	edi
mov	eax, esi
pop	esi
pop	ebx
add	esp, 100h
retn	8

loc_802FDF:
lea	ecx, [esp+108h+var_EC]
call	sub_679B60
pop	esi
xor	eax, eax
pop	ebx
add	esp, 100h
retn	8
sub_8027F0 endp

align 10h



sub_803000 proc	near

var_38C= qword ptr -38Ch
var_374= dword ptr -374h
var_370= dword ptr -370h
var_36C= dword ptr -36Ch
var_368= dword ptr -368h
var_364= qword ptr -364h
var_359= byte ptr -359h
var_358= dword ptr -358h
var_354= dword ptr -354h
var_350= dword ptr -350h
var_34C= dword ptr -34Ch
var_348= dword ptr -348h
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
var_318= dword ptr -318h
var_314= dword ptr -314h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_308= dword ptr -308h
var_304= dword ptr -304h
var_300= dword ptr -300h
var_2FC= dword ptr -2FCh
var_2F8= dword ptr -2F8h
var_2F4= dword ptr -2F4h
var_2F0= dword ptr -2F0h
var_2EC= dword ptr -2ECh
var_2E8= dword ptr -2E8h
var_2E4= dword ptr -2E4h
var_2E0= dword ptr -2E0h
var_2DC= dword ptr -2DCh
var_2D8= dword ptr -2D8h
var_2D4= dword ptr -2D4h
var_2D0= dword ptr -2D0h
var_2CC= dword ptr -2CCh
var_2C8= dword ptr -2C8h
var_2C4= dword ptr -2C4h
var_2C0= dword ptr -2C0h
var_2BC= dword ptr -2BCh
var_2B8= dword ptr -2B8h
var_2B4= dword ptr -2B4h
var_2B0= dword ptr -2B0h
var_2AC= dword ptr -2ACh
var_2A8= dword ptr -2A8h
var_2A4= dword ptr -2A4h
var_2A0= dword ptr -2A0h
var_29C= dword ptr -29Ch
var_298= dword ptr -298h
var_294= dword ptr -294h
var_290= dword ptr -290h
var_28C= dword ptr -28Ch
var_288= dword ptr -288h
var_284= dword ptr -284h
var_280= dword ptr -280h
var_27C= dword ptr -27Ch
var_278= dword ptr -278h
var_274= dword ptr -274h
var_270= dword ptr -270h
var_26C= dword ptr -26Ch
var_268= dword ptr -268h
var_264= dword ptr -264h
var_260= dword ptr -260h
var_25C= dword ptr -25Ch
var_258= dword ptr -258h
var_254= dword ptr -254h
var_250= dword ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_244= dword ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= dword ptr -200h
var_1FC= dword ptr -1FCh
var_1F8= dword ptr -1F8h
var_1F4= dword ptr -1F4h
var_1F0= dword ptr -1F0h
var_1EC= dword ptr -1ECh
var_1E8= byte ptr -1E8h
var_1C8= dword ptr -1C8h
var_1C4= dword ptr -1C4h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= byte ptr -1A4h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= byte ptr -160h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_E0=	byte ptr -0E0h
var_80=	dword ptr -80h
var_40=	dword ptr -40h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 374h
push	ebx
mov	ebx, ds:InterlockedExchangeAdd
push	ebp
push	esi
mov	esi, [esp+380h+arg_0]
push	edi
mov	ebp, ecx
test	esi, esi
jz	short loc_80302A
push	1		; Value
lea	edi, [esi+4]
push	edi		; Addend
call	ebx ; InterlockedExchangeAdd
push	1		; Value
push	edi		; Addend
call	ebx ; InterlockedExchangeAdd

loc_80302A:
cmp	dword ptr [ebp+34h], 3
fld	ds:dbl_15FCD70
mov	ebx, [esp+384h+arg_C]
mov	eax, [ebx+0Ch]
mov	[esp+384h+var_350], esi
mov	[esp+384h+var_368], eax
jge	short loc_803096
mov	ecx, [ebp+414h]
fild	dword ptr [ebp+414h]
test	ecx, ecx
jge	short loc_80305E
fadd	ds:flt_15FCC08

loc_80305E:
fstp	[esp+384h+var_36C]
fld	dword ptr [ebx+4]
fadd	st, st(1)
fld	[esp+384h+var_36C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 5
jnp	short loc_80308B
fld	dword ptr [ebx+8]
faddp	st(2), st
fcompp
fnstsw	ax
test	ah, 5
jp	short loc_803098
mov	byte ptr [esp+384h+var_354], 1
jmp	short loc_80309D

loc_80308B:
fstp	st
mov	byte ptr [esp+384h+var_354], 1
fstp	st
jmp	short loc_80309D

loc_803096:
fstp	st

loc_803098:
mov	byte ptr [esp+384h+var_354], 0

loc_80309D:
mov	[esp+384h+var_359], 0
mov	edi, 2
lea	esi, [esp+384h+var_208]
mov	edi, edi

loc_8030B0:
fld	ds:dword_1577A70
mov	dword ptr [esi-4], 0
fldz
mov	dword ptr [esi+8], 1
fxch	st(1)
lea	ecx, [esi+20h]
fst	dword ptr [esi]
fstp	dword ptr [esi+4]
fst	dword ptr [esi+0Ch]
fstp	dword ptr [esi+10h]
fld1
fstp	dword ptr [esi+1Ch]
call	sub_68CFB0
add	esi, 44h
sub	edi, 1
jns	short loc_8030B0
cmp	dword ptr [ebp+34h], 3
fld	dword ptr [ebx+4]
fstp	[esp+384h+var_208]
mov	ecx, [ebx+18h]
fld	dword ptr [ebx+8]
mov	eax, [ebx+0Ch]
fstp	[esp+384h+var_204]
mov	edx, [ebx]
fld	dword ptr [ebx+10h]
mov	[esp+384h+var_1F4], ecx
mov	ecx, [ebx+1Ch]
fstp	[esp+384h+var_1FC]
fld	dword ptr [ebx+14h]
mov	[esp+384h+var_1F0], ecx
fstp	[esp+384h+var_1F8]
mov	[esp+384h+var_200], eax
fld	dword ptr [ebx+20h]
mov	[esp+384h+var_20C], edx
fstp	[esp+384h+var_1EC]
lea	esi, [ebx+24h]
fld	dword ptr [ebx+4]
mov	ecx, 8
lea	edi, [esp+384h+var_1E8]
rep movsd
fstp	[esp+384h+var_1C4]
fld	dword ptr [ebx+8]
fstp	[esp+384h+var_1C0]
fld	dword ptr [ebx+10h]
fstp	[esp+384h+var_1B8]
fld	dword ptr [ebx+14h]
fstp	[esp+384h+var_1B4]
fld	dword ptr [ebx+20h]
fstp	[esp+384h+var_1A8]
fld	dword ptr [ebx+4]
mov	ecx, [ebx+18h]
mov	[esp+384h+var_1B0], ecx
mov	ecx, [ebx+1Ch]
mov	[esp+384h+var_1AC], ecx
mov	[esp+384h+var_1BC], eax
mov	[esp+384h+var_1C8], edx
mov	ecx, 8
lea	esi, [ebx+24h]
lea	edi, [esp+384h+var_1A4]
rep movsd
fstp	[esp+384h+var_180]
fld	dword ptr [ebx+8]
fstp	[esp+384h+var_17C]
fld	dword ptr [ebx+10h]
fstp	[esp+384h+var_174]
fld	dword ptr [ebx+14h]
fstp	[esp+384h+var_170]
fld	dword ptr [ebx+20h]
fstp	[esp+384h+var_164]
mov	[esp+384h+var_178], eax
mov	eax, [ebx+18h]
mov	[esp+384h+var_16C], eax
mov	eax, [ebx+1Ch]
mov	ecx, 8
lea	esi, [ebx+24h]
lea	edi, [esp+384h+var_160]
mov	[esp+384h+var_184], edx
mov	[esp+384h+var_168], eax
rep movsd
mov	edi, 15h
jl	loc_803343
mov	eax, [ebp+31Ch]
cmp	eax, 3
jz	short loc_80323F
cmp	eax, 6
jz	short loc_80323F
xor	al, al
jmp	short loc_803241

loc_80323F:
mov	al, 1

loc_803241:
xor	ecx, ecx
test	al, al
setnz	cl
mov	esi, 16h
mov	[esp+384h+var_334], esi
mov	[esp+384h+var_338], esi
lea	ecx, [ecx+ecx+16h]
mov	[esp+384h+var_330], ecx
test	dl, 2
jz	short loc_8032B2
test	edx, 400h
jz	short loc_80327D
mov	ecx, 11h
mov	[esp+384h+var_330], ecx
test	dl, 4
jz	short loc_8032A7
lea	ecx, [esi-4]
jmp	short loc_8032A3

loc_80327D:
mov	ecx, edx
shr	ecx, 6
not	ecx
and	ecx, 8
or	ecx, 1
mov	[esp+384h+var_330], ecx
test	edx, 100h
jz	short loc_80329D
add	ecx, 4
mov	[esp+384h+var_330], ecx

loc_80329D:
test	dl, 4
jz	short loc_8032A7
inc	ecx

loc_8032A3:
mov	[esp+384h+var_330], ecx

loc_8032A7:
test	al, al
jz	short loc_8032B2
add	ecx, 2
mov	[esp+384h+var_330], ecx

loc_8032B2:
fld	dword ptr [ebx+4]
fmul	dword ptr [ebx+8]
fcomp	ds:dbl_15FCF28
fnstsw	ax
test	ah, 41h
jnz	short loc_803306
fld1
mov	edx, [esp+384h+var_368]
fst	[esp+384h+var_204]
lea	eax, [edx+edx]
fst	[esp+384h+var_1C4]
mov	[esp+384h+var_368], eax
fstp	[esp+384h+var_180]
mov	[esp+384h+var_334], edi
mov	[esp+384h+var_338], edi
cmp	ecx, esi
jnz	short loc_8032F9
mov	[esp+384h+var_330], edi
jmp	short loc_803306

loc_8032F9:
cmp	ecx, 18h
jnz	short loc_803306
mov	[esp+384h+var_330], 17h

loc_803306:
xor	eax, eax
jmp	short loc_803310
align 10h

loc_803310:
mov	ecx, [esp+eax*4+384h+var_338]
cmp	dword ptr [ebp+ecx*4+140h], 0
jz	short loc_803329
inc	eax
cmp	eax, 3
jb	short loc_803310
jmp	loc_80351A

loc_803329:
cmp	[esp+384h+arg_0], 0
jz	loc_804728
mov	edi, [esp+384h+arg_0]
jmp	loc_8046F7

loc_803343:
fld	dword ptr [ebx+4]
mov	ecx, [ebp+414h]
fmul	dword ptr [ebx+8]
fild	dword ptr [ebp+414h]
test	ecx, ecx
jge	short loc_80335F
fadd	ds:flt_15FCC08

loc_80335F:
fcompp
fnstsw	ax
test	ah, 5
jp	loc_8033FC
mov	edx, [esp+384h+var_368]
fld1
mov	ecx, [esp+384h+var_20C]
fst	[esp+384h+var_204]
mov	esi, [esp+384h+var_354]
fst	[esp+384h+var_1C4]
lea	eax, [edx+edx]
fstp	[esp+384h+var_180]
mov	edx, [esp+384h+var_1C8]
and	ecx, 0FFFFFFFDh
or	ecx, 1
mov	[esp+384h+var_368], eax
and	edx, 0FFFFFFFDh
push	esi
lea	eax, [esp+388h+var_20C]
mov	[esp+388h+var_20C], ecx
or	edx, 1
push	eax
mov	ecx, ebp
mov	[esp+38Ch+var_1C8], edx
call	sub_8027F0
push	esi
lea	ecx, [esp+388h+var_1C8]
mov	edi, eax
push	ecx
mov	ecx, ebp
mov	[esp+38Ch+var_318], edi
call	sub_8027F0
mov	edx, [esp+384h+var_354]
mov	esi, eax
push	edx
lea	eax, [esp+388h+var_184]
push	eax
mov	ecx, ebp
mov	[esp+38Ch+var_314], esi
call	sub_8027F0
jmp	short loc_80346C

loc_8033FC:
mov	eax, [esp+384h+var_354]
push	eax
test	dl, 2
jz	short loc_803458
mov	ecx, [esp+388h+var_20C]
mov	edx, [esp+388h+var_1C8]
and	ecx, 0FFFFFFFDh
or	ecx, 1
mov	[esp+388h+var_20C], ecx
and	edx, 0FFFFFFFDh
lea	ecx, [esp+388h+var_20C]
or	edx, 1
push	ecx
mov	ecx, ebp
mov	[esp+38Ch+var_1C8], edx
call	sub_8027F0
mov	edx, [esp+384h+var_354]
mov	esi, eax
push	edx
mov	edi, esi
push	ebx
mov	ecx, ebp
mov	[esp+38Ch+var_314], esi
mov	[esp+38Ch+var_318], edi
call	sub_8027F0
jmp	short loc_80346C

loc_803458:
push	ebx
mov	ecx, ebp
call	sub_8027F0
mov	esi, eax
mov	edi, eax
mov	[esp+384h+var_314], esi
mov	[esp+384h+var_318], edi

loc_80346C:
mov	[esp+384h+var_310], eax
test	edi, edi
jz	loc_8046EC
test	esi, esi
jz	loc_8046EC
test	eax, eax
jz	loc_8046EC
cmp	dword ptr [edi+0Ch], 0
setnbe	cl
mov	byte ptr [esp+384h+var_354], cl
test	cl, cl
jz	loc_80351A
mov	ecx, [eax+4]
fild	dword ptr [eax+4]
test	ecx, ecx
jge	short loc_8034AB
fadd	ds:flt_15FCC08

loc_8034AB:
fld	[esp+384h+var_17C]
fmul	[esp+384h+var_180]
fcompp
fnstsw	ax
test	ah, 41h
jz	short loc_8034CB
cmp	dword ptr [ebp+31Ch], 1
jle	short loc_8034FC

loc_8034CB:
mov	edx, [esp+384h+var_354]
fld1
inc	[esp+384h+var_368]
fst	[esp+384h+var_17C]
push	edx
fstp	[esp+388h+var_180]
lea	eax, [esp+388h+var_184]
push	eax
mov	ecx, ebp
mov	[esp+38Ch+var_359], 1
call	sub_8027F0
mov	[esp+384h+var_310], eax

loc_8034FC:
fldz
fst	[esp+384h+var_1B4]
fst	[esp+384h+var_1B8]
fst	[esp+384h+var_1F8]
fstp	[esp+384h+var_1FC]

loc_80351A:
mov	esi, [esp+384h+arg_4]
fld	dword ptr [esi+8]
sub	esp, 8
fsub	dword ptr [esi]
fstp	[esp+38Ch+var_36C]
fld	[esp+38Ch+var_36C]
fstp	[esp+38Ch+var_38C]
call	_ceil
fstp	[esp+38Ch+var_36C]
fld	[esp+38Ch+var_36C]
fnstcw	word ptr [esp+38Ch+var_370]
movzx	eax, word ptr [esp+38Ch+var_370]
or	eax, 0C00h
mov	[esp+38Ch+var_36C], eax
fldcw	word ptr [esp+38Ch+var_36C]
fistp	[esp+38Ch+var_364]
mov	ecx, dword ptr [esp+38Ch+var_364]
mov	[esp+38Ch+var_298], ecx
fldcw	word ptr [esp+38Ch+var_370]
fld	dword ptr [esi+0Ch]
fsub	dword ptr [esi+4]
fstp	[esp+38Ch+var_36C]
fld	[esp+38Ch+var_36C]
fstp	[esp+38Ch+var_38C]
call	_ceil
mov	edi, [esp+38Ch+var_368]
fnstcw	word ptr [esp+38Ch+var_370]
movzx	eax, word ptr [esp+38Ch+var_370]
fstp	[esp+38Ch+var_36C]
fld	[esp+38Ch+var_36C]
or	eax, 0C00h
mov	[esp+38Ch+var_36C], eax
dec	edi
add	esp, 8
cmp	byte ptr [esp+384h+var_354], 0
fldcw	word ptr [esp+384h+var_36C]
fistp	[esp+384h+var_364]
mov	edx, dword ptr [esp+384h+var_364]
mov	[esp+384h+var_280], edx
fldcw	word ptr [esp+384h+var_370]
mov	[esp+384h+var_370], edi
jz	short loc_8035CE
xor	eax, eax
mov	[ebp+48h], eax
mov	[ebp+4Ch], eax
jmp	short loc_80360D

loc_8035CE:
mov	esi, 2
cmp	[ebp+48h], esi
jz	short loc_8035F0
mov	eax, [ebp+1ACh]
mov	[ebp+48h], esi
mov	edx, [ebp+64h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+15Ch]
call	eax

loc_8035F0:
cmp	[ebp+4Ch], esi
jz	short loc_80360D
mov	eax, [ebp+1ACh]
mov	[ebp+4Ch], esi
mov	edx, [ebp+78h]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+170h]
call	eax

loc_80360D:
cmp	[esp+384h+var_368], 0
mov	dword ptr [ebp+50h], 0FFFFFFFFh
mov	[esp+384h+var_348], 0
ja	loc_8036B4
mov	edi, [esp+384h+arg_0]
mov	esi, edi

loc_803630:
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	0
push	0
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+104h]
push	0
push	1
push	eax
call	edx
mov	eax, [ebp+31Ch]
push	0
push	0
push	eax
mov	ecx, ebp
call	sub_7FD170
mov	ecx, [esp+384h+var_368]
add	[ebp+3D8h], ecx
test	esi, esi
jz	short loc_803695
push	0FFFFFFFFh	; Value
lea	edx, [esi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_803695
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx

loc_803695:
test	edi, edi
jz	loc_804728
push	0FFFFFFFFh	; Value
lea	eax, [edi+4]
push	eax		; Addend
call	ds:InterlockedExchangeAdd
jmp	loc_804719
align 10h

loc_8036B0:
mov	edi, [esp+384h+var_370]

loc_8036B4:
mov	esi, [esp+384h+var_348]
cmp	esi, edi
jnz	short loc_8036C3
mov	ecx, 2
jmp	short loc_8036C8

loc_8036C3:
mov	ecx, esi
and	ecx, 1

loc_8036C8:
mov	edx, ecx
shl	edx, 4
add	edx, ecx
cmp	dword ptr [ebp+34h], 3
lea	eax, [esp+edx*4+384h+var_20C]
mov	edx, [esp+ecx*4+384h+var_318]
mov	[esp+384h+var_344], eax
mov	eax, [ebp+1ACh]
mov	[esp+384h+var_358], ecx
mov	[esp+384h+var_32C], edx
jl	short loc_80370B
mov	ecx, [esp+ecx*4+384h+var_338]
mov	ecx, [ebp+ecx*4+140h]
mov	edx, [eax]
mov	edx, [edx+1ACh]
push	ecx
push	eax
call	edx
jmp	short loc_803719

loc_80370B:
mov	edx, [edx]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+1ACh]
call	eax

loc_803719:
cmp	esi, edi
jz	short loc_80378B
fld	ds:flt_1431A30
mov	eax, [esp+384h+var_280]
mov	ecx, [esp+384h+var_298]
fst	[esp+384h+var_21C]
mov	edx, [ebp+0]
fstp	[esp+384h+var_218]
fld1
mov	edx, [edx+28h]
push	0
fst	[esp+388h+var_214]
push	eax
fstp	[esp+38Ch+var_210]
push	ecx
lea	eax, [esp+390h+var_21C]
push	eax
mov	ecx, ebp
call	edx
push	offset flt_167D000
mov	ecx, ebp
mov	[esp+388h+var_36C], eax
call	sub_7FE4C0
fld	ds:flt_1431A30
fst	[esp+384h+var_328]
fstp	[esp+384h+var_324]
fld1
fst	[esp+384h+var_320]
jmp	short loc_8037BF

loc_80378B:
lea	eax, [ebp+248h]
push	eax
mov	ecx, ebp
mov	[esp+388h+var_36C], 0
call	sub_7FE4C0
mov	eax, [esp+384h+arg_8]
fld	dword ptr [eax]
fstp	[esp+384h+var_328]
fld	dword ptr [eax+4]
fstp	[esp+384h+var_324]
fld	dword ptr [eax+8]
fstp	[esp+384h+var_320]
fld	dword ptr [eax+0Ch]

loc_8037BF:
cmp	[esp+384h+var_359], 0
fstp	[esp+384h+var_31C]
mov	esi, [esp+384h+var_350]
fild	dword ptr [esi+28h]
mov	eax, [esp+384h+arg_4]
lea	edi, [esi+28h]
lea	ecx, [esi+2Ch]
fstp	[esp+384h+var_374]
mov	[esp+384h+var_2FC], edi
fld	dword ptr [eax]
mov	[esp+384h+var_33C], ecx
fld	[esp+384h+var_374]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_30C]
fild	dword ptr [ecx]
fstp	[esp+384h+var_374]
fld	dword ptr [eax+4]
fld	[esp+384h+var_374]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_308]
fld	dword ptr [eax+8]
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_304]
fdivr	dword ptr [eax+0Ch]
fstp	[esp+384h+var_300]
jz	short loc_80389D
mov	ecx, [esp+384h+var_370]
cmp	[esp+384h+var_348], ecx
jnb	loc_803907
mov	eax, [ebp+1ACh]
mov	edx, [eax]
push	1
push	1Bh
push	eax
mov	eax, [edx+0E4h]
call	eax
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	0ABh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0
push	0CEh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	2
push	13h
push	eax
call	edx
push	2
push	14h
jmp	loc_80391D

loc_80389D:
mov	eax, [esp+384h+var_370]
cmp	[esp+384h+var_348], eax
jnb	short loc_803907
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	1Bh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	1
push	0ABh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	0
push	0CEh
push	eax
call	edx
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	2
push	13h
push	eax
call	edx
push	6
push	14h
jmp	short loc_80391D

loc_803907:
mov	eax, [ebp+31Ch]
push	1
push	1
push	eax
mov	ecx, ebp
call	sub_7FD170
push	1
push	1Bh

loc_80391D:
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
mov	edx, [ecx+0E4h]
push	eax
call	edx
mov	eax, [esp+380h+var_36C]
cmp	[esp+380h+var_344], eax
mov	eax, [ebp+1ACh]
push	2
jnz	short loc_8039BB
fld	dword ptr [ebx+28h]
lea	edx, [esp+384h+var_11C]
fld	ds:dbl_15FCDC0
fmul	st(1), st
fld	dword ptr [ebx+3Ch]
fmulp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_11C]
fld	dword ptr [ebx+30h]
fmul	st, st(1)
fmul	dword ptr [ebx+3Ch]
fstp	[esp+384h+var_118]
fld	dword ptr [ebx+38h]
fmul	st, st(1)
fmul	dword ptr [ebx+3Ch]
fstp	[esp+384h+var_114]
fmul	dword ptr [ebx+40h]
fstp	[esp+384h+var_110]
fld	dword ptr [ebx+3Ch]
fmul	dword ptr [ebx+24h]
fstp	[esp+384h+var_10C]
fld	dword ptr [ebx+2Ch]
fmul	dword ptr [ebx+3Ch]
fstp	[esp+384h+var_108]
fld	dword ptr [ebx+34h]
fmul	dword ptr [ebx+3Ch]
fstp	[esp+384h+var_104]
fld	dword ptr [ebx+3Ch]
fstp	[esp+384h+var_100]
jmp	short loc_8039FE

loc_8039BB:
fldz
lea	edx, [esp+384h+var_13C]
fst	[esp+384h+var_13C]
fst	[esp+384h+var_138]
fst	[esp+384h+var_134]
fstp	[esp+384h+var_130]
fld1
fst	[esp+384h+var_12C]
fst	[esp+384h+var_128]
fst	[esp+384h+var_124]
fstp	[esp+384h+var_120]

loc_8039FE:
mov	ecx, [eax]
push	edx
push	0
push	eax
mov	eax, [ecx+1B4h]
call	eax
cmp	dword ptr [ebp+34h], 3
jl	loc_803F07
mov	ecx, [esp+384h+var_344]
fnstcw	word ptr [esp+384h+var_370]
movzx	eax, word ptr [esp+384h+var_370]
fld	dword ptr [ecx+4]
fld1
or	eax, 0C00h
fsub	st(1), st
mov	[esp+384h+var_374], eax
fldcw	word ptr [esp+384h+var_374]
fxch	st(1)
fistp	[esp+384h+var_364]
mov	edx, dword ptr [esp+384h+var_364]
fldcw	word ptr [esp+384h+var_370]
fild	dword ptr [esp+384h+var_364]
test	edx, edx
jge	short loc_803A53
fadd	ds:flt_15FCC08

loc_803A53:
fld	ds:dbl_15FCC48
fmul	st(1), st
fnstcw	word ptr [esp+384h+var_370]
movzx	eax, word ptr [esp+384h+var_370]
fxch	st(1)
fstp	[esp+384h+var_34C]
or	eax, 0C00h
fld	dword ptr [ecx+8]
mov	[esp+384h+var_374], eax
fsub	st, st(2)
fldcw	word ptr [esp+384h+var_374]
fistp	[esp+384h+var_364]
mov	eax, dword ptr [esp+384h+var_364]
fldcw	word ptr [esp+384h+var_370]
fild	dword ptr [esp+384h+var_364]
test	eax, eax
jge	short loc_803A96
fadd	ds:flt_15FCC08

loc_803A96:
mov	edx, [esp+384h+var_358]
fmulp	st(1), st
mov	esi, [esp+edx*4+384h+var_338]
fstp	[esp+384h+var_340]
cmp	esi, 15h
jz	loc_803B8A
cmp	esi, 17h
jz	loc_803B8A
fld	[esp+384h+var_34C]
mov	ecx, dword_16817A0[esi*4]
fst	[esp+384h+var_294]
mov	eax, [ecx+8]
fld	[esp+384h+var_340]
mov	edx, [esp+384h+var_294]
fst	[esp+384h+var_290]
shl	eax, 4
fldz
mov	[esp+eax+384h+var_100],	edx
fst	[esp+384h+var_28C]
mov	edx, [esp+384h+var_290]
fld	ds:dbl_15FCD70
mov	[esp+eax+384h+var_FC], edx
fmul	st(2), st
mov	edx, [esp+384h+var_28C]
fxch	st(2)
lea	eax, [esp+eax+384h+var_100]
mov	[eax+8], edx
fadd	st, st(4)
fxch	st(3)
fmulp	st(2), st
fxch	st(1)
fadd	st, st(3)
fmulp	st(2), st
fld	st(2)
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_288]
fild	dword ptr [edi]
mov	edx, [esp+384h+var_288]
mov	[eax+0Ch], edx
mov	eax, ecx
mov	edx, [eax+24h]
fdivr	st, st(2)
shl	edx, 4
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_100]
mov	edx, [esp+384h+var_33C]
fild	dword ptr [edx]
mov	edx, [eax+24h]
shl	edx, 4
fdivp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_FC]
mov	edx, [eax+24h]
shl	edx, 4
fst	[esp+edx+384h+var_F8]
fld1
jmp	loc_803C92

loc_803B8A:
fld1
fcom	dword ptr [ecx+4]
fnstsw	ax
fld	[esp+384h+var_340]
fld	[esp+384h+var_34C]
test	ah, 5
jp	short loc_803BA7
fst	[esp+384h+var_2F8]
jmp	short loc_803BB2

loc_803BA7:
fxch	st(1)
fst	[esp+384h+var_2F8]
fxch	st(1)

loc_803BB2:
fldz
mov	ecx, dword_16817A0[esi*4]
fst	[esp+384h+var_2F4]
mov	eax, [ecx+8]
fst	[esp+384h+var_2F0]
mov	edx, [esp+384h+var_2F8]
fld	ds:dbl_15FCD70
shl	eax, 4
fmul	st(3), st
mov	[esp+eax+384h+var_100],	edx
fxch	st(3)
mov	edx, [esp+384h+var_2F4]
lea	eax, [esp+eax+384h+var_100]
mov	[eax+4], edx
fadd	st, st(5)
mov	edx, [esp+384h+var_2F0]
fxch	st(2)
mov	[eax+8], edx
fmulp	st(3), st
fxch	st(2)
fadd	st, st(4)
fmulp	st(1), st
fdivr	st, st(3)
fstp	[esp+384h+var_2EC]
fxch	st(1)
mov	edx, [esp+384h+var_2EC]
mov	[eax+0Ch], edx
mov	edx, [esp+384h+var_344]
fcom	dword ptr [edx+8]
fnstsw	ax
test	ah, 5
jp	short loc_803C3B
mov	eax, [esp+384h+var_33C]
fild	dword ptr [eax]
fdivr	st, st(3)
jmp	short loc_803C3D

loc_803C3B:
fldz

loc_803C3D:
fxch	st(1)
fcom	dword ptr [edx+4]
fnstsw	ax
test	ah, 5
jp	short loc_803C4F
fild	dword ptr [edi]
fdivp	st(4), st
jmp	short loc_803C55

loc_803C4F:
fstp	st(3)
fldz
fxch	st(3)

loc_803C55:
mov	eax, ecx
fxch	st(3)
mov	edx, [eax+24h]
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
shl	edx, 4
fstp	[esp+edx+384h+var_100]
mov	edx, [eax+24h]
shl	edx, 4
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_FC]
mov	edx, [eax+24h]
shl	edx, 4
fst	[esp+edx+384h+var_F8]
fxch	st(1)

loc_803C92:
mov	eax, [eax+24h]
shl	eax, 4
fst	[esp+eax+384h+var_F4]
cmp	dword ptr [ecx+0Ch], 0
jl	loc_803D56
mov	eax, dword_16817A0[esi*4]
fld	dword ptr [ebx+10h]
mov	edx, [eax+0Ch]
fchs
shl	edx, 4
fstp	[esp+edx+384h+var_100]
mov	edx, [eax+0Ch]
fld	dword ptr [ebx+14h]
shl	edx, 4
fchs
fstp	[esp+edx+384h+var_FC]
mov	edx, [eax+0Ch]
shl	edx, 4
fxch	st(1)
fst	[esp+edx+384h+var_F8]
mov	eax, [eax+0Ch]
mov	edx, [esp+384h+arg_0]
fxch	st(1)
shl	eax, 4
fst	[esp+eax+384h+var_F4]
mov	eax, dword_16817A0[esi*4]
fild	dword ptr [edi]
mov	edi, [eax+1Ch]
shl	edi, 4
fidiv	dword ptr [edx+28h]
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edi+384h+var_100]
mov	edi, [esp+384h+var_33C]
fild	dword ptr [edi]
fidiv	dword ptr [edx+2Ch]
mov	edx, [eax+1Ch]
shl	edx, 4
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_FC]
fxch	st(1)
mov	edx, [eax+1Ch]
shl	edx, 4
fstp	[esp+edx+384h+var_F8]
mov	eax, [eax+1Ch]
shl	eax, 4
fstp	[esp+eax+384h+var_F4]
jmp	short loc_803D5A

loc_803D56:
fstp	st(1)
fstp	st

loc_803D5A:
cmp	dword ptr [ecx+10h], 0
jl	loc_803EA0
movzx	edx, byte ptr [ebx+1Ah]
mov	eax, dword_16817A0[esi*4]
mov	[esp+384h+var_374], edx
mov	edx, [eax+10h]
shl	edx, 4
fild	[esp+384h+var_374]
fld	ds:dbl_15FCDC0
fmul	st(1), st
fxch	st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_100]
movzx	edx, byte ptr [ebx+19h]
mov	[esp+384h+var_374], edx
mov	edx, [eax+10h]
shl	edx, 4
fild	[esp+384h+var_374]
fmul	st, st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_FC]
movzx	edx, byte ptr [ebx+18h]
mov	[esp+384h+var_374], edx
mov	edx, [eax+10h]
shl	edx, 4
fild	[esp+384h+var_374]
fmul	st, st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_F8]
movzx	edx, byte ptr [ebx+1Bh]
mov	eax, [eax+10h]
mov	[esp+384h+var_374], edx
shl	eax, 4
fild	[esp+384h+var_374]
fmul	st, st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+eax+384h+var_F4]
cmp	dword ptr [ecx+14h], 0
jl	loc_803E9E
movzx	ecx, byte ptr [ebx+1Eh]
mov	eax, dword_16817A0[esi*4]
mov	edx, [eax+14h]
mov	[esp+384h+var_374], ecx
movzx	ecx, byte ptr [ebx+1Dh]
fild	[esp+384h+var_374]
shl	edx, 4
fmul	st, st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
mov	[esp+384h+var_374], ecx
movzx	ecx, byte ptr [ebx+1Ch]
fstp	[esp+edx+384h+var_100]
fild	[esp+384h+var_374]
mov	edx, [eax+14h]
shl	edx, 4
fmul	st, st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
mov	[esp+384h+var_374], ecx
movzx	ecx, byte ptr [ebx+1Fh]
fstp	[esp+edx+384h+var_FC]
fild	[esp+384h+var_374]
mov	edx, [eax+14h]
shl	edx, 4
fmul	st, st(1)
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
mov	[esp+384h+var_374], ecx
fstp	[esp+edx+384h+var_F8]
mov	edx, [eax+14h]
fild	[esp+384h+var_374]
shl	edx, 4
fmulp	st(1), st
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fstp	[esp+edx+384h+var_F4]
jmp	short loc_803EA0

loc_803E9E:
fstp	st

loc_803EA0:
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	6
lea	edx, [esp+388h+var_E0]
push	edx
push	2
push	eax
mov	eax, [ecx+1B4h]
call	eax
mov	eax, dword_16817A0[esi*4]
mov	edi, [esp+384h+var_350]
mov	ecx, [eax+20h]
mov	edx, [edi]
mov	edx, [edx+40h]
push	0
push	1
push	1
push	ecx
mov	ecx, edi
call	edx
mov	eax, dword_16817A0[esi*4]
mov	eax, [eax+18h]
test	eax, eax
jl	loc_80409D
mov	ecx, [esp+384h+arg_0]
mov	edx, [ecx]
push	0
push	1
push	1
push	eax
mov	eax, [edx+40h]
call	eax
jmp	loc_80409D

loc_803F07:
fild	dword ptr [edi]
mov	ecx, [esp+384h+var_33C]
movzx	edx, byte ptr [ebx+1Ah]
movzx	eax, byte ptr [ebx+19h]
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
fld	st
mov	edi, [esp+384h+arg_0]
fld1
fld	st
fdivrp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_2E8]
fild	dword ptr [ecx]
movzx	ecx, byte ptr [ebx+18h]
fstp	[esp+384h+var_374]
fld	[esp+384h+var_374]
mov	[esp+384h+var_374], edx
fld	st
movzx	edx, byte ptr [ebx+1Bh]
fdivp	st(2), st
fxch	st(1)
fstp	[esp+384h+var_2E4]
fldz
fst	[esp+384h+var_2E0]
fld1
fst	[esp+384h+var_2DC]
fld	dword ptr [ebx+10h]
fchs
fstp	[esp+384h+var_2D8]
fld	dword ptr [ebx+14h]
fchs
fstp	[esp+384h+var_2D4]
fxch	st(1)
fst	[esp+384h+var_2D0]
fxch	st(1)
fst	[esp+384h+var_2CC]
fild	[esp+384h+var_374]
fld	ds:dbl_15FCDC0
mov	[esp+384h+var_374], eax
movzx	eax, byte ptr [ebx+1Eh]
fmul	st(1), st
fxch	st(1)
fstp	[esp+384h+var_2C8]
fild	[esp+384h+var_374]
mov	[esp+384h+var_374], ecx
movzx	ecx, byte ptr [ebx+1Dh]
fmul	st, st(1)
fstp	[esp+384h+var_2C4]
fild	[esp+384h+var_374]
mov	[esp+384h+var_374], edx
movzx	edx, byte ptr [ebx+1Ch]
fmul	st, st(1)
fstp	[esp+384h+var_2C0]
fild	[esp+384h+var_374]
mov	[esp+384h+var_374], eax
movzx	eax, byte ptr [ebx+1Fh]
fmul	st, st(1)
fstp	[esp+384h+var_2BC]
fild	dword ptr [edi+28h]
fdivp	st(5), st
fxch	st(4)
fstp	[esp+384h+var_2B8]
fild	dword ptr [edi+2Ch]
fdivp	st(3), st
fxch	st(2)
fstp	[esp+384h+var_2B4]
fstp	[esp+384h+var_2B0]
fstp	[esp+384h+var_2AC]
fild	[esp+384h+var_374]
mov	[esp+384h+var_374], ecx
fmul	st, st(1)
fstp	[esp+384h+var_2A8]
fild	[esp+384h+var_374]
mov	[esp+384h+var_374], edx
fmul	st, st(1)
fstp	[esp+384h+var_2A4]
fild	[esp+384h+var_374]
mov	[esp+384h+var_374], eax
fmul	st, st(1)
fstp	[esp+384h+var_2A0]
fild	[esp+384h+var_374]
mov	eax, [ebp+1ACh]
push	5
lea	edx, [esp+388h+var_2E8]
fmulp	st(1), st
push	edx
push	2
push	eax
fstp	[esp+394h+var_29C]
mov	ecx, [eax]
mov	eax, [ecx+1B4h]
call	eax
mov	edx, [esi]
mov	eax, [edx+40h]
push	0
push	1
push	1
push	0
mov	ecx, esi
call	eax
mov	edx, [edi]
mov	eax, [edx+40h]
push	0
push	1
push	1
push	1
mov	ecx, edi
call	eax
mov	edi, [esp+384h+var_350]

loc_80409D:
cmp	byte ptr [esp+384h+var_354], 0
jz	loc_80453C
mov	ecx, [esp+384h+var_344]
fnstcw	word ptr [esp+384h+var_370]
movzx	eax, word ptr [esp+384h+var_370]
fld	dword ptr [ecx+4]
fld1
or	eax, 0C00h
fsub	st(1), st
mov	[esp+384h+var_374], eax
fldcw	word ptr [esp+384h+var_374]
fxch	st(1)
fistp	[esp+384h+var_364]
mov	edx, dword ptr [esp+384h+var_364]
fldcw	word ptr [esp+384h+var_370]
fild	dword ptr [esp+384h+var_364]
test	edx, edx
jge	short loc_8040E5
fadd	ds:flt_15FCC08

loc_8040E5:
fld	ds:dbl_15FCC48
fmul	st(1), st
fnstcw	word ptr [esp+384h+var_370]
movzx	eax, word ptr [esp+384h+var_370]
fxch	st(1)
fstp	[esp+384h+var_34C]
or	eax, 0C00h
fld	dword ptr [ecx+8]
mov	[esp+384h+var_374], eax
fsub	st, st(2)
fldcw	word ptr [esp+384h+var_374]
fistp	[esp+384h+var_364]
mov	eax, dword ptr [esp+384h+var_364]
fldcw	word ptr [esp+384h+var_370]
fild	dword ptr [esp+384h+var_364]
test	eax, eax
jge	short loc_804128
fadd	ds:flt_15FCC08

loc_804128:
fmulp	st(1), st
mov	edi, [esp+384h+var_32C]
mov	ecx, [edi+4]
fnstcw	word ptr [esp+384h+var_370]
movzx	eax, word ptr [esp+384h+var_370]
fstp	[esp+384h+var_340]
fld	[esp+384h+var_340]
or	eax, 0C00h
fld	ds:dbl_15FCD70
mov	[esp+384h+var_374], eax
fmul	st(1), st
fxch	st(1)
fadd	st, st(2)
fld	[esp+384h+var_34C]
fmulp	st(2), st
fxch	st(1)
faddp	st(2), st
fmulp	st(1), st
fldcw	word ptr [esp+384h+var_374]
fistp	[esp+384h+var_364]
mov	edx, dword ptr [esp+384h+var_364]
lea	eax, [edx+ecx-1]
xor	edx, edx
div	ecx
fldcw	word ptr [esp+384h+var_370]
mov	edx, [edi+14h]
mov	edx, [edx+4]
push	edx
mov	esi, eax
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	eax
mov	eax, [ecx+15Ch]
mov	dword ptr [esp+38Ch+var_364], esi
call	eax
mov	edx, [edi+14h]
mov	eax, [ebp+1ACh]
mov	edx, [edx]
mov	ecx, [eax]
push	edx
push	eax
mov	eax, [ecx+170h]
call	eax
fld	[esp+384h+var_328]
fst	[esp+384h+var_27C]
fld	[esp+384h+var_324]
fst	[esp+384h+var_278]
fld	[esp+384h+var_30C]
fst	[esp+384h+var_274]
fld	[esp+384h+var_308]
fst	[esp+384h+var_270]
fld	[esp+384h+var_320]
fst	[esp+384h+var_26C]
fxch	st(3)
fst	[esp+384h+var_268]
fld	[esp+384h+var_304]
fst	[esp+384h+var_264]
fxch	st(2)
fst	[esp+384h+var_260]
fxch	st(5)
fst	[esp+384h+var_25C]
fld	[esp+384h+var_31C]
fst	[esp+384h+var_258]
fxch	st(4)
fst	[esp+384h+var_254]
fld	[esp+384h+var_300]
fstp	[esp+384h+var_250]
fxch	st(1)
fstp	[esp+384h+var_24C]
fxch	st(3)
fst	[esp+384h+var_248]
fxch	st(3)
fstp	[esp+384h+var_244]
fld	[esp+384h+var_300]
fst	[esp+384h+var_240]
fstp	[esp+384h+var_220]
fxch	st(3)
fst	[esp+384h+var_23C]
fstp	[esp+384h+var_22C]
fxch	st(2)
fstp	[esp+384h+var_238]
mov	ecx, [edi+0Ch]
fxch	st(1)
fst	[esp+384h+var_234]
lea	edx, ds:8[ecx*8]
fstp	[esp+384h+var_224]
lea	eax, [esi+esi*2]
fxch	st(1)
push	edx		; int
add	eax, eax
fstp	[esp+388h+var_230]
push	eax		; lp
lea	ecx, [ebp+2A8h]
fstp	[esp+38Ch+var_228]
call	sub_7FAD40
fld	[esp+384h+var_34C]
fld	st
xor	ecx, ecx
fchs
mov	edx, eax
fstp	[esp+384h+var_34C]
fld	[esp+384h+var_34C]
fstp	[esp+384h+var_370]
fld	[esp+384h+var_340]
fchs
fstp	[esp+384h+var_358]
test	esi, esi
jbe	loc_8044F2
fld	[esp+384h+var_370]
mov	[esp+384h+var_374], esi
fld	[esp+384h+var_358]
fld	ds:dbl_14644D0
fldz
fld1

loc_8042F7:
mov	eax, [esp+384h+var_32C]
mov	eax, [eax+4]
xor	esi, esi
mov	[esp+384h+var_284], eax
test	eax, eax
jbe	loc_8043A2
mov	edi, [esp+384h+var_344]

loc_804313:
fld	[esp+384h+var_340]
fcomp	st(4)
fnstsw	ax
test	ah, 1
jnz	short loc_80437C
mov	eax, [esp+384h+var_2FC]
fld	st(4)
fsub	dword ptr [edi+10h]
fidiv	dword ptr [eax]
mov	eax, [esp+384h+var_33C]
fstp	[esp+esi*4+384h+var_80]
fld	st(3)
fsub	dword ptr [edi+14h]
fidiv	dword ptr [eax]
fstp	[esp+esi*4+384h+var_40]
fadd	st(4), st
fxch	st(4)
fstp	[esp+384h+var_370]
fld	[esp+384h+var_370]
fcom	st(5)
fnstsw	ax
test	ah, 41h
jnz	short loc_804392
fstp	st
fld	[esp+384h+var_34C]
fstp	[esp+384h+var_370]
fxch	st(2)
fadd	st, st(3)
fstp	[esp+384h+var_358]
fld	[esp+384h+var_370]
fld	[esp+384h+var_358]
fxch	st(3)
fxch	st(1)
jmp	short loc_804392

loc_80437C:
fld	ds:flt_15FD598
fst	[esp+esi*4+384h+var_40]
fstp	[esp+esi*4+384h+var_80]
fxch	st(4)

loc_804392:
inc	esi
fxch	st(4)
cmp	esi, [esp+384h+var_284]
jb	loc_804313

loc_8043A2:
mov	eax, [esp+384h+arg_0]
xor	edi, edi
mov	[esp+384h+var_358], edi

loc_8043AF:
fld	[esp+edi+384h+var_27C]
inc	ecx
fstp	dword ptr [edx+ecx*4-4]
xor	esi, esi
fld	[esp+edi+384h+var_278]
mov	edi, [esp+384h+var_32C]
fstp	dword ptr [edx+ecx*4]
inc	ecx
cmp	[edi+4], esi
mov	edi, [esp+384h+var_358]
jbe	loc_804493

loc_8043D9:
fld	[esp+esi*4+384h+var_80]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_8043F9
fld	[esp+edi+384h+var_274]
fadd	[esp+esi*4+384h+var_80]
jmp	short loc_8043FB

loc_8043F9:
fld	st(1)

loc_8043FB:
fstp	dword ptr [edx+ecx*4]
inc	ecx
fld	[esp+esi*4+384h+var_40]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_80441F
fld	[esp+edi+384h+var_270]
fadd	[esp+esi*4+384h+var_40]
jmp	short loc_804421

loc_80441F:
fld	st(1)

loc_804421:
mov	eax, [esp+384h+var_344]
fstp	dword ptr [edx+ecx*4]
mov	eax, [eax]
and	eax, 6
inc	ecx
cmp	al, 6
jnz	short loc_80447E
fld	[esp+esi*4+384h+var_80]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_804452
fld	[esp+edi+384h+var_274]
fsub	[esp+esi*4+384h+var_80]
jmp	short loc_804454

loc_804452:
fld	st(1)

loc_804454:
fstp	dword ptr [edx+ecx*4]
inc	ecx
fld	[esp+esi*4+384h+var_40]
fcomp	st(3)
fnstsw	ax
test	ah, 5
jp	short loc_804478
fld	[esp+edi+384h+var_270]
fsub	[esp+esi*4+384h+var_40]
jmp	short loc_80447A

loc_804478:
fld	st(1)

loc_80447A:
fstp	dword ptr [edx+ecx*4]
inc	ecx

loc_80447E:
mov	eax, [esp+384h+var_32C]
inc	esi
cmp	esi, [eax+4]
jb	loc_8043D9
mov	eax, [esp+384h+arg_0]

loc_804493:
mov	esi, [esp+384h+var_344]
test	byte ptr [esi],	2
jz	short loc_8044C9
mov	esi, [esp+384h+var_2FC]
fld	[esp+edi+384h+var_274]
fimul	dword ptr [esi]
mov	esi, [esp+384h+var_33C]
inc	ecx
inc	ecx
fidiv	dword ptr [eax+28h]
fstp	dword ptr [edx+ecx*4-8]
fld	[esp+edi+384h+var_270]
fimul	dword ptr [esi]
fidiv	dword ptr [eax+2Ch]
fstp	dword ptr [edx+ecx*4-4]

loc_8044C9:
add	edi, 10h
mov	[esp+384h+var_358], edi
cmp	edi, 60h
jb	loc_8043AF
sub	[esp+384h+var_374], 1
jnz	loc_8042F7
mov	esi, dword ptr [esp+384h+var_364]
fstp	st(1)
fstp	st(1)
fstp	st(2)
fstp	st
fstp	st

loc_8044F2:
mov	eax, [ebp+2CCh]
fstp	st
mov	ecx, [eax]
mov	edx, [ecx+30h]
push	eax
call	edx
mov	edx, [ebp+2F4h]
mov	eax, [ebp+2A8h]
mov	ecx, [eax]
push	edx
mov	edx, [ebp+2E8h]
push	edx
mov	edx, [ebp+2CCh]
push	edx
push	0
push	eax
mov	eax, [ecx+190h]
call	eax
lea	edx, [esi+esi]
push	edx
mov	edx, [ebp+2ECh]
push	edx
push	4
jmp	loc_804668

loc_80453C:
fld	[esp+384h+var_328]
mov	eax, dword ptr [esp+384h+var_364]
fst	[esp+384h+var_2E8]
push	14h		; int
fld	[esp+388h+var_324]
push	4		; lp
fst	[esp+38Ch+var_2E4]
lea	ecx, [ebp+2A8h]
fld	[esp+38Ch+var_30C]
mov	[esp+38Ch+var_2D8], eax
fst	[esp+38Ch+var_2E0]
mov	[esp+38Ch+var_2C4], eax
fld	[esp+38Ch+var_308]
mov	[esp+38Ch+var_2B0], eax
fst	[esp+38Ch+var_2DC]
mov	[esp+38Ch+var_29C], eax
fld	[esp+38Ch+var_320]
fst	[esp+38Ch+var_2D4]
fxch	st(3)
fstp	[esp+38Ch+var_2D0]
fld	[esp+38Ch+var_304]
fst	[esp+38Ch+var_2CC]
fxch	st(1)
fstp	[esp+38Ch+var_2C8]
fxch	st(3)
fstp	[esp+38Ch+var_2C0]
fld	[esp+38Ch+var_31C]
fst	[esp+38Ch+var_2BC]
fxch	st(1)
fstp	[esp+38Ch+var_2B8]
fld	[esp+38Ch+var_300]
fst	[esp+38Ch+var_2B4]
fxch	st(2)
fstp	[esp+38Ch+var_2AC]
fstp	[esp+38Ch+var_2A8]
fxch	st(1)
fstp	[esp+38Ch+var_2A4]
fstp	[esp+38Ch+var_2A0]
call	sub_7FAD40
test	eax, eax
jz	short loc_80467D
mov	edi, eax
mov	ecx, 14h
lea	esi, [esp+384h+var_2E8]
rep movsd
mov	eax, [ebp+2CCh]
mov	ecx, [eax]
mov	edx, [ecx+30h]
push	eax
call	edx
mov	edx, [ebp+2F4h]
mov	eax, [ebp+2A8h]
mov	ecx, [eax]
push	edx
mov	edx, [ebp+2E8h]
push	edx
mov	edx, [ebp+2CCh]
push	edx
push	0
push	eax
mov	eax, [ecx+190h]
call	eax
mov	edx, [ebp+2ECh]
push	2
push	edx
push	5

loc_804668:
mov	eax, [ebp+1ACh]
mov	ecx, [eax]
push	eax
mov	eax, [ecx+144h]
call	eax
mov	edi, [esp+384h+var_350]

loc_80467D:
mov	eax, [esp+384h+var_368]
dec	eax
mov	[esp+384h+var_370], eax
cmp	[esp+384h+var_348], eax
jz	short loc_8046C9
mov	edx, [ebp+0]
mov	eax, [edx+24h]
mov	ecx, ebp
call	eax
mov	esi, [esp+384h+var_36C]
test	esi, esi
jz	short loc_8046AA
push	1		; Value
lea	ecx, [esi+4]
push	ecx		; Addend
call	ds:InterlockedExchangeAdd

loc_8046AA:		; Value
push	0FFFFFFFFh
lea	edx, [edi+4]
push	edx		; Addend
call	ds:InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_8046C5
mov	eax, [edi]
mov	edx, [eax]
push	1
mov	ecx, edi
call	edx

loc_8046C5:
mov	[esp+384h+var_350], esi

loc_8046C9:
mov	eax, [esp+384h+var_348]
inc	eax
mov	[esp+384h+var_348], eax
cmp	eax, [esp+384h+var_368]
jb	loc_8036B0
mov	esi, [esp+384h+var_350]
mov	edi, [esp+384h+arg_0]
jmp	loc_803630

loc_8046EC:
mov	edi, [esp+384h+arg_0]
test	edi, edi
jz	short loc_804728

loc_8046F7:
mov	ebx, ds:InterlockedExchangeAdd
push	0FFFFFFFFh	; Value
lea	esi, [edi+4]
push	esi		; Addend
call	ebx ; InterlockedExchangeAdd
sub	eax, 1
jnz	short loc_804714
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_804714:		; Value
push	0FFFFFFFFh
push	esi		; Addend
call	ebx ; InterlockedExchangeAdd

loc_804719:
sub	eax, 1
jnz	short loc_804728
mov	edx, [edi]
mov	eax, [edx]
push	1
mov	ecx, edi
call	eax

loc_804728:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 374h
retn	10h
sub_803000 endp

align 10h



sub_804740 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_14644D8
jz	short loc_80475E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_80475E:
mov	eax, esi
pop	esi
retn	4
sub_804740 endp

align 10h



sub_804770 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1464508
jz	short loc_80478E
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_80478E:
mov	eax, esi
pop	esi
retn	4
sub_804770 endp

align 10h



sub_8047A0 proc	near
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi]
mov	edx, [eax+18h]
call	edx
cmp	byte ptr [edi+14h], 0
mov	ebx, eax
jz	short loc_8047E6
mov	eax, [edi+18h]
xor	esi, esi
cmp	[eax+4], esi
jbe	short loc_8047FB
mov	edi, edi

loc_8047C0:
mov	eax, [eax]
mov	ecx, [eax+esi*4]
mov	edx, [ecx]
mov	eax, [edx+8]
push	ebx
call	eax
test	al, al
jnz	short loc_8047E0
mov	eax, [edi+18h]
inc	esi
cmp	esi, [eax+4]
jb	short loc_8047C0
pop	edi
pop	esi
xor	al, al
pop	ebx
retn

loc_8047E0:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn

loc_8047E6:
cmp	dword ptr [edi+18h], 0
jz	short loc_8047FB
mov	ecx, [edi+18h]
mov	edx, [ecx]
mov	eax, [edx+8]
push	ebx
call	eax
test	al, al
jnz	short loc_8047E0

loc_8047FB:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn
sub_8047A0 endp

align 10h



sub_804810 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	dword ptr [eax], offset	off_14644D8
mov	dword ptr [eax+4], 1
lea	ecx, [eax+8]
push	esi
mov	esi, [edx+4]
mov	[ecx+4], esi
mov	[ecx], edx
mov	esi, [edx+4]
mov	[esi], ecx
mov	[edx+4], ecx
xor	ecx, ecx
mov	dword ptr [eax], offset	off_1464524
mov	[eax+10h], ecx
mov	[eax+14h], cl
mov	[eax+18h], ecx
pop	esi
retn	4
sub_804810 endp

align 10h



sub_804850 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, ecx
mov	dword ptr [eax], offset	off_1464508
mov	dword ptr [eax+4], 1
lea	ecx, [eax+8]
push	esi
mov	esi, [edx+4]
mov	[ecx+4], esi
mov	[ecx], edx
mov	esi, [edx+4]
mov	[esi], ecx
mov	[edx+4], ecx
xor	ecx, ecx
mov	dword ptr [eax], offset	off_1464554
mov	[eax+10h], ecx
mov	[eax+14h], cl
mov	[eax+18h], ecx
pop	esi
retn	4
sub_804850 endp

align 10h



sub_804890 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, eax
jnb	short loc_8048BD
mov	eax, [esi+8]
shr	eax, 1
cmp	edi, eax
jnb	short loc_8048D4
mov	ecx, [esp+8+arg_0]
push	edi
push	ecx
mov	ecx, esi
call	sub_714BE0
mov	[esi+4], edi
pop	edi
pop	esi
retn	8

loc_8048BD:
cmp	edi, [esi+8]
jb	short loc_8048D4
mov	eax, [esp+8+arg_0]
mov	edx, edi
shr	edx, 2
add	edx, edi
push	edx
push	eax
call	sub_714BE0

loc_8048D4:
mov	[esi+4], edi
pop	edi
pop	esi
retn	8
sub_804890 endp

align 10h



sub_8048E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, ecx
test	ebx, ebx
jz	short loc_80491B
push	edi
mov	edi, [esi+4]
lea	eax, [edi+ebx]
push	eax
push	esi
call	sub_804890
mov	edx, [esi]
mov	ecx, [esp+0Ch+arg_0]
lea	eax, [edx+edi*4]
pop	edi
test	ebx, ebx
jbe	short loc_80491B

loc_804908:
test	eax, eax
jz	short loc_804910
mov	edx, [ecx]
mov	[eax], edx

loc_804910:
add	ecx, 4
add	eax, 4
sub	ebx, 1
jnz	short loc_804908

loc_80491B:
pop	esi
pop	ebx
retn	8
sub_8048E0 endp




sub_804920 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_80498B
cmp	byte ptr [esi+14h], 0
jnz	short loc_804979
mov	ecx, dword_1855FC0
mov	[esp+8+var_4], eax
mov	eax, [ecx]
mov	edx, [eax+28h]
push	0
push	0Ch
call	edx
test	eax, eax
jz	short loc_804960
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	dword ptr [eax+8], 0
jmp	short loc_804962

loc_804960:
xor	eax, eax

loc_804962:
mov	[esi+18h], eax
test	eax, eax
jz	short loc_804992
lea	ecx, [esp+8+var_4]
push	ecx
mov	ecx, eax
call	sub_65EDD0
mov	byte ptr [esi+14h], 1

loc_804979:
mov	ecx, [esi+18h]
lea	edx, [esp+8+arg_0]
push	edx
call	sub_65EDD0
pop	esi
pop	ecx
retn	4

loc_80498B:
mov	eax, [esp+8+arg_0]
mov	[esi+18h], eax

loc_804992:
pop	esi
pop	ecx
retn	4
sub_804920 endp

align 10h



sub_8049A0 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+18h]
mov	dword ptr [esi], offset	off_1464554
test	edi, edi
jz	short loc_8049D5
cmp	byte ptr [esi+14h], 0
jz	short loc_8049D5
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_8049D5:
cmp	dword ptr [esi+0Ch], 0
jz	short loc_8049FA
mov	ecx, [esi+8]
mov	edx, [esi+0Ch]
mov	[ecx+4], edx
mov	eax, [esi+0Ch]
mov	ecx, [esi+8]
mov	[eax], ecx
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0

loc_8049FA:
pop	edi
mov	dword ptr [esi], offset	off_1464508
pop	esi
retn
sub_8049A0 endp

align 10h



sub_804A10 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_8049A0
test	[esp+4+arg_0], 1
jz	short loc_804A2D
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_804A2D:
mov	eax, esi
pop	esi
retn	4
sub_804A10 endp

align 10h



sub_804A40 proc	near
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+18h]
mov	dword ptr [esi], offset	off_1464524
test	edi, edi
jz	short loc_804A75
cmp	byte ptr [esi+14h], 0
jz	short loc_804A75
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [edi]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	edi
call	eax

loc_804A75:
cmp	dword ptr [esi+0Ch], 0
jz	short loc_804A9A
mov	ecx, [esi+8]
mov	edx, [esi+0Ch]
mov	[ecx+4], edx
mov	eax, [esi+0Ch]
mov	ecx, [esi+8]
mov	[eax], ecx
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+0Ch], 0

loc_804A9A:
pop	edi
mov	dword ptr [esi], offset	off_14644D8
pop	esi
retn
sub_804A40 endp

align 10h



sub_804AB0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+18h]
call	edx
xor	ebx, ebx
mov	ebp, eax
cmp	[esi+14h], bl
jz	short loc_804B23
mov	esi, [esi+18h]
mov	eax, [esi+4]
mov	ecx, [esi]
push	edi
push	eax
push	ecx
lea	ecx, [esp+24h+var_C]
mov	[esp+24h+var_C], ebx
mov	[esp+24h+var_8], ebx
mov	[esp+24h+var_4], ebx
call	sub_8048E0
mov	edi, [esp+1Ch+var_8]
xor	esi, esi
cmp	edi, ebx
mov	ebx, [esp+1Ch+var_C]
jbe	short loc_804B0B

loc_804AF6:
mov	ecx, [ebx+esi*4]
mov	eax, [esp+1Ch+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	ebp
call	edx
inc	esi
cmp	esi, edi
jb	short loc_804AF6

loc_804B0B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4

loc_804B23:
cmp	[esi+18h], ebx
jz	short loc_804B38
mov	ecx, [esi+18h]
mov	edx, [esp+18h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	ebp
call	eax

loc_804B38:
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4
sub_804AB0 endp

align 10h



sub_804B50 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, ecx
xor	ebx, ebx
cmp	[ebp+14h], bl
jz	loc_804C13
push	esi
mov	esi, [ebp+18h]
push	edi
xor	edi, edi
cmp	[esi+4], ebx
jbe	short loc_804BDB
jmp	short loc_804B70
align 10h

loc_804B70:
mov	eax, [esi]
mov	ecx, [esp+10h+arg_0]
cmp	[eax+edi*4], ecx
jnz	short loc_804BD2
mov	eax, [esi+4]
cmp	eax, 1
jnz	short loc_804BAA
test	dword ptr [esi+8], 0FFFFFFFEh
jbe	short loc_804BA5
mov	eax, [esi]
cmp	eax, ebx
jz	short loc_804BA2
mov	ecx, dword_1855FC0
mov	edx, [ecx]
push	eax
mov	eax, [edx+30h]
call	eax
mov	[esi], ebx

loc_804BA2:
mov	[esi+8], ebx

loc_804BA5:
mov	[esi+4], ebx
jmp	short loc_804BC9

loc_804BAA:
mov	ecx, [esi]
sub	eax, edi
lea	ecx, [ecx+edi*4]
lea	edx, ds:0FFFFFFFCh[eax*4]
push	edx
lea	eax, [ecx+4]
push	eax
push	ecx
call	unknown_libname_19 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
dec	dword ptr [esi+4]

loc_804BC9:
mov	esi, [ebp+18h]
cmp	dword ptr [esi+4], 1
jz	short loc_804BE2

loc_804BD2:
mov	ecx, [ebp+18h]
inc	edi
cmp	edi, [ecx+4]
jb	short loc_804B70

loc_804BDB:
pop	edi
pop	esi

loc_804BDD:
pop	ebp
pop	ebx
retn	4

loc_804BE2:
mov	edx, [esi]
mov	edi, [edx]
cmp	esi, ebx
jz	short loc_804C06
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	eax, [eax+30h]
push	edx
call	eax
mov	ecx, dword_1855FC0
mov	edx, [ecx]
mov	eax, [edx+30h]
push	esi
call	eax

loc_804C06:
mov	[ebp+18h], edi
pop	edi
pop	esi
mov	[ebp+14h], bl
pop	ebp
pop	ebx
retn	4

loc_804C13:
mov	ecx, [ebp+18h]
cmp	ecx, [esp+8+arg_0]
jnz	short loc_804BDD
mov	[ebp+18h], ebx
pop	ebp
pop	ebx
retn	4
sub_804B50 endp

align 10h



sub_804C30 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
mov	edx, [eax+8]
call	edx
xor	ebx, ebx
mov	ebp, eax
cmp	[esi+14h], bl
jz	short loc_804CA3
mov	esi, [esi+18h]
mov	eax, [esi+4]
mov	ecx, [esi]
push	edi
push	eax
push	ecx
lea	ecx, [esp+24h+var_C]
mov	[esp+24h+var_C], ebx
mov	[esp+24h+var_8], ebx
mov	[esp+24h+var_4], ebx
call	sub_8048E0
mov	edi, [esp+1Ch+var_8]
xor	esi, esi
cmp	edi, ebx
mov	ebx, [esp+1Ch+var_C]
jbe	short loc_804C8B

loc_804C76:
mov	ecx, [ebx+esi*4]
mov	eax, [esp+1Ch+arg_0]
mov	edx, [ecx]
mov	edx, [edx+4]
push	eax
push	ebp
call	edx
inc	esi
cmp	esi, edi
jb	short loc_804C76

loc_804C8B:
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	ebx
call	edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4

loc_804CA3:
cmp	[esi+18h], ebx
jz	short loc_804CB8
mov	ecx, [esi+18h]
mov	edx, [esp+18h+arg_0]
mov	eax, [ecx]
mov	eax, [eax+4]
push	edx
push	ebp
call	eax

loc_804CB8:
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4
sub_804C30 endp

align 10h



sub_804CD0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_804A40
test	[esp+4+arg_0], 1
jz	short loc_804CED
mov	ecx, dword_1855FC0
mov	eax, [ecx]
mov	edx, [eax+30h]
push	esi
call	edx

loc_804CED:
mov	eax, esi
pop	esi
retn	4
sub_804CD0 endp

align 10h



; int __cdecl sub_804D00(void *, int, int)
sub_804D00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
xor	edi, edi
mov	[esi+4], edi
cmp	eax, 3Eh
jz	short loc_804D37
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 0Ch
mov	edx, [esi]
mov	dword ptr [edx+18h], 3Eh
mov	ecx, [esi]
mov	[ecx+1Ch], eax
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_804D37:
mov	eax, [esp+10h+arg_8]
cmp	eax, 1B0h
jz	short loc_804D63
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 15h
mov	edx, [esi]
mov	dword ptr [edx+18h], 1B0h
mov	ecx, [esi]
mov	[ecx+1Ch], eax
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_804D63:
mov	ebx, [esi]
mov	ebp, [esi+0Ch]
push	1B0h		; size_t
push	edi		; int
push	esi		; void *
call	_memset
push	esi
mov	[esi], ebx
mov	[esi+0Ch], ebp
mov	byte ptr [esi+10h], 1
call	sub_8096E0
mov	[esi+8], edi
mov	[esi+18h], edi
mov	[esi+90h], edi
mov	[esi+94h], edi
mov	[esi+98h], edi
mov	[esi+9Ch], edi
mov	[esi+0A0h], edi
mov	[esi+0B0h], edi
mov	[esi+0A4h], edi
mov	[esi+0B4h], edi
mov	[esi+0A8h], edi
mov	[esi+0B8h], edi
mov	[esi+0ACh], edi
mov	[esi+0BCh], edi
push	esi
mov	[esi+10Ch], edi
call	sub_806B50
push	esi
call	sub_808B80
add	esp, 18h
pop	edi
mov	dword ptr [esi+14h], 0C8h
pop	esi
pop	ebp
pop	ebx
retn
sub_804D00 endp

align 10h


; Attributes: thunk

sub_804E00 proc	near
jmp	sub_809850
sub_804E00 endp

align 10h



sub_804E10 proc	near
mov	eax, [esi+24h]
push	ebx
push	ebp
mov	ebp, 1
sub	eax, ebp
push	edi
lea	ebx, [ebp-1]
jz	loc_804F8A
sub	eax, 2
jz	short loc_804E93
sub	eax, ebp
jz	short loc_804E3A
mov	[esi+28h], ebx
mov	[esi+2Ch], ebx
jmp	loc_804F90

loc_804E3A:
mov	edi, 4
cmp	[esi+108h], bl
jz	short loc_804E88
movzx	eax, byte ptr [esi+109h]
sub	eax, ebx
jz	short loc_804E88
sub	eax, 2
jz	short loc_804E79
mov	eax, [esi]
mov	dword ptr [eax+14h], 72h
movzx	ecx, byte ptr [esi+109h]
mov	edx, [esi]
mov	[edx+18h], ecx
mov	eax, [esi]
mov	ecx, [eax+4]
push	0FFFFFFFFh
push	esi
call	ecx
add	esp, 8

loc_804E79:
mov	dword ptr [esi+28h], 5
mov	[esi+2Ch], edi
jmp	loc_804F90

loc_804E88:
mov	[esi+28h], edi
mov	[esi+2Ch], edi
jmp	loc_804F90

loc_804E93:
cmp	[esi+100h], bl
jz	short loc_804EB3

loc_804E9B:
mov	dword ptr [esi+28h], 3
mov	dword ptr [esi+2Ch], 2
mov	ebp, 1
jmp	loc_804F90

loc_804EB3:
cmp	[esi+108h], bl
jz	short loc_804F04
movzx	eax, byte ptr [esi+109h]
sub	eax, ebx
jz	short loc_804F41
sub	eax, ebp
jz	short loc_804E9B
mov	edx, [esi]
mov	dword ptr [edx+14h], 72h
movzx	eax, byte ptr [esi+109h]
mov	ecx, [esi]
mov	[ecx+18h], eax
mov	edx, [esi]
mov	eax, [edx+4]
push	0FFFFFFFFh
push	esi
call	eax
mov	dword ptr [esi+28h], 3
add	esp, 8
mov	dword ptr [esi+2Ch], 2
mov	ebp, 1
jmp	loc_804F90

loc_804F04:
mov	eax, [esi+0C4h]
mov	ecx, [eax]
mov	edx, [eax+54h]
mov	edi, [eax+0A8h]
mov	ebp, 3
cmp	ecx, 1
jnz	short loc_804F32
cmp	edx, 2
jnz	short loc_804F56
cmp	edi, ebp
jnz	short loc_804F56
mov	[esi+28h], ebp
mov	[esi+2Ch], edx
mov	ebp, ecx
jmp	short loc_804F90

loc_804F32:
cmp	ecx, 52h
jnz	short loc_804F56
cmp	edx, 47h
jnz	short loc_804F56
cmp	edi, 42h
jnz	short loc_804F56

loc_804F41:
mov	dword ptr [esi+28h], 2
mov	dword ptr [esi+2Ch], 2
mov	ebp, 1
jmp	short loc_804F90

loc_804F56:
mov	eax, [esi]
add	eax, 18h
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], edi
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 6Fh
mov	edx, [esi]
mov	eax, [edx+4]
push	1
push	esi
call	eax
mov	[esi+28h], ebp
add	esp, 8
mov	dword ptr [esi+2Ch], 2
mov	ebp, 1
jmp	short loc_804F90

loc_804F8A:
mov	[esi+28h], ebp
mov	[esi+2Ch], ebp

loc_804F90:
fld1
pop	edi
mov	[esi+30h], ebp
fstp	qword ptr [esi+38h]
mov	[esi+34h], ebp
pop	ebp
mov	[esi+40h], bl
mov	[esi+41h], bl
mov	[esi+44h], ebx
mov	[esi+4Ah], bl
mov	[esi+74h], ebx
mov	[esi+58h], bl
mov	[esi+59h], bl
mov	[esi+5Ah], bl
mov	byte ptr [esi+48h], 1
mov	byte ptr [esi+49h], 1
mov	dword ptr [esi+4Ch], 2
mov	byte ptr [esi+50h], 1
mov	dword ptr [esi+54h], 100h
pop	ebx
retn
sub_804E10 endp

db 1Fh dup(0CCh)



sub_804FF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+14h]
push	edi
add	eax, 0FFFFFF38h
xor	edi, edi
cmp	eax, 0Ah	; switch 11 cases
ja	short loc_805071 ; default
			; jumptable 0080500C case 9
movzx	eax, ds:byte_8050A8[eax]
jmp	ds:off_805094[eax*4] ; switch jump

loc_805013:		; jumptable 0080500C case 0
mov	ecx, [esi+190h]
mov	edx, [ecx+4]
push	esi
call	edx
mov	eax, [esi+18h]
mov	ecx, [eax+8]
push	esi
call	ecx
add	esp, 8
mov	dword ptr [esi+14h], 0C9h

loc_805032:		; jumptable 0080500C case 1
mov	edx, [esi+190h]
mov	eax, [edx]
push	esi
call	eax
mov	edi, eax
add	esp, 4
cmp	edi, 1
jnz	short loc_80508C
call	sub_804E10
mov	eax, edi
pop	edi
mov	dword ptr [esi+14h], 0CAh
pop	esi
retn

loc_805058:		; jumptable 0080500C case 2
pop	edi
mov	eax, 1
pop	esi
retn

loc_805060:		; jumptable 0080500C cases 3-8,10
mov	ecx, [esi+190h]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4
pop	edi
pop	esi
retn

loc_805071:		; default
mov	eax, [esi]	; jumptable 0080500C case 9
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80508C:
mov	eax, edi
pop	edi
pop	esi
retn
sub_804FF0 endp

align 4
off_805094 dd offset loc_805013	; jump table for switch	statement
dd offset loc_805032
dd offset loc_805058
dd offset loc_805060
dd offset loc_805071
byte_8050A8 db	    0,	   1,	  2,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     4,     3
align 10h



sub_8050C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+14h]
cmp	eax, 0CDh
jz	short loc_8050D6
cmp	eax, 0CEh
jnz	short loc_80510C

loc_8050D6:
cmp	byte ptr [esi+40h], 0
jnz	short loc_80510C
mov	eax, [esi+78h]
cmp	eax, [esi+60h]
jnb	short loc_8050F7
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 43h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_8050F7:
mov	ecx, [esi+180h]
mov	edx, [ecx+4]
push	esi
call	edx
mov	dword ptr [esi+14h], 0D2h
jmp	short loc_80513B

loc_80510C:
cmp	eax, 0CFh
jnz	short loc_80511C
mov	dword ptr [esi+14h], 0D2h
jmp	short loc_80513E

loc_80511C:
cmp	eax, 0D2h
jz	short loc_80513E
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx

loc_80513B:
add	esp, 4

loc_80513E:
mov	edx, [esi+190h]
cmp	byte ptr [edx+11h], 0
jnz	short loc_80516E
lea	ebx, [ebx+0]

loc_805150:
mov	eax, [esi+190h]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
test	eax, eax
jz	short loc_805184
mov	edx, [esi+190h]
cmp	byte ptr [edx+11h], 0
jz	short loc_805150

loc_80516E:
mov	eax, [esi+18h]
mov	ecx, [eax+18h]
push	esi
call	ecx
push	esi
call	sub_809810
add	esp, 8
mov	al, 1
pop	esi
retn

loc_805184:
xor	al, al
pop	esi
retn
sub_8050C0 endp

align 10h



sub_805190 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+14h]
cmp	eax, 0C8h
jz	short loc_8051C1
cmp	eax, 0C9h
jz	short loc_8051C1
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8051C1:
push	esi
call	sub_804FF0
mov	ecx, eax
add	esp, 4
sub	ecx, 1
jz	short loc_8051FF
sub	ecx, 1
jnz	short loc_805204
cmp	[esp+4+arg_4], cl
jz	short loc_8051EF
mov	edx, [esi]
mov	dword ptr [edx+14h], 33h
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8051EF:
push	esi
call	sub_809810
add	esp, 4
mov	eax, 2
pop	esi
retn

loc_8051FF:
mov	eax, 1

loc_805204:
pop	esi
retn
sub_805190 endp

align 10h



sub_805210 proc	near
mov	eax, [esi]
push	ebx
mov	dword ptr [eax+14h], 66h
mov	ecx, [esi]
mov	edx, [ecx+4]
push	1
push	esi
call	edx
mov	eax, [esi+194h]
xor	ebx, ebx
add	esp, 8
cmp	[eax+0Ch], bl
jz	short loc_805247
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 3Dh
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_805247:
lea	eax, [esi+0DAh]
mov	ecx, 10h
mov	dl, 5

loc_805254:
mov	[eax-10h], bl
mov	byte ptr [eax],	1
mov	[eax+10h], dl
inc	eax
sub	ecx, 1
jnz	short loc_805254
mov	eax, [esi+194h]
mov	ecx, 1
mov	edx, ecx
mov	[esi+0FCh], ebx
mov	[esi+28h], ebx
mov	[esi+10Ah], bl
mov	[esi+100h], bl
mov	[esi+103h], bl
mov	[esi+108h], bl
mov	[esi+109h], bl
mov	byte ptr [esi+101h], 1
mov	byte ptr [esi+102h], 1
mov	[esi+104h], cx
mov	[esi+106h], dx
mov	[eax+0Ch], cl
mov	al, cl
pop	ebx
retn
sub_805210 endp

align 10h



sub_8052C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esi+18h]
mov	ebx, [ebp+4]
push	edi
mov	edi, [ebp+0]
mov	[esp+14h+var_4], ebp
mov	[esi+0C8h], al
mov	[esi+0C9h], cl
test	ebx, ebx
jnz	short loc_8052FF
mov	edx, [ebp+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_8052F9

loc_8052F0:
pop	edi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn

loc_8052F9:
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_8052FF:
movzx	eax, byte ptr [edi]
dec	ebx
shl	eax, 8
inc	edi
mov	[esp+14h+var_8], eax
test	ebx, ebx
jnz	short loc_805322
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	short loc_8052F0
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_805322:
movzx	ecx, byte ptr [edi]
add	[esp+14h+var_8], ecx
dec	ebx
inc	edi
test	ebx, ebx
jnz	short loc_805342
mov	edx, [ebp+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jz	short loc_8052F0
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_805342:
movzx	eax, byte ptr [edi]
dec	ebx
inc	edi
mov	[esi+0C0h], eax
test	ebx, ebx
jnz	short loc_805364
mov	ecx, [ebp+0Ch]
push	esi
call	ecx
add	esp, 4
test	al, al
jz	short loc_8052F0
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_805364:
movzx	edx, byte ptr [edi]
dec	ebx
shl	edx, 8
inc	edi
mov	[esi+20h], edx
test	ebx, ebx
jnz	short loc_80538A
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	loc_8052F0
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_80538A:
movzx	ecx, byte ptr [edi]
add	[esi+20h], ecx
dec	ebx
inc	edi
test	ebx, ebx
jnz	short loc_8053AD
mov	edx, [ebp+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jz	loc_8052F0
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_8053AD:
movzx	eax, byte ptr [edi]
dec	ebx
shl	eax, 8
inc	edi
mov	[esi+1Ch], eax
test	ebx, ebx
jnz	short loc_8053D3
mov	ecx, [ebp+0Ch]
push	esi
call	ecx
add	esp, 4
test	al, al
jz	loc_8052F0
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_8053D3:
movzx	edx, byte ptr [edi]
add	[esi+1Ch], edx
dec	ebx
inc	edi
test	ebx, ebx
jnz	short loc_8053F6
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	loc_8052F0
mov	edi, [ebp+0]
mov	ebx, [ebp+4]

loc_8053F6:
movzx	ecx, byte ptr [edi]
mov	eax, [esi]
mov	edx, [esi+17Ch]
sub	[esp+14h+var_8], 8
mov	[esi+24h], ecx
add	eax, 18h
mov	[eax], edx
mov	ecx, [esi+1Ch]
mov	[eax+4], ecx
mov	edx, [esi+20h]
mov	[eax+8], edx
mov	ecx, [esi+24h]
mov	[eax+0Ch], ecx
mov	edx, [esi]
mov	dword ptr [edx+14h], 64h
mov	eax, [esi]
mov	ecx, [eax+4]
push	1
push	esi
dec	ebx
inc	edi
call	ecx
mov	edx, [esi+194h]
add	esp, 8
cmp	byte ptr [edx+0Dh], 0
jz	short loc_805457
mov	eax, [esi]
mov	dword ptr [eax+14h], 3Ah
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_805457:
cmp	dword ptr [esi+20h], 0
jbe	short loc_805469
cmp	dword ptr [esi+1Ch], 0
jbe	short loc_805469
cmp	dword ptr [esi+24h], 0
jg	short loc_80547C

loc_805469:
mov	eax, [esi]
mov	dword ptr [eax+14h], 20h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80547C:
mov	eax, [esi+24h]
lea	eax, [eax+eax*2]
cmp	[esp+14h+var_8], eax
jz	short loc_80549B
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 0Bh
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80549B:
cmp	dword ptr [esi+0C4h], 0
jnz	short loc_8054BE
mov	edx, [esi+24h]
mov	ecx, [esi+4]
imul	edx, 54h
mov	eax, [ecx]
push	edx
push	1
push	esi
call	eax
add	esp, 0Ch
mov	[esi+0C4h], eax

loc_8054BE:
cmp	dword ptr [esi+24h], 0
mov	ebp, [esi+0C4h]
mov	[esp+14h+var_8], 0
jle	loc_8055A4

loc_8054D6:
mov	ecx, [esp+14h+var_8]
mov	[ebp+4], ecx
test	ebx, ebx
jnz	short loc_8054FB
mov	ebx, [esp+14h+var_4]
mov	edx, [ebx+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jz	loc_8052F0
mov	edi, [ebx]
mov	ebx, [ebx+4]

loc_8054FB:
movzx	eax, byte ptr [edi]
dec	ebx
inc	edi
mov	[ebp+0], eax
test	ebx, ebx
jnz	short loc_805521
mov	ebx, [esp+14h+var_4]
mov	ecx, [ebx+0Ch]
push	esi
call	ecx
add	esp, 4
test	al, al
jz	loc_8052F0
mov	edi, [ebx]
mov	ebx, [ebx+4]

loc_805521:
movzx	eax, byte ptr [edi]
mov	edx, eax
sar	edx, 4
dec	ebx
and	edx, 0Fh
and	eax, 0Fh
inc	edi
mov	[ebp+8], edx
mov	[ebp+0Ch], eax
test	ebx, ebx
jnz	short loc_805555
mov	ebx, [esp+14h+var_4]
mov	eax, [ebx+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	loc_8052F0
mov	edi, [ebx]
mov	ebx, [ebx+4]

loc_805555:
movzx	ecx, byte ptr [edi]
mov	edx, [ebp+0]
mov	[ebp+10h], ecx
mov	eax, [esi]
add	eax, 18h
mov	[eax], edx
mov	ecx, [ebp+8]
mov	[eax+4], ecx
mov	edx, [ebp+0Ch]
mov	[eax+8], edx
mov	ecx, [ebp+10h]
mov	[eax+0Ch], ecx
mov	edx, [esi]
mov	dword ptr [edx+14h], 65h
mov	eax, [esi]
mov	ecx, [eax+4]
push	1
push	esi
dec	ebx
inc	edi
call	ecx
mov	eax, [esp+1Ch+var_8]
inc	eax
add	esp, 8
add	ebp, 54h
cmp	eax, [esi+24h]
mov	[esp+14h+var_8], eax
jl	loc_8054D6

loc_8055A4:
mov	edx, [esi+194h]
mov	eax, [esp+14h+var_4]
mov	byte ptr [edx+0Dh], 1
mov	[eax], edi
pop	edi
mov	[eax+4], ebx
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn
sub_8052C0 endp




sub_8055C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 18h
mov	eax, [esi+194h]
cmp	byte ptr [eax+0Dh], 0
push	ebx
push	ebp
mov	ebp, [esi+18h]
mov	ebx, [ebp+0]
push	edi
mov	edi, [ebp+4]
mov	[esp+24h+var_4], ebp
jnz	short loc_8055F2
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 3Eh
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_8055F2:
test	edi, edi
jnz	short loc_805614
mov	ecx, [ebp+0Ch]
push	esi
call	ecx
add	esp, 4
test	al, al
jnz	short loc_80560C

loc_805603:
pop	edi
pop	ebp
xor	al, al
pop	ebx
add	esp, 18h
retn

loc_80560C:
mov	edx, [ebp+4]
mov	ebx, [ebp+0]
mov	edi, edx

loc_805614:
movzx	eax, byte ptr [ebx]
dec	edi
shl	eax, 8
inc	ebx
mov	[esp+24h+var_14], eax
test	edi, edi
jnz	short loc_80563D
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	short loc_805603
mov	ecx, [ebp+4]
mov	ebx, [ebp+0]
mov	eax, [esp+24h+var_14]
mov	edi, ecx

loc_80563D:
movzx	edx, byte ptr [ebx]
dec	edi
add	eax, edx
inc	ebx
mov	[esp+24h+var_14], eax
test	edi, edi
jnz	short loc_805661
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	short loc_805603
mov	ecx, [ebp+4]
mov	ebx, [ebp+0]
mov	edi, ecx

loc_805661:
movzx	eax, byte ptr [ebx]
mov	edx, [esi]
mov	dword ptr [edx+14h], 67h
mov	ecx, [esi]
mov	[ecx+18h], eax
mov	edx, [esi]
mov	[esp+24h+var_C], eax
mov	eax, [edx+4]
push	1
push	esi
dec	edi
inc	ebx
call	eax
mov	eax, [esp+2Ch+var_C]
lea	ecx, [eax+eax+6]
add	esp, 8
cmp	[esp+24h+var_14], ecx
jnz	short loc_80569D
cmp	eax, 1
jl	short loc_80569D
cmp	eax, 4
jle	short loc_8056B4

loc_80569D:
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Bh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
mov	eax, [esp+28h+var_C]
add	esp, 4

loc_8056B4:
mov	[esi+124h], eax
mov	[esp+24h+var_8], 0
test	eax, eax
jle	loc_8057C6
lea	edx, [esi+128h]
mov	[esp+24h+var_10], edx

loc_8056D4:
test	edi, edi
jnz	short loc_8056F5
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	loc_805603
mov	ecx, [ebp+4]
mov	ebx, [ebp+0]
mov	[esp+24h+var_18], ecx
mov	edi, ecx

loc_8056F5:
movzx	edx, byte ptr [ebx]
dec	edi
inc	ebx
mov	[esp+24h+var_14], edx
test	edi, edi
jnz	short loc_80571F
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	loc_805603
mov	ecx, [ebp+4]
mov	ebx, [ebp+0]
mov	[esp+24h+var_18], ecx
mov	edi, ecx

loc_80571F:
movzx	ebp, byte ptr [ebx]
dec	edi
xor	eax, eax
inc	ebx
cmp	[esi+24h], eax
mov	[esp+24h+var_18], edi
mov	edi, [esi+0C4h]
jle	short loc_805746

loc_805735:
mov	edx, [esp+24h+var_14]
cmp	edx, [edi]
jz	short loc_805762
inc	eax
add	edi, 54h
cmp	eax, [esi+24h]
jl	short loc_805735

loc_805746:
mov	eax, [esi]
mov	edx, [esp+24h+var_14]
mov	dword ptr [eax+14h], 5
mov	ecx, [esi]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_805762:
mov	edx, [esp+24h+var_10]
mov	ecx, [esp+24h+var_14]
mov	[edx], edi
mov	eax, ebp
sar	eax, 4
and	eax, 0Fh
mov	[edi+14h], eax
and	ebp, 0Fh
mov	[edi+18h], ebp
mov	eax, [esi]
add	eax, 18h
mov	[eax], ecx
mov	edx, [edi+14h]
mov	[eax+4], edx
mov	ecx, [edi+18h]
mov	[eax+8], ecx
mov	edx, [esi]
mov	dword ptr [edx+14h], 68h
mov	eax, [esi]
mov	ecx, [eax+4]
push	1
push	esi
call	ecx
mov	eax, [esp+2Ch+var_8]
add	[esp+2Ch+var_10], 4
mov	edi, [esp+2Ch+var_18]
mov	ebp, [esp+2Ch+var_4]
inc	eax
add	esp, 8
cmp	eax, [esp+24h+var_C]
mov	[esp+24h+var_8], eax
jl	loc_8056D4

loc_8057C6:
test	edi, edi
jnz	short loc_8057E7
mov	edx, [ebp+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jz	loc_805603
mov	eax, [ebp+4]
mov	ebx, [ebp+0]
mov	[esp+24h+var_18], eax
mov	edi, eax

loc_8057E7:
movzx	eax, byte ptr [ebx]
dec	edi
inc	ebx
mov	[esi+16Ch], eax
test	edi, edi
jnz	short loc_805813
mov	ecx, [ebp+0Ch]
push	esi
call	ecx
add	esp, 4
test	al, al
jz	loc_805603
mov	edx, [ebp+4]
mov	ebx, [ebp+0]
mov	[esp+24h+var_18], edx
mov	edi, edx

loc_805813:
movzx	eax, byte ptr [ebx]
dec	edi
inc	ebx
mov	[esi+170h], eax
test	edi, edi
jnz	short loc_80583F
mov	eax, [ebp+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jz	loc_805603
mov	ecx, [ebp+4]
mov	ebx, [ebp+0]
mov	[esp+24h+var_18], ecx
mov	edi, ecx

loc_80583F:
movzx	eax, byte ptr [ebx]
mov	ecx, [esi+16Ch]
mov	edx, eax
and	eax, 0Fh
mov	[esi+178h], eax
mov	eax, [esi]
sar	edx, 4
and	edx, 0Fh
mov	[esi+174h], edx
add	eax, 18h
mov	[eax], ecx
mov	edx, [esi+170h]
mov	[eax+4], edx
mov	ecx, [esi+174h]
mov	[eax+8], ecx
mov	edx, [esi+178h]
mov	[eax+0Ch], edx
mov	eax, [esi]
mov	dword ptr [eax+14h], 69h
mov	ecx, [esi]
mov	edx, [ecx+4]
push	1
push	esi
call	edx
mov	eax, [esi+194h]
mov	dword ptr [eax+10h], 0
inc	dword ptr [esi+7Ch]
add	esp, 8
inc	ebx
dec	edi
mov	[ebp+4], edi
pop	edi
mov	[ebp+0], ebx
pop	ebp
mov	al, 1
pop	ebx
add	esp, 18h
retn
sub_8055C0 endp

align 10h



sub_8058C0 proc	near

var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= byte ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
arg_0= dword ptr  4

sub	esp, 128h
push	ebx
push	ebp
mov	ebp, [esp+130h+arg_0]
push	esi
push	edi
mov	edi, [ebp+18h]
mov	esi, [edi+4]
mov	ebx, [edi]
mov	[esp+138h+var_108], edi
test	esi, esi
jnz	short loc_805902
mov	eax, [edi+0Ch]
push	ebp
call	eax
add	esp, 4
test	al, al
jnz	short loc_8058FB

loc_8058EE:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 128h
retn

loc_8058FB:
mov	ecx, [edi+4]
mov	ebx, [edi]
mov	esi, ecx

loc_805902:
movzx	eax, byte ptr [ebx]
dec	esi
shl	eax, 8
inc	ebx
mov	[esp+138h+var_124], eax
test	esi, esi
jnz	short loc_80592A
mov	edx, [edi+0Ch]
push	ebp
call	edx
add	esp, 4
test	al, al
jz	short loc_8058EE
mov	eax, [edi+4]
mov	ebx, [edi]
mov	esi, eax
mov	eax, [esp+138h+var_124]

loc_80592A:
movzx	ecx, byte ptr [ebx]
add	eax, ecx
sub	eax, 2
dec	esi
inc	ebx
cmp	eax, 10h
mov	[esp+138h+var_124], eax
jle	loc_805B8B

loc_805941:
test	esi, esi
jnz	short loc_80595D
mov	edx, [edi+0Ch]
push	ebp
call	edx
add	esp, 4
test	al, al
jz	short loc_8058EE
mov	eax, [edi+4]
mov	ebx, [edi]
mov	[esp+138h+var_128], eax
mov	esi, eax

loc_80595D:
movzx	eax, byte ptr [ebx]
mov	ecx, [ebp+0]
mov	dword ptr [ecx+14h], 50h
mov	edx, [ebp+0]
mov	[edx+18h], eax
mov	[esp+138h+var_104], eax
mov	eax, [ebp+0]
mov	ecx, [eax+4]
push	1
push	ebp
dec	esi
inc	ebx
call	ecx
add	esp, 8
mov	byte ptr [esp+138h+var_11C], 0
mov	[esp+138h+var_120], 0
mov	edi, 1

loc_805996:
test	esi, esi
jnz	short loc_8059B6
mov	esi, [esp+138h+var_108]
mov	edx, [esi+0Ch]
push	ebp
call	edx
add	esp, 4
test	al, al
jz	loc_8058EE
mov	eax, [esi+4]
mov	ebx, [esi]
mov	esi, eax

loc_8059B6:
mov	cl, [ebx]
movzx	edx, cl
add	[esp+138h+var_120], edx
mov	byte ptr [esp+edi+138h+var_11C], cl
dec	esi
inc	edi
inc	ebx
cmp	edi, 10h
mov	[esp+138h+var_128], esi
jle	short loc_805996
mov	eax, [ebp+0]
movzx	ecx, byte ptr [esp+138h+var_11C+1]
movzx	edx, byte ptr [esp+138h+var_11C+2]
add	eax, 18h
sub	[esp+138h+var_124], 11h
mov	[eax], ecx
movzx	ecx, byte ptr [esp+138h+var_11C+3]
mov	[eax+4], edx
movzx	edx, byte ptr [esp+138h+var_118]
mov	[eax+8], ecx
movzx	ecx, byte ptr [esp+138h+var_118+1]
mov	[eax+0Ch], edx
movzx	edx, byte ptr [esp+138h+var_118+2]
mov	[eax+10h], ecx
movzx	ecx, byte ptr [esp+138h+var_118+3]
mov	[eax+14h], edx
movzx	edx, byte ptr [esp+138h+var_114]
mov	[eax+18h], ecx
mov	[eax+1Ch], edx
mov	eax, [ebp+0]
mov	edi, 56h
mov	[eax+14h], edi
mov	ecx, [ebp+0]
mov	edx, [ecx+4]
push	2
push	ebp
call	edx
mov	eax, [ebp+0]
movzx	ecx, byte ptr [esp+140h+var_114+1]
movzx	edx, byte ptr [esp+140h+var_114+2]
add	eax, 18h
mov	[eax], ecx
movzx	ecx, byte ptr [esp+140h+var_114+3]
mov	[eax+4], edx
movzx	edx, byte ptr [esp+140h+var_110]
mov	[eax+8], ecx
movzx	ecx, byte ptr [esp+140h+var_110+1]
mov	[eax+0Ch], edx
movzx	edx, byte ptr [esp+140h+var_110+2]
mov	[eax+10h], ecx
movzx	ecx, byte ptr [esp+140h+var_110+3]
mov	[eax+14h], edx
movzx	edx, [esp+140h+var_10C]
mov	[eax+18h], ecx
mov	[eax+1Ch], edx
mov	eax, [ebp+0]
mov	[eax+14h], edi
mov	ecx, [ebp+0]
mov	edx, [ecx+4]
push	2
push	ebp
call	edx
mov	eax, [esp+148h+var_120]
add	esp, 10h
cmp	eax, 100h
jg	short loc_805A99
cmp	eax, [esp+138h+var_124]
jle	short loc_805AAE

loc_805A99:
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 8
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
add	esp, 4

loc_805AAE:
mov	eax, [esp+138h+var_120]
xor	edi, edi
test	eax, eax
jle	short loc_805AED

loc_805AB8:
test	esi, esi
jnz	short loc_805ADC
mov	esi, [esp+138h+var_108]
mov	eax, [esi+0Ch]
push	ebp
call	eax
add	esp, 4
test	al, al
jz	loc_8058EE
mov	ecx, [esi+4]
mov	ebx, [esi]
mov	eax, [esp+138h+var_120]
mov	esi, ecx

loc_805ADC:
mov	dl, [ebx]
mov	[esp+edi+138h+var_100],	dl
dec	esi
inc	edi
inc	ebx
cmp	edi, eax
mov	[esp+138h+var_128], esi
jl	short loc_805AB8

loc_805AED:
sub	[esp+138h+var_124], eax
mov	eax, [esp+138h+var_104]
test	al, 10h
jz	short loc_805B05
sub	eax, 10h
lea	esi, [ebp+eax*4+0B0h]
jmp	short loc_805B0C

loc_805B05:
lea	esi, [ebp+eax*4+0A0h]

loc_805B0C:
test	eax, eax
jl	short loc_805B15
cmp	eax, 4
jl	short loc_805B30

loc_805B15:
mov	ecx, [ebp+0]
mov	dword ptr [ecx+14h], 1Eh
mov	edx, [ebp+0]
mov	[edx+18h], eax
mov	eax, [ebp+0]
mov	ecx, [eax]
push	ebp
call	ecx
add	esp, 4

loc_805B30:
cmp	dword ptr [esi], 0
jnz	short loc_805B40
push	ebp
call	sub_8098A0
add	esp, 4
mov	[esi], eax

loc_805B40:
mov	eax, [esi]
mov	edx, [esp+138h+var_11C]
mov	ecx, [esp+138h+var_118]
mov	[eax], edx
mov	edx, [esp+138h+var_114]
mov	[eax+4], ecx
mov	ecx, [esp+138h+var_110]
mov	[eax+8], edx
mov	dl, [esp+138h+var_10C]
mov	[eax+0Ch], ecx
mov	[eax+10h], dl
mov	edi, [esi]
add	edi, 11h
cmp	[esp+138h+var_124], 10h
mov	ecx, 40h
lea	esi, [esp+138h+var_100]
rep movsd
mov	esi, [esp+138h+var_128]
mov	edi, [esp+138h+var_108]
jg	loc_805941
mov	eax, [esp+138h+var_124]

loc_805B8B:
test	eax, eax
jz	short loc_805BA4
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 0Bh
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
add	esp, 4

loc_805BA4:
mov	[edi], ebx
mov	[edi+4], esi
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 128h
retn
sub_8058C0 endp

align 10h



sub_805BC0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 14h
push	ebx
push	ebp
push	esi
mov	esi, [edi+18h]
mov	ebp, [esi+4]
mov	ebx, [esi]
mov	[esp+20h+var_10], esi
test	ebp, ebp
jnz	short loc_805BF1
mov	eax, [esi+0Ch]
push	edi
call	eax
add	esp, 4
test	al, al
jnz	short loc_805BEC

loc_805BE3:
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 14h
retn

loc_805BEC:
mov	ebx, [esi]
mov	ebp, [esi+4]

loc_805BF1:
movzx	eax, byte ptr [ebx]
dec	ebp
shl	eax, 8
inc	ebx
mov	[esp+20h+var_14], eax
test	ebp, ebp
jnz	short loc_805C17
mov	ecx, [esi+0Ch]
push	edi
call	ecx
add	esp, 4
test	al, al
jz	short loc_805BE3
mov	ebx, [esi]
mov	ebp, [esi+4]
mov	eax, [esp+20h+var_14]

loc_805C17:
movzx	edx, byte ptr [ebx]
add	eax, edx
sub	eax, 2
dec	ebp
inc	ebx
mov	[esp+20h+var_14], eax
test	eax, eax
jle	loc_805DF1
lea	ecx, [ecx+0]

loc_805C30:
test	ebp, ebp
jnz	short loc_805C46
mov	eax, [esi+0Ch]
push	edi
call	eax
add	esp, 4
test	al, al
jz	short loc_805BE3
mov	ebx, [esi]
mov	ebp, [esi+4]

loc_805C46:
movzx	esi, byte ptr [ebx]
mov	ecx, [edi]
mov	dword ptr [ecx+14h], 51h
mov	edx, [edi]
mov	eax, esi
sar	eax, 4
and	esi, 0Fh
mov	[edx+18h], esi
mov	ecx, [edi]
mov	[ecx+1Ch], eax
mov	edx, [edi]
mov	[esp+20h+var_4], eax
mov	eax, [edx+4]
push	1
push	edi
dec	ebp
inc	ebx
call	eax
add	esp, 8
cmp	esi, 4
jl	short loc_805C94
mov	ecx, [edi]
mov	dword ptr [ecx+14h], 1Fh
mov	edx, [edi]
mov	[edx+18h], esi
mov	eax, [edi]
mov	ecx, [eax]
push	edi
call	ecx
add	esp, 4

loc_805C94:
cmp	dword ptr [edi+esi*4+90h], 0
jnz	short loc_805CAE
push	edi
call	sub_809880
add	esp, 4
mov	[edi+esi*4+90h], eax

loc_805CAE:
mov	edx, [edi+esi*4+90h]
mov	[esp+20h+var_8], edx
mov	[esp+20h+var_C], offset	dword_1465DD0

loc_805CC1:
cmp	[esp+20h+var_4], 0
jz	short loc_805D14
test	ebp, ebp
jnz	short loc_805CE6
mov	esi, [esp+20h+var_10]
mov	eax, [esi+0Ch]
push	edi
call	eax
add	esp, 4
test	al, al
jz	loc_805BE3
mov	ebx, [esi]
mov	ebp, [esi+4]

loc_805CE6:
movzx	esi, byte ptr [ebx]
dec	ebp
shl	esi, 8
inc	ebx
test	ebp, ebp
jnz	short loc_805D0D
mov	ebp, [esp+20h+var_10]
mov	ecx, [ebp+0Ch]
push	edi
call	ecx
add	esp, 4
test	al, al
jz	loc_805BE3
mov	ebx, [ebp+0]
mov	ebp, [ebp+4]

loc_805D0D:
movzx	edx, byte ptr [ebx]
add	esi, edx
jmp	short loc_805D35

loc_805D14:
test	ebp, ebp
jnz	short loc_805D32
mov	esi, [esp+20h+var_10]
mov	eax, [esi+0Ch]
push	edi
call	eax
add	esp, 4
test	al, al
jz	loc_805BE3
mov	ebx, [esi]
mov	ebp, [esi+4]

loc_805D32:
movzx	esi, byte ptr [ebx]

loc_805D35:
mov	eax, [esp+20h+var_C]
mov	ecx, [eax]
mov	edx, [esp+20h+var_8]
add	eax, 4
dec	ebp
inc	ebx
cmp	eax, offset unk_1465ED0
mov	[edx+ecx*2], si
mov	[esp+20h+var_C], eax
jl	loc_805CC1
mov	eax, [edi]
cmp	dword ptr [eax+68h], 2
jl	short loc_805DCB
mov	esi, edx
add	esi, 4
mov	[esp+20h+var_8], 8
lea	esp, [esp+0]

loc_805D70:
mov	eax, [edi]
movzx	ecx, word ptr [esi-4]
add	eax, 18h
mov	[eax], ecx
movzx	edx, word ptr [esi-2]
mov	[eax+4], edx
movzx	ecx, word ptr [esi]
mov	[eax+8], ecx
movzx	edx, word ptr [esi+2]
mov	[eax+0Ch], edx
movzx	ecx, word ptr [esi+4]
mov	[eax+10h], ecx
movzx	edx, word ptr [esi+6]
mov	[eax+14h], edx
movzx	ecx, word ptr [esi+8]
mov	[eax+18h], ecx
movzx	edx, word ptr [esi+0Ah]
mov	[eax+1Ch], edx
mov	eax, [edi]
mov	dword ptr [eax+14h], 5Dh
mov	ecx, [edi]
mov	edx, [ecx+4]
push	2
push	edi
call	edx
add	esp, 8
add	esi, 10h
sub	[esp+20h+var_8], 1
jnz	short loc_805D70

loc_805DCB:
sub	[esp+20h+var_14], 41h
cmp	[esp+20h+var_4], 0
jz	short loc_805DDC
sub	[esp+20h+var_14], 40h

loc_805DDC:
cmp	[esp+20h+var_14], 0
mov	esi, [esp+20h+var_10]
jg	loc_805C30
mov	eax, [esp+20h+var_14]
test	eax, eax

loc_805DF1:
jz	short loc_805E06
mov	eax, [edi]
mov	dword ptr [eax+14h], 0Bh
mov	ecx, [edi]
mov	edx, [ecx]
push	edi
call	edx
add	esp, 4

loc_805E06:
mov	[esi], ebx
mov	[esi+4], ebp
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 14h
retn
sub_805BC0 endp

align 10h



sub_805E20 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, [ebp+18h]
push	esi
mov	esi, [ebx]
push	edi
mov	edi, [ebx+4]
test	edi, edi
jnz	short loc_805E4D
mov	eax, [ebx+0Ch]
push	ebp
call	eax
add	esp, 4
test	al, al
jnz	short loc_805E48

loc_805E41:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_805E48:
mov	esi, [ebx]
mov	edi, [ebx+4]

loc_805E4D:
movzx	eax, byte ptr [esi]
dec	edi
shl	eax, 8
inc	esi
mov	[esp+10h+arg_0], eax
test	edi, edi
jnz	short loc_805E73
mov	ecx, [ebx+0Ch]
push	ebp
call	ecx
add	esp, 4
test	al, al
jz	short loc_805E41
mov	esi, [ebx]
mov	edi, [ebx+4]
mov	eax, [esp+10h+arg_0]

loc_805E73:
movzx	edx, byte ptr [esi]
add	eax, edx
dec	edi
inc	esi
cmp	eax, 4
jz	short loc_805E94
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 0Bh
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
add	esp, 4

loc_805E94:
test	edi, edi
jnz	short loc_805EAA
mov	eax, [ebx+0Ch]
push	ebp
call	eax
add	esp, 4
test	al, al
jz	short loc_805E41
mov	esi, [ebx]
mov	edi, [ebx+4]

loc_805EAA:
movzx	eax, byte ptr [esi]
dec	edi
shl	eax, 8
inc	esi
mov	[esp+10h+arg_0], eax
test	edi, edi
jnz	short loc_805ED4
mov	ecx, [ebx+0Ch]
push	ebp
call	ecx
add	esp, 4
test	al, al
jz	loc_805E41
mov	esi, [ebx]
mov	edi, [ebx+4]
mov	eax, [esp+10h+arg_0]

loc_805ED4:
movzx	edx, byte ptr [esi]
mov	ecx, [ebp+0]
add	eax, edx
mov	dword ptr [ecx+14h], 52h
mov	edx, [ebp+0]
mov	[edx+18h], eax
mov	[esp+10h+arg_0], eax
mov	eax, [ebp+0]
mov	ecx, [eax+4]
push	1
push	ebp
call	ecx
mov	edx, [esp+18h+arg_0]
add	esp, 8
mov	[ebp+0FCh], edx
dec	edi
inc	esi
mov	[ebx+4], edi
pop	edi
mov	[ebx], esi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_805E20 endp

align 10h



sub_805F20 proc	near
push	ebx
lea	ebx, [eax+ecx]
mov	cl, 46h
cmp	eax, 0Eh
jb	loc_80609A
cmp	byte ptr [edi],	4Ah
jnz	loc_80609A
cmp	[edi+1], cl
jnz	loc_80609A
cmp	byte ptr [edi+2], 49h
jnz	loc_80609A
cmp	[edi+3], cl
jnz	loc_80609A
cmp	byte ptr [edi+4], 0
jnz	loc_80609A
mov	byte ptr [esi+100h], 1
mov	dl, [edi+5]
mov	[esi+101h], dl
mov	al, [edi+6]
mov	[esi+102h], al
mov	cl, [edi+7]
mov	[esi+103h], cl
movzx	edx, byte ptr [edi+8]
movzx	ecx, byte ptr [edi+9]
mov	eax, 100h
imul	dx, ax
add	dx, cx
mov	[esi+104h], dx
movzx	edx, byte ptr [edi+0Ah]
movzx	ecx, byte ptr [edi+0Bh]
imul	dx, ax
add	dx, cx
cmp	byte ptr [esi+101h], 1
mov	[esi+106h], dx
jz	short loc_805FE8
mov	edx, [esi]
mov	dword ptr [edx+14h], 77h
movzx	eax, byte ptr [esi+101h]
mov	ecx, [esi]
mov	[ecx+18h], eax
movzx	edx, byte ptr [esi+102h]
mov	eax, [esi]
mov	[eax+1Ch], edx
mov	ecx, [esi]
mov	edx, [ecx+4]
push	0FFFFFFFFh
push	esi
call	edx
add	esp, 8

loc_805FE8:
mov	eax, [esi]
movzx	ecx, byte ptr [esi+101h]
add	eax, 18h
mov	[eax], ecx
movzx	edx, byte ptr [esi+102h]
mov	[eax+4], edx
movzx	ecx, word ptr [esi+104h]
mov	[eax+8], ecx
movzx	edx, word ptr [esi+106h]
mov	[eax+0Ch], edx
movzx	ecx, byte ptr [esi+103h]
mov	[eax+10h], ecx
mov	edx, [esi]
mov	dword ptr [edx+14h], 57h
mov	eax, [esi]
mov	ecx, [eax+4]
push	1
push	esi
call	ecx
mov	dl, [edi+0Ch]
add	esp, 8
or	dl, [edi+0Dh]
jz	short loc_806064
mov	eax, [esi]
mov	dword ptr [eax+14h], 5Ah
movzx	ecx, byte ptr [edi+0Ch]
mov	edx, [esi]
mov	[edx+18h], ecx
movzx	eax, byte ptr [edi+0Dh]
mov	ecx, [esi]
mov	[ecx+1Ch], eax
mov	edx, [esi]
mov	eax, [edx+4]
push	1
push	esi
call	eax
add	esp, 8

loc_806064:
movzx	eax, byte ptr [edi+0Ch]
movzx	ecx, byte ptr [edi+0Dh]
imul	eax, ecx
sub	ebx, 0Eh
lea	edx, [eax+eax*2]
cmp	ebx, edx
jz	loc_806173
mov	eax, [esi]
mov	dword ptr [eax+14h], 58h
mov	ecx, [esi]
mov	[ecx+18h], ebx
mov	edx, [esi]
mov	eax, [edx+4]
push	1
push	esi
call	eax
add	esp, 8
pop	ebx
retn

loc_80609A:
cmp	eax, 6
jb	loc_806158
cmp	byte ptr [edi],	4Ah
jnz	loc_806158
cmp	[edi+1], cl
jnz	loc_806158
mov	al, 58h
cmp	[edi+2], al
jnz	loc_806158
cmp	[edi+3], al
jnz	loc_806158
cmp	byte ptr [edi+4], 0
jnz	loc_806158
movzx	eax, byte ptr [edi+5]
sub	eax, 10h
push	1
push	esi
jz	short loc_80613E
sub	eax, 1
jz	short loc_806124
sub	eax, 2
mov	ecx, [esi]
jz	short loc_80610C
mov	dword ptr [ecx+14h], 59h
movzx	edx, byte ptr [edi+5]
mov	eax, [esi]
mov	[eax+18h], edx
mov	ecx, [esi]
mov	[ecx+1Ch], ebx
mov	edx, [esi]
mov	eax, [edx+4]
call	eax
add	esp, 8
pop	ebx
retn

loc_80610C:
mov	dword ptr [ecx+14h], 6Eh
mov	edx, [esi]
mov	[edx+18h], ebx
mov	eax, [esi]
mov	ecx, [eax+4]
call	ecx
add	esp, 8
pop	ebx
retn

loc_806124:
mov	edx, [esi]
mov	dword ptr [edx+14h], 6Dh
mov	eax, [esi]
mov	[eax+18h], ebx
mov	ecx, [esi]
mov	edx, [ecx+4]
call	edx
add	esp, 8
pop	ebx
retn

loc_80613E:
mov	eax, [esi]
mov	dword ptr [eax+14h], 6Ch
mov	ecx, [esi]
mov	[ecx+18h], ebx
mov	edx, [esi]
mov	eax, [edx+4]
call	eax
add	esp, 8
pop	ebx
retn

loc_806158:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 4Dh
mov	edx, [esi]
mov	[edx+18h], ebx
mov	eax, [esi]
mov	ecx, [eax+4]
push	1
push	esi
call	ecx
add	esp, 8

loc_806173:
pop	ebx
retn
sub_805F20 endp

align 10h



sub_806180 proc	near

arg_0= dword ptr  4

cmp	ecx, 0Ch
jb	loc_80620B
cmp	byte ptr [eax],	41h
jnz	short loc_80620B
cmp	byte ptr [eax+1], 64h
jnz	short loc_80620B
cmp	byte ptr [eax+2], 6Fh
jnz	short loc_80620B
cmp	byte ptr [eax+3], 62h
jnz	short loc_80620B
cmp	byte ptr [eax+4], 65h
jnz	short loc_80620B
movzx	edx, byte ptr [eax+7]
movzx	ecx, byte ptr [eax+8]
push	ebx
movzx	ebx, byte ptr [eax+0Bh]
push	ebp
movzx	ebp, byte ptr [eax+5]
push	edi
movzx	edi, byte ptr [eax+9]
shl	edx, 8
add	edx, ecx
movzx	ecx, byte ptr [eax+0Ah]
movzx	eax, byte ptr [eax+6]
shl	edi, 8
add	edi, ecx
mov	ecx, [esi]
add	ecx, 18h
shl	ebp, 8
add	ebp, eax
mov	[ecx], ebp
mov	[ecx+4], edx
mov	[ecx+8], edi
mov	[ecx+0Ch], ebx
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 4Ch
mov	edx, [esi]
mov	eax, [edx+4]
push	1
push	esi
call	eax
add	esp, 8
pop	edi
pop	ebp
mov	[esi+109h], bl
mov	byte ptr [esi+108h], 1
pop	ebx
retn

loc_80620B:
mov	edx, [esi]
mov	eax, [esp+arg_0]
mov	dword ptr [edx+14h], 4Eh
mov	edx, [esi]
add	ecx, eax
mov	[edx+18h], ecx
mov	eax, [esi]
mov	ecx, [eax+4]
push	1
push	esi
call	ecx
add	esp, 8
retn
sub_806180 endp

align 10h



sub_806230 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	byte ptr -10h
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, [esp+1Ch+arg_0]
push	ebx
push	ebp
push	esi
mov	esi, [eax+18h]
mov	ebp, [esi+4]
mov	ebx, [esi]
mov	[esp+28h+var_14], esi
test	ebp, ebp
jnz	short loc_806263
push	eax
mov	eax, [esi+0Ch]
call	eax
add	esp, 4
test	al, al
jnz	short loc_80625E
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_80625E:
mov	ebx, [esi]
mov	ebp, [esi+4]

loc_806263:
push	edi
movzx	edi, byte ptr [ebx]
dec	ebp
shl	edi, 8
inc	ebx
test	ebp, ebp
jnz	short loc_80628A
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [esi+0Ch]
push	ecx
call	edx
add	esp, 4
test	al, al
jz	loc_806330
mov	ebx, [esi]
mov	ebp, [esi+4]

loc_80628A:
movzx	eax, byte ptr [ebx]
add	edi, eax
sub	edi, 2
dec	ebp
inc	ebx
cmp	edi, 0Eh
jl	short loc_8062A4
mov	eax, 0Eh
mov	[esp+2Ch+var_1C], eax
jmp	short loc_8062B4

loc_8062A4:
xor	ecx, ecx
test	edi, edi
setle	cl
dec	ecx
and	ecx, edi
mov	[esp+2Ch+var_1C], ecx
mov	eax, ecx

loc_8062B4:
xor	ecx, ecx
mov	[esp+2Ch+var_18], ecx
test	eax, eax
jbe	short loc_8062F3
mov	edi, edi

loc_8062C0:
test	ebp, ebp
jnz	short loc_8062E2
mov	edx, [esp+2Ch+arg_0]
mov	eax, [esi+0Ch]
push	edx
call	eax
add	esp, 4
test	al, al
jz	short loc_806330
mov	ebx, [esi]
mov	ebp, [esi+4]
mov	eax, [esp+2Ch+var_1C]
mov	ecx, [esp+2Ch+var_18]

loc_8062E2:
mov	dl, [ebx]
mov	[esp+ecx+2Ch+var_10], dl
inc	ecx
dec	ebp
inc	ebx
mov	[esp+2Ch+var_18], ecx
cmp	ecx, eax
jb	short loc_8062C0

loc_8062F3:
mov	edx, [esp+2Ch+arg_0]
mov	ecx, [edx+17Ch]
sub	edi, eax
sub	ecx, 0E0h
mov	[esp+2Ch+var_18], edi
jz	short loc_80634D
sub	ecx, 0Eh
jz	short loc_80633A
mov	eax, [edx]
mov	dword ptr [eax+14h], 44h
mov	ecx, [edx]
mov	eax, [edx+17Ch]
mov	[ecx+18h], eax
mov	ecx, [edx]
push	edx
mov	edx, [ecx]
call	edx
add	esp, 4
jmp	short loc_806362

loc_806330:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 1Ch
retn

loc_80633A:
mov	ecx, eax
push	edi
lea	eax, [esp+30h+var_10]
mov	esi, edx
call	sub_806180
add	esp, 4
jmp	short loc_80635E

loc_80634D:
mov	ecx, edi
lea	edi, [esp+2Ch+var_10]
mov	esi, edx
call	sub_805F20
mov	edi, [esp+2Ch+var_18]

loc_80635E:
mov	esi, [esp+2Ch+var_14]

loc_806362:
mov	[esi], ebx
mov	[esi+4], ebp
test	edi, edi
jle	short loc_80637C
mov	eax, [esp+2Ch+arg_0]
mov	ecx, [eax+18h]
mov	edx, [ecx+10h]
push	edi
push	eax
call	edx
add	esp, 8

loc_80637C:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 1Ch
retn
sub_806230 endp

align 10h



sub_806390 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+18h]
mov	ebp, [edi+4]
mov	ebx, [edi]
test	ebp, ebp
jnz	short loc_8063BD
mov	eax, [edi+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_8063B8

loc_8063B1:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_8063B8:
mov	ebx, [edi]
mov	ebp, [edi+4]

loc_8063BD:
movzx	eax, byte ptr [ebx]
dec	ebp
shl	eax, 8
inc	ebx
mov	[esp+10h+arg_0], eax
test	ebp, ebp
jnz	short loc_8063E3
mov	ecx, [edi+0Ch]
push	esi
call	ecx
add	esp, 4
test	al, al
jz	short loc_8063B1
mov	ebx, [edi]
mov	ebp, [edi+4]
mov	eax, [esp+10h+arg_0]

loc_8063E3:
movzx	edx, byte ptr [ebx]
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 5Bh
mov	ecx, [esi+17Ch]
lea	eax, [eax+edx-2]
mov	edx, [esi]
mov	[edx+18h], ecx
mov	edx, [esi]
mov	[edx+1Ch], eax
mov	[esp+10h+arg_0], eax
mov	eax, [esi]
mov	ecx, [eax+4]
push	1
push	esi
call	ecx
mov	eax, [esp+18h+arg_0]
inc	ebx
dec	ebp
add	esp, 8
mov	[edi], ebx
mov	[edi+4], ebp
test	eax, eax
jle	short loc_806430
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+10h]
push	esi
call	eax
add	esp, 8

loc_806430:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_806390 endp

align 10h



sub_806440 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [ebx+18h]
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [ebp+4]

loc_806451:
test	edi, edi
jnz	short loc_80646C
mov	eax, [ebp+0Ch]
push	ebx
call	eax
add	esp, 4
test	al, al
jz	loc_8064FD
mov	esi, [ebp+0]
mov	edi, [ebp+4]

loc_80646C:
movzx	eax, byte ptr [esi]
dec	edi
inc	esi
cmp	eax, 0FFh
jz	short loc_8064B8
jmp	short loc_806480
align 10h

loc_806480:
mov	eax, [ebx+194h]
inc	dword ptr [eax+14h]
mov	[ebp+0], esi
mov	[ebp+4], edi
test	edi, edi
jnz	short loc_8064A6
mov	ecx, [ebp+0Ch]
push	ebx
call	ecx
add	esp, 4
test	al, al
jz	short loc_8064FD
mov	esi, [ebp+0]
mov	edi, [ebp+4]

loc_8064A6:
movzx	eax, byte ptr [esi]
dec	edi
inc	esi
cmp	eax, 0FFh
jnz	short loc_806480
jmp	short loc_8064B8

loc_8064B4:
mov	ebx, [esp+10h+arg_0]

loc_8064B8:
test	edi, edi
jnz	short loc_8064CF
mov	edx, [ebp+0Ch]
push	ebx
call	edx
add	esp, 4
test	al, al
jz	short loc_8064FD
mov	esi, [ebp+0]
mov	edi, [ebp+4]

loc_8064CF:
movzx	ebx, byte ptr [esi]
dec	edi
inc	esi
cmp	ebx, 0FFh
jz	short loc_8064B4
mov	eax, [esp+10h+arg_0]
test	ebx, ebx
jnz	short loc_806504
mov	eax, [eax+194h]
add	dword ptr [eax+14h], 2
mov	ebx, [esp+10h+arg_0]
mov	[ebp+0], esi
mov	[ebp+4], edi
jmp	loc_806451

loc_8064FD:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_806504:
mov	ecx, [eax+194h]
cmp	dword ptr [ecx+14h], 0
jz	short loc_80654A
mov	edx, [eax]
mov	dword ptr [edx+14h], 74h
mov	ecx, [eax+194h]
mov	edx, [eax]
mov	ecx, [ecx+14h]
mov	[edx+18h], ecx
mov	edx, [eax]
mov	[edx+1Ch], ebx
mov	ecx, [eax]
mov	edx, [ecx+4]
push	0FFFFFFFFh
push	eax
call	edx
mov	eax, [esp+18h+arg_0]
mov	ecx, [eax+194h]
add	esp, 8
mov	dword ptr [ecx+14h], 0

loc_80654A:
mov	[eax+17Ch], ebx
mov	[ebp+4], edi
pop	edi
mov	[ebp+0], esi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_806440 endp

align 10h



sub_806560 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [ebp+18h]
mov	ebx, [esi]
push	edi
mov	edi, [esi+4]
test	edi, edi
jnz	short loc_80658D
mov	eax, [esi+0Ch]
push	ebp
call	eax
add	esp, 4
test	al, al
jnz	short loc_806588

loc_806581:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_806588:
mov	ebx, [esi]
mov	edi, [esi+4]

loc_80658D:
movzx	ecx, byte ptr [ebx]
dec	edi
inc	ebx
mov	[esp+10h+arg_0], ecx
test	edi, edi
jnz	short loc_8065B0
mov	ecx, [esi+0Ch]
push	ebp
call	ecx
add	esp, 4
test	al, al
jz	short loc_806581
mov	ebx, [esi]
mov	edi, [esi+4]
mov	ecx, [esp+10h+arg_0]

loc_8065B0:
movzx	eax, byte ptr [ebx]
dec	edi
inc	ebx
mov	[esp+10h+arg_0], eax
cmp	ecx, 0FFh
jnz	short loc_8065C8
cmp	eax, 0D8h
jz	short loc_8065ED

loc_8065C8:
mov	edx, [ebp+0]
mov	dword ptr [edx+14h], 35h
mov	edx, [ebp+0]
mov	[edx+18h], ecx
mov	ecx, [ebp+0]
mov	[ecx+1Ch], eax
mov	edx, [ebp+0]
mov	eax, [edx]
push	ebp
call	eax
mov	eax, [esp+14h+arg_0]
add	esp, 4

loc_8065ED:
mov	[ebp+17Ch], eax
mov	[esi+4], edi
pop	edi
mov	[esi], ebx
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_806560 endp

align 10h



sub_806600 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
xor	ebx, ebx
lea	esp, [esp+0]

loc_806610:
cmp	[esi+17Ch], ebx
jnz	short loc_806637
mov	eax, [esi+194h]
push	esi
cmp	[eax+0Ch], bl
jnz	short loc_80662B
call	sub_806560
jmp	short loc_806630

loc_80662B:
call	sub_806440

loc_806630:
add	esp, 4
test	al, al
jz	short loc_806667

loc_806637:
mov	eax, [esi+17Ch]
lea	ecx, [eax-1]
cmp	ecx, 0FDh	; switch 254 cases
ja	loc_8067D5	; default
			; jumptable 00806653 cases 1-190,221,222,239-252
movzx	ecx, ds:byte_806880[ecx]
jmp	ds:off_806840[ecx*4] ; switch jump

loc_80665A:		; jumptable 00806653 case 215
call	sub_805210
test	al, al
jnz	loc_8067F3

loc_806667:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn

loc_80666D:		; jumptable 00806653 cases 191,192
xor	cl, cl
xor	al, al
call	sub_8052C0
test	al, al
jz	short loc_806667
mov	[esi+17Ch], ebx
jmp	short loc_806610

loc_806682:		; jumptable 00806653 case 193
xor	cl, cl
mov	al, 1
call	sub_8052C0
test	al, al
jz	short loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_80669A:		; jumptable 00806653 case 200
mov	cl, 1
xor	al, al
call	sub_8052C0
test	al, al
jz	short loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_8066B2:		; jumptable 00806653 case 201
mov	cl, 1
mov	al, cl
call	sub_8052C0
test	al, al
jz	short loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_8066CA:		; jumptable 00806653 cases 194,196-199,202,204-206
mov	edx, [esi]
mov	dword ptr [edx+14h], 3Ch
mov	eax, [esi]
mov	ecx, [esi+17Ch]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_8066F3:		; jumptable 00806653 cases 203,219
push	esi
call	sub_806390
add	esp, 4
test	al, al
jz	loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_80670F:		; jumptable 00806653 case 195
push	esi
call	sub_8058C0
add	esp, 4
test	al, al
jz	loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_80672B:		; jumptable 00806653 case 218
mov	edi, esi
call	sub_805BC0
test	al, al
jz	loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_806745:		; jumptable 00806653 case 220
push	esi
call	sub_805E20
add	esp, 4
test	al, al
jz	loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_806761:		; jumptable 00806653 cases 223-238
mov	ecx, [esi+194h]
mov	edx, [ecx+eax*4-364h]
push	esi
call	edx
add	esp, 4
test	al, al
jz	loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_806787:		; jumptable 00806653 case 253
mov	eax, [esi+194h]
mov	ecx, [eax+18h]
push	esi
call	ecx
add	esp, 4
test	al, al
jz	loc_806667
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_8067A9:		; jumptable 00806653 cases 0,207-214
mov	edx, [esi]
mov	dword ptr [edx+14h], 5Ch
mov	eax, [esi]
mov	ecx, [esi+17Ch]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx+4]
push	1
push	esi
call	eax
add	esp, 8
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_8067D5:		; default
mov	ecx, [esi]	; jumptable 00806653 cases 1-190,221,222,239-252
mov	dword ptr [ecx+14h], 44h
mov	edx, [esi]
mov	eax, [esi+17Ch]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_8067F3:
mov	[esi+17Ch], ebx
jmp	loc_806610

loc_8067FE:		; jumptable 00806653 case 217
call	sub_8055C0
test	al, al
jz	loc_806667
pop	edi
mov	[esi+17Ch], ebx
pop	esi
mov	eax, 1
pop	ebx
retn

loc_80681A:		; jumptable 00806653 case 216
mov	eax, [esi]
mov	dword ptr [eax+14h], 55h
mov	ecx, [esi]
mov	edx, [ecx+4]
push	1
push	esi
call	edx
add	esp, 8
pop	edi
mov	[esi+17Ch], ebx
pop	esi
mov	eax, 2
pop	ebx
retn
sub_806600 endp

align 10h
off_806840 dd offset loc_8067A9, offset	loc_80666D ; jump table	for switch statement
dd offset loc_806682, offset loc_8066CA
dd offset loc_80670F, offset loc_80669A
dd offset loc_8066B2, offset loc_8066F3
dd offset loc_80665A, offset loc_80681A
dd offset loc_8067FE, offset loc_80672B
dd offset loc_806745, offset loc_806761
dd offset loc_806787, offset loc_8067D5
byte_806880 db 0, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh,	0Fh ; indirect table for switch	statement
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 1
db 1, 2, 3, 4, 3, 3, 3,	3, 5, 6, 3, 7, 3
db 3, 3, 0, 0, 0, 0, 0,	0, 0, 0, 8, 9, 0Ah
db 0Bh,	7, 0Ch,	0Fh, 0Fh, 0Dh, 0Dh, 0Dh
db 0Dh,	0Dh, 0Dh, 0Dh, 0Dh, 0Dh, 0Dh, 0Dh
db 0Dh,	0Dh, 0Dh, 0Dh, 0Dh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Eh
align 10h



sub_806980 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+17Ch], 0
jnz	short loc_80699F
push	esi
call	sub_806440
add	esp, 4
test	al, al
jnz	short loc_80699F

loc_80699B:
xor	al, al
pop	esi
retn

loc_80699F:
mov	eax, [esi+194h]
mov	eax, [eax+10h]
lea	ecx, [eax+0D0h]
cmp	[esi+17Ch], ecx
jnz	short loc_8069F8
mov	edx, [esi]
mov	dword ptr [edx+14h], 62h
mov	eax, [esi+194h]
mov	ecx, [esi]
mov	edx, [eax+10h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax+4]
push	3
push	esi
call	ecx
mov	dword ptr [esi+17Ch], 0
mov	esi, [esi+194h]
mov	ecx, [esi+10h]
add	esp, 8
inc	ecx
and	ecx, 7
mov	[esi+10h], ecx
mov	al, 1
pop	esi
retn

loc_8069F8:
mov	edx, [esi+18h]
push	eax
mov	eax, [edx+14h]
push	esi
call	eax
add	esp, 8
test	al, al
jz	short loc_80699B
mov	esi, [esi+194h]
mov	ecx, [esi+10h]
inc	ecx
and	ecx, 7
mov	[esi+10h], ecx
mov	al, 1
pop	esi
retn
sub_806980 endp

align 10h



sub_806A20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi]
mov	ebx, [esi+17Ch]
mov	dword ptr [eax+14h], 79h
mov	ecx, [esi]
mov	[ecx+18h], ebx
mov	edx, [esi]
push	edi
mov	[edx+1Ch], ebp
mov	eax, [esi]
mov	ecx, [eax+4]
push	0FFFFFFFFh
push	esi
call	ecx
add	esp, 8

loc_806A52:
cmp	ebx, 0C0h
jge	short loc_806A61

loc_806A5A:
mov	edi, 2
jmp	short loc_806AB6

loc_806A61:
lea	edx, [ebx-0D0h]
cmp	edx, 7
ja	short loc_806AB1
lea	eax, [ebp+1]
and	eax, 7
add	eax, 0D0h
cmp	ebx, eax
jz	short loc_806AB1
lea	ecx, [ebp+2]
and	ecx, 7
add	ecx, 0D0h
cmp	ebx, ecx
jz	short loc_806AB1
lea	edx, [ebp-1]
and	edx, 7
add	edx, 0D0h
cmp	ebx, edx
jz	short loc_806A5A
lea	eax, [ebp-2]
and	eax, 7
add	eax, 0D0h
cmp	ebx, eax
jz	short loc_806A5A
mov	edi, 1
jmp	short loc_806AB6

loc_806AB1:
mov	edi, 3

loc_806AB6:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 61h
mov	edx, [esi]
mov	[edx+18h], ebx
mov	eax, [esi]
mov	[eax+1Ch], edi
mov	ecx, [esi]
mov	edx, [ecx+4]
push	4
push	esi
call	edx
add	esp, 8
sub	edi, 1
jz	short loc_806B0F
sub	edi, 1
jz	short loc_806AF0
sub	edi, 1
jnz	loc_806A52
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn

loc_806AF0:
push	esi
call	sub_806440
add	esp, 4
test	al, al
jz	short loc_806B08
mov	ebx, [esi+17Ch]
jmp	loc_806A52

loc_806B08:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_806B0F:
pop	edi
mov	dword ptr [esi+17Ch], 0
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_806A20 endp




sub_806B20 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx+194h]
xor	edx, edx
mov	[ecx+0C4h], edx
mov	[ecx+7Ch], edx
mov	[ecx+17Ch], edx
mov	[eax+0Ch], dl
mov	[eax+0Dh], dl
mov	[eax+14h], edx
mov	[eax+0A0h], edx
retn
sub_806B20 endp

align 10h



sub_806B50 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	0A8h
xor	ebx, ebx
push	ebx
push	esi
call	ecx
mov	[esi+194h], eax
add	esp, 0Ch
mov	dword ptr [eax], offset	sub_806B20
mov	dword ptr [eax+4], offset sub_806600
mov	dword ptr [eax+8], offset sub_806980
mov	dword ptr [eax+18h], offset sub_806390
mov	[eax+5Ch], ebx
lea	ecx, [eax+60h]
mov	edx, 10h
jmp	short loc_806BA0
align 10h

loc_806BA0:
mov	dword ptr [ecx-44h], offset sub_806390
mov	[ecx], ebx
add	ecx, 4
sub	edx, 1
jnz	short loc_806BA0
mov	ecx, offset sub_806230
mov	[eax+1Ch], ecx
mov	[eax+54h], ecx
mov	eax, [esi+194h]
mov	[esi+0C4h], ebx
mov	[esi+7Ch], ebx
mov	[esi+17Ch], ebx
pop	esi
mov	[eax+0Ch], bl
mov	[eax+0Dh], bl
mov	[eax+14h], ebx
mov	[eax+0A0h], ebx
pop	ebx
retn
sub_806B50 endp

align 10h



sub_806BF0 proc	near

var_CC=	byte ptr -0CCh
var_C8=	byte ptr -0C8h
arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	ecx, [eax+8]
push	esi
call	ecx
push	esi
call	sub_809850
add	esp, 8
push	1		; uExitCode
call	ds:off_15FDCD4
pop	esi
int	3		; Trap to Debugger

loc_806C10:
mov	eax, [esp+4]
mov	ecx, [eax]
sub	esp, 0C8h
lea	edx, [esp+0CCh+var_CC]
push	edx
push	eax
mov	eax, [ecx+0Ch]
call	eax
add	esp, 8
lea	ecx, [esp+0C8h+var_C8]
push	ecx
push	offset aS_12	; "%s\n"
call	ds:off_15FDCDC
add	eax, 40h
push	eax		; FILE *
call	ds:off_15FDCD8
add	esp, 0D4h
retn
sub_806BF0 endp

align 10h



sub_806C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	esi
mov	esi, [ecx]
test	eax, eax
jge	short loc_806C79
cmp	dword ptr [esi+6Ch], 0
jz	short loc_806C6B
cmp	dword ptr [esi+68h], 3
jl	short loc_806C74

loc_806C6B:
mov	eax, [esi+8]
push	ecx
call	eax
add	esp, 4

loc_806C74:
inc	dword ptr [esi+6Ch]
pop	esi
retn

loc_806C79:
cmp	[esi+68h], eax
jl	short loc_806C87
push	ecx
mov	ecx, [esi+8]
call	ecx
add	esp, 4

loc_806C87:
pop	esi
retn
sub_806C50 endp

align 10h



; int __cdecl sub_806C90(int, char *)
sub_806C90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	eax, [eax]
mov	ecx, [eax+14h]
push	esi
test	ecx, ecx
jle	short loc_806CAB
cmp	ecx, [eax+74h]
jg	short loc_806CAB
mov	edx, [eax+70h]
mov	esi, [edx+ecx*4]
jmp	short loc_806CCA

loc_806CAB:
mov	esi, [eax+78h]
test	esi, esi
jz	short loc_806CCE
mov	edx, [eax+7Ch]
cmp	ecx, edx
jl	short loc_806CCE
cmp	ecx, [eax+80h]
jg	short loc_806CCE
push	edi
mov	edi, ecx
sub	edi, edx
mov	esi, [esi+edi*4]
pop	edi

loc_806CCA:
test	esi, esi
jnz	short loc_806CD6

loc_806CCE:
mov	[eax+18h], ecx
mov	ecx, [eax+70h]
mov	esi, [ecx]

loc_806CD6:
mov	cl, [esi]
mov	edx, esi
test	cl, cl
jz	short loc_806CEC
mov	edi, edi

loc_806CE0:
inc	edx
cmp	cl, 25h
jz	short loc_806D1D
mov	cl, [edx]
test	cl, cl
jnz	short loc_806CE0

loc_806CEC:
mov	ecx, [eax+34h]
mov	edx, [eax+30h]
push	ecx
mov	ecx, [eax+2Ch]
push	edx
mov	edx, [eax+28h]
push	ecx
mov	ecx, [eax+24h]
push	edx
mov	edx, [eax+20h]
push	ecx
mov	ecx, [eax+1Ch]
push	edx
mov	edx, [eax+18h]
mov	eax, [esp+1Ch+arg_4]
push	ecx
push	edx
push	esi		; char *
push	eax		; char *
call	ds:off_15FDCE0
add	esp, 28h
pop	esi
retn

loc_806D1D:
cmp	byte ptr [edx],	73h
jnz	short loc_806CEC
mov	edx, [esp+4+arg_4]
add	eax, 18h
push	eax
push	esi		; char *
push	edx		; char *
call	ds:off_15FDCE0
add	esp, 0Ch
pop	esi
retn
sub_806C90 endp

align 10h



sub_806D40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
xor	ecx, ecx
mov	[edx+6Ch], ecx
mov	eax, [eax]
mov	[eax+14h], ecx
retn
sub_806D40 endp

align 10h



sub_806D60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	ecx, ecx
mov	dword ptr [eax], offset	sub_806BF0
mov	dword ptr [eax+4], offset sub_806C50
mov	dword ptr [eax+8], offset loc_806C10
mov	dword ptr [eax+0Ch], offset sub_806C90
mov	dword ptr [eax+10h], offset sub_806D40
mov	[eax+68h], ecx
mov	[eax+6Ch], ecx
mov	[eax+14h], ecx
mov	dword ptr [eax+70h], offset off_1465800
mov	dword ptr [eax+74h], 7Bh
mov	[eax+78h], ecx
mov	[eax+7Ch], ecx
mov	[eax+80h], ecx
retn
sub_806D60 endp

align 10h



sub_806DB0 proc	near
push	ebx
push	edi
mov	edi, 0CCh
cmp	[esi+14h], edi
jz	short loc_806DD4
mov	eax, [esi+180h]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
mov	dword ptr [esi+78h], 0
mov	[esi+14h], edi

loc_806DD4:
mov	edx, [esi+180h]
cmp	byte ptr [edx+8], 0
jz	short loc_806E5D
lea	edi, [esi+78h]

loc_806DE3:
mov	eax, [edi]
cmp	eax, [esi+60h]
jnb	short loc_806E31
lea	ebx, [ebx+0]

loc_806DF0:
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_806E0E
mov	[ecx+4], eax
mov	eax, [esi+8]
mov	ecx, [esi+60h]
mov	[eax+8], ecx
mov	edx, [esi+8]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_806E0E:
mov	ecx, [esi+184h]
mov	edx, [ecx+4]
mov	ebx, [edi]
push	0
push	edi
push	0
push	esi
call	edx
mov	eax, [edi]
add	esp, 10h
cmp	eax, ebx
jz	short loc_806E73
mov	ecx, eax
cmp	ecx, [esi+60h]
jb	short loc_806DF0

loc_806E31:
mov	edx, [esi+180h]
mov	eax, [edx+4]
push	esi
call	eax
mov	ecx, [esi+180h]
mov	edx, [ecx]
push	esi
call	edx
mov	dword ptr [edi], 0
mov	eax, [esi+180h]
add	esp, 8
cmp	byte ptr [eax+8], 0
jnz	short loc_806DE3

loc_806E5D:
xor	ecx, ecx
cmp	[esi+41h], cl
pop	edi
setnz	cl
mov	al, 1
pop	ebx
add	ecx, 0CDh
mov	[esi+14h], ecx
retn

loc_806E73:
pop	edi
xor	al, al
pop	ebx
retn
sub_806DB0 endp

align 10h



sub_806E80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+14h], 0CDh
jz	short loc_806EA9
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_806EA9:
mov	ecx, [esi+78h]
cmp	ecx, [esi+60h]
jb	short loc_806ECB
mov	edx, [esi]
mov	dword ptr [edx+14h], 7Bh
mov	eax, [esi]
mov	ecx, [eax+4]
push	0FFFFFFFFh
push	esi
call	ecx
add	esp, 8
xor	eax, eax
pop	esi
retn

loc_806ECB:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_806EE9
mov	[eax+4], ecx
mov	edx, [esi+8]
mov	eax, [esi+60h]
mov	[edx+8], eax
mov	ecx, [esi+8]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_806EE9:
mov	ecx, [esp+4+arg_8]
mov	eax, [esi+184h]
push	ecx
mov	ecx, [esp+8+arg_4]
lea	edx, [esp+8+arg_0]
push	edx
push	ecx
mov	[esp+10h+arg_0], 0
mov	edx, [eax+4]
push	esi
call	edx
mov	eax, [esp+14h+arg_0]
add	[esi+78h], eax
add	esp, 10h
pop	esi
retn
sub_806E80 endp

align 10h



sub_806F20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+14h], 0CAh
jnz	short loc_806F4F
push	esi
call	sub_80A020
add	esp, 4
cmp	byte ptr [esi+40h], 0
jz	short loc_806F48
mov	dword ptr [esi+14h], 0CFh
mov	al, 1
pop	esi
retn

loc_806F48:
mov	dword ptr [esi+14h], 0CBh

loc_806F4F:
mov	eax, [esi+14h]
cmp	eax, 0CBh
jnz	short loc_806FC9
mov	eax, [esi+190h]
cmp	byte ptr [eax+10h], 0
jz	short loc_806FB9

loc_806F65:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_806F74
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_806F74:
mov	edx, [esi+190h]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4
test	eax, eax
jz	short loc_806FB5
cmp	eax, 2
jz	short loc_806FB9
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_806F65
cmp	eax, 3
jz	short loc_806F9C
cmp	eax, 1
jnz	short loc_806F65

loc_806F9C:
inc	dword ptr [ecx+4]
mov	eax, [esi+8]
mov	ecx, [eax+4]
cmp	ecx, [eax+8]
jl	short loc_806F65
mov	edx, [esi+11Ch]
add	[eax+8], edx
jmp	short loc_806F65

loc_806FB5:
xor	al, al
pop	esi
retn

loc_806FB9:
mov	eax, [esi+7Ch]
mov	[esi+84h], eax
call	sub_806DB0
pop	esi
retn

loc_806FC9:
cmp	eax, 0CCh
jz	short loc_806FEB
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 14h
mov	edx, [esi]
mov	eax, [esi+14h]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_806FEB:
call	sub_806DB0
pop	esi
retn
sub_806F20 endp

align 10h



sub_807000 proc	near
cmp	byte ptr [esi+0C9h], 0
mov	byte ptr [esi+40h], 1
push	esi
jz	short loc_80701F
mov	eax, [esi]
mov	dword ptr [eax+14h], 1
mov	ecx, [esi]
mov	edx, [ecx]
call	edx
jmp	short loc_807034

loc_80701F:
cmp	byte ptr [esi+0C8h], 0
jz	short loc_80702F
call	sub_80C710
jmp	short loc_807034

loc_80702F:
call	sub_80BAA0

loc_807034:
add	esp, 4
push	1
push	esi
call	sub_80AEA0
mov	eax, [esi+4]
mov	ecx, [eax+18h]
push	esi
call	ecx
mov	edx, [esi+190h]
mov	eax, [edx+8]
push	esi
call	eax
mov	ecx, [esi+8]
add	esp, 10h
test	ecx, ecx
jz	short locret_8070B0
cmp	byte ptr [esi+0C8h], 0
jz	short loc_807070
mov	eax, [esi+24h]
lea	eax, [eax+eax*2+2]
jmp	short loc_807086

loc_807070:
mov	edx, [esi+190h]
cmp	byte ptr [edx+10h], 0
jz	short loc_807081
mov	eax, [esi+24h]
jmp	short loc_807086

loc_807081:
mov	eax, 1

loc_807086:
mov	dword ptr [ecx+4], 0
mov	ecx, [esi+11Ch]
mov	edx, [esi+8]
imul	ecx, eax
mov	[edx+8], ecx
mov	eax, [esi+8]
mov	dword ptr [eax+0Ch], 0
mov	ecx, [esi+8]
mov	dword ptr [ecx+10h], 1

locret_8070B0:
retn
sub_807000 endp	; sp-analysis failed

align 10h



sub_8070C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+14h], 0CAh
jnz	short loc_8070DA
call	sub_807000
mov	dword ptr [esi+14h], 0D1h

loc_8070DA:
cmp	dword ptr [esi+14h], 0D1h
jnz	short loc_80713A

loc_8070E3:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_8070F2
mov	eax, [eax]
push	esi
call	eax
add	esp, 4

loc_8070F2:
mov	ecx, [esi+190h]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4
test	eax, eax
jz	short loc_807177
cmp	eax, 2
jz	short loc_807133
mov	ecx, [esi+8]
test	ecx, ecx
jz	short loc_8070E3
cmp	eax, 3
jz	short loc_80711A
cmp	eax, 1
jnz	short loc_8070E3

loc_80711A:
inc	dword ptr [ecx+4]
mov	eax, [esi+8]
mov	ecx, [eax+4]
cmp	ecx, [eax+8]
jl	short loc_8070E3
mov	edx, [esi+11Ch]
add	[eax+8], edx
jmp	short loc_8070E3

loc_807133:
mov	dword ptr [esi+14h], 0D2h

loc_80713A:
mov	eax, [esi+14h]
cmp	eax, 0D2h
jz	short loc_80714B
cmp	eax, 0CFh
jnz	short loc_80715C

loc_80714B:
cmp	byte ptr [esi+40h], 0
jz	short loc_80715C
mov	eax, [esi+188h]
mov	eax, [eax+10h]
pop	esi
retn

loc_80715C:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 14h
mov	edx, [esi]
mov	eax, [esi+14h]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_807177:
xor	eax, eax
pop	esi
retn
sub_8070C0 endp

align 10h



sub_807180 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+14h], 64h
jz	short loc_8071A6
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8071A6:
cmp	[esp+4+arg_4], 0
jz	short loc_8071B8
push	0
push	esi
call	sub_807DB0
add	esp, 8

loc_8071B8:
mov	edx, [esi]
mov	eax, [edx+10h]
push	esi
call	eax
mov	ecx, [esi+18h]
mov	edx, [ecx+8]
push	esi
call	edx
push	esi
call	sub_80C780
mov	eax, [esi+13Ch]
mov	ecx, [eax]
push	esi
call	ecx
xor	edx, edx
add	esp, 10h
cmp	[esi+0B0h], dl
mov	dword ptr [esi+0D0h], 0
setnz	dl
add	edx, 65h
mov	[esi+14h], edx
pop	esi
retn
sub_807180 endp

align 10h



sub_807200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+14h], 65h
jz	short loc_807226
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_807226:
mov	edx, [esi+0D0h]
cmp	edx, [esi+20h]
jb	short loc_807247
mov	eax, [esi]
mov	dword ptr [eax+14h], 7Bh
mov	ecx, [esi]
mov	edx, [ecx+4]
push	0FFFFFFFFh
push	esi
call	edx
add	esp, 8

loc_807247:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_80726B
mov	ecx, [esi+0D0h]
mov	[eax+4], ecx
mov	edx, [esi+8]
mov	eax, [esi+20h]
mov	[edx+8], eax
mov	ecx, [esi+8]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80726B:
mov	eax, [esi+13Ch]
cmp	byte ptr [eax+0Ch], 0
jz	short loc_807280
mov	eax, [eax+4]
push	esi
call	eax
add	esp, 4

loc_807280:
mov	eax, [esi+20h]
sub	eax, [esi+0D0h]
mov	ecx, [esp+4+arg_8]
mov	edx, [esi+140h]
cmp	ecx, eax
cmova	ecx, eax
push	ecx
mov	ecx, [esp+8+arg_4]
lea	eax, [esp+8+arg_0]
push	eax
push	ecx
mov	[esp+10h+arg_0], 0
mov	edx, [edx+4]
push	esi
call	edx
mov	eax, [esp+14h+arg_0]
add	[esi+0D0h], eax
add	esp, 10h
pop	esi
retn
sub_807200 endp




sub_8072C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
cmp	dword ptr [ebp+14h], 64h
push	esi
push	edi
jz	short loc_8072EC
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 14h
mov	ecx, [ebp+0]
mov	edx, [ebp+14h]
mov	[ecx+18h], edx
mov	eax, [ebp+0]
mov	ecx, [eax]
push	ebp
call	ecx
add	esp, 4

loc_8072EC:
mov	ebx, [esp+10h+arg_4]
test	ebx, ebx
jl	short loc_8072F9
cmp	ebx, 4
jl	short loc_807314

loc_8072F9:
mov	edx, [ebp+0]
mov	dword ptr [edx+14h], 1Fh
mov	eax, [ebp+0]
mov	[eax+18h], ebx
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
add	esp, 4

loc_807314:
cmp	dword ptr [ebp+ebx*4+48h], 0
jnz	short loc_807328
push	ebp
call	sub_809880
add	esp, 4
mov	[ebp+ebx*4+48h], eax

loc_807328:
mov	edi, [esp+10h+arg_8]
xor	esi, esi
add	edi, 8

loc_807331:
mov	ecx, [edi-8]
imul	ecx, [esp+10h+arg_C]
add	ecx, 32h
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
test	eax, eax
jg	short loc_807358
mov	eax, 1
jmp	short loc_807364

loc_807358:
cmp	eax, 7FFFh
jle	short loc_807364
mov	eax, 7FFFh

loc_807364:
cmp	[esp+10h+arg_10], 0
jz	short loc_807377
cmp	eax, 0FFh
jle	short loc_807377
mov	eax, 0FFh

loc_807377:
mov	ecx, [ebp+ebx*4+48h]
mov	[esi+ecx], ax
mov	ecx, [edi-4]
imul	ecx, [esp+10h+arg_C]
add	ecx, 32h
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
test	eax, eax
jg	short loc_8073A6
mov	eax, 1
jmp	short loc_8073B2

loc_8073A6:
cmp	eax, 7FFFh
jle	short loc_8073B2
mov	eax, 7FFFh

loc_8073B2:
cmp	[esp+10h+arg_10], 0
jz	short loc_8073C5
cmp	eax, 0FFh
jle	short loc_8073C5
mov	eax, 0FFh

loc_8073C5:
mov	edx, [ebp+ebx*4+48h]
mov	[edx+esi+2], ax
mov	ecx, [edi]
imul	ecx, [esp+10h+arg_C]
add	ecx, 32h
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
test	eax, eax
jg	short loc_8073F4
mov	eax, 1
jmp	short loc_807400

loc_8073F4:
cmp	eax, 7FFFh
jle	short loc_807400
mov	eax, 7FFFh

loc_807400:
cmp	[esp+10h+arg_10], 0
jz	short loc_807413
cmp	eax, 0FFh
jle	short loc_807413
mov	eax, 0FFh

loc_807413:
mov	ecx, [ebp+ebx*4+48h]
mov	[ecx+esi+4], ax
mov	ecx, [edi+4]
imul	ecx, [esp+10h+arg_C]
add	ecx, 32h
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
test	eax, eax
jg	short loc_807443
mov	eax, 1
jmp	short loc_80744F

loc_807443:
cmp	eax, 7FFFh
jle	short loc_80744F
mov	eax, 7FFFh

loc_80744F:
cmp	[esp+10h+arg_10], 0
jz	short loc_807462
cmp	eax, 0FFh
jle	short loc_807462
mov	eax, 0FFh

loc_807462:
mov	edx, [ebp+ebx*4+48h]
mov	[esi+edx+6], ax
add	esi, 8
add	edi, 10h
cmp	esi, 80h
jl	loc_807331
mov	eax, [ebp+ebx*4+48h]
pop	edi
pop	esi
pop	ebp
mov	byte ptr [eax+80h], 0
pop	ebx
retn
sub_8072C0 endp

align 10h



sub_807490 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
push	ebx
push	esi
push	edi
test	ecx, ecx
jg	short loc_8074AC
mov	eax, 1388h
cdq
mov	ecx, 1
idiv	ecx
mov	esi, eax
jmp	short loc_8074BF

loc_8074AC:
cmp	ecx, 64h
jle	short loc_8074EC
mov	ecx, 64h

loc_8074B6:
mov	esi, 64h
sub	esi, ecx
add	esi, esi

loc_8074BF:
mov	edi, [esp+0Ch+arg_8]
mov	ebx, [esp+0Ch+arg_0]
push	edi
push	esi
push	offset unk_14659F8
push	0
push	ebx
call	sub_8072C0
push	edi
push	esi
push	offset unk_1465AF8
push	1
push	ebx
call	sub_8072C0
add	esp, 28h
pop	edi
pop	esi
pop	ebx
retn

loc_8074EC:
cmp	ecx, 32h
jge	short loc_8074B6
mov	eax, 1388h
cdq
idiv	ecx
mov	esi, eax
jmp	short loc_8074BF
sub_807490 endp

align 10h



sub_807500 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, [esp+8+arg_4]
cmp	dword ptr [edi], 0
mov	esi, eax
jnz	short loc_80751C
mov	eax, [esp+8+arg_0]
push	eax
call	sub_8098A0
add	esp, 4
mov	[edi], eax

loc_80751C:
mov	eax, [edi]
mov	ecx, [esi]
mov	[eax], ecx
mov	edx, [esi+4]
mov	[eax+4], edx
mov	ecx, [esi+8]
mov	[eax+8], ecx
mov	edx, [esi+0Ch]
mov	[eax+0Ch], edx
mov	cl, [esi+10h]
push	ebx
mov	[eax+10h], cl
xor	edi, edi
xor	ebx, ebx
xor	edx, edx
lea	eax, [esi+2]
push	ebp
xor	ecx, ecx
lea	esi, [edi+4]
lea	ebx, [ebx+0]

loc_807550:
movzx	ebp, byte ptr [eax-1]
add	edi, ebp
movzx	ebp, byte ptr [eax]
add	ecx, ebp
movzx	ebp, byte ptr [eax+1]
add	edx, ebp
movzx	ebp, byte ptr [eax+2]
add	ebx, ebp
add	eax, 4
sub	esi, 1
jnz	short loc_807550
add	ebx, edx
add	ebx, ecx
add	edi, ebx
cmp	edi, 1
pop	ebp
pop	ebx
jl	short loc_807584
cmp	edi, 100h
jle	short loc_80759B

loc_807584:
mov	eax, [esp+8+arg_0]
mov	edx, [eax]
mov	dword ptr [edx+14h], 8
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
add	esp, 4

loc_80759B:
mov	esi, [esp+8+arg_4]
mov	eax, [esp+8+arg_8]
mov	ecx, [esi]
push	edi
push	eax
add	ecx, 11h
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi]
add	esp, 0Ch
pop	edi
mov	byte ptr [edx+111h], 0
pop	esi
retn
sub_807500 endp

align 10h



sub_8075C0 proc	near
push	offset unk_1465C0C
lea	eax, [esi+58h]
push	eax
push	esi
mov	eax, offset unk_1465BF8
call	sub_807500
push	offset unk_1465C50
lea	ecx, [esi+68h]
push	ecx
push	esi
mov	eax, offset unk_1465C38
call	sub_807500
push	offset unk_1465C2C
lea	edx, [esi+5Ch]
push	edx
push	esi
mov	eax, offset unk_1465C18
call	sub_807500
push	offset unk_1465D08
lea	eax, [esi+6Ch]
push	eax
push	esi
mov	eax, offset unk_1465CF4
call	sub_807500
add	esp, 30h
retn
sub_8075C0 endp

align 10h



sub_807620 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
cmp	dword ptr [esi+14h], 64h
jz	short loc_807647
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_807647:
mov	eax, [esp+8+arg_4]
mov	[esi+40h], eax
mov	byte ptr [esi+0C4h], 0
mov	byte ptr [esi+0CCh], 0
cmp	eax, 5		; switch 6 cases
ja	loc_8078D4	; default
jmp	ds:off_8078EC[eax*4] ; switch jump

loc_80766C:		; jumptable 00807665 case 1
mov	ebx, 1
mov	[esi+0C4h], bl
mov	[esi+3Ch], ebx
mov	esi, [esi+44h]
xor	eax, eax
mov	[esi], ebx
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
pop	esi
pop	ebx
retn

loc_807693:		; jumptable 00807665 case 2
mov	eax, [esi+44h]
mov	dword ptr [esi+3Ch], 3
xor	ecx, ecx
mov	ebx, 1
mov	[esi+0CCh], bl
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	dword ptr [eax], 52h
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	eax, [esi+44h]
add	eax, 54h
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	dword ptr [eax], 47h
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	esi, [esi+44h]
add	esi, 0A8h
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	dword ptr [esi], 42h
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	[esi+18h], ecx
pop	esi
pop	ebx
retn

loc_8076FB:		; jumptable 00807665 case 3
mov	eax, [esi+44h]
mov	dword ptr [esi+3Ch], 3
mov	ebx, 1
mov	[esi+0C4h], bl
mov	[eax], ebx
xor	ecx, ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	edx, 2
mov	[eax+8], edx
mov	[eax+0Ch], edx
mov	eax, [esi+44h]
add	eax, 54h
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	[eax+18h], ebx
mov	[eax], edx
mov	esi, [esi+44h]
add	esi, 0A8h
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	[esi+10h], ebx
mov	[esi+14h], ebx
mov	[esi+18h], ebx
mov	dword ptr [esi], 3
pop	esi
pop	ebx
retn

loc_807760:		; jumptable 00807665 case 4
mov	eax, [esi+44h]
mov	dword ptr [esi+3Ch], 4
xor	ecx, ecx
mov	ebx, 1
mov	[esi+0CCh], bl
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	dword ptr [eax], 43h
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	eax, [esi+44h]
mov	[eax+5Ch], ebx
mov	[eax+60h], ebx
mov	dword ptr [eax+54h], 4Dh
mov	[eax+64h], ecx
mov	[eax+68h], ecx
mov	[eax+6Ch], ecx
add	eax, 54h
mov	eax, [esi+44h]
add	eax, 0A8h
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	dword ptr [eax], 59h
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	esi, [esi+44h]
add	esi, 0FCh
mov	[esi+8], ebx
mov	[esi+0Ch], ebx
mov	dword ptr [esi], 4Bh
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	[esi+18h], ecx
pop	esi
pop	ebx
retn

loc_8077E6:		; jumptable 00807665 case 5
mov	eax, [esi+44h]
mov	dword ptr [esi+3Ch], 4
mov	ebx, 1
mov	[esi+0CCh], bl
mov	[eax], ebx
xor	ecx, ecx
mov	[eax+10h], ecx
mov	[eax+14h], ecx
mov	[eax+18h], ecx
mov	edx, 2
mov	[eax+8], edx
mov	[eax+0Ch], edx
mov	eax, [esi+44h]
mov	[eax+5Ch], ebx
mov	[eax+60h], ebx
mov	[eax+64h], ebx
mov	[eax+68h], ebx
mov	[eax+6Ch], ebx
mov	[eax+54h], edx
add	eax, 54h
mov	eax, [esi+44h]
add	eax, 0A8h
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+14h], ebx
mov	[eax+18h], ebx
mov	dword ptr [eax], 3
mov	esi, [esi+44h]
add	esi, 0FCh
mov	dword ptr [esi], 4
mov	[esi+8], edx
mov	[esi+0Ch], edx
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	[esi+18h], ecx
pop	esi
pop	ebx
retn

loc_807869:		; jumptable 00807665 case 0
mov	eax, [esi+24h]
mov	ebx, 1
cmp	eax, ebx
mov	[esi+3Ch], eax
jl	short loc_80787D
cmp	eax, 0Ah
jle	short loc_8078A1

loc_80787D:
mov	edx, [esi]
mov	dword ptr [edx+14h], 1Ah
mov	eax, [esi]
mov	ecx, [esi+3Ch]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	dword ptr [edx+1Ch], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8078A1:
push	edi
xor	edi, edi
xor	ecx, ecx
cmp	[esi+3Ch], edi
jle	short loc_8078D0
xor	edx, edx
lea	ecx, [ecx+0]

loc_8078B0:
mov	eax, [esi+44h]
add	eax, edx
mov	[eax], ecx
add	ecx, ebx
mov	[eax+8], ebx
mov	[eax+0Ch], ebx
mov	[eax+10h], edi
mov	[eax+14h], edi
mov	[eax+18h], edi
add	edx, 54h
cmp	ecx, [esi+3Ch]
jl	short loc_8078B0

loc_8078D0:
pop	edi
pop	esi
pop	ebx
retn

loc_8078D4:		; default
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
pop	esi
pop	ebx
retn
sub_807620 endp

align 4
off_8078EC dd offset loc_807869	; jump table for switch	statement
dd offset loc_80766C
dd offset loc_807693
dd offset loc_8076FB
dd offset loc_807760
dd offset loc_8077E6
align 10h



sub_807910 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+28h]
push	edi
cmp	eax, 5		; switch 6 cases
ja	loc_807B9F	; default
jmp	ds:off_807BB8[eax*4] ; switch jump

loc_80792A:		; jumptable 00807923 case 1
cmp	dword ptr [esi+14h], 64h
jz	short loc_80794B
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80794B:
mov	eax, 1
mov	[esi+40h], eax
mov	[esi+0C4h], al
mov	[esi+3Ch], eax
xor	ecx, ecx
mov	[esi+0CCh], cl
mov	esi, [esi+44h]
pop	edi
mov	[esi], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	[esi+18h], ecx
pop	esi
pop	ebx
retn

loc_80797C:		; jumptable 00807923 case 2
cmp	dword ptr [esi+14h], 64h
jz	short loc_80799D
mov	edx, [esi]
mov	dword ptr [edx+14h], 14h
mov	eax, [esi]
mov	ecx, [esi+14h]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax

loc_80799A:
add	esp, 4

loc_80799D:
mov	edx, [esi+44h]
mov	eax, 1
mov	[esi+0C4h], al
xor	ecx, ecx
mov	[esi+0CCh], cl
mov	ebx, 3
mov	[esi+40h], ebx
mov	[esi+3Ch], ebx
mov	[edx], eax
mov	edi, 2
mov	[edx+8], edi
mov	[edx+0Ch], edi
mov	[edx+10h], ecx
mov	[edx+14h], ecx
mov	[edx+18h], ecx
mov	ecx, [esi+44h]
mov	[ecx+54h], edi
mov	[ecx+5Ch], eax
add	ecx, 54h
mov	[ecx+0Ch], eax
mov	[ecx+10h], eax
mov	[ecx+14h], eax
mov	[ecx+18h], eax
mov	esi, [esi+44h]
add	esi, 0A8h
mov	[esi], ebx
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	[esi+14h], eax
pop	edi
mov	[esi+18h], eax
pop	esi
pop	ebx
retn

loc_807A0A:		; jumptable 00807923 case 3
cmp	dword ptr [esi+14h], 64h
jz	short loc_80799D
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 14h
mov	edx, [esi]
mov	eax, [esi+14h]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
jmp	loc_80799A

loc_807A2D:		; jumptable 00807923 case 4
cmp	dword ptr [esi+14h], 64h
jz	short loc_807A4E
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_807A4E:
mov	edx, [esi+44h]
xor	ecx, ecx
mov	[esi+0C4h], cl
mov	eax, 1
mov	[esi+0CCh], al
mov	ebx, 4
mov	[esi+40h], ebx
mov	[esi+3Ch], ebx
mov	dword ptr [edx], 43h
mov	[edx+8], eax
mov	[edx+0Ch], eax
mov	[edx+10h], ecx
mov	[edx+14h], ecx
mov	[edx+18h], ecx
mov	edx, [esi+44h]
mov	dword ptr [edx+54h], 4Dh
mov	[edx+5Ch], eax
mov	[edx+60h], eax
mov	[edx+64h], ecx
mov	[edx+68h], ecx
mov	[edx+6Ch], ecx
add	edx, 54h
mov	edx, [esi+44h]
add	edx, 0A8h
mov	dword ptr [edx], 59h
mov	[edx+8], eax
mov	[edx+0Ch], eax
mov	[edx+10h], ecx
mov	[edx+14h], ecx
mov	[edx+18h], ecx
mov	esi, [esi+44h]
add	esi, 0FCh
pop	edi
mov	dword ptr [esi], 4Bh
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	[esi+18h], ecx
pop	esi
pop	ebx
retn

loc_807AE0:		; jumptable 00807923 case 5
cmp	dword ptr [esi+14h], 64h
jz	short loc_807B01
mov	edx, [esi]
mov	dword ptr [edx+14h], 14h
mov	eax, [esi]
mov	ecx, [esi+14h]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_807B01:
mov	edx, [esi+44h]
mov	dword ptr [esi+40h], 5
mov	eax, 1
mov	[esi+0CCh], al
xor	ecx, ecx
mov	[esi+0C4h], cl
mov	edi, 2
mov	ebx, 4
mov	[esi+3Ch], ebx
mov	[edx+8], edi
mov	[edx+0Ch], edi
mov	[edx], eax
mov	[edx+10h], ecx
mov	[edx+14h], ecx
mov	[edx+18h], ecx
mov	edx, [esi+44h]
mov	[edx+54h], edi
mov	[edx+5Ch], eax
mov	[edx+60h], eax
mov	[edx+64h], eax
mov	[edx+68h], eax
mov	[edx+6Ch], eax
add	edx, 54h
mov	edx, [esi+44h]
add	edx, 0A8h
mov	dword ptr [edx], 3
mov	[edx+8], eax
mov	[edx+0Ch], eax
mov	[edx+10h], eax
mov	[edx+14h], eax
mov	[edx+18h], eax
mov	esi, [esi+44h]
add	esi, 0FCh
mov	[esi+8], edi
mov	[esi+0Ch], edi
pop	edi
mov	[esi], ebx
mov	[esi+10h], ecx
mov	[esi+14h], ecx
mov	[esi+18h], ecx
pop	esi
pop	ebx
retn

loc_807B90:		; jumptable 00807923 case 0
push	0
push	esi
call	sub_807620
add	esp, 8
pop	edi
pop	esi
pop	ebx
retn

loc_807B9F:		; default
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 9
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4
pop	edi
pop	esi
pop	ebx
retn
sub_807910 endp

align 4
off_807BB8 dd offset loc_807B90	; jump table for switch	statement
dd offset loc_80792A
dd offset loc_80797C
dd offset loc_807A0A
dd offset loc_807A2D
dd offset loc_807AE0



sub_807BD0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
cmp	dword ptr [esi+14h], 64h
jz	short loc_807BF7
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_807BF7:
xor	ebx, ebx
cmp	[esi+44h], ebx
jnz	short loc_807C12
mov	edx, [esi+4]
mov	eax, [edx]
push	348h
push	ebx
push	esi
call	eax
add	esp, 0Ch
mov	[esi+44h], eax

loc_807C12:
push	1
push	32h
push	offset unk_14659F8
push	ebx
push	esi
mov	dword ptr [esi+38h], 8
call	sub_8072C0
push	1
push	32h
push	offset unk_1465AF8
push	1
push	esi
call	sub_8072C0
add	esp, 28h
call	sub_8075C0
lea	eax, [esi+88h]
mov	ecx, 10h
mov	dl, 5
nop

loc_807C50:
mov	[eax-10h], bl
mov	byte ptr [eax],	1
mov	[eax+10h], dl
inc	eax
sub	ecx, 1
jnz	short loc_807C50
cmp	dword ptr [esi+38h], 8
mov	[esi+0ACh], ebx
mov	[esi+0A8h], ebx
mov	[esi+0B0h], bl
mov	[esi+0B1h], bl
mov	[esi+0B2h], bl
jle	short loc_807C8A
mov	byte ptr [esi+0B2h], 1

loc_807C8A:
mov	ecx, 1
mov	edx, ecx
push	esi
mov	[esi+0B3h], bl
mov	[esi+0B4h], ebx
mov	[esi+0B8h], ebx
mov	[esi+0BCh], ebx
mov	[esi+0C0h], ebx
mov	byte ptr [esi+0C5h], 1
mov	byte ptr [esi+0C6h], 1
mov	[esi+0C7h], bl
mov	[esi+0C8h], cx
mov	[esi+0CAh], dx
call	sub_807910
add	esp, 4
pop	esi
pop	ebx
retn
sub_807BD0 endp

align 10h



; int __cdecl sub_807CE0(void *, int, int)
sub_807CE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
xor	ebx, ebx
push	edi
mov	[esi+4], ebx
cmp	eax, 3Eh
jz	short loc_807D17
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 0Ch
mov	edx, [esi]
mov	dword ptr [edx+18h], 3Eh
mov	ecx, [esi]
mov	[ecx+1Ch], eax
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_807D17:
mov	eax, [esp+10h+arg_8]
cmp	eax, 168h
jz	short loc_807D43
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 15h
mov	edx, [esi]
mov	dword ptr [edx+18h], 168h
mov	ecx, [esi]
mov	[ecx+1Ch], eax
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_807D43:
mov	edi, [esi]
mov	ebp, [esi+0Ch]
push	168h		; size_t
push	ebx		; int
push	esi		; void *
call	_memset
push	esi
mov	[esi], edi
mov	[esi+0Ch], ebp
mov	[esi+10h], bl
call	sub_8096E0
fld1
mov	[esi+8], ebx
mov	[esi+18h], ebx
mov	[esi+44h], ebx
mov	[esi+48h], ebx
mov	[esi+4Ch], ebx
mov	[esi+50h], ebx
mov	[esi+54h], ebx
add	esp, 10h
mov	[esi+58h], ebx
mov	[esi+68h], ebx
mov	[esi+5Ch], ebx
mov	[esi+6Ch], ebx
mov	[esi+60h], ebx
mov	[esi+70h], ebx
mov	[esi+64h], ebx
mov	[esi+74h], ebx
fstp	qword ptr [esi+30h]
pop	edi
mov	[esi+160h], ebx
mov	dword ptr [esi+14h], 64h
pop	esi
pop	ebp
pop	ebx
retn
sub_807CE0 endp

align 10h



sub_807DB0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	eax, [esp+arg_0]
mov	ecx, [eax+48h]
mov	dl, [esp+arg_4]
test	ecx, ecx
jz	short loc_807DC5
mov	[ecx+80h], dl

loc_807DC5:
mov	ecx, [eax+4Ch]
test	ecx, ecx
jz	short loc_807DD2
mov	[ecx+80h], dl

loc_807DD2:
mov	ecx, [eax+50h]
test	ecx, ecx
jz	short loc_807DDF
mov	[ecx+80h], dl

loc_807DDF:
mov	ecx, [eax+54h]
test	ecx, ecx
jz	short loc_807DEC
mov	[ecx+80h], dl

loc_807DEC:
push	esi
add	eax, 68h
mov	esi, 4

loc_807DF5:
mov	ecx, [eax-10h]
test	ecx, ecx
jz	short loc_807E02
mov	[ecx+111h], dl

loc_807E02:
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_807E0E
mov	[ecx+111h], dl

loc_807E0E:
add	eax, 4
sub	esi, 1
jnz	short loc_807DF5
pop	esi
retn
sub_807DB0 endp

align 10h



sub_807E20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+14h]
cmp	eax, 65h
jz	short loc_807E4E
cmp	eax, 66h
jz	short loc_807E4E
cmp	eax, 67h
jz	short loc_807E7B
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
jmp	short loc_807E75

loc_807E4E:
mov	edx, [esi+0D0h]
cmp	edx, [esi+20h]
jnb	short loc_807E6C
mov	eax, [esi]
mov	dword ptr [eax+14h], 43h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_807E6C:
mov	eax, [esi+13Ch]
mov	ecx, [eax+8]

loc_807E75:
push	esi
call	ecx
add	esp, 4

loc_807E7B:
mov	eax, [esi+13Ch]
cmp	byte ptr [eax+0Dh], 0
jnz	loc_807F11
push	ebx
push	edi
mov	ebx, 18h

loc_807E92:
mov	edx, [eax]
push	esi
call	edx
xor	edi, edi
add	esp, 4
cmp	[esi+0E0h], edi
jbe	short loc_807EF4

loc_807EA4:
cmp	dword ptr [esi+8], 0
jz	short loc_807EC7
mov	eax, [esi+8]
mov	[eax+4], edi
mov	ecx, [esi+8]
mov	edx, [esi+0E0h]
mov	[ecx+8], edx
mov	eax, [esi+8]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_807EC7:
mov	edx, [esi+148h]
mov	eax, [edx+4]
push	0
push	esi
call	eax
add	esp, 8
test	al, al
jnz	short loc_807EEB
mov	ecx, [esi]
mov	[ecx+14h], ebx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_807EEB:
inc	edi
cmp	edi, [esi+0E0h]
jb	short loc_807EA4

loc_807EF4:
mov	ecx, [esi+13Ch]
mov	edx, [ecx+8]
push	esi
call	edx
mov	eax, [esi+13Ch]
add	esp, 4
cmp	byte ptr [eax+0Dh], 0
jz	short loc_807E92
pop	edi
pop	ebx

loc_807F11:
mov	eax, [esi+14Ch]
mov	ecx, [eax+0Ch]
push	esi
call	ecx
mov	edx, [esi+18h]
mov	eax, [edx+10h]
push	esi
call	eax
push	esi
call	sub_809810
add	esp, 0Ch
pop	esi
retn
sub_807E20 endp

align 10h



sub_807F40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_4]
cmp	dword ptr [ebp+14h], 64h
push	edi
jz	short loc_807F6D
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 14h
mov	ecx, [ebp+0]
mov	edx, [ebp+14h]
mov	[ecx+18h], edx
mov	eax, [ebp+0]
mov	ecx, [eax]
push	ebp
call	ecx
add	esp, 4

loc_807F6D:
mov	edi, [esp+14h+arg_0]
mov	edx, [edi+1Ch]
mov	[ebp+1Ch], edx
mov	eax, [edi+20h]
mov	[ebp+20h], eax
mov	ecx, [edi+24h]
push	ebx
mov	[ebp+24h], ecx
mov	edx, [edi+28h]
push	esi
push	ebp
mov	[ebp+28h], edx
call	sub_807BD0
mov	eax, [edi+28h]
push	eax
push	ebp
call	sub_807620
mov	ecx, [edi+0C0h]
mov	[ebp+38h], ecx
mov	dl, [edi+10Ah]
lea	esi, [edi+90h]
add	esp, 0Ch
mov	[ebp+0B3h], dl
mov	[esp+1Ch+arg_4], esi
lea	ebx, [ebp+48h]
mov	[esp+1Ch+var_C], 4

loc_807FC8:
cmp	dword ptr [esi], 0
jz	short loc_807FF9
cmp	dword ptr [ebx], 0
jnz	short loc_807FDD
push	ebp
call	sub_809880
add	esp, 4
mov	[ebx], eax

loc_807FDD:
mov	esi, [esi]
mov	edi, [ebx]
mov	ecx, 20h
rep movsd
mov	eax, [ebx]
mov	edi, [esp+1Ch+arg_0]
mov	esi, [esp+1Ch+arg_4]
mov	byte ptr [eax+80h], 0

loc_807FF9:
add	esi, 4
add	ebx, 4

loc_807FFF:
sub	[esp+1Ch+var_C], 1
mov	[esp+1Ch+arg_4], esi
jnz	short loc_807FC8
mov	eax, [edi+24h]
cmp	eax, 1
mov	[ebp+3Ch], eax
jl	short loc_80801A
cmp	eax, 0Ah
jle	short loc_808042

loc_80801A:
mov	ecx, [ebp+0]
mov	dword ptr [ecx+14h], 1Ah
mov	edx, [ebp+0]
mov	eax, [ebp+3Ch]
mov	[edx+18h], eax
mov	ecx, [ebp+0]
mov	dword ptr [ecx+1Ch], 0Ah
mov	edx, [ebp+0]
mov	eax, [edx]
push	ebp
call	eax
add	esp, 4

loc_808042:
cmp	dword ptr [ebp+3Ch], 0
mov	edx, [ebp+44h]
mov	ebx, [edi+0C4h]
mov	[esp+1Ch+var_8], 0
mov	[esp+1Ch+arg_4], edx
jle	loc_808119

loc_808061:
mov	ecx, [ebx]
mov	[edx], ecx
mov	eax, [ebx+8]
mov	[edx+8], eax
mov	ecx, [ebx+0Ch]
mov	[edx+0Ch], ecx
mov	esi, [ebx+10h]
mov	[edx+10h], esi
cmp	esi, 3
ja	short loc_808086
cmp	dword ptr [edi+esi*4+90h], 0
jnz	short loc_8080A5

loc_808086:
mov	edx, [ebp+0]
mov	dword ptr [edx+14h], 34h
mov	eax, [ebp+0]
mov	[eax+18h], esi
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
mov	edx, [esp+20h+arg_4]
add	esp, 4

loc_8080A5:
mov	ecx, [ebx+4Ch]
mov	eax, [edi+esi*4+90h]
test	ecx, ecx
jz	short loc_8080FD
sub	ecx, eax
mov	edi, eax
mov	[esp+1Ch+var_4], ecx
mov	[esp+1Ch+var_C], 40h

loc_8080C3:
mov	ax, [ecx+edi]
cmp	ax, [edi]
jz	short loc_8080EF
mov	ecx, [ebp+0]
mov	dword ptr [ecx+14h], 2Ch
mov	edx, [ebp+0]
mov	[edx+18h], esi
mov	eax, [ebp+0]
mov	ecx, [eax]
push	ebp
call	ecx
mov	ecx, [esp+20h+var_4]
mov	edx, [esp+20h+arg_4]
add	esp, 4

loc_8080EF:
add	edi, 2
sub	[esp+1Ch+var_C], 1
jnz	short loc_8080C3
mov	edi, [esp+1Ch+arg_0]

loc_8080FD:
mov	eax, [esp+1Ch+var_8]
inc	eax
add	edx, 54h
add	ebx, 54h
cmp	eax, [ebp+3Ch]
mov	[esp+1Ch+var_8], eax
mov	[esp+1Ch+arg_4], edx
jl	loc_808061

loc_808119:
cmp	byte ptr [edi+100h], 0
pop	esi
pop	ebx
jz	short loc_808168
cmp	byte ptr [edi+101h], 1
jnz	short loc_808140
mov	byte ptr [ebp+0C5h], 1
mov	dl, [edi+102h]
mov	[ebp+0C6h], dl

loc_808140:
mov	al, [edi+103h]
mov	[ebp+0C7h], al
mov	cx, [edi+104h]
mov	[ebp+0C8h], cx
mov	dx, [edi+106h]
mov	[ebp+0CAh], dx

loc_808168:
pop	edi
pop	ebp
add	esp, 0Ch
retn
sub_807F40 endp

align 10h



sub_808170 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	[esp+arg_4], 2
push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+148h]
jz	short loc_808196
mov	eax, [esi]
mov	dword ptr [eax+14h], 4
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_808196:
xor	ecx, ecx
mov	[edi+8], ecx
mov	eax, [esi+148h]
mov	edx, 1
cmp	[esi+0E4h], edx
jg	short loc_8081D3
mov	edi, [esi+0E0h]
sub	edi, edx
mov	edx, [esi+0E8h]
cmp	[eax+8], edi
jnb	short loc_8081D0
mov	edx, [edx+0Ch]
pop	edi
mov	[eax+14h], edx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
pop	esi
retn

loc_8081D0:
mov	edx, [edx+48h]

loc_8081D3:
pop	edi
mov	[eax+14h], edx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
pop	esi
retn
sub_808170 endp

align 10h



sub_8081E0 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
arg_0= dword ptr  4

sub	esp, 60h
push	ebx
push	ebp
mov	ebp, [esp+68h+arg_0]
mov	eax, [ebp+0F8h]
mov	ebx, [ebp+148h]
dec	eax
mov	[esp+68h+var_44], eax
mov	eax, [ebp+0E0h]
push	esi
dec	eax
xor	esi, esi
cmp	[ebp+0E4h], esi
push	edi
mov	[esp+70h+var_60], ebx
mov	[esp+70h+var_3C], eax
jle	short loc_80825D
lea	edi, [ebp+0E8h]
jmp	short loc_808220
align 10h

loc_808220:
mov	eax, [edi]
mov	ecx, [eax+0Ch]
mov	ebx, [ebx+8]
mov	eax, [eax+4]
imul	ebx, ecx
mov	edx, [ebp+4]
push	0
push	ecx
mov	ecx, [esp+78h+var_60]
mov	ecx, [ecx+18h]
mov	eax, [ecx+eax*4]
mov	ecx, [edx+20h]
push	ebx
push	eax
push	ebp
call	ecx
mov	ebx, [esp+84h+var_60]
mov	[esp+esi*4+84h+var_38],	eax
inc	esi
add	esp, 14h
add	edi, 4
cmp	esi, [ebp+0E4h]
jl	short loc_808220

loc_80825D:
mov	eax, [ebx+10h]
cmp	eax, [ebx+14h]
mov	[esp+70h+var_5C], eax
jge	loc_8083EF
lea	ecx, [ecx+0]

loc_808270:
mov	esi, [ebx+0Ch]
mov	[esp+70h+var_48], esi
cmp	esi, [ebp+0F8h]
jnb	loc_8083C6

loc_808283:
xor	eax, eax
cmp	[ebp+0E4h], eax
mov	[esp+70h+var_54], eax
jle	loc_808399
lea	edx, [ebp+0E8h]
mov	[esp+70h+var_50], edx
nop

loc_8082A0:
mov	ecx, [esp+70h+var_50]
mov	edi, [ecx]
mov	ecx, [edi+34h]
mov	edx, ecx
imul	edx, esi
mov	[esp+70h+var_40], edx
cmp	esi, [esp+70h+var_44]
jnb	short loc_8082C0
mov	ebx, ecx
mov	[esp+70h+var_4C], ecx
jmp	short loc_8082C7

loc_8082C0:
mov	ebx, [edi+44h]
mov	[esp+70h+var_4C], ebx

loc_8082C7:
cmp	dword ptr [edi+38h], 0
mov	[esp+70h+var_58], 0
jle	loc_80837B
mov	ebp, [esp+70h+var_5C]
add	ebp, ebp
add	ebp, ebp
jmp	short loc_8082E7

loc_8082E3:
mov	edx, [esp+70h+var_40]

loc_8082E7:
mov	ecx, [esp+70h+var_3C]
mov	esi, [esp+70h+var_60]
cmp	[esi+8], ecx
jb	short loc_808307
mov	ecx, [esp+70h+var_58]
mov	esi, [esp+70h+var_5C]
add	ecx, esi
cmp	ecx, [edi+48h]
jl	short loc_808307
xor	edx, edx
jmp	short loc_80832E

loc_808307:
mov	ecx, [esp+70h+var_54]
mov	esi, [esp+ecx*4+70h+var_38]
mov	ecx, edx
shl	ecx, 7
add	ecx, [esi+ebp]
xor	edx, edx
test	ebx, ebx
jle	short loc_80832E
mov	esi, ebx
mov	edx, ebx

loc_808321:
mov	[esp+eax*4+70h+var_28],	ecx
inc	eax
sub	ecx, 0FFFFFF80h
sub	esi, 1
jnz	short loc_808321

loc_80832E:
cmp	edx, [edi+34h]
jge	short loc_80835E
mov	ecx, [esp+70h+var_60]
lea	esi, [ecx+eax*4+1Ch]
jmp	short loc_808340
align 10h

loc_808340:
mov	ecx, [esi]
mov	ebx, [esp+eax*4+70h+var_2C]
mov	[esp+eax*4+70h+var_28],	ecx
mov	bx, [ebx]
inc	edx
mov	[ecx], bx
inc	eax
add	esi, 4
cmp	edx, [edi+34h]
jl	short loc_808340
mov	ebx, [esp+70h+var_4C]

loc_80835E:
mov	ecx, [esp+70h+var_58]
inc	ecx
add	ebp, 4
cmp	ecx, [edi+38h]
mov	[esp+70h+var_58], ecx
jl	loc_8082E3
mov	ebp, [esp+70h+arg_0]
mov	esi, [esp+70h+var_48]

loc_80837B:
mov	ecx, [esp+70h+var_54]
add	[esp+70h+var_50], 4
inc	ecx
cmp	ecx, [ebp+0E4h]
mov	[esp+70h+var_54], ecx
jl	loc_8082A0
mov	ebx, [esp+70h+var_60]

loc_808399:
mov	edx, [ebp+15Ch]
mov	ecx, [edx+4]
lea	eax, [esp+70h+var_28]
push	eax
push	ebp
call	ecx
add	esp, 8
test	al, al
jz	short loc_8083DB
inc	esi
mov	[esp+70h+var_48], esi
cmp	esi, [ebp+0F8h]
jb	loc_808283
mov	eax, [esp+70h+var_5C]

loc_8083C6:
xor	ecx, ecx
inc	eax
mov	[ebx+0Ch], ecx
cmp	eax, [ebx+14h]
mov	[esp+70h+var_5C], eax
jl	loc_808270
jmp	short loc_8083F1

loc_8083DB:
mov	edx, [esp+70h+var_5C]
pop	edi
mov	[ebx+0Ch], esi
pop	esi
pop	ebp
mov	[ebx+10h], edx
xor	al, al
pop	ebx
add	esp, 60h
retn

loc_8083EF:
xor	ecx, ecx

loc_8083F1:
mov	edx, 1
add	[ebx+8], edx
cmp	[ebp+0E4h], edx
mov	eax, [ebp+148h]
jg	short loc_808433
mov	esi, [ebp+0E0h]
sub	esi, edx
mov	edx, [ebp+0E8h]
cmp	[eax+8], esi
jnb	short loc_808430
mov	edx, [edx+0Ch]
pop	edi
pop	esi
pop	ebp
mov	[eax+14h], edx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	al, 1
pop	ebx
add	esp, 60h
retn

loc_808430:
mov	edx, [edx+48h]

loc_808433:
pop	edi
pop	esi
pop	ebp
mov	[eax+14h], edx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	al, 1
pop	ebx
add	esp, 60h
retn
sub_8081E0 endp

align 10h



sub_808450 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, eax
mov	eax, [edi+4]
mov	ecx, [eax]
push	44h
push	1
push	edi
call	ecx
mov	edx, [esp+14h+arg_0]
mov	esi, eax
mov	[edi+148h], esi
mov	dword ptr [esi], offset	sub_808170
mov	dword ptr [esi+4], offset sub_8081E0
mov	[esi+18h], edx
mov	eax, [edi+4]
mov	ecx, [eax+4]
push	500h
push	1
push	edi
call	ecx
mov	edi, eax
push	500h		; size_t
push	edi		; void *
call	sub_809960
lea	edx, [edi+80h]
lea	eax, [edi+100h]
mov	[esi+20h], edx
mov	[esi+24h], eax
lea	ecx, [edi+180h]
lea	edx, [edi+200h]
lea	eax, [edi+280h]
mov	[esi+1Ch], edi
mov	[esi+28h], ecx
mov	[esi+2Ch], edx
mov	[esi+30h], eax
lea	ecx, [edi+300h]
lea	edx, [edi+380h]
lea	eax, [edi+400h]
add	edi, 480h
add	esp, 20h
mov	[esi+40h], edi
pop	edi
mov	[esi+34h], ecx
mov	[esi+38h], edx
mov	[esi+3Ch], eax
pop	esi
retn
sub_808450 endp

align 10h



sub_808500 proc	near

arg_0= dword ptr  4

push	1
push	esi
mov	dword ptr [esi+24h], 1
call	sub_80FC10
add	esp, 8
cmp	byte ptr [esi+0B1h], 0
push	esi
jz	short loc_80852D
mov	eax, [esi]
mov	dword ptr [eax+14h], 1
mov	ecx, [esi]
mov	edx, [ecx]
call	edx
jmp	short loc_808542

loc_80852D:
cmp	byte ptr [esi+0D4h], 0
jz	short loc_80853D
call	sub_80F120
jmp	short loc_808542

loc_80853D:
call	sub_80E4B0

loc_808542:
mov	eax, [esp+4+arg_0]
add	esp, 4
push	eax
mov	eax, esi
call	sub_808450
push	esi
call	sub_80D6B0
mov	ecx, [esi+4]
mov	edx, [ecx+18h]
push	esi
call	edx
mov	eax, [esi+14Ch]
mov	ecx, [eax]
add	esp, 0Ch
mov	[esp+arg_0], esi
jmp	ecx
sub_808500 endp

align 10h



sub_808580 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+14h], 64h
jz	short loc_8085A6
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8085A6:
push	0
push	esi
call	sub_807DB0
mov	edx, [esi]
mov	eax, [edx+10h]
push	esi
call	eax
mov	ecx, [esi+18h]
mov	edx, [ecx+8]
push	esi
call	edx
mov	eax, [esp+14h+arg_4]
push	eax
call	sub_808500
add	esp, 14h
mov	dword ptr [esi+0D0h], 0
mov	dword ptr [esi+14h], 67h
pop	esi
retn
sub_808580 endp

align 10h



sub_8085E0 proc	near
mov	eax, 0FFDCh
cmp	[esi+20h], eax
jg	short loc_8085EF
cmp	[esi+1Ch], eax
jle	short loc_808607

loc_8085EF:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 29h
mov	edx, [esi]
mov	[edx+18h], eax
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_808607:
cmp	dword ptr [esi+0C0h], 8
jz	short loc_80862E
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Fh
mov	eax, [esi]
mov	ecx, [esi+0C0h]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80862E:
mov	eax, 0Ah
cmp	[esi+24h], eax
jle	short loc_808658
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 1Ah
mov	edx, [esi]
mov	ecx, [esi+24h]
mov	[edx+18h], ecx
mov	edx, [esi]
mov	[edx+1Ch], eax
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_808658:
mov	eax, [esi+0C4h]
push	ebx
push	ebp
mov	ebx, 1
xor	ebp, ebp
cmp	[esi+24h], ebp
push	edi
mov	[esi+110h], ebx
mov	[esi+114h], ebx
jle	short loc_8086DD
lea	edi, [eax+0Ch]
lea	esp, [esp+0]

loc_808680:
mov	eax, [edi-4]
test	eax, eax
jle	short loc_808697
cmp	eax, 4
jg	short loc_808697
mov	eax, [edi]
test	eax, eax
jle	short loc_808697
cmp	eax, 4
jle	short loc_8086AA

loc_808697:
mov	edx, [esi]
mov	dword ptr [edx+14h], 12h
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8086AA:
mov	eax, [esi+110h]
mov	ecx, [edi-4]
cmp	eax, ecx
jg	short loc_8086B9
mov	eax, ecx

loc_8086B9:
mov	[esi+110h], eax
mov	eax, [esi+114h]
mov	ecx, [edi]
cmp	eax, ecx
jg	short loc_8086CD
mov	eax, ecx

loc_8086CD:
add	ebp, ebx
mov	[esi+114h], eax
add	edi, 54h
cmp	ebp, [esi+24h]
jl	short loc_808680

loc_8086DD:
mov	eax, [esi+0C4h]
xor	ebp, ebp
cmp	[esi+24h], ebp
mov	dword ptr [esi+118h], 8
jle	loc_808789
lea	edi, [eax+1Ch]
jmp	short loc_808700
align 10h

loc_808700:
mov	eax, [edi-14h]
mov	dword ptr [edi+8], 8
imul	eax, [esi+1Ch]
mov	edx, [esi+110h]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	eax
call	sub_8098C0
mov	edx, [edi-10h]
mov	[edi], eax
imul	edx, [esi+20h]
mov	ecx, [esi+114h]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
call	sub_8098C0
mov	ecx, [edi-14h]
mov	[edi+4], eax
imul	ecx, [esi+1Ch]
mov	eax, [esi+110h]
push	eax
push	ecx
call	sub_8098C0
mov	[edi+0Ch], eax
mov	eax, [edi-10h]
imul	eax, [esi+20h]
mov	edx, [esi+114h]
push	edx
push	eax
call	sub_8098C0
mov	[edi+10h], eax
mov	[edi+14h], bl
mov	dword ptr [edi+30h], 0
add	ebp, ebx
add	esp, 20h
add	edi, 54h
cmp	ebp, [esi+24h]
jl	loc_808700

loc_808789:
mov	ecx, [esi+114h]
mov	edx, [esi+20h]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
call	sub_8098C0
mov	[esi+11Ch], eax
mov	eax, [esi+124h]
add	esp, 8
cmp	eax, [esi+24h]
jl	short loc_8087CA
cmp	byte ptr [esi+0C8h], 0
jnz	short loc_8087CA
mov	ecx, [esi+190h]
pop	edi
pop	ebp
mov	byte ptr [ecx+10h], 0
pop	ebx
retn

loc_8087CA:
mov	edx, [esi+190h]
pop	edi
pop	ebp
mov	[edx+10h], bl
pop	ebx
retn
sub_8085E0 endp

align 10h



sub_8087E0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	eax, [esi+124h]
sub	esp, 8
push	ebx
mov	ebx, 1
push	edi
cmp	eax, ebx
jnz	short loc_808846
mov	ecx, [esi+128h]
mov	eax, [ecx+1Ch]
mov	[esi+138h], eax
mov	edx, [ecx+20h]
mov	[esi+13Ch], edx
mov	eax, [ecx+24h]
mov	edi, [ecx+0Ch]
mov	[ecx+40h], eax
mov	eax, [ecx+20h]
xor	edx, edx
div	edi
mov	[ecx+34h], ebx
mov	[ecx+38h], ebx
mov	[ecx+3Ch], ebx
mov	[ecx+44h], ebx
test	edx, edx
cmovz	edx, edi
mov	[ecx+48h], edx
pop	edi
mov	[esi+140h], ebx
mov	dword ptr [esi+144h], 0
pop	ebx
add	esp, 8
retn

loc_808846:
xor	edi, edi
cmp	eax, edi
jle	short loc_808851
cmp	eax, 4
jle	short loc_808878

loc_808851:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 1Ah
mov	edx, [esi]
mov	eax, [esi+124h]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	dword ptr [ecx+1Ch], 4
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_808878:
mov	ecx, [esi+110h]
mov	edx, [esi+1Ch]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
call	sub_8098C0
mov	ecx, [esi+20h]
mov	[esi+138h], eax
mov	eax, [esi+114h]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_8098C0
add	esp, 10h
cmp	[esi+124h], edi
mov	[esi+13Ch], eax
mov	[esi+140h], edi
mov	[esp+10h+var_8], edi
jle	loc_808977
lea	edx, [esi+128h]
mov	[esp+10h+var_4], edx
push	ebp

loc_8088D4:
mov	eax, [esp+14h+var_4]
mov	ecx, [eax]
mov	edi, [ecx+8]
mov	edx, [ecx+24h]
mov	eax, [ecx+1Ch]
imul	edx, edi
mov	[ecx+40h], edx
xor	edx, edx
div	edi
mov	ebp, [ecx+0Ch]
mov	eax, [ecx+20h]
mov	ebx, ebp
imul	ebx, edi
mov	[ecx+34h], edi
mov	[ecx+38h], ebp
mov	[ecx+3Ch], ebx
test	edx, edx
cmovz	edx, edi
mov	[ecx+44h], edx
xor	edx, edx
div	ebp
mov	edi, ebx
test	edx, edx
cmovz	edx, ebp
mov	[ecx+48h], edx
mov	eax, [esi+140h]
add	eax, edi
cmp	eax, 0Ah
jle	short loc_808937
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 0Dh
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_808937:
test	edi, edi
jle	short loc_80895C
jmp	short loc_808940
align 10h

loc_808940:
mov	ecx, [esi+140h]
mov	edx, [esp+14h+var_8]
dec	edi
mov	[esi+ecx*4+144h], edx
inc	dword ptr [esi+140h]
test	edi, edi
jg	short loc_808940

loc_80895C:
mov	eax, [esp+14h+var_8]
add	[esp+14h+var_4], 4
inc	eax
cmp	eax, [esi+124h]
mov	[esp+14h+var_8], eax
jl	loc_8088D4
pop	ebp

loc_808977:
pop	edi
pop	ebx
add	esp, 8
retn
sub_8087E0 endp

align 10h



sub_808980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
cmp	dword ptr [ebx+124h], 0
mov	[esp+8+var_4], 0
jle	loc_808A1B
push	ebp
lea	eax, [ebx+128h]
push	esi
mov	[esp+10h+var_8], eax
push	edi

loc_8089A5:
mov	ecx, [esp+14h+var_8]
mov	ebp, [ecx]
cmp	dword ptr [ebp+4Ch], 0
jnz	short loc_808A02
mov	esi, [ebp+10h]
cmp	esi, 3
ja	short loc_8089C3
cmp	dword ptr [ebx+esi*4+90h], 0
jnz	short loc_8089DB

loc_8089C3:
mov	edx, [ebx]
mov	dword ptr [edx+14h], 34h
mov	eax, [ebx]
mov	[eax+18h], esi
mov	ecx, [ebx]
mov	edx, [ecx]
push	ebx
call	edx
add	esp, 4

loc_8089DB:
mov	eax, [ebx+4]
mov	ecx, [eax]
push	82h
push	1
push	ebx
call	ecx
mov	esi, [ebx+esi*4+90h]
mov	ecx, 20h
mov	edi, eax
rep movsd
movsw
add	esp, 0Ch
mov	[ebp+4Ch], eax

loc_808A02:
mov	eax, [esp+14h+var_4]
add	[esp+14h+var_8], 4
inc	eax
cmp	eax, [ebx+124h]
mov	[esp+14h+var_4], eax
jl	short loc_8089A5
pop	edi
pop	esi
pop	ebp

loc_808A1B:
add	esp, 8
retn
sub_808980 endp

align 10h



sub_808A20 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
call	sub_8087E0
mov	ebx, esi
call	sub_808980
mov	eax, [esi+198h]
mov	ecx, [eax]
push	esi
call	ecx
mov	edx, [esi+188h]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, [esi+188h]
mov	edx, [esi+190h]
mov	eax, [ecx+4]
add	esp, 8
pop	esi
mov	[edx], eax
pop	ebx
retn
sub_808A20 endp

align 10h



sub_808A60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+190h]
cmp	byte ptr [edi+11h], 0
jz	short loc_808A7A
pop	edi
mov	eax, 2
pop	esi
retn

loc_808A7A:
mov	eax, [esi+194h]
mov	ecx, [eax+4]
push	ebx
push	esi
call	ecx
add	esp, 4
mov	ebx, eax
sub	eax, 1
jz	short loc_808ADA
sub	eax, 1
jnz	short loc_808B11
mov	byte ptr [edi+11h], 1
cmp	[edi+14h], al
jz	short loc_808AC3
mov	edx, [esi+194h]
cmp	[edx+0Dh], al
jz	short loc_808B11
mov	eax, [esi]
mov	dword ptr [eax+14h], 3Bh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
retn

loc_808AC3:
mov	eax, [esi+7Ch]
cmp	[esi+84h], eax
jle	short loc_808B11
mov	[esi+84h], eax
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
retn

loc_808ADA:
cmp	byte ptr [edi+14h], 0
jz	short loc_808AEF
call	sub_8085E0
mov	eax, ebx
pop	ebx
mov	byte ptr [edi+14h], 0
pop	edi
pop	esi
retn

loc_808AEF:
cmp	byte ptr [edi+10h], 0
jnz	short loc_808B08
mov	eax, [esi]
mov	dword ptr [eax+14h], 23h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_808B08:
push	esi
call	sub_808A20
add	esp, 4

loc_808B11:
mov	eax, ebx
pop	ebx
pop	edi
pop	esi
retn
sub_808A60 endp

align 10h



sub_808B20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+190h]
mov	dword ptr [eax], offset	sub_808A60
mov	byte ptr [eax+10h], 0
mov	byte ptr [eax+11h], 0
mov	byte ptr [eax+14h], 1
mov	eax, [esi]
mov	ecx, [eax+10h]
push	esi
call	ecx
mov	edx, [esi+194h]
mov	eax, [edx]
push	esi
call	eax
add	esp, 8
mov	dword ptr [esi+8Ch], 0
pop	esi
retn
sub_808B20 endp

align 10h



sub_808B60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+190h]
mov	dword ptr [ecx], offset	sub_808A60
retn
sub_808B60 endp

align 10h



sub_808B80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	18h
push	0
push	esi
call	ecx
mov	[esi+190h], eax
add	esp, 0Ch
mov	dword ptr [eax], offset	sub_808A60
mov	dword ptr [eax+4], offset sub_808B20
mov	dword ptr [eax+8], offset sub_808A20
mov	dword ptr [eax+0Ch], offset sub_808B60
mov	byte ptr [eax+10h], 0
mov	byte ptr [eax+11h], 0
mov	byte ptr [eax+14h], 1
pop	esi
retn
sub_808B80 endp

align 10h



sub_808BD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	eax, [edi+4]
mov	[esp+10h+arg_0], eax
cmp	ebx, 3B9AC9F0h
jbe	short loc_808C07
mov	ecx, [edi]
mov	dword ptr [ecx+14h], 36h
mov	edx, [edi]
mov	dword ptr [edx+18h], 1
mov	eax, [edi]
mov	ecx, [eax]
push	edi
call	ecx
add	esp, 4

loc_808C07:
mov	eax, ebx
and	eax, 7
jbe	short loc_808C1B
mov	edx, 8
sub	edx, eax
add	ebx, edx
mov	[esp+10h+arg_8], ebx

loc_808C1B:
mov	esi, [esp+10h+arg_4]
test	esi, esi
jl	short loc_808C28
cmp	esi, 2
jl	short loc_808C40

loc_808C28:
mov	eax, [edi]
mov	dword ptr [eax+14h], 0Eh
mov	ecx, [edi]
mov	[ecx+18h], esi
mov	edx, [edi]
mov	eax, [edx]
push	edi
call	eax
add	esp, 4

loc_808C40:
mov	ecx, [esp+10h+arg_0]
mov	eax, [ecx+esi*4+34h]
xor	ebp, ebp
test	eax, eax
jz	short loc_808C61
mov	edi, edi

loc_808C50:
cmp	[eax+8], ebx
jnb	loc_808CFC
mov	ebp, eax
mov	eax, [eax]
test	eax, eax
jnz	short loc_808C50

loc_808C61:
add	ebx, 10h
test	ebp, ebp
jnz	short loc_808C71
mov	esi, ds:dword_1465DAC[esi*4]
jmp	short loc_808C78

loc_808C71:
mov	esi, ds:dword_1465DB4[esi*4]

loc_808C78:
mov	eax, 3B9ACA00h
sub	eax, ebx
cmp	esi, eax
cmova	esi, eax
lea	edx, [esi+ebx]
push	edx		; size_t
push	edi		; int
call	sub_80FCD0
add	esp, 8
test	eax, eax
jnz	short loc_808CC9

loc_808C95:
shr	esi, 1
cmp	esi, 32h
jnb	short loc_808CB8
mov	eax, [edi]
mov	dword ptr [eax+14h], 36h
mov	ecx, [edi]
mov	dword ptr [ecx+18h], 2
mov	edx, [edi]
mov	eax, [edx]
push	edi
call	eax
add	esp, 4

loc_808CB8:
lea	ecx, [esi+ebx]
push	ecx		; size_t
push	edi		; int
call	sub_80FCD0
add	esp, 8
test	eax, eax
jz	short loc_808C95

loc_808CC9:
mov	ecx, [esp+10h+arg_0]
lea	edx, [esi+ebx]
add	[ecx+4Ch], edx
mov	edx, [esp+10h+arg_8]
add	esi, edx
mov	dword ptr [eax], 0
mov	dword ptr [eax+4], 0
mov	[eax+8], esi
mov	ebx, edx
test	ebp, ebp
jnz	short loc_808CF9
mov	edx, [esp+10h+arg_4]
mov	[ecx+edx*4+34h], eax
jmp	short loc_808CFC

loc_808CF9:
mov	[ebp+0], eax

loc_808CFC:
mov	ecx, [eax+4]
sub	[eax+8], ebx
pop	edi
lea	edx, [ecx+eax+10h]
pop	esi
add	ecx, ebx
pop	ebp
mov	[eax+4], ecx
mov	eax, edx
pop	ebx
retn
sub_808BD0 endp

align 10h



sub_808D20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	ebp, [edi+4]
cmp	ebx, 3B9AC9F0h
jbe	short loc_808D53
mov	eax, [edi]
mov	dword ptr [eax+14h], 36h
mov	ecx, [edi]
mov	dword ptr [ecx+18h], 3
mov	edx, [edi]
mov	eax, [edx]
push	edi
call	eax
add	esp, 4

loc_808D53:
mov	eax, ebx
and	eax, 7
jbe	short loc_808D63
mov	ecx, 8
sub	ecx, eax
add	ebx, ecx

loc_808D63:
mov	eax, [esp+10h+arg_4]
test	eax, eax
jl	short loc_808D70
cmp	eax, 2
jl	short loc_808D88

loc_808D70:
mov	edx, [edi]
mov	dword ptr [edx+14h], 0Eh
mov	ecx, [edi]
mov	[ecx+18h], eax
mov	edx, [edi]
mov	eax, [edx]
push	edi
call	eax
add	esp, 4

loc_808D88:
lea	ecx, [ebx+10h]
push	ecx		; size_t
push	edi		; int
call	sub_80FCD0
mov	esi, eax
add	esp, 8
test	esi, esi
jnz	short loc_808DB7
mov	edx, [edi]
mov	dword ptr [edx+14h], 36h
mov	eax, [edi]
mov	dword ptr [eax+18h], 4
mov	ecx, [edi]
mov	edx, [ecx]
push	edi
call	edx
add	esp, 4

loc_808DB7:
lea	eax, [ebx+10h]
add	[ebp+4Ch], eax
mov	eax, [esp+10h+arg_4]
mov	ecx, [ebp+eax*4+3Ch]
mov	[esi+4], ebx
mov	[esi], ecx
mov	dword ptr [esi+8], 0
mov	[ebp+eax*4+3Ch], esi
pop	edi
lea	eax, [esi+10h]
pop	esi
pop	ebp
pop	ebx
retn
sub_808D20 endp

align 10h



sub_808DE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_8]
xor	edx, edx
mov	eax, 3B9AC9F0h
div	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebp, [esi+4]
push	edi
mov	edi, eax
test	edi, edi
jg	short loc_808E11
mov	eax, [esi]
mov	dword ptr [eax+14h], 46h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_808E11:
mov	eax, [esp+10h+arg_C]
cmp	edi, eax
jl	short loc_808E1B
mov	edi, eax

loc_808E1B:
mov	ecx, [esp+10h+arg_4]
add	eax, eax
add	eax, eax
push	eax
push	ecx
push	esi
mov	[ebp+50h], edi
call	sub_808BD0
xor	esi, esi
add	esp, 0Ch
mov	ebp, eax
cmp	[esp+10h+arg_C], esi
jbe	short loc_808E82
jmp	short loc_808E40
align 10h

loc_808E40:
mov	eax, [esp+10h+arg_C]
mov	ecx, [esp+10h+arg_0]
sub	eax, esi
cmp	edi, eax
cmovnb	edi, eax
mov	eax, [esp+10h+arg_4]
mov	edx, edi
imul	edx, ebx
push	edx
push	eax
push	ecx
call	sub_808D20
add	esp, 0Ch
mov	ecx, edi
test	edi, edi
jbe	short loc_808E7C
lea	esp, [esp+0]

loc_808E70:
mov	[ebp+esi*4+0], eax
inc	esi
add	eax, ebx
sub	ecx, 1
jnz	short loc_808E70

loc_808E7C:
cmp	esi, [esp+10h+arg_C]
jb	short loc_808E40

loc_808E82:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn
sub_808DE0 endp

align 10h



sub_808E90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_8]
shl	ebx, 7
xor	edx, edx
mov	eax, 3B9AC9F0h
div	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebp, [esi+4]
push	edi
mov	edi, eax
test	edi, edi
jg	short loc_808EC4
mov	eax, [esi]
mov	dword ptr [eax+14h], 46h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_808EC4:
mov	eax, [esp+10h+arg_C]
cmp	edi, eax
jl	short loc_808ECE
mov	edi, eax

loc_808ECE:
mov	ecx, [esp+10h+arg_4]
add	eax, eax
add	eax, eax
push	eax
push	ecx
push	esi
mov	[ebp+50h], edi
call	sub_808BD0
xor	esi, esi
add	esp, 0Ch
mov	ebp, eax
cmp	[esp+10h+arg_C], esi
jbe	short loc_808F32
mov	edi, edi

loc_808EF0:
mov	eax, [esp+10h+arg_C]
mov	ecx, [esp+10h+arg_0]
sub	eax, esi
cmp	edi, eax
cmovnb	edi, eax
mov	eax, [esp+10h+arg_4]
mov	edx, edi
imul	edx, [esp+10h+arg_8]
shl	edx, 7
push	edx
push	eax
push	ecx
call	sub_808D20
add	esp, 0Ch
mov	ecx, edi
test	edi, edi
jbe	short loc_808F2C
mov	edi, edi

loc_808F20:
mov	[ebp+esi*4+0], eax
inc	esi
add	eax, ebx
sub	ecx, 1
jnz	short loc_808F20

loc_808F2C:
cmp	esi, [esp+10h+arg_C]
jb	short loc_808EF0

loc_808F32:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn
sub_808E90 endp

align 10h



sub_808F40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
cmp	ebx, 1
jz	short loc_808F6B
mov	eax, [esi]
mov	dword ptr [eax+14h], 0Eh
mov	ecx, [esi]
mov	[ecx+18h], ebx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_808F6B:
push	78h
push	ebx
push	esi
call	sub_808BD0
mov	ecx, [esp+18h+arg_10]
mov	edx, [esp+18h+arg_C]
mov	[eax+4], ecx
mov	ecx, [esp+18h+arg_14]
mov	[eax+8], edx
mov	dl, [esp+18h+arg_8]
mov	dword ptr [eax], 0
mov	[eax+0Ch], ecx
mov	[eax+20h], dl
mov	byte ptr [eax+22h], 0
mov	ecx, [edi+44h]
add	esp, 0Ch
mov	[eax+24h], ecx
mov	[edi+44h], eax
pop	edi
pop	esi
pop	ebx
retn
sub_808F40 endp

align 10h



sub_808FB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+4]
cmp	ebx, 1
jz	short loc_808FDB
mov	eax, [esi]
mov	dword ptr [eax+14h], 0Eh
mov	ecx, [esi]
mov	[ecx+18h], ebx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_808FDB:
push	78h
push	ebx
push	esi
call	sub_808BD0
mov	ecx, [esp+18h+arg_10]
mov	edx, [esp+18h+arg_C]
mov	[eax+4], ecx
mov	ecx, [esp+18h+arg_14]
mov	[eax+8], edx
mov	dl, [esp+18h+arg_8]
mov	dword ptr [eax], 0
mov	[eax+0Ch], ecx
mov	[eax+20h], dl
mov	byte ptr [eax+22h], 0
mov	ecx, [edi+48h]
add	esp, 0Ch
mov	[eax+24h], ecx
mov	[edi+48h], eax
pop	edi
pop	esi
pop	ebx
retn
sub_808FB0 endp

align 10h



sub_809020 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx+4]
mov	eax, [edx+44h]
push	ebp
push	esi
push	edi
xor	esi, esi
xor	edi, edi
mov	[esp+10h+arg_0], edx
test	eax, eax
jz	short loc_80905F
lea	ebx, [ebx+0]

loc_809040:
cmp	dword ptr [eax], 0
jnz	short loc_809058
mov	ecx, [eax+8]
mov	ebp, [eax+0Ch]
imul	ebp, ecx
add	esi, ebp
mov	ebp, [eax+4]
imul	ebp, ecx
add	edi, ebp

loc_809058:
mov	eax, [eax+24h]
test	eax, eax
jnz	short loc_809040

loc_80905F:
mov	eax, [edx+48h]
test	eax, eax
jz	short loc_80908B

loc_809066:
cmp	dword ptr [eax], 0
jnz	short loc_809084
mov	ecx, [eax+8]
mov	ebp, [eax+0Ch]
imul	ebp, ecx
shl	ebp, 7
add	esi, ebp
mov	ebp, [eax+4]
imul	ebp, ecx
shl	ebp, 7
add	edi, ebp

loc_809084:
mov	eax, [eax+24h]
test	eax, eax
jnz	short loc_809066

loc_80908B:
test	esi, esi
jle	loc_8091AE
mov	eax, [edx+4Ch]
push	eax
push	edi
push	esi
push	ebx
call	sub_80FCE0
add	esp, 10h
cmp	eax, edi
jl	short loc_8090AD
mov	ebp, 3B9ACA00h
jmp	short loc_8090BB

loc_8090AD:
cdq
idiv	esi
mov	ebp, eax
test	ebp, ebp
jg	short loc_8090BB
mov	ebp, 1

loc_8090BB:
mov	ecx, [esp+10h+arg_0]
mov	esi, [ecx+44h]
test	esi, esi
jz	short loc_809131

loc_8090C6:
cmp	dword ptr [esi], 0
jnz	short loc_80912A
mov	edi, [esi+4]
mov	ecx, [esi+0Ch]
xor	edx, edx
lea	eax, [edi-1]
div	ecx
inc	eax
cmp	eax, ebp
jg	short loc_8090E2
mov	[esi+10h], edi
jmp	short loc_809100

loc_8090E2:
mov	edx, [esi+8]
imul	ecx, ebp
imul	edx, edi
push	edx
lea	eax, [esi+28h]
push	eax
push	ebx
mov	[esi+10h], ecx
call	sub_80FCF0
add	esp, 0Ch
mov	byte ptr [esi+22h], 1

loc_809100:
mov	ecx, [esi+10h]
mov	edx, [esi+8]
push	ecx
push	edx
push	1
push	ebx
call	sub_808DE0
mov	[esi], eax
mov	eax, [esp+20h+arg_0]
mov	ecx, [eax+50h]
add	esp, 10h
xor	eax, eax
mov	[esi+14h], ecx
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+21h], al

loc_80912A:
mov	esi, [esi+24h]
test	esi, esi
jnz	short loc_8090C6

loc_809131:
mov	edx, [esp+10h+arg_0]
mov	esi, [edx+48h]
test	esi, esi
jz	short loc_8091AE
lea	esp, [esp+0]

loc_809140:
cmp	dword ptr [esi], 0
jnz	short loc_8091A7
mov	edi, [esi+4]
mov	ecx, [esi+0Ch]
xor	edx, edx
lea	eax, [edi-1]
div	ecx
inc	eax
cmp	eax, ebp
jg	short loc_80915C
mov	[esi+10h], edi
jmp	short loc_80917D

loc_80915C:
mov	eax, [esi+8]
imul	ecx, ebp
imul	eax, edi
shl	eax, 7
mov	[esi+10h], ecx
push	eax
lea	ecx, [esi+28h]
push	ecx
push	ebx
call	sub_80FCF0
add	esp, 0Ch
mov	byte ptr [esi+22h], 1

loc_80917D:
mov	edx, [esi+10h]
mov	eax, [esi+8]
push	edx
push	eax
push	1
push	ebx
call	sub_808E90
mov	ecx, [esp+20h+arg_0]
mov	[esi], eax
mov	edx, [ecx+50h]
add	esp, 10h
xor	eax, eax
mov	[esi+14h], edx
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	[esi+21h], al

loc_8091A7:
mov	esi, [esi+24h]
test	esi, esi
jnz	short loc_809140

loc_8091AE:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_809020 endp

align 10h



sub_8091C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ecx
mov	eax, [esi+10h]
push	ebx
mov	ebx, [esi+18h]
push	ebp
mov	ebp, [esi+8]
push	edi
imul	ebx, ebp
xor	edi, edi
mov	[esp+10h+var_4], ebp
test	eax, eax
jle	short loc_809252
jmp	short loc_8091E4
align 10h

loc_8091E0:
mov	ebp, [esp+10h+var_4]

loc_8091E4:
mov	ecx, [esi+14h]
sub	eax, edi
cmp	ecx, eax
jge	short loc_8091EF
mov	eax, ecx

loc_8091EF:
mov	ecx, [esi+18h]
mov	edx, [esi+1Ch]
add	ecx, edi
sub	edx, ecx
cmp	eax, edx
cmovge	eax, edx
mov	edx, [esi+4]
sub	edx, ecx
cmp	eax, edx
cmovge	eax, edx
test	eax, eax
jle	short loc_809252
imul	eax, ebp
cmp	[esp+10h+arg_4], 0
mov	ebp, eax
push	ebp
push	ebx
jz	short loc_809230
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	eax, [esp+18h+arg_0]
push	ecx
mov	ecx, [esi+2Ch]
lea	edx, [esi+28h]
push	edx
push	eax
call	ecx
jmp	short loc_809243

loc_809230:
mov	edx, [esi]
mov	ecx, [edx+edi*4]
mov	edx, [esp+18h+arg_0]
lea	eax, [esi+28h]
push	ecx
push	eax
mov	eax, [eax]
push	edx
call	eax

loc_809243:
add	edi, [esi+14h]
mov	eax, [esi+10h]
add	esp, 14h
add	ebx, ebp
cmp	edi, eax
jl	short loc_8091E0

loc_809252:
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn
sub_8091C0 endp

align 10h



sub_809260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ecx
mov	eax, [esi+10h]
push	ebx
mov	ebx, [esi+18h]
push	ebp
mov	ebp, [esi+8]
shl	ebp, 7
push	edi
imul	ebx, ebp
xor	edi, edi
mov	[esp+10h+var_4], ebp
test	eax, eax
jle	short loc_8092F2
jmp	short loc_809284
align 10h

loc_809280:
mov	ebp, [esp+10h+var_4]

loc_809284:
mov	ecx, [esi+14h]
sub	eax, edi
cmp	ecx, eax
jge	short loc_80928F
mov	eax, ecx

loc_80928F:
mov	ecx, [esi+18h]
mov	edx, [esi+1Ch]
add	ecx, edi
sub	edx, ecx
cmp	eax, edx
cmovge	eax, edx
mov	edx, [esi+4]
sub	edx, ecx
cmp	eax, edx
cmovge	eax, edx
test	eax, eax
jle	short loc_8092F2
imul	eax, ebp
cmp	[esp+10h+arg_4], 0
mov	ebp, eax
push	ebp
push	ebx
jz	short loc_8092D0
mov	eax, [esi]
mov	ecx, [eax+edi*4]
mov	eax, [esp+18h+arg_0]
push	ecx
mov	ecx, [esi+2Ch]
lea	edx, [esi+28h]
push	edx
push	eax
call	ecx
jmp	short loc_8092E3

loc_8092D0:
mov	edx, [esi]
mov	ecx, [edx+edi*4]
mov	edx, [esp+18h+arg_0]
lea	eax, [esi+28h]
push	ecx
push	eax
mov	eax, [eax]
push	edx
call	eax

loc_8092E3:
add	edi, [esi+14h]
mov	eax, [esi+10h]
add	esp, 14h
add	ebx, ebp
cmp	edi, eax
jl	short loc_809280

loc_8092F2:
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn
sub_809260 endp

align 10h



sub_809300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

mov	eax, [esp+arg_C]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
mov	edi, [esp+10h+arg_8]
lea	ebp, [edi+eax]
cmp	ebp, [esi+4]
ja	short loc_809326
cmp	eax, [esi+0Ch]
ja	short loc_809326
cmp	dword ptr [esi], 0
jnz	short loc_809339

loc_809326:
mov	eax, [ebx]
mov	dword ptr [eax+14h], 16h
mov	ecx, [ebx]
mov	edx, [ecx]
push	ebx
call	edx
add	esp, 4

loc_809339:
mov	eax, [esi+18h]
cmp	edi, eax
jb	short loc_809349
mov	ecx, [esi+10h]
add	ecx, eax
cmp	ebp, ecx
jbe	short loc_809398

loc_809349:
cmp	byte ptr [esi+22h], 0
jnz	short loc_809362
mov	edx, [ebx]
mov	dword ptr [edx+14h], 45h
mov	eax, [ebx]
mov	ecx, [eax]
push	ebx
call	ecx
add	esp, 4

loc_809362:
cmp	byte ptr [esi+21h], 0
jz	short loc_809377
push	1
push	ebx
call	sub_8091C0
add	esp, 8
mov	byte ptr [esi+21h], 0

loc_809377:
cmp	edi, [esi+18h]
jbe	short loc_809381
mov	[esi+18h], edi
jmp	short loc_80938D

loc_809381:
mov	eax, ebp
sub	eax, [esi+10h]
jns	short loc_80938A
xor	eax, eax

loc_80938A:
mov	[esi+18h], eax

loc_80938D:
push	0
push	ebx
call	sub_8091C0
add	esp, 8

loc_809398:
mov	edi, [esi+1Ch]
cmp	edi, ebp
jnb	short loc_8093F6
cmp	edi, [esp+10h+arg_8]
jnb	short loc_8093C3
cmp	[esp+10h+arg_10], 0
jz	short loc_8093BF
mov	edx, [ebx]
mov	dword ptr [edx+14h], 16h
mov	eax, [ebx]
mov	ecx, [eax]
push	ebx
call	ecx
add	esp, 4

loc_8093BF:
mov	edi, [esp+10h+arg_8]

loc_8093C3:
mov	al, [esp+10h+arg_10]
test	al, al
jz	short loc_8093CE
mov	[esi+1Ch], ebp

loc_8093CE:
cmp	byte ptr [esi+20h], 0
jz	short loc_809412
mov	eax, [esi+18h]
mov	ebx, [esi+8]
sub	edi, eax
sub	ebp, eax
cmp	edi, ebp
jnb	short loc_8093F6

loc_8093E2:
mov	edx, [esi]
mov	eax, [edx+edi*4]
push	ebx		; size_t
push	eax		; void *
call	sub_809960
inc	edi
add	esp, 8
cmp	edi, ebp
jb	short loc_8093E2

loc_8093F6:
cmp	[esp+10h+arg_10], 0
jz	short loc_809401

loc_8093FD:
mov	byte ptr [esi+21h], 1

loc_809401:
mov	eax, [esp+10h+arg_8]
sub	eax, [esi+18h]
mov	ecx, [esi]
pop	edi
pop	esi
pop	ebp
lea	eax, [ecx+eax*4]
pop	ebx
retn

loc_809412:
test	al, al
jnz	short loc_8093FD
mov	ecx, [ebx]
mov	dword ptr [ecx+14h], 16h
mov	edx, [ebx]
mov	eax, [edx]
push	ebx
call	eax
mov	eax, [esp+14h+arg_8]
sub	eax, [esi+18h]
mov	ecx, [esi]
add	esp, 4
pop	edi
pop	esi
pop	ebp
lea	eax, [ecx+eax*4]
pop	ebx
retn
sub_809300 endp

align 10h



sub_809440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	byte ptr  14h

mov	eax, [esp+arg_C]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
mov	edi, [esp+10h+arg_8]
lea	ebx, [edi+eax]
cmp	ebx, [esi+4]
ja	short loc_809466
cmp	eax, [esi+0Ch]
ja	short loc_809466
cmp	dword ptr [esi], 0
jnz	short loc_80947B

loc_809466:
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 16h
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
add	esp, 4

loc_80947B:
mov	eax, [esi+18h]
cmp	edi, eax
jb	short loc_80948B
mov	ecx, [esi+10h]
add	ecx, eax
cmp	ebx, ecx
jbe	short loc_8094DC

loc_80948B:
cmp	byte ptr [esi+22h], 0
jnz	short loc_8094A6
mov	edx, [ebp+0]
mov	dword ptr [edx+14h], 45h
mov	eax, [ebp+0]
mov	ecx, [eax]
push	ebp
call	ecx
add	esp, 4

loc_8094A6:
cmp	byte ptr [esi+21h], 0
jz	short loc_8094BB
push	1
push	ebp
call	sub_809260
add	esp, 8
mov	byte ptr [esi+21h], 0

loc_8094BB:
cmp	edi, [esi+18h]
jbe	short loc_8094C5
mov	[esi+18h], edi
jmp	short loc_8094D1

loc_8094C5:
mov	eax, ebx
sub	eax, [esi+10h]
jns	short loc_8094CE
xor	eax, eax

loc_8094CE:
mov	[esi+18h], eax

loc_8094D1:
push	0
push	ebp
call	sub_809260
add	esp, 8

loc_8094DC:
mov	edi, [esi+1Ch]
cmp	edi, ebx
jnb	short loc_809544
cmp	edi, [esp+10h+arg_8]
jnb	short loc_809509
cmp	[esp+10h+arg_10], 0
jz	short loc_809505
mov	edx, [ebp+0]
mov	dword ptr [edx+14h], 16h
mov	eax, [ebp+0]
mov	ecx, [eax]
push	ebp
call	ecx
add	esp, 4

loc_809505:
mov	edi, [esp+10h+arg_8]

loc_809509:
mov	al, [esp+10h+arg_10]
test	al, al
jz	short loc_809514
mov	[esi+1Ch], ebx

loc_809514:
cmp	byte ptr [esi+20h], 0
jz	short loc_809560
mov	eax, [esi+18h]
mov	ebp, [esi+8]
sub	edi, eax
sub	ebx, eax
shl	ebp, 7
cmp	edi, ebx
jnb	short loc_809544
jmp	short loc_809530
align 10h

loc_809530:
mov	edx, [esi]
mov	eax, [edx+edi*4]
push	ebp		; size_t
push	eax		; void *
call	sub_809960
inc	edi
add	esp, 8
cmp	edi, ebx
jb	short loc_809530

loc_809544:
cmp	[esp+10h+arg_10], 0
jz	short loc_80954F

loc_80954B:
mov	byte ptr [esi+21h], 1

loc_80954F:
mov	eax, [esp+10h+arg_8]
sub	eax, [esi+18h]
mov	ecx, [esi]
pop	edi
pop	esi
pop	ebp
lea	eax, [ecx+eax*4]
pop	ebx
retn

loc_809560:
test	al, al
jnz	short loc_80954B
mov	ecx, [ebp+0]
mov	dword ptr [ecx+14h], 16h
mov	edx, [ebp+0]
mov	eax, [edx]
push	ebp
call	eax
mov	eax, [esp+14h+arg_8]
sub	eax, [esi+18h]
mov	ecx, [esi]
add	esp, 4
pop	edi
pop	esi
pop	ebp
lea	eax, [ecx+eax*4]
pop	ebx
retn
sub_809440 endp

align 10h



sub_809590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [ebx+4]
push	edi
test	ebp, ebp
jl	short loc_8095A8
cmp	ebp, 2
jl	short loc_8095C0

loc_8095A8:
mov	eax, [ebx]
mov	dword ptr [eax+14h], 0Eh
mov	ecx, [ebx]
mov	[ecx+18h], ebp
mov	edx, [ebx]
mov	eax, [edx]
push	ebx
call	eax
add	esp, 4

loc_8095C0:
cmp	ebp, 1
jnz	short loc_809625
mov	edi, [esi+44h]
test	edi, edi
jz	short loc_8095EE
lea	esp, [esp+0]

loc_8095D0:
cmp	byte ptr [edi+22h], 0
jz	short loc_8095E7
mov	edx, [edi+30h]
lea	ecx, [edi+28h]
push	ecx
push	ebx
mov	byte ptr [edi+22h], 0
call	edx
add	esp, 8

loc_8095E7:
mov	edi, [edi+24h]
test	edi, edi
jnz	short loc_8095D0

loc_8095EE:
mov	edi, [esi+48h]
mov	dword ptr [esi+44h], 0
test	edi, edi
jz	short loc_80961E
lea	esp, [esp+0]

loc_809600:
cmp	byte ptr [edi+22h], 0
jz	short loc_809617
mov	ecx, [edi+30h]
lea	eax, [edi+28h]
push	eax
push	ebx
mov	byte ptr [edi+22h], 0
call	ecx
add	esp, 8

loc_809617:
mov	edi, [edi+24h]
test	edi, edi
jnz	short loc_809600

loc_80961E:
mov	dword ptr [esi+48h], 0

loc_809625:
mov	eax, [esi+ebp*4+3Ch]
mov	dword ptr [esi+ebp*4+3Ch], 0
test	eax, eax
jz	short loc_809659

loc_809635:
mov	edx, [eax+8]
mov	ecx, [eax+4]
mov	edi, [eax]
lea	ebp, [edx+ecx+10h]
push	ebp
push	eax		; void *
push	ebx		; int
call	sub_80FCC0
sub	[esi+4Ch], ebp
add	esp, 0Ch
mov	eax, edi
test	edi, edi
jnz	short loc_809635
mov	ebp, [esp+10h+arg_4]

loc_809659:
mov	eax, [esi+ebp*4+34h]
mov	dword ptr [esi+ebp*4+34h], 0
test	eax, eax
jz	short loc_809690
lea	esp, [esp+0]

loc_809670:
mov	edx, [eax+8]
mov	ecx, [eax+4]
mov	edi, [eax]
lea	ebp, [edx+ecx+10h]
push	ebp
push	eax		; void *
push	ebx		; int
call	sub_80FCC0
sub	[esi+4Ch], ebp
add	esp, 0Ch
mov	eax, edi
test	edi, edi
jnz	short loc_809670

loc_809690:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_809590 endp

align 10h



sub_8096A0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, 1
jmp	short loc_8096B0
align 10h

loc_8096B0:
push	esi
push	edi
call	sub_809590
add	esp, 8
sub	esi, 1
jns	short loc_8096B0
mov	eax, [edi+4]
push	54h
push	eax		; void *
push	edi		; int
call	sub_80FCC0
push	edi
mov	dword ptr [edi+4], 0
call	nullsub_2
add	esp, 10h
pop	edi
pop	esi
retn
sub_8096A0 endp

align 10h



sub_8096E0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
xor	ebx, ebx
push	edi
mov	[edi+4], ebx
call	sub_795DC0
push	54h		; size_t
push	edi		; int
mov	[esp+1Ch+var_4], eax
call	sub_80FCD0
mov	esi, eax
add	esp, 0Ch
cmp	esi, ebx
jnz	short loc_809726
push	edi
call	nullsub_2
mov	eax, [edi]
mov	dword ptr [eax+14h], 36h
mov	ecx, [edi]
mov	[ecx+18h], ebx
mov	edx, [edi]
mov	eax, [edx]
push	edi
call	eax
add	esp, 8

loc_809726:
mov	dword ptr [esi], offset	sub_808BD0
mov	dword ptr [esi+4], offset sub_808D20
mov	dword ptr [esi+8], offset sub_808DE0
mov	dword ptr [esi+0Ch], offset sub_808E90
mov	dword ptr [esi+10h], offset sub_808F40
mov	dword ptr [esi+14h], offset sub_808FB0
mov	dword ptr [esi+18h], offset sub_809020
mov	dword ptr [esi+1Ch], offset sub_809300
mov	dword ptr [esi+20h], offset sub_809440
mov	dword ptr [esi+24h], offset sub_809590
mov	dword ptr [esi+28h], offset sub_8096A0
mov	dword ptr [esi+30h], 3B9ACA00h
mov	ecx, [esp+10h+var_4]
mov	[esi+2Ch], ecx
mov	[esi+38h], ebx
mov	[esi+40h], ebx
mov	[esi+34h], ebx
mov	[esi+3Ch], ebx
mov	[esi+44h], ebx
mov	[esi+48h], ebx
mov	dword ptr [esi+4Ch], 54h
push	offset Str	; "JPEGMEM"
mov	[edi+4], esi
call	ds:off_15FDCE8
add	esp, 4
cmp	eax, ebx
jz	short loc_809801
lea	edx, [esp+10h+arg_0]
push	edx
lea	ecx, [esp+14h+var_4]
push	ecx
push	offset aLdC	; "%ld%c"
push	eax		; char *
mov	byte ptr [esp+20h+arg_0], 78h
call	ds:off_15FDCE4
add	esp, 10h
test	eax, eax
jle	short loc_809801
mov	al, byte ptr [esp+10h+arg_0]
cmp	al, 6Dh
jz	short loc_8097DC
cmp	al, 4Dh
jnz	short loc_8097F4

loc_8097DC:
mov	eax, [esp+10h+var_4]
imul	eax, 3E8h
imul	eax, 3E8h
pop	edi
mov	[esi+2Ch], eax
pop	esi
pop	ebx
pop	ecx
retn

loc_8097F4:
mov	eax, [esp+10h+var_4]
imul	eax, 3E8h
mov	[esi+2Ch], eax

loc_809801:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_8096E0 endp

align 10h



sub_809810 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
test	eax, eax
jz	short loc_809847
mov	eax, [eax+24h]
push	1
push	esi
call	eax
add	esp, 8
cmp	byte ptr [esi+10h], 0
jz	short loc_809840
mov	dword ptr [esi+14h], 0C8h
mov	dword ptr [esi+10Ch], 0
pop	esi
retn

loc_809840:
mov	dword ptr [esi+14h], 64h

loc_809847:
pop	esi
retn
sub_809810 endp

align 10h



sub_809850 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
push	edi
xor	edi, edi
cmp	eax, edi
jz	short loc_809868
mov	eax, [eax+28h]
push	esi
call	eax
add	esp, 4

loc_809868:
mov	[esi+14h], edi
mov	[esi+4], edi
pop	edi
pop	esi
retn
sub_809850 endp

align 10h



sub_809880 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ecx]
push	82h
push	0
push	eax
call	edx
add	esp, 0Ch
mov	byte ptr [eax+80h], 0
retn
sub_809880 endp

align 10h



sub_8098A0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+4]
mov	edx, [ecx]
push	112h
push	0
push	eax
call	edx
add	esp, 0Ch
mov	byte ptr [eax+111h], 0
retn
sub_8098A0 endp

align 10h



sub_8098C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_0]
lea	eax, [eax+ecx-1]
cdq
idiv	ecx
retn
sub_8098C0 endp




sub_8098D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
lea	ecx, [eax+esi-1]
mov	eax, ecx
cdq
idiv	esi
mov	eax, ecx
pop	esi
sub	eax, edx
retn
sub_8098D0 endp

align 10h



sub_8098F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
mov	edx, [esp+arg_C]
push	ebx
mov	ebx, [esp+4+arg_10]
push	esi
lea	esi, [ecx+eax*4]
mov	eax, [esp+8+arg_8]
push	edi
lea	edi, [eax+edx*4]
test	ebx, ebx
jle	short loc_809931
push	ebp
mov	ebp, [esp+10h+arg_14]

loc_809916:
mov	eax, [esi]
mov	ecx, [edi]
push	ebp
push	eax
push	ecx
add	esi, 4
add	edi, 4
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
dec	ebx
add	esp, 0Ch
test	ebx, ebx
jg	short loc_809916
pop	ebp

loc_809931:
pop	edi
pop	esi
pop	ebx
retn
sub_8098F0 endp

align 10h



sub_809940 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_0]
mov	edx, [esp+arg_4]
shl	eax, 7
push	eax
push	ecx
push	edx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
retn
sub_809940 endp

align 10h



; int __cdecl sub_809960(void *, size_t)
sub_809960 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	eax		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch
retn
sub_809960 endp

align 10h



sub_809980 proc	near
cmp	byte ptr [edx+48h], 0
jnz	short loc_8099F2
cmp	byte ptr [edx+10Ah], 0
jnz	short loc_8099F2
mov	eax, 3
cmp	[edx+28h], eax
jnz	short loc_8099F2
cmp	[edx+24h], eax
jnz	short loc_8099F2
cmp	dword ptr [edx+2Ch], 2
jnz	short loc_8099F2
cmp	[edx+64h], eax
jnz	short loc_8099F2
mov	ecx, [edx+0C4h]
cmp	dword ptr [ecx+8], 2
jnz	short loc_8099F2
mov	eax, 1
cmp	[ecx+5Ch], eax
jnz	short loc_8099F2
cmp	[ecx+0B0h], eax
jnz	short loc_8099F2
cmp	dword ptr [ecx+0Ch], 2
jg	short loc_8099F2
cmp	[ecx+60h], eax
jnz	short loc_8099F2
cmp	[ecx+0B4h], eax
jnz	short loc_8099F2
mov	edx, [edx+118h]
cmp	[ecx+24h], edx
jnz	short loc_8099F2
cmp	[ecx+78h], edx
jnz	short loc_8099F2
cmp	[ecx+0CCh], edx
jz	short locret_8099F4

loc_8099F2:
xor	al, al

locret_8099F4:
retn
sub_809980 endp

align 10h



sub_809A00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+14h], 0CAh
jz	short loc_809A29
mov	eax, [esi]
mov	dword ptr [eax+14h], 14h
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_809A29:
mov	eax, [esi+30h]
mov	ecx, [esi+34h]
lea	edx, ds:0[eax*8]
cmp	edx, ecx
ja	short loc_809A62
mov	eax, [esi+1Ch]
push	8
push	eax
call	sub_8098C0
mov	ecx, [esi+20h]
push	8
push	ecx
mov	[esi+5Ch], eax
call	sub_8098C0
add	esp, 10h
mov	dword ptr [esi+118h], 1
jmp	short loc_809AD7

loc_809A62:
lea	edx, ds:0[eax*4]
cmp	edx, ecx
ja	short loc_809A95
mov	eax, [esi+1Ch]
push	4
push	eax
call	sub_8098C0
mov	ecx, [esi+20h]
push	4
push	ecx
mov	[esi+5Ch], eax
call	sub_8098C0
add	esp, 10h
mov	dword ptr [esi+118h], 2
jmp	short loc_809AD7

loc_809A95:
lea	edx, [eax+eax]
cmp	edx, ecx
ja	short loc_809AC4
mov	eax, [esi+1Ch]
push	2
push	eax
call	sub_8098C0
mov	ecx, [esi+20h]
push	2
push	ecx
mov	[esi+5Ch], eax
call	sub_8098C0
add	esp, 10h
mov	dword ptr [esi+118h], 4
jmp	short loc_809AD7

loc_809AC4:
mov	edx, [esi+1Ch]
mov	eax, [esi+20h]
mov	[esi+5Ch], edx
mov	dword ptr [esi+118h], 8

loc_809AD7:
cmp	dword ptr [esi+24h], 0
mov	ecx, [esi+0C4h]
push	ebx
mov	[esi+60h], eax
push	edi
mov	[esp+0Ch+arg_0], 0
jle	short loc_809B4C
add	ecx, 0Ch
push	ebp

loc_809AF4:
mov	edx, [esi+118h]
mov	eax, edx
cmp	eax, 8
jge	short loc_809B37
mov	edi, [esi+110h]
imul	edi, edx
lea	ebx, [ebx+0]

loc_809B10:
mov	ebx, [ecx-4]
imul	ebx, eax
add	ebx, ebx
cmp	ebx, edi
jg	short loc_809B37
mov	ebp, [ecx]
mov	ebx, [esi+114h]
imul	ebp, eax
imul	ebx, edx
add	ebp, ebp
cmp	ebp, ebx
jg	short loc_809B37
add	eax, eax
cmp	eax, 8
jl	short loc_809B10

loc_809B37:
mov	[ecx+18h], eax
mov	eax, [esp+10h+arg_0]
inc	eax
add	ecx, 54h
cmp	eax, [esi+24h]
mov	[esp+10h+arg_0], eax
jl	short loc_809AF4
pop	ebp

loc_809B4C:
mov	edi, [esi+0C4h]
xor	ebx, ebx
cmp	[esi+24h], ebx
jle	short loc_809BAC
add	edi, 24h
lea	esp, [esp+0]

loc_809B60:
mov	edx, [edi-1Ch]
imul	edx, [edi]
imul	edx, [esi+1Ch]
mov	ecx, [esi+110h]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
call	sub_8098C0
mov	ecx, [edi-18h]
mov	[edi+4], eax
imul	ecx, [esi+20h]
imul	ecx, [edi]
mov	eax, [esi+114h]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_8098C0
mov	[edi+8], eax
inc	ebx
add	esp, 10h
add	edi, 54h
cmp	ebx, [esi+24h]
jl	short loc_809B60

loc_809BAC:
mov	eax, [esi+2Ch]
dec	eax
pop	edi
pop	ebx
cmp	eax, 4		; switch 5 cases
ja	short loc_809BD9 ; default
jmp	ds:off_809C10[eax*4] ; switch jump

loc_809BBE:		; jumptable 00809BB7 case 0
mov	dword ptr [esi+64h], 1
jmp	short loc_809BDF

loc_809BC7:		; jumptable 00809BB7 cases 1,2
mov	dword ptr [esi+64h], 3
jmp	short loc_809BDF

loc_809BD0:		; jumptable 00809BB7 cases 3,4
mov	dword ptr [esi+64h], 4
jmp	short loc_809BDF

loc_809BD9:		; default
mov	edx, [esi+24h]
mov	[esi+64h], edx

loc_809BDF:
cmp	byte ptr [esi+4Ah], 0
mov	eax, 1
jnz	short loc_809BED
mov	eax, [esi+64h]

loc_809BED:
mov	edx, esi
mov	[esi+68h], eax
call	sub_809980
test	al, al
jz	short loc_809C06
mov	eax, [esi+114h]
mov	[esi+6Ch], eax
pop	esi
retn

loc_809C06:
mov	dword ptr [esi+6Ch], 1
pop	esi
retn
sub_809A00 endp

align 10h
off_809C10 dd offset loc_809BBE	; jump table for switch	statement
dd offset loc_809BC7
dd offset loc_809BC7
dd offset loc_809BD0
dd offset loc_809BD0
align 10h



sub_809C30 proc	near
mov	eax, [ebx+4]
mov	ecx, [eax]
push	esi
push	edi
push	580h
push	1
push	ebx
call	ecx
mov	esi, eax
add	esi, 100h
push	100h		; size_t
lea	edx, [esi-100h]
push	0		; int
push	edx		; void *
mov	[ebx+120h], esi
call	_memset
add	esp, 18h
xor	eax, eax

loc_809C67:
mov	[eax+esi], al
inc	eax
cmp	eax, 0FFh
jle	short loc_809C67
push	180h		; size_t
sub	esi, 0FFFFFF80h
lea	eax, [esi+80h]
push	0FFh		; int
push	eax		; void *
call	_memset
push	180h		; size_t
lea	eax, [esi+200h]
push	0		; int
push	eax		; void *
call	_memset
lea	edi, [esi+380h]
mov	esi, [ebx+120h]
add	esp, 18h
mov	ecx, 20h
rep movsd
pop	edi
pop	esi
retn
sub_809C30 endp

align 10h



sub_809CC0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	edi
mov	edi, [esi+180h]
push	esi
call	sub_809A00
add	esp, 4
mov	ebx, esi
call	sub_809C30
xor	ebx, ebx
mov	edx, esi
mov	[edi+0Ch], ebx
call	sub_809980
mov	[edi+10h], al
mov	[edi+14h], ebx
mov	[edi+18h], ebx
mov	al, [esi+4Ah]
cmp	al, bl
jz	short loc_809CFA
cmp	[esi+40h], bl
jnz	short loc_809D03

loc_809CFA:
mov	[esi+58h], bl
mov	[esi+59h], bl
mov	[esi+5Ah], bl

loc_809D03:
cmp	al, bl
jz	short loc_809D65
cmp	[esi+41h], bl
jz	short loc_809D1F
mov	eax, [esi]
mov	dword ptr [eax+14h], 2Fh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_809D1F:
cmp	dword ptr [esi+64h], 3
jz	short loc_809D7A
mov	[esi+59h], bl
mov	[esi+5Ah], bl
mov	[esi+74h], ebx

loc_809D2E:
mov	byte ptr [esi+58h], 1

loc_809D32:
cmp	[esi+58h], bl
jz	short loc_809D49
push	esi
call	sub_813B70
mov	eax, [esi+1A8h]
add	esp, 4
mov	[edi+14h], eax

loc_809D49:
cmp	[esi+5Ah], bl
jnz	short loc_809D53
cmp	[esi+59h], bl
jz	short loc_809D65

loc_809D53:
push	esi
call	sub_812F10
mov	ecx, [esi+1A8h]
add	esp, 4
mov	[edi+18h], ecx

loc_809D65:
cmp	[esi+41h], bl
jnz	short loc_809DAC
push	esi
cmp	[edi+10h], bl
jz	short loc_809D90
call	sub_811CB0
add	esp, 4
jmp	short loc_809D9E

loc_809D7A:
cmp	[esi+74h], ebx
jz	short loc_809D85
mov	byte ptr [esi+59h], 1
jmp	short loc_809D32

loc_809D85:
cmp	[esi+50h], bl
jz	short loc_809D2E
mov	byte ptr [esi+5Ah], 1
jmp	short loc_809D32

loc_809D90:
call	sub_8115C0
push	esi
call	sub_810F70
add	esp, 8

loc_809D9E:
movzx	edx, byte ptr [esi+5Ah]
push	edx
push	esi
call	sub_810A20
add	esp, 8

loc_809DAC:
push	esi
call	sub_8106E0
add	esp, 4
push	esi
cmp	[esi+0C9h], bl
jz	short loc_809DCF
mov	eax, [esi]
mov	dword ptr [eax+14h], 1
mov	ecx, [esi]
mov	edx, [ecx]
call	edx
jmp	short loc_809DE3

loc_809DCF:
cmp	[esi+0C8h], bl
jz	short loc_809DDE
call	sub_80C710
jmp	short loc_809DE3

loc_809DDE:
call	sub_80BAA0

loc_809DE3:
mov	eax, [esi+190h]
add	esp, 4
cmp	[eax+10h], bl
jnz	short loc_809DFA
mov	byte ptr [esp+0Ch+var_4], bl
cmp	[esi+40h], bl
jz	short loc_809DFF

loc_809DFA:
mov	byte ptr [esp+0Ch+var_4], 1

loc_809DFF:
mov	ecx, [esp+0Ch+var_4]
push	ecx
push	esi
call	sub_80AEA0
add	esp, 8
cmp	[esi+41h], bl
jnz	short loc_809E1C
push	ebx
push	esi
call	sub_8102E0
add	esp, 8

loc_809E1C:
mov	edx, [esi+4]
mov	eax, [edx+18h]
push	esi
call	eax
mov	ecx, [esi+190h]
mov	edx, [ecx+8]
push	esi
call	edx
mov	ecx, [esi+8]
add	esp, 8
cmp	ecx, ebx
jz	short loc_809E86
cmp	[esi+40h], bl
jnz	short loc_809E86
mov	eax, [esi+190h]
cmp	[eax+10h], bl
jz	short loc_809E86
mov	eax, [esi+24h]
cmp	[esi+0C8h], bl
jz	short loc_809E5A
lea	eax, [eax+eax*2+2]

loc_809E5A:
mov	[ecx+4], ebx
mov	ecx, [esi+11Ch]
mov	edx, [esi+8]
imul	ecx, eax
mov	[edx+8], ecx
mov	eax, [esi+8]
mov	[eax+0Ch], ebx
mov	edx, [esi+8]
xor	ecx, ecx
cmp	[esi+5Ah], bl
setnz	cl
add	ecx, 2
mov	[edx+10h], ecx
inc	dword ptr [edi+0Ch]

loc_809E86:
pop	edi
pop	ebx
pop	ecx
retn
sub_809CC0 endp

align 10h



sub_809E90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+180h]
cmp	byte ptr [edi+8], 0
jz	short loc_809ED5
mov	byte ptr [edi+8], 0
mov	eax, [esi+1A8h]
mov	ecx, [eax]
push	0
push	esi
call	ecx
mov	edx, [esi+18Ch]
mov	eax, [edx]
push	2
push	esi
call	eax
mov	ecx, [esi+184h]
mov	edx, [ecx]
push	2
push	esi
call	edx
add	esp, 18h
jmp	loc_809FA2

loc_809ED5:
cmp	byte ptr [esi+4Ah], 0
jz	short loc_809F20
cmp	dword ptr [esi+74h], 0
jnz	short loc_809F20
cmp	byte ptr [esi+50h], 0
jz	short loc_809EFC
cmp	byte ptr [esi+5Ah], 0
jz	short loc_809EFC
mov	eax, [edi+18h]
mov	[esi+1A8h], eax
mov	byte ptr [edi+8], 1
jmp	short loc_809F20

loc_809EFC:
cmp	byte ptr [esi+58h], 0
jz	short loc_809F0D
mov	ecx, [edi+14h]
mov	[esi+1A8h], ecx
jmp	short loc_809F20

loc_809F0D:
mov	edx, [esi]
mov	dword ptr [edx+14h], 2Eh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_809F20:
mov	edx, [esi+19Ch]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, [esi+188h]
mov	edx, [ecx+8]
push	esi
call	edx
add	esp, 8
cmp	byte ptr [esi+41h], 0
jnz	short loc_809FA2
cmp	byte ptr [edi+10h], 0
jnz	short loc_809F54
mov	eax, [esi+1A4h]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_809F54:
mov	edx, [esi+1A0h]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4
cmp	byte ptr [esi+4Ah], 0
jz	short loc_809F7B
movzx	edx, byte ptr [edi+8]
mov	ecx, [esi+1A8h]
mov	eax, [ecx]
push	edx
push	esi
call	eax
add	esp, 8

loc_809F7B:
movzx	edx, byte ptr [edi+8]
mov	ecx, [esi+18Ch]
mov	eax, [ecx]
neg	edx
sbb	edx, edx
and	edx, 3
push	edx
push	esi
call	eax
mov	ecx, [esi+184h]
mov	edx, [ecx]
push	0
push	esi
call	edx
add	esp, 10h

loc_809FA2:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_809FE2
mov	ecx, [edi+0Ch]
xor	edx, edx
mov	[eax+0Ch], ecx
cmp	[edi+8], dl
mov	eax, [esi+8]
setnz	dl
inc	edx
add	edx, [edi+0Ch]
mov	[eax+10h], edx
cmp	byte ptr [esi+40h], 0
jz	short loc_809FE2
mov	ecx, [esi+190h]
cmp	byte ptr [ecx+11h], 0
jnz	short loc_809FE2
mov	eax, [esi+8]
xor	edx, edx
cmp	[esi+5Ah], dl
setnz	dl
inc	edx
add	[eax+10h], edx

loc_809FE2:
pop	edi
pop	esi
retn
sub_809E90 endp

align 10h



sub_809FF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	byte ptr [eax+4Ah], 0
push	esi
mov	esi, [eax+180h]
jz	short loc_80A010
mov	ecx, [eax+1A8h]
mov	edx, [ecx+8]
push	eax
call	edx
add	esp, 4

loc_80A010:
inc	dword ptr [esi+0Ch]
pop	esi
retn
sub_809FF0 endp

align 10h



sub_80A020 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	1Ch
push	1
push	esi
call	ecx
mov	[esi+180h], eax
add	esp, 0Ch
mov	dword ptr [eax], offset	sub_809E90
mov	dword ptr [eax+4], offset sub_809FF0
mov	byte ptr [eax+8], 0
call	sub_809CC0
pop	esi
retn
sub_80A020 endp

align 10h



sub_80A060 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx+188h]
xor	edx, edx
cmp	dword ptr [ecx+124h], 1
mov	[ecx+80h], edx
jle	short loc_80A089
mov	dword ptr [eax+1Ch], 1
mov	[eax+14h], edx
mov	[eax+18h], edx
retn

loc_80A089:
push	edi
mov	edi, [ecx+11Ch]
mov	ecx, [ecx+128h]
sub	edi, 1
pop	edi
jz	short loc_80A0A9
mov	ecx, [ecx+0Ch]
mov	[eax+1Ch], ecx
mov	[eax+14h], edx
mov	[eax+18h], edx
retn

loc_80A0A9:
mov	ecx, [ecx+48h]
mov	[eax+1Ch], ecx
mov	[eax+14h], edx
mov	[eax+18h], edx
retn
sub_80A060 endp

align 10h



sub_80A0C0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 34h
push	ebx
push	ebp
mov	ebp, [esp+3Ch+arg_0]
mov	eax, [ebp+11Ch]
mov	ecx, [ebp+188h]
mov	ebx, [ebp+138h]
push	esi
mov	esi, 1
sub	eax, esi
mov	[esp+40h+var_C], eax
mov	eax, [ecx+18h]
sub	ebx, esi
cmp	eax, [ecx+1Ch]
push	edi
mov	[esp+44h+var_2C], ecx
mov	[esp+44h+var_10], ebx
mov	[esp+44h+var_34], eax
jge	loc_80A299

loc_80A102:
mov	edi, [ecx+14h]
mov	[esp+44h+var_30], edi
cmp	edi, ebx
ja	loc_80A283

loc_80A111:
mov	eax, [ebp+140h]
lea	esi, [ecx+20h]
mov	ecx, [esi]
shl	eax, 7
push	eax		; size_t
push	ecx		; void *
call	sub_809960
mov	edx, [ebp+198h]
mov	eax, [edx+4]
push	esi
push	ebp
call	eax
add	esp, 10h
test	al, al
jz	loc_80A2D9
xor	ecx, ecx
cmp	[ebp+124h], ecx
mov	[esp+44h+var_28], ecx
mov	[esp+44h+var_14], ecx
jle	loc_80A269
lea	edx, [ebp+128h]
mov	[esp+44h+var_24], edx
mov	edi, edi

loc_80A160:
mov	eax, [esp+44h+var_24]
mov	esi, [eax]
cmp	byte ptr [esi+30h], 0
jnz	short loc_80A178
add	ecx, [esi+3Ch]
mov	[esp+44h+var_28], ecx
jmp	loc_80A247

loc_80A178:
mov	eax, [esi+4]
mov	edx, [ebp+19Ch]
add	eax, eax
add	eax, eax
mov	edx, [edx+eax+4]
mov	[esp+44h+var_8], edx
cmp	edi, ebx
jnb	short loc_80A196
mov	edx, [esi+34h]
jmp	short loc_80A199

loc_80A196:
mov	edx, [esi+44h]

loc_80A199:
mov	edi, [esp+44h+arg_4]
mov	eax, [eax+edi]
mov	edi, [esi+40h]
imul	edi, [esp+44h+var_30]
mov	[esp+44h+var_20], edx
mov	edx, [esi+24h]
imul	edx, [esp+44h+var_34]
lea	ebx, [eax+edx*4]
xor	eax, eax
cmp	[esi+38h], eax
mov	[esp+44h+var_4], edi
mov	[esp+44h+var_18], eax
jle	loc_80A247
lea	ebx, [ebx+0]

loc_80A1D0:
mov	edx, [esp+44h+var_C]
cmp	[ebp+80h], edx
jb	short loc_80A1E7
mov	edx, [esp+44h+var_34]
add	edx, eax
cmp	edx, [esi+48h]
jge	short loc_80A230

loc_80A1E7:
mov	edx, [esp+44h+var_20]
test	edx, edx
jle	short loc_80A230
mov	eax, [esp+44h+var_2C]
lea	ebp, [eax+ecx*4+20h]
mov	[esp+44h+var_1C], edx
jmp	short loc_80A200
align 10h

loc_80A200:
mov	ecx, [ebp+0]
mov	edx, [esp+44h+arg_0]
push	edi
push	ebx
push	ecx
push	esi
push	edx
call	[esp+58h+var_8]
add	edi, [esi+24h]
add	esp, 14h
add	ebp, 4
sub	[esp+44h+var_1C], 1
jnz	short loc_80A200
mov	eax, [esp+44h+var_18]
mov	edi, [esp+44h+var_4]
mov	ecx, [esp+44h+var_28]
mov	ebp, [esp+44h+arg_0]

loc_80A230:
add	ecx, [esi+34h]
mov	edx, [esi+24h]
inc	eax
cmp	eax, [esi+38h]
mov	[esp+44h+var_28], ecx
lea	ebx, [ebx+edx*4]
mov	[esp+44h+var_18], eax
jl	short loc_80A1D0

loc_80A247:
mov	eax, [esp+44h+var_14]
add	[esp+44h+var_24], 4
mov	ebx, [esp+44h+var_10]
mov	edi, [esp+44h+var_30]
inc	eax
cmp	eax, [ebp+124h]
mov	[esp+44h+var_14], eax
jl	loc_80A160

loc_80A269:
mov	ecx, [esp+44h+var_2C]
inc	edi
mov	[esp+44h+var_30], edi
cmp	edi, ebx
jbe	loc_80A111
mov	eax, [esp+44h+var_34]
mov	esi, 1

loc_80A283:
add	eax, esi
mov	dword ptr [ecx+14h], 0
cmp	eax, [ecx+1Ch]
mov	[esp+44h+var_34], eax
jl	loc_80A102

loc_80A299:
add	[ebp+80h], esi
mov	ecx, [ebp+80h]
mov	edx, [ebp+11Ch]
add	[ebp+88h], esi
cmp	ecx, edx
jnb	short loc_80A31A
cmp	[ebp+124h], esi
mov	eax, [ebp+188h]
jle	short loc_80A2F1
pop	edi
mov	[eax+1Ch], esi
xor	ecx, ecx
pop	esi
pop	ebp
mov	[eax+14h], ecx
mov	[eax+18h], ecx
lea	eax, [ecx+3]
pop	ebx
add	esp, 34h
retn

loc_80A2D9:
mov	eax, [esp+44h+var_2C]
mov	ecx, [esp+44h+var_34]
mov	[eax+14h], edi
pop	edi
pop	esi
pop	ebp
mov	[eax+18h], ecx
xor	eax, eax
pop	ebx
add	esp, 34h
retn

loc_80A2F1:
dec	edx
cmp	ecx, edx
mov	edx, [ebp+128h]
jnb	short loc_80A301
mov	ecx, [edx+0Ch]
jmp	short loc_80A304

loc_80A301:
mov	ecx, [edx+48h]

loc_80A304:
pop	edi
mov	[eax+1Ch], ecx
xor	ecx, ecx
pop	esi
pop	ebp
mov	[eax+14h], ecx
mov	[eax+18h], ecx
lea	eax, [ecx+3]
pop	ebx
add	esp, 34h
retn

loc_80A31A:
mov	edx, [ebp+190h]
mov	eax, [edx+0Ch]
push	ebp
call	eax
add	esp, 4
pop	edi
pop	esi
pop	ebp
mov	eax, 4
pop	ebx
add	esp, 34h
retn
sub_80A0C0 endp

align 10h



sub_80A340 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4

sub	esp, 2Ch
push	ebx
push	ebp
mov	ebp, [esp+34h+arg_0]
push	esi
push	edi
mov	edi, [ebp+188h]
xor	esi, esi
cmp	[ebp+124h], esi
mov	[esp+3Ch+var_1C], edi
jle	short loc_80A3AC
lea	eax, [ebp+128h]
mov	[esp+3Ch+var_2C], eax
lea	esp, [esp+0]

loc_80A370:
mov	ecx, [esp+3Ch+var_2C]
mov	eax, [ecx]
mov	ecx, [eax+0Ch]
mov	ebx, [ebp+80h]
mov	eax, [eax+4]
imul	ebx, ecx
mov	edx, [ebp+4]
mov	edx, [edx+20h]
push	1
push	ecx
mov	ecx, [edi+eax*4+48h]
push	ebx
push	ecx
push	ebp
call	edx
add	[esp+50h+var_2C], 4
mov	[esp+esi*4+50h+var_10],	eax
inc	esi
add	esp, 14h
cmp	esi, [ebp+124h]
jl	short loc_80A370

loc_80A3AC:
mov	esi, [edi+18h]
cmp	esi, [edi+1Ch]
mov	[esp+3Ch+var_18], esi
jge	loc_80A4BE
lea	esp, [esp+0]

loc_80A3C0:
mov	eax, [edi+14h]
mov	[esp+3Ch+var_2C], eax
cmp	eax, [ebp+138h]
jnb	loc_80A4A9

loc_80A3D3:
xor	edx, edx
xor	ebx, ebx
cmp	[ebp+124h], edx
mov	[esp+3Ch+var_20], edx
jle	loc_80A47D
lea	eax, [ebp+128h]
mov	[esp+3Ch+var_28], eax

loc_80A3F1:
mov	ecx, [esp+3Ch+var_28]
mov	edi, [ecx]
mov	ecx, [edi+34h]
mov	eax, ecx
imul	eax, [esp+3Ch+var_2C]
cmp	dword ptr [edi+38h], 0
mov	[esp+3Ch+var_24], 0
jle	short loc_80A463
mov	edx, [esp+edx*4+3Ch+var_10]
shl	eax, 7
mov	[esp+3Ch+var_14], eax
lea	ebp, [edx+esi*4]
lea	ecx, [ecx+0]

loc_80A420:
mov	eax, [ebp+0]
add	eax, [esp+3Ch+var_14]
xor	edx, edx
test	ecx, ecx
jle	short loc_80A446
mov	ecx, [esp+3Ch+var_1C]
lea	esi, [ecx+ebx*4+20h]

loc_80A435:
mov	[esi], eax
mov	ecx, [edi+34h]
inc	edx
inc	ebx
add	esi, 4
sub	eax, 0FFFFFF80h
cmp	edx, ecx
jl	short loc_80A435

loc_80A446:
mov	eax, [esp+3Ch+var_24]
inc	eax
add	ebp, 4
cmp	eax, [edi+38h]
mov	[esp+3Ch+var_24], eax
jl	short loc_80A420
mov	ebp, [esp+3Ch+arg_0]
mov	edx, [esp+3Ch+var_20]
mov	esi, [esp+3Ch+var_18]

loc_80A463:
add	[esp+3Ch+var_28], 4
inc	edx
cmp	edx, [ebp+124h]
mov	[esp+3Ch+var_20], edx
jl	loc_80A3F1
mov	edi, [esp+3Ch+var_1C]

loc_80A47D:
mov	edx, [ebp+198h]
lea	eax, [edi+20h]
push	eax
mov	eax, [edx+4]
push	ebp
call	eax
add	esp, 8
test	al, al
jz	short loc_80A4FD
mov	eax, [esp+3Ch+var_2C]
inc	eax
mov	[esp+3Ch+var_2C], eax
cmp	eax, [ebp+138h]
jb	loc_80A3D3

loc_80A4A9:
inc	esi
mov	dword ptr [edi+14h], 0
cmp	esi, [edi+1Ch]
mov	[esp+3Ch+var_18], esi
jl	loc_80A3C0

loc_80A4BE:
mov	edx, [ebp+11Ch]
mov	esi, 1
add	[ebp+80h], esi
mov	ecx, [ebp+80h]
cmp	ecx, edx
jnb	short loc_80A53A
cmp	[ebp+124h], esi
mov	eax, [ebp+188h]
jle	short loc_80A511
xor	ecx, ecx
pop	edi
mov	[eax+1Ch], esi
mov	[eax+14h], ecx
mov	[eax+18h], ecx
lea	eax, [esi+2]
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn

loc_80A4FD:
mov	ecx, [esp+3Ch+var_2C]
mov	[edi+18h], esi
mov	[edi+14h], ecx
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 2Ch
retn

loc_80A511:
dec	edx
cmp	ecx, edx
mov	edx, [ebp+128h]
jnb	short loc_80A521
mov	ecx, [edx+0Ch]
jmp	short loc_80A524

loc_80A521:
mov	ecx, [edx+48h]

loc_80A524:
pop	edi
mov	[eax+1Ch], ecx
xor	ecx, ecx
pop	esi
pop	ebp
mov	[eax+14h], ecx
mov	[eax+18h], ecx
lea	eax, [ecx+3]
pop	ebx
add	esp, 2Ch
retn

loc_80A53A:
mov	edx, [ebp+190h]
mov	eax, [edx+0Ch]
push	ebp
call	eax
add	esp, 4
pop	edi
pop	esi
pop	ebp
mov	eax, 4
pop	ebx
add	esp, 2Ch
retn
sub_80A340 endp

align 10h



sub_80A560 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 20h
push	ebp
push	edi
mov	edi, [esp+28h+arg_0]
mov	eax, [edi+11Ch]
mov	ebp, [edi+188h]
dec	eax
mov	[esp+28h+var_C], eax
lea	ebx, [ebx+0]

loc_80A580:
mov	eax, [edi+7Ch]
mov	ecx, [edi+84h]
cmp	eax, ecx
jl	short loc_80A59D
jnz	short loc_80A5B5
mov	eax, [edi+80h]
cmp	eax, [edi+88h]
ja	short loc_80A5B5

loc_80A59D:
mov	ecx, [edi+190h]
mov	edx, [ecx]
push	edi
call	edx
add	esp, 4
test	eax, eax
jnz	short loc_80A580
pop	edi
pop	ebp
add	esp, 20h
retn

loc_80A5B5:
push	ebx
xor	ebx, ebx
cmp	[edi+24h], ebx
push	esi
mov	esi, [edi+0C4h]
mov	[esp+30h+var_14], ebx
jle	loc_80A6C6
add	ebp, 48h
mov	[esp+30h+var_10], ebp

loc_80A5D3:
cmp	byte ptr [esi+30h], 0
jz	loc_80A6AA
mov	eax, [esi+0Ch]
mov	edx, [edi+88h]
mov	ecx, [edi+4]
imul	edx, eax
mov	ecx, [ecx+20h]
push	0
push	eax
mov	eax, [ebp+0]
push	edx
push	eax
push	edi
call	ecx
mov	edx, [esp+44h+var_C]
add	esp, 14h
mov	[esp+30h+var_8], eax
cmp	[edi+88h], edx
jnb	short loc_80A616
mov	eax, [esi+0Ch]
mov	[esp+30h+var_20], eax
jmp	short loc_80A62C

loc_80A616:
mov	ecx, [esi+0Ch]
mov	eax, [esi+20h]
xor	edx, edx
div	ecx
mov	[esp+30h+var_20], edx
test	edx, edx
jnz	short loc_80A62C
mov	[esp+30h+var_20], ecx

loc_80A62C:
mov	ecx, [edi+19Ch]
mov	edx, [ecx+ebx*4+4]
mov	eax, [esp+30h+arg_4]
mov	ecx, [eax+ebx*4]
mov	[esp+30h+var_1C], ecx
xor	ecx, ecx
cmp	[esp+30h+var_20], ecx
mov	[esp+30h+var_4], edx
mov	[esp+30h+var_18], ecx
jle	short loc_80A6AA
mov	eax, [esi+1Ch]

loc_80A654:
mov	edx, [esp+30h+var_8]
mov	ebx, [edx+ecx*4]
xor	edi, edi
xor	ebp, ebp
test	eax, eax
jbe	short loc_80A689

loc_80A663:
mov	eax, [esp+30h+var_1C]
mov	ecx, [esp+30h+arg_0]
push	edi
push	eax
push	ebx
push	esi
push	ecx
call	[esp+44h+var_4]
mov	eax, [esi+1Ch]
add	edi, [esi+24h]
inc	ebp
add	esp, 14h
sub	ebx, 0FFFFFF80h
cmp	ebp, eax
jb	short loc_80A663
mov	ecx, [esp+30h+var_18]

loc_80A689:
mov	edi, [esp+30h+var_1C]
mov	edx, [esi+24h]
inc	ecx
cmp	ecx, [esp+30h+var_20]
lea	edx, [edi+edx*4]
mov	[esp+30h+var_1C], edx
mov	[esp+30h+var_18], ecx
jl	short loc_80A654
mov	ebx, [esp+30h+var_14]
mov	edi, [esp+30h+arg_0]

loc_80A6AA:
mov	ebp, [esp+30h+var_10]
inc	ebx
add	ebp, 4
add	esi, 54h
cmp	ebx, [edi+24h]
mov	[esp+30h+var_14], ebx
mov	[esp+30h+var_10], ebp
jl	loc_80A5D3

loc_80A6C6:
inc	dword ptr [edi+88h]
mov	eax, [edi+88h]
cmp	eax, [edi+11Ch]
pop	esi
pop	ebx
sbb	eax, eax
pop	edi
add	eax, 4
pop	ebp
add	esp, 20h
retn
sub_80A560 endp

align 10h



sub_80A6F0 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4

sub	esp, 8
cmp	byte ptr [edi+0C8h], 0
push	esi
mov	esi, [edi+188h]
mov	[esp+0Ch+var_5], 0
jz	loc_80A847
cmp	dword ptr [edi+8Ch], 0
jz	loc_80A847
cmp	dword ptr [esi+70h], 0
push	ebx
mov	ebx, 1
jnz	short loc_80A741
mov	eax, [edi+24h]
mov	ecx, [edi+4]
lea	edx, [eax+eax*2]
mov	eax, [ecx]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	ebx
push	edi
call	eax
add	esp, 0Ch
mov	[esi+70h], eax

loc_80A741:
mov	edx, [esi+70h]
mov	eax, [edi+0C4h]
xor	esi, esi
cmp	[edi+24h], esi
push	ebp
jle	loc_80A833
xor	ebp, ebp
add	eax, 4Ch
mov	[esp+14h+var_4], eax
nop

loc_80A760:
mov	eax, [eax]
test	eax, eax
jz	loc_80A83E
cmp	word ptr [eax],	0
jz	loc_80A83E
cmp	word ptr [eax+2], 0
jz	loc_80A83E
cmp	word ptr [eax+10h], 0
jz	loc_80A83E
cmp	word ptr [eax+20h], 0
jz	loc_80A83E
cmp	word ptr [eax+12h], 0
jz	loc_80A83E
cmp	word ptr [eax+4], 0
jz	loc_80A83E
mov	eax, [edi+8Ch]
add	eax, ebp
cmp	dword ptr [eax], 0
jl	loc_80A83E
mov	ecx, [eax+4]
mov	[edx+4], ecx
cmp	dword ptr [eax+4], 0
jz	short loc_80A7CC
mov	[esp+14h+var_5], bl

loc_80A7CC:
mov	ecx, 8
mov	ebx, [ecx+eax]
mov	[ecx+edx], ebx
cmp	dword ptr [ecx+eax], 0
lea	ebx, [ecx-7]
jz	short loc_80A7E4
mov	[esp+14h+var_5], bl

loc_80A7E4:
mov	ecx, [eax+0Ch]
mov	[edx+0Ch], ecx
cmp	dword ptr [eax+0Ch], 0
jz	short loc_80A7F4
mov	[esp+14h+var_5], bl

loc_80A7F4:
mov	ecx, [eax+10h]
mov	[edx+10h], ecx
cmp	dword ptr [eax+10h], 0
jz	short loc_80A804
mov	[esp+14h+var_5], bl

loc_80A804:
mov	ecx, [eax+14h]
mov	[edx+14h], ecx
cmp	dword ptr [eax+14h], 0
jz	short loc_80A814
mov	[esp+14h+var_5], bl

loc_80A814:
mov	eax, [esp+14h+var_4]
add	esi, ebx
add	eax, 54h
add	edx, 18h
add	ebp, 100h
cmp	esi, [edi+24h]
mov	[esp+14h+var_4], eax
jl	loc_80A760

loc_80A833:
mov	al, [esp+14h+var_5]
pop	ebp
pop	ebx
pop	esi
add	esp, 8
retn

loc_80A83E:
pop	ebp
pop	ebx
xor	al, al
pop	esi
add	esp, 8
retn

loc_80A847:
xor	al, al
pop	esi
add	esp, 8
retn
sub_80A6F0 endp

align 10h



sub_80A850 proc	near

var_FE=	byte ptr -0FEh
var_FD=	byte ptr -0FDh
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_7E=	word ptr -7Eh
var_7C=	word ptr -7Ch
var_70=	word ptr -70h
var_6E=	word ptr -6Eh
var_60=	word ptr -60h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 100h
push	esi
mov	esi, [esp+104h+arg_0]
mov	eax, [esi+188h]
mov	ecx, [esi+7Ch]
mov	[esp+104h+var_AC], eax
mov	eax, [esi+11Ch]
dec	eax
cmp	ecx, [esi+84h]
mov	[esp+104h+var_8C], eax
jg	short loc_80A8CB
mov	edi, edi

loc_80A880:
mov	eax, [esi+190h]
cmp	byte ptr [eax+11h], 0
jnz	short loc_80A8CB
mov	edx, [esi+7Ch]
cmp	edx, [esi+84h]
jnz	short loc_80A8B0
xor	ecx, ecx
cmp	[esi+16Ch], ecx
setz	cl
add	ecx, [esi+88h]
cmp	[esi+80h], ecx
ja	short loc_80A8CB

loc_80A8B0:
mov	edx, [eax]
push	esi
call	edx
add	esp, 4
test	eax, eax
jz	loc_80A942
mov	eax, [esi+7Ch]
cmp	eax, [esi+84h]
jle	short loc_80A880

loc_80A8CB:
cmp	dword ptr [esi+24h], 0
push	ebx
mov	ebx, [esi+0C4h]
mov	[esp+108h+var_B8], 0
mov	[esp+108h+var_DC], ebx
jle	loc_80AE1C
mov	ecx, [esp+108h+var_AC]
mov	eax, 0FFFFFFB8h
lea	edx, [ecx+48h]
sub	eax, ecx
push	ebp
mov	[esp+10Ch+var_B0], 0
mov	[esp+10Ch+var_E4], edx
mov	[esp+10Ch+var_84], eax
push	edi
jmp	short loc_80A910
align 10h

loc_80A910:
cmp	byte ptr [ebx+30h], 0
jz	loc_80ADF0
mov	eax, [esp+110h+arg_0]
mov	esi, [eax+88h]
mov	ecx, [ebx+0Ch]
cmp	esi, [esp+110h+var_8C]
jnb	short loc_80A94C
mov	eax, ecx
mov	[esp+110h+var_FC], eax
add	eax, eax
mov	[esp+110h+var_FD], 0
jmp	short loc_80A968

loc_80A942:
xor	eax, eax
pop	esi
add	esp, 100h
retn

loc_80A94C:
mov	eax, [ebx+20h]
xor	edx, edx
div	ecx
mov	eax, edx
mov	[esp+110h+var_FC], eax
test	eax, eax
jnz	short loc_80A963
mov	eax, ecx
mov	[esp+110h+var_FC], ecx

loc_80A963:
mov	[esp+110h+var_FD], 1

loc_80A968:
mov	edi, [esp+110h+arg_0]
push	0
test	esi, esi
jbe	short loc_80A99A
mov	edx, [edi+4]
dec	esi
imul	esi, ecx
add	eax, ecx
mov	ecx, [edx+20h]
push	eax
push	esi
mov	esi, [esp+11Ch+var_E4]
mov	eax, [esi]
push	eax
push	edi
call	ecx
mov	edx, [ebx+0Ch]
lea	eax, [eax+edx*4]
mov	[esp+124h+var_FE], 0
jmp	short loc_80A9B2

loc_80A99A:
mov	esi, [esp+114h+var_E4]
mov	edx, [esi]
mov	ecx, [edi+4]
push	eax
mov	eax, [ecx+20h]
push	0
push	edx
push	edi
call	eax
mov	[esp+124h+var_FE], 1

loc_80A9B2:
mov	ecx, [esp+124h+var_AC]
mov	[esp+124h+var_A4], eax
mov	eax, [ecx+70h]
add	eax, [esp+124h+var_B0]
add	esp, 14h
mov	[esp+110h+var_F0], eax
mov	eax, [ebx+4Ch]
movzx	edx, word ptr [eax]
movzx	ecx, word ptr [eax+2]
mov	[esp+110h+var_F4], edx
movzx	edx, word ptr [eax+10h]
mov	[esp+110h+var_98], ecx
movzx	ecx, word ptr [eax+20h]
mov	[esp+110h+var_9C], edx
movzx	edx, word ptr [eax+12h]
movzx	eax, word ptr [eax+4]
mov	[esp+110h+var_90], ecx
mov	ecx, [edi+19Ch]
add	ecx, [esp+110h+var_84]
cmp	[esp+110h+var_FC], 0
mov	[esp+110h+var_94], edx
mov	edx, [ecx+esi+4]
mov	ecx, [esp+110h+var_B8]
mov	[esp+110h+var_A8], eax
mov	eax, [esp+110h+arg_4]
mov	[esp+110h+var_88], edx
mov	edx, [eax+ecx*4]
mov	[esp+110h+var_C8], edx
mov	[esp+110h+var_C0], 0
jle	loc_80ADF0
lea	ecx, [ecx+0]

loc_80AA40:
cmp	[esp+110h+var_FE], 0
mov	esi, [esp+110h+var_A4]
mov	edx, [esp+110h+var_C0]
mov	edi, [esi+edx*4]
mov	[esp+110h+var_F8], edi
jz	short loc_80AA5C
mov	ecx, edi
test	edx, edx
jz	short loc_80AA60

loc_80AA5C:
mov	ecx, [esi+edx*4-4]

loc_80AA60:
cmp	[esp+110h+var_FD], 0
jz	short loc_80AA72
mov	eax, [esp+110h+var_FC]
dec	eax
cmp	edx, eax
mov	eax, edi
jz	short loc_80AA76

loc_80AA72:
mov	eax, [esi+edx*4+4]

loc_80AA76:
mov	edx, [esp+110h+var_F8]
movsx	esi, word ptr [edx]
movsx	edi, word ptr [ecx]
movsx	ebp, word ptr [eax]
mov	edx, [ebx+1Ch]
dec	edx
sub	eax, 0FFFFFF80h
sub	ecx, 0FFFFFF80h
mov	[esp+110h+var_D4], edi
mov	[esp+110h+var_EC], edi
mov	[esp+110h+var_E0], esi
mov	[esp+110h+var_B4], esi
mov	[esp+110h+var_CC], ebp
mov	[esp+110h+var_E8], ebp
mov	[esp+110h+var_D8], 0
mov	[esp+110h+var_A0], edx
mov	[esp+110h+var_D0], 0
mov	[esp+110h+var_C4], eax
mov	[esp+110h+var_BC], ecx

loc_80AAC1:
mov	ecx, [esp+110h+var_F8]
push	1
lea	eax, [esp+114h+var_80]
push	eax
push	ecx
call	sub_809940
mov	edx, [esp+11Ch+var_A0]
add	esp, 0Ch
cmp	[esp+110h+var_D0], edx
jnb	short loc_80AB03
mov	eax, [esp+110h+var_BC]
movsx	ecx, word ptr [eax]
mov	eax, [esp+110h+var_C4]
mov	edx, [esp+110h+var_F8]
movsx	esi, word ptr [edx+80h]
mov	[esp+110h+var_D4], ecx
movsx	ecx, word ptr [eax]
mov	[esp+110h+var_CC], ecx

loc_80AB03:
mov	edx, [esp+110h+var_F0]
mov	ecx, [edx+4]
test	ecx, ecx
jz	short loc_80AB77
cmp	[esp+110h+var_7E], 0
jnz	short loc_80AB77
mov	eax, [esp+110h+var_B4]
mov	ebx, [esp+110h+var_98]
sub	eax, esi
imul	eax, [esp+110h+var_F4]
lea	edx, [eax+eax*8]
mov	eax, ebx
add	edx, edx
shl	eax, 7
shl	ebx, 8
add	edx, edx
js	short loc_80AB52
add	eax, edx
cdq
idiv	ebx
test	ecx, ecx
jle	short loc_80AB6B
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80AB6B
lea	eax, [edx-1]
jmp	short loc_80AB6B

loc_80AB52:
sub	eax, edx
cdq
idiv	ebx
test	ecx, ecx
jle	short loc_80AB69
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80AB69
lea	eax, [edx-1]

loc_80AB69:
neg	eax

loc_80AB6B:
mov	ebx, [esp+110h+var_DC]
mov	[esp+110h+var_7E], ax

loc_80AB77:
mov	eax, [esp+110h+var_F0]
mov	ecx, [eax+8]
test	ecx, ecx
jz	short loc_80ABED
cmp	[esp+110h+var_70], 0
jnz	short loc_80ABED
mov	eax, [esp+110h+var_EC]
sub	eax, [esp+110h+var_E8]
mov	ebx, [esp+110h+var_9C]
imul	eax, [esp+110h+var_F4]
lea	edx, [eax+eax*8]
mov	eax, ebx
add	edx, edx
shl	eax, 7
shl	ebx, 8
add	edx, edx
js	short loc_80ABC8
add	eax, edx
cdq
idiv	ebx
test	ecx, ecx
jle	short loc_80ABE1
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80ABE1
lea	eax, [edx-1]
jmp	short loc_80ABE1

loc_80ABC8:
sub	eax, edx
cdq
idiv	ebx
test	ecx, ecx
jle	short loc_80ABDF
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80ABDF
lea	eax, [edx-1]

loc_80ABDF:
neg	eax

loc_80ABE1:
mov	ebx, [esp+110h+var_DC]
mov	[esp+110h+var_70], ax

loc_80ABED:
mov	ecx, [esp+110h+var_F0]
mov	ecx, [ecx+0Ch]
test	ecx, ecx
jz	short loc_80AC6F
cmp	[esp+110h+var_60], 0
jnz	short loc_80AC6F
mov	edx, [esp+110h+var_E0]
mov	ebx, [esp+110h+var_90]
lea	eax, [edx+edx]
mov	edx, eax
mov	eax, [esp+110h+var_E8]
sub	eax, edx
add	eax, [esp+110h+var_EC]
imul	eax, [esp+110h+var_F4]
lea	edx, [eax+eax*8]
mov	eax, ebx
shl	eax, 7
shl	ebx, 8
test	edx, edx
jl	short loc_80AC4A
add	eax, edx
cdq
idiv	ebx
test	ecx, ecx
jle	short loc_80AC63
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80AC63
lea	eax, [edx-1]
jmp	short loc_80AC63

loc_80AC4A:
sub	eax, edx
cdq
idiv	ebx
test	ecx, ecx
jle	short loc_80AC61
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80AC61
lea	eax, [edx-1]

loc_80AC61:
neg	eax

loc_80AC63:
mov	ebx, [esp+110h+var_DC]
mov	[esp+110h+var_60], ax

loc_80AC6F:
mov	eax, [esp+110h+var_F0]
mov	ecx, [eax+10h]
test	ecx, ecx
jz	short loc_80ACE3
cmp	[esp+110h+var_6E], 0
jnz	short loc_80ACE3
mov	eax, [esp+110h+var_CC]
sub	eax, ebp
sub	eax, [esp+110h+var_D4]
add	eax, edi
imul	eax, [esp+110h+var_F4]
mov	edi, [esp+110h+var_94]
lea	edx, [eax+eax*4]
mov	eax, edi
shl	eax, 7
shl	edi, 8
test	edx, edx
jl	short loc_80ACC2
add	eax, edx
cdq
idiv	edi
test	ecx, ecx
jle	short loc_80ACDB
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80ACDB
lea	eax, [edx-1]
jmp	short loc_80ACDB

loc_80ACC2:
sub	eax, edx
cdq
idiv	edi
test	ecx, ecx
jle	short loc_80ACD9
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80ACD9
lea	eax, [edx-1]

loc_80ACD9:
neg	eax

loc_80ACDB:
mov	[esp+110h+var_6E], ax

loc_80ACE3:
mov	ecx, [esp+110h+var_F0]
mov	ecx, [ecx+14h]
test	ecx, ecx
jz	short loc_80AD5C
cmp	[esp+110h+var_7C], 0
jnz	short loc_80AD5C
mov	edx, [esp+110h+var_E0]
mov	edi, [esp+110h+var_A8]
lea	eax, [edx+edx]
mov	edx, eax
mov	eax, esi
sub	eax, edx
add	eax, [esp+110h+var_B4]
imul	eax, [esp+110h+var_F4]
lea	edx, [eax+eax*8]
mov	eax, edi
shl	eax, 7
shl	edi, 8
test	edx, edx
jl	short loc_80AD3B
add	eax, edx
cdq
idiv	edi
test	ecx, ecx
jle	short loc_80AD54
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80AD54
lea	eax, [edx-1]
jmp	short loc_80AD54

loc_80AD3B:
sub	eax, edx
cdq
idiv	edi
test	ecx, ecx
jle	short loc_80AD52
mov	edx, 1
shl	edx, cl
cmp	eax, edx
jl	short loc_80AD52
lea	eax, [edx-1]

loc_80AD52:
neg	eax

loc_80AD54:
mov	[esp+110h+var_7C], ax

loc_80AD5C:
mov	eax, [esp+110h+var_D8]
mov	ecx, [esp+110h+var_C8]
push	eax
mov	eax, [esp+114h+arg_0]
push	ecx
lea	edx, [esp+118h+var_80]
push	edx
push	ebx
push	eax
call	[esp+124h+var_88]
mov	eax, [esp+124h+var_CC]
mov	ebp, [esp+124h+var_E8]
mov	ecx, [esp+124h+var_D4]
mov	edi, [esp+124h+var_EC]
mov	edx, [esp+124h+var_E0]
mov	[esp+124h+var_E8], eax
mov	eax, 80h
add	[esp+124h+var_F8], eax
add	[esp+124h+var_BC], eax
add	[esp+124h+var_C4], eax
mov	eax, [esp+124h+var_D0]
mov	[esp+124h+var_EC], ecx
mov	ecx, [ebx+24h]
add	[esp+124h+var_D8], ecx
inc	eax
add	esp, 14h
mov	[esp+110h+var_B4], edx
mov	[esp+110h+var_E0], esi
mov	[esp+110h+var_D0], eax
cmp	eax, [esp+110h+var_A0]
jbe	loc_80AAC1
mov	eax, [esp+110h+var_C8]
mov	edx, ecx
lea	ecx, [eax+edx*4]
mov	eax, [esp+110h+var_C0]
inc	eax
cmp	eax, [esp+110h+var_FC]
mov	[esp+110h+var_C8], ecx
mov	[esp+110h+var_C0], eax
jl	loc_80AA40

loc_80ADF0:
mov	eax, [esp+110h+var_B8]
mov	edx, [esp+110h+arg_0]
add	[esp+110h+var_B0], 18h
add	[esp+110h+var_E4], 4
inc	eax
add	ebx, 54h
cmp	eax, [edx+24h]
mov	[esp+110h+var_B8], eax
mov	[esp+110h+var_DC], ebx
jl	loc_80A910
pop	edi
pop	ebp

loc_80AE1C:
mov	ecx, [esp+108h+arg_0]
inc	dword ptr [ecx+88h]
mov	eax, [ecx+88h]
cmp	eax, [ecx+11Ch]
pop	ebx
sbb	eax, eax
add	eax, 4
pop	esi
add	esp, 100h
retn
sub_80A850 endp

align 10h



sub_80AE50 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+188h]
cmp	dword ptr [esi+10h], 0
jz	short loc_80AE8C
cmp	byte ptr [edi+49h], 0
jz	short loc_80AE85
call	sub_80A6F0
test	al, al
jz	short loc_80AE85
mov	dword ptr [esi+0Ch], offset sub_80A850
mov	dword ptr [edi+88h], 0
pop	edi
pop	esi
retn

loc_80AE85:
mov	dword ptr [esi+0Ch], offset sub_80A560

loc_80AE8C:
mov	dword ptr [edi+88h], 0
pop	edi
pop	esi
retn
sub_80AE50 endp

align 10h



sub_80AEA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	74h
push	1
push	esi
call	ecx
mov	ebp, eax
xor	ebx, ebx
mov	[esi+188h], ebp
add	esp, 0Ch
mov	dword ptr [ebp+0], offset sub_80A060
mov	dword ptr [ebp+8], offset sub_80AE50
mov	[ebp+70h], ebx
cmp	byte ptr [esp+0Ch+arg_4], bl
jz	loc_80AF6C
cmp	[esi+24h], ebx
push	edi
mov	edi, [esi+0C4h]
mov	[esp+10h+arg_4], ebx
jle	short loc_80AF53
lea	edx, [ebp+48h]
add	edi, 0Ch
mov	[esp+10h+arg_0], edx

loc_80AEF5:
cmp	byte ptr [esi+0C8h], 0
mov	eax, [edi]
mov	ecx, eax
jz	short loc_80AF05
lea	ecx, [ecx+ecx*2]

loc_80AF05:
mov	ebx, [esi+4]
push	ecx
push	eax
mov	eax, [edi+14h]
push	eax
call	sub_8098D0
mov	ecx, [edi-4]
mov	edx, [edi+10h]
add	esp, 8
push	eax
push	ecx
push	edx
call	sub_8098D0
add	esp, 8
push	eax
mov	eax, [ebx+14h]
push	1
push	1
push	esi
call	eax
mov	ecx, [esp+28h+arg_0]
mov	[ecx], eax
mov	eax, [esp+28h+arg_4]
inc	eax
add	ecx, 4
add	esp, 18h
add	edi, 54h
cmp	eax, [esi+24h]
mov	[esp+10h+arg_4], eax
mov	[esp+10h+arg_0], ecx
jl	short loc_80AEF5

loc_80AF53:
pop	edi
lea	ecx, [ebp+48h]
pop	esi
mov	dword ptr [ebp+4], offset sub_80A340
mov	dword ptr [ebp+0Ch], offset sub_80A560
mov	[ebp+10h], ecx
pop	ebp
pop	ebx
retn

loc_80AF6C:
mov	edx, [esi+4]
mov	eax, [edx+4]
push	500h
push	1
push	esi
call	eax
lea	ecx, [eax+80h]
mov	[ebp+24h], ecx
lea	edx, [eax+100h]
mov	[ebp+28h], edx
lea	ecx, [eax+180h]
mov	[ebp+2Ch], ecx
lea	edx, [eax+200h]
mov	[ebp+30h], edx
lea	ecx, [eax+280h]
mov	[ebp+34h], ecx
lea	edx, [eax+300h]
mov	[ebp+38h], edx
mov	[ebp+20h], eax
add	esp, 0Ch
lea	ecx, [eax+380h]
lea	edx, [eax+400h]
mov	[ebp+3Ch], ecx
mov	[ebp+40h], edx
add	eax, 480h
mov	[ebp+44h], eax
pop	esi
mov	[ebp+10h], ebx
mov	dword ptr [ebp+4], offset sub_795DC0
mov	dword ptr [ebp+0Ch], offset sub_80A0C0
pop	ebp
pop	ebx
retn
sub_80AEA0 endp

align 10h



sub_80AFF0 proc	near

var_520= dword ptr -520h
var_51C= dword ptr -51Ch
var_518= dword ptr -518h
var_514= dword ptr -514h
var_510= dword ptr -510h
var_50C= dword ptr -50Ch
var_508= byte ptr -508h
var_507= byte ptr -507h
var_408= dword ptr -408h
var_404= dword ptr -404h
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 520h
push	ebx
push	ebp
push	esi
mov	esi, [esp+52Ch+arg_8]
push	edi
mov	ebp, 32h
test	esi, esi
jl	short loc_80B00F
cmp	esi, 4
jl	short loc_80B02C

loc_80B00F:
mov	ebx, [esp+530h+arg_0]
mov	eax, [ebx]
mov	[eax+14h], ebp
mov	ecx, [ebx]
mov	[ecx+18h], esi
mov	edx, [ebx]
mov	eax, [edx]
push	ebx
call	eax
add	esp, 4
jmp	short loc_80B033

loc_80B02C:
mov	ebx, [esp+530h+arg_0]

loc_80B033:
cmp	[esp+530h+arg_4], 0
jz	short loc_80B04A
mov	edi, [ebx+esi*4+0A0h]
mov	[esp+530h+var_520], edi
jmp	short loc_80B057

loc_80B04A:
mov	ecx, [ebx+esi*4+0B0h]
mov	[esp+530h+var_520], ecx
mov	edi, ecx

loc_80B057:
test	edi, edi
jnz	short loc_80B06F
mov	edx, [ebx]
mov	[edx+14h], ebp
mov	eax, [ebx]
mov	[eax+18h], esi
mov	ecx, [ebx]
mov	edx, [ecx]
push	ebx
call	edx
add	esp, 4

loc_80B06F:
mov	esi, [esp+530h+arg_C]
cmp	dword ptr [esi], 0
jnz	short loc_80B08F
mov	eax, [ebx+4]
mov	ecx, [eax]
push	590h
push	1
push	ebx
call	ecx
add	esp, 0Ch
mov	[esi], eax

loc_80B08F:
mov	edx, [esi]
mov	[edx+8Ch], edi
mov	[esp+530h+var_51C], edx
xor	edi, edi
mov	ebp, 1

loc_80B0A2:
mov	eax, [esp+530h+var_520]
movzx	esi, byte ptr [eax+ebp]
test	esi, esi
jl	short loc_80B0B9
lea	ecx, [esi+edi]
cmp	ecx, 100h
jle	short loc_80B0D0

loc_80B0B9:
mov	edx, [ebx]
mov	dword ptr [edx+14h], 8
mov	eax, [ebx]
mov	ecx, [eax]
push	ebx
call	ecx
mov	edx, [esp+534h+var_51C]
add	esp, 4

loc_80B0D0:
test	esi, esi
jz	short loc_80B0E9
push	esi		; size_t
lea	eax, [esp+edi+534h+var_508]
push	ebp		; int
push	eax		; void *
call	_memset
mov	edx, [esp+53Ch+var_51C]
add	esp, 0Ch
add	edi, esi

loc_80B0E9:
inc	ebp
cmp	ebp, 10h
jle	short loc_80B0A2
mov	[esp+edi+530h+var_508],	0
mov	al, [esp+530h+var_508]
mov	[esp+530h+var_510], edi
xor	edi, edi
xor	esi, esi
movzx	ebp, al
test	al, al
jz	short loc_80B162
lea	eax, [esp+530h+var_508]
jmp	short loc_80B110
align 10h

loc_80B110:
movzx	eax, byte ptr [eax]
cmp	eax, ebp
jnz	short loc_80B132
jmp	short loc_80B120
align 10h

loc_80B120:
movzx	ecx, [esp+esi+530h+var_507]
mov	[esp+esi*4+530h+var_404], edi
inc	esi
inc	edi
cmp	ecx, ebp
jz	short loc_80B120

loc_80B132:
mov	eax, 1
mov	ecx, ebp
shl	eax, cl
cmp	edi, eax
jl	short loc_80B156
mov	ecx, [ebx]
mov	dword ptr [ecx+14h], 8
mov	edx, [ebx]
mov	eax, [edx]
push	ebx
call	eax
mov	edx, [esp+534h+var_51C]
add	esp, 4

loc_80B156:
lea	eax, [esp+esi+530h+var_508]
add	edi, edi
inc	ebp
cmp	byte ptr [eax],	0
jnz	short loc_80B110

loc_80B162:
xor	ecx, ecx
mov	eax, 1
lea	esp, [esp+0]

loc_80B170:
mov	esi, [esp+530h+var_520]
cmp	byte ptr [eax+esi], 0
jz	short loc_80B199
mov	edi, ecx
sub	edi, [esp+ecx*4+530h+var_404]
mov	[edx+eax*4+48h], edi
movzx	esi, byte ptr [eax+esi]
add	ecx, esi
mov	esi, [esp+ecx*4+530h+var_408]
mov	[edx+eax*4], esi
jmp	short loc_80B1A0

loc_80B199:
mov	dword ptr [edx+eax*4], 0FFFFFFFFh

loc_80B1A0:
inc	eax
cmp	eax, 10h
jle	short loc_80B170
push	400h		; size_t
mov	dword ptr [edx+44h], 0FFFFFh
add	edx, 90h
push	0		; int
push	edx		; void *
call	_memset
add	esp, 0Ch
xor	ebx, ebx
mov	ecx, 7
lea	edi, [ebx+1]
mov	[esp+530h+var_518], ecx
jmp	short loc_80B1E0
align 10h

loc_80B1E0:
mov	esi, [esp+530h+var_520]
cmp	byte ptr [edi+esi], 1
mov	[esp+530h+var_514], 1
jb	short loc_80B24F
mov	eax, 1
shl	eax, cl
lea	ebp, [ebx+esi+11h]
mov	[esp+530h+var_50C], eax

loc_80B201:
mov	edx, [esp+ebx*4+530h+var_404]
mov	ecx, [esp+530h+var_518]
shl	edx, cl
test	eax, eax
jle	short loc_80B23C
mov	ecx, [esp+530h+var_51C]
lea	esi, [edx+ecx+490h]
lea	edx, [ecx+edx*4+90h]

loc_80B224:
mov	[edx], edi
mov	cl, [ebp+0]
mov	[esi], cl
dec	eax
add	edx, 4
inc	esi
test	eax, eax
jg	short loc_80B224
mov	esi, [esp+530h+var_520]
mov	eax, [esp+530h+var_50C]

loc_80B23C:
mov	edx, [esp+530h+var_514]
movzx	ecx, byte ptr [edi+esi]
inc	edx
inc	ebx
inc	ebp
cmp	edx, ecx
mov	[esp+530h+var_514], edx
jle	short loc_80B201

loc_80B24F:
mov	ecx, [esp+530h+var_518]
inc	edi
sub	ecx, 1
mov	[esp+530h+var_518], ecx
jns	short loc_80B1E0
cmp	[esp+530h+arg_4], 0
jz	short loc_80B29E
mov	ebx, [esp+530h+var_510]
xor	edi, edi
test	ebx, ebx
jle	short loc_80B29E

loc_80B271:
movzx	eax, byte ptr [esi+edi+11h]
test	eax, eax
jl	short loc_80B27F
cmp	eax, 0Fh
jle	short loc_80B299

loc_80B27F:
mov	eax, [esp+530h+arg_0]
mov	edx, [eax]
mov	dword ptr [edx+14h], 8
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
add	esp, 4

loc_80B299:
inc	edi
cmp	edi, ebx
jl	short loc_80B271

loc_80B29E:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 520h
retn
sub_80AFF0 endp

align 10h



sub_80B2B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
mov	ebx, [ebp+10h]
cmp	dword ptr [ebx+17Ch], 0
push	esi
mov	esi, [ebp+0]
push	edi
mov	edi, [ebp+4]
jnz	loc_80B365
cmp	[esp+10h+arg_8], 19h
jge	loc_80B3B0
lea	esp, [esp+0]

loc_80B2E0:
test	edi, edi
jnz	short loc_80B2FC
mov	eax, [ebx+18h]
mov	ecx, [eax+0Ch]
push	ebx
call	ecx
add	esp, 4
test	al, al
jz	short loc_80B358
mov	eax, [ebx+18h]
mov	esi, [eax]
mov	edi, [eax+4]

loc_80B2FC:
movzx	eax, byte ptr [esi]
dec	edi
inc	esi
cmp	eax, 0FFh
jnz	short loc_80B339

loc_80B308:
test	edi, edi
jnz	short loc_80B324
mov	edx, [ebx+18h]
mov	eax, [edx+0Ch]
push	ebx
call	eax
add	esp, 4
test	al, al
jz	short loc_80B358
mov	eax, [ebx+18h]
mov	esi, [eax]
mov	edi, [eax+4]

loc_80B324:
movzx	eax, byte ptr [esi]
dec	edi
inc	esi
cmp	eax, 0FFh
jz	short loc_80B308
test	eax, eax
jnz	short loc_80B35F
mov	eax, 0FFh

loc_80B339:
mov	ecx, [esp+10h+arg_4]
shl	ecx, 8
or	ecx, eax
mov	eax, [esp+10h+arg_8]
add	eax, 8
cmp	eax, 19h
mov	[esp+10h+arg_4], ecx
mov	[esp+10h+arg_8], eax
jl	short loc_80B2E0
jmp	short loc_80B3B0

loc_80B358:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_80B35F:
mov	[ebx+17Ch], eax

loc_80B365:
mov	edx, [esp+10h+arg_8]
cmp	[esp+10h+arg_C], edx
jle	short loc_80B3B0
mov	eax, [ebx+198h]
cmp	byte ptr [eax+8], 0
jnz	short loc_80B39B
mov	ecx, [ebx]
mov	dword ptr [ecx+14h], 75h
mov	edx, [ebx]
mov	eax, [edx+4]
push	0FFFFFFFFh
push	ebx
call	eax
mov	ecx, [ebx+198h]
add	esp, 8
mov	byte ptr [ecx+8], 1

loc_80B39B:
mov	ecx, 19h
sub	ecx, [esp+10h+arg_8]
mov	[esp+10h+arg_8], 19h
shl	[esp+10h+arg_4], cl

loc_80B3B0:
mov	eax, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_4]
mov	[ebp+4], edi
pop	edi
mov	[ebp+0], esi
pop	esi
mov	[ebp+0Ch], eax
mov	[ebp+8], edx
pop	ebp
mov	al, 1
pop	ebx
retn
sub_80B2B0 endp

align 10h



sub_80B3D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_8]
push	ebx
mov	ebx, [esp+4+arg_10]
cmp	eax, ebx
push	edi
mov	edi, [esp+8+arg_0]
jge	short loc_80B404
push	ebx
push	eax
mov	eax, [esp+10h+arg_4]
push	eax
push	edi
call	sub_80B2B0
add	esp, 10h
test	al, al
jnz	short loc_80B3FC
pop	edi
or	eax, 0FFFFFFFFh
pop	ebx
retn

loc_80B3FC:
mov	edx, [edi+8]
mov	eax, [edi+0Ch]
jmp	short loc_80B408

loc_80B404:
mov	edx, [esp+8+arg_4]

loc_80B408:
push	ebp
push	esi
sub	eax, ebx
mov	ecx, eax
mov	esi, edx
sar	esi, cl
mov	ecx, ebx
mov	ebp, 1
shl	ebp, cl
mov	ecx, [esp+10h+arg_C]
dec	ebp
and	esi, ebp
cmp	esi, [ecx+ebx*4]
jle	short loc_80B45B

loc_80B427:
add	esi, esi
cmp	eax, 1
jge	short loc_80B445
push	1
push	eax
push	edx
push	edi
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	short loc_80B489
mov	edx, [edi+8]
mov	eax, [edi+0Ch]

loc_80B445:
dec	eax
mov	ecx, eax
mov	ebp, edx
sar	ebp, cl
mov	ecx, [esp+10h+arg_C]
inc	ebx
and	ebp, 1
or	esi, ebp
cmp	esi, [ecx+ebx*4]
jg	short loc_80B427

loc_80B45B:
cmp	ebx, 10h
mov	[edi+8], edx
mov	[edi+0Ch], eax
jle	short loc_80B491
mov	ecx, [edi+10h]
mov	edx, [ecx]
mov	dword ptr [edx+14h], 76h
mov	edi, [edi+10h]
mov	eax, [edi]
mov	ecx, [eax+4]
push	0FFFFFFFFh
push	edi
call	ecx
add	esp, 8
pop	esi
pop	ebp
pop	edi
xor	eax, eax
pop	ebx
retn

loc_80B489:
pop	esi
pop	ebp
pop	edi
or	eax, 0FFFFFFFFh
pop	ebx
retn

loc_80B491:
mov	edx, [ecx+ebx*4+48h]
add	edx, [ecx+8Ch]
movzx	eax, byte ptr [edx+esi+11h]
pop	esi
pop	ebp
pop	edi
pop	ebx
retn
sub_80B3D0 endp

align 10h



sub_80B4B0 proc	near
mov	ecx, [esi+194h]
push	edi
mov	edi, [esi+198h]
mov	eax, [edi+10h]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
add	[ecx+14h], eax
mov	dword ptr [edi+10h], 0
mov	eax, [esi+194h]
mov	ecx, [eax+8]
push	esi
call	ecx
add	esp, 4
test	al, al
jnz	short loc_80B4E8
pop	edi
retn

loc_80B4E8:
xor	eax, eax
cmp	[esi+124h], eax
jle	short loc_80B507
lea	ecx, [edi+14h]

loc_80B4F5:
mov	dword ptr [ecx], 0
inc	eax
add	ecx, 4
cmp	eax, [esi+124h]
jl	short loc_80B4F5

loc_80B507:
mov	edx, [esi+0FCh]
mov	[edi+24h], edx
cmp	dword ptr [esi+17Ch], 0
jnz	short loc_80B51D
mov	byte ptr [edi+8], 0

loc_80B51D:
mov	al, 1
pop	edi
retn
sub_80B4B0 endp	; sp-analysis failed

align 10h



sub_80B530 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 3Ch
push	esi
mov	esi, [esp+40h+arg_0]
cmp	dword ptr [esi+0FCh], 0
push	edi
mov	edi, [esi+198h]
mov	[esp+44h+var_2C], edi
jz	short loc_80B561
cmp	dword ptr [edi+24h], 0
jnz	short loc_80B561
call	sub_80B4B0
test	al, al
jnz	short loc_80B561
pop	edi
pop	esi
add	esp, 3Ch
retn

loc_80B561:
cmp	byte ptr [edi+8], 0
push	ebx
push	ebp
jnz	loc_80B92B
cmp	dword ptr [esi+140h], 0
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	ebx, [edi+0Ch]
mov	eax, [edi+10h]
mov	[esp+4Ch+var_14], ecx
mov	ecx, [edi+14h]
mov	[esp+4Ch+var_10], edx
mov	edx, [edi+18h]
mov	[esp+4Ch+var_24], ecx
mov	ecx, [edi+1Ch]
mov	[esp+4Ch+var_20], edx
mov	edx, [edi+20h]
mov	[esp+4Ch+var_4], esi
mov	[esp+4Ch+var_1C], ecx
mov	[esp+4Ch+var_18], edx
mov	[esp+4Ch+var_3C], 0
jle	loc_80B8F6
add	esi, 144h
lea	ecx, [edi+70h]
mov	[esp+4Ch+var_30], esi
mov	[esp+4Ch+var_34], ecx
jmp	short loc_80B5D4
jmp	short loc_80B5D0
align 10h

loc_80B5D0:
mov	ecx, [esp+4Ch+var_34]

loc_80B5D4:
cmp	eax, 8
mov	edx, [esp+4Ch+arg_4]
mov	esi, [esp+4Ch+var_3C]
mov	esi, [edx+esi*4]
mov	ebp, [ecx]
mov	edi, [ecx-28h]
mov	[esp+4Ch+var_28], esi
mov	[esp+4Ch+var_38], ebp
jge	short loc_80B61E
push	0
push	eax
lea	eax, [esp+54h+var_14]
push	ebx
push	eax
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80B938
mov	eax, [esp+4Ch+var_8]
cmp	eax, 8
mov	ebx, [esp+4Ch+var_C]
jge	short loc_80B61E
mov	ecx, 1
jmp	short loc_80B647

loc_80B61E:
lea	ecx, [eax-8]
mov	edx, ebx
sar	edx, cl
and	edx, 0FFh
mov	ecx, [edi+edx*4+90h]
test	ecx, ecx
jz	short loc_80B642
movzx	edi, byte ptr [edx+edi+490h]
sub	eax, ecx
jmp	short loc_80B66A

loc_80B642:
mov	ecx, 9

loc_80B647:
push	ecx
push	edi
push	eax
lea	ecx, [esp+58h+var_14]
push	ebx
push	ecx
call	sub_80B3D0
mov	edi, eax
add	esp, 14h
test	edi, edi
jl	loc_80B938
mov	ebx, [esp+4Ch+var_C]
mov	eax, [esp+4Ch+var_8]

loc_80B66A:
test	edi, edi
jz	short loc_80B6C0
cmp	eax, edi
jge	short loc_80B692
push	edi
push	eax
lea	edx, [esp+54h+var_14]
push	ebx
push	edx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80B938
mov	ebx, [esp+4Ch+var_C]
mov	eax, [esp+4Ch+var_8]

loc_80B692:
mov	ecx, edi
sub	eax, edi
mov	edx, 1
shl	edx, cl
mov	ebp, ebx
mov	ecx, eax
sar	ebp, cl
dec	edx
and	edx, ebp
cmp	edx, ds:dword_1465F10[edi*4]
mov	ebp, [esp+4Ch+var_38]
jge	short loc_80B6BE
mov	edi, ds:dword_1465F50[edi*4]
add	edi, edx
jmp	short loc_80B6C0

loc_80B6BE:
mov	edi, edx

loc_80B6C0:
mov	edx, [esp+4Ch+var_3C]
mov	ecx, [esp+4Ch+var_2C]
cmp	byte ptr [edx+ecx+98h],	0
jz	short loc_80B6E5
mov	ecx, [esp+4Ch+var_30]
mov	ecx, [ecx]
add	[esp+ecx*4+4Ch+var_24],	edi
lea	ecx, [esp+ecx*4+4Ch+var_24]
mov	ecx, [ecx]
mov	[esi], cx

loc_80B6E5:
mov	ecx, [esp+4Ch+var_2C]
cmp	byte ptr [edx+ecx+0A2h], 0
mov	esi, 1
jz	loc_80B807
lea	esp, [esp+0]

loc_80B700:
cmp	eax, 8
jge	short loc_80B732
push	0
push	eax
lea	edx, [esp+54h+var_14]
push	ebx
push	edx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80B938
mov	eax, [esp+4Ch+var_8]
cmp	eax, 8
mov	ebx, [esp+4Ch+var_C]
jge	short loc_80B732
mov	ecx, 1
jmp	short loc_80B75B

loc_80B732:
lea	ecx, [eax-8]
mov	edx, ebx
sar	edx, cl
and	edx, 0FFh
mov	ecx, [ebp+edx*4+90h]
test	ecx, ecx
jz	short loc_80B756
movzx	edi, byte ptr [edx+ebp+490h]
sub	eax, ecx
jmp	short loc_80B77E

loc_80B756:
mov	ecx, 9

loc_80B75B:
push	ecx
push	ebp
push	eax
lea	eax, [esp+58h+var_14]
push	ebx
push	eax
call	sub_80B3D0
mov	edi, eax
add	esp, 14h
test	edi, edi
jl	loc_80B938
mov	ebx, [esp+4Ch+var_C]
mov	eax, [esp+4Ch+var_8]

loc_80B77E:
mov	ecx, edi
sar	ecx, 4
and	edi, 0Fh
jz	short loc_80B7ED
add	esi, ecx
cmp	eax, edi
jge	short loc_80B7AE
push	edi
push	eax
lea	ecx, [esp+54h+var_14]
push	ebx
push	ecx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80B938
mov	ebx, [esp+4Ch+var_C]
mov	eax, [esp+4Ch+var_8]

loc_80B7AE:
mov	ecx, edi
sub	eax, edi
mov	edx, 1
shl	edx, cl
mov	ebp, ebx
mov	ecx, eax
sar	ebp, cl
dec	edx
and	edx, ebp
cmp	edx, ds:dword_1465F10[edi*4]
jge	short loc_80B7D6
mov	edi, ds:dword_1465F50[edi*4]
add	edi, edx
jmp	short loc_80B7D8

loc_80B7D6:
mov	edi, edx

loc_80B7D8:
mov	edx, ds:dword_1465DD0[esi*4]
mov	ecx, [esp+4Ch+var_28]
mov	ebp, [esp+4Ch+var_38]
mov	[ecx+edx*2], di
jmp	short loc_80B7F8

loc_80B7ED:
cmp	ecx, 0Fh
jnz	loc_80B8CA
add	esi, ecx

loc_80B7F8:
inc	esi
cmp	esi, 40h
jl	loc_80B700
jmp	loc_80B8CA

loc_80B807:
cmp	eax, 8
jge	short loc_80B839
push	0
push	eax
lea	edx, [esp+54h+var_14]
push	ebx
push	edx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80B938
mov	eax, [esp+4Ch+var_8]
cmp	eax, 8
mov	ebx, [esp+4Ch+var_C]
jge	short loc_80B839
mov	ecx, 1
jmp	short loc_80B862

loc_80B839:
lea	ecx, [eax-8]
mov	edx, ebx
sar	edx, cl
and	edx, 0FFh
mov	ecx, [ebp+edx*4+90h]
test	ecx, ecx
jz	short loc_80B85D
movzx	edi, byte ptr [edx+ebp+490h]
sub	eax, ecx
jmp	short loc_80B885

loc_80B85D:
mov	ecx, 9

loc_80B862:
push	ecx
push	ebp
push	eax
lea	eax, [esp+58h+var_14]
push	ebx
push	eax
call	sub_80B3D0
mov	edi, eax
add	esp, 14h
test	edi, edi
jl	loc_80B938
mov	ebx, [esp+4Ch+var_C]
mov	eax, [esp+4Ch+var_8]

loc_80B885:
mov	ecx, edi
sar	ecx, 4
and	edi, 0Fh
jz	short loc_80B8B9
add	esi, ecx
cmp	eax, edi
jge	short loc_80B8B5
push	edi
push	eax
lea	ecx, [esp+54h+var_14]
push	ebx
push	ecx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80B938
mov	ebx, [esp+4Ch+var_C]
mov	eax, [esp+4Ch+var_8]

loc_80B8B5:
sub	eax, edi
jmp	short loc_80B8C0

loc_80B8B9:
cmp	ecx, 0Fh
jnz	short loc_80B8CA
add	esi, ecx

loc_80B8C0:
inc	esi
cmp	esi, 40h
jl	loc_80B807

loc_80B8CA:
mov	ecx, [esp+4Ch+var_3C]
mov	edx, 4
add	[esp+4Ch+var_34], edx
add	[esp+4Ch+var_30], edx
mov	edx, [esp+4Ch+arg_0]
inc	ecx
cmp	ecx, [edx+140h]
mov	[esp+4Ch+var_3C], ecx
jl	loc_80B5D0
mov	edi, [esp+4Ch+var_2C]
mov	esi, edx

loc_80B8F6:
mov	ecx, [esi+18h]
mov	edx, [esp+4Ch+var_14]
mov	[ecx], edx
mov	ecx, [esi+18h]
mov	edx, [esp+4Ch+var_10]
mov	[ecx+4], edx
mov	ecx, [esp+4Ch+var_20]
mov	edx, [esp+4Ch+var_1C]
mov	[edi+10h], eax
mov	eax, [esp+4Ch+var_24]
mov	[edi+14h], eax
mov	eax, [esp+4Ch+var_18]
mov	[edi+18h], ecx
mov	[edi+1Ch], edx
mov	[edi+0Ch], ebx
mov	[edi+20h], eax

loc_80B92B:
dec	dword ptr [edi+24h]
pop	ebp
pop	ebx
pop	edi
mov	al, 1
pop	esi
add	esp, 3Ch
retn

loc_80B938:
pop	ebp
pop	ebx
pop	edi
xor	al, al
pop	esi
add	esp, 3Ch
retn
sub_80B530 endp

align 10h



sub_80B950 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
cmp	dword ptr [esi+16Ch], 0
push	edi
mov	edi, [esi+198h]
jnz	short loc_80B983
cmp	dword ptr [esi+170h], 3Fh
jnz	short loc_80B983
cmp	dword ptr [esi+174h], 0
jnz	short loc_80B983
cmp	dword ptr [esi+178h], 0
jz	short loc_80B999

loc_80B983:
mov	eax, [esi]
mov	dword ptr [eax+14h], 7Ah
mov	ecx, [esi]
mov	edx, [ecx+4]
push	0FFFFFFFFh
push	esi
call	edx
add	esp, 8

loc_80B999:
cmp	dword ptr [esi+124h], 0
mov	[esp+14h+arg_0], 0
jle	short loc_80BA03
lea	eax, [edi+14h]
mov	[esp+14h+var_4], eax
lea	ebx, [esi+128h]

loc_80B9B7:
mov	eax, [ebx]
mov	ecx, [eax+14h]
mov	ebp, [eax+18h]
lea	edx, [edi+ecx*4+28h]
push	edx
push	ecx
push	1
push	esi
call	sub_80AFF0
lea	eax, [edi+ebp*4+38h]
push	eax
push	ebp
push	0
push	esi
call	sub_80AFF0
mov	ecx, [esp+34h+var_4]
mov	eax, [esp+34h+arg_0]
mov	dword ptr [ecx], 0
inc	eax
add	ecx, 4
add	esp, 20h
add	ebx, 4
cmp	eax, [esi+124h]
mov	[esp+14h+arg_0], eax
mov	[esp+14h+var_4], ecx
jl	short loc_80B9B7

loc_80BA03:
cmp	dword ptr [esi+140h], 0
jle	short loc_80BA7E
mov	eax, 0FFFFFF68h
sub	eax, edi
lea	ecx, [edi+98h]
lea	edx, [edi+70h]
lea	ebp, [esi+144h]
mov	[esp+14h+arg_0], eax
jmp	short loc_80BA30
align 10h

loc_80BA30:
mov	eax, [ebp+0]
mov	eax, [esi+eax*4+128h]
mov	ebx, [eax+14h]
mov	ebx, [edi+ebx*4+28h]
mov	[edx-28h], ebx
mov	ebx, [eax+18h]
mov	ebx, [edi+ebx*4+38h]
mov	[edx], ebx
cmp	byte ptr [eax+30h], 0
jz	short loc_80BA62
mov	byte ptr [ecx],	1
cmp	dword ptr [eax+24h], 1
setnle	al
mov	[ecx+0Ah], al
jmp	short loc_80BA69

loc_80BA62:
mov	byte ptr [ecx+0Ah], 0
mov	byte ptr [ecx],	0

loc_80BA69:
mov	eax, [esp+14h+arg_0]
inc	ecx
add	eax, ecx
add	ebp, 4
add	edx, 4
cmp	eax, [esi+140h]
jl	short loc_80BA30

loc_80BA7E:
xor	eax, eax
mov	[edi+10h], eax
mov	[edi+0Ch], eax
mov	[edi+8], al
mov	ecx, [esi+0FCh]
mov	[edi+24h], ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_80B950 endp

align 10h



sub_80BAA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	0ACh
push	1
push	esi
call	ecx
mov	[esi+198h], eax
xor	ecx, ecx
mov	dword ptr [eax], offset	sub_80B950
mov	dword ptr [eax+4], offset sub_80B530
add	esp, 0Ch
mov	[eax+38h], ecx
mov	[eax+28h], ecx
mov	[eax+3Ch], ecx
mov	[eax+2Ch], ecx
mov	[eax+40h], ecx
mov	[eax+30h], ecx
mov	[eax+44h], ecx
mov	[eax+34h], ecx
pop	esi
retn
sub_80BAA0 endp

align 10h



sub_80BAF0 proc	near
mov	ecx, [esi+194h]
push	edi
mov	edi, [esi+198h]
mov	eax, [edi+10h]
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
add	[ecx+14h], eax
mov	dword ptr [edi+10h], 0
mov	eax, [esi+194h]
mov	ecx, [eax+8]
push	esi
call	ecx
add	esp, 4
test	al, al
jnz	short loc_80BB28
pop	edi
retn

loc_80BB28:
xor	eax, eax
cmp	[esi+124h], eax
jle	short loc_80BB47
lea	ecx, [edi+18h]

loc_80BB35:
mov	dword ptr [ecx], 0
inc	eax
add	ecx, 4
cmp	eax, [esi+124h]
jl	short loc_80BB35

loc_80BB47:
mov	dword ptr [edi+14h], 0
mov	edx, [esi+0FCh]
mov	[edi+28h], edx
cmp	dword ptr [esi+17Ch], 0
jnz	short loc_80BB64
mov	byte ptr [edi+8], 0

loc_80BB64:
mov	al, 1
pop	edi
retn
sub_80BAF0 endp	; sp-analysis failed

align 10h



sub_80BB70 proc	near

var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 3Ch
push	esi
mov	esi, [esp+40h+arg_0]
cmp	dword ptr [esi+0FCh], 0
mov	eax, [esi+178h]
push	edi
mov	edi, [esi+198h]
mov	[esp+44h+var_30], eax
jz	short loc_80BBA7
cmp	dword ptr [edi+28h], 0
jnz	short loc_80BBA7
call	sub_80BAF0
test	al, al
jnz	short loc_80BBA7
pop	edi
pop	esi
add	esp, 3Ch
retn

loc_80BBA7:
cmp	byte ptr [edi+8], 0
push	ebx
push	ebp
jnz	loc_80BD8B
cmp	dword ptr [esi+140h], 0
mov	eax, [esi+18h]
mov	[esp+4Ch+var_18], esi
mov	ecx, [eax]
mov	[esp+4Ch+var_28], ecx
mov	edx, [eax+4]
mov	[esp+4Ch+var_24], edx
mov	ecx, [edi+14h]
mov	edx, [edi+18h]
mov	ebp, [edi+0Ch]
mov	eax, [edi+10h]
mov	[esp+4Ch+var_14], ecx
mov	ecx, [edi+1Ch]
mov	[esp+4Ch+var_10], edx
mov	edx, [edi+20h]
mov	[esp+4Ch+var_C], ecx
mov	ecx, [edi+24h]
mov	[esp+4Ch+arg_0], ebp
mov	[esp+4Ch+var_8], edx
mov	[esp+4Ch+var_4], ecx
mov	[esp+4Ch+var_3C], 0
jle	loc_80BD4F
lea	edx, [esi+144h]
mov	[esp+4Ch+var_38], edx

loc_80BC13:
cmp	eax, 8
mov	edx, [esp+4Ch+var_3C]
mov	ecx, [esp+4Ch+arg_4]
mov	ecx, [ecx+edx*4]
mov	edx, [esp+4Ch+var_38]
mov	[esp+4Ch+var_2C], ecx
mov	ecx, [edx]
mov	[esp+4Ch+var_34], ecx
mov	ecx, [esi+ecx*4+128h]
mov	edx, [ecx+14h]
mov	ebx, [edi+edx*4+2Ch]
jge	short loc_80BC70
push	0
push	eax
lea	eax, [esp+54h+var_28]
push	ebp
push	eax
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80BD98
mov	eax, [esp+4Ch+var_1C]
cmp	eax, 8
mov	ebp, [esp+4Ch+var_20]
mov	[esp+4Ch+arg_0], ebp
jge	short loc_80BC70
mov	ecx, 1
jmp	short loc_80BC99

loc_80BC70:
lea	ecx, [eax-8]
mov	edx, ebp
sar	edx, cl
and	edx, 0FFh
mov	ecx, [ebx+edx*4+90h]
test	ecx, ecx
jz	short loc_80BC94
movzx	ebx, byte ptr [edx+ebx+490h]
sub	eax, ecx
jmp	short loc_80BCC0

loc_80BC94:
mov	ecx, 9

loc_80BC99:
push	ecx
push	ebx
push	eax
lea	ecx, [esp+58h+var_28]
push	ebp
push	ecx
call	sub_80B3D0
mov	ebx, eax
add	esp, 14h
test	ebx, ebx
jl	loc_80BD98
mov	ebp, [esp+4Ch+var_20]
mov	eax, [esp+4Ch+var_1C]
mov	[esp+4Ch+arg_0], ebp

loc_80BCC0:
test	ebx, ebx
jz	short loc_80BD18
cmp	eax, ebx
jge	short loc_80BCEC
push	ebx
push	eax
lea	edx, [esp+54h+var_28]
push	ebp
push	edx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80BD98
mov	ebp, [esp+4Ch+var_20]
mov	eax, [esp+4Ch+var_1C]
mov	[esp+4Ch+arg_0], ebp

loc_80BCEC:
mov	ecx, ebx
sub	eax, ebx
mov	edx, 1
shl	edx, cl
mov	ecx, eax
sar	ebp, cl
dec	edx
and	edx, ebp
cmp	edx, ds:dword_1465F90[ebx*4]
mov	ebp, [esp+4Ch+arg_0]
jge	short loc_80BD16
mov	ebx, ds:dword_1465FD0[ebx*4]
add	ebx, edx
jmp	short loc_80BD18

loc_80BD16:
mov	ebx, edx

loc_80BD18:
mov	ecx, [esp+4Ch+var_34]
add	[esp+ecx*4+4Ch+var_10],	ebx
mov	edx, [esp+ecx*4+4Ch+var_10]
add	[esp+4Ch+var_38], 4
lea	ecx, [esp+ecx*4+4Ch+var_10]
mov	ecx, [esp+4Ch+var_30]
shl	edx, cl
mov	ecx, [esp+4Ch+var_2C]
mov	[ecx], dx
mov	ecx, [esp+4Ch+var_3C]
inc	ecx
cmp	ecx, [esi+140h]
mov	[esp+4Ch+var_3C], ecx
jl	loc_80BC13

loc_80BD4F:
mov	edx, [esi+18h]
mov	ecx, [esp+4Ch+var_28]
mov	[edx], ecx
mov	edx, [esi+18h]
mov	ecx, [esp+4Ch+var_24]
mov	[edx+4], ecx
mov	edx, [esp+4Ch+var_14]
mov	ecx, [esp+4Ch+var_C]
mov	[edi+14h], edx
mov	edx, [esp+4Ch+var_8]
mov	[edi+10h], eax
mov	eax, [esp+4Ch+var_10]
mov	[edi+18h], eax
mov	eax, [esp+4Ch+var_4]
mov	[edi+1Ch], ecx
mov	[edi+20h], edx
mov	[edi+0Ch], ebp
mov	[edi+24h], eax

loc_80BD8B:
dec	dword ptr [edi+28h]
pop	ebp
pop	ebx
pop	edi
mov	al, 1
pop	esi
add	esp, 3Ch
retn

loc_80BD98:
pop	ebp
pop	ebx
pop	edi
xor	al, al
pop	esi
add	esp, 3Ch
retn
sub_80BB70 endp

align 10h



sub_80BDB0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 2Ch
push	ebx
push	esi
push	edi
mov	edi, [esp+38h+arg_0]
cmp	dword ptr [edi+0FCh], 0
mov	ebx, [edi+198h]
mov	eax, [edi+170h]
mov	ecx, [edi+178h]
mov	[esp+38h+var_20], ebx
mov	[esp+38h+var_24], eax
mov	[esp+38h+var_1C], ecx
jz	short loc_80BDF9
cmp	dword ptr [ebx+28h], 0
jnz	short loc_80BDF9
mov	esi, edi
call	sub_80BAF0
test	al, al
jnz	short loc_80BDF9
pop	edi
pop	esi
pop	ebx
add	esp, 2Ch
retn

loc_80BDF9:
cmp	byte ptr [ebx+8], 0
push	ebp
jnz	loc_80BFDF
mov	ecx, [ebx+14h]
mov	[esp+3Ch+var_2C], ecx
test	ecx, ecx
jbe	short loc_80BE20
pop	ebp
pop	edi
dec	ecx
dec	dword ptr [ebx+28h]
pop	esi
mov	[ebx+14h], ecx
mov	al, 1
pop	ebx
add	esp, 2Ch
retn

loc_80BE20:
mov	eax, [edi+18h]
mov	ebp, [edi+16Ch]
cmp	ebp, [esp+3Ch+var_24]
mov	[esp+3Ch+var_4], edi
mov	edx, [eax]
mov	[esp+3Ch+var_14], edx
mov	edx, [esp+3Ch+arg_4]
mov	eax, [eax+4]
mov	edx, [edx]
mov	[esp+3Ch+var_10], eax
mov	esi, [ebx+0Ch]
mov	eax, [ebx+10h]
mov	[esp+3Ch+var_18], edx
mov	edx, [ebx+3Ch]
mov	[esp+3Ch+var_28], edx
jg	loc_80BFC3
jmp	short loc_80BE60
align 10h

loc_80BE60:
cmp	eax, 8
jge	short loc_80BE96
push	0
push	eax
lea	eax, [esp+44h+var_14]
push	esi
push	eax
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80BF93
mov	eax, [esp+3Ch+var_8]
cmp	eax, 8
mov	esi, [esp+3Ch+var_C]
jge	short loc_80BE96
mov	edi, [esp+3Ch+var_28]
mov	ecx, 1
jmp	short loc_80BEC3

loc_80BE96:
mov	edi, [esp+3Ch+var_28]
lea	ecx, [eax-8]
mov	edx, esi
sar	edx, cl
and	edx, 0FFh
mov	ecx, [edi+edx*4+90h]
test	ecx, ecx
jz	short loc_80BEBE
movzx	edi, byte ptr [edx+edi+490h]
sub	eax, ecx
jmp	short loc_80BEE6

loc_80BEBE:
mov	ecx, 9

loc_80BEC3:
push	ecx
push	edi
push	eax
lea	ecx, [esp+48h+var_14]
push	esi
push	ecx
call	sub_80B3D0
mov	edi, eax
add	esp, 14h
test	edi, edi
jl	loc_80BF93
mov	esi, [esp+3Ch+var_C]
mov	eax, [esp+3Ch+var_8]

loc_80BEE6:
mov	ebx, edi
sar	ebx, 4
and	edi, 0Fh
jz	short loc_80BF57
add	ebp, ebx
cmp	eax, edi
jge	short loc_80BF16
push	edi
push	eax
lea	edx, [esp+44h+var_14]
push	esi
push	edx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80BF93
mov	esi, [esp+3Ch+var_C]
mov	eax, [esp+3Ch+var_8]

loc_80BF16:
mov	ecx, edi
sub	eax, edi
mov	edx, 1
shl	edx, cl
mov	ebx, esi
mov	ecx, eax
sar	ebx, cl
dec	edx
and	edx, ebx
cmp	edx, ds:dword_1465F90[edi*4]
jge	short loc_80BF3E
mov	edi, ds:dword_1465FD0[edi*4]
add	edi, edx
jmp	short loc_80BF40

loc_80BF3E:
mov	edi, edx

loc_80BF40:
mov	ecx, [esp+3Ch+var_1C]
mov	edx, [esp+3Ch+var_18]
shl	edi, cl
mov	ecx, ds:dword_1465DD0[ebp*4]
mov	[edx+ecx*2], di
jmp	short loc_80BF5F

loc_80BF57:
cmp	ebx, 0Fh
jnz	short loc_80BF6C
add	ebp, 0Fh

loc_80BF5F:
inc	ebp
cmp	ebp, [esp+3Ch+var_24]
jle	loc_80BE60
jmp	short loc_80BFB7

loc_80BF6C:
mov	edi, 1
mov	ecx, ebx
shl	edi, cl
mov	ebp, edi
test	ebx, ebx
jz	short loc_80BFB2
cmp	eax, ebx
jge	short loc_80BFA5
push	ebx
push	eax
lea	eax, [esp+44h+var_14]
push	esi
push	eax
call	sub_80B2B0
add	esp, 10h
test	al, al
jnz	short loc_80BF9D

loc_80BF93:
pop	ebp
pop	edi
pop	esi
xor	al, al
pop	ebx
add	esp, 2Ch
retn

loc_80BF9D:
mov	esi, [esp+3Ch+var_C]
mov	eax, [esp+3Ch+var_8]

loc_80BFA5:
sub	eax, ebx
mov	edx, esi
mov	ecx, eax
sar	edx, cl
dec	edi
and	edx, edi
add	ebp, edx

loc_80BFB2:
dec	ebp
mov	[esp+3Ch+var_2C], ebp

loc_80BFB7:
mov	ecx, [esp+3Ch+var_2C]
mov	edi, [esp+3Ch+arg_0]
mov	ebx, [esp+3Ch+var_20]

loc_80BFC3:
mov	edx, [edi+18h]
mov	ebp, [esp+3Ch+var_14]
mov	[edx], ebp
mov	edx, [edi+18h]
mov	edi, [esp+3Ch+var_10]
mov	[edx+4], edi
mov	[ebx+0Ch], esi
mov	[ebx+10h], eax
mov	[ebx+14h], ecx

loc_80BFDF:
dec	dword ptr [ebx+28h]
pop	ebp
pop	edi
pop	esi
mov	al, 1
pop	ebx
add	esp, 2Ch
retn
sub_80BDB0 endp

align 10h



sub_80BFF0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 18h
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	ecx, [esi+178h]
mov	eax, 1
shl	eax, cl
cmp	dword ptr [esi+0FCh], 0
push	edi
mov	edi, [esi+198h]
mov	[esp+20h+var_18], eax
jz	short loc_80C02E
cmp	dword ptr [edi+28h], 0
jnz	short loc_80C02E
call	sub_80BAF0
test	al, al
jnz	short loc_80C02E
pop	edi
pop	esi
add	esp, 18h
retn

loc_80C02E:
mov	eax, [esi+18h]
mov	[esp+20h+var_4], esi
mov	ecx, [eax]
mov	[esp+20h+var_14], ecx
mov	edx, [eax+4]
push	ebx
xor	ebx, ebx
cmp	[esi+140h], ebx
mov	[esp+24h+var_10], edx
mov	ecx, [edi+10h]
push	ebp
mov	ebp, [edi+0Ch]
jle	short loc_80C0A0

loc_80C054:
cmp	ecx, 1
mov	eax, [esp+28h+arg_4]
mov	eax, [eax+ebx*4]
mov	[esp+28h+arg_0], eax
jge	short loc_80C085
push	1
push	ecx
lea	ecx, [esp+30h+var_14]
push	ebp
push	ecx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	short loc_80C0C6
mov	ebp, [esp+28h+var_C]
mov	ecx, [esp+28h+var_8]
mov	eax, [esp+28h+arg_0]

loc_80C085:
dec	ecx
mov	edx, ebp
sar	edx, cl
test	dl, 1
jz	short loc_80C097
mov	dx, word ptr [esp+28h+var_18]
or	[eax], dx

loc_80C097:
inc	ebx
cmp	ebx, [esi+140h]
jl	short loc_80C054

loc_80C0A0:
mov	eax, [esi+18h]
mov	edx, [esp+28h+var_14]
mov	[eax], edx
mov	eax, [esi+18h]
mov	edx, [esp+28h+var_10]
mov	[eax+4], edx
dec	dword ptr [edi+28h]
mov	[edi+0Ch], ebp
pop	ebp
pop	ebx
mov	[edi+10h], ecx
pop	edi
mov	al, 1
pop	esi
add	esp, 18h
retn

loc_80C0C6:
pop	ebp
pop	ebx
pop	edi
xor	al, al
pop	esi
add	esp, 18h
retn
sub_80BFF0 endp




sub_80C0D0 proc	near

var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 13Ch
push	ebx
push	ebp
mov	ebp, [esp+144h+arg_0]
mov	eax, [ebp+170h]
mov	ecx, [ebp+178h]
mov	ebx, [ebp+198h]
mov	[esp+144h+var_130], eax
mov	eax, 1
shl	eax, cl
push	esi
mov	[esp+148h+var_128], ebx
mov	[esp+148h+var_108], eax
or	eax, 0FFFFFFFFh
shl	eax, cl
cmp	dword ptr [ebp+0FCh], 0
mov	[esp+148h+var_10C], eax
jz	short loc_80C132
cmp	dword ptr [ebx+28h], 0
jnz	short loc_80C132
mov	esi, ebp
call	sub_80BAF0
test	al, al
jnz	short loc_80C132
pop	esi
pop	ebp
pop	ebx
add	esp, 13Ch
retn

loc_80C132:
cmp	byte ptr [ebx+8], 0
push	edi
jnz	loc_80C39A
mov	eax, [ebp+18h]
mov	[esp+14Ch+var_114], ebp
mov	ecx, [eax]
mov	[esp+14Ch+var_124], ecx
mov	edx, [eax+4]
mov	ecx, [esp+14Ch+arg_4]
mov	[esp+14Ch+var_120], edx
mov	edx, [ecx]
mov	ecx, [ebx+3Ch]
mov	eax, [ebx+14h]
mov	esi, [ebx+0Ch]
mov	edi, [ebx+10h]
mov	[esp+14Ch+var_104], ecx
mov	ecx, [ebp+16Ch]
mov	[esp+14Ch+var_13C], eax
mov	[esp+14Ch+var_12C], edx
mov	[esp+14Ch+var_110], 0
mov	[esp+14Ch+var_138], ecx
test	eax, eax
jnz	loc_80C2EB
cmp	ecx, [esp+14Ch+var_130]
jg	loc_80C37A

loc_80C196:
cmp	edi, 8
jge	short loc_80C1C8
push	0
push	edi
lea	edx, [esp+154h+var_124]
push	esi
push	edx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80C47F
mov	edi, [esp+14Ch+var_118]
cmp	edi, 8
mov	esi, [esp+14Ch+var_11C]
jge	short loc_80C1C8
mov	eax, 1
jmp	short loc_80C1F4

loc_80C1C8:
mov	edx, [esp+14Ch+var_104]
lea	ecx, [edi-8]
mov	eax, esi
sar	eax, cl
and	eax, 0FFh
mov	ecx, [edx+eax*4+90h]
test	ecx, ecx
jz	short loc_80C1EF
movzx	ebp, byte ptr [eax+edx+490h]
sub	edi, ecx
jmp	short loc_80C21B

loc_80C1EF:
mov	eax, 9

loc_80C1F4:
push	eax
mov	eax, [esp+150h+var_104]
push	eax
push	edi
lea	ecx, [esp+158h+var_124]
push	esi
push	ecx
call	sub_80B3D0
mov	ebp, eax
add	esp, 14h
test	ebp, ebp
jl	loc_80C47F
mov	esi, [esp+14Ch+var_11C]
mov	edi, [esp+14Ch+var_118]

loc_80C21B:
mov	ecx, ebp
sar	ecx, 4
and	ebp, 0Fh
mov	[esp+14Ch+var_134], ecx
jz	short loc_80C293
cmp	ebp, 1
jz	short loc_80C24B
mov	eax, [esp+14Ch+arg_0]
mov	edx, [eax]
mov	dword ptr [edx+14h], 76h
mov	ecx, [eax]
mov	edx, [ecx+4]
push	0FFFFFFFFh
push	eax
call	edx
add	esp, 8

loc_80C24B:
cmp	edi, 1
jge	short loc_80C271
push	1
push	edi
lea	eax, [esp+154h+var_124]
push	esi
push	eax
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80C47F
mov	esi, [esp+14Ch+var_11C]
mov	edi, [esp+14Ch+var_118]

loc_80C271:
dec	edi
mov	ecx, edi
mov	edx, esi
sar	edx, cl
mov	ecx, [esp+14Ch+var_134]
test	dl, 1
jz	short loc_80C28A
mov	ebp, [esp+14Ch+var_108]
jmp	loc_80C3B4

loc_80C28A:
mov	ebp, [esp+14Ch+var_10C]
jmp	loc_80C3B4

loc_80C293:
cmp	ecx, 0Fh
jz	loc_80C3B4
mov	ebx, 1
shl	ebx, cl
mov	[esp+14Ch+var_13C], ebx
test	ecx, ecx
jz	short loc_80C2E0
cmp	edi, ecx
jge	short loc_80C2CF
push	ecx
push	edi
lea	edx, [esp+154h+var_124]
push	esi
push	edx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80C47F
mov	esi, [esp+14Ch+var_11C]
mov	edi, [esp+14Ch+var_118]

loc_80C2CF:
sub	edi, [esp+14Ch+var_134]
mov	eax, esi
mov	ecx, edi
sar	eax, cl
dec	ebx
and	eax, ebx
add	[esp+14Ch+var_13C], eax

loc_80C2E0:
mov	ebx, [esp+14Ch+var_128]
mov	ebp, [esp+14Ch+arg_0]

loc_80C2EB:
cmp	[esp+14Ch+var_13C], 0
jbe	loc_80C37A
mov	eax, [esp+14Ch+var_138]
cmp	eax, [esp+14Ch+var_130]
jg	short loc_80C376

loc_80C300:
mov	ecx, ds:dword_1465DD0[eax*4]
mov	edx, [esp+14Ch+var_12C]
cmp	word ptr [edx+ecx*2], 0
lea	ebx, [edx+ecx*2]
jz	short loc_80C363
cmp	edi, 1
jge	short loc_80C33B
push	1
push	edi
lea	eax, [esp+154h+var_124]
push	esi
push	eax
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80C47F
mov	esi, [esp+14Ch+var_11C]
mov	edi, [esp+14Ch+var_118]

loc_80C33B:
dec	edi
mov	edx, esi
mov	ecx, edi
sar	edx, cl
test	dl, 1
jz	short loc_80C363
movzx	eax, word ptr [ebx]
mov	ecx, [esp+14Ch+var_108]
movsx	edx, ax
test	ecx, edx
jnz	short loc_80C363
test	ax, ax
jge	short loc_80C35E
mov	ecx, [esp+14Ch+var_10C]

loc_80C35E:
add	eax, ecx
mov	[ebx], ax

loc_80C363:
mov	eax, [esp+14Ch+var_138]
inc	eax
cmp	eax, [esp+14Ch+var_130]
mov	[esp+14Ch+var_138], eax
jle	short loc_80C300
mov	ebx, [esp+14Ch+var_128]

loc_80C376:
dec	[esp+14Ch+var_13C]

loc_80C37A:
mov	edx, [ebp+18h]
mov	eax, [esp+14Ch+var_124]
mov	[edx], eax
mov	ecx, [ebp+18h]
mov	edx, [esp+14Ch+var_120]
mov	eax, [esp+14Ch+var_13C]
mov	[ecx+4], edx
mov	[ebx+0Ch], esi
mov	[ebx+10h], edi
mov	[ebx+14h], eax

loc_80C39A:
dec	dword ptr [ebx+28h]
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 13Ch
retn
align 10h

loc_80C3B0:
mov	ecx, [esp+14Ch+var_134]

loc_80C3B4:
mov	edx, [esp+14Ch+var_138]
mov	eax, ds:dword_1465DD0[edx*4]
mov	ebx, [esp+14Ch+var_12C]
cmp	word ptr [ebx+eax*2], 0
lea	ebx, [ebx+eax*2]
jz	short loc_80C424
cmp	edi, 1
jge	short loc_80C3F3
push	1
push	edi
lea	ecx, [esp+154h+var_124]
push	esi
push	ecx
call	sub_80B2B0
add	esp, 10h
test	al, al
jz	loc_80C47F
mov	esi, [esp+14Ch+var_11C]
mov	edi, [esp+14Ch+var_118]

loc_80C3F3:
dec	edi
mov	edx, esi
mov	ecx, edi
sar	edx, cl
test	dl, 1
jz	short loc_80C42D
movzx	eax, word ptr [ebx]
mov	ecx, [esp+14Ch+var_108]
movsx	edx, ax
test	ecx, edx
jnz	short loc_80C42D
test	ax, ax
jl	short loc_80C419
add	eax, ecx
mov	[ebx], ax
jmp	short loc_80C42D

loc_80C419:
mov	ecx, [esp+14Ch+var_10C]
add	eax, ecx
mov	[ebx], ax
jmp	short loc_80C42D

loc_80C424:
sub	ecx, 1
mov	[esp+14Ch+var_134], ecx
js	short loc_80C440

loc_80C42D:
mov	edx, [esp+14Ch+var_138]
inc	edx
cmp	edx, [esp+14Ch+var_130]
mov	[esp+14Ch+var_138], edx
jle	loc_80C3B0

loc_80C440:
test	ebp, ebp
jz	short loc_80C460
mov	eax, ds:dword_1465DD0[edx*4]
mov	ecx, [esp+14Ch+var_12C]
mov	[ecx+eax*2], bp
mov	ecx, [esp+14Ch+var_110]
mov	[esp+ecx*4+14Ch+var_100], eax
inc	ecx
mov	[esp+14Ch+var_110], ecx

loc_80C460:
inc	edx
cmp	edx, [esp+14Ch+var_130]
mov	[esp+14Ch+var_138], edx
jle	loc_80C196
mov	ebp, [esp+14Ch+arg_0]
mov	ebx, [esp+14Ch+var_128]
jmp	loc_80C37A

loc_80C47F:
mov	eax, [esp+14Ch+var_110]
test	eax, eax
jle	short loc_80C49A

loc_80C487:
mov	edx, [esp+eax*4+14Ch+var_104]
mov	esi, [esp+14Ch+var_12C]
dec	eax
xor	ecx, ecx
mov	[esi+edx*2], cx
test	eax, eax
jg	short loc_80C487

loc_80C49A:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 13Ch
retn
sub_80C0D0 endp

align 10h



sub_80C4B0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+18h+arg_0]
mov	eax, [esi+16Ch]
xor	ebp, ebp
cmp	eax, ebp
setz	bl
push	edi
mov	edi, [esi+198h]
xor	cl, cl
mov	[esp+1Ch+var_4], edi
mov	byte ptr [esp+1Ch+arg_0], bl
test	bl, bl
jz	short loc_80C4E4
cmp	[esi+170h], ebp
jmp	short loc_80C4FC

loc_80C4E4:
mov	edx, [esi+170h]
cmp	eax, edx
jg	short loc_80C4F3
cmp	edx, 40h
jl	short loc_80C4F5

loc_80C4F3:
mov	cl, 1

loc_80C4F5:
cmp	dword ptr [esi+124h], 1

loc_80C4FC:
jz	short loc_80C500
mov	cl, 1

loc_80C500:
mov	eax, [esi+174h]
cmp	eax, ebp
jz	short loc_80C515
dec	eax
cmp	[esi+178h], eax
jz	short loc_80C515
mov	cl, 1

loc_80C515:
cmp	dword ptr [esi+178h], 0Dh
jg	short loc_80C522
test	cl, cl
jz	short loc_80C561

loc_80C522:
mov	eax, [esi]
mov	dword ptr [eax+14h], 10h
mov	ecx, [esi]
mov	edx, [esi+16Ch]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [esi+170h]
mov	[eax+1Ch], ecx
mov	edx, [esi]
mov	eax, [esi+174h]
mov	[edx+20h], eax
mov	ecx, [esi]
mov	edx, [esi+178h]
mov	[ecx+24h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80C561:
cmp	[esi+124h], ebp
mov	[esp+1Ch+var_C], ebp
jle	loc_80C640
lea	edx, [esi+128h]
mov	[esp+1Ch+var_8], edx
jmp	short loc_80C580
align 10h

loc_80C580:
mov	eax, [esp+1Ch+var_8]
mov	ecx, [eax]
mov	ebx, [ecx+4]
mov	ebp, ebx
shl	ebp, 8
add	ebp, [esi+8Ch]
cmp	byte ptr [esp+1Ch+arg_0], 0
jnz	short loc_80C5C5
cmp	dword ptr [ebp+0], 0
jge	short loc_80C5C5
mov	edx, [esi]
mov	dword ptr [edx+14h], 73h
mov	eax, [esi]
mov	[eax+18h], ebx
mov	ecx, [esi]
mov	dword ptr [ecx+1Ch], 0
mov	edx, [esi]
mov	eax, [edx+4]
push	0FFFFFFFFh
push	esi
call	eax
add	esp, 8

loc_80C5C5:
mov	edi, [esi+16Ch]
cmp	edi, [esi+170h]
jg	short loc_80C61C

loc_80C5D3:
mov	eax, [ebp+edi*4+0]
xor	ecx, ecx
test	eax, eax
setl	cl
dec	ecx
and	eax, ecx
cmp	[esi+174h], eax
jz	short loc_80C609
mov	edx, [esi]
mov	dword ptr [edx+14h], 73h
mov	eax, [esi]
mov	[eax+18h], ebx
mov	ecx, [esi]
mov	[ecx+1Ch], edi
mov	edx, [esi]
mov	eax, [edx+4]
push	0FFFFFFFFh
push	esi
call	eax
add	esp, 8

loc_80C609:
mov	ecx, [esi+178h]
mov	[ebp+edi*4+0], ecx
inc	edi
cmp	edi, [esi+170h]
jle	short loc_80C5D3

loc_80C61C:
mov	eax, [esp+1Ch+var_C]
add	[esp+1Ch+var_8], 4
inc	eax
cmp	eax, [esi+124h]
mov	[esp+1Ch+var_C], eax
jl	loc_80C580
mov	edi, [esp+1Ch+var_4]
mov	bl, byte ptr [esp+1Ch+arg_0]
xor	ebp, ebp

loc_80C640:
cmp	[esi+174h], ebp
jnz	short loc_80C65E
test	bl, bl
jz	short loc_80C655
mov	dword ptr [edi+4], offset sub_80BB70
jmp	short loc_80C672

loc_80C655:
mov	dword ptr [edi+4], offset sub_80BDB0
jmp	short loc_80C672

loc_80C65E:
test	bl, bl
jz	short loc_80C66B
mov	dword ptr [edi+4], offset sub_80BFF0
jmp	short loc_80C672

loc_80C66B:
mov	dword ptr [edi+4], offset sub_80C0D0

loc_80C672:
cmp	[esi+124h], ebp
mov	[esp+1Ch+var_C], ebp
jle	short loc_80C6EB
lea	ebp, [edi+18h]
lea	ebx, [esi+128h]

loc_80C687:
cmp	byte ptr [esp+1Ch+arg_0], 0
mov	eax, [ebx]
jz	short loc_80C6AC
cmp	dword ptr [esi+174h], 0
jnz	short loc_80C6CB
mov	eax, [eax+14h]
lea	edx, [edi+eax*4+2Ch]
push	edx
push	eax
push	1
push	esi
call	sub_80AFF0
jmp	short loc_80C6C8

loc_80C6AC:
mov	eax, [eax+18h]
lea	edi, [edi+eax*4+2Ch]
push	edi
push	eax
push	0
push	esi
call	sub_80AFF0
mov	eax, [edi]
mov	ecx, [esp+2Ch+var_4]
mov	[ecx+3Ch], eax
mov	edi, ecx

loc_80C6C8:
add	esp, 10h

loc_80C6CB:
mov	eax, [esp+1Ch+var_C]
mov	dword ptr [ebp+0], 0
inc	eax
add	ebx, 4
add	ebp, 4
cmp	eax, [esi+124h]
mov	[esp+1Ch+var_C], eax
jl	short loc_80C687
xor	ebp, ebp

loc_80C6EB:
mov	[edi+10h], ebp
mov	[edi+0Ch], ebp
mov	[edi+14h], ebp
mov	byte ptr [edi+8], 0
mov	edx, [esi+0FCh]
mov	[edi+28h], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_80C4B0 endp

align 10h



sub_80C710 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	40h
push	1
push	esi
call	ecx
mov	[esi+198h], eax
mov	dword ptr [eax], offset	sub_80C4B0
xor	ebx, ebx
mov	[eax+2Ch], ebx
mov	[eax+30h], ebx
mov	[eax+34h], ebx
mov	[eax+38h], ebx
mov	eax, [esi+24h]
mov	edx, [esi+4]
mov	ecx, [edx]
shl	eax, 8
push	eax
push	1
push	esi
call	ecx
add	esp, 18h
cmp	[esi+24h], ebx
mov	[esi+8Ch], eax
mov	edx, eax
jle	short loc_80C779
push	edi
mov	edi, edi

loc_80C760:
or	eax, 0FFFFFFFFh
mov	edi, edx
mov	ecx, 40h
inc	ebx
rep stosd
add	edx, 100h
cmp	ebx, [esi+24h]
jl	short loc_80C760
pop	edi

loc_80C779:
pop	esi
pop	ebx
retn
sub_80C710 endp

align 10h



sub_80C780 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	0
push	esi
call	sub_80FC10
add	esp, 8
cmp	byte ptr [esi+0B0h], 0
jnz	short loc_80C7B0
push	esi
call	sub_816780
push	esi
call	sub_816130
push	0
push	esi
call	sub_815870
add	esp, 10h

loc_80C7B0:
push	esi
call	sub_815270
add	esp, 4
cmp	byte ptr [esi+0B1h], 0
push	esi
jz	short loc_80C7D4
mov	eax, [esi]
mov	dword ptr [eax+14h], 1
mov	ecx, [esi]
mov	edx, [ecx]
call	edx
jmp	short loc_80C7E9

loc_80C7D4:
cmp	byte ptr [esi+0D4h], 0
jz	short loc_80C7E4
call	sub_80F120
jmp	short loc_80C7E9

loc_80C7E4:
call	sub_80E4B0

loc_80C7E9:
add	esp, 4
cmp	dword ptr [esi+0A8h], 1
jg	short loc_80C802
cmp	byte ptr [esi+0B2h], 0
jnz	short loc_80C802
xor	al, al
jmp	short loc_80C807

loc_80C802:
mov	eax, 1

loc_80C807:
push	eax
push	esi
call	sub_814510
push	0
push	esi
call	sub_813D00
push	esi
call	sub_80D6B0
mov	eax, [esi+4]
mov	ecx, [eax+18h]
push	esi
call	ecx
mov	edx, [esi+14Ch]
mov	eax, [edx]
push	esi
call	eax
add	esp, 1Ch
pop	esi
retn
sub_80C780 endp

align 10h



sub_80C840 proc	near

arg_0= dword ptr  4

mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	0FFh
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80C870
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80C870
mov	eax, [esi]
mov	dword ptr [eax+14h], 18h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80C870:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	dl, byte ptr [esp+arg_0]
mov	[ecx], dl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short locret_80C8A3
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short locret_80C8A3
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
mov	[esp+arg_0], esi
jmp	eax

locret_80C8A3:
retn
sub_80C840 endp

align 10h



sub_80C8B0 proc	near
mov	eax, [esi+18h]
mov	edx, [eax]
mov	ecx, ebx
sar	ecx, 8
mov	[edx], cl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80C8E4
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80C8E4
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80C8E4:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	[ecx], bl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short locret_80C911
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short locret_80C911
mov	eax, [esi]
mov	dword ptr [eax+14h], 18h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
pop	ecx

locret_80C911:
retn
sub_80C8B0 endp

align 10h



sub_80C920 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
mov	esi, eax
mov	eax, [esp+10h+arg_0]
push	edi
mov	edi, [esi+eax*4+48h]
mov	[esp+14h+var_4], edi
test	edi, edi
jnz	short loc_80C950
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 34h
mov	edx, [esi]
mov	[edx+18h], eax
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80C950:
mov	[esp+14h+var_8], 0
lea	eax, [edi+4]
mov	edx, 10h

loc_80C960:
mov	ecx, 0FFh
cmp	[eax-4], cx
mov	ecx, 1
jbe	short loc_80C974
mov	[esp+14h+var_8], ecx

loc_80C974:
mov	ebx, 0FFh
cmp	[eax-2], bx
jbe	short loc_80C983
mov	[esp+14h+var_8], ecx

loc_80C983:
cmp	[eax], bx
jbe	short loc_80C98C
mov	[esp+14h+var_8], ecx

loc_80C98C:
cmp	[eax+2], bx
jbe	short loc_80C996
mov	[esp+14h+var_8], ecx

loc_80C996:
add	eax, 8
sub	edx, ecx
jnz	short loc_80C960
cmp	[edi+80h], dl
jnz	loc_80CAE9
mov	eax, [esi+18h]
mov	edx, [eax]
push	ebp
mov	[edx], bl
inc	dword ptr [eax]
or	ebp, 0FFFFFFFFh
add	[eax+4], ebp
jnz	short loc_80C9DE
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80C9DE
mov	ecx, [esi]
mov	edi, 18h
mov	[ecx+14h], edi
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4
jmp	short loc_80C9E3

loc_80C9DE:
mov	edi, 18h

loc_80C9E3:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	0DBh
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CA0E
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80CA0E
mov	eax, [esi]
mov	[eax+14h], edi
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80CA0E:
mov	ebx, [esp+18h+var_8]
neg	ebx
sbb	ebx, ebx
and	ebx, 40h
add	ebx, 43h
call	sub_80C8B0
mov	eax, [esi+18h]
mov	cl, byte ptr [esp+18h+var_8]
mov	edx, [eax]
shl	cl, 4
add	cl, byte ptr [esp+18h+arg_0]
mov	[edx], cl
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CA56
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CA56
mov	ecx, [esi]
mov	[ecx+14h], edi
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CA56:
mov	edi, offset dword_1465DD0
jmp	short loc_80CA60
align 10h

loc_80CA60:
cmp	[esp+18h+var_8], 0
mov	ecx, [edi]
mov	edx, [esp+18h+var_4]
movzx	ebx, word ptr [edx+ecx*2]
jz	short loc_80CAA4
mov	eax, [esi+18h]
mov	edx, [eax]
mov	ecx, ebx
shr	ecx, 8
mov	[edx], cl
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CAA4
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CAA4
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CAA4:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	[ecx], bl
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CAD2
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80CAD2
mov	eax, [esi]
mov	dword ptr [eax+14h], 18h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80CAD2:
add	edi, 4
cmp	edi, offset unk_1465ED0
jl	short loc_80CA60
mov	eax, [esp+18h+var_4]
mov	byte ptr [eax+80h], 1
pop	ebp

loc_80CAE9:
mov	eax, [esp+14h+var_8]
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn
sub_80C920 endp

align 10h



sub_80CB00 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
cmp	byte ptr [esp+4+arg_4],	0
push	ebx
push	esi
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
jz	short loc_80CB1D
mov	ebx, [esi+eax*4+68h]
add	eax, 10h
mov	[esp+0Ch+arg_0], eax
jmp	short loc_80CB21

loc_80CB1D:
mov	ebx, [esi+eax*4+58h]

loc_80CB21:
mov	[esp+0Ch+var_4], ebx
test	ebx, ebx
jnz	short loc_80CB45
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [ecx+14h], 32h
mov	edx, [esi]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80CB45:
cmp	byte ptr [ebx+111h], 0
jnz	loc_80CC61
push	ebp
push	edi
push	0C4h
call	sub_80C840
add	esp, 4
xor	ebp, ebp
xor	edi, edi
xor	edx, edx
xor	ecx, ecx
lea	eax, [ebx+2]
mov	[esp+14h+arg_4], 4

loc_80CB74:
movzx	ebx, byte ptr [eax-1]
add	ebp, ebx
movzx	ebx, byte ptr [eax]
add	ecx, ebx
movzx	ebx, byte ptr [eax+1]
add	edx, ebx
movzx	ebx, byte ptr [eax+2]
add	edi, ebx
add	eax, 4
sub	[esp+14h+arg_4], 1
jnz	short loc_80CB74
add	edi, edx
add	edi, ecx
add	ebp, edi
lea	ebx, [ebp+13h]
call	sub_80C8B0
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	dl, byte ptr [esp+14h+arg_0]
mov	[ecx], dl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80CBD6
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CBD6
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CBD6:
mov	ebx, [esp+14h+var_4]
mov	edi, 1
nop

loc_80CBE0:
mov	eax, [esi+18h]
mov	dl, [edi+ebx]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80CC12
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CC12
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CC12:
inc	edi
cmp	edi, 10h
jle	short loc_80CBE0
xor	edi, edi
test	ebp, ebp
jle	short loc_80CC58
mov	edi, edi

loc_80CC20:
mov	eax, [esi+18h]
mov	dl, [ebx+edi+11h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80CC53
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CC53
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CC53:
inc	edi
cmp	edi, ebp
jl	short loc_80CC20

loc_80CC58:
pop	edi
mov	byte ptr [ebx+111h], 1
pop	ebp

loc_80CC61:
pop	esi
pop	ebx
pop	ecx
retn
sub_80CB00 endp

align 10h



sub_80CC70 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
push	eax
call	sub_80C840
mov	eax, [esi+3Ch]
add	esp, 4
lea	ebx, [eax+eax*2+8]
call	sub_80C8B0
mov	eax, 0FFFFh
cmp	[esi+20h], eax
jg	short loc_80CC9A
cmp	[esi+1Ch], eax
jle	short loc_80CCB2

loc_80CC9A:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 29h
mov	edx, [esi]
mov	[edx+18h], eax
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80CCB2:
mov	eax, [esi+18h]
mov	cl, [esi+38h]
mov	edx, [eax]
mov	[edx], cl
inc	dword ptr [eax]
or	ebp, 0FFFFFFFFh
add	[eax+4], ebp
jnz	short loc_80CCE6
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80CCE6
mov	eax, [esi]
mov	dword ptr [eax+14h], 18h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80CCE6:
mov	ebx, [esi+20h]
call	sub_80C8B0
mov	ebx, [esi+1Ch]
call	sub_80C8B0
mov	eax, [esi+18h]
mov	dl, [esi+3Ch]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CD27
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CD27
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CD27:
mov	edi, [esi+44h]
xor	ebx, ebx
cmp	[esi+3Ch], ebx
jle	loc_80CDDA

loc_80CD35:
mov	eax, [esi+18h]
mov	dl, [edi]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CD65
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CD65
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CD65:
mov	cl, [edi+8]
mov	eax, [esi+18h]
mov	edx, [eax]
shl	cl, 4
add	cl, [edi+0Ch]
mov	[edx], cl
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CD9C
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CD9C
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CD9C:
mov	eax, [esi+18h]
mov	dl, [edi+10h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], ebp
jnz	short loc_80CDCD
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CDCD
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CDCD:
inc	ebx
add	edi, 54h
cmp	ebx, [esi+3Ch]
jl	loc_80CD35

loc_80CDDA:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_80CC70 endp

align 10h



sub_80CDE0 proc	near
push	ebx
push	esi
push	edi
mov	esi, eax
push	0DAh
call	sub_80C840
mov	ebx, [esi+0E4h]
add	esp, 4
lea	ebx, [ebx+ebx+6]
call	sub_80C8B0
mov	eax, [esi+18h]
mov	dl, [esi+0E4h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
or	edi, 0FFFFFFFFh
add	[eax+4], edi
jnz	short loc_80CE3B
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CE3B
mov	ecx, [esi]
mov	ebx, 18h
mov	[ecx+14h], ebx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4
jmp	short loc_80CE40

loc_80CE3B:
mov	ebx, 18h

loc_80CE40:
push	ebp
xor	ebp, ebp
cmp	[esi+0E4h], ebp
jle	loc_80CF00
lea	ebx, [esi+0E8h]

loc_80CE55:
mov	edi, [ebx]
mov	eax, [esi+18h]
mov	dl, [edi]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80CE88
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CE88
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CE88:
cmp	byte ptr [esi+0D4h], 0
mov	ecx, [edi+14h]
mov	edx, [edi+18h]
jz	short loc_80CEB4
cmp	dword ptr [esi+12Ch], 0
jnz	short loc_80CEB2
xor	edx, edx
cmp	[esi+134h], edx
jz	short loc_80CEB4
cmp	[esi+0B1h], dl
jnz	short loc_80CEB4

loc_80CEB2:
xor	ecx, ecx

loc_80CEB4:
mov	eax, [esi+18h]
shl	cl, 4
add	cl, dl
mov	edx, [eax]
mov	[edx], cl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80CEE8
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CEE8
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CEE8:
inc	ebp
add	ebx, 4
cmp	ebp, [esi+0E4h]
jl	loc_80CE55
mov	ebx, 18h
or	edi, 0FFFFFFFFh

loc_80CF00:
mov	eax, [esi+18h]
mov	dl, [esi+12Ch]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], edi
pop	ebp
jnz	short loc_80CF31
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CF31
mov	ecx, [esi]
mov	[ecx+14h], ebx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CF31:
mov	eax, [esi+18h]
mov	dl, [esi+130h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80CF61
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CF61
mov	ecx, [esi]
mov	[ecx+14h], ebx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CF61:
mov	cl, [esi+134h]
mov	eax, [esi+18h]
mov	edx, [eax]
shl	cl, 4
add	cl, [esi+138h]
mov	[edx], cl
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80CF9A
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80CF9A
mov	ecx, [esi]
mov	[ecx+14h], ebx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80CF9A:
pop	edi
pop	esi
pop	ebx
retn
sub_80CDE0 endp

align 10h



sub_80CFA0 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	esi, eax
push	0E0h
call	sub_80C840
add	esp, 4
mov	ebx, 10h
call	sub_80C8B0
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	4Ah
inc	dword ptr [eax]
or	edi, 0FFFFFFFFh
add	[eax+4], edi
lea	ebp, [ebx+8]
jnz	short loc_80CFEE
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80CFEE
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80CFEE:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	46h
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D019
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D019
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D019:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	49h
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D044
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D044
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D044:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	46h
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D06F
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D06F
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D06F:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	0
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D09A
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D09A
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D09A:
mov	eax, [esi+18h]
mov	dl, [esi+0C5h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D0CA
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80D0CA
mov	ecx, [esi]
mov	[ecx+14h], ebp
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80D0CA:
mov	eax, [esi+18h]
mov	dl, [esi+0C6h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D0FA
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80D0FA
mov	ecx, [esi]
mov	[ecx+14h], ebp
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80D0FA:
mov	eax, [esi+18h]
mov	dl, [esi+0C7h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D12A
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80D12A
mov	ecx, [esi]
mov	[ecx+14h], ebp
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80D12A:
movzx	ebx, word ptr [esi+0C8h]
call	sub_80C8B0
movzx	ebx, word ptr [esi+0CAh]
call	sub_80C8B0
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	0
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D16D
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D16D
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D16D:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	0
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D198
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D198
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D198:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_80CFA0 endp

align 10h



sub_80D1A0 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	esi, eax
push	0EEh
call	sub_80C840
add	esp, 4
mov	ebx, 0Eh
call	sub_80C8B0
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	41h
inc	dword ptr [eax]
or	edi, 0FFFFFFFFh
add	[eax+4], edi
lea	ebp, [ebx+0Ah]
jnz	short loc_80D1EE
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D1EE
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D1EE:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	64h
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D219
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D219
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D219:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	6Fh
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D244
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D244
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D244:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	62h
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D26F
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D26F
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D26F:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	65h
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D29A
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D29A
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D29A:
mov	ebx, 64h
call	sub_80C8B0
xor	ebx, ebx
call	sub_80C8B0
call	sub_80C8B0
mov	eax, [esi+40h]
sub	eax, 3
jz	short loc_80D2CB
sub	eax, 2
mov	eax, [esi+18h]
mov	ecx, [eax]
jz	short loc_80D2C6
mov	[ecx], bl
jmp	short loc_80D2D3

loc_80D2C6:
mov	byte ptr [ecx],	2
jmp	short loc_80D2D3

loc_80D2CB:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	1

loc_80D2D3:
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D2F6
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D2F6
mov	eax, [esi]
mov	[eax+14h], ebp
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D2F6:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_80D1A0 endp

align 10h



sub_80D300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_8]
cmp	edi, 0FFFDh
jbe	short loc_80D326
mov	eax, [esi]
mov	dword ptr [eax+14h], 0Bh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D326:
mov	eax, [esp+0Ch+arg_4]
push	eax
call	sub_80C840
add	esp, 4
lea	ebx, [edi+2]
call	sub_80C8B0
pop	edi
pop	esi
pop	ebx
retn
sub_80D300 endp

align 10h



sub_80D340 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

mov	dl, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	[ecx], dl
inc	dword ptr [eax]
add	dword ptr [eax+4], 0FFFFFFFFh
jnz	short loc_80D378
mov	eax, [eax+0Ch]
push	esi
call	eax
add	esp, 4
test	al, al
jnz	short loc_80D378
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 18h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80D378:
pop	esi
retn
sub_80D340 endp

align 10h



sub_80D380 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+14Ch]
push	0D8h
call	sub_80C840
add	esp, 4
mov	dword ptr [edi+1Ch], 0
cmp	byte ptr [esi+0C4h], 0
jz	short loc_80D3B0
mov	eax, esi
call	sub_80CFA0

loc_80D3B0:
cmp	byte ptr [esi+0CCh], 0
pop	edi
jz	short loc_80D3C2
mov	eax, esi
pop	esi
jmp	sub_80D1A0

loc_80D3C2:
pop	esi
retn
sub_80D380 endp

align 10h



sub_80D3D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+44h]
xor	ebx, ebx
push	edi
xor	edi, edi
cmp	[esi+3Ch], ebx
mov	[esp+10h+var_4], ebx
jle	short loc_80D40E
push	ebp
lea	ebp, [eax+10h]
lea	esp, [esp+0]

loc_80D3F0:
mov	eax, [ebp+0]
push	eax
mov	eax, esi
call	sub_80C920
inc	edi
add	esp, 4
add	ebx, eax
add	ebp, 54h
cmp	edi, [esi+3Ch]
jl	short loc_80D3F0
mov	[esp+14h+var_4], ebx
pop	ebp

loc_80D40E:
cmp	byte ptr [esi+0B1h], 0
jnz	short loc_80D46F
cmp	byte ptr [esi+0D4h], 0
jnz	short loc_80D46F
cmp	dword ptr [esi+38h], 8
jnz	short loc_80D46F
mov	ecx, [esi+3Ch]
mov	eax, [esi+44h]
mov	bl, 1
test	ecx, ecx
jle	short loc_80D44A
add	eax, 18h

loc_80D435:
cmp	dword ptr [eax-4], 1
jg	short loc_80D440
cmp	dword ptr [eax], 1
jle	short loc_80D442

loc_80D440:
xor	bl, bl

loc_80D442:
add	eax, 54h
sub	ecx, 1
jnz	short loc_80D435

loc_80D44A:
cmp	[esp+10h+var_4], 0
jz	short loc_80D471
test	bl, bl
jz	short loc_80D471
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 4Bh
mov	edx, [esi]
mov	eax, [edx+4]
push	0
push	esi
xor	bl, bl
call	eax
add	esp, 8
jmp	short loc_80D471

loc_80D46F:
xor	bl, bl

loc_80D471:
cmp	byte ptr [esi+0B1h], 0
mov	ecx, esi
pop	edi
jz	short loc_80D48C
pop	esi
mov	eax, 0C9h
pop	ebx
add	esp, 4
jmp	sub_80CC70

loc_80D48C:
cmp	byte ptr [esi+0D4h], 0
pop	esi
jz	short loc_80D4A4
mov	eax, 0C2h
pop	ebx
add	esp, 4
jmp	sub_80CC70

loc_80D4A4:
test	bl, bl
pop	ebx
jz	short loc_80D4B6
mov	eax, 0C0h
add	esp, 4
jmp	sub_80CC70

loc_80D4B6:
mov	eax, 0C1h
add	esp, 4
jmp	sub_80CC70
sub_80D3D0 endp

align 10h



sub_80D4D0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
cmp	byte ptr [esi+0B1h], 0
push	edi
mov	edi, [esi+14Ch]
mov	[esp+0Ch+arg_0], edi
jnz	loc_80D56F
push	ebp
xor	ebp, ebp
cmp	[esi+0E4h], ebp
jle	short loc_80D56E
lea	ebx, [esi+0E8h]
nop

loc_80D500:
cmp	byte ptr [esi+0D4h], 0
mov	edi, [ebx]
jz	short loc_80D541
cmp	dword ptr [esi+12Ch], 0
jnz	short loc_80D52F
cmp	dword ptr [esi+134h], 0
jnz	short loc_80D55E
mov	eax, [edi+14h]
push	0
push	eax
mov	eax, esi
call	sub_80CB00
add	esp, 8
jmp	short loc_80D55E

loc_80D52F:
mov	ecx, [edi+18h]
push	1
push	ecx
mov	eax, esi
call	sub_80CB00
add	esp, 8
jmp	short loc_80D55E

loc_80D541:
mov	edx, [edi+14h]
push	0
push	edx
mov	eax, esi
call	sub_80CB00
mov	eax, [edi+18h]
push	1
push	eax
mov	eax, esi
call	sub_80CB00
add	esp, 10h

loc_80D55E:
inc	ebp
add	ebx, 4
cmp	ebp, [esi+0E4h]
jl	short loc_80D500
mov	edi, [esp+10h+arg_0]

loc_80D56E:
pop	ebp

loc_80D56F:
mov	ecx, [esi+0BCh]
cmp	ecx, [edi+1Ch]
jz	short loc_80D5A5
push	0DDh
call	sub_80C840
add	esp, 4
mov	ebx, 4
call	sub_80C8B0
mov	ebx, [esi+0BCh]
call	sub_80C8B0
mov	edx, [esi+0BCh]
mov	[edi+1Ch], edx

loc_80D5A5:
pop	edi
mov	eax, esi
pop	esi
pop	ebx
jmp	sub_80CDE0
sub_80D4D0 endp

align 10h



sub_80D5B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	0D9h
call	sub_80C840
add	esp, 4
pop	esi
retn
sub_80D5B0 endp

align 10h



sub_80D5D0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	0D8h
call	sub_80C840
add	esp, 4
xor	edi, edi
lea	ebx, [esi+48h]
lea	esp, [esp+0]

loc_80D5F0:
cmp	dword ptr [ebx], 0
jz	short loc_80D600
push	edi
mov	eax, esi
call	sub_80C920
add	esp, 4

loc_80D600:
inc	edi
add	ebx, 4
cmp	edi, 4
jl	short loc_80D5F0
cmp	byte ptr [esi+0B1h], 0
jnz	short loc_80D645
xor	edi, edi
lea	ebx, [esi+68h]

loc_80D617:
cmp	dword ptr [ebx-10h], 0
jz	short loc_80D62A
push	0
push	edi
mov	eax, esi
call	sub_80CB00
add	esp, 8

loc_80D62A:
cmp	dword ptr [ebx], 0
jz	short loc_80D63C
push	1
push	edi
mov	eax, esi
call	sub_80CB00
add	esp, 8

loc_80D63C:
inc	edi
add	ebx, 4
cmp	edi, 4
jl	short loc_80D617

loc_80D645:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	0FFh
inc	dword ptr [eax]
or	edi, 0FFFFFFFFh
add	[eax+4], edi
lea	ebx, [edi+19h]
jnz	short loc_80D676
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D676
mov	eax, [esi]
mov	[eax+14h], ebx
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D676:
mov	eax, [esi+18h]
mov	ecx, [eax]
mov	byte ptr [ecx],	0D9h
inc	dword ptr [eax]
add	[eax+4], edi
jnz	short loc_80D6A1
mov	edx, [eax+0Ch]
push	esi
call	edx
add	esp, 4
test	al, al
jnz	short loc_80D6A1
mov	eax, [esi]
mov	[eax+14h], ebx
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80D6A1:
pop	edi
pop	esi
pop	ebx
retn
sub_80D5D0 endp

align 10h



sub_80D6B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	20h
push	1
push	esi
call	ecx
mov	[esi+14Ch], eax
add	esp, 0Ch
mov	dword ptr [eax], offset	sub_80D380
mov	dword ptr [eax+4], offset sub_80D3D0
mov	dword ptr [eax+8], offset sub_80D4D0
mov	dword ptr [eax+0Ch], offset sub_80D5B0
mov	dword ptr [eax+10h], offset sub_80D5D0
mov	dword ptr [eax+14h], offset sub_80D300
mov	dword ptr [eax+18h], offset sub_80D340
mov	dword ptr [eax+1Ch], 0
pop	esi
retn
sub_80D6B0 endp

align 10h



sub_80D710 proc	near

var_514= dword ptr -514h
var_510= dword ptr -510h
var_50C= dword ptr -50Ch
var_508= byte ptr -508h
var_507= byte ptr -507h
var_404= dword ptr -404h
arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 514h
push	ebx
push	ebp
push	esi
mov	esi, [esp+520h+arg_8]
push	edi
mov	edi, 32h
test	esi, esi
jl	short loc_80D72F
cmp	esi, 4
jl	short loc_80D74F

loc_80D72F:
mov	ebp, [esp+524h+arg_0]
mov	eax, [ebp+0]
mov	[eax+14h], edi
mov	ecx, [ebp+0]
mov	[ecx+18h], esi
mov	edx, [ebp+0]
mov	eax, [edx]
push	ebp
call	eax
add	esp, 4
jmp	short loc_80D756

loc_80D74F:
mov	ebp, [esp+524h+arg_0]

loc_80D756:
cmp	[esp+524h+arg_4], 0
jz	short loc_80D76A
mov	ecx, [ebp+esi*4+58h]
mov	[esp+524h+var_514], ecx
jmp	short loc_80D772

loc_80D76A:
mov	edx, [ebp+esi*4+68h]
mov	[esp+524h+var_514], edx

loc_80D772:
cmp	[esp+524h+var_514], 0
jnz	short loc_80D790
mov	eax, [ebp+0]
mov	[eax+14h], edi
mov	ecx, [ebp+0]
mov	[ecx+18h], esi
mov	edx, [ebp+0]
mov	eax, [edx]
push	ebp
call	eax
add	esp, 4

loc_80D790:
mov	esi, [esp+524h+arg_C]
cmp	dword ptr [esi], 0
jnz	short loc_80D7B0
mov	ecx, [ebp+4]
mov	edx, [ecx]
push	500h
push	1
push	ebp
call	edx
add	esp, 0Ch
mov	[esi], eax

loc_80D7B0:
mov	eax, [esi]
mov	[esp+524h+var_50C], eax
xor	edi, edi
mov	ebx, 1
lea	ecx, [ecx+0]

loc_80D7C0:
mov	ecx, [esp+524h+var_514]
movzx	esi, byte ptr [ebx+ecx]
test	esi, esi
jl	short loc_80D7D7
lea	edx, [esi+edi]
cmp	edx, 100h
jle	short loc_80D7EC

loc_80D7D7:
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 8
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
add	esp, 4

loc_80D7EC:
test	esi, esi
jz	short loc_80D801
push	esi		; size_t
lea	eax, [esp+edi+528h+var_508]
push	ebx		; int
push	eax		; void *
call	_memset
add	esp, 0Ch
add	edi, esi

loc_80D801:
inc	ebx
cmp	ebx, 10h
jle	short loc_80D7C0
mov	[esp+edi+524h+var_508],	0
mov	al, [esp+524h+var_508]
mov	[esp+524h+var_510], edi
xor	edi, edi
xor	esi, esi
movzx	ebx, al
test	al, al
jz	short loc_80D870
lea	eax, [esp+524h+var_508]

loc_80D823:
movzx	eax, byte ptr [eax]
cmp	eax, ebx
jnz	short loc_80D842
lea	ebx, [ebx+0]

loc_80D830:
movzx	ecx, [esp+esi+524h+var_507]
mov	[esp+esi*4+524h+var_404], edi
inc	esi
inc	edi
cmp	ecx, ebx
jz	short loc_80D830

loc_80D842:
mov	edx, 1
mov	ecx, ebx
shl	edx, cl
cmp	edi, edx
jl	short loc_80D864
mov	eax, [ebp+0]
mov	dword ptr [eax+14h], 8
mov	ecx, [ebp+0]
mov	edx, [ecx]
push	ebp
call	edx
add	esp, 4

loc_80D864:
lea	eax, [esp+esi+524h+var_508]
add	edi, edi
inc	ebx
cmp	byte ptr [eax],	0
jnz	short loc_80D823

loc_80D870:
mov	ebp, [esp+524h+var_50C]
push	100h		; size_t
add	ebp, 400h
push	0		; int
push	ebp		; void *
call	_memset
movzx	ebx, [esp+530h+arg_4]
add	esp, 0Ch
neg	ebx
sbb	ebx, ebx
and	ebx, 0FFFFFF10h
xor	esi, esi
add	ebx, 0FFh
cmp	[esp+524h+var_510], esi
jle	short loc_80D8FD
lea	ebx, [ebx+0]

loc_80D8B0:
mov	eax, [esp+524h+var_514]
movzx	edi, byte ptr [eax+esi+11h]
test	edi, edi
jl	short loc_80D8C7
cmp	edi, ebx
jg	short loc_80D8C7
cmp	byte ptr [edi+ebp], 0
jz	short loc_80D8E1

loc_80D8C7:
mov	eax, [esp+524h+arg_0]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 8
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80D8E1:
mov	ecx, [esp+esi*4+524h+var_404]
mov	al, [esp+esi+524h+var_508]
mov	edx, [esp+524h+var_50C]
inc	esi
cmp	esi, [esp+524h+var_510]
mov	[edx+edi*4], ecx
mov	[edi+ebp], al
jl	short loc_80D8B0

loc_80D8FD:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 514h
retn
sub_80D710 endp

align 10h



sub_80D910 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esi+0Ch]
mov	ebx, eax
push	edi
test	ebx, ebx
jnz	short loc_80D936
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 28h
mov	eax, [esi+20h]
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80D936:
mov	ecx, ebx
mov	edi, 1
shl	edi, cl
add	ebp, ebx
mov	ecx, 18h
sub	ecx, ebp
dec	edi
and	edi, [esp+10h+arg_0]
mov	[esp+10h+var_4], ebp
shl	edi, cl
or	edi, [esi+8]
cmp	ebp, 8
jl	short loc_80D9DA
jmp	short loc_80D960
align 10h

loc_80D960:
mov	ecx, [esi]
mov	ebx, edi
sar	ebx, 10h
and	ebx, 0FFh
mov	[ecx], bl
inc	dword ptr [esi]
add	dword ptr [esi+4], 0FFFFFFFFh
jnz	short loc_80D999
mov	eax, [esi+20h]
mov	ebp, [eax+18h]
mov	edx, [ebp+0Ch]
push	eax
call	edx
add	esp, 4
test	al, al
jz	short loc_80D9E7
mov	eax, [ebp+0]
mov	[esi], eax
mov	ecx, [ebp+4]
mov	ebp, [esp+10h+var_4]
mov	[esi+4], ecx

loc_80D999:
cmp	ebx, 0FFh
jnz	short loc_80D9CB
mov	edx, [esi]
mov	byte ptr [edx],	0
inc	dword ptr [esi]
add	dword ptr [esi+4], 0FFFFFFFFh
jnz	short loc_80D9CB
mov	eax, [esi+20h]
mov	ebx, [eax+18h]
push	eax
mov	eax, [ebx+0Ch]
call	eax
add	esp, 4
test	al, al
jz	short loc_80D9E7
mov	ecx, [ebx]
mov	[esi], ecx
mov	edx, [ebx+4]
mov	[esi+4], edx

loc_80D9CB:
sub	ebp, 8
shl	edi, 8
cmp	ebp, 8
mov	[esp+10h+var_4], ebp
jge	short loc_80D960

loc_80D9DA:
mov	[esi+8], edi
pop	edi
mov	[esi+0Ch], ebp
pop	ebp
mov	al, 1
pop	ebx
pop	ecx
retn

loc_80D9E7:
pop	edi
pop	ebp
xor	al, al
pop	ebx
pop	ecx
retn
sub_80D910 endp

align 10h



sub_80D9F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
mov	esi, eax
mov	eax, [esp+0Ch+arg_0]
push	edi
movsx	edi, word ptr [eax]
sub	edi, [esp+10h+arg_4]
mov	eax, edi
jns	short loc_80DA0C
neg	eax
dec	edi

loc_80DA0C:
xor	ebx, ebx
test	eax, eax
jz	short loc_80DA35

loc_80DA12:
inc	ebx
sar	eax, 1
jnz	short loc_80DA12
cmp	ebx, 0Bh
jle	short loc_80DA35
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	dword ptr [edx+14h], 6
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
add	esp, 4

loc_80DA35:
mov	ecx, [ebp+ebx*4+0]
movzx	eax, byte ptr [ebx+ebp+400h]
push	ecx
call	sub_80D910
add	esp, 4
test	al, al
jnz	short loc_80DA55

loc_80DA4E:
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
retn

loc_80DA55:
test	ebx, ebx
jz	short loc_80DA68
push	edi
mov	eax, ebx
call	sub_80D910
add	esp, 4
test	al, al
jz	short loc_80DA4E

loc_80DA68:
mov	eax, offset unk_1465DD4
xor	edi, edi
mov	[esp+10h+arg_4], eax

loc_80DA73:
mov	edx, [eax]
mov	ecx, [esp+10h+arg_0]
movsx	ebx, word ptr [ecx+edx*2]
test	ebx, ebx
jnz	short loc_80DA87
inc	edi
jmp	loc_80DB35

loc_80DA87:
cmp	edi, 0Fh
jle	short loc_80DAB6
lea	esp, [esp+0]

loc_80DA90:
mov	ecx, [esp+10h+arg_C]
mov	edx, [ecx+3C0h]
movzx	eax, byte ptr [ecx+4F0h]
push	edx
call	sub_80D910
add	esp, 4
test	al, al
jz	short loc_80DA4E
sub	edi, 10h
cmp	edi, 0Fh
jg	short loc_80DA90

loc_80DAB6:
mov	[esp+10h+arg_8], ebx
test	ebx, ebx
jge	short loc_80DAC4
neg	ebx
dec	[esp+10h+arg_8]

loc_80DAC4:
sar	ebx, 1
mov	ebp, 1
jz	short loc_80DAF3
lea	ecx, [ecx+0]

loc_80DAD0:
inc	ebp
sar	ebx, 1
jnz	short loc_80DAD0
cmp	ebp, 0Ah
jle	short loc_80DAF3
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 6
mov	eax, [esi+20h]
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80DAF3:
mov	ecx, [esp+10h+arg_C]
shl	edi, 4
add	edi, ebp
movzx	eax, byte ptr [edi+ecx+400h]
mov	ecx, [ecx+edi*4]
push	ecx
call	sub_80D910
add	esp, 4
test	al, al
jz	loc_80DA4E
mov	edx, [esp+10h+arg_8]
push	edx
mov	eax, ebp
call	sub_80D910
add	esp, 4
test	al, al
jz	loc_80DA4E
mov	eax, [esp+10h+arg_4]
xor	edi, edi

loc_80DB35:
add	eax, 4
cmp	eax, offset unk_1465ED0
mov	[esp+10h+arg_4], eax
jl	loc_80DA73
test	edi, edi
jle	short loc_80DB69
mov	ecx, [esp+10h+arg_C]
movzx	eax, byte ptr [ecx+400h]
mov	ecx, [ecx]
push	ecx
call	sub_80D910
add	esp, 4
test	al, al
jz	loc_80DA4E

loc_80DB69:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
retn
sub_80D9F0 endp




sub_80DB70 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, eax
push	7Fh
mov	eax, 7
call	sub_80D910
add	esp, 4
test	al, al
jz	loc_80DC1B
xor	eax, eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	eax, [esi]
mov	byte ptr [eax],	0FFh
inc	dword ptr [esi]
add	dword ptr [esi+4], 0FFFFFFFFh
push	edi
jnz	short loc_80DBC2
mov	eax, [esi+20h]
mov	edi, [eax+18h]
mov	ecx, [edi+0Ch]
push	eax
call	ecx
add	esp, 4
test	al, al
jz	short loc_80DC20
mov	edx, [edi]
mov	[esi], edx
mov	eax, [edi+4]
mov	[esi+4], eax

loc_80DBC2:
mov	ecx, [esi]
sub	bl, 30h
mov	[ecx], bl
inc	dword ptr [esi]
add	dword ptr [esi+4], 0FFFFFFFFh
jnz	short loc_80DBEE
mov	eax, [esi+20h]
mov	edi, [eax+18h]
mov	edx, [edi+0Ch]
push	eax
call	edx
add	esp, 4
test	al, al
jz	short loc_80DC20
mov	eax, [edi]
mov	[esi], eax
mov	ecx, [edi+4]
mov	[esi+4], ecx

loc_80DBEE:
mov	edx, [esi+20h]
xor	eax, eax
cmp	[edx+0E4h], eax
jle	short loc_80DC15
lea	ecx, [esi+10h]
mov	edi, edi

loc_80DC00:
mov	dword ptr [ecx], 0
mov	edx, [esi+20h]
inc	eax
add	ecx, 4
cmp	eax, [edx+0E4h]
jl	short loc_80DC00

loc_80DC15:
pop	edi
pop	esi
mov	al, 1
pop	ebx
retn

loc_80DC1B:
pop	esi
xor	al, al
pop	ebx
retn

loc_80DC20:
pop	edi
pop	esi
xor	al, al
pop	ebx
retn
sub_80DB70 endp

align 10h



sub_80DC30 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 24h
push	esi
push	edi
mov	edi, [esp+2Ch+arg_0]
cmp	dword ptr [edi+0BCh], 0
mov	esi, [edi+15Ch]
mov	eax, [edi+18h]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [esi+0Ch]
mov	[esp+2Ch+var_24], ecx
mov	ecx, [esi+10h]
mov	[esp+2Ch+var_20], edx
mov	edx, [esi+14h]
mov	[esp+2Ch+var_1C], eax
mov	eax, [esi+18h]
mov	[esp+2Ch+var_18], ecx
mov	ecx, [esi+1Ch]
mov	[esp+2Ch+var_14], edx
mov	edx, [esi+20h]
mov	[esp+2Ch+var_10], eax
mov	[esp+2Ch+var_C], ecx
mov	[esp+2Ch+var_8], edx
mov	[esp+2Ch+var_4], edi
jz	short loc_80DCA6
cmp	dword ptr [esi+24h], 0
jnz	short loc_80DCA6
mov	eax, [esi+28h]
push	eax
lea	eax, [esp+30h+var_24]
call	sub_80DB70
add	esp, 4
test	al, al
jnz	short loc_80DCA6
pop	edi
pop	esi
add	esp, 24h
retn

loc_80DCA6:
push	ebx
xor	ebx, ebx
cmp	[edi+100h], ebx
push	ebp
jle	short loc_80DD1C
lea	ecx, [edi+104h]
mov	[esp+34h+arg_0], ecx
lea	esp, [esp+0]

loc_80DCC0:
mov	edx, [esp+34h+arg_0]
mov	eax, [edx]
mov	ecx, [edi+eax*4+0E8h]
lea	ebp, [esp+eax*4+34h+var_14]
mov	eax, [ecx+18h]
mov	edx, [esi+eax*4+3Ch]
mov	eax, [ecx+14h]
mov	ecx, [esi+eax*4+2Ch]
mov	eax, [esp+34h+arg_4]
push	edx
mov	edx, [ebp+0]
push	ecx
mov	ecx, [eax+ebx*4]
push	edx
push	ecx
lea	eax, [esp+44h+var_24]
call	sub_80D9F0
add	esp, 10h
test	al, al
jz	loc_80DD83
mov	edx, [esp+34h+arg_4]
mov	eax, [edx+ebx*4]
movsx	ecx, word ptr [eax]
add	[esp+34h+arg_0], 4
inc	ebx
cmp	ebx, [edi+100h]
mov	[ebp+0], ecx
jl	short loc_80DCC0

loc_80DD1C:
mov	edx, [edi+18h]
mov	eax, [esp+34h+var_24]
mov	[edx], eax
mov	ecx, [edi+18h]
mov	edx, [esp+34h+var_20]
mov	eax, [esp+34h+var_1C]
mov	[ecx+4], edx
mov	ecx, [esp+34h+var_18]
mov	edx, [esp+34h+var_14]
mov	[esi+0Ch], eax
mov	eax, [esp+34h+var_10]
mov	[esi+10h], ecx
mov	ecx, [esp+34h+var_C]
mov	[esi+14h], edx
mov	edx, [esp+34h+var_8]
mov	[esi+18h], eax
mov	[esi+1Ch], ecx
mov	[esi+20h], edx
mov	edi, [edi+0BCh]
test	edi, edi
jz	short loc_80DD79
cmp	dword ptr [esi+24h], 0
jnz	short loc_80DD76
mov	eax, [esi+28h]
inc	eax
and	eax, 7
mov	[esi+24h], edi
mov	[esi+28h], eax

loc_80DD76:
dec	dword ptr [esi+24h]

loc_80DD79:
pop	ebp
pop	ebx
pop	edi
mov	al, 1
pop	esi
add	esp, 24h
retn

loc_80DD83:
pop	ebp
pop	ebx
pop	edi
xor	al, al
pop	esi
add	esp, 24h
retn
sub_80DC30 endp

align 10h



sub_80DD90 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 24h
push	ebx
mov	ebx, [esp+28h+arg_0]
mov	eax, [ebx+18h]
mov	ecx, [eax]
mov	edx, [eax+4]
push	esi
push	edi
mov	edi, [ebx+15Ch]
mov	eax, [edi+0Ch]
mov	[esp+30h+var_24], ecx
mov	ecx, [edi+10h]
mov	[esp+30h+var_20], edx
mov	edx, [edi+14h]
mov	[esp+30h+var_1C], eax
mov	eax, [edi+18h]
mov	[esp+30h+var_18], ecx
mov	ecx, [edi+1Ch]
mov	[esp+30h+var_14], edx
mov	edx, [edi+20h]
mov	[esp+30h+var_10], eax
push	7Fh
mov	eax, 7
lea	esi, [esp+34h+var_24]
mov	[esp+34h+var_C], ecx
mov	[esp+34h+var_8], edx
mov	[esp+34h+var_4], ebx
call	sub_80D910
add	esp, 4
test	al, al
jz	short loc_80DDFB
xor	ecx, ecx
xor	eax, eax
jmp	short loc_80DE16

loc_80DDFB:
mov	eax, [ebx]
mov	dword ptr [eax+14h], 18h
mov	ecx, [ebx]
mov	edx, [ecx]
push	ebx
call	edx
mov	eax, [esp+34h+var_18]
mov	ecx, [esp+34h+var_1C]
add	esp, 4

loc_80DE16:
mov	edx, [ebx+18h]
mov	esi, [esp+30h+var_24]
mov	[edx], esi
mov	edx, [ebx+18h]
mov	esi, [esp+30h+var_20]
mov	[edx+4], esi
mov	edx, [esp+30h+var_C]
mov	[edi+0Ch], ecx
mov	ecx, [esp+30h+var_10]
mov	[edi+10h], eax
mov	eax, [esp+30h+var_14]
mov	[edi+14h], eax
mov	eax, [esp+30h+var_8]
mov	[edi+18h], ecx
mov	[edi+1Ch], edx
mov	[edi+20h], eax
pop	edi
pop	esi
pop	ebx
add	esp, 24h
retn
sub_80DD90 endp

align 10h



sub_80DE60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
push	edi
mov	edi, eax
mov	eax, [esp+0Ch+arg_4]
movsx	eax, word ptr [eax]
sub	eax, [esp+0Ch+arg_8]
jns	short loc_80DE74
neg	eax

loc_80DE74:
xor	esi, esi
test	eax, eax
jz	short loc_80DEA1
lea	ebx, [ebx+0]

loc_80DE80:
inc	esi
sar	eax, 1
jnz	short loc_80DE80
cmp	esi, 0Bh
jle	short loc_80DEA1
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 6
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80DEA1:
inc	dword ptr [edi+esi*4]
xor	esi, esi
mov	ebp, offset unk_1465DD4
jmp	short loc_80DEB0
align 10h

loc_80DEB0:
mov	ecx, [ebp+0]
mov	edx, [esp+0Ch+arg_4]
movsx	ecx, word ptr [edx+ecx*2]
test	ecx, ecx
jnz	short loc_80DEC2
inc	esi
jmp	short loc_80DF22

loc_80DEC2:
cmp	esi, 0Fh
jle	short loc_80DEE5
mov	edx, [ebx+3C0h]
lea	eax, [esi-10h]
shr	eax, 4
inc	eax
mov	edi, eax
neg	edi
shl	edi, 4
add	esi, edi
add	edx, eax
mov	[ebx+3C0h], edx

loc_80DEE5:
test	ecx, ecx
jge	short loc_80DEEB
neg	ecx

loc_80DEEB:
sar	ecx, 1
mov	edi, 1
jz	short loc_80DF15

loc_80DEF4:
inc	edi
sar	ecx, 1
jnz	short loc_80DEF4
cmp	edi, 0Ah
jle	short loc_80DF15
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 6
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80DF15:
shl	esi, 4
add	esi, edi
inc	dword ptr [ebx+esi*4]
lea	eax, [ebx+esi*4]
xor	esi, esi

loc_80DF22:
add	ebp, 4
cmp	ebp, offset unk_1465ED0
jl	short loc_80DEB0
pop	edi
test	esi, esi
pop	esi
pop	ebp
jle	short locret_80DF36
inc	dword ptr [ebx]

locret_80DF36:
retn
sub_80DE60 endp

align 10h



sub_80DF40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
cmp	dword ptr [esi+0BCh], 0
push	edi
mov	edi, [esi+15Ch]
jz	short loc_80DF8E
cmp	dword ptr [edi+24h], 0
jnz	short loc_80DF8B
xor	eax, eax
cmp	[esi+0E4h], eax
jle	short loc_80DF82
lea	ecx, [edi+14h]
lea	ebx, [ebx+0]

loc_80DF70:
mov	dword ptr [ecx], 0
inc	eax
add	ecx, 4
cmp	eax, [esi+0E4h]
jl	short loc_80DF70

loc_80DF82:
mov	eax, [esi+0BCh]
mov	[edi+24h], eax

loc_80DF8B:
dec	dword ptr [edi+24h]

loc_80DF8E:
xor	ebp, ebp
cmp	[esi+100h], ebp
jle	short loc_80DFF9
lea	ecx, [esi+104h]
mov	[esp+10h+arg_0], ecx
push	ebx

loc_80DFA3:
mov	edx, [esp+14h+arg_0]
mov	ecx, [edx]
mov	eax, [esi+ecx*4+0E8h]
mov	edx, [eax+18h]
mov	eax, [eax+14h]
mov	ebx, [edi+edx*4+5Ch]
mov	eax, [edi+eax*4+4Ch]
mov	[esp+14h+var_4], ecx
mov	ecx, [edi+ecx*4+14h]
push	ecx
mov	ecx, [esp+18h+arg_4]
mov	ecx, [ecx+ebp*4]
push	ecx
push	esi
call	sub_80DE60
mov	edx, [esp+20h+arg_4]
mov	eax, [edx+ebp*4]
movsx	ecx, word ptr [eax]
mov	edx, [esp+20h+var_4]
add	[esp+20h+arg_0], 4
inc	ebp
add	esp, 0Ch
mov	[edi+edx*4+14h], ecx
cmp	ebp, [esi+100h]
jl	short loc_80DFA3
pop	ebx

loc_80DFF9:
pop	edi
pop	esi
mov	al, 1
pop	ebp
pop	ecx
retn
sub_80DF40 endp




sub_80E000 proc	near

var_82C= dword ptr -82Ch
var_828= dword ptr -828h
var_824= dword ptr -824h
var_820= dword ptr -820h
var_81C= dword ptr -81Ch
var_818= dword ptr -818h
var_814= dword ptr -814h
var_810= dword ptr -810h
var_80C= byte ptr -80Ch
var_808= dword ptr -808h
var_404= dword ptr -404h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 82Ch
push	ebx
xor	eax, eax
push	ebp
push	esi
push	edi
push	404h		; size_t
push	eax		; int
mov	[esp+844h+var_82C], eax
mov	[esp+844h+var_828], eax
mov	[esp+844h+var_824], eax
mov	[esp+844h+var_820], eax
mov	[esp+844h+var_81C], eax
mov	[esp+844h+var_818], eax
mov	[esp+844h+var_814], eax
mov	[esp+844h+var_810], eax
mov	[esp+844h+var_80C], al
lea	eax, [esp+844h+var_808]
push	eax		; void *
call	_memset
mov	ebx, [esp+848h+arg_8]
add	esp, 0Ch
mov	ecx, 101h
or	eax, 0FFFFFFFFh
lea	edi, [esp+83Ch+var_404]
mov	ebp, 1
rep stosd
mov	[ebx+400h], ebp

loc_80E066:
or	eax, 0FFFFFFFFh
mov	esi, 3B9ACA00h
xor	ecx, ecx

loc_80E070:
mov	edx, [ebx+ecx*4]
test	edx, edx
jz	short loc_80E07F
cmp	edx, esi
jg	short loc_80E07F
mov	esi, edx
mov	eax, ecx

loc_80E07F:
add	ecx, ebp
cmp	ecx, 100h
jle	short loc_80E070
or	edx, 0FFFFFFFFh
mov	edi, 3B9ACA00h
xor	ecx, ecx

loc_80E093:
mov	esi, [ebx+ecx*4]
test	esi, esi
jz	short loc_80E0A6
cmp	esi, edi
jg	short loc_80E0A6
cmp	ecx, eax
jz	short loc_80E0A6
mov	edi, esi
mov	edx, ecx

loc_80E0A6:
add	ecx, ebp
cmp	ecx, 100h
jle	short loc_80E093
test	edx, edx
jl	loc_80E13C
mov	ecx, [ebx+edx*4]
add	[ebx+eax*4], ecx
add	[esp+eax*4+83Ch+var_808], ebp
cmp	[esp+eax*4+83Ch+var_404], 0
lea	ecx, [esp+eax*4+83Ch+var_404]
mov	dword ptr [ebx+edx*4], 0
jl	short loc_80E0F7
lea	ebx, [ebx+0]

loc_80E0E0:
mov	eax, [ecx]
add	[esp+eax*4+83Ch+var_808], ebp
cmp	[esp+eax*4+83Ch+var_404], 0
lea	ecx, [esp+eax*4+83Ch+var_404]
jge	short loc_80E0E0

loc_80E0F7:
add	[esp+edx*4+83Ch+var_808], ebp
mov	[esp+eax*4+83Ch+var_404], edx
cmp	[esp+edx*4+83Ch+var_404], 0
lea	eax, [esp+edx*4+83Ch+var_404]
jl	loc_80E066
jmp	short loc_80E120
align 10h

loc_80E120:
mov	eax, [eax]
add	[esp+eax*4+83Ch+var_808], ebp
cmp	[esp+eax*4+83Ch+var_404], 0
lea	eax, [esp+eax*4+83Ch+var_404]
jge	short loc_80E120
jmp	loc_80E066

loc_80E13C:
mov	ebx, [esp+83Ch+arg_0]
xor	edi, edi
lea	ebp, [edi+27h]

loc_80E148:
mov	esi, [esp+edi*4+83Ch+var_808]
test	esi, esi
jz	short loc_80E16C
cmp	esi, 20h
jle	short loc_80E164
mov	edx, [ebx]
mov	[edx+14h], ebp
mov	eax, [ebx]
mov	ecx, [eax]
push	ebx
call	ecx
add	esp, 4

loc_80E164:
inc	byte ptr [esp+esi+83Ch+var_82C]
lea	eax, [esp+esi+83Ch+var_82C]

loc_80E16C:
inc	edi
cmp	edi, 100h
jle	short loc_80E148
mov	esi, 10h
mov	ecx, 1Eh
mov	edx, esi

loc_80E181:
cmp	byte ptr [esp+ecx+83Ch+var_82C+2], 0
jbe	short loc_80E1C5
jmp	short loc_80E190
align 10h

loc_80E190:
cmp	byte ptr [esp+ecx+83Ch+var_82C], 0
mov	eax, ecx
jnz	short loc_80E1A8
lea	esp, [esp+0]

loc_80E1A0:
dec	eax
cmp	byte ptr [esp+eax+83Ch+var_82C], 0
jz	short loc_80E1A0

loc_80E1A8:
add	byte ptr [esp+ecx+83Ch+var_82C+2], 0FEh
inc	byte ptr [esp+ecx+83Ch+var_82C+1]
add	byte ptr [esp+eax+83Ch+var_82C+1], 2
dec	byte ptr [esp+eax+83Ch+var_82C]
cmp	byte ptr [esp+ecx+83Ch+var_82C+2], 0
lea	eax, [esp+eax+83Ch+var_82C]
ja	short loc_80E190

loc_80E1C5:
dec	ecx
sub	esi, 1
jnz	short loc_80E181
cmp	byte ptr [esp+83Ch+var_81C], 0
jnz	short loc_80E1DA

loc_80E1D2:
dec	edx
cmp	byte ptr [esp+edx+83Ch+var_82C], 0
jz	short loc_80E1D2

loc_80E1DA:
dec	byte ptr [esp+edx+83Ch+var_82C]
mov	ecx, [esp+83Ch+arg_4]
lea	eax, [esp+edx+83Ch+var_82C]
mov	edx, [esp+83Ch+var_82C]
mov	eax, [esp+83Ch+var_828]
mov	[ecx], edx
mov	edx, [esp+83Ch+var_824]
mov	[ecx+4], eax
mov	eax, [esp+83Ch+var_820]
mov	[ecx+8], edx
mov	dl, byte ptr [esp+83Ch+var_81C]
mov	[ecx+0Ch], eax
mov	[ecx+10h], dl
xor	edx, edx
mov	esi, 1

loc_80E212:
xor	eax, eax

loc_80E214:
cmp	[esp+eax*4+83Ch+var_808], esi
jnz	short loc_80E21F
mov	[edx+ecx+11h], al
inc	edx

loc_80E21F:
inc	eax
cmp	eax, 0FFh
jle	short loc_80E214
inc	esi
cmp	esi, 20h
jle	short loc_80E212
pop	edi
pop	esi
pop	ebp
mov	byte ptr [ecx+111h], 0
pop	ebx
add	esp, 82Ch
retn
sub_80E000 endp

align 10h



sub_80E240 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
mov	eax, [esi+15Ch]
mov	[esp+14h+var_10], eax
xor	eax, eax
cmp	[esi+0E4h], eax
mov	[esp+14h+var_8], eax
mov	[esp+14h+var_4], eax
mov	[esp+14h+var_C], eax
jle	loc_80E31B
push	ebx
lea	ecx, [esi+0E8h]
push	ebp
mov	[esp+1Ch+arg_0], ecx
push	edi
lea	esp, [esp+0]

loc_80E280:
mov	edx, [esp+20h+arg_0]
mov	eax, [edx]
mov	edi, [eax+14h]
cmp	byte ptr [esp+edi+20h+var_8], 0
mov	ebp, [eax+18h]
lea	ebx, [esp+edi+20h+var_8]
jnz	short loc_80E2C5
cmp	dword ptr [esi+edi*4+58h], 0
jnz	short loc_80E2AB
push	esi
call	sub_8098A0
add	esp, 4
mov	[esi+edi*4+58h], eax

loc_80E2AB:
mov	eax, [esp+20h+var_10]
mov	ecx, [eax+edi*4+4Ch]
mov	edx, [esi+edi*4+58h]
push	ecx
push	edx
push	esi
call	sub_80E000
add	esp, 0Ch
mov	byte ptr [ebx],	1

loc_80E2C5:
cmp	byte ptr [esp+ebp+20h+var_4], 0
lea	edi, [esp+ebp+20h+var_4]
jnz	short loc_80E2FE
cmp	dword ptr [esi+ebp*4+68h], 0
jnz	short loc_80E2E4
push	esi
call	sub_8098A0
add	esp, 4
mov	[esi+ebp*4+68h], eax

loc_80E2E4:
mov	eax, [esp+20h+var_10]
mov	ecx, [eax+ebp*4+5Ch]
mov	edx, [esi+ebp*4+68h]
push	ecx
push	edx
push	esi
call	sub_80E000
add	esp, 0Ch
mov	byte ptr [edi],	1

loc_80E2FE:
mov	eax, [esp+20h+var_C]
add	[esp+20h+arg_0], 4
inc	eax
cmp	eax, [esi+0E4h]
mov	[esp+20h+var_C], eax
jl	loc_80E280
pop	edi
pop	ebp
pop	ebx

loc_80E31B:
pop	esi
add	esp, 10h
retn
sub_80E240 endp




sub_80E320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 8
cmp	[esp+8+arg_4], 0
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+15Ch]
jz	short loc_80E346
mov	dword ptr [edi+4], offset sub_80DF40
mov	dword ptr [edi+8], offset sub_80E240
jmp	short loc_80E354

loc_80E346:
mov	dword ptr [edi+4], offset sub_80DC30
mov	dword ptr [edi+8], offset sub_80DD90

loc_80E354:
cmp	dword ptr [esi+0E4h], 0
mov	[esp+10h+var_8], 0
jle	loc_80E489
lea	eax, [edi+14h]
lea	ecx, [esi+0E8h]
push	ebx
mov	[esp+14h+var_4], eax
mov	[esp+14h+arg_0], ecx
push	ebp
lea	esp, [esp+0]

loc_80E380:
cmp	[esp+18h+arg_4], 0
mov	edx, [esp+18h+arg_0]
mov	eax, [edx]
mov	ebp, [eax+14h]
mov	ebx, [eax+18h]
jz	loc_80E43D
test	ebp, ebp
jl	short loc_80E3A0
cmp	ebp, 4
jl	short loc_80E3B8

loc_80E3A0:
mov	eax, [esi]
mov	dword ptr [eax+14h], 32h
mov	ecx, [esi]
mov	[ecx+18h], ebp
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80E3B8:
test	ebx, ebx
jl	short loc_80E3C1
cmp	ebx, 4
jl	short loc_80E3D9

loc_80E3C1:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 32h
mov	edx, [esi]
mov	[edx+18h], ebx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80E3D9:
cmp	dword ptr [edi+ebp*4+4Ch], 0
jnz	short loc_80E3F6
mov	edx, [esi+4]
mov	eax, [edx]
push	404h
push	1
push	esi
call	eax
add	esp, 0Ch
mov	[edi+ebp*4+4Ch], eax

loc_80E3F6:
mov	ecx, [edi+ebp*4+4Ch]
push	404h		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch
cmp	dword ptr [edi+ebx*4+5Ch], 0
jnz	short loc_80E427
mov	edx, [esi+4]
mov	eax, [edx]
push	404h
push	1
push	esi
call	eax
add	esp, 0Ch
mov	[edi+ebx*4+5Ch], eax

loc_80E427:
mov	ecx, [edi+ebx*4+5Ch]
push	404h		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch
jmp	short loc_80E45C

loc_80E43D:
lea	edx, [edi+ebp*4+2Ch]
push	edx
push	ebp
push	1
push	esi
call	sub_80D710
lea	eax, [edi+ebx*4+3Ch]
push	eax
push	ebx
push	0
push	esi
call	sub_80D710
add	esp, 20h

loc_80E45C:
mov	ecx, [esp+18h+var_4]
mov	eax, [esp+18h+var_8]
add	[esp+18h+arg_0], 4
mov	dword ptr [ecx], 0
inc	eax
add	ecx, 4
cmp	eax, [esi+0E4h]
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], ecx
jl	loc_80E380
pop	ebp
pop	ebx

loc_80E489:
xor	eax, eax
mov	[edi+0Ch], eax
mov	[edi+10h], eax
mov	ecx, [esi+0BCh]
mov	[edi+24h], ecx
mov	[edi+28h], eax
pop	edi
pop	esi
add	esp, 8
retn
sub_80E320 endp

align 10h



sub_80E4B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	6Ch
push	1
push	esi
call	ecx
mov	[esi+15Ch], eax
xor	ecx, ecx
mov	dword ptr [eax], offset	sub_80E320
add	esp, 0Ch
mov	[eax+3Ch], ecx
mov	[eax+2Ch], ecx
mov	[eax+5Ch], ecx
mov	[eax+4Ch], ecx
mov	[eax+40h], ecx
mov	[eax+30h], ecx
mov	[eax+60h], ecx
mov	[eax+50h], ecx
mov	[eax+44h], ecx
mov	[eax+34h], ecx
mov	[eax+64h], ecx
mov	[eax+54h], ecx
mov	[eax+48h], ecx
mov	[eax+38h], ecx
mov	[eax+68h], ecx
mov	[eax+58h], ecx
pop	esi
retn
sub_80E4B0 endp

align 10h



sub_80E510 proc	near
mov	eax, [esi+20h]
push	edi
mov	edi, [eax+18h]
push	eax
mov	eax, [edi+0Ch]
call	eax
add	esp, 4
test	al, al
jnz	short loc_80E53D
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	dword ptr [edx+14h], 18h
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
add	esp, 4

loc_80E53D:
mov	eax, [edi]
mov	[esi+10h], eax
mov	ecx, [edi+4]
mov	[esi+14h], ecx
pop	edi
retn
sub_80E510 endp

align 10h



sub_80E550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esi+1Ch]
push	ebp
mov	ebp, [esp+8+arg_4]
test	ebp, ebp
jnz	short loc_80E576
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 28h
mov	eax, [esi+20h]
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80E576:
cmp	byte ptr [esi+0Ch], 0
jnz	loc_80E67E
push	edi
mov	ecx, ebp
mov	edi, 1
shl	edi, cl
add	ebx, ebp
mov	ecx, 18h
sub	ecx, ebx
dec	edi
and	edi, [esp+0Ch+arg_0]
shl	edi, cl
or	edi, [esi+18h]
cmp	ebx, 8
jl	loc_80E677
mov	ebp, ebx
shr	ebp, 3
mov	ecx, ebp
neg	ecx
lea	edx, [ebx+ecx*8]
mov	[esp+0Ch+arg_4], ebp
mov	[esp+0Ch+arg_0], edx
lea	ebx, [ebx+0]

loc_80E5C0:
mov	eax, [esi+10h]
mov	ebx, edi
sar	ebx, 10h
and	ebx, 0FFh
mov	[eax], bl
inc	dword ptr [esi+10h]
add	dword ptr [esi+14h], 0FFFFFFFFh
jnz	short loc_80E615
mov	eax, [esi+20h]
mov	ebp, [eax+18h]
mov	ecx, [ebp+0Ch]
push	eax
call	ecx
add	esp, 4
test	al, al
jnz	short loc_80E605
mov	edx, [esi+20h]
mov	eax, [edx]
mov	dword ptr [eax+14h], 18h
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
add	esp, 4

loc_80E605:
mov	eax, [ebp+0]
mov	[esi+10h], eax
mov	ecx, [ebp+4]
mov	ebp, [esp+0Ch+arg_4]
mov	[esi+14h], ecx

loc_80E615:
cmp	ebx, 0FFh
jnz	short loc_80E663
mov	edx, [esi+10h]
mov	byte ptr [edx],	0
inc	dword ptr [esi+10h]
add	dword ptr [esi+14h], 0FFFFFFFFh
jnz	short loc_80E663
mov	eax, [esi+20h]
mov	ebx, [eax+18h]
push	eax
mov	eax, [ebx+0Ch]
call	eax
add	esp, 4
test	al, al
jnz	short loc_80E658
mov	ecx, [esi+20h]
mov	edx, [ecx]
mov	dword ptr [edx+14h], 18h
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	edx, [ecx]
push	eax
call	edx
add	esp, 4

loc_80E658:
mov	eax, [ebx]
mov	[esi+10h], eax
mov	ecx, [ebx+4]
mov	[esi+14h], ecx

loc_80E663:
shl	edi, 8
sub	ebp, 1
mov	[esp+0Ch+arg_4], ebp
jnz	loc_80E5C0
mov	ebx, [esp+0Ch+arg_0]

loc_80E677:
mov	[esi+18h], edi
mov	[esi+1Ch], ebx
pop	edi

loc_80E67E:
pop	ebp
pop	ebx
retn
sub_80E550 endp

align 10h



sub_80E690 proc	near
push	ebx
push	esi
mov	esi, edx
cmp	byte ptr [esi+0Ch], 0
push	edi
mov	ebx, eax
mov	edi, ecx
jnz	short loc_80E6B7
test	ebx, ebx
jbe	short loc_80E6B7

loc_80E6A3:
movzx	eax, byte ptr [edi]
push	1
push	eax
call	sub_80E550
add	esp, 8
inc	edi
sub	ebx, 1
jnz	short loc_80E6A3

loc_80E6B7:
pop	edi
pop	esi
pop	ebx
retn
sub_80E690 endp

align 10h



sub_80E6C0 proc	near
push	esi
mov	esi, eax
mov	eax, [esi+38h]
test	eax, eax
jbe	loc_80E758
push	edi
xor	edi, edi
sar	eax, 1
jz	short loc_80E6F8

loc_80E6D5:
inc	edi
sar	eax, 1
jnz	short loc_80E6D5
cmp	edi, 0Eh
jle	short loc_80E6F8
mov	eax, [esi+20h]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 28h
mov	eax, [esi+20h]
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80E6F8:
mov	ecx, [esi+34h]
mov	eax, edi
shl	eax, 4
cmp	byte ptr [esi+0Ch], 0
jz	short loc_80E712
mov	ecx, [esi+ecx*4+5Ch]
inc	dword ptr [ecx+eax*4]
lea	eax, [ecx+eax*4]
jmp	short loc_80E72B

loc_80E712:
mov	ecx, [esi+ecx*4+4Ch]
movzx	edx, byte ptr [ecx+eax+400h]
mov	eax, [ecx+eax*4]
push	edx
push	eax
call	sub_80E550
add	esp, 8

loc_80E72B:
test	edi, edi
jz	short loc_80E73C
mov	ecx, [esi+38h]
push	edi
push	ecx
call	sub_80E550
add	esp, 8

loc_80E73C:
mov	eax, [esi+3Ch]
mov	ecx, [esi+40h]
mov	edx, esi
mov	dword ptr [esi+38h], 0
call	sub_80E690
mov	dword ptr [esi+3Ch], 0
pop	edi

loc_80E758:
pop	esi
retn
sub_80E6C0 endp

align 10h



sub_80E760 proc	near

arg_0= byte ptr	 4

push	ebx
mov	bl, [esp+4+arg_0]
push	esi
mov	esi, eax
call	sub_80E6C0
cmp	byte ptr [esi+0Ch], 0
jnz	short loc_80E7B7
push	7
push	7Fh
call	sub_80E550
mov	eax, [esi+10h]
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+1Ch], 0
mov	byte ptr [eax],	0FFh
inc	dword ptr [esi+10h]
add	esp, 8
add	dword ptr [esi+14h], 0FFFFFFFFh
jnz	short loc_80E7A1
call	sub_80E510

loc_80E7A1:
mov	ecx, [esi+10h]
sub	bl, 30h
mov	[ecx], bl
inc	dword ptr [esi+10h]
add	dword ptr [esi+14h], 0FFFFFFFFh
jnz	short loc_80E7B7
call	sub_80E510

loc_80E7B7:
mov	ecx, [esi+20h]
cmp	dword ptr [ecx+12Ch], 0
jnz	short loc_80E7E8
xor	eax, eax
cmp	[ecx+0E4h], eax
jle	short loc_80E7F6
lea	ecx, [esi+24h]

loc_80E7D0:
mov	dword ptr [ecx], 0
mov	edx, [esi+20h]
inc	eax
add	ecx, 4
cmp	eax, [edx+0E4h]
jl	short loc_80E7D0
pop	esi
pop	ebx
retn

loc_80E7E8:
mov	dword ptr [esi+38h], 0
mov	dword ptr [esi+3Ch], 0

loc_80E7F6:
pop	esi
pop	ebx
retn
sub_80E760 endp

align 10h



sub_80E800 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	eax, [ebp+18h]
mov	ecx, [eax]
push	esi
mov	esi, [ebp+15Ch]
push	edi
mov	edi, [ebp+138h]
mov	[esi+10h], ecx
mov	edx, [ebp+18h]
mov	eax, [edx+4]
mov	[esi+14h], eax
cmp	dword ptr [ebp+0BCh], 0
jz	short loc_80E844
cmp	dword ptr [esi+44h], 0
jnz	short loc_80E844
mov	ecx, [esi+48h]
push	ecx
mov	eax, esi
call	sub_80E760
add	esp, 4

loc_80E844:
cmp	dword ptr [ebp+100h], 0
mov	[esp+18h+var_C], 0
jle	loc_80E92A
movsx	edx, di
lea	eax, [ebp+104h]
mov	[esp+18h+var_4], edx
mov	[esp+18h+var_8], eax
push	ebx
jmp	short loc_80E870
align 10h

loc_80E870:
mov	ecx, [esp+1Ch+var_8]
mov	edi, [ecx]
mov	edx, [esp+1Ch+arg_4]
mov	eax, [esp+1Ch+var_C]
mov	ecx, [edx+eax*4]
movsx	edx, word ptr [ecx]
mov	cl, byte ptr [esp+1Ch+var_4]
mov	ebx, [ebp+edi*4+0E8h]
sar	edx, cl
mov	eax, edx
sub	eax, [esi+edi*4+24h]
mov	[esi+edi*4+24h], edx
mov	[esp+1Ch+arg_0], eax
jns	short loc_80E8A7
neg	eax
dec	[esp+1Ch+arg_0]

loc_80E8A7:
xor	edi, edi
test	eax, eax
jz	short loc_80E8CF
lea	ecx, [ecx+0]

loc_80E8B0:
inc	edi
sar	eax, 1
jnz	short loc_80E8B0
cmp	edi, 0Bh
jle	short loc_80E8CF
mov	edx, [ebp+0]
mov	dword ptr [edx+14h], 6
mov	eax, [ebp+0]
mov	ecx, [eax]
push	ebp
call	ecx
add	esp, 4

loc_80E8CF:
cmp	byte ptr [esi+0Ch], 0
mov	eax, [ebx+14h]
jz	short loc_80E8E4
mov	edx, [esi+eax*4+5Ch]
inc	dword ptr [edx+edi*4]
lea	eax, [edx+edi*4]
jmp	short loc_80E8FD

loc_80E8E4:
mov	eax, [esi+eax*4+4Ch]
movzx	ecx, byte ptr [eax+edi+400h]
mov	edx, [eax+edi*4]
push	ecx
push	edx
call	sub_80E550
add	esp, 8

loc_80E8FD:
test	edi, edi
jz	short loc_80E90F
mov	eax, [esp+1Ch+arg_0]
push	edi
push	eax
call	sub_80E550
add	esp, 8

loc_80E90F:
mov	eax, [esp+1Ch+var_C]
add	[esp+1Ch+var_8], 4
inc	eax
cmp	eax, [ebp+100h]
mov	[esp+1Ch+var_C], eax
jl	loc_80E870
pop	ebx

loc_80E92A:
mov	ecx, [ebp+18h]
mov	edx, [esi+10h]
mov	[ecx], edx
mov	eax, [ebp+18h]
mov	ecx, [esi+14h]
mov	[eax+4], ecx
mov	ebp, [ebp+0BCh]
test	ebp, ebp
jz	short loc_80E95B
cmp	dword ptr [esi+44h], 0
jnz	short loc_80E958
mov	edx, [esi+48h]
inc	edx
and	edx, 7
mov	[esi+44h], ebp
mov	[esi+48h], edx

loc_80E958:
dec	dword ptr [esi+44h]

loc_80E95B:
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 0Ch
retn
sub_80E800 endp

align 10h



sub_80E970 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebp
mov	ebp, [esp+14h+arg_0]
mov	ecx, [ebp+18h]
mov	eax, [ebp+138h]
mov	edx, [ecx]
push	esi
mov	esi, [ebp+15Ch]
push	edi
mov	edi, [ebp+130h]
mov	[esi+10h], edx
mov	[esp+1Ch+var_10], eax
mov	eax, [ebp+18h]
mov	ecx, [eax+4]
mov	[esi+14h], ecx
cmp	dword ptr [ebp+0BCh], 0
mov	[esp+1Ch+var_4], edi
jz	short loc_80E9C2
cmp	dword ptr [esi+44h], 0
jnz	short loc_80E9C2
mov	edx, [esi+48h]
push	edx
mov	eax, esi
call	sub_80E760
add	esp, 4

loc_80E9C2:
mov	eax, [esp+1Ch+arg_4]
mov	ecx, [eax]
mov	eax, [ebp+12Ch]
push	ebx
xor	ebx, ebx
cmp	eax, edi
mov	[esp+20h+var_8], ecx
mov	[esp+20h+var_C], eax
jg	loc_80EB14

loc_80E9E1:
mov	edx, ds:dword_1465DD0[eax*4]
mov	ecx, [esp+20h+var_8]
movsx	edi, word ptr [ecx+edx*2]
test	edi, edi
jnz	short loc_80E9FA
inc	ebx
jmp	loc_80EAEE

loc_80E9FA:
mov	ecx, [esp+20h+var_10]
jge	short loc_80EA0E
neg	edi
sar	edi, cl
mov	ecx, edi
not	ecx
mov	[esp+20h+arg_4], ecx
jmp	short loc_80EA14

loc_80EA0E:
sar	edi, cl
mov	[esp+20h+arg_4], edi

loc_80EA14:
test	edi, edi
jnz	short loc_80EA1E
inc	ebx
jmp	loc_80EAEE

loc_80EA1E:
cmp	dword ptr [esi+38h], 0
jbe	short loc_80EA2B
mov	eax, esi
call	sub_80E6C0

loc_80EA2B:
cmp	ebx, 0Fh
jle	short loc_80EA75
lea	ebp, [ebx-10h]
shr	ebp, 4
inc	ebp
mov	edx, ebp
neg	edx
shl	edx, 4
add	ebx, edx

loc_80EA40:
cmp	byte ptr [esi+0Ch], 0
mov	eax, [esi+34h]
jz	short loc_80EA55
mov	eax, [esi+eax*4+5Ch]
inc	dword ptr [eax+3C0h]
jmp	short loc_80EA70

loc_80EA55:
mov	eax, [esi+eax*4+4Ch]
movzx	ecx, byte ptr [eax+4F0h]
mov	edx, [eax+3C0h]
push	ecx
push	edx
call	sub_80E550
add	esp, 8

loc_80EA70:
sub	ebp, 1
jnz	short loc_80EA40

loc_80EA75:
sar	edi, 1
mov	ebp, 1
jz	short loc_80EAA1
mov	edi, edi

loc_80EA80:
inc	ebp
sar	edi, 1
jnz	short loc_80EA80
cmp	ebp, 0Ah
jle	short loc_80EAA1
mov	eax, [esp+20h+arg_0]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 6
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_80EAA1:
mov	ecx, [esi+34h]
shl	ebx, 4
add	ebx, ebp
cmp	byte ptr [esi+0Ch], 0
mov	eax, ebx
jz	short loc_80EABD
mov	ecx, [esi+ecx*4+5Ch]
inc	dword ptr [ecx+eax*4]
lea	eax, [ecx+eax*4]
jmp	short loc_80EAD6

loc_80EABD:
mov	ecx, [esi+ecx*4+4Ch]
movzx	edx, byte ptr [ecx+eax+400h]
mov	eax, [ecx+eax*4]
push	edx
push	eax
call	sub_80E550
add	esp, 8

loc_80EAD6:
mov	ecx, [esp+20h+arg_4]
push	ebp
push	ecx
call	sub_80E550
mov	eax, [esp+28h+var_C]
mov	ebp, [esp+28h+arg_0]
add	esp, 8
xor	ebx, ebx

loc_80EAEE:
inc	eax
cmp	eax, [esp+20h+var_4]
mov	[esp+20h+var_C], eax
jle	loc_80E9E1
test	ebx, ebx
jle	short loc_80EB14
inc	dword ptr [esi+38h]
cmp	dword ptr [esi+38h], 7FFFh
jnz	short loc_80EB14
mov	eax, esi
call	sub_80E6C0

loc_80EB14:
mov	edx, [ebp+18h]
mov	eax, [esi+10h]
mov	[edx], eax
mov	ecx, [ebp+18h]
mov	edx, [esi+14h]
mov	[ecx+4], edx
mov	ebp, [ebp+0BCh]
pop	ebx
test	ebp, ebp
jz	short loc_80EB46
cmp	dword ptr [esi+44h], 0
jnz	short loc_80EB43
mov	eax, [esi+48h]
inc	eax
and	eax, 7
mov	[esi+44h], ebp
mov	[esi+48h], eax

loc_80EB43:
dec	dword ptr [esi+44h]

loc_80EB46:
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 10h
retn
sub_80E970 endp

align 10h



sub_80EB50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	ecx, [edi+18h]
mov	eax, [edi+138h]
mov	edx, [ecx]
mov	esi, [edi+15Ch]
mov	[esi+10h], edx
mov	[esp+8+arg_0], eax
mov	eax, [edi+18h]
mov	ecx, [eax+4]
mov	[esi+14h], ecx
cmp	dword ptr [edi+0BCh], 0
jz	short loc_80EB94
cmp	dword ptr [esi+44h], 0
jnz	short loc_80EB94
mov	edx, [esi+48h]
push	edx
mov	eax, esi
call	sub_80E760
add	esp, 4

loc_80EB94:
push	ebx
xor	ebx, ebx
cmp	[edi+100h], ebx
jle	short loc_80EBCB
push	ebp
mov	ebp, [esp+10h+arg_4]

loc_80EBA4:
mov	eax, [ebp+ebx*4+0]
mov	dx, [eax]
mov	cx, word ptr [esp+10h+arg_0]
sar	dx, cl
push	1
movsx	eax, dx
push	eax
call	sub_80E550
inc	ebx
add	esp, 8
cmp	ebx, [edi+100h]
jl	short loc_80EBA4
pop	ebp

loc_80EBCB:
mov	ecx, [edi+18h]
mov	edx, [esi+10h]
mov	[ecx], edx
mov	eax, [edi+18h]
mov	ecx, [esi+14h]
mov	[eax+4], ecx
mov	edi, [edi+0BCh]
pop	ebx
test	edi, edi
jz	short loc_80EBFD
cmp	dword ptr [esi+44h], 0
jnz	short loc_80EBFA
mov	edx, [esi+48h]
inc	edx
and	edx, 7
mov	[esi+44h], edi
mov	[esi+48h], edx

loc_80EBFA:
dec	dword ptr [esi+44h]

loc_80EBFD:
pop	edi
mov	al, 1
pop	esi
retn
sub_80EB50 endp

align 10h



sub_80EC10 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 114h
mov	eax, [esp+114h+arg_0]
mov	ecx, [eax+138h]
mov	edx, [eax+18h]
push	ebx
mov	ebx, [eax+130h]
push	ebp
push	esi
mov	esi, [eax+15Ch]
mov	[esp+120h+var_110], ecx
mov	ecx, [edx]
mov	[esi+10h], ecx
mov	edx, [eax+18h]
mov	ecx, [edx+4]
mov	[esi+14h], ecx
cmp	dword ptr [eax+0BCh], 0
push	edi
mov	[esp+124h+var_10C], ebx
jz	short loc_80EC70
cmp	dword ptr [esi+44h], 0
jnz	short loc_80EC70
mov	edx, [esi+48h]
push	edx
mov	eax, esi
call	sub_80E760
mov	eax, [esp+128h+arg_0]
add	esp, 4

loc_80EC70:
mov	edx, [eax+12Ch]
mov	ecx, [esp+124h+arg_4]
mov	ebp, [ecx]
mov	eax, edx
cmp	eax, ebx
mov	[esp+124h+var_104], ebp
mov	[esp+124h+var_108], 0
jg	short loc_80ECBB

loc_80EC91:
mov	ecx, ds:dword_1465DD0[eax*4]
movsx	edi, word ptr [ebp+ecx*2+0]
test	edi, edi
jge	short loc_80ECA3
neg	edi

loc_80ECA3:
mov	ecx, [esp+124h+var_110]
sar	edi, cl
mov	[esp+eax*4+124h+var_100], edi
cmp	edi, 1
jnz	short loc_80ECB6
mov	[esp+124h+var_108], eax

loc_80ECB6:
inc	eax
cmp	eax, ebx
jle	short loc_80EC91

loc_80ECBB:
mov	edi, [esi+40h]
add	edi, [esi+3Ch]
mov	ecx, edx
xor	ebp, ebp
xor	ebx, ebx
cmp	ecx, [esp+124h+var_10C]
mov	[esp+124h+var_114], edx
jg	loc_80EE38

loc_80ECD5:
mov	eax, [esp+ecx*4+124h+var_100]
mov	[esp+124h+var_110], eax
test	eax, eax
jnz	short loc_80ECE7
inc	ebp
jmp	loc_80EDFF

loc_80ECE7:
cmp	ebp, 0Fh
jle	short loc_80ED66
lea	esp, [esp+0]

loc_80ECF0:
cmp	ecx, [esp+124h+var_108]
jg	short loc_80ED66
mov	eax, esi
call	sub_80E6C0
cmp	byte ptr [esi+0Ch], 0
mov	eax, [esi+34h]
jz	short loc_80ED12
mov	eax, [esi+eax*4+5Ch]
inc	dword ptr [eax+3C0h]
jmp	short loc_80ED2D

loc_80ED12:
mov	eax, [esi+eax*4+4Ch]
movzx	edx, byte ptr [eax+4F0h]
mov	eax, [eax+3C0h]
push	edx
push	eax
call	sub_80E550
add	esp, 8

loc_80ED2D:
sub	ebp, 10h
cmp	byte ptr [esi+0Ch], 0
jnz	short loc_80ED54
test	ebx, ebx
jbe	short loc_80ED54
lea	ebx, [ebx+0]

loc_80ED40:
movzx	ecx, byte ptr [edi]
push	1
push	ecx
call	sub_80E550
add	esp, 8
inc	edi
sub	ebx, 1
jnz	short loc_80ED40

loc_80ED54:
mov	edi, [esi+40h]
mov	eax, [esp+124h+var_110]
mov	ecx, [esp+124h+var_114]
xor	ebx, ebx
cmp	ebp, 0Fh
jg	short loc_80ECF0

loc_80ED66:
cmp	eax, 1
jle	short loc_80ED76
and	al, 1
mov	[edi+ebx], al
inc	ebx
jmp	loc_80EDFF

loc_80ED76:
mov	eax, esi
call	sub_80E6C0
mov	eax, [esi+34h]
shl	ebp, 4
inc	ebp
cmp	byte ptr [esi+0Ch], 0
jz	short loc_80ED96
mov	edx, [esi+eax*4+5Ch]
inc	dword ptr [edx+ebp*4]
lea	eax, [edx+ebp*4]
jmp	short loc_80EDAF

loc_80ED96:
mov	eax, [esi+eax*4+4Ch]
movzx	ecx, byte ptr [eax+ebp+400h]
mov	edx, [eax+ebp*4]
push	ecx
push	edx
call	sub_80E550
add	esp, 8

loc_80EDAF:
mov	eax, [esp+124h+var_114]
mov	ecx, ds:dword_1465DD0[eax*4]
mov	eax, [esp+124h+var_104]
xor	edx, edx
cmp	[eax+ecx*2], dx
push	1
setnl	dl
push	edx
call	sub_80E550
add	esp, 8
cmp	byte ptr [esi+0Ch], 0
jnz	short loc_80EDF4
test	ebx, ebx
jbe	short loc_80EDF4
lea	esp, [esp+0]

loc_80EDE0:
movzx	ecx, byte ptr [edi]
push	1
push	ecx
call	sub_80E550
add	esp, 8
inc	edi
sub	ebx, 1
jnz	short loc_80EDE0

loc_80EDF4:
mov	edi, [esi+40h]
mov	ecx, [esp+124h+var_114]
xor	ebx, ebx
xor	ebp, ebp

loc_80EDFF:
inc	ecx
cmp	ecx, [esp+124h+var_10C]
mov	[esp+124h+var_114], ecx
jle	loc_80ECD5
test	ebp, ebp
jg	short loc_80EE16
test	ebx, ebx
jbe	short loc_80EE38

loc_80EE16:
inc	dword ptr [esi+38h]
mov	eax, [esi+38h]
add	[esi+3Ch], ebx
mov	ecx, [esi+3Ch]
cmp	eax, 7FFFh
jz	short loc_80EE31
cmp	ecx, 3A9h
jbe	short loc_80EE38

loc_80EE31:
mov	eax, esi
call	sub_80E6C0

loc_80EE38:
mov	eax, [esp+124h+arg_0]
mov	edx, [eax+18h]
mov	ecx, [esi+10h]
mov	[edx], ecx
mov	edx, [eax+18h]
mov	ecx, [esi+14h]
mov	[edx+4], ecx
mov	eax, [eax+0BCh]
test	eax, eax
jz	short loc_80EE70
cmp	dword ptr [esi+44h], 0
jnz	short loc_80EE6D
mov	edx, [esi+48h]
inc	edx
and	edx, 7
mov	[esi+44h], eax
mov	[esi+48h], edx

loc_80EE6D:
dec	dword ptr [esi+44h]

loc_80EE70:
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 114h
retn
sub_80EC10 endp

align 10h



sub_80EE80 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+18h]
mov	ecx, [eax]
mov	esi, [edi+15Ch]
mov	[esi+10h], ecx
mov	edx, [edi+18h]
mov	eax, [edx+4]
mov	[esi+14h], eax
mov	eax, esi
call	sub_80E6C0
push	7
push	7Fh
call	sub_80E550
mov	edx, [esi+10h]
xor	eax, eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
mov	ecx, [edi+18h]
mov	[ecx], edx
mov	eax, [edi+18h]
mov	ecx, [esi+14h]
add	esp, 8
pop	edi
mov	[eax+4], ecx
pop	esi
retn
sub_80EE80 endp

align 10h



sub_80EED0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	esi
mov	esi, [esp+14h+arg_0]
mov	eax, [esi+15Ch]
mov	[esp+14h+var_4], eax
call	sub_80E6C0
xor	eax, eax
cmp	[esi+12Ch], eax
mov	[esp+14h+var_8], eax
setz	cl
cmp	[esi+0E4h], eax
mov	byte ptr [esp+14h+arg_0], cl
mov	[esp+14h+var_C], eax
jle	loc_80EF8E
push	ebx
lea	eax, [esi+0E8h]
push	ebp
mov	[esp+1Ch+var_10], eax
push	edi

loc_80EF17:
mov	edx, [esp+20h+var_10]
mov	eax, [edx]
test	cl, cl
jz	short loc_80EF2F
cmp	dword ptr [esi+134h], 0
jnz	short loc_80EF75
mov	ebp, [eax+14h]
jmp	short loc_80EF32

loc_80EF2F:
mov	ebp, [eax+18h]

loc_80EF32:
cmp	byte ptr [esp+ebp+20h+var_8], 0
lea	ebx, [esp+ebp+20h+var_8]
jnz	short loc_80EF75
lea	edi, [esi+ebp*4+58h]
test	cl, cl
jnz	short loc_80EF49
lea	edi, [esi+ebp*4+68h]

loc_80EF49:
cmp	dword ptr [edi], 0
jnz	short loc_80EF59
push	esi
call	sub_8098A0
add	esp, 4
mov	[edi], eax

loc_80EF59:
mov	eax, [esp+20h+var_4]
mov	ecx, [eax+ebp*4+5Ch]
mov	edx, [edi]
push	ecx
push	edx
push	esi
call	sub_80E000
mov	cl, byte ptr [esp+2Ch+arg_0]
add	esp, 0Ch
mov	byte ptr [ebx],	1

loc_80EF75:
mov	eax, [esp+20h+var_C]
add	[esp+20h+var_10], 4
inc	eax
cmp	eax, [esi+0E4h]
mov	[esp+20h+var_C], eax
jl	short loc_80EF17
pop	edi
pop	ebp
pop	ebx

loc_80EF8E:
pop	esi
add	esp, 10h
retn
sub_80EED0 endp

align 10h



sub_80EFA0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= byte ptr	 8

sub	esp, 8
push	ebx
mov	bl, [esp+0Ch+arg_4]
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
mov	ebp, [esi+15Ch]
push	edi
xor	edi, edi
mov	[ebp+20h], esi
mov	[ebp+0Ch], bl
cmp	[esi+12Ch], edi
setz	al
mov	byte ptr [esp+18h+var_8], al
cmp	[esi+134h], edi
jnz	short loc_80EFE8
test	al, al
jz	short loc_80EFDF
mov	dword ptr [ebp+4], offset sub_80E800
jmp	short loc_80F016

loc_80EFDF:
mov	dword ptr [ebp+4], offset sub_80E970
jmp	short loc_80F016

loc_80EFE8:
test	al, al
jz	short loc_80EFF5
mov	dword ptr [ebp+4], offset sub_80EB50
jmp	short loc_80F016

loc_80EFF5:
mov	dword ptr [ebp+4], offset sub_80EC10
cmp	[ebp+40h], edi
jnz	short loc_80F016
mov	eax, [esi+4]
mov	ecx, [eax]
push	3E8h
push	1
push	esi
call	ecx
add	esp, 0Ch
mov	[ebp+40h], eax

loc_80F016:
test	bl, bl
jz	short loc_80F023
mov	dword ptr [ebp+8], offset sub_80EED0
jmp	short loc_80F02A

loc_80F023:
mov	dword ptr [ebp+8], offset sub_80EE80

loc_80F02A:
cmp	[esi+0E4h], edi
mov	[esp+18h+var_4], edi
jle	loc_80F100
lea	edx, [ebp+24h]
mov	[esp+18h+arg_0], edx
lea	ebx, [esi+0E8h]
jmp	short loc_80F050
align 10h

loc_80F050:
cmp	byte ptr [esp+18h+var_8], 0
mov	ecx, [esp+18h+arg_0]
mov	eax, [ebx]
mov	[ecx], edi
jz	short loc_80F06C
cmp	[esi+134h], edi
jnz	short loc_80F0E3
mov	edi, [eax+14h]
jmp	short loc_80F072

loc_80F06C:
mov	edi, [eax+18h]
mov	[ebp+34h], edi

loc_80F072:
cmp	[esp+18h+arg_4], 0
jz	short loc_80F0CD
test	edi, edi
jl	short loc_80F082
cmp	edi, 4
jl	short loc_80F09A

loc_80F082:
mov	edx, [esi]
mov	dword ptr [edx+14h], 32h
mov	eax, [esi]
mov	[eax+18h], edi
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F09A:
cmp	dword ptr [ebp+edi*4+5Ch], 0
jnz	short loc_80F0B7
mov	eax, [esi+4]
mov	ecx, [eax]
push	404h
push	1
push	esi
call	ecx
add	esp, 0Ch
mov	[ebp+edi*4+5Ch], eax

loc_80F0B7:
mov	edx, [ebp+edi*4+5Ch]
push	404h		; size_t
push	0		; int
push	edx		; void *
call	_memset
add	esp, 0Ch
jmp	short loc_80F0E1

loc_80F0CD:
mov	ecx, [esp+18h+var_8]
lea	eax, [ebp+edi*4+4Ch]
push	eax
push	edi
push	ecx
push	esi
call	sub_80D710
add	esp, 10h

loc_80F0E1:
xor	edi, edi

loc_80F0E3:
mov	eax, [esp+18h+var_4]
add	[esp+18h+arg_0], 4
inc	eax
add	ebx, 4
cmp	eax, [esi+0E4h]
mov	[esp+18h+var_4], eax
jl	loc_80F050

loc_80F100:
mov	[ebp+38h], edi
mov	[ebp+3Ch], edi
mov	[ebp+18h], edi
mov	[ebp+1Ch], edi
mov	edx, [esi+0BCh]
mov	[ebp+48h], edi
pop	edi
pop	esi
mov	[ebp+44h], edx
pop	ebp
pop	ebx
add	esp, 8
retn
sub_80EFA0 endp




sub_80F120 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	6Ch
push	1
push	esi
call	ecx
mov	[esi+15Ch], eax
xor	ecx, ecx
mov	dword ptr [eax], offset	sub_80EFA0
add	esp, 0Ch
mov	[eax+4Ch], ecx
mov	[eax+5Ch], ecx
mov	[eax+50h], ecx
mov	[eax+60h], ecx
mov	[eax+54h], ecx
mov	[eax+64h], ecx
mov	[eax+58h], ecx
mov	[eax+68h], ecx
mov	[eax+40h], ecx
pop	esi
retn
sub_80F120 endp

align 10h



sub_80F160 proc	near
cmp	dword ptr [esi+20h], 0
jbe	short loc_80F178
cmp	dword ptr [esi+1Ch], 0
jbe	short loc_80F178
cmp	dword ptr [esi+3Ch], 0
jle	short loc_80F178
cmp	dword ptr [esi+24h], 0
jg	short loc_80F18B

loc_80F178:
mov	eax, [esi]
mov	dword ptr [eax+14h], 20h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F18B:
mov	eax, 0FFDCh
cmp	[esi+20h], eax
jg	short loc_80F19A
cmp	[esi+1Ch], eax
jle	short loc_80F1B2

loc_80F19A:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 29h
mov	edx, [esi]
mov	[edx+18h], eax
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80F1B2:
cmp	dword ptr [esi+38h], 8
jz	short loc_80F1D3
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Fh
mov	eax, [esi]
mov	ecx, [esi+38h]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80F1D3:
mov	eax, 0Ah
cmp	[esi+3Ch], eax
jle	short loc_80F1FD
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 1Ah
mov	edx, [esi]
mov	ecx, [esi+3Ch]
mov	[edx+18h], ecx
mov	edx, [esi]
mov	[edx+1Ch], eax
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80F1FD:
mov	eax, [esi+44h]
push	ebx
push	ebp
mov	ebx, 1
xor	ebp, ebp
cmp	[esi+3Ch], ebp
push	edi
mov	[esi+0D8h], ebx
mov	[esi+0DCh], ebx
jle	short loc_80F27D
lea	edi, [eax+0Ch]
mov	edi, edi

loc_80F220:
mov	eax, [edi-4]
test	eax, eax
jle	short loc_80F237
cmp	eax, 4
jg	short loc_80F237
mov	eax, [edi]
test	eax, eax
jle	short loc_80F237
cmp	eax, 4
jle	short loc_80F24A

loc_80F237:
mov	edx, [esi]
mov	dword ptr [edx+14h], 12h
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80F24A:
mov	eax, [esi+0D8h]
mov	ecx, [edi-4]
cmp	eax, ecx
jg	short loc_80F259
mov	eax, ecx

loc_80F259:
mov	[esi+0D8h], eax
mov	eax, [esi+0DCh]
mov	ecx, [edi]
cmp	eax, ecx
jg	short loc_80F26D
mov	eax, ecx

loc_80F26D:
add	ebp, ebx
mov	[esi+0DCh], eax
add	edi, 54h
cmp	ebp, [esi+3Ch]
jl	short loc_80F220

loc_80F27D:
mov	eax, [esi+44h]
xor	ebp, ebp
cmp	[esi+3Ch], ebp
jle	loc_80F315
lea	edi, [eax+24h]
mov	edi, edi

loc_80F290:
mov	eax, [edi-1Ch]
mov	[edi-20h], ebp
mov	dword ptr [edi], 8
imul	eax, [esi+1Ch]
mov	edx, [esi+0D8h]
add	edx, edx
add	edx, edx
add	edx, edx
push	edx
push	eax
call	sub_8098C0
mov	edx, [edi-18h]
mov	[edi-8], eax
imul	edx, [esi+20h]
mov	ecx, [esi+0DCh]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
call	sub_8098C0
mov	ecx, [edi-1Ch]
mov	[edi-4], eax
imul	ecx, [esi+1Ch]
mov	eax, [esi+0D8h]
push	eax
push	ecx
call	sub_8098C0
mov	[edi+4], eax
mov	eax, [edi-18h]
imul	eax, [esi+20h]
mov	edx, [esi+0DCh]
push	edx
push	eax
call	sub_8098C0
mov	[edi+8], eax
mov	[edi+0Ch], bl
add	ebp, ebx
add	esp, 20h
add	edi, 54h
cmp	ebp, [esi+3Ch]
jl	loc_80F290

loc_80F315:
mov	ecx, [esi+0DCh]
mov	edx, [esi+20h]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
call	sub_8098C0
add	esp, 8
pop	edi
pop	ebp
mov	[esi+0E0h], eax
pop	ebx
retn
sub_80F160 endp

align 10h


; Attributes: bp-based frame

sub_80F340 proc	near

var_A2C= dword ptr -0A2Ch
var_A28= dword ptr -0A28h
var_A24= dword ptr -0A24h
var_A20= dword ptr -0A20h
var_A1C= dword ptr -0A1Ch
var_A18= dword ptr -0A18h
var_A14= dword ptr -0A14h
var_A10= dword ptr -0A10h
var_A0C= byte ptr -0A0Ch
var_A00= byte ptr -0A00h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 0A30h
cmp	dword ptr [esi+0A8h], 0
push	ebx
push	edi
jg	short loc_80F373
mov	eax, [esi]
mov	dword ptr [eax+14h], 13h
mov	ecx, [esi]
mov	dword ptr [ecx+18h], 0
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80F373:
mov	ebx, [esi+0ACh]
cmp	dword ptr [ebx+14h], 0
mov	[esp+0A38h+var_A24], ebx
jnz	short loc_80F3AB
cmp	dword ptr [ebx+18h], 3Fh
jnz	short loc_80F3AB
cmp	dword ptr [esi+3Ch], 0
mov	byte ptr [esi+0D4h], 0
jle	short loc_80F3CD
mov	ecx, [esi+3Ch]
push	ecx		; size_t
lea	edx, [esp+0A3Ch+var_A0C]
push	0		; int
push	edx		; void *
call	_memset
add	esp, 0Ch
jmp	short loc_80F3CD

loc_80F3AB:
cmp	dword ptr [esi+3Ch], 0
mov	byte ptr [esi+0D4h], 1
jle	short loc_80F3CD
mov	ecx, [esi+3Ch]
and	ecx, offset sub_FFFFFF
shl	ecx, 6
or	eax, 0FFFFFFFFh
lea	edi, [esp+0A38h+var_A00]
rep stosd

loc_80F3CD:
mov	eax, 1
cmp	[esi+0A8h], eax
mov	[esp+0A38h+var_A2C], eax
jl	loc_80F696

loc_80F3E2:
mov	eax, [ebx]
mov	[esp+0A38h+var_A28], eax
test	eax, eax
jle	short loc_80F3F1
cmp	eax, 4
jle	short loc_80F412

loc_80F3F1:
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 1Ah
mov	edx, [esi]
mov	[edx+18h], eax
mov	eax, [esi]
mov	dword ptr [eax+1Ch], 4
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F412:
xor	edi, edi
cmp	[esp+0A38h+var_A28], edi
jle	short loc_80F47D
lea	ebx, [ebx+0]

loc_80F420:
mov	ebx, [ebx+edi*4+4]
test	ebx, ebx
jl	short loc_80F42D
cmp	ebx, [esi+3Ch]
jl	short loc_80F449

loc_80F42D:
mov	eax, [esi]
mov	edx, [esp+0A38h+var_A2C]
mov	dword ptr [eax+14h], 13h
mov	ecx, [esi]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80F449:
test	edi, edi
jle	short loc_80F472
mov	edx, [esp+0A38h+var_A24]
cmp	ebx, [edx+edi*4]
jg	short loc_80F472
mov	eax, [esi]
mov	edx, [esp+0A38h+var_A2C]
mov	dword ptr [eax+14h], 13h
mov	ecx, [esi]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80F472:
mov	ebx, [esp+0A38h+var_A24]
inc	edi
cmp	edi, [esp+0A38h+var_A28]
jl	short loc_80F420

loc_80F47D:
cmp	byte ptr [esi+0D4h], 0
mov	edi, [ebx+14h]
mov	eax, [ebx+18h]
mov	ecx, [ebx+1Ch]
mov	edx, [ebx+20h]
mov	[esp+0A38h+var_A18], edi
mov	[esp+0A38h+var_A1C], eax
mov	[esp+0A38h+var_A14], ecx
mov	[esp+0A38h+var_A10], edx
jz	loc_80F5FA
cmp	edi, 3Fh
ja	short loc_80F4C2
cmp	eax, edi
jl	short loc_80F4C2
cmp	eax, 40h
jge	short loc_80F4C2
cmp	ecx, 0Ah
ja	short loc_80F4C2
test	edx, edx
jl	short loc_80F4C2
cmp	edx, 0Ah
jle	short loc_80F4E2

loc_80F4C2:
mov	edx, [esi]
mov	ecx, [esp+0A38h+var_A2C]
mov	dword ptr [edx+14h], 11h
mov	eax, [esi]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
mov	eax, [esp+0A3Ch+var_A1C]
add	esp, 4

loc_80F4E2:
test	edi, edi
jnz	short loc_80F505
test	eax, eax
jz	short loc_80F528
mov	ecx, [esi]
mov	eax, [esp+0A38h+var_A2C]
mov	dword ptr [ecx+14h], 11h
mov	edx, [esi]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
jmp	short loc_80F525

loc_80F505:
cmp	[esp+0A38h+var_A28], 1
jz	short loc_80F528
mov	eax, [esi]
mov	edx, [esp+0A38h+var_A2C]
mov	dword ptr [eax+14h], 11h
mov	ecx, [esi]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx

loc_80F525:
add	esp, 4

loc_80F528:
mov	eax, [esp+0A38h+var_A28]
test	eax, eax
jle	loc_80F67A
add	ebx, 4
mov	[esp+0A38h+var_A28], ebx
mov	[esp+0A38h+var_A20], eax
jmp	short loc_80F545

loc_80F541:
mov	edi, [esp+0A38h+var_A18]

loc_80F545:
mov	ebx, [ebx]
shl	ebx, 8
lea	ebx, [esp+ebx+0A38h+var_A00]
test	edi, edi
jz	short loc_80F573
cmp	dword ptr [ebx], 0
jge	short loc_80F573
mov	edx, [esi]
mov	ecx, [esp+0A38h+var_A2C]
mov	dword ptr [edx+14h], 11h
mov	eax, [esi]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80F573:
mov	ecx, [esp+0A38h+var_A18]
cmp	ecx, [esp+0A38h+var_A1C]
jg	short loc_80F5E2
lea	ecx, [ecx+0]

loc_80F580:
mov	eax, [ebx+edi*4]
test	eax, eax
jge	short loc_80F5A9
cmp	[esp+0A38h+var_A14], 0
jz	short loc_80F5D4
mov	edx, [esi]
mov	ecx, [esp+0A38h+var_A2C]
mov	dword ptr [edx+14h], 11h
mov	eax, [esi]
mov	[eax+18h], ecx
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
jmp	short loc_80F5D1

loc_80F5A9:
mov	ecx, [esp+0A38h+var_A14]
cmp	ecx, eax
jnz	short loc_80F5B8
dec	ecx
cmp	[esp+0A38h+var_A10], ecx
jz	short loc_80F5D4

loc_80F5B8:
mov	ecx, [esi]
mov	eax, [esp+0A38h+var_A2C]
mov	dword ptr [ecx+14h], 11h
mov	edx, [esi]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx

loc_80F5D1:
add	esp, 4

loc_80F5D4:
mov	eax, [esp+0A38h+var_A10]
mov	[ebx+edi*4], eax
inc	edi
cmp	edi, [esp+0A38h+var_A1C]
jle	short loc_80F580

loc_80F5E2:
mov	ebx, [esp+0A38h+var_A28]
add	ebx, 4
sub	[esp+0A38h+var_A20], 1
mov	[esp+0A38h+var_A28], ebx
jnz	loc_80F541
jmp	short loc_80F676

loc_80F5FA:
test	edi, edi
jnz	short loc_80F60B
cmp	eax, 3Fh
jnz	short loc_80F60B
test	ecx, ecx
jnz	short loc_80F60B
test	edx, edx
jz	short loc_80F627

loc_80F60B:
mov	ecx, [esi]
mov	eax, [esp+0A38h+var_A2C]
mov	dword ptr [ecx+14h], 11h
mov	edx, [esi]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F627:
cmp	[esp+0A38h+var_A28], 0
jle	short loc_80F67A
mov	eax, [esp+0A38h+var_A28]
add	ebx, 4
mov	[esp+0A38h+var_A20], eax
lea	esp, [esp+0]

loc_80F640:
mov	eax, [ebx]
cmp	[esp+eax+0A38h+var_A0C], 0
lea	edi, [esp+eax+0A38h+var_A0C]
jz	short loc_80F669
mov	ecx, [esi]
mov	eax, [esp+0A38h+var_A2C]
mov	dword ptr [ecx+14h], 13h
mov	edx, [esi]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F669:
add	ebx, 4
sub	[esp+0A38h+var_A20], 1
mov	byte ptr [edi],	1
jnz	short loc_80F640

loc_80F676:
mov	ebx, [esp+0A38h+var_A24]

loc_80F67A:
mov	eax, [esp+0A38h+var_A2C]
inc	eax
add	ebx, 24h
cmp	eax, [esi+0A8h]
mov	[esp+0A38h+var_A24], ebx
mov	[esp+0A38h+var_A2C], eax
jle	loc_80F3E2

loc_80F696:
xor	edi, edi
cmp	byte ptr [esi+0D4h], 0
jz	short loc_80F6D4
cmp	[esi+3Ch], edi
jle	short loc_80F700
lea	ebx, [esp+0A38h+var_A00]

loc_80F6AA:
cmp	dword ptr [ebx], 0
jge	short loc_80F6C2
mov	eax, [esi]
mov	dword ptr [eax+14h], 2Dh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F6C2:
inc	edi
add	ebx, 100h
cmp	edi, [esi+3Ch]
jl	short loc_80F6AA
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_80F6D4:
cmp	dword ptr [esi+3Ch], 0
jle	short loc_80F700
lea	ebx, [ebx+0]

loc_80F6E0:
cmp	[esp+edi+0A38h+var_A0C], 0
jnz	short loc_80F6FA
mov	eax, [esi]
mov	dword ptr [eax+14h], 2Dh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F6FA:
inc	edi
cmp	edi, [esi+3Ch]
jl	short loc_80F6E0

loc_80F700:
pop	edi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_80F340 endp

align 10h



sub_80F710 proc	near
mov	ecx, [esi+0ACh]
push	ebx
push	edi
xor	edi, edi
cmp	ecx, edi
jz	short loc_80F780
mov	eax, [esi+13Ch]
mov	eax, [eax+1Ch]
lea	edx, [eax+eax*8]
lea	eax, [ecx+edx*4]
mov	ecx, [eax]
mov	[esi+0E4h], ecx
xor	ecx, ecx
cmp	[eax], edi
jle	short loc_80F759
lea	edi, [esi+0E8h]
lea	edx, [eax+4]

loc_80F744:
mov	ebx, [edx]
imul	ebx, 54h
add	ebx, [esi+44h]
inc	ecx
mov	[edi], ebx
add	edx, 4
add	edi, 4
cmp	ecx, [eax]
jl	short loc_80F744

loc_80F759:
mov	edx, [eax+14h]
mov	[esi+12Ch], edx
mov	ecx, [eax+18h]
mov	[esi+130h], ecx
mov	edx, [eax+1Ch]
mov	[esi+134h], edx
mov	eax, [eax+20h]
pop	edi
mov	[esi+138h], eax
pop	ebx
retn

loc_80F780:
cmp	dword ptr [esi+3Ch], 4
jle	short loc_80F7AA
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 1Ah
mov	edx, [esi]
mov	eax, [esi+3Ch]
mov	[edx+18h], eax
mov	ecx, [esi]
mov	dword ptr [ecx+1Ch], 4
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_80F7AA:
mov	eax, [esi+3Ch]
xor	edx, edx
cmp	eax, edi
mov	[esi+0E4h], eax
jle	short loc_80F7D4
xor	ecx, ecx
lea	eax, [esi+0E8h]

loc_80F7C1:
mov	ebx, [esi+44h]
add	ebx, ecx
mov	[eax], ebx
inc	edx
add	eax, 4
add	ecx, 54h
cmp	edx, [esi+3Ch]
jl	short loc_80F7C1

loc_80F7D4:
mov	[esi+12Ch], edi
mov	[esi+134h], edi
mov	[esi+138h], edi
pop	edi
mov	dword ptr [esi+130h], 3Fh
pop	ebx
retn
sub_80F710 endp

align 10h



sub_80F800 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

mov	eax, [esi+0E4h]
sub	esp, 8
push	ebx
mov	ebx, 1
push	edi
cmp	eax, ebx
jnz	short loc_80F866
mov	ecx, [esi+0E8h]
mov	eax, [ecx+1Ch]
mov	[esi+0F8h], eax
mov	edx, [ecx+20h]
mov	[esi+0FCh], edx
mov	edi, [ecx+0Ch]
mov	eax, [ecx+20h]
xor	edx, edx
div	edi
mov	[ecx+34h], ebx
mov	[ecx+38h], ebx
mov	[ecx+3Ch], ebx
mov	dword ptr [ecx+40h], 8
mov	[ecx+44h], ebx
test	edx, edx
cmovz	edx, edi
mov	[ecx+48h], edx
mov	[esi+100h], ebx
mov	dword ptr [esi+104h], 0
jmp	loc_80F997

loc_80F866:
xor	edi, edi
cmp	eax, edi
jle	short loc_80F871
cmp	eax, 4
jle	short loc_80F898

loc_80F871:
mov	eax, [esi]
mov	dword ptr [eax+14h], 1Ah
mov	ecx, [esi]
mov	edx, [esi+0E4h]
mov	[ecx+18h], edx
mov	eax, [esi]
mov	dword ptr [eax+1Ch], 4
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_80F898:
mov	eax, [esi+0D8h]
mov	ecx, [esi+1Ch]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_8098C0
mov	edx, [esi+0DCh]
add	edx, edx
add	edx, edx
add	edx, edx
mov	[esi+0F8h], eax
mov	eax, [esi+20h]
push	edx
push	eax
call	sub_8098C0
add	esp, 10h
cmp	[esi+0E4h], edi
mov	[esi+0FCh], eax
mov	[esi+100h], edi
mov	[esp+10h+var_8], edi
jle	loc_80F997
lea	ecx, [esi+0E8h]
mov	[esp+10h+var_4], ecx
push	ebp

loc_80F8F4:
mov	edx, [esp+14h+var_4]
mov	ecx, [edx]
mov	edi, [ecx+8]
xor	edx, edx
lea	eax, ds:0[edi*8]
mov	[ecx+40h], eax
mov	eax, [ecx+1Ch]
div	edi
mov	ebp, [ecx+0Ch]
mov	eax, [ecx+20h]
mov	ebx, ebp
imul	ebx, edi
mov	[ecx+34h], edi
mov	[ecx+38h], ebp
mov	[ecx+3Ch], ebx
test	edx, edx
cmovz	edx, edi
mov	[ecx+44h], edx
xor	edx, edx
div	ebp
mov	edi, ebx
test	edx, edx
cmovz	edx, ebp
mov	[ecx+48h], edx
mov	ecx, [esi+100h]
add	ecx, edi
cmp	ecx, 0Ah
jle	short loc_80F958
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Dh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_80F958:
test	edi, edi
jle	short loc_80F97C
lea	esp, [esp+0]

loc_80F960:
mov	edx, [esi+100h]
mov	eax, [esp+14h+var_8]
dec	edi
mov	[esi+edx*4+104h], eax
inc	dword ptr [esi+100h]
test	edi, edi
jg	short loc_80F960

loc_80F97C:
mov	eax, [esp+14h+var_8]
add	[esp+14h+var_4], 4
inc	eax
cmp	eax, [esi+0E4h]
mov	[esp+14h+var_8], eax
jl	loc_80F8F4
pop	ebp

loc_80F997:
mov	ecx, [esi+0C0h]
pop	edi
pop	ebx
test	ecx, ecx
jle	short loc_80F9BE
mov	eax, [esi+0F8h]
imul	eax, ecx
cmp	eax, 0FFFFh
jl	short loc_80F9B8
mov	eax, 0FFFFh

loc_80F9B8:
mov	[esi+0BCh], eax

loc_80F9BE:
add	esp, 8
retn
sub_80F800 endp

align 10h



sub_80F9D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+13Ch]
mov	eax, [edi+10h]
sub	eax, 0
jz	loc_80FABC
sub	eax, 1
jz	short loc_80FA0A
sub	eax, 1
jz	short loc_80FA39
mov	eax, [esi]
mov	dword ptr [eax+14h], 30h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4
jmp	loc_80FB49

loc_80FA0A:
call	sub_80F710
call	sub_80F800
cmp	dword ptr [esi+12Ch], 0
jnz	short loc_80FA96
cmp	dword ptr [esi+134h], 0
jz	short loc_80FA96
cmp	byte ptr [esi+0B1h], 0
jnz	short loc_80FA96
inc	dword ptr [edi+14h]
mov	dword ptr [edi+10h], 2

loc_80FA39:
cmp	byte ptr [esi+0B2h], 0
jnz	short loc_80FA4C
call	sub_80F710
call	sub_80F800

loc_80FA4C:
mov	eax, [esi+15Ch]
mov	ecx, [eax]
push	0
push	esi
call	ecx
mov	edx, [esi+148h]
mov	eax, [edx]
push	2
push	esi
call	eax
add	esp, 10h
cmp	dword ptr [edi+1Ch], 0
jnz	short loc_80FA7E
mov	ecx, [esi+14Ch]
mov	edx, [ecx+4]
push	esi
call	edx
add	esp, 4

loc_80FA7E:
mov	eax, [esi+14Ch]
mov	ecx, [eax+8]
push	esi
call	ecx
add	esp, 4
mov	byte ptr [edi+0Ch], 0
jmp	loc_80FB49

loc_80FA96:
mov	edx, [esi+15Ch]
mov	eax, [edx]
push	1
push	esi
call	eax
mov	ecx, [esi+148h]
mov	edx, [ecx]
push	2
push	esi
call	edx
add	esp, 10h
mov	byte ptr [edi+0Ch], 0
jmp	loc_80FB49

loc_80FABC:
call	sub_80F710
call	sub_80F800
cmp	byte ptr [esi+0B0h], 0
jnz	short loc_80FAF5
mov	eax, [esi+150h]
mov	ecx, [eax]
push	esi
call	ecx
mov	edx, [esi+154h]
mov	eax, [edx]
push	esi
call	eax
mov	ecx, [esi+144h]
mov	edx, [ecx]
push	0
push	esi
call	edx
add	esp, 10h

loc_80FAF5:
mov	eax, [esi+158h]
mov	ecx, [eax]
push	esi
call	ecx
movzx	eax, byte ptr [esi+0B2h]
mov	edx, [esi+15Ch]
mov	ecx, [edx]
push	eax
push	esi
call	ecx
mov	edx, [esi+148h]
mov	ecx, [edx]
xor	eax, eax
cmp	dword ptr [edi+18h], 1
setle	al
dec	eax
and	eax, 3
push	eax
push	esi
call	ecx
mov	edx, [esi+140h]
mov	eax, [edx]
push	0
push	esi
call	eax
add	esp, 1Ch
cmp	byte ptr [esi+0B2h], 0
setz	cl
mov	[edi+0Ch], cl

loc_80FB49:
mov	edx, [edi+18h]
mov	eax, [edi+14h]
dec	edx
cmp	eax, edx
setz	cl
mov	[edi+0Dh], cl
cmp	dword ptr [esi+8], 0
jz	short loc_80FB6D
mov	edx, [esi+8]
mov	[edx+0Ch], eax
mov	eax, [esi+8]
mov	ecx, [edi+18h]
mov	[eax+10h], ecx

loc_80FB6D:
pop	edi
pop	esi
retn
sub_80F9D0 endp




sub_80FB70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+13Ch]
mov	byte ptr [eax+0Ch], 0
mov	ecx, [esi+14Ch]
mov	edx, [ecx+4]
push	esi
call	edx
mov	eax, [esi+14Ch]
mov	ecx, [eax+8]
push	esi
call	ecx
add	esp, 8
pop	esi
retn
sub_80FB70 endp

align 10h



sub_80FBA0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+15Ch]
mov	ecx, [eax+8]
mov	esi, [edi+13Ch]
push	edi
call	ecx
mov	eax, [esi+10h]
add	esp, 4
sub	eax, 0
mov	ecx, 1
jz	short loc_80FBF1
sub	eax, ecx
jz	short loc_80FBE4
sub	eax, ecx
jnz	short loc_80FC04
cmp	[edi+0B2h], al
jz	short loc_80FC01
add	[esi+1Ch], ecx
add	[esi+14h], ecx
pop	edi
mov	[esi+10h], ecx
pop	esi
retn

loc_80FBE4:
add	[esi+14h], ecx
pop	edi
mov	dword ptr [esi+10h], 2
pop	esi
retn

loc_80FBF1:
mov	dword ptr [esi+10h], 2
cmp	byte ptr [edi+0B2h], 0
jnz	short loc_80FC04

loc_80FC01:
add	[esi+1Ch], ecx

loc_80FC04:
add	[esi+14h], ecx
pop	edi
pop	esi
retn
sub_80FBA0 endp

align 10h



sub_80FC10 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	edi
push	20h
push	1
push	esi
call	ecx
mov	edi, eax
mov	[esi+13Ch], edi
xor	ebx, ebx
add	esp, 0Ch
mov	dword ptr [edi], offset	sub_80F9D0
mov	dword ptr [edi+4], offset sub_80FB70
mov	dword ptr [edi+8], offset sub_80FBA0
mov	[edi+0Dh], bl
call	sub_80F160
cmp	[esi+0ACh], ebx
jz	short loc_80FC5B
call	sub_80F340
jmp	short loc_80FC6B

loc_80FC5B:
mov	[esi+0D4h], bl
mov	dword ptr [esi+0A8h], 1

loc_80FC6B:
cmp	[esi+0D4h], bl
jz	short loc_80FC7A
mov	byte ptr [esi+0B2h], 1

loc_80FC7A:
cmp	[esp+0Ch+arg_4], bl
jz	short loc_80FC91
xor	edx, edx
cmp	[esi+0B2h], bl
setz	dl
inc	edx
mov	[edi+10h], edx
jmp	short loc_80FC94

loc_80FC91:
mov	[edi+10h], ebx

loc_80FC94:
mov	[edi+1Ch], ebx
mov	[edi+14h], ebx
cmp	[esi+0B2h], bl
jz	short loc_80FCB1
mov	eax, [esi+0A8h]
add	eax, eax
mov	[edi+18h], eax
pop	edi
pop	esi
pop	ebx
retn

loc_80FCB1:
mov	ecx, [esi+0A8h]
mov	[edi+18h], ecx
pop	edi
pop	esi
pop	ebx
retn
sub_80FC10 endp

align 10h



; int __cdecl sub_80FCC0(int, void *)
sub_80FCC0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	eax		; void *
call	ds:off_15FDCF0
pop	ecx
retn
sub_80FCC0 endp

align 10h



; int __cdecl sub_80FCD0(int, size_t)
sub_80FCD0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	eax		; size_t
call	ds:off_15FDCEC
add	esp, 4
retn
sub_80FCD0 endp

align 10h



sub_80FCE0 proc	near

arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
retn
sub_80FCE0 endp

align 10h



sub_80FCF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 31h
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
pop	ecx
retn
sub_80FCF0 endp

align 10h



sub_80FD10 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
mov	ecx, [esi+24h]
mov	eax, [esi+4]
mov	edx, [eax]
push	ebx
push	ebp
mov	ebp, [esi+118h]
add	ecx, ecx
push	edi
mov	edi, [esi+184h]
add	ecx, ecx
add	ecx, ecx
push	ecx
push	1
push	esi
mov	[esp+24h+var_4], edi
call	edx
mov	[edi+38h], eax
mov	ecx, [esi+24h]
lea	edx, [eax+ecx*4]
mov	[edi+3Ch], edx
mov	eax, [esi+0C4h]
xor	ebx, ebx
add	esp, 0Ch
cmp	[esi+24h], ebx
jle	short loc_80FDB1
add	ebp, 4
mov	[esp+18h+var_C], ebp
lea	ebp, [eax+0Ch]

loc_80FD60:
mov	eax, [ebp+18h]
imul	eax, [ebp+0]
cdq
idiv	dword ptr [esi+118h]
mov	edi, [esp+18h+var_C]
imul	edi, eax
lea	ecx, ds:0[edi*8]
push	ecx
mov	[esp+1Ch+var_8], eax
mov	eax, [esi+4]
mov	edx, [eax]
push	1
push	esi
call	edx
mov	ecx, [esp+24h+var_8]
lea	eax, [eax+ecx*4]
mov	ecx, [esp+24h+var_4]
mov	edx, [ecx+38h]
mov	[edx+ebx*4], eax
mov	ecx, [ecx+3Ch]
lea	eax, [eax+edi*4]
mov	[ecx+ebx*4], eax
inc	ebx
add	esp, 0Ch
add	ebp, 54h
cmp	ebx, [esi+24h]
jl	short loc_80FD60

loc_80FDB1:
pop	edi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_80FD10 endp

align 10h



sub_80FDC0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 20h
mov	ecx, [esp+20h+arg_0]
mov	eax, [ecx+118h]
push	ebp
xor	ebp, ebp
cmp	[ecx+24h], ebp
push	esi
mov	esi, [ecx+184h]
mov	[esp+28h+var_10], eax
mov	eax, [ecx+0C4h]
mov	[esp+28h+var_8], esi
mov	[esp+28h+var_20], ebp
jle	loc_80FEFA
lea	edx, [eax+0Ch]
push	ebx
lea	eax, [esi+8]
push	edi
mov	[esp+30h+var_18], edx
mov	[esp+30h+var_1C], eax
jmp	short loc_80FE0C

loc_80FE04:
mov	edx, [esp+30h+var_18]
mov	esi, [esp+30h+var_8]

loc_80FE0C:
mov	eax, [edx+18h]
imul	eax, [edx]
cdq
idiv	dword ptr [ecx+118h]
mov	edx, [esi+38h]
mov	edi, [edx+ebp*4]
mov	edx, [esi+3Ch]
mov	esi, [esp+30h+var_1C]
mov	ebx, [esi]
mov	esi, [esp+30h+var_10]
mov	edx, [edx+ebp*4]
add	esi, 2
mov	[esp+30h+var_C], edi
imul	esi, eax
test	esi, esi
jle	short loc_80FE72
mov	ebp, ebx
sub	ebp, edx
sub	edi, edx
mov	ecx, edx
mov	[esp+30h+var_4], edi
mov	[esp+30h+var_14], esi
lea	ecx, [ecx+0]

loc_80FE50:
mov	edi, [ecx+ebp]
mov	esi, [esp+30h+var_4]
mov	[ecx], edi
mov	[esi+ecx], edi
add	ecx, 4
sub	[esp+30h+var_14], 1
jnz	short loc_80FE50
mov	edi, [esp+30h+var_C]
mov	ebp, [esp+30h+var_20]
mov	ecx, [esp+30h+arg_0]

loc_80FE72:
lea	esi, [eax+eax]
test	esi, esi
jle	short loc_80FEB8
mov	ecx, [esp+30h+var_10]
mov	esi, eax
imul	esi, ecx
add	ecx, 0FFFFFFFEh
imul	ecx, eax
mov	edi, ebx
lea	esi, [edx+esi*4]
sub	edi, edx
lea	ecx, [ebx+ecx*4]
sub	edx, ebx
lea	ebx, [eax+eax]

loc_80FE97:
mov	ebp, [esi+edi]
mov	[edx+ecx], ebp
mov	ebp, [ecx]
mov	[esi], ebp
add	ecx, 4
add	esi, 4
sub	ebx, 1
jnz	short loc_80FE97
mov	edi, [esp+30h+var_C]
mov	ebp, [esp+30h+var_20]
mov	ecx, [esp+30h+arg_0]

loc_80FEB8:
test	eax, eax
jle	short loc_80FEE0
lea	ecx, ds:0[eax*4]
mov	edx, ecx
mov	ecx, edi
sub	ecx, edx
lea	esp, [esp+0]

loc_80FED0:
mov	edx, [edi]
mov	[ecx], edx
add	ecx, 4
sub	eax, 1
jnz	short loc_80FED0
mov	ecx, [esp+30h+arg_0]

loc_80FEE0:
add	[esp+30h+var_1C], 4
add	[esp+30h+var_18], 54h
inc	ebp
cmp	ebp, [ecx+24h]
mov	[esp+30h+var_20], ebp
jl	loc_80FE04
pop	edi
pop	ebx

loc_80FEFA:
pop	esi
pop	ebp
add	esp, 20h
retn
sub_80FDC0 endp




sub_80FF00 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
mov	eax, [ebx+118h]
push	ebp
mov	ebp, [ebx+0C4h]
push	esi
xor	esi, esi
cmp	[ebx+24h], esi
push	edi
mov	edi, [ebx+184h]
mov	[esp+20h+var_8], edi
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_10], esi
jle	loc_80FFCB
add	ebp, 0Ch
mov	[esp+20h+var_C], ebp
jmp	short loc_80FF44
align 10h

loc_80FF40:
mov	edi, [esp+20h+var_8]

loc_80FF44:
mov	eax, [ebp+18h]
imul	eax, [ebp+0]
cdq
idiv	dword ptr [ebx+118h]
mov	ecx, [edi+38h]
mov	edx, [edi+3Ch]
mov	ecx, [ecx+esi*4]
mov	edi, [edx+esi*4]
test	eax, eax
jle	short loc_80FFB6
mov	esi, [esp+20h+var_4]
lea	edx, [esi+2]
imul	edx, eax
inc	esi
imul	esi, eax
lea	ebx, [edi+edx*4]
lea	edx, ds:0[eax*4]
mov	ebp, edx
mov	edx, edi
sub	edx, ebp
lea	esi, [edi+esi*4]
sub	ecx, edi

loc_80FF85:
mov	ebp, [ecx+esi]
mov	[ecx+edx], ebp
mov	ebp, [esi]
mov	[edx], ebp
mov	ebp, [ecx+edi]
mov	[ecx+ebx], ebp
mov	ebp, [edi]
mov	[ebx], ebp
add	esi, 4
add	edx, 4
add	edi, 4
add	ebx, 4
sub	eax, 1
jnz	short loc_80FF85
mov	esi, [esp+20h+var_10]
mov	ebx, [esp+20h+arg_0]
mov	ebp, [esp+20h+var_C]

loc_80FFB6:
inc	esi
add	ebp, 54h
cmp	esi, [ebx+24h]
mov	[esp+20h+var_10], esi
mov	[esp+20h+var_C], ebp
jl	loc_80FF40

loc_80FFCB:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_80FF00 endp

align 10h



sub_80FFE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
mov	eax, [esi+184h]
mov	ebx, [esi+0C4h]
xor	ebp, ebp
cmp	[esi+24h], ebp
mov	[esp+10h+var_4], eax
jle	short loc_810071
push	edi
add	ebx, 0Ch
jmp	short loc_810007

loc_810005:
mov	esi, ecx

loc_810007:
mov	ecx, [ebx+18h]
imul	ecx, [ebx]
mov	eax, ecx
cdq
idiv	dword ptr [esi+118h]
xor	edx, edx
mov	edi, eax
mov	eax, [ebx+20h]
div	ecx
mov	esi, edx
test	esi, esi
cmovz	esi, ecx
test	ebp, ebp
jnz	short loc_81003C
lea	eax, [esi-1]
cdq
idiv	edi
mov	ecx, eax
mov	eax, [esp+14h+var_4]
inc	ecx
mov	[eax+48h], ecx
jmp	short loc_810040

loc_81003C:
mov	eax, [esp+14h+var_4]

loc_810040:
mov	edx, [eax+40h]
mov	eax, [eax+edx*4+38h]
mov	eax, [eax+ebp*4]
lea	edx, [edi+edi]
test	edx, edx
jle	short loc_810063
lea	ecx, [eax+esi*4]
mov	eax, ecx

loc_810056:
mov	esi, [ecx-4]
mov	[eax], esi
add	eax, 4
sub	edx, 1
jnz	short loc_810056

loc_810063:
mov	ecx, [esp+14h+arg_0]
inc	ebp
add	ebx, 54h
cmp	ebp, [ecx+24h]
jl	short loc_810005
pop	edi

loc_810071:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_80FFE0 endp

align 10h



sub_810080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+184h]
cmp	byte ptr [esi+30h], 0
jnz	short loc_8100AD
mov	eax, [edi+188h]
mov	edx, [eax+0Ch]
lea	ecx, [esi+8]
push	ecx
push	edi
call	edx
add	esp, 8
test	eax, eax
jz	short loc_8100EC
mov	byte ptr [esi+30h], 1

loc_8100AD:
mov	ecx, [esp+8+arg_C]
mov	edx, [esp+8+arg_8]
mov	eax, [edi+18Ch]
mov	eax, [eax+4]
push	ebx
push	ebp
mov	ebp, [edi+118h]
push	ecx
mov	ecx, [esp+14h+arg_4]
push	edx
push	ecx
push	ebp
lea	ebx, [esi+34h]
push	ebx
lea	edx, [esi+8]
push	edx
push	edi
call	eax
add	esp, 1Ch
cmp	[ebx], ebp
jb	short loc_8100EA
mov	byte ptr [esi+30h], 0
mov	dword ptr [ebx], 0

loc_8100EA:
pop	ebp
pop	ebx

loc_8100EC:
pop	edi
pop	esi
retn
sub_810080 endp

align 10h



sub_8100F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+184h]
cmp	byte ptr [esi+30h], 0
jnz	short loc_810128
mov	ecx, [esi+40h]
mov	edx, [esi+ecx*4+38h]
mov	eax, [edi+188h]
mov	eax, [eax+0Ch]
push	edx
push	edi
call	eax
add	esp, 8
test	eax, eax
jz	loc_810225
inc	dword ptr [esi+4Ch]
mov	byte ptr [esi+30h], 1

loc_810128:
mov	eax, [esi+44h]
sub	eax, 0
push	ebx
mov	ebx, [esp+0Ch+arg_C]
push	ebp
jz	short loc_81018D
sub	eax, 1
jz	short loc_8101B9
sub	eax, 1
jnz	loc_810223
mov	edx, [esp+10h+arg_8]
mov	eax, [esp+10h+arg_4]
mov	ecx, [edi+18Ch]
push	ebx
push	edx
mov	edx, [esi+48h]
push	eax
mov	eax, [esi+40h]
push	edx
mov	edx, [esi+eax*4+38h]
mov	eax, [ecx+4]
lea	ebp, [esi+34h]
push	ebp
push	edx
push	edi
call	eax
mov	ecx, [ebp+0]
add	esp, 1Ch
cmp	ecx, [esi+48h]
jb	loc_810223
mov	edx, [esp+10h+arg_8]
mov	dword ptr [esi+44h], 0
cmp	[edx], ebx
jnb	loc_810223

loc_81018D:
mov	ecx, [esi+4Ch]
mov	dword ptr [esi+34h], 0
mov	eax, [edi+118h]
dec	eax
mov	[esi+48h], eax
cmp	ecx, [edi+11Ch]
jnz	short loc_8101B2
push	edi
call	sub_80FFE0
add	esp, 4

loc_8101B2:
mov	dword ptr [esi+44h], 1

loc_8101B9:
mov	eax, [esp+10h+arg_8]
mov	ecx, [esp+10h+arg_4]
mov	edx, [edi+18Ch]
push	ebx
push	eax
mov	eax, [esi+48h]
push	ecx
mov	ecx, [esi+40h]
push	eax
mov	eax, [esi+ecx*4+38h]
mov	ecx, [edx+4]
lea	ebp, [esi+34h]
push	ebp
push	eax
push	edi
call	ecx
mov	edx, [ebp+0]
add	esp, 1Ch
cmp	edx, [esi+48h]
jb	short loc_810223
mov	ebx, 1
cmp	[esi+4Ch], ebx
jnz	short loc_8101FE
push	edi
call	sub_80FF00
add	esp, 4

loc_8101FE:
xor	[esi+40h], ebx
mov	byte ptr [esi+30h], 0
mov	eax, [edi+118h]
add	eax, ebx
mov	[ebp+0], eax
mov	ecx, [edi+118h]
add	ecx, 2
mov	[esi+48h], ecx
mov	dword ptr [esi+44h], 2

loc_810223:
pop	ebp
pop	ebx

loc_810225:
pop	edi
pop	esi
retn
sub_8100F0 endp

align 10h



sub_810230 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_C]
mov	eax, [esp+arg_0]
mov	ecx, [eax+18Ch]
push	edx
mov	edx, [esp+4+arg_8]
push	edx
mov	edx, [esp+8+arg_4]
push	edx
push	0
push	0
push	0
push	eax
mov	eax, [ecx+4]
call	eax
add	esp, 1Ch
retn
sub_810230 endp

align 10h



sub_810260 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
mov	eax, [esp+arg_0]
push	ebx
xor	ebx, ebx
sub	ecx, ebx
push	esi
mov	esi, [eax+184h]
jz	short loc_81029B
sub	ecx, 2
jz	short loc_810291
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4
pop	esi
pop	ebx
retn

loc_810291:
mov	dword ptr [esi+4], offset sub_810230
pop	esi
pop	ebx
retn

loc_81029B:
mov	ecx, [eax+1A0h]
cmp	[ecx+8], bl
jz	short loc_8102C8
push	eax
mov	dword ptr [esi+4], offset sub_8100F0
call	sub_80FDC0
add	esp, 4
mov	[esi+40h], ebx
mov	[esi+44h], ebx
mov	[esi+4Ch], ebx
mov	[esi+30h], bl
mov	[esi+34h], ebx
pop	esi
pop	ebx
retn

loc_8102C8:
mov	[esi+30h], bl
mov	[esi+34h], ebx
mov	dword ptr [esi+4], offset sub_810080
pop	esi
pop	ebx
retn
sub_810260 endp

align 10h



sub_8102E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	50h
push	1
push	esi
call	ecx
mov	ebx, eax
add	esp, 0Ch
cmp	byte ptr [esp+0Ch+arg_4], 0
mov	[esi+184h], ebx
mov	dword ptr [ebx], offset	sub_810260
jz	short loc_81031E
mov	edx, [esi]
mov	dword ptr [edx+14h], 4
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_81031E:
mov	edx, [esi+1A0h]
cmp	byte ptr [edx+8], 0
jz	short loc_810356
cmp	dword ptr [esi+118h], 2
jge	short loc_810346
mov	eax, [esi]
mov	dword ptr [eax+14h], 2Fh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_810346:
call	sub_80FD10
mov	eax, [esi+118h]
add	eax, 2
jmp	short loc_81035C

loc_810356:
mov	eax, [esi+118h]

loc_81035C:
xor	ebp, ebp
cmp	[esi+24h], ebp
mov	[esp+0Ch+arg_4], eax
mov	eax, [esi+0C4h]
jle	short loc_8103AD
push	edi
lea	edi, [eax+24h]
add	ebx, 8

loc_810374:
mov	ecx, [edi]
mov	eax, [edi-18h]
imul	eax, ecx
cdq
idiv	dword ptr [esi+118h]
mov	edx, [esi+4]
imul	eax, [esp+10h+arg_4]
push	eax
mov	eax, [edi-8]
imul	eax, ecx
mov	ecx, [edx+8]
push	eax
push	1
push	esi
call	ecx
mov	[ebx], eax
inc	ebp
add	esp, 10h
add	ebx, 4
add	edi, 54h
cmp	ebp, [esi+24h]
jl	short loc_810374
pop	edi

loc_8103AD:
pop	esi
pop	ebp
pop	ebx
retn
sub_8102E0 endp

align 10h



sub_8103C0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_0]
mov	eax, [ebx+19Ch]
mov	ecx, [ebx+0C4h]
push	ebp
xor	ebp, ebp
cmp	[ebx+24h], ebp
mov	[esp+1Ch+var_10], ebp
mov	[esp+1Ch+var_14], ebp
mov	[esp+1Ch+var_8], ebp
jle	loc_8106B0
push	esi
lea	esi, [eax+2Ch]
push	edi
lea	edi, [ecx+24h]
mov	[esp+24h+var_C], esi

loc_8103F8:
mov	eax, [edi]
dec	eax
cmp	eax, 7		; switch 8 cases
ja	loc_81049B	; default
			; jumptable 00810404 cases 2,4-6
jmp	ds:off_8106B8[eax*4] ; switch jump

loc_81040B:		; jumptable 00810404 case 0
xor	ebp, ebp
mov	[esp+24h+var_14], offset sub_817FA0
mov	[esp+24h+var_10], ebp
jmp	loc_8104B5

loc_81041E:		; jumptable 00810404 case 1
xor	ebp, ebp
mov	[esp+24h+var_14], offset sub_817B30
mov	[esp+24h+var_10], ebp
jmp	loc_8104B5

loc_810431:		; jumptable 00810404 case 3
xor	ebp, ebp
mov	[esp+24h+var_14], offset sub_817820
mov	[esp+24h+var_10], ebp
jmp	short loc_8104B5

loc_810441:		; jumptable 00810404 case 7
mov	eax, [ebx+44h]
sub	eax, 0
jz	short loc_81048B
sub	eax, 1
jz	short loc_810478
sub	eax, 1
jz	short loc_810465
mov	eax, [ebx]
mov	dword ptr [eax+14h], 30h
mov	ecx, [ebx]
mov	edx, [ecx]
push	ebx
call	edx
jmp	short loc_8104B2

loc_810465:
mov	ebp, 2
mov	[esp+24h+var_14], offset sub_8172A0
mov	[esp+24h+var_10], ebp
jmp	short loc_8104B5

loc_810478:
mov	ebp, 1
mov	[esp+24h+var_14], offset sub_816EC0
mov	[esp+24h+var_10], ebp
jmp	short loc_8104B5

loc_81048B:
xor	ebp, ebp
mov	[esp+24h+var_14], offset sub_8169B0
mov	[esp+24h+var_10], ebp
jmp	short loc_8104B5

loc_81049B:		; default
mov	eax, [ebx]	; jumptable 00810404 cases 2,4-6
mov	dword ptr [eax+14h], 7
mov	ecx, [ebx]
mov	edx, [edi]
mov	[ecx+18h], edx
mov	eax, [ebx]
mov	ecx, [eax]
push	ebx
call	ecx

loc_8104B2:
add	esp, 4

loc_8104B5:
mov	edx, [esp+24h+var_14]
mov	[esi-28h], edx
cmp	byte ptr [edi+0Ch], 0
jz	loc_81068E
cmp	[esi], ebp
jz	loc_81068E
mov	esi, [edi+28h]
test	esi, esi
jz	loc_81068E
mov	eax, [esp+24h+var_C]
mov	[eax], ebp
mov	eax, ebp
sub	eax, 0
jz	loc_81067C
sub	eax, 1
jz	loc_8105ED
sub	eax, 1
jz	short loc_810510
mov	ecx, [ebx]
mov	dword ptr [ecx+14h], 30h
mov	edx, [ebx]
mov	eax, [edx]
push	ebx
call	eax
add	esp, 4
jmp	loc_81068E

loc_810510:
mov	ecx, [edi+2Ch]
lea	edx, [ecx+8]
mov	eax, offset unk_1466090
lea	ecx, [esi+4]
mov	edi, edi

loc_810520:
movzx	esi, word ptr [ecx-4]
mov	[esp+24h+var_4], esi
add	eax, 8
add	ecx, 10h
fild	[esp+24h+var_4]
add	edx, 20h
cmp	eax, offset unk_14660D0
fmul	qword ptr [eax-8]
fstp	dword ptr [edx-28h]
movzx	esi, word ptr [ecx-12h]
mov	[esp+24h+var_4], esi
fild	[esp+24h+var_4]
fmul	qword ptr [eax-8]
fmul	ds:dbl_1466098
fstp	dword ptr [edx-24h]
movzx	esi, word ptr [ecx-10h]
mov	[esp+24h+var_4], esi
fild	[esp+24h+var_4]
fmul	qword ptr [eax-8]
fmul	ds:dbl_14660A0
fstp	dword ptr [edx-20h]
movzx	esi, word ptr [ecx-0Eh]
mov	[esp+24h+var_4], esi
fild	[esp+24h+var_4]
fmul	qword ptr [eax-8]
fmul	ds:dbl_14660A8
fstp	dword ptr [edx-1Ch]
movzx	esi, word ptr [ecx-0Ch]
mov	[esp+24h+var_4], esi
fild	[esp+24h+var_4]
fmul	qword ptr [eax-8]
fstp	dword ptr [edx-18h]
movzx	esi, word ptr [ecx-0Ah]
mov	[esp+24h+var_4], esi
fild	[esp+24h+var_4]
fmul	qword ptr [eax-8]
fmul	ds:dbl_14660B8
fstp	dword ptr [edx-14h]
movzx	esi, word ptr [ecx-8]
mov	[esp+24h+var_4], esi
fild	[esp+24h+var_4]
fmul	qword ptr [eax-8]
fmul	ds:dbl_14660C0
fstp	dword ptr [edx-10h]
movzx	esi, word ptr [ecx-6]
mov	[esp+24h+var_4], esi
fild	[esp+24h+var_4]
fmul	qword ptr [eax-8]
fmul	ds:dbl_14660C8
fstp	dword ptr [edx-0Ch]
jl	loc_810520
jmp	loc_81068E

loc_8105ED:
mov	eax, [edi+2Ch]
lea	ecx, [eax+8]
lea	eax, [esi+4]
mov	edx, offset aXqsbk ; "ÅXŸSBK"
neg	esi
lea	ecx, [ecx+0]

loc_810600:
movzx	ebp, word ptr [eax-4]
movsx	ebx, word ptr [edx-2]
imul	ebx, ebp
add	ebx, 800h
sar	ebx, 0Ch
mov	[ecx-8], ebx
movsx	ebp, word ptr [edx]
movzx	ebx, word ptr [eax-2]
imul	ebx, ebp
add	ebx, 800h
sar	ebx, 0Ch
mov	[ecx-4], ebx
movzx	ebp, word ptr [eax]
movsx	ebx, ds:word_1466010[esi+eax]
imul	ebx, ebp
add	ebx, 800h
sar	ebx, 0Ch
mov	[ecx], ebx
movsx	ebx, word ptr ds:aXqsbk[esi+eax] ; "ÅXŸSBK"
movzx	ebp, word ptr [eax+2]
imul	ebx, ebp
add	ebx, 800h
sar	ebx, 0Ch
mov	[ecx+4], ebx
add	edx, 8
add	ecx, 10h
add	eax, 8
cmp	edx, offset unk_1466092
jl	short loc_810600
mov	ebp, [esp+24h+var_10]
mov	ebx, [esp+24h+arg_0]
jmp	short loc_81068E

loc_81067C:
mov	ecx, [edi+2Ch]
xor	eax, eax

loc_810681:
movzx	edx, word ptr [esi+eax*2]
mov	[ecx+eax*4], edx
inc	eax
cmp	eax, 40h
jl	short loc_810681

loc_81068E:
mov	eax, [esp+24h+var_8]
mov	esi, [esp+24h+var_C]
inc	eax
add	esi, 4
add	edi, 54h
cmp	eax, [ebx+24h]
mov	[esp+24h+var_8], eax
mov	[esp+24h+var_C], esi
jl	loc_8103F8
pop	edi
pop	esi

loc_8106B0:
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_8103C0 endp

align 4
off_8106B8 dd offset loc_81040B	; jump table for switch	statement
dd offset loc_81041E
dd offset loc_81049B
dd offset loc_810431
dd offset loc_81049B
dd offset loc_81049B
dd offset loc_81049B
dd offset loc_810441
align 10h



sub_8106E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	edi
push	54h
push	1
push	esi
call	ecx
mov	[esi+19Ch], eax
mov	dword ptr [eax], offset	sub_8103C0
mov	ecx, [esi+0C4h]
xor	edi, edi
add	esp, 0Ch
cmp	[esi+24h], edi
jle	short loc_81074C
push	ebx
push	ebp
lea	ebp, [ecx+50h]
lea	ebx, [eax+2Ch]

loc_810716:
mov	edx, [esi+4]
mov	eax, [edx]
push	100h
push	1
push	esi
call	eax
push	100h		; size_t
push	0		; int
push	eax		; void *
mov	[ebp+0], eax
call	_memset
mov	dword ptr [ebx], 0FFFFFFFFh
inc	edi
add	esp, 18h
add	ebx, 4
add	ebp, 54h
cmp	edi, [esi+24h]
jl	short loc_810716
pop	ebp
pop	ebx

loc_81074C:
pop	edi
pop	esi
retn
sub_8106E0 endp

align 10h



sub_810750 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_18]
push	ebx
mov	ebx, [esp+4+arg_14]
sub	eax, [ebx]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+18Ch]
mov	ecx, [edi+10h]
cmp	eax, ecx
cmova	eax, ecx
mov	ecx, [esi+1A0h]
push	eax
mov	[esp+10h+arg_0], 0
mov	eax, [edi+0Ch]
lea	edx, [esp+10h+arg_0]
push	edx
mov	edx, [esp+14h+arg_C]
push	eax
mov	eax, [esp+18h+arg_8]
push	edx
mov	edx, [esp+1Ch+arg_4]
push	eax
mov	eax, [ecx+4]
push	edx
push	esi
call	eax
mov	edx, [esp+28h+arg_0]
mov	eax, [ebx]
mov	ecx, [esi+1A8h]
push	edx
mov	edx, [esp+2Ch+arg_10]
lea	eax, [edx+eax*4]
mov	edx, [edi+0Ch]
push	eax
mov	eax, [ecx+4]
push	edx
push	esi
call	eax
mov	ecx, [esp+38h+arg_0]
add	[ebx], ecx
add	esp, 2Ch
pop	edi
pop	esi
pop	ebx
retn
sub_810750 endp

align 10h



sub_8107D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_14=	dword ptr  18h

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+18Ch]
cmp	dword ptr [esi+18h], 0
lea	ebx, [esi+18h]
jnz	short loc_810803
mov	ecx, [esi+10h]
mov	edx, [esi+14h]
mov	eax, [edi+4]
push	1
push	ecx
mov	ecx, [esi+8]
push	edx
mov	edx, [eax+1Ch]
push	ecx
push	edi
call	edx
add	esp, 14h
mov	[esi+0Ch], eax

loc_810803:
mov	ecx, [esi+10h]
mov	edx, [esi+0Ch]
mov	eax, [edi+1A0h]
push	ebp
mov	ebp, [ebx]
push	ecx
mov	ecx, [esp+14h+arg_C]
push	ebx
push	edx
mov	edx, [esp+1Ch+arg_8]
push	ecx
mov	ecx, [esp+20h+arg_4]
push	edx
mov	edx, [eax+4]
push	ecx
push	edi
call	edx
mov	eax, [ebx]
add	esp, 1Ch
cmp	eax, ebp
jbe	short loc_81085C
mov	edx, [esi+0Ch]
mov	ecx, [edi+1A8h]
mov	ecx, [ecx+4]
sub	eax, ebp
push	eax
mov	[esp+14h+arg_0], eax
push	0
lea	eax, [edx+ebp*4]
push	eax
push	edi
call	ecx
mov	eax, [esp+20h+arg_14]
mov	edx, [esp+20h+arg_0]
add	esp, 10h
add	[eax], edx

loc_81085C:
mov	eax, [esi+10h]
pop	ebp
cmp	[ebx], eax
jb	short loc_81086D
add	[esi+14h], eax
mov	dword ptr [ebx], 0

loc_81086D:
pop	edi
pop	esi
pop	ebx
retn
sub_8107D0 endp

align 10h



sub_810880 proc	near

arg_0= dword ptr  4
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, [ebx+18Ch]
cmp	dword ptr [esi+18h], 0
push	edi
jnz	short loc_8108B1
mov	ecx, [esi+10h]
mov	edx, [esi+14h]
mov	eax, [ebx+4]
push	0
push	ecx
mov	ecx, [esi+8]
push	edx
mov	edx, [eax+1Ch]
push	ecx
push	ebx
call	edx
add	esp, 14h
mov	[esi+0Ch], eax

loc_8108B1:
mov	edi, [esi+10h]
sub	edi, [esi+18h]
mov	ebp, [esp+10h+arg_14]
mov	ecx, [ebp+0]
mov	eax, [esp+10h+arg_18]
mov	edx, [esp+10h+arg_10]
sub	eax, ecx
cmp	edi, eax
cmova	edi, eax
mov	eax, [ebx+60h]
sub	eax, [esi+14h]
lea	ecx, [edx+ecx*4]
mov	edx, [esi+18h]
cmp	edi, eax
cmova	edi, eax
mov	eax, [ebx+1A8h]
mov	eax, [eax+4]
push	edi
push	ecx
mov	ecx, [esi+0Ch]
lea	edx, [ecx+edx*4]
push	edx
push	ebx
call	eax
add	[ebp+0], edi
add	[esi+18h], edi
mov	ecx, [esi+18h]
mov	eax, [esi+10h]
add	esp, 10h
cmp	ecx, eax
jb	short loc_810910
add	[esi+14h], eax
mov	dword ptr [esi+18h], 0

loc_810910:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_810880 endp

align 10h



sub_810920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
sub	ecx, 0
mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+18Ch]
jz	loc_8109C5
sub	ecx, 2
jz	short loc_810995
sub	ecx, 1
jz	short loc_810965
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+14h], 0
pop	esi
retn

loc_810965:
cmp	dword ptr [esi+8], 0
jnz	short loc_81097E
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_81097E:
mov	dword ptr [esi+4], offset sub_8107D0
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+14h], 0
pop	esi
retn

loc_810995:
cmp	dword ptr [esi+8], 0
jnz	short loc_8109AE
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_8109AE:
mov	dword ptr [esi+4], offset sub_810880
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+14h], 0
pop	esi
retn

loc_8109C5:
cmp	byte ptr [eax+4Ah], 0
jz	short loc_810A03
cmp	dword ptr [esi+0Ch], 0
mov	dword ptr [esi+4], offset sub_810750
jnz	short loc_810A0F
mov	edx, [esi+10h]
mov	ecx, [eax+4]
push	1
push	edx
mov	edx, [esi+8]
push	0
push	edx
push	eax
mov	eax, [ecx+1Ch]
call	eax
add	esp, 14h
mov	[esi+0Ch], eax
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+14h], 0
pop	esi
retn

loc_810A03:
mov	ecx, [eax+1A0h]
mov	edx, [ecx+4]
mov	[esi+4], edx

loc_810A0F:
mov	dword ptr [esi+18h], 0
mov	dword ptr [esi+14h], 0
pop	esi
retn
sub_810920 endp

align 10h



sub_810A20 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	edi
push	1Ch
push	1
push	esi
call	ecx
mov	edi, eax
mov	[esi+18Ch], edi
add	esp, 0Ch
mov	dword ptr [edi], offset	sub_810920
mov	dword ptr [edi+8], 0
mov	dword ptr [edi+0Ch], 0
cmp	byte ptr [esi+4Ah], 0
jz	short loc_810AB0
cmp	[esp+8+arg_4], 0
mov	eax, [esi+114h]
mov	[edi+10h], eax
jz	short loc_810A96
mov	edx, [esi+60h]
push	ebp
mov	ebp, [esi+4]
push	eax
push	eax
push	edx
call	sub_8098D0
mov	ecx, [ebp+10h]
add	esp, 8
push	eax
mov	eax, [esi+64h]
imul	eax, [esi+5Ch]
push	eax
push	0
push	1
push	esi
call	ecx
add	esp, 18h
pop	ebp
mov	[edi+8], eax
pop	edi
pop	esi
retn

loc_810A96:
mov	edx, [esi+4]
mov	ecx, [edx+8]
push	eax
mov	eax, [esi+64h]
imul	eax, [esi+5Ch]
push	eax
push	1
push	esi
call	ecx
add	esp, 10h
mov	[edi+0Ch], eax

loc_810AB0:
pop	edi
pop	esi
retn
sub_810A20 endp

align 10h



sub_810AC0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+1A0h]
mov	edx, [eax+114h]
mov	[ecx+5Ch], edx
mov	eax, [eax+60h]
mov	[ecx+60h], eax
retn
sub_810AC0 endp

align 10h



sub_810AE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	ebp, [edi+1A0h]
mov	eax, [ebp+5Ch]
cmp	eax, [edi+114h]
jl	short loc_810B49
mov	ecx, [edi+0C4h]
xor	ebx, ebx
cmp	[edi+24h], ebx
mov	[esp+10h+arg_0], ecx
jle	short loc_810B42
lea	esi, [ebp+0Ch]
lea	ecx, [ecx+0]

loc_810B10:
mov	edx, [esi+58h]
mov	eax, [esp+10h+arg_8]
imul	edx, [eax]
mov	ecx, [esp+10h+arg_4]
mov	eax, [ecx+ebx*4]
lea	ecx, [eax+edx*4]
mov	edx, [esp+10h+arg_0]
mov	eax, [esi+28h]
push	esi
push	ecx
push	edx
push	edi
call	eax
add	[esp+20h+arg_0], 54h
inc	ebx
add	esp, 10h
add	esi, 4
cmp	ebx, [edi+24h]
jl	short loc_810B10

loc_810B42:
mov	dword ptr [ebp+5Ch], 0

loc_810B49:
mov	esi, [edi+114h]
sub	esi, [ebp+5Ch]
mov	eax, [ebp+60h]
mov	ebx, [esp+10h+arg_14]
mov	ecx, [esp+10h+arg_18]
mov	edx, [esp+10h+arg_10]
cmp	esi, eax
cmova	esi, eax
mov	eax, [ebx]
sub	ecx, eax
cmp	esi, ecx
cmova	esi, ecx
mov	ecx, [edi+1A4h]
mov	ecx, [ecx+4]
push	esi
lea	eax, [edx+eax*4]
mov	edx, [ebp+5Ch]
push	eax
push	edx
lea	eax, [ebp+0Ch]
push	eax
push	edi
call	ecx
add	[ebx], esi
sub	[ebp+60h], esi
add	[ebp+5Ch], esi
mov	ebp, [ebp+5Ch]
add	esp, 14h
cmp	ebp, [edi+114h]
pop	edi
pop	esi
pop	ebp
pop	ebx
jl	short locret_810BA8
mov	eax, [esp+arg_8]
inc	dword ptr [eax]

locret_810BA8:
retn
sub_810AE0 endp

align 10h



sub_810BB0 proc	near

arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
mov	[eax], ecx
retn
sub_810BB0 endp

align 10h



sub_810BC0 proc	near

arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	dword ptr [eax], 0
retn
sub_810BC0 endp

align 10h



sub_810BD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
mov	edx, [esp+0Ch+arg_C]
mov	edx, [edx]
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [ecx+1A0h]
mov	[esp+0Ch+var_C], edx
mov	edx, [esp+0Ch+arg_4]
mov	edx, [edx+4]
add	edx, eax
movzx	eax, byte ptr [edx+8Ch]
movzx	edx, byte ptr [edx+96h]
push	ebx
xor	ebx, ebx
cmp	[ecx+114h], ebx
mov	[esp+10h+arg_C], eax
mov	[esp+10h+var_8], edx
jle	loc_810CA1
push	ebp
push	esi
mov	esi, [esp+18h+arg_8]
push	edi
mov	[esp+1Ch+arg_4], esi
nop

loc_810C20:
mov	esi, [esp+1Ch+arg_4]
mov	ebp, [esi]
mov	esi, [esp+1Ch+var_C]
mov	esi, [esi+ebx*4]
mov	edi, [ecx+5Ch]
add	edi, esi
cmp	esi, edi
jnb	short loc_810C65

loc_810C36:
mov	dl, [ebp+0]
inc	ebp
mov	byte ptr [esp+1Ch+var_4], dl
test	eax, eax
jle	short loc_810C5D
push	eax		; size_t
mov	eax, [esp+20h+var_4]
push	eax		; int
push	esi		; void *
call	_memset
mov	ecx, [esp+28h+arg_0]
mov	eax, [esp+28h+arg_C]
add	esp, 0Ch
add	esi, [esp+1Ch+arg_C]

loc_810C5D:
cmp	esi, edi
jb	short loc_810C36
mov	edx, [esp+1Ch+var_8]

loc_810C65:
cmp	edx, 1
jle	short loc_810C8B
mov	ecx, [ecx+5Ch]
mov	eax, [esp+1Ch+var_C]
push	ecx
dec	edx
push	edx
lea	edx, [ebx+1]
push	edx
push	eax
push	ebx
push	eax
call	sub_8098F0
mov	ecx, [esp+34h+arg_0]
mov	eax, [esp+34h+arg_C]
add	esp, 18h

loc_810C8B:
mov	edx, [esp+1Ch+var_8]
add	[esp+1Ch+arg_4], 4
add	ebx, edx
cmp	ebx, [ecx+114h]
jl	short loc_810C20
pop	edi
pop	esi
pop	ebp

loc_810CA1:
pop	ebx
add	esp, 0Ch
retn
sub_810BD0 endp

align 10h



sub_810CB0 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
xor	ebp, ebp
cmp	[ebx+114h], ebp
push	edi
mov	edi, [eax]
jle	short loc_810CFE
mov	edx, [esp+0Ch+arg_8]
sub	edx, edi
mov	[esp+0Ch+arg_C], edx
push	esi

loc_810CD2:
mov	eax, [edi]
mov	ecx, [ebx+5Ch]
mov	esi, [edx+edi]
add	ecx, eax
cmp	eax, ecx
jnb	short loc_810CF1

loc_810CE0:
mov	dl, [esi]
mov	[eax], dl
inc	eax
mov	[eax], dl
inc	eax
inc	esi
cmp	eax, ecx
jb	short loc_810CE0
mov	edx, [esp+10h+arg_C]

loc_810CF1:
inc	ebp
add	edi, 4
cmp	ebp, [ebx+114h]
jl	short loc_810CD2
pop	esi

loc_810CFE:
pop	edi
pop	ebp
pop	ebx
retn
sub_810CB0 endp

align 10h



sub_810D10 proc	near

arg_0= dword ptr  4
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
push	ebx
mov	ebx, [eax]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
xor	esi, esi
cmp	[ebp+114h], esi
jle	short loc_810D75
mov	ecx, [esp+0Ch+arg_8]
mov	[esp+0Ch+arg_C], ecx
push	edi

loc_810D30:
mov	eax, [ebx+esi*4]
mov	ecx, [ebp+5Ch]
mov	edx, [esp+10h+arg_C]
mov	edi, [edx]
add	ecx, eax
cmp	eax, ecx
jnb	short loc_810D4F

loc_810D42:
mov	dl, [edi]
mov	[eax], dl
inc	eax
mov	[eax], dl
inc	eax
inc	edi
cmp	eax, ecx
jb	short loc_810D42

loc_810D4F:
mov	eax, [ebp+5Ch]
push	eax
push	1
lea	ecx, [esi+1]
push	ecx
push	ebx
push	esi
push	ebx
call	sub_8098F0
add	[esp+28h+arg_C], 4
add	esi, 2
add	esp, 18h
cmp	esi, [ebp+114h]
jl	short loc_810D30
pop	edi

loc_810D75:
pop	esi
pop	ebp
pop	ebx
retn
sub_810D10 endp

align 10h



sub_810D80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_0]
mov	eax, [esp+arg_C]
push	ebx
xor	ebx, ebx
cmp	[ecx+114h], ebx
push	ebp
mov	ebp, [eax]
jle	loc_810E2F
mov	eax, [esp+8+arg_8]
push	esi
sub	eax, ebp
push	edi
mov	[esp+10h+arg_C], eax
jmp	short loc_810DB4
jmp	short loc_810DB0
align 10h

loc_810DB0:
mov	eax, [esp+10h+arg_C]

loc_810DB4:
mov	ecx, [eax+ebp]
movzx	edx, byte ptr [ecx]
mov	eax, [ebp+0]
mov	[eax], dl
movzx	esi, byte ptr [ecx+1]
inc	ecx
lea	edx, [edx+edx*2]
lea	edx, [edx+esi+2]
inc	eax
sar	edx, 2
mov	[eax], dl
mov	edx, [esp+10h+arg_4]
mov	esi, [edx+28h]
inc	eax
sub	esi, 2
jz	short loc_810E07
mov	edi, edi

loc_810DE0:
movzx	edx, byte ptr [ecx]
lea	edi, [edx+edx*2]
movzx	edx, byte ptr [ecx-1]
inc	ecx
lea	edx, [edx+edi+1]
sar	edx, 2
mov	[eax], dl
movzx	edx, byte ptr [ecx]
inc	eax
lea	edx, [edx+edi+2]
sar	edx, 2
mov	[eax], dl
inc	eax
sub	esi, 1
jnz	short loc_810DE0

loc_810E07:
movzx	edx, byte ptr [ecx]
movzx	ecx, byte ptr [ecx-1]
lea	esi, [edx+edx*2]
lea	ecx, [ecx+esi+1]
sar	ecx, 2
mov	[eax], cl
mov	[eax+1], dl
mov	edx, [esp+10h+arg_0]
inc	ebx
add	ebp, 4
cmp	ebx, [edx+114h]
jl	short loc_810DB0
pop	edi
pop	esi

loc_810E2F:
pop	ebp
pop	ebx
retn
sub_810D80 endp

align 10h



sub_810E40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	eax, [esp+10h+arg_C]
mov	ecx, [eax]
mov	edx, [esp+10h+arg_0]
xor	eax, eax
cmp	[edx+114h], eax
mov	[esp+10h+var_4], ecx
jle	loc_810F61
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_8]
push	edi
mov	[esp+20h+arg_C], esi
jmp	short loc_810E70
align 10h

loc_810E70:
xor	ecx, ecx
mov	[esp+20h+var_C], ecx

loc_810E76:
mov	ebp, [esi]
test	ecx, ecx
jnz	short loc_810E81
mov	edi, [esi-4]
jmp	short loc_810E84

loc_810E81:
mov	edi, [esi+4]

loc_810E84:
movzx	esi, byte ptr [ebp+0]
movzx	edx, byte ptr [edi]
mov	ecx, [esp+20h+var_4]
mov	ecx, [ecx+eax*4]
mov	ebx, [esp+20h+arg_4]
inc	eax
inc	ebp
mov	[esp+20h+var_8], eax
movzx	eax, byte ptr [ebp+0]
lea	esi, [esi+esi*2]
add	esi, edx
movzx	edx, byte ptr [edi+1]
inc	edi
lea	eax, [eax+eax*2]
add	eax, edx
lea	edx, ds:8[esi*4]
sar	edx, 4
mov	[ecx], dl
lea	edx, [eax+esi*2]
lea	edx, [esi+edx+7]
inc	ecx
sar	edx, 4
mov	[ecx], dl
mov	ebx, [ebx+28h]
inc	edi
inc	ebp
inc	ecx
sub	ebx, 2
mov	edx, esi
mov	esi, eax
mov	[esp+20h+var_10], ebx
jz	short loc_810F13
jmp	short loc_810EE0
align 10h

loc_810EE0:
movzx	eax, byte ptr [ebp+0]
movzx	ebx, byte ptr [edi]
lea	eax, [eax+eax*2]
add	eax, ebx
lea	ebx, [esi+esi*2]
lea	edx, [ebx+edx+8]
sar	edx, 4
mov	[ecx], dl
lea	edx, [esi+esi*2]
lea	edx, [edx+eax+7]
inc	ecx
sar	edx, 4
mov	[ecx], dl
inc	edi
inc	ebp
inc	ecx
sub	[esp+20h+var_10], 1
mov	edx, esi
mov	esi, eax
jnz	short loc_810EE0

loc_810F13:
mov	esi, [esp+20h+arg_C]
lea	edx, [edx+eax*2]
lea	edx, [eax+edx+8]
lea	eax, ds:7[eax*4]
sar	edx, 4
sar	eax, 4
mov	[ecx], dl
mov	[ecx+1], al
mov	ecx, [esp+20h+var_C]
mov	eax, [esp+20h+var_8]
inc	ecx
cmp	ecx, 2
mov	[esp+20h+var_C], ecx
jl	loc_810E76
mov	ecx, [esp+20h+arg_0]
add	esi, 4
cmp	eax, [ecx+114h]
mov	[esp+20h+arg_C], esi
jl	loc_810E70
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_810F61:
add	esp, 10h
retn
sub_810E40 endp

align 10h



sub_810F70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	0A0h
push	1
push	esi
call	ecx
mov	ebp, eax
mov	[esi+1A0h], ebp
add	esp, 0Ch
mov	dword ptr [ebp+0], offset sub_810AC0
mov	dword ptr [ebp+4], offset sub_810AE0
mov	byte ptr [ebp+8], 0
cmp	byte ptr [esi+10Ah], 0
mov	[esp+1Ch+var_4], ebp
jz	short loc_810FC6
mov	edx, [esi]
mov	dword ptr [edx+14h], 19h
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_810FC6:
cmp	byte ptr [esi+48h], 0
jz	short loc_810FDA
cmp	dword ptr [esi+118h], 1
mov	byte ptr [esp+1Ch+arg_0], 1
jg	short loc_810FDF

loc_810FDA:
mov	byte ptr [esp+1Ch+arg_0], 0

loc_810FDF:
cmp	dword ptr [esi+24h], 0
mov	ebx, [esi+0C4h]
mov	[esp+1Ch+var_10], 0
jle	loc_811155
add	ebx, 24h
add	ebp, 34h
push	edi
mov	edi, edi

loc_811000:
mov	ecx, [ebx]
mov	eax, [ebx-1Ch]
mov	edi, [esi+118h]
imul	eax, ecx
cdq
idiv	edi
mov	[esp+20h+var_C], eax
mov	eax, [ebx-18h]
imul	eax, ecx
cdq
idiv	edi
mov	edx, [esi+114h]
mov	[esp+20h+var_8], edx
mov	ecx, eax
mov	eax, [esi+110h]
mov	[ebp+30h], ecx
cmp	byte ptr [ebx+0Ch], 0
jnz	short loc_811045
mov	dword ptr [ebp+0], offset sub_810BC0
jmp	loc_81113C

loc_811045:
mov	edi, [esp+20h+var_C]
cmp	edi, eax
jnz	short loc_81105D
cmp	ecx, edx
jnz	short loc_81105D
mov	dword ptr [ebp+0], offset sub_810BB0
jmp	loc_81113C

loc_81105D:
add	edi, edi
cmp	edi, eax
jnz	short loc_8110C0
cmp	ecx, edx
jnz	short loc_81108C
cmp	byte ptr [esp+20h+arg_0], 0
jz	short loc_811080
cmp	dword ptr [ebx+4], 2
jbe	short loc_811080
mov	dword ptr [ebp+0], offset sub_810D80
jmp	loc_81110E

loc_811080:
mov	dword ptr [ebp+0], offset sub_810CB0
jmp	loc_81110E

loc_81108C:
cmp	edi, eax
jnz	short loc_8110C0
lea	edx, [ecx+ecx]
cmp	edx, [esp+20h+var_8]
jnz	short loc_8110C0
cmp	byte ptr [esp+20h+arg_0], 0
jz	short loc_8110B7
cmp	dword ptr [ebx+4], 2
jbe	short loc_8110B7
mov	eax, [esp+20h+var_4]
mov	dword ptr [ebp+0], offset sub_810E40
mov	byte ptr [eax+8], 1
jmp	short loc_81110E

loc_8110B7:
mov	dword ptr [ebp+0], offset sub_810D10
jmp	short loc_81110E

loc_8110C0:
cdq
idiv	[esp+20h+var_C]
mov	[esp+20h+var_C], eax
test	edx, edx
jnz	short loc_8110FB
mov	eax, [esp+20h+var_8]
cdq
idiv	ecx
test	edx, edx
jnz	short loc_8110FB
mov	ecx, [esp+20h+var_4]
mov	edi, [esp+20h+var_10]
mov	dl, byte ptr [esp+20h+var_C]
mov	dword ptr [ebp+0], offset sub_810BD0
mov	[edi+ecx+8Ch], dl
mov	[edi+ecx+96h], al
jmp	short loc_81110E

loc_8110FB:
mov	eax, [esi]
mov	dword ptr [eax+14h], 26h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_81110E:
mov	eax, [esi+114h]
mov	ecx, [esi+110h]
mov	edx, [esi+5Ch]
mov	edi, [esi+4]
push	eax
push	ecx
push	edx
add	edi, 8
call	sub_8098D0
add	esp, 8
push	eax
mov	eax, [edi]
push	1
push	esi
call	eax
add	esp, 10h
mov	[ebp-28h], eax

loc_81113C:
mov	eax, [esp+20h+var_10]
inc	eax
add	ebp, 4
add	ebx, 54h
cmp	eax, [esi+24h]
mov	[esp+20h+var_10], eax
jl	loc_811000
pop	edi

loc_811155:
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_810F70 endp

align 10h



sub_811160 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, eax
mov	eax, [edi+4]
mov	ecx, [eax]
mov	esi, [edi+1A4h]
push	400h
push	1
push	edi
call	ecx
mov	[esi+8], eax
mov	edx, [edi+4]
mov	eax, [edx]
push	400h
push	1
push	edi
call	eax
mov	[esi+0Ch], eax
mov	ecx, [edi+4]
mov	edx, [ecx]
push	400h
push	1
push	edi
call	edx
mov	[esi+10h], eax
mov	eax, [edi+4]
mov	ecx, [eax]
push	400h
push	1
push	edi
call	ecx
add	esp, 30h
mov	[esi+14h], eax
xor	eax, eax
mov	[esp+14h+var_4], offset	loc_5B6900
mov	edi, 0FF1DAF00h
mov	edx, 0FF4D0B80h
mov	ecx, 2C8D00h

loc_8111D1:
mov	ebp, [esi+8]
mov	ebx, edx
sar	ebx, 10h
mov	[eax+ebp], ebx
mov	ebp, [esi+0Ch]
mov	ebx, edi
sar	ebx, 10h
mov	[eax+ebp], ebx
mov	ebp, [esi+10h]
mov	ebx, [esp+14h+var_4]
mov	[eax+ebp], ebx
mov	ebp, [esi+14h]
mov	[eax+ebp], ecx
sub	ebx, 0B6D2h
sub	ecx, 581Ah
add	edx, 166E9h
add	edi, 1C5A2h
add	eax, 4
cmp	ecx, 0FFD4CB1Ah
mov	[esp+14h+var_4], ebx
jge	short loc_8111D1
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_811160 endp

align 10h



sub_811230 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 24h
sub	[esp+24h+arg_10], 1
mov	ecx, [esp+24h+arg_0]
mov	eax, [ecx+1A4h]
mov	edx, [ecx+120h]
push	ebp
mov	ebp, [ecx+5Ch]
mov	ecx, [eax+8]
mov	[esp+28h+var_1C], ecx
mov	ecx, [eax+0Ch]
mov	[esp+28h+var_C], ecx
mov	ecx, [eax+10h]
mov	eax, [eax+14h]
mov	[esp+28h+var_8], ebp
mov	[esp+28h+var_10], edx
mov	[esp+28h+var_14], ecx
mov	[esp+28h+var_18], eax
js	loc_811348
push	ebx
push	esi
mov	esi, [esp+30h+arg_4]
push	edi
mov	edi, [esp+34h+arg_8]
add	edi, edi
add	edi, edi

loc_811285:
mov	ecx, [esi]
mov	eax, [edi+ecx]
mov	ecx, [esi+4]
mov	ebx, [esp+34h+arg_C]
mov	[esp+34h+arg_0], eax
mov	eax, [edi+ecx]
mov	ecx, [esi+8]
mov	ecx, [edi+ecx]
mov	[esp+34h+var_24], ecx
mov	ecx, [ebx]
add	edi, 4
add	ebx, 4
mov	[esp+34h+var_4], edi
mov	[esp+34h+arg_C], ebx
test	ebp, ebp
jbe	loc_81133A
mov	esi, [esp+34h+arg_0]
mov	ebx, [esp+34h+var_24]
sub	esi, eax
sub	ebx, eax
mov	[esp+34h+var_20], esi
mov	[esp+34h+var_24], ebx
mov	[esp+34h+arg_0], ebp
jmp	short loc_8112DC

loc_8112D4:
mov	esi, [esp+34h+var_20]
mov	ebx, [esp+34h+var_24]

loc_8112DC:
movzx	ebp, byte ptr [ebx+eax]
movzx	esi, byte ptr [esi+eax]
mov	ebx, [esp+34h+var_1C]
mov	ebx, [ebx+ebp*4]
movzx	edi, byte ptr [eax]
add	ebx, esi
mov	dl, [ebx+edx]
mov	[ecx], dl
mov	edx, [esp+34h+var_18]
mov	ebx, [edx+edi*4]
mov	edx, [esp+34h+var_14]
add	ebx, [edx+ebp*4]
mov	edx, [esp+34h+var_10]
sar	ebx, 10h
add	ebx, esi
movzx	ebx, byte ptr [ebx+edx]
mov	[ecx+1], bl
mov	ebx, [esp+34h+var_C]
mov	edi, [ebx+edi*4]
add	edi, esi
movzx	ebx, byte ptr [edi+edx]
mov	[ecx+2], bl
add	ecx, 3
inc	eax
sub	[esp+34h+arg_0], 1
jnz	short loc_8112D4
mov	ebp, [esp+34h+var_8]
mov	esi, [esp+34h+arg_4]
mov	edi, [esp+34h+var_4]

loc_81133A:
sub	[esp+34h+arg_10], 1
jns	loc_811285
pop	edi
pop	esi
pop	ebx

loc_811348:
pop	ebp
add	esp, 24h
retn
sub_811230 endp

align 10h



sub_811350 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	[esp+arg_10], 1
mov	eax, [esp+arg_0]
mov	edx, [eax+24h]
push	ebp
mov	ebp, [eax+5Ch]
js	short loc_8113D8
mov	eax, [esp+4+arg_8]
push	ebx
lea	ecx, ds:0[eax*4]
push	esi
mov	[esp+0Ch+arg_0], ecx
mov	eax, 4
push	edi
lea	esp, [esp+0]

loc_811380:
xor	esi, esi
test	edx, edx
jle	short loc_8113C6
jmp	short loc_811390
align 10h

loc_811390:
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax+esi*4]
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax+ecx]
mov	eax, [esp+10h+arg_C]
mov	eax, [eax]
add	eax, esi
mov	edi, ebp
test	ebp, ebp
jbe	short loc_8113BC
lea	esp, [esp+0]

loc_8113B0:
mov	bl, [ecx]
mov	[eax], bl
inc	ecx
add	eax, edx
sub	edi, 1
jnz	short loc_8113B0

loc_8113BC:
inc	esi
cmp	esi, edx
jl	short loc_811390
mov	eax, 4

loc_8113C6:
add	[esp+10h+arg_0], eax
add	[esp+10h+arg_C], eax
sub	[esp+10h+arg_10], 1
jns	short loc_811380
pop	edi
pop	esi
pop	ebx

loc_8113D8:
pop	ebp
retn
sub_811350 endp

align 10h



sub_8113E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
mov	ecx, [eax+5Ch]
mov	edx, [esp+arg_10]
mov	eax, [esp+arg_C]
push	ecx
mov	ecx, [esp+4+arg_8]
push	edx
mov	edx, [esp+8+arg_4]
push	0
push	eax
mov	eax, [edx]
push	ecx
push	eax
call	sub_8098F0
add	esp, 18h
retn
sub_8113E0 endp

align 10h



sub_811410 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	[esp+arg_10], 1
mov	eax, [esp+arg_0]
push	edi
mov	edi, [eax+5Ch]
js	short loc_811464
push	ebx
mov	ebx, [esp+8+arg_C]
push	ebp
mov	ebp, [esp+0Ch+arg_8]
add	ebp, ebp
push	esi
add	ebp, ebp
mov	edi, edi

loc_811430:
mov	ecx, [esp+10h+arg_4]
mov	edx, [ecx]
mov	esi, [edx+ebp]
mov	eax, [ebx]
add	ebp, 4
add	ebx, 4
xor	edx, edx
test	edi, edi
jbe	short loc_81145A

loc_811447:
mov	cl, [edx+esi]
mov	[eax+2], cl
mov	[eax+1], cl
mov	[eax], cl
inc	edx
add	eax, 3
cmp	edx, edi
jb	short loc_811447

loc_81145A:
sub	[esp+10h+arg_10], 1
jns	short loc_811430
pop	esi
pop	ebp
pop	ebx

loc_811464:
pop	edi
retn
sub_811410 endp

align 10h



sub_811470 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 28h
sub	[esp+28h+arg_10], 1
mov	ecx, [esp+28h+arg_0]
mov	edx, [ecx+5Ch]
mov	eax, [ecx+1A4h]
mov	[esp+28h+var_28], edx
mov	edx, [ecx+120h]
mov	ecx, [eax+8]
mov	[esp+28h+var_18], ecx
mov	ecx, [eax+0Ch]
mov	[esp+28h+var_8], ecx
mov	ecx, [eax+10h]
mov	eax, [eax+14h]
mov	[esp+28h+var_C], edx
mov	[esp+28h+var_10], ecx
mov	[esp+28h+var_14], eax
js	loc_8115BC
push	ebx
push	ebp
push	esi
mov	esi, [esp+34h+arg_8]
add	esi, esi
push	edi
mov	edi, [esp+38h+arg_4]
add	esi, esi

loc_8114C4:
mov	ecx, [edi]
mov	ebx, [esi+ecx]
mov	ecx, [edi+8]
mov	ecx, [esi+ecx]
mov	ebp, [esp+38h+arg_C]
mov	eax, [edi+4]
mov	eax, [esi+eax]
mov	[esp+38h+arg_0], ecx
mov	ecx, [edi+0Ch]
mov	ecx, [esi+ecx]
mov	[esp+38h+var_24], ecx
mov	ecx, [ebp+0]
add	ebp, 4
mov	[esp+38h+arg_C], ebp
mov	ebp, [esp+38h+var_28]
add	esi, 4
mov	[esp+38h+var_4], esi
test	ebp, ebp
jbe	loc_8115AD
mov	edi, [esp+38h+var_24]
mov	esi, ebx
mov	ebx, [esp+38h+arg_0]
sub	esi, eax
sub	ebx, eax
sub	edi, eax
mov	[esp+38h+var_20], esi
mov	[esp+38h+var_1C], ebx
mov	[esp+38h+var_24], edi
mov	[esp+38h+arg_0], ebp
jmp	short loc_811538
jmp	short loc_811530
align 10h

loc_811530:
mov	esi, [esp+38h+var_20]
mov	ebx, [esp+38h+var_1C]

loc_811538:
movzx	ebp, byte ptr [ebx+eax]
movzx	esi, byte ptr [esi+eax]
mov	ebx, [esp+38h+var_18]
sub	edx, [ebx+ebp*4]
movzx	edi, byte ptr [eax]
sub	edx, esi
mov	dl, [edx+0FFh]
mov	[ecx], dl
mov	edx, [esp+38h+var_14]
mov	ebx, [edx+edi*4]
mov	edx, [esp+38h+var_10]
add	ebx, [edx+ebp*4]
mov	edx, [esp+38h+var_C]
sar	ebx, 10h
mov	ebp, edx
sub	ebp, ebx
sub	ebp, esi
movzx	ebx, byte ptr [ebp+0FFh]
mov	ebp, [esp+38h+var_8]
mov	[ecx+1], bl
mov	ebx, edx
sub	ebx, [ebp+edi*4+0]
add	ecx, 4
sub	ebx, esi
movzx	ebx, byte ptr [ebx+0FFh]
mov	esi, [esp+38h+var_24]
mov	[ecx-2], bl
movzx	ebx, byte ptr [esi+eax]
mov	[ecx-1], bl
inc	eax
sub	[esp+38h+arg_0], 1
jnz	short loc_811530
mov	edi, [esp+38h+arg_4]
mov	esi, [esp+38h+var_4]

loc_8115AD:
sub	[esp+38h+arg_10], 1
jns	loc_8114C4
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_8115BC:
add	esp, 28h
retn
sub_811470 endp




sub_8115C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	edi
push	18h
push	1
push	esi
call	ecx
mov	edi, eax
mov	[esi+1A4h], edi
mov	dword ptr [edi], offset	nullsub_2
mov	eax, [esi+28h]
dec	eax
add	esp, 0Ch
cmp	eax, 4		; switch 5 cases
ja	short loc_81160B ; default
jmp	ds:off_811730[eax*4] ; switch jump

loc_8115F3:		; jumptable 008115EC case 0
cmp	dword ptr [esi+24h], 1
jz	short loc_811624
jmp	short loc_811611

loc_8115FB:		; jumptable 008115EC cases 1,2
cmp	dword ptr [esi+24h], 3
jz	short loc_811624
jmp	short loc_811611

loc_811603:		; jumptable 008115EC cases 3,4
cmp	dword ptr [esi+24h], 4
jz	short loc_811624
jmp	short loc_811611

loc_81160B:		; default
cmp	dword ptr [esi+24h], 1
jge	short loc_811624

loc_811611:
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_811624:
mov	ecx, [esi+2Ch]
mov	eax, ecx
mov	edx, 1
sub	eax, edx
jz	loc_8116C7
sub	eax, edx
jz	short loc_81168D
sub	eax, 2
jz	short loc_81165A
cmp	ecx, [esi+28h]
jnz	loc_8116D6
mov	edx, [esi+24h]
mov	[esi+64h], edx
mov	dword ptr [edi+4], offset sub_811350
jmp	loc_811715

loc_81165A:
mov	eax, [esi+28h]
mov	dword ptr [esi+64h], 4
cmp	eax, 5
jnz	short loc_81167C
mov	eax, esi
mov	dword ptr [edi+4], offset sub_811470
call	sub_811160
jmp	loc_811715

loc_81167C:
cmp	eax, 4
jnz	short loc_8116D6
mov	dword ptr [edi+4], offset sub_811350
jmp	loc_811715

loc_81168D:
mov	eax, [esi+28h]
mov	dword ptr [esi+64h], 3
cmp	eax, 3
jnz	short loc_8116AC
mov	eax, esi
mov	dword ptr [edi+4], offset sub_811230
call	sub_811160
jmp	short loc_811715

loc_8116AC:
cmp	eax, edx
jnz	short loc_8116B9
mov	dword ptr [edi+4], offset sub_811410
jmp	short loc_811715

loc_8116B9:
cmp	eax, 2
jnz	short loc_8116D6
mov	dword ptr [edi+4], offset sub_811350
jmp	short loc_811715

loc_8116C7:
mov	eax, [esi+28h]
mov	[esi+64h], edx
cmp	eax, edx
jz	short loc_8116EB
cmp	eax, 3
jz	short loc_8116EB

loc_8116D6:
mov	eax, [esi]
mov	dword ptr [eax+14h], 1Bh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4
jmp	short loc_811715

loc_8116EB:
mov	dword ptr [edi+4], offset sub_8113E0
cmp	[esi+24h], edx
mov	eax, edx
jle	short loc_811715
mov	ecx, 54h
mov	edi, edi

loc_811700:
mov	edi, [esi+0C4h]
mov	byte ptr [edi+ecx+30h],	0
add	eax, edx
add	ecx, 54h
cmp	eax, [esi+24h]
jl	short loc_811700

loc_811715:
cmp	byte ptr [esi+4Ah], 0
jz	short loc_811725
pop	edi
mov	dword ptr [esi+68h], 1
pop	esi
retn

loc_811725:
mov	eax, [esi+64h]
pop	edi
mov	[esi+68h], eax
pop	esi
retn
sub_8115C0 endp

align 10h
off_811730 dd offset loc_8115F3	; jump table for switch	statement
dd offset loc_8115FB
dd offset loc_8115FB
dd offset loc_811603
dd offset loc_811603
align 10h
; START	OF FUNCTION CHUNK FOR sub_811CB0

loc_811750:
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	edi, eax
mov	eax, [edi+4]
mov	ecx, [eax]
mov	esi, [edi+1A0h]
push	400h
push	1
push	edi
call	ecx
mov	[esi+10h], eax
mov	edx, [edi+4]
mov	eax, [edx]
push	400h
push	1
push	edi
call	eax
mov	[esi+14h], eax
mov	ecx, [edi+4]
mov	edx, [ecx]
push	400h
push	1
push	edi
call	edx
mov	[esi+18h], eax
mov	eax, [edi+4]
mov	ecx, [eax]
push	400h
push	1
push	edi
call	ecx
add	esp, 30h
mov	[esi+1Ch], eax
xor	eax, eax
mov	[esp+14h+var_4], offset	loc_5B6900
mov	edi, 0FF1DAF00h
mov	edx, 0FF4D0B80h
mov	ecx, 2C8D00h

loc_8117C1:
mov	ebp, [esi+10h]
mov	ebx, edx
sar	ebx, 10h
mov	[eax+ebp], ebx
mov	ebp, [esi+14h]
mov	ebx, edi
sar	ebx, 10h
mov	[eax+ebp], ebx
mov	ebp, [esi+18h]
mov	ebx, [esp+14h+var_4]
mov	[eax+ebp], ebx
mov	ebp, [esi+1Ch]
mov	[eax+ebp], ecx
sub	ebx, 0B6D2h
sub	ecx, 581Ah
add	edx, 166E9h
add	edi, 1C5A2h
add	eax, 4
cmp	ecx, 0FFD4CB1Ah
mov	[esp+14h+var_4], ebx
jge	short loc_8117C1
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_811CB0
align 10h



sub_811820 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx+1A0h]
mov	byte ptr [eax+24h], 0
mov	ecx, [ecx+60h]
mov	[eax+2Ch], ecx
retn
sub_811820 endp

align 10h



sub_811840 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	edx, [esp+arg_0]
sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_14]
push	ebp
mov	ebp, [esp+10h+arg_8]
push	esi
mov	esi, [edx+1A0h]
cmp	byte ptr [esi+24h], 0
push	edi
jz	short loc_81188A
mov	eax, [esi+28h]
mov	ecx, [ebx]
mov	edx, [esp+18h+arg_10]
push	eax
push	1
push	0
lea	eax, [edx+ecx*4]
push	eax
lea	ecx, [esi+20h]
push	0
push	ecx
call	sub_8098F0
add	esp, 18h
mov	edi, 1
mov	byte ptr [esi+24h], 0
jmp	short loc_8118E4

loc_81188A:
mov	eax, [esi+2Ch]
mov	ecx, [esp+18h+arg_18]
mov	edi, 2
cmp	eax, edi
cmovb	edi, eax
mov	eax, [ebx]
sub	ecx, eax
cmp	edi, ecx
cmova	edi, ecx
mov	ecx, [esp+18h+arg_10]
mov	ebp, [ecx+eax*4]
mov	[esp+18h+var_8], ebp
cmp	edi, 1
jbe	short loc_8118BE
mov	eax, [ecx+eax*4+4]
mov	[esp+18h+var_4], eax
jmp	short loc_8118C9

loc_8118BE:
mov	ecx, [esi+20h]
mov	[esp+18h+var_4], ecx
mov	byte ptr [esi+24h], 1

loc_8118C9:
mov	ebp, [esp+18h+arg_8]
mov	ecx, [ebp+0]
lea	eax, [esp+18h+var_8]
push	eax
mov	eax, [esp+1Ch+arg_4]
push	ecx
mov	ecx, [esi+0Ch]
push	eax
push	edx
call	ecx
add	esp, 10h

loc_8118E4:
add	[ebx], edi
sub	[esi+2Ch], edi
cmp	byte ptr [esi+24h], 0
jnz	short loc_8118F2
inc	dword ptr [ebp+0]

loc_8118F2:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_811840 endp

align 10h



sub_811900 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_0]
mov	ecx, [eax+1A0h]
push	esi
mov	esi, [esp+4+arg_14]
mov	edx, [esi]
push	edi
mov	edi, [esp+8+arg_10]
lea	edx, [edi+edx*4]
mov	edi, [esp+8+arg_8]
push	edx
mov	edx, [edi]
push	edx
mov	edx, [esp+10h+arg_4]
push	edx
push	eax
mov	eax, [ecx+0Ch]
call	eax
inc	dword ptr [esi]
inc	dword ptr [edi]
add	esp, 10h
pop	edi
pop	esi
retn
sub_811900 endp

align 10h



sub_811940 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 14h
mov	edx, [esp+14h+arg_0]
mov	eax, [edx+1A0h]
mov	ecx, [edx+120h]
push	ebx
mov	ebx, [esp+18h+arg_4]
push	ebp
mov	ebp, [edx+5Ch]
push	esi
mov	esi, [eax+10h]
mov	[esp+20h+var_4], esi
mov	esi, [eax+14h]
mov	[esp+20h+var_8], esi
mov	esi, [eax+18h]
mov	eax, [eax+1Ch]
mov	[esp+20h+var_C], esi
mov	esi, [ebx]
mov	[esp+20h+var_10], eax
mov	eax, [esp+20h+arg_8]
push	edi
mov	edi, [esi+eax*4]
mov	esi, [ebx+4]
mov	ebx, [ebx+8]
mov	esi, [esi+eax*4]
mov	ebx, [ebx+eax*4]
mov	eax, [esp+24h+arg_C]
mov	eax, [eax]
shr	ebp, 1
mov	[esp+24h+arg_4], ebp
jz	loc_811A36

loc_8119A1:
movzx	ebp, byte ptr [ebx]
movzx	edx, byte ptr [esi]
inc	esi
inc	ebx
mov	[esp+24h+arg_C], esi
mov	esi, [esp+24h+var_4]
mov	esi, [esi+ebp*4]
mov	[esp+24h+var_14], ebx
mov	ebx, [esp+24h+var_C]
mov	[esp+24h+arg_8], esi
mov	esi, [esp+24h+var_10]
mov	esi, [esi+edx*4]
add	esi, [ebx+ebp*4]
movzx	ebp, byte ptr [edi]
mov	ebx, [esp+24h+var_8]
mov	edx, [ebx+edx*4]
mov	ebx, [esp+24h+arg_8]
add	ebx, ebp
movzx	ebx, byte ptr [ebx+ecx]
mov	[eax], bl
sar	esi, 10h
lea	ebx, [esi+ebp]
movzx	ebx, byte ptr [ebx+ecx]
mov	[eax+1], bl
add	ebp, edx
movzx	ebx, byte ptr [ecx+ebp]
mov	[eax+2], bl
movzx	ebp, byte ptr [edi+1]
mov	ebx, [esp+24h+arg_8]
inc	edi
add	ebx, ebp
movzx	ebx, byte ptr [ebx+ecx]
add	eax, 3
add	esi, ebp
mov	[eax], bl
movzx	ebx, byte ptr [esi+ecx]
mov	esi, [esp+24h+arg_C]
mov	[eax+1], bl
mov	ebx, [esp+24h+var_14]
add	ebp, edx
mov	dl, [ecx+ebp]
mov	[eax+2], dl
inc	edi
add	eax, 3
sub	[esp+24h+arg_4], 1
jnz	loc_8119A1
mov	edx, [esp+24h+arg_0]

loc_811A36:
test	byte ptr [edx+5Ch], 1
jz	short loc_811A80
movzx	edx, byte ptr [esi]
movzx	ebx, byte ptr [ebx]
mov	esi, [esp+24h+var_10]
mov	esi, [esi+edx*4]
mov	ebp, [esp+24h+var_C]
add	esi, [ebp+ebx*4+0]
movzx	edi, byte ptr [edi]
mov	ebp, [esp+24h+var_8]
mov	ebp, [ebp+edx*4+0]
mov	edx, [esp+24h+var_4]
mov	edx, [edx+ebx*4]
add	edx, edi
movzx	edx, byte ptr [edx+ecx]
sar	esi, 10h
mov	[eax], dl
lea	edx, [edi+esi]
movzx	edx, byte ptr [edx+ecx]
add	edi, ebp
mov	[eax+1], dl
mov	cl, [edi+ecx]
mov	[eax+2], cl

loc_811A80:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_811940 endp

align 10h



sub_811A90 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 1Ch
push	ebx
mov	ebx, [esp+20h+arg_0]
mov	ecx, [ebx+1A0h]
mov	edx, [ecx+10h]
mov	eax, [ebx+120h]
mov	[esp+20h+var_10], edx
mov	edx, [ecx+14h]
mov	[esp+20h+var_4], edx
mov	edx, [ecx+18h]
mov	ecx, [ecx+1Ch]
push	ebp
mov	ebp, [ebx+5Ch]
mov	[esp+24h+var_8], edx
mov	[esp+24h+var_C], ecx
mov	ecx, [esp+24h+arg_4]
mov	edx, [ecx]
push	esi
mov	esi, [esp+28h+arg_8]
lea	edx, [edx+esi*8]
push	edi
mov	edi, [edx]
mov	edx, [edx+4]
mov	[esp+2Ch+var_1C], edx
mov	edx, [ecx+4]
mov	ecx, [ecx+8]
mov	edx, [edx+esi*4]
mov	[esp+2Ch+arg_8], edi
mov	edi, [ecx+esi*4]
mov	esi, [esp+2Ch+arg_C]
mov	ecx, [esi]
mov	esi, [esi+4]
shr	ebp, 1
mov	[esp+2Ch+arg_C], ebp
jz	loc_811C20

loc_811B01:
movzx	ebx, byte ptr [edx]
mov	[esp+2Ch+arg_4], ebx
inc	edx
inc	edi
mov	[esp+2Ch+var_18], edx
movzx	edx, byte ptr [edi-1]
mov	[esp+2Ch+var_14], edi
mov	edi, [esp+2Ch+var_10]
mov	ebp, [edi+edx*4]
mov	edi, [esp+2Ch+var_C]
mov	edi, [edi+ebx*4]
mov	ebx, [esp+2Ch+var_8]
add	edi, [ebx+edx*4]
mov	ebx, [esp+2Ch+arg_4]
mov	edx, [esp+2Ch+var_4]
mov	edx, [edx+ebx*4]
mov	ebx, [esp+2Ch+arg_8]
movzx	ebx, byte ptr [ebx]
mov	[esp+2Ch+arg_4], ebx
add	ebx, ebp
movzx	ebx, byte ptr [ebx+eax]
mov	[ecx], bl
mov	ebx, [esp+2Ch+arg_4]
inc	[esp+2Ch+arg_8]
sar	edi, 10h
add	ebx, edi
movzx	ebx, byte ptr [ebx+eax]
mov	[ecx+1], bl
mov	ebx, [esp+2Ch+arg_4]
add	ebx, edx
movzx	ebx, byte ptr [ebx+eax]
mov	[ecx+2], bl
mov	ebx, [esp+2Ch+arg_8]
movzx	ebx, byte ptr [ebx]
mov	[esp+2Ch+arg_4], ebx
add	ebx, ebp
movzx	ebx, byte ptr [ebx+eax]
mov	[ecx+3], bl
mov	ebx, [esp+2Ch+arg_4]
add	ebx, edi
movzx	ebx, byte ptr [ebx+eax]
mov	[ecx+4], bl
mov	ebx, [esp+2Ch+arg_4]
add	ebx, edx
movzx	ebx, byte ptr [ebx+eax]
add	ecx, 3
mov	[ecx+2], bl
mov	ebx, [esp+2Ch+var_1C]
movzx	ebx, byte ptr [ebx]
mov	[esp+2Ch+arg_4], ebx
add	ebx, ebp
movzx	ebx, byte ptr [ebx+eax]
mov	[esi], bl
mov	ebx, [esp+2Ch+arg_4]
inc	[esp+2Ch+var_1C]
add	ebx, edi
movzx	ebx, byte ptr [ebx+eax]
mov	[esi+1], bl
mov	ebx, [esp+2Ch+arg_4]
add	ebx, edx
movzx	ebx, byte ptr [ebx+eax]
mov	[esi+2], bl
mov	ebx, [esp+2Ch+var_1C]
movzx	ebx, byte ptr [ebx]
inc	[esp+2Ch+arg_8]
inc	[esp+2Ch+var_1C]
mov	[esp+2Ch+arg_4], ebx
add	ebx, ebp
movzx	ebx, byte ptr [ebx+eax]
add	esi, 3
mov	[esi], bl
mov	ebx, [esp+2Ch+arg_4]
add	ebx, edi
movzx	ebx, byte ptr [ebx+eax]
mov	edi, [esp+2Ch+arg_4]
add	edi, edx
mov	[esi+1], bl
mov	dl, [edi+eax]
add	ecx, 3
mov	[esi+2], dl
add	esi, 3
sub	[esp+2Ch+arg_C], 1
mov	edx, [esp+2Ch+var_18]
mov	edi, [esp+2Ch+var_14]
jnz	loc_811B01
mov	ebx, [esp+2Ch+arg_0]

loc_811C20:
test	byte ptr [ebx+5Ch], 1
jz	short loc_811C9A
movzx	ebx, byte ptr [edi]
movzx	edx, byte ptr [edx]
mov	edi, [esp+2Ch+var_10]
mov	edi, [edi+ebx*4]
mov	ebp, [esp+2Ch+var_8]
mov	[esp+2Ch+arg_0], edi
mov	edi, [esp+2Ch+var_C]
mov	edi, [edi+edx*4]
add	edi, [ebp+ebx*4+0]
mov	ebx, [esp+2Ch+var_4]
mov	edx, [ebx+edx*4]
mov	ebx, [esp+2Ch+arg_8]
movzx	ebp, byte ptr [ebx]
mov	ebx, [esp+2Ch+arg_0]
add	ebx, ebp
movzx	ebx, byte ptr [ebx+eax]
mov	[ecx], bl
sar	edi, 10h
lea	ebx, [edi+ebp]
movzx	ebx, byte ptr [ebx+eax]
mov	[ecx+1], bl
add	ebp, edx
movzx	ebx, byte ptr [eax+ebp]
mov	[ecx+2], bl
mov	ecx, [esp+2Ch+var_1C]
movzx	ecx, byte ptr [ecx]
mov	ebx, [esp+2Ch+arg_0]
add	ebx, ecx
movzx	ebx, byte ptr [ebx+eax]
add	edi, ecx
mov	[esi], bl
movzx	ebx, byte ptr [edi+eax]
add	ecx, edx
mov	[esi+1], bl
mov	dl, [ecx+eax]
mov	[esi+2], dl

loc_811C9A:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_811A90 endp

align 10h



sub_811CB0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

; FUNCTION CHUNK AT 00811750 SIZE 000000C4 BYTES

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+4]
mov	ecx, [eax]
push	30h
push	1
push	edi
call	ecx
mov	esi, eax
mov	[edi+1A0h], esi
xor	eax, eax
mov	dword ptr [esi], offset	sub_811820
mov	[esi+8], al
mov	edx, [edi+64h]
imul	edx, [edi+5Ch]
add	esp, 0Ch
mov	[esi+28h], edx
cmp	dword ptr [edi+114h], 2
jnz	short loc_811D16
mov	ecx, edx
push	ecx
mov	dword ptr [esi+4], offset sub_811840
mov	dword ptr [esi+0Ch], offset sub_811A90
mov	eax, [edi+4]
mov	edx, [eax+4]
push	1
push	edi
call	edx
add	esp, 0Ch
mov	[esi+20h], eax
mov	eax, edi
pop	edi
pop	esi
jmp	loc_811750

loc_811D16:
mov	[esi+20h], eax
mov	eax, edi
pop	edi
mov	dword ptr [esi+4], offset sub_811900
mov	dword ptr [esi+0Ch], offset sub_811940
pop	esi
jmp	loc_811750
sub_811CB0 endp	; sp-analysis failed




sub_811D30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	ecx, [eax+1A8h]
push	ebx
push	ebp
mov	ebp, [eax+5Ch]
xor	ebx, ebx
cmp	[esp+8+arg_C], ebx
push	edi
mov	edi, [ecx+18h]
jle	short loc_811D9F
push	esi
lea	esp, [esp+0]

loc_811D50:
mov	edx, [esp+10h+arg_4]
mov	ecx, [edx+ebx*4]
mov	esi, ebp
test	ebp, ebp
jbe	short loc_811D97
lea	ecx, [ecx+0]

loc_811D60:
movzx	eax, byte ptr [ecx+1]
movzx	edx, byte ptr [ecx+2]
shr	eax, 2
shr	edx, 3
shl	eax, 5
add	eax, edx
movzx	edx, byte ptr [ecx]
shr	edx, 3
mov	edx, [edi+edx*4]
inc	word ptr [edx+eax*2]
lea	eax, [edx+eax*2]
movzx	edx, word ptr [eax]
test	dx, dx
ja	short loc_811D8F
dec	edx
mov	[eax], dx

loc_811D8F:
add	ecx, 3
sub	esi, 1
jnz	short loc_811D60

loc_811D97:
inc	ebx
cmp	ebx, [esp+10h+arg_C]
jl	short loc_811D50
pop	esi

loc_811D9F:
pop	edi
pop	ebp
pop	ebx
retn
sub_811D30 endp

align 10h



sub_811DB0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
mov	eax, [esp+1Ch+arg_0]
mov	edx, [ecx+1A8h]
mov	ecx, [edx+18h]
mov	edx, [eax]
push	ebx
mov	ebx, [eax+10h]
push	ebp
mov	ebp, [eax+14h]
push	esi
mov	esi, [eax+8]
mov	[esp+28h+var_8], ecx
mov	ecx, [eax+4]
cmp	edx, ecx
push	edi
mov	edi, [eax+0Ch]
mov	[esp+2Ch+var_14], edx
mov	[esp+2Ch+var_18], ecx
mov	[esp+2Ch+var_1C], esi
mov	[esp+2Ch+var_10], edi
mov	[esp+2Ch+var_C], ebx
mov	[esp+2Ch+var_4], ebp
jge	loc_811EE8
mov	edi, edx
jmp	short loc_811E00
align 10h

loc_811E00:
mov	esi, [esp+2Ch+var_1C]
cmp	esi, [esp+2Ch+var_10]
jg	short loc_811E4E
mov	eax, [esp+2Ch+var_8]
mov	ecx, [eax+edi*4]
mov	edx, esi
shl	edx, 5
add	edx, ebx
lea	edx, [ecx+edx*2]
jmp	short loc_811E20
align 10h

loc_811E20:
cmp	[esp+2Ch+var_C], ebp
mov	ecx, edx
mov	eax, ebx
jg	short loc_811E40
lea	ebx, [ebx+0]

loc_811E30:
mov	bx, [ecx]
add	ecx, 2
test	bx, bx
jnz	short loc_811E57
inc	eax
cmp	eax, ebp
jle	short loc_811E30

loc_811E40:
mov	ebx, [esp+2Ch+var_C]
inc	esi
add	edx, 40h
cmp	esi, [esp+2Ch+var_10]
jle	short loc_811E20

loc_811E4E:
inc	edi
cmp	edi, [esp+2Ch+var_18]
jle	short loc_811E00
jmp	short loc_811E65

loc_811E57:
mov	edx, [esp+2Ch+arg_0]
mov	ebx, [esp+2Ch+var_C]
mov	[esp+2Ch+var_14], edi
mov	[edx], edi

loc_811E65:
mov	edx, [esp+2Ch+var_14]
mov	eax, [esp+2Ch+var_18]
cmp	eax, edx
mov	esi, [esp+2Ch+var_1C]
jle	short loc_811EE8
mov	[esp+2Ch+var_C], eax
lea	esp, [esp+0]

loc_811E80:
cmp	esi, [esp+2Ch+var_10]
jg	short loc_811EBE
mov	edx, [esp+2Ch+var_8]
mov	eax, [edx+eax*4]
mov	ecx, esi
shl	ecx, 5
add	ecx, ebx
lea	edx, [eax+ecx*2]

loc_811E97:
cmp	ebx, ebp
mov	ecx, edx
mov	eax, ebx
jg	short loc_811EB0
nop

loc_811EA0:
mov	di, [ecx]
add	ecx, 2
test	di, di
jnz	short loc_811ED1
inc	eax
cmp	eax, ebp
jle	short loc_811EA0

loc_811EB0:
inc	esi
add	edx, 40h
cmp	esi, [esp+2Ch+var_10]
jle	short loc_811E97
mov	eax, [esp+2Ch+var_C]

loc_811EBE:
mov	edx, [esp+2Ch+var_14]
mov	esi, [esp+2Ch+var_1C]
dec	eax
cmp	eax, edx
mov	[esp+2Ch+var_C], eax
jge	short loc_811E80
jmp	short loc_811EE8

loc_811ED1:
mov	eax, [esp+2Ch+var_C]
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [esp+2Ch+var_14]
mov	esi, [esp+2Ch+var_1C]
mov	[esp+2Ch+var_18], eax
mov	[ecx+4], eax

loc_811EE8:
mov	eax, [esp+2Ch+var_10]
cmp	esi, eax
jge	loc_811FCA
mov	[esp+2Ch+var_C], esi
shl	esi, 5
add	esi, ebx
add	esi, esi
nop

loc_811F00:
cmp	edx, [esp+2Ch+var_18]
jg	short loc_811F2C

loc_811F06:
mov	eax, [esp+2Ch+var_8]
mov	eax, [eax+edx*4]
add	eax, esi
cmp	ebx, ebp
mov	ecx, ebx
jg	short loc_811F25

loc_811F15:
mov	di, [eax]
add	eax, 2
test	di, di
jnz	short loc_811F44
inc	ecx
cmp	ecx, ebp
jle	short loc_811F15

loc_811F25:
inc	edx
cmp	edx, [esp+2Ch+var_18]
jle	short loc_811F06

loc_811F2C:
mov	eax, [esp+2Ch+var_C]
mov	edx, [esp+2Ch+var_14]
inc	eax
add	esi, 40h
cmp	eax, [esp+2Ch+var_10]
mov	[esp+2Ch+var_C], eax
jle	short loc_811F00
jmp	short loc_811F57

loc_811F44:
mov	eax, [esp+2Ch+var_C]
mov	ecx, [esp+2Ch+arg_0]
mov	edx, [esp+2Ch+var_14]
mov	[esp+2Ch+var_1C], eax
mov	[ecx+8], eax

loc_811F57:
mov	esi, [esp+2Ch+var_1C]
mov	eax, [esp+2Ch+var_10]
cmp	eax, esi
jle	short loc_811FCA
mov	esi, eax
shl	esi, 5
add	esi, ebx
mov	[esp+2Ch+var_C], eax
add	esi, esi
jmp	short loc_811F76

loc_811F72:
mov	edx, [esp+2Ch+var_14]

loc_811F76:
cmp	edx, [esp+2Ch+var_18]
jg	short loc_811FA7
lea	esp, [esp+0]

loc_811F80:
mov	eax, [esp+2Ch+var_8]
mov	eax, [eax+edx*4]
add	eax, esi
cmp	ebx, ebp
mov	ecx, ebx
jg	short loc_811FA0
nop

loc_811F90:
mov	di, [eax]
add	eax, 2
test	di, di
jnz	short loc_811FBB
inc	ecx
cmp	ecx, ebp
jle	short loc_811F90

loc_811FA0:
inc	edx
cmp	edx, [esp+2Ch+var_18]
jle	short loc_811F80

loc_811FA7:
mov	eax, [esp+2Ch+var_C]
dec	eax
sub	esi, 40h
cmp	eax, [esp+2Ch+var_1C]
mov	[esp+2Ch+var_C], eax
jge	short loc_811F72
jmp	short loc_811FCA

loc_811FBB:
mov	eax, [esp+2Ch+var_C]
mov	ecx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_10], eax
mov	[ecx+0Ch], eax

loc_811FCA:
cmp	ebx, ebp
jge	loc_8120B7
mov	eax, ebx
mov	[esp+2Ch+var_C], ebx
jmp	short loc_811FE0
align 10h

loc_811FE0:
mov	edx, [esp+2Ch+var_14]
cmp	edx, [esp+2Ch+var_18]
jg	short loc_81202D
mov	esi, [esp+2Ch+var_1C]
mov	edi, [esp+2Ch+var_10]
mov	ebp, [esp+2Ch+var_1C]
shl	esi, 5
add	esi, eax
add	esi, esi
lea	ecx, [ecx+0]

loc_812000:
mov	eax, [esp+2Ch+var_8]
mov	eax, [eax+edx*4]
add	eax, esi
cmp	ebp, edi
mov	ecx, ebp
jg	short loc_81201E
nop

loc_812010:
cmp	word ptr [eax],	0
jnz	short loc_812038
inc	ecx
add	eax, 40h
cmp	ecx, edi
jle	short loc_812010

loc_81201E:
inc	edx
cmp	edx, [esp+2Ch+var_18]
jle	short loc_812000
mov	ebp, [esp+2Ch+var_4]
mov	eax, [esp+2Ch+var_C]

loc_81202D:
inc	eax
cmp	eax, ebp
mov	[esp+2Ch+var_C], eax
jle	short loc_811FE0
jmp	short loc_812047

loc_812038:
mov	ebx, [esp+2Ch+var_C]
mov	ecx, [esp+2Ch+arg_0]
mov	ebp, [esp+2Ch+var_4]
mov	[ecx+10h], ebx

loc_812047:
cmp	ebp, ebx
jle	short loc_8120B7
mov	eax, ebp
mov	[esp+2Ch+var_C], ebp

loc_812051:
mov	edx, [esp+2Ch+var_14]
cmp	edx, [esp+2Ch+var_18]
jg	short loc_81209D
mov	esi, [esp+2Ch+var_1C]
mov	ebp, [esp+2Ch+var_1C]
mov	edi, [esp+2Ch+var_10]
shl	esi, 5
add	esi, eax
add	esi, esi
mov	edi, edi

loc_812070:
mov	eax, [esp+2Ch+var_8]
mov	eax, [eax+edx*4]
add	eax, esi
cmp	ebp, edi
mov	ecx, ebp
jg	short loc_81208E
nop

loc_812080:
cmp	word ptr [eax],	0
jnz	short loc_8120A8
inc	ecx
add	eax, 40h
cmp	ecx, edi
jle	short loc_812080

loc_81208E:
inc	edx
cmp	edx, [esp+2Ch+var_18]
jle	short loc_812070
mov	ebp, [esp+2Ch+var_4]
mov	eax, [esp+2Ch+var_C]

loc_81209D:
dec	eax
cmp	eax, ebx
mov	[esp+2Ch+var_C], eax
jge	short loc_812051
jmp	short loc_8120B7

loc_8120A8:
mov	ebp, [esp+2Ch+var_C]
mov	ecx, [esp+2Ch+arg_0]
mov	[esp+2Ch+var_4], ebp
mov	[ecx+14h], ebp

loc_8120B7:
mov	esi, [esp+2Ch+var_10]
sub	esi, [esp+2Ch+var_1C]
mov	eax, [esp+2Ch+var_18]
sub	eax, [esp+2Ch+var_14]
mov	edi, ebp
sub	edi, ebx
lea	edx, ds:0[edi*8]
lea	ecx, [esi+esi*2]
add	ecx, ecx
add	ecx, ecx
mov	ebp, edx
imul	ebp, edx
shl	eax, 4
mov	edx, ecx
imul	edx, ecx
mov	ecx, eax
imul	ecx, eax
mov	eax, [esp+2Ch+var_14]
add	ebp, edx
mov	edx, [esp+2Ch+arg_0]
add	ebp, ecx
mov	[edx+18h], ebp
xor	ebp, ebp
cmp	eax, [esp+2Ch+var_18]
mov	[esp+2Ch+var_C], eax
jg	short loc_812177

loc_812106:
mov	eax, [esp+2Ch+var_1C]
cmp	eax, [esp+2Ch+var_10]
jg	short loc_812159
mov	edx, [esp+2Ch+var_8]
mov	ecx, eax
mov	eax, [esp+2Ch+var_C]
mov	edx, [edx+eax*4]
shl	ecx, 5
add	ecx, ebx
lea	eax, [esi+1]
lea	edx, [edx+ecx*2]
mov	[esp+2Ch+var_14], eax
lea	esp, [esp+0]

loc_812130:
cmp	ebx, [esp+2Ch+var_4]
mov	eax, edx
jg	short loc_81214F
lea	ecx, [edi+1]
jmp	short loc_812140
align 10h

loc_812140:
cmp	word ptr [eax],	0
jz	short loc_812147
inc	ebp

loc_812147:
add	eax, 2
sub	ecx, 1
jnz	short loc_812140

loc_81214F:
add	edx, 40h
sub	[esp+2Ch+var_14], 1
jnz	short loc_812130

loc_812159:
mov	eax, [esp+2Ch+var_C]
inc	eax
cmp	eax, [esp+2Ch+var_18]
mov	[esp+2Ch+var_C], eax
jle	short loc_812106
mov	ecx, [esp+2Ch+arg_0]
pop	edi
pop	esi
mov	[ecx+1Ch], ebp
pop	ebp
pop	ebx
add	esp, 1Ch
retn

loc_812177:
pop	edi
pop	esi
mov	[edx+1Ch], ebp
pop	ebp
pop	ebx
add	esp, 1Ch
retn
sub_811DB0 endp

align 10h



sub_812190 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	ecx, [esp+4+arg_C]
mov	eax, [esp+4+arg_8]
cmp	eax, ecx
mov	edx, [esp+4+arg_4]
jge	loc_812302
push	ebx
push	ebp
push	esi
lea	esi, [eax+eax]
mov	[esp+10h+var_4], esi
mov	esi, eax
shl	esi, 5
push	edi
lea	esi, [esi+edx+0Ch]
jmp	short loc_8121C4
jmp	short loc_8121C0
align 10h

loc_8121C0:
mov	edx, [esp+14h+arg_4]

loc_8121C4:
xor	ebx, ebx
cmp	[esp+14h+var_4], ecx
jg	short loc_8121F2
xor	ecx, ecx
test	eax, eax
jle	short loc_812213
add	edx, 1Ch
mov	ebp, eax

loc_8121D7:
mov	edi, [edx]
cmp	edi, ebx
jle	short loc_8121E8
cmp	dword ptr [edx-4], 0
jle	short loc_8121E8
lea	ecx, [edx-1Ch]
mov	ebx, edi

loc_8121E8:
add	edx, 20h
sub	ebp, 1
jnz	short loc_8121D7
jmp	short loc_812213

loc_8121F2:
xor	ecx, ecx
test	eax, eax
jle	short loc_812213
add	edx, 18h
mov	ebp, eax
lea	ecx, [ecx+0]

loc_812200:
mov	edi, [edx]
cmp	edi, ebx
jle	short loc_81220B
lea	ecx, [edx-18h]
mov	ebx, edi

loc_81220B:
add	edx, 20h
sub	ebp, 1
jnz	short loc_812200

loc_812213:
test	ecx, ecx
jz	loc_8122FE
mov	eax, [ecx+4]
mov	[esi-8], eax
mov	edx, [ecx+0Ch]
mov	[esi], edx
mov	eax, [ecx+14h]
mov	[esi+8], eax
mov	edx, [ecx]
mov	[esi-0Ch], edx
mov	eax, [ecx+8]
mov	[esi-4], eax
mov	edx, [ecx+10h]
mov	[esi+4], edx
mov	edx, [ecx]
mov	eax, [ecx+4]
mov	edi, [ecx+14h]
mov	ebp, [ecx+8]
lea	ebx, [esi-0Ch]
sub	eax, edx
mov	edx, [ecx+10h]
sub	edi, edx
mov	edx, [ecx+0Ch]
sub	edx, ebp
add	edi, edi
lea	edx, [edx+edx*2]
add	edx, edx
add	edi, edi
shl	eax, 4
add	edx, edx
add	edi, edi
cmp	eax, edx
mov	ebp, 1
jle	short loc_812274
mov	edx, eax
xor	ebp, ebp

loc_812274:
cmp	edi, edx
jle	short loc_81227D
mov	ebp, 2

loc_81227D:
sub	ebp, 0
jz	short loc_8122B8
sub	ebp, 1
jz	short loc_8122A2
sub	ebp, 1
jnz	short loc_8122CA
mov	eax, [ecx+14h]
mov	edx, [ecx+10h]
add	eax, edx
cdq
sub	eax, edx
sar	eax, 1
mov	[ecx+14h], eax
inc	eax
mov	[esi+4], eax
jmp	short loc_8122CA

loc_8122A2:
mov	eax, [ecx+0Ch]
mov	edx, [ecx+8]
add	eax, edx
cdq
sub	eax, edx
sar	eax, 1
mov	[ecx+0Ch], eax
inc	eax
mov	[esi-4], eax
jmp	short loc_8122CA

loc_8122B8:
mov	eax, [ecx+4]
mov	edx, [ecx]
add	eax, edx
cdq
sub	eax, edx
sar	eax, 1
mov	[ecx+4], eax
inc	eax
mov	[ebx], eax

loc_8122CA:
mov	edi, [esp+14h+arg_0]
push	ecx
mov	ecx, edi
call	sub_811DB0
push	ebx
mov	ecx, edi
call	sub_811DB0
mov	eax, [esp+1Ch+arg_8]
mov	ecx, [esp+1Ch+arg_C]
add	[esp+1Ch+var_4], 2
inc	eax
add	esp, 8
add	esi, 20h
cmp	eax, ecx
mov	[esp+14h+arg_8], eax
jl	loc_8121C0

loc_8122FE:
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_812302:
pop	ecx
retn
sub_812190 endp

align 10h



sub_812310 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 38h
push	ebx
mov	ebx, [eax+0Ch]
push	ebp
mov	ebp, [eax+14h]
push	esi
mov	esi, [esp+44h+arg_0]
mov	ecx, [esi+1A8h]
mov	edx, [ecx+18h]
mov	ecx, [eax+8]
mov	[esp+44h+var_14], edx
mov	edx, [eax+4]
mov	[esp+44h+var_28], ebx
mov	ebx, [eax+10h]
mov	eax, [eax]
push	edi
xor	edi, edi
cmp	eax, edx
mov	[esp+48h+var_34], edi
mov	[esp+48h+var_30], edi
mov	[esp+48h+var_2C], edi
mov	[esp+48h+var_4], edx
mov	[esp+48h+var_8], ecx
mov	[esp+48h+var_10], ebx
mov	[esp+48h+var_24], ebp
mov	[esp+48h+var_18], eax
jg	loc_81243B
lea	ebp, ds:4[eax*8]
mov	[esp+48h+var_38], ebp

loc_812372:
cmp	ecx, [esp+48h+var_28]
jg	loc_812429
mov	ebp, [esp+48h+var_14]
mov	eax, [ebp+eax*4+0]
mov	edx, ecx
shl	edx, 5
add	edx, ebx
lea	ebp, [eax+edx*2]
mov	eax, [esp+48h+var_28]
mov	edx, [esp+48h+var_24]
sub	eax, ecx
inc	eax
lea	esi, ds:2[ecx*4]
mov	[esp+48h+var_20], ebp
mov	[esp+48h+var_1C], eax

loc_8123A8:
cmp	ebx, edx
jg	short loc_812406
sub	edx, ebx
lea	ecx, ds:4[ebx*8]
inc	edx
jmp	short loc_8123C0
align 10h

loc_8123C0:
movzx	eax, word ptr [ebp+0]
add	ebp, 2
mov	[esp+48h+var_C], ebp
test	eax, eax
jz	short loc_8123F2
mov	ebx, [esp+48h+var_38]
imul	ebx, eax
add	[esp+48h+var_34], ebx
mov	ebx, esi
imul	ebx, eax
add	[esp+48h+var_30], ebx
mov	ebx, ecx
imul	ebx, eax
add	edi, eax
add	[esp+48h+var_2C], ebx
mov	ebx, [esp+48h+var_10]

loc_8123F2:
add	ecx, 8
sub	edx, 1
jnz	short loc_8123C0
mov	ecx, [esp+48h+var_8]
mov	edx, [esp+48h+var_24]
mov	eax, [esp+48h+var_1C]

loc_812406:
mov	ebp, [esp+48h+var_20]
add	ebp, 40h
add	esi, 4
sub	eax, 1
mov	[esp+48h+var_20], ebp
mov	[esp+48h+var_1C], eax
jnz	short loc_8123A8
mov	esi, [esp+48h+arg_0]
mov	edx, [esp+48h+var_4]
mov	eax, [esp+48h+var_18]

loc_812429:
add	[esp+48h+var_38], 8
inc	eax
cmp	eax, edx
mov	[esp+48h+var_18], eax
jle	loc_812372

loc_81243B:
mov	edx, [esp+48h+var_34]
mov	ecx, edi
sar	ecx, 1
lea	eax, [ecx+edx]
cdq
idiv	edi
mov	edx, [esi+74h]
mov	edx, [edx]
mov	ebx, [esp+48h+arg_4]
mov	[ebx+edx], al
mov	eax, [esp+48h+var_30]
add	eax, ecx
cdq
idiv	edi
mov	edx, [esi+74h]
mov	edx, [edx+4]
mov	[ebx+edx], al
mov	eax, [esp+48h+var_2C]
add	eax, ecx
cdq
idiv	edi
mov	ecx, [esi+74h]
mov	edx, [ecx+8]
pop	edi
pop	esi
pop	ebp
mov	[ebx+edx], al
pop	ebx
add	esp, 38h
retn
sub_812310 endp

align 10h



sub_812490 proc	near

arg_0= dword ptr  4

mov	eax, [edi+4]
mov	edx, [eax]
push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
mov	ecx, ebp
shl	ecx, 5
push	ecx
push	1
push	edi
call	edx
mov	esi, eax
xor	ebx, ebx
mov	eax, 1Fh
push	esi
mov	ecx, edi
mov	[esi], ebx
mov	[esi+4], eax
mov	[esi+8], ebx
mov	dword ptr [esi+0Ch], 3Fh
mov	[esi+10h], ebx
mov	[esi+14h], eax
call	sub_811DB0
push	ebp
push	1
push	esi
push	edi
call	sub_812190
mov	ebp, eax
add	esp, 20h
cmp	ebp, ebx
jle	short loc_8124F4

loc_8124E0:
push	ebx
push	edi
mov	eax, esi
call	sub_812310
inc	ebx
add	esp, 8
add	esi, 20h
cmp	ebx, ebp
jl	short loc_8124E0

loc_8124F4:
mov	eax, [edi]
mov	[edi+70h], ebp
mov	dword ptr [eax+14h], 60h
mov	ecx, [edi]
mov	[ecx+18h], ebp
mov	edx, [edi]
mov	eax, [edx+4]
push	1
push	edi
call	eax
add	esp, 8
pop	esi
pop	ebp
pop	ebx
retn
sub_812490 endp

align 10h



sub_812520 proc	near

var_428= dword ptr -428h
var_424= dword ptr -424h
var_420= dword ptr -420h
var_41C= dword ptr -41Ch
var_418= dword ptr -418h
var_414= dword ptr -414h
var_410= dword ptr -410h
var_40C= dword ptr -40Ch
var_408= dword ptr -408h
var_404= dword ptr -404h
var_400= dword ptr -400h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 428h
push	ebx
push	ebp
mov	ebp, [esp+430h+arg_4]
push	esi
mov	esi, [eax+70h]
push	edi
mov	edi, ecx
mov	ecx, [esp+438h+arg_0]
lea	edx, [ecx+ecx+18h]
sar	edx, 1
mov	[esp+438h+var_40C], edx
lea	ebx, [edi+1Ch]
lea	edx, [ebx+edi]
sar	edx, 1
mov	[esp+438h+var_420], edx
lea	edx, [ebp+ebp+18h]
sar	edx, 1
mov	[esp+438h+var_408], esi
mov	[esp+438h+var_410], edx
mov	[esp+438h+var_424], 7FFFFFFFh
mov	[esp+438h+var_428], 0
test	esi, esi
jle	loc_8126B5
mov	eax, [eax+74h]
mov	edx, [eax]
mov	[esp+438h+var_404], edx
mov	edx, [eax+4]
mov	eax, [eax+8]
mov	[esp+438h+var_414], edx
mov	[esp+438h+var_41C], eax

loc_812590:
mov	edx, [esp+438h+var_404]
mov	eax, [esp+438h+var_428]
movzx	eax, byte ptr [edx+eax]
cmp	eax, ecx
jge	short loc_8125DC
mov	edx, eax
sub	edx, ecx
add	edx, edx
imul	edx, edx
add	ecx, 18h

loc_8125AC:
sub	eax, ecx

loc_8125AE:
mov	ecx, [esp+438h+var_428]
mov	esi, [esp+438h+var_414]
movzx	ecx, byte ptr [esi+ecx]
add	eax, eax
imul	eax, eax
cmp	ecx, edi
jge	short loc_8125FA
mov	esi, ecx
sub	esi, edi
lea	esi, [esi+esi*2]
mov	ebp, esi
imul	ebp, esi
add	edx, ebp
mov	ebp, [esp+438h+arg_4]
sub	ecx, ebx
jmp	short loc_812615

loc_8125DC:
lea	esi, [ecx+18h]
cmp	eax, esi
jle	short loc_8125EE
mov	edx, eax
sub	edx, esi
add	edx, edx
imul	edx, edx
jmp	short loc_8125AC

loc_8125EE:
xor	edx, edx
cmp	eax, [esp+438h+var_40C]
jg	short loc_8125AC
sub	eax, esi
jmp	short loc_8125AE

loc_8125FA:
cmp	ecx, ebx
jle	short loc_812648
mov	esi, ecx
sub	esi, ebx
lea	esi, [esi+esi*2]
mov	ebp, esi
imul	ebp, esi
add	edx, ebp
mov	ebp, [esp+438h+arg_4]

loc_812613:
sub	ecx, edi

loc_812615:
lea	ecx, [ecx+ecx*2]
mov	esi, ecx
imul	esi, ecx
mov	ecx, [esp+438h+var_41C]
add	eax, esi
mov	esi, [esp+438h+var_428]
movzx	ecx, byte ptr [ecx+esi]
cmp	ecx, ebp
jge	short loc_812652
mov	esi, ecx
sub	esi, ebp
mov	ebp, esi
imul	ebp, esi
add	edx, ebp
mov	ebp, [esp+438h+arg_4]
lea	esi, [ebp+18h]
sub	ecx, esi
jmp	short loc_812673

loc_812648:
cmp	ecx, [esp+438h+var_420]
jg	short loc_812613
sub	ecx, ebx
jmp	short loc_812615

loc_812652:
lea	esi, [ebp+18h]
cmp	ecx, esi
mov	[esp+438h+var_418], esi
jle	short loc_8126AB
mov	esi, ecx
sub	esi, [esp+438h+var_418]
mov	ebp, esi
imul	ebp, esi
add	edx, ebp
mov	ebp, [esp+438h+arg_4]

loc_812671:
sub	ecx, ebp

loc_812673:
mov	esi, ecx
imul	esi, ecx
mov	ecx, [esp+438h+arg_0]
add	eax, esi
mov	esi, [esp+438h+var_428]
mov	[esp+esi*4+438h+var_400], edx
mov	edx, [esp+438h+var_424]
cmp	eax, edx
jge	short loc_812697
mov	edx, eax
mov	[esp+438h+var_424], edx

loc_812697:
inc	[esp+438h+var_428]
mov	esi, [esp+438h+var_408]
cmp	[esp+438h+var_428], esi
jl	loc_812590
jmp	short loc_8126B9

loc_8126AB:
cmp	ecx, [esp+438h+var_410]
jg	short loc_812671
sub	ecx, esi
jmp	short loc_812673

loc_8126B5:
mov	edx, [esp+438h+var_424]

loc_8126B9:
xor	eax, eax
xor	ecx, ecx
test	esi, esi
jle	short loc_8126D7

loc_8126C1:
cmp	[esp+ecx*4+438h+var_400], edx
jg	short loc_8126D2
mov	edi, [esp+438h+arg_8]
mov	[eax+edi], cl
inc	eax

loc_8126D2:
inc	ecx
cmp	ecx, esi
jl	short loc_8126C1

loc_8126D7:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 428h
retn
sub_812520 endp

align 10h



sub_8126F0 proc	near

var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= dword ptr -210h
var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= dword ptr -204h
var_200= byte ptr -200h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 21Ch
push	edi
mov	eax, 7FFFFFFFh
mov	ecx, 80h
lea	edi, [esp+220h+var_200]
rep stosd
xor	eax, eax
cmp	[esp+220h+arg_10], eax
mov	[esp+220h+var_210], eax
jle	loc_812859
push	ebx
push	ebp
push	esi
lea	ecx, [ecx+0]

loc_812720:
mov	ecx, [esp+22Ch+arg_14]
movzx	ebx, byte ptr [eax+ecx]
mov	edx, [esp+22Ch+arg_0]
mov	esi, [edx+74h]
mov	eax, [esi]
movzx	ecx, byte ptr [ebx+eax]
mov	edx, [esi+4]
movzx	edx, byte ptr [edx+ebx]
mov	eax, [esp+22Ch+arg_4]
sub	eax, ecx
mov	ecx, [esp+22Ch+arg_8]
sub	ecx, edx
lea	edx, [ecx+ecx*2]
mov	ecx, [esi+8]
movzx	esi, byte ptr [ecx+ebx]
mov	ecx, [esp+22Ch+arg_C]
sub	ecx, esi
mov	esi, ecx
imul	esi, ecx
mov	edi, edx
imul	edi, edx
add	esi, edi
add	eax, eax
mov	edi, eax
imul	edi, eax
lea	ebp, [edx+edx*2+12h]
mov	edx, [esp+22Ch+arg_18]
add	ebp, ebp
add	esi, edi
add	ebp, ebp
lea	edi, [ecx+4]
add	ebp, ebp
add	eax, 8
shl	edi, 4
shl	eax, 5
mov	[esp+22Ch+var_204], ebp
lea	ecx, [esp+22Ch+var_200]
mov	[esp+22Ch+var_21C], eax
mov	[esp+22Ch+var_218], 3
jmp	short loc_8127B4
align 10h

loc_8127B0:
mov	ebp, [esp+22Ch+var_204]

loc_8127B4:
mov	eax, esi
mov	[esp+22Ch+var_20C], eax
mov	[esp+22Ch+var_214], ebp
mov	[esp+22Ch+var_208], 7

loc_8127C6:
cmp	eax, [ecx]
jge	short loc_8127CE
mov	[ecx], eax
mov	[edx], bl

loc_8127CE:
add	eax, edi
cmp	eax, [ecx+4]
jge	short loc_8127DB
mov	[ecx+4], eax
mov	[edx+1], bl

loc_8127DB:
lea	ebp, [edi+80h]
add	eax, ebp
cmp	eax, [ecx+8]
jge	short loc_8127EE
mov	[ecx+8], eax
mov	[edx+2], bl

loc_8127EE:
lea	ebp, [edi+100h]
add	eax, ebp
cmp	eax, [ecx+0Ch]
jge	short loc_812801
mov	[ecx+0Ch], eax
mov	[edx+3], bl

loc_812801:
mov	ebp, [esp+22Ch+var_214]
mov	eax, [esp+22Ch+var_20C]
add	eax, ebp
add	ebp, 120h
add	ecx, 10h
add	edx, 4
sub	[esp+22Ch+var_208], 1
mov	[esp+22Ch+var_20C], eax
mov	[esp+22Ch+var_214], ebp
jns	short loc_8127C6
mov	eax, [esp+22Ch+var_21C]
add	esi, eax
add	eax, 200h
sub	[esp+22Ch+var_218], 1
mov	[esp+22Ch+var_21C], eax
jns	loc_8127B0
mov	eax, [esp+22Ch+var_210]
inc	eax
cmp	eax, [esp+22Ch+arg_10]
mov	[esp+22Ch+var_210], eax
jl	loc_812720
pop	esi
pop	ebp
pop	ebx

loc_812859:
pop	edi
add	esp, 21Ch
retn
sub_8126F0 endp

align 10h



sub_812870 proc	near

var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= byte ptr -180h
var_100= byte ptr -100h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 188h
push	ebx
push	ebp
mov	ebp, [esp+190h+arg_8]
push	esi
push	edi
mov	edi, [esp+198h+arg_4]
mov	esi, eax
mov	eax, [esp+198h+arg_0]
mov	ecx, [eax+1A8h]
mov	edx, [ecx+18h]
sar	ebp, 2
sar	edi, 2
sar	esi, 3
mov	[esp+198h+arg_8], ebp
lea	ecx, [esp+198h+var_100]
push	ecx
mov	[esp+19Ch+arg_4], edi
mov	ebx, esi
shl	ebp, 5
shl	edi, 5
shl	ebx, 5
add	ebp, 4
add	edi, 4
add	ebx, 2
push	ebp
push	edi
mov	ecx, ebx
mov	[esp+1A4h+var_184], edx
call	sub_812520
lea	edx, [esp+1A4h+var_180]
push	edx
mov	edx, [esp+1A8h+arg_0]
lea	ecx, [esp+1A8h+var_100]
push	ecx
push	eax
push	ebp
push	ebx
push	edi
push	edx
call	sub_8126F0
mov	eax, [esp+1C0h+arg_8]
mov	edx, [esp+1C0h+arg_4]
add	esi, esi
add	esi, esi
add	esi, esi
add	eax, eax
add	eax, eax
shl	esi, 5
add	edx, edx
add	esi, eax
mov	eax, [esp+1C0h+var_184]
add	edx, edx
add	esp, 28h
add	esi, esi
lea	ecx, [esp+198h+var_180]
mov	[esp+198h+var_188], esi
lea	edi, [eax+edx*4]
mov	ebp, 4

loc_812932:
mov	edx, [esp+198h+var_188]
mov	ebx, 8
jmp	short loc_812940
align 10h

loc_812940:
mov	eax, [edi]
movzx	esi, byte ptr [ecx]
inc	si
add	eax, edx
mov	[eax], si
movzx	esi, byte ptr [ecx+1]
inc	si
mov	[eax+2], si
movzx	esi, byte ptr [ecx+2]
inc	si
mov	[eax+4], si
movzx	esi, byte ptr [ecx+3]
inc	si
add	ecx, 4
add	edx, 40h
sub	ebx, 1
mov	[eax+6], si
jnz	short loc_812940
add	edi, 4
sub	ebp, 1
jnz	short loc_812932
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 188h
retn
sub_812870 endp

align 10h



sub_812990 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 14h
mov	eax, [esp+14h+arg_0]
mov	ecx, [eax+1A8h]
mov	edx, [ecx+18h]
mov	ecx, [eax+5Ch]
push	esi
mov	esi, [esp+18h+arg_C]
mov	[esp+18h+var_C], edx
mov	[esp+18h+var_8], ecx
test	esi, esi
jle	loc_812A4A
mov	eax, [esp+18h+arg_8]
mov	edx, [esp+18h+arg_4]
push	ebx
sub	edx, eax
push	ebp
mov	[esp+20h+var_14], eax
mov	[esp+20h+var_4], edx
mov	[esp+20h+var_10], esi
push	edi

loc_8129D1:
mov	esi, [edx+eax]
mov	ebx, [eax]
mov	[esp+24h+arg_C], ecx
test	ecx, ecx
jbe	short loc_812A39
mov	edi, edi

loc_8129E0:
movzx	ecx, byte ptr [esi]
movzx	eax, byte ptr [esi+1]
mov	ebp, [esp+24h+var_C]
inc	esi
movzx	edx, byte ptr [esi+1]
inc	esi
shr	eax, 2
mov	edi, eax
shl	edi, 5
shr	ecx, 3
mov	ebp, [ebp+ecx*4+0]
shr	edx, 3
add	edi, edx
lea	edi, [ebp+edi*2+0]
inc	esi
cmp	word ptr [edi],	0
jnz	short loc_812A1F
push	edx
push	ecx
mov	ecx, [esp+2Ch+arg_0]
push	ecx
call	sub_812870
add	esp, 0Ch

loc_812A1F:
mov	dl, [edi]
dec	dl
mov	[ebx], dl
inc	ebx
sub	[esp+24h+arg_C], 1
jnz	short loc_8129E0
mov	ecx, [esp+24h+var_8]
mov	eax, [esp+24h+var_14]
mov	edx, [esp+24h+var_4]

loc_812A39:
add	eax, 4
sub	[esp+24h+var_10], 1
mov	[esp+24h+var_14], eax
jnz	short loc_8129D1
pop	edi
pop	ebp
pop	ebx

loc_812A4A:
pop	esi
add	esp, 14h
retn
sub_812990 endp

align 10h



sub_812A50 proc	near

var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 60h
mov	eax, [esp+60h+arg_0]
mov	edx, [eax+5Ch]
push	esi
mov	esi, [eax+1A8h]
mov	ecx, [esi+18h]
mov	[esp+64h+var_1C], ecx
mov	ecx, [eax+120h]
mov	eax, [eax+74h]
push	edi
mov	edi, [eax]
mov	[esp+68h+var_C], edi
mov	edi, [eax+4]
mov	eax, [eax+8]
mov	[esp+68h+var_8], edi
mov	[esp+68h+var_4], eax
mov	eax, [esp+68h+arg_C]
mov	[esp+68h+var_58], ecx
mov	ecx, [esi+28h]
xor	edi, edi
cmp	eax, edi
mov	[esp+68h+var_28], esi
mov	[esp+68h+var_30], edx
mov	[esp+68h+var_2C], ecx
jle	loc_812D06
push	ebx
mov	ebx, [esp+6Ch+arg_8]
push	ebp
mov	ebp, [esp+70h+arg_4]
sub	ebp, ebx
mov	[esp+70h+var_48], ebx
mov	[esp+70h+var_20], ebp
mov	[esp+70h+var_24], eax
jmp	short loc_812AC5

loc_812AC1:
mov	ebp, [esp+70h+var_20]

loc_812AC5:
cmp	byte ptr [esi+24h], 0
mov	ebx, [esp+70h+var_48]
mov	eax, [ebx+ebp]
mov	ebx, [ebx]
mov	[esp+70h+var_60], eax
mov	[esp+70h+var_5C], ebx
jz	short loc_812B15
add	eax, edx
lea	eax, [eax+edx*2-3]
mov	[esp+70h+var_60], eax
lea	eax, [ebx+edx-1]
mov	[esp+70h+var_5C], eax
mov	eax, [esi+20h]
lea	edx, [edx+edx*2+3]
lea	ebx, [eax+edx*2]
mov	eax, [esp+70h+var_60]
mov	[esp+70h+var_38], 0FFFFFFFFh
mov	[esp+70h+arg_C], 0FFFFFFFDh
mov	byte ptr [esi+24h], 0
jmp	short loc_812B2F

loc_812B15:
mov	ebx, [esi+20h]
mov	[esp+70h+var_38], 1
mov	[esp+70h+arg_C], 3
mov	byte ptr [esi+24h], 1

loc_812B2F:
mov	edx, [esp+70h+var_30]
xor	esi, esi
xor	ebp, ebp
mov	[esp+70h+var_3C], edi
mov	[esp+70h+var_40], edi
mov	[esp+70h+var_44], edi
mov	[esp+70h+var_4C], esi
mov	[esp+70h+var_50], esi
mov	[esp+70h+var_54], esi
mov	[esp+70h+var_34], edx
test	edx, edx
jbe	loc_812CD4
jmp	short loc_812B64
align 10h

loc_812B60:
mov	eax, [esp+70h+var_60]

loc_812B64:
mov	edx, [esp+70h+arg_C]
movsx	edx, word ptr [ebx+edx*2]
lea	edx, [edx+esi+8]
movzx	esi, byte ptr [eax]
sar	edx, 4
mov	edx, [ecx+edx*4]
add	edx, esi
mov	esi, [esp+70h+var_58]
movzx	esi, byte ptr [edx+esi]
mov	edx, [esp+70h+arg_C]
movsx	edx, word ptr [ebx+edx*2+2]
lea	edx, [edx+edi+8]
movzx	edi, byte ptr [eax+1]
movzx	eax, byte ptr [eax+2]
sar	edx, 4
mov	edx, [ecx+edx*4]
add	edx, edi
mov	edi, [esp+70h+var_58]
movzx	edi, byte ptr [edx+edi]
mov	edx, [esp+70h+arg_C]
movsx	edx, word ptr [ebx+edx*2+4]
lea	edx, [edx+ebp+8]
sar	edx, 4
mov	ecx, [ecx+edx*4]
mov	edx, [esp+70h+var_58]
add	ecx, eax
movzx	ebp, byte ptr [ecx+edx]
mov	ecx, edi
sar	ecx, 2
mov	[esp+70h+var_14], ecx
mov	edx, ebp
sar	edx, 3
shl	ecx, 5
add	ecx, edx
mov	[esp+70h+var_18], edx
mov	edx, [esp+70h+var_1C]
mov	eax, esi
sar	eax, 3
mov	edx, [edx+eax*4]
cmp	word ptr [edx+ecx*2], 0
lea	ecx, [edx+ecx*2]
mov	[esp+70h+var_10], ecx
jnz	short loc_812C1A
mov	ecx, [esp+70h+var_18]
mov	edx, [esp+70h+arg_0]
push	ecx
push	eax
mov	eax, [esp+78h+var_14]
push	edx
call	sub_812870
mov	ecx, [esp+7Ch+var_10]
add	esp, 0Ch

loc_812C1A:
movzx	eax, word ptr [ecx]
mov	ecx, [esp+70h+var_5C]
mov	edx, [esp+70h+var_C]
dec	eax
mov	[ecx], al
movzx	ecx, byte ptr [eax+edx]
mov	edx, [esp+70h+var_8]
sub	esi, ecx
movzx	ecx, byte ptr [eax+edx]
mov	edx, [esp+70h+var_4]
movzx	eax, byte ptr [eax+edx]
mov	edx, [esp+70h+var_54]
sub	edi, ecx
sub	ebp, eax
mov	ecx, esi
lea	eax, [esi+esi]
add	esi, eax
add	edx, esi
mov	[ebx], dx
mov	edx, [esp+70h+var_44]
add	esi, eax
add	edx, esi
mov	[esp+70h+var_54], edx
mov	edx, [esp+70h+var_50]
add	esi, eax
mov	[esp+70h+var_44], ecx
mov	ecx, edi
lea	eax, [edi+edi]
add	edi, eax
add	edx, edi
mov	[ebx+2], dx
mov	edx, [esp+70h+var_40]
add	edi, eax
add	edx, edi
add	edi, eax
lea	eax, [ebp+ebp+0]
mov	[esp+70h+var_50], edx
mov	edx, [esp+70h+var_4C]
mov	[esp+70h+var_40], ecx
mov	ecx, ebp
add	ebp, eax
add	edx, ebp
mov	[ebx+4], dx
mov	edx, [esp+70h+var_3C]
add	ebp, eax
add	edx, ebp
mov	[esp+70h+var_3C], ecx
mov	ecx, [esp+70h+var_38]
add	[esp+70h+var_5C], ecx
mov	ecx, [esp+70h+var_2C]
add	ebp, eax
mov	eax, [esp+70h+arg_C]
add	[esp+70h+var_60], eax
sub	[esp+70h+var_34], 1
mov	[esp+70h+var_4C], edx
lea	ebx, [ebx+eax*2]
jnz	loc_812B60
mov	edx, [esp+70h+var_30]

loc_812CD4:
movzx	eax, word ptr [esp+70h+var_54]
add	[esp+70h+var_48], 4
mov	esi, [esp+70h+var_28]
mov	[ebx], ax
movzx	eax, word ptr [esp+70h+var_50]
mov	[ebx+2], ax
movzx	eax, word ptr [esp+70h+var_4C]
xor	edi, edi
sub	[esp+70h+var_24], 1
mov	[ebx+4], ax
jnz	loc_812AC1
pop	ebp
pop	ebx

loc_812D06:
pop	edi
pop	esi
add	esp, 60h
retn
sub_812A50 endp

align 10h



sub_812D10 proc	near
mov	ecx, [eax+4]
mov	edx, [ecx]
push	esi
mov	esi, [eax+1A8h]
push	edi
push	7FCh
push	1
push	eax
call	edx
add	eax, 3FCh
add	esp, 0Ch
mov	[esi+28h], eax
xor	edx, edx
xor	ecx, ecx
xor	edi, edi
mov	esi, eax
lea	ebx, [ebx+0]

loc_812D40:
mov	[eax+ecx*4], edx
mov	[esi], edi
inc	ecx
sub	esi, 4
inc	edx
dec	edi
cmp	ecx, 10h
jl	short loc_812D40
cmp	ecx, 30h
jge	short loc_812D7D
lea	esi, ds:0[ecx*4]
mov	edi, esi
mov	esi, eax
sub	esi, edi

loc_812D62:
mov	edi, edx
neg	edi
mov	[eax+ecx*4], edx
mov	[esi], edi
inc	ecx
mov	edi, ecx
not	edi
and	edi, 1
sub	esi, 4
add	edx, edi
cmp	ecx, 30h
jl	short loc_812D62

loc_812D7D:
cmp	ecx, 0FFh
jg	short loc_812DA9
lea	esi, ds:0[ecx*4]
push	ebx
mov	ebx, esi
mov	edi, edx
mov	esi, eax
neg	edi
sub	esi, ebx
pop	ebx

loc_812D98:
mov	[eax+ecx*4], edx
mov	[esi], edi
inc	ecx
sub	esi, 4
cmp	ecx, 0FFh
jle	short loc_812D98

loc_812DA9:
pop	edi
pop	esi
retn
sub_812D10 endp

align 10h



sub_812DB0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+1A8h]
mov	eax, [esi+10h]
mov	[edi+74h], eax
mov	ecx, [esi+14h]
push	ecx
call	sub_812490
add	esp, 4
pop	edi
mov	byte ptr [esi+1Ch], 1
pop	esi
retn
sub_812DB0 endp

align 10h



sub_812DE0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, [esp+4+arg_0]
cmp	dword ptr [esi+4Ch], 0
push	edi
mov	edi, [esi+1A8h]
mov	eax, [edi+18h]
mov	[esp+8+arg_0], eax
jz	short loc_812E00
mov	dword ptr [esi+4Ch], 2

loc_812E00:
cmp	[esp+8+arg_4], 0
jz	short loc_812E1E
mov	dword ptr [edi+4], offset sub_811D30
mov	dword ptr [edi+8], offset sub_812DB0
mov	byte ptr [edi+1Ch], 1
jmp	loc_812ECC

loc_812E1E:
cmp	dword ptr [esi+4Ch], 2
jnz	short loc_812E2D
mov	dword ptr [edi+4], offset sub_812A50
jmp	short loc_812E34

loc_812E2D:
mov	dword ptr [edi+4], offset sub_812990

loc_812E34:
push	ebp
mov	dword ptr [edi+8], offset nullsub_2
mov	ebp, [esi+70h]
cmp	ebp, 1
jge	short loc_812E60
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 38h
mov	edx, [esi]
mov	dword ptr [edx+18h], 1
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_812E60:
cmp	ebp, 100h
jle	short loc_812E84
mov	edx, [esi]
mov	dword ptr [edx+14h], 39h
mov	eax, [esi]
mov	dword ptr [eax+18h], 100h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_812E84:
cmp	dword ptr [esi+4Ch], 2
jnz	short loc_812ECB
mov	eax, [esi+5Ch]
add	eax, 2
lea	ebp, [eax+eax*2]
add	ebp, ebp
cmp	dword ptr [edi+20h], 0
jnz	short loc_812EAD
mov	eax, [esi+4]
mov	ecx, [eax+4]
push	ebp
push	1
push	esi
call	ecx
add	esp, 0Ch
mov	[edi+20h], eax

loc_812EAD:
mov	edx, [edi+20h]
push	ebp		; size_t
push	edx		; void *
call	sub_809960
add	esp, 8
cmp	dword ptr [edi+28h], 0
jnz	short loc_812EC7
mov	eax, esi
call	sub_812D10

loc_812EC7:
mov	byte ptr [edi+24h], 0

loc_812ECB:
pop	ebp

loc_812ECC:
cmp	byte ptr [edi+1Ch], 0
jz	short loc_812EF3
xor	esi, esi

loc_812ED4:
mov	eax, [esp+8+arg_0]
mov	ecx, [eax+esi*4]
push	1000h		; size_t
push	ecx		; void *
call	sub_809960
inc	esi
add	esp, 8
cmp	esi, 20h
jl	short loc_812ED4
mov	byte ptr [edi+1Ch], 0

loc_812EF3:
pop	edi
pop	esi
retn
sub_812DE0 endp

align 10h



sub_812F00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+1A8h]
mov	byte ptr [ecx+1Ch], 1
retn
sub_812F00 endp

align 10h



sub_812F10 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	edi
push	2Ch
push	1
push	esi
call	ecx
mov	edi, eax
mov	[esi+1A8h], edi
add	esp, 0Ch
mov	dword ptr [edi], offset	sub_812DE0
mov	dword ptr [edi+0Ch], offset sub_812F00
mov	dword ptr [edi+20h], 0
mov	dword ptr [edi+28h], 0
cmp	dword ptr [esi+64h], 3
jz	short loc_812F61
mov	edx, [esi]
mov	dword ptr [edx+14h], 2Fh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_812F61:
mov	edx, [esi+4]
mov	eax, [edx]
push	ebp
push	80h
push	1
push	esi
call	eax
add	esp, 0Ch
mov	[edi+18h], eax
xor	ebp, ebp
lea	esp, [esp+0]

loc_812F80:
mov	ecx, [esi+4]
mov	edx, [ecx+4]
push	1000h
push	1
push	esi
call	edx
mov	ecx, [edi+18h]
mov	[ecx+ebp], eax
add	ebp, 4
add	esp, 0Ch
cmp	ebp, 80h
jl	short loc_812F80
mov	byte ptr [edi+1Ch], 1
cmp	byte ptr [esi+5Ah], 0
jz	short loc_81300F
mov	ebp, [esi+54h]
cmp	ebp, 8
jge	short loc_812FD2
mov	edx, [esi]
mov	dword ptr [edx+14h], 38h
mov	eax, [esi]
mov	dword ptr [eax+18h], 8
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_812FD2:
cmp	ebp, 100h
jle	short loc_812FF6
mov	eax, [esi]
mov	dword ptr [eax+14h], 39h
mov	ecx, [esi]
mov	dword ptr [ecx+18h], 100h
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_812FF6:
mov	ecx, [esi+4]
mov	edx, [ecx+8]
push	3
push	ebp
push	1
push	esi
call	edx
add	esp, 10h
mov	[edi+10h], eax
mov	[edi+14h], ebp
jmp	short loc_813016

loc_81300F:
mov	dword ptr [edi+10h], 0

loc_813016:
cmp	dword ptr [esi+4Ch], 0
mov	ecx, 2
pop	ebp
jz	short loc_813025
mov	[esi+4Ch], ecx

loc_813025:
cmp	[esi+4Ch], ecx
jnz	short loc_81304F
mov	eax, [esi+5Ch]
mov	edx, [esi+4]
add	eax, ecx
mov	ecx, [edx+4]
lea	eax, [eax+eax*2]
add	eax, eax
push	eax
push	1
push	esi
call	ecx
add	esp, 0Ch
mov	[edi+20h], eax
pop	edi
mov	eax, esi
pop	esi
jmp	sub_812D10

loc_81304F:
pop	edi
pop	esi
retn
sub_812F10 endp

align 10h



sub_813060 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
mov	esi, [edi+64h]
mov	edx, [edi+54h]
mov	[esp+1Ch+var_8], esi
mov	[esp+1Ch+var_4], edx
mov	ebp, 1
mov	edi, edi

loc_813080:
inc	ebp
cmp	esi, 1
mov	eax, ebp
jle	short loc_813098
lea	ecx, [esi-1]
jmp	short loc_813090
align 10h

loc_813090:
imul	eax, ebp
sub	ecx, 1
jnz	short loc_813090

loc_813098:
cmp	eax, edx
jle	short loc_813080
dec	ebp
cmp	ebp, 2
jge	short loc_8130BA
mov	ecx, [edi]
mov	dword ptr [ecx+14h], 38h
mov	edx, [edi]
mov	[edx+18h], eax
mov	eax, [edi]
mov	ecx, [eax]
push	edi
call	ecx
add	esp, 4

loc_8130BA:
mov	ebx, 1
test	esi, esi
jle	short loc_8130E4
mov	edi, [esp+1Ch+arg_4]
mov	ecx, esi
mov	eax, ebp
mov	edx, esi
rep stosd
nop

loc_8130D0:
imul	ebx, ebp
sub	edx, 1
jnz	short loc_8130D0
jmp	short loc_8130E4
align 10h

loc_8130E0:
mov	esi, [esp+1Ch+var_8]

loc_8130E4:
xor	ebp, ebp
mov	[esp+1Ch+var_9], 0
test	esi, esi
jle	short loc_81313B
nop

loc_8130F0:
mov	edx, [esp+1Ch+arg_0]
cmp	dword ptr [edx+2Ch], 2
jnz	short loc_813103
mov	edi, ds:dword_14661D0[ebp*4]
jmp	short loc_813105

loc_813103:
mov	edi, ebp

loc_813105:
mov	eax, [esp+1Ch+arg_4]
mov	esi, [eax+edi*4]
mov	eax, ebx
cdq
idiv	esi
lea	ecx, [esi+1]
imul	eax, ecx
cmp	eax, [esp+1Ch+var_4]
jg	short loc_813134
mov	edx, [esp+1Ch+arg_4]
inc	ebp
cmp	ebp, [esp+1Ch+var_8]
mov	[edx+edi*4], ecx
mov	ebx, eax
mov	[esp+1Ch+var_9], 1
jl	short loc_8130F0
jmp	short loc_8130E0

loc_813134:
cmp	[esp+1Ch+var_9], 0
jnz	short loc_8130E0

loc_81313B:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 0Ch
retn
sub_813060 endp

align 10h



sub_813150 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 28h
push	ebx
mov	ebx, [esp+2Ch+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [ebx+1A8h]
lea	esi, [edi+20h]
push	esi
push	ebx
mov	[esp+40h+var_4], edi
call	sub_813060
add	esp, 8
cmp	dword ptr [ebx+64h], 3
mov	ebp, eax
push	1
mov	[esp+3Ch+var_C], ebp
push	ebx
jnz	short loc_8131AB
mov	eax, [ebx]
add	eax, 18h
mov	[eax], ebp
mov	ecx, [esi]
mov	[eax+4], ecx
mov	edx, [edi+24h]
mov	[eax+8], edx
mov	ecx, [edi+28h]
mov	[eax+0Ch], ecx
mov	edx, [ebx]
mov	dword ptr [edx+14h], 5Eh
mov	eax, [ebx]
mov	ecx, [eax+4]
call	ecx
jmp	short loc_8131C0

loc_8131AB:
mov	edx, [ebx]
mov	dword ptr [edx+14h], 5Fh
mov	eax, [ebx]
mov	[eax+18h], ebp
mov	ecx, [ebx]
mov	edx, [ecx+4]
call	edx

loc_8131C0:
mov	ecx, [ebx+64h]
mov	eax, [ebx+4]
mov	edx, [eax+8]
add	esp, 8
push	ecx
push	ebp
push	1
push	ebx
call	edx
add	esp, 10h
cmp	dword ptr [ebx+64h], 0
mov	[esp+38h+var_8], eax
mov	[esp+38h+var_24], ebp
mov	[esp+38h+var_18], 0
jle	loc_8132A7
mov	edi, eax
mov	[esp+38h+var_20], esi

loc_8131F6:
mov	eax, [esp+38h+var_20]
mov	ecx, [eax]
mov	eax, [esp+38h+var_24]
cdq
idiv	ecx
mov	esi, eax
test	ecx, ecx
jle	short loc_813273
lea	eax, [ecx-1]
mov	[esp+38h+var_10], eax
cdq
sub	eax, edx
sar	eax, 1
xor	ebx, ebx
mov	[esp+38h+var_14], eax
mov	[esp+38h+var_28], ebx
mov	[esp+38h+var_1C], ecx
jmp	short loc_813229

loc_813225:
mov	eax, [esp+38h+var_14]

loc_813229:
mov	ecx, [esp+38h+var_28]
add	eax, ecx
cdq
idiv	[esp+38h+var_10]
cmp	ebx, ebp
mov	edx, ebx
jge	short loc_81325E
lea	ebx, [ebx+0]

loc_813240:
xor	ecx, ecx
test	esi, esi
jle	short loc_813256

loc_813246:
mov	ebp, [edi]
add	ebp, ecx
inc	ecx
cmp	ecx, esi
mov	[edx+ebp], al
jl	short loc_813246
mov	ebp, [esp+38h+var_C]

loc_813256:
add	edx, [esp+38h+var_24]
cmp	edx, ebp
jl	short loc_813240

loc_81325E:
add	[esp+38h+var_28], 0FFh
add	ebx, esi
sub	[esp+38h+var_1C], 1
jnz	short loc_813225
mov	ebx, [esp+38h+arg_0]

loc_813273:
mov	eax, [esp+38h+var_18]
add	[esp+38h+var_20], 4
inc	eax
add	edi, 4
cmp	eax, [ebx+64h]
mov	[esp+38h+var_24], esi
mov	[esp+38h+var_18], eax
jl	loc_8131F6
mov	eax, [esp+38h+var_4]
mov	edx, [esp+38h+var_8]
pop	edi
pop	esi
mov	[eax+14h], ebp
pop	ebp
mov	[eax+10h], edx
pop	ebx
add	esp, 28h
retn

loc_8132A7:
mov	[edi+14h], ebp
mov	[edi+10h], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_813150 endp

align 10h



sub_8132C0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	esi
push	edi
mov	edi, [esp+20h+arg_0]
cmp	dword ptr [edi+4Ch], 1
mov	esi, [edi+1A8h]
mov	[esp+20h+var_8], esi
jnz	short loc_8132E7
mov	[esp+20h+var_18], 1FEh
mov	byte ptr [esi+1Ch], 1
jmp	short loc_8132F3

loc_8132E7:
mov	[esp+20h+var_18], 0
mov	byte ptr [esi+1Ch], 0

loc_8132F3:
mov	ecx, [edi+64h]
mov	edx, [esp+20h+var_18]
mov	eax, [edi+4]
mov	eax, [eax+8]
push	ecx
add	edx, 100h
push	edx
push	1
push	edi
call	eax
xor	ecx, ecx
mov	[esi+18h], eax
mov	eax, [esi+14h]
add	esp, 10h
cmp	[edi+64h], ecx
mov	[esp+20h+var_C], ecx
jle	loc_813406
push	ebx
lea	edx, [esi+20h]
push	ebp
mov	[esp+28h+var_14], edx
jmp	short loc_813338

loc_813330:
mov	eax, [esp+28h+var_10]
mov	esi, [esp+28h+var_8]

loc_813338:
mov	edx, [esp+28h+var_14]
mov	edi, [edx]
cdq
idiv	edi
cmp	[esp+28h+var_18], 0
mov	[esp+28h+var_10], eax
jz	short loc_813359
mov	eax, [esi+18h]
add	dword ptr [eax+ecx*4], 0FFh
lea	eax, [eax+ecx*4]

loc_813359:
mov	edx, [esi+18h]
mov	ebp, [edx+ecx*4]
lea	eax, [edi+0FEh]
lea	esi, [edi+edi-2]
cdq
idiv	esi
xor	ebx, ebx
mov	[esp+28h+var_4], ebp
xor	esi, esi
mov	edx, eax

loc_813376:
cmp	esi, edx
jle	short loc_8133AF
mov	ecx, ebx
lea	ebp, [edi+edi-2]
imul	ecx, 1FEh
jmp	short loc_813390
align 10h

loc_813390:
add	ecx, 1FEh
lea	eax, [ecx+edi+0FEh]
cdq
idiv	ebp
inc	ebx
mov	edx, eax
cmp	esi, edx
jg	short loc_813390
mov	ecx, [esp+28h+var_C]
mov	ebp, [esp+28h+var_4]

loc_8133AF:
mov	al, byte ptr [esp+28h+var_10]
imul	bl
mov	[esi+ebp], al
inc	esi
cmp	esi, 0FFh
jle	short loc_813376
cmp	[esp+28h+var_18], 0
jz	short loc_8133ED
mov	eax, 1
lea	edx, [ebp-1]

loc_8133D0:
movzx	ebx, byte ptr [ebp+0]
mov	[edx], bl
movzx	ebx, byte ptr [ebp+0FFh]
mov	[eax+ebp+0FFh],	bl
inc	eax
dec	edx
cmp	eax, 0FFh
jle	short loc_8133D0

loc_8133ED:
mov	eax, [esp+28h+arg_0]
add	[esp+28h+var_14], 4
inc	ecx
cmp	ecx, [eax+64h]
mov	[esp+28h+var_C], ecx
jl	loc_813330
pop	ebp
pop	ebx

loc_813406:
pop	edi
pop	esi
add	esp, 18h
retn
sub_8132C0 endp

align 10h



sub_813410 proc	near
push	ebx
push	ebp
push	esi
push	edi
push	400h
mov	esi, ecx
mov	ecx, [eax+4]
mov	edx, [ecx]
push	1
push	eax
call	edx
shl	esi, 9
add	esp, 0Ch
sub	esi, 200h
mov	ebp, eax
mov	ebx, esi
mov	edi, offset unk_14660D0
mov	esi, ebp
lea	esp, [esp+0]

loc_813440:
xor	ecx, ecx
jmp	short loc_813450
db 8Dh,	0A4h, 24h, 4 dup(0)
jmp	short loc_813450
align 10h

loc_813450:
movzx	edx, byte ptr [edi+ecx]
imul	edx, 1FEh
mov	eax, 0FE01h
sub	eax, edx
cdq
idiv	ebx
inc	ecx
add	esi, 4
cmp	ecx, 10h
mov	[esi-4], eax
jl	short loc_813450
add	edi, 10h
cmp	edi, offset dword_14661D0
jl	short loc_813440
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn
sub_813410 endp

align 10h



sub_813490 proc	near
push	ebp
mov	ebp, [ebx+1A8h]
push	esi
xor	esi, esi
cmp	[ebx+64h], esi
jle	short loc_8134D9
push	edi
lea	edi, [ebp+34h]

loc_8134A3:
mov	ecx, [edi-14h]
xor	eax, eax
test	esi, esi
jle	short loc_8134C6
lea	edx, [ebp+20h]
nop

loc_8134B0:
cmp	ecx, [edx]
jz	short loc_8134BE
inc	eax
add	edx, 4
cmp	eax, esi
jl	short loc_8134B0
jmp	short loc_8134C6

loc_8134BE:
mov	eax, [ebp+eax*4+34h]
test	eax, eax
jnz	short loc_8134CD

loc_8134C6:
mov	eax, ebx
call	sub_813410

loc_8134CD:
mov	[edi], eax
inc	esi
add	edi, 4
cmp	esi, [ebx+64h]
jl	short loc_8134A3
pop	edi

loc_8134D9:
pop	esi
pop	ebp
retn
sub_813490 endp

align 10h



sub_8134E0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax+1A8h]
push	ebx
mov	ebx, [eax+5Ch]
push	esi
mov	esi, [eax+64h]
mov	eax, [esp+18h+arg_C]
push	edi
mov	edi, [ecx+18h]
mov	[esp+1Ch+var_4], ebx
test	eax, eax
jle	short loc_81357F
mov	ecx, [esp+1Ch+arg_8]
push	ebp
mov	ebp, [esp+20h+arg_4]
mov	edx, ecx
sub	ebp, ecx
mov	[esp+20h+var_10], edx
mov	[esp+20h+var_8], ebp
mov	[esp+20h+var_C], eax
mov	edi, edi

loc_813520:
mov	eax, [edx]
mov	ecx, [edx+ebp]
mov	[esp+20h+arg_0], eax
mov	[esp+20h+arg_C], ebx
test	ebx, ebx
jbe	short loc_813570

loc_813531:
xor	edx, edx
xor	eax, eax
test	esi, esi
jle	short loc_813552
lea	esp, [esp+0]

loc_813540:
movzx	ebx, byte ptr [ecx]
mov	ebp, [edi+eax*4]
movzx	ebx, byte ptr [ebx+ebp]
inc	eax
add	edx, ebx
inc	ecx
cmp	eax, esi
jl	short loc_813540

loc_813552:
mov	eax, [esp+20h+arg_0]
mov	[eax], dl
inc	eax
sub	[esp+20h+arg_C], 1
mov	[esp+20h+arg_0], eax
jnz	short loc_813531
mov	ebp, [esp+20h+var_8]
mov	edx, [esp+20h+var_10]
mov	ebx, [esp+20h+var_4]

loc_813570:
add	edx, 4
sub	[esp+20h+var_C], 1
mov	[esp+20h+var_10], edx
jnz	short loc_813520
pop	ebp

loc_81357F:
pop	edi
pop	esi
pop	ebx
add	esp, 10h
retn
sub_8134E0 endp

align 10h



sub_813590 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	ecx, [esp+10h+arg_0]
mov	eax, [ecx+1A8h]
mov	eax, [eax+18h]
mov	edx, [eax+4]
push	esi
mov	esi, [ecx+5Ch]
push	edi
mov	edi, [eax]
mov	eax, [eax+8]
mov	[esp+18h+var_C], eax
mov	eax, [esp+18h+arg_C]
mov	[esp+18h+var_10], edx
mov	[esp+18h+var_8], esi
test	eax, eax
jle	short loc_81363A
mov	ecx, [esp+18h+arg_8]
push	ebx
mov	ebx, [esp+1Ch+arg_4]
sub	ebx, ecx
push	ebp
mov	[esp+20h+arg_0], ecx
mov	[esp+20h+var_4], ebx
mov	[esp+20h+arg_C], eax
lea	esp, [esp+0]

loc_8135E0:
mov	eax, [ebx+ecx]
mov	edx, [ecx]
test	esi, esi
jbe	short loc_81362A
lea	esp, [esp+0]

loc_8135F0:
movzx	ecx, byte ptr [eax]
movzx	ebx, byte ptr [eax+1]
mov	ebp, [esp+20h+var_10]
movzx	ebx, byte ptr [ebx+ebp]
movzx	ecx, byte ptr [ecx+edi]
mov	ebp, [esp+20h+var_C]
inc	eax
add	ecx, ebx
movzx	ebx, byte ptr [eax+1]
movzx	ebx, byte ptr [ebx+ebp]
inc	eax
add	ecx, ebx
mov	[edx], cl
inc	eax
inc	edx
sub	esi, 1
jnz	short loc_8135F0
mov	esi, [esp+20h+var_8]
mov	ecx, [esp+20h+arg_0]
mov	ebx, [esp+20h+var_4]

loc_81362A:
add	ecx, 4
sub	[esp+20h+arg_C], 1
mov	[esp+20h+arg_0], ecx
jnz	short loc_8135E0
pop	ebp
pop	ebx

loc_81363A:
pop	edi
pop	esi
add	esp, 10h
retn
sub_813590 endp




; int __cdecl sub_813640(size_t, int, int, int)
sub_813640 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 24h
mov	eax, [esp+24h+arg_0]
mov	ecx, [eax+64h]
mov	edx, [eax+5Ch]
push	esi
mov	esi, [eax+1A8h]
mov	eax, [esp+28h+arg_C]
mov	[esp+28h+var_1C], esi
mov	[esp+28h+var_24], ecx
mov	[esp+28h+arg_0], edx
test	eax, eax
jle	loc_81374B
mov	ecx, [esp+28h+arg_4]
push	ebx
mov	ebx, [esp+2Ch+arg_8]
push	ebp
sub	ecx, ebx
push	edi
mov	[esp+34h+var_18], ebx
mov	[esp+34h+var_C], ecx
mov	[esp+34h+var_14], eax

loc_813685:
mov	eax, [esp+34h+arg_0]
mov	ecx, [ebx]
push	eax		; size_t
push	ecx		; void *
call	sub_809960
mov	ebp, [esi+30h]
xor	edx, edx
add	esp, 8
cmp	[esp+34h+var_24], edx
mov	[esp+34h+var_4], ebp
mov	[esp+34h+var_20], edx
jle	loc_81372F
shl	ebp, 6
lea	eax, [esi+34h]
mov	[esp+34h+var_10], ebp
mov	[esp+34h+arg_C], eax
jmp	short loc_8136C4
align 10h

loc_8136C0:
mov	ebp, [esp+34h+var_10]

loc_8136C4:
mov	esi, [esi+18h]
mov	esi, [esi+edx*4]
mov	ecx, [esp+34h+var_C]
mov	eax, [ecx+ebx]
mov	ecx, [ebx]
mov	[esp+34h+var_8], esi
mov	esi, [esp+34h+arg_C]
mov	edi, [esi]
add	edi, ebp
mov	ebp, [esp+34h+arg_0]
add	eax, edx
xor	esi, esi
test	ebp, ebp
jbe	short loc_813717
jmp	short loc_8136F0
align 10h

loc_8136F0:
movzx	edx, byte ptr [eax]
mov	ebx, [edi+esi*4]
add	eax, [esp+34h+var_24]
add	ebx, edx
mov	edx, [esp+34h+var_8]
mov	dl, [ebx+edx]
add	[ecx], dl
inc	esi
inc	ecx
and	esi, 0Fh
sub	ebp, 1
jnz	short loc_8136F0
mov	edx, [esp+34h+var_20]
mov	ebx, [esp+34h+var_18]

loc_813717:
add	[esp+34h+arg_C], 4
mov	esi, [esp+34h+var_1C]
inc	edx
cmp	edx, [esp+34h+var_24]
mov	[esp+34h+var_20], edx
jl	short loc_8136C0
mov	ebp, [esp+34h+var_4]

loc_81372F:
inc	ebp
and	ebp, 0Fh
add	ebx, 4
sub	[esp+34h+var_14], 1
mov	[esi+30h], ebp
mov	[esp+34h+var_18], ebx
jnz	loc_813685
pop	edi
pop	ebp
pop	ebx

loc_81374B:
pop	esi
add	esp, 24h
retn
sub_813640 endp




sub_813750 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 28h
mov	ecx, [esp+28h+arg_0]
mov	edx, [ecx+1A8h]
mov	eax, [edx+18h]
mov	ecx, [ecx+5Ch]
push	esi
mov	esi, [eax]
mov	[esp+2Ch+var_18], esi
mov	esi, [eax+4]
mov	eax, [eax+8]
mov	[esp+2Ch+var_1C], ecx
mov	ecx, [esp+2Ch+arg_C]
mov	[esp+2Ch+var_8], edx
mov	[esp+2Ch+var_14], esi
mov	[esp+2Ch+var_C], eax
test	ecx, ecx
jle	loc_81386C
mov	eax, [esp+2Ch+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+34h+arg_8]
sub	eax, ebp
push	edi
mov	[esp+38h+var_28], ebp
mov	[esp+38h+var_20], eax
mov	[esp+38h+var_24], ecx
jmp	short loc_8137B4
jmp	short loc_8137B0
align 10h

loc_8137B0:
mov	eax, [esp+38h+var_20]

loc_8137B4:
mov	ecx, [edx+30h]
mov	esi, [ebp+0]
mov	ebx, [edx+3Ch]
mov	edi, [edx+38h]
mov	eax, [eax+ebp]
mov	[esp+38h+var_4], ecx
shl	ecx, 6
add	ebx, ecx
mov	[esp+38h+arg_0], esi
mov	esi, [edx+34h]
add	esi, ecx
add	edi, ecx
mov	[esp+38h+var_10], ebx
mov	ebx, [esp+38h+var_1C]
xor	ecx, ecx
mov	[esp+38h+arg_C], ebx
test	ebx, ebx
jbe	short loc_81384C
lea	esp, [esp+0]

loc_8137F0:
movzx	edx, byte ptr [eax]
mov	ebx, [esi+ecx*4]
mov	ebp, [edi+ecx*4]
add	ebx, edx
mov	edx, [esp+38h+var_18]
movzx	edx, byte ptr [ebx+edx]
movzx	ebx, byte ptr [eax+1]
add	ebp, ebx
mov	ebx, [esp+38h+var_14]
movzx	ebx, byte ptr [ebx+ebp]
mov	ebp, [esp+38h+var_10]
mov	ebp, [ebp+ecx*4+0]
inc	eax
add	edx, ebx
movzx	ebx, byte ptr [eax+1]
inc	eax
add	ebp, ebx
mov	ebx, [esp+38h+var_C]
movzx	ebx, byte ptr [ebx+ebp]
add	edx, ebx
mov	ebx, [esp+38h+arg_0]
inc	ecx
mov	[ebx], dl
inc	ebx
inc	eax
and	ecx, 0Fh
sub	[esp+38h+arg_C], 1
mov	[esp+38h+arg_0], ebx
jnz	short loc_8137F0
mov	edx, [esp+38h+var_8]
mov	ebp, [esp+38h+var_28]

loc_81384C:
mov	eax, [esp+38h+var_4]
inc	eax
and	eax, 0Fh
add	ebp, 4
sub	[esp+38h+var_24], 1
mov	[edx+30h], eax
mov	[esp+38h+var_28], ebp
jnz	loc_8137B0
pop	edi
pop	ebp
pop	ebx

loc_81386C:
pop	esi
add	esp, 28h
retn
sub_813750 endp

align 10h



; int __cdecl sub_813880(size_t, int, int, int)
sub_813880 proc	near

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 38h
mov	eax, [esp+38h+arg_0]
mov	ecx, [eax+5Ch]
mov	edx, [eax+120h]
push	ebp
mov	ebp, [eax+64h]
push	esi
mov	esi, [eax+1A8h]
mov	eax, [esp+40h+arg_C]
mov	[esp+40h+var_34], esi
mov	[esp+40h+var_20], ebp
mov	[esp+40h+arg_0], ecx
mov	[esp+40h+var_10], edx
test	eax, eax
jle	loc_813A1A
mov	ecx, [esp+40h+arg_4]
push	ebx
push	edi
mov	edi, [esp+48h+arg_8]
sub	ecx, edi
mov	[esp+48h+var_30], edi
mov	[esp+48h+var_14], ecx
mov	[esp+48h+var_18], eax
nop

loc_8138D0:
mov	eax, [esp+48h+arg_0]
mov	ecx, [edi]
push	eax		; size_t
push	ecx		; void *
call	sub_809960
xor	edx, edx
add	esp, 8
mov	[esp+48h+var_1C], edx
test	ebp, ebp
jle	loc_8139FC
lea	ecx, [esi+44h]
mov	[esp+48h+var_38], ecx
jmp	short loc_813904
jmp	short loc_813900
align 10h

loc_813900:
mov	ecx, [esp+48h+var_38]

loc_813904:
mov	eax, [esp+48h+var_14]
mov	ebx, [eax+edi]
mov	edi, [edi]
mov	ecx, [ecx]
add	ebx, edx
cmp	byte ptr [esi+54h], 0
jz	short loc_813934
mov	eax, [esp+48h+arg_0]
dec	eax
mov	esi, eax
imul	esi, ebp
add	edi, eax
mov	eax, [esp+48h+arg_0]
add	ebx, esi
or	esi, 0FFFFFFFFh
neg	ebp
lea	ecx, [ecx+eax*2+2]
jmp	short loc_813939

loc_813934:
mov	esi, 1

loc_813939:
mov	eax, [esp+48h+var_34]
mov	[esp+48h+var_28], ebp
mov	ebp, [eax+18h]
mov	eax, [eax+10h]
mov	ebp, [ebp+edx*4+0]
mov	eax, [eax+edx*4]
mov	[esp+48h+var_C], ebp
mov	ebp, [esp+48h+arg_0]
mov	[esp+48h+var_8], eax
xor	eax, eax
mov	[esp+48h+arg_C], eax
mov	[esp+48h+var_2C], eax
mov	[esp+48h+var_24], ebp
test	ebp, ebp
jbe	short loc_8139D6
lea	esp, [esp+0]

loc_813970:
movsx	edx, word ptr [ecx+esi*2]
mov	ebp, [esp+48h+var_8]
lea	eax, [edx+eax+8]
movzx	edx, byte ptr [ebx]
sar	eax, 4
add	eax, [esp+48h+var_10]
add	ebx, [esp+48h+var_28]
movzx	eax, byte ptr [edx+eax]
mov	edx, [esp+48h+var_C]
movzx	edx, byte ptr [eax+edx]
add	[edi], dl
movzx	edx, byte ptr [edx+ebp]
mov	ebp, [esp+48h+arg_C]
sub	eax, edx
mov	[esp+48h+var_4], eax
lea	edx, [eax+eax]
add	eax, edx
add	ebp, eax
mov	[ecx], bp
mov	ebp, [esp+48h+var_2C]
add	eax, edx
add	ebp, eax
mov	[esp+48h+arg_C], ebp
mov	ebp, [esp+48h+var_4]
add	eax, edx
add	edi, esi
sub	[esp+48h+var_24], 1
mov	[esp+48h+var_2C], ebp
lea	ecx, [ecx+esi*2]
jnz	short loc_813970
mov	edx, [esp+48h+var_1C]

loc_8139D6:
mov	ebp, [esp+48h+var_20]
mov	ax, word ptr [esp+48h+arg_C]
add	[esp+48h+var_38], 4
mov	edi, [esp+48h+var_30]
mov	esi, [esp+48h+var_34]
inc	edx
cmp	edx, ebp
mov	[ecx], ax
mov	[esp+48h+var_1C], edx
jl	loc_813900

loc_8139FC:
cmp	byte ptr [esi+54h], 0
setz	cl
add	edi, 4
sub	[esp+48h+var_18], 1
mov	[esi+54h], cl
mov	[esp+48h+var_30], edi
jnz	loc_8138D0
pop	edi
pop	ebx

loc_813A1A:
pop	esi
pop	ebp
add	esp, 38h
retn
sub_813880 endp




sub_813A20 proc	near
mov	eax, [esi+1A8h]
push	ebp
mov	ebp, [esi+5Ch]
push	edi
xor	edi, edi
cmp	[esi+64h], edi
lea	ebp, [ebp+ebp+4]
jle	short loc_813A5B
push	ebx
lea	ebx, [eax+44h]
lea	ebx, [ebx+0]

loc_813A40:
mov	eax, [esi+4]
mov	ecx, [eax+4]
push	ebp
push	1
push	esi
call	ecx
mov	[ebx], eax
inc	edi
add	esp, 0Ch
add	ebx, 4
cmp	edi, [esi+64h]
jl	short loc_813A40
pop	ebx

loc_813A5B:
pop	edi
pop	ebp
retn
sub_813A20 endp

align 10h



sub_813A60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+1A8h]
mov	eax, [edi+10h]
mov	[esi+74h], eax
mov	eax, [esi+4Ch]
sub	eax, 0
mov	ecx, [edi+14h]
mov	[esi+70h], ecx
jz	loc_813B27
sub	eax, 1
push	ebx
jz	short loc_813AEA
sub	eax, 1
jz	short loc_813AA6
mov	edx, [esi]
mov	dword ptr [edx+14h], 30h
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
pop	ebx
pop	edi
pop	esi
retn

loc_813AA6:
cmp	dword ptr [edi+44h], 0
lea	ebx, [edi+44h]
mov	dword ptr [edi+4], offset sub_813880
mov	byte ptr [edi+54h], 0
jnz	short loc_813ABF
call	sub_813A20

loc_813ABF:
push	ebp
mov	ebp, [esi+5Ch]
xor	edi, edi
cmp	[esi+64h], edi
lea	ebp, [ebp+ebp+4]
jle	short loc_813AE5
mov	edi, edi

loc_813AD0:
mov	edx, [ebx]
push	ebp		; size_t
push	edx		; void *
call	sub_809960
inc	edi
add	esp, 8
add	ebx, 4
cmp	edi, [esi+64h]
jl	short loc_813AD0

loc_813AE5:
pop	ebp

loc_813AE6:
pop	ebx
pop	edi
pop	esi
retn

loc_813AEA:
cmp	dword ptr [esi+64h], 3
jnz	short loc_813AF9
mov	dword ptr [edi+4], offset sub_813750
jmp	short loc_813B00

loc_813AF9:
mov	dword ptr [edi+4], offset sub_813640

loc_813B00:
cmp	byte ptr [edi+1Ch], 0
mov	dword ptr [edi+30h], 0
jnz	short loc_813B16
push	esi
call	sub_8132C0
add	esp, 4

loc_813B16:
cmp	dword ptr [edi+34h], 0
jnz	short loc_813AE6
mov	ebx, esi
call	sub_813490
pop	ebx
pop	edi
pop	esi
retn

loc_813B27:
cmp	dword ptr [esi+64h], 3
jnz	short loc_813B37
mov	dword ptr [edi+4], offset sub_813590
pop	edi
pop	esi
retn

loc_813B37:
mov	dword ptr [edi+4], offset sub_8134E0
pop	edi
pop	esi
retn
sub_813A60 endp

align 10h



sub_813B50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 2Eh
mov	edx, [eax]
mov	[esp+arg_0], eax
mov	eax, [edx]
jmp	eax
sub_813B50 endp

align 10h



sub_813B70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	58h
push	1
push	esi
call	ecx
mov	[esi+1A8h], eax
xor	ecx, ecx
mov	dword ptr [eax], offset	sub_813A60
mov	dword ptr [eax+8], offset nullsub_2
mov	dword ptr [eax+0Ch], offset sub_813B50
mov	[eax+44h], ecx
mov	[eax+34h], ecx
mov	eax, 4
add	esp, 0Ch
cmp	[esi+64h], eax
jle	short loc_813BC8
mov	edx, [esi]
mov	dword ptr [edx+14h], 37h
mov	ecx, [esi]
mov	[ecx+18h], eax
mov	edx, [esi]
mov	eax, [edx]
push	esi
call	eax
add	esp, 4

loc_813BC8:
mov	eax, 100h
cmp	[esi+54h], eax
jle	short loc_813BEA
mov	ecx, [esi]
mov	dword ptr [ecx+14h], 39h
mov	edx, [esi]
mov	[edx+18h], eax
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_813BEA:
push	esi
call	sub_813150
push	esi
call	sub_8132C0
add	esp, 8
cmp	dword ptr [esi+4Ch], 2
jnz	short loc_813C04
call	sub_813A20

loc_813C04:
pop	esi
retn
sub_813B70 endp

align 10h



sub_813C10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+140h]
mov	eax, [esi+8]
cmp	eax, [edi+0E0h]
jnb	loc_813CAC
push	ebx
mov	ebx, [esp+0Ch+arg_8]
push	ebp
lea	ebp, [esi+0Ch]

loc_813C34:
cmp	dword ptr [ebp+0], 8
jnb	short loc_813C5F
mov	eax, [esp+10h+arg_C]
mov	ecx, [edi+144h]
push	8
push	ebp
lea	edx, [esi+18h]
push	edx
mov	edx, [esp+1Ch+arg_4]
push	eax
mov	eax, [ecx+4]
push	ebx
push	edx
push	edi
call	eax
add	esp, 1Ch
cmp	dword ptr [ebp+0], 8

loc_813C5F:
jnz	short loc_813CAA
mov	ecx, [edi+148h]
mov	eax, [ecx+4]
lea	edx, [esi+18h]
push	edx
push	edi
call	eax
add	esp, 8
test	al, al
jz	short loc_813C9E
cmp	byte ptr [esi+10h], 0
jz	short loc_813C84
inc	dword ptr [ebx]
mov	byte ptr [esi+10h], 0

loc_813C84:
inc	dword ptr [esi+8]
mov	dword ptr [ebp+0], 0
mov	ecx, [esi+8]
cmp	ecx, [edi+0E0h]
jb	short loc_813C34
pop	ebp
pop	ebx
pop	edi
pop	esi
retn

loc_813C9E:
cmp	byte ptr [esi+10h], 0
jnz	short loc_813CAA
dec	dword ptr [ebx]
mov	byte ptr [esi+10h], 1

loc_813CAA:
pop	ebp
pop	ebx

loc_813CAC:
pop	edi
pop	esi
retn
sub_813C10 endp

align 10h



sub_813CB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
cmp	byte ptr [ecx+0B0h], 0
mov	eax, [ecx+140h]
jnz	short locret_813CFB
mov	edx, [esp+arg_4]
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0
mov	byte ptr [eax+10h], 0
mov	[eax+14h], edx
test	edx, edx
jz	short loc_813CF4
mov	eax, [ecx]
mov	dword ptr [eax+14h], 4
mov	edx, [ecx]
mov	eax, [edx]
push	ecx
call	eax
add	esp, 4
retn

loc_813CF4:
mov	dword ptr [eax+4], offset sub_813C10

locret_813CFB:
retn
sub_813CB0 endp

align 10h



sub_813D00 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	40h
push	1
push	esi
call	ecx
mov	[esi+140h], eax
add	esp, 0Ch
mov	dword ptr [eax], offset	sub_813CB0
cmp	byte ptr [esi+0B0h], 0
jnz	short loc_813D8A
cmp	[esp+4+arg_4], 0
jz	short loc_813D45
mov	edx, [esi]
mov	dword ptr [edx+14h], 4
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
pop	esi
retn

loc_813D45:
mov	ecx, [esi+44h]
push	ebp
xor	ebp, ebp
cmp	[esi+3Ch], ebp
jle	short loc_813D89
push	ebx
push	edi
lea	edi, [ecx+1Ch]
lea	ebx, [eax+18h]

loc_813D58:
mov	eax, [edi-10h]
mov	ecx, [edi]
mov	edx, [esi+4]
mov	edx, [edx+8]
add	eax, eax
add	ecx, ecx
add	eax, eax
add	eax, eax
push	eax
add	ecx, ecx
add	ecx, ecx
push	ecx
push	1
push	esi
call	edx
mov	[ebx], eax
inc	ebp
add	esp, 10h
add	ebx, 4
add	edi, 54h
cmp	ebp, [esi+3Ch]
jl	short loc_813D58
pop	edi
pop	ebx

loc_813D89:
pop	ebp

loc_813D8A:
pop	esi
retn
sub_813D00 endp

align 10h



sub_813D90 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 2Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+38h+arg_0]
mov	eax, [esi+0E0h]
mov	ebp, [esi+148h]
mov	ecx, [esi+0F8h]
dec	eax
mov	[esp+38h+var_8], eax
mov	eax, [ebp+10h]
dec	ecx
cmp	eax, [ebp+14h]
push	edi
mov	[esp+3Ch+var_1C], ecx
mov	[esp+3Ch+var_2C], eax
jl	short loc_813DF6

loc_813DC3:
inc	dword ptr [ebp+8]
cmp	dword ptr [esi+0E4h], 1
mov	eax, [esi+148h]
jle	loc_813FEA
pop	edi
pop	esi
xor	ecx, ecx
pop	ebp
mov	dword ptr [eax+14h], 1
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	al, 1
pop	ebx
add	esp, 2Ch
retn

loc_813DF2:
mov	ecx, [esp+3Ch+var_1C]

loc_813DF6:
mov	ebx, [ebp+0Ch]
mov	[esp+3Ch+var_28], ebx
cmp	ebx, ecx
ja	loc_813FBC
jmp	short loc_813E10
align 10h

loc_813E10:
xor	edi, edi
cmp	[esi+0E4h], edi
mov	[esp+3Ch+var_10], edi
jle	loc_813F92
add	esi, 0E8h
mov	[esp+3Ch+var_C], esi
lea	esp, [esp+0]

loc_813E30:
mov	esi, [esi]
cmp	ebx, [esp+3Ch+var_1C]
jnb	short loc_813E3D
mov	ebx, [esi+34h]
jmp	short loc_813E40

loc_813E3D:
mov	ebx, [esi+44h]

loc_813E40:
mov	eax, [esi+40h]
imul	eax, [esp+3Ch+var_28]
mov	[esp+3Ch+var_4], eax
mov	eax, [esp+3Ch+var_2C]
add	eax, eax
add	eax, eax
add	eax, eax
cmp	dword ptr [esi+38h], 0
mov	[esp+3Ch+var_18], ebx
mov	[esp+3Ch+var_24], eax
mov	[esp+3Ch+var_20], 0
jle	loc_813F68
mov	eax, [esi+34h]

loc_813E73:
mov	ecx, [esp+3Ch+var_8]
cmp	[ebp+8], ecx
jb	short loc_813ECE
mov	edx, [esp+3Ch+var_20]
mov	ecx, [esp+3Ch+var_2C]
add	edx, ecx
cmp	edx, [esi+48h]
jl	short loc_813ECE
mov	edx, [ebp+edi*4+18h]
shl	eax, 7
push	eax		; size_t
push	edx		; void *
call	sub_809960
xor	eax, eax
add	esp, 8
cmp	[esi+34h], eax
jle	loc_813F4C
lea	ecx, [ebp+edi*4+18h]
jmp	short loc_813EB0
align 10h

loc_813EB0:
mov	edx, [ebp+edi*4+14h]
mov	ebx, [ecx]
mov	dx, [edx]
inc	eax
mov	[ebx], dx
add	ecx, 4
cmp	eax, [esi+34h]
jl	short loc_813EB0
mov	ebx, [esp+3Ch+var_18]
jmp	loc_813F4C

loc_813ECE:
mov	eax, [esp+3Ch+arg_0]
mov	ecx, [eax+158h]
mov	edx, [esp+3Ch+var_4]
mov	eax, [esp+3Ch+var_24]
push	ebx
push	edx
mov	edx, [ebp+edi*4+18h]
push	eax
mov	eax, [esi+4]
push	edx
mov	edx, [esp+4Ch+arg_4]
mov	eax, [edx+eax*4]
mov	edx, [esp+4Ch+arg_0]
push	eax
mov	eax, [ecx+4]
push	esi
push	edx
call	eax
mov	eax, [esi+34h]
add	esp, 1Ch
cmp	ebx, eax
jge	short loc_813F4C
sub	eax, ebx
shl	eax, 7
lea	ecx, [ebx+edi]
mov	edx, [ebp+ecx*4+18h]
push	eax		; size_t
push	edx		; void *
call	sub_809960
add	esp, 8
cmp	ebx, [esi+34h]
mov	[esp+3Ch+var_14], ebx
jge	short loc_813F4C
lea	eax, [ebx+edi]
lea	eax, [ebp+eax*4+18h]
mov	edi, edi

loc_813F30:
mov	ecx, [eax-4]
mov	cx, [ecx]
mov	edx, [eax]
mov	[edx], cx
mov	ecx, [esp+3Ch+var_14]
inc	ecx
add	eax, 4
cmp	ecx, [esi+34h]
mov	[esp+3Ch+var_14], ecx
jl	short loc_813F30

loc_813F4C:
mov	ecx, [esp+3Ch+var_20]
mov	eax, [esi+34h]
add	[esp+3Ch+var_24], 8
inc	ecx
add	edi, eax
cmp	ecx, [esi+38h]
mov	[esp+3Ch+var_20], ecx
jl	loc_813E73

loc_813F68:
mov	eax, [esp+3Ch+var_10]
mov	esi, [esp+3Ch+var_C]
mov	edx, [esp+3Ch+arg_0]
mov	ebx, [esp+3Ch+var_28]
inc	eax
add	esi, 4
cmp	eax, [edx+0E4h]
mov	[esp+3Ch+var_10], eax
mov	[esp+3Ch+var_C], esi
jl	loc_813E30
mov	esi, edx

loc_813F92:
mov	ecx, [esi+15Ch]
mov	edx, [ecx+4]
lea	eax, [ebp+18h]
push	eax
push	esi
call	edx
add	esp, 8
test	al, al
jz	short loc_813FD6
inc	ebx
mov	[esp+3Ch+var_28], ebx
cmp	ebx, [esp+3Ch+var_1C]
jbe	loc_813E10
mov	eax, [esp+3Ch+var_2C]

loc_813FBC:
inc	eax
mov	dword ptr [ebp+0Ch], 0
cmp	eax, [ebp+14h]
mov	[esp+3Ch+var_2C], eax
jl	loc_813DF2
jmp	loc_813DC3

loc_813FD6:
mov	eax, [esp+3Ch+var_2C]
pop	edi
pop	esi
mov	[ebp+10h], eax
mov	[ebp+0Ch], ebx
pop	ebp
xor	al, al
pop	ebx
add	esp, 2Ch
retn

loc_813FEA:
mov	ecx, [esi+0E0h]
mov	edx, [esi+0E8h]
dec	ecx
cmp	[eax+8], ecx
jnb	short loc_814001
mov	ecx, [edx+0Ch]
jmp	short loc_814004

loc_814001:
mov	ecx, [edx+48h]

loc_814004:
pop	edi
mov	[eax+14h], ecx
pop	esi
xor	ecx, ecx
pop	ebp
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	al, 1
pop	ebx
add	esp, 2Ch
retn
sub_813D90 endp

align 10h



sub_814020 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4

sub	esp, 2Ch
push	ebx
mov	ebx, [esp+30h+arg_0]
push	ebp
push	esi
push	edi
mov	edi, [ebx+148h]
xor	esi, esi
cmp	[ebx+0E4h], esi
mov	[esp+3Ch+var_1C], edi
jle	short loc_814089
lea	eax, [ebx+0E8h]
mov	[esp+3Ch+var_2C], eax
lea	esp, [esp+0]

loc_814050:
mov	ecx, [esp+3Ch+var_2C]
mov	eax, [ecx]
mov	ecx, [eax+0Ch]
mov	ebp, [edi+8]
mov	eax, [eax+4]
imul	ebp, ecx
mov	edx, [ebx+4]
mov	edx, [edx+20h]
push	0
push	ecx
mov	ecx, [edi+eax*4+40h]
push	ebp
push	ecx
push	ebx
call	edx
add	[esp+50h+var_2C], 4
mov	[esp+esi*4+50h+var_10],	eax
inc	esi
add	esp, 14h
cmp	esi, [ebx+0E4h]
jl	short loc_814050

loc_814089:
mov	esi, [edi+10h]
cmp	esi, [edi+14h]
mov	[esp+3Ch+var_18], esi
jge	loc_81419D
lea	esp, [esp+0]

loc_8140A0:
mov	eax, [edi+0Ch]
mov	[esp+3Ch+var_2C], eax
cmp	eax, [ebx+0F8h]
jnb	loc_814188

loc_8140B3:
xor	edx, edx
xor	ebp, ebp
cmp	[ebx+0E4h], edx
mov	[esp+3Ch+var_20], edx
jle	loc_81415C
lea	eax, [ebx+0E8h]
mov	[esp+3Ch+var_28], eax

loc_8140D1:
mov	ecx, [esp+3Ch+var_28]
mov	edi, [ecx]
mov	ecx, [edi+34h]
mov	eax, ecx
imul	eax, [esp+3Ch+var_2C]
cmp	dword ptr [edi+38h], 0
mov	[esp+3Ch+var_24], 0
jle	short loc_814142
mov	edx, [esp+edx*4+3Ch+var_10]
shl	eax, 7
mov	[esp+3Ch+var_14], eax
lea	ebx, [edx+esi*4]
lea	ecx, [ecx+0]

loc_814100:
mov	eax, [ebx]
add	eax, [esp+3Ch+var_14]
xor	edx, edx
test	ecx, ecx
jle	short loc_814125
mov	ecx, [esp+3Ch+var_1C]
lea	esi, [ecx+ebp*4+18h]

loc_814114:
mov	[esi], eax
mov	ecx, [edi+34h]
inc	edx
inc	ebp
add	esi, 4
sub	eax, 0FFFFFF80h
cmp	edx, ecx
jl	short loc_814114

loc_814125:
mov	eax, [esp+3Ch+var_24]
inc	eax
add	ebx, 4
cmp	eax, [edi+38h]
mov	[esp+3Ch+var_24], eax
jl	short loc_814100
mov	ebx, [esp+3Ch+arg_0]
mov	edx, [esp+3Ch+var_20]
mov	esi, [esp+3Ch+var_18]

loc_814142:
add	[esp+3Ch+var_28], 4
inc	edx
cmp	edx, [ebx+0E4h]
mov	[esp+3Ch+var_20], edx
jl	loc_8140D1
mov	edi, [esp+3Ch+var_1C]

loc_81415C:
mov	edx, [ebx+15Ch]
lea	eax, [edi+18h]
push	eax
mov	eax, [edx+4]
push	ebx
call	eax
add	esp, 8
test	al, al
jz	short loc_8141C8
mov	eax, [esp+3Ch+var_2C]
inc	eax
mov	[esp+3Ch+var_2C], eax
cmp	eax, [ebx+0F8h]
jb	loc_8140B3

loc_814188:
inc	esi
mov	dword ptr [edi+0Ch], 0
cmp	esi, [edi+14h]
mov	[esp+3Ch+var_18], esi
jl	loc_8140A0

loc_81419D:
mov	ecx, 1
add	[edi+8], ecx
cmp	[ebx+0E4h], ecx
mov	eax, [ebx+148h]
jle	short loc_8141DC
pop	edi
mov	[eax+14h], ecx
pop	esi
xor	ecx, ecx
pop	ebp
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	al, 1
pop	ebx
add	esp, 2Ch
retn

loc_8141C8:
mov	ecx, [esp+3Ch+var_2C]
mov	[edi+10h], esi
mov	[edi+0Ch], ecx
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 2Ch
retn

loc_8141DC:
mov	edx, [ebx+0E0h]
sub	edx, ecx
mov	ecx, [ebx+0E8h]
cmp	[eax+8], edx
jnb	short loc_8141F4
mov	edx, [ecx+0Ch]
jmp	short loc_8141F7

loc_8141F4:
mov	edx, [ecx+48h]

loc_8141F7:
pop	edi
pop	esi
xor	ecx, ecx
pop	ebp
mov	[eax+14h], edx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	al, 1
pop	ebx
add	esp, 2Ch
retn
sub_814020 endp

align 10h



sub_814210 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 2Ch
mov	eax, [esp+2Ch+arg_0]
push	ebx
mov	ebx, [eax+0E0h]
push	esi
mov	esi, [eax+44h]
push	edi
mov	edi, [eax+148h]
dec	ebx
cmp	dword ptr [eax+3Ch], 0
mov	[esp+38h+var_10], edi
mov	[esp+38h+var_14], ebx
mov	[esp+38h+var_C], 0
mov	[esp+38h+var_28], esi
jle	loc_81440D
mov	ecx, [esp+38h+arg_4]
lea	edx, [edi+40h]
push	ebp
mov	[esp+3Ch+var_18], ecx
mov	[esp+3Ch+var_1C], edx
jmp	short loc_814268
align 10h

loc_814260:
mov	edi, [esp+3Ch+var_10]
mov	ebx, [esp+3Ch+var_14]

loc_814268:
mov	ecx, [esi+0Ch]
mov	ebp, [edi+8]
mov	edx, [eax+4]
imul	ebp, ecx
mov	edx, [edx+20h]
push	1
push	ecx
mov	ecx, [esp+44h+var_1C]
mov	ecx, [ecx]
push	ebp
push	ecx
push	eax
call	edx
add	esp, 14h
mov	ecx, eax
mov	[esp+3Ch+var_24], ecx
cmp	[edi+8], ebx
jnb	short loc_81429C
mov	eax, [esi+0Ch]
mov	[esp+3Ch+var_2C], eax
jmp	short loc_8142B2

loc_81429C:
mov	edi, [esi+0Ch]
mov	eax, [esi+20h]
xor	edx, edx
div	edi
mov	[esp+3Ch+var_2C], edx
test	edx, edx
jnz	short loc_8142B2
mov	[esp+3Ch+var_2C], edi

loc_8142B2:
mov	ebx, [esi+1Ch]
mov	ebp, [esi+8]
xor	edx, edx
mov	eax, ebx
div	ebp
mov	[esp+3Ch+var_20], ebp
mov	edi, edx
test	edi, edi
jle	short loc_8142CC
sub	ebp, edi
mov	edi, ebp

loc_8142CC:
xor	ebp, ebp
cmp	[esp+3Ch+var_2C], ebp
jle	short loc_81434C
jmp	short loc_8142E0
align 10h

loc_8142E0:
mov	esi, [ecx+ebp*4]
mov	eax, [esp+3Ch+arg_0]
mov	ecx, [eax+158h]
push	ebx
push	0
lea	edx, ds:0[ebp*8]
push	edx
mov	edx, [esp+48h+var_18]
mov	edx, [edx]
push	esi
push	edx
mov	edx, [esp+50h+var_28]
push	edx
push	eax
mov	eax, [ecx+4]
call	eax
add	esp, 1Ch
test	edi, edi
jle	short loc_81433D
mov	ecx, ebx
mov	edx, edi
shl	ecx, 7
shl	edx, 7
add	esi, ecx
push	edx		; size_t
push	esi		; void *
call	sub_809960
movzx	ecx, word ptr [esi-80h]
add	esp, 8
test	edi, edi
jle	short loc_81433D
mov	eax, edi

loc_814332:
mov	[esi], cx
sub	esi, 0FFFFFF80h
sub	eax, 1
jnz	short loc_814332

loc_81433D:
mov	ecx, [esp+3Ch+var_24]
inc	ebp
cmp	ebp, [esp+3Ch+var_2C]
jl	short loc_8142E0
mov	esi, [esp+3Ch+var_28]

loc_81434C:
mov	eax, [esp+3Ch+var_14]
mov	edx, [esp+3Ch+var_10]
cmp	[edx+8], eax
jnz	loc_8143E0
add	ebx, edi
xor	edx, edx
mov	eax, ebx
div	[esp+3Ch+var_20]
mov	[esp+3Ch+var_4], eax
mov	eax, [esp+3Ch+var_2C]
cmp	eax, [esi+0Ch]
mov	ebp, eax
jge	short loc_8143E0
shl	ebx, 7
mov	[esp+3Ch+var_8], ebx
jmp	short loc_814384
align 10h

loc_814380:
mov	ecx, [esp+3Ch+var_24]

loc_814384:
mov	eax, [esp+3Ch+var_8]
mov	edi, [ecx+ebp*4]
mov	ebx, [ecx+ebp*4-4]
push	eax		; size_t
push	edi		; void *
call	sub_809960
mov	eax, [esp+44h+var_4]
add	esp, 8
test	eax, eax
jbe	short loc_8143DA
mov	edx, [esp+3Ch+var_20]
shl	edx, 7
mov	[esp+3Ch+var_2C], eax
lea	esp, [esp+0]

loc_8143B0:
mov	ecx, [esp+3Ch+var_20]
movzx	esi, word ptr [edx+ebx-80h]
test	ecx, ecx
jle	short loc_8143CB
mov	eax, edi
nop

loc_8143C0:
mov	[eax], si
sub	eax, 0FFFFFF80h
sub	ecx, 1
jnz	short loc_8143C0

loc_8143CB:
add	edi, edx
add	ebx, edx
sub	[esp+3Ch+var_2C], 1
jnz	short loc_8143B0
mov	esi, [esp+3Ch+var_28]

loc_8143DA:
inc	ebp
cmp	ebp, [esi+0Ch]
jl	short loc_814380

loc_8143E0:
mov	eax, [esp+3Ch+var_C]
mov	ecx, 4
add	[esp+3Ch+var_1C], ecx
add	[esp+3Ch+var_18], ecx
mov	ecx, [esp+3Ch+arg_0]
inc	eax
add	esi, 54h
cmp	eax, [ecx+3Ch]
mov	[esp+3Ch+var_C], eax
mov	[esp+3Ch+var_28], esi
mov	eax, ecx
jl	loc_814260
pop	ebp

loc_81440D:
pop	edi
pop	esi
pop	ebx
add	esp, 2Ch
mov	[esp+arg_0], eax
jmp	sub_814020
sub_814210 endp

align 10h



sub_814420 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, [eax+148h]
mov	dword ptr [esi+8], 0
mov	ecx, [eax+148h]
mov	edx, 1
cmp	[eax+0E4h], edx
jle	short loc_81444A
mov	[ecx+14h], edx
jmp	short loc_81446A

loc_81444A:
push	ebx
mov	ebx, [eax+0E0h]
sub	ebx, edx
cmp	[ecx+8], ebx
mov	ebx, [eax+0E8h]
jnb	short loc_814463
mov	ebx, [ebx+0Ch]
jmp	short loc_814466

loc_814463:
mov	ebx, [ebx+48h]

loc_814466:
mov	[ecx+14h], ebx
pop	ebx

loc_81446A:
mov	dword ptr [ecx+0Ch], 0
mov	dword ptr [ecx+10h], 0
mov	ecx, [esp+4+arg_4]
sub	ecx, 0
jz	short loc_8144E3
sub	ecx, 2
jz	short loc_8144C1
sub	ecx, edx
jz	short loc_81449F
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4
pop	esi
retn

loc_81449F:
cmp	dword ptr [esi+40h], 0
jnz	short loc_8144B8
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_8144B8:
mov	dword ptr [esi+4], offset sub_814210
pop	esi
retn

loc_8144C1:
cmp	dword ptr [esi+40h], 0
jnz	short loc_8144DA
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_8144DA:
mov	dword ptr [esi+4], offset sub_814020
pop	esi
retn

loc_8144E3:
cmp	dword ptr [esi+40h], 0
jz	short loc_8144FC
mov	ecx, [eax]
mov	dword ptr [ecx+14h], 4
mov	edx, [eax]
push	eax
mov	eax, [edx]
call	eax
add	esp, 4

loc_8144FC:
mov	dword ptr [esi+4], offset sub_813D90
pop	esi
retn
sub_814420 endp

align 10h



sub_814510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	edi
mov	edi, [esp+8+arg_0]
mov	eax, [edi+4]
mov	ecx, [eax]
push	68h
push	1
push	edi
call	ecx
mov	ebx, eax
add	esp, 0Ch
cmp	byte ptr [esp+8+arg_4],	0
mov	[edi+148h], ebx
mov	dword ptr [ebx], offset	sub_814420
jz	short loc_8145A0
cmp	dword ptr [edi+3Ch], 0
push	esi
mov	esi, [edi+44h]
mov	[esp+0Ch+arg_4], 0
jle	short loc_81459C
add	esi, 0Ch
add	ebx, 40h
push	ebp

loc_814553:
mov	eax, [esi]
mov	edx, [esi+14h]
mov	ebp, [edi+4]
push	eax
push	eax
push	edx
call	sub_8098D0
mov	ecx, [esi+10h]
add	esp, 8
push	eax
mov	eax, [esi-4]
push	eax
push	ecx
call	sub_8098D0
mov	edx, [ebp+14h]
add	esp, 8
push	eax
push	0
push	1
push	edi
call	edx
mov	[ebx], eax
mov	eax, [esp+28h+arg_4]
inc	eax
add	esp, 18h
add	ebx, 4
add	esi, 54h
cmp	eax, [edi+3Ch]
mov	[esp+10h+arg_4], eax
jl	short loc_814553
pop	ebp

loc_81459C:
pop	esi
pop	edi
pop	ebx
retn

loc_8145A0:
mov	eax, [edi+4]
mov	ecx, [eax+4]
push	500h
push	1
push	edi
call	ecx
lea	edx, [eax+80h]
mov	[ebx+1Ch], edx
lea	ecx, [eax+100h]
mov	[ebx+20h], ecx
lea	edx, [eax+180h]
lea	ecx, [eax+200h]
mov	[ebx+24h], edx
mov	[ebx+28h], ecx
lea	edx, [eax+280h]
lea	ecx, [eax+300h]
mov	[ebx+2Ch], edx
mov	[ebx+30h], ecx
mov	[ebx+18h], eax
lea	edx, [eax+380h]
lea	ecx, [eax+400h]
add	esp, 0Ch
add	eax, 480h
mov	[ebx+34h], edx
mov	[ebx+38h], ecx
mov	[ebx+3Ch], eax
pop	edi
mov	dword ptr [ebx+40h], 0
pop	ebx
retn
sub_814510 endp




sub_814610 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebp
push	edi
mov	edi, [esp+14h+arg_0]
cmp	dword ptr [edi+3Ch], 0
mov	ebp, [edi+158h]
mov	eax, [edi+44h]
mov	[esp+14h+var_4], ebp
mov	[esp+14h+var_C], 0
jle	loc_814904
fld	ds:dbl_15FD408
add	eax, 10h
push	ebx
mov	[esp+18h+arg_0], eax
push	esi

loc_814647:
mov	eax, [esp+1Ch+arg_0]
mov	esi, [eax]
cmp	esi, 3
ja	short loc_814659
cmp	dword ptr [edi+esi*4+48h], 0
jnz	short loc_814679

loc_814659:
mov	ecx, [edi]
fstp	st
mov	dword ptr [ecx+14h], 34h
mov	edx, [edi]
mov	[edx+18h], esi
mov	eax, [edi]
mov	ecx, [eax]
push	edi
call	ecx
fld	ds:dbl_15FD408
add	esp, 4

loc_814679:
mov	eax, [edi+0B8h]
sub	eax, 0
mov	ebx, [edi+esi*4+48h]
jz	loc_8148AB
sub	eax, 1
jz	loc_8147FB
sub	eax, 1
jz	short loc_8146BA
mov	edx, [edi]
fstp	st
mov	dword ptr [edx+14h], 30h
mov	eax, [edi]
mov	ecx, [eax]
push	edi
call	ecx
fld	ds:dbl_15FD408
add	esp, 4
jmp	loc_8148E9

loc_8146BA:
cmp	dword ptr [ebp+esi*4+20h], 0
jnz	short loc_8146DF
mov	edx, [edi+4]
fstp	st
mov	eax, [edx]
push	100h
push	1
push	edi
call	eax
fld	ds:dbl_15FD408
add	esp, 0Ch
mov	[ebp+esi*4+20h], eax

loc_8146DF:
mov	esi, [ebp+esi*4+20h]
mov	eax, offset dbl_1466260
lea	edx, [esi+8]
lea	ecx, [ebx+4]

loc_8146EE:
movzx	esi, word ptr [ecx-4]
mov	[esp+1Ch+var_8], esi
add	eax, 8
add	ecx, 10h
fild	[esp+1Ch+var_8]
add	edx, 20h
cmp	eax, offset dbl_14662A0
fmul	qword ptr [eax-8]
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-28h]
movzx	esi, word ptr [ecx-12h]
mov	[esp+1Ch+var_8], esi
fild	[esp+1Ch+var_8]
fmul	qword ptr [eax-8]
fmul	ds:dbl_1466268
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-24h]
movzx	esi, word ptr [ecx-10h]
mov	[esp+1Ch+var_8], esi
fild	[esp+1Ch+var_8]
fmul	qword ptr [eax-8]
fmul	ds:dbl_1466270
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-20h]
movzx	esi, word ptr [ecx-0Eh]
mov	[esp+1Ch+var_8], esi
fild	[esp+1Ch+var_8]
fmul	qword ptr [eax-8]
fmul	ds:dbl_1466278
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-1Ch]
movzx	esi, word ptr [ecx-0Ch]
mov	[esp+1Ch+var_8], esi
fild	[esp+1Ch+var_8]
fmul	qword ptr [eax-8]
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-18h]
movzx	esi, word ptr [ecx-0Ah]
mov	[esp+1Ch+var_8], esi
fild	[esp+1Ch+var_8]
fmul	qword ptr [eax-8]
fmul	ds:dbl_1466288
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-14h]
movzx	esi, word ptr [ecx-8]
mov	[esp+1Ch+var_8], esi
fild	[esp+1Ch+var_8]
fmul	qword ptr [eax-8]
fmul	ds:dbl_1466290
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-10h]
movzx	esi, word ptr [ecx-6]
mov	[esp+1Ch+var_8], esi
fild	[esp+1Ch+var_8]
fmul	qword ptr [eax-8]
fmul	ds:dbl_1466298
fmul	st, st(1)
fdivr	ds:dbl_1466260
fstp	dword ptr [edx-0Ch]
jl	loc_8146EE
jmp	loc_8148E9

loc_8147FB:
cmp	dword ptr [ebp+esi*4+0Ch], 0
jnz	short loc_814820
mov	ecx, [edi+4]
fstp	st
mov	edx, [ecx]
push	100h
push	1
push	edi
call	edx
fld	ds:dbl_15FD408
add	esp, 0Ch
mov	[ebp+esi*4+0Ch], eax

loc_814820:
mov	esi, [ebp+esi*4+0Ch]
lea	ecx, [esi+8]
mov	esi, ebx
mov	edx, offset aXqsbk_0 ; "ÅXŸSBK"
lea	eax, [ebx+4]
neg	esi

loc_814833:
movsx	ebp, word ptr [edx-2]
movzx	ebx, word ptr [eax-4]
imul	ebx, ebp
add	ebx, 400h
sar	ebx, 0Bh
mov	[ecx-8], ebx
movsx	ebp, word ptr [edx]
movzx	ebx, word ptr [eax-2]
imul	ebx, ebp
add	ebx, 400h
sar	ebx, 0Bh
mov	[ecx-4], ebx
movzx	ebp, word ptr [eax]
movsx	ebx, ds:word_14661E0[esi+eax]
imul	ebx, ebp
add	ebx, 400h
sar	ebx, 0Bh
mov	[ecx], ebx
movsx	ebx, word ptr ds:aXqsbk_0[esi+eax] ; "ÅXŸSBK"
movzx	ebp, word ptr [eax+2]
imul	ebx, ebp
add	ebx, 400h
sar	ebx, 0Bh
mov	[ecx+4], ebx
add	edx, 8
add	ecx, 10h
add	eax, 8
cmp	edx, (offset dbl_1466260+2)
jl	short loc_814833
mov	ebp, [esp+1Ch+var_4]
jmp	short loc_8148E9

loc_8148AB:
cmp	dword ptr [ebp+esi*4+0Ch], 0
jnz	short loc_8148D0
mov	eax, [edi+4]
fstp	st
mov	ecx, [eax]
push	100h
push	1
push	edi
call	ecx
fld	ds:dbl_15FD408
add	esp, 0Ch
mov	[ebp+esi*4+0Ch], eax

loc_8148D0:
mov	esi, [ebp+esi*4+0Ch]
xor	eax, eax

loc_8148D6:
movzx	edx, word ptr [ebx+eax*2]
add	edx, edx
add	edx, edx
add	edx, edx
mov	[esi+eax*4], edx
inc	eax
cmp	eax, 40h
jl	short loc_8148D6

loc_8148E9:
mov	eax, [esp+1Ch+var_C]
add	[esp+1Ch+arg_0], 54h
inc	eax
cmp	eax, [edi+3Ch]
mov	[esp+1Ch+var_C], eax
jl	loc_814647
pop	esi
fstp	st
pop	ebx

loc_814904:
pop	edi
pop	ebp
add	esp, 0Ch
retn
sub_814610 endp

align 10h



sub_814910 proc	near

var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 118h
mov	eax, [esp+118h+arg_0]
mov	eax, [eax+158h]
mov	ecx, [eax+8]
mov	edx, [esp+118h+arg_4]
mov	[esp+118h+var_10C], ecx
mov	ecx, [edx+10h]
mov	eax, [eax+ecx*4+0Ch]
mov	ecx, [esp+118h+arg_18]
test	ecx, ecx
jbe	loc_814C7C
mov	edx, [esp+118h+arg_10]
push	ebx
mov	ebx, [esp+11Ch+arg_14]
push	ebp
push	esi
mov	esi, [esp+124h+arg_8]
lea	edx, [esi+edx*4+8]
mov	[esp+124h+var_104], edx
lea	edx, [eax+8]
mov	[esp+124h+var_114], edx
lea	edx, [esp+124h+var_100]
sub	edx, eax
mov	[esp+124h+var_110], edx
push	edi
mov	edi, [esp+128h+arg_C]
lea	edx, [esp+128h+var_FC]
sub	edx, eax
mov	[esp+128h+var_108], edx
add	edi, 4
mov	[esp+128h+var_118], ecx

loc_814991:
mov	edx, [esp+128h+var_104]
lea	eax, [esp+128h+var_100]
mov	esi, 2
mov	edi, edi

loc_8149A0:
mov	ecx, [edx-8]
movzx	ebp, byte ptr [ecx+ebx]
add	ebp, 0FFFFFF80h
mov	[eax], ebp
add	ecx, ebx
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	ebp, 0FFFFFF80h
add	eax, 4
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ecx, byte ptr [ecx+1]
add	eax, 4
add	ecx, 0FFFFFF80h
mov	[eax+4], ecx
mov	ecx, [edx-4]
movzx	ebp, byte ptr [ecx+ebx]
add	eax, 4
add	ecx, ebx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax], ebp
movzx	ecx, byte ptr [ecx+1]
add	ecx, 0FFFFFF80h
add	eax, 4
mov	[eax], ecx
mov	ecx, [edx]
add	eax, 4
movzx	ebp, byte ptr [ecx+ebx]
add	ebp, 0FFFFFF80h
mov	[eax], ebp
add	ecx, ebx
movzx	ebp, byte ptr [ecx+1]
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
inc	ecx
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ecx, byte ptr [ecx+1]
add	eax, 4
add	ecx, 0FFFFFF80h
mov	[eax+4], ecx
mov	ecx, [edx+4]
movzx	ebp, byte ptr [ecx+ebx]
add	eax, 4
add	ecx, ebx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	ebp, 0FFFFFF80h
mov	[eax+4], ebp
movzx	ebp, byte ptr [ecx+1]
add	eax, 4
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax], ebp
movzx	ebp, byte ptr [ecx+1]
inc	ecx
add	eax, 4
add	ebp, 0FFFFFF80h
mov	[eax], ebp
movzx	ecx, byte ptr [ecx+1]
add	eax, 4
add	ecx, 0FFFFFF80h
mov	[eax], ecx
add	eax, 4
add	edx, 10h
sub	esi, 1
jnz	loc_8149A0
lea	edx, [esp+128h+var_100]
push	edx
call	[esp+12Ch+var_10C]
mov	esi, [esp+12Ch+var_114]
add	esp, 4
xor	ebp, ebp

loc_814B80:
mov	ecx, [esi-8]
mov	eax, [esp+ebp*4+128h+var_100]
mov	edx, ecx
sar	edx, 1
test	eax, eax
jge	short loc_814BA4
sub	edx, eax
cmp	edx, ecx
jl	short loc_814B9E
mov	eax, edx
cdq
idiv	ecx
neg	eax
jmp	short loc_814BB1

loc_814B9E:
xor	eax, eax
neg	eax
jmp	short loc_814BB1

loc_814BA4:
add	eax, edx
cmp	eax, ecx
jl	short loc_814BAF
cdq
idiv	ecx
jmp	short loc_814BB1

loc_814BAF:
xor	eax, eax

loc_814BB1:
mov	[edi-4], ax
mov	ecx, [esi-4]
mov	eax, [esp+ebp*4+128h+var_FC]
mov	edx, ecx
sar	edx, 1
test	eax, eax
jge	short loc_814BD9
sub	edx, eax
cmp	edx, ecx
jl	short loc_814BD3
mov	eax, edx
cdq
idiv	ecx
neg	eax
jmp	short loc_814BE6

loc_814BD3:
xor	eax, eax
neg	eax
jmp	short loc_814BE6

loc_814BD9:
add	eax, edx
cmp	eax, ecx
jl	short loc_814BE4
cdq
idiv	ecx
jmp	short loc_814BE6

loc_814BE4:
xor	eax, eax

loc_814BE6:
mov	[edi-2], ax
mov	ecx, [esi]
mov	eax, [esp+128h+var_110]
mov	eax, [esi+eax]
mov	edx, ecx
sar	edx, 1
test	eax, eax
jge	short loc_814C10
sub	edx, eax
cmp	edx, ecx
jl	short loc_814C0A
mov	eax, edx
cdq
idiv	ecx
neg	eax
jmp	short loc_814C1D

loc_814C0A:
xor	eax, eax
neg	eax
jmp	short loc_814C1D

loc_814C10:
add	eax, edx
cmp	eax, ecx
jl	short loc_814C1B
cdq
idiv	ecx
jmp	short loc_814C1D

loc_814C1B:
xor	eax, eax

loc_814C1D:
mov	[edi], ax
mov	ecx, [esi+4]
mov	eax, [esp+128h+var_108]
mov	eax, [esi+eax]
mov	edx, ecx
sar	edx, 1
test	eax, eax
jge	short loc_814C47
sub	edx, eax
cmp	edx, ecx
jl	short loc_814C41
mov	eax, edx
cdq
idiv	ecx
neg	eax
jmp	short loc_814C54

loc_814C41:
xor	eax, eax
neg	eax
jmp	short loc_814C54

loc_814C47:
add	eax, edx
cmp	eax, ecx
jl	short loc_814C52
cdq
idiv	ecx
jmp	short loc_814C54

loc_814C52:
xor	eax, eax

loc_814C54:
mov	[edi+2], ax
add	ebp, 4
add	edi, 8
add	esi, 10h
cmp	ebp, 40h
jl	loc_814B80
add	ebx, 8
sub	[esp+128h+var_118], 1
jnz	loc_814991
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_814C7C:
add	esp, 118h
retn
sub_814910 endp

align 10h



sub_814C90 proc	near

var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= dword ptr -100h
var_FC=	dword ptr -0FCh
var_F8=	dword ptr -0F8h
var_F4=	dword ptr -0F4h
var_F0=	dword ptr -0F0h
var_EC=	dword ptr -0ECh
var_E8=	dword ptr -0E8h
var_E4=	dword ptr -0E4h
var_E0=	dword ptr -0E0h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_D4=	dword ptr -0D4h
var_D0=	dword ptr -0D0h
var_CC=	dword ptr -0CCh
var_C8=	dword ptr -0C8h
var_C4=	dword ptr -0C4h
var_C0=	dword ptr -0C0h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 114h
mov	eax, [esp+114h+arg_0]
mov	eax, [eax+158h]
mov	ecx, [eax+1Ch]
mov	edx, [esp+114h+arg_4]
mov	[esp+114h+var_10C], ecx
mov	ecx, [edx+10h]
mov	edx, [eax+ecx*4+20h]
mov	eax, [esp+114h+arg_18]
push	ebx
mov	ebx, [esp+118h+arg_8]
push	ebp
mov	ebp, [esp+11Ch+arg_10]
mov	[esp+11Ch+var_104], edx
test	eax, eax
jbe	loc_81525E
mov	ecx, [esp+11Ch+arg_C]
push	esi
mov	esi, [esp+120h+arg_14]
push	edi
mov	[esp+124h+var_114], ecx
mov	[esp+124h+var_110], eax

loc_814CF3:
mov	eax, [ebx+ebp*4]
movzx	edx, byte ptr [eax+esi]
add	eax, esi
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_100], xmm0
movzx	ecx, byte ptr [eax]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_FC], xmm0
movzx	edx, byte ptr [eax]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_F8], xmm0
movzx	ecx, byte ptr [eax]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_F4], xmm0
movzx	edx, byte ptr [eax]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_F0], xmm0
movzx	ecx, byte ptr [eax]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_EC], xmm0
movzx	edx, byte ptr [eax]
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_E8], xmm0
movzx	eax, byte ptr [eax+1]
add	eax, 0FFFFFF80h
cvtsi2ss xmm0, eax
mov	eax, [ebx+ebp*4+4]
movss	[esp+124h+var_E4], xmm0
movzx	ecx, byte ptr [eax+esi]
add	eax, esi
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_E0], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_DC], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_D8], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_D4], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_D0], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
inc	eax
movss	[esp+124h+var_CC], xmm0
movzx	ecx, byte ptr [eax]
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_C8], xmm0
movzx	edx, byte ptr [eax+1]
mov	eax, [ebx+ebp*4+8]
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_C4], xmm0
movzx	ecx, byte ptr [eax+esi]
add	eax, esi
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_C0], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_BC], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_B8], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_B4], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_B0], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_AC], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_A8], xmm0
movzx	edx, byte ptr [eax+1]
mov	eax, [ebx+ebp*4+0Ch]
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_A4], xmm0
movzx	ecx, byte ptr [eax+esi]
add	eax, esi
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_A0], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_9C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_98], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_94], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_90], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
inc	eax
movss	[esp+124h+var_8C], xmm0
movzx	ecx, byte ptr [eax]
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_88], xmm0
movzx	edx, byte ptr [eax+1]
mov	eax, [ebx+ebp*4+10h]
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_84], xmm0
add	eax, esi
movzx	ecx, byte ptr [eax]
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_80], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_7C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_78], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_74], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_70], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_6C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_68], xmm0
movzx	edx, byte ptr [eax+1]
mov	eax, [ebx+ebp*4+14h]
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_64], xmm0
movzx	ecx, byte ptr [eax+esi]
add	eax, esi
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_60], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_5C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_58], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_54], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_50], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_4C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_48], xmm0
movzx	edx, byte ptr [eax+1]
mov	eax, [ebx+ebp*4+18h]
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
add	eax, esi
movss	[esp+124h+var_44], xmm0
movzx	ecx, byte ptr [eax]
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_40], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_3C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_38], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_34], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_30], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_2C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_28], xmm0
movzx	edx, byte ptr [eax+1]
mov	eax, [ebx+ebp*4+1Ch]
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_24], xmm0
movzx	ecx, byte ptr [eax+esi]
add	eax, esi
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_20], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_1C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_18], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_14], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_10], xmm0
movzx	edx, byte ptr [eax+1]
inc	eax
add	edx, 0FFFFFF80h
cvtsi2ss xmm0, edx
movss	[esp+124h+var_C], xmm0
movzx	ecx, byte ptr [eax+1]
inc	eax
add	ecx, 0FFFFFF80h
cvtsi2ss xmm0, ecx
movss	[esp+124h+var_8], xmm0
movzx	edx, byte ptr [eax+1]
add	edx, 0FFFFFF80h
lea	eax, [esp+124h+var_100]
cvtsi2ss xmm0, edx
push	eax
movss	[esp+128h+var_4], xmm0
call	[esp+128h+var_10C]
add	esp, 4
fld	ds:dbl_14662A0
xor	edi, edi

loc_815217:
mov	ecx, [esp+124h+var_104]
fld	dword ptr [ecx+edi*4]
fmul	[esp+edi*4+124h+var_100]
fstp	[esp+124h+var_108]
fld	[esp+124h+var_108]
fadd	st, st(1)
call	__ftol2_sse
mov	ecx, [esp+124h+var_114]
mov	edx, 4000h
sub	ax, dx
mov	[ecx+edi*2], ax
inc	edi
cmp	edi, 40h
jl	short loc_815217
sub	[esp+124h+var_114], 0FFFFFF80h
fstp	st
add	esi, 8
sub	[esp+124h+var_110], 1
jnz	loc_814CF3
pop	edi
pop	esi

loc_81525E:
pop	ebp
pop	ebx
add	esp, 114h
retn
sub_814C90 endp

align 10h



sub_815270 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, [edi+4]
mov	ecx, [eax]
push	30h
push	1
push	edi
call	ecx
mov	esi, eax
mov	[edi+158h], esi
mov	dword ptr [esi], offset	sub_814610
mov	eax, [edi+0B8h]
xor	ebx, ebx
add	esp, 0Ch
sub	eax, ebx
jz	short loc_8152D8
sub	eax, 1
jz	short loc_8152CF
sub	eax, 1
jz	short loc_8152BF
mov	edx, [edi]
mov	dword ptr [edx+14h], 30h
mov	eax, [edi]
mov	ecx, [eax]
push	edi
call	ecx
add	esp, 4
jmp	short loc_8152E6

loc_8152BF:
mov	dword ptr [esi+4], offset sub_814C90
mov	dword ptr [esi+1Ch], offset sub_8189D0
jmp	short loc_8152E6

loc_8152CF:
mov	dword ptr [esi+8], offset sub_818300
jmp	short loc_8152DF

loc_8152D8:
mov	dword ptr [esi+8], offset sub_817FE0

loc_8152DF:
mov	dword ptr [esi+4], offset sub_814910

loc_8152E6:
pop	edi
mov	[esi+0Ch], ebx
mov	[esi+20h], ebx
mov	[esi+10h], ebx
mov	[esi+24h], ebx
mov	[esi+14h], ebx
mov	[esi+28h], ebx
mov	[esi+18h], ebx
mov	[esi+2Ch], ebx
pop	esi
pop	ebx
retn
sub_815270 endp

align 10h



sub_815310 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

cmp	[esp+arg_4], 0
push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, [edi+144h]
jz	short loc_815336
mov	eax, [edi]
mov	dword ptr [eax+14h], 4
mov	ecx, [edi]
mov	edx, [ecx]
push	edi
call	edx
add	esp, 4

loc_815336:
mov	eax, [edi+20h]
mov	[esi+30h], eax
mov	dword ptr [esi+34h], 0
mov	dword ptr [esi+38h], 0
mov	ecx, [edi+0DCh]
add	ecx, ecx
pop	edi
mov	[esi+3Ch], ecx
pop	esi
retn
sub_815310 endp

align 10h



sub_815360 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

mov	eax, [esp+arg_8]
mov	ecx, [eax]
sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	edi
mov	edi, [ebx+144h]
cmp	ecx, [esp+18h+arg_C]
jnb	loc_815556
push	ebp
push	esi

loc_815381:
mov	ebp, [esp+20h+arg_14]
mov	edx, [esp+20h+arg_18]
cmp	[ebp+0], edx
jnb	loc_815554
mov	eax, [esp+20h+arg_8]
mov	ecx, [eax]
mov	esi, [ebx+0DCh]
sub	esi, [edi+34h]
mov	eax, [esp+20h+arg_C]
mov	edx, [ebx+150h]
mov	edx, [edx+4]
sub	eax, ecx
cmp	esi, eax
cmovnb	esi, eax
mov	eax, [edi+34h]
push	esi
push	eax
lea	eax, [edi+8]
push	eax
mov	eax, [esp+2Ch+arg_4]
lea	ecx, [eax+ecx*4]
push	ecx
push	ebx
call	edx
mov	eax, [esp+34h+arg_8]
add	[eax], esi
add	[edi+34h], esi
mov	eax, [edi+34h]
add	esp, 14h
sub	[edi+30h], esi
jnz	loc_815465
cmp	eax, [ebx+0DCh]
jge	loc_815465
cmp	dword ptr [ebx+3Ch], 0
mov	[esp+20h+arg_0], 0
jle	short loc_81545C
lea	eax, [edi+8]
mov	[esp+20h+var_10], eax

loc_815402:
mov	eax, [ebx+0DCh]
mov	esi, [edi+34h]
cmp	esi, eax
mov	ecx, [ebx+1Ch]
mov	edx, [esp+20h+var_10]
mov	ebp, [edx]
mov	[esp+20h+var_4], eax
mov	[esp+20h+var_C], ecx
jge	short loc_815445
lea	eax, [esi-1]
mov	[esp+20h+var_8], eax

loc_815427:
mov	ecx, [esp+20h+var_C]
mov	edx, [esp+20h+var_8]
push	ecx
push	1
push	esi
push	ebp
push	edx
push	ebp
call	sub_8098F0
inc	esi
add	esp, 18h
cmp	esi, [esp+20h+var_4]
jl	short loc_815427

loc_815445:
mov	eax, [esp+20h+arg_0]
add	[esp+20h+var_10], 4
inc	eax
cmp	eax, [ebx+3Ch]
mov	[esp+20h+arg_0], eax
jl	short loc_815402
mov	ebp, [esp+20h+arg_14]

loc_81545C:
mov	eax, [ebx+0DCh]
mov	[edi+34h], eax

loc_815465:
mov	ecx, [edi+34h]
cmp	ecx, [ebx+0DCh]
jnz	short loc_815498
mov	eax, [ebp+0]
mov	ecx, [esp+20h+arg_10]
mov	edx, [ebx+154h]
mov	edx, [edx+4]
push	eax
push	ecx
push	0
lea	eax, [edi+8]
push	eax
push	ebx
call	edx
add	esp, 14h
mov	dword ptr [edi+34h], 0
inc	dword ptr [ebp+0]

loc_815498:
cmp	dword ptr [edi+30h], 0
jnz	short loc_8154A7
mov	eax, [ebp+0]
cmp	eax, [esp+20h+arg_18]
jb	short loc_8154BF

loc_8154A7:
mov	ecx, [esp+20h+arg_C]
mov	edx, [esp+20h+arg_8]
cmp	[edx], ecx
jb	loc_815381
pop	esi
pop	ebp
pop	edi
pop	ebx
add	esp, 10h
retn

loc_8154BF:
cmp	dword ptr [ebx+3Ch], 0
mov	edx, [ebx+44h]
mov	[esp+20h+arg_0], 0
jle	loc_81554D
add	edx, 0Ch
mov	[esp+20h+arg_8], edx
jmp	short loc_8154E0
align 10h

loc_8154E0:
mov	ecx, [edx]
mov	eax, [ebp+0]
mov	ebp, [edx+10h]
imul	eax, ecx
mov	edi, [esp+20h+arg_0]
mov	esi, ecx
imul	esi, [esp+20h+arg_18]
mov	ecx, [esp+20h+arg_10]
mov	ecx, [ecx+edi*4]
add	ebp, ebp
add	ebp, ebp
add	ebp, ebp
cmp	eax, esi
mov	[esp+20h+arg_C], ecx
mov	edi, eax
jge	short loc_815534
dec	eax
mov	[esp+20h+var_4], eax
jmp	short loc_815518

loc_815514:
mov	ecx, [esp+20h+arg_C]

loc_815518:
mov	edx, [esp+20h+var_4]
push	ebp
push	1
push	edi
push	ecx
push	edx
push	ecx
call	sub_8098F0
inc	edi
add	esp, 18h
cmp	edi, esi
jl	short loc_815514
mov	edx, [esp+20h+arg_8]

loc_815534:
mov	eax, [esp+20h+arg_0]
mov	ebp, [esp+20h+arg_14]
inc	eax
add	edx, 54h
cmp	eax, [ebx+3Ch]
mov	[esp+20h+arg_0], eax
mov	[esp+20h+arg_8], edx
jl	short loc_8154E0

loc_81554D:
mov	eax, [esp+20h+arg_18]
mov	[ebp+0], eax

loc_815554:
pop	esi
pop	ebp

loc_815556:
pop	edi
pop	ebx
add	esp, 10h
retn
sub_815360 endp

align 10h



sub_815560 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 14h
push	ebx
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	eax, [esi+0DCh]
mov	ebx, [esi+144h]
push	edi
mov	edi, [esp+20h+arg_14]
mov	ecx, [edi]
lea	eax, [eax+eax*2]
mov	[esp+20h+var_4], eax
cmp	ecx, [esp+20h+arg_18]
jnb	loc_815744
push	ebp
mov	edi, edi

loc_815590:
mov	edx, [esp+24h+arg_8]
mov	edx, [edx]
mov	eax, [esp+24h+arg_C]
cmp	edx, eax
jnb	loc_815654
mov	ecx, [ebx+34h]
mov	ebp, [ebx+3Ch]
sub	ebp, ecx
sub	eax, edx
mov	[esp+24h+var_14], ebp
cmp	ebp, eax
jb	short loc_8155BA
mov	[esp+24h+var_14], eax
mov	ebp, eax

loc_8155BA:
mov	eax, [esi+150h]
mov	eax, [eax+4]
push	ebp
push	ecx
mov	ecx, [esp+2Ch+arg_4]
lea	edi, [ebx+8]
push	edi
lea	edx, [ecx+edx*4]
push	edx
push	esi
call	eax
mov	ecx, [ebx+30h]
add	esp, 14h
cmp	ecx, [esi+20h]
jnz	short loc_81563F
cmp	dword ptr [esi+3Ch], 0
mov	[esp+24h+arg_0], 0
jle	short loc_81563F
mov	eax, [esi+0DCh]
mov	[esp+24h+var_10], edi

loc_8155F7:
mov	edi, 1
cmp	eax, edi
jl	short loc_81562C
or	ebp, 0FFFFFFFFh

loc_815603:
mov	ecx, [esi+1Ch]
mov	edx, [esp+24h+var_10]
mov	eax, [edx]
push	ecx
push	1
push	ebp
push	eax
push	0
push	eax
call	sub_8098F0
mov	eax, [esi+0DCh]
inc	edi
add	esp, 18h
dec	ebp
cmp	edi, eax
jle	short loc_815603
mov	ebp, [esp+24h+var_14]

loc_81562C:
mov	ecx, [esp+24h+arg_0]
add	[esp+24h+var_10], 4
inc	ecx
cmp	ecx, [esi+3Ch]
mov	[esp+24h+arg_0], ecx
jl	short loc_8155F7

loc_81563F:
mov	eax, [esp+24h+arg_8]
add	[eax], ebp
add	[ebx+34h], ebp
sub	[ebx+30h], ebp
mov	edi, [esp+24h+arg_14]
jmp	loc_8156DD

loc_815654:
cmp	dword ptr [ebx+30h], 0
jnz	loc_815743
mov	edx, [ebx+34h]
cmp	edx, [ebx+3Ch]
jge	short loc_8156DD
cmp	dword ptr [esi+3Ch], 0
mov	[esp+24h+arg_0], 0
jle	short loc_8156D7
lea	eax, [ebx+8]
mov	[esp+24h+var_10], eax
jmp	short loc_815680
align 10h

loc_815680:
mov	eax, [ebx+3Ch]
mov	edi, [ebx+34h]
cmp	edi, eax
mov	ecx, [esi+1Ch]
mov	edx, [esp+24h+var_10]
mov	ebp, [edx]
mov	[esp+24h+var_8], eax
mov	[esp+24h+var_14], ecx
jge	short loc_8156C0
lea	eax, [edi-1]
mov	[esp+24h+var_C], eax

loc_8156A2:
mov	ecx, [esp+24h+var_14]
mov	edx, [esp+24h+var_C]
push	ecx
push	1
push	edi
push	ebp
push	edx
push	ebp
call	sub_8098F0
inc	edi
add	esp, 18h
cmp	edi, [esp+24h+var_8]
jl	short loc_8156A2

loc_8156C0:
mov	eax, [esp+24h+arg_0]
add	[esp+24h+var_10], 4
inc	eax
cmp	eax, [esi+3Ch]
mov	[esp+24h+arg_0], eax
jl	short loc_815680
mov	edi, [esp+24h+arg_14]

loc_8156D7:
mov	eax, [ebx+3Ch]
mov	[ebx+34h], eax

loc_8156DD:
mov	ecx, [ebx+34h]
cmp	ecx, [ebx+3Ch]
jnz	short loc_815737
mov	eax, [edi]
mov	ecx, [esp+24h+arg_10]
mov	edx, [esi+154h]
mov	edx, [edx+4]
push	eax
mov	eax, [ebx+38h]
push	ecx
push	eax
lea	ecx, [ebx+8]
push	ecx
push	esi
call	edx
inc	dword ptr [edi]
mov	eax, [esi+0DCh]
add	[ebx+38h], eax
mov	eax, [esp+38h+var_4]
add	esp, 14h
cmp	[ebx+38h], eax
jl	short loc_81571F
mov	dword ptr [ebx+38h], 0

loc_81571F:
cmp	[ebx+34h], eax
jl	short loc_81572B
mov	dword ptr [ebx+34h], 0

loc_81572B:
mov	ecx, [esi+0DCh]
add	ecx, [ebx+34h]
mov	[ebx+3Ch], ecx

loc_815737:
mov	edx, [esp+24h+arg_18]
cmp	[edi], edx
jb	loc_815590

loc_815743:
pop	ebp

loc_815744:
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn
sub_815560 endp

align 10h



sub_815750 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 20h
mov	eax, [edi+3Ch]
mov	ecx, [edi+4]
push	ebx
mov	ebx, [edi+144h]
push	esi
mov	esi, [edi+0DCh]
imul	eax, esi
lea	edx, [eax+eax*4]
mov	eax, [ecx]
add	edx, edx
add	edx, edx
push	edx
push	1
push	edi
call	eax
mov	edx, [edi+44h]
add	esp, 0Ch
cmp	dword ptr [edi+3Ch], 0
mov	[esp+28h+var_20], eax
mov	[esp+28h+var_10], 0
jle	loc_815865
lea	ecx, [esi+esi*2]
add	ecx, ecx
add	ecx, ecx
mov	[esp+28h+var_8], ecx
lea	ecx, [esi+esi*4]
add	ecx, ecx
add	ecx, ecx
push	ebp
mov	[esp+2Ch+var_4], ecx
lea	ecx, [edx+8]
lea	ebp, [eax+esi*4]
add	ebx, 8
mov	[esp+2Ch+var_1C], ecx
mov	[esp+2Ch+var_14], ebp
mov	[esp+2Ch+var_C], ebx
jmp	short loc_8157C7

loc_8157C3:
mov	ecx, [esp+2Ch+var_1C]

loc_8157C7:
lea	eax, [esi+esi*2]
push	eax
mov	eax, [ecx+14h]
imul	eax, [edi+0D8h]
add	eax, eax
add	eax, eax
add	eax, eax
cdq
idiv	dword ptr [ecx]
mov	ebx, [edi+4]
mov	ecx, [ebx+8]
push	eax
push	1
push	edi
call	ecx
mov	edx, [esp+3Ch+var_8]
push	edx
mov	ebx, eax
push	ebx
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 1Ch
test	esi, esi
jle	short loc_815832
mov	ebp, [esp+2Ch+var_20]
mov	eax, esi
shl	eax, 4
add	eax, ebp
mov	ecx, ebx
lea	edx, [ebx+esi*8]
sub	ebp, ebx
mov	[esp+2Ch+var_18], esi

loc_815815:
mov	ebx, [edx]
mov	[ecx+ebp], ebx
mov	ebx, [ecx]
mov	[eax], ebx
add	edx, 4
add	ecx, 4
add	eax, 4
sub	[esp+2Ch+var_18], 1
jnz	short loc_815815
mov	ebp, [esp+2Ch+var_14]

loc_815832:
mov	ecx, [esp+2Ch+var_C]
mov	eax, [esp+2Ch+var_4]
add	[esp+2Ch+var_20], eax
add	[esp+2Ch+var_1C], 54h
mov	[ecx], ebp
add	ebp, eax
mov	eax, [esp+2Ch+var_10]
inc	eax
add	ecx, 4
cmp	eax, [edi+3Ch]
mov	[esp+2Ch+var_14], ebp
mov	[esp+2Ch+var_10], eax
mov	[esp+2Ch+var_C], ecx
jl	loc_8157C3
pop	ebp

loc_815865:
pop	esi
pop	ebx
add	esp, 20h
retn
sub_815750 endp

align 10h



sub_815870 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

cmp	[esp+arg_4], 0
push	edi
mov	edi, [esp+4+arg_0]
jz	short loc_81588F
mov	eax, [edi]
mov	dword ptr [eax+14h], 4
mov	ecx, [edi]
mov	edx, [ecx]
push	edi
call	edx
add	esp, 4

loc_81588F:
mov	eax, [edi+4]
mov	ecx, [eax]
push	40h
push	1
push	edi
call	ecx
mov	[edi+144h], eax
mov	dword ptr [eax], offset	sub_815310
mov	edx, [edi+154h]
add	esp, 0Ch
cmp	byte ptr [edx+8], 0
jz	short loc_8158C4
mov	dword ptr [eax+4], offset sub_815560
call	sub_815750
pop	edi
retn

loc_8158C4:
push	ebp
mov	dword ptr [eax+4], offset sub_815360
mov	ecx, [edi+44h]
xor	ebp, ebp
cmp	[edi+3Ch], ebp
jle	short loc_815919
push	ebx
push	esi
lea	esi, [ecx+8]
lea	ebx, [eax+8]
mov	edi, edi

loc_8158E0:
mov	eax, [esi+14h]
imul	eax, [edi+0D8h]
mov	edx, [edi+0DCh]
add	eax, eax
add	eax, eax
push	edx
add	eax, eax
cdq
idiv	dword ptr [esi]
mov	ecx, [edi+4]
push	eax
mov	eax, [ecx+8]
push	1
push	edi
call	eax
mov	[ebx], eax
inc	ebp
add	esp, 10h
add	ebx, 4
add	esi, 54h
cmp	ebp, [edi+3Ch]
jl	short loc_8158E0
pop	esi
pop	ebx

loc_815919:
pop	ebp
pop	edi
retn
sub_815870 endp

align 10h



sub_815920 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
push	edi
mov	edi, eax
sub	edi, ebx
test	edi, edi
jle	short loc_815966
push	esi
xor	esi, esi
test	ebp, ebp
jle	short loc_815965
jmp	short loc_815940
align 10h

loc_815940:
mov	eax, [esp+10h+arg_0]
mov	eax, [eax+esi*4]
mov	cl, [eax+ebx-1]
add	eax, ebx
mov	byte ptr [esp+10h+var_4], cl
mov	edx, [esp+10h+var_4]
push	edi		; size_t
push	edx		; int
push	eax		; void *
call	_memset
inc	esi
add	esp, 0Ch
cmp	esi, ebp
jl	short loc_815940

loc_815965:
pop	esi

loc_815966:
pop	edi
pop	ebp
pop	ecx
retn
sub_815920 endp

align 10h



sub_815970 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
cmp	dword ptr [ebx+3Ch], 0
push	ebp
mov	ebp, [ebx+154h]
push	edi
mov	edi, [ebx+44h]
mov	[esp+14h+arg_0], 0
jle	short loc_8159F0
mov	eax, [esp+14h+arg_8]
lea	ecx, ds:0[eax*4]
mov	eax, [esp+14h+arg_C]
push	esi
mov	esi, [esp+18h+arg_4]
add	ebp, 0Ch
sub	eax, esi
mov	[esp+18h+var_4], ecx
mov	[esp+18h+var_8], eax
jmp	short loc_8159B8

loc_8159B4:
mov	eax, [esp+18h+var_8]

loc_8159B8:
mov	edx, [edi+0Ch]
imul	edx, [esp+18h+arg_10]
mov	eax, [eax+esi]
lea	ecx, [eax+edx*4]
mov	edx, [esi]
add	edx, [esp+18h+var_4]
mov	eax, [ebp+0]
push	ecx
push	edx
push	edi
push	ebx
call	eax
mov	eax, [esp+28h+arg_0]
inc	eax
add	esp, 10h
add	esi, 4
add	ebp, 4
add	edi, 54h
cmp	eax, [ebx+3Ch]
mov	[esp+18h+arg_0], eax
jl	short loc_8159B4
pop	esi

loc_8159F0:
pop	edi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_815970 endp

align 10h



sub_815A00 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 2Ch
push	ebx
mov	ebx, [esp+30h+arg_0]
mov	eax, [ebx+0D8h]
cdq
push	ebp
push	esi
mov	esi, [esp+38h+arg_4]
idiv	dword ptr [esi+8]
mov	ecx, [esi+1Ch]
add	ecx, ecx
push	edi
add	ecx, ecx
add	ecx, ecx
mov	[esp+3Ch+var_C], ecx
mov	ebp, eax
mov	eax, [ebx+0DCh]
cdq
idiv	dword ptr [esi+0Ch]
mov	esi, eax
imul	esi, ebp
mov	[esp+3Ch+var_14], eax
mov	eax, esi
cdq
sub	eax, edx
mov	edi, eax
mov	eax, ebp
imul	eax, ecx
mov	ecx, [ebx+0DCh]
mov	ebx, [ebx+1Ch]
push	ecx
mov	ecx, [esp+40h+arg_8]
sar	edi, 1
push	ecx
mov	[esp+44h+var_8], esi
mov	[esp+44h+var_4], edi
call	sub_815920
mov	edx, [esp+44h+arg_4]
xor	ecx, ecx
add	esp, 8
cmp	[edx+0Ch], ecx
mov	[esp+3Ch+var_10], ecx
jle	loc_815B5F
mov	eax, [esp+3Ch+arg_8]
mov	[esp+3Ch+var_28], eax

loc_815A83:
mov	edx, [esp+3Ch+arg_C]
mov	eax, [edx+ecx*4]
mov	[esp+3Ch+var_1C], eax
mov	eax, [esp+3Ch+var_C]
mov	[esp+3Ch+var_2C], 0
test	eax, eax
jbe	loc_815B41
mov	[esp+3Ch+var_18], eax

loc_815AA6:
mov	eax, [esp+3Ch+var_14]
xor	ecx, ecx
mov	[esp+3Ch+var_24], ecx
test	eax, eax
jle	short loc_815B1C
mov	edx, [esp+3Ch+var_28]
mov	[esp+3Ch+arg_0], edx
mov	[esp+3Ch+var_20], eax

loc_815AC0:
mov	eax, [esp+3Ch+arg_0]
mov	eax, [eax]
add	eax, [esp+3Ch+var_2C]
xor	edx, edx
xor	esi, esi
xor	edi, edi
cmp	ebp, 2
jl	short loc_815AF7
lea	ecx, [ebp-2]
shr	ecx, 1
inc	ecx
lea	edi, [ecx+ecx]
mov	edi, edi

loc_815AE0:
movzx	ebx, byte ptr [eax]
add	edx, ebx
movzx	ebx, byte ptr [eax+1]
add	esi, ebx
add	eax, 2
sub	ecx, 1
jnz	short loc_815AE0
mov	ecx, [esp+3Ch+var_24]

loc_815AF7:
cmp	edi, ebp
jge	short loc_815B00
movzx	eax, byte ptr [eax]
add	ecx, eax

loc_815B00:
add	[esp+3Ch+arg_0], 4
add	esi, edx
add	ecx, esi
sub	[esp+3Ch+var_20], 1
mov	[esp+3Ch+var_24], ecx
jnz	short loc_815AC0
mov	esi, [esp+3Ch+var_8]
mov	edi, [esp+3Ch+var_4]

loc_815B1C:
lea	eax, [ecx+edi]
cdq
idiv	esi
mov	ecx, [esp+3Ch+var_1C]
add	[esp+3Ch+var_2C], ebp
inc	ecx
sub	[esp+3Ch+var_18], 1
mov	[esp+3Ch+var_1C], ecx
mov	[ecx-1], al
jnz	loc_815AA6
mov	ecx, [esp+3Ch+var_10]

loc_815B41:
mov	eax, [esp+3Ch+var_14]
mov	edx, [esp+3Ch+arg_4]
add	eax, eax
add	eax, eax
add	[esp+3Ch+var_28], eax
inc	ecx
cmp	ecx, [edx+0Ch]
mov	[esp+3Ch+var_10], ecx
jl	loc_815A83

loc_815B5F:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn
sub_815A00 endp

align 10h



sub_815B70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_8]
push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+1Ch]
mov	ecx, [esi+0DCh]
push	edi
mov	edi, [esp+0Ch+arg_C]
push	eax
push	ecx
push	0
push	edi
push	0
push	edx
call	sub_8098F0
mov	eax, [esp+24h+arg_4]
mov	eax, [eax+1Ch]
mov	ecx, [esi+0DCh]
mov	ebx, [esi+1Ch]
add	eax, eax
add	eax, eax
push	ecx
add	eax, eax
push	edi
call	sub_815920
add	esp, 20h
pop	edi
pop	esi
pop	ebx
retn
sub_815B70 endp

align 10h



sub_815BC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 8
mov	ecx, [esp+8+arg_0]
mov	edx, [ecx+0DCh]
push	ebx
mov	ebx, [ecx+1Ch]
push	ebp
mov	ebp, [esp+10h+arg_8]
push	esi
mov	esi, [esp+14h+arg_4]
push	edi
mov	edi, [esi+1Ch]
add	edi, edi
add	edi, edi
add	edi, edi
push	edx
lea	eax, [edi+edi]
push	ebp
mov	[esp+20h+var_8], edi
call	sub_815920
add	esp, 8
cmp	dword ptr [esi+0Ch], 0
mov	[esp+18h+arg_0], 0
jle	short loc_815C58
mov	edx, [esp+18h+arg_C]
sub	edx, ebp
mov	[esp+18h+var_4], edx
mov	edi, edi

loc_815C10:
mov	ecx, [edx+ebp]
mov	eax, [ebp+0]
xor	esi, esi
test	edi, edi
jbe	short loc_815C43
lea	esp, [esp+0]

loc_815C20:
movzx	edx, byte ptr [eax+1]
movzx	ebx, byte ptr [eax]
add	edx, esi
add	ebx, edx
sar	ebx, 1
mov	[ecx], bl
inc	ecx
xor	esi, 1
add	eax, 2
sub	edi, 1
jnz	short loc_815C20
mov	edi, [esp+18h+var_8]
mov	edx, [esp+18h+var_4]

loc_815C43:
mov	eax, [esp+18h+arg_0]
mov	ecx, [esp+18h+arg_4]
inc	eax
add	ebp, 4
cmp	eax, [ecx+0Ch]
mov	[esp+18h+arg_0], eax
jl	short loc_815C10

loc_815C58:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_815BC0 endp




sub_815C60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	ecx, [esp+10h+arg_0]
mov	edx, [ecx+0DCh]
push	ebx
mov	ebx, [ecx+1Ch]
push	ebp
mov	ebp, [esp+18h+arg_4]
mov	eax, [ebp+1Ch]
add	eax, eax
add	eax, eax
push	esi
mov	esi, [esp+1Ch+arg_8]
add	eax, eax
push	edx
mov	[esp+20h+var_10], eax
add	eax, eax
push	esi
call	sub_815920
xor	ebx, ebx
add	esp, 8
cmp	[ebp+0Ch], ebx
mov	[esp+1Ch+var_8], ebx
jle	loc_815D22
mov	edx, esi
mov	[esp+1Ch+var_C], edx
push	edi
lea	ebx, [ebx+0]

loc_815CB0:
cmp	[esp+20h+var_10], 0
mov	eax, [esp+20h+arg_C]
mov	esi, [eax+ebx*4]
mov	eax, [edx]
mov	ecx, [edx+4]
mov	edi, 1
jbe	short loc_815D10
mov	edx, [esp+20h+var_10]
mov	[esp+20h+arg_0], edx

loc_815CD0:
movzx	edx, byte ptr [ecx+1]
movzx	ebx, byte ptr [eax+1]
add	edx, ebx
movzx	ebx, byte ptr [ecx]
mov	[esp+20h+var_4], ecx
movzx	ecx, byte ptr [eax]
add	ebx, edi
add	ebx, edx
add	ecx, ebx
sar	ecx, 2
mov	[esi], cl
mov	ecx, [esp+20h+var_4]
inc	esi
xor	edi, 3
add	eax, 2
add	ecx, 2
sub	[esp+20h+arg_0], 1
jnz	short loc_815CD0
mov	ebp, [esp+20h+arg_4]
mov	ebx, [esp+20h+var_8]
mov	edx, [esp+20h+var_C]

loc_815D10:
inc	ebx
add	edx, 8
cmp	ebx, [ebp+0Ch]
mov	[esp+20h+var_C], edx
mov	[esp+20h+var_8], ebx
jl	short loc_815CB0
pop	edi

loc_815D22:
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_815C60 endp

align 10h



sub_815D30 proc	near

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 28h
mov	eax, [esp+28h+arg_4]
push	ebx
push	ebp
mov	ebp, [esp+30h+arg_8]
push	esi
mov	esi, [eax+1Ch]
push	edi
mov	edi, [esp+38h+arg_0]
mov	ecx, [edi+0DCh]
mov	ebx, [edi+1Ch]
add	esi, esi
add	ecx, 2
add	esi, esi
push	ecx
add	esi, esi
add	ebp, 0FFFFFFFCh
lea	eax, [esi+esi]
push	ebp
call	sub_815920
mov	eax, [edi+0B4h]
lea	edx, [eax+eax*4]
shl	edx, 4
mov	ecx, 4000h
sub	ecx, edx
shl	eax, 4
mov	[esp+40h+arg_0], ecx
mov	[esp+40h+arg_8], eax
mov	eax, [esp+40h+arg_4]
xor	ecx, ecx
add	esp, 8
cmp	[eax+0Ch], ecx
mov	[esp+38h+var_C], ecx
jle	loc_815FA2
add	esi, 0FFFFFFFEh
mov	[esp+38h+var_4], esi
mov	eax, ebp
mov	[esp+38h+var_10], ebp

loc_815DA6:
mov	ebx, [eax+8]
mov	edx, [esp+38h+arg_C]
mov	esi, [edx+ecx*4]
mov	edx, [eax+4]
mov	ecx, [eax]
mov	eax, [eax+0Ch]
lea	ebp, [edx+2]
mov	[esp+38h+var_1C], ebp
movzx	ebp, byte ptr [eax]
mov	[esp+38h+var_28], ebp
movzx	ebp, byte ptr [ecx]
mov	[esp+38h+var_8], ebp
movzx	ebp, byte ptr [ebx]
mov	[esp+38h+var_20], ebp
movzx	ebp, byte ptr [edx]
mov	[esp+38h+var_24], ebp
lea	ebp, [eax+2]
movzx	eax, byte ptr [eax+1]
mov	[esp+38h+var_14], ebp
lea	ebp, [ecx+2]
movzx	ecx, byte ptr [ecx+1]
add	eax, ecx
movzx	ecx, byte ptr [ebx+2]
add	ecx, [esp+38h+var_24]
movzx	edx, byte ptr [edx+1]
add	ecx, eax
mov	eax, [esp+38h+var_8]
mov	[esp+38h+var_18], ebp
mov	ebp, [esp+38h+var_1C]
movzx	ebp, byte ptr [ebp+0]
lea	edi, [ebx+2]
add	ebp, ecx
mov	ecx, [esp+38h+var_18]
movzx	ecx, byte ptr [ecx]
add	ebp, [esp+38h+var_20]
add	ecx, eax
add	ebp, eax
add	ebp, [esp+38h+var_28]
mov	eax, [esp+38h+var_14]
movzx	eax, byte ptr [eax]
lea	ecx, [ecx+ebp*2]
add	eax, ecx
movzx	ecx, byte ptr [ebx+1]
add	ecx, [esp+38h+var_24]
add	eax, [esp+38h+var_28]
add	edx, ecx
add	edx, [esp+38h+var_20]
imul	eax, [esp+38h+arg_8]
imul	edx, [esp+38h+arg_0]
lea	eax, [eax+edx+8000h]
mov	edx, [esp+38h+var_4]
sar	eax, 10h
mov	[esi], al
mov	eax, [esp+38h+var_1C]
inc	esi
mov	ecx, edi
mov	edi, [esp+38h+var_14]
mov	[esp+38h+var_28], esi
mov	esi, [esp+38h+var_18]
mov	[esp+38h+var_14], edx
test	edx, edx
jbe	loc_815F10
lea	esp, [esp+0]

loc_815E80:
movzx	ebx, byte ptr [esi+1]
movzx	edx, byte ptr [edi+1]
add	edx, ebx
movzx	ebx, byte ptr [ecx-1]
add	edx, ebx
movzx	ebx, byte ptr [eax-1]
add	edx, ebx
movzx	ebx, byte ptr [edi]
add	edx, ebx
movzx	ebx, byte ptr [ecx+2]
add	edx, ebx
movzx	ebx, byte ptr [esi]
add	edx, ebx
movzx	ebx, byte ptr [eax+2]
add	edx, ebx
movzx	ebx, byte ptr [edi-1]
movzx	ebp, byte ptr [eax+1]
lea	edx, [ebx+edx*2]
movzx	ebx, byte ptr [esi-1]
add	edx, ebx
movzx	ebx, byte ptr [esi+2]
add	edx, ebx
movzx	ebx, byte ptr [edi+2]
add	edx, ebx
movzx	ebx, byte ptr [ecx+1]
imul	edx, [esp+38h+arg_8]
add	ebx, ebp
movzx	ebp, byte ptr [ecx]
add	ebx, ebp
movzx	ebp, byte ptr [eax]
add	ebx, ebp
imul	ebx, [esp+38h+arg_0]
mov	ebp, [esp+38h+var_28]
lea	edx, [edx+ebx+8000h]
sar	edx, 10h
mov	[ebp+0], dl
inc	ebp
add	eax, 2
add	ecx, 2
add	esi, 2
add	edi, 2
sub	[esp+38h+var_14], 1
mov	[esp+38h+var_28], ebp
jnz	loc_815E80

loc_815F10:
movzx	ebx, byte ptr [ecx-1]
movzx	ebp, byte ptr [eax-1]
movzx	edx, byte ptr [eax+1]
add	ebx, ebp
movzx	ebp, byte ptr [edi]
add	ebp, edx
mov	[esp+38h+var_14], edx
movzx	edx, byte ptr [esi]
add	ebp, ebx
movzx	ebx, byte ptr [esi+1]
movzx	esi, byte ptr [esi-1]
add	edx, ebp
mov	ebp, edx
movzx	edx, byte ptr [ecx+1]
movzx	ecx, byte ptr [ecx]
add	ecx, [esp+38h+var_14]
add	ebp, edx
mov	[esp+38h+var_18], edx
movzx	edx, byte ptr [edi+1]
movzx	edi, byte ptr [edi-1]
add	ebp, ebx
add	ebp, edx
add	edi, ebx
lea	edi, [edi+ebp*2]
add	esi, edi
add	esi, edx
movzx	edx, byte ptr [eax]
imul	esi, [esp+38h+arg_8]
add	edx, ecx
add	edx, [esp+38h+var_18]
mov	ecx, [esp+38h+var_28]
imul	edx, [esp+38h+arg_0]
lea	eax, [esi+edx+8000h]
mov	edx, [esp+38h+arg_4]
sar	eax, 10h
mov	[ecx], al
mov	ecx, [esp+38h+var_C]
mov	eax, [esp+38h+var_10]
inc	ecx
add	eax, 8
cmp	ecx, [edx+0Ch]
mov	[esp+38h+var_10], eax
mov	[esp+38h+var_C], ecx
jl	loc_815DA6

loc_815FA2:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_815D30 endp

align 10h



sub_815FB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
mov	ecx, [esp+18h+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+20h+arg_4]
push	esi
mov	esi, [ebp+1Ch]
push	edi
mov	edi, [esp+28h+arg_0]
mov	eax, [edi+0DCh]
mov	ebx, [edi+1Ch]
add	esi, esi
add	eax, 2
add	esi, esi
push	eax
add	ecx, 0FFFFFFFCh
add	esi, esi
push	ecx
mov	eax, esi
call	sub_815920
mov	eax, [edi+0B4h]
mov	ecx, 80h
sub	ecx, eax
shl	ecx, 9
mov	[esp+30h+var_14], ecx
xor	ecx, ecx
shl	eax, 6
add	esp, 8
cmp	[ebp+0Ch], ecx
mov	[esp+28h+var_18], eax
mov	[esp+28h+var_C], ecx
jle	loc_81611F
mov	eax, [esp+28h+arg_8]
add	esi, 0FFFFFFFEh
add	eax, 4
mov	[esp+28h+var_4], esi
mov	[esp+28h+var_8], eax

loc_816023:
mov	edx, [esp+28h+arg_C]
mov	ecx, [edx+ecx*4]
mov	edi, [eax-8]
mov	ebp, [eax]
movzx	edx, byte ptr [edi]
movzx	ebx, byte ptr [edi+1]
mov	[esp+28h+arg_0], ecx
mov	ecx, [eax-4]
movzx	esi, byte ptr [ecx]
movzx	eax, byte ptr [ebp+0]
add	eax, esi
add	edx, eax
movzx	eax, byte ptr [ebp+1]
inc	ebp
inc	edi
mov	[esp+28h+arg_8], edx
add	eax, ebx
movzx	ebx, byte ptr [ecx+1]
add	edx, edx
sub	edx, esi
imul	esi, [esp+28h+var_14]
inc	ecx
add	eax, ebx
mov	ebx, [esp+28h+var_4]
add	edx, eax
imul	edx, [esp+28h+var_18]
lea	edx, [edx+esi+8000h]
mov	esi, [esp+28h+arg_0]
sar	edx, 10h
mov	[esi], dl
mov	edx, [esp+28h+arg_8]
inc	esi
mov	[esp+28h+arg_0], esi
mov	[esp+28h+arg_8], eax
mov	[esp+28h+var_10], ebx
test	ebx, ebx
jbe	short loc_8160DF

loc_816094:
movzx	ebx, byte ptr [edi+1]
movzx	esi, byte ptr [ecx]
movzx	eax, byte ptr [ebp+1]
inc	edi
inc	ebp
sub	edx, esi
imul	esi, [esp+28h+var_14]
inc	ecx
add	eax, ebx
movzx	ebx, byte ptr [ecx]
add	eax, ebx
add	edx, eax
add	edx, [esp+28h+arg_8]
imul	edx, [esp+28h+var_18]
lea	edx, [edx+esi+8000h]
mov	esi, [esp+28h+arg_0]
sar	edx, 10h
mov	[esi], dl
mov	edx, [esp+28h+arg_8]
inc	esi
sub	[esp+28h+var_10], 1
mov	[esp+28h+arg_0], esi
mov	[esp+28h+arg_8], eax
jnz	short loc_816094

loc_8160DF:
movzx	ecx, byte ptr [ecx]
add	eax, eax
sub	eax, ecx
imul	ecx, [esp+28h+var_14]
add	eax, edx
imul	eax, [esp+28h+var_18]
mov	edx, [esp+28h+arg_4]
lea	ecx, [eax+ecx+8000h]
mov	eax, [esp+28h+var_8]
sar	ecx, 10h
mov	[esi], cl
mov	ecx, [esp+28h+var_C]
inc	ecx
add	eax, 4
cmp	ecx, [edx+0Ch]
mov	[esp+28h+var_C], ecx
mov	[esp+28h+var_8], eax
jl	loc_816023

loc_81611F:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_815FB0 endp

align 10h



sub_816130 proc	near

var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
mov	esi, [esp+10h+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	34h
push	1
push	esi
mov	[esp+1Ch+var_5], 1
call	ecx
mov	ebx, eax
mov	[esi+154h], ebx
add	esp, 0Ch
mov	dword ptr [ebx], offset	nullsub_2
mov	dword ptr [ebx+4], offset sub_815970
mov	byte ptr [ebx+8], 0
cmp	byte ptr [esi+0B3h], 0
mov	[esp+10h+arg_0], ebx
jz	short loc_816186
mov	edx, [esi]
mov	dword ptr [edx+14h], 19h
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_816186:
cmp	dword ptr [esi+3Ch], 0
mov	eax, [esi+44h]
mov	[esp+10h+var_4], 0
jle	loc_81627D
push	ebp
push	edi
lea	ebp, [eax+0Ch]
lea	edi, [ebx+0Ch]

loc_8161A3:
mov	ecx, [ebp-4]
mov	eax, [esi+0D8h]
cmp	ecx, eax
jnz	short loc_8161DE
mov	edx, [ebp+0]
cmp	edx, [esi+0DCh]
jnz	short loc_8161DE
cmp	dword ptr [esi+0B4h], 0
jz	short loc_8161D3
mov	dword ptr [edi], offset	sub_815FB0
mov	byte ptr [ebx+8], 1
jmp	loc_816263

loc_8161D3:
mov	dword ptr [edi], offset	sub_815B70
jmp	loc_816263

loc_8161DE:
lea	edx, [ecx+ecx]
cmp	edx, eax
jnz	short loc_81622F
mov	ebx, [ebp+0]
cmp	ebx, [esi+0DCh]
mov	ebx, [esp+18h+arg_0]
jnz	short loc_816201
mov	[esp+18h+var_5], 0
mov	dword ptr [edi], offset	sub_815BC0
jmp	short loc_816263

loc_816201:
cmp	edx, eax
jnz	short loc_81622F
mov	edx, [ebp+0]
add	edx, edx
cmp	edx, [esi+0DCh]
jnz	short loc_81622F
cmp	dword ptr [esi+0B4h], 0
jz	short loc_816227
mov	dword ptr [edi], offset	sub_815D30
mov	byte ptr [ebx+8], 1
jmp	short loc_816263

loc_816227:
mov	dword ptr [edi], offset	sub_815C60
jmp	short loc_816263

loc_81622F:
cdq
idiv	ecx
test	edx, edx
jnz	short loc_816250
mov	eax, [esi+0DCh]
cdq
idiv	dword ptr [ebp+0]
test	edx, edx
jnz	short loc_816250
mov	[esp+18h+var_5], dl
mov	dword ptr [edi], offset	sub_815A00
jmp	short loc_816263

loc_816250:
mov	eax, [esi]
mov	dword ptr [eax+14h], 26h
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_816263:
mov	eax, [esp+18h+var_4]
inc	eax
add	edi, 4
add	ebp, 54h
cmp	eax, [esi+3Ch]
mov	[esp+18h+var_4], eax
jl	loc_8161A3
pop	edi
pop	ebp

loc_81627D:
cmp	dword ptr [esi+0B4h], 0
jz	short loc_8162A3
cmp	[esp+10h+var_5], 0
jnz	short loc_8162A3
mov	eax, [esi]
mov	dword ptr [eax+14h], 63h
mov	ecx, [esi]
mov	edx, [ecx+4]
push	0
push	esi
call	edx
add	esp, 8

loc_8162A3:
pop	esi
pop	ebx
add	esp, 8
retn
sub_816130 endp

align 10h



sub_8162B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
mov	ecx, [eax+4]
mov	edx, [ecx]
push	ebx
push	ebp
push	esi
mov	esi, [eax+150h]
push	edi
push	2000h
push	1
push	eax
call	edx
xor	edx, edx
mov	[esi+8], eax
add	esp, 0Ch
xor	ebx, ebx
xor	edi, edi
xor	esi, esi
mov	[esp+18h+var_4], edx
mov	[esp+18h+var_8], edx
mov	[esp+18h+arg_0], offset	loc_807FFF
mov	ecx, 8000h
add	eax, 800h
jmp	short loc_816300
align 10h

loc_816300:
mov	ebp, [esp+18h+arg_0]
add	[esp+18h+arg_0], 8000h
mov	[eax+0C00h], ebp
mov	ebp, [esp+18h+var_8]
sub	[esp+18h+var_8], 6B2Fh
mov	[eax+1000h], ebp
mov	ebp, [esp+18h+var_4]
sub	[esp+18h+var_4], 14D1h
mov	[eax], ecx
mov	[eax-800h], edx
mov	[eax-400h], esi
mov	[eax+400h], edi
mov	[eax+800h], ebx
mov	[eax+1400h], ebp
add	ecx, 1D2Fh
add	edx, 4C8Bh
add	eax, 4
add	esi, 9646h
sub	edi, 2B33h
sub	ebx, 54CDh
cmp	ecx, 1D91D1h
jle	short loc_816300
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_8162B0 endp

align 10h



sub_816390 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 14h
sub	[esp+14h+arg_10], 1
mov	ecx, [esp+14h+arg_0]
mov	eax, [ecx+150h]
mov	ecx, [ecx+1Ch]
mov	eax, [eax+8]
mov	[esp+14h+var_14], ecx
js	loc_81649C
mov	edx, [esp+14h+arg_C]
push	ebx
push	ebp
push	esi
add	edx, edx
push	edi
mov	edi, [esp+24h+arg_8]
add	edx, edx

loc_8163C1:
mov	ecx, [esp+24h+arg_4]
mov	esi, [ecx]
mov	ebp, [edi+8]
mov	ebp, [edx+ebp]
add	ecx, 4
mov	[esp+24h+arg_4], ecx
mov	ecx, [edi]
mov	ebx, [edx+ecx]
mov	ecx, [edi+4]
mov	ecx, [edx+ecx]
mov	[esp+24h+arg_0], ebp
mov	ebp, [esp+24h+var_14]
add	edx, 4
mov	[esp+24h+var_4], edx
test	ebp, ebp
jbe	loc_81648D
mov	edx, [esp+24h+arg_0]
sub	ebx, ecx
sub	edx, ecx
mov	[esp+24h+var_10], ebx
mov	[esp+24h+var_8], edx
mov	[esp+24h+arg_0], ebp
lea	ebx, [ebx+0]

loc_816410:
movzx	edx, byte ptr [esi+2]
movzx	ebp, byte ptr [esi+1]
movzx	edi, byte ptr [esi]
mov	ebx, [esp+24h+var_10]
mov	[esp+24h+var_C], edx
mov	edx, [eax+edx*4+800h]
add	edx, [eax+ebp*4+400h]
add	esi, 3
add	edx, [eax+edi*4]
inc	ecx
sar	edx, 10h
mov	[ebx+ecx-1], dl
mov	edx, [esp+24h+var_C]
mov	ebx, [eax+edx*4+1400h]
add	ebx, [eax+ebp*4+1000h]
add	ebx, [eax+edi*4+0C00h]
sar	ebx, 10h
mov	[ecx-1], bl
mov	edx, [eax+edx*4+1C00h]
add	edx, [eax+ebp*4+1800h]
add	edx, [eax+edi*4+1400h]
mov	edi, [esp+24h+var_8]
sar	edx, 10h
sub	[esp+24h+arg_0], 1
mov	[edi+ecx-1], dl
jnz	short loc_816410
mov	edi, [esp+24h+arg_8]
mov	edx, [esp+24h+var_4]

loc_81648D:
sub	[esp+24h+arg_10], 1
jns	loc_8163C1
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_81649C:
add	esp, 14h
retn
sub_816390 endp




sub_8164A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 8
sub	[esp+8+arg_10],	1
mov	eax, [esp+8+arg_0]
mov	ecx, [eax+150h]
mov	edx, [eax+1Ch]
push	esi
mov	esi, [ecx+8]
mov	[esp+0Ch+var_8], edx
js	loc_816540
push	ebp
push	edi
mov	edi, [esp+14h+arg_C]
add	edi, edi
add	edi, edi
lea	ecx, [ecx+0]

loc_8164D0:
mov	ecx, [esp+14h+arg_4]
mov	eax, [ecx]
add	ecx, 4
mov	[esp+14h+arg_4], ecx
mov	ecx, [esp+14h+arg_8]
mov	ecx, [ecx]
mov	ecx, [edi+ecx]
mov	[esp+14h+arg_0], ecx
add	edi, 4
xor	ecx, ecx
mov	[esp+14h+var_4], edi
test	edx, edx
jbe	short loc_816537
jmp	short loc_816500
align 10h

loc_816500:
movzx	edx, byte ptr [eax+2]
movzx	ebp, byte ptr [eax+1]
mov	edx, [esi+edx*4+800h]
movzx	edi, byte ptr [eax]
add	edx, [esi+ebp*4+400h]
inc	ecx
add	edx, [esi+edi*4]
mov	edi, [esp+14h+arg_0]
sar	edx, 10h
mov	[ecx+edi-1], dl
mov	edx, [esp+14h+var_8]
add	eax, 3
cmp	ecx, edx
jb	short loc_816500
mov	edi, [esp+14h+var_4]

loc_816537:
sub	[esp+14h+arg_10], 1
jns	short loc_8164D0
pop	edi
pop	ebp

loc_816540:
pop	esi
add	esp, 8
retn
sub_8164A0 endp

align 10h



sub_816550 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 18h
sub	[esp+18h+arg_10], 1
mov	ecx, [esp+18h+arg_0]
mov	eax, [ecx+150h]
mov	ecx, [ecx+1Ch]
mov	eax, [eax+8]
mov	[esp+18h+var_14], ecx
js	loc_816692
mov	ecx, [esp+18h+arg_C]
push	ebx
push	ebp
push	esi
mov	esi, [esp+24h+arg_8]
add	ecx, ecx
push	edi
add	ecx, ecx

loc_816582:
mov	edi, [esp+28h+arg_4]
mov	edx, [edi]
mov	ebx, [esi+8]
mov	ebx, [ecx+ebx]
add	edi, 4
mov	[esp+28h+arg_4], edi
mov	edi, [esi]
mov	ebp, [ecx+edi]
mov	edi, [esi+4]
mov	edi, [ecx+edi]
mov	[esp+28h+var_10], ebx
mov	ebx, [esi+0Ch]
mov	ebx, [ecx+ebx]
mov	[esp+28h+var_18], ebx
mov	ebx, [esp+28h+var_14]
add	ecx, 4
mov	[esp+28h+arg_0], edx
mov	[esp+28h+var_4], ecx
test	ebx, ebx
jbe	loc_816683
mov	ecx, [esp+28h+var_18]
sub	ecx, ebp
mov	[esp+28h+var_C], ecx
mov	ecx, [esp+28h+var_10]
sub	edi, ebp
sub	ecx, ebp
mov	[esp+28h+var_8], edi
mov	[esp+28h+var_10], ecx
mov	[esp+28h+var_18], ebx
jmp	short loc_8165E9

loc_8165E5:
mov	edx, [esp+28h+arg_0]

loc_8165E9:
movzx	esi, byte ptr [edx]
movzx	edi, byte ptr [edx+1]
movzx	ebx, byte ptr [edx+2]
mov	dl, [edx+3]
mov	ecx, 0FFh
sub	ecx, esi
mov	esi, 0FFh
sub	esi, edi
mov	edi, 0FFh
sub	edi, ebx
mov	ebx, [esp+28h+var_C]
mov	[ebx+ebp], dl
mov	edx, [eax+edi*4+800h]
add	edx, [eax+esi*4+400h]
mov	ebx, [esp+28h+var_8]
add	edx, [eax+ecx*4]
add	[esp+28h+arg_0], 4
sar	edx, 10h
mov	[ebp+0], dl
mov	edx, [eax+edi*4+1400h]
add	edx, [eax+esi*4+1000h]
inc	ebp
add	edx, [eax+ecx*4+0C00h]
sar	edx, 10h
mov	[ebx+ebp-1], dl
mov	edx, [eax+edi*4+1C00h]
add	edx, [eax+esi*4+1800h]
add	edx, [eax+ecx*4+1400h]
mov	ecx, [esp+28h+var_10]
sar	edx, 10h
sub	[esp+28h+var_18], 1
mov	[ecx+ebp-1], dl
jnz	loc_8165E5
mov	esi, [esp+28h+arg_8]
mov	ecx, [esp+28h+var_4]

loc_816683:
sub	[esp+28h+arg_10], 1
jns	loc_816582
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_816692:
add	esp, 18h
retn
sub_816550 endp

align 10h



sub_8166A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	[esp+arg_10], 1
mov	eax, [esp+arg_0]
push	edi
mov	edi, [eax+1Ch]
mov	eax, [eax+24h]
mov	[esp+4+arg_0], eax
js	short loc_8166F8
mov	edx, [esp+4+arg_C]
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
add	edx, edx
push	esi
add	edx, edx

loc_8166C5:
mov	eax, [esp+10h+arg_8]
mov	eax, [eax]
mov	esi, [edx+eax]
mov	ecx, [ebp+0]
add	ebp, 4
add	edx, 4
xor	eax, eax
test	edi, edi
jbe	short loc_8166EE
lea	ecx, [ecx+0]

loc_8166E0:
mov	bl, [ecx]
add	ecx, [esp+10h+arg_0]
mov	[eax+esi], bl
inc	eax
cmp	eax, edi
jb	short loc_8166E0

loc_8166EE:
sub	[esp+10h+arg_10], 1
jns	short loc_8166C5
pop	esi
pop	ebp
pop	ebx

loc_8166F8:
pop	edi
retn
sub_8166A0 endp

align 10h



sub_816700 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	[esp+arg_10], 1
mov	eax, [esp+arg_0]
mov	edx, [eax+3Ch]
push	edi
mov	edi, [eax+1Ch]
js	short loc_81677A
mov	eax, [esp+4+arg_C]
push	ebx
lea	ecx, ds:0[eax*4]
push	ebp
mov	[esp+0Ch+arg_0], ecx
mov	eax, 4
push	esi
lea	esp, [esp+0]

loc_816730:
xor	ebp, ebp
test	edx, edx
jle	short loc_816768

loc_816736:
mov	eax, [esp+10h+arg_4]
mov	ecx, [eax]
mov	eax, [esp+10h+arg_8]
mov	eax, [eax+ebp*4]
mov	esi, [esp+10h+arg_0]
mov	esi, [esi+eax]
xor	eax, eax
test	edi, edi
jbe	short loc_81675E
add	ecx, ebp

loc_816752:
mov	bl, [ecx]
mov	[eax+esi], bl
inc	eax
add	ecx, edx
cmp	eax, edi
jb	short loc_816752

loc_81675E:
inc	ebp
cmp	ebp, edx
jl	short loc_816736
mov	eax, 4

loc_816768:
add	[esp+10h+arg_4], eax
add	[esp+10h+arg_0], eax
sub	[esp+10h+arg_10], 1
jns	short loc_816730
pop	esi
pop	ebp
pop	ebx

loc_81677A:
pop	edi
retn
sub_816700 endp

align 10h



sub_816780 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+4]
mov	ecx, [eax]
push	edi
push	0Ch
push	1
push	esi
call	ecx
mov	edi, eax
mov	[esi+150h], edi
mov	dword ptr [edi], offset	nullsub_2
mov	eax, [esi+28h]
dec	eax
mov	ebx, 4
add	esp, 0Ch
cmp	eax, ebx	; switch 5 cases
ja	short loc_8167CF ; default
jmp	ds:off_816980[eax*4] ; switch jump

loc_8167B8:		; jumptable 008167B1 case 0
cmp	dword ptr [esi+24h], 1
jz	short loc_8167E8
jmp	short loc_8167D5

loc_8167C0:		; jumptable 008167B1 cases 1,2
cmp	dword ptr [esi+24h], 3
jz	short loc_8167E8
jmp	short loc_8167D5

loc_8167C8:		; jumptable 008167B1 cases 3,4
cmp	[esi+24h], ebx
jz	short loc_8167E8
jmp	short loc_8167D5

loc_8167CF:		; default
cmp	dword ptr [esi+24h], 1
jge	short loc_8167E8

loc_8167D5:
mov	edx, [esi]
mov	dword ptr [edx+14h], 9
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8167E8:
mov	eax, [esi+40h]
lea	ecx, [eax-1]
cmp	ecx, ebx	; switch 5 cases
ja	loc_816954	; default
jmp	ds:off_816994[ecx*4] ; switch jump

loc_8167FD:		; jumptable 008167F6 case 0
cmp	dword ptr [esi+3Ch], 1
jz	short loc_816816
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_816816:
mov	eax, [esi+28h]
cmp	eax, 1
jz	short loc_816839
cmp	eax, 2
jnz	short loc_816834
mov	dword ptr [edi], offset	sub_8162B0
mov	dword ptr [edi+4], offset sub_8164A0
pop	edi
pop	esi
pop	ebx
retn

loc_816834:
cmp	eax, 3
jnz	short loc_816867

loc_816839:
mov	dword ptr [edi+4], offset sub_8166A0
pop	edi
pop	esi
pop	ebx
retn

loc_816844:		; jumptable 008167F6 case 1
cmp	dword ptr [esi+3Ch], 3
jz	short loc_81685D
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_81685D:
cmp	dword ptr [esi+28h], 2
jz	loc_816974

loc_816867:
mov	edx, [esi]
mov	dword ptr [edx+14h], 1Bh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
pop	edi
pop	esi
pop	ebx
retn

loc_81687E:		; jumptable 008167F6 case 2
cmp	dword ptr [esi+3Ch], 3
jz	short loc_816897
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_816897:
mov	eax, [esi+28h]
cmp	eax, 2
jnz	short loc_8168B0
mov	dword ptr [edi], offset	sub_8162B0
mov	dword ptr [edi+4], offset sub_816390
pop	edi
pop	esi
pop	ebx
retn

loc_8168B0:
cmp	eax, 3
jz	loc_816974
mov	edx, [esi]
mov	dword ptr [edx+14h], 1Bh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
pop	edi
pop	esi
pop	ebx
retn

loc_8168D0:		; jumptable 008167F6 case 3
cmp	[esi+3Ch], ebx
jz	short loc_8168E8
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_8168E8:
cmp	[esi+28h], ebx
jz	loc_816974
mov	edx, [esi]
mov	dword ptr [edx+14h], 1Bh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
pop	edi
pop	esi
pop	ebx
retn

loc_816908:		; jumptable 008167F6 case 4
cmp	[esi+3Ch], ebx
jz	short loc_816920
mov	edx, [esi]
mov	dword ptr [edx+14h], 0Ah
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4

loc_816920:
mov	eax, [esi+28h]
cmp	eax, ebx
jnz	short loc_816938
mov	dword ptr [edi], offset	sub_8162B0
mov	dword ptr [edi+4], offset sub_816550
pop	edi
pop	esi
pop	ebx
retn

loc_816938:
cmp	eax, 5
jz	short loc_816974
mov	edx, [esi]
mov	dword ptr [edx+14h], 1Bh
mov	eax, [esi]
mov	ecx, [eax]
push	esi
call	ecx
add	esp, 4
pop	edi
pop	esi
pop	ebx
retn

loc_816954:		; default
cmp	eax, [esi+28h]
jnz	short loc_816961
mov	edx, [esi+3Ch]
cmp	edx, [esi+24h]
jz	short loc_816974

loc_816961:
mov	eax, [esi]
mov	dword ptr [eax+14h], 1Bh
mov	ecx, [esi]
mov	edx, [ecx]
push	esi
call	edx
add	esp, 4

loc_816974:
mov	dword ptr [edi+4], offset sub_816700
pop	edi
pop	esi
pop	ebx
retn
sub_816780 endp

align 10h
off_816980 dd offset loc_8167B8	; jump table for switch	statement
dd offset loc_8167C0
dd offset loc_8167C0
dd offset loc_8167C8
dd offset loc_8167C8
off_816994 dd offset loc_8167FD	; jump table for switch	statement
dd offset loc_816844
dd offset loc_81687E
dd offset loc_8168D0
dd offset loc_816908
align 10h



sub_8169B0 proc	near

var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 138h
mov	eax, [esp+138h+arg_0]
mov	edx, [eax+120h]
mov	ecx, [esp+138h+arg_4]
push	ebx
mov	ebx, [ecx+50h]
push	ebp
push	esi
mov	esi, [esp+144h+arg_8]
sub	edx, 0FFFFFF80h
push	edi
mov	[esp+148h+var_10C], edx
mov	[esp+148h+var_124], esi
mov	[esp+148h+var_12C], ebx
lea	eax, [esp+148h+var_100]
mov	[esp+148h+var_114], 8

loc_8169F3:
movzx	ecx, word ptr [esi+10h]
mov	[esp+148h+var_120], ecx
test	cx, cx
jnz	short loc_816A56
cmp	[esi+20h], cx
jnz	short loc_816A56
cmp	[esi+30h], cx
jnz	short loc_816A56
cmp	[esi+40h], cx
jnz	short loc_816A56
cmp	[esi+50h], cx
jnz	short loc_816A56
cmp	[esi+60h], cx
jnz	short loc_816A56
cmp	[esi+70h], cx
jnz	short loc_816A56
movsx	ecx, word ptr [esi]
imul	ecx, [ebx]
add	ecx, ecx
add	ecx, ecx
mov	[eax], ecx
mov	[eax+20h], ecx
mov	[eax+40h], ecx
mov	[eax+60h], ecx
mov	[eax+80h], ecx
mov	[eax+0A0h], ecx
mov	[eax+0C0h], ecx
mov	[eax+0E0h], ecx
jmp	loc_816C12

loc_816A56:
movsx	ecx, word ptr [esi+20h]
imul	ecx, [ebx+40h]
movsx	edx, word ptr [esi+60h]
imul	edx, [ebx+0C0h]
lea	edi, [edx+ecx]
imul	edx, 3B21h
imul	ecx, 187Eh
imul	edi, 1151h
add	ecx, edi
mov	ebp, edi
movsx	edi, word ptr [esi+40h]
imul	edi, [ebx+80h]
sub	ebp, edx
movsx	edx, word ptr [esi]
imul	edx, [ebx]
mov	[esp+148h+var_130], edi
add	edi, edx
sub	edx, [esp+148h+var_130]
mov	[esp+148h+var_134], ecx
shl	edi, 0Dh
add	ecx, edi
sub	edi, [esp+148h+var_134]
shl	edx, 0Dh
mov	[esp+148h+var_104], ecx
lea	ecx, [edx+ebp]
sub	edx, ebp
mov	[esp+148h+var_108], edi
movsx	edi, word ptr [esp+148h+var_120]
imul	edi, [ebx+20h]
mov	[esp+148h+var_134], ecx
movsx	ecx, word ptr [esi+70h]
imul	ecx, [ebx+0E0h]
mov	[esp+148h+var_110], edx
movsx	edx, word ptr [esi+50h]
imul	edx, [ebx+0A0h]
movsx	esi, word ptr [esi+30h]
imul	esi, [ebx+60h]
lea	ebx, [ecx+edi]
mov	[esp+148h+var_128], ebx
lea	ebx, [edx+esi]
mov	[esp+148h+var_138], ebx
lea	ebp, [edx+edi]
imul	edi, 300Bh
imul	edx, 41B3h
mov	[esp+148h+var_11C], ebp
lea	ebx, [ecx+esi]
imul	ecx, 98Eh
imul	esi, 6254h
add	ebp, ebx
imul	ebx, 3EC5h
imul	ebp, 25A1h
mov	[esp+148h+var_118], ebp
mov	ebp, [esp+148h+var_128]
imul	ebp, 0FFFFE333h
mov	[esp+148h+var_128], ebp
mov	ebp, [esp+148h+var_138]
imul	ebp, 0FFFFADFDh
mov	[esp+148h+var_138], ebp
mov	ebp, [esp+148h+var_118]
sub	ebp, ebx
mov	ebx, [esp+148h+var_11C]
imul	ebx, 0C7Ch
mov	[esp+148h+var_130], ebp
mov	ebp, [esp+148h+var_118]
add	esi, [esp+148h+var_130]
sub	ebp, ebx
mov	ebx, [esp+148h+var_128]
add	esi, [esp+148h+var_138]
add	edi, ebp
add	ecx, ebx
add	ecx, [esp+148h+var_130]
add	edi, ebx
mov	ebx, [esp+148h+var_104]
add	edx, ebp
add	edx, [esp+148h+var_138]
lea	ebp, [ebx+edi+400h]
sub	ebx, edi
sar	ebp, 0Bh
add	ebx, 400h
mov	[eax], ebp
sar	ebx, 0Bh
mov	edi, [esp+148h+var_134]
mov	[eax+0E0h], ebx
lea	ebx, [edi+esi+400h]
sub	edi, esi
mov	esi, [esp+148h+var_110]
add	edi, 400h
sar	edi, 0Bh
mov	[eax+0C0h], edi
lea	edi, [esi+edx+400h]
sub	esi, edx
mov	edx, [esp+148h+var_108]
add	esi, 400h
sar	esi, 0Bh
mov	[eax+0A0h], esi
lea	esi, [edx+ecx+400h]
sub	edx, ecx
sar	ebx, 0Bh
sar	esi, 0Bh
add	edx, 400h
sar	edi, 0Bh
sar	edx, 0Bh
mov	[eax+20h], ebx
mov	ebx, [esp+148h+var_12C]
mov	[eax+60h], esi
mov	esi, [esp+148h+var_124]
mov	[eax+80h], edx
mov	edx, [esp+148h+var_10C]
mov	[eax+40h], edi

loc_816C12:
mov	ecx, [esp+148h+var_114]
dec	ecx
add	esi, 2
add	ebx, 4
add	eax, 4
mov	[esp+148h+var_12C], ebx
mov	[esp+148h+var_124], esi
mov	[esp+148h+var_114], ecx
test	ecx, ecx
jg	loc_8169F3
xor	edi, edi
lea	ecx, [esp+148h+var_100]
mov	[esp+148h+var_114], edi
mov	edi, edi

loc_816C40:
mov	eax, [esp+148h+arg_C]
mov	eax, [eax+edi*4]
mov	esi, [ecx+4]
add	eax, [esp+148h+arg_10]
test	esi, esi
jnz	short loc_816CA0
cmp	[ecx+8], esi
jnz	short loc_816CA0
cmp	[ecx+0Ch], esi
jnz	short loc_816CA0
cmp	[ecx+10h], esi
jnz	short loc_816CA0
cmp	[ecx+14h], esi
jnz	short loc_816CA0
cmp	[ecx+18h], esi
jnz	short loc_816CA0
cmp	[ecx+1Ch], esi
jnz	short loc_816CA0
mov	esi, [ecx]
add	esi, 10h
sar	esi, 5
and	esi, 3FFh
mov	bl, [esi+edx]
mov	[eax], bl
mov	[eax+1], bl
mov	[eax+2], bl
mov	[eax+3], bl
mov	[eax+5], bl
mov	[eax+6], bl
mov	[eax+7], bl
jmp	loc_816E9B

loc_816CA0:
mov	edx, [ecx+8]
mov	esi, [ecx+18h]
lea	edi, [esi+edx]
imul	edx, 187Eh
imul	esi, 3B21h
imul	edi, 1151h
add	edx, edi
mov	ebp, edx
mov	edx, [ecx+10h]
mov	ebx, edi
sub	ebx, esi
mov	esi, [ecx]
lea	edi, [esi+edx]
sub	esi, edx
shl	esi, 0Dh
shl	edi, 0Dh
mov	edx, esi
lea	esi, [edi+ebp]
sub	edi, ebp
lea	ebp, [edx+ebx]
sub	edx, ebx
mov	ebx, [ecx+14h]
mov	[esp+148h+var_110], edx
mov	edx, [ecx+1Ch]
mov	[esp+148h+var_120], ebx
mov	ebx, [ecx+0Ch]
mov	[esp+148h+var_124], edx
mov	[esp+148h+var_12C], ebx
mov	ebx, [ecx+4]
add	edx, ebx
mov	ebx, [esp+148h+var_120]
mov	[esp+148h+var_128], edx
mov	edx, [esp+148h+var_12C]
add	ebx, edx
mov	[esp+148h+var_138], ebx
mov	ebx, [esp+148h+var_124]
add	ebx, edx
mov	edx, [esp+148h+var_120]
mov	[esp+148h+var_130], ebx
mov	ebx, [ecx+4]
add	ebx, edx
mov	edx, [esp+148h+var_130]
mov	[esp+148h+var_11C], ebx
add	ebx, edx
imul	edx, 3EC5h
imul	ebx, 25A1h
mov	[esp+148h+var_118], ebx
mov	ebx, [esp+148h+var_128]
imul	ebx, 0FFFFE333h
mov	[esp+148h+var_128], ebx
mov	ebx, [esp+148h+var_138]
imul	ebx, 0FFFFADFDh
mov	[esp+148h+var_138], ebx
mov	ebx, [esp+148h+var_118]
sub	ebx, edx
mov	edx, [esp+148h+var_11C]
imul	edx, 0C7Ch
mov	[esp+148h+var_130], ebx
mov	ebx, [esp+148h+var_118]
sub	ebx, edx
mov	edx, [esp+148h+var_124]
imul	edx, 98Eh
add	edx, [esp+148h+var_128]
mov	[esp+148h+var_11C], ebx
add	edx, [esp+148h+var_130]
mov	[esp+148h+var_124], edx
mov	edx, [esp+148h+var_120]
imul	edx, 41B3h
add	edx, ebx
add	edx, [esp+148h+var_138]
mov	[esp+148h+var_120], edx
mov	edx, [esp+148h+var_12C]
imul	edx, 6254h
add	edx, [esp+148h+var_130]
add	edx, [esp+148h+var_138]
mov	[esp+148h+var_12C], edx
mov	edx, [ecx+4]
imul	edx, 300Bh
add	edx, ebx
add	edx, [esp+148h+var_128]
mov	[esp+148h+var_134], edx
lea	ebx, [esi+edx+20000h]
sub	esi, [esp+148h+var_134]
mov	edx, [esp+148h+var_10C]
sar	ebx, 12h
and	ebx, 3FFh
movzx	ebx, byte ptr [ebx+edx]
mov	[eax], bl
add	esi, 20000h
sar	esi, 12h
and	esi, 3FFh
movzx	ebx, byte ptr [esi+edx]
mov	esi, [esp+148h+var_12C]
mov	[eax+7], bl
lea	ebx, [esi+ebp+20000h]
sar	ebx, 12h
and	ebx, 3FFh
movzx	ebx, byte ptr [ebx+edx]
sub	ebp, esi
mov	esi, [esp+148h+var_110]
mov	[eax+1], bl
add	ebp, 20000h
sar	ebp, 12h
and	ebp, 3FFh
movzx	ebx, byte ptr [edx+ebp]
mov	ebp, [esp+148h+var_120]
mov	[eax+6], bl
lea	ebx, [esi+ebp+20000h]
sar	ebx, 12h
and	ebx, 3FFh
movzx	ebx, byte ptr [ebx+edx]
sub	esi, ebp
add	esi, 20000h
mov	[eax+2], bl
sar	esi, 12h
and	esi, 3FFh
movzx	ebx, byte ptr [esi+edx]
mov	esi, [esp+148h+var_124]
mov	[eax+5], bl
lea	ebx, [edi+esi+20000h]
sar	ebx, 12h
sub	edi, esi
and	ebx, 3FFh
movzx	ebx, byte ptr [ebx+edx]
add	edi, 20000h
sar	edi, 12h
and	edi, 3FFh
mov	[eax+3], bl
movzx	ebx, byte ptr [edi+edx]
mov	edi, [esp+148h+var_114]

loc_816E9B:
inc	edi
add	ecx, 20h
cmp	edi, 8
mov	[eax+4], bl
mov	[esp+148h+var_114], edi
jl	loc_816C40
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 138h
retn
sub_8169B0 endp

align 10h



sub_816EC0 proc	near

var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 124h
mov	eax, [esp+124h+arg_0]
mov	ecx, [esp+124h+arg_4]
mov	edx, [ecx+50h]
push	ebx
push	ebp
mov	ebp, [eax+120h]
push	esi
mov	esi, [esp+130h+arg_8]
sub	ebp, 0FFFFFF80h
push	edi
mov	[esp+134h+var_114], ebp
lea	ecx, [esp+134h+var_100]
mov	[esp+134h+var_118], 8
jmp	short loc_816F00
align 10h

loc_816F00:
movzx	eax, word ptr [esi+10h]
test	ax, ax
jnz	short loc_816F58
cmp	[esi+20h], ax
jnz	short loc_816F58
cmp	[esi+30h], ax
jnz	short loc_816F58
cmp	[esi+40h], ax
jnz	short loc_816F58
cmp	[esi+50h], ax
jnz	short loc_816F58
cmp	[esi+60h], ax
jnz	short loc_816F58
cmp	[esi+70h], ax
jnz	short loc_816F58
movsx	eax, word ptr [esi]
imul	eax, [edx]
mov	[ecx], eax
mov	[ecx+20h], eax
mov	[ecx+40h], eax
mov	[ecx+80h], eax
mov	[ecx+0A0h], eax
mov	[ecx+0C0h], eax
mov	[ecx+0E0h], eax
jmp	loc_817096

loc_816F58:
movsx	ebx, word ptr [esi+60h]
imul	ebx, [edx+0C0h]
movsx	edi, word ptr [esi]
imul	edi, [edx]
movsx	ebp, word ptr [esi+40h]
imul	ebp, [edx+80h]
movsx	eax, word ptr [esi+20h]
imul	eax, [edx+40h]
mov	[esp+134h+var_11C], ebx
lea	ebx, [edi+ebp]
sub	edi, ebp
mov	ebp, [esp+134h+var_11C]
add	ebp, eax
sub	eax, [esp+134h+var_11C]
mov	[esp+134h+var_124], ebp
imul	eax, 16Ah
sar	eax, 8
sub	eax, ebp
mov	[esp+134h+var_124], eax
lea	eax, [ebx+ebp]
sub	ebx, ebp
movsx	ebp, word ptr [esi+70h]
imul	ebp, [edx+0E0h]
mov	[esp+134h+var_10C], eax
mov	eax, [esp+134h+var_124]
mov	[esp+134h+var_11C], ebx
lea	ebx, [eax+edi]
sub	edi, eax
movzx	eax, word ptr [esi+10h]
mov	[esp+134h+var_108], ebx
mov	[esp+134h+var_104], edi
movsx	edi, word ptr [esi+50h]
imul	edi, [edx+0A0h]
movsx	ebx, ax
imul	ebx, [edx+20h]
movsx	eax, word ptr [esi+30h]
imul	eax, [edx+60h]
mov	[esp+134h+var_120], ebp
lea	ebp, [edi+eax]
sub	edi, eax
mov	eax, [esp+134h+var_120]
add	eax, ebx
sub	ebx, [esp+134h+var_120]
mov	[esp+134h+var_110], ebp
add	ebp, eax
sub	eax, [esp+134h+var_110]
mov	[esp+134h+var_120], ebp
lea	ebp, [ebx+edi]
imul	edi, 0FFFFFD63h
imul	ebx, 115h
imul	ebp, 1D9h
imul	eax, 16Ah
sar	ebp, 8
sar	edi, 8
sub	edi, [esp+134h+var_120]
sar	ebx, 8
add	edi, ebp
sub	ebx, ebp
sar	eax, 8
sub	eax, edi
add	ebx, eax
mov	[esp+134h+var_124], ebp
mov	ebp, [esp+134h+var_10C]
mov	[esp+134h+var_124], ebx
mov	ebx, [esp+134h+var_120]
add	ebx, ebp
sub	ebp, [esp+134h+var_120]
mov	[ecx], ebx
mov	[ecx+0E0h], ebp
mov	ebp, [esp+134h+var_108]
lea	ebx, [edi+ebp]
sub	ebp, edi
mov	edi, [esp+134h+var_104]
mov	[ecx+20h], ebx
lea	ebx, [eax+edi]
sub	edi, eax
mov	eax, [esp+134h+var_11C]
mov	[ecx+0A0h], edi
mov	edi, [esp+134h+var_124]
mov	[ecx+0C0h], ebp
mov	[ecx+40h], ebx
mov	ebp, [esp+134h+var_114]
lea	ebx, [edi+eax]
mov	[ecx+80h], ebx
sub	eax, edi

loc_817096:
mov	[ecx+60h], eax
mov	eax, [esp+134h+var_118]
dec	eax
add	esi, 2
add	edx, 4
add	ecx, 4
mov	[esp+134h+var_118], eax
test	eax, eax
jg	loc_816F00
xor	esi, esi
lea	edx, [esp+134h+var_100]
mov	[esp+134h+var_118], esi
lea	ecx, [ecx+0]

loc_8170C0:
mov	ecx, [esp+134h+arg_C]
mov	eax, [ecx+esi*4]
mov	ecx, [edx+4]
add	eax, [esp+134h+arg_10]
test	ecx, ecx
jnz	short loc_81711D
cmp	[edx+8], ecx
jnz	short loc_81711D
cmp	[edx+0Ch], ecx
jnz	short loc_81711D
cmp	[edx+10h], ecx
jnz	short loc_81711D
cmp	[edx+14h], ecx
jnz	short loc_81711D
cmp	[edx+18h], ecx
jnz	short loc_81711D
cmp	[edx+1Ch], ecx
jnz	short loc_81711D
mov	ecx, [edx]
sar	ecx, 5
and	ecx, 3FFh
mov	cl, [ecx+ebp]
mov	[eax], cl
mov	[eax+1], cl
mov	[eax+2], cl
mov	[eax+4], cl
mov	[eax+5], cl
mov	[eax+6], cl
mov	[eax+7], cl
jmp	loc_817278

loc_81711D:
mov	edi, [edx+10h]
mov	ecx, [edx]
lea	esi, [ecx+edi]
sub	ecx, edi
mov	edi, [edx+18h]
mov	ebx, ecx
mov	ecx, [edx+8]
add	edi, ecx
sub	ecx, [edx+18h]
mov	[esp+134h+var_124], edi
imul	ecx, 16Ah
sar	ecx, 8
sub	ecx, edi
mov	[esp+134h+var_124], ecx
lea	ecx, [edi+esi]
sub	esi, edi
mov	[esp+134h+var_10C], ecx
mov	ecx, [esp+134h+var_124]
mov	[esp+134h+var_11C], esi
lea	esi, [ecx+ebx]
sub	ebx, ecx
mov	ecx, [edx+0Ch]
mov	[esp+134h+var_108], esi
mov	esi, [edx+14h]
lea	edi, [esi+ecx]
sub	esi, ecx
mov	[esp+134h+var_104], ebx
mov	ebx, [edx+1Ch]
mov	[esp+134h+var_110], edi
mov	edi, [edx+4]
lea	ecx, [ebx+edi]
sub	edi, ebx
mov	ebx, [esp+134h+var_110]
add	ebx, ecx
sub	ecx, [esp+134h+var_110]
mov	[esp+134h+var_120], ebx
lea	ebx, [edi+esi]
imul	esi, 0FFFFFD63h
imul	ecx, 16Ah
imul	ebx, 1D9h
imul	edi, 115h
sar	esi, 8
sub	esi, [esp+134h+var_120]
sar	ecx, 8
sar	ebx, 8
add	esi, ebx
mov	[esp+134h+var_124], ebx
mov	ebx, esi
mov	esi, [esp+134h+var_10C]
sub	ecx, ebx
mov	[esp+134h+var_114], ecx
sar	edi, 8
sub	edi, [esp+134h+var_124]
add	edi, ecx
mov	ecx, [esp+134h+var_120]
add	ecx, esi
sub	esi, [esp+134h+var_120]
sar	ecx, 5
and	ecx, 3FFh
movzx	ecx, byte ptr [ecx+ebp]
sar	esi, 5
and	esi, 3FFh
mov	[eax], cl
movzx	ecx, byte ptr [esi+ebp]
mov	esi, [esp+134h+var_108]
mov	[eax+7], cl
lea	ecx, [ebx+esi]
sar	ecx, 5
sub	esi, ebx
and	ecx, 3FFh
movzx	ecx, byte ptr [ecx+ebp]
sar	esi, 5
and	esi, 3FFh
mov	[eax+1], cl
movzx	ecx, byte ptr [esi+ebp]
mov	esi, [esp+134h+var_104]
mov	[eax+6], cl
mov	ecx, [esp+134h+var_114]
lea	ebx, [ecx+esi]
sar	ebx, 5
and	ebx, 3FFh
mov	bl, [ebx+ebp]
sub	esi, ecx
sar	esi, 5
and	esi, 3FFh
mov	[eax+2], bl
movzx	ecx, byte ptr [esi+ebp]
mov	esi, [esp+134h+var_11C]
mov	[eax+5], cl
lea	ecx, [edi+esi]
sar	ecx, 5
and	ecx, 3FFh
movzx	ecx, byte ptr [ecx+ebp]
sub	esi, edi
sar	esi, 5
and	esi, 3FFh
mov	[eax+4], cl
movzx	ecx, byte ptr [esi+ebp]
mov	esi, [esp+134h+var_118]

loc_817278:
inc	esi
add	edx, 20h
cmp	esi, 8
mov	[eax+3], cl
mov	[esp+134h+var_118], esi
jl	loc_8170C0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 124h
retn
sub_816EC0 endp

align 10h



sub_8172A0 proc	near

var_124= dword ptr -124h
var_120= dword ptr -120h
var_11C= dword ptr -11Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
var_100= byte ptr -100h
var_F8=	byte ptr -0F8h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
fld	ds:dbl_1440CD8
mov	edx, [esp+arg_4]
mov	ecx, [esp+arg_8]
mov	edx, [edx+50h]
sub	esp, 124h
push	ebx
mov	ebx, [eax+120h]
push	ebp
push	esi
push	edi
sub	ebx, 0FFFFFF80h
lea	eax, [esp+134h+var_100]
mov	edi, 8

loc_8172D1:
movzx	esi, word ptr [ecx+10h]
test	si, si
jnz	short loc_81733B
cmp	[ecx+20h], si
jnz	short loc_81733B
cmp	[ecx+30h], si
jnz	short loc_81733B
cmp	[ecx+40h], si
jnz	short loc_81733B
cmp	[ecx+50h], si
jnz	short loc_81733B
cmp	[ecx+60h], si
jnz	short loc_81733B
cmp	[ecx+70h], si
jnz	short loc_81733B
movsx	esi, word ptr [ecx]
mov	[esp+134h+var_124], esi
fild	[esp+134h+var_124]
fmul	dword ptr [edx]
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fst	dword ptr [eax]
fst	dword ptr [eax+20h]
fst	dword ptr [eax+40h]
fst	dword ptr [eax+60h]
fst	dword ptr [eax+80h]
fst	dword ptr [eax+0A0h]
fst	dword ptr [eax+0C0h]
fstp	dword ptr [eax+0E0h]
jmp	loc_817577

loc_81733B:
movsx	ebp, word ptr [ecx]
mov	[esp+134h+var_124], ebp
movsx	ebp, word ptr [ecx+20h]
fild	[esp+134h+var_124]
mov	[esp+134h+var_124], ebp
movsx	ebp, word ptr [ecx+40h]
fmul	dword ptr [edx]
movsx	esi, si
fstp	[esp+134h+var_104]
fild	[esp+134h+var_124]
mov	[esp+134h+var_124], ebp
movsx	ebp, word ptr [ecx+60h]
fmul	dword ptr [edx+40h]
fstp	[esp+134h+var_10C]
fild	[esp+134h+var_124]
mov	[esp+134h+var_124], ebp
fmul	dword ptr [edx+80h]
fstp	[esp+134h+var_110]
fild	[esp+134h+var_124]
mov	[esp+134h+var_124], esi
movsx	esi, word ptr [ecx+30h]
fmul	dword ptr [edx+0C0h]
fstp	[esp+134h+var_118]
fld	[esp+134h+var_110]
fld	st
fld	[esp+134h+var_104]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_120]
fsubrp	st(1), st
fstp	[esp+134h+var_11C]
fld	[esp+134h+var_118]
fld	st
fld	[esp+134h+var_10C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_118]
fsubrp	st(1), st
fmul	st, st(1)
fld	[esp+134h+var_118]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_110]
fld	st
fld	[esp+134h+var_120]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_104]
fsubrp	st(1), st
fstp	[esp+134h+var_118]
fld	[esp+134h+var_110]
fld	st
fld	[esp+134h+var_11C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_10C]
fsubrp	st(1), st
fstp	[esp+134h+var_110]
fld	dword ptr [edx+20h]
fimul	[esp+134h+var_124]
mov	[esp+134h+var_124], esi
movsx	esi, word ptr [ecx+50h]
fstp	[esp+134h+var_120]
fild	[esp+134h+var_124]
mov	[esp+134h+var_124], esi
movsx	esi, word ptr [ecx+70h]
fmul	dword ptr [edx+60h]
fstp	[esp+134h+var_11C]
fild	[esp+134h+var_124]
mov	[esp+134h+var_124], esi
fmul	dword ptr [edx+0A0h]
fstp	[esp+134h+var_114]
fild	[esp+134h+var_124]
fmul	dword ptr [edx+0E0h]
fstp	[esp+134h+var_108]
fld	[esp+134h+var_114]
fld	st
fld	[esp+134h+var_11C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_11C]
fsubp	st(1), st
fstp	[esp+134h+var_124]
fld	[esp+134h+var_108]
fld	st
fld	[esp+134h+var_120]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_120]
fsubrp	st(1), st
fstp	[esp+134h+var_114]
fld	[esp+134h+var_120]
fld	st
fld	[esp+134h+var_11C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_108]
fld	[esp+134h+var_114]
fld	st
fld	[esp+134h+var_124]
fld	st
faddp	st(2), st
fxch	st(1)
fmul	ds:dbl_14662B8
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	st
fxch	st(2)
fmul	ds:dbl_14662B0
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	[esp+134h+var_108]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_114]
fxch	st(4)
fsubrp	st(3), st
fxch	st(2)
fmul	st, st(4)
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	[esp+134h+var_114]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_11C]
fxch	st(1)
fmul	ds:dbl_14662A8
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	[esp+134h+var_11C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_120]
fld	st(2)
fld	[esp+134h+var_104]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax]
fsubrp	st(3), st
fxch	st(2)
fstp	dword ptr [eax+0E0h]
fld	st
fld	[esp+134h+var_10C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+20h]
fsubrp	st(1), st
fstp	dword ptr [eax+0C0h]
fld	st
fld	[esp+134h+var_110]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+40h]
fsubrp	st(1), st
fstp	dword ptr [eax+0A0h]
fld	[esp+134h+var_120]
fld	st
fld	[esp+134h+var_118]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+80h]
fsubrp	st(1), st
fstp	dword ptr [eax+60h]

loc_817577:
dec	edi
add	ecx, 2
add	edx, 4
add	eax, 4
test	edi, edi
jg	loc_8172D1
xor	ebp, ebp
lea	edi, [esp+134h+var_F8]

loc_81758F:
fld	dword ptr [edi+8]
mov	eax, [esp+134h+arg_C]
fstp	[esp+134h+var_118]
mov	esi, [eax+ebp*4]
fld	dword ptr [edi-8]
add	esi, [esp+134h+arg_10]
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	st
fld	[esp+134h+var_118]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_120]
fsubp	st(1), st
fstp	[esp+134h+var_11C]
fld	dword ptr [edi+10h]
fstp	[esp+134h+var_124]
fld	dword ptr [edi]
fstp	[esp+134h+var_118]
fld	[esp+134h+var_124]
fld	st
fld	[esp+134h+var_118]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_118]
fsubrp	st(1), st
fmul	st, st(1)
fld	[esp+134h+var_118]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_110]
fld	st
fld	[esp+134h+var_120]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_104]
fsubrp	st(1), st
fstp	[esp+134h+var_118]
fld	[esp+134h+var_110]
fld	st
fld	[esp+134h+var_11C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_10C]
fsubrp	st(1), st
fstp	[esp+134h+var_110]
fld	dword ptr [edi+0Ch]
fstp	[esp+134h+var_120]
fld	dword ptr [edi+4]
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	st
fld	[esp+134h+var_120]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_11C]
fsubrp	st(1), st
fstp	[esp+134h+var_124]
fld	dword ptr [edi+14h]
fstp	[esp+134h+var_120]
fld	dword ptr [edi-4]
fstp	[esp+134h+var_114]
fld	[esp+134h+var_120]
fld	st
fld	[esp+134h+var_114]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_120]
fsubrp	st(1), st
fstp	[esp+134h+var_114]
fld	[esp+134h+var_120]
fld	st
fld	[esp+134h+var_11C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_108]
fld	[esp+134h+var_114]
fld	st
fld	[esp+134h+var_124]
fld	st
faddp	st(2), st
fxch	st(1)
fmul	ds:dbl_14662B8
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	st
fxch	st(2)
fmul	ds:dbl_14662B0
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	[esp+134h+var_108]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_114]
fxch	st(4)
fsubrp	st(3), st
fxch	st(2)
fmul	st, st(4)
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	[esp+134h+var_114]
fld	st
fsubp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_11C]
fxch	st(1)
fmul	ds:dbl_14662A8
fsubrp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_124]
fld	[esp+134h+var_124]
fld	[esp+134h+var_11C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+134h+var_120]
fld	st(2)
fld	[esp+134h+var_104]
fld	st
faddp	st(2), st
fxch	st(1)
call	__ftol2_sse
fsubrp	st(3), st
add	eax, 4
fxch	st(2)
sar	eax, 3
and	eax, 3FFh
movzx	ecx, byte ptr [eax+ebx]
mov	[esi], cl
call	__ftol2_sse
add	eax, 4
fld	st
sar	eax, 3
fld	[esp+134h+var_10C]
and	eax, 3FFh
movzx	edx, byte ptr [eax+ebx]
fld	st
faddp	st(2), st
fxch	st(1)
mov	[esi+7], dl
call	__ftol2_sse
add	eax, 4
sar	eax, 3
fsubrp	st(1), st
and	eax, 3FFh
movzx	eax, byte ptr [eax+ebx]
mov	[esi+1], al
call	__ftol2_sse
add	eax, 4
sar	eax, 3
and	eax, 3FFh
movzx	ecx, byte ptr [eax+ebx]
fld	st
fld	[esp+134h+var_110]
mov	[esi+6], cl
fld	st
faddp	st(2), st
fxch	st(1)
call	__ftol2_sse
fsubrp	st(1), st
add	eax, 4
sar	eax, 3
and	eax, 3FFh
movzx	edx, byte ptr [eax+ebx]
mov	[esi+2], dl
call	__ftol2_sse
add	eax, 4
fld	[esp+134h+var_120]
sar	eax, 3
fld	st
and	eax, 3FFh
fld	[esp+134h+var_118]
movzx	eax, byte ptr [eax+ebx]
fld	st
faddp	st(2), st
mov	[esi+5], al
fxch	st(1)
call	__ftol2_sse
add	eax, 4
sar	eax, 3
fsubrp	st(1), st
and	eax, 3FFh
movzx	ecx, byte ptr [eax+ebx]
mov	[esi+4], cl
call	__ftol2_sse
add	eax, 4
sar	eax, 3
and	eax, 3FFh
movzx	edx, byte ptr [eax+ebx]
inc	ebp
add	edi, 20h
cmp	ebp, 8
mov	[esi+3], dl
jl	loc_81758F
pop	edi
fstp	st
pop	esi
pop	ebp
pop	ebx
add	esp, 124h
retn
sub_8172A0 endp




sub_817820 proc	near

var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_84=	dword ptr -84h
var_80=	byte ptr -80h
var_60=	byte ptr -60h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 98h
mov	eax, [esp+98h+arg_0]
mov	ecx, [esp+98h+arg_4]
mov	edx, [ecx+50h]
push	ebx
mov	ebx, [eax+120h]
push	ebp
push	esi
mov	esi, [esp+0A4h+arg_8]
sub	ebx, 0FFFFFF80h
mov	eax, edx
add	esi, 60h
sub	eax, edx
push	edi
mov	edi, 8
lea	eax, [esp+eax+0A8h+var_60]
mov	[esp+0A8h+var_84], ebx
mov	[esp+0A8h+var_90], edi
mov	[esp+0A8h+var_88], eax

loc_817867:
cmp	edi, 4
jz	loc_8179AA
movzx	ecx, word ptr [esi-50h]
test	cx, cx
jnz	short loc_8178B1
cmp	[esi-40h], cx
jnz	short loc_8178B1
cmp	[esi-30h], cx
jnz	short loc_8178B1
cmp	[esi-10h], cx
jnz	short loc_8178B1
cmp	[esi], cx
jnz	short loc_8178B1
cmp	[esi+10h], cx
jnz	short loc_8178B1
movsx	ecx, word ptr [esi-60h]
imul	ecx, [edx]
add	ecx, ecx
add	ecx, ecx
mov	[eax-20h], ecx
mov	[eax], ecx
mov	[eax+20h], ecx
mov	[eax+40h], ecx
jmp	loc_8179AA

loc_8178B1:
movsx	ecx, word ptr [esi-40h]
imul	ecx, [edx+40h]
movsx	edi, word ptr [esi]
imul	ecx, 3B21h
imul	edi, [edx+0C0h]
movsx	eax, word ptr [esi-60h]
imul	edi, 187Eh
imul	eax, [edx]
movsx	ebx, word ptr [esi-30h]
imul	ebx, [edx+60h]
sub	ecx, edi
shl	eax, 0Eh
lea	edi, [ecx+eax]
sub	eax, ecx
movsx	ecx, word ptr [esi-10h]
imul	ecx, [edx+0A0h]
mov	ebp, eax
movsx	eax, word ptr [esi+10h]
imul	eax, [edx+0E0h]
mov	[esp+0A8h+var_94], eax
movzx	eax, word ptr [esi-50h]
mov	[esp+0A8h+var_8C], ebx
imul	ebx, 4587h
cwde
imul	eax, [edx+20h]
mov	[esp+0A8h+var_98], ecx
imul	ecx, 2E75h
sub	ecx, ebx
mov	ebx, eax
imul	eax, 5203h
imul	ebx, 21F9h
add	ecx, ebx
mov	ebx, [esp+0A8h+var_94]
imul	ebx, 6C2h
sub	ecx, ebx
mov	ebx, [esp+0A8h+var_8C]
imul	ebx, 1CCDh
add	eax, ebx
mov	ebx, [esp+0A8h+var_98]
imul	ebx, 133Eh
sub	eax, ebx
mov	ebx, [esp+0A8h+var_94]
imul	ebx, 1050h
sub	eax, ebx
lea	ebx, [edi+eax+800h]
mov	[esp+0A8h+var_98], eax
sub	edi, [esp+0A8h+var_98]
mov	eax, [esp+0A8h+var_88]
add	edi, 800h
sar	edi, 0Ch
mov	[eax+40h], edi
lea	edi, [ecx+ebp+800h]
sub	ebp, ecx
sar	ebx, 0Ch
sar	edi, 0Ch
add	ebp, 800h
sar	ebp, 0Ch
mov	[eax-20h], ebx
mov	ebx, [esp+0A8h+var_84]
mov	[eax], edi
mov	edi, [esp+0A8h+var_90]
mov	[eax+20h], ebp

loc_8179AA:
dec	edi
add	eax, 4
add	esi, 2
add	edx, 4
mov	[esp+0A8h+var_88], eax
mov	[esp+0A8h+var_90], edi
test	edi, edi
jg	loc_817867
xor	esi, esi
lea	ecx, [esp+0A8h+var_80]
mov	[esp+0A8h+var_90], esi
mov	edi, edi

loc_8179D0:
mov	edx, [esp+0A8h+arg_C]
mov	ebp, [edx+esi*4]
mov	edx, [ecx+4]
add	ebp, [esp+0A8h+arg_10]
test	edx, edx
jnz	short loc_817A1F
cmp	[ecx+8], edx
jnz	short loc_817A1F
cmp	[ecx+0Ch], edx
jnz	short loc_817A1F
cmp	[ecx+14h], edx
jnz	short loc_817A1F
cmp	[ecx+18h], edx
jnz	short loc_817A1F
cmp	[ecx+1Ch], edx
jnz	short loc_817A1F
mov	eax, [ecx]
add	eax, 10h
sar	eax, 5
and	eax, 3FFh
mov	al, [eax+ebx]
mov	[ebp+0], al
mov	[ebp+1], al
mov	[ebp+3], al
jmp	loc_817B08

loc_817A1F:
mov	eax, [ecx+8]
mov	esi, [ecx+18h]
imul	eax, 3B21h
mov	edi, [ecx]
imul	esi, 187Eh
mov	ebx, [ecx+0Ch]
sub	eax, esi
shl	edi, 0Eh
lea	esi, [eax+edi]
sub	edi, eax
mov	eax, [ecx+1Ch]
mov	[esp+0A8h+var_8C], ebx
imul	ebx, 4587h
mov	[esp+0A8h+var_94], eax
mov	eax, [ecx+14h]
mov	[esp+0A8h+var_98], eax
imul	eax, 2E75h
sub	eax, ebx
mov	ebx, edx
imul	edx, 5203h
imul	ebx, 21F9h
add	eax, ebx
mov	ebx, [esp+0A8h+var_94]
imul	ebx, 6C2h
sub	eax, ebx
mov	ebx, [esp+0A8h+var_8C]
imul	ebx, 1CCDh
add	edx, ebx
mov	ebx, [esp+0A8h+var_98]
imul	ebx, 133Eh
sub	edx, ebx
mov	ebx, [esp+0A8h+var_94]
imul	ebx, 1050h
sub	edx, ebx
mov	ebx, [esp+0A8h+var_84]
mov	[esp+0A8h+var_98], edx
lea	edx, [esi+edx+40000h]
sub	esi, [esp+0A8h+var_98]
sar	edx, 13h
and	edx, 3FFh
movzx	edx, byte ptr [edx+ebx]
add	esi, 40000h
mov	[ebp+0], dl
sar	esi, 13h
and	esi, 3FFh
movzx	edx, byte ptr [esi+ebx]
mov	esi, [esp+0A8h+var_90]
mov	[ebp+3], dl
lea	edx, [edi+eax+40000h]
sar	edx, 13h
sub	edi, eax
and	edx, 3FFh
movzx	edx, byte ptr [edx+ebx]
add	edi, 40000h
sar	edi, 13h
and	edi, 3FFh
mov	[ebp+1], dl
mov	al, [edi+ebx]

loc_817B08:
inc	esi
add	ecx, 20h
cmp	esi, 4
mov	[ebp+2], al
mov	[esp+0A8h+var_90], esi
jl	loc_8179D0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 98h
retn
sub_817820 endp

align 10h



sub_817B30 proc	near

var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 44h
mov	eax, [esp+44h+arg_0]
mov	eax, [eax+120h]
mov	ecx, [esp+44h+arg_4]
mov	ecx, [ecx+50h]
sub	eax, 0FFFFFF80h
push	ebx
mov	[esp+48h+var_44], eax
mov	eax, [esp+48h+arg_8]
push	ebp
push	esi
mov	edx, ecx
add	eax, 30h
mov	esi, 6
sub	edx, ecx
push	edi
mov	[esp+54h+arg_0], esi
lea	edi, [esp+edx+54h+var_3C]
jmp	short loc_817B70
align 10h

loc_817B70:
lea	edx, [esi+2]
cmp	edx, 6
jz	loc_817C23
cmp	edx, 4
jz	loc_817C23
cmp	edx, 2
jz	loc_817C23
movzx	ebx, word ptr [eax-20h]
test	bx, bx
jnz	short loc_817BB8
cmp	[eax], bx
jnz	short loc_817BB8
cmp	[eax+20h], bx
jnz	short loc_817BB8
cmp	[eax+40h], bx
jnz	short loc_817BB8
movsx	edx, word ptr [eax-30h]
imul	edx, [ecx]
add	edx, edx
add	edx, edx
mov	[edi-4], edx
jmp	short loc_817C20

loc_817BB8:
movsx	esi, word ptr [eax+20h]
imul	esi, [ecx+0A0h]
movsx	ebp, word ptr [eax+40h]
imul	esi, 1B37h
imul	ebp, [ecx+0E0h]
movsx	ebx, bx
imul	ebp, 1712h
imul	ebx, [ecx+20h]
movsx	edx, word ptr [eax-30h]
imul	ebx, 73FCh
imul	edx, [ecx]
sub	esi, ebp
add	esi, ebx
movsx	ebx, word ptr [eax]
imul	ebx, [ecx+60h]
imul	ebx, 28BAh
sub	esi, ebx
shl	edx, 0Fh
lea	ebx, [esi+edx+1000h]
sub	edx, esi
mov	esi, [esp+54h+arg_0]
sar	ebx, 0Dh
add	edx, 1000h
mov	[edi-4], ebx
sar	edx, 0Dh

loc_817C20:
mov	[edi+1Ch], edx

loc_817C23:
lea	edx, [esi+1]
cmp	edx, 6
jz	loc_817CD8
cmp	edx, 4
jz	loc_817CD8
cmp	edx, 2
jz	loc_817CD8
movzx	ebx, word ptr [eax-1Eh]
test	bx, bx
jnz	short loc_817C6C
cmp	[eax+2], bx
jnz	short loc_817C6C
cmp	[eax+22h], bx
jnz	short loc_817C6C
cmp	[eax+42h], bx
jnz	short loc_817C6C
movsx	edx, word ptr [eax-2Eh]
imul	edx, [ecx+4]
add	edx, edx
add	edx, edx
mov	[edi], edx
jmp	short loc_817CD5

loc_817C6C:
movsx	esi, word ptr [eax+22h]
imul	esi, [ecx+0A4h]
movsx	ebp, word ptr [eax+42h]
imul	esi, 1B37h
imul	ebp, [ecx+0E4h]
movsx	edx, word ptr [eax-2Eh]
imul	ebp, 1712h
imul	edx, [ecx+4]
sub	esi, ebp
movsx	ebp, word ptr [eax+2]
imul	ebp, [ecx+64h]
movsx	ebx, bx
imul	ebp, 28BAh
imul	ebx, [ecx+24h]
imul	ebx, 73FCh
sub	esi, ebp
add	esi, ebx
shl	edx, 0Fh
lea	ebx, [esi+edx+1000h]
sub	edx, esi
mov	esi, [esp+54h+arg_0]
sar	ebx, 0Dh
add	edx, 1000h
mov	[edi], ebx
sar	edx, 0Dh

loc_817CD5:
mov	[edi+20h], edx

loc_817CD8:
cmp	esi, 6
jz	loc_817D8C
cmp	esi, 4
jz	loc_817D8C
cmp	esi, 2
jz	loc_817D8C
movzx	ebx, word ptr [eax-1Ch]
test	bx, bx
jnz	short loc_817D1F
cmp	[eax+4], bx
jnz	short loc_817D1F
cmp	[eax+24h], bx
jnz	short loc_817D1F
cmp	[eax+44h], bx
jnz	short loc_817D1F
movsx	edx, word ptr [eax-2Ch]
imul	edx, [ecx+8]
add	edx, edx
add	edx, edx
mov	[edi+4], edx
jmp	short loc_817D89

loc_817D1F:
movsx	esi, word ptr [eax+24h]
imul	esi, [ecx+0A8h]
movsx	ebp, word ptr [eax+44h]
imul	esi, 1B37h
imul	ebp, [ecx+0E8h]
movsx	edx, word ptr [eax-2Ch]
imul	ebp, 1712h
imul	edx, [ecx+8]
sub	esi, ebp
movsx	ebp, word ptr [eax+4]
imul	ebp, [ecx+68h]
movsx	ebx, bx
imul	ebp, 28BAh
imul	ebx, [ecx+28h]
imul	ebx, 73FCh
sub	esi, ebp
add	esi, ebx
shl	edx, 0Fh
lea	ebx, [esi+edx+1000h]
sub	edx, esi
mov	esi, [esp+54h+arg_0]
sar	ebx, 0Dh
add	edx, 1000h
mov	[edi+4], ebx
sar	edx, 0Dh

loc_817D89:
mov	[edi+24h], edx

loc_817D8C:
lea	edx, [esi-1]
cmp	edx, 6
jz	loc_817E43
cmp	edx, 4
jz	loc_817E43
cmp	edx, 2
jz	loc_817E43
movzx	ebx, word ptr [eax-1Ah]
test	bx, bx
jnz	short loc_817DD6
cmp	[eax+6], bx
jnz	short loc_817DD6
cmp	[eax+26h], bx
jnz	short loc_817DD6
cmp	[eax+46h], bx
jnz	short loc_817DD6
movsx	edx, word ptr [eax-2Ah]
imul	edx, [ecx+0Ch]
add	edx, edx
add	edx, edx
mov	[edi+8], edx
jmp	short loc_817E40

loc_817DD6:
movsx	esi, word ptr [eax+26h]
imul	esi, [ecx+0ACh]
movsx	ebp, word ptr [eax+46h]
imul	esi, 1B37h
imul	ebp, [ecx+0ECh]
movsx	edx, word ptr [eax-2Ah]
imul	ebp, 1712h
imul	edx, [ecx+0Ch]
sub	esi, ebp
movsx	ebp, word ptr [eax+6]
imul	ebp, [ecx+6Ch]
movsx	ebx, bx
imul	ebp, 28BAh
imul	ebx, [ecx+2Ch]
imul	ebx, 73FCh
sub	esi, ebp
add	esi, ebx
shl	edx, 0Fh
lea	ebx, [esi+edx+1000h]
sub	edx, esi
mov	esi, [esp+54h+arg_0]
sar	ebx, 0Dh
add	edx, 1000h
mov	[edi+8], ebx
sar	edx, 0Dh

loc_817E40:
mov	[edi+28h], edx

loc_817E43:
sub	esi, 4
lea	edx, [esi+2]
add	eax, 8
add	ecx, 10h
add	edi, 10h
mov	[esp+54h+arg_0], esi
test	edx, edx
jg	loc_817B70
mov	ebp, [esp+54h+arg_C]
mov	edx, [ebp+0]
mov	ecx, [esp+54h+var_3C]
add	edx, [esp+54h+arg_10]
mov	esi, [esp+54h+var_24]
mov	edi, [esp+54h+var_2C]
mov	ebx, [esp+54h+var_34]
test	ecx, ecx
jnz	short loc_817EA3
test	ebx, ebx
jnz	short loc_817EA3
test	edi, edi
jnz	short loc_817EA3
test	esi, esi
jnz	short loc_817EA3
mov	eax, [esp+54h+var_40]
mov	ecx, [esp+54h+var_44]
add	eax, 10h
sar	eax, 5
and	eax, 3FFh
mov	al, [eax+ecx]
mov	[edx], al
jmp	short loc_817EF5

loc_817EA3:
mov	eax, [esp+54h+var_40]
imul	ecx, 73FCh
imul	ebx, 28BAh
imul	edi, 1B37h
imul	esi, 1712h
sub	ecx, ebx
add	ecx, edi
mov	edi, [esp+54h+var_44]
sub	ecx, esi
shl	eax, 0Fh
mov	esi, ecx
lea	ecx, [esi+eax+80000h]
sub	eax, esi
sar	ecx, 14h
add	eax, 80000h
and	ecx, 3FFh
mov	cl, [ecx+edi]
sar	eax, 14h
and	eax, 3FFh
mov	[edx], cl
mov	al, [eax+edi]

loc_817EF5:
mov	ecx, [esp+54h+var_1C]
mov	esi, [esp+54h+var_4]
mov	edi, [esp+54h+var_C]
mov	ebx, [esp+54h+var_14]
mov	[edx+1], al
mov	edx, [ebp+4]
add	edx, [esp+54h+arg_10]
test	ecx, ecx
jnz	short loc_817F43
test	ebx, ebx
jnz	short loc_817F43
test	edi, edi
jnz	short loc_817F43
test	esi, esi
jnz	short loc_817F43
mov	ecx, [esp+54h+var_20]
mov	eax, [esp+54h+var_44]
add	ecx, 10h
pop	edi
sar	ecx, 5
and	ecx, 3FFh
mov	al, [ecx+eax]
pop	esi
pop	ebp
mov	[edx], al
mov	[edx+1], al
pop	ebx
add	esp, 44h
retn

loc_817F43:
mov	eax, [esp+54h+var_20]
imul	ecx, 73FCh
imul	edi, 1B37h
imul	esi, 1712h
imul	ebx, 28BAh
add	ecx, edi
mov	edi, [esp+54h+var_44]
sub	ecx, esi
sub	ecx, ebx
shl	eax, 0Fh
mov	esi, ecx
lea	ecx, [esi+eax+80000h]
sub	eax, esi
sar	ecx, 14h
add	eax, 80000h
and	ecx, 3FFh
mov	cl, [ecx+edi]
sar	eax, 14h
mov	[edx], cl
and	eax, 3FFh
mov	al, [eax+edi]
pop	edi
pop	esi
pop	ebp
mov	[edx+1], al
pop	ebx
add	esp, 44h
retn
sub_817B30 endp




sub_817FA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_4]
mov	ecx, [eax+50h]
mov	edx, [esp+arg_8]
movsx	eax, word ptr [edx]
imul	eax, [ecx]
mov	ecx, [esp+arg_0]
mov	edx, [ecx+120h]
mov	ecx, [esp+arg_C]
mov	ecx, [ecx]
add	eax, 4
sar	eax, 3
and	eax, 3FFh
mov	dl, [eax+edx+80h]
mov	eax, [esp+arg_10]
mov	[eax+ecx], dl
retn
sub_817FA0 endp

align 10h



sub_817FE0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
mov	eax, [esp+18h+arg_0]
push	ebx
push	ebp
push	esi
mov	[esp+24h+var_10], 7
add	eax, 8
push	edi

loc_817FF6:
mov	esi, [eax+14h]
mov	edx, [eax-8]
mov	edi, [eax+10h]
lea	ecx, [edx+esi]
sub	edx, esi
mov	esi, [eax-4]
lea	ebx, [esi+edi]
mov	[esp+28h+var_C], ebx
mov	ebx, [eax+0Ch]
sub	esi, edi
mov	edi, [eax]
lea	ebp, [ebx+edi]
mov	[esp+28h+var_14], ebp
mov	ebp, [eax+8]
sub	edi, ebx
mov	ebx, [eax+4]
add	ebp, ebx
mov	[esp+28h+var_18], ebp
add	ebp, ecx
sub	ecx, [esp+28h+var_18]
sub	ebx, [eax+8]
mov	[esp+28h+var_8], ebp
mov	ebp, [esp+28h+var_14]
mov	[esp+28h+var_4], ecx
mov	ecx, [esp+28h+var_C]
add	ebp, ecx
sub	ecx, [esp+28h+var_14]
mov	[esp+28h+var_18], ebp
mov	[esp+28h+var_14], ecx
mov	ecx, [esp+28h+var_8]
add	ebp, ecx
sub	ecx, [esp+28h+var_18]
add	ebp, ebp
add	ebp, ebp
mov	[eax-8], ebp
mov	ebp, [esp+28h+var_4]
add	ecx, ecx
add	ecx, ecx
mov	[eax+8], ecx
mov	ecx, [esp+28h+var_14]
add	ecx, ebp
imul	ebp, 187Eh
imul	ecx, 1151h
lea	ebp, [ecx+ebp+400h]
sar	ebp, 0Bh
mov	[eax], ebp
mov	ebp, [esp+28h+var_14]
imul	ebp, 3B21h
sub	ecx, ebp
add	ecx, 400h
sar	ecx, 0Bh
mov	[eax+10h], ecx
lea	ecx, [ebx+esi]
lea	ebp, [edi+edx]
mov	[esp+28h+var_4], ebp
add	ebp, ecx
imul	ecx, 3EC5h
imul	ebp, 25A1h
mov	[esp+28h+var_14], ebp
lea	ebp, [ebx+edx]
imul	ebx, 98Eh
imul	ebp, 0FFFFE333h
mov	[esp+28h+var_8], ebp
lea	ebp, [edi+esi]
imul	edi, 41B3h
imul	ebp, 0FFFFADFDh
mov	[esp+28h+var_C], ebp
mov	ebp, [esp+28h+var_14]
sub	ebp, ecx
mov	ecx, [esp+28h+var_4]
imul	ecx, 0C7Ch
mov	[esp+28h+var_18], ebp
add	ebx, [esp+28h+var_18]
mov	ebp, [esp+28h+var_14]
sub	ebp, ecx
mov	ecx, [esp+28h+var_8]
lea	ebx, [ebx+ecx+400h]
sar	ebx, 0Bh
mov	[eax+14h], ebx
mov	ebx, [esp+28h+var_C]
add	edi, ebp
imul	esi, 6254h
imul	edx, 300Bh
add	esi, [esp+28h+var_18]
add	edx, ebp
lea	edi, [edi+ebx+400h]
lea	esi, [esi+ebx+400h]
lea	edx, [edx+ecx+400h]
sar	edi, 0Bh
sar	esi, 0Bh
sar	edx, 0Bh
mov	[eax+0Ch], edi
mov	[eax+4], esi
mov	[eax-4], edx
add	eax, 20h
sub	[esp+28h+var_10], 1
jns	loc_817FF6
mov	eax, [esp+28h+arg_0]
mov	[esp+28h+var_10], 7
add	eax, 40h

loc_818170:
mov	esi, [eax+0A0h]
mov	edx, [eax-40h]
mov	edi, [eax+80h]
lea	ecx, [edx+esi]
sub	edx, esi
mov	esi, [eax-20h]
lea	ebx, [esi+edi]
mov	[esp+28h+var_C], ebx
mov	ebx, [eax+60h]
sub	esi, edi
mov	edi, [eax]
lea	ebp, [ebx+edi]
mov	[esp+28h+var_14], ebp
mov	ebp, [eax+40h]
sub	edi, ebx
mov	ebx, [eax+20h]
add	ebp, ebx
mov	[esp+28h+var_18], ebp
add	ebp, ecx
sub	ecx, [esp+28h+var_18]
sub	ebx, [eax+40h]
mov	[esp+28h+var_8], ebp
mov	ebp, [esp+28h+var_14]
mov	[esp+28h+var_4], ecx
mov	ecx, [esp+28h+var_C]
add	ebp, ecx
sub	ecx, [esp+28h+var_14]
mov	[esp+28h+var_18], ebp
mov	[esp+28h+var_14], ecx
mov	ecx, [esp+28h+var_8]
lea	ebp, [ecx+ebp+2]
sub	ecx, [esp+28h+var_18]
sar	ebp, 2
mov	[eax-40h], ebp
mov	ebp, [esp+28h+var_4]
add	ecx, 2
sar	ecx, 2
mov	[eax+40h], ecx
mov	ecx, [esp+28h+var_14]
add	ecx, ebp
imul	ebp, 187Eh
imul	ecx, 1151h
lea	ebp, [ecx+ebp+4000h]
sar	ebp, 0Fh
mov	[eax], ebp
mov	ebp, [esp+28h+var_14]
imul	ebp, 3B21h
sub	ecx, ebp
add	ecx, 4000h
sar	ecx, 0Fh
lea	ebp, [edi+edx]
mov	[esp+28h+var_4], ebp
mov	[eax+80h], ecx
lea	ecx, [ebx+esi]
add	ebp, ecx
imul	ecx, 3EC5h
imul	ebp, 25A1h
mov	[esp+28h+var_14], ebp
lea	ebp, [ebx+edx]
imul	ebx, 98Eh
imul	ebp, 0FFFFE333h
mov	[esp+28h+var_8], ebp
lea	ebp, [edi+esi]
imul	edi, 41B3h
imul	ebp, 0FFFFADFDh
mov	[esp+28h+var_C], ebp
mov	ebp, [esp+28h+var_14]
sub	ebp, ecx
mov	ecx, [esp+28h+var_14]
mov	[esp+28h+var_18], ebp
mov	ebp, [esp+28h+var_4]
add	ebx, [esp+28h+var_18]
imul	ebp, 0C7Ch
sub	ecx, ebp
mov	ebp, [esp+28h+var_8]
lea	ebx, [ebx+ebp+4000h]
sar	ebx, 0Fh
mov	[eax+0A0h], ebx
mov	ebx, [esp+28h+var_C]
add	edi, ecx
lea	edi, [edi+ebx+4000h]
imul	esi, 6254h
imul	edx, 300Bh
add	esi, [esp+28h+var_18]
add	edx, ecx
lea	esi, [esi+ebx+4000h]
lea	edx, [edx+ebp+4000h]
sar	edi, 0Fh
sar	esi, 0Fh
sar	edx, 0Fh
mov	[eax+60h], edi
mov	[eax+20h], esi
mov	[eax-20h], edx
add	eax, 4
sub	[esp+28h+var_10], 1
jns	loc_818170
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_817FE0 endp

align 10h



sub_818300 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
mov	eax, [esp+14h+arg_0]
push	ebx
push	ebp
push	esi
add	eax, 8
mov	[esp+20h+var_4], 2
push	edi

loc_818316:
mov	ecx, [eax+14h]
mov	edi, [eax-8]
mov	esi, [eax+10h]
lea	edx, [ecx+edi]
sub	edi, ecx
mov	ecx, [eax-4]
lea	ebx, [ecx+esi]
sub	ecx, esi
mov	esi, [eax+0Ch]
mov	ebp, ecx
mov	ecx, [eax]
add	esi, ecx
sub	ecx, [eax+0Ch]
mov	[esp+24h+var_14], esi
mov	esi, [eax+8]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+4]
add	esi, ecx
sub	ecx, [eax+8]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax-8], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+8], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
mov	ebx, [esp+24h+var_8]
imul	ecx, 0B5h
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+10h], edx
lea	edx, [ecx+ebx]
mov	[eax], esi
lea	esi, [edi+ebp]
mov	ecx, edx
imul	edx, 8Bh
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	esi, 8
add	esi, ecx
sar	edx, 8
add	edx, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
sub	edi, edx
lea	edx, [ebx+esi]
mov	[eax+0Ch], ecx
mov	ecx, [eax+34h]
mov	[eax+4], edi
mov	edi, [eax+18h]
sub	ebx, esi
mov	esi, [eax+30h]
mov	[eax-4], edx
lea	edx, [ecx+edi]
sub	edi, ecx
mov	ecx, [eax+1Ch]
mov	[eax+14h], ebx
lea	ebx, [ecx+esi]
sub	ecx, esi
mov	esi, [eax+2Ch]
mov	ebp, ecx
mov	ecx, [eax+20h]
add	esi, ecx
sub	ecx, [eax+2Ch]
mov	[esp+24h+var_14], esi
mov	esi, [eax+28h]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+24h]
add	esi, ecx
sub	ecx, [eax+28h]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax+18h], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+28h], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
mov	ebx, [esp+24h+var_8]
imul	ecx, 0B5h
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+20h], esi
mov	[eax+30h], edx
lea	edx, [ecx+ebx]
lea	esi, [edi+ebp]
mov	ecx, edx
imul	edx, 8Bh
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	esi, 8
add	esi, ecx
sar	edx, 8
add	edx, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
sub	edi, edx
lea	edx, [ebx+esi]
mov	[eax+2Ch], ecx
mov	ecx, [eax+54h]
sub	ebx, esi
mov	esi, [eax+50h]
mov	[eax+24h], edi
mov	edi, [eax+38h]
mov	[eax+1Ch], edx
lea	edx, [ecx+edi]
sub	edi, ecx
mov	ecx, [eax+3Ch]
mov	[eax+34h], ebx
lea	ebx, [ecx+esi]
sub	ecx, esi
mov	esi, [eax+4Ch]
mov	ebp, ecx
mov	ecx, [eax+40h]
add	esi, ecx
sub	ecx, [eax+4Ch]
mov	[esp+24h+var_14], esi
mov	esi, [eax+48h]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+44h]
add	esi, ecx
sub	ecx, [eax+48h]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax+38h], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+48h], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
imul	ecx, 0B5h
mov	ebx, [esp+24h+var_8]
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+40h], esi
mov	[eax+50h], edx
lea	edx, [ecx+ebx]
mov	ecx, edx
imul	edx, 8Bh
lea	esi, [edi+ebp]
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	esi, 8
add	esi, ecx
sar	edx, 8
add	edx, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
mov	[eax+4Ch], ecx
mov	ecx, [eax+74h]
sub	edi, edx
lea	edx, [ebx+esi]
sub	ebx, esi
mov	esi, [eax+70h]
mov	[eax+44h], edi
mov	edi, [eax+58h]
mov	[eax+3Ch], edx
lea	edx, [edi+ecx]
sub	edi, ecx
mov	ecx, [eax+5Ch]
mov	[eax+54h], ebx
lea	ebx, [esi+ecx]
sub	ecx, esi
mov	esi, [eax+6Ch]
mov	ebp, ecx
mov	ecx, [eax+60h]
add	esi, ecx
sub	ecx, [eax+6Ch]
mov	[esp+24h+var_14], esi
mov	esi, [eax+68h]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+64h]
add	esi, ecx
sub	ecx, [eax+68h]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax+58h], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+68h], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
mov	ebx, [esp+24h+var_8]
imul	ecx, 0B5h
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+60h], esi
mov	[eax+70h], edx
lea	edx, [ecx+ebx]
mov	ecx, edx
imul	edx, 8Bh
lea	esi, [edi+ebp]
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	edx, 8
add	edx, ecx
sar	esi, 8
add	esi, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
sub	edi, edx
lea	edx, [ebx+esi]
sub	ebx, esi
mov	[eax+6Ch], ecx
mov	[eax+64h], edi
mov	[eax+5Ch], edx
mov	[eax+74h], ebx
sub	eax, 0FFFFFF80h
sub	[esp+24h+var_4], 1
jnz	loc_818316
mov	eax, [esp+24h+arg_0]
add	eax, 40h
mov	[esp+24h+arg_0], 2
lea	esp, [esp+0]

loc_818660:
mov	ecx, [eax+0A0h]
mov	edi, [eax-40h]
mov	esi, [eax+80h]
lea	edx, [ecx+edi]
sub	edi, ecx
mov	ecx, [eax-20h]
lea	ebx, [ecx+esi]
sub	ecx, esi
mov	esi, [eax+60h]
mov	ebp, ecx
mov	ecx, [eax]
add	esi, ecx
sub	ecx, [eax+60h]
mov	[esp+24h+var_14], esi
mov	esi, [eax+40h]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+20h]
add	esi, ecx
sub	ecx, [eax+40h]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax-40h], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+40h], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
mov	ebx, [esp+24h+var_8]
imul	ecx, 0B5h
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+80h], edx
lea	edx, [ecx+ebx]
mov	[eax], esi
lea	esi, [edi+ebp]
mov	ecx, edx
imul	edx, 8Bh
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	esi, 8
add	esi, ecx
sar	edx, 8
add	edx, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
sub	edi, edx
lea	edx, [ebx+esi]
mov	[eax+60h], ecx
mov	ecx, [eax+0A4h]
mov	[eax+20h], edi
mov	edi, [eax-3Ch]
sub	ebx, esi
mov	esi, [eax+84h]
mov	[eax-20h], edx
lea	edx, [ecx+edi]
sub	edi, ecx
mov	ecx, [eax-1Ch]
mov	[eax+0A0h], ebx
lea	ebx, [ecx+esi]
sub	ecx, esi
mov	esi, [eax+64h]
mov	ebp, ecx
mov	ecx, [eax+4]
add	esi, ecx
sub	ecx, [eax+64h]
mov	[esp+24h+var_14], esi
mov	esi, [eax+44h]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+24h]
add	esi, ecx
sub	ecx, [eax+44h]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax-3Ch], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+44h], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
mov	ebx, [esp+24h+var_8]
imul	ecx, 0B5h
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+4], esi
mov	[eax+84h], edx
lea	edx, [ecx+ebx]
lea	esi, [edi+ebp]
mov	ecx, edx
imul	edx, 8Bh
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	esi, 8
add	esi, ecx
sar	edx, 8
add	edx, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
sub	edi, edx
lea	edx, [ebx+esi]
mov	[eax+64h], ecx
mov	ecx, [eax+0A8h]
sub	ebx, esi
mov	esi, [eax+88h]
mov	[eax+24h], edi
mov	edi, [eax-38h]
mov	[eax-1Ch], edx
lea	edx, [ecx+edi]
sub	edi, ecx
mov	ecx, [eax-18h]
mov	[eax+0A4h], ebx
lea	ebx, [ecx+esi]
sub	ecx, esi
mov	esi, [eax+68h]
mov	ebp, ecx
mov	ecx, [eax+8]
add	esi, ecx
sub	ecx, [eax+68h]
mov	[esp+24h+var_14], esi
mov	esi, [eax+48h]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+28h]
add	esi, ecx
sub	ecx, [eax+48h]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax-38h], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+48h], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
imul	ecx, 0B5h
mov	ebx, [esp+24h+var_8]
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+8], esi
mov	[eax+88h], edx
lea	edx, [ecx+ebx]
mov	ecx, edx
imul	edx, 8Bh
lea	esi, [edi+ebp]
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	esi, 8
add	esi, ecx
sar	edx, 8
add	edx, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
mov	[eax+68h], ecx
mov	ecx, [eax+0ACh]
sub	edi, edx
lea	edx, [ebx+esi]
sub	ebx, esi
mov	esi, [eax+8Ch]
mov	[eax+28h], edi
mov	edi, [eax-34h]
mov	[eax-18h], edx
lea	edx, [edi+ecx]
sub	edi, ecx
mov	ecx, [eax-14h]
mov	[eax+0A8h], ebx
lea	ebx, [esi+ecx]
sub	ecx, esi
mov	esi, [eax+6Ch]
mov	ebp, ecx
mov	ecx, [eax+0Ch]
add	esi, ecx
sub	ecx, [eax+6Ch]
mov	[esp+24h+var_14], esi
mov	esi, [eax+4Ch]
mov	[esp+24h+var_8], ecx
mov	ecx, [eax+2Ch]
add	esi, ecx
sub	ecx, [eax+4Ch]
mov	[esp+24h+var_10], esi
mov	[esp+24h+var_C], ecx
lea	ecx, [esi+edx]
sub	edx, esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
add	esi, ecx
mov	[eax-34h], esi
mov	esi, [esp+24h+var_14]
add	esi, ebx
sub	ecx, esi
mov	[eax+4Ch], ecx
mov	ecx, edx
sub	ecx, [esp+24h+var_14]
add	ecx, ebx
mov	ebx, [esp+24h+var_8]
imul	ecx, 0B5h
sar	ecx, 8
lea	esi, [ecx+edx]
sub	edx, ecx
mov	ecx, [esp+24h+var_C]
mov	[eax+0Ch], esi
mov	[eax+8Ch], edx
lea	edx, [ecx+ebx]
mov	ecx, edx
imul	edx, 8Bh
lea	esi, [edi+ebp]
sub	ecx, esi
imul	esi, 14Eh
imul	ecx, 62h
sar	ecx, 8
sar	edx, 8
add	edx, ecx
sar	esi, 8
add	esi, ecx
lea	ecx, [ebx+ebp]
imul	ecx, 0B5h
sar	ecx, 8
lea	ebx, [ecx+edi]
sub	edi, ecx
lea	ecx, [edi+edx]
sub	edi, edx
lea	edx, [ebx+esi]
sub	ebx, esi
mov	[eax+6Ch], ecx
mov	[eax+2Ch], edi
mov	[eax-14h], edx
mov	[eax+0ACh], ebx
add	eax, 10h
sub	[esp+24h+arg_0], 1
jnz	loc_818660
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_818300 endp

align 10h



sub_8189D0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	edx, [esp+arg_0]
fld	ds:dbl_15FD440
sub	esp, 1Ch
mov	ecx, 7
lea	eax, [edx+8]

loc_8189E5:
fld	dword ptr [eax+14h]
fstp	[esp+1Ch+var_4]
fld	dword ptr [eax-8]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_1C]
fsubp	st(1), st
fstp	[esp+1Ch+var_4]
fld	dword ptr [eax+10h]
fstp	[esp+1Ch+var_8]
fld	dword ptr [eax-4]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_8]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_14]
fsubp	st(1), st
fstp	[esp+1Ch+var_8]
fld	dword ptr [eax+0Ch]
fstp	[esp+1Ch+arg_0]
fld	dword ptr [eax]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_18]
fsubrp	st(1), st
fstp	[esp+1Ch+var_C]
fld	dword ptr [eax+8]
fstp	[esp+1Ch+var_10]
fld	dword ptr [eax+4]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_10]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+arg_0]
fsubp	st(1), st
fstp	[esp+1Ch+var_10]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_1C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+arg_0]
fsubrp	st(1), st
fstp	[esp+1Ch+var_1C]
fld	[esp+1Ch+var_18]
fld	st
fld	[esp+1Ch+var_14]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_14]
fld	[esp+1Ch+var_14]
fld	st
fld	[esp+1Ch+arg_0]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax-8]
fsubrp	st(1), st
fstp	dword ptr [eax+8]
fsubrp	st(1), st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	[esp+1Ch+var_1C]
fld	st
add	eax, 20h
sub	ecx, 1
faddp	st(2), st
fxch	st(1)
fmul	st, st(2)
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fadd	st, st(2)
fstp	dword ptr [eax-20h]
fsubp	st(1), st
fstp	dword ptr [eax-10h]
fld	[esp+1Ch+var_10]
fld	[esp+1Ch+var_C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+var_8]
fld	st
fld	[esp+1Ch+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_4]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_4]
fld	st
fsubp	st(2), st
fxch	st(1)
fmul	ds:dbl_14662D0
fstp	[esp+1Ch+arg_0]
fxch	st(1)
fmul	ds:dbl_14662C8
fld	[esp+1Ch+arg_0]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_4]
fxch	st(1)
fmul	ds:dbl_14662C0
faddp	st(1), st
fstp	[esp+1Ch+var_C]
fxch	st(2)
faddp	st(1), st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fmul	st, st(2)
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fadd	st, st(2)
fstp	[esp+1Ch+var_8]
fsubp	st(1), st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax-14h]
fsubp	st(1), st
fstp	dword ptr [eax-1Ch]
fld	[esp+1Ch+var_8]
fld	st
fld	[esp+1Ch+var_C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax-24h]
fsubp	st(1), st
fstp	dword ptr [eax-0Ch]
jns	loc_8189E5
mov	ecx, 7
lea	eax, [edx+40h]

loc_818BBC:
fld	dword ptr [eax+0A0h]
fstp	[esp+1Ch+var_4]
fld	dword ptr [eax-40h]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_1C]
fsubp	st(1), st
fstp	[esp+1Ch+var_4]
fld	dword ptr [eax+80h]
fstp	[esp+1Ch+var_8]
fld	dword ptr [eax-20h]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_8]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_14]
fsubp	st(1), st
fstp	[esp+1Ch+var_8]
fld	dword ptr [eax+60h]
fstp	[esp+1Ch+arg_0]
fld	dword ptr [eax]
fstp	[esp+1Ch+var_C]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_18]
fsubrp	st(1), st
fstp	[esp+1Ch+var_C]
fld	dword ptr [eax+40h]
fstp	[esp+1Ch+var_10]
fld	dword ptr [eax+20h]
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_10]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+arg_0]
fsubp	st(1), st
fstp	[esp+1Ch+var_10]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_1C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+arg_0]
fsubrp	st(1), st
fstp	[esp+1Ch+var_1C]
fld	[esp+1Ch+var_18]
fld	st
fld	[esp+1Ch+var_14]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_14]
fld	[esp+1Ch+var_14]
fld	st
fld	[esp+1Ch+arg_0]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax-40h]
fsubrp	st(1), st
fstp	dword ptr [eax+40h]
fsubrp	st(1), st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	[esp+1Ch+var_1C]
fld	st
add	eax, 4
sub	ecx, 1
faddp	st(2), st
fxch	st(1)
fmul	st, st(2)
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fadd	st, st(2)
fstp	dword ptr [eax-4]
fsubp	st(1), st
fstp	dword ptr [eax+7Ch]
fld	[esp+1Ch+var_10]
fld	[esp+1Ch+var_C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+var_8]
fld	st
fld	[esp+1Ch+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_4]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_4]
fld	st
fsubp	st(2), st
fxch	st(1)
fmul	ds:dbl_14662D0
fstp	[esp+1Ch+arg_0]
fxch	st(1)
fmul	ds:dbl_14662C8
fld	[esp+1Ch+arg_0]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	[esp+1Ch+var_4]
fxch	st(1)
fmul	ds:dbl_14662C0
faddp	st(1), st
fstp	[esp+1Ch+var_C]
fxch	st(2)
faddp	st(1), st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fmul	st, st(2)
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fadd	st, st(2)
fstp	[esp+1Ch+var_8]
fsubp	st(1), st
fstp	[esp+1Ch+arg_0]
fld	[esp+1Ch+arg_0]
fld	st
fld	[esp+1Ch+var_4]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax+5Ch]
fsubp	st(1), st
fstp	dword ptr [eax+1Ch]
fld	[esp+1Ch+var_8]
fld	st
fld	[esp+1Ch+var_C]
fld	st
faddp	st(2), st
fxch	st(1)
fstp	dword ptr [eax-24h]
fsubp	st(1), st
fstp	dword ptr [eax+9Ch]
jns	loc_818BBC
fstp	st
add	esp, 1Ch
retn
sub_8189D0 endp

align 10h



sub_818DA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+18h]
mov	ecx, [ecx+10h]
mov	eax, [esp+arg_0]
push	esi
mov	esi, [esp+4+arg_4]
push	edi
mov	edi, [ecx+eax*4]
mov	[esi+4], edi
mov	edi, eax
shr	edi, 1
add	edi, ecx
mov	dl, [edi+edx*4]
movzx	ecx, dl
and	eax, 1
mov	dl, al
neg	al
dec	dl
movzx	edx, dl
mov	edi, ecx
shr	edi, 4
shr	eax, 1
and	eax, 0Fh
and	edx, edi
and	eax, ecx
or	edx, eax
pop	edi
mov	[esi], edx
pop	esi
retn	8
sub_818DA0 endp

align 10h



sub_818DF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_8]
dec	eax
sub	esp, 8
cmp	eax, [ecx+18h]
jnb	short loc_818E18
mov	ecx, [ecx+10h]
push	esi
mov	esi, [ecx+eax*8]
mov	[edx], esi
mov	eax, [ecx+eax*8+4]
mov	[edx+4], eax
pop	esi
add	esp, 8
retn	0Ch

loc_818E18:
fild	[esp+8+arg_4]
push	edx
mov	edx, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_8]
push	eax
fstp	[esp+10h+var_4]
push	edx
mov	[esp+14h+var_8], 3
call	sub_820740
add	esp, 8
retn	0Ch
sub_818DF0 endp

align 10h



sub_818E40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_818E62
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_822950
retn

loc_818E62:
mov	edx, [esp+arg_C]
mov	eax, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_0]
push	eax
push	edx
call	sub_820D20
retn
sub_818E40 endp

align 10h



sub_818E80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_818EA2
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_822800
retn

loc_818EA2:
mov	edx, [esp+arg_C]
mov	eax, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_0]
push	eax
push	edx
call	sub_8206B0
retn
sub_818E80 endp

align 10h



sub_818EC0 proc	near

var_118= qword ptr -118h
DstBuf=	byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	ebx
mov	ebx, [esp+108h+arg_0]
push	esi
mov	esi, [esp+10Ch+arg_4]
mov	eax, [esi]
sub	eax, 3
push	edi
mov	edi, [esp+110h+arg_8]
jz	short loc_818F2C
sub	eax, 1
jz	short loc_818F1C
test	edi, edi
jz	short loc_818F02
mov	dword ptr [edi], 0

loc_818F02:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
mov	ecx, [esp+104h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn

loc_818F1C:
test	edi, edi
jz	short loc_818F27
mov	eax, [esi+4]
mov	ecx, [eax]
mov	[edi], ecx

loc_818F27:
mov	eax, [esi+4]
jmp	short loc_818F71

loc_818F2C:
fld	dword ptr [esi+4]
sub	esp, 8
fstp	[esp+118h+var_118]
push	offset a0_14g	; "%0.14g"
lea	edx, [esp+11Ch+DstBuf]
push	100h		; SizeInBytes
push	edx		; DstBuf
call	sub_822D70
mov	ecx, [ebx]
add	esp, 14h
push	eax
lea	eax, [esp+114h+DstBuf]
push	eax
push	ebx
add	ecx, 2A0h
call	sub_81FBA0
test	edi, edi
jz	short loc_818F68
mov	ecx, [eax]
mov	[edi], ecx

loc_818F68:
mov	dword ptr [esi], 4
mov	[esi+4], eax

loc_818F71:
mov	ecx, [esp+110h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
add	eax, 8
call	sub_7999A3
add	esp, 104h
retn
sub_818EC0 endp

align 10h



sub_818F90 proc	near

arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
mov	eax, [esi]
cmp	eax, 3
jnz	short loc_818FA1
fld	dword ptr [esi+4]
pop	esi
retn

loc_818FA1:
fldz
fstp	[esp+4+arg_4]
cmp	eax, 4
jnz	short loc_818FD8
mov	eax, [esi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_818FD8
mov	eax, [esi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
fstp	[esp+0Ch+arg_4]
add	esp, 8

loc_818FD8:
fld	[esp+4+arg_4]
pop	esi
retn
sub_818F90 endp

align 10h



sub_818FE0 proc	near

arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_4]
test	esi, esi
jnz	short loc_818FED

loc_818FE9:
xor	eax, eax
pop	esi
retn

loc_818FED:
mov	eax, [esi]
cmp	eax, 3
jz	short loc_819023
cmp	eax, 4
jnz	short loc_818FE9
mov	eax, [esi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_818FE9
mov	esi, [esi+4]
mov	eax, [esi]
push	eax		; int
add	esi, 8
push	esi		; char *
call	sub_822B80
fstp	st
add	esp, 8

loc_819023:
mov	eax, 1
pop	esi
retn
sub_818FE0 endp

align 10h



sub_819030 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_4]
mov	eax, [esi]
push	edi
mov	edi, [esp+10h+arg_8]
cmp	eax, [edi]
jnz	short loc_8190B8
sub	eax, 0
jz	short loc_8190B8
sub	eax, 3
jz	short loc_81909E
sub	eax, 1
jz	short loc_81907F
push	ebx
mov	ebx, [esp+14h+arg_0]
push	offset asc_14662E0 ; "<"
push	0Eh
push	edi
push	esi
push	ebx
call	sub_8234D0
push	edi
push	esi
push	eax
push	ebx
call	sub_823280
add	esp, 24h
pop	ebx
pop	edi
mov	[esp+0Ch+var_8], eax
mov	eax, edx
pop	esi
add	esp, 8
retn

loc_81907F:
mov	edi, [edi+4]
mov	esi, [esi+4]
push	edi
push	esi
call	sub_822BF0
add	esp, 8
xor	ecx, ecx
test	eax, eax
setl	cl
pop	edi
pop	esi
mov	eax, ecx
add	esp, 8
retn

loc_81909E:
fld	dword ptr [esi+4]
fld	dword ptr [edi+4]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_8190B8
pop	edi
mov	eax, 1
pop	esi
add	esp, 8
retn

loc_8190B8:
pop	edi
xor	eax, eax
pop	esi
add	esp, 8
retn
sub_819030 endp




sub_8190C0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_8]
push	edi
mov	edi, [esp+10h+arg_4]
push	esi
push	edi
call	sub_822BA0
add	esp, 8
test	eax, eax
jz	short loc_8190E6
pop	edi
mov	eax, 1
pop	esi
add	esp, 8
retn

loc_8190E6:
push	ebx
mov	ebx, [esp+14h+arg_0]
push	0Dh
push	esi
push	edi
push	ebx
call	sub_8230A0
add	esp, 10h
cmp	dword ptr [eax], 0
jnz	short loc_819106
pop	ebx
pop	edi
xor	eax, eax
pop	esi
add	esp, 8
retn

loc_819106:
push	esi
push	edi
push	eax
push	ebx
call	sub_823280
add	esp, 10h
pop	ebx
pop	edi
mov	[esp+0Ch+var_8], eax
mov	eax, edx
pop	esi
add	esp, 8
retn
sub_8190C0 endp

align 10h



sub_819120 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
push	eax
push	ecx
call	sub_822BA0
add	esp, 8
retn
sub_819120 endp

align 10h



sub_819140 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	ecx, [eax]
add	ecx, 0FFFFFFF9h	; switch 4 cases
cmp	ecx, 3
ja	short loc_819184 ; default
jmp	ds:off_819190[ecx*4] ; switch jump

loc_819155:		; jumptable 0081914E case 10
mov	eax, [eax+4]
mov	eax, [eax+4]
jmp	short loc_819172

loc_81915D:		; jumptable 0081914E case 9
mov	ecx, [eax+4]
mov	eax, [ecx+4]
jmp	short loc_819172

loc_819165:		; jumptable 0081914E case 8
mov	edx, [eax+4]
mov	eax, [edx+34h]
jmp	short loc_819172

loc_81916D:		; jumptable 0081914E case 7
mov	eax, [eax+4]
mov	eax, [eax]

loc_819172:
test	eax, eax
jz	short loc_819184 ; default
mov	ecx, [esp+arg_8]
mov	[ecx+4], eax
mov	dword ptr [ecx], 5
retn

loc_819184:		; default
mov	ecx, [esp+arg_8]
mov	dword ptr [ecx], 0
retn
sub_819140 endp

align 10h
off_819190 dd offset loc_81916D	; jump table for switch	statement
dd offset loc_819165
dd offset loc_81915D
dd offset loc_819155



sub_8191A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_8]
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi]
cmp	eax, 4
jl	short loc_8191D2
cmp	eax, 0Ah
jg	short loc_8191D2
mov	eax, [esp+8+arg_0]
mov	ecx, [eax]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_8191D2
mov	edx, [edi+4]
push	esi
push	edx
call	sub_81EB00

loc_8191D2:
mov	eax, [edi]
cmp	eax, 9
jnz	short loc_8191EE

loc_8191D9:
mov	eax, [esi]
mov	edi, [edi+4]
mov	[edi], eax
mov	ecx, [esi+4]
mov	[edi+4], ecx
pop	edi
mov	eax, 1
pop	esi
retn

loc_8191EE:
cmp	eax, 8
jnz	short loc_819209
mov	edi, [edi+4]
mov	edx, [esi]
mov	[edi+30h], edx
mov	eax, [esi+4]
mov	[edi+34h], eax
pop	edi
mov	eax, 1
pop	esi
retn

loc_819209:
cmp	eax, 7
jnz	short loc_81921E
mov	ecx, [edi+4]
mov	edx, [esi+4]
pop	edi
mov	[ecx], edx
mov	eax, 1
pop	esi
retn

loc_81921E:
cmp	eax, 0Ah
jz	short loc_8191D9
pop	edi
xor	eax, eax
pop	esi
retn
sub_8191A0 endp

align 10h



sub_819230 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	eax, [edx]
sub	esp, 8
mov	ecx, eax
sub	ecx, 5
push	esi
jz	short loc_819297
sub	ecx, 2
jz	short loc_81928F
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi]
mov	eax, [ecx+eax*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+0Ch+var_8]
push	edx
push	eax
jz	short loc_81926C
call	sub_821EF0
jmp	short loc_819271

loc_81926C:
call	sub_8208C0

loc_819271:
test	eax, eax
jz	short loc_8192A0
cmp	[esp+0Ch+var_8], 5
jnz	short loc_8192A0
mov	ecx, [esp+0Ch+var_4]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_8192A7
push	esi
call	sub_81FED0
jmp	short loc_81929C

loc_81928F:
mov	eax, [edx+4]
mov	eax, [eax+4]
jmp	short loc_81929C

loc_819297:
mov	ecx, [edx+4]
mov	eax, [ecx]

loc_81929C:
test	eax, eax
jnz	short loc_8192A7

loc_8192A0:
xor	eax, eax
pop	esi
add	esp, 8
retn

loc_8192A7:
mov	edx, [eax+88h]
mov	eax, [esp+0Ch+arg_8]
mov	[eax+4], edx
mov	dword ptr [eax], 5
mov	eax, 1
pop	esi
add	esp, 8
retn
sub_819230 endp

align 10h



sub_8192D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	eax
push	ecx
push	edx
call	sub_8231D0
add	esp, 0Ch
xor	eax, eax
retn
sub_8192D0 endp

align 10h


; Attributes: bp-based frame

sub_8192F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_4]
sub	esp, 14h
cmp	dword ptr [eax], 5
push	ebx
push	esi
push	edi
jnz	short loc_819345
mov	ecx, [eax+4]
cmp	dword ptr [ecx], 0
jnz	short loc_819345
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_81932D
mov	eax, [ebp+arg_C]
mov	edx, [ebp+arg_8]
push	eax
mov	eax, [ebp+arg_0]
push	edx
push	eax
call	sub_822100
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_81932D:
mov	edx, [ebp+arg_C]
mov	eax, [ebp+arg_8]
push	edx
mov	edx, [ebp+arg_0]
push	eax
push	edx
call	sub_820740
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_819345:
mov	ebx, [ebp+arg_8]
mov	edi, [ebp+arg_0]
jmp	short loc_819350
align 10h

loc_819350:
mov	ecx, [eax]
cmp	ecx, 5
jnz	short loc_8193C2
mov	esi, [eax+4]
test	dword ptr [esi+8], 0F0000000h
jz	short loc_819373
lea	eax, [esp+20h+var_10]
push	eax
push	ebx
push	edi
mov	ecx, esi
call	sub_822100
jmp	short loc_819381

loc_819373:
lea	ecx, [esp+20h+var_10]
push	ecx
push	ebx
push	edi
mov	ecx, esi
call	sub_820740

loc_819381:
mov	ecx, [esp+20h+var_10]
test	ecx, ecx
jnz	loc_819483
mov	esi, [esi]
test	esi, esi
jz	loc_819483
cmp	[esi+8], ecx
lea	eax, [esi+8]
jnz	loc_81942C
mov	edx, dword_1859278
mov	ecx, dword_1859274
mov	eax, [ebp+arg_C]
mov	[esp+20h+var_C], edx
mov	[eax], ecx
mov	[eax+4], edx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_8193C2:
mov	edx, ecx
sub	edx, 5
jz	short loc_81941B
sub	edx, 2
jz	short loc_819413
mov	edx, [edi]
mov	eax, [edx+ecx*8+368h]
mov	ecx, [edi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+20h+var_8]
push	edx
push	eax
jz	short loc_8193F0
call	sub_821EF0
jmp	short loc_8193F5

loc_8193F0:
call	sub_8208C0

loc_8193F5:
test	eax, eax
jz	short loc_819444
cmp	[esp+20h+var_8], 5
jnz	short loc_819444
mov	ecx, [esp+20h+var_4]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_819424
push	edi
call	sub_81FED0
jmp	short loc_819420

loc_819413:
mov	eax, [eax+4]
mov	eax, [eax+4]
jmp	short loc_819420

loc_81941B:
mov	ecx, [eax+4]
mov	eax, [ecx]

loc_819420:
test	eax, eax
jz	short loc_819444

loc_819424:
add	eax, 8
cmp	dword ptr [eax], 0
jz	short loc_819478

loc_81942C:
cmp	dword ptr [eax], 5
jz	loc_819350
mov	ecx, [eax]
mov	[esp+20h+var_10], ecx
mov	edx, [eax+4]
mov	[esp+20h+var_C], edx
jmp	short loc_819456

loc_819444:		; "attempt to index a nil value"
push	offset aAttemptToIndex

loc_819449:
push	edi
call	sub_81A760
add	esp, 8
test	eax, eax
jnz	short loc_81947F

loc_819456:
mov	eax, [ebp+arg_4]
push	ebx
push	eax
lea	ecx, [esp+28h+var_10]
push	ecx
push	edi
call	sub_823280
mov	ecx, [ebp+arg_C]
add	esp, 10h
mov	[ecx], eax
mov	[ecx+4], edx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_819478:		; "error in gettable_event"
push	offset aErrorInGettabl
jmp	short loc_819449

loc_81947F:
mov	ecx, [esp+20h+var_10]

loc_819483:
mov	eax, [ebp+arg_C]
mov	edx, [esp+20h+var_C]
pop	edi
pop	esi
mov	[eax], ecx
mov	[eax+4], edx
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_8192F0 endp

align 10h



sub_8194A0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 18h
push	ebx
mov	ebx, [esp+1Ch+arg_4]
mov	eax, [ebx]
push	esi
cmp	eax, 5
jnz	short loc_8194F5
mov	ecx, [ebx+4]
cmp	dword ptr [ecx], 0
jnz	short loc_81951B
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_8194DB
mov	eax, [esp+20h+arg_C]
mov	edx, [esp+20h+arg_8]
push	eax
mov	eax, [esp+24h+arg_0]
push	edx
push	eax
call	sub_822950
pop	esi
pop	ebx
add	esp, 18h
retn

loc_8194DB:
mov	edx, [esp+20h+arg_C]
mov	eax, [esp+20h+arg_8]
push	edx
mov	edx, [esp+24h+arg_0]
push	eax
push	edx
call	sub_820D20
pop	esi
pop	ebx
add	esp, 18h
retn

loc_8194F5:
mov	esi, [esp+20h+arg_0]
push	eax
push	esi
call	sub_81BA90
push	eax		; ArgList
push	offset aAttemptToInd_0 ; "Attempt to index a %s	value"
push	esi		; int
call	sub_81C0C0
push	esi
call	sub_81C0E0
add	esp, 18h
pop	esi
pop	ebx
add	esp, 18h
retn

loc_81951B:
mov	esi, [esp+20h+arg_0]
push	ebp
mov	ebp, 0F0000000h
push	edi

loc_819526:
mov	eax, [ebx]
cmp	eax, 5
jnz	short loc_81959D
mov	edi, [ebx+4]
cmp	dword ptr [edi], 0
jz	loc_8196CF
test	[edi+8], ebp
jz	short loc_819552
mov	ecx, [esp+28h+arg_8]
lea	eax, [esp+28h+var_18]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	sub_822100
jmp	short loc_819564

loc_819552:
mov	eax, [esp+28h+arg_8]
lea	edx, [esp+28h+var_18]
push	edx
push	eax
push	esi
mov	ecx, edi
call	sub_820740

loc_819564:
cmp	[esp+28h+var_18], 0
jnz	loc_819702
mov	ebx, [edi]
add	ebx, 10h
cmp	dword ptr [ebx], 0
jnz	loc_819626
test	[edi+8], ebp
jz	loc_819735
mov	ecx, [esp+28h+arg_C]
mov	edx, [esp+28h+arg_8]
push	ecx
push	edx
push	esi
mov	ecx, edi
call	sub_822950
jmp	loc_81963C

loc_81959D:
mov	ecx, eax
sub	ecx, 5
jz	short loc_8195F8
sub	ecx, 2
jz	short loc_8195F0
mov	ecx, [esi]
mov	eax, [ecx+eax*8+368h]
mov	ecx, [esi+3Ch]
lea	edx, [esp+28h+var_10]
push	edx
push	eax
test	[ecx+8], ebp
jz	short loc_8195C7
call	sub_821EF0
jmp	short loc_8195CC

loc_8195C7:
call	sub_8208C0

loc_8195CC:
test	eax, eax
jz	short loc_8195EC
cmp	[esp+28h+var_10], 5
jnz	short loc_8195EC
mov	ecx, [esp+28h+var_C]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_8195E8
push	esi
call	sub_81FED0

loc_8195E8:
mov	edi, eax
jmp	short loc_8195FD

loc_8195EC:
xor	edi, edi
jmp	short loc_819601

loc_8195F0:
mov	eax, [ebx+4]
mov	edi, [eax+4]
jmp	short loc_8195FD

loc_8195F8:
mov	ecx, [ebx+4]
mov	edi, [ecx]

loc_8195FD:
test	edi, edi
jnz	short loc_81960F

loc_819601:		; "attempt to index a nil value"
push	offset aAttemptToIndex
push	esi
call	sub_81A760
add	esp, 8

loc_81960F:
cmp	dword ptr [edi+10h], 0
lea	ebx, [edi+10h]
jnz	short loc_819626
push	offset aErrorInSettabl ; "error	in settable_event"
push	esi
call	sub_81A760
add	esp, 8

loc_819626:
cmp	dword ptr [ebx], 5
jz	loc_819526
mov	edx, [ebx]
mov	[esp+28h+var_18], edx
mov	eax, [ebx+4]
mov	[esp+28h+var_14], eax

loc_81963C:
cmp	[esp+28h+var_18], 0
jz	loc_8196C7
mov	ecx, [esp+28h+arg_8]
mov	eax, [esp+28h+arg_4]
mov	edi, [eax]
mov	ebx, [eax+4]
mov	ebp, [ecx]
mov	edx, ecx
mov	eax, [edx+4]
mov	[esp+28h+var_4], eax
mov	eax, [esp+28h+arg_C]
mov	ecx, [eax]
mov	edx, [eax+4]
mov	eax, [esi+1Ch]
add	eax, 18h
mov	[esp+28h+var_10], ecx
mov	[esp+28h+var_C], edx
cmp	eax, [esi+24h]
jbe	short loc_819686
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530

loc_819686:
mov	eax, [esi+1Ch]
mov	ecx, [esp+28h+var_18]
mov	[eax], ecx
mov	edx, [esp+28h+var_14]
mov	ecx, [esp+28h+var_4]
mov	[eax+4], edx
mov	edx, [esp+28h+var_10]
mov	[eax+14h], ecx
mov	ecx, [esp+28h+var_C]
push	0
mov	[eax+8], edi
mov	[eax+0Ch], ebx
mov	[eax+10h], ebp
mov	[eax+18h], edx
mov	[eax+1Ch], ecx
add	eax, 20h
push	3
push	esi
mov	[esi+1Ch], eax
call	sub_81C6E0
add	esp, 0Ch

loc_8196C7:
pop	edi
pop	ebp
pop	esi
pop	ebx
add	esp, 18h
retn

loc_8196CF:
test	[edi+8], ebp
jz	short loc_8196EB
mov	edx, [esp+28h+arg_C]
mov	eax, [esp+28h+arg_8]
push	edx
push	eax
push	esi
mov	ecx, edi
call	sub_822950
jmp	loc_81963C

loc_8196EB:
mov	ecx, [esp+28h+arg_C]
mov	edx, [esp+28h+arg_8]
push	ecx
push	edx
push	esi
mov	ecx, edi
call	sub_820D20
jmp	loc_81963C

loc_819702:
test	[edi+8], ebp
jz	short loc_81971E
mov	eax, [esp+28h+arg_C]
mov	ecx, [esp+28h+arg_8]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	sub_822950
jmp	loc_81963C

loc_81971E:
mov	edx, [esp+28h+arg_C]
mov	eax, [esp+28h+arg_8]
push	edx
push	eax
push	esi
mov	ecx, edi
call	sub_820D20
jmp	loc_81963C

loc_819735:
mov	eax, [esp+28h+arg_C]
mov	ecx, [esp+28h+arg_8]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	sub_820D20
jmp	loc_81963C
sub_8194A0 endp

align 10h



sub_819750 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
mov	ecx, [eax+4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_819775
mov	edx, [esp+arg_C]
mov	eax, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_0]
push	eax
push	edx
call	sub_822100
retn

loc_819775:
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_820740
retn
sub_819750 endp

align 10h



sub_819790 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
mov	ecx, [eax+4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_8197B5
mov	edx, [esp+arg_C]
mov	eax, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_0]
push	eax
push	edx
call	sub_822950
retn

loc_8197B5:
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_820D20
retn
sub_819790 endp

align 10h



sub_8197D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	ecx, [ecx+4]
sub	esp, 8
test	eax, eax
jle	short loc_819808
test	dword ptr [ecx+8], 0F0000000h
mov	edx, [esp+8+arg_C]
push	edx
push	eax
mov	eax, [esp+10h+arg_0]
push	eax
jz	short loc_8197FF
call	sub_822AB0
add	esp, 8
retn

loc_8197FF:
call	sub_8210B0
add	esp, 8
retn

loc_819808:
fild	[esp+8+arg_8]
mov	[esp+8+var_8], 3
fstp	[esp+8+var_4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_819838
mov	edx, [esp+8+arg_C]
push	edx
mov	edx, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_8]
push	eax
push	edx
call	sub_822950
add	esp, 8
retn

loc_819838:
mov	eax, [esp+8+arg_C]
push	eax
mov	eax, [esp+0Ch+arg_0]
lea	edx, [esp+0Ch+var_8]
push	edx
push	eax
call	sub_820D20
add	esp, 8
retn
sub_8197D0 endp




sub_819850 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
mov	ecx, [eax+4]
test	dword ptr [ecx+8], 0F0000000h
push	esi
mov	esi, [esp+4+arg_C]
push	edi
mov	edi, [esp+8+arg_8]
push	esi
push	edi
jz	short loc_819878
mov	edx, [esp+10h+arg_0]
push	edx
call	sub_822800
jmp	short loc_819882

loc_819878:
mov	eax, [esp+10h+arg_0]
push	eax
call	sub_8206B0

loc_819882:
cmp	dword ptr [esi], 0
jnz	short loc_81988D
mov	dword ptr [edi], 0

loc_81988D:
pop	edi
pop	esi
retn
sub_819850 endp




sub_819890 proc	near

var_10C= qword ptr -10Ch
DstBuf=	byte ptr -104h
var_4= dword ptr -4
arg_4= dword ptr  8

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
mov	eax, [esp+104h+arg_4]
mov	ecx, [eax]
add	ecx, 0FFFFFFFDh	; switch 5 cases
cmp	ecx, 4
ja	loc_81996A	; default
			; jumptable 008198B9 case 6
jmp	ds:off_819984[ecx*4] ; switch jump

loc_8198C0:		; jumptable 008198B9 case 4
mov	eax, [eax+4]
mov	eax, [eax]
mov	ecx, [esp+104h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn

loc_8198DA:		; jumptable 008198B9 case 3
fld	dword ptr [eax+4]
sub	esp, 8
fstp	[esp+10Ch+var_10C]
push	offset a0_14g_0	; "%0.14g"
lea	ecx, [esp+110h+DstBuf]
push	100h		; SizeInBytes
push	ecx		; DstBuf
call	sub_822D70
add	esp, 14h
mov	ecx, [esp+104h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn

loc_81990F:		; jumptable 008198B9 case 5
mov	ecx, [eax+4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_819935
call	sub_821EE0
mov	ecx, [esp+104h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn

loc_819935:
call	sub_820670
mov	ecx, [esp+104h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn

loc_81994F:		; jumptable 008198B9 case 7
mov	edx, [eax+4]
mov	eax, [edx+0Ch]
mov	ecx, [esp+104h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn

loc_81996A:		; default
mov	ecx, [esp+104h+var_4] ;	jumptable 008198B9 case	6
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 104h
retn
sub_819890 endp

align 4
off_819984 dd offset loc_8198DA	; jump table for switch	statement
dd offset loc_8198C0
dd offset loc_81990F
dd offset loc_81996A
dd offset loc_81994F
align 10h



sub_8199A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short locret_8199BC
mov	edx, [esp+arg_4]
push	edx
call	sub_81DCC0

locret_8199BC:
retn
sub_8199A0 endp

align 10h



sub_8199C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	edx, [ecx+18h]
dec	eax
sub	esp, 8
cmp	eax, edx
jnb	short loc_819A10
mov	ecx, [ecx+10h]
push	esi
mov	esi, [esp+0Ch+arg_8]
push	edi
mov	edi, [ecx+eax*4]
mov	[esi+4], edi
mov	edi, eax
shr	edi, 1
add	edi, ecx
mov	cl, [edi+edx*4]
and	eax, 1
mov	dl, al
neg	al
movzx	ecx, cl
dec	dl
movzx	edx, dl
shr	eax, 1
mov	edi, ecx
shr	edi, 4
and	eax, 0Fh
and	edx, edi
and	eax, ecx
or	edx, eax
pop	edi
mov	[esi], edx
pop	esi
add	esp, 8
retn	0Ch

loc_819A10:
mov	eax, [esp+8+arg_8]
fild	[esp+8+arg_4]
push	eax
mov	eax, [esp+0Ch+arg_0]
lea	edx, [esp+0Ch+var_8]
fstp	[esp+0Ch+var_4]
push	edx
push	eax
mov	[esp+14h+var_8], 3
call	sub_821F60
add	esp, 8
retn	0Ch
sub_8199C0 endp

align 10h



sub_819A40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_819A62
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_8199C0
retn

loc_819A62:
mov	edx, [esp+arg_C]
mov	eax, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_0]
push	eax
push	edx
call	sub_818DF0
retn
sub_819A40 endp

align 10h



sub_819A80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
mov	ecx, [eax+4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_819AA5
mov	edx, [esp+arg_C]
mov	eax, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_0]
push	eax
push	edx
call	sub_8199C0
retn

loc_819AA5:
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
push	eax
call	sub_818DF0
retn
sub_819A80 endp

align 10h



sub_819AC0 proc	near
mov	eax, [esi+4]
lea	ecx, [eax+1]
cmp	ecx, 28h
jl	short loc_819ADE
mov	edx, [esi+8]
push	eax
push	edx
call	sub_81BB60
mov	dword ptr [esi+4], 1
jmp	short loc_819AE9

loc_819ADE:
mov	eax, [esi+8]
push	1
push	eax
call	sub_81B6A0

loc_819AE9:
mov	ecx, [esi]
mov	edx, [esi+8]
add	esp, 8
push	edi
sub	ecx, esi
sub	ecx, 0Ch
push	ecx
lea	edi, [esi+0Ch]
push	edi
push	edx
call	sub_81B9D0
inc	dword ptr [esi+4]
add	esp, 0Ch
mov	[esi], edi
pop	edi
retn
sub_819AC0 endp

align 10h



sub_819B10 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, esi
sub	eax, [esi]
add	eax, 20Ch
cmp	eax, 1
jnb	short loc_819B28
call	sub_819AC0

loc_819B28:
mov	ecx, [esi]
mov	dl, [esp+4+arg_4]
mov	[ecx], dl
inc	dword ptr [esi]
pop	esi
retn
sub_819B10 endp

align 10h



sub_819B40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
test	ebx, ebx
jbe	loc_819BD1
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi

loc_819B58:
mov	eax, [esi]
mov	edi, esi
sub	edi, eax
add	edi, 20Ch
cmp	edi, ebx
jbe	short loc_819B6A
mov	edi, ebx

loc_819B6A:
test	edi, edi
jbe	short loc_819B81
push	edi
push	ebp
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	[esi], edi
add	esp, 0Ch
add	ebp, edi
sub	ebx, edi
jmp	short loc_819BCA

loc_819B81:
mov	eax, [esi+4]
lea	ecx, [eax+1]
cmp	ecx, 28h
jl	short loc_819B9F
mov	edx, [esi+8]
push	eax
push	edx
call	sub_81BB60
mov	dword ptr [esi+4], 1
jmp	short loc_819BAA

loc_819B9F:
mov	eax, [esi+8]
push	1
push	eax
call	sub_81B6A0

loc_819BAA:
mov	ecx, [esi]
mov	edx, [esi+8]
sub	ecx, esi
add	esp, 8
sub	ecx, 0Ch
push	ecx
lea	edi, [esi+0Ch]
push	edi
push	edx
call	sub_81B9D0
add	esp, 0Ch
inc	dword ptr [esi+4]
mov	[esi], edi

loc_819BCA:
test	ebx, ebx
ja	short loc_819B58
pop	edi
pop	esi
pop	ebp

loc_819BD1:
pop	ebx
retn
sub_819B40 endp

align 10h



sub_819BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
add	[eax], ecx
retn
sub_819BE0 endp

align 10h



sub_819BF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, edx
push	esi
lea	esi, [eax+1]
lea	ebx, [ebx+0]

loc_819C00:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_819C00
sub	eax, esi
push	eax
mov	eax, [esp+8+arg_0]
push	edx
push	eax
call	sub_819B40
add	esp, 0Ch
pop	esi
retn
sub_819BF0 endp

align 10h



sub_819C20 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, [esi+8]
mov	eax, [ecx+1Ch]
sub	eax, 8
push	edi
cmp	eax, [ecx+20h]
jnb	short loc_819C39
xor	ebx, ebx
jmp	short loc_819C4A

loc_819C39:
lea	edx, [esp+0Ch+arg_0]
push	edx
push	eax
push	ecx
call	sub_818EC0
add	esp, 0Ch
mov	ebx, eax

loc_819C4A:
mov	ecx, [esi]
mov	eax, [esp+0Ch+arg_0]
mov	edi, esi
sub	edi, ecx
add	edi, 20Ch
cmp	edi, eax
jbe	short loc_819C60
mov	edi, eax

loc_819C60:
test	edi, edi
jbe	short loc_819C7D
push	edi
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+18h+arg_0]
add	[esi], edi
add	esp, 0Ch
add	ebx, edi
sub	eax, edi
mov	[esp+0Ch+arg_0], eax

loc_819C7D:
test	eax, eax
jnz	short loc_819C8C
mov	esi, [esi+8]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
pop	ebx
retn

loc_819C8C:
mov	eax, [esi+8]
mov	edi, [eax+1Ch]
sub	edi, [eax+20h]
sar	edi, 3
sub	edi, [esi+4]
dec	edi
push	edi
push	eax
call	sub_4E3E50
call	sub_819AC0
mov	eax, [esp+14h+arg_0]
push	eax
push	ebx
push	esi
call	sub_819B40
mov	eax, [esi+8]
mov	edx, [eax+1Ch]
add	esp, 14h
test	edi, edi
jle	short loc_819CCC
mov	ecx, edx
sub	ecx, [eax+20h]
sar	ecx, 3
sub	edi, ecx
dec	edi

loc_819CCC:
mov	ecx, edi
test	ecx, ecx
jge	short loc_819CE4
lea	edi, [edx+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd

loc_819CE4:
pop	edi
add	edx, 0FFFFFFF8h
pop	esi
mov	[eax+1Ch], edx
pop	ebx
retn
sub_819C20 endp

align 10h



sub_819CF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
lea	edx, [eax+0Ch]
mov	[eax+8], ecx
mov	dword ptr [eax+4], 0
mov	[eax], edx
retn
sub_819CF0 endp

align 10h



sub_819D10 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+4]
lea	ecx, [eax+1]
cmp	ecx, 28h
push	edi
jl	short loc_819D34
mov	edx, [esi+8]
push	eax
push	edx
call	sub_81BB60
mov	dword ptr [esi+4], 1
jmp	short loc_819D3F

loc_819D34:
mov	eax, [esi+8]
push	1
push	eax
call	sub_81B6A0

loc_819D3F:
mov	ecx, [esi]
mov	edx, [esi+8]
sub	ecx, esi
add	esp, 8
sub	ecx, 0Ch
push	ecx
lea	edi, [esi+0Ch]
push	edi
push	edx
call	sub_81B9D0
inc	dword ptr [esi+4]
mov	eax, [esi+4]
push	eax
mov	eax, [esi+8]
push	eax
mov	[esi], edi
call	sub_81BB60
add	esp, 14h
pop	edi
pop	esi
retn
sub_819D10 endp

align 10h



sub_819D70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	ecx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	edi
lea	eax, [esp+0Ch+var_4]
push	eax
push	ecx
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jnz	short loc_819DDD
mov	edi, [esi+1Ch]
push	edi
push	eax
push	esi
call	sub_819230
add	esp, 0Ch
test	eax, eax
jz	short loc_819DDD
mov	edx, [esp+0Ch+arg_8]
push	edx
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_81C070
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
push	ecx
add	eax, 0FFFFFFF0h
push	eax
push	esi
call	sub_819750
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
add	esp, 18h
cmp	ecx, [esi+20h]
jb	short loc_819DE3
cmp	dword ptr [ecx], 0
jnz	short loc_819DE3
add	dword ptr [esi+1Ch], 0FFFFFFF0h

loc_819DDD:
pop	edi
xor	eax, eax
pop	esi
pop	ecx
retn

loc_819DE3:
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-8], ecx
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
pop	edi
mov	eax, 1
pop	esi
pop	ecx
retn
sub_819D70 endp

align 10h



sub_819E10 proc	near
push	edi
push	esi
xor	edi, edi
call	sub_7A2994
add	esp, 4
cmp	al, 23h
jz	short loc_819E2F
push	edi		; int
push	edi		; __int32
push	esi		; FILE *
call	_fseek
add	esp, 0Ch
mov	eax, edi
pop	edi
retn

loc_819E2F:
mov	edi, 1

loc_819E34:
cmp	al, 0FFh
jz	short loc_819E46
push	esi		; FILE *
inc	edi
call	sub_7A2994
add	esp, 4
cmp	al, 0Ah
jnz	short loc_819E34

loc_819E46:
mov	eax, edi
pop	edi
retn
sub_819E10 endp

align 10h



sub_819E50 proc	near

Buf= byte ptr -54h
var_4= dword ptr -4
arg_0= dword ptr  4
ArgList= byte ptr  8

sub	esp, 54h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+54h+var_4], eax
push	esi
mov	esi, [esp+58h+arg_0]
push	edi
mov	edi, dword ptr [esp+5Ch+ArgList]
call	__errno
mov	eax, [eax]
push	eax		; ErrNum
lea	ecx, [esp+60h+Buf]
push	50h		; SizeInBytes
push	ecx		; Buf
call	_strerror_s
lea	edx, [esp+68h+Buf]
push	edx
push	edi		; ArgList
push	offset aCannotOpenSS ; "cannot open %s:	%s"
push	esi		; int
call	sub_81C0C0
mov	ecx, [esp+78h+var_4]
add	esp, 1Ch
pop	edi
pop	esi
xor	ecx, esp
mov	eax, 0FFFFFFFBh
call	sub_7999A3
add	esp, 54h
retn
sub_819E50 endp

align 10h



; int __cdecl sub_819EB0(int, void *)
sub_819EB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
mov	al, [ebx]
push	esi
xor	esi, esi
test	al, al
jz	short loc_819EFE
push	edi
mov	edi, [esp+0Ch+arg_4]

loc_819EC3:
cmp	al, 2Eh
jnz	short loc_819ECA
inc	esi
jmp	short loc_819EF0

loc_819ECA:
cmp	esi, 1
jnz	short loc_819ED7
cmp	al, 2Fh
jnz	short loc_819EDB
xor	esi, esi
jmp	short loc_819EF0

loc_819ED7:
test	esi, esi
jz	short loc_819EEB

loc_819EDB:		; size_t
push	esi
push	2Eh		; int
push	edi		; void *
call	_memset
add	esp, 0Ch
add	edi, esi
xor	esi, esi

loc_819EEB:
mov	al, [ebx]
mov	[edi], al
inc	edi

loc_819EF0:
mov	al, [ebx+1]
inc	ebx
test	al, al
jnz	short loc_819EC3
mov	[edi], al
pop	edi
pop	esi
pop	ebx
retn

loc_819EFE:
mov	ecx, [esp+8+arg_4]
pop	esi
mov	byte ptr [ecx],	0
pop	ebx
retn
sub_819EB0 endp

align 10h



sub_819F10 proc	near

var_914= dword ptr -914h
var_910= dword ptr -910h
var_90C= dword ptr -90Ch
ArgList= byte ptr -108h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 914h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+914h+var_4], eax
push	ebx
mov	ebx, [esp+918h+arg_0]
push	ebp
push	esi
mov	esi, [esp+920h+arg_8]
push	edi
mov	edi, [esp+924h+arg_4]
push	offset aRb_1	; "rb"
push	esi		; char *
call	sub_82B8D0
mov	ebp, eax
add	esp, 8
test	ebp, ebp
jnz	short loc_819F60
push	esi
push	ebx
call	sub_819E50
add	esp, 8
jmp	loc_819FEF

loc_819F60:
lea	eax, [esp+924h+ArgList]
push	eax		; void *
push	esi		; int
call	sub_819EB0
mov	esi, ebp
call	sub_819E10
lea	ecx, [esp+92Ch+ArgList]
push	ecx		; ArgList
push	offset a@S	; "@%s"
push	ebx		; int
mov	[esp+938h+var_910], eax
mov	[esp+938h+var_90C], ebp
call	sub_81C0C0
mov	esi, [ebx+1Ch]
sub	esi, [ebx+20h]
push	eax
lea	edx, [esp+93Ch+var_910]
push	edx
push	offset sub_82B980
push	edi
push	ebx
sar	esi, 3
call	sub_81C120
add	esp, 28h
mov	[esp+924h+var_914], eax
mov	eax, [ebx+1Ch]
test	esi, esi
jle	short loc_819FC4
mov	ecx, eax
sub	ecx, [ebx+20h]
sar	ecx, 3
sub	esi, ecx
dec	esi

loc_819FC4:
mov	ecx, esi
test	ecx, ecx
jge	short loc_819FDC
lea	edi, [eax+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd

loc_819FDC:
add	eax, 0FFFFFFF8h
push	ebp		; FILE *
mov	[ebx+1Ch], eax
call	j__fclose
mov	eax, [esp+928h+var_914]
add	esp, 4

loc_819FEF:
mov	ecx, [esp+924h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 914h
retn
sub_819F10 endp

align 10h



sub_81A010 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
mov	ecx, [eax]
add	ecx, 468h
push	ecx
push	eax
call	sub_819F10
add	esp, 0Ch
retn
sub_81A010 endp

align 10h



sub_81A030 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
mov	edx, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_0]
mov	eax, [ecx]
mov	[esp+0Ch+var_8], edx
mov	edx, [esp+0Ch+arg_4]
mov	[esp+0Ch+var_4], edx
mov	edx, [esp+0Ch+arg_C]
push	edx
lea	edx, [esp+10h+var_C]
push	edx
add	eax, 468h
push	offset sub_82B9E0
push	eax
push	ecx
mov	[esp+20h+var_C], 0
call	sub_81C120
add	esp, 20h
retn
sub_81A030 endp




sub_81A070 proc	near

arg_0= dword ptr  4

push	esi
xor	esi, esi
cmp	ds:off_1466468,	esi
jz	short loc_81A0B0
push	edi
mov	edi, [esp+8+arg_0]
xor	eax, eax

loc_81A082:
mov	eax, ds:off_146646C[eax]
push	0
push	eax
push	edi
call	sub_81C050
push	0
push	0
push	edi
call	sub_81C6E0
inc	esi
lea	eax, ds:0[esi*8]
add	esp, 18h
cmp	ds:off_1466468[eax], 0
jnz	short loc_81A082
pop	edi

loc_81A0B0:
pop	esi
retn
sub_81A070 endp

align 10h



sub_81A0C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
lea	edi, [esi+0Ch]
cmp	[esi], edi
jz	short loc_81A0D2
call	sub_819AC0

loc_81A0D2:
mov	eax, edi
pop	edi
pop	esi
retn
sub_81A0C0 endp

align 10h



sub_81A0E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ebx, [esi+1Ch]
lea	eax, [ebx-8]
cmp	eax, [esi+20h]
jb	short loc_81A100
cmp	dword ptr [eax], 0
jnz	short loc_81A100
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	esi
or	eax, 0FFFFFFFFh
pop	ebx
retn

loc_81A100:
push	ebp
push	edi
mov	edi, [esp+10h+arg_4]
push	ebx
push	0
push	edi
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_819A80
lea	eax, [ebx+8]
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
add	esp, 10h
cmp	eax, [esi+20h]
jnb	short loc_81A12F
xor	eax, eax
jmp	short loc_81A13E

loc_81A12F:
push	eax
push	esi
call	sub_818F90
add	esp, 8
call	__ftol2_sse

loc_81A13E:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	ebp, eax
test	eax, eax
jnz	short loc_81A173
lea	eax, [esp+10h+arg_0]
push	eax
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+10h+arg_0], ebp
jz	short loc_81A164
xor	eax, eax
lea	ebp, [eax+1]
jmp	short loc_81A1CB

loc_81A164:
push	eax
push	esi
call	sub_819890
add	esp, 8
lea	ebp, [eax+1]
jmp	short loc_81A1CB

loc_81A173:
lea	ecx, [edi+270Fh]
cmp	ecx, 270Fh
ja	short loc_81A18E
mov	edx, [esi+1Ch]
sub	edx, [esi+20h]
sar	edx, 3
lea	edi, [edi+edx+1]

loc_81A18E:
mov	ebx, [esi+1Ch]
push	ebx
push	eax
push	edi
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_819A80
lea	eax, [ebx+8]
add	esp, 10h
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
push	eax
push	0
push	edi
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_8197D0
add	esp, 10h
add	dword ptr [esi+1Ch], 0FFFFFFF8h

loc_81A1CB:
mov	eax, [esi+1Ch]
sub	eax, 8
push	eax
push	ebp
push	edi
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
add	esp, 10h
pop	edi
mov	eax, ebp
pop	ebp
pop	esi
pop	ebx
retn
sub_81A0E0 endp

align 10h



sub_81A200 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
mov	ebp, [esp+4+arg_8]
test	ebp, ebp
jl	loc_81A2A8
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_4]
lea	eax, [edi+270Fh]
cmp	eax, 270Fh
ja	short loc_81A232
mov	ecx, [esi+1Ch]
sub	ecx, [esi+20h]
sar	ecx, 3
lea	edi, [edi+ecx+1]

loc_81A232:
mov	ebx, [esi+1Ch]
push	ebx
push	0
push	edi
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_819A80
lea	eax, [ebx+8]
add	esp, 10h
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
push	eax
push	ebp
push	edi
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_8197D0
fild	[esp+20h+arg_8]
mov	ebx, 0FFFFFFF8h
add	[esi+1Ch], ebx
mov	eax, [esi+1Ch]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
add	esp, 10h
mov	[esi+1Ch], eax
add	eax, ebx
push	eax
push	0
push	edi
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_8197D0
add	esp, 10h
add	[esi+1Ch], ebx
pop	edi
pop	esi
pop	ebx

loc_81A2A8:
pop	ebp
retn
sub_81A200 endp

align 10h



sub_81A2B0 proc	near

var_234= byte ptr -234h
var_220= dword ptr -220h
ArgList= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+234h+var_4], eax
mov	ecx, [esp+234h+arg_4]
push	esi
mov	esi, [esp+238h+arg_0]
lea	eax, [esp+238h+var_234]
push	eax
push	ecx
push	esi
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jz	short loc_81A32B
lea	edx, [esp+238h+var_234]
push	edx
push	offset aSl	; "Sl"
push	esi
call	sub_81D440
mov	eax, [esp+244h+var_220]
add	esp, 0Ch
test	eax, eax
jle	short loc_81A32B
push	eax
lea	eax, [esp+23Ch+ArgList]
push	eax		; ArgList
push	offset aSD	; "%s:%d: "
push	esi		; int
call	sub_81C0C0
add	esp, 10h
pop	esi
mov	ecx, [esp+234h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn

loc_81A32B:
push	0
push	offset unk_146636F
push	esi
call	sub_81B9D0
mov	ecx, [esp+244h+var_4]
add	esp, 0Ch
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn
sub_81A2B0 endp

align 10h



sub_81A360 proc	near

var_238= dword ptr -238h
var_234= byte ptr -234h
var_230= dword ptr -230h
var_228= dword ptr -228h
var_220= dword ptr -220h
var_218= dword ptr -218h
ArgList= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 238h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+238h+var_4], eax
mov	eax, [esp+238h+arg_4]
push	esi
mov	esi, [esp+23Ch+arg_0]
push	edi
push	eax
mov	[esp+244h+var_238], eax
call	sub_81BF10
mov	edi, [esp+244h+arg_8]
add	esp, 4
test	edi, edi
jl	loc_81A4DF
cmp	eax, 0FFFFFFFEh
jz	short loc_81A3B2
test	eax, eax
jz	short loc_81A3B2
cmp	eax, 0FFFFFF9Ch
jnz	loc_81A4DF

loc_81A3B2:
push	ebx
mov	ebx, [esi+1Ch]
sub	ebx, [esi+20h]
push	ebp
push	4
push	esi
sar	ebx, 3
call	sub_81B6A0
push	10h
push	offset aStackTraceback ; "stack	traceback:"
push	esi
call	sub_81B9D0
mov	ebp, [esp+25Ch+arg_C]
add	esp, 14h
cmp	edi, ebp
jge	loc_81A4C6

loc_81A3E4:
mov	ecx, [esp+248h+var_238]
lea	eax, [esp+248h+var_234]
push	eax
push	edi
push	ecx
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jz	loc_81A4C6
mov	eax, [esp+248h+var_238]
lea	edx, [esp+248h+var_234]
push	edx
push	offset aNsl	; "nSl"
push	eax
call	sub_81D440
add	esp, 0Ch
test	eax, eax
jz	loc_81A4C6
lea	ecx, [esp+248h+ArgList]
push	ecx		; ArgList
push	offset aS_1	; "\n\t%s:"
push	esi		; int
call	sub_81C0C0
mov	eax, [esp+254h+var_220]
add	esp, 0Ch
test	eax, eax
jle	short loc_81A448
push	eax		; ArgList
push	offset aD	; "%d:"
push	esi		; int
call	sub_81C0C0
add	esp, 0Ch

loc_81A448:
mov	eax, [esp+248h+var_230]
test	eax, eax
jz	short loc_81A463
cmp	byte ptr [eax],	0
jz	short loc_81A463
push	eax		; ArgList
push	offset aInFunctionS ; "	in function '%s'"
push	esi		; int
call	sub_81C0C0
jmp	short loc_81A4A5

loc_81A463:
mov	edx, [esp+248h+var_228]
mov	al, [edx]
cmp	al, 43h
jz	short loc_81A498
cmp	al, 6Dh
jz	short loc_81A48F
cmp	al, 74h
jz	short loc_81A498
mov	eax, [esp+248h+var_218]
push	eax
lea	ecx, [esp+24Ch+ArgList]
push	ecx		; ArgList
push	offset aInFunctionSD ; " in function <%s:%d>"
push	esi		; int
call	sub_81C0C0
add	esp, 10h
jmp	short loc_81A4A8

loc_81A48F:
push	0Eh
push	offset aInMainChunk ; "	in main	chunk"
jmp	short loc_81A49F

loc_81A498:
push	2
push	offset a?_0	; " ?"

loc_81A49F:
push	esi
call	sub_81B9D0

loc_81A4A5:
add	esp, 0Ch

loc_81A4A8:
mov	edx, [esi+1Ch]
sub	edx, [esi+20h]
sar	edx, 3
sub	edx, ebx
push	edx
push	esi
call	sub_81BB60
inc	edi
add	esp, 8
cmp	edi, ebp
jl	loc_81A3E4

loc_81A4C6:
pop	ebp
pop	ebx
pop	edi
pop	esi
mov	ecx, [esp+238h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 238h
retn

loc_81A4DF:
push	11h
push	offset aStackTraceba_0 ; "stack	traceback:\n"
push	esi
call	sub_81B9D0
mov	ecx, [esp+24Ch+var_4]
add	esp, 0Ch
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 238h
retn
sub_81A360 endp

align 10h



; int __cdecl sub_81A510(int, int, char	*, int)
sub_81A510 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esi+1Ch]
push	eax
push	esi
call	sub_432A50
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
mov	[edi+4], edx
add	esp, 8
add	edi, 8
mov	[esi+1Ch], edi
mov	edi, [esp+10h+arg_8]
lea	ecx, [ecx+0]

loc_81A540:		; int
push	2Eh
push	edi		; char *
call	_strchr
mov	ebp, eax
add	esp, 8
test	ebp, ebp
jnz	short loc_81A562
mov	eax, edi
lea	edx, [eax+1]

loc_81A556:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81A556
sub	eax, edx
lea	ebp, [eax+edi]

loc_81A562:
mov	ebx, ebp
sub	ebx, edi
push	ebx
push	edi
push	esi
call	sub_81B9D0
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
push	ecx
add	eax, 0FFFFFFF0h
push	eax
push	esi
call	sub_819750
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 1Ch
cmp	eax, ecx
jb	loc_81A62B
cmp	dword ptr [eax], 0
jnz	short loc_81A5EE
add	dword ptr [esi+1Ch], 0FFFFFFF8h
cmp	byte ptr [ebp+0], 2Eh
mov	eax, 1
jz	short loc_81A5AC
mov	eax, [esp+10h+arg_C]

loc_81A5AC:
push	eax
push	0
push	esi
call	sub_81BD50
push	ebx
push	edi
push	esi
call	sub_81B9D0
mov	eax, [esi+1Ch]
mov	ecx, eax
mov	edx, [ecx-10h]
mov	[eax], edx
mov	ecx, [ecx-0Ch]
mov	[eax+4], ecx
add	eax, 8
lea	edx, [eax-8]
push	edx
lea	ecx, [eax-10h]
mov	[esi+1Ch], eax
push	ecx
add	eax, 0FFFFFFE0h
push	eax
push	esi
call	sub_8194A0
add	esp, 28h
add	dword ptr [esi+1Ch], 0FFFFFFF0h
jmp	short loc_81A5F7

loc_81A5EE:
cmp	eax, ecx
jb	short loc_81A62B
cmp	dword ptr [eax], 5
jnz	short loc_81A62B

loc_81A5F7:
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
mov	ecx, [eax-4]
mov	[eax-10h], edx
mov	edx, [eax]
mov	[eax-0Ch], ecx
mov	ecx, [eax+4]
mov	[eax-8], edx
mov	[eax-4], ecx
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
cmp	byte ptr [ebp+0], 2Eh
lea	edi, [ebp+1]
jz	loc_81A540
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_81A62B:
add	dword ptr [esi+1Ch], 0FFFFFFF0h
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_81A510 endp

align 10h



sub_81A640 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
sub	esp, 0Ch
mov	eax, edx
push	esi
lea	esi, [eax+1]
lea	ecx, [ecx+0]

loc_81A650:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81A650
sub	eax, esi
mov	esi, [esp+10h+arg_0]
mov	ecx, [esi]
mov	[esp+10h+var_8], eax
mov	eax, [esp+10h+arg_8]
push	eax
mov	[esp+14h+var_4], edx
lea	edx, [esp+14h+var_C]
push	edx
add	ecx, 468h
push	offset sub_82B9E0
push	ecx
push	esi
mov	[esp+24h+var_C], 0
call	sub_81C120
add	esp, 14h
test	eax, eax
jz	short loc_81A6BA
push	0
push	0FFFFFFFFh
push	0
push	esi
call	sub_81C700
add	esp, 10h
test	eax, eax
jz	short loc_81A6BA
mov	eax, [esi+1Ch]
sub	eax, 8
push	edi
mov	edi, 1
cmp	eax, [esi+20h]
jnb	short loc_81A6C1
xor	eax, eax
jmp	short loc_81A6CD

loc_81A6BA:
xor	eax, eax
pop	esi
add	esp, 0Ch
retn

loc_81A6C1:
push	0
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch

loc_81A6CD:
push	eax
push	offset aS_17	; "%s\n"
call	sub_7A1F02
add	eax, 40h
push	eax		; FILE *
call	_fprintf
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	esi
add	esp, 0Ch
retn
sub_81A640 endp

align 10h



sub_81A6F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
test	ebx, ebx
jg	short loc_81A70B
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
sar	eax, 3
lea	ebx, [eax+ebx+1]

loc_81A70B:
mov	ecx, [esp+8+arg_8]
push	ecx
push	ebx
push	esi
call	sub_819D70
add	esp, 0Ch
test	eax, eax
jz	short loc_81A74F
push	edi
mov	edi, [esi+1Ch]
push	ebx
push	esi
call	sub_432A50
mov	edx, [eax]
mov	[edi], edx
mov	eax, [eax+4]
push	1
mov	[edi+4], eax
push	1
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_81C6E0
add	esp, 14h
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_81A74F:
pop	esi
xor	eax, eax
pop	ebx
retn
sub_81A6F0 endp

align 10h



sub_81A760 proc	near

arg_0= dword ptr  4
Format=	dword ptr  8
ArgList= byte ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_81A77D
nop

loc_81A770:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_81A770

loc_81A77D:
push	0
push	esi
mov	[esi+1Ch], ecx
call	sub_81A2B0
mov	ecx, [esp+0Ch+Format]
lea	eax, [esp+0Ch+ArgList]
push	eax		; ArgList
push	ecx		; Format
push	esi		; int
call	sub_81BA00
push	1
push	offset asc_14663F8 ; "\n"
push	esi
call	sub_81B9D0
push	0Ah
push	0
push	esi
push	esi
call	sub_81A360
push	4
push	esi
call	sub_81BB60
push	esi
call	sub_81C0E0
add	esp, 3Ch
pop	esi
retn
sub_81A760 endp

align 10h



sub_81A7D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	eax
push	0FFFFD8F0h
push	ecx
call	sub_5F23D0
add	esp, 0Ch
retn
sub_81A7D0 endp

align 10h



sub_81A7F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esp+8+arg_4]
push	edi
push	0FFFFD8F0h
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 0Ch
cmp	eax, [esi+20h]
jb	short loc_81A819
cmp	dword ptr [eax], 0
jz	short loc_81A81E

loc_81A819:
pop	edi
xor	eax, eax
pop	esi
retn

loc_81A81E:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
push	0
push	0
push	esi
call	sub_81BD50
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	[eax], ecx
mov	edx, [eax-4]
push	edi
mov	[eax+4], edx
add	eax, 8
push	0FFFFD8F0h
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 18h
pop	edi
mov	eax, 1
pop	esi
retn
sub_81A7F0 endp

align 10h



; int __cdecl sub_81A860(int, char *, int, int)
sub_81A860 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esp+8+arg_4]
test	edi, edi
jz	loc_81A908
push	1		; int
push	offset aPackage_loaded ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
call	sub_81A510
push	edi
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 1Ch
cmp	eax, [esi+20h]
jb	short loc_81A8A0
cmp	dword ptr [eax], 5
jz	short loc_81A8E8

loc_81A8A0:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
push	0		; int
push	edi		; char *
push	0FFFFD8EEh	; int
push	esi		; int
call	sub_81A510
add	esp, 10h
test	eax, eax
jz	short loc_81A8C8
push	edi
push	offset aNameConflictFo ; "name conflict	for module '%s'"
push	esi
call	sub_81A760
add	esp, 0Ch

loc_81A8C8:
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	[eax], ecx
mov	edx, [eax-4]
push	edi
mov	[eax+4], edx
add	eax, 8
push	0FFFFFFFDh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 0Ch

loc_81A8E8:
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-8], ecx
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax

loc_81A908:
mov	edi, [esp+8+arg_8]
cmp	dword ptr [edi], 0
jz	short loc_81A93A
push	ebx
mov	ebx, [esp+0Ch+arg_C]

loc_81A916:
mov	eax, [edi+4]
push	ebx
push	0
push	eax
push	esi
call	sub_81B920
mov	ecx, [edi]
push	ecx
push	0FFFFFFFEh
push	esi
call	sub_5F2430
add	edi, 8
add	esp, 1Ch
cmp	dword ptr [edi], 0
jnz	short loc_81A916
pop	ebx

loc_81A93A:
pop	edi
pop	esi
retn
sub_81A860 endp

align 10h



sub_81A940 proc	near

var_234= byte ptr -234h
var_230= dword ptr -230h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+234h+var_4], eax
push	ebx
mov	ebx, [esp+238h+arg_8]
push	esi
mov	esi, [esp+23Ch+arg_0]
lea	eax, [esp+23Ch+var_234]
push	eax
push	0
push	esi
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jnz	short loc_81A9A6
mov	ecx, [esp+23Ch+arg_4]
push	ebx
push	ecx
push	offset aBadArgumentDS ;	"bad argument #%d (%s)"
push	esi
call	sub_81A760
add	esp, 10h
pop	esi
pop	ebx
mov	ecx, [esp+234h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn

loc_81A9A6:
push	edi
lea	edx, [esp+240h+var_234]
push	edx
push	offset aN	; "n"
push	esi
call	sub_81D440
mov	edi, [esp+24Ch+var_230]
add	esp, 0Ch
test	edi, edi
jnz	short loc_81A9CD
mov	edi, offset a?_1 ; "?"
mov	[esp+240h+var_230], edi
jmp	short loc_81AA04

loc_81A9CD:		; "method"
mov	ecx, offset aMethod
mov	eax, edi

loc_81A9D4:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_81A9F4
test	dl, dl
jz	short loc_81A9F0
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_81A9F4
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_81A9D4

loc_81A9F0:
xor	eax, eax
jmp	short loc_81A9F9

loc_81A9F4:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_81A9F9:
test	eax, eax
jnz	short loc_81AA04
dec	[esp+240h+arg_4]

loc_81AA04:
mov	eax, [esp+240h+arg_4]
push	ebx
push	edi
push	eax
push	offset aBadArgumentDTo ; "bad argument #%d to '%s' (%s)"
push	esi
call	sub_81A760
mov	ecx, [esp+254h+var_4]
add	esp, 14h
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn
sub_81A940 endp

align 10h



sub_81AA40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_4]
push	eax
push	esi
push	edi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jnz	short loc_81AA72
mov	eax, [eax]
cmp	eax, 9
jz	short loc_81AA81
cmp	eax, 0Ah
jz	short loc_81AA81
cmp	eax, 0FFFFFFFFh
jnz	short loc_81AA81

loc_81AA72:		; "value expected"
push	offset aValueExpected
push	esi
push	edi
call	sub_81A940
add	esp, 0Ch

loc_81AA81:
pop	edi
pop	esi
pop	ecx
retn
sub_81AA40 endp

align 10h



sub_81AA90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
push	esi
call	sub_81B6A0
add	esp, 8
test	eax, eax
jnz	short loc_81AABA
mov	ecx, [esp+4+arg_8]
push	ecx
push	offset aStackOverflowS ; "stack	overflow (%s)"
push	esi
call	sub_81A760
add	esp, 0Ch

loc_81AABA:
pop	esi
retn
sub_81AA90 endp

align 10h



; int __cdecl sub_81AAC0(int, char *, int)
sub_81AAC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	0		; int
push	eax		; int
push	ecx		; char *
push	edx		; int
call	sub_81A860
add	esp, 10h
retn
sub_81AAC0 endp

align 10h



sub_81AAE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
ArgList= byte ptr  0Ch

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
lea	eax, [esp+0Ch+var_4]
push	eax
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jz	short loc_81AB06
or	eax, 0FFFFFFFFh
jmp	short loc_81AB17

loc_81AB06:
mov	eax, [eax]
cmp	eax, 9
jz	short loc_81AB12
cmp	eax, 0Ah
jnz	short loc_81AB17

loc_81AB12:
mov	eax, 6

loc_81AB17:
push	eax
push	esi
call	sub_81BA90
mov	ecx, dword ptr [esp+14h+ArgList]
push	eax
push	ecx		; ArgList
push	offset aSExpectedGotS ;	"%s expected, got %s"
push	esi		; int
call	sub_81C0C0
push	eax
push	edi
push	esi
call	sub_81A940
add	esp, 24h
pop	edi
pop	esi
pop	ecx
retn
sub_81AAE0 endp

align 10h



sub_81AB40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

cmp	[esp+arg_4], 0
jnz	short locret_81AB5E
mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
mov	edx, [esp+arg_0]
push	eax
push	ecx
push	edx
call	sub_81A940
add	esp, 0Ch

locret_81AB5E:
retn
sub_81AB40 endp

align 10h



sub_81AB60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
lea	eax, [esp+10h+var_4]
push	eax
push	ebx
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+10h+var_4], 0
jz	short loc_81AB86
xor	edi, edi
jmp	short loc_81AB9B

loc_81AB86:
push	eax
push	esi
call	sub_818F90
add	esp, 8
call	__ftol2_sse
mov	edi, eax
test	edi, edi
jnz	short loc_81ABD0

loc_81AB9B:
lea	ecx, [esp+10h+var_4]
push	ecx
push	ebx
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+10h+var_4], 0
jnz	short loc_81ABBF
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jnz	short loc_81ABCE

loc_81ABBF:		; "integer"
push	offset aInteger
push	ebx
push	esi
call	sub_81AAE0
add	esp, 0Ch

loc_81ABCE:
mov	eax, edi

loc_81ABD0:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_81AB60 endp

align 10h



sub_81ABE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
mov	ebx, [esp+8+arg_4]
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
lea	eax, [esp+10h+var_4]
push	eax
push	ebx
push	edi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+10h+var_4], 0
jz	short loc_81AC06
xor	esi, esi
jmp	short loc_81AC1B

loc_81AC06:
mov	ecx, [esp+10h+arg_8]
push	ecx
push	eax
push	edi
call	sub_818EC0
mov	esi, eax
add	esp, 0Ch
test	esi, esi
jnz	short loc_81AC2C

loc_81AC1B:		; "string"
push	offset aString_0
push	ebx
push	edi
call	sub_81AAE0
add	esp, 0Ch
mov	eax, esi

loc_81AC2C:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_81ABE0 endp

align 10h



sub_81AC40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_4]
lea	eax, [esp+10h+var_8]
push	eax
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+10h+var_8], 0
jz	short loc_81AC6B
fldz
fstp	[esp+10h+var_8]
jmp	short loc_81AC8C

loc_81AC6B:
push	eax
push	esi
call	sub_818F90
fstp	[esp+18h+var_8]
fldz
add	esp, 8
fld	[esp+10h+var_8]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_81ACC3
fstp	st

loc_81AC8C:
lea	ecx, [esp+10h+var_4]
push	ecx
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+10h+var_4], 0
jnz	short loc_81ACB0
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jnz	short loc_81ACBF

loc_81ACB0:		; "number"
push	offset aNumber
push	edi
push	esi
call	sub_81AAE0
add	esp, 0Ch

loc_81ACBF:
fld	[esp+10h+var_8]

loc_81ACC3:
pop	edi
pop	esi
add	esp, 8
retn
sub_81AC40 endp

align 10h



sub_81ACD0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
lea	eax, [esp+0Ch+var_4]
push	eax
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jz	short loc_81ACF6
or	ecx, 0FFFFFFFFh
jmp	short loc_81AD09

loc_81ACF6:
mov	eax, [eax]
cmp	eax, 9
jz	short loc_81AD02
cmp	eax, 0Ah
jnz	short loc_81AD07

loc_81AD02:
mov	eax, 6

loc_81AD07:
mov	ecx, eax

loc_81AD09:
mov	eax, [esp+0Ch+arg_8]
cmp	ecx, eax
jz	short loc_81AD23
push	eax
push	esi
call	sub_81BA90
push	eax
push	edi
push	esi
call	sub_81AAE0
add	esp, 14h

loc_81AD23:
pop	edi
pop	esi
pop	ecx
retn
sub_81ACD0 endp

align 10h



sub_81AD30 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_4]
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
lea	eax, [esp+14h+var_4]
push	eax
push	ebp
push	esi
call	sub_4328D0
mov	ebx, [esp+20h+arg_8]
add	esp, 0Ch
cmp	[esp+14h+var_4], 0
jnz	short loc_81ADA0
mov	edi, [esi+1Ch]
push	edi
push	eax
push	esi
call	sub_819230
add	esp, 0Ch
test	eax, eax
jz	short loc_81ADA0
push	ebx
push	0FFFFD8F0h
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_5F23D0
push	0FFFFFFFEh
push	0FFFFFFFFh
push	esi
call	sub_5F2370
add	dword ptr [esi+1Ch], 0FFFFFFF0h
add	esp, 18h
test	eax, eax
jz	short loc_81ADA0
push	ebp
push	esi
call	sub_5F2210
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn

loc_81ADA0:
push	ebx
push	ebp
push	esi
call	sub_81AAE0
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
pop	ecx
retn
sub_81AD30 endp

align 10h



sub_81ADC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_4]
push	eax
push	esi
push	edi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jnz	short loc_81AE0A
lea	ecx, [esp+0Ch+var_4]
push	ecx
push	esi
push	edi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jnz	short loc_81ADFC
cmp	dword ptr [eax], 0
jz	short loc_81AE0A

loc_81ADFC:
push	esi
push	edi
call	sub_81AB60
add	esp, 8
pop	edi
pop	esi
pop	ecx
retn

loc_81AE0A:
mov	eax, [esp+0Ch+arg_8]
pop	edi
pop	esi
pop	ecx
retn
sub_81ADC0 endp

align 10h



sub_81AE20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	esi
mov	esi, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_4]
push	eax
push	esi
push	edi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jnz	short loc_81AE6F
lea	ecx, [esp+0Ch+var_4]
push	ecx
push	esi
push	edi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+0Ch+var_4], 0
jnz	short loc_81AE5C
cmp	dword ptr [eax], 0
jz	short loc_81AE6F

loc_81AE5C:
mov	edx, [esp+0Ch+arg_C]
push	edx
push	esi
push	edi
call	sub_81ABE0
add	esp, 0Ch
pop	edi
pop	esi
pop	ecx
retn

loc_81AE6F:
mov	edi, [esp+0Ch+arg_C]
mov	eax, [esp+0Ch+arg_8]
test	edi, edi
jz	short loc_81AE8F
test	eax, eax
jz	short loc_81AE8F
mov	ecx, eax
lea	esi, [ecx+1]

loc_81AE84:
mov	dl, [ecx]
inc	ecx
test	dl, dl
jnz	short loc_81AE84
sub	ecx, esi
mov	[edi], ecx

loc_81AE8F:
pop	edi
pop	esi
pop	ecx
retn
sub_81AE20 endp

align 10h



sub_81AEA0 proc	near

var_48=	dword ptr -48h
DstBuf=	byte ptr -44h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 48h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+48h+var_4], eax
push	ebx
mov	ebx, [esp+4Ch+arg_4]
push	ebp
mov	ebp, [esp+50h+arg_0]
push	esi
mov	esi, [esp+54h+arg_8]
push	edi
lea	eax, [esp+58h+var_48]
push	eax
push	ebx
push	ebp
xor	edi, edi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+58h+var_48], edi
jnz	short loc_81AEFE
lea	ecx, [esp+58h+var_48]
push	ecx
push	ebx
push	ebp
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+58h+var_48], edi
jnz	short loc_81AEEE
cmp	[eax], edi
jz	short loc_81AEFE

loc_81AEEE:
push	0
push	ebx
push	ebp
call	sub_81ABE0
add	esp, 0Ch
test	eax, eax
jnz	short loc_81AF13

loc_81AEFE:
test	esi, esi
jnz	short loc_81AF11
push	offset aString_4 ; "string"
push	ebx
push	ebp
call	sub_81AAE0
add	esp, 0Ch

loc_81AF11:
mov	eax, esi

loc_81AF13:
mov	esi, [esp+58h+arg_C]
mov	ecx, [esi]
test	ecx, ecx
jz	short loc_81AF58
lea	ecx, [ecx+0]

loc_81AF20:
mov	edx, eax

loc_81AF22:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_81AF42
test	bl, bl
jz	short loc_81AF3E
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_81AF42
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_81AF22

loc_81AF3E:
xor	ecx, ecx
jmp	short loc_81AF47

loc_81AF42:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_81AF47:
test	ecx, ecx
jz	short loc_81AF54
mov	ecx, [esi+edi*4+4]
inc	edi
test	ecx, ecx
jnz	short loc_81AF20

loc_81AF54:
mov	ebx, [esp+58h+arg_4]

loc_81AF58:
cmp	dword ptr [esi+edi*4], 0
jnz	short loc_81AF94
push	eax		; ArgList
push	offset aInvalidOptionS ; "invalid option '%s'"
lea	edx, [esp+60h+DstBuf]
push	40h		; SizeInBytes
push	edx		; DstBuf
call	sub_822D70
lea	eax, [esp+68h+DstBuf]
push	eax
push	ebx
push	ebp
call	sub_81A940
add	esp, 1Ch
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
mov	ecx, [esp+48h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn

loc_81AF94:
mov	ecx, [esp+58h+var_4]
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 48h
retn
sub_81AEA0 endp

align 10h



sub_81AFB0 proc	near
push	ebx
push	ebp
push	edi
mov	edi, eax
push	edi
push	esi
call	sub_822DA0
mov	ecx, [esi]
add	esp, 8
push	3
push	offset aArg_0	; "arg"
push	esi
add	ecx, 2A0h
call	sub_81FBA0
push	1
mov	ebx, 4
mov	[edi+88h], ebx
mov	[edi+8Ch], eax
mov	ecx, [esi]
push	offset aN_1	; "n"
push	esi
add	ecx, 2A0h
call	sub_81FBA0
push	15h
mov	[edi+90h], ebx
mov	[edi+94h], eax
mov	ecx, [esi]
push	offset aErrorOutOfMemo ; "Error: Out of	memory."
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	[edi+98h], ebx
mov	[edi+9Ch], eax
mov	ebx, offset off_1681D70
add	edi, 0A0h

loc_81B032:
mov	ebp, [ebx]
mov	eax, ebp
lea	ecx, [eax+1]
lea	esp, [esp+0]

loc_81B040:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_81B040
sub	eax, ecx
mov	ecx, [esi]
push	eax
push	ebp
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	dword ptr [edi], 4
mov	[edi+4], eax
add	ebx, 4
add	edi, 8
cmp	ebx, offset unk_1681DA4
jl	short loc_81B032
pop	edi
pop	ebp
pop	ebx
retn
sub_81AFB0 endp

align 10h



sub_81B080 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	2
push	esi
call	sub_81AB60
mov	edi, [esi+1Ch]
inc	eax
push	edi
push	eax
mov	[esp+18h+arg_0], eax
mov	eax, [esi+20h]
push	eax
push	esi
call	sub_819A80
lea	eax, [edi+8]
lea	ecx, [eax-8]
add	esp, 18h
mov	[esi+1Ch], eax
cmp	ecx, [esi+20h]
jb	short loc_81B0C0
cmp	dword ptr [ecx], 0
jnz	short loc_81B0C0
pop	edi
mov	eax, 1
pop	esi
retn

loc_81B0C0:
fild	[esp+8+arg_0]
mov	dword ptr [eax], 3
add	eax, 8
lea	ecx, [eax-8]
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	edx, [ecx]
mov	[eax-18h], edx
mov	edx, [ecx+4]
mov	[eax-14h], edx
pop	edi
mov	[esi+1Ch], ecx
mov	eax, 2
pop	esi
retn
sub_81B080 endp

align 10h



sub_81B0F0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
push	5
push	1
push	edi
call	sub_81ACD0
mov	esi, [edi+20h]
mov	eax, [edi+1Ch]
add	esi, 10h
add	esp, 0Ch
cmp	eax, esi
jnb	short loc_81B11E

loc_81B111:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, esi
jb	short loc_81B111

loc_81B11E:
mov	eax, [edi+20h]
push	esi
lea	ebx, [esi-8]
push	ebx
push	eax
push	edi
mov	[edi+1Ch], esi
call	sub_819850
add	esi, 8
add	esp, 10h
mov	[edi+1Ch], esi
cmp	dword ptr [ebx], 0
jnz	short loc_81B158
add	dword ptr [edi+1Ch], 0FFFFFFF0h
mov	eax, [edi+1Ch]
mov	dword ptr [eax], 0
mov	dword ptr [eax+8], 0
add	eax, 10h
mov	[edi+1Ch], eax

loc_81B158:
pop	edi
pop	esi
mov	eax, 2
pop	ebx
retn
sub_81B0F0 endp

align 10h



sub_81B170 proc	near

var_238= dword ptr -238h
var_234= byte ptr -234h
var_230= dword ptr -230h
var_220= dword ptr -220h
var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 238h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+238h+var_4], eax
push	ebp
push	esi
mov	esi, [esp+240h+arg_0]
mov	eax, [esi]
mov	ebp, [eax+494h]
mov	eax, [esi+1Ch]
sub	eax, 8
cmp	eax, [esi+20h]
jnb	short loc_81B1A4
xor	eax, eax
jmp	short loc_81B1B0

loc_81B1A4:
push	0
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch

loc_81B1B0:
push	eax
push	offset aKorePanicUnpro ; "Kore panic: Unprotected error	(%s)\n\nFul"...
push	esi
call	ebp
lea	ecx, [esp+24Ch+var_234]
push	ecx
push	1
push	esi
mov	[esp+258h+var_238], 1
call	sub_81D5E0
add	esp, 18h
test	eax, eax
jz	loc_81B295
push	ebx
push	edi
jmp	short loc_81B1E0
align 10h

loc_81B1E0:
cmp	[esp+248h+var_230], 0
jnz	short loc_81B1EF
mov	[esp+248h+var_230], offset a?_5	; "?"

loc_81B1EF:
lea	edx, [esp+248h+var_234]
push	edx
push	offset aSnlu	; "Snlu"
push	esi
call	sub_81D440
mov	eax, [esp+254h+var_220]
mov	edx, [esp+254h+var_230]
push	eax
lea	ecx, [esp+258h+var_210]
push	ecx
push	edx
push	offset aFunctionSSLine ; "Function %s()	%s Line	%d\n"
push	esi
call	ebp
mov	ebx, 1
push	ebx
lea	eax, [esp+26Ch+var_234]
push	eax
push	esi
call	sub_81D590
mov	edi, eax
add	esp, 2Ch
test	edi, edi
jz	short loc_81B270

loc_81B230:
mov	eax, [esi+1Ch]
sub	eax, 8
cmp	eax, [esi+20h]
jnb	short loc_81B23F
xor	eax, eax
jmp	short loc_81B24B

loc_81B23F:
push	0
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch

loc_81B24B:
push	eax
push	edi
push	ebx
push	offset aLocal2dSS ; "	 Local %2d: %s = %s\n"
push	esi
call	ebp
add	dword ptr [esi+1Ch], 0FFFFFFF8h
inc	ebx
push	ebx
lea	ecx, [esp+260h+var_234]
push	ecx
push	esi
call	sub_81D590
mov	edi, eax
add	esp, 20h
test	edi, edi
jnz	short loc_81B230

loc_81B270:
mov	eax, [esp+248h+var_238]
lea	edx, [esp+248h+var_234]
inc	eax
push	edx
push	eax
push	esi
mov	[esp+254h+var_238], eax
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jnz	loc_81B1E0
int	3		; Trap to Debugger
pop	edi
pop	ebx
jmp	short loc_81B296

loc_81B295:		; Trap to Debugger
int	3

loc_81B296:
mov	ecx, [esp+240h+var_4]
pop	esi
pop	ebp
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 238h
retn
sub_81B170 endp

align 10h



; int __cdecl sub_81B2B0(int, void *Memory, int, size_t	Size)
sub_81B2B0 proc	near

Memory=	dword ptr  8
arg_8= dword ptr  0Ch
Size= dword ptr	 10h

mov	eax, [esp+Size]
push	esi
xor	esi, esi
push	edi
mov	edi, [esp+8+Memory]
test	eax, eax
jz	short loc_81B2E0
push	10h		; Alignment
push	eax		; Size
call	__aligned_malloc
add	esp, 8
mov	esi, eax
test	edi, edi
jz	short loc_81B2EF
mov	eax, [esp+8+arg_8]
push	eax
push	edi
push	esi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch

loc_81B2E0:
test	edi, edi
jz	short loc_81B2ED
push	edi		; Memory
call	__aligned_free
add	esp, 4

loc_81B2ED:
mov	eax, esi

loc_81B2EF:
pop	edi
pop	esi
retn
sub_81B2B0 endp

align 10h



sub_81B300 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, edx
push	esi
lea	esi, [eax+1]
lea	ebx, [ebx+0]

loc_81B310:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81B310
sub	eax, esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi]
push	eax
push	edx
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	edx, [esi]
mov	[esi+48h], eax
mov	ecx, 1
pop	esi
cmp	[edx+23Ch], ecx
jnz	short locret_81B343
or	[eax-4], ecx

locret_81B343:
retn
sub_81B300 endp

align 10h



sub_81B350 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+48h]
add	eax, 8
retn
sub_81B350 endp

align 10h



sub_81B360 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	eax, [edi+14h]
mov	ecx, [edi+10h]
push	4A0h
push	0
push	0
push	eax
call	ecx
push	4A0h		; size_t
mov	ebx, eax
push	0		; int
push	ebx		; void *
call	_memset
mov	edx, [edi+38h]
mov	[ebx+480h], edx
mov	eax, [edi+1Ch]
mov	[ebx+494h], eax
mov	ecx, [edi+18h]
mov	[ebx+46Ch], ecx
mov	edx, [edi+0Ch]
mov	[ebx+474h], edx
mov	eax, [edi+30h]
mov	[ebx+468h], eax
mov	ecx, [edi+40h]
mov	[ebx+478h], ecx
mov	edx, [edi+8]
mov	eax, [edi+14h]
mov	ecx, [edi+10h]
add	esp, 1Ch
push	edx		; int
push	eax		; int
push	ecx		; int
mov	ecx, ebx	; void *
call	sub_82CBD0
push	78h
mov	ecx, ebx
call	sub_82CFF0
push	78h		; size_t
mov	esi, eax
push	0		; int
push	esi		; void *
call	_memset
add	esp, 0Ch
mov	[ebx+2B8h], esi
mov	[ebx+3C4h], esi
mov	[esi], ebx
mov	edx, [edi+44h]
mov	eax, [edi+3Ch]
push	edx		; int
push	eax		; int
push	0FFFFFFFFh	; int
push	78h		; int
push	esi		; int
lea	ecx, [ebx+230h]	; void *
call	sub_81DD00
mov	ecx, [edi+2Ch]
push	ecx
push	esi
lea	ecx, [ebx+2A0h]
call	sub_81F9C0
mov	ecx, [edi+34h]
test	ecx, ecx
jz	short loc_81B436
push	esi
call	sub_82CA60
mov	[ebx+2B4h], eax

loc_81B436:
mov	ebp, 5
mov	[esi+38h], ebp
mov	edx, [edi+24h]
push	edx
push	0
push	esi
call	sub_81FF50
mov	[esi+3Ch], eax
mov	[esi+30h], ebp
mov	eax, [edi+28h]
push	eax
push	0
push	esi
call	sub_81FF50
push	0FA0h
push	esi
mov	[esi+34h], eax
call	sub_82C5B0
mov	ecx, [esi]
mov	ebp, 1
add	esp, 20h
cmp	[ecx+23Ch], ebp
jnz	short loc_81B47F
or	[eax-4], ebp

loc_81B47F:
push	8
lea	edx, [eax+0FA0h]
push	esi
lea	ecx, [esi+4]
mov	[esi+24h], edx
mov	[esi+20h], eax
mov	[esi+1Ch], eax
mov	[esi+28h], eax
call	sub_8238C0
lea	eax, [ebx+2BCh]
call	sub_81AFB0
mov	ecx, [esi]
push	ebp
add	ecx, 230h
call	sub_81D9C0
mov	edi, [edi+20h]
mov	eax, edi
lea	edx, [eax+1]
lea	ecx, [ecx+0]

loc_81B4C0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81B4C0
mov	ecx, [esi]
sub	eax, edx
push	eax
push	edi
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	ecx, [esi]
mov	[esi+48h], eax
cmp	[ecx+23Ch], ebp
jnz	short loc_81B4E9
or	[eax-4], ebp

loc_81B4E9:
call	sub_7921C0
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn
sub_81B360 endp

align 10h



sub_81B500 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
push	78h
push	ebp
call	sub_82C5B0
push	78h		; size_t
mov	ebx, eax
push	0		; int
push	ebx		; void *
call	_memset
mov	eax, [ebp+0]
mov	ecx, [eax+3A8h]
mov	[ebx+48h], ecx
mov	edx, [ebp+30h]
mov	[ebx+30h], edx
mov	eax, [ebp+34h]
mov	[ebx+34h], eax
mov	ecx, [ebp+38h]
mov	[ebx+38h], ecx
mov	edx, [ebp+3Ch]
mov	[ebx+3Ch], edx
mov	eax, [ebp+0]
mov	[ebx], eax
lea	esi, [ebp+54h]
lea	edi, [ebx+54h]
mov	ecx, 8
rep movsd
mov	ecx, [ebp+0]
mov	edx, [ecx+2B8h]
mov	eax, [edx+4Ch]
mov	[ebx+4Ch], eax
mov	ecx, [ebp+0]
mov	edx, [ecx+2B8h]
mov	[edx+4Ch], ebx
mov	eax, [ebp+1Ch]
mov	[eax+4], ebx
mov	ecx, [ebp+1Ch]
push	0FA0h
mov	dword ptr [ecx], 8
add	dword ptr [ebp+1Ch], 8
push	ebx
call	sub_82C5B0
mov	edx, [ebx]
mov	ecx, 1
add	esp, 1Ch
cmp	[edx+23Ch], ecx
jnz	short loc_81B5A0
or	[eax-4], ecx

loc_81B5A0:
lea	ecx, [eax+0FA0h]
push	8
mov	[ebx+24h], ecx
push	ebx
lea	ecx, [ebx+4]
mov	[ebx+20h], eax
mov	[ebx+1Ch], eax
mov	[ebx+28h], eax
call	sub_8238C0
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
retn
sub_81B500 endp

align 10h



sub_81B5D0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi+3Ch]
mov	edx, [ecx+18h]
mov	ecx, [esi+34h]
mov	ecx, [ecx+8]
mov	eax, [esi]
push	edi
mov	edi, [eax+494h]
test	ecx, 0F0000000h
jz	short loc_81B5FA
and	ecx, 0FFFFFFFh

loc_81B5FA:
mov	ebx, [eax+2A4h]
mov	ebp, [eax+2A8h]
push	edx
push	offset aRegistryArrayS ; "Registry Array Size:	%d\n"
push	esi
mov	[esp+1Ch+arg_0], ecx
call	edi
mov	eax, [esp+1Ch+arg_0]
push	eax
push	offset aGlobalsHashSiz ; "Globals Hash Size:	%d\n"
push	esi
call	edi
push	ebp
push	ebx
push	offset aInternStringTa ; "Intern String	Table:	%d allocated, %d "...
push	esi
call	edi
mov	ecx, [esi]
mov	edx, [ecx+8]
shr	edx, 0Ah
push	edx
push	offset aMaxMemoryAlloc ; "Max memory allocated:	%d kilobytes\n"
push	esi
call	edi
add	esp, 34h
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_81B5D0 endp

align 10h



sub_81B650 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
push	esi
mov	dword ptr [eax+480h], 0FFFFFFFFh
call	sub_81B5D0
push	esi
call	sub_81E9A0
mov	ecx, [esi]
add	esp, 8
cmp	dword ptr [ecx+410h], 0
jz	short loc_81B686
push	2
push	esi
call	nullsub_2
add	esp, 8

loc_81B686:
mov	esi, [esi]
mov	ecx, esi
call	sub_82CAB0
push	0
push	4A0h
push	esi
mov	ecx, esi
call	sub_82CB40
pop	esi
retn
sub_81B650 endp




sub_81B6A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
test	ecx, ecx
jle	short loc_81B6C1
mov	eax, [esp+arg_0]
mov	edx, [eax+1Ch]
lea	edx, [edx+ecx*8]
cmp	edx, [eax+24h]
jbe	short loc_81B6C1
push	ecx
push	eax
lea	ecx, [eax+4]
call	sub_823530

loc_81B6C1:
mov	eax, 1
retn
sub_81B6A0 endp

align 10h



sub_81B6D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	esi
xor	esi, esi
cmp	eax, 9		; switch 10 cases
ja	loc_81B7CD	; default
			; jumptable 0081B6E0 case 8
jmp	ds:off_81B7D4[eax*4] ; switch jump

loc_81B6E7:		; jumptable 0081B6E0 case 0
mov	eax, [esp+4+arg_0]
mov	ecx, [eax]
mov	eax, esi
mov	byte ptr [ecx+270h], 1
pop	esi
retn

loc_81B6F8:		; jumptable 0081B6E0 case 1
mov	edx, [esp+4+arg_0]
mov	eax, [edx]
mov	byte ptr [eax+270h], 0
mov	eax, esi
pop	esi
retn

loc_81B709:		; jumptable 0081B6E0 case 3
mov	ecx, [esp+4+arg_0]
mov	edx, [ecx]
mov	eax, [edx+4]
cdq
and	edx, 3FFh
add	eax, edx
mov	esi, eax
sar	esi, 0Ah
mov	eax, esi
pop	esi
retn

loc_81B724:		; jumptable 0081B6E0 case 4
mov	eax, [esp+4+arg_0]
mov	ecx, [eax]
mov	esi, [ecx+4]
and	esi, 800003FFh
jns	loc_81B7D0
dec	esi
or	esi, 0FFFFFC00h
inc	esi
mov	eax, esi
pop	esi
retn

loc_81B745:		; jumptable 0081B6E0 case 6
mov	edx, [esp+4+arg_0]
mov	eax, [edx]
mov	esi, [eax+268h]
mov	ecx, [esp+4+arg_8]
add	eax, 230h
mov	[eax+38h], ecx
mov	eax, esi
pop	esi
retn

loc_81B761:		; jumptable 0081B6E0 case 7
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_8]
mov	ecx, [eax]
push	edx
add	ecx, 230h
call	sub_81D9A0
mov	esi, eax
pop	esi
retn

loc_81B77B:		; jumptable 0081B6E0 case 9
cmp	[esp+4+arg_8], 1
mov	eax, [esp+4+arg_0]
setnz	cl
movzx	edx, cl
mov	ecx, [eax]
push	edx
add	ecx, 230h
call	sub_81D9C0
mov	eax, esi
pop	esi
retn

loc_81B79C:		; jumptable 0081B6E0 case 2
mov	ecx, [esp+4+arg_0]
mov	ecx, [ecx]
push	0FFFFFFFFh
add	ecx, 230h
call	sub_81F7B0
mov	eax, esi
pop	esi
retn

loc_81B7B3:		; jumptable 0081B6E0 case 5
mov	eax, [esp+4+arg_0]
mov	edx, [esp+4+arg_8]
mov	ecx, [eax]
push	edx
add	ecx, 230h
call	sub_81F7B0
mov	esi, eax
pop	esi
retn

loc_81B7CD:		; default
or	esi, 0FFFFFFFFh	; jumptable 0081B6E0 case 8

loc_81B7D0:
mov	eax, esi
pop	esi
retn
sub_81B6D0 endp

off_81B7D4 dd offset loc_81B6E7	; jump table for switch	statement
dd offset loc_81B6F8
dd offset loc_81B79C
dd offset loc_81B709
dd offset loc_81B724
dd offset loc_81B7B3
dd offset loc_81B745
dd offset loc_81B761
dd offset loc_81B7CD
dd offset loc_81B77B
align 10h



sub_81B800 proc	near

var_14=	byte ptr -14h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
sub	esp, 14h
push	esi
mov	esi, [eax+1Ch]
sub	esi, 8
cmp	dword ptr [esi], 9
jz	short loc_81B81D
mov	eax, 1
pop	esi
add	esp, 14h
retn

loc_81B81D:
mov	ecx, [esp+18h+arg_8]
mov	edx, [esp+18h+arg_4]
push	0
push	ecx
push	edx
push	eax
lea	ecx, [esp+28h+var_14]
call	sub_82D3B0
mov	eax, [esi+4]
mov	ecx, [eax+8]
push	ecx
lea	ecx, [esp+1Ch+var_14]
call	sub_82DA10
pop	esi
add	esp, 14h
retn
sub_81B800 endp

align 10h



sub_81B850 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
push	ebp
mov	ebp, [esp+8+arg_8]
test	byte ptr [ebp+0], 3
jz	loc_81B912
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+4]
cmp	eax, 4
jb	loc_81B911
push	ebx
push	edi
lea	ecx, [esp+14h+arg_8]
push	ecx
mov	ecx, [esi+10h]
lea	edx, [esp+18h+var_4]
push	edx
push	eax
mov	eax, [esi+8]
push	eax
push	ecx
xor	edi, edi
push	ebp
mov	[esp+2Ch+var_4], edi
mov	[esp+2Ch+arg_8], edi
call	sub_82ECC0
mov	ecx, [esp+2Ch+arg_8]
mov	eax, [esi+8]
mov	ebx, [esp+2Ch+arg_4]
add	esp, 18h
cmp	[esi+4], ecx
jz	short loc_81B8D6
lea	edx, ds:0[ecx*4]
push	edx
push	ebx
call	sub_82C5B0
mov	edx, [ebx]
mov	ecx, 1
add	esp, 8
cmp	[edx+23Ch], ecx
jnz	short loc_81B8CC
or	[eax-4], ecx

loc_81B8CC:
mov	ecx, [esp+14h+arg_8]
mov	[esi+8], eax
mov	[esi+4], ecx

loc_81B8D6:
mov	edx, [esp+14h+var_4]
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+20h+var_4]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 10h
cmp	[esi+14h], edi
jle	short loc_81B90F

loc_81B8F8:
mov	ecx, [esi+18h]
mov	edx, [ecx+edi*4]
push	ebp
push	ebx
push	edx
call	sub_81B850
inc	edi
add	esp, 0Ch
cmp	edi, [esi+14h]
jl	short loc_81B8F8

loc_81B90F:
pop	edi
pop	ebx

loc_81B911:
pop	esi

loc_81B912:
pop	ebp
pop	ecx
retn
sub_81B850 endp

align 10h



sub_81B920 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, [esp+8+arg_8]
push	edi
test	esi, esi
jge	short loc_81B92D
xor	esi, esi

loc_81B92D:
mov	edi, [esp+0Ch+arg_0]
lea	ebx, ds:0[esi*8]
lea	eax, [ebx+14h]
push	eax
push	edi
call	sub_82C5B0
mov	ecx, [esp+14h+arg_4]
add	esp, 8
mov	[eax+0Ch], esi
mov	[eax+8], ecx
test	esi, esi
jle	short loc_81B97A
mov	ecx, [edi+1Ch]
sub	ecx, ebx
cmp	esi, 1
jl	short loc_81B977
lea	edx, [eax+14h]
push	ebp

loc_81B961:
mov	ebp, [ecx]
mov	[edx], ebp
mov	ebp, [ecx+4]
mov	[edx+4], ebp
add	ecx, 8
add	edx, 8
sub	esi, 1
jnz	short loc_81B961
pop	ebp

loc_81B977:
sub	[edi+1Ch], ebx

loc_81B97A:
mov	edx, [edi+0Ch]
sub	edx, [edi+4]
test	edx, 0FFFFFFF0h
jge	short loc_81B98D
mov	ecx, [edi+34h]
jmp	short loc_81B9A4

loc_81B98D:
mov	ecx, [edi+20h]
cmp	dword ptr [ecx-8], 9
jnz	short loc_81B99E
mov	ecx, [ecx-4]
mov	ecx, [ecx+4]
jmp	short loc_81B9A4

loc_81B99E:
mov	edx, [ecx-4]
mov	ecx, [edx+4]

loc_81B9A4:
mov	[eax+4], ecx
mov	dword ptr [eax], 5
mov	ecx, [edi+1Ch]
mov	dword ptr [ecx], 0Ah
mov	edx, [edi+1Ch]
mov	[edx+4], eax
add	dword ptr [edi+1Ch], 8
pop	edi
pop	esi
pop	ebx
retn
sub_81B920 endp

align 10h



sub_81B9D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
push	esi
mov	esi, [esp+4+arg_0]
push	eax
push	ecx
mov	ecx, [esi]
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	ecx, [esi+1Ch]
mov	dword ptr [ecx], 4
mov	[ecx+4], eax
add	dword ptr [esi+1Ch], 8
pop	esi
retn
sub_81B9D0 endp

align 10h



; int __cdecl sub_81BA00(int, char *Format, va_list ArgList)
sub_81BA00 proc	near

DstBuf=	byte ptr -204h
var_4= dword ptr -4
arg_0= dword ptr  4
Format=	dword ptr  8
ArgList= dword ptr  0Ch

sub	esp, 204h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+204h+var_4], eax
mov	ecx, [esp+204h+ArgList]
mov	eax, [esp+204h+Format]
push	esi
mov	esi, [esp+208h+arg_0]
push	ecx		; ArgList
push	eax		; Format
lea	eax, [esp+210h+DstBuf]
push	200h		; SizeInBytes
push	eax		; DstBuf
call	sub_822D40
add	esp, 10h
push	eax
lea	ecx, [esp+20Ch+DstBuf]
push	ecx
mov	ecx, [esi]
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	ecx, [esi+1Ch]
mov	[ecx+4], eax
mov	dword ptr [ecx], 4
mov	eax, [esi+1Ch]
mov	ecx, [esp+208h+var_4]
lea	edx, [eax+8]
mov	[esi+1Ch], edx
mov	eax, [eax+4]
pop	esi
xor	ecx, esp
add	eax, 8
call	sub_7999A3
add	esp, 204h
retn
sub_81BA00 endp

align 10h



sub_81BA90 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	eax, off_1681D74[eax*4]
retn
sub_81BA90 endp

align 10h



sub_81BAA0 proc	near

var_11C= qword ptr -11Ch
DstBuf=	byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	ebx
mov	ebx, [esp+108h+arg_4]
push	ebp
push	esi
mov	esi, [esp+110h+arg_0]
push	edi
lea	edi, ds:0[ebx*8]
test	ebx, ebx
jle	short loc_81BADA
mov	eax, [esi+20h]
lea	eax, [eax+edi-8]
jmp	short loc_81BADF

loc_81BADA:
mov	eax, [esi+1Ch]
add	eax, edi

loc_81BADF:
fld	dword ptr [eax+4]
sub	esp, 8
fstp	[esp+11Ch+var_11C]
push	offset a0_14g_1	; "%0.14g"
lea	ecx, [esp+120h+DstBuf]
push	100h		; SizeInBytes
push	ecx		; DstBuf
call	sub_822D70
mov	ebp, eax
lea	eax, [esp+128h+DstBuf]
add	esp, 14h
lea	edx, [eax+1]

loc_81BB08:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81BB08
mov	ecx, [esi]
sub	eax, edx
push	eax
lea	edx, [esp+118h+DstBuf]
push	edx
push	esi
add	ecx, 2A0h
call	sub_81FBA0
test	ebx, ebx
jle	short loc_81BB32
mov	ecx, [esi+20h]
lea	esi, [ecx+edi-8]
jmp	short loc_81BB37

loc_81BB32:
mov	esi, [esi+1Ch]
add	esi, edi

loc_81BB37:
mov	ecx, [esp+114h+var_4]
pop	edi
mov	[esi+4], eax
mov	dword ptr [esi], 4
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_81BAA0 endp

align 10h



sub_81BB60 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebp
mov	ebp, [esp+14h+arg_4]
test	ebp, ebp
jl	loc_81BCF1
push	esi
jnz	short loc_81BBA2
mov	esi, [esp+18h+arg_0]
mov	ecx, [esi]
push	0
push	offset unk_146659D
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	ecx, [esi+1Ch]
mov	dword ptr [ecx], 4
mov	[ecx+4], eax
add	dword ptr [esi+1Ch], 8
pop	esi
pop	ebp
add	esp, 10h
retn

loc_81BBA2:
cmp	ebp, 1
jz	loc_81BCF0
mov	esi, [esp+18h+arg_0]
push	ebx
push	edi
mov	[esp+20h+arg_4], 0
mov	[esp+20h+var_C], ebp
test	ebp, ebp
jle	short loc_81BC29
mov	edi, ebp
neg	edi
lea	ebx, ds:0[ebp*8]
lea	esp, [esp+0]

loc_81BBD0:
test	edi, edi
jle	short loc_81BBDE
mov	eax, [esi+20h]
sub	eax, ebx
sub	eax, 8
jmp	short loc_81BBE3

loc_81BBDE:
mov	eax, [esi+1Ch]
sub	eax, ebx

loc_81BBE3:
mov	ecx, [eax]
cmp	ecx, 3
jnz	short loc_81BBFA
push	edi
push	esi
call	sub_81BAA0
add	esp, 8
add	[esp+20h+arg_4], eax
jmp	short loc_81BC18

loc_81BBFA:
cmp	ecx, 4
jnz	short loc_81BC0A
mov	eax, [eax+4]
mov	ecx, [eax]
add	[esp+20h+arg_4], ecx
jmp	short loc_81BC18

loc_81BC0A:		; "can only concat number and string"
push	offset aCanOnlyConcatN
push	esi
call	sub_81A760
add	esp, 8

loc_81BC18:
mov	eax, [esp+20h+var_C]
dec	eax
sub	ebx, 8
inc	edi
mov	[esp+20h+var_C], eax
test	eax, eax
jg	short loc_81BBD0

loc_81BC29:
mov	edx, [esp+20h+arg_4]
inc	edx
push	edx
push	esi
call	sub_82C5B0
mov	ecx, [esi]
add	esp, 8
mov	[esp+20h+var_4], eax
mov	[ecx+470h], eax
mov	ebx, eax
mov	[esp+20h+var_8], ebp
test	ebp, ebp
jle	short loc_81BCB0
mov	eax, ebp
lea	ecx, ds:0[ebp*8]
neg	eax
mov	[esp+20h+var_C], ecx
mov	[esp+20h+var_10], eax
jmp	short loc_81BC6B

loc_81BC63:
mov	ecx, [esp+20h+var_C]
mov	eax, [esp+20h+var_10]

loc_81BC6B:
test	eax, eax
jle	short loc_81BC79
mov	edi, [esi+20h]
sub	edi, ecx
sub	edi, 8
jmp	short loc_81BC7E

loc_81BC79:
mov	edi, [esi+1Ch]
sub	edi, ecx

loc_81BC7E:
mov	eax, [edi+4]
mov	edx, [eax]
push	edx
add	eax, 8
push	eax
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [edi+4]
add	ebx, [eax]
mov	eax, [esp+2Ch+var_8]
inc	[esp+2Ch+var_10]
sub	[esp+2Ch+var_C], 8
dec	eax
add	esp, 0Ch
mov	[esp+20h+var_8], eax
test	eax, eax
jg	short loc_81BC63
mov	eax, [esp+20h+var_4]

loc_81BCB0:
mov	ecx, [esp+20h+arg_4]
neg	ebp
add	ebp, ebp
push	ecx
add	ebp, ebp
mov	byte ptr [ebx],	0
add	ebp, ebp
add	[esi+1Ch], ebp
mov	ecx, [esi]
push	eax
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	ecx, [esi+1Ch]
mov	dword ptr [ecx], 4
mov	[ecx+4], eax
add	dword ptr [esi+1Ch], 8
mov	edx, [esi]
pop	edi
mov	dword ptr [edx+470h], 0
pop	ebx

loc_81BCF0:
pop	esi

loc_81BCF1:
pop	ebp
add	esp, 10h
retn
sub_81BB60 endp

align 10h



sub_81BD00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

cmp	[esp+arg_4], 0
push	esi
mov	esi, [esp+4+arg_0]
jnz	short loc_81BD1E
mov	eax, [esp+4+arg_C]
mov	ecx, [esp+4+arg_8]
push	eax		; size_t
push	ecx		; int
push	esi		; int
call	sub_820500
jmp	short loc_81BD2E

loc_81BD1E:
mov	edx, [esp+4+arg_C]
mov	eax, [esp+4+arg_8]
push	edx
push	eax
push	esi
call	sub_821E00

loc_81BD2E:
mov	ecx, [esi+1Ch]
mov	dword ptr [ecx], 5
mov	edx, [esi+1Ch]
add	esp, 0Ch
mov	[edx+4], eax
add	dword ptr [esi+1Ch], 8
pop	esi
retn
sub_81BD00 endp

align 10h



sub_81BD50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
cmp	dword ptr [eax+478h], 0
jnz	short loc_81BD72
mov	ecx, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	ecx		; size_t
push	edx		; int
push	esi		; int
call	sub_820500
jmp	short loc_81BD82

loc_81BD72:
mov	eax, [esp+4+arg_8]
mov	ecx, [esp+4+arg_4]
push	eax
push	ecx
push	esi
call	sub_821E00

loc_81BD82:
mov	edx, [esi+1Ch]
mov	dword ptr [edx], 5
mov	ecx, [esi+1Ch]
add	esp, 0Ch
mov	[ecx+4], eax
add	dword ptr [esi+1Ch], 8
pop	esi
retn
sub_81BD50 endp

align 10h



sub_81BDA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi]
add	ecx, 230h
call	sub_81DA50
mov	eax, [esi+40h]
test	eax, eax
jz	short loc_81BDCA
mov	edx, [esp+4+arg_4]
mov	ecx, [eax+40h]
push	edx		; int
push	eax		; int *
mov	[esi+40h], ecx
call	_longjmp

loc_81BDCA:
mov	eax, [esi]
mov	eax, [eax+46Ch]
test	eax, eax
jz	short loc_81BDDC
push	esi
call	eax
add	esp, 4

loc_81BDDC:		; Trap to Debugger
int	3
or	eax, 0FFFFFFFFh
pop	esi
retn
sub_81BDA0 endp

align 10h



sub_81BDF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esp+8+arg_4]
lea	eax, [edi+13h]
push	eax
push	esi
call	sub_82C5B0
mov	[eax+0Ch], edi
mov	dword ptr [eax+4], 0
mov	ecx, [esi+0Ch]
sub	ecx, [esi+4]
add	esp, 8
test	ecx, 0FFFFFFF0h
jge	short loc_81BE24
mov	ecx, [esi+34h]
jmp	short loc_81BE3B

loc_81BE24:
mov	ecx, [esi+20h]
cmp	dword ptr [ecx-8], 9
jnz	short loc_81BE35
mov	edx, [ecx-4]
mov	ecx, [edx+4]
jmp	short loc_81BE3B

loc_81BE35:
mov	ecx, [ecx-4]
mov	ecx, [ecx+4]

loc_81BE3B:
mov	[eax], ecx
mov	edx, [esi]
mov	ecx, [edx+2B0h]
mov	[eax+8], ecx
mov	edx, [esi]
mov	[edx+2B0h], eax
mov	ecx, [esi+1Ch]
mov	[ecx+4], eax
mov	edx, [esi+1Ch]
mov	dword ptr [edx], 7
add	dword ptr [esi+1Ch], 8
pop	edi
add	eax, 10h
pop	esi
retn
sub_81BDF0 endp

align 10h



sub_81BE70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	dword ptr [ebx+50h], 0FFFFFFFEh
jnz	short loc_81BE8B
push	offset aAttemptToYield ; "attempt to yield a yielded coroutine"
push	ebx
call	sub_81A760
add	esp, 8
pop	ebx
retn

loc_81BE8B:
mov	eax, [ebx+40h]
cmp	dword ptr [eax+40h], 0
jz	short loc_81BEA4
push	offset aAttemptToYie_0 ; "attempt to yield across metamethod/C-ca"...
push	ebx
call	sub_81A760
add	esp, 8
pop	ebx
retn

loc_81BEA4:
mov	ecx, [ebx]
cmp	[ecx+2B8h], ebx
jnz	short loc_81BEBE
push	offset aYouCannotYield ; "You cannot yield the main state"
push	ebx
call	sub_81A760
add	esp, 8
pop	ebx
retn

loc_81BEBE:
push	ebp
mov	ebp, [esp+8+arg_4]
xor	ecx, ecx
test	ebp, ebp
jle	short loc_81BEF3
mov	edx, ebp
neg	edx
add	edx, edx
add	edx, edx
push	esi
add	edx, edx
push	edi

loc_81BED5:
mov	esi, [ebx+1Ch]
mov	eax, [edx+esi]
mov	edi, [ebx+20h]
mov	[edi+ecx*8], eax
mov	eax, [edx+esi+4]
mov	[edi+ecx*8+4], eax
inc	ecx
add	edx, 8
cmp	ecx, ebp
jl	short loc_81BED5
pop	edi
pop	esi

loc_81BEF3:
mov	ecx, [ebx+20h]
lea	edx, [ecx+ebp*8]
mov	eax, 0FFFFFFFEh
pop	ebp
mov	[ebx+1Ch], edx
mov	[ebx+50h], eax
pop	ebx
retn
sub_81BE70 endp

align 10h



sub_81BF10 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax+50h]
retn
sub_81BF10 endp

align 10h



sub_81BF20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	edi
mov	edi, [esp+8+arg_0]
cmp	edi, ebx
jz	short loc_81BF64
mov	edx, [esp+8+arg_8]
mov	eax, [edi+1Ch]
mov	ecx, [ebx+1Ch]
push	esi
lea	esi, ds:0[edx*8]
sub	eax, esi
test	edx, edx
jz	short loc_81BF5D
push	ebp

loc_81BF47:
mov	ebp, [eax]
mov	[ecx], ebp
mov	ebp, [eax+4]
dec	edx
mov	[ecx+4], ebp
add	ecx, 8
add	eax, 8
test	edx, edx
jnz	short loc_81BF47
pop	ebp

loc_81BF5D:
add	[ebx+1Ch], esi
sub	[edi+1Ch], esi
pop	esi

loc_81BF64:
pop	edi
pop	ebx
retn
sub_81BF20 endp

align 10h



sub_81BF70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_4]
cmp	[esp+arg_0], ecx
jnz	short loc_81BF80
mov	eax, offset aRunning ; "running"
retn

loc_81BF80:
mov	eax, [ecx+50h]
cmp	eax, 0FFFFFFFEh
jz	short loc_81BFAA
test	eax, eax
jz	short loc_81BF92
mov	eax, offset aDead_2 ; "dead"
retn

loc_81BF92:
mov	eax, [ecx+1Ch]
sub	eax, [ecx+20h]
test	eax, 0FFFFFFF8h
mov	eax, offset aSuspended ; "suspended"
jnz	short locret_81BFAF
mov	eax, offset aDead_3 ; "dead"
retn

loc_81BFAA:		; "suspended"
mov	eax, offset aSuspended_0

locret_81BFAF:
retn
sub_81BF70 endp




sub_81BFB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax]
mov	eax, [ecx]
mov	ecx, [esp+arg_4]
shr	eax, 3
cmp	ecx, eax
jbe	short locret_81BFC5
mov	eax, ecx

locret_81BFC5:
retn
sub_81BFB0 endp

align 10h



sub_81BFD0 proc	near
mov	eax, ecx
mov	ecx, [eax+30h]
and	ecx, 0FFFFFFFDh
or	ecx, 1
mov	[eax+30h], ecx
xor	ecx, ecx
mov	edx, 8
mov	dword ptr [eax+10h], offset sub_81B2B0
mov	[eax+14h], ecx
mov	dword ptr [eax+8], 200000h
mov	dword ptr [eax], 64h
mov	dword ptr [eax+4], 0Ah
mov	dword ptr [eax+18h], offset sub_81B170
mov	dword ptr [eax+1Ch], offset nullsub_2
mov	dword ptr [eax+0Ch], offset sub_81BFB0
mov	dword ptr [eax+20h], offset aMainState ; "Main State"
mov	[eax+24h], edx
mov	[eax+28h], edx
mov	dword ptr [eax+2Ch], 80h
mov	dword ptr [eax+38h], 0FFFFFFFFh
mov	[eax+3Ch], ecx
mov	[eax+34h], ecx
mov	edx, dword_1859268
mov	[eax+40h], edx
mov	edx, dword_1859270
mov	[eax+30h], edx
mov	[eax+44h], ecx
retn
sub_81BFD0 endp

align 10h



sub_81C050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	0
push	eax
push	ecx
push	edx
call	sub_81B920
add	esp, 10h
retn
sub_81C050 endp

align 10h



sub_81C070 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
test	edx, edx
jnz	short loc_81C088
mov	ecx, [esp+arg_0]
mov	eax, [ecx+1Ch]
mov	[eax], edx
add	eax, 8
mov	[ecx+1Ch], eax
retn

loc_81C088:
mov	eax, edx
push	esi
lea	esi, [eax+1]
mov	edi, edi

loc_81C090:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81C090
sub	eax, esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi]
push	eax
push	edx
push	esi
add	ecx, 2A0h
call	sub_81FBA0
mov	ecx, [esi+1Ch]
mov	dword ptr [ecx], 4
mov	[ecx+4], eax
add	dword ptr [esi+1Ch], 8
pop	esi
retn
sub_81C070 endp

align 10h



; int __cdecl sub_81C0C0(int, char *Format, char ArgList)
sub_81C0C0 proc	near

arg_0= dword ptr  4
Format=	dword ptr  8
ArgList= byte ptr  0Ch

mov	ecx, [esp+Format]
mov	edx, [esp+arg_0]
lea	eax, [esp+ArgList]
push	eax		; ArgList
push	ecx		; Format
push	edx		; int
call	sub_81BA00
add	esp, 0Ch
retn
sub_81C0C0 endp

align 10h



sub_81C0E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi]
add	ecx, 230h
call	sub_81DA50
mov	eax, [esi+40h]
test	eax, eax
jz	short loc_81C107
mov	ecx, [eax+40h]
push	0FFFFFF9Ch	; int
push	eax		; int *
mov	[esi+40h], ecx
call	_longjmp

loc_81C107:
mov	edx, [esi]
mov	eax, [edx+46Ch]
test	eax, eax
jz	short loc_81C119
push	esi
call	eax
add	esp, 4

loc_81C119:		; Trap to Debugger
int	3
or	eax, 0FFFFFFFFh
pop	esi
retn
sub_81C0E0 endp

align 10h



sub_81C120 proc	near

var_2C=	qword ptr -2Ch
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 2Ch
rdtsc
mov	dword ptr [esp+2Ch+var_2C], eax
mov	eax, [esp+2Ch+arg_10]
mov	dword ptr [esp+2Ch+var_2C+4], edx
test	eax, eax
jnz	short loc_81C139
mov	eax, offset a?_4 ; "?"

loc_81C139:
mov	ecx, [esp+2Ch+arg_8]
push	esi
mov	esi, [esp+30h+arg_0]
push	edi
mov	edi, [esp+34h+arg_4]
push	eax
mov	eax, [esp+38h+arg_C]
push	eax
push	ecx
push	edi
push	esi
call	sub_82F160
add	esp, 14h
mov	[esp+34h+arg_10], eax
test	eax, eax
jnz	loc_81C311
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
push	ebx
push	ebp
mov	ebp, [eax-4]
mov	eax, [ebp+8]
push	edi
push	esi
push	eax
mov	[esp+48h+var_24], edx
call	sub_81B850
mov	edi, [ebp+8]
add	esp, 0Ch
cmp	byte ptr [edi+2], 2
jnz	loc_81C288
push	offset aChunkParameter ; "(*chunk parameters)"
push	esi
call	sub_81C070
mov	ecx, [esi+1Ch]
mov	ebx, [ecx-4]
push	4		; int
lea	edx, [esp+48h+var_14]
push	edx		; void *
lea	eax, [esp+4Ch+var_24]
push	eax		; int
push	esi		; int
mov	[esp+54h+var_24], 44h
mov	[esp+54h+var_20], 4
mov	[esp+54h+var_1C], 1Ch
mov	[esp+54h+var_18], 10h
call	sub_82C790
mov	ecx, [ebp+8]
mov	edi, [esp+54h+var_14]
push	44h
push	ecx
push	edi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+60h+var_10]
mov	[edi+30h], edx
mov	eax, [esp+60h+var_10]
mov	[eax], ebx
mov	dword ptr [edi+2Ch], 1
mov	byte ptr [edi],	1
mov	eax, [esp+60h+var_C]
mov	ebx, [esi+34h]
add	esp, 24h
test	eax, eax
jnz	short loc_81C211
push	1Ch
push	esi
call	sub_82C5B0
add	esp, 8

loc_81C211:
mov	[eax+8], edi
mov	byte ptr [eax+0Ch], 0
mov	[eax+4], ebx
mov	dword ptr [eax], 5
movzx	ecx, byte ptr [edi+3]
mov	[eax+0Dh], cl
mov	dl, [edi+2]
mov	[eax+0Eh], dl
movzx	ecx, byte ptr [edi+1]
mov	[eax+0Fh], cl
mov	edx, [edi+10h]
mov	[eax+10h], edx
mov	ecx, [edi+8]
mov	[eax+14h], ecx
mov	dword ptr [eax+18h], 0
mov	ecx, [esp+3Ch+var_8]
mov	[ecx+8], ecx
mov	[ecx+0Ch], ecx
mov	dword ptr [ecx], 0
mov	[eax+18h], ecx
mov	ecx, [esi+1Ch]
mov	edx, 9
mov	[ecx-8], edx
mov	[ecx-4], eax
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
mov	ecx, [eax-4]
mov	[eax-10h], edx
mov	edx, [eax]
mov	[eax-0Ch], ecx
mov	ecx, [eax+4]
mov	[eax-8], edx
mov	[eax-4], ecx
jmp	loc_81C309

loc_81C288:
movzx	ebp, byte ptr [edi]
mov	ebx, [esi+34h]
lea	edx, ds:18h[ebp*4]
push	edx
push	esi
call	sub_82C5B0
mov	edx, eax
mov	[edx+8], edi
mov	byte ptr [edx+0Ch], 0
mov	[edx+4], ebx
mov	dword ptr [edx], 5
movzx	eax, byte ptr [edi+3]
mov	[edx+0Dh], al
mov	cl, [edi+2]
mov	[edx+0Eh], cl
movzx	eax, byte ptr [edi+1]
mov	[edx+0Fh], al
mov	ecx, [edi+10h]
mov	[edx+10h], ecx
mov	eax, [edi+8]
add	esp, 8
mov	[edx+14h], eax
test	ebp, ebp
jbe	short loc_81C2DE
lea	edi, [edx+18h]
mov	ecx, ebp
xor	eax, eax
rep stosd

loc_81C2DE:
mov	eax, [esi+1Ch]
mov	[eax+4], edx
add	eax, 8
mov	ecx, 9
mov	[eax-8], ecx
mov	[esi+1Ch], eax
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-8], ecx
mov	[eax-4], edx

loc_81C309:
add	eax, 0FFFFFFF8h
pop	ebp
mov	[esi+1Ch], eax
pop	ebx

loc_81C311:
mov	esi, [esi]
rdtsc
sub	eax, dword ptr [esp+34h+var_2C]
pop	edi
sbb	edx, dword ptr [esp+30h+var_2C+4]
add	[esi+3C8h], eax
mov	eax, [esp+30h+arg_10]
adc	[esi+3CCh], edx
pop	esi
add	esp, 2Ch
retn
sub_81C120 endp

align 10h



sub_81C340 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	ecx
mov	ecx, [eax]
push	edx
add	ecx, 468h
push	ecx
push	eax
call	sub_81C120
add	esp, 14h
retn
sub_81C340 endp

align 10h



sub_81C370 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
test	ebp, ebp
jle	short loc_81C395
mov	eax, [esi+1Ch]
lea	ecx, [eax+ebp*8]
cmp	ecx, [esi+24h]
jbe	short loc_81C395
push	ebp
push	esi
lea	ecx, [esi+4]
call	sub_823530

loc_81C395:
mov	edx, [esp+10h+arg_4]
mov	ecx, [esi+1Ch]
lea	eax, ds:8[edx*8]
mov	edx, eax
mov	eax, ecx
sub	eax, edx
mov	edx, [eax]
sub	edx, 9
jz	loc_81C545
sub	edx, 1
jz	short loc_81C401
push	ecx
mov	edi, eax
sub	edi, [esi+28h]
push	eax
push	esi
sar	edi, 3
call	sub_822E70
mov	[esi+1Ch], eax
mov	eax, [esi+28h]
mov	ecx, [eax+edi*8]
lea	eax, [eax+edi*8]
add	esp, 0Ch
cmp	ecx, 9
jz	loc_81C545
cmp	ecx, 0Ah
jz	short loc_81C401
mov	ecx, off_1681D74[ecx*4]
push	ecx
push	offset aAttemptToCallA ; "Attempt to call a %s value"
push	esi
call	sub_81A760
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_81C401:
mov	ecx, [esi+0Ch]
mov	edx, [eax+4]
mov	edi, [esi+1Ch]
lea	ebx, [esi+4]
add	ecx, 10h
mov	[esp+10h+arg_0], edx
cmp	ecx, [ebx+4]
jnz	short loc_81C443
mov	ecx, [esi+28h]
sub	eax, ecx
sub	edi, ecx
sar	eax, 3
push	esi
mov	ecx, ebx
mov	ebp, eax
sar	edi, 3
call	sub_8237A0
mov	edx, [esi+28h]
mov	ecx, [ebx+8]
lea	eax, [edx+ebp*8]
mov	ebp, [esp+10h+arg_8]
add	ecx, 10h
lea	edi, [edx+edi*8]

loc_81C443:
mov	[ebx+8], ecx
mov	edx, [esi+20h]
mov	[ecx], edx
mov	edx, [esp+10h+arg_C]
mov	dword ptr [ecx+8], 0
mov	[ecx+0Ch], ebp
mov	[ecx+4], edx
add	eax, 8
mov	[esi+20h], eax
mov	eax, [esp+10h+arg_0]
mov	[esi+1Ch], edi
mov	edi, [eax+8]
inc	dword ptr [esi+44h]
mov	eax, [esi+44h]
cmp	eax, 82h
jle	short loc_81C48C
push	82h
push	offset aCStackOverflow ; "C stack overflow: too	many (%d) nested "...
push	esi
call	sub_81A760
add	esp, 0Ch

loc_81C48C:
mov	ecx, [esi+1Ch]
add	ecx, 0A0h
cmp	ecx, [esi+24h]
jbe	short loc_81C4A4
push	14h
push	esi
mov	ecx, ebx
call	sub_823530

loc_81C4A4:
push	esi
call	edi
mov	ecx, [esi+1Ch]
dec	dword ptr [esi+44h]
lea	edx, ds:0[eax*8]
mov	edi, edx
mov	edx, ecx
sub	edx, edi
mov	edi, [ebx+8]
mov	ebp, [edi+0Ch]
sub	ecx, edx
sar	ecx, 3
add	esp, 4
mov	[esp+10h+arg_0], edi
mov	[esp+10h+arg_4], ebp
cmp	ecx, eax
jnb	short loc_81C4D6
mov	eax, ecx

loc_81C4D6:
cmp	eax, ebp
jnb	short loc_81C4E2
mov	edi, eax
mov	[esp+10h+arg_8], edi
jmp	short loc_81C4E8

loc_81C4E2:
mov	edi, ebp
mov	[esp+10h+arg_8], ebp

loc_81C4E8:
mov	ecx, [esi+20h]
sub	ecx, 8
test	edi, edi
jbe	short loc_81C512
mov	eax, ecx
sub	edx, ecx

loc_81C4F6:
mov	ebp, [edx+eax]
mov	[eax], ebp
mov	ebp, [edx+eax+4]
mov	[eax+4], ebp
add	eax, 8
sub	edi, 1
jnz	short loc_81C4F6
mov	edi, [esp+10h+arg_8]
mov	ebp, [esp+10h+arg_4]

loc_81C512:
mov	eax, [esp+10h+arg_0]
mov	edx, [eax]
mov	[esp+10h+arg_8], edx
cmp	ebp, 0FFFFFFFFh
jz	loc_81C6BF
lea	edx, [ecx+ebp*8]
lea	eax, [ecx+edi*8]
cmp	eax, edx
jnb	loc_81C6C2

loc_81C533:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, edx
jb	short loc_81C533
jmp	loc_81C6C2

loc_81C545:
mov	ecx, [esi+0Ch]
mov	edx, [eax+4]
mov	edi, [esi+1Ch]
lea	ebx, [esi+4]
add	ecx, 10h
mov	[esp+10h+arg_0], edx
cmp	ecx, [ebx+4]
jnz	short loc_81C587
mov	ecx, [esi+28h]
sub	eax, ecx
sub	edi, ecx
sar	eax, 3
push	esi
mov	ecx, ebx
mov	ebp, eax
sar	edi, 3
call	sub_8237A0
mov	edx, [esi+28h]
mov	ecx, [ebx+8]
lea	eax, [edx+ebp*8]
mov	ebp, [esp+10h+arg_8]
add	ecx, 10h
lea	edi, [edx+edi*8]

loc_81C587:
mov	[ebx+8], ecx
mov	edx, [esi+20h]
mov	[ecx], edx
mov	edx, [esp+10h+arg_C]
mov	[ecx+0Ch], ebp
mov	dword ptr [ecx+8], 0
mov	[ecx+4], edx
lea	ebp, [eax+8]
mov	[esi+20h], ebp
mov	ecx, [eax+4]
test	byte ptr [ecx+0Eh], 2
mov	[esp+10h+arg_8], ecx
jz	short loc_81C5C4
push	edi
push	ebp
push	ecx
push	esi
mov	ecx, ebx
call	sub_823980
mov	ecx, [esp+10h+arg_8]
jmp	short loc_81C5D2

loc_81C5C4:
movzx	eax, byte ptr [ecx+0Fh]
lea	eax, [ebp+eax*8+0]
cmp	edi, eax
jnb	short loc_81C5D2
mov	eax, edi

loc_81C5D2:
movzx	ecx, byte ptr [ecx+0Dh]
lea	ecx, [ebp+ecx*8+0]
cmp	ecx, [esi+24h]
jbe	short loc_81C608
mov	edx, [esi+28h]
mov	ebp, ecx
sub	ecx, [esi+1Ch]
mov	edi, eax
sar	ecx, 3
push	ecx
sub	edi, edx
sub	ebp, edx
push	esi
mov	ecx, ebx
sar	edi, 3
sar	ebp, 3
call	sub_823530
mov	ecx, [esi+28h]
lea	eax, [ecx+edi*8]
lea	ecx, [ecx+ebp*8]

loc_81C608:
cmp	eax, ecx
jnb	short loc_81C61D
lea	esp, [esp+0]

loc_81C610:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_81C610

loc_81C61D:
mov	edx, [esp+10h+arg_0]
mov	[esi+1Ch], eax
mov	eax, [edx+14h]
push	0
push	eax
push	esi
call	sub_82F290
mov	ecx, [esi+1Ch]
lea	edx, ds:0[eax*8]
mov	edi, edx
mov	edx, ecx
sub	edx, edi
mov	edi, [ebx+8]
mov	ebp, [edi+0Ch]
sub	ecx, edx
sar	ecx, 3
add	esp, 0Ch
mov	[esp+10h+arg_0], edi
mov	[esp+10h+arg_4], ebp
cmp	ecx, eax
jnb	short loc_81C65C
mov	eax, ecx

loc_81C65C:
mov	edi, eax
cmp	eax, ebp
jb	short loc_81C664
mov	edi, ebp

loc_81C664:
mov	ecx, [esi+20h]
sub	ecx, 8
test	edi, edi
jbe	short loc_81C690
mov	eax, ecx
sub	edx, ecx
mov	[esp+10h+arg_8], edi

loc_81C676:
mov	ebp, [edx+eax]
mov	[eax], ebp
mov	ebp, [edx+eax+4]
mov	[eax+4], ebp
add	eax, 8
sub	[esp+10h+arg_8], 1
jnz	short loc_81C676
mov	ebp, [esp+10h+arg_4]

loc_81C690:
mov	eax, [esp+10h+arg_0]
mov	edx, [eax]
mov	[esp+10h+arg_8], edx
cmp	ebp, 0FFFFFFFFh
jz	short loc_81C6BF
lea	edx, [ecx+ebp*8]
lea	eax, [ecx+edi*8]
cmp	eax, edx
jnb	short loc_81C6C2
lea	esp, [esp+0]

loc_81C6B0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, edx
jb	short loc_81C6B0
jmp	short loc_81C6C2

loc_81C6BF:
lea	edx, [ecx+edi*8]

loc_81C6C2:
mov	eax, [esp+10h+arg_8]
mov	ecx, [esp+10h+arg_0]
pop	edi
mov	[esi+20h], eax
mov	[esi+1Ch], edx
pop	esi
add	ecx, 0FFFFFFF0h
pop	ebp
mov	[ebx+8], ecx
pop	ebx
retn
sub_81C370 endp

align 10h



sub_81C6E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	0
push	eax
push	ecx
push	edx
call	sub_81C370
add	esp, 10h
retn
sub_81C6E0 endp

align 10h


; Attributes: bp-based frame

sub_81C700 proc	near

var_58=	byte ptr -58h
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
sub	esp, 58h
mov	eax, [ebp+arg_0]
mov	ecx, [eax+28h]
mov	edx, [eax+20h]
sub	edx, ecx
sar	edx, 3
mov	[ebp+var_4], edx
mov	edx, [eax+1Ch]
sub	edx, ecx
mov	ecx, [eax+0Ch]
sub	ecx, [eax+4]
sar	edx, 3
push	ebx
mov	[ebp+var_8], edx
mov	edx, [eax+44h]
sar	ecx, 4
push	esi
mov	[ebp+var_10], edx
lea	edx, [ebp+var_58]
mov	[ebp+var_14], ecx
mov	ecx, [eax+40h]
push	edi
mov	[eax+40h], edx
mov	eax, edx
push	0
push	eax
mov	[ebp+var_18], ecx
call	__setjmp3
add	esp, 8
mov	[ebp+var_C], eax
test	eax, eax
jnz	short loc_81C77E
mov	ecx, [ebp+arg_8]
mov	edx, [ebp+arg_4]
mov	esi, [ebp+arg_0]
push	eax
push	ecx
push	edx
push	esi
call	sub_81C370
mov	eax, [esi+40h]
mov	ecx, [eax+40h]
add	esp, 10h
mov	[esi+40h], ecx
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_81C77E:
mov	ecx, [ebp+arg_C]
test	ecx, ecx
jz	short loc_81C7F8
jge	short loc_81C78C
mov	eax, [ebp+var_8]
jmp	short loc_81C790

loc_81C78C:
mov	eax, [ebp+var_4]
dec	eax

loc_81C790:
mov	esi, [ebp+arg_0]
mov	edx, [esi+28h]
add	eax, ecx
lea	ecx, [edx+eax*8]
mov	eax, [esi+1Ch]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_4E3E50
mov	edx, [esi+40h]
lea	eax, [ebp+var_58]
mov	ecx, eax
push	0
push	ecx
mov	[ebp+var_18], edx
mov	[esi+40h], eax
call	__setjmp3
mov	esi, [ebp+arg_0]
add	esp, 10h
test	eax, eax
jnz	short loc_81C7EF
push	eax
push	1
push	1
push	esi
call	sub_81C370
mov	edx, [esi+40h]
mov	eax, [edx+40h]
add	esp, 10h
mov	[esi+40h], eax
jmp	short loc_81C7FB

loc_81C7EF:
mov	[ebp+var_C], 0FFFFFED4h
jmp	short loc_81C7FB

loc_81C7F8:
mov	esi, [ebp+arg_0]

loc_81C7FB:
mov	ecx, [ebp+var_10]
mov	ebx, [ebp+var_14]
push	ebx
mov	[esi+44h], ecx
lea	edi, [esi+4]
push	esi
mov	ecx, edi
call	sub_823940
push	ebx
mov	ecx, edi
call	sub_823930
mov	ecx, [esi+28h]
mov	edx, [ebp+var_4]
mov	eax, [esi+1Ch]
lea	edx, [ecx+edx*8]
mov	[esi+20h], edx
mov	edx, [ebp+var_8]
sub	edx, [ebp+arg_4]
sub	eax, 8
lea	ecx, [ecx+edx*8-8]
mov	[esi+1Ch], ecx
mov	edx, [eax]
mov	[ecx], edx
mov	eax, [eax+4]
mov	[ecx+4], eax
add	dword ptr [esi+1Ch], 8
mov	eax, [ebp+var_C]
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_81C700 endp

align 10h


; Attributes: bp-based frame

sub_81C850 proc	near

var_54=	byte ptr -54h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
mov	eax, [ebp+arg_0]
mov	edx, [eax]
sub	esp, 54h
push	ebx
push	esi
push	edi
cmp	[edx+2B8h], eax
jnz	short loc_81C87B
push	offset aYouCannotResum ; "You cannot resume the	main state"
push	eax
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_81C87B:
mov	ecx, [eax+50h]
test	ecx, ecx
jz	short loc_81C88B
cmp	ecx, 0FFFFFFFEh
jnz	short loc_81C8DA
test	ecx, ecx
jnz	short loc_81C899

loc_81C88B:
mov	ecx, [eax+1Ch]
sub	ecx, [eax+20h]
test	ecx, 0FFFFFFF8h
jz	short loc_81C8DA

loc_81C899:
mov	ecx, [edx+3C4h]
mov	[edx+3C4h], eax
mov	edx, [eax+40h]
mov	[ebp+var_C], ecx
lea	ecx, [ebp+var_54]
mov	[ebp+var_14], edx
mov	edx, ecx
push	0
push	edx
mov	[eax+40h], ecx
call	__setjmp3
add	esp, 8
test	eax, eax
jz	short loc_81C8E6
mov	eax, [ebp+arg_0]
mov	ecx, [ebp+var_C]
mov	dword ptr [eax+50h], 0FFFFFF9Ch
mov	eax, [eax]
mov	[eax+3C4h], ecx

loc_81C8DA:
mov	eax, 0FFFFFF9Ch
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_81C8E6:
mov	esi, [ebp+arg_0]
cmp	dword ptr [esi+50h], 0
jnz	loc_81C9C5
mov	edi, [esi+20h]
mov	edx, [edi+4]
mov	eax, [edx+14h]
mov	edx, [esi+1Ch]
lea	ecx, [esi+4]
mov	[ebp+var_8], eax
mov	eax, [ecx+8]
add	eax, 10h
cmp	eax, [ecx+4]
jnz	short loc_81C934
mov	eax, [esi+28h]
mov	ebx, edx
sub	edi, eax
sub	ebx, eax
push	esi
sar	edi, 3
sar	ebx, 3
call	sub_8237A0
mov	ecx, [esi+28h]
mov	eax, [esi+0Ch]
add	eax, 10h
lea	edi, [ecx+edi*8]
lea	edx, [ecx+ebx*8]

loc_81C934:
mov	[esi+0Ch], eax
mov	ebx, [esi+20h]
lea	ecx, [esi+4]
mov	[eax], ebx
xor	ebx, ebx
mov	[eax+8], ebx
mov	[eax+4], ebx
mov	dword ptr [eax+0Ch], 0FFFFFFFFh
lea	ebx, [edi+8]
mov	[esi+20h], ebx
mov	edi, [edi+4]
test	byte ptr [edi+0Eh], 2
jz	short loc_81C968
push	edx
push	ebx
push	edi
push	esi
call	sub_823980
jmp	short loc_81C975

loc_81C968:
movzx	ecx, byte ptr [edi+0Fh]
lea	eax, [ebx+ecx*8]
cmp	edx, eax
jnb	short loc_81C975
mov	eax, edx

loc_81C975:
movzx	edx, byte ptr [edi+0Dh]
lea	ecx, [ebx+edx*8]
cmp	ecx, [esi+24h]
jbe	short loc_81C9AB
mov	edx, [esi+28h]
mov	ebx, ecx
sub	ecx, [esi+1Ch]
mov	edi, eax
sar	ecx, 3
push	ecx
sub	edi, edx
sub	ebx, edx
push	esi
lea	ecx, [esi+4]
sar	edi, 3
sar	ebx, 3
call	sub_823530
mov	ecx, [esi+28h]
lea	eax, [ecx+edi*8]
lea	ecx, [ecx+ebx*8]

loc_81C9AB:
cmp	eax, ecx
jnb	short loc_81C9BD
nop

loc_81C9B0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_81C9B0

loc_81C9BD:
mov	[esi+1Ch], eax
jmp	loc_81CA71

loc_81C9C5:
mov	eax, [esi+1Ch]
mov	edx, [esi+20h]
mov	edi, [esi+0Ch]
mov	ecx, eax
sub	ecx, edx
sub	eax, edx
mov	[ebp+var_8], edi
mov	edi, [edi+0Ch]
sar	ecx, 3
sar	eax, 3
mov	[ebp+var_10], edi
cmp	ecx, eax
jb	short loc_81C9E9
mov	ecx, eax

loc_81C9E9:
cmp	ecx, edi
jnb	short loc_81C9F4
mov	ebx, ecx
mov	[ebp+var_4], ebx
jmp	short loc_81C9F9

loc_81C9F4:
mov	ebx, edi
mov	[ebp+var_4], edi

loc_81C9F9:
lea	edi, [edx-8]
test	ebx, ebx
jbe	short loc_81CA27
mov	ecx, edx
mov	eax, edi
sub	ecx, edi
mov	edx, ebx
jmp	short loc_81CA10
align 10h

loc_81CA10:
mov	ebx, [ecx+eax]
mov	[eax], ebx
mov	ebx, [ecx+eax+4]
mov	[eax+4], ebx
add	eax, 8
sub	edx, 1
jnz	short loc_81CA10
mov	ebx, [ebp+var_4]

loc_81CA27:
cmp	[ebp+var_10], 0FFFFFFFFh
mov	eax, [ebp+var_8]
mov	edx, [eax]
jz	short loc_81CA52
mov	ecx, [edx-4]
movzx	eax, byte ptr [ecx+0Dh]
lea	ecx, [edx+eax*8]
lea	eax, [edi+ebx*8]
cmp	eax, ecx
jnb	short loc_81CA55

loc_81CA43:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_81CA43
jmp	short loc_81CA55

loc_81CA52:
lea	ecx, [edi+ebx*8]

loc_81CA55:
mov	eax, [ebp+var_8]
mov	edi, [eax+4]
add	eax, 0FFFFFFF0h
mov	[esi+20h], edx
mov	[esi+1Ch], ecx
mov	[esi+0Ch], eax
mov	[ebp+var_8], edi
mov	dword ptr [esi+50h], 0

loc_81CA71:
mov	eax, [esi+0Ch]
sub	eax, [esi+4]
mov	ecx, [ebp+var_8]
sar	eax, 4
push	eax
push	ecx
push	esi
call	sub_82F290
mov	edx, [esi+40h]
mov	ecx, [edx+40h]
mov	edx, [esi]
mov	[esi+40h], ecx
mov	ecx, [ebp+var_C]
add	esp, 0Ch
mov	[edx+3C4h], ecx
cmp	eax, 0FFFFFF9Ch
jz	loc_81CB58
cmp	eax, 0FFFFFFFEh
jz	loc_81CB58
mov	ecx, [esi+1Ch]
lea	edx, ds:0[eax*8]
mov	edi, edx
mov	edx, ecx
sub	edx, edi
mov	edi, [esi+0Ch]
mov	ebx, [edi+0Ch]
sub	ecx, edx
sar	ecx, 3
mov	[ebp+var_8], edi
mov	[ebp+var_10], ebx
cmp	ecx, eax
jnb	short loc_81CAD5
mov	eax, ecx

loc_81CAD5:
cmp	eax, ebx
jnb	short loc_81CAE0
mov	edi, eax
mov	[ebp+var_C], edi
jmp	short loc_81CAE5

loc_81CAE0:
mov	edi, ebx
mov	[ebp+var_C], ebx

loc_81CAE5:
mov	ecx, [esi+20h]
sub	ecx, 8
test	edi, edi
jbe	short loc_81CB0D
mov	eax, ecx
sub	edx, ecx

loc_81CAF3:
mov	ebx, [edx+eax]
mov	[eax], ebx
mov	ebx, [edx+eax+4]
mov	[eax+4], ebx
add	eax, 8
sub	edi, 1
jnz	short loc_81CAF3
mov	edi, [ebp+var_C]
mov	ebx, [ebp+var_10]

loc_81CB0D:
mov	eax, [ebp+var_8]
mov	edx, [eax]
mov	[ebp+var_10], edx
cmp	ebx, 0FFFFFFFFh
jz	short loc_81CB33
lea	edx, [ecx+ebx*8]
lea	eax, [ecx+edi*8]
cmp	eax, edx
jnb	short loc_81CB36

loc_81CB24:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, edx
jb	short loc_81CB24
jmp	short loc_81CB36

loc_81CB33:
lea	edx, [ecx+edi*8]

loc_81CB36:
mov	eax, [ebp+var_10]
mov	ecx, [ebp+var_8]
add	ecx, 0FFFFFFF0h
mov	[esi+20h], eax
mov	[esi+1Ch], edx
mov	[esi+0Ch], ecx
mov	dword ptr [esi+50h], 0
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_81CB58:
pop	edi
mov	[esi+50h], eax
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_81C850 endp

align 10h



sub_81CB70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+1Ch]
mov	edx, [esi+20h]
mov	ecx, eax
sub	ecx, edx
sar	ecx, 3
sub	ecx, [esp+4+arg_4]
js	short loc_81CBA4
lea	ecx, [edx+ecx*8]
cmp	eax, ecx
jnb	short loc_81CB9D
nop

loc_81CB90:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_81CB90

loc_81CB9D:
mov	[esi+1Ch], ecx
xor	eax, eax
pop	esi
retn

loc_81CBA4:
lea	eax, ds:8[ecx*8]
add	[esi+1Ch], eax
xor	eax, eax
pop	esi
retn
sub_81CB70 endp

align 10h



sub_81CBC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
mov	ecx, [esp+arg_C]
push	esi
xor	esi, esi
mov	[eax+64h], ecx
mov	[eax+70h], esi
cmp	edx, esi
jz	short loc_81CBF1
mov	ecx, [esp+4+arg_8]
cmp	ecx, esi
jz	short loc_81CBF1
mov	[eax+68h], esi
mov	[eax+5Ch], edx
mov	[eax+60h], ecx
mov	eax, 1
pop	esi
retn

loc_81CBF1:
mov	[eax+5Ch], esi
mov	[eax+60h], esi
mov	eax, 1
pop	esi
retn
sub_81CBC0 endp

align 10h



sub_81CC00 proc	near
cmp	dword ptr [eax+22Ch], 0
jz	short loc_81CC0C
xor	eax, eax
retn

loc_81CC0C:
mov	eax, [eax+228h]
push	eax
push	ecx
add	ecx, 4
call	sub_823BC0
retn
sub_81CC00 endp

align 10h



sub_81CC20 proc	near
push	edi
mov	edi, edx
test	eax, eax
jnz	short loc_81CC29
pop	edi
retn

loc_81CC29:
sub	eax, [ecx+8]
push	ebx
mov	ebx, [ecx+40h]
mov	ecx, [ecx+3Ch]
sar	eax, 2
xor	edx, edx
push	esi
test	ecx, ecx
jle	short loc_81CC5A
lea	esi, [ebx+8]

loc_81CC40:
test	edi, edi
jle	short loc_81CC5A
cmp	[esi-4], eax
jg	short loc_81CC4E
cmp	[esi], eax
jl	short loc_81CC4E
dec	edi

loc_81CC4E:
test	edi, edi
jz	short loc_81CC60
inc	edx
add	esi, 0Ch
cmp	edx, ecx
jl	short loc_81CC40

loc_81CC5A:
pop	esi
pop	ebx
xor	eax, eax
pop	edi
retn

loc_81CC60:
lea	eax, [edx+edx*2]
mov	eax, [ebx+eax*4]
pop	esi
pop	ebx
add	eax, 8
pop	edi
retn
sub_81CC20 endp

align 10h



sub_81CC70 proc	near

arg_0= dword ptr  4

cmp	dword ptr [ebx+22Ch], 0
push	edi
jnz	loc_81CD0F
mov	eax, [ebx+228h]
test	eax, eax
jl	loc_81CD0F
mov	ecx, [esi+0Ch]
sub	ecx, [esi+4]
lea	edi, [esi+4]
sar	ecx, 4
cmp	eax, ecx
jg	short loc_81CD0F
cmp	[esp+4+arg_0], 0
jle	short loc_81CD0F
push	ebp
push	eax
push	esi
mov	ecx, edi
call	sub_823B40
test	al, al
jz	short loc_81CCDB
mov	edx, [ebx+228h]
push	edx
push	esi
mov	ecx, edi
call	sub_823B80
mov	ebp, [eax+8]
mov	eax, ebx
mov	ecx, esi
call	sub_81CC00
mov	edx, [esp+8+arg_0]
mov	ecx, ebp
call	sub_81CC20
test	eax, eax
jnz	short loc_81CD0C

loc_81CCDB:
mov	eax, [ebx+228h]
push	eax
push	esi
mov	ecx, edi
call	sub_823AC0
mov	ecx, [ebx+228h]
push	ecx
push	esi
mov	ecx, edi
mov	ebp, eax
call	sub_823A90
mov	edx, [esp+8+arg_0]
lea	eax, [eax+edx*8-8]
cmp	eax, ebp
sbb	eax, eax
and	eax, offset aTemporary_0 ; "(*temporary)"

loc_81CD0C:
pop	ebp
pop	edi
retn

loc_81CD0F:
xor	eax, eax
pop	edi
retn
sub_81CC70 endp

align 10h



sub_81CD20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	ebp
mov	ebp, [eax+228h]
cmp	ebp, 1
mov	dword ptr [eax+8], offset unk_14668A5
mov	dword ptr [eax+4], 0
mov	[esp+14h+var_8], ebp
jl	loc_81CF64
cmp	dword ptr [eax+22Ch], 0
jnz	loc_81CF64
push	esi
push	edi
mov	edi, [esp+1Ch+arg_0]
dec	ebp
push	ebp
lea	ebx, [edi+4]
push	edi
mov	ecx, ebx
call	sub_823BC0
mov	esi, eax
mov	eax, [esp+1Ch+var_8]
push	eax
push	edi
mov	ecx, ebx
call	sub_823BB0
test	eax, eax
jnz	loc_81CF62	; jumptable 0081CE30 case 28
push	ebp
push	edi
mov	ecx, ebx
call	sub_823B40
test	al, al
jz	loc_81CF62	; jumptable 0081CE30 case 28
test	esi, esi
jz	loc_81CF62	; jumptable 0081CE30 case 28
push	ebp
push	edi
mov	ecx, ebx
call	sub_823B80
mov	ecx, [eax+8]
mov	edx, [ecx+10h]
mov	eax, [esi]
mov	[esp+1Ch+var_C], edx
mov	edx, eax
and	edx, 3Fh
cmp	edx, 1Ch
jz	short loc_81CDC2
cmp	edx, 1Dh
jnz	loc_81CF62	; jumptable 0081CE30 case 28

loc_81CDC2:
mov	ebp, [ecx+8]
shr	eax, 6
and	eax, 0FFh
sub	esi, 4
mov	[esp+1Ch+var_8], eax
cmp	esi, ebp
jb	loc_81CF62	; jumptable 0081CE30 case 28
mov	eax, [ecx+4]
lea	edx, [ebp+eax*4+0]
mov	[esp+1Ch+var_4], edx
jmp	short loc_81CDF0
align 10h

loc_81CDF0:
cmp	esi, [esp+1Ch+var_4]
jnb	loc_81CF62	; jumptable 0081CE30 case 28
mov	edx, [esi]
mov	ebx, edx
mov	eax, edx
shr	ebx, 6
shr	eax, 0Eh
mov	edi, edx
and	ebx, 0FFh
sub	esi, 4
shr	edi, 17h
and	eax, 1FFh
cmp	ebx, [esp+1Ch+var_8]
jnz	short loc_81CE43 ; default
			; jumptable 0081CE30 cases 1-3,7-10,12-27,29-37
mov	ebx, edx
and	ebx, 3Fh
cmp	ebx, 26h	; switch 39 cases
ja	short loc_81CE43 ; default
			; jumptable 0081CE30 cases 1-3,7-10,12-27,29-37
movzx	ebx, ds:byte_81CF8C[ebx]
jmp	ds:off_81CF6C[ebx*4] ; switch jump

loc_81CE37:		; jumptable 0081CE30 case 0
movzx	eax, byte ptr [ecx+3]
cmp	edi, eax
jl	short loc_81CE4F
mov	[esp+1Ch+var_8], edi

loc_81CE43:		; default
cmp	esi, ebp	; jumptable 0081CE30 cases 1-3,7-10,12-27,29-37
jnb	short loc_81CDF0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_81CE4F:
mov	ebx, [esp+1Ch+arg_4]
lea	edx, [edi+1]
lea	eax, [esi+8]
mov	dword ptr [ebx+8], offset aLocal ; "local"
call	sub_81CC20
pop	edi
pop	esi
pop	ebp
mov	[ebx+4], eax
pop	ebx
add	esp, 0Ch
retn

loc_81CE70:		; jumptable 0081CE30 case 4
mov	eax, [esp+1Ch+arg_4]
mov	dword ptr [eax+8], offset aUpvalue ; "UpValue"
mov	ecx, [ecx+30h]
mov	edx, [ecx+edi*4]
pop	edi
pop	esi
add	edx, 8
pop	ebp
mov	[eax+4], edx
pop	ebx
add	esp, 0Ch
retn

loc_81CE8F:		; jumptable 0081CE30 case 5
mov	eax, [esp+1Ch+var_C]
shr	edx, 0Eh
cmp	dword ptr [eax+edx*8], 4
lea	eax, [eax+edx*8]
jnz	loc_81CF62	; jumptable 0081CE30 case 28
mov	ecx, [esp+1Ch+arg_4]
pop	edi
mov	dword ptr [ecx+8], offset aGlobal ; "global"
mov	edx, [eax+4]
pop	esi
add	edx, 8
pop	ebp
mov	[ecx+4], edx
pop	ebx
add	esp, 0Ch
retn

loc_81CEBF:		; jumptable 0081CE30 case 11
cmp	eax, 100h
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [ecx+8], offset aMethod_0 ; "method"
jl	loc_81CF62	; jumptable 0081CE30 case 28
mov	edx, [esp+1Ch+var_C]
pop	edi
and	eax, 0FFh
mov	eax, [edx+eax*8+4]
pop	esi
add	eax, 8
pop	ebp
mov	[ecx+4], eax
pop	ebx
add	esp, 0Ch
retn

loc_81CEF0:		; jumptable 0081CE30 case 6
cmp	eax, 100h
mov	ecx, [esp+1Ch+arg_4]
mov	dword ptr [ecx+8], offset aField ; "field"
jl	short loc_81CF62 ; jumptable 0081CE30 case 28
mov	edx, [esp+1Ch+var_C]
and	eax, 0FFh
cmp	dword ptr [edx+eax*8], 4
lea	eax, [edx+eax*8]
jnz	short loc_81CF25
mov	eax, [eax+4]
pop	edi
pop	esi
add	eax, 8
pop	ebp
mov	[ecx+4], eax
pop	ebx
add	esp, 0Ch
retn

loc_81CF25:
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ecx+4], offset a?_2 ; "?"
pop	ebx
add	esp, 0Ch
retn

loc_81CF34:		; jumptable 0081CE30 case 38
mov	ecx, [esp+1Ch+arg_4]
mov	edx, [esp+1Ch+var_C]
mov	dword ptr [ecx+8], offset aField_0 ; "field"
cmp	dword ptr [edx+eax*8], 4
jnz	short loc_81CF5B
mov	edx, [edx+eax*8+4]
pop	edi
pop	esi
add	edx, 8
pop	ebp
mov	[ecx+4], edx
pop	ebx
add	esp, 0Ch
retn

loc_81CF5B:		; "?"
mov	dword ptr [ecx+4], offset a?_3

loc_81CF62:		; jumptable 0081CE30 case 28
pop	edi
pop	esi

loc_81CF64:
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_81CD20 endp

align 4
off_81CF6C dd offset loc_81CE37	; jump table for switch	statement
dd offset loc_81CE70
dd offset loc_81CE8F
dd offset loc_81CEF0
dd offset loc_81CEBF
dd offset loc_81CF62
dd offset loc_81CF34
dd offset loc_81CE43
byte_81CF8C db	    0,	   7,	  7,	 7 ; indirect table for	switch statement
db	1,     2,     3,     7
db	7,     7,     7,     4
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     7,     7
db	5,     7,     7,     7
db	7,     7,     7,     7
db	7,     7,     6
align 10h



sub_81CFC0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	edi
mov	edi, eax
xor	eax, eax
mov	[esp+10h+var_4], eax
mov	[esp+10h+var_8], eax
mov	al, [edi]
test	al, al
jz	loc_81D094
push	ebx
or	ebx, 0FFFFFFFFh

loc_81CFE3:
movsx	eax, al
add	eax, 0FFFFFFB4h
cmp	eax, 29h	; switch 42 cases
ja	short loc_81D057 ; default
			; jumptable 0081CFF5 cases 1-6,8-25,27-31,33,35-40
movzx	eax, ds:byte_81D0BC[eax]
jmp	ds:off_81D0A0[eax*4] ; switch jump

loc_81CFFC:		; jumptable 0081CFF5 case 34
push	esi
push	ebp
call	sub_81CD20
add	esp, 8
jmp	short loc_81D057 ; default
			; jumptable 0081CFF5 cases 1-6,8-25,27-31,33,35-40

loc_81D008:		; jumptable 0081CFF5 case 7
push	offset aC_3
lea	ecx, [esi+24h]
push	200h		; SizeInBytes
push	ecx		; Dst
mov	dword ptr [esi+10h], offset aC ; "=[C]"
mov	dword ptr [esi+0Ch], offset aC_0 ; "C"
mov	[esi+1Ch], ebx
mov	[esi+20h], ebx
call	sub_822D10
add	esp, 0Ch
jmp	short loc_81D057 ; default
			; jumptable 0081CFF5 cases 1-6,8-25,27-31,33,35-40

loc_81D034:		; jumptable 0081CFF5 case 32
mov	[esi+14h], ebx
jmp	short loc_81D057 ; default
			; jumptable 0081CFF5 cases 1-6,8-25,27-31,33,35-40

loc_81D039:		; jumptable 0081CFF5 case 41
mov	edx, [esp+14h+arg_4]
mov	eax, [edx+0Ch]
mov	[esi+18h], eax
jmp	short loc_81D057 ; default
			; jumptable 0081CFF5 cases 1-6,8-25,27-31,33,35-40

loc_81D045:		; jumptable 0081CFF5 case 26
mov	[esp+14h+var_8], 1
jmp	short loc_81D057 ; default
			; jumptable 0081CFF5 cases 1-6,8-25,27-31,33,35-40

loc_81D04F:		; jumptable 0081CFF5 case 0
mov	[esp+14h+var_4], 1

loc_81D057:		; default
mov	al, [edi+1]	; jumptable 0081CFF5 cases 1-6,8-25,27-31,33,35-40
inc	edi
test	al, al
jnz	short loc_81CFE3
cmp	[esp+14h+var_8], 0
pop	ebx
jz	short loc_81D07E
mov	ecx, [ebp+1Ch]
mov	edx, [esp+10h+arg_4]
mov	[ecx+4], edx
mov	eax, [ebp+1Ch]
mov	dword ptr [eax], 0Ah
add	dword ptr [ebp+1Ch], 8

loc_81D07E:
cmp	[esp+10h+var_4], 0
jz	short loc_81D094
mov	eax, [ebp+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[ebp+1Ch], eax

loc_81D094:
pop	edi
mov	eax, 1
pop	ebp
add	esp, 8
retn
sub_81CFC0 endp

align 10h
off_81D0A0 dd offset loc_81D04F	; jump table for switch	statement
dd offset loc_81D008
dd offset loc_81D045
dd offset loc_81D034
dd offset loc_81CFFC
dd offset loc_81D039
dd offset loc_81D057
byte_81D0BC db	    0,	   6,	  6,	 6 ; indirect table for	switch statement
db	6,     6,     6,     1
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     2,     6
db	6,     6,     6,     6
db	3,     6,     4,     6
db	6,     6,     6,     6
db	6,     5
align 10h



sub_81D0F0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	edi
mov	edi, [ebx+10h]
test	edi, edi
jnz	short loc_81D116
push	offset aString?	; "[string \"?\"]"
push	200h		; SizeInBytes
add	ebx, 24h
push	ebx		; Dst
call	sub_822D10
add	esp, 0Ch
pop	edi
pop	ebx
retn

loc_81D116:
mov	al, [edi]
push	esi
cmp	al, 40h
jnz	short loc_81D179
mov	eax, edi
lea	edx, [eax+1]

loc_81D122:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81D122
sub	eax, edx
mov	esi, eax
cmp	esi, 1F9h
jbe	short loc_81D162
push	offset a____1	; "..."
lea	eax, [ebx+24h]
push	4		; SizeInBytes
push	eax		; Dst
call	sub_822D10
lea	ecx, [esi+edi-1F8h]
push	ecx		; Src
push	1F9h		; SizeInBytes
add	ebx, 27h
push	ebx		; Dst
call	sub_822D10
add	esp, 18h
pop	esi
pop	edi
pop	ebx
retn

loc_81D162:
inc	edi
push	edi		; Src
push	200h		; SizeInBytes
add	ebx, 24h
push	ebx		; Dst
call	sub_822D10
add	esp, 0Ch
pop	esi
pop	edi
pop	ebx
retn

loc_81D179:
cmp	al, 3Dh
jnz	short loc_81D1AA
mov	eax, edi
lea	edx, [eax+1]

loc_81D182:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81D182
sub	eax, edx
cmp	eax, 200h
jbe	short loc_81D197
mov	eax, 200h

loc_81D197:
inc	edi
push	edi		; Src
push	eax		; SizeInBytes
add	ebx, 24h
push	ebx		; Dst
call	sub_822D10
add	esp, 0Ch
pop	esi
pop	edi
pop	ebx
retn

loc_81D1AA:		; "[string \""
push	offset aString_1
lea	edx, [ebx+24h]
push	0Ah		; SizeInBytes
push	edx		; Dst
call	sub_822D10
push	offset asc_1466910 ; "\n\r"
push	edi		; char *
call	_strcspn
mov	esi, eax
add	esp, 14h
cmp	esi, 1EFh
jbe	short loc_81D1FE
push	edi		; Src
lea	eax, [ebx+2Dh]
push	1F3h		; SizeInBytes
push	eax		; Dst
mov	esi, 1F2h
call	sub_822D10
push	offset a____2	; "..."
lea	ecx, [ebx+21Ch]
push	4		; SizeInBytes
push	ecx		; Dst
call	sub_822D10
add	esp, 18h
jmp	short loc_81D23F

loc_81D1FE:
mov	eax, edi
lea	edx, [eax+1]

loc_81D203:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_81D203
sub	eax, edx
push	edi		; Src
lea	edx, [esi+1]
cmp	esi, eax
push	edx		; SizeInBytes
lea	eax, [ebx+2Dh]
push	eax		; Dst
jnb	short loc_81D237
call	sub_822D10
push	offset a____3	; "..."
lea	ecx, [esi+ebx+2Dh]
push	4		; SizeInBytes
push	ecx		; Dst
call	sub_822D10
add	esp, 18h
add	esi, 3
jmp	short loc_81D23F

loc_81D237:
call	sub_822D10
add	esp, 0Ch

loc_81D23F:		; "\"]"
push	offset asc_146691C
lea	ecx, [esi+ebx+2Dh]
push	3		; SizeInBytes
push	ecx		; Dst
call	sub_822D10
add	esp, 0Ch
pop	esi
pop	edi
pop	ebx
retn
sub_81D0F0 endp

align 10h



sub_81D260 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, eax
xor	eax, eax
mov	[esp+0Ch+var_4], eax
mov	[esp+0Ch+arg_4], eax
mov	eax, [esp+0Ch+arg_0]
push	edi
mov	edi, [eax+8]
mov	al, [ebp+0]
test	al, al
jz	loc_81D3E7

loc_81D286:
movsx	eax, al
add	eax, 0FFFFFFB4h
cmp	eax, 29h	; switch 42 cases
ja	loc_81D358	; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40
movzx	ecx, ds:byte_81D410[eax]
jmp	ds:off_81D3F4[ecx*4] ; switch jump

loc_81D2A3:		; jumptable 0081D29C case 34
push	esi
push	ebx
call	sub_81CD20
mov	eax, [edi+38h]
add	esp, 8
test	eax, eax
jz	short loc_81D2BA
add	eax, 8
mov	[esi+4], eax

loc_81D2BA:
cmp	dword ptr [esi+4], 0
jnz	loc_81D358	; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40
mov	dword ptr [esi+4], offset aAnonymous ; "(anonymous)"
jmp	loc_81D358	; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40

loc_81D2D0:		; jumptable 0081D29C case 32
or	eax, 0FFFFFFFFh
mov	[esi+14h], eax
test	edi, edi
jz	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40
cmp	dword ptr [edi+28h], 0
jz	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40
cmp	[esi+228h], eax
jz	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40
mov	eax, esi
mov	ecx, ebx
call	sub_81CC00
test	eax, eax
jz	short loc_81D306
sub	eax, [edi+8]
mov	edx, [edi+28h]
sar	eax, 2
mov	eax, [edx+eax*4]
mov	[esi+14h], eax
jmp	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40

loc_81D306:
mov	ecx, [edi+28h]
mov	edx, [ecx]
mov	[esi+14h], edx
jmp	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40

loc_81D310:		; jumptable 0081D29C case 7
mov	dword ptr [esi+0Ch], offset aLua
mov	eax, [edi+34h]
add	eax, 8
push	esi
mov	[esi+10h], eax
call	sub_81D0F0
mov	ecx, [edi+1Ch]
mov	[esi+1Ch], ecx
mov	edx, [edi+20h]
add	esp, 4
mov	[esi+20h], edx
jmp	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40

loc_81D337:		; jumptable 0081D29C case 41
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax+8]
movzx	edx, byte ptr [ecx]
mov	[esi+18h], edx
jmp	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40

loc_81D346:		; jumptable 0081D29C case 26
mov	[esp+10h+arg_4], 1
jmp	short loc_81D358 ; default
			; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40

loc_81D350:		; jumptable 0081D29C case 0
mov	[esp+10h+var_4], 1

loc_81D358:		; default
mov	al, [ebp+1]	; jumptable 0081D29C cases 1-6,8-25,27-31,33,35-40
inc	ebp
test	al, al
jnz	loc_81D286
cmp	[esp+10h+arg_4], 0
jz	short loc_81D382
mov	eax, [ebx+1Ch]
mov	ecx, [esp+10h+arg_0]
mov	[eax+4], ecx
mov	edx, [ebx+1Ch]
mov	dword ptr [edx], 9
add	dword ptr [ebx+1Ch], 8

loc_81D382:
cmp	[esp+10h+var_4], 0
jz	short loc_81D3E7
push	3
push	ebx
call	sub_81B6A0
push	1
push	1
push	ebx
call	sub_81BD50
add	esp, 14h
test	edi, edi
jz	short loc_81D3E7
xor	esi, esi
cmp	[edi+24h], esi
jbe	short loc_81D3E7
lea	ebp, [esi-8]
lea	esp, [esp+0]

loc_81D3B0:
mov	eax, [ebx+1Ch]
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], 1
add	eax, 8
mov	[ebx+1Ch], eax
mov	edx, [edi+28h]
lea	ecx, [eax-8]
push	ecx
mov	ecx, [edx+esi*4]
push	ecx
add	eax, 0FFFFFFF0h
push	eax
push	ebx
call	sub_8197D0
add	[ebx+1Ch], ebp
inc	esi
add	esp, 10h
cmp	esi, [edi+24h]
jb	short loc_81D3B0

loc_81D3E7:
pop	edi
pop	esi
mov	eax, 1
pop	ebp
pop	ecx
retn
sub_81D260 endp

align 4
off_81D3F4 dd offset loc_81D350	; jump table for switch	statement
dd offset loc_81D310
dd offset loc_81D346
dd offset loc_81D2D0
dd offset loc_81D2A3
dd offset loc_81D337
dd offset loc_81D358
byte_81D410 db	    0,	   6,	  6,	 6 ; indirect table for	switch statement
db	6,     6,     6,     1
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     2,     6
db	6,     6,     6,     6
db	3,     6,     4,     6
db	6,     6,     6,     6
db	6,     5
align 10h



sub_81D440 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
cmp	byte ptr [edi],	3Eh
jnz	short loc_81D48E
mov	ebx, [esp+0Ch+arg_0]
mov	eax, [ebx+1Ch]
mov	ecx, eax
sub	ecx, [ebx+20h]
and	ecx, 0FFFFFFF8h
cmp	ecx, 8
jge	short loc_81D466
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn

loc_81D466:
mov	ecx, [eax-8]
mov	eax, [eax-4]
mov	esi, [esp+0Ch+arg_8]
inc	edi
add	dword ptr [ebx+1Ch], 0FFFFFFF8h
mov	dword ptr [esi+22Ch], 0
mov	dword ptr [esi+228h], 0FFFFFFFFh
jmp	loc_81D548

loc_81D48E:
mov	esi, [esp+0Ch+arg_8]
cmp	dword ptr [esi+22Ch], 0
jz	loc_81D52F
push	offset aTailCall ; "(tail call)"
lea	edx, [esi+24h]
push	200h		; SizeInBytes
push	edx		; Dst
mov	dword ptr [esi+0Ch], offset aTail ; "tail"
mov	dword ptr [esi+10h], offset aTailCall_0	; "=(tail call)"
call	sub_822D10
mov	eax, offset unk_14668A6
mov	[esi+8], eax
mov	[esi+4], eax
mov	al, [edi]
add	esp, 0Ch
xor	esi, esi
xor	edx, edx
mov	ecx, edi
test	al, al
jz	short loc_81D526
lea	ebx, [ebx+0]

loc_81D4E0:
cmp	al, 66h
jnz	short loc_81D4EB
mov	edx, 1
jmp	short loc_81D4F4

loc_81D4EB:
cmp	al, 4Ch
jnz	short loc_81D4F4
mov	esi, 1

loc_81D4F4:
mov	al, [ecx+1]
inc	ecx
test	al, al
jnz	short loc_81D4E0
mov	eax, [esp+0Ch+arg_0]
test	edx, edx
jz	short loc_81D513
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx

loc_81D513:
test	esi, esi
jz	short loc_81D526
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx

loc_81D526:
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_81D52F:
mov	eax, [esi+228h]
mov	ebx, [esp+0Ch+arg_0]
push	eax
push	ebx
lea	ecx, [ebx+4]
call	sub_823B10
mov	ecx, [eax]
mov	eax, [eax+4]

loc_81D548:
sub	ecx, 9
jz	short loc_81D576
sub	ecx, 1
jz	short loc_81D566
push	offset aLevelOutOfRang ; "(level out of	range)"
push	1
push	ebx
call	sub_81A940
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn

loc_81D566:
push	eax
push	ebx
mov	eax, edi
call	sub_81CFC0
add	esp, 8
pop	edi
pop	esi
pop	ebx
retn

loc_81D576:
push	edi
push	eax
mov	eax, esi
call	sub_81D260
add	esp, 8
pop	edi
pop	esi
pop	ebx
retn
sub_81D440 endp

align 10h



sub_81D590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	ebp
call	sub_81CC70
mov	edi, eax
add	esp, 4
test	edi, edi
jz	short loc_81D5DA
mov	eax, [ebx+228h]
push	eax
push	esi
lea	ecx, [esi+4]
call	sub_823A90
mov	edx, [eax+ebp*8-8]
lea	ecx, [eax+ebp*8-8]
mov	eax, [esi+1Ch]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, edi

loc_81D5DA:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_81D590 endp

align 10h



sub_81D5E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

xor	ecx, ecx
or	eax, 0FFFFFFFFh
push	ebp
mov	ebp, [esp+4+arg_4]
cmp	ebp, ecx
push	edi
mov	edi, [esp+8+arg_8]
mov	[edi+4], ecx
mov	dword ptr [edi+8], offset unk_14668A7
mov	[edi+0Ch], ecx
mov	[edi+10h], ecx
mov	[edi+14h], eax
mov	[edi+18h], ecx
mov	[edi+1Ch], eax
mov	[edi+20h], eax
mov	[edi+24h], cl
mov	[edi+228h], eax
mov	[edi+22Ch], eax
jge	short loc_81D623
pop	edi
xor	eax, eax
pop	ebp
retn

loc_81D623:
push	ebx
mov	ebx, [esp+0Ch+arg_0]
add	ebx, 4
push	esi
mov	esi, [ebx+8]
sub	esi, [ebx]
sar	esi, 4
cmp	esi, ecx
jl	short loc_81D651

loc_81D638:
mov	eax, [esp+10h+arg_0]
push	esi
push	eax
mov	ecx, ebx
call	sub_823BB0
inc	eax
cmp	ebp, eax
jl	short loc_81D658
sub	ebp, eax
sub	esi, 1
jns	short loc_81D638

loc_81D651:
pop	esi
pop	ebx
pop	edi
xor	eax, eax
pop	ebp
retn

loc_81D658:
xor	ecx, ecx
test	ebp, ebp
setnle	cl
mov	[edi+228h], esi
pop	esi
pop	ebx
mov	eax, 1
mov	[edi+22Ch], ecx
pop	edi
pop	ebp
retn
sub_81D5E0 endp

align 10h



sub_81D680 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
test	ebx, ebx
jle	short loc_81D69B
mov	eax, [esi+20h]
lea	eax, [eax+ebx*8-8]
jmp	short loc_81D6A1

loc_81D69B:
mov	ecx, [esi+1Ch]
lea	eax, [ecx+ebx*8]

loc_81D6A1:
mov	edx, [eax]
mov	edi, [eax+4]
lea	eax, [esp+14h+arg_4]
push	eax
push	ebx
push	esi
mov	[esp+20h+var_8], edx
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+14h+arg_4], 0
jnz	short loc_81D6CC
mov	eax, [eax]
cmp	eax, 0Ah
jz	short loc_81D6E4
cmp	eax, 9
jz	short loc_81D6E4

loc_81D6CC:		; "function"
push	offset aFunction_1
push	ebx
push	esi
call	sub_81AAE0
add	esp, 0Ch

loc_81D6DB:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
add	esp, 8
retn

loc_81D6E4:
lea	ecx, [esp+14h+arg_4]
push	ecx
push	ebx
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+14h+arg_4], 0
jnz	short loc_81D72E
cmp	dword ptr [eax], 0Ah
jnz	short loc_81D72E
mov	ecx, [esp+14h+arg_8]
test	ecx, ecx
jle	short loc_81D6DB
cmp	ecx, [edi+0Ch]
jg	short loc_81D6DB
mov	eax, [esi+1Ch]
mov	edx, [edi+ecx*8+0Ch]
mov	[eax], edx
mov	ecx, [edi+ecx*8+10h]
mov	[eax+4], ecx
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
mov	eax, offset unk_14668AE
pop	ebx
add	esp, 8
retn

loc_81D72E:
mov	edx, [esp+14h+arg_8]
mov	ebx, [edi+8]
test	edx, edx
jle	short loc_81D6DB
cmp	edx, [ebx+2Ch]
jg	short loc_81D6DB
mov	ecx, [edi+edx*4+14h]
mov	ecx, [ecx+8]
mov	eax, [esi+1Ch]
mov	edi, [ecx]
mov	[eax], edi
mov	ecx, [ecx+4]
mov	[eax+4], ecx
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, [ebx+30h]
test	eax, eax
jz	short loc_81D76D
mov	eax, [eax+edx*4-4]
pop	edi
pop	esi
add	eax, 8
pop	ebx
add	esp, 8
retn

loc_81D76D:
pop	edi
pop	esi
mov	eax, offset aStripped ;	"(*stripped)"
pop	ebx
add	esp, 8
retn
sub_81D680 endp

align 10h



sub_81D780 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
and	eax, 0FFFFFFF8h
cmp	eax, 8
jge	short loc_81D797
xor	eax, eax
pop	esi
retn

loc_81D797:
push	ebx
mov	ebx, [esp+8+arg_4]
push	edi
mov	edi, [esp+0Ch+arg_8]
push	edi
call	sub_81CC70
add	esp, 4
mov	[esp+0Ch+arg_0], eax
test	eax, eax
jz	short loc_81D7E2
mov	eax, [esi+1Ch]
mov	ebx, [eax-4]
mov	ecx, [esp+0Ch+arg_4]
add	eax, 0FFFFFFF8h
push	ebp
mov	ebp, [eax]
mov	[esi+1Ch], eax
mov	edx, [ecx+228h]
push	edx
push	esi
lea	ecx, [esi+4]
call	sub_823A90
mov	[eax+edi*8-8], ebp
mov	[eax+edi*8-4], ebx
mov	eax, [esp+10h+arg_0]
pop	ebp

loc_81D7E2:
pop	edi
pop	ebx
pop	esi
retn
sub_81D780 endp

align 10h



sub_81D7F0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
test	ebx, ebx
jle	short loc_81D80C
mov	eax, [esi+20h]
lea	eax, [eax+ebx*8-8]
jmp	short loc_81D812

loc_81D80C:
mov	ecx, [esi+1Ch]
lea	eax, [ecx+ebx*8]

loc_81D812:
mov	edx, [eax]
mov	edi, [eax+4]
push	0FFFFFFFFh
push	esi
mov	[esp+20h+var_8], edx
call	sub_81AA40
lea	eax, [esp+20h+arg_4]
push	eax
push	ebx
push	esi
call	sub_4328D0
add	esp, 14h
cmp	[esp+18h+arg_4], 0
jnz	short loc_81D845
mov	eax, [eax]
cmp	eax, 0Ah
jz	short loc_81D854
cmp	eax, 9
jz	short loc_81D854

loc_81D845:		; "function"
push	offset aFunction_2
push	ebx
push	esi
call	sub_81AAE0
add	esp, 0Ch

loc_81D854:
lea	ecx, [esp+18h+arg_4]
push	ecx
push	ebx
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+18h+arg_4], 0
jnz	short loc_81D89E
cmp	dword ptr [eax], 0Ah
jnz	short loc_81D89E
mov	ecx, [esp+18h+arg_8]
test	ecx, ecx
jle	short loc_81D8F6
cmp	ecx, [edi+0Ch]
jg	short loc_81D8F6
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
mov	[edi+ecx*8+0Ch], edx
mov	eax, [eax-4]
mov	[edi+ecx*8+10h], eax
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
pop	ebp
mov	eax, offset unk_14668AF
pop	ebx
add	esp, 8
retn

loc_81D89E:
mov	ebx, [esp+18h+arg_8]
mov	ebp, [edi+8]
test	ebx, ebx
jle	short loc_81D8F6
movzx	ecx, byte ptr [ebp+0]
cmp	ebx, ecx
jg	short loc_81D8F6
mov	eax, [esi+1Ch]
mov	edx, [edi+ebx*4+14h]
mov	ecx, [eax-8]
mov	edi, [eax-4]
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
mov	eax, [edx+8]
mov	[eax], ecx
mov	[eax+4], edi
mov	ecx, [esi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_81D8E4
mov	eax, [edx+8]
push	eax
push	edx
call	sub_81EB00

loc_81D8E4:
mov	ecx, [ebp+30h]
mov	eax, [ecx+ebx*4-4]
pop	edi
pop	esi
pop	ebp
add	eax, 8
pop	ebx
add	esp, 8
retn

loc_81D8F6:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 8
retn
sub_81D7F0 endp




sub_81D900 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	esi
call	sub_81B350
mov	eax, [esi]
xor	ecx, ecx
mov	[eax+488h], ecx
mov	[eax+48Ch], ecx
mov	eax, [esi]
mov	[eax+3C8h], ecx
mov	[eax+3CCh], ecx
mov	eax, [esi]
add	esp, 4
mov	[eax+490h], cl
pop	esi
retn
sub_81D900 endp

align 10h



sub_81D940 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	380h
call	sub_82CFF0
mov	[esi+10h], eax
test	eax, eax
jnz	short loc_81D97C

loc_81D957:
mov	eax, [esi+4]
push	380h
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	380h
call	sub_82CFF0
mov	[esi+10h], eax
test	eax, eax
jz	short loc_81D957

loc_81D97C:
mov	ecx, [esi+10h]
push	380h		; size_t
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch
mov	dword ptr [esi+14h], 0FFFFFFFFh
mov	dword ptr [esi+18h], 20h
pop	esi
retn
sub_81D940 endp

align 10h



sub_81D9A0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, [ecx+3Ch]
test	edx, edx
jg	short loc_81D9AE
or	edx, 0FFFFFFFFh

loc_81D9AE:
mov	[ecx+50h], edx
mov	[ecx+3Ch], edx
mov	[ecx+4Ch], edx
retn	4
sub_81D9A0 endp

align 10h



sub_81D9C0 proc	near

arg_0= byte ptr	 4

cmp	[esp+arg_0], 0
jz	short loc_81D9CD
dec	dword ptr [ecx+44h]
retn	4

loc_81D9CD:
inc	dword ptr [ecx+44h]
retn	4
sub_81D9C0 endp

align 10h



sub_81D9E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	0Ch
call	sub_82CFF0
test	eax, eax
jnz	short loc_81DA0D

loc_81D9F1:
mov	eax, [esi+4]
push	0Ch
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	0Ch
call	sub_82CFF0
test	eax, eax
jz	short loc_81D9F1

loc_81DA0D:
mov	ecx, [esp+4+arg_0]
mov	edx, [esp+4+arg_4]
mov	[eax+4], ecx
mov	[eax], edx
mov	ecx, [esi+1Ch]
mov	[eax+8], ecx
inc	dword ptr [esi+30h]
mov	[esi+1Ch], eax
pop	esi
retn	8
sub_81D9E0 endp

align 10h



sub_81DA30 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
mov	[ecx+28h], edx
mov	eax, [eax+4]
mov	[ecx+2Ch], eax
retn	4
sub_81DA30 endp

align 10h



sub_81DA50 proc	near
mov	dword ptr [ecx+28h], 0
retn
sub_81DA50 endp

align 10h



sub_81DA60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+8]
push	0Ch
call	sub_82CFF0
test	eax, eax
jnz	short loc_81DA8D

loc_81DA71:
mov	eax, [esi+4]
push	0Ch
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	0Ch
call	sub_82CFF0
test	eax, eax
jz	short loc_81DA71

loc_81DA8D:
mov	ecx, [esp+4+arg_0]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	edx, [esi+20h]
mov	[eax+8], edx
inc	dword ptr [esi+34h]
mov	[esi+20h], eax
pop	esi
retn	4
sub_81DA60 endp

align 10h



sub_81DAB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 18h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+1Ch]
xor	ecx, ecx
mov	[esp+28h+var_18], ecx
mov	[esp+28h+var_14], eax
cmp	eax, ecx
jz	loc_81DC2B
mov	ebp, 0F0000000h
jmp	short loc_81DAE4
jmp	short loc_81DAE0
align 10h

loc_81DAE0:
mov	eax, [esp+28h+var_14]

loc_81DAE4:
mov	esi, [eax+4]
mov	ecx, dword_1859278
mov	ebx, [eax]
mov	eax, dword_1859274
mov	[esp+28h+var_C], ecx
lea	edx, [esp+28h+var_8]
lea	ecx, [esp+28h+var_10]
push	edx
mov	[esp+2Ch+var_10], eax
mov	eax, [edi+4]
push	ecx
push	eax
mov	ecx, esi
test	[esi+8], ebp
jz	short loc_81DB18
call	sub_822800
jmp	short loc_81DB1D

loc_81DB18:
call	sub_8206B0

loc_81DB1D:
cmp	[esp+28h+var_8], 0
jz	loc_81DBF4
jmp	short loc_81DB30
align 10h

loc_81DB30:
mov	edx, [esp+28h+var_10]
add	edx, 0FFFFFFFBh
cmp	edx, 5
ja	short loc_81DB7C
test	bl, 2
jz	short loc_81DB7C
mov	eax, [esp+28h+var_C]
mov	cl, [eax-4]
not	cl
test	cl, 1
jz	short loc_81DB7C
mov	eax, [edi+4]
push	offset dword_1859274
test	[esi+8], ebp
jz	short loc_81DB6B
lea	edx, [esp+2Ch+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_822950
jmp	short loc_81DB78

loc_81DB6B:
lea	ecx, [esp+2Ch+var_10]
push	ecx
push	eax
mov	ecx, esi
call	sub_820D20

loc_81DB78:
add	dword ptr [edi+4Ch], 0FFFFFFFBh

loc_81DB7C:
mov	edx, [esp+28h+var_8]
add	edx, 0FFFFFFFBh
cmp	edx, 5
ja	short loc_81DBC8
test	bl, 1
jz	short loc_81DBC8
mov	eax, [esp+28h+var_4]
mov	cl, [eax-4]
not	cl
test	cl, 1
jz	short loc_81DBC8
mov	eax, [edi+4]
push	offset dword_1859274
test	[esi+8], ebp
jz	short loc_81DBB7
lea	edx, [esp+2Ch+var_10]
push	edx
push	eax
mov	ecx, esi
call	sub_822950
jmp	short loc_81DBC4

loc_81DBB7:
lea	ecx, [esp+2Ch+var_10]
push	ecx
push	eax
mov	ecx, esi
call	sub_820D20

loc_81DBC4:
add	dword ptr [edi+4Ch], 0FFFFFFFBh

loc_81DBC8:
mov	eax, [edi+4]
lea	edx, [esp+28h+var_8]
lea	ecx, [esp+28h+var_10]
push	edx
push	ecx
push	eax
mov	ecx, esi
test	[esi+8], ebp
jz	short loc_81DBE4
call	sub_822800
jmp	short loc_81DBE9

loc_81DBE4:
call	sub_8206B0

loc_81DBE9:
cmp	[esp+28h+var_8], 0
jnz	loc_81DB30

loc_81DBF4:
mov	eax, [esp+28h+var_18]
inc	eax
mov	[esp+28h+var_18], eax
cmp	eax, 3
jnz	short loc_81DC0D
dec	dword ptr [edi+4Ch]
mov	[esp+28h+var_18], 0

loc_81DC0D:
mov	edx, [esp+28h+var_14]
mov	eax, [edx+8]
mov	[esp+28h+var_14], eax
test	eax, eax
jnz	loc_81DAE0
mov	[edi+1Ch], eax
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_81DC2B:
mov	[edi+1Ch], ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_81DAB0 endp

align 10h



sub_81DC40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebp
push	edi
mov	edi, [esi]
inc	dword ptr [edi+274h]
mov	ebp, [eax+4]
add	edi, 230h
test	ebp, ebp
jz	short loc_81DCB2
cmp	dword ptr [ebp+78h], 0
jz	short loc_81DCB2
push	ebx
mov	ebx, [esi+1Ch]
sub	ebx, [esi+20h]
push	offset aUserdataGarbag ; "userdata garbage collection"
push	0Ah
push	esi
sar	ebx, 3
call	sub_81AA90
mov	eax, [esi+1Ch]
mov	ecx, [ebp+78h]
mov	[eax+8], ecx
mov	edx, [ebp+7Ch]
mov	ecx, [esp+18h+arg_0]
push	0
push	0
mov	[eax+0Ch], edx
mov	[eax+14h], ecx
mov	dword ptr [eax+10h], 7
add	eax, 18h
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_81C370
push	ebx
push	esi
call	sub_5F2280
add	esp, 24h
pop	ebx

loc_81DCB2:
dec	dword ptr [edi+44h]
pop	edi
pop	ebp
retn
sub_81DC40 endp

align 10h



sub_81DCC0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	eax, [edx]
cmp	eax, 4
push	esi
mov	esi, ecx
jl	short loc_81DCF3
cmp	eax, 0Ah
jg	short loc_81DCF3
mov	eax, [edx+4]
mov	cl, [eax-4]
sub	eax, 4
not	cl
test	cl, 1
jz	short loc_81DCF3
or	dword ptr [eax], 1
cmp	dword ptr [edx], 4
jz	short loc_81DCF3
push	edx
mov	ecx, esi
call	sub_81DA60

loc_81DCF3:
pop	esi
retn	4
sub_81DCC0 endp

align 10h



; int __thiscall sub_81DD00(void *, int, int, int, int,	int)
sub_81DD00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	esi
push	70h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
mov	eax, [esp+10h+arg_0]
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_C]
mov	[esi+4], eax
mov	eax, [eax]
mov	[esi+8], eax
mov	eax, [esp+10h+arg_8]
mov	[esi+38h], ecx
mov	ecx, [esi+8]
mov	[esi+3Ch], eax
mov	[esi+50h], eax
mov	[esi+4Ch], eax
mov	eax, [esp+10h+arg_10]
mov	dword ptr [esi+44h], 1
mov	dword ptr [esi+0Ch], 6
mov	dword ptr [esi+58h], 13Dh
mov	[esi+6Ch], edx
mov	[esi+48h], eax
mov	dword ptr [ecx+0Ch], 0
add	esp, 0Ch
mov	ecx, esi
call	sub_81D940
pop	esi
retn	14h
sub_81DD00 endp

align 10h



sub_81DD70 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, [esp+4+arg_4]
push	ebp
push	esi
push	edi
mov	esi, ecx
test	eax, eax
jnz	loc_81DEED
mov	ebp, [esp+10h+arg_0]
test	byte ptr [ebp-4], 1
jnz	loc_81DF59
mov	eax, [esi+14h]
mov	edi, [ebp+0Ch]
push	ebx
mov	ebx, [esi+18h]
lea	ecx, [eax+1]
cmp	ecx, ebx
mov	[esp+14h+var_4], eax
mov	[esi+14h], ecx
jl	loc_81DEC7
mov	ecx, [esi+8]
lea	eax, [ebx+20h]
lea	ebp, ds:0[eax*8]
sub	ebp, eax
add	ebp, ebp
add	ebp, ebp
push	ebp
call	sub_82CFF0
mov	[esp+14h+arg_4], eax
test	eax, eax
jnz	short loc_81DDEE
lea	ecx, [ecx+0]

loc_81DDD0:
mov	eax, [esi+4]
push	ebp
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	ebp
call	sub_82CFF0
mov	[esp+14h+arg_4], eax
test	eax, eax
jz	short loc_81DDD0

loc_81DDEE:
mov	edx, [esi+10h]
lea	ecx, ds:0[ebx*8]
sub	ecx, ebx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	ebp, [esi+10h]
mov	edx, [ebp-4]
mov	ecx, [esi+8]
sub	ebp, 4
shr	edx, 3
add	esp, 0Ch
cmp	edx, 80h
jnb	short loc_81DE27
mov	eax, edx
shr	eax, 3
jmp	short loc_81DE86

loc_81DE27:
cmp	edx, 400h
jnb	short loc_81DE39
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_81DE86

loc_81DE39:
cmp	edx, 1000h
jnb	short loc_81DE4B
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_81DE86

loc_81DE4B:
cmp	edx, 2000h
jnb	short loc_81DE5D
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_81DE86

loc_81DE5D:
cmp	edx, 20000h
jnb	short loc_81DE6F
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_81DE86

loc_81DE6F:
cmp	edx, 1A0000h
jnb	short loc_81DE81
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_81DE86

loc_81DE81:
mov	eax, 7Fh

loc_81DE86:
sub	[ecx+4], edx
lea	ebx, ds:0[edx*8]
mov	[ebp+0], ebx
cmp	eax, 5Dh
jb	short loc_81DEA9
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_81DEA9
push	ebp
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_81DEB4

loc_81DEA9:
mov	edx, [ecx+eax*4+10h]
mov	[ebp+4], edx
mov	[ecx+eax*4+10h], ebp

loc_81DEB4:
mov	eax, [esp+14h+arg_4]
add	dword ptr [esi+18h], 20h
mov	ebp, [esp+14h+arg_0]
mov	[esi+10h], eax
mov	eax, [esp+14h+var_4]

loc_81DEC7:
mov	edx, [esi+10h]
inc	eax
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]
mov	dword ptr [eax], 0Ah
mov	[eax+4], ebp
mov	[eax+8], edi
or	dword ptr [ebp-4], 1
dec	dword ptr [esi+4Ch]
pop	ebx
jmp	short loc_81DEF5

loc_81DEED:
mov	ecx, [eax+4]
mov	edi, [eax+8]
mov	ebp, ecx

loc_81DEF5:
test	edi, edi
jle	short loc_81DF2D
lea	esp, [esp+0]

loc_81DF00:
lea	ecx, ds:0[edi*8]
lea	edx, [ecx+ebp+0Ch]
dec	edi
push	edx
mov	ecx, esi
mov	[eax+8], edi
call	sub_81F350
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]
test	edi, edi
jg	short loc_81DF00

loc_81DF2D:
mov	eax, [esi+50h]
cmp	eax, 0FFFFFFFFh
jz	short loc_81DF48
cmp	dword ptr [esi+4Ch], 0
jg	short loc_81DF48
mov	[esi+4Ch], eax
mov	eax, [esi]
push	1		; int
push	eax		; int *
call	_longjmp

loc_81DF48:
dec	dword ptr [esi+14h]
cmp	dword ptr [ebp+0], 5
jnz	short loc_81DF59
push	ebp
mov	ecx, esi
call	sub_81F350

loc_81DF59:
pop	edi
pop	esi
pop	ebp
pop	ecx
retn	8
sub_81DD70 endp



; Attributes: bp-based frame

sub_81DF60 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 24h
push	ebx
push	esi
push	edi
mov	edi, [ebp+arg_4]
mov	esi, ecx
test	edi, edi
jnz	loc_81E17C
mov	ecx, [ebp+arg_0]
test	byte ptr [ecx-4], 1
jnz	loc_81E33B
mov	eax, [esi+14h]
mov	ebx, [esi+18h]
lea	edx, [eax+1]
cmp	edx, ebx
mov	[esp+30h+var_1C], eax
mov	[esi+14h], edx
jl	loc_81E0B5
mov	ecx, [esi+8]
lea	eax, [ebx+20h]
lea	edi, ds:0[eax*8]
sub	edi, eax
add	edi, edi
add	edi, edi
push	edi
call	sub_82CFF0
mov	[esp+30h+var_20], eax
test	eax, eax
jnz	short loc_81DFDE
nop

loc_81DFC0:
mov	eax, [esi+4]
push	edi
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	edi
call	sub_82CFF0
mov	[esp+30h+var_20], eax
test	eax, eax
jz	short loc_81DFC0

loc_81DFDE:
mov	edx, [esi+10h]
lea	ecx, ds:0[ebx*8]
sub	ecx, ebx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, [esi+10h]
mov	edx, [edi-4]
mov	ecx, [esi+8]
sub	edi, 4
shr	edx, 3
add	esp, 0Ch
cmp	edx, 80h
jnb	short loc_81E017
mov	eax, edx
shr	eax, 3
jmp	short loc_81E076

loc_81E017:
cmp	edx, 400h
jnb	short loc_81E029
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_81E076

loc_81E029:
cmp	edx, 1000h
jnb	short loc_81E03B
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_81E076

loc_81E03B:
cmp	edx, 2000h
jnb	short loc_81E04D
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_81E076

loc_81E04D:
cmp	edx, 20000h
jnb	short loc_81E05F
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_81E076

loc_81E05F:
cmp	edx, 1A0000h
jnb	short loc_81E071
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_81E076

loc_81E071:
mov	eax, 7Fh

loc_81E076:
sub	[ecx+4], edx
lea	ebx, ds:0[edx*8]
mov	[edi], ebx
cmp	eax, 5Dh
jb	short loc_81E098
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_81E098
push	edi
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_81E0A3

loc_81E098:
mov	edx, [ecx+eax*4+10h]
mov	[edi+4], edx
mov	[ecx+eax*4+10h], edi

loc_81E0A3:
mov	eax, [esp+30h+var_20]
add	dword ptr [esi+18h], 20h
mov	ecx, [ebp+arg_0]
mov	[esi+10h], eax
mov	eax, [esp+30h+var_1C]

loc_81E0B5:
inc	eax
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esi+10h]
lea	edi, [eax+edx*4]
mov	dword ptr [edi], 5
mov	[edi+4], ecx
mov	dword ptr [edi+8], 7
mov	dword ptr [edi+0Ch], 0
mov	edx, [ecx+10h]
mov	[edi+14h], edx
mov	eax, [ecx+0Ch]
push	ecx
mov	[edi+18h], eax
call	sub_823310
mov	ebx, [ebp+arg_0]
add	esp, 4
mov	[edi+10h], eax
test	eax, eax
jz	short loc_81E104
push	eax
push	ebx
mov	ecx, esi
call	sub_81D9E0

loc_81E104:
mov	edx, 1
or	[ebx-4], edx
or	ecx, 0FFFFFFFFh
add	[esi+4Ch], ecx
cmp	dword ptr [ebx+18h], 0
jbe	short loc_81E124
mov	eax, [ebx+10h]
or	[eax-4], edx
sub	eax, 4
add	[esi+4Ch], ecx

loc_81E124:
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_81E131
or	[eax-4], edx
add	[esi+4Ch], ecx

loc_81E131:
mov	eax, [ebx]
test	eax, eax
jz	short loc_81E161
or	[eax-4], edx
add	[esi+4Ch], ecx
mov	ecx, [ebx]
mov	edx, [ecx+88h]
push	0
push	edx
mov	ecx, esi
call	sub_81E7A0
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	edi, [edx+ecx*4]

loc_81E161:
mov	eax, [esi+50h]
cmp	eax, 0FFFFFFFFh
jz	short loc_81E1B3
cmp	dword ptr [esi+4Ch], 0
jg	short loc_81E1B3
mov	[esi+4Ch], eax
mov	eax, [esi]
push	1		; int
push	eax		; int *
call	_longjmp

loc_81E17C:
mov	eax, [edi+4]
mov	ecx, [eax+10h]
mov	[ebp+arg_0], eax
cmp	ecx, [edi+14h]
jnz	short loc_81E192
mov	edx, [eax+0Ch]
cmp	edx, [edi+18h]
jz	short loc_81E1B1

loc_81E192:
mov	ebx, [ebp+arg_0]
mov	dword ptr [edi+8], 7
mov	dword ptr [edi+0Ch], 0
mov	ecx, [eax+10h]
mov	[edi+14h], ecx
mov	edx, [eax+0Ch]
mov	[edi+18h], edx
jmp	short loc_81E1B3

loc_81E1B1:
mov	ebx, eax

loc_81E1B3:
mov	eax, [edi+10h]
mov	ecx, eax
shr	ecx, 1
not	ecx
not	eax
and	ecx, 1
and	eax, 1
cmp	dword ptr [edi+8], 7
mov	[esp+30h+var_18], ecx
mov	[esp+30h+var_20], eax
jnz	short loc_81E233
mov	edx, [ebp+arg_0]
mov	ecx, [edx+18h]
mov	ebx, [edi+0Ch]
mov	[esp+30h+var_1C], ecx
cmp	ebx, ecx
jnb	short loc_81E222

loc_81E1E3:
cmp	[esp+30h+var_20], 0
jnz	short loc_81E1F3
mov	eax, [edx+10h]
cmp	dword ptr [eax+ebx*8], 4
jnz	short loc_81E208

loc_81E1F3:
mov	ecx, [edx+10h]
lea	edx, [ecx+ebx*8]
push	edx
mov	ecx, esi
call	sub_81F350
mov	ecx, [esp+30h+var_1C]
mov	edx, [ebp+arg_0]

loc_81E208:
mov	eax, [esi+14h]
lea	edi, ds:0[eax*8]
sub	edi, eax
mov	eax, [esi+10h]
inc	ebx
lea	edi, [eax+edi*4]
mov	[edi+0Ch], ebx
cmp	ebx, ecx
jb	short loc_81E1E3

loc_81E222:
mov	ebx, [ebp+arg_0]
mov	dword ptr [edi+8], 8
mov	dword ptr [edi+0Ch], 0

loc_81E233:
cmp	dword ptr [ebx+8], 0
jbe	short loc_81E246
mov	eax, [ebx+0Ch]
or	dword ptr [eax-4], 1
sub	eax, 4
dec	dword ptr [esi+4Ch]

loc_81E246:
mov	eax, [ebx+8]
test	eax, eax
jbe	loc_81E338
mov	edx, eax
shr	edx, 1
or	eax, edx
mov	ecx, [edi+0Ch]
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	edx, eax
shr	edx, 4
or	eax, edx
mov	edx, eax
shr	edx, 8
or	eax, edx
mov	edx, eax
shr	edx, 10h
or	edx, eax
inc	edx
mov	[esp+30h+var_1C], ecx
mov	[esp+30h+var_14], edx
cmp	ecx, edx
jnb	loc_81E338

loc_81E287:
mov	eax, [ebx+0Ch]
mov	edi, [eax+ecx*4]
test	edi, edi
jz	loc_81E318

loc_81E295:
mov	eax, [edi+8]
mov	ecx, eax
shr	ecx, 18h
and	ecx, 0Fh
jz	short loc_81E2F6
mov	edx, [edi]
shr	eax, 1Ch
cmp	[esp+30h+var_18], 0
mov	[esp+30h+var_8], eax
mov	eax, [edi+4]
mov	[esp+30h+var_10], ecx
mov	[esp+30h+var_C], edx
mov	[esp+30h+var_4], eax
jnz	short loc_81E2C6
cmp	ecx, 4
jnz	short loc_81E2D2

loc_81E2C6:
lea	ecx, [esp+30h+var_10]
push	ecx
mov	ecx, esi
call	sub_81F350

loc_81E2D2:
cmp	[esp+30h+var_20], 0
jnz	short loc_81E2EA
mov	edx, [edi+8]
and	edx, 0F0000000h
cmp	edx, 40000000h
jnz	short loc_81E2F6

loc_81E2EA:
lea	eax, [esp+30h+var_8]
push	eax
mov	ecx, esi
call	sub_81F350

loc_81E2F6:
mov	edi, [edi+8]
and	edi, offset sub_FFFFFF
jnz	short loc_81E305
xor	eax, eax
jmp	short loc_81E30A

loc_81E305:
mov	eax, [ebx+0Ch]
add	eax, edi

loc_81E30A:
mov	edi, eax
test	eax, eax
jnz	short loc_81E295
mov	edx, [esp+30h+var_14]
mov	ecx, [esp+30h+var_1C]

loc_81E318:
mov	eax, [esi+14h]
lea	edi, ds:0[eax*8]
inc	ecx
sub	edi, eax
mov	eax, [esi+10h]
mov	[esp+30h+var_1C], ecx
mov	[eax+edi*4+0Ch], ecx
cmp	ecx, edx
jb	loc_81E287

loc_81E338:
dec	dword ptr [esi+14h]

loc_81E33B:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn	8
sub_81DF60 endp

align 10h



sub_81E350 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+24h+arg_4]
mov	esi, ecx
test	edi, edi
jnz	loc_81E565
mov	ebx, [esp+24h+arg_0]
test	byte ptr [ebx-4], 1
jnz	loc_81E78F
mov	eax, [esi+14h]
mov	ebp, [esi+18h]
lea	ecx, [eax+1]
cmp	ecx, ebp
mov	[esp+24h+arg_0], eax
mov	[esi+14h], ecx
jl	loc_81E4A2
mov	ecx, [esi+8]
lea	eax, [ebp+20h]
lea	edi, ds:0[eax*8]
sub	edi, eax
add	edi, edi
add	edi, edi
push	edi
call	sub_82CFF0
mov	[esp+24h+arg_4], eax
test	eax, eax
jnz	short loc_81E3CE
lea	esp, [esp+0]

loc_81E3B0:
mov	eax, [esi+4]
push	edi
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	edi
call	sub_82CFF0
mov	[esp+24h+arg_4], eax
test	eax, eax
jz	short loc_81E3B0

loc_81E3CE:
mov	edx, [esi+10h]
lea	ecx, ds:0[ebp*8]
sub	ecx, ebp
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, [esi+10h]
mov	edx, [edi-4]
mov	ecx, [esi+8]
sub	edi, 4
shr	edx, 3
add	esp, 0Ch
cmp	edx, 80h
jnb	short loc_81E407
mov	eax, edx
shr	eax, 3
jmp	short loc_81E466

loc_81E407:
cmp	edx, 400h
jnb	short loc_81E419
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_81E466

loc_81E419:
cmp	edx, 1000h
jnb	short loc_81E42B
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_81E466

loc_81E42B:
cmp	edx, 2000h
jnb	short loc_81E43D
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_81E466

loc_81E43D:
cmp	edx, 20000h
jnb	short loc_81E44F
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_81E466

loc_81E44F:
cmp	edx, 1A0000h
jnb	short loc_81E461
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_81E466

loc_81E461:
mov	eax, 7Fh

loc_81E466:
sub	[ecx+4], edx
lea	ebp, ds:0[edx*8]
mov	[edi], ebp
cmp	eax, 5Dh
jb	short loc_81E488
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_81E488
push	edi
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_81E493

loc_81E488:
mov	edx, [ecx+eax*4+10h]
mov	[edi+4], edx
mov	[ecx+eax*4+10h], edi

loc_81E493:
mov	eax, [esp+24h+arg_4]
add	dword ptr [esi+18h], 20h
mov	[esi+10h], eax
mov	eax, [esp+24h+arg_0]

loc_81E4A2:
mov	edx, [esi+10h]
inc	eax
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	edi, [edx+ecx*4]
mov	dword ptr [edi], 5
mov	[edi+4], ebx
mov	dword ptr [edi+8], 7
mov	dword ptr [edi+0Ch], 0
mov	eax, [ebx+10h]
mov	[edi+14h], eax
mov	ecx, [ebx+0Ch]
push	ebx
mov	[edi+18h], ecx
call	sub_823310
add	esp, 4
mov	[edi+10h], eax
test	eax, eax
jz	short loc_81E4EE
push	eax
push	ebx
mov	ecx, esi
call	sub_81D9E0

loc_81E4EE:
mov	ecx, 1
or	[ebx-4], ecx
or	ebp, 0FFFFFFFFh
add	[esi+4Ch], ebp
cmp	dword ptr [ebx+18h], 0
jbe	short loc_81E50E
mov	eax, [ebx+10h]
or	[eax-4], ecx
sub	eax, 4
add	[esi+4Ch], ebp

loc_81E50E:
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_81E51B
or	[eax-4], ecx
add	[esi+4Ch], ebp

loc_81E51B:
mov	eax, [ebx]
test	eax, eax
jz	short loc_81E54B
or	[eax-4], ecx
add	[esi+4Ch], ebp
mov	edx, [ebx]
mov	eax, [edx+88h]
push	0
push	eax
mov	ecx, esi
call	sub_81E7A0
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	edi, [edx+ecx*4]

loc_81E54B:
mov	eax, [esi+50h]
cmp	eax, ebp
jz	short loc_81E595
cmp	dword ptr [esi+4Ch], 0
jg	short loc_81E595
mov	[esi+4Ch], eax
mov	eax, [esi]
push	1		; int
push	eax		; int *
call	_longjmp

loc_81E565:
mov	ebx, [edi+4]
mov	ecx, [ebx+10h]
cmp	ecx, [edi+14h]
jnz	short loc_81E578
mov	edx, [ebx+0Ch]
cmp	edx, [edi+18h]
jz	short loc_81E592

loc_81E578:
mov	dword ptr [edi+8], 7
mov	dword ptr [edi+0Ch], 0
mov	eax, [ebx+10h]
mov	[edi+14h], eax
mov	ecx, [ebx+0Ch]
mov	[edi+18h], ecx

loc_81E592:
or	ebp, 0FFFFFFFFh

loc_81E595:
mov	eax, [edi+10h]
mov	ecx, eax
shr	ecx, 1
not	ecx
not	eax
and	ecx, 1
and	eax, 1
cmp	dword ptr [edi+8], 7
mov	[esp+24h+arg_0], ecx
mov	[esp+24h+var_14], eax
jnz	loc_81E6D4
mov	eax, [ebx+18h]
mov	ebp, [edi+0Ch]
mov	[esp+24h+var_10], eax
cmp	ebp, eax
jnb	loc_81E6C3
lea	ebx, [ebx+0]

loc_81E5D0:
cmp	[esp+24h+var_14], 0
jnz	short loc_81E60E
mov	eax, [ebx+18h]
mov	edx, ebp
shr	edx, 1
lea	ecx, [edx+eax*4]
mov	edx, [ebx+10h]
mov	cl, [ecx+edx]
mov	eax, ebp
and	eax, 1
mov	dl, al
neg	al
shr	al, 1
mov	byte ptr [esp+24h+arg_4], cl
and	al, byte ptr [esp+24h+arg_4]
dec	dl
shr	cl, 4
and	dl, cl
and	al, 0Fh
or	dl, al
cmp	dl, 4
jnz	loc_81E69F

loc_81E60E:
mov	ecx, [ebx+18h]
mov	eax, ebp
shr	eax, 1
lea	eax, [eax+ecx*4]
mov	ecx, [ebx+10h]
mov	cl, [eax+ecx]
mov	[esp+24h+arg_4], eax
mov	eax, ebp
and	eax, 1
movzx	edi, cl
mov	dl, al
dec	dl
movzx	ecx, dl
mov	edx, edi
shr	edx, 4
and	ecx, edx
movzx	edx, al
neg	dl
shr	edx, 1
and	edx, 0Fh
and	edx, edi
or	ecx, edx
cmp	ecx, 4
jz	short loc_81E664
cmp	ecx, 8
jz	short loc_81E664
cmp	ecx, 5
jz	short loc_81E664
cmp	ecx, 7
jz	short loc_81E664
cmp	ecx, 9
jz	short loc_81E664
cmp	ecx, 0Ah
jnz	short loc_81E69F

loc_81E664:
mov	ecx, [ebx+10h]
mov	edx, [ecx+ebp*4]
mov	[esp+24h+var_4], edx
mov	edx, [esp+24h+arg_4]
movzx	edi, byte ptr [ecx+edx]
mov	cl, al
neg	al
dec	cl
movzx	edx, cl
mov	ecx, edi
shr	ecx, 4
shr	eax, 1
and	edx, ecx
and	eax, 0Fh
and	eax, edi
or	edx, eax
mov	[esp+24h+var_8], edx
lea	edx, [esp+24h+var_8]
push	edx
mov	ecx, esi
call	sub_81F350

loc_81E69F:
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
inc	ebp
lea	edi, [edx+ecx*4]
mov	[edi+0Ch], ebp
cmp	ebp, [esp+24h+var_10]
jb	loc_81E5D0
mov	ecx, [esp+24h+arg_0]

loc_81E6C3:
mov	dword ptr [edi+8], 8
mov	dword ptr [edi+0Ch], 0
or	ebp, 0FFFFFFFFh

loc_81E6D4:
test	dword ptr [ebx+8], 0FFFFFFFh
jbe	short loc_81E6EA
mov	eax, [ebx+0Ch]
or	dword ptr [eax-4], 1
sub	eax, 4
add	[esi+4Ch], ebp

loc_81E6EA:
mov	ebp, [ebx+8]
and	ebp, 0FFFFFFFh
jbe	loc_81E78C
mov	edi, [edi+0Ch]
mov	ebx, [ebx+0Ch]
cmp	edi, ebp
jnb	loc_81E78C
lea	eax, [edi+edi*2]
lea	ebx, [ebx+eax*4+8]
mov	edi, edi

loc_81E710:
mov	eax, [ebx]
shr	eax, 1Ch
test	eax, eax
jz	short loc_81E771
test	ecx, ecx
jnz	short loc_81E722
cmp	eax, 4
jnz	short loc_81E73D

loc_81E722:
mov	ecx, [ebx-8]
mov	[esp+24h+var_4], ecx
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, esi
mov	[esp+28h+var_8], eax
call	sub_81F350
mov	ecx, [esp+24h+arg_0]

loc_81E73D:
cmp	[esp+24h+var_14], 0
jnz	short loc_81E74F
mov	dl, [ebx+3]
and	dl, 0Fh
cmp	dl, 4
jnz	short loc_81E771

loc_81E74F:
movzx	eax, byte ptr [ebx+3]
mov	ecx, [ebx-4]
and	eax, 0Fh
mov	[esp+24h+var_10], eax
lea	eax, [esp+24h+var_10]
mov	[esp+24h+var_C], ecx
push	eax
mov	ecx, esi
call	sub_81F350
mov	ecx, [esp+24h+arg_0]

loc_81E771:
mov	eax, [esi+14h]
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esi+10h]
inc	edi
add	ebx, 0Ch
mov	[eax+edx*4+0Ch], edi
cmp	edi, ebp
jb	short loc_81E710

loc_81E78C:
dec	dword ptr [esi+14h]

loc_81E78F:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	8
sub_81E350 endp

align 10h



sub_81E7A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, eax
test	eax, eax
jnz	short loc_81E7B2
mov	esi, [edx+4]

loc_81E7B2:
test	dword ptr [esi+8], 0F0000000h
pop	esi
mov	[esp+arg_4], edx
mov	[esp+arg_0], eax
jz	short loc_81E7C9
jmp	sub_81E350

loc_81E7C9:
jmp	sub_81DF60
sub_81E7A0 endp

align 10h



sub_81E7D0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+34h]
xor	ebp, ebp
push	edi
mov	ebx, ecx
lea	edi, [ebp+1]
test	eax, eax
jz	short loc_81E7EB
or	[eax-4], edi
mov	ebp, edi

loc_81E7EB:
mov	eax, [esi+38h]
test	eax, eax
jz	short loc_81E7F7
or	[eax-4], edi
add	ebp, edi

loc_81E7F7:
mov	eax, [esi+8]
test	eax, eax
jz	short loc_81E803
or	[eax-4], edi
add	ebp, edi

loc_81E803:
mov	eax, [esi+40h]
test	eax, eax
jz	short loc_81E838
or	[eax-4], edi
mov	ecx, [esi+3Ch]
test	ecx, ecx
jbe	short loc_81E838
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
jmp	short loc_81E820
align 10h

loc_81E820:
mov	eax, [esi+40h]
mov	eax, [edx+eax-0Ch]
or	[eax-4], edi
sub	edx, 0Ch
sub	eax, 4
sub	ecx, edi
test	ecx, ecx
jnz	short loc_81E820
add	ebp, ecx

loc_81E838:
mov	eax, [esi+30h]
test	eax, eax
jz	short loc_81E865
or	[eax-4], edi
xor	ecx, ecx
cmp	[esi+2Ch], ecx
jbe	short loc_81E865
lea	esp, [esp+0]

loc_81E850:
mov	edx, [esi+30h]
mov	eax, [edx+ecx*4]
or	[eax-4], edi
sub	eax, 4
add	ecx, edi
add	ebp, edi
cmp	ecx, [esi+2Ch]
jb	short loc_81E850

loc_81E865:
mov	eax, [esi+28h]
test	eax, eax
jz	short loc_81E871
add	ebp, edi
or	[eax-4], edi

loc_81E871:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_81E89E
or	[eax-4], edi
mov	ecx, [esi+0Ch]
test	ecx, ecx
jbe	short loc_81E89E

loc_81E882:
mov	eax, [esi+10h]
sub	ecx, edi
cmp	dword ptr [eax+ecx*8], 4
lea	eax, [eax+ecx*8]
jnz	short loc_81E898
mov	eax, [eax+4]
sub	eax, 4
or	[eax], edi

loc_81E898:
test	ecx, ecx
jnz	short loc_81E882
add	ebp, ecx

loc_81E89E:
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_81E8F2
or	[eax-4], edi
add	ebp, edi
mov	edi, [esi+14h]
mov	[esp+10h+arg_0], ebp
test	edi, edi
jbe	short loc_81E8F2
or	ebp, 0FFFFFFFFh
jmp	short loc_81E8C0
align 10h

loc_81E8C0:
mov	ecx, [esi+18h]
mov	eax, [ecx+edi*4-4]
or	dword ptr [eax-4], 1
add	[ebx+4Ch], ebp
mov	edx, [esi+18h]
dec	edi
sub	eax, 4
mov	eax, [edx+edi*4]
push	eax
mov	ecx, ebx
call	sub_81E7D0
test	edi, edi
jnz	short loc_81E8C0
mov	ecx, [esp+10h+arg_0]
sub	[ebx+4Ch], ecx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_81E8F2:
sub	[ebx+4Ch], ebp
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_81E7D0 endp

align 10h



sub_81E900 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	edi
mov	edi, [eax]
mov	ebx, [edi+2A4h]
add	edi, 2A0h
cmp	ebx, [esi+64h]
jz	short loc_81E926
mov	[esi+64h], ebx
mov	dword ptr [esi+60h], 0

loc_81E926:
mov	eax, [esi+60h]
xor	ebp, ebp
cmp	eax, ebx
jnb	short loc_81E983
nop

loc_81E930:
mov	ecx, [edi+4]
mov	edx, [edi]
dec	ecx
and	ecx, eax
mov	ecx, [edx+ecx*4]
test	ecx, ecx
jz	short loc_81E962
mov	dl, [ecx-4]
not	dl
test	dl, 1
jz	short loc_81E962
mov	ecx, [ecx-4]
shr	ecx, 2
test	cl, 1
jnz	short loc_81E962
push	eax
mov	ecx, edi
call	sub_81FD80
add	dword ptr [esi+4Ch], 0FFFFFFFBh
jmp	short loc_81E963

loc_81E962:
inc	eax

loc_81E963:
inc	ebp
mov	[esi+60h], eax
cmp	ebp, 4
jnz	short loc_81E97F
mov	ecx, [esi+4Ch]
dec	ecx
cmp	dword ptr [esi+50h], 0FFFFFFFFh
jz	short loc_81E97D
test	ecx, ecx
jle	short loc_81E98F
mov	[esi+4Ch], ecx

loc_81E97D:
xor	ebp, ebp

loc_81E97F:
cmp	eax, ebx
jb	short loc_81E930

loc_81E983:
pop	edi
mov	dword ptr [esi+60h], 0
pop	esi
pop	ebp
pop	ebx
retn

loc_81E98F:
mov	eax, [esi]
mov	edx, [esi+50h]
push	1		; int
push	eax		; int *
mov	[esi+4Ch], edx
call	_longjmp
sub_81E900 endp

align 10h



sub_81E9A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
push	edi
mov	edi, [eax+2B0h]
test	edi, edi
jz	short loc_81E9CD

loc_81E9B2:
push	edi
call	sub_81DC40
mov	edi, [edi+8]
add	esp, 4
test	edi, edi
jnz	short loc_81E9B2
mov	ecx, [esi]
mov	[ecx+2B0h], edi
pop	edi
pop	esi
retn

loc_81E9CD:
mov	edx, eax
pop	edi
mov	dword ptr [edx+2B0h], 0
pop	esi
retn
sub_81E9A0 endp

align 10h



sub_81E9E0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, ecx
mov	ebx, [edi+68h]
xor	ebp, ebp
test	ebx, ebx
jnz	short loc_81EA00
mov	eax, [esi]
mov	ebx, [eax+2B0h]
test	ebx, ebx
jz	short loc_81EA6B
nop

loc_81EA00:
mov	cl, [ebx-4]
not	cl
test	cl, 1
jz	short loc_81EA48
push	ebx
call	sub_81DC40
mov	eax, [edi+68h]
add	esp, 4
test	eax, eax
jz	short loc_81EA20
mov	edx, [ebx+8]
mov	[eax+8], edx

loc_81EA20:
mov	eax, [esi]
cmp	ebx, [eax+2B0h]
jnz	short loc_81EA33
mov	ecx, [ebx+8]
mov	[eax+2B0h], ecx

loc_81EA33:
mov	eax, [edi+4Ch]
sub	eax, 2
cmp	dword ptr [edi+50h], 0FFFFFFFFh
jz	short loc_81EA64
test	eax, eax
jle	short loc_81EA79
mov	[edi+4Ch], eax
jmp	short loc_81EA64

loc_81EA48:
inc	ebp
mov	[edi+68h], ebx
cmp	ebp, 3
jnz	short loc_81EA64
mov	eax, [edi+4Ch]
dec	eax
cmp	dword ptr [edi+50h], 0FFFFFFFFh
jz	short loc_81EA62
test	eax, eax
jle	short loc_81EA89
mov	[edi+4Ch], eax

loc_81EA62:
xor	ebp, ebp

loc_81EA64:
mov	ebx, [ebx+8]
test	ebx, ebx
jnz	short loc_81EA00

loc_81EA6B:
mov	dword ptr [edi+68h], 0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_81EA79:
mov	eax, [edi]
mov	edx, [edi+50h]
push	1		; int
push	eax		; int *
mov	[edi+4Ch], edx
call	_longjmp

loc_81EA89:
mov	edx, [edi]
mov	ecx, [edi+50h]
push	1		; int
push	edx		; int *
mov	[edi+4Ch], ecx
call	_longjmp
sub_81E9E0 endp

align 10h



sub_81EAA0 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ebp, [edi+4]
mov	esi, [ebp+4Ch]
add	ebp, 4Ch
xor	ebx, ebx
test	esi, esi
jz	short loc_81EAF0

loc_81EAB5:
mov	al, [esi-4]
not	al
test	al, 1
jz	short loc_81EADA
mov	ecx, [esi+28h]
push	ecx
push	esi
call	sub_832370
mov	edx, [esi+4Ch]
lea	eax, [esi+4Ch]
add	esp, 8
mov	[ebp+0], edx
add	dword ptr [edi+4Ch], 0FFFFFFFEh
jmp	short loc_81EAEA

loc_81EADA:
inc	ebx
lea	eax, [esi+4Ch]
mov	ebp, eax
cmp	ebx, 3
jnz	short loc_81EAEA
dec	dword ptr [edi+4Ch]
xor	ebx, ebx

loc_81EAEA:
mov	esi, [eax]
test	esi, esi
jnz	short loc_81EAB5

loc_81EAF0:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_81EAA0 endp

align 10h



sub_81EB00 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
mov	eax, [edx]
cmp	eax, 4
push	esi
mov	esi, ecx
jl	short loc_81EB3D
cmp	eax, 0Ah
jg	short loc_81EB3D
mov	eax, [edx+4]
mov	cl, [eax-4]
sub	eax, 4
not	cl
test	cl, 1
jz	short loc_81EB3D
mov	ecx, [esp+4+arg_0]
test	byte ptr [ecx-4], 1
jz	short loc_81EB3D
or	dword ptr [eax], 1
cmp	dword ptr [edx], 4
jz	short loc_81EB3D
push	edx
mov	ecx, esi
call	sub_81DA60

loc_81EB3D:
pop	esi
retn	8
sub_81EB00 endp

align 10h



sub_81EB50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
test	eax, eax
jnz	loc_81ED28
mov	ebp, [esp+10h+arg_0]
test	byte ptr [ebp-4], 1
jnz	loc_81EEC4	; default
mov	eax, [esi+14h]
mov	ebx, [esi+18h]
lea	ecx, [eax+1]
cmp	ecx, ebx
mov	[esp+10h+arg_4], eax
mov	[esi+14h], ecx
jl	loc_81ECA2
mov	ecx, [esi+8]
lea	eax, [ebx+20h]
lea	edi, ds:0[eax*8]
sub	edi, eax
add	edi, edi
add	edi, edi
push	edi
call	sub_82CFF0
mov	[esp+10h+arg_0], eax
test	eax, eax
jnz	short loc_81EBCE
lea	esp, [esp+0]

loc_81EBB0:
mov	eax, [esi+4]
push	edi
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	edi
call	sub_82CFF0
mov	[esp+10h+arg_0], eax
test	eax, eax
jz	short loc_81EBB0

loc_81EBCE:
mov	edx, [esi+10h]
lea	ecx, ds:0[ebx*8]
sub	ecx, ebx
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, [esi+10h]
mov	edx, [edi-4]
mov	ecx, [esi+8]
sub	edi, 4
shr	edx, 3
add	esp, 0Ch
cmp	edx, 80h
jnb	short loc_81EC07
mov	eax, edx
shr	eax, 3
jmp	short loc_81EC66

loc_81EC07:
cmp	edx, 400h
jnb	short loc_81EC19
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_81EC66

loc_81EC19:
cmp	edx, 1000h
jnb	short loc_81EC2B
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_81EC66

loc_81EC2B:
cmp	edx, 2000h
jnb	short loc_81EC3D
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_81EC66

loc_81EC3D:
cmp	edx, 20000h
jnb	short loc_81EC4F
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_81EC66

loc_81EC4F:
cmp	edx, 1A0000h
jnb	short loc_81EC61
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_81EC66

loc_81EC61:
mov	eax, 7Fh

loc_81EC66:
sub	[ecx+4], edx
lea	ebx, ds:0[edx*8]
mov	[edi], ebx
cmp	eax, 5Dh
jb	short loc_81EC88
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_81EC88
push	edi
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_81EC93

loc_81EC88:
mov	edx, [ecx+eax*4+10h]
mov	[edi+4], edx
mov	[ecx+eax*4+10h], edi

loc_81EC93:
mov	eax, [esp+10h+arg_0]
add	dword ptr [esi+18h], 20h
mov	[esi+10h], eax
mov	eax, [esp+10h+arg_4]

loc_81ECA2:
mov	edx, [esi+10h]
inc	eax
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]
mov	dword ptr [eax], 8
mov	[eax+4], ebp
mov	dword ptr [eax+8], 0
mov	ecx, [ebp+2Ch]
mov	[eax+0Ch], ecx
mov	ebx, 1
or	[ebp-4], ebx
or	edi, 0FFFFFFFFh
add	[esi+4Ch], edi
mov	ecx, [ebp+48h]
mov	edx, [esi+4Ch]
test	ecx, ecx
jz	short loc_81ECE9
or	[ecx-4], ebx
add	[esi+4Ch], edi
mov	edx, [esi+4Ch]

loc_81ECE9:
mov	ecx, [ebp+28h]
test	ecx, ecx
jz	short loc_81ECF9
or	[ecx-4], ebx
add	[esi+4Ch], edi
mov	edx, [esi+4Ch]

loc_81ECF9:
cmp	dword ptr [ebp+4], 0
jz	short loc_81ED0E
mov	ecx, [ebp+4]
or	[ecx-4], ebx
sub	ecx, 4
add	[esi+4Ch], edi
mov	edx, [esi+4Ch]

loc_81ED0E:
mov	ecx, [esi+50h]
add	[esi+24h], ebx
cmp	ecx, edi
jz	short loc_81ED30
test	edx, edx
jg	short loc_81ED30
mov	edx, [esi]
push	ebx		; int
push	edx		; int *
mov	[esi+4Ch], ecx
call	_longjmp

loc_81ED28:
mov	ebx, 1
or	edi, 0FFFFFFFFh

loc_81ED30:
mov	ecx, [eax+8]
mov	ebp, [eax+4]
mov	[esp+10h+arg_0], ebp
cmp	ecx, 6		; switch 7 cases
ja	loc_81EEC4	; default
jmp	ds:off_81EECC[ecx*4] ; switch jump

loc_81ED4A:		; jumptable 0081ED43 case 0
mov	edi, [eax+0Ch]
test	edi, edi
jz	short loc_81ED7E

loc_81ED51:
or	[edi-4], ebx
dec	dword ptr [esi+4Ch]
mov	eax, [edi+8]
push	eax
mov	ecx, esi
call	sub_81F350
mov	eax, [esi+14h]
mov	edx, [esi+10h]
mov	edi, [edi+0Ch]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]
mov	[eax+0Ch], edi
test	edi, edi
jnz	short loc_81ED51

loc_81ED7E:
mov	dword ptr [eax+8], 2
or	edi, 0FFFFFFFFh

loc_81ED88:		; jumptable 0081ED43 case 2
mov	[eax+8], ebx
mov	eax, [ebp+34h]
push	0
push	eax
mov	ecx, esi
call	sub_81E7A0
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]

loc_81EDAA:		; jumptable 0081ED43 case 1
mov	dword ptr [eax+8], 3
lea	eax, [ebp+54h]
push	eax
mov	ecx, esi
call	sub_81F350
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]

loc_81EDCE:		; jumptable 0081ED43 case 3
mov	edx, [ebp+0]
cmp	[edx+2B8h], ebp
jnz	loc_81EEC1	; jumptable 0081ED43 case 6
mov	ecx, [edx+348h]
or	[ecx-4], ebx
sub	ecx, 4
mov	ecx, [edx+350h]
or	[ecx-4], ebx
sub	ecx, 4
mov	ecx, [edx+358h]
sub	ecx, 4
or	[ecx], ebx
lea	edi, [edx+360h]
mov	ebp, 0Dh
jmp	short loc_81EE10
align 10h

loc_81EE10:
mov	ecx, [edi]
or	[ecx-4], ebx
sub	ecx, 4
add	edi, 8
sub	ebp, ebx
jnz	short loc_81EE10
add	edx, 2C0h
lea	edi, [ebp+11h]

loc_81EE28:
mov	ecx, [edx]
or	[ecx-4], ebx
sub	ecx, 4
add	edx, 8
sub	edi, ebx
jnz	short loc_81EE28
mov	dword ptr [eax+8], 4
mov	ecx, [esi+4Ch]
mov	edx, [esi+50h]
sub	ecx, 21h
cmp	edx, 0FFFFFFFFh
jz	short loc_81EE5F
test	ecx, ecx
jg	short loc_81EE5C
mov	eax, [esi]
push	ebx		; int
push	eax		; int *
mov	[esi+4Ch], edx
call	_longjmp

loc_81EE5C:
mov	[esi+4Ch], ecx

loc_81EE5F:
mov	ebp, [esp+10h+arg_0]
or	edi, 0FFFFFFFFh

loc_81EE66:		; jumptable 0081ED43 case 4
mov	dword ptr [eax+8], 5
mov	eax, [ebp+3Ch]
mov	ecx, eax
test	eax, eax
jnz	short loc_81EE7C
mov	ecx, large ds:4

loc_81EE7C:
test	dword ptr [ecx+8], 0F0000000h
push	0
push	eax
mov	ecx, esi
jz	short loc_81EE91
call	sub_81E350
jmp	short loc_81EE96

loc_81EE91:
call	sub_81DF60

loc_81EE96:
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]

loc_81EEA8:		; jumptable 0081ED43 case 5
mov	dword ptr [eax+8], 6
mov	eax, [ebp+0]
mov	eax, [eax+2A0h]
or	[eax-4], ebx
sub	eax, 4
add	[esi+4Ch], edi

loc_81EEC1:		; jumptable 0081ED43 case 6
add	[esi+14h], edi

loc_81EEC4:		; default
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_81EB50 endp

align 4
off_81EECC dd offset loc_81ED4A	; jump table for switch	statement
dd offset loc_81EDAA
dd offset loc_81ED88
dd offset loc_81EDCE
dd offset loc_81EE66
dd offset loc_81EEA8
dd offset loc_81EEC1
align 10h



sub_81EEF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
test	eax, eax
jnz	loc_81F0A7
mov	ecx, [esp+4+arg_0]
test	byte ptr [ecx-4], 1
jnz	loc_81F0EE
mov	eax, [esi+14h]
push	ebp
mov	ebp, [esi+18h]
lea	edx, [eax+1]
cmp	edx, ebp
mov	[esp+8+arg_4], eax
mov	[esi+14h], edx
jl	loc_81F039
mov	ecx, [esi+8]
push	ebx
push	edi
lea	eax, [ebp+20h]
lea	edi, ds:0[eax*8]
sub	edi, eax
add	edi, edi
add	edi, edi
push	edi
call	sub_82CFF0
mov	ebx, eax
test	ebx, ebx
jnz	short loc_81EF63

loc_81EF47:
mov	eax, [esi+4]
push	edi
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	edi
call	sub_82CFF0
mov	ebx, eax
test	ebx, ebx
jz	short loc_81EF47

loc_81EF63:
mov	edx, [esi+10h]
lea	ecx, ds:0[ebp*8]
sub	ecx, ebp
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, [esi+10h]
mov	edx, [edi-4]
mov	ecx, [esi+8]
sub	edi, 4
shr	edx, 3
add	esp, 0Ch
cmp	edx, 80h
jnb	short loc_81EF9C
mov	eax, edx
shr	eax, 3
jmp	short loc_81EFFB

loc_81EF9C:
cmp	edx, 400h
jnb	short loc_81EFAE
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_81EFFB

loc_81EFAE:
cmp	edx, 1000h
jnb	short loc_81EFC0
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_81EFFB

loc_81EFC0:
cmp	edx, 2000h
jnb	short loc_81EFD2
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_81EFFB

loc_81EFD2:
cmp	edx, 20000h
jnb	short loc_81EFE4
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_81EFFB

loc_81EFE4:
cmp	edx, 1A0000h
jnb	short loc_81EFF6
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_81EFFB

loc_81EFF6:
mov	eax, 7Fh

loc_81EFFB:
sub	[ecx+4], edx
lea	ebp, ds:0[edx*8]
mov	[edi], ebp
cmp	eax, 5Dh
jb	short loc_81F01D
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_81F01D
push	edi
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_81F028

loc_81F01D:
mov	edx, [ecx+eax*4+10h]
mov	[edi+4], edx
mov	[ecx+eax*4+10h], edi

loc_81F028:
add	dword ptr [esi+18h], 20h
mov	eax, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
pop	edi
mov	[esi+10h], ebx
pop	ebx

loc_81F039:
inc	eax
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esi+10h]
lea	eax, [eax+edx*4]
mov	dword ptr [eax], 7
mov	[eax+4], ecx
or	dword ptr [ecx-4], 1
dec	dword ptr [esi+4Ch]
mov	ecx, [ecx]
pop	ebp
test	ecx, ecx
jz	short loc_81F08C
test	dword ptr [ecx+8], 0F0000000h
push	0
push	ecx
mov	ecx, esi
jz	short loc_81F075
call	sub_81E350
jmp	short loc_81F07A

loc_81F075:
call	sub_81DF60

loc_81F07A:
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]

loc_81F08C:
mov	ecx, [esi+50h]
cmp	ecx, 0FFFFFFFFh
jz	short loc_81F0A7
cmp	dword ptr [esi+4Ch], 0
jg	short loc_81F0A7
mov	eax, [esi]
push	1		; int
push	eax		; int *
mov	[esi+4Ch], ecx
call	_longjmp

loc_81F0A7:
mov	eax, [eax+4]
dec	dword ptr [esi+14h]
cmp	dword ptr [eax+4], 0
jz	short loc_81F0EE
mov	ecx, [eax+4]
or	dword ptr [ecx-4], 1
sub	ecx, 4
mov	ecx, [eax+4]
mov	eax, [ecx+88h]
mov	ecx, eax
test	eax, eax
jnz	short loc_81F0D2
mov	ecx, large ds:4

loc_81F0D2:
test	dword ptr [ecx+8], 0F0000000h
push	0
push	eax
mov	ecx, esi
jz	short loc_81F0E9
call	sub_81E350
pop	esi
retn	8

loc_81F0E9:
call	sub_81DF60

loc_81F0EE:
pop	esi
retn	8
sub_81EEF0 endp

align 10h



sub_81F100 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
test	eax, eax
jnz	loc_81F28D
mov	ebx, [esp+10h+arg_0]
test	byte ptr [ebx-4], 1
jnz	loc_81F348
mov	eax, [esi+14h]
mov	ebp, [esi+18h]
lea	ecx, [eax+1]
cmp	ecx, ebp
mov	[esp+10h+arg_4], eax
mov	[esi+14h], ecx
jl	loc_81F247
mov	ecx, [esi+8]
lea	eax, [ebp+20h]
lea	edi, ds:0[eax*8]
sub	edi, eax
add	edi, edi
add	edi, edi
push	edi
call	sub_82CFF0
mov	ebx, eax
test	ebx, ebx
jnz	short loc_81F173

loc_81F157:
mov	eax, [esi+4]
push	edi
push	eax
call	sub_82C550
mov	ecx, [esi+8]
add	esp, 8
push	edi
call	sub_82CFF0
mov	ebx, eax
test	ebx, ebx
jz	short loc_81F157

loc_81F173:
mov	edx, [esi+10h]
lea	ecx, ds:0[ebp*8]
sub	ecx, ebp
add	ecx, ecx
add	ecx, ecx
push	ecx
push	edx
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edi, [esi+10h]
mov	edx, [edi-4]
mov	ecx, [esi+8]
sub	edi, 4
shr	edx, 3
add	esp, 0Ch
cmp	edx, 80h
jnb	short loc_81F1AC
mov	eax, edx
shr	eax, 3
jmp	short loc_81F20B

loc_81F1AC:
cmp	edx, 400h
jnb	short loc_81F1BE
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_81F20B

loc_81F1BE:
cmp	edx, 1000h
jnb	short loc_81F1D0
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_81F20B

loc_81F1D0:
cmp	edx, 2000h
jnb	short loc_81F1E2
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_81F20B

loc_81F1E2:
cmp	edx, 20000h
jnb	short loc_81F1F4
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_81F20B

loc_81F1F4:
cmp	edx, 1A0000h
jnb	short loc_81F206
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_81F20B

loc_81F206:
mov	eax, 7Fh

loc_81F20B:
sub	[ecx+4], edx
lea	ebp, ds:0[edx*8]
mov	[edi], ebp
cmp	eax, 5Dh
jb	short loc_81F22D
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_81F22D
push	edi
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_81F238

loc_81F22D:
mov	edx, [ecx+eax*4+10h]
mov	[edi+4], edx
mov	[ecx+eax*4+10h], edi

loc_81F238:
add	dword ptr [esi+18h], 20h
mov	eax, [esp+10h+arg_4]
mov	[esi+10h], ebx
mov	ebx, [esp+10h+arg_0]

loc_81F247:
mov	edx, [esi+10h]
inc	eax
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]
mov	dword ptr [eax], 9
mov	[eax+4], ebx
mov	dword ptr [eax+8], 0FFFFFFFEh
or	dword ptr [ebx-4], 1
mov	ecx, [esi+4Ch]
mov	edx, [esi+50h]
dec	ecx
cmp	edx, 0FFFFFFFFh
jz	short loc_81F29A
test	ecx, ecx
jg	short loc_81F288
mov	eax, [esi]
push	1		; int
push	eax		; int *
mov	[esi+4Ch], edx
call	_longjmp

loc_81F288:
mov	[esi+4Ch], ecx
jmp	short loc_81F29A

loc_81F28D:
mov	edi, [eax+8]
mov	ecx, [eax+4]
mov	ebx, ecx
cmp	edi, 0FFFFFFFEh
jnz	short loc_81F2D6

loc_81F29A:
mov	dword ptr [eax+8], 0FFFFFFFFh
mov	ecx, [ebx+4]
test	ecx, ecx
jz	short loc_81F2DB
test	dword ptr [ecx+8], 0F0000000h
push	0
push	ecx
mov	ecx, esi
jz	short loc_81F2BD
call	sub_81E350
jmp	short loc_81F2C2

loc_81F2BD:
call	sub_81DF60

loc_81F2C2:
mov	eax, [esi+14h]
lea	edx, ds:0[eax*8]
sub	edx, eax
mov	eax, [esi+10h]
lea	eax, [eax+edx*4]
jmp	short loc_81F2DB

loc_81F2D6:
cmp	edi, 0FFFFFFFFh
jnz	short loc_81F2E4

loc_81F2DB:
mov	ecx, [ebx+8]
movzx	edi, byte ptr [ecx]
mov	[eax+8], edi

loc_81F2E4:
test	edi, edi
jle	short loc_81F326
lea	ebp, [ebx+edi*4+18h]
lea	esp, [esp+0]

loc_81F2F0:
dec	edi
sub	ebp, 4
mov	[eax+8], edi
mov	ecx, [ebp+0]
test	ecx, ecx
jz	short loc_81F322
or	dword ptr [ecx-4], 1
dec	dword ptr [esi+4Ch]
mov	edx, [ecx+8]
push	edx
mov	ecx, esi
call	sub_81F350
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]

loc_81F322:
test	edi, edi
jnz	short loc_81F2F0

loc_81F326:
or	ecx, 0FFFFFFFFh
add	[esi+14h], ecx
mov	eax, [ebx+8]
mov	dl, [eax-4]
not	dl
test	dl, 1
jz	short loc_81F348
or	dword ptr [eax-4], 1
add	[esi+4Ch], ecx
push	eax
mov	ecx, esi
call	sub_81E7D0

loc_81F348:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_81F100 endp

align 10h



sub_81F350 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax]
add	edx, 0FFFFFFFCh	; switch 7 cases
cmp	edx, 6
ja	short locret_81F3DC ; default
			; jumptable 0081F35E case 6
jmp	ds:off_81F3E0[edx*4] ; switch jump

loc_81F365:		; jumptable 0081F35E case 4
mov	eax, [eax+4]
mov	dl, [eax-4]
not	dl
test	dl, 1
jz	short locret_81F3DC ; default
			; jumptable 0081F35E case 6
or	dword ptr [eax-4], 1
mov	eax, [ecx+4Ch]
mov	edx, [ecx+50h]
dec	eax
cmp	edx, 0FFFFFFFFh
jz	short locret_81F3DC ; default
			; jumptable 0081F35E case 6
test	eax, eax
jg	short loc_81F393
mov	eax, [ecx]
push	1		; int
push	eax		; int *
mov	[ecx+4Ch], edx
call	_longjmp

loc_81F393:
mov	[ecx+4Ch], eax
retn	4

loc_81F399:		; jumptable 0081F35E case 8
mov	edx, [eax+4]
push	0
push	edx
call	sub_81EB50
retn	4

loc_81F3A7:		; jumptable 0081F35E case 5
mov	eax, [eax+4]
push	0
push	eax
call	sub_81E7A0
retn	4

loc_81F3B5:		; jumptable 0081F35E case 7
mov	edx, [eax+4]
push	0
push	edx
call	sub_81EEF0
retn	4

loc_81F3C3:		; jumptable 0081F35E case 9
mov	eax, [eax+4]
push	0
push	eax
call	sub_81F100
retn	4

loc_81F3D1:		; jumptable 0081F35E case 10
mov	edx, [eax+4]
push	0
push	edx
call	sub_81DD70

locret_81F3DC:		; default
retn	4		; jumptable 0081F35E case 6
sub_81F350 endp

align 10h
off_81F3E0 dd offset loc_81F365	; jump table for switch	statement
dd offset loc_81F3A7
dd offset locret_81F3DC
dd offset loc_81F3B5
dd offset loc_81F399
dd offset loc_81F3C3
dd offset loc_81F3D1
align 10h



sub_81F400 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+20h]
test	esi, esi
jz	short loc_81F42F
jmp	short loc_81F410
align 10h

loc_81F410:
mov	eax, [esi+4]
and	dword ptr [eax-4], 0FFFFFFFEh
sub	eax, 4
push	esi
mov	ecx, edi
call	sub_81F350
mov	eax, [esi+8]
mov	[edi+20h], eax
mov	esi, [esi+8]
test	esi, esi
jnz	short loc_81F410

loc_81F42F:
pop	edi
pop	esi
retn
sub_81F400 endp

align 10h



sub_81F440 proc	near
push	ebp
mov	ebp, ecx
push	edi
mov	edi, [ebp+4]
mov	dword ptr [ebp+24h], 0
test	edi, edi
jz	short loc_81F479
push	esi

loc_81F453:
test	byte ptr [edi-4], 1
jz	short loc_81F471
mov	esi, [edi+28h]
cmp	esi, [edi+1Ch]
jnb	short loc_81F471

loc_81F461:
push	esi
mov	ecx, ebp
call	sub_81F350
add	esi, 8
cmp	esi, [edi+1Ch]
jb	short loc_81F461

loc_81F471:
mov	edi, [edi+4Ch]
test	edi, edi
jnz	short loc_81F453
pop	esi

loc_81F479:
pop	edi
pop	ebp
retn
sub_81F440 endp

align 10h


; Attributes: bp-based frame

sub_81F480 proc	near

var_64=	byte ptr -64h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	qword ptr -18h
var_10=	qword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

push	ebp
mov	ebp, esp
sub	esp, 64h
push	ebx
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
mov	[ebp+var_8], esi
cmp	[esi+44h], edi
jz	short loc_81F49E
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_81F49E:
mov	eax, [esi+4]
push	eax
call	sub_81B350
rdtsc
lea	ecx, [ebp+var_64]
mov	dword ptr [ebp+var_18+4], edx
mov	edx, ecx
push	edi
push	edx
mov	dword ptr [ebp+var_18],	eax
mov	[esi], ecx
mov	dword ptr [ebp+var_10+4], edi
call	__setjmp3
mov	esi, [ebp+var_8]
add	esp, 0Ch
test	eax, eax
jnz	loc_81F751
mov	eax, [esi+0Ch]
cmp	eax, 6		; switch 7 cases
ja	loc_81F74A	; default
jmp	ds:off_81F778[eax*4] ; switch jump

loc_81F4E1:		; jumptable 0081F4DA case 0
mov	eax, [esi+4]
push	edi
push	eax
mov	ecx, esi
mov	dword ptr [esi+14h], 0FFFFFFFFh
mov	dword ptr [esi+0Ch], 1
call	sub_81EB50

loc_81F4FB:		; jumptable 0081F4DA case 1
cmp	[esi+14h], edi
jl	short loc_81F57C
mov	ebx, 0F0000000h
jmp	short loc_81F510
align 10h

loc_81F510:
mov	eax, [esi+14h]
mov	edx, [esi+10h]
lea	ecx, ds:0[eax*8]
sub	ecx, eax
lea	eax, [edx+ecx*4]
mov	ecx, [eax]
add	ecx, 0FFFFFFFBh	; switch 6 cases
cmp	ecx, 5
ja	short loc_81F577 ; default
			; jumptable 0081F52C case 6
jmp	ds:off_81F794[ecx*4] ; switch jump

loc_81F533:		; jumptable 0081F52C case 8
push	eax
push	edi
mov	ecx, esi
call	sub_81EB50
jmp	short loc_81F577 ; default
			; jumptable 0081F52C case 6

loc_81F53E:		; jumptable 0081F52C case 5
mov	ecx, [eax+4]
test	[ecx+8], ebx
push	eax
push	edi
mov	ecx, esi
jz	short loc_81F551
call	sub_81E350
jmp	short loc_81F577 ; default
			; jumptable 0081F52C case 6

loc_81F551:
call	sub_81DF60
jmp	short loc_81F577 ; default
			; jumptable 0081F52C case 6

loc_81F558:		; jumptable 0081F52C case 7
push	eax
push	edi
mov	ecx, esi
call	sub_81EEF0
jmp	short loc_81F577 ; default
			; jumptable 0081F52C case 6

loc_81F563:		; jumptable 0081F52C case 9
push	eax
push	edi
mov	ecx, esi
call	sub_81F100
jmp	short loc_81F577 ; default
			; jumptable 0081F52C case 6

loc_81F56E:		; jumptable 0081F52C case 10
push	eax
push	edi
mov	ecx, esi
call	sub_81DD70

loc_81F577:		; default
cmp	[esi+14h], edi	; jumptable 0081F52C case 6
jge	short loc_81F510

loc_81F57C:
mov	ecx, esi
call	sub_81F400
cmp	[esi+28h], edi
lea	eax, [esi+28h]
jz	short loc_81F593
push	eax
mov	ecx, esi
call	sub_81F350

loc_81F593:
mov	edx, [esi+4]
mov	eax, [edx]
mov	eax, [eax+470h]
cmp	eax, edi
jz	short loc_81F5A9
or	dword ptr [eax-4], 1
dec	dword ptr [esi+4Ch]

loc_81F5A9:
mov	edi, 3D0h
mov	edi, edi

loc_81F5B0:
mov	ecx, [esi+4]
mov	edx, [ecx]
add	edx, edi
push	edx
mov	ecx, esi
call	sub_81F350
add	edi, 8
cmp	edi, 410h
jl	short loc_81F5B0
lea	ebx, [ebx+0]

loc_81F5D0:
mov	ecx, esi
call	sub_81F440
cmp	dword ptr [esi+24h], 0
jg	short loc_81F5D0
mov	eax, [esi+8]
mov	dword ptr [eax+0Ch], 1
mov	eax, [esi+10h]
or	dword ptr [eax-4], 1
sub	eax, 4
mov	dword ptr [esi+0Ch], 2
xor	edi, edi

loc_81F5FA:		; jumptable 0081F4DA case 2
mov	ecx, esi
call	sub_81E900
mov	dword ptr [esi+0Ch], 3

loc_81F608:		; jumptable 0081F4DA case 3
mov	ecx, [esi+4]
push	ecx
mov	ecx, esi
call	sub_81E9E0
mov	dword ptr [esi+0Ch], 4

loc_81F61A:		; jumptable 0081F4DA case 4
mov	ecx, esi
call	sub_81EAA0
mov	ecx, esi
call	sub_81DAB0
mov	edx, [esi+8]
mov	[edx+0Ch], edi
mov	eax, [esi+8]
mov	dword ptr [esi+0Ch], 5
mov	ecx, [eax+214h]
mov	edx, [ecx]
add	edx, ecx
lea	edi, [ecx+8]
mov	[eax+220h], ecx
mov	[eax+224h], edx
mov	[ebp+var_1C], edi
mov	[eax+228h], edi
mov	[ebp+var_24], ecx
mov	[ebp+var_20], edx
xor	edi, edi

loc_81F662:		; jumptable 0081F4DA case 5
cmp	dword ptr [esi+50h], 0FFFFFFFFh
mov	ecx, [esi+4Ch]
setnz	al
mov	byte ptr [ebp+var_4], al
mov	edx, [ebp+var_4]
mov	eax, [esi+4]
push	ecx
mov	ecx, [esi+8]
push	edx
push	eax
call	sub_82D010
test	al, al
jnz	short loc_81F69C
mov	eax, [esi+50h]
mov	[esi+4Ch], edi
cmp	eax, 0FFFFFFFFh
jz	short loc_81F69C
mov	ecx, [esi]
push	1		; int
push	ecx		; int *
mov	[esi+4Ch], eax
call	_longjmp

loc_81F69C:
mov	dword ptr [esi+0Ch], 6

loc_81F6A3:		; jumptable 0081F4DA case 6
mov	edx, [esi+34h]
add	edx, [esi+30h]
mov	eax, [esi+18h]
mov	ebx, [esi+6Ch]
lea	ecx, ds:0[eax*8]
shl	edx, 4
sub	ecx, eax
lea	edx, [edx+ecx*8+0B08h]
mov	[esi+5Ch], edx
mov	[esi+30h], edi
mov	[esi+34h], edi
cmp	ebx, edi
jz	short loc_81F6FF
mov	eax, [esi+8]
mov	ecx, [eax+4]
mov	edi, [eax]
mov	eax, ecx
imul	eax, 64h
xor	edx, edx
div	edi
cmp	eax, ebx
jbe	short loc_81F6FD
mov	edx, [esi+4]
mov	ebx, [edx]
push	eax
mov	eax, [ebx+494h]
push	edi
push	ecx
push	offset aLowMemoryWarni ; "Low memory warning: %d out of	%d (%d%%)"...
push	edx
call	eax
add	esp, 14h

loc_81F6FD:
xor	edi, edi

loc_81F6FF:
mov	ecx, [esi+8]
fild	dword ptr [esi+38h]
mov	edx, [ecx+4]
fdiv	ds:dbl_15FCBF8
fild	dword ptr [ecx+4]
test	edx, edx
jge	short loc_81F71B
fadd	ds:dbl_15FCE08

loc_81F71B:
mov	ecx, [esi+4]
fnstcw	word ptr [ebp+var_4+2]
movzx	eax, word ptr [ebp+var_4+2]
fmulp	st(1), st
or	eax, 0C00h
mov	dword ptr [ebp+var_10+4], eax
mov	[esi+0Ch], edi
fldcw	word ptr [ebp+var_10+4]
fistp	[ebp+var_10]
mov	eax, dword ptr [ebp+var_10]
mov	[esi+54h], eax
mov	edx, [ecx]
mov	byte ptr [edx+490h], 1
fldcw	word ptr [ebp+var_4+2]

loc_81F74A:		; default
mov	edi, 1
jmp	short loc_81F754

loc_81F751:
mov	edi, dword ptr [ebp+var_10+4]

loc_81F754:
mov	ecx, [esi+4]
mov	ecx, [ecx]
rdtsc
sub	eax, dword ptr [ebp+var_18]
sbb	edx, dword ptr [ebp+var_18+4]
add	[ecx+488h], eax
mov	eax, edi
pop	edi
adc	[ecx+48Ch], edx
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_81F480 endp

align 4
off_81F778 dd offset loc_81F4E1	; jump table for switch	statement
dd offset loc_81F4FB
dd offset loc_81F5FA
dd offset loc_81F608
dd offset loc_81F61A
dd offset loc_81F662
dd offset loc_81F6A3
off_81F794 dd offset loc_81F53E	; jump table for switch	statement
dd offset loc_81F577
dd offset loc_81F558
dd offset loc_81F533
dd offset loc_81F563
dd offset loc_81F56E
align 10h



sub_81F7B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+48h]
test	eax, eax
jz	short loc_81F7CD
mov	ecx, [esi+4]
push	ecx
call	eax
add	esp, 4
test	eax, eax
jz	short loc_81F7CD
xor	eax, eax
pop	esi
retn	4

loc_81F7CD:
mov	eax, [esp+4+arg_0]
push	edi
mov	edi, [esi+50h]
test	eax, eax
jz	short loc_81F7DC
mov	[esi+50h], eax

loc_81F7DC:
mov	edx, [esi+50h]
mov	ecx, esi
mov	[esi+4Ch], edx
call	sub_81F480
mov	[esi+50h], edi
pop	edi
pop	esi
retn	4
sub_81F7B0 endp

align 10h



sub_81F800 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax-4]
shr	ecx, 2
test	cl, 1
jnz	short loc_81F862
mov	edx, [esi+8]
push	eax
mov	[edx], eax
mov	eax, [esi]
push	eax
call	sub_82CB70
mov	ecx, [esi+90h]
mov	eax, [esi+8]
add	ecx, 7Ch
add	esp, 8
cmp	eax, ecx
jnz	short loc_81F85C
mov	eax, [esi]
push	84h
push	eax
call	sub_82C6B0
mov	edx, [esi+90h]
mov	[eax+80h], edx
add	esp, 8
mov	[esi+90h], eax
mov	[esi+8], eax
pop	esi
retn	4

loc_81F85C:
add	eax, 4
mov	[esi+8], eax

loc_81F862:
pop	esi
retn	4
sub_81F800 endp

align 10h



sub_81F870 proc	near
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
sub	esi, 4
cmp	esi, [edi+90h]
jb	short loc_81F89C

loc_81F883:
mov	eax, [esi]
mov	ecx, [edi]
push	eax
push	ecx
call	sub_82CB80
sub	esi, 4
add	esp, 8
cmp	esi, [edi+90h]
jnb	short loc_81F883

loc_81F89C:
mov	edx, [edi+90h]
mov	ebp, [edx+80h]
test	ebp, ebp
jz	short loc_81F8FE
mov	ecx, [edi]
mov	eax, edx
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
test	ebp, ebp
jz	short loc_81F8FE
push	ebx
nop

loc_81F8C0:
lea	ebx, [ebp+80h]
mov	esi, ebp
cmp	ebp, ebx
jnb	short loc_81F8E5
lea	esp, [esp+0]

loc_81F8D0:
mov	edx, [esi]
mov	eax, [edi]
push	edx
push	eax
call	sub_82CB80
add	esi, 4
add	esp, 8
cmp	esi, ebx
jb	short loc_81F8D0

loc_81F8E5:
mov	ebx, [ebx]
test	ebx, ebx
jz	short loc_81F8F7
mov	ecx, [edi]
push	ebp
push	ecx
call	sub_82C6D0
add	esp, 8

loc_81F8F7:
mov	ebp, ebx
test	ebx, ebx
jnz	short loc_81F8C0
pop	ebx

loc_81F8FE:
pop	edi
pop	esi
pop	ebp
retn
sub_81F870 endp

align 10h



sub_81F910 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	ecx, [eax+4]
mov	edx, [esp+8+arg_8]
mov	eax, [eax]
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_4]
dec	ecx
push	esi
mov	esi, ecx
and	esi, edx
push	edi
mov	edi, [eax+esi*4]
mov	ebx, edx
mov	[esp+18h+var_8], ecx
mov	[esp+18h+var_4], eax
test	edi, edi
jz	short loc_81F9A7
lea	ebx, [ebx+0]

loc_81F940:
cmp	[edi+4], edx
jnz	short loc_81F99B
cmp	[edi], ebp
jnz	short loc_81F99B
mov	esi, [esp+18h+arg_0]
mov	ecx, ebp
lea	edx, [edi+8]
cmp	ebp, 4
jb	short loc_81F96B

loc_81F957:
mov	eax, [esi]
cmp	eax, [edx]
jnz	short loc_81F98F
sub	ecx, 4
add	edx, 4
add	esi, 4
cmp	ecx, 4
jnb	short loc_81F957

loc_81F96B:
test	ecx, ecx
jz	short loc_81F9B1
mov	al, [edx]
cmp	al, [esi]
jnz	short loc_81F98F
cmp	ecx, 1
jbe	short loc_81F9B1
mov	al, [edx+1]
cmp	al, [esi+1]
jnz	short loc_81F98F
cmp	ecx, 2
jbe	short loc_81F9B1
mov	cl, [edx+2]
cmp	cl, [esi+2]
jz	short loc_81F9B1

loc_81F98F:
mov	edx, [esp+18h+arg_8]
mov	ecx, [esp+18h+var_8]
mov	eax, [esp+18h+var_4]

loc_81F99B:
inc	ebx
mov	esi, ecx
and	esi, ebx
mov	edi, [eax+esi*4]
test	edi, edi
jnz	short loc_81F940

loc_81F9A7:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 8
retn

loc_81F9B1:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
sub_81F910 endp

align 10h



sub_81F9C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
push	edi
mov	esi, ecx
lea	edi, ds:0[eax*4]
mov	[esi+4], eax
mov	eax, [esp+8+arg_0]
push	edi
push	eax
mov	dword ptr [esi+8], 0
call	sub_82C5B0
push	edi		; size_t
push	0		; int
push	eax		; void *
mov	[esi], eax
call	_memset
add	esp, 14h
pop	edi
mov	dword ptr [esi+0Ch], 0
pop	esi
retn	8
sub_81F9C0 endp

align 10h



sub_81FA00 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	94h
push	edi
mov	esi, ecx
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_81FA38
mov	ecx, [esi+0Ch]
mov	[eax+4], ecx
lea	ecx, [eax+0Ch]
mov	[eax], edi
mov	dword ptr [eax+8Ch], 0
mov	[eax+90h], ecx
mov	[eax+8], ecx

loc_81FA38:
pop	edi
mov	[esi+0Ch], eax
pop	esi
retn	4
sub_81FA00 endp




sub_81FA40 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ebp, [esi]
lea	ebx, [eax+eax]
push	edi
mov	[esp+1Ch+var_4], eax
mov	eax, [esp+1Ch+arg_0]
lea	edi, ds:0[ebx*4]
push	edi
push	eax
mov	[esp+24h+var_C], ebp
call	sub_82C5B0
push	edi		; size_t
push	0		; int
push	eax		; void *
mov	[esi], eax
call	_memset
mov	ecx, [esp+30h+arg_0]
mov	edx, [ecx]
add	esp, 14h
cmp	dword ptr [edx+23Ch], 1
jnz	short loc_81FA90
mov	eax, [esi]
sub	eax, 4
or	dword ptr [eax], 1

loc_81FA90:
mov	[esi+4], ebx
xor	ebx, ebx
mov	[esp+1Ch+var_8], ebx
cmp	[esp+1Ch+var_4], ebx
jbe	short loc_81FAE3
nop

loc_81FAA0:
cmp	dword ptr [ebp+ebx*4+0], 0
jz	short loc_81FAD8
mov	edx, [ebp+ebx*4+0]
mov	eax, [esi+4]
mov	ecx, [edx+4]
mov	edi, [esi]
dec	eax
mov	ebp, eax
and	ebp, ecx
cmp	dword ptr [edi+ebp*4], 0
jz	short loc_81FACF
mov	ebx, edi

loc_81FAC0:
inc	ecx
mov	ebp, eax
and	ebp, ecx
cmp	dword ptr [ebx+ebp*4], 0
jnz	short loc_81FAC0
mov	ebx, [esp+1Ch+var_8]

loc_81FACF:
mov	ebp, [esp+1Ch+var_C]
and	eax, ecx
mov	[edi+eax*4], edx

loc_81FAD8:
inc	ebx
mov	[esp+1Ch+var_8], ebx
cmp	ebx, [esp+1Ch+var_4]
jb	short loc_81FAA0

loc_81FAE3:
mov	edx, [ebp-4]
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [eax]
add	ebp, 0FFFFFFFCh
shr	edx, 3
cmp	edx, 80h
jnb	short loc_81FB01
mov	eax, edx
shr	eax, 3
jmp	short loc_81FB60

loc_81FB01:
cmp	edx, 400h
jnb	short loc_81FB13
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_81FB60

loc_81FB13:
cmp	edx, 1000h
jnb	short loc_81FB25
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_81FB60

loc_81FB25:
cmp	edx, 2000h
jnb	short loc_81FB37
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_81FB60

loc_81FB37:
cmp	edx, 20000h
jnb	short loc_81FB49
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_81FB60

loc_81FB49:
cmp	edx, 1A0000h
jnb	short loc_81FB5B
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_81FB60

loc_81FB5B:
mov	eax, 7Fh

loc_81FB60:
sub	[ecx+4], edx
lea	esi, ds:0[edx*8]
mov	[ebp+0], esi
cmp	eax, 5Dh
jb	short loc_81FB8B
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_81FB8B
push	ebp
push	eax
push	edx
call	sub_82CAF0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4

loc_81FB8B:
mov	edx, [ecx+eax*4+10h]
pop	edi
mov	[ebp+4], edx
pop	esi
mov	[ecx+eax*4+10h], ebp
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4
sub_81FA40 endp




sub_81FBA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_8]
mov	edx, ebx
and	edx, 1Fh
push	ebp
mov	eax, edx
push	esi
mov	esi, [esp+0Ch+arg_4]
xor	eax, 736BC68Ch
push	edi
mov	ebp, ecx
cmp	edx, 4
jb	short loc_81FBFA
mov	ecx, edx
shr	ecx, 2
mov	[esp+10h+arg_8], ecx
jmp	short loc_81FBD0
align 10h

loc_81FBD0:
mov	ecx, [esi]
imul	eax, 5BD1E995h
imul	ecx, 5BD1E995h
mov	edi, ecx
shr	edi, 18h
xor	edi, ecx
imul	edi, 5BD1E995h
xor	eax, edi
add	esi, 4
sub	edx, 4
sub	[esp+10h+arg_8], 1
jnz	short loc_81FBD0

loc_81FBFA:
sub	edx, 1
jz	short loc_81FC1B
sub	edx, 1
jz	short loc_81FC12
sub	edx, 1
jnz	short loc_81FC28
movzx	ecx, byte ptr [esi+2]
shl	ecx, 10h
xor	eax, ecx

loc_81FC12:
movzx	edx, byte ptr [esi+1]
shl	edx, 8
xor	eax, edx

loc_81FC1B:
movzx	ecx, byte ptr [esi]
xor	ecx, eax
imul	ecx, 5BD1E995h
mov	eax, ecx

loc_81FC28:
mov	edx, [esp+10h+arg_4]
mov	ecx, eax
shr	ecx, 0Dh
xor	ecx, eax
imul	ecx, 5BD1E995h
mov	esi, ecx
shr	esi, 0Fh
xor	esi, ecx
push	esi
push	ebx
push	edx
mov	eax, ebp
call	sub_81F910
add	esp, 0Ch
test	eax, eax
jz	short loc_81FCA2
mov	ecx, [esp+10h+arg_0]
mov	edx, [ecx]
add	edx, 230h
cmp	dword ptr [edx+0Ch], 1
jz	loc_81FD13
test	byte ptr [eax-4], 1
lea	ecx, [eax-4]
jnz	loc_81FD13
mov	edx, [edx+8]
mov	esi, [edx+210h]
test	esi, esi
jz	short loc_81FC8F
cmp	esi, ecx
ja	short loc_81FC8F
or	dword ptr [ecx], 1
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_81FC8F:
mov	esi, [ecx]
mov	edx, [edx+0Ch]
and	esi, 0FFFFFFFEh
or	esi, edx
pop	edi
mov	[ecx], esi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_81FCA2:
mov	edx, [ebp+4]
mov	eax, [ebp+8]
mov	edi, [esp+10h+arg_0]
shr	edx, 1
inc	eax
cmp	eax, edx
jbe	short loc_81FCBB
push	edi
mov	ecx, ebp
call	sub_81FA40

loc_81FCBB:
lea	ecx, [ebx+0Ch]
push	ecx
push	edi
call	sub_82C5B0
mov	edx, [esp+18h+arg_4]
mov	edi, eax
push	ebx
push	edx
lea	eax, [edi+8]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	byte ptr [edi+ebx+8], 0
mov	[edi], ebx
mov	[edi+4], esi
mov	eax, [ebp+4]
mov	ecx, [ebp+0]
inc	dword ptr [ebp+8]
dec	eax
mov	edx, eax
and	edx, esi
add	esp, 14h
cmp	dword ptr [ecx+edx*4], 0
jz	short loc_81FD0C
mov	ebp, ecx
lea	esp, [esp+0]

loc_81FD00:
inc	esi
mov	edx, eax
and	edx, esi
cmp	dword ptr [ebp+edx*4+0], 0
jnz	short loc_81FD00

loc_81FD0C:
and	eax, esi
mov	[ecx+eax*4], edi
mov	eax, edi

loc_81FD13:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_81FBA0 endp

align 10h



sub_81FD20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_0]
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+8+arg_4]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_81FBA0
mov	ecx, [esi+0Ch]
mov	edi, eax
push	edi
call	sub_81F800
mov	eax, edi
pop	edi
pop	esi
retn	0Ch
sub_81FD20 endp

align 10h



sub_81FD50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
mov	edi, [ecx+4]
call	sub_81F870
mov	eax, [esi+0Ch]
mov	ecx, [esp+8+arg_0]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	[esi+0Ch], edi
pop	edi
pop	esi
retn	4
sub_81FD50 endp

align 10h



sub_81FD80 proc	near

var_F= byte ptr	-0Fh
var_E= byte ptr	-0Eh
var_D= byte ptr	-0Dh
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	edx, [ecx]
mov	eax, [esp+arg_0]
dec	dword ptr [ecx+8]
sub	esp, 10h
mov	dword ptr [edx+eax*4], 0
mov	edx, [ecx+4]
push	esi
mov	esi, [ecx]
push	edi
dec	edx
lea	edi, [eax+1]
and	edi, edx
cmp	dword ptr [esi+edi*4], 0
jz	loc_81FEBE
push	ebx
push	ebp
lea	ebp, [eax+2]
and	edx, ebp
cmp	dword ptr [esi+edx*4], 0
mov	[esp+20h+var_C], eax
jz	short loc_81FDCB
mov	edx, [ecx+4]
dec	edx
nop

loc_81FDC0:
inc	ebp
mov	edi, edx
and	edi, ebp
cmp	dword ptr [esi+edi*4], 0
jnz	short loc_81FDC0

loc_81FDCB:
lea	edi, [ebp-1]
mov	ebx, eax
mov	[esp+20h+var_8], ebx
cmp	edi, eax
jbe	loc_81FEBA
lea	esp, [esp+0]

loc_81FDE0:
mov	edx, [ecx+4]
mov	eax, [ecx]
lea	ebx, [edx-1]
and	ebx, edi
mov	ebx, [eax+ebx*4]
mov	ebx, [ebx+4]
lea	esi, [edx-1]
and	ebx, esi
cmp	ebp, edx
jnb	short loc_81FE02
mov	[esp+20h+var_F], 0
cmp	ebx, edi
jbe	short loc_81FE07

loc_81FE02:
mov	[esp+20h+var_F], 1

loc_81FE07:
mov	edx, esi
and	edx, ebp
cmp	[esp+20h+var_F], 0
mov	[esp+20h+var_4], edx
jnz	short loc_81FE23
cmp	ebx, [esp+20h+var_C]
ja	short loc_81FE23
mov	[esp+20h+var_E], 1
jmp	short loc_81FE40

loc_81FE23:
cmp	[esp+20h+var_F], 0
mov	[esp+20h+var_E], 0
jz	short loc_81FE40
cmp	ebx, [esp+20h+var_C]
ja	short loc_81FE40
mov	[esp+20h+var_D], 1
cmp	ebx, [esp+20h+var_4]
ja	short loc_81FE45

loc_81FE40:
mov	[esp+20h+var_D], 0

loc_81FE45:
cmp	[esp+20h+var_F], 0
jz	short loc_81FE60
cmp	ebx, [esp+20h+arg_0]
jb	short loc_81FE60
mov	edx, [esp+20h+var_C]
cmp	edx, [esp+20h+var_4]
jnb	short loc_81FE60
mov	dl, 1
jmp	short loc_81FE62

loc_81FE60:
xor	dl, dl

loc_81FE62:
cmp	[esp+20h+var_E], 0
jnz	short loc_81FE74
cmp	[esp+20h+var_D], 0
jnz	short loc_81FE74
test	dl, dl
jz	short loc_81FEAB

loc_81FE74:
mov	edx, esi
and	edx, [esp+20h+var_C]
and	esi, edi
mov	ebx, [eax+esi*4]
mov	[eax+edx*4], ebx
mov	ebx, [esp+20h+var_8]
mov	eax, [ecx]
mov	[esp+20h+var_C], edi
mov	dword ptr [eax+esi*4], 0
mov	edi, ebp
cmp	ebx, edx
jb	short loc_81FE9F
mov	ebx, edx
mov	[esp+20h+var_8], ebx

loc_81FE9F:
cmp	ebx, esi
jb	short loc_81FEAF
mov	ebx, esi
mov	[esp+20h+var_8], ebx
jmp	short loc_81FEAF

loc_81FEAB:
mov	ebx, [esp+20h+var_8]

loc_81FEAF:
dec	edi
cmp	edi, [esp+20h+var_C]
ja	loc_81FDE0

loc_81FEBA:
pop	ebp
mov	eax, ebx
pop	ebx

loc_81FEBE:
pop	edi
pop	esi
add	esp, 10h
retn	4
sub_81FD80 endp

align 10h



sub_81FED0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
mov	edi, ecx
push	edi
push	ebp
call	sub_822DF0
mov	[edi+4], eax
mov	edx, [ebp+0]
mov	ecx, 1
add	esp, 8
mov	[esp+14h+var_4], eax
cmp	[edx+23Ch], ecx
jnz	short loc_81FEFF
or	[eax-4], ecx

loc_81FEFF:
mov	ebx, 2C0h
mov	esi, eax
sub	ebx, eax
mov	[esp+14h+arg_0], 11h

loc_81FF10:
mov	eax, [ebp+0]
add	eax, ebx
test	dword ptr [edi+8], 0F0000000h
mov	eax, [eax+esi]
push	esi
mov	ecx, edi
push	eax
jz	short loc_81FF2C
call	sub_821EF0
jmp	short loc_81FF31

loc_81FF2C:
call	sub_8208C0

loc_81FF31:
add	esi, 8
sub	[esp+14h+arg_0], 1
jnz	short loc_81FF10
mov	eax, [esp+14h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_81FED0 endp

align 10h



sub_81FF50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax]
cmp	dword ptr [ecx+478h], 0
jnz	short loc_81FF68
mov	[esp+arg_0], eax
jmp	sub_820500

loc_81FF68:
mov	[esp+arg_0], eax
jmp	sub_821E00
sub_81FF50 endp

align 10h



sub_81FF80 proc	near

var_8= qword ptr -8
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	eax, [eax+8]
mov	ecx, eax
shr	ecx, 1
or	eax, ecx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	ecx, eax
shr	ecx, 4
or	eax, ecx
mov	edx, eax
shr	edx, 8
or	eax, edx
mov	edx, [esp+arg_8]
mov	ecx, eax
shr	ecx, 10h
or	ecx, eax
mov	eax, [edx]
dec	eax
sub	esp, 8
inc	ecx
cmp	eax, 6		; switch 7 cases
ja	short loc_820017 ; default
			; jumptable 0081FFB9 cases 1,4,5
jmp	ds:off_82002C[eax*4] ; switch jump

loc_81FFC0:		; jumptable 0081FFB9 case 3
mov	eax, [edx+4]
mov	eax, [eax+4]
dec	ecx
and	eax, ecx
add	esp, 8
retn

loc_81FFCD:		; jumptable 0081FFB9 case 2
fld	dword ptr [edx+4]
dec	ecx
fnstcw	word ptr [esp+8+arg_4]
movzx	eax, word ptr [esp+8+arg_4]
or	eax, 0C00h
mov	[esp+8+arg_8], eax
fldcw	word ptr [esp+8+arg_8]
fistp	[esp+8+var_8]
mov	eax, dword ptr [esp+8+var_8]
and	eax, ecx
fldcw	word ptr [esp+8+arg_4]
add	esp, 8
retn

loc_81FFF7:		; jumptable 0081FFB9 case 6
mov	eax, [edx+4]
add	eax, 10h
shr	eax, 2
imul	eax, 9E3779B1h
dec	ecx
and	eax, ecx
add	esp, 8
retn

loc_82000D:		; jumptable 0081FFB9 case 0
lea	eax, [ecx-1]
and	eax, [edx+4]
add	esp, 8
retn

loc_820017:		; default
mov	eax, [edx+4]	; jumptable 0081FFB9 cases 1,4,5
shr	eax, 2
imul	eax, 9E3779B1h
dec	ecx
and	eax, ecx
add	esp, 8
retn
sub_81FF80 endp

align 4
off_82002C dd offset loc_82000D	; jump table for switch	statement
dd offset loc_820017
dd offset loc_81FFCD
dd offset loc_81FFC0
dd offset loc_820017
dd offset loc_820017
dd offset loc_81FFF7
align 10h



sub_820050 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_4]
mov	eax, [esi+0Ch]
mov	ebx, [esi+8]
mov	[esp+1Ch+var_C], eax
mov	eax, ebx
mov	ecx, eax
shr	ecx, 1
or	eax, ecx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	ecx, eax
shr	ecx, 4
or	eax, ecx
mov	edx, eax
shr	edx, 8
or	eax, edx
mov	ecx, eax
shr	ecx, 10h
or	ecx, eax
inc	ecx
push	edi
mov	[esp+20h+var_10], ecx
test	ebx, ebx
jnz	short loc_82009A
lea	ebp, [ebx+4]
lea	edi, [ebx+8]
jmp	short loc_8200A0

loc_82009A:
lea	ebp, [ebx+ebx]
lea	edi, [ecx+ecx]

loc_8200A0:
mov	eax, [esp+20h+arg_0]
lea	edi, [edi+ebp*2]
add	edi, ebp
add	edi, edi
add	edi, edi
push	edi
push	eax
call	sub_82C5B0
mov	ecx, [esp+28h+arg_0]
mov	[esi+0Ch], eax
mov	edx, [ecx]
mov	ecx, 1
add	esp, 8
cmp	[edx+23Ch], ecx
jnz	short loc_8200D0
or	[eax-4], ecx

loc_8200D0:
mov	eax, [esi+0Ch]
push	edi		; size_t
push	0		; int
push	eax		; void *
call	_memset
add	esp, 0Ch
mov	dword ptr [esi+14h], 0
mov	[esi+8], ebp
test	ebx, ebx
jz	loc_820295
xor	eax, eax
mov	[esp+20h+arg_4], eax
cmp	[esp+20h+var_10], eax
jbe	loc_8201D4

loc_820101:
mov	ebp, [esp+20h+var_C]
mov	edi, [ebp+eax*4+0]
test	edi, edi
jz	loc_8201C3

loc_820111:
test	dword ptr [edi+8], 0F0000000h
jz	loc_8201AA
mov	eax, [esi+8]
mov	ecx, eax
shr	ecx, 1
or	eax, ecx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	ecx, eax
shr	ecx, 4
or	eax, ecx
mov	ecx, [esi+14h]
mov	edx, eax
shr	edx, 8
or	eax, edx
mov	edx, eax
shr	edx, 10h
or	edx, eax
lea	eax, [ecx+ecx*2]
add	edx, eax
mov	eax, [esi+0Ch]
inc	ecx
mov	[esi+14h], ecx
mov	ecx, [edi]
lea	ebx, [eax+edx*4+4]
mov	[ebx], ecx
mov	edx, [edi+4]
mov	[ebx+4], edx
mov	eax, [edi+8]
mov	[ebx+8], eax
movzx	ecx, byte ptr [edi+0Bh]
mov	edx, [edi]
and	ecx, 0Fh
lea	eax, [esp+20h+var_8]
push	eax
mov	[esp+24h+var_8], ecx
mov	ecx, [esp+24h+arg_0]
push	esi
push	ecx
mov	[esp+2Ch+var_4], edx
call	sub_81FF80
mov	edx, [esi+0Ch]
mov	ecx, [edx+eax*4]
add	esp, 0Ch
test	ecx, ecx
jz	short loc_820196
sub	ecx, edx

loc_820196:
mov	edx, [ebx+8]
xor	edx, ecx
and	edx, offset sub_FFFFFF
xor	[ebx+8], edx
mov	ecx, [esi+0Ch]
mov	[ecx+eax*4], ebx

loc_8201AA:
mov	edi, [edi+8]
and	edi, offset sub_FFFFFF
jz	short loc_8201B7
add	edi, ebp

loc_8201B7:
test	edi, edi
jnz	loc_820111
mov	eax, [esp+20h+arg_4]

loc_8201C3:
inc	eax
mov	[esp+20h+arg_4], eax
cmp	eax, [esp+20h+var_10]
jb	loc_820101
jmp	short loc_8201D8

loc_8201D4:
mov	ebp, [esp+20h+var_C]

loc_8201D8:
cmp	dword ptr [ebp+0], offset unk_185927C
jz	loc_820295
mov	edx, [esp+20h+arg_0]
mov	ecx, [edx]
mov	edx, [ebp-4]
lea	esi, [ebp-4]
shr	edx, 3
cmp	edx, 80h
jnb	short loc_820203
mov	eax, edx
shr	eax, 3
jmp	short loc_820262

loc_820203:
cmp	edx, 400h
jnb	short loc_820215
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_820262

loc_820215:
cmp	edx, 1000h
jnb	short loc_820227
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_820262

loc_820227:
cmp	edx, 2000h
jnb	short loc_820239
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_820262

loc_820239:
cmp	edx, 20000h
jnb	short loc_82024B
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_820262

loc_82024B:
cmp	edx, 1A0000h
jnb	short loc_82025D
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_820262

loc_82025D:
mov	eax, 7Fh

loc_820262:
sub	[ecx+4], edx
lea	edi, ds:0[edx*8]
mov	[esi], edi
cmp	eax, 5Dh
jb	short loc_82028A
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_82028A
push	esi
push	eax
push	edx
call	sub_82CAF0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn

loc_82028A:
mov	edx, [ecx+eax*4+10h]
mov	[esi+4], edx
mov	[ecx+eax*4+10h], esi

loc_820295:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_820050 endp

align 10h



sub_8202A0 proc	near

arg_0= dword ptr  4

push	ebp
mov	ebp, [esp+4+arg_0]
push	esi
mov	esi, eax
mov	eax, [esi+8]
test	eax, eax
jnz	short loc_8202C2
mov	eax, dword_1859274
mov	[ebx], eax
mov	ecx, dword_1859278
pop	esi
mov	[ebx+4], ecx
pop	ebp
retn

loc_8202C2:
mov	edx, eax
shr	edx, 1
or	eax, edx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	edx, eax
shr	edx, 4
or	eax, edx
mov	edx, eax
shr	edx, 8
or	eax, edx
mov	edx, eax
shr	edx, 10h
or	edx, eax
inc	edx
push	edi
mov	edi, ecx
cmp	ecx, edx
jnb	short loc_820321
mov	esi, [esi+0Ch]
nop

loc_8202F0:
mov	ecx, [esi+edi*4]
test	ecx, ecx
jz	short loc_82031C
jmp	short loc_820300
align 10h

loc_820300:
mov	eax, [ecx+8]
test	eax, 0F0000000h
jnz	short loc_820335
and	eax, offset sub_FFFFFF
jnz	short loc_820315
xor	ecx, ecx
jmp	short loc_820318

loc_820315:
lea	ecx, [esi+eax]

loc_820318:
test	ecx, ecx
jnz	short loc_820300

loc_82031C:
inc	edi
cmp	edi, edx
jb	short loc_8202F0

loc_820321:
mov	edx, dword_1859274
pop	edi
mov	[ebx], edx
mov	eax, dword_1859278
pop	esi
mov	[ebx+4], eax
pop	ebp
retn

loc_820335:
movzx	eax, byte ptr [ecx+0Bh]
and	eax, 0Fh
mov	[ebp+0], eax
mov	edx, [ecx]
mov	[ebp+4], edx
mov	eax, [ecx+8]
shr	eax, 1Ch
pop	edi
mov	[ebx], eax
mov	ecx, [ecx+4]
pop	esi
mov	[ebx+4], ecx
pop	ebp
retn
sub_8202A0 endp

align 10h



sub_820360 proc	near

var_A= word ptr	-0Ah
var_8= qword ptr -8

sub	esp, 0Ch
cmp	dword ptr [esi], 0
push	ebx
mov	ebx, eax
jnz	short loc_82036F
xor	eax, eax
jmp	short loc_820394

loc_82036F:
fld	dword ptr [esi+4]
fnstcw	[esp+10h+var_A]
movzx	eax, [esp+10h+var_A]
or	eax, 0C00h
mov	dword ptr [esp+10h+var_8], eax
fldcw	word ptr [esp+10h+var_8]
fistp	[esp+10h+var_8]
mov	eax, dword ptr [esp+10h+var_8]
fldcw	[esp+10h+var_A]

loc_820394:
mov	edx, [edi+18h]
cmp	eax, edx
jnb	short loc_8203B0
mov	ecx, [edi+10h]
lea	ecx, [ecx+eax*8]

loc_8203A1:
cmp	dword ptr [ecx], 0
jnz	short loc_8203AE
inc	eax
add	ecx, 8
cmp	eax, edx
jb	short loc_8203A1

loc_8203AE:
cmp	eax, edx

loc_8203B0:
jnz	short loc_8203C4
push	esi
xor	ecx, ecx
mov	eax, edi
call	sub_8202A0
add	esp, 4
pop	ebx
add	esp, 0Ch
retn

loc_8203C4:
mov	edx, eax
mov	dword ptr [esp+10h+var_8], edx
fild	dword ptr [esp+10h+var_8]
test	edx, edx
jge	short loc_8203D8
fadd	ds:flt_15FCC08

loc_8203D8:
fadd	ds:dbl_15FCC40
mov	dword ptr [esi], 3
fstp	dword ptr [esi+4]
mov	ecx, [edi+10h]
mov	edx, [ecx+eax*8]
mov	[ebx], edx
mov	eax, [ecx+eax*8+4]
mov	[ebx+4], eax
pop	ebx
add	esp, 0Ch
retn
sub_820360 endp

align 10h



sub_820400 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_0]
push	esi
push	edi
push	ebp
push	eax
call	sub_81FF80
mov	ecx, [ebp+0Ch]
mov	ebx, eax
mov	esi, [ecx+ebx*4]
add	esp, 0Ch
test	esi, esi
jz	loc_8204B1

loc_820425:
movzx	eax, byte ptr [esi+0Bh]
and	eax, 0Fh
cmp	eax, [edi]
jnz	short loc_82045D
cmp	eax, 4
jnz	short loc_820441
mov	edx, [esi]
xor	eax, eax
cmp	edx, [edi+4]
setz	al
jmp	short loc_820459

loc_820441:
mov	[esp+14h+var_8], eax
mov	eax, [esi]
lea	ecx, [esp+14h+var_8]
push	edi
push	ecx
mov	[esp+1Ch+var_4], eax
call	sub_822BA0
add	esp, 8

loc_820459:
test	eax, eax
jnz	short loc_820479

loc_82045D:
mov	esi, [esi+8]
and	esi, offset sub_FFFFFF
jnz	short loc_82046C
xor	eax, eax
jmp	short loc_820471

loc_82046C:
mov	eax, [ebp+0Ch]
add	eax, esi

loc_820471:
mov	esi, eax
test	eax, eax
jnz	short loc_820425
jmp	short loc_8204B1

loc_820479:
mov	esi, [esi+8]
and	esi, offset sub_FFFFFF
jnz	short loc_820488
xor	eax, eax
jmp	short loc_82048D

loc_820488:
mov	eax, [ebp+0Ch]
add	eax, esi

loc_82048D:
test	eax, eax
jz	short loc_8204B1

loc_820491:
mov	ecx, [eax+8]
test	ecx, 0F0000000h
jnz	short loc_8204CA
and	ecx, offset sub_FFFFFF
jnz	short loc_8204A8
xor	eax, eax
jmp	short loc_8204AD

loc_8204A8:
mov	eax, [ebp+0Ch]
add	eax, ecx

loc_8204AD:
test	eax, eax
jnz	short loc_820491

loc_8204B1:
lea	ecx, [ebx+1]
mov	ebx, [esp+14h+arg_4]
push	edi
mov	eax, ebp
call	sub_8202A0
add	esp, 4
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn

loc_8204CA:
movzx	edx, byte ptr [eax+0Bh]
and	edx, 0Fh
mov	[edi], edx
mov	ecx, [eax]
mov	[edi+4], ecx
mov	edx, [eax+8]
mov	ecx, [esp+14h+arg_4]
shr	edx, 1Ch
pop	esi
mov	[ecx], edx
mov	eax, [eax+4]
pop	ebp
mov	[ecx+4], eax
pop	ebx
add	esp, 8
retn
sub_820400 endp

align 10h



; int __cdecl sub_820500(int, int, size_t)
sub_820500 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 18h
push	ebx
mov	ebx, [esp+1Ch+arg_4]
push	ebp
push	esi
push	edi
mov	edi, [esp+28h+arg_8]
mov	eax, edi
shr	eax, 1
or	eax, edi
mov	ecx, eax
shr	ecx, 2
or	eax, ecx
mov	edx, eax
shr	edx, 4
or	eax, edx
mov	ecx, eax
shr	ecx, 8
or	eax, ecx
lea	ebp, ds:0[ebx*8]
test	edi, edi
jbe	short loc_82054E
mov	edx, eax
shr	edx, 10h
or	edx, eax
lea	eax, [edi+edi*2]
add	edx, eax
lea	ecx, ds:4[edx*4]
mov	[esp+28h+arg_8], ecx
jmp	short loc_820556

loc_82054E:
mov	[esp+28h+arg_8], 0

loc_820556:
mov	edx, [esp+28h+arg_8]
push	3		; int
lea	eax, [esp+2Ch+var_18]
push	eax		; void *
lea	ecx, [esp+30h+var_C]
mov	[esp+30h+var_4], edx
mov	edx, [esp+30h+arg_0]
push	ecx		; int
push	edx		; int
mov	[esp+38h+var_C], 1Ch
mov	[esp+38h+var_8], ebp
call	sub_82C790
mov	esi, [esp+38h+var_18]
xor	eax, eax
mov	[esi], eax
mov	ecx, [esp+38h+var_18]
mov	[ecx+4], eax
mov	edx, [esp+38h+var_18]
mov	[edx+8], eax
mov	ecx, [esp+38h+var_18]
mov	[ecx+0Ch], eax
mov	edx, [esp+38h+var_18]
mov	[edx+10h], eax
mov	ecx, [esp+38h+var_18]
mov	[ecx+14h], eax
mov	edx, [esp+38h+var_18]
add	esp, 10h
mov	[edx+18h], eax
mov	dword ptr [esi+10h], offset dword_1859274
mov	dword ptr [esi+0Ch], offset off_1681FAC
test	ebx, ebx
jz	short loc_8205E1
mov	[esi+18h], ebx
mov	eax, [esp+28h+var_14]
push	ebp		; size_t
mov	[esi+10h], eax
mov	ecx, [esp+2Ch+var_14]
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch

loc_8205E1:
test	edi, edi
jz	short loc_820603
mov	eax, [esp+28h+arg_8]
mov	[esi+8], edi
mov	edx, [esp+28h+var_10]
push	eax		; size_t
mov	[esi+0Ch], edx
mov	ecx, [esp+2Ch+var_10]
push	0		; int
push	ecx		; void *
call	_memset
add	esp, 0Ch

loc_820603:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_820500 endp

align 10h



sub_820610 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
push	ebx
mov	ebx, ecx
mov	ecx, [esp+4+arg_4]
sub	eax, ecx
inc	eax
test	eax, eax
jle	short loc_82066C
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_C]
push	edi
lea	edi, ds:0[ecx*8]
mov	ebp, eax

loc_820632:
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_82064E
mov	edx, [ebx+10h]
push	esi
push	edx
call	sub_81EB00

loc_82064E:
mov	ecx, [esi]
mov	eax, [ebx+10h]
mov	[edi+eax-8], ecx
mov	edx, [esi+4]
mov	[edi+eax-4], edx
add	esi, 8
add	edi, 8
sub	ebp, 1
jnz	short loc_820632
pop	edi
pop	esi
pop	ebp

loc_82066C:
pop	ebx
retn	10h
sub_820610 endp




sub_820670 proc	near
mov	eax, [ecx+18h]
push	esi
test	eax, eax
jbe	short loc_8206AD
mov	esi, [ecx+10h]
cmp	dword ptr [esi+eax*8-8], 0
jnz	short loc_8206AD
xor	edx, edx
cmp	eax, 1
jbe	short loc_8206AB
lea	esp, [esp+0]

loc_820690:
lea	ecx, [edx+eax]
shr	ecx, 1
cmp	dword ptr [esi+ecx*8-8], 0
jnz	short loc_8206A0
mov	eax, ecx
jmp	short loc_8206A2

loc_8206A0:
mov	edx, ecx

loc_8206A2:
mov	ecx, eax
sub	ecx, edx
cmp	ecx, 1
ja	short loc_820690

loc_8206AB:
mov	eax, edx

loc_8206AD:
pop	esi
retn
sub_820670 endp

align 10h



sub_8206B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
mov	ebx, [esi]
push	edi
mov	edi, ecx
test	ebx, ebx
jnz	short loc_8206CE
mov	eax, [esp+0Ch+arg_8]
call	sub_820360
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_8206CE:
push	ebp
mov	ebp, [edi+18h]
test	ebp, ebp
jbe	short loc_82071B
fld	dword ptr [esi+4]
fstp	[esp+10h+arg_4]
fld	[esp+10h+arg_4]
fld	st
call	__ftol2_sse
mov	ecx, eax
mov	[esp+10h+arg_4], ecx
cmp	ebx, 3
jnz	short loc_820719
fild	[esp+10h+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_82071B
test	ecx, ecx
jle	short loc_82071B
inc	ebp
cmp	ecx, ebp
jge	short loc_82071B
mov	eax, [esp+10h+arg_8]
call	sub_820360
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_820719:
fstp	st

loc_82071B:
mov	eax, [esp+10h+arg_8]
push	eax
mov	eax, [esp+14h+arg_0]
push	edi
mov	edi, esi
call	sub_820400
add	esp, 8
pop	ebp
pop	edi
pop	esi
pop	ebx
retn	0Ch
sub_8206B0 endp

align 10h



sub_820740 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	ebx
mov	ebx, ecx
mov	eax, [ebx+8]
mov	ecx, eax
shr	ecx, 1
or	eax, ecx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	ecx, eax
shr	ecx, 4
or	eax, ecx
mov	edx, eax
push	esi
shr	edx, 8
or	eax, edx
mov	esi, eax
shr	esi, 10h
push	edi
mov	edi, [esp+14h+arg_4]
or	esi, eax
mov	eax, [edi]
inc	esi
sub	eax, 0
jz	loc_820882
sub	eax, 3
jz	short loc_8207A8
sub	eax, 1
jz	short loc_82079D
mov	eax, [esp+14h+arg_0]
push	edi
push	ebx
push	eax
call	sub_81FF80
add	esp, 0Ch
mov	ecx, eax
jmp	loc_820822

loc_82079D:
mov	ecx, [edi+4]
mov	ecx, [ecx+4]
dec	esi
and	ecx, esi
jmp	short loc_820822

loc_8207A8:
fld	dword ptr [edi+4]
fstp	[esp+14h+arg_4]
fld	[esp+14h+arg_4]
fld	st
call	__ftol2_sse
mov	ecx, eax
mov	[esp+14h+arg_4], ecx
fild	[esp+14h+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_8207F8
mov	eax, [ebx+18h]
test	eax, eax
jbe	short loc_8207F8
lea	edx, [ecx-1]
cmp	edx, eax
jnb	short loc_8207F8
mov	eax, [ebx+10h]
mov	esi, [eax+ecx*8-8]
mov	edx, [esp+14h+arg_8]
pop	edi
mov	[edx], esi
mov	eax, [eax+ecx*8-4]
pop	esi
mov	[edx+4], eax
pop	ebx
add	esp, 8
retn	0Ch

loc_8207F8:
fld	dword ptr [edi+4]
lea	ecx, [esi-1]
fnstcw	word ptr [esp+14h+arg_4]
movzx	eax, word ptr [esp+14h+arg_4]
or	eax, 0C00h
mov	[esp+14h+arg_0], eax
fldcw	word ptr [esp+14h+arg_0]
fistp	[esp+14h+var_8]
mov	edx, dword ptr [esp+14h+var_8]
and	ecx, edx
fldcw	word ptr [esp+14h+arg_4]

loc_820822:
mov	eax, [ebx+0Ch]
mov	esi, [eax+ecx*4]
test	esi, esi
jz	short loc_820882
lea	esp, [esp+0]

loc_820830:
movzx	eax, byte ptr [esi+0Bh]
and	eax, 0Fh
cmp	eax, [edi]
jnz	short loc_820868
cmp	eax, 4
jnz	short loc_82084C
mov	ecx, [esi]
xor	eax, eax
cmp	ecx, [edi+4]
setz	al
jmp	short loc_820864

loc_82084C:
mov	edx, [esi]
mov	dword ptr [esp+14h+var_8], eax
lea	eax, [esp+14h+var_8]
push	edi
push	eax
mov	dword ptr [esp+1Ch+var_8+4], edx
call	sub_822BA0
add	esp, 8

loc_820864:
test	eax, eax
jnz	short loc_8208A0

loc_820868:
mov	esi, [esi+8]
and	esi, offset sub_FFFFFF
jnz	short loc_820877
xor	eax, eax
jmp	short loc_82087C

loc_820877:
mov	eax, [ebx+0Ch]
add	eax, esi

loc_82087C:
mov	esi, eax
test	eax, eax
jnz	short loc_820830

loc_820882:
mov	eax, [esp+14h+arg_8]
mov	ecx, dword_1859274
pop	edi
mov	[eax], ecx
mov	edx, dword_1859278
pop	esi
mov	[eax+4], edx
pop	ebx
add	esp, 8
retn	0Ch

loc_8208A0:
mov	ecx, [esi+8]
mov	eax, [esp+14h+arg_8]
shr	ecx, 1Ch
pop	edi
mov	[eax], ecx
mov	edx, [esi+4]
pop	esi
mov	[eax+4], edx
pop	ebx
add	esp, 8
retn	0Ch
sub_820740 endp

align 10h



sub_8208C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [ecx+8]
mov	edx, eax
shr	edx, 1
or	eax, edx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	edx, eax
shr	edx, 4
or	eax, edx
mov	edx, eax
shr	edx, 8
or	eax, edx
mov	edx, [ecx+0Ch]
mov	ecx, eax
shr	ecx, 10h
push	esi
mov	esi, [esp+4+arg_0]
or	ecx, eax
and	ecx, [esi+4]
push	edi
mov	eax, [edx+ecx*4]
test	eax, eax
jz	short loc_82092A
jmp	short loc_820900
align 10h

loc_820900:
mov	ecx, [eax+8]
mov	edi, ecx
and	edi, 0F000000h
cmp	edi, 4000000h
jnz	short loc_820917
cmp	[eax], esi
jz	short loc_820931

loc_820917:
and	ecx, offset sub_FFFFFF
jnz	short loc_820923
xor	eax, eax
jmp	short loc_820926

loc_820923:
lea	eax, [edx+ecx]

loc_820926:
test	eax, eax
jnz	short loc_820900

loc_82092A:
pop	edi
xor	eax, eax
pop	esi
retn	8

loc_820931:
shr	ecx, 1Ch
test	ecx, ecx
jz	short loc_82092A
mov	edx, [esp+8+arg_4]
mov	[edx], ecx
mov	eax, [eax+4]
pop	edi
mov	[edx+4], eax
mov	eax, 1
pop	esi
retn	8
sub_8208C0 endp

align 10h



sub_820950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	edi
mov	edi, [esp+4+arg_8]
test	edi, edi
jle	short loc_82098C
mov	eax, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
push	ebx
lea	eax, ds:0FFFFFFF8h[eax*8]
push	esi
lea	ebx, [ebx+0]

loc_820970:
mov	esi, [ecx+10h]
mov	ebx, [eax+esi]
mov	[edx], ebx
mov	esi, [eax+esi+4]
mov	[edx+4], esi
add	eax, 8
add	edx, 8
sub	edi, 1
jnz	short loc_820970
pop	esi
pop	ebx

loc_82098C:
pop	edi
retn	0Ch
sub_820950 endp




sub_820990 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [ecx+8]
push	ebx
mov	ebx, [esp+4+arg_4]
mov	edx, [ebx+4]
push	ebp
push	esi
mov	esi, [ecx+18h]
lea	ebp, [eax+esi]
push	edi
mov	[esp+10h+arg_4], ebp
cmp	edx, ebp
jnb	loc_820A64
mov	eax, edx
sub	eax, esi
lea	esi, [eax+eax*2]
add	esi, esi
mov	edi, eax
add	esi, esi
lea	ecx, [ecx+0]

loc_8209C0:
cmp	edx, [ecx+18h]
jnb	short loc_820A1D
mov	eax, [ecx+10h]
cmp	dword ptr [eax+edx*8], 0
jz	loc_820A57
mov	eax, edx
mov	[esp+10h+arg_4], eax
fild	[esp+10h+arg_4]
test	eax, eax
jge	short loc_8209E6
fadd	ds:flt_15FCC08

loc_8209E6:
fadd	ds:dbl_15FCC40
mov	eax, [esp+10h+arg_8]
mov	dword ptr [eax], 3
pop	edi
fstp	dword ptr [eax+4]
mov	ecx, [ecx+10h]
mov	esi, [ecx+edx*8]
mov	eax, [esp+0Ch+arg_C]
mov	[eax], esi
mov	ecx, [ecx+edx*8+4]
pop	esi
mov	[eax+4], ecx
inc	edx
pop	ebp
mov	[ebx+4], edx
mov	dword ptr [ebx], 1
pop	ebx
retn	10h

loc_820A1D:
mov	eax, [ecx+8]
mov	ebp, eax
shr	ebp, 1
or	eax, ebp
mov	ebp, eax
shr	ebp, 2
or	eax, ebp
mov	ebp, eax
shr	ebp, 4
or	eax, ebp
mov	ebp, eax
shr	ebp, 8
or	eax, ebp
mov	ebp, eax
shr	ebp, 10h
or	ebp, eax
mov	eax, [ecx+0Ch]
lea	eax, [eax+ebp*4+4]
test	dword ptr [esi+eax+8], 0F0000000h
jnz	short loc_820A71
mov	ebp, [esp+10h+arg_4]

loc_820A57:
inc	edx
add	esi, 0Ch
inc	edi
cmp	edx, ebp
jb	loc_8209C0

loc_820A64:
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ebx], 0
pop	ebx
retn	10h

loc_820A71:
lea	ecx, [edi+edi*2]
movzx	esi, byte ptr [eax+ecx*4+0Bh]
lea	eax, [eax+ecx*4]
mov	ecx, [esp+10h+arg_8]
and	esi, 0Fh
mov	[ecx], esi
mov	esi, [eax]
mov	[ecx+4], esi
mov	esi, [eax+8]
mov	ecx, [esp+10h+arg_C]
shr	esi, 1Ch
mov	[ecx], esi
mov	eax, [eax+4]
pop	edi
pop	esi
mov	[ecx+4], eax
inc	edx
pop	ebp
mov	[ebx+4], edx
mov	dword ptr [ebx], 1
pop	ebx
retn	10h
sub_820990 endp

align 10h


; Attributes: bp-based frame

sub_820AB0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
sub	esp, 18h
mov	eax, [ebx+10h]
mov	ecx, [ebx+18h]
push	esi
mov	esi, edx
mov	edx, [ebp+arg_0]
push	edi
lea	esi, [esi+esi+2]
lea	edi, ds:0[esi*8]
push	edi
push	edx
mov	[esp+28h+var_14], eax
mov	[esp+28h+var_18], ecx
call	sub_82C5B0
mov	ecx, [ebp+arg_0]
mov	[ebx+10h], eax
mov	edx, [ecx]
mov	ecx, 1
add	esp, 8
cmp	[edx+23Ch], ecx
jnz	short loc_820AFB
or	[eax-4], ecx

loc_820AFB:
mov	eax, [ebx+10h]
push	edi		; size_t
push	0		; int
push	eax		; void *
call	_memset
mov	edx, [esp+2Ch+var_18]
add	esp, 0Ch
mov	[ebx+18h], esi
test	edx, edx
jbe	loc_820BE4
mov	esi, [esp+20h+var_14]
mov	eax, [ebx+10h]
mov	ecx, esi

loc_820B22:
mov	edi, [ecx]
mov	[eax], edi
mov	edi, [ecx+4]
dec	edx
mov	[eax+4], edi
add	eax, 8
add	ecx, 8
test	edx, edx
jnz	short loc_820B22
mov	edx, [esi-4]
mov	ecx, [ebp+arg_0]
mov	ecx, [ecx]
add	esi, 0FFFFFFFCh
shr	edx, 3
cmp	edx, 80h
jnb	short loc_820B54
mov	eax, edx
shr	eax, 3
jmp	short loc_820BB3

loc_820B54:
cmp	edx, 400h
jnb	short loc_820B66
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_820BB3

loc_820B66:
cmp	edx, 1000h
jnb	short loc_820B78
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_820BB3

loc_820B78:
cmp	edx, 2000h
jnb	short loc_820B8A
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_820BB3

loc_820B8A:
cmp	edx, 20000h
jnb	short loc_820B9C
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_820BB3

loc_820B9C:
cmp	edx, 1A0000h
jnb	short loc_820BAE
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_820BB3

loc_820BAE:
mov	eax, 7Fh

loc_820BB3:
sub	[ecx+4], edx
lea	edi, ds:0[edx*8]
mov	[esi], edi
cmp	eax, 5Dh
jb	short loc_820BD5
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_820BD5
push	esi
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_820BE0

loc_820BD5:
mov	edx, [ecx+eax*4+10h]
mov	[esi+4], edx
mov	[ecx+eax*4+10h], esi

loc_820BE0:
mov	edx, [esp+20h+var_18]

loc_820BE4:
mov	eax, [ebx+8]
test	eax, eax
jbe	loc_820D0F
mov	ecx, edx
mov	[esp+20h+var_14], ecx
fild	[esp+20h+var_14]
test	ecx, ecx
jge	short loc_820C03
fadd	ds:flt_15FCC08

loc_820C03:
mov	ecx, eax
fstp	[esp+20h+var_C]
shr	ecx, 1
or	eax, ecx
mov	ecx, eax
shr	ecx, 2
or	eax, ecx
mov	ecx, eax
shr	ecx, 4
or	eax, ecx
mov	ecx, eax
shr	ecx, 8
or	eax, ecx
mov	ecx, eax
shr	ecx, 10h
or	ecx, eax
inc	ecx
mov	[esp+20h+var_10], 3
mov	edi, edx
cmp	edx, [ebx+18h]
jnb	loc_820D0F
dec	ecx
mov	[esp+20h+var_14], ecx

loc_820C42:
fld	[esp+20h+var_C]
mov	edx, [esp+20h+var_14]
fadd	ds:dbl_15FCC40
lea	eax, [edi+1]
and	edx, eax
mov	[esp+20h+var_18], eax
mov	eax, [ebx+0Ch]
fstp	[esp+20h+var_C]
mov	esi, [eax+edx*4]
test	esi, esi
jz	loc_820D02
jmp	short loc_820C70
align 10h

loc_820C70:
movzx	eax, byte ptr [esi+0Bh]
and	eax, 0Fh
cmp	eax, [esp+20h+var_10]
jnz	short loc_820CAF
cmp	eax, 4
jnz	short loc_820C8F
mov	ecx, [esi]
xor	eax, eax
cmp	ecx, [esp+20h+var_C]
setz	al
jmp	short loc_820CAB

loc_820C8F:
mov	edx, [esi]
mov	[esp+20h+var_8], eax
lea	eax, [esp+20h+var_10]
push	eax
lea	ecx, [esp+24h+var_8]
push	ecx
mov	[esp+28h+var_4], edx
call	sub_822BA0
add	esp, 8

loc_820CAB:
test	eax, eax
jnz	short loc_820CCB

loc_820CAF:
mov	esi, [esi+8]
and	esi, offset sub_FFFFFF
jnz	short loc_820CBE
xor	eax, eax
jmp	short loc_820CC3

loc_820CBE:
mov	eax, [ebx+0Ch]
add	eax, esi

loc_820CC3:
mov	esi, eax
test	eax, eax
jnz	short loc_820C70
jmp	short loc_820D02

loc_820CCB:
mov	ecx, [esi+8]
shr	ecx, 1Ch
test	ecx, ecx
jz	short loc_820D02
mov	edx, [ebx+10h]
lea	eax, [edx+edi*8]
mov	[eax], ecx
mov	ecx, [esi+4]
mov	[eax+4], ecx
mov	eax, dword_1859274
mov	edx, [esi+8]
and	edx, 0FFFFFFFh
shl	eax, 1Ch
or	edx, eax
mov	[esi+8], edx
mov	ecx, dword_1859278
mov	[esi+4], ecx

loc_820D02:
mov	edi, [esp+20h+var_18]
cmp	edi, [ebx+18h]
jb	loc_820C42

loc_820D0F:
pop	edi
pop	esi
mov	esp, ebp
pop	ebp
retn
sub_820AB0 endp

align 10h



sub_820D20 proc	near

var_C= dword ptr -0Ch
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 0Ch
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_4]
push	esi
push	edi
mov	edi, [ebp+0]
xor	esi, esi
mov	ebx, ecx
cmp	edi, 4
jnz	short loc_820D8C
mov	eax, [ebx+8]
mov	ecx, eax
shr	ecx, 1
or	eax, ecx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	ecx, eax
shr	ecx, 4
or	eax, ecx
mov	edx, eax
shr	edx, 8
or	eax, edx
lea	ecx, [ebp+4]
mov	esi, eax
shr	esi, 10h
or	esi, eax
mov	eax, [ebx+4]
mov	[esp+1Ch+var_C], ecx
mov	ecx, [ecx]
and	esi, [ecx+4]
test	eax, eax
jz	loc_820EF8
mov	edx, [esp+1Ch+arg_8]
push	edx
push	ecx
push	eax
mov	eax, [esp+28h+arg_0]
push	eax
call	sub_822E20
add	esp, 10h
jmp	loc_820EF8

loc_820D8C:
fld	dword ptr [ebp+4]
lea	eax, [ebp+4]
fstp	[esp+1Ch+arg_4]
mov	[esp+1Ch+var_C], eax
fld	[esp+1Ch+arg_4]
fld	st
call	__ftol2_sse
mov	ecx, eax
mov	[esp+1Ch+arg_4], ecx
cmp	edi, 3
jnz	loc_820ECD
fild	[esp+1Ch+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_820ECF
mov	eax, [ebx+18h]
lea	esi, [ecx-1]
cmp	esi, eax
jnb	short loc_820E0C
mov	edx, [esp+1Ch+arg_8]
mov	eax, [ebx+10h]
mov	ecx, [edx]
mov	[eax+esi*8], ecx
mov	ecx, [edx+4]
mov	[eax+esi*8+4], ecx
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [eax]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	loc_82109D
push	edx
mov	edx, [ebx+10h]
push	edx
call	sub_81EB00
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_820E0C:
add	eax, 4
cmp	esi, eax
jnb	short loc_820E7C
mov	eax, [esp+1Ch+arg_8]
cmp	dword ptr [eax], 0
jz	short loc_820E7C
mov	edi, [esp+1Ch+arg_0]
mov	ecx, [edi]
push	eax
add	ecx, 230h
call	sub_81DA30
push	edi
mov	edx, esi
call	sub_820AB0
mov	ecx, [edi]
mov	ebp, [esp+20h+arg_8]
add	ecx, 230h
add	esp, 4
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_820E55
mov	eax, [ebx+10h]
push	ebp
push	eax
call	sub_81EB00

loc_820E55:
mov	ecx, [ebp+0]
mov	ebx, [ebx+10h]
mov	[ebx+esi*8], ecx
mov	edx, [ebp+4]
mov	[ebx+esi*8+4], edx
mov	ecx, [edi]
add	ecx, 230h
call	sub_81DA50
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_820E7C:
mov	eax, [ebx+8]
fnstcw	word ptr [esp+1Ch+arg_4]
mov	ecx, eax
shr	ecx, 1
or	eax, ecx
mov	edx, eax
shr	edx, 2
or	eax, edx
mov	ecx, eax
shr	ecx, 4
or	eax, ecx
mov	edx, eax
shr	edx, 8
or	eax, edx
mov	esi, eax
shr	esi, 10h
or	esi, eax
mov	eax, [esp+1Ch+var_C]
fld	dword ptr [eax]
movzx	eax, word ptr [esp+1Ch+arg_4]
or	eax, 0C00h
mov	dword ptr [esp+1Ch+var_8], eax
fldcw	word ptr [esp+1Ch+var_8]
fistp	[esp+1Ch+var_8]
mov	ecx, dword ptr [esp+1Ch+var_8]
and	esi, ecx
fldcw	word ptr [esp+1Ch+arg_4]
jmp	short loc_820EF8

loc_820ECD:
fstp	st

loc_820ECF:
test	edi, edi
jz	short loc_820EE6
mov	edx, [esp+1Ch+arg_0]
push	ebp
push	ebx
push	edx
call	sub_81FF80
add	esp, 0Ch
mov	esi, eax
jmp	short loc_820EF8

loc_820EE6:
mov	eax, [esp+1Ch+arg_0]
push	offset aTableIndexIsNi ; "table	index is nil"
push	eax
call	sub_81A760
add	esp, 8

loc_820EF8:
mov	ecx, [ebx+0Ch]
mov	edi, [ecx+esi*4]
test	edi, edi
jz	short loc_820F5A

loc_820F02:
movzx	eax, byte ptr [edi+0Bh]
and	eax, 0Fh
cmp	eax, [ebp+0]
jnz	short loc_820F40
mov	edx, [edi]
cmp	eax, 4
jnz	short loc_820F22
mov	ecx, [esp+1Ch+var_C]
xor	eax, eax
cmp	edx, [ecx]
setz	al
jmp	short loc_820F38

loc_820F22:
mov	dword ptr [esp+1Ch+var_8], eax
lea	eax, [esp+1Ch+var_8]
push	ebp
push	eax
mov	dword ptr [esp+24h+var_8+4], edx
call	sub_822BA0
add	esp, 8

loc_820F38:
test	eax, eax
jnz	loc_820FE6

loc_820F40:
mov	edi, [edi+8]
and	edi, offset sub_FFFFFF
jnz	short loc_820F4F
xor	eax, eax
jmp	short loc_820F54

loc_820F4F:
mov	eax, [ebx+0Ch]
add	eax, edi

loc_820F54:
mov	edi, eax
test	eax, eax
jnz	short loc_820F02

loc_820F5A:
mov	eax, [esp+1Ch+arg_8]
cmp	dword ptr [eax], 0
jz	loc_82109D
mov	ecx, [ebx+14h]
cmp	ecx, [ebx+8]
jnz	short loc_820FA5
mov	esi, [esp+1Ch+arg_0]
mov	ecx, [esi]
push	eax
add	ecx, 230h
call	sub_81DA30
push	ebx
push	esi
call	sub_820050
mov	ecx, [esi]
add	esp, 8
add	ecx, 230h
call	sub_81DA50
push	ebp
push	ebx
push	esi
call	sub_81FF80
add	esp, 0Ch
mov	esi, eax

loc_820FA5:
mov	eax, [ebx+8]
mov	edx, eax
shr	edx, 1
or	eax, edx
mov	ecx, eax
shr	ecx, 2
or	eax, ecx
mov	edx, eax
shr	edx, 4
or	eax, edx
mov	edx, [ebx+0Ch]
mov	ecx, eax
shr	ecx, 8
or	eax, ecx
mov	ecx, [ebx+14h]
mov	edi, eax
shr	edi, 10h
or	edi, eax
lea	eax, [ecx+ecx*2]
inc	ecx
add	edi, eax
mov	[ebx+14h], ecx
mov	eax, [edx+esi*4]
lea	edi, [edx+edi*4+4]
test	eax, eax
jnz	short loc_821028
jmp	short loc_82102A

loc_820FE6:
mov	ecx, [esp+1Ch+arg_0]
mov	ecx, [ecx]
mov	esi, [esp+1Ch+arg_8]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_821006
mov	edx, [ebx+0Ch]
push	esi
push	edx
call	sub_81EB00

loc_821006:
mov	ecx, [esi]
mov	eax, [edi+8]
and	eax, 0FFFFFFFh
shl	ecx, 1Ch
or	eax, ecx
mov	[edi+8], eax
mov	edx, [esi+4]
mov	[edi+4], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_821028:
sub	eax, edx

loc_82102A:
mov	ecx, [edi+8]
xor	ecx, eax
and	ecx, offset sub_FFFFFF
xor	[edi+8], ecx
mov	edx, [ebx+0Ch]
mov	[edx+esi*4], edi
mov	esi, [esp+1Ch+arg_0]
mov	ecx, [esi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_82105A
mov	eax, [ebx+0Ch]
push	ebp
push	eax
call	sub_81EB00

loc_82105A:
mov	ecx, [esi]
mov	esi, [esp+1Ch+arg_8]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_821076
mov	edx, [ebx+0Ch]
push	esi
push	edx
call	sub_81EB00

loc_821076:
mov	eax, [esi]
mov	ecx, [edi+8]
mov	edx, [esp+1Ch+var_C]
shl	eax, 4
or	eax, [ebp+0]
and	ecx, offset sub_FFFFFF
shl	eax, 18h
or	eax, ecx
mov	[edi+8], eax
mov	eax, [edx]
mov	[edi], eax
mov	ecx, [esi+4]
mov	[edi+4], ecx

loc_82109D:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_820D20 endp

align 10h



sub_8210B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	esi, ecx
dec	edi
cmp	edi, [esi+18h]
jnb	short loc_8210FA
mov	eax, [esp+10h+arg_0]
mov	ecx, [eax]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
push	ebx
mov	ebx, [esp+14h+arg_8]
jnz	short loc_8210E2
mov	edx, [esi+10h]
push	ebx
push	edx
call	sub_81EB00

loc_8210E2:
mov	esi, [esi+10h]
mov	eax, [ebx]
mov	[esi+edi*8], eax
mov	ecx, [ebx+4]
pop	ebx
mov	[esi+edi*8+4], ecx
pop	edi
pop	esi
add	esp, 8
retn	0Ch

loc_8210FA:
mov	edx, [esp+10h+arg_8]
fild	[esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
push	edx
lea	eax, [esp+14h+var_8]
fstp	[esp+14h+var_4]
push	eax
push	ecx
mov	ecx, esi
mov	[esp+1Ch+var_8], 3
call	sub_820D20
pop	edi
pop	esi
add	esp, 8
retn	0Ch
sub_8210B0 endp

align 10h



sub_821130 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
cmp	edx, [ecx+18h]
jbe	short locret_82114C
mov	eax, [esp+arg_0]
push	ebx
shr	edx, 1
push	eax
mov	ebx, ecx
call	sub_820AB0
add	esp, 4
pop	ebx

locret_82114C:
retn	8
sub_821130 endp

align 10h



sub_821150 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebx
mov	bl, [esp+4+arg_4]
push	esi
mov	esi, [ecx+10h]
push	edi
mov	edi, [ecx+18h]
mov	ecx, [esp+0Ch+arg_0]
mov	[esi+ecx*4], eax
mov	edx, ecx
shr	ecx, 1
add	ecx, esi
lea	esi, [ecx+edi*4]
and	edx, 1
mov	al, dl
dec	dl
neg	al
shr	al, 1
mov	cl, dl
xor	cl, al
and	al, [esp+0Ch+arg_4]
and	cl, 0Fh
xor	cl, dl
not	cl
and	cl, [esi]
shl	bl, 4
and	bl, dl
or	cl, bl
or	cl, al
pop	edi
mov	[esi], cl
pop	esi
pop	ebx
retn	0Ch
sub_821150 endp

align 10h



; int __cdecl sub_8211A0(float)
sub_8211A0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
lea	ecx, [eax-1]
fnstcw	word ptr [esp+8+arg_0]
movzx	eax, word ptr [esp+8+arg_0]
or	eax, 0C00h
mov	dword ptr [esp+8+var_8], eax
fldcw	word ptr [esp+8+var_8]
fistp	[esp+8+var_8]
mov	edx, dword ptr [esp+8+var_8]
and	ecx, edx
mov	eax, ecx
fldcw	word ptr [esp+8+arg_0]
add	esp, 8
retn
sub_8211A0 endp




sub_8211D0 proc	near

var_4= dword ptr -4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
dec	eax
cmp	eax, 6		; switch 7 cases
ja	short loc_821225 ; default
			; jumptable 008211DA cases 1,4,5
jmp	ds:off_82123C[eax*4] ; switch jump

loc_8211E1:		; jumptable 008211DA case 3
mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_C]
dec	eax
and	eax, [ecx+4]
retn

loc_8211EE:		; jumptable 008211DA case 2
fld	[esp+arg_C]
mov	eax, [esp+arg_4]
push	ecx		; float
fstp	[esp+4+var_4]
call	sub_8211A0
add	esp, 4
retn

loc_821203:		; jumptable 008211DA case 6
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_4]
add	eax, 10h
shr	eax, 2
imul	eax, 9E3779B1h
dec	edx
and	eax, edx
retn

loc_82121B:		; jumptable 008211DA case 0
mov	eax, [esp+arg_4]
dec	eax
and	eax, [esp+arg_C]
retn

loc_821225:		; default
mov	eax, [esp+arg_C] ; jumptable 008211DA cases 1,4,5
mov	ecx, [esp+arg_4]
shr	eax, 2
imul	eax, 9E3779B1h
dec	ecx
and	eax, ecx
retn
sub_8211D0 endp

align 4
off_82123C dd offset loc_82121B	; jump table for switch	statement
dd offset loc_821225
dd offset loc_8211EE
dd offset loc_8211E1
dd offset loc_821225
dd offset loc_821225
dd offset loc_821203
align 10h



; int __stdcall	sub_821260(int,	int, int, void *, size_t, void *, size_t)
sub_821260 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

cmp	[esp+arg_4], 0
mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	dword ptr [esi], 0
mov	dword ptr [esi+4], 0
mov	[esi+18h], edx
jbe	short loc_82128B
mov	ecx, [esp+4+arg_8]
mov	eax, 1
shl	eax, cl
jmp	short loc_82128D

loc_82128B:
xor	eax, eax

loc_82128D:
or	eax, 80000000h
mov	[esi+8], eax
and	eax, 0FFFFFFFh
mov	[esi+14h], eax
mov	eax, [esp+4+arg_C]
mov	[esi+10h], eax
test	eax, eax
jz	short loc_8212BC
test	edx, edx
jbe	short loc_8212BC
mov	ecx, [esp+4+arg_10]
push	ecx		; size_t
push	0		; int
push	eax		; void *
call	_memset
add	esp, 0Ch

loc_8212BC:
mov	eax, [esp+4+arg_14]
mov	[esi+0Ch], eax
test	eax, eax
jz	short loc_821309
mov	edx, [esp+4+arg_18]
push	edx		; size_t
push	0		; int
push	eax		; void *
call	_memset
add	esp, 0Ch
xor	eax, eax
test	dword ptr [esi+8], 0FFFFFFFh
jbe	short loc_821309
xor	ecx, ecx
mov	edx, offset sub_FFFFFF
push	edi
lea	ebx, [ebx+0]

loc_8212F0:
mov	edi, [esi+0Ch]
mov	[edi+ecx+8], edx
mov	edi, [esi+8]
inc	eax
and	edi, 0FFFFFFFh
add	ecx, 0Ch
cmp	eax, edi
jb	short loc_8212F0
pop	edi

loc_821309:
mov	eax, esi
pop	esi
retn	1Ch
sub_821260 endp

align 10h



sub_821310 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
mov	edx, [esp+4+arg_4]
mov	eax, [esp+4+arg_8]
push	ebx
push	ebp
push	esi
mov	esi, [ecx+18h]
lea	ebp, [edx-1]
mov	[esp+10h+var_4], ecx
mov	ebx, 1
cmp	ebp, esi
jnb	short loc_821333
cmp	eax, esi
jbe	short loc_82133C

loc_821333:
mov	esi, eax
sub	esi, edx
add	esi, ebx
jz	short loc_82133C
int	3		; Trap to Debugger

loc_82133C:
sub	eax, edx
add	eax, ebx
jz	loc_8213E1
push	edi
mov	edi, [esp+14h+arg_C]
lea	edx, ds:0FFFFFFFCh[edx*4]
mov	[esp+14h+arg_4], edx
mov	[esp+14h+arg_C], eax
jmp	short loc_821364
align 10h

loc_821360:
mov	ecx, [esp+14h+var_4]

loc_821364:
mov	esi, [ecx+18h]
mov	edx, [edi]
mov	eax, [edi+4]
mov	[esp+14h+arg_8], edx
mov	edx, [ecx+10h]
mov	ecx, [esp+14h+arg_4]
mov	[ecx+edx], eax
mov	ecx, ebp
and	ecx, ebx
mov	al, cl
sub	cl, bl
neg	al
mov	ebx, ebp
shr	ebx, 1
add	ebx, edx
shr	al, 1
mov	dl, cl
xor	dl, al
and	al, byte ptr [esp+14h+arg_8]
and	dl, 0Fh
xor	dl, cl
lea	esi, [ebx+esi*4]
mov	bl, byte ptr [esp+14h+arg_8]
not	dl
and	dl, [esi]
shl	bl, 4
and	bl, cl
or	dl, bl
or	dl, al
mov	eax, [esp+14h+arg_0]
mov	[esi], dl
mov	ecx, [eax]
add	ecx, 230h
mov	ebx, 1
cmp	[ecx+0Ch], ebx
jnz	short loc_8213D0
mov	edx, [esp+14h+var_4]
push	edi
push	edx
call	sub_81EB00

loc_8213D0:
add	[esp+14h+arg_4], 4
add	edi, 8
add	ebp, ebx
sub	[esp+14h+arg_C], ebx
jnz	short loc_821360
pop	edi

loc_8213E1:
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	10h
sub_821310 endp

align 10h



sub_8213F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	esi
mov	esi, [esp+8+arg_4]
xor	edx, edx
dec	esi
cmp	[esp+8+arg_8], edx
mov	ebp, ecx
jle	short loc_821463
push	ebx
lea	eax, ds:0[esi*4]
push	edi
mov	edi, [esp+10h+arg_0]
mov	[esp+10h+arg_4], eax

loc_821412:
mov	eax, [ebp+10h]
mov	ebx, [esp+10h+arg_4]
mov	ebx, [ebx+eax]
mov	ecx, [ebp+18h]
mov	[edi+edx*8+4], ebx
add	[esp+10h+arg_4], 4
mov	edi, esi
shr	edi, 1
add	edi, eax
mov	cl, [edi+ecx*4]
movzx	edi, cl
mov	eax, esi
and	eax, 1
mov	cl, al
neg	al
dec	cl
movzx	ecx, cl
mov	ebx, edi
shr	ebx, 4
shr	eax, 1
and	eax, 0Fh
and	eax, edi
mov	edi, [esp+10h+arg_0]
and	ecx, ebx
or	ecx, eax
mov	[edi+edx*8], ecx
inc	edx
inc	esi
cmp	edx, [esp+10h+arg_8]
jl	short loc_821412
pop	edi
pop	ebx

loc_821463:
pop	esi
pop	ebp
retn	0Ch
sub_8213F0 endp

align 10h



sub_821470 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
fild	[esp+8+arg_0]
mov	edx, [ecx+8]
and	edx, 0FFFFFFFh
push	esi
mov	esi, [ecx+0Ch]
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
dec	edx
fnstcw	word ptr [esp+0Ch+arg_0]
movzx	eax, word ptr [esp+0Ch+arg_0]
or	eax, 0C00h
fld	st
mov	dword ptr [esp+0Ch+var_8], eax
push	edi
fldcw	word ptr [esp+10h+var_8]
fistp	[esp+10h+var_8]
mov	eax, dword ptr [esp+10h+var_8]
and	edx, eax
fldcw	word ptr [esp+10h+arg_0]

loc_8214B4:
lea	ecx, [edx+edx*2]
lea	eax, [esi+ecx*4]
mov	ecx, [eax+8]
mov	edi, ecx
and	edi, 0F0000000h
cmp	edi, 30000000h
jnz	short loc_8214E2
mov	eax, [eax]
mov	[esp+10h+arg_0], eax
fld	[esp+10h+arg_0]
fld	st(1)
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_8214FE

loc_8214E2:
and	ecx, offset sub_FFFFFF
mov	edx, ecx
cmp	edx, offset sub_FFFFFF
jnz	short loc_8214B4
pop	edi
fstp	st
mov	eax, ecx
pop	esi
add	esp, 8
retn	4

loc_8214FE:
pop	edi
fstp	st
mov	eax, edx
pop	esi
add	esp, 8
retn	4
sub_821470 endp

align 10h



sub_821510 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+8]
and	eax, 0FFFFFFFh
jnz	short loc_821522
mov	eax, offset sub_FFFFFF
retn	4

loc_821522:
push	esi
mov	esi, [ecx+0Ch]
push	edi
mov	edi, [esp+8+arg_0]
dec	eax
and	eax, [edi+4]
push	ebx

loc_821530:
lea	ecx, [eax+eax*2]
lea	edx, [esi+ecx*4]
mov	ecx, [edx+8]
mov	ebx, ecx
and	ebx, 0F0000000h
cmp	ebx, 40000000h
jnz	short loc_82154D
cmp	[edx], edi
jz	short loc_82155C

loc_82154D:
and	ecx, offset sub_FFFFFF
mov	eax, ecx
cmp	eax, offset sub_FFFFFF
jnz	short loc_821530

loc_82155C:
pop	ebx
pop	edi
pop	esi
retn	4
sub_821510 endp

align 10h



; int __stdcall	sub_821570(int,	void *,	size_t,	int)
sub_821570 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_8]
mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	ecx, [esp+10h+arg_C]
mov	edi, [esi+18h]
mov	ebx, [esi+10h]
push	edx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+10h], eax
mov	[esi+18h], ecx
call	_memset
mov	eax, [esi+10h]
lea	ebp, ds:0[edi*4]
push	ebp
push	ebx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi+18h]
mov	eax, [esi+10h]
mov	ecx, edi
shr	ecx, 1
and	edi, 1
add	ecx, edi
push	ecx
add	ebp, ebx
lea	ecx, [eax+edx*4]
push	ebp
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 24h
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	10h
sub_821570 endp

align 10h



sub_8215D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	edi
xor	edx, edx
xor	eax, eax
xor	edi, edi
lea	ecx, [edx+1]
cmp	[ebx], eax
jbe	short loc_82161F
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
lea	esp, [esp+0]

loc_8215F0:
mov	esi, [ebp+0]
test	esi, esi
jbe	short loc_821605
add	edx, esi
mov	esi, ecx
shr	esi, 1
cmp	edx, esi
jbe	short loc_821605
mov	edi, ecx
mov	eax, edx

loc_821605:
cmp	edx, [ebx]
jz	short loc_821616
add	ecx, ecx
mov	esi, ecx
shr	esi, 1
add	ebp, 4
cmp	esi, [ebx]
jb	short loc_8215F0

loc_821616:
pop	esi
pop	ebp
mov	[ebx], edi
pop	edi
pop	ebx
retn	8

loc_82161F:
mov	[ebx], edi
pop	edi
pop	ebx
retn	8
sub_8215D0 endp

align 10h



sub_821630 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
cmp	[esp+4+arg_0], 3
mov	eax, [esp+4+arg_4]
mov	[esp+4+var_4], eax
jnz	short loc_8216A0
fld	[esp+4+var_4]
fld	st
call	__ftol2_sse
mov	ecx, eax
mov	[esp+4+arg_0], ecx
fild	[esp+4+arg_0]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_8216A0
test	ecx, ecx
jle	short loc_8216A0
cmp	ecx, (offset sub_FFFFFF+1)
jg	short loc_8216A0
lea	eax, [ecx-1]
or	ecx, 0FFFFFFFFh
cmp	eax, 100h
jb	short loc_821682

loc_821675:
shr	eax, 8
add	ecx, 8
cmp	eax, 100h
jnb	short loc_821675

loc_821682:
movzx	edx, ds:byte_1466A98[eax]
mov	eax, [esp+4+arg_8]
add	edx, ecx
inc	dword ptr [eax+edx*4+4]
lea	eax, [eax+edx*4+4]
mov	eax, 1
pop	ecx
retn	0Ch

loc_8216A0:
xor	eax, eax
pop	ecx
retn	0Ch
sub_821630 endp

align 10h



sub_8216B0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	ebx
push	ebp
xor	ebp, ebp
mov	ebx, 1
push	esi
xor	edx, edx
mov	eax, ebx
push	edi
mov	[esp+2Ch+var_8], ecx
mov	[esp+2Ch+var_10], ebp
mov	[esp+2Ch+var_C], edx
mov	[esp+2Ch+var_18], eax
jmp	short loc_8216D8

loc_8216D4:
mov	eax, [esp+2Ch+var_18]

loc_8216D8:
mov	edi, [ecx+18h]
xor	esi, esi
mov	[esp+2Ch+var_1C], esi
cmp	eax, edi
jbe	short loc_8216F1
mov	eax, edi
cmp	ebx, eax
ja	loc_821773
jmp	short loc_8216F5

loc_8216F1:
cmp	ebx, eax
ja	short loc_821752

loc_8216F5:
mov	ebp, [ecx+10h]
sub	eax, ebx
inc	eax
lea	esi, [ebx-1]
add	ebx, eax
mov	[esp+2Ch+var_14], eax
mov	[esp+2Ch+var_4], ebx

loc_821708:
mov	eax, esi
shr	eax, 1
mov	edx, esi
and	edx, 1
mov	bl, dl
add	eax, ebp
mov	al, [eax+edi*4]
neg	dl
shr	dl, 1
mov	cl, al
shr	cl, 4
dec	bl
and	dl, al
and	cl, bl
and	dl, 0Fh
or	cl, dl
jz	short loc_821732
inc	[esp+2Ch+var_1C]

loc_821732:
inc	esi
sub	[esp+2Ch+var_14], 1
jnz	short loc_821708
mov	ecx, [esp+2Ch+var_8]
mov	edx, [esp+2Ch+var_C]
mov	ebx, [esp+2Ch+var_4]
mov	ebp, [esp+2Ch+var_10]
mov	eax, [esp+2Ch+var_18]
mov	esi, [esp+2Ch+var_1C]

loc_821752:
mov	edi, [esp+2Ch+arg_0]
add	[edi+edx*4], esi
inc	edx
add	ebp, esi
add	eax, eax
mov	[esp+2Ch+var_10], ebp
mov	[esp+2Ch+var_C], edx
mov	[esp+2Ch+var_18], eax
cmp	edx, 18h
jb	loc_8216D4

loc_821773:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 1Ch
retn	4
sub_8216B0 endp

align 10h


; Attributes: thunk

sub_821780 proc	near
jmp	sub_821310
sub_821780 endp

align 10h


; Attributes: thunk

sub_821790 proc	near
jmp	sub_8213F0
sub_821790 endp

align 10h



sub_8217A0 proc	near

var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	ebp, ecx
push	edi
mov	edi, [ebp+18h]
test	edi, edi
jbe	loc_82184B
mov	ecx, [ebp+10h]
lea	eax, [edi-1]
mov	esi, eax
and	eax, 1
shr	esi, 1
add	esi, ecx
mov	bl, al
mov	[esp+1Ch+var_4], ecx
mov	cl, [esi+edi*4]
lea	edx, ds:0[edi*4]
neg	al
mov	[esp+1Ch+var_9], cl
shr	al, 1
and	al, [esp+1Ch+var_9]
shr	cl, 4
dec	bl
and	cl, bl
and	al, 0Fh
or	cl, al
mov	[esp+1Ch+var_8], edx
jnz	short loc_82184B
xor	ebp, ebp
cmp	edi, 1
jbe	short loc_821841
jmp	short loc_821804
align 10h

loc_821800:
mov	edx, [esp+1Ch+var_8]

loc_821804:
lea	esi, [edi+ebp]
shr	esi, 1
lea	ecx, [esi-1]
mov	eax, ecx
shr	eax, 1
add	eax, [esp+1Ch+var_4]
and	ecx, 1
mov	al, [eax+edx]
mov	dl, cl
neg	cl
shr	cl, 1
mov	bl, al
dec	dl
shr	bl, 4
and	cl, al
and	dl, bl
and	cl, 0Fh
or	dl, cl
jnz	short loc_821836
mov	edi, esi
jmp	short loc_821838

loc_821836:
mov	ebp, esi

loc_821838:
mov	eax, edi
sub	eax, ebp
cmp	eax, 1
ja	short loc_821800

loc_821841:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_82184B:
mov	ecx, [ebp+8]
and	ecx, 0FFFFFFFh
cmp	ecx, 1
jnb	short loc_821863
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_821863:
mov	ebx, edi
lea	esi, [ebx+1]
push	esi
mov	ecx, ebp
call	sub_821470
cmp	eax, offset sub_FFFFFF
jz	short loc_8218A8
jmp	short loc_821880
align 10h

loc_821880:
lea	edx, [eax+eax*2]
mov	eax, [ebp+0Ch]
test	byte ptr [eax+edx*4+0Bh], 0Fh
jz	short loc_8218A8
mov	ebx, esi
add	esi, esi
cmp	esi, 7FFFFFFFh
ja	short loc_8218DE
push	esi
mov	ecx, ebp
call	sub_821470
cmp	eax, offset sub_FFFFFF
jnz	short loc_821880

loc_8218A8:
mov	eax, esi
sub	eax, ebx
cmp	eax, 1
jbe	loc_821968

loc_8218B5:
lea	edi, [esi+ebx]
shr	edi, 1
push	edi
mov	ecx, ebp
call	sub_821470
cmp	eax, offset sub_FFFFFF
jz	loc_821959
mov	edx, [ebp+0Ch]
lea	ecx, [eax+eax*2]
test	byte ptr [edx+ecx*4+0Bh], 0Fh
jz	short loc_821959
mov	ebx, edi
jmp	short loc_82195B

loc_8218DE:
mov	esi, 1
mov	[esp+1Ch+var_8], esi
cmp	edi, esi
jb	short loc_821926
xor	esi, esi
lea	ecx, [ecx+0]

loc_8218F0:
mov	eax, esi
shr	eax, 1
add	eax, [ebp+10h]
mov	cl, [eax+edi*4]
mov	eax, esi
and	eax, 1
mov	dl, al
neg	al
shr	al, 1
mov	bl, cl
and	al, cl
dec	dl
shr	bl, 4
and	al, 0Fh
and	dl, bl
or	dl, al
mov	eax, [esp+1Ch+var_8]
jz	short loc_821950
inc	eax
inc	esi
mov	[esp+1Ch+var_8], eax
cmp	eax, edi
jbe	short loc_8218F0
mov	esi, eax

loc_821926:
push	esi
mov	ecx, ebp
call	sub_821470
cmp	eax, offset sub_FFFFFF
jz	short loc_821945

loc_821935:
inc	esi
push	esi
mov	ecx, ebp
call	sub_821470
cmp	eax, offset sub_FFFFFF
jnz	short loc_821935

loc_821945:
pop	edi
lea	eax, [esi-1]
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_821950:
pop	edi
pop	esi
pop	ebp
dec	eax
pop	ebx
add	esp, 0Ch
retn

loc_821959:
mov	esi, edi

loc_82195B:
mov	eax, esi
sub	eax, ebx
cmp	eax, 1
ja	loc_8218B5

loc_821968:
pop	edi
pop	esi
pop	ebp
mov	eax, ebx
pop	ebx
add	esp, 0Ch
retn
sub_8217A0 endp

align 10h



sub_821980 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [ebp+4]
push	edi
mov	edi, ecx
mov	edx, [edi+8]
mov	eax, [edi+18h]
and	edx, 0FFFFFFFh
add	edx, eax
mov	[esp+10h+arg_4], edx
cmp	esi, edx
jnb	short loc_8219F4

loc_8219A3:
mov	ecx, [edi+18h]
cmp	esi, ecx
jnb	short loc_8219D9
mov	edx, [edi+10h]
mov	eax, esi
shr	eax, 1
lea	ecx, [eax+ecx*4]
mov	cl, [ecx+edx]
mov	eax, esi
and	eax, 1
mov	dl, al
neg	al
shr	al, 1
mov	bl, cl
dec	dl
shr	bl, 4
and	al, cl
and	dl, bl
and	al, 0Fh
or	dl, al
jnz	short loc_821A02
mov	edx, [esp+10h+arg_4]
jmp	short loc_8219EF

loc_8219D9:
mov	eax, [ebp+4]
mov	ebx, [edi+0Ch]
sub	eax, ecx
lea	ecx, [eax+eax*2]
test	byte ptr [ebx+ecx*4+0Bh], 0Fh
jnz	loc_821A77

loc_8219EF:
inc	esi
cmp	esi, edx
jb	short loc_8219A3

loc_8219F4:
pop	edi
pop	esi
mov	dword ptr [ebp+0], 0
pop	ebp
pop	ebx
retn	10h

loc_821A02:
mov	edx, esi
mov	[esp+10h+arg_4], edx
fild	[esp+10h+arg_4]
test	edx, edx
jge	short loc_821A16
fadd	ds:flt_15FCC08

loc_821A16:
fadd	ds:dbl_15FCC40
mov	eax, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_C]
mov	dword ptr [eax], 3
fstp	dword ptr [eax+4]
mov	eax, [edi+18h]
mov	edi, [edi+10h]
mov	ecx, [edi+esi*4]
mov	[edx+4], ecx
mov	ecx, esi
shr	ecx, 1
add	ecx, edi
mov	cl, [ecx+eax*4]
mov	eax, esi
and	eax, 1
mov	bl, al
neg	al
dec	bl
movzx	ecx, cl
movzx	edi, bl
shr	eax, 1
mov	ebx, ecx
shr	ebx, 4
and	edi, ebx
and	eax, 0Fh
and	eax, ecx
or	edi, eax
mov	[edx], edi
inc	esi
pop	edi
mov	[ebp+4], esi
pop	esi
mov	dword ptr [ebp+0], 1
pop	ebp
pop	ebx
retn	10h

loc_821A77:
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
mov	ecx, ebx
movzx	edx, byte ptr [ecx+eax+0Bh]
mov	ebx, [esp+10h+arg_C]
add	ecx, eax
mov	ecx, [ecx+4]
mov	[ebx+4], ecx
mov	ecx, [esp+10h+arg_8]
and	edx, 0Fh
mov	[ebx], edx
mov	edi, [edi+0Ch]
add	edi, eax
mov	eax, [edi+8]
mov	edi, [edi]
mov	[ecx+4], edi
shr	eax, 1Ch
inc	esi
pop	edi
mov	[ecx], eax
mov	[ebp+4], esi
pop	esi
mov	dword ptr [ebp+0], 1
pop	ebp
pop	ebx
retn	10h
sub_821980 endp

align 10h



sub_821AC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [ecx+0Ch]
test	esi, esi
jnz	short loc_821AE1
mov	ecx, dword_1859274
mov	eax, [esp+4+arg_8]
mov	[eax], ecx
mov	edx, dword_1859278
mov	[eax+4], edx
pop	esi
retn	0Ch

loc_821AE1:
mov	edx, [ecx+8]
mov	eax, [esp+4+arg_0]
and	edx, 0FFFFFFFh
push	edi
cmp	eax, edx
jnb	short loc_821B0E
lea	edi, [eax+eax*2]
lea	edi, [esi+edi*4+8]
lea	ebx, [ebx+0]

loc_821B00:
test	byte ptr [edi+3], 0Fh
jnz	short loc_821B28
inc	eax
add	edi, 0Ch
cmp	eax, edx
jb	short loc_821B00

loc_821B0E:
mov	ecx, dword_1859274
mov	eax, [esp+8+arg_8]
mov	[eax], ecx
mov	edx, dword_1859278
pop	edi
mov	[eax+4], edx
pop	esi
retn	0Ch

loc_821B28:
mov	edi, [esp+8+arg_4]
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
mov	edx, [eax+esi+8]
mov	esi, [eax+esi]
mov	[edi+4], esi
shr	edx, 1Ch
mov	[edi], edx
mov	ecx, [ecx+0Ch]
mov	edx, [esp+8+arg_8]
add	ecx, eax
movzx	eax, byte ptr [ecx+0Bh]
mov	ecx, [ecx+4]
and	eax, 0Fh
pop	edi
mov	[edx], eax
mov	[edx+4], ecx
pop	esi
retn	0Ch
sub_821AC0 endp

align 10h



sub_821B60 proc	near

var_A= word ptr	-0Ah
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebp
mov	ebp, ecx
mov	ecx, [esp+10h+arg_0]
cmp	dword ptr [ecx], 0
push	esi
push	edi
jnz	short loc_821B75
xor	esi, esi
jmp	short loc_821B9A

loc_821B75:
fld	dword ptr [ecx+4]
fnstcw	[esp+18h+var_A]
movzx	eax, [esp+18h+var_A]
or	eax, 0C00h
mov	dword ptr [esp+18h+var_8], eax
fldcw	word ptr [esp+18h+var_8]
fistp	[esp+18h+var_8]
mov	esi, dword ptr [esp+18h+var_8]
fldcw	[esp+18h+var_A]

loc_821B9A:
mov	edi, [ebp+18h]
cmp	esi, edi
jnb	short loc_821BD4
push	ebx

loc_821BA2:
mov	eax, esi
shr	eax, 1
add	eax, [ebp+10h]
mov	cl, [eax+edi*4]
mov	eax, esi
and	eax, 1
mov	bl, al
neg	al
shr	al, 1
mov	dl, cl
shr	dl, 4
dec	bl
and	al, cl
and	dl, bl
and	al, 0Fh
or	dl, al
jnz	short loc_821BCD
inc	esi
cmp	esi, edi
jb	short loc_821BA2

loc_821BCD:
mov	ecx, [esp+1Ch+arg_0]
pop	ebx
cmp	esi, edi

loc_821BD4:
jnz	short loc_821BEE
mov	eax, [esp+18h+arg_4]
push	eax
push	ecx
push	0
mov	ecx, ebp
call	sub_821AC0
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	8

loc_821BEE:
mov	edx, esi
mov	[esp+18h+arg_0], edx
fild	[esp+18h+arg_0]
test	edx, edx
jge	short loc_821C02
fadd	ds:flt_15FCC08

loc_821C02:
fadd	ds:dbl_15FCC40
mov	edi, [esp+18h+arg_4]
mov	dword ptr [ecx], 3
fstp	dword ptr [ecx+4]
mov	eax, [ebp+10h]
mov	edx, [eax+esi*4]
mov	ecx, [ebp+18h]
mov	[edi+4], edx
mov	edx, esi
shr	edx, 1
add	edx, eax
mov	cl, [edx+ecx*4]
and	esi, 1
mov	eax, esi
mov	dl, al
neg	al
movzx	ecx, cl
dec	dl
movzx	edx, dl
shr	eax, 1
mov	esi, ecx
shr	esi, 4
and	eax, 0Fh
and	edx, esi
and	eax, ecx
or	edx, eax
mov	[edi], edx
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	8
sub_821B60 endp

align 10h



sub_821C60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
push	edi
mov	edi, ecx
mov	ebp, [edi+8]
and	ebp, 0FFFFFFFh
jnz	short loc_821C79
pop	edi
mov	eax, offset sub_FFFFFF
pop	ebp
retn	0Ch

loc_821C79:
push	esi
mov	esi, [esp+0Ch+arg_4]
mov	eax, esi
sub	eax, 0
jz	loc_821D4C
sub	eax, 3
jz	short loc_821CA3
sub	eax, 1
jnz	short loc_821CCF
mov	eax, [esp+0Ch+arg_8]
push	eax
call	sub_821510
pop	esi
pop	edi
pop	ebp
retn	0Ch

loc_821CA3:
fld	[esp+0Ch+arg_8]
fld	st
call	__ftol2_sse
mov	ecx, eax
mov	[esp+0Ch+arg_4], ecx
fild	[esp+0Ch+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_821CCF
push	ecx
mov	ecx, edi
call	sub_821470
pop	esi
pop	edi
pop	ebp
retn	0Ch

loc_821CCF:
mov	ecx, [esp+0Ch+arg_0]
push	ebx
mov	ebx, [esp+10h+arg_8]
push	ebx
push	esi
push	ebp
push	ecx
call	sub_8211D0
mov	edi, [edi+0Ch]
add	esp, 10h
mov	ecx, eax
lea	esp, [esp+0]

loc_821CF0:
lea	edx, [ecx+ecx*2]
mov	eax, [edi+edx*4+8]
lea	edx, [edi+edx*4]
shr	eax, 1Ch
cmp	eax, esi
jnz	short loc_821D29
mov	eax, [edx]
mov	[esp+10h+arg_0], ebx
mov	[esp+10h+arg_4], eax
cmp	eax, ebx
jz	short loc_821D43
test	esi, esi
jz	short loc_821D43
cmp	esi, 3
jnz	short loc_821D29
fld	[esp+10h+arg_4]
fld	[esp+10h+arg_0]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_821D43

loc_821D29:
mov	ecx, [edx+8]
and	ecx, offset sub_FFFFFF
cmp	ecx, offset sub_FFFFFF
jnz	short loc_821CF0
pop	ebx
pop	esi
pop	edi
mov	eax, ecx
pop	ebp
retn	0Ch

loc_821D43:
pop	ebx
pop	esi
pop	edi
mov	eax, ecx
pop	ebp
retn	0Ch

loc_821D4C:
pop	esi
pop	edi
mov	eax, offset sub_FFFFFF
pop	ebp
retn	0Ch
sub_821C60 endp

align 10h



sub_821D60 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+8]
xor	eax, eax
xor	ecx, ecx
and	edi, 0FFFFFFFh
mov	[esp+10h+var_4], eax
mov	[esp+10h+var_8], ecx
jz	short loc_821DE1
push	ebx
lea	ebx, [edi+edi*2]
add	ebx, ebx
push	ebp
mov	ebp, [esp+18h+arg_0]
add	ebx, ebx
jmp	short loc_821D90
align 10h

loc_821D90:
mov	eax, [esi+0Ch]
sub	ebx, 0Ch
lea	ecx, [eax+ebx]
mov	eax, [ecx+8]
dec	edi
test	eax, 0F000000h
jz	short loc_821DBF
mov	ecx, [ecx]
push	ebp
push	ecx
shr	eax, 1Ch
push	eax
mov	ecx, esi
call	sub_821630
test	eax, eax
jz	short loc_821DBB
inc	[esp+18h+var_8]

loc_821DBB:
inc	[esp+18h+var_4]

loc_821DBF:
test	edi, edi
jnz	short loc_821D90
mov	ecx, [esp+18h+arg_4]
mov	edx, [esp+18h+var_8]
mov	eax, [esp+18h+arg_8]
pop	ebp
pop	ebx
mov	[ecx], edx
mov	ecx, [esp+10h+var_4]
pop	edi
mov	[eax], ecx
pop	esi
add	esp, 8
retn	0Ch

loc_821DE1:
mov	edx, [esp+10h+arg_4]
mov	[edx], ecx
mov	ecx, [esp+10h+arg_8]
pop	edi
mov	[ecx], eax
pop	esi
add	esp, 8
retn	0Ch
sub_821D60 endp

align 10h



sub_821E00 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_8]
sub	esp, 18h
mov	ecx, eax
push	ebx
shr	ecx, 1
lea	ebx, [ecx+eax*4]
and	eax, 1
push	esi
add	ebx, eax
push	edi
test	edx, edx
jbe	short loc_821E4A
lea	eax, [edx-1]
or	ecx, 0FFFFFFFFh
cmp	eax, 100h
jb	short loc_821E3D
jmp	short loc_821E30
align 10h

loc_821E30:
shr	eax, 8
add	ecx, 8
cmp	eax, 100h
jnb	short loc_821E30

loc_821E3D:
movzx	eax, ds:byte_1466A98[eax]
lea	edi, [eax+ecx+1]
jmp	short loc_821E4C

loc_821E4A:
xor	edi, edi

loc_821E4C:
test	edx, edx
jbe	short loc_821E62
mov	eax, 1
mov	ecx, edi
shl	eax, cl
lea	esi, [eax+eax*2]
add	esi, esi
add	esi, esi
jmp	short loc_821E64

loc_821E62:
xor	esi, esi

loc_821E64:
push	ebp
mov	ebp, [esp+28h+arg_0]
cmp	edi, 18h
jbe	short loc_821E7C
push	offset aTableOverflowH ; "Table	overflow (hash part too	big)"
push	ebp
call	sub_81A760
add	esp, 8

loc_821E7C:		; int
push	3
lea	ecx, [esp+2Ch+var_C]
push	ecx		; void *
lea	edx, [esp+30h+var_18]
push	edx		; int
push	ebp		; int
mov	[esp+38h+var_18], 1Ch
mov	[esp+38h+var_14], ebx
mov	[esp+38h+var_10], esi
call	sub_82C790
mov	ecx, [esp+38h+var_C]
add	esp, 10h
pop	ebp
test	ecx, ecx
jz	short loc_821ECD
mov	eax, [esp+24h+var_4]
mov	edx, [esp+24h+var_8]
push	esi		; size_t
push	eax		; void *
mov	eax, [esp+2Ch+arg_8]
push	ebx		; size_t
push	edx		; void *
mov	edx, [esp+34h+arg_4]
push	edi		; int
push	eax		; int
push	edx		; int
call	sub_821260
pop	edi
pop	esi
pop	ebx
add	esp, 18h
retn

loc_821ECD:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
add	esp, 18h
retn
sub_821E00 endp

align 10h


; Attributes: thunk

sub_821EE0 proc	near
jmp	sub_8217A0
sub_821EE0 endp

align 10h



sub_821EF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
push	eax
mov	esi, ecx
call	sub_821510
cmp	eax, offset sub_FFFFFF
jz	short loc_821F39
mov	edx, [esi+0Ch]
lea	ecx, [eax+eax*2]
test	byte ptr [edx+ecx*4+0Bh], 0Fh
lea	ecx, [edx+ecx*4]
jz	short loc_821F39
movzx	eax, byte ptr [ecx+0Bh]
mov	ecx, [ecx+4]
mov	edx, [esp+4+arg_4]
and	eax, 0Fh
mov	[edx], eax
mov	[edx+4], ecx
mov	eax, 1
xor	ecx, ecx
test	eax, eax
setnz	cl
pop	esi
mov	eax, ecx
retn	8

loc_821F39:
xor	eax, eax
xor	ecx, ecx
test	eax, eax
setnz	cl
pop	esi
mov	eax, ecx
retn	8
sub_821EF0 endp

align 10h


; Attributes: thunk

sub_821F50 proc	near
jmp	sub_821980
sub_821F50 endp

align 10h



sub_821F60 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	ebx, [edi]
mov	esi, ecx
cmp	ebx, 3
jnz	short loc_821FAD
fld	dword ptr [edi+4]
call	__ftol2_sse
mov	ecx, eax
mov	[esp+0Ch+arg_4], ecx
fild	[esp+0Ch+arg_4]
fld	dword ptr [edi+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_821FAD
test	ecx, ecx
jle	short loc_821FAD
lea	eax, [ecx-1]
cmp	eax, [esi+18h]
jnb	short loc_821FAD
mov	ecx, [esp+0Ch+arg_8]
push	ecx
push	eax
mov	ecx, esi
call	sub_818DA0
pop	edi
pop	esi
pop	ebx
retn	0Ch

loc_821FAD:
mov	edx, [edi+4]
mov	eax, [esp+0Ch+arg_0]
push	edx
push	ebx
push	eax
mov	ecx, esi
call	sub_821C60
cmp	eax, offset sub_FFFFFF
jz	short loc_821FE8
mov	edx, [esi+0Ch]
lea	ecx, [eax+eax*2]
movzx	eax, byte ptr [edx+ecx*4+0Bh]
lea	ecx, [edx+ecx*4]
mov	ecx, [ecx+4]
mov	edx, [esp+0Ch+arg_8]
pop	edi
and	eax, 0Fh
pop	esi
mov	[edx], eax
mov	[edx+4], ecx
pop	ebx
retn	0Ch

loc_821FE8:
mov	ecx, dword_1859274
mov	eax, [esp+0Ch+arg_8]
pop	edi
mov	[eax], ecx
mov	edx, dword_1859278
pop	esi
mov	[eax+4], edx
pop	ebx
retn	0Ch
sub_821F60 endp

align 10h



sub_822010 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_0]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi+4]
mov	esi, ecx
mov	ecx, [edi]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_821C60
cmp	eax, offset sub_FFFFFF
jz	short loc_822046
mov	ecx, [esp+8+arg_8]
push	ecx
push	edi
inc	eax
push	eax
mov	ecx, esi
call	sub_821AC0
pop	edi
pop	esi
retn	0Ch

loc_822046:
mov	edx, dword_1859274
mov	eax, [esp+8+arg_8]
mov	[eax], edx
mov	ecx, dword_1859278
pop	edi
mov	[eax+4], ecx
pop	esi
retn	0Ch
sub_822010 endp




sub_822060 proc	near

var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	byte ptr -64h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 6Ch
push	ebx
push	esi
push	edi
push	64h		; size_t
lea	eax, [esp+7Ch+var_64]
push	0		; int
push	eax		; void *
mov	edi, ecx
call	_memset
add	esp, 0Ch
lea	ecx, [esp+78h+var_64]
push	ecx
mov	ecx, edi
call	sub_8216B0
mov	ebx, eax
lea	edx, [esp+78h+var_68]
push	edx
lea	eax, [esp+7Ch+var_6C]
push	eax
lea	ecx, [esp+80h+var_64]
push	ecx
mov	ecx, edi
mov	esi, ebx
call	sub_821D60
mov	eax, [esp+78h+arg_4]
mov	ecx, [eax+4]
add	ebx, [esp+78h+var_6C]
add	esi, [esp+78h+var_68]
lea	edx, [esp+78h+var_64]
push	edx
mov	edx, [eax]
push	ecx
push	edx
mov	ecx, edi
mov	[esp+84h+var_6C], ebx
call	sub_821630
test	eax, eax
jz	short loc_8220CE
inc	ebx
mov	[esp+78h+var_6C], ebx

loc_8220CE:
lea	eax, [esp+78h+var_6C]
push	eax
lea	ecx, [esp+7Ch+var_64]
push	ecx
mov	ecx, edi
call	sub_8215D0
mov	edx, [esp+78h+var_6C]
sub	esi, eax
mov	eax, [esp+78h+arg_0]
inc	esi
push	esi		; void *
push	edx		; void *
push	eax		; int
mov	ecx, edi
call	sub_822430
pop	edi
pop	esi
pop	ebx
add	esp, 6Ch
retn	8
sub_822060 endp

align 10h


; Attributes: thunk

sub_822100 proc	near
jmp	sub_821F60
sub_822100 endp

align 10h



sub_822110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	eax, [edi]
mov	esi, ecx
test	eax, eax
jnz	short loc_82212E
mov	eax, [esp+8+arg_8]
push	eax
push	edi
call	sub_821B60
pop	edi
pop	esi
retn	0Ch

loc_82212E:
push	ebx
mov	ebx, [esi+18h]
test	ebx, ebx
jbe	short loc_82217C
mov	ecx, [edi+4]
mov	[esp+0Ch+arg_4], ecx
cmp	eax, 3
jnz	short loc_82217C
fld	[esp+0Ch+arg_4]
fld	st
call	__ftol2_sse
mov	ecx, eax
mov	[esp+0Ch+arg_4], ecx
fild	[esp+0Ch+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_82217C
test	ecx, ecx
jle	short loc_82217C
dec	ecx
cmp	ecx, ebx
jnb	short loc_82217C
mov	edx, [esp+0Ch+arg_8]
push	edx
push	edi
mov	ecx, esi
call	sub_821B60
pop	ebx
pop	edi
pop	esi
retn	0Ch

loc_82217C:
mov	eax, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_0]
push	eax
push	edi
push	ecx
mov	ecx, esi
call	sub_822010
pop	ebx
pop	edi
pop	esi
retn	0Ch
sub_822110 endp

align 10h



sub_8221A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
lea	esp, [esp+0]

loc_8221B0:
mov	edi, [esi+0Ch]
mov	ebx, [esp+20h+arg_4]
test	edi, edi
jz	short loc_8221DD
mov	eax, [ebx+4]
mov	ecx, [ebx]
mov	edx, [esi+8]
push	eax
mov	eax, [esp+24h+arg_0]
push	ecx
and	edx, 0FFFFFFFh
push	edx
push	eax
call	sub_8211D0
add	esp, 10h
mov	ebp, eax
jmp	short loc_8221DF

loc_8221DD:
xor	ebp, ebp

loc_8221DF:
test	edi, edi
jz	short loc_8221F2
lea	ecx, [ebp+ebp*2+0]
test	byte ptr [edi+ecx*4+0Bh], 0Fh
jz	loc_8223FE

loc_8221F2:
cmp	dword ptr [esi+14h], 0
jbe	short loc_822224
jmp	short loc_822200
align 10h

loc_822200:
dec	dword ptr [esi+14h]
mov	edi, [esi+14h]
mov	eax, [esi+0Ch]
lea	edx, [edi+edi*2]
test	dword ptr [eax+edx*4+8], 0F0000000h
jz	short loc_82221C
test	edi, edi
ja	short loc_822200
jmp	short loc_822224

loc_82221C:
cmp	edi, offset sub_FFFFFF
jnz	short loc_82229F

loc_822224:
mov	edi, [esp+20h+arg_0]
mov	eax, [esp+20h+arg_8]
mov	ecx, [edi]
push	eax
add	ecx, 230h
call	sub_81DA30
push	ebx
push	edi
mov	ecx, esi
call	sub_822060
mov	ecx, [edi]
add	ecx, 230h
call	sub_81DA50
fld	dword ptr [ebx+4]
lea	edi, [ebx+4]
call	__ftol2_sse
cmp	dword ptr [ebx], 3
mov	ecx, eax
mov	[esp+20h+var_10], ecx
jnz	loc_8221B0
fild	[esp+20h+var_10]
fld	dword ptr [edi]
fucompp
fnstsw	ax
test	ah, 44h
jp	loc_8221B0
test	ecx, ecx
jle	loc_8221B0
lea	edx, [ecx-1]
cmp	edx, [esi+18h]
jnb	loc_8221B0
pop	edi
pop	esi
mov	eax, ecx
pop	ebp
neg	eax
pop	ebx
add	esp, 10h
retn	0Ch

loc_82229F:
mov	ebx, eax
lea	eax, [ebp+ebp*2+0]
add	eax, eax
add	eax, eax
mov	ecx, [eax+ebx]
mov	[esp+20h+arg_8], eax
mov	eax, [eax+ebx+8]
mov	[esp+20h+var_10], eax
push	ecx
mov	ecx, [esp+24h+arg_0]
shr	eax, 1Ch
push	eax
mov	eax, [esi+8]
and	eax, 0FFFFFFFh
push	eax
push	ecx
call	sub_8211D0
add	esp, 10h
cmp	eax, ebp
jz	loc_8223CC
lea	ecx, [eax+eax*2]
add	ecx, ecx
add	ecx, ecx
mov	edx, [ecx+ebx+8]
and	edx, offset sub_FFFFFF
cmp	edx, ebp
jz	short loc_822310

loc_8222F0:
mov	eax, [ecx+ebx+8]
and	eax, offset sub_FFFFFF
lea	ecx, [eax+eax*2]
add	ecx, ecx
add	ecx, ecx
mov	edx, ebx
mov	edx, [edx+ecx+8]
and	edx, offset sub_FFFFFF
cmp	edx, ebp
jnz	short loc_8222F0

loc_822310:
lea	eax, [eax+eax*2]
mov	ecx, [ebx+eax*4+8]
lea	ebx, [ebx+eax*4]
and	ecx, 0FF000000h
or	ecx, edi
mov	[ebx+8], ecx
mov	edx, [esi+0Ch]
mov	ecx, [esp+20h+arg_8]
mov	ebx, [ecx+edx]
lea	eax, [edi+edi*2]
add	ecx, edx
add	eax, eax
add	eax, eax
add	edx, eax
mov	[edx], ebx
mov	ebx, [ecx+4]
mov	[edx+4], ebx
mov	ecx, [ecx+8]
mov	[edx+8], ecx
cmp	edi, ebp
jnb	short loc_8223AD
mov	edx, [esi+0Ch]
mov	ecx, [eax+edx+8]
mov	edi, [esp+20h+arg_0]
add	eax, edx
mov	edx, [eax]
shr	ecx, 1Ch
mov	[esp+20h+var_10], ecx
mov	[esp+20h+var_C], edx
movzx	ecx, byte ptr [eax+0Bh]
mov	eax, [eax+4]
and	ecx, 0Fh
mov	[esp+20h+var_8], ecx
mov	ecx, [edi]
add	ecx, 230h
mov	ebx, 1
mov	[esp+20h+var_4], eax
cmp	[ecx+0Ch], ebx
jnz	short loc_822395
lea	eax, [esp+20h+var_10]
push	eax
push	esi
call	sub_81EB00

loc_822395:
mov	ecx, [edi]
add	ecx, 230h
cmp	[ecx+0Ch], ebx
jnz	short loc_8223AD
lea	edx, [esp+20h+var_8]
push	edx
push	esi
call	sub_81EB00

loc_8223AD:
mov	eax, [esi+0Ch]
mov	ecx, [esp+20h+arg_8]
or	dword ptr [eax+ecx+8], offset sub_FFFFFF
add	eax, ecx
mov	eax, [esi+0Ch]
add	eax, ecx
and	dword ptr [eax+8], 0F0FFFFFFh
jmp	short loc_8223FA

loc_8223CC:
lea	eax, [edi+edi*2]
mov	ecx, [ebx+eax*4+8]
xor	ecx, [esp+20h+var_10]
lea	ebx, [ebx+eax*4]
and	ecx, offset sub_FFFFFF
xor	[ebx+8], ecx
mov	eax, [esi+0Ch]
add	eax, [esp+20h+arg_8]
mov	ebp, edi
mov	edx, [eax+8]
and	edx, 0FF000000h
or	edx, edi
mov	[eax+8], edx

loc_8223FA:
mov	ebx, [esp+20h+arg_4]

loc_8223FE:
mov	ecx, [ebx+4]
mov	edx, [esi+0Ch]
mov	ebx, [ebx]
lea	eax, [ebp+ebp*2+0]
lea	eax, [edx+eax*4]
mov	[eax], ecx
mov	ecx, [eax+8]
shl	ebx, 1Ch
and	ecx, 0FFFFFFFh
pop	edi
or	ebx, ecx
mov	[eax+8], ebx
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
add	esp, 10h
retn	0Ch
sub_8221A0 endp

align 10h



; int __stdcall	sub_822430(int,	void *,	void *)
sub_822430 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 2Ch
push	ebx
mov	ebx, [esp+30h+arg_4]
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+8]
mov	ecx, [esi+18h]
and	eax, 0FFFFFFFh
mov	[esp+38h+var_28], eax
mov	eax, [esi+0Ch]
mov	[esp+38h+var_24], eax
xor	ebp, ebp
xor	eax, eax
push	edi
mov	[esp+3Ch+var_2C], ecx
cmp	ebx, ecx
jz	short loc_82246D
mov	ecx, ebx
shr	ecx, 1
mov	edx, ebx
lea	ebp, [ecx+ebx*4]
and	edx, 1
add	ebp, edx

loc_82246D:
mov	edi, [esp+3Ch+arg_8]
test	edi, edi
jz	short loc_8224AE
jbe	short loc_82249E
lea	eax, [edi-1]
or	ecx, 0FFFFFFFFh
cmp	eax, 100h
jb	short loc_822491

loc_822484:
shr	eax, 8
add	ecx, 8
cmp	eax, 100h
jnb	short loc_822484

loc_822491:
movzx	eax, ds:byte_1466A98[eax]
lea	ecx, [eax+ecx+1]
jmp	short loc_8224A0

loc_82249E:
xor	ecx, ecx

loc_8224A0:
mov	eax, 1
shl	eax, cl
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax

loc_8224AE:		; int
push	2
lea	ecx, [esp+40h+var_18]
push	ecx		; void *
lea	edx, [esp+44h+var_20]
mov	[esp+44h+var_1C], eax
mov	eax, [esp+44h+arg_0]
push	edx		; int
push	eax		; int
mov	[esp+4Ch+var_20], ebp
call	sub_82C790
mov	eax, [esp+4Ch+var_18]
mov	ecx, [esp+4Ch+var_14]
add	esp, 10h
mov	[esp+3Ch+arg_4], eax
mov	[esp+3Ch+arg_8], ecx
cmp	ebx, [esp+3Ch+var_2C]
jbe	short loc_8224F4
mov	edx, [esp+3Ch+arg_0]
push	ebx		; int
push	ebp		; size_t
push	eax		; void *
push	edx		; int
mov	ecx, esi
call	sub_821570

loc_8224F4:
xor	ecx, ecx
cmp	edi, ecx
jnz	short loc_82250C
mov	[esi+0Ch], ecx
mov	dword ptr [esi+8], 80000000h
mov	[esi+14h], ecx
jmp	loc_8225B6

loc_82250C:
jbe	short loc_822538
lea	eax, [edi-1]
or	ecx, 0FFFFFFFFh
cmp	eax, 100h
jb	short loc_82252D
jmp	short loc_822520
align 10h

loc_822520:
shr	eax, 8
add	ecx, 8
cmp	eax, 100h
jnb	short loc_822520

loc_82252D:
movzx	eax, ds:byte_1466A98[eax]
lea	ecx, [eax+ecx+1]

loc_822538:
mov	ebp, 1
shl	ebp, cl
lea	edi, [ebp+ebp*2+0]
add	edi, edi
add	edi, edi
cmp	ecx, 18h
jbe	short loc_82255E
mov	ecx, [esp+3Ch+arg_0]
push	offset aTableOverflo_0 ; "Table	overflow (hash part too	big)"
push	ecx
call	sub_81A760
add	esp, 8

loc_82255E:		; size_t
push	edi
mov	edi, [esp+40h+arg_8]
push	0		; int
push	edi		; void *
call	_memset
add	esp, 0Ch
test	ebp, ebp
jbe	short loc_82258E
lea	eax, [edi+8]
mov	ecx, ebp
jmp	short loc_822580
align 10h

loc_822580:
mov	dword ptr [eax], offset	sub_FFFFFF
add	eax, 0Ch
sub	ecx, 1
jnz	short loc_822580

loc_82258E:
mov	edx, [esp+3Ch+arg_0]
mov	eax, ebp
or	eax, 80000000h
mov	[esi+8], eax
and	eax, 0FFFFFFFh
mov	[esi+0Ch], edi
mov	[esi+14h], eax
mov	eax, [edx]
cmp	dword ptr [eax+23Ch], 1
jnz	short loc_8225B6
or	dword ptr [edi-4], 1

loc_8225B6:
cmp	ebx, [esp+3Ch+var_2C]
jnb	loc_8226C5
mov	ecx, [esp+3Ch+arg_4]
mov	ebp, [esi+10h]
mov	eax, ebx
and	eax, 1
mov	edi, ebx
lea	edx, [eax+ebx*4]
shr	edi, 1
add	edx, edi
push	edx		; size_t
mov	[esp+40h+arg_8], eax
mov	eax, ecx
push	0		; int
push	eax		; void *
mov	[esi+10h], ecx
mov	[esi+18h], ebx
call	_memset
mov	ecx, [esi+10h]
lea	eax, ds:0[ebx*4]
push	eax
push	ebp
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+54h+var_2C]
mov	edx, [esp+54h+arg_8]
mov	ecx, [esi+10h]
add	eax, eax
add	eax, eax
add	edx, edi
push	edx
add	eax, ebp
push	eax
lea	eax, ds:0[ebx*4]
add	ecx, eax
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 24h

loc_822623:
mov	eax, [esp+3Ch+var_2C]
mov	edx, [ebp+ebx*4+0]
add	eax, eax
add	eax, eax
mov	ecx, ebx
shr	ecx, 1
add	ecx, eax
mov	cl, [ecx+ebp]
mov	[esp+3Ch+var_4], edx
mov	eax, ebx
and	eax, 1
mov	dl, al
neg	al
dec	dl
movzx	ecx, cl
movzx	edi, dl
shr	eax, 1
mov	edx, ecx
shr	edx, 4
and	eax, 0Fh
and	edi, edx
and	eax, ecx
or	edi, eax
jz	short loc_8226BA
mov	eax, ebx
mov	[esp+3Ch+arg_4], eax
fild	[esp+3Ch+arg_4]
test	eax, eax
jge	short loc_822673
fadd	ds:flt_15FCC08

loc_822673:
fadd	ds:dbl_15FCC40
mov	edx, [esp+3Ch+arg_0]
push	0
lea	ecx, [esp+40h+var_10]
push	ecx
fstp	[esp+44h+var_C]
push	edx
mov	ecx, esi
mov	[esp+48h+var_10], 3
call	sub_8221A0
mov	ecx, [esi+0Ch]
lea	eax, [eax+eax*2]
mov	edx, [ecx+eax*4+8]
lea	eax, [ecx+eax*4]
mov	ecx, [esp+3Ch+var_4]
and	edx, 0F0FFFFFFh
shl	edi, 18h
or	edx, edi
mov	[eax+8], edx
mov	[eax+4], ecx

loc_8226BA:
inc	ebx
cmp	ebx, [esp+3Ch+var_2C]
jb	loc_822623

loc_8226C5:
mov	ecx, [esp+3Ch+var_28]
add	ecx, 0FFFFFFFFh
mov	[esp+3Ch+arg_4], ecx
js	loc_8227CC
mov	eax, [esp+3Ch+var_24]
lea	edx, [ecx+ecx*2]
lea	edi, [eax+edx*4+8]

loc_8226E1:
mov	ebp, [edi]
mov	eax, ebp
shr	eax, 18h
and	eax, 0Fh
mov	[esp+3Ch+arg_8], eax
jz	loc_8227BC
mov	ebx, [edi-8]
mov	[esp+3Ch+var_24], ebx
fld	[esp+3Ch+var_24]
call	__ftol2_sse
mov	edx, ebp
shr	edx, 1Ch
mov	ecx, eax
mov	[esp+3Ch+var_24], ecx
cmp	edx, 3
jnz	short loc_822780
fild	[esp+3Ch+var_24]
mov	[esp+3Ch+var_28], ebx
fld	[esp+3Ch+var_28]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_822780
test	ecx, ecx
jle	short loc_822780
mov	eax, [esi+18h]
dec	ecx
mov	[esp+3Ch+var_24], eax
cmp	ecx, eax
jnb	short loc_822780
mov	ebp, [esi+10h]
mov	edx, [edi-4]
mov	ebx, [esp+3Ch+var_24]
mov	[ebp+ecx*4+0], edx
mov	edx, ecx
shr	ecx, 1
add	ecx, ebp
lea	ebp, [ecx+ebx*4]
mov	bl, byte ptr [esp+3Ch+arg_8]
and	edx, 1
mov	al, dl
dec	dl
neg	al
shr	al, 1
mov	cl, dl
xor	cl, al
and	al, byte ptr [esp+3Ch+arg_8]
and	cl, 0Fh
xor	cl, dl
not	cl
and	cl, [ebp+0]
shl	bl, 4
and	bl, dl
or	cl, bl
or	cl, al
mov	[ebp+0], cl
jmp	short loc_8227B8

loc_822780:
mov	eax, [esp+3Ch+arg_0]
mov	[esp+3Ch+var_10], edx
push	0
lea	edx, [esp+40h+var_10]
push	edx
push	eax
mov	ecx, esi
mov	[esp+48h+var_C], ebx
call	sub_8221A0
mov	ecx, [edi-4]
lea	edx, [eax+eax*2]
mov	eax, [esi+0Ch]
lea	eax, [eax+edx*4]
mov	edx, [eax+8]
xor	edx, [edi]
mov	[eax+4], ecx
and	edx, 0F000000h
xor	[eax+8], edx

loc_8227B8:
mov	ecx, [esp+3Ch+arg_4]

loc_8227BC:
dec	ecx
sub	edi, 0Ch
mov	[esp+3Ch+arg_4], ecx
test	ecx, ecx
jge	loc_8226E1

loc_8227CC:
mov	esi, [esi+10h]
test	esi, esi
jz	short loc_8227E9
mov	eax, [esp+3Ch+arg_0]
mov	ecx, [eax]
mov	eax, 1
cmp	[ecx+23Ch], eax
jnz	short loc_8227E9
or	[esi-4], eax

loc_8227E9:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 2Ch
retn	0Ch
sub_822430 endp

align 10h


; Attributes: thunk

sub_822800 proc	near
jmp	sub_822110
sub_822800 endp

align 10h



sub_822810 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
mov	eax, [ebx]
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	edi, [esp+10h+arg_8]
mov	esi, ecx
cmp	eax, 4
jnz	short loc_822841
mov	ecx, [esi+4]
test	ecx, ecx
jz	short loc_822841
mov	eax, [ebx+4]
push	edi
push	eax
push	ecx
push	ebp
call	sub_822E20
add	esp, 10h
jmp	short loc_8228AF

loc_822841:
cmp	eax, 3
jnz	short loc_82289D
fld	dword ptr [ebx+4]
call	__ftol2_sse
mov	ecx, eax
mov	[esp+10h+arg_4], ecx
fild	[esp+10h+arg_4]
fld	dword ptr [ebx+4]
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_822888
test	ecx, ecx
jle	short loc_8228AF
lea	eax, [ecx-1]
cmp	eax, [esi+18h]
jnb	short loc_8228AF
mov	ecx, edi
mov	edx, [ecx+4]
mov	ecx, [ecx]
push	edx
push	ecx
push	eax
mov	ecx, esi
call	sub_821150
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_822888:
fld	dword ptr [ebx+4]
fld	st
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_8228AF
push	offset aTableIndexIsNa ; "table	index is NaN"
jmp	short loc_8228A6

loc_82289D:
test	eax, eax
jnz	short loc_8228AF
push	offset aTableIndexIs_0 ; "table	index is nil"

loc_8228A6:
push	ebp
call	sub_81A760
add	esp, 8

loc_8228AF:
mov	edx, [ebx+4]
mov	eax, [ebx]
push	edx
push	eax
push	ebp
mov	ecx, esi
call	sub_821C60
cmp	eax, offset sub_FFFFFF
jz	short loc_8228EE
mov	ecx, [edi+4]
lea	edx, [eax+eax*2]
mov	eax, [esi+0Ch]
mov	esi, [edi]
lea	eax, [eax+edx*4]
mov	edx, [eax+8]
shl	esi, 18h
pop	edi
and	edx, 0F0FFFFFFh
or	edx, esi
pop	esi
pop	ebp
mov	[eax+4], ecx
mov	[eax+8], edx
pop	ebx
retn	0Ch

loc_8228EE:
push	edi
push	ebx
push	ebp
mov	ecx, esi
call	sub_8221A0
test	eax, eax
jge	short loc_822917
mov	ecx, [edi+4]
mov	edx, [edi]
push	ecx
or	ecx, 0FFFFFFFFh
sub	ecx, eax
push	edx
push	ecx
mov	ecx, esi
call	sub_821150
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_822917:
mov	ecx, [edi+4]
lea	edx, [eax+eax*2]
mov	eax, [esi+0Ch]
mov	esi, [eax+edx*4+8]
lea	eax, [eax+edx*4]
mov	edx, [edi]
and	esi, 0F0FFFFFFh
pop	edi
shl	edx, 18h
or	edx, esi
pop	esi
pop	ebp
mov	[eax+4], ecx
mov	[eax+8], edx
pop	ebx
retn	0Ch
sub_822810 endp

align 10h



sub_822950 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	ebp
push	ebx
push	edi
mov	esi, ecx
call	sub_822810
mov	ecx, [edi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_82297F
push	ebx
push	esi
call	sub_81EB00

loc_82297F:
mov	ecx, [edi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_822994
push	ebp
push	esi
call	sub_81EB00

loc_822994:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_822950 endp

align 10h



; int __stdcall	sub_8229A0(int,	void *)
sub_8229A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
cmp	eax, [ecx+18h]
jbe	short locret_8229BE
mov	edx, [ecx+8]
and	edx, 0FFFFFFFh
push	edx		; void *
push	eax		; void *
mov	eax, [esp+8+arg_0]
push	eax		; int
call	sub_822430

locret_8229BE:
retn	8
sub_8229A0 endp

align 10h



sub_8229D0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_4]
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	edx, [edi+18h]
lea	ecx, [eax-1]
mov	[esp+14h+arg_4], edx
cmp	ecx, edx
jnb	short loc_822A5A
mov	esi, [edi+10h]
push	ebp
mov	ebp, [esp+18h+arg_8]
mov	edx, [ebp+0]
mov	eax, [ebp+4]
mov	[esi+ecx*4], eax
mov	[esp+18h+arg_8], edx
mov	bl, byte ptr [esp+18h+arg_8]
mov	edx, ecx
shr	ecx, 1
add	ecx, esi
mov	esi, [esp+18h+arg_4]
lea	esi, [ecx+esi*4]
and	edx, 1
mov	al, dl
dec	dl
neg	al
shr	al, 1
mov	cl, dl
xor	cl, al
and	al, byte ptr [esp+18h+arg_8]
and	cl, 0Fh
xor	cl, dl
not	cl
and	cl, [esi]
shl	bl, 4
and	bl, dl
mov	edx, [esp+18h+arg_0]
or	cl, bl
or	cl, al
mov	[esi], cl
mov	ecx, [edx]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_822A50
push	ebp
push	edi
call	sub_81EB00

loc_822A50:
pop	ebp

loc_822A51:
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch

loc_822A5A:
mov	[esp+14h+arg_4], eax
fild	[esp+14h+arg_4]
test	eax, eax
jge	short loc_822A6C
fadd	ds:flt_15FCC08

loc_822A6C:
mov	ebx, [esp+14h+arg_8]
fstp	[esp+14h+var_4]
mov	esi, [esp+14h+arg_0]
push	ebx
lea	eax, [esp+18h+var_8]
push	eax
push	esi
mov	ecx, edi
mov	[esp+20h+var_8], 3
call	sub_822810
mov	ecx, [esi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_822A51
push	ebx
push	edi
call	sub_81EB00
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	0Ch
sub_8229D0 endp

align 10h


; Attributes: thunk

sub_822AB0 proc	near
jmp	sub_8229D0
sub_822AB0 endp

align 10h



; int __cdecl sub_822AC0(char *, int, int)
sub_822AC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
mov	esi, [esp+4+arg_0]
push	edi
lea	eax, [esp+8+arg_0]
push	eax		; char **
push	esi		; char *
call	_strtod
mov	eax, [esp+10h+arg_0]
mov	edi, [esp+10h+arg_8]
add	esp, 8
fstp	dword ptr [edi]
cmp	esi, eax
jnz	short loc_822AE7
pop	edi
xor	eax, eax
pop	esi
retn

loc_822AE7:
mov	cl, [eax]
cmp	cl, 78h
jz	short loc_822AF3
cmp	cl, 58h
jnz	short loc_822B1B

loc_822AF3:		; int
push	10h
lea	ecx, [esp+0Ch+arg_0]
push	ecx		; char **
push	esi		; char *
call	_strtoul
add	esp, 0Ch
mov	[esp+8+arg_8], eax
fild	[esp+8+arg_8]
test	eax, eax
jge	short loc_822B15
fadd	ds:flt_15FCC08

loc_822B15:
mov	eax, [esp+8+arg_0]
fstp	dword ptr [edi]

loc_822B1B:
movsx	edx, byte ptr [eax]
push	edx		; int
call	_isspace
add	esp, 4
test	eax, eax
jz	short loc_822B49
jmp	short loc_822B30
align 10h

loc_822B30:
mov	eax, [esp+8+arg_0]
inc	eax
mov	[esp+8+arg_0], eax
movsx	eax, byte ptr [eax]
push	eax		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_822B30

loc_822B49:
mov	ecx, [esp+8+arg_4]
add	esi, ecx
xor	eax, eax
cmp	esi, [esp+8+arg_0]
pop	edi
setz	al
pop	esi
retn
sub_822AC0 endp

align 10h



; int __cdecl sub_822B60(char *, int)
sub_822B60 proc	near

var_4= byte ptr	-4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
lea	eax, [esp+4+var_4]
push	eax		; int
push	ecx		; int
push	edx		; char *
call	sub_822AC0
add	esp, 10h
retn
sub_822B60 endp

align 10h



; int __cdecl sub_822B80(char *, int)
sub_822B80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
lea	eax, [esp+4+var_4]
push	eax		; int
push	ecx		; int
push	edx		; char *
call	sub_822AC0
fld	[esp+10h+var_4]
add	esp, 10h
retn
sub_822B80 endp

align 10h



sub_822BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
mov	eax, [ecx]
mov	edx, [esp+arg_4]
cmp	eax, [edx]
jnz	short loc_822BD2
mov	edx, [edx+4]
mov	ecx, [ecx+4]
mov	[esp+arg_4], edx
mov	[esp+arg_0], ecx
cmp	eax, 3
jnz	short loc_822BD5
fld	[esp+arg_0]
fld	[esp+arg_4]
fucompp
fnstsw	ax
test	ah, 44h
jnp	short loc_822BE2

loc_822BD2:
xor	eax, eax
retn

loc_822BD5:
cmp	ecx, edx
jz	short loc_822BE2
cmp	eax, 1
jz	short loc_822BD2
test	eax, eax
jnz	short loc_822BD2

loc_822BE2:
mov	eax, 1
retn
sub_822BA0 endp

align 10h



sub_822BF0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [esp+arg_4]
sub	esp, 0Ch
cmp	eax, ecx
jnz	short loc_822C05
xor	eax, eax
add	esp, 0Ch
retn

loc_822C05:
push	ebx
push	ebp
push	esi
push	edi
lea	ebp, [ecx+8]
lea	ebx, [eax+8]
push	ebp		; char *
push	ebx		; char *
xor	esi, esi
xor	edi, edi
call	_strcoll
add	esp, 8
mov	[esp+1Ch+var_C], eax
test	eax, eax
jnz	loc_822CBB
lea	esp, [esp+0]

loc_822C30:
mov	edx, [esp+1Ch+arg_0]
mov	eax, [edx]
mov	[esp+1Ch+var_8], eax
cmp	esi, eax
mov	eax, [esp+1Ch+arg_4]
jnb	short loc_822CB4
mov	ecx, [eax]
mov	[esp+1Ch+var_4], ecx
cmp	edi, ecx
jnb	short loc_822CB4
mov	ecx, ebx
lea	ebx, [ecx+1]

loc_822C51:
mov	dl, [ecx]
inc	ecx
test	dl, dl
jnz	short loc_822C51
sub	ecx, ebx
lea	esi, [esi+ecx+1]
mov	ecx, ebp
lea	edx, [ecx+1]

loc_822C63:
mov	bl, [ecx]
inc	ecx
test	bl, bl
jnz	short loc_822C63
mov	ebx, [esp+1Ch+arg_0]
sub	ecx, edx
add	ebx, 8
lea	edi, [edi+ecx+1]
lea	ebp, [eax+8]
add	ebx, esi
add	ebp, edi
cmp	esi, [esp+1Ch+var_8]
jnb	short loc_822C98
cmp	edi, [esp+1Ch+var_4]
jnb	short loc_822C98
push	ebp		; char *
push	ebx		; char *
call	_strcoll
add	esp, 8
mov	[esp+1Ch+var_C], eax

loc_822C98:
cmp	[esp+1Ch+var_C], 0
jz	short loc_822C30
xor	eax, eax
cmp	[esp+1Ch+var_C], eax
pop	edi
setnle	al
pop	esi
pop	ebp
pop	ebx
lea	eax, [eax+eax-1]
add	esp, 0Ch
retn

loc_822CB4:
cmp	[esp+1Ch+var_C], 0
jz	short loc_822CD0

loc_822CBB:
xor	eax, eax
cmp	[esp+1Ch+var_C], eax
pop	edi
setnle	al
pop	esi
pop	ebp
pop	ebx
lea	eax, [eax+eax-1]
add	esp, 0Ch
retn

loc_822CD0:
cmp	esi, edi
jnz	short loc_822CE6
mov	ecx, [edx]
cmp	ecx, [eax]
pop	edi
sbb	eax, eax
pop	esi
and	eax, 0FFFFFFFEh
pop	ebp
inc	eax
pop	ebx
add	esp, 0Ch
retn

loc_822CE6:
jbe	short loc_822CF5
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
add	esp, 0Ch
retn

loc_822CF5:
cmp	esi, edi
pop	edi
pop	esi
pop	ebp
sbb	eax, eax
pop	ebx
add	esp, 0Ch
retn
sub_822BF0 endp

align 10h



; int __cdecl sub_822D10(char *Dst, rsize_t SizeInBytes, char *Src)
sub_822D10 proc	near

Dst= dword ptr	4
SizeInBytes= dword ptr	8
Src= dword ptr	0Ch

mov	eax, [esp+Src]
push	esi
mov	esi, [esp+4+SizeInBytes]
push	edi
mov	edi, [esp+8+Dst]
push	0FFFFFFFFh	; MaxCount
push	eax		; Src
push	esi		; SizeInBytes
push	edi		; Dst
call	_strncpy_s
add	esp, 10h
mov	byte ptr [edi+esi-1], 0
pop	edi
pop	esi
retn
sub_822D10 endp

align 10h



; int __cdecl sub_822D40(char *DstBuf, size_t SizeInBytes, char	*Format, va_list ArgList)
sub_822D40 proc	near

DstBuf=	dword ptr  4
SizeInBytes= dword ptr	8
Format=	dword ptr  0Ch
ArgList= dword ptr  10h

mov	eax, [esp+ArgList]
mov	ecx, [esp+Format]
push	esi
mov	esi, [esp+4+SizeInBytes]
push	edi
mov	edi, [esp+8+DstBuf]
push	eax		; ArgList
push	ecx		; Format
push	0FFFFFFFFh	; MaxCount
push	esi		; SizeInBytes
push	edi		; DstBuf
call	__vsnprintf_s
add	esp, 14h
mov	byte ptr [edi+esi-1], 0
cmp	eax, 0FFFFFFFFh
jnz	short loc_822D6D
lea	eax, [esi-1]

loc_822D6D:
pop	edi
pop	esi
retn
sub_822D40 endp




; int __cdecl sub_822D70(char *DstBuf, size_t SizeInBytes, char	*Format, char ArgList)
sub_822D70 proc	near

DstBuf=	dword ptr  4
SizeInBytes= dword ptr	8
Format=	dword ptr  0Ch
ArgList= byte ptr  10h

mov	ecx, [esp+Format]
mov	edx, [esp+DstBuf]
push	esi
mov	esi, [esp+4+SizeInBytes]
lea	eax, [esp+4+ArgList]
push	eax		; ArgList
push	ecx		; Format
push	0FFFFFFFFh	; MaxCount
push	esi		; SizeInBytes
push	edx		; DstBuf
call	__vsnprintf_s
add	esp, 14h
test	eax, eax
jge	short loc_822D95
mov	eax, esi

loc_822D95:
pop	esi
retn
sub_822D70 endp

align 10h



sub_822DA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_4]
push	edi
mov	edi, offset off_1681FB8

loc_822DB1:
mov	ebp, [edi]
mov	eax, ebp
lea	ecx, [eax+1]

loc_822DB8:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_822DB8
sub	eax, ecx
mov	ecx, [ebx]
push	eax
push	ebp
push	ebx
add	ecx, 2A0h
call	sub_81FBA0
mov	dword ptr [esi], 4
mov	[esi+4], eax
add	edi, 4
add	esi, 8
cmp	edi, offset off_1681FFC
jl	short loc_822DB1
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_822DA0 endp

align 10h



sub_822DF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	8Ch
push	eax
call	sub_82C5B0
add	esp, 8
xor	ecx, ecx

loc_822E04:
mov	dword ptr [eax+ecx*8], 0
inc	ecx
cmp	ecx, 11h
jl	short loc_822E04
mov	ecx, [esp+arg_4]
mov	[eax+88h], ecx
retn
sub_822DF0 endp

align 10h



sub_822E20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_8]
cmp	dword ptr [edx], 2
jb	short locret_822E67
mov	al, 5Fh
cmp	[edx+8], al
jnz	short locret_822E67
cmp	[edx+9], al
jnz	short locret_822E67
mov	ecx, [esp+arg_0]
mov	ecx, [ecx]
xor	eax, eax
add	ecx, 2C0h

loc_822E43:
cmp	[ecx], edx
jz	short loc_822E51
inc	eax
add	ecx, 8
cmp	eax, 11h
jl	short loc_822E43
retn

loc_822E51:
mov	ecx, [esp+arg_C]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [ecx]
mov	[edx+eax*8], esi
mov	ecx, [ecx+4]
mov	[edx+eax*8+4], ecx
pop	esi

locret_822E67:
retn
sub_822E20 endp

align 10h



sub_822E70 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	ebp
mov	ebp, [esp+18h+arg_8]
lea	eax, [ebp+8]
push	esi
push	edi
cmp	eax, [ebx+24h]
jbe	short loc_822EB0
mov	eax, [ebx+28h]
mov	edi, [esp+20h+arg_4]
mov	esi, ebp
push	1
sub	esi, eax
sub	edi, eax
push	ebx
lea	ecx, [ebx+4]
sar	esi, 3
sar	edi, 3
call	sub_823530
mov	eax, [ebx+28h]
lea	ebp, [eax+esi*8]
lea	esi, [eax+edi*8]
jmp	short loc_822EB4

loc_822EB0:
mov	esi, [esp+20h+arg_4]

loc_822EB4:
lea	eax, [ebp-8]
cmp	eax, esi
jb	short loc_822ED4
lea	ecx, [eax+8]
mov	edi, edi

loc_822EC0:
mov	edx, [eax]
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
sub	eax, 8
sub	ecx, 8
cmp	eax, esi
jnb	short loc_822EC0

loc_822ED4:
mov	eax, [esi+4]
mov	edi, [esi]
mov	[esp+20h+var_4], eax
mov	eax, edi
mov	ecx, edi
add	ebp, 8
sub	ecx, 5
jz	short loc_822F3B
sub	ecx, 2
jz	short loc_822F33
mov	ecx, [ebx]
mov	eax, [ecx+eax*8+368h]
mov	ecx, [ebx+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+20h+var_10]
push	edx
push	eax
jz	short loc_822F10
call	sub_821EF0
jmp	short loc_822F15

loc_822F10:
call	sub_8208C0

loc_822F15:
test	eax, eax
jz	short loc_822F55
cmp	[esp+20h+var_10], 5
jnz	short loc_822F55
mov	ecx, [esp+20h+var_C]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_822F44
push	ebx
call	sub_81FED0
jmp	short loc_822F40

loc_822F33:
mov	eax, [esi+4]
mov	eax, [eax+4]
jmp	short loc_822F40

loc_822F3B:
mov	ecx, [esi+4]
mov	eax, [ecx]

loc_822F40:
test	eax, eax
jz	short loc_822F55

loc_822F44:
mov	edx, [eax+80h]
mov	[esi], edx
mov	eax, [eax+84h]
mov	[esi+4], eax

loc_822F55:
cmp	dword ptr [esi], 0
mov	eax, ebp
jnz	short loc_822F65
mov	ecx, [esp+20h+var_4]
mov	[esi], edi
mov	[esi+4], ecx

loc_822F65:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_822E70 endp

align 10h



sub_822F70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	ecx, [edx]
mov	eax, ecx
sub	esp, 8
sub	eax, 5
jz	short loc_822FD0
sub	eax, 2
jz	short loc_822FC8
mov	eax, [esi]
mov	eax, [eax+ecx*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+8+var_8]
push	edx
push	eax
jz	short loc_822FA2
call	sub_821EF0
jmp	short loc_822FA7

loc_822FA2:
call	sub_8208C0

loc_822FA7:
test	eax, eax
jz	short loc_822FD9
cmp	[esp+8+var_8], 5
jnz	short loc_822FD9
mov	ecx, [esp+8+var_4]
mov	eax, [ecx+4]
test	eax, eax
jnz	loc_823044
push	esi
call	sub_81FED0
jmp	short loc_822FD5

loc_822FC8:
mov	eax, [edx+4]
mov	eax, [eax+4]
jmp	short loc_822FD5

loc_822FD0:
mov	ecx, [edx+4]
mov	eax, [ecx]

loc_822FD5:
test	eax, eax
jnz	short loc_823044

loc_822FD9:
mov	ecx, [edi]
mov	eax, ecx
sub	eax, 5
jz	short loc_823032
sub	eax, 2
jz	short loc_82302A
mov	edx, [esi]
mov	eax, [edx+ecx*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+8+var_8]
push	edx
push	eax
jz	short loc_823008
call	sub_821EF0
jmp	short loc_82300D

loc_823008:
call	sub_8208C0

loc_82300D:
test	eax, eax
jz	short loc_82303B
cmp	[esp+8+var_8], 5
jnz	short loc_82303B
mov	ecx, [esp+8+var_4]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_823044
push	esi
call	sub_81FED0
jmp	short loc_823037

loc_82302A:
mov	eax, [edi+4]
mov	eax, [eax+4]
jmp	short loc_823037

loc_823032:
mov	ecx, [edi+4]
mov	eax, [ecx]

loc_823037:
test	eax, eax
jnz	short loc_823044

loc_82303B:
mov	eax, offset dword_1859274
add	esp, 8
retn

loc_823044:
mov	edx, [esp+8+arg_0]
lea	eax, [eax+edx*8]
add	esp, 8
retn
sub_822F70 endp

align 10h



sub_823050 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esp+0Ch+arg_4]
push	eax
mov	edx, edi
call	sub_822F70
mov	ebx, eax
add	esp, 4
cmp	dword ptr [ebx], 0
jnz	short loc_823091
mov	ecx, [edi]
push	ecx
push	esi
call	sub_81BA90
push	eax
mov	eax, [esp+18h+arg_C]
push	eax
push	eax
push	offset aOperatorSIsN_1 ; "operator %s is not supported for %s %s"
push	esi
call	sub_81A760
add	esp, 1Ch
mov	eax, ebx

loc_823091:
pop	edi
pop	esi
pop	ebx
retn
sub_823050 endp

align 10h



sub_8230A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_4]
mov	ecx, [edx]
sub	esp, 10h
push	ebp
mov	ebp, [esp+14h+arg_8]
cmp	ecx, [ebp+0]
jz	short loc_8230BD
mov	eax, offset dword_1859274
pop	ebp
add	esp, 10h
retn

loc_8230BD:
mov	eax, ecx
sub	eax, 5
push	esi
mov	esi, [esp+18h+arg_0]
jz	short loc_82311B
sub	eax, 2
jz	short loc_823113
mov	eax, [esi]
mov	eax, [eax+ecx*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+18h+var_10]
push	edx
push	eax
jz	short loc_8230F0
call	sub_821EF0
jmp	short loc_8230F5

loc_8230F0:
call	sub_8208C0

loc_8230F5:
test	eax, eax
jz	short loc_823124
cmp	[esp+18h+var_10], 5
jnz	short loc_823124
mov	ecx, [esp+18h+var_C]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_82312F
push	esi
call	sub_81FED0
jmp	short loc_823120

loc_823113:
mov	eax, [edx+4]
mov	eax, [eax+4]
jmp	short loc_823120

loc_82311B:
mov	ecx, [edx+4]
mov	eax, [ecx]

loc_823120:
test	eax, eax
jnz	short loc_82312F

loc_823124:
pop	esi
mov	eax, offset dword_1859274
pop	ebp
add	esp, 10h
retn

loc_82312F:
push	ebx
mov	ebx, [esp+1Ch+arg_C]
cmp	dword ptr [eax+ebx*8], 0
push	edi
lea	edi, [eax+ebx*8]
jz	short loc_8231BC
mov	ecx, [ebp+0]
mov	eax, ecx
sub	eax, 5
jz	short loc_82319A
sub	eax, 2
jz	short loc_823192
mov	edx, [esi]
mov	eax, [edx+ecx*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+20h+var_8]
push	edx
push	eax
jz	short loc_82316F
call	sub_821EF0
jmp	short loc_823174

loc_82316F:
call	sub_8208C0

loc_823174:
test	eax, eax
jz	short loc_8231BC
cmp	[esp+20h+var_8], 5
jnz	short loc_8231BC
mov	ecx, [esp+20h+var_4]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_8231A3
push	esi
call	sub_81FED0
jmp	short loc_82319F

loc_823192:
mov	eax, [ebp+4]
mov	eax, [eax+4]
jmp	short loc_82319F

loc_82319A:
mov	ecx, [ebp+4]
mov	eax, [ecx]

loc_82319F:
test	eax, eax
jz	short loc_8231BC

loc_8231A3:
cmp	dword ptr [eax+ebx*8], 0
lea	eax, [eax+ebx*8]
jz	short loc_8231BC
push	eax
push	edi
call	sub_822BA0
add	esp, 8
test	eax, eax
mov	eax, edi
jnz	short loc_8231C1

loc_8231BC:
mov	eax, offset dword_1859274

loc_8231C1:
pop	edi
pop	ebx
pop	esi
pop	ebp
add	esp, 10h
retn
sub_8230A0 endp

align 10h



sub_8231D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_8]
xor	ebp, ebp
cmp	dword ptr [edi], 5
jnz	short loc_8231F5
mov	ecx, [edi+4]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_8231F3
push	esi
call	sub_81FED0

loc_8231F3:
mov	ebp, eax

loc_8231F5:
mov	ebx, [esp+10h+arg_4]
mov	eax, [ebx]
mov	ecx, eax
sub	ecx, 5
jz	short loc_823254
sub	ecx, 2
mov	ecx, [esi]
jz	short loc_823233
lea	eax, [ecx+eax*8+364h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
push	edi
push	eax
push	esi
jz	short loc_823229
call	sub_822950
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_823229:
call	sub_820D20
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_823233:
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_823249
mov	edx, [ebx+4]
push	edi
push	edx
call	sub_81EB00

loc_823249:
mov	eax, [ebx+4]
pop	edi
pop	esi
mov	[eax+4], ebp
pop	ebp
pop	ebx
retn

loc_823254:
mov	ecx, [esi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_82326C
mov	edx, [ebx+4]
push	edi
push	edx
call	sub_81EB00

loc_82326C:
mov	eax, [ebx+4]
pop	edi
pop	esi
mov	[eax], ebp
pop	ebp
pop	ebx
retn
sub_8231D0 endp

align 10h



sub_823280 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
push	ebx
mov	ebx, [eax+4]
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
push	edi
mov	edi, [eax]
mov	eax, [esp+20h+arg_8]
mov	ebp, [eax]
mov	eax, [eax+4]
mov	[esp+20h+var_4], eax
mov	eax, [esp+20h+arg_C]
mov	ecx, [eax]
mov	edx, [eax+4]
push	3
push	esi
mov	[esp+28h+var_10], ecx
mov	[esp+28h+var_C], edx
call	sub_81B6A0
mov	eax, [esi+1Ch]
mov	ecx, [esp+28h+var_4]
mov	edx, [esp+28h+var_10]
mov	[eax+0Ch], ecx
mov	ecx, [esp+28h+var_C]
push	1
mov	[eax], edi
mov	[eax+4], ebx
mov	[eax+8], ebp
mov	[eax+10h], edx
mov	[eax+14h], ecx
add	eax, 18h
push	2
push	esi
mov	[esi+1Ch], eax
call	sub_81C6E0
mov	eax, [esi+1Ch]
mov	edx, [eax-4]
add	esp, 14h
lea	ecx, [eax-8]
mov	eax, [ecx]
pop	edi
mov	[esi+1Ch], ecx
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_823280 endp

align 10h



sub_823310 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	ecx, [ecx]
xor	eax, eax
test	ecx, ecx
jz	short locret_82334D
cmp	dword ptr [ecx], 4
jnz	short locret_82334D
push	esi
mov	esi, [ecx+4]
push	edi
mov	edi, [esi]
xor	edx, edx
test	edi, edi
jbe	short loc_82334B
mov	edi, edi

loc_823330:
mov	cl, [edx+esi+8]
cmp	cl, 6Bh
jnz	short loc_82333E
or	eax, 2
jmp	short loc_823346

loc_82333E:
cmp	cl, 76h
jnz	short loc_823346
or	eax, 1

loc_823346:
inc	edx
cmp	edx, edi
jb	short loc_823330

loc_82334B:
pop	edi
pop	esi

locret_82334D:
retn
sub_823310 endp

align 10h


; Attributes: bp-based frame

sub_823350 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h
arg_C= dword ptr  14h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFF8h
mov	eax, [ebp+arg_8]
sub	esp, 0Ch
push	ebx
mov	ebx, [ebp+arg_4]
push	esi
push	edi
mov	edi, [ebp+arg_0]

loc_823365:
mov	ecx, [eax]
cmp	ecx, 5
jnz	short loc_8233B0
mov	esi, [eax+4]
test	dword ptr [esi+8], 0F0000000h
push	ebx
jz	short loc_823386
mov	eax, [ebp+arg_C]
push	eax
mov	ecx, esi
call	sub_821EF0
jmp	short loc_823391

loc_823386:
mov	ecx, [ebp+arg_C]
push	ecx
mov	ecx, esi
call	sub_8208C0

loc_823391:
test	eax, eax
jnz	short loc_8233A4
mov	esi, [esi]
test	esi, esi
jz	short loc_8233A4
cmp	dword ptr [esi+8], 0
lea	eax, [esi+8]
jnz	short loc_82341A

loc_8233A4:
mov	eax, 1
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_8233B0:
mov	edx, ecx
sub	edx, 5
jz	short loc_823409
sub	edx, 2
jz	short loc_823401
mov	edx, [edi]
mov	eax, [edx+ecx*8+368h]
mov	ecx, [edi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+18h+var_8]
push	edx
push	eax
jz	short loc_8233DE
call	sub_821EF0
jmp	short loc_8233E3

loc_8233DE:
call	sub_8208C0

loc_8233E3:
test	eax, eax
jz	short loc_823436
cmp	[esp+18h+var_8], 5
jnz	short loc_823436
mov	ecx, [esp+18h+var_4]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_823412
push	edi
call	sub_81FED0
jmp	short loc_82340E

loc_823401:
mov	eax, [eax+4]
mov	eax, [eax+4]
jmp	short loc_82340E

loc_823409:
mov	ecx, [eax+4]
mov	eax, [ecx]

loc_82340E:
test	eax, eax
jz	short loc_823436

loc_823412:
add	eax, 8
cmp	dword ptr [eax], 0
jz	short loc_82344B

loc_82341A:
cmp	dword ptr [eax], 5
jz	loc_823365
mov	edx, [eax]
mov	[ebx], edx
mov	eax, [eax+4]
mov	[ebx+4], eax
xor	eax, eax
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_823436:		; "attempt to index a nil value"
push	offset aAttemptToInd_1
push	edi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_82344B:		; "error in gettable_event"
push	offset aErrorInGetta_0
push	edi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_823350 endp




sub_823460 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ebx
mov	ebx, [esp+4+arg_4]
cmp	dword ptr [ebx], 4
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_8]
jnz	short loc_82347C
cmp	dword ptr [edi], 4
jz	short loc_82347C
mov	eax, ebx
mov	ebx, edi
mov	edi, eax

loc_82347C:
mov	eax, [esp+10h+arg_C]
mov	esi, [esp+10h+arg_0]
push	eax
mov	edx, ebx
call	sub_822F70
mov	ebp, eax
add	esp, 4
cmp	dword ptr [ebp+0], 0
jnz	short loc_8234C5
mov	ecx, [edi]
push	ecx
push	esi
call	sub_81BA90
mov	edi, [esp+18h+arg_10]
mov	edx, [ebx]
add	esp, 8
push	eax
push	edi
push	edx
push	esi
call	sub_81BA90
add	esp, 8
push	eax
push	edi
push	offset aOperatorSIsNot ; "operator %s is not supported for %s %s "...
push	esi
call	sub_81A760
add	esp, 18h

loc_8234C5:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
pop	ebx
retn
sub_823460 endp

align 10h



sub_8234D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_C]
push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	eax
push	ebx
push	ebp
push	esi
call	sub_8230A0
mov	edi, eax
add	esp, 10h
cmp	dword ptr [edi], 0
jnz	short loc_823528
mov	ecx, [ebx]
push	ecx
push	esi
call	sub_81BA90
mov	ebx, [esp+18h+arg_10]
mov	edx, [ebp+0]
add	esp, 8
push	eax
push	ebx
push	edx
push	esi
call	sub_81BA90
add	esp, 8
push	eax
push	ebx
push	offset aOperatorSIsN_0 ; "operator %s is not supported for %s %s "...
push	esi
call	sub_81A760
add	esp, 18h
mov	eax, edi

loc_823528:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_8234D0 endp

align 10h



sub_823530 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_4]
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
mov	eax, [esi+24h]
sub	eax, [esi+28h]
push	edi
sar	eax, 3
lea	eax, [ebx+eax*2]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	esi
mov	ebp, ecx
mov	[esp+20h+arg_4], eax
call	sub_82C5B0
mov	ecx, [esi+1Ch]
mov	edi, eax
mov	eax, [esi+24h]
lea	edx, [ecx+ebx*8]
add	esp, 8
cmp	edx, eax
ja	loc_82362C
mov	ecx, [esi]
mov	edx, [edi-4]
lea	esi, [edi-4]
shr	edx, 3
cmp	edx, 80h
jnb	short loc_82358E
mov	eax, edx
shr	eax, 3
jmp	short loc_8235ED

loc_82358E:
cmp	edx, 400h
jnb	short loc_8235A0
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_8235ED

loc_8235A0:
cmp	edx, 1000h
jnb	short loc_8235B2
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_8235ED

loc_8235B2:
cmp	edx, 2000h
jnb	short loc_8235C4
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_8235ED

loc_8235C4:
cmp	edx, 20000h
jnb	short loc_8235D6
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_8235ED

loc_8235D6:
cmp	edx, 1A0000h
jnb	short loc_8235E8
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_8235ED

loc_8235E8:
mov	eax, 7Fh

loc_8235ED:
sub	[ecx+4], edx
lea	edi, ds:0[edx*8]
mov	[esi], edi
cmp	eax, 5Dh
jb	short loc_823617
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_823617
push	esi
push	eax
push	edx
call	sub_82CAF0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_823617:
mov	edx, [ecx+eax*4+10h]
pop	edi
mov	[esi+4], edx
mov	[ecx+eax*4+10h], esi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_82362C:
mov	ebx, [esi+28h]
mov	edx, [esi+20h]
sub	eax, ebx
sar	eax, 3
sub	edx, ebx
sub	ecx, ebx
sar	edx, 3
sar	ecx, 3
add	eax, eax
add	eax, eax
mov	[esp+18h+var_8], edx
mov	edx, [esi]
mov	[esp+18h+var_4], ecx
mov	ecx, 1
add	eax, eax
cmp	[edx+23Ch], ecx
jnz	short loc_823661
or	[edi-4], ecx

loc_823661:
push	eax
push	ebx
push	edi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [ebp+8]
sub	eax, [ebp+0]
add	esp, 0Ch
sar	eax, 4
cmp	eax, 0FFFFFFFFh
jle	short loc_8236A0
mov	ecx, eax
shl	ecx, 4
inc	eax
mov	[esp+18h+arg_0], eax

loc_823684:
mov	eax, [ebp+0]
mov	edx, [eax+ecx]
add	eax, ecx
sub	edx, ebx
sar	edx, 3
lea	edx, [edi+edx*8]
sub	ecx, 10h
sub	[esp+18h+arg_0], 1
mov	[eax], edx
jnz	short loc_823684

loc_8236A0:
mov	eax, [esi+2Ch]
test	eax, eax
jz	short loc_8236BC

loc_8236A7:
mov	ecx, [eax+8]
sub	ecx, ebx
sar	ecx, 3
lea	edx, [edi+ecx*8]
mov	[eax+8], edx
mov	eax, [eax+0Ch]
test	eax, eax
jnz	short loc_8236A7

loc_8236BC:
mov	eax, [esp+18h+arg_4]
mov	ecx, [esp+18h+var_8]
add	eax, edi
lea	edx, [edi+ecx*8]
mov	[esi+24h], eax
mov	eax, [esp+18h+var_4]
lea	ecx, [edi+eax*8]
mov	[esi+28h], edi
mov	[esi+20h], edx
mov	[esi+1Ch], ecx
mov	edx, [ebx-4]
mov	ecx, [esi]
lea	edi, [ebx-4]
shr	edx, 3
cmp	edx, 80h
jnb	short loc_8236F6
mov	eax, edx
shr	eax, 3
jmp	short loc_823755

loc_8236F6:
cmp	edx, 400h
jnb	short loc_823708
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_823755

loc_823708:
cmp	edx, 1000h
jnb	short loc_82371A
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_823755

loc_82371A:
cmp	edx, 2000h
jnb	short loc_82372C
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_823755

loc_82372C:
cmp	edx, 20000h
jnb	short loc_82373E
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_823755

loc_82373E:
cmp	edx, 1A0000h
jnb	short loc_823750
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_823755

loc_823750:
mov	eax, 7Fh

loc_823755:
sub	[ecx+4], edx
lea	esi, ds:0[edx*8]
mov	[edi], esi
cmp	eax, 5Dh
jb	short loc_82377F
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_82377F
push	edi
push	eax
push	edx
call	sub_82CAF0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8

loc_82377F:
mov	edx, [ecx+eax*4+10h]
mov	[edi+4], edx
mov	[ecx+eax*4+10h], edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	8
sub_823530 endp

align 10h



sub_8237A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+8]
sub	esi, [edi]
sar	esi, 4
inc	esi
lea	eax, [esi+esi]
shl	eax, 4
push	eax
push	ebp
mov	[esp+1Ch+var_4], eax
call	sub_82C5B0
mov	ecx, [ebp+0]
mov	ebx, eax
mov	eax, 1
add	esp, 8
cmp	[ecx+23Ch], eax
jnz	short loc_8237DD
or	[ebx-4], eax

loc_8237DD:
mov	ebp, [edi]
shl	esi, 4
push	esi
push	ebp
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+20h+var_4]
mov	ecx, [esp+20h+arg_0]
lea	eax, [esi+ebx-10h]
add	edx, ebx
mov	[edi+8], eax
mov	[edi], ebx
mov	[edi+4], edx
mov	eax, [ebp-4]
mov	ecx, [ecx]
lea	esi, [ebp-4]
shr	eax, 3
add	esp, 0Ch
cmp	eax, 80h
jnb	short loc_82381C
mov	edx, eax
shr	edx, 3
jmp	short loc_823876

loc_82381C:
cmp	eax, 400h
jnb	short loc_82382D
mov	edx, eax
shr	edx, 5
add	edx, 0Ch
jmp	short loc_823876

loc_82382D:
cmp	eax, 1000h
jnb	short loc_82383E
mov	edx, eax
shr	edx, 6
add	edx, 1Ch
jmp	short loc_823876

loc_82383E:
cmp	eax, 2000h
jnb	short loc_82384F
mov	edx, eax
shr	edx, 9
add	edx, 54h
jmp	short loc_823876

loc_82384F:
cmp	eax, 20000h
jnb	short loc_823860
mov	edx, eax
shr	edx, 0Dh
add	edx, 63h
jmp	short loc_823876

loc_823860:
cmp	eax, 1A0000h
jnb	short loc_823871
mov	edx, eax
shr	edx, 11h
add	edx, 72h
jmp	short loc_823876

loc_823871:
mov	edx, 7Fh

loc_823876:
sub	[ecx+4], eax
lea	edi, ds:0[eax*8]
mov	[esi], edi
cmp	edx, 5Dh
jb	short loc_82389E
cmp	dword ptr [ecx+edx*4+10h], 0
jz	short loc_82389E
push	esi
push	edx
push	eax
call	sub_82CAF0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_82389E:
mov	eax, [ecx+edx*4+10h]
pop	edi
mov	[esi+4], eax
mov	[ecx+edx*4+10h], esi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_8237A0 endp

align 10h



sub_8238C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_4]
mov	esi, ecx
shl	edi, 4
push	edi
push	ebx
mov	dword ptr [esi], 0
mov	dword ptr [esi+8], 0
mov	dword ptr [esi+4], 0
call	sub_82C5B0
mov	[esi], eax
mov	edx, [ebx]
mov	ecx, 1
add	esp, 8
cmp	[edx+23Ch], ecx
jnz	short loc_823902
or	[eax-4], ecx

loc_823902:
mov	eax, [esi]
lea	ecx, [eax+edi]
add	eax, 0FFFFFFF0h
pop	edi
mov	[esi+4], ecx
mov	[esi+8], eax
mov	dword ptr [esi+14h], 0FFFFFFFEh
mov	dword ptr [esi+10h], 0
pop	esi
pop	ebx
retn	8
sub_8238C0 endp

align 10h



sub_823930 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
shl	eax, 4
add	eax, [ecx]
mov	[ecx+8], eax
retn	4
sub_823930 endp

align 10h



sub_823940 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
cmp	eax, 0FFFFFFFFh
jnz	short loc_82395D
mov	eax, [edx+28h]
push	eax
push	edx
call	sub_832370
add	esp, 8
retn	8

loc_82395D:
mov	ecx, [ecx]
shl	eax, 4
mov	eax, [eax+ecx]
push	eax
push	edx
call	sub_832370
add	esp, 8
retn	8
sub_823940 endp

align 10h



sub_823980 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
movzx	eax, byte ptr [ecx+0Fh]
mov	edx, [esp+arg_8]
sub	esp, 8
push	ebp
lea	ebp, [edx+eax*8]
mov	eax, [esp+0Ch+arg_C]
push	esi
push	edi
cmp	eax, ebp
jnb	short loc_8239AD
lea	ecx, [ecx+0]

loc_8239A0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ebp
jb	short loc_8239A0

loc_8239AD:
mov	edi, [esp+14h+arg_0]
sub	eax, ebp
sar	eax, 3
test	byte ptr [ecx+0Eh], 4
push	ebx
mov	ebx, eax
mov	[esp+18h+arg_8], ebx
jz	short loc_823A11
push	1
push	ebx
push	edi
call	sub_81FF50
fild	[esp+24h+arg_8]
mov	esi, eax
mov	eax, [edi]
fstp	[esp+24h+var_4]
add	esp, 0Ch
mov	[esp+18h+var_8], 3
add	eax, 34Ch
test	dword ptr [esi+8], 0F0000000h
jz	short loc_823A01
lea	ecx, [esp+18h+var_8]
push	ecx
push	eax
push	edi
mov	ecx, esi
call	sub_822950
jmp	short loc_823A1F

loc_823A01:
lea	edx, [esp+18h+var_8]
push	edx
push	eax
push	edi
mov	ecx, esi
call	sub_820D20
jmp	short loc_823A1F

loc_823A11:
push	0
push	ebx
push	edi
call	sub_81FF50
add	esp, 0Ch
mov	esi, eax

loc_823A1F:
test	dword ptr [esi+8], 0F0000000h
push	ebp
push	ebx
push	1
mov	ecx, esi
push	edi
jz	short loc_823A36
call	sub_821780
jmp	short loc_823A3B

loc_823A36:
call	sub_820610

loc_823A3B:
mov	eax, [esp+18h+arg_4]
test	byte ptr [eax+0Eh], 1
pop	ebx
jz	short loc_823A5C
pop	edi
mov	[ebp+4], esi
pop	esi
mov	dword ptr [ebp+0], 5
lea	eax, [ebp+8]
pop	ebp
add	esp, 8
retn	10h

loc_823A5C:
mov	eax, [eax+18h]
mov	eax, [eax+8]
mov	[eax+4], esi
mov	dword ptr [eax], 5
mov	ecx, [edi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_823A7F
push	eax
call	sub_81DCC0

loc_823A7F:
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
add	esp, 8
retn	10h
sub_823980 endp

align 10h



sub_823A90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [eax+0Ch]
sub	esi, [eax+4]
sar	esi, 4
cmp	edx, esi
pop	esi
jnz	short loc_823AAD
mov	eax, [eax+20h]
retn	8

loc_823AAD:
mov	eax, [ecx]
inc	edx
shl	edx, 4
mov	eax, [edx+eax]
retn	8
sub_823A90 endp

align 10h



sub_823AC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [eax+0Ch]
sub	esi, [eax+4]
sar	esi, 4
cmp	edx, esi
jnz	short loc_823ADD
mov	eax, [eax+1Ch]
pop	esi
retn	8

loc_823ADD:
mov	esi, [eax+0Ch]
sub	esi, [eax+4]
inc	edx
sar	esi, 4
cmp	edx, esi
jnz	short loc_823AF5
mov	eax, [eax+20h]
add	eax, 0FFFFFFF8h
pop	esi
retn	8

loc_823AF5:
mov	eax, [ecx]
inc	edx
shl	edx, 4
mov	eax, [edx+eax]
add	eax, 0FFFFFFF8h
pop	esi
retn	8
sub_823AC0 endp

align 10h



sub_823B10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [eax+0Ch]
sub	esi, [eax+4]
sar	esi, 4
cmp	edx, esi
pop	esi
jnz	short loc_823B30
mov	eax, [eax+20h]
add	eax, 0FFFFFFF8h
retn	8

loc_823B30:
mov	eax, [ecx]
inc	edx
shl	edx, 4
mov	eax, [edx+eax]
add	eax, 0FFFFFFF8h
retn	8
sub_823B10 endp

align 10h



sub_823B40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [eax+0Ch]
sub	esi, [eax+4]
sar	esi, 4
cmp	edx, esi
pop	esi
jnz	short loc_823B68
mov	eax, [eax+20h]
xor	ecx, ecx
cmp	dword ptr [eax-8], 9
setz	cl
mov	al, cl
retn	8

loc_823B68:
mov	eax, [ecx]
inc	edx
shl	edx, 4
mov	eax, [edx+eax]
xor	ecx, ecx
cmp	dword ptr [eax-8], 9
setz	cl
mov	al, cl
retn	8
sub_823B40 endp

align 10h



sub_823B80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, [eax+0Ch]
sub	esi, [eax+4]
sar	esi, 4
cmp	edx, esi
pop	esi
jnz	short loc_823BA0
mov	eax, [eax+20h]
mov	eax, [eax-4]
retn	8

loc_823BA0:
mov	eax, [ecx]
inc	edx
shl	edx, 4
mov	eax, [edx+eax]
mov	eax, [eax-4]
retn	8
sub_823B80 endp

align 10h



sub_823BB0 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [ecx]
shl	eax, 4
mov	eax, [eax+ecx+8]
retn	8
sub_823BB0 endp




sub_823BC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
mov	ebx, [esp+4+arg_0]
mov	edx, [ebx+0Ch]
sub	edx, [ebx+4]
push	esi
push	edi
lea	edi, [ebx+4]
sar	edx, 4
cmp	eax, edx
jnz	short loc_823BE0
mov	edx, [ebx+20h]
jmp	short loc_823BEB

loc_823BE0:
mov	esi, [ecx]
lea	edx, [eax+1]
shl	edx, 4
mov	edx, [edx+esi]

loc_823BEB:
cmp	dword ptr [edx-8], 9
jz	short loc_823BF9

loc_823BF1:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn	8

loc_823BF9:
cmp	eax, [ecx+14h]
jnz	short loc_823C07
mov	eax, [ecx+10h]
pop	edi
pop	esi
pop	ebx
retn	8

loc_823C07:
mov	edx, [ecx]
mov	esi, [ecx+8]
sub	esi, edx
sar	esi, 4
cmp	eax, esi
jnz	short loc_823C1E
mov	eax, [ecx+0Ch]
pop	edi
pop	esi
pop	ebx
retn	8

loc_823C1E:
mov	ecx, eax
shl	ecx, 4
mov	esi, [ecx+edx+14h]
test	esi, esi
jz	short loc_823BF1
push	eax
push	ebx
mov	ecx, edi
call	sub_823B80
mov	edx, [eax+8]
mov	eax, esi
cmp	esi, [edx+8]
jz	short loc_823C41
lea	eax, [esi-4]

loc_823C41:
pop	edi
pop	esi
pop	ebx
retn	8
sub_823BC0 endp

align 10h



sub_823C50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1		; int
push	offset off_1466D14 ; int
push	offset aKore	; "kore"
push	eax		; int
call	sub_81A860
add	esp, 10h
mov	eax, 1
retn
sub_823C50 endp

align 10h



sub_823C70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	offset off_1682010
push	0
push	1
push	esi
call	sub_81AEA0
push	offset off_1682004
push	0
push	2
push	esi
mov	edi, eax
call	sub_81AEA0
mov	ecx, [esi]
add	esp, 20h
mov	edx, edi
add	ecx, 468h
sub	edx, 0
pop	edi
pop	esi
jz	short loc_823CBB
sub	edx, 1
jnz	short loc_823CC4
add	eax, eax
xor	eax, [ecx]
and	eax, 2
xor	[ecx], eax
xor	eax, eax
retn

loc_823CBB:
mov	edx, [ecx]
xor	edx, eax
and	edx, 1
xor	[ecx], edx

loc_823CC4:
xor	eax, eax
retn
sub_823C70 endp

align 10h



sub_823CD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	offset off_1682028
push	0
push	1
push	esi
call	sub_81AEA0
add	esp, 10h
test	eax, eax
jnz	short loc_823D04
push	offset off_168201C
push	eax
push	2
push	esi
call	sub_81AEA0
mov	ecx, [esi]
add	esp, 10h
mov	[ecx+478h], eax

loc_823D04:
xor	eax, eax
pop	esi
retn
sub_823CD0 endp

align 10h



sub_823D10 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1		; int
push	offset off_1466E18 ; int
push	offset aOs_2	; "os"
push	eax		; int
call	sub_81A860
add	esp, 10h
mov	eax, 1
retn
sub_823D10 endp

align 10h



sub_823D30 proc	near

var_58=	dword ptr -58h
Buf= byte ptr -54h
var_4= dword ptr -4

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
call	__errno
mov	eax, [eax]
push	eax		; ErrNum
mov	[esp+5Ch+var_58], eax
lea	eax, [esp+5Ch+Buf]
push	50h		; SizeInBytes
push	eax		; Buf
call	_strerror_s
lea	ecx, [esp+64h+Buf]
push	ecx
push	edi		; ArgList
push	offset aSS_12	; "%s: %s"
push	esi		; int
call	sub_81C0C0
fild	[esp+74h+var_58]
mov	eax, [esi+1Ch]
mov	ecx, [esp+74h+var_4]
fstp	dword ptr [eax+4]
add	esp, 1Ch
mov	dword ptr [eax], 3
add	eax, 8
xor	ecx, esp
mov	[esi+1Ch], eax
call	sub_7999A3
add	esp, 58h
retn
sub_823D30 endp

align 10h



sub_823D90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	0
push	0
push	1
push	esi
call	sub_81AE20
push	eax
call	sub_9F6536
mov	[esp+18h+arg_0], eax
mov	eax, [esi+1Ch]
fild	[esp+18h+arg_0]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
add	esp, 14h
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_823D90 endp

align 10h



sub_823DD0 proc	near

PBuffer= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	0
push	1
push	esi
mov	[esp+14h+PBuffer], 0
call	sub_81ABE0
push	eax		; VarName
lea	eax, [esp+18h+PBuffer]
push	0		; PBufferSizeInBytes
push	eax		; PBuffer
call	__dupenv_s
mov	ecx, [esp+20h+PBuffer]
push	ecx
push	esi
call	sub_81C070
mov	edx, [esp+28h+PBuffer]
push	edx		; void *
call	_free
add	esp, 24h
mov	eax, 1
pop	esi
pop	ecx
retn
sub_823DD0 endp

align 10h



sub_823E20 proc	near

var_C= dword ptr -0Ch
dwMilliseconds=	dword ptr -8
arg_0= dword ptr  4

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
push	1
push	eax
call	sub_81AC40
fstp	[esp+14h+var_C]
fld	[esp+14h+var_C]
add	esp, 8
fmul	ds:dbl_15FCD88
fnstcw	word ptr [esp+0Ch+var_C]
movzx	eax, word ptr [esp+0Ch+var_C]
or	eax, 0C00h
mov	[esp+0Ch+dwMilliseconds], eax
fldcw	word ptr [esp+0Ch+dwMilliseconds]
fistp	qword ptr [esp+0Ch+dwMilliseconds]
mov	ecx, [esp+0Ch+dwMilliseconds]
push	ecx		; dwMilliseconds
fldcw	word ptr [esp+10h+var_C]
call	ds:Sleep
xor	eax, eax
add	esp, 0Ch
retn
sub_823E20 endp

align 10h



sub_823E70 proc	near

Buf= byte ptr -18h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_823E9D
lea	ecx, [ecx+0]

loc_823E90:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_823E90

loc_823E9D:
lea	eax, [esp+1Ch+Buf]
push	12h		; Size
push	eax		; Buf
mov	[esi+1Ch], ecx
call	_tmpnam_s
lea	ecx, [esp+24h+Buf]
push	ecx
push	esi
call	sub_81C070
mov	ecx, [esp+2Ch+var_4]
add	esp, 10h
pop	esi
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 18h
retn
sub_823E70 endp

align 10h



sub_823ED0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
call	_clock
mov	ecx, eax
mov	eax, 10624DD3h
imul	ecx
mov	ecx, [esp+4+arg_0]
sar	edx, 6
mov	eax, edx
shr	eax, 1Fh
add	eax, edx
mov	[esp+4+var_4], eax
mov	eax, [ecx+1Ch]
mov	dword ptr [eax], 3
fild	[esp+4+var_4]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[ecx+1Ch], eax
mov	eax, 1
pop	ecx
retn
sub_823ED0 endp

align 10h



sub_823F10 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
fld	ds:flt_15BF168
mov	eax, [ecx+1Ch]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
mov	[ecx+1Ch], eax
mov	eax, 1
retn
sub_823F10 endp

align 10h



sub_823F40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
call	_clock
mov	ecx, [esp+4+arg_0]
mov	[esp+4+var_4], eax
mov	eax, [ecx+1Ch]
fild	[esp+4+var_4]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[ecx+1Ch], eax
mov	eax, 1
pop	ecx
retn
sub_823F40 endp

align 10h
dword_823F70 dd	424448Bh, 16A016Ah, 6E42E850h, 0C483FFFFh
dd 4EE8500Ch, 0CCFFF73Bh, 2 dup(0CCCCCCCCh)
dd 24748B56h, 6A5708h, 0E856016Ah, 0FFFF6C40h
dd 0E857F88Bh, 78C8h, 83204E8Bh, 0C08510C4h
dd 741C468Bh, 73C13B31h, 24A48D14h, 0

loc_823FC0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_823FC0
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[esi+1Ch], ecx
call	sub_823D30
pop	edi
mov	eax, 3
pop	esi
retn
cmp	eax, ecx
jnb	short loc_823FFD
lea	ebx, [ebx+0]

loc_823FF0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_823FF0

loc_823FFD:
mov	dword ptr [ecx+4], 1
mov	dword ptr [ecx], 1
add	ecx, 8
pop	edi
mov	[esi+1Ch], ecx
mov	eax, 1
pop	esi
retn
align 10h



sub_824020 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	0
push	2
push	esi
mov	edi, eax
call	sub_81ABE0
push	eax		; char *
push	edi		; char *
call	sub_82B8A0
mov	ecx, [esi+20h]
add	esp, 20h
test	eax, eax
mov	eax, [esi+1Ch]
jz	short loc_82407A
cmp	eax, ecx
jnb	short loc_824061

loc_824054:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_824054

loc_824061:
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[esi+1Ch], ecx
call	sub_823D30
pop	edi
mov	eax, 3
pop	esi
retn

loc_82407A:
cmp	eax, ecx
jnb	short loc_82408D
mov	edi, edi

loc_824080:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_824080

loc_82408D:
mov	dword ptr [ecx+4], 1
mov	dword ptr [ecx], 1
add	ecx, 8
pop	edi
mov	[esi+1Ch], ecx
mov	eax, 1
pop	esi
retn
sub_824020 endp

align 10h



sub_8240B0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	1
push	esi
call	sub_81AB60
cdq
push	2
push	esi
mov	ebx, eax
mov	ebp, edx
call	sub_81AB60
mov	ecx, [esi+1Ch]
mov	edi, [esi+20h]
add	esp, 10h
cdq
cmp	ecx, edi
jnb	short loc_8240ED
jmp	short loc_8240E0
align 10h

loc_8240E0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edi
jb	short loc_8240E0

loc_8240ED:
push	edx
push	eax		; Time2
push	ebp
push	ebx		; Time1
mov	[esi+1Ch], edi
call	__difftime64
fstp	[esp+20h+arg_0]
mov	eax, [esi+1Ch]
fld	[esp+20h+arg_0]
add	esp, 10h
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_8240B0 endp




sub_824120 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	offset off_1682030
push	offset aAll_0	; "all"
push	2
push	esi
xor	edi, edi
call	sub_81AEA0
mov	ebx, eax
mov	eax, [esi+1Ch]
mov	ecx, eax
sub	ecx, [esi+20h]
add	esp, 10h
test	ecx, 0FFFFFFF8h
jnz	short loc_824158
mov	[eax], edi
add	eax, 8
mov	[esi+1Ch], eax

loc_824158:
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	esp, 8
cmp	eax, ecx
jnb	short loc_82419A
cmp	[eax], edi
jnz	short loc_824175
xor	edi, edi
jmp	short loc_8241AA

loc_824175:
cmp	eax, ecx
jnb	short loc_82419A
mov	edx, [eax]
cmp	edx, 4
jz	short loc_824185
cmp	edx, 3
jnz	short loc_82419A

loc_824185:
cmp	eax, ecx
jb	short loc_82418D
xor	edi, edi
jmp	short loc_8241AA

loc_82418D:
push	0
push	eax
push	esi
call	sub_818EC0
mov	edi, eax
jmp	short loc_8241A7

loc_82419A:		; "string or nil"
push	offset aStringOrNil
push	1
push	esi
call	sub_81AAE0

loc_8241A7:
add	esp, 0Ch

loc_8241AA:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_8241C1

loc_8241B4:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_8241B4

loc_8241C1:
mov	[esi+1Ch], ecx
mov	edx, ds:dword_1466FC4[ebx*4]
push	edi		; char *
push	edx		; int
call	_setlocale
push	eax
push	esi
call	sub_81C070
add	esp, 10h
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn
sub_824120 endp

align 10h



sub_8241F0 proc	near

var_434= dword ptr -434h
Time= qword ptr	-430h
Tm= tm ptr -428h
var_404= byte ptr -404h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 434h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+434h+var_4], eax
push	esi
mov	esi, [esp+438h+arg_0]
push	edi
push	0
push	0
push	1
push	esi
call	sub_81AE20
push	0FFFFFFFFh
push	2
push	esi
mov	edi, eax
call	sub_81ADC0
cdq
mov	dword ptr [esp+458h+Time], eax
and	eax, edx
add	esp, 1Ch
mov	dword ptr [esp+43Ch+Time+4], edx
cmp	eax, 0FFFFFFFFh
jnz	short loc_82424A
push	0		; Time
call	__time64
add	esp, 4
mov	dword ptr [esp+43Ch+Time], eax
mov	dword ptr [esp+43Ch+Time+4], edx

loc_82424A:
lea	eax, [esp+43Ch+Time]
push	eax		; Time
lea	ecx, [esp+440h+Tm]
push	ecx		; Tm
call	__localtime64_s
add	esp, 8
test	edi, edi
jnz	short loc_824297
lea	edx, [esp+43Ch+Tm]
push	edx		; struct tm *
push	offset aC_9	; "%c"
lea	eax, [esp+444h+var_404]
push	400h		; size_t
push	eax		; char *
call	_strftime
add	esp, 10h
test	eax, eax
jz	loc_824472
lea	ecx, [esp+43Ch+var_404]
push	ecx
push	esi
call	sub_81C070
add	esp, 8
jmp	loc_824481

loc_824297:
cmp	byte ptr [edi],	21h
jnz	short loc_82429D
inc	edi

loc_82429D:
cmp	byte ptr [edi],	2Ah
jnz	loc_824446
cmp	byte ptr [edi+1], 74h
jnz	loc_824446
mov	ecx, [esi+1Ch]
mov	eax, [esi+20h]
cmp	ecx, eax
jnb	short loc_8242CD
lea	ebx, [ebx+0]

loc_8242C0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_8242C0

loc_8242CD:
push	1
push	0Ah
push	esi
mov	[esi+1Ch], eax
call	sub_81BD50
mov	edx, [esp+448h+Tm.tm_year]
mov	eax, [esi+1Ch]
add	edx, 76Ch
mov	[esp+448h+var_434], edx
fild	[esp+448h+var_434]
push	offset aYear_0	; "year"
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
mov	ecx, [esp+454h+Tm.tm_mon]
mov	eax, [esi+1Ch]
inc	ecx
mov	[esp+454h+var_434], ecx
fild	[esp+454h+var_434]
push	offset aMonth_0	; "month"
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
fild	[esp+460h+Tm.tm_mday]
mov	eax, [esi+1Ch]
push	offset aDay_0	; "day"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
fild	[esp+46Ch+Tm.tm_hour]
mov	eax, [esi+1Ch]
push	offset aHour_0	; "hour"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
fild	[esp+478h+Tm.tm_min]
mov	eax, [esi+1Ch]
push	offset aMin_3	; "min"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
fild	[esp+484h+Tm.tm_sec]
mov	eax, [esi+1Ch]
add	esp, 48h
push	offset aSec	; "sec"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
mov	edx, [esp+448h+Tm.tm_wday]
mov	eax, [esi+1Ch]
inc	edx
mov	[esp+448h+var_434], edx
fild	[esp+448h+var_434]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
push	offset aWday	; "wday"
push	1
push	esi
call	sub_5F2430
mov	ecx, [esp+454h+Tm.tm_yday]
mov	eax, [esi+1Ch]
inc	ecx
mov	[esp+454h+var_434], ecx
fild	[esp+454h+var_434]
push	offset aYday	; "yday"
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
mov	eax, [esi+1Ch]
mov	edx, [esp+460h+Tm.tm_isdst]
push	offset aIsdst	; "isdst"
mov	[eax+4], edx
mov	dword ptr [eax], 1
add	eax, 8
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 30h
jmp	short loc_824481

loc_824446:
lea	eax, [esp+43Ch+Tm]
push	eax		; struct tm *
push	edi		; char *
lea	ecx, [esp+444h+var_404]
push	400h		; size_t
push	ecx		; char *
call	_strftime
add	esp, 10h
test	eax, eax
jz	short loc_824472
lea	edx, [esp+43Ch+var_404]
push	edx
push	esi
call	sub_81C070
add	esp, 8
jmp	short loc_824481

loc_824472:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax

loc_824481:
mov	ecx, [esp+43Ch+var_4]
pop	edi
pop	esi
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 434h
retn
sub_8241F0 endp

align 10h



sub_8244A0 proc	near

var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
Tm= tm ptr -24h
arg_0= dword ptr  4

sub	esp, 2Ch
push	esi
mov	esi, [esp+30h+arg_0]
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
push	edi
mov	edi, 0FFFFFFF8h
test	edi, eax
jnz	short loc_8244CF
push	0		; Time
call	__time64
add	esp, 4
mov	[esp+34h+var_2C], eax
mov	[esp+34h+var_28], edx
jmp	loc_824830

loc_8244CF:
push	5
push	1
push	esi
call	sub_81ACD0
push	offset aYear_1	; "year"
push	1
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 18h
cmp	eax, ecx
jb	short loc_82454D
cmp	dword ptr [eax], 0
jz	short loc_82454D
cmp	eax, ecx
jb	short loc_82454D
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_82454D
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
cmp	eax, ecx
jb	short loc_824546
cmp	dword ptr [eax], 0
jz	short loc_824546
cmp	eax, ecx
jb	short loc_824546
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_824546
push	0FFFFFFFFh
push	esi
call	sub_4E3DD0
add	esp, 8
call	__ftol2_sse
add	[esi+1Ch], edi
jmp	short loc_824560

loc_824546:
xor	eax, eax
add	[esi+1Ch], edi
jmp	short loc_824560

loc_82454D:		; "year"
push	offset aYear_1
push	offset aSMustBeInTheTa ; "%s must be in	the table"
push	esi
call	sub_81A760
add	esp, 0Ch

loc_824560:		; "month"
push	offset aMonth_1
add	eax, 0FFFFF894h
push	1
push	esi
mov	[esp+40h+Tm.tm_year], eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 0Ch
cmp	eax, ecx
jb	short loc_8245DD
cmp	dword ptr [eax], 0
jz	short loc_8245DD
cmp	eax, ecx
jb	short loc_8245DD
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_8245DD
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
cmp	eax, ecx
jb	short loc_8245D6
cmp	dword ptr [eax], 0
jz	short loc_8245D6
cmp	eax, ecx
jb	short loc_8245D6
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_8245D6
push	0FFFFFFFFh
push	esi
call	sub_4E3DD0
add	esp, 8
call	__ftol2_sse
add	[esi+1Ch], edi
jmp	short loc_8245F0

loc_8245D6:
xor	eax, eax
add	[esi+1Ch], edi
jmp	short loc_8245F0

loc_8245DD:		; "month"
push	offset aMonth_1
push	offset aSMustBeInTheTa ; "%s must be in	the table"
push	esi
call	sub_81A760
add	esp, 0Ch

loc_8245F0:		; "day"
push	offset aDay_1
dec	eax
push	1
push	esi
mov	[esp+40h+Tm.tm_mon], eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 0Ch
cmp	eax, ecx
jb	short loc_824669
cmp	dword ptr [eax], 0
jz	short loc_824669
cmp	eax, ecx
jb	short loc_824669
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_824669
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
cmp	eax, ecx
jb	short loc_824662
cmp	dword ptr [eax], 0
jz	short loc_824662
cmp	eax, ecx
jb	short loc_824662
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_824662
push	0FFFFFFFFh
push	esi
call	sub_4E3DD0
add	esp, 8
call	__ftol2_sse
add	[esi+1Ch], edi
jmp	short loc_82467C

loc_824662:
xor	eax, eax
add	[esi+1Ch], edi
jmp	short loc_82467C

loc_824669:		; "day"
push	offset aDay_1
push	offset aSMustBeInTheTa ; "%s must be in	the table"
push	esi
call	sub_81A760
add	esp, 0Ch

loc_82467C:		; "hour"
push	offset aHour_1
push	1
push	esi
mov	[esp+40h+Tm.tm_mday], eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 0Ch
cmp	eax, ecx
jb	short loc_8246C6
cmp	dword ptr [eax], 0
jz	short loc_8246C6
cmp	eax, ecx
jb	short loc_8246C6
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_8246C6
push	0FFFFFFFFh
push	esi
call	sub_4E3DD0
add	esp, 8
call	__ftol2_sse
jmp	short loc_8246C8

loc_8246C6:
xor	eax, eax

loc_8246C8:
add	[esi+1Ch], edi
push	offset aMin_4	; "min"
push	1
push	esi
mov	[esp+40h+Tm.tm_hour], eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 0Ch
cmp	eax, ecx
jb	short loc_824715
cmp	dword ptr [eax], 0
jz	short loc_824715
cmp	eax, ecx
jb	short loc_824715
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_824715
push	0FFFFFFFFh
push	esi
call	sub_4E3DD0
add	esp, 8
call	__ftol2_sse
jmp	short loc_824717

loc_824715:
xor	eax, eax

loc_824717:
add	[esi+1Ch], edi
push	offset aSec_0	; "sec"
push	1
push	esi
mov	[esp+40h+Tm.tm_min], eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 0Ch
cmp	eax, ecx
jb	short loc_824764
cmp	dword ptr [eax], 0
jz	short loc_824764
cmp	eax, ecx
jb	short loc_824764
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_824764
push	0FFFFFFFFh
push	esi
call	sub_4E3DD0
add	esp, 8
call	__ftol2_sse
jmp	short loc_824766

loc_824764:
xor	eax, eax

loc_824766:
add	[esi+1Ch], edi
push	offset aIsdst_0	; "isdst"
push	1
push	esi
mov	[esp+40h+Tm.tm_sec], eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 0Ch
cmp	eax, ecx
jb	short loc_8247B7
cmp	dword ptr [eax], 1
jnz	short loc_8247B7
cmp	eax, ecx
jb	short loc_8247AF
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_8247AF
cmp	ecx, 1
jnz	short loc_8247A4
cmp	dword ptr [eax+4], 0
jz	short loc_8247AF

loc_8247A4:
mov	eax, 1
mov	[esp+34h+Tm.tm_isdst], eax
jmp	short loc_8247BF

loc_8247AF:
xor	eax, eax
mov	[esp+34h+Tm.tm_isdst], eax
jmp	short loc_8247BF

loc_8247B7:
mov	[esp+34h+Tm.tm_isdst], 0FFFFFFFFh

loc_8247BF:
add	[esi+1Ch], edi
lea	ecx, [esp+34h+Tm]
push	ecx		; Tm
call	__mktime64
mov	[esp+38h+var_2C], eax
and	eax, edx
add	esp, 4
cmp	eax, 0FFFFFFFFh
jnz	short loc_82480C
mov	edx, [esp+34h+Tm.tm_sec]
mov	eax, [esp+34h+Tm.tm_min]
mov	ecx, [esp+34h+Tm.tm_hour]
push	edx
mov	edx, [esp+38h+Tm.tm_mday]
push	eax
mov	eax, [esp+3Ch+Tm.tm_mon]
push	ecx
mov	ecx, [esp+40h+Tm.tm_year]
push	edx
push	eax
push	ecx
push	offset aErrorInGetting ; "error	in getting time	for year(%d), mon"...
push	esi
call	sub_81A760
add	esp, 20h
pop	edi
pop	esi
add	esp, 2Ch
retn

loc_82480C:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_82482D
jmp	short loc_824820
align 10h

loc_824820:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_824820

loc_82482D:
mov	[esi+1Ch], ecx

loc_824830:
mov	eax, [esi+1Ch]
fild	[esp+34h+var_2C]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
pop	edi
mov	eax, 1
pop	esi
add	esp, 2Ch
retn
sub_8244A0 endp

align 10h



sub_824860 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1		; int
push	offset off_1466FE4 ; int
push	offset aProfile	; "profile"
push	eax		; int
call	sub_81A860
add	esp, 10h
mov	eax, 1
retn
sub_824860 endp

align 10h



sub_824880 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	eax
call	sub_81D900
add	esp, 4
xor	eax, eax
retn
sub_824880 endp




sub_824890 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	ecx, [eax+4]
mov	edx, [esp+arg_8]
mov	[edx], ecx
mov	eax, [eax]
retn
sub_824890 endp




sub_8248A0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi+1Ch]
sub	eax, 8
push	edi
cmp	eax, [esi+20h]
jnb	short loc_8248B8
xor	edi, edi
jmp	short loc_8248C9

loc_8248B8:
lea	ecx, [esp+10h+var_4]
push	ecx
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch
mov	edi, eax

loc_8248C9:
mov	edx, [esp+10h+var_4]
push	edx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ecx, [esp+14h+var_4]
push	ecx
push	edi
push	eax
mov	[esp+20h+var_8], eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	dword ptr [esi+1Ch], 0FFFFFFF8h
lea	edx, [esp+20h+var_8]
push	edx
push	offset sub_824890
push	esi
call	sub_833F10
mov	eax, [esp+2Ch+var_8]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 20h
pop	edi
mov	eax, 1
pop	esi
add	esp, 8
retn
sub_8248A0 endp

align 10h



sub_824910 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1		; int
push	offset off_1467010 ; int
push	offset aSerialize_0 ; "serialize"
push	eax		; int
call	sub_81A860
add	esp, 10h
mov	eax, 1
retn
sub_824910 endp

align 10h



sub_824930 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
mov	esi, ecx
test	eax, eax
jbe	short loc_824993
push	ebx
mov	[esp+0Ch+arg_4], eax
push	edi

loc_824946:
mov	eax, [esi+4]
cmp	[esi+8], eax
jnz	short loc_824976
lea	edi, [eax+eax]
push	edi		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ecx, [esi]
mov	ebx, eax
mov	eax, [esi+4]
push	eax
push	ecx
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 14h
mov	[esi], ebx
mov	[esi+4], edi

loc_824976:
mov	eax, [esi+8]
mov	dl, [ebp+0]
mov	ecx, [esi]
mov	[eax+ecx], dl
mov	eax, 1
add	[esi+8], eax
add	ebp, eax
sub	[esp+10h+arg_4], eax
jnz	short loc_824946
pop	edi
pop	ebx

loc_824993:
pop	esi
xor	eax, eax
pop	ebp
retn	0Ch
sub_824930 endp

align 10h



sub_8249A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_0]
push	eax
push	ecx
mov	ecx, [esp+8+arg_C]
push	edx
call	sub_824930
retn
sub_8249A0 endp

align 10h



sub_8249C0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	esi
push	400h		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	esi, [esp+14h+arg_0]
mov	[esp+14h+var_C], eax
lea	eax, [esp+14h+var_C]
push	eax
push	offset sub_8249A0
push	esi
mov	[esp+20h+var_8], 400h
mov	[esp+20h+var_4], 0
call	sub_833A90
mov	ecx, [esp+20h+var_4]
mov	edx, [esp+20h+var_C]
push	ecx
push	edx
push	esi
call	sub_81B9D0
mov	eax, [esp+2Ch+var_C]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 20h
mov	eax, 1
pop	esi
add	esp, 0Ch
retn
sub_8249C0 endp

align 10h



sub_824A20 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
lea	eax, [esp+8+var_4]
push	eax
push	ecx
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+8+var_4], 0
jz	short loc_824A52
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
pop	ecx
retn

loc_824A52:
push	edi
mov	edi, [esi+1Ch]
push	edi
push	eax
push	esi
call	sub_819140
add	esp, 0Ch
add	edi, 8
mov	[esi+1Ch], edi
pop	edi
pop	esi
pop	ecx
retn
sub_824A20 endp

align 10h



sub_824A70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1		; int
push	offset off_14670D8 ; int
push	offset aDebug	; "debug"
push	eax		; int
call	sub_81A860
add	esp, 10h
mov	eax, 1
retn
sub_824A70 endp

align 10h



sub_824A90 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx+1Ch]
sub	eax, [ecx+20h]
sar	eax, 3
push	eax
push	ecx
call	sub_81CB70
add	esp, 8
retn
sub_824A90 endp

byte_824AA8 db 9 dup(0CCh)
xor	eax, eax
retn
align 10h



sub_824AC0 proc	near

var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	ebx
push	esi
mov	esi, [esp+10Ch+arg_0]
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
lea	eax, [esp+10Ch+var_104]
mov	[esp+10Ch+var_104], 0
cmp	ecx, edx
jnb	short loc_824AFD

loc_824AF0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_824AF0

loc_824AFD:
mov	[esi+1Ch], edx
mov	edx, offset aCont ; "cont\n"
lea	ecx, [esp+10Ch+var_104]
lea	esp, [esp+0]

loc_824B10:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_824B30
test	bl, bl
jz	short loc_824B2C
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_824B30
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_824B10

loc_824B2C:
xor	ecx, ecx
jmp	short loc_824B35

loc_824B30:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_824B35:
test	ecx, ecx
jz	loc_824BCF
lea	ecx, [ecx+0]

loc_824B40:		; "=(debug command)"
push	offset aDebugCommand
push	eax
push	esi
call	sub_81A640
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	esp, 0Ch
cmp	eax, ecx
jnb	short loc_824B6D
lea	esp, [esp+0]

loc_824B60:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_824B60

loc_824B6D:		; "KoreVM_debug> "
push	offset aKorevm_debug
mov	[esi+1Ch], ecx
call	sub_7A1F02
add	eax, 40h
push	eax		; FILE *
call	_fprintf
call	sub_7A1F02
push	eax		; FILE *
lea	eax, [esp+118h+var_104]
push	0FFh		; int
push	eax		; char *
call	_fgets
add	esp, 14h
mov	edx, offset aCont ; "cont\n"
mov	ecx, eax

loc_824BA2:
mov	bl, [ecx]
cmp	bl, [edx]
jnz	short loc_824BC2
test	bl, bl
jz	short loc_824BBE
mov	bl, [ecx+1]
cmp	bl, [edx+1]
jnz	short loc_824BC2
add	ecx, 2
add	edx, 2
test	bl, bl
jnz	short loc_824BA2

loc_824BBE:
xor	ecx, ecx
jmp	short loc_824BC7

loc_824BC2:
sbb	ecx, ecx
sbb	ecx, 0FFFFFFFFh

loc_824BC7:
test	ecx, ecx
jnz	loc_824B40

loc_824BCF:
mov	ecx, [esp+10Ch+var_4]
pop	esi
pop	ebx
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 104h
retn
sub_824AC0 endp

align 10h



sub_824BF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
and	eax, 0FFFFFFF8h
cmp	eax, 10h
jge	short loc_824C07
xor	eax, eax
pop	esi
retn

loc_824C07:
push	edi
push	5
push	0FFFFFFFFh
push	esi
call	sub_81ACD0
mov	edi, [esi+1Ch]
lea	eax, [edi-10h]
add	esp, 0Ch
cmp	eax, [esi+20h]
jb	short loc_824C26
xor	ecx, ecx
mov	edx, eax
jmp	short loc_824C2D

loc_824C26:
mov	ecx, 1
xor	edx, edx

loc_824C2D:
xor	eax, eax
test	ecx, ecx
jnz	short loc_824C41
add	edi, 0FFFFFFF8h
push	edi
push	edx
push	esi
call	sub_8191A0
add	esp, 0Ch

loc_824C41:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
xor	ecx, ecx
test	eax, eax
setnz	cl
pop	edi
pop	esi
mov	eax, ecx
retn
sub_824BF0 endp

align 10h



sub_824C60 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+1Ch]
sub	ecx, [eax+20h]
and	ecx, 0FFFFFFF8h
cmp	ecx, 8
jge	short loc_824C75
xor	eax, eax
retn

loc_824C75:
push	0FFFFFFFFh
push	eax
call	sub_824A20
add	esp, 8
mov	eax, 1
retn
sub_824C60 endp

align 10h



sub_824C90 proc	near

var_238= dword ptr -238h
var_234= byte ptr -234h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 238h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+238h+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+244h+arg_0]
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
push	edi
mov	ebx, esi
mov	edi, 1
cmp	eax, ecx
jnb	short loc_824CEC
mov	edx, [eax]
cmp	edx, 9
jz	short loc_824CEC
cmp	edx, 0Ah
jz	short loc_824CEC
cmp	edx, 8
jnz	short loc_824CEC
cmp	eax, ecx
jb	short loc_824CD9
xor	ebx, ebx
jmp	short loc_824CE7

loc_824CD9:
cmp	edx, 8
jnz	short loc_824CE3
mov	eax, [eax+4]
jmp	short loc_824CE5

loc_824CE3:
xor	eax, eax

loc_824CE5:
mov	ebx, eax

loc_824CE7:
mov	edi, 2

loc_824CEC:
push	edi
push	esi
call	sub_81AB60
inc	edi
push	edi
push	esi
mov	ebp, eax
call	sub_81AB60
mov	[esp+258h+var_238], eax
mov	eax, edi
neg	eax
add	eax, eax
add	eax, eax
add	eax, eax
add	[esi+1Ch], eax
add	esp, 10h
test	ebp, ebp
jge	short loc_824D2B

loc_824D15:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, 1
jmp	short loc_824D8E

loc_824D2B:
lea	ecx, [esp+248h+var_234]
push	ecx
push	ebp
push	ebx
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jnz	short loc_824D4E
push	offset aLevelOutOfRa_0 ; "level	out of range"
dec	edi
push	edi
push	esi
call	sub_81A940
add	esp, 0Ch

loc_824D4E:
mov	edx, [esp+248h+var_238]
push	edx
lea	eax, [esp+24Ch+var_234]
push	eax
push	ebx
call	sub_81D590
mov	edi, eax
add	esp, 0Ch
test	edi, edi
jz	short loc_824D15
cmp	esi, ebx
jz	short loc_824D77
push	1
push	esi
push	ebx
call	sub_81BF20
add	esp, 0Ch

loc_824D77:
push	edi
push	esi
call	sub_81C070
push	0FFFFFFFEh
push	esi
call	sub_4E3E50
add	esp, 10h
mov	eax, 2

loc_824D8E:
mov	ecx, [esp+248h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 238h
retn
sub_824C90 endp

align 10h



sub_824DB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
mov	edi, [esi+1Ch]
add	esp, 8
cmp	eax, edi
jnb	short loc_824DE8
push	edi
push	eax
push	esi
call	sub_819230
add	esp, 0Ch
test	eax, eax
jz	short loc_824DE8
add	edi, 8
mov	[esi+1Ch], edi
pop	edi
mov	eax, 1
pop	esi
retn

loc_824DE8:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
pop	edi
mov	eax, 1
pop	esi
retn
sub_824DB0 endp

align 10h



sub_824E00 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+1Ch]
mov	edx, [eax+38h]
mov	[ecx], edx
mov	edx, [eax+3Ch]
mov	[ecx+4], edx
add	ecx, 8
mov	[eax+1Ch], ecx
mov	eax, 1
retn
sub_824E00 endp

align 10h



sub_824E20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
add	esp, 8
cmp	eax, [esi+1Ch]
jnb	short loc_824E44
mov	eax, [eax]
cmp	eax, 0Ah
jz	short loc_824E54
cmp	eax, 9
jz	short loc_824E54

loc_824E44:		; "function"
push	offset aFunction_3
push	1
push	esi
call	sub_81AAE0
add	esp, 0Ch

loc_824E54:
push	2
push	esi
call	sub_81AB60
add	dword ptr [esi+1Ch], 0FFFFFFF8h
push	eax
push	1
push	esi
call	sub_81D680
add	esp, 14h
test	eax, eax
jnz	short loc_824E8A
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn

loc_824E8A:
push	eax
push	esi
call	sub_81C070
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
lea	ecx, [eax-8]
mov	[eax-18h], edx
mov	edx, [ecx+4]
mov	[eax-14h], edx
add	esp, 8
mov	[esi+1Ch], ecx
mov	eax, 2
pop	esi
retn
sub_824E20 endp




sub_824EB0 proc	near

var_238= dword ptr -238h
var_234= byte ptr -234h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 238h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+238h+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+244h+arg_0]
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
push	edi
mov	ebx, esi
mov	edi, 1
cmp	eax, ecx
jnb	short loc_824F0C
mov	edx, [eax]
cmp	edx, 9
jz	short loc_824F0C
cmp	edx, 0Ah
jz	short loc_824F0C
cmp	edx, 8
jnz	short loc_824F0C
cmp	eax, ecx
jb	short loc_824EF9
xor	ebx, ebx
jmp	short loc_824F07

loc_824EF9:
cmp	edx, 8
jnz	short loc_824F03
mov	eax, [eax+4]
jmp	short loc_824F05

loc_824F03:
xor	eax, eax

loc_824F05:
mov	ebx, eax

loc_824F07:
mov	edi, 2

loc_824F0C:
push	edi
push	esi
call	sub_81AB60
inc	edi
push	edi
push	esi
mov	ebp, eax
call	sub_81AB60
mov	[esp+258h+var_238], eax
lea	eax, [edi+1]
push	eax
push	esi
call	sub_81AA40
add	esp, 18h
test	ebp, ebp
jge	short loc_824F54
lea	ecx, ds:0[edi*8]
mov	edx, 0FFFFFFF8h
sub	edx, ecx
add	[esi+1Ch], edx
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
jmp	short loc_824FA5

loc_824F54:
lea	eax, [esp+248h+var_234]
push	eax
push	ebp
push	ebx
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jnz	short loc_824F77
push	offset aLevelOutOfRa_1 ; "(level out of	range)"
dec	edi
push	edi
push	esi
call	sub_81A940
add	esp, 0Ch

loc_824F77:
push	1
push	ebx
push	esi
call	sub_81BF20
mov	ecx, [esp+254h+var_238]
push	ecx
lea	edx, [esp+258h+var_234]
push	edx
push	ebx
call	sub_81D780
add	esp, 18h
test	eax, eax
jnz	short loc_824F9B
add	dword ptr [ebx+1Ch], 0FFFFFFF8h

loc_824F9B:
push	eax
push	esi
call	sub_81C070
add	esp, 8

loc_824FA5:
mov	ecx, [esp+248h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 238h
retn
sub_824EB0 endp

align 10h



sub_824FD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 8
add	esp, 8
cmp	eax, ecx
jnb	short loc_824FFB
cmp	dword ptr [eax], 0
jz	short loc_824FFF
cmp	eax, ecx
jnb	short loc_824FFB
cmp	dword ptr [eax], 5
jz	short loc_824FFF

loc_824FFB:
xor	eax, eax
jmp	short loc_825004

loc_824FFF:
mov	eax, 1

loc_825004:		; "nil or table	expected"
push	offset aNilOrTableExpe
push	2
push	eax
push	esi
call	sub_81AB40
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 10h
add	esp, 10h
cmp	ecx, eax
jnb	short loc_82502F

loc_825022:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_825022

loc_82502F:
mov	ecx, [esi+20h]
mov	[esi+1Ch], eax
cmp	ecx, eax
jnb	short loc_82504B
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	esi
call	sub_8192D0
add	esp, 0Ch
add	dword ptr [esi+1Ch], 0FFFFFFF8h

loc_82504B:
mov	eax, [esi+1Ch]
mov	dword ptr [eax+4], 0
mov	dword ptr [eax], 1
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_824FD0 endp

align 10h



sub_825070 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
add	esp, 8
cmp	eax, [esi+1Ch]
jnb	short loc_825094
mov	eax, [eax]
cmp	eax, 0Ah
jz	short loc_8250A4
cmp	eax, 9
jz	short loc_8250A4

loc_825094:		; "function"
push	offset aFunction_4
push	1
push	esi
call	sub_81AAE0
add	esp, 0Ch

loc_8250A4:
push	edi
push	2
push	esi
call	sub_81AB60
push	3
push	esi
mov	edi, eax
call	sub_81AA40
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
mov	ecx, [esi+20h]
sub	eax, 8
mov	[ecx+8], edx
mov	edx, [eax+4]
push	edi
push	1
mov	[ecx+0Ch], edx
push	esi
mov	[esi+1Ch], eax
call	sub_81D7F0
add	esp, 1Ch
pop	edi
test	eax, eax
jnz	short loc_8250FA
add	dword ptr [esi+1Ch], 0FFFFFFF0h
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn

loc_8250FA:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
push	eax
push	esi
call	sub_81C070
add	esp, 8
mov	eax, 1
pop	esi
retn
sub_825070 endp

align 10h



sub_825110 proc	near

var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 210h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+210h+var_4], eax
push	ebx
mov	ebx, [esp+214h+arg_0]
mov	eax, [ebx+20h]
mov	edx, [ebx+1Ch]
push	ebp
push	esi
mov	ebp, ebx
cmp	eax, edx
jnb	short loc_825186
mov	ecx, [eax]
cmp	ecx, 9
jz	short loc_825186
cmp	ecx, 0Ah
jz	short loc_825186
cmp	ecx, 8
jnz	short loc_825186
cmp	eax, edx
jb	short loc_825153
xor	ebp, ebp
jmp	short loc_825161

loc_825153:
cmp	ecx, 8
jnz	short loc_82515D
mov	ecx, [eax+4]
jmp	short loc_82515F

loc_82515D:
xor	ecx, ecx

loc_82515F:
mov	ebp, ecx

loc_825161:
mov	ecx, edx
sub	ecx, eax
sar	ecx, 3
neg	ecx
jns	short loc_825180
push	edi
lea	edi, [edx+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd
pop	edi

loc_825180:
add	edx, 0FFFFFFF8h
mov	[ebx+1Ch], edx

loc_825186:
mov	ecx, [ebx+20h]
mov	eax, [ebx+1Ch]
cmp	ecx, eax
jnb	short loc_8251B8
mov	edx, [ecx]
cmp	edx, 0Ah
jz	short loc_82519C
cmp	edx, 9
jnz	short loc_8251B8

loc_82519C:
add	ecx, 8
cmp	eax, ecx
jnb	short loc_8251B0

loc_8251A3:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_8251A3

loc_8251B0:
mov	[ebx+1Ch], ecx
jmp	loc_825240

loc_8251B8:
xor	eax, eax
cmp	ebx, ebp
setz	al
push	eax
push	2
push	ebx
call	sub_81ADC0
lea	ecx, [esp+228h+var_210]
push	ecx
push	ebx
mov	esi, eax
call	sub_819CF0
mov	eax, [ebx+20h]
mov	ecx, [ebx+1Ch]
add	esp, 14h
cmp	eax, ecx
jnb	short loc_82521F
mov	edx, [eax]
cmp	edx, 4
jz	short loc_8251EE
cmp	edx, 3
jnz	short loc_82521F

loc_8251EE:
cmp	eax, ecx
jb	short loc_8251F6
xor	eax, eax
jmp	short loc_825202

loc_8251F6:
push	0
push	eax
push	ebx
call	sub_818EC0
add	esp, 0Ch

loc_825202:
push	eax
lea	edx, [esp+220h+var_210]
push	edx
call	sub_819BF0
lea	eax, [esp+224h+var_210]
push	offset asc_14672B8 ; "\n"
push	eax
call	sub_819BF0
add	esp, 10h

loc_82521F:
push	0Ah
push	esi
push	ebp
push	ebx
call	sub_81A360
lea	ecx, [esp+22Ch+var_210]
push	ecx
call	sub_819C20
lea	edx, [esp+230h+var_210]
push	edx
call	sub_819D10
add	esp, 18h

loc_825240:
mov	ecx, [esp+21Ch+var_4]
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 210h
retn
sub_825110 endp

align 10h



sub_825260 proc	near

ArgList= byte ptr -250h
var_24C= dword ptr -24Ch
var_248= dword ptr -248h
var_244= byte ptr -244h
var_240= dword ptr -240h
var_23C= dword ptr -23Ch
var_238= dword ptr -238h
var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= byte ptr -220h
DstBuf=	byte ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 250h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+250h+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+25Ch+arg_0]
push	edi
lea	eax, [esp+260h+ArgList]
push	eax
mov	edi, 1
push	edi
push	esi
mov	ebp, esi
call	sub_4328D0
add	esp, 0Ch
cmp	dword ptr [esp+260h+ArgList], 0
jnz	short loc_8252DA
mov	eax, [eax]
cmp	eax, 9
jz	short loc_8252DA
cmp	eax, 0Ah
jz	short loc_8252DA
cmp	eax, 8
jnz	short loc_8252DA
lea	ecx, [esp+260h+ArgList]
push	ecx
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	dword ptr [esp+260h+ArgList], 0
jz	short loc_8252C7
xor	ebp, ebp
jmp	short loc_8252D5

loc_8252C7:
cmp	dword ptr [eax], 8
jnz	short loc_8252D1
mov	eax, [eax+4]
jmp	short loc_8252D3

loc_8252D1:
xor	eax, eax

loc_8252D3:
mov	ebp, eax

loc_8252D5:
mov	edi, 2

loc_8252DA:
push	0
push	offset aNsluf	; "nSluf"
lea	edx, [edi+1]
push	edx
push	esi
call	sub_81AE20
add	esp, 10h
mov	dword ptr [esp+260h+ArgList], eax
test	edi, edi
jl	short loc_825315
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
lea	ecx, [ecx+edi*8]
cmp	eax, ecx
jnb	short loc_825310

loc_825303:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_825303

loc_825310:
mov	[esi+1Ch], ecx
jmp	short loc_82531F

loc_825315:
lea	edx, ds:8[edi*8]
add	[esi+1Ch], edx

loc_82531F:
mov	ebx, [ebp+1Ch]
sub	ebx, [ebp+20h]
lea	eax, [esp+260h+var_24C]
push	eax
push	edi
sar	ebx, 3
push	esi
mov	[esp+26Ch+var_248], ebx
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+260h+var_24C], 0
jnz	loc_8253C7
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_8253C7
lea	ecx, [esp+260h+var_24C]
push	ecx
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+260h+var_24C], 0
jz	short loc_82536E
xor	eax, eax
jmp	short loc_82537D

loc_82536E:
push	eax
push	esi
call	sub_818F90
add	esp, 8
call	__ftol2_sse

loc_82537D:
lea	edx, [esp+260h+var_244]
push	edx
push	eax
push	ebp
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jnz	short loc_8253A9
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, 1
jmp	loc_82563D

loc_8253A9:
mov	eax, dword ptr [esp+260h+ArgList]
push	eax		; ArgList
push	offset aS_18	; "%s"
lea	ecx, [esp+268h+DstBuf]
push	10h		; SizeInBytes
push	ecx		; DstBuf
call	sub_822D70
add	esp, 10h
jmp	short loc_825434

loc_8253C7:
lea	edx, [esp+260h+var_24C]
push	edx
push	edi
push	esi
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+260h+var_24C], 0
jnz	loc_82562F
mov	eax, [eax]
cmp	eax, 0Ah
jz	short loc_8253F1
cmp	eax, 9
jnz	loc_82562F

loc_8253F1:
mov	ebx, [esi+1Ch]
push	edi
push	esi
call	sub_432A50
mov	ecx, [eax]
mov	[ebx], ecx
mov	edx, [eax+4]
push	1
mov	[ebx+4], edx
push	ebp
add	ebx, 8
push	esi
mov	[esi+1Ch], ebx
call	sub_81BF20
mov	eax, dword ptr [esp+274h+ArgList]
push	eax		; ArgList
push	offset aS_19	; ">%s"
lea	ecx, [esp+27Ch+DstBuf]
push	10h		; SizeInBytes
push	ecx		; DstBuf
call	sub_822D70
mov	ebx, [esp+284h+var_248]
add	esp, 24h

loc_825434:
lea	edx, [esp+260h+var_244]
push	edx
lea	eax, [esp+264h+DstBuf]
push	eax
push	ebp
call	sub_81D440
add	esp, 0Ch
test	eax, eax
jnz	short loc_825458
push	offset aCouldnTGetDebu ; "couldn't get debug info"
jmp	loc_825634

loc_825458:
mov	eax, [ebp+1Ch]
sub	eax, [ebp+20h]
sar	eax, 3
sub	eax, ebx
push	eax
push	esi
push	ebp
mov	[esp+26Ch+var_248], eax
call	sub_81BF20
push	0
push	0
push	esi
call	sub_81BD50
add	esp, 18h
cmp	[esp+260h+DstBuf], 0
lea	ebx, [esp+260h+DstBuf]
jz	loc_825628

loc_825491:
movsx	eax, byte ptr [ebx]
add	eax, 0FFFFFFB4h
cmp	eax, 29h	; switch 42 cases
ja	loc_82561E	; default
			; jumptable 008254A7 cases 1-6,8-25,27-31,33,35-40
movzx	ecx, ds:byte_825674[eax]
jmp	ds:off_825658[ecx*4] ; switch jump

loc_8254AE:		; jumptable 008254A7 case 34
mov	edx, [esp+260h+var_240]
push	edx
push	esi
call	sub_81C070
push	offset aName_9	; "name"
push	0FFFFFFFEh
push	esi
call	sub_5F2430
mov	eax, [esp+274h+var_23C]
push	eax
push	esi
call	sub_81C070
push	offset aNamewhat ; "namewhat"
push	0FFFFFFFEh
push	esi
call	sub_5F2430
add	esp, 28h
jmp	loc_82561E	; default
			; jumptable 008254A7 cases 1-6,8-25,27-31,33,35-40

loc_8254E6:		; jumptable 008254A7 case 7
mov	ecx, [esp+260h+var_234]
push	ecx
push	esi
call	sub_81C070
push	offset aSource_0 ; "source"
push	0FFFFFFFEh
push	esi
call	sub_5F2430
lea	edx, [esp+274h+var_220]
push	edx
push	esi
call	sub_81C070
push	offset aShort_src ; "short_src"
push	0FFFFFFFEh
push	esi
call	sub_5F2430
fild	[esp+288h+var_228]
mov	eax, [esi+1Ch]
push	offset aLinedefined ; "linedefined"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
fild	[esp+294h+var_224]
mov	eax, [esi+1Ch]
push	offset aLastlinedefine ; "lastlinedefined"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
mov	eax, [esp+2A0h+var_238]
add	esp, 40h
push	eax
push	esi
call	sub_81C070
push	offset aWhat	; "what"
jmp	loc_825613

loc_825574:		; jumptable 008254A7 case 32
mov	eax, [esi+1Ch]
fild	[esp+260h+var_230]
push	offset aCurrentline ; "currentline"
mov	dword ptr [eax], 3
fstp	dword ptr [eax+4]
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 0Ch
jmp	loc_82561E	; default
			; jumptable 008254A7 cases 1-6,8-25,27-31,33,35-40

loc_82559F:		; jumptable 008254A7 case 41
mov	eax, [esi+1Ch]
fild	[esp+260h+var_22C]
push	offset aNups	; "nups"
mov	dword ptr [eax], 3
fstp	dword ptr [eax+4]
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 0Ch
jmp	short loc_82561E ; default
			; jumptable 008254A7 cases 1-6,8-25,27-31,33,35-40

loc_8255C7:		; jumptable 008254A7 case 0
mov	eax, [esi+1Ch]
mov	ecx, [eax-10h]
mov	[eax], ecx
mov	edx, [eax-0Ch]
push	offset aActivelines ; "activelines"
mov	[eax+4], edx
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 0Ch
jmp	short loc_82561E ; default
			; jumptable 008254A7 cases 1-6,8-25,27-31,33,35-40

loc_8255ED:		; jumptable 008254A7 case 26
mov	edi, [esi+1Ch]
or	eax, 0FFFFFFFFh
sub	eax, [esp+260h+var_248]
push	eax
push	esi
call	sub_432A50
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
mov	[edi+4], edx
add	edi, 8
mov	[esi+1Ch], edi
push	offset aFunc	; "func"

loc_825613:
push	0FFFFFFFEh
push	esi
call	sub_5F2430
add	esp, 14h

loc_82561E:		; default
inc	ebx		; jumptable 008254A7 cases 1-6,8-25,27-31,33,35-40
cmp	byte ptr [ebx],	0
jnz	loc_825491

loc_825628:
mov	eax, 1
jmp	short loc_82563D

loc_82562F:		; "Parameter to	debug.getinfo must be a	nu"...
push	offset aParameterToDeb

loc_825634:
push	esi
call	sub_81A760
add	esp, 8

loc_82563D:
mov	ecx, [esp+260h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 250h
retn
sub_825260 endp

align 4
off_825658 dd offset loc_8255C7	; jump table for switch	statement
dd offset loc_8254E6
dd offset loc_8255ED
dd offset loc_825574
dd offset loc_8254AE
dd offset loc_82559F
dd offset loc_82561E
byte_825674 db	    0,	   6,	  6,	 6 ; indirect table for	switch statement
db	6,     6,     6,     1
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     2,     6
db	6,     6,     6,     6
db	3,     6,     4,     6
db	6,     6,     6,     6
db	6,     5
align 10h



sub_8256A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
fabs
mov	eax, [esi+1Ch]
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
mov	dword ptr [eax], 3
fstp	[esp+0Ch+arg_0]
add	eax, 8
fld	[esp+0Ch+arg_0]
add	esp, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_8256A0 endp

align 10h



sub_8256E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIacos
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_8256E0 endp

align 10h



sub_825720 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIasin
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825720 endp

align 10h



sub_825760 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIatan
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825760 endp

align 10h



sub_8257A0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
push	2
push	esi
fstp	[esp+1Ch+var_8]
call	sub_81AC40
fld	[esp+1Ch+var_8]
add	esp, 10h
fxch	st(1)
call	sub_79A3DA
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+0Ch+arg_0]
mov	dword ptr [eax], 3
fld	[esp+0Ch+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
add	esp, 8
retn
sub_8257A0 endp

align 10h



; int __cdecl sub_825800(double)
sub_825800 proc	near

var_C= qword ptr -0Ch
arg_0= qword ptr  4

push	esi
mov	esi, dword ptr [esp+4+arg_0]
push	1
push	esi		; double
call	sub_81AC40
fstp	dword ptr [esp+0Ch+arg_0]
fld	dword ptr [esp+0Ch+arg_0]
fstp	[esp+0Ch+var_C]
call	_ceil
mov	eax, [esi+1Ch]
fstp	dword ptr [esp+0Ch+arg_0]
fld	dword ptr [esp+0Ch+arg_0]
mov	dword ptr [eax], 3
fstp	dword ptr [esp+0Ch+arg_0]
add	eax, 8
fld	dword ptr [esp+0Ch+arg_0]
add	esp, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825800 endp

align 10h



sub_825850 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIcos
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825850 endp

align 10h



sub_825890 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	sub_9F6A12
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825890 endp

align 10h



sub_8258D0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+0Ch+arg_0]
mov	eax, [esi+1Ch]
fld	[esp+0Ch+arg_0]
fmul	ds:dbl_14674C0
mov	dword ptr [eax], 3
add	eax, 8
add	esp, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_8258D0 endp

align 10h



sub_825910 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIexp
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825910 endp

align 10h



; int __cdecl sub_825950(double)
sub_825950 proc	near

var_C= qword ptr -0Ch
arg_0= qword ptr  4

push	esi
mov	esi, dword ptr [esp+4+arg_0]
push	1
push	esi		; double
call	sub_81AC40
fstp	[esp+0Ch+var_C]
call	_floor
fstp	dword ptr [esp+0Ch+arg_0]
fld	dword ptr [esp+0Ch+arg_0]
mov	eax, [esi+1Ch]
fstp	dword ptr [esp+0Ch+arg_0]
mov	dword ptr [eax], 3
fld	dword ptr [esp+0Ch+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
add	esp, 8
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825950 endp

align 10h



sub_8259A0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
push	2
push	esi
fstp	[esp+1Ch+var_8]
call	sub_81AC40
fld	[esp+1Ch+var_8]
add	esp, 10h
fxch	st(1)
call	unknown_libname_60 ; Microsoft VisualC 2-9/net runtime
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+0Ch+arg_0]
mov	dword ptr [eax], 3
fld	[esp+0Ch+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
add	esp, 8
retn
sub_8259A0 endp

align 10h



sub_825A00 proc	near

var_14=	qword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
add	esp, 8
lea	eax, [esp+8+var_4]
push	eax		; int *
sub	esp, 8
fstp	[esp+14h+var_14]
call	_frexp
mov	eax, [esi+1Ch]
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
mov	dword ptr [eax], 3
fstp	[esp+14h+arg_0]
add	esp, 0Ch
fld	[esp+8+arg_0]
add	eax, 10h
fstp	dword ptr [eax-0Ch]
fild	[esp+8+var_4]
mov	dword ptr [eax-8], 3
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 2
pop	esi
pop	ecx
retn
sub_825A00 endp

align 10h



sub_825A70 proc	near

var_14=	qword ptr -14h
var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+10h+var_4]
push	2
push	esi
call	sub_81AC40
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
add	esp, 10h
call	__ftol2_sse
fld	[esp+8+var_4]
push	eax		; int
sub	esp, 8
fstp	[esp+14h+var_14]
call	_ldexp
mov	eax, [esi+1Ch]
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
mov	dword ptr [eax], 3
fstp	[esp+14h+arg_0]
add	esp, 0Ch
fld	[esp+8+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
pop	ecx
retn
sub_825A70 endp

align 10h



sub_825AE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIlog
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825AE0 endp

align 10h



sub_825B20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIlog10
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825B20 endp

align 10h



sub_825B60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, [edi+1Ch]
sub	esi, [edi+20h]
push	1
push	edi
sar	esi, 3
call	sub_81AC40
fstp	[esp+18h+arg_0]
mov	ebx, 2
add	esp, 8
cmp	esi, ebx
jl	short loc_825BBC
lea	esp, [esp+0]

loc_825B90:
push	ebx
push	edi
call	sub_81AC40
fstp	[esp+18h+var_4]
fld	[esp+18h+var_4]
add	esp, 8
fld	[esp+10h+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_825BB5
fstp	[esp+10h+arg_0]
jmp	short loc_825BB7

loc_825BB5:
fstp	st

loc_825BB7:
inc	ebx
cmp	ebx, esi
jle	short loc_825B90

loc_825BBC:
mov	eax, [edi+1Ch]
fld	[esp+10h+arg_0]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
mov	[edi+1Ch], eax
pop	edi
pop	esi
mov	eax, 1
pop	ebx
pop	ecx
retn
sub_825B60 endp

align 10h



sub_825BE0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	1
push	edi
call	sub_81AC40
fstp	[esp+18h+arg_0]
mov	esi, [edi+1Ch]
sub	esi, [edi+20h]
mov	ebx, 2
sar	esi, 3
add	esp, 8
cmp	esi, ebx
jl	short loc_825C3C
lea	esp, [esp+0]

loc_825C10:
push	ebx
push	edi
call	sub_81AC40
fstp	[esp+18h+var_4]
fld	[esp+18h+var_4]
add	esp, 8
fld	[esp+10h+arg_0]
fcomp	st(1)
fnstsw	ax
test	ah, 41h
jnz	short loc_825C35
fstp	[esp+10h+arg_0]
jmp	short loc_825C37

loc_825C35:
fstp	st

loc_825C37:
inc	ebx
cmp	ebx, esi
jle	short loc_825C10

loc_825C3C:
mov	eax, [edi+1Ch]
fld	[esp+10h+arg_0]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
mov	[edi+1Ch], eax
pop	edi
pop	esi
mov	eax, 1
pop	ebx
pop	ecx
retn
sub_825BE0 endp

align 10h



sub_825C60 proc	near

var_18=	qword ptr -18h
var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
add	esp, 8
lea	eax, [esp+0Ch+var_8]
push	eax		; double *
sub	esp, 8
fstp	[esp+18h+var_18]
call	_modf
mov	eax, [esi+1Ch]
fld	[esp+18h+var_8]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
mov	dword ptr [eax+8], 3
fstp	[esp+18h+arg_0]
add	esp, 0Ch
fld	[esp+0Ch+arg_0]
add	eax, 10h
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 2
pop	esi
add	esp, 8
retn
sub_825C60 endp




sub_825CC0 proc	near

var_8= qword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+14h+arg_0]
fld	[esp+14h+arg_0]
push	2
push	esi
fstp	[esp+1Ch+var_8]
call	sub_81AC40
fld	[esp+1Ch+var_8]
add	esp, 10h
fxch	st(1)
call	__CIpow
fstp	[esp+0Ch+arg_0]
fld	[esp+0Ch+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+0Ch+arg_0]
mov	dword ptr [eax], 3
fld	[esp+0Ch+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
add	esp, 8
retn
sub_825CC0 endp

align 10h



sub_825D20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
fstp	[esp+0Ch+arg_0]
mov	eax, [esi+1Ch]
fld	[esp+0Ch+arg_0]
fmul	ds:dbl_15FCEC0
mov	dword ptr [eax], 3
add	eax, 8
add	esp, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825D20 endp

align 10h



sub_825D60 proc	near

var_18=	qword ptr -18h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
call	_rand
cdq
mov	ecx, 7FFFh
idiv	ecx
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi+1Ch]
mov	eax, ecx
sub	eax, [esi+20h]
sar	eax, 3
mov	[esp+0Ch+var_4], edx
fild	[esp+0Ch+var_4]
fdiv	ds:dbl_15FCC18
fstp	[esp+0Ch+var_8]
test	eax, eax
jnz	short loc_825DB3
fld	[esp+0Ch+var_8]
mov	dword ptr [ecx], 3
fstp	dword ptr [ecx+4]
add	ecx, 8
mov	[esi+1Ch], ecx
mov	eax, 1
pop	esi
add	esp, 8
retn

loc_825DB3:
push	edi
cmp	eax, 1
jnz	short loc_825E28
push	eax
push	esi
call	sub_81AB60
mov	[esp+18h+arg_0], eax
fild	[esp+18h+arg_0]
add	esp, 8
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
fcomp	ds:dbl_15FCC40
fnstsw	ax
test	ah, 1
jnz	short loc_825DE7
mov	eax, 1
jmp	short loc_825DE9

loc_825DE7:
xor	eax, eax

loc_825DE9:		; "interval is empty"
push	offset aIntervalIsEmpt
push	1		; double
push	eax
push	esi
call	sub_81AB40
fld	[esp+20h+arg_0]
fmul	[esp+20h+var_8]
mov	edi, [esi+1Ch]
add	esp, 8
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fstp	[esp+18h+var_18]
call	_floor
fstp	[esp+18h+arg_0]
fld	[esp+18h+arg_0]
fadd	ds:dbl_15FCC40
jmp	loc_825EB8

loc_825E28:
cmp	eax, 2
jl	loc_825ECA
push	1
push	esi
call	sub_81AB60
mov	[esp+18h+arg_0], eax
fild	[esp+18h+arg_0]
push	2
push	esi
fstp	[esp+20h+arg_0]
call	sub_81AB60
mov	[esp+20h+var_4], eax
fild	[esp+20h+var_4]
add	esp, 10h
fstp	[esp+10h+var_4]
fld	[esp+10h+arg_0]
fld	[esp+10h+var_4]
fcompp
fnstsw	ax
test	ah, 1
jnz	short loc_825E74
mov	eax, 1
jmp	short loc_825E76

loc_825E74:
xor	eax, eax

loc_825E76:		; "interval is empty"
push	offset aIntervalIsEm_0
push	2		; double
push	eax
push	esi
call	sub_81AB40
fld	[esp+20h+var_4]
fsub	[esp+20h+arg_0]
mov	edi, [esi+1Ch]
add	esp, 8
fadd	ds:dbl_15FCC40
fmul	[esp+18h+var_8]
fstp	[esp+18h+var_4]
fld	[esp+18h+var_4]
fstp	[esp+18h+var_18]
call	_floor
fstp	[esp+18h+var_4]
fld	[esp+18h+var_4]
fadd	[esp+18h+arg_0]

loc_825EB8:
fstp	dword ptr [edi+4]
mov	dword ptr [edi], 3
add	esp, 8
add	edi, 8
mov	[esi+1Ch], edi

loc_825ECA:
pop	edi
mov	eax, 1
pop	esi
add	esp, 8
retn
sub_825D60 endp

align 10h



sub_825EE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1
push	eax
call	sub_81AB60
push	eax		; unsigned int
call	_srand
add	esp, 0Ch
xor	eax, eax
retn
sub_825EE0 endp

align 10h



sub_825F00 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIsin
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825F00 endp

align 10h



sub_825F40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	sub_9F6A08
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825F40 endp

align 10h



sub_825F80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CIsqrt
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825F80 endp

align 10h



sub_825FC0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	__CItan
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_825FC0 endp

align 10h



sub_826000 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AC40
add	esp, 8
call	sub_9F6A19
fstp	[esp+4+arg_0]
fld	[esp+4+arg_0]
mov	eax, [esi+1Ch]
fstp	[esp+4+arg_0]
mov	dword ptr [eax], 3
fld	[esp+4+arg_0]
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_826000 endp

align 10h



sub_826040 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1		; int
push	offset off_1467390 ; int
push	offset aMath	; "math"
push	esi		; int
call	sub_81A860
fld	ds:flt_14674C8
mov	eax, [esi+1Ch]
push	offset aPi	; "pi"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
fld	dbl_167FFE0
mov	eax, [esi+1Ch]
push	offset aHuge	; "huge"
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 28h
mov	eax, 1
pop	esi
retn
sub_826040 endp

align 10h



sub_8260B0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
lea	eax, [esp+10h+var_8]
push	eax
push	ecx
push	esi
call	sub_4328D0
lea	edx, [esp+1Ch+var_4]
mov	edi, eax
mov	eax, [esp+1Ch+arg_8]
push	edx
push	eax
push	esi
call	sub_4328D0
add	esp, 18h
cmp	[esp+10h+var_8], 0
jnz	short loc_8260FD
cmp	[esp+10h+var_4], 0
jnz	short loc_8260FD
push	eax
push	edi
push	esi
call	sub_819030
add	esp, 0Ch
pop	edi
pop	esi
add	esp, 8
retn

loc_8260FD:
pop	edi
xor	eax, eax
pop	esi
add	esp, 8
retn
sub_8260B0 endp

align 10h



sub_826110 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1		; int
push	offset off_1467520 ; int
push	offset aTable_0	; "table"
push	eax		; int
call	sub_81A860
add	esp, 10h
mov	eax, 1
retn
sub_826110 endp

align 10h



sub_826130 proc	near

var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 21Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+21Ch+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+228h+arg_0]
push	5
push	1
push	esi
mov	[esp+234h+var_21C], 1
call	sub_81ACD0
lea	eax, [esp+234h+var_21C]
push	eax
push	offset unk_14674D7
push	2
push	esi
call	sub_81AE20
add	esp, 1Ch
mov	[esp+228h+var_214], eax
lea	edx, [eax+1]
lea	esp, [esp+0]

loc_826180:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_826180
push	1
sub	eax, edx
push	3
push	esi
mov	[esp+234h+var_218], eax
call	sub_81ADC0
mov	ebx, eax
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	eax, [esi+1Ch]
jb	short loc_8261A8
xor	eax, eax
jmp	short loc_8261B2

loc_8261A8:
push	eax
push	esi
call	sub_819890
add	esp, 8

loc_8261B2:
push	eax
push	4
push	esi
call	sub_81ADC0
mov	ebp, eax
add	esp, 0Ch
cmp	ebp, ebx
jge	short loc_8261D4
push	offset unk_14674DF
push	esi
call	sub_81C070
add	esp, 8
jmp	short loc_82623E

loc_8261D4:
lea	ecx, [esp+228h+var_210]
push	ecx
push	esi
call	sub_819CF0
add	esp, 8
cmp	ebx, ebp
jg	short loc_826231
push	edi

loc_8261E7:
mov	edi, [esi+1Ch]
mov	edx, [esi+20h]
push	edi
push	ebx
push	edx
push	esi
call	sub_819A80
lea	eax, [esp+23Ch+var_210]
add	edi, 8
push	eax
mov	[esi+1Ch], edi
call	sub_819C20
add	esp, 14h
cmp	[esp+22Ch+var_218], 0
jz	short loc_82622B
cmp	ebx, ebp
jge	short loc_82622B
mov	ecx, [esp+22Ch+var_21C]
mov	edx, [esp+22Ch+var_214]
push	ecx
push	edx
lea	eax, [esp+234h+var_210]
push	eax
call	sub_819B40
add	esp, 0Ch

loc_82622B:
inc	ebx
cmp	ebx, ebp
jle	short loc_8261E7
pop	edi

loc_826231:
lea	ecx, [esp+228h+var_210]
push	ecx
call	sub_819D10
add	esp, 4

loc_82623E:
mov	ecx, [esp+228h+var_4]
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 21Ch
retn
sub_826130 endp

align 10h



sub_826260 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebx, [esi+1Ch]
sub	ebx, [esi+20h]
push	edi
push	5
push	1
push	esi
sar	ebx, 3
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	eax, [esi+1Ch]
jb	short loc_82628A
xor	edi, edi
jmp	short loc_826296

loc_82628A:
push	eax
push	esi
call	sub_819890
add	esp, 8
mov	edi, eax

loc_826296:
cmp	ebx, 2
jnz	short loc_8262A0
lea	ebp, [edi+1]
jmp	short loc_8262D0

loc_8262A0:
jle	loc_826327
push	2
push	esi
call	sub_81AB60
mov	ecx, [esi+20h]
mov	ebp, eax
mov	eax, [esi+1Ch]
add	ecx, 18h
add	esp, 8
cmp	eax, ecx
jnb	short loc_8262CD

loc_8262C0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_8262C0

loc_8262CD:
mov	[esi+1Ch], ecx

loc_8262D0:
cmp	edi, ebp
jl	short loc_826307

loc_8262D4:
mov	ebx, [esi+1Ch]
mov	eax, [esi+20h]
push	ebx
push	edi
push	eax
push	esi
call	sub_819A80
mov	edx, [esi+20h]
lea	eax, [ebx+8]
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
push	eax
lea	ecx, [edi+1]
push	ecx
push	edx
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
dec	edi
add	esp, 20h
cmp	edi, ebp
jge	short loc_8262D4

loc_826307:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
sub	eax, 8
push	eax
push	ebp
push	ecx
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
add	esp, 10h
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_826327:		; "inserted value must be specified"
push	offset aInsertedValueM
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_826260 endp

align 10h



sub_826340 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	esi
call	sub_81AB60
push	2
push	esi
mov	edi, eax
call	sub_81AB60
push	eax
push	edi
push	esi
call	sub_81BD50
add	esp, 1Ch
pop	edi
mov	eax, 1
pop	esi
retn
sub_826340 endp

align 10h



sub_826370 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	eax, [esi+1Ch]
jb	short loc_826394
mov	[esp+4+arg_0], 0
jmp	short loc_8263A2

loc_826394:
push	eax
push	esi
call	sub_819890
add	esp, 8
mov	[esp+4+arg_0], eax

loc_8263A2:
mov	eax, [esi+1Ch]
fild	[esp+4+arg_0]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_826370 endp

align 10h



sub_8263C0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	eax, [esi+1Ch]
jb	short loc_8263E4
xor	ebx, ebx
mov	[esp+0Ch+arg_0], ebx
jmp	short loc_8263F4

loc_8263E4:
push	eax
push	esi
call	sub_819890
add	esp, 8
mov	[esp+0Ch+arg_0], eax
mov	ebx, eax

loc_8263F4:
push	ebx
push	2
push	esi
call	sub_81ADC0
mov	edi, eax
add	esp, 0Ch
cmp	edi, 1
jl	loc_826499
cmp	edi, ebx
jg	loc_826499
mov	eax, [esi+20h]
push	ebp
mov	ebp, [esi+1Ch]
push	ebp
push	edi
push	eax
push	esi
call	sub_819A80
add	ebp, 8
add	esp, 10h
cmp	edi, ebx
mov	[esi+1Ch], ebp
jge	short loc_82646A

loc_826430:
mov	ebx, [esi+1Ch]
mov	ecx, [esi+20h]
push	ebx
lea	ebp, [edi+1]
push	ebp
push	ecx
push	esi
call	sub_819A80
mov	edx, [esi+20h]
lea	eax, [ebx+8]
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
push	eax
push	edi
push	edx
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	edi, ebp
add	esp, 20h
cmp	edi, [esp+10h+arg_0]
jl	short loc_826430
mov	ebx, [esp+10h+arg_0]

loc_82646A:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
push	eax
mov	eax, [esi+20h]
push	ebx
push	eax
push	esi
call	sub_8197D0
add	esp, 10h
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	ebp
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_826499:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn
sub_8263C0 endp

align 10h



sub_8264A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
fldz
push	esi
mov	esi, [esp+8+arg_0]
fstp	[esp+8+var_4]
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 8
add	esp, 0Ch
cmp	ecx, eax
jnb	short loc_8264DD
jmp	short loc_8264D0
align 10h

loc_8264D0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_8264D0

loc_8264DD:
mov	dword ptr [eax], 0
add	eax, 8
push	ebx
mov	[esi+1Ch], eax
push	edi
jmp	short loc_8264F2
align 10h

loc_8264F0:
fstp	st

loc_8264F2:
mov	edi, [esi+1Ch]
mov	eax, [esi+20h]
push	edi
lea	ebx, [edi-8]
push	ebx
push	eax
push	esi
call	sub_819850
add	edi, 8
add	esp, 10h
mov	[esi+1Ch], edi
cmp	dword ptr [ebx], 0
jz	short loc_826561
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	eax, [esi+1Ch]
mov	edx, [esi+20h]
add	eax, 0FFFFFFF8h
cmp	eax, edx
jb	short loc_8264F2
mov	ecx, [eax]
cmp	ecx, 9
jz	short loc_8264F2
cmp	ecx, 0Ah
jz	short loc_8264F2
cmp	ecx, 3
jnz	short loc_8264F2
cmp	eax, edx
jnb	short loc_82653C
fldz
jmp	short loc_826546

loc_82653C:
push	eax
push	esi
call	sub_818F90
add	esp, 8

loc_826546:
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
fld	[esp+10h+var_4]
fcomp	st(1)
fnstsw	ax
test	ah, 5
jp	short loc_8264F0
fstp	[esp+10h+var_4]
jmp	short loc_8264F2

loc_826561:
add	dword ptr [esi+1Ch], 0FFFFFFF0h
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
pop	edi
pop	ebx
cmp	eax, ecx
jnb	short loc_82657E

loc_826571:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_826571

loc_82657E:
fld	[esp+8+var_4]
mov	dword ptr [ecx], 3
fstp	dword ptr [ecx+4]
add	ecx, 8
mov	[esi+1Ch], ecx
mov	eax, 1
pop	esi
pop	ecx
retn
sub_8264A0 endp

align 10h



sub_8265A0 proc	near

arg_0= dword ptr  4

mov	eax, [esi+1Ch]
mov	edx, [esi+20h]
sub	eax, 8
push	eax
push	ecx
push	edx
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	eax, [esi+1Ch]
mov	ecx, [esp+10h+arg_0]
mov	edx, [esi+20h]
sub	eax, 8
push	eax
push	ecx
push	edx
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
add	esp, 20h
retn
sub_8265A0 endp

align 10h



sub_8265E0 proc	near

arg_0= dword ptr  4

cmp	[esp+arg_0], 0
jz	short loc_8265F3
push	ebx
push	eax
push	esi
call	sub_8260B0
add	esp, 0Ch
retn

loc_8265F3:
push	edi
mov	edi, [esi+1Ch]
push	eax
push	esi
call	sub_432A50
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
mov	[edi+4], edx
add	edi, 8
add	esp, 8
mov	[esi+1Ch], edi
lea	eax, [ebx-1]
test	ebx, ebx
jl	short loc_82661A
mov	eax, ebx

loc_82661A:
push	eax
push	esi
call	sub_432A50
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
mov	[edi+4], edx
mov	ecx, [esi+20h]
lea	eax, [edi+8]
mov	[esi+1Ch], eax
mov	edx, [ecx+8]
mov	[eax], edx
mov	ecx, [ecx+0Ch]
mov	[eax+4], ecx
add	eax, 8
mov	[esi+1Ch], eax
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	edi, [eax-10h]
mov	[eax-8], edi
mov	edi, [eax-0Ch]
mov	[eax-4], edi
mov	edi, [eax-18h]
mov	[eax-10h], edi
mov	edi, [eax-14h]
push	1
mov	[eax-0Ch], edi
push	2
mov	[eax-18h], ecx
mov	[eax-14h], edx
push	esi
mov	[esi+1Ch], eax
call	sub_81C6E0
mov	eax, [esi+1Ch]
add	esp, 14h
sub	eax, 8
pop	edi
cmp	eax, [esi+20h]
jb	short loc_8266A0
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_8266A0
cmp	ecx, 1
jnz	short loc_826696
cmp	dword ptr [eax+4], 0
jz	short loc_8266A0

loc_826696:
mov	eax, 1
add	dword ptr [esi+1Ch], 0FFFFFFF8h
retn

loc_8266A0:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
xor	eax, eax
retn
sub_8265E0 endp

align 10h



sub_8266B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ecx
push	ebp
mov	ebp, [esp+8+arg_8]
push	edi
mov	edi, [esp+0Ch+arg_4]
cmp	edi, ebp
jge	loc_826969
push	ebx
push	esi
mov	esi, [esp+14h+arg_0]
jmp	short loc_8266D8
jmp	short loc_8266D0
align 10h

loc_8266D0:
mov	ebp, [esp+14h+arg_8]
mov	edi, [esp+14h+arg_4]

loc_8266D8:
mov	ebx, [esi+1Ch]
mov	eax, [esi+20h]
push	ebx
push	edi
push	eax
push	esi
call	sub_819A80
mov	ecx, [esi+20h]
add	ebx, 8
push	ebx
push	ebp
push	ecx
push	esi
mov	[esi+1Ch], ebx
call	sub_819A80
mov	edx, [esp+34h+arg_C]
add	ebx, 8
mov	[esi+1Ch], ebx
push	edx
mov	ebx, 0FFFFFFFEh
or	eax, 0FFFFFFFFh
call	sub_8265E0
add	esp, 24h
test	eax, eax
jz	short loc_82674C
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
sub	eax, 8
push	eax
push	edi
push	ecx
push	esi
call	sub_8197D0
mov	ebx, 0FFFFFFF8h
add	[esi+1Ch], ebx
mov	edx, [esi+1Ch]
mov	eax, [esi+20h]
sub	edx, 8
push	edx
push	ebp
push	eax
push	esi
call	sub_8197D0
add	esp, 20h
add	[esi+1Ch], ebx
jmp	short loc_826750

loc_82674C:
add	dword ptr [esi+1Ch], 0FFFFFFF0h

loc_826750:
mov	eax, ebp
sub	eax, edi
mov	[esp+14h+var_4], eax
cmp	eax, 1
jz	loc_826967
mov	ebx, [esi+1Ch]
mov	ecx, [esp+14h+arg_4]
lea	eax, [edi+ebp]
cdq
push	ebx
sub	eax, edx
mov	edx, [esi+20h]
push	ecx
push	edx
mov	edi, eax
push	esi
sar	edi, 1
call	sub_819A80
mov	eax, [esi+20h]
add	ebx, 8
push	ebx
push	edi
push	eax
push	esi
mov	[esi+1Ch], ebx
call	sub_819A80
mov	ecx, [esp+34h+arg_C]
add	ebx, 8
mov	[esi+1Ch], ebx
or	ebx, 0FFFFFFFFh
push	ecx
lea	eax, [ebx-1]
call	sub_8265E0
add	esp, 24h
test	eax, eax
jz	short loc_8267F9
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
mov	ecx, [eax-4]
mov	[eax-10h], edx
mov	edx, [eax]
mov	[eax-0Ch], ecx
mov	ecx, [eax+4]
push	ebp
mov	[eax-8], edx
mov	[eax-4], ecx
add	eax, 0FFFFFFF8h
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_432CC0
mov	edx, [esp+20h+arg_C]
push	edx
or	ebx, ebx
mov	eax, 0FFFFFFFEh
call	sub_8265E0
add	esp, 10h
test	eax, eax
jz	short loc_8267F4
add	dword ptr [esi+1Ch], 0FFFFFFF0h
jmp	short loc_826806

loc_8267F4:
push	ebp
mov	ecx, edi
jmp	short loc_8267FE

loc_8267F9:
mov	ecx, [esp+14h+arg_4]
push	edi

loc_8267FE:
call	sub_8265A0
add	esp, 4

loc_826806:
cmp	[esp+14h+var_4], 2
jz	loc_826967
push	edi
push	1
push	esi
call	sub_432CC0
mov	edi, [esp+20h+arg_4]
inc	edi
dec	ebp
add	esp, 0Ch
cmp	edi, ebp
jg	loc_826941
jmp	short loc_826830
align 10h

loc_826830:
mov	ebx, [esi+1Ch]
mov	eax, [esi+20h]
push	ebx
push	edi
push	eax
push	esi
call	sub_819A80
mov	ecx, [esp+24h+arg_C]
add	ebx, 8
mov	[esi+1Ch], ebx
push	ecx
mov	ebx, 0FFFFFFFEh
or	eax, 0FFFFFFFFh
call	sub_8265E0
add	esp, 14h
test	eax, eax
jz	short loc_826893
mov	edi, edi

loc_826860:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	ebx, [esi+1Ch]
mov	edx, [esi+20h]
push	ebx
inc	edi
push	edi
push	edx
push	esi
call	sub_819A80
mov	eax, [esp+24h+arg_C]
add	ebx, 8
mov	[esi+1Ch], ebx
push	eax
mov	ebx, 0FFFFFFFEh
or	eax, 0FFFFFFFFh
call	sub_8265E0
add	esp, 14h
test	eax, eax
jnz	short loc_826860

loc_826893:
mov	ebx, [esi+1Ch]
mov	ecx, [esi+20h]
push	ebx
push	ebp
push	ecx
push	esi
call	sub_819A80
mov	edx, [esp+24h+arg_C]
add	ebx, 8
mov	[esi+1Ch], ebx
or	ebx, 0FFFFFFFFh
push	edx
lea	eax, [ebx-2]
call	sub_8265E0
add	esp, 14h
test	eax, eax
jz	short loc_8268F1
nop

loc_8268C0:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	ebx, [esi+1Ch]
mov	eax, [esi+20h]
push	ebx
dec	ebp
push	ebp
push	eax
push	esi
call	sub_819A80
mov	ecx, [esp+24h+arg_C]
add	ebx, 8
mov	[esi+1Ch], ebx
or	ebx, 0FFFFFFFFh
push	ecx
lea	eax, [ebx-2]
call	sub_8265E0
add	esp, 14h
test	eax, eax
jnz	short loc_8268C0

loc_8268F1:
cmp	edi, ebp
jg	short loc_826935
jz	short loc_82692D
mov	edx, [esi+1Ch]
mov	eax, [esi+20h]
sub	edx, 8
push	edx
push	edi
push	eax
push	esi
call	sub_8197D0
mov	ebx, 0FFFFFFF8h
add	[esi+1Ch], ebx
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
sub	ecx, 8
push	ecx
push	ebp
push	edx
push	esi
call	sub_8197D0
add	[esi+1Ch], ebx
add	esp, 20h
inc	edi
dec	ebp
jmp	short loc_826939

loc_82692D:
add	dword ptr [esi+1Ch], 0FFFFFFF0h
inc	edi
dec	ebp
jmp	short loc_826939

loc_826935:
add	dword ptr [esi+1Ch], 0FFFFFFF0h

loc_826939:
cmp	edi, ebp
jle	loc_826830

loc_826941:
mov	eax, [esp+14h+arg_C]
mov	ecx, [esp+14h+arg_4]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
push	eax
push	ebp
push	ecx
push	esi
call	sub_8266B0
add	esp, 10h
cmp	edi, [esp+14h+arg_8]
mov	[esp+14h+arg_4], edi
jl	loc_8266D0

loc_826967:
pop	esi
pop	ebx

loc_826969:
pop	edi
pop	ebp
pop	ecx
retn
sub_8266B0 endp

align 10h



sub_826970 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	eax, [esi+1Ch]
jnb	loc_826A3A
push	eax
push	esi
call	sub_819890
mov	edi, eax
add	esp, 8
cmp	edi, 1
jbe	loc_826A3A
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 10h
cmp	ecx, eax
jnb	short loc_8269BE

loc_8269B1:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_8269B1

loc_8269BE:
mov	ecx, [esi+20h]
add	ecx, 8
mov	[esi+1Ch], eax
cmp	ecx, eax
jnb	short loc_8269D4
cmp	dword ptr [ecx], 0
jz	short loc_826A05
cmp	ecx, eax
jb	short loc_8269D9

loc_8269D4:
or	eax, 0FFFFFFFFh
jmp	short loc_8269EC

loc_8269D9:
mov	ecx, [ecx]
cmp	ecx, 9
jz	short loc_8269E7
mov	eax, ecx
cmp	ecx, 0Ah
jnz	short loc_8269EC

loc_8269E7:
mov	eax, 6

loc_8269EC:
xor	ecx, ecx
cmp	eax, 6
setz	cl
push	offset aFunctionExpe_1 ; "function expected"
push	2
push	ecx
push	esi
call	sub_81AB40
add	esp, 10h

loc_826A05:
mov	eax, [esi+20h]
add	eax, 8
cmp	eax, [esi+1Ch]
jb	short loc_826A24
xor	eax, eax
push	eax
push	edi
push	1
push	esi
call	sub_8266B0
add	esp, 10h
pop	edi
xor	eax, eax
pop	esi
retn

loc_826A24:
xor	edx, edx
cmp	[eax], edx
setz	dl
mov	eax, edx
push	eax
push	edi
push	1
push	esi
call	sub_8266B0
add	esp, 10h

loc_826A3A:
pop	edi
xor	eax, eax
pop	esi
retn
sub_826970 endp

align 10h



sub_826A40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	esi
call	sub_81AB60
push	2
push	esi
mov	edi, eax
call	sub_81AB60
push	eax
push	edi
push	1
push	esi
call	sub_81BD00
add	esp, 20h
pop	edi
mov	eax, 1
pop	esi
retn
sub_826A40 endp

align 10h



sub_826A70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	esi
call	sub_81AB60
push	2
push	esi
mov	edi, eax
call	sub_81AB60
push	eax
push	edi
push	0
push	esi
call	sub_81BD00
add	esp, 20h
pop	edi
mov	eax, 1
pop	esi
retn
sub_826A70 endp

align 10h



; int __cdecl sub_826AA0(char ArgList)
sub_826AA0 proc	near

var_A90= qword ptr -0A90h
var_A75= byte ptr -0A75h
var_A74= dword ptr -0A74h
var_A70= dword ptr -0A70h
var_A6C= dword ptr -0A6Ch
var_A68= dword ptr -0A68h
var_A64= dword ptr -0A64h
var_A60= dword ptr -0A60h
var_A5C= dword ptr -0A5Ch
var_A58= dword ptr -0A58h
var_A54= dword ptr -0A54h
var_A50= byte ptr -0A50h
Format=	byte ptr -844h
DstBuf=	byte ptr -804h
var_4= dword ptr -4
ArgList= byte ptr  4

sub	esp, 0A78h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0A78h+var_4], eax
push	ebx
push	ebp
mov	ebp, dword ptr [esp+0A80h+ArgList]
mov	eax, [ebp+1Ch]
sub	eax, [ebp+20h]
push	esi
sar	eax, 3
push	edi
mov	[esp+0A88h+var_A68], eax
lea	eax, [esp+0A88h+var_A74]
push	eax
push	1
push	ebp
call	sub_81ABE0
mov	esi, eax
mov	eax, [ebp+20h]
add	esp, 0Ch
xor	edi, edi
cmp	dword ptr [eax-8], 0Ah
mov	[esp+0A88h+var_A70], esi
mov	ebx, 2
jnz	short loc_826B08
mov	eax, [eax-4]
mov	ecx, [eax+14h]
add	eax, 14h
cmp	ecx, 7
jnz	short loc_826B0E
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_826B19

loc_826B08:
mov	[esp+0A88h+var_A58], edi
jmp	short loc_826B1D

loc_826B0E:
cmp	ecx, ebx
jnz	short loc_826B17
mov	eax, [eax+4]
jmp	short loc_826B19

loc_826B17:
xor	eax, eax

loc_826B19:
mov	[esp+0A88h+var_A58], eax

loc_826B1D:
lea	ecx, [esp+0A88h+var_A50]
push	ecx
push	ebp
call	sub_819CF0
mov	ecx, [esp+0A90h+var_A74]
add	esp, 8
xor	eax, eax

loc_826B31:
cmp	byte ptr [edi+esi], 25h
jz	short loc_826B42

loc_826B37:
cmp	edi, ecx
jnb	short loc_826B42
inc	edi
cmp	byte ptr [edi+esi], 25h
jnz	short loc_826B37

loc_826B42:
cmp	eax, edi
jge	short loc_826B5F
mov	edx, edi
sub	edx, eax
push	edx
add	eax, esi
push	eax
lea	eax, [esp+0A90h+var_A50]
push	eax
call	sub_819B40
mov	ecx, [esp+0A94h+var_A74]
add	esp, 0Ch

loc_826B5F:
cmp	edi, ecx
jz	loc_826DF0
mov	al, [edi+esi+1]
inc	edi
cmp	al, 25h
jnz	short loc_826B78
mov	eax, edi
inc	edi
jmp	loc_826DE8

loc_826B78:
cmp	al, 71h
jnz	loc_826C49
xor	ecx, ecx
xor	esi, esi
cmp	ebx, [esp+0A88h+var_A68]
push	offset aMoreArgumentsE ; "more arguments expected in string.forma"...
setle	cl
push	ebx
push	ecx
push	ebp
call	sub_81AB40
lea	edx, [esp+0A98h+var_A64]
push	edx
push	ebx
push	ebp
call	sub_81ABE0
mov	[esp+0AA4h+var_A6C], eax
lea	eax, [esp+0AA4h+var_A50]
push	22h
push	eax
call	sub_819B10
add	esp, 24h
cmp	[esp+0A88h+var_A64], esi
jbe	short loc_826C33
lea	ecx, [ecx+0]

loc_826BC0:
mov	ecx, [esp+0A88h+var_A6C]
mov	al, [ecx+esi]
mov	byte ptr [esp+0A88h+var_A5C], al
cmp	al, 0Ah
jz	short loc_826C0B
cmp	al, 22h
jz	short loc_826C0B
cmp	al, 5Ch
jz	short loc_826C0B
lea	edx, [esp+0A88h+var_A50]
test	al, al
jnz	short loc_826BFB
push	offset asc_1467720 ; "\\"
push	edx
call	sub_819BF0
lea	eax, [esp+0A90h+var_A50]
push	offset a000	; "000"
push	eax
call	sub_819BF0
jmp	short loc_826C29

loc_826BFB:
mov	ecx, [esp+0A88h+var_A5C]
push	ecx
push	edx
call	sub_819B10
add	esp, 8
jmp	short loc_826C2C

loc_826C0B:
lea	eax, [esp+0A88h+var_A50]
push	offset asc_146771C ; "\\"
push	eax
call	sub_819BF0
mov	ecx, [esp+0A90h+var_A5C]
push	ecx
lea	edx, [esp+0A94h+var_A50]
push	edx
call	sub_819B10

loc_826C29:
add	esp, 10h

loc_826C2C:
inc	esi
cmp	esi, [esp+0A88h+var_A64]
jb	short loc_826BC0

loc_826C33:
lea	eax, [esp+0A88h+var_A50]
push	22h
push	eax
call	sub_819B10
add	esp, 8
inc	ebx
inc	edi
jmp	loc_826DDE

loc_826C49:
push	0
lea	edx, [esp+0A8Ch+var_A60]
push	edx
lea	eax, [esp+0A90h+var_A54]
push	eax
inc	ecx
push	ecx
mov	ecx, [esp+0A98h+var_A58]
push	edi
push	esi
push	ecx
call	sub_834AA0
add	esp, 1Ch
test	eax, eax
jz	loc_826E2B
mov	ecx, [esp+0A88h+var_A54]
cmp	edi, ecx
jnz	loc_826E2B
mov	eax, [esp+0A88h+var_A60]
mov	esi, eax
sub	esi, ecx
inc	esi
cmp	esi, 3Fh
jb	short loc_826C8D
mov	esi, 3Fh

loc_826C8D:
mov	edx, [esp+0A88h+var_A70]
mov	al, [edx+eax-1]
xor	ecx, ecx
cmp	ebx, [esp+0A88h+var_A68]
push	offset aMoreArgument_0 ; "more arguments expected in string.forma"...
setle	cl
push	ebx
mov	[esp+0A90h+var_A75], al
push	ecx
push	ebp
call	sub_81AB40
mov	edx, [esp+0A98h+var_A70]
push	esi
lea	eax, [edx+edi-1]
push	eax
lea	ecx, [esp+0AA0h+Format]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
movsx	eax, [esp+0AA4h+var_A75]
add	eax, 0FFFFFFBBh
add	esp, 1Ch
mov	[esp+esi+0A88h+Format],	0
cmp	eax, 33h	; switch 52 cases
ja	loc_826E1B	; default
			; jumptable 00826CE9 cases 1,3-18,20-29,35,37-41,43-45,47,49,50
movzx	edx, ds:byte_826E50[eax]
jmp	ds:off_826E40[edx*4] ; switch jump

loc_826CF0:		; jumptable 00826CE9 case 46
push	0
push	ebx
push	ebp
cmp	esi, 2
jnz	short loc_826D2A
call	sub_81ABE0
mov	esi, [ebp+1Ch]
push	ebx
push	ebp
call	sub_432A50
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	[esi+4], edx
lea	eax, [esp+0A9Ch+var_A50]
add	esi, 8
push	eax
mov	[ebp+1Ch], esi
call	sub_819C20
add	esp, 18h
jmp	loc_826DD9

loc_826D2A:
call	sub_81ABE0
push	eax		; ArgList
lea	ecx, [esp+0A98h+Format]
push	ecx		; Format
lea	edx, [esp+0A9Ch+DstBuf]
push	800h		; SizeInBytes
push	edx		; DstBuf
call	sub_822D70
push	eax
lea	eax, [esp+0AA8h+DstBuf]
push	eax
lea	ecx, [esp+0AACh+var_A50]
push	ecx
call	sub_819B40
add	esp, 28h
jmp	short loc_826DD9

loc_826D62:		; jumptable 00826CE9 cases 19,30,31,42,48,51
push	ebx
push	ebp
call	sub_81AB60
lea	edx, [esp+0A90h+var_A50]
push	edx
mov	esi, eax
call	sub_81A0C0
push	esi		; ArgList
lea	ecx, [esp+0A98h+Format]
push	ecx		; Format
push	200h		; SizeInBytes
push	eax		; DstBuf
call	sub_822D70
push	eax
lea	edx, [esp+0AA8h+var_A50]
push	edx
call	sub_819BE0
add	esp, 24h
jmp	short loc_826DD9

loc_826D99:		; jumptable 00826CE9 cases 0,2,32-34,36
push	ebx
push	ebp		; ArgList
call	sub_81AC40
fstp	[esp+0A90h+var_A6C]
lea	eax, [esp+0A90h+var_A50]
push	eax
call	sub_81A0C0
fld	[esp+0A94h+var_A6C]
add	esp, 4
fstp	[esp+0A90h+var_A90]
lea	ecx, [esp+0A90h+Format]
push	ecx		; Format
push	200h		; SizeInBytes
push	eax		; DstBuf
call	sub_822D70
push	eax
lea	edx, [esp+0AA0h+var_A50]
push	edx
call	sub_819BE0
add	esp, 1Ch

loc_826DD9:
mov	edi, [esp+0A88h+var_A60]
inc	ebx

loc_826DDE:
mov	ecx, [esp+0A88h+var_A74]
mov	esi, [esp+0A88h+var_A70]
mov	eax, edi

loc_826DE8:
cmp	edi, ecx
jbe	loc_826B31

loc_826DF0:
lea	ecx, [esp+0A88h+var_A50]
push	ecx
call	sub_819D10
add	esp, 4
mov	eax, 1

loc_826E02:
mov	ecx, [esp+0A88h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 0A78h
retn

loc_826E1B:		; default
push	offset aStringFormatUn ; jumptable 00826CE9 cases 1,3-18,20-29,35,37-41,43-45,47,49,50
push	ebp
call	sub_81A760
add	esp, 8
jmp	short loc_826E02

loc_826E2B:
movsx	eax, byte ptr [edi+esi]
push	eax
push	offset aIllegalCAtTheE ; "Illegal %%%c at the end of the format"
push	ebp
call	sub_81A760
add	esp, 0Ch
jmp	short loc_826E02
sub_826AA0 endp

off_826E40 dd offset loc_826D99, offset	loc_826D62 ; jump table	for switch statement
dd offset loc_826CF0, offset loc_826E1B
byte_826E50 db	    0,	   3,	  0,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     1
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     1,     1
db	0,     0,     0,     3
db	0,     3,     3,     3
db	3,     3,     1,     3
db	3,     3,     2,     3
db	1,     3,     3,     1
align 10h



sub_826E90 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, [esp+1Ch+arg_0]
mov	edx, [esi+20h]
push	edi
mov	edi, [edx-8]
mov	ebx, 0Ah
cmp	edi, ebx
jnz	short loc_826EC0
mov	eax, [edx-4]
mov	ecx, [eax+14h]
add	eax, 14h
cmp	ecx, 7
jnz	short loc_826EC8
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_826ED4

loc_826EC0:
xor	ebp, ebp
mov	[esp+20h+var_8], ebp
jmp	short loc_826EDA

loc_826EC8:
cmp	ecx, 2
jnz	short loc_826ED2
mov	eax, [eax+4]
jmp	short loc_826ED4

loc_826ED2:
xor	eax, eax

loc_826ED4:
mov	[esp+20h+var_8], eax
mov	ebp, eax

loc_826EDA:
cmp	edi, ebx
jnz	short loc_826F3C
mov	eax, [edx-4]
add	eax, 1Ch
push	eax
push	esi
call	sub_818F90
add	esp, 8
call	__ftol2_sse

loc_826EF3:
mov	[esp+20h+var_10], eax
mov	eax, [esi+20h]
cmp	[eax-8], ebx
jnz	short loc_826F40
mov	eax, [eax-4]
lea	ecx, [esp+20h+var_4]
push	ecx
add	eax, 24h
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch
mov	[esp+20h+var_C], eax

loc_826F18:
cmp	dword ptr [ebp+14h], 0
jz	short loc_826F54
mov	eax, [esi+20h]
cmp	[eax-8], ebx
jnz	short loc_826F54
mov	eax, [eax-4]
mov	ecx, [eax+2Ch]
add	eax, 2Ch
cmp	ecx, 7
jnz	short loc_826F4A
mov	ebx, [eax+4]
add	ebx, 10h
jmp	short loc_826F56

loc_826F3C:
xor	eax, eax
jmp	short loc_826EF3

loc_826F40:
mov	[esp+20h+var_C], 0
jmp	short loc_826F18

loc_826F4A:
cmp	ecx, 2
jnz	short loc_826F54
mov	ebx, [eax+4]
jmp	short loc_826F56

loc_826F54:
xor	ebx, ebx

loc_826F56:
mov	ecx, [esp+20h+var_4]
push	ebx
lea	edx, [esp+24h+arg_0]
push	edx
mov	edx, [esp+28h+var_10]
lea	eax, [esp+28h+var_10]
push	eax
mov	eax, [esp+2Ch+var_C]
inc	ecx
push	ecx
push	edx
push	eax
push	ebp
call	sub_834AA0
add	esp, 1Ch
test	eax, eax
jz	loc_82706D
mov	ecx, [esp+20h+var_10]
cmp	ecx, [esp+20h+arg_0]
jnz	short loc_826F90
inc	[esp+20h+arg_0]

loc_826F90:
mov	eax, [esi+1Ch]
fild	[esp+20h+arg_0]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	ecx, [esi+20h]
mov	[esi+1Ch], eax
cmp	dword ptr [ecx-8], 0Ah
jnz	short loc_826FB7
mov	ebp, [ecx-4]
add	ebp, 1Ch
jmp	short loc_826FB9

loc_826FB7:
xor	ebp, ebp

loc_826FB9:
lea	edi, [eax-8]
push	edi
push	esi
call	sub_8199A0
mov	edx, [edi]
mov	[ebp+0], edx
mov	eax, [edi+4]
add	esp, 8
mov	[ebp+4], eax
mov	[esi+1Ch], edi
test	ebx, ebx
jnz	short loc_826FFE
mov	eax, [esp+20h+var_10]
mov	ecx, [esp+20h+arg_0]
mov	edx, [esp+20h+var_C]
sub	ecx, eax
push	ecx
add	edx, eax
push	edx
push	esi
call	sub_81B9D0
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
lea	eax, [ebx+1]
pop	ebx
add	esp, 10h
retn

loc_826FFE:
mov	ebp, [esp+20h+var_8]
mov	eax, [ebp+14h]
push	0
push	eax
push	esi
call	sub_81AA90
xor	edi, edi
add	esp, 0Ch
cmp	[ebp+14h], edi
jle	short loc_827062
jmp	short loc_827020
align 10h

loc_827020:
mov	eax, [ebx+edi*8+4]
mov	ecx, [ebx+edi*8]
cmp	eax, 0FFFFFFFFh
jnz	short loc_827049
mov	eax, [esi+1Ch]
inc	ecx
mov	[esp+20h+var_8], ecx
fild	[esp+20h+var_8]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
jmp	short loc_82705C

loc_827049:
mov	edx, [esp+20h+var_C]
sub	eax, ecx
push	eax
add	ecx, edx
push	ecx
push	esi
call	sub_81B9D0
add	esp, 0Ch

loc_82705C:
inc	edi
cmp	edi, [ebp+14h]
jl	short loc_827020

loc_827062:
mov	eax, [ebp+14h]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn

loc_82706D:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
add	esp, 10h
retn
sub_826E90 endp

align 10h



sub_827090 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 10h
push	edi
cmp	ecx, eax
jnb	short loc_8270B0

loc_8270A3:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_8270A3

loc_8270B0:
push	0
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_81ABE0
lea	eax, [esp+14h+arg_0]
push	eax
push	2
push	esi
call	sub_81ABE0
mov	ecx, [esp+20h+arg_0]
push	0
inc	ecx
push	ecx
push	eax
push	esi
call	sub_8340D0
fldz
mov	edi, eax
mov	eax, [esi+1Ch]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
mov	ecx, [esi+20h]
add	eax, 8
mov	[esi+1Ch], eax
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
add	eax, 8
mov	[esi+1Ch], eax
mov	eax, [edi+14h]
add	esp, 28h
test	eax, eax
jz	short loc_82711D
lea	edx, ds:0[eax*8]
push	edx
push	esi
call	sub_81BDF0
add	esp, 8

loc_82711D:
xor	eax, eax
cmp	[edi+14h], eax
push	1
setnz	al
add	eax, 3
push	eax
push	offset sub_826E90
push	esi
call	sub_81B920
add	esp, 10h
pop	edi
mov	eax, 1
pop	esi
retn
sub_827090 endp

align 10h



sub_827150 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+24h+arg_0]
lea	eax, [esp+24h+arg_0]
push	eax
push	1
push	edi
call	sub_81ABE0
lea	ecx, [esp+30h+var_C]
push	ecx
push	2
push	edi
mov	[esp+3Ch+var_10], eax
call	sub_81ABE0
push	1
push	3
push	edi
mov	ebx, eax
call	sub_81ADC0
mov	esi, eax
add	esp, 24h
test	esi, esi
jge	short loc_827198
mov	edx, [esp+24h+arg_0]
lea	esi, [esi+edx+1]
jmp	short loc_82719F

loc_827198:
jnz	short loc_82719F
mov	esi, 1

loc_82719F:
mov	eax, [edi+20h]
mov	ecx, [edi+1Ch]
add	eax, 18h
cmp	eax, ecx
jnb	short loc_8271D1
cmp	dword ptr [eax], 1
jnz	short loc_8271D1
cmp	eax, ecx
jb	short loc_8271B9

loc_8271B5:
xor	eax, eax
jmp	short loc_8271DE

loc_8271B9:
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_8271B5
cmp	ecx, 1
jnz	short loc_8271CA
cmp	dword ptr [eax+4], 0
jz	short loc_8271B5

loc_8271CA:
mov	eax, 1
jmp	short loc_8271DE

loc_8271D1:
push	0
push	4
push	edi
call	sub_81ADC0
add	esp, 0Ch

loc_8271DE:
push	eax
mov	eax, [esp+28h+var_C]
inc	eax
push	eax
push	ebx
push	edi
call	sub_8340D0
mov	ebp, eax
add	esp, 10h
test	ebp, ebp
jz	loc_8272BB
test	esi, esi
jl	loc_8272BB
mov	eax, [ebp+14h]
test	eax, eax
jz	short loc_82721D
lea	ecx, ds:0[eax*8]
push	ecx
push	edi
call	sub_81BDF0
add	esp, 8
mov	ebx, eax
jmp	short loc_82721F

loc_82721D:
xor	ebx, ebx

loc_82721F:
mov	ecx, [esp+24h+arg_0]
push	ebx
lea	edx, [esp+28h+var_4]
push	edx
mov	edx, [esp+2Ch+var_10]
lea	eax, [esp+2Ch+var_14]
push	eax
inc	ecx
push	ecx
mov	[esp+34h+var_14], esi
dec	esi
push	esi
push	edx
push	ebp
call	sub_834AA0
add	esp, 1Ch
test	eax, eax
jz	short loc_8272BB
mov	ecx, [esp+24h+var_14]
mov	eax, [edi+1Ch]
inc	ecx
mov	[esp+24h+var_8], ecx
fild	[esp+24h+var_8]
mov	dword ptr [eax], 3
add	eax, 10h
fstp	dword ptr [eax-0Ch]
fild	[esp+24h+var_4]
mov	dword ptr [eax-8], 3
fstp	dword ptr [eax-4]
mov	[edi+1Ch], eax
test	ebx, ebx
jz	short loc_8272AE
xor	esi, esi
cmp	[ebp+14h], esi
jle	short loc_8272A0

loc_827280:
mov	eax, [ebx+esi*8]
mov	edx, [ebx+esi*8+4]
mov	ecx, [esp+24h+var_10]
sub	edx, eax
push	edx
add	eax, ecx
push	eax
push	edi
call	sub_81B9D0
inc	esi
add	esp, 0Ch
cmp	esi, [ebp+14h]
jl	short loc_827280

loc_8272A0:
mov	eax, [ebp+14h]
pop	edi
pop	esi
pop	ebp
add	eax, 2
pop	ebx
add	esp, 14h
retn

loc_8272AE:
pop	edi
pop	esi
pop	ebp
mov	eax, 2
pop	ebx
add	esp, 14h
retn

loc_8272BB:
mov	eax, [edi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[edi+1Ch], eax
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
add	esp, 14h
retn
sub_827150 endp

align 10h



sub_8272E0 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 18h
push	ebp
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
lea	eax, [esp+24h+var_C]
push	eax
push	1
push	esi
call	sub_81ABE0
lea	ecx, [esp+30h+var_10]
push	ecx
push	2
push	esi
mov	[esp+3Ch+var_14], eax
call	sub_81ABE0
push	1
push	3
push	esi
mov	edi, eax
call	sub_81ADC0
mov	edx, [esp+48h+var_10]
push	0
inc	edx
push	edx
push	edi
push	esi
mov	[esp+58h+var_18], eax
call	sub_8340D0
mov	ebp, eax
add	esp, 34h
test	ebp, ebp
jnz	short loc_827345
push	offset aPatternParsing ; "pattern parsing error"
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_827345:
mov	eax, [ebp+14h]
push	ebx
test	eax, eax
jz	short loc_827361
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	esi
call	sub_81BDF0
add	esp, 8
mov	ebx, eax
jmp	short loc_827363

loc_827361:
xor	ebx, ebx

loc_827363:
mov	eax, [esp+28h+var_C]
mov	edi, [esp+28h+var_14]
push	ebx
lea	ecx, [esp+2Ch+var_4]
push	ecx
mov	ecx, [esp+30h+var_18]
lea	edx, [esp+30h+var_18]
push	edx
inc	eax
push	eax
dec	ecx
push	ecx
push	edi
push	ebp
call	sub_834AA0
add	esp, 1Ch
test	eax, eax
jz	loc_827411
test	ebx, ebx
jz	short loc_8273ED
xor	edi, edi
cmp	[ebp+14h], edi
jle	short loc_8273E2
jmp	short loc_8273A0
align 10h

loc_8273A0:
mov	eax, [ebx+edi*8+4]
mov	ecx, [ebx+edi*8]
cmp	eax, 0FFFFFFFFh
jz	short loc_8273C1
mov	edx, [esp+28h+var_14]
sub	eax, ecx
push	eax
add	ecx, edx
push	ecx
push	esi
call	sub_81B9D0
add	esp, 0Ch
jmp	short loc_8273DC

loc_8273C1:
mov	eax, [esi+1Ch]
inc	ecx
mov	[esp+28h+var_8], ecx
fild	[esp+28h+var_8]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax

loc_8273DC:
inc	edi
cmp	edi, [ebp+14h]
jl	short loc_8273A0

loc_8273E2:
mov	eax, [ebp+14h]
pop	ebx
pop	edi
pop	esi
pop	ebp
add	esp, 18h
retn

loc_8273ED:
mov	eax, [esp+28h+var_18]
mov	edx, [esp+28h+var_4]
sub	edx, eax
push	edx
add	eax, edi
push	eax
push	esi
call	sub_81B9D0
add	esp, 0Ch
pop	ebx
pop	edi
pop	esi
mov	eax, 1
pop	ebp
add	esp, 18h
retn

loc_827411:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
pop	ebx
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
mov	eax, 1
pop	ebp
add	esp, 18h
retn
sub_8272E0 endp

align 10h



sub_827430 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [ebx+20h]
sub	esp, 0Ch
push	ebp
mov	ebp, [esp+10h+arg_4]
push	esi
add	eax, 10h
xor	esi, esi
cmp	eax, [ebx+1Ch]
jb	short loc_82744E
xor	edx, edx
mov	[esp+14h+var_C], edx
jmp	short loc_827463

loc_82744E:
lea	ecx, [esp+14h+var_8]
push	ecx
push	eax
push	ebx
call	sub_818EC0
add	esp, 0Ch
mov	[esp+14h+var_C], eax
mov	edx, eax

loc_827463:
mov	ecx, [esp+14h+var_8]
test	ecx, ecx
ja	short loc_82747A
pop	esi
mov	eax, 1
pop	ebp
add	esp, 0Ch
retn

loc_827476:
mov	edx, [esp+14h+var_C]

loc_82747A:
mov	al, [edx+esi]
cmp	al, 25h
jnz	loc_827538
inc	esi
cmp	esi, ecx
jnb	loc_82755A
movsx	edx, byte ptr [edx+esi]
push	edx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	loc_82752A
mov	eax, [esp+14h+var_C]
movsx	eax, byte ptr [eax+esi]
sub	eax, 30h
jz	short loc_82750D
test	ebp, ebp
jz	short loc_82750D
mov	ecx, [esp+14h+arg_10]
cmp	eax, [ecx+14h]
jg	loc_82755A
mov	ecx, [ebp+eax*8-4]
cmp	ecx, 0FFFFFFFFh
jnz	short loc_8274F4
mov	edx, [ebp+eax*8-8]
mov	ecx, [ebx+1Ch]
inc	edx
mov	[esp+14h+var_4], edx
fild	[esp+14h+var_4]
mov	dword ptr [ecx], 3
add	ecx, 8
push	edi
fstp	dword ptr [ecx-4]
mov	[ebx+1Ch], ecx
call	sub_819C20
add	esp, 4
jmp	short loc_827542

loc_8274F4:
mov	eax, [ebp+eax*8-8]
sub	ecx, eax
push	ecx
mov	ecx, [esp+18h+arg_0]
add	eax, ecx
push	eax
push	edi
call	sub_819B40
add	esp, 0Ch
jmp	short loc_827542

loc_82750D:
mov	eax, [esp+14h+arg_8]
mov	edx, [esp+14h+arg_C]
mov	ecx, [esp+14h+arg_0]
sub	edx, eax
push	edx
add	ecx, eax
push	ecx
push	edi
call	sub_819B40
add	esp, 0Ch
jmp	short loc_827542

loc_82752A:
cmp	esi, [esp+14h+var_8]
jnb	short loc_82755A
mov	edx, [esp+14h+var_C]
movzx	eax, byte ptr [edx+esi]

loc_827538:
push	eax
push	edi
call	sub_819B10
add	esp, 8

loc_827542:
mov	ecx, [esp+14h+var_8]
inc	esi
cmp	esi, ecx
jb	loc_827476
pop	esi
mov	eax, 1
pop	ebp
add	esp, 0Ch
retn

loc_82755A:
pop	esi
xor	eax, eax
pop	ebp
add	esp, 0Ch
retn
sub_827430 endp

align 10h



sub_827570 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 8
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	edi
mov	edi, eax
test	ecx, ecx
jnz	short loc_827586
sub	eax, ebx
lea	ecx, [ebx+ebp]
jmp	short loc_8275B3

loc_827586:
mov	eax, [ecx+4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_8275AD
mov	edx, [ecx]
mov	eax, [esi+1Ch]
inc	edx
mov	[esp+10h+var_8], edx
fild	[esp+10h+var_8]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
jmp	short loc_8275BE

loc_8275AD:
mov	ecx, [ecx]
sub	eax, ecx
add	ecx, ebp

loc_8275B3:
push	eax
push	ecx
push	esi
call	sub_81B9D0
add	esp, 0Ch

loc_8275BE:
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
lea	eax, [esp+10h+var_8]
push	eax
sub	ecx, 8
push	ecx
add	edx, 10h
push	edx
push	esi
call	sub_8192F0
mov	eax, [esi+1Ch]
mov	ecx, [esp+20h+var_8]
mov	[eax-8], ecx
mov	edx, [esp+20h+var_4]
mov	[eax-4], edx
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 10h
cmp	eax, [esi+20h]
jb	short loc_827615
mov	eax, [eax]
cmp	eax, 4
jz	short loc_827602
cmp	eax, 3
jnz	short loc_827615

loc_827602:
mov	eax, [esp+10h+arg_4]
push	eax
call	sub_819C20
add	esp, 4
pop	edi
pop	ebp
add	esp, 8
retn

loc_827615:
mov	ecx, [esp+10h+arg_4]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
sub	edi, ebx
push	edi
add	ebp, ebx
push	ebp
push	ecx
call	sub_819B40
add	esp, 0Ch
pop	edi
pop	ebp
add	esp, 8
retn
sub_827570 endp

align 10h



sub_827640 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
mov	ecx, [esi+20h]
mov	edx, [ecx+10h]
push	ebx
mov	ebx, eax
mov	eax, [esi+1Ch]
mov	[eax], edx
mov	ecx, [ecx+14h]
mov	[eax+4], ecx
push	ebp
mov	ebp, [esp+0Ch+arg_0]
add	eax, 8
push	edi
mov	[esi+1Ch], eax
test	ebx, ebx
jnz	short loc_827686
mov	ebx, [esp+10h+arg_C]
mov	edi, [esp+10h+arg_8]
mov	edx, ebx
sub	edx, edi
push	edx
lea	eax, [edi+ebp]
push	eax
push	esi
call	sub_81B9D0
add	esp, 0Ch
mov	eax, 1
jmp	short loc_8276E1

loc_827686:
mov	ecx, [esp+10h+arg_10]
xor	edi, edi
cmp	[ecx+14h], edi
jle	short loc_8276D6

loc_827691:
mov	eax, [ebx+edi*8+4]
cmp	eax, 0FFFFFFFFh
jnz	short loc_8276BA
mov	edx, [ebx+edi*8]
mov	eax, [esi+1Ch]
inc	edx
mov	[esp+10h+var_4], edx
fild	[esp+10h+var_4]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
jmp	short loc_8276D0

loc_8276BA:
mov	ecx, [ebx+edi*8]
sub	eax, ecx
push	eax
add	ecx, ebp
push	ecx
push	esi
call	sub_81B9D0
mov	ecx, [esp+1Ch+arg_10]
add	esp, 0Ch

loc_8276D0:
inc	edi
cmp	edi, [ecx+14h]
jl	short loc_827691

loc_8276D6:
mov	eax, [ecx+14h]
mov	edi, [esp+10h+arg_8]
mov	ebx, [esp+10h+arg_C]

loc_8276E1:
push	1
push	eax
push	esi
call	sub_81C6E0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 0Ch
cmp	eax, [esi+20h]
jb	short loc_82771B
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_82771B
cmp	ecx, 1
jnz	short loc_827709
cmp	dword ptr [eax+4], 0
jz	short loc_82771B

loc_827709:
mov	eax, [esp+10h+arg_4]
push	eax
call	sub_819C20
add	esp, 4
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn

loc_82771B:
mov	ecx, [esp+10h+arg_4]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
sub	ebx, edi
push	ebx
add	ebp, edi
push	ebp
push	ecx
call	sub_819B40
add	esp, 0Ch
pop	edi
pop	ebp
pop	ebx
pop	ecx
retn
sub_827640 endp

align 10h



sub_827740 proc	near

var_234= dword ptr -234h
var_230= dword ptr -230h
var_22C= dword ptr -22Ch
var_228= dword ptr -228h
var_224= dword ptr -224h
var_220= dword ptr -220h
var_21C= dword ptr -21Ch
var_218= dword ptr -218h
var_214= dword ptr -214h
var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+234h+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+240h+arg_0]
push	edi
lea	eax, [esp+244h+var_220]
push	eax
push	1
push	esi
call	sub_81ABE0
lea	ecx, [esp+250h+var_214]
push	ecx
push	2
push	esi
mov	[esp+25Ch+var_234], eax
call	sub_81ABE0
mov	ebp, eax
mov	eax, [esi+20h]
add	eax, 10h
add	esp, 18h
cmp	eax, [esi+1Ch]
jb	short loc_827796
or	edi, 0FFFFFFFFh
mov	[esp+244h+var_224], edi
jmp	short loc_8277AD

loc_827796:
mov	eax, [eax]
cmp	eax, 9
jz	short loc_8277A2
cmp	eax, 0Ah
jnz	short loc_8277A7

loc_8277A2:
mov	eax, 6

loc_8277A7:
mov	[esp+244h+var_224], eax
mov	edi, eax

loc_8277AD:
push	7FFFFFFFh
push	4
push	esi
call	sub_81ADC0
add	esp, 0Ch
mov	[esp+244h+var_21C], eax
mov	[esp+244h+var_228], eax
cmp	edi, 5
jz	short loc_8277DD
cmp	edi, 3
jz	short loc_8277DD
cmp	edi, 4
jz	short loc_8277DD
cmp	edi, 6
jz	short loc_8277DD
xor	eax, eax
jmp	short loc_8277E2

loc_8277DD:
mov	eax, 1

loc_8277E2:		; "table, string, or function expected"
push	offset aTableStringOrF
push	3
push	eax
push	esi
call	sub_81AB40
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
add	ecx, 18h
add	esp, 10h
cmp	eax, ecx
jnb	short loc_82780D

loc_827800:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_827800

loc_82780D:
mov	edx, [esp+244h+var_214]
xor	edi, edi
push	edi
inc	edx
push	edx
push	ebp
push	esi
mov	[esi+1Ch], ecx
call	sub_8340D0
mov	ebx, eax
add	esp, 10h
mov	[esp+244h+var_218], ebx
cmp	ebx, edi
jnz	short loc_827841
push	ebp
push	offset aPatternParsi_0 ; "Pattern parsing error: %s"
push	esi
call	sub_81A760
add	esp, 0Ch
jmp	loc_8279EB

loc_827841:
mov	eax, [ebx+14h]
cmp	eax, edi
jz	short loc_82785C
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	esi
call	sub_81BDF0
add	esp, 8
mov	ebp, eax
jmp	short loc_82785E

loc_82785C:
xor	ebp, ebp

loc_82785E:
lea	ecx, [esp+244h+var_210]
push	ecx
push	esi
call	sub_819CF0
mov	ecx, [esp+24Ch+var_220]
push	ebp
lea	edx, [esp+250h+var_230]
push	edx
mov	edx, [esp+254h+var_234]
lea	eax, [esp+254h+var_22C]
push	eax
inc	ecx
push	ecx
push	0
push	edx
push	ebx
mov	[esp+268h+var_22C], edi
mov	[esp+268h+var_230], edi
call	sub_834AA0
add	esp, 24h
test	eax, eax
jz	loc_82799F
lea	ebx, [ebx+0]

loc_8278A0:
cmp	[esp+244h+var_228], 0
jz	loc_82799F
mov	ebx, [esp+244h+var_22C]
cmp	edi, ebx
jnb	short loc_8278CE
mov	eax, [esp+244h+var_234]
sub	ebx, edi
push	ebx
add	edi, eax
lea	ecx, [esp+248h+var_210]
push	edi
push	ecx
call	sub_819B40
mov	ebx, [esp+250h+var_22C]
add	esp, 0Ch

loc_8278CE:
mov	eax, [esp+244h+var_224]
sub	eax, 3
jz	short loc_82791C
sub	eax, 1
jz	short loc_827937
sub	eax, 1
jz	short loc_827902
mov	edx, [esp+244h+var_218]
mov	eax, [esp+244h+var_230]
push	edx
mov	edx, [esp+248h+var_234]
push	eax
push	ebx
lea	ecx, [esp+250h+var_210]
push	ecx
push	edx
mov	eax, ebp
call	sub_827640
add	esp, 14h
jmp	short loc_82795E

loc_827902:
mov	ecx, [esp+244h+var_234]
lea	eax, [esp+244h+var_210]
push	eax
mov	eax, [esp+248h+var_230]
push	ecx
mov	ecx, ebp
call	sub_827570
add	esp, 8
jmp	short loc_82795E

loc_82791C:
mov	eax, [esi+20h]
add	eax, 10h
cmp	eax, [esi+1Ch]
jnb	short loc_827937
push	0
push	eax
push	esi
call	sub_818EC0
mov	ebx, [esp+250h+var_22C]
add	esp, 0Ch

loc_827937:
mov	edx, [esp+244h+var_218]
mov	eax, [esp+244h+var_230]
mov	ecx, [esp+244h+var_234]
push	edx
push	eax
push	ebx
push	ebp
push	ecx
lea	edi, [esp+258h+var_210]
mov	ebx, esi
call	sub_827430
add	esp, 14h
test	eax, eax
jz	loc_827A04

loc_82795E:
mov	eax, [esp+244h+var_230]
dec	[esp+244h+var_228]
mov	edi, eax
cmp	[esp+244h+var_22C], eax
jnz	short loc_827973
inc	eax
mov	[esp+244h+var_230], eax

loc_827973:
push	ebp
lea	edx, [esp+248h+var_230]
push	edx
mov	edx, [esp+24Ch+var_220]
lea	ecx, [esp+24Ch+var_22C]
push	ecx
mov	ecx, [esp+250h+var_218]
inc	edx
push	edx
push	eax
mov	eax, [esp+258h+var_234]
push	eax
push	ecx
call	sub_834AA0
add	esp, 1Ch
test	eax, eax
jnz	loc_8278A0

loc_82799F:
mov	edx, [esp+244h+var_220]
mov	eax, [esp+244h+var_234]
sub	edx, edi
push	edx
add	edi, eax
lea	ecx, [esp+248h+var_210]
push	edi
push	ecx
call	sub_819B40
lea	edx, [esp+250h+var_210]
push	edx
call	sub_819D10
mov	ecx, [esp+254h+var_21C]
sub	ecx, [esp+254h+var_228]
mov	eax, [esi+1Ch]
mov	[esp+254h+var_21C], ecx
fild	[esp+254h+var_21C]
mov	dword ptr [eax], 3
add	esp, 10h
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 2

loc_8279EB:
mov	ecx, [esp+244h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn

loc_827A04:		; "invalid Capture index"
push	offset aInvalidCapture
push	esi
call	sub_81A760
add	esp, 8
jmp	short loc_8279EB
sub_827740 endp

align 10h



sub_827A20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+18h+arg_0]
push	edi
lea	eax, [esp+1Ch+var_8]
push	eax
push	1
push	esi
call	sub_81ABE0
push	1
push	2
push	esi
mov	edi, eax
call	sub_81ADC0
mov	ebx, eax
push	ebx
push	3
push	esi
call	sub_81ADC0
mov	ebp, eax
mov	eax, [esp+40h+var_8]
add	esp, 24h
inc	eax
test	ebx, ebx
jge	short loc_827A5F
add	ebx, eax

loc_827A5F:
test	ebp, ebp
jge	short loc_827A65
add	ebp, eax

loc_827A65:
cmp	ebx, 1
jge	short loc_827A6F
mov	ebx, 1

loc_827A6F:
cmp	ebp, eax
jl	short loc_827A76
lea	ebp, [eax-1]

loc_827A76:
cmp	ebp, ebx
jl	loc_827B62
mov	ecx, ebp
sub	ecx, ebx
lea	eax, [ecx+1]
push	0
push	eax
push	esi
mov	[esp+28h+var_C], eax
call	sub_81AA90
add	esp, 0Ch
cmp	ebx, ebp
mov	eax, ebx
jg	loc_827B56
cmp	[esp+1Ch+var_C], 4
jl	loc_827B2E
lea	edx, [ebp-3]
lea	ecx, [ecx+0]

loc_827AB0:
movzx	ebx, byte ptr [eax+edi-1]
mov	ecx, [esi+1Ch]
mov	[esp+1Ch+var_4], ebx
add	ecx, 8
add	eax, 4
fild	[esp+1Ch+var_4]
fstp	dword ptr [ecx-4]
mov	dword ptr [ecx-8], 3
mov	[esi+1Ch], ecx
movzx	ebx, byte ptr [eax+edi-4]
mov	[esp+1Ch+var_4], ebx
add	ecx, 8
fild	[esp+1Ch+var_4]
fstp	dword ptr [ecx-4]
mov	dword ptr [ecx-8], 3
mov	[esi+1Ch], ecx
movzx	ebx, byte ptr [eax+edi-3]
mov	[esp+1Ch+var_4], ebx
add	ecx, 8
fild	[esp+1Ch+var_4]
fstp	dword ptr [ecx-4]
mov	dword ptr [ecx-8], 3
mov	[esi+1Ch], ecx
movzx	ebx, byte ptr [eax+edi-2]
mov	[esp+1Ch+var_4], ebx
add	ecx, 8
cmp	eax, edx
fild	[esp+1Ch+var_4]
fstp	dword ptr [ecx-4]
mov	dword ptr [ecx-8], 3
mov	[esi+1Ch], ecx
jle	short loc_827AB0

loc_827B2E:
cmp	eax, ebp
jg	short loc_827B56

loc_827B32:
movzx	edx, byte ptr [edi+eax-1]
mov	ecx, [esi+1Ch]
mov	[esp+1Ch+var_4], edx
mov	dword ptr [ecx], 3
add	ecx, 8
fild	[esp+1Ch+var_4]
inc	eax
cmp	eax, ebp
fstp	dword ptr [ecx-4]
mov	[esi+1Ch], ecx
jle	short loc_827B32

loc_827B56:
mov	eax, [esp+1Ch+var_C]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn

loc_827B62:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 0Ch
retn
sub_827A20 endp

align 10h



sub_827B70 proc	near

var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 210h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+210h+var_4], eax
push	ebx
mov	ebx, [esp+214h+arg_0]
push	esi
push	edi
mov	edi, [ebx+1Ch]
sub	edi, [ebx+20h]
lea	eax, [esp+21Ch+var_210]
push	eax
push	ebx
sar	edi, 3
call	sub_819CF0
mov	esi, 1
add	esp, 8
cmp	edi, esi
jl	short loc_827BCA
mov	edi, edi

loc_827BB0:
push	esi
push	ebx
call	sub_81AB60
push	eax
lea	ecx, [esp+228h+var_210]
push	ecx
call	sub_819B10
inc	esi
add	esp, 10h
cmp	esi, edi
jle	short loc_827BB0

loc_827BCA:
lea	edx, [esp+21Ch+var_210]
push	edx
call	sub_819D10
mov	ecx, [esp+220h+var_4]
add	esp, 4
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 210h
retn
sub_827B70 endp

align 10h



sub_827C00 proc	near

var_214= dword ptr -214h
var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 214h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+214h+var_4], eax
push	ebx
push	esi
mov	esi, [esp+21Ch+arg_0]
push	edi
lea	eax, [esp+220h+var_214]
push	eax
push	1
push	esi
call	sub_81ABE0
push	2
push	esi
mov	ebx, eax
call	sub_81AB60
lea	ecx, [esp+234h+var_210]
push	ecx
push	esi
mov	edi, eax
call	sub_819CF0
add	esp, 1Ch
test	edi, edi
jle	short loc_827C68
lea	esp, [esp+0]

loc_827C50:
mov	edx, [esp+220h+var_214]
push	edx
lea	eax, [esp+224h+var_210]
push	ebx
push	eax
call	sub_819B40
add	esp, 0Ch
sub	edi, 1
jnz	short loc_827C50

loc_827C68:
lea	ecx, [esp+220h+var_210]
push	ecx
call	sub_819D10
mov	ecx, [esp+224h+var_4]
add	esp, 4
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 214h
retn
sub_827C00 endp

align 10h



sub_827CA0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
lea	eax, [esp+4+arg_0]
push	eax
push	1
push	esi
call	sub_81ABE0
fild	[esp+10h+arg_0]
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 3
fstp	dword ptr [eax+4]
add	eax, 8
add	esp, 0Ch
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_827CA0 endp

align 10h



sub_827CE0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
lea	eax, [esp+0Ch+arg_0]
push	eax
push	1
push	esi
call	sub_81ABE0
push	2
push	esi
mov	ebx, eax
call	sub_81AB60
mov	ecx, [esp+20h+arg_0]
push	ecx
push	3
push	esi
mov	edi, eax
call	sub_81ADC0
mov	ecx, [esi+20h]
mov	edx, [esi+1Ch]
add	ecx, 8
add	esp, 20h
cmp	edx, ecx
jnb	short loc_827D2D
lea	ecx, [ecx+0]

loc_827D20:
mov	dword ptr [edx], 0
add	edx, 8
cmp	edx, ecx
jb	short loc_827D20

loc_827D2D:
mov	[esi+1Ch], ecx
mov	ecx, [esp+0Ch+arg_0]
inc	ecx
test	edi, edi
jge	short loc_827D3B
add	edi, ecx

loc_827D3B:
test	eax, eax
jge	short loc_827D41
add	eax, ecx

loc_827D41:
cmp	edi, 1
jge	short loc_827D4B
mov	edi, 1

loc_827D4B:
cmp	eax, ecx
jl	short loc_827D52
lea	eax, [ecx-1]

loc_827D52:
cmp	eax, edi
jl	short loc_827D71
sub	eax, edi
inc	eax
push	eax
lea	edx, [edi+ebx-1]
push	edx
push	esi
call	sub_81B9D0
add	esp, 0Ch
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_827D71:
push	offset unk_14675BF
push	esi
call	sub_81C070
add	esp, 8
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn
sub_827CE0 endp

align 10h



sub_827D90 proc	near

var_214= dword ptr -214h
var_210= byte ptr -210h
var_4= dword ptr -4

sub	esp, 214h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+214h+var_4], eax
push	ebx
push	esi
lea	eax, [esp+21Ch+var_214]
push	eax
mov	esi, ecx
push	1
push	esi
call	sub_81ABE0
lea	ecx, [esp+228h+var_210]
push	ecx
push	esi
mov	ebx, eax
call	sub_819CF0
xor	esi, esi
add	esp, 14h
cmp	[esp+21Ch+var_214], esi
jbe	short loc_827DEC
lea	ecx, [ecx+0]

loc_827DD0:
movsx	edx, byte ptr [esi+ebx]
push	edx
call	edi
push	eax
lea	eax, [esp+224h+var_210]
push	eax
call	sub_819B10
inc	esi
add	esp, 0Ch
cmp	esi, [esp+21Ch+var_214]
jb	short loc_827DD0

loc_827DEC:
lea	ecx, [esp+21Ch+var_210]
push	ecx
call	sub_819D10
mov	ecx, [esp+220h+var_4]
add	esp, 4
pop	esi
pop	ebx
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 214h
retn
sub_827D90 endp

align 10h



sub_827E20 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	edi
mov	edi, offset _toupper
call	sub_827D90
pop	edi
retn
sub_827E20 endp

align 10h



sub_827E40 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	edi
mov	edi, offset _tolower
call	sub_827D90
pop	edi
retn
sub_827E40 endp

align 10h



sub_827E60 proc	near

var_214= dword ptr -214h
var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 214h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+214h+var_4], eax
push	esi
mov	esi, [esp+218h+arg_0]
push	edi
lea	eax, [esp+21Ch+var_214]
push	eax
push	1
push	esi
call	sub_81ABE0
lea	ecx, [esp+228h+var_210]
push	ecx
push	esi
mov	edi, eax
call	sub_819CF0
mov	edx, [esp+230h+var_214]
lea	esi, [edx+edi-1]
add	esp, 14h
cmp	esi, edi
jb	short loc_827EBC

loc_827EA6:
movzx	eax, byte ptr [esi]
push	eax
lea	ecx, [esp+220h+var_210]
push	ecx
call	sub_819B10
dec	esi
add	esp, 8
cmp	esi, edi
jnb	short loc_827EA6

loc_827EBC:
lea	edx, [esp+21Ch+var_210]
push	edx
call	sub_819D10
mov	ecx, [esp+220h+var_4]
add	esp, 4
pop	edi
pop	esi
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 214h
retn
sub_827E60 endp

align 10h



sub_827EF0 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
mov	edx, [esp+arg_C]
push	eax
push	ecx
push	edx
call	sub_819B40
add	esp, 0Ch
xor	eax, eax
retn
sub_827EF0 endp

align 10h



sub_827F10 proc	near

var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 210h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+210h+var_4], eax
push	esi
mov	esi, [esp+214h+arg_0]
push	6
push	1
push	esi
call	sub_81ACD0
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
add	ecx, 8
add	esp, 0Ch
cmp	eax, ecx
jnb	short loc_827F5D
jmp	short loc_827F50
align 10h

loc_827F50:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_827F50

loc_827F5D:
lea	eax, [esp+214h+var_210]
push	eax
push	esi
mov	[esi+1Ch], ecx
call	sub_819CF0
lea	ecx, [esp+21Ch+var_210]
push	ecx
push	offset sub_827EF0
push	esi
call	sub_81B800
add	esp, 14h
test	eax, eax
jz	short loc_827FA6
push	offset aUnableToDumpTh ; "unable to dump the function given"
push	esi
call	sub_81A760
add	esp, 8
pop	esi
mov	ecx, [esp+210h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 210h
retn

loc_827FA6:
lea	edx, [esp+214h+var_210]
push	edx
call	sub_819D10
mov	ecx, [esp+218h+var_4]
add	esp, 4
pop	esi
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 210h
retn
sub_827F10 endp

align 10h



sub_827FD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1		; int
push	offset off_1467630 ; int
push	offset aString_5 ; "string"
push	esi		; int
call	sub_81A860
push	offset aFormat	; "format"
push	esi
call	sub_81C070
mov	ecx, off_1682050
mov	eax, ecx
add	esp, 18h
lea	edi, [eax+1]

loc_828001:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_828001
sub	eax, edi
push	0
inc	eax
push	eax
push	ecx
push	esi
call	sub_8340D0
push	1
push	1
push	offset sub_826AA0
push	esi
call	sub_81B920
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
lea	edx, [eax-10h]
push	edx
add	eax, 0FFFFFFE8h
push	eax
push	esi
call	sub_8194A0
push	offset a__index_0 ; "__index"
mov	edi, 0FFFFFFF0h
add	[esi+1Ch], edi
push	esi
call	sub_81C070
push	1
push	0
push	esi
call	sub_81BD50
mov	eax, [esi+1Ch]
mov	ecx, eax
mov	edx, [ecx-10h]
mov	[eax], edx
mov	ecx, [ecx-0Ch]
mov	[eax+4], ecx
add	eax, 8
mov	[esi+1Ch], eax
mov	edx, [eax-20h]
mov	[eax], edx
mov	ecx, [eax-1Ch]
mov	[eax+4], ecx
add	eax, 8
add	esp, 44h
lea	edx, [eax-8]
push	edx
lea	ecx, [eax-10h]
mov	[esi+1Ch], eax
push	ecx
add	eax, 0FFFFFFE8h
push	eax
push	esi
call	sub_8194A0
add	[esi+1Ch], edi
mov	eax, [esi+1Ch]
lea	ecx, [eax-10h]
add	esp, 10h
cmp	ecx, [esi+20h]
jb	short loc_8280C2
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	esi
call	sub_8192D0
mov	eax, 0FFFFFFF8h
add	[esi+1Ch], eax
add	esp, 0Ch
add	[esi+1Ch], eax
lea	eax, [edi+11h]
pop	edi
pop	esi
retn

loc_8280C2:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
mov	eax, 1
pop	esi
retn
sub_827FD0 endp

align 10h



sub_8280D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
mov	esi, eax
mov	eax, [esp+0Ch+arg_4]
push	edi
mov	ebx, ecx
lea	edx, [eax+1]
nop

loc_8280E0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_8280E0
mov	edi, [esp+10h+arg_0]
sub	eax, edx
mov	ebp, eax
mov	eax, edi
lea	edx, [eax+1]

loc_8280F4:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_8280F4
sub	eax, edx
cmp	esi, eax
jb	short loc_828109
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn

loc_828109:
lea	ecx, [edi+esi]
lea	esp, [esp+0]

loc_828110:
mov	al, [ecx]
cmp	al, 3Bh
jz	short loc_828126
cmp	al, 20h
jz	short loc_828126
cmp	al, 0Ah
jz	short loc_828126
cmp	al, 0Dh
jz	short loc_828126
cmp	al, 9
jnz	short loc_828129

loc_828126:
inc	ecx
jmp	short loc_828110

loc_828129:
mov	al, [ecx]
mov	esi, ecx
test	al, al
jz	short loc_828141

loc_828131:
cmp	al, 3Fh
jz	short loc_828141
cmp	al, 3Bh
jz	short loc_82817E
mov	al, [esi+1]
inc	esi
test	al, al
jnz	short loc_828131

loc_828141:
mov	edi, esi
sub	edi, ecx
push	edi
push	ecx
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, [esp+1Ch+arg_4]
push	ebp
push	eax
add	ebx, edi
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	ebx, ebp
add	esp, 18h
mov	byte ptr [ebx],	0
cmp	byte ptr [esi],	0
jz	short loc_828191
mov	al, [esi+1]
inc	esi
mov	ecx, esi
test	al, al
jz	short loc_82817E

loc_828172:
cmp	al, 3Bh
jz	short loc_82817E
mov	al, [esi+1]
inc	esi
test	al, al
jnz	short loc_828172

loc_82817E:
mov	edi, esi
sub	edi, ecx
push	edi
push	ecx
push	ebx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
mov	byte ptr [edi+ebx], 0

loc_828191:
pop	edi
mov	eax, esi
sub	eax, [esp+0Ch+arg_0]
pop	esi
pop	ebp
pop	ebx
retn
sub_8280D0 endp

align 10h



; int __cdecl sub_8281A0(int, char *)
sub_8281A0 proc	near

var_208= dword ptr -208h
DstBuf=	byte ptr -204h
LibFileName= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 208h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+208h+var_4], eax
mov	eax, [esp+208h+arg_0]
push	ebp
push	esi
mov	[esp+210h+var_208], eax
mov	eax, [esp+210h+arg_4]
push	2Dh		; int
push	eax		; char *
mov	esi, eax
call	_strchr
add	esp, 8
test	eax, eax
jz	short loc_8281DC
lea	esi, [eax+1]

loc_8281DC:
push	esi
push	offset aLuaopen_ ; "luaopen_"
push	offset aSS_13	; "%s%s"
lea	ecx, [esp+21Ch+DstBuf]
push	100h		; SizeInBytes
push	ecx		; DstBuf
call	sub_822D70
push	5Fh
lea	edx, [esp+228h+DstBuf]
push	2Eh
push	edx
call	sub_82B900
push	edi
push	ebx
xor	eax, eax
lea	ecx, [esp+238h+LibFileName]
call	sub_8280D0
mov	esi, eax
add	esp, 28h
cmp	esi, 0FFFFFFFFh
jz	short loc_828268
mov	ebp, ds:GetProcAddress
jmp	short loc_828230
align 10h

loc_828230:
lea	eax, [esp+210h+LibFileName]
push	eax		; lpLibFileName
call	ds:LoadLibraryA
test	eax, eax
jz	short loc_82824E
lea	ecx, [esp+210h+DstBuf]
push	ecx		; lpProcName
push	eax		; hModule
call	ebp ; GetProcAddress
test	eax, eax
jnz	short loc_828281

loc_82824E:
push	edi
push	ebx
mov	eax, esi
lea	ecx, [esp+218h+LibFileName]
call	sub_8280D0
mov	esi, eax
add	esp, 8
cmp	esi, 0FFFFFFFFh
jnz	short loc_828230

loc_828268:
pop	esi
xor	eax, eax
pop	ebp
mov	ecx, [esp+208h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 208h
retn

loc_828281:
mov	edx, [esp+210h+var_208]
push	0
push	0
push	eax
push	edx
call	sub_81B920
mov	ecx, [esp+220h+var_4]
add	esp, 10h
pop	esi
pop	ebp
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 208h
retn
sub_8281A0 endp

align 10h



sub_8282B0 proc	near
push	ebx
push	ebp
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	0		; int
push	offset aPackage_loader ; "package.loaders"
push	0FFFFD8EEh	; int
push	esi		; int
call	sub_81A510
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 1Ch
cmp	eax, [esi+20h]
jnb	short loc_8282E1
xor	ebp, ebp
jmp	short loc_8282ED

loc_8282E1:
push	eax
push	esi
call	sub_819890
add	esp, 8
mov	ebp, eax

loc_8282ED:
mov	ebx, 1
cmp	ebp, ebx
jl	short loc_828365

loc_8282F6:
mov	edi, [esi+1Ch]
push	edi
mov	eax, edi
push	ebx
sub	eax, 8
push	eax
push	esi
call	sub_819A80
mov	ecx, [esi+20h]
lea	eax, [edi+8]
mov	[esi+1Ch], eax
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
push	1
mov	[eax+4], ecx
add	eax, 8
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_81C6E0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
lea	edx, [eax-8]
add	esp, 1Ch
cmp	edx, ecx
jb	short loc_82836B
cmp	dword ptr [edx], 0
jnz	short loc_82836B
add	ecx, 10h
cmp	eax, ecx
jnb	short loc_82835D
jmp	short loc_828350
align 10h

loc_828350:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_828350

loc_82835D:
inc	ebx
cmp	ebx, ebp
mov	[esi+1Ch], ecx
jle	short loc_8282F6

loc_828365:
pop	edi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_82836B:
mov	edx, [eax-8]
mov	ecx, [eax-4]
mov	[eax-10h], edx
mov	edx, [eax]
mov	[eax-0Ch], ecx
mov	ecx, [eax+4]
mov	[eax-8], edx
mov	[eax-4], ecx
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
cmp	eax, [esi+20h]
jb	short loc_82839C
mov	eax, [eax]
cmp	eax, 0Ah
jz	short loc_8283A0
cmp	eax, 9
jz	short loc_8283A0

loc_82839C:
xor	eax, eax
jmp	short loc_8283A5

loc_8283A0:
mov	eax, 1

loc_8283A5:		; "loader did not return a function"
push	offset aLoaderDidNotRe
push	1
push	eax
push	esi
call	sub_81AB40
add	esp, 10h
pop	edi
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_8282B0 endp

align 10h



sub_8283C0 proc	near

var_234= byte ptr -234h
var_4= dword ptr -4

sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+234h+var_4], eax
mov	eax, [esi+1Ch]
sub	eax, 8
cmp	eax, [esi+20h]
jb	short loc_8283E4
cmp	dword ptr [eax], 0Ah
jz	short loc_82840D

loc_8283E4:
lea	eax, [esp+234h+var_234]
push	eax
push	1
push	esi
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jz	short loc_82840D
lea	ecx, [esp+234h+var_234]
push	ecx
push	offset asc_14679F8 ; "f"
push	esi
call	sub_81D440
add	esp, 0Ch
test	eax, eax
jnz	short loc_82841B

loc_82840D:		; "'module' not called from a Lua function"...
push	offset aModuleNotCalle
push	esi
call	sub_81A760
add	esp, 8

loc_82841B:
mov	eax, [esi+1Ch]
mov	ecx, eax
mov	edx, [ecx-10h]
mov	[eax], edx
mov	ecx, [ecx-0Ch]
mov	[eax+4], ecx
add	eax, 8
lea	ecx, [eax-10h]
mov	[esi+1Ch], eax
cmp	ecx, [esi+20h]
jb	short loc_828447
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	esi
call	sub_8191A0
add	esp, 0Ch

loc_828447:
mov	ecx, [esp+234h+var_4]
mov	eax, 0FFFFFFF8h
add	[esi+1Ch], eax
add	[esi+1Ch], eax
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn
sub_8283C0 endp

align 10h



sub_828470 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	0
push	2
push	esi
mov	edi, eax
call	sub_81ABE0
add	esp, 18h
push	edi		; lpLibFileName
mov	ebx, eax
call	ds:LoadLibraryA
test	eax, eax
jz	short loc_8284C0
push	ebx		; lpProcName
push	eax		; hModule
call	ds:GetProcAddress
test	eax, eax
jz	short loc_8284C0
push	0
push	0
push	eax
push	esi
call	sub_81B920
add	esp, 10h
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_8284C0:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
retn
sub_828470 endp

align 10h



sub_8284D0 proc	near

arg_0= dword ptr  4

push	1		; int
push	offset aPackage_load_0 ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
call	sub_81A510
mov	eax, [esp+10h+arg_0]
push	eax
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-8], ecx
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
add	esp, 1Ch
mov	[esi+1Ch], eax
retn
sub_8284D0 endp

align 10h



sub_828520 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	offset aPackage_0 ; "package"
push	0FFFFD8EEh
push	esi
mov	edi, eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 18h
cmp	eax, [esi+20h]
jb	short loc_828555
cmp	dword ptr [eax], 5
jz	short loc_828563

loc_828555:		; "global 'package' should be a table"
push	offset aGlobalPackageS
push	esi
call	sub_81A760
add	esp, 8

loc_828563:		; "preload"
push	offset aPreload
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 0Ch
cmp	eax, [esi+20h]
jb	short loc_828583
cmp	dword ptr [eax], 5
jz	short loc_828591

loc_828583:		; "'package.preload' must be a table"
push	offset aPackage_preloa
push	esi
call	sub_81A760
add	esp, 8

loc_828591:
push	edi
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
add	esp, 0Ch
cmp	ecx, [esi+20h]
jb	short loc_8285AD
cmp	dword ptr [ecx], 0
jz	short loc_82861D

loc_8285AD:
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-8], ecx
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-8], ecx
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
cmp	eax, [esi+20h]
jb	short loc_8285FB
mov	eax, [eax]
cmp	eax, 0Ah
jz	short loc_8285FF
cmp	eax, 9
jz	short loc_8285FF

loc_8285FB:
xor	eax, eax
jmp	short loc_828604

loc_8285FF:
mov	eax, 1

loc_828604:		; "preloader expects a function"
push	offset aPreloaderExpec
push	1
push	eax
push	esi
call	sub_81AB40
add	esp, 10h
pop	edi
mov	eax, 1
pop	esi
retn

loc_82861D:
add	dword ptr [esi+1Ch], 0FFFFFFE8h
pop	edi
xor	eax, eax
pop	esi
retn
sub_828520 endp

align 10h



sub_828630 proc	near

var_204= byte ptr -204h
var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 204h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+204h+var_4], eax
push	ebx
push	esi
mov	esi, [esp+20Ch+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	offset aPackage_1 ; "package"
push	0FFFFD8EEh
push	esi
mov	edi, eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 18h
cmp	eax, [esi+20h]
jb	short loc_82867D
cmp	dword ptr [eax], 5
jz	short loc_82868B

loc_82867D:		; "global 'package' should be a table"
push	offset aGlobalPackag_0
push	esi
call	sub_81A760
add	esp, 8

loc_82868B:		; "path"
push	offset aPath
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
push	0
push	0FFFFFFFFh
push	esi
call	sub_81ABE0
mov	ebx, eax
mov	eax, edi
add	esp, 18h
add	dword ptr [esi+1Ch], 0FFFFFFF0h
lea	edx, [eax+1]

loc_8286B0:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_8286B0
sub	eax, edx
inc	eax
push	eax
lea	eax, [esp+214h+var_204]
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
push	5Ch
lea	ecx, [esp+220h+var_204]
push	2Eh
push	ecx
call	sub_82B900
lea	edx, [esp+228h+var_204]
push	edx
push	ebx
xor	eax, eax
lea	ecx, [esp+230h+var_104]
call	sub_8280D0
mov	edi, eax
add	esp, 20h
cmp	edi, 0FFFFFFFFh
jz	short loc_828729

loc_8286F2:
lea	eax, [esp+210h+var_104]
push	offset aR_2	; "r"
push	eax		; char *
call	sub_82B8D0
add	esp, 8
test	eax, eax
jnz	short loc_828743
lea	ecx, [esp+210h+var_204]
push	ecx
push	ebx
mov	eax, edi
lea	ecx, [esp+218h+var_104]
call	sub_8280D0
mov	edi, eax
add	esp, 8
cmp	edi, 0FFFFFFFFh
jnz	short loc_8286F2

loc_828729:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
mov	ecx, [esp+204h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 204h
retn

loc_828743:		; FILE *
push	eax
call	_fclose
lea	edx, [esp+214h+var_104]
push	edx
push	esi
call	sub_81A010
add	esp, 0Ch
test	eax, eax
jz	short loc_828764
add	dword ptr [esi+1Ch], 0FFFFFFF8h
jmp	short loc_828729

loc_828764:
mov	ecx, [esp+210h+var_4]
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 204h
retn
sub_828630 endp

align 10h



sub_828790 proc	near

var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	ebx
push	esi
mov	esi, [esp+10Ch+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	offset aPackage_1 ; "package"
push	0FFFFD8EEh
push	esi
mov	edi, eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 18h
cmp	eax, [esi+20h]
jb	short loc_8287DD
cmp	dword ptr [eax], 5
jz	short loc_8287EB

loc_8287DD:		; "global 'package' should be a table"
push	offset aGlobalPackag_0
push	esi
call	sub_81A760
add	esp, 8

loc_8287EB:		; "cpath"
push	offset aCpath
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
push	0
push	0FFFFFFFFh
push	esi
call	sub_81ABE0
mov	ebx, eax
mov	eax, edi
add	esp, 18h
add	dword ptr [esi+1Ch], 0FFFFFFF0h
lea	edx, [eax+1]

loc_828810:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_828810
sub	eax, edx
inc	eax
push	eax
lea	eax, [esp+114h+var_104]
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
push	5Ch
lea	ecx, [esp+120h+var_104]
push	2Eh
push	ecx
call	sub_82B900
push	edi		; char *
push	esi		; int
lea	edi, [esp+130h+var_104]
call	sub_8281A0
mov	ecx, [esp+130h+var_4]
add	esp, 20h
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_828790 endp

align 10h



sub_828860 proc	near

var_104= byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	ebx
push	ebp
push	esi
mov	esi, [esp+110h+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	offset aPackage_1 ; "package"
push	0FFFFD8EEh
push	esi
mov	edi, eax
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 18h
cmp	eax, [esi+20h]
jb	short loc_8288AE
cmp	dword ptr [eax], 5
jz	short loc_8288BC

loc_8288AE:		; "global 'package' should be a table"
push	offset aGlobalPackag_0
push	esi
call	sub_81A760
add	esp, 8

loc_8288BC:		; "cpath"
push	offset aCpath_0
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
push	0
push	0FFFFFFFFh
push	esi
call	sub_81ABE0
add	dword ptr [esi+1Ch], 0FFFFFFF0h
push	2Eh		; int
push	edi		; char *
mov	ebx, eax
call	_strchr
add	esp, 20h
test	eax, eax
jz	short loc_8288EC
sub	eax, edi
jmp	short loc_8288FA

loc_8288EC:
mov	eax, edi
lea	edx, [eax+1]

loc_8288F1:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_8288F1
sub	eax, edx

loc_8288FA:
mov	ebp, eax
push	ebp
lea	eax, [esp+118h+var_104]
push	edi
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
push	edi		; char *
push	esi		; int
lea	edi, [esp+128h+var_104]
mov	[esp+ebp+128h+var_104],	0
call	sub_8281A0
mov	ecx, [esp+128h+var_4]
add	esp, 14h
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn
sub_828860 endp

align 10h



sub_828940 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
mov	ecx, [esi+1Ch]
mov	edi, eax
mov	eax, [esi+20h]
add	eax, 8
add	esp, 0Ch
cmp	ecx, eax
jnb	short loc_82896F

loc_828962:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_828962

loc_82896F:		; int
push	1
push	offset aPackage_load_0 ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
mov	[esi+1Ch], eax
call	sub_81A510
push	edi
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-4], edx
mov	[eax-8], ecx
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
lea	edx, [eax-8]
add	esp, 1Ch
mov	[esi+1Ch], eax
cmp	edx, ecx
jb	loc_828AF9
cmp	dword ptr [edx], 0
jnz	loc_828AF9
add	ecx, 8
cmp	eax, ecx
jnb	short loc_8289DD
mov	edi, edi

loc_8289D0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_8289D0

loc_8289DD:
mov	[esi+1Ch], ecx
call	sub_8282B0
push	edi
test	eax, eax
jnz	short loc_8289FB
push	offset aUnableToLoadMo ; "unable to load module	%s"
push	esi
call	sub_81A760
add	esp, 0Ch
pop	edi
pop	esi
retn

loc_8289FB:
push	esi
call	sub_81C070
push	1
push	1
push	esi
call	sub_81C6E0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
mov	edx, eax
sub	edx, ecx
and	edx, 0FFFFFFF8h
add	esp, 14h
cmp	edx, 8
jle	short loc_828A57
lea	edx, [ecx+8]
cmp	edx, eax
jnb	short loc_828A2C
cmp	dword ptr [edx], 0
jz	short loc_828A57

loc_828A2C:		; int
push	1
push	offset aPackage_load_1 ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
call	sub_81A510
push	2
push	esi
call	sub_481E40
push	edi
push	0FFFFFFFEh
push	esi
call	sub_5F2430
add	esp, 24h
jmp	loc_828AD0

loc_828A57:
add	ecx, 8
cmp	eax, ecx
jnb	short loc_828A6D
mov	edi, edi

loc_828A60:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_828A60

loc_828A6D:		; int
push	1
push	offset aPackage_load_2 ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
mov	[esi+1Ch], ecx
call	sub_81A510
push	edi
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 1Ch
cmp	eax, [esi+20h]
jnb	short loc_828A9D
xor	eax, eax
jmp	short loc_828AA6

loc_828A9D:
xor	ecx, ecx
cmp	[eax], ecx
setz	cl
mov	eax, ecx

loc_828AA6:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
test	eax, eax
jz	short loc_828AD0
mov	eax, [esi+1Ch]
push	edi
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], 1
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
add	esp, 0Ch

loc_828AD0:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_828AED
lea	ebx, [ebx+0]

loc_828AE0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_828AE0

loc_828AED:
push	edi
mov	[esi+1Ch], ecx
call	sub_8284D0
add	esp, 4

loc_828AF9:
pop	edi
mov	eax, 1
pop	esi
retn
sub_828940 endp

align 10h



sub_828B10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
mov	ebx, [esi+1Ch]
sub	ebx, [esi+20h]
push	1		; int
push	offset aPackage_load_0 ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
mov	edi, eax
sar	ebx, 3
call	sub_81A510
push	edi
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
mov	[eax-8], ecx
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
add	eax, 0FFFFFFF8h
add	esp, 28h
cmp	eax, [esi+20h]
jb	short loc_828B7C
cmp	dword ptr [eax], 5
jz	loc_828C2C

loc_828B7C:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
push	0Ah		; int
push	edi		; char *
push	0FFFFD8EEh	; int
push	esi		; int
call	sub_81A510
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	[eax], ecx
mov	edx, [eax-4]
push	offset a_m	; "_M"
mov	[eax+4], edx
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
push	edi
push	esi
call	sub_81C070
push	offset a_name	; "_NAME"
push	0FFFFFFFEh
push	esi
call	sub_5F2430
push	2Eh		; int
push	edi		; char *
call	_strrchr
add	esp, 38h
test	eax, eax
jnz	short loc_828BD6
mov	eax, edi
jmp	short loc_828BD7

loc_828BD6:
inc	eax

loc_828BD7:
sub	eax, edi
push	eax
push	edi
push	esi
call	sub_81B9D0
push	offset a_package ; "_PACKAGE"
push	0FFFFFFFEh
push	esi
call	sub_5F2430
push	1		; int
push	offset aPackage_load_3 ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
call	sub_81A510
mov	ebp, [esi+1Ch]
push	0FFFFFFFEh
push	esi
call	sub_432A50
mov	ecx, [eax]
mov	[ebp+0], ecx
mov	edx, [eax+4]
push	edi
mov	[ebp+4], edx
push	0FFFFFFFEh
add	ebp, 8
push	esi
mov	[esi+1Ch], ebp
call	sub_5F2430
add	esp, 3Ch
add	dword ptr [esi+1Ch], 0FFFFFFF8h

loc_828C2C:
mov	ebp, 2
cmp	ebx, ebp
jl	short loc_828C72

loc_828C35:
mov	edi, [esi+1Ch]
push	ebp
push	esi
call	sub_432A50
mov	ecx, [eax]
mov	[edi], ecx
mov	edx, [eax+4]
mov	[edi+4], edx
lea	eax, [edi+8]
mov	[esi+1Ch], eax
mov	ecx, [eax-10h]
mov	[eax], ecx
mov	edx, [eax-0Ch]
push	0
mov	[eax+4], edx
add	eax, 8
push	1
push	esi
mov	[esi+1Ch], eax
call	sub_81C6E0
inc	ebp
add	esp, 14h
cmp	ebp, ebx
jle	short loc_828C35

loc_828C72:
call	sub_8283C0
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn
sub_828B10 endp

align 10h



sub_828C80 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	offset a_name_0	; "_NAME"
push	1
push	esi
call	sub_5F23D0
push	0
push	2
push	esi
call	sub_81ABE0
mov	ecx, [esi+20h]
mov	edi, eax
mov	eax, [esi+1Ch]
add	esp, 18h
cmp	eax, ecx
jnb	short loc_828CBD
lea	esp, [esp+0]

loc_828CB0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_828CB0

loc_828CBD:		; int
push	1
push	offset aPackage_load_0 ; "package.loaded"
push	0FFFFD8EEh	; int
push	esi		; int
mov	[esi+1Ch], ecx
call	sub_81A510
push	edi
push	0FFFFFFFFh
push	esi
call	sub_5F23D0
mov	eax, [esi+1Ch]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-10h], ecx
mov	ecx, [eax]
mov	[eax-0Ch], edx
mov	edx, [eax+4]
push	1
mov	[eax-8], ecx
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
push	0
push	esi
mov	[esi+1Ch], eax
call	sub_81BD50
mov	eax, [esi+1Ch]
mov	ecx, [esi+30h]
mov	[eax], ecx
mov	edx, [esi+34h]
push	offset a__index_1 ; "__index"
mov	[eax+4], edx
add	eax, 8
push	0FFFFFFFEh
push	esi
mov	[esi+1Ch], eax
call	sub_5F2430
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	esp, 34h
cmp	eax, ecx
jnb	short loc_828D45
add	ecx, 0FFFFFFF8h
push	ecx
push	eax
push	esi
call	sub_8192D0
add	esp, 0Ch
add	dword ptr [esi+1Ch], 0FFFFFFF8h

loc_828D45:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_828D5D
nop

loc_828D50:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_828D50

loc_828D5D:
pop	edi
mov	[esi+1Ch], ecx
xor	eax, eax
pop	esi
retn
sub_828C80 endp

align 10h



sub_828D70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+1Ch]
mov	ecx, [esi+30h]
push	edi
mov	[eax], ecx
mov	edx, [esi+34h]
push	1		; int
push	offset off_1467934 ; int
mov	[eax+4], edx
add	eax, 8
push	0		; char *
push	esi		; int
mov	[esi+1Ch], eax
call	sub_81A860
add	dword ptr [esi+1Ch], 0FFFFFFF8h
push	1		; int
push	offset off_146795C ; int
push	offset aPackage_2 ; "package"
push	esi		; int
call	sub_81A860
push	0
push	0
push	esi
call	sub_81BD50
mov	eax, ds:off_1467974
add	esp, 2Ch
xor	edi, edi
test	eax, eax
jz	short loc_828DF5

loc_828DC7:
push	0
push	eax
push	esi
call	sub_81C050
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
inc	edi
push	edi
add	eax, 0FFFFFFF0h
push	eax
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	eax, ds:off_1467974[edi*4]
add	esp, 1Ch
test	eax, eax
jnz	short loc_828DC7

loc_828DF5:		; "loaders"
push	offset aLoaders_0
push	0FFFFFFFEh
push	esi
call	sub_5F2430
push	7
push	offset aPreload_0 ; "preload"
push	esi
call	sub_81B9D0
push	1
push	0
push	esi
call	sub_81BD50
mov	eax, [esi+1Ch]
lea	edx, [eax-8]
push	edx
lea	ecx, [eax-10h]
push	ecx
add	eax, 0FFFFFFE8h
push	eax
push	esi
call	sub_819790
push	4
push	offset aPath_2	; "path"
mov	edi, 0FFFFFFF0h
add	[esi+1Ch], edi
push	esi
call	sub_81B9D0
add	esp, 40h
push	1Dh
push	offset a_?_lua?_luaIni ; ".\\?.lua;\t!\\?.lua;\t!\\init.lua;"
push	esi
call	sub_81B9D0
mov	eax, [esi+1Ch]
lea	edx, [eax-8]
push	edx
lea	ecx, [eax-10h]
push	ecx
add	eax, 0FFFFFFE8h
push	eax
push	esi
call	sub_819790
add	[esi+1Ch], edi
push	5
push	offset aCpath_1	; "cpath"
push	esi
call	sub_81B9D0
push	20h
push	offset a_?_dll?_dllLoa ; ".\\?.dll;\t!\\?.dll;\t!\\loadall.dll;"
push	esi
call	sub_81B9D0
mov	eax, [esi+1Ch]
lea	edx, [eax-8]
push	edx
lea	ecx, [eax-10h]
push	ecx
add	eax, 0FFFFFFE8h
push	eax
push	esi
call	sub_819790
add	[esi+1Ch], edi
add	esp, 44h
lea	eax, [edi+11h]
pop	edi
pop	esi
retn
sub_828D70 endp

align 10h



sub_828EB0 proc	near

var_58=	dword ptr -58h
Buf= byte ptr -54h
var_4= dword ptr -4

sub	esp, 58h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+58h+var_4], eax
call	__errno
mov	eax, [eax]
push	eax		; ErrNum
mov	[esp+5Ch+var_58], eax
lea	eax, [esp+5Ch+Buf]
push	50h		; SizeInBytes
push	eax		; Buf
call	_strerror_s
lea	ecx, [esp+64h+Buf]
push	ecx
push	edi		; ArgList
push	offset aSS_14	; "%s: %s"
push	esi		; int
call	sub_81C0C0
fild	[esp+74h+var_58]
mov	eax, [esi+1Ch]
mov	ecx, [esp+74h+var_4]
fstp	dword ptr [eax+4]
add	esp, 1Ch
mov	dword ptr [eax], 3
add	eax, 8
xor	ecx, esp
mov	[esi+1Ch], eax
call	sub_7999A3
add	esp, 58h
retn
sub_828EB0 endp

align 10h



sub_828F10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	edi
push	10Ch
push	esi
call	sub_81BDF0
mov	edi, eax
mov	eax, [esp+0Ch+arg_0]
mov	[edi], eax
mov	eax, ebx
add	esp, 8
lea	edx, [eax+1]
lea	esp, [esp+0]

loc_828F30:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_828F30
sub	eax, edx
push	eax
lea	ecx, [edi+4]
push	ebx
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	eax, ebx
add	esp, 0Ch
lea	ecx, [eax+1]
lea	esp, [esp+0]

loc_828F50:
mov	dl, [eax]
inc	eax
test	dl, dl
jnz	short loc_828F50
sub	eax, ecx
mov	[eax+edi+4], dl
mov	edx, [esp+4+arg_4]
push	offset aFile_3	; "FILE*"
push	esi
mov	[edi+108h], edx
call	sub_81A7D0
mov	eax, [esi+1Ch]
add	esp, 8
lea	ecx, [eax-10h]
pop	edi
cmp	ecx, [esi+20h]
jb	short locret_828F93
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	esi
call	sub_8192D0
add	esp, 0Ch
add	dword ptr [esi+1Ch], 0FFFFFFF8h

locret_828F93:
retn
sub_828F10 endp

align 10h



sub_828FA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
test	eax, eax
jz	short loc_828FB3
push	ecx
push	eax
call	sub_828F10
add	esp, 8

loc_828FB3:
mov	eax, [esi+1Ch]
mov	ecx, eax
mov	edx, [ecx-8]
mov	[eax], edx
mov	ecx, [ecx-4]
mov	[eax+4], ecx
lea	ecx, [eax+8]
mov	eax, [esi+20h]
sub	eax, 8
mov	[esi+1Ch], ecx
cmp	dword ptr [eax], 0Ah
jnz	short loc_828FD9
mov	eax, [eax+4]
jmp	short loc_828FDF

loc_828FD9:
lea	eax, [ecx-13888h]

loc_828FDF:
mov	edx, [esp+4+arg_4]
add	ecx, 0FFFFFFF8h
push	ecx
push	edx
push	eax
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
add	esp, 10h
pop	esi
retn
sub_828FA0 endp

align 10h



sub_829000 proc	near
mov	eax, [esi+20h]
sub	eax, 8
cmp	dword ptr [eax], 0Ah
jnz	short loc_829010
mov	eax, [eax+4]
jmp	short loc_829018

loc_829010:
mov	eax, [esi+1Ch]
sub	eax, 13888h

loc_829018:
push	edi
mov	edi, [esi+1Ch]
push	edi
push	ecx
push	eax
push	esi
call	sub_819A80
lea	eax, [edi+8]
mov	[esi+1Ch], eax
add	esp, 10h
add	eax, 0FFFFFFF8h
pop	edi
cmp	eax, [esi+20h]
jb	short loc_829052
mov	ecx, [eax]
cmp	ecx, 7
jnz	short loc_829047
mov	eax, [eax+4]
add	eax, 10h
mov	eax, [eax]
retn

loc_829047:
cmp	ecx, 2
jnz	short loc_829052
mov	eax, [eax+4]
mov	eax, [eax]
retn

loc_829052:
xor	eax, eax
mov	eax, [eax]
retn
sub_829000 endp

align 10h



sub_829060 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebp
push	esi
xor	ebp, ebp
push	edi
mov	edi, eax
mov	esi, ecx
mov	[esp+14h+var_8], ebp
cmp	ebx, ebp
jnz	short loc_829089
push	offset aCanTWriteToACl ; "can't write to a closed file"
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn

loc_829089:		; FILE *
push	ebx
call	_clearerr
add	esp, 4
cmp	edi, [esp+14h+arg_0]
jg	short loc_8290E8

loc_829098:
lea	eax, [esp+14h+var_4]
push	eax
push	edi
push	esi
call	sub_81ABE0
mov	ecx, [esp+20h+var_4]
push	ebx		; FILE *
push	ecx		; size_t
push	1		; size_t
push	eax		; void *
add	ebp, ecx
call	_fwrite
add	[esp+30h+var_8], eax
inc	edi
add	esp, 1Ch
cmp	edi, [esp+14h+arg_0]
jle	short loc_829098
cmp	ebp, [esp+14h+var_8]
jz	short loc_8290E8
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
xor	edi, edi
mov	[esi+1Ch], eax
call	sub_828EB0
lea	eax, [edi+3]
pop	edi
pop	esi
pop	ebp
add	esp, 8
retn

loc_8290E8:
mov	eax, [esi+1Ch]
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], 1
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
mov	eax, 1
pop	ebp
add	esp, 8
retn
sub_829060 endp

align 10h



sub_829110 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	offset aFile_4	; "FILE*"
push	1
push	esi
call	sub_81AD30
mov	ecx, eax
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
mov	ebx, [ecx]
sar	eax, 3
push	eax
mov	eax, 2
mov	ecx, esi
call	sub_829060
add	esp, 10h
pop	esi
pop	ebx
retn
sub_829110 endp

align 10h



sub_829150 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	ecx, 2
call	sub_829000
mov	ebx, eax
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
mov	ecx, esi
sar	eax, 3
dec	eax
push	eax
mov	eax, 1
call	sub_829060
add	esp, 4
pop	esi
pop	ebx
retn
sub_829150 endp

align 10h



sub_829180 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	offset aFile_5	; "FILE*"
push	1
push	eax
call	sub_81AD30
mov	ecx, [eax]
push	ecx		; FILE *
call	_fflush
add	esp, 10h
xor	eax, eax
retn
sub_829180 endp

align 10h



sub_8291A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, 2
call	sub_829000
push	eax		; FILE *
call	_fflush
add	esp, 4
xor	eax, eax
pop	esi
retn
sub_8291A0 endp

align 10h



sub_8291C0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	offset aFile_6	; "FILE*"
push	1
push	esi
call	sub_81AD30
mov	edi, eax
mov	eax, [edi]
add	esp, 0Ch
xor	ebx, ebx
test	eax, eax
jnz	short loc_8291F3
push	offset aTryToCloseAClo ; "try to close a closed	file"
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebx
retn

loc_8291F3:
mov	ecx, [edi+108h]
cmp	ecx, 3		; switch 4 cases
ja	short loc_829263 ; default
jmp	ds:off_8292AC[ecx*4] ; switch jump

loc_829205:		; jumptable 008291FE case 0
push	eax
call	j__fclose
add	esp, 4
mov	ebx, eax
jmp	short loc_829264

loc_829212:		; jumptable 008291FE case 1
push	eax
call	__pclose
add	esp, 4
mov	ebx, eax
jmp	short loc_829264

loc_82921F:		; jumptable 008291FE case 2
mov	eax, [esi+1Ch]
add	edi, 4
push	edi		; ArgList
mov	[eax], ebx
add	eax, 8
push	offset aCannotCloseStd ; "Cannot close std file: %s"
push	esi		; int
mov	[esi+1Ch], eax
call	sub_81C0C0
add	esp, 0Ch
pop	edi
pop	esi
mov	eax, 2
pop	ebx
retn

loc_829245:		; jumptable 008291FE case 3
push	eax
call	j__fclose
mov	ebx, eax
add	esp, 4
cmp	ebx, 0FFFFFFFFh
jz	short loc_829264
lea	eax, [edi+4]
push	eax		; char *
call	sub_82B870
add	esp, 4
jmp	short loc_829264

loc_829263:		; Trap to Debugger
int	3

loc_829264:
mov	dword ptr [edi], 0
mov	eax, [esi+1Ch]
cmp	ebx, 0FFFFFFFFh
jnz	short loc_82928D
mov	dword ptr [eax], 0
add	eax, 8
add	edi, 4
mov	[esi+1Ch], eax
call	sub_828EB0
pop	edi
pop	esi
lea	eax, [ebx+4]
pop	ebx
retn

loc_82928D:
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], 1
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
mov	eax, 1
pop	ebx
retn
sub_8291C0 endp

align 4
off_8292AC dd offset loc_829205	; jump table for switch	statement
dd offset loc_829212
dd offset loc_82921F
dd offset loc_829245
align 10h



sub_8292C0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
test	eax, 0FFFFFFF8h
jnz	short loc_8292DC
mov	ecx, 2
call	sub_829000

loc_8292DC:
push	esi
call	sub_8291C0
add	esp, 4
pop	esi
retn
sub_8292C0 endp

align 10h



sub_8292F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	offset aFile_7	; "FILE*"
push	1
push	esi
call	sub_81AD30
add	esp, 0Ch
cmp	dword ptr [eax], 0
jz	short loc_829313
push	esi
call	sub_8291C0
add	esp, 4

loc_829313:
xor	eax, eax
pop	esi
retn
sub_8292F0 endp

align 10h



; int __cdecl sub_829320(FILE *)
sub_829320 proc	near

var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 210h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+210h+var_4], eax
push	ebp
mov	ebp, [esp+214h+arg_0]
push	esi
lea	eax, [esp+218h+var_210]
push	eax
push	edi
call	sub_819CF0
lea	ecx, [esp+220h+var_210]
push	ecx
call	sub_81A0C0
push	ebp		; FILE *
mov	esi, eax
push	200h		; int
push	esi		; char *
call	_fgets
add	esp, 18h
test	eax, eax
jz	short loc_8293AF

loc_829367:
mov	eax, esi
lea	edx, [eax+1]
lea	esp, [esp+0]

loc_829370:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_829370
sub	eax, edx
cmp	eax, 1
jb	short loc_829385
cmp	byte ptr [eax+esi-1], 0Ah
jz	short loc_829404

loc_829385:
push	eax
lea	edx, [esp+21Ch+var_210]
push	edx
call	sub_819BE0
lea	eax, [esp+220h+var_210]
push	eax
call	sub_81A0C0
push	ebp		; FILE *
mov	esi, eax
push	200h		; int
push	esi		; char *
call	_fgets
add	esp, 18h
test	eax, eax
jnz	short loc_829367

loc_8293AF:
lea	ecx, [esp+218h+var_210]
push	ecx
call	sub_819D10
mov	eax, [edi+1Ch]
sub	eax, 8
add	esp, 4
cmp	eax, [edi+20h]
jb	short loc_8293D5
push	eax
push	edi
call	sub_819890
add	esp, 8
test	eax, eax
jnz	short loc_82941D

loc_8293D5:
add	dword ptr [edi+1Ch], 0FFFFFFF8h
mov	eax, [edi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
pop	esi
mov	[edi+1Ch], eax
mov	eax, 1
pop	ebp
mov	ecx, [esp+210h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 210h
retn

loc_829404:
dec	eax
push	eax
lea	edx, [esp+21Ch+var_210]
push	edx
call	sub_819BE0
lea	eax, [esp+220h+var_210]
push	eax
call	sub_819D10
add	esp, 0Ch

loc_82941D:
mov	ecx, [esp+218h+var_4]
pop	esi
pop	ebp
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 210h
retn
sub_829320 endp

align 10h



; int __cdecl sub_829440(FILE *, int)
sub_829440 proc	near

var_214= dword ptr -214h
var_210= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 214h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+214h+var_4], eax
mov	eax, [esp+214h+arg_4]
push	ebp
mov	ebp, [esp+218h+arg_0]
push	esi
push	edi
push	eax
push	ebx
call	sub_81AB60
mov	esi, eax
push	ebp		; FILE *
mov	[esp+22Ch+var_214], esi
mov	edi, 200h
call	sub_7A2994
push	ebp		; FILE *
push	eax		; int
call	_ungetc
lea	ecx, [esp+234h+var_210]
push	ecx
push	ebx
call	sub_819CF0
add	esp, 1Ch
jmp	short loc_829498

loc_829494:
mov	esi, [esp+220h+var_214]

loc_829498:
lea	edx, [esp+220h+var_210]
push	edx
call	sub_81A0C0
add	esp, 4
cmp	edi, esi
jb	short loc_8294AB
mov	edi, esi

loc_8294AB:		; FILE *
push	ebp
push	edi		; size_t
push	1		; size_t
push	eax		; void *
call	_fread
mov	esi, eax
lea	eax, [esp+230h+var_210]
push	esi
push	eax
call	sub_819BE0
add	esp, 18h
sub	[esp+220h+var_214], esi
jz	short loc_8294CF
cmp	esi, edi
jz	short loc_829494

loc_8294CF:
lea	ecx, [esp+220h+var_210]
push	ecx
call	sub_819D10
push	ebp		; FILE *
call	_feof
add	esp, 8
pop	edi
pop	esi
pop	ebp
test	eax, eax
jz	short loc_829515
mov	eax, [ebx+1Ch]
sub	eax, 8
cmp	eax, [ebx+20h]
jb	short loc_829502
push	eax
push	ebx
call	sub_819890
add	esp, 8
test	eax, eax
jnz	short loc_829515

loc_829502:
add	dword ptr [ebx+1Ch], 0FFFFFFF8h
mov	eax, [ebx+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[ebx+1Ch], eax

loc_829515:
mov	ecx, [esp+214h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 214h
retn
sub_829440 endp

align 10h



sub_829530 proc	near

var_210= byte ptr -210h
var_4= dword ptr -4

sub	esp, 210h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+210h+var_4], eax
push	edi
call	_clearerr
lea	eax, [esp+214h+var_210]
push	eax
push	ebx
call	sub_819CF0
add	esp, 0Ch
push	esi
lea	esp, [esp+0]

loc_829560:
lea	ecx, [esp+214h+var_210]
push	ecx
call	sub_81A0C0
push	edi		; FILE *
push	200h		; size_t
push	1		; size_t
push	eax		; void *
call	_fread
mov	esi, eax
lea	edx, [esp+228h+var_210]
push	esi
push	edx
call	sub_819BE0
add	esp, 1Ch
test	esi, esi
ja	short loc_829560
lea	eax, [esp+214h+var_210]
push	eax
call	sub_819D10
push	edi		; FILE *
call	_ferror
add	esp, 8
pop	esi
test	eax, eax
jz	short loc_8295C0
add	dword ptr [ebx+1Ch], 0FFFFFFF8h
mov	eax, [ebx+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
push	edi		; FILE *
mov	[ebx+1Ch], eax
call	_clearerr
add	esp, 4

loc_8295C0:
mov	ecx, [esp+210h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 210h
retn
sub_829530 endp

align 10h



sub_8295E0 proc	near

var_4= dword ptr -4

push	ecx
push	edi		; FILE *
call	_clearerr
lea	eax, [esp+8+var_4]
push	eax
push	offset asc_1467CDC ; "%f"
push	edi		; File
call	_fscanf_s
add	esp, 10h
cmp	eax, 1
mov	eax, [esi+1Ch]
jnz	short loc_829616
fld	[esp+4+var_4]
mov	dword ptr [eax], 3
fstp	dword ptr [eax+4]
add	eax, 8
mov	[esi+1Ch], eax
pop	ecx
retn

loc_829616:
mov	dword ptr [eax], 0
add	eax, 8
push	edi		; FILE *
mov	[esi+1Ch], eax
call	_clearerr
add	esp, 4
pop	ecx
retn
sub_8295E0 endp

align 10h



sub_829630 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
mov	ebx, [esp+10h+arg_0]
push	offset aFile_8	; "FILE*"
push	1
push	ebx
call	sub_81AD30
mov	edx, [eax]
add	esp, 0Ch
mov	[esp+10h+var_C], edx
test	edx, edx
jnz	short loc_829665
push	offset aCanTReadAClose ; "can't read a closed file"
push	ebx
call	sub_81A760
add	esp, 8
pop	ebx
add	esp, 0Ch
retn

loc_829665:
mov	eax, [ebx+1Ch]
mov	ecx, eax
sub	ecx, [ebx+20h]
push	esi
sar	ecx, 3
neg	ecx
push	edi
jns	short loc_829688
lea	edi, [eax+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd

loc_829688:
add	eax, 0FFFFFFF8h
mov	[ebx+1Ch], eax
sub	eax, [ebx+20h]
push	ebp
sar	eax, 3
mov	esi, eax
mov	[esp+1Ch+var_4], esi
test	esi, esi
jle	loc_829798
mov	ebp, 1
cmp	esi, ebp
jl	loc_8297A3

loc_8296B0:
lea	eax, [esp+1Ch+var_8]
push	eax
push	ebp
push	ebx
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+1Ch+var_8], 0
jnz	short loc_8296E4
push	eax
push	ebx
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_8296E4
mov	ecx, [esp+1Ch+var_C]
push	ebp		; int
push	ecx		; FILE *
call	sub_829440
add	esp, 8
jmp	short loc_829738

loc_8296E4:
push	0
push	offset asc_1467D04 ; "*l"
push	ebp
push	ebx
call	sub_81AE20
add	esp, 10h
cmp	byte ptr [eax],	2Ah
jnz	loc_829782
mov	al, [eax+1]
cmp	al, 6Ch
jnz	short loc_829716
mov	edx, [esp+1Ch+var_C]
push	edx		; FILE *
mov	edi, ebx
call	sub_829320
add	esp, 4
jmp	short loc_829738

loc_829716:
cmp	al, 61h
jnz	short loc_829725
mov	edi, [esp+1Ch+var_C]
call	sub_829530
jmp	short loc_829738

loc_829725:
cmp	al, 6Eh
jnz	short loc_829738
mov	edi, [esp+1Ch+var_C]
mov	esi, ebx
call	sub_8295E0
mov	esi, [esp+1Ch+var_4]

loc_829738:
inc	ebp
cmp	ebp, esi
jle	loc_8296B0
cmp	esi, 1
jl	short loc_8297A3
mov	edx, esi

loc_829748:
mov	eax, [ebx+1Ch]
mov	ecx, eax
sub	ecx, [ebx+20h]
sar	ecx, 3
neg	ecx
jns	short loc_829769
lea	edi, [eax+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd

loc_829769:
add	eax, 0FFFFFFF8h
sub	edx, 1
mov	[ebx+1Ch], eax
jnz	short loc_829748
sub	eax, [ebx+20h]
pop	ebp
pop	edi
pop	esi
sar	eax, 3
pop	ebx
add	esp, 0Ch
retn

loc_829782:		; "wrong argument (\"*l\", \"*a\", \"*n\", numbe"...
push	offset aWrongArgumentL
push	ebx
call	sub_81A760
add	esp, 8
pop	ebp
pop	edi
pop	esi
pop	ebx
add	esp, 0Ch
retn

loc_829798:		; FILE *
push	edx
mov	edi, ebx
call	sub_829320
add	esp, 4

loc_8297A3:
mov	eax, [ebx+1Ch]
sub	eax, [ebx+20h]
pop	ebp
pop	edi
pop	esi
sar	eax, 3
pop	ebx
add	esp, 0Ch
retn
sub_829630 endp

align 10h



sub_8297C0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ecx, [esi+1Ch]
mov	eax, [esi+20h]
mov	edx, ecx
sub	edx, eax
test	edx, 0FFFFFFF8h
jle	short loc_8297FD
cmp	eax, ecx
jnb	short loc_8297FD
mov	eax, [eax]
cmp	eax, 7
jz	short loc_8297EA
cmp	eax, 2
jnz	short loc_8297FD

loc_8297EA:		; "wrong #1 argument (\"*l\", \"*a\", \"*n\", nu"...
push	offset aWrong1Argument
push	esi
call	sub_81A760
add	esp, 8
pop	esi
add	esp, 8
retn

loc_8297FD:
push	ebx
push	edi
mov	ecx, 1
call	sub_829000
mov	edx, [esi+1Ch]
mov	edi, [edx-4]
mov	ebx, [edx-8]
mov	eax, edx
sub	eax, [esi+20h]
lea	ecx, [edx-8]
sar	eax, 3
cmp	eax, 1
mov	[esp+14h+var_4], edi
jle	short loc_829844
lea	edi, [eax-1]
push	ebp
lea	ebx, [ebx+0]

loc_829830:
mov	ebp, [ecx-8]
mov	[ecx], ebp
mov	ebp, [ecx-4]
mov	[ecx+4], ebp
add	ecx, 0FFFFFFF8h
sub	edi, 1
jnz	short loc_829830
pop	ebp

loc_829844:
add	eax, eax
add	eax, eax
add	eax, eax
mov	ecx, eax
mov	eax, edx
sub	eax, ecx
mov	ecx, [esp+14h+var_4]
mov	[eax], ebx
mov	[eax+4], ecx
push	esi
mov	[esi+1Ch], edx
call	sub_829630
add	esp, 4
pop	edi
pop	ebx
pop	esi
add	esp, 8
retn
sub_8297C0 endp

align 10h



sub_829870 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	edx, [edi+20h]
mov	esi, [edx-8]
cmp	esi, 0Ah
jnz	short loc_829899
mov	eax, [edx-4]
mov	ecx, [eax+14h]
add	eax, 14h
cmp	ecx, 7
jnz	short loc_82989D
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_8298A9

loc_829899:
xor	ebp, ebp
jmp	short loc_8298AB

loc_82989D:
cmp	ecx, 2
jnz	short loc_8298A7
mov	eax, [eax+4]
jmp	short loc_8298A9

loc_8298A7:
xor	eax, eax

loc_8298A9:
mov	ebp, eax

loc_8298AB:
cmp	esi, 0Ah
jnz	short loc_8298E2
mov	eax, [edx-4]
add	eax, 1Ch
push	eax
push	edi
call	sub_818F90
add	esp, 8
call	__ftol2_sse
mov	ebx, eax

loc_8298C7:
mov	esi, [ebp+0]
cmp	ebx, 0FFFFFFFFh
jnz	short loc_8298E6
push	offset aAlreadyAtTheEn ; "already at the end of	the iterator"
push	edi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_8298E2:
xor	ebx, ebx
jmp	short loc_8298C7

loc_8298E6:
test	esi, esi
jnz	short loc_8298FD
push	offset aFileAlreadyClo ; "file already closed"
push	edi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_8298FD:		; FILE *
push	esi
call	sub_829320
add	esp, 4
test	eax, eax
jz	short loc_829963
test	ebx, ebx
jz	short loc_82991E
push	esi		; FILE *
call	j__fclose
add	esp, 4
mov	dword ptr [ebp+0], 0

loc_82991E:
mov	eax, [edi+1Ch]
fld	ds:flt_1431A30
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
lea	ecx, [eax+8]
mov	eax, [edi+20h]
mov	[edi+1Ch], ecx
cmp	dword ptr [eax-8], 0Ah
jnz	short loc_829947
mov	ebx, [eax-4]
add	ebx, 1Ch
jmp	short loc_829949

loc_829947:
xor	ebx, ebx

loc_829949:
lea	esi, [ecx-8]
push	esi
push	edi
call	sub_8199A0
mov	eax, [esi]
mov	[ebx], eax
mov	ecx, [esi+4]
mov	[ebx+4], ecx
add	esp, 8
mov	[edi+1Ch], esi

loc_829963:
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_829870 endp

align 10h



sub_829970 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
mov	ecx, [edx+20h]
mov	eax, [edx+1Ch]
push	esi
mov	esi, [ecx]
mov	[eax], esi
mov	ecx, [ecx+4]
mov	[eax+4], ecx
lea	ecx, [eax+8]
mov	eax, [edx+20h]
add	eax, 8
mov	[edx+1Ch], ecx
pop	esi
cmp	ecx, eax
jnb	short loc_8299AD
jmp	short loc_8299A0
align 10h

loc_8299A0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_8299A0

loc_8299AD:
fldz
push	1
push	2
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
push	offset sub_829870
push	edx
mov	[edx+1Ch], eax
call	sub_81B920
add	esp, 10h
mov	eax, 1
retn
sub_829970 endp

align 10h



sub_8299E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
push	edi
test	eax, 0FFFFFFF8h
jle	loc_829A83
push	0
push	1
push	esi
call	sub_81ABE0
mov	edi, eax
push	offset aR_3	; "r"
push	edi		; char *
call	sub_82B8D0
add	esp, 14h
test	eax, eax
jnz	short loc_829A4D
call	sub_828EB0
mov	eax, [esi+1Ch]
sub	eax, 10h
cmp	eax, [esi+20h]
jnb	short loc_829A34
xor	eax, eax
push	eax
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
retn

loc_829A34:
push	0
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch
push	eax
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
retn

loc_829A4D:
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
cmp	ecx, edx
jnb	short loc_829A6D
jmp	short loc_829A60
align 10h

loc_829A60:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_829A60

loc_829A6D:
push	ebx
push	0
push	eax
mov	ebx, edi
mov	[esi+1Ch], edx
call	sub_828F10
fld1
add	esp, 8
pop	ebx
jmp	short loc_829A8F

loc_829A83:
mov	ecx, 1
call	sub_829000
fldz

loc_829A8F:
mov	eax, [esi+1Ch]
push	1
fstp	dword ptr [eax+4]
push	2
mov	dword ptr [eax], 3
add	eax, 8
push	offset sub_829870
push	esi
mov	[esi+1Ch], eax
call	sub_81B920
add	esp, 10h
pop	edi
mov	eax, 1
pop	esi
retn
sub_8299E0 endp

align 10h



; int __cdecl sub_829AC0(char *)
sub_829AC0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+1Ch]
mov	ebx, eax
mov	eax, [esi+20h]
mov	edx, ecx
sub	edx, eax
test	edx, 0FFFFFFF8h
jnz	short loc_829AE7
mov	ecx, ebx
call	sub_829000
pop	esi
mov	eax, 1
pop	ebx
retn

loc_829AE7:
push	edi
cmp	eax, ecx
jnb	loc_829B77
mov	edx, [eax]
cmp	edx, 4
jz	short loc_829AFC
cmp	edx, 3
jnz	short loc_829B77

loc_829AFC:
cmp	eax, ecx
jb	short loc_829B04
xor	edi, edi
jmp	short loc_829B12

loc_829B04:
push	0
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch
mov	edi, eax

loc_829B12:
mov	eax, [esp+0Ch+arg_0]
push	eax		; char *
push	edi		; char *
call	sub_82B8D0
add	esp, 8
test	eax, eax
jnz	short loc_829B3F
call	sub_828EB0
push	0FFFFFFFEh
push	esi
call	sub_4E3E10
push	eax
push	esi
call	sub_81A760
add	esp, 10h
pop	edi
pop	esi
pop	ebx
retn

loc_829B3F:
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
cmp	ecx, edx
jnb	short loc_829B5D
lea	esp, [esp+0]

loc_829B50:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_829B50

loc_829B5D:
push	ebx
push	esi
xor	ecx, ecx
mov	ebx, edi
mov	[esi+1Ch], edx
call	sub_828FA0
add	esp, 8
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn

loc_829B77:		; "FILE*"
push	offset aFile_9
push	1
push	esi
call	sub_81AD30
add	esp, 0Ch
test	eax, eax
mov	eax, [esi+1Ch]
jz	short loc_829BF9
mov	ecx, eax
mov	edx, [ecx-8]
mov	[eax], edx
mov	ecx, [ecx-4]
mov	[eax+4], ecx
lea	ecx, [eax+8]
mov	eax, [esi+20h]
sub	eax, 8
mov	[esi+1Ch], ecx
cmp	dword ptr [eax], 0Ah
jnz	short loc_829BB1
mov	eax, [eax+4]
jmp	short loc_829BB7

loc_829BB1:
lea	eax, [ecx-13888h]

loc_829BB7:
add	ecx, 0FFFFFFF8h
push	ecx
push	ebx
push	eax
push	esi
call	sub_8197D0
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 8
add	esp, 10h
cmp	ecx, eax
jnb	short loc_829BED
jmp	short loc_829BE0
align 10h

loc_829BE0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_829BE0

loc_829BED:
pop	edi
mov	[esi+1Ch], eax
pop	esi
mov	eax, 1
pop	ebx
retn

loc_829BF9:
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_829C0D

loc_829C00:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_829C00

loc_829C0D:		; "wrong # 1 argument (file handle or file"...
push	offset aWrong1Argume_0
push	esi
mov	[esi+1Ch], ecx
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebx
retn
sub_829AC0 endp

align 10h



sub_829C30 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	offset aR_4	; "r"
mov	eax, 1
call	sub_829AC0
add	esp, 4
retn
sub_829C30 endp

align 10h



sub_829C50 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
push	offset aW_2	; "w"
mov	eax, 2
call	sub_829AC0
add	esp, 4
retn
sub_829C50 endp

align 10h



sub_829C70 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
add	esp, 8
cmp	eax, [esi+1Ch]
jb	short loc_829C8D
xor	edi, edi
jmp	short loc_829CAA

loc_829C8D:
mov	ecx, [eax]
cmp	ecx, 7
jnz	short loc_829C9C
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_829CA8

loc_829C9C:
cmp	ecx, 2
jnz	short loc_829CA6
mov	eax, [eax+4]
jmp	short loc_829CA8

loc_829CA6:
xor	eax, eax

loc_829CA8:
mov	edi, eax

loc_829CAA:		; "FILE*"
push	offset aFile_10
push	esi
call	sub_81A7D0
add	esp, 8
test	edi, edi
jz	short loc_829D31
push	1
push	esi
call	sub_5F24A0
add	esp, 8
test	eax, eax
jz	short loc_829D31
push	0FFFFFFFEh
push	0FFFFFFFFh
push	esi
call	sub_5F2370
add	esp, 0Ch
test	eax, eax
jz	short loc_829D31
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_829CFD
jmp	short loc_829CF0
align 10h

loc_829CF0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_829CF0

loc_829CFD:
mov	[esi+1Ch], ecx
cmp	dword ptr [edi], 0
jnz	short loc_829D1B
push	offset aClosedFile ; "closed file"
push	esi
call	sub_81C070
add	esp, 8
pop	edi
mov	eax, 1
pop	esi
retn

loc_829D1B:		; "file"
push	offset aFile_11
push	esi
call	sub_81C070
add	esp, 8
pop	edi
mov	eax, 1
pop	esi
retn

loc_829D31:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_829D4D
jmp	short loc_829D40
align 10h

loc_829D40:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_829D40

loc_829D4D:
mov	dword ptr [ecx], 0
add	ecx, 8
pop	edi
mov	[esi+1Ch], ecx
mov	eax, 1
pop	esi
retn
sub_829C70 endp

align 10h



sub_829D70 proc	near

arg_0= dword ptr  4

push	esi
push	edi
push	0		; char *
push	0		; char *
call	__tempnam
mov	edi, eax
push	offset aWb_0	; "wb+"
push	edi		; char *
call	sub_82B8D0
mov	esi, [esp+18h+arg_0]
add	esp, 10h
test	eax, eax
jnz	short loc_829DAF
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
call	sub_828EB0
pop	edi
mov	eax, 3
pop	esi
retn

loc_829DAF:
push	ebx
push	3
push	eax
mov	ebx, edi
call	sub_828F10
add	esp, 8
pop	ebx
pop	edi
mov	eax, 1
pop	esi
retn
sub_829D70 endp

align 10h



sub_829DD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	0
push	offset aR_5	; "r"
push	2
push	esi
mov	edi, eax
call	sub_81AE20
push	eax		; char *
push	edi		; char *
call	sub_82B8D0
add	esp, 24h
test	eax, eax
jnz	short loc_829E1B
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
call	sub_828EB0
pop	edi
mov	eax, 3
pop	esi
retn

loc_829E1B:
push	ebx
push	0
push	eax
mov	ebx, edi
call	sub_828F10
add	esp, 8
pop	ebx
pop	edi
mov	eax, 1
pop	esi
retn
sub_829DD0 endp

align 10h



sub_829E40 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
push	offset aFile_12	; "FILE*"
push	1
push	esi
call	sub_81AD30
mov	edi, [eax]
push	offset off_1682054
push	offset aCur	; "cur"
push	2
push	esi
mov	[esp+30h+var_4], eax
call	sub_81AEA0
push	0
push	3
push	esi
mov	ebx, eax
call	sub_81ADC0
add	esp, 28h
mov	ebp, eax
test	edi, edi
jnz	short loc_829E97
push	offset aTryToSeekAClos ; "try to seek a	closed file"
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn

loc_829E97:		; FILE *
push	edi
call	_clearerr
mov	eax, ds:dword_1467E90[ebx*4]
push	eax		; int
push	ebp		; __int32
push	edi		; FILE *
call	_fseek
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
add	esp, 10h
cmp	ecx, edx
jnb	short loc_829ECD
lea	esp, [esp+0]

loc_829EC0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_829EC0

loc_829ECD:
mov	[esi+1Ch], edx
test	eax, eax
jz	short loc_829EF7
mov	edi, [esp+14h+var_4]
mov	dword ptr [edx], 0
add	edx, 8
add	edi, 4
mov	[esi+1Ch], edx
call	sub_828EB0
pop	edi
pop	esi
pop	ebp
mov	eax, 3
pop	ebx
pop	ecx
retn

loc_829EF7:		; FILE *
push	edi
call	_ftell
mov	[esp+18h+var_4], eax
mov	eax, [esi+1Ch]
fild	[esp+18h+var_4]
add	esp, 4
mov	dword ptr [eax], 3
fstp	dword ptr [eax+4]
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
pop	ecx
retn
sub_829E40 endp

align 10h



sub_829F30 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	offset aFile_13	; "FILE*"
push	1
push	esi
call	sub_81AD30
push	offset off_1682064
push	0
mov	ebx, eax
mov	edi, [ebx]
push	2
push	esi
call	sub_81AEA0
push	200h
push	3
push	esi
mov	ebp, eax
call	sub_81ADC0
add	esp, 28h
test	edi, edi
jnz	short loc_829F81
push	offset aFileAlreadyC_0 ; "file already closed"
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_829F81:
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
cmp	ecx, edx
jnb	short loc_829F9D
jmp	short loc_829F90
align 10h

loc_829F90:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_829F90

loc_829F9D:		; int
push	eax
mov	[esi+1Ch], edx
mov	eax, ds:dword_1467E9C[ebp*4]
push	eax		; int
push	0		; int
push	edi		; FILE *
call	unknown_libname_102 ; Microsoft	VisualC	2-9/net	runtime
add	esp, 10h
test	eax, eax
mov	eax, [esi+1Ch]
jz	short loc_829FD9
mov	dword ptr [eax], 0
add	eax, 8
lea	edi, [ebx+4]
mov	[esi+1Ch], eax
call	sub_828EB0
pop	edi
pop	esi
pop	ebp
mov	eax, 3
pop	ebx
retn

loc_829FD9:
mov	dword ptr [eax+4], 1
mov	dword ptr [eax], 1
add	eax, 8
pop	edi
mov	[esi+1Ch], eax
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_829F30 endp

align 10h



sub_82A000 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	offset aFile_14	; "FILE*"
push	1
push	esi
call	sub_81AD30
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
add	esp, 0Ch
cmp	ecx, edx
jnb	short loc_82A02D
nop

loc_82A020:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_82A020

loc_82A02D:
mov	[esi+1Ch], edx
cmp	dword ptr [eax], 0
jnz	short loc_82A04C
push	0Dh
push	offset aFileClosed ; "file (closed)"
push	esi
call	sub_81B9D0
add	esp, 0Ch
mov	eax, 1
pop	esi
retn

loc_82A04C:		; ArgList
push	eax
push	offset aFileP	; "file	(%p)"
push	esi		; int
call	sub_81C0C0
add	esp, 0Ch
mov	eax, 1
pop	esi
retn
sub_82A000 endp

align 10h



sub_82A070 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
push	offset off_1682074
push	offset aR_8	; "r"
push	2
push	esi
mov	edi, eax
call	sub_81AEA0
mov	eax, off_1682074[eax*4]
push	eax		; char *
push	edi		; char *
call	__popen
add	esp, 24h
test	eax, eax
jnz	short loc_82A0C5
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
call	sub_828EB0
pop	edi
mov	eax, 3
pop	esi
retn

loc_82A0C5:
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
cmp	ecx, edx
jnb	short loc_82A0DD
nop

loc_82A0D0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_82A0D0

loc_82A0DD:
push	ebx
push	1
push	eax
mov	ebx, edi
mov	[esi+1Ch], edx
call	sub_828F10
add	esp, 8
pop	ebx
pop	edi
mov	eax, 1
pop	esi
retn
sub_82A070 endp

align 10h



sub_82A100 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	offset aFile_15	; "FILE*"
push	esi
call	sub_81A7F0
push	7
push	offset a__index_2 ; "__index"
push	esi
call	sub_81B9D0
mov	eax, [esi+1Ch]
mov	ecx, eax
mov	edx, [ecx-10h]
mov	[eax], edx
mov	ecx, [ecx-0Ch]
mov	[eax+4], ecx
add	eax, 8
lea	edx, [eax-8]
push	edx
lea	ecx, [eax-10h]
mov	[esi+1Ch], eax
push	ecx
add	eax, 0FFFFFFE8h
push	eax
push	esi
call	sub_8194A0
add	dword ptr [esi+1Ch], 0FFFFFFF0h
push	1		; int
push	offset off_1467BC0 ; int
push	0		; char *
push	esi		; int
call	sub_81A860
push	0
push	3
mov	edi, 0FFFFFFF8h
add	[esi+1Ch], edi
push	esi
call	sub_81BD50
add	esp, 40h
push	2
call	sub_7A1F02
add	eax, 20h
push	eax
mov	ebx, offset aStdout ; "stdout"
call	sub_828F10
mov	eax, [esi+1Ch]
lea	edx, [eax-8]
push	edx
push	2
add	eax, 0FFFFFFF0h
push	eax
push	esi
call	sub_8197D0
add	[esi+1Ch], edi
add	esp, 18h
push	2
call	sub_7A1F02
push	eax
mov	ebx, offset aStdin ; "stdin"
call	sub_828F10
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
push	1
add	eax, 0FFFFFFF0h
push	eax
push	esi
call	sub_8197D0
add	[esi+1Ch], edi
add	esp, 18h
push	2
call	sub_7A1F02
add	eax, 40h
push	eax
mov	ebx, offset aStderr ; "stderr"
call	sub_828F10
mov	eax, [esi+1Ch]
lea	edx, [eax-8]
push	edx
push	3
add	eax, 0FFFFFFF0h
push	eax
push	esi
call	sub_8197D0
add	[esi+1Ch], edi
mov	eax, [esi+20h]
sub	eax, 8
add	esp, 18h
cmp	dword ptr [eax], 0Ah
jnz	short loc_82A206
mov	ebx, [eax+4]
jmp	short loc_82A20F

loc_82A206:
mov	ebx, [esi+1Ch]
sub	ebx, 13888h

loc_82A20F:
mov	edi, [esi+1Ch]
sub	edi, 8
push	edi
push	esi
call	sub_8199A0
mov	eax, [edi]
push	1		; int
mov	[ebx], eax
mov	ecx, [edi+4]
push	offset off_1467B10 ; int
push	offset aIo	; "io"
mov	[ebx+4], ecx
push	esi		; int
mov	[esi+1Ch], edi
call	sub_81A860
mov	eax, [esi+20h]
sub	eax, 8
add	esp, 18h
cmp	dword ptr [eax], 0Ah
jnz	short loc_82A24E
mov	eax, [eax+4]
jmp	short loc_82A256

loc_82A24E:
mov	eax, [esi+1Ch]
sub	eax, 13888h

loc_82A256:
mov	edi, [esi+1Ch]
push	edi
push	2
push	eax
push	esi
call	sub_819A80
push	offset aStdout_0 ; "stdout"
push	0FFFFFFFEh
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_5F2430
mov	eax, [esi+20h]
sub	eax, 8
add	esp, 1Ch
cmp	dword ptr [eax], 0Ah
jnz	short loc_82A289
mov	eax, [eax+4]
jmp	short loc_82A291

loc_82A289:
mov	eax, [esi+1Ch]
sub	eax, 13888h

loc_82A291:
mov	edi, [esi+1Ch]
push	edi
push	1
push	eax
push	esi
call	sub_819A80
push	offset aStdin_0	; "stdin"
push	0FFFFFFFEh
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_5F2430
mov	eax, [esi+20h]
sub	eax, 8
add	esp, 1Ch
cmp	dword ptr [eax], 0Ah
jnz	short loc_82A2C4
mov	eax, [eax+4]
jmp	short loc_82A2CC

loc_82A2C4:
mov	eax, [esi+1Ch]
sub	eax, 13888h

loc_82A2CC:
mov	edi, [esi+1Ch]
push	edi
push	3
push	eax
push	esi
call	sub_819A80
push	offset aStderr_0 ; "stderr"
push	0FFFFFFFEh
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_5F2430
add	esp, 1Ch
pop	edi
pop	esi
mov	eax, 1
pop	ebx
retn
sub_82A100 endp

align 10h



sub_82A300 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	ecx, [esp+4+arg_4]
mov	edx, [esp+4+arg_0]
lea	eax, [esp+4+var_4]
push	eax
push	ecx
push	edx
call	sub_4328D0
add	esp, 0Ch
cmp	[esp+4+var_4], 0
jnz	short loc_82A33A ; default
			; jumptable 0082A32E cases 1,2,4
mov	ecx, [eax]
add	ecx, 0FFFFFFFEh
cmp	ecx, 8		; switch 9 cases
ja	short loc_82A33A ; default
			; jumptable 0082A32E cases 1,2,4
movzx	ecx, ds:byte_82A348[ecx]
jmp	ds:off_82A340[ecx*4] ; switch jump

loc_82A335:		; jumptable 0082A32E cases 0,3,5-8
mov	eax, [eax+4]
pop	ecx
retn

loc_82A33A:		; default
xor	eax, eax	; jumptable 0082A32E cases 1,2,4
pop	ecx
retn
sub_82A300 endp

align 10h
off_82A340 dd offset loc_82A335	; jump table for switch	statement
dd offset loc_82A33A
byte_82A348 db	    0,	   1,	  1,	 0 ; indirect table for	switch statement
db	1,     0,     0,     0
db	0
align 10h



sub_82A360 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+1Ch]
mov	ecx, [ebx+20h]
mov	edx, eax
sub	edx, ecx
test	edx, 0FFFFFFF8h
jle	loc_82A434
add	ecx, 8
cmp	eax, ecx
jnb	short loc_82A38F

loc_82A382:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_82A382

loc_82A38F:
push	1
push	ebx
mov	[ebx+1Ch], ecx
call	sub_81BDF0
mov	eax, [ebx+20h]
mov	ecx, [ebx+1Ch]
add	esp, 8
cmp	eax, ecx
jnb	short loc_82A402
cmp	dword ptr [eax], 1
jnz	short loc_82A3D8
cmp	eax, ecx
jnb	short loc_82A402
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_82A402
cmp	ecx, 1
jnz	short loc_82A3C1
cmp	dword ptr [eax+4], 0
jz	short loc_82A402

loc_82A3C1:
push	5
push	5
push	ebx
call	sub_81BD50
push	2
push	ebx
call	sub_481E90
add	esp, 14h
jmp	short loc_82A402

loc_82A3D8:
cmp	eax, ecx
jnb	short loc_82A402
mov	eax, [eax]
cmp	eax, 7
jz	short loc_82A3E8
cmp	eax, 2
jnz	short loc_82A402

loc_82A3E8:
push	1
push	ebx
call	sub_5F24A0
add	esp, 8
test	eax, eax
jz	short loc_82A402
push	2
push	ebx
call	sub_481E90
add	esp, 8

loc_82A402:
mov	eax, [ebx+1Ch]
mov	ecx, eax
sub	ecx, [ebx+20h]
sar	ecx, 3
neg	ecx
jns	short loc_82A427
push	esi
push	edi
lea	edi, [eax+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd
pop	edi
pop	esi

loc_82A427:
add	eax, 0FFFFFFF8h
mov	[ebx+1Ch], eax
mov	eax, 1
pop	ebx
retn

loc_82A434:
push	1
push	ebx
call	sub_81BDF0
add	esp, 8
mov	eax, 1
pop	ebx
retn
sub_82A360 endp

align 10h



sub_82A450 proc	near

var_238= dword ptr -238h
var_234= byte ptr -234h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 238h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+238h+var_4], eax
push	esi
mov	esi, [esp+23Ch+arg_0]
push	edi
push	1
push	esi
call	sub_81AA40
push	5
push	2
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 10h
add	esp, 14h
cmp	ecx, eax
jnb	short loc_82A49D
nop

loc_82A490:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_82A490

loc_82A49D:
mov	ecx, [esi+20h]
mov	[esi+1Ch], eax
cmp	ecx, eax
jnb	loc_82A5C0
mov	edx, [ecx]
cmp	edx, 9
jz	loc_82A5C0
cmp	edx, 0Ah
jz	loc_82A5C0
cmp	edx, 3
jnz	loc_82A5C0
cmp	ecx, eax
jnb	short loc_82A4E7
push	ecx
push	esi
call	sub_818F90
fstp	[esp+248h+var_238]
fldz
add	esp, 8
fcomp	[esp+240h+var_238]
fnstsw	ax
test	ah, 44h
jp	short loc_82A53E

loc_82A4E7:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 8
mov	[eax+4], esi
lea	ecx, [eax+8]
mov	[esi+1Ch], ecx
mov	edx, [ecx-8]
lea	eax, [ecx-8]
mov	[ecx-18h], edx
mov	edx, [eax+4]
mov	[ecx-14h], edx
lea	ecx, [eax-10h]
mov	[esi+1Ch], eax
cmp	ecx, [esi+20h]
jb	short loc_82A521
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	esi
call	sub_8191A0
add	esp, 0Ch

loc_82A521:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
xor	eax, eax
pop	esi
mov	ecx, [esp+238h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 238h
retn

loc_82A53E:
push	1
push	esi
call	sub_81AB60
mov	edi, eax
xor	eax, eax
test	edi, edi
setnl	al
push	offset aLevelMustBeNon ; "level	must be	non-negative"
push	1
push	eax
push	esi
call	sub_81AB40
lea	ecx, [esp+258h+var_234]
push	ecx
push	edi
push	esi
call	sub_81D5E0
add	esp, 24h
test	eax, eax
jnz	short loc_82A596
push	edi
push	offset aInvalidLevelD ;	"Invalid level %d"
push	esi
call	sub_81A760
add	esp, 0Ch
pop	edi
pop	esi
mov	ecx, [esp+238h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 238h
retn

loc_82A596:
lea	edx, [esp+240h+var_234]
push	edx
push	offset asc_14680C4 ; "f"
push	esi
call	sub_81D440
mov	eax, [esi+1Ch]
mov	edx, [eax-8]
mov	ecx, [esi+20h]
add	esp, 0Ch
sub	eax, 8
mov	[ecx], edx
mov	edx, [eax+4]
mov	[ecx+4], edx
mov	[esi+1Ch], eax

loc_82A5C0:
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
cmp	eax, ecx
jnb	short loc_82A5D8
add	ecx, 0FFFFFFF8h
push	ecx
push	eax
push	esi
call	sub_8191A0
add	esp, 0Ch

loc_82A5D8:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	ecx, [esp+240h+var_4]
pop	edi
pop	esi
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 238h
retn
sub_82A450 endp

align 10h



sub_82A600 proc	near

var_234= byte ptr -234h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+234h+var_4], eax
push	esi
mov	esi, [esp+238h+arg_0]
mov	ecx, [esi+1Ch]
mov	eax, [esi+20h]
mov	edx, ecx
sub	edx, eax
push	edi
test	edx, 0FFFFFFF8h
jle	loc_82A76E
cmp	eax, ecx
jnb	loc_82A733
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	loc_82A733
mov	eax, [esi+20h]
cmp	eax, [esi+1Ch]
jb	short loc_82A659
xor	edi, edi
jmp	short loc_82A66A

loc_82A659:
push	eax
push	esi
call	sub_818F90
add	esp, 8
call	__ftol2_sse
mov	edi, eax

loc_82A66A:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
cmp	eax, ecx
jnb	short loc_82A681

loc_82A674:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_82A674

loc_82A681:
mov	[esi+1Ch], ecx
test	edi, edi
jnz	short loc_82A69C
mov	dword ptr [ecx], 8
mov	[ecx+4], esi
add	ecx, 8
mov	[esi+1Ch], ecx
jmp	loc_82A7BA

loc_82A69C:
xor	eax, eax
test	edi, edi
setnl	al
push	offset aLevelMustBeN_0 ; "level	must be	non-negative"
push	1
push	eax
push	esi
call	sub_81AB40
lea	ecx, [esp+24Ch+var_234]
push	ecx
push	edi
push	esi
call	sub_81D5E0
add	esp, 1Ch
test	eax, eax
jnz	short loc_82A6EA
push	edi
push	offset aInvalidLevel_0 ; "invalid level	%d"
push	esi
call	sub_81A760
add	esp, 0Ch
pop	edi
pop	esi
mov	ecx, [esp+234h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn

loc_82A6EA:
lea	edx, [esp+23Ch+var_234]
push	edx
push	offset asc_14680F8 ; "f"
push	esi
call	sub_81D440
push	0FFFFFFFFh
push	esi
call	sub_432B70
add	esp, 14h
test	eax, eax
jz	loc_82A7BA
push	edi
push	offset aNoFunctionEnvi ; "no function environment for tail call	a"...
push	esi
call	sub_81A760
add	esp, 0Ch
pop	edi
pop	esi
mov	ecx, [esp+234h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn

loc_82A733:
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
cmp	eax, ecx
jbe	short loc_82A744
cmp	dword ptr [ecx], 9
jz	short loc_82A7BA
cmp	eax, ecx

loc_82A744:
jnb	short loc_82A75D
jmp	short loc_82A750
align 10h

loc_82A750:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_82A750

loc_82A75D:
mov	dword ptr [ecx], 8
mov	[ecx+4], esi
add	ecx, 8
mov	[esi+1Ch], ecx
jmp	short loc_82A7BA

loc_82A76E:
lea	eax, [esp+23Ch+var_234]
push	eax
push	1
push	esi
call	sub_81D5E0
add	esp, 0Ch
test	eax, eax
jnz	short loc_82A7A7
push	offset aInvalidLevel ; "Invalid	level"
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
mov	ecx, [esp+234h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn

loc_82A7A7:
lea	ecx, [esp+23Ch+var_234]
push	ecx
push	offset asc_1468140 ; "f"
push	esi
call	sub_81D440
add	esp, 0Ch

loc_82A7BA:
mov	eax, [esi+20h]
mov	edi, [esi+1Ch]
cmp	eax, edi
jb	short loc_82A7CC
mov	dword ptr [edi], 0
jmp	short loc_82A7D7

loc_82A7CC:
push	edi
push	eax
push	esi
call	sub_819140
add	esp, 0Ch

loc_82A7D7:
mov	ecx, [esp+23Ch+var_4]
add	edi, 8
mov	[esi+1Ch], edi
pop	edi
pop	esi
xor	ecx, esp
mov	eax, 1
call	sub_7999A3
add	esp, 234h
retn
sub_82A600 endp

align 10h



sub_82A800 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	eax, 8
add	esp, 0Ch
cmp	eax, ecx
jnb	short loc_82A82D
cmp	dword ptr [eax], 5
jz	short loc_82A831
cmp	eax, ecx
jnb	short loc_82A82D
cmp	dword ptr [eax], 0
jz	short loc_82A831

loc_82A82D:
xor	eax, eax
jmp	short loc_82A836

loc_82A831:
mov	eax, 1

loc_82A836:		; "nil or table	expected"
push	offset aNilOrTableEx_0
push	2
push	eax
push	esi
call	sub_81AB40
push	offset a__metatable ; "__metatable"
push	1
push	esi
call	sub_819D70
add	esp, 1Ch
test	eax, eax
jz	short loc_82A868
push	offset aCannotChangeTh ; "cannot change	the metatable"
push	esi
call	sub_81A760
add	esp, 8
pop	esi
retn

loc_82A868:
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
add	ecx, 10h
cmp	eax, ecx
jnb	short loc_82A882

loc_82A875:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_82A875

loc_82A882:
mov	eax, [esi+20h]
mov	[esi+1Ch], ecx
cmp	eax, ecx
jnb	short loc_82A89E
add	ecx, 0FFFFFFF8h
push	ecx
push	eax
push	esi
call	sub_8192D0
add	esp, 0Ch
add	dword ptr [esi+1Ch], 0FFFFFFF8h

loc_82A89E:
mov	eax, 1
pop	esi
retn
sub_82A800 endp

align 10h



sub_82A8B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	offset off_14682E0
push	offset aCollect	; "collect"
push	1
push	esi
call	sub_81AEA0
push	0FFFFFFFFh
push	2
push	esi
mov	edi, eax
call	sub_81ADC0
push	eax
mov	eax, ds:dword_14682BC[edi*4]
push	eax
push	esi
call	sub_81B6D0
add	esp, 28h
cmp	ds:dword_14682BC[edi*4], 5
mov	[esp+0Ch+var_4], eax
jz	short loc_82A914
mov	eax, [esi+1Ch]
fild	[esp+0Ch+var_4]
mov	dword ptr [eax], 3
add	eax, 8
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
pop	edi
mov	eax, 1
pop	esi
pop	ecx
retn

loc_82A914:
mov	ecx, [esi+1Ch]
mov	[ecx+4], eax
mov	dword ptr [ecx], 1
add	ecx, 8
pop	edi
mov	[esi+1Ch], ecx
mov	eax, 1
pop	esi
pop	ecx
retn
sub_82A8B0 endp

align 10h



sub_82A930 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	2
push	esi
call	sub_81ADC0
mov	ecx, [esi+1Ch]
mov	edi, eax
mov	eax, [esi+20h]
add	eax, 8
add	esp, 0Ch
cmp	ecx, eax
jnb	short loc_82A95F

loc_82A952:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_82A952

loc_82A95F:
mov	[esi+1Ch], eax
test	edi, edi
jle	short loc_82A9AB
mov	ecx, [esi+20h]
cmp	ecx, eax
jnb	short loc_82A9AB
mov	ecx, [ecx]
cmp	ecx, 4
jz	short loc_82A979
cmp	ecx, 3
jnz	short loc_82A9AB

loc_82A979:
push	edi
push	esi
call	sub_81A2B0
push	1
push	esi
call	sub_4E3E50
push	1
push	offset asc_14681E0 ; "\n"
push	esi
call	sub_81B9D0
push	0Ah
dec	edi
push	edi
push	esi
push	esi
call	sub_81A360
push	4
push	esi
call	sub_81BB60
add	esp, 34h

loc_82A9AB:
push	esi
call	sub_81C0E0
add	esp, 4
pop	edi
pop	esi
retn
sub_82A930 endp

align 10h



sub_82A9C0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
mov	edi, [esi+1Ch]
sub	edi, [esi+20h]
push	1
push	esi
sar	edi, 3
call	sub_81AA40
push	0
push	0FFFFFFFFh
dec	edi
push	edi
push	esi
call	sub_81C700
mov	ecx, [esi+1Ch]
add	esp, 18h
neg	eax
sbb	eax, eax
inc	eax
mov	[ecx+4], eax
mov	dword ptr [ecx], 1
lea	eax, [ecx+8]
mov	ecx, eax
sub	ecx, [esi+20h]
lea	edx, [eax-8]
sar	ecx, 3
cmp	ecx, 1
mov	[esi+1Ch], eax
mov	edi, [edx]
mov	ebx, [edx+4]
jle	short loc_82AA36
push	ebp
lea	ebp, [ecx-1]
mov	[esp+10h+arg_0], ebp
jmp	short loc_82AA20
align 10h

loc_82AA20:
mov	ebp, [edx-8]
mov	[edx], ebp
mov	ebp, [edx-4]
mov	[edx+4], ebp
add	edx, 0FFFFFFF8h
sub	[esp+10h+arg_0], 1
jnz	short loc_82AA20
pop	ebp

loc_82AA36:
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
mov	edx, ecx
mov	ecx, eax
sub	ecx, edx
mov	[ecx], edi
mov	[ecx+4], ebx
mov	[esi+1Ch], eax
sub	eax, [esi+20h]
pop	edi
pop	esi
sar	eax, 3
pop	ebx
retn
sub_82A9C0 endp

align 10h



sub_82AA60 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	1
push	esi
call	sub_81AA40
push	2
push	esi
call	sub_81AA40
mov	ecx, [esi+1Ch]
mov	edi, [ecx-8]
mov	ebx, [ecx-4]
mov	eax, ecx
sub	eax, [esi+20h]
lea	edx, [ecx-8]
sar	eax, 3
add	esp, 10h
cmp	eax, 1
jle	short loc_82AAB6
push	ebp
lea	ebp, [eax-1]
mov	[esp+10h+arg_0], ebp
jmp	short loc_82AAA0
align 10h

loc_82AAA0:
mov	ebp, [edx-8]
mov	[edx], ebp
mov	ebp, [edx-4]
mov	[edx+4], ebp
add	edx, 0FFFFFFF8h
sub	[esp+10h+arg_0], 1
jnz	short loc_82AAA0
pop	ebp

loc_82AAB6:
add	eax, eax
add	eax, eax
add	eax, eax
push	0FFFFFFFEh
mov	edx, eax
mov	eax, ecx
push	0FFFFFFFFh
sub	eax, edx
push	0
mov	[eax], edi
mov	[eax+4], ebx
push	esi
mov	[esi+1Ch], ecx
call	sub_81C700
mov	ecx, [esi+1Ch]
mov	dword ptr [ecx], 1
add	esp, 10h
neg	eax
sbb	eax, eax
add	ecx, 8
inc	eax
mov	[ecx-4], eax
mov	[esi+1Ch], ecx
mov	eax, [ecx-10h]
mov	edx, [ecx-0Ch]
mov	[ecx-18h], eax
lea	eax, [ecx-8]
mov	[ecx-14h], edx
mov	edx, [eax]
mov	[ecx-10h], edx
mov	edx, [eax+4]
mov	[ecx-0Ch], edx
mov	edx, [ecx]
mov	ecx, [ecx+4]
mov	[eax], edx
mov	[eax+4], ecx
mov	[esi+1Ch], eax
mov	edi, [eax-10h]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-8], edi
mov	edi, [eax-0Ch]
mov	[eax-4], edi
mov	[eax-10h], ecx
mov	[eax-0Ch], edx
mov	[esi+1Ch], eax
sub	eax, [esi+20h]
pop	edi
pop	esi
sar	eax, 3
pop	ebx
retn
sub_82AA60 endp

align 10h



sub_82AB40 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	ecx, [esi+1Ch]
sub	ecx, [esi+20h]
xor	eax, eax
test	ecx, 0FFFFFFF8h
jle	short loc_82AB80
push	eax
push	1
push	esi
call	sub_81ABE0
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
add	esp, 0Ch
cmp	ecx, edx
jnb	short loc_82AB7D
jmp	short loc_82AB70
align 10h

loc_82AB70:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_82AB70

loc_82AB7D:
mov	[esi+1Ch], edx

loc_82AB80:
push	eax
push	esi
call	sub_81A010
add	esp, 8
test	eax, eax
jz	short loc_82AB97
push	esi
call	sub_81C0E0
add	esp, 4

loc_82AB97:
push	0FFFFFFFFh
push	0
push	esi
call	sub_81C6E0
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
add	esp, 0Ch
sar	eax, 3
pop	esi
retn
sub_82AB40 endp

align 10h



sub_82ABB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	0
push	0
push	1
push	esi
call	sub_81AE20
mov	ecx, [esi+1Ch]
mov	edx, [esi+20h]
add	esp, 10h
cmp	ecx, edx
jnb	short loc_82ABDD
mov	edi, edi

loc_82ABD0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, edx
jb	short loc_82ABD0

loc_82ABDD:
push	eax
push	esi
mov	[esi+1Ch], edx
call	sub_81A010
add	esp, 8
test	eax, eax
jz	short loc_82AC21
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	ecx, [eax-8]
mov	edx, [eax-4]
push	edi
mov	edi, [eax-10h]
mov	[eax-8], edi
mov	edi, [eax-0Ch]
mov	[eax-4], edi
mov	[eax-10h], ecx
mov	[eax-0Ch], edx
mov	[esi+1Ch], eax
pop	edi
mov	eax, 2
pop	esi
retn

loc_82AC21:
mov	eax, 1
pop	esi
retn
sub_82ABB0 endp

align 10h



sub_82AC30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	offset aTooManyNestedF ; "too many nested functions"
push	2
push	esi
call	sub_81AA90
mov	edi, [esi+1Ch]
mov	ebp, [esp+1Ch+arg_4]
mov	eax, [ebp+4]
push	edi
push	eax
lea	ebx, [esi+38h]
push	ebx
push	esi
call	sub_819A80
push	1
push	0
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_81C6E0
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
add	esp, 28h
cmp	eax, ecx
jb	short loc_82AC90
mov	edx, [eax]
cmp	edx, 9
jz	short loc_82AC90
cmp	edx, 0Ah
jz	short loc_82AC90
test	edx, edx
jz	short loc_82ACDE
cmp	edx, 4
jz	short loc_82ACA5

loc_82AC90:		; "reader function must	return a string"
push	offset aReaderFunction
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_82ACA5:
cmp	eax, ecx
jnb	short loc_82ACAD
xor	edi, edi
jmp	short loc_82ACBE

loc_82ACAD:
mov	ecx, [esp+10h+arg_8]
push	ecx
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch
mov	edi, eax

loc_82ACBE:
mov	edx, [esi+1Ch]
mov	eax, [ebp+0]
sub	edx, 8
push	edx
push	eax
push	ebx
push	esi
call	sub_8197D0
add	esp, 10h
add	dword ptr [esi+1Ch], 0FFFFFFF8h
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
retn

loc_82ACDE:
mov	ecx, [esp+10h+arg_8]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [ecx], 0
xor	eax, eax
pop	ebx
retn
sub_82AC30 endp

align 10h



sub_82ACF0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	0
push	offset aLoad	; "=(load)"
push	2
push	esi
call	sub_81AE20
push	6
push	1
push	esi
mov	edi, eax
call	sub_81ACD0
push	offset unk_1467EAE
push	esi
call	sub_81C070
push	0FFFFD8F0h
push	esi
call	sub_81A0E0
mov	ecx, [esi+20h]
mov	[esp+3Ch+var_8], eax
mov	eax, [esi+1Ch]
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
add	eax, 8
push	0FFFFD8F0h
push	esi
mov	[esi+1Ch], eax
call	sub_81A0E0
push	edi
lea	edx, [esp+48h+var_8]
push	edx
push	offset sub_82AC30
push	esi
mov	[esp+54h+var_4], eax
call	sub_81C340
add	esp, 44h
mov	edi, eax
mov	eax, [esp+10h+var_8]
push	eax
push	0FFFFD8F0h
push	esi
call	sub_81A200
mov	ecx, [esp+1Ch+var_4]
push	ecx
push	0FFFFD8F0h
push	esi
call	sub_81A200
add	esp, 18h
test	edi, edi
jnz	short loc_82AD99
lea	eax, [edi+1]
pop	edi
pop	esi
add	esp, 8
retn

loc_82AD99:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	edi, [eax-10h]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-8], edi
mov	edi, [eax-0Ch]
mov	[eax-4], edi
mov	[eax-10h], ecx
mov	[eax-0Ch], edx
mov	[esi+1Ch], eax
pop	edi
mov	eax, 2
pop	esi
add	esp, 8
retn
sub_82ACF0 endp

align 10h



sub_82ADD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
push	esi
call	sub_81B0F0
add	esp, 10h
pop	esi
retn
sub_82ADD0 endp

align 10h



sub_82ADF0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	dword ptr [eax-8], 0Ah
jnz	short loc_82AE13
mov	ecx, [eax-4]
add	ecx, 14h
jmp	short loc_82AE15

loc_82AE13:
xor	ecx, ecx

loc_82AE15:
mov	edx, [ecx]
mov	eax, [esi+1Ch]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	ecx, [esi+20h]
add	eax, 8
mov	[esi+1Ch], eax
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	dword ptr [eax+8], 0
add	eax, 10h
mov	[esi+1Ch], eax
mov	eax, 3
pop	esi
retn
sub_82ADF0 endp

align 10h



sub_82AE50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	dword ptr [eax-8], 0Ah
jnz	short loc_82AE73
mov	ecx, [eax-4]
add	ecx, 14h
jmp	short loc_82AE75

loc_82AE73:
xor	ecx, ecx

loc_82AE75:
mov	edx, [ecx]
mov	eax, [esi+1Ch]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	ecx, [esi+20h]
add	eax, 8
mov	[esi+1Ch], eax
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	dword ptr [eax+0Ch], 0
mov	dword ptr [eax+8], 1
add	eax, 10h
mov	[esi+1Ch], eax
mov	eax, 3
pop	esi
retn
sub_82AE50 endp




sub_82AEB0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	dword ptr [eax-8], 0Ah
jnz	short loc_82AED3
mov	ecx, [eax-4]
add	ecx, 14h
jmp	short loc_82AED5

loc_82AED3:
xor	ecx, ecx

loc_82AED5:
mov	edx, [ecx]
fldz
mov	eax, [esi+1Ch]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
mov	ecx, [esi+20h]
add	eax, 8
mov	[esi+1Ch], eax
mov	edx, [ecx]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
fstp	dword ptr [eax+0Ch]
mov	dword ptr [eax+8], 3
add	eax, 10h
mov	[esi+1Ch], eax
mov	eax, 3
pop	esi
retn
sub_82AEB0 endp

align 10h



sub_82AF10 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
add	esp, 8
cmp	eax, [esi+1Ch]
jb	short loc_82AF2D
or	eax, 0FFFFFFFFh
jmp	short loc_82AF3E

loc_82AF2D:
mov	eax, [eax]
cmp	eax, 9
jz	short loc_82AF39
cmp	eax, 0Ah
jnz	short loc_82AF3E

loc_82AF39:
mov	eax, 6

loc_82AF3E:
push	eax
push	esi
call	sub_81BA90
push	eax
push	esi
call	sub_81C070
add	esp, 10h
mov	eax, 1
pop	esi
retn
sub_82AF10 endp

align 10h



sub_82AF60 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
push	5
push	1
push	esi
call	sub_81ACD0
push	1
push	2
push	esi
call	sub_81ADC0
mov	edi, eax
mov	eax, [esi+20h]
add	esp, 18h
mov	[esp+10h+arg_0], edi
cmp	eax, [esi+1Ch]
jb	short loc_82AF91
xor	eax, eax
jmp	short loc_82AF9B

loc_82AF91:
push	eax
push	esi
call	sub_819890
add	esp, 8

loc_82AF9B:
push	eax
push	3
push	esi
call	sub_81ADC0
mov	ebx, eax
sub	eax, edi
mov	[esp+1Ch+var_4], eax
push	0
add	eax, 2
push	eax
push	esi
call	sub_81AA90
add	esp, 18h
cmp	edi, ebx
jg	short loc_82AFEE
push	ebp

loc_82AFC0:
mov	ebp, [esi+1Ch]
mov	eax, [esi+20h]
push	ebp
push	edi
push	eax
push	esi
call	sub_819A80
add	ebp, 8
inc	edi
add	esp, 10h
cmp	edi, ebx
mov	[esi+1Ch], ebp
jle	short loc_82AFC0
cmp	ebx, [esp+14h+arg_0]
pop	ebp
jl	short loc_82AFEE
mov	eax, [esp+10h+var_4]
pop	edi
pop	esi
inc	eax
pop	ebx
pop	ecx
retn

loc_82AFEE:
pop	edi
pop	esi
xor	eax, eax
pop	ebx
pop	ecx
retn
sub_82AF60 endp

align 10h



sub_82B000 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
add	esp, 8
cmp	eax, [esi+1Ch]
jnb	short loc_82B032
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_82B032
cmp	ecx, 1
jnz	short loc_82B02B
cmp	dword ptr [eax+4], 0
jz	short loc_82B032

loc_82B02B:
mov	edi, 1
jmp	short loc_82B034

loc_82B032:
xor	edi, edi

loc_82B034:
push	0
push	offset aAssertionFai_1 ; "assertion failed"
push	2
push	esi
call	sub_81AE20
add	esp, 10h
mov	ebx, eax
test	edi, edi
jnz	short loc_82B068
push	ebx
push	esi
call	sub_795DC0
add	esp, 8
test	eax, eax
jnz	short loc_82B068
push	ebx
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
pop	ebx
retn

loc_82B068:
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
pop	edi
pop	esi
sar	eax, 3
pop	ebx
retn
sub_82B000 endp

align 10h



; int __cdecl sub_82B080(char *)
sub_82B080 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
push	esi
mov	esi, [esp+0Ch+arg_0]
push	1
push	esi
call	sub_81AA40
push	0Ah
push	2
push	esi
call	sub_81ADC0
mov	ecx, [esi+1Ch]
mov	ebx, eax
mov	eax, [esi+20h]
add	eax, 8
add	esp, 14h
cmp	ecx, eax
jnb	short loc_82B0BD
jmp	short loc_82B0B0
align 10h

loc_82B0B0:
mov	dword ptr [ecx], 0
add	ecx, 8
cmp	ecx, eax
jb	short loc_82B0B0

loc_82B0BD:
mov	[esi+1Ch], eax
cmp	ebx, 0Ah
jnz	short loc_82B12C
mov	ecx, [esi+20h]
cmp	ecx, eax
jb	short loc_82B0D4
fldz
fstp	[esp+0Ch+arg_0]
jmp	short loc_82B0EF

loc_82B0D4:
push	ecx
push	esi
call	sub_818F90
fstp	[esp+14h+arg_0]
fldz
add	esp, 8
fcomp	[esp+0Ch+arg_0]
fnstsw	ax
test	ah, 44h
jp	short loc_82B10D

loc_82B0EF:
mov	eax, [esi+20h]
cmp	eax, [esi+1Ch]
jnb	loc_82B1CF
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	loc_82B1CF

loc_82B10D:
mov	eax, [esi+1Ch]
fld	[esp+0Ch+arg_0]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
mov	eax, 1
pop	ebx
pop	ecx
retn

loc_82B12C:
push	edi
push	0
push	1
push	esi
call	sub_81ABE0
mov	edi, eax
lea	eax, [ebx-2]
mov	ecx, 22h
cmp	ecx, eax
push	offset aBaseOutOfRange ; "base out of range"
sbb	eax, eax
inc	eax
push	2
push	eax
push	esi
call	sub_81AB40
push	ebx		; int
lea	edx, [esp+30h+arg_0]
push	edx		; char **
push	edi		; char *
call	_strtoul
mov	ebx, eax
mov	eax, [esp+38h+arg_0]
add	esp, 28h
cmp	edi, eax
pop	edi
jz	short loc_82B1CF
movsx	eax, byte ptr [eax]
push	eax		; int
call	_isspace
add	esp, 4
test	eax, eax
jz	short loc_82B199
mov	edi, edi

loc_82B180:
mov	eax, [esp+0Ch+arg_0]
inc	eax
mov	[esp+0Ch+arg_0], eax
movsx	ecx, byte ptr [eax]
push	ecx		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	short loc_82B180

loc_82B199:
mov	edx, [esp+0Ch+arg_0]
cmp	byte ptr [edx],	0
jnz	short loc_82B1CF
mov	eax, [esi+1Ch]
mov	[esp+0Ch+var_4], ebx
fild	[esp+0Ch+var_4]
test	ebx, ebx
jge	short loc_82B1B7
fadd	ds:flt_15FCC08

loc_82B1B7:
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
mov	eax, 1
pop	ebx
pop	ecx
retn

loc_82B1CF:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
mov	eax, 1
pop	ebx
pop	ecx
retn
sub_82B080 endp

align 10h



sub_82B1F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	1
push	esi
call	sub_81AA40
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
add	ecx, 8
add	esp, 8
cmp	eax, ecx
jnb	short loc_82B21D
lea	ecx, [ecx+0]

loc_82B210:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_82B210

loc_82B21D:		; "__tostring"
push	offset a__tostring_0
push	1
push	esi
mov	[esi+1Ch], ecx
call	sub_81A6F0
add	esp, 0Ch
test	eax, eax
jnz	short loc_82B266
mov	eax, [esi+20h]
push	edi
cmp	eax, [esi+1Ch]
jb	short loc_82B26D
or	edi, 0FFFFFFFFh

loc_82B240:		; default
push	1		; jumptable 0082B28C cases 2,5-10
push	esi
call	sub_82A300
add	esp, 8
push	eax
push	edi
push	esi
call	sub_81BA90
add	esp, 8
push	eax		; ArgList
push	offset aSP_0	; "%s: %p"
push	esi		; int
call	sub_81C0C0
add	esp, 10h

loc_82B265:		; jumptable 0082B28C case 4
pop	edi

loc_82B266:
mov	eax, 1
pop	esi
retn

loc_82B26D:
mov	eax, [eax]
cmp	eax, 9
jz	short loc_82B279
cmp	eax, 0Ah
jnz	short loc_82B27E

loc_82B279:
mov	eax, 6

loc_82B27E:
mov	edi, eax
cmp	eax, 0Bh	; switch 12 cases
ja	short loc_82B240 ; default
			; jumptable 0082B28C cases 2,5-10
movzx	eax, ds:byte_82B31C[eax]
jmp	ds:off_82B304[eax*4] ; switch jump

loc_82B293:		; jumptable 0082B28C case 0
push	3
push	offset aNil_0	; "nil"
push	esi
call	sub_81B9D0
add	esp, 0Ch
pop	edi
mov	eax, 1
pop	esi
retn

loc_82B2AB:		; jumptable 0082B28C case 1
push	1
push	esi
call	sub_432BF0
add	esp, 8
test	eax, eax
mov	eax, offset aTrue_10 ; "true"
jnz	short loc_82B2C4
mov	eax, offset aFalse_11 ;	"false"

loc_82B2C4:
push	eax
push	esi
call	sub_81C070
add	esp, 8
pop	edi
mov	eax, 1
pop	esi
retn

loc_82B2D6:		; jumptable 0082B28C case 3
push	1
push	esi
call	sub_4E3E10
add	esp, 8
pop	edi
mov	eax, 1
pop	esi
retn

loc_82B2E9:		; Trap to Debugger
int	3
push	0
push	0		; ArgList
push	offset a0x8_8x8_8x ; "0x%8.8x%8.8x"
push	esi		; int
call	sub_81C0C0
add	esp, 10h
pop	edi
mov	eax, 1
pop	esi
retn
sub_82B1F0 endp

off_82B304 dd offset loc_82B293	; jump table for switch	statement
dd offset loc_82B2AB
dd offset loc_82B2D6
dd offset loc_82B265
dd offset loc_82B2E9
dd offset loc_82B240
byte_82B31C db	    0,	   1,	  5,	 2 ; indirect table for	switch statement
db	3,     5,     5,     5
db	5,     5,     5,     4
align 10h



sub_82B330 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	esi
call	sub_81AA40
push	2
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
add	esp, 10h
cmp	eax, ecx
jnb	short loc_82B359
xor	edx, edx
mov	edi, eax
jmp	short loc_82B360

loc_82B359:
mov	edx, 1
xor	edi, edi

loc_82B360:
add	eax, 8
cmp	eax, ecx
jnb	short loc_82B36B
xor	ecx, ecx
jmp	short loc_82B372

loc_82B36B:
mov	ecx, 1
xor	eax, eax

loc_82B372:
test	edx, edx
jnz	short loc_82B387
test	ecx, ecx
jnz	short loc_82B387
push	eax
push	edi
push	esi
call	sub_819120
add	esp, 0Ch
jmp	short loc_82B389

loc_82B387:
xor	eax, eax

loc_82B389:
mov	ecx, [esi+1Ch]
mov	[ecx+4], eax
mov	dword ptr [ecx], 1
add	ecx, 8
pop	edi
mov	[esi+1Ch], ecx
mov	eax, 1
pop	esi
retn
sub_82B330 endp

align 10h



sub_82B3B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
push	2
push	esi
call	sub_81AA40
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
add	ecx, 10h
add	esp, 14h
cmp	eax, ecx
jnb	short loc_82B3ED
jmp	short loc_82B3E0
align 10h

loc_82B3E0:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_82B3E0

loc_82B3ED:
lea	eax, [ecx-8]
push	eax
push	eax
mov	eax, [esi+20h]
push	eax
push	esi
mov	[esi+1Ch], ecx
call	sub_819750
add	esp, 10h
mov	eax, 1
pop	esi
retn
sub_82B3B0 endp

align 10h



sub_82B410 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	5
push	1
push	esi
call	sub_81ACD0
push	2
push	esi
call	sub_81AA40
push	3
push	esi
call	sub_81AA40
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
add	ecx, 18h
add	esp, 1Ch
cmp	eax, ecx
jnb	short loc_82B44D
nop

loc_82B440:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_82B440

loc_82B44D:
lea	eax, [ecx-8]
push	eax
lea	edx, [ecx-10h]
mov	[esi+1Ch], ecx
push	edx
add	ecx, 0FFFFFFE8h
push	ecx
push	esi
call	sub_819790
add	dword ptr [esi+1Ch], 0FFFFFFF0h
add	esp, 10h
xor	eax, eax
pop	esi
retn
sub_82B410 endp

align 10h



sub_82B470 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, [esi+1Ch]
sub	edi, [esi+20h]
push	1
push	esi
sar	edi, 3
call	sub_81AA40
mov	eax, [esi+20h]
add	esp, 8
cmp	eax, [esi+1Ch]
jnb	short loc_82B4ED
push	eax
push	esi
call	sub_818FE0
add	esp, 8
test	eax, eax
jz	short loc_82B4ED
mov	eax, [esi+20h]
cmp	eax, [esi+1Ch]
jb	short loc_82B4AC
fldz
jmp	short loc_82B4B6

loc_82B4AC:
push	eax
push	esi
call	sub_818F90
add	esp, 8

loc_82B4B6:
fstp	[esp+8+arg_0]
fld	[esp+8+arg_0]
call	__ftol2_sse
test	eax, eax
jge	short loc_82B4CB
add	eax, edi
test	eax, eax

loc_82B4CB:
jg	short loc_82B4DE
push	offset aIndexOutOfBoun ; "index	out of bound"
push	esi
call	sub_81A760
add	esp, 8
pop	edi
pop	esi
retn

loc_82B4DE:
sub	edi, eax
xor	eax, eax
test	edi, edi
setle	al
dec	eax
and	eax, edi
pop	edi
pop	esi
retn

loc_82B4ED:
mov	eax, [esi+1Ch]
dec	edi
mov	[esp+8+arg_0], edi
fild	[esp+8+arg_0]
mov	dword ptr [eax], 3
add	eax, 8
pop	edi
fstp	dword ptr [eax-4]
mov	[esi+1Ch], eax
mov	eax, 1
pop	esi
retn
sub_82B470 endp




sub_82B510 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	esi
mov	esi, [esp+8+arg_0]
push	edi
lea	eax, [esp+0Ch+var_4]
push	eax
push	1
push	esi
call	sub_81ABE0
push	0
mov	edi, eax
push	edi
push	2
push	esi
call	sub_81AE20
mov	ecx, [esp+28h+var_4]
push	eax
push	ecx
push	edi
push	esi
call	sub_81A030
add	esp, 2Ch
test	eax, eax
jz	short loc_82B578
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	edi, [eax-10h]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-8], edi
mov	edi, [eax-0Ch]
mov	[eax-4], edi
mov	[eax-10h], ecx
mov	[eax-0Ch], edx
mov	[esi+1Ch], eax
pop	edi
mov	eax, 2
pop	esi
pop	ecx
retn

loc_82B578:
pop	edi
mov	eax, 1
pop	esi
pop	ecx
retn
sub_82B510 endp

align 10h



sub_82B590 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [esp+8+arg_0]
mov	eax, [esi+1Ch]
mov	ecx, [esi+30h]
push	edi
lea	edi, [esi+30h]
mov	[eax], ecx
mov	edx, [edi+4]
push	1		; int
push	offset off_1467F98 ; int
mov	[eax+4], edx
add	eax, 8
push	0		; char *
push	esi		; int
mov	[esi+1Ch], eax
call	sub_81A860
push	offset aPairs	; "pairs"
push	esi
call	sub_81C070
push	0
push	offset sub_81B0F0
push	esi
call	sub_81C050
push	1
push	offset sub_82ADF0
push	esi
call	sub_81C050
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
add	eax, 0FFFFFFF0h
push	eax
push	edi
push	esi
call	sub_8194A0
add	esp, 40h
push	offset aIpairs	; "ipairs"
mov	ebx, 0FFFFFFF0h
add	[esi+1Ch], ebx
push	esi
call	sub_81C070
push	0
push	offset sub_81B080
push	esi
call	sub_81C050
push	1
push	offset sub_82AEB0
push	esi
call	sub_81C050
mov	eax, [esi+1Ch]
lea	edx, [eax-8]
push	edx
add	eax, ebx
push	eax
push	edi
push	esi
call	sub_8194A0
add	[esi+1Ch], ebx
push	offset aKpairs	; "kpairs"
push	esi
call	sub_81C070
push	0
push	offset sub_795DC0
push	esi
call	sub_81C050
add	esp, 44h
push	1
push	offset sub_82AE50
push	esi
call	sub_81C050
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
add	eax, ebx
push	eax
push	edi
push	esi
call	sub_8194A0
add	[esi+1Ch], ebx
push	2
push	offset a_g	; "_G"
push	esi
call	sub_81B9D0
mov	eax, [esi+1Ch]
mov	edx, [edi]
mov	[eax], edx
mov	ecx, [edi+4]
mov	[eax+4], ecx
add	eax, 8
lea	edx, [eax-8]
push	edx
mov	[esi+1Ch], eax
add	eax, ebx
push	eax
push	edi
push	esi
call	sub_8194A0
add	[esi+1Ch], ebx
push	8
push	offset a_version ; "_VERSION"
push	esi
call	sub_81B9D0
add	esp, 44h
push	0Bh
push	offset a1_5_1R5141 ; "1.5.1 r5141"
push	esi
call	sub_81B9D0
mov	eax, [esi+1Ch]
lea	ecx, [eax-8]
push	ecx
add	eax, ebx
push	eax
push	edi
push	esi
call	sub_8194A0
add	[esi+1Ch], ebx
push	esi
call	sub_834B10
add	esp, 20h
pop	edi
pop	esi
lea	eax, [ebx+12h]
pop	ebx
retn
sub_82B590 endp

align 10h



sub_82B6F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	1
push	esi
call	sub_81AA40
mov	eax, [esi+20h]
mov	edi, [esi+1Ch]
add	esp, 8
cmp	eax, edi
jnb	short loc_82B74C
push	edi
push	eax
push	esi
call	sub_819230
add	esp, 0Ch
test	eax, eax
jz	short loc_82B74C
push	offset a__metatable_0 ;	"__metatable"
push	0FFFFFFFFh
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_5F23D0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 0Ch
cmp	eax, [esi+20h]
jb	short loc_82B75B
cmp	dword ptr [eax], 0
mov	eax, 1
jnz	short loc_82B760
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
retn

loc_82B74C:
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax

loc_82B75B:
mov	eax, 1

loc_82B760:
pop	edi
pop	esi
retn
sub_82B6F0 endp

align 10h



sub_82B770 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
mov	ebp, [esi+1Ch]
sub	ebp, [esi+20h]
mov	ebx, 1
sar	ebp, 3
cmp	ebp, ebx
jl	loc_82B83C
push	edi

loc_82B791:		; "tostring"
push	offset aTostring_0
push	esi
call	sub_81C070
mov	ecx, [esi+1Ch]
add	esp, 8
lea	eax, [esp+18h+var_8]
push	eax
sub	ecx, 8
push	ecx
push	0FFFFD8EEh
push	esi
call	sub_432A50
add	esp, 8
push	eax
push	esi
call	sub_8192F0
mov	eax, [esi+1Ch]
mov	edx, [esp+28h+var_8]
mov	[eax-8], edx
mov	ecx, [esp+28h+var_4]
push	ebx
mov	[eax-4], ecx
mov	edi, [esi+1Ch]
push	esi
call	sub_432A50
mov	edx, [eax]
mov	[edi], edx
mov	eax, [eax+4]
push	1
mov	[edi+4], eax
push	1
add	edi, 8
push	esi
mov	[esi+1Ch], edi
call	sub_81C6E0
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 24h
cmp	eax, [esi+20h]
jnb	short loc_82B807
xor	eax, eax
jmp	short loc_82B813

loc_82B807:
push	0
push	eax
push	esi
call	sub_818EC0
add	esp, 0Ch

loc_82B813:
push	eax
push	offset aS_20	; "%s"
call	sub_797758
add	esp, 8
cmp	ebx, ebp
jge	short loc_82B832
push	offset asc_1468240 ; "\t"
call	sub_797758
add	esp, 4

loc_82B832:
inc	ebx
cmp	ebx, ebp
jle	loc_82B791
pop	edi

loc_82B83C:		; "\n"
push	offset asc_1468244
call	sub_797758
add	esp, 4
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 8
retn
sub_82B770 endp

align 10h
; [00000005 BYTES: COLLAPSED FUNCTION j__fclose. PRESS KEYPAD "+" TO EXPAND]
align 10h



; int __cdecl sub_82B870(char *)
sub_82B870 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+4+var_4], eax
mov	eax, [esp+4+arg_0]
push	eax		; char *
call	_remove
mov	ecx, [esp+8+var_4]
add	esp, 4
xor	ecx, esp
call	sub_7999A3
pop	ecx
retn
sub_82B870 endp

align 10h



; int __cdecl sub_82B8A0(char *, char *)
sub_82B8A0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+4+var_4], eax
mov	ecx, [esp+4+arg_4]
mov	eax, [esp+4+arg_0]
push	ecx		; char *
push	eax		; char *
call	_rename
mov	ecx, [esp+0Ch+var_4]
add	esp, 8
xor	ecx, esp
call	sub_7999A3
pop	ecx
retn
sub_82B8A0 endp

align 10h



; int __cdecl sub_82B8D0(char *, char *)
sub_82B8D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+4+var_4], eax
mov	ecx, [esp+4+arg_4]
mov	eax, [esp+4+arg_0]
push	40h		; int
push	ecx		; char *
push	eax		; char *
call	__fsopen
mov	ecx, [esp+10h+var_4]
add	esp, 0Ch
xor	ecx, esp
call	sub_7999A3
pop	ecx
retn
sub_82B8D0 endp

align 10h



sub_82B900 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch

mov	eax, [esp+arg_0]
cmp	byte ptr [eax],	0
jz	short locret_82B91D
mov	cl, [esp+arg_8]
mov	dl, [esp+arg_4]

loc_82B911:
cmp	[eax], dl
jnz	short loc_82B917
mov	[eax], cl

loc_82B917:
inc	eax
cmp	byte ptr [eax],	0
jnz	short loc_82B911

locret_82B91D:
retn
sub_82B900 endp

align 10h
mov	edx, [esp+4]
mov	eax, ecx
mov	[eax], edx
mov	[eax+8], edx
mov	edx, [esp+8]
mov	[eax+0Ch], edx
mov	edx, [esp+0Ch]
mov	[eax+10h], edx
mov	edx, [esp+14h]
xor	ecx, ecx
mov	[eax+14h], edx
mov	edx, [esp+10h]
mov	[eax+18h], edx
mov	[eax+1Ch], ecx
mov	[eax+24h], ecx
mov	[eax+28h], ecx
mov	[eax+2Ch], ecx
mov	[eax+30h], ecx
mov	[eax+38h], ecx
mov	[eax+3Ch], cl
mov	[eax+4], eax
retn	14h
align 10h



sub_82B970 proc	near
mov	eax, [ecx+38h]
mov	dword ptr [ecx+38h], 0
retn
sub_82B970 endp

align 10h



sub_82B980 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
push	esi
mov	esi, [esp+8+arg_4]
mov	eax, [esi]
mov	ecx, [esi+4]
push	edi
push	0		; int
push	eax		; __int32
push	ecx		; FILE *
call	_fseek
mov	ebx, [esp+18h+arg_8]
add	esp, 0Ch
test	eax, eax
jnz	short loc_82B9C5
mov	edx, [esi+4]
push	edx		; FILE *
push	800h		; size_t
lea	edi, [esi+8]
push	1		; size_t
push	edi		; void *
call	_fread
mov	[ebx], eax
add	[esi], eax
add	esp, 10h
test	eax, eax
jz	short loc_82B9C5
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn

loc_82B9C5:
pop	edi
pop	esi
mov	dword ptr [ebx], 0
xor	eax, eax
pop	ebx
retn
sub_82B980 endp

align 10h



sub_82B9E0 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	edx, [esp+arg_4]
mov	ecx, [edx+4]
mov	eax, [edx+8]
push	esi
mov	esi, [edx]
sub	ecx, esi
add	eax, esi
test	ecx, ecx
jg	short loc_82BA03
mov	eax, [esp+4+arg_8]
mov	dword ptr [eax], 0
xor	eax, eax
pop	esi
retn

loc_82BA03:
mov	esi, [esp+4+arg_8]
mov	[esi], ecx
add	[edx], ecx
pop	esi
retn
sub_82B9E0 endp

align 10h
mov	edx, [esp+0Ch]
mov	eax, [esp+4]
push	esi
mov	esi, ecx
mov	ecx, [esp+0Ch]
push	edi
lea	edi, [esi+14h]
push	edi
push	edx
push	eax
mov	[esi], eax
mov	[esi+4], ecx
mov	[esi+8], edx
mov	dword ptr [esi+0Ch], 1
call	ecx
add	esp, 0Ch
mov	[esi+10h], eax
pop	edi
mov	eax, esi
pop	esi
retn	0Ch
align 10h

loc_82BA50:
push	esi
mov	esi, [esp+0Ch]
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_82BA71
mov	ecx, [esi+8]
mov	edx, [esi]
lea	eax, [esi+14h]
push	eax
mov	eax, [esi+4]
push	ecx
push	edx
call	eax
add	esp, 0Ch
mov	[esi+10h], eax

loc_82BA71:
mov	ecx, [esi+14h]
mov	edx, [esp+10h]
mov	[edx], ecx
mov	eax, [esi+10h]
mov	dword ptr [esi+0Ch], 0
pop	esi
retn
align 10h
cmp	dword ptr [ecx+10h], 0
jz	short loc_82BAA2
cmp	dword ptr [ecx+14h], 0
jbe	short loc_82BAA2
mov	eax, 1
retn

loc_82BAA2:
xor	eax, eax
retn
align 10h



sub_82BAB0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+38h]
test	eax, eax
jz	short loc_82BAC6
push	eax
mov	eax, [esi]
push	eax
call	sub_835030
add	esp, 8

loc_82BAC6:
mov	eax, [esi+28h]
test	eax, eax
jz	short loc_82BADA
mov	ecx, [esi+8]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8

loc_82BADA:
pop	esi
retn
sub_82BAB0 endp

align 10h



sub_82BAE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
mov	esi, ecx
cmp	[esi+10h], ebx
jb	short loc_82BB0F
mov	eax, [esi+14h]
mov	ecx, [esp+8+arg_0]
push	ebx
push	eax
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
sub	[esi+10h], ebx
add	esp, 0Ch
add	[esi+14h], ebx
pop	esi
mov	eax, 1
pop	ebx
retn	8

loc_82BB0F:
push	ebp
push	edi
test	ebx, ebx
jbe	short loc_82BB83
mov	ebp, [esp+10h+arg_0]
lea	esp, [esp+0]

loc_82BB20:
mov	edi, [esi+10h]
test	edi, edi
jbe	short loc_82BB49
cmp	edi, ebx
jbe	short loc_82BB2D
mov	edi, ebx

loc_82BB2D:
mov	edx, [esi+14h]
push	edi
push	edx
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
sub	[esi+10h], edi
add	[esi+14h], edi
sub	ebx, edi
add	esp, 0Ch
add	ebp, edi
test	ebx, ebx
jz	short loc_82BB83

loc_82BB49:
mov	ecx, [esi+0Ch]
mov	edx, [esi+4]
lea	eax, [esp+10h+arg_0]
push	eax
mov	eax, [esi+8]
push	ecx
push	edx
call	eax
add	esp, 0Ch
test	eax, eax
jz	short loc_82BB72
mov	ecx, [esp+10h+arg_0]
test	ecx, ecx
jz	short loc_82BB72
mov	[esi+10h], ecx
mov	[esi+14h], eax
jmp	short loc_82BB79

loc_82BB72:
mov	dword ptr [esi+18h], 1

loc_82BB79:
cmp	dword ptr [esi+18h], 1
jz	short loc_82BB8F
test	ebx, ebx
ja	short loc_82BB20

loc_82BB83:
pop	edi
pop	ebp
pop	esi
mov	eax, 1
pop	ebx
retn	8

loc_82BB8F:
mov	esi, [esi]
mov	ecx, [esi+34h]
mov	edx, [esi]
push	offset aUnexpectedEnd ;	"unexpected end"
push	ecx		; ArgList
push	offset aSSInPrecompile ; "%s: %s in precompiled	chunk"
push	edx		; int
call	sub_81C0C0
add	esp, 10h
pop	edi
pop	ebp
pop	esi
xor	eax, eax
pop	ebx
retn	8
sub_82BAE0 endp

align 10h



sub_82BBC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
mov	esi, [esp+0Ch+arg_4]
mov	eax, esi
imul	eax, ebp
push	edi
push	eax
push	ebx
mov	edi, ecx
call	sub_82BAE0
test	eax, eax
jz	loc_82BCC0
cmp	dword ptr [edi+1Ch], 0
jz	short loc_82BC17 ; jumptable 0082BBFA case 0
lea	ecx, [ebp-1]
mov	eax, ebx
cmp	ecx, 7		; switch 8 cases
ja	loc_82BCA5	; default
			; jumptable 0082BBFA cases 2,4-6
jmp	ds:off_82BCCC[ecx*4] ; switch jump

loc_82BC01:		; jumptable 0082BBFA case 1
test	esi, esi
jbe	short loc_82BC17 ; jumptable 0082BBFA case 0

loc_82BC05:
mov	cl, [eax]
mov	dl, [eax+1]
mov	[eax], dl
mov	[eax+1], cl
add	eax, 2
sub	esi, 1
jnz	short loc_82BC05

loc_82BC17:		; jumptable 0082BBFA case 0
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn	0Ch

loc_82BC23:		; jumptable 0082BBFA case 3
test	esi, esi
jbe	short loc_82BC17 ; jumptable 0082BBFA case 0
lea	eax, [ebx+1]
lea	ebx, [ebx+0]

loc_82BC30:
movzx	edx, byte ptr [eax+2]
mov	cl, [eax-1]
mov	[eax-1], dl
movzx	edx, byte ptr [eax+1]
mov	[eax+2], cl
mov	cl, [eax]
mov	[eax], dl
mov	[eax+1], cl
add	eax, 4
sub	esi, 1
jnz	short loc_82BC30
pop	edi
lea	eax, [esi+1]
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_82BC5A:		; jumptable 0082BBFA case 7
test	esi, esi
jbe	short loc_82BC17 ; jumptable 0082BBFA case 0
lea	eax, [ebx+1]

loc_82BC61:
movzx	edx, byte ptr [eax+6]
mov	cl, [eax-1]
mov	[eax-1], dl
movzx	edx, byte ptr [eax+5]
mov	[eax+6], cl
mov	cl, [eax]
mov	[eax], dl
movzx	edx, byte ptr [eax+4]
mov	[eax+5], cl
mov	cl, [eax+1]
mov	[eax+1], dl
movzx	edx, byte ptr [eax+3]
mov	[eax+4], cl
mov	cl, [eax+2]
mov	[eax+2], dl
mov	[eax+3], cl
add	eax, 8
sub	esi, 1
jnz	short loc_82BC61
pop	edi
lea	eax, [esi+1]
pop	esi
pop	ebp
pop	ebx
retn	0Ch

loc_82BCA5:		; default
mov	edi, [edi]	; jumptable 0082BBFA cases 2,4-6
mov	eax, [edi+34h]
mov	ecx, [edi]
push	offset aBadSize	; "bad size"
push	eax		; ArgList
push	offset aSSInPrecompile ; "%s: %s in precompiled	chunk"
push	ecx		; int
call	sub_81C0C0
add	esp, 10h

loc_82BCC0:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	0Ch
sub_82BBC0 endp

align 4
off_82BCCC dd offset loc_82BC17	; jump table for switch	statement
dd offset loc_82BC01
dd offset loc_82BCA5
dd offset loc_82BC23
dd offset loc_82BCA5
dd offset loc_82BCA5
dd offset loc_82BCA5
dd offset loc_82BC5A
align 10h



sub_82BCF0 proc	near

var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+20h]
push	edi
cmp	eax, 4
jnz	short loc_82BD0A
push	eax
push	1
lea	eax, [esp+1Ch+var_8]
push	eax
jmp	short loc_82BD14

loc_82BD0A:
push	eax
lea	ecx, [esp+18h+var_8]
push	1
push	ecx
mov	ecx, esi

loc_82BD14:
call	sub_82BBC0
mov	edi, [esp+14h+var_8]
mov	ebx, eax
test	ebx, ebx
jz	short loc_82BD39
test	edi, edi
jnz	short loc_82BD39
mov	edx, [esp+14h+arg_0]
mov	[edx], edi
lea	eax, [edi+1]
pop	edi
pop	esi
pop	ebx
add	esp, 8
retn	4

loc_82BD39:
cmp	edi, [esi+28h]
jbe	short loc_82BD6A
mov	eax, [esi+24h]
test	eax, eax
jz	short loc_82BD52
push	eax
mov	eax, [esi+4]
push	eax
call	sub_82C6D0
add	esp, 8

loc_82BD52:
mov	eax, [esi+4]
push	ebp
lea	ebp, [edi+10h]
push	ebp
push	eax
call	sub_82C6B0
add	esp, 8
mov	[esi+28h], ebp
mov	[esi+24h], eax
pop	ebp

loc_82BD6A:
test	ebx, ebx
jz	short loc_82BDA0
mov	ecx, [esi+24h]
push	edi
push	ecx
mov	ecx, esi
call	sub_82BAE0
test	eax, eax
jz	short loc_82BDAB
mov	eax, [esi+24h]
mov	esi, [esi+4]
mov	ecx, [esi]
dec	edi
push	edi
push	eax
push	esi
add	ecx, 2A0h
mov	ebx, 1
call	sub_81FD20
mov	edx, [esp+14h+arg_0]
mov	[edx], eax

loc_82BDA0:
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 8
retn	4

loc_82BDAB:
pop	edi
xor	ebx, ebx
pop	esi
mov	eax, ebx
pop	ebx
add	esp, 8
retn	4
sub_82BCF0 endp

align 10h



sub_82BDC0 proc	near

var_11=	byte ptr -11h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_0]
push	ebp
push	esi
push	edi
push	4
mov	ebp, ecx
push	1
lea	edi, [ebx+0Ch]
lea	ecx, [ebp+4]
push	edi
mov	[esp+30h+var_8], ebp
mov	[esp+30h+var_C], ecx
call	sub_82BBC0
mov	esi, eax
test	esi, esi
jz	loc_82BF99
mov	eax, [edi]
test	eax, eax
jbe	loc_82BF99
mov	ecx, [ebp+0]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	ecx, [edi]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[ebx+10h], eax
call	_memset
add	esp, 14h
xor	edi, edi

loc_82BE22:
cmp	edi, [ebx+0Ch]
jnb	loc_82BFA0
mov	edx, [ebx+10h]
lea	ebp, [edx+edi*8]
test	esi, esi
jz	short loc_82BE50
mov	ecx, [esp+24h+var_C]
push	1
lea	eax, [esp+28h+arg_0]
push	eax
call	sub_82BAE0
test	eax, eax
jz	short loc_82BE50
mov	esi, 1
jmp	short loc_82BE52

loc_82BE50:
xor	esi, esi

loc_82BE52:
movzx	eax, byte ptr [esp+24h+arg_0]
cmp	eax, 4		; switch 5 cases
ja	loc_82BF70	; default
			; jumptable 0082BE60 case 2
jmp	ds:off_82C058[eax*4] ; switch jump

loc_82BE67:		; jumptable 0082BE60 case 0
mov	dword ptr [ebp+0], 0
jmp	loc_82BF52

loc_82BE73:		; jumptable 0082BE60 case 1
test	esi, esi
jz	short loc_82BEA0
push	1
lea	ecx, [esp+28h+var_11]
push	ecx
mov	ecx, [esp+2Ch+var_C]
call	sub_82BAE0
test	eax, eax
jz	short loc_82BEA0
movzx	edx, [esp+24h+var_11]
mov	esi, 1
mov	[ebp+4], edx
mov	[ebp+0], esi
jmp	loc_82BF52

loc_82BEA0:
movzx	edx, [esp+24h+var_11]
xor	esi, esi
mov	[ebp+4], edx
mov	dword ptr [ebp+0], 1
jmp	loc_82BF52

loc_82BEB6:		; jumptable 0082BE60 case 3
test	esi, esi
jz	short loc_82BF0B
mov	esi, [esp+24h+var_C]
push	4
lea	eax, [esp+28h+var_10]
push	eax
mov	ecx, esi
call	sub_82BAE0
test	eax, eax
jz	short loc_82BF0B
cmp	dword ptr [esi+1Ch], 0
jz	short loc_82BEF6
mov	al, byte ptr [esp+24h+var_10]
mov	cl, byte ptr [esp+24h+var_10+3]
mov	dl, byte ptr [esp+24h+var_10+2]
mov	byte ptr [esp+24h+var_10+3], al
mov	al, byte ptr [esp+24h+var_10+1]
mov	byte ptr [esp+24h+var_10], cl
mov	byte ptr [esp+24h+var_10+1], dl
mov	byte ptr [esp+24h+var_10+2], al

loc_82BEF6:
fld	[esp+24h+var_10]
mov	esi, 1
fstp	dword ptr [ebp+4]
mov	dword ptr [ebp+0], 3
jmp	short loc_82BF52

loc_82BF0B:
fld	[esp+24h+var_10]
xor	esi, esi
fstp	dword ptr [ebp+4]
mov	dword ptr [ebp+0], 3
jmp	short loc_82BF52

loc_82BF1D:		; jumptable 0082BE60 case 4
mov	[esp+24h+var_4], 0
test	esi, esi
jz	short loc_82BF42
mov	ecx, [esp+24h+var_C]
lea	eax, [esp+24h+var_4]
push	eax
call	sub_82BCF0
test	eax, eax
jz	short loc_82BF42
mov	esi, 1
jmp	short loc_82BF44

loc_82BF42:
xor	esi, esi

loc_82BF44:
mov	ecx, [esp+24h+var_4]
mov	dword ptr [ebp+0], 4
mov	[ebp+4], ecx

loc_82BF52:
inc	edi
test	esi, esi
jnz	loc_82BE22

loc_82BF5B:
xor	edi, edi

loc_82BF5D:
mov	dword ptr [ebx+18h], 0

loc_82BF64:
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4

loc_82BF70:		; default
mov	eax, [esp+24h+var_8] ; jumptable 0082BE60 case 2
mov	edx, [eax+34h]
mov	eax, [eax]
push	offset aBadConstant ; "bad constant"
push	edx		; ArgList
push	offset aSSInPrecompile ; "%s: %s in precompiled	chunk"
push	eax		; int
call	sub_81C0C0
add	esp, 10h
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
add	esp, 14h
retn	4

loc_82BF99:
mov	dword ptr [ebx+10h], 0

loc_82BFA0:
test	esi, esi
jz	short loc_82BF5B
mov	ecx, [esp+24h+var_C]
push	4
push	1
lea	ebp, [ebx+14h]
push	ebp
call	sub_82BBC0
test	eax, eax
jz	short loc_82BF5B
mov	eax, [ebp+0]
mov	edi, 1
test	eax, eax
jbe	short loc_82BF5D
mov	ecx, [esp+24h+var_8]
mov	ecx, [ecx]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	edx, [ebp+0]
add	edx, edx
add	edx, edx
push	edx		; size_t
push	0		; int
push	eax		; void *
mov	[ebx+18h], eax
call	_memset
add	esp, 14h
xor	esi, esi
mov	edi, edi

loc_82BFF0:
cmp	esi, [ebp+0]
jnb	loc_82BF64
mov	eax, [esp+24h+var_8]
mov	eax, [eax]
push	44h
push	eax
call	sub_82C6B0
mov	ecx, [ebx+18h]
mov	[ecx+esi*4], eax
mov	edx, [ebx+18h]
mov	eax, [edx+esi*4]
push	44h		; size_t
push	0		; int
push	eax		; void *
call	_memset
add	esp, 14h
test	edi, edi
jz	short loc_82C043
mov	ecx, [ebx+34h]
mov	edx, [ebx+18h]
mov	eax, [edx+esi*4]
push	ecx
mov	ecx, [esp+28h+var_8]
push	eax
call	sub_82C260
test	eax, eax
jz	short loc_82C043
mov	edi, 1
jmp	short loc_82C045

loc_82C043:
xor	edi, edi

loc_82C045:
inc	esi
test	edi, edi
jnz	short loc_82BFF0
mov	eax, edi
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4
sub_82BDC0 endp

align 4
off_82C058 dd offset loc_82BE67	; jump table for switch	statement
dd offset loc_82BE73
dd offset loc_82BF70
dd offset loc_82BEB6
dd offset loc_82BF1D
align 10h



sub_82C070 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
push	ebp
push	esi
push	edi
mov	ebp, ecx
push	4
lea	edi, [ebp+4]
push	1
lea	esi, [ebx+8]
push	esi
mov	ecx, edi
mov	[esp+24h+var_4], ebp
mov	[esp+24h+var_8], edi
call	sub_82BBC0
test	eax, eax
jz	loc_82C194
mov	eax, [esi]
test	eax, eax
jbe	short loc_82C0B9
mov	ecx, [ebp+0]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
add	esp, 8
mov	[ebx+0Ch], eax

loc_82C0B9:
mov	eax, [esi]
mov	ecx, [ebx+0Ch]
push	4
push	eax
push	ecx
mov	ecx, edi
call	sub_82BBC0
test	eax, eax
jz	loc_82C194
push	4
push	1
lea	esi, [ebx+20h]
push	esi
mov	ecx, edi
call	sub_82BBC0
test	eax, eax
jz	loc_82C194
mov	eax, [esi]
mov	edi, 1
test	eax, eax
jbe	loc_82C1FF
mov	ecx, [ebp+0]
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	ecx, [esi]
lea	edx, [ecx+ecx*2]
add	edx, edx
add	edx, edx
push	edx		; size_t
xor	ebp, ebp
push	ebp		; int
push	eax		; void *
mov	[ebx+24h], eax
call	_memset
add	esp, 14h
mov	[esp+18h+arg_0], ebp
jmp	short loc_82C130
align 10h

loc_82C130:
mov	eax, [esp+18h+arg_0]
cmp	eax, [ebx+20h]
jnb	loc_82C1F7
mov	esi, [ebx+24h]
add	esi, ebp
test	edi, edi
jz	short loc_82C183
mov	edi, [esp+18h+var_8]
push	esi
mov	ecx, edi
call	sub_82BCF0
test	eax, eax
jz	short loc_82C183
push	4
push	1
lea	ecx, [esi+4]
push	ecx
mov	ecx, edi
call	sub_82BBC0
test	eax, eax
jz	short loc_82C183
push	4
push	1
add	esi, 8
push	esi
mov	ecx, edi
call	sub_82BBC0
test	eax, eax
jz	short loc_82C183
mov	edi, 1
jmp	short loc_82C185

loc_82C183:
xor	edi, edi

loc_82C185:
inc	[esp+18h+arg_0]
add	ebp, 0Ch
test	edi, edi
jnz	short loc_82C130

loc_82C190:
mov	ebp, [esp+18h+var_4]

loc_82C194:
xor	esi, esi

loc_82C196:
mov	eax, [esp+18h+arg_0]
mov	[ebx+10h], eax
test	esi, esi
jz	loc_82C24E
test	eax, eax
jbe	loc_82C24E
mov	ebp, [ebp+0]
add	eax, eax
add	eax, eax
push	eax
push	ebp
call	sub_82C6B0
mov	ecx, [ebx+10h]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[ebx+14h], eax
call	_memset
add	esp, 14h
xor	edi, edi

loc_82C1D3:
cmp	edi, [ebx+10h]
jnb	short loc_82C24E
test	esi, esi
jz	short loc_82C247
mov	edx, [ebx+14h]
mov	ecx, [esp+18h+var_8]
lea	eax, [edx+edi*4]
push	eax
call	sub_82BCF0
test	eax, eax
jz	short loc_82C247
mov	esi, 1
jmp	short loc_82C249

loc_82C1F7:
test	edi, edi
jz	short loc_82C190
mov	ebp, [esp+18h+var_4]

loc_82C1FF:
mov	ecx, [esp+18h+var_8]
push	4
lea	edx, [esp+1Ch+arg_0]
push	edx
call	sub_82BAE0
test	eax, eax
jz	short loc_82C194
mov	eax, [esp+18h+var_8]
cmp	dword ptr [eax+1Ch], 0
jz	short loc_82C23D
mov	al, byte ptr [esp+18h+arg_0]
mov	cl, byte ptr [esp+18h+arg_0+3]
mov	dl, byte ptr [esp+18h+arg_0+2]
mov	byte ptr [esp+18h+arg_0+3], al
mov	al, byte ptr [esp+18h+arg_0+1]
mov	byte ptr [esp+18h+arg_0], cl
mov	byte ptr [esp+18h+arg_0+1], dl
mov	byte ptr [esp+18h+arg_0+2], al

loc_82C23D:
mov	esi, 1
jmp	loc_82C196

loc_82C247:
xor	esi, esi

loc_82C249:
inc	edi
test	esi, esi
jnz	short loc_82C1D3

loc_82C24E:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn	4
sub_82C070 endp

align 10h



sub_82C260 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, ecx
inc	dword ptr [ebx+30h]
cmp	dword ptr [ebx+30h], 82h
jbe	short loc_82C28E
mov	eax, [ebx+34h]
mov	ecx, [ebx]
push	offset aCodeTooDeep ; "code too	deep"
push	eax		; ArgList
push	offset aSSInPrecompile ; "%s: %s in precompiled	chunk"
push	ecx		; int
call	sub_81C0C0
add	esp, 10h
xor	eax, eax
pop	ebx
retn	8

loc_82C28E:
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
push	edi
lea	ebp, [esi+34h]
lea	edi, [ebx+4]
push	ebp
mov	ecx, edi
call	sub_82BCF0
test	eax, eax
jz	loc_82C33A
cmp	dword ptr [ebp+0], 0
mov	[esp+10h+arg_0], 1
jnz	short loc_82C2DB
mov	eax, [esp+10h+arg_4]
test	eax, eax
jnz	short loc_82C2D8
mov	eax, [ebx]
mov	ecx, [eax]
push	2
push	offset a?_8	; "=?"
push	eax
add	ecx, 2A0h
call	sub_81FD20

loc_82C2D8:
mov	[ebp+0], eax

loc_82C2DB:
cmp	byte ptr [ebx+3Ch], 1
jnz	short loc_82C344
cmp	[esp+10h+arg_0], 0
jz	short loc_82C2F7
lea	edx, [esi+38h]
push	edx
mov	ecx, edi
call	sub_82BCF0
test	eax, eax
jnz	short loc_82C34B

loc_82C2F7:
xor	ecx, ecx

loc_82C2F9:
mov	dword ptr [esi+8], 0
test	ecx, ecx
jz	loc_82C412

loc_82C308:
push	esi
mov	ecx, ebx
call	sub_82BDC0
test	eax, eax
jz	loc_82C412
add	esi, 1Ch
push	esi
mov	ecx, ebx
call	sub_82C070
test	eax, eax
jz	loc_82C412
dec	dword ptr [ebx+30h]
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn	8

loc_82C33A:
mov	[esp+10h+arg_0], 0
jmp	short loc_82C2DB

loc_82C344:
cmp	[esp+10h+arg_0], 0
jz	short loc_82C2F7

loc_82C34B:
push	4
push	1
lea	eax, [esi+1Ch]
push	eax
mov	ecx, edi
call	sub_82BBC0
test	eax, eax
jz	short loc_82C2F7
push	4
push	1
lea	ecx, [esi+20h]
push	ecx
mov	ecx, edi
call	sub_82BBC0
test	eax, eax
jz	short loc_82C2F7
push	1
push	esi
mov	ecx, edi
call	sub_82BAE0
test	eax, eax
jz	loc_82C2F7
lea	eax, [esi+1]
push	1
push	eax
mov	ecx, edi
call	sub_82BAE0
test	eax, eax
jz	loc_82C2F7
lea	eax, [esi+2]
push	1
push	eax
mov	ecx, edi
call	sub_82BAE0
test	eax, eax
jz	loc_82C2F7
lea	eax, [esi+3]
push	1
push	eax
mov	ecx, edi
call	sub_82BAE0
test	eax, eax
jz	loc_82C2F7
push	4
push	1
lea	ebp, [esi+4]
push	ebp
mov	ecx, edi
call	sub_82BBC0
test	eax, eax
jz	loc_82C2F7
mov	eax, [ebp+0]
mov	ecx, 1
test	eax, eax
jbe	loc_82C2F9
mov	ecx, [ebx]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	edx, [ebp+0]
add	esp, 8
push	4
push	edx
push	eax
mov	ecx, edi
mov	[esi+8], eax
call	sub_82BBC0
test	eax, eax
jnz	loc_82C308

loc_82C412:
dec	dword ptr [ebx+30h]
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	8
sub_82C260 endp

align 10h



sub_82C420 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
mov	eax, [esp+10h+arg_0]
push	esi
mov	esi, ecx
cmp	eax, offset aLua_0 ; "\x1BLua"
jnz	short loc_82C441
mov	eax, offset aBinaryString ; "binary string"

loc_82C441:
push	edi
mov	[esi+34h], eax
push	0Ch
lea	eax, [esp+1Ch+var_10]
push	eax
lea	ecx, [esi+4]
call	sub_82BAE0
mov	edi, eax
test	edi, edi
jz	loc_82C4E9
cmp	[esp+18h+var_10], 61754C1Bh
jnz	short loc_82C476
cmp	[esp+18h+var_C], 51h
jnz	short loc_82C476
mov	ecx, 1
jmp	short loc_82C478

loc_82C476:
xor	ecx, ecx

loc_82C478:
mov	al, [esp+18h+var_B]
mov	[esi+3Ch], al
test	ecx, ecx
jz	short loc_82C492
test	al, al
jz	short loc_82C48B
cmp	al, 1
jnz	short loc_82C492

loc_82C48B:
mov	eax, 1
jmp	short loc_82C494

loc_82C492:
xor	eax, eax

loc_82C494:
xor	ecx, ecx
cmp	[esp+18h+var_A], 1
mov	dl, 4
setnz	cl
mov	[esi+20h], ecx
mov	cl, [esp+18h+var_8]
test	eax, eax
jz	short loc_82C4C1
cmp	[esp+18h+var_9], dl
jnz	short loc_82C4C1
cmp	cl, dl
jz	short loc_82C4BA
cmp	cl, 8
jnz	short loc_82C4C1

loc_82C4BA:
mov	eax, 1
jmp	short loc_82C4C3

loc_82C4C1:
xor	eax, eax

loc_82C4C3:
movsx	ecx, cl
mov	[esi+24h], ecx
test	eax, eax
jz	short loc_82C4E7
cmp	[esp+18h+var_7], dl
jnz	short loc_82C4E7
cmp	[esp+18h+var_6], dl
jnz	short loc_82C4E7
cmp	[esp+18h+var_5], 0
jnz	short loc_82C4E7
mov	edi, 1
jmp	short loc_82C4E9

loc_82C4E7:
xor	edi, edi

loc_82C4E9:
mov	eax, [esi]
push	44h
push	eax
call	sub_82C6B0
push	44h		; size_t
push	0		; int
push	eax		; void *
mov	[esi+38h], eax
call	_memset
add	esp, 14h
test	edi, edi
pop	edi
jz	short loc_82C530
mov	edx, [esi+38h]
push	0
push	edx
mov	ecx, esi
call	sub_82C260
test	eax, eax
jz	short loc_82C530
mov	eax, 1
pop	esi
mov	ecx, [esp+10h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn	4

loc_82C530:
mov	ecx, [esp+14h+var_4]
pop	esi
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 10h
retn	4
sub_82C420 endp

align 10h



sub_82C550 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
mov	edx, [eax+474h]
push	edi
mov	edi, [esp+8+arg_4]
lea	ecx, [edi+8Ch]
push	ecx
push	esi
call	edx
add	esp, 8
cmp	eax, edi
jb	short loc_82C57F
mov	ecx, [esi]
push	eax
call	sub_82CCE0
test	eax, eax
jz	short loc_82C5A9

loc_82C57F:
mov	ecx, [esi]
mov	eax, [esi+1Ch]
mov	edx, [ecx+354h]
mov	[eax], edx
mov	ecx, [ecx+358h]
mov	[eax+4], ecx
add	eax, 8
push	0FFFFFF38h
push	esi
mov	[esi+1Ch], eax
call	sub_81BDA0
add	esp, 8

loc_82C5A9:
pop	edi
pop	esi
retn
sub_82C550 endp

align 10h



sub_82C5B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_0]
mov	ebp, [esi]
dec	dword ptr [ebp+288h]
cmp	byte ptr [ebp+270h], 0
lea	ecx, [ebp+230h]
push	edi
mov	edi, [ecx+58h]
jnz	short loc_82C621
cmp	dword ptr [ecx+44h], 0
jnz	short loc_82C621
mov	eax, [ecx+8]
mov	edx, [eax+4]
mov	ebx, [ecx+5Ch]
mov	eax, [eax]
add	ebx, [esp+10h+arg_4]
sub	eax, edx
cmp	ebx, eax
jbe	short loc_82C5F5
push	0FFFFFFFFh
jmp	short loc_82C618

loc_82C5F5:
cmp	edx, [ecx+54h]
jbe	short loc_82C61D
test	edi, edi
jg	short loc_82C61D
mov	eax, [ecx+3Ch]
mov	dword ptr [ecx+58h], 13Dh
cmp	eax, 0FFFFFFFFh
jz	short loc_82C615
imul	eax, 13Dh
jmp	short loc_82C617

loc_82C615:
xor	eax, eax

loc_82C617:
push	eax

loc_82C618:
call	sub_81F7B0

loc_82C61D:
mov	ebx, [esp+10h+arg_4]

loc_82C621:
mov	edi, 3

loc_82C626:
push	ebx
mov	ecx, ebp
dec	edi
call	sub_82CFF0
test	eax, eax
jnz	short loc_82C6A0
test	edi, edi
jnz	short loc_82C68B
mov	ecx, [esi]
mov	eax, [ecx+474h]
lea	edx, [ebx+8Ch]
push	edx
push	esi
call	eax
add	esp, 8
cmp	eax, ebx
jb	short loc_82C65C
mov	ecx, [esi]
push	eax
call	sub_82CCE0
test	eax, eax
jz	short loc_82C686

loc_82C65C:
mov	ecx, [esi]
mov	eax, [esi+1Ch]
mov	edx, [ecx+354h]
mov	[eax], edx
mov	ecx, [ecx+358h]
mov	[eax+4], ecx
add	eax, 8
push	0FFFFFF38h
push	esi
mov	[esi+1Ch], eax
call	sub_81BDA0
add	esp, 8

loc_82C686:
mov	edi, 3

loc_82C68B:
mov	ecx, [esi]
push	0FFFFFFFFh
add	ecx, 230h
call	sub_81F7B0
test	edi, edi
jnz	short loc_82C626
xor	eax, eax

loc_82C6A0:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_82C5B0 endp

align 10h



sub_82C6B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, [esp+arg_0]
push	eax
push	ecx
call	sub_82C5B0
or	dword ptr [eax-4], 4
add	esp, 8
retn
sub_82C6B0 endp

align 10h



sub_82C6D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	ecx, [eax]
push	esi
mov	esi, [esp+4+arg_4]
mov	edx, [esi-4]
add	esi, 0FFFFFFFCh
shr	edx, 3
cmp	edx, 80h
jnb	short loc_82C6F3
mov	eax, edx
shr	eax, 3
jmp	short loc_82C752

loc_82C6F3:
cmp	edx, 400h
jnb	short loc_82C705
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82C752

loc_82C705:
cmp	edx, 1000h
jnb	short loc_82C717
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82C752

loc_82C717:
cmp	edx, 2000h
jnb	short loc_82C729
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_82C752

loc_82C729:
cmp	edx, 20000h
jnb	short loc_82C73B
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82C752

loc_82C73B:
cmp	edx, 1A0000h
jnb	short loc_82C74D
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_82C752

loc_82C74D:
mov	eax, 7Fh

loc_82C752:
sub	[ecx+4], edx
push	edi
lea	edi, ds:0[edx*8]
mov	[esi], edi
pop	edi
cmp	eax, 5Dh
jb	short loc_82C776
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_82C776
push	esi
push	eax
push	edx
call	sub_82CAF0
pop	esi
retn

loc_82C776:
mov	edx, [ecx+eax*4+10h]
mov	[esi+4], edx
mov	[ecx+eax*4+10h], esi
pop	esi
retn
sub_82C6D0 endp

align 10h



; int __cdecl sub_82C790(int, int, void	*, int)
sub_82C790 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
mov	eax, [esp+0Ch+arg_0]
mov	ecx, [eax]
mov	eax, [esp+0Ch+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+14h+arg_C]
push	esi
push	edi
lea	edx, ds:0[ebp*4]
push	edx		; size_t
xor	edi, edi
push	edi		; int
push	eax		; void *
xor	esi, esi
mov	[esp+28h+var_4], ecx
call	_memset
add	esp, 0Ch
xor	ebx, ebx
xor	eax, eax
cmp	ebp, 2
jl	short loc_82C7E2
lea	ecx, [ebp-1]
jmp	short loc_82C7D0
align 10h

loc_82C7D0:
mov	edx, [esp+1Ch+arg_4]
add	esi, [edx+eax*4]
add	edi, [edx+eax*4+4]
add	eax, 2
cmp	eax, ecx
jb	short loc_82C7D0

loc_82C7E2:
cmp	eax, ebp
jnb	short loc_82C7F3
mov	ecx, [esp+1Ch+arg_4]
mov	edx, [ecx+eax*4]
mov	[esp+1Ch+var_C], edx
mov	ebx, edx

loc_82C7F3:
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [eax]
sub	[ecx+288h], ebp
add	edi, esi
mov	esi, [ecx+288h]
add	ecx, 230h
add	ebx, edi
cmp	byte ptr [ecx+40h], 0
mov	[esp+1Ch+var_C], ebx
jnz	short loc_82C894
cmp	dword ptr [ecx+44h], 0
jnz	short loc_82C894
mov	eax, [ecx+8]
mov	edx, [eax+4]
mov	edi, [ecx+5Ch]
mov	eax, [eax]
add	edi, ebx
sub	eax, edx
cmp	edi, eax
jbe	short loc_82C843
push	0FFFFFFFFh
call	sub_81F7B0
mov	[esp+1Ch+var_8], 0
jmp	short loc_82C8A4

loc_82C843:
cmp	edx, [ecx+54h]
jbe	short loc_82C894
test	esi, esi
jg	short loc_82C894
mov	eax, [ecx+3Ch]
mov	dword ptr [ecx+58h], 13Dh
cmp	eax, 0FFFFFFFFh
jz	short loc_82C871
imul	eax, 13Dh
push	eax
call	sub_81F7B0
mov	[esp+1Ch+var_8], 0
jmp	short loc_82C8A4

loc_82C871:
xor	eax, eax
push	eax
call	sub_81F7B0
mov	[esp+1Ch+var_8], 0
jmp	short loc_82C8A4
jmp	short loc_82C890
align 10h

loc_82C890:
mov	ebp, [esp+1Ch+arg_C]

loc_82C894:
mov	[esp+1Ch+var_8], 0
jmp	short loc_82C8A4
align 10h

loc_82C8A0:
mov	ebp, [esp+1Ch+arg_C]

loc_82C8A4:
mov	bl, 1
test	ebp, ebp
jbe	loc_82CA4C
mov	esi, [esp+1Ch+arg_8]
mov	edi, [esp+1Ch+arg_4]
sub	edi, esi

loc_82C8B8:
mov	eax, [edi+esi]
test	eax, eax
jz	short loc_82C8D9
mov	ecx, [esp+1Ch+var_4]
push	eax
call	sub_82CFF0
mov	[esi], eax
test	bl, bl
jz	short loc_82C8D7
test	eax, eax
jz	short loc_82C8D7
mov	bl, 1
jmp	short loc_82C8D9

loc_82C8D7:
xor	bl, bl

loc_82C8D9:
add	esi, 4
sub	ebp, 1
jnz	short loc_82C8B8
test	bl, bl
jnz	loc_82CA4C
xor	ebx, ebx
jmp	short loc_82C8F0
align 10h

loc_82C8F0:
mov	edi, [esp+1Ch+arg_8]
mov	eax, [edi+ebx*4]
test	eax, eax
jz	loc_82C9B0
mov	edx, [eax-4]
mov	ecx, [esp+1Ch+arg_0]
mov	ecx, [ecx]
lea	esi, [eax-4]
shr	edx, 3
cmp	edx, 80h
jnb	short loc_82C91D
mov	eax, edx
shr	eax, 3
jmp	short loc_82C97C

loc_82C91D:
cmp	edx, 400h
jnb	short loc_82C92F
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82C97C

loc_82C92F:
cmp	edx, 1000h
jnb	short loc_82C941
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82C97C

loc_82C941:
cmp	edx, 2000h
jnb	short loc_82C953
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_82C97C

loc_82C953:
cmp	edx, 20000h
jnb	short loc_82C965
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82C97C

loc_82C965:
cmp	edx, 1A0000h
jnb	short loc_82C977
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_82C97C

loc_82C977:
mov	eax, 7Fh

loc_82C97C:
sub	[ecx+4], edx
lea	ebp, ds:0[edx*8]
mov	[esi], ebp
cmp	eax, 5Dh
jb	short loc_82C99E
cmp	dword ptr [ecx+eax*4+10h], 0
jz	short loc_82C99E
push	esi
push	eax
push	edx
call	sub_82CAF0
jmp	short loc_82C9A9

loc_82C99E:
mov	edx, [ecx+eax*4+10h]
mov	[esi+4], edx
mov	[ecx+eax*4+10h], esi

loc_82C9A9:
mov	dword ptr [edi+ebx*4], 0

loc_82C9B0:
inc	ebx
cmp	ebx, [esp+1Ch+arg_C]
jb	loc_82C8F0
mov	eax, [esp+1Ch+arg_0]
mov	ecx, [eax]
push	0FFFFFFFFh
add	ecx, 230h
call	sub_81F7B0
mov	eax, [esp+1Ch+var_8]
inc	eax
cmp	eax, 3
mov	[esp+1Ch+var_8], eax
jl	loc_82C8A0
mov	edi, [esp+1Ch+var_C]
mov	esi, [esp+1Ch+arg_0]
mov	ecx, [esi]
mov	eax, [ecx+474h]
lea	edx, [edi+8Ch]
push	edx
push	esi
call	eax
add	esp, 8
cmp	eax, edi
jb	short loc_82CA11
mov	ecx, [esi]
push	eax
call	sub_82CCE0
test	eax, eax
jz	loc_82C890

loc_82CA11:
mov	ecx, [esi]
mov	eax, [esi+1Ch]
mov	edx, [ecx+354h]
mov	[eax], edx
mov	ecx, [ecx+358h]
mov	[eax+4], ecx
add	eax, 8
push	0FFFFFF38h
push	esi
mov	[esi+1Ch], eax
call	sub_81BDA0
mov	ebp, [esp+24h+arg_C]
add	esp, 8
mov	[esp+1Ch+var_8], 0
jmp	loc_82C8A4

loc_82CA4C:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_82C790 endp

align 10h



sub_82CA60 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
push	2Ch
push	0
mov	esi, ecx
mov	eax, [esi+318h]
push	0
push	0
call	eax
mov	ebx, [esp+1Ch+arg_0]
add	esp, 10h
mov	edi, eax
push	ebx
push	esi
mov	ecx, edi
call	sub_834FC0
mov	ecx, [ebx]
mov	[ecx+2B4h], edi
mov	edx, [esi+314h]
mov	[edi+28h], edx
mov	eax, [esi]
mov	edx, [eax+4]
push	edi
mov	ecx, esi
mov	[esi+314h], edi
call	edx
mov	eax, edi
pop	edi
pop	esi
pop	ebx
retn	4
sub_82CA60 endp




sub_82CAB0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+214h]
test	eax, eax
jz	short loc_82CAE2
push	edi
mov	edi, edi

loc_82CAC0:
mov	ecx, [eax]
mov	edx, [esi+21Ch]
mov	edi, [eax+4]
push	0
push	ecx
push	eax
mov	eax, [esi+218h]
push	edx
call	eax
add	esp, 10h
mov	eax, edi
test	edi, edi
jnz	short loc_82CAC0
pop	edi

loc_82CAE2:
mov	dword ptr [esi+214h], 0
pop	esi
retn
sub_82CAB0 endp

align 10h



sub_82CAF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
mov	edx, [esp+arg_0]
lea	ecx, [ecx+eax*4+10h]
mov	eax, [ecx]
push	esi
mov	esi, [eax]
shr	esi, 3
cmp	esi, edx
jnb	short loc_82CB1A

loc_82CB08:
lea	ecx, [eax+4]
mov	eax, [ecx]
test	eax, eax
jz	short loc_82CB27
mov	esi, [eax]
shr	esi, 3
cmp	esi, edx
jb	short loc_82CB08

loc_82CB1A:
mov	edx, [esp+4+arg_8]
mov	[edx+4], eax
mov	[ecx], edx
pop	esi
retn	0Ch

loc_82CB27:
mov	eax, [esp+4+arg_8]
mov	dword ptr [eax+4], 0
mov	[ecx], eax
pop	esi
retn	0Ch
sub_82CAF0 endp

align 10h



sub_82CB40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	edx, [esp+arg_4]
push	eax
mov	eax, [esp+4+arg_0]
push	edx
mov	edx, [ecx+21Ch]
push	eax
mov	eax, [ecx+218h]
push	edx
call	eax
add	esp, 10h
retn	0Ch
sub_82CB40 endp

align 10h



sub_82CB70 proc	near

arg_4= dword ptr  8

mov	eax, [esp+arg_4]
or	dword ptr [eax-4], 4
retn
sub_82CB70 endp

align 10h



sub_82CB80 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
and	dword ptr [eax-4], 0FFFFFFFBh
mov	edx, [esp+arg_0]
mov	edx, [edx]
mov	ecx, [eax-4]
add	eax, 0FFFFFFFCh
cmp	dword ptr [edx+23Ch], 5
jnz	short loc_82CBC7
cmp	[edx+210h], eax
jbe	short loc_82CBC7
push	esi
mov	esi, [edx+210h]
test	esi, esi
jz	short loc_82CBBB
cmp	esi, eax
ja	short loc_82CBBB
or	ecx, 1
mov	[eax], ecx
pop	esi
retn

loc_82CBBB:
mov	edx, [edx+0Ch]
and	ecx, 0FFFFFFFEh
or	ecx, edx
mov	[eax], ecx
pop	esi
retn

loc_82CBC7:
or	dword ptr [eax], 1
retn
sub_82CB80 endp

align 10h



; int __thiscall sub_82CBD0(void *, int, int, int)
sub_82CBD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	esi
push	edi
push	230h		; size_t
mov	esi, ecx
push	0		; int
push	esi		; void *
call	_memset
mov	edi, [esp+14h+arg_8]
mov	ecx, [esp+14h+arg_4]
mov	eax, [esp+14h+arg_0]
push	edi
push	0
push	0
push	ecx
mov	[esi+218h], eax
mov	[esi+21Ch], ecx
call	eax
mov	[esi+214h], eax
mov	[eax], edi
mov	eax, [esi+214h]
mov	dword ptr [eax+4], 0
mov	edx, [esi+214h]
add	edx, 8
mov	[esi+4], edi
mov	[esi], edi
mov	eax, [edx]
lea	ecx, [edi-8]
and	eax, 7
lea	edi, ds:0[ecx*8]
or	eax, edi
add	esp, 1Ch
mov	[edx], eax
cmp	ecx, 80h
jnb	short loc_82CC49
mov	eax, ecx
shr	eax, 3
jmp	short loc_82CCA8

loc_82CC49:
cmp	ecx, 400h
jnb	short loc_82CC5B
mov	eax, ecx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82CCA8

loc_82CC5B:
cmp	ecx, 1000h
jnb	short loc_82CC6D
mov	eax, ecx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82CCA8

loc_82CC6D:
cmp	ecx, 2000h
jnb	short loc_82CC7F
mov	eax, ecx
shr	eax, 9
add	eax, 54h
jmp	short loc_82CCA8

loc_82CC7F:
cmp	ecx, 20000h
jnb	short loc_82CC91
mov	eax, ecx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82CCA8

loc_82CC91:
cmp	ecx, 1A0000h
jnb	short loc_82CCA3
mov	eax, ecx
shr	eax, 11h
add	eax, 72h
jmp	short loc_82CCA8

loc_82CCA3:
mov	eax, 7Fh

loc_82CCA8:
sub	[esi+4], ecx
mov	[edx], edi
cmp	eax, 5Dh
jb	short loc_82CCC8
cmp	dword ptr [esi+eax*4+10h], 0
jz	short loc_82CCC8
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_82CAF0
pop	edi
pop	esi
retn	0Ch

loc_82CCC8:
mov	ecx, [esi+eax*4+10h]
mov	[edx+4], ecx
pop	edi
mov	[esi+eax*4+10h], edx
pop	esi
retn	0Ch
sub_82CBD0 endp

align 10h



sub_82CCE0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	ebx
mov	esi, ecx
mov	eax, [esi+21Ch]
mov	ecx, [esi+218h]
push	0
push	0
push	eax
call	ecx
add	esp, 10h
test	eax, eax
jnz	short loc_82CD0D
pop	esi
mov	eax, 1
pop	ebx
retn	4

loc_82CD0D:
push	ebp
lea	ebp, [esi+214h]
mov	[eax], ebx
mov	ecx, [ebp+0]
push	edi
mov	edx, ebp
test	ecx, ecx
jz	short loc_82CD47

loc_82CD20:
cmp	eax, ecx
jb	short loc_82CD36
mov	edi, [ecx+4]
lea	edx, [ecx+4]
test	edi, edi
jz	short loc_82CD3D
mov	ecx, edi
test	ecx, ecx
jnz	short loc_82CD20
jmp	short loc_82CD47

loc_82CD36:
mov	[eax+4], ecx
mov	[edx], eax
jmp	short loc_82CD47

loc_82CD3D:
mov	[ecx+4], eax
mov	dword ptr [eax+4], 0

loc_82CD47:
add	[esi+4], ebx
add	[esi], ebx
lea	edx, [eax+8]
mov	eax, [edx]
lea	ecx, [ebx-8]
and	eax, 7
lea	edi, ds:0[ecx*8]
or	eax, edi
mov	[edx], eax
cmp	ecx, 80h
jnb	short loc_82CD71
mov	eax, ecx
shr	eax, 3
jmp	short loc_82CDD0

loc_82CD71:
cmp	ecx, 400h
jnb	short loc_82CD83
mov	eax, ecx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82CDD0

loc_82CD83:
cmp	ecx, 1000h
jnb	short loc_82CD95
mov	eax, ecx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82CDD0

loc_82CD95:
cmp	ecx, 2000h
jnb	short loc_82CDA7
mov	eax, ecx
shr	eax, 9
add	eax, 54h
jmp	short loc_82CDD0

loc_82CDA7:
cmp	ecx, 20000h
jnb	short loc_82CDB9
mov	eax, ecx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82CDD0

loc_82CDB9:
cmp	ecx, 1A0000h
jnb	short loc_82CDCB
mov	eax, ecx
shr	eax, 11h
add	eax, 72h
jmp	short loc_82CDD0

loc_82CDCB:
mov	eax, 7Fh

loc_82CDD0:
sub	[esi+4], ecx
mov	[edx], edi
cmp	eax, 5Dh
jb	short loc_82CDED
cmp	dword ptr [esi+eax*4+10h], 0
jz	short loc_82CDED
push	edx
push	eax
push	ecx
mov	ecx, esi
call	sub_82CAF0
jmp	short loc_82CDF8

loc_82CDED:
mov	ecx, [esi+eax*4+10h]
mov	[edx+4], ecx
mov	[esi+eax*4+10h], edx

loc_82CDF8:
mov	eax, [ebp+0]
pop	edi
pop	ebp
test	eax, eax
jz	short loc_82CE08

loc_82CE01:
mov	eax, [eax+4]
test	eax, eax
jnz	short loc_82CE01

loc_82CE08:
pop	esi
xor	eax, eax
pop	ebx
retn	4
sub_82CCE0 endp

align 10h



sub_82CE10 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, ecx
mov	ecx, [esp+8+arg_0]
push	esi
push	edi
cmp	ecx, 80h
jnb	short loc_82CE6A
mov	eax, ecx
shr	eax, 3

loc_82CE27:
cmp	eax, 80h
jnb	short loc_82CE61

loc_82CE2E:
lea	edi, [ebp+eax*4+10h]

loc_82CE32:
mov	esi, [edi]
mov	edx, edi
test	esi, esi
jz	short loc_82CE56
lea	ebx, [ebx+0]

loc_82CE40:
mov	ebx, [esi]
shr	ebx, 3
cmp	ebx, ecx
jnb	loc_82CED4
lea	edx, [esi+4]
mov	esi, [edx]
test	esi, esi
jnz	short loc_82CE40

loc_82CE56:
inc	eax
add	edi, 4
cmp	eax, 80h
jb	short loc_82CE32

loc_82CE61:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn	4

loc_82CE6A:
cmp	ecx, 400h
jnb	short loc_82CE7C
mov	eax, ecx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82CE27

loc_82CE7C:
cmp	ecx, 1000h
jnb	short loc_82CE8E
mov	eax, ecx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82CE27

loc_82CE8E:
cmp	ecx, 2000h
jnb	short loc_82CEA0
mov	eax, ecx
shr	eax, 9
add	eax, 54h
jmp	short loc_82CE27

loc_82CEA0:
cmp	ecx, 20000h
jnb	short loc_82CEB5
mov	eax, ecx
shr	eax, 0Dh
add	eax, 63h
jmp	loc_82CE27

loc_82CEB5:
cmp	ecx, 1A0000h
jnb	short loc_82CECA
mov	eax, ecx
shr	eax, 11h
add	eax, 72h
jmp	loc_82CE27

loc_82CECA:
mov	eax, 7Fh
jmp	loc_82CE2E

loc_82CED4:
add	[ebp+4], ebx
mov	eax, [ebp+4]
mov	edi, [ebp+8]
cmp	edi, eax
jbe	short loc_82CEE3
mov	eax, edi

loc_82CEE3:
mov	edi, ebx
mov	[ebp+8], eax
mov	eax, [esi+4]
sub	edi, ecx
mov	[edx], eax
cmp	edi, 8
jbe	loc_82CFCC
add	ecx, esi
cmp	edi, 80h
jnb	short loc_82CF09
mov	eax, edi
shr	eax, 3
jmp	short loc_82CF68

loc_82CF09:
cmp	edi, 400h
jnb	short loc_82CF1B
mov	eax, edi
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82CF68

loc_82CF1B:
cmp	edi, 1000h
jnb	short loc_82CF2D
mov	eax, edi
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82CF68

loc_82CF2D:
cmp	edi, 2000h
jnb	short loc_82CF3F
mov	eax, edi
shr	eax, 9
add	eax, 54h
jmp	short loc_82CF68

loc_82CF3F:
cmp	edi, 20000h
jnb	short loc_82CF51
mov	eax, edi
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82CF68

loc_82CF51:
cmp	edi, 1A0000h
jnb	short loc_82CF63
mov	eax, edi
shr	eax, 11h
add	eax, 72h
jmp	short loc_82CF68

loc_82CF63:
mov	eax, 7Fh

loc_82CF68:
sub	[ebp+4], edi
lea	edx, ds:0[edi*8]
mov	[ecx], edx
cmp	eax, 5Dh
jb	short loc_82CF8C
cmp	dword ptr [ebp+eax*4+10h], 0
jz	short loc_82CF8C
push	ecx
push	eax
push	edi
mov	ecx, ebp
call	sub_82CAF0
jmp	short loc_82CF97

loc_82CF8C:
mov	edx, [ebp+eax*4+10h]
mov	[ecx+4], edx
mov	[ebp+eax*4+10h], ecx

loc_82CF97:
mov	ecx, [esi]
sub	ebx, edi
add	ebx, ebx
add	ebx, ebx
add	ebx, ebx
mov	eax, ebx
and	eax, 0FFFFFFFBh
and	ecx, 1
or	eax, ecx

loc_82CFAB:
or	eax, 2
mov	[esi], eax
mov	ecx, [ebp+210h]
test	ecx, ecx
jz	short loc_82CFD3
cmp	ecx, esi
ja	short loc_82CFD3
or	eax, 1
pop	edi
mov	[esi], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_82CFCC:
mov	eax, [esi]
and	eax, 0FFFFFFFBh
jmp	short loc_82CFAB

loc_82CFD3:
mov	ebp, [ebp+0Ch]
and	eax, 0FFFFFFFEh
or	eax, ebp
pop	edi
mov	[esi], eax
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_82CE10 endp

align 10h



sub_82CFF0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
add	eax, 0Bh
and	eax, 0FFFFFFF8h
push	eax
call	sub_82CE10
test	eax, eax
jnz	short loc_82D007
retn	4

loc_82D007:
add	eax, 4
retn	4
sub_82CFF0 endp

align 10h



sub_82D010 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	edx, [esi+228h]
lea	ecx, ds:0[eax*8]
push	edi
mov	[esp+1Ch+arg_8], ecx
cmp	edx, [esi+224h]
jnb	loc_82D373
lea	ebx, [ebx+0]

loc_82D040:
mov	ecx, [esi+228h]
test	byte ptr [ecx],	1
mov	[esp+1Ch+var_C], ecx
jz	short loc_82D057
and	dword ptr [ecx], 0FFFFFFFEh
jmp	loc_82D302

loc_82D057:
mov	eax, [ecx]
mov	edx, eax
shr	edx, 2
test	dl, 1
jnz	loc_82D302
mov	edx, eax
mov	ebx, eax
mov	eax, ecx
mov	edi, [eax]
shr	ebx, 1
shr	edi, 3
not	bl
add	eax, edi
shr	edx, 3
and	bl, 1
mov	ebp, edx
mov	[esp+1Ch+var_8], 0
mov	[esi+228h], eax
cmp	eax, [esi+224h]
jnb	loc_82D1AC
lea	ebx, [ebx+0]

loc_82D0A0:
mov	edi, [esi+228h]
test	byte ptr [edi],	1
jnz	loc_82D1A3
mov	eax, [edi]
mov	ecx, eax
shr	ecx, 2
test	cl, 1
jnz	loc_82D1A8
inc	[esp+1Ch+var_8]
mov	ecx, eax
shr	ecx, 3
add	ebp, ecx
shr	eax, 1
mov	[esp+1Ch+var_4], ebp
test	al, 1
jnz	loc_82D173
cmp	ecx, 80h
jnb	short loc_82D0E7
mov	eax, ecx
shr	eax, 3
jmp	short loc_82D146

loc_82D0E7:
cmp	ecx, 400h
jnb	short loc_82D0F9
mov	eax, ecx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82D146

loc_82D0F9:
cmp	ecx, 1000h
jnb	short loc_82D10B
mov	eax, ecx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82D146

loc_82D10B:
cmp	ecx, 2000h
jnb	short loc_82D11D
mov	eax, ecx
shr	eax, 9
add	eax, 54h
jmp	short loc_82D146

loc_82D11D:
cmp	ecx, 20000h
jnb	short loc_82D12F
mov	eax, ecx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82D146

loc_82D12F:
cmp	ecx, 1A0000h
jnb	short loc_82D141
mov	eax, ecx
shr	eax, 11h
add	eax, 72h
jmp	short loc_82D146

loc_82D141:
mov	eax, 7Fh

loc_82D146:
add	[esi+4], ecx
mov	ecx, [esi+4]
cmp	ecx, [esi+8]
jbe	short loc_82D154
mov	[esi+8], ecx

loc_82D154:
lea	ecx, [esi+eax*4+10h]
mov	eax, [ecx]
test	eax, eax
jz	short loc_82D16D
mov	edi, edi

loc_82D160:
cmp	eax, edi
jz	short loc_82D19C
lea	ecx, [eax+4]
mov	eax, [ecx]
test	eax, eax
jnz	short loc_82D160

loc_82D16D:		; Trap to Debugger
int	3

loc_82D16E:
sub	[esp+1Ch+arg_8], 50h

loc_82D173:
mov	eax, [esi+228h]
mov	ecx, [eax]
mov	ebp, [esp+1Ch+var_4]
shr	ecx, 3
add	eax, ecx
mov	ecx, [esp+1Ch+var_C]
mov	[esi+228h], eax
cmp	eax, [esi+224h]
jb	loc_82D0A0
jmp	short loc_82D1AC

loc_82D19C:
mov	eax, [eax+4]
mov	[ecx], eax
jmp	short loc_82D16E

loc_82D1A3:
and	dword ptr [edi], 0FFFFFFFEh
jmp	short loc_82D1AC

loc_82D1A8:
mov	ecx, [esp+1Ch+var_C]

loc_82D1AC:
test	bl, bl
jz	loc_82D25E
cmp	[esp+1Ch+var_8], 0
jz	loc_82D302
cmp	edx, 80h
jnb	short loc_82D1CE
mov	eax, edx
shr	eax, 3
jmp	short loc_82D22D

loc_82D1CE:
cmp	edx, 400h
jnb	short loc_82D1E0
mov	eax, edx
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82D22D

loc_82D1E0:
cmp	edx, 1000h
jnb	short loc_82D1F2
mov	eax, edx
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82D22D

loc_82D1F2:
cmp	edx, 2000h
jnb	short loc_82D204
mov	eax, edx
shr	eax, 9
add	eax, 54h
jmp	short loc_82D22D

loc_82D204:
cmp	edx, 20000h
jnb	short loc_82D216
mov	eax, edx
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82D22D

loc_82D216:
cmp	edx, 1A0000h
jnb	short loc_82D228
mov	eax, edx
shr	eax, 11h
add	eax, 72h
jmp	short loc_82D22D

loc_82D228:
mov	eax, 7Fh

loc_82D22D:
add	[esi+4], edx
mov	ecx, [esi+4]
cmp	ecx, [esi+8]
jbe	short loc_82D23B
mov	[esi+8], ecx

loc_82D23B:
lea	ecx, [esi+eax*4+10h]
mov	eax, [ecx]
test	eax, eax
jz	short loc_82D254

loc_82D245:
cmp	eax, [esp+1Ch+var_C]
jz	short loc_82D26D
lea	ecx, [eax+4]
mov	eax, [ecx]
test	eax, eax
jnz	short loc_82D245

loc_82D254:		; Trap to Debugger
int	3

loc_82D255:
sub	[esp+1Ch+arg_8], 50h
mov	ecx, [esp+1Ch+var_C]

loc_82D25E:
cmp	ebp, 80h
jnb	short loc_82D274
mov	eax, ebp
shr	eax, 3
jmp	short loc_82D2D3

loc_82D26D:
mov	edx, [eax+4]
mov	[ecx], edx
jmp	short loc_82D255

loc_82D274:
cmp	ebp, 400h
jnb	short loc_82D286
mov	eax, ebp
shr	eax, 5
add	eax, 0Ch
jmp	short loc_82D2D3

loc_82D286:
cmp	ebp, 1000h
jnb	short loc_82D298
mov	eax, ebp
shr	eax, 6
add	eax, 1Ch
jmp	short loc_82D2D3

loc_82D298:
cmp	ebp, 2000h
jnb	short loc_82D2AA
mov	eax, ebp
shr	eax, 9
add	eax, 54h
jmp	short loc_82D2D3

loc_82D2AA:
cmp	ebp, 20000h
jnb	short loc_82D2BC
mov	eax, ebp
shr	eax, 0Dh
add	eax, 63h
jmp	short loc_82D2D3

loc_82D2BC:
cmp	ebp, 1A0000h
jnb	short loc_82D2CE
mov	eax, ebp
shr	eax, 11h
add	eax, 72h
jmp	short loc_82D2D3

loc_82D2CE:
mov	eax, 7Fh

loc_82D2D3:
sub	[esi+4], ebp
lea	edx, ds:0[ebp*8]
mov	[ecx], edx
cmp	eax, 5Dh
jb	short loc_82D2F7
cmp	dword ptr [esi+eax*4+10h], 0
jz	short loc_82D2F7
push	ecx
push	eax
push	ebp
mov	ecx, esi
call	sub_82CAF0
jmp	short loc_82D302

loc_82D2F7:
mov	edx, [esi+eax*4+10h]
mov	[ecx+4], edx
mov	[esi+eax*4+10h], ecx

loc_82D302:
mov	eax, [esi+228h]
mov	ecx, [esi+224h]
dec	[esp+1Ch+arg_8]
cmp	eax, ecx
jnb	short loc_82D327
mov	edx, [eax]
shr	edx, 3
add	eax, edx
mov	[esi+228h], eax
cmp	eax, ecx
jb	short loc_82D353

loc_82D327:
mov	eax, [esi+220h]
mov	eax, [eax+4]
mov	[esi+220h], eax
test	eax, eax
jz	short loc_82D353
add	eax, 8
mov	[esi+228h], eax
mov	eax, [esi+220h]
mov	ecx, [eax]
add	ecx, eax
mov	[esi+224h], ecx

loc_82D353:
cmp	[esp+1Ch+arg_4], 0
jz	short loc_82D361
cmp	[esp+1Ch+arg_8], 0
jle	short loc_82D389

loc_82D361:
mov	edx, [esi+228h]
cmp	edx, [esi+224h]
jb	loc_82D040

loc_82D373:
pop	edi
mov	dword ptr [esi+210h], 0
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 0Ch
retn	0Ch

loc_82D389:
mov	eax, [esi+228h]
pop	edi
mov	[esi+210h], eax
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 0Ch
retn	0Ch
sub_82D010 endp

align 10h



sub_82D3B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_4]
mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	ecx, [esp+arg_8]
mov	[eax+4], edx
mov	edx, [esp+arg_C]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
mov	dword ptr [eax+10h], 0
retn	10h
sub_82D3B0 endp

align 10h



sub_82D3E0 proc	near

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= byte ptr	-8
var_7= byte ptr	-7
var_6= byte ptr	-6
var_5= byte ptr	-5
var_4= dword ptr -4

sub	esp, 10h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10h+var_4], eax
mov	eax, ds:dword_14685E0
mov	[esp+10h+var_10], eax
mov	al, 1
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 0
mov	[esp+14h+var_B], al
mov	[esp+14h+var_A], al
mov	al, 4
mov	[esp+14h+var_C], 51h
mov	[esp+14h+var_9], al
mov	[esp+14h+var_8], al
mov	[esp+14h+var_7], al
mov	[esp+14h+var_6], al
mov	[esp+14h+var_5], 0
jnz	short loc_82D43E
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	0Ch
lea	edx, [esp+1Ch+var_10]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D43E:
mov	ecx, [esp+14h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10h
retn	4
sub_82D3E0 endp




sub_82D450 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 0
jnz	short loc_82D472
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	1
lea	ecx, [esp+0Ch+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax

loc_82D472:
pop	esi
retn	4
sub_82D450 endp

align 10h



sub_82D480 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
test	eax, eax
jz	short loc_82D4D8
lea	ebx, [eax+8]
test	ebx, ebx
jz	short loc_82D4D8
push	edi
mov	edi, [eax]
inc	edi
cmp	dword ptr [esi+10h], 0
mov	[esp+0Ch+arg_0], edi
jnz	short loc_82D4D2
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	4
lea	ecx, [esp+14h+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax
test	eax, eax
jnz	short loc_82D4D2
mov	ecx, [esi+8]
mov	edx, [esi]
mov	eax, [esi+4]
push	ecx
push	edi
push	ebx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax

loc_82D4D2:
pop	edi

loc_82D4D3:
pop	esi
pop	ebx
retn	4

loc_82D4D8:
cmp	dword ptr [esi+10h], 0
mov	[esp+8+arg_0], 0
jnz	short loc_82D4D3
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	4
lea	edx, [esp+10h+arg_0]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax
pop	esi
pop	ebx
retn	4
sub_82D480 endp

align 10h



sub_82D510 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [eax+8]
push	esi
push	edi
mov	edi, [eax+4]
mov	esi, ecx
cmp	dword ptr [esi+10h], 0
mov	[esp+0Ch+arg_0], edi
jnz	short loc_82D561
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	4
lea	ecx, [esp+14h+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax
test	eax, eax
jnz	short loc_82D561
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
lea	edx, ds:0[edi*4]
push	edx
push	ebx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D561:
pop	edi
pop	esi
pop	ebx
retn	4
sub_82D510 endp

align 10h



sub_82D570 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, [eax+0Ch]
push	esi
mov	esi, ecx
cmp	dword ptr [esi+10h], 0
push	edi
mov	edi, [eax+10h]
mov	[esp+0Ch+arg_0], ebx
jnz	short loc_82D5A2
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	4
lea	ecx, [esp+14h+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax

loc_82D5A2:
test	ebx, ebx
jbe	loc_82D64C
add	edi, 4
lea	ecx, [ecx+0]

loc_82D5B0:
cmp	dword ptr [esi+10h], 0
mov	cl, [edi-4]
mov	byte ptr [esp+0Ch+arg_0], cl
jnz	short loc_82D5D6
mov	edx, [esi+8]
mov	ecx, [esi]
push	edx
mov	edx, [esi+4]
push	1
lea	eax, [esp+14h+arg_0]
push	eax
push	ecx
call	edx
add	esp, 10h
mov	[esi+10h], eax

loc_82D5D6:
mov	eax, [edi-4]
cmp	eax, 4		; switch 5 cases
ja	short loc_82D63F ; default
			; jumptable 0082D5DE case 2
jmp	ds:off_82D654[eax*4] ; switch jump

loc_82D5E5:		; jumptable 0082D5DE case 1
cmp	dword ptr [esi+10h], 0
mov	al, [edi]
mov	byte ptr [esp+0Ch+arg_0], al
jnz	short loc_82D640 ; jumptable 0082D5DE case 0
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	1
lea	edx, [esp+14h+arg_0]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax
jmp	short loc_82D640 ; jumptable 0082D5DE case 0

loc_82D60C:		; jumptable 0082D5DE case 3
cmp	dword ptr [esi+10h], 0
fld	dword ptr [edi]
fstp	[esp+0Ch+arg_0]
jnz	short loc_82D640 ; jumptable 0082D5DE case 0
mov	edx, [esi+8]
mov	ecx, [esi]
push	edx
mov	edx, [esi+4]
push	4
lea	eax, [esp+14h+arg_0]
push	eax
push	ecx
call	edx
add	esp, 10h
mov	[esi+10h], eax
jmp	short loc_82D640 ; jumptable 0082D5DE case 0

loc_82D633:		; jumptable 0082D5DE case 4
mov	eax, [edi]
push	eax
mov	ecx, esi
call	sub_82D480
jmp	short loc_82D640 ; jumptable 0082D5DE case 0

loc_82D63F:		; Trap to Debugger
int	3

loc_82D640:		; jumptable 0082D5DE case 0
add	edi, 8
sub	ebx, 1
jnz	loc_82D5B0

loc_82D64C:
pop	edi
pop	esi
pop	ebx
retn	4
sub_82D570 endp

align 4
off_82D654 dd offset loc_82D640	; jump table for switch	statement
dd offset loc_82D5E5
dd offset loc_82D63F
dd offset loc_82D60C
dd offset loc_82D633
align 10h



sub_82D670 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, [edi+14h]
mov	ebx, ecx
cmp	dword ptr [ebx+10h], 0
mov	[esp+0Ch+arg_0], eax
jnz	short loc_82D69F
mov	ecx, [ebx+8]
mov	eax, [ebx]
push	ecx
mov	ecx, [ebx+4]
push	4
lea	edx, [esp+14h+arg_0]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[ebx+10h], eax

loc_82D69F:
xor	esi, esi
cmp	[edi+14h], esi
jbe	short loc_82D6BC

loc_82D6A6:
mov	edx, [edi+18h]
mov	eax, [edx+esi*4]
push	0
push	eax
mov	ecx, ebx
call	sub_82D870
inc	esi
cmp	esi, [edi+14h]
jb	short loc_82D6A6

loc_82D6BC:
pop	edi
pop	esi
pop	ebx
retn	4
sub_82D670 endp

align 10h



sub_82D6D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	ebx
mov	ebx, [esp+8+arg_0]
push	ebp
push	esi
mov	esi, ecx
cmp	dword ptr [esi+0Ch], 0
push	edi
jz	short loc_82D6E5
xor	edi, edi
jmp	short loc_82D6E8

loc_82D6E5:
mov	edi, [ebx+24h]

loc_82D6E8:
cmp	dword ptr [esi+10h], 0
mov	ebp, [ebx+28h]
mov	[esp+14h+arg_0], edi
jnz	short loc_82D72D
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	4
lea	ecx, [esp+1Ch+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax
test	eax, eax
jnz	short loc_82D72D
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
lea	edx, ds:0[edi*4]
push	edx
push	ebp
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D72D:
cmp	dword ptr [esi+0Ch], 0
jz	short loc_82D737
xor	ebp, ebp
jmp	short loc_82D73A

loc_82D737:
mov	ebp, [ebx+3Ch]

loc_82D73A:
cmp	dword ptr [esi+10h], 0
mov	[esp+14h+arg_0], ebp
jnz	short loc_82D75D
mov	edx, [esi+8]
mov	ecx, [esi]
push	edx
mov	edx, [esi+4]
push	4
lea	eax, [esp+1Ch+arg_0]
push	eax
push	ecx
call	edx
add	esp, 10h
mov	[esi+10h], eax

loc_82D75D:
test	ebp, ebp
jbe	short loc_82D7CD
xor	edi, edi

loc_82D763:
mov	eax, [ebx+40h]
mov	ecx, [eax+edi]
push	ecx
mov	ecx, esi
call	sub_82D480
cmp	dword ptr [esi+10h], 0
mov	edx, [ebx+40h]
mov	eax, [edx+edi+4]
mov	[esp+14h+arg_0], eax
jnz	short loc_82D79B
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	4
lea	edx, [esp+1Ch+arg_0]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D79B:
cmp	dword ptr [esi+10h], 0
mov	edx, [ebx+40h]
mov	eax, [edx+edi+8]
mov	[esp+14h+var_4], eax
jnz	short loc_82D7C5
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	4
lea	edx, [esp+1Ch+var_4]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D7C5:
add	edi, 0Ch
sub	ebp, 1
jnz	short loc_82D763

loc_82D7CD:
cmp	byte ptr [ebx],	1
jnz	short loc_82D81F
mov	eax, [esi]
mov	ecx, [eax]
push	13h
push	offset aChunkParameter ; "(*chunk parameters)"
push	eax
add	ecx, 2A0h
call	sub_81FBA0
mov	edx, [ebx+30h]
cmp	[edx], eax
jnz	short loc_82D81F
cmp	dword ptr [esi+10h], 0
mov	[esp+14h+arg_0], 0
jnz	short loc_82D868
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	4
lea	ecx, [esp+1Ch+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
pop	edi
mov	[esi+10h], eax
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4

loc_82D81F:
cmp	dword ptr [esi+0Ch], 0
jz	short loc_82D829
xor	ebp, ebp
jmp	short loc_82D82C

loc_82D829:
mov	ebp, [ebx+2Ch]

loc_82D82C:
cmp	dword ptr [esi+10h], 0
mov	[esp+14h+arg_0], ebp
jnz	short loc_82D84F
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	4
lea	edx, [esp+1Ch+arg_0]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D84F:
xor	edi, edi
test	ebp, ebp
jbe	short loc_82D868

loc_82D855:
mov	edx, [ebx+30h]
mov	eax, [edx+edi*4]
push	eax
mov	ecx, esi
call	sub_82D480
inc	edi
cmp	edi, ebp
jb	short loc_82D855

loc_82D868:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	4
sub_82D6D0 endp




sub_82D870 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
cmp	dword ptr [esi+0Ch], 0
push	edi
mov	edi, [esp+8+arg_0]
jz	short loc_82D882
xor	eax, eax
jmp	short loc_82D885

loc_82D882:
mov	eax, [edi+34h]

loc_82D885:
push	eax
call	sub_82D480
cmp	dword ptr [esi+0Ch], 0
jz	short loc_82D895
xor	eax, eax
jmp	short loc_82D898

loc_82D895:
mov	eax, [edi+38h]

loc_82D898:
push	eax
mov	ecx, esi
call	sub_82D480
cmp	dword ptr [esi+10h], 0
mov	eax, [edi+1Ch]
mov	[esp+8+arg_0], eax
jnz	short loc_82D8C6
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	4
lea	edx, [esp+10h+arg_0]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D8C6:
cmp	dword ptr [esi+10h], 0
mov	edx, [edi+20h]
mov	[esp+8+arg_0], edx
jnz	short loc_82D8EC
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	4
lea	ecx, [esp+10h+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax

loc_82D8EC:
cmp	[esp+8+arg_4], 0
jz	short loc_82D948
cmp	byte ptr [edi+2], 2
jnz	short loc_82D927
cmp	byte ptr [edi],	1
jnz	short loc_82D927
mov	eax, [esi]
mov	ecx, [eax]
push	13h
push	offset aChunkParameter ; "(*chunk parameters)"
push	eax
add	ecx, 2A0h
call	sub_81FBA0
mov	ecx, [edi+30h]
cmp	[ecx], eax
jnz	short loc_82D927
push	0
mov	ecx, esi
call	sub_82D450
jmp	short loc_82D96D

loc_82D927:
cmp	dword ptr [esi+10h], 0
mov	dl, [edi]
mov	byte ptr [esp+8+arg_0],	dl
jnz	short loc_82D96D
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	1
lea	ecx, [esp+10h+arg_0]
push	ecx
push	edx
call	eax
jmp	short loc_82D967

loc_82D948:
cmp	dword ptr [esi+10h], 0
mov	cl, [edi]
mov	byte ptr [esp+8+arg_0],	cl
jnz	short loc_82D96D
mov	edx, [esi+8]
mov	ecx, [esi]
push	edx
mov	edx, [esi+4]
push	1
lea	eax, [esp+10h+arg_0]
push	eax
push	ecx
call	edx

loc_82D967:
mov	[esi+10h], eax
add	esp, 10h

loc_82D96D:
cmp	dword ptr [esi+10h], 0
mov	al, [edi+1]
mov	byte ptr [esp+8+arg_0],	al
jnz	short loc_82D993
mov	ecx, [esi+8]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+4]
push	1
lea	edx, [esp+10h+arg_0]
push	edx
push	eax
call	ecx
add	esp, 10h
mov	[esi+10h], eax

loc_82D993:
cmp	dword ptr [esi+10h], 0
mov	dl, [edi+2]
mov	byte ptr [esp+8+arg_0],	dl
jnz	short loc_82D9B9
mov	eax, [esi+8]
mov	edx, [esi]
push	eax
mov	eax, [esi+4]
push	1
lea	ecx, [esp+10h+arg_0]
push	ecx
push	edx
call	eax
add	esp, 10h
mov	[esi+10h], eax

loc_82D9B9:
cmp	dword ptr [esi+10h], 0
mov	cl, [edi+3]
mov	byte ptr [esp+8+arg_0],	cl
jnz	short loc_82D9DF
mov	edx, [esi+8]
mov	ecx, [esi]
push	edx
mov	edx, [esi+4]
push	1
lea	eax, [esp+10h+arg_0]
push	eax
push	ecx
call	edx
add	esp, 10h
mov	[esi+10h], eax

loc_82D9DF:
push	edi
mov	ecx, esi
call	sub_82D510
push	edi
mov	ecx, esi
call	sub_82D570
push	edi
mov	ecx, esi
call	sub_82D670
push	edi
mov	ecx, esi
call	sub_82D6D0
pop	edi
pop	esi
retn	8
sub_82D870 endp

align 10h



sub_82DA10 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_82D3E0
push	1
push	edi
mov	ecx, esi
call	sub_82D870
mov	eax, [esi+10h]
pop	edi
pop	esi
retn	4
sub_82DA10 endp




sub_82DA30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	esi
mov	esi, ecx
xor	ecx, ecx
push	edi
xor	edi, edi
mov	[esi+4], eax
mov	edx, 4
mul	edx
seto	cl
mov	dword ptr [esi], offset	off_1468748
mov	[esi+8], edi
mov	[esi+0Ch], edi
mov	[esi+10h], edi
mov	[esi+14h], edi
mov	[esi+18h], edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi+8], eax
mov	eax, [esi+4]
xor	ecx, ecx
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi+0Ch], eax
add	esp, 8
xor	eax, eax
cmp	[esi+4], edi
jle	short loc_82DAAC
mov	ecx, [esp+8+arg_0]
push	ebx

loc_82DA96:
mov	edx, [esi+8]
mov	ebx, [ecx+eax*4]
mov	[edx+eax*4], ebx
mov	edx, [esi+0Ch]
mov	[edx+eax*4], edi
inc	eax
cmp	eax, [esi+4]
jl	short loc_82DA96
pop	ebx

loc_82DAAC:
pop	edi
mov	eax, esi
pop	esi
retn	8
sub_82DA30 endp

align 10h



sub_82DAC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi+4]
xor	ecx, ecx
inc	eax
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebp, eax
mov	eax, [esi+4]
xor	ecx, ecx
inc	eax
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebx, eax
mov	eax, [esi+4]
inc	eax
add	esp, 8
xor	ecx, ecx
mov	[esp+10h+var_4], ebx
test	eax, eax
jle	short loc_82DB47
push	edi
mov	edx, ebx
xor	edi, edi
mov	eax, ebp
sub	edx, ebp

loc_82DB18:
cmp	ecx, [esp+14h+arg_0]
jnz	short loc_82DB24
mov	ebx, [esp+14h+arg_4]
jmp	short loc_82DB2D

loc_82DB24:
mov	ebx, [esi+8]
mov	ebx, [edi+ebx]
add	edi, 4

loc_82DB2D:
mov	[eax], ebx
mov	dword ptr [edx+eax], 0
mov	ebx, [esi+4]
inc	ecx
inc	ebx
add	eax, 4
cmp	ecx, ebx
jl	short loc_82DB18
mov	ebx, [esp+14h+var_4]
pop	edi

loc_82DB47:
mov	ecx, [esi+8]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	edx, [esi+0Ch]
push	edx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 8
inc	dword ptr [esi+4]
mov	[esi+8], ebp
mov	[esi+0Ch], ebx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn	8
sub_82DAC0 endp

align 10h



sub_82DB70 proc	near
push	ebp
xor	ebp, ebp
push	esi
mov	esi, ecx
test	ecx, ecx
jz	short loc_82DBCC
push	ebx
push	edi
lea	esp, [esp+0]

loc_82DB80:
mov	edi, [esi+4]
mov	eax, [esi+8]
mov	eax, [eax+edi*4-4]
mov	edx, eax
and	edx, 3Fh
cmp	edx, 16h
jz	short loc_82DB9E
cmp	edx, 1Eh
jbe	short loc_82DBC1
cmp	edx, 20h
ja	short loc_82DBC1

loc_82DB9E:
shr	eax, 0Eh
add	eax, edi
lea	ebx, [eax+ebp-1FFFFh]
xor	edx, edx
mov	eax, ecx
mov	edi, edi

loc_82DBB0:
cmp	edx, ebx
jz	short loc_82DBBE
add	edx, [eax+4]
mov	eax, [eax+10h]
test	eax, eax
jnz	short loc_82DBB0

loc_82DBBE:
mov	[esi+14h], eax

loc_82DBC1:
mov	esi, [esi+10h]
add	ebp, edi
test	esi, esi
jnz	short loc_82DB80
pop	edi
pop	ebx

loc_82DBCC:
pop	esi
pop	ebp
retn
sub_82DB70 endp

align 10h



sub_82DBD0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
push	ebx
push	ebp
mov	ebp, ecx
xor	ebx, ebx
push	esi
mov	[esp+18h+var_4], ebx
mov	eax, ebp
test	ebp, ebp
jz	short loc_82DBF5

loc_82DBE4:
mov	[eax+18h], ebx
add	ebx, [eax+4]
mov	eax, [eax+10h]
test	eax, eax
jnz	short loc_82DBE4
mov	[esp+18h+var_4], ebx

loc_82DBF5:
xor	ecx, ecx
mov	eax, ebx
mov	edx, 4
mul	edx
seto	cl
push	edi
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esp+20h+var_C], eax
xor	ecx, ecx
mov	eax, ebx
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 8
xor	edi, edi
mov	[esp+1Ch+var_8], eax
mov	eax, ebp
test	ebp, ebp
jz	short loc_82DCB6
lea	esp, [esp+0]

loc_82DC40:
xor	edx, edx
cmp	[eax+4], edx
jle	short loc_82DC72
mov	ecx, [esp+1Ch+var_8]
mov	esi, [esp+1Ch+var_C]
sub	esi, [esp+1Ch+var_8]
lea	ecx, [ecx+edi*4]

loc_82DC56:
mov	ebx, [eax+8]
mov	ebx, [ebx+edx*4]
mov	[esi+ecx], ebx
mov	dword ptr [ecx], 0
inc	edx
add	ecx, 4
cmp	edx, [eax+4]
jl	short loc_82DC56
mov	ebx, [esp+1Ch+var_4]

loc_82DC72:
mov	edx, [eax+14h]
test	edx, edx
jz	short loc_82DCAC
mov	edx, [edx+18h]
mov	ecx, [eax+4]
mov	esi, [eax+8]
mov	esi, [esi+ecx*4-4]
sub	edx, ecx
sub	edx, edi
add	edx, 1FFFFh
shl	edx, 0Eh
and	esi, 3FFFh
or	esi, edx
mov	edx, [esp+1Ch+var_C]
add	ecx, edi
mov	[edx+ecx*4-4], esi
mov	dword ptr [eax+14h], 0

loc_82DCAC:
add	edi, [eax+4]
mov	eax, [eax+10h]
test	eax, eax
jnz	short loc_82DC40

loc_82DCB6:
mov	ecx, [ebp+10h]
pop	edi
test	ecx, ecx
jz	short loc_82DCD1
mov	edi, edi

loc_82DCC0:
mov	eax, [ecx]
mov	edx, [eax]
mov	esi, [ecx+10h]
push	1
call	edx
mov	ecx, esi
test	esi, esi
jnz	short loc_82DCC0

loc_82DCD1:
mov	eax, [ebp+8]
push	eax		; void *
mov	dword ptr [ebp+10h], 0
call	??3@YAXPAX@Z	; operator delete(void *)
mov	ecx, [ebp+0Ch]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
mov	edx, [esp+20h+var_C]
mov	eax, [esp+20h+var_8]
add	esp, 8
pop	esi
mov	[ebp+4], ebx
mov	[ebp+8], edx
mov	[ebp+0Ch], eax
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_82DBD0 endp

align 10h



sub_82DD10 proc	near
xor	eax, eax
cmp	[ecx+4], eax
jle	locret_82DD98
push	esi
push	edi
lea	edi, [eax+1]

loc_82DD20:
mov	edx, [ecx+8]
mov	edx, [edx+eax*4]
mov	esi, edx
and	esi, 3Fh
add	esi, 0FFFFFFFEh
cmp	esi, 23h	; switch 36 cases
ja	short loc_82DD8F ; default
			; jumptable 0082DD3A cases 1-19,28,33,34
movzx	esi, ds:byte_82DDB8[esi]
jmp	ds:off_82DD9C[esi*4] ; switch jump

loc_82DD41:		; jumptable 0082DD3A case 0
test	edx, (offset loc_7FBFFF+1)
jz	short loc_82DD8F ; default
			; jumptable 0082DD3A cases 1-19,28,33,34

loc_82DD49:		; jumptable 0082DD3A cases 21-25,31
mov	edx, [ecx+0Ch]
mov	[edx+eax*4+4], edi
mov	edx, [ecx+0Ch]
mov	[edx+eax*4+8], edi
jmp	short loc_82DD8F ; default
			; jumptable 0082DD3A cases 1-19,28,33,34

loc_82DD59:		; jumptable 0082DD3A cases 20,29,30
mov	edx, [ecx+0Ch]
mov	[edx+eax*4+4], edi
mov	edx, [ecx+8]
mov	edx, [edx+eax*4]
mov	esi, [ecx+0Ch]
shr	edx, 0Eh
add	edx, eax
mov	[esi+edx*4-7FFF8h], edi
jmp	short loc_82DD8F ; default
			; jumptable 0082DD3A cases 1-19,28,33,34

loc_82DD77:		; jumptable 0082DD3A case 32
test	edx, (offset loc_7FBFFF+1)
mov	edx, [ecx+0Ch]
jnz	short loc_82DD8B
mov	[edx+eax*4+8], edi
jmp	short loc_82DD8F ; default
			; jumptable 0082DD3A cases 1-19,28,33,34

loc_82DD88:		; jumptable 0082DD3A cases 26,27,35
mov	edx, [ecx+0Ch]

loc_82DD8B:
mov	[edx+eax*4+4], edi

loc_82DD8F:		; default
add	eax, edi	; jumptable 0082DD3A cases 1-19,28,33,34
cmp	eax, [ecx+4]
jl	short loc_82DD20
pop	edi
pop	esi

locret_82DD98:
retn
sub_82DD10 endp

align 4
off_82DD9C dd offset loc_82DD41	; jump table for switch	statement
dd offset loc_82DD59
dd offset loc_82DD49
dd offset loc_82DD88
dd offset loc_82DD8F
dd offset loc_82DD77
dd offset loc_82DD8F
byte_82DDB8 db	    0,	   6,	  6,	 6 ; indirect table for	switch statement
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	6,     6,     6,     6
db	1,     2,     2,     2
db	2,     2,     3,     3
db	4,     1,     1,     2
db	5,     6,     6,     3
align 10h



sub_82DDE0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	ebp
push	esi
mov	esi, ecx
xor	ebp, ebp
cmp	[esi+4], ebp
push	edi
jle	short loc_82DE02
mov	eax, [esi+0Ch]
mov	ecx, [esi+4]

loc_82DDF4:
cmp	dword ptr [eax], 0
jnz	short loc_82DDFA
inc	ebp

loc_82DDFA:
add	eax, 4
sub	ecx, 1
jnz	short loc_82DDF4

loc_82DE02:
xor	ecx, ecx
mov	eax, ebp
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	edi, eax
xor	ecx, ecx
mov	eax, ebp
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebx, eax
xor	eax, eax
add	esp, 8
cmp	[esi+4], eax
mov	[esp+14h+var_4], ebx
jle	short loc_82DE75
mov	edx, ebx
mov	ecx, edi
sub	edx, edi
lea	ebx, [ebx+0]

loc_82DE50:
mov	ebx, [esi+0Ch]
cmp	dword ptr [ebx+eax*4], 0
jnz	short loc_82DE6B
mov	dword ptr [edx+ecx], 0
mov	ebx, [esi+8]
mov	ebx, [ebx+eax*4]
mov	[ecx], ebx
add	ecx, 4

loc_82DE6B:
inc	eax
cmp	eax, [esi+4]
jl	short loc_82DE50
mov	ebx, [esp+14h+var_4]

loc_82DE75:
mov	eax, [esi+8]
push	eax		; void *
mov	[esi+4], ebp
call	??3@YAXPAX@Z	; operator delete(void *)
mov	ecx, [esi+0Ch]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 8
mov	[esi+8], edi
pop	edi
mov	[esi+0Ch], ebx
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_82DDE0 endp

align 10h



sub_82DEA0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
mov	esi, ecx
xor	ecx, ecx
mov	eax, edi
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ebp, eax
mov	eax, [esi+8]
lea	ebx, ds:0[edi*4]
push	ebx
push	eax
push	ebp
mov	[esp+20h+arg_0], ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
push	1Ch		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 14h
test	eax, eax
jz	short loc_82DEFD
mov	ecx, [esi+4]
mov	edx, [esi+8]
sub	ecx, edi
push	ecx
add	edx, ebx
push	edx
mov	ecx, eax
call	sub_82DA30
jmp	short loc_82DEFF

loc_82DEFD:
xor	eax, eax

loc_82DEFF:
mov	ecx, [esi+10h]
mov	[eax+10h], ecx
lea	ecx, [edi+1]
cmp	ecx, [esi+4]
jge	short loc_82DF2E
mov	edx, ecx
sub	edx, edi
add	edx, edx
add	edx, edx

loc_82DF15:
mov	ebx, [esi+0Ch]
mov	ebx, [ebx+ecx*4]
mov	ebp, [eax+0Ch]
mov	[edx+ebp], ebx
inc	ecx
add	edx, 4
cmp	ecx, [esi+4]
jl	short loc_82DF15
mov	ebp, [esp+10h+arg_0]

loc_82DF2E:
mov	edx, [esi+8]
push	edx		; void *
mov	[esi+10h], eax
mov	[esi+4], edi
call	??3@YAXPAX@Z	; operator delete(void *)
mov	eax, [esi+0Ch]
push	eax		; void *
mov	[esi+8], ebp
call	??3@YAXPAX@Z	; operator delete(void *)
xor	ecx, ecx
mov	eax, edi
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	[esi+0Ch], eax
xor	eax, eax
add	esp, 0Ch
cmp	[esi+4], eax
jle	short loc_82DF80
mov	edi, edi

loc_82DF70:
mov	ecx, [esi+0Ch]
mov	dword ptr [ecx+eax*4], 0
inc	eax
cmp	eax, [esi+4]
jl	short loc_82DF70

loc_82DF80:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_82DEA0 endp

align 10h



; int __thiscall sub_82DF90(void *, char)
sub_82DF90 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	eax		; void *
mov	dword ptr [esi], offset	off_1468748
call	??3@YAXPAX@Z	; operator delete(void *)
mov	ecx, [esi+0Ch]
push	ecx		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
xor	eax, eax
add	esp, 8
test	[esp+4+arg_0], 1
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+4], eax
mov	[esi+10h], eax
jz	short loc_82DFCC
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_82DFCC:
mov	eax, esi
pop	esi
retn	4
sub_82DF90 endp

align 10h



sub_82DFE0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
mov	ebx, ecx
push	ebp
push	esi
mov	ecx, eax
shl	ecx, 9
push	edi
lea	esi, [ecx+ebx+80Ch]
lea	edi, [ebx+eax*4+80Ch]
mov	ebp, 80h

loc_82E002:
mov	eax, [esi]
cmp	eax, 0FFFFFFFFh
jz	short loc_82E017
push	eax
mov	ecx, ebx
call	sub_82DFE0
mov	dword ptr [esi], 0FFFFFFFFh

loc_82E017:
mov	eax, [edi]
cmp	eax, 0FFFFFFFFh
jz	short loc_82E02C
push	eax
mov	ecx, ebx
call	sub_82DFE0
mov	dword ptr [edi], 0FFFFFFFFh

loc_82E02C:
add	esi, 4
add	edi, 200h
sub	ebp, 1
jnz	short loc_82E002
mov	edx, [esp+10h+arg_0]
pop	edi
pop	esi
pop	ebp
lea	eax, [ebx+0Ch]
mov	ecx, 200h
pop	ebx
lea	ebx, [ebx+0]

loc_82E050:
cmp	[eax], edx
jnz	short loc_82E05A
mov	dword ptr [eax], 0FFFFFFFFh

loc_82E05A:
add	eax, 4
sub	ecx, 1
jnz	short loc_82E050
retn	4
sub_82DFE0 endp

align 10h



sub_82E070 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+4]
xor	edx, edx
cmp	[eax+4], edx
mov	[esp+8+var_4], edx
jle	loc_82E36B
push	ebx
push	ebp
push	edi
or	ebp, 0FFFFFFFFh
lea	esp, [esp+0]

loc_82E090:
mov	ecx, [esi+4]
mov	eax, [ecx+8]
mov	edi, [eax+edx*4]
mov	eax, edi
and	eax, 3Fh
cmp	eax, 28h	; switch 41 cases
ja	loc_82E352	; default
			; jumptable 0082E0AE case 38
movzx	ecx, ds:byte_82E398[eax]
jmp	ds:off_82E370[ecx*4] ; switch jump

loc_82E0B5:		; jumptable 0082E0AE case 6
mov	eax, edi
shr	eax, 17h
cmp	[esi+eax*4+0Ch], ebp
jnz	short loc_82E0CA
mov	ecx, [esi+8]
mov	[esi+eax*4+0Ch], ecx
inc	dword ptr [esi+8]

loc_82E0CA:
mov	ecx, [esi+eax*4+0Ch]
mov	eax, edi
shr	eax, 0Eh
and	eax, 1FFh
cmp	[esi+eax*4+0Ch], ebp
jnz	short loc_82E0E8
mov	ebx, [esi+8]
mov	[esi+eax*4+0Ch], ebx
inc	dword ptr [esi+8]

loc_82E0E8:
mov	eax, [esi+eax*4+0Ch]
shl	ecx, 7
add	ecx, eax
lea	eax, [esi+ecx*4+80Ch]
mov	ecx, [eax]
shr	edi, 6
and	edi, 0FFh
cmp	ecx, ebp
jz	short loc_82E11D
mov	[esi+edi*4+0Ch], ecx
mov	ecx, [esi+4]
mov	eax, [ecx+0Ch]
mov	ecx, [esi+edi*4+0Ch]
mov	[eax+edx*4], ecx
jmp	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E11D:
mov	ebx, [esi+8]
lea	edx, [ebx+1]
mov	[esi+8], edx
mov	[esi+edi*4+0Ch], ebx
mov	[eax], ebx

loc_82E12C:		; size_t
push	0Ch
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_82E156
mov	ecx, [esp+14h+var_4]
mov	[eax], ecx
mov	[eax+4], edi
mov	dword ptr [eax+8], 0
mov	[esi+ebx*4+1080Ch], eax
jmp	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E156:
xor	eax, eax
mov	[esi+ebx*4+1080Ch], eax
jmp	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E164:		; jumptable 0082E0AE case 9
mov	eax, edi
shr	eax, 6
and	eax, 0FFh
cmp	[esi+eax*4+0Ch], ebp
jnz	short loc_82E17E
mov	edx, [esi+8]
mov	[esi+eax*4+0Ch], edx
inc	dword ptr [esi+8]

loc_82E17E:
mov	ecx, [esi+eax*4+0Ch]
mov	eax, edi
shr	eax, 17h
cmp	[esi+eax*4+0Ch], ebp
jnz	short loc_82E197
mov	edx, [esi+8]
mov	[esi+eax*4+0Ch], edx
inc	dword ptr [esi+8]

loc_82E197:
mov	eax, [esi+eax*4+0Ch]
shl	ecx, 7
add	ecx, eax
mov	eax, [esi+ecx*4+80Ch]
lea	ebx, [esi+ecx*4+80Ch]
cmp	eax, ebp
jz	short loc_82E1BA
push	eax
mov	ecx, esi
call	sub_82DFE0

loc_82E1BA:
shr	edi, 0Eh
and	edi, 1FFh
cmp	[esi+edi*4+0Ch], ebp
jz	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39
cmp	edi, 100h
jnb	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39
mov	eax, [esi+edi*4+0Ch]
mov	[ebx], eax
mov	ebx, [esi+edi*4+0Ch]
cmp	dword ptr [esi+ebx*4+1080Ch], 0
jnz	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39
jmp	loc_82E12C

loc_82E1F6:		; jumptable 0082E0AE case 0
mov	eax, edi
shr	eax, 17h
cmp	[esi+eax*4+0Ch], ebp
jnz	short loc_82E20B
mov	edx, [esi+8]
mov	[esi+eax*4+0Ch], edx
inc	dword ptr [esi+8]

loc_82E20B:
mov	eax, [esi+eax*4+0Ch]
shr	edi, 6
and	edi, 0FFh
mov	[esi+edi*4+0Ch], eax
jmp	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E221:		; jumptable 0082E0AE case 3
mov	eax, edi
shr	eax, 6
shr	edi, 17h
and	eax, 0FFh
sub	edi, eax
inc	edi
test	edi, edi
jle	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39
lea	ecx, [esi+eax*4+0Ch]
lea	ecx, [ecx+0]

loc_82E240:
mov	eax, [esi+8]
lea	edx, [eax+1]
mov	[esi+8], edx
mov	[ecx], eax
add	ecx, 4
sub	edi, 1
jnz	short loc_82E240
jmp	loc_82E353	; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E258:		; jumptable 0082E0AE case 11
mov	eax, edi
shr	eax, 17h
cmp	[esi+eax*4+0Ch], ebp
jnz	short loc_82E274
mov	ecx, [esi+8]
mov	[esi+eax*4+0Ch], ecx
mov	ecx, 1
add	[esi+8], ecx
jmp	short loc_82E279

loc_82E274:
mov	ecx, 1

loc_82E279:
mov	edx, [esi+eax*4+0Ch]
mov	ebx, edi
shr	ebx, 6
and	ebx, 0FFh
mov	[esi+ebx*4+10h], edx
cmp	[esi+eax*4+0Ch], ebp
jnz	short loc_82E29C
mov	edx, [esi+8]
mov	[esi+eax*4+0Ch], edx
add	[esi+8], ecx

loc_82E29C:
mov	eax, [esi+eax*4+0Ch]
shr	edi, 0Eh
and	edi, 1FFh
cmp	[esi+edi*4+0Ch], ebp
jnz	short loc_82E2B9
mov	edx, [esi+8]
mov	[esi+edi*4+0Ch], edx
add	[esi+8], ecx

loc_82E2B9:
mov	edi, [esi+edi*4+0Ch]
shl	eax, 7
add	eax, edi
mov	edi, [esi+eax*4+80Ch]
lea	eax, [esi+eax*4+80Ch]
cmp	edi, ebp
jnz	short loc_82E313
mov	edi, [esi+8]
lea	ecx, [edi+1]
mov	[esi+8], ecx
push	0Ch		; size_t
mov	[eax], edi
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_82E30A
mov	edx, [esp+14h+var_4]
mov	[eax], edx
mov	[eax+4], ebx
mov	dword ptr [eax+8], 0
mov	[esi+edi*4+1080Ch], eax
mov	[esi+ebx*4+0Ch], edi
jmp	short loc_82E353 ; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E30A:
xor	eax, eax
mov	[esi+edi*4+1080Ch], eax

loc_82E313:
mov	[esi+ebx*4+0Ch], edi
jmp	short loc_82E353 ; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E319:		; jumptable 0082E0AE cases 1,2,4,5,10,12-21,27,36
mov	eax, [esi+8]
shr	edi, 6
lea	ecx, [eax+1]
and	edi, 0FFh
mov	[esi+8], ecx
mov	[esi+edi*4+0Ch], eax
jmp	short loc_82E353 ; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E331:		; jumptable 0082E0AE case 34
test	edi, (offset loc_7FBFFF+1)
jnz	short loc_82E353 ; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39
inc	edx
mov	[esp+14h+var_4], edx
jmp	short loc_82E353 ; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E340:		; jumptable 0082E0AE case 40
mov	eax, [esi+8]
lea	edx, [eax+1]
shr	edi, 17h
mov	[esi+8], edx
mov	[esi+edi*4+0Ch], eax
jmp	short loc_82E353 ; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39

loc_82E352:		; Trap to Debugger
int	3

loc_82E353:		; jumptable 0082E0AE cases 7,8,22-26,28-33,35,37,39
mov	edx, [esp+14h+var_4]
mov	eax, [esi+4]
inc	edx
cmp	edx, [eax+4]
mov	[esp+14h+var_4], edx
jl	loc_82E090
pop	edi
pop	ebp
pop	ebx

loc_82E36B:
pop	esi
pop	ecx
retn
sub_82E070 endp

align 10h
off_82E370 dd offset loc_82E1F6	; jump table for switch	statement
dd offset loc_82E319
dd offset loc_82E221
dd offset loc_82E0B5
dd offset loc_82E353
dd offset loc_82E164
dd offset loc_82E258
dd offset loc_82E331
dd offset loc_82E340
dd offset loc_82E352
byte_82E398 db	    0,	   1,	  1,	 2 ; indirect table for	switch statement
db	1,     1,     3,     4
db	4,     5,     1,     6
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     4,     4
db	4,     4,     4,     1
db	4,     4,     4,     4
db	4,     4,     7,     4
db	1,     4,     9,     4
db	8
align 10h



sub_82E3D0 proc	near

var_84=	byte ptr -84h
var_4= dword ptr -4

sub	esp, 84h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+84h+var_4], eax
push	ebx
push	ebp
push	esi
push	edi
push	80h		; size_t
lea	eax, [esp+98h+var_84]
push	0		; int
push	eax		; void *
mov	esi, ecx
call	_memset
mov	ecx, [esi+4]
xor	edx, edx
add	esp, 0Ch
cmp	[ecx+4], edx
jle	short loc_82E470
jmp	short loc_82E410
align 10h

loc_82E410:
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+edx*4]
cmp	eax, 0FFFFFFFFh
jz	short loc_82E467
cmp	[esp+eax+94h+var_84], 0
jnz	short loc_82E440
mov	ecx, [esi+eax*4+1080Ch]
mov	edi, [esi+10A0Ch]
mov	[ecx+8], edi
inc	dword ptr [esi+10A0Ch]
mov	[esp+eax+94h+var_84], 1

loc_82E440:
mov	ecx, [esi+4]
mov	ecx, [ecx+8]
mov	edi, [ecx+edx*4]
mov	eax, [esi+eax*4+1080Ch]
lea	ecx, [ecx+edx*4]
and	edi, 3FC0h
shl	edi, 0Bh
or	edi, [eax+8]
shl	edi, 6
or	edi, 28h
mov	[ecx], edi

loc_82E467:
mov	ecx, [esi+4]
inc	edx
cmp	edx, [ecx+4]
jl	short loc_82E410

loc_82E470:
xor	ebx, ebx
xor	ebp, ebp
lea	edi, [esi+1080Ch]
lea	ebx, [ebx+0]

loc_82E480:
cmp	[esp+ebp+94h+var_84], 0
jz	short loc_82E4A9
mov	eax, [edi]
mov	edx, [eax+4]
shl	edx, 11h
or	edx, [eax+8]
mov	eax, [eax]
shl	edx, 6
or	edx, 27h
lea	ecx, [ebx+eax+1]
push	edx
push	ecx
mov	ecx, [esi+4]
call	sub_82DAC0
inc	ebx

loc_82E4A9:
inc	ebp
add	edi, 4
cmp	ebp, 80h
jl	short loc_82E480
mov	ecx, [esp+94h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 84h
retn
sub_82E3D0 endp

align 10h



sub_82E4D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, ecx
mov	[edx+4], eax
push	esi
push	edi
xor	esi, esi
or	eax, 0FFFFFFFFh
mov	dword ptr [edx], offset	off_1468750
mov	[edx+8], esi
mov	[edx+10A0Ch], esi
lea	edi, [edx+0Ch]
mov	ecx, 200h
rep stosd
or	eax, eax
lea	edi, [edx+80Ch]
mov	ecx, 4000h
rep stosd
mov	ecx, [edx+4]
xor	eax, eax
cmp	[ecx+4], esi
jle	short loc_82E522

loc_82E512:
mov	esi, [ecx+0Ch]
mov	dword ptr [esi+eax*4], 0FFFFFFFFh
inc	eax
cmp	eax, [ecx+4]
jl	short loc_82E512

loc_82E522:
xor	eax, eax
lea	edi, [edx+1080Ch]
mov	ecx, 80h
rep stosd
pop	edi
mov	eax, edx
pop	esi
retn	4
sub_82E4D0 endp

align 10h



sub_82E540 proc	near
push	esi
push	edi
mov	dword ptr [ecx], offset	off_1468750
lea	esi, [ecx+1080Ch]
mov	edi, 80h

loc_82E553:
mov	eax, [esi]
test	eax, eax
jz	short loc_82E568
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4
mov	dword ptr [esi], 0

loc_82E568:
add	esi, 4
sub	edi, 1
jnz	short loc_82E553
pop	edi
pop	esi
retn
sub_82E540 endp

align 10h



; int __thiscall sub_82E580(void *, char)
sub_82E580 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_82E540
test	[esp+4+arg_0], 1
jz	short loc_82E598
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_82E598:
mov	eax, esi
pop	esi
retn	4
sub_82E580 endp

align 10h



sub_82E5A0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, esi
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
add	eax, ecx
mov	ecx, esi
and	ecx, 80000007h
jns	short loc_82E5C1
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_82E5C1:
mov	dl, 1
shl	dl, cl
pop	esi
or	[eax], dl
retn	4
sub_82E5A0 endp

align 10h



sub_82E5D0 proc	near
xor	eax, eax
mov	dl, 1
push	esi

loc_82E5D5:
mov	esi, eax
shr	esi, 3
or	[esi+ecx], dl
add	esi, ecx
inc	eax
rol	dl, 1
cmp	eax, 100h
jl	short loc_82E5D5
pop	esi
retn
sub_82E5D0 endp

align 10h



sub_82E5F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	ebx
push	esi
mov	esi, ecx
mov	ecx, eax
and	ecx, 80000007h
jns	short loc_82E607
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_82E607:
cdq
and	edx, 7
add	eax, edx
mov	ebx, 1
sar	eax, 3
mov	al, [eax+esi]
shl	ebx, cl
pop	esi
test	al, bl
mov	eax, 0
setnz	al
pop	ebx
retn	4
sub_82E5F0 endp

align 10h



sub_82E630 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, esi
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
add	eax, ecx
mov	ecx, esi
and	ecx, 80000007h
jns	short loc_82E651
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_82E651:
mov	dl, 1
shl	dl, cl
pop	esi
not	dl
and	[eax], dl
retn	4
sub_82E630 endp

align 10h



sub_82E660 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	ecx, eax
and	ecx, 3Fh
dec	ecx
cmp	ecx, 27h	; switch 40 cases
ja	loc_82E712	; default
			; jumptable 0082E67A cases 3,6-8,21-36,38
movzx	edx, ds:byte_82E728[ecx]
jmp	ds:off_82E718[edx*4] ; switch jump

loc_82E681:		; jumptable 0082E67A cases 0-2,4,5,9,11-20,37
shr	eax, 6
and	eax, 0FFh
mov	ecx, eax
and	ecx, 80000007h
push	ebx
jns	short loc_82E699
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_82E699:
cdq
and	edx, 7
add	eax, edx
mov	ebx, 1
shl	ebx, cl
mov	ecx, [esp+4+arg_0]
sar	eax, 3
mov	dl, [eax+ecx]
test	dl, bl
mov	eax, 0
setz	al
pop	ebx
retn	8

loc_82E6BE:		; jumptable 0082E67A case 10
push	esi
shr	eax, 6
push	edi
mov	edi, [esp+8+arg_0]
mov	esi, eax
and	esi, 0FFh
push	esi
mov	ecx, edi
call	sub_82E5F0
test	al, al
jnz	short loc_82E6F2
inc	esi
push	esi
mov	ecx, edi
call	sub_82E5F0
test	al, al
jnz	short loc_82E6F2
pop	edi
mov	eax, 1
pop	esi
retn	8

loc_82E6F2:
pop	edi
xor	eax, eax
pop	esi
retn	8

loc_82E6F9:		; jumptable 0082E67A case 39
mov	ecx, [esp+arg_0]
shr	eax, 17h
push	eax
call	sub_82E5F0
xor	ecx, ecx
test	al, al
setz	cl
mov	al, cl
retn	8

loc_82E712:		; default
xor	al, al		; jumptable 0082E67A cases 3,6-8,21-36,38
retn	8
sub_82E660 endp

align 4
off_82E718 dd offset loc_82E681	; jump table for switch	statement
dd offset loc_82E6BE
dd offset loc_82E6F9
dd offset loc_82E712
byte_82E728 db	    0,	   0,	  0,	 3 ; indirect table for	switch statement
db	0,     0,     3,     3
db	3,     0,     1,     0
db	0,     0,     0,     0
db	0,     0,     0,     0
db	0,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     0,     3,     2



sub_82E750 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
push	esi
mov	esi, [esp+8+arg_4]
mov	eax, esi
and	eax, 3Fh
push	edi
cmp	eax, 28h	; switch 41 cases
ja	loc_82E9B2	; default
movzx	eax, ds:byte_82E9F4[eax]
jmp	ds:off_82E9BC[eax*4] ; switch jump

loc_82E773:		; jumptable 0082E76C cases 12-17
mov	edi, [esp+0Ch+arg_0]
mov	ecx, esi
shr	ecx, 6
and	ecx, 0FFh
push	ecx
mov	ecx, edi
call	sub_82E630

loc_82E78A:
mov	eax, esi
shr	eax, 17h
cmp	eax, 100h
jnb	short loc_82E79E
push	eax

loc_82E797:
mov	ecx, edi
call	sub_82E5A0

loc_82E79E:
shr	esi, 0Eh
and	esi, 1FFh
cmp	esi, 100h
jnb	loc_82E8C5
mov	ecx, edi
push	esi
call	sub_82E5A0
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E7C1:		; jumptable 0082E76C cases 18-20
mov	edx, esi
shr	edx, 6
and	edx, 0FFh
push	edx

loc_82E7CD:
mov	edi, [esp+10h+arg_0]
mov	ecx, edi
call	sub_82E630
shr	esi, 17h
push	esi
mov	ecx, edi
call	sub_82E5A0
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E7E9:		; jumptable 0082E76C case 3
mov	edi, esi
shr	edi, 6
and	edi, 0FFh
shr	esi, 17h
cmp	edi, esi
jg	loc_82E8C5
mov	ebp, [esp+0Ch+arg_0]

loc_82E803:
mov	eax, edi
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
mov	ecx, edi
add	eax, ebp
and	ecx, 80000007h
jns	short loc_82E81F
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_82E81F:
mov	dl, 1
shl	dl, cl
inc	edi
not	dl
and	[eax], dl
cmp	edi, esi
jle	short loc_82E803
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E832:		; jumptable 0082E76C cases 1,4,5,10
mov	ecx, [esp+0Ch+arg_0]
shr	esi, 6
and	esi, 0FFh
push	esi
call	sub_82E630
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E84B:		; jumptable 0082E76C case 0
mov	eax, esi
shr	eax, 6
and	eax, 0FFh
push	eax
jmp	loc_82E7CD

loc_82E85B:		; jumptable 0082E76C case 6
mov	edi, [esp+0Ch+arg_0]
mov	ecx, esi
shr	ecx, 6
and	ecx, 0FFh
push	ecx
mov	ecx, edi
call	sub_82E630
mov	edx, esi
shr	edx, 17h
push	edx
jmp	loc_82E797

loc_82E87D:		; jumptable 0082E76C case 11
mov	edi, esi
push	ebx
mov	ebx, [esp+10h+arg_0]
shr	edi, 6
and	edi, 0FFh
push	edi
mov	ecx, ebx
call	sub_82E630
inc	edi
push	edi
mov	ecx, ebx
call	sub_82E630
mov	eax, esi
shr	eax, 17h
push	eax
mov	ecx, ebx
call	sub_82E5A0
shr	esi, 0Eh
and	esi, 1FFh
cmp	esi, 100h
jnb	short loc_82E8C4
push	esi
mov	ecx, ebx
call	sub_82E5A0

loc_82E8C4:
pop	ebx

loc_82E8C5:
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E8CB:		; jumptable 0082E76C case 21
mov	ebp, [esp+0Ch+arg_0]
mov	ecx, esi
shr	ecx, 6
and	ecx, 0FFh
push	ecx
mov	ecx, ebp
call	sub_82E630
mov	edi, esi
shr	esi, 0Eh
shr	edi, 17h
and	esi, 1FFh
cmp	edi, esi
jg	short loc_82E8C5

loc_82E8F4:
mov	eax, edi
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
mov	ecx, edi
add	eax, ebp
and	ecx, 80000007h
jns	short loc_82E910
dec	ecx
or	ecx, 0FFFFFFF8h
inc	ecx

loc_82E910:
mov	dl, 1
shl	dl, cl
inc	edi
or	[eax], dl
cmp	edi, esi
jle	short loc_82E8F4
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E921:		; jumptable 0082E76C cases 7,8
mov	ecx, [esp+0Ch+arg_0]
shr	esi, 6
and	esi, 0FFh
push	esi
call	sub_82E5A0
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E93A:		; jumptable 0082E76C case 9
mov	edi, [esp+0Ch+arg_0]
mov	eax, esi
shr	eax, 6
and	eax, 0FFh
push	eax
mov	ecx, edi
call	sub_82E5A0
jmp	loc_82E78A

loc_82E955:		; jumptable 0082E76C case 38
mov	edi, [esp+0Ch+arg_0]
mov	ecx, esi
shr	ecx, 6
and	ecx, 0FFh
push	ecx
mov	ecx, edi
call	sub_82E630
shr	esi, 17h
mov	ecx, edi
push	esi
call	sub_82E5A0
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E97D:		; jumptable 0082E76C case 39
mov	ecx, [esp+0Ch+arg_0]
shr	esi, 17h
push	esi
call	sub_82E5A0
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E990:		; jumptable 0082E76C case 40
mov	ecx, [esp+0Ch+arg_0]
shr	esi, 17h
push	esi
call	sub_82E630
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E9A3:		; jumptable 0082E76C cases 2,22-37
mov	ecx, [esp+0Ch+arg_0]
call	sub_82E5D0
pop	edi
pop	esi
pop	ebp
retn	8

loc_82E9B2:		; Trap to Debugger
int	3
pop	edi
pop	esi
pop	ebp
retn	8
sub_82E750 endp

align 4
off_82E9BC dd offset loc_82E84B	; jump table for switch	statement
dd offset loc_82E832
dd offset loc_82E9A3
dd offset loc_82E7E9
dd offset loc_82E85B
dd offset loc_82E921
dd offset loc_82E93A
dd offset loc_82E87D
dd offset loc_82E773
dd offset loc_82E7C1
dd offset loc_82E8CB
dd offset loc_82E955
dd offset loc_82E97D
dd offset loc_82E990
byte_82E9F4 db	    0,	   1,	  2,	 3 ; indirect table for	switch statement
db	1,     1,     4,     5
db	5,     6,     1,     7
db	8,     8,     8,     8
db	8,     8,     9,     9
db	9,   0Ah,     2,     2
db	2,     2,     2,     2
db	2,     2,     2,     2
db	2,     2,     2,     2
db	2,     2,   0Bh,   0Ch
db    0Dh
align 10h



sub_82EA20 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 24h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+24h+var_4], eax
push	ebp
mov	ebp, ecx
mov	ecx, [ebp+4]
xor	eax, eax
cmp	[ecx+4], eax
push	esi
jle	short loc_82EA50
lea	esp, [esp+0]

loc_82EA40:
mov	edx, [ecx+0Ch]
mov	dword ptr [edx+eax*4], 0
inc	eax
cmp	eax, [ecx+4]
jl	short loc_82EA40

loc_82EA50:
xor	eax, eax
mov	[esp+2Ch+var_24], eax
mov	[esp+2Ch+var_20], eax
mov	[esp+2Ch+var_1C], eax
mov	[esp+2Ch+var_18], eax
mov	[esp+2Ch+var_14], eax
mov	[esp+2Ch+var_10], eax
mov	[esp+2Ch+var_C], eax
mov	[esp+2Ch+var_8], eax
mov	cl, 1

loc_82EA74:
mov	edx, eax
shr	edx, 3
or	byte ptr [esp+edx+2Ch+var_24], cl
lea	edx, [esp+edx+2Ch+var_24]
inc	eax
rol	cl, 1
cmp	eax, 100h
jl	short loc_82EA74
mov	eax, [ebp+4]
mov	esi, [eax+4]
sub	esi, 1
js	short loc_82EB02
push	ebx
push	edi
jmp	short loc_82EAA0
align 10h

loc_82EAA0:
mov	edi, [ebp+4]
mov	eax, [edi+4]
lea	ecx, [eax-1]
cmp	esi, ecx
jnz	short loc_82EACB
add	eax, 0FFFFFFFEh
js	short loc_82EACB
mov	edx, [edi+8]
mov	eax, [edx+esi*4-4]
mov	ecx, eax
and	ecx, 3Fh
cmp	cl, 22h
jnz	short loc_82EACB
test	eax, (offset loc_7FBFFF+1)
jnz	short loc_82EACB
dec	esi

loc_82EACB:
mov	edx, [edi+8]
mov	ebx, [edx+esi*4]
push	ebx
lea	eax, [esp+38h+var_24]
push	eax
mov	ecx, ebp
call	sub_82E660
test	al, al
jz	short loc_82EAEE
mov	ecx, [edi+0Ch]
mov	dword ptr [ecx+esi*4], 1
jmp	short loc_82EAFB

loc_82EAEE:
push	ebx
lea	edx, [esp+38h+var_24]
push	edx
mov	ecx, ebp
call	sub_82E750

loc_82EAFB:
sub	esi, 1
jns	short loc_82EAA0
pop	edi
pop	ebx

loc_82EB02:
mov	ecx, [esp+2Ch+var_4]
pop	esi
pop	ebp
xor	ecx, esp
call	sub_7999A3
add	esp, 24h
retn
sub_82EA20 endp

align 10h



; int __thiscall sub_82EB20(void *, char)
sub_82EB20 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1468758
jz	short loc_82EB39
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_82EB39:
mov	eax, esi
pop	esi
retn	4
sub_82EB20 endp

align 10h



sub_82EB40 proc	near
push	edi
mov	edi, ecx
test	edi, edi
jz	short loc_82EB98
push	esi
jmp	short loc_82EB50
align 10h

loc_82EB50:		; size_t
push	10A10h
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_82EB6D
push	edi
mov	ecx, eax
call	sub_82E4D0
mov	esi, eax
jmp	short loc_82EB6F

loc_82EB6D:
xor	esi, esi

loc_82EB6F:
mov	eax, [esi+4]
cmp	dword ptr [eax+4], 2Ah
jge	short loc_82EB86
mov	ecx, esi
call	sub_82E070
mov	ecx, esi
call	sub_82E3D0

loc_82EB86:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
mov	edi, [edi+10h]
test	edi, edi
jnz	short loc_82EB50
pop	esi

loc_82EB98:
pop	edi
retn
sub_82EB40 endp

align 10h



sub_82EBA0 proc	near
push	edi
mov	edi, ecx
test	edi, edi
jz	short loc_82EBE6
push	esi

loc_82EBA8:		; size_t
push	8
call	??2@YAPAXI@Z	; operator new(uint)
add	esp, 4
test	eax, eax
jz	short loc_82EBC3
mov	dword ptr [eax], offset	off_1468758
mov	[eax+4], edi
mov	esi, eax
jmp	short loc_82EBC5

loc_82EBC3:
xor	esi, esi

loc_82EBC5:
mov	ecx, esi
call	sub_82EA20
mov	ecx, [esi+4]
call	sub_82DDE0
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
mov	edi, [edi+10h]
test	edi, edi
jnz	short loc_82EBA8
pop	esi

loc_82EBE6:
pop	edi
retn
sub_82EBA0 endp

align 10h



sub_82EBF0 proc	near

arg_0= dword ptr  4

push	ebx
xor	ebx, ebx
cmp	[ecx+4], ebx
jle	short loc_82EC5D
push	ebp
push	esi
push	edi
jmp	short loc_82EC00
align 10h

loc_82EC00:
mov	eax, [ecx+8]
mov	edx, [eax+ebx*4]
lea	edi, [eax+ebx*4]
mov	esi, edx
and	esi, 3Fh
cmp	esi, 6
jnz	short loc_82EC46
mov	eax, edx
shr	eax, 0Eh
and	eax, 1FFh
cmp	eax, 100h
jl	short loc_82EC46
mov	ebp, [esp+10h+arg_0]
and	eax, 0FFh
cmp	dword ptr [ebp+eax*8+0], 4
jnz	short loc_82EC46
mov	ebp, edx
and	ebp, 0FF803FE6h
shl	eax, 0Eh
or	ebp, eax
or	ebp, 26h
mov	[edi], ebp

loc_82EC46:
cmp	esi, 22h
jnz	short loc_82EC54
test	edx, (offset loc_7FBFFF+1)
jnz	short loc_82EC54
inc	ebx

loc_82EC54:
inc	ebx
cmp	ebx, [ecx+4]
jl	short loc_82EC00
pop	edi
pop	esi
pop	ebp

loc_82EC5D:
pop	ebx
retn	4
sub_82EBF0 endp

align 10h



sub_82EC70 proc	near
push	esi
push	edi
mov	edi, ecx
call	sub_82DD10
mov	esi, edi
test	edi, edi
jz	short loc_82ECB3
nop

loc_82EC80:
mov	eax, [edi+0Ch]
mov	dword ptr [eax], 0
mov	ecx, [esi+4]
xor	eax, eax
test	ecx, ecx
jle	short loc_82ECAC
mov	edx, [esi+0Ch]

loc_82EC95:
cmp	dword ptr [edx], 0
jnz	short loc_82ECA4
inc	eax
add	edx, 4
cmp	eax, ecx
jl	short loc_82EC95
jmp	short loc_82ECAC

loc_82ECA4:
push	eax
mov	ecx, esi
call	sub_82DEA0

loc_82ECAC:
mov	esi, [esi+10h]
test	esi, esi
jnz	short loc_82EC80

loc_82ECB3:
mov	ecx, edi
pop	edi
pop	esi
jmp	sub_82DB70
sub_82EC70 endp

align 10h



sub_82ECC0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

mov	eax, [esp+arg_C]
mov	ecx, [esp+arg_8]
sub	esp, 1Ch
push	esi
push	eax
push	ecx
lea	ecx, [esp+28h+var_1C]
call	sub_82DA30
mov	esi, [esp+20h+arg_0]
test	byte ptr [esi],	2
jz	short loc_82ED04
lea	ecx, [esp+20h+var_1C]
call	sub_82EC70
lea	ecx, [esp+20h+var_1C]
call	sub_82EB40
lea	ecx, [esp+20h+var_1C]
call	sub_82EBA0
lea	ecx, [esp+20h+var_1C]
call	sub_82DBD0

loc_82ED04:
test	byte ptr [esi],	1
pop	esi
jz	short loc_82ED18
mov	edx, [esp+1Ch+arg_4]
push	edx
lea	ecx, [esp+20h+var_1C]
call	sub_82EBF0

loc_82ED18:
mov	eax, [esp+1Ch+var_18]
xor	ecx, ecx
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
push	ecx		; size_t
call	??2@YAPAXI@Z	; operator new(uint)
mov	ecx, [esp+20h+arg_10]
mov	edx, [esp+20h+var_18]
mov	[ecx], eax
lea	ecx, ds:0[edx*4]
mov	edx, [esp+20h+var_14]
push	ecx
push	edx
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esp+2Ch+var_14]
mov	eax, [esp+2Ch+arg_14]
mov	ecx, [esp+2Ch+var_18]
push	edx		; void *
mov	[eax], ecx
mov	[esp+30h+var_1C], offset off_1468748
call	??3@YAXPAX@Z	; operator delete(void *)
mov	eax, [esp+30h+var_10]
push	eax		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 34h
retn
sub_82ECC0 endp

align 10h



sub_82ED80 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+1Ch]
push	ebp
sub	eax, 8
push	esi
push	edi
cmp	eax, [ebx+20h]
jnb	short loc_82ED97
xor	esi, esi
jmp	short loc_82EDB4

loc_82ED97:
mov	ecx, [eax]
cmp	ecx, 7
jnz	short loc_82EDA6
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_82EDB2

loc_82EDA6:
cmp	ecx, 2
jnz	short loc_82EDB0
mov	eax, [eax+4]
jmp	short loc_82EDB2

loc_82EDB0:
xor	eax, eax

loc_82EDB2:
mov	esi, eax

loc_82EDB4:
add	dword ptr [ebx+1Ch], 0FFFFFFF8h
mov	ecx, [esi]
call	sub_83D7F0
mov	eax, [esi+4]
mov	esi, [eax+9590h]
movzx	ebp, byte ptr [esi]
mov	edi, [ebx+34h]
lea	ecx, ds:18h[ebp*4]
push	ecx
push	ebx
call	sub_82C5B0
mov	edx, eax
mov	[edx+8], esi
mov	byte ptr [edx+0Ch], 0
mov	[edx+4], edi
mov	dword ptr [edx], 5
movzx	eax, byte ptr [esi+3]
mov	[edx+0Dh], al
mov	cl, [esi+2]
mov	[edx+0Eh], cl
movzx	eax, byte ptr [esi+1]
mov	[edx+0Fh], al
mov	ecx, [esi+10h]
mov	[edx+10h], ecx
mov	eax, [esi+8]
add	esp, 8
mov	[edx+14h], eax
test	ebp, ebp
jbe	short loc_82EE1E
lea	edi, [edx+18h]
mov	ecx, ebp
xor	eax, eax
rep stosd

loc_82EE1E:
mov	eax, [ebx+1Ch]
mov	ecx, 9
mov	[eax], ecx
mov	[eax+4], edx
add	eax, 8
push	esi
push	ebx
mov	[ebx+1Ch], eax
call	sub_835030
add	esp, 8
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_82ED80 endp

align 10h



sub_82EE50 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
mov	ebx, [esp+0Ch+arg_0]
mov	eax, [ebx+1Ch]
push	ebp
sub	eax, 8
push	esi
push	edi
cmp	eax, [ebx+20h]
jnb	short loc_82EE6A
xor	esi, esi
jmp	short loc_82EE87

loc_82EE6A:
mov	ecx, [eax]
cmp	ecx, 7
jnz	short loc_82EE79
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_82EE85

loc_82EE79:
cmp	ecx, 2
jnz	short loc_82EE83
mov	eax, [eax+4]
jmp	short loc_82EE85

loc_82EE83:
xor	eax, eax

loc_82EE85:
mov	esi, eax

loc_82EE87:
add	dword ptr [ebx+1Ch], 0FFFFFFF8h
mov	eax, [esi+4]
mov	ecx, [esi]
push	eax
call	sub_82C420
test	eax, eax
jnz	short loc_82EEA3
push	ebx
call	sub_81C0E0
add	esp, 4

loc_82EEA3:
mov	eax, [ebx+1Ch]
xor	ecx, ecx
mov	[eax], ecx
mov	ecx, [esp+18h+var_4]
mov	[eax+4], ecx
add	eax, 8
mov	[ebx+1Ch], eax
mov	ecx, [esi]
call	sub_9DF990
movzx	edx, byte ptr [eax]
lea	eax, ds:18h[edx*4]
push	eax
push	ebx
call	sub_82C5B0
mov	ecx, [esi]
add	esp, 8
mov	edi, eax
call	sub_82B970
mov	ecx, [ebx+34h]
mov	esi, eax
movzx	ebp, byte ptr [esi]
mov	[esp+18h+arg_0], ecx
test	edi, edi
jz	short loc_82EEEF
mov	edx, edi
jmp	short loc_82EF02

loc_82EEEF:
lea	edx, ds:18h[ebp*4]
push	edx
push	ebx
call	sub_82C5B0
add	esp, 8
mov	edx, eax

loc_82EF02:
mov	eax, [esp+18h+arg_0]
mov	[edx+8], esi
mov	byte ptr [edx+0Ch], 0
mov	[edx+4], eax
mov	dword ptr [edx], 5
movzx	ecx, byte ptr [esi+3]
mov	[edx+0Dh], cl
mov	al, [esi+2]
mov	[edx+0Eh], al
movzx	ecx, byte ptr [esi+1]
mov	[edx+0Fh], cl
mov	eax, [esi+10h]
mov	[edx+10h], eax
mov	ecx, [esi+8]
mov	[edx+14h], ecx
test	ebp, ebp
jbe	short loc_82EF43
lea	edi, [edx+18h]
mov	ecx, ebp
xor	eax, eax
rep stosd

loc_82EF43:
mov	eax, [ebx+1Ch]
mov	ecx, 9
push	esi
mov	[eax-8], ecx
push	ebx
mov	[eax-4], edx
call	sub_835030
add	esp, 8
pop	edi
pop	esi
pop	ebp
mov	eax, 1
pop	ebx
add	esp, 8
retn
sub_82EE50 endp

align 10h
off_82EF70 dd offset loc_9648B3+5
dd 0AA46E800h, 8B53FFF6h, 9650249Ch, 438B0000h
dd 8E8831Ch, 433B5756h,	33047320h, 8B1DEBF6h
dd 7F98308h, 408B0875h,	10C08304h, 0F9830CEBh
dd 8B057502h, 2EB0440h,	0F08BC033h, 0F81C4383h
dd 8B08468Bh, 5150044Eh, 244C8D53h, 0CA4AE828h
dd 4C8DFFFFh, 0C1E81C24h, 85FFFFCAh, 8D7C74C0h
dd 0E81C244Ch, 0EA44h, 6F751B3Ch, 3024548Bh
dd 2C24448Bh, 52084E8Bh, 5004568Bh, 8D535251h
dd 0E87C244Ch, 0FFFFC924h, 6A0C468Bh, 8D006A01h
dd 6870244Ch
dd offset sub_82EE50
push	ebx
mov	[esp+20h], eax
mov	[esp+1Ch], ecx
call	sub_81B920
mov	eax, [ebx+1Ch]
push	0
lea	edx, [esp+20h]
push	1
mov	[eax+4], edx
mov	dword ptr [eax], 2
add	eax, 8
push	1
push	ebx
mov	[ebx+1Ch], eax
call	sub_81C700
add	esp, 20h
lea	ecx, [esp+68h]
mov	esi, eax
call	sub_82BAB0
jmp	loc_82F13A
lea	eax, [esp+1Ch]
push	eax
push	offset loc_82BA50
push	ebx
lea	ecx, [esp+58h]
call	sub_83DA40
push	ebx
lea	ecx, [esp+10h]
call	sub_83EC40
mov	edx, [esi+0Ch]
lea	ecx, [esp+0Ch]
push	ecx
push	edx
sub	esp, 1Ch
mov	edi, esp
mov	ecx, 7
lea	esi, [esp+70h]
rep movsd
push	ebx
lea	ecx, [esp+90h]
call	sub_83DD50
lea	eax, [esp+0Ch]
push	eax
push	ebx
lea	ecx, [esp+0C4h]
call	sub_8387A0
lea	ecx, [esp+0Ch]
push	ecx
lea	edx, [esp+0C0h]
push	edx
lea	eax, [esp+70h]
push	eax
push	ebx
lea	ecx, [esp+44h]
call	sub_83BB90
push	1
push	0
lea	ecx, [esp+3Ch]
lea	edx, [esp+0C4h]
push	offset sub_82ED80
push	ebx
mov	[esp+24h], ecx
mov	[esp+28h], edx
call	sub_81B920
mov	eax, [ebx+1Ch]
push	0
lea	ecx, [esp+28h]
push	1
mov	[eax+4], ecx
mov	dword ptr [eax], 2
add	eax, 8
push	1
push	ebx
mov	[ebx+1Ch], eax
call	sub_81C700
add	esp, 20h
lea	ecx, [esp+34h]
mov	esi, eax
call	nullsub_2
lea	ecx, [esp+0BCh]
call	sub_8388C0
lea	ecx, [esp+7Ch]
call	nullsub_2
lea	ecx, [esp+6Ch]
call	sub_83D890
lea	ecx, [esp+4Ch]
call	nullsub_2

loc_82F13A:
test	esi, esi
jz	short loc_82F148
push	esi
push	ebx
call	sub_81BDA0
add	esp, 8

loc_82F148:
pop	edi
pop	esi
mov	eax, 1
pop	ebx
add	esp, 9648h
retn
align 10h



sub_82F160 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 10h
mov	eax, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_C]
push	esi
mov	esi, [esp+14h+arg_0]
push	edi
push	1
push	0
mov	[esp+20h+var_10], eax
mov	eax, [esp+20h+arg_10]
push	offset off_82EF70
push	esi
mov	[esp+28h+var_C], ecx
mov	[esp+28h+var_8], edx
mov	[esp+28h+var_4], eax
call	sub_81B920
mov	eax, [esi+1Ch]
lea	ecx, [esp+28h+var_10]
mov	[eax+4], ecx
mov	dword ptr [eax], 2
mov	ecx, [esi]
add	esp, 10h
add	eax, 8
push	esi
add	ecx, 2A0h
mov	[esi+1Ch], eax
call	sub_81FA00
push	0
push	1
push	1
push	esi
call	sub_81C700
mov	ecx, [esi]
add	esp, 10h
push	esi
add	ecx, 2A0h
mov	edi, eax
call	sub_81FD50
mov	eax, 0FFFFFFFCh
cmp	edi, 0FFFFFF9Ch
jz	short loc_82F1EA
mov	eax, edi

loc_82F1EA:
pop	edi
pop	esi
add	esp, 10h
retn
sub_82F160 endp




; int __cdecl sub_82F1F0(int, int, void	*)
sub_82F1F0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
mov	ecx, [esp+arg_4]
test	dword ptr [ecx+8], 0F0000000h
mov	edx, [esp+arg_0]
push	eax		; void *
push	edx		; int
jz	short loc_82F20D
call	sub_8229A0
retn

loc_82F20D:
call	sub_821130
retn
sub_82F1F0 endp

align 10h



sub_82F220 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_0]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_82F242
mov	eax, [esp+arg_C]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_4]
push	edx
push	eax
call	sub_821790
retn

loc_82F242:
mov	edx, [esp+arg_C]
mov	eax, [esp+arg_8]
push	edx
mov	edx, [esp+4+arg_4]
push	eax
push	edx
call	sub_820950
retn
sub_82F220 endp

align 10h



sub_82F260 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_10]
mov	edx, [esp+arg_C]
mov	ecx, [esp+arg_4]
test	dword ptr [ecx+8], 0F0000000h
push	eax
mov	eax, [esp+4+arg_8]
push	edx
mov	edx, [esp+8+arg_0]
push	eax
push	edx
jz	short loc_82F287
call	sub_821F50
retn

loc_82F287:
call	sub_820990
retn
sub_82F260 endp

align 10h


; Attributes: bp-based frame

sub_82F290 proc	near

var_208= dword ptr -208h
var_1E0= dword ptr -1E0h
var_1DC= dword ptr -1DCh
var_1D8= dword ptr -1D8h
var_1D4= dword ptr -1D4h
var_1D0= dword ptr -1D0h
var_1C8= qword ptr -1C8h
var_1C0= dword ptr -1C0h
var_1BC= dword ptr -1BCh
var_1B8= dword ptr -1B8h
var_1B4= dword ptr -1B4h
var_1B0= dword ptr -1B0h
var_1AC= dword ptr -1ACh
var_1A8= dword ptr -1A8h
var_1A4= dword ptr -1A4h
var_1A0= dword ptr -1A0h
var_19C= dword ptr -19Ch
var_198= dword ptr -198h
var_194= dword ptr -194h
var_190= dword ptr -190h
var_18C= dword ptr -18Ch
var_188= dword ptr -188h
var_184= dword ptr -184h
var_180= dword ptr -180h
var_17C= dword ptr -17Ch
var_178= dword ptr -178h
var_174= dword ptr -174h
var_170= dword ptr -170h
var_16C= dword ptr -16Ch
var_168= dword ptr -168h
var_164= dword ptr -164h
var_160= dword ptr -160h
var_15C= dword ptr -15Ch
var_158= dword ptr -158h
var_154= dword ptr -154h
var_150= dword ptr -150h
var_14C= dword ptr -14Ch
var_148= dword ptr -148h
var_144= dword ptr -144h
var_140= dword ptr -140h
var_13C= dword ptr -13Ch
var_138= dword ptr -138h
var_134= dword ptr -134h
var_130= dword ptr -130h
var_12C= dword ptr -12Ch
var_128= dword ptr -128h
var_124= dword ptr -124h
var_11C= dword ptr -11Ch
var_114= dword ptr -114h
var_110= dword ptr -110h
var_104= dword ptr -104h
var_FC=	dword ptr -0FCh
var_F4=	dword ptr -0F4h
var_EC=	dword ptr -0ECh
var_E4=	dword ptr -0E4h
var_DC=	dword ptr -0DCh
var_D8=	dword ptr -0D8h
var_CC=	dword ptr -0CCh
var_C4=	dword ptr -0C4h
var_BC=	dword ptr -0BCh
var_B8=	dword ptr -0B8h
var_AC=	dword ptr -0ACh
var_A4=	dword ptr -0A4h
var_9C=	dword ptr -9Ch
var_94=	dword ptr -94h
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
var_7C=	dword ptr -7Ch
var_74=	dword ptr -74h
var_6C=	dword ptr -6Ch
var_64=	dword ptr -64h
var_5C=	dword ptr -5Ch
var_54=	dword ptr -54h
var_4C=	dword ptr -4Ch
var_44=	dword ptr -44h
var_3C=	dword ptr -3Ch
var_34=	dword ptr -34h
var_2C=	dword ptr -2Ch
var_24=	dword ptr -24h
var_1C=	dword ptr -1Ch
var_14=	dword ptr -14h
var_C= dword ptr -0Ch
var_4= dword ptr -4
arg_0= dword ptr  8
arg_4= dword ptr  0Ch
arg_8= dword ptr  10h

push	ebp
mov	ebp, esp
and	esp, 0FFFFFFC0h
sub	esp, 1F4h
mov	edx, [ebp+arg_4]
push	ebx
push	esi
mov	esi, [ebp+arg_0]
mov	eax, [esi+20h]
mov	ecx, [eax-4]
mov	[esp+1FCh+var_1B4], ecx
mov	ecx, [ecx+10h]
push	edi
mov	[esp+200h+var_1D4], ecx
mov	[esp+200h+var_1D8], edx

loc_82F2BA:
mov	[esp+200h+var_1DC], eax

loc_82F2BE:
mov	eax, [esp+200h+var_1D8]
mov	edi, [eax]
add	eax, 4
mov	ecx, edi
shr	ecx, 6
and	ecx, 0FFh
mov	[esp+200h+var_1D8], eax
mov	eax, [esp+200h+var_1DC]
lea	edx, ds:0[ecx*8]
lea	ebx, [edx+eax]
mov	eax, edi
and	eax, 3Fh
mov	[esp+200h+var_1E0], ecx
mov	[esp+200h+var_1C0], edx
cmp	eax, 28h	; switch 41 cases
ja	loc_83227F	; default
jmp	ds:off_8322C0[eax*4] ; switch jump

loc_82F301:		; jumptable 0082F2FA case 6
mov	eax, [esp+200h+var_1DC]
mov	ecx, edi
shr	ecx, 17h
add	ecx, ecx
add	ecx, ecx
shr	edi, 0Eh
add	ecx, ecx
mov	ebx, edi
mov	[esp+200h+var_1D0], ecx
add	ecx, eax
and	ebx, 1FFh
cmp	ebx, 100h
mov	dword ptr [esp+200h+var_1C8], ecx
jl	short loc_82F342
mov	eax, [esp+200h+var_1D4]
mov	edx, ebx
and	edx, 0FFh
lea	edx, [eax+edx*8]
mov	[esp+200h+var_1E0], edx
jmp	short loc_82F349

loc_82F342:
lea	eax, [eax+ebx*8]
mov	[esp+200h+var_1E0], eax

loc_82F349:
mov	eax, ecx
jmp	short loc_82F350
align 10h

loc_82F350:
mov	ecx, [eax]
cmp	ecx, 5
jnz	short loc_82F3C2
mov	edi, [eax+4]
test	dword ptr [edi+8], 0F0000000h
jz	short loc_82F377
mov	edx, [esp+200h+var_1E0]
lea	ecx, [esp+200h+var_1B0]
push	ecx
push	edx
push	esi
mov	ecx, edi
call	sub_822100
jmp	short loc_82F389

loc_82F377:
mov	ecx, [esp+200h+var_1E0]
lea	eax, [esp+200h+var_1B0]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	sub_820740

loc_82F389:
cmp	[esp+200h+var_1B0], 0
jnz	loc_82F4AB
mov	eax, [edi]
test	eax, eax
jz	loc_82F4AB
add	eax, 8
cmp	dword ptr [eax], 0
jnz	loc_82F441
mov	edx, dword_1859274
mov	eax, dword_1859278
mov	[esp+200h+var_1B0], edx
mov	[esp+200h+var_1AC], eax
jmp	loc_82F4AB

loc_82F3C2:
mov	edx, ecx
sub	edx, 5
jz	short loc_82F42C
sub	edx, 2
jz	short loc_82F424
mov	edx, [esi]
mov	eax, [edx+ecx*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+200h+var_150]
push	edx
push	eax
jz	short loc_82F3F3
call	sub_821EF0
jmp	short loc_82F3F8

loc_82F3F3:
call	sub_8208C0

loc_82F3F8:
test	eax, eax
jz	loc_82F499
cmp	[esp+200h+var_150], 5
jnz	loc_82F499
mov	ecx, [esp+200h+var_14C]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_82F435
push	esi
call	sub_81FED0
jmp	short loc_82F431

loc_82F424:
mov	eax, [eax+4]
mov	eax, [eax+4]
jmp	short loc_82F431

loc_82F42C:
mov	ecx, [eax+4]
mov	eax, [ecx]

loc_82F431:
test	eax, eax
jz	short loc_82F499

loc_82F435:
add	eax, 8
cmp	dword ptr [eax], 0
jz	loc_82F4CE

loc_82F441:
cmp	dword ptr [eax], 5
jz	loc_82F350
mov	ecx, [eax]
mov	[esp+200h+var_1B0], ecx
mov	edx, [eax+4]
mov	[esp+200h+var_1AC], edx

loc_82F457:
mov	eax, [esi+1Ch]
add	eax, 18h
cmp	eax, [esi+24h]
jbe	short loc_82F4DC
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	eax, [esi+20h]
mov	ecx, [esp+200h+var_1D0]
add	ecx, eax
cmp	ebx, 100h
mov	[esp+200h+var_1DC], eax
mov	dword ptr [esp+200h+var_1C8], ecx
jl	short loc_82F4D5
mov	edx, [esp+200h+var_1D4]
and	ebx, 0FFh
lea	eax, [edx+ebx*8]
mov	[esp+200h+var_1E0], eax
jmp	short loc_82F4DC

loc_82F499:		; "attempt to index a nil value"
push	offset aAttemptToIndex

loc_82F49E:
push	esi
call	sub_81A760
add	esp, 8
test	eax, eax
jz	short loc_82F457

loc_82F4AB:
mov	ecx, [esi+20h]
mov	edx, [esp+200h+var_1B0]
mov	eax, [esp+200h+var_1C0]
mov	[esp+200h+var_1DC], ecx
mov	[eax+ecx], edx
mov	ecx, [esp+200h+var_1AC]
mov	edx, [esp+200h+var_1DC]
mov	[eax+edx+4], ecx
jmp	loc_82F2BE

loc_82F4CE:		; "error in gettable_event"
push	offset aErrorInGettabl
jmp	short loc_82F49E

loc_82F4D5:
lea	ecx, [eax+ebx*8]
mov	[esp+200h+var_1E0], ecx

loc_82F4DC:
mov	ebx, dword ptr [esp+200h+var_1C8]
mov	edi, [ebx]
mov	ebx, [ebx+4]
mov	eax, [esi+1Ch]
mov	ecx, [esp+200h+var_1B0]
mov	edx, [esp+200h+var_1AC]
mov	[esp+200h+var_FC], ebx
mov	ebx, [esp+200h+var_1E0]
mov	ebx, [ebx]
mov	[esp+200h+var_110], ebx
mov	ebx, [esp+200h+var_1E0]
mov	ebx, [ebx+4]
mov	[eax+4], edx
mov	edx, [esp+200h+var_FC]
mov	[eax], ecx
mov	ecx, [esp+200h+var_110]
mov	[eax+0Ch], edx
mov	edx, [esp+200h+var_1D8]
mov	[eax+8], edi
mov	[eax+10h], ecx
mov	[eax+14h], ebx
add	eax, 18h
mov	[esi+1Ch], eax
push	edx

loc_82F535:
push	1
push	2

loc_82F539:
push	esi
call	sub_81C370
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
mov	[esp+210h+var_1DC], ecx
mov	edx, [eax-8]
mov	edi, [eax-4]
add	esp, 10h
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1C0]
mov	[eax+ecx], edx
mov	ecx, [esp+200h+var_1DC]
mov	[eax+ecx+4], edi
jmp	loc_82F2BE

loc_82F56C:		; jumptable 0082F2FA case 0
mov	eax, [esp+200h+var_1DC]
shr	edi, 17h
mov	edx, [eax+edi*8]
mov	[ebx], edx
mov	eax, [eax+edi*8+4]
mov	[ebx+4], eax
jmp	loc_82F2BE

loc_82F584:		; jumptable 0082F2FA case 12
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_82F5A2
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	ecx, [ecx+eax*8]
jmp	short loc_82F5A9

loc_82F5A2:
mov	edx, [esp+200h+var_1DC]
lea	ecx, [edx+eax*8]

loc_82F5A9:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
mov	dword ptr [esp+200h+var_1C8], ecx
mov	[esp+200h+var_1B8], edi
jl	short loc_82F5D1
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edi, [eax+edi*8]
jmp	short loc_82F5D8

loc_82F5D1:
mov	edx, [esp+200h+var_1DC]
lea	edi, [edx+edi*8]

loc_82F5D8:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fstp	[esp+200h+var_1D0]
fld	dword ptr [edi+4]
fstp	[esp+200h+var_1E0]
cmp	eax, 3
jnz	short loc_82F608
cmp	[edi], eax
jnz	short loc_82F603
fld	[esp+200h+var_1E0]
mov	[ebx], eax
fadd	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82F603:
fld	dword ptr [ecx+4]
jmp	short loc_82F641

loc_82F608:
cmp	eax, 4
jnz	loc_82F698
mov	eax, dword ptr [esp+200h+var_1C8]
mov	eax, [eax+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82F698
mov	ecx, dword ptr [esp+200h+var_1C8]
mov	eax, [ecx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_82F641:
mov	eax, [edi]
fstp	[esp+200h+var_1D0]
cmp	eax, 3
jnz	short loc_82F651
fld	dword ptr [edi+4]
jmp	short loc_82F67E

loc_82F651:
cmp	eax, 4
jnz	short loc_82F698
mov	eax, [edi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82F698
mov	edi, [edi+4]
mov	eax, [edi]
push	eax		; int
add	edi, 8
push	edi		; char *
call	sub_822B80
add	esp, 8

loc_82F67E:
fstp	[esp+200h+var_1E0]
mov	dword ptr [ebx], 3
fld	[esp+200h+var_1E0]
fadd	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82F698:
mov	edx, [esi+1Ch]
add	edx, 18h
cmp	edx, [esi+24h]
jbe	short loc_82F6F4
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ebx, [esp+200h+var_1BC]
cmp	ebx, 100h
mov	edi, [esi+20h]
mov	[esp+200h+var_1DC], edi
jl	short loc_82F6D1
mov	ecx, [esp+200h+var_1D4]
mov	eax, ebx
and	eax, 0FFh
lea	eax, [ecx+eax*8]
jmp	short loc_82F6D4

loc_82F6D1:
lea	eax, [edi+ebx*8]

loc_82F6D4:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82F6EF
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh
lea	edi, [edx+ecx*8]
jmp	short loc_82F6FC

loc_82F6EF:
lea	edi, [edi+ecx*8]
jmp	short loc_82F6FC

loc_82F6F4:
mov	ebx, [esp+200h+var_1BC]
mov	eax, dword ptr [esp+200h+var_1C8]

loc_82F6FC:		; "+"
push	offset asc_1468B88
push	3
push	edi
push	eax
push	esi
call	sub_823460
mov	edx, [esi+20h]
add	esp, 14h
cmp	ebx, 100h
mov	[esp+200h+var_1DC], edx
jl	short loc_82F72C
mov	ecx, [esp+200h+var_1D4]
and	ebx, 0FFh
lea	ebx, [ecx+ebx*8]
jmp	short loc_82F72F

loc_82F72C:
lea	ebx, [edx+ebx*8]

loc_82F72F:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82F745
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh

loc_82F745:
mov	edi, [eax]
mov	eax, [eax+4]
mov	[esp+200h+var_C], eax
mov	eax, [ebx]
mov	ebx, [ebx+4]
lea	edx, [edx+ecx*8]
mov	ecx, [esi+1Ch]
mov	[esp+200h+var_11C], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[ecx], edi
mov	edi, [esp+200h+var_C]
mov	[ecx+8], eax
mov	eax, [esp+200h+var_11C]

loc_82F77B:
mov	[ecx+4], edi
mov	[ecx+0Ch], eax
mov	[ecx+10h], ebx
mov	[ecx+14h], edx
add	ecx, 18h
mov	[esi+1Ch], ecx
mov	ecx, [esp+200h+var_1D8]
push	ecx
push	1
push	2
push	esi
call	sub_81C370
add	esp, 10h

loc_82F79F:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
mov	edx, [eax-8]
mov	edi, [eax-4]
add	eax, 0FFFFFFF8h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1C0]
mov	[eax+ecx], edx
mov	edx, [esp+200h+var_1DC]
mov	[eax+edx+4], edi
jmp	loc_82F2BE

loc_82F7C9:		; jumptable 0082F2FA case 13
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_82F7E7
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	ecx, [ecx+eax*8]
jmp	short loc_82F7EE

loc_82F7E7:
mov	edx, [esp+200h+var_1DC]
lea	ecx, [edx+eax*8]

loc_82F7EE:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
mov	dword ptr [esp+200h+var_1C8], ecx
mov	[esp+200h+var_1B8], edi
jl	short loc_82F816
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edi, [eax+edi*8]
jmp	short loc_82F81D

loc_82F816:
mov	edx, [esp+200h+var_1DC]
lea	edi, [edx+edi*8]

loc_82F81D:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fstp	[esp+200h+var_1E0]
fld	dword ptr [edi+4]
fstp	[esp+200h+var_1D0]
cmp	eax, 3
jnz	short loc_82F84D
cmp	[edi], eax
jnz	short loc_82F848
fld	[esp+200h+var_1E0]
mov	[ebx], eax
fsub	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82F848:
fld	dword ptr [ecx+4]
jmp	short loc_82F886

loc_82F84D:
cmp	eax, 4
jnz	loc_82F8DD
mov	eax, dword ptr [esp+200h+var_1C8]
mov	eax, [eax+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82F8DD
mov	ecx, dword ptr [esp+200h+var_1C8]
mov	eax, [ecx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_82F886:
mov	eax, [edi]
fstp	[esp+200h+var_1E0]
cmp	eax, 3
jnz	short loc_82F896
fld	dword ptr [edi+4]
jmp	short loc_82F8C3

loc_82F896:
cmp	eax, 4
jnz	short loc_82F8DD
mov	eax, [edi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82F8DD
mov	edi, [edi+4]
mov	eax, [edi]
push	eax		; int
add	edi, 8
push	edi		; char *
call	sub_822B80
add	esp, 8

loc_82F8C3:
fstp	[esp+200h+var_1D0]
mov	dword ptr [ebx], 3
fld	[esp+200h+var_1E0]
fsub	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82F8DD:
mov	edx, [esi+1Ch]
add	edx, 18h
cmp	edx, [esi+24h]
jbe	short loc_82F939
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ebx, [esp+200h+var_1BC]
cmp	ebx, 100h
mov	edi, [esi+20h]
mov	[esp+200h+var_1DC], edi
jl	short loc_82F916
mov	ecx, [esp+200h+var_1D4]
mov	eax, ebx
and	eax, 0FFh
lea	eax, [ecx+eax*8]
jmp	short loc_82F919

loc_82F916:
lea	eax, [edi+ebx*8]

loc_82F919:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82F934
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh
lea	edi, [edx+ecx*8]
jmp	short loc_82F941

loc_82F934:
lea	edi, [edi+ecx*8]
jmp	short loc_82F941

loc_82F939:
mov	ebx, [esp+200h+var_1BC]
mov	eax, dword ptr [esp+200h+var_1C8]

loc_82F941:		; "-"
push	offset asc_1468B8C
push	4
push	edi
push	eax
push	esi
call	sub_823460
mov	edx, [esi+20h]
add	esp, 14h
cmp	ebx, 100h
mov	[esp+200h+var_1DC], edx
jl	short loc_82F971
mov	ecx, [esp+200h+var_1D4]
and	ebx, 0FFh
lea	ebx, [ecx+ebx*8]
jmp	short loc_82F974

loc_82F971:
lea	ebx, [edx+ebx*8]

loc_82F974:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82F98A
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh

loc_82F98A:
mov	edi, [eax]
mov	eax, [eax+4]
mov	[esp+200h+var_7C], eax
mov	eax, [ebx]
mov	ebx, [ebx+4]
lea	edx, [edx+ecx*8]
mov	ecx, [esi+1Ch]
mov	[esp+200h+var_EC], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[ecx], edi
mov	edi, [esp+200h+var_7C]
mov	[ecx+8], eax
mov	eax, [esp+200h+var_EC]
jmp	loc_82F77B

loc_82F9C5:		; jumptable 0082F2FA case 14
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_82F9E3
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	ecx, [ecx+eax*8]
jmp	short loc_82F9EA

loc_82F9E3:
mov	edx, [esp+200h+var_1DC]
lea	ecx, [edx+eax*8]

loc_82F9EA:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
mov	dword ptr [esp+200h+var_1C8], ecx
mov	[esp+200h+var_1B8], edi
jl	short loc_82FA12
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edi, [eax+edi*8]
jmp	short loc_82FA19

loc_82FA12:
mov	edx, [esp+200h+var_1DC]
lea	edi, [edx+edi*8]

loc_82FA19:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fstp	[esp+200h+var_1D0]
fld	dword ptr [edi+4]
fstp	[esp+200h+var_1E0]
cmp	eax, 3
jnz	short loc_82FA49
cmp	[edi], eax
jnz	short loc_82FA44
fld	[esp+200h+var_1E0]
mov	[ebx], eax
fmul	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82FA44:
fld	dword ptr [ecx+4]
jmp	short loc_82FA82

loc_82FA49:
cmp	eax, 4
jnz	loc_82FAD9
mov	eax, dword ptr [esp+200h+var_1C8]
mov	eax, [eax+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82FAD9
mov	ecx, dword ptr [esp+200h+var_1C8]
mov	eax, [ecx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_82FA82:
mov	eax, [edi]
fstp	[esp+200h+var_1D0]
cmp	eax, 3
jnz	short loc_82FA92
fld	dword ptr [edi+4]
jmp	short loc_82FABF

loc_82FA92:
cmp	eax, 4
jnz	short loc_82FAD9
mov	eax, [edi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82FAD9
mov	edi, [edi+4]
mov	eax, [edi]
push	eax		; int
add	edi, 8
push	edi		; char *
call	sub_822B80
add	esp, 8

loc_82FABF:
fstp	[esp+200h+var_1E0]
mov	dword ptr [ebx], 3
fld	[esp+200h+var_1E0]
fmul	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82FAD9:
mov	edx, [esi+1Ch]
add	edx, 18h
cmp	edx, [esi+24h]
jbe	short loc_82FB35
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ebx, [esp+200h+var_1BC]
cmp	ebx, 100h
mov	edi, [esi+20h]
mov	[esp+200h+var_1DC], edi
jl	short loc_82FB12
mov	ecx, [esp+200h+var_1D4]
mov	eax, ebx
and	eax, 0FFh
lea	eax, [ecx+eax*8]
jmp	short loc_82FB15

loc_82FB12:
lea	eax, [edi+ebx*8]

loc_82FB15:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82FB30
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh
lea	edi, [edx+ecx*8]
jmp	short loc_82FB3D

loc_82FB30:
lea	edi, [edi+ecx*8]
jmp	short loc_82FB3D

loc_82FB35:
mov	eax, dword ptr [esp+200h+var_1C8]
mov	ebx, [esp+200h+var_1BC]

loc_82FB3D:		; "*"
push	offset asc_1468B90
push	5
push	edi
push	eax
push	esi
call	sub_823460
mov	edx, [esi+20h]
add	esp, 14h
cmp	ebx, 100h
mov	[esp+200h+var_1DC], edx
jl	short loc_82FB6D
mov	ecx, [esp+200h+var_1D4]
and	ebx, 0FFh
lea	ebx, [ecx+ebx*8]
jmp	short loc_82FB70

loc_82FB6D:
lea	ebx, [edx+ebx*8]

loc_82FB70:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82FB86
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh

loc_82FB86:
mov	edi, [eax]
mov	eax, [eax+4]
mov	[esp+200h+var_3C], eax
mov	eax, [ebx]
mov	ebx, [ebx+4]
lea	edx, [edx+ecx*8]
mov	ecx, [esi+1Ch]
mov	[esp+200h+var_DC], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[ecx], edi
mov	edi, [esp+200h+var_3C]
mov	[ecx+8], eax
mov	eax, [esp+200h+var_DC]
jmp	loc_82F77B

loc_82FBC1:		; jumptable 0082F2FA case 15
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_82FBDF
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	ecx, [ecx+eax*8]
jmp	short loc_82FBE6

loc_82FBDF:
mov	edx, [esp+200h+var_1DC]
lea	ecx, [edx+eax*8]

loc_82FBE6:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
mov	dword ptr [esp+200h+var_1C8], ecx
mov	[esp+200h+var_1B8], edi
jl	short loc_82FC0E
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edi, [eax+edi*8]
jmp	short loc_82FC15

loc_82FC0E:
mov	edx, [esp+200h+var_1DC]
lea	edi, [edx+edi*8]

loc_82FC15:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fstp	[esp+200h+var_1E0]
fld	dword ptr [edi+4]
fstp	[esp+200h+var_1D0]
cmp	eax, 3
jnz	short loc_82FC45
cmp	[edi], eax
jnz	short loc_82FC40
fld	[esp+200h+var_1E0]
mov	[ebx], eax
fdiv	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82FC40:
fld	dword ptr [ecx+4]
jmp	short loc_82FC7E

loc_82FC45:
cmp	eax, 4
jnz	loc_82FCD5
mov	eax, dword ptr [esp+200h+var_1C8]
mov	eax, [eax+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82FCD5
mov	ecx, dword ptr [esp+200h+var_1C8]
mov	eax, [ecx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_82FC7E:
mov	eax, [edi]
fstp	[esp+200h+var_1E0]
cmp	eax, 3
jnz	short loc_82FC8E
fld	dword ptr [edi+4]
jmp	short loc_82FCBB

loc_82FC8E:
cmp	eax, 4
jnz	short loc_82FCD5
mov	eax, [edi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82FCD5
mov	edi, [edi+4]
mov	eax, [edi]
push	eax		; int
add	edi, 8
push	edi		; char *
call	sub_822B80
add	esp, 8

loc_82FCBB:
fstp	[esp+200h+var_1D0]
mov	dword ptr [ebx], 3
fld	[esp+200h+var_1E0]
fdiv	[esp+200h+var_1D0]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82FCD5:
mov	edx, [esi+1Ch]
add	edx, 18h
cmp	edx, [esi+24h]
jbe	short loc_82FD31
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ebx, [esp+200h+var_1BC]
cmp	ebx, 100h
mov	edi, [esi+20h]
mov	[esp+200h+var_1DC], edi
jl	short loc_82FD0E
mov	ecx, [esp+200h+var_1D4]
mov	eax, ebx
and	eax, 0FFh
lea	eax, [ecx+eax*8]
jmp	short loc_82FD11

loc_82FD0E:
lea	eax, [edi+ebx*8]

loc_82FD11:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82FD2C
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh
lea	edi, [edx+ecx*8]
jmp	short loc_82FD39

loc_82FD2C:
lea	edi, [edi+ecx*8]
jmp	short loc_82FD39

loc_82FD31:
mov	eax, dword ptr [esp+200h+var_1C8]
mov	ebx, [esp+200h+var_1BC]

loc_82FD39:		; "/"
push	offset asc_1468B94
push	6
push	edi
push	eax
push	esi
call	sub_823460
mov	edx, [esi+20h]
add	esp, 14h
cmp	ebx, 100h
mov	[esp+200h+var_1DC], edx
jl	short loc_82FD69
mov	ecx, [esp+200h+var_1D4]
and	ebx, 0FFh
lea	ebx, [ecx+ebx*8]
jmp	short loc_82FD6C

loc_82FD69:
lea	ebx, [edx+ebx*8]

loc_82FD6C:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82FD82
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh

loc_82FD82:
mov	edi, [eax]
mov	eax, [eax+4]
mov	[esp+200h+var_6C], eax
mov	eax, [ebx]
mov	ebx, [ebx+4]
lea	edx, [edx+ecx*8]
mov	ecx, [esi+1Ch]
mov	[esp+200h+var_CC], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[ecx], edi
mov	edi, [esp+200h+var_6C]
mov	[ecx+8], eax
mov	eax, [esp+200h+var_CC]
jmp	loc_82F77B

loc_82FDBD:		; jumptable 0082F2FA case 16
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_82FDDB
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	ecx, [ecx+eax*8]
jmp	short loc_82FDE2

loc_82FDDB:
mov	edx, [esp+200h+var_1DC]
lea	ecx, [edx+eax*8]

loc_82FDE2:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
mov	dword ptr [esp+200h+var_1C8], ecx
mov	[esp+200h+var_1B8], edi
jl	short loc_82FE0A
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edi, [eax+edi*8]
jmp	short loc_82FE11

loc_82FE0A:
mov	edx, [esp+200h+var_1DC]
lea	edi, [edx+edi*8]

loc_82FE11:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fstp	[esp+200h+var_1D0]
fld	dword ptr [edi+4]
fstp	[esp+200h+var_1E0]
cmp	eax, 3
jnz	short loc_82FE6F
cmp	[edi], eax
jnz	short loc_82FE6A
fld	[esp+200h+var_1D0]
sub	esp, 8
fst	[esp+208h+var_1C8]
fdiv	[esp+208h+var_1E0]
fstp	[esp+208h+var_1D0]
fld	[esp+208h+var_1D0]
fstp	qword ptr [esp+208h+var_208]
call	_floor
fstp	[esp+208h+var_1D0]
fld	[esp+208h+var_1D0]
add	esp, 8
fmul	[esp+200h+var_1E0]
mov	dword ptr [ebx], 3
fsubr	[esp+200h+var_1C8]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82FE6A:
fld	dword ptr [ecx+4]
jmp	short loc_82FEAC

loc_82FE6F:
cmp	eax, 4
jnz	loc_82FF2D
mov	eax, dword ptr [esp+200h+var_1C8]
mov	eax, [eax+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	loc_82FF2D
mov	ecx, dword ptr [esp+200h+var_1C8]
mov	eax, [ecx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_82FEAC:
mov	eax, [edi]
fstp	[esp+200h+var_1D0]
cmp	eax, 3
jnz	short loc_82FEBC
fld	dword ptr [edi+4]
jmp	short loc_82FEE9

loc_82FEBC:
cmp	eax, 4
jnz	short loc_82FF2D
mov	eax, [edi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_82FF2D
mov	edi, [edi+4]
mov	eax, [edi]
push	eax		; int
add	edi, 8
push	edi		; char *
call	sub_822B80
add	esp, 8

loc_82FEE9:
fstp	[esp+200h+var_1E0]
sub	esp, 8
fld	[esp+208h+var_1D0]
fst	[esp+208h+var_1C8]
fdiv	[esp+208h+var_1E0]
fstp	[esp+208h+var_1D0]
fld	[esp+208h+var_1D0]
fstp	qword ptr [esp+208h+var_208]
call	_floor
fstp	[esp+208h+var_1D0]
fld	[esp+208h+var_1D0]
add	esp, 8
fmul	[esp+200h+var_1E0]
mov	dword ptr [ebx], 3
fsubr	[esp+200h+var_1C8]
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_82FF2D:
mov	edx, [esi+1Ch]
add	edx, 18h
cmp	edx, [esi+24h]
jbe	short loc_82FF89
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ebx, [esp+200h+var_1BC]
cmp	ebx, 100h
mov	edi, [esi+20h]
mov	[esp+200h+var_1DC], edi
jl	short loc_82FF66
mov	ecx, [esp+200h+var_1D4]
mov	eax, ebx
and	eax, 0FFh
lea	eax, [ecx+eax*8]
jmp	short loc_82FF69

loc_82FF66:
lea	eax, [edi+ebx*8]

loc_82FF69:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82FF84
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh
lea	edi, [edx+ecx*8]
jmp	short loc_82FF91

loc_82FF84:
lea	edi, [edi+ecx*8]
jmp	short loc_82FF91

loc_82FF89:
mov	eax, dword ptr [esp+200h+var_1C8]
mov	ebx, [esp+200h+var_1BC]

loc_82FF91:		; "%"
push	offset asc_1468B98
push	7
push	edi
push	eax
push	esi
call	sub_823460
mov	edx, [esi+20h]
add	esp, 14h
cmp	ebx, 100h
mov	[esp+200h+var_1DC], edx
jl	short loc_82FFC1
mov	ecx, [esp+200h+var_1D4]
and	ebx, 0FFh
lea	ebx, [ecx+ebx*8]
jmp	short loc_82FFC4

loc_82FFC1:
lea	ebx, [edx+ebx*8]

loc_82FFC4:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_82FFDA
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh

loc_82FFDA:
mov	edi, [eax]
mov	eax, [eax+4]
mov	[esp+200h+var_1C], eax
mov	eax, [ebx]
mov	ebx, [ebx+4]
lea	edx, [edx+ecx*8]
mov	ecx, [esi+1Ch]
mov	[esp+200h+var_BC], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[ecx], edi
mov	edi, [esp+200h+var_1C]
mov	[ecx+8], eax
mov	eax, [esp+200h+var_BC]
jmp	loc_82F77B

loc_830015:		; jumptable 0082F2FA case 17
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_830033
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	ecx, [ecx+eax*8]
jmp	short loc_83003A

loc_830033:
mov	edx, [esp+200h+var_1DC]
lea	ecx, [edx+eax*8]

loc_83003A:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
mov	dword ptr [esp+200h+var_1C8], ecx
mov	[esp+200h+var_1B8], edi
jl	short loc_830062
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edi, [eax+edi*8]
jmp	short loc_830069

loc_830062:
mov	edx, [esp+200h+var_1DC]
lea	edi, [edx+edi*8]

loc_830069:
fld	dword ptr [ecx+4]
mov	eax, [ecx]
fstp	[esp+200h+var_1E0]
fld	dword ptr [edi+4]
fstp	[esp+200h+var_1D0]
cmp	eax, 3
jnz	short loc_8300AA
cmp	[edi], eax
jnz	short loc_8300A5
fld	[esp+200h+var_1E0]
fld	[esp+200h+var_1D0]
call	__CIpow
fstp	[esp+200h+var_1E0]
fld	[esp+200h+var_1E0]
mov	dword ptr [ebx], 3
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_8300A5:
fld	dword ptr [ecx+4]
jmp	short loc_8300E3

loc_8300AA:
cmp	eax, 4
jnz	loc_830147
mov	eax, dword ptr [esp+200h+var_1C8]
mov	eax, [eax+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_830147
mov	ecx, dword ptr [esp+200h+var_1C8]
mov	eax, [ecx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_8300E3:
mov	eax, [edi]
fstp	[esp+200h+var_1E0]
cmp	eax, 3
jnz	short loc_8300F3
fld	dword ptr [edi+4]
jmp	short loc_830120

loc_8300F3:
cmp	eax, 4
jnz	short loc_830147
mov	eax, [edi+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_830147
mov	edi, [edi+4]
mov	eax, [edi]
push	eax		; int
add	edi, 8
push	edi		; char *
call	sub_822B80
add	esp, 8

loc_830120:
fstp	[esp+200h+var_1D0]
fld	[esp+200h+var_1E0]
fld	[esp+200h+var_1D0]
call	__CIpow
fstp	[esp+200h+var_1E0]
fld	[esp+200h+var_1E0]
mov	dword ptr [ebx], 3
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_830147:
mov	edx, [esi+1Ch]
add	edx, 18h
cmp	edx, [esi+24h]
jbe	short loc_8301A3
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ebx, [esp+200h+var_1BC]
cmp	ebx, 100h
mov	edi, [esi+20h]
mov	[esp+200h+var_1DC], edi
jl	short loc_830180
mov	ecx, [esp+200h+var_1D4]
mov	eax, ebx
and	eax, 0FFh
lea	eax, [ecx+eax*8]
jmp	short loc_830183

loc_830180:
lea	eax, [edi+ebx*8]

loc_830183:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_83019E
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh
lea	edi, [edx+ecx*8]
jmp	short loc_8301AB

loc_83019E:
lea	edi, [edi+ecx*8]
jmp	short loc_8301AB

loc_8301A3:
mov	eax, dword ptr [esp+200h+var_1C8]
mov	ebx, [esp+200h+var_1BC]

loc_8301AB:		; "^"
push	offset asc_1468B9C
push	8
push	edi
push	eax
push	esi
call	sub_823460
mov	edx, [esi+20h]
add	esp, 14h
cmp	ebx, 100h
mov	[esp+200h+var_1DC], edx
jl	short loc_8301DB
mov	ecx, [esp+200h+var_1D4]
and	ebx, 0FFh
lea	ebx, [ecx+ebx*8]
jmp	short loc_8301DE

loc_8301DB:
lea	ebx, [edx+ebx*8]

loc_8301DE:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_8301F4
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh

loc_8301F4:
mov	edi, [eax]
mov	eax, [eax+4]
mov	[esp+200h+var_5C], eax
mov	eax, [ebx]
mov	ebx, [ebx+4]
lea	edx, [edx+ecx*8]
mov	ecx, [esi+1Ch]
mov	[esp+200h+var_AC], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[ecx], edi
mov	edi, [esp+200h+var_5C]
mov	[ecx+8], eax
mov	eax, [esp+200h+var_AC]
jmp	loc_82F77B

loc_83022F:		; jumptable 0082F2FA case 31
fld	dword ptr [ebx+14h]
mov	eax, [ebx+0Ch]
fadd	dword ptr [ebx+4]
fstp	[esp+200h+var_1E0]
test	eax, eax
jle	loc_82F2BE
fld	[esp+200h+var_1E0]
dec	eax
mov	[ebx+0Ch], eax
fst	dword ptr [ebx+4]
mov	eax, [esp+200h+var_1D8]
shr	edi, 0Eh
lea	ecx, [eax+edi*4-7FFFCh]
mov	dword ptr [ebx], 3
fstp	dword ptr [ebx+1Ch]
mov	[esp+200h+var_1D8], ecx
mov	dword ptr [ebx+18h], 3
jmp	loc_82F2BE

loc_830276:		; jumptable 0082F2FA case 38
mov	eax, [esp+200h+var_1D4]
mov	edx, [esp+200h+var_1DC]
mov	ebx, edi
shr	ebx, 17h
add	ebx, ebx
shr	edi, 0Eh
add	ebx, ebx
and	edi, 1FFh
lea	edi, [eax+edi*8]
mov	eax, [edi+4]
add	ebx, ebx
push	eax
mov	[esp+204h+var_1D0], ebx
add	ebx, edx
push	ebx
lea	ecx, [esp+208h+var_168]
push	ecx
push	esi
mov	[esp+210h+var_168], 0
call	sub_823350
add	esp, 10h
test	eax, eax
jz	short loc_8302E9
mov	ecx, [esi+20h]
mov	edx, [esp+200h+var_168]
mov	eax, [esp+200h+var_1C0]
mov	[esp+200h+var_1DC], ecx
mov	[eax+ecx], edx
mov	ecx, [esp+200h+var_164]
mov	edx, [esp+200h+var_1DC]
mov	[eax+edx+4], ecx
jmp	loc_82F2BE

loc_8302E9:
mov	eax, [esi+1Ch]
add	eax, 18h
cmp	eax, [esi+24h]
jbe	short loc_83030D
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	eax, [esi+20h]
mov	ecx, [esp+200h+var_1D0]
mov	[esp+200h+var_1DC], eax
lea	ebx, [ecx+eax]

loc_83030D:
mov	edx, [esp+200h+var_164]
mov	ecx, [esp+200h+var_168]
mov	eax, [esi+1Ch]
mov	[esp+200h+var_2C], edx
mov	edx, [ebx]
mov	ebx, [ebx+4]
mov	[esp+200h+var_9C], ebx
mov	ebx, [edi]
mov	edi, [edi+4]
mov	[eax], ecx
mov	ecx, [esp+200h+var_2C]
mov	[eax+8], edx
mov	edx, [esp+200h+var_9C]

loc_830349:
mov	[eax+4], ecx
mov	[eax+0Ch], edx
mov	[eax+10h], ebx
mov	[eax+14h], edi
add	eax, 18h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1D8]
push	eax
jmp	loc_82F535

loc_830365:		; jumptable 0082F2FA case 9
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_830387
mov	edx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	eax, [edx+eax*8]
mov	dword ptr [esp+200h+var_1C8], eax
jmp	short loc_830392

loc_830387:
mov	ecx, [esp+200h+var_1DC]
lea	edx, [ecx+eax*8]
mov	dword ptr [esp+200h+var_1C8], edx

loc_830392:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
mov	[esp+200h+var_1B8], edi
jl	short loc_8303BA
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
lea	ecx, [eax+edi*8]
mov	[esp+200h+var_1E0], ecx
jmp	short loc_8303C5

loc_8303BA:
mov	edx, [esp+200h+var_1DC]
lea	eax, [edx+edi*8]
mov	[esp+200h+var_1E0], eax

loc_8303C5:
mov	edi, ebx
jmp	short loc_8303D0
align 10h

loc_8303D0:
mov	eax, [edi]
cmp	eax, 5
jnz	loc_830468
mov	edi, [edi+4]
cmp	dword ptr [edi], 0
mov	[esp+200h+var_1D0], edi
jz	loc_83055B
test	dword ptr [edi+8], 0F0000000h
jz	short loc_830408
mov	edx, dword ptr [esp+200h+var_1C8]
lea	ecx, [esp+200h+var_198]
push	ecx
push	edx
push	esi
mov	ecx, edi
call	sub_822100
jmp	short loc_830420

loc_830408:
mov	ecx, dword ptr [esp+200h+var_1C8]
lea	eax, [esp+200h+var_198]
push	eax
push	ecx
mov	ecx, [esp+208h+var_1D0]
push	esi
call	sub_820740
mov	edi, [esp+200h+var_1D0]

loc_830420:
cmp	[esp+200h+var_198], 0
jnz	loc_8305A4
mov	eax, [esp+200h+var_1D0]
mov	edi, [eax]
add	edi, 10h
cmp	dword ptr [edi], 0
jnz	loc_8304FD
test	dword ptr [eax+8], 0F0000000h
jz	loc_8305E9
mov	ecx, [esp+200h+var_1E0]
mov	edx, dword ptr [esp+200h+var_1C8]
push	ecx
push	edx
push	esi
mov	ecx, eax
call	sub_822950
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_830468:
mov	ecx, eax
sub	ecx, 5
jz	short loc_8304D0
sub	ecx, 2
jz	short loc_8304C8
mov	edx, [esi]
mov	eax, [edx+eax*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+200h+var_160]
push	edx
push	eax
jz	short loc_830499
call	sub_821EF0
jmp	short loc_83049E

loc_830499:
call	sub_8208C0

loc_83049E:
test	eax, eax
jz	short loc_8304C4
cmp	[esp+200h+var_160], 5
jnz	short loc_8304C4
mov	ecx, [esp+200h+var_15C]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_8304C0
push	esi
call	sub_81FED0

loc_8304C0:
mov	edi, eax
jmp	short loc_8304D5

loc_8304C4:
xor	edi, edi
jmp	short loc_8304D9

loc_8304C8:
mov	eax, [edi+4]
mov	edi, [eax+4]
jmp	short loc_8304D5

loc_8304D0:
mov	ecx, [edi+4]
mov	edi, [ecx]

loc_8304D5:
test	edi, edi
jnz	short loc_8304E7

loc_8304D9:		; "attempt to index a nil value"
push	offset aAttemptToIndex
push	esi
call	sub_81A760
add	esp, 8

loc_8304E7:
add	edi, 10h
cmp	dword ptr [edi], 0
jnz	short loc_8304FD
push	offset aErrorInSettabl ; "error	in settable_event"
push	esi
call	sub_81A760
add	esp, 8

loc_8304FD:
cmp	dword ptr [edi], 5
jz	loc_8303D0
mov	edx, [edi]
mov	[esp+200h+var_198], edx
mov	edx, [esi+1Ch]
mov	eax, [edi+4]
add	edx, 20h
mov	[esp+200h+var_194], eax
cmp	edx, [esi+24h]
jbe	loc_830625
push	4
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ecx, [esi+20h]
mov	eax, [esp+200h+var_1C0]
lea	ebx, [eax+ecx]
mov	eax, [esp+200h+var_1BC]
cmp	eax, 100h
mov	[esp+200h+var_1DC], ecx
jl	loc_830609
mov	edx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	edx, [edx+eax*8]
jmp	loc_83060C

loc_83055B:
test	dword ptr [edi+8], 0F0000000h
jz	short loc_830584
mov	edx, [esp+200h+var_1E0]
mov	eax, dword ptr [esp+200h+var_1C8]
mov	ecx, [esp+200h+var_1D0]
push	edx
push	eax
push	esi
call	sub_822950
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_830584:
mov	ecx, [esp+200h+var_1E0]
mov	edx, dword ptr [esp+200h+var_1C8]
push	ecx
mov	ecx, [esp+204h+var_1D0]
push	edx
push	esi
call	sub_820D20
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_8305A4:
test	dword ptr [edi+8], 0F0000000h
jz	short loc_8305CB
mov	eax, [esp+200h+var_1E0]
mov	ecx, dword ptr [esp+200h+var_1C8]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	sub_822950
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_8305CB:
mov	edx, [esp+200h+var_1E0]
mov	eax, dword ptr [esp+200h+var_1C8]
push	edx
push	eax
push	esi
mov	ecx, edi
call	sub_820D20
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_8305E9:
mov	eax, [esp+200h+var_1E0]
mov	ecx, dword ptr [esp+200h+var_1C8]
push	eax
push	ecx
mov	ecx, [esp+208h+var_1D0]
push	esi
call	sub_820D20
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_830609:
lea	edx, [ecx+eax*8]

loc_83060C:
mov	eax, [esp+200h+var_1B8]
cmp	eax, 100h
jl	short loc_830620
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh

loc_830620:
lea	ecx, [ecx+eax*8]
jmp	short loc_83062D

loc_830625:
mov	edx, dword ptr [esp+200h+var_1C8]
mov	ecx, [esp+200h+var_1E0]

loc_83062D:
mov	edi, [esp+200h+var_198]
mov	eax, [esi+1Ch]
mov	[esp+200h+var_130], edi
mov	edi, [esp+200h+var_194]
mov	[esp+200h+var_12C], edi
mov	edi, [ebx]
mov	ebx, [ebx+4]
mov	[esp+200h+var_4C], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[esp+200h+var_8C], edx
mov	edx, [ecx]
mov	ecx, [ecx+4]
mov	[esp+200h+var_114], ecx
mov	ecx, [esp+200h+var_130]
mov	[eax], ecx
mov	ecx, [esp+200h+var_12C]
mov	[eax+4], ecx
mov	ecx, [esp+200h+var_4C]
mov	[eax+0Ch], ecx
mov	ecx, [esp+200h+var_8C]
mov	[eax+18h], edx
mov	edx, [esp+200h+var_114]
mov	[eax+8], edi
mov	[eax+10h], ebx
mov	[eax+14h], ecx
mov	[eax+1Ch], edx
add	eax, 20h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1D8]
push	eax
push	0
push	3
push	esi
call	sub_81C370
mov	ecx, [esi+20h]
add	esp, 10h
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_8306C8:		; jumptable 0082F2FA case 28
mov	eax, edi
shr	edi, 0Eh
shr	eax, 17h
and	edi, 1FFh
test	eax, eax
lea	eax, [ebx+eax*8]
jnz	short loc_8306E0
mov	eax, [esi+1Ch]

loc_8306E0:
mov	ecx, [ebx]
dec	edi
sub	ecx, 9
mov	[esp+200h+var_1E0], edi
jz	loc_8308AF
sub	ecx, 1
jz	short loc_830739
push	eax
push	ebx
push	esi
call	sub_822E70
mov	ecx, [esi+20h]
mov	edx, [esp+20Ch+var_1C0]
lea	ebx, [edx+ecx]
mov	[esp+20Ch+var_1DC], ecx
mov	ecx, [ebx]
add	esp, 0Ch
cmp	ecx, 9
jz	loc_8308AF
cmp	ecx, 0Ah
jz	short loc_830739
push	ecx
push	esi
call	sub_81BA90
push	eax
push	offset aFunctionExpect ; "function expected instead of %s"
push	esi
call	sub_81A760
add	esp, 14h
jmp	loc_82F2BE

loc_830739:
mov	ecx, [ebx+4]
lea	edi, [esi+4]
mov	dword ptr [esp+200h+var_1C8], ecx
mov	ecx, [edi+8]
add	ecx, 10h
mov	[esp+200h+var_1D0], eax
mov	edx, ebx
cmp	ecx, [edi+4]
jnz	short loc_830782
mov	ecx, [esi+28h]
sub	eax, ecx
sub	ebx, ecx
sar	eax, 3
push	esi
mov	ecx, edi
sar	ebx, 3
mov	[esp+204h+var_1D0], eax
call	sub_8237A0
mov	eax, [esi+28h]
mov	ecx, [edi+8]
lea	edx, [eax+ebx*8]
mov	ebx, [esp+200h+var_1D0]
add	ecx, 10h
lea	eax, [eax+ebx*8]
jmp	short loc_830786

loc_830782:
mov	eax, [esp+200h+var_1D0]

loc_830786:
mov	[edi+8], ecx
mov	ebx, [esi+20h]
mov	[ecx], ebx
mov	ebx, [esp+200h+var_1E0]
mov	[ecx+0Ch], ebx
mov	ebx, [esp+200h+var_1D8]
mov	dword ptr [ecx+8], 0
mov	[ecx+4], ebx
add	edx, 8
mov	[esi+20h], edx
mov	edx, dword ptr [esp+200h+var_1C8]
mov	[esi+1Ch], eax
mov	ebx, [edx+8]
inc	dword ptr [esi+44h]
cmp	dword ptr [esi+44h], 82h
jle	short loc_8307D2
push	82h
push	offset aCStackOverflow ; "C stack overflow: too	many (%d) nested "...
push	esi
call	sub_81A760
add	esp, 0Ch

loc_8307D2:
push	14h
push	esi
call	sub_81B6A0
push	esi
call	ebx
dec	dword ptr [esi+44h]
add	esp, 0Ch
test	eax, eax
jl	loc_8322B8
mov	ecx, [esi+1Ch]
lea	edx, ds:0[eax*8]
mov	ebx, edx
mov	edx, ecx
sub	edx, ebx
mov	ebx, [edi+8]
sub	ecx, edx
mov	dword ptr [esp+200h+var_1C8], ebx
mov	ebx, [ebx+0Ch]
sar	ecx, 3
mov	[esp+200h+var_1BC], ebx
cmp	ecx, eax
jnb	short loc_830814
mov	eax, ecx

loc_830814:
mov	[esp+200h+var_1E0], eax
cmp	eax, ebx
jb	short loc_830820
mov	[esp+200h+var_1E0], ebx

loc_830820:
mov	ebx, [esi+20h]
sub	ebx, 8
cmp	[esp+200h+var_1E0], 0
jbe	short loc_830856
mov	ecx, edx
mov	edx, [esp+200h+var_1E0]
mov	eax, ebx
sub	ecx, ebx
mov	[esp+200h+var_1D0], edx
jmp	short loc_830840
align 10h

loc_830840:
mov	edx, [ecx+eax]
mov	[eax], edx
mov	edx, [ecx+eax+4]
mov	[eax+4], edx
add	eax, 8
sub	[esp+200h+var_1D0], 1
jnz	short loc_830840

loc_830856:
cmp	[esp+200h+var_1BC], 0FFFFFFFFh
mov	eax, dword ptr [esp+200h+var_1C8]
mov	edx, [eax]
jz	short loc_83088F
mov	ecx, [edx-4]
movzx	eax, byte ptr [ecx+0Dh]
lea	ecx, [edx+eax*8]
mov	eax, [esp+200h+var_1E0]
lea	eax, [ebx+eax*8]
cmp	eax, ecx
jnb	short loc_830896
jmp	short loc_830880
align 10h

loc_830880:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_830880
jmp	short loc_830896

loc_83088F:
mov	ecx, [esp+200h+var_1E0]
lea	ecx, [ebx+ecx*8]

loc_830896:
mov	eax, dword ptr [esp+200h+var_1C8]
add	eax, 0FFFFFFF0h
mov	[esi+20h], edx
mov	[esi+1Ch], ecx
mov	[edi+8], eax
mov	[esp+200h+var_1DC], edx
jmp	loc_82F2BE

loc_8308AF:
mov	ecx, [ebx+4]
inc	[ebp+arg_8]
lea	edi, [esi+4]
mov	[esp+200h+var_1B4], ecx
mov	ecx, [edi+8]
add	ecx, 10h
mov	[esp+200h+var_1D0], eax
mov	edx, ebx
cmp	ecx, [edi+4]
jnz	short loc_8308FB
mov	ecx, [esi+28h]
sub	eax, ecx
sub	ebx, ecx
sar	eax, 3
push	esi
mov	ecx, edi
sar	ebx, 3
mov	[esp+204h+var_1D0], eax
call	sub_8237A0
mov	eax, [esi+28h]
mov	ecx, [edi+8]
lea	edx, [eax+ebx*8]
mov	ebx, [esp+200h+var_1D0]
add	ecx, 10h
lea	eax, [eax+ebx*8]
jmp	short loc_8308FF

loc_8308FB:
mov	eax, [esp+200h+var_1D0]

loc_8308FF:
mov	[edi+8], ecx
mov	ebx, [esi+20h]
mov	[ecx], ebx
mov	ebx, [esp+200h+var_1E0]
mov	[ecx+0Ch], ebx
mov	ebx, [esp+200h+var_1D8]
mov	[ecx+4], ebx
mov	dword ptr [ecx+8], 0
lea	ebx, [edx+8]
mov	[esi+20h], ebx
mov	edx, [edx+4]
test	byte ptr [edx+0Eh], 2
mov	[esp+200h+var_1E0], edx
jz	short loc_830940
push	eax
push	ebx
push	edx
push	esi
mov	ecx, edi
call	sub_823980
mov	edx, [esp+200h+var_1E0]
jmp	short loc_83094D

loc_830940:
movzx	ecx, byte ptr [edx+0Fh]
lea	ecx, [ebx+ecx*8]
cmp	eax, ecx
jb	short loc_83094D
mov	eax, ecx

loc_83094D:
movzx	edx, byte ptr [edx+0Dh]
lea	ecx, [ebx+edx*8]
cmp	ecx, [esi+24h]
jbe	short loc_83098A
mov	edx, [esi+28h]
mov	ebx, eax
mov	eax, ecx
sub	ecx, [esi+1Ch]
sub	eax, edx
sar	ecx, 3
push	ecx
sub	ebx, edx
sar	eax, 3
push	esi
mov	ecx, edi
sar	ebx, 3
mov	[esp+208h+var_1E0], eax
call	sub_823530
mov	ecx, [esi+28h]
mov	edx, [esp+200h+var_1E0]
lea	eax, [ecx+ebx*8]
lea	ecx, [ecx+edx*8]

loc_83098A:
cmp	eax, ecx
jnb	short loc_83099D
mov	edi, edi

loc_830990:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_830990

loc_83099D:
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1B4]
mov	ecx, [eax+10h]
mov	edx, [eax+14h]
mov	eax, [esi+20h]
mov	[esp+200h+var_1D4], ecx
mov	[esp+200h+var_1D8], edx
jmp	loc_82F2BA

loc_8309BA:		; jumptable 0082F2FA case 30
mov	ecx, [esp+200h+var_1B4]
cmp	byte ptr [ecx+0Ch], 0
jz	short loc_8309D6
mov	edx, [esp+200h+var_1DC]
push	edx
push	esi
call	sub_832370
mov	edx, [esp+208h+var_1C0]
add	esp, 8

loc_8309D6:
mov	eax, edi
shr	eax, 17h
dec	eax
cmp	[ebp+arg_8], 0
jle	loc_832285
mov	ecx, [esp+200h+var_1DC]
mov	edi, [esi+0Ch]
dec	[ebp+arg_8]
add	edx, ecx
mov	ecx, [esi+1Ch]
sub	ecx, edx
mov	[esp+200h+var_1D0], edi
mov	edi, [edi+0Ch]
sar	ecx, 3
mov	dword ptr [esp+200h+var_1C8], edi
cmp	ecx, eax
jnb	short loc_830A0B
mov	eax, ecx

loc_830A0B:
cmp	eax, edi
jnb	short loc_830A17
mov	ebx, eax
mov	[esp+200h+var_1E0], ebx
jmp	short loc_830A1D

loc_830A17:
mov	ebx, edi
mov	[esp+200h+var_1E0], edi

loc_830A1D:
mov	edi, [esi+20h]
sub	edi, 8
test	ebx, ebx
jbe	short loc_830A44
mov	ecx, edx
mov	eax, edi
sub	ecx, edi
mov	edx, ebx
nop

loc_830A30:
mov	ebx, [ecx+eax]
mov	[eax], ebx
mov	ebx, [ecx+eax+4]
mov	[eax+4], ebx
add	eax, 8
sub	edx, 1
jnz	short loc_830A30

loc_830A44:
cmp	dword ptr [esp+200h+var_1C8], 0FFFFFFFFh
mov	edx, [esp+200h+var_1D0]
mov	edx, [edx]
mov	ebx, [edx-4]
jz	short loc_830A7F
movzx	eax, byte ptr [ebx+0Dh]
lea	ecx, [edx+eax*8]
mov	eax, [esp+200h+var_1E0]
lea	eax, [edi+eax*8]
cmp	eax, ecx
jnb	short loc_830A86
jmp	short loc_830A70
align 10h

loc_830A70:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_830A70
jmp	short loc_830A86

loc_830A7F:
mov	ecx, [esp+200h+var_1E0]
lea	ecx, [edi+ecx*8]

loc_830A86:
mov	eax, [esp+200h+var_1D0]
mov	edi, [eax+4]
mov	[esi+20h], edx
mov	[esi+1Ch], ecx
add	eax, 0FFFFFFF0h
mov	[esi+0Ch], eax
mov	[esp+200h+var_1DC], edx
mov	edx, [ebx+10h]
mov	[esp+200h+var_1B4], ebx
mov	[esp+200h+var_1D8], edi
mov	[esp+200h+var_1D4], edx
jmp	loc_82F2BE

loc_830AB1:		; jumptable 0082F2FA case 5
mov	eax, [esp+200h+var_1D4]
mov	ebx, [esp+200h+var_1B4]
shr	edi, 0Eh
lea	edi, [eax+edi*8]
mov	eax, [edi+4]
push	eax
push	ebx
lea	ecx, [esp+208h+var_180]
push	ecx
push	esi
mov	[esp+210h+var_180], 0
call	sub_823350
add	esp, 10h
test	eax, eax
jz	short loc_830B0D
mov	ecx, [esi+20h]
mov	edx, [esp+200h+var_180]
mov	eax, [esp+200h+var_1C0]
mov	[esp+200h+var_1DC], ecx
mov	[eax+ecx], edx
mov	ecx, [esp+200h+var_17C]
mov	edx, [esp+200h+var_1DC]
mov	[eax+edx+4], ecx
jmp	loc_82F2BE

loc_830B0D:
mov	eax, [esi+1Ch]
add	eax, 18h
cmp	eax, [esi+24h]
jbe	short loc_830B2A
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx

loc_830B2A:
mov	edx, [esp+200h+var_17C]
mov	ecx, [esp+200h+var_180]
mov	eax, [esi+1Ch]
mov	[esp+200h+var_104], edx
mov	edx, [ebx]
mov	ebx, [ebx+4]
mov	[esp+200h+var_F4], ebx
mov	ebx, [edi]
mov	edi, [edi+4]
mov	[eax], ecx
mov	ecx, [esp+200h+var_104]
mov	[eax+8], edx
mov	edx, [esp+200h+var_F4]
jmp	loc_830349

loc_830B6B:		; jumptable 0082F2FA case 1
mov	eax, [esp+200h+var_1D4]
shr	edi, 0Eh
mov	edx, [eax+edi*8]
mov	[ebx], edx
mov	eax, [eax+edi*8+4]
mov	[ebx+4], eax
jmp	loc_82F2BE

loc_830B83:		; jumptable 0082F2FA case 24
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
jl	short loc_830B9A
mov	edx, [esp+200h+var_1D4]
and	eax, 0FFh
jmp	short loc_830B9E

loc_830B9A:
mov	edx, [esp+200h+var_1DC]

loc_830B9E:
mov	ebx, [edx+eax*8]
lea	eax, [edx+eax*8]
shr	edi, 0Eh
mov	[esp+200h+var_1A0], ebx
mov	eax, [eax+4]
and	edi, 1FFh
cmp	edi, 100h
mov	[esp+200h+var_19C], eax
jl	short loc_830BCF
mov	edx, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edx, [edx+edi*8]
jmp	short loc_830BD6

loc_830BCF:
mov	eax, [esp+200h+var_1DC]
lea	edx, [eax+edi*8]

loc_830BD6:
mov	edi, [edx]
cmp	ebx, edi
mov	[esp+200h+var_170], edi
mov	eax, [edx+4]
setz	dl
mov	[esp+200h+var_16C], eax
test	dl, dl
jz	short loc_830C4D
cmp	ebx, 3
jnz	short loc_830C2E
fld	[esp+200h+var_19C]
fld	[esp+200h+var_16C]
fcompp
fnstsw	ax
test	ah, 41h
jnz	short loc_830C1E
mov	eax, 1
xor	edx, edx
cmp	eax, ecx
setz	dl
mov	eax, edx
jmp	loc_830D0E

loc_830C1E:
xor	eax, eax
xor	edx, edx
cmp	eax, ecx
setz	dl
mov	eax, edx
jmp	loc_830D0E

loc_830C2E:
cmp	ebx, 4
jnz	short loc_830C4D
push	eax
mov	eax, [esp+204h+var_19C]
push	eax
call	sub_822BF0
xor	ecx, ecx
add	esp, 8
test	eax, eax
setl	cl
jmp	loc_830D05

loc_830C4D:		; "<"
push	offset asc_1468BC0
push	0Eh
lea	edx, [esp+208h+var_170]
push	edx
lea	eax, [esp+20Ch+var_1A0]
push	eax
push	esi
call	sub_8234D0
mov	ecx, [esi+1Ch]
add	ecx, 18h
add	esp, 14h
mov	edi, eax
cmp	ecx, [esi+24h]
jbe	short loc_830C82
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530

loc_830C82:
mov	ebx, [esp+200h+var_19C]
mov	edx, [esi+20h]
mov	eax, [esi+1Ch]
mov	[esp+200h+var_1DC], edx
mov	ecx, [edi]
mov	edx, [esp+200h+var_1A0]
mov	edi, [edi+4]
mov	[esp+200h+var_E4], ebx
mov	ebx, [esp+200h+var_170]
mov	[esp+200h+var_D8], ebx
mov	ebx, [esp+200h+var_16C]
mov	[eax], ecx
mov	ecx, [esp+200h+var_E4]
mov	[eax+8], edx
mov	edx, [esp+200h+var_D8]
mov	[eax+4], edi
mov	[eax+0Ch], ecx
mov	[eax+14h], ebx

loc_830CD1:
mov	[eax+10h], edx
add	eax, 18h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1D8]
push	eax
push	1
push	2
push	esi
call	sub_81C370
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	esp, 10h
add	eax, 0FFFFFFF8h
mov	[esp+200h+var_1DC], ecx
mov	edx, [eax]
mov	ecx, [eax+4]
mov	[esi+1Ch], eax
mov	[esp+200h+var_1D0], edx

loc_830D05:
xor	eax, eax
cmp	ecx, [esp+200h+var_1E0]

loc_830D0B:
setz	al

loc_830D0E:
test	eax, eax
jz	short loc_830D2B

loc_830D12:
mov	eax, [esp+200h+var_1D8]
mov	ecx, [eax]
shr	ecx, 0Eh
lea	edx, [eax+ecx*4-7FFF8h]
mov	[esp+200h+var_1D8], edx
jmp	loc_82F2BE

loc_830D2B:
add	[esp+200h+var_1D8], 4
jmp	loc_82F2BE

loc_830D35:		; jumptable 0082F2FA case 22
mov	eax, [esp+200h+var_1D8]
shr	edi, 0Eh
lea	ecx, [eax+edi*4-7FFFCh]
mov	[esp+200h+var_1D8], ecx
jmp	loc_82F2BE

loc_830D4C:		; jumptable 0082F2FA case 26
mov	eax, [ebx]
shr	edi, 0Eh
and	edi, 1FFh
test	eax, eax
jz	short loc_830D6D
cmp	eax, 1
jnz	short loc_830D66
cmp	dword ptr [ebx+4], 0
jz	short loc_830D6D

loc_830D66:
mov	eax, 1
jmp	short loc_830D6F

loc_830D6D:
xor	eax, eax

loc_830D6F:
cmp	eax, edi
jnz	short loc_830D2B

loc_830D73:
mov	eax, [esp+200h+var_1D8]
mov	edx, [eax]
shr	edx, 0Eh
lea	eax, [eax+edx*4-7FFF8h]
mov	[esp+200h+var_1D8], eax
jmp	loc_82F2BE

loc_830D8C:		; jumptable 0082F2FA case 4
mov	ecx, [esp+200h+var_1B4]
shr	edi, 17h
mov	edx, [ecx+edi*4+18h]
mov	eax, [edx+8]
mov	ecx, [eax]
mov	[ebx], ecx
mov	edx, [eax+4]
mov	[ebx+4], edx
jmp	loc_82F2BE

loc_830DA9:		; jumptable 0082F2FA case 8
mov	eax, [esp+200h+var_1B4]
mov	ecx, [ebx]
shr	edi, 17h
mov	edi, [eax+edi*4+18h]
mov	eax, [edi+8]
mov	[eax], ecx
mov	edx, [ebx+4]
mov	[eax+4], edx
mov	ecx, [esi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	loc_82F2BE
mov	eax, [edi+8]
push	eax
push	edi
call	sub_81EB00
jmp	loc_82F2BE

loc_830DE2:		; jumptable 0082F2FA case 23
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
jl	short loc_830DFC
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh
lea	eax, [ecx+eax*8]
jmp	short loc_830E03

loc_830DFC:
mov	edx, [esp+200h+var_1DC]
lea	eax, [edx+eax*8]

loc_830E03:
mov	ecx, [eax]
shr	edi, 0Eh
mov	[esp+200h+var_188], ecx
mov	eax, [eax+4]
and	edi, 1FFh
cmp	edi, 100h
mov	[esp+200h+var_184], eax
jl	short loc_830E30
mov	edx, [esp+200h+var_1D4]
and	edi, 0FFh
lea	eax, [edx+edi*8]
jmp	short loc_830E37

loc_830E30:
mov	eax, [esp+200h+var_1DC]
lea	eax, [eax+edi*8]

loc_830E37:
mov	edx, [eax]
mov	[esp+200h+var_178], edx
mov	eax, [eax+4]
xor	ebx, ebx
mov	[esp+200h+var_174], eax
mov	edi, ecx
cmp	ecx, edx
jnz	loc_830F3E
lea	ecx, [esp+200h+var_178]
push	ecx
lea	edx, [esp+204h+var_188]
push	edx
call	sub_822BA0
mov	ebx, eax
add	esp, 8
test	ebx, ebx
jnz	loc_830F3E
cmp	edi, 5
jl	loc_830F3E
push	0Dh
lea	eax, [esp+204h+var_178]
push	eax
lea	ecx, [esp+208h+var_188]
push	ecx
push	esi
call	sub_8230A0
mov	edi, eax
add	esp, 10h
cmp	[edi], ebx
jz	loc_830F3E
mov	edx, [esi+1Ch]
add	edx, 18h
cmp	edx, [esi+24h]
jbe	short loc_830EB9
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530

loc_830EB9:
mov	ebx, [esp+200h+var_184]
mov	eax, [esi+20h]
mov	edx, [esp+200h+var_188]
mov	[esp+200h+var_1DC], eax
mov	ecx, [edi]
mov	eax, [esi+1Ch]
mov	edi, [edi+4]
mov	[esp+200h+var_C4], ebx
mov	ebx, [esp+200h+var_178]
mov	[esp+200h+var_B8], ebx
mov	ebx, [esp+200h+var_174]
mov	[eax], ecx
mov	ecx, [esp+200h+var_C4]
mov	[eax+8], edx
mov	edx, [esp+200h+var_B8]
mov	[eax+4], edi
mov	[eax+0Ch], ecx
mov	[eax+10h], edx
mov	[eax+14h], ebx
add	eax, 18h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1D8]
push	eax
push	1
push	2
push	esi
call	sub_81C370
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	esp, 10h
add	eax, 0FFFFFFF8h
mov	[esp+200h+var_1DC], ecx
mov	edx, [eax]
mov	ecx, [eax+4]
mov	[esp+200h+var_1D0], edx
mov	[esi+1Ch], eax
mov	ebx, ecx

loc_830F3E:
cmp	ebx, [esp+200h+var_1E0]
jnz	loc_830D2B
jmp	loc_830D12

loc_830F4D:		; jumptable 0082F2FA case 33
shr	edi, 0Eh
and	edi, 1FFh
mov	[esp+200h+var_1D0], edi
cmp	edi, 2
jnz	loc_83105B
cmp	dword ptr [ebx], 0Ah
jnz	loc_83105B
mov	eax, [ebx+4]
mov	eax, [eax+8]
cmp	eax, offset sub_81B080
jnz	short loc_830FD2
fld	dword ptr [ebx+14h]
lea	edi, [ebx+20h]
push	edi
call	__ftol2_sse
mov	ecx, [ebx+0Ch]
inc	eax
push	eax
push	ecx
push	esi
call	sub_819A40
add	esp, 10h
cmp	dword ptr [edi], 0
jnz	short loc_830FB3
mov	eax, [ebx+14h]
mov	dword ptr [ebx+10h], 0
mov	edx, [ebx+10h]
lea	edi, [ebx+18h]
mov	[edi], edx
mov	[edi+4], eax
jmp	loc_831141

loc_830FB3:
fld	dword ptr [ebx+14h]
mov	edx, [ebx+10h]
fadd	ds:dbl_15FCC40
lea	edi, [ebx+18h]
mov	[edi], edx
fstp	dword ptr [ebx+14h]
mov	eax, [ebx+14h]
mov	[edi+4], eax
jmp	loc_831141

loc_830FD2:
cmp	eax, offset sub_81B0F0
jnz	short loc_83101F
mov	edx, [ebx+0Ch]
lea	ecx, [esp+200h+var_128]
push	ecx
lea	edi, [ebx+10h]
push	edi
push	edx
push	esi
call	sub_818E80
mov	eax, [esp+210h+var_128]
add	esp, 10h
test	eax, eax
jnz	short loc_830FFF
mov	[edi], eax

loc_830FFF:
mov	ecx, [ebx+10h]
mov	edx, [ebx+14h]
lea	edi, [ebx+18h]
mov	[ebx+20h], eax
mov	eax, [esp+200h+var_124]
mov	[edi], ecx
mov	[edi+4], edx
mov	[ebx+24h], eax
jmp	loc_831141

loc_83101F:
cmp	eax, offset sub_795DC0
jnz	short loc_83105B
mov	edx, [ebx+0Ch]
lea	ecx, [ebx+20h]
push	ecx
lea	edi, [ebx+18h]
lea	eax, [ebx+10h]
push	edi
push	eax
push	edx
push	esi
mov	[esp+214h+var_1E0], eax
call	sub_82F260
mov	eax, [esp+214h+var_1E0]
add	esp, 14h
cmp	dword ptr [eax], 0
jnz	loc_831141
mov	dword ptr [edi], 0
jmp	loc_831141

loc_83105B:
mov	ecx, [esi+1Ch]
add	ecx, 18h
cmp	ecx, [esi+24h]
jbe	short loc_831071
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530

loc_831071:
mov	ecx, [esi+20h]
mov	ebx, [esp+200h+var_1C0]
mov	[esp+200h+var_1DC], ecx
mov	edi, [ebx+ecx]
lea	edx, [ebx+ecx+8]
lea	eax, [ebx+ecx+10h]
mov	ecx, [ebx+ecx+4]
mov	[esp+200h+var_A4], ecx
mov	ecx, [edx]
mov	edx, [edx+4]
mov	[esp+200h+var_94], edx
mov	[esp+200h+var_1E0], eax
mov	eax, [esi+1Ch]
mov	edx, [esp+200h+var_1E0]
mov	edx, [edx]
mov	[esp+200h+var_88], edx
mov	edx, [esp+200h+var_1E0]
mov	edx, [edx+4]
mov	[eax], edi
mov	edi, [esp+200h+var_A4]
mov	[eax+8], ecx
mov	ecx, [esp+200h+var_94]
mov	[eax+14h], edx
mov	edx, [esp+200h+var_1D8]
mov	[eax+4], edi
mov	edi, [esp+200h+var_1D0]
push	edx
mov	[eax+0Ch], ecx
mov	ecx, [esp+204h+var_88]
push	edi
mov	[eax+10h], ecx
add	eax, 18h
push	2
push	esi
mov	[esi+1Ch], eax
call	sub_81C370
mov	eax, [esi+20h]
add	ebx, eax
mov	[esp+210h+var_1DC], eax
lea	eax, [edi-1]
add	esp, 10h
mov	[esp+200h+var_1E0], ebx
test	eax, eax
jl	short loc_831132
lea	edx, [ebx+eax*8+18h]

loc_831112:
mov	ecx, [esi+1Ch]
mov	edi, [ecx-8]
mov	ebx, [ecx-4]
add	ecx, 0FFFFFFF8h
mov	[esi+1Ch], ecx
mov	[edx], edi
mov	[edx+4], ebx
dec	eax
sub	edx, 8
test	eax, eax
jge	short loc_831112
mov	ebx, [esp+200h+var_1E0]

loc_831132:
mov	eax, [ebx+18h]
mov	ecx, [ebx+1Ch]
lea	edi, [ebx+18h]
mov	[ebx+10h], eax
mov	[ebx+14h], ecx

loc_831141:
cmp	dword ptr [edi], 0
jz	loc_830D2B
jmp	loc_830D73

loc_83114F:		; jumptable 0082F2FA case 32
fldz
mov	eax, [ebx]
fst	[esp+200h+var_1D0]
fst	[esp+200h+var_1E0]
fstp	dword ptr [esp+200h+var_1C8]
cmp	eax, 3
jnz	short loc_831169
fld	dword ptr [ebx+4]
jmp	short loc_83119E

loc_831169:
cmp	eax, 4
jnz	loc_831221
mov	eax, [ebx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	loc_831221
mov	eax, [ebx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_83119E:
mov	eax, [ebx+8]
fstp	[esp+200h+var_1D0]
cmp	eax, 3
jnz	short loc_8311AF
fld	dword ptr [ebx+0Ch]
jmp	short loc_8311DC

loc_8311AF:
cmp	eax, 4
jnz	short loc_831221
mov	eax, [ebx+0Ch]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_831221
mov	eax, [ebx+0Ch]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
add	esp, 8

loc_8311DC:
mov	eax, [ebx+10h]
fstp	[esp+200h+var_1E0]
cmp	eax, 3
jnz	short loc_8311F1
fld	dword ptr [ebx+14h]
fstp	dword ptr [esp+200h+var_1C8]
jmp	short loc_83122F

loc_8311F1:
cmp	eax, 4
jnz	short loc_831221
mov	eax, [ebx+14h]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_831221
mov	eax, [ebx+14h]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
fstp	dword ptr [esp+208h+var_1C8]
jmp	short loc_83122C

loc_831221:		; "number expected for loop variables"
push	offset aNumberExpected
push	esi
call	sub_81A760

loc_83122C:
add	esp, 8

loc_83122F:
fld	[esp+200h+var_1E0]
fld	[esp+200h+var_1D0]
fld	st
fsubp	st(2), st
fld	dword ptr [esp+200h+var_1C8]
fld	st
fdivp	st(3), st
fxch	st(2)
fstp	[esp+200h+var_1E0]
fldz
fld	[esp+200h+var_1E0]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 1
jz	short loc_83125E
fstp	st
jmp	short loc_83126B

loc_83125E:
fcomp	ds:flt_1468C14
fnstsw	ax
test	ah, 41h
jnp	short loc_831275

loc_83126B:
fld	ds:flt_1431A30
fstp	[esp+200h+var_1E0]

loc_831275:
fld	[esp+200h+var_1E0]
mov	dword ptr [ebx+8], 1
call	__ftol2_sse
fxch	st(1)
mov	ecx, [esp+200h+var_1D8]
fst	dword ptr [ebx+14h]
fsubr	st, st(1)
inc	eax
shr	edi, 0Eh
mov	[ebx+0Ch], eax
mov	eax, 3
fstp	dword ptr [ebx+4]
lea	edx, [ecx+edi*4-7FFFCh]
fstp	dword ptr [ebx+1Ch]
mov	[ebx+10h], eax
mov	[ebx], eax
mov	[ebx+18h], eax
mov	[esp+200h+var_1D8], edx
jmp	loc_82F2BE

loc_8312BA:		; jumptable 0082F2FA case 2
mov	eax, edi
shr	eax, 17h
mov	[ebx+4], eax
mov	ecx, [esp+200h+var_1DC]
shr	edi, 0Eh
mov	dword ptr [edx+ecx], 1
mov	edx, [esp+200h+var_1D8]
and	edi, 1FFh
lea	eax, [edx+edi*4]
mov	[esp+200h+var_1D8], eax
jmp	loc_82F2BE

loc_8312E6:		; jumptable 0082F2FA case 25
mov	eax, edi
shr	eax, 17h
cmp	eax, 100h
mov	[esp+200h+var_1BC], eax
jl	short loc_831301
mov	edx, [esp+200h+var_1D4]
and	eax, 0FFh
jmp	short loc_831305

loc_831301:
mov	edx, [esp+200h+var_1DC]

loc_831305:
shr	edi, 0Eh
and	edi, 1FFh
cmp	edi, 100h
lea	edx, [edx+eax*8]
mov	[esp+200h+var_1B8], edi
jl	short loc_831329
mov	eax, [esp+200h+var_1D4]
and	edi, 0FFh
jmp	short loc_83132D

loc_831329:
mov	eax, [esp+200h+var_1DC]

loc_83132D:
lea	eax, [eax+edi*8]
mov	edi, [edx]
cmp	edi, 3
jnz	short loc_831361
cmp	[eax], edi
jnz	short loc_831361
fld	dword ptr [edx+4]
fld	dword ptr [eax+4]
fcompp
fnstsw	ax
test	ah, 1
jnz	loc_830C1E
mov	eax, 1
xor	edx, edx
cmp	eax, ecx
setz	dl
mov	eax, edx
jmp	loc_830D0E

loc_831361:
cmp	edi, 4
jnz	short loc_831386
cmp	[eax], edi
jnz	short loc_831386
mov	eax, [eax+4]
mov	edx, [edx+4]
push	eax
push	edx
call	sub_822BF0
xor	ecx, ecx
add	esp, 8
test	eax, eax
setle	cl
jmp	loc_830D05

loc_831386:
push	0Ch
push	eax
push	edx
push	esi
call	sub_8230A0
mov	edx, [esi+1Ch]
add	edx, 18h
add	esp, 10h
mov	ebx, eax
cmp	edx, [esi+24h]
jbe	short loc_8313AB
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530

loc_8313AB:
mov	edi, [esp+200h+var_1BC]
cmp	edi, 100h
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx
jl	short loc_8313CE
mov	edx, [esp+200h+var_1D4]
mov	eax, edi
and	eax, 0FFh
lea	edx, [edx+eax*8]
jmp	short loc_8313D1

loc_8313CE:
lea	edx, [ecx+edi*8]

loc_8313D1:
mov	eax, [esp+200h+var_1B8]
cmp	eax, 100h
jl	short loc_8313E5
mov	ecx, [esp+200h+var_1D4]
and	eax, 0FFh

loc_8313E5:
cmp	dword ptr [ebx], 0
lea	ecx, [ecx+eax*8]
jz	short loc_83142E
mov	edi, [ebx]
mov	ebx, [ebx+4]
mov	eax, [esi+1Ch]
mov	[esp+200h+var_74], ebx
mov	ebx, [edx]
mov	edx, [edx+4]
mov	[esp+200h+var_64], edx
mov	edx, [ecx]
mov	ecx, [ecx+4]
mov	[eax], edi
mov	edi, [esp+200h+var_74]
mov	[eax+4], edi
mov	edi, [esp+200h+var_64]
mov	[eax+8], ebx
mov	[eax+0Ch], edi
mov	[eax+14h], ecx
jmp	loc_830CD1

loc_83142E:		; "<"
push	offset asc_1468BE8
push	0Eh
push	ecx
push	edx
push	esi
call	sub_8234D0
mov	edx, [esi+20h]
add	esp, 14h
cmp	edi, 100h
mov	[esp+200h+var_1DC], edx
jl	short loc_83145E
mov	ecx, [esp+200h+var_1D4]
and	edi, 0FFh
lea	ebx, [ecx+edi*8]
jmp	short loc_831461

loc_83145E:
lea	ebx, [edx+edi*8]

loc_831461:
mov	ecx, [esp+200h+var_1B8]
cmp	ecx, 100h
jl	short loc_831477
mov	edx, [esp+200h+var_1D4]
and	ecx, 0FFh

loc_831477:
mov	edi, [eax]
mov	eax, [eax+4]
lea	edx, [edx+ecx*8]
mov	ecx, [esi+1Ch]
mov	[esp+200h+var_54], eax
mov	eax, [edx]
mov	edx, [edx+4]
mov	[esp+200h+var_44], edx
mov	edx, [ebx]
mov	ebx, [ebx+4]
mov	[ecx], edi
mov	edi, [esp+200h+var_54]
mov	[ecx+8], eax
mov	eax, [esp+200h+var_44]
mov	[ecx+4], edi
mov	[ecx+0Ch], eax
mov	[ecx+10h], edx
mov	[ecx+14h], ebx
add	ecx, 18h
mov	[esi+1Ch], ecx
mov	ecx, [esp+200h+var_1D8]
push	ecx
push	1
push	2
push	esi
call	sub_81C370
mov	eax, [esi+1Ch]
mov	edx, [esi+20h]
add	eax, 0FFFFFFF8h
mov	[esp+210h+var_1DC], edx
mov	ecx, [eax]
mov	[esp+210h+var_1D0], ecx
mov	ecx, [eax+4]
xor	edx, edx
add	esp, 10h
test	ecx, ecx
setz	dl
mov	[esi+1Ch], eax
xor	eax, eax
cmp	edx, [esp+200h+var_1E0]
jmp	loc_830D0B

loc_8314FC:		; jumptable 0082F2FA case 10
mov	edx, edi
shr	edi, 0Eh
and	edi, 1FFh
mov	eax, edi
shr	edx, 17h
test	al, 0F8h
jnz	short loc_831518
movzx	edi, al
and	edi, 7
jmp	short loc_831531

loc_831518:
movzx	eax, al
mov	ecx, eax
shr	ecx, 3
dec	ecx
mov	edi, 1
shl	edi, cl
and	eax, 7
add	eax, 8
imul	edi, eax

loc_831531:
test	dl, 0F8h
jnz	short loc_83153E
movzx	eax, dl
and	eax, 7
jmp	short loc_831557

loc_83153E:
movzx	edx, dl
mov	ecx, edx
shr	ecx, 3
dec	ecx
mov	eax, 1
shl	eax, cl
and	edx, 7
add	edx, 8
imul	eax, edx

loc_831557:
push	edi
push	eax
push	esi
call	sub_81FF50
mov	edx, [esi+20h]
mov	ecx, [esp+20Ch+var_1C0]
mov	[esp+20Ch+var_1DC], edx
mov	[ecx+edx+4], eax
mov	eax, [esp+20Ch+var_1DC]
add	esp, 0Ch
mov	dword ptr [ecx+eax], 5
jmp	loc_82F2BE

loc_831581:		; jumptable 0082F2FA case 11
mov	ecx, [esp+200h+var_1DC]
mov	eax, edi
shr	eax, 17h
add	eax, eax
add	eax, eax
add	eax, eax
shr	edi, 0Eh
mov	[esp+200h+var_1D0], eax
add	eax, ecx
and	edi, 1FFh
cmp	edi, 100h
mov	dword ptr [esp+200h+var_1C8], eax
jl	short loc_8315BE
mov	ecx, [esp+200h+var_1D4]
and	edi, 0FFh
lea	edx, [ecx+edi*8]
mov	[esp+200h+var_1E0], edx
jmp	short loc_8315C5

loc_8315BE:
lea	eax, [ecx+edi*8]
mov	[esp+200h+var_1E0], eax

loc_8315C5:
mov	edi, dword ptr [esp+200h+var_1C8]
mov	ecx, [edi]
mov	eax, [esp+200h+var_1E0]
mov	[ebx+8], ecx
mov	edx, [edi+4]
mov	[ebx+0Ch], edx
mov	[esp+200h+var_190], 0
mov	eax, [eax+4]
push	eax
push	edi
lea	ecx, [esp+208h+var_190]
push	ecx
push	esi
call	sub_823350
add	esp, 10h
test	eax, eax
jz	short loc_83161A
mov	ecx, [esi+20h]
mov	edx, [esp+200h+var_190]
mov	eax, [esp+200h+var_1C0]
mov	[esp+200h+var_1DC], ecx
mov	[eax+ecx], edx
mov	ecx, [esp+200h+var_18C]
mov	edx, [esp+200h+var_1DC]
mov	[eax+edx+4], ecx
jmp	loc_82F2BE

loc_83161A:
mov	eax, [esi+1Ch]
add	eax, 18h
cmp	eax, [esi+24h]
jbe	short loc_83163E
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	eax, [esi+20h]
mov	ecx, [esp+200h+var_1D0]
mov	[esp+200h+var_1DC], eax
lea	edi, [ecx+eax]

loc_83163E:
mov	ecx, [edi]
mov	eax, [esi+1Ch]
mov	edx, [esp+200h+var_190]
mov	ebx, [esp+200h+var_18C]
mov	[esp+200h+var_140], ecx
mov	ecx, [edi+4]
mov	[esp+200h+var_13C], ecx
mov	ecx, [esp+200h+var_1E0]
mov	edi, [ecx]
mov	ecx, [ecx+4]
mov	[eax], edx
mov	edx, [esp+200h+var_140]
mov	[eax+8], edx
mov	edx, [esp+200h+var_13C]
mov	[eax+4], ebx
mov	[eax+0Ch], edx
mov	[eax+10h], edi
mov	[eax+14h], ecx
add	eax, 18h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1D8]
push	eax
jmp	loc_82F535

loc_831694:		; jumptable 0082F2FA case 19
mov	eax, [esp+200h+var_1DC]
shr	edi, 17h
lea	edi, [eax+edi*8]
mov	eax, [edi]
test	eax, eax
jz	short loc_8316C4
cmp	eax, 1
jnz	short loc_8316AF
cmp	dword ptr [edi+4], 0
jz	short loc_8316C4

loc_8316AF:
xor	eax, eax
mov	[ebx+4], eax
mov	ecx, [esp+200h+var_1DC]
mov	dword ptr [edx+ecx], 1
jmp	loc_82F2BE

loc_8316C4:
mov	eax, 1
mov	[ebx+4], eax
mov	ecx, [esp+200h+var_1DC]
mov	[edx+ecx], eax
jmp	loc_82F2BE

loc_8316D8:		; jumptable 0082F2FA case 20
mov	edx, [esp+200h+var_1DC]
shr	edi, 17h
add	edi, edi
add	edi, edi
add	edi, edi
mov	ecx, [edi+edx]
lea	eax, [edi+edx]
cmp	ecx, 5
jnz	short loc_831728
mov	ecx, [eax+4]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_831703
call	sub_821EE0
jmp	short loc_831708

loc_831703:
call	sub_820670

loc_831708:
mov	[esp+200h+var_1E0], eax
fild	[esp+200h+var_1E0]
test	eax, eax
jge	short loc_83171A
fadd	ds:flt_15FCC08

loc_83171A:
fstp	dword ptr [ebx+4]
mov	dword ptr [ebx], 3
jmp	loc_82F2BE

loc_831728:
cmp	ecx, 4
jnz	short loc_831740
mov	eax, [eax+4]
fild	dword ptr [eax]
mov	dword ptr [ebx], 3
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_831740:
mov	ecx, [esi+1Ch]
add	ecx, 18h
cmp	ecx, [esi+24h]
jbe	short loc_83175F
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	eax, [esi+20h]
mov	[esp+200h+var_1DC], eax
add	eax, edi

loc_83175F:		; "#"
push	offset asc_1468BEC
push	0Ah
push	eax
push	esi
call	sub_823050
mov	edx, [esi+20h]
mov	ecx, [esi+1Ch]
mov	[esp+210h+var_1DC], edx
mov	ebx, [eax]
mov	eax, [eax+4]
mov	[esp+210h+var_34], eax
mov	eax, [edi+edx]
mov	edx, [edi+edx+4]
mov	edi, [esp+210h+var_34]
mov	[ecx], ebx
mov	[ecx+4], edi
mov	[ecx+8], eax
mov	[ecx+0Ch], edx
add	ecx, 10h
mov	[esi+1Ch], ecx
mov	ecx, [esp+210h+var_1D8]
push	ecx
push	1
push	1
push	esi
call	sub_81C370
add	esp, 20h
jmp	loc_82F79F

loc_8317B9:		; jumptable 0082F2FA case 29
mov	eax, [ebx]
shr	edi, 17h
test	edi, edi
lea	edi, [ebx+edi*8]
jnz	short loc_8317C8
mov	edi, [esi+1Ch]

loc_8317C8:
sub	eax, 9
jz	loc_83197B
sub	eax, 1
jz	short loc_83181C
push	edi
push	ebx
push	esi
call	sub_822E70
mov	ecx, [esp+20Ch+var_1C0]
mov	edi, eax
mov	eax, [esi+20h]
lea	ebx, [ecx+eax]
mov	[esp+20Ch+var_1DC], eax
mov	eax, [ebx]
add	esp, 0Ch
cmp	eax, 9
jz	loc_83197B
cmp	eax, 0Ah
jz	short loc_83181C
push	eax
push	esi
call	sub_81BA90
push	eax
push	offset aFunctionExpe_0 ; "function expected instead of %s"
push	esi
call	sub_81A760
add	esp, 14h
jmp	loc_82F2BE

loc_83181C:
mov	eax, [esi+0Ch]
mov	edx, [ebx+4]
add	eax, 10h
mov	[esp+200h+var_1D0], edx
mov	[esp+200h+var_1E0], edi
cmp	eax, [esi+8]
jnz	short loc_831859
mov	eax, [esi+28h]
sub	ebx, eax
sub	edi, eax
push	esi
lea	ecx, [esi+4]
sar	ebx, 3
sar	edi, 3
call	sub_8237A0
mov	ecx, [esi+28h]
mov	eax, [esi+0Ch]
lea	ebx, [ecx+ebx*8]
add	eax, 10h
lea	ecx, [ecx+edi*8]
jmp	short loc_83185D

loc_831859:
mov	ecx, [esp+200h+var_1E0]

loc_83185D:
mov	[esi+0Ch], eax
mov	edx, [esi+20h]
mov	[eax], edx
mov	edx, [esp+200h+var_1D8]
mov	dword ptr [eax+8], 0
mov	[eax+4], edx
or	edi, 0FFFFFFFFh
mov	[eax+0Ch], edi
mov	eax, [esp+200h+var_1D0]
add	ebx, 8
mov	[esi+20h], ebx
mov	[esi+1Ch], ecx
mov	ebx, [eax+8]
inc	dword ptr [esi+44h]
cmp	dword ptr [esi+44h], 82h
jle	short loc_8318A8
push	82h
push	offset aCStackOverflow ; "C stack overflow: too	many (%d) nested "...
push	esi
call	sub_81A760
add	esp, 0Ch

loc_8318A8:
push	14h
push	esi
call	sub_81B6A0
push	esi
call	ebx
add	[esi+44h], edi
add	esp, 0Ch
test	eax, eax
jl	loc_8322B8
mov	ecx, [esi+1Ch]
lea	edx, ds:0[eax*8]
mov	edi, edx
mov	edx, ecx
sub	edx, edi
mov	edi, [esi+0Ch]
sub	ecx, edx
mov	dword ptr [esp+200h+var_1C8], edi
mov	edi, [edi+0Ch]
sar	ecx, 3
mov	[esp+200h+var_1D0], edi
cmp	ecx, eax
jnb	short loc_8318EA
mov	eax, ecx

loc_8318EA:
cmp	eax, edi
jnb	short loc_8318F6
mov	edi, eax
mov	[esp+200h+var_1E0], eax
jmp	short loc_8318FA

loc_8318F6:
mov	[esp+200h+var_1E0], edi

loc_8318FA:
mov	ebx, [esi+20h]
sub	ebx, 8
test	edi, edi
jbe	short loc_831928
mov	ecx, edx
mov	eax, ebx
sub	ecx, ebx
mov	edx, edi
lea	esp, [esp+0]

loc_831910:
mov	edi, [ecx+eax]
mov	[eax], edi
mov	edi, [ecx+eax+4]
mov	[eax+4], edi
add	eax, 8
sub	edx, 1
jnz	short loc_831910
mov	edi, [esp+200h+var_1E0]

loc_831928:
cmp	[esp+200h+var_1D0], 0FFFFFFFFh
mov	eax, dword ptr [esp+200h+var_1C8]
mov	edx, [eax]
jz	short loc_83195F
mov	ecx, [edx-4]
movzx	eax, byte ptr [ecx+0Dh]
lea	ecx, [edx+eax*8]
lea	eax, [ebx+edi*8]
cmp	eax, ecx
jnb	short loc_831962
jmp	short loc_831950
align 10h

loc_831950:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_831950
jmp	short loc_831962

loc_83195F:
lea	ecx, [ebx+edi*8]

loc_831962:
mov	[esi+1Ch], ecx
mov	ecx, dword ptr [esp+200h+var_1C8]
add	ecx, 0FFFFFFF0h
mov	[esi+20h], edx
mov	[esi+0Ch], ecx
mov	[esp+200h+var_1DC], edx
jmp	loc_82F2BE

loc_83197B:
mov	edx, [esp+200h+var_1B4]
cmp	byte ptr [edx+0Ch], 0
jz	short loc_831993
mov	eax, [esp+200h+var_1DC]
push	eax
push	esi
call	sub_832370
add	esp, 8

loc_831993:
mov	ecx, [ebx+4]
mov	eax, [esi+0Ch]
inc	dword ptr [eax+8]
mov	eax, [esi+20h]
mov	[esp+200h+var_1B4], ecx
mov	ecx, [ebx+4]
sub	eax, 8
mov	[esp+200h+var_1E0], ecx
cmp	ebx, edi
jz	short loc_8319C5

loc_8319B1:
mov	edx, [ebx]
mov	[eax], edx
mov	edx, [ebx+4]
mov	[eax+4], edx
add	ebx, 8
add	eax, 8
cmp	ebx, edi
jnz	short loc_8319B1

loc_8319C5:
test	byte ptr [ecx+0Eh], 2
mov	edi, [esi+20h]
jz	short loc_8319E4
push	eax
mov	eax, [esp+204h+var_1E0]
push	edi
push	eax
push	esi
lea	ecx, [esi+4]
call	sub_823980
mov	ecx, [esp+200h+var_1E0]
jmp	short loc_8319F1

loc_8319E4:
movzx	edx, byte ptr [ecx+0Fh]
lea	edx, [edi+edx*8]
cmp	eax, edx
jb	short loc_8319F1
mov	eax, edx

loc_8319F1:
movzx	ecx, byte ptr [ecx+0Dh]
lea	ecx, [edi+ecx*8]
cmp	ecx, [esi+24h]
jbe	short loc_831A27
mov	edx, [esi+28h]
mov	ebx, ecx
sub	ecx, [esi+1Ch]
mov	edi, eax
sar	ecx, 3
push	ecx
sub	edi, edx
sub	ebx, edx
push	esi
lea	ecx, [esi+4]
sar	edi, 3
sar	ebx, 3
call	sub_823530
mov	ecx, [esi+28h]
lea	eax, [ecx+edi*8]
lea	ecx, [ecx+ebx*8]

loc_831A27:
cmp	eax, ecx
jnb	short loc_831A3D
jmp	short loc_831A30
align 10h

loc_831A30:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_831A30

loc_831A3D:
mov	ecx, [esi+20h]
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1B4]
mov	edx, [eax+14h]
mov	eax, [eax+10h]
mov	[esp+200h+var_1D8], edx
mov	[esp+200h+var_1D4], eax
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_831A5E:		; jumptable 0082F2FA case 34
mov	ecx, [ebx+4]
mov	eax, edi
shr	edi, 0Eh
shr	eax, 17h
and	edi, 1FFh
mov	[esp+200h+var_1D0], ecx
jnz	short loc_831A82
mov	edx, [esp+200h+var_1D8]
mov	edi, [edx]
add	edx, 4
mov	[esp+200h+var_1D8], edx

loc_831A82:
imul	edi, 32h
sub	edi, 32h
mov	dword ptr [esp+200h+var_1C8], edi
test	eax, eax
jnz	short loc_831ADB
mov	edx, [esp+200h+var_1B4]
mov	edi, [esi+1Ch]
movzx	eax, byte ptr [edx+0Dh]
sub	edi, ebx
sub	edi, 8
push	eax
sar	edi, 3
push	esi
mov	[esp+208h+var_1E0], edi
call	sub_5F2280
mov	ecx, dword ptr [esp+208h+var_1C8]
mov	edx, [esp+208h+var_1D0]
add	ecx, edi
push	ecx		; void *
push	edx		; int
push	esi		; int
call	sub_82F1F0
mov	eax, [esi+20h]
mov	ecx, [esp+214h+var_1C0]
lea	ebx, [ecx+eax]
mov	ecx, [esp+214h+var_1D0]
mov	[esp+214h+var_1DC], eax
mov	eax, edi
mov	edi, dword ptr [esp+214h+var_1C8]
add	esp, 14h

loc_831ADB:
add	ebx, 8
push	ebx
add	eax, edi
test	dword ptr [ecx+8], 0F0000000h
push	eax
lea	edx, [edi+1]
push	edx
push	esi
jz	short loc_831AFA
call	sub_821780
jmp	loc_82F2BE

loc_831AFA:
call	sub_820610
jmp	loc_82F2BE

loc_831B04:		; jumptable 0082F2FA case 3
mov	edx, [esp+200h+var_1DC]
shr	edi, 17h
lea	edi, [edx+edi*8]
cmp	ebx, edi
ja	loc_82F2BE
jmp	short loc_831B20
align 10h

loc_831B20:
mov	dword ptr [ebx], 0
add	ebx, 8
cmp	ebx, edi
jbe	short loc_831B20
jmp	loc_82F2BE

loc_831B32:		; jumptable 0082F2FA case 7
mov	eax, [esp+200h+var_1D4]
shr	edi, 0Eh
lea	ecx, [eax+edi*8]
mov	[esp+200h+var_1E0], ebx
mov	ebx, [esp+200h+var_1B4]
mov	[esp+200h+var_1D0], ecx

loc_831B48:
mov	eax, [ebx]
cmp	eax, 5
jnz	short loc_831BB7
mov	edi, [ebx+4]
cmp	dword ptr [edi], 0
jz	loc_831C5A
test	dword ptr [edi+8], 0F0000000h
jz	short loc_831B74
lea	edx, [esp+200h+var_1A8]
push	edx
push	ecx
push	esi
mov	ecx, edi
call	sub_822100
jmp	short loc_831B82

loc_831B74:
lea	eax, [esp+200h+var_1A8]
push	eax
push	ecx
push	esi
mov	ecx, edi
call	sub_820740

loc_831B82:
cmp	[esp+200h+var_1A8], 0
jnz	loc_831C72
mov	ebx, [edi]
add	ebx, 10h
cmp	dword ptr [ebx], 0
jnz	loc_831C4C
mov	edx, [esp+200h+var_1E0]
mov	eax, [esp+200h+var_1D0]
push	edx
push	eax
push	edi
push	esi
call	sub_818E40
mov	eax, [esi+20h]
add	esp, 10h
jmp	loc_82F2BA

loc_831BB7:
mov	ecx, eax
sub	ecx, 5
jz	short loc_831C1F
sub	ecx, 2
jz	short loc_831C17
mov	ecx, [esi]
mov	eax, [ecx+eax*8+368h]
mov	ecx, [esi+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+200h+var_158]
push	edx
push	eax
jz	short loc_831BE8
call	sub_821EF0
jmp	short loc_831BED

loc_831BE8:
call	sub_8208C0

loc_831BED:
test	eax, eax
jz	short loc_831C13
cmp	[esp+200h+var_158], 5
jnz	short loc_831C13
mov	ecx, [esp+200h+var_154]
mov	eax, [ecx+4]
test	eax, eax
jnz	short loc_831C0F
push	esi
call	sub_81FED0

loc_831C0F:
mov	ebx, eax
jmp	short loc_831C24

loc_831C13:
xor	ebx, ebx
jmp	short loc_831C28

loc_831C17:
mov	eax, [ebx+4]
mov	ebx, [eax+4]
jmp	short loc_831C24

loc_831C1F:
mov	ecx, [ebx+4]
mov	ebx, [ecx]

loc_831C24:
test	ebx, ebx
jnz	short loc_831C36

loc_831C28:		; "attempt to index a nil value"
push	offset aAttemptToIndex
push	esi
call	sub_81A760
add	esp, 8

loc_831C36:
add	ebx, 10h
cmp	dword ptr [ebx], 0
jnz	short loc_831C4C
push	offset aErrorInSettabl ; "error	in settable_event"
push	esi
call	sub_81A760
add	esp, 8

loc_831C4C:
cmp	dword ptr [ebx], 5
jnz	short loc_831C8E
mov	ecx, [esp+200h+var_1D0]
jmp	loc_831B48

loc_831C5A:
mov	edx, [esp+200h+var_1E0]
push	edx
push	ecx
push	edi
push	esi
call	sub_818E40
mov	eax, [esi+20h]
add	esp, 10h
jmp	loc_82F2BA

loc_831C72:
mov	eax, [esp+200h+var_1E0]
mov	ecx, [esp+200h+var_1D0]
push	eax
push	ecx
push	edi
push	esi
call	sub_818E40
mov	eax, [esi+20h]
add	esp, 10h
jmp	loc_82F2BA

loc_831C8E:
mov	ecx, [ebx]
mov	[esp+200h+var_1A8], ecx
mov	ecx, [esi+1Ch]
mov	edx, [ebx+4]
add	ecx, 20h
mov	[esp+200h+var_1A4], edx
cmp	ecx, [esi+24h]
jbe	short loc_831CC2
push	4
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	eax, [esi+20h]
mov	edx, [esp+200h+var_1C0]
add	edx, eax
mov	[esp+200h+var_1DC], eax
mov	[esp+200h+var_1E0], edx

loc_831CC2:
mov	ecx, [esp+200h+var_1B4]
mov	edi, [ecx]
mov	ecx, [ecx+4]
mov	eax, [esi+1Ch]
mov	edx, [esp+200h+var_1A8]
mov	ebx, [esp+200h+var_1A4]
mov	[esp+200h+var_148], edi
mov	edi, [esp+200h+var_1D0]
mov	[esp+200h+var_144], ecx
mov	ecx, [edi]
mov	[esp+200h+var_138], ecx
mov	ecx, [edi+4]
mov	edi, [esp+200h+var_1E0]
mov	[esp+200h+var_134], ecx
mov	ecx, [edi]
mov	edi, [edi+4]
mov	[eax], edx
mov	edx, [esp+200h+var_148]
mov	[eax+8], edx
mov	edx, [esp+200h+var_144]
mov	[eax+0Ch], edx
mov	edx, [esp+200h+var_138]
mov	[eax+10h], edx
mov	edx, [esp+200h+var_134]
mov	[eax+4], ebx
mov	[eax+14h], edx
mov	[eax+18h], ecx
mov	[eax+1Ch], edi
add	eax, 20h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1D8]
push	eax
push	0
push	3
push	esi
call	sub_81C370
mov	ecx, [esi+20h]
add	esp, 10h
mov	[esp+200h+var_1DC], ecx
jmp	loc_82F2BE

loc_831D5B:		; jumptable 0082F2FA case 27
mov	eax, [esp+200h+var_1DC]
mov	edx, edi
shr	edx, 17h
mov	ecx, [eax+edx*8]
lea	eax, [eax+edx*8]
shr	edi, 0Eh
and	edi, 1FFh
test	ecx, ecx
jz	short loc_831D89
cmp	ecx, 1
jnz	short loc_831D82
cmp	dword ptr [eax+4], 0
jz	short loc_831D89

loc_831D82:
mov	ecx, 1
jmp	short loc_831D8B

loc_831D89:
xor	ecx, ecx

loc_831D8B:
cmp	ecx, edi
jnz	loc_830D2B
mov	ecx, [eax]
mov	[ebx], ecx
mov	edx, [eax+4]
mov	[ebx+4], edx
jmp	loc_830D12

loc_831DA2:		; jumptable 0082F2FA case 21
mov	eax, [esi+1Ch]
add	eax, 18h
cmp	eax, [esi+24h]
jbe	short loc_831DBF
push	3
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	ecx, [esi+20h]
mov	[esp+200h+var_1DC], ecx

loc_831DBF:
mov	eax, edi
shr	edi, 0Eh
shr	eax, 17h
and	edi, 1FFh
cmp	eax, edi
mov	[esp+200h+var_1D0], eax
mov	[esp+200h+var_1E0], edi
jge	loc_831EC7
mov	eax, edi

loc_831DDF:
mov	edx, [esp+200h+var_1DC]
lea	edi, [edx+eax*8]
mov	eax, [edi-8]
lea	ebx, [edi-8]
cmp	eax, 4
jz	short loc_831DF6
cmp	eax, 3
jnz	short loc_831E02

loc_831DF6:
mov	eax, [edi]
cmp	eax, 4
jz	short loc_831E6A
cmp	eax, 3
jz	short loc_831E6A

loc_831E02:		; ".."
push	offset a___7
push	9
push	edi
push	ebx
push	esi
call	sub_823460
mov	edx, [eax]
mov	eax, [eax+4]
mov	ecx, [esi+1Ch]
mov	[esp+214h+var_24], eax
mov	eax, [ebx]
mov	ebx, [ebx+4]
mov	[esp+214h+var_14], ebx
mov	ebx, [edi]
mov	edi, [edi+4]
mov	[ecx], edx
mov	edx, [esp+214h+var_24]
mov	[ecx+8], eax
mov	eax, [esp+214h+var_14]
mov	[ecx+4], edx
mov	[ecx+0Ch], eax
mov	[ecx+10h], ebx
mov	[ecx+14h], edi
add	ecx, 18h
mov	[esi+1Ch], ecx
mov	ecx, [esp+214h+var_1D8]
push	ecx
push	1
push	2
push	esi
call	sub_81C370
add	esp, 24h
jmp	short loc_831E93

loc_831E6A:
mov	ecx, [ebx]
mov	edx, [edi]
mov	eax, [esi+1Ch]
mov	ebx, [ebx+4]
mov	edi, [edi+4]
mov	[eax], ecx
mov	[eax+4], ebx
mov	[eax+8], edx
mov	[eax+0Ch], edi
add	eax, 10h
push	2
push	esi
mov	[esi+1Ch], eax
call	sub_81BB60
add	esp, 8

loc_831E93:
mov	eax, [esi+1Ch]
mov	ecx, [esi+20h]
add	eax, 0FFFFFFF8h
mov	[esp+200h+var_1DC], ecx
mov	edx, [eax]
mov	edi, [eax+4]
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1E0]
mov	[ecx+eax*8-8], edx
mov	edx, [esp+200h+var_1DC]
mov	[edx+eax*8-4], edi
dec	eax
cmp	eax, [esp+200h+var_1D0]
mov	[esp+200h+var_1E0], eax
jg	loc_831DDF

loc_831EC7:
mov	edx, [esp+200h+var_1DC]
mov	ecx, [esp+200h+var_1D0]
mov	edi, [edx+ecx*8]
mov	eax, [esp+200h+var_1C0]
mov	[eax+edx], edi
mov	ecx, [edx+ecx*8+4]
mov	edx, [esp+200h+var_1DC]
mov	[eax+edx+4], ecx
jmp	loc_82F2BE

loc_831EEA:		; jumptable 0082F2FA case 18
mov	eax, [esp+200h+var_1DC]
shr	edi, 17h
add	edi, edi
add	edi, edi
add	edi, edi
mov	ecx, [eax+edi]
add	eax, edi
mov	[esp+200h+var_1E0], eax
cmp	ecx, 3
jnz	short loc_831F14
fld	dword ptr [eax+4]
mov	[ebx], ecx
fchs
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_831F14:
cmp	ecx, 4
jnz	short loc_831F61
mov	eax, [eax+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B60
add	esp, 8
test	eax, eax
jz	short loc_831F5D
mov	ecx, [esp+200h+var_1E0]
mov	eax, [ecx+4]
mov	ecx, [eax]
push	ecx		; int
add	eax, 8
push	eax		; char *
call	sub_822B80
fstp	[esp+208h+var_1E0]
fld	[esp+208h+var_1E0]
add	esp, 8
fchs
mov	dword ptr [ebx], 3
fstp	dword ptr [ebx+4]
jmp	loc_82F2BE

loc_831F5D:
mov	eax, [esp+200h+var_1E0]

loc_831F61:		; "-"
push	offset asc_1468C10
push	0Bh
push	eax
push	esi
call	sub_823050
mov	edx, [esi+1Ch]
add	edx, 10h
add	esp, 10h
mov	ebx, eax
cmp	edx, [esi+24h]
jbe	short loc_831F8A
push	2
push	esi
lea	ecx, [esi+4]
call	sub_823530

loc_831F8A:
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
mov	[esp+200h+var_1DC], ecx
mov	edx, [ebx]
mov	ebx, [ebx+4]
mov	[esp+200h+var_4], ebx
mov	ebx, [edi+ecx]
mov	ecx, [edi+ecx+4]
mov	[eax], edx
mov	edx, [esp+200h+var_4]
mov	[eax+4], edx
mov	[eax+8], ebx
mov	[eax+0Ch], ecx
add	eax, 10h
mov	[esi+1Ch], eax
mov	eax, [esp+200h+var_1D8]
push	eax
push	1
push	1
jmp	loc_82F539

loc_831FCD:		; jumptable 0082F2FA case 35
push	ebx
push	esi
call	sub_832370
add	esp, 8
jmp	loc_82F2BE

loc_831FDC:		; jumptable 0082F2FA case 36
mov	eax, [esp+200h+var_1B4]
mov	edx, [eax+4]
mov	eax, [eax+8]
mov	ecx, [eax+18h]
shr	edi, 0Eh
mov	edi, [ecx+edi*4]
movzx	eax, byte ptr [edi]
mov	[esp+200h+var_1E0], edx
lea	edx, ds:18h[eax*4]
push	edx
push	esi
mov	[esp+208h+var_1D0], eax
call	sub_82C5B0
mov	ebx, eax
mov	eax, [esp+208h+var_1E0]
mov	[ebx+8], edi
mov	byte ptr [ebx+0Ch], 0
mov	[ebx+4], eax
mov	dword ptr [ebx], 5
mov	cl, [edi+3]
mov	[ebx+0Dh], cl
mov	dl, [edi+2]
mov	[ebx+0Eh], dl
mov	al, [edi+1]
mov	[ebx+0Fh], al
mov	ecx, [edi+10h]
mov	[ebx+10h], ecx
mov	ecx, [esp+208h+var_1D0]
mov	edx, [edi+8]
add	esp, 8
mov	[ebx+14h], edx
test	ecx, ecx
jbe	short loc_83204E
lea	edi, [ebx+18h]
xor	eax, eax
rep stosd

loc_83204E:
mov	eax, [esi+20h]
mov	ecx, [esp+200h+var_1C0]
mov	[esp+200h+var_1DC], eax
add	eax, ecx
mov	[eax+4], ebx
mov	dword ptr [eax], 9
mov	edx, [ebx+8]
xor	eax, eax
cmp	[edx], al
jbe	short loc_832084
lea	ecx, [ebx+18h]

loc_832070:
mov	dword ptr [ecx], 0
mov	edx, [ebx+8]
movzx	edx, byte ptr [edx]
inc	eax
add	ecx, 4
cmp	eax, edx
jb	short loc_832070

loc_832084:
mov	eax, [ebx+8]
cmp	byte ptr [eax],	0
mov	[esp+200h+var_1E0], 0
jbe	loc_82F2BE
lea	ecx, [ebx+18h]
mov	[esp+200h+var_1D0], ecx

loc_83209F:
mov	ecx, [esp+200h+var_1D8]
mov	eax, [ecx]
add	ecx, 4
mov	[esp+200h+var_1D8], ecx
mov	ecx, eax
shr	ecx, 17h
mov	dword ptr [esp+200h+var_1C8], ecx
test	al, 3Fh
jnz	short loc_832120
mov	edi, [esi+2Ch]
test	edi, edi
jz	short loc_8320D3
mov	edx, [esp+200h+var_1DC]
lea	eax, [edx+ecx*8]

loc_8320C7:
cmp	[edi+8], eax
jz	short loc_832128
mov	edi, [edi+0Ch]
test	edi, edi
jnz	short loc_8320C7

loc_8320D3:
mov	eax, [esp+200h+var_1B4]
push	10h
push	esi
mov	byte ptr [eax+0Ch], 1
call	sub_82C5B0
mov	ecx, dword ptr [esp+208h+var_1C8]
mov	edi, eax
xor	eax, eax
mov	[edi], eax
mov	[edi+4], eax
mov	[edi+8], eax
mov	[edi+0Ch], eax
mov	eax, [esi+20h]
mov	[esp+208h+var_1DC], eax
lea	edx, [eax+ecx*8]
mov	[edi+8], edx
mov	eax, [esi+2Ch]
mov	[edi+0Ch], eax
mov	ecx, [esi]
add	esp, 8
cmp	dword ptr [ecx+23Ch], 1
jnz	short loc_83211B
or	dword ptr [edi-4], 1

loc_83211B:
mov	[esi+2Ch], edi
jmp	short loc_832128

loc_832120:
mov	edx, [esp+200h+var_1B4]
mov	edi, [edx+ecx*4+18h]

loc_832128:
mov	ecx, [esi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_832140
mov	eax, [edi+8]
push	eax
push	ebx
call	sub_81EB00

loc_832140:
mov	ecx, [esp+200h+var_1D0]
mov	eax, [esp+200h+var_1E0]
mov	[ecx], edi
add	ecx, 4
mov	[esp+200h+var_1D0], ecx
mov	ecx, [ebx+8]
movzx	edx, byte ptr [ecx]
inc	eax
mov	[esp+200h+var_1E0], eax
cmp	eax, edx
jb	loc_83209F
jmp	loc_82F2BE

loc_832169:		; jumptable 0082F2FA case 37
mov	eax, [esp+200h+var_1B4]
shr	edi, 17h
test	byte ptr [eax+0Eh], 1
mov	[esp+200h+var_1E0], edi
jz	short loc_832188
movzx	eax, byte ptr [eax+0Fh]
mov	ecx, [esp+200h+var_1DC]
mov	eax, [ecx+eax*8+4]
jmp	short loc_83218E

loc_832188:
mov	edx, [eax+18h]
mov	eax, [edx+4]

loc_83218E:
test	dword ptr [eax+8], 0F0000000h
mov	[esp+200h+var_1D0], eax
mov	eax, [eax+18h]
test	edi, edi
jnz	short loc_8321A5
or	ecx, 0FFFFFFFFh
jmp	short loc_8321A8

loc_8321A5:
lea	ecx, [edi-1]

loc_8321A8:
mov	edi, eax
cmp	eax, ecx
jb	short loc_8321B0
mov	edi, ecx

loc_8321B0:
mov	ecx, [esi+1Ch]
lea	edx, ds:0[edi*8]
mov	eax, ecx
sub	eax, edx
sub	eax, ebx
sar	eax, 3
mov	dword ptr [esp+200h+var_1C8], edx
test	eax, eax
jle	short loc_8321EB
lea	ecx, [ecx+eax*8]
cmp	ecx, [esi+24h]
jbe	short loc_8321EB
push	eax
push	esi
lea	ecx, [esi+4]
call	sub_823530
mov	eax, [esi+20h]
mov	edx, [esp+200h+var_1C0]
mov	[esp+200h+var_1DC], eax
lea	ebx, [edx+eax]

loc_8321EB:
mov	eax, [esp+200h+var_1D0]
push	edi
push	1
push	ebx
push	eax
call	sub_82F220
add	esp, 10h
cmp	edi, [esp+200h+var_1E0]
mov	eax, edi
jge	short loc_83221C
mov	ecx, [esp+200h+var_1E0]
jmp	short loc_832210
align 10h

loc_832210:
mov	dword ptr [ebx+eax*8], 0
inc	eax
cmp	eax, ecx
jl	short loc_832210

loc_83221C:
cmp	[esp+200h+var_1E0], 0
jnz	loc_82F2BE
mov	ecx, dword ptr [esp+200h+var_1C8]
add	ecx, ebx
mov	[esi+1Ch], ecx
jmp	loc_82F2BE

loc_832235:		; jumptable 0082F2FA case 39
mov	eax, [esp+200h+var_1DC]
mov	edx, [esi]
shr	edi, 17h
mov	ebx, [eax+edi*8]
mov	[edx+ecx*8+3D0h], ebx
mov	eax, [eax+edi*8+4]
mov	[edx+ecx*8+3D4h], eax
jmp	loc_82F2BE

loc_832258:		; jumptable 0082F2FA case 40
mov	eax, [esi]
mov	edx, [eax+ecx*8+3D0h]
mov	ebx, [esp+200h+var_1DC]
shr	edi, 17h
mov	[ebx+edi*8], edx
mov	eax, [eax+ecx*8+3D4h]
mov	ecx, [esp+200h+var_1DC]
mov	[ecx+edi*8+4], eax
jmp	loc_82F2BE

loc_83227F:		; Trap to Debugger
int	3
jmp	loc_82F2BE

loc_832285:
shr	edi, 6
and	edi, 0FFh
cmp	eax, 0FFFFFFFFh
jz	short loc_8322A6
mov	edx, [esp+200h+var_1DC]
add	edi, eax
lea	ecx, [edx+edi*8]
mov	[esi+1Ch], ecx
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn

loc_8322A6:
mov	eax, [esi+1Ch]
add	edi, edi
add	edi, edi
add	edi, edi
sub	eax, edi
sub	eax, [esp+200h+var_1DC]
sar	eax, 3

loc_8322B8:
pop	edi
pop	esi
pop	ebx
mov	esp, ebp
pop	ebp
retn
sub_82F290 endp

align 10h
off_8322C0 dd offset loc_82F56C	; jump table for switch	statement
dd offset loc_830B6B
dd offset loc_8312BA
dd offset loc_831B04
dd offset loc_830D8C
dd offset loc_830AB1
dd offset loc_82F301
dd offset loc_831B32
dd offset loc_830DA9
dd offset loc_830365
dd offset loc_8314FC
dd offset loc_831581
dd offset loc_82F584
dd offset loc_82F7C9
dd offset loc_82F9C5
dd offset loc_82FBC1
dd offset loc_82FDBD
dd offset loc_830015
dd offset loc_831EEA
dd offset loc_831694
dd offset loc_8316D8
dd offset loc_831DA2
dd offset loc_830D35
dd offset loc_830DE2
dd offset loc_830B83
dd offset loc_8312E6
dd offset loc_830D4C
dd offset loc_831D5B
dd offset loc_8306C8
dd offset loc_8317B9
dd offset loc_8309BA
dd offset loc_83022F
dd offset loc_83114F
dd offset loc_830F4D
dd offset loc_831A5E
dd offset loc_831FCD
dd offset loc_831FDC
dd offset loc_832169
dd offset loc_830276
dd offset loc_832235
dd offset loc_832258
align 10h



sub_832370 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	esi, [edi+2Ch]
mov	ebx, esi
test	esi, esi
jz	short loc_8323CC

loc_832380:
mov	eax, [esi+8]
cmp	eax, [esp+0Ch+arg_4]
jb	short loc_8323C3
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	[esi+4], edx
mov	[esi+8], esi
mov	ecx, [edi]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_8323AA
push	esi
call	sub_81DCC0

loc_8323AA:
mov	eax, [edi+2Ch]
cmp	esi, eax
jnz	short loc_8323BB
mov	eax, [eax+0Ch]
mov	[edi+2Ch], eax
mov	ebx, eax
jmp	short loc_8323C5

loc_8323BB:
mov	eax, [esi+0Ch]
mov	[ebx+0Ch], eax
jmp	short loc_8323C5

loc_8323C3:
mov	ebx, esi

loc_8323C5:
mov	esi, [esi+0Ch]
test	esi, esi
jnz	short loc_832380

loc_8323CC:
pop	edi
pop	esi
pop	ebx
retn
sub_832370 endp




sub_8323D0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	ecx, [esp+4+arg_4]
push	eax
mov	eax, [esi]
push	ecx
mov	ecx, [esi+8]
push	edx
push	eax
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_832400
mov	edx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	edx
call	sub_81A760
add	esp, 8

loc_832400:
pop	esi
retn	8
sub_8323D0 endp

align 10h



sub_832410 proc	near

var_4= dword ptr -4
arg_0= byte ptr	 4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [esp+10h+var_4]
push	ecx
push	edx
mov	[esp+18h+var_4], 0
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832446
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832446:
mov	edx, [esi+10h]
mov	ecx, [esi]
push	edx
mov	edx, [esi+8]
push	4
lea	eax, [esp+10h+arg_0]
push	eax
push	ecx
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_832470
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_832470:
pop	esi
pop	ecx
retn	4
sub_832410 endp

align 10h



sub_832480 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [eax-8]
mov	[eax], edx
mov	edx, [eax-4]
mov	[eax+4], edx
add	eax, 8
mov	[ecx+1Ch], eax
mov	eax, [esi]
mov	ecx, [eax+1Ch]
add	ecx, 0FFFFFFF8h
push	ecx
push	ecx
mov	ecx, [eax+20h]
add	ecx, 8
push	ecx
push	eax
call	sub_819750
mov	esi, [esi]
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 10h
cmp	eax, [esi+20h]
jb	short loc_8324E1
mov	ecx, [eax]
cmp	ecx, 7
jnz	short loc_8324D3
mov	eax, [eax+4]
add	eax, 10h
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	esi
retn

loc_8324D3:
cmp	ecx, 2
jnz	short loc_8324E1
mov	eax, [eax+4]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	esi
retn

loc_8324E1:
add	dword ptr [esi+1Ch], 0FFFFFFF8h
xor	eax, eax
pop	esi
retn
sub_832480 endp

align 10h



sub_8324F0 proc	near
push	esi
mov	esi, ecx
call	sub_832480
test	eax, eax
jz	short loc_83252A
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jnb	short loc_83250D
xor	eax, eax
jmp	short loc_832519

loc_83250D:
push	0
push	eax
push	ecx
call	sub_818EC0
add	esp, 0Ch

loc_832519:
push	eax
mov	eax, [esi]
push	offset aAReferenceTo_0 ; "A reference to %s already exists"
push	eax
call	sub_81A760
add	esp, 0Ch

loc_83252A:
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [eax-8]
mov	[eax], edx
mov	edx, [eax-4]
mov	[eax+4], edx
add	eax, 8
mov	[ecx+1Ch], eax
inc	dword ptr [esi+14h]
mov	ecx, [esi]
mov	edx, [esi+14h]
mov	eax, [ecx+1Ch]
mov	[eax+4], edx
mov	dword ptr [eax], 2
add	eax, 8
mov	[ecx+1Ch], eax
mov	esi, [esi]
mov	eax, [esi+1Ch]
mov	edx, [esi+20h]
lea	ecx, [eax-8]
push	ecx
add	eax, 0FFFFFFF0h
push	eax
add	edx, 8
push	edx
push	esi
call	sub_819790
add	dword ptr [esi+1Ch], 0FFFFFFF0h
add	esp, 10h
pop	esi
retn
sub_8324F0 endp

align 10h



sub_832580 proc	near
push	esi
mov	esi, ecx
call	sub_832480
test	eax, eax
jz	short loc_8325BA
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jnb	short loc_83259D
xor	eax, eax
jmp	short loc_8325A9

loc_83259D:
push	0
push	eax
push	ecx
call	sub_818EC0
add	esp, 0Ch

loc_8325A9:
push	eax
mov	eax, [esi]
push	offset aAReferenceToSA ; "A reference to %s already exists"
push	eax
call	sub_81A760
add	esp, 0Ch

loc_8325BA:
inc	dword ptr [esi+14h]
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [esi+14h]
mov	[eax+4], edx
mov	dword ptr [eax], 2
add	eax, 8
mov	[ecx+1Ch], eax
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [eax-10h]
mov	[eax], edx
mov	edx, [eax-0Ch]
mov	[eax+4], edx
add	eax, 8
mov	[ecx+1Ch], eax
mov	esi, [esi]
mov	eax, [esi+1Ch]
mov	edx, [esi+20h]
lea	ecx, [eax-8]
push	ecx
add	eax, 0FFFFFFF0h
push	eax
add	edx, 8
push	edx
push	esi
call	sub_819790
add	dword ptr [esi+1Ch], 0FFFFFFF0h
add	esp, 10h
pop	esi
retn
sub_832580 endp

align 10h



sub_832610 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [esp+10h+var_4]
push	ecx
push	edx
mov	[esp+18h+var_4], 0
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832646
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832646:
pop	esi
pop	ecx
retn
sub_832610 endp

align 10h



sub_832650 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	edx, [esi]
mov	eax, [edx+1Ch]
sub	eax, 8
cmp	eax, [edx+20h]
jb	short loc_832679
mov	ecx, [eax]
test	ecx, ecx
jz	short loc_832679
cmp	ecx, 1
jnz	short loc_832672
cmp	dword ptr [eax+4], 0
jz	short loc_832679

loc_832672:
mov	eax, 1
jmp	short loc_83267B

loc_832679:
xor	eax, eax

loc_83267B:
mov	[esp+8+var_4], eax
mov	eax, [esi+10h]
push	eax
push	4
lea	ecx, [esp+10h+var_4]
push	ecx
push	edx
mov	edx, [esi+8]
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_8326A7
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_8326A7:
pop	esi
pop	ecx
retn
sub_832650 endp

align 10h



sub_8326B0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jb	short loc_8326DA
mov	edx, [eax]
cmp	edx, 7
jnz	short loc_8326D0
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_8326DC

loc_8326D0:
cmp	edx, 2
jnz	short loc_8326DA
mov	eax, [eax+4]
jmp	short loc_8326DC

loc_8326DA:
xor	eax, eax

loc_8326DC:
mov	[esp+8+var_4], eax
mov	eax, [esi+10h]
push	eax
mov	eax, [esi+8]
push	4
lea	edx, [esp+10h+var_4]
push	edx
push	ecx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832708
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832708:
pop	esi
pop	ecx
retn
sub_8326B0 endp

align 10h



sub_832710 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jnb	short loc_832725
fldz
jmp	short loc_83272F

loc_832725:
push	eax
push	ecx
call	sub_818F90
add	esp, 8

loc_83272F:
mov	eax, [esi+10h]
fstp	[esp+8+var_4]
mov	edx, [esi]
fld	[esp+8+var_4]
push	eax
fstp	[esp+0Ch+var_4]
mov	eax, [esi+8]
push	4
lea	ecx, [esp+10h+var_4]
push	ecx
push	edx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832765
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832765:
pop	esi
pop	ecx
retn
sub_832710 endp

align 10h



sub_832770 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
push	edi
cmp	eax, [ecx+20h]
jnb	short loc_832787
xor	eax, eax
jmp	short loc_832791

loc_832787:
push	eax
push	ecx
call	sub_819890
add	esp, 8

loc_832791:
mov	ecx, [esi]
mov	[esp+10h+var_4], eax
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jnb	short loc_8327A6
xor	edi, edi
jmp	short loc_8327C3

loc_8327A6:
mov	edx, [eax]
cmp	edx, 7
jnz	short loc_8327B5
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_8327C1

loc_8327B5:
cmp	edx, 2
jnz	short loc_8327BF
mov	eax, [eax+4]
jmp	short loc_8327C1

loc_8327BF:
xor	eax, eax

loc_8327C1:
mov	edi, eax

loc_8327C3:
mov	eax, [esi+10h]
push	eax
mov	eax, [esi+8]
push	4
lea	edx, [esp+18h+var_4]
push	edx
push	ecx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_8327EB
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_8327EB:
mov	edx, [esi+10h]
mov	eax, [esp+10h+var_4]
mov	ecx, [esi]
push	edx
mov	edx, [esi+8]
push	eax
push	edi
push	ecx
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_832814
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_832814:
mov	edi, [esi]
mov	ebx, [edi+1Ch]
lea	eax, [ebx-8]
cmp	eax, [edi+20h]
jb	short loc_832848
push	ebx
push	eax
push	edi
call	sub_819230
add	esp, 0Ch
test	eax, eax
jz	short loc_832848
add	ebx, 8
mov	ecx, esi
mov	[edi+1Ch], ebx
call	sub_8330F0
mov	esi, [esi]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
pop	ebx
pop	ecx
retn

loc_832848:
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx
mov	ecx, esi
call	sub_8330F0
mov	esi, [esi]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_832770 endp

align 10h



sub_832870 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
push	edi
cmp	eax, [ecx+20h]
jnb	short loc_832886
xor	edi, edi
jmp	short loc_832897

loc_832886:
lea	edx, [esp+0Ch+var_4]
push	edx
push	eax
push	ecx
call	sub_818EC0
add	esp, 0Ch
mov	edi, eax

loc_832897:
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [esp+14h+var_4]
push	ecx
push	edx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_8328C1
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_8328C1:
mov	edx, [esi+10h]
mov	eax, [esp+0Ch+var_4]
mov	ecx, [esi]
push	edx
mov	edx, [esi+8]
push	eax
push	edi
push	ecx
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_8328EA
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_8328EA:
pop	edi
pop	esi
pop	ecx
retn
sub_832870 endp

align 10h



sub_8328F0 proc	near
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi]
mov	ebx, [edi+1Ch]
lea	eax, [ebx-8]
cmp	eax, [edi+20h]
jb	short loc_83291A
push	ebx
push	eax
push	edi
call	sub_819230
add	esp, 0Ch
test	eax, eax
jz	short loc_83291A
add	ebx, 8
mov	[edi+1Ch], ebx
jmp	short loc_83292B

loc_83291A:
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx

loc_83292B:
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx
lea	esp, [esp+0]

loc_832950:
mov	edi, [esi]
mov	ebx, [edi+1Ch]
push	ebx
lea	ebp, [ebx-8]
push	ebp
lea	eax, [ebx-10h]
push	eax
push	edi
call	sub_819850
add	ebx, 8
add	esp, 10h
mov	[edi+1Ch], ebx
cmp	dword ptr [ebp+0], 0
jz	short loc_8329A8
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [eax-10h]
mov	[eax], edx
mov	edx, [eax-0Ch]
mov	[eax+4], edx
add	eax, 8
mov	[ecx+1Ch], eax
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
mov	edi, 0FFFFFFF8h
add	[eax+1Ch], edi
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
add	[eax+1Ch], edi
jmp	short loc_832950

loc_8329A8:
add	dword ptr [edi+1Ch], 0FFFFFFF0h
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx
mov	ecx, esi
call	sub_8330F0
mov	esi, [esi]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_8328F0 endp

align 10h



sub_8329D0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jb	short loc_8329F4
cmp	dword ptr [eax], 0Ah
jnz	short loc_8329F4
push	offset aCannotSaveAC_0 ; "Cannot save a	C function"
push	ecx
call	sub_81A760
add	esp, 8

loc_8329F4:
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	edx, ecx
mov	edx, [edx-4]
mov	edx, [edx+8]
mov	[ecx+4], edx
mov	dword ptr [ecx], 2
add	ecx, 8
mov	[eax+1Ch], ecx
mov	ecx, esi
call	sub_832480
test	eax, eax
jz	short loc_832A2C
mov	ecx, [esi]
add	dword ptr [ecx+1Ch], 0FFFFFFF8h
push	eax
mov	ecx, esi
call	sub_832410
pop	esi
pop	ecx
retn

loc_832A2C:
mov	ecx, esi
call	sub_8324F0
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [esp+10h+var_4]
push	ecx
push	edx
mov	[esp+18h+var_4], 1
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832A6B
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832A6B:
mov	edx, [esi+10h]
mov	eax, [esi+8]
mov	ecx, [esi]
push	edx
push	eax
push	ecx
call	sub_81B800
add	esp, 0Ch
test	eax, eax
jz	short loc_832A92
mov	edx, [esi]
push	offset aErrorSavingLua ; "Error	saving lua function"
push	edx
call	sub_81A760
add	esp, 8

loc_832A92:
pop	esi
pop	ecx
retn
sub_8329D0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_833CF0

loc_832AA0:
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi]
push	0
push	0
push	eax
call	sub_81BD50
add	esp, 0Ch
mov	ecx, esi
call	sub_832580
mov	ecx, esi
call	sub_833CF0
mov	edi, [esi]
mov	eax, [edi+1Ch]
lea	ecx, [eax-10h]
cmp	ecx, [edi+20h]
jb	short loc_832AE0
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	edi
call	sub_8192D0
add	esp, 0Ch
add	dword ptr [edi+1Ch], 0FFFFFFF8h

loc_832AE0:
mov	ecx, esi
call	sub_833CF0
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jb	short loc_832AF9
cmp	dword ptr [eax], 0
jz	short loc_832B23

loc_832AF9:
mov	ecx, esi
call	sub_833CF0
mov	edi, [esi]
mov	eax, [edi+1Ch]
mov	edx, [edi+1Ch]
lea	ecx, [eax-8]
push	ecx
add	eax, 0FFFFFFF0h
push	eax
sub	edx, 18h
push	edx
push	edi
call	sub_819790
add	esp, 10h
add	dword ptr [edi+1Ch], 0FFFFFFF0h
jmp	short loc_832AE0

loc_832B23:
add	dword ptr [ecx+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_833CF0
align 10h



sub_832B30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
push	edi
mov	edi, [esp+8+arg_0]
mov	[eax+4], edi
mov	dword ptr [eax], 2
add	eax, 8
mov	[ecx+1Ch], eax
mov	ecx, esi
call	sub_832480
mov	ecx, esi
test	eax, eax
jz	short loc_832B6A
push	eax
call	sub_832410
mov	esi, [esi]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
retn	4

loc_832B6A:
call	sub_8324F0
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [esp+10h+arg_0]
push	ecx
push	edx
mov	[esp+18h+arg_0], 5
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832BA1
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832BA1:
mov	ecx, [esi]
mov	edx, [edi+8]
mov	eax, [ecx+1Ch]
mov	edi, [edx]
mov	[eax], edi
mov	edx, [edx+4]
mov	[eax+4], edx
add	eax, 8
mov	[ecx+1Ch], eax
mov	ecx, esi
call	sub_8330F0
mov	esi, [esi]
add	dword ptr [esi+1Ch], 0FFFFFFF0h
pop	edi
pop	esi
retn	4
sub_832B30 endp

align 10h



sub_832BD0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
push	edi
xor	edi, edi
mov	esi, ecx
test	ebp, ebp
jbe	short loc_832C31
push	ebx
lea	ebx, [esi+1Ch]

loc_832BE3:
mov	eax, [esi+20h]
cmp	eax, [ebx]
jnz	short loc_832C18
mov	ecx, [esi+0Ch]
mov	edx, [esi]
mov	eax, [esi+4]
push	ebx
push	ecx
push	edx
call	eax
add	esp, 0Ch
mov	[esi+18h], eax
mov	dword ptr [esi+20h], 0
test	eax, eax
jnz	short loc_832C18
mov	ecx, [esi]
push	offset aErrorReadingFr ; "Error	reading	from buffer"
push	ecx
call	sub_81A760
add	esp, 8

loc_832C18:
mov	edx, [esi+20h]
mov	eax, [esi+18h]
mov	cl, [edx+eax]
mov	edx, [esp+10h+arg_0]
mov	[edi+edx], cl
inc	dword ptr [esi+20h]
inc	edi
cmp	edi, ebp
jb	short loc_832BE3
pop	ebx

loc_832C31:
pop	edi
pop	esi
pop	ebp
retn	8
sub_832BD0 endp

align 10h



sub_832C40 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
push	edi
cmp	eax, [ecx+20h]
jb	short loc_832C66
cmp	dword ptr [eax], 0Ah
jnz	short loc_832C66
push	offset aCannotSaveACFu ; "Cannot save a	C function"
push	ecx
call	sub_81A760
add	esp, 8

loc_832C66:
mov	ecx, esi
call	sub_8329D0
mov	ecx, esi
call	sub_8324F0
mov	edi, [esi]
mov	ebx, [edi+1Ch]
lea	eax, [ebx-8]
cmp	eax, [edi+20h]
jnb	short loc_832C89
mov	dword ptr [ebx], 0
jmp	short loc_832C94

loc_832C89:
push	ebx
push	eax
push	edi
call	sub_819140
add	esp, 0Ch

loc_832C94:
add	ebx, 8
mov	[edi+1Ch], ebx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
mov	edi, 0FFFFFFF8h
cmp	eax, [ecx+20h]
jb	short loc_832CD4
lea	edx, [ecx+30h]
push	edx
push	eax
push	ecx
call	sub_8190C0
add	esp, 0Ch
test	eax, eax
jz	short loc_832CD4
mov	eax, [esi]
add	[eax+1Ch], edi
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx

loc_832CD4:
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
add	[eax+1Ch], edi
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	edi, [ecx-4]
mov	edx, [edi+8]
movzx	ecx, byte ptr [edx]
mov	edx, [esi+10h]
push	edx
mov	edx, [esi+8]
mov	[esp+14h+var_4], ecx
push	4
lea	ecx, [esp+18h+var_4]
push	ecx
push	eax
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_832D1A
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_832D1A:
xor	ebx, ebx
cmp	[esp+10h+var_4], ebx
jle	short loc_832D39
add	edi, 18h

loc_832D25:
mov	ecx, [edi]
push	ecx
mov	ecx, esi
call	sub_832B30
inc	ebx
add	edi, 4
cmp	ebx, [esp+10h+var_4]
jl	short loc_832D25

loc_832D39:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_832C40 endp

align 10h



sub_832D40 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 24h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	ebp, 8
sub	eax, ebp
push	edi
cmp	eax, [ecx+20h]
jnb	short loc_832D5E
xor	ebx, ebx
jmp	short loc_832D6B

loc_832D5E:
cmp	[eax], ebp
jnz	short loc_832D67
mov	eax, [eax+4]
jmp	short loc_832D69

loc_832D67:
xor	eax, eax

loc_832D69:
mov	ebx, eax

loc_832D6B:
cmp	ebx, ecx
jnz	short loc_832D7D
push	offset aCannotSaveTheC ; "Cannot save the current state"
push	ecx
call	sub_81A760
add	esp, 8

loc_832D7D:
push	ebx
call	sub_81B350
push	eax
mov	eax, [esi]
push	eax
call	sub_81C070
add	esp, 0Ch
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
mov	ecx, [esi+10h]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+8]
push	4
lea	edx, [ebx+50h]
push	edx
push	eax
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_832DC5
mov	edx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	edx
call	sub_81A760
add	esp, 8

loc_832DC5:
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [ebx+44h]
push	ecx
push	edx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832DEE
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832DEE:
mov	edx, [ebx+1Ch]
sub	edx, [ebx+28h]
mov	eax, [esi+10h]
push	eax
mov	eax, [esi+8]
sar	edx, 3
push	4
lea	ecx, [esp+3Ch+var_24]
mov	[esp+3Ch+var_24], edx
mov	edx, [esi]
push	ecx
push	edx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832E25
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832E25:
xor	edi, edi
cmp	[esp+34h+var_24], edi
jbe	short loc_832E5D
lea	ecx, [ecx+0]

loc_832E30:
mov	edx, [esi]
mov	eax, [ebx+28h]
mov	ecx, [edx+1Ch]
mov	edx, [eax+edi*8]
mov	[ecx], edx
mov	eax, [eax+edi*8+4]
mov	[ecx+4], eax
mov	eax, [esi]
add	[eax+1Ch], ebp
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
inc	edi
cmp	edi, [esp+34h+var_24]
jb	short loc_832E30

loc_832E5D:
mov	ecx, [ebx+1Ch]
sub	ecx, [ebx+20h]
mov	edx, [esi+10h]
push	edx
mov	edx, [esi+8]
sar	ecx, 3
push	4
lea	eax, [esp+3Ch+var_10]
mov	[esp+3Ch+var_10], ecx
mov	ecx, [esi]
push	eax
push	ecx
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_832E94
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_832E94:
mov	ecx, [ebx+0Ch]
sub	ecx, [ebx+4]
mov	edx, [esi+10h]
push	edx
mov	edx, [esi+8]
sar	ecx, 4
inc	ecx
push	4
lea	eax, [esp+3Ch+var_C]
mov	[esp+3Ch+var_C], ecx
mov	ecx, [esi]
push	eax
push	ecx
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_832ECC
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_832ECC:
mov	edi, [ebx+4]
mov	ecx, [ebx+0Ch]
xor	ebp, ebp
sub	ecx, edi
mov	[esp+34h+var_20], ebp
test	ecx, 0FFFFFFF0h
jl	loc_832FFD
jmp	short loc_832EF0
align 10h

loc_832EF0:
cmp	dword ptr [edi+ebp+4], 0
mov	edx, [ebx+28h]
mov	[esp+34h+var_8], edx
jz	short loc_832F20
mov	eax, [esp+34h+var_20]
dec	eax
push	eax
push	ebx
lea	ecx, [ebx+4]
call	sub_823B80
mov	ecx, [eax+8]
mov	edx, [edi+ebp+4]
sub	edx, [ecx+8]
sar	edx, 2
mov	[esp+34h+var_18], edx
jmp	short loc_832F28

loc_832F20:
mov	[esp+34h+var_18], 0FFFFFFFFh

loc_832F28:
mov	eax, [edi+ebp]
sub	eax, [esp+34h+var_8]
mov	ecx, [esi+10h]
push	ecx
mov	ecx, [esi+8]
sar	eax, 3
push	4
lea	edx, [esp+3Ch+var_4]
mov	[esp+3Ch+var_4], eax
mov	eax, [esi]
push	edx
push	eax
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_832F60
mov	edx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	edx
call	sub_81A760
add	esp, 8

loc_832F60:
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [esp+3Ch+var_18]
push	ecx
push	edx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_832F8A
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_832F8A:
mov	edx, [esi+10h]
mov	ecx, [esi]
push	edx
mov	edx, [esi+8]
push	4
lea	eax, [edi+ebp+8]
push	eax
push	ecx
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_832FB4
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_832FB4:
mov	ecx, [esi+10h]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+8]
push	4
lea	edx, [edi+ebp+0Ch]
push	edx
push	eax
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_832FDE
mov	edx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	edx
call	sub_81A760
add	esp, 8

loc_832FDE:
mov	edi, [ebx+4]
mov	ecx, [ebx+0Ch]
mov	eax, [esp+34h+var_20]
sub	ecx, edi
inc	eax
sar	ecx, 4
add	ebp, 10h
cmp	eax, ecx
mov	[esp+34h+var_20], eax
jle	loc_832EF0

loc_832FFD:
mov	edx, [esi+10h]
mov	ecx, [esi]
push	edx
mov	edx, [esi+8]
push	4
lea	eax, [esp+3Ch+var_14]
push	eax
push	ecx
mov	[esp+44h+var_14], 4
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_83302F
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_83302F:
mov	[esp+34h+var_1C], 0
mov	eax, [ebx+2Ch]
test	eax, eax
jz	short loc_83304B
mov	edi, edi

loc_833040:
inc	[esp+34h+var_1C]
mov	eax, [eax+0Ch]
test	eax, eax
jnz	short loc_833040

loc_83304B:
mov	ecx, [esi+10h]
mov	eax, [esi]
push	ecx
mov	ecx, [esi+8]
push	4
lea	edx, [esp+3Ch+var_1C]
push	edx
push	eax
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_833075
mov	edx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	edx
call	sub_81A760
add	esp, 8

loc_833075:
mov	edi, [ebx+2Ch]
test	edi, edi
jz	short loc_8330B9
lea	esp, [esp+0]

loc_833080:
push	edi
mov	ecx, esi
call	sub_832B30
mov	edx, [edi+8]
mov	ecx, [esi]
sub	edx, [ebx+28h]
mov	eax, [ecx+1Ch]
sar	edx, 3
mov	[eax+4], edx
mov	dword ptr [eax], 2
add	eax, 8
mov	[ecx+1Ch], eax
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
mov	edi, [edi+0Ch]
test	edi, edi
jnz	short loc_833080

loc_8330B9:
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	4
lea	ecx, [esp+3Ch+var_14]
push	ecx
push	edx
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_8330E3
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_8330E3:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 24h
retn
sub_832D40 endp

align 10h



sub_8330F0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	esi
mov	esi, ecx
call	sub_832480
test	eax, eax
jz	short loc_83310C
push	eax
mov	ecx, esi
call	sub_832410
pop	esi
add	esp, 10h
retn

loc_83310C:
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [eax-8]
mov	[eax], edx
mov	edx, [eax-4]
mov	[eax+4], edx
push	edi
add	eax, 8
mov	[ecx+1Ch], eax
mov	edi, [esi]
mov	ecx, [edi+1Ch]
mov	edx, [edi+20h]
lea	eax, [esp+18h+var_10]
push	eax
sub	ecx, 8
push	ecx
push	edx
push	edi
call	sub_8192F0
mov	eax, [esp+28h+var_10]
mov	edi, [edi+1Ch]
mov	[edi-8], eax
mov	ecx, [esp+28h+var_C]
mov	[edi-4], ecx
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
add	esp, 10h
cmp	eax, [ecx+20h]
jb	short loc_833161
cmp	dword ptr [eax], 0
jz	short loc_8331A4

loc_833161:
mov	edx, [esi+10h]
push	edx
push	4
lea	eax, [esp+20h+var_10]
push	eax
push	ecx
mov	ecx, [esi+8]
mov	[esp+28h+var_10], 2
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_833191
mov	edx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	edx
call	sub_81A760
add	esp, 8

loc_833191:
mov	ecx, esi
call	sub_8330F0
mov	esi, [esi]
add	dword ptr [esi+1Ch], 0FFFFFFF8h
pop	edi
pop	esi
add	esp, 10h
retn

loc_8331A4:
add	dword ptr [ecx+1Ch], 0FFFFFFF8h
mov	eax, [esi]
push	offset a__persist ; "__persist"
push	0FFFFFFFFh
push	eax
call	sub_819D70
add	esp, 0Ch
test	eax, eax
jz	loc_8332A1
mov	ecx, [esi]
push	0FFFFFFFFh
push	ecx
call	sub_432B20
mov	edi, eax
add	esp, 8
test	edi, edi
jz	short loc_83320A
mov	edx, [esi]
push	0FFFFFFFFh
push	edx
call	sub_432BF0
add	esp, 8
test	eax, eax
jnz	short loc_83320A
mov	eax, [esi]
push	0FFFFFFFEh
push	eax
call	sub_5F2160
mov	ecx, [esi]
push	eax
push	ecx
call	sub_81BA90
mov	edx, [esi]
push	eax
push	offset aErrorSavingSIt ; "Error	saving %s, it has a 'false' __per"...
push	edx
call	sub_81A760
add	esp, 1Ch

loc_83320A:
mov	eax, [esi]
push	0FFFFFFFFh
push	eax
call	sub_5F21C0
add	esp, 8
test	eax, eax
jz	short loc_833273
mov	ecx, [esi]
push	0FFFFFFFEh
push	ecx
call	sub_481E40
mov	edx, [esi]
push	1
push	1
push	edx
call	sub_81C6E0
add	esp, 14h
push	4
lea	eax, [esp+1Ch+var_10]
push	eax
mov	ecx, esi
mov	[esp+20h+var_10], 3
call	sub_8323D0
mov	ecx, esi
call	sub_8330F0
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
push	4
lea	ecx, [esp+1Ch+var_10]
push	ecx
mov	ecx, esi
mov	[esp+20h+var_10], 4
call	sub_8323D0
pop	edi
pop	esi
add	esp, 10h
retn

loc_833273:
test	edi, edi
jnz	short loc_83329B
mov	edx, [esi]
push	0FFFFFFFFh
push	edx
call	sub_5F2160
push	eax
mov	eax, [esi]
push	eax
call	sub_81BA90
mov	ecx, [esi]
push	eax
push	offset aUnexpectedType ; "Unexpected type (%s) for __persist valu"...
push	ecx
call	sub_81A760
add	esp, 1Ch

loc_83329B:
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h

loc_8332A1:
mov	edx, [esi+10h]
mov	ecx, [esi]
push	edx
mov	edx, [esi+8]
push	4
lea	eax, [esp+20h+var_4]
push	eax
push	ecx
mov	[esp+28h+var_4], 1
call	edx
add	esp, 10h
test	eax, eax
jz	short loc_8332D3
mov	eax, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	eax
call	sub_81A760
add	esp, 8

loc_8332D3:
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jnb	short loc_8332E5
or	eax, 0FFFFFFFFh
jmp	short loc_8332F6

loc_8332E5:
mov	eax, [eax]
cmp	eax, 9
jz	short loc_8332F1
cmp	eax, 0Ah
jnz	short loc_8332F6

loc_8332F1:
mov	eax, 6

loc_8332F6:
mov	edx, [esi+10h]
push	edx
mov	[esp+1Ch+var_8], eax
push	4
lea	eax, [esp+20h+var_8]
push	eax
push	ecx
mov	ecx, [esi+8]
call	ecx
add	esp, 10h
test	eax, eax
jz	short loc_833322
mov	edx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	edx
call	sub_81A760
add	esp, 8

loc_833322:
mov	eax, [esp+18h+var_8]
cmp	eax, 0Bh	; switch 12 cases
ja	loc_8333C8	; default
			; jumptable 0083332F cases 9,10
jmp	ds:off_8333D0[eax*4] ; switch jump

loc_833336:		; jumptable 0083332F case 0
mov	ecx, esi
call	sub_832610
pop	edi
pop	esi
add	esp, 10h
retn

loc_833343:		; jumptable 0083332F case 1
mov	ecx, esi
call	sub_832650
pop	edi
pop	esi
add	esp, 10h
retn

loc_833350:		; jumptable 0083332F case 2
mov	ecx, esi
call	sub_8326B0
pop	edi
pop	esi
add	esp, 10h
retn

loc_83335D:		; jumptable 0083332F case 3
mov	ecx, esi
call	sub_832710
pop	edi
pop	esi
add	esp, 10h
retn

loc_83336A:		; jumptable 0083332F case 4
mov	ecx, esi
call	sub_8324F0
mov	ecx, esi
call	sub_832870
pop	edi
pop	esi
add	esp, 10h
retn

loc_83337E:		; jumptable 0083332F case 5
mov	ecx, esi
call	sub_8324F0
mov	ecx, esi
call	sub_8328F0
pop	edi
pop	esi
add	esp, 10h
retn

loc_833392:		; jumptable 0083332F case 6
mov	ecx, esi
call	sub_832C40
pop	edi
pop	esi
add	esp, 10h
retn

loc_83339F:		; jumptable 0083332F case 7
mov	ecx, esi
call	sub_8324F0
mov	ecx, esi
call	sub_832770
pop	edi
pop	esi
add	esp, 10h
retn

loc_8333B3:		; jumptable 0083332F case 8
mov	ecx, esi
call	sub_8324F0
mov	ecx, esi
call	sub_832D40
pop	edi
pop	esi
add	esp, 10h
retn

loc_8333C7:		; Trap to Debugger
int	3

loc_8333C8:		; default
pop	edi		; jumptable 0083332F cases 9,10
pop	esi
add	esp, 10h
retn
sub_8330F0 endp

align 10h
off_8333D0 dd offset loc_833336	; jump table for switch	statement
dd offset loc_833343
dd offset loc_833350
dd offset loc_83335D
dd offset loc_83336A
dd offset loc_83337E
dd offset loc_833392
dd offset loc_83339F
dd offset loc_8333B3
dd offset loc_8333C8
dd offset loc_8333C8
dd offset loc_8333C7



sub_833400 proc	near

var_4= dword ptr -4

push	ecx
push	esi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [esp+8+var_4]
mov	[eax+4], edx
mov	dword ptr [eax], 2
add	eax, 8
mov	[ecx+1Ch], eax
mov	eax, [esi]
mov	ecx, [eax+1Ch]
add	ecx, 0FFFFFFF8h
push	ecx
push	ecx
mov	ecx, [eax+20h]
add	ecx, 8
push	ecx
push	eax
call	sub_819750
mov	esi, [esi]
mov	eax, [esi+1Ch]
sub	eax, 8
add	esp, 10h
cmp	eax, [esi+20h]
jb	short loc_833462
cmp	dword ptr [eax], 0
jnz	short loc_833462
push	offset aFileContainedA ; "File contained a reference to	an object"...
push	esi
call	sub_81A760
add	esp, 8

loc_833462:
pop	esi
pop	ecx
retn
sub_833400 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_833CF0

loc_833470:
push	ecx
push	esi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
mov	esi, [esi]
mov	eax, [esi+1Ch]
mov	dword ptr [eax], 0
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_833CF0
align 10h
; START	OF FUNCTION CHUNK FOR sub_833CF0

loc_8334A0:
push	ecx
push	esi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
mov	esi, [esi]
mov	eax, [esi+1Ch]
mov	ecx, [esp+8+var_4]
mov	[eax+4], ecx
mov	dword ptr [eax], 1
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_833CF0
align 10h
; START	OF FUNCTION CHUNK FOR sub_833CF0

loc_8334D0:
push	ecx
push	esi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
mov	esi, [esi]
mov	eax, [esi+1Ch]
mov	ecx, [esp+8+var_4]
mov	[eax+4], ecx
mov	dword ptr [eax], 2
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_833CF0
align 10h
; START	OF FUNCTION CHUNK FOR sub_833CF0

loc_833500:
push	ecx
push	esi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
fld	[esp+8+var_4]
mov	esi, [esi]
mov	eax, [esi+1Ch]
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 3
add	eax, 8
mov	[esi+1Ch], eax
pop	esi
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_833CF0
align 10h



sub_833530 proc	near

var_214= dword ptr -214h
var_210= byte ptr -210h
var_4= dword ptr -4

sub	esp, 214h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+214h+var_4], eax
push	ebx
push	ebp
push	esi
push	4
lea	eax, [esp+224h+var_214]
push	eax
mov	ebp, ecx
call	sub_832BD0
mov	edx, [ebp+0]
lea	ecx, [esp+220h+var_210]
push	ecx
push	edx
call	sub_819CF0
mov	ebx, [esp+228h+var_214]
add	esp, 8
xor	esi, esi
test	ebx, ebx
jbe	short loc_8335B3
push	edi

loc_833571:
lea	eax, [esp+224h+var_210]
push	eax
call	sub_81A0C0
mov	ecx, ebx
sub	ecx, esi
add	esp, 4
mov	edi, 200h
cmp	ecx, 200h
ja	short loc_833591
mov	edi, ecx

loc_833591:
push	edi
push	eax
mov	ecx, ebp
call	sub_832BD0
lea	ecx, [esp+224h+var_210]
push	edi
push	ecx
call	sub_819BE0
add	esi, 200h
add	esp, 8
cmp	esi, ebx
jb	short loc_833571
pop	edi

loc_8335B3:
lea	edx, [esp+220h+var_210]
push	edx
call	sub_819D10
add	esp, 4
mov	ecx, ebp
call	sub_832580
mov	ecx, [esp+220h+var_4]
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 214h
retn
sub_833530 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_833CF0

loc_8335E0:
push	ecx
push	ebx
push	esi
push	edi
push	4
lea	eax, [esp+14h+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
mov	edi, [esp+10h+var_4]
mov	ecx, [esi]
push	edi
push	ecx
call	sub_81BDF0
add	esp, 8
mov	ecx, esi
mov	ebx, eax
call	sub_832580
push	edi
push	ebx
mov	ecx, esi
call	sub_832BD0
mov	ecx, esi
call	sub_833CF0
mov	esi, [esi]
mov	eax, [esi+1Ch]
lea	ecx, [eax-10h]
cmp	ecx, [esi+20h]
jb	short loc_83363A
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	esi
call	sub_8192D0
add	esp, 0Ch
add	dword ptr [esi+1Ch], 0FFFFFFF8h

loc_83363A:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_833CF0
align 10h



sub_833640 proc	near

var_4= dword ptr -4

push	ecx
push	edi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	edi, ecx
call	sub_832BD0
mov	eax, [esp+8+var_4]
test	eax, eax
jz	short loc_8336D7
cmp	eax, 5
jz	short loc_833673
mov	ecx, [edi]
push	eax
push	offset aErrorParsing_1 ; "Error	parsing	file - unexpected tag -	%"...
push	ecx
call	sub_81A760
add	esp, 0Ch
xor	eax, eax
pop	edi
pop	ecx
retn

loc_833673:
mov	eax, [edi]
push	esi
push	10h
push	eax
call	sub_82C6B0
mov	esi, eax
mov	dword ptr [esi], 0
mov	[esi+8], esi
mov	dword ptr [esi+0Ch], 0
mov	ecx, [edi]
mov	eax, [ecx+1Ch]
mov	[eax+4], esi
mov	dword ptr [eax], 2
add	eax, 8
mov	[ecx+1Ch], eax
add	esp, 8
mov	ecx, edi
call	sub_832580
mov	eax, [edi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
mov	ecx, edi
call	sub_833CF0
mov	edx, [edi]
mov	eax, [edx+1Ch]
mov	ecx, [eax-8]
mov	[esi], ecx
mov	edx, [eax-4]
mov	[esi+4], edx
mov	edi, [edi]
add	dword ptr [edi+1Ch], 0FFFFFFF8h
mov	eax, esi
pop	esi
pop	edi
pop	ecx
retn

loc_8336D7:
mov	ecx, edi
call	sub_833400
mov	edi, [edi]
mov	eax, [edi+1Ch]
sub	eax, 8
cmp	eax, [edi+20h]
jb	short loc_83370E
mov	ecx, [eax]
cmp	ecx, 7
jnz	short loc_8336FF
mov	eax, [eax+4]
add	eax, 10h
add	dword ptr [edi+1Ch], 0FFFFFFF8h
pop	edi
pop	ecx
retn

loc_8336FF:
cmp	ecx, 2
jnz	short loc_83370E
mov	eax, [eax+4]
add	dword ptr [edi+1Ch], 0FFFFFFF8h
pop	edi
pop	ecx
retn

loc_83370E:
xor	eax, eax
add	dword ptr [edi+1Ch], 0FFFFFFF8h
pop	edi
pop	ecx
retn
sub_833640 endp

align 10h



sub_833720 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	eax, [esi]
push	edi
push	eax
call	sub_81B500
add	esp, 4
mov	ecx, esi
mov	ebx, eax
call	sub_832580
mov	ecx, esi
call	sub_833CF0
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jnb	short loc_833755
xor	eax, eax
jmp	short loc_833761

loc_833755:
push	0
push	eax
push	ecx
call	sub_818EC0
add	esp, 0Ch

loc_833761:
push	eax
push	ebx
call	sub_81B300
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
add	esp, 8
push	4
lea	ecx, [ebx+50h]
push	ecx
mov	ecx, esi
call	sub_832BD0
push	4
lea	edx, [ebx+44h]
push	edx
mov	ecx, esi
call	sub_832BD0
push	4
lea	eax, [esp+24h+var_8]
push	eax
mov	ecx, esi
call	sub_832BD0
mov	ebp, [esp+20h+var_8]
test	ebp, ebp
jbe	short loc_8337AF
mov	edi, ebp

loc_8337A3:
mov	ecx, esi
call	sub_833CF0
sub	edi, 1
jnz	short loc_8337A3

loc_8337AF:
mov	ecx, [esi]
push	ebp
push	ebx
push	ecx
call	sub_81BF20
add	esp, 0Ch
push	4
lea	edx, [esp+24h+var_8]
push	edx
mov	ecx, esi
call	sub_832BD0
mov	eax, [esp+20h+var_8]
mov	edx, [ebx+1Ch]
lea	ecx, ds:0[eax*8]
sub	edx, ecx
push	4
lea	eax, [esp+24h+var_8]
push	eax
mov	ecx, esi
mov	[ebx+20h], edx
call	sub_832BD0
cmp	[esp+20h+var_8], 0
lea	ebp, [ebx+4]
mov	[esp+20h+var_10], 0
jle	loc_8338A0

loc_833801:
mov	edi, [ebp+8]
add	edi, 10h
cmp	edi, [ebp+4]
jnz	short loc_83381A
push	ebx
mov	ecx, ebp
call	sub_8237A0
mov	edi, [ebp+8]
add	edi, 10h

loc_83381A:
push	4
lea	ecx, [esp+24h+var_4]
push	ecx
mov	ecx, esi
mov	[ebp+8], edi
call	sub_832BD0
push	4
lea	edx, [esp+24h+var_C]
push	edx
mov	ecx, esi
call	sub_832BD0
push	4
lea	eax, [edi+8]
push	eax
mov	ecx, esi
call	sub_832BD0
push	4
lea	ecx, [edi+0Ch]
push	ecx
mov	ecx, esi
call	sub_832BD0
cmp	[esp+20h+var_C], 0FFFFFFFFh
mov	edx, [ebx+28h]
mov	eax, [esp+20h+var_4]
lea	ecx, [edx+eax*8]
mov	[edi], ecx
jnz	short loc_83386F
mov	dword ptr [edi+4], 0
jmp	short loc_83388D

loc_83386F:
mov	edx, [esp+20h+var_10]
dec	edx
push	edx
push	ebx
mov	ecx, ebp
call	sub_823B80
mov	eax, [eax+8]
mov	ecx, [eax+8]
mov	edx, [esp+20h+var_C]
lea	eax, [ecx+edx*4]
mov	[edi+4], eax

loc_83388D:
mov	eax, [esp+20h+var_10]
inc	eax
cmp	eax, [esp+20h+var_8]
mov	[esp+20h+var_10], eax
jl	loc_833801

loc_8338A0:
push	4
lea	ecx, [esp+24h+var_8]
push	ecx
mov	ecx, esi
call	sub_832BD0
push	4
lea	edx, [esp+24h+var_4]
push	edx
mov	ecx, esi
call	sub_832BD0
mov	eax, [esp+20h+var_4]
test	eax, eax
jle	short loc_833932
mov	edi, eax

loc_8338C6:
mov	ecx, esi
call	sub_833640
mov	ecx, esi
mov	ebp, eax
call	sub_833CF0
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
cmp	eax, [ecx+20h]
jb	short loc_8338FC
mov	ecx, [eax]
cmp	ecx, 7
jnz	short loc_8338F2
mov	eax, [eax+4]
add	eax, 10h
jmp	short loc_8338FE

loc_8338F2:
cmp	ecx, 2
jnz	short loc_8338FC
mov	eax, [eax+4]
jmp	short loc_8338FE

loc_8338FC:
xor	eax, eax

loc_8338FE:
mov	ecx, [ebx+28h]
lea	edx, [ecx+eax*8]
mov	[ebp+8], edx
mov	eax, [ebx+2Ch]
mov	[ebp+0Ch], eax
mov	[ebx+2Ch], ebp
mov	eax, [esi]
add	dword ptr [eax+1Ch], 0FFFFFFF8h
mov	ecx, [ebp-4]
shr	ecx, 2
test	cl, 1
jz	short loc_83392D
mov	edx, [esi]
push	ebp
push	edx
call	sub_82CB80
add	esp, 8

loc_83392D:
sub	edi, 1
jnz	short loc_8338C6

loc_833932:
push	4
lea	eax, [esp+24h+var_8]
push	eax
mov	ecx, esi
call	sub_832BD0
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_833720 endp

align 10h



sub_833950 proc	near

var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 18h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+18h+var_4], eax
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi]
push	0
push	8
push	eax
call	sub_81BD50
mov	edi, [esi]
mov	ecx, [edi+1Ch]
mov	ebp, [ecx-4]
mov	ebx, [ecx-8]
mov	eax, ecx
sub	eax, [edi+20h]
lea	edx, [ecx-8]
sar	eax, 3
dec	eax
add	esp, 0Ch
cmp	eax, 1
mov	[esp+28h+var_10], ebp
jle	short loc_8339B5
lea	ebp, [eax-1]
mov	[esp+28h+var_18], ebp
lea	ebx, [ebx+0]

loc_8339A0:
mov	ebp, [edx-8]
mov	[edx], ebp
mov	ebp, [edx-4]
mov	[edx+4], ebp
add	edx, 0FFFFFFF8h
sub	[esp+28h+var_18], 1
jnz	short loc_8339A0

loc_8339B5:
lea	edx, ds:0[eax*8]
mov	eax, ecx
sub	eax, edx
mov	edx, [esp+28h+var_10]
mov	[eax], ebx
mov	[eax+4], edx
mov	[edi+1Ch], ecx
mov	eax, [esi+10h]
mov	edx, [esi]
push	eax
mov	eax, [esi+8]
push	8
lea	ecx, [esp+30h+var_C]
push	ecx
push	edx
mov	[esp+38h+var_C], 4Bh
mov	[esp+38h+var_B], 4Fh
mov	[esp+38h+var_A], 52h
mov	[esp+38h+var_9], 45h
mov	[esp+38h+var_8], 1
call	eax
add	esp, 10h
test	eax, eax
jz	short loc_833A12
mov	ecx, [esi]
push	offset aErrorWritingTo ; "Error	writing	to file"
push	ecx
call	sub_81A760
add	esp, 8

loc_833A12:
mov	ecx, esi
call	sub_8330F0
mov	ecx, [esp+28h+var_4]
pop	edi
pop	esi
pop	ebp
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 18h
retn
sub_833950 endp

align 10h



sub_833A30 proc	near

arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
push	esi
mov	esi, [esp+4+arg_4]
mov	dword ptr [eax], 1
mov	ecx, [esi+20h]
cmp	ecx, [esi+1Ch]
lea	eax, [esi+1Ch]
jnz	short loc_833A78
mov	edx, [esi+0Ch]
mov	ecx, [esi+4]
push	eax
mov	eax, [esi]
push	edx
push	eax
call	ecx
add	esp, 0Ch
mov	[esi+18h], eax
mov	dword ptr [esi+20h], 0
test	eax, eax
jnz	short loc_833A78
mov	edx, [esi]
push	offset aErrorReadingFr ; "Error	reading	from buffer"
push	edx
call	sub_81A760
add	esp, 8

loc_833A78:
mov	ecx, [esi+20h]
mov	eax, [esi+18h]
add	eax, ecx
inc	ecx
mov	[esi+20h], ecx
pop	esi
retn
sub_833A30 endp

align 10h



sub_833A90 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
mov	eax, [esp+24h+arg_0]
mov	ecx, [esp+24h+arg_4]
mov	edx, [esp+24h+arg_8]
mov	[esp+24h+var_24], eax
xor	eax, eax
mov	[esp+24h+var_1C], ecx
lea	ecx, [esp+24h+var_24]
mov	[esp+24h+var_20], eax
mov	[esp+24h+var_18], eax
mov	[esp+24h+var_14], edx
mov	[esp+24h+var_10], eax
mov	[esp+24h+var_C], eax
mov	[esp+24h+var_8], eax
mov	[esp+24h+var_4], eax
call	sub_833950
add	esp, 24h
retn
sub_833A90 endp




sub_833AD0 proc	near

var_4= dword ptr -4

push	ecx
push	esi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
cmp	[esp+8+var_4], 0
jnz	short loc_833AF2
mov	ecx, esi
pop	esi
add	esp, 4
jmp	sub_833400

loc_833AF2:
mov	ecx, [esi]
mov	ecx, [ecx]
push	edi
push	0
add	ecx, 230h
call	sub_81D9C0
mov	edx, [esi]
push	offset aKorereload ; "KoreReload"
push	esi
push	offset sub_833A30
push	edx
call	sub_81C340
mov	edi, eax
mov	eax, [esi]
mov	ecx, [eax]
add	esp, 10h
push	1
add	ecx, 230h
call	sub_81D9C0
test	edi, edi
pop	edi
jz	short loc_833B42
mov	ecx, [esi]
push	offset aErrorReloading ; "Error	reloading function"
push	ecx
call	sub_81A760
add	esp, 8

loc_833B42:
mov	ecx, esi
pop	esi
add	esp, 4
jmp	sub_832580
sub_833AD0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_833CF0

loc_833B50:
push	ecx
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
call	sub_833AD0
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	edx, [ecx-4]
mov	edi, [edx+8]
movzx	ebp, byte ptr [edi]
mov	ebx, [eax+34h]
lea	ecx, ds:18h[ebp*4]
push	ecx
push	eax
call	sub_82C5B0
mov	edx, eax
mov	[edx+8], edi
mov	byte ptr [edx+0Ch], 0
mov	[edx+4], ebx
mov	dword ptr [edx], 5
movzx	eax, byte ptr [edi+3]
mov	[edx+0Dh], al
mov	cl, [edi+2]
mov	[edx+0Eh], cl
movzx	eax, byte ptr [edi+1]
mov	[edx+0Fh], al
mov	ecx, [edi+10h]
mov	[edx+10h], ecx
mov	eax, [edi+8]
add	esp, 8
mov	[edx+14h], eax
test	ebp, ebp
jbe	short loc_833BBD
lea	edi, [edx+18h]
mov	ecx, ebp
xor	eax, eax
rep stosd

loc_833BBD:
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	[eax+4], edx
mov	ecx, [esi]
mov	edx, [ecx+1Ch]
mov	dword ptr [edx], 9
mov	eax, [esi]
add	dword ptr [eax+1Ch], 8
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
mov	edx, [eax-8]
mov	[eax-10h], edx
mov	edx, [eax-4]
mov	[eax-0Ch], edx
mov	edx, [eax]
mov	[eax-8], edx
mov	edx, [eax+4]
mov	[eax-4], edx
add	eax, 0FFFFFFF8h
mov	[ecx+1Ch], eax
mov	ecx, esi
call	sub_832580
mov	ecx, esi
call	sub_833CF0
mov	ecx, [esi]
mov	eax, [ecx+1Ch]
sub	eax, 8
mov	ebx, 0FFFFFFF8h
cmp	eax, [ecx+20h]
jb	short loc_833C36
cmp	dword ptr [eax], 0
jnz	short loc_833C36
add	[ecx+1Ch], ebx
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	edx, [eax+30h]
mov	[ecx], edx
mov	edx, [eax+34h]
mov	[ecx+4], edx
add	ecx, 8
mov	[eax+1Ch], ecx

loc_833C36:
mov	edi, [esi]
mov	eax, [edi+1Ch]
lea	ecx, [eax-10h]
cmp	ecx, [edi+20h]
jb	short loc_833C51
add	eax, 0FFFFFFF8h
push	eax
push	ecx
push	edi
call	sub_8191A0
add	esp, 0Ch

loc_833C51:
add	[edi+1Ch], ebx
mov	eax, [esi]
mov	ecx, [eax+1Ch]
mov	ebx, [ecx-4]
push	4
lea	edx, [esp+18h+var_4]
push	edx
mov	ecx, esi
call	sub_832BD0
mov	eax, [esp+14h+var_4]
xor	ecx, ecx
cmp	eax, ecx
jnz	short loc_833C8C
mov	edx, [ebx+8]
cmp	byte ptr [edx],	1
jnz	short loc_833C8A
mov	[edx], cl
mov	edx, [ebx+8]
mov	[edx+2Ch], ecx
mov	edx, [ebx+8]
mov	[edx+30h], ecx

loc_833C8A:
cmp	eax, ecx

loc_833C8C:
jle	short loc_833CDB
lea	ebp, [ebx+18h]
mov	[esp+14h+var_4], eax

loc_833C95:
mov	ecx, esi
call	sub_833640
mov	edi, eax
mov	[ebp+0], edi
mov	eax, [edi-4]
shr	eax, 2
test	al, 1
jz	short loc_833CB7
mov	ecx, [esi]
push	edi
push	ecx
call	sub_82CB80
add	esp, 8

loc_833CB7:
mov	edx, [esi]
mov	ecx, [edx]
add	ecx, 230h
cmp	dword ptr [ecx+0Ch], 1
jnz	short loc_833CD1
mov	eax, [edi+8]
push	eax
push	ebx
call	sub_81EB00

loc_833CD1:
add	ebp, 4
sub	[esp+14h+var_4], 1
jnz	short loc_833C95

loc_833CDB:
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; END OF FUNCTION CHUNK	FOR sub_833CF0
align 10h



sub_833CF0 proc	near

var_4= dword ptr -4

; FUNCTION CHUNK AT 00832AA0 SIZE 0000008A BYTES
; FUNCTION CHUNK AT 00833470 SIZE 00000024 BYTES
; FUNCTION CHUNK AT 008334A0 SIZE 0000002B BYTES
; FUNCTION CHUNK AT 008334D0 SIZE 0000002B BYTES
; FUNCTION CHUNK AT 00833500 SIZE 0000002B BYTES
; FUNCTION CHUNK AT 008335E0 SIZE 0000005F BYTES
; FUNCTION CHUNK AT 00833B50 SIZE 00000191 BYTES

push	ecx
push	esi
push	4
lea	eax, [esp+0Ch+var_4]
push	eax
mov	esi, ecx
call	sub_832BD0
mov	eax, [esp+8+var_4]
cmp	eax, 3		; switch 4 cases
ja	loc_833DDE	; default
jmp	ds:off_833DF4[eax*4] ; switch jump

loc_833D14:		; jumptable 00833D0D case 0
mov	ecx, esi
pop	esi
add	esp, 4
jmp	sub_833400

loc_833D1F:		; jumptable 00833D0D case 2
mov	ecx, esi
call	sub_833CF0
mov	ecx, [esi]
push	1
push	ecx
call	sub_481EF0
add	esp, 8
pop	esi
pop	ecx
retn

loc_833D36:		; jumptable 00833D0D case 3
mov	ecx, esi
call	sub_833CF0
push	4
lea	edx, [esp+0Ch+var_4]
push	edx
mov	ecx, esi
call	sub_832BD0
mov	eax, [esi]
push	1
push	0
push	eax
call	sub_81C6E0
add	esp, 0Ch
pop	esi
pop	ecx
retn

loc_833D5D:		; jumptable 00833D0D case 1
push	4
lea	ecx, [esp+0Ch+var_4]
push	ecx
mov	ecx, esi
call	sub_832BD0
mov	eax, [esp+8+var_4]
cmp	eax, 8		; switch 9 cases
ja	short loc_833DEE ; default
jmp	ds:off_833E04[eax*4] ; switch jump

loc_833D7B:		; jumptable 00833D74 case 0
mov	ecx, esi
pop	esi
add	esp, 4
jmp	loc_833470

loc_833D86:		; jumptable 00833D74 case 1
mov	ecx, esi
pop	esi
add	esp, 4
jmp	loc_8334A0

loc_833D91:		; jumptable 00833D74 case 2
mov	ecx, esi
pop	esi
add	esp, 4
jmp	loc_8334D0

loc_833D9C:		; jumptable 00833D74 case 3
mov	ecx, esi
pop	esi
add	esp, 4
jmp	loc_833500

loc_833DA7:		; jumptable 00833D74 case 4
mov	ecx, esi
pop	esi
add	esp, 4
jmp	sub_833530

loc_833DB2:		; jumptable 00833D74 case 5
mov	ecx, esi
pop	esi
add	esp, 4
jmp	loc_832AA0

loc_833DBD:		; jumptable 00833D74 case 6
mov	ecx, esi
pop	esi
add	esp, 4
jmp	loc_833B50

loc_833DC8:		; jumptable 00833D74 case 7
mov	ecx, esi
pop	esi
add	esp, 4
jmp	loc_8335E0

loc_833DD3:		; jumptable 00833D74 case 8
mov	ecx, esi
pop	esi
add	esp, 4
jmp	sub_833720

loc_833DDE:		; default
mov	edx, [esi]
push	offset aErrorParsingFi ; "Error	parsing	file"
push	edx
call	sub_81A760
add	esp, 8

loc_833DEE:		; default
pop	esi
pop	ecx
retn
sub_833CF0 endp

align 4
off_833DF4 dd offset loc_833D14	; jump table for switch	statement
dd offset loc_833D5D
dd offset loc_833D1F
dd offset loc_833D36
off_833E04 dd offset loc_833D7B	; jump table for switch	statement
dd offset loc_833D86
dd offset loc_833D91
dd offset loc_833D9C
dd offset loc_833DA7
dd offset loc_833DB2
dd offset loc_833DBD
dd offset loc_833DC8
dd offset loc_833DD3
align 10h



sub_833E30 proc	near

var_C= byte ptr	-0Ch
var_B= byte ptr	-0Bh
var_A= byte ptr	-0Ah
var_9= byte ptr	-9
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 0Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0Ch+var_4], eax
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi]
push	0
push	8
push	eax
call	sub_81BD50
add	esp, 0Ch
push	8
lea	ecx, [esp+18h+var_C]
push	ecx
mov	ecx, esi
call	sub_832BD0
mov	al, [esp+14h+var_C]
mov	cl, [esp+14h+var_9]
mov	dl, [esp+14h+var_A]
mov	bl, [esp+14h+var_B]
cmp	al, 4Bh
jnz	short loc_833E82
cmp	bl, 4Fh
jnz	short loc_833E82
cmp	dl, 52h
jnz	short loc_833E82
cmp	cl, 45h
jz	short loc_833EA2

loc_833E82:
movzx	ecx, cl
push	ecx
movzx	edx, dl
push	edx
movzx	ecx, bl
movzx	edx, al
mov	eax, [esi]
push	ecx
push	edx
push	offset aFileHeaderIsNo ; "File header is not valid. Tag	is %c%c%c"...
push	eax
call	sub_81A760
add	esp, 18h

loc_833EA2:
mov	eax, [esp+14h+var_8]
cmp	eax, 1
jz	short loc_833EBE
mov	ecx, [esi]
push	1
push	eax
push	offset aFileWasSavedWi ; "File was saved with version %d, but the"...
push	ecx
call	sub_81A760
add	esp, 10h

loc_833EBE:
mov	ecx, esi
call	sub_833CF0
mov	eax, [esi]
mov	edx, [eax+1Ch]
mov	esi, edx
sub	esi, [eax+20h]
mov	ecx, 1
sar	esi, 3
sub	ecx, esi
jns	short loc_833EEF
push	edi
lea	edi, [edx+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd
pop	edi

loc_833EEF:
mov	ecx, [esp+14h+var_4]
pop	esi
add	edx, 0FFFFFFF8h
pop	ebx
xor	ecx, esp
mov	[eax+1Ch], edx
call	sub_7999A3
add	esp, 0Ch
retn
sub_833E30 endp

align 10h



sub_833F10 proc	near

var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 24h
mov	eax, [esp+24h+arg_0]
mov	ecx, [esp+24h+arg_4]
mov	edx, [esp+24h+arg_8]
mov	[esp+24h+var_24], eax
xor	eax, eax
mov	[esp+24h+var_20], ecx
lea	ecx, [esp+24h+var_24]
mov	[esp+24h+var_1C], eax
mov	[esp+24h+var_18], edx
mov	[esp+24h+var_14], eax
mov	[esp+24h+var_10], eax
mov	[esp+24h+var_C], eax
mov	[esp+24h+var_8], eax
mov	[esp+24h+var_4], eax
call	sub_833E30
add	esp, 24h
retn
sub_833F10 endp




sub_833F50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_4]
push	edi
mov	edi, [esp+4+arg_8]
mov	edx, 1
rol	edx, cl
cmp	ecx, edi
jg	short loc_833F80
push	esi
mov	esi, [esp+8+arg_0]
lea	esp, [esp+0]

loc_833F70:
mov	eax, ecx
shr	eax, 5
or	[esi+eax*4], edx
inc	ecx
rol	edx, 1
cmp	ecx, edi
jle	short loc_833F70
pop	esi

loc_833F80:
pop	edi
retn
sub_833F50 endp

align 10h



sub_833F90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
mov	edx, [eax]
mov	ecx, [esp+arg_0]
not	edx
mov	[ecx], edx
mov	edx, [eax+4]
not	edx
mov	[ecx+4], edx
mov	edx, [eax+8]
not	edx
mov	[ecx+8], edx
mov	edx, [eax+0Ch]
not	edx
mov	[ecx+0Ch], edx
mov	edx, [eax+10h]
not	edx
mov	[ecx+10h], edx
mov	edx, [eax+14h]
not	edx
mov	[ecx+14h], edx
mov	edx, [eax+18h]
not	edx
mov	[ecx+18h], edx
mov	eax, [eax+1Ch]
not	eax
mov	[ecx+1Ch], eax
retn
sub_833F90 endp

db 19h dup(0CCh)



sub_833FF0 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	cl, [ecx]
xor	eax, eax

loc_833FF8:
cmp	cl, ds:byte_14691F8[eax]
jz	short loc_83400A
inc	eax
cmp	eax, 14h
jl	short loc_833FF8
movsx	eax, cl
retn

loc_83400A:
movsx	eax, ds:word_14691D0[eax*2]
retn
sub_833FF0 endp

align 10h



sub_834020 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	edi
xor	edi, edi
xor	eax, eax
test	ecx, ecx
jz	short loc_834065
push	esi
mov	esi, [esp+8+arg_4]

loc_834032:
mov	edx, [ecx]
cmp	edx, 11Eh
jnz	short loc_834046
cmp	[ecx+4], esi
jnz	short loc_834046
mov	edi, 1

loc_834046:
cmp	edx, 11Fh
jnz	short loc_834053
cmp	[ecx+4], esi
jz	short loc_83405F

loc_834053:
mov	ecx, [ecx+0Ch]
test	ecx, ecx
jnz	short loc_834032
pop	esi
and	eax, edi
pop	edi
retn

loc_83405F:
mov	eax, 1
pop	esi

loc_834065:
and	eax, edi
pop	edi
retn
sub_834020 endp

align 10h



sub_834070 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	ecx, [esp+arg_4]
push	ebx
push	esi
mov	esi, [esp+8+arg_8]
lea	eax, [ecx+0Ch]
push	edi
mov	edx, ecx
cmp	[eax], esi
jz	short loc_83408E

loc_834084:
mov	edx, [eax]
cmp	[edx+0Ch], esi
lea	eax, [edx+0Ch]
jnz	short loc_834084

loc_83408E:
xor	edi, edi

loc_834090:
cmp	[ecx+10h], esi
jz	short loc_83409C
mov	ecx, [ecx+0Ch]
cmp	ecx, edi
jnz	short loc_834090

loc_83409C:
mov	esi, [esp+0Ch+arg_0]
mov	eax, [esi]
lea	ebx, [eax+18h]
mov	[esi], ebx
mov	esi, [esp+0Ch+arg_C]
mov	[eax+4], edi
mov	[eax+8], edi
mov	[eax+0Ch], edi
mov	[eax+10h], edi
cmp	ecx, edi
pop	edi
mov	[eax], esi
pop	esi
mov	[edx+0Ch], eax
pop	ebx
jz	short locret_8340C6
mov	[ecx+10h], eax

locret_8340C6:
retn
sub_834070 endp

align 10h



sub_8340D0 proc	near

var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 48h
mov	eax, [esp+48h+arg_8]
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+58h+arg_4]
lea	ecx, [edi+eax-1]
lea	edx, [eax+eax*2]
lea	eax, ds:80h[edx*8]
mov	[esp+58h+arg_8], ecx
mov	ecx, [esp+58h+arg_0]
xor	ebx, ebx
push	eax
push	ecx
mov	[esp+60h+var_2C], ebx
mov	[esp+60h+var_38], ebx
mov	[esp+60h+var_3C], ebx
call	sub_81BDF0
mov	ebp, eax
add	ebp, 18h
add	esp, 8
lea	esi, [eax+0Ch]
mov	[esp+58h+var_48], eax
mov	[esp+58h+arg_4], ebp
mov	dword ptr [eax], 118h
mov	[eax+4], ebx
mov	[eax+8], ebx
mov	[esi], ebx
mov	[eax+10h], ebx
cmp	edi, ebx
jz	short loc_83413F
cmp	byte ptr [edi],	5Eh
jnz	short loc_83413F
mov	dword ptr [eax+4], 1
inc	edi

loc_83413F:
mov	ebx, eax
mov	[esp+58h+var_30], esi
cmp	edi, [esp+58h+arg_8]
jz	loc_834670
nop

loc_834150:
xor	ecx, ecx
mov	dl, 78h
cmp	[esp+58h+arg_C], ecx
jnz	short loc_83415C
mov	dl, [edi]

loc_83415C:
movzx	eax, dl
add	eax, 0FFFFFFDCh
cmp	eax, 37h	; switch 56 cases
ja	loc_834620	; default
			; jumptable 00834172 cases 2,3,8,11-26,28-54
movzx	eax, ds:byte_8346D8[eax]
jmp	ds:off_8346B0[eax*4] ; switch jump

loc_834179:		; jumptable 00834172 case 1
inc	edi
cmp	edi, [esp+58h+arg_8]
jz	loc_8346A4
movsx	ecx, byte ptr [edi]
push	ecx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_8341CB
movsx	ebx, byte ptr [edi]
mov	edx, [esp+58h+var_48]
sub	ebx, 30h
push	ebx
push	edx
call	sub_834020
add	esp, 8
test	eax, eax
jz	loc_8346A4
mov	eax, ebp
add	ebp, 18h
xor	ecx, ecx
mov	dword ptr [eax], 11Dh
mov	[eax+4], ebx
mov	[eax+8], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
jmp	short loc_834245

loc_8341CB:
push	edi
call	sub_833FF0
add	esp, 4
cmp	eax, 100h
jle	short loc_834202
mov	ecx, ebp
add	ebp, 18h
xor	edx, edx
mov	[ecx+8], edx
mov	dword ptr [ecx], 115h
mov	[ecx+4], edx
mov	[ecx+0Ch], edx
mov	[ecx+10h], edx
mov	eax, dword ptr ds:aAReferenceTo_0[eax*4] ; "A reference	to %s already exists"
mov	ebx, ecx
mov	[ecx+8], eax
jmp	short loc_834247

loc_834202:
cmp	eax, 62h
jnz	loc_834620	; default
			; jumptable 00834172 cases 2,3,8,11-26,28-54
inc	edi
cmp	edi, [esp+58h+arg_8]
jz	loc_8346A4
mov	eax, ebp
xor	ecx, ecx
add	ebp, 18h
mov	[eax+8], ebp
mov	edx, [eax+8]
mov	dword ptr [eax], 116h
mov	[eax+4], ecx
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
movsx	ecx, byte ptr [edi]
add	ebp, 8
mov	[edx], ecx
movsx	ecx, byte ptr [edi+1]
mov	edx, [eax+8]
inc	edi
mov	[edx+4], ecx

loc_834245:
mov	ebx, eax

loc_834247:
mov	[esp+58h+arg_4], ebp
test	esi, esi
jz	short loc_834251
mov	[esi], ebx

loc_834251:
mov	eax, [esp+58h+var_2C]
test	eax, eax
jz	short loc_83425B
mov	[eax], ebx

loc_83425B:
lea	esi, [ebx+0Ch]
mov	[esp+58h+var_2C], 0
jmp	loc_834656

loc_83426B:		; jumptable 00834172 case 4
mov	edx, [esp+58h+var_38]
mov	eax, ebp
inc	edx
mov	[esp+58h+var_38], edx
add	ebp, 18h
mov	[eax+4], edx
lea	edx, [eax+0Ch]
mov	[esp+58h+arg_4], ebp
mov	dword ptr [eax], 11Eh
mov	[eax+8], ecx
mov	[edx], ecx
mov	[eax+10h], ecx
mov	ebx, eax
cmp	esi, ecx
jz	short loc_834299
mov	[esi], eax

loc_834299:
mov	esi, [esp+58h+var_2C]
cmp	esi, ecx
jz	short loc_8342A3
mov	[esi], eax

loc_8342A3:
cmp	byte ptr [edi+1], 29h
mov	esi, edx
mov	[esp+58h+var_30], esi
mov	[esp+58h+var_2C], ecx
jnz	short loc_8342BB
add	edi, 2
jmp	loc_83465B

loc_8342BB:
mov	ecx, [esp+58h+var_3C]
inc	edi
mov	[esp+ecx*4+58h+var_28],	eax
inc	ecx
mov	[esp+58h+var_3C], ecx
jmp	loc_83465B

loc_8342CE:		; jumptable 00834172 case 5
mov	eax, [esp+58h+var_3C]
cmp	eax, ecx
jz	loc_8346A4
dec	eax
mov	[esp+58h+var_3C], eax
mov	eax, [esp+eax*4+58h+var_28]
mov	edx, [eax+4]
mov	eax, ebp
mov	dword ptr [eax], 11Fh
mov	[eax+4], edx

loc_8342F1:
add	ebp, 18h
lea	edx, [eax+0Ch]
mov	[eax+10h], ecx
mov	[edx], ecx
mov	ebx, eax
mov	[eax+8], ecx
mov	[esp+58h+arg_4], ebp
cmp	esi, ecx
jz	short loc_83430B
mov	[esi], eax

loc_83430B:
mov	esi, [esp+58h+var_2C]
cmp	esi, ecx
jz	short loc_834315
mov	[esi], eax

loc_834315:
mov	esi, edx
mov	[esp+58h+var_2C], ecx
jmp	loc_834656

loc_834320:		; jumptable 00834172 case 10
mov	eax, ebp
mov	dword ptr [eax], 100h
mov	[eax+4], ecx
jmp	short loc_8342F1

loc_83432D:		; jumptable 00834172 case 55
xor	ebx, ebx
mov	[esp+58h+var_40], ecx
mov	ecx, ebp
or	edx, 0FFFFFFFFh
lea	eax, [ecx+0Ch]
add	ebp, 18h
mov	[ecx+4], ebx
mov	[ecx+8], ebx
mov	[eax], ebx
mov	[ecx+10h], ebx
mov	[esp+58h+var_44], edx
mov	[esp+58h+var_34], ecx
mov	dword ptr [ecx], 115h
mov	ebx, ecx
test	esi, esi
jz	short loc_83435F
mov	[esi], ecx

loc_83435F:
mov	esi, [esp+58h+var_2C]
test	esi, esi
jz	short loc_834369
mov	[esi], ecx

loc_834369:
mov	[ecx+8], ebp
mov	esi, [ecx+8]
mov	[esp+58h+var_30], eax
xor	eax, eax
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
add	ebp, 20h
inc	edi
mov	[esi+1Ch], eax
cmp	byte ptr [edi],	5Eh
mov	[esp+58h+var_2C], 0
mov	[esp+58h+arg_4], ebp
jnz	short loc_8343A9
mov	dword ptr [ecx+4], 1
inc	edi

loc_8343A9:
cmp	edi, [esp+58h+arg_8]
jz	loc_8346A4

loc_8343B3:
mov	al, [edi]
cmp	al, 5Dh
jz	loc_83452C
cmp	al, 25h
jz	short loc_834434
cmp	al, 2Dh
jnz	short loc_8343D8
cmp	edx, 0FFFFFFFFh
jz	short loc_8343D8
mov	[esp+58h+var_40], 1
inc	edi
jmp	loc_834519

loc_8343D8:
cmp	[esp+58h+var_40], 1
jnz	short loc_834402
movsx	ecx, al
push	ecx
push	edx
push	esi
call	sub_833F50
or	edx, 0FFFFFFFFh
add	esp, 0Ch
mov	[esp+58h+var_40], 0
mov	[esp+58h+var_44], edx
inc	edi
jmp	loc_834519

loc_834402:
cmp	byte ptr [edi+1], 2Dh
jnz	short loc_834415
movsx	edx, al
mov	[esp+58h+var_44], edx
inc	edi
jmp	loc_834519

loc_834415:
movsx	ecx, al
mov	eax, ecx
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
shr	eax, 5
or	[esi+eax*4], edx
mov	edx, [esp+58h+var_44]
inc	edi
jmp	loc_834519

loc_834434:
inc	edi
xor	eax, eax
cmp	edi, [esp+58h+arg_8]
jz	loc_8346A6
mov	cl, [edi]

loc_834443:
cmp	cl, ds:byte_14691F8[eax]
jz	short loc_834483
inc	eax
cmp	eax, 14h
jl	short loc_834443
movsx	ecx, cl

loc_834454:
inc	edi
cmp	ecx, 100h
jge	short loc_8344B5
cmp	[esp+58h+var_40], 1
jnz	short loc_83448D
push	ecx
push	edx
push	esi
call	sub_833F50
add	esp, 0Ch
or	edx, 0FFFFFFFFh
mov	[esp+58h+var_40], 0
mov	[esp+58h+var_44], edx
jmp	loc_834519

loc_834483:
movsx	ecx, ds:word_14691D0[eax*2]
jmp	short loc_834454

loc_83448D:
cmp	byte ptr [edi],	2Dh
jnz	short loc_83449D
mov	edx, ecx
mov	[esp+58h+var_44], edx
jmp	loc_834519

loc_83449D:
mov	eax, ecx
and	ecx, 1Fh
mov	edx, 1
shl	edx, cl
shr	eax, 5
or	[esi+eax*4], edx
mov	edx, [esp+58h+var_44]
jmp	short loc_834519

loc_8344B5:
cmp	[esp+58h+var_40], 1
jz	loc_8346A4
cmp	ecx, 100h
jnz	short loc_8344E4
or	eax, 0FFFFFFFFh
mov	[esi], eax
mov	[esi+4], eax
mov	[esi+8], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
mov	[esi+14h], eax
mov	[esi+18h], eax
mov	[esi+1Ch], eax
jmp	short loc_834519

loc_8344E4:		; "A reference to %s already exists"
mov	ecx, dword ptr ds:aAReferenceTo_0[ecx*4]
mov	eax, [ecx]
or	[esi], eax
mov	eax, [ecx+4]
or	[esi+4], eax
mov	eax, [ecx+8]
or	[esi+8], eax
mov	eax, [ecx+0Ch]
or	[esi+0Ch], eax
mov	eax, [ecx+10h]
or	[esi+10h], eax
mov	eax, [ecx+14h]
or	[esi+14h], eax
mov	eax, [ecx+18h]
or	[esi+18h], eax
mov	ecx, [ecx+1Ch]
or	[esi+1Ch], ecx

loc_834519:
cmp	edi, [esp+58h+arg_8]
jz	loc_8346A4
mov	ecx, [esp+58h+var_34]
jmp	loc_8343B3

loc_83452C:
cmp	edi, [esp+58h+arg_8]
jz	loc_8346A4
cmp	dword ptr [ecx+4], 0
jz	short loc_834546
push	esi
push	esi
call	sub_833F90
add	esp, 8

loc_834546:
mov	esi, [esp+58h+var_30]
jmp	loc_83465A

loc_83454F:		; jumptable 00834172 cases 6,9
cmp	ebx, [esp+58h+var_48]
jz	loc_834620	; default
			; jumptable 00834172 cases 2,3,8,11-26,28-54
mov	ecx, [esp+58h+var_48]
xor	eax, eax
cmp	dl, 2Ah
setnz	al
lea	edx, [esp+58h+arg_4]
lea	eax, [eax+eax+119h]
push	eax
push	ebx
push	ecx
push	edx
call	sub_834070
mov	ebp, [esp+68h+arg_4]
mov	[eax+10h], ebx
mov	[ebx+0Ch], eax
add	esp, 10h
lea	esi, [eax+0Ch]
mov	[esp+58h+var_2C], 0
mov	ebx, eax
jmp	loc_834656

loc_834598:		; jumptable 00834172 case 7
cmp	ebx, [esp+58h+var_48]
jz	loc_834620	; default
			; jumptable 00834172 cases 2,3,8,11-26,28-54
mov	eax, ebp
add	ebp, 18h
lea	edx, [eax+0Ch]
mov	[esp+58h+arg_4], ebp
mov	dword ptr [eax], 11Ah
mov	[eax+4], ecx
mov	[eax+8], ecx
mov	[edx], ecx
mov	[eax+10h], ebx
cmp	esi, ecx
jz	short loc_8345C5
mov	[esi], eax

loc_8345C5:
mov	esi, [esp+58h+var_2C]
cmp	esi, ecx
jz	short loc_8345CF
mov	[esi], eax

loc_8345CF:
mov	esi, edx
mov	[esp+58h+var_2C], ecx
mov	ebx, eax
jmp	loc_834656

loc_8345DC:		; jumptable 00834172 case 27
cmp	ebx, [esp+58h+var_48]
jz	short loc_834620 ; default
			; jumptable 00834172 cases 2,3,8,11-26,28-54
mov	eax, [esp+58h+var_48]
push	11Ch
push	ebx
push	eax
lea	ecx, [esp+64h+arg_4]
push	ecx
call	sub_834070
mov	ebp, [esp+68h+arg_4]
mov	[eax+0Ch], ebx
lea	esi, [ebx+0Ch]
add	esp, 10h
lea	edx, [eax+10h]
mov	ebx, eax
jmp	short loc_834652

loc_83460B:		; jumptable 00834172 case 0
lea	eax, [edi+1]
cmp	eax, [esp+58h+arg_8]
jnz	short loc_834620 ; default
			; jumptable 00834172 cases 2,3,8,11-26,28-54
mov	ecx, [esp+58h+var_48]
or	dword ptr [ecx+4], 2
mov	edi, eax
jmp	short loc_83465B

loc_834620:		; default
movsx	ecx, byte ptr [edi] ; jumptable	00834172 cases 2,3,8,11-26,28-54
mov	eax, ebp
xor	edx, edx
add	ebp, 18h
mov	[eax], ecx
lea	ecx, [eax+0Ch]
mov	[esp+58h+arg_4], ebp
mov	[eax+4], edx
mov	[eax+8], edx
mov	[ecx], edx
mov	[eax+10h], edx
mov	ebx, eax
cmp	esi, edx
jz	short loc_834646
mov	[esi], eax

loc_834646:
mov	esi, [esp+58h+var_2C]
cmp	esi, edx
jz	short loc_834650
mov	[esi], eax

loc_834650:
mov	esi, ecx

loc_834652:
mov	[esp+58h+var_2C], edx

loc_834656:
mov	[esp+58h+var_30], esi

loc_83465A:
inc	edi

loc_83465B:
cmp	edi, [esp+58h+arg_8]
jnz	loc_834150
cmp	[esp+58h+var_3C], 0
jnz	short loc_8346A4
mov	eax, [esp+58h+var_48]

loc_834670:
xor	ecx, ecx
mov	dword ptr [ebp+0], 117h
mov	[ebp+4], ecx
mov	[ebp+8], ecx
mov	[ebp+0Ch], ecx
mov	[ebp+10h], ecx
cmp	esi, ecx
jz	short loc_83468B
mov	[esi], ebp

loc_83468B:
mov	edx, [esp+58h+var_2C]
cmp	edx, ecx
jz	short loc_834695
mov	[edx], ebp

loc_834695:
mov	edx, [esp+58h+var_38]
pop	edi
pop	esi
pop	ebp
mov	[eax+14h], edx
pop	ebx
add	esp, 48h
retn

loc_8346A4:
xor	eax, eax

loc_8346A6:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 48h
retn
sub_8340D0 endp

align 10h
off_8346B0 dd offset loc_83460B, offset	loc_834179 ; jump table	for switch statement
dd offset loc_83426B, offset loc_8342CE
dd offset loc_83454F, offset loc_834598
dd offset loc_834320, offset loc_8345DC
dd offset loc_83432D, offset loc_834620
byte_8346D8 db	    0,	   1,	  9,	 9 ; indirect table for	switch statement
db	2,     3,     4,     5
db	9,     4,     6,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     7
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     8



sub_834710 proc	near

var_334= dword ptr -334h
var_32D= byte ptr -32Dh
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_320= dword ptr -320h
var_31C= dword ptr -31Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 334h
mov	eax, [esp+334h+arg_0]
mov	ecx, [eax+4]
mov	edx, [eax+0Ch]
push	ebx
push	ebp
xor	ebx, ebx
push	esi
mov	esi, [esp+340h+arg_8]
and	ecx, 2
push	edi
mov	[esp+344h+var_32C], ebx
mov	[esp+344h+var_324], ecx

loc_83473B:
mov	[esp+344h+var_334], ebx

loc_83473F:
mov	ecx, [edx]

loc_834741:
lea	edi, [ecx-100h]
cmp	edi, 1Fh	; switch 32 cases
ja	loc_834989	; default
			; jumptable 00834757 cases 1-20,24
movzx	eax, ds:byte_834A7C[edi]
jmp	ds:off_834A50[eax*4] ; switch jump

loc_83475E:		; jumptable 00834757 case 23
cmp	[esp+344h+var_324], 0
jz	loc_834A22
cmp	ecx, 117h
jnz	loc_834A22
cmp	esi, [esp+344h+arg_C]
jz	loc_834A22

loc_834782:
lea	esi, [esp+ebx*8+344h+var_328]
xor	eax, eax

loc_834788:
cmp	ebx, eax
jz	loc_834A14
mov	edi, [esi+4]
mov	ecx, [edi]
cmp	ecx, 119h
jz	loc_8349E0
cmp	ecx, 11Ah
jz	loc_8349E0
cmp	ecx, 11Bh
jnz	loc_8349D5
cmp	[esp+344h+var_32C], eax
jz	loc_8349C3
dec	ebx
mov	[esp+344h+var_32C], eax
mov	[edi+4], eax
mov	[esp+344h+var_334], ebx
sub	esi, 8
jmp	short loc_834788

loc_8347D4:		; jumptable 00834757 case 22
mov	ecx, [edx+8]
mov	al, [ecx]
mov	cl, [ecx+4]
mov	[esp+344h+var_32D], cl
mov	ecx, [esp+344h+arg_4]
movzx	ecx, byte ptr [ecx+esi]
movsx	ebp, al
mov	edi, 1
cmp	ecx, ebp
jnz	short loc_834782
mov	ebp, [esp+344h+arg_C]
inc	esi
cmp	esi, ebp
jnb	loc_8349A5
mov	cl, [esp+344h+var_32D]
jmp	short loc_834810
align 10h

loc_834810:
mov	ebx, [esp+344h+arg_4]
mov	bl, [ebx+esi]
cmp	bl, cl
jnz	short loc_834826
cmp	edi, 1
jz	short loc_834839
dec	edi
jmp	short loc_83482B

loc_834826:
cmp	bl, al
jnz	short loc_83482B
inc	edi

loc_83482B:
inc	esi
cmp	esi, ebp
jb	short loc_834810
mov	ebx, [esp+344h+var_334]
jmp	loc_8349A5

loc_834839:
mov	ebx, [esp+344h+var_334]
xor	edi, edi
jmp	loc_8349A5

loc_834844:		; jumptable 00834757 cases 25,26
mov	ecx, [edx+4]
test	ecx, ecx
jz	short loc_834857
inc	ecx
mov	[edx+4], ecx
mov	edx, [edx+10h]
jmp	loc_83473F

loc_834857:
mov	[esp+ebx*8+344h+var_31C], edx
mov	dword ptr [edx+4], 1
mov	edx, [edx+10h]
mov	[esp+ebx*8+344h+var_320], esi
inc	ebx
jmp	loc_83473B

loc_83486F:		; jumptable 00834757 case 27
cmp	dword ptr [edx+4], 0
jz	short loc_834889
mov	edx, [edx+0Ch]
mov	[esp+ebx*8+344h+var_328], esi
mov	[esp+344h+var_32C], 0
jmp	loc_83473F

loc_834889:
mov	dword ptr [edx+4], 1

loc_834890:		; jumptable 00834757 case 28
mov	[esp+ebx*8+344h+var_31C], edx
mov	edx, [edx+0Ch]
mov	[esp+ebx*8+344h+var_320], esi
inc	ebx
jmp	loc_83473B

loc_8348A1:		; jumptable 00834757 case 29
mov	eax, [edx+4]
mov	ecx, [esp+344h+arg_10]
mov	edi, [ecx+eax*8-8]
lea	ecx, [ecx+eax*8-8]
mov	ecx, [ecx+4]
sub	ecx, edi
lea	ebp, [ecx+esi]
cmp	ebp, [esp+344h+arg_C]
ja	loc_834782
mov	eax, [esp+344h+arg_4]
add	esi, eax
add	edi, eax
cmp	ecx, 4
jb	short loc_8348F8
jmp	short loc_8348E0
align 10h

loc_8348E0:
mov	eax, [edi]
cmp	eax, [esi]
jnz	loc_834782
sub	ecx, 4
add	esi, 4
add	edi, 4
cmp	ecx, 4
jnb	short loc_8348E0

loc_8348F8:
test	ecx, ecx
jz	short loc_834928
mov	al, [esi]
cmp	al, [edi]
jnz	loc_834782
cmp	ecx, 1
jbe	short loc_834928
mov	al, [esi+1]
cmp	al, [edi+1]
jnz	loc_834782
cmp	ecx, 2
jbe	short loc_834928
mov	cl, [esi+2]
cmp	cl, [edi+2]
jnz	loc_834782

loc_834928:
mov	edx, [edx+0Ch]
mov	esi, ebp
jmp	loc_83473F

loc_834932:		; jumptable 00834757 case 30
mov	eax, [edx+4]
mov	ecx, [esp+344h+arg_10]
lea	ecx, [ecx+eax*8-8]
mov	[ecx], esi
mov	dword ptr [ecx+4], 0FFFFFFFFh
mov	edx, [edx+0Ch]
jmp	loc_83473F

loc_834951:		; jumptable 00834757 case 31
mov	eax, [edx+4]
mov	ecx, [esp+344h+arg_10]
mov	[ecx+eax*8-4], esi
mov	edx, [edx+0Ch]
jmp	loc_83473F

loc_834967:		; jumptable 00834757 case 21
mov	eax, [esp+344h+arg_4]
movzx	ecx, byte ptr [eax+esi]
mov	edi, [edx+8]
mov	eax, ecx
shr	eax, 5
mov	edi, [edi+eax*4]
and	ecx, 1Fh
shr	edi, cl
not	edi
and	edi, 1
jmp	short loc_8349A5

loc_834989:		; default
mov	eax, [esp+344h+arg_4] ;	jumptable 00834757 cases 1-20,24
movzx	eax, byte ptr [eax+esi]
mov	[esp+344h+var_328], edx
xor	edx, edx
cmp	eax, ecx
setnz	dl
mov	edi, edx
mov	edx, [esp+344h+var_328]

loc_8349A5:
test	edi, edi
jnz	loc_834782

loc_8349AD:		; jumptable 00834757 case 0
cmp	esi, [esp+344h+arg_C]
jz	loc_834782
mov	edx, [edx+0Ch]
inc	esi
jmp	loc_83473F

loc_8349C3:
mov	edx, [edi+10h]
mov	esi, [esi]
mov	[esp+344h+var_32C], 1
jmp	loc_83473F

loc_8349D5:
mov	edx, [edi+10h]
mov	esi, [esi]
dec	ebx
jmp	loc_83473B

loc_8349E0:
mov	ebx, [edi+4]
mov	edx, [edi+0Ch]
mov	eax, [esi]
mov	ecx, [edx]
lea	esi, [eax+ebx-1]
cmp	ebx, 1
jnz	short loc_834A07
dec	[esp+344h+var_334]
mov	ebx, [esp+344h+var_334]
mov	dword ptr [edi+4], 0
jmp	loc_834741

loc_834A07:
dec	ebx
mov	[edi+4], ebx
mov	ebx, [esp+344h+var_334]
jmp	loc_834741

loc_834A14:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
add	esp, 334h
retn

loc_834A22:
test	ebx, ebx
jz	short loc_834A40
jmp	short loc_834A30
align 10h

loc_834A30:
mov	ecx, [esp+ebx*8+344h+var_324]
sub	ebx, 1
mov	dword ptr [ecx+4], 0
jnz	short loc_834A30

loc_834A40:
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 334h
retn
sub_834710 endp

align 10h
off_834A50 dd offset loc_8349AD	; jump table for switch	statement
dd offset loc_834967
dd offset loc_8347D4
dd offset loc_83475E
dd offset loc_834844
dd offset loc_83486F
dd offset loc_834890
dd offset loc_8348A1
dd offset loc_834932
dd offset loc_834951
dd offset loc_834989
byte_834A7C db	    0,	 0Ah,	0Ah,   0Ah ; indirect table for	switch statement
db    0Ah,   0Ah,   0Ah,   0Ah
db    0Ah,   0Ah,   0Ah,   0Ah
db    0Ah,   0Ah,   0Ah,   0Ah
db    0Ah,   0Ah,   0Ah,   0Ah
db    0Ah,     1,     2,     3
db    0Ah,     4,     4,     5
db	6,     7,     8,     9
align 10h



sub_834AA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+4]
push	ebp
push	esi
mov	esi, [esp+0Ch+arg_8]
push	edi
mov	edi, [esp+10h+arg_C]
and	eax, 1
dec	edi
mov	[esp+10h+arg_0], eax
cmp	esi, edi
ja	short loc_834AEC
mov	ebp, [esp+10h+arg_18]
jmp	short loc_834AC9

loc_834AC5:
mov	eax, [esp+10h+arg_0]

loc_834AC9:
test	esi, esi
jbe	short loc_834AD1
test	eax, eax
jnz	short loc_834AEC

loc_834AD1:
mov	eax, [esp+10h+arg_4]
push	ebp
push	edi
push	esi
push	eax
push	ebx
call	sub_834710
add	esp, 14h
cmp	eax, 0FFFFFFFFh
jnz	short loc_834AF3
inc	esi
cmp	esi, edi
jbe	short loc_834AC5

loc_834AEC:
pop	edi
pop	esi
pop	ebp
xor	eax, eax
pop	ebx
retn

loc_834AF3:
mov	ecx, [esp+10h+arg_10]
mov	edx, [esp+10h+arg_14]
pop	edi
mov	[ecx], esi
pop	esi
pop	ebp
mov	[edx], eax
mov	eax, 1
pop	ebx
retn
sub_834AA0 endp

align 10h



sub_834B10 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	1		; int
push	offset off_1469250 ; int
push	offset aCoroutine ; "coroutine"
push	eax		; int
call	sub_81A860
add	esp, 10h
mov	eax, 1
retn
sub_834B10 endp

align 10h



sub_834B30 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
push	edi
cmp	eax, ecx
jnb	short loc_834B5C
mov	edx, [eax]
cmp	edx, 0Ah
jz	short loc_834B4C
cmp	edx, 9
jnz	short loc_834B5C

loc_834B4C:
cmp	eax, ecx
jnb	short loc_834B55
cmp	edx, 0Ah
jz	short loc_834B5C

loc_834B55:
mov	eax, 1
jmp	short loc_834B5E

loc_834B5C:
xor	eax, eax

loc_834B5E:		; "Lua function	expected"
push	offset aLuaFunctionExp
push	1
push	eax
push	esi
call	sub_81AB40
push	esi
call	sub_81B500
mov	edx, [esi+20h]
mov	ecx, [esi+1Ch]
mov	edi, [edx]
mov	[ecx], edi
mov	edx, [edx+4]
push	1
mov	[ecx+4], edx
push	eax
add	ecx, 8
push	esi
mov	[esi+1Ch], ecx
call	sub_81BF20
add	esp, 20h
pop	edi
mov	eax, 1
pop	esi
retn
sub_834B30 endp

align 10h



sub_834BA0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebp
mov	ebp, [esp+4+arg_8]
push	esi
mov	esi, [esp+8+arg_4]
push	ebp
push	esi
call	sub_81B6A0
add	esp, 8
test	eax, eax
jnz	short loc_834BCD
mov	eax, [esp+8+arg_0]
push	offset aCanTResumeCoro ; "can't resume coroutine(out of memory)"
push	eax
call	sub_81A760
add	esp, 8
pop	esi
pop	ebp
retn

loc_834BCD:
push	ebx
mov	ebx, [esp+0Ch+arg_0]
cmp	esi, ebx
jnz	short loc_834BEB
push	offset aCannotResumeRu ; "cannot resume	running	coroutine"
push	ebx
call	sub_81C070
add	esp, 8
pop	ebx
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn

loc_834BEB:
push	esi
call	sub_81BF10
add	esp, 4
cmp	eax, 0FFFFFFFEh
jz	short loc_834C20
test	eax, eax
jnz	short loc_834C0B
mov	ecx, [esi+1Ch]
sub	ecx, [esi+20h]
test	ecx, 0FFFFFFF8h
jnz	short loc_834C20

loc_834C0B:		; "cannot resume a dead	coroutine"
push	offset aCannotResumeAD
push	ebx
call	sub_81C070
add	esp, 8
pop	ebx
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn

loc_834C20:
push	ebp
push	esi
push	ebx
call	sub_81BF20
push	ebp
push	esi
call	sub_81C850
add	esp, 14h
test	eax, eax
jz	short loc_834C4E
cmp	eax, 0FFFFFFFEh
jz	short loc_834C4E
push	1
push	ebx
push	esi
call	sub_81BF20
add	esp, 0Ch
pop	ebx
pop	esi
or	eax, 0FFFFFFFFh
pop	ebp
retn

loc_834C4E:
push	edi
mov	edi, [esi+1Ch]
sub	edi, [esi+20h]
push	ebp
push	ebx
sar	edi, 3
call	sub_81B6A0
add	esp, 8
test	eax, eax
jnz	short loc_834C79
push	offset aTooManyResults ; "too many results from	coroutine (out of"...
push	ebx
call	sub_81A760
add	esp, 8
pop	edi
pop	ebx
pop	esi
pop	ebp
retn

loc_834C79:
push	edi
push	ebx
push	esi
call	sub_81BF20
add	esp, 0Ch
mov	eax, edi
pop	edi
pop	ebx
pop	esi
pop	ebp
retn
sub_834BA0 endp

align 10h



sub_834C90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+20h]
push	edi
cmp	eax, [esi+1Ch]
jb	short loc_834CA2
xor	edi, edi
jmp	short loc_834CB0

loc_834CA2:
cmp	dword ptr [eax], 8
jnz	short loc_834CAC
mov	eax, [eax+4]
jmp	short loc_834CAE

loc_834CAC:
xor	eax, eax

loc_834CAE:
mov	edi, eax

loc_834CB0:		; "a thread expected"
push	offset aAThreadExpecte
push	1
push	edi
push	esi
call	sub_81AB40
mov	eax, [esi+1Ch]
sub	eax, [esi+20h]
sar	eax, 3
dec	eax
push	eax
push	edi
push	esi
call	sub_834BA0
mov	edi, eax
mov	eax, [esi+1Ch]
add	esp, 1Ch
mov	dword ptr [eax], 1
test	edi, edi
jge	short loc_834D12
mov	dword ptr [eax+4], 0
add	eax, 8
mov	[esi+1Ch], eax
mov	edi, [eax-10h]
mov	ecx, [eax-8]
mov	edx, [eax-4]
mov	[eax-8], edi
mov	edi, [eax-0Ch]
mov	[eax-4], edi
mov	[eax-10h], ecx
mov	[eax-0Ch], edx
mov	[esi+1Ch], eax
pop	edi
mov	eax, 2
pop	esi
retn

loc_834D12:
mov	dword ptr [eax+4], 1
add	eax, 8
mov	[esi+1Ch], eax
or	eax, 0FFFFFFFFh
sub	eax, edi
push	eax
push	esi
call	sub_4E3E50
add	esp, 8
lea	eax, [edi+1]
pop	edi
pop	esi
retn
sub_834C90 endp

align 10h



sub_834D40 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 8
mov	[ecx+4], eax
mov	edx, [eax]
push	ebx
xor	ebx, ebx
cmp	[edx+2B8h], eax
setz	bl
add	ecx, 8
mov	[eax+1Ch], ecx
mov	edx, ebx
pop	ebx
test	edx, edx
jz	short loc_834D7E
add	dword ptr [eax+1Ch], 0FFFFFFF8h
mov	ecx, [eax+1Ch]
mov	dword ptr [ecx], 0
add	ecx, 8
mov	[eax+1Ch], ecx

loc_834D7E:
mov	eax, 1
retn
sub_834D40 endp

align 10h



sub_834D90 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	8
push	1
push	esi
call	sub_81ACD0
mov	eax, [esi+20h]
add	esp, 0Ch
cmp	eax, [esi+1Ch]
jnb	short loc_834DB4
cmp	dword ptr [eax], 8
jnz	short loc_834DB4
mov	eax, [eax+4]
jmp	short loc_834DB6

loc_834DB4:
xor	eax, eax

loc_834DB6:
push	eax
push	esi
call	sub_81BF70
push	eax
push	esi
call	sub_81C070
add	esp, 10h
mov	eax, 1
pop	esi
retn
sub_834D90 endp

align 10h



sub_834DD0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
mov	edx, [edi+20h]
cmp	dword ptr [edx-8], 0Ah
jnz	short loc_834DEF
mov	eax, [edx-4]
add	eax, 14h
cmp	dword ptr [eax], 8
jnz	short loc_834DF3
mov	eax, [eax+4]
jmp	short loc_834DF5

loc_834DEF:
xor	ecx, ecx
jmp	short loc_834DF7

loc_834DF3:
xor	eax, eax

loc_834DF5:
mov	ecx, eax

loc_834DF7:
mov	eax, [edi+1Ch]
sub	eax, edx
sar	eax, 3
push	eax
push	ecx
push	edi
call	sub_834BA0
mov	esi, eax
add	esp, 0Ch
test	esi, esi
jge	short loc_834E19
push	edi
call	sub_81C0E0
add	esp, 4

loc_834E19:
pop	edi
mov	eax, esi
pop	esi
retn
sub_834DD0 endp

align 10h



sub_834E20 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	6
push	1
push	esi
call	sub_81ACD0
mov	ecx, [esi+20h]
mov	eax, [esi+1Ch]
add	ecx, 8
add	esp, 0Ch
cmp	eax, ecx
jnb	short loc_834E4D

loc_834E40:
mov	dword ptr [eax], 0
add	eax, 8
cmp	eax, ecx
jb	short loc_834E40

loc_834E4D:
push	esi
mov	[esi+1Ch], ecx
call	sub_81B500
mov	edx, [esi+20h]
mov	ecx, [esi+1Ch]
mov	edi, [edx]
mov	[ecx], edi
mov	edx, [edx+4]
push	1
mov	[ecx+4], edx
push	eax
add	ecx, 8
push	esi
mov	[esi+1Ch], ecx
call	sub_81BF20
push	1
push	1
push	offset sub_834DD0
push	esi
call	sub_81B920
add	esp, 20h
pop	edi
mov	eax, 1
pop	esi
retn
sub_834E20 endp

align 10h



sub_834E90 proc	near

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
mov	eax, [ecx+1Ch]
sub	eax, [ecx+20h]
sar	eax, 3
push	eax
push	ecx
call	sub_81BE70
add	esp, 8
retn
sub_834E90 endp

align 10h



sub_834EB0 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	eax, [ebx+20h]
mov	edx, [ebx+1Ch]
push	ebp
mov	ebp, ebx
cmp	eax, edx
jnb	short loc_834EFE
cmp	dword ptr [eax], 8
jnz	short loc_834EFE
cmp	eax, edx
jnb	short loc_834ED5
cmp	dword ptr [eax], 8
jnz	short loc_834ED5
mov	ebp, [eax+4]
jmp	short loc_834ED7

loc_834ED5:
xor	ebp, ebp

loc_834ED7:
mov	ecx, edx
sub	ecx, eax
sar	ecx, 3
neg	ecx
jns	short loc_834EF8
push	esi
push	edi
lea	edi, [edx+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd
pop	edi
pop	esi

loc_834EF8:
add	edx, 0FFFFFFF8h
mov	[ebx+1Ch], edx

loc_834EFE:
push	0
push	0FFFFFFFFh
push	ebx
call	sub_81ABE0
push	eax
push	ebp
call	sub_81B300
add	esp, 14h
pop	ebp
xor	eax, eax
pop	ebx
retn
sub_834EB0 endp

align 10h



sub_834F20 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
mov	ecx, [ebx+1Ch]
mov	eax, [ebx+20h]
mov	edx, ecx
sub	edx, eax
push	ebp
mov	ebp, ebx
test	edx, 0FFFFFFF8h
jle	short loc_834F9A
cmp	eax, ecx
jb	short loc_834F42
xor	eax, eax
jmp	short loc_834F4C

loc_834F42:
xor	ecx, ecx
cmp	dword ptr [eax], 8
setz	cl
mov	eax, ecx

loc_834F4C:		; "coroutine expected"
push	offset aCoroutineExpec
push	1
push	eax
push	ebx
call	sub_81AB40
mov	eax, [ebx+20h]
mov	edx, [ebx+1Ch]
add	esp, 10h
cmp	eax, edx
jnb	short loc_834F71
cmp	dword ptr [eax], 8
jnz	short loc_834F71
mov	ebp, [eax+4]
jmp	short loc_834F73

loc_834F71:
xor	ebp, ebp

loc_834F73:
mov	ecx, edx
sub	ecx, eax
sar	ecx, 3
neg	ecx
jns	short loc_834F94
push	esi
push	edi
lea	edi, [edx+ecx*8]
neg	ecx
and	ecx, 1FFFFFFFh
lea	esi, [edi+8]
add	ecx, ecx
rep movsd
pop	edi
pop	esi

loc_834F94:
add	edx, 0FFFFFFF8h
mov	[ebx+1Ch], edx

loc_834F9A:
push	ebp
call	sub_81B350
push	eax
push	ebx
call	sub_81C070
add	esp, 0Ch
pop	ebp
mov	eax, 1
pop	ebx
retn
sub_834F20 endp

align 10h



sub_834FC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
mov	[ecx+0Ch], eax
mov	eax, [esp+arg_4]
mov	[ecx+8], eax
mov	[ecx+4], eax
xor	eax, eax
or	edx, 0FFFFFFFFh
mov	dword ptr [ecx], 0FFFFFFFEh
mov	dword ptr [ecx+14h], 0FFFFFFFEh
mov	[ecx+18h], al
mov	[ecx+1Ch], edx
mov	[ecx+20h], eax
mov	[ecx+24h], edx
mov	[ecx+10h], al
retn	8
sub_834FC0 endp

align 10h



sub_835000 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+4], eax
retn	4
sub_835000 endp

align 10h



; int __thiscall sub_835010(void *, char)
sub_835010 proc	near

arg_0= byte ptr	 4

test	[esp+arg_0], 1
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1469694
jz	short loc_835029
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_835029:
mov	eax, esi
pop	esi
retn	4
sub_835010 endp

align 10h



sub_835030 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, [esp+8+arg_4]
push	edi
push	esi
push	ebx
call	sub_82CB80
mov	eax, [esi+8]
add	esp, 8
test	eax, eax
jz	short loc_835056
push	eax
push	ebx
call	sub_82CB80
add	esp, 8

loc_835056:
mov	eax, [esi+28h]
test	eax, eax
jz	short loc_835067
push	eax
push	ebx
call	sub_82CB80
add	esp, 8

loc_835067:
mov	eax, [esi+10h]
test	eax, eax
jz	short loc_835078
push	eax
push	ebx
call	sub_82CB80
add	esp, 8

loc_835078:
mov	eax, [esi+18h]
test	eax, eax
jz	short loc_835089
push	eax
push	ebx
call	sub_82CB80
add	esp, 8

loc_835089:
mov	eax, [esi+40h]
test	eax, eax
jz	short loc_83509A
push	eax
push	ebx
call	sub_82CB80
add	esp, 8

loc_83509A:
mov	eax, [esi+30h]
test	eax, eax
jz	short loc_8350AB
push	eax
push	ebx
call	sub_82CB80
add	esp, 8

loc_8350AB:
xor	edi, edi
cmp	[esi+14h], edi
jbe	short loc_8350C8

loc_8350B2:
mov	eax, [esi+18h]
mov	ecx, [eax+edi*4]
push	ecx
push	ebx
call	sub_835030
inc	edi
add	esp, 8
cmp	edi, [esi+14h]
jb	short loc_8350B2

loc_8350C8:
pop	edi
pop	esi
pop	ebx
retn
sub_835030 endp

align 10h



sub_8350D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+958Ch], eax
retn	4
sub_8350D0 endp

align 10h



sub_8350E0 proc	near

var_10=	dword ptr -10h
var_8= qword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
push	esi
mov	esi, [esp+0Ch+arg_4]
cmp	dword ptr [esi], 5
jnz	short loc_835169 ; jumptable 0083512B case 8
or	ecx, 0FFFFFFFFh
cmp	[esi+0Ch], ecx
jnz	short loc_835169 ; jumptable 0083512B case 8
cmp	[esi+10h], ecx
jnz	short loc_835169 ; jumptable 0083512B case 8
mov	eax, [esp+0Ch+arg_8]
cmp	dword ptr [eax], 5
jnz	short loc_835169 ; jumptable 0083512B case 8
cmp	[eax+0Ch], ecx
jnz	short loc_835169 ; jumptable 0083512B case 8
cmp	[eax+10h], ecx
jnz	short loc_835169 ; jumptable 0083512B case 8
fld	dword ptr [esi+4]
fstp	[esp+0Ch+arg_8]
fld	dword ptr [eax+4]
mov	eax, [esp+0Ch+arg_0]
add	eax, 0FFFFFFF4h
fstp	[esp+0Ch+arg_4]
cmp	eax, 8		; switch 9 cases
ja	loc_8351D0	; default
			; jumptable 0083512B case 7
jmp	ds:off_8351F8[eax*4] ; switch jump

loc_835132:		; jumptable 0083512B case 0
fld	[esp+0Ch+arg_4]
fadd	[esp+0Ch+arg_8]
jmp	loc_8351D2

loc_83513F:		; jumptable 0083512B case 1
fld	[esp+0Ch+arg_8]
fsub	[esp+0Ch+arg_4]
jmp	loc_8351D2

loc_83514C:		; jumptable 0083512B case 2
fld	[esp+0Ch+arg_4]
fmul	[esp+0Ch+arg_8]
jmp	short loc_8351D2

loc_835156:		; jumptable 0083512B case 3
fldz
fld	[esp+0Ch+arg_4]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jp	short loc_835172

loc_835167:
fstp	st

loc_835169:		; jumptable 0083512B case 8
xor	eax, eax
pop	esi
add	esp, 8
retn	0Ch

loc_835172:
fdivr	[esp+0Ch+arg_8]
jmp	short loc_8351D2

loc_835178:		; jumptable 0083512B case 4
fldz
fld	[esp+0Ch+arg_4]
fucom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 44h
jnp	short loc_835167
fld	[esp+0Ch+arg_8]
push	ecx		; float
fst	[esp+10h+var_8]
fdivrp	st(1), st
fstp	[esp+10h+arg_8]
fld	[esp+10h+arg_8]
fstp	[esp+10h+var_10]
call	sub_4D4F00
fmul	[esp+10h+arg_4]
add	esp, 4
fsubr	[esp+0Ch+var_8]
jmp	short loc_8351D2

loc_8351B1:		; jumptable 0083512B case 5
fld	[esp+0Ch+arg_8]
fld	[esp+0Ch+arg_4]
call	__CIpow
fstp	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_4]
jmp	short loc_8351D2

loc_8351C8:		; jumptable 0083512B case 6
fld	[esp+0Ch+arg_8]
fchs
jmp	short loc_8351D2

loc_8351D0:		; default
fldz			; jumptable 0083512B case 7

loc_8351D2:
fstp	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_4]
fld	st
fld	st
fucompp
fnstsw	ax
test	ah, 44h
jp	short loc_835167
fstp	dword ptr [esi+4]
mov	eax, 1
pop	esi
add	esp, 8
retn	0Ch
sub_8350E0 endp

align 4
off_8351F8 dd offset loc_835132	; jump table for switch	statement
dd offset loc_83513F
dd offset loc_83514C
dd offset loc_835156
dd offset loc_835178
dd offset loc_8351B1
dd offset loc_8351C8
dd offset loc_8351D0
dd offset loc_835169
align 10h



sub_835220 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+58h]
xor	ebp, ebp
xor	ebx, ebx
test	esi, esi
jz	short loc_835261

loc_835231:
lea	eax, [esi+44h]
mov	ecx, esi
mov	esi, [eax]
cmp	ebx, 1
jnz	short loc_835248
mov	dword ptr [eax], 0
lea	ebp, [ebx+1]
jmp	short loc_83525C

loc_835248:
cmp	ebx, 2
jb	short loc_83525B
mov	eax, [edi]
push	ecx
push	eax
call	sub_82C6D0
add	esp, 8
jmp	short loc_83525C

loc_83525B:
inc	ebp

loc_83525C:
inc	ebx
test	esi, esi
jnz	short loc_835231

loc_835261:
lea	eax, [edi+8]
mov	dword ptr [edi+68h], 0
mov	[edi+5Ch], eax
mov	ecx, [eax+40h]
lea	edx, ds:0[ebp*8]
mov	[edi+64h], ecx
mov	dword ptr [edi+60h], 0
mov	[edi+6Ch], edx
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_835220 endp

align 10h



sub_835290 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [ecx+218h]
push	edi
mov	edi, [ecx+228h]
xor	ebx, ebx
cmp	edi, 40h
jbe	short loc_8352DE
push	ebp
mov	ebp, [esp+10h+arg_0]
jmp	short loc_8352B0
align 10h

loc_8352B0:
mov	eax, [esi+200h]
push	200h
push	eax
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	esi, [esi+204h]
add	ebx, 40h
mov	ecx, edi
sub	ecx, ebx
add	esp, 0Ch
add	ebp, 200h
cmp	ecx, 40h
ja	short loc_8352B0
pop	ebp

loc_8352DE:
mov	edx, [esi+200h]
mov	eax, [esp+0Ch+arg_0]
sub	edi, ebx
add	edi, edi
add	edi, edi
add	edi, edi
push	edi
push	edx
lea	ecx, [eax+ebx*8]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	8
sub_835290 endp

align 10h



sub_835310 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [ecx+818h]
push	edi
mov	edi, [ecx+828h]
xor	ebx, ebx
cmp	edi, 200h
jbe	short loc_835364
push	ebp
mov	ebp, [esp+10h+arg_0]
mov	edi, edi

loc_835330:
mov	eax, [esi+800h]
push	800h
push	eax
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	esi, [esi+804h]
add	ebx, 200h
mov	ecx, edi
sub	ecx, ebx
add	esp, 0Ch
add	ebp, 800h
cmp	ecx, 200h
ja	short loc_835330
pop	ebp

loc_835364:
mov	edx, [esi+800h]
mov	eax, [esp+0Ch+arg_0]
sub	edi, ebx
add	edi, edi
add	edi, edi
push	edi
push	edx
lea	ecx, [eax+ebx*4]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	8
sub_835310 endp

align 10h



sub_835390 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+81Ch]
mov	ecx, [esi+820h]
mov	edx, [eax+800h]
push	edi
cmp	ecx, edx
jbe	short loc_8353CF
lea	edi, [edx+800h]
cmp	ecx, edi
jnb	short loc_8353CD
add	dword ptr [esi+824h], 0FFFFFFFCh
add	ecx, 0FFFFFFFCh
dec	dword ptr [esi+828h]
pop	edi
mov	[esi+820h], ecx
pop	esi
retn

loc_8353CD:
cmp	ecx, edx

loc_8353CF:
jnz	short loc_835416
mov	eax, [eax+808h]
test	eax, eax
jz	short loc_8353FC
mov	eax, [eax+800h]
add	dword ptr [esi+824h], 0FFFFFFFCh
add	eax, 7FCh
dec	dword ptr [esi+828h]
pop	edi
mov	[esi+820h], eax
pop	esi
retn

loc_8353FC:
add	dword ptr [esi+824h], 0FFFFFFFCh
dec	dword ptr [esi+828h]
pop	edi
mov	dword ptr [esi+820h], 0
pop	esi
retn

loc_835416:
mov	edx, [eax+808h]
test	edx, edx
jz	loc_8354AC
mov	edi, [edx+800h]
add	edi, 7FCh
cmp	edi, ecx
jnz	short loc_8354AC
add	ecx, 0FFFFFFFCh
mov	[esi+820h], ecx
mov	ecx, [edx+800h]
add	ecx, 7FCh
mov	[esi+824h], ecx
xor	ecx, ecx
test	eax, eax
jz	short loc_835491

loc_835455:
cmp	ecx, 2
jnb	short loc_835467
mov	eax, [eax+804h]
inc	ecx
test	eax, eax
jnz	short loc_835455
jmp	short loc_835491

loc_835467:
test	eax, eax
jz	short loc_835491
mov	edx, [eax+808h]
push	eax
mov	dword ptr [edx+804h], 0
mov	eax, [esi]
push	eax
call	sub_82C6D0
add	esp, 8
add	dword ptr [esi+82Ch], 0FFFFFE00h

loc_835491:
mov	ecx, [esi+81Ch]
mov	edx, [ecx+808h]
dec	dword ptr [esi+828h]
pop	edi
mov	[esi+81Ch], edx
pop	esi
retn

loc_8354AC:		; Trap to Debugger
int	3
dec	dword ptr [esi+828h]
pop	edi
pop	esi
retn
sub_835390 endp

align 10h



sub_8354C0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, [ecx+38h]
push	edi
mov	edi, [ecx+48h]
xor	ebx, ebx
cmp	edi, 8
jbe	short loc_8354F7
push	ebp
mov	ebp, [esp+10h+arg_0]

loc_8354D5:
mov	eax, [esi+20h]
push	20h
push	eax
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	esi, [esi+24h]
add	ebx, 8
mov	ecx, edi
sub	ecx, ebx
add	esp, 0Ch
add	ebp, 20h
cmp	ecx, 8
ja	short loc_8354D5
pop	ebp

loc_8354F7:
mov	edx, [esi+20h]
mov	eax, [esp+0Ch+arg_0]
sub	edi, ebx
add	edi, edi
add	edi, edi
push	edi
push	edx
lea	ecx, [eax+ebx*4]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	8
sub_8354C0 endp

align 10h



sub_835520 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [ecx+328h]
push	esi
mov	esi, [ecx+318h]
push	edi
xor	edi, edi
cmp	ebx, 40h
jbe	short loc_83556E
push	ebp
mov	ebp, [esp+10h+arg_0]
jmp	short loc_835540
align 10h

loc_835540:
mov	eax, [esi+300h]
push	300h
push	eax
push	ebp
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	esi, [esi+304h]
add	edi, 40h
mov	ecx, ebx
sub	ecx, edi
add	esp, 0Ch
add	ebp, 300h
cmp	ecx, 40h
ja	short loc_835540
pop	ebp

loc_83556E:
mov	eax, [esi+300h]
sub	ebx, edi
lea	edx, [ebx+ebx*2]
add	edx, edx
add	edx, edx
push	edx
mov	edx, [esp+10h+arg_0]
push	eax
lea	ecx, [edi+edi*2]
lea	eax, [edx+ecx*4]
push	eax
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn	8
sub_835520 endp

align 10h



sub_8355A0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+927Ch]
mov	ecx, [esi+9280h]
mov	edx, [eax+9260h]
push	edi
cmp	ecx, edx
jbe	short loc_8355E5
lea	edi, [edx+9260h]
cmp	ecx, edi
jnb	short loc_8355E3
add	dword ptr [esi+9284h], 0FFFFDB68h
add	ecx, 0FFFFDB68h
dec	dword ptr [esi+9288h]
pop	edi
mov	[esi+9280h], ecx
pop	esi
retn

loc_8355E3:
cmp	ecx, edx

loc_8355E5:
jnz	short loc_835632
mov	eax, [eax+9268h]
test	eax, eax
jz	short loc_835615
mov	eax, [eax+9260h]
add	dword ptr [esi+9284h], 0FFFFDB68h
add	eax, 6DC8h
dec	dword ptr [esi+9288h]
pop	edi
mov	[esi+9280h], eax
pop	esi
retn

loc_835615:
add	dword ptr [esi+9284h], 0FFFFDB68h
dec	dword ptr [esi+9288h]
pop	edi
mov	dword ptr [esi+9280h], 0
pop	esi
retn

loc_835632:
mov	edx, [eax+9268h]
test	edx, edx
jz	loc_8356C8
mov	edi, [edx+9260h]
add	edi, 6DC8h
cmp	edi, ecx
jnz	short loc_8356C8
add	ecx, 0FFFFDB68h
mov	[esi+9280h], ecx
mov	ecx, [edx+9260h]
add	ecx, 6DC8h
mov	[esi+9284h], ecx
xor	ecx, ecx
test	eax, eax
jz	short loc_8356AD

loc_835674:
cmp	ecx, 4
jnb	short loc_835686
mov	eax, [eax+9264h]
inc	ecx
test	eax, eax
jnz	short loc_835674
jmp	short loc_8356AD

loc_835686:
test	eax, eax
jz	short loc_8356AD
mov	edx, [eax+9268h]
push	eax
mov	dword ptr [edx+9264h], 0
mov	eax, [esi]
push	eax
call	sub_82C6D0
add	esp, 8
add	dword ptr [esi+928Ch], 0FFFFFFFCh

loc_8356AD:
mov	ecx, [esi+927Ch]
mov	edx, [ecx+9268h]
dec	dword ptr [esi+9288h]
pop	edi
mov	[esi+927Ch], edx
pop	esi
retn

loc_8356C8:		; Trap to Debugger
int	3
dec	dword ptr [esi+9288h]
pop	edi
pop	esi
retn
sub_8355A0 endp

align 10h



sub_8356E0 proc	near
mov	eax, [ecx+8]
push	esi
xor	esi, esi
cmp	eax, esi
jnz	short loc_8356EE
xor	eax, eax
pop	esi
retn

loc_8356EE:
mov	edx, [ecx+4]
push	edi
mov	edi, [edx+9260h]
add	edi, 6DC8h
cmp	eax, edi
pop	edi
jnz	short loc_835720
mov	eax, [edx+9264h]
cmp	eax, esi
jz	short loc_835718
mov	[ecx+4], eax
mov	eax, [eax+9260h]
jmp	short loc_835725

loc_835718:
mov	[ecx+8], esi
mov	[ecx+4], esi
jmp	short loc_83572B

loc_835720:
add	eax, 2498h

loc_835725:
inc	dword ptr [ecx+0Ch]
mov	[ecx+8], eax

loc_83572B:
mov	edx, [ecx]
mov	eax, [ecx+8]
cmp	eax, [edx+9284h]
jnz	short loc_83573E
mov	[ecx+8], esi
mov	[ecx+4], esi

loc_83573E:
mov	eax, [ecx+8]
pop	esi
retn
sub_8356E0 endp

align 10h



sub_835750 proc	near
mov	eax, [ecx+8]
test	eax, eax
jnz	short loc_835758
retn

loc_835758:
mov	edx, [ecx+4]
cmp	eax, [edx+9260h]
jnz	short loc_835794
mov	eax, [edx+9268h]
test	eax, eax
jz	short loc_835782
mov	[ecx+4], eax
mov	eax, [eax+9260h]
add	eax, 6DC8h
dec	dword ptr [ecx+0Ch]
mov	[ecx+8], eax
retn

loc_835782:
mov	dword ptr [ecx+8], 0
mov	eax, [ecx+8]
mov	dword ptr [ecx+4], 0
retn

loc_835794:
dec	dword ptr [ecx+0Ch]
add	eax, 0FFFFDB68h
mov	[ecx+8], eax
retn
sub_835750 endp




sub_8357A0 proc	near
mov	eax, [ecx+8]
test	eax, eax
jnz	short loc_8357A8
retn

loc_8357A8:
mov	edx, [ecx+4]
cmp	eax, [edx+400h]
jnz	short loc_8357E4
mov	eax, [edx+408h]
test	eax, eax
jz	short loc_8357D2
mov	[ecx+4], eax
mov	eax, [eax+400h]
add	eax, 3F0h
dec	dword ptr [ecx+0Ch]
mov	[ecx+8], eax
retn

loc_8357D2:
mov	dword ptr [ecx+8], 0
mov	eax, [ecx+8]
mov	dword ptr [ecx+4], 0
retn

loc_8357E4:
dec	dword ptr [ecx+0Ch]
add	eax, 0FFFFFFF0h
mov	[ecx+8], eax
retn
sub_8357A0 endp

align 10h



sub_8357F0 proc	near
mov	eax, [ecx+8]
test	eax, eax
jnz	short loc_8357F8
retn

loc_8357F8:
mov	edx, [ecx+4]
cmp	eax, [edx+140h]
jnz	short loc_835834
mov	eax, [edx+148h]
test	eax, eax
jz	short loc_835822
mov	[ecx+4], eax
mov	eax, [eax+140h]
add	eax, 12Ch
dec	dword ptr [ecx+0Ch]
mov	[ecx+8], eax
retn

loc_835822:
mov	dword ptr [ecx+8], 0
mov	eax, [ecx+8]
mov	dword ptr [ecx+4], 0
retn

loc_835834:
dec	dword ptr [ecx+0Ch]
add	eax, 0FFFFFFECh
mov	[ecx+8], eax
retn
sub_8357F0 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_83A7B0

loc_835840:
push	esi
mov	esi, ecx
mov	eax, [esi+25Ch]
mov	ecx, [esi+260h]
mov	edx, [eax+240h]
push	edi
cmp	ecx, edx
jbe	short loc_83587F
lea	edi, [edx+240h]
cmp	ecx, edi
jnb	short loc_83587D
add	dword ptr [esi+264h], 0FFFFFFD0h
add	ecx, 0FFFFFFD0h
dec	dword ptr [esi+268h]
pop	edi
mov	[esi+260h], ecx
pop	esi
retn

loc_83587D:
cmp	ecx, edx

loc_83587F:
jnz	short loc_8358C6
mov	eax, [eax+248h]
test	eax, eax
jz	short loc_8358AC
mov	eax, [eax+240h]
add	dword ptr [esi+264h], 0FFFFFFD0h
add	eax, 210h
dec	dword ptr [esi+268h]
pop	edi
mov	[esi+260h], eax
pop	esi
retn

loc_8358AC:
add	dword ptr [esi+264h], 0FFFFFFD0h
dec	dword ptr [esi+268h]
pop	edi
mov	dword ptr [esi+260h], 0
pop	esi
retn

loc_8358C6:
mov	edx, [eax+248h]
test	edx, edx
jz	loc_835959
mov	edi, [edx+240h]
add	edi, 210h
cmp	edi, ecx
jnz	short loc_835959
add	ecx, 0FFFFFFD0h
mov	[esi+260h], ecx
mov	ecx, [edx+240h]
add	ecx, 210h
mov	[esi+264h], ecx
xor	ecx, ecx
test	eax, eax
jz	short loc_83593E

loc_835905:
cmp	ecx, 2
jnb	short loc_835917
mov	eax, [eax+244h]
inc	ecx
test	eax, eax
jnz	short loc_835905
jmp	short loc_83593E

loc_835917:
test	eax, eax
jz	short loc_83593E
mov	edx, [eax+248h]
push	eax
mov	dword ptr [edx+244h], 0
mov	eax, [esi]
push	eax
call	sub_82C6D0
add	esp, 8
add	dword ptr [esi+26Ch], 0FFFFFFF4h

loc_83593E:
mov	ecx, [esi+25Ch]
mov	edx, [ecx+248h]
dec	dword ptr [esi+268h]
pop	edi
mov	[esi+25Ch], edx
pop	esi
retn

loc_835959:		; Trap to Debugger
int	3
dec	dword ptr [esi+268h]
pop	edi
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_83A7B0
align 10h



sub_835970 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+41Ch]
mov	ecx, [esi+420h]
mov	edx, [eax+400h]
push	edi
cmp	ecx, edx
jbe	short loc_8359AF
lea	edi, [edx+400h]
cmp	ecx, edi
jnb	short loc_8359AD
add	dword ptr [esi+424h], 0FFFFFFF0h
add	ecx, 0FFFFFFF0h
dec	dword ptr [esi+428h]
pop	edi
mov	[esi+420h], ecx
pop	esi
retn

loc_8359AD:
cmp	ecx, edx

loc_8359AF:
jnz	short loc_8359F6
mov	eax, [eax+408h]
test	eax, eax
jz	short loc_8359DC
mov	eax, [eax+400h]
add	dword ptr [esi+424h], 0FFFFFFF0h
add	eax, 3F0h
dec	dword ptr [esi+428h]
pop	edi
mov	[esi+420h], eax
pop	esi
retn

loc_8359DC:
add	dword ptr [esi+424h], 0FFFFFFF0h
dec	dword ptr [esi+428h]
pop	edi
mov	dword ptr [esi+420h], 0
pop	esi
retn

loc_8359F6:
mov	edx, [eax+408h]
test	edx, edx
jz	loc_835A89
mov	edi, [edx+400h]
add	edi, 3F0h
cmp	edi, ecx
jnz	short loc_835A89
add	ecx, 0FFFFFFF0h
mov	[esi+420h], ecx
mov	ecx, [edx+400h]
add	ecx, 3F0h
mov	[esi+424h], ecx
xor	ecx, ecx
test	eax, eax
jz	short loc_835A6E

loc_835A35:
cmp	ecx, 2
jnb	short loc_835A47
mov	eax, [eax+404h]
inc	ecx
test	eax, eax
jnz	short loc_835A35
jmp	short loc_835A6E

loc_835A47:
test	eax, eax
jz	short loc_835A6E
mov	edx, [eax+408h]
push	eax
mov	dword ptr [edx+404h], 0
mov	eax, [esi]
push	eax
call	sub_82C6D0
add	esp, 8
add	dword ptr [esi+42Ch], 0FFFFFFC0h

loc_835A6E:
mov	ecx, [esi+41Ch]
mov	edx, [ecx+408h]
dec	dword ptr [esi+428h]
pop	edi
mov	[esi+41Ch], edx
pop	esi
retn

loc_835A89:		; Trap to Debugger
int	3
dec	dword ptr [esi+428h]
pop	edi
pop	esi
retn
sub_835970 endp

align 10h



sub_835AA0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, [ecx+828h]
mov	eax, edx
shr	esi, 9
shr	eax, 9
and	edx, 1FFh
cmp	esi, eax
pop	esi
jnz	short loc_835AD0
mov	eax, [ecx+81Ch]
mov	ecx, [eax+800h]
lea	eax, [ecx+edx*4]
retn	4

loc_835AD0:
mov	ecx, [ecx+818h]
test	eax, eax
jbe	short loc_835AEB
lea	ebx, [ebx+0]

loc_835AE0:
sub	eax, 1
mov	ecx, [ecx+804h]
jnz	short loc_835AE0

loc_835AEB:
mov	eax, [ecx+800h]
lea	eax, [eax+edx*4]
retn	4
sub_835AA0 endp

align 10h



sub_835B00 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, [ecx+328h]
mov	eax, edx
shr	esi, 6
shr	eax, 6
and	edx, 3Fh
cmp	esi, eax
pop	esi
jnz	short loc_835B30
mov	eax, [ecx+31Ch]
lea	ecx, [edx+edx*2]
mov	edx, [eax+300h]
lea	eax, [edx+ecx*4]
retn	4

loc_835B30:
mov	ecx, [ecx+318h]
test	eax, eax
jbe	short loc_835B4B
lea	ebx, [ebx+0]

loc_835B40:
sub	eax, 1
mov	ecx, [ecx+304h]
jnz	short loc_835B40

loc_835B4B:
mov	ecx, [ecx+300h]
lea	eax, [edx+edx*2]
lea	eax, [ecx+eax*4]
retn	4
sub_835B00 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_83B420

loc_835B60:
push	esi
mov	esi, ecx
mov	eax, [esi+15Ch]
mov	ecx, [esi+160h]
mov	edx, [eax+140h]
push	edi
cmp	ecx, edx
jbe	short loc_835B9F
lea	edi, [edx+140h]
cmp	ecx, edi
jnb	short loc_835B9D
add	dword ptr [esi+164h], 0FFFFFFECh
add	ecx, 0FFFFFFECh
dec	dword ptr [esi+168h]
pop	edi
mov	[esi+160h], ecx
pop	esi
retn

loc_835B9D:
cmp	ecx, edx

loc_835B9F:
jnz	short loc_835BE6
mov	eax, [eax+148h]
test	eax, eax
jz	short loc_835BCC
mov	eax, [eax+140h]
add	dword ptr [esi+164h], 0FFFFFFECh
add	eax, 12Ch
dec	dword ptr [esi+168h]
pop	edi
mov	[esi+160h], eax
pop	esi
retn

loc_835BCC:
add	dword ptr [esi+164h], 0FFFFFFECh
dec	dword ptr [esi+168h]
pop	edi
mov	dword ptr [esi+160h], 0
pop	esi
retn

loc_835BE6:
mov	edx, [eax+148h]
test	edx, edx
jz	loc_835C79
mov	edi, [edx+140h]
add	edi, 12Ch
cmp	edi, ecx
jnz	short loc_835C79
add	ecx, 0FFFFFFECh
mov	[esi+160h], ecx
mov	ecx, [edx+140h]
add	ecx, 12Ch
mov	[esi+164h], ecx
xor	ecx, ecx
test	eax, eax
jz	short loc_835C5E

loc_835C25:
cmp	ecx, 2
jnb	short loc_835C37
mov	eax, [eax+144h]
inc	ecx
test	eax, eax
jnz	short loc_835C25
jmp	short loc_835C5E

loc_835C37:
test	eax, eax
jz	short loc_835C5E
mov	edx, [eax+148h]
push	eax
mov	dword ptr [edx+144h], 0
mov	eax, [esi]
push	eax
call	sub_82C6D0
add	esp, 8
add	dword ptr [esi+16Ch], 0FFFFFFF0h

loc_835C5E:
mov	ecx, [esi+15Ch]
mov	edx, [ecx+148h]
dec	dword ptr [esi+168h]
pop	edi
mov	[esi+15Ch], edx
pop	esi
retn

loc_835C79:		; Trap to Debugger
int	3
dec	dword ptr [esi+168h]
pop	edi
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_83B420
align 10h



sub_835C90 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+51Ch]
mov	ecx, [esi+520h]
mov	edx, [eax+500h]
push	edi
cmp	ecx, edx
jbe	short loc_835CCF
lea	edi, [edx+500h]
cmp	ecx, edi
jnb	short loc_835CCD
add	dword ptr [esi+524h], 0FFFFFFECh
add	ecx, 0FFFFFFECh
dec	dword ptr [esi+528h]
pop	edi
mov	[esi+520h], ecx
pop	esi
retn

loc_835CCD:
cmp	ecx, edx

loc_835CCF:
jnz	short loc_835D16
mov	eax, [eax+508h]
test	eax, eax
jz	short loc_835CFC
mov	eax, [eax+500h]
add	dword ptr [esi+524h], 0FFFFFFECh
add	eax, 4ECh
dec	dword ptr [esi+528h]
pop	edi
mov	[esi+520h], eax
pop	esi
retn

loc_835CFC:
add	dword ptr [esi+524h], 0FFFFFFECh
dec	dword ptr [esi+528h]
pop	edi
mov	dword ptr [esi+520h], 0
pop	esi
retn

loc_835D16:
mov	edx, [eax+508h]
test	edx, edx
jz	loc_835DA9
mov	edi, [edx+500h]
add	edi, 4ECh
cmp	edi, ecx
jnz	short loc_835DA9
add	ecx, 0FFFFFFECh
mov	[esi+520h], ecx
mov	ecx, [edx+500h]
add	ecx, 4ECh
mov	[esi+524h], ecx
xor	ecx, ecx
test	eax, eax
jz	short loc_835D8E

loc_835D55:
cmp	ecx, 2
jnb	short loc_835D67
mov	eax, [eax+504h]
inc	ecx
test	eax, eax
jnz	short loc_835D55
jmp	short loc_835D8E

loc_835D67:
test	eax, eax
jz	short loc_835D8E
mov	edx, [eax+508h]
push	eax
mov	dword ptr [edx+504h], 0
mov	eax, [esi]
push	eax
call	sub_82C6D0
add	esp, 8
add	dword ptr [esi+52Ch], 0FFFFFFC0h

loc_835D8E:
mov	ecx, [esi+51Ch]
mov	edx, [ecx+508h]
dec	dword ptr [esi+528h]
pop	edi
mov	[esi+51Ch], edx
pop	esi
retn

loc_835DA9:		; Trap to Debugger
int	3
dec	dword ptr [esi+528h]
pop	edi
pop	esi
retn
sub_835C90 endp

align 10h
; START	OF FUNCTION CHUNK FOR sub_8393D0

loc_835DC0:
push	esi
mov	esi, ecx
mov	eax, [esi+19Ch]
mov	ecx, [esi+1A0h]
mov	edx, [eax+180h]
push	edi
cmp	ecx, edx
jbe	short loc_835DFF
lea	edi, [edx+180h]
cmp	ecx, edi
jnb	short loc_835DFD
add	dword ptr [esi+1A4h], 0FFFFFFE8h
add	ecx, 0FFFFFFE8h
dec	dword ptr [esi+1A8h]
pop	edi
mov	[esi+1A0h], ecx
pop	esi
retn

loc_835DFD:
cmp	ecx, edx

loc_835DFF:
jnz	short loc_835E46
mov	eax, [eax+188h]
test	eax, eax
jz	short loc_835E2C
mov	eax, [eax+180h]
add	dword ptr [esi+1A4h], 0FFFFFFE8h
add	eax, 168h
dec	dword ptr [esi+1A8h]
pop	edi
mov	[esi+1A0h], eax
pop	esi
retn

loc_835E2C:
add	dword ptr [esi+1A4h], 0FFFFFFE8h
dec	dword ptr [esi+1A8h]
pop	edi
mov	dword ptr [esi+1A0h], 0
pop	esi
retn

loc_835E46:
mov	edx, [eax+188h]
test	edx, edx
jz	loc_835ED9
mov	edi, [edx+180h]
add	edi, 168h
cmp	edi, ecx
jnz	short loc_835ED9
add	ecx, 0FFFFFFE8h
mov	[esi+1A0h], ecx
mov	ecx, [edx+180h]
add	ecx, 168h
mov	[esi+1A4h], ecx
xor	ecx, ecx
test	eax, eax
jz	short loc_835EBE

loc_835E85:
cmp	ecx, 2
jnb	short loc_835E97
mov	eax, [eax+184h]
inc	ecx
test	eax, eax
jnz	short loc_835E85
jmp	short loc_835EBE

loc_835E97:
test	eax, eax
jz	short loc_835EBE
mov	edx, [eax+188h]
push	eax
mov	dword ptr [edx+184h], 0
mov	eax, [esi]
push	eax
call	sub_82C6D0
add	esp, 8
add	dword ptr [esi+1ACh], 0FFFFFFF0h

loc_835EBE:
mov	ecx, [esi+19Ch]
mov	edx, [ecx+188h]
dec	dword ptr [esi+1A8h]
pop	edi
mov	[esi+19Ch], edx
pop	esi
retn

loc_835ED9:		; Trap to Debugger
int	3
dec	dword ptr [esi+1A8h]
pop	edi
pop	esi
retn
; END OF FUNCTION CHUNK	FOR sub_8393D0
align 10h



; int __stdcall	sub_835EF0(char	ArgList, int)
sub_835EF0 proc	near

DstBuf=	byte ptr -104h
var_4= dword ptr -4
ArgList= byte ptr  4
arg_4= dword ptr  8

sub	esp, 104h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+104h+var_4], eax
push	esi
mov	esi, ecx
mov	ecx, [esp+108h+arg_4]
mov	eax, [esi+9578h]
mov	eax, [eax+1C2Ch]
push	ecx
mov	ecx, dword ptr [esp+10Ch+ArgList]
lea	edx, [esp+10Ch+DstBuf]
push	ecx		; ArgList
test	eax, eax
jnz	short loc_835F40
push	offset aMainFunctionHa ; "Main function	has more than %i %s"
push	100h		; SizeInBytes
push	edx		; DstBuf
call	sub_822D70
add	esp, 14h
jmp	short loc_835F54

loc_835F40:		; ArgList
push	eax
push	offset aFunctionAtLine ; "Function at line %i has more than %i %s"...
push	100h		; SizeInBytes
push	edx		; DstBuf
call	sub_822D70
add	esp, 18h

loc_835F54:
mov	ecx, [esi+10h]
lea	eax, [esp+108h+DstBuf]
push	eax
call	sub_83EDE0
mov	ecx, [esp+108h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 104h
retn	8
sub_835EF0 endp

align 10h



sub_835F80 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+25Ch]
push	edi
mov	edi, [esi+264h]
lea	eax, [edi+30h]
mov	[esi+260h], edi
mov	[esi+264h], eax
mov	edx, [ecx+240h]
add	edx, 240h
cmp	eax, edx
jb	short loc_83601A
mov	ecx, [ecx+244h]
test	ecx, ecx
jz	short loc_835FC1
mov	[esi+25Ch], ecx
jmp	short loc_836008

loc_835FC1:
mov	eax, [esi]
push	250h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_835FF9
mov	ecx, [esi+25Ch]
mov	[eax+240h], eax
mov	dword ptr [eax+244h], 0
mov	[eax+248h], ecx
mov	[ecx+244h], eax
jmp	short loc_835FFB

loc_835FF9:
xor	eax, eax

loc_835FFB:
add	dword ptr [esi+26Ch], 0Ch
mov	[esi+25Ch], eax

loc_836008:
mov	eax, [esi+25Ch]
mov	ecx, [eax+240h]
mov	[esi+264h], ecx

loc_83601A:
inc	dword ptr [esi+268h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_835F80 endp

align 10h



sub_836030 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+5Ch]
push	edi
mov	edi, [esi+64h]
lea	eax, [edi+8]
mov	[esi+60h], edi
mov	[esi+64h], eax
mov	edx, [ecx+40h]
add	edx, 40h
cmp	eax, edx
jb	short loc_83609C
mov	ecx, [ecx+44h]
test	ecx, ecx
jz	short loc_836067
mov	eax, ecx
mov	[esi+5Ch], ecx
mov	ecx, [eax+40h]
inc	dword ptr [esi+68h]
mov	eax, edi
pop	edi
mov	[esi+64h], ecx
pop	esi
retn

loc_836067:
mov	eax, [esi]
push	50h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_83608D
mov	ecx, [esi+5Ch]
mov	[eax+40h], eax
mov	dword ptr [eax+44h], 0
mov	[eax+48h], ecx
mov	[ecx+44h], eax
jmp	short loc_83608F

loc_83608D:
xor	eax, eax

loc_83608F:
add	dword ptr [esi+6Ch], 8
mov	[esi+5Ch], eax
mov	ecx, [eax+40h]
mov	[esi+64h], ecx

loc_83609C:
inc	dword ptr [esi+68h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836030 endp

align 10h



sub_8360B0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+20Ch], edx
mov	[eax+210h], edx
lea	ecx, [eax+8]
mov	[ecx+200h], ecx
mov	[eax+224h], edx
mov	[eax+22Ch], edx
mov	[eax+220h], edx
mov	[eax+228h], edx
mov	[eax+218h], ecx
mov	[eax+21Ch], ecx
mov	edx, [ecx+200h]
mov	[eax+224h], edx
mov	dword ptr [eax+22Ch], 40h
retn	4
sub_8360B0 endp

align 10h



sub_836110 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+41Ch]
push	edi
mov	edi, [esi+424h]
lea	eax, [edi+10h]
mov	[esi+420h], edi
mov	[esi+424h], eax
mov	edx, [ecx+400h]
add	edx, 400h
cmp	eax, edx
jb	short loc_8361AA
mov	ecx, [ecx+404h]
test	ecx, ecx
jz	short loc_836151
mov	[esi+41Ch], ecx
jmp	short loc_836198

loc_836151:
mov	eax, [esi]
push	410h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_836189
mov	ecx, [esi+41Ch]
mov	[eax+400h], eax
mov	dword ptr [eax+404h], 0
mov	[eax+408h], ecx
mov	[ecx+404h], eax
jmp	short loc_83618B

loc_836189:
xor	eax, eax

loc_83618B:
add	dword ptr [esi+42Ch], 40h
mov	[esi+41Ch], eax

loc_836198:
mov	eax, [esi+41Ch]
mov	ecx, [eax+400h]
mov	[esi+424h], ecx

loc_8361AA:
inc	dword ptr [esi+428h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836110 endp

align 10h



sub_8361C0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

xor	edx, edx
sub	esp, 10h
cmp	[ecx+420h], edx
jz	short loc_83621A
mov	eax, [ecx+41Ch]
mov	edx, [ecx+424h]
mov	[esp+10h+var_C], eax
mov	eax, [ecx+428h]
mov	[esp+10h+var_10], ecx
lea	ecx, [esp+10h+var_10]
mov	[esp+10h+var_8], edx
mov	[esp+10h+var_4], eax
call	sub_8357A0
mov	eax, [esp+10h+arg_0]
mov	ecx, [esp+10h+var_10]
mov	edx, [esp+10h+var_C]
mov	[eax], ecx
mov	ecx, [esp+10h+var_8]
mov	[eax+4], edx
mov	edx, [esp+10h+var_4]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
add	esp, 10h
retn	4

loc_83621A:
mov	eax, [esp+10h+arg_0]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax+0Ch], edx
add	esp, 10h
retn	4
sub_8361C0 endp

align 10h



sub_836230 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+81Ch]
push	edi
mov	edi, [esi+824h]
lea	eax, [edi+4]
mov	[esi+820h], edi
mov	[esi+824h], eax
mov	edx, [ecx+800h]
add	edx, 800h
cmp	eax, edx
jb	short loc_8362CD
mov	ecx, [ecx+804h]
test	ecx, ecx
jz	short loc_836271
mov	[esi+81Ch], ecx
jmp	short loc_8362BB

loc_836271:
mov	eax, [esi]
push	810h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_8362A9
mov	ecx, [esi+81Ch]
mov	[eax+800h], eax
mov	dword ptr [eax+804h], 0
mov	[eax+808h], ecx
mov	[ecx+804h], eax
jmp	short loc_8362AB

loc_8362A9:
xor	eax, eax

loc_8362AB:
add	dword ptr [esi+82Ch], 200h
mov	[esi+81Ch], eax

loc_8362BB:
mov	eax, [esi+81Ch]
mov	ecx, [eax+800h]
mov	[esi+824h], ecx

loc_8362CD:
inc	dword ptr [esi+828h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836230 endp

align 10h



sub_8362E0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+80Ch], edx
mov	[eax+810h], edx
lea	ecx, [eax+8]
mov	[ecx+800h], ecx
mov	[eax+824h], edx
mov	[eax+82Ch], edx
mov	[eax+820h], edx
mov	[eax+828h], edx
mov	[eax+818h], ecx
mov	[eax+81Ch], ecx
mov	edx, [ecx+800h]
mov	[eax+824h], edx
mov	dword ptr [eax+82Ch], 200h
retn	4
sub_8362E0 endp

align 10h



sub_836340 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+31Ch]
push	edi
mov	edi, [esi+324h]
lea	eax, [edi+0Ch]
mov	[esi+320h], edi
mov	[esi+324h], eax
mov	edx, [ecx+300h]
add	edx, 300h
cmp	eax, edx
jb	short loc_8363DA
mov	ecx, [ecx+304h]
test	ecx, ecx
jz	short loc_836381
mov	[esi+31Ch], ecx
jmp	short loc_8363C8

loc_836381:
mov	eax, [esi]
push	310h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_8363B9
mov	ecx, [esi+31Ch]
mov	[eax+300h], eax
mov	dword ptr [eax+304h], 0
mov	[eax+308h], ecx
mov	[ecx+304h], eax
jmp	short loc_8363BB

loc_8363B9:
xor	eax, eax

loc_8363BB:
add	dword ptr [esi+32Ch], 40h
mov	[esi+31Ch], eax

loc_8363C8:
mov	eax, [esi+31Ch]
mov	ecx, [eax+300h]
mov	[esi+324h], ecx

loc_8363DA:
inc	dword ptr [esi+328h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836340 endp

align 10h



sub_8363F0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0DCh]
push	edi
mov	edi, [esi+0E4h]
lea	eax, [edi+0Ch]
mov	[esi+0E0h], edi
mov	[esi+0E4h], eax
mov	edx, [ecx+0C0h]
add	edx, 0C0h
cmp	eax, edx
jb	short loc_83648A
mov	ecx, [ecx+0C4h]
test	ecx, ecx
jz	short loc_836431
mov	[esi+0DCh], ecx
jmp	short loc_836478

loc_836431:
mov	eax, [esi]
push	0D0h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_836469
mov	ecx, [esi+0DCh]
mov	[eax+0C0h], eax
mov	dword ptr [eax+0C4h], 0
mov	[eax+0C8h], ecx
mov	[ecx+0C4h], eax
jmp	short loc_83646B

loc_836469:
xor	eax, eax

loc_83646B:
add	dword ptr [esi+0ECh], 10h
mov	[esi+0DCh], eax

loc_836478:
mov	eax, [esi+0DCh]
mov	ecx, [eax+0C0h]
mov	[esi+0E4h], ecx

loc_83648A:
inc	dword ptr [esi+0E8h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_8363F0 endp

align 10h



sub_8364A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

xor	edx, edx
sub	esp, 10h
cmp	[ecx+160h], edx
jz	short loc_8364FA
mov	eax, [ecx+15Ch]
mov	edx, [ecx+164h]
mov	[esp+10h+var_C], eax
mov	eax, [ecx+168h]
mov	[esp+10h+var_10], ecx
lea	ecx, [esp+10h+var_10]
mov	[esp+10h+var_8], edx
mov	[esp+10h+var_4], eax
call	sub_8357F0
mov	eax, [esp+10h+arg_0]
mov	ecx, [esp+10h+var_10]
mov	edx, [esp+10h+var_C]
mov	[eax], ecx
mov	ecx, [esp+10h+var_8]
mov	[eax+4], edx
mov	edx, [esp+10h+var_4]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
add	esp, 10h
retn	4

loc_8364FA:
mov	eax, [esp+10h+arg_0]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax+0Ch], edx
add	esp, 10h
retn	4
sub_8364A0 endp

align 10h



sub_836510 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+51Ch]
push	edi
mov	edi, [esi+524h]
lea	eax, [edi+14h]
mov	[esi+520h], edi
mov	[esi+524h], eax
mov	edx, [ecx+500h]
add	edx, 500h
cmp	eax, edx
jb	short loc_8365AA
mov	ecx, [ecx+504h]
test	ecx, ecx
jz	short loc_836551
mov	[esi+51Ch], ecx
jmp	short loc_836598

loc_836551:
mov	eax, [esi]
push	510h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_836589
mov	ecx, [esi+51Ch]
mov	[eax+500h], eax
mov	dword ptr [eax+504h], 0
mov	[eax+508h], ecx
mov	[ecx+504h], eax
jmp	short loc_83658B

loc_836589:
xor	eax, eax

loc_83658B:
add	dword ptr [esi+52Ch], 40h
mov	[esi+51Ch], eax

loc_836598:
mov	eax, [esi+51Ch]
mov	ecx, [eax+500h]
mov	[esi+524h], ecx

loc_8365AA:
inc	dword ptr [esi+528h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836510 endp

align 10h



sub_8365C0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+19Ch]
push	edi
mov	edi, [esi+1A4h]
lea	eax, [edi+18h]
mov	[esi+1A0h], edi
mov	[esi+1A4h], eax
mov	edx, [ecx+180h]
add	edx, 180h
cmp	eax, edx
jb	short loc_83665A
mov	ecx, [ecx+184h]
test	ecx, ecx
jz	short loc_836601
mov	[esi+19Ch], ecx
jmp	short loc_836648

loc_836601:
mov	eax, [esi]
push	190h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_836639
mov	ecx, [esi+19Ch]
mov	[eax+180h], eax
mov	dword ptr [eax+184h], 0
mov	[eax+188h], ecx
mov	[ecx+184h], eax
jmp	short loc_83663B

loc_836639:
xor	eax, eax

loc_83663B:
add	dword ptr [esi+1ACh], 10h
mov	[esi+19Ch], eax

loc_836648:
mov	eax, [esi+19Ch]
mov	ecx, [eax+180h]
mov	[esi+1A4h], ecx

loc_83665A:
inc	dword ptr [esi+1A8h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_8365C0 endp

align 10h



sub_836670 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+927Ch]
push	edi
mov	edi, [esi+9284h]
lea	eax, [edi+2498h]
mov	[esi+9280h], edi
mov	[esi+9284h], eax
mov	edx, [ecx+9260h]
add	edx, 9260h
cmp	eax, edx
jb	short loc_83670D
mov	ecx, [ecx+9264h]
test	ecx, ecx
jz	short loc_8366B4
mov	[esi+927Ch], ecx
jmp	short loc_8366FB

loc_8366B4:
mov	eax, [esi]
push	9270h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_8366EC
mov	ecx, [esi+927Ch]
mov	[eax+9260h], eax
mov	dword ptr [eax+9264h], 0
mov	[eax+9268h], ecx
mov	[ecx+9264h], eax
jmp	short loc_8366EE

loc_8366EC:
xor	eax, eax

loc_8366EE:
add	dword ptr [esi+928Ch], 4
mov	[esi+927Ch], eax

loc_8366FB:
mov	eax, [esi+927Ch]
mov	ecx, [eax+9260h]
mov	[esi+9284h], ecx

loc_83670D:
inc	dword ptr [esi+9288h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836670 endp

align 10h



sub_836720 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

xor	edx, edx
sub	esp, 10h
cmp	[ecx+9280h], edx
jz	short loc_83677A
mov	eax, [ecx+927Ch]
mov	edx, [ecx+9284h]
mov	[esp+10h+var_C], eax
mov	eax, [ecx+9288h]
mov	[esp+10h+var_10], ecx
lea	ecx, [esp+10h+var_10]
mov	[esp+10h+var_8], edx
mov	[esp+10h+var_4], eax
call	sub_835750
mov	eax, [esp+10h+arg_0]
mov	ecx, [esp+10h+var_10]
mov	edx, [esp+10h+var_C]
mov	[eax], ecx
mov	ecx, [esp+10h+var_8]
mov	[eax+4], edx
mov	edx, [esp+10h+var_4]
mov	[eax+8], ecx
mov	[eax+0Ch], edx
add	esp, 10h
retn	4

loc_83677A:
mov	eax, [esp+10h+arg_0]
mov	[eax], ecx
mov	[eax+4], edx
mov	[eax+8], edx
mov	[eax+0Ch], edx
add	esp, 10h
retn	4
sub_836720 endp

align 10h



sub_836790 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+24Ch], edx
mov	[eax+250h], edx
lea	ecx, [eax+8]
mov	[ecx+240h], ecx
mov	[eax+264h], edx
mov	[eax+26Ch], edx
mov	[eax+260h], edx
mov	[eax+268h], edx
mov	[eax+258h], ecx
mov	[eax+25Ch], ecx
mov	edx, [ecx+240h]
mov	[eax+264h], edx
mov	dword ptr [eax+26Ch], 0Ch
retn	4
sub_836790 endp

align 10h



sub_8367F0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+21Ch]
push	edi
mov	edi, [esi+224h]
lea	eax, [edi+8]
mov	[esi+220h], edi
mov	[esi+224h], eax
mov	edx, [ecx+200h]
add	edx, 200h
cmp	eax, edx
jb	short loc_83688A
mov	ecx, [ecx+204h]
test	ecx, ecx
jz	short loc_836831
mov	[esi+21Ch], ecx
jmp	short loc_836878

loc_836831:
mov	eax, [esi]
push	210h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_836869
mov	ecx, [esi+21Ch]
mov	[eax+200h], eax
mov	dword ptr [eax+204h], 0
mov	[eax+208h], ecx
mov	[ecx+204h], eax
jmp	short loc_83686B

loc_836869:
xor	eax, eax

loc_83686B:
add	dword ptr [esi+22Ch], 40h
mov	[esi+21Ch], eax

loc_836878:
mov	eax, [esi+21Ch]
mov	ecx, [eax+200h]
mov	[esi+224h], ecx

loc_83688A:
inc	dword ptr [esi+228h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_8367F0 endp

align 10h



sub_8368A0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+40Ch], edx
mov	[eax+410h], edx
lea	ecx, [eax+8]
mov	[ecx+400h], ecx
mov	[eax+424h], edx
mov	[eax+42Ch], edx
mov	[eax+420h], edx
mov	[eax+428h], edx
mov	[eax+418h], ecx
mov	[eax+41Ch], ecx
mov	edx, [ecx+400h]
mov	[eax+424h], edx
mov	dword ptr [eax+42Ch], 40h
retn	4
sub_8368A0 endp

align 10h



sub_836900 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+3Ch]
push	edi
mov	edi, [esi+44h]
lea	eax, [edi+4]
mov	[esi+40h], edi
mov	[esi+44h], eax
mov	edx, [ecx+20h]
add	edx, 20h
cmp	eax, edx
jb	short loc_83696C
mov	ecx, [ecx+24h]
test	ecx, ecx
jz	short loc_836937
mov	eax, ecx
mov	[esi+3Ch], ecx
mov	ecx, [eax+20h]
inc	dword ptr [esi+48h]
mov	eax, edi
pop	edi
mov	[esi+44h], ecx
pop	esi
retn

loc_836937:
mov	eax, [esi]
push	30h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_83695D
mov	ecx, [esi+3Ch]
mov	[eax+20h], eax
mov	dword ptr [eax+24h], 0
mov	[eax+28h], ecx
mov	[ecx+24h], eax
jmp	short loc_83695F

loc_83695D:
xor	eax, eax

loc_83695F:
add	dword ptr [esi+4Ch], 8
mov	[esi+3Ch], eax
mov	ecx, [eax+20h]
mov	[esi+44h], ecx

loc_83696C:
inc	dword ptr [esi+48h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836900 endp

align 10h



sub_836980 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+30Ch], edx
mov	[eax+310h], edx
lea	ecx, [eax+8]
mov	[ecx+300h], ecx
mov	[eax+324h], edx
mov	[eax+32Ch], edx
mov	[eax+320h], edx
mov	[eax+328h], edx
mov	[eax+318h], ecx
mov	[eax+31Ch], ecx
mov	edx, [ecx+300h]
mov	[eax+324h], edx
mov	dword ptr [eax+32Ch], 40h
retn	4
sub_836980 endp

align 10h



sub_8369E0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+0CCh], edx
mov	[eax+0D0h], edx
lea	ecx, [eax+8]
mov	[ecx+0C0h], ecx
mov	[eax+0E4h], edx
mov	[eax+0ECh], edx
mov	[eax+0E0h], edx
mov	[eax+0E8h], edx
mov	[eax+0D8h], ecx
mov	[eax+0DCh], ecx
mov	edx, [ecx+0C0h]
mov	[eax+0E4h], edx
mov	dword ptr [eax+0ECh], 10h
retn	4
sub_8369E0 endp

align 10h



sub_836A40 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+14Ch], edx
mov	[eax+150h], edx
lea	ecx, [eax+8]
mov	[ecx+140h], ecx
mov	[eax+164h], edx
mov	[eax+16Ch], edx
mov	[eax+160h], edx
mov	[eax+168h], edx
mov	[eax+158h], ecx
mov	[eax+15Ch], ecx
mov	edx, [ecx+140h]
mov	[eax+164h], edx
mov	dword ptr [eax+16Ch], 10h
retn	4
sub_836A40 endp

align 10h



sub_836AA0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+15Ch]
push	edi
mov	edi, [esi+164h]
lea	eax, [edi+14h]
mov	[esi+160h], edi
mov	[esi+164h], eax
mov	edx, [ecx+140h]
add	edx, 140h
cmp	eax, edx
jb	short loc_836B3A
mov	ecx, [ecx+144h]
test	ecx, ecx
jz	short loc_836AE1
mov	[esi+15Ch], ecx
jmp	short loc_836B28

loc_836AE1:
mov	eax, [esi]
push	150h
push	eax
call	sub_82C6B0
add	esp, 8
test	eax, eax
jz	short loc_836B19
mov	ecx, [esi+15Ch]
mov	[eax+140h], eax
mov	dword ptr [eax+144h], 0
mov	[eax+148h], ecx
mov	[ecx+144h], eax
jmp	short loc_836B1B

loc_836B19:
xor	eax, eax

loc_836B1B:
add	dword ptr [esi+16Ch], 10h
mov	[esi+15Ch], eax

loc_836B28:
mov	eax, [esi+15Ch]
mov	ecx, [eax+140h]
mov	[esi+164h], ecx

loc_836B3A:
inc	dword ptr [esi+168h]
mov	eax, edi
pop	edi
pop	esi
retn
sub_836AA0 endp

align 10h



sub_836B50 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+50Ch], edx
mov	[eax+510h], edx
lea	ecx, [eax+8]
mov	[ecx+500h], ecx
mov	[eax+524h], edx
mov	[eax+52Ch], edx
mov	[eax+520h], edx
mov	[eax+528h], edx
mov	[eax+518h], ecx
mov	[eax+51Ch], ecx
mov	edx, [ecx+500h]
mov	[eax+524h], edx
mov	dword ptr [eax+52Ch], 40h
retn	4
sub_836B50 endp

align 10h



sub_836BB0 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+18Ch], edx
mov	[eax+190h], edx
lea	ecx, [eax+8]
mov	[ecx+180h], ecx
mov	[eax+1A4h], edx
mov	[eax+1ACh], edx
mov	[eax+1A0h], edx
mov	[eax+1A8h], edx
mov	[eax+198h], ecx
mov	[eax+19Ch], ecx
mov	edx, [ecx+180h]
mov	[eax+1A4h], edx
mov	dword ptr [eax+1ACh], 10h
retn	4
sub_836BB0 endp

align 10h



sub_836C10 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
xor	edx, edx
mov	[eax], ecx
mov	[eax+926Ch], edx
mov	[eax+9270h], edx
lea	ecx, [eax+8]
mov	[ecx+9260h], ecx
mov	[eax+9284h], edx
mov	[eax+928Ch], edx
mov	[eax+9280h], edx
mov	[eax+9288h], edx
mov	[eax+9278h], ecx
mov	[eax+927Ch], ecx
mov	edx, [ecx+9260h]
mov	[eax+9284h], edx
mov	dword ptr [eax+928Ch], 4
retn	4
sub_836C10 endp

align 10h



sub_836C70 proc	near
mov	eax, [ecx+9578h]
mov	ecx, [eax+1B34h]
sub	ecx, [eax+1B30h]
inc	ecx
mov	[eax+16D8h], ecx
retn
sub_836C70 endp

align 10h



sub_836C90 proc	near

var_20C= dword ptr -20Ch
var_208= dword ptr -208h
var_204= byte ptr -204h
var_4= dword ptr -4

sub	esp, 20Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20Ch+var_4], eax
push	ebp
mov	ebp, ecx
push	edi
xor	edi, edi
lea	eax, [ebp+288h]
mov	[esp+214h+var_20C], ebp
cmp	[eax+60h], edi
jz	loc_836D40
push	ebx
mov	ebx, [eax+58h]
push	esi
mov	esi, [ebx+40h]
test	esi, esi
jz	short loc_836D3E
mov	eax, [eax+64h]
mov	[esp+21Ch+var_208], eax

loc_836CD0:
mov	eax, [esi+4]
sub	eax, 1
jz	short loc_836CE4
sub	eax, 1
jnz	short loc_836CEA
mov	[esp+edi+21Ch+var_204],	3Ah
jmp	short loc_836CE9

loc_836CE4:
mov	[esp+edi+21Ch+var_204],	2Eh

loc_836CE9:
inc	edi

loc_836CEA:
mov	ecx, [esi]
mov	ebp, [ecx]
mov	eax, 200h
sub	eax, edi
cmp	ebp, eax
jb	short loc_836CFB
mov	ebp, eax

loc_836CFB:
add	ecx, 8
push	ebp
push	ecx
lea	ecx, [esp+edi+224h+var_204]
push	ecx
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [ebx+40h]
add	edx, 38h
add	esp, 0Ch
add	edi, ebp
cmp	esi, edx
jnz	short loc_836D2D
mov	eax, [ebx+44h]
test	eax, eax
jz	short loc_836D27
mov	ebx, eax
mov	esi, [ebx+40h]
jmp	short loc_836D30

loc_836D27:
xor	esi, esi
xor	ebx, ebx
jmp	short loc_836D30

loc_836D2D:
add	esi, 8

loc_836D30:
cmp	esi, [esp+21Ch+var_208]
jz	short loc_836D3A
test	esi, esi
jnz	short loc_836CD0

loc_836D3A:
mov	ebp, [esp+21Ch+var_20C]

loc_836D3E:
pop	esi
pop	ebx

loc_836D40:
lea	ecx, [ebp+288h]
call	sub_835220
mov	eax, edi
cmp	edi, 1FFh
jb	short loc_836D5A
mov	eax, 1FFh

loc_836D5A:
mov	[esp+eax+214h+var_204],	0
test	edi, edi
jbe	short loc_836D92
mov	ebp, [ebp+0Ch]
mov	ecx, [ebp+0]
push	edi
lea	eax, [esp+218h+var_204]
push	eax
push	ebp
add	ecx, 2A0h
call	sub_81FD20
pop	edi
pop	ebp
mov	ecx, [esp+20Ch+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 20Ch
retn

loc_836D92:
mov	ecx, [esp+214h+var_4]
pop	edi
pop	ebp
xor	ecx, esp
xor	eax, eax
call	sub_7999A3
add	esp, 20Ch
retn
sub_836C90 endp

align 10h



sub_836DB0 proc	near
mov	edx, [ecx+9578h]
xor	eax, eax
mov	[edx+1C28h], al
mov	ecx, [ecx+9578h]
mov	[ecx+1C30h], eax
retn
sub_836DB0 endp

align 10h



sub_836DD0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
call	sub_9E28B0
mov	ecx, [esi+9578h]
mov	[ecx+1C34h], eax
pop	esi
retn
sub_836DD0 endp

align 10h



sub_836DF0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
lea	ecx, [eax+22E0h]
call	sub_8365C0
test	eax, eax
jz	short loc_836E17
mov	dword ptr [eax], 0
mov	dword ptr [eax+14h], 0FFFFFFFFh
jmp	short loc_836E19

loc_836E17:
xor	eax, eax

loc_836E19:
mov	ecx, [esi+9578h]
mov	dl, [ecx+16D8h]
mov	[eax+0Ch], dl
mov	dword ptr [eax+10h], 0
pop	esi
retn
sub_836DF0 endp

align 10h



sub_836E40 proc	near
mov	ecx, [ecx+9578h]
add	ecx, 22E0h
jmp	loc_835DC0
sub_836E40 endp

align 10h



sub_836E60 proc	near
mov	eax, [ecx+9578h]
mov	ecx, [eax+2480h]
mov	byte ptr [ecx+0Dh], 1
retn
sub_836E60 endp

align 10h



sub_836E80 proc	near
mov	ecx, [ecx+9578h]
add	ecx, 22E0h
call	sub_8365C0
test	eax, eax
jz	short locret_836EA2
mov	dword ptr [eax], 1
mov	dword ptr [eax+14h], 0FFFFFFFFh

locret_836EA2:
retn
sub_836E80 endp

align 10h



sub_836EB0 proc	near
mov	eax, [ecx+9578h]
mov	edx, [eax+0E98h]
mov	[eax+1C3Ch], edx
mov	ecx, [ecx+9578h]
mov	eax, [ecx+2480h]
mov	ecx, [ecx+0E98h]
mov	[eax+4], ecx
retn
sub_836EB0 endp

align 10h



sub_836EE0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
lea	ecx, [eax+22E0h]
call	sub_8365C0
or	ecx, 0FFFFFFFFh
test	eax, eax
jz	short loc_836F04
mov	dword ptr [eax], 3
mov	[eax+14h], ecx

loc_836F04:
mov	eax, [esi+9578h]
mov	edx, [eax+2480h]
mov	[edx+4], ecx
pop	esi
retn
sub_836EE0 endp

align 10h



sub_836F20 proc	near
mov	eax, [ecx+9578h]
mov	eax, [eax+2480h]
mov	ecx, [eax+14h]
mov	[eax+8], ecx
retn
sub_836F20 endp

align 10h



sub_836F40 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
test	edx, 100h
jnz	short locret_836F69
mov	eax, [ecx+9578h]
mov	ecx, [eax+1B34h]
sub	ecx, [eax+1B30h]
inc	ecx
cmp	edx, ecx
jb	short locret_836F69
dec	dword ptr [eax+16D8h]

locret_836F69:
retn	4
sub_836F40 endp

align 10h



sub_836F70 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
cmp	dword ptr [eax], 0Ch
jnz	short locret_836FA1
mov	edx, [eax+4]
test	edx, 100h
jnz	short locret_836FA1
mov	eax, [ecx+9578h]
mov	ecx, [eax+1B34h]
sub	ecx, [eax+1B30h]
inc	ecx
cmp	edx, ecx
jb	short locret_836FA1
dec	dword ptr [eax+16D8h]

locret_836FA1:
retn	4
sub_836F70 endp

align 10h



sub_836FB0 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+9578h]
mov	esi, [eax+16D8h]
add	esi, [esp+8+arg_0]
cmp	esi, [eax+16DCh]
jbe	short loc_836FED
cmp	esi, 0C8h
jb	short loc_836FE1
mov	ecx, [edi+10h]
push	offset aFunctionOrExpr ; "Function or expression requires too man"...
call	sub_83EDE0

loc_836FE1:
mov	eax, [edi+9578h]
mov	[eax+16DCh], esi

loc_836FED:
mov	ecx, [edi+9578h]
pop	edi
mov	[ecx+16D8h], esi
mov	eax, esi
pop	esi
retn	4
sub_836FB0 endp




sub_837000 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
lea	ecx, [eax+240h]
call	sub_836110
test	eax, eax
jz	short loc_837048
mov	edx, [esi+9578h]
mov	ecx, [edx+1B34h]
sub	ecx, [edx+1B30h]
add	edx, 1A60h
inc	ecx
mov	[eax+4], cl
mov	ecx, [esp+4+arg_0]
mov	dword ptr [eax], 0FFFFFFFFh
mov	dword ptr [eax+8], 0
mov	[eax+0Ch], ecx

loc_837048:
pop	esi
retn	4
sub_837000 endp

align 10h



sub_837050 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+9578h]
push	ebx
mov	ebx, [eax+1B34h]
sub	ebx, [eax+1B30h]
add	eax, 1A60h
sub	ebx, [esp+4+arg_0]
add	ebx, 1
jz	short loc_8370E7
push	ebp
push	esi
push	edi

loc_837074:
mov	eax, [ecx+9578h]
mov	edx, [eax+1B34h]
mov	edi, [eax+0E98h]
lea	esi, [edx-1]
mov	[eax+1B34h], esi
movzx	eax, byte ptr [edx]
mov	edx, [ecx+9578h]
mov	ebp, [edx+1A58h]
add	edx, 1730h
mov	esi, eax
shr	esi, 6
shr	ebp, 6
and	eax, 3Fh
cmp	ebp, esi
jnz	short loc_8370BB
mov	edx, [edx+31Ch]
jmp	short loc_8370D0

loc_8370BB:
mov	edx, [edx+318h]
test	esi, esi
jbe	short loc_8370D0

loc_8370C5:
sub	esi, 1
mov	edx, [edx+304h]
jnz	short loc_8370C5

loc_8370D0:
sub	ebx, 1
mov	edx, [edx+300h]
lea	eax, [eax+eax*2]
lea	eax, [edx+eax*4]
mov	[eax+8], edi
jnz	short loc_837074
pop	edi
pop	esi
pop	ebp

loc_8370E7:
pop	ebx
retn	4
sub_837050 endp

align 10h



sub_8370F0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [ecx+9578h]
push	ebx
mov	ebx, [edx+0E98h]
test	eax, eax
jbe	short loc_837171
push	ebp
push	esi
mov	ebp, eax
lea	esp, [esp+0]

loc_837110:
inc	dword ptr [edx+1B34h]
mov	eax, [edx+1B34h]
movzx	eax, byte ptr [eax]
mov	esi, [edx+1A58h]
mov	ecx, eax
shr	ecx, 6
shr	esi, 6
and	eax, 3Fh
cmp	esi, ecx
jnz	short loc_837142
mov	ecx, [edx+1A4Ch]
mov	ecx, [ecx+300h]
jmp	short loc_837161

loc_837142:
mov	esi, [edx+1A48h]
test	ecx, ecx
jbe	short loc_83715B
lea	esp, [esp+0]

loc_837150:
sub	ecx, 1
mov	esi, [esi+304h]
jnz	short loc_837150

loc_83715B:
mov	ecx, [esi+300h]

loc_837161:
sub	ebp, 1
lea	eax, [eax+eax*2]
lea	eax, [ecx+eax*4]
mov	[eax+4], ebx
jnz	short loc_837110
pop	esi
pop	ebp

loc_837171:
pop	ebx
retn	4
sub_8370F0 endp

align 10h



sub_837180 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+1B34h]
push	ebx
push	ebp
mov	ebp, [ecx+1B30h]
push	esi
push	edi
cmp	eax, ebp
jb	short loc_8371F8
test	eax, eax
jz	short loc_8371F8
mov	ebx, [ecx+1A58h]
shr	ebx, 6

loc_8371A1:
movzx	edx, byte ptr [eax]
mov	esi, edx
shr	esi, 6
and	edx, 3Fh
cmp	ebx, esi
jnz	short loc_8371BE
mov	esi, [ecx+1A4Ch]
mov	esi, [esi+300h]
jmp	short loc_8371E1

loc_8371BE:
mov	edi, [ecx+1A48h]
test	esi, esi
jbe	short loc_8371DB
jmp	short loc_8371D0
align 10h

loc_8371D0:
sub	esi, 1
mov	edi, [edi+304h]
jnz	short loc_8371D0

loc_8371DB:
mov	esi, [edi+300h]

loc_8371E1:
lea	edx, [edx+edx*2]
lea	edx, [esi+edx*4]
mov	esi, [esp+10h+arg_0]
cmp	[edx], esi
jz	short loc_837202
cmp	eax, ebp
jz	short loc_8371F8
sub	eax, 1
jnz	short loc_8371A1

loc_8371F8:
pop	edi
pop	esi
pop	ebp
or	eax, 0FFFFFFFFh
pop	ebx
retn	4

loc_837202:
pop	edi
pop	esi
sub	eax, ebp
pop	ebp
pop	ebx
retn	4
sub_837180 endp

align 10h



sub_837210 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
mov	ebx, ecx
cmp	dword ptr [ebx+1C18h], 0
push	edi
lea	edi, [ebx+1B38h]
jz	short loc_837299
mov	esi, [edi+0D8h]
mov	edx, [esi+0C0h]
xor	eax, eax
test	edx, edx
jz	short loc_837299
xor	ecx, ecx
cmp	dword ptr [ebp+0], 6
setz	cl
mov	[esp+10h+arg_4], ecx
jmp	short loc_837250
align 10h

loc_837250:
mov	ecx, [esp+10h+arg_4]
cmp	[edx+8], ecx
jnz	short loc_837261
mov	ecx, [edx+4]
cmp	ecx, [ebp+4]
jz	short loc_8372CB

loc_837261:
mov	ecx, [esi+0C0h]
add	ecx, 0B4h
cmp	edx, ecx
jnz	short loc_837289
mov	esi, [esi+0C4h]
test	esi, esi
jz	short loc_837283
mov	edx, [esi+0C0h]
jmp	short loc_83728C

loc_837283:
xor	edx, edx
xor	esi, esi
jmp	short loc_83728D

loc_837289:
add	edx, 0Ch

loc_83728C:
inc	eax

loc_83728D:
cmp	edx, [edi+0E4h]
jz	short loc_837299
test	edx, edx
jnz	short loc_837250

loc_837299:
mov	eax, [ebx+1C1Ch]
test	eax, eax
jz	short loc_8372BD
mov	edx, [ebp+4]
xor	ecx, ecx
cmp	dword ptr [ebp+0], 6
mov	[eax+4], edx
setz	cl
mov	esi, ecx
mov	ecx, [esp+10h+arg_0]
mov	[eax], ecx
mov	[eax+8], esi

loc_8372BD:
mov	ecx, edi
call	sub_8363F0
mov	eax, [ebx+1C20h]
dec	eax

loc_8372CB:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_837210 endp

align 10h



sub_8372E0 proc	near

var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
sub	esp, 10h
push	esi
push	eax
call	sub_837180
mov	esi, eax
test	esi, esi
jl	loc_837390
mov	eax, [esp+14h+arg_4]
test	eax, eax
jz	short loc_837312
or	edx, 0FFFFFFFFh
mov	dword ptr [eax], 6
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	[eax+4], esi

loc_837312:
cmp	[esp+14h+arg_8], 0
jnz	short loc_837384
lea	edx, [esp+14h+var_10]
push	edx
add	ecx, 240h
call	sub_8361C0
mov	eax, [esp+14h+var_8]
test	eax, eax
jz	short loc_837384
mov	edx, [esp+14h+var_4]
mov	ecx, [esp+14h+var_C]
push	edi
lea	ebx, [ebx+0]

loc_837340:
movzx	edi, byte ptr [eax+4]
cmp	edi, esi
jle	short loc_83737C
cmp	eax, [ecx+400h]
jnz	short loc_837367
mov	ecx, [ecx+408h]
test	ecx, ecx
jz	short loc_837383
mov	eax, [ecx+400h]
add	eax, 3F0h
jmp	short loc_83736A

loc_837367:
sub	eax, 10h

loc_83736A:
dec	edx
test	eax, eax
jnz	short loc_837340
pop	edi
mov	eax, 6
pop	esi
add	esp, 10h
retn	0Ch

loc_83737C:
mov	dword ptr [eax+8], 1

loc_837383:
pop	edi

loc_837384:
mov	eax, 6
pop	esi
add	esp, 10h
retn	0Ch

loc_837390:
xor	eax, eax
pop	esi
add	esp, 10h
retn	0Ch
sub_8372E0 endp

align 10h



sub_8373A0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
push	esi
push	edi
mov	ebx, ecx
cmp	ebp, 1
jb	short loc_8373F8
mov	eax, [ebx+9578h]
lea	edi, [eax+670h]
lea	esi, [ebp-1]
push	esi
mov	ecx, edi
call	sub_835AA0
mov	eax, [eax]
and	eax, 3Fh
cmp	eax, 17h
jz	short loc_8373E9
cmp	eax, 18h
jz	short loc_8373E9
cmp	eax, 19h
jz	short loc_8373E9
cmp	eax, 1Ah
jz	short loc_8373E9
cmp	eax, 1Bh
jz	short loc_8373E9
cmp	eax, 21h
jnz	short loc_8373F8

loc_8373E9:
push	esi
mov	ecx, edi
call	sub_835AA0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4

loc_8373F8:
mov	ecx, [ebx+9578h]
push	ebp
add	ecx, 670h
call	sub_835AA0
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	4
sub_8373A0 endp

align 10h



sub_837420 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+4]
push	edx
call	sub_8373A0
mov	ecx, [eax]
mov	edx, ecx
and	edx, 3FC0h
neg	edx
sbb	edx, edx
inc	edx
shl	edx, 6
xor	edx, ecx
and	edx, 3FC0h
xor	edx, ecx
mov	[eax], edx
retn	4
sub_837420 endp

align 10h



sub_837450 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
cmp	esi, 0FFFFFFFFh
jz	loc_837502
push	ebx

loc_837462:
push	esi
mov	ecx, edi
call	sub_8373A0
mov	ecx, [eax]
mov	edx, ecx
and	edx, 3Fh
cmp	dl, 1Bh
jnz	short loc_837491
mov	edx, ecx
and	edx, 7F800000h
or	edx, 340000h
shr	edx, 11h
and	ecx, 7FC000h
or	edx, ecx
mov	[eax], edx

loc_837491:
mov	eax, [edi+9578h]
mov	ebx, [eax+0E98h]
add	eax, 670h
mov	ecx, esi
mov	edx, esi
shr	ecx, 9
shr	ebx, 9
and	edx, 1FFh
cmp	ebx, ecx
jnz	short loc_8374C7
mov	eax, [eax+81Ch]
mov	ecx, [eax+800h]
lea	eax, [ecx+edx*4]
jmp	short loc_8374E5

loc_8374C7:
mov	eax, [eax+818h]
test	ecx, ecx
jbe	short loc_8374DC

loc_8374D1:
sub	ecx, 1
mov	eax, [eax+804h]
jnz	short loc_8374D1

loc_8374DC:
mov	eax, [eax+800h]
lea	eax, [eax+edx*4]

loc_8374E5:
mov	eax, [eax]
shr	eax, 0Eh
sub	eax, 1FFFFh
cmp	eax, 0FFFFFFFFh
jz	short loc_837501
lea	esi, [esi+eax+1]
cmp	esi, 0FFFFFFFFh
jnz	loc_837462

loc_837501:
pop	ebx

loc_837502:
pop	edi
pop	esi
retn	4
sub_837450 endp

align 10h



sub_837510 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
mov	edi, ecx
cmp	esi, 0FFFFFFFFh
jz	short loc_83755B
lea	ecx, [ecx+0]

loc_837520:
push	esi
mov	ecx, edi
call	sub_8373A0
mov	eax, [eax]
and	eax, 3Fh
cmp	al, 1Bh
jnz	short loc_837562
mov	ecx, [edi+9578h]
push	esi
add	ecx, 670h
call	sub_835AA0
mov	eax, [eax]
shr	eax, 0Eh
sub	eax, 1FFFFh
cmp	eax, 0FFFFFFFFh
jz	short loc_83755B
lea	esi, [esi+eax+1]
cmp	esi, 0FFFFFFFFh
jnz	short loc_837520

loc_83755B:
pop	edi
xor	eax, eax
pop	esi
retn	4

loc_837562:
pop	edi
mov	eax, 1
pop	esi
retn	4
sub_837510 endp

align 10h



sub_837570 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+260h], 0
jz	short loc_8375C7
mov	ecx, [edi+258h]
mov	eax, [ecx+240h]
test	eax, eax
jz	short loc_8375C7
lea	esp, [esp+0]

loc_837590:
mov	edx, [ecx+240h]
add	edx, 210h
cmp	eax, edx
jnz	short loc_8375B8
mov	ecx, [ecx+244h]
test	ecx, ecx
jz	short loc_8375B2
mov	eax, [ecx+240h]
jmp	short loc_8375BB

loc_8375B2:
xor	eax, eax
xor	ecx, ecx
jmp	short loc_8375BB

loc_8375B8:
add	eax, 30h

loc_8375BB:
cmp	eax, [edi+264h]
jz	short loc_8375C7
test	eax, eax
jnz	short loc_837590

loc_8375C7:
mov	eax, [edi+258h]
mov	eax, [eax+244h]
test	eax, eax
jz	short loc_8375F9
push	esi
jmp	short loc_8375E0
align 10h

loc_8375E0:
mov	ecx, [edi]
mov	esi, [eax+244h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_8375E0
pop	esi

loc_8375F9:
pop	edi
retn
sub_837570 endp

align 10h



sub_837600 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+420h], 0
jz	short loc_837657
mov	ecx, [edi+418h]
mov	eax, [ecx+400h]
test	eax, eax
jz	short loc_837657
lea	esp, [esp+0]

loc_837620:
mov	edx, [ecx+400h]
add	edx, 3F0h
cmp	eax, edx
jnz	short loc_837648
mov	ecx, [ecx+404h]
test	ecx, ecx
jz	short loc_837642
mov	eax, [ecx+400h]
jmp	short loc_83764B

loc_837642:
xor	eax, eax
xor	ecx, ecx
jmp	short loc_83764B

loc_837648:
add	eax, 10h

loc_83764B:
cmp	eax, [edi+424h]
jz	short loc_837657
test	eax, eax
jnz	short loc_837620

loc_837657:
mov	eax, [edi+418h]
mov	eax, [eax+404h]
test	eax, eax
jz	short loc_837689
push	esi
jmp	short loc_837670
align 10h

loc_837670:
mov	ecx, [edi]
mov	esi, [eax+404h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_837670
pop	esi

loc_837689:
pop	edi
retn
sub_837600 endp

align 10h



sub_837690 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+320h], 0
jz	short loc_8376E7
mov	ecx, [edi+318h]
mov	eax, [ecx+300h]
test	eax, eax
jz	short loc_8376E7
lea	esp, [esp+0]

loc_8376B0:
mov	edx, [ecx+300h]
add	edx, 2F4h
cmp	eax, edx
jnz	short loc_8376D8
mov	ecx, [ecx+304h]
test	ecx, ecx
jz	short loc_8376D2
mov	eax, [ecx+300h]
jmp	short loc_8376DB

loc_8376D2:
xor	eax, eax
xor	ecx, ecx
jmp	short loc_8376DB

loc_8376D8:
add	eax, 0Ch

loc_8376DB:
cmp	eax, [edi+324h]
jz	short loc_8376E7
test	eax, eax
jnz	short loc_8376B0

loc_8376E7:
mov	eax, [edi+318h]
mov	eax, [eax+304h]
test	eax, eax
jz	short loc_837719
push	esi
jmp	short loc_837700
align 10h

loc_837700:
mov	ecx, [edi]
mov	esi, [eax+304h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_837700
pop	esi

loc_837719:
pop	edi
retn
sub_837690 endp

align 10h



sub_837720 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+0E0h], 0
jz	short loc_837777
mov	ecx, [edi+0D8h]
mov	eax, [ecx+0C0h]
test	eax, eax
jz	short loc_837777
lea	esp, [esp+0]

loc_837740:
mov	edx, [ecx+0C0h]
add	edx, 0B4h
cmp	eax, edx
jnz	short loc_837768
mov	ecx, [ecx+0C4h]
test	ecx, ecx
jz	short loc_837762
mov	eax, [ecx+0C0h]
jmp	short loc_83776B

loc_837762:
xor	eax, eax
xor	ecx, ecx
jmp	short loc_83776B

loc_837768:
add	eax, 0Ch

loc_83776B:
cmp	eax, [edi+0E4h]
jz	short loc_837777
test	eax, eax
jnz	short loc_837740

loc_837777:
mov	eax, [edi+0D8h]
mov	eax, [eax+0C4h]
test	eax, eax
jz	short loc_8377A9
push	esi
jmp	short loc_837790
align 10h

loc_837790:
mov	ecx, [edi]
mov	esi, [eax+0C4h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_837790
pop	esi

loc_8377A9:
pop	edi
retn
sub_837720 endp

align 10h



sub_8377B0 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+160h], 0
jz	short loc_837807
mov	ecx, [edi+158h]
mov	eax, [ecx+140h]
test	eax, eax
jz	short loc_837807
lea	esp, [esp+0]

loc_8377D0:
mov	edx, [ecx+140h]
add	edx, 12Ch
cmp	eax, edx
jnz	short loc_8377F8
mov	ecx, [ecx+144h]
test	ecx, ecx
jz	short loc_8377F2
mov	eax, [ecx+140h]
jmp	short loc_8377FB

loc_8377F2:
xor	eax, eax
xor	ecx, ecx
jmp	short loc_8377FB

loc_8377F8:
add	eax, 14h

loc_8377FB:
cmp	eax, [edi+164h]
jz	short loc_837807
test	eax, eax
jnz	short loc_8377D0

loc_837807:
mov	eax, [edi+158h]
mov	eax, [eax+144h]
test	eax, eax
jz	short loc_837839
push	esi
jmp	short loc_837820
align 10h

loc_837820:
mov	ecx, [edi]
mov	esi, [eax+144h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_837820
pop	esi

loc_837839:
pop	edi
retn
sub_8377B0 endp

align 10h



sub_837840 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+520h], 0
jz	short loc_837897
mov	ecx, [edi+518h]
mov	eax, [ecx+500h]
test	eax, eax
jz	short loc_837897
lea	esp, [esp+0]

loc_837860:
mov	edx, [ecx+500h]
add	edx, 4ECh
cmp	eax, edx
jnz	short loc_837888
mov	ecx, [ecx+504h]
test	ecx, ecx
jz	short loc_837882
mov	eax, [ecx+500h]
jmp	short loc_83788B

loc_837882:
xor	eax, eax
xor	ecx, ecx
jmp	short loc_83788B

loc_837888:
add	eax, 14h

loc_83788B:
cmp	eax, [edi+524h]
jz	short loc_837897
test	eax, eax
jnz	short loc_837860

loc_837897:
mov	eax, [edi+518h]
mov	eax, [eax+504h]
test	eax, eax
jz	short loc_8378C9
push	esi
jmp	short loc_8378B0
align 10h

loc_8378B0:
mov	ecx, [edi]
mov	esi, [eax+504h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_8378B0
pop	esi

loc_8378C9:
pop	edi
retn
sub_837840 endp

align 10h



sub_8378D0 proc	near
push	edi
mov	edi, ecx
cmp	dword ptr [edi+1A0h], 0
jz	short loc_837927
mov	ecx, [edi+198h]
mov	eax, [ecx+180h]
test	eax, eax
jz	short loc_837927
lea	esp, [esp+0]

loc_8378F0:
mov	edx, [ecx+180h]
add	edx, 168h
cmp	eax, edx
jnz	short loc_837918
mov	ecx, [ecx+184h]
test	ecx, ecx
jz	short loc_837912
mov	eax, [ecx+180h]
jmp	short loc_83791B

loc_837912:
xor	eax, eax
xor	ecx, ecx
jmp	short loc_83791B

loc_837918:
add	eax, 18h

loc_83791B:
cmp	eax, [edi+1A4h]
jz	short loc_837927
test	eax, eax
jnz	short loc_8378F0

loc_837927:
mov	eax, [edi+198h]
mov	eax, [eax+184h]
test	eax, eax
jz	short loc_837959
push	esi
jmp	short loc_837940
align 10h

loc_837940:
mov	ecx, [edi]
mov	esi, [eax+184h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_837940
pop	esi

loc_837959:
pop	edi
retn
sub_8378D0 endp

align 10h



sub_837960 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
push	eax
lea	ecx, [esi+10h]
mov	[esi], eax
mov	[esi+4], ebx
mov	[esi+8], ebx
call	sub_8360B0
mov	eax, [esi]
push	eax
lea	ecx, [esi+240h]
call	sub_8368A0
mov	ecx, [esi]
push	ecx
lea	ecx, [esi+670h]
call	sub_8362E0
mov	edx, [esi]
push	edx
lea	ecx, [esi+0EA0h]
call	sub_8362E0
mov	ecx, [esi]
mov	eax, [esp+18h+arg_8]
mov	[esi+16D0h], eax
mov	dword ptr [esi+16D4h], 0FFFFFFFFh
mov	[esi+16D8h], ebx
mov	dword ptr [esi+16DCh], 2
lea	eax, [esi+16E8h]
mov	[esi+16E0h], ecx
mov	[eax+20h], eax
mov	[eax+24h], ebx
mov	[eax+28h], ebx
mov	[esi+1724h], ebx
mov	[esi+172Ch], ebx
mov	[esi+1720h], ebx
mov	[esi+1728h], ebx
mov	[esi+1718h], eax
mov	[esi+171Ch], eax
mov	edx, [eax+20h]
mov	[esi+1724h], edx
mov	dword ptr [esi+172Ch], 8
mov	eax, [esi]
push	eax
lea	ecx, [esi+1730h]
call	sub_836980
lea	eax, [esi+1A60h]
lea	ecx, [eax-1]
mov	[eax+0D4h], ecx
mov	[eax+0D0h], eax
mov	edx, [esi]
push	edx
lea	ecx, [esi+1B38h]
call	sub_8369E0
mov	eax, [esi]
push	eax
lea	ecx, [esi+1C40h]
mov	[esi+1C28h], bl
mov	[esi+1C2Ch], ebx
mov	[esi+1C30h], ebx
mov	[esi+1C34h], ebx
mov	[esi+1C38h], ebx
mov	dword ptr [esi+1C3Ch], 0FFFFFFFFh
call	sub_836A40
mov	ecx, [esi]
push	ecx
lea	ecx, [esi+1DB0h]
call	sub_836B50
mov	edx, [esi]
push	edx
lea	ecx, [esi+22E0h]
call	sub_836BB0
fldz
mov	eax, [esp+18h+arg_4]
fstp	[esp+18h+var_C]
mov	[esi+2494h], eax
mov	[esp+18h+var_4], esi
mov	[esp+18h+var_8], 2
mov	[esp+18h+var_10], 3
mov	ecx, [eax+14h]
test	dword ptr [ecx+8], 0F0000000h
mov	eax, [esi]
lea	edx, [esp+18h+var_10]
push	edx
lea	edx, [esp+1Ch+var_8]
push	edx
push	eax
jz	short loc_837AE1
call	sub_822950
jmp	short loc_837AE6

loc_837AE1:
call	sub_820D20

loc_837AE6:
mov	eax, [esi]
push	10h
push	ebx
push	eax
call	sub_81FF50
mov	ecx, [esi+2494h]
add	esp, 0Ch
lea	edx, [esp+18h+var_10]
push	edx
mov	[esi+8], eax
mov	[esp+1Ch+var_C], eax
mov	eax, [esi]
mov	[esp+1Ch+var_10], 5
mov	ecx, [ecx+14h]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+1Ch+var_8]
push	edx
push	eax
jz	short loc_837B31
call	sub_822950
mov	eax, esi
pop	esi
pop	ebx
add	esp, 10h
retn	0Ch

loc_837B31:
call	sub_820D20
mov	eax, esi
pop	esi
pop	ebx
add	esp, 10h
retn	0Ch
sub_837960 endp




sub_837B40 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8

sub	esp, 10h
push	esi
mov	esi, ecx
mov	eax, [esi+2494h]
push	edi
lea	edx, [esp+18h+var_8]
push	edx
mov	[esp+1Ch+var_C], esi
mov	[esp+1Ch+var_10], 2
mov	[esp+1Ch+var_8], 0
mov	ecx, [eax+14h]
test	dword ptr [ecx+8], 0F0000000h
mov	eax, [esi]
lea	edx, [esp+1Ch+var_10]
push	edx
push	eax
jz	short loc_837B81
call	sub_822950
jmp	short loc_837B86

loc_837B81:
call	sub_820D20

loc_837B86:
lea	ecx, [esi+22E0h]
call	sub_8378D0
lea	ecx, [esi+1DB0h]
call	sub_837840
lea	ecx, [esi+1C40h]
call	sub_8377B0
lea	ecx, [esi+1B38h]
call	sub_837720
lea	ecx, [esi+1730h]
call	sub_837690
mov	eax, [esi+1718h]
mov	eax, [eax+24h]
test	eax, eax
jz	short loc_837BE9
lea	ebx, [ebx+0]

loc_837BD0:
mov	ecx, [esi+16E0h]
mov	edi, [eax+24h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, edi
test	edi, edi
jnz	short loc_837BD0

loc_837BE9:
mov	edx, [esi+16B8h]
mov	eax, [edx+804h]
test	eax, eax
jz	short loc_837C1C
lea	esp, [esp+0]

loc_837C00:
mov	edi, [eax+804h]
push	eax
mov	eax, [esi+0EA0h]
push	eax
call	sub_82C6D0
add	esp, 8
mov	eax, edi
test	edi, edi
jnz	short loc_837C00

loc_837C1C:
mov	ecx, [esi+0E88h]
mov	eax, [ecx+804h]
test	eax, eax
jz	short loc_837C4C
lea	esp, [esp+0]

loc_837C30:
mov	edx, [esi+670h]
mov	edi, [eax+804h]
push	eax
push	edx
call	sub_82C6D0
add	esp, 8
mov	eax, edi
test	edi, edi
jnz	short loc_837C30

loc_837C4C:
lea	ecx, [esi+240h]
call	sub_837600
mov	eax, [esi+228h]
mov	eax, [eax+204h]
test	eax, eax
jz	short loc_837C89
jmp	short loc_837C70
align 10h

loc_837C70:
mov	ecx, [esi+10h]
mov	edi, [eax+204h]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	eax, edi
test	edi, edi
jnz	short loc_837C70

loc_837C89:
pop	edi
pop	esi
add	esp, 10h
retn
sub_837B40 endp

align 10h



sub_837C90 proc	near
push	esi
push	edi
mov	esi, ecx
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	0Ch
push	offset aMainChunk ; "(main chunk)"
push	eax
add	ecx, 2A0h
call	sub_81FD20
lea	ecx, [esi+2F8h]
mov	edi, eax
call	sub_836670
test	eax, eax
jz	short loc_837CDA
mov	ecx, [esi+0Ch]
push	edi
push	esi
push	ecx
mov	ecx, eax
call	sub_837960
mov	edx, [esi+9578h]
pop	edi
mov	byte ptr [edx+1C28h], 2
pop	esi
retn

loc_837CDA:
mov	eax, [esi+9578h]
pop	edi
mov	byte ptr [eax+1C28h], 2
pop	esi
retn
sub_837C90 endp

align 10h



sub_837CF0 proc	near
mov	ecx, [ecx+9578h]
add	ecx, 1DB0h
jmp	sub_835C90
sub_837CF0 endp

align 10h



sub_837D10 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
mov	edx, [ecx+4]
push	edi
push	edx
lea	ecx, [eax+670h]
call	sub_835AA0
mov	esi, [esi+9578h]
mov	edi, eax
mov	eax, [esi+22D0h]
mov	ecx, [eax+4]
push	ecx
lea	ecx, [esi+670h]
call	sub_835AA0
mov	edx, [edi]
and	edx, 0FF807FFFh
or	edx, 4000h
pop	edi
mov	[eax], edx
pop	esi
retn
sub_837D10 endp

align 10h



sub_837D60 proc	near
mov	eax, [ecx+9578h]
mov	ecx, [eax+22D0h]
xor	eax, eax
cmp	dword ptr [ecx], 0Dh
setz	al
retn
sub_837D60 endp

align 10h



sub_837D80 proc	near

arg_0= dword ptr  4

cmp	[esp+arg_0], 1
push	esi
mov	esi, ecx
jnz	short loc_837DFF
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
mov	eax, [ecx]
cmp	eax, 6
jl	short loc_837DA2
cmp	eax, 9
jle	short loc_837DAF

loc_837DA2:
mov	ecx, [esi+10h]
push	offset aSyntaxErrorNon ; "syntax error (non-variable on	the right"...
call	sub_83EDE0

loc_837DAF:
mov	eax, [esi+9578h]
mov	edx, [eax+1DA4h]
lea	ecx, [eax+1C40h]
mov	eax, [eax+22D0h]
push	edi
mov	edi, [eax]
mov	[edx], edi
mov	edi, [eax+4]
mov	[edx+4], edi
mov	edi, [eax+8]
mov	[edx+8], edi
mov	edi, [eax+0Ch]
mov	[edx+0Ch], edi
mov	eax, [eax+10h]
mov	[edx+10h], eax
call	sub_836AA0
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_836510
pop	edi
pop	esi
retn	4

loc_837DFF:
mov	ecx, [esi+9578h]
mov	edx, [ecx+1DA0h]
mov	eax, [edx]
cmp	eax, 6
jl	short loc_837E17
cmp	eax, 9
jle	short loc_837E24

loc_837E17:
mov	ecx, [esi+10h]
push	offset aSyntaxErrorN_0 ; "syntax error (non-variable on	the right"...
call	sub_83EDE0

loc_837E24:
pop	esi
retn	4
sub_837D80 endp

align 10h



; int __stdcall	sub_837E30(float)
sub_837E30 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+9578h]
mov	eax, [eax+22D0h]
test	eax, eax
jz	short locret_837E56
fld	[esp+arg_0]
or	ecx, 0FFFFFFFFh
fstp	dword ptr [eax+4]
mov	dword ptr [eax], 5
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx

locret_837E56:
retn	4
sub_837E30 endp

align 10h



sub_837E60 proc	near
mov	eax, [ecx+9578h]
mov	eax, [eax+22D0h]
test	eax, eax
jz	short locret_837E86
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], 1
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	dword ptr [eax+4], 0

locret_837E86:
retn
sub_837E60 endp

align 10h



sub_837E90 proc	near
mov	eax, [ecx+9578h]
mov	eax, [eax+22D0h]
test	eax, eax
jz	short locret_837EB6
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], 2
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	dword ptr [eax+4], 0

locret_837EB6:
retn
sub_837E90 endp

align 10h



sub_837EC0 proc	near
mov	eax, [ecx+9578h]
mov	eax, [eax+22D0h]
test	eax, eax
jz	short locret_837EE6
or	ecx, 0FFFFFFFFh
mov	dword ptr [eax], 3
mov	[eax+0Ch], ecx
mov	[eax+10h], ecx
mov	dword ptr [eax+4], 0

locret_837EE6:
retn
sub_837EC0 endp

align 10h



sub_837EF0 proc	near
mov	ecx, [ecx+9578h]
add	ecx, 1DB0h
jmp	sub_836510
sub_837EF0 endp

align 10h



sub_837F10 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+278h]
cmp	dword ptr [esi+1Ch], 7FFFFFFFh
jbe	short loc_837F32
push	offset aArrayItemsInAT ; "array	items in a table constructor."
push	7FFFFFFFh	; ArgList
call	sub_835EF0

loc_837F32:
mov	eax, [edi+9578h]
mov	eax, [eax+22D0h]
mov	ecx, [eax]
mov	[esi], ecx
mov	edx, [eax+4]
mov	[esi+4], edx
mov	ecx, [eax+8]
mov	[esi+8], ecx
mov	edx, [eax+0Ch]
mov	[esi+0Ch], edx
mov	eax, [eax+10h]
mov	[esi+10h], eax
mov	ecx, [edi+9578h]
add	ecx, 1DB0h
call	sub_835C90
mov	eax, 1
add	[esi+1Ch], eax
add	[esi+20h], eax
pop	edi
pop	esi
retn
sub_837F10 endp

align 10h



sub_837F80 proc	near
mov	eax, [ecx+9578h]
mov	edx, [ecx+278h]
mov	eax, [eax+16D8h]
mov	[edx+24h], eax
mov	ecx, [ecx+9578h]
add	ecx, 1DB0h
jmp	sub_836510
sub_837F80 endp

align 10h



sub_837FB0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+1C30h]
push	ecx
mov	ecx, esi
call	sub_8370F0
mov	eax, [esi+9578h]
movzx	edx, byte ptr [eax+1C28h]
mov	ecx, [eax+1B34h]
and	edx, 1
sub	ecx, edx
sub	ecx, [eax+1B30h]
inc	ecx
mov	[eax+1C30h], ecx
mov	eax, [esi+9578h]
mov	edx, [eax+1B34h]
sub	edx, [eax+1B30h]
add	eax, 1A60h
inc	edx
push	edx
mov	ecx, esi
call	sub_836FB0
pop	esi
retn
sub_837FB0 endp

align 10h



sub_838010 proc	near
push	esi
push	0
mov	esi, ecx
call	sub_8370F0
mov	eax, [esi+9578h]
movzx	ecx, byte ptr [eax+1C28h]
mov	edx, [eax+1B34h]
and	ecx, 1
sub	edx, ecx
sub	edx, [eax+1B30h]
inc	edx
mov	[eax+1C30h], edx
mov	eax, [esi+9578h]
mov	ecx, [eax+1B34h]
sub	ecx, [eax+1B30h]
add	eax, 1A60h
inc	ecx
push	ecx
mov	ecx, esi
call	sub_836FB0
pop	esi
retn
sub_838010 endp

align 10h



sub_838070 proc	near
mov	eax, [ecx+9578h]
mov	ecx, [eax+22D0h]
mov	dword ptr [ecx], 0
retn
sub_838070 endp

align 10h



sub_838090 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_836510
mov	eax, [esi+9578h]
mov	dword ptr [eax+2490h], 0
pop	esi
retn
sub_838090 endp

align 10h



sub_8380C0 proc	near
mov	eax, [ecx+9578h]
mov	edx, [eax+22D0h]
mov	dword ptr [edx], 0
mov	dword ptr [ecx+958Ch], 0
retn
sub_8380C0 endp

align 10h



sub_8380E0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
lea	ecx, [eax+22E0h]
call	sub_8365C0
test	eax, eax
jz	short loc_838105
mov	dword ptr [eax], 2
mov	dword ptr [eax+14h], 0FFFFFFFFh

loc_838105:
mov	eax, [esi+9578h]
mov	ecx, [eax+0E98h]
mov	[eax+1C3Ch], ecx
mov	eax, [esi+9578h]
mov	edx, [eax+2480h]
mov	eax, [eax+0E98h]
mov	[edx+4], eax
mov	eax, [esi+9578h]
lea	ecx, [eax+240h]
call	sub_836110
test	eax, eax
jz	short loc_838171
mov	edx, [esi+9578h]
mov	ecx, [edx+1B34h]
sub	ecx, [edx+1B30h]
add	edx, 1A60h
inc	ecx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], cl
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 1

loc_838171:
mov	eax, [esi+9578h]
lea	ecx, [eax+240h]
call	sub_836110
test	eax, eax
jz	short loc_8381B6
mov	esi, [esi+9578h]
mov	ecx, [esi+1B34h]
sub	ecx, [esi+1B30h]
add	esi, 1A60h
inc	ecx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], cl
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0

loc_8381B6:
pop	esi
retn
sub_8380E0 endp

align 10h



sub_8381C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
call	sub_9E28B0
mov	ecx, [esi+9578h]
mov	edx, [ecx+2480h]
mov	[edx+4], eax
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
pop	esi
jmp	sub_836510
sub_8381C0 endp

align 10h



sub_8381F0 proc	near
push	3
call	sub_8370F0
retn
sub_8381F0 endp

align 10h



sub_838200 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
lea	ecx, [eax+240h]
call	sub_836110
test	eax, eax
jz	short loc_838248
mov	edx, [esi+9578h]
mov	ecx, [edx+1B34h]
sub	ecx, [edx+1B30h]
add	edx, 1A60h
inc	ecx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], cl
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 1

loc_838248:
pop	esi
retn
sub_838200 endp

align 10h



sub_838250 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebp
mov	ebp, [esp+4+arg_0]
mov	eax, [ebp+0]
push	esi
push	edi
mov	esi, ecx
cmp	eax, 0Dh
jnz	short loc_83829C
mov	esi, [esi+9578h]
mov	ebp, [ebp+4]
add	esi, 670h
push	ebp
mov	ecx, esi
call	sub_835AA0
push	ebp
mov	ecx, esi
mov	edi, eax
call	sub_835AA0
mov	ecx, [esp+0Ch+arg_4]
inc	ecx
shl	ecx, 0Eh
xor	ecx, [edi]
and	ecx, 7FC000h
xor	ecx, [edi]
pop	edi
pop	esi
mov	[eax], ecx
pop	ebp
retn	8

loc_83829C:
cmp	eax, 0Eh
jnz	loc_838327
mov	eax, [esi+9578h]
mov	edi, [ebp+4]
push	ebx
lea	ebx, [eax+670h]
push	edi
mov	ecx, ebx
call	sub_835AA0
push	edi
mov	ecx, ebx
mov	[esp+14h+arg_0], eax
call	sub_835AA0
mov	edx, [esp+10h+arg_4]
mov	ecx, [esp+10h+arg_0]
mov	ecx, [ecx]
inc	edx
and	ecx, offset loc_7FFFFF
shl	edx, 17h
xor	edx, ecx
mov	[eax], edx
mov	edi, [ebp+4]
mov	ebx, [esi+9578h]
push	edi
lea	ecx, [ebx+670h]
call	sub_835AA0
mov	ecx, ebx
push	edi
add	ecx, 670h
mov	ebp, eax
call	sub_835AA0
mov	edx, [ebx+16D8h]
shl	edx, 6
xor	edx, [ebp+0]
push	1
and	edx, 3FC0h
xor	edx, [ebp+0]
mov	ecx, esi
mov	[eax], edx
call	sub_836FB0
pop	ebx

loc_838327:
pop	edi
pop	esi
pop	ebp
retn	8
sub_838250 endp

align 10h



sub_838330 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+9578h]
push	ebx
add	ecx, 670h
call	sub_835AA0
mov	esi, [esp+10h+arg_4]
sub	esi, ebx
dec	esi
mov	[esp+10h+arg_0], esi
fild	[esp+10h+arg_0]
mov	ebp, eax
fabs
fstp	[esp+10h+arg_0]
fld	[esp+10h+arg_0]
fcomp	ds:dbl_14698B8
fnstsw	ax
test	ah, 41h
jnz	short loc_838381
mov	ecx, [edi+10h]
push	offset aControlStructu ; "Control structure contains too many ins"...
call	sub_83EDE0

loc_838381:
mov	eax, [ebp+0]
add	esi, 1FFFFh
shl	esi, 0Eh
and	eax, 3FFFh
xor	esi, eax
pop	edi
mov	[ebp+0], esi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_838330 endp

align 10h



sub_8383A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [eax]
cmp	ecx, 0Dh
jnz	short loc_8383D9
mov	eax, [eax+4]
mov	ecx, [esi+9578h]
push	eax
add	ecx, 670h
call	sub_835AA0
mov	ecx, [esp+4+arg_4]
inc	ecx
shl	ecx, 0Eh
xor	ecx, [eax]
pop	esi
and	ecx, 7FC000h
xor	[eax], ecx
retn	8

loc_8383D9:
cmp	ecx, 0Eh
jnz	short loc_83842B
mov	edx, [eax+4]
mov	ecx, [esi+9578h]
push	edx
add	ecx, 670h
call	sub_835AA0
mov	edx, [eax]
mov	ecx, [esp+4+arg_4]
and	edx, offset loc_7FFFFF
inc	ecx
shl	ecx, 17h
xor	ecx, edx
mov	[eax], ecx
mov	edx, [esi+9578h]
mov	edx, [edx+16D8h]
shl	edx, 6
xor	edx, ecx
and	edx, 3FC0h
xor	edx, ecx
push	1
mov	ecx, esi
mov	[eax], edx
call	sub_836FB0

loc_83842B:
pop	esi
retn	8
sub_8383A0 endp

align 10h



sub_838430 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
cmp	eax, 0Dh
jnz	short loc_838469
mov	eax, [esi+4]
mov	dword ptr [esi], 0Ch
mov	ecx, [ecx+9578h]
push	eax
add	ecx, 670h
call	sub_835AA0
mov	ecx, [eax]
shr	ecx, 6
and	ecx, 0FFh
mov	[esi+4], ecx
pop	esi
retn	4

loc_838469:
cmp	eax, 0Eh
jnz	short loc_8384AC
mov	eax, [ecx+9578h]
push	ebx
push	ebp
push	edi
mov	edi, [esi+4]
lea	ebx, [eax+670h]
push	edi
mov	ecx, ebx
call	sub_835AA0
push	edi
mov	ecx, ebx
mov	ebp, eax
call	sub_835AA0
mov	edx, [ebp+0]
and	edx, offset loc_7FFFFF
pop	edi
or	edx, 1000000h
pop	ebp
mov	[eax], edx
mov	dword ptr [esi], 0Bh
pop	ebx

loc_8384AC:
pop	esi
retn	4
sub_838430 endp




sub_8384B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+9578h]
mov	eax, [esi+1B34h]
sub	eax, [esi+1B30h]
lea	ecx, [eax+ebx+2]
cmp	ecx, 0C8h
jbe	short loc_8384E8
push	offset aLocalVariables ; "local	variables"
push	0C8h		; ArgList
mov	ecx, edi
call	sub_835EF0

loc_8384E8:
mov	edi, [edi+9578h]
mov	eax, [edi+1A54h]
mov	edx, [esp+0Ch+arg_0]
xor	ecx, ecx
mov	[eax+8], ecx
mov	[eax+4], ecx
lea	ecx, [edi+1730h]
mov	[eax], edx
call	sub_836340
mov	ecx, [esi+1B30h]
mov	al, [edi+1A58h]
sub	ecx, ecx
add	ecx, [esi+1B34h]
pop	edi
dec	al
pop	esi
mov	[ecx+ebx+1], al
pop	ebx
retn	8
sub_8384B0 endp

align 10h



sub_838530 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10h
push	ebx
mov	ebx, [esp+14h+arg_0]
push	edi
mov	edi, ecx
mov	eax, [edi+9578h]
mov	ecx, [eax+8]
test	dword ptr [ecx+8], 0F0000000h
mov	eax, [edi+0Ch]
lea	edx, [esp+18h+var_10]
push	edx
push	ebx
push	eax
jz	short loc_83855E
call	sub_822100
jmp	short loc_838563

loc_83855E:
call	sub_820740

loc_838563:
cmp	[esp+18h+var_10], 3
jnz	short loc_838576
mov	eax, [esp+18h+var_C]
pop	edi
pop	ebx
add	esp, 10h
retn	4

loc_838576:
push	esi
mov	esi, [edi+9578h]
mov	eax, [esi+234h]
add	esi, 10h
cmp	dword ptr [ebx], 5
jnz	short loc_838595
xor	ecx, ecx
mov	[eax], ecx
mov	ecx, [esp+1Ch+var_4]
jmp	short loc_83859C

loc_838595:
mov	edx, [ebx]
mov	[eax], edx
mov	ecx, [ebx+4]

loc_83859C:
mov	[eax+4], ecx
mov	ecx, esi
call	sub_8367F0
mov	esi, [esi+228h]
mov	edx, [edi+9578h]
mov	edi, [edi+0Ch]
dec	esi
mov	[esp+1Ch+var_8], 3
mov	[esp+1Ch+var_4], esi
mov	ecx, [edx+8]
test	dword ptr [ecx+8], 0F0000000h
jz	short loc_8385E5
lea	eax, [esp+1Ch+var_8]
push	eax
push	ebx
push	edi
call	sub_822950
mov	eax, esi
pop	esi
pop	edi
pop	ebx
add	esp, 10h
retn	4

loc_8385E5:
lea	edx, [esp+1Ch+var_8]
push	edx
push	ebx
push	edi
call	sub_820D20
mov	eax, esi
pop	esi
pop	edi
pop	ebx
add	esp, 10h
retn	4
sub_838530 endp

align 10h



sub_838600 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebp
push	esi
mov	esi, [esp+8+arg_0]
mov	ebp, ecx
cmp	esi, 0FFFFFFFFh
jz	loc_838706
push	ebx
mov	ebx, [esp+0Ch+arg_C]
push	edi
jmp	short loc_838620
align 10h

loc_838620:
mov	eax, [ebp+9578h]
mov	edi, [eax+0E98h]
add	eax, 670h
mov	ecx, esi
mov	edx, esi
shr	ecx, 9
shr	edi, 9
and	edx, 1FFh
cmp	edi, ecx
jnz	short loc_838656
mov	eax, [eax+81Ch]
mov	ecx, [eax+800h]
lea	eax, [ecx+edx*4]
jmp	short loc_838674

loc_838656:
mov	eax, [eax+818h]
test	ecx, ecx
jbe	short loc_83866B

loc_838660:
sub	ecx, 1
mov	eax, [eax+804h]
jnz	short loc_838660

loc_83866B:
mov	eax, [eax+800h]
lea	eax, [eax+edx*4]

loc_838674:
mov	eax, [eax]
shr	eax, 0Eh
sub	eax, 1FFFFh
cmp	eax, 0FFFFFFFFh
jnz	short loc_838687
or	edi, eax
jmp	short loc_83868B

loc_838687:
lea	edi, [eax+esi+1]

loc_83868B:
push	esi
mov	ecx, ebp
call	sub_8373A0
mov	ecx, [eax]
mov	edx, ecx
and	edx, 3Fh
cmp	dl, 1Bh
jnz	short loc_8386F0
cmp	[esp+10h+arg_8], 0FFh
jz	short loc_8386CE
mov	edx, ecx
shr	edx, 17h
cmp	[esp+10h+arg_8], edx
jz	short loc_8386CE
mov	edx, [esp+10h+arg_8]
shl	edx, 6
xor	edx, ecx
and	edx, 3FC0h
xor	edx, ecx
mov	[eax], edx
mov	eax, [esp+10h+arg_4]
push	eax
jmp	short loc_8386F1

loc_8386CE:
mov	edx, ecx
and	edx, 7F800000h
or	edx, 340000h
shr	edx, 11h
and	ecx, 7FC000h
or	edx, ecx
mov	[eax], edx
mov	eax, [esp+10h+arg_4]
push	eax
jmp	short loc_8386F1

loc_8386F0:
push	ebx

loc_8386F1:
push	esi
mov	ecx, ebp
call	sub_838330
mov	esi, edi
cmp	edi, 0FFFFFFFFh
jnz	loc_838620
pop	edi
pop	ebx

loc_838706:
pop	esi
pop	ebp
retn	10h
sub_838600 endp

align 10h



sub_838710 proc	near
push	ebx
mov	ebx, ecx
cmp	dword ptr [ebx+9280h], 0
push	esi
jz	short loc_838771
push	edi
mov	edi, [ebx+9278h]
mov	esi, [edi+9260h]
test	esi, esi
jz	short loc_838770
mov	edi, edi

loc_838730:
mov	ecx, esi
call	sub_837B40
mov	eax, [edi+9260h]
add	eax, 6DC8h
cmp	esi, eax
jnz	short loc_83875E
mov	edi, [edi+9264h]
test	edi, edi
jz	short loc_838758
mov	esi, [edi+9260h]
jmp	short loc_838764

loc_838758:
xor	esi, esi
xor	edi, edi
jmp	short loc_838764

loc_83875E:
add	esi, 2498h

loc_838764:
cmp	esi, [ebx+9284h]
jz	short loc_838770
test	esi, esi
jnz	short loc_838730

loc_838770:
pop	edi

loc_838771:
mov	ecx, [ebx+9278h]
mov	eax, [ecx+9264h]
test	eax, eax
jz	short loc_838799

loc_838781:
mov	edx, [ebx]
mov	esi, [eax+9264h]
push	eax
push	edx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_838781

loc_838799:
pop	esi
pop	ebx
retn
sub_838710 endp

align 10h



sub_8387A0 proc	near

var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 10h
mov	eax, [esp+10h+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+14h+arg_4]
push	edi
mov	[esi+10h], ecx
push	eax
lea	ecx, [esi+18h]
mov	dword ptr [esi], offset	off_14698C4
mov	[esi+0Ch], eax
call	sub_836790
mov	edx, [esi+0Ch]
lea	eax, [esi+290h]
xor	edi, edi
mov	[esi+288h], edx
mov	[eax+40h], eax
mov	[eax+44h], edi
mov	[eax+48h], edi
mov	[esi+2ECh], edi
mov	[esi+2F4h], edi
mov	[esi+2E8h], edi
mov	[esi+2F0h], edi
mov	[esi+2E0h], eax
mov	[esi+2E4h], eax
mov	eax, [eax+40h]
mov	[esi+2ECh], eax
mov	dword ptr [esi+2F4h], 8
mov	ecx, [esi+0Ch]
push	ecx
lea	ecx, [esi+2F8h]
call	sub_836C10
fldz
mov	eax, [esi+0Ch]
fstp	[esp+18h+var_C]
lea	edx, [esp+18h+var_10]
push	edx
mov	[esi+9590h], edi
mov	[esp+1Ch+var_4], esi
mov	[esp+1Ch+var_8], 2
mov	[esp+1Ch+var_10], 3
mov	ecx, [eax+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+1Ch+var_8]
push	edx
push	eax
jz	short loc_838865
call	sub_822950
jmp	short loc_83886A

loc_838865:
call	sub_820D20

loc_83886A:
mov	eax, [esi+0Ch]
push	10h
push	edi
push	eax
call	sub_81FF50
add	esp, 0Ch
mov	[esi+14h], eax
mov	[esp+18h+var_C], eax
mov	eax, [esi+0Ch]
lea	edx, [esp+18h+var_10]
push	edx
mov	[esp+1Ch+var_10], 5
mov	ecx, [eax+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+1Ch+var_8]
push	edx
push	eax
jz	short loc_8388B1
call	sub_822950
pop	edi
mov	eax, esi
pop	esi
add	esp, 10h
retn	8

loc_8388B1:
call	sub_820D20
pop	edi
mov	eax, esi
pop	esi
add	esp, 10h
retn	8
sub_8387A0 endp




sub_8388C0 proc	near

var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_C= dword ptr -0Ch

sub	esp, 20h
push	ebp
mov	ebp, ecx
mov	eax, [ebp+0Ch]
push	esi
lea	edx, [esp+28h+var_18]
push	edx
mov	dword ptr [ebp+0], offset off_14698C4
mov	[esp+2Ch+var_1C], ebp
mov	[esp+2Ch+var_20], 2
mov	[esp+2Ch+var_18], 0
mov	ecx, [eax+3Ch]
test	dword ptr [ecx+8], 0F0000000h
lea	edx, [esp+2Ch+var_20]
push	edx
push	eax
jz	short loc_838903
call	sub_822950
jmp	short loc_838908

loc_838903:
call	sub_820D20

loc_838908:
mov	eax, [ebp+9590h]
push	ebx
push	edi
test	eax, eax
jnz	loc_8389FB
cmp	[ebp+9578h], eax
jz	loc_838A13
mov	eax, [ebp+9570h]
mov	ebx, [eax+9260h]
mov	[esp+30h+var_C], eax
test	ebx, ebx
jz	loc_838A13
lea	esp, [esp+0]

loc_838940:
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_838954
push	eax
mov	eax, [ebp+0Ch]
push	eax
call	sub_835030
add	esp, 8

loc_838954:
mov	eax, [ebx+4]
test	eax, eax
jz	short loc_838961
cmp	dword ptr [eax+18h], 0
jnz	short loc_8389B1

loc_838961:
cmp	dword ptr [ebx+1720h], 0
jz	short loc_8389B1
mov	edi, [ebx+1718h]
mov	esi, [edi+20h]
test	esi, esi
jz	short loc_8389B1

loc_838977:
mov	ecx, [esi]
mov	edx, [ebp+0Ch]
push	ecx
push	edx
call	sub_835030
mov	eax, [edi+20h]
add	eax, 1Ch
add	esp, 8
cmp	esi, eax
jnz	short loc_8389A2
mov	edi, [edi+24h]
test	edi, edi
jz	short loc_83899C
mov	esi, [edi+20h]
jmp	short loc_8389A5

loc_83899C:
xor	esi, esi
xor	edi, edi
jmp	short loc_8389A5

loc_8389A2:
add	esi, 4

loc_8389A5:
cmp	esi, [ebx+1724h]
jz	short loc_8389B1
test	esi, esi
jnz	short loc_838977

loc_8389B1:
mov	eax, [esp+30h+var_C]
mov	ecx, [eax+9260h]
add	ecx, 6DC8h
cmp	ebx, ecx
jnz	short loc_8389E3
mov	eax, [eax+9264h]
xor	ebx, ebx
cmp	eax, ebx
jz	short loc_8389DD
mov	ebx, [eax+9260h]
mov	[esp+30h+var_C], eax
jmp	short loc_8389E9

loc_8389DD:
mov	[esp+30h+var_C], ebx
jmp	short loc_8389E9

loc_8389E3:
add	ebx, 2498h

loc_8389E9:
cmp	ebx, [ebp+957Ch]
jz	short loc_838A13
test	ebx, ebx
jnz	loc_838940
jmp	short loc_838A13

loc_8389FB:
mov	edx, [eax-4]
shr	edx, 2
test	dl, 1
jz	short loc_838A13
push	eax
mov	eax, [ebp+0Ch]
push	eax
call	sub_835030
add	esp, 8

loc_838A13:
lea	ecx, [ebp+2F8h]
call	sub_838710
mov	ecx, [ebp+2E0h]
mov	eax, [ecx+44h]
pop	edi
pop	ebx
test	eax, eax
jz	short loc_838A49
lea	ecx, [ecx+0]

loc_838A30:
mov	edx, [ebp+288h]
mov	esi, [eax+44h]
push	eax
push	edx
call	sub_82C6D0
add	esp, 8
mov	eax, esi
test	esi, esi
jnz	short loc_838A30

loc_838A49:
lea	ecx, [ebp+18h]
call	sub_837570
pop	esi
mov	dword ptr [ebp+0], offset off_1469694
pop	ebp
add	esp, 20h
retn
sub_8388C0 endp

align 10h



sub_838A60 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+1C30h]
push	ecx
push	edx
mov	ecx, esi
call	sub_8384B0
mov	esi, [esi+9578h]
inc	dword ptr [esi+1C30h]
pop	esi
retn	4
sub_838A60 endp

align 10h



sub_838A90 proc	near
mov	eax, [ecx+9578h]
mov	edx, [eax+22D0h]
push	0FFFFFFFFh
push	edx
call	sub_8383A0
retn
sub_838A90 endp

align 10h



sub_838AB0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+2490h]
push	ecx
push	edx
mov	ecx, esi
call	sub_8384B0
mov	esi, [esi+9578h]
inc	dword ptr [esi+2490h]
pop	esi
retn	4
sub_838AB0 endp

align 10h



sub_838AE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
push	edi
lea	ecx, [esi+288h]
call	sub_836030
mov	ecx, [esp+8+arg_0]
test	eax, eax
jz	short loc_838B00
mov	[eax], ecx
mov	dword ptr [eax+4], 0

loc_838B00:
push	0
push	ecx
mov	ecx, esi
call	sub_8384B0
mov	eax, [esi+9578h]
lea	ecx, [eax+1DB0h]
call	sub_836510
test	eax, eax
jz	short loc_838B3D
mov	ecx, [esi+9578h]
mov	ecx, [ecx+16D8h]
or	edx, 0FFFFFFFFh
mov	dword ptr [eax], 6
mov	[eax+0Ch], edx
mov	[eax+10h], edx
mov	[eax+4], ecx

loc_838B3D:
mov	eax, [esi+9578h]
mov	edi, [eax+16D8h]
inc	edi
cmp	edi, [eax+16DCh]
jbe	short loc_838B73
cmp	edi, 0C8h
jb	short loc_838B67
mov	ecx, [esi+10h]
push	offset aFunctionOrExpr ; "Function or expression requires too man"...
call	sub_83EDE0

loc_838B67:
mov	edx, [esi+9578h]
mov	[edx+16DCh], edi

loc_838B73:
mov	eax, [esi+9578h]
push	1
mov	ecx, esi
mov	[eax+16D8h], edi
call	sub_8370F0
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_836510
pop	edi
pop	esi
retn	4
sub_838AE0 endp

align 10h



sub_838BA0 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+9578h]
mov	edx, [eax+2480h]
mov	al, [edx+0Dh]
push	esi
movzx	esi, al
inc	al
mov	[edx+0Dh], al
mov	edx, [esp+4+arg_0]
push	esi
push	edx
call	sub_8384B0
pop	esi
retn	4
sub_838BA0 endp

align 10h



sub_838BD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	3
push	eax
call	sub_8384B0
retn	4
sub_838BD0 endp

align 10h



sub_838BE0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_4]
mov	ebx, ecx
cmp	ebp, 0FFFFFFFFh
jz	short loc_838C3F
mov	eax, [esp+8+arg_0]
push	esi
mov	esi, [eax]
cmp	esi, 0FFFFFFFFh
jnz	short loc_838C01
pop	esi
mov	[eax], ebp
pop	ebp
pop	ebx
retn	8

loc_838C01:
mov	eax, [ebx+9578h]
push	edi
lea	edi, [eax+670h]
mov	edi, edi

loc_838C10:
push	esi
mov	ecx, edi
call	sub_835AA0
mov	eax, [eax]
shr	eax, 0Eh
sub	eax, 1FFFFh
cmp	eax, 0FFFFFFFFh
jz	short loc_838C34
lea	eax, [eax+esi+1]
cmp	eax, 0FFFFFFFFh
jz	short loc_838C34
mov	esi, eax
jmp	short loc_838C10

loc_838C34:
push	ebp
push	esi
mov	ecx, ebx
call	sub_838330
pop	edi
pop	esi

loc_838C3F:
pop	ebp
pop	ebx
retn	8
sub_838BE0 endp

align 10h



sub_838C50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+0E98h]
mov	eax, [eax+16D4h]
push	edi
push	ecx
push	0FFh
push	ecx
push	eax
mov	ecx, esi
call	sub_838600
mov	ecx, [esi+9578h]
mov	dword ptr [ecx+16D4h], 0FFFFFFFFh
mov	eax, [esi+9578h]
mov	edi, [eax+0E98h]
mov	edx, [eax+0E94h]
mov	eax, [esp+8+arg_0]
mov	[edx], eax
mov	ecx, [esi+9578h]
add	ecx, 670h
call	sub_836230
mov	ecx, [esi+9578h]
mov	edx, [ecx+16C4h]
mov	eax, [esp+8+arg_4]
add	ecx, 0EA0h
mov	[edx], eax
call	sub_836230
mov	eax, edi
pop	edi
pop	esi
retn	8
sub_838C50 endp

align 10h



sub_838CE0 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch

mov	eax, [ecx+4]
mov	edx, [eax+0Ch]
mov	eax, [edx+34h]
mov	edx, [esp+arg_8]
push	eax
movzx	eax, [esp+4+arg_4]
shl	edx, 8
or	eax, edx
mov	edx, [esp+4+arg_0]
shl	eax, 6
and	edx, 3Fh
or	eax, edx
push	eax
call	sub_838C50
retn	0Ch
sub_838CE0 endp

align 10h



sub_838D10 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [ecx+4]
mov	edx, [eax+0Ch]
mov	eax, [edx+34h]
mov	edx, [esp+arg_8]
push	eax
mov	eax, [esp+4+arg_C]
and	eax, 1FFh
shl	edx, 9
or	eax, edx
movzx	edx, [esp+4+arg_4]
shl	eax, 8
or	eax, edx
mov	edx, [esp+4+arg_0]
shl	eax, 6
and	edx, 3Fh
or	eax, edx
push	eax
call	sub_838C50
retn	10h
sub_838D10 endp

align 10h



sub_838D50 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+9578h]
mov	ecx, [eax+0E98h]
cmp	ecx, [eax+1C3Ch]
jle	short loc_838D83
test	ecx, ecx
jnz	short loc_838DB2
mov	ecx, [eax+1B34h]
sub	ecx, [eax+1B30h]
inc	ecx
cmp	ebx, ecx
jnb	short loc_838DAB

loc_838D83:
mov	ecx, [edi+4]
mov	edx, [ecx+0Ch]
mov	eax, [edx+34h]
mov	ecx, [esp+10h+arg_4]
push	eax
lea	edx, [ebx+ecx-1]
shl	edx, 11h
movzx	eax, bl
or	edx, eax
shl	edx, 6
or	edx, 3
push	edx
mov	ecx, edi
call	sub_838C50

loc_838DAB:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_838DB2:
dec	ecx
push	ecx
lea	ecx, [eax+670h]
call	sub_835AA0
mov	ebp, eax
mov	ecx, [ebp+0]
mov	edx, ecx
and	edx, 3Fh
cmp	dl, 3
jnz	short loc_838D83
mov	eax, ecx
shr	eax, 6
mov	esi, ecx
and	eax, 0FFh
shr	esi, 17h
cmp	eax, ebx
ja	short loc_838D83
lea	edx, [esi+1]
cmp	ebx, edx
ja	short loc_838D83
mov	eax, [esp+10h+arg_4]
lea	edx, [ebx+eax-1]
cmp	edx, esi
jbe	short loc_838DAB
pop	edi
shl	edx, 17h
and	ecx, offset loc_7FFFFF
or	edx, ecx
pop	esi
mov	[ebp+0], edx
pop	ebp
pop	ebx
retn	8
sub_838D50 endp

align 10h



sub_838E10 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
mov	eax, [ecx+9578h]
mov	edx, [eax+8]
lea	eax, [esp+8+var_8]
push	eax
mov	[esp+0Ch+var_4], edx
mov	[esp+0Ch+var_8], 5
call	sub_838530
add	esp, 8
retn
sub_838E10 endp

align 10h



sub_838E40 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
mov	eax, [esp+8+arg_0]
lea	edx, [esp+8+var_8]
push	edx
mov	[esp+0Ch+var_4], eax
mov	[esp+0Ch+var_8], 1
call	sub_838530
add	esp, 8
retn	4
sub_838E40 endp

align 10h



; int __stdcall	sub_838E70(float)
sub_838E70 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
fld	[esp+8+arg_0]
lea	eax, [esp+8+var_8]
push	eax
fstp	[esp+0Ch+var_4]
mov	[esp+0Ch+var_8], 3
call	sub_838530
add	esp, 8
retn	4
sub_838E70 endp

align 10h



sub_838EA0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
lea	eax, [esp+24h+var_10]
push	eax
lea	ecx, [ebx+2F8h]
mov	[esp+28h+var_14], ebx
call	sub_836720
mov	edi, [esp+24h+arg_4]
mov	ebp, [esp+24h+arg_0]
mov	esi, [esp+24h+var_8]
push	1
push	edi
push	ebp
mov	ecx, esi
call	sub_8372E0
test	eax, eax
jnz	short loc_838F38
mov	ebp, [esp+24h+var_4]
mov	ebx, [esp+24h+var_C]

loc_838EE0:
test	esi, esi
jz	short loc_838F63
cmp	esi, [ebx+9260h]
jnz	short loc_838F0A
mov	eax, [ebx+9268h]
test	eax, eax
jz	short loc_838F63
mov	ebx, eax
mov	esi, [ebx+9260h]
mov	[esp+24h+var_C], ebx
add	esi, 6DC8h
jmp	short loc_838F10

loc_838F0A:
sub	esi, 2498h

loc_838F10:
dec	ebp
mov	[esp+24h+var_8], esi
test	esi, esi
jz	short loc_838F63
mov	ecx, [esp+24h+arg_0]
push	0
push	edi
push	ecx
mov	ecx, esi
call	sub_8372E0
test	eax, eax
jz	short loc_838EE0
mov	ebx, [esp+24h+var_14]
mov	[esp+24h+var_4], ebp
mov	ebp, [esp+24h+arg_0]

loc_838F38:
cmp	[ebx+9578h], esi
jz	short loc_838F9B

loc_838F40:
lea	ecx, [esp+24h+var_10]
call	sub_8356E0
mov	ecx, [esp+24h+var_8]
test	ecx, ecx
jz	short loc_838F9B
push	edi
push	ebp
call	sub_837210
mov	[edi+4], eax
mov	dword ptr [edi], 7
jmp	short loc_838F40

loc_838F63:
mov	[esp+24h+var_4], ebp
test	edi, edi
jz	short loc_838F9B
mov	edx, [esp+24h+arg_0]
mov	ecx, [esp+24h+var_14]
lea	eax, [esp+24h+var_10]
push	eax
mov	[esp+28h+var_10], 4
mov	[esp+28h+var_C], edx
call	sub_838530
or	ecx, 0FFFFFFFFh
mov	dword ptr [edi], 8
mov	[edi+0Ch], ecx
mov	[edi+10h], ecx
mov	[edi+4], eax

loc_838F9B:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	8
sub_838EA0 endp

align 10h



sub_838FB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [ecx+9578h]
mov	eax, [esp+arg_4]
cmp	eax, [edx+0E98h]
jnz	short loc_838FED
mov	eax, edx
mov	edx, [eax+0E98h]
mov	[eax+1C3Ch], edx
mov	edx, [ecx+9578h]
mov	eax, [esp+arg_0]
add	edx, 16D4h
mov	[esp+arg_4], eax
mov	[esp+arg_0], edx
jmp	sub_838BE0

loc_838FED:
push	eax
push	0FFh
push	eax
mov	eax, [esp+0Ch+arg_0]
push	eax
call	sub_838600
retn	8
sub_838FB0 endp

align 10h



; int __thiscall sub_839010(void *, char)
sub_839010 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_8388C0
test	[esp+4+arg_0], 1
jz	short loc_839028
push	esi		; void *
call	??3@YAXPAX@Z	; operator delete(void *)
add	esp, 4

loc_839028:
mov	eax, esi
pop	esi
retn	4
sub_839010 endp

align 10h



sub_839030 proc	near

arg_0= dword ptr  4

mov	eax, [ecx+9578h]
mov	edx, [eax+22D0h]
mov	eax, [esp+arg_0]
push	edx
push	eax
call	sub_838EA0
retn	4
sub_839030 endp

align 10h



sub_839050 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+9578h]
cmp	byte ptr [eax+1C28h], 0
jnz	short loc_839070
mov	ecx, [edi+10h]
push	offset aCannotUse___Ou ; "cannot use '...' outside a vararg funct"...
call	sub_83EDE0

loc_839070:
mov	ecx, [edi+9578h]
mov	esi, [ecx+22D0h]
test	esi, esi
jz	short loc_8390A8
mov	edx, [edi+4]
mov	eax, [edx+0Ch]
mov	eax, [eax+34h]
push	eax
push	offset loc_800025
mov	ecx, edi
call	sub_838C50
or	ecx, 0FFFFFFFFh
mov	dword ptr [esi], 0Eh
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	[esi+4], eax

loc_8390A8:
mov	edi, [edi+9578h]
and	byte ptr [edi+1C28h], 0FBh
pop	edi
pop	esi
retn
sub_839050 endp

align 10h



sub_8390C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+957Ch]
test	edi, edi
jz	short loc_8390E0
call	sub_836C90
push	eax
mov	eax, [esi+0Ch]
push	esi
push	eax
mov	ecx, edi
call	sub_837960

loc_8390E0:
lea	ecx, [esi+2F8h]
call	sub_836670
cmp	[esp+8+arg_0], 0
mov	ecx, [esi+9578h]
mov	edx, [esp+8+arg_4]
mov	[ecx+1C2Ch], edx
jz	short loc_83912D
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	0
push	4
push	offset aSelf_1	; "self"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
push	1
mov	ecx, esi
call	sub_8370F0

loc_83912D:
pop	edi
pop	esi
retn	8
sub_8390C0 endp

align 10h



sub_839140 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+1C30h]
mov	eax, [esi+0Ch]
push	ecx
mov	ecx, [eax]
push	3
push	offset aArg	; "arg"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
mov	eax, [esi+9578h]
inc	dword ptr [eax+1C30h]
mov	ecx, [esi+9578h]
mov	byte ptr [ecx+1C28h], 7
pop	esi
retn
sub_839140 endp

align 10h



sub_839190 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
lea	ecx, [esi+288h]
call	sub_836030
mov	ecx, [esp+4+arg_0]
test	eax, eax
jz	short loc_8391AF
mov	[eax], ecx
mov	dword ptr [eax+4], 0

loc_8391AF:
mov	eax, [esi+9578h]
mov	edx, [eax+22D0h]
push	edx
push	ecx
mov	ecx, esi
call	sub_838EA0
pop	esi
retn	4
sub_839190 endp

align 10h



sub_8391D0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
push	edi
mov	edi, [eax+2480h]
push	0
mov	byte ptr [edi+0Dh], 1
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	0Fh
push	offset aForGenerator ; "(for generator)"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
mov	al, [edi+0Dh]
movzx	ecx, al
push	ecx
inc	al
mov	[edi+0Dh], al
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	0Bh
push	offset aForState ; "(for state)"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
mov	al, [edi+0Dh]
movzx	ecx, al
push	ecx
inc	al
mov	[edi+0Dh], al
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	0Dh
push	offset aForControl ; "(for control)"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
pop	edi
pop	esi
retn
sub_8391D0 endp

align 10h



sub_839270 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
lea	ecx, [eax+22E0h]
call	sub_8365C0
test	eax, eax
jz	short loc_839297
mov	dword ptr [eax], 0
mov	dword ptr [eax+14h], 0FFFFFFFFh
jmp	short loc_839299

loc_839297:
xor	eax, eax

loc_839299:
mov	ecx, [esi+9578h]
mov	dl, [ecx+16D8h]
mov	ecx, [esp+4+arg_0]
push	0
mov	[eax+4], ecx
mov	[eax+0Ch], dl
mov	dword ptr [eax+10h], 1
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	0Bh
push	offset aForIndex ; "(for index)"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	1
push	0Bh
push	offset aForLimit ; "(for limit)"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
mov	eax, [esi+0Ch]
mov	ecx, [eax]
push	2
push	0Ah
push	offset aForStep	; "(for	step)"
push	eax
add	ecx, 2A0h
call	sub_81FD20
push	eax
mov	ecx, esi
call	sub_8384B0
pop	esi
retn	4
sub_839270 endp




sub_839320 proc	near

var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 8
fld1
push	esi
push	edi
fstp	[esp+10h+var_4]
lea	eax, [esp+10h+var_8]
push	eax
mov	esi, ecx
mov	[esp+14h+var_8], 3
call	sub_838530
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+34h]
mov	edx, [esi+9578h]
push	ecx
movzx	ecx, byte ptr [edx+16D8h]
shl	eax, 8
or	ecx, eax
shl	ecx, 6
or	ecx, 1
push	ecx
mov	ecx, esi
call	sub_838C50
mov	eax, [esi+9578h]
mov	edi, [eax+16D8h]
inc	edi
cmp	edi, [eax+16DCh]
jbe	short loc_83939F
cmp	edi, 0C8h
jb	short loc_839393
mov	ecx, [esi+10h]
push	offset aFunctionOrExpr ; "Function or expression requires too man"...
call	sub_83EDE0

loc_839393:
mov	edx, [esi+9578h]
mov	[edx+16DCh], edi

loc_83939F:
mov	eax, [esi+9578h]
mov	[eax+16D8h], edi
mov	ecx, [esi+9578h]
mov	edx, [ecx+2480h]
pop	edi
mov	byte ptr [edx+0Dh], 1
pop	esi
add	esp, 8
retn
sub_839320 endp

align 10h



sub_8393D0 proc	near

; FUNCTION CHUNK AT 00835DC0 SIZE 00000123 BYTES

push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+2480h]
mov	edx, [eax+0E98h]
mov	ecx, [ecx+4]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
mov	ecx, [esi+9578h]
add	ecx, 22E0h
pop	esi
jmp	loc_835DC0
sub_8393D0 endp

align 10h



sub_839420 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	eax, [eax+2480h]
mov	ecx, [eax+8]
push	ecx
add	eax, 4
push	eax
mov	ecx, esi
call	sub_838BE0
mov	eax, [esi+9578h]
mov	edx, [eax+2480h]
mov	ecx, [edx+4]
mov	edx, [eax+0E98h]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
mov	ecx, [esi+9578h]
add	ecx, 22E0h
pop	esi
jmp	loc_835DC0
sub_839420 endp

align 10h



sub_839480 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 14h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+9578h]
mov	ebx, [eax+16D8h]
mov	esi, [eax+22D0h]
lea	ecx, [esp+20h+var_10]
push	ecx
lea	ecx, [eax+1C40h]
mov	[esp+24h+var_14], 0
call	sub_8364A0
mov	eax, [esp+20h+var_8]
test	eax, eax
jz	loc_839585
mov	ecx, [esp+20h+var_C]
mov	edx, [esp+20h+var_4]
push	ebp

loc_8394C7:
cmp	dword ptr [eax], 9
jnz	short loc_8394F2
mov	ebp, [eax+4]
cmp	ebp, [esi+4]
jnz	short loc_8394DF
mov	[eax+4], ebx
mov	[esp+24h+var_14], 1

loc_8394DF:
mov	ebp, [eax+8]
cmp	ebp, [esi+4]
jnz	short loc_8394F2
mov	[eax+8], ebx
mov	[esp+24h+var_14], 1

loc_8394F2:
cmp	eax, [ecx+140h]
jnz	short loc_839513
mov	eax, [ecx+148h]
test	eax, eax
jz	short loc_83951B
mov	ecx, eax
mov	eax, [ecx+140h]
add	eax, 12Ch
jmp	short loc_839516

loc_839513:
sub	eax, 14h

loc_839516:
dec	edx
test	eax, eax
jnz	short loc_8394C7

loc_83951B:
cmp	[esp+24h+var_14], 0
pop	ebp
jz	short loc_839585
mov	edx, [edi+4]
mov	eax, [edx+0Ch]
mov	ecx, [eax+34h]
mov	edx, [esi+4]
movzx	eax, bl
shl	edx, 11h
or	edx, eax
push	ecx
shl	edx, 6
push	edx
mov	ecx, edi
call	sub_838C50
mov	eax, [edi+9578h]
mov	esi, [eax+16D8h]
inc	esi
cmp	esi, [eax+16DCh]
jbe	short loc_839579
cmp	esi, 0C8h
jb	short loc_83956D
mov	ecx, [edi+10h]
push	offset aFunctionOrExpr ; "Function or expression requires too man"...
call	sub_83EDE0

loc_83956D:
mov	ecx, [edi+9578h]
mov	[ecx+16DCh], esi

loc_839579:
mov	edx, [edi+9578h]
mov	[edx+16D8h], esi

loc_839585:
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn
sub_839480 endp

align 10h



sub_839590 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
push	esi
mov	ebx, [esp+8+arg_0]
push	edi
mov	edi, ecx
lea	ecx, [eax-1]
mov	eax, 51EB851Fh
mul	ecx
mov	ecx, [esp+0Ch+arg_8]
mov	esi, edx
shr	esi, 4
mov	eax, ecx
inc	eax
inc	esi
neg	eax
sbb	eax, eax
and	eax, ecx
cmp	esi, 1FFh
ja	short loc_8395E3
mov	edx, [edi+4]
mov	ecx, [edx+0Ch]
and	esi, 1FFh
shl	eax, 9
or	esi, eax
shl	esi, 8
movzx	eax, bl
or	esi, eax
shl	esi, 6
or	esi, 22h
jmp	short loc_839609

loc_8395E3:
mov	ecx, [edi+4]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+34h]
movzx	edx, bl
shl	eax, 11h
or	edx, eax
shl	edx, 6
push	ecx
or	edx, 22h
push	edx
mov	ecx, edi
call	sub_838C50
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]

loc_839609:
mov	edx, [ecx+34h]
push	edx
push	esi
mov	ecx, edi
call	sub_838C50
mov	eax, [edi+9578h]
pop	edi
inc	ebx
pop	esi
mov	[eax+16D8h], ebx
pop	ebx
retn	0Ch
sub_839590 endp

align 10h



sub_839630 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi]
add	eax, 0FFFFFFFAh
push	edi
mov	edi, ecx
cmp	eax, 8		; switch 9 cases
ja	loc_8396CB	; default
			; jumptable 00839646 cases 4-6
jmp	ds:off_8396D0[eax*4] ; switch jump

loc_83964D:		; jumptable 00839646 case 0
pop	edi
mov	dword ptr [esi], 0Ch
pop	esi
retn	4

loc_839658:		; jumptable 00839646 case 1
mov	eax, [esi+4]
push	0
push	eax
push	0
push	4
call	sub_838D10
pop	edi
mov	[esi+4], eax
mov	dword ptr [esi], 0Bh
pop	esi
retn	4

loc_839675:		; jumptable 00839646 case 2
mov	eax, [esi+4]
push	eax
push	0
push	5
call	sub_838CE0
pop	edi
mov	[esi+4], eax
mov	dword ptr [esi], 0Bh
pop	esi
retn	4

loc_839690:		; jumptable 00839646 case 3
mov	eax, [esi+8]
push	eax
call	sub_836F40
mov	ecx, [esi+4]
push	ecx
mov	ecx, edi
call	sub_836F40
mov	eax, [esi+8]
mov	ecx, [esi+4]
push	eax
push	ecx
push	0
push	6
mov	ecx, edi
call	sub_838D10
pop	edi
mov	[esi+4], eax
mov	dword ptr [esi], 0Bh
pop	esi
retn	4

loc_8396C5:		; jumptable 00839646 cases 7,8
push	esi
call	sub_838430

loc_8396CB:		; default
pop	edi		; jumptable 00839646 cases 4-6
pop	esi
retn	4
sub_839630 endp

off_8396D0 dd offset loc_83964D	; jump table for switch	statement
dd offset loc_839658
dd offset loc_839675
dd offset loc_839690
dd offset loc_8396CB
dd offset loc_8396CB
dd offset loc_8396CB
dd offset loc_8396C5
dd offset loc_8396C5
align 10h



sub_839700 proc	near

var_10=	dword ptr -10h
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	ebx
mov	esi, ecx
call	sub_839630
mov	eax, [ebx]
lea	ecx, [eax-1]
cmp	ecx, 0Bh	; switch 12 cases
ja	loc_839806	; default
push	edi
jmp	ds:off_83980C[ecx*4] ; switch jump

loc_839724:		; jumptable 0083971D case 0
mov	edi, [esp+0Ch+arg_4]
push	1
push	edi
mov	ecx, esi
call	sub_838D50
mov	[ebx+4], edi
pop	edi
pop	esi
mov	dword ptr [ebx], 0Ch
pop	ebx
retn	8

loc_839741:		; jumptable 0083971D cases 1,2
mov	edi, [esp+0Ch+arg_4]
xor	ecx, ecx
cmp	eax, 2
setz	cl
push	0
push	ecx
push	edi
push	2
jmp	loc_8397F5

loc_839758:		; jumptable 0083971D case 3
mov	edx, [ebx+4]
mov	edi, [esp+0Ch+arg_4]
push	edx
push	edi
push	1
mov	ecx, esi
call	sub_838CE0
mov	[ebx+4], edi
pop	edi
pop	esi
mov	dword ptr [ebx], 0Ch
pop	ebx
retn	8

loc_839779:		; jumptable 0083971D case 4
fld	dword ptr [ebx+4]
push	ecx		; float
fstp	[esp+10h+arg_0]
mov	ecx, esi
fld	[esp+10h+arg_0]
fstp	[esp+10h+var_10]
call	sub_838E70
mov	edi, [esp+0Ch+arg_4]
push	eax
push	edi
push	1
mov	ecx, esi
call	sub_838CE0
mov	[ebx+4], edi
pop	edi
pop	esi
mov	dword ptr [ebx], 0Ch
pop	ebx
retn	8

loc_8397AD:		; jumptable 0083971D case 10
mov	eax, [ebx+4]
mov	ecx, [esi+9578h]
push	eax
add	ecx, 670h
call	sub_835AA0
mov	edi, [esp+0Ch+arg_4]
mov	ecx, edi
shl	ecx, 6
xor	ecx, [eax]
and	ecx, 3FC0h
xor	[eax], ecx
mov	[ebx+4], edi
pop	edi
pop	esi
mov	dword ptr [ebx], 0Ch
pop	ebx
retn	8

loc_8397E4:		; jumptable 0083971D case 11
mov	eax, [ebx+4]
mov	edi, [esp+0Ch+arg_4]
cmp	edi, eax
jz	short loc_8397FC
push	0
push	eax
push	edi
push	0

loc_8397F5:
mov	ecx, esi
call	sub_838D10

loc_8397FC:
mov	[ebx+4], edi
mov	dword ptr [ebx], 0Ch

loc_839805:		; jumptable 0083971D cases 5-9
pop	edi

loc_839806:		; default
pop	esi
pop	ebx
retn	8
sub_839700 endp

align 4
off_83980C dd offset loc_839724	; jump table for switch	statement
dd offset loc_839741
dd offset loc_839741
dd offset loc_839758
dd offset loc_839779
dd offset loc_839805
dd offset loc_839805
dd offset loc_839805
dd offset loc_839805
dd offset loc_839805
dd offset loc_8397AD
dd offset loc_8397E4
align 10h



sub_839840 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
add	ecx, 240h
push	edi
mov	edi, [ecx+420h]
call	sub_835970
movzx	eax, byte ptr [edi+4]
push	eax
mov	ecx, esi
call	sub_837050
cmp	dword ptr [edi+8], 0
jz	short loc_839889
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
movzx	ecx, byte ptr [edi+4]
mov	eax, [edx+34h]
shl	ecx, 6
or	ecx, 23h
push	eax
push	ecx
mov	ecx, esi
call	sub_838C50

loc_839889:
mov	eax, [esi+9578h]
mov	edx, [eax+1B34h]
sub	edx, [eax+1B30h]
inc	edx
mov	[eax+16D8h], edx
mov	eax, [esi+9578h]
mov	ecx, [eax+0E98h]
mov	edi, [edi]
mov	[eax+1C3Ch], ecx
mov	edx, [esi+9578h]
push	edi
add	edx, 16D4h
push	edx
mov	ecx, esi
call	sub_838BE0
pop	edi
pop	esi
retn
sub_839840 endp

align 10h



sub_8398D0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+9578h]
mov	esi, [eax+22D0h]
cmp	dword ptr [esi], 6
jnz	short loc_8398EA
call	sub_839480

loc_8398EA:
mov	ecx, [edi+9578h]
mov	edx, [esi]
mov	eax, [ecx+1DA4h]
mov	[eax], edx
mov	edx, [esi+4]
add	ecx, 1C40h
mov	[eax+4], edx
mov	edx, [esi+8]
mov	[eax+8], edx
mov	edx, [esi+0Ch]
mov	[eax+0Ch], edx
mov	edx, [esi+10h]
mov	[eax+10h], edx
call	sub_836AA0
mov	ecx, [edi+9578h]
pop	edi
add	ecx, 1DB0h
pop	esi
jmp	sub_835C90
sub_8398D0 endp




sub_839930 proc	near
mov	eax, [ecx+9578h]
mov	edx, [eax+22D0h]
push	edx
call	sub_839630
retn
sub_839930 endp

align 10h



sub_839950 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+278h]
cmp	dword ptr [eax+18h], 7FFFFFFFh
jbe	short loc_839975
push	offset aHashItemsInATa ; "hash items in	a table	constructor."
push	7FFFFFFFh	; ArgList
call	sub_835EF0

loc_839975:
mov	ecx, [edi+9578h]
mov	esi, [ecx+22D0h]
test	esi, esi
jz	short loc_8399B3
mov	edx, [esp+10h+arg_0]
lea	eax, [esp+10h+var_8]
push	eax
mov	ecx, edi
mov	[esp+14h+var_8], 4
mov	[esp+14h+var_4], edx
call	sub_838530
or	ecx, 0FFFFFFFFh
mov	dword ptr [esi], 4
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	[esi+4], eax

loc_8399B3:
pop	edi
pop	esi
add	esp, 8
retn	4
sub_839950 endp

align 10h



sub_8399C0 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

mov	eax, [ecx+9578h]
sub	esp, 8
push	esi
mov	esi, [eax+22D0h]
test	esi, esi
jz	short loc_839A00
mov	edx, [esp+0Ch+arg_0]
lea	eax, [esp+0Ch+var_8]
push	eax
mov	[esp+10h+var_8], 4
mov	[esp+10h+var_4], edx
call	sub_838530
or	ecx, 0FFFFFFFFh
mov	dword ptr [esi], 4
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	[esi+4], eax

loc_839A00:
pop	esi
add	esp, 8
retn	4
sub_8399C0 endp

align 10h



sub_839A10 proc	near
mov	eax, [ecx+4]
mov	edx, [eax+0Ch]
mov	eax, [edx+34h]
push	eax
push	80001Eh
call	sub_838C50
retn
sub_839A10 endp

align 10h


; Attributes: thunk

sub_839A30 proc	near
jmp	sub_839840
sub_839A30 endp

align 10h



sub_839A40 proc	near
push	esi
mov	esi, ecx
call	sub_839840
mov	eax, [esi+9578h]
mov	ecx, [eax+2480h]
mov	edx, [eax+0E98h]
mov	ecx, [ecx+14h]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
mov	ecx, [esi+9578h]
add	ecx, 22E0h
pop	esi
jmp	loc_835DC0
sub_839A40 endp

align 10h



sub_839A90 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
push	edi
mov	edi, [eax+16D4h]
mov	dword ptr [eax+16D4h], 0FFFFFFFFh
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+34h]
push	eax
push	7FFF8016h
mov	ecx, esi
call	sub_838C50
push	edi
lea	edx, [esp+10h+var_4]
push	edx
mov	ecx, esi
mov	[esp+14h+var_4], eax
call	sub_838BE0
mov	eax, [esp+0Ch+var_4]
pop	edi
pop	esi
pop	ecx
retn
sub_839A90 endp

align 10h



sub_839AE0 proc	near

var_C= dword ptr -0Ch

sub	esp, 10h
push	ebx
push	esi
push	edi
push	0
mov	ebx, ecx
call	sub_837050
mov	eax, [ebx+4]
mov	ecx, [eax+0Ch]
mov	edx, [ecx+34h]
push	edx
push	80001Eh
mov	ecx, ebx
call	sub_838C50
mov	eax, [ebx+0Ch]
mov	edi, [ebx+9578h]
push	44h
push	eax
call	sub_82C6B0
push	44h		; size_t
mov	esi, eax
push	0		; int
push	esi		; void *
mov	[edi+4], esi
call	_memset
mov	eax, [edi+0E98h]
mov	[esi+4], eax
mov	ecx, [ebx+0Ch]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	ecx, [esi+4]
add	esp, 1Ch
push	ecx
push	eax
lea	ecx, [edi+670h]
mov	[esi+8], eax
call	sub_835310
mov	eax, [edi+16C8h]
mov	[esi+24h], eax
mov	ecx, [ebx+0Ch]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	edx, [esi+24h]
add	esp, 8
push	edx
push	eax
lea	ecx, [edi+0EA0h]
mov	[esi+28h], eax
call	sub_835310
mov	eax, [edi+238h]
mov	[esi+0Ch], eax
test	eax, eax
jbe	short loc_839BAF
mov	ecx, [ebx+0Ch]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	ecx, [esi+0Ch]
add	esp, 8
push	ecx
push	eax
lea	ecx, [edi+10h]
mov	[esi+10h], eax
call	sub_835290

loc_839BAF:
mov	eax, [edi+1728h]
mov	[esi+14h], eax
test	eax, eax
jbe	short loc_839BE0
mov	ecx, [ebx+0Ch]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	edx, [esi+14h]
add	esp, 8
push	edx
push	eax
lea	ecx, [edi+16E0h]
mov	[esi+18h], eax
call	sub_8354C0

loc_839BE0:
mov	eax, [edi+1A58h]
mov	[esi+3Ch], eax
test	eax, eax
jbe	short loc_839C14
mov	ecx, [ebx+0Ch]
lea	eax, [eax+eax*2]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
mov	ecx, [esi+3Ch]
add	esp, 8
push	ecx
push	eax
lea	ecx, [edi+1730h]
mov	[esi+40h], eax
call	sub_835520

loc_839C14:
mov	dl, [edi+1C20h]
mov	[esi], dl
mov	eax, [edi+1C20h]
mov	[esi+2Ch], eax
test	eax, eax
jbe	loc_839CAC
mov	ecx, [ebx+0Ch]
add	eax, eax
add	eax, eax
push	eax
push	ecx
call	sub_82C6B0
add	esp, 8
mov	[esi+30h], eax
cmp	dword ptr [edi+1C18h], 0
jz	short loc_839CAC
mov	eax, [edi+1C10h]
mov	[esp+1Ch+var_C], eax
mov	eax, [eax+0C0h]
xor	ecx, ecx
test	eax, eax
jz	short loc_839CAC
push	ebp

loc_839C61:
mov	edx, [esi+30h]
mov	ebp, [eax]
mov	[edx+ecx*4], ebp
mov	edx, [esp+20h+var_C]
mov	ebp, [edx+0C0h]
add	ebp, 0B4h
cmp	eax, ebp
jnz	short loc_839C9B
mov	eax, [edx+0C4h]
test	eax, eax
jz	short loc_839C93
mov	[esp+20h+var_C], eax
mov	eax, [eax+0C0h]
jmp	short loc_839C9E

loc_839C93:
xor	eax, eax
mov	[esp+20h+var_C], eax
jmp	short loc_839C9F

loc_839C9B:
add	eax, 0Ch

loc_839C9E:
inc	ecx

loc_839C9F:
cmp	eax, [edi+1C1Ch]
jz	short loc_839CAB
test	eax, eax
jnz	short loc_839C61

loc_839CAB:
pop	ebp

loc_839CAC:
mov	al, [edi+1C30h]
mov	[esi+1], al
mov	cl, [edi+1C28h]
mov	[esi+2], cl
mov	edx, [edi+16D0h]
mov	[esi+38h], edx
mov	eax, [edi+1C2Ch]
mov	[esi+1Ch], eax
mov	ecx, [edi+1C34h]
mov	[esi+20h], ecx
mov	dl, [edi+16DCh]
mov	[esi+3], dl
mov	ecx, [ebx+4]
call	sub_83BBD0
pop	edi
mov	[esi+34h], eax
pop	esi
pop	ebx
add	esp, 10h
retn
sub_839AE0 endp

align 10h



sub_839D00 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
cmp	dword ptr [edi], 0Ch
mov	esi, ecx
jz	short loc_839D2A
push	1
call	sub_836FB0
mov	eax, [esi+9578h]
mov	ecx, [eax+16D8h]
dec	ecx
push	ecx
push	edi
mov	ecx, esi
call	sub_839700

loc_839D2A:
pop	edi
pop	esi
retn	4
sub_839D00 endp

align 10h



sub_839D30 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
push	ebp
mov	ebp, [esp+8+arg_4]
push	esi
push	ebp
push	ebx
mov	esi, ecx
call	sub_839700
cmp	dword ptr [ebx], 0Ah
jnz	short loc_839D58
mov	eax, [ebx+4]
push	eax
lea	ecx, [ebx+0Ch]
push	ecx
mov	ecx, esi
call	sub_838BE0

loc_839D58:
mov	eax, [ebx+0Ch]
cmp	eax, [ebx+10h]
jz	loc_839E80
push	edi
or	edi, 0FFFFFFFFh
push	eax
mov	ecx, esi
mov	[esp+14h+arg_0], edi
call	sub_837510
test	eax, eax
jnz	short loc_839D8B
mov	eax, [ebx+10h]
push	eax
mov	ecx, esi
call	sub_837510
test	eax, eax
jz	loc_839E39

loc_839D8B:
cmp	dword ptr [ebx], 0Ah
jnz	short loc_839D9A
mov	[esp+10h+arg_4], 0FFFFFFFFh
jmp	short loc_839DA5

loc_839D9A:
mov	ecx, esi
call	sub_839A90
mov	[esp+10h+arg_4], eax

loc_839DA5:
mov	eax, [esi+9578h]
mov	edx, [eax+0E98h]
mov	[eax+1C3Ch], edx
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+34h]
mov	edi, ebp
and	edi, 0FFh
mov	edx, edi
shl	edx, 6
push	eax
or	edx, 4002h
push	edx
mov	ecx, esi
call	sub_838C50
mov	[esp+10h+arg_0], eax
mov	eax, [esi+9578h]
mov	ecx, [eax+0E98h]
mov	[eax+1C3Ch], ecx
mov	edx, [esi+4]
mov	eax, [edx+0Ch]
mov	eax, [eax+34h]
shl	edi, 6
push	eax
or	edi, 800002h
push	edi
mov	ecx, esi
call	sub_838C50
mov	edx, [esp+10h+arg_4]
mov	edi, eax
mov	eax, [esi+9578h]
mov	ecx, [eax+0E98h]
mov	[eax+1C3Ch], ecx
mov	eax, [esi+9578h]
push	edx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0

loc_839E39:
mov	eax, [esi+9578h]
mov	ecx, [eax+0E98h]
mov	[eax+1C3Ch], ecx
mov	ecx, [esp+10h+arg_0]
mov	edx, [esi+9578h]
mov	eax, [edx+0E98h]
mov	edx, [ebx+10h]
push	ecx
push	ebp
push	eax
push	edx
mov	ecx, esi
mov	[esp+20h+arg_4], eax
call	sub_838600
mov	eax, [esp+10h+arg_4]
mov	ecx, [ebx+0Ch]
push	edi
push	ebp
push	eax
push	ecx
mov	ecx, esi
call	sub_838600
pop	edi

loc_839E80:
pop	esi
or	eax, 0FFFFFFFFh
mov	[ebx+4], ebp
pop	ebp
mov	[ebx+0Ch], eax
mov	[ebx+10h], eax
mov	dword ptr [ebx], 0Ch
pop	ebx
retn	8
sub_839D30 endp

align 10h



sub_839EA0 proc	near
push	esi
mov	esi, ecx
call	sub_839AE0
mov	eax, [esi+9578h]
mov	ecx, [eax+4]
mov	[esi+9590h], ecx
lea	ecx, [esi+2F8h]
mov	esi, [ecx+9280h]
call	sub_8355A0
mov	ecx, esi
pop	esi
jmp	sub_837B40
sub_839EA0 endp




sub_839ED0 proc	near
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
call	sub_839AE0
mov	ebp, [edi+9578h]
lea	ecx, [edi+2F8h]
call	sub_8355A0
mov	ebx, [edi+9578h]
mov	eax, [ebx+1724h]
mov	edx, [ebp+4]
lea	ecx, [ebx+16E0h]
mov	[eax], edx
call	sub_836900
mov	eax, [edi+9578h]
mov	esi, [eax+22D0h]
test	esi, esi
jz	short loc_839F49
mov	ebx, [ebx+1728h]
mov	ecx, [edi+4]
mov	edx, [ecx+0Ch]
mov	eax, [edx+34h]
dec	ebx
shl	ebx, 0Eh
push	eax
or	ebx, 24h
push	ebx
mov	ecx, edi
call	sub_838C50
or	ecx, 0FFFFFFFFh
mov	dword ptr [esi], 0Bh
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	[esi+4], eax

loc_839F49:
cmp	dword ptr [ebp+1C18h], 0
jz	short loc_839FC3
mov	ebx, [ebp+1C10h]
mov	esi, [ebx+0C0h]
test	esi, esi
jz	short loc_839FC3

loc_839F62:
mov	eax, [edi+4]
mov	ecx, [eax+0Ch]
mov	eax, [esi+8]
mov	edx, [ecx+34h]
mov	ecx, [esi+4]
neg	eax
sbb	eax, eax
and	eax, 0FFFFFFFCh
add	eax, 4
shl	ecx, 17h
and	eax, 3Fh
or	eax, ecx
push	edx
push	eax
mov	ecx, edi
call	sub_838C50
mov	edx, [ebx+0C0h]
add	edx, 0B4h
cmp	esi, edx
jnz	short loc_839FB4
mov	ebx, [ebx+0C4h]
test	ebx, ebx
jz	short loc_839FAE
mov	esi, [ebx+0C0h]
jmp	short loc_839FB7

loc_839FAE:
xor	esi, esi
xor	ebx, ebx
jmp	short loc_839FB7

loc_839FB4:
add	esi, 0Ch

loc_839FB7:
cmp	esi, [ebp+1C1Ch]
jz	short loc_839FC3
test	esi, esi
jnz	short loc_839F62

loc_839FC3:
pop	edi
pop	esi
mov	ecx, ebp
pop	ebp
pop	ebx
jmp	sub_837B40
sub_839ED0 endp

align 10h



sub_839FD0 proc	near

var_14=	dword ptr -14h
var_10=	byte ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 14h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+9578h]
lea	eax, [esp+20h+var_10]
push	eax
add	ecx, 240h
call	sub_8361C0
mov	esi, [esp+20h+var_8]
xor	ebx, ebx
test	esi, esi
jz	short loc_83A03B
mov	ecx, [esp+20h+var_4]
mov	eax, [esp+20h+var_C]

loc_83A000:
cmp	dword ptr [esi+0Ch], 0
jnz	short loc_83A037
or	ebx, [esi+8]
cmp	esi, [eax+400h]
jnz	short loc_83A029
mov	eax, [eax+408h]
test	eax, eax
jz	short loc_83A033
mov	esi, [eax+400h]
add	esi, 3F0h
jmp	short loc_83A02C

loc_83A029:
sub	esi, 10h

loc_83A02C:
dec	ecx
test	esi, esi
jnz	short loc_83A000
jmp	short loc_83A03B

loc_83A033:
xor	esi, esi
jmp	short loc_83A03B

loc_83A037:
test	esi, esi
jnz	short loc_83A048

loc_83A03B:
mov	ecx, [edi+10h]
push	offset aBreakInstructi ; "Break	instruction not	allowed: no enclo"...
call	sub_83EDE0

loc_83A048:
test	ebx, ebx
jz	short loc_83A068
mov	ecx, [edi+4]
mov	edx, [ecx+0Ch]
movzx	ecx, byte ptr [esi+4]
mov	eax, [edx+34h]
shl	ecx, 6
or	ecx, 23h
push	eax
push	ecx
mov	ecx, edi
call	sub_838C50

loc_83A068:
mov	eax, [edi+9578h]
mov	ebx, [eax+16D4h]
mov	dword ptr [eax+16D4h], 0FFFFFFFFh
mov	edx, [edi+4]
mov	eax, [edx+0Ch]
mov	eax, [eax+34h]
push	eax
push	7FFF8016h
mov	ecx, edi
call	sub_838C50
push	ebx
lea	ecx, [esp+24h+var_14]
push	ecx
mov	ecx, edi
mov	[esp+28h+var_14], eax
call	sub_838BE0
mov	edx, [esp+20h+var_14]
push	edx
push	esi
mov	ecx, edi
call	sub_838BE0
pop	edi
pop	esi
pop	ebx
add	esp, 14h
retn
sub_839FD0 endp

align 10h



sub_83A0C0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+660h]
cmp	dword ptr [ecx+8], 0
mov	ecx, esi
jnz	short loc_83A0F2
call	sub_839840
mov	edx, [esi+9578h]
mov	eax, [edx+2480h]
mov	ecx, [eax+4]
mov	edx, [eax+14h]
push	ecx
push	edx
jmp	short loc_83A14A

loc_83A0F2:
mov	eax, [esi]
mov	edx, [eax+120h]
call	edx
mov	eax, [esi+9578h]
mov	ecx, [eax+2480h]
mov	edx, [eax+0E98h]
mov	ecx, [ecx+14h]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
mov	ecx, esi
call	sub_839840
mov	ecx, [esi+9578h]
mov	eax, [ecx+2480h]
mov	edx, [eax+4]
push	edx
mov	ecx, esi
call	sub_839A90
push	eax

loc_83A14A:
mov	ecx, esi
call	sub_838FB0
mov	ecx, esi
call	sub_839840
mov	ecx, [esi+9578h]
add	ecx, 22E0h
pop	esi
jmp	loc_835DC0
sub_83A0C0 endp

align 10h



sub_83A170 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
push	edi
mov	edi, [eax+2480h]
cmp	dword ptr [edi+10h], 0
jz	short loc_83A1A9
movzx	eax, byte ptr [edi+0Ch]
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+34h]
movzx	eax, al
shl	eax, 6
push	ecx
or	eax, 7FFF8020h
push	eax
mov	ecx, esi
call	sub_838C50
jmp	short loc_83A1AE

loc_83A1A9:
call	sub_839A90

loc_83A1AE:
mov	[edi+8], eax
mov	eax, [esi+9578h]
lea	ecx, [eax+240h]
call	sub_836110
test	eax, eax
jz	short loc_83A1F6
mov	edx, [esi+9578h]
mov	ecx, [edx+1B34h]
sub	ecx, [edx+1B30h]
add	edx, 1A60h
inc	ecx
mov	dword ptr [eax], 0FFFFFFFFh
mov	[eax+4], cl
mov	dword ptr [eax+8], 0
mov	dword ptr [eax+0Ch], 0

loc_83A1F6:
movzx	ecx, byte ptr [edi+0Dh]
push	ecx
mov	ecx, esi
call	sub_8370F0
movzx	edx, byte ptr [edi+0Dh]
push	edx
mov	ecx, esi
call	sub_836FB0
pop	edi
pop	esi
retn
sub_83A170 endp

align 10h



sub_83A220 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
push	edi
mov	edi, [eax+2480h]
call	sub_839840
mov	eax, [esi+9578h]
mov	edx, [eax+0E98h]
mov	ecx, [edi+8]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
cmp	dword ptr [edi+10h], 0
jz	short loc_83A27F
movzx	eax, byte ptr [edi+0Ch]
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+34h]
movzx	eax, al
shl	eax, 6
push	ecx
or	eax, 7FFF801Fh
jmp	short loc_83A2A4

loc_83A27F:
movzx	eax, byte ptr [edi+0Dh]
movzx	ecx, byte ptr [edi+0Ch]
mov	edx, [esi+4]
mov	edx, [edx+0Ch]
mov	edx, [edx+34h]
and	eax, 1FFh
shl	eax, 8
movzx	ecx, cl
or	eax, ecx
shl	eax, 6
push	edx
or	eax, 21h

loc_83A2A4:
push	eax
mov	ecx, esi
call	sub_838C50
mov	edx, [esi+9578h]
mov	ecx, [edx+16C0h]
mov	edx, [edi+4]
mov	[ecx], edx
cmp	dword ptr [edi+10h], 0
jnz	short loc_83A2CA
mov	ecx, esi
call	sub_839A90

loc_83A2CA:
mov	ecx, [edi+8]
inc	ecx
push	ecx
push	eax
mov	ecx, esi
call	sub_838FB0
pop	edi
pop	esi
retn
sub_83A220 endp

align 10h



sub_83A2E0 proc	near

var_4= dword ptr -4

push	ecx
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ebx, [eax+16D4h]
push	edi
mov	edi, [eax+2480h]
mov	dword ptr [eax+16D4h], 0FFFFFFFFh
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+34h]
push	eax
push	7FFF8016h
mov	ecx, esi
call	sub_838C50
push	ebx
lea	edx, [esp+14h+var_4]
push	edx
mov	ecx, esi
mov	[esp+18h+var_4], eax
call	sub_838BE0
mov	eax, [edi+4]
mov	ecx, [esp+10h+var_4]
push	eax
push	ecx
mov	ecx, esi
call	sub_838FB0
pop	edi
pop	esi
pop	ebx
pop	ecx
retn
sub_83A2E0 endp

align 10h



sub_83A340 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
push	edi
mov	edi, [eax+16D4h]
mov	dword ptr [eax+16D4h], 0FFFFFFFFh
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+34h]
push	eax
push	7FFF8016h
mov	ecx, esi
call	sub_838C50
push	edi
lea	edx, [esp+10h+var_4]
push	edx
mov	ecx, esi
mov	[esp+14h+var_4], eax
call	sub_838BE0
mov	ecx, [esi+9578h]
mov	edx, [ecx+2480h]
mov	eax, [esp+0Ch+var_4]
push	eax
add	edx, 4
push	edx
mov	ecx, esi
call	sub_838BE0
mov	eax, [esi+9578h]
mov	ecx, [eax+2480h]
mov	edx, [eax+0E98h]
mov	ecx, [ecx+8]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
pop	edi
pop	esi
pop	ecx
retn
sub_83A340 endp

align 10h



sub_83A3E0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	esi
mov	edi, ecx
call	sub_839630
mov	eax, [esi]
dec	eax
cmp	eax, 0Bh	; switch 12 cases
ja	short loc_83A448 ; default
			; jumptable 0083A3FD cases 5-8
movzx	eax, ds:byte_83A480[eax]
jmp	ds:off_83A46C[eax*4] ; switch jump

loc_83A404:		; jumptable 0083A3FD cases 0,2
mov	dword ptr [esi], 2
jmp	short loc_83A448 ; default
			; jumptable 0083A3FD cases 5-8

loc_83A40C:		; jumptable 0083A3FD cases 1,3,4
mov	dword ptr [esi], 3
jmp	short loc_83A448 ; default
			; jumptable 0083A3FD cases 5-8

loc_83A414:		; jumptable 0083A3FD case 9
push	esi
mov	ecx, edi
call	sub_837420
jmp	short loc_83A448 ; default
			; jumptable 0083A3FD cases 5-8

loc_83A41E:		; jumptable 0083A3FD cases 10,11
push	esi
mov	ecx, edi
call	sub_839D00
push	esi
mov	ecx, edi
call	sub_836F70
mov	eax, [esi+4]
push	0
push	eax
push	0
push	13h
mov	ecx, edi
call	sub_838D10
mov	[esi+4], eax
mov	dword ptr [esi], 0Bh

loc_83A448:		; default
mov	ecx, [esi+10h]	; jumptable 0083A3FD cases 5-8
mov	eax, [esi+0Ch]
mov	[esi+0Ch], ecx
push	eax
mov	ecx, edi
mov	[esi+10h], eax
call	sub_837450
mov	edx, [esi+0Ch]
push	edx
mov	ecx, edi
call	sub_837450
pop	edi
pop	esi
retn	4
sub_83A3E0 endp

off_83A46C dd offset loc_83A404	; jump table for switch	statement
dd offset loc_83A40C
dd offset loc_83A414
dd offset loc_83A41E
dd offset loc_83A448
byte_83A480 db	    0,	   1,	  0,	 1 ; indirect table for	switch statement
db	1,     4,     4,     4
db	4,     2,     3,     3
align 10h



sub_83A490 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
mov	edx, [ecx+34h]
mov	eax, [esp+4+arg_C]
mov	ecx, [esp+4+arg_8]
and	eax, 1FFh
shl	ecx, 9
or	eax, ecx
mov	ecx, [esp+4+arg_0]
push	edi
push	edx
movzx	edx, [esp+0Ch+arg_4]
shl	eax, 8
or	eax, edx
and	ecx, 3Fh
shl	eax, 6
or	eax, ecx
push	eax
mov	ecx, esi
call	sub_838C50
mov	eax, [esi+9578h]
mov	edi, [eax+16D4h]
mov	dword ptr [eax+16D4h], 0FFFFFFFFh
mov	edx, [esi+4]
mov	eax, [edx+0Ch]
mov	eax, [eax+34h]
push	eax
push	7FFF8016h
mov	ecx, esi
call	sub_838C50
push	edi
lea	ecx, [esp+0Ch+arg_C]
push	ecx
mov	ecx, esi
mov	[esp+10h+arg_C], eax
call	sub_838BE0
mov	eax, [esp+8+arg_C]
pop	edi
pop	esi
retn	10h
sub_83A490 endp

align 10h



sub_83A520 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
push	edi
push	ebx
mov	edi, ecx
call	sub_839630
cmp	dword ptr [ebx], 0Ch
jnz	short loc_83A55C
mov	ecx, [ebx+4]
test	ecx, 100h
jnz	short loc_83A55C
mov	eax, [edi+9578h]
mov	edx, [eax+1B34h]
sub	edx, [eax+1B30h]
inc	edx
cmp	ecx, edx
jb	short loc_83A55C
dec	dword ptr [eax+16D8h]

loc_83A55C:
mov	eax, [edi+9578h]
mov	esi, [eax+16D8h]
inc	esi
cmp	esi, [eax+16DCh]
jbe	short loc_83A592
cmp	esi, 0C8h
jb	short loc_83A586
mov	ecx, [edi+10h]
push	offset aFunctionOrExpr ; "Function or expression requires too man"...
call	sub_83EDE0

loc_83A586:
mov	eax, [edi+9578h]
mov	[eax+16DCh], esi

loc_83A592:
mov	ecx, [edi+9578h]
mov	[ecx+16D8h], esi
dec	esi
push	esi
push	ebx
mov	ecx, edi
call	sub_839D30
pop	edi
pop	esi
pop	ebx
retn	4
sub_83A520 endp

align 10h



sub_83A5B0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_0]
cmp	dword ptr [ebx], 0Bh
push	ebp
push	esi
push	edi
mov	esi, ecx
jnz	short loc_83A61A
mov	eax, [esi+9578h]
lea	ebp, [eax+670h]
mov	eax, [ebx+4]
push	eax
mov	ecx, ebp
call	sub_835AA0
mov	edi, [eax]
mov	ecx, edi
and	ecx, 3Fh
cmp	cl, 13h
jnz	short loc_83A61A
mov	ecx, ebp
call	sub_835390
mov	ecx, [esi+9578h]
add	ecx, 0EA0h
call	sub_835390
xor	edx, edx
cmp	[esp+10h+arg_4], edx
mov	ecx, esi
setz	dl
shr	edi, 17h
push	edx
push	0
push	edi
push	1Ah
call	sub_83A490
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_83A61A:
cmp	dword ptr [ebx], 0Ch
jz	short loc_83A643
push	1
mov	ecx, esi
call	sub_836FB0
mov	eax, [esi+9578h]
mov	ecx, [eax+16D8h]
dec	ecx
push	ecx
push	ebx
mov	ecx, esi
call	sub_839700
cmp	dword ptr [ebx], 0Ch
jnz	short loc_83A66B

loc_83A643:
mov	ecx, [ebx+4]
test	ecx, 100h
jnz	short loc_83A66B
mov	eax, [esi+9578h]
mov	edx, [eax+1B34h]
sub	edx, [eax+1B30h]
inc	edx
cmp	ecx, edx
jb	short loc_83A66B
dec	dword ptr [eax+16D8h]

loc_83A66B:
mov	eax, [esp+10h+arg_4]
mov	ebx, [ebx+4]
push	eax
push	ebx
push	0FFh
push	1Bh
mov	ecx, esi
call	sub_83A490
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_83A5B0 endp

align 10h



sub_83A690 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
push	ecx
mov	ecx, esi
call	sub_83A520
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
pop	esi
jmp	sub_835C90
sub_83A690 endp

align 10h



sub_83A6C0 proc	near
mov	eax, [ecx+9578h]
mov	edx, [eax+22D0h]
push	edx
call	sub_83A520
retn
sub_83A6C0 endp

align 10h



sub_83A6E0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [eax+0Ch]
mov	eax, [ecx+34h]
push	edi
push	eax
push	0Ah
mov	ecx, esi
call	sub_838C50
lea	ecx, [esi+18h]
mov	edi, eax
call	sub_835F80
xor	edx, edx
or	ebx, 0FFFFFFFFh
cmp	eax, edx
jz	short loc_83A731
mov	ecx, [esi+9578h]
mov	ecx, [ecx+22D0h]
mov	[eax], edx
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+4], edx
mov	[eax+14h], ecx
mov	[eax+18h], edx
mov	[eax+1Ch], edx
mov	[eax+20h], edx
mov	[eax+2Ch], edi

loc_83A731:
mov	eax, [esi+9578h]
mov	eax, [eax+22D0h]
cmp	eax, edx
jz	short loc_83A750
mov	dword ptr [eax], 0Bh
mov	[eax+0Ch], ebx
mov	[eax+10h], ebx
mov	[eax+4], edi

loc_83A750:
mov	ecx, [esi+9578h]
mov	edx, [ecx+22D0h]
push	edx
mov	ecx, esi
call	sub_83A520
pop	edi
pop	esi
pop	ebx
retn
sub_83A6E0 endp

align 10h



sub_83A770 proc	near
push	esi
push	edi
mov	edi, ecx
mov	esi, [edi+278h]
cmp	dword ptr [esi], 0
jz	short loc_83A7AC
push	esi
call	sub_83A520
cmp	dword ptr [esi+20h], 32h
mov	dword ptr [esi], 0
jnz	short loc_83A7AC
mov	ecx, [esi+14h]
mov	eax, [esi+1Ch]
mov	edx, [ecx+4]
push	32h
push	eax
push	edx
mov	ecx, edi
call	sub_839590
mov	dword ptr [esi+20h], 0

loc_83A7AC:
pop	edi
pop	esi
retn
sub_83A770 endp

align 10h



sub_83A7B0 proc	near

; FUNCTION CHUNK AT 00835840 SIZE 00000123 BYTES

push	ebx
mov	ebx, ecx
push	esi
mov	esi, [ebx+278h]
cmp	dword ptr [esi+20h], 0
jz	short loc_83A80D
mov	eax, [esi]
cmp	eax, 0Dh
jz	short loc_83A7CC
cmp	eax, 0Eh
jnz	short loc_83A7ED

loc_83A7CC:
push	0FFFFFFFFh
push	esi
call	sub_8383A0
mov	ecx, [esi+14h]
mov	eax, [esi+1Ch]
mov	edx, [ecx+4]
push	0FFFFFFFFh
push	eax
push	edx
mov	ecx, ebx
call	sub_839590
dec	dword ptr [esi+1Ch]
jmp	short loc_83A80D

loc_83A7ED:
test	eax, eax
jz	short loc_83A7F7
push	esi
call	sub_83A520

loc_83A7F7:
mov	eax, [esi+20h]
mov	ecx, [esi+1Ch]
mov	edx, [esi+14h]
push	eax
mov	eax, [edx+4]
push	ecx
push	eax
mov	ecx, ebx
call	sub_839590

loc_83A80D:
mov	ecx, [esi+2Ch]
push	ecx
mov	ecx, [ebx+9578h]
add	ecx, 670h
call	sub_835AA0
mov	ecx, [esi+1Ch]
xor	edx, edx
cmp	ecx, 10h
jb	short loc_83A839
lea	esp, [esp+0]

loc_83A830:
inc	ecx
shr	ecx, 1
inc	edx
cmp	ecx, 10h
jnb	short loc_83A830

loc_83A839:
push	edi
cmp	ecx, 8
jnb	short loc_83A843
mov	edi, ecx
jmp	short loc_83A84F

loc_83A843:
lea	edi, ds:8[edx*8]
add	ecx, 0FFFFFFF8h
or	edi, ecx

loc_83A84F:
mov	edx, [eax]
shl	edi, 17h
and	edx, offset loc_7FFFFF
or	edx, edi
mov	[eax], edx
mov	ecx, [esi+18h]
xor	esi, esi
pop	edi
cmp	ecx, 10h
jb	short loc_83A879
lea	esp, [esp+0]

loc_83A870:
inc	ecx
shr	ecx, 1
inc	esi
cmp	ecx, 10h
jnb	short loc_83A870

loc_83A879:
cmp	ecx, 8
jnb	short loc_83A882
mov	esi, ecx
jmp	short loc_83A88E

loc_83A882:
lea	esi, ds:8[esi*8]
add	ecx, 0FFFFFFF8h
or	esi, ecx

loc_83A88E:
shl	esi, 0Eh
xor	esi, edx
and	esi, 7FC000h
xor	esi, edx
mov	[eax], esi
pop	esi
lea	ecx, [ebx+18h]
pop	ebx
jmp	loc_835840
sub_83A7B0 endp

align 10h



sub_83A8B0 proc	near

arg_0= dword ptr  4

push	ebx
push	ebp
push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
mov	ebp, [ecx+22D0h]
add	ecx, 1DB0h
push	edi
call	sub_835C90
mov	eax, [esi+9578h]
mov	edi, [eax+22D0h]
mov	eax, [ebp+0]
mov	ebx, [edi+4]
cmp	eax, 0Dh
jz	short loc_83A8E9
cmp	eax, 0Eh
jnz	short loc_83A8EE

loc_83A8E9:
or	eax, 0FFFFFFFFh
jmp	short loc_83A909

loc_83A8EE:
test	eax, eax
jz	short loc_83A8FA
push	ebp
mov	ecx, esi
call	sub_83A520

loc_83A8FA:
mov	ecx, [esi+9578h]
mov	eax, [ecx+16D8h]
sub	eax, ebx
dec	eax

loc_83A909:
mov	edx, [esi+4]
mov	ecx, [edx+0Ch]
mov	ecx, [ecx+34h]
inc	eax
shl	eax, 17h
movzx	edx, bl
and	eax, 0FF80801Ch
shl	edx, 6
or	eax, edx
push	ecx
or	eax, 801Ch
push	eax
mov	ecx, esi
call	sub_838C50
mov	edx, [esp+10h+arg_0]
mov	dword ptr [edi], 0Dh
mov	[edi+4], eax
or	ecx, 0FFFFFFFFh
mov	[edi+0Ch], ecx
mov	[edi+10h], ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+16C0h]
pop	edi
mov	[ecx], edx
mov	eax, [esi+9578h]
pop	esi
inc	ebx
pop	ebp
mov	[eax+16D8h], ebx
pop	ebx
retn	4
sub_83A8B0 endp

align 10h



sub_83A970 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
mov	esi, [esp+4+arg_0]
sub	esi, [esp+4+arg_4]
push	edi
mov	edi, ecx
mov	eax, [edi+9578h]
mov	eax, [eax+22D0h]
mov	ecx, [eax]
cmp	ecx, 0Dh
jz	short loc_83A994
cmp	ecx, 0Eh
jnz	short loc_83A9B7

loc_83A994:
add	esi, 1
jns	short loc_83A99B
xor	esi, esi

loc_83A99B:
push	esi
push	eax
mov	ecx, edi
call	sub_838250
cmp	esi, 1
jle	short loc_83A9E6
dec	esi
push	esi
mov	ecx, edi
call	sub_836FB0
pop	edi
pop	esi
retn	8

loc_83A9B7:
test	ecx, ecx
jz	short loc_83A9C3
push	eax
mov	ecx, edi
call	sub_83A520

loc_83A9C3:
test	esi, esi
jle	short loc_83A9E6
mov	ecx, [edi+9578h]
push	ebx
mov	ebx, [ecx+16D8h]
push	esi
mov	ecx, edi
call	sub_836FB0
push	esi
push	ebx
mov	ecx, edi
call	sub_838D50
pop	ebx

loc_83A9E6:
pop	edi
pop	esi
retn	8
sub_83A970 endp

align 10h



sub_83A9F0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
push	edi
push	esi
mov	edi, ecx
call	sub_839630
cmp	dword ptr [esi], 0Ch
jnz	short loc_83AA3B
mov	eax, [esi+0Ch]
cmp	eax, [esi+10h]
jz	short loc_83AA43
mov	eax, [edi+9578h]
mov	edx, [eax+1B34h]
sub	edx, [eax+1B30h]
mov	ecx, [esi+4]
add	eax, 1A60h
inc	edx
cmp	ecx, edx
jb	short loc_83AA3B
push	ecx
push	esi
mov	ecx, edi
call	sub_839D30
mov	eax, [esi+4]
pop	edi
pop	esi
retn	4

loc_83AA3B:
push	esi
mov	ecx, edi
call	sub_83A520

loc_83AA43:
mov	eax, [esi+4]
pop	edi
pop	esi
retn	4
sub_83A9F0 endp

align 10h



sub_83AA50 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	edx, [eax+0Ch]
mov	[esp+arg_0], eax
cmp	edx, [eax+10h]
jz	short loc_83AA65
jmp	sub_83A9F0

loc_83AA65:
jmp	sub_839630
sub_83AA50 endp

align 10h



sub_83AA70 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_839630
mov	eax, [edi]
add	eax, 0FFFFFFFEh
cmp	eax, 8		; switch 9 cases
ja	short loc_83AAD2 ; default
			; jumptable 0083AA8F cases 4-7
movzx	eax, ds:byte_83AB30[eax]
jmp	ds:off_83AB20[eax*4] ; switch jump

loc_83AA96:		; jumptable 0083AA8F cases 0,2,3
or	eax, 0FFFFFFFFh
jmp	short loc_83AADC

loc_83AA9B:		; jumptable 0083AA8F case 1
mov	ecx, esi
call	sub_839A90
jmp	short loc_83AADC

loc_83AAA4:		; jumptable 0083AA8F case 8
mov	ecx, [edi+4]
push	ecx
mov	ecx, esi
call	sub_8373A0
mov	ecx, [eax]
mov	edx, ecx
and	edx, 3FC0h
neg	edx
sbb	edx, edx
inc	edx
shl	edx, 6
xor	edx, ecx
and	edx, 3FC0h
xor	edx, ecx
mov	[eax], edx
mov	eax, [edi+4]
jmp	short loc_83AADC

loc_83AAD2:		; default
push	0		; jumptable 0083AA8F cases 4-7
push	edi
mov	ecx, esi
call	sub_83A5B0

loc_83AADC:
push	eax
lea	eax, [edi+10h]
push	eax
mov	ecx, esi
call	sub_838BE0
mov	eax, [esi+9578h]
mov	edx, [eax+0E98h]
mov	ecx, [edi+0Ch]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
mov	dword ptr [edi+0Ch], 0FFFFFFFFh
pop	edi
pop	esi
retn	4
sub_83AA70 endp

align 10h
off_83AB20 dd offset loc_83AA96	; jump table for switch	statement
dd offset loc_83AA9B
dd offset loc_83AAA4
dd offset loc_83AAD2
byte_83AB30 db	    0,	   1,	  0,	 0 ; indirect table for	switch statement
db	3,     3,     3,     3
db	2
align 10h



sub_83AB40 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, [esp+8+arg_0]
push	edi
mov	esi, ecx
call	sub_839630
mov	eax, [edi]
dec	eax
cmp	eax, 9		; switch 10 cases
ja	short loc_83AB77 ; default
			; jumptable 0083AB5D cases 3-8
movzx	eax, ds:byte_83ABD4[eax]
jmp	ds:off_83ABC4[eax*4] ; switch jump

loc_83AB64:		; jumptable 0083AB5D cases 0,2
or	eax, 0FFFFFFFFh
jmp	short loc_83AB81

loc_83AB69:		; jumptable 0083AB5D case 1
mov	ecx, esi
call	sub_839A90
jmp	short loc_83AB81

loc_83AB72:		; jumptable 0083AB5D case 9
mov	eax, [edi+4]
jmp	short loc_83AB81

loc_83AB77:		; default
push	1		; jumptable 0083AB5D cases 3-8
push	edi
mov	ecx, esi
call	sub_83A5B0

loc_83AB81:
push	eax
lea	ecx, [edi+0Ch]
push	ecx
mov	ecx, esi
call	sub_838BE0
mov	eax, [esi+9578h]
mov	edx, [eax+0E98h]
mov	ecx, [edi+10h]
mov	[eax+1C3Ch], edx
mov	eax, [esi+9578h]
push	ecx
add	eax, 16D4h
push	eax
mov	ecx, esi
call	sub_838BE0
mov	dword ptr [edi+10h], 0FFFFFFFFh
pop	edi
pop	esi
retn	4
sub_83AB40 endp

align 4
off_83ABC4 dd offset loc_83AB64	; jump table for switch	statement
dd offset loc_83AB69
dd offset loc_83AB72
dd offset loc_83AB77
byte_83ABD4 db	    0,	   1,	  0,	 3 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     2
align 10h



sub_83ABE0 proc	near
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+9578h]
mov	esi, [ecx+22D0h]
add	ecx, 1DB0h
call	sub_835C90
cmp	dword ptr [esi], 1
jnz	short loc_83AC06
mov	dword ptr [esi], 3

loc_83AC06:
push	esi
mov	ecx, edi
call	sub_83AA70
mov	eax, [edi+9578h]
mov	edx, [esi+10h]
mov	ecx, [eax+2480h]
pop	edi
mov	[ecx+14h], edx
pop	esi
retn
sub_83ABE0 endp

align 10h



sub_83AC30 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
push	ecx
mov	ecx, esi
call	sub_83A9F0
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
pop	esi
jmp	sub_836510
sub_83AC30 endp

align 10h



sub_83AC60 proc	near
mov	eax, [ecx+9578h]
mov	eax, [eax+22D0h]
mov	edx, [eax+0Ch]
push	eax
cmp	edx, [eax+10h]
jz	short loc_83AC7B
call	sub_83A9F0
retn

loc_83AC7B:
call	sub_839630
retn
sub_83AC60 endp

align 10h



sub_83AC90 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
push	edi
mov	edi, [eax+22D0h]
mov	eax, [edi]
cmp	eax, 0Dh
jz	short loc_83ACB1
cmp	eax, 0Eh
jnz	short loc_83AD0F

loc_83ACB1:
push	0FFFFFFFFh
push	edi
call	sub_8383A0
cmp	dword ptr [edi], 0Dh
jnz	short loc_83ACF1
cmp	ebx, 1
jnz	short loc_83ACF1
mov	eax, [esi+9578h]
mov	edi, [edi+4]
push	ebp
lea	ebx, [eax+670h]
push	edi
mov	ecx, ebx
call	sub_835AA0
push	edi
mov	ecx, ebx
mov	ebp, eax
call	sub_835AA0
mov	ecx, [ebp+0]
and	ecx, 0FFFFFFDDh
or	ecx, 1Dh
mov	[eax], ecx
pop	ebp

loc_83ACF1:
mov	ecx, [esi+9578h]
mov	eax, [ecx+1B34h]
sub	eax, [ecx+1B30h]
add	ecx, 1A60h
inc	eax
or	ebx, 0FFFFFFFFh
jmp	short loc_83AD3A

loc_83AD0F:
push	edi
cmp	ebx, 1
jnz	short loc_83AD1C
call	sub_83A9F0
jmp	short loc_83AD3A

loc_83AD1C:
call	sub_83A520
mov	ecx, [esi+9578h]
mov	eax, [ecx+1B34h]
sub	eax, [ecx+1B30h]
add	ecx, 1A60h
inc	eax

loc_83AD3A:
mov	edx, [esi+4]
mov	ecx, [edx+0Ch]
mov	edx, [ecx+34h]
inc	ebx
movzx	eax, al
shl	ebx, 17h
and	ebx, 0FF80001Eh
shl	eax, 6
or	ebx, eax
push	edx
or	ebx, 1Eh
push	ebx
mov	ecx, esi
call	sub_838C50
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_835C90
pop	edi
pop	esi
pop	ebx
retn	4
sub_83AC90 endp

align 10h



sub_83AD80 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
mov	eax, [esi+958Ch]
mov	edx, [ecx+2490h]
push	eax
push	edx
mov	ecx, esi
call	sub_83A970
mov	eax, [esi+9578h]
mov	ecx, [eax+2490h]
push	ecx
mov	ecx, esi
call	sub_8370F0
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
pop	esi
jmp	sub_835C90
sub_83AD80 endp

align 10h



sub_83ADD0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
push	edi
push	eax
push	3
mov	esi, ecx
call	sub_83A970
mov	eax, [esi+9578h]
mov	edi, [eax+16D8h]
add	edi, 3
cmp	edi, [eax+16DCh]
jbe	short loc_83AE18
cmp	edi, 0C8h
jb	short loc_83AE0C
mov	ecx, [esi+10h]
push	offset aFunctionOrExpr ; "Function or expression requires too man"...
call	sub_83EDE0

loc_83AE0C:
mov	ecx, [esi+9578h]
mov	[ecx+16DCh], edi

loc_83AE18:
mov	edx, [esi+9578h]
mov	eax, [edx+2480h]
add	byte ptr [eax+0Dh], 0FDh
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_835C90
pop	edi
pop	esi
retn	4
sub_83ADD0 endp

align 10h



sub_83AE40 proc	near

var_C= dword ptr -0Ch
arg_0= dword ptr  4

push	esi
mov	esi, [esp+4+arg_0]
mov	eax, [esi+0Ch]
push	edi
mov	edi, ecx
push	esi
cmp	eax, [esi+10h]
jz	short loc_83AE58
call	sub_83A9F0
jmp	short loc_83AE5D

loc_83AE58:
call	sub_839630

loc_83AE5D:
mov	eax, [esi]
lea	ecx, [eax-1]	; switch 5 cases
cmp	ecx, 4
ja	short loc_83AEDA ; default
jmp	ds:off_83AEE8[ecx*4] ; switch jump

loc_83AE6E:		; jumptable 0083AE67 cases 1-3,5
mov	ecx, [edi+9578h]
cmp	dword ptr [ecx+238h], 0FFh
ja	short loc_83AEDA ; default
mov	ecx, eax
sub	ecx, 1
jz	short loc_83AEB6
sub	ecx, 4
jz	short loc_83AE9E
xor	edx, edx
cmp	eax, 2
setz	dl
mov	ecx, edi
push	edx
call	sub_838E40
jmp	short loc_83AEBD

loc_83AE9E:
fld	dword ptr [esi+4]
push	ecx		; float
fstp	[esp+0Ch+arg_0]
mov	ecx, edi
fld	[esp+0Ch+arg_0]
fstp	[esp+0Ch+var_C]
call	sub_838E70
jmp	short loc_83AEBD

loc_83AEB6:
mov	ecx, edi
call	sub_838E10

loc_83AEBD:
mov	[esi+4], eax
mov	dword ptr [esi], 4

loc_83AEC6:
pop	edi
or	eax, 100h
pop	esi
retn	4

loc_83AED0:		; jumptable 0083AE67 case 4
mov	eax, [esi+4]
cmp	eax, 0FFh
jle	short loc_83AEC6

loc_83AEDA:		; default
push	esi
mov	ecx, edi
call	sub_83A9F0
pop	edi
pop	esi
retn	4
sub_83AE40 endp

align 4
off_83AEE8 dd offset loc_83AE6E	; jump table for switch	statement
dd offset loc_83AE6E
dd offset loc_83AE6E
dd offset loc_83AED0
dd offset loc_83AE6E
align 10h



sub_83AF00 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+278h]
inc	dword ptr [eax+18h]
mov	eax, [esi+9578h]
mov	eax, [eax+22D0h]
push	edi
mov	edi, [esi+278h]
push	eax
call	sub_83AE40
mov	[edi+28h], eax
mov	ecx, [esi+9578h]
mov	edx, [ecx+22D0h]
pop	edi
mov	dword ptr [edx], 0
pop	esi
retn
sub_83AF00 endp

align 10h



sub_83AF40 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	eax, [eax+22D0h]
push	edi
mov	edi, [esi+278h]
mov	ecx, [edi+14h]
mov	ebx, [ecx+4]
push	eax
mov	ecx, esi
call	sub_83AE40
mov	edx, [esi+4]
mov	ecx, [edx+0Ch]
mov	edx, [ecx+34h]
mov	ecx, [edi+28h]
shl	ecx, 9
push	edx
and	eax, 1FFh
or	ecx, eax
shl	ecx, 8
movzx	edx, bl
or	ecx, edx
shl	ecx, 6
or	ecx, 9
push	ecx
mov	ecx, esi
call	sub_838C50
mov	ecx, [edi+24h]
mov	eax, [esi+9578h]
mov	[eax+16D8h], ecx
mov	ecx, [esi+9578h]
pop	edi
pop	esi
add	ecx, 1DB0h
pop	ebx
jmp	sub_835C90
sub_83AF40 endp

align 10h



sub_83AFC0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
mov	ebx, [esp+4+arg_4]
push	esi
push	edi
mov	edi, [esp+0Ch+arg_0]
mov	eax, [edi]
add	eax, 0FFFFFFFAh
mov	esi, ecx
cmp	eax, 3		; switch 4 cases
ja	short loc_83B035 ; default
jmp	ds:off_83B068[eax*4] ; switch jump

loc_83AFDE:		; jumptable 0083AFD7 case 0
push	ebx
call	sub_836F70
mov	eax, [edi+4]
push	eax
push	ebx
mov	ecx, esi
call	sub_839D30
pop	edi
pop	esi
pop	ebx
retn	8

loc_83AFF6:		; jumptable 0083AFD7 case 1
push	ebx
call	sub_83A9F0
mov	ecx, [edi+4]
push	0
push	ecx
push	eax
push	8
jmp	short loc_83B02E

loc_83B007:		; jumptable 0083AFD7 case 2
push	ebx
call	sub_83A9F0
mov	edx, [edi+4]
push	edx
push	eax
push	7
mov	ecx, esi
call	sub_838CE0
jmp	short loc_83B035 ; default

loc_83B01D:		; jumptable 0083AFD7 case 3
push	ebx
call	sub_83AE40
mov	ecx, [edi+4]
push	eax
mov	eax, [edi+8]
push	eax
push	ecx
push	9

loc_83B02E:
mov	ecx, esi
call	sub_838D10

loc_83B035:		; default
cmp	dword ptr [ebx], 0Ch
jnz	short loc_83B062
mov	ebx, [ebx+4]
test	ebx, 100h
jnz	short loc_83B062
mov	esi, [esi+9578h]
mov	edx, [esi+1B34h]
sub	edx, [esi+1B30h]
inc	edx
cmp	ebx, edx
jb	short loc_83B062
dec	dword ptr [esi+16D8h]

loc_83B062:
pop	edi
pop	esi
pop	ebx
retn	8
sub_83AFC0 endp

off_83B068 dd offset loc_83AFDE	; jump table for switch	statement
dd offset loc_83AFF6
dd offset loc_83B007
dd offset loc_83B01D
align 10h



sub_83B080 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
cmp	eax, 0Eh	; switch 15 cases
ja	short loc_83B0DD ; default
			; jumptable 0083B090 cases 7-12
movzx	eax, ds:byte_83B100[eax]
jmp	ds:off_83B0EC[eax*4] ; switch jump

loc_83B097:		; jumptable 0083B090 case 13
mov	edx, [esp+arg_4]
push	edx
call	sub_83AA70
retn	8

loc_83B0A4:		; jumptable 0083B090 case 14
mov	eax, [esp+arg_4]
push	eax
call	sub_83AB40
retn	8

loc_83B0B1:		; jumptable 0083B090 case 6
mov	edx, [esp+arg_4]
push	edx
call	sub_83A520
retn	8

loc_83B0BE:		; jumptable 0083B090 cases 0-5
mov	eax, [esp+arg_4]
cmp	dword ptr [eax], 5
jnz	short loc_83B0E1
or	edx, 0FFFFFFFFh
cmp	[eax+0Ch], edx
jnz	short loc_83B0E1
cmp	[eax+10h], edx
jz	short locret_83B0E7
push	eax
call	sub_83AE40
retn	8

loc_83B0DD:		; default
mov	eax, [esp+arg_4] ; jumptable 0083B090 cases 7-12

loc_83B0E1:
push	eax
call	sub_83AE40

locret_83B0E7:
retn	8
sub_83B080 endp

align 4
off_83B0EC dd offset loc_83B0BE	; jump table for switch	statement
dd offset loc_83B0B1
dd offset loc_83B097
dd offset loc_83B0A4
dd offset loc_83B0DD
byte_83B100 db	    0,	   0,	  0,	 0 ; indirect table for	switch statement
db	0,     0,     1,     4
db	4,     4,     4,     4
db	4,     2,     3
align 10h



sub_83B110 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

push	ebx
mov	ebx, [esp+4+arg_8]
push	ebp
push	esi
push	edi
push	ebx
mov	esi, ecx
call	sub_83AE40
mov	edi, [esp+10h+arg_C]
push	edi
mov	ecx, esi
mov	ebp, eax
call	sub_83AE40
cmp	dword ptr [edi], 0Ch
jnz	short loc_83B15B
mov	edi, [edi+4]
test	edi, 100h
jnz	short loc_83B15B
mov	ecx, [esi+9578h]
mov	edx, [ecx+1B34h]
sub	edx, [ecx+1B30h]
inc	edx
cmp	edi, edx
jb	short loc_83B15B
dec	dword ptr [ecx+16D8h]

loc_83B15B:
cmp	dword ptr [ebx], 0Ch
jnz	short loc_83B188
mov	edx, [ebx+4]
test	edx, 100h
jnz	short loc_83B188
mov	ecx, [esi+9578h]
mov	edi, [ecx+1B34h]
sub	edi, [ecx+1B30h]
inc	edi
cmp	edx, edi
jb	short loc_83B188
dec	dword ptr [ecx+16D8h]

loc_83B188:
mov	ecx, [esp+10h+arg_4]
mov	edx, [esp+10h+arg_0]
test	ecx, ecx
jnz	short loc_83B1A4
cmp	edx, 17h
jz	short loc_83B1A4
mov	ecx, ebp
mov	ebp, eax
mov	eax, ecx
mov	ecx, 1

loc_83B1A4:
push	eax
push	ebp
push	ecx
push	edx
mov	ecx, esi
call	sub_83A490
pop	edi
pop	esi
pop	ebp
mov	[ebx+4], eax
mov	dword ptr [ebx], 0Ah
pop	ebx
retn	10h
sub_83B110 endp

align 10h



sub_83B1C0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ebx
mov	ebx, [esp+4+arg_4]
push	ebp
mov	ebp, [esp+8+arg_8]
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	ebp
push	ebx
push	edi
mov	esi, ecx
call	sub_8350E0
test	eax, eax
jnz	loc_83B2D3
cmp	edi, 12h
jz	short loc_83B1F8
cmp	edi, 14h
jz	short loc_83B1F8
push	ebp
mov	ecx, esi
call	sub_83AE40
mov	edi, eax
jmp	short loc_83B1FA

loc_83B1F8:
xor	edi, edi

loc_83B1FA:
push	ebx
mov	ecx, esi
call	sub_83AE40
mov	[esp+10h+arg_8], eax
cmp	eax, edi
jbe	short loc_83B246
cmp	dword ptr [ebx], 0Ch
jnz	short loc_83B23B
mov	edx, [ebx+4]
test	edx, 100h
jnz	short loc_83B23B
mov	ecx, [esi+9578h]
mov	eax, [ecx+1B34h]
sub	eax, [ecx+1B30h]
inc	eax
cmp	edx, eax
mov	eax, [esp+10h+arg_8]
jb	short loc_83B23B
dec	dword ptr [ecx+16D8h]

loc_83B23B:
cmp	dword ptr [ebp+0], 0Ch
jnz	short loc_83B2A1
mov	edx, [ebp+4]
jmp	short loc_83B27C

loc_83B246:
cmp	dword ptr [ebp+0], 0Ch
jnz	short loc_83B274
mov	edx, [ebp+4]
test	edx, 100h
jnz	short loc_83B274
mov	ecx, [esi+9578h]
mov	ebp, [ecx+1B34h]
sub	ebp, [ecx+1B30h]
inc	ebp
cmp	edx, ebp
jb	short loc_83B274
dec	dword ptr [ecx+16D8h]

loc_83B274:
cmp	dword ptr [ebx], 0Ch
jnz	short loc_83B2A1
mov	edx, [ebx+4]

loc_83B27C:
test	edx, 100h
jnz	short loc_83B2A1
mov	ecx, [esi+9578h]
mov	ebp, [ecx+1B34h]
sub	ebp, [ecx+1B30h]
inc	ebp
cmp	edx, ebp
jb	short loc_83B2A1
dec	dword ptr [ecx+16D8h]

loc_83B2A1:
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+34h]
and	edi, 1FFh
shl	eax, 9
or	edi, eax
mov	eax, [esp+10h+arg_0]
shl	edi, 0Eh
and	eax, 3Fh
push	ecx
or	edi, eax
push	edi
mov	ecx, esi
call	sub_838C50
mov	[ebx+4], eax
mov	dword ptr [ebx], 0Bh

loc_83B2D3:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	0Ch
sub_83B1C0 endp

align 10h



sub_83B2E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_0]
push	edi
mov	esi, ecx
call	sub_83A9F0
cmp	dword ptr [edi], 0Ch
jnz	short loc_83B31D
mov	ecx, [edi+4]
test	ecx, 100h
jnz	short loc_83B31D
mov	eax, [esi+9578h]
mov	edx, [eax+1B34h]
sub	edx, [eax+1B30h]
inc	edx
cmp	ecx, edx
jb	short loc_83B31D
dec	dword ptr [eax+16D8h]

loc_83B31D:
mov	eax, [esi+9578h]
mov	ebx, [eax+16D8h]
lea	ebp, [ebx+2]
cmp	ebp, [eax+16DCh]
jbe	short loc_83B355
cmp	ebp, 0C8h
jb	short loc_83B349
mov	ecx, [esi+10h]
push	offset aFunctionOrExpr ; "Function or expression requires too man"...
call	sub_83EDE0

loc_83B349:
mov	eax, [esi+9578h]
mov	[eax+16DCh], ebp

loc_83B355:
mov	ecx, [esi+9578h]
mov	edx, [esp+10h+arg_4]
mov	[ecx+16D8h], ebp
mov	ebp, [edi+4]
push	edx
mov	ecx, esi
call	sub_83AE40
mov	ecx, [esi+4]
mov	edx, [ecx+0Ch]
mov	ecx, [edx+34h]
and	eax, 1FFh
shl	ebp, 9
or	eax, ebp
shl	eax, 8
movzx	edx, bl
or	eax, edx
shl	eax, 6
push	ecx
or	eax, 0Bh
push	eax
mov	ecx, esi
call	sub_838C50
mov	eax, [esp+10h+arg_4]
cmp	dword ptr [eax], 0Ch
jnz	short loc_83B3CA
mov	eax, [eax+4]
test	eax, 100h
jnz	short loc_83B3CA
mov	esi, [esi+9578h]
mov	ecx, [esi+1B34h]
sub	ecx, [esi+1B30h]
inc	ecx
cmp	eax, ecx
jb	short loc_83B3CA
dec	dword ptr [esi+16D8h]

loc_83B3CA:
mov	[edi+4], ebx
mov	dword ptr [edi], 0Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_83B2E0 endp

align 10h



sub_83B3E0 proc	near

arg_0= dword ptr  4

mov	edx, [esp+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
push	ecx
push	edx
mov	ecx, esi
call	sub_83B080
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_836510
pop	esi
retn	4
sub_83B3E0 endp

align 10h



sub_83B420 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4

; FUNCTION CHUNK AT 00835B60 SIZE 00000123 BYTES

sub	esp, 14h
push	esi
mov	esi, ecx
cmp	dword ptr [esi+9588h], 0
jnz	short loc_83B466
or	eax, 0FFFFFFFFh
mov	[esp+18h+var_8], eax
mov	[esp+18h+var_4], eax
mov	eax, [esi+9578h]
mov	ecx, [eax+16D8h]
mov	eax, [eax+1DA0h]
dec	ecx
lea	edx, [esp+18h+var_14]
push	edx
mov	[esp+1Ch+var_10], ecx
push	eax
mov	ecx, esi
mov	[esp+20h+var_14], 0Ch
call	sub_83AFC0

loc_83B466:
mov	ecx, [esi+9578h]
mov	dword ptr [esi+9588h], 0
add	ecx, 1C40h
pop	esi
add	esp, 14h
jmp	loc_835B60
sub_83B420 endp

align 10h



sub_83B490 proc	near

arg_0= dword ptr  4

push	ebx
mov	ebx, [esp+4+arg_0]
push	esi
mov	esi, ecx
mov	eax, [esi+9578h]
push	edi
mov	dword ptr [esi+9588h], 0
mov	edi, [eax+1DA8h]
cmp	ebx, edi
jz	short loc_83B4CE
push	ebx
push	edi
call	sub_83A970
cmp	ebx, edi
jbe	short loc_83B4FF
mov	eax, [esi+9578h]
sub	edi, ebx
add	[eax+16D8h], edi
jmp	short loc_83B4FF

loc_83B4CE:
mov	eax, [eax+22D0h]
push	eax
call	sub_838430
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
mov	edx, [eax+1DA0h]
push	ecx
push	edx
mov	ecx, esi
call	sub_83AFC0
mov	dword ptr [esi+9588h], 1

loc_83B4FF:
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_835C90
pop	edi
pop	esi
pop	ebx
retn	4
sub_83B490 endp

align 10h



sub_83B520 proc	near

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+9578h]
mov	esi, [ecx+22D0h]
add	ecx, 1DB0h
call	sub_835C90
test	esi, esi
jz	short loc_83B571
mov	eax, [esp+14h+arg_0]
lea	ecx, [esp+14h+var_8]
push	ecx
mov	ecx, edi
mov	[esp+18h+var_8], 4
mov	[esp+18h+var_4], eax
call	sub_838530
or	ecx, 0FFFFFFFFh
mov	dword ptr [esi], 4
mov	[esi+0Ch], ecx
mov	[esi+10h], ecx
mov	[esi+4], eax

loc_83B571:
mov	edx, [edi+9578h]
mov	ebx, [edx+22D0h]
push	esi
mov	ecx, edi
call	sub_83AE40
pop	edi
pop	esi
mov	[ebx+8], eax
mov	dword ptr [ebx], 9
pop	ebx
add	esp, 8
retn	4
sub_83B520 endp

align 10h



sub_83B5A0 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 1Ch
push	esi
mov	esi, ecx
mov	ecx, [esp+20h+arg_0]
mov	eax, 4
mov	[esp+20h+var_1C], eax
mov	[esp+20h+var_14], eax
or	eax, 0FFFFFFFFh
lea	edx, [esp+20h+var_1C]
mov	[esp+20h+var_18], ecx
push	edx
mov	ecx, esi
mov	[esp+24h+var_8], eax
mov	[esp+24h+var_4], eax
call	sub_838530
mov	ecx, [esi+9578h]
mov	edx, [ecx+22D0h]
mov	[esp+20h+var_10], eax
lea	eax, [esp+20h+var_14]
push	eax
push	edx
mov	ecx, esi
call	sub_83B2E0
pop	esi
add	esp, 1Ch
retn	4
sub_83B5A0 endp

align 10h



sub_83B600 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
mov	ebx, [ecx+22D0h]
add	ecx, 1DB0h
push	edi
call	sub_835C90
mov	eax, [esi+9578h]
mov	edi, [eax+22D0h]
push	ebx
mov	ecx, esi
call	sub_83AE40
mov	[edi+8], eax
mov	dword ptr [edi], 9
pop	edi
pop	esi
pop	ebx
retn
sub_83B600 endp

align 10h



sub_83B640 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
push	edi
mov	edi, [ecx+520h]
call	sub_835C90
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
push	edi
push	ecx
mov	ecx, esi
call	sub_83AFC0
mov	edi, [esi+9578h]
mov	edx, [edi+1B34h]
movzx	eax, byte ptr [edx]
push	eax
lea	ecx, [edi+1730h]
call	sub_835B00
mov	ecx, [edi+0E98h]
mov	[eax+4], ecx
mov	ecx, [esi+9578h]
pop	edi
add	ecx, 1DB0h
pop	esi
jmp	sub_835C90
sub_83B640 endp

align 10h



sub_83B6B0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
push	edi
mov	edi, [ecx+520h]
call	sub_835C90
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
push	edi
push	ecx
mov	ecx, esi
call	sub_83AFC0
mov	edx, [esi+9578h]
mov	eax, [edx+16C0h]
mov	ecx, [esp+8+arg_0]
mov	[eax], ecx
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
call	sub_835C90
pop	edi
pop	esi
retn	4
sub_83B6B0 endp

align 10h



sub_83B710 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 1Ch
push	esi
push	edi
mov	edi, [esp+24h+arg_4]
push	edi
mov	esi, ecx
call	sub_83A9F0
mov	ecx, [esp+24h+arg_0]
mov	eax, 4
mov	[esp+24h+var_1C], eax
mov	[esp+24h+var_14], eax
or	eax, 0FFFFFFFFh
lea	edx, [esp+24h+var_1C]
mov	[esp+24h+var_18], ecx
push	edx
mov	ecx, esi
mov	[esp+28h+var_8], eax
mov	[esp+28h+var_4], eax
call	sub_838530
mov	[esp+24h+var_10], eax
lea	eax, [esp+24h+var_14]
push	eax
mov	ecx, esi
call	sub_83AE40
mov	[edi+8], eax
mov	dword ptr [edi], 9
pop	edi
pop	esi
add	esp, 1Ch
retn	8
sub_83B710 endp

align 10h



sub_83B770 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
cmp	eax, 0Eh	; switch 15 cases
ja	loc_83B9D6	; default
push	ebx
push	edi
jmp	ds:off_83B9DC[eax*4] ; switch jump

loc_83B789:		; jumptable 0083B782 case 13
mov	edi, [esp+0Ch+arg_8]
push	edi
call	sub_839630
mov	ebx, [esp+0Ch+arg_4]
mov	eax, [ebx+10h]
push	eax
lea	ecx, [edi+10h]
push	ecx
mov	ecx, esi
call	sub_838BE0
mov	edx, [edi]
mov	[ebx], edx
mov	eax, [edi+4]
mov	[ebx+4], eax
mov	ecx, [edi+8]
mov	[ebx+8], ecx
mov	edx, [edi+0Ch]
mov	[ebx+0Ch], edx
mov	eax, [edi+10h]
pop	edi
mov	[ebx+10h], eax
pop	ebx
pop	esi
retn	0Ch

loc_83B7C8:		; jumptable 0083B782 case 14
mov	edi, [esp+0Ch+arg_8]
push	edi
call	sub_839630
mov	ebx, [esp+0Ch+arg_4]
mov	ecx, [ebx+0Ch]
push	ecx
lea	edx, [edi+0Ch]
push	edx
mov	ecx, esi
call	sub_838BE0
mov	eax, [edi]
mov	[ebx], eax
mov	ecx, [edi+4]
mov	[ebx+4], ecx
mov	edx, [edi+8]
mov	[ebx+8], edx
mov	eax, [edi+0Ch]
mov	[ebx+0Ch], eax
mov	ecx, [edi+10h]
pop	edi
mov	[ebx+10h], ecx
pop	ebx
pop	esi
retn	0Ch

loc_83B807:		; jumptable 0083B782 case 6
mov	ebx, [esp+0Ch+arg_8]
push	ebx
call	sub_83AA50
cmp	dword ptr [ebx], 0Bh
jnz	short loc_83B88D
mov	edx, [ebx+4]
mov	ecx, [esi+9578h]
push	edx
add	ecx, 670h
call	sub_835AA0
mov	eax, [eax]
and	eax, 3Fh
cmp	al, 15h
jnz	short loc_83B88D
mov	edi, [esp+0Ch+arg_4]
push	ebp
push	edi
mov	ecx, esi
call	sub_836F70
mov	esi, [esi+9578h]
mov	ebp, [ebx+4]
add	esi, 670h
push	ebp
mov	ecx, esi
call	sub_835AA0
push	ebp
mov	ecx, esi
mov	[esp+14h+arg_4], eax
call	sub_835AA0
mov	ecx, [esp+10h+arg_4]
mov	edx, [ecx]
mov	ecx, [edi+4]
and	edx, offset loc_7FFFFF
shl	ecx, 17h
or	edx, ecx
mov	[eax], edx
mov	dword ptr [edi], 0Bh
mov	edx, [ebx+4]
pop	ebp
mov	[edi+4], edx
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B88D:
push	ebx
mov	ecx, esi
call	sub_83A520
mov	eax, [esp+0Ch+arg_4]
push	ebx
push	eax
push	15h
mov	ecx, esi
call	sub_83B1C0
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B8AA:		; jumptable 0083B782 case 0
mov	ecx, [esp+0Ch+arg_8]
mov	edx, [esp+0Ch+arg_4]
push	ecx
push	edx
push	0Ch
mov	ecx, esi
call	sub_83B1C0
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B8C3:		; jumptable 0083B782 case 1
mov	eax, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_4]
push	eax
push	ecx
push	0Dh
mov	ecx, esi
call	sub_83B1C0
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B8DC:		; jumptable 0083B782 case 2
mov	edx, [esp+0Ch+arg_8]
mov	eax, [esp+0Ch+arg_4]
push	edx
push	eax
push	0Eh
call	sub_83B1C0
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B8F3:		; jumptable 0083B782 case 3
mov	ecx, [esp+0Ch+arg_8]
mov	edx, [esp+0Ch+arg_4]
push	ecx
push	edx
push	0Fh
mov	ecx, esi
call	sub_83B1C0
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B90C:		; jumptable 0083B782 case 4
mov	eax, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_4]
push	eax
push	ecx
push	10h
mov	ecx, esi
call	sub_83B1C0
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B925:		; jumptable 0083B782 case 5
mov	edx, [esp+0Ch+arg_8]
mov	eax, [esp+0Ch+arg_4]
push	edx
push	eax
push	11h
call	sub_83B1C0
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B93C:		; jumptable 0083B782 case 8
mov	ecx, [esp+0Ch+arg_8]
mov	edx, [esp+0Ch+arg_4]
push	ecx
push	edx
push	1
push	17h
mov	ecx, esi
call	sub_83B110
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B957:		; jumptable 0083B782 case 7
mov	eax, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_4]
push	eax
push	ecx
push	0
push	17h
mov	ecx, esi
call	sub_83B110
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B972:		; jumptable 0083B782 case 9
mov	edx, [esp+0Ch+arg_8]
mov	eax, [esp+0Ch+arg_4]
push	edx
push	eax
push	1
push	18h
call	sub_83B110
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B98B:		; jumptable 0083B782 case 10
mov	ecx, [esp+0Ch+arg_8]
mov	edx, [esp+0Ch+arg_4]
push	ecx
push	edx
push	1
mov	ecx, esi
push	19h
call	sub_83B110
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B9A6:		; jumptable 0083B782 case 11
mov	eax, [esp+0Ch+arg_8]
mov	ecx, [esp+0Ch+arg_4]
push	eax
push	ecx
push	0
push	18h
mov	ecx, esi
call	sub_83B110
pop	edi
pop	ebx
pop	esi
retn	0Ch

loc_83B9C1:		; jumptable 0083B782 case 12
mov	edx, [esp+0Ch+arg_8]
mov	eax, [esp+0Ch+arg_4]
push	edx
push	eax
push	0
push	19h
call	sub_83B110
pop	edi
pop	ebx

loc_83B9D6:		; default
pop	esi
retn	0Ch
sub_83B770 endp

align 4
off_83B9DC dd offset loc_83B8AA	; jump table for switch	statement
dd offset loc_83B8C3
dd offset loc_83B8DC
dd offset loc_83B8F3
dd offset loc_83B90C
dd offset loc_83B925
dd offset loc_83B807
dd offset loc_83B957
dd offset loc_83B93C
dd offset loc_83B972
dd offset loc_83B98B
dd offset loc_83B9A6
dd offset loc_83B9C1
dd offset loc_83B789
dd offset loc_83B7C8
align 10h



sub_83BA20 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
fldz
push	esi
push	edi
fstp	[esp+1Ch+var_10]
mov	edi, ecx
mov	eax, [edi+9578h]
mov	esi, [eax+22D0h]
mov	eax, [esp+1Ch+arg_0]
or	ecx, 0FFFFFFFFh
sub	eax, 0
mov	[esp+1Ch+var_14], 5
mov	[esp+1Ch+var_8], ecx
mov	[esp+1Ch+var_4], ecx
jz	short loc_83BA8E
sub	eax, 1
jz	short loc_83BA7E
sub	eax, 1
jnz	short loc_83BAB4
push	esi
mov	ecx, edi
call	sub_83A9F0
lea	ecx, [esp+1Ch+var_14]
push	ecx
push	esi
push	14h
mov	ecx, edi
call	sub_83B1C0
pop	edi
pop	esi
add	esp, 14h
retn	4

loc_83BA7E:
push	esi
mov	ecx, edi
call	sub_83A3E0
pop	edi
pop	esi
add	esp, 14h
retn	4

loc_83BA8E:
cmp	dword ptr [esi], 5
jnz	short loc_83BA9D
cmp	[esi+0Ch], ecx
jnz	short loc_83BA9D
cmp	[esi+10h], ecx
jz	short loc_83BAA5

loc_83BA9D:
push	esi
mov	ecx, edi
call	sub_83A9F0

loc_83BAA5:
lea	edx, [esp+1Ch+var_14]
push	edx
push	esi
push	12h
mov	ecx, edi
call	sub_83B1C0

loc_83BAB4:
pop	edi
pop	esi
add	esp, 14h
retn	4
sub_83BA20 endp

align 10h


; Attributes: thunk

sub_83BAC0 proc	near
jmp	sub_83BA20
sub_83BAC0 endp

align 10h



sub_83BAD0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+9578h]
add	ecx, 1DB0h
push	edi
mov	edi, [ecx+520h]
call	sub_835C90
mov	eax, [esi+9578h]
mov	ecx, [eax+22D0h]
mov	edx, [esp+8+arg_0]
push	edi
push	ecx
push	edx
mov	ecx, esi
call	sub_83B770
pop	edi
pop	esi
retn	4
sub_83BAD0 endp

align 10h



sub_83BB10 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
lea	ecx, [esi+288h]
call	sub_836030
mov	ecx, [esp+4+arg_0]
test	eax, eax
jz	short loc_83BB2F
mov	[eax], ecx
mov	dword ptr [eax+4], 1

loc_83BB2F:
mov	eax, [esi+9578h]
mov	edx, [eax+22D0h]
push	edx
push	ecx
mov	ecx, esi
call	sub_83B710
pop	esi
retn	4
sub_83BB10 endp

align 10h



sub_83BB50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
lea	ecx, [esi+288h]
call	sub_836030
mov	ecx, [esp+4+arg_0]
test	eax, eax
jz	short loc_83BB6F
mov	[eax], ecx
mov	dword ptr [eax+4], 2

loc_83BB6F:
mov	eax, [esi+9578h]
mov	edx, [eax+22D0h]
push	edx
push	ecx
mov	ecx, esi
call	sub_83B710
pop	esi
retn	4
sub_83BB50 endp

align 10h



sub_83BB90 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_C]
mov	[esi+8], ecx
mov	ecx, [esp+4+arg_8]
mov	[esi+0Ch], edx
mov	[esi+4], eax
mov	[esi+10h], ecx
mov	dword ptr [esi+14h], 0
mov	eax, [ecx]
mov	edx, [eax+21Ch]
push	esi
call	edx
mov	eax, esi
pop	esi
retn	10h
sub_83BB90 endp

align 10h



sub_83BBD0 proc	near
push	esi
mov	esi, ecx
cmp	dword ptr [esi+14h], 0
jnz	short loc_83BC0F
mov	ecx, [esi+0Ch]
call	sub_83E190
lea	edx, [eax+1]

loc_83BBE4:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_83BBE4
mov	ecx, [esi+0Ch]
sub	eax, edx
push	edi
mov	edi, eax
call	sub_83E190
mov	ecx, [esi+4]
push	edi
push	eax
push	ecx
mov	ecx, [ecx]
add	ecx, 2A0h
call	sub_81FD20
mov	[esi+14h], eax
pop	edi

loc_83BC0F:
mov	eax, [esi+14h]
pop	esi
retn
sub_83BBD0 endp

align 10h



sub_83BC20 proc	near

var_10C= dword ptr -10Ch
ArgList= byte ptr -104h
DstBuf=	byte ptr -84h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 10Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10Ch+var_4], eax
mov	eax, [esp+10Ch+arg_0]
push	esi
mov	esi, ecx
push	80h		; SizeInBytes
lea	ecx, [esp+114h+ArgList]
push	ecx		; DstBuf
lea	ecx, [esp+118h+var_10C]
mov	[esp+118h+var_10C], eax
call	sub_83DCD0
lea	edx, [esp+110h+ArgList]
push	edx		; ArgList
push	offset aSExpected ; "%s	expected"
lea	eax, [esp+118h+DstBuf]
push	80h		; SizeInBytes
push	eax		; DstBuf
call	sub_822D70
add	esp, 10h
lea	ecx, [esp+110h+DstBuf]
push	ecx
mov	ecx, [esi+8]
call	sub_83EDE0
mov	ecx, [esp+110h+var_4]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10Ch
retn	4
sub_83BC20 endp

align 10h



sub_83BCA0 proc	near

var_20C= dword ptr -20Ch
var_204= byte ptr -204h
ArgList= byte ptr -184h
DstBuf=	byte ptr -104h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 20Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+20Ch+var_4], eax
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
call	sub_83DDC0
mov	edi, [esp+214h+arg_4]
mov	ecx, [esi+0Ch]
cmp	[eax], edi
jz	loc_83BD7A
push	ebx
call	sub_9E28B0
mov	ebx, [esp+218h+arg_8]
cmp	eax, ebx
jnz	short loc_83BD05
push	edi
mov	ecx, esi
call	sub_83BC20

loc_83BCEB:
pop	ebx

loc_83BCEC:
mov	ecx, [esp+214h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 20Ch
retn	0Ch

loc_83BD05:
mov	eax, [esp+218h+arg_0]
push	80h		; SizeInBytes
lea	ecx, [esp+21Ch+var_204]
push	ecx		; DstBuf
lea	ecx, [esp+220h+var_20C]
mov	[esp+220h+var_20C], eax
call	sub_83DCD0
push	80h		; SizeInBytes
lea	edx, [esp+21Ch+ArgList]
push	edx		; DstBuf
lea	ecx, [esp+220h+var_20C]
mov	[esp+220h+var_20C], edi
call	sub_83DCD0
push	ebx
lea	eax, [esp+21Ch+var_204]
push	eax
lea	ecx, [esp+220h+ArgList]
push	ecx		; ArgList
push	offset aSExpectedToClo ; "%s expected (to close	%s at line %i)"
lea	edx, [esp+228h+DstBuf]
push	100h		; SizeInBytes
push	edx		; DstBuf
call	sub_822D70
mov	ecx, [esi+8]
add	esp, 18h
lea	eax, [esp+218h+DstBuf]
push	eax
call	sub_83EDE0
jmp	loc_83BCEB

loc_83BD7A:
call	sub_83EBC0
jmp	loc_83BCEC
sub_83BCA0 endp

align 10h



sub_83BD90 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	0
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+10h]
pop	esi
jmp	edx
sub_83BD90 endp

align 10h



sub_83BDC0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
xor	edi, edi
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83BDE2
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83BDE2:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+0C4h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Eh
jnz	short loc_83BE62

loc_83BE10:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83BE34
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83BE34:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+0C8h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Eh
jz	short loc_83BE10

loc_83BE62:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 3Ah
jnz	short loc_83BEB9
mov	ecx, [esi+0Ch]
mov	edi, 1
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83BE98
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83BE98:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+0CCh]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0

loc_83BEB9:
mov	eax, edi
pop	edi
pop	esi
retn
sub_83BDC0 endp

align 10h



sub_83BEC0 proc	near
push	esi
push	edi
mov	esi, ecx
mov	edi, 1
call	sub_83D070
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jnz	short loc_83BF0A
jmp	short loc_83BEE0
align 10h

loc_83BEE0:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1ACh]
call	edx
mov	ecx, esi
call	sub_83D070
mov	ecx, [esi+0Ch]
inc	edi
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jz	short loc_83BEE0

loc_83BF0A:
mov	eax, edi
pop	edi
pop	esi
retn
sub_83BEC0 endp

align 10h



sub_83BF10 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0FCh]
call	edx

loc_83BF20:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83BF3C
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83BF3C:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+104h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
mov	ecx, [esi+0Ch]
jnz	short loc_83BF74
call	sub_83EBC0
jmp	short loc_83BF20

loc_83BF74:
call	sub_83DDC0
cmp	dword ptr [eax], 3Dh
jnz	short loc_83BFAA
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+108h]
call	edx
mov	ecx, esi
call	sub_83BEC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
push	eax
mov	eax, [edx+10Ch]
call	eax
jmp	short loc_83BFB7

loc_83BFAA:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+110h]
call	eax

loc_83BFB7:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+100h]
pop	esi
jmp	eax
sub_83BF10 endp

align 10h



sub_83BFD0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
cmp	eax, 28h
jz	short loc_83C01A
cmp	eax, 11Eh
jz	short loc_83BFF8
mov	ecx, [esi+8]
push	offset aUnexpectedSymb ; "unexpected symbol"
call	sub_83EDE0
pop	esi
retn

loc_83BFF8:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+12Ch]
push	eax
call	edx
mov	ecx, [esi+0Ch]
pop	esi
jmp	sub_83EBC0

loc_83C01A:
mov	ecx, [esi+0Ch]
push	edi
call	sub_9E28B0
mov	ecx, [esi+0Ch]
mov	edi, eax
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+124h]
call	edx
mov	ecx, esi
call	sub_83D070
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+128h]
call	edx
push	edi
push	29h
push	28h
mov	ecx, esi
call	sub_83BCA0
pop	edi
pop	esi
retn
sub_83BFD0 endp

align 10h



sub_83C060 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
call	sub_9E28B0
mov	ecx, [esi+0Ch]
mov	edi, eax
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+138h]
call	edx
mov	ecx, esi
call	sub_83D070
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+13Ch]
call	edx
push	edi
push	5Dh
push	5Bh
mov	ecx, esi
call	sub_83BCA0
pop	edi
pop	esi
retn
sub_83C060 endp

align 10h



sub_83C0B0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	eax, [eax]
add	eax, 0FFFFFFDBh
cmp	eax, 0F7h	; switch 248 cases
ja	loc_83C147	; default
			; jumptable 0083C0CB cases 1-4,7,9,11-22,24,26-56,58-219,221-233,235-241,243
movzx	ecx, ds:byte_83C190[eax]
jmp	ds:off_83C150[ecx*4] ; switch jump

loc_83C0D2:		; jumptable 0083C0CB case 6
xor	eax, eax
retn	4

loc_83C0D7:		; jumptable 0083C0CB case 8
mov	eax, 1
retn	4

loc_83C0DF:		; jumptable 0083C0CB case 5
mov	eax, 2
retn	4

loc_83C0E7:		; jumptable 0083C0CB case 10
mov	eax, 3
retn	4

loc_83C0EF:		; jumptable 0083C0CB case 0
mov	eax, 4
retn	4

loc_83C0F7:		; jumptable 0083C0CB case 57
mov	eax, 5
retn	4

loc_83C0FF:		; jumptable 0083C0CB case 242
mov	eax, 6
retn	4

loc_83C107:		; jumptable 0083C0CB case 247
mov	eax, 7
retn	4

loc_83C10F:		; jumptable 0083C0CB case 244
mov	eax, 8
retn	4

loc_83C117:		; jumptable 0083C0CB case 23
mov	eax, 9
retn	4

loc_83C11F:		; jumptable 0083C0CB case 246
mov	eax, 0Ah
retn	4

loc_83C127:		; jumptable 0083C0CB case 25
mov	eax, 0Bh
retn	4

loc_83C12F:		; jumptable 0083C0CB case 245
mov	eax, 0Ch
retn	4

loc_83C137:		; jumptable 0083C0CB case 220
mov	eax, 0Dh
retn	4

loc_83C13F:		; jumptable 0083C0CB case 234
mov	eax, 0Eh
retn	4

loc_83C147:		; default
mov	eax, 0Fh	; jumptable 0083C0CB cases 1-4,7,9,11-22,24,26-56,58-219,221-233,235-241,243
retn	4
sub_83C0B0 endp

align 10h
off_83C150 dd offset loc_83C0EF, offset	loc_83C0DF ; jump table	for switch statement
dd offset loc_83C0D2, offset loc_83C0D7
dd offset loc_83C0E7, offset loc_83C117
dd offset loc_83C127, offset loc_83C0F7
dd offset loc_83C137, offset loc_83C13F
dd offset loc_83C0FF, offset loc_83C10F
dd offset loc_83C12F, offset loc_83C11F
dd offset loc_83C107, offset loc_83C147
byte_83C190 db 0, 0Fh, 0Fh, 0Fh, 0Fh, 1, 2, 0Fh, 3, 0Fh	; indirect table for switch statement
db 4, 0Fh, 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 5, 0Fh, 6, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 7, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	8, 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 9
db 0Fh,	0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Fh, 0Ah
db 0Fh,	0Bh, 0Ch, 0Dh, 0Eh
align 10h



sub_83C290 proc	near
mov	ecx, [ecx+0Ch]
call	sub_83DDC0
mov	eax, [eax]
add	eax, 0FFFFFEFCh
cmp	eax, 1Ch	; switch 29 cases
ja	short loc_83C2B8 ; default
			; jumptable 0083C2AB cases 3-15,17-27
movzx	eax, ds:byte_83C2C4[eax]
jmp	ds:off_83C2BC[eax*4] ; switch jump

loc_83C2B2:		; jumptable 0083C2AB cases 0-2,16,28
mov	eax, 1
retn

loc_83C2B8:		; default
xor	eax, eax	; jumptable 0083C2AB cases 3-15,17-27
retn
sub_83C290 endp

align 4
off_83C2BC dd offset loc_83C2B2	; jump table for switch	statement
dd offset loc_83C2B8
byte_83C2C4 db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0
align 10h



sub_83C2F0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+54h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 103h
jz	short loc_83C319
push	103h
mov	ecx, esi
call	sub_83BC20

loc_83C319:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+58h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	0
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+5Ch]
pop	esi
jmp	edx
sub_83C2F0 endp

align 10h



sub_83C360 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+88h]
push	edi
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+90h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [esp+8+arg_0]
mov	eax, [eax+98h]
push	edx
call	eax
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jnz	short loc_83C3F2
lea	ecx, [ecx+0]

loc_83C3A0:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83C3C4
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83C3C4:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+98h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jz	short loc_83C3A0

loc_83C3F2:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+94h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 10Bh
jz	short loc_83C41B
push	10Bh
mov	ecx, esi
call	sub_83BC20

loc_83C41B:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+9Ch]
call	edx
mov	eax, [esi+10h]
mov	edi, [eax]
mov	ecx, esi
add	edi, 0A0h
call	sub_83BEC0
mov	ecx, [esi+10h]
mov	edx, [edi]
push	eax
call	edx
mov	ecx, esi
call	sub_83C2F0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+8Ch]
call	edx
pop	edi
pop	esi
retn	4
sub_83C360 endp

align 10h



sub_83C470 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_0]
push	esi
push	edi
mov	edi, [esp+8+arg_4]
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	eax, [eax+15Ch]
push	edi
push	edx
call	eax
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 28h
jz	short loc_83C4A1
push	28h
mov	ecx, esi
call	sub_83BC20

loc_83C4A1:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 29h
mov	ecx, [esi+10h]
jz	loc_83C546
mov	edx, [ecx]
mov	eax, [edx+0D0h]
call	eax

loc_83C4C7:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
sub	eax, 118h
jz	short loc_83C524
sub	eax, 6
jz	short loc_83C4EC
mov	ecx, [esi+8]
push	offset aNameOr___Expec ; "<name> or \"...\" expected"
call	sub_83EDE0
jmp	short loc_83C50D

loc_83C4EC:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+0D8h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0

loc_83C50D:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jnz	short loc_83C539
mov	ecx, [esi+0Ch]
call	sub_83EBC0
jmp	short loc_83C4C7

loc_83C524:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0DCh]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0

loc_83C539:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0D4h]
jmp	short loc_83C54E

loc_83C546:
mov	eax, [ecx]
mov	edx, [eax+0E0h]

loc_83C54E:
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 29h
jz	short loc_83C566
push	29h
mov	ecx, esi
call	sub_83BC20

loc_83C566:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0E4h]
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0E8h]
call	edx
push	edi
push	106h
push	109h
mov	ecx, esi
call	sub_83BCA0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+160h]
call	edx
pop	edi
pop	esi
retn	8
sub_83C470 endp

align 10h



sub_83C5C0 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0BCh]
push	edi
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, esi
call	sub_83BDC0
mov	ecx, [esi+10h]
mov	edi, eax
mov	eax, [ecx]
mov	edx, [eax+164h]
call	edx
mov	ebx, [esp+0Ch+arg_0]
push	ebx
push	edi
mov	ecx, esi
call	sub_83C470
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0C0h]
push	ebx
call	edx
pop	edi
pop	esi
pop	ebx
retn	4
sub_83C5C0 endp

align 10h



sub_83C620 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83C647
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83C647:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0F0h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+0F4h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_9E28B0
push	eax
push	0
mov	ecx, esi
call	sub_83C470
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0F8h]
pop	esi
jmp	edx
sub_83C620 endp

align 10h



sub_83C6A0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, esi
call	sub_83C290
test	eax, eax
jnz	short loc_83C6E7
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 3Bh
jz	short loc_83C6E7
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+118h]
call	edx
mov	ecx, esi
call	sub_83BEC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
push	eax
mov	eax, [edx+11Ch]
call	eax
pop	esi
retn

loc_83C6E7:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+114h]
pop	esi
jmp	eax
sub_83C6A0 endp

align 10h



sub_83C700 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+17Ch]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jnz	short loc_83C743
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+184h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
jmp	short loc_83C74A

loc_83C743:
mov	ecx, esi
call	sub_83C060

loc_83C74A:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 3Dh
jz	short loc_83C760
push	3Dh
mov	ecx, esi
call	sub_83BC20

loc_83C760:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+188h]
call	edx
mov	ecx, esi
call	sub_83D070
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+180h]
pop	esi
jmp	edx
sub_83C700 endp

align 10h



sub_83C790 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
call	sub_9E28B0
mov	ecx, [esi+10h]
mov	edi, eax
mov	eax, [ecx]
mov	edx, [eax+168h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 7Bh
jz	short loc_83C7C1
push	7Bh
mov	ecx, esi
call	sub_83BC20

loc_83C7C1:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 7Dh
jz	loc_83C890
lea	ebx, [ebx+0]

loc_83C7E0:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+170h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
cmp	eax, 5Bh
jz	short loc_83C856
cmp	eax, 11Eh
jz	short loc_83C826
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+174h]
call	edx
mov	ecx, esi
call	sub_83D070
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+178h]
call	edx
jmp	short loc_83C85D

loc_83C826:
mov	ecx, [esi+0Ch]
call	sub_83EC10
cmp	dword ptr [eax], 3Dh
jz	short loc_83C856
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+174h]
call	edx
mov	ecx, esi
call	sub_83D070
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+178h]
call	edx
jmp	short loc_83C85D

loc_83C856:
mov	ecx, esi
call	sub_83C700

loc_83C85D:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jz	short loc_83C877
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 3Bh
jnz	short loc_83C890

loc_83C877:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 7Dh
jnz	loc_83C7E0

loc_83C890:
push	edi
push	7Dh
push	7Bh
mov	ecx, esi
call	sub_83BCA0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+16Ch]
pop	edi
pop	esi
jmp	edx
sub_83C790 endp

align 10h



sub_83C8B0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_9E28B0
mov	ecx, [esi+10h]
mov	ebx, eax
mov	eax, [ecx]
mov	edx, [eax+140h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
cmp	eax, 28h
jz	loc_83C95F
cmp	eax, 7Bh
jz	short loc_83C93A
cmp	eax, 11Fh
jz	short loc_83C908
mov	ecx, [esi+8]
push	offset aFunctionArgume ; "function arguments expected"
call	sub_83EDE0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+144h]
push	ebx
call	edx
pop	esi
pop	ebx
retn

loc_83C908:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+150h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+144h]
push	ebx
call	edx
pop	esi
pop	ebx
retn

loc_83C93A:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+14Ch]
call	edx
mov	ecx, esi
call	sub_83C790
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+144h]
push	ebx
call	edx
pop	esi
pop	ebx
retn

loc_83C95F:
mov	ecx, [esi+0Ch]
push	edi
mov	edi, [ecx+34h]
call	sub_9E28B0
cmp	eax, edi
pop	edi
jz	short loc_83C97D
mov	ecx, [esi+8]
push	offset aAmbiguousSynta ; "ambiguous syntax (function call x new	s"...
call	sub_83EDE0

loc_83C97D:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
cmp	dword ptr [eax], 29h
mov	eax, [ecx]
jnz	short loc_83C99F
mov	edx, [eax+148h]
jmp	short loc_83C9B9

loc_83C99F:
mov	edx, [eax+154h]
call	edx
mov	ecx, esi
call	sub_83BEC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+158h]

loc_83C9B9:
call	edx
push	ebx
push	29h
push	28h
mov	ecx, esi
call	sub_83BCA0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+144h]
push	ebx
call	edx
pop	esi
pop	ebx
retn
sub_83C8B0 endp

align 10h



sub_83C9E0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1D8h]
call	edx
mov	ecx, esi
call	sub_83BFD0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
sub	eax, 28h
cmp	eax, 0F7h	; switch 248 cases
ja	loc_83CB44	; default
push	edi

loc_83CA10:
movzx	eax, ds:byte_83CB68[eax]
jmp	ds:off_83CB54[eax*4] ; switch jump

loc_83CA1E:		; jumptable 0083CA17 case 6
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+130h]
call	eax
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83CA4F
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83CA4F:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+134h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
jmp	loc_83CB2B

loc_83CA75:		; jumptable 0083CA17 case 51
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1D0h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_9E28B0
mov	ecx, [esi+0Ch]
mov	edi, eax
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+138h]
call	edx
mov	ecx, esi
call	sub_83D070
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+13Ch]
call	edx
push	edi
push	5Dh
push	5Bh
mov	ecx, esi
call	sub_83BCA0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1D4h]
call	edx
jmp	short loc_83CB2B

loc_83CAD0:		; jumptable 0083CA17 case 18
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83CAF4
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83CAF4:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+0Ch]
mov	edi, [eax+4]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1E0h]
push	edi
call	edx
jmp	short loc_83CB24

loc_83CB17:		; jumptable 0083CA17 cases 0,83,247
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0ECh]
call	edx

loc_83CB24:
mov	ecx, esi
call	sub_83C8B0

loc_83CB2B:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
sub	eax, 28h
cmp	eax, 0F7h
jbe	loc_83CA10

loc_83CB43:		; jumptable 0083CA17 cases 1-5,7-17,19-50,52-82,84-246
pop	edi

loc_83CB44:		; default
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1DCh]
pop	esi
jmp	edx
sub_83C9E0 endp

align 4
off_83CB54 dd offset loc_83CB17, offset	loc_83CA1E ; jump table	for switch statement
dd offset loc_83CAD0, offset loc_83CA75
dd offset loc_83CB43
byte_83CB68 db 0, 4, 4,	4, 4, 4, 1, 4, 4, 4, 4,	4, 4 ; indirect	table for switch statement
db 4, 4, 4, 4, 4, 2, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 3
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 0, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 4, 4, 4, 4, 4, 4, 4,	4, 4, 4, 4, 4, 4
db 0



sub_83CC60 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1E4h]
push	edi
mov	edi, [esp+8+arg_0]
push	edi
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jnz	short loc_83CCE4
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1ECh]
call	edx
mov	ecx, esi
call	sub_83C9E0
mov	eax, [esi+4]
mov	ecx, [eax+44h]
add	ecx, edi
cmp	ecx, 82h
jbe	short loc_83CCBC
mov	ecx, [esi+8]
push	offset aTooManyVariabl ; "too many variables in	an assignment"
call	sub_83EDE0

loc_83CCBC:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1F0h]
call	eax
inc	edi
push	edi
mov	ecx, esi
call	sub_83CC60
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1E8h]
call	eax
pop	edi
pop	esi
retn	4

loc_83CCE4:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1F4h]
call	eax
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 3Dh
jz	short loc_83CD07
push	3Dh
mov	ecx, esi
call	sub_83BC20

loc_83CD07:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, esi
call	sub_83BEC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
push	eax
mov	eax, [edx+1F8h]
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1E8h]
call	eax
pop	edi
pop	esi
retn	4
sub_83CC60 endp

align 10h



sub_83CD40 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+204h]
call	edx
mov	ecx, esi
call	sub_83C9E0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+210h]
call	edx
test	eax, eax
jnz	short loc_83CD73
push	1
mov	ecx, esi
call	sub_83CC60
jmp	short loc_83CD80

loc_83CD73:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+20Ch]
call	edx

loc_83CD80:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+208h]
pop	esi
jmp	edx
sub_83CD40 endp

align 10h



sub_83CD90 proc	near

var_8= dword ptr -8

push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
add	eax, 0FFFFFF85h
cmp	eax, 0A4h	; switch 165 cases
ja	loc_83CE7C	; default
			; jumptable 0083CDB2 cases 1-139,141,143-145,147-151,153-156,158-161,163
movzx	eax, ds:byte_83CEA8[eax]
jmp	ds:off_83CE84[eax*4] ; switch jump

loc_83CDB9:		; jumptable 0083CDB2 case 162
mov	ecx, [esi+0Ch]
call	sub_83DDC0
fld	dword ptr [eax+4]
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+194h]
push	ecx
fstp	[esp+8+var_8]
call	eax
mov	ecx, [esi+0Ch]
pop	esi
jmp	sub_83EBC0

loc_83CDDE:		; jumptable 0083CDB2 case 164
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [eax+4]
mov	edx, [edx+198h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
pop	esi
jmp	sub_83EBC0

loc_83CE00:		; jumptable 0083CDB2 case 146
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+19Ch]
call	edx
mov	ecx, [esi+0Ch]
pop	esi
jmp	sub_83EBC0

loc_83CE16:		; jumptable 0083CDB2 case 152
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1A0h]
call	edx
mov	ecx, [esi+0Ch]
pop	esi
jmp	sub_83EBC0

loc_83CE2C:		; jumptable 0083CDB2 case 140
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1A4h]
call	edx
mov	ecx, [esi+0Ch]
pop	esi
jmp	sub_83EBC0

loc_83CE42:		; jumptable 0083CDB2 case 157
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1A8h]
call	edx
mov	ecx, [esi+0Ch]
pop	esi
jmp	sub_83EBC0

loc_83CE58:		; jumptable 0083CDB2 case 0
mov	ecx, esi
pop	esi
jmp	sub_83C790

loc_83CE60:		; jumptable 0083CDB2 case 142
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_9E28B0
push	eax
push	0
mov	ecx, esi
call	sub_83C470
pop	esi
retn

loc_83CE7C:		; default
mov	ecx, esi	; jumptable 0083CDB2 cases 1-139,141,143-145,147-151,153-156,158-161,163
pop	esi
jmp	sub_83C9E0
sub_83CD90 endp

off_83CE84 dd offset loc_83CE58, offset	loc_83CE2C ; jump table	for switch statement
dd offset loc_83CE60, offset loc_83CE00
dd offset loc_83CE16, offset loc_83CE42
dd offset loc_83CDB9, offset loc_83CDDE
dd offset loc_83CE7C
byte_83CEA8 db	    0,	   8,	  8,	 8 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	1,     8,     2,     8
db	8,     8,     3,     8
db	8,     8,     8,     8
db	4,     8,     8,     8
db	8,     5,     8,     8
db	8,     8,     6,     8
db	7
align 10h



sub_83CF50 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
cmp	dword ptr [eax+44h], 81h
push	edi
jle	short loc_83CF6D
mov	ecx, [esi+8]
push	offset aChunkHasTooMan ; "chunk	has too	many syntax levels"
call	sub_83EDE0

loc_83CF6D:
mov	eax, [esi+4]
mov	edi, 1
add	[eax+44h], edi
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1B8h]
call	eax
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
cmp	eax, 23h
jz	loc_83D039
cmp	eax, 2Dh
jz	loc_83D035
cmp	eax, 10Eh
jz	loc_83D03E
mov	ecx, esi
call	sub_83CD90

loc_83CFB3:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
push	eax
mov	ecx, esi
call	sub_83C0B0
mov	edi, eax
cmp	edi, 0Fh
jz	short loc_83D01B
push	ebp
mov	ebp, [esp+0Ch+arg_0]
push	ebx

loc_83CFD0:
movzx	ecx, ds:byte_1469AF8[edi*2]
cmp	ecx, ebp
jle	short loc_83D019
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1C4h]
push	edi
call	eax
movzx	ecx, ds:byte_1469AF9[edi*2]
push	ecx
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	ebx, eax
mov	eax, [edx+1C8h]
push	edi
call	eax
mov	edi, ebx
cmp	ebx, 0Fh
jnz	short loc_83CFD0

loc_83D019:
pop	ebx
pop	ebp

loc_83D01B:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1CCh]
call	eax
mov	esi, [esi+4]
dec	dword ptr [esi+44h]
mov	eax, edi
pop	edi
pop	esi
retn	4

loc_83D035:
xor	edi, edi
jmp	short loc_83D03E

loc_83D039:
mov	edi, 2

loc_83D03E:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1BCh]
push	edi
call	eax
mov	ecx, [esi+0Ch]
call	sub_83EBC0
push	8
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+1C0h]
push	edi
call	eax
jmp	loc_83CFB3
sub_83CF50 endp




sub_83D070 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+18Ch]
call	edx
push	0
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+190h]
pop	esi
jmp	edx
sub_83D070 endp

align 10h



sub_83D0A0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+14h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+214h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+18Ch]
call	edx
push	0
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+190h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+218h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 112h
jz	short loc_83D10E
push	112h
mov	ecx, esi
call	sub_83BC20

loc_83D10E:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+18h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	0
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1Ch]
pop	esi
jmp	edx
sub_83D0A0 endp

align 10h



sub_83D150 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+20h]
call	edx
mov	ecx, esi
call	sub_83D0A0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 105h
jnz	short loc_83D195

loc_83D174:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+24h]
call	edx
mov	ecx, esi
call	sub_83D0A0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 105h
jz	short loc_83D174

loc_83D195:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+10h]
cmp	dword ptr [eax], 104h
mov	eax, [ecx]
jnz	short loc_83D1DE
mov	edx, [eax+28h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	0
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+2Ch]
jmp	short loc_83D1E1

loc_83D1DE:
mov	edx, [eax+30h]

loc_83D1E1:
call	edx
mov	eax, [esp+4+arg_0]
push	eax
push	106h
push	10Ah
mov	ecx, esi
call	sub_83BCA0
pop	esi
retn	4
sub_83D150 endp

align 10h



sub_83D200 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+34h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+3Ch]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+214h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+18Ch]
call	edx
push	0
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+190h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+218h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+40h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+44h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 103h
jz	short loc_83D28C
push	103h
mov	ecx, esi
call	sub_83BC20

loc_83D28C:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0Ch]
push	0
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+10h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+48h]
call	edx
mov	eax, [esp+4+arg_0]
push	eax
push	106h
push	115h
mov	ecx, esi
call	sub_83BCA0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+38h]
call	eax
pop	esi
retn	4
sub_83D200 endp

align 10h



sub_83D2E0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	eax, [eax+60h]
push	edx
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [esp+4+arg_0]
mov	edx, [edx+68h]
push	eax
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 3Dh
jz	short loc_83D317
push	3Dh
mov	ecx, esi
call	sub_83BC20

loc_83D317:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+6Ch]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1B0h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+18Ch]
call	edx
push	0
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+190h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1B4h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+70h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jz	short loc_83D386
push	2Ch
mov	ecx, esi
call	sub_83BC20

loc_83D386:
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+74h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1B0h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+18Ch]
call	edx
push	0
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+190h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1B4h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+78h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 2Ch
jnz	short loc_83D448
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+7Ch]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1B0h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+18Ch]
call	edx
push	0
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+190h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+1B4h]
call	edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+80h]
jmp	short loc_83D453

loc_83D448:
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+84h]

loc_83D453:
call	edx
mov	ecx, esi
call	sub_83C2F0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+64h]
call	edx
pop	esi
retn	8
sub_83D2E0 endp

align 10h



sub_83D470 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
call	sub_9E28B0
mov	ecx, [esi+10h]
mov	ebx, eax
mov	eax, [ecx]
mov	edx, [eax+4Ch]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 11Eh
jz	short loc_83D4AD
push	11Eh
mov	ecx, esi
call	sub_83BC20

loc_83D4AD:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	ecx, [esi+0Ch]
mov	edi, [eax+4]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
cmp	eax, 2Ch
jz	short loc_83D4F5
cmp	eax, 3Dh
jz	short loc_83D4EA
cmp	eax, 10Bh
jz	short loc_83D4F5
mov	ecx, [esi+8]
push	offset aOrExpected ; "\"=\" or \",\" expected"
call	sub_83EDE0
jmp	short loc_83D4FD

loc_83D4EA:
push	ebx
push	edi
mov	ecx, esi
call	sub_83D2E0
jmp	short loc_83D4FD

loc_83D4F5:
push	edi
mov	ecx, esi
call	sub_83C360

loc_83D4FD:
mov	eax, [esp+0Ch+arg_0]
push	eax
push	106h
push	108h
mov	ecx, esi
call	sub_83BCA0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+50h]
call	eax
pop	edi
pop	esi
pop	ebx
retn	4
sub_83D470 endp

align 10h



sub_83D530 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0A4h]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0ACh]
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+0B0h]
call	edx
mov	eax, [esp+4+arg_0]
push	eax
push	114h
push	110h
mov	ecx, esi
call	sub_83BCA0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+0B4h]
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+214h]
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+18Ch]
call	eax
push	0
mov	ecx, esi
call	sub_83CF50
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+190h]
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+218h]
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+0B8h]
call	eax
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+0A8h]
call	eax
pop	esi
retn	4
sub_83D530 endp

align 10h



sub_83D5F0 proc	near
push	esi
mov	esi, ecx
mov	ecx, [esi+0Ch]
push	edi
call	sub_9E28B0
mov	ecx, [esi+0Ch]
mov	edi, eax
call	sub_83DDC0
mov	eax, [eax]
add	eax, 0FFFFFEFEh
cmp	eax, 13h	; switch 20 cases
ja	loc_83D6E5	; default
			; jumptable 0083D61D cases 2-5,9,11-13,16-18
movzx	eax, ds:byte_83D71C[eax]
jmp	ds:off_83D6F4[eax*4] ; switch jump

loc_83D624:		; jumptable 0083D61D case 8
push	edi
mov	ecx, esi
call	sub_83D150
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D631:		; jumptable 0083D61D case 19
push	edi
mov	ecx, esi
call	sub_83D200
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D63E:		; jumptable 0083D61D case 1
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, esi
call	sub_83BD90
push	edi
push	106h
push	103h
mov	ecx, esi
call	sub_83BCA0
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D664:		; jumptable 0083D61D case 6
push	edi
mov	ecx, esi
call	sub_83D470
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D671:		; jumptable 0083D61D case 14
push	edi
mov	ecx, esi
call	sub_83D530
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D67E:		; jumptable 0083D61D case 7
push	edi
mov	ecx, esi
call	sub_83C5C0
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D68B:		; jumptable 0083D61D case 10
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 109h
mov	ecx, esi
jnz	short loc_83D6AF
call	sub_83C620
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D6AF:
call	sub_83BF10
pop	edi
xor	eax, eax
pop	esi
retn

loc_83D6B9:		; jumptable 0083D61D case 15
mov	ecx, esi
call	sub_83C6A0
pop	edi
mov	eax, 1
pop	esi
retn

loc_83D6C8:		; jumptable 0083D61D case 0
mov	ecx, [esi+0Ch]
call	sub_83EBC0
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+120h]
call	eax
pop	edi
mov	eax, 1
pop	esi
retn

loc_83D6E5:		; default
mov	ecx, esi	; jumptable 0083D61D cases 2-5,9,11-13,16-18
call	sub_83CD40
pop	edi
xor	eax, eax
pop	esi
retn
sub_83D5F0 endp

align 4
off_83D6F4 dd offset loc_83D6C8	; jump table for switch	statement
dd offset loc_83D63E
dd offset loc_83D664
dd offset loc_83D67E
dd offset loc_83D624
dd offset loc_83D68B
dd offset loc_83D671
dd offset loc_83D6B9
dd offset loc_83D631
dd offset loc_83D6E5
byte_83D71C db	    0,	   1,	  9,	 9 ; indirect table for	switch statement
db	9,     9,     2,     3
db	4,     9,     5,     9
db	9,     9,     6,     7
db	9,     9,     9,     8



sub_83D730 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
cmp	dword ptr [eax+44h], 81h
push	edi
jle	short loc_83D74D
mov	ecx, [esi+8]
push	offset aChunkHasTooMan ; "chunk	has too	many syntax levels"
call	sub_83EDE0

loc_83D74D:
mov	eax, [esi+4]
inc	dword ptr [eax+44h]

loc_83D753:
mov	ecx, [esi+0Ch]
call	sub_83DDC0
mov	eax, [eax]
add	eax, 0FFFFFEFCh
cmp	eax, 1Ch	; switch 29 cases
ja	short loc_83D775 ; default
			; jumptable 0083D76E cases 3-15,17-27
movzx	ecx, ds:byte_83D7C4[eax]
jmp	ds:off_83D7BC[ecx*4] ; switch jump

loc_83D775:		; default
mov	ecx, [esi+10h]	; jumptable 0083D76E cases 3-15,17-27
mov	edx, [ecx]
mov	eax, [edx+1FCh]
call	eax
mov	ecx, esi
call	sub_83D5F0
mov	ecx, [esi+0Ch]
mov	edi, eax
call	sub_83DDC0
cmp	dword ptr [eax], 3Bh
jnz	short loc_83D7A0
mov	ecx, [esi+0Ch]
call	sub_83EBC0

loc_83D7A0:
mov	ecx, [esi+10h]
mov	edx, [ecx]
mov	eax, [edx+200h]
call	eax
test	edi, edi
jz	short loc_83D753

loc_83D7B1:		; jumptable 0083D76E cases 0-2,16,28
mov	esi, [esi+4]
dec	dword ptr [esi+44h]
pop	edi
pop	esi
retn
sub_83D730 endp

align 4
off_83D7BC dd offset loc_83D7B1	; jump table for switch	statement
dd offset loc_83D775
byte_83D7C4 db	    0,	   0,	  0,	 1 ; indirect table for	switch statement
db	1,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0,     1,     1,     1
db	1,     1,     1,     1
db	1,     1,     1,     1
db	0
align 10h



sub_83D7F0 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	esi
mov	esi, ecx
push	edi
mov	edi, [esi+0Ch]
lea	eax, [esp+10h+var_8]
push	eax
mov	ecx, edi
call	sub_83E6D0
mov	ecx, [eax]
mov	[edi+38h], ecx
mov	edx, [eax+4]
mov	[edi+3Ch], edx
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx
mov	ecx, esi
call	sub_83D730
mov	ecx, [esi+10h]
mov	eax, [ecx]
mov	edx, [eax+8]
call	edx
mov	ecx, [esi+0Ch]
call	sub_83DDC0
cmp	dword ptr [eax], 120h
jz	short loc_83D848
push	120h
mov	ecx, esi
call	sub_83BC20

loc_83D848:
mov	ecx, [esi+0Ch]
pop	edi
pop	esi
add	esp, 8
jmp	sub_83EBC0
sub_83D7F0 endp

align 10h



sub_83D860 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
push	ecx
push	eax
mov	[esi], eax
mov	[esi+8], ecx
mov	dword ptr [esi+0Ch], 0
call	sub_82C6B0
mov	[esi+4], eax
add	esp, 8
mov	eax, esi
pop	esi
retn	8
sub_83D860 endp

align 10h



sub_83D890 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+4]
mov	ecx, [esi]
push	eax
push	ecx
call	sub_82C6D0
add	esp, 8
mov	dword ptr [esi+4], 0
pop	esi
retn
sub_83D890 endp

align 10h



sub_83D8B0 proc	near
mov	dword ptr [ecx+0Ch], 0
retn
sub_83D8B0 endp

align 10h



sub_83D8C0 proc	near

arg_0= byte ptr	 4

push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+8]
push	edi
cmp	[esi+0Ch], eax
jb	short loc_83D90B
lea	ebx, [eax+eax]
mov	eax, [esi]
push	ebx
push	eax
call	sub_82C6B0
mov	edi, eax
add	esp, 8
test	edi, edi
jnz	short loc_83D8E8
pop	edi
pop	esi
pop	ebx
retn	4

loc_83D8E8:
mov	eax, [esi+8]
mov	ecx, [esi+4]
push	eax
push	ecx
push	edi
call	unknown_libname_61 ; Microsoft VisualC 2-9/net runtime
mov	edx, [esi+4]
mov	eax, [esi]
push	edx
push	eax
call	sub_82C6D0
add	esp, 14h
mov	[esi+4], edi
mov	[esi+8], ebx

loc_83D90B:
mov	edx, [esi+0Ch]
mov	ecx, [esi+4]
mov	al, [esp+0Ch+arg_0]
mov	[ecx+edx], al
mov	eax, 1
add	[esi+0Ch], eax
pop	edi
pop	esi
pop	ebx
retn	4
sub_83D8C0 endp

align 10h



sub_83D930 proc	near
dec	dword ptr [ecx+0Ch]
retn
sub_83D930 endp

align 10h



sub_83D940 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
mov	[ecx+0Ch], eax
retn	4
sub_83D940 endp

align 10h



sub_83D950 proc	near

arg_0= byte ptr	 4
arg_4= byte ptr	 8

push	esi
mov	esi, ecx
xor	edx, edx
cmp	[esi+0Ch], edx
jbe	short loc_83D975
mov	cl, [esp+4+arg_0]
push	ebx
mov	bl, [esp+8+arg_4]

loc_83D963:
mov	eax, [esi+4]
add	eax, edx
cmp	[eax], cl
jnz	short loc_83D96E
mov	[eax], bl

loc_83D96E:
inc	edx
cmp	edx, [esi+0Ch]
jb	short loc_83D963
pop	ebx

loc_83D975:
pop	esi
retn	8
sub_83D950 endp

align 10h



sub_83D980 proc	near

var_4= dword ptr -4

push	ecx
push	esi
mov	esi, ecx
mov	ecx, [esi+8]
mov	edx, [esi]
lea	eax, [esp+8+var_4]
push	eax
mov	eax, [esi+4]
push	ecx
push	edx
call	eax
xor	edx, edx
add	esp, 0Ch
cmp	eax, edx
jz	short loc_83D9BA
mov	ecx, [esp+8+var_4]
cmp	ecx, edx
jz	short loc_83D9BA
mov	[esi+0Ch], ecx
mov	cl, [esi+18h]
mov	[esi+10h], eax
mov	[esi+19h], cl
mov	dl, [eax]
mov	[esi+18h], dl
pop	esi
pop	ecx
retn

loc_83D9BA:
mov	al, [esi+18h]
mov	dword ptr [esi+14h], 1
mov	[esi+0Ch], edx
mov	[esi+19h], al
mov	[esi+18h], dl
pop	esi
pop	ecx
retn
sub_83D980 endp




sub_83D9D0 proc	near
inc	dword ptr [ecx+10h]
add	dword ptr [ecx+0Ch], 0FFFFFFFFh
push	ebx
mov	bl, [ecx+18h]
push	esi
mov	esi, [ecx+10h]
jnz	short loc_83D9EB
call	sub_83D980
pop	esi
mov	al, bl
pop	ebx
retn

loc_83D9EB:
mov	[ecx+19h], bl
mov	al, [esi]
mov	[ecx+18h], al
pop	esi
mov	al, bl
pop	ebx
retn
sub_83D9D0 endp

align 10h



sub_83DA00 proc	near
inc	dword ptr [ecx+10h]
add	dword ptr [ecx+0Ch], 0FFFFFFFFh
mov	eax, [ecx+10h]
jnz	short loc_83DA11
jmp	sub_83D980

loc_83DA11:
mov	dl, [ecx+18h]
mov	[ecx+19h], dl
mov	al, [eax]
mov	[ecx+18h], al
retn
sub_83DA00 endp

align 10h



sub_83DA20 proc	near
mov	eax, [ecx+10h]
mov	al, [eax]
retn
sub_83DA20 endp

align 10h



sub_83DA30 proc	near
xor	eax, eax
cmp	[ecx+14h], eax
setz	al
retn
sub_83DA30 endp

align 10h



sub_83DA40 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
mov	edx, [esp+arg_8]
push	esi
mov	esi, ecx
mov	ecx, [esp+4+arg_4]
mov	[esi], eax
xor	eax, eax
mov	[esi+4], ecx
mov	ecx, esi
mov	[esi+8], edx
mov	[esi+14h], eax
mov	[esi+0Ch], eax
mov	[esi+10h], eax
call	sub_83D980
mov	eax, esi
pop	esi
retn	0Ch
sub_83DA40 endp

align 10h



sub_83DA70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_4]
push	ebx
push	esi
push	edi
mov	edi, [esp+0Ch+arg_8]
mov	esi, ecx
mov	ecx, edi
mov	[esi], eax
call	sub_997520
mov	ecx, edi
mov	ebx, eax
call	sub_9B3060
push	ebx
push	eax
mov	eax, [esp+14h+arg_0]
mov	ecx, [eax]
push	eax
add	ecx, 2A0h
call	sub_81FD20
mov	[esi+4], eax
pop	edi
mov	eax, esi
pop	esi
pop	ebx
retn	0Ch
sub_83DA70 endp

align 10h



sub_83DAB0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	edx, [esp+arg_4]
test	edx, edx
ja	short loc_83DABB
xor	eax, eax
retn

loc_83DABB:
lea	ecx, [edx-335Fh]
mov	eax, ecx
shl	eax, 10h
xor	eax, ecx
xor	eax, 25BD800h
mov	ecx, eax
shr	ecx, 0Bh
lea	eax, [eax+ecx-902h]
mov	ecx, eax
shl	ecx, 10h
xor	ecx, eax
xor	ecx, 3BAE000h
mov	eax, ecx
push	esi
shr	eax, 0Bh
mov	esi, edx
add	ecx, eax
mov	eax, [esp+4+arg_0]
shr	edx, 2
and	esi, 3
test	edx, edx
jbe	short loc_83DB39
push	ebx
push	edi

loc_83DB00:
movsx	edi, byte ptr [eax+1]
movsx	ebx, byte ptr [eax]
shl	edi, 8
add	ebx, ecx
lea	ecx, [ebx+edi]
movsx	edi, byte ptr [eax+3]
movsx	ebx, byte ptr [eax+2]
shl	edi, 8
add	edi, ebx
mov	ebx, ecx
shl	edi, 0Bh
shl	ebx, 10h
xor	edi, ebx
xor	ecx, edi
mov	edi, ecx
shr	edi, 0Bh
add	eax, 4
add	ecx, edi
sub	edx, 1
jnz	short loc_83DB00
pop	edi
pop	ebx

loc_83DB39:
sub	esi, 1
jz	short loc_83DB8C
sub	esi, 1
jz	short loc_83DB6D
sub	esi, 1
jnz	short loc_83DB9E
movsx	edx, byte ptr [eax+1]
movsx	esi, byte ptr [eax]
movsx	eax, byte ptr [eax+2]
add	eax, eax
shl	edx, 8
add	esi, ecx
lea	ecx, [esi+edx]
add	eax, eax
xor	eax, ecx
shl	eax, 10h
xor	ecx, eax
mov	edx, ecx
shr	edx, 0Bh
jmp	short loc_83DB9C

loc_83DB6D:
movsx	edx, byte ptr [eax+1]
movsx	eax, byte ptr [eax]
add	eax, ecx
shl	edx, 8
lea	ecx, [eax+edx]
mov	edx, ecx
shl	edx, 0Bh
xor	ecx, edx
mov	eax, ecx
shr	eax, 11h
add	ecx, eax
jmp	short loc_83DB9E

loc_83DB8C:
movsx	edx, byte ptr [eax]
add	ecx, edx
mov	eax, ecx
shl	eax, 0Ah
xor	ecx, eax
mov	edx, ecx
shr	edx, 1

loc_83DB9C:
add	ecx, edx

loc_83DB9E:
lea	eax, ds:0[ecx*8]
xor	ecx, eax
mov	edx, ecx
shr	edx, 5
add	ecx, edx
mov	eax, ecx
shl	eax, 4
xor	ecx, eax
mov	edx, ecx
shr	edx, 11h
add	ecx, edx
mov	eax, ecx
shl	eax, 19h
xor	ecx, eax
mov	edx, ecx
shr	edx, 6
add	ecx, edx
mov	eax, 86186187h
mul	ecx
mov	eax, ecx
sub	eax, edx
shr	eax, 1
add	eax, edx
shr	eax, 4
mov	edx, eax
imul	edx, 15h
mov	eax, ecx
sub	eax, edx
pop	esi
retn
sub_83DAB0 endp

align 10h



sub_83DBF0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	esi
push	edi
mov	edi, [esp+8+arg_4]
cmp	edi, 8
ja	loc_83DC9C
mov	esi, [esp+8+arg_0]
push	edi
push	esi
call	sub_83DAB0
mov	eax, ds:dword_1469E40[eax*4]
shl	eax, 4
movzx	ecx, byte_16822C5[eax]
add	esp, 8
cmp	edi, ecx
jnz	short loc_83DC9C
lea	ecx, [edi-1]	; switch 9 cases
cmp	ecx, 8
ja	short loc_83DC93 ; default
jmp	ds:off_83DCA4[ecx*4] ; switch jump

loc_83DC31:		; jumptable 0083DC2A case 9
mov	dl, [esi+8]
cmp	dl, byte_16822C4[eax]
jnz	short loc_83DC9C

loc_83DC3C:		; jumptable 0083DC2A case 8
mov	cl, [esi+7]
cmp	cl, byte_16822C3[eax]
jnz	short loc_83DC9C

loc_83DC47:		; jumptable 0083DC2A case 7
mov	dl, [esi+6]
cmp	dl, byte_16822C2[eax]
jnz	short loc_83DC9C

loc_83DC52:		; jumptable 0083DC2A case 6
mov	cl, [esi+5]
cmp	cl, byte_16822C1[eax]
jnz	short loc_83DC9C

loc_83DC5D:		; jumptable 0083DC2A case 5
mov	dl, [esi+4]
cmp	dl, byte_16822C0[eax]
jnz	short loc_83DC9C

loc_83DC68:		; jumptable 0083DC2A case 4
mov	cl, [esi+3]
cmp	cl, byte_16822BF[eax]
jnz	short loc_83DC9C

loc_83DC73:		; jumptable 0083DC2A case 3
mov	dl, [esi+2]
cmp	dl, byte_16822BE[eax]
jnz	short loc_83DC9C

loc_83DC7E:		; jumptable 0083DC2A case 2
mov	cl, [esi+1]
cmp	cl, byte_16822BD[eax]
jnz	short loc_83DC9C

loc_83DC89:		; jumptable 0083DC2A case 1
mov	dl, [esi]
cmp	dl, byte_16822BC[eax]
jnz	short loc_83DC9C

loc_83DC93:		; default
mov	eax, dword_16822B8[eax]
pop	edi
pop	esi
retn

loc_83DC9C:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
retn
sub_83DBF0 endp

align 4
off_83DCA4 dd offset loc_83DC89	; jump table for switch	statement
dd offset loc_83DC7E
dd offset loc_83DC73
dd offset loc_83DC68
dd offset loc_83DC5D
dd offset loc_83DC52
dd offset loc_83DC47
dd offset loc_83DC3C
dd offset loc_83DC31
align 10h



; int __stdcall	sub_83DCD0(char	*DstBuf, rsize_t SizeInBytes)
sub_83DCD0 proc	near

Dst= dword ptr	4
SizeInBytes= dword ptr	8

push	esi
mov	esi, ecx
mov	eax, [esi]
cmp	eax, 101h
jge	short loc_83DD26
push	ebx
mov	bl, al
movzx	eax, bl
push	eax		; int
call	_iscntrl
mov	edx, [esp+0Ch+SizeInBytes]
add	esp, 4
test	eax, eax
mov	eax, [esp+8+Dst]
jz	short loc_83DD0E
mov	ecx, [esi]
push	ecx		; ArgList
push	offset aCharU	; "char(%u)"
push	edx		; SizeInBytes
push	eax		; DstBuf
call	sub_822D70
add	esp, 10h
pop	ebx
pop	esi
retn	8

loc_83DD0E:
movsx	ecx, bl
push	ecx		; ArgList
push	offset aC_16	; "%c"
push	edx		; SizeInBytes
push	eax		; DstBuf
call	sub_822D70
add	esp, 10h
pop	ebx
pop	esi
retn	8

loc_83DD26:
mov	ecx, ds:off_146991C[eax*4]
mov	edx, [esp+4+SizeInBytes]
mov	eax, [esp+4+Dst]
push	ecx		; Src
push	edx		; SizeInBytes
push	eax		; Dst
call	sub_822D10
add	esp, 0Ch
pop	esi
retn	8
sub_83DCD0 endp

align 10h



sub_83DD50 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_20=	dword ptr  24h
arg_24=	dword ptr  28h

mov	eax, [esp+arg_0]
push	ebx
push	esi
push	edi
mov	ebx, ecx
push	400h
push	eax
lea	ecx, [ebx+4]
mov	[ebx], eax
call	sub_83D860
mov	eax, 1
mov	[ebx+30h], eax
mov	[ebx+34h], eax
mov	eax, 120h
lea	edi, [ebx+14h]
mov	ecx, 7
lea	esi, [esp+0Ch+arg_4]
rep movsd
mov	ecx, [esp+0Ch+arg_24]
mov	[ebx+38h], eax
mov	[ebx+40h], eax
mov	eax, [esp+0Ch+arg_20]
push	ebx
mov	[ebx+48h], eax
mov	[ebx+4Ch], ecx
mov	byte ptr [ebx+50h], 2Eh
call	sub_835000
lea	ecx, [esp+0Ch+arg_4]
call	nullsub_2
pop	edi
pop	esi
mov	eax, ebx
pop	ebx
retn	28h
sub_83DD50 endp

align 10h



sub_83DDC0 proc	near
lea	eax, [ecx+38h]
retn
sub_83DDC0 endp

align 10h



sub_83DDD0 proc	near

var_8= dword ptr -8

sub	esp, 8
push	ebx
push	esi
mov	esi, ecx
lea	ecx, [esi+14h]
call	sub_83D9D0
mov	bl, al
mov	byte ptr [esp+10h+var_8], bl
mov	eax, [esp+10h+var_8]
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
test	eax, eax
jnz	short loc_83DE0C
lea	ecx, [esp+10h+var_8]
push	ecx
mov	ecx, [esi+4Ch]
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+18h+var_8], eax
call	sub_83ED10

loc_83DE0C:
pop	esi
mov	al, bl
pop	ebx
add	esp, 8
retn
sub_83DDD0 endp

align 10h



sub_83DE20 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= byte ptr	 4

sub	esp, 0Ch
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+14h]
mov	ecx, esi
xor	ebp, ebp
call	sub_83DA30
test	eax, eax
jz	short loc_83DE81

loc_83DE38:
mov	ecx, esi
call	sub_83DA20
cmp	al, 3Dh
jnz	short loc_83DE81
mov	ecx, esi
inc	ebp
call	sub_83D9D0
mov	byte ptr [esp+18h+var_C], al
mov	eax, [esp+18h+var_C]
push	eax
lea	ecx, [edi+4]
call	sub_83D8C0
test	eax, eax
jnz	short loc_83DE76
lea	ecx, [esp+18h+var_8]
push	ecx
mov	ecx, [edi+4Ch]
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+20h+var_8], eax
call	sub_83ED10

loc_83DE76:
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jnz	short loc_83DE38

loc_83DE81:
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83DE95
mov	ecx, esi
call	sub_83DA20
jmp	short loc_83DE97

loc_83DE95:
xor	al, al

loc_83DE97:
cmp	al, [esp+18h+arg_0]
jnz	short loc_83DEA8
pop	edi
pop	esi
mov	eax, ebp
pop	ebp
add	esp, 0Ch
retn	4

loc_83DEA8:
pop	edi
or	eax, 0FFFFFFFFh
pop	esi
sub	eax, ebp
pop	ebp
add	esp, 0Ch
retn	4
sub_83DE20 endp

align 10h



sub_83DEC0 proc	near

var_8= dword ptr -8
arg_0= byte ptr	 4

sub	esp, 8
push	esi
push	edi
mov	edi, ecx
lea	esi, [edi+14h]
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83DF17
mov	ecx, esi
call	sub_83DA20
cmp	al, 0Dh
jz	short loc_83DEE4
cmp	al, 0Ah
jnz	short loc_83DEF1

loc_83DEE4:
cmp	al, [esp+10h+arg_0]
jz	short loc_83DEF1
mov	ecx, esi
call	sub_83DA00

loc_83DEF1:
cmp	dword ptr [edi+30h], 7FFFFFFFh
jb	short loc_83DF14
mov	ecx, [edi+4Ch]
lea	eax, [esp+10h+var_8]
push	eax
push	offset aChunkHasTooM_0 ; "chunk	has too	many lines"
mov	[esp+18h+var_8], 120h
call	sub_83ED10

loc_83DF14:
inc	dword ptr [edi+30h]

loc_83DF17:
pop	edi
pop	esi
add	esp, 8
retn	4
sub_83DEC0 endp

align 10h



sub_83DF20 proc	near

arg_0= dword ptr  4
arg_4= byte ptr	 8
arg_8= byte ptr	 0Ch
arg_C= dword ptr  10h

push	esi
lea	esi, [ecx+14h]
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83DF51
mov	ecx, esi
call	sub_83DA20
cmp	al, [esp+4+arg_8]
jnz	short loc_83DF51
mov	ecx, esi
call	sub_83DA00
mov	eax, [esp+4+arg_0]
mov	ecx, [esp+4+arg_C]
mov	[eax], ecx
pop	esi
retn	10h

loc_83DF51:
movsx	edx, [esp+4+arg_4]
mov	eax, [esp+4+arg_0]
mov	[eax], edx
pop	esi
retn	10h
sub_83DF20 endp




sub_83DF60 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	ebx, ecx
push	edi
lea	esi, [ebx+4]
push	eax
mov	ecx, esi
call	sub_83D8C0
lea	edi, [ebx+14h]
mov	ecx, edi
call	sub_83DA30
xor	ebp, ebp
test	eax, eax
jz	short loc_83DFE6

loc_83DF88:
mov	ecx, edi
call	sub_83DA20
movzx	ecx, al
push	ecx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jnz	short loc_83DFAA
mov	ecx, edi
call	sub_83DA20
cmp	al, 2Eh
jnz	short loc_83DFE6

loc_83DFAA:
mov	ecx, edi
call	sub_83D9D0
mov	byte ptr [esp+1Ch+var_C], al
mov	edx, [esp+1Ch+var_C]
push	edx
mov	ecx, esi
call	sub_83D8C0
test	eax, eax
jnz	short loc_83DFDB
mov	ecx, [ebx+4Ch]
lea	eax, [esp+1Ch+var_8]
push	eax
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+24h+var_8], ebp
call	sub_83ED10

loc_83DFDB:
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jnz	short loc_83DF88

loc_83DFE6:
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jz	short loc_83E036
mov	ecx, edi
call	sub_83DA20
cmp	al, 65h
jz	short loc_83E007
mov	ecx, edi
call	sub_83DA20
cmp	al, 45h
jnz	short loc_83E036

loc_83E007:
mov	ecx, ebx
call	sub_83DDD0
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jz	short loc_83E036
mov	ecx, edi
call	sub_83DA20
cmp	al, 2Dh
jz	short loc_83E02F
mov	ecx, edi
call	sub_83DA20
cmp	al, 2Bh
jnz	short loc_83E036

loc_83E02F:
mov	ecx, ebx
call	sub_83DDD0

loc_83E036:
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jz	short loc_83E09F

loc_83E041:
mov	ecx, edi
call	sub_83DA20
movzx	ecx, al
push	ecx		; int
call	_isalnum
add	esp, 4
test	eax, eax
jnz	short loc_83E063
mov	ecx, edi
call	sub_83DA20
cmp	al, 5Fh
jnz	short loc_83E09F

loc_83E063:
mov	ecx, edi
call	sub_83D9D0
mov	byte ptr [esp+1Ch+var_C], al
mov	edx, [esp+1Ch+var_C]
push	edx
mov	ecx, esi
call	sub_83D8C0
test	eax, eax
jnz	short loc_83E094
mov	ecx, [ebx+4Ch]
lea	eax, [esp+1Ch+var_8]
push	eax
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+24h+var_8], ebp
call	sub_83ED10

loc_83E094:
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jnz	short loc_83E041

loc_83E09F:
push	ebp
mov	ecx, esi
call	sub_83D8C0
movzx	ecx, byte ptr [ebx+50h]
push	ecx
push	2Eh
mov	ecx, esi
call	sub_83D950
lea	edx, [esp+1Ch+arg_4]
push	edx		; int
mov	ecx, esi
call	sub_997520
dec	eax
push	eax		; int
mov	ecx, esi
call	sub_9B3060
push	eax		; char *
call	sub_822AC0
add	esp, 0Ch
test	eax, eax
jnz	loc_83E16B
call	_localeconv
mov	cl, [ebx+50h]
mov	byte ptr [esp+1Ch+var_C], cl
cmp	eax, ebp
jz	short loc_83E0F1
mov	edx, [eax]
mov	al, [edx]
jmp	short loc_83E0F6

loc_83E0F1:
mov	eax, 2Eh

loc_83E0F6:
push	eax
mov	[ebx+50h], al
mov	eax, [esp+20h+var_C]
push	eax
mov	ecx, esi
call	sub_83D950
lea	ecx, [esp+1Ch+arg_4]
push	ecx		; int
mov	ecx, esi
call	sub_997520
dec	eax
push	eax		; int
mov	ecx, esi
call	sub_9B3060
push	eax		; char *
call	sub_822AC0
add	esp, 0Ch
test	eax, eax
jnz	short loc_83E16B
movzx	edx, byte ptr [ebx+50h]
push	2Eh
push	edx
mov	ecx, esi
call	sub_83D950
mov	ecx, esi
call	sub_83D930
mov	ecx, [ebx+4Ch]
lea	eax, [esp+1Ch+var_8]
push	eax
push	offset aMalformedNumbe ; "malformed number"
mov	[esp+24h+var_8], 11Dh
call	sub_83ED10
mov	eax, [esp+1Ch+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 120h
pop	ebx
add	esp, 0Ch
retn	8

loc_83E16B:
mov	eax, [esp+1Ch+arg_0]
fld	[esp+1Ch+arg_4]
pop	edi
fstp	dword ptr [eax+4]
pop	esi
pop	ebp
mov	dword ptr [eax], 11Dh
pop	ebx
add	esp, 0Ch
retn	8
sub_83DF60 endp

align 10h



sub_83E190 proc	near
mov	eax, [ecx+48h]
retn
sub_83E190 endp

align 10h



sub_83E1A0 proc	near

var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_18=	dword ptr -18h
var_10=	dword ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 34h
push	ebx
push	ebp
push	esi
mov	esi, ecx
push	edi
lea	edi, [esi+14h]
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jz	short loc_83E1D8
mov	ecx, edi
call	sub_83DA20
cmp	al, 0Dh
jz	short loc_83E1C6
cmp	al, 0Ah
jnz	short loc_83E1D8

loc_83E1C6:
mov	ecx, edi
call	sub_83D9D0
movzx	eax, al
push	eax
mov	ecx, esi
call	sub_83DEC0

loc_83E1D8:
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jz	loc_83E36C

loc_83E1E7:
mov	ecx, edi
call	sub_83DA20
movsx	eax, al
add	eax, 0FFFFFFF6h
cmp	eax, 53h	; switch 84 cases
ja	loc_83E32B	; default
			; jumptable 0083E204 cases 1,2,4-80,82
movzx	ecx, ds:byte_83E3B0[eax]
jmp	ds:off_83E3A0[ecx*4] ; switch jump

loc_83E20B:		; jumptable 0083E204 case 81
mov	ecx, edi
call	sub_83D9D0
mov	byte ptr [esp+44h+var_34], al
mov	ebx, [esp+44h+var_34]
push	ebx
lea	ecx, [esi+4]
call	sub_83D8C0
test	eax, eax
jnz	short loc_83E23D
mov	ecx, [esi+4Ch]
lea	edx, [esp+44h+var_20]
push	edx
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+4Ch+var_20], eax
call	sub_83ED10

loc_83E23D:
push	ebx
mov	ecx, esi
call	sub_83DE20
mov	ecx, [esp+44h+arg_0]
cmp	eax, ecx
jnz	loc_83E35D
test	ecx, ecx
jnz	short loc_83E26F
mov	ecx, [esi+4Ch]
lea	eax, [esp+44h+var_18]
push	eax
push	offset aNestingOf___Is ; "nesting of [[...]] is	deprecated"
mov	[esp+4Ch+var_18], 5Bh
call	sub_83ED10

loc_83E26F:
mov	ecx, esi
call	sub_83DDD0
jmp	loc_83E35D

loc_83E27B:		; jumptable 0083E204 case 83
lea	ebx, [esi+4]
mov	ecx, ebx
call	sub_997520
mov	ecx, edi
mov	[esp+44h+var_24], eax
call	sub_83D9D0
mov	byte ptr [esp+44h+var_30], al
mov	ebp, [esp+44h+var_30]
push	ebp
mov	ecx, ebx
call	sub_83D8C0
test	eax, eax
jnz	short loc_83E2BA
lea	ecx, [esp+44h+var_10]
push	ecx
mov	ecx, [esi+4Ch]
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+4Ch+var_10], eax
call	sub_83ED10

loc_83E2BA:
push	ebp
mov	ecx, esi
call	sub_83DE20
cmp	eax, [esp+44h+arg_0]
jnz	loc_83E35D
mov	ecx, edi
call	sub_83DA00
cmp	[esp+44h+arg_4], 0
jz	short loc_83E2E7
mov	eax, [esp+44h+var_24]
push	eax
lea	ecx, [esi+4]
call	sub_83D940

loc_83E2E7:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	8

loc_83E2F1:		; jumptable 0083E204 cases 0,3
mov	ecx, edi
call	sub_83DA20
lea	ebx, [esi+4]
push	0Ah
mov	ecx, ebx
mov	byte ptr [esp+48h+var_2C], al
call	sub_83D8C0
mov	ecx, edi
call	sub_83DA00
mov	edx, [esp+44h+var_2C]
push	edx
mov	ecx, esi
call	sub_83DEC0
cmp	[esp+44h+arg_4], 0
jnz	short loc_83E35D
mov	ecx, ebx
call	sub_83D8B0
jmp	short loc_83E35D

loc_83E32B:		; default
mov	ecx, edi	; jumptable 0083E204 cases 1,2,4-80,82
call	sub_83D9D0
mov	byte ptr [esp+44h+var_28], al
mov	eax, [esp+44h+var_28]
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
test	eax, eax
jnz	short loc_83E35D
lea	ecx, [esp+44h+var_8]
push	ecx
mov	ecx, [esi+4Ch]
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+4Ch+var_8], eax
call	sub_83ED10

loc_83E35D:
mov	ecx, edi
call	sub_83DA30
test	eax, eax
jnz	loc_83E1E7

loc_83E36C:
cmp	[esp+44h+arg_4], 0
mov	eax, offset aUnfinishedLong ; "unfinished long string"
jnz	short loc_83E37D
mov	eax, offset aUnfinishedLo_0 ; "unfinished long comment"

loc_83E37D:
mov	ecx, [esi+4Ch]
lea	edx, [esp+44h+var_8]
push	edx
push	eax
mov	[esp+4Ch+var_8], 120h
call	sub_83ED10
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 34h
retn	8
sub_83E1A0 endp

align 10h
off_83E3A0 dd offset loc_83E2F1, offset	loc_83E20B ; jump table	for switch statement
dd offset loc_83E27B, offset loc_83E32B
byte_83E3B0 db	    0,	   3,	  3,	 0 ; indirect table for	switch statement
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     3,     3,     3
db	3,     1,     3,     2
align 10h



sub_83E410 proc	near

var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
arg_0= byte ptr	 4

sub	esp, 1Ch
push	ebx
push	ebp
push	esi
mov	esi, ecx
lea	ebp, [esi+14h]
push	edi
mov	ecx, ebp
mov	[esp+2Ch+var_1C], esi
call	sub_83DA30
test	eax, eax
jz	loc_83E618
nop

loc_83E430:
mov	ecx, ebp
call	sub_83D9D0
mov	byte ptr [esp+2Ch+var_14], al
cmp	al, [esp+2Ch+arg_0]
jz	loc_83E632
cmp	al, 0Ah
jz	loc_83E5EF
cmp	al, 0Dh
jz	loc_83E5EF
cmp	al, 5Ch
jz	short loc_83E46B
mov	eax, [esp+2Ch+var_14]
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E46B:
mov	ecx, ebp
call	sub_83DA30
test	eax, eax
jz	loc_83E609
mov	ecx, ebp
call	sub_83D9D0
mov	bl, al
movsx	eax, bl
add	eax, 0FFFFFFF6h
mov	byte ptr [esp+2Ch+var_18], bl
cmp	eax, 6Ch	; switch 109 cases
ja	loc_83E544	; default
			; jumptable 0083E49D cases 1,2,4-86,89-91,93-99,101-103,105,107
movzx	ecx, ds:byte_83E660[eax]
jmp	ds:off_83E63C[ecx*4] ; switch jump

loc_83E4A4:		; jumptable 0083E49D case 87
mov	eax, 7
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E4B7:		; jumptable 0083E49D case 88
mov	eax, 8
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E4CA:		; jumptable 0083E49D case 92
mov	eax, 0Ch
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E4DD:		; jumptable 0083E49D case 100
mov	eax, 0Ah
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E4F0:		; jumptable 0083E49D case 104
mov	eax, 0Dh
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E503:		; jumptable 0083E49D case 106
mov	eax, 9
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E516:		; jumptable 0083E49D case 108
mov	eax, 0Bh
push	eax
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E529:		; jumptable 0083E49D cases 0,3
push	0Ah
lea	ecx, [esi+4]
call	sub_83D8C0
mov	edx, [esp+2Ch+var_18]
push	edx
mov	ecx, esi
call	sub_83DEC0
jmp	loc_83E609

loc_83E544:		; default
movzx	eax, bl		; jumptable 0083E49D cases 1,2,4-86,89-91,93-99,101-103,105,107
push	eax		; int
call	_isdigit
add	esp, 4
test	eax, eax
jnz	short loc_83E566
mov	ecx, [esp+2Ch+var_18]
push	ecx
lea	ecx, [esi+4]
call	sub_83D8C0
jmp	loc_83E609

loc_83E566:
xor	esi, esi
xor	edi, edi
lea	ebx, [ebx+0]

loc_83E570:
cmp	esi, 2
movsx	eax, bl
lea	edx, [edi+edi*4]
lea	edi, [eax+edx*2-30h]
jge	short loc_83E5B0
mov	ecx, ebp
call	sub_83DA30
test	eax, eax
jz	short loc_83E5B0
mov	ecx, ebp
call	sub_83DA20
movzx	ecx, al
push	ecx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	short loc_83E5B0
mov	ecx, ebp
call	sub_83D9D0
inc	esi
cmp	esi, 3
mov	bl, al
jl	short loc_83E570

loc_83E5B0:
cmp	edi, 0FFh
jbe	short loc_83E5DC
mov	eax, [esp+2Ch+var_1C]
mov	ecx, [eax+4Ch]
lea	edx, [esp+2Ch+var_10]
push	edx
push	offset aEscapeSequence ; "escape sequence too large"
mov	[esp+34h+var_10], 11Fh
call	sub_83ED10
mov	esi, [esp+2Ch+var_1C]
jmp	short loc_83E609

loc_83E5DC:
mov	ecx, [esp+2Ch+var_1C]
push	edi
add	ecx, 4
call	sub_83D8C0
mov	esi, [esp+2Ch+var_1C]
jmp	short loc_83E609

loc_83E5EF:
lea	ecx, [esp+2Ch+var_8]
push	ecx
mov	ecx, [esi+4Ch]
push	offset aUnfinishedStri ; "unfinished string"
mov	[esp+34h+var_8], 11Fh
call	sub_83ED10

loc_83E609:
mov	ecx, ebp
call	sub_83DA30
test	eax, eax
jnz	loc_83E430

loc_83E618:
mov	ecx, [esi+4Ch]
lea	edx, [esp+2Ch+var_8]
push	edx
push	offset aUnfinishedSt_0 ; "unfinished string"
mov	[esp+34h+var_8], 120h
call	sub_83ED10

loc_83E632:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 1Ch
retn	4
sub_83E410 endp

off_83E63C dd offset loc_83E529, offset	loc_83E4A4 ; jump table	for switch statement
dd offset loc_83E4B7, offset loc_83E4CA
dd offset loc_83E4DD, offset loc_83E4F0
dd offset loc_83E503, offset loc_83E516
dd offset loc_83E544
byte_83E660 db	    0,	   8,	  8,	 0 ; indirect table for	switch statement
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     8
db	8,     8,     8,     1
db	2,     8,     8,     8
db	3,     8,     8,     8
db	8,     8,     8,     8
db	4,     8,     8,     8
db	5,     8,     6,     8
db	7
align 10h



sub_83E6D0 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_8= dword ptr -8
arg_0= dword ptr  4

sub	esp, 14h
push	ebx
push	ebp
push	esi
push	edi
mov	edi, ecx
lea	ecx, [edi+4]
call	sub_83D8B0
lea	esi, [edi+14h]

loc_83E6E4:
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	loc_83E888
mov	ecx, esi
call	sub_83D9D0
mov	bl, al
movsx	eax, bl
add	eax, 0FFFFFFF6h
mov	byte ptr [esp+24h+var_14], bl
cmp	eax, 74h	; switch 117 cases
ja	loc_83E829	; default
			; jumptable 0083E716 cases 1,2,4-23,25-28,30-34,37-49,53-80,82-115
movzx	eax, ds:byte_83EB44[eax]
jmp	ds:off_83EB1C[eax*4] ; switch jump

loc_83E71D:		; jumptable 0083E716 cases 0,3
mov	ecx, [esp+24h+var_14]
push	ecx
mov	ecx, edi
call	sub_83DEC0
jmp	short loc_83E6E4

loc_83E72B:		; jumptable 0083E716 case 35
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	loc_83E89C
mov	ecx, esi
call	sub_83DA20
cmp	al, 2Dh
jnz	loc_83E89C
mov	ecx, esi
call	sub_83DA00
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83E7B0
mov	ecx, esi
call	sub_83DA20
cmp	al, 5Bh
jnz	short loc_83E7B0
mov	ecx, esi
call	sub_83D9D0
movzx	edx, al
push	edx
mov	ecx, edi
call	sub_83DE20
mov	ecx, esi
mov	ebx, eax
call	sub_83DA30
test	eax, eax
jz	short loc_83E78C
mov	ecx, esi
call	sub_83DA00

loc_83E78C:
lea	ebp, [edi+4]
mov	ecx, ebp
call	sub_83D8B0
test	ebx, ebx
jl	short loc_83E7B0
push	0
push	ebx
mov	ecx, edi
call	sub_83E1A0
mov	ecx, ebp
call	sub_83D8B0
jmp	loc_83E6E4

loc_83E7B0:
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	loc_83E6E4
nop

loc_83E7C0:
mov	ecx, esi
call	sub_83DA20
cmp	al, 0Dh
jz	loc_83E6E4
cmp	al, 0Ah
jz	loc_83E6E4
mov	ecx, esi
call	sub_83DA00
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jnz	short loc_83E7C0
jmp	loc_83E6E4

loc_83E7EE:		; jumptable 0083E716 case 81
push	5Bh
mov	ecx, edi
call	sub_83DE20
mov	ebx, eax
test	ebx, ebx
jge	loc_83E8B0
cmp	ebx, 0FFFFFFFFh
jz	loc_83E8D9
mov	ecx, [edi+4Ch]
lea	eax, [esp+24h+var_10]
push	eax
push	offset aInvalidLongStr ; "invalid long string delimiter"
mov	[esp+2Ch+var_10], 11Fh
call	sub_83ED10
jmp	loc_83E6E4

loc_83E829:		; default
movzx	ecx, bl		; jumptable 0083E716 cases 1,2,4-23,25-28,30-34,37-49,53-80,82-115
push	ecx		; int
call	_isspace
add	esp, 4
test	eax, eax
jnz	loc_83E6E4
movzx	ebp, bl
push	ebp		; int
call	_isalpha
add	esp, 4
test	eax, eax
jnz	loc_83EA53
cmp	bl, 5Fh
jz	loc_83EA53
push	ebp		; int
call	_isdigit
add	esp, 4
test	eax, eax
jz	loc_83EA40
mov	eax, [esp+24h+var_14]
mov	esi, [esp+24h+arg_0]
push	eax
push	esi
mov	ecx, edi
call	sub_83DF60
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4

loc_83E888:
mov	eax, [esp+24h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 120h
pop	ebx
add	esp, 14h
retn	4

loc_83E89C:
mov	eax, [esp+24h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 2Dh
pop	ebx
add	esp, 14h
retn	4

loc_83E8B0:
mov	ecx, esi
call	sub_83DA00
lea	esi, [edi+4]
mov	ecx, esi
call	sub_83D8B0
push	1
push	ebx
mov	ecx, edi
call	sub_83E1A0
mov	edx, [edi]
push	esi
push	11Fh
push	edx
jmp	loc_83EB05

loc_83E8D9:
mov	eax, [esp+24h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 5Bh
pop	ebx
add	esp, 14h
retn	4

loc_83E8ED:		; jumptable 0083E716 case 51
mov	esi, [esp+24h+arg_0]
push	119h
push	3Dh
push	3Dh
push	esi
mov	ecx, edi
call	sub_83DF20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4

loc_83E90E:		; jumptable 0083E716 case 50
mov	esi, [esp+24h+arg_0]
push	11Bh
push	3Dh
push	3Ch
push	esi
mov	ecx, edi
call	sub_83DF20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4

loc_83E92F:		; jumptable 0083E716 case 52
mov	esi, [esp+24h+arg_0]
push	11Ah
push	3Dh
push	3Eh
push	esi
mov	ecx, edi
call	sub_83DF20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4

loc_83E950:		; jumptable 0083E716 case 116
mov	esi, [esp+24h+arg_0]
push	11Ch
push	3Dh
push	7Eh
push	esi
mov	ecx, edi
call	sub_83DF20
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4

loc_83E971:		; jumptable 0083E716 cases 24,29
mov	eax, [esp+24h+var_14]
push	eax
mov	ecx, edi
call	sub_83E410
mov	ecx, [edi]
lea	eax, [edi+4]
push	eax
push	11Fh
push	ecx
jmp	loc_83EB05

loc_83E98E:		; jumptable 0083E716 case 36
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83E9F0
mov	ecx, esi
call	sub_83DA20
cmp	al, 2Eh
jnz	short loc_83E9F0
mov	ecx, esi
call	sub_83DA00
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83E9DC
mov	ecx, esi
call	sub_83DA20
cmp	al, 2Eh
jnz	short loc_83E9DC
mov	ecx, esi
call	sub_83DA00
mov	eax, [esp+24h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 118h
pop	ebx
add	esp, 14h
retn	4

loc_83E9DC:
mov	eax, [esp+24h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 117h
pop	ebx
add	esp, 14h
retn	4

loc_83E9F0:
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83EA26
mov	ecx, esi
call	sub_83DA20
movzx	edx, al
push	edx		; int
call	_isdigit
add	esp, 4
test	eax, eax
jnz	short loc_83EA26
mov	eax, [esp+24h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr [eax], 2Eh
pop	ebx
add	esp, 14h
retn	4

loc_83EA26:
mov	esi, [esp+24h+arg_0]
push	2Eh
push	esi
mov	ecx, edi
call	sub_83DF60
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4

loc_83EA40:
mov	eax, [esp+24h+arg_0]
pop	edi
movsx	ecx, bl
pop	esi
pop	ebp
mov	[eax], ecx
pop	ebx
add	esp, 14h
retn	4

loc_83EA53:
mov	edx, [esp+24h+var_14]
lea	ebx, [edi+4]
push	edx
mov	ecx, ebx
call	sub_83D8C0
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jz	short loc_83EACE
lea	ecx, [ecx+0]

loc_83EA70:
mov	ecx, esi
call	sub_83DA20
movzx	eax, al
push	eax		; int
call	_isalnum
add	esp, 4
test	eax, eax
jnz	short loc_83EA92
mov	ecx, esi
call	sub_83DA20
cmp	al, 5Fh
jnz	short loc_83EACE

loc_83EA92:
mov	ecx, esi
call	sub_83D9D0
mov	byte ptr [esp+24h+var_14], al
mov	ecx, [esp+24h+var_14]
push	ecx
mov	ecx, ebx
call	sub_83D8C0
test	eax, eax
jnz	short loc_83EAC3
mov	ecx, [edi+4Ch]
lea	edx, [esp+24h+var_8]
push	edx
push	offset aLexicalElement ; "lexical element too long"
mov	[esp+2Ch+var_8], eax
call	sub_83ED10

loc_83EAC3:
mov	ecx, esi
call	sub_83DA30
test	eax, eax
jnz	short loc_83EA70

loc_83EACE:
mov	ecx, ebx
call	sub_997520
push	eax
mov	ecx, ebx
call	sub_9B3060
push	eax
call	sub_83DBF0
add	esp, 8
test	eax, eax
jle	short loc_83EAFC
mov	ecx, [esp+24h+arg_0]
pop	edi
pop	esi
pop	ebp
mov	[ecx], eax
mov	eax, ecx
pop	ebx
add	esp, 14h
retn	4

loc_83EAFC:
mov	eax, [edi]
push	ebx
push	11Eh
push	eax

loc_83EB05:
mov	esi, [esp+30h+arg_0]
mov	ecx, esi
call	sub_83DA70
pop	edi
mov	eax, esi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn	4
sub_83E6D0 endp

off_83EB1C dd offset loc_83E71D, offset	loc_83E971 ; jump table	for switch statement
dd offset loc_83E72B, offset loc_83E98E
dd offset loc_83E90E, offset loc_83E8ED
dd offset loc_83E92F, offset loc_83E7EE
dd offset loc_83E950, offset loc_83E829
byte_83EB44 db	    0,	   9,	  9,	 0 ; indirect table for	switch statement
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	1,     9,     9,     9
db	9,     1,     9,     9
db	9,     9,     9,     2
db	3,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     4,     5
db	6,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     7,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	9,     9,     9,     9
db	8
align 10h



sub_83EBC0 proc	near

var_8= byte ptr	-8
var_4= dword ptr -4

sub	esp, 8
push	esi
mov	esi, ecx
mov	eax, [esi+30h]
mov	[esi+34h], eax
mov	eax, 120h
cmp	[esi+40h], eax
jz	short loc_83EBF1
mov	ecx, [esi+40h]
mov	edx, [esi+44h]
mov	[esi+40h], eax
mov	eax, [esp+0Ch+var_4]
mov	[esi+38h], ecx
mov	[esi+3Ch], edx
mov	[esi+44h], eax
pop	esi
add	esp, 8
retn

loc_83EBF1:
lea	ecx, [esp+0Ch+var_8]
push	ecx
mov	ecx, esi
call	sub_83E6D0
mov	edx, [eax]
mov	[esi+38h], edx
mov	eax, [eax+4]
mov	[esi+3Ch], eax
pop	esi
add	esp, 8
retn
sub_83EBC0 endp

align 10h



sub_83EC10 proc	near

var_8= byte ptr	-8

sub	esp, 8
push	esi
lea	eax, [esp+0Ch+var_8]
push	eax
mov	esi, ecx
call	sub_83E6D0
mov	ecx, eax
mov	edx, [ecx]
lea	eax, [esi+40h]
mov	[eax], edx
mov	ecx, [ecx+4]
mov	[eax+4], ecx
pop	esi
add	esp, 8
retn
sub_83EC10 endp

align 10h



sub_83EC40 proc	near

arg_0= dword ptr  4

mov	eax, ecx
mov	ecx, [esp+arg_0]
mov	[eax], ecx
mov	dword ptr [eax+4], 0
retn	4
sub_83EC40 endp

align 10h



sub_83EC60 proc	near

DstBuf=	byte ptr -88h
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 88h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+88h+var_4], eax
push	esi
mov	esi, ecx
mov	ecx, [esp+8Ch+arg_0]
mov	eax, [ecx]
cmp	eax, 11Dh
jl	short loc_83ECD1
cmp	eax, 11Fh
jg	short loc_83ECD1
mov	ecx, [esi+4]
call	sub_9144A0
mov	ecx, eax
call	sub_997520
mov	ecx, [esi+4]
push	eax
call	sub_9144A0
mov	ecx, eax
call	sub_9B3060
push	eax
mov	eax, [esi]
push	eax
call	sub_81B9D0
add	esp, 0Ch
pop	esi
mov	ecx, [esp+88h+var_4]
xor	ecx, esp
call	sub_7999A3
add	esp, 88h
retn	4

loc_83ECD1:		; SizeInBytes
push	80h
lea	edx, [esp+90h+DstBuf]
push	edx		; DstBuf
call	sub_83DCD0
mov	ecx, [esi]
lea	eax, [esp+8Ch+DstBuf]
push	eax
push	ecx
call	sub_81C070
mov	ecx, [esp+94h+var_4]
add	esp, 8
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 88h
retn	4
sub_83EC60 endp

align 10h



sub_83ED10 proc	near

var_234= byte ptr -234h
var_224= dword ptr -224h
ArgList= byte ptr -210h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 234h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+234h+var_4], eax
push	ebx
mov	ebx, [esp+238h+arg_0]
push	esi
push	edi
mov	edi, [esp+240h+arg_4]
mov	esi, ecx
mov	eax, [esi]
push	4
push	eax
call	sub_81B6A0
mov	ecx, [esi+4]
add	esp, 8
call	sub_83E190
lea	ecx, [esp+240h+var_234]
push	ecx
mov	[esp+244h+var_224], eax
call	sub_81D0F0
mov	ecx, [esi+4]
add	esp, 4
push	ebx
call	sub_9E28B0
push	eax
mov	eax, [esi]
lea	edx, [esp+248h+ArgList]
push	edx		; ArgList
push	offset aSDS	; "%s:%d: %s"
push	eax		; int
call	sub_81C0C0
add	esp, 14h
cmp	dword ptr [edi], 0
jle	short loc_83EDB3
mov	ecx, [esi]
push	offset aNear	; " near '"
push	ecx
call	sub_81C070
add	esp, 8
push	edi
mov	ecx, esi
call	sub_83EC60
mov	edx, [esi]
push	offset asc_1469FC0 ; "'"
push	edx
call	sub_81C070
mov	eax, [esi]
push	4
push	eax
call	sub_81BB60
add	esp, 10h

loc_83EDB3:
mov	ecx, [esi]
push	ecx
call	sub_81C0E0
mov	ecx, [esp+244h+var_4]
add	esp, 4
pop	edi
pop	esi
pop	ebx
xor	ecx, esp
call	sub_7999A3
add	esp, 234h
retn	8
sub_83ED10 endp

align 10h



sub_83EDE0 proc	near

arg_0= dword ptr  4

push	esi
mov	esi, ecx
mov	ecx, [esi+4]
call	sub_83DDC0
push	eax
mov	eax, [esp+8+arg_0]
push	eax
mov	ecx, esi
call	sub_83ED10
pop	esi
retn	4
sub_83EDE0 endp

align 10h
mov	eax, 1004h
call	__alloca_probe
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+1000h], eax
mov	ecx, [esp+100Ch]
push	esi
mov	esi, [esp+100Ch]
lea	eax, [esp+1014h]
push	eax
push	ecx
lea	edx, [esp+0Ch]
push	800h
push	edx
call	_vswprintf_s
mov	ecx, [esi+0Ch]
add	esp, 10h
push	ecx
lea	edx, [esp+8]
xor	eax, eax
push	edx
mov	ecx, esi
mov	[esp+100Ah], ax
call	sub_841E10
mov	ecx, [esp+1004h]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 1004h
retn
align 10h
push	ecx
movzx	eax, word ptr [ecx+48h]
fld1
fstp	dword ptr [esp]
test	ax, ax
jz	short loc_83EEB6
mov	edx, [ecx+8]
movzx	eax, ax
mov	[esp], eax
mov	eax, [edx+8Ch]
fild	dword ptr [esp]
fild	dword ptr [edx+8Ch]
test	eax, eax
jge	short loc_83EEB1
fadd	ds:flt_15FCC08

loc_83EEB1:
fdivp	st(1), st
fstp	dword ptr [esp]

loc_83EEB6:
fld	dword ptr [ecx+3Ch]
mov	edx, [esp+8]
fld	dword ptr [esp]
mov	eax, [esp+0Ch]
fld	st
fmulp	st(2), st
fxch	st(1)
fstp	dword ptr [edx]
fmul	dword ptr [ecx+40h]
fstp	dword ptr [eax]
pop	ecx
retn	8
align 10h
sub	esp, 804h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+800h], eax
mov	ecx, [esp+80Ch]
push	esi
mov	esi, [esp+80Ch]
lea	eax, [esp+814h]
push	eax
push	ecx
push	0FFFFFFFFh
lea	edx, [esp+10h]
push	800h
push	edx
mov	byte ptr [esp+18h], 0
call	__vsnprintf_s
mov	eax, [esi+0Ch]
add	esp, 14h
push	eax
lea	ecx, [esp+8]
push	ecx
mov	ecx, esi
call	sub_841D00
mov	ecx, [esp+804h]
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 804h
retn
align 10h



sub_83EF50 proc	near
push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1469FC4
mov	eax, [esi+54h]
push	eax
mov	dword ptr [esi+50h], offset off_156AE9C
call	sub_470A20
add	esp, 4
mov	ecx, esi
pop	esi
jmp	sub_841C50
sub_83EF50 endp

align 10h



sub_83EF80 proc	near

var_7C=	dword ptr -7Ch
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
var_64=	dword ptr -64h
var_60=	dword ptr -60h
var_5C=	dword ptr -5Ch
var_58=	dword ptr -58h
var_54=	dword ptr -54h
var_50=	dword ptr -50h
var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_3C=	dword ptr -3Ch
var_38=	dword ptr -38h
var_34=	byte ptr -34h
var_30=	byte ptr -30h
var_2C=	byte ptr -2Ch
var_28=	qword ptr -28h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 6Ch
push	esi
mov	esi, ecx
cmp	byte ptr [esi+44h], 0
jz	loc_83F646
mov	ecx, [esi+60h]
test	ecx, ecx
jz	short loc_83EFCC
mov	eax, [ecx]
mov	edx, [eax+48h]
push	0
call	edx
mov	[esp+70h+var_3C], eax
fild	[esp+70h+var_3C]
test	eax, eax
jge	short loc_83EFB2
fadd	ds:flt_15FCC08

loc_83EFB2:
mov	ecx, [esi+60h]
fstp	[esp+70h+var_54]
mov	eax, [ecx]
mov	edx, [eax+4Ch]
push	0
call	edx
mov	[esp+70h+var_3C], eax
fild	[esp+70h+var_3C]
jmp	short loc_83F01A

loc_83EFCC:
mov	ecx, dword_1889414
mov	eax, [ecx]
mov	edx, [eax+74h]
call	edx
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+48h]
push	0
call	eax
mov	[esp+70h+var_3C], eax
fild	[esp+70h+var_3C]
test	eax, eax
jge	short loc_83EFF6
fadd	ds:flt_15FCC08

loc_83EFF6:
mov	ecx, dword_1889414
fstp	[esp+70h+var_54]
mov	edx, [ecx]
mov	eax, [edx+74h]
call	eax
mov	edx, [eax]
mov	ecx, eax
mov	eax, [edx+4Ch]
push	0
call	eax
mov	[esp+70h+var_3C], eax
fild	[esp+70h+var_3C]

loc_83F01A:
test	eax, eax
jge	short loc_83F024
fadd	ds:flt_15FCC08

loc_83F024:
push	edi
fstp	[esp+74h+var_58]
xor	ecx, ecx
xor	edi, edi
cmp	cx, [esi+5Ch]
jnb	short loc_83F04D

loc_83F033:
mov	edx, [esi+54h]
mov	eax, [edx+edi*4]
mov	ecx, [eax+0B4h]
call	sub_11354A0
movzx	ecx, word ptr [esi+5Ch]
inc	edi
cmp	edi, ecx
jb	short loc_83F033

loc_83F04D:
mov	edx, dword_17EE158
mov	eax, dword_17EE15C
mov	ecx, dword_17EE160
push	ebx
mov	ebx, [esi+0Ch]
mov	[esp+78h+var_20], edx
mov	edx, dword_17EE164
push	ebp
mov	[esp+7Ch+var_1C], eax
mov	[esp+7Ch+var_18], ecx
mov	[esp+7Ch+var_14], edx
test	bl, 1
jz	short loc_83F09A
mov	eax, [esi+20h]
mov	ecx, [esi+24h]
mov	edx, [esi+28h]
mov	[esp+7Ch+var_20], eax
mov	eax, [esi+2Ch]
mov	[esp+7Ch+var_1C], ecx
mov	[esp+7Ch+var_18], edx
mov	[esp+7Ch+var_14], eax

loc_83F09A:
movzx	eax, word ptr [esi+48h]
fld1
fstp	[esp+7Ch+var_64]
test	ax, ax
jz	short loc_83F0D3
mov	edx, [esi+8]
movzx	ecx, ax
mov	eax, [edx+8Ch]
mov	[esp+7Ch+var_50], ecx
fild	[esp+7Ch+var_50]
fild	dword ptr [edx+8Ch]
test	eax, eax
jge	short loc_83F0CD
fadd	ds:flt_15FCC08

loc_83F0CD:
fdivp	st(1), st
fstp	[esp+7Ch+var_64]

loc_83F0D3:
mov	ecx, [esi+8]
mov	edx, [ecx+90h]
fild	dword ptr [ecx+90h]
test	edx, edx
jge	short loc_83F0EC
fadd	ds:flt_15FCC08

loc_83F0EC:
fmul	[esp+7Ch+var_64]
fnstcw	word ptr [esp+7Ch+var_6C]
movzx	eax, word ptr [esp+7Ch+var_6C]
or	eax, 0C00h
mov	[esp+7Ch+var_50], eax
movzx	eax, word ptr [esi+4Ah]
fldcw	word ptr [esp+7Ch+var_50]
movzx	edx, ax
mov	[esp+7Ch+var_60], edx
movzx	edx, word ptr [esi+4Ch]
fistp	[esp+7Ch+var_28]
mov	edi, dword ptr [esp+7Ch+var_28]
movzx	ebp, dx
fldcw	word ptr [esp+7Ch+var_6C]
movzx	eax, ax
movzx	edx, dx
imul	edi, [esi+34h]
mov	[esp+7Ch+var_50], ebp
mov	[esp+7Ch+var_68], eax
mov	[esp+7Ch+var_6C], edx
test	bl, 2
jz	loc_83F24D
movzx	eax, byte ptr [esi+30h]
push	eax
lea	edx, [esp+80h+var_68]
push	edx
mov	edx, [esi+18h]
lea	eax, [esp+84h+var_5C]
push	eax
push	edx
call	sub_8401A0
movzx	eax, byte ptr [esi+30h]
cmp	eax, 3		; switch 4 cases
ja	loc_83F244	; default
jmp	ds:off_83F64C[eax*4] ; switch jump

loc_83F16F:		; jumptable 0083F168 case 0
fld	[esp+7Ch+var_5C]
fmul	[esp+7Ch+var_64]
call	__ftol2_sse
mov	cx, [esi+4Ah]
cwde
cdq
sub	eax, edx
sar	eax, 1
sub	cx, ax
mov	ax, [esi+4Ch]
movzx	edx, cx
shr	edi, 1
mov	[esp+7Ch+var_60], edx
sub	ax, di
jmp	loc_83F23D

loc_83F19E:		; jumptable 0083F168 case 1
fld	[esp+7Ch+var_5C]
fmul	[esp+7Ch+var_64]
call	__ftol2_sse
cwde
cdq
sub	eax, edx
sar	eax, 1
add	ax, [esi+4Ah]
shr	edi, 1
movzx	edx, ax
mov	ax, [esi+4Ch]
mov	[esp+7Ch+var_60], edx
sub	ax, di
jmp	short loc_83F23D

loc_83F1C7:		; jumptable 0083F168 case 2
mov	edx, [esi+8]
fld	[esp+7Ch+var_68]
movzx	eax, word ptr [edx+96h]
fmul	[esp+7Ch+var_64]
imul	eax, [esi+34h]
movzx	ecx, word ptr [esi+4Ah]
shr	eax, 1
sub	cx, ax
movzx	edx, cx
mov	[esp+7Ch+var_60], edx
call	__ftol2_sse
movzx	ecx, word ptr [esi+4Ch]
cwde
cdq
sub	eax, edx
sar	eax, 1
sub	cx, ax
movzx	edx, cx
mov	[esp+7Ch+var_6C], edx
jmp	short loc_83F244 ; default

loc_83F208:		; jumptable 0083F168 case 3
mov	eax, [esi+8]
fld	[esp+7Ch+var_68]
movzx	ecx, word ptr [eax+96h]
fmul	[esp+7Ch+var_64]
imul	ecx, [esi+34h]
mov	dx, [esi+4Ah]
shr	ecx, 1
sub	dx, cx
movzx	eax, dx
mov	[esp+7Ch+var_60], eax
call	__ftol2_sse
cwde
cdq
sub	eax, edx
sar	eax, 1
add	ax, [esi+4Ch]

loc_83F23D:
movzx	ecx, ax
mov	[esp+7Ch+var_6C], ecx

loc_83F244:		; default
movzx	edx, word ptr [esp+7Ch+var_60]
mov	[esp+7Ch+var_68], edx

loc_83F24D:
mov	eax, [esi+8]
mov	ecx, [eax+90h]
fild	dword ptr [eax+90h]
test	ecx, ecx
jge	short loc_83F266
fadd	ds:flt_15FCC08

loc_83F266:
fmul	[esp+7Ch+var_64]
call	__ftol2_sse
cmp	dword ptr [esi+14h], 0
movzx	ebx, ax
mov	[esp+7Ch+var_4C], ebx
mov	[esp+7Ch+var_5C], 0
jbe	loc_83F619
jmp	short loc_83F290
align 10h

loc_83F290:
mov	edx, [esi+18h]
mov	eax, [esp+7Ch+var_5C]
movzx	edi, word ptr [edx+eax*2]
test	di, di
jz	loc_83F619
lea	ecx, [esp+7Ch+var_10]
push	ecx
mov	ecx, [esi+8]
push	edi
call	sub_840530
mov	ebp, [esi+8]
cmp	dword ptr [ebp+0A8h], 0
jz	short loc_83F305
mov	ecx, [ebp+0A4h]
movzx	eax, di
xor	edx, edx
div	dword ptr [ecx+4]
mov	eax, [ecx+8]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_83F2E2

loc_83F2D6:
cmp	di, [edx+4]
jz	short loc_83F2E6
mov	edx, [edx]
test	edx, edx
jnz	short loc_83F2D6

loc_83F2E2:
xor	eax, eax
jmp	short loc_83F2ED

loc_83F2E6:
movzx	eax, word ptr [edx+6]
movzx	eax, ax

loc_83F2ED:
movzx	ecx, ax
mov	eax, [ebp+0A8h]
movzx	edx, byte ptr [ecx+eax]
mov	eax, [ebp+0B4h]
mov	ecx, [eax+edx*4]
jmp	short loc_83F30D

loc_83F305:
mov	ecx, [ebp+0B4h]
mov	ecx, [ecx]

loc_83F30D:
mov	edx, [ecx]
mov	eax, [edx+48h]
call	eax
fld	[esp+7Ch+var_8]
fsub	[esp+7Ch+var_10]
mov	[esp+7Ch+var_38], eax
fild	[esp+7Ch+var_38]
test	eax, eax
jge	short loc_83F32E
fadd	ds:flt_15FCC08

loc_83F32E:
fmulp	st(1), st
fmul	[esp+7Ch+var_64]
call	__ftol2_sse
mov	ecx, [esi+8]
cmp	dword ptr [ecx+0A8h], 0
movzx	ebp, ax
jz	short loc_83F393
mov	ebx, [ecx+0A4h]
movzx	eax, di
xor	edx, edx
div	dword ptr [ebx+4]
mov	eax, [ebx+8]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_83F36C

loc_83F360:
cmp	di, [edx+4]
jz	short loc_83F370
mov	edx, [edx]
test	edx, edx
jnz	short loc_83F360

loc_83F36C:
xor	eax, eax
jmp	short loc_83F377

loc_83F370:
movzx	eax, word ptr [edx+6]
movzx	eax, ax

loc_83F377:
mov	ebx, [esp+7Ch+var_4C]
movzx	edx, ax
mov	eax, [ecx+0A8h]
movzx	eax, byte ptr [edx+eax]
mov	ecx, [ecx+0B4h]
mov	ecx, [ecx+eax*4]
jmp	short loc_83F39B

loc_83F393:
mov	edx, [ecx+0B4h]
mov	ecx, [edx]

loc_83F39B:
mov	eax, [ecx]
mov	edx, [eax+4Ch]
call	edx
fld	[esp+7Ch+var_4]
fsub	[esp+7Ch+var_C]
mov	[esp+7Ch+var_38], eax
fild	[esp+7Ch+var_38]
test	eax, eax
jge	short loc_83F3BC
fadd	ds:flt_15FCC08

loc_83F3BC:
fmulp	st(1), st
fmul	[esp+7Ch+var_64]
call	__ftol2_sse
movzx	ecx, ax
mov	al, [esi+30h]
movzx	edx, al
cmp	edx, 3		; switch 4 cases
ja	loc_83F607	; default
jmp	ds:off_83F65C[edx*4] ; switch jump

loc_83F3E0:		; jumptable 0083F3D9 case 0
cmp	di, 0Ah
jnz	short loc_83F447
test	byte ptr [esi+0Ch], 2
jz	short loc_83F435
mov	edx, [esi+18h]
push	eax
lea	eax, [esp+80h+var_34]
push	eax
mov	eax, [esp+84h+var_5C]
lea	ecx, [esp+84h+var_48]
push	ecx
lea	ecx, [edx+eax*2+2]
push	ecx
mov	ecx, [esi+8]
call	sub_8401A0
fld	[esp+7Ch+var_48]
fmul	[esp+7Ch+var_64]
call	__ftol2_sse
cwde
cdq
sub	eax, edx
mov	dx, [esi+4Ah]
sar	eax, 1
sub	dx, ax
add	[esp+7Ch+var_6C], ebx
movzx	eax, dx
mov	[esp+7Ch+var_68], eax
jmp	loc_83F607	; default

loc_83F435:
movzx	ecx, word ptr [esp+7Ch+var_60]
add	[esp+7Ch+var_6C], ebx
mov	[esp+7Ch+var_68], ecx
jmp	loc_83F607	; default

loc_83F447:
lea	edx, [esp+7Ch+var_10]
push	edx
lea	eax, [esp+80h+var_20]
push	eax
lea	edx, [esp+84h+var_58]
push	edx
lea	eax, [esp+88h+var_54]
push	eax
push	ecx
push	ebp
lea	ecx, [esp+94h+var_6C]
push	ecx
lea	edx, [esp+98h+var_68]
push	edx
push	edi
mov	ecx, esi
call	sub_83FBD0
add	[esp+7Ch+var_68], ebp
jmp	loc_83F607	; default

loc_83F478:		; jumptable 0083F3D9 case 1
cmp	di, 0Ah
jnz	short loc_83F4DC
test	byte ptr [esi+0Ch], 2
jz	short loc_83F4CA
mov	edx, [esi+18h]
push	eax
lea	eax, [esp+80h+var_30]
push	eax
mov	eax, [esp+84h+var_5C]
lea	ecx, [esp+84h+var_44]
push	ecx
lea	ecx, [edx+eax*2+2]
push	ecx
mov	ecx, [esi+8]
call	sub_8401A0
fld	[esp+7Ch+var_44]
fmul	[esp+7Ch+var_64]
call	__ftol2_sse
cwde
cdq
sub	eax, edx
sar	eax, 1
add	ax, [esi+4Ah]
add	[esp+7Ch+var_6C], ebx
movzx	edx, ax
mov	[esp+7Ch+var_68], edx
jmp	loc_83F607	; default

loc_83F4CA:
movzx	eax, word ptr [esp+7Ch+var_60]
add	[esp+7Ch+var_6C], ebx
mov	[esp+7Ch+var_68], eax
jmp	loc_83F607	; default

loc_83F4DC:
sub	[esp+7Ch+var_68], ebp
jmp	loc_83F5DF

loc_83F4E5:		; jumptable 0083F3D9 case 2
cmp	di, 0Ah
jnz	short loc_83F54C
test	byte ptr [esi+0Ch], 2
jz	short loc_83F53A
mov	edx, [esi+18h]
push	eax
lea	eax, [esp+80h+var_40]
push	eax
mov	eax, [esp+84h+var_5C]
lea	ecx, [esp+84h+var_2C]
push	ecx
lea	ecx, [edx+eax*2+2]
push	ecx
mov	ecx, [esi+8]
call	sub_8401A0
fld	[esp+7Ch+var_40]
fmul	[esp+7Ch+var_64]
add	[esp+7Ch+var_68], ebx
call	__ftol2_sse
cwde
cdq
sub	eax, edx
mov	dx, [esi+4Ch]
sar	eax, 1
sub	dx, ax
movzx	eax, dx
mov	[esp+7Ch+var_6C], eax
jmp	loc_83F607	; default

loc_83F53A:
movzx	ecx, word ptr [esp+7Ch+var_50]
add	[esp+7Ch+var_68], ebx
mov	[esp+7Ch+var_6C], ecx
jmp	loc_83F607	; default

loc_83F54C:
lea	edx, [esp+7Ch+var_10]
push	edx
lea	eax, [esp+80h+var_20]
push	eax
lea	edx, [esp+84h+var_58]
push	edx
lea	eax, [esp+88h+var_54]
push	eax
push	ecx
push	ebp
lea	ecx, [esp+94h+var_6C]
push	ecx
lea	edx, [esp+98h+var_68]
push	edx
push	edi
mov	ecx, esi
call	sub_83FBD0
add	[esp+7Ch+var_6C], ebx
jmp	loc_83F607	; default

loc_83F57D:		; jumptable 0083F3D9 case 3
cmp	di, 0Ah
jnz	short loc_83F5DB
test	byte ptr [esi+0Ch], 2
jz	short loc_83F5CC
mov	edx, [esi+18h]
push	eax
lea	eax, [esp+80h+var_3C]
push	eax
mov	eax, [esp+84h+var_5C]
lea	ecx, [esp+84h+var_28]
push	ecx
lea	ecx, [edx+eax*2+2]
push	ecx
mov	ecx, [esi+8]
call	sub_8401A0
fld	[esp+7Ch+var_3C]
fmul	[esp+7Ch+var_64]
add	[esp+7Ch+var_68], ebx
call	__ftol2_sse
cwde
cdq
sub	eax, edx
sar	eax, 1
add	ax, [esi+4Ch]
movzx	edx, ax
mov	[esp+7Ch+var_6C], edx
jmp	short loc_83F607 ; default

loc_83F5CC:
movzx	eax, word ptr [esp+7Ch+var_50]
add	[esp+7Ch+var_68], ebx
mov	[esp+7Ch+var_6C], eax
jmp	short loc_83F607 ; default

loc_83F5DB:
sub	[esp+7Ch+var_6C], ebx

loc_83F5DF:
lea	edx, [esp+7Ch+var_10]
push	edx
lea	eax, [esp+80h+var_20]
push	eax
lea	edx, [esp+84h+var_58]
push	edx
lea	eax, [esp+88h+var_54]
push	eax
push	ecx
push	ebp
lea	ecx, [esp+94h+var_6C]
push	ecx
lea	edx, [esp+98h+var_68]
push	edx
push	edi
mov	ecx, esi
call	sub_83FBD0

loc_83F607:		; default
mov	eax, [esp+7Ch+var_5C]
inc	eax
mov	[esp+7Ch+var_5C], eax
cmp	eax, [esi+14h]
jb	loc_83F290

loc_83F619:
xor	eax, eax
xor	edi, edi
pop	ebp
pop	ebx
cmp	ax, [esi+5Ch]
jnb	short loc_83F641

loc_83F625:
fldz
push	1		; int
push	ecx		; float
fstp	[esp+7Ch+var_7C]
mov	ecx, [esi+54h]
mov	ecx, [ecx+edi*4]
call	sub_1166CA0
movzx	edx, word ptr [esi+5Ch]
inc	edi
cmp	edi, edx
jb	short loc_83F625

loc_83F641:
mov	byte ptr [esi+44h], 0
pop	edi

loc_83F646:
pop	esi
add	esp, 6Ch
retn
sub_83EF80 endp

align 4
off_83F64C dd offset loc_83F16F	; jump table for switch	statement
dd offset loc_83F19E
dd offset loc_83F1C7
dd offset loc_83F208
off_83F65C dd offset loc_83F3E0	; jump table for switch	statement
dd offset loc_83F478
dd offset loc_83F4E5
dd offset loc_83F57D
align 10h



sub_83F670 proc	near

var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 18h
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
xor	edi, edi
cmp	[esi+14h], edi
jbe	loc_83F9DF
mov	eax, [esi+8]
xor	ecx, ecx
mov	[esp+28h+var_10], edi
cmp	cx, [eax+0BAh]
jnb	loc_83F7DD
lea	ebx, [ebx+0]

loc_83F6A0:
push	70h
call	sub_11110D0
add	esp, 4
test	eax, eax
jz	short loc_83F6D5
mov	edx, [esi+10h]
push	28h
lea	ecx, [edx+edx]
push	ecx
mov	ecx, [esi+10h]
push	50h
add	edx, edx
add	edx, edx
push	edx
push	14h
push	ecx
push	1
push	1
push	1
mov	ecx, eax
call	sub_1135E60
mov	edi, eax
jmp	short loc_83F6D7

loc_83F6D5:
xor	edi, edi

loc_83F6D7:
push	0D4h
call	sub_11110D0
add	esp, 4
test	eax, eax
jz	short loc_83F6F4
push	edi
mov	ecx, eax
call	sub_1136790
mov	edi, eax
jmp	short loc_83F6F6

loc_83F6F4:
xor	edi, edi

loc_83F6F6:
mov	[esp+28h+var_14], edi
test	edi, edi
jz	short loc_83F708
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedIncrement

loc_83F708:
movzx	ebx, word ptr [esi+5Ah]
movzx	eax, word ptr [esi+58h]
lea	ebp, [esi+50h]
cmp	ebx, eax
jb	short loc_83F725
movzx	ecx, word ptr [ebp+0Eh]
add	ecx, ebx
push	ecx
mov	ecx, ebp
call	sub_479D10

loc_83F725:
lea	edx, [esp+28h+var_14]
push	edx
push	ebx
mov	ecx, ebp
call	sub_479F90
test	edi, edi
jz	short loc_83F74D
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_83F74D
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_83F74D:
push	38h
call	sub_11110D0
add	esp, 4
test	eax, eax
jz	short loc_83F766
mov	ecx, eax
call	sub_1164CC0
mov	edi, eax
jmp	short loc_83F768

loc_83F766:
xor	edi, edi

loc_83F768:
mov	ebx, [esp+28h+var_10]
mov	edx, [esi+8]
mov	eax, [edx+0B4h]
movzx	ecx, bl
mov	ecx, [eax+ecx*4]
push	ecx
mov	ecx, edi
call	sub_428150
mov	edx, [esi+54h]
mov	ebp, [edx+ebx*4]
mov	[esp+28h+var_10], edi
test	edi, edi
jz	short loc_83F79B
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_83F79B:
lea	ecx, [esp+28h+var_10]
push	ecx
lea	ecx, [ebp+94h]
call	sub_41EB10
test	edi, edi
jz	short loc_83F7C6
lea	edx, [edi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_83F7C6
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_83F7C6:
mov	eax, [esi+8]
movzx	ecx, word ptr [eax+0BAh]
inc	ebx
mov	[esp+28h+var_10], ebx
cmp	ebx, ecx
jb	loc_83F6A0

loc_83F7DD:
push	1Ch
call	sub_11110D0
mov	edi, eax
add	esp, 4
test	edi, edi
jz	short loc_83F80F
mov	ecx, edi
call	sub_123E7B0
mov	edx, 0ECh
mov	ebp, edi
mov	dword ptr [edi], offset	off_15FBDA4
mov	[edi+18h], dx
mov	byte ptr [edi+1Ah], 0
mov	[esp+28h+var_18], ebp
jmp	short loc_83F81B

loc_83F80F:
mov	[esp+28h+var_18], 0
mov	ebp, [esp+28h+var_18]

loc_83F81B:
mov	ax, [ebp+18h]
mov	ecx, 0FEEDh
and	ax, cx
mov	edx, 0EDh
or	ax, dx
push	1Ch
mov	[ebp+18h], ax
call	sub_11110D0
mov	edi, eax
add	esp, 4
test	edi, edi
jz	short loc_83F861
mov	ecx, edi
call	sub_123E7B0
mov	eax, 8
mov	ebx, edi
mov	dword ptr [edi], offset	off_15FBE54
mov	[edi+18h], ax
mov	[esp+28h+var_14], ebx
jmp	short loc_83F86D

loc_83F861:
mov	[esp+28h+var_14], 0
mov	ebx, [esp+28h+var_14]

loc_83F86D:
mov	cx, [ebx+18h]
mov	edx, 0FFDFh
and	cx, dx
or	cx, 18h
push	1Ch
mov	[ebx+18h], cx
call	sub_11110D0
mov	edi, eax
add	esp, 4
test	edi, edi
jz	short loc_83F8AF
mov	ecx, edi
call	sub_123E7B0
mov	eax, 0Fh
mov	[edi+18h], ax
mov	eax, edi
mov	dword ptr [edi], offset	off_1550808
mov	[esp+28h+var_10], eax
jmp	short loc_83F8BB

loc_83F8AF:
mov	[esp+28h+var_10], 0
mov	eax, [esp+28h+var_10]

loc_83F8BB:
mov	cx, [eax+18h]
mov	edx, 0FFCCh
and	cx, dx
or	cx, 0Ch
mov	[eax+18h], cx
mov	ecx, [esi+8]
xor	edx, edx
xor	edi, edi
cmp	dx, [ecx+0BAh]
jnb	loc_83FA10
mov	[esp+28h+var_C], ebp
mov	[esp+28h+var_8], ebx
mov	[esp+28h+var_4], eax
jmp	short loc_83F8F5

loc_83F8F1:
mov	ebp, [esp+28h+var_18]

loc_83F8F5:
mov	eax, [esi+54h]
mov	ebx, [eax+edi*4]
lea	eax, [ebp+4]
mov	ebp, ds:InterlockedIncrement
push	eax		; lpAddend
call	ebp ; InterlockedIncrement
lea	ecx, [esp+28h+var_C]
push	ecx
lea	ecx, [ebx+94h]
call	sub_41EB10
mov	eax, [esp+28h+var_18]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_83F934
mov	ecx, [esp+28h+var_18]
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax

loc_83F934:
mov	eax, [esp+28h+var_14]
mov	ecx, [esi+54h]
mov	ebx, [ecx+edi*4]
add	eax, 4
push	eax		; lpAddend
call	ebp ; InterlockedIncrement
lea	edx, [esp+28h+var_8]
push	edx
lea	ecx, [ebx+94h]
call	sub_41EB10
mov	eax, [esp+28h+var_14]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_83F971
mov	ecx, [esp+28h+var_14]
mov	eax, [ecx]
mov	edx, [eax+4]
call	edx

loc_83F971:
mov	eax, [esi+54h]
mov	ebx, [eax+edi*4]
mov	eax, [esp+28h+var_10]
add	eax, 4
push	eax		; lpAddend
call	ebp ; InterlockedIncrement
lea	ecx, [esp+28h+var_4]
push	ecx
lea	ecx, [ebx+94h]
call	sub_41EB10
mov	eax, [esp+28h+var_10]
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_83F9AE
mov	ecx, [esp+28h+var_10]
mov	edx, [ecx]
mov	eax, [edx+4]
call	eax

loc_83F9AE:
mov	ecx, [esi+54h]
mov	ecx, [ecx+edi*4]
call	sub_11678F0
mov	edx, [esi+54h]
mov	ecx, [edx+edi*4]
call	sub_1167270
mov	eax, [esi+8]
movzx	ecx, word ptr [eax+0BAh]
inc	edi
cmp	edi, ecx
jb	loc_83F8F1
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn

loc_83F9DF:
mov	edx, [esi+8]
xor	eax, eax
cmp	ax, [edx+0BAh]
jnb	short loc_83FA10
mov	[esp+28h+var_4], edi
lea	ebx, [esi+50h]

loc_83F9F4:
lea	ecx, [esp+28h+var_4]
push	ecx
push	edi
mov	ecx, ebx
call	sub_479F90
mov	edx, [esi+8]
movzx	eax, word ptr [edx+0BAh]
inc	edi
cmp	edi, eax
jb	short loc_83F9F4

loc_83FA10:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 18h
retn
sub_83F670 endp

align 10h



; int __stdcall	sub_83FA20(int,	int, int, wchar_t *Src,	int, __int16, __int16, char, __int16, int)
sub_83FA20 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
Src= dword ptr	10h
arg_10=	dword ptr  14h
arg_14=	word ptr  18h
arg_18=	word ptr  1Ch
arg_1C=	byte ptr  20h
arg_20=	word ptr  24h
arg_24=	dword ptr  28h

mov	eax, dword ptr [esp+arg_1C]
mov	edx, [esp+Src]
push	esi
push	eax		; char
mov	eax, [esp+8+arg_8]
mov	esi, ecx
mov	ecx, [esp+8+arg_10]
push	ecx		; int
mov	ecx, [esp+0Ch+arg_4]
push	edx		; Src
mov	edx, [esp+10h+arg_0]
push	eax		; int
push	ecx		; int
push	edx		; int
mov	ecx, esi
call	sub_842000
mov	dword ptr [esi], offset	off_1469FC4
xor	eax, eax
mov	[esi+58h], ax
mov	ecx, 1
mov	[esi+5Eh], cx
mov	cx, [esp+4+arg_20]
xor	edx, edx
mov	[esi+5Ch], ax
mov	[esi+54h], eax
mov	ax, [esp+4+arg_14]
mov	[esi+5Ah], dx
mov	edx, [esp+4+arg_24]
mov	dword ptr [esi+50h], offset off_156AE9C
mov	[esi+48h], cx
mov	cx, [esp+4+arg_18]
mov	[esi+60h], edx
cmp	[esi+4Ah], ax
jnz	short loc_83FA97
cmp	[esi+4Ch], cx
jz	short loc_83FAA3

loc_83FA97:
mov	[esi+4Ah], ax
mov	[esi+4Ch], cx
mov	byte ptr [esi+44h], 1

loc_83FAA3:
mov	ecx, esi
call	sub_83F670
mov	eax, esi
pop	esi
retn	28h
sub_83FA20 endp

mov	eax, [esp+20h]
mov	edx, [esp+10h]
push	esi
push	eax
mov	eax, [esp+14h]
mov	esi, ecx
mov	ecx, [esp+1Ch]
push	ecx
mov	ecx, [esp+14h]
push	edx
mov	edx, [esp+14h]
push	eax
push	ecx
push	edx
mov	ecx, esi
call	sub_841F50
mov	dword ptr [esi], offset	off_1469FC4
xor	eax, eax
mov	[esi+58h], ax
mov	ecx, 1
mov	[esi+5Eh], cx
mov	cx, [esp+28h]
xor	edx, edx
mov	[esi+5Ch], ax
mov	[esi+54h], eax
mov	ax, [esp+1Ch]
mov	[esi+5Ah], dx
mov	edx, [esp+2Ch]
mov	dword ptr [esi+50h], offset off_156AE9C
mov	[esi+48h], cx
mov	cx, [esp+20h]
mov	[esi+60h], edx
cmp	[esi+4Ah], ax
jnz	short loc_83FB27
cmp	[esi+4Ch], cx
jz	short loc_83FB33

loc_83FB27:
mov	[esi+4Ah], ax
mov	[esi+4Ch], cx
mov	byte ptr [esi+44h], 1

loc_83FB33:
mov	ecx, esi
call	sub_83F670
mov	eax, esi
pop	esi
retn	28h



sub_83FB40 proc	near

arg_0= dword ptr  4

push	esi
push	edi
mov	edi, ecx
mov	eax, [edi+54h]
cmp	dword ptr [eax], 0
jnz	short loc_83FB53
call	sub_83F670
jmp	short loc_83FB5E

loc_83FB53:
cmp	byte ptr [edi+44h], 0
jz	short loc_83FB5E
call	sub_83EF80

loc_83FB5E:
xor	ecx, ecx
xor	esi, esi
cmp	cx, [edi+5Ch]
jnb	short loc_83FB86
push	ebx
mov	ebx, [esp+0Ch+arg_0]
lea	ecx, [ecx+0]

loc_83FB70:
mov	edx, [edi+54h]
mov	ecx, [edx+esi*4]
push	ebx
call	sub_1136740
movzx	eax, word ptr [edi+5Ch]
inc	esi
cmp	esi, eax
jb	short loc_83FB70
pop	ebx

loc_83FB86:
pop	edi
pop	esi
retn	4
sub_83FB40 endp

align 10h



sub_83FB90 proc	near

arg_0= word ptr	 4

mov	ecx, [ecx+0A4h]
push	esi
mov	si, [esp+4+arg_0]
movzx	eax, si
xor	edx, edx
div	dword ptr [ecx+4]
mov	eax, [ecx+8]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_83FBBC
mov	edi, edi

loc_83FBB0:
cmp	si, [edx+4]
jz	short loc_83FBC2
mov	edx, [edx]
test	edx, edx
jnz	short loc_83FBB0

loc_83FBBC:
xor	eax, eax
pop	esi
retn	4

loc_83FBC2:
movzx	eax, word ptr [edx+6]
pop	esi
retn	4
sub_83FB90 endp

align 10h



sub_83FBD0 proc	near

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
var_44=	dword ptr -44h
var_40=	dword ptr -40h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= word ptr	 10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch
arg_1C=	dword ptr  20h
arg_20=	dword ptr  24h

mov	eax, [esp+arg_0]
sub	esp, 30h
push	ebx
push	esi
push	edi
mov	edi, ecx
mov	ecx, [edi+8]
test	ax, ax
jz	short loc_83FBFC
mov	esi, [ecx+0A8h]
test	esi, esi
jz	short loc_83FBFC
push	eax
call	sub_83FB90
movzx	eax, ax
mov	al, [eax+esi]
jmp	short loc_83FBFE

loc_83FBFC:
xor	al, al

loc_83FBFE:
mov	ecx, [edi+54h]
movzx	esi, al
add	esi, esi
push	0		; Src
add	esi, esi
mov	edx, [ecx+esi]
mov	ecx, [edx+0B4h]
push	0		; int
push	4		; int
call	sub_1135610
mov	ebx, eax
movsx	eax, word ptr [esp+3Ch+arg_10]
mov	[esp+3Ch+arg_10], eax
mov	eax, [esp+3Ch+arg_18]
movsx	ecx, [esp+3Ch+arg_C]
fild	[esp+3Ch+arg_10]
sub	esp, 10h
fdiv	dword ptr [eax]
mov	edx, [esp+4Ch+arg_8]
movsx	edx, word ptr [edx]
fstp	[esp+4Ch+arg_10]
fld	[esp+4Ch+arg_10]
fstp	[esp+4Ch+var_40]
mov	[esp+4Ch+arg_10], ecx
fild	[esp+4Ch+arg_10]
mov	ecx, [esp+4Ch+arg_14]
fdiv	dword ptr [ecx]
fstp	[esp+4Ch+arg_10]
fld	[esp+4Ch+arg_10]
fstp	[esp+4Ch+var_44]
mov	[esp+4Ch+arg_10], edx
fild	[esp+4Ch+arg_10]
fdiv	dword ptr [eax]
mov	eax, [esp+4Ch+arg_4]
movsx	edx, word ptr [eax]
mov	eax, [edi+54h]
fstp	[esp+4Ch+arg_10]
fld	[esp+4Ch+arg_10]
fstp	[esp+4Ch+var_48]
mov	[esp+4Ch+arg_10], edx
fild	[esp+4Ch+arg_10]
fdiv	dword ptr [ecx]
mov	ecx, [eax+esi]
mov	ecx, [ecx+0B4h]
fstp	[esp+4Ch+arg_10]
fld	[esp+4Ch+arg_10]
fstp	[esp+4Ch+var_4C]
push	ebx		; int
call	sub_1135390
fld	dword_17EE114
fchs
lea	edx, [esp+3Ch+var_30]
fstp	[esp+3Ch+arg_10]
push	edx
fld	[esp+40h+arg_10]
lea	eax, [esp+40h+var_24]
fst	[esp+40h+var_30]
push	eax
fld	dword_17EE118
lea	ecx, [esp+44h+var_18]
fchs
push	ecx
fstp	[esp+48h+arg_10]
lea	edx, [esp+48h+var_C]
fld	[esp+48h+arg_10]
fst	[esp+48h+var_2C]
fld	dword_17EE11C
fchs
fstp	[esp+48h+arg_10]
fld	[esp+48h+arg_10]
fst	[esp+48h+var_28]
fst	[esp+48h+var_1C]
fst	[esp+48h+var_10]
fstp	[esp+48h+var_4]
fxch	st(1)
fst	[esp+48h+var_24]
fst	[esp+48h+var_18]
fstp	[esp+48h+var_C]
fst	[esp+48h+var_20]
fst	[esp+48h+var_14]
fstp	[esp+48h+var_8]
mov	eax, [edi+54h]
mov	ecx, [eax+esi]
mov	ecx, [ecx+0B4h]
push	edx
push	ebx
call	sub_11352D0
mov	eax, [esp+3Ch+arg_1C]
mov	edx, [edi+54h]
push	eax
push	eax
push	eax
push	eax
mov	eax, [edx+esi]
mov	ecx, [eax+0B4h]
push	ebx
call	sub_1135200
mov	eax, [esp+3Ch+arg_20]
fld	dword ptr [eax+0Ch]
mov	ecx, [edi+54h]
mov	edx, [ecx+esi]
mov	ecx, [edx+0B4h]
sub	esp, 10h
fstp	[esp+4Ch+var_40]
fld	dword ptr [eax+8]
fstp	[esp+4Ch+var_44]
fld	dword ptr [eax+4]
fstp	[esp+4Ch+var_48]
fld	dword ptr [eax]
fstp	[esp+4Ch+var_4C]
push	0		; int
push	ebx		; int
call	sub_11354F0
pop	edi
pop	esi
pop	ebx
add	esp, 30h
retn	24h
sub_83FBD0 endp

align 10h



sub_83FD90 proc	near
mov	eax, offset unk_185A498
retn
sub_83FD90 endp

align 10h



sub_83FDA0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_1469FC4
mov	eax, [esi+54h]
push	eax
mov	dword ptr [esi+50h], offset off_156AE9C
call	sub_470A20
add	esp, 4
mov	ecx, esi
call	sub_841C50
test	[esp+4+arg_0], 1
jz	short loc_83FDD5
push	64h
push	esi
call	sub_1111040
add	esp, 8

loc_83FDD5:
mov	eax, esi
pop	esi
retn	4
sub_83FDA0 endp

align 10h
mov	edx, [esp+4]
mov	al, [edx]
mov	ecx, offset unk_1859288
test	al, al
jz	short loc_83FDFF
nop

loc_83FDF0:
cbw
inc	edx
mov	[ecx], ax
mov	al, [edx]
add	ecx, 2
test	al, al
jnz	short loc_83FDF0

loc_83FDFF:
xor	edx, edx
mov	[ecx], dx
mov	eax, offset unk_1859288
retn
align 10h



sub_83FE10 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

mov	edx, [esp+arg_0]
mov	al, [edx]
mov	ecx, [esp+arg_8]
push	esi
xor	esi, esi
test	al, al
jz	short loc_83FE57
push	ebx
mov	ebx, [esp+8+arg_C]
push	edi
mov	edi, [esp+0Ch+arg_4]
push	ebp
lea	esp, [esp+0]

loc_83FE30:
mov	ebp, edi
dec	edi
test	ebp, ebp
jbe	short loc_83FE4D
mov	ebp, esi
inc	esi
cmp	ebp, ebx
jnb	short loc_83FE5E
cbw
inc	edx
mov	[ecx], ax
mov	al, [edx]
add	ecx, 2
test	al, al
jnz	short loc_83FE30

loc_83FE4D:
pop	ebp
pop	edi
xor	edx, edx
pop	ebx
mov	[ecx], dx
pop	esi
retn

loc_83FE57:
xor	eax, eax
mov	[ecx], ax
pop	esi
retn

loc_83FE5E:
pop	ebp
pop	edi
xor	eax, eax
pop	ebx
mov	[ecx], ax
pop	esi
retn
sub_83FE10 endp

align 10h



sub_83FE70 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h

movzx	eax, [esp+arg_14]
push	esi
mov	esi, ecx
cmp	eax, 3		; switch 4 cases
ja	loc_83FF15	; default
jmp	ds:off_83FF1C[eax*4] ; switch jump

loc_83FE88:		; jumptable 0083FE81 cases 0,1
mov	eax, [esp+4+arg_0]
cmp	ax, 0Ah
jnz	short loc_83FEAD
mov	ecx, [esp+4+arg_4]
xor	eax, eax
mov	[ecx], ax
mov	dx, [esi+90h]
mov	eax, [esp+4+arg_10]
add	[eax], dx
pop	esi
retn	18h

loc_83FEAD:
push	eax
call	sub_83FB90
mov	ecx, [esi+0ACh]
movzx	eax, ax
mov	dx, [ecx+eax*8+4]
sub	dx, [ecx+eax*8]
lea	eax, [ecx+eax*8]
mov	eax, [esp+4+arg_4]
add	[eax], dx
mov	ecx, [esp+4+arg_C]
jmp	short loc_83FF0A

loc_83FED5:		; jumptable 0083FE81 cases 2,3
cmp	word ptr [esp+4+arg_0],	0Ah
jnz	short loc_83FEF8
mov	ecx, [esp+4+arg_8]
xor	eax, eax
mov	[ecx], ax
mov	dx, [esi+90h]
mov	eax, [esp+4+arg_C]
add	[eax], dx
pop	esi
retn	18h

loc_83FEF8:
mov	cx, [esi+90h]
mov	eax, [esp+4+arg_8]
add	[eax], cx
mov	ecx, [esp+4+arg_10]

loc_83FF0A:
movzx	eax, word ptr [eax]
cmp	ax, [ecx]
jbe	short loc_83FF15 ; default
mov	[ecx], ax

loc_83FF15:		; default
pop	esi
retn	18h
sub_83FE70 endp

align 4
off_83FF1C dd offset loc_83FE88	; jump table for switch	statement
dd offset loc_83FE88
dd offset loc_83FED5
dd offset loc_83FED5
align 10h
sub	esp, 0Ch
push	esi
mov	esi, [esp+14h]
xor	eax, eax
push	edi
mov	edi, ecx
cmp	esi, eax
jz	loc_83FFD9
push	ebx
mov	ebx, [esp+28h]
mov	[esp+14h], eax
mov	[esp+10h], eax
mov	[esp+1Ch], eax
mov	[esp+0Ch], eax
movzx	eax, bl
cmp	eax, 3		; switch 4 cases
ja	short loc_83FF81 ; default
jmp	ds:off_83FFE4[eax*4] ; switch jump

loc_83FF69:		; jumptable 0083FF62 cases 0,1
movzx	eax, word ptr [edi+90h]
mov	[esp+0Ch], eax
jmp	short loc_83FF81 ; default

loc_83FF76:		; jumptable 0083FF62 cases 2,3
movzx	ecx, word ptr [edi+90h]
mov	[esp+1Ch], ecx

loc_83FF81:		; default
mov	al, [esi]
test	al, al
jz	short loc_83FFB2

loc_83FF87:
push	ebx
lea	edx, [esp+10h]
push	edx
lea	ecx, [esp+24h]
push	ecx
lea	edx, [esp+1Ch]
push	edx
movsx	dx, al
lea	ecx, [esp+24h]
movzx	eax, dx
push	ecx
push	eax
mov	ecx, edi
inc	esi
call	sub_83FE70
mov	al, [esi]
test	al, al
jnz	short loc_83FF87

loc_83FFB2:
movzx	ecx, word ptr [esp+1Ch]
movzx	eax, word ptr [esp+0Ch]
mov	edx, [esp+20h]
mov	[esp+1Ch], ecx
mov	ecx, [esp+24h]
fild	dword ptr [esp+1Ch]
mov	[esp+1Ch], eax
pop	ebx
fstp	dword ptr [edx]
fild	dword ptr [esp+18h]
fstp	dword ptr [ecx]

loc_83FFD9:
pop	edi
pop	esi
add	esp, 0Ch
retn	10h
align 4
off_83FFE4 dd offset loc_83FF69	; jump table for switch	statement
dd offset loc_83FF69
dd offset loc_83FF76
dd offset loc_83FF76
align 10h



sub_840000 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
xor	ebp, ebp
push	edi
mov	edi, ecx
cmp	esi, ebp
jz	loc_8400B2
push	ebx
mov	ebx, [esp+1Ch+arg_C]
movzx	eax, bl
mov	[esp+1Ch+var_4], ebp
mov	[esp+1Ch+var_8], ebp
mov	[esp+1Ch+arg_0], ebp
mov	[esp+1Ch+var_C], ebp
cmp	eax, 3		; switch 4 cases
ja	short loc_840052 ; default
jmp	ds:off_8400BC[eax*4] ; switch jump

loc_84003A:		; jumptable 00840033 cases 0,1
movzx	eax, word ptr [edi+90h]
mov	[esp+1Ch+var_C], eax
jmp	short loc_840052 ; default

loc_840047:		; jumptable 00840033 cases 2,3
movzx	ecx, word ptr [edi+90h]
mov	[esp+1Ch+arg_0], ecx

loc_840052:		; default
movzx	eax, word ptr [esi]
cmp	ax, bp
jz	short loc_84008B
lea	ebx, [ebx+0]

loc_840060:
push	ebx
lea	edx, [esp+20h+var_C]
push	edx
lea	ecx, [esp+24h+arg_0]
push	ecx
lea	edx, [esp+28h+var_8]
push	edx
movzx	eax, ax
lea	ecx, [esp+2Ch+var_4]
push	ecx
push	eax
mov	ecx, edi
add	esi, 2
call	sub_83FE70
movzx	eax, word ptr [esi]
cmp	ax, bp
jnz	short loc_840060

loc_84008B:
movzx	edx, word ptr [esp+1Ch+arg_0]
movzx	ecx, word ptr [esp+1Ch+var_C]
mov	eax, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_0], edx
mov	edx, [esp+1Ch+arg_8]
fild	[esp+1Ch+arg_0]
mov	[esp+1Ch+arg_0], ecx
pop	ebx
fstp	dword ptr [eax]
fild	[esp+18h+arg_0]
fstp	dword ptr [edx]

loc_8400B2:
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	10h
sub_840000 endp

align 4
off_8400BC dd offset loc_84003A	; jump table for switch	statement
dd offset loc_84003A
dd offset loc_840047
dd offset loc_840047
align 10h
sub	esp, 0Ch
push	esi
mov	esi, [esp+14h]
xor	eax, eax
push	edi
mov	edi, ecx
cmp	esi, eax
jz	loc_84017D
push	ebx
mov	ebx, [esp+28h]
mov	[esp+14h], eax
mov	[esp+10h], eax
mov	[esp+1Ch], eax
mov	[esp+0Ch], eax
movzx	eax, bl
cmp	eax, 3		; switch 4 cases
ja	short loc_840121 ; default
jmp	ds:off_840188[eax*4] ; switch jump

loc_840109:		; jumptable 00840102 cases 0,1
movzx	eax, word ptr [edi+90h]
mov	[esp+0Ch], eax
jmp	short loc_840121 ; default

loc_840116:		; jumptable 00840102 cases 2,3
movzx	ecx, word ptr [edi+90h]
mov	[esp+1Ch], ecx

loc_840121:		; default
mov	al, [esi]
test	al, al
jz	short loc_840156

loc_840127:
inc	esi
cmp	al, 0Ah
jz	short loc_840156
push	ebx
lea	edx, [esp+10h]
push	edx
lea	ecx, [esp+24h]
push	ecx
lea	edx, [esp+1Ch]
push	edx
movsx	dx, al
lea	ecx, [esp+24h]
movzx	eax, dx
push	ecx
push	eax
mov	ecx, edi
call	sub_83FE70
mov	al, [esi]
test	al, al
jnz	short loc_840127

loc_840156:
movzx	ecx, word ptr [esp+1Ch]
movzx	eax, word ptr [esp+0Ch]
mov	edx, [esp+20h]
mov	[esp+1Ch], ecx
mov	ecx, [esp+24h]
fild	dword ptr [esp+1Ch]
mov	[esp+1Ch], eax
pop	ebx
fstp	dword ptr [edx]
fild	dword ptr [esp+18h]
fstp	dword ptr [ecx]

loc_84017D:
pop	edi
pop	esi
add	esp, 0Ch
retn	10h
align 4
off_840188 dd offset loc_840109	; jump table for switch	statement
dd offset loc_840109
dd offset loc_840116
dd offset loc_840116
align 10h



sub_8401A0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h

sub	esp, 0Ch
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
xor	ebp, ebp
push	edi
mov	edi, ecx
cmp	esi, ebp
jz	loc_840258
push	ebx
mov	ebx, [esp+1Ch+arg_C]
movzx	eax, bl
mov	[esp+1Ch+var_4], ebp
mov	[esp+1Ch+var_8], ebp
mov	[esp+1Ch+arg_0], ebp
mov	[esp+1Ch+var_C], ebp
cmp	eax, 3		; switch 4 cases
ja	short loc_8401F2 ; default
jmp	ds:off_840264[eax*4] ; switch jump

loc_8401DA:		; jumptable 008401D3 cases 0,1
movzx	eax, word ptr [edi+90h]
mov	[esp+1Ch+var_C], eax
jmp	short loc_8401F2 ; default

loc_8401E7:		; jumptable 008401D3 cases 2,3
movzx	ecx, word ptr [edi+90h]
mov	[esp+1Ch+arg_0], ecx

loc_8401F2:		; default
movzx	eax, word ptr [esi]
cmp	ax, bp
jz	short loc_840231
lea	ebx, [ebx+0]

loc_840200:
movzx	eax, ax
add	esi, 2
cmp	ax, 0Ah
jz	short loc_840231
push	ebx
lea	edx, [esp+20h+var_C]
push	edx
lea	ecx, [esp+24h+arg_0]
push	ecx
lea	edx, [esp+28h+var_8]
push	edx
lea	ecx, [esp+2Ch+var_4]
push	ecx
push	eax
mov	ecx, edi
call	sub_83FE70
movzx	eax, word ptr [esi]
cmp	ax, bp
jnz	short loc_840200

loc_840231:
movzx	edx, word ptr [esp+1Ch+arg_0]
movzx	ecx, word ptr [esp+1Ch+var_C]
mov	eax, [esp+1Ch+arg_4]
mov	[esp+1Ch+arg_0], edx
mov	edx, [esp+1Ch+arg_8]
fild	[esp+1Ch+arg_0]
mov	[esp+1Ch+arg_0], ecx
pop	ebx
fstp	dword ptr [eax]
fild	[esp+18h+arg_0]
fstp	dword ptr [edx]

loc_840258:
pop	edi
pop	esi
pop	ebp
add	esp, 0Ch
retn	10h
sub_8401A0 endp

align 4
off_840264 dd offset loc_8401DA	; jump table for switch	statement
dd offset loc_8401DA
dd offset loc_8401E7
dd offset loc_8401E7
align 10h
sub	esp, 0Ch
push	ebp
push	esi
mov	esi, [esp+18h]
mov	ebp, ecx
xor	ecx, ecx
cmp	esi, ecx
jz	loc_840338
push	ebx
mov	ebx, [esp+2Ch]
movzx	eax, bl
mov	[esp+14h], ecx
mov	[esp+10h], ecx
mov	[esp+1Ch], ecx
mov	[esp+0Ch], ecx
cmp	eax, 3		; switch 4 cases
ja	short loc_8402D1 ; default
jmp	ds:off_840340[eax*4] ; switch jump

loc_8402B9:		; jumptable 008402B2 cases 0,1
movzx	eax, word ptr [ebp+90h]
mov	[esp+0Ch], eax
jmp	short loc_8402D1 ; default

loc_8402C6:		; jumptable 008402B2 cases 2,3
movzx	edx, word ptr [ebp+90h]
mov	[esp+1Ch], edx

loc_8402D1:		; default
mov	al, [esi]
test	al, al
jz	short loc_840311
push	edi
mov	edi, [esp+24h]
jmp	short loc_8402E2
align 10h

loc_8402E0:
xor	ecx, ecx

loc_8402E2:
cmp	edi, ecx
jz	short loc_840310
push	ebx
lea	ecx, [esp+14h]
push	ecx
lea	edx, [esp+28h]
push	edx
cbw
lea	ecx, [esp+20h]
push	ecx
movzx	ecx, ax
lea	edx, [esp+28h]
push	edx
push	ecx
mov	ecx, ebp
inc	esi
call	sub_83FE70
mov	al, [esi]
dec	edi
test	al, al
jnz	short loc_8402E0

loc_840310:
pop	edi

loc_840311:
movzx	edx, word ptr [esp+1Ch]
movzx	ecx, word ptr [esp+0Ch]
mov	eax, [esp+24h]
mov	[esp+1Ch], edx
mov	edx, [esp+28h]
fild	dword ptr [esp+1Ch]
mov	[esp+1Ch], ecx
pop	ebx
fstp	dword ptr [eax]
fild	dword ptr [esp+18h]
fstp	dword ptr [edx]

loc_840338:
pop	esi
pop	ebp
add	esp, 0Ch
retn	14h
off_840340 dd offset loc_8402B9	; jump table for switch	statement
dd offset loc_8402B9
dd offset loc_8402C6
dd offset loc_8402C6
sub	esp, 0Ch
push	ebp
push	esi
mov	esi, [esp+18h]
mov	ebp, ecx
xor	ecx, ecx
cmp	esi, ecx
jz	loc_84040A
push	ebx
mov	ebx, [esp+2Ch]
movzx	eax, bl
mov	[esp+14h], ecx
mov	[esp+10h], ecx
mov	[esp+1Ch], ecx
mov	[esp+0Ch], ecx
cmp	eax, 3		; switch 4 cases
ja	short loc_8403A1 ; default
jmp	ds:off_840414[eax*4] ; switch jump

loc_840389:		; jumptable 00840382 cases 0,1
movzx	eax, word ptr [ebp+90h]
mov	[esp+0Ch], eax
jmp	short loc_8403A1 ; default

loc_840396:		; jumptable 00840382 cases 2,3
movzx	edx, word ptr [ebp+90h]
mov	[esp+1Ch], edx

loc_8403A1:		; default
movzx	eax, word ptr [esi]
cmp	ax, cx
jz	short loc_8403E3
push	edi
mov	edi, [esp+24h]
jmp	short loc_8403B2

loc_8403B0:
xor	ecx, ecx

loc_8403B2:
cmp	edi, ecx
jz	short loc_8403E2
push	ebx
lea	ecx, [esp+14h]
push	ecx
lea	edx, [esp+28h]
push	edx
lea	ecx, [esp+20h]
push	ecx
movzx	eax, ax
lea	edx, [esp+28h]
push	edx
push	eax
mov	ecx, ebp
add	esi, 2
call	sub_83FE70
movzx	eax, word ptr [esi]
dec	edi
test	ax, ax
jnz	short loc_8403B0

loc_8403E2:
pop	edi

loc_8403E3:
movzx	eax, word ptr [esp+1Ch]
movzx	edx, word ptr [esp+0Ch]
mov	ecx, [esp+24h]
mov	[esp+1Ch], eax
mov	eax, [esp+28h]
fild	dword ptr [esp+1Ch]
mov	[esp+1Ch], edx
pop	ebx
fstp	dword ptr [ecx]
fild	dword ptr [esp+18h]
fstp	dword ptr [eax]

loc_84040A:
pop	esi
pop	ebp
add	esp, 0Ch
retn	14h
align 4
off_840414 dd offset loc_840389	; jump table for switch	statement
dd offset loc_840389
dd offset loc_840396
dd offset loc_840396
align 10h
movsx	ax, byte ptr [esp+4]
push	esi
mov	esi, [ecx+0A4h]
push	edi
movzx	edi, ax
movzx	eax, di
xor	edx, edx
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_84045F

loc_840453:
cmp	di, [edx+4]
jz	short loc_840463
mov	edx, [edx]
test	edx, edx
jnz	short loc_840453

loc_84045F:
xor	eax, eax
jmp	short loc_84046A

loc_840463:
movzx	eax, word ptr [edx+6]
movzx	eax, ax

loc_84046A:
movzx	edx, ax
mov	eax, [ecx+0ACh]
movzx	ecx, word ptr [eax+edx*8+6]
lea	eax, [eax+edx*8]
movzx	edx, word ptr [eax+2]
sub	ecx, edx
mov	[esp+0Ch], ecx
mov	ecx, [esp+14h]
pop	edi
fild	dword ptr [esp+8]
pop	esi
fstp	dword ptr [ecx]
movzx	edx, word ptr [eax+4]
movzx	eax, word ptr [eax]
mov	ecx, [esp+8]
sub	edx, eax
mov	[esp+4], edx
fild	dword ptr [esp+4]
fstp	dword ptr [ecx]
retn	0Ch
align 10h
push	esi
mov	esi, [ecx+0A4h]
push	edi
mov	di, [esp+0Ch]
movzx	eax, di
xor	edx, edx
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	edx, [eax+edx*4]
test	edx, edx
jz	short loc_8404DC
nop

loc_8404D0:
cmp	di, [edx+4]
jz	short loc_8404E0
mov	edx, [edx]
test	edx, edx
jnz	short loc_8404D0

loc_8404DC:
xor	eax, eax
jmp	short loc_8404E7

loc_8404E0:
movzx	eax, word ptr [edx+6]
movzx	eax, ax

loc_8404E7:
movzx	edx, ax
mov	eax, [ecx+0ACh]
movzx	ecx, word ptr [eax+edx*8+6]
lea	eax, [eax+edx*8]
movzx	edx, word ptr [eax+2]
sub	ecx, edx
mov	[esp+0Ch], ecx
mov	ecx, [esp+14h]
pop	edi
fild	dword ptr [esp+8]
pop	esi
fstp	dword ptr [ecx]
movzx	edx, word ptr [eax+4]
movzx	eax, word ptr [eax]
mov	ecx, [esp+8]
sub	edx, eax
mov	[esp+4], edx
fild	dword ptr [esp+4]
fstp	dword ptr [ecx]
retn	0Ch
align 10h



sub_840530 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

push	ecx
push	ebx
mov	ebx, [esp+8+arg_4]
push	esi
mov	esi, ecx
test	ebx, ebx
jz	loc_84061C
mov	eax, [esp+0Ch+arg_0]
push	ebp
push	edi
push	eax
call	sub_83FB90
mov	ecx, [esi+0A8h]
movzx	ebp, ax
xor	al, al
test	ecx, ecx
jz	short loc_840562
movzx	edx, bp
mov	al, [edx+ecx]

loc_840562:
movzx	edi, al
mov	eax, [esi+0B4h]
add	edi, edi
add	edi, edi
mov	ecx, [edi+eax]
mov	edx, [ecx]
mov	eax, [edx+48h]
call	eax
mov	ecx, [esi+0B4h]
mov	ecx, [edi+ecx]
mov	edx, [ecx]
mov	[esp+14h+arg_4], eax
mov	eax, [edx+4Ch]
call	eax
mov	ecx, [esi+0ACh]
fild	[esp+14h+arg_4]
mov	[esp+14h+var_4], eax
movzx	eax, bp
fstp	[esp+14h+arg_0]
add	eax, eax
add	eax, eax
add	eax, eax
movzx	edx, word ptr [eax+ecx]
mov	[esp+14h+arg_4], edx
pop	edi
pop	ebp
fild	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	dword ptr [ebx]
fild	[esp+0Ch+var_4]
mov	ecx, [esi+0ACh]
movzx	edx, word ptr [eax+ecx+2]
mov	[esp+0Ch+arg_4], edx
fstp	[esp+0Ch+arg_0]
fild	[esp+0Ch+arg_4]
fld	[esp+0Ch+arg_0]
fld	st
fdivp	st(2), st
fxch	st(1)
fstp	dword ptr [ebx+4]
mov	ecx, [esi+0ACh]
movzx	edx, word ptr [eax+ecx+4]
mov	[esp+0Ch+arg_4], edx
fild	[esp+0Ch+arg_4]
fdivrp	st(2), st
fxch	st(1)
fstp	dword ptr [ebx+8]
mov	ecx, [esi+0ACh]
movzx	edx, word ptr [eax+ecx+6]
mov	[esp+0Ch+arg_4], edx
fild	[esp+0Ch+arg_4]
fdivrp	st(1), st
fstp	dword ptr [ebx+0Ch]

loc_84061C:
pop	esi
pop	ebx
pop	ecx
retn	8
sub_840530 endp

align 10h

loc_840630:
push	esi
push	edi
mov	edi, [esp+10h]
mov	esi, ecx
test	edi, edi
jz	short loc_840689
mov	eax, [esp+0Ch]
push	eax
call	sub_83FB90
mov	ecx, [esi+0ACh]
movzx	eax, ax
add	eax, eax
add	eax, eax
add	eax, eax
movzx	edx, word ptr [eax+ecx]
mov	[edi], dx
mov	ecx, [esi+0ACh]
movzx	edx, word ptr [ecx+eax+2]
mov	[edi+2], dx
mov	ecx, [esi+0ACh]
movzx	edx, word ptr [ecx+eax+4]
mov	[edi+4], dx
mov	ecx, [esi+0ACh]
movzx	edx, word ptr [ecx+eax+6]
mov	[edi+6], dx

loc_840689:
pop	edi
pop	esi
retn	8
align 10h



sub_840690 proc	near

var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 14h
cmp	dword ptr [ecx+9Ch], 0
mov	[esp+14h+var_8], ecx
mov	[esp+14h+var_C], 20h
mov	[esp+14h+var_14], 0
jbe	loc_840808
push	ebx
push	ebp
push	esi
mov	esi, [esp+20h+arg_0]
push	edi
mov	ebx, 4

loc_8406C0:
mov	edx, [esi+8]
push	1
lea	eax, [esp+28h+var_4]
push	eax
push	ebx
lea	ecx, [esp+30h+var_10]
push	ecx
push	esi
mov	[esp+38h+var_4], ebx
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	1
lea	eax, [esp+3Ch+var_4]
push	eax
push	ebx
lea	ecx, [esp+44h+arg_0]
push	ecx
push	esi
mov	[esp+4Ch+var_4], ebx
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	1
lea	eax, [esp+50h+var_4]
push	eax
push	ebx
lea	ecx, [esp+58h+var_C]
push	ecx
push	esi
mov	[esp+60h+var_4], ebx
call	edx
add	[esi+4], eax
push	70h
call	sub_11110D0
add	esp, 40h
test	eax, eax
jz	loc_840810
mov	ecx, [esp+24h+arg_0]
mov	edx, [esp+24h+var_10]
push	1
push	1
push	offset unk_17EE450
push	ecx
push	edx
mov	ecx, eax
call	sub_114D150
mov	edi, eax
test	edi, edi
jz	short loc_84074A
lea	eax, [edi+4]
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_84074A:
mov	eax, [esp+24h+arg_0]
imul	eax, [esp+24h+var_10]
imul	eax, [esp+24h+var_C]
mov	ecx, [edi+5Ch]
mov	ecx, [ecx]
add	ecx, [edi+50h]
push	1
lea	edx, [esp+28h+var_4]
push	edx
shr	eax, 3
push	eax
mov	eax, [esi+8]
push	ecx
push	esi
mov	[esp+38h+var_4], 1
call	eax
add	[esi+4], eax
push	offset unk_17EE088
push	edi
call	sub_123F920
mov	ebp, eax
add	esp, 1Ch
mov	[esp+24h+var_4], ebp
test	ebp, ebp
jz	short loc_84079F
lea	ecx, [ebp+4]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_84079F:
mov	eax, [esp+24h+var_14]
mov	ecx, [esp+24h+var_8]
lea	edx, [esp+24h+var_4]
push	edx
push	eax
add	ecx, 0B0h
call	sub_841730
test	ebp, ebp
jz	short loc_8407D4
lea	ecx, [ebp+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_8407D4
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax

loc_8407D4:
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_8407EB
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_8407EB:
mov	eax, [esp+24h+var_14]
mov	ecx, [esp+24h+var_8]
inc	eax
mov	[esp+24h+var_14], eax
cmp	eax, [ecx+9Ch]
jb	loc_8406C0
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_840808:
mov	al, 1
add	esp, 14h
retn	4

loc_840810:
xor	edi, edi
jmp	loc_84074A
sub_840690 endp

align 10h



sub_840820 proc	near

var_A8=	dword ptr -0A8h
var_A4=	dword ptr -0A4h
var_A0=	dword ptr -0A0h
var_9C=	dword ptr -9Ch
var_98=	dword ptr -98h
var_94=	dword ptr -94h
var_90=	dword ptr -90h
var_8C=	dword ptr -8Ch
var_88=	byte ptr -88h
var_84=	byte ptr -84h
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0A8h
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+0A8h+var_4], eax
push	ebp
push	esi
mov	esi, [esp+0B0h+arg_0]
push	edi
mov	edi, 1
mov	ebp, ecx
cmp	[esp+0B4h+arg_4], edi
jnb	short loc_84086E
mov	edx, [esi+8]
push	edi
lea	eax, [esp+0B8h+var_A4]
push	eax
push	80h
lea	ecx, [esp+0C0h+var_84]
push	ecx
push	esi
mov	[esp+0C8h+var_A4], edi
call	edx
add	esp, 14h
add	[esi+4], eax

loc_84086E:
mov	edx, [esi+8]
push	ebx
push	edi
lea	eax, [esp+0BCh+var_A4]
push	eax
mov	ebx, 4
push	ebx
lea	ecx, [ebp+8Ch]
push	ecx
push	esi
mov	[esp+0CCh+var_A4], ebx
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	edi
lea	ecx, [esp+0D0h+var_A4]
push	ecx
lea	eax, [ebp+90h]
push	ebx
push	eax
push	esi
mov	[esp+0E0h+var_A4], ebx
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	edi
lea	eax, [esp+0E4h+var_A4]
push	eax
push	ebx
lea	ecx, [ebp+98h]
push	ecx
push	esi
mov	[esp+0F4h+var_A4], ebx
call	edx
add	[esi+4], eax
mov	ecx, [esi+8]
push	1
lea	eax, [esp+0F8h+var_A4]
push	eax
push	ebx
lea	edi, [ebp+0A0h]
push	edi
push	esi
mov	[esp+108h+var_A4], ebx
call	ecx
add	[esi+4], eax
mov	edx, [edi]
add	esp, 50h
push	edx
call	sub_1227DA0
mov	ecx, [edi]
push	1
lea	edx, [esp+0C0h+var_A8]
push	edx
push	ecx
push	eax
mov	[esp+0CCh+var_A4], eax
mov	eax, [esi+8]
push	esi
mov	[esp+0D0h+var_A8], 1
call	eax
add	[esi+4], eax
push	10h
call	sub_11110D0
mov	ebx, eax
add	esp, 1Ch
test	ebx, ebx
jz	short loc_840958
push	94h
mov	dword ptr [ebx], offset	off_146A02C
mov	dword ptr [ebx+4], 25h
mov	dword ptr [ebx+0Ch], 0
call	sub_1227DA0
mov	ecx, [ebx+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[ebx+8], eax
call	_memset
add	esp, 10h
mov	dword ptr [ebx], offset	off_146A040
jmp	short loc_84095A

loc_840958:
xor	ebx, ebx

loc_84095A:
mov	[ebp+0A4h], ebx
xor	ebx, ebx
cmp	[edi], ebx
jbe	short loc_84098E
jmp	short loc_840970
align 10h

loc_840970:
mov	edx, [esp+0B8h+var_A4]
movsx	ax, byte ptr [ebx+edx]
movzx	ecx, ax
push	ebx
push	ecx
mov	ecx, [ebp+0A4h]
call	sub_8415A0
inc	ebx
cmp	ebx, [edi]
jb	short loc_840970

loc_84098E:
mov	edx, [esp+0B8h+var_A4]
push	edx
call	sub_1227D40
mov	edx, [esi+8]
push	1
lea	eax, [esp+0C0h+var_A8]
push	eax
mov	ebx, 4
push	ebx
lea	ecx, [esp+0C8h+var_8C]
push	ecx
push	esi
mov	[esp+0D0h+var_A8], ebx
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	1
lea	eax, [esp+0D4h+var_A8]
push	eax
push	ebx
lea	ecx, [esp+0DCh+var_A0]
push	ecx
push	esi
mov	[esp+0E4h+var_A8], ebx
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	1
lea	eax, [esp+0E8h+var_A8]
push	eax
push	ebx
lea	ecx, [esp+0F0h+var_88]
push	ecx
push	esi
mov	[esp+0F8h+var_A8], ebx
call	edx
add	[esi+4], eax
mov	eax, [edi]
shl	eax, 4
add	esp, 40h
push	eax
call	sub_1227DA0
mov	edx, [esi+8]
mov	ebx, eax
mov	eax, [edi]
push	1
lea	ecx, [esp+0C0h+var_A8]
push	ecx
shl	eax, 4
push	eax
push	ebx
push	esi
mov	[esp+0D0h+var_A8], 4
call	edx
add	[esi+4], eax
mov	eax, [edi]
add	eax, eax
add	eax, eax
add	eax, eax
push	eax
call	sub_1227DA0
mov	edx, [edi]
add	edx, edx
add	esp, 1Ch
xor	ecx, ecx
add	edx, edx
mov	[ebp+0ACh], eax
jz	loc_840ADB
nop

loc_840A40:
fld	dword ptr [ebx+ecx*4]
test	cl, 1
jnz	short loc_840A8B
mov	eax, [esp+0B8h+var_8C]
fild	[esp+0B8h+var_8C]
test	eax, eax
jge	short loc_840A5A
fadd	ds:flt_15FCC08

loc_840A5A:
fnstcw	word ptr [esp+0B8h+var_A4]
movzx	eax, word ptr [esp+0B8h+var_A4]
or	eax, 0C00h
fmulp	st(1), st
mov	[esp+0B8h+var_A8], eax
mov	eax, [ebp+0ACh]
fldcw	word ptr [esp+0B8h+var_A8]
fistp	[esp+0B8h+var_A8]
mov	dx, word ptr [esp+0B8h+var_A8]
mov	[eax+ecx*2], dx
fldcw	word ptr [esp+0B8h+var_A4]
jmp	short loc_840ACC

loc_840A8B:
mov	edx, [esp+0B8h+var_A0]
fild	[esp+0B8h+var_A0]
test	edx, edx
jge	short loc_840A9D
fadd	ds:flt_15FCC08

loc_840A9D:
mov	edx, [ebp+0ACh]
fnstcw	word ptr [esp+0B8h+var_A4]
movzx	eax, word ptr [esp+0B8h+var_A4]
fmulp	st(1), st
or	eax, 0C00h
mov	[esp+0B8h+var_A8], eax
fldcw	word ptr [esp+0B8h+var_A8]
fistp	[esp+0B8h+var_A8]
mov	ax, word ptr [esp+0B8h+var_A8]
mov	[edx+ecx*2], ax
fldcw	word ptr [esp+0B8h+var_A4]

loc_840ACC:
mov	eax, [edi]
add	eax, eax
inc	ecx
add	eax, eax
cmp	ecx, eax
jb	loc_840A40

loc_840ADB:
push	ebx
call	sub_1227D40
add	esp, 4
cmp	[esp+0B8h+arg_4], 2
pop	ebx
jnb	loc_840B75
fldz
mov	eax, [esi+8]
push	1
fst	[esp+0B8h+var_9C]
lea	ecx, [esp+0B8h+var_A8]
fst	[esp+0B8h+var_98]
push	ecx
fst	[esp+0BCh+var_94]
mov	edi, 4
fstp	[esp+0BCh+var_90]
push	edi
lea	edx, [esp+0C0h+var_9C]
push	edx
push	esi
mov	[esp+0C8h+var_A8], edi
call	eax
add	[esi+4], eax
mov	eax, [esi+8]
push	1
lea	ecx, [esp+0CCh+var_A8]
push	ecx
push	edi
lea	edx, [esp+0D4h+var_98]
push	edx
push	esi
mov	[esp+0DCh+var_A8], edi
call	eax
add	[esi+4], eax
mov	eax, [esi+8]
push	1
lea	ecx, [esp+0E0h+var_A8]
push	ecx
push	edi
lea	edx, [esp+0E8h+var_94]
push	edx
push	esi
mov	[esp+0F0h+var_A8], edi
call	eax
add	[esi+4], eax
mov	eax, [esi+8]
push	1
lea	ecx, [esp+0F4h+var_A8]
push	ecx
push	edi
lea	edx, [esp+0FCh+var_90]
push	edx
push	esi
mov	[esp+104h+var_A8], edi
call	eax
add	esp, 50h
add	[esi+4], eax

loc_840B75:
movzx	eax, word ptr [ebp+90h]
mov	ecx, [esp+0B4h+var_4]
pop	edi
mov	[ebp+96h], ax
mov	[ebp+94h], ax
pop	esi
pop	ebp
xor	ecx, esp
mov	al, 1
call	sub_7999A3
add	esp, 0A8h
retn	8
sub_840820 endp

align 10h



sub_840BB0 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+0A8h]
push	edi
push	eax
mov	dword ptr [esi], offset	off_146A054
call	sub_1227D40
mov	ecx, [esi+0ACh]
push	ecx
call	sub_1227D40
mov	ecx, [esi+0A4h]
add	esp, 8
test	ecx, ecx
jz	short loc_840BE8
mov	edx, [ecx]
mov	eax, [edx]
push	1
call	eax

loc_840BE8:
mov	ecx, [esi+0B4h]
push	ecx
mov	dword ptr [esi+0B0h], offset off_146A064
call	sub_841850
mov	edi, [esi+8]
mov	ebx, ds:InterlockedDecrement
add	esp, 4
test	edi, edi
jz	short loc_840C21
lea	edx, [edi+4]
push	edx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_840C21
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_840C21:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	edi
pop	esi
pop	ebx
retn
sub_840BB0 endp

align 10h
movsx	dx, byte ptr [esp+4]
movzx	eax, dx
mov	[esp+4], eax
jmp	sub_840530
align 10h
movsx	dx, byte ptr [esp+4]
movzx	eax, dx
mov	[esp+4], eax
jmp	loc_840630
align 10h



sub_840C80 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, dword_185A288
push	ebx
push	esi
push	edi
push	eax
mov	edi, ecx
call	sub_1297ED0
mov	esi, [esp+14h+arg_0]
movzx	ebx, word ptr [esi+0Ah]
movzx	ecx, word ptr [esi+8]
add	esp, 4
mov	[esp+10h+var_4], eax
cmp	ebx, ecx
jb	short loc_840CB6
movzx	edx, word ptr [esi+0Eh]
add	edx, ebx
push	edx
mov	ecx, esi
call	sub_40FAC0

loc_840CB6:
lea	eax, [esp+10h+var_4]
push	eax
push	ebx
mov	ecx, esi
call	sub_40FBD0
lea	ecx, [edi+0Ch]
push	ecx
push	offset aM_acname ; "m_acName"
call	sub_1297A30
movzx	ebx, word ptr [esi+0Ah]
movzx	edx, word ptr [esi+8]
add	esp, 8
mov	[esp+10h+arg_0], eax
cmp	ebx, edx
jb	short loc_840CF2
movzx	eax, word ptr [esi+0Eh]
add	eax, ebx
push	eax
mov	ecx, esi
call	sub_40FAC0

loc_840CF2:
lea	ecx, [esp+10h+arg_0]
push	ecx
push	ebx
mov	ecx, esi
call	sub_40FBD0
mov	edx, [edi+8Ch]
push	edx
push	offset aM_uiheight ; "m_uiHeight"
call	sub_1297BC0
movzx	ebx, word ptr [esi+0Ah]
mov	[esp+18h+arg_0], eax
movzx	eax, word ptr [esi+8]
add	esp, 8
cmp	ebx, eax
jb	short loc_840D31
movzx	ecx, word ptr [esi+0Eh]
add	ecx, ebx
push	ecx
mov	ecx, esi
call	sub_40FAC0

loc_840D31:
lea	edx, [esp+10h+arg_0]
push	edx
push	ebx
mov	ecx, esi
call	sub_40FBD0
mov	eax, [edi+90h]
push	eax
push	offset aM_uicharheight ; "m_uiCharHeight"
call	sub_1297BC0
movzx	ebx, word ptr [esi+0Ah]
movzx	ecx, word ptr [esi+8]
add	esp, 8
mov	[esp+10h+arg_0], eax
cmp	ebx, ecx
jb	short loc_840D70
movzx	edx, word ptr [esi+0Eh]
add	edx, ebx
push	edx
mov	ecx, esi
call	sub_40FAC0

loc_840D70:
lea	eax, [esp+10h+arg_0]
push	eax
push	ebx
mov	ecx, esi
call	sub_40FBD0
mov	ecx, [edi+98h]
push	ecx
push	offset aM_uiflags ; "m_uiFlags"
call	sub_1297BC0
movzx	ebx, word ptr [esi+0Ah]
movzx	edx, word ptr [esi+8]
add	esp, 8
mov	[esp+10h+arg_0], eax
cmp	ebx, edx
jb	short loc_840DAF
movzx	eax, word ptr [esi+0Eh]
add	eax, ebx
push	eax
mov	ecx, esi
call	sub_40FAC0

loc_840DAF:
lea	ecx, [esp+10h+arg_0]
push	ecx
push	ebx
mov	ecx, esi
call	sub_40FBD0
mov	edx, [edi+0A0h]
push	edx
push	offset aM_uiglyphcount ; "m_uiGlyphCount"
call	sub_1297BC0
movzx	ebx, word ptr [esi+0Ah]
mov	[esp+18h+arg_0], eax
movzx	eax, word ptr [esi+8]
add	esp, 8
cmp	ebx, eax
jb	short loc_840DEE
movzx	ecx, word ptr [esi+0Eh]
add	ecx, ebx
push	ecx
mov	ecx, esi
call	sub_40FAC0

loc_840DEE:
lea	edx, [esp+10h+arg_0]
push	edx
push	ebx
mov	ecx, esi
call	sub_40FBD0
movzx	eax, word ptr [edi+0BCh]
push	eax
push	offset aNumTextures ; "Num Textures"
call	sub_1297BC0
movzx	edi, word ptr [esi+0Ah]
mov	[esp+18h+arg_0], eax
movzx	eax, word ptr [esi+8]
add	esp, 8
cmp	edi, eax
jb	short loc_840E2E
movzx	ecx, word ptr [esi+0Eh]
add	ecx, edi
push	ecx
mov	ecx, esi
call	sub_40FAC0

loc_840E2E:
lea	edx, [esp+10h+arg_0]
push	edx
push	edi
mov	ecx, esi
call	sub_40FBD0
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_840C80 endp

align 10h
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	ds:InterlockedIncrement
mov	dword ptr [esi], offset	off_146A054
mov	[esi+8], ebx
mov	[esi+0B4h], ebx
mov	dword ptr [esi+0B0h], offset off_146A064
mov	ecx, 1
mov	[esi+0BEh], cx
xor	eax, eax
mov	[esi+0B8h], ax
mov	[esi+0BCh], ax
xor	edx, edx
mov	[esi+0BAh], dx
xor	ecx, ecx
mov	[esi+8Ch], ebx
mov	[esi+90h], ebx
mov	[esi+98h], ebx
mov	[esi+9Ch], ebx
mov	[esi+0A0h], ebx
mov	[esi+0A4h], ebx
mov	[esi+0C0h], ebx
mov	[esi+0Ch], bl
mov	[esi+0A8h], ebx
mov	[esi+0ACh], ebx
mov	[esi+94h], cx
mov	[esi+96h], dx
mov	eax, esi
pop	esi
pop	ebx
retn
align 10h



sub_840F00 proc	near

arg_0= dword ptr  4

push	ebx
push	esi
push	edi
mov	edi, ds:InterlockedIncrement
mov	esi, ecx
xor	ebx, ebx
push	offset Addend	; lpAddend
mov	dword ptr [esi], offset	off_154EE18
mov	[esi+4], ebx
call	edi ; InterlockedIncrement
mov	eax, [esp+0Ch+arg_0]
mov	dword ptr [esi], offset	off_146A054
mov	[esi+8], eax
cmp	eax, ebx
jz	short loc_840F34
add	eax, 4
push	eax		; lpAddend
call	edi ; InterlockedIncrement

loc_840F34:
mov	[esi+0B4h], ebx
mov	dword ptr [esi+0B0h], offset off_146A064
mov	ecx, 1
mov	[esi+0BEh], cx
xor	eax, eax
mov	[esi+0B8h], ax
mov	[esi+0BCh], ax
xor	edx, edx
mov	[esi+0BAh], dx
xor	ecx, ecx
pop	edi
mov	[esi+8Ch], ebx
mov	[esi+90h], ebx
mov	[esi+98h], ebx
mov	[esi+9Ch], ebx
mov	[esi+0A0h], ebx
mov	[esi+0A4h], ebx
mov	[esi+0Ch], bl
mov	[esi+0A8h], ebx
mov	[esi+0ACh], ebx
mov	[esi+0C0h], ebx
mov	[esi+94h], cx
mov	[esi+96h], dx
mov	eax, esi
pop	esi
pop	ebx
retn	4
sub_840F00 endp

align 10h



sub_840FC0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
mov	eax, [esp+4+arg_0]
push	ebx
push	esi
push	edi
push	offset unk_17EE088
push	eax
mov	esi, ecx
call	sub_123F920
mov	edi, eax
add	esp, 8
mov	[esp+10h+var_4], edi
test	edi, edi
jz	short loc_840FEC
lea	ecx, [edi+4]
push	ecx		; lpAddend
call	ds:InterlockedIncrement

loc_840FEC:
movzx	ebx, word ptr [esi+0BAh]
movzx	edx, word ptr [esi+0B8h]
add	esi, 0B0h
cmp	ebx, edx
jb	short loc_841012
movzx	eax, word ptr [esi+0Eh]
add	eax, ebx
push	eax
mov	ecx, esi
call	sub_8418B0

loc_841012:
lea	ecx, [esp+10h+var_4]
push	ecx
push	ebx
mov	ecx, esi
call	sub_841730
mov	ebx, ds:InterlockedDecrement
test	edi, edi
jz	short loc_84103C
lea	edx, [edi+4]
push	edx		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_84103C
mov	eax, [edi]
mov	edx, [eax+4]
mov	ecx, edi
call	edx

loc_84103C:
mov	eax, [esp+10h+arg_0]
test	eax, eax
jz	short loc_841059
mov	esi, eax
add	eax, 4
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_841059
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_841059:
pop	edi
pop	esi
pop	ebx
pop	ecx
retn	4
sub_840FC0 endp




sub_841060 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	esi, [esp+18h+arg_0]
mov	edx, [esi+8]
push	edi
push	1
lea	eax, [esp+20h+var_8]
push	eax
mov	edi, 4
mov	ebx, ecx
push	edi
lea	ecx, [esp+28h+var_C]
push	ecx
push	esi
mov	[esp+30h+var_8], edi
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	1
lea	eax, [esp+34h+var_8]
push	eax
push	edi
lea	ecx, [esp+3Ch+arg_0]
push	ecx
push	esi
mov	[esp+44h+var_8], edi
call	edx
add	[esi+4], eax
mov	edx, [esi+8]
push	1
lea	eax, [esp+48h+var_8]
push	eax
push	edi
lea	ecx, [esp+50h+var_4]
push	ecx
push	esi
mov	[esp+58h+var_8], edi
call	edx
add	[esi+4], eax
push	70h
call	sub_11110D0
mov	ebp, ds:InterlockedIncrement
add	esp, 40h
test	eax, eax
jz	loc_841163
mov	ecx, [esp+1Ch+arg_0]
mov	edx, [esp+1Ch+var_C]
push	1
push	1
push	offset unk_17EE450
push	ecx
push	edx
mov	ecx, eax
call	sub_114D150
mov	edi, eax
test	edi, edi
jz	short loc_8410FE
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebp ; InterlockedIncrement

loc_8410FE:
mov	eax, [esp+1Ch+var_4]
imul	eax, [esp+1Ch+arg_0]
imul	eax, [esp+1Ch+var_C]
mov	ecx, [edi+5Ch]
mov	ecx, [ecx]
add	ecx, [edi+50h]
push	1
lea	edx, [esp+20h+var_8]
push	edx
shr	eax, 3
push	eax
mov	eax, [esi+8]
push	ecx
push	esi
mov	[esp+30h+var_8], 1
call	eax
add	[esi+4], eax
add	esp, 10h
mov	eax, esp
lea	esi, [edi+4]
push	esi		; lpAddend
mov	[eax], edi
call	ebp ; InterlockedIncrement
mov	ecx, ebx
call	sub_840FC0
push	esi		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_841159
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_841159:
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn	4

loc_841163:
xor	edi, edi
jmp	short loc_8410FE
sub_841060 endp

align 10h



sub_841170 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 0Ch
push	ebp
push	esi
mov	esi, [esp+14h+arg_0]
mov	edx, [esi+8]
push	edi
push	1
lea	eax, [esp+1Ch+var_C]
push	eax
mov	ebp, 4
mov	edi, ecx
push	ebp
lea	ecx, [esp+24h+var_8]
push	ecx
push	esi
mov	[esp+2Ch+var_C], ebp
call	edx
add	[esi+4], eax
add	esp, 14h
cmp	[esp+18h+var_8], 46464Eh
jz	short loc_8411BD
mov	dword ptr [edi+0C0h], 80000001h
pop	edi
pop	esi
xor	al, al
pop	ebp
add	esp, 0Ch
retn	8

loc_8411BD:
mov	ecx, [esi+8]
push	ebx
mov	ebx, [esp+1Ch+arg_4]
push	1
lea	eax, [esp+20h+arg_0]
push	eax
push	ebp
push	ebx
push	esi
mov	[esp+30h+arg_0], ebp
call	ecx
add	[esi+4], eax
mov	eax, [ebx]
add	esp, 14h
cmp	eax, dword_168240C
jbe	short loc_8411FB
mov	dword ptr [edi+0C0h], 80000002h

loc_8411EF:
pop	ebx
pop	edi
pop	esi
xor	al, al
pop	ebp
add	esp, 0Ch
retn	8

loc_8411FB:
cmp	eax, 2
ja	short loc_841221
push	eax
push	esi
mov	ecx, edi
call	sub_840820
test	al, al
jz	short loc_8411EF
push	esi
mov	ecx, edi
call	sub_841060
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 0Ch
retn	8

loc_841221:
mov	ecx, [esi+8]
push	1
lea	edx, [esp+20h+arg_0]
push	edx
push	ebp
lea	eax, [esp+28h+var_4]
push	eax
push	esi
mov	[esp+30h+arg_0], ebp
call	ecx
mov	edx, [esp+30h+var_4]
add	[esi+4], eax
inc	edx
push	edx
lea	eax, [edi+0Ch]
push	eax
push	esi
call	sub_41A9D0
lea	ecx, [edi+8Ch]
push	ecx
push	esi
call	sub_415AE0
lea	edx, [edi+90h]
push	edx
push	esi
call	sub_415AE0
lea	eax, [edi+96h]
push	eax
push	esi
call	sub_421A70
lea	ecx, [edi+94h]
push	ecx
push	esi
call	sub_421A70
add	esp, 40h
lea	edx, [edi+98h]
push	edx
push	esi
call	sub_415AE0
lea	ebx, [edi+0A0h]
push	ebx
push	esi
call	sub_415AE0
mov	eax, [ebx]
add	eax, eax
push	eax
call	sub_1227DA0
mov	ecx, [ebx]
push	ecx
push	eax
push	esi
mov	[esp+3Ch+arg_0], eax
call	sub_8417D0
push	10h
call	sub_11110D0
add	esp, 24h
test	eax, eax
jz	short loc_8412CD
push	25h
mov	ecx, eax
call	sub_841660
jmp	short loc_8412CF

loc_8412CD:
xor	eax, eax

loc_8412CF:
xor	ebp, ebp
mov	[edi+0A4h], eax
cmp	[ebx], ebp
jbe	short loc_8412FA
jmp	short loc_8412E0
align 10h

loc_8412E0:
mov	edx, [esp+1Ch+arg_0]
movzx	eax, word ptr [edx+ebp*2]
mov	ecx, [edi+0A4h]
push	ebp
push	eax
call	sub_8415A0
inc	ebp
cmp	ebp, [ebx]
jb	short loc_8412E0

loc_8412FA:
mov	ecx, [esp+1Ch+arg_0]
push	ecx
call	sub_1227D40
mov	edx, [ebx]
push	edx
call	sub_1227DA0
mov	ecx, [ebx]
push	1
lea	edx, [esp+28h+arg_0]
push	edx
push	ecx
push	eax
mov	[edi+0A8h], eax
mov	eax, [esi+8]
push	esi
mov	[esp+38h+arg_0], 1
call	eax
add	[esi+4], eax
mov	ecx, [ebx]
add	ecx, ecx
add	ecx, ecx
add	ecx, ecx
push	ecx
call	sub_1227DA0
mov	ebx, [ebx]
add	ebx, ebx
push	1
lea	edx, [esp+40h+arg_0]
push	edx
add	ebx, ebx
add	ebx, ebx
push	ebx
push	eax
mov	[edi+0ACh], eax
mov	eax, [esi+8]
push	esi
mov	[esp+50h+arg_0], 2
call	eax
mov	edx, [esi+8]
add	[esi+4], eax
push	1
lea	ecx, [esp+54h+arg_0]
push	ecx
push	4
lea	ebx, [edi+9Ch]
push	ebx
push	esi
mov	[esp+64h+arg_0], 4
call	edx
add	[esi+4], eax
mov	eax, [ebx]
add	esp, 48h
push	eax
lea	ecx, [edi+0B0h]
call	sub_8418B0
pop	ebx
pop	edi
pop	esi
mov	al, 1
pop	ebp
add	esp, 0Ch
retn	8
sub_841170 endp

align 10h
push	esi
push	edi
mov	edi, [esp+0Ch]
lea	eax, [esp+0Ch]
push	eax
push	edi
mov	esi, ecx
call	sub_841170
test	al, al
jnz	short loc_8413CC
pop	edi
pop	esi
retn	4

loc_8413CC:
cmp	dword ptr [esp+0Ch], 3
jb	short loc_8413DB
push	edi
mov	ecx, esi
call	sub_840690

loc_8413DB:
pop	edi
mov	al, 1
pop	esi
retn	4
align 10h



; int __stdcall	sub_8413F0(char	*Src)
sub_8413F0 proc	near

var_10C= dword ptr -10Ch
Dst= byte ptr -108h
var_4= dword ptr -4
Src= dword ptr	4

sub	esp, 10Ch
mov	eax, dword_167FD30
xor	eax, esp
mov	[esp+10Ch+var_4], eax
mov	eax, [esp+10Ch+Src]
push	esi
push	edi
push	eax		; Src
lea	eax, [esp+118h+Dst]
push	104h		; SizeInBytes
push	eax		; Dst
mov	edi, ecx
call	_strcpy_s
lea	ecx, [esp+120h+Dst]
push	ecx
call	sub_110FDF0
push	8000h
lea	edx, [esp+128h+Dst]
push	0
push	edx
call	sub_1110840
mov	esi, eax
add	esp, 1Ch
test	esi, esi
jnz	short loc_841451

loc_841443:
mov	dword ptr [edi+0C0h], 80000001h
xor	al, al
jmp	short loc_841495

loc_841451:
mov	eax, [esi]
mov	edx, [eax+10h]
push	0
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx
test	al, al
jz	short loc_841443
lea	eax, [esp+114h+var_10C]
push	eax
push	esi
mov	ecx, edi
call	sub_841170
test	al, al
jz	short loc_8414AE
cmp	[esp+114h+var_10C], 3
jb	short loc_841489
push	esi
mov	ecx, edi
call	sub_840690

loc_841489:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
mov	al, 1

loc_841495:
mov	ecx, [esp+114h+var_4]
pop	edi
pop	esi
xor	ecx, esp
call	sub_7999A3
add	esp, 10Ch
retn	4

loc_8414AE:
mov	edx, [esi]
mov	eax, [edx]
push	1
mov	ecx, esi
call	eax
xor	al, al
jmp	short loc_841495
sub_8413F0 endp

align 10h



; int __cdecl sub_8414C0(int, char *Src)
sub_8414C0 proc	near

arg_0= dword ptr  4
Src= dword ptr	8

push	0C4h
call	sub_11110D0
add	esp, 4
test	eax, eax
jz	short loc_841502
mov	ecx, [esp+arg_0]
push	esi
push	ecx
mov	ecx, eax
call	sub_840F00
mov	esi, eax
test	esi, esi
jz	short loc_841507
mov	edx, [esp+4+Src]
push	edx		; Src
mov	ecx, esi
call	sub_8413F0
test	al, al
jnz	short loc_841505
mov	eax, [esi]
mov	edx, [eax]
push	1
mov	ecx, esi
call	edx
xor	eax, eax
pop	esi
retn

loc_841502:
xor	eax, eax
retn

loc_841505:
mov	eax, esi

loc_841507:
pop	esi
retn
sub_8414C0 endp

align 10h



sub_841510 proc	near

arg_0= dword ptr  4
arg_4= word ptr	 8
arg_8= word ptr	 0Ch

mov	eax, [esp+arg_0]
mov	cx, [esp+arg_4]
mov	dx, [esp+arg_8]
mov	[eax+4], cx
mov	[eax+6], dx
retn	0Ch
sub_841510 endp

align 10h



sub_841530 proc	near
push	ebx
push	esi
mov	esi, ecx
xor	ebx, ebx
cmp	[esi+4], ebx
jbe	short loc_84158B
push	edi
lea	esp, [esp+0]

loc_841540:
mov	eax, [esi+8]
cmp	dword ptr [eax+ebx*4], 0
jz	short loc_84157A
lea	esp, [esp+0]

loc_841550:
mov	ecx, [esi+8]
mov	edi, [ecx+ebx*4]
mov	edx, [edi]
lea	eax, [ecx+ebx*4]
mov	[eax], edx
mov	eax, [esi]
mov	edx, [eax+8]
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi]
mov	edx, [eax+10h]
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi+8]
cmp	dword ptr [eax+ebx*4], 0
jnz	short loc_841550

loc_84157A:
inc	ebx
cmp	ebx, [esi+4]
jb	short loc_841540
pop	edi
mov	dword ptr [esi+0Ch], 0
pop	esi
pop	ebx
retn

loc_84158B:
mov	[esi+0Ch], ebx
pop	esi
pop	ebx
retn
sub_841530 endp

align 10h



sub_8415A0 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

push	ebx
push	ebp
mov	ebp, [esp+8+arg_0]
movzx	eax, bp
push	esi
mov	esi, ecx
xor	edx, edx
div	dword ptr [esi+4]
mov	eax, [esi+8]
mov	ebx, edx
mov	eax, [eax+ebx*4]
test	eax, eax
jz	short loc_8415CC
lea	ecx, [ecx+0]

loc_8415C0:
cmp	bp, [eax+4]
jz	short loc_8415FE
mov	eax, [eax]
test	eax, eax
jnz	short loc_8415C0

loc_8415CC:
mov	edx, [esi]
mov	eax, [edx+0Ch]
push	edi
call	eax
mov	edx, [esi]
mov	edx, [edx+4]
mov	edi, eax
mov	eax, [esp+10h+arg_4]
push	eax
push	ebp
push	edi
mov	ecx, esi
call	edx
mov	eax, [esi+8]
mov	ecx, [eax+ebx*4]
mov	[edi], ecx
mov	edx, [esi+8]
mov	[edx+ebx*4], edi
inc	dword ptr [esi+0Ch]
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8

loc_8415FE:
mov	cx, word ptr [esp+0Ch+arg_4]
pop	esi
pop	ebp
mov	[eax+6], cx
pop	ebx
retn	8
sub_8415A0 endp

align 10h



sub_841610 proc	near
mov	dword ptr [ecx], 0
retn
sub_841610 endp

align 10h



sub_841620 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146A02C
call	sub_841530
mov	eax, [esi+8]
push	eax
call	sub_1227D40
add	esp, 4
test	[esp+4+arg_0], 1
jz	short loc_84164C
push	10h
push	esi
call	sub_1111040
add	esp, 8

loc_84164C:
mov	eax, esi
pop	esi
retn	4
sub_841620 endp

align 10h



sub_841660 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
push	esi
mov	esi, ecx
mov	[esi+4], eax
add	eax, eax
add	eax, eax
push	eax
mov	dword ptr [esi], offset	off_146A02C
mov	dword ptr [esi+0Ch], 0
call	sub_1227DA0
mov	ecx, [esi+4]
add	ecx, ecx
add	ecx, ecx
push	ecx		; size_t
push	0		; int
push	eax		; void *
mov	[esi+8], eax
call	_memset
add	esp, 10h
mov	dword ptr [esi], offset	off_146A040
mov	eax, esi
pop	esi
retn	4
sub_841660 endp

align 10h



sub_8416B0 proc	near
push	0Ch
call	sub_11110D0
xor	ecx, ecx
add	esp, 4
mov	[eax+8], cx
retn
sub_8416B0 endp

align 10h



sub_8416D0 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
xor	ecx, ecx
push	0Ch
push	eax
mov	[eax+6], cx
call	sub_1111040
add	esp, 8
retn	4
sub_8416D0 endp

align 10h



sub_8416F0 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	dword ptr [esi], offset	off_146A040
call	sub_841530
mov	ecx, esi
mov	dword ptr [esi], offset	off_146A02C
call	sub_841530
mov	eax, [esi+8]
push	eax
call	sub_1227D40
add	esp, 4
test	[esp+4+arg_0], 1
jz	short loc_841729
push	10h
push	esi
call	sub_1111040
add	esp, 8

loc_841729:
mov	eax, esi
pop	esi
retn	4
sub_8416F0 endp

align 10h



sub_841730 proc	near

arg_0= dword ptr  4
arg_4= dword ptr  8

movzx	edx, word ptr [ecx+0Ah]
mov	eax, [esp+arg_0]
push	ebp
mov	ebp, [esp+4+arg_4]
push	esi
push	edi
cmp	eax, edx
jb	short loc_84175B
lea	edx, [eax+1]
mov	[ecx+0Ah], dx
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
jz	short loc_84178E
inc	word ptr [ecx+0Ch]
jmp	short loc_84178E

loc_84175B:
cmp	dword ptr [ebp+0], 0
setnz	dl
test	dl, dl
mov	edx, [ecx+4]
jz	short loc_84177A
cmp	dword ptr [edx+eax*4], 0
setz	dl
test	dl, dl
jz	short loc_84178E
inc	word ptr [ecx+0Ch]
jmp	short loc_84178E

loc_84177A:
cmp	dword ptr [edx+eax*4], 0
setnz	dl
test	dl, dl
jz	short loc_84178E
mov	edx, 0FFFFh
add	[ecx+0Ch], dx

loc_84178E:
mov	ecx, [ecx+4]
mov	esi, [ecx+eax*4]
lea	edi, [ecx+eax*4]
cmp	esi, [ebp+0]
jz	short loc_8417CA
test	esi, esi
jz	short loc_8417B7
lea	edx, [esi+4]
push	edx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_8417B7
mov	eax, [esi]
mov	edx, [eax+4]
mov	ecx, esi
call	edx

loc_8417B7:
mov	eax, [ebp+0]
mov	[edi], eax
test	eax, eax
jz	short loc_8417CA
add	eax, 4
push	eax		; lpAddend
call	ds:InterlockedIncrement

loc_8417CA:
pop	edi
pop	esi
pop	ebp
retn	8
sub_841730 endp




sub_8417D0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

push	ecx
mov	eax, [esp+4+arg_8]
mov	edx, [esp+4+arg_4]
push	esi
mov	esi, [esp+8+arg_0]
push	1
lea	ecx, [esp+0Ch+var_4]
push	ecx
add	eax, eax
push	eax
mov	eax, [esi+8]
push	edx
push	esi
mov	[esp+1Ch+var_4], 2
call	eax
add	esp, 14h
add	[esi+4], eax
pop	esi
pop	ecx
retn
sub_8417D0 endp




sub_841800 proc	near

arg_0= dword ptr  4

push	edi
mov	edi, [esp+4+arg_0]
xor	ecx, ecx
mov	eax, edi
mov	edx, 4
mul	edx
seto	cl
neg	ecx
or	ecx, eax
xor	eax, eax
add	ecx, 4
setb	al
neg	eax
or	eax, ecx
push	eax
call	sub_1111070
add	esp, 4
test	eax, eax
jz	short loc_841849
push	esi
push	offset sub_841610
push	edi
lea	esi, [eax+4]
push	4
push	esi
mov	[eax], edi
call	sub_4078B0
mov	eax, esi
pop	esi
pop	edi
retn

loc_841849:
xor	eax, eax
pop	edi
retn
sub_841800 endp

align 10h



sub_841850 proc	near

arg_0= dword ptr  4

mov	eax, [esp+arg_0]
test	eax, eax
jz	short locret_8418A5
push	ebx
mov	ebx, [eax-4]
push	ebp
lea	ebp, [eax-4]
push	edi
lea	edi, [eax+ebx*4]
sub	ebx, 1
js	short loc_841897
push	esi
lea	ebx, [ebx+0]

loc_841870:
mov	esi, [edi-4]
sub	edi, 4
test	esi, esi
jz	short loc_841891
lea	eax, [esi+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_841891
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_841891:
sub	ebx, 1
jns	short loc_841870
pop	esi

loc_841897:
push	4
push	ebp
call	sub_1111020
add	esp, 8
pop	edi
pop	ebp
pop	ebx

locret_8418A5:
retn
sub_841850 endp

align 10h



sub_8418B0 proc	near

var_4= dword ptr -4
arg_0= dword ptr  4

push	ecx
push	edi
mov	edi, ecx
movzx	eax, word ptr [edi+8]
mov	ecx, [esp+8+arg_0]
cmp	ecx, eax
jz	loc_841A25
movzx	eax, word ptr [edi+0Ah]
push	ebx
movzx	edx, ax
push	ebp
push	esi
cmp	ecx, edx
jnb	short loc_84192F
movzx	ebp, cx
cmp	cx, ax
jnb	short loc_84192B
lea	ebx, [ebx+0]

loc_8418E0:
mov	edx, [edi+4]
movzx	eax, bp
cmp	dword ptr [edx+eax*4], 0
lea	esi, [edx+eax*4]
setnz	al
test	al, al
jz	short loc_841924
mov	ebx, [esi]
test	ebx, ebx
jz	short loc_841917
lea	eax, [ebx+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_841911
mov	edx, [ebx]
mov	eax, [edx+4]
mov	ecx, ebx
call	eax

loc_841911:
mov	dword ptr [esi], 0

loc_841917:
mov	ecx, 0FFFFh
add	[edi+0Ch], cx
mov	ecx, [esp+14h+arg_0]

loc_841924:
inc	ebp
cmp	bp, [edi+0Ah]
jb	short loc_8418E0

loc_84192B:
mov	[edi+0Ah], cx

loc_84192F:
mov	edx, [edi+4]
mov	[esp+14h+arg_0], edx
mov	[edi+8], cx
test	ecx, ecx
jbe	loc_841A0E
movzx	eax, cx
push	eax
call	sub_841800
mov	[edi+4], eax
xor	eax, eax
xor	ecx, ecx
add	esp, 4
mov	[esp+14h+var_4], eax
cmp	cx, [edi+0Ah]
jnb	short loc_8419BA
nop

loc_841960:
mov	ebx, [edi+4]
mov	edx, [esp+14h+arg_0]
movzx	esi, ax
add	esi, esi
add	esi, esi
mov	ebp, [ebx+esi]
add	ebx, esi
cmp	ebp, [esi+edx]
jz	short loc_8419AB
test	ebp, ebp
jz	short loc_841994
lea	eax, [ebp+4]
push	eax		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_841994
mov	edx, [ebp+0]
mov	eax, [edx+4]
mov	ecx, ebp
call	eax

loc_841994:
mov	ecx, [esp+14h+arg_0]
mov	esi, [esi+ecx]
mov	[ebx], esi
test	esi, esi
jz	short loc_8419AB
add	esi, 4
push	esi		; lpAddend
call	ds:InterlockedIncrement

loc_8419AB:
mov	eax, [esp+14h+var_4]
inc	eax
mov	[esp+14h+var_4], eax
cmp	ax, [edi+0Ah]
jb	short loc_841960

loc_8419BA:
movzx	ebx, word ptr [edi+0Ah]
cmp	bx, [edi+8]
jnb	short loc_841A15

loc_8419C4:
mov	eax, [edi+4]
movzx	edx, bx
mov	esi, [eax+edx*4]
lea	ebp, [eax+edx*4]
test	esi, esi
jz	short loc_8419F2
lea	ecx, [esi+4]
push	ecx		; lpAddend
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_8419EB
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_8419EB:
mov	dword ptr [ebp+0], 0

loc_8419F2:
inc	ebx
cmp	bx, [edi+8]
jb	short loc_8419C4
mov	ecx, [esp+14h+arg_0]
push	ecx
call	sub_841850
add	esp, 4
pop	esi
pop	ebp
pop	ebx
pop	edi
pop	ecx
retn	4

loc_841A0E:
mov	dword ptr [edi+4], 0

loc_841A15:
mov	ecx, [esp+14h+arg_0]
push	ecx
call	sub_841850
add	esp, 4
pop	esi
pop	ebp
pop	ebx

loc_841A25:
pop	edi
pop	ecx
retn	4
sub_8418B0 endp

align 10h



sub_841A30 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
mov	eax, [esi+4]
push	eax
mov	dword ptr [esi], offset	off_146A064
call	sub_841850
add	esp, 4
test	[esp+4+arg_0], 1
jz	short loc_841A57
push	10h
push	esi
call	sub_1111040
add	esp, 8

loc_841A57:
mov	eax, esi
pop	esi
retn	4
sub_841A30 endp

align 10h



sub_841A60 proc	near
mov	eax, offset dword_185A288
retn
sub_841A60 endp

align 10h



sub_841A70 proc	near

arg_0= byte ptr	 4

push	esi
mov	esi, ecx
call	sub_840BB0
test	[esp+4+arg_0], 1
jz	short loc_841A8D
push	0C4h
push	esi
call	sub_1111040
add	esp, 8

loc_841A8D:
mov	eax, esi
pop	esi
retn	4
sub_841A70 endp

align 10h



sub_841AA0 proc	near
push	esi
mov	esi, ecx
mov	eax, [esi+1Ch]
push	edi
push	eax
call	sub_1227D40
mov	ecx, [esi+18h]
push	ecx
call	sub_1227D40
mov	edx, [esi+38h]
xor	edi, edi
push	edx
mov	[esi+1Ch], edi
mov	[esi+18h], edi
mov	[esi+14h], edi
call	sub_1227D40
add	esp, 0Ch
mov	[esi+38h], edi
pop	edi
pop	esi
retn
sub_841AA0 endp

align 10h



sub_841AE0 proc	near

var_C= dword ptr -0Ch
var_8= dword ptr -8

sub	esp, 0Ch
push	esi
mov	esi, ecx
cmp	dword ptr [esi+1Ch], 0
jz	loc_841C3C
mov	edx, [esi+18h]
xor	ecx, ecx
push	ebx
push	edi
lea	edi, [ecx+1]
cmp	[edx], cx
jz	short loc_841B16
xor	eax, eax
mov	ebx, edx

loc_841B03:
cmp	word ptr [edx+eax], 0Ah
jnz	short loc_841B0B
inc	edi

loc_841B0B:
inc	ecx
lea	eax, [ecx+ecx]
cmp	word ptr [ebx+eax], 0
jnz	short loc_841B03

loc_841B16:
cmp	edi, [esi+34h]
ja	short loc_841B21
cmp	dword ptr [esi+38h], 0
jnz	short loc_841B38

loc_841B21:
mov	ecx, [esi+38h]
lea	eax, ds:0[edi*4]
push	eax
push	ecx
call	sub_1227DE0
add	esp, 8
mov	[esi+38h], eax

loc_841B38:
fldz
mov	[esi+34h], edi
fst	[esp+18h+var_8]
cmp	edi, 1
jnz	short loc_841B6F
movzx	edx, byte ptr [esi+30h]
fstp	st
mov	ecx, [esi+18h]
push	edx
lea	eax, [esi+40h]
push	eax
lea	edi, [esi+3Ch]
push	edi
push	ecx
mov	ecx, [esi+8]
call	sub_840000
mov	edx, [esi+38h]
fld	dword ptr [edi]
pop	edi
pop	ebx
fstp	dword ptr [edx]
pop	esi
add	esp, 0Ch
retn

loc_841B6F:
fst	[esp+18h+var_C]
xor	ecx, ecx
xor	edi, edi
fst	dword ptr [esi+3Ch]
fstp	dword ptr [esi+40h]
cmp	[esi+14h], ecx
jbe	loc_841C3A
xor	ebx, ebx
jmp	short loc_841B90
align 10h

loc_841B90:
mov	eax, [esi+18h]
cmp	word ptr [eax+edi*2], 0Dh
lea	eax, [eax+edi*2]
jnz	short loc_841BA5
mov	edx, 20h
mov	[eax], dx

loc_841BA5:
mov	eax, [esi+18h]
movzx	eax, word ptr [eax+edi*2]
cmp	ax, 0Ah
jz	short loc_841BC2
test	ax, ax
jz	short loc_841BC2
mov	word_185A290[ecx*2], ax
inc	ecx
jmp	short loc_841C30

loc_841BC2:
xor	edx, edx
mov	word_185A290[ecx*2], dx
movzx	eax, byte ptr [esi+30h]
push	eax
lea	ecx, [esp+1Ch+var_8]
push	ecx
mov	ecx, [esi+8]
lea	edx, [esp+20h+var_C]
push	edx
push	offset word_185A290
call	sub_840000
mov	eax, [esi+38h]
fld	[esp+18h+var_C]
add	ebx, 4
fstp	dword ptr [ebx+eax-4]
fld	dword ptr [esi+3Ch]
fld	[esp+18h+var_C]
fcom	st(1)
fnstsw	ax
fstp	st(1)
test	ah, 41h
jnz	short loc_841C0D
fstp	dword ptr [esi+3Ch]
jmp	short loc_841C0F

loc_841C0D:
fstp	st

loc_841C0F:
mov	ecx, [esi+8]
mov	edx, [ecx+90h]
fild	dword ptr [ecx+90h]
test	edx, edx
jge	short loc_841C28
fadd	ds:flt_15FCC08

loc_841C28:
fadd	dword ptr [esi+40h]
xor	ecx, ecx
fstp	dword ptr [esi+40h]

loc_841C30:
inc	edi
cmp	edi, [esi+14h]
jb	loc_841B90

loc_841C3A:
pop	edi
pop	ebx

loc_841C3C:
pop	esi
add	esp, 0Ch
retn
sub_841AE0 endp

align 10h



sub_841C50 proc	near
push	ebx
push	esi
mov	esi, ecx
mov	eax, [esi+38h]
push	edi
push	eax
mov	dword ptr [esi], offset	off_146A078
call	sub_1227D40
mov	ecx, [esi+1Ch]
push	ecx
call	sub_1227D40
mov	edx, [esi+18h]
push	edx
call	sub_1227D40
mov	edi, [esi+8]
mov	ebx, ds:InterlockedDecrement
add	esp, 0Ch
test	edi, edi
jz	short loc_841C99
lea	eax, [edi+4]
push	eax		; lpAddend
call	ebx ; InterlockedDecrement
test	eax, eax
jnz	short loc_841C99
mov	edx, [edi]
mov	eax, [edx+4]
mov	ecx, edi
call	eax

loc_841C99:		; lpAddend
push	offset Addend
mov	dword ptr [esi], offset	off_154EE18
call	ebx ; InterlockedDecrement
pop	edi
pop	esi
pop	ebx
retn
sub_841C50 endp

align 10h
push	ebx
push	edi
mov	edi, [esp+0Ch]
mov	ebx, ecx
cmp	[ebx+8], edi
jz	short loc_841CF6
push	esi
mov	esi, [ebx+8]
cmp	esi, edi
jz	short loc_841CF1
test	esi, esi
jz	short loc_841CE0
lea	eax, [esi+4]
push	eax
call	ds:InterlockedDecrement
test	eax, eax
jnz	short loc_841CE0
mov	edx, [esi]
mov	eax, [edx+4]
mov	ecx, esi
call	eax

loc_841CE0:
mov	[ebx+8], edi
test	edi, edi
jz	short loc_841CF1
add	edi, 4
push	edi
call	ds:InterlockedIncrement

loc_841CF1:
mov	byte ptr [ebx+44h], 1
pop	esi

loc_841CF6:
pop	edi
pop	ebx
retn	4
align 10h



; int __stdcall	sub_841D00(char	*Src, int)
sub_841D00 proc	near

Src= dword ptr	4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_841D12
mov	[esi+0Ch], eax

loc_841D12:
mov	ebx, [esp+10h+Src]
mov	edi, [esi+14h]
test	ebx, ebx
jz	short loc_841D2E
mov	eax, ebx
lea	edx, [eax+1]

loc_841D22:
mov	cl, [eax]
inc	eax
test	cl, cl
jnz	short loc_841D22
sub	eax, edx
lea	edi, [eax+1]

loc_841D2E:
mov	ebp, [esi+1Ch]
test	ebp, ebp
jz	short loc_841DA7
mov	ecx, ebx
mov	eax, ebp
lea	esp, [esp+0]

loc_841D40:
mov	dl, [eax]
cmp	dl, [ecx]
jnz	short loc_841D60
test	dl, dl
jz	short loc_841D5C
mov	dl, [eax+1]
cmp	dl, [ecx+1]
jnz	short loc_841D60
add	eax, 2
add	ecx, 2
test	dl, dl
jnz	short loc_841D40

loc_841D5C:
xor	eax, eax
jmp	short loc_841D65

loc_841D60:
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_841D65:
test	eax, eax
jz	loc_841E08
mov	eax, [esi+10h]
cmp	eax, edi
jbe	short loc_841D9A
push	ebx		; Src
push	eax		; SizeInBytes
push	ebp		; Dst
call	_strcpy_s
mov	eax, [esi+10h]
mov	ecx, [esi+18h]
mov	edx, [esi+1Ch]
push	eax
push	ecx
push	eax
push	edx
call	sub_83FE10
add	esp, 1Ch
mov	[esi+14h], edi
mov	byte ptr [esi+44h], 1
jmp	short loc_841DA7

loc_841D9A:
mov	ecx, esi
call	sub_841AA0
lea	eax, [edi+1]
mov	[esi+10h], eax

loc_841DA7:
cmp	dword ptr [esi+1Ch], 0
jnz	short loc_841E01
mov	eax, [esi+10h]
cmp	eax, edi
mov	[esi+14h], edi
jg	short loc_841DB9
mov	eax, edi

loc_841DB9:
push	eax
mov	[esi+10h], eax
call	sub_1227DA0
mov	ecx, [esi+10h]
add	ecx, ecx
push	ecx
mov	[esi+1Ch], eax
call	sub_1227DA0
add	esp, 8
mov	[esi+18h], eax
test	ebx, ebx
jz	short loc_841DFD
mov	edx, [esi+10h]
mov	eax, [esi+1Ch]
push	ebx		; Src
push	edx		; SizeInBytes
push	eax		; Dst
call	_strcpy_s
mov	eax, [esi+10h]
mov	ecx, [esi+18h]
mov	edx, [esi+1Ch]
push	eax
push	ecx
push	eax
push	edx
call	sub_83FE10
add	esp, 1Ch

loc_841DFD:
mov	byte ptr [esi+44h], 1

loc_841E01:
mov	ecx, esi
call	sub_841AE0

loc_841E08:
pop	edi
pop	esi
pop	ebp
pop	ebx
retn	8
sub_841D00 endp

align 10h



; int __stdcall	sub_841E10(wchar_t *Src, int)
sub_841E10 proc	near

Src= dword ptr	4
arg_4= dword ptr  8

mov	eax, [esp+arg_4]
push	ebx
push	ebp
push	esi
push	edi
mov	esi, ecx
cmp	eax, 0FFFFFFFFh
jz	short loc_841E22
mov	[esi+0Ch], eax

lo